diff --git a/.editorconfig b/.editorconfig index 4a6b8a6375311b..3a416e87aba4db 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,6 +7,7 @@ indent_size = 2 indent_style = space insert_final_newline = true trim_trailing_whitespace = true +quote_type = single [vcbuild.bat] end_of_line = crlf diff --git a/.eslintrc.js b/.eslintrc.js index 99f7196ffc8158..af1249eae6436e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,7 +16,8 @@ const ModuleFindPath = Module._findPath; const hacks = [ 'eslint-plugin-node-core', 'eslint-plugin-markdown', - 'babel-eslint', + '@babel/eslint-parser', + '@babel/plugin-syntax-class-properties', ]; Module._findPath = (request, paths, isMain) => { const r = ModuleFindPath(request, paths, isMain); @@ -37,8 +38,14 @@ Module._findPath = (request, paths, isMain) => { module.exports = { root: true, plugins: ['markdown', 'node-core'], - parser: 'babel-eslint', - parserOptions: { sourceType: 'script' }, + parser: '@babel/eslint-parser', + parserOptions: { + babelOptions: { + plugins: [Module._findPath('@babel/plugin-syntax-class-properties')], + }, + requireConfigFile: false, + sourceType: 'script', + }, overrides: [ { files: [ @@ -150,6 +157,7 @@ module.exports = { 'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0, maxBOF: 0 }], 'no-new-require': 'error', 'no-new-symbol': 'error', + 'no-nonoctal-decimal-escape': 'error', 'no-obj-calls': 'error', 'no-octal': 'error', 'no-path-concat': 'error', @@ -226,6 +234,8 @@ module.exports = { 'no-unreachable': 'error', 'no-unsafe-finally': 'error', 'no-unsafe-negation': 'error', + 'no-unsafe-optional-chaining': 'error', + 'no-unused-expressions': ['error', { allowShortCircuit: true }], 'no-unused-labels': 'error', 'no-unused-vars': ['error', { args: 'none', caughtErrors: 'all' }], 'no-use-before-define': ['error', { diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index 2a2e94d411fe2a..84b6daf665e522 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -15,7 +15,7 @@ repo. https://github.com/nodejs/help Please fill in as much of the template below as you're able. Version: output of `node -v` -Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows) +Platform: output of `uname -a` (UNIX), or output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console (Windows) Subsystem: if known, please specify affected core module name --> diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml index 7a430274d348da..04a620249f0225 100644 --- a/.github/workflows/auto-start-ci.yml +++ b/.github/workflows/auto-start-ci.yml @@ -9,6 +9,9 @@ on: # ./doc/guides/commit-queue.md - cron: "*/5 * * * *" +env: + NODE_VERSION: 14.x + jobs: startCI: if: github.repository == 'nodejs/node' @@ -20,7 +23,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v2-beta with: - node-version: '12' + node-version: ${{ env.NODE_VERSION }} - name: Install node-core-utils run: npm install -g node-core-utils diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index 7e91c8fd007284..226dc69f0e921b 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -13,6 +13,7 @@ env: jobs: build-tarball: + if: github.event.pull_request.draft == false env: PYTHON_VERSION: 3.9 runs-on: ubuntu-latest diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 2a48e0d0fd42c0..2a021723e6f5df 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -15,6 +15,7 @@ env: jobs: build-windows-with-quic: + if: github.event.pull_request.draft == false runs-on: windows-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/close-stalled.yml b/.github/workflows/close-stalled.yml index 1834d3ac2e6815..916baf0463fa6c 100644 --- a/.github/workflows/close-stalled.yml +++ b/.github/workflows/close-stalled.yml @@ -5,6 +5,7 @@ on: jobs: stale: + if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - uses: actions/stale@v3 diff --git a/.github/workflows/comment-stalled.yml b/.github/workflows/comment-stalled.yml index 62bd26f39eb72d..1c21505c4ad317 100644 --- a/.github/workflows/comment-stalled.yml +++ b/.github/workflows/comment-stalled.yml @@ -7,6 +7,7 @@ on: jobs: staleComment: + if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - name: Post comment diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml index 3e6b0e49080653..5b36a358c61533 100644 --- a/.github/workflows/commit-queue.yml +++ b/.github/workflows/commit-queue.yml @@ -14,6 +14,9 @@ on: schedule: - cron: "*/5 * * * *" +env: + NODE_VERSION: 14.x + jobs: commitQueue: if: github.repository == 'nodejs/node' @@ -34,7 +37,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v2-beta with: - node-version: '12' + node-version: ${{ env.NODE_VERSION }} - name: Install node-core-utils run: npm install -g node-core-utils@latest diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index 5ebd89115b4230..75f296230dfd37 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -1,19 +1,28 @@ -# TODO(bcoe): add similar job for Windows coverage. name: coverage-linux on: pull_request: + paths-ignore: + - 'doc/**' + - 'deps/**' + - 'benchmark/**' + - 'tools/**' push: branches: - master + paths-ignore: + - 'doc/**' + - 'deps/**' + - 'benchmark/**' + - 'tools/**' env: PYTHON_VERSION: 3.9 FLAKY_TESTS: dontcare jobs: - # TODO(bcoe): add support for C++ coverage. coverage-linux: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -23,18 +32,21 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information run: npx envinfo + - name: Install gcovr + run: pip install gcovr==4.2 - name: Build - run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn" + run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage" # TODO(bcoe): fix the couple tests that fail with the inspector enabled. # The cause is most likely coverage's use of the inspector. - name: Test - run: NODE_V8_COVERAGE=coverage/tmp make run-ci -j2 V=1 TEST_CI_ARGS="-p dots" || exit 0 - - name: Report + run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j2 V=1 TEST_CI_ARGS="-p dots" || exit 0 + - name: Report JS run: npx c8 report --check-coverage - - name: Output file count - run: ls -l coverage/tmp/ | wc -l + - name: Report C++ + run: cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd) + # Clean temporary output from gcov and c8, so that it's not uploaded: - name: Clean tmp - run: rm -rf coverage/tmp + run: rm -rf coverage/tmp && rm -rf out - name: Upload uses: codecov/codecov-action@v1 with: diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml new file mode 100644 index 00000000000000..188861883bd73d --- /dev/null +++ b/.github/workflows/coverage-windows.yml @@ -0,0 +1,52 @@ +name: coverage-windows + +on: + pull_request: + paths-ignore: + - 'doc/**' + - 'deps/**' + - 'benchmark/**' + - 'tools/**' + push: + branches: + - master + paths-ignore: + - 'doc/**' + - 'deps/**' + - 'benchmark/**' + - 'tools/**' + +env: + PYTHON_VERSION: 3.9 + FLAKY_TESTS: dontcare + +jobs: + coverage-windows: + if: github.event.pull_request.draft == false + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v2 + with: + python-version: ${{ env.PYTHON_VERSION }} + - name: Install deps + run: choco install nasm + - name: Environment Information + run: npx envinfo + - name: Build + run: ./vcbuild.bat + # TODO(bcoe): investigate tests that fail with coverage enabled + # on Windows. + - name: Test + run: ./vcbuild.bat test-ci-js; node -e 'process.exit(0)' + env: + NODE_V8_COVERAGE: ./coverage/tmp + - name: Report + run: npx c8 report + - name: Clean tmp + run: npx rimraf ./coverage/tmp + - name: Upload + uses: codecov/codecov-action@v1 + with: + directory: ./coverage diff --git a/.github/workflows/license-builder.yml b/.github/workflows/license-builder.yml new file mode 100644 index 00000000000000..115bef9977d9d5 --- /dev/null +++ b/.github/workflows/license-builder.yml @@ -0,0 +1,23 @@ +name: license update +on: + schedule: + # 00:00:00 every Monday + # https://crontab.guru/#0_0_*_*_1 + - cron: "0 0 * * 1" + workflow_dispatch: + +jobs: + update_license: + if: github.repository == 'nodejs/node' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: "./tools/license-builder.sh" # run the license builder tool + - uses: gr2m/create-or-update-pull-request-action@v1.x # create a PR or update the Action's existing PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + title: "doc: run license-builder" + body: "License is likely out of date. This is an automatically generated PR by the `license-builder.yml` GitHub Action, which runs `license-builder.sh` and submits a new PR or updates an existing PR." + commit-message: 'doc: run license-builder' + labels: meta diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 573057742ce70b..26be5a7cab2f98 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -10,10 +10,11 @@ on: env: PYTHON_VERSION: 3.9 - NODE_VERSION: 10.x + NODE_VERSION: 14.x jobs: lint-addon-docs: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -24,8 +25,9 @@ jobs: - name: Environment Information run: npx envinfo - name: Lint addon docs - run: NODE=$(which node) make lint-addon-docs + run: NODE=$(command -v node) make lint-addon-docs lint-cpp: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -38,6 +40,7 @@ jobs: - name: Lint C/C++ files run: make lint-cpp lint-md: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -50,8 +53,9 @@ jobs: - name: Lint docs run: | echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json" - NODE=$(which node) make lint-md + NODE=$(command -v node) make lint-md lint-js: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -62,8 +66,9 @@ jobs: - name: Environment Information run: npx envinfo - name: Lint JavaScript files - run: NODE=$(which node) make lint-js + run: NODE=$(command -v node) make lint-js lint-py: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -76,9 +81,17 @@ jobs: - name: Lint Python run: | make lint-py-build || true - NODE=$(which node) make lint-py - + NODE=$(command -v node) make lint-py + lint-sh: + if: github.event.pull_request.draft == false + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - run: shellcheck -V + - name: Lint Shell scripts + run: tools/lint-sh.js . lint-codeowners: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/misc.yml b/.github/workflows/misc.yml index df33822770523b..2a50a2346a32a3 100644 --- a/.github/workflows/misc.yml +++ b/.github/workflows/misc.yml @@ -9,10 +9,11 @@ on: - v[0-9]+.x env: - NODE_VERSION: 12.x + NODE_VERSION: 14.x jobs: build-docs: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -23,7 +24,7 @@ jobs: - name: Environment Information run: npx envinfo - name: Build - run: NODE=$(which node) make doc-only + run: NODE=$(command -v node) make doc-only - uses: actions/upload-artifact@v1 with: name: docs diff --git a/.github/workflows/test-asan.yml b/.github/workflows/test-asan.yml index 72b259a8354d8c..7df02293fb84a9 100644 --- a/.github/workflows/test-asan.yml +++ b/.github/workflows/test-asan.yml @@ -19,6 +19,7 @@ env: jobs: test-asan: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest env: CC: clang diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 967b863f25ded7..9d9b007b8f6f91 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -15,6 +15,7 @@ env: jobs: test-linux: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -30,6 +31,7 @@ jobs: run: make run-ci -j2 V=1 TEST_CI_ARGS="-p actions" test-linux-with-quic: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 5c5f2b2a1953b8..a476e6a08c5fc6 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -15,6 +15,7 @@ env: jobs: test-macOS-with-quic: + if: github.event.pull_request.draft == false runs-on: macos-latest steps: - uses: actions/checkout@v2 @@ -25,6 +26,6 @@ jobs: - name: Environment Information run: npx envinfo - name: Build - run: make build-ci -j8 V=1 CONFIG_FLAGS="--error-on-warn --experimental-quic" + run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --experimental-quic" - name: Test - run: make run-ci -j8 V=1 TEST_CI_ARGS="-p actions" + run: make run-ci -j2 V=1 TEST_CI_ARGS="-p actions" diff --git a/.gitignore b/.gitignore index 4592f603e060ac..c5ae6ea68d82fa 100644 --- a/.gitignore +++ b/.gitignore @@ -93,6 +93,9 @@ _UpgradeReport_Files/ /*.host.mk /deps/openssl/openssl.target.mk /deps/zlib/zlib.target.mk +# generated by MSVC with /P enabled +tools/*/*.i +tools/*/*.i.tmp # === Rules for release artifacts === /*.tar.* diff --git a/.nycrc b/.nycrc index 6192a73a77b0d2..42aad37414a2ee 100644 --- a/.nycrc +++ b/.nycrc @@ -9,7 +9,7 @@ "reporter": [ "html", "text", - "lcov" + "cobertura" ], "lines": 95, "branches": "93", diff --git a/BSDmakefile b/BSDmakefile index b2f36fa28720f1..3994ab9efd9a4d 100644 --- a/BSDmakefile +++ b/BSDmakefile @@ -3,7 +3,7 @@ FLAGS=${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W} all: .DEFAULT .DEFAULT: - @which gmake > /dev/null 2>&1 ||\ + @command -v gmake > /dev/null 2>&1 ||\ (echo "GMake is required for node.js to build.\ Install and try again" && exit 1) @gmake ${.FLAGS} ${.TARGETS} diff --git a/BUILDING.md b/BUILDING.md index d25d92fbfaa3f6..6d9b26377de83f 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -24,11 +24,13 @@ file a new issue. * [Unix prerequisites](#unix-prerequisites) * [macOS prerequisites](#macos-prerequisites) * [Building Node.js](#building-nodejs-1) + * [Installing Node.js](#installing-nodejs) * [Running Tests](#running-tests) * [Running Coverage](#running-coverage) * [Building the documentation](#building-the-documentation) * [Building a debug build](#building-a-debug-build) * [Building an ASAN build](#building-an-asan-build) + * [Speeding up frequent rebuilds when developing](#speeding-up-frequent-rebuilds-when-developing) * [Troubleshooting Unix and macOS builds](#troubleshooting-unix-and-macos-builds) * [Windows](#windows) * [Prerequisites](#prerequisites) @@ -112,6 +114,7 @@ platforms. This is true regardless of entries in the table below. | Windows | x64, x86 | Windows Server 2012 (not R2) | Experimental | | | Windows | arm64 | >= Windows 10 | Tier 2 (compiling) / Experimental (running) | | | macOS | x64 | >= 10.13 | Tier 1 | | +| macOS | arm64 | >= 11 | Experimental | | | SmartOS | x64 | >= 18 | Tier 2 | | | AIX | ppc64be >=power7 | >= 7.2 TL02 | Tier 2 | | | FreeBSD | x64 | >= 11 | Experimental | Downgraded as of Node.js 12 [7](#fn7) | @@ -166,16 +169,16 @@ Depending on the host platform, the selection of toolchains may vary. Binaries at are produced on: -| Binary package | Platform and Toolchain | -| --------------------- | ------------------------------------------------------------------------ | -| aix-ppc64 | AIX 7.1 TL05 on PPC64BE with GCC 6 | -| darwin-x64 (and .pkg) | macOS 10.15, Xcode Command Line Tools 11 with -mmacosx-version-min=10.13 | -| linux-arm64 | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) | -| linux-armv7l | Cross-compiled on Ubuntu 18.04 x64 with [custom GCC toolchain](https://github.com/rvagg/rpi-newer-crosstools) | -| linux-ppc64le | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) | -| linux-s390x | RHEL 7 with devtoolset-8 / GCC 8 [8](#fn8) | -| linux-x64 | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) | -| win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2019 | +| Binary package | Platform and Toolchain | +| --------------------- | ------------------------------------------------------------------------------------------------------------- | +| aix-ppc64 | AIX 7.1 TL05 on PPC64BE with GCC 6 | +| darwin-x64 (and .pkg) | macOS 10.15, Xcode Command Line Tools 11 with -mmacosx-version-min=10.13 | +| linux-arm64 | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) | +| linux-armv7l | Cross-compiled on Ubuntu 18.04 x64 with [custom GCC toolchain](https://github.com/rvagg/rpi-newer-crosstools) | +| linux-ppc64le | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) | +| linux-s390x | RHEL 7 with devtoolset-8 / GCC 8 [8](#fn8) | +| linux-x64 | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) | +| win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2019 | 8: The Enterprise Linux devtoolset-8 allows us to compile binaries with GCC 8 but linked to the glibc and libstdc++ versions of the host @@ -299,6 +302,14 @@ project's root directory. $ sudo ./tools/macos-firewall.sh ``` +#### Installing Node.js + +To install this version of Node.js into a system directory: + +```bash +[sudo] make install +``` + #### Running Tests To verify the build: @@ -380,28 +391,32 @@ $ make coverage ``` A detailed coverage report will be written to `coverage/index.html` for -JavaScript coverage and to `coverage/cxxcoverage.html` for C++ coverage -(if you only want to run the JavaScript tests then you do not need to run -the first command `./configure --coverage`). +JavaScript coverage and to `coverage/cxxcoverage.html` for C++ coverage. -_Generating a test coverage report can take several minutes._ - -To collect coverage for a subset of tests you can set the `CI_JS_SUITES` and -`CI_NATIVE_SUITES` variables (to run specific suites, e.g., `child-process`, in -isolation, unset the opposing `_SUITES` variable): +If you only want to run the JavaScript tests then you do not need to run +the first command (`./configure --coverage`). Run `make coverage-run-js`, +to execute JavaScript tests independently of the C++ test suite: ```text -$ CI_JS_SUITES=child-process CI_NATIVE_SUITES= make coverage +$ make coverage-run-js ``` -The above command executes tests for the `child-process` subsystem and -outputs the resulting coverage report. +If you are updating tests and want to collect coverage for a single test file +(e.g. `test/parallel/test-stream2-transform.js`): -Alternatively, you can run `make coverage-run-js`, to execute JavaScript tests -independently of the C++ test suite: +```text +$ make coverage-clean +$ NODE_V8_COVERAGE=coverage/tmp python tools/test.py test/parallel/test-stream2-transform.js +$ make coverage-report-js +``` + +You can collect coverage for the entire suite of tests for a given subsystem +by providing the name of a subsystem: ```text -$ CI_JS_SUITES=fs CI_NATIVE_SUITES= make coverage-run-js +$ make coverage-clean +$ NODE_V8_COVERAGE=coverage/tmp python tools/test.py -J --mode=release child-process +$ make coverage-report-js ``` The `make coverage` command downloads some tools to the project root directory. @@ -458,12 +473,6 @@ To test if Node.js was built correctly: ./node -e "console.log('Hello from Node.js ' + process.version)" ``` -To install this version of Node.js into a system directory: - -```bash -[sudo] make install -``` - #### Building a debug build If you run into an issue where the information provided by the JS stack trace @@ -519,6 +528,29 @@ $ ./configure --debug --enable-asan && make -j4 $ make test-only ``` +#### Speeding up frequent rebuilds when developing + +If you plan to frequently rebuild Node.js, especially if using several branches, +installing `ccache` can help to greatly reduce build times. Set up with: +```console +$ sudo apt install ccache # for Debian/Ubuntu, included in most Linux distros +$ ccache -o cache_dir= +$ ccache -o max_size=5.0G +$ export CC="ccache gcc" # add to your .profile +$ export CXX="ccache g++" # add to your .profile +``` +This will allow for near-instantaneous rebuilds even when switching branches. + +When modifying only the JS layer in `lib`, it is possible to externally load it +without modifying the executable: +```console +$ ./configure --node-builtin-modules-path $(pwd) +``` +The resulting binary won't include any JS files and will try to load them from +the specified directory. The JS debugger of Visual Studio Code supports this +configuration since the November 2020 version and allows for setting +breakpoints. + #### Troubleshooting Unix and macOS builds Stale builds can sometimes result in `file not found` errors while building. diff --git a/CHANGELOG.md b/CHANGELOG.md index 28474869adefef..ce7cabe43457af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ Select a Node.js version below to view the changelog history: -* [Node.js 14](doc/changelogs/CHANGELOG_V14.md) **Current** +* [Node.js 15](doc/changelogs/CHANGELOG_V15.md) **Current** +* [Node.js 14](doc/changelogs/CHANGELOG_V14.md) **Long Term Support** * [Node.js 13](doc/changelogs/CHANGELOG_V13.md) End-of-Life -* [Node.js 12](doc/changelogs/CHANGELOG_V12.md) **Long Term Support** +* [Node.js 12](doc/changelogs/CHANGELOG_V12.md) Long Term Support * [Node.js 11](doc/changelogs/CHANGELOG_V11.md) End-of-Life * [Node.js 10](doc/changelogs/CHANGELOG_V10.md) Long Term Support * [Node.js 9](doc/changelogs/CHANGELOG_V9.md) End-of-Life @@ -24,13 +25,28 @@ release. - + + + + (Ctrl+C). diff --git a/doc/api/packages.md b/doc/api/packages.md index 18bafb1c36685b..4a7fea3b5635ef 100644 --- a/doc/api/packages.md +++ b/doc/api/packages.md @@ -5,6 +5,7 @@ changes: - version: - v14.13.0 + - v12.20.0 pr-url: https://github.com/nodejs/node/pull/34718 description: Add support for `"exports"` patterns. - version: v14.6.0 @@ -252,8 +253,6 @@ absolute subpath of the package such as ### Subpath exports -> Stability: 1 - Experimental - When using the [`"exports"`][] field, custom subpaths can be defined along with the main entry point by treating the main entry point as the `"."` subpath: @@ -284,8 +283,6 @@ import submodule from 'es-module-package/private-module.js'; ### Subpath imports -> Stability: 1 - Experimental - In addition to the [`"exports"`][] field, it is possible to define internal package import maps that only apply to import specifiers from within the package itself. @@ -323,8 +320,6 @@ analogous to the exports field. ### Subpath patterns -> Stability: 1 - Experimental - For packages with a small number of exports or imports, we recommend explicitly listing each exports subpath entry. But for packages that have large numbers of subpaths, this might cause `package.json` bloat and @@ -369,9 +364,48 @@ treating the right hand side target pattern as a `**` glob against the list of files within the package. Because `node_modules` paths are forbidden in exports targets, this expansion is dependent on only the files of the package itself. -### Exports sugar +### Subpath folder mappings + + +> Stability: 0 - Deprecated: Use subpath patterns instead. + +Before subpath patterns were supported, a trailing `"/"` suffix was used to +support folder mappings: + +```json +{ + "exports": { + "./features/": "./features/" + } +} +``` + +_This feature will be removed in a future release._ + +Instead, use direct [subpath patterns][]: -> Stability: 1 - Experimental +```json +{ + "exports": { + "./features/*": "./features/*.js" + } +} +``` + +The benefit of patterns over folder exports is that packages can always be +imported by consumers without subpath file extensions being necessary. + +### Exports sugar If the `"."` export is the only export, the [`"exports"`][] field provides sugar for this case being the direct [`"exports"`][] field value. @@ -397,8 +431,6 @@ can be written: ### Conditional exports -> Stability: 1 - Experimental - Conditional exports provide a way to map to different paths depending on certain conditions. They are supported for both CommonJS and ES module imports. @@ -477,8 +509,6 @@ order to support packages with conditional exports. For this reason, using ### Nested conditions -> Stability: 1 - Experimental - In addition to direct mappings, Node.js also supports nested condition objects. For example, to define a package that only has dual mode entry points for @@ -834,12 +864,12 @@ The following fields in `package.json` files are used in Node.js: * [`"name"`][] - Relevant when using named imports within a package. Also used by package managers as the name of the package. +* [`"main"`][] - The default module when loading the package, if exports is not + specified, and in versions of Node.js prior to the introduction of exports. * [`"type"`][] - The package type determining whether to load `.js` files as CommonJS or ES modules. * [`"exports"`][] - Package exports and conditional exports. When present, limits which submodules can be loaded from within the package. -* [`"main"`][] - The default module when loading the package, if exports is not - specified, and in versions of Node.js prior to the introduction of exports. * [`"imports"`][] - Package imports, for use by modules within the package itself. @@ -871,6 +901,30 @@ _npm_ registry requires a name that satisfies The `"name"` field can be used in addition to the [`"exports"`][] field to [self-reference][] a package using its name. +### `"main"` + + +* Type: {string} + +```json +{ + "main": "./main.js" +} +``` + +The `"main"` field defines the script that is used when the [package directory +is loaded via `require()`](modules.md#modules_folders_as_modules). Its value +is a path. + +```js +require('./path/to/directory'); // This resolves to ./path/to/directory/main.js. +``` + +When a package has an [`"exports"`][] field, this will take precedence over the +`"main"` field when importing the package by name. + ### `"type"` - -* Type: {string} - -```json -{ - "main": "./main.js" -} -``` - -The `"main"` field defines the script that is used when the [package directory -is loaded via `require()`](modules.md#modules_folders_as_modules). Its value -is interpreted as a path. - -```js -require('./path/to/directory'); // This resolves to ./path/to/directory/main.js. -``` - -When a package has an [`"exports"`][] field, this will take precedence over the -`"main"` field when importing the package by name. - ### `"imports"` -> Stability: 1 - Experimental - * Type: {Object} ```json @@ -1040,5 +1068,6 @@ This field defines [subpath imports][] for the current package. [self-reference]: #packages_self_referencing_a_package_using_its_name [subpath exports]: #packages_subpath_exports [subpath imports]: #packages_subpath_imports +[subpath patterns]: #packages_subpath_patterns [the full specifier path]: esm.md#esm_mandatory_file_extensions [the dual CommonJS/ES module packages section]: #packages_dual_commonjs_es_module_packages diff --git a/doc/api/path.md b/doc/api/path.md index c26a98e59c9d6d..ca62e2f3628bfe 100644 --- a/doc/api/path.md +++ b/doc/api/path.md @@ -434,6 +434,10 @@ A [`TypeError`][] is thrown if `path` is not a string. ## `path.posix` * {Object} @@ -441,6 +445,8 @@ added: v0.11.15 The `path.posix` property provides access to POSIX specific implementations of the `path` methods. +The API is accessible via `require('path').posix` or `require('path/posix')`. + ## `path.relative(from, to)` * {Object} @@ -575,6 +585,8 @@ added: v0.11.15 The `path.win32` property provides access to Windows-specific implementations of the `path` methods. +The API is accessible via `require('path').win32` or `require('path/win32')`. + [MSDN-Rel-Path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualified-vs-relative-paths [`TypeError`]: errors.md#errors_class_typeerror [`path.parse()`]: #path_path_parse_path diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index 267d71344bb0b7..bb22c09fddd7de 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -72,8 +72,11 @@ added: The `eventLoopUtilization()` method returns an object that contains the cumulative duration of time the event loop has been both idle and active as a high resolution milliseconds timer. The `utilization` value is the calculated -Event Loop Utilization (ELU). If bootstrapping has not yet finished, the -properties have the value of `0`. +Event Loop Utilization (ELU). + +If bootstrapping has not yet finished on the main thread the properties have +the value of `0`. The ELU is immediately available on [Worker threads][] since +bootstrap happens within the event loop. Both `utilization1` and `utilization2` are optional parameters. @@ -766,6 +769,7 @@ require('some-module'); [Performance Timeline]: https://w3c.github.io/performance-timeline/ [User Timing]: https://www.w3.org/TR/user-timing/ [Web Performance APIs]: https://w3c.github.io/perf-timing-primer/ +[Worker threads]: worker_threads.md#worker_threads_worker_threads [`'exit'`]: process.md#process_event_exit [`child_process.spawnSync()`]: child_process.md#child_process_child_process_spawnsync_command_args_options [`process.hrtime()`]: process.md#process_process_hrtime_time diff --git a/doc/api/process.md b/doc/api/process.md index 5568adfb6fc203..8f7a98503a6d48 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -525,10 +525,8 @@ process.on('SIGTERM', handle); * `'SIGSTOP'` cannot have a listener installed. * `'SIGBUS'`, `'SIGFPE'`, `'SIGSEGV'` and `'SIGILL'`, when not raised artificially using kill(2), inherently leave the process in a state from - which it is not safe to attempt to call JS listeners. Doing so might lead to - the process hanging in an endless loop, since listeners attached using - `process.on()` are called asynchronously and therefore unable to correct the - underlying problem. + which it is not safe to call JS listeners. Doing so might cause the process + to stop responding. * `0` can be sent to test for the existence of a process, it has no effect if the process exists, but will throw an error if the process does not exist. @@ -885,31 +883,29 @@ changes: * `filename` {string} * `flags` {os.constants.dlopen} **Default:** `os.constants.dlopen.RTLD_LAZY` -The `process.dlopen()` method allows to dynamically load shared -objects. It is primarily used by `require()` to load -C++ Addons, and should not be used directly, except in special -cases. In other words, [`require()`][] should be preferred over -`process.dlopen()`, unless there are specific reasons. +The `process.dlopen()` method allows dynamically loading shared objects. It is +primarily used by `require()` to load C++ Addons, and should not be used +directly, except in special cases. In other words, [`require()`][] should be +preferred over `process.dlopen()` unless there are specific reasons such as +custom dlopen flags or loading from ES modules. The `flags` argument is an integer that allows to specify dlopen behavior. See the [`os.constants.dlopen`][] documentation for details. -If there are specific reasons to use `process.dlopen()` (for instance, -to specify dlopen flags), it's often useful to use [`require.resolve()`][] -to look up the module's path. +An important requirement when calling `process.dlopen()` is that the `module` +instance must be passed. Functions exported by the C++ Addon are then +accessible via `module.exports`. -An important drawback when calling `process.dlopen()` is that the `module` -instance must be passed. Functions exported by the C++ Addon will be accessible -via `module.exports`. - -The example below shows how to load a C++ Addon, named as `binding`, -that exports a `foo` function. All the symbols will be loaded before +The example below shows how to load a C++ Addon, named `local.node`, +that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant. In this example the constant is assumed to be available. ```js const os = require('os'); -process.dlopen(module, require.resolve('binding'), +const path = require('path'); +const module = { exports: {} }; +process.dlopen(module, path.join(__dirname, 'local.node'), os.constants.dlopen.RTLD_NOW); module.exports.foo(); ``` @@ -1179,6 +1175,9 @@ And `process.argv`: ['/usr/local/bin/node', 'script.js', '--version'] ``` +Refer to [`Worker` constructor][] for the detailed behavior of worker +threads with this property. + ## `process.execPath` ```js @@ -1901,7 +1899,7 @@ present. ```js const data = process.report.getReport(); -console.log(data.header.nodeJsVersion); +console.log(data.header.nodejsVersion); // Similar to process.report.writeReport() const fs = require('fs'); @@ -1915,7 +1913,7 @@ Additional documentation is available in the [report documentation][]. added: v11.12.0 changes: - version: - - REPLACEME + - v15.0.0 pr-url: https://github.com/nodejs/node/pull/35654 description: This API is no longer experimental. --> @@ -2210,7 +2208,18 @@ The `process.setgroups()` method sets the supplementary group IDs for the Node.js process. This is a privileged operation that requires the Node.js process to have `root` or the `CAP_SETGID` capability. -The `groups` array can contain numeric group IDs, group names or both. +The `groups` array can contain numeric group IDs, group names, or both. + +```js +if (process.getgroups && process.setgroups) { + try { + process.setgroups([501]); + console.log(process.getgroups()); // new groups + } catch (err) { + console.log(`Failed to set groups: ${err}`); + } +} +``` This function is only available on POSIX platforms (i.e. not Windows or Android). @@ -2258,7 +2267,8 @@ exception value itself as its first argument. If such a function is set, the [`'uncaughtException'`][] event will not be emitted. If `--abort-on-uncaught-exception` was passed from the command line or set through [`v8.setFlagsFromString()`][], the process will -not abort. +not abort. Actions configured to take place on exceptions such as report +generations will be affected too To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this @@ -2643,6 +2653,7 @@ cases: [`NODE_OPTIONS`]: cli.md#cli_node_options_options [`Promise.race()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/race [`Worker`]: worker_threads.md#worker_threads_class_worker +[`Worker` constructor]: worker_threads.md#worker_threads_new_worker_filename_options [`console.error()`]: console.md#console_console_error_data_args [`console.log()`]: console.md#console_console_log_data_args [`domain`]: domain.md @@ -2662,7 +2673,6 @@ cases: [`readable.read()`]: stream.md#stream_readable_read_size [`require()`]: globals.md#globals_require [`require.main`]: modules.md#modules_accessing_the_main_module -[`require.resolve()`]: modules.md#modules_require_resolve_request_options [`subprocess.kill()`]: child_process.md#child_process_subprocess_kill_signal [`v8.setFlagsFromString()`]: v8.md#v8_v8_setflagsfromstring_flags [debugger]: debugger.md diff --git a/doc/api/querystring.md b/doc/api/querystring.md index 34d7675a9c99cc..2b8755df413914 100644 --- a/doc/api/querystring.md +++ b/doc/api/querystring.md @@ -122,8 +122,9 @@ The `querystring.stringify()` method produces a URL query string from a given `obj` by iterating through the object's "own properties". It serializes the following types of values passed in `obj`: -{string|number|boolean|string[]|number[]|boolean[]} -Any other input values will be coerced to empty strings. +{string|number|bigint|boolean|string[]|number[]|bigint[]|boolean[]} +The numeric values must be finite. Any other input values will be coerced to +empty strings. ```js querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); diff --git a/doc/api/quic.md b/doc/api/quic.md index 1cd72dd41b9190..78428f7c24e196 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -1,6 +1,6 @@ # QUIC - + > Stability: 1 - Experimental @@ -251,7 +251,7 @@ TBD ### `net.createQuicSocket([options])` * `options` {Object} @@ -294,7 +294,7 @@ instances associated with a local UDP address. ### Class: `QuicEndpoint` The `QuicEndpoint` wraps a local UDP binding used by a `QuicSocket` to send @@ -305,7 +305,7 @@ Users will not create instances of `QuicEndpoint` directly. #### `quicendpoint.addMembership(address, iface)` * `address` {string} @@ -320,7 +320,7 @@ interface. #### `quicendpoint.address` * Type: Address @@ -338,7 +338,7 @@ If the `QuicEndpoint` is not bound, `quicendpoint.address` is an empty object. #### `quicendpoint.bind([options])` Binds the `QuicEndpoint` if it has not already been bound. User code will @@ -366,7 +366,7 @@ pending `Promise` will be returned. If the additional call to #### `quicendpoint.bound` * Type: {boolean} @@ -375,7 +375,7 @@ Set to `true` if the `QuicEndpoint` is bound to the local UDP port. #### `quicendpoint.close()` Closes and destroys the `QuicEndpoint`. Returns a `Promise` that is resolved @@ -389,7 +389,7 @@ The `Promise` cannot be canceled. Once `quicendpoint.close()` is called, the #### `quicendpoint.closing` * Type: {boolean} @@ -398,7 +398,7 @@ Set to `true` if the `QuicEndpoint` is in the process of closing. #### `quicendpoint.destroy([error])` * `error` {Object} An `Error` object. @@ -407,7 +407,7 @@ Closes and destroys the `QuicEndpoint` instance making it unusable. #### `quicendpoint.destroyed` * Type: {boolean} @@ -416,7 +416,7 @@ Set to `true` if the `QuicEndpoint` has been destroyed. #### `quicendpoint.dropMembership(address, iface)` * `address` {string} @@ -432,7 +432,7 @@ drop membership on all valid interfaces. #### `quicendpoint.fd` * Type: {integer} @@ -442,7 +442,7 @@ is not set on Windows. #### `quicendpoint.pending` * Type: {boolean} @@ -452,12 +452,12 @@ the local UDP port. #### `quicendpoint.ref()` #### `quicendpoint.setBroadcast([on])` * `on` {boolean} @@ -467,7 +467,7 @@ packets may be sent to a local interface's broadcast address. #### `quicendpoint.setMulticastInterface(iface)` * `iface` {string} @@ -493,7 +493,7 @@ successful use of this call. ##### Examples: IPv6 outgoing multicast interface On most systems, where scope format uses the interface name: @@ -519,7 +519,7 @@ socket.on('ready', () => { ##### Example: IPv4 outgoing multicast interface All systems use an IP of the host on the desired physical interface: @@ -554,7 +554,7 @@ the system for future multicast packets. #### `quicendpoint.setMulticastLoopback([on])` * `on` {boolean} @@ -564,7 +564,7 @@ multicast packets will also be received on the local interface. #### `quicendpoint.setMulticastTTL(ttl)` * `ttl` {number} @@ -580,7 +580,7 @@ The argument passed to `setMulticastTTL()` is a number of hops between #### `quicendpoint.setTTL(ttl)` * `ttl` {number} @@ -596,12 +596,12 @@ The default on most systems is `64` but can vary. #### `quicendpoint.unref()` ### Class: `QuicSession extends EventEmitter` * Extends: {EventEmitter} @@ -612,7 +612,7 @@ Users will not create instances of `QuicSession` directly. #### Event: `'close'` Emitted after the `QuicSession` has been destroyed and is no longer usable. @@ -621,7 +621,7 @@ The `'close'` event will not be emitted more than once. #### Event: `'error'` Emitted immediately before the `'close'` event if the `QuicSession` was @@ -635,7 +635,7 @@ The `'error'` event will not be emitted more than once. #### Event: `'keylog'` Emitted when key material is generated or received by a `QuicSession` @@ -660,7 +660,7 @@ The `'keylog'` event will be emitted multiple times. #### Event: `'pathValidation'` Emitted when a path validation result has been determined. This event @@ -678,7 +678,7 @@ The `'pathValidation'` event will be emitted multiple times. #### Event: `'secure'` Emitted after the TLS handshake has been completed. @@ -698,7 +698,7 @@ The `'secure'` event will not be emitted more than once. #### Event: `'stream'` Emitted when a new `QuicStream` has been initiated by the connected peer. @@ -707,7 +707,7 @@ The `'stream'` event may be emitted multiple times. #### `quicsession.ackDelayRetransmitCount` * Type: {number} @@ -716,7 +716,7 @@ The number of retransmissions caused by delayed acknowledgments. #### `quicsession.address` * Type: {Object} @@ -730,7 +730,7 @@ the `QuicSession` is currently associated. #### `quicsession.alpnProtocol` * Type: {string} @@ -739,7 +739,7 @@ The ALPN protocol identifier negotiated for this session. #### `quicsession.authenticated` * Type: {boolean} @@ -755,7 +755,7 @@ representing the reason the peer certificate verification failed. #### `quicsession.bidiStreamCount` * Type: {number} @@ -764,7 +764,7 @@ The total number of bidirectional streams created for this `QuicSession`. #### `quicsession.blockCount` * Type: {number} @@ -777,7 +777,7 @@ quickly enough by the connected peer. #### `quicsession.bytesInFlight` * Type: {number} @@ -787,7 +787,7 @@ to the connected peer. #### `quicsession.bytesReceived` * Type: {number} @@ -796,7 +796,7 @@ The total number of bytes received from the peer. #### `quicsession.bytesSent` * Type: {number} @@ -805,7 +805,7 @@ The total number of bytes sent to the peer. #### `quicsession.cipher` * Type: {Object} @@ -816,7 +816,7 @@ Information about the cipher algorithm selected for the session. #### `quicsession.close()` Begins a graceful close of the `QuicSession`. Existing `QuicStream` instances @@ -827,7 +827,7 @@ instance will be destroyed. Returns a `Promise` that is resolved once the #### `quicsession.closeCode` * Type: {Object} * `code` {number} The error code reported when the `QuicSession` closed. @@ -837,7 +837,7 @@ added: REPLACEME #### `quicsession.closing` * Type: {boolean} @@ -846,7 +846,7 @@ Set to `true` if the `QuicSession` is in the process of a graceful shutdown. #### `quicsession.destroy([error])` * `error` {any} @@ -859,7 +859,7 @@ Any `QuicStream` instances that are still opened will be abruptly closed. #### `quicsession.destroyed` * Type: {boolean} @@ -868,7 +868,7 @@ Set to `true` if the `QuicSession` has been destroyed. #### `quicsession.duration` * Type: {number} @@ -877,7 +877,7 @@ The length of time the `QuicSession` was active. #### `quicsession.getCertificate()` * Returns: {Object} A [Certificate Object][]. @@ -890,7 +890,7 @@ an empty object will be returned. #### `quicsession.getPeerCertificate([detailed])` * `detailed` {boolean} Include the full certificate chain if `true`, otherwise @@ -907,21 +907,21 @@ representing the issuer's certificate. #### `quicsession.handshakeAckHistogram` TBD #### `quicsession.handshakeContinuationHistogram` TBD #### `quicsession.handshakeComplete` * Type: {boolean} @@ -930,7 +930,7 @@ Set to `true` if the TLS handshake has completed. #### `quicsession.handshakeConfirmed` * Type: {boolean} @@ -939,7 +939,7 @@ Set to `true` when the TLS handshake completion has been confirmed. #### `quicsession.handshakeDuration` * Type: {number} @@ -948,7 +948,7 @@ The length of time taken to complete the TLS handshake. #### `quicsession.idleTimeout` * Type: {boolean} @@ -957,7 +957,7 @@ Set to `true` if the `QuicSession` was closed due to an idle timeout. #### `quicsession.keyUpdateCount` * Type: {number} @@ -966,7 +966,7 @@ The number of key update operations that have occurred. #### `quicsession.latestRTT` * Type: {number} @@ -975,7 +975,7 @@ The most recently recorded RTT for this `QuicSession`. #### `quicsession.lossRetransmitCount` * Type: {number} @@ -985,7 +985,7 @@ this `QuicSession`. #### `quicsession.maxDataLeft` * Type: {number} @@ -995,7 +995,7 @@ send to the connected peer. #### `quicsession.maxInFlightBytes` * Type: {number} @@ -1004,7 +1004,7 @@ The maximum number of in-flight bytes recorded for this `QuicSession`. #### `quicsession.maxStreams` * Type: {Object} @@ -1018,7 +1018,7 @@ of the `QuicSession` as the connected peer allows new streams to be created. #### `quicsession.minRTT` * Type: {number} @@ -1027,7 +1027,7 @@ The minimum RTT recorded so far for this `QuicSession`. #### `quicsession.openStream([options])` * `options` {Object} * `halfOpen` {boolean} Set to `true` to open a unidirectional stream, `false` @@ -1048,7 +1048,7 @@ from opening a new stream. #### `quicsession.ping()` The `ping()` method will trigger the underlying QUIC connection to serialize @@ -1061,7 +1061,7 @@ of the `ping()` operation. #### `quicsession.peerInitiatedStreamCount` * Type: {number} @@ -1070,7 +1070,7 @@ The total number of `QuicStreams` initiated by the connected peer. #### `quicsession.qlog` * Type: {stream.Readable} @@ -1083,7 +1083,7 @@ is emitted. #### `quicsession.remoteAddress` * Type: {Object} @@ -1096,7 +1096,7 @@ An object containing the remote address information for the connected peer. #### `quicsession.selfInitiatedStreamCount` * Type: {number} @@ -1105,7 +1105,7 @@ The total number of `QuicStream` instances initiated by this `QuicSession`. #### `quicsession.servername` * Type: {string} @@ -1114,7 +1114,7 @@ The SNI servername requested for this session by the client. #### `quicsession.smoothedRTT` * Type: {number} @@ -1123,7 +1123,7 @@ The modified RTT calculated for this `QuicSession`. #### `quicsession.socket` * Type: {QuicSocket} @@ -1132,7 +1132,7 @@ The `QuicSocket` the `QuicSession` is associated with. #### `quicsession.statelessReset` * Type: {boolean} @@ -1141,7 +1141,7 @@ True if the `QuicSession` was closed due to QUIC stateless reset. #### `quicsession.uniStreamCount` * Type: {number} @@ -1150,7 +1150,7 @@ The total number of unidirectional streams created on this `QuicSession`. #### `quicsession.updateKey()` * Returns: {boolean} `true` if the key update operation is successfully @@ -1163,7 +1163,7 @@ is equal to `true`. #### `quicsession.usingEarlyData` * Type: {boolean} @@ -1175,7 +1175,7 @@ accepted by the server. ### Class: `QuicClientSession extends QuicSession` * Extends: {QuicSession} @@ -1185,7 +1185,7 @@ Instances are created using the `quicsocket.connect()` method. #### Event: `'sessionTicket'` The `'sessionTicket'` event is emitted when a new TLS session ticket has been @@ -1203,7 +1203,7 @@ The `'sessionTicket'` event may be emitted multiple times. #### Event: `'qlog'` The `'qlog'` event is emitted when the `QuicClientSession` is ready to begin @@ -1214,7 +1214,7 @@ providing `qlog` event data. The callback is invoked with a single argument: #### Event: `'usePreferredAddress'` The `'usePreferredAddress'` event is emitted when the client `QuicSession` @@ -1233,7 +1233,7 @@ The `'usePreferredAddress'` event will not be emitted more than once. #### `quicclientsession.ephemeralKeyInfo` * Type: {Object} @@ -1248,7 +1248,7 @@ For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. #### `quicclientsession.setSocket(socket[, natRebinding])` * `socket` {QuicSocket} A `QuicSocket` instance to move this session to. @@ -1264,7 +1264,7 @@ to attempting the migration. ### Class: `QuicServerSession extends QuicSession` * Extends: {QuicSession} @@ -1275,7 +1275,7 @@ Instances are created internally and are emitted using the `QuicSocket` ### Class: `QuicSocket` New instances of `QuicSocket` are created using the `net.createQuicSocket()` @@ -1283,7 +1283,7 @@ method, and can be used as both a client and a server. #### Event: `'busy'` Emitted when the server busy state has been toggled using @@ -1311,7 +1311,7 @@ This `'busy'` event may be emitted multiple times. #### Event: `'close'` Emitted after the `QuicSocket` has been destroyed and is no longer usable. @@ -1320,7 +1320,7 @@ The `'close'` event will only ever be emitted once. #### Event: `'endpointClose'` Emitted after a `QuicEndpoint` associated with the `QuicSocket` closes and @@ -1335,7 +1335,7 @@ closed, the `QuicEndpoint` will also automatically close. #### Event: `'error'` Emitted before the `'close'` event if the `QuicSocket` was destroyed with an @@ -1345,7 +1345,7 @@ The `'error'` event will only ever be emitted once. #### Event: `'listening'` Emitted after `quicsocket.listen()` is called and the `QuicSocket` has started @@ -1356,7 +1356,7 @@ The `'listening'` event will only ever be emitted once. #### Event: `'ready'` Emitted once the `QuicSocket` has been bound to a local UDP port. @@ -1365,7 +1365,7 @@ The `'ready'` event will only ever be emitted once. #### Event: `'session'` Emitted when a new `QuicServerSession` has been created. The callback is @@ -1395,7 +1395,7 @@ automatically and emitting a `'sessionError'` event on the `QuicSocket`. #### Event: `'sessionError'` Emitted when an error occurs processing an event related to a specific @@ -1425,7 +1425,7 @@ server.on('sessionError', (error, session) => { #### `quicsocket.addEndpoint(options)` * `options`: {Object} An object describing the local address to bind to. @@ -1447,7 +1447,7 @@ the `QuicSocket` has been destroyed. #### `quicsocket.blockList` * Type: {net.BlockList} @@ -1465,7 +1465,7 @@ connection attempt will be rejected. #### `quicsocket.bound` * Type: {boolean} @@ -1482,7 +1482,7 @@ Read-only. #### `quicsocket.boundDuration` * Type: {number} @@ -1493,7 +1493,7 @@ Read-only. #### `quicsocket.bytesReceived` * Type: {number} @@ -1504,7 +1504,7 @@ Read-only. #### `quicsocket.bytesSent` * Type: {number} @@ -1515,7 +1515,7 @@ Read-only. #### `quicsocket.clientSessions` * Type: {number} @@ -1527,7 +1527,7 @@ Read-only. #### `quicsocket.close()` * Returns: {Promise} @@ -1539,7 +1539,7 @@ the `QuicSocket` is destroyed. #### `quicsocket.connect([options])` * `options` {Object} @@ -1671,7 +1671,7 @@ Returns a `Promise` that resolves a new `QuicClientSession`. #### `quicsocket.destroy([error])` * `error` {any} @@ -1681,7 +1681,7 @@ event will be emitted after `'close'` if the `error` is not `undefined`. #### `quicsocket.destroyed` * Type: {boolean} @@ -1692,7 +1692,7 @@ Read-only. #### `quicsocket.duration` * Type: {number} @@ -1703,7 +1703,7 @@ Read-only. #### `quicsocket.endpoints` * Type: {QuicEndpoint[]} @@ -1714,7 +1714,7 @@ Read-only. #### `quicsocket.listen([options])` * `options` {Object} @@ -1837,7 +1837,7 @@ once the `QuicSocket` is actively listening. #### `quicsocket.listenDuration` * Type: {number} @@ -1848,7 +1848,7 @@ Read-only #### `quicsocket.listening` * Type: {boolean} @@ -1859,7 +1859,7 @@ Read-only. #### `quicsocket.packetsIgnored` * Type: {number} @@ -1870,7 +1870,7 @@ Read-only. #### `quicsocket.packetsReceived` * Type: {number} @@ -1881,7 +1881,7 @@ Read-only #### `quicsocket.packetsSent` * Type: {number} @@ -1892,7 +1892,7 @@ Read-only #### `quicsocket.pending` * Type: {boolean} @@ -1903,12 +1903,12 @@ Read-only. #### `quicsocket.ref()` #### `quicsocket.serverBusy` * Type: {boolean} When `true`, the `QuicSocket` will reject new connections. @@ -1920,7 +1920,7 @@ error code. To begin receiving connections again, disable busy mode by setting #### `quicsocket.serverBusyCount` * Type: {number} @@ -1931,7 +1931,7 @@ Read-only. #### `quicsocket.serverSessions` * Type: {number} @@ -1943,7 +1943,7 @@ Read-only. #### `quicsocket.setDiagnosticPacketLoss(options)` * `options` {Object} @@ -1960,7 +1960,7 @@ This method is *not* to be used in production applications. #### `quicsocket.statelessReset` * Type: {boolean} `true` if stateless reset processing is enabled; `false` @@ -1974,7 +1974,7 @@ off dynamically through the lifetime of the `QuicSocket`. #### `quicsocket.statelessResetCount` * Type: {number} @@ -1985,19 +1985,19 @@ Read-only. #### `quicsocket.unref();` ### Class: `QuicStream extends stream.Duplex` * Extends: {stream.Duplex} #### Event: `'blocked'` Emitted when the `QuicStream` has been prevented from sending queued data for @@ -2005,7 +2005,7 @@ the `QuicStream` due to congestion control. #### Event: `'close'` Emitted when the `QuicStream` has is completely closed and the underlying @@ -2013,22 +2013,22 @@ resources have been freed. #### Event: `'data'` #### Event: `'end'` #### Event: `'error'` #### Event: `'informationalHeaders'` Emitted when the `QuicStream` has received a block of informational headers. @@ -2048,7 +2048,7 @@ stream('informationalHeaders', (headers) => { #### Event: `'initialHeaders'` Emitted when the `QuicStream` has received a block of initial headers. @@ -2070,7 +2070,7 @@ stream('initialHeaders', (headers) => { #### Event: `'trailingHeaders'` Emitted when the `QuicStream` has received a block of trailing headers. @@ -2092,12 +2092,12 @@ stream('trailingHeaders', (headers) => { #### Event: `'readable'` #### `quicstream.bidirectional` * Type: {boolean} @@ -2109,7 +2109,7 @@ Read-only. #### `quicstream.bytesReceived` * Type: {number} @@ -2120,7 +2120,7 @@ Read-only. #### `quicstream.bytesSent` * Type: {number} @@ -2131,7 +2131,7 @@ Read-only. #### `quicstream.clientInitiated` * Type: {boolean} @@ -2143,7 +2143,7 @@ Read-only. #### `quicstream.close()` * Returns: {Promise} @@ -2153,27 +2153,27 @@ Returns a `Promise` that is resolved once the `QuicStream` has been destroyed. #### `quicstream.dataAckHistogram` TBD #### `quicstream.dataRateHistogram` TBD #### `quicstream.dataSizeHistogram` TBD #### `quicstream.duration` * Type: {number} @@ -2184,7 +2184,7 @@ Read-only. #### `quicstream.finalSize` * Type: {number} @@ -2195,7 +2195,7 @@ Read-only. #### `quicstream.id` * Type: {number} @@ -2206,7 +2206,7 @@ Read-only. #### `quicstream.maxAcknowledgedOffset` * Type: {number} @@ -2217,7 +2217,7 @@ Read-only. #### `quicstream.maxExtendedOffset` * Type: {number} @@ -2228,7 +2228,7 @@ Read-only. #### `quicstream.maxReceivedOffset` * Type: {number} @@ -2239,7 +2239,7 @@ Read-only. #### `quicstream.pushStream(headers[, options])` * `headers` {Object} An object representing a block of headers to be @@ -2265,7 +2265,7 @@ error will be thrown. #### `quicstream.serverInitiated` * Type: {boolean} @@ -2277,7 +2277,7 @@ Read-only. #### `quicstream.session` * Type: {QuicSession} @@ -2289,7 +2289,7 @@ Read-only. #### `quicstream.sendFD(fd[, options])` * `fd` {number|FileHandle} A readable file descriptor. @@ -2315,7 +2315,7 @@ after a stream has finished is supported. #### `quicstream.sendFile(path[, options])` * `path` {string|Buffer|URL} @@ -2337,7 +2337,7 @@ bytes that are read from the file. #### `quicstream.submitInformationalHeaders(headers)` * `headers` {Object} @@ -2345,7 +2345,7 @@ TBD #### `quicstream.submitInitialHeaders(headers)` * `headers` {Object} @@ -2353,7 +2353,7 @@ TBD #### `quicstream.submitTrailingHeaders(headers)` * `headers` {Object} @@ -2361,7 +2361,7 @@ TBD #### `quicstream.unidirectional` * Type: {boolean} diff --git a/doc/api/readline.md b/doc/api/readline.md index d572eb4bb29f9b..7ea2a1d5a60552 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -59,9 +59,11 @@ The `'close'` event is emitted when one of the following occur: * The `rl.close()` method is called and the `readline.Interface` instance has relinquished control over the `input` and `output` streams; * The `input` stream receives its `'end'` event; -* The `input` stream receives `-D` to signal end-of-transmission (EOT); -* The `input` stream receives `-C` to signal `SIGINT` and there is no - `'SIGINT'` event listener registered on the `readline.Interface` instance. +* The `input` stream receives Ctrl+D to signal + end-of-transmission (EOT); +* The `input` stream receives Ctrl+C to signal `SIGINT` + and there is no `'SIGINT'` event listener registered on the + `readline.Interface` instance. The listener function is called without passing any arguments. @@ -75,7 +77,7 @@ added: v0.1.98 The `'line'` event is emitted whenever the `input` stream receives an end-of-line input (`\n`, `\r`, or `\r\n`). This usually occurs when the user -presses the ``, or `` keys. +presses Enter or Return. The listener function is called with a string containing the single line of received input. @@ -126,8 +128,8 @@ added: v0.7.5 --> The `'SIGCONT'` event is emitted when a Node.js process previously moved into -the background using `-Z` (i.e. `SIGTSTP`) is then brought back to the -foreground using fg(1p). +the background using Ctrl+Z (i.e. `SIGTSTP`) is then +brought back to the foreground using fg(1p). If the `input` stream was paused *before* the `SIGTSTP` request, this event will not be emitted. @@ -149,9 +151,9 @@ added: v0.3.0 --> The `'SIGINT'` event is emitted whenever the `input` stream receives a -`-C` input, known typically as `SIGINT`. If there are no `'SIGINT'` event -listeners registered when the `input` stream receives a `SIGINT`, the `'pause'` -event will be emitted. +Ctrl+C input, known typically as `SIGINT`. If there are no `'SIGINT'` +event listeners registered when the `input` stream receives a `SIGINT`, the +`'pause'` event will be emitted. The listener function is invoked without passing any arguments. @@ -168,10 +170,10 @@ rl.on('SIGINT', () => { added: v0.7.5 --> -The `'SIGTSTP'` event is emitted when the `input` stream receives a `-Z` -input, typically known as `SIGTSTP`. If there are no `'SIGTSTP'` event listeners -registered when the `input` stream receives a `SIGTSTP`, the Node.js process -will be sent to the background. +The `'SIGTSTP'` event is emitted when the `input` stream receives a +Ctrl+Z input, typically known as `SIGTSTP`. If there are +no `'SIGTSTP'` event listeners registered when the `input` stream receives a +`SIGTSTP`, the Node.js process will be sent to the background. When the program is resumed using fg(1p), the `'pause'` and `'SIGCONT'` events will be emitted. These can be used to resume the `input` stream. @@ -281,6 +283,15 @@ added: v0.1.98 The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. +### `rl.getPrompt()` + + +* Returns: {string} the current prompt string + +The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. + ### `rl.write(data[, key])` The `stream/promises` API provides an alternative set of asynchronous utility functions for streams that return `Promise` objects rather than using @@ -423,7 +426,7 @@ Is `true` after [`writable.destroy()`][writable-destroy] has been called. + +* {boolean} + +Is `true` if the stream's buffer has been full and stream will emit `'drain'`. + ##### `writable.writableObjectMode` +* `signal` {AbortSignal} A signal representing possible cancellation +* `stream` {Stream} a stream to attach a signal to + +Attaches an AbortSignal to a readable or writeable stream. This lets code +control stream destruction using an `AbortController`. + +Calling `abort` on the `AbortController` corresponding to the passed +`AbortSignal` will behave the same way as calling `.destroy(new AbortError())` +on the stream. + +```js +const fs = require('fs'); + +const controller = new AbortController(); +const read = addAbortSignal( + controller.signal, + fs.createReadStream(('object.json')) +); +// Later, abort the operation closing the stream +controller.abort(); +``` + +Or using an `AbortSignal` with a readable stream as an async iterable: + +```js +const controller = new AbortController(); +setTimeout(() => controller.abort(), 10_000); // set a timeout +const stream = addAbortSignal( + controller.signal, + fs.createReadStream(('object.json')) +); +(async () => { + try { + for await (const chunk of stream) { + await process(chunk); + } + } catch (e) { + if (e.name === 'AbortError') { + // The operation was cancelled + } else { + throw e; + } + } +})(); +``` ## API for stream implementers @@ -1877,6 +1938,9 @@ method. #### `new stream.Writable([options])` ```js @@ -1967,9 +2032,30 @@ const myWritable = new Writable({ }); ``` +Calling `abort` on the `AbortController` corresponding to the passed +`AbortSignal` will behave the same way as calling `.destroy(new AbortError())` +on the writeable stream. + +```js +const { Writable } = require('stream'); + +const controller = new AbortController(); +const myWritable = new Writable({ + write(chunk, encoding, callback) { + // ... + }, + writev(chunks, callback) { + // ... + }, + signal: controller.signal +}); +// Later, abort the operation closing the stream +controller.abort(); + +``` #### `writable._construct(callback)` * `callback` {Function} Call this function (optionally with an error @@ -1992,10 +2078,9 @@ class WriteStream extends Writable { constructor(filename) { super(); this.filename = filename; - this.fd = fd; } _construct(callback) { - fs.open(this.filename, (fd, err) => { + fs.open(this.filename, (err, fd) => { if (err) { callback(err); } else { @@ -2215,6 +2300,9 @@ constructor and implement the [`readable._read()`][] method. #### `new stream.Readable([options])` ```js @@ -2285,9 +2374,26 @@ const myReadable = new Readable({ }); ``` +Calling `abort` on the `AbortController` corresponding to the passed +`AbortSignal` will behave the same way as calling `.destroy(new AbortError())` +on the readable created. + +```js +const { Readable } = require('stream'); +const controller = new AbortController(); +const read = new Readable({ + read(size) { + // ... + }, + signal: controller.signal +}); +// Later, abort the operation closing the stream +controller.abort(); +``` + #### `readable._construct(callback)` * `callback` {Function} Call this function (optionally with an error @@ -2313,7 +2419,7 @@ class ReadStream extends Readable { this.fd = null; } _construct(callback) { - fs.open(this.filename, (fd, err) => { + fs.open(this.filename, (err, fd) => { if (err) { callback(err); } else { @@ -3111,6 +3217,7 @@ contain multi-byte characters. [`stream.finished()`]: #stream_stream_finished_stream_options_callback [`stream.pipe()`]: #stream_readable_pipe_destination_options [`stream.pipeline()`]: #stream_stream_pipeline_source_transforms_destination_callback +[`stream.addAbortSignal()`]: #stream_stream_addabortsignal_signal_stream [`stream.uncork()`]: #stream_writable_uncork [`stream.unpipe()`]: #stream_readable_unpipe_destination [`stream.wrap()`]: #stream_readable_wrap_stream diff --git a/doc/api/string_decoder.md b/doc/api/string_decoder.md index a810462f508cbf..e0e1323cf331e3 100644 --- a/doc/api/string_decoder.md +++ b/doc/api/string_decoder.md @@ -62,7 +62,7 @@ added: v0.9.3 --> * `buffer` {Buffer|TypedArray|DataView} A `Buffer`, or `TypedArray`, or - `DataView` containing the bytes to decode. + `DataView` containing the bytes to decode. * Returns: {string} Returns any remaining input stored in the internal buffer as a string. Bytes @@ -71,6 +71,7 @@ substitution characters appropriate for the character encoding. If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input. +After `end()` is called, the `stringDecoder` object can be reused for new input. ### `stringDecoder.write(buffer)` * `buffer` {Buffer|TypedArray|DataView} A `Buffer`, or `TypedArray`, or - `DataView` containing the bytes to decode. + `DataView` containing the bytes to decode. * Returns: {string} Returns a decoded string, ensuring that any incomplete multibyte characters at diff --git a/doc/api/timers.md b/doc/api/timers.md index cec632ea3d2c03..108c102db51383 100644 --- a/doc/api/timers.md +++ b/doc/api/timers.md @@ -190,14 +190,14 @@ async function timerExample() { timerExample(); ``` -### `setInterval(callback, delay[, ...args])` +### `setInterval(callback[, delay[, ...args]])` * `callback` {Function} The function to call when the timer elapses. * `delay` {number} The number of milliseconds to wait before calling the - `callback`. + `callback`. **Default**: `1`. * `...args` {any} Optional arguments to pass when the `callback` is called. * Returns: {Timeout} for use with [`clearInterval()`][] @@ -208,14 +208,14 @@ set to `1`. Non-integer delays are truncated to an integer. If `callback` is not a function, a [`TypeError`][] will be thrown. -### `setTimeout(callback, delay[, ...args])` +### `setTimeout(callback[, delay[, ...args]])` * `callback` {Function} The function to call when the timer elapses. * `delay` {number} The number of milliseconds to wait before calling the - `callback`. + `callback`. **Default**: `1`. * `...args` {any} Optional arguments to pass when the `callback` is called. * Returns: {Timeout} for use with [`clearTimeout()`][] @@ -321,6 +321,9 @@ added: v0.0.1 Cancels a `Timeout` object created by [`setTimeout()`][]. ## Timers Promises API + > Stability: 1 - Experimental @@ -332,10 +335,13 @@ that return `Promise` objects. The API is accessible via const timersPromises = require('timers/promises'); ``` -### `timersPromises.setTimeout(delay\[, value\[, options\]\])` +### `timersPromises.setTimeout([delay[, value[, options]]])` + * `delay` {number} The number of milliseconds to wait before resolving the - `Promise`. + `Promise`. **Default**: `1`. * `value` {any} A value with which the `Promise` is resolved. * `options` {Object} * `ref` {boolean} Set to `false` to indicate that the scheduled `Timeout` @@ -344,7 +350,10 @@ const timersPromises = require('timers/promises'); * `signal` {AbortSignal} An optional `AbortSignal` that can be used to cancel the scheduled `Timeout`. -### `timersPromises.setImmediate(\[value\[, options\]\])` +### `timersPromises.setImmediate([value[, options]])` + * `value` {any} A value with which the `Promise` is resolved. * `options` {Object} diff --git a/doc/api/tls.md b/doc/api/tls.md index 3e9bb42aeea7b0..bedf4e28e7bc04 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -644,7 +644,7 @@ added: v0.3.2 --> * `callback` {Function} A listener callback that will be registered to listen -for the server instance's `'close'` event. + for the server instance's `'close'` event. * Returns: {tls.Server} The `server.close()` method stops the server from accepting new connections. @@ -975,8 +975,8 @@ added: v9.9.0 --> * Returns: {Buffer|undefined} The latest `Finished` message that has been -sent to the socket as part of a SSL/TLS handshake, or `undefined` if -no `Finished` message has been sent yet. + sent to the socket as part of a SSL/TLS handshake, or `undefined` if + no `Finished` message has been sent yet. As the `Finished` messages are message digests of the complete handshake (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can @@ -1033,7 +1033,7 @@ certificate. `'2A:7A:C2:DD:...'`. * `ext_key_usage` {Array} (Optional) The extended key usage, a set of OIDs. * `subjectaltname` {string} (Optional) A string containing concatenated names - for the subject, an alternative to the `subject` names. + for the subject, an alternative to the `subject` names. * `infoAccess` {Array} (Optional) An array describing the AuthorityInfoAccess, used with OCSP. * `issuerCertificate` {Object} (Optional) The issuer certificate object. For @@ -1099,8 +1099,8 @@ added: v9.9.0 --> * Returns: {Buffer|undefined} The latest `Finished` message that is expected -or has actually been received from the socket as part of a SSL/TLS handshake, -or `undefined` if there is no `Finished` message so far. + or has actually been received from the socket as part of a SSL/TLS handshake, + or `undefined` if there is no `Finished` message so far. As the `Finished` messages are message digests of the complete handshake (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can @@ -1155,7 +1155,7 @@ added: v12.11.0 --> * Returns: {Array} List of signature algorithms shared between the server and -the client in the order of decreasing preference. + the client in the order of decreasing preference. See [SSL_get_shared_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) @@ -1170,8 +1170,8 @@ added: * `length` {number} number of bytes to retrieve from keying material * `label` {string} an application specific label, typically this will be a -value from the -[IANA Exporter Label Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). + value from the + [IANA Exporter Label Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). * `context` {Buffer} Optionally provide a context. * Returns: {Buffer} requested bytes of the keying material @@ -1343,6 +1343,9 @@ being issued by trusted CA (`options.ca`). @@ -423,7 +429,7 @@ Invalid URL protocol values assigned to the `protocol` property are ignored. ##### Special schemes diff --git a/doc/api/util.md b/doc/api/util.md index 063239c241e466..d6be620b42c56d 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -78,7 +78,7 @@ added: v0.11.3 * `section` {string} A string identifying the portion of the application for which the `debuglog` function is being created. * `callback` {Function} A callback invoked the first time the logging function -is called with a function argument that is a more optimized logging function. + is called with a function argument that is a more optimized logging function. * Returns: {Function} The logging function The `util.debuglog()` method is used to create a function that conditionally @@ -1073,7 +1073,7 @@ changes: --> * {symbol} that can be used to declare custom promisified variants of functions, -see [Custom promisified functions][]. + see [Custom promisified functions][]. In addition to being accessible through `util.promisify.custom`, this symbol is [registered globally][global symbol registry] and can be @@ -1159,18 +1159,18 @@ Different Node.js build configurations support different sets of encodings. #### Encodings supported when Node.js is built with the `small-icu` option -| Encoding | Aliases | -| ----------- | --------------------------------- | -| `'utf-8'` | `'unicode-1-1-utf-8'`, `'utf8'` | -| `'utf-16le'` | `'utf-16'` | -| `'utf-16be'` | | +| Encoding | Aliases | +| ----------- | ------------------------------- | +| `'utf-8'` | `'unicode-1-1-utf-8'`, `'utf8'` | +| `'utf-16le'` | `'utf-16'` | +| `'utf-16be'` | | #### Encodings supported when ICU is disabled -| Encoding | Aliases | -| ----------- | --------------------------------- | -| `'utf-8'` | `'unicode-1-1-utf-8'`, `'utf8'` | -| `'utf-16le'` | `'utf-16'` | +| Encoding | Aliases | +| ----------- | ------------------------------- | +| `'utf-8'` | `'unicode-1-1-utf-8'`, `'utf8'` | +| `'utf-16le'` | `'utf-16'` | The `'iso-8859-16'` encoding listed in the [WHATWG Encoding Standard][] is not supported. @@ -1290,6 +1290,10 @@ The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`. ## `util.types` `util.types` provides type checks for different kinds of built-in objects. @@ -1301,6 +1305,8 @@ The result generally does not make any guarantees about what kinds of properties or behavior a value exposes in JavaScript. They are primarily useful for addon developers who prefer to do type checking in JavaScript. +The API is accessible via `require('util').types` or `require('util/types')`. + ### `util.types.isAnyArrayBuffer(value)` + +* Returns: {Object} + +Returns an object with the following properties: + +* `code_and_metadata_size` {number} +* `bytecode_and_metadata_size` {number} +* `external_script_source_size` {number} + + +```js +{ + code_and_metadata_size: 212208, + bytecode_and_metadata_size: 161368, + external_script_source_size: 1410794 +} +``` + +## `v8.getHeapSnapshot()` + + +* Returns: {stream.Readable} A Readable Stream containing the V8 heap snapshot + +Generates a snapshot of the current V8 heap and returns a Readable +Stream that may be used to read the JSON serialized representation. +This JSON stream format is intended to be used with tools such as +Chrome DevTools. The JSON schema is undocumented and specific to the +V8 engine. Therefore, the schema may change from one version of V8 to the next. + +```js +// Print heap snapshot to the console +const v8 = require('v8'); +const stream = v8.getHeapSnapshot(); +stream.pipe(process.stdout); +``` + ## `v8.getHeapSpaceStatistics()` - -* Returns: {stream.Readable} A Readable Stream containing the V8 heap snapshot - -Generates a snapshot of the current V8 heap and returns a Readable -Stream that may be used to read the JSON serialized representation. -This JSON stream format is intended to be used with tools such as -Chrome DevTools. The JSON schema is undocumented and specific to the -V8 engine, and may change from one version of V8 to the next. - -```js -const stream = v8.getHeapSnapshot(); -stream.pipe(process.stdout); -``` - ## `v8.getHeapStatistics()` - -* Returns: {Object} - -Returns an object with the following properties: - -* `code_and_metadata_size` {number} -* `bytecode_and_metadata_size` {number} -* `external_script_source_size` {number} - - -```js -{ - code_and_metadata_size: 212208, - bytecode_and_metadata_size: 161368, - external_script_source_size: 1410794 -} -``` - ## `v8.setFlagsFromString(flags)` + +The `v8.takeCoverage()` method allows the user to write the coverage started by +[`NODE_V8_COVERAGE`][] to disk on demand. This method can be invoked multiple +times during the lifetime of the process. Each time the execution counter will +be reset and a new coverage report will be written to the directory specified +by [`NODE_V8_COVERAGE`][]. + +When the process is about to exit, one last coverage will still be written to +disk unless [`v8.stopCoverage()`][] is invoked before the process exits. + +## `v8.stopCoverage()` + + + +The `v8.stopCoverage()` method allows the user to stop the coverage collection +started by [`NODE_V8_COVERAGE`][], so that V8 can release the execution count +records and optimize code. This can be used in conjunction with +[`v8.takeCoverage()`][] if the user wants to collect the coverage on demand. + ## `v8.writeHeapSnapshot([filename])` + > Stability: 1 - Experimental @@ -310,7 +310,7 @@ implementation and the APIs supported for each: ## Class: `Crypto` Calling `require('crypto').webcrypto` returns an instance of the `Crypto` class. @@ -318,7 +318,7 @@ Calling `require('crypto').webcrypto` returns an instance of the `Crypto` class. ### `crypto.subtle` * Type: {SubtleCrypto} @@ -327,7 +327,7 @@ Provides access to the `SubtleCrypto` API. ### `crypto.getRandomValues(typedArray)` * `typedArray` {Buffer|TypedArray|DataView|ArrayBuffer} @@ -340,12 +340,12 @@ An error will be thrown if the given `typedArray` is larger than 65,536 bytes. ## Class: `CryptoKey` ### `cryptoKey.algorithm` @@ -359,7 +359,7 @@ Read-only. ### `cryptoKey.extractable` * Type: {boolean} @@ -371,7 +371,7 @@ Read-only. ### `cryptoKey.type` * Type: {string} One of `'secret'`, `'private'`, or `'public'`. @@ -381,7 +381,7 @@ asymmetric (`'private'` or `'public'`) key. ### `cryptoKey.usages` * Type: {string[]} @@ -425,7 +425,7 @@ Valid key usages depend on the key algorithm (identified by ## Class: `CryptoKeyPair` The `CryptoKeyPair` is a simple dictionary object with `publicKey` and @@ -433,26 +433,26 @@ The `CryptoKeyPair` is a simple dictionary object with `publicKey` and ### `cryptoKeyPair.privateKey` * Type: {CryptoKey} A {CryptoKey} whose `type` will be `'private'`. ### `cryptoKeyPair.publicKey` * Type: {CryptoKey} A {CryptoKey} whose `type` will be `'public'`. ## Class: `SubtleCrypto` ### `subtle.decrypt(algorithm, key, data)` * `algorithm`: {RsaOaepParams|AesCtrParams|AesCbcParams|AesGcmParams} @@ -474,7 +474,7 @@ The algorithms currently supported include: ### `subtle.deriveBits(algorithm, baseKey, length)` @@ -502,7 +502,7 @@ The algorithms currently supported include: ### `subtle.deriveKey(algorithm, baseKey, derivedKeyAlgorithm, extractable, keyUsages)` @@ -535,7 +535,7 @@ The algorithms currently supported include: ### `subtle.digest(algorithm, data)` * `algorithm`: {string|Object} @@ -558,7 +558,7 @@ whose value is one of the above. ### `subtle.encrypt(algorithm, key, data)` * `algorithm`: {RsaOaepParams|AesCtrParams|AesCbcParams|AesGcmParams} @@ -579,7 +579,7 @@ The algorithms currently supported include: ### `subtle.exportKey(format, key)` * `format`: {string} Must be one of `'raw'`, `'pkcs8'`, `'spki'`, `'jwk'`, or @@ -625,7 +625,7 @@ extension that allows converting a {CryptoKey} into a Node.js {KeyObject}. ### `subtle.generateKey(algorithm, extractable, keyUsages)` @@ -662,7 +662,7 @@ The {CryptoKey} (secret key) generating algorithms supported include: ### `subtle.importKey(format, keyData, algorithm, extractable, keyUsages)` * `format`: {string} Must be one of `'raw'`, `'pkcs8'`, `'spki'`, `'jwk'`, or @@ -709,7 +709,7 @@ The algorithms currently supported include: ### `subtle.sign(algorithm, key, data)` @@ -736,7 +736,7 @@ The algorithms currently supported include: ### `subtle.unwrapKey(format, wrappedKey, unwrappingKey, unwrapAlgo, unwrappedKeyAlgo, extractable, keyUsages)` * `format`: {string} Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. @@ -786,7 +786,7 @@ The unwrapped key algorithms supported include: ### `subtle.verify(algorithm, key, signature, data)` @@ -814,7 +814,7 @@ The algorithms currently supported include: ### `subtle.wrapKey(format, key, wrappingKey, wrapAlgo)` * `format`: {string} Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. @@ -849,12 +849,12 @@ are simple JavaScript dictionary objects. ### Class: `AesCbcParams` #### `aesCbcParams.iv` * Type: {ArrayBuffer|TypedArray|DataView|Buffer} @@ -864,19 +864,19 @@ and should be unpredictable and cryptographically random. #### `aesCbcParams.name` * Type: {string} Must be `'AES-CBC'`. ### Class: `AesCtrParams` #### `aesCtrParams.counter` * Type: {ArrayBuffer|TypedArray|DataView|Buffer} @@ -888,7 +888,7 @@ counter and the remaining bits as the nonce. #### `aesCtrParams.length` * Type: {number} The number of bits in the `aesCtrParams.counter` that are @@ -896,19 +896,19 @@ added: REPLACEME #### `aesCtrParams.name` * Type: {string} Must be `'AES-CTR'`. ### Class: `AesGcmParams` #### `aesGcmParams.additionalData` * Type: {ArrayBuffer|TypedArray|DataView|Buffer|undefined} @@ -919,7 +919,7 @@ encrypted but is included in the authentication of the data. The use of #### `aesGcmParams.iv` * Type: {ArrayBuffer|TypedArray|DataView|Buffer} @@ -930,14 +930,14 @@ this contain at least 12 random bytes. #### `aesGcmParams.name` * Type: {string} Must be `'AES-GCM'`. #### `aesGcmParams.tagLength` * Type: {number} The size in bits of the generated authentication tag. @@ -946,12 +946,12 @@ added: REPLACEME ### Class: `AesImportParams` #### 'aesImportParams.name` * Type: {string} Must be one of `'AES-CTR'`, `'AES-CBC'`, `'AES-GCM'`, or @@ -959,12 +959,12 @@ added: REPLACEME ### Class: `AesKeyGenParams` #### `aesKeyGenParams.length` * Type: {number} @@ -974,7 +974,7 @@ or `256`. #### `aesKeyGenParams.name` * Type: {string} Must be one of `'AES-CBC'`, `'AES-CTR'`, `'AES-GCM'`, or @@ -982,31 +982,31 @@ added: REPLACEME ### Class: `AesKwParams` #### `aesKwParams.name` * Type: {string} Must be `'AES-KW'`. ### Class: `EcdhKeyDeriveParams` #### `ecdhKeyDeriveParams.name` * Type: {string} Must be `'ECDH'`. #### `ecdhKeyDeriveParams.public` * Type: {CryptoKey} @@ -1018,12 +1018,12 @@ key. ### Class: `EcdsaParams` #### `ecdsaParams.hash` * Type: {string|Object} @@ -1040,57 +1040,57 @@ whose value is one of the above listed values. #### `ecdsaParams.name` * Type: {string} Must be `'ECDSA'`. ### Class: `EcKeyGenParams` #### `ecKeyGenParams.name` * Type: {string} Must be one of `'ECDSA'` or `'ECDH'`. #### `ecKeyGenParams.namedCurve` * Type: {string} Must be one of `'P-256'`, `'P-384'` or `'P-521'`. ### Class: `EcKeyImportParams` #### `ecKeyImportParams.name` * Type: {string} Must be one of `'ECDSA'` or `'ECDH'`. #### `ecKeyImportParams.namedCurve` * Type: {string} Must be one of `'P-256'`, `'P-384'` or `'P-521'`. ### Class: `HkdfParams` #### `hkdfParams.hash` * Type: {string|Object} @@ -1107,7 +1107,7 @@ whose value is one of the above listed values. #### `hkdfParams.info` * Type: {ArrayBuffer|TypedArray|DataView|Buffer} @@ -1117,14 +1117,14 @@ This can be zero-length but must be provided. #### `hkdfParams.name` * Type: {string} Must be `'HKDF'`. #### `hkdfParams.salt` * Type: {ArrayBuffer|TypedArray|DataView|Buffer} @@ -1136,12 +1136,12 @@ digest, the salt should be 256-bits of random data). ### Class: `HmacImportParams` #### 'hmacImportParams.hash` * Type: {string|Object} @@ -1158,7 +1158,7 @@ whose value is one of the above listed values. #### `hmacImportParams.length` * Type: {number} @@ -1168,19 +1168,19 @@ be omitted for most cases. #### `hmacImportParams.name` * Type: {string} Must be `'HMAC'`. ### Class: `HmacKeyGenParams` #### `hmacKeyGenParams.hash` * Type: {string|Object} @@ -1197,7 +1197,7 @@ whose value is one of the above listed values. #### `hmacKeyGenParams.length` * Type: {number} @@ -1208,43 +1208,43 @@ This is optional and should be omitted for most cases. #### `hmacKeyGenParams.name` * Type: {string} Must be `'HMAC'`. ### Class: `HmacParams` #### `hmacParams.name` * Type: {string} Must be `'HMAC`. ### Class: `Pbkdf2ImportParams` #### `pbkdf2ImportParams.name` * Type: {string} Must be `'PBKDF2'` ### Class: `Pbkdf2Params` #### `pbkdb2Params.hash` * Type: {string|Object} @@ -1261,7 +1261,7 @@ whose value is one of the above listed values. #### `pbkdf2Params.iterations` * Type: {number} @@ -1270,14 +1270,14 @@ The number of iterations the PBKDF2 algorithm should make when deriving bits. #### `pbkdf2Params.name` * Type: {string} Must be `'PBKDF2'`. #### `pbkdf2Params.salt` * Type: {ArrayBuffer|TypedArray|DataView|Buffer} @@ -1286,12 +1286,12 @@ Should be at least 16 random or pseudo-random bytes. ### Class: `RsaHashedImportParams` #### `rsaHashedImportParams.hash` * Type: {string|Object} @@ -1308,7 +1308,7 @@ whose value is one of the above listed values. #### `rsaHashedImportParams.name` * Type: {string} Must be one of `'RSASSA-PKCS1-v1_5'`, `'RSA-PSS'`, or @@ -1316,12 +1316,12 @@ added: REPLACEME ### Class: `RsaHashedKeyGenParams` #### `rsaHashedKeyGenParams.hash` * Type: {string|Object} @@ -1338,7 +1338,7 @@ whose value is one of the above listed values. #### `rsaHashedKeyGenParams.modulusLength` * Type: {number} @@ -1348,7 +1348,7 @@ at least `2048`. #### `rsaHashedKeyGenParams.name` * Type: {string} Must be one of `'RSASSA-PKCS1-v1_5'`, `'RSA-PSS'`, or @@ -1356,7 +1356,7 @@ added: REPLACEME #### `rsaHashedKeyGenParams.publicExponent` * Type: {Uint8Array} @@ -1369,12 +1369,12 @@ there is reason to use a different value, use `new Uint8Array([1, 0, 1])` ### Class: `RsaOaepParams` #### rsaOaepParams.label * Type: {ArrayBuffer|TypedArray|DataView|Buffer} @@ -1386,26 +1386,26 @@ The `rsaOaepParams.label` parameter is optional. #### rsaOaepParams.name * Type: {string} must be `'RSA-OAEP'`. ### Class: `RsaPssParams` #### `rsaPssParams.name` * Type: {string} Must be `'RSA-PSS'`. #### `rsaPssParams.saltLength` * Type: {number} @@ -1414,12 +1414,12 @@ The length (in bytes) of the random salt to use. ### Class: `RsaSignParams` #### `rsaSignParams.name` * Type: {string} Must be `'RSASSA-PKCS1-v1_5'` @@ -1438,7 +1438,7 @@ of code to other environments. ### `NODE-DH` Algorithm The `NODE-DH` algorithm is the common implementation of Diffie-Hellman @@ -1446,64 +1446,64 @@ key agreement. #### Class: `NodeDhImportParams` ##### `nodeDhImportParams.name` * Type: {string} Must be `'NODE-DH'`. #### Class: NodeDhKeyGenParams` ##### `nodeDhKeyGenParams.generator` * Type: {number} A custom generator. ##### `nodeDhKeyGenParams.group` * Type: {string} The Diffie-Hellman group name. ##### `nodeDhKeyGenParams.prime` * Type: {Buffer} The prime parameter. ##### `nodeDhKeyGenParams.primeLength` * Type: {number} The length in bits of the prime. #### Class: NodeDhDeriveBitsParams ##### `nodeDhDeriveBitsParams.public` * Type: {CryptoKey} The other parties public key. ### `NODE-DSA` Algorithm The `NODE-DSA` algorithm is the common implementation of the DSA digital @@ -1511,12 +1511,12 @@ signature algorithm. #### Class: `NodeDsaImportParams` ##### `nodeDsaImportParams.hash` * Type: {string|Object} @@ -1533,19 +1533,19 @@ whose value is one of the above listed values. ##### `nodeDsaImportParams.name` * Type: {string} Must be `'NODE-DSA'`. #### Class: `NodeDsaKeyGenParams` ##### `nodeDsaKeyGenParams.divisorLength` * Type: {number} @@ -1554,7 +1554,7 @@ The optional length in bits of the DSA divisor. ##### `nodeDsaKeyGenParams.hash` * Type: {string|Object} @@ -1571,7 +1571,7 @@ whose value is one of the above listed values. ##### `nodeDsaKeyGenParams.modulusLength` * Type: {number} @@ -1581,26 +1581,26 @@ at least `2048`. ##### `nodeDsaKeyGenParams.name` * Type: {string} Must be `'NODE-DSA'`. #### Class: `NodeDsaSignParams` ##### `nodeDsaSignParams.name` * Type: {string} Must be `'NODE-DSA'` ### `NODE-SCRYPT` Algorithm The `NODE-SCRYPT` algorithm is the common implementation of the scrypt key @@ -1608,31 +1608,31 @@ derivation algorithm. #### Class: `NodeScryptImportParams` ##### `nodeScryptImportParams.name` * Type: {string} Must be `'NODE-SCRYPT'`. #### Class: `NodeScryptParams` ##### `nodeScryptParams.encoding` * Type: {string} The string encoding when `salt` is a string. ##### `nodeScryptParams.maxmem` * Type: {number} Memory upper bound. It is an error when (approximately) @@ -1640,7 +1640,7 @@ added: REPLACEME ##### `nodeScryptParams.N` * Type: {number} The CPU/memory cost parameter. Must e a power of two @@ -1648,21 +1648,21 @@ added: REPLACEME ##### `nodeScryptParams.p` * Type: {number} Parallelization parameter. **Default** `1`. ##### `nodeScryptParams.r` * Type: {number} Block size parameter. **Default**: `8`. ##### `nodeScryptParams.salt` * Type: {string|ArrayBuffer|Buffer|TypedArray|DataView} diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index d361e5f5822839..2f46c6ef1a14ef 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -14,8 +14,8 @@ const worker = require('worker_threads'); ``` Workers (threads) are useful for performing CPU-intensive JavaScript operations. -They will not help much with I/O-intensive work. Node.js’s built-in asynchronous -I/O operations are more efficient than Workers can be. +They do not help much with I/O-intensive work. The Node.js built-in +asynchronous I/O operations are more efficient than Workers can be. Unlike `child_process` or `cluster`, `worker_threads` can share memory. They do so by transferring `ArrayBuffer` instances or sharing `SharedArrayBuffer` @@ -48,11 +48,11 @@ if (isMainThread) { ``` The above example spawns a Worker thread for each `parse()` call. In actual -practice, use a pool of Workers instead for these kinds of tasks. Otherwise, the +practice, use a pool of Workers for these kinds of tasks. Otherwise, the overhead of creating Workers would likely exceed their benefit. When implementing a worker pool, use the [`AsyncResource`][] API to inform -diagnostic tools (e.g. in order to provide asynchronous stack traces) about the +diagnostic tools (e.g. to provide asynchronous stack traces) about the correlation between tasks and their outcomes. See ["Using `AsyncResource` for a `Worker` thread pool"][async-resource-worker-pool] in the `async_hooks` documentation for an example implementation. @@ -90,7 +90,7 @@ added: --> Mark an object as not transferable. If `object` occurs in the transfer list of -a [`port.postMessage()`][] call, it will be ignored. +a [`port.postMessage()`][] call, it is ignored. In particular, this makes sense for objects that can be cloned, rather than transferred, and which are used by other objects on the sending side. @@ -126,23 +126,23 @@ There is no equivalent to this API in browsers. added: v11.13.0 --> -* `port` {MessagePort} The message port which will be transferred. +* `port` {MessagePort} The message port to transfer. * `contextifiedSandbox` {Object} A [contextified][] object as returned by the `vm.createContext()` method. * Returns: {MessagePort} Transfer a `MessagePort` to a different [`vm`][] Context. The original `port` -object will be rendered unusable, and the returned `MessagePort` instance will -take its place. +object is rendered unusable, and the returned `MessagePort` instance +takes its place. -The returned `MessagePort` will be an object in the target context, and will -inherit from its global `Object` class. Objects passed to the -[`port.onmessage()`][] listener will also be created in the target context +The returned `MessagePort` is an object in the target context and +inherits from its global `Object` class. Objects passed to the +[`port.onmessage()`][] listener are also created in the target context and inherit from its global `Object` class. -However, the created `MessagePort` will no longer inherit from -[`EventEmitter`][], and only [`port.onmessage()`][] can be used to receive +However, the created `MessagePort` no longer inherits from +[`EventTarget`][], and only [`port.onmessage()`][] can be used to receive events using it. ## `worker.parentPort` @@ -152,11 +152,11 @@ added: v10.5.0 * {null|MessagePort} -If this thread was spawned as a [`Worker`][], this will be a [`MessagePort`][] +If this thread is a [`Worker`][], this is a [`MessagePort`][] allowing communication with the parent thread. Messages sent using -`parentPort.postMessage()` will be available in the parent thread +`parentPort.postMessage()` are available in the parent thread using `worker.on('message')`, and messages sent from the parent thread -using `worker.postMessage()` will be available in this thread using +using `worker.postMessage()` are available in this thread using `parentPort.on('message')`. ```js @@ -201,8 +201,8 @@ console.log(receiveMessageOnPort(port2)); // Prints: undefined ``` -When this function is used, no `'message'` event will be emitted and the -`onmessage` listener will not be invoked. +When this function is used, no `'message'` event is emitted and the +`onmessage` listener is not invoked. ## `worker.resourceLimits` + +> Stability: 1 - Experimental + +Instances of `BroadcastChannel` allow asynchronous one-to-many communication +with all other `BroadcastChannel` instances bound to the same channel name. + +```js +'use strict'; + +const { + isMainThread, + BroadcastChannel, + Worker +} = require('worker_threads'); + +const bc = new BroadcastChannel('hello'); + +if (isMainThread) { + let c = 0; + bc.onmessage = (event) => { + console.log(event.data); + if (++c === 10) bc.close(); + }; + for (let n = 0; n < 10; n++) + new Worker(__filename); +} else { + bc.postMessage('hello from every worker'); + bc.close(); +} +``` + +### `new BroadcastChannel(name)` + + +* `name` {any} The name of the channel to connect to. Any JavaScript value + that can be converted to a string using ``${name}`` is permitted. + +### `broadcastChannel.close()` + + +Closes the `BroadcastChannel` connection. + +### `broadcastChannel.onmessage` + + +* Type: {Function} Invoked with a single `MessageEvent` argument + when a message is received. + +### `broadcastChannel.onmessageerror` + + +* Type: {Function} Invoked with a received message cannot be + deserialized. + +### `broadcastChannel.postMessage(message)` + + +* `message` {any} Any cloneable JavaScript value. + +### `broadcastChannel.ref()` + + +Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed +BroadcastChannel does *not* let the program exit if it's the only active handle +left (the default behavior). If the port is `ref()`ed, calling `ref()` again +has no effect. + +### `broadcastChannel.unref()` + + +Calling `unref()` on a BroadcastChannel allows the thread to exit if this +is the only active handle in the event system. If the BroadcastChannel is +already `unref()`ed calling `unref()` again has no effect. + ## Class: `MessageChannel` -* Extends: {EventEmitter} +* Extends: {EventTarget} Instances of the `worker.MessagePort` class represent one end of an asynchronous, two-way communications channel. It can be used to transfer structured data, memory regions and other `MessagePort`s between different [`Worker`][]s. -With the exception of `MessagePort`s being [`EventEmitter`][]s rather -than [`EventTarget`][]s, this implementation matches [browser `MessagePort`][]s. +This implementation matches [browser `MessagePort`][]s. ### Event: `'close'` -Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port will +Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does *not* let the program exit if it's the only active handle left (the default -behavior). If the port is `ref()`ed, calling `ref()` again will have no effect. +behavior). If the port is `ref()`ed, calling `ref()` again has no effect. -If listeners are attached or removed using `.on('message')`, the port will -be `ref()`ed and `unref()`ed automatically depending on whether +If listeners are attached or removed using `.on('message')`, the port +is `ref()`ed and `unref()`ed automatically depending on whether listeners for the event exist. ### `port.start()` @@ -528,13 +625,13 @@ added: v10.5.0 --> Starts receiving messages on this `MessagePort`. When using this port -as an event emitter, this will be called automatically once `'message'` +as an event emitter, this is called automatically once `'message'` listeners are attached. This method exists for parity with the Web `MessagePort` API. In Node.js, it is only useful for ignoring messages when no event listener is present. -Node.js also diverges in its handling of `.onmessage`. Setting it will -automatically call `.start()`, but unsetting it will let messages queue up +Node.js also diverges in its handling of `.onmessage`. Setting it +automatically calls `.start()`, but unsetting it lets messages queue up until a new handler is set or the port is discarded. ### `port.unref()` @@ -542,12 +639,12 @@ until a new handler is set or the port is discarded. added: v10.5.0 --> -Calling `unref()` on a port will allow the thread to exit if this is the only +Calling `unref()` on a port allows the thread to exit if this is the only active handle in the event system. If the port is already `unref()`ed calling -`unref()` again will have no effect. +`unref()` again has no effect. -If listeners are attached or removed using `.on('message')`, the port will -be `ref()`ed and `unref()`ed automatically depending on whether +If listeners are attached or removed using `.on('message')`, the port is +`ref()`ed and `unref()`ed automatically depending on whether listeners for the event exist. ## Class: `Worker` @@ -571,12 +668,12 @@ Notable differences inside a Worker environment are: * [`process.chdir()`][] and `process` methods that set group or user ids are not available. * [`process.env`][] is a copy of the parent thread's environment variables, - unless otherwise specified. Changes to one copy will not be visible in other - threads, and will not be visible to native add-ons (unless - [`worker.SHARE_ENV`][] has been passed as the `env` option to the + unless otherwise specified. Changes to one copy are not visible in other + threads, and are not visible to native add-ons (unless + [`worker.SHARE_ENV`][] is passed as the `env` option to the [`Worker`][] constructor). * [`process.title`][] cannot be modified. -* Signals will not be delivered through [`process.on('...')`][Signals events]. +* Signals are not delivered through [`process.on('...')`][Signals events]. * Execution may stop at any point as a result of [`worker.terminate()`][] being invoked. * IPC channels from parent processes are not accessible. @@ -675,45 +772,45 @@ changes: * `options` {Object} * `argv` {any[]} List of arguments which would be stringified and appended to `process.argv` in the worker. This is mostly similar to the `workerData` - but the values will be available on the global `process.argv` as if they + but the values are available on the global `process.argv` as if they were passed as CLI options to the script. * `env` {Object} If set, specifies the initial value of `process.env` inside the Worker thread. As a special value, [`worker.SHARE_ENV`][] may be used to specify that the parent thread and the child thread should share their environment variables; in that case, changes to one thread’s `process.env` - object will affect the other thread as well. **Default:** `process.env`. + object affect the other thread as well. **Default:** `process.env`. * `eval` {boolean} If `true` and the first argument is a `string`, interpret the first argument to the constructor as a script that is executed once the worker is online. * `execArgv` {string[]} List of node CLI options passed to the worker. V8 options (such as `--max-old-space-size`) and options that affect the - process (such as `--title`) are not supported. If set, this will be provided - as [`process.execArgv`][] inside the worker. By default, options will be + process (such as `--title`) are not supported. If set, this is provided + as [`process.execArgv`][] inside the worker. By default, options are inherited from the parent thread. - * `stdin` {boolean} If this is set to `true`, then `worker.stdin` will - provide a writable stream whose contents will appear as `process.stdin` + * `stdin` {boolean} If this is set to `true`, then `worker.stdin` + provides a writable stream whose contents appear as `process.stdin` inside the Worker. By default, no data is provided. - * `stdout` {boolean} If this is set to `true`, then `worker.stdout` will - not automatically be piped through to `process.stdout` in the parent. - * `stderr` {boolean} If this is set to `true`, then `worker.stderr` will - not automatically be piped through to `process.stderr` in the parent. - * `workerData` {any} Any JavaScript value that will be cloned and made - available as [`require('worker_threads').workerData`][]. The cloning will - occur as described in the [HTML structured clone algorithm][], and an error - will be thrown if the object cannot be cloned (e.g. because it contains + * `stdout` {boolean} If this is set to `true`, then `worker.stdout` is + not automatically piped through to `process.stdout` in the parent. + * `stderr` {boolean} If this is set to `true`, then `worker.stderr` is + not automatically piped through to `process.stderr` in the parent. + * `workerData` {any} Any JavaScript value that is cloned and made + available as [`require('worker_threads').workerData`][]. The cloning + occurs as described in the [HTML structured clone algorithm][], and an error + is thrown if the object cannot be cloned (e.g. because it contains `function`s). - * `trackUnmanagedFds` {boolean} If this is set to `true`, then the Worker will - track raw file descriptors managed through [`fs.open()`][] and - [`fs.close()`][], and close them when the Worker exits, similar to other + * `trackUnmanagedFds` {boolean} If this is set to `true`, then the Worker + tracks raw file descriptors managed through [`fs.open()`][] and + [`fs.close()`][], and closes them when the Worker exits, similar to other resources like network sockets or file descriptors managed through the [`FileHandle`][] API. This option is automatically inherited by all nested `Worker`s. **Default**: `true`. * `transferList` {Object[]} If one or more `MessagePort`-like objects are passed in `workerData`, a `transferList` is required for those - items or [`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`][] will be thrown. + items or [`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`][] is thrown. See [`port.postMessage()`][] for more information. * `resourceLimits` {Object} An optional set of resource limits for the new - JS engine instance. Reaching these limits will lead to termination of the + JS engine instance. Reaching these limits leads to termination of the `Worker` instance. These limits only affect the JS engine, and no external data, including no `ArrayBuffer`s. Even if these limits are set, the process may still abort if it encounters a global out-of-memory situation. @@ -733,7 +830,7 @@ added: v10.5.0 * `err` {Error} The `'error'` event is emitted if the worker thread throws an uncaught -exception. In that case, the worker will be terminated. +exception. In that case, the worker is terminated. ### Event: `'exit'` + +An object that can be used to query performance information from a worker +instance. Similar to [`perf_hooks.performance`][]. + +#### `performance.eventLoopUtilization([utilization1[, utilization2]])` + + +* `utilization1` {Object} The result of a previous call to + `eventLoopUtilization()`. +* `utilization2` {Object} The result of a previous call to + `eventLoopUtilization()` prior to `utilization1`. +* Returns {Object} + * `idle` {number} + * `active` {number} + * `utilization` {number} + +The same call as [`perf_hooks` `eventLoopUtilization()`][], except the values +of the worker instance are returned. + +One difference is that, unlike the main thread, bootstrapping within a worker +is done within the event loop. So the event loop utilization is +immediately available once the worker's script begins execution. + +An `idle` time that does not increase does not indicate that the worker is +stuck in bootstrap. The following examples shows how the worker's entire +lifetime never accumulates any `idle` time, but is still be able to process +messages. + +```js +const { Worker, isMainThread, parentPort } = require('worker_threads'); + +if (isMainThread) { + const worker = new Worker(__filename); + setInterval(() => { + worker.postMessage('hi'); + console.log(worker.performance.eventLoopUtilization()); + }, 100).unref(); + return; +} + +parentPort.on('message', () => console.log('msg')).unref(); +(function r(n) { + if (--n < 0) return; + const t = Date.now(); + while (Date.now() - t < 300); + setImmediate(r, n); +})(10); +``` + +The event loop utilization of a worker is available only after the [`'online'` +event][] emitted, and if called before this, or after the [`'exit'` +event][], then all properties have the value of `0`. + ### `worker.postMessage(value[, transferList])` -Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker will +Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does *not* let the program exit if it's the only active handle left (the default -behavior). If the worker is `ref()`ed, calling `ref()` again will have +behavior). If the worker is `ref()`ed, calling `ref()` again has no effect. ### `worker.resourceLimits` @@ -849,7 +1005,7 @@ added: v10.5.0 This is a readable stream which contains data written to [`process.stderr`][] inside the worker thread. If `stderr: true` was not passed to the -[`Worker`][] constructor, then data will be piped to the parent thread's +[`Worker`][] constructor, then data is piped to the parent thread's [`process.stderr`][] stream. ### `worker.stdin` @@ -872,7 +1028,7 @@ added: v10.5.0 This is a readable stream which contains data written to [`process.stdout`][] inside the worker thread. If `stdout: true` was not passed to the -[`Worker`][] constructor, then data will be piped to the parent thread's +[`Worker`][] constructor, then data is piped to the parent thread's [`process.stdout`][] stream. ### `worker.terminate()` @@ -909,9 +1065,9 @@ This value is unique for each `Worker` instance inside a single process. added: v10.5.0 --> -Calling `unref()` on a worker will allow the thread to exit if this is the only +Calling `unref()` on a worker allows the thread to exit if this is the only active handle in the event system. If the worker is already `unref()`ed calling -`unref()` again will have no effect. +`unref()` again has no effect. [Addons worker support]: addons.md#addons_worker_support [ECMAScript module loader]: esm.md#esm_data_imports @@ -920,13 +1076,13 @@ active handle in the event system. If the worker is already `unref()`ed calling [Web Workers]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API [`'close'` event]: #worker_threads_event_close [`'exit'` event]: #worker_threads_event_exit +[`'online'` event]: #worker_threads_event_online [`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer [`AsyncResource`]: async_hooks.md#async_hooks_class_asyncresource [`Buffer.allocUnsafe()`]: buffer.md#buffer_static_method_buffer_allocunsafe_size [`Buffer`]: buffer.md [`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`]: errors.md#errors_err_missing_message_port_in_transfer_list [`ERR_WORKER_NOT_RUNNING`]: errors.md#ERR_WORKER_NOT_RUNNING -[`EventEmitter`]: events.md [`EventTarget`]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget [`FileHandle`]: fs.md#fs_class_filehandle [`KeyObject`]: crypto.md#crypto_class_keyobject @@ -940,6 +1096,8 @@ active handle in the event system. If the worker is already `unref()`ed calling [`fs.close()`]: fs.md#fs_fs_close_fd_callback [`fs.open()`]: fs.md#fs_fs_open_path_flags_mode_callback [`markAsUntransferable()`]: #worker_threads_worker_markasuntransferable_object +[`perf_hooks.performance`]: perf_hooks.md#perf_hooks_perf_hooks_performance +[`perf_hooks` `eventLoopUtilization()`]: perf_hooks.md#perf_hooks_performance_eventlooputilization_utilization1_utilization2 [`port.on('message')`]: #worker_threads_event_message [`port.onmessage()`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage [`port.postMessage()`]: #worker_threads_port_postmessage_value_transferlist diff --git a/doc/changelogs/CHANGELOG_IOJS.md b/doc/changelogs/CHANGELOG_IOJS.md index 540e244f1139a9..cb6832ab574e1b 100644 --- a/doc/changelogs/CHANGELOG_IOJS.md +++ b/doc/changelogs/CHANGELOG_IOJS.md @@ -64,6 +64,7 @@
14Current15Current14LTS 12LTS 10LTS
-14.14.0
+15.5.0
+15.4.0
+15.3.0
+15.2.1
+15.2.0
+15.1.0
+15.0.1
+15.0.0
+
+14.15.3
+14.15.2
+14.15.1
+14.15.0
+14.14.0
14.13.1
14.13.0
14.12.0
@@ -49,7 +65,9 @@ release. 14.0.0
-12.19.0
+12.20.0
+12.19.1
+12.19.0
12.18.4
12.18.3
12.18.2
@@ -84,7 +102,8 @@ release. 12.0.0
-10.22.1
+10.23.0
+10.22.1
10.22.0
10.21.0
10.20.1
diff --git a/GOVERNANCE.md b/GOVERNANCE.md index aeb1d9c65e1f11..f47fb56e5b0cfb 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -151,8 +151,9 @@ The nomination passes if no Collaborators oppose it after one week. Otherwise, the nomination fails. There are steps a nominator can take in advance to make a nomination as -frictionless as possible. Use the [Collaborators discussion page][] to request -feedback from other Collaborators in private. A nominator may also work with the +frictionless as possible. To request feedback from other Collaborators in + private, use the [Collaborators discussion page][] + (which only Collaborators may view). A nominator may also work with the nominee to improve their contribution profile. Collaborators might overlook someone with valuable contributions. In that case, diff --git a/LICENSE b/LICENSE index 58c78bf36f6f65..2d4040e537adad 100644 --- a/LICENSE +++ b/LICENSE @@ -53,6 +53,8 @@ The externally maintained libraries used by Node.js are: - Acorn, located at deps/acorn, is licensed as follows: """ + MIT License + Copyright (C) 2012-2018 by various contributors (see AUTHORS) Permission is hereby granted, free of charge, to any person obtaining a copy @@ -416,9 +418,9 @@ The externally maintained libraries used by Node.js are: # Copyright (c) 2013 International Business Machines Corporation # and others. All Rights Reserved. # - # Project: http://code.google.com/p/lao-dictionary/ - # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt - # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt + # Project: https://github.com/veer66/lao-dictionary + # Dictionary: https://github.com/veer66/lao-dictionary/blob/master/Lao-Dictionary.txt + # License: https://github.com/veer66/lao-dictionary/blob/master/Lao-Dictionary-LICENSE.txt # (copied below) # # This file is derived from the above dictionary, with slight @@ -1246,12 +1248,12 @@ The externally maintained libraries used by Node.js are: THE SOFTWARE. """ -- babel-eslint, located at tools/node_modules/babel-eslint, is licensed as follows: +- Babel, located at tools/node_modules/@babel, is licensed as follows: """ - Copyright (c) 2014-2016 Sebastian McKenzie - MIT License + Copyright (c) 2014-present Sebastian McKenzie and other contributors + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including diff --git a/Makefile b/Makefile index b78b9a7337e958..4a6e59536bb4d2 100644 --- a/Makefile +++ b/Makefile @@ -65,8 +65,8 @@ V ?= 0 available-node = \ if [ -x $(PWD)/$(NODE) ] && [ -e $(PWD)/$(NODE) ]; then \ $(PWD)/$(NODE) $(1); \ - elif [ -x `which node` ] && [ -e `which node` ] && [ `which node` ]; then \ - `which node` $(1); \ + elif [ -x `command -v node` ] && [ -e `command -v node` ] && [ `command -v node` ]; then \ + `command -v node` $(1); \ else \ echo "No available node, cannot run \"node $(1)\""; \ exit 1; \ @@ -123,7 +123,7 @@ $(NODE_G_EXE): config.gypi out/Debug/build.ninja if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi else $(NODE_EXE) $(NODE_G_EXE): - echo This Makefile currently only supports building with 'make' or 'ninja' + $(warning This Makefile currently only supports building with 'make' or 'ninja') endif endif @@ -133,12 +133,9 @@ CONFIG_FLAGS += --debug endif .PHONY: with-code-cache -with-code-cache: - echo "'with-code-cache' target is a noop" - .PHONY: test-code-cache -test-code-cache: with-code-cache - echo "'test-code-cache' target is a noop" +with-code-cache test-code-cache: + $(warning '$@' target is a noop) out/Makefile: config.gypi common.gypi node.gyp \ deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \ @@ -200,20 +197,11 @@ check: test # Remove files generated by running coverage, put the non-instrumented lib back # in place coverage-clean: - if [ -d lib_ ]; then $(RM) -r lib; mv lib_ lib; fi $(RM) -r node_modules $(RM) -r gcovr build - $(RM) -r out/$(BUILDTYPE)/.coverage - $(RM) out/$(BUILDTYPE)/obj.target/node/gen/*.gcda - $(RM) out/$(BUILDTYPE)/obj.target/node/src/*.gcda - $(RM) out/$(BUILDTYPE)/obj.target/node/src/tracing/*.gcda - $(RM) out/$(BUILDTYPE)/obj.target/node/gen/*.gcno - $(RM) out/$(BUILDTYPE)/obj.target/node/src/*.gcno - $(RM) out/$(BUILDTYPE)/obj.target/node/src/tracing/*.gcno - $(RM) out/$(BUILDTYPE)/obj.target/cctest/src/*.gcno - $(RM) out/$(BUILDTYPE)/obj.target/cctest/test/cctest/*.gcno - $(RM) out/$(BUILDTYPE)/obj.target/embedtest/src/*.gcno - $(RM) out/$(BUILDTYPE)/obj.target/embedtest/test/embedding/*.gcno + $(RM) -r coverage/tmp + $(FIND) out/$(BUILDTYPE)/obj.target \( -name "*.gcda" -o -name "*.gcno" \) \ + -type f -exec $(RM) {} \; .PHONY: coverage # Build and test with code coverage reporting. Leave the lib directory @@ -248,8 +236,8 @@ coverage-test: coverage-build $(RM) out/$(BUILDTYPE)/obj.target/node/src/*/*.gcda $(RM) out/$(BUILDTYPE)/obj.target/node_lib/src/*.gcda $(RM) out/$(BUILDTYPE)/obj.target/node_lib/src/*/*.gcda - -NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage \ - TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS) + -NODE_V8_COVERAGE=coverage/tmp \ + TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS) $(MAKE) coverage-report-js -(cd out && "../gcovr/scripts/gcovr" \ --gcov-exclude='.*\b(deps|usr|out|cctest|embedding)\b' -v \ @@ -262,17 +250,10 @@ coverage-test: coverage-build @grep -A3 Lines coverage/cxxcoverage.html | grep style \ | sed 's/<[^>]*>//g'| sed 's/ //g' -COV_REPORT_OPTIONS = --reporter=html \ - --temp-directory=out/$(BUILDTYPE)/.coverage --omit-relative=false \ - --resolve=./lib --exclude="benchmark/" --exclude="deps/" --exclude="test/" --exclude="tools/" \ - --wrapper-length=0 -ifdef COV_ENFORCE_THRESHOLD - COV_REPORT_OPTIONS += --check-coverage --lines=$(COV_ENFORCE_THRESHOLD) -endif - .PHONY: coverage-report-js coverage-report-js: - $(NODE) ./node_modules/.bin/c8 report $(COV_REPORT_OPTIONS) + -$(MAKE) coverage-build-js + $(NODE) ./node_modules/.bin/c8 report .PHONY: cctest # Runs the C++ tests using the built `cctest` executable. @@ -297,6 +278,7 @@ v8: .PHONY: jstest jstest: build-addons build-js-native-api-tests build-node-api-tests ## Runs addon tests and JS tests $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) \ + $(TEST_CI_ARGS) \ --skip-tests=$(CI_SKIP_TESTS) \ $(JS_SUITES) \ $(NATIVE_SUITES) @@ -307,9 +289,8 @@ tooltest: .PHONY: coverage-run-js coverage-run-js: - $(RM) -r out/$(BUILDTYPE)/.coverage - $(MAKE) coverage-build-js - -NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage CI_SKIP_TESTS=$(COV_SKIP_TESTS) \ + $(RM) -r coverage/tmp + -NODE_V8_COVERAGE=coverage/tmp CI_SKIP_TESTS=$(COV_SKIP_TESTS) \ TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) jstest $(MAKE) coverage-report-js @@ -468,7 +449,7 @@ benchmark/napi/.buildstamp: $(ADDONS_PREREQS) \ .PHONY: clear-stalled clear-stalled: - @echo "Clean up any leftover processes but don't error if found." + $(info Clean up any leftover processes but don't error if found.) ps awwx | grep Release/node | grep -v grep | cat @PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \ if [ "$${PS_OUT}" ]; then \ @@ -519,7 +500,7 @@ test-ci-js: | clear-stalled $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ --mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \ $(TEST_CI_ARGS) $(CI_JS_SUITES) - @echo "Clean up any leftover processes, error if found." + $(info Clean up any leftover processes, error if found.) ps awwx | grep Release/node | grep -v grep | cat @PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \ if [ "$${PS_OUT}" ]; then \ @@ -535,7 +516,7 @@ test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tes --mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \ $(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC) out/Release/embedtest 'require("./test/embedding/test-embedding.js")' - @echo "Clean up any leftover processes, error if found." + $(info Clean up any leftover processes, error if found.) ps awwx | grep Release/node | grep -v grep | cat @PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \ if [ "$${PS_OUT}" ]; then \ @@ -599,7 +580,7 @@ test-hash-seed: all $(NODE) test/pummel/test-hash-seed.js .PHONY: test-doc -test-doc: doc-only lint ## Builds, lints, and verifies the docs. +test-doc: doc-only lint-md ## Builds, lints, and verifies the docs. @if [ "$(shell $(node_use_openssl))" != "true" ]; then \ echo "Skipping test-doc (no crypto)"; \ else \ @@ -612,7 +593,7 @@ test-known-issues: all # Related CI job: node-test-npm test-npm: $(NODE_EXE) ## Run the npm test suite on deps/npm. - $(NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test-node + $(NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test test-npm-publish: $(NODE_EXE) npm_package_config_publishtest=true $(NODE) deps/npm/test/run.js @@ -671,7 +652,7 @@ test-v8: v8 ## Runs the V8 test suite on deps/v8. deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) $(V8_TEST_OPTIONS) \ mjsunit cctest debugger inspector message preparser \ $(TAP_V8) - @echo Testing hash seed + $(info Testing hash seed) $(MAKE) test-hash-seed test-v8-intl: v8 @@ -691,9 +672,8 @@ test-v8-all: test-v8 test-v8-intl test-v8-benchmarks test-v8-updates # runs all v8 tests else test-v8 test-v8-intl test-v8-benchmarks test-v8-all: - @echo "Testing v8 is not available through the source tarball." - @echo "Use the git repo instead:" \ - "$ git clone https://github.com/nodejs/node.git" + $(warning Testing V8 is not available through the source tarball.) + $(warning Use the git repo instead: $$ git clone https://github.com/nodejs/node.git) endif apidoc_dirs = out/doc out/doc/api out/doc/api/assets @@ -918,7 +898,7 @@ BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH) endif BINARYTAR=$(BINARYNAME).tar # OSX doesn't have xz installed by default, http://macpkg.sourceforge.net/ -HAS_XZ ?= $(shell which xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0) +HAS_XZ ?= $(shell command -v xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0) # Supply SKIP_XZ=1 to explicitly skip .tar.xz creation SKIP_XZ ?= 0 XZ = $(shell [ $(HAS_XZ) -eq 1 -a $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0) @@ -928,14 +908,13 @@ MACOSOUTDIR=out/macos ifeq ($(SKIP_XZ), 1) check-xz: - @echo "SKIP_XZ=1 supplied, skipping .tar.xz creation" + $(info SKIP_XZ=1 supplied, skipping .tar.xz creation) else ifeq ($(HAS_XZ), 1) check-xz: else check-xz: - @echo "No xz command, cannot continue" - @exit 1 + $(error No xz command, cannot continue) endif endif @@ -1000,7 +979,7 @@ $(PKG): release-only --release-urlbase=$(RELEASE_URLBASE) \ $(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS) $(MAKE) install V=$(V) DESTDIR=$(MACOSOUTDIR)/dist/node - SIGN="$(CODESIGN_CERT)" PKGDIR="$(MACOSOUTDIR)/dist/node/usr/local" bash \ + SIGN="$(CODESIGN_CERT)" PKGDIR="$(MACOSOUTDIR)/dist/node/usr/local" sh \ tools/osx-codesign.sh mkdir -p $(MACOSOUTDIR)/dist/npm/usr/local/lib/node_modules mkdir -p $(MACOSOUTDIR)/pkgs @@ -1022,8 +1001,8 @@ $(PKG): release-only productbuild --distribution $(MACOSOUTDIR)/installer/productbuild/distribution.xml \ --resources $(MACOSOUTDIR)/installer/productbuild/Resources \ --package-path $(MACOSOUTDIR)/pkgs ./$(PKG) - SIGN="$(PRODUCTSIGN_CERT)" PKG="$(PKG)" bash tools/osx-productsign.sh - bash tools/osx-notarize.sh $(FULLVERSION) + SIGN="$(PRODUCTSIGN_CERT)" PKG="$(PKG)" sh tools/osx-productsign.sh + sh tools/osx-notarize.sh $(FULLVERSION) .PHONY: pkg # Builds the macOS installer for releases. @@ -1141,7 +1120,7 @@ $(BINARYTAR): release-only cp LICENSE $(BINARYNAME) cp CHANGELOG.md $(BINARYNAME) ifeq ($(OSTYPE),darwin) - SIGN="$(CODESIGN_CERT)" PKGDIR="$(BINARYNAME)" bash tools/osx-codesign.sh + SIGN="$(CODESIGN_CERT)" PKGDIR="$(BINARYNAME)" sh tools/osx-codesign.sh endif tar -cf $(BINARYNAME).tar $(BINARYNAME) $(RM) -r $(BINARYNAME) @@ -1168,12 +1147,9 @@ ifeq ($(XZ), 1) endif .PHONY: bench-all -bench-all: bench-addons-build - @echo "Please use benchmark/run.js or benchmark/compare.js to run the benchmarks." - .PHONY: bench -bench: bench-addons-build - @echo "Please use benchmark/run.js or benchmark/compare.js to run the benchmarks." +bench bench-all: bench-addons-build + $(warning Please use benchmark/run.js or benchmark/compare.js to run the benchmarks.) # Build required addons for benchmark before running it. .PHONY: bench-addons-build @@ -1197,7 +1173,7 @@ lint-md-clean: .PHONY: lint-md-build lint-md-build: - $(warning "Deprecated no-op target 'lint-md-build'") + $(warning Deprecated no-op target 'lint-md-build') ifeq ("$(wildcard tools/.mdlintstamp)","") LINT_MD_NEWER = @@ -1212,19 +1188,19 @@ LINT_MD_FILES = $(shell $(FIND) $(LINT_MD_TARGETS) -type f \ run-lint-md = tools/lint-md.js -q -f --no-stdout $(LINT_MD_FILES) # Lint all changed markdown files maintained by us tools/.mdlintstamp: $(LINT_MD_FILES) - @echo "Running Markdown linter..." + $(info Running Markdown linter...) @$(call available-node,$(run-lint-md)) @touch $@ .PHONY: lint-md # Lints the markdown documents maintained by us in the codebase. -lint-md: | tools/.mdlintstamp +lint-md: lint-js-doc | tools/.mdlintstamp LINT_JS_TARGETS = .eslintrc.js benchmark doc lib test tools run-lint-js = tools/node_modules/eslint/bin/eslint.js --cache \ - --report-unused-disable-directives --ext=.js,.mjs,.md $(LINT_JS_TARGETS) + --report-unused-disable-directives --ext=$(EXTENSIONS) $(LINT_JS_TARGETS) run-lint-js-fix = $(run-lint-js) --fix .PHONY: lint-js-fix @@ -1232,9 +1208,12 @@ lint-js-fix: @$(call available-node,$(run-lint-js-fix)) .PHONY: lint-js +.PHONY: lint-js-doc # Note that on the CI `lint-js-ci` is run instead. # Lints the JavaScript code with eslint. -lint-js: +lint-js lint-js-fix: EXTENSIONS=.js,.mjs,.md +lint-js-doc: EXTENSIONS=.md +lint-js lint-js-doc: @if [ "$(shell $(node_use_openssl))" != "true" ]; then \ echo "Skipping $@ (no crypto)"; \ else \ @@ -1243,7 +1222,7 @@ lint-js: fi jslint: lint-js - @echo "Please use lint-js instead of jslint" + $(warning Please use lint-js instead of jslint) run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \ --report-unused-disable-directives --ext=.js,.mjs,.md -f tap \ @@ -1252,11 +1231,11 @@ run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \ .PHONY: lint-js-ci # On the CI the output is emitted in the TAP format. lint-js-ci: - @echo "Running JS linter..." + $(info Running JS linter...) @$(call available-node,$(run-lint-js-ci)) jslint-ci: lint-js-ci - @echo "Please use lint-js-ci instead of jslint-ci" + $(warning Please use lint-js-ci instead of jslint-ci) LINT_CPP_ADDON_DOC_FILES_GLOB = test/addons/??_*/*.cc test/addons/??_*/*.h LINT_CPP_ADDON_DOC_FILES = $(wildcard $(LINT_CPP_ADDON_DOC_FILES_GLOB)) @@ -1313,15 +1292,15 @@ CLANG_FORMAT_START ?= HEAD # $ CLANG_FORMAT_START=master make format-cpp format-cpp: ## Format C++ diff from $CLANG_FORMAT_START to current changes ifneq ("","$(wildcard tools/clang-format/node_modules/)") - @echo "Formatting C++ diff from $(CLANG_FORMAT_START).." + $(info Formatting C++ diff from $(CLANG_FORMAT_START)..) @$(PYTHON) tools/clang-format/node_modules/.bin/git-clang-format \ --binary=tools/clang-format/node_modules/.bin/clang-format \ --style=file \ $(CLANG_FORMAT_START) -- \ $(LINT_CPP_FILES) else - @echo "clang-format is not installed." - @echo "To install (requires internet access) run: $ make format-cpp-build" + $(info clang-format is not installed.) + $(info To install (requires internet access) run: $$ make format-cpp-build) endif ifeq ($(V),1) @@ -1334,7 +1313,7 @@ endif lint-cpp: tools/.cpplintstamp tools/.cpplintstamp: $(LINT_CPP_FILES) - @echo "Running C++ linter..." + $(info Running C++ linter...) @$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) $? @$(PYTHON) tools/checkimports.py $? @touch $@ @@ -1343,19 +1322,19 @@ tools/.cpplintstamp: $(LINT_CPP_FILES) lint-addon-docs: tools/.doclintstamp tools/.doclintstamp: test/addons/.docbuildstamp - @echo "Running C++ linter on addon docs..." + $(info Running C++ linter on addon docs...) @$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) --filter=$(ADDON_DOC_LINT_FLAGS) \ $(LINT_CPP_ADDON_DOC_FILES_GLOB) @touch $@ cpplint: lint-cpp - @echo "Please use lint-cpp instead of cpplint" + $(warning Please use lint-cpp instead of cpplint) .PHONY: lint-py-build # python -m pip install flake8 # Try with '--system' is to overcome systems that blindly set '--user' lint-py-build: - @echo "Pip installing flake8 linter on $(shell $(PYTHON) --version)..." + $(info Pip installing flake8 linter on $(shell $(PYTHON) --version)...) $(PYTHON) -m pip install --upgrade -t tools/pip/site-packages flake8 || \ $(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages flake8 @@ -1367,8 +1346,8 @@ lint-py: PYTHONPATH=tools/pip $(PYTHON) -m flake8 --count --show-source --statistics . else lint-py: - @echo "Python linting with flake8 is not avalible" - @echo "Run 'make lint-py-build'" + $(warning Python linting with flake8 is not available) + $(warning Run 'make lint-py-build') endif .PHONY: lint @@ -1394,12 +1373,9 @@ lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs exit 1 ; \ fi else -lint: - @echo "Linting is not available through the source tarball." - @echo "Use the git repo instead:" \ - "$ git clone https://github.com/nodejs/node.git" - -lint-ci: lint +lint lint-ci: + $(info Linting is not available through the source tarball.) + $(info Use the git repo instead: $$ git clone https://github.com/nodejs/node.git) endif .PHONY: lint-clean @@ -1407,7 +1383,7 @@ lint-clean: $(RM) tools/.*lintstamp $(RM) .eslintcache -HAS_DOCKER ?= $(shell which docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0) +HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0) ifeq ($(HAS_DOCKER), 1) DOCKER_COMMAND ?= docker run -it -v $(PWD):/node @@ -1419,6 +1395,5 @@ gen-openssl: ## Generate platform dependent openssl files (requires docker) $(DOCKER_COMMAND) node-openssl-builder make -C deps/openssl/config else gen-openssl: - @echo "No docker command, cannot continue" - @exit 1 + $(error No docker command, cannot continue) endif diff --git a/README.md b/README.md index a5066a675f0a8e..512cd485b8f57a 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ The Node.js project uses an [open governance model](./GOVERNANCE.md). The * [TSC (Technical Steering Committee)](#tsc-technical-steering-committee) * [Collaborators](#collaborators) * [Release Keys](#release-keys) +* [License](#license) ## Support @@ -52,7 +53,7 @@ Looking for help? Check out the * **LTS**: Releases that receive Long-term Support, with a focus on stability and security. Every even-numbered major version will become an LTS release. LTS releases receive 12 months of _Active LTS_ support and a further 18 months - of _Maintenance_. LTS release lines have alphabetically-ordered codenames, + of _Maintenance_. LTS release lines have alphabetically-ordered code names, beginning with v4 Argon. There are no breaking changes or feature additions, except in some special circumstances. * **Nightly**: Code from the Current branch built every 24-hours when there are @@ -264,8 +265,6 @@ For information about the governance of the Node.js project, see **Bradley Farias** <bradley.meck@gmail.com> * [bmeurer](https://github.com/bmeurer) - **Benedikt Meurer** <benedikt.meurer@gmail.com> -* [bnoordhuis](https://github.com/bnoordhuis) - -**Ben Noordhuis** <info@bnoordhuis.nl> * [boneskull](https://github.com/boneskull) - **Christopher Hiller** <boneskull@boneskull.com> (he/him) * [BridgeAR](https://github.com/BridgeAR) - @@ -286,8 +285,6 @@ For information about the governance of the Node.js project, see **Danielle Adams** <adamzdanielle@gmail.com> (she/her) * [davisjam](https://github.com/davisjam) - **Jamie Davis** <davisjam@vt.edu> (he/him) -* [DerekNonGeneric](https://github.com/DerekNonGeneric) - -**Derek Lewis** <DerekNonGeneric@inf.is> (he/him) * [devnexen](https://github.com/devnexen) - **David Carlier** <devnexen@gmail.com> * [devsnek](https://github.com/devsnek) - @@ -374,6 +371,8 @@ For information about the governance of the Node.js project, see **Ali Ijaz Sheikh** <ofrobots@google.com> (he/him) * [oyyd](https://github.com/oyyd) - **Ouyang Yadong** <oyydoibh@gmail.com> (he/him) +* [PoojaDurgad](https://github.com/PoojaDurgad) - +**Pooja D P** <Pooja.D.P@ibm.com> (she/her) * [psmarshall](https://github.com/psmarshall) - **Peter Marshall** <petermarshall@chromium.org> (he/him) * [puzpuzpuz](https://github.com/puzpuzpuz) - @@ -390,8 +389,6 @@ For information about the governance of the Node.js project, see **Ricky Zhou** <0x19951125@gmail.com> (he/him) * [ronag](https://github.com/ronag) - **Robert Nagy** <ronagy@icloud.com> -* [ronkorving](https://github.com/ronkorving) - -**Ron Korving** <ron@ronkorving.nl> * [rubys](https://github.com/rubys) - **Sam Ruby** <rubys@intertwingly.net> * [ruyadorno](https://github.com/ruyadorno) - @@ -406,8 +403,6 @@ For information about the governance of the Node.js project, see **Santiago Gimeno** <santiago.gimeno@gmail.com> * [seishun](https://github.com/seishun) - **Nikolai Vavilov** <vvnicholas@gmail.com> -* [shigeki](https://github.com/shigeki) - -**Shigeki Ohtsu** <ohtsu@ohtsu.org> (he/him) * [shisama](https://github.com/shisama) - **Masashi Hirano** <shisama07@gmail.com> (he/him) * [silverwind](https://github.com/silverwind) - @@ -453,6 +448,8 @@ For information about the governance of the Node.js project, see **Anna M. Kedzierska** <anna.m.kedzierska@gmail.com> * [aqrln](https://github.com/aqrln) - **Alexey Orlenko** <eaglexrlnk@gmail.com> (he/him) +* [bnoordhuis](https://github.com/bnoordhuis) - +**Ben Noordhuis** <info@bnoordhuis.nl> * [brendanashworth](https://github.com/brendanashworth) - **Brendan Ashworth** <brendan.ashworth@me.com> * [calvinmetcalf](https://github.com/calvinmetcalf) - @@ -463,6 +460,8 @@ For information about the governance of the Node.js project, see **Claudio Rodriguez** <cjrodr@yahoo.com> * [DavidCai1993](https://github.com/DavidCai1993) - **David Cai** <davidcai1993@yahoo.com> (he/him) +* [DerekNonGeneric](https://github.com/DerekNonGeneric) - +**Derek Lewis** <DerekNonGeneric@inf.is> (he/him) * [digitalinfinity](https://github.com/digitalinfinity) - **Hitesh Kanwathirtha** <digitalinfinity@gmail.com> (he/him) * [eljefedelrodeodeljefe](https://github.com/eljefedelrodeodeljefe) - @@ -541,12 +540,16 @@ For information about the governance of the Node.js project, see **Robert Kowalski** <rok@kowalski.gd> * [romankl](https://github.com/romankl) - **Roman Klauke** <romaaan.git@gmail.com> +* [ronkorving](https://github.com/ronkorving) - +**Ron Korving** <ron@ronkorving.nl> * [RReverser](https://github.com/RReverser) - **Ingvar Stepanyan** <me@rreverser.com> * [sam-github](https://github.com/sam-github) - **Sam Roberts** <vieuxtech@gmail.com> * [sebdeckers](https://github.com/sebdeckers) - **Sebastiaan Deckers** <sebdeckers83@gmail.com> +* [shigeki](https://github.com/shigeki) - +**Shigeki Ohtsu** <ohtsu@ohtsu.org> (he/him) * [stefanmb](https://github.com/stefanmb) - **Stefan Budeanu** <stefan@budeanu.com> * [tellnes](https://github.com/tellnes) - @@ -574,6 +577,8 @@ maintaining the Node.js project. * [PoojaDurgad](https://github.com/PoojaDurgad) - **Pooja Durgad** <Pooja.D.P@ibm.com> +* [RaisinTen](https://github.com/RaisinTen) - +**Darshan Sen** <raisinten@gmail.com> ### Release Keys @@ -583,6 +588,8 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys): `4ED778F539E3634C779C87C6D7062848A1AB005C` * **Colin Ihrig** <cjihrig@gmail.com> `94AE36675C464D64BAFA68DD7434390BDBE9B9C5` +* **Danielle Adams** <adamzdanielle@gmail.com> +`1C050899334244A8AF75E53792EF661D867B9DFA` * **James M Snell** <jasnell@keybase.io> `71DCFD284A79C3B38668286BC97EC7A07EDE3FC1` * **Michaël Zasso** <targos@protonmail.com> @@ -600,11 +607,13 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys): * **Shelley Vohr** <shelley.vohr@gmail.com> `B9E2F5981AA6E0CD28160D9FF13993A75599653C` -To import the full set of trusted release keys: +To import the full set of trusted release keys (including subkeys possibly used +to sign releases): ```bash gpg --keyserver pool.sks-keyservers.net --recv-keys 4ED778F539E3634C779C87C6D7062848A1AB005C gpg --keyserver pool.sks-keyservers.net --recv-keys 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 +gpg --keyserver pool.sks-keyservers.net --recv-keys 1C050899334244A8AF75E53792EF661D867B9DFA gpg --keyserver pool.sks-keyservers.net --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 gpg --keyserver pool.sks-keyservers.net --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 gpg --keyserver pool.sks-keyservers.net --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 @@ -637,6 +646,14 @@ Other keys used to sign some previous releases: * **Timothy J Fontaine** <tjfontaine@gmail.com> `7937DFD2AB06298B2293C3187D33FF9D0246406D` +## License + +Node.js is available under the +[MIT license](https://opensource.org/licenses/MIT). Node.js also includes +external libraries that are available under a variety of licenses. See +[LICENSE](https://github.com/nodejs/node/blob/master/LICENSE) for the full +license text. + [Code of Conduct]: https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md [Contributing to the project]: CONTRIBUTING.md [Node.js Website]: https://nodejs.org/ diff --git a/android-configure b/android-configure index a7cb2b9c8b4a78..ecb13f399e4d5d 100755 --- a/android-configure +++ b/android-configure @@ -10,7 +10,7 @@ if [ $# -ne 3 ]; then echo "$0 should have 3 parameters: ndk_path, target_arch and sdk_version" - exit 1 + return 1 fi NDK_PATH=$1 @@ -44,21 +44,21 @@ case $ARCH in ;; *) echo "Unsupported architecture provided: $ARCH" - exit 1 + return 1 ;; esac HOST_OS="linux" HOST_ARCH="x86_64" -export CC_host=$(which gcc) -export CXX_host=$(which g++) +export CC_host=$(command -v gcc) +export CXX_host=$(command -v g++) host_gcc_version=$($CC_host --version | grep gcc | awk '{print $NF}') major=$(echo $host_gcc_version | awk -F . '{print $1}') minor=$(echo $host_gcc_version | awk -F . '{print $2}') if [ -z $major ] || [ -z $minor ] || [ $major -lt 6 ] || [ $major -eq 6 -a $minor -lt 3 ]; then echo "host gcc $host_gcc_version is too old, need gcc 6.3.0" - exit 1 + return 1 fi SUFFIX="$TOOLCHAIN_NAME$ANDROID_SDK_VERSION" diff --git a/benchmark/_benchmark_progress.js b/benchmark/_benchmark_progress.js index 1b7ac738f6de0d..6c925f34e68202 100644 --- a/benchmark/_benchmark_progress.js +++ b/benchmark/_benchmark_progress.js @@ -39,7 +39,6 @@ class BenchmarkProgress { this.completedConfig = 0; // Total number of configurations for the current file this.scheduledConfig = 0; - this.interval; // Updates the elapsed time. } startQueue(index) { diff --git a/benchmark/_http-benchmarkers.js b/benchmark/_http-benchmarkers.js index d0f192e75948b6..f25bcd319882f6 100644 --- a/benchmark/_http-benchmarkers.js +++ b/benchmark/_http-benchmarkers.js @@ -29,7 +29,8 @@ class AutocannonBenchmarker { for (const field in options.headers) { args.push('-H', `${field}=${options.headers[field]}`); } - args.push(`http://127.0.0.1:${options.port}${options.path}`); + const scheme = options.scheme || 'http'; + args.push(`${scheme}://127.0.0.1:${options.port}${options.path}`); const child = child_process.spawn(this.executable, args); return child; } @@ -60,11 +61,12 @@ class WrkBenchmarker { const duration = typeof options.duration === 'number' ? Math.max(options.duration, 1) : options.duration; + const scheme = options.scheme || 'http'; const args = [ '-d', duration, '-c', options.connections, '-t', Math.min(options.connections, require('os').cpus().length || 8), - `http://127.0.0.1:${options.port}${options.path}`, + `${scheme}://127.0.0.1:${options.port}${options.path}`, ]; for (const field in options.headers) { args.push('-H', `${field}: ${options.headers[field]}`); @@ -90,8 +92,8 @@ class WrkBenchmarker { */ class TestDoubleBenchmarker { constructor(type) { - // `type` is the type of benchmarker. Possible values are 'http' and - // 'http2'. + // `type` is the type of benchmarker. Possible values are 'http', 'https', + // and 'http2'. this.name = `test-double-${type}`; this.executable = path.resolve(__dirname, '_test-double-benchmarker.js'); this.present = fs.existsSync(this.executable); @@ -101,8 +103,9 @@ class TestDoubleBenchmarker { create(options) { process.env.duration = process.env.duration || options.duration || 5; + const scheme = options.scheme || 'http'; const env = { - test_url: `http://127.0.0.1:${options.port}${options.path}`, + test_url: `${scheme}://127.0.0.1:${options.port}${options.path}`, ...process.env }; @@ -179,6 +182,7 @@ const http_benchmarkers = [ new WrkBenchmarker(), new AutocannonBenchmarker(), new TestDoubleBenchmarker('http'), + new TestDoubleBenchmarker('https'), new TestDoubleBenchmarker('http2'), new H2LoadBenchmarker(), ]; diff --git a/benchmark/_test-double-benchmarker.js b/benchmark/_test-double-benchmarker.js index 60264dfd46a606..89843d4616cc50 100644 --- a/benchmark/_test-double-benchmarker.js +++ b/benchmark/_test-double-benchmarker.js @@ -1,10 +1,15 @@ 'use strict'; const myModule = process.argv[2]; -if (!['http', 'http2'].includes(myModule)) { +if (!['http', 'https', 'http2'].includes(myModule)) { throw new Error(`Invalid module for benchmark test double: ${myModule}`); } +let options; +if (myModule === 'https') { + options = { rejectUnauthorized: false }; +} + const http = require(myModule); const duration = +process.env.duration; @@ -33,8 +38,12 @@ function request(res, client) { } function run() { - if (http.get) { // HTTP - http.get(url, request); + if (http.get) { // HTTP or HTTPS + if (options) { + http.get(url, options, request); + } else { + http.get(url, request); + } } else { // HTTP/2 const client = http.connect(url); client.on('error', (e) => { throw e; }); diff --git a/benchmark/child_process/child-process-params.js b/benchmark/child_process/child-process-params.js index df930395b2a015..8db8d3ace20c53 100644 --- a/benchmark/child_process/child-process-params.js +++ b/benchmark/child_process/child-process-params.js @@ -82,6 +82,7 @@ function main({ n, methodName, params }) { } break; case 'execFileSync': + case 'spawnSync': switch (params) { case 1: bench.start(); @@ -119,24 +120,5 @@ function main({ n, methodName, params }) { break; } break; - case 'spawnSync': - switch (params) { - case 1: - bench.start(); - for (let i = 0; i < n; i++) method(command); - bench.end(n); - break; - case 2: - bench.start(); - for (let i = 0; i < n; i++) method(command, args); - bench.end(n); - break; - case 3: - bench.start(); - for (let i = 0; i < n; i++) method(command, args, options); - bench.end(n); - break; - } - break; } } diff --git a/benchmark/child_process/child-process-read-ipc.js b/benchmark/child_process/child-process-read-ipc.js index 827f75b1e54bd1..280505026cd02e 100644 --- a/benchmark/child_process/child-process-read-ipc.js +++ b/benchmark/child_process/child-process-read-ipc.js @@ -13,7 +13,7 @@ if (process.argv[2] === 'child') { const bench = common.createBenchmark(main, { len: [ 64, 256, 1024, 4096, 16384, 65536, - 65536 << 4, 65536 << 8, + 65536 << 4, 65536 << 6 - 1, ], dur: [5] }); diff --git a/benchmark/common.js b/benchmark/common.js index 701a8d6c34f07f..bdccd6605f365e 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -4,24 +4,24 @@ const child_process = require('child_process'); const http_benchmarkers = require('./_http-benchmarkers.js'); class Benchmark { - // Used to make sure a benchmark only start a timer once - #started = false; + constructor(fn, configs, options = {}) { + // Used to make sure a benchmark only start a timer once + this._started = false; - // Indicate that the benchmark ended - #ended = false; + // Indicate that the benchmark ended + this._ended = false; - // Holds process.hrtime value - #time = [0, 0]; + // Holds process.hrtime value + this._time = [0, 0]; - // Use the file name as the name of the benchmark - name = require.main.filename.slice(__dirname.length + 1); + // Use the file name as the name of the benchmark + this.name = require.main.filename.slice(__dirname.length + 1); - // Execution arguments i.e. flags used to run the jobs - flags = process.env.NODE_BENCHMARK_FLAGS ? - process.env.NODE_BENCHMARK_FLAGS.split(/\s+/) : - []; + // Execution arguments i.e. flags used to run the jobs + this.flags = process.env.NODE_BENCHMARK_FLAGS ? + process.env.NODE_BENCHMARK_FLAGS.split(/\s+/) : + []; - constructor(fn, configs, options = {}) { // Parse job-specific configuration from the command line arguments const argv = process.argv.slice(2); const parsed_args = this._parseArgs(argv, configs, options); @@ -214,21 +214,21 @@ class Benchmark { } start() { - if (this.#started) { + if (this._started) { throw new Error('Called start more than once in a single benchmark'); } - this.#started = true; - this.#time = process.hrtime(); + this._started = true; + this._time = process.hrtime(); } end(operations) { // Get elapsed time now and do error checking later for accuracy. - const elapsed = process.hrtime(this.#time); + const elapsed = process.hrtime(this._time); - if (!this.#started) { + if (!this._started) { throw new Error('called end without start'); } - if (this.#ended) { + if (this._ended) { throw new Error('called end multiple times'); } if (typeof operations !== 'number') { @@ -244,7 +244,7 @@ class Benchmark { elapsed[1] = 1; } - this.#ended = true; + this._ended = true; const time = elapsed[0] + elapsed[1] / 1e9; const rate = operations / time; this.report(rate, elapsed); diff --git a/benchmark/diagnostics_channel/http.js b/benchmark/diagnostics_channel/http.js new file mode 100644 index 00000000000000..55fac8a706df15 --- /dev/null +++ b/benchmark/diagnostics_channel/http.js @@ -0,0 +1,96 @@ +'use strict'; +const common = require('../common.js'); +const dc = require('diagnostics_channel'); +const { AsyncLocalStorage } = require('async_hooks'); +const http = require('http'); + +const bench = common.createBenchmark(main, { + apm: ['none', 'diagnostics_channel', 'patch'], + type: 'buffer', + len: 1024, + chunks: 4, + connections: [50, 500], + chunkedEnc: 1, + duration: 5 +}); + +function main({ apm, connections, duration, type, len, chunks, chunkedEnc }) { + const done = { none, patch, diagnostics_channel }[apm](); + + const server = require('../fixtures/simple-http-server.js') + .listen(common.PORT) + .on('listening', () => { + const path = `/${type}/${len}/${chunks}/normal/${chunkedEnc}`; + bench.http({ + path, + connections, + duration + }, () => { + server.close(); + if (done) done(); + }); + }); +} + +function none() {} + +function patch() { + const als = new AsyncLocalStorage(); + const times = []; + + const { emit } = http.Server.prototype; + function wrappedEmit(...args) { + const [name, req, res] = args; + if (name === 'request') { + als.enterWith({ + url: req.url, + start: process.hrtime.bigint() + }); + + res.on('finish', () => { + times.push({ + ...als.getStore(), + statusCode: res.statusCode, + end: process.hrtime.bigint() + }); + }); + } + return emit.apply(this, args); + } + http.Server.prototype.emit = wrappedEmit; + + return () => { + http.Server.prototype.emit = emit; + }; +} + +function diagnostics_channel() { + const als = new AsyncLocalStorage(); + const times = []; + + const start = dc.channel('http.server.request.start'); + const finish = dc.channel('http.server.response.finish'); + + function onStart(req) { + als.enterWith({ + url: req.url, + start: process.hrtime.bigint() + }); + } + + function onFinish(res) { + times.push({ + ...als.getStore(), + statusCode: res.statusCode, + end: process.hrtime.bigint() + }); + } + + start.subscribe(onStart); + finish.subscribe(onFinish); + + return () => { + start.unsubscribe(onStart); + finish.unsubscribe(onFinish); + }; +} diff --git a/benchmark/diagnostics_channel/publish.js b/benchmark/diagnostics_channel/publish.js new file mode 100644 index 00000000000000..31a770c8627919 --- /dev/null +++ b/benchmark/diagnostics_channel/publish.js @@ -0,0 +1,29 @@ +'use strict'; +const common = require('../common.js'); +const dc = require('diagnostics_channel'); + +const bench = common.createBenchmark(main, { + n: [1e8], + subscribers: [0, 1, 10], +}); + +function noop() {} + +function main({ n, subscribers }) { + const channel = dc.channel('test'); + for (let i = 0; i < subscribers; i++) { + channel.subscribe(noop); + } + + const data = { + foo: 'bar' + }; + + bench.start(); + for (let i = 0; i < n; i++) { + if (channel.hasSubscribers) { + channel.publish(data); + } + } + bench.end(n); +} diff --git a/benchmark/diagnostics_channel/subscribe.js b/benchmark/diagnostics_channel/subscribe.js new file mode 100644 index 00000000000000..1415054588c4b1 --- /dev/null +++ b/benchmark/diagnostics_channel/subscribe.js @@ -0,0 +1,19 @@ +'use strict'; +const common = require('../common.js'); +const dc = require('diagnostics_channel'); + +const bench = common.createBenchmark(main, { + n: [1e8], +}); + +function noop() {} + +function main({ n }) { + const channel = dc.channel('channel.0'); + + bench.start(); + for (let i = 0; i < n; i++) { + channel.subscribe(noop); + } + bench.end(n); +} diff --git a/benchmark/es/destructuring-bench.js b/benchmark/es/destructuring-bench.js index c07c0383da91ac..d412b82757f083 100644 --- a/benchmark/es/destructuring-bench.js +++ b/benchmark/es/destructuring-bench.js @@ -12,7 +12,8 @@ function runSwapManual(n) { let x, y, r; bench.start(); for (let i = 0; i < n; i++) { - x = 1, y = 2; + x = 1; + y = 2; r = x; x = y; y = r; @@ -26,7 +27,8 @@ function runSwapDestructured(n) { let x, y; bench.start(); for (let i = 0; i < n; i++) { - x = 1, y = 2; + x = 1; + y = 2; [x, y] = [y, x]; assert.strictEqual(x, 2); assert.strictEqual(y, 1); diff --git a/benchmark/fixtures/require-builtins.js b/benchmark/fixtures/require-builtins.js new file mode 100644 index 00000000000000..685eef1875b301 --- /dev/null +++ b/benchmark/fixtures/require-builtins.js @@ -0,0 +1,44 @@ +'use strict'; + +const list = [ + 'async_hooks', + 'assert', + 'buffer', + 'child_process', + 'console', + 'constants', + 'crypto', + 'cluster', + 'dgram', + 'dns', + 'domain', + 'events', + 'fs', + 'http', + 'http2', + 'https', + 'module', + 'net', + 'os', + 'path', + 'perf_hooks', + 'process', + 'punycode', + 'querystring', + 'readline', + 'repl', + 'stream', + 'string_decoder', + 'timers', + 'tls', + 'tty', + 'url', + 'util', + 'vm', + 'zlib', +]; + +for (let i = 0; i < list.length; ++i) { + const item = list[i]; + require(item); +} diff --git a/benchmark/fixtures/simple-https-server.js b/benchmark/fixtures/simple-https-server.js new file mode 100644 index 00000000000000..d3b07a110113d7 --- /dev/null +++ b/benchmark/fixtures/simple-https-server.js @@ -0,0 +1,72 @@ +'use strict'; + +const fixtures = require('../../test/common/fixtures'); +const https = require('https'); + +const options = { + key: fixtures.readKey('rsa_private.pem'), + cert: fixtures.readKey('rsa_cert.crt') +}; + +const storedBytes = Object.create(null); +const storedBuffer = Object.create(null); + +module.exports = https.createServer(options, (req, res) => { + // URL format: ////chunkedEnc + const params = req.url.split('/'); + const command = params[1]; + let body = ''; + const arg = params[2]; + const n_chunks = parseInt(params[3], 10); + const chunkedEnc = params.length >= 5 && params[4] === '0' ? false : true; + let status = 200; + + let n, i; + if (command === 'bytes') { + n = ~~arg; + if (n <= 0) + throw new Error('bytes called with n <= 0'); + if (storedBytes[n] === undefined) { + storedBytes[n] = 'C'.repeat(n); + } + body = storedBytes[n]; + } else if (command === 'buffer') { + n = ~~arg; + if (n <= 0) + throw new Error('buffer called with n <= 0'); + if (storedBuffer[n] === undefined) { + storedBuffer[n] = Buffer.allocUnsafe(n); + for (i = 0; i < n; i++) { + storedBuffer[n][i] = 'C'.charCodeAt(0); + } + } + body = storedBuffer[n]; + } else { + status = 404; + body = 'not found\n'; + } + + // example: https://localhost:port/bytes/512/4 + // sends a 512 byte body in 4 chunks of 128 bytes + const len = body.length; + if (chunkedEnc) { + res.writeHead(status, { + 'Content-Type': 'text/plain', + 'Transfer-Encoding': 'chunked' + }); + } else { + res.writeHead(status, { + 'Content-Type': 'text/plain', + 'Content-Length': len.toString() + }); + } + // send body in chunks + if (n_chunks > 1) { + const step = Math.floor(len / n_chunks) || 1; + for (i = 0, n = (n_chunks - 1); i < n; ++i) + res.write(body.slice(i * step, i * step + step)); + res.end(body.slice((n_chunks - 1) * step)); + } else { + res.end(body); + } +}); diff --git a/benchmark/fs/bench-statSync-failure.js b/benchmark/fs/bench-statSync-failure.js new file mode 100644 index 00000000000000..82cb24c09f4af2 --- /dev/null +++ b/benchmark/fs/bench-statSync-failure.js @@ -0,0 +1,28 @@ +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const path = require('path'); + +const bench = common.createBenchmark(main, { + n: [1e6], + statSyncType: ['throw', 'noThrow'] +}); + + +function main({ n, statSyncType }) { + const arg = path.join(__dirname, 'non.existent'); + + bench.start(); + for (let i = 0; i < n; i++) { + if (statSyncType === 'noThrow') { + fs.statSync(arg, { throwIfNoEntry: false }); + } else { + try { + fs.statSync(arg); + } catch { + } + } + } + bench.end(n); +} diff --git a/benchmark/fs/bench-statSync.js b/benchmark/fs/bench-statSync.js index 0c9366a402cb71..e75d6603fcfc64 100644 --- a/benchmark/fs/bench-statSync.js +++ b/benchmark/fs/bench-statSync.js @@ -21,6 +21,6 @@ function main({ n, statSyncType }) { } bench.end(n); - if (statSyncType === 'fstat') + if (statSyncType === 'fstatSync') fs.closeSync(arg); } diff --git a/benchmark/https/simple.js b/benchmark/https/simple.js new file mode 100644 index 00000000000000..243546c346f484 --- /dev/null +++ b/benchmark/https/simple.js @@ -0,0 +1,29 @@ +'use strict'; +const common = require('../common.js'); + +const bench = common.createBenchmark(main, { + type: ['bytes', 'buffer'], + len: [4, 1024, 102400], + chunks: [1, 4], + c: [50, 500], + chunkedEnc: [1, 0], + benchmarker: ['test-double-https'], + duration: 5 +}); + +function main({ type, len, chunks, c, chunkedEnc, duration }) { + const server = require('../fixtures/simple-https-server.js') + .listen(common.PORT) + .on('listening', () => { + const path = `/${type}/${len}/${chunks}/${chunkedEnc}`; + + bench.http({ + path, + connections: c, + scheme: 'https', + duration + }, () => { + server.close(); + }); + }); +} diff --git a/benchmark/misc/hidestackframes.js b/benchmark/misc/hidestackframes.js new file mode 100644 index 00000000000000..5b14f2d95b22e2 --- /dev/null +++ b/benchmark/misc/hidestackframes.js @@ -0,0 +1,45 @@ +'use strict'; + +const common = require('../common.js'); + +const bench = common.createBenchmark(main, { + type: ['hide-stackframes-throw', 'direct-call-throw', + 'hide-stackframes-noerr', 'direct-call-noerr'], + n: [10e4] +}, { + flags: ['--expose-internals'] +}); + +function main({ n, type }) { + const { + hideStackFrames, + codes: { + ERR_INVALID_ARG_TYPE, + }, + } = require('internal/errors'); + + const testfn = (value) => { + if (typeof value !== 'number') { + throw new ERR_INVALID_ARG_TYPE('Benchmark', 'number', value); + } + }; + + let fn = testfn; + if (type.startsWith('hide-stackframe')) + fn = hideStackFrames(testfn); + let value = 42; + if (type.endsWith('-throw')) + value = 'err'; + + bench.start(); + + for (let i = 0; i < n; i++) { + try { + fn(value); + } catch { + // No-op + } + } + + bench.end(n); +} diff --git a/benchmark/misc/startup.js b/benchmark/misc/startup.js index da24ee65199077..dea5a31753f8fe 100644 --- a/benchmark/misc/startup.js +++ b/benchmark/misc/startup.js @@ -7,7 +7,11 @@ let Worker; // Lazy loaded in main const bench = common.createBenchmark(main, { dur: [1], - script: ['benchmark/fixtures/require-cachable', 'test/fixtures/semicolon'], + script: [ + 'benchmark/fixtures/require-builtins', + 'benchmark/fixtures/require-cachable', + 'test/fixtures/semicolon', + ], mode: ['process', 'worker'] }, { flags: ['--expose-internals'] diff --git a/benchmark/napi/function_args/binding.cc b/benchmark/napi/function_args/binding.cc index 2c54dd424d405d..078fe0ee3ea767 100644 --- a/benchmark/napi/function_args/binding.cc +++ b/benchmark/napi/function_args/binding.cc @@ -123,7 +123,9 @@ void CallWithArguments(const FunctionCallbackInfo& args) { } } -void Initialize(Local target) { +void Initialize(Local target, + Local module, + void* data) { NODE_SET_METHOD(target, "callWithString", CallWithString); NODE_SET_METHOD(target, "callWithLongString", CallWithString); diff --git a/benchmark/napi/function_call/binding.cc b/benchmark/napi/function_call/binding.cc index 289a94ac3ecc88..570f96f41ec458 100644 --- a/benchmark/napi/function_call/binding.cc +++ b/benchmark/napi/function_call/binding.cc @@ -7,7 +7,9 @@ void Hello(const v8::FunctionCallbackInfo& args) { args.GetReturnValue().Set(c++); } -void Initialize(v8::Local target) { +void Initialize(v8::Local target, + v8::Local module, + void* data) { NODE_SET_METHOD(target, "hello", Hello); } diff --git a/benchmark/napi/type-tag-check/.gitignore b/benchmark/napi/type-tag-check/.gitignore new file mode 100644 index 00000000000000..567609b1234a9b --- /dev/null +++ b/benchmark/napi/type-tag-check/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/benchmark/napi/type-tag/.gitignore b/benchmark/napi/type-tag/.gitignore new file mode 100644 index 00000000000000..567609b1234a9b --- /dev/null +++ b/benchmark/napi/type-tag/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/benchmark/perf_hooks/bench-eventlooputil.js b/benchmark/perf_hooks/bench-eventlooputil.js index 984b2b66aecbcf..1fd452afa91300 100644 --- a/benchmark/perf_hooks/bench-eventlooputil.js +++ b/benchmark/perf_hooks/bench-eventlooputil.js @@ -33,7 +33,7 @@ function main({ method, n }) { function benchIdleTime(n) { bench.start(); for (let i = 0; i < n; i++) - nodeTiming.idleTime; + nodeTiming.idleTime; // eslint-disable-line no-unused-expressions bench.end(n); } diff --git a/benchmark/process/bench-env.js b/benchmark/process/bench-env.js index 5df521cc958389..e96c1d02507214 100644 --- a/benchmark/process/bench-env.js +++ b/benchmark/process/bench-env.js @@ -13,7 +13,7 @@ function main({ n, operation }) { case 'get': bench.start(); for (let i = 0; i < n; i++) { - process.env.PATH; + process.env.PATH; // eslint-disable-line no-unused-expressions } bench.end(n); break; @@ -42,7 +42,7 @@ function main({ n, operation }) { case 'query': bench.start(); for (let i = 0; i < n; i++) { - 'PATH' in process.env; + 'PATH' in process.env; // eslint-disable-line no-unused-expressions } bench.end(n); break; diff --git a/benchmark/string_decoder/string-decoder-create.js b/benchmark/string_decoder/string-decoder-create.js index f7fa5e0246b860..641e562fdeab3d 100644 --- a/benchmark/string_decoder/string-decoder-create.js +++ b/benchmark/string_decoder/string-decoder-create.js @@ -12,8 +12,7 @@ const bench = common.createBenchmark(main, { function main({ encoding, n }) { bench.start(); for (let i = 0; i < n; ++i) { - const sd = new StringDecoder(encoding); - !!sd.encoding; + new StringDecoder(encoding); } bench.end(n); } diff --git a/benchmark/tls/throughput.js b/benchmark/tls/throughput-c2s.js similarity index 100% rename from benchmark/tls/throughput.js rename to benchmark/tls/throughput-c2s.js diff --git a/benchmark/tls/throughput-s2c.js b/benchmark/tls/throughput-s2c.js new file mode 100644 index 00000000000000..a505a719d30884 --- /dev/null +++ b/benchmark/tls/throughput-s2c.js @@ -0,0 +1,104 @@ +'use strict'; +const common = require('../common.js'); +const bench = common.createBenchmark(main, { + dur: [5], + type: ['buf', 'asc', 'utf'], + sendchunklen: [256, 32 * 1024, 128 * 1024, 16 * 1024 * 1024], + recvbuflen: [0, 64 * 1024, 1024 * 1024], + recvbufgenfn: ['true', 'false'] +}); + +const fixtures = require('../../test/common/fixtures'); +let options; +let recvbuf; +let received = 0; +const tls = require('tls'); + +function main({ dur, type, sendchunklen, recvbuflen, recvbufgenfn }) { + if (isFinite(recvbuflen) && recvbuflen > 0) + recvbuf = Buffer.alloc(recvbuflen); + + let encoding; + let chunk; + switch (type) { + case 'buf': + chunk = Buffer.alloc(sendchunklen, 'b'); + break; + case 'asc': + chunk = 'a'.repeat(sendchunklen); + encoding = 'ascii'; + break; + case 'utf': + chunk = 'ü'.repeat(sendchunklen / 2); + encoding = 'utf8'; + break; + default: + throw new Error('invalid type'); + } + + options = { + key: fixtures.readKey('rsa_private.pem'), + cert: fixtures.readKey('rsa_cert.crt'), + ca: fixtures.readKey('rsa_ca.crt'), + ciphers: 'AES256-GCM-SHA384' + }; + + let socketOpts; + if (recvbuf === undefined) { + socketOpts = { port: common.PORT, rejectUnauthorized: false }; + } else { + let buffer = recvbuf; + if (recvbufgenfn === 'true') { + let bufidx = -1; + const bufpool = [ + recvbuf, + Buffer.from(recvbuf), + Buffer.from(recvbuf), + ]; + buffer = () => { + bufidx = (bufidx + 1) % bufpool.length; + return bufpool[bufidx]; + }; + } + socketOpts = { + port: common.PORT, + rejectUnauthorized: false, + onread: { + buffer, + callback: function(nread, buf) { + received += nread; + } + } + }; + } + + const server = tls.createServer(options, (socket) => { + socket.on('data', (buf) => { + socket.on('drain', write); + write(); + }); + + function write() { + while (false !== socket.write(chunk, encoding)); + } + }); + + let conn; + server.listen(common.PORT, () => { + conn = tls.connect(socketOpts, () => { + setTimeout(done, dur * 1000); + bench.start(); + conn.write('hello'); + }); + + conn.on('data', (chunk) => { + received += chunk.length; + }); + }); + + function done() { + const mbits = (received * 8) / (1024 * 1024); + bench.end(mbits); + process.exit(0); + } +} diff --git a/benchmark/worker/bench-eventlooputil.js b/benchmark/worker/bench-eventlooputil.js new file mode 100644 index 00000000000000..2d59f9f19ed563 --- /dev/null +++ b/benchmark/worker/bench-eventlooputil.js @@ -0,0 +1,61 @@ +'use strict'; + +const common = require('../common.js'); +const { Worker, parentPort } = require('worker_threads'); + +if (process.argv[2] === 'idle cats') { + return parentPort.once('message', () => {}); +} + +const bench = common.createBenchmark(main, { + n: [1e6], + method: [ + 'ELU_simple', + 'ELU_passed', + ], +}); + +function main({ method, n }) { + switch (method) { + case 'ELU_simple': + benchELUSimple(n); + break; + case 'ELU_passed': + benchELUPassed(n); + break; + default: + throw new Error(`Unsupported method ${method}`); + } +} + +function benchELUSimple(n) { + const worker = new Worker(__filename, { argv: ['idle cats'] }); + + spinUntilIdle(worker, () => { + bench.start(); + for (let i = 0; i < n; i++) + worker.performance.eventLoopUtilization(); + bench.end(n); + worker.postMessage('bye'); + }); +} + +function benchELUPassed(n) { + const worker = new Worker(__filename, { argv: ['idle cats'] }); + + spinUntilIdle(worker, () => { + let elu = worker.performance.eventLoopUtilization(); + bench.start(); + for (let i = 0; i < n; i++) + elu = worker.performance.eventLoopUtilization(elu); + bench.end(n); + worker.postMessage('bye'); + }); +} + +function spinUntilIdle(w, cb) { + const t = w.performance.eventLoopUtilization(); + if (t.idle + t.active > 0) + return process.nextTick(cb); + setTimeout(() => spinUntilIdle(w, cb), 1); +} diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000000000..462fb1e79f8b5b --- /dev/null +++ b/codecov.yml @@ -0,0 +1,13 @@ +# TODO(bcoe): re-enable coverage report comments, once we can figure out +# how to make them more accurate for the Node.js project, +# See: https://github.com/nodejs/node/issues/35759 +comment: false +# # Only show diff and files changed: +# layout: "diff, files" +# # Don't post if no changes in coverage: +# require_changes: true + +codecov: + notify: + # Wait for all coverage builds: + after_n_builds: 2 diff --git a/common.gypi b/common.gypi index f8440fef992252..b665cfc96566e3 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.15', + 'v8_embedder_string': '-node.22', ##### V8 defaults for Node.js ##### @@ -495,8 +495,7 @@ ['_type!="static_library"', { 'xcode_settings': { 'OTHER_LDFLAGS': [ - '-Wl,-no_pie', - '-Wl,-search_paths_first', + '-Wl,-search_paths_first' ], }, }], diff --git a/configure b/configure index 07581d9c5a4ff1..ca2cd8aa9e6358 100755 --- a/configure +++ b/configure @@ -10,6 +10,7 @@ command -v python3.8 >/dev/null && exec python3.8 "$0" "$@" command -v python3.7 >/dev/null && exec python3.7 "$0" "$@" command -v python3.6 >/dev/null && exec python3.6 "$0" "$@" command -v python3.5 >/dev/null && exec python3.5 "$0" "$@" +command -v python3 >/dev/null && exec python3 "$0" "$@" command -v python2.7 >/dev/null && exec python2.7 "$0" "$@" exec python "$0" "$@" ''' "$0" "$@" diff --git a/configure.py b/configure.py index d68d8fc96abeb7..8ed8524b26667e 100755 --- a/configure.py +++ b/configure.py @@ -3,7 +3,7 @@ import json import sys import errno -import optparse +import argparse import os import pipes import pprint @@ -41,7 +41,7 @@ from gyp_node import run_gyp # parse our options -parser = optparse.OptionParser() +parser = argparse.ArgumentParser() valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux', 'android', 'aix', 'cloudabi') @@ -57,113 +57,125 @@ icu_versions = json.load(f) # create option groups -shared_optgroup = optparse.OptionGroup(parser, "Shared libraries", +shared_optgroup = parser.add_argument_group("Shared libraries", "Flags that allows you to control whether you want to build against " "built-in dependencies or its shared representations. If necessary, " "provide multiple libraries with comma.") -intl_optgroup = optparse.OptionGroup(parser, "Internationalization", +intl_optgroup = parser.add_argument_group("Internationalization", "Flags that lets you enable i18n features in Node.js as well as which " "library you want to build against.") -http2_optgroup = optparse.OptionGroup(parser, "HTTP2", +http2_optgroup = parser.add_argument_group("HTTP2", "Flags that allows you to control HTTP2 features in Node.js") # Options should be in alphabetical order but keep --prefix at the top, # that's arguably the one people will be looking for most. -parser.add_option('--prefix', +parser.add_argument('--prefix', action='store', dest='prefix', default='/usr/local', - help='select the install prefix [default: %default]') + help='select the install prefix [default: %(default)s]') -parser.add_option('--coverage', +parser.add_argument('--coverage', action='store_true', dest='coverage', + default=None, help='Build node with code coverage enabled') -parser.add_option('--debug', +parser.add_argument('--debug', action='store_true', dest='debug', + default=None, help='also build debug build') -parser.add_option('--debug-node', +parser.add_argument('--debug-node', action='store_true', dest='debug_node', + default=None, help='build the Node.js part of the binary with debugging symbols') -parser.add_option('--dest-cpu', +parser.add_argument('--dest-cpu', action='store', dest='dest_cpu', choices=valid_arch, help='CPU architecture to build for ({0})'.format(', '.join(valid_arch))) -parser.add_option('--cross-compiling', +parser.add_argument('--cross-compiling', action='store_true', dest='cross_compiling', default=None, help='force build to be considered as cross compiled') -parser.add_option('--no-cross-compiling', +parser.add_argument('--no-cross-compiling', action='store_false', dest='cross_compiling', default=None, help='force build to be considered as NOT cross compiled') -parser.add_option('--dest-os', +parser.add_argument('--dest-os', action='store', dest='dest_os', choices=valid_os, help='operating system to build for ({0})'.format(', '.join(valid_os))) -parser.add_option('--error-on-warn', +parser.add_argument('--error-on-warn', action='store_true', dest='error_on_warn', + default=None, help='Turn compiler warnings into errors for node core sources.') -parser.add_option('--experimental-quic', +parser.add_argument('--experimental-quic', action='store_true', dest='experimental_quic', + default=None, help='enable experimental quic support') -parser.add_option('--gdb', +parser.add_argument('--gdb', action='store_true', dest='gdb', + default=None, help='add gdb support') -parser.add_option('--no-ifaddrs', +parser.add_argument('--no-ifaddrs', action='store_true', dest='no_ifaddrs', + default=None, help='use on deprecated SunOS systems that do not support ifaddrs.h') -parser.add_option("--fully-static", +parser.add_argument("--fully-static", action="store_true", dest="fully_static", + default=None, help="Generate an executable without external dynamic libraries. This " "will not work on OSX when using the default compilation environment") -parser.add_option("--partly-static", +parser.add_argument("--partly-static", action="store_true", dest="partly_static", + default=None, help="Generate an executable with libgcc and libstdc++ libraries. This " "will not work on OSX when using the default compilation environment") -parser.add_option("--enable-pgo-generate", +parser.add_argument("--enable-pgo-generate", action="store_true", dest="enable_pgo_generate", + default=None, help="Enable profiling with pgo of a binary. This feature is only available " "on linux with gcc and g++ 5.4.1 or newer.") -parser.add_option("--enable-pgo-use", +parser.add_argument("--enable-pgo-use", action="store_true", dest="enable_pgo_use", + default=None, help="Enable use of the profile generated with --enable-pgo-generate. This " "feature is only available on linux with gcc and g++ 5.4.1 or newer.") -parser.add_option("--enable-lto", +parser.add_argument("--enable-lto", action="store_true", dest="enable_lto", + default=None, help="Enable compiling with lto of a binary. This feature is only available " "on linux with gcc and g++ 5.4.1 or newer.") -parser.add_option("--link-module", +parser.add_argument("--link-module", action="append", dest="linked_module", help="Path to a JS file to be bundled in the binary as a builtin. " @@ -171,334 +183,355 @@ "e.g. /root/x/y.js will be referenced via require('root/x/y'). " "Can be used multiple times") -parser.add_option('--openssl-default-cipher-list', +parser.add_argument('--openssl-default-cipher-list', action='store', dest='openssl_default_cipher_list', help='Use the specified cipher list as the default cipher list') -parser.add_option("--openssl-no-asm", +parser.add_argument("--openssl-no-asm", action="store_true", dest="openssl_no_asm", + default=None, help="Do not build optimized assembly for OpenSSL") -parser.add_option('--openssl-fips', +parser.add_argument('--openssl-fips', action='store', dest='openssl_fips', help='Build OpenSSL using FIPS canister .o file in supplied folder') -parser.add_option('--openssl-is-fips', +parser.add_argument('--openssl-is-fips', action='store_true', dest='openssl_is_fips', + default=None, help='specifies that the OpenSSL library is FIPS compatible') -parser.add_option('--openssl-use-def-ca-store', +parser.add_argument('--openssl-use-def-ca-store', action='store_true', dest='use_openssl_ca_store', + default=None, help='Use OpenSSL supplied CA store instead of compiled-in Mozilla CA copy.') -parser.add_option('--openssl-system-ca-path', +parser.add_argument('--openssl-system-ca-path', action='store', dest='openssl_system_ca_path', help='Use the specified path to system CA (PEM format) in addition to ' 'the OpenSSL supplied CA store or compiled-in Mozilla CA copy.') -parser.add_option('--experimental-http-parser', +parser.add_argument('--experimental-http-parser', action='store_true', dest='experimental_http_parser', + default=None, help='(no-op)') -shared_optgroup.add_option('--shared-http-parser', +shared_optgroup.add_argument('--shared-http-parser', action='store_true', dest='shared_http_parser', + default=None, help='link to a shared http_parser DLL instead of static linking') -shared_optgroup.add_option('--shared-http-parser-includes', +shared_optgroup.add_argument('--shared-http-parser-includes', action='store', dest='shared_http_parser_includes', help='directory containing http_parser header files') -shared_optgroup.add_option('--shared-http-parser-libname', +shared_optgroup.add_argument('--shared-http-parser-libname', action='store', dest='shared_http_parser_libname', default='http_parser', - help='alternative lib name to link to [default: %default]') + help='alternative lib name to link to [default: %(default)s]') -shared_optgroup.add_option('--shared-http-parser-libpath', +shared_optgroup.add_argument('--shared-http-parser-libpath', action='store', dest='shared_http_parser_libpath', help='a directory to search for the shared http_parser DLL') -shared_optgroup.add_option('--shared-libuv', +shared_optgroup.add_argument('--shared-libuv', action='store_true', dest='shared_libuv', + default=None, help='link to a shared libuv DLL instead of static linking') -shared_optgroup.add_option('--shared-libuv-includes', +shared_optgroup.add_argument('--shared-libuv-includes', action='store', dest='shared_libuv_includes', help='directory containing libuv header files') -shared_optgroup.add_option('--shared-libuv-libname', +shared_optgroup.add_argument('--shared-libuv-libname', action='store', dest='shared_libuv_libname', default='uv', - help='alternative lib name to link to [default: %default]') + help='alternative lib name to link to [default: %(default)s]') -shared_optgroup.add_option('--shared-libuv-libpath', +shared_optgroup.add_argument('--shared-libuv-libpath', action='store', dest='shared_libuv_libpath', help='a directory to search for the shared libuv DLL') -shared_optgroup.add_option('--shared-nghttp2', +shared_optgroup.add_argument('--shared-nghttp2', action='store_true', dest='shared_nghttp2', + default=None, help='link to a shared nghttp2 DLL instead of static linking') -shared_optgroup.add_option('--shared-nghttp2-includes', +shared_optgroup.add_argument('--shared-nghttp2-includes', action='store', dest='shared_nghttp2_includes', help='directory containing nghttp2 header files') -shared_optgroup.add_option('--shared-nghttp2-libname', +shared_optgroup.add_argument('--shared-nghttp2-libname', action='store', dest='shared_nghttp2_libname', default='nghttp2', - help='alternative lib name to link to [default: %default]') + help='alternative lib name to link to [default: %(default)s]') -shared_optgroup.add_option('--shared-nghttp2-libpath', +shared_optgroup.add_argument('--shared-nghttp2-libpath', action='store', dest='shared_nghttp2_libpath', help='a directory to search for the shared nghttp2 DLLs') -shared_optgroup.add_option('--shared-ngtcp2', +shared_optgroup.add_argument('--shared-ngtcp2', action='store_true', dest='shared_ngtcp2', + default=None, help='link to a shared ngtcp2 DLL instead of static linking') -shared_optgroup.add_option('--shared-ngtcp2-includes', +shared_optgroup.add_argument('--shared-ngtcp2-includes', action='store', dest='shared_ngtcp2_includes', help='directory containing ngtcp2 header files') -shared_optgroup.add_option('--shared-ngtcp2-libname', +shared_optgroup.add_argument('--shared-ngtcp2-libname', action='store', dest='shared_ngtcp2_libname', default='ngtcp2', - help='alternative lib name to link to [default: %default]') + help='alternative lib name to link to [default: %(default)s]') -shared_optgroup.add_option('--shared-ngtcp2-libpath', +shared_optgroup.add_argument('--shared-ngtcp2-libpath', action='store', dest='shared_ngtcp2_libpath', help='a directory to search for the shared ngtcp2 DLLs') -shared_optgroup.add_option('--shared-nghttp3', +shared_optgroup.add_argument('--shared-nghttp3', action='store_true', dest='shared_nghttp3', + default=None, help='link to a shared nghttp3 DLL instead of static linking') -shared_optgroup.add_option('--shared-nghttp3-includes', +shared_optgroup.add_argument('--shared-nghttp3-includes', action='store', dest='shared_nghttp3_includes', help='directory containing nghttp3 header files') -shared_optgroup.add_option('--shared-nghttp3-libname', +shared_optgroup.add_argument('--shared-nghttp3-libname', action='store', dest='shared_nghttp3_libname', default='nghttp3', - help='alternative lib name to link to [default: %default]') + help='alternative lib name to link to [default: %(default)s]') -shared_optgroup.add_option('--shared-nghttp3-libpath', +shared_optgroup.add_argument('--shared-nghttp3-libpath', action='store', dest='shared_nghttp3_libpath', help='a directory to search for the shared nghttp3 DLLs') -shared_optgroup.add_option('--shared-openssl', +shared_optgroup.add_argument('--shared-openssl', action='store_true', dest='shared_openssl', + default=None, help='link to a shared OpenSSl DLL instead of static linking') -shared_optgroup.add_option('--shared-openssl-includes', +shared_optgroup.add_argument('--shared-openssl-includes', action='store', dest='shared_openssl_includes', help='directory containing OpenSSL header files') -shared_optgroup.add_option('--shared-openssl-libname', +shared_optgroup.add_argument('--shared-openssl-libname', action='store', dest='shared_openssl_libname', default='crypto,ssl', - help='alternative lib name to link to [default: %default]') + help='alternative lib name to link to [default: %(default)s]') -shared_optgroup.add_option('--shared-openssl-libpath', +shared_optgroup.add_argument('--shared-openssl-libpath', action='store', dest='shared_openssl_libpath', help='a directory to search for the shared OpenSSL DLLs') -shared_optgroup.add_option('--shared-zlib', +shared_optgroup.add_argument('--shared-zlib', action='store_true', dest='shared_zlib', + default=None, help='link to a shared zlib DLL instead of static linking') -shared_optgroup.add_option('--shared-zlib-includes', +shared_optgroup.add_argument('--shared-zlib-includes', action='store', dest='shared_zlib_includes', help='directory containing zlib header files') -shared_optgroup.add_option('--shared-zlib-libname', +shared_optgroup.add_argument('--shared-zlib-libname', action='store', dest='shared_zlib_libname', default='z', - help='alternative lib name to link to [default: %default]') + help='alternative lib name to link to [default: %(default)s]') -shared_optgroup.add_option('--shared-zlib-libpath', +shared_optgroup.add_argument('--shared-zlib-libpath', action='store', dest='shared_zlib_libpath', help='a directory to search for the shared zlib DLL') -shared_optgroup.add_option('--shared-brotli', +shared_optgroup.add_argument('--shared-brotli', action='store_true', dest='shared_brotli', + default=None, help='link to a shared brotli DLL instead of static linking') -shared_optgroup.add_option('--shared-brotli-includes', +shared_optgroup.add_argument('--shared-brotli-includes', action='store', dest='shared_brotli_includes', help='directory containing brotli header files') -shared_optgroup.add_option('--shared-brotli-libname', +shared_optgroup.add_argument('--shared-brotli-libname', action='store', dest='shared_brotli_libname', default='brotlidec,brotlienc', - help='alternative lib name to link to [default: %default]') + help='alternative lib name to link to [default: %(default)s]') -shared_optgroup.add_option('--shared-brotli-libpath', +shared_optgroup.add_argument('--shared-brotli-libpath', action='store', dest='shared_brotli_libpath', help='a directory to search for the shared brotli DLL') -shared_optgroup.add_option('--shared-cares', +shared_optgroup.add_argument('--shared-cares', action='store_true', dest='shared_cares', + default=None, help='link to a shared cares DLL instead of static linking') -shared_optgroup.add_option('--shared-cares-includes', +shared_optgroup.add_argument('--shared-cares-includes', action='store', dest='shared_cares_includes', help='directory containing cares header files') -shared_optgroup.add_option('--shared-cares-libname', +shared_optgroup.add_argument('--shared-cares-libname', action='store', dest='shared_cares_libname', default='cares', - help='alternative lib name to link to [default: %default]') + help='alternative lib name to link to [default: %(default)s]') -shared_optgroup.add_option('--shared-cares-libpath', +shared_optgroup.add_argument('--shared-cares-libpath', action='store', dest='shared_cares_libpath', help='a directory to search for the shared cares DLL') -parser.add_option_group(shared_optgroup) +parser.add_argument_group(shared_optgroup) -parser.add_option('--systemtap-includes', +parser.add_argument('--systemtap-includes', action='store', dest='systemtap_includes', help='directory containing systemtap header files') -parser.add_option('--tag', +parser.add_argument('--tag', action='store', dest='tag', help='custom build tag') -parser.add_option('--release-urlbase', +parser.add_argument('--release-urlbase', action='store', dest='release_urlbase', help='Provide a custom URL prefix for the `process.release` properties ' '`sourceUrl` and `headersUrl`. When compiling a release build, this ' 'will default to https://nodejs.org/download/release/') -parser.add_option('--enable-d8', +parser.add_argument('--enable-d8', action='store_true', dest='enable_d8', - help=optparse.SUPPRESS_HELP) # Unsupported, undocumented. + default=None, + help=argparse.SUPPRESS) # Unsupported, undocumented. -parser.add_option('--enable-trace-maps', +parser.add_argument('--enable-trace-maps', action='store_true', dest='trace_maps', + default=None, help='Enable the --trace-maps flag in V8 (use at your own risk)') -parser.add_option('--experimental-enable-pointer-compression', +parser.add_argument('--experimental-enable-pointer-compression', action='store_true', dest='enable_pointer_compression', + default=None, help='[Experimental] Enable V8 pointer compression (limits max heap to 4GB and breaks ABI compatibility)') -parser.add_option('--v8-options', +parser.add_argument('--v8-options', action='store', dest='v8_options', help='v8 options to pass, see `node --v8-options` for examples.') -parser.add_option('--with-ossfuzz', +parser.add_argument('--with-ossfuzz', action='store_true', dest='ossfuzz', + default=None, help='Enables building of fuzzers. This command should be run in an OSS-Fuzz Docker image.') -parser.add_option('--with-arm-float-abi', +parser.add_argument('--with-arm-float-abi', action='store', dest='arm_float_abi', choices=valid_arm_float_abi, help='specifies which floating-point ABI to use ({0}).'.format( ', '.join(valid_arm_float_abi))) -parser.add_option('--with-arm-fpu', +parser.add_argument('--with-arm-fpu', action='store', dest='arm_fpu', choices=valid_arm_fpu, - help='ARM FPU mode ({0}) [default: %default]'.format( + help='ARM FPU mode ({0}) [default: %(default)s]'.format( ', '.join(valid_arm_fpu))) -parser.add_option('--with-mips-arch-variant', +parser.add_argument('--with-mips-arch-variant', action='store', dest='mips_arch_variant', default='r2', choices=valid_mips_arch, - help='MIPS arch variant ({0}) [default: %default]'.format( + help='MIPS arch variant ({0}) [default: %(default)s]'.format( ', '.join(valid_mips_arch))) -parser.add_option('--with-mips-fpu-mode', +parser.add_argument('--with-mips-fpu-mode', action='store', dest='mips_fpu_mode', default='fp32', choices=valid_mips_fpu, - help='MIPS FPU mode ({0}) [default: %default]'.format( + help='MIPS FPU mode ({0}) [default: %(default)s]'.format( ', '.join(valid_mips_fpu))) -parser.add_option('--with-mips-float-abi', +parser.add_argument('--with-mips-float-abi', action='store', dest='mips_float_abi', default='hard', choices=valid_mips_float_abi, - help='MIPS floating-point ABI ({0}) [default: %default]'.format( + help='MIPS floating-point ABI ({0}) [default: %(default)s]'.format( ', '.join(valid_mips_float_abi))) -parser.add_option('--with-dtrace', +parser.add_argument('--with-dtrace', action='store_true', dest='with_dtrace', + default=None, help='build with DTrace (default is true on sunos and darwin)') -parser.add_option('--with-etw', +parser.add_argument('--with-etw', action='store_true', dest='with_etw', + default=None, help='build with ETW (default is true on Windows)') -parser.add_option('--use-largepages', +parser.add_argument('--use-largepages', action='store_true', dest='node_use_large_pages', + default=None, help='This option has no effect. --use-largepages is now a runtime option.') -parser.add_option('--use-largepages-script-lld', +parser.add_argument('--use-largepages-script-lld', action='store_true', dest='node_use_large_pages_script_lld', + default=None, help='This option has no effect. --use-largepages is now a runtime option.') -parser.add_option('--use-section-ordering-file', +parser.add_argument('--use-section-ordering-file', action='store', dest='node_section_ordering_info', default='', @@ -506,42 +539,42 @@ 'Node.js be linked using the gold linker. The gold linker must have ' + 'version 1.2 or greater.') -intl_optgroup.add_option('--with-intl', +intl_optgroup.add_argument('--with-intl', action='store', dest='with_intl', default='full-icu', choices=valid_intl_modes, - help='Intl mode (valid choices: {0}) [default: %default]'.format( + help='Intl mode (valid choices: {0}) [default: %(default)s]'.format( ', '.join(valid_intl_modes))) -intl_optgroup.add_option('--without-intl', +intl_optgroup.add_argument('--without-intl', action='store_const', dest='with_intl', const='none', help='Disable Intl, same as --with-intl=none (disables inspector)') -intl_optgroup.add_option('--with-icu-path', +intl_optgroup.add_argument('--with-icu-path', action='store', dest='with_icu_path', help='Path to icu.gyp (ICU i18n, Chromium version only.)') icu_default_locales='root,en' -intl_optgroup.add_option('--with-icu-locales', +intl_optgroup.add_argument('--with-icu-locales', action='store', dest='with_icu_locales', default=icu_default_locales, help='Comma-separated list of locales for "small-icu". "root" is assumed. ' - '[default: %default]') + '[default: %(default)s]') -intl_optgroup.add_option('--with-icu-source', +intl_optgroup.add_argument('--with-icu-source', action='store', dest='with_icu_source', help='Intl mode: optional local path to icu/ dir, or path/URL of ' 'the icu4c source archive. ' 'v%d.x or later recommended.' % icu_versions['minimum_icu']) -intl_optgroup.add_option('--with-icu-default-data-dir', +intl_optgroup.add_argument('--with-icu-default-data-dir', action='store', dest='with_icu_default_data_dir', help='Path to the icuXXdt{lb}.dat file. If unspecified, ICU data will ' @@ -549,159 +582,179 @@ '--icu-data-dir runtime argument is used. This option has effect ' 'only when Node.js is built with --with-intl=small-icu.') -parser.add_option('--with-ltcg', +parser.add_argument('--with-ltcg', action='store_true', dest='with_ltcg', + default=None, help='Use Link Time Code Generation. This feature is only available on Windows.') -parser.add_option('--without-node-snapshot', +parser.add_argument('--without-node-snapshot', action='store_true', dest='without_node_snapshot', + default=None, help='Turn off V8 snapshot integration. Currently experimental.') -parser.add_option('--without-node-code-cache', +parser.add_argument('--without-node-code-cache', action='store_true', dest='without_node_code_cache', + default=None, help='Turn off V8 Code cache integration.') -intl_optgroup.add_option('--download', +intl_optgroup.add_argument('--download', action='store', dest='download_list', help=nodedownload.help()) -intl_optgroup.add_option('--download-path', +intl_optgroup.add_argument('--download-path', action='store', dest='download_path', default='deps', - help='Download directory [default: %default]') + help='Download directory [default: %(default)s]') -parser.add_option_group(intl_optgroup) +parser.add_argument_group(intl_optgroup) -parser.add_option('--debug-lib', +parser.add_argument('--debug-lib', action='store_true', dest='node_debug_lib', + default=None, help='build lib with DCHECK macros') -http2_optgroup.add_option('--debug-nghttp2', +http2_optgroup.add_argument('--debug-nghttp2', action='store_true', dest='debug_nghttp2', + default=None, help='build nghttp2 with DEBUGBUILD (default is false)') -parser.add_option_group(http2_optgroup) +parser.add_argument_group(http2_optgroup) -parser.add_option('--without-dtrace', +parser.add_argument('--without-dtrace', action='store_true', dest='without_dtrace', + default=None, help='build without DTrace') -parser.add_option('--without-etw', +parser.add_argument('--without-etw', action='store_true', dest='without_etw', + default=None, help='build without ETW') -parser.add_option('--without-npm', +parser.add_argument('--without-npm', action='store_true', dest='without_npm', + default=None, help='do not install the bundled npm (package manager)') # Dummy option for backwards compatibility -parser.add_option('--without-report', +parser.add_argument('--without-report', action='store_true', dest='unused_without_report', - help=optparse.SUPPRESS_HELP) + default=None, + help=argparse.SUPPRESS) -parser.add_option('--with-snapshot', +parser.add_argument('--with-snapshot', action='store_true', dest='unused_with_snapshot', - help=optparse.SUPPRESS_HELP) + default=None, + help=argparse.SUPPRESS) -parser.add_option('--without-snapshot', +parser.add_argument('--without-snapshot', action='store_true', dest='unused_without_snapshot', - help=optparse.SUPPRESS_HELP) + default=None, + help=argparse.SUPPRESS) -parser.add_option('--without-siphash', +parser.add_argument('--without-siphash', action='store_true', dest='without_siphash', - help=optparse.SUPPRESS_HELP) + default=None, + help=argparse.SUPPRESS) # End dummy list. -parser.add_option('--without-ssl', +parser.add_argument('--without-ssl', action='store_true', dest='without_ssl', + default=None, help='build without SSL (disables crypto, https, inspector, etc.)') -parser.add_option('--without-node-options', +parser.add_argument('--without-node-options', action='store_true', dest='without_node_options', + default=None, help='build without NODE_OPTIONS support') -parser.add_option('--ninja', +parser.add_argument('--ninja', action='store_true', dest='use_ninja', + default=None, help='generate build files for use with Ninja') -parser.add_option('--enable-asan', +parser.add_argument('--enable-asan', action='store_true', dest='enable_asan', + default=None, help='compile for Address Sanitizer to find memory bugs') -parser.add_option('--enable-static', +parser.add_argument('--enable-static', action='store_true', dest='enable_static', + default=None, help='build as static library') -parser.add_option('--no-browser-globals', +parser.add_argument('--no-browser-globals', action='store_true', dest='no_browser_globals', + default=None, help='do not export browser globals like setTimeout, console, etc. ' + '(This mode is not officially supported for regular applications)') -parser.add_option('--without-inspector', +parser.add_argument('--without-inspector', action='store_true', dest='without_inspector', + default=None, help='disable the V8 inspector protocol') -parser.add_option('--shared', +parser.add_argument('--shared', action='store_true', dest='shared', + default=None, help='compile shared library for embedding node in another project. ' + '(This mode is not officially supported for regular applications)') -parser.add_option('--without-v8-platform', +parser.add_argument('--without-v8-platform', action='store_true', dest='without_v8_platform', default=False, help='do not initialize v8 platform during node.js startup. ' + '(This mode is not officially supported for regular applications)') -parser.add_option('--without-bundled-v8', +parser.add_argument('--without-bundled-v8', action='store_true', dest='without_bundled_v8', default=False, help='do not use V8 includes from the bundled deps folder. ' + '(This mode is not officially supported for regular applications)') -parser.add_option('--verbose', +parser.add_argument('--verbose', action='store_true', dest='verbose', default=False, help='get more output from this script') -parser.add_option('--v8-non-optimized-debug', +parser.add_argument('--v8-non-optimized-debug', action='store_true', dest='v8_non_optimized_debug', default=False, help='compile V8 with minimal optimizations and with runtime checks') -parser.add_option('--v8-with-dchecks', +parser.add_argument('--v8-with-dchecks', action='store_true', dest='v8_with_dchecks', default=False, help='compile V8 with debug checks and runtime debugging features enabled') -parser.add_option('--v8-lite-mode', +parser.add_argument('--v8-lite-mode', action='store_true', dest='v8_lite_mode', default=False, @@ -709,25 +762,26 @@ 'memory footprint, but also implies no just-in-time compilation ' + 'support, thus much slower execution)') -parser.add_option('--v8-enable-object-print', +parser.add_argument('--v8-enable-object-print', action='store_true', dest='v8_enable_object_print', default=True, help='compile V8 with auxiliar functions for native debuggers') -parser.add_option('--node-builtin-modules-path', +parser.add_argument('--node-builtin-modules-path', action='store', dest='node_builtin_modules_path', default=False, help='node will load builtin modules from disk instead of from binary') # Create compile_commands.json in out/Debug and out/Release. -parser.add_option('-C', +parser.add_argument('-C', action='store_true', dest='compile_commands_json', - help=optparse.SUPPRESS_HELP) + default=None, + help=argparse.SUPPRESS) -(options, args) = parser.parse_args() +(options, args) = parser.parse_known_args() # Expand ~ in the install prefix now, it gets written to multiple files. options.prefix = os.path.expanduser(options.prefix or '') @@ -894,7 +948,7 @@ def get_gas_version(cc): # Note: Apple clang self-reports as clang 4.2.0 and gcc 4.2.1. It passes # the version check more by accident than anything else but a more rigorous -# check involves checking the build number against a whitelist. I'm not +# check involves checking the build number against an allowlist. I'm not # quite prepared to go that far yet. def check_compiler(o): if sys.platform == 'win32': @@ -1293,8 +1347,7 @@ def configure_library(lib, output, pkgname=None): output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib)) if getattr(options, shared_lib): - (pkg_libs, pkg_cflags, pkg_libpath, pkg_modversion) = ( - pkg_config(pkgname or lib)) + (pkg_libs, pkg_cflags, pkg_libpath, _) = pkg_config(pkgname or lib) if options.__dict__[shared_lib + '_includes']: output['include_dirs'] += [options.__dict__[shared_lib + '_includes']] @@ -1493,8 +1546,6 @@ def icu_download(path): 'variables': {} } icu_config_name = 'icu_config.gypi' - def write_config(data, name): - return # write an empty file to start with write(icu_config_name, do_not_edit + @@ -1761,7 +1812,8 @@ def configure_section_file(o): proc = subprocess.Popen(['ld.gold'] + ['-v'], stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE) except OSError: - warn('''No acceptable ld.gold linker found!''') + if options.node_section_ordering_info != "": + warn('''No acceptable ld.gold linker found!''') return 0 match = re.match(r"^GNU gold.*([0-9]+)\.([0-9]+)$", diff --git a/deps/acorn-plugins/acorn-numeric-separator/CHANGELOG.md b/deps/acorn-plugins/acorn-numeric-separator/CHANGELOG.md deleted file mode 100644 index dfe8e3ea9dedb8..00000000000000 --- a/deps/acorn-plugins/acorn-numeric-separator/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -## 0.3.0 (2019-04-04) - -* Make compatible with acorn-bigint - -## 0.2.0 (2018-09-14) - -* Update to new acorn 6 interface -* Change license to MIT - -## 0.1.1 (2018-01-16) - -* Don't bail on empty integers as in `1.` - -## 0.1.0 (2017-12-19) - -Initial release diff --git a/deps/acorn-plugins/acorn-numeric-separator/LICENSE b/deps/acorn-plugins/acorn-numeric-separator/LICENSE deleted file mode 100644 index 7c2b27a19c033c..00000000000000 --- a/deps/acorn-plugins/acorn-numeric-separator/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2017-2018 by Adrian Heine - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/deps/acorn-plugins/acorn-numeric-separator/README.md b/deps/acorn-plugins/acorn-numeric-separator/README.md deleted file mode 100644 index 27188572d1bf40..00000000000000 --- a/deps/acorn-plugins/acorn-numeric-separator/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Numeric separator support for Acorn - -[![NPM version](https://img.shields.io/npm/v/acorn-numeric-separator.svg)](https://www.npmjs.org/package/acorn-numeric-separator) - -This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript. - -It implements support for numeric separators as defined in the stage 3 proposal [Numeric Separators](https://github.com/tc39/proposal-numeric-separator). - -## Usage - -This module provides a plugin that can be used to extend the Acorn `Parser` class to parse numeric separators: - -```javascript -var acorn = require('acorn'); -var numericSeparator = require('acorn-numeric-separator'); -acorn.Parser.extend(numericSeparator).parse('100_000'); -``` - -## License - -This plugin is released under an [MIT License](./LICENSE). diff --git a/deps/acorn-plugins/acorn-numeric-separator/index.js b/deps/acorn-plugins/acorn-numeric-separator/index.js deleted file mode 100644 index 52f207cfd8d454..00000000000000 --- a/deps/acorn-plugins/acorn-numeric-separator/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict" - -module.exports = function(Parser) { - return class extends Parser { - readInt(radix, len) { - // Hack: len is only != null for unicode escape sequences, - // where numeric separators are not allowed - if (len != null) return super.readInt(radix, len) - - let start = this.pos, total = 0, acceptUnderscore = false - for (;;) { - let code = this.input.charCodeAt(this.pos), val - if (code >= 97) val = code - 97 + 10 // a - else if (code == 95) { - if (!acceptUnderscore) this.raise(this.pos, "Invalid numeric separator") - ++this.pos - acceptUnderscore = false - continue - } else if (code >= 65) val = code - 65 + 10 // A - else if (code >= 48 && code <= 57) val = code - 48 // 0-9 - else val = Infinity - if (val >= radix) break - ++this.pos - total = total * radix + val - acceptUnderscore = true - } - if (this.pos === start) return null - if (!acceptUnderscore) this.raise(this.pos - 1, "Invalid numeric separator") - - return total - } - - readNumber(startsWithDot) { - const token = super.readNumber(startsWithDot) - let octal = this.end - this.start >= 2 && this.input.charCodeAt(this.start) === 48 - const stripped = this.getNumberInput(this.start, this.end) - if (stripped.length < this.end - this.start) { - if (octal) this.raise(this.start, "Invalid number") - this.value = parseFloat(stripped) - } - return token - } - - // This is used by acorn-bigint - getNumberInput(start, end) { - return this.input.slice(start, end).replace(/_/g, "") - } - } -} diff --git a/deps/acorn-plugins/acorn-numeric-separator/package.json b/deps/acorn-plugins/acorn-numeric-separator/package.json deleted file mode 100644 index cc0c52a65d2dfe..00000000000000 --- a/deps/acorn-plugins/acorn-numeric-separator/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "acorn-numeric-separator", - "description": "Support for numeric separators in acorn", - "homepage": "https://github.com/acornjs/acorn-numeric-separator", - "contributors": [ - "Adrian Heine " - ], - "engines": { - "node": ">=4.8.2" - }, - "repository": { - "type": "git", - "url": "https://github.com/acornjs/acorn-numeric-separator" - }, - "license": "MIT", - "scripts": { - "test": "mocha", - "test:test262": "node run_test262.js", - "lint": "eslint -c .eslintrc.json ." - }, - "peerDependencies": { - "acorn": "^6.0.0" - }, - "version": "0.3.0", - "devDependencies": { - "acorn": "^6.0.0", - "eslint": "^5.5.0", - "eslint-plugin-node": "^8.0.1", - "mocha": "^6.0.2", - "test262": "git+https://github.com/tc39/test262.git#de567d3aa5de4eaa11e00131d26b9fe77997dfb0", - "test262-parser-runner": "^0.5.0" - } -} \ No newline at end of file diff --git a/deps/acorn/acorn-walk/CHANGELOG.md b/deps/acorn/acorn-walk/CHANGELOG.md index 89114970bbeae4..204e04b33974e2 100644 --- a/deps/acorn/acorn-walk/CHANGELOG.md +++ b/deps/acorn/acorn-walk/CHANGELOG.md @@ -1,3 +1,19 @@ +## 8.0.0 (2020-08-12) + +### New features + +The package can now be loaded directly as an ECMAScript module in node 13+. + +## 7.2.0 (2020-06-17) + +### New features + +Support optional chaining and nullish coalescing. + +Support `import.meta`. + +Add support for `export * as ns from "source"`. + ## 7.1.1 (2020-02-13) ### Bug fixes diff --git a/deps/acorn/acorn-walk/LICENSE b/deps/acorn/acorn-walk/LICENSE index 2c0632b6a7c63b..cc5272c966db45 100644 --- a/deps/acorn/acorn-walk/LICENSE +++ b/deps/acorn/acorn-walk/LICENSE @@ -1,3 +1,5 @@ +MIT License + Copyright (C) 2012-2018 by various contributors (see AUTHORS) Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/deps/acorn/acorn-walk/dist/walk.d.ts b/deps/acorn/acorn-walk/dist/walk.d.ts new file mode 100644 index 00000000000000..00cc005f1245c5 --- /dev/null +++ b/deps/acorn/acorn-walk/dist/walk.d.ts @@ -0,0 +1,112 @@ +import {Node} from 'acorn'; + +declare module "acorn-walk" { + type FullWalkerCallback = ( + node: Node, + state: TState, + type: string + ) => void; + + type FullAncestorWalkerCallback = ( + node: Node, + state: TState | Node[], + ancestors: Node[], + type: string + ) => void; + type WalkerCallback = (node: Node, state: TState) => void; + + type SimpleWalkerFn = ( + node: Node, + state: TState + ) => void; + + type AncestorWalkerFn = ( + node: Node, + state: TState| Node[], + ancestors: Node[] + ) => void; + + type RecursiveWalkerFn = ( + node: Node, + state: TState, + callback: WalkerCallback + ) => void; + + type SimpleVisitors = { + [type: string]: SimpleWalkerFn + }; + + type AncestorVisitors = { + [type: string]: AncestorWalkerFn + }; + + type RecursiveVisitors = { + [type: string]: RecursiveWalkerFn + }; + + type FindPredicate = (type: string, node: Node) => boolean; + + interface Found { + node: Node, + state: TState + } + + export function simple( + node: Node, + visitors: SimpleVisitors, + base?: RecursiveVisitors, + state?: TState + ): void; + + export function ancestor( + node: Node, + visitors: AncestorVisitors, + base?: RecursiveVisitors, + state?: TState + ): void; + + export function recursive( + node: Node, + state: TState, + functions: RecursiveVisitors, + base?: RecursiveVisitors + ): void; + + export function full( + node: Node, + callback: FullWalkerCallback, + base?: RecursiveVisitors, + state?: TState + ): void; + + export function fullAncestor( + node: Node, + callback: FullAncestorWalkerCallback, + base?: RecursiveVisitors, + state?: TState + ): void; + + export function make( + functions: RecursiveVisitors, + base?: RecursiveVisitors + ): RecursiveVisitors; + + export function findNodeAt( + node: Node, + start: number | undefined, + end?: number | undefined, + type?: FindPredicate | string, + base?: RecursiveVisitors, + state?: TState + ): Found | undefined; + + export function findNodeAround( + node: Node, + start: number | undefined, + type?: FindPredicate | string, + base?: RecursiveVisitors, + state?: TState + ): Found | undefined; + + export const findNodeAfter: typeof findNodeAround; +} diff --git a/deps/acorn/acorn-walk/dist/walk.js b/deps/acorn/acorn-walk/dist/walk.js index 7aaab9ce824f60..17da67c61171f1 100644 --- a/deps/acorn/acorn-walk/dist/walk.js +++ b/deps/acorn/acorn-walk/dist/walk.js @@ -2,7 +2,7 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = global || self, factory((global.acorn = global.acorn || {}, global.acorn.walk = {}))); -}(this, function (exports) { 'use strict'; +}(this, (function (exports) { 'use strict'; // AST walker module for Mozilla Parser API compatible trees @@ -200,7 +200,7 @@ }; base.Statement = skipThrough; base.EmptyStatement = ignore; - base.ExpressionStatement = base.ParenthesizedExpression = + base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression = function (node, st, c) { return c(node.expression, st, "Expression"); }; base.IfStatement = function (node, st, c) { c(node.test, st, "Expression"); @@ -405,6 +405,8 @@ if (node.source) { c(node.source, st, "Expression"); } }; base.ExportAllDeclaration = function (node, st, c) { + if (node.exported) + { c(node.exported, st); } c(node.source, st, "Expression"); }; base.ImportDeclaration = function (node, st, c) { @@ -458,4 +460,4 @@ Object.defineProperty(exports, '__esModule', { value: true }); -})); +}))); diff --git a/deps/acorn/acorn-walk/dist/walk.js.map b/deps/acorn/acorn-walk/dist/walk.js.map new file mode 100644 index 00000000000000..5590a2924f2de6 --- /dev/null +++ b/deps/acorn/acorn-walk/dist/walk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"walk.js","sources":["../src/index.js"],"sourcesContent":["// AST walker module for Mozilla Parser API compatible trees\n\n// A simple walk is one where you simply specify callbacks to be\n// called on specific nodes. The last two arguments are optional. A\n// simple use would be\n//\n// walk.simple(myTree, {\n// Expression: function(node) { ... }\n// });\n//\n// to do something with all expressions. All Parser API node types\n// can be used to identify node types, as well as Expression and\n// Statement, which denote categories of nodes.\n//\n// The base argument can be used to pass a custom (recursive)\n// walker, and state can be used to give this walked an initial\n// state.\n\nexport function simple(node, visitors, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n baseVisitor[type](node, st, c)\n if (found) found(node, st)\n })(node, state, override)\n}\n\n// An ancestor walk keeps an array of ancestor nodes (including the\n// current node) and passes them to the callback as third parameter\n// (and also as state parameter when no other state is present).\nexport function ancestor(node, visitors, baseVisitor, state) {\n let ancestors = []\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (found) found(node, st || ancestors, ancestors)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// A recursive walk is one where your functions override the default\n// walkers. They can modify and replace the state parameter that's\n// threaded through the walk, and can opt how and whether to walk\n// their child nodes (by calling their third argument on these\n// nodes).\nexport function recursive(node, state, funcs, baseVisitor, override) {\n let visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor\n ;(function c(node, st, override) {\n visitor[override || node.type](node, st, c)\n })(node, state, override)\n}\n\nfunction makeTest(test) {\n if (typeof test === \"string\")\n return type => type === test\n else if (!test)\n return () => true\n else\n return test\n}\n\nclass Found {\n constructor(node, state) { this.node = node; this.state = state }\n}\n\n// A full walk triggers the callback on each node\nexport function full(node, callback, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st, type)\n })(node, state, override)\n}\n\n// An fullAncestor walk is like an ancestor walk, but triggers\n// the callback on each node\nexport function fullAncestor(node, callback, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n let ancestors = []\n ;(function c(node, st, override) {\n let type = override || node.type\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st || ancestors, ancestors, type)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// Find a node with a given start, end, and type (all are optional,\n// null can be used as wildcard). Returns a {node, state} object, or\n// undefined when it doesn't find a matching node.\nexport function findNodeAt(node, start, end, test, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n test = makeTest(test)\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if ((start == null || node.start <= start) &&\n (end == null || node.end >= end))\n baseVisitor[type](node, st, c)\n if ((start == null || node.start === start) &&\n (end == null || node.end === end) &&\n test(type, node))\n throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the innermost node of a given type that contains the given\n// position. Interface similar to findNodeAt.\nexport function findNodeAround(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if (node.start > pos || node.end < pos) return\n baseVisitor[type](node, st, c)\n if (test(type, node)) throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node after a given position.\nexport function findNodeAfter(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n if (node.end < pos) return\n let type = override || node.type\n if (node.start >= pos && test(type, node)) throw new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node before a given position.\nexport function findNodeBefore(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n let max\n ;(function c(node, st, override) {\n if (node.start > pos) return\n let type = override || node.type\n if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))\n max = new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n return max\n}\n\n// Fallback to an Object.create polyfill for older environments.\nconst create = Object.create || function(proto) {\n function Ctor() {}\n Ctor.prototype = proto\n return new Ctor\n}\n\n// Used to create a custom walker. Will fill in all missing node\n// type properties with the defaults.\nexport function make(funcs, baseVisitor) {\n let visitor = create(baseVisitor || base)\n for (let type in funcs) visitor[type] = funcs[type]\n return visitor\n}\n\nfunction skipThrough(node, st, c) { c(node, st) }\nfunction ignore(_node, _st, _c) {}\n\n// Node walkers.\n\nexport const base = {}\n\nbase.Program = base.BlockStatement = (node, st, c) => {\n for (let stmt of node.body)\n c(stmt, st, \"Statement\")\n}\nbase.Statement = skipThrough\nbase.EmptyStatement = ignore\nbase.ExpressionStatement = base.ParenthesizedExpression =\n (node, st, c) => c(node.expression, st, \"Expression\")\nbase.IfStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Statement\")\n if (node.alternate) c(node.alternate, st, \"Statement\")\n}\nbase.LabeledStatement = (node, st, c) => c(node.body, st, \"Statement\")\nbase.BreakStatement = base.ContinueStatement = ignore\nbase.WithStatement = (node, st, c) => {\n c(node.object, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.SwitchStatement = (node, st, c) => {\n c(node.discriminant, st, \"Expression\")\n for (let cs of node.cases) {\n if (cs.test) c(cs.test, st, \"Expression\")\n for (let cons of cs.consequent)\n c(cons, st, \"Statement\")\n }\n}\nbase.SwitchCase = (node, st, c) => {\n if (node.test) c(node.test, st, \"Expression\")\n for (let cons of node.consequent)\n c(cons, st, \"Statement\")\n}\nbase.ReturnStatement = base.YieldExpression = base.AwaitExpression = (node, st, c) => {\n if (node.argument) c(node.argument, st, \"Expression\")\n}\nbase.ThrowStatement = base.SpreadElement =\n (node, st, c) => c(node.argument, st, \"Expression\")\nbase.TryStatement = (node, st, c) => {\n c(node.block, st, \"Statement\")\n if (node.handler) c(node.handler, st)\n if (node.finalizer) c(node.finalizer, st, \"Statement\")\n}\nbase.CatchClause = (node, st, c) => {\n if (node.param) c(node.param, st, \"Pattern\")\n c(node.body, st, \"Statement\")\n}\nbase.WhileStatement = base.DoWhileStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForStatement = (node, st, c) => {\n if (node.init) c(node.init, st, \"ForInit\")\n if (node.test) c(node.test, st, \"Expression\")\n if (node.update) c(node.update, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInStatement = base.ForOfStatement = (node, st, c) => {\n c(node.left, st, \"ForInit\")\n c(node.right, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInit = (node, st, c) => {\n if (node.type === \"VariableDeclaration\") c(node, st)\n else c(node, st, \"Expression\")\n}\nbase.DebuggerStatement = ignore\n\nbase.FunctionDeclaration = (node, st, c) => c(node, st, \"Function\")\nbase.VariableDeclaration = (node, st, c) => {\n for (let decl of node.declarations)\n c(decl, st)\n}\nbase.VariableDeclarator = (node, st, c) => {\n c(node.id, st, \"Pattern\")\n if (node.init) c(node.init, st, \"Expression\")\n}\n\nbase.Function = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n for (let param of node.params)\n c(param, st, \"Pattern\")\n c(node.body, st, node.expression ? \"Expression\" : \"Statement\")\n}\n\nbase.Pattern = (node, st, c) => {\n if (node.type === \"Identifier\")\n c(node, st, \"VariablePattern\")\n else if (node.type === \"MemberExpression\")\n c(node, st, \"MemberPattern\")\n else\n c(node, st)\n}\nbase.VariablePattern = ignore\nbase.MemberPattern = skipThrough\nbase.RestElement = (node, st, c) => c(node.argument, st, \"Pattern\")\nbase.ArrayPattern = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Pattern\")\n }\n}\nbase.ObjectPattern = (node, st, c) => {\n for (let prop of node.properties) {\n if (prop.type === \"Property\") {\n if (prop.computed) c(prop.key, st, \"Expression\")\n c(prop.value, st, \"Pattern\")\n } else if (prop.type === \"RestElement\") {\n c(prop.argument, st, \"Pattern\")\n }\n }\n}\n\nbase.Expression = skipThrough\nbase.ThisExpression = base.Super = base.MetaProperty = ignore\nbase.ArrayExpression = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Expression\")\n }\n}\nbase.ObjectExpression = (node, st, c) => {\n for (let prop of node.properties)\n c(prop, st)\n}\nbase.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration\nbase.SequenceExpression = (node, st, c) => {\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateLiteral = (node, st, c) => {\n for (let quasi of node.quasis)\n c(quasi, st)\n\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateElement = ignore\nbase.UnaryExpression = base.UpdateExpression = (node, st, c) => {\n c(node.argument, st, \"Expression\")\n}\nbase.BinaryExpression = base.LogicalExpression = (node, st, c) => {\n c(node.left, st, \"Expression\")\n c(node.right, st, \"Expression\")\n}\nbase.AssignmentExpression = base.AssignmentPattern = (node, st, c) => {\n c(node.left, st, \"Pattern\")\n c(node.right, st, \"Expression\")\n}\nbase.ConditionalExpression = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Expression\")\n c(node.alternate, st, \"Expression\")\n}\nbase.NewExpression = base.CallExpression = (node, st, c) => {\n c(node.callee, st, \"Expression\")\n if (node.arguments)\n for (let arg of node.arguments)\n c(arg, st, \"Expression\")\n}\nbase.MemberExpression = (node, st, c) => {\n c(node.object, st, \"Expression\")\n if (node.computed) c(node.property, st, \"Expression\")\n}\nbase.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => {\n if (node.declaration)\n c(node.declaration, st, node.type === \"ExportNamedDeclaration\" || node.declaration.id ? \"Statement\" : \"Expression\")\n if (node.source) c(node.source, st, \"Expression\")\n}\nbase.ExportAllDeclaration = (node, st, c) => {\n c(node.source, st, \"Expression\")\n}\nbase.ImportDeclaration = (node, st, c) => {\n for (let spec of node.specifiers)\n c(spec, st)\n c(node.source, st, \"Expression\")\n}\nbase.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore\n\nbase.TaggedTemplateExpression = (node, st, c) => {\n c(node.tag, st, \"Expression\")\n c(node.quasi, st, \"Expression\")\n}\nbase.ClassDeclaration = base.ClassExpression = (node, st, c) => c(node, st, \"Class\")\nbase.Class = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n if (node.superClass) c(node.superClass, st, \"Expression\")\n c(node.body, st)\n}\nbase.ClassBody = (node, st, c) => {\n for (let elt of node.body)\n c(elt, st)\n}\nbase.MethodDefinition = base.Property = (node, st, c) => {\n if (node.computed) c(node.key, st, \"Expression\")\n c(node.value, st, \"Expression\")\n}\n"],"names":["let","const"],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;AAkBA,AAAO,SAAS,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACnE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxD,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;;AAKD,AAAO,SAAS,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC3DA,IAAI,SAAS,GAAG,GAAE;EAClB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxDA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAC,EAAA;IAClD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;;;AAOD,AAAO,SAAS,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE;EACnEA,IAAI,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,IAAI,SAAS,CAAC,GAAG,WAAW,CACxE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC5C,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;AAED,SAAS,QAAQ,CAAC,IAAI,EAAE;EACtB,IAAI,OAAO,IAAI,KAAK,QAAQ;IAC1B,EAAA,OAAO,UAAA,IAAI,EAAC,SAAG,IAAI,KAAK,IAAI,GAAA,EAAA;OACzB,IAAI,CAAC,IAAI;IACZ,EAAA,OAAO,YAAG,SAAG,IAAI,GAAA,EAAA;;IAEjB,EAAA,OAAO,IAAI,EAAA;CACd;;AAED,IAAM,KAAK,GAAC,cACC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,MAAK,EAAE,CAAA;;;AAInE,AAAO,SAAS,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACjE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAC,EAAA;GACxC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;AAID,AAAO,SAAS,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC/D,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,SAAS,GAAG,EAAE,CACjB,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChCA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,EAAA;IAC/D,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;AAKD,AAAO,SAAS,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACrE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK;WACpC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC;QAClC,EAAA,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC,EAAA;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK;WACrC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC;UACjC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;QAClB,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAC5B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;;AAID,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC9C,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;MAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAChD,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACjE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9B,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC1BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;MACpE,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;KAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,GAAG,CACN,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;IAC5BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;MAC1E,EAAA,GAAG,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;IAC3B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;EACf,OAAO,GAAG;CACX;;;AAGDC,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,KAAK,EAAE;EAC9C,SAAS,IAAI,GAAG,EAAE;EAClB,IAAI,CAAC,SAAS,GAAG,MAAK;EACtB,OAAO,IAAI,IAAI;EAChB;;;;AAID,AAAO,SAAS,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;EACvCD,IAAI,OAAO,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAC;EACzC,KAAKA,IAAI,IAAI,IAAI,KAAK,EAAE,EAAA,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAC,EAAA;EACnD,OAAO,OAAO;CACf;;AAED,SAAS,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAE;AACjD,SAAS,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;;;;AAIlC,AAAOC,IAAM,IAAI,GAAG,GAAE;;AAEtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjD,KAAa,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAArB;IAAAD,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,SAAS,GAAG,YAAW;AAC5B,IAAI,CAAC,cAAc,GAAG,OAAM;AAC5B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,uBAAuB;EACrD,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACvD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,WAAW,EAAC;EACnC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,CAAC,IAAA;AACtE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,GAAG,OAAM;AACrD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,YAAY,EAAC;EACtC,KAAW,kBAAI,IAAI,CAAC,KAAK,yBAAA,EAAE;IAAtBA,IAAI,EAAE;;IACT,IAAI,EAAE,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;IACzC,KAAa,sBAAI,EAAE,CAAC,UAAU,+BAAA;MAAzB;MAAAA,IAAI,IAAI;;MACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;KAAA;GAC3B;EACF;AACD,IAAI,CAAC,UAAU,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjF,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa;EACtC,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACrD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B,IAAI,IAAI,CAAC,OAAO,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAC,EAAA;EACrC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,IAAI,IAAI,CAAC,KAAK,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC5C,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC1C,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACjD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,qBAAqB,EAAE,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;OAC/C,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC/B;AACD,IAAI,CAAC,iBAAiB,GAAG,OAAM;;AAE/B,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,IAAA;AACnE,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvC,KAAa,kBAAI,IAAI,CAAC,YAAY,yBAAA;IAA7B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC;EACzB,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC9C;;AAED,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5B,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;GAAA;EACzB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,GAAG,YAAY,GAAG,WAAW,EAAC;EAC/D;;AAED,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;IAC5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,iBAAiB,EAAC,EAAA;OAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB;IACvC,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,eAAe,EAAC,EAAA;;IAE5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;EACd;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,aAAa,GAAG,YAAW;AAChC,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,CAAC,IAAA;AACnE,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;GAC/B;EACF;AACD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA,EAAE;IAA7BA,IAAI,IAAI;;IACX,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE;MAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;MAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;KAC7B,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE;MACtC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAC;KAChC;GACF;EACF;;AAED,IAAI,CAAC,UAAU,GAAG,YAAW;AAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,OAAM;AAC7D,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;GAClC;EACF;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,oBAAmB;AACjF,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,KAAa,kBAAI,IAAI,CAAC,WAAW,yBAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAC;GAAA;;EAEd,KAAa,sBAAI,IAAI,CAAC,WAAW,+BAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3D,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC;EACnC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,qBAAqB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC;AACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvD,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,SAAS;IAChB,EAAA,KAAY,kBAAI,IAAI,CAAC,SAAS,yBAAA;MAAzB;QAAAA,IAAI,GAAG;;QACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;OAAA,EAAA;EAC7B;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1E,IAAI,IAAI,CAAC,WAAW;IAClB,EAAA,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,KAAK,wBAAwB,IAAI,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,GAAG,YAAY,EAAC,EAAA;EACrH,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAClD;AACD,IAAI,CAAC,oBAAoB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACrC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACb,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,OAAM;;AAE5H,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5C,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;EAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,IAAA;AACpF,IAAI,CAAC,KAAK,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzB,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,IAAI,IAAI,CAAC,UAAU,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACzD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAC;EACjB;AACD,IAAI,CAAC,SAAS,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7B,KAAY,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAApB;IAAAA,IAAI,GAAG;;IACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAC;GAAA;EACb;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpD,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;CAChC;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/deps/acorn/acorn-walk/dist/walk.mjs b/deps/acorn/acorn-walk/dist/walk.mjs new file mode 100644 index 00000000000000..a7fcec855e12e7 --- /dev/null +++ b/deps/acorn/acorn-walk/dist/walk.mjs @@ -0,0 +1,443 @@ +// AST walker module for Mozilla Parser API compatible trees + +// A simple walk is one where you simply specify callbacks to be +// called on specific nodes. The last two arguments are optional. A +// simple use would be +// +// walk.simple(myTree, { +// Expression: function(node) { ... } +// }); +// +// to do something with all expressions. All Parser API node types +// can be used to identify node types, as well as Expression and +// Statement, which denote categories of nodes. +// +// The base argument can be used to pass a custom (recursive) +// walker, and state can be used to give this walked an initial +// state. + +function simple(node, visitors, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type, found = visitors[type]; + baseVisitor[type](node, st, c); + if (found) { found(node, st); } + })(node, state, override); +} + +// An ancestor walk keeps an array of ancestor nodes (including the +// current node) and passes them to the callback as third parameter +// (and also as state parameter when no other state is present). +function ancestor(node, visitors, baseVisitor, state, override) { + var ancestors = []; + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type, found = visitors[type]; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (found) { found(node, st || ancestors, ancestors); } + if (isNew) { ancestors.pop(); } + })(node, state, override); +} + +// A recursive walk is one where your functions override the default +// walkers. They can modify and replace the state parameter that's +// threaded through the walk, and can opt how and whether to walk +// their child nodes (by calling their third argument on these +// nodes). +function recursive(node, state, funcs, baseVisitor, override) { + var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor + ;(function c(node, st, override) { + visitor[override || node.type](node, st, c); + })(node, state, override); +} + +function makeTest(test) { + if (typeof test === "string") + { return function (type) { return type === test; } } + else if (!test) + { return function () { return true; } } + else + { return test } +} + +var Found = function Found(node, state) { this.node = node; this.state = state; }; + +// A full walk triggers the callback on each node +function full(node, callback, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type; + baseVisitor[type](node, st, c); + if (!override) { callback(node, st, type); } + })(node, state, override); +} + +// An fullAncestor walk is like an ancestor walk, but triggers +// the callback on each node +function fullAncestor(node, callback, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + var ancestors = [] + ;(function c(node, st, override) { + var type = override || node.type; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (!override) { callback(node, st || ancestors, ancestors, type); } + if (isNew) { ancestors.pop(); } + })(node, state); +} + +// Find a node with a given start, end, and type (all are optional, +// null can be used as wildcard). Returns a {node, state} object, or +// undefined when it doesn't find a matching node. +function findNodeAt(node, start, end, test, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + test = makeTest(test); + try { + (function c(node, st, override) { + var type = override || node.type; + if ((start == null || node.start <= start) && + (end == null || node.end >= end)) + { baseVisitor[type](node, st, c); } + if ((start == null || node.start === start) && + (end == null || node.end === end) && + test(type, node)) + { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the innermost node of a given type that contains the given +// position. Interface similar to findNodeAt. +function findNodeAround(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + var type = override || node.type; + if (node.start > pos || node.end < pos) { return } + baseVisitor[type](node, st, c); + if (test(type, node)) { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the outermost matching node after a given position. +function findNodeAfter(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + if (node.end < pos) { return } + var type = override || node.type; + if (node.start >= pos && test(type, node)) { throw new Found(node, st) } + baseVisitor[type](node, st, c); + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the outermost matching node before a given position. +function findNodeBefore(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + var max + ;(function c(node, st, override) { + if (node.start > pos) { return } + var type = override || node.type; + if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) + { max = new Found(node, st); } + baseVisitor[type](node, st, c); + })(node, state); + return max +} + +// Fallback to an Object.create polyfill for older environments. +var create = Object.create || function(proto) { + function Ctor() {} + Ctor.prototype = proto; + return new Ctor +}; + +// Used to create a custom walker. Will fill in all missing node +// type properties with the defaults. +function make(funcs, baseVisitor) { + var visitor = create(baseVisitor || base); + for (var type in funcs) { visitor[type] = funcs[type]; } + return visitor +} + +function skipThrough(node, st, c) { c(node, st); } +function ignore(_node, _st, _c) {} + +// Node walkers. + +var base = {}; + +base.Program = base.BlockStatement = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var stmt = list[i]; + + c(stmt, st, "Statement"); + } +}; +base.Statement = skipThrough; +base.EmptyStatement = ignore; +base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression = + function (node, st, c) { return c(node.expression, st, "Expression"); }; +base.IfStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Statement"); + if (node.alternate) { c(node.alternate, st, "Statement"); } +}; +base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; +base.BreakStatement = base.ContinueStatement = ignore; +base.WithStatement = function (node, st, c) { + c(node.object, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.SwitchStatement = function (node, st, c) { + c(node.discriminant, st, "Expression"); + for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { + var cs = list$1[i$1]; + + if (cs.test) { c(cs.test, st, "Expression"); } + for (var i = 0, list = cs.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } + } +}; +base.SwitchCase = function (node, st, c) { + if (node.test) { c(node.test, st, "Expression"); } + for (var i = 0, list = node.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } +}; +base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { + if (node.argument) { c(node.argument, st, "Expression"); } +}; +base.ThrowStatement = base.SpreadElement = + function (node, st, c) { return c(node.argument, st, "Expression"); }; +base.TryStatement = function (node, st, c) { + c(node.block, st, "Statement"); + if (node.handler) { c(node.handler, st); } + if (node.finalizer) { c(node.finalizer, st, "Statement"); } +}; +base.CatchClause = function (node, st, c) { + if (node.param) { c(node.param, st, "Pattern"); } + c(node.body, st, "Statement"); +}; +base.WhileStatement = base.DoWhileStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.ForStatement = function (node, st, c) { + if (node.init) { c(node.init, st, "ForInit"); } + if (node.test) { c(node.test, st, "Expression"); } + if (node.update) { c(node.update, st, "Expression"); } + c(node.body, st, "Statement"); +}; +base.ForInStatement = base.ForOfStatement = function (node, st, c) { + c(node.left, st, "ForInit"); + c(node.right, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.ForInit = function (node, st, c) { + if (node.type === "VariableDeclaration") { c(node, st); } + else { c(node, st, "Expression"); } +}; +base.DebuggerStatement = ignore; + +base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; +base.VariableDeclaration = function (node, st, c) { + for (var i = 0, list = node.declarations; i < list.length; i += 1) + { + var decl = list[i]; + + c(decl, st); + } +}; +base.VariableDeclarator = function (node, st, c) { + c(node.id, st, "Pattern"); + if (node.init) { c(node.init, st, "Expression"); } +}; + +base.Function = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + c(param, st, "Pattern"); + } + c(node.body, st, node.expression ? "Expression" : "Statement"); +}; + +base.Pattern = function (node, st, c) { + if (node.type === "Identifier") + { c(node, st, "VariablePattern"); } + else if (node.type === "MemberExpression") + { c(node, st, "MemberPattern"); } + else + { c(node, st); } +}; +base.VariablePattern = ignore; +base.MemberPattern = skipThrough; +base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; +base.ArrayPattern = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Pattern"); } + } +}; +base.ObjectPattern = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + if (prop.type === "Property") { + if (prop.computed) { c(prop.key, st, "Expression"); } + c(prop.value, st, "Pattern"); + } else if (prop.type === "RestElement") { + c(prop.argument, st, "Pattern"); + } + } +}; + +base.Expression = skipThrough; +base.ThisExpression = base.Super = base.MetaProperty = ignore; +base.ArrayExpression = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Expression"); } + } +}; +base.ObjectExpression = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) + { + var prop = list[i]; + + c(prop, st); + } +}; +base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; +base.SequenceExpression = function (node, st, c) { + for (var i = 0, list = node.expressions; i < list.length; i += 1) + { + var expr = list[i]; + + c(expr, st, "Expression"); + } +}; +base.TemplateLiteral = function (node, st, c) { + for (var i = 0, list = node.quasis; i < list.length; i += 1) + { + var quasi = list[i]; + + c(quasi, st); + } + + for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) + { + var expr = list$1[i$1]; + + c(expr, st, "Expression"); + } +}; +base.TemplateElement = ignore; +base.UnaryExpression = base.UpdateExpression = function (node, st, c) { + c(node.argument, st, "Expression"); +}; +base.BinaryExpression = base.LogicalExpression = function (node, st, c) { + c(node.left, st, "Expression"); + c(node.right, st, "Expression"); +}; +base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { + c(node.left, st, "Pattern"); + c(node.right, st, "Expression"); +}; +base.ConditionalExpression = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Expression"); + c(node.alternate, st, "Expression"); +}; +base.NewExpression = base.CallExpression = function (node, st, c) { + c(node.callee, st, "Expression"); + if (node.arguments) + { for (var i = 0, list = node.arguments; i < list.length; i += 1) + { + var arg = list[i]; + + c(arg, st, "Expression"); + } } +}; +base.MemberExpression = function (node, st, c) { + c(node.object, st, "Expression"); + if (node.computed) { c(node.property, st, "Expression"); } +}; +base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { + if (node.declaration) + { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } + if (node.source) { c(node.source, st, "Expression"); } +}; +base.ExportAllDeclaration = function (node, st, c) { + if (node.exported) + { c(node.exported, st); } + c(node.source, st, "Expression"); +}; +base.ImportDeclaration = function (node, st, c) { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) + { + var spec = list[i]; + + c(spec, st); + } + c(node.source, st, "Expression"); +}; +base.ImportExpression = function (node, st, c) { + c(node.source, st, "Expression"); +}; +base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore; + +base.TaggedTemplateExpression = function (node, st, c) { + c(node.tag, st, "Expression"); + c(node.quasi, st, "Expression"); +}; +base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; +base.Class = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + if (node.superClass) { c(node.superClass, st, "Expression"); } + c(node.body, st); +}; +base.ClassBody = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var elt = list[i]; + + c(elt, st); + } +}; +base.MethodDefinition = base.Property = function (node, st, c) { + if (node.computed) { c(node.key, st, "Expression"); } + c(node.value, st, "Expression"); +}; + +export { ancestor, base, findNodeAfter, findNodeAround, findNodeAt, findNodeBefore, full, fullAncestor, make, recursive, simple }; diff --git a/deps/acorn/acorn-walk/dist/walk.mjs.map b/deps/acorn/acorn-walk/dist/walk.mjs.map new file mode 100644 index 00000000000000..2a94219c3bada4 --- /dev/null +++ b/deps/acorn/acorn-walk/dist/walk.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"walk.mjs","sources":["../src/index.js"],"sourcesContent":["// AST walker module for Mozilla Parser API compatible trees\n\n// A simple walk is one where you simply specify callbacks to be\n// called on specific nodes. The last two arguments are optional. A\n// simple use would be\n//\n// walk.simple(myTree, {\n// Expression: function(node) { ... }\n// });\n//\n// to do something with all expressions. All Parser API node types\n// can be used to identify node types, as well as Expression and\n// Statement, which denote categories of nodes.\n//\n// The base argument can be used to pass a custom (recursive)\n// walker, and state can be used to give this walked an initial\n// state.\n\nexport function simple(node, visitors, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n baseVisitor[type](node, st, c)\n if (found) found(node, st)\n })(node, state, override)\n}\n\n// An ancestor walk keeps an array of ancestor nodes (including the\n// current node) and passes them to the callback as third parameter\n// (and also as state parameter when no other state is present).\nexport function ancestor(node, visitors, baseVisitor, state) {\n let ancestors = []\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (found) found(node, st || ancestors, ancestors)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// A recursive walk is one where your functions override the default\n// walkers. They can modify and replace the state parameter that's\n// threaded through the walk, and can opt how and whether to walk\n// their child nodes (by calling their third argument on these\n// nodes).\nexport function recursive(node, state, funcs, baseVisitor, override) {\n let visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor\n ;(function c(node, st, override) {\n visitor[override || node.type](node, st, c)\n })(node, state, override)\n}\n\nfunction makeTest(test) {\n if (typeof test === \"string\")\n return type => type === test\n else if (!test)\n return () => true\n else\n return test\n}\n\nclass Found {\n constructor(node, state) { this.node = node; this.state = state }\n}\n\n// A full walk triggers the callback on each node\nexport function full(node, callback, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st, type)\n })(node, state, override)\n}\n\n// An fullAncestor walk is like an ancestor walk, but triggers\n// the callback on each node\nexport function fullAncestor(node, callback, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n let ancestors = []\n ;(function c(node, st, override) {\n let type = override || node.type\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st || ancestors, ancestors, type)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// Find a node with a given start, end, and type (all are optional,\n// null can be used as wildcard). Returns a {node, state} object, or\n// undefined when it doesn't find a matching node.\nexport function findNodeAt(node, start, end, test, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n test = makeTest(test)\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if ((start == null || node.start <= start) &&\n (end == null || node.end >= end))\n baseVisitor[type](node, st, c)\n if ((start == null || node.start === start) &&\n (end == null || node.end === end) &&\n test(type, node))\n throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the innermost node of a given type that contains the given\n// position. Interface similar to findNodeAt.\nexport function findNodeAround(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if (node.start > pos || node.end < pos) return\n baseVisitor[type](node, st, c)\n if (test(type, node)) throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node after a given position.\nexport function findNodeAfter(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n if (node.end < pos) return\n let type = override || node.type\n if (node.start >= pos && test(type, node)) throw new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node before a given position.\nexport function findNodeBefore(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n let max\n ;(function c(node, st, override) {\n if (node.start > pos) return\n let type = override || node.type\n if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))\n max = new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n return max\n}\n\n// Fallback to an Object.create polyfill for older environments.\nconst create = Object.create || function(proto) {\n function Ctor() {}\n Ctor.prototype = proto\n return new Ctor\n}\n\n// Used to create a custom walker. Will fill in all missing node\n// type properties with the defaults.\nexport function make(funcs, baseVisitor) {\n let visitor = create(baseVisitor || base)\n for (let type in funcs) visitor[type] = funcs[type]\n return visitor\n}\n\nfunction skipThrough(node, st, c) { c(node, st) }\nfunction ignore(_node, _st, _c) {}\n\n// Node walkers.\n\nexport const base = {}\n\nbase.Program = base.BlockStatement = (node, st, c) => {\n for (let stmt of node.body)\n c(stmt, st, \"Statement\")\n}\nbase.Statement = skipThrough\nbase.EmptyStatement = ignore\nbase.ExpressionStatement = base.ParenthesizedExpression =\n (node, st, c) => c(node.expression, st, \"Expression\")\nbase.IfStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Statement\")\n if (node.alternate) c(node.alternate, st, \"Statement\")\n}\nbase.LabeledStatement = (node, st, c) => c(node.body, st, \"Statement\")\nbase.BreakStatement = base.ContinueStatement = ignore\nbase.WithStatement = (node, st, c) => {\n c(node.object, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.SwitchStatement = (node, st, c) => {\n c(node.discriminant, st, \"Expression\")\n for (let cs of node.cases) {\n if (cs.test) c(cs.test, st, \"Expression\")\n for (let cons of cs.consequent)\n c(cons, st, \"Statement\")\n }\n}\nbase.SwitchCase = (node, st, c) => {\n if (node.test) c(node.test, st, \"Expression\")\n for (let cons of node.consequent)\n c(cons, st, \"Statement\")\n}\nbase.ReturnStatement = base.YieldExpression = base.AwaitExpression = (node, st, c) => {\n if (node.argument) c(node.argument, st, \"Expression\")\n}\nbase.ThrowStatement = base.SpreadElement =\n (node, st, c) => c(node.argument, st, \"Expression\")\nbase.TryStatement = (node, st, c) => {\n c(node.block, st, \"Statement\")\n if (node.handler) c(node.handler, st)\n if (node.finalizer) c(node.finalizer, st, \"Statement\")\n}\nbase.CatchClause = (node, st, c) => {\n if (node.param) c(node.param, st, \"Pattern\")\n c(node.body, st, \"Statement\")\n}\nbase.WhileStatement = base.DoWhileStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForStatement = (node, st, c) => {\n if (node.init) c(node.init, st, \"ForInit\")\n if (node.test) c(node.test, st, \"Expression\")\n if (node.update) c(node.update, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInStatement = base.ForOfStatement = (node, st, c) => {\n c(node.left, st, \"ForInit\")\n c(node.right, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInit = (node, st, c) => {\n if (node.type === \"VariableDeclaration\") c(node, st)\n else c(node, st, \"Expression\")\n}\nbase.DebuggerStatement = ignore\n\nbase.FunctionDeclaration = (node, st, c) => c(node, st, \"Function\")\nbase.VariableDeclaration = (node, st, c) => {\n for (let decl of node.declarations)\n c(decl, st)\n}\nbase.VariableDeclarator = (node, st, c) => {\n c(node.id, st, \"Pattern\")\n if (node.init) c(node.init, st, \"Expression\")\n}\n\nbase.Function = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n for (let param of node.params)\n c(param, st, \"Pattern\")\n c(node.body, st, node.expression ? \"Expression\" : \"Statement\")\n}\n\nbase.Pattern = (node, st, c) => {\n if (node.type === \"Identifier\")\n c(node, st, \"VariablePattern\")\n else if (node.type === \"MemberExpression\")\n c(node, st, \"MemberPattern\")\n else\n c(node, st)\n}\nbase.VariablePattern = ignore\nbase.MemberPattern = skipThrough\nbase.RestElement = (node, st, c) => c(node.argument, st, \"Pattern\")\nbase.ArrayPattern = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Pattern\")\n }\n}\nbase.ObjectPattern = (node, st, c) => {\n for (let prop of node.properties) {\n if (prop.type === \"Property\") {\n if (prop.computed) c(prop.key, st, \"Expression\")\n c(prop.value, st, \"Pattern\")\n } else if (prop.type === \"RestElement\") {\n c(prop.argument, st, \"Pattern\")\n }\n }\n}\n\nbase.Expression = skipThrough\nbase.ThisExpression = base.Super = base.MetaProperty = ignore\nbase.ArrayExpression = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Expression\")\n }\n}\nbase.ObjectExpression = (node, st, c) => {\n for (let prop of node.properties)\n c(prop, st)\n}\nbase.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration\nbase.SequenceExpression = (node, st, c) => {\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateLiteral = (node, st, c) => {\n for (let quasi of node.quasis)\n c(quasi, st)\n\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateElement = ignore\nbase.UnaryExpression = base.UpdateExpression = (node, st, c) => {\n c(node.argument, st, \"Expression\")\n}\nbase.BinaryExpression = base.LogicalExpression = (node, st, c) => {\n c(node.left, st, \"Expression\")\n c(node.right, st, \"Expression\")\n}\nbase.AssignmentExpression = base.AssignmentPattern = (node, st, c) => {\n c(node.left, st, \"Pattern\")\n c(node.right, st, \"Expression\")\n}\nbase.ConditionalExpression = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Expression\")\n c(node.alternate, st, \"Expression\")\n}\nbase.NewExpression = base.CallExpression = (node, st, c) => {\n c(node.callee, st, \"Expression\")\n if (node.arguments)\n for (let arg of node.arguments)\n c(arg, st, \"Expression\")\n}\nbase.MemberExpression = (node, st, c) => {\n c(node.object, st, \"Expression\")\n if (node.computed) c(node.property, st, \"Expression\")\n}\nbase.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => {\n if (node.declaration)\n c(node.declaration, st, node.type === \"ExportNamedDeclaration\" || node.declaration.id ? \"Statement\" : \"Expression\")\n if (node.source) c(node.source, st, \"Expression\")\n}\nbase.ExportAllDeclaration = (node, st, c) => {\n c(node.source, st, \"Expression\")\n}\nbase.ImportDeclaration = (node, st, c) => {\n for (let spec of node.specifiers)\n c(spec, st)\n c(node.source, st, \"Expression\")\n}\nbase.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore\n\nbase.TaggedTemplateExpression = (node, st, c) => {\n c(node.tag, st, \"Expression\")\n c(node.quasi, st, \"Expression\")\n}\nbase.ClassDeclaration = base.ClassExpression = (node, st, c) => c(node, st, \"Class\")\nbase.Class = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n if (node.superClass) c(node.superClass, st, \"Expression\")\n c(node.body, st)\n}\nbase.ClassBody = (node, st, c) => {\n for (let elt of node.body)\n c(elt, st)\n}\nbase.MethodDefinition = base.Property = (node, st, c) => {\n if (node.computed) c(node.key, st, \"Expression\")\n c(node.value, st, \"Expression\")\n}\n"],"names":["let","const"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;AAkBA,AAAO,SAAS,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACnE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxD,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;;AAKD,AAAO,SAAS,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC3DA,IAAI,SAAS,GAAG,GAAE;EAClB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxDA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAC,EAAA;IAClD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;;;AAOD,AAAO,SAAS,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE;EACnEA,IAAI,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,IAAI,SAAS,CAAC,GAAG,WAAW,CACxE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC5C,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;AAED,SAAS,QAAQ,CAAC,IAAI,EAAE;EACtB,IAAI,OAAO,IAAI,KAAK,QAAQ;IAC1B,EAAA,OAAO,UAAA,IAAI,EAAC,SAAG,IAAI,KAAK,IAAI,GAAA,EAAA;OACzB,IAAI,CAAC,IAAI;IACZ,EAAA,OAAO,YAAG,SAAG,IAAI,GAAA,EAAA;;IAEjB,EAAA,OAAO,IAAI,EAAA;CACd;;AAED,IAAM,KAAK,GAAC,cACC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,MAAK,EAAE,CAAA;;;AAInE,AAAO,SAAS,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACjE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAC,EAAA;GACxC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;AAID,AAAO,SAAS,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC/D,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,SAAS,GAAG,EAAE,CACjB,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChCA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,EAAA;IAC/D,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;AAKD,AAAO,SAAS,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACrE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK;WACpC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC;QAClC,EAAA,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC,EAAA;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK;WACrC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC;UACjC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;QAClB,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAC5B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;;AAID,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC9C,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;MAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAChD,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACjE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9B,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC1BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;MACpE,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;KAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,GAAG,CACN,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;IAC5BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;MAC1E,EAAA,GAAG,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;IAC3B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;EACf,OAAO,GAAG;CACX;;;AAGDC,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,KAAK,EAAE;EAC9C,SAAS,IAAI,GAAG,EAAE;EAClB,IAAI,CAAC,SAAS,GAAG,MAAK;EACtB,OAAO,IAAI,IAAI;EAChB;;;;AAID,AAAO,SAAS,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;EACvCD,IAAI,OAAO,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAC;EACzC,KAAKA,IAAI,IAAI,IAAI,KAAK,EAAE,EAAA,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAC,EAAA;EACnD,OAAO,OAAO;CACf;;AAED,SAAS,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAE;AACjD,SAAS,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;;;;AAIlC,AAAOC,IAAM,IAAI,GAAG,GAAE;;AAEtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjD,KAAa,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAArB;IAAAD,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,SAAS,GAAG,YAAW;AAC5B,IAAI,CAAC,cAAc,GAAG,OAAM;AAC5B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,uBAAuB;EACrD,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACvD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,WAAW,EAAC;EACnC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,CAAC,IAAA;AACtE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,GAAG,OAAM;AACrD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,YAAY,EAAC;EACtC,KAAW,kBAAI,IAAI,CAAC,KAAK,yBAAA,EAAE;IAAtBA,IAAI,EAAE;;IACT,IAAI,EAAE,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;IACzC,KAAa,sBAAI,EAAE,CAAC,UAAU,+BAAA;MAAzB;MAAAA,IAAI,IAAI;;MACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;KAAA;GAC3B;EACF;AACD,IAAI,CAAC,UAAU,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjF,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa;EACtC,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACrD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B,IAAI,IAAI,CAAC,OAAO,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAC,EAAA;EACrC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,IAAI,IAAI,CAAC,KAAK,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC5C,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC1C,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACjD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,qBAAqB,EAAE,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;OAC/C,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC/B;AACD,IAAI,CAAC,iBAAiB,GAAG,OAAM;;AAE/B,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,IAAA;AACnE,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvC,KAAa,kBAAI,IAAI,CAAC,YAAY,yBAAA;IAA7B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC;EACzB,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC9C;;AAED,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5B,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;GAAA;EACzB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,GAAG,YAAY,GAAG,WAAW,EAAC;EAC/D;;AAED,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;IAC5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,iBAAiB,EAAC,EAAA;OAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB;IACvC,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,eAAe,EAAC,EAAA;;IAE5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;EACd;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,aAAa,GAAG,YAAW;AAChC,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,CAAC,IAAA;AACnE,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;GAC/B;EACF;AACD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA,EAAE;IAA7BA,IAAI,IAAI;;IACX,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE;MAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;MAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;KAC7B,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE;MACtC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAC;KAChC;GACF;EACF;;AAED,IAAI,CAAC,UAAU,GAAG,YAAW;AAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,OAAM;AAC7D,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;GAClC;EACF;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,oBAAmB;AACjF,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,KAAa,kBAAI,IAAI,CAAC,WAAW,yBAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAC;GAAA;;EAEd,KAAa,sBAAI,IAAI,CAAC,WAAW,+BAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3D,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC;EACnC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,qBAAqB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC;AACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvD,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,SAAS;IAChB,EAAA,KAAY,kBAAI,IAAI,CAAC,SAAS,yBAAA;MAAzB;QAAAA,IAAI,GAAG;;QACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;OAAA,EAAA;EAC7B;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1E,IAAI,IAAI,CAAC,WAAW;IAClB,EAAA,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,KAAK,wBAAwB,IAAI,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,GAAG,YAAY,EAAC,EAAA;EACrH,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAClD;AACD,IAAI,CAAC,oBAAoB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACrC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACb,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,OAAM;;AAE5H,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5C,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;EAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,IAAA;AACpF,IAAI,CAAC,KAAK,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzB,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,IAAI,IAAI,CAAC,UAAU,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACzD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAC;EACjB;AACD,IAAI,CAAC,SAAS,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7B,KAAY,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAApB;IAAAA,IAAI,GAAG;;IACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAC;GAAA;EACb;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpD,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;CAChC;;;;"} \ No newline at end of file diff --git a/deps/acorn/acorn-walk/package.json b/deps/acorn/acorn-walk/package.json index a66ca892ced577..ccd942df896c23 100644 --- a/deps/acorn/acorn-walk/package.json +++ b/deps/acorn/acorn-walk/package.json @@ -5,7 +5,11 @@ "main": "dist/walk.js", "types": "dist/walk.d.ts", "module": "dist/walk.mjs", - "version": "7.1.1", + "exports": { + "import": "./dist/walk.mjs", + "require": "./dist/walk.js" + }, + "version": "8.0.0", "engines": {"node": ">=0.4.0"}, "maintainers": [ { diff --git a/deps/acorn/acorn/CHANGELOG.md b/deps/acorn/acorn/CHANGELOG.md index 32f5ce8f3bb4bf..6489d0c397b379 100644 --- a/deps/acorn/acorn/CHANGELOG.md +++ b/deps/acorn/acorn/CHANGELOG.md @@ -1,3 +1,97 @@ +## 8.0.4 (2020-10-05) + +### Bug fixes + +Make `await x ** y` an error, following the spec. + +Fix potentially exponential regular expression. + +## 8.0.3 (2020-10-02) + +### Bug fixes + +Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`. + +## 8.0.2 (2020-09-30) + +### Bug fixes + +Make the TypeScript types reflect the current allowed values for `ecmaVersion`. + +Fix another regexp/division tokenizer issue. + +## 8.0.1 (2020-08-12) + +### Bug fixes + +Provide the correct value in the `version` export. + +## 8.0.0 (2020-08-12) + +### Bug fixes + +Disallow expressions like `(a = b) = c`. + +Make non-octal escape sequences a syntax error in strict mode. + +### New features + +The package can now be loaded directly as an ECMAScript module in node 13+. + +Update to the set of Unicode properties from ES2021. + +### Breaking changes + +The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release. + +Some changes to method signatures that may be used by plugins. + +## 7.4.0 (2020-08-03) + +### New features + +Add support for logical assignment operators. + +Add support for numeric separators. + +## 7.3.1 (2020-06-11) + +### Bug fixes + +Make the string in the `version` export match the actual library version. + +## 7.3.0 (2020-06-11) + +### Bug fixes + +Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail. + +### New features + +Add support for optional chaining (`?.`). + +## 7.2.0 (2020-05-09) + +### Bug fixes + +Fix precedence issue in parsing of async arrow functions. + +### New features + +Add support for nullish coalescing. + +Add support for `import.meta`. + +Support `export * as ...` syntax. + +Upgrade to Unicode 13. + +## 6.4.1 (2020-03-09) + +### Bug fixes + +More carefully check for valid UTF16 surrogate pairs in regexp validator. + ## 7.1.1 (2020-03-01) ### Bug fixes diff --git a/deps/acorn/acorn/LICENSE b/deps/acorn/acorn/LICENSE index 2c0632b6a7c63b..cc5272c966db45 100644 --- a/deps/acorn/acorn/LICENSE +++ b/deps/acorn/acorn/LICENSE @@ -1,3 +1,5 @@ +MIT License + Copyright (C) 2012-2018 by various contributors (see AUTHORS) Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/deps/acorn/acorn/README.md b/deps/acorn/acorn/README.md index 585f2736fc05b5..029086785fa256 100644 --- a/deps/acorn/acorn/README.md +++ b/deps/acorn/acorn/README.md @@ -32,14 +32,14 @@ npm install ## Interface **parse**`(input, options)` is the main interface to the library. The -`input` parameter is a string, `options` can be undefined or an object -setting some of the options listed below. The return value will be an -abstract syntax tree object as specified by the [ESTree +`input` parameter is a string, `options` must be an object setting +some of the options listed below. The return value will be an abstract +syntax tree object as specified by the [ESTree spec](https://github.com/estree/estree). ```javascript let acorn = require("acorn"); -console.log(acorn.parse("1 + 1")); +console.log(acorn.parse("1 + 1", {ecmaVersion: 2020})); ``` When encountering a syntax error, the parser will raise a @@ -48,18 +48,19 @@ have a `pos` property that indicates the string offset at which the error occurred, and a `loc` object that contains a `{line, column}` object referring to that same position. -Options can be provided by passing a second argument, which should be -an object containing any of these fields: +Options are provided by in a second argument, which should be an +object containing any of these fields (only `ecmaVersion` is +required): - **ecmaVersion**: Indicates the ECMAScript version to parse. Must be - either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019) or 11 - (2020, partial support). This influences support for strict mode, - the set of reserved words, and support for new syntax features. - Default is 10. + either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019), + 11 (2020), or 12 (2021, partial support), or `"latest"` (the latest + the library supports). This influences support for strict mode, the + set of reserved words, and support for new syntax features. **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being - implemented by Acorn. Other proposed new features can be implemented - through plugins. + implemented by Acorn. Other proposed new features must be + implemented through plugins. - **sourceType**: Indicate the mode the code should be parsed in. Can be either `"script"` or `"module"`. This influences global strict mode @@ -224,7 +225,7 @@ you can use its static `extend` method. var acorn = require("acorn"); var jsx = require("acorn-jsx"); var JSXParser = acorn.Parser.extend(jsx()); -JSXParser.parse("foo()"); +JSXParser.parse("foo()", {ecmaVersion: 2020}); ``` The `extend` method takes any number of plugin values, and returns a @@ -266,5 +267,4 @@ Plugins for ECMAScript proposals: - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling: - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields) - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta) - - [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator) - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n diff --git a/deps/acorn/acorn/bin/acorn b/deps/acorn/acorn/bin/acorn new file mode 100755 index 00000000000000..cf7df46890fdd4 --- /dev/null +++ b/deps/acorn/acorn/bin/acorn @@ -0,0 +1,4 @@ +#!/usr/bin/env node +'use strict'; + +require('../dist/bin.js'); diff --git a/deps/acorn/acorn/dist/acorn.d.ts b/deps/acorn/acorn/dist/acorn.d.ts new file mode 100644 index 00000000000000..f788637e88eb6e --- /dev/null +++ b/deps/acorn/acorn/dist/acorn.d.ts @@ -0,0 +1,209 @@ +export as namespace acorn +export = acorn + +declare namespace acorn { + function parse(input: string, options: Options): Node + + function parseExpressionAt(input: string, pos: number, options: Options): Node + + function tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + + interface Options { + ecmaVersion: 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 'latest' + sourceType?: 'script' | 'module' + onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + allowReserved?: boolean | 'never' + allowReturnOutsideFunction?: boolean + allowImportExportEverywhere?: boolean + allowAwaitOutsideFunction?: boolean + allowHashBang?: boolean + locations?: boolean + onToken?: ((token: Token) => any) | Token[] + onComment?: (( + isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, + endLoc?: Position + ) => void) | Comment[] + ranges?: boolean + program?: Node + sourceFile?: string + directSourceFile?: string + preserveParens?: boolean + } + + class Parser { + constructor(options: Options, input: string, startPos?: number) + parse(this: Parser): Node + static parse(this: typeof Parser, input: string, options: Options): Node + static parseExpressionAt(this: typeof Parser, input: string, pos: number, options: Options): Node + static tokenizer(this: typeof Parser, input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + static extend(this: typeof Parser, ...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser + } + + interface Position { line: number; column: number; offset: number } + + const defaultOptions: Options + + function getLineInfo(input: string, offset: number): Position + + class SourceLocation { + start: Position + end: Position + source?: string | null + constructor(p: Parser, start: Position, end: Position) + } + + class Node { + type: string + start: number + end: number + loc?: SourceLocation + sourceFile?: string + range?: [number, number] + constructor(parser: Parser, pos: number, loc?: SourceLocation) + } + + class TokenType { + label: string + keyword: string + beforeExpr: boolean + startsExpr: boolean + isLoop: boolean + isAssign: boolean + prefix: boolean + postfix: boolean + binop: number + updateContext?: (prevType: TokenType) => void + constructor(label: string, conf?: any) + } + + const tokTypes: { + num: TokenType + regexp: TokenType + string: TokenType + name: TokenType + eof: TokenType + bracketL: TokenType + bracketR: TokenType + braceL: TokenType + braceR: TokenType + parenL: TokenType + parenR: TokenType + comma: TokenType + semi: TokenType + colon: TokenType + dot: TokenType + question: TokenType + arrow: TokenType + template: TokenType + ellipsis: TokenType + backQuote: TokenType + dollarBraceL: TokenType + eq: TokenType + assign: TokenType + incDec: TokenType + prefix: TokenType + logicalOR: TokenType + logicalAND: TokenType + bitwiseOR: TokenType + bitwiseXOR: TokenType + bitwiseAND: TokenType + equality: TokenType + relational: TokenType + bitShift: TokenType + plusMin: TokenType + modulo: TokenType + star: TokenType + slash: TokenType + starstar: TokenType + _break: TokenType + _case: TokenType + _catch: TokenType + _continue: TokenType + _debugger: TokenType + _default: TokenType + _do: TokenType + _else: TokenType + _finally: TokenType + _for: TokenType + _function: TokenType + _if: TokenType + _return: TokenType + _switch: TokenType + _throw: TokenType + _try: TokenType + _var: TokenType + _const: TokenType + _while: TokenType + _with: TokenType + _new: TokenType + _this: TokenType + _super: TokenType + _class: TokenType + _extends: TokenType + _export: TokenType + _import: TokenType + _null: TokenType + _true: TokenType + _false: TokenType + _in: TokenType + _instanceof: TokenType + _typeof: TokenType + _void: TokenType + _delete: TokenType + } + + class TokContext { + constructor(token: string, isExpr: boolean, preserveSpace: boolean, override?: (p: Parser) => void) + } + + const tokContexts: { + b_stat: TokContext + b_expr: TokContext + b_tmpl: TokContext + p_stat: TokContext + p_expr: TokContext + q_tmpl: TokContext + f_expr: TokContext + } + + function isIdentifierStart(code: number, astral?: boolean): boolean + + function isIdentifierChar(code: number, astral?: boolean): boolean + + interface AbstractToken { + } + + interface Comment extends AbstractToken { + type: string + value: string + start: number + end: number + loc?: SourceLocation + range?: [number, number] + } + + class Token { + type: TokenType + value: any + start: number + end: number + loc?: SourceLocation + range?: [number, number] + constructor(p: Parser) + } + + function isNewLine(code: number): boolean + + const lineBreak: RegExp + + const lineBreakG: RegExp + + const version: string +} diff --git a/deps/acorn/acorn/dist/acorn.js b/deps/acorn/acorn/dist/acorn.js index e2b33179c789c7..d9b5920e43acfe 100644 --- a/deps/acorn/acorn/dist/acorn.js +++ b/deps/acorn/acorn/dist/acorn.js @@ -2,7 +2,7 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = global || self, factory(global.acorn = {})); -}(this, function (exports) { 'use strict'; +}(this, (function (exports) { 'use strict'; // Reserved word lists for various dialects of the language @@ -33,8 +33,8 @@ // are only applied when a character is found to actually have a // code point above 128. // Generated by `bin/generate-identifier-regex.js`. - 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\u0560-\u0588\u05d0-\u05ea\u05ef-\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\u0860-\u086a\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\u09fc\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\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\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-\u1878\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\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\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-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\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-\uab67\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"; - 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\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\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\u09fe\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\u0afa-\u0aff\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-\u0c04\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\u0d00-\u0d03\u0d3b\u0d3c\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-\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\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\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\ua8ff-\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"; + 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\u0560-\u0588\u05d0-\u05ea\u05ef-\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\u0860-\u086a\u08a0-\u08b4\u08b6-\u08c7\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\u09fc\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\u0d04-\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\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\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-\u1878\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\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\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-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\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-\uab69\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"; + 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\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\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\u09fe\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\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\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\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\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\u1abf\u1ac0\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\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\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\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\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"; var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); @@ -48,10 +48,10 @@ // generated by bin/generate-identifier-regex.js // eslint-disable-next-line comma-spacing - var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,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,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,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,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,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,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,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,15,7472,3104,541]; + var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,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,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,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,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,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,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,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,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938]; // eslint-disable-next-line comma-spacing - var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,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,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239]; + var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,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,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239]; // This has a complexity linear to the value of the code. The // assumption is that looking up astral identifier characters is @@ -166,6 +166,7 @@ colon: new TokenType(":", beforeExpr), dot: new TokenType("."), question: new TokenType("?", beforeExpr), + questionDot: new TokenType("?."), arrow: new TokenType("=>", beforeExpr), template: new TokenType("template"), invalidTemplate: new TokenType("invalidTemplate"), @@ -204,6 +205,7 @@ star: binop("*", 10), slash: binop("/", 10), starstar: new TokenType("**", {beforeExpr: true}), + coalesce: binop("??", 1), // Keyword token types. _break: kw("break"), @@ -312,16 +314,16 @@ } } - // A second optional argument can be given to further configure - // the parser process. These options are recognized: + // A second argument must be given to configure the parser process. + // These options are recognized (only `ecmaVersion` is required): var defaultOptions = { // `ecmaVersion` indicates the ECMAScript version to parse. Must be - // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 - // (2019). This influences support for strict mode, the set of - // reserved words, and support for new syntax features. The default - // is 10. - ecmaVersion: 10, + // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 + // (2019), 11 (2020), 12 (2021), or `"latest"` (the latest version + // the library supports). This influences support for strict mode, + // the set of reserved words, and support for new syntax features. + ecmaVersion: null, // `sourceType` indicates the mode the code should be parsed in. // Can be either `"script"` or `"module"`. This influences global // strict mode and parsing of `import` and `export` declarations. @@ -402,14 +404,25 @@ // Interpret and default an options object + var warnedAboutEcmaVersion = false; + function getOptions(opts) { var options = {}; for (var opt in defaultOptions) { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - if (options.ecmaVersion >= 2015) - { options.ecmaVersion -= 2009; } + if (options.ecmaVersion === "latest") { + options.ecmaVersion = 1e8; + } else if (options.ecmaVersion == null) { + if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) { + warnedAboutEcmaVersion = true; + console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future."); + } + options.ecmaVersion = 11; + } else if (options.ecmaVersion >= 2015) { + options.ecmaVersion -= 2009; + } if (options.allowReserved == null) { options.allowReserved = options.ecmaVersion < 5; } @@ -456,7 +469,7 @@ return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) } - // Used in checkLVal and declareName to determine the type of a binding + // Used in checkLVal* and declareName to determine the type of a binding var BIND_NONE = 0, // Not a binding BIND_VAR = 1, // Var-style binding @@ -471,8 +484,7 @@ this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); var reserved = ""; if (options.allowReserved !== true) { - for (var v = options.ecmaVersion;; v--) - { if (reserved = reservedWords[v]) { break } } + reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3]; if (options.sourceType === "module") { reserved += " await"; } } this.reservedWords = wordsRegexp(reserved); @@ -545,7 +557,7 @@ this.regexpState = null; }; - var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; + var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true },inNonArrowFunction: { configurable: true } }; Parser.prototype.parse = function parse () { var node = this.options.program || this.startNode(); @@ -559,9 +571,7 @@ prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; - - // Switch to a getter for 7.0.0. - Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; + prototypeAccessors.inNonArrowFunction.get = function () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; Parser.extend = function extend () { var plugins = [], len = arguments.length; @@ -592,7 +602,7 @@ // ## Parser utilities - var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; + var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/; pp.strictDirective = function(start) { for (;;) { // Try to find string literal. @@ -600,7 +610,14 @@ start += skipWhiteSpace.exec(this.input)[0].length; var match = literal.exec(this.input.slice(start)); if (!match) { return false } - if ((match[1] || match[2]) === "use strict") { return true } + if ((match[1] || match[2]) === "use strict") { + skipWhiteSpace.lastIndex = start + match[0].length; + var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length; + var next = this.input.charAt(end); + return next === ";" || next === "}" || + (lineBreak.test(spaceAfter[0]) && + !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=")) + } start += match[0].length; // Skip semicolon, if any. @@ -850,7 +867,7 @@ skipWhiteSpace.lastIndex = this.pos; var skip = skipWhiteSpace.exec(this.input); var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - if (nextCh === 40) // '(' + if (nextCh === 40 || nextCh === 46) // '(' or '.' { return this.parseExpressionStatement(node, this.parseExpression()) } } @@ -969,7 +986,7 @@ } else { node.await = awaitAt > -1; } } this.toAssignable(init, false, refDestructuringErrors); - this.checkLVal(init); + this.checkLValPattern(init); return this.parseForIn(node, init) } else { this.checkExpressionErrors(refDestructuringErrors, true); @@ -1070,7 +1087,7 @@ clause.param = this.parseBindingAtom(); var simple = clause.param.type === "Identifier"; this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); + this.checkLValPattern(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); this.expect(types.parenR); } else { if (this.options.ecmaVersion < 10) { this.unexpected(); } @@ -1150,17 +1167,19 @@ // strict"` declarations when `allowStrict` is true (used for // function bodies). - pp$1.parseBlock = function(createNewLexicalScope, node) { + pp$1.parseBlock = function(createNewLexicalScope, node, exitStrict) { if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; if ( node === void 0 ) node = this.startNode(); node.body = []; this.expect(types.braceL); if (createNewLexicalScope) { this.enterScope(0); } - while (!this.eat(types.braceR)) { + while (this.type !== types.braceR) { var stmt = this.parseStatement(null); node.body.push(stmt); } + if (exitStrict) { this.strict = false; } + this.next(); if (createNewLexicalScope) { this.exitScope(); } return this.finishNode(node, "BlockStatement") }; @@ -1204,8 +1223,6 @@ init.start, ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") ); - } else if (init.type === "AssignmentPattern") { - this.raise(init.start, "Invalid left-hand side in for-loop"); } node.left = init; node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); @@ -1241,7 +1258,7 @@ pp$1.parseVarId = function(decl, kind) { decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); + this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); }; var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; @@ -1267,7 +1284,7 @@ // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding // mode depends on properties of the current scope (see // treatFunctionsAsVar). - { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } + { this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } } var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; @@ -1311,7 +1328,7 @@ var hadConstructor = false; classBody.body = []; this.expect(types.braceL); - while (!this.eat(types.braceR)) { + while (this.type !== types.braceR) { var element = this.parseClassElement(node.superClass !== null); if (element) { classBody.body.push(element); @@ -1321,8 +1338,9 @@ } } } - node.body = this.finishNode(classBody, "ClassBody"); this.strict = oldStrict; + this.next(); + node.body = this.finishNode(classBody, "ClassBody"); return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") }; @@ -1392,7 +1410,7 @@ if (this.type === types.name) { node.id = this.parseIdent(); if (isStatement) - { this.checkLVal(node.id, BIND_LEXICAL, false); } + { this.checkLValSimple(node.id, BIND_LEXICAL, false); } } else { if (isStatement === true) { this.unexpected(); } @@ -1410,6 +1428,14 @@ this.next(); // export * from '...' if (this.eat(types.star)) { + if (this.options.ecmaVersion >= 11) { + if (this.eatContextual("as")) { + node.exported = this.parseIdent(true); + this.checkExport(exports, node.exported.name, this.lastTokStart); + } else { + node.exported = null; + } + } this.expectContextual("from"); if (this.type !== types.string) { this.unexpected(); } node.source = this.parseExprAtom(); @@ -1564,7 +1590,7 @@ // import defaultObj, { x, y as z } from '...' var node = this.startNode(); node.local = this.parseIdent(); - this.checkLVal(node.local, BIND_LEXICAL); + this.checkLValSimple(node.local, BIND_LEXICAL); nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); if (!this.eat(types.comma)) { return nodes } } @@ -1573,7 +1599,7 @@ this.next(); this.expectContextual("as"); node$1.local = this.parseIdent(); - this.checkLVal(node$1.local, BIND_LEXICAL); + this.checkLValSimple(node$1.local, BIND_LEXICAL); nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); return nodes } @@ -1592,7 +1618,7 @@ this.checkUnreserved(node$2.imported); node$2.local = node$2.imported; } - this.checkLVal(node$2.local, BIND_LEXICAL); + this.checkLValSimple(node$2.local, BIND_LEXICAL); nodes.push(this.finishNode(node$2, "ImportSpecifier")); } return nodes @@ -1629,6 +1655,7 @@ case "ObjectPattern": case "ArrayPattern": + case "AssignmentPattern": case "RestElement": break @@ -1677,15 +1704,16 @@ node.type = "AssignmentPattern"; delete node.operator; this.toAssignable(node.left, isBinding); - // falls through to AssignmentPattern - - case "AssignmentPattern": break case "ParenthesizedExpression": this.toAssignable(node.expression, isBinding, refDestructuringErrors); break + case "ChainExpression": + this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side"); + break + case "MemberExpression": if (!isBinding) { break } @@ -1792,70 +1820,152 @@ return this.finishNode(node, "AssignmentPattern") }; - // Verify that a node is an lval — something that can be assigned - // to. - // bindingType can be either: - // 'var' indicating that the lval creates a 'var' binding - // 'let' indicating that the lval creates a lexical ('let' or 'const') binding - // 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references + // The following three functions all verify that a node is an lvalue — + // something that can be bound, or assigned to. In order to do so, they perform + // a variety of checks: + // + // - Check that none of the bound/assigned-to identifiers are reserved words. + // - Record name declarations for bindings in the appropriate scope. + // - Check duplicate argument names, if checkClashes is set. + // + // If a complex binding pattern is encountered (e.g., object and array + // destructuring), the entire pattern is recursively checked. + // + // There are three versions of checkLVal*() appropriate for different + // circumstances: + // + // - checkLValSimple() shall be used if the syntactic construct supports + // nothing other than identifiers and member expressions. Parenthesized + // expressions are also correctly handled. This is generally appropriate for + // constructs for which the spec says + // + // > It is a Syntax Error if AssignmentTargetType of [the production] is not + // > simple. + // + // It is also appropriate for checking if an identifier is valid and not + // defined elsewhere, like import declarations or function/class identifiers. + // + // Examples where this is used include: + // a += …; + // import a from '…'; + // where a is the node to be checked. + // + // - checkLValPattern() shall be used if the syntactic construct supports + // anything checkLValSimple() supports, as well as object and array + // destructuring patterns. This is generally appropriate for constructs for + // which the spec says + // + // > It is a Syntax Error if [the production] is neither an ObjectLiteral nor + // > an ArrayLiteral and AssignmentTargetType of [the production] is not + // > simple. + // + // Examples where this is used include: + // (a = …); + // const a = …; + // try { … } catch (a) { … } + // where a is the node to be checked. + // + // - checkLValInnerPattern() shall be used if the syntactic construct supports + // anything checkLValPattern() supports, as well as default assignment + // patterns, rest elements, and other constructs that may appear within an + // object or array destructuring pattern. + // + // As a special case, function parameters also use checkLValInnerPattern(), + // as they also support defaults and rest constructs. + // + // These functions deliberately support both assignment and binding constructs, + // as the logic for both is exceedingly similar. If the node is the target of + // an assignment, then bindingType should be set to BIND_NONE. Otherwise, it + // should be set to the appropriate BIND_* constant, like BIND_VAR or + // BIND_LEXICAL. + // + // If the function is called with a non-BIND_NONE bindingType, then + // additionally a checkClashes object may be specified to allow checking for + // duplicate argument names. checkClashes is ignored if the provided construct + // is an assignment (i.e., bindingType is BIND_NONE). - pp$2.checkLVal = function(expr, bindingType, checkClashes) { + pp$2.checkLValSimple = function(expr, bindingType, checkClashes) { if ( bindingType === void 0 ) bindingType = BIND_NONE; + var isBind = bindingType !== BIND_NONE; + switch (expr.type) { case "Identifier": - if (bindingType === BIND_LEXICAL && expr.name === "let") - { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } if (this.strict && this.reservedWordsStrictBind.test(expr.name)) - { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } - if (checkClashes) { - if (has(checkClashes, expr.name)) - { this.raiseRecoverable(expr.start, "Argument name clash"); } - checkClashes[expr.name] = true; + { this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } + if (isBind) { + if (bindingType === BIND_LEXICAL && expr.name === "let") + { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } + if (checkClashes) { + if (has(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } } - if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + break + + case "ChainExpression": + this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side"); break case "MemberExpression": - if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } + if (isBind) { this.raiseRecoverable(expr.start, "Binding member expression"); } break - case "ObjectPattern": - for (var i = 0, list = expr.properties; i < list.length; i += 1) - { - var prop = list[i]; + case "ParenthesizedExpression": + if (isBind) { this.raiseRecoverable(expr.start, "Binding parenthesized expression"); } + return this.checkLValSimple(expr.expression, bindingType, checkClashes) - this.checkLVal(prop, bindingType, checkClashes); + default: + this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue"); } - break + }; - case "Property": - // AssignmentProperty has type === "Property" - this.checkLVal(expr.value, bindingType, checkClashes); + pp$2.checkLValPattern = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "ObjectPattern": + for (var i = 0, list = expr.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.checkLValInnerPattern(prop, bindingType, checkClashes); + } break case "ArrayPattern": for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { var elem = list$1[i$1]; - if (elem) { this.checkLVal(elem, bindingType, checkClashes); } + if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); } } break - case "AssignmentPattern": - this.checkLVal(expr.left, bindingType, checkClashes); + default: + this.checkLValSimple(expr, bindingType, checkClashes); + } + }; + + pp$2.checkLValInnerPattern = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "Property": + // AssignmentProperty has type === "Property" + this.checkLValInnerPattern(expr.value, bindingType, checkClashes); break - case "RestElement": - this.checkLVal(expr.argument, bindingType, checkClashes); + case "AssignmentPattern": + this.checkLValPattern(expr.left, bindingType, checkClashes); break - case "ParenthesizedExpression": - this.checkLVal(expr.expression, bindingType, checkClashes); + case "RestElement": + this.checkLValPattern(expr.argument, bindingType, checkClashes); break default: - this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); + this.checkLValPattern(expr, bindingType, checkClashes); } }; @@ -1971,13 +2081,18 @@ if (this.type.isAssign) { var node = this.startNodeAt(startPos, startLoc); node.operator = this.value; - node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; + if (this.type === types.eq) + { left = this.toAssignable(left, false, refDestructuringErrors); } if (!ownDestructuringErrors) { refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; } - if (refDestructuringErrors.shorthandAssign >= node.left.start) + if (refDestructuringErrors.shorthandAssign >= left.start) { refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly - this.checkLVal(left); + if (this.type === types.eq) + { this.checkLValPattern(left); } + else + { this.checkLValSimple(left); } + node.left = left; this.next(); node.right = this.parseMaybeAssign(noIn); return this.finishNode(node, "AssignmentExpression") @@ -2026,11 +2141,20 @@ if (prec != null && (!noIn || this.type !== types._in)) { if (prec > minPrec) { var logical = this.type === types.logicalOR || this.type === types.logicalAND; + var coalesce = this.type === types.coalesce; + if (coalesce) { + // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions. + // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error. + prec = types.logicalAND.binop; + } var op = this.value; this.next(); var startPos = this.start, startLoc = this.startLoc; var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce); + if ((logical && this.type === types.coalesce) || (coalesce && (this.type === types.logicalOR || this.type === types.logicalAND))) { + this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"); + } return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) } } @@ -2059,7 +2183,7 @@ this.next(); node.argument = this.parseMaybeUnary(null, true); this.checkExpressionErrors(refDestructuringErrors, true); - if (update) { this.checkLVal(node.argument); } + if (update) { this.checkLValSimple(node.argument); } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } @@ -2073,7 +2197,7 @@ node$1.operator = this.value; node$1.prefix = false; node$1.argument = expr; - this.checkLVal(expr); + this.checkLValSimple(expr); this.next(); expr = this.finishNode(node$1, "UpdateExpression"); } @@ -2102,22 +2226,42 @@ pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; + this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && + this.potentialArrowAt === base.start; + var optionalChained = false; + while (true) { - var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); - if (element === base || element.type === "ArrowFunctionExpression") { return element } + var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained); + + if (element.optional) { optionalChained = true; } + if (element === base || element.type === "ArrowFunctionExpression") { + if (optionalChained) { + var chainNode = this.startNodeAt(startPos, startLoc); + chainNode.expression = element; + element = this.finishNode(chainNode, "ChainExpression"); + } + return element + } + base = element; } }; - pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { + pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained) { + var optionalSupported = this.options.ecmaVersion >= 11; + var optional = optionalSupported && this.eat(types.questionDot); + if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); } + var computed = this.eat(types.bracketL); - if (computed || this.eat(types.dot)) { + if (computed || (optional && this.type !== types.parenL && this.type !== types.backQuote) || this.eat(types.dot)) { var node = this.startNodeAt(startPos, startLoc); node.object = base; node.property = computed ? this.parseExpression() : this.parseIdent(this.options.allowReserved !== "never"); node.computed = !!computed; if (computed) { this.expect(types.bracketR); } + if (optionalSupported) { + node.optional = optional; + } base = this.finishNode(node, "MemberExpression"); } else if (!noCalls && this.eat(types.parenL)) { var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; @@ -2125,7 +2269,7 @@ this.awaitPos = 0; this.awaitIdentPos = 0; var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); - if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types.arrow)) { this.checkPatternErrors(refDestructuringErrors, false); this.checkYieldAwaitInDefaultParams(); if (this.awaitIdentPos > 0) @@ -2142,8 +2286,14 @@ var node$1 = this.startNodeAt(startPos, startLoc); node$1.callee = base; node$1.arguments = exprList; + if (optionalSupported) { + node$1.optional = optional; + } base = this.finishNode(node$1, "CallExpression"); } else if (this.type === types.backQuote) { + if (optional || optionalChained) { + this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); + } var node$2 = this.startNodeAt(startPos, startLoc); node$2.tag = base; node$2.quasi = this.parseTemplate({isTagged: true}); @@ -2266,10 +2416,18 @@ pp$3.parseExprImport = function() { var node = this.startNode(); - this.next(); // skip `import` + + // Consume `import` as an identifier for `import.meta`. + // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`. + if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); } + var meta = this.parseIdent(true); + switch (this.type) { case types.parenL: return this.parseDynamicImport(node) + case types.dot: + node.meta = meta; + return this.parseImportMeta(node) default: this.unexpected(); } @@ -2294,11 +2452,27 @@ return this.finishNode(node, "ImportExpression") }; + pp$3.parseImportMeta = function(node) { + this.next(); // skip `.` + + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + + if (node.property.name !== "meta") + { this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); } + if (containsEsc) + { this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); } + if (this.options.sourceType !== "module") + { this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); } + + return this.finishNode(node, "MetaProperty") + }; + pp$3.parseLiteral = function(value) { var node = this.startNode(); node.value = value; node.raw = this.input.slice(this.start, this.end); - if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1); } + if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); } this.next(); return this.finishNode(node, "Literal") }; @@ -2396,10 +2570,12 @@ node.meta = meta; var containsEsc = this.containsEsc; node.property = this.parseIdent(true); - if (node.property.name !== "target" || containsEsc) - { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } - if (!this.inNonArrowFunction()) - { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } + if (node.property.name !== "target") + { this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); } + if (containsEsc) + { this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); } + if (!this.inNonArrowFunction) + { this.raiseRecoverable(node.start, "'new.target' can only be used in functions"); } return this.finishNode(node, "MetaProperty") } var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types._import; @@ -2548,7 +2724,7 @@ } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && - (this.type !== types.comma && this.type !== types.braceR)) { + (this.type !== types.comma && this.type !== types.braceR && this.type !== types.eq)) { if (isGenerator || isAsync) { this.unexpected(); } prop.kind = prop.key.name; this.parsePropertyName(prop); @@ -2571,13 +2747,13 @@ { this.awaitIdentPos = startPos; } prop.kind = "init"; if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); } else if (this.type === types.eq && refDestructuringErrors) { if (refDestructuringErrors.shorthandAssign < 0) { refDestructuringErrors.shorthandAssign = this.start; } - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); } else { - prop.value = prop.key; + prop.value = this.copyNode(prop.key); } prop.shorthand = true; } else { this.unexpected(); } @@ -2683,16 +2859,14 @@ // Add the params to varDeclaredNames to ensure that an error is thrown // if a let/const declaration in the function clashes with one of the params. this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); - node.body = this.parseBlock(false); + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); } + node.body = this.parseBlock(false, undefined, useStrict && !oldStrict); node.expression = false; this.adaptDirectivePrologue(node.body.body); this.labels = oldLabels; } this.exitScope(); - - // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' - if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } - this.strict = oldStrict; }; pp$3.isSimpleParamList = function(params) { @@ -2714,7 +2888,7 @@ { var param = list[i]; - this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); + this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash); } }; @@ -2822,7 +2996,7 @@ var node = this.startNode(); this.next(); - node.argument = this.parseMaybeUnary(null, false); + node.argument = this.parseMaybeUnary(null, true); return this.finishNode(node, "AwaitExpression") }; @@ -2987,6 +3161,12 @@ return finishNodeAt.call(this, node, type, pos, loc) }; + pp$6.copyNode = function(node) { + var newNode = new Node(this, node.start, this.startLoc); + for (var prop in node) { newNode[prop] = node[prop]; } + return newNode + }; + // The algorithm used to determine whether a regexp can appear at a var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { @@ -3091,7 +3271,8 @@ }; types._function.updateContext = types._class.updateContext = function(prevType) { - if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && + if (prevType.beforeExpr && prevType !== types._else && + !(prevType === types.semi && this.curContext() !== types$1.p_stat) && !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) { this.context.push(types$1.f_expr); } @@ -3137,10 +3318,12 @@ var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; var ecma11BinaryProperties = ecma10BinaryProperties; + var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict"; var unicodeBinaryProperties = { 9: ecma9BinaryProperties, 10: ecma10BinaryProperties, - 11: ecma11BinaryProperties + 11: ecma11BinaryProperties, + 12: ecma12BinaryProperties }; // #table-unicode-general-category-values @@ -3150,10 +3333,12 @@ var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; + var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"; var unicodeScriptValues = { 9: ecma9ScriptValues, 10: ecma10ScriptValues, - 11: ecma11ScriptValues + 11: ecma11ScriptValues, + 12: ecma12ScriptValues }; var data = {}; @@ -3174,13 +3359,14 @@ buildUnicodeData(9); buildUnicodeData(10); buildUnicodeData(11); + buildUnicodeData(12); var pp$8 = Parser.prototype; var RegExpValidationState = function RegExpValidationState(parser) { this.parser = parser; this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); - this.unicodeProperties = data[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion]; + this.unicodeProperties = data[parser.options.ecmaVersion >= 12 ? 12 : parser.options.ecmaVersion]; this.source = ""; this.flags = ""; this.start = 0; @@ -3211,49 +3397,61 @@ // If u flag is given, this returns the code point at the index (it combines a surrogate pair). // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). - RegExpValidationState.prototype.at = function at (i) { + RegExpValidationState.prototype.at = function at (i, forceU) { + if ( forceU === void 0 ) forceU = false; + var s = this.source; var l = s.length; if (i >= l) { return -1 } var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { return c } var next = s.charCodeAt(i + 1); return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c }; - RegExpValidationState.prototype.nextIndex = function nextIndex (i) { + RegExpValidationState.prototype.nextIndex = function nextIndex (i, forceU) { + if ( forceU === void 0 ) forceU = false; + var s = this.source; var l = s.length; if (i >= l) { return l } var c = s.charCodeAt(i), next; - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || + if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) { return i + 1 } return i + 2 }; - RegExpValidationState.prototype.current = function current () { - return this.at(this.pos) + RegExpValidationState.prototype.current = function current (forceU) { + if ( forceU === void 0 ) forceU = false; + + return this.at(this.pos, forceU) }; - RegExpValidationState.prototype.lookahead = function lookahead () { - return this.at(this.nextIndex(this.pos)) + RegExpValidationState.prototype.lookahead = function lookahead (forceU) { + if ( forceU === void 0 ) forceU = false; + + return this.at(this.nextIndex(this.pos, forceU), forceU) }; - RegExpValidationState.prototype.advance = function advance () { - this.pos = this.nextIndex(this.pos); + RegExpValidationState.prototype.advance = function advance (forceU) { + if ( forceU === void 0 ) forceU = false; + + this.pos = this.nextIndex(this.pos, forceU); }; - RegExpValidationState.prototype.eat = function eat (ch) { - if (this.current() === ch) { - this.advance(); + RegExpValidationState.prototype.eat = function eat (ch, forceU) { + if ( forceU === void 0 ) forceU = false; + + if (this.current(forceU) === ch) { + this.advance(forceU); return true } return false @@ -3592,9 +3790,9 @@ return false }; - // GroupSpecifier[U] :: + // GroupSpecifier :: // [empty] - // `?` GroupName[?U] + // `?` GroupName pp$8.regexp_groupSpecifier = function(state) { if (state.eat(0x3F /* ? */)) { if (this.regexp_eatGroupName(state)) { @@ -3608,8 +3806,8 @@ } }; - // GroupName[U] :: - // `<` RegExpIdentifierName[?U] `>` + // GroupName :: + // `<` RegExpIdentifierName `>` // Note: this updates `state.lastStringValue` property with the eaten name. pp$8.regexp_eatGroupName = function(state) { state.lastStringValue = ""; @@ -3622,9 +3820,9 @@ return false }; - // RegExpIdentifierName[U] :: - // RegExpIdentifierStart[?U] - // RegExpIdentifierName[?U] RegExpIdentifierPart[?U] + // RegExpIdentifierName :: + // RegExpIdentifierStart + // RegExpIdentifierName RegExpIdentifierPart // Note: this updates `state.lastStringValue` property with the eaten name. pp$8.regexp_eatRegExpIdentifierName = function(state) { state.lastStringValue = ""; @@ -3638,17 +3836,18 @@ return false }; - // RegExpIdentifierStart[U] :: + // RegExpIdentifierStart :: // UnicodeIDStart // `$` // `_` - // `\` RegExpUnicodeEscapeSequence[?U] + // `\` RegExpUnicodeEscapeSequence[+U] pp$8.regexp_eatRegExpIdentifierStart = function(state) { var start = state.pos; - var ch = state.current(); - state.advance(); + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { ch = state.lastIntValue; } if (isRegExpIdentifierStart(ch)) { @@ -3663,19 +3862,20 @@ return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ } - // RegExpIdentifierPart[U] :: + // RegExpIdentifierPart :: // UnicodeIDContinue // `$` // `_` - // `\` RegExpUnicodeEscapeSequence[?U] + // `\` RegExpUnicodeEscapeSequence[+U] // // pp$8.regexp_eatRegExpIdentifierPart = function(state) { var start = state.pos; - var ch = state.current(); - state.advance(); + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { ch = state.lastIntValue; } if (isRegExpIdentifierPart(ch)) { @@ -3745,7 +3945,7 @@ this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || - this.regexp_eatRegExpUnicodeEscapeSequence(state) || + this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || this.regexp_eatIdentityEscape(state) ) @@ -3818,13 +4018,16 @@ } // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence - pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state) { + pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) { + if ( forceU === void 0 ) forceU = false; + var start = state.pos; + var switchU = forceU || state.switchU; if (state.eat(0x75 /* u */)) { if (this.regexp_eatFixedHexDigits(state, 4)) { var lead = state.lastIntValue; - if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { + if (switchU && lead >= 0xD800 && lead <= 0xDBFF) { var leadSurrogateEnd = state.pos; if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { var trail = state.lastIntValue; @@ -3839,7 +4042,7 @@ return true } if ( - state.switchU && + switchU && state.eat(0x7B /* { */) && this.regexp_eatHexDigits(state) && state.eat(0x7D /* } */) && @@ -3847,7 +4050,7 @@ ) { return true } - if (state.switchU) { + if (switchU) { state.raise("Invalid unicode escape"); } state.pos = start; @@ -4447,7 +4650,13 @@ pp$9.readToken_pipe_amp = function(code) { // '|&' var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } + if (next === code) { + if (this.options.ecmaVersion >= 12) { + var next2 = this.input.charCodeAt(this.pos + 2); + if (next2 === 61) { return this.finishOp(types.assign, 3) } + } + return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) + } if (next === 61) { return this.finishOp(types.assign, 2) } return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) }; @@ -4503,6 +4712,25 @@ return this.finishOp(code === 61 ? types.eq : types.prefix, 1) }; + pp$9.readToken_question = function() { // '?' + var ecmaVersion = this.options.ecmaVersion; + if (ecmaVersion >= 11) { + var next = this.input.charCodeAt(this.pos + 1); + if (next === 46) { + var next2 = this.input.charCodeAt(this.pos + 2); + if (next2 < 48 || next2 > 57) { return this.finishOp(types.questionDot, 2) } + } + if (next === 63) { + if (ecmaVersion >= 12) { + var next2$1 = this.input.charCodeAt(this.pos + 2); + if (next2$1 === 61) { return this.finishOp(types.assign, 3) } + } + return this.finishOp(types.coalesce, 2) + } + } + return this.finishOp(types.question, 1) + }; + pp$9.getTokenFromCode = function(code) { switch (code) { // The interpretation of a dot depends on whether it is followed @@ -4520,7 +4748,6 @@ case 123: ++this.pos; return this.finishToken(types.braceL) case 125: ++this.pos; return this.finishToken(types.braceR) case 58: ++this.pos; return this.finishToken(types.colon) - case 63: ++this.pos; return this.finishToken(types.question) case 96: // '`' if (this.options.ecmaVersion < 6) { break } @@ -4570,6 +4797,9 @@ case 61: case 33: // '=!' return this.readToken_eq_excl(code) + case 63: // '?' + return this.readToken_question() + case 126: // '~' return this.finishOp(types.prefix, 1) } @@ -4625,30 +4855,67 @@ // were read, the integer value otherwise. When `len` is given, this // will return `null` unless the integer has exactly `len` digits. - pp$9.readInt = function(radix, len) { - var start = this.pos, total = 0; - for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) { + pp$9.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) { + // `len` is used for character escape sequences. In that case, disallow separators. + var allowSeparators = this.options.ecmaVersion >= 12 && len === undefined; + + // `maybeLegacyOctalNumericLiteral` is true if it doesn't have prefix (0x,0o,0b) + // and isn't fraction part nor exponent part. In that case, if the first digit + // is zero then disallow separators. + var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48; + + var start = this.pos, total = 0, lastCode = 0; + for (var i = 0, e = len == null ? Infinity : len; i < e; ++i, ++this.pos) { var code = this.input.charCodeAt(this.pos), val = (void 0); + + if (allowSeparators && code === 95) { + if (isLegacyOctalNumericLiteral) { this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"); } + if (lastCode === 95) { this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"); } + if (i === 0) { this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"); } + lastCode = code; + continue + } + if (code >= 97) { val = code - 97 + 10; } // a else if (code >= 65) { val = code - 65 + 10; } // A else if (code >= 48 && code <= 57) { val = code - 48; } // 0-9 else { val = Infinity; } if (val >= radix) { break } - ++this.pos; + lastCode = code; total = total * radix + val; } + + if (allowSeparators && lastCode === 95) { this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"); } if (this.pos === start || len != null && this.pos - start !== len) { return null } return total }; + function stringToNumber(str, isLegacyOctalNumericLiteral) { + if (isLegacyOctalNumericLiteral) { + return parseInt(str, 8) + } + + // `parseFloat(value)` stops parsing at the first numeric separator then returns a wrong value. + return parseFloat(str.replace(/_/g, "")) + } + + function stringToBigInt(str) { + if (typeof BigInt !== "function") { + return null + } + + // `BigInt(value)` throws syntax error if the string contains numeric separators. + return BigInt(str.replace(/_/g, "")) + } + pp$9.readRadixNumber = function(radix) { var start = this.pos; this.pos += 2; // 0x var val = this.readInt(radix); if (val == null) { this.raise(this.start + 2, "Expected number in radix " + radix); } if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) { - val = typeof BigInt !== "undefined" ? BigInt(this.input.slice(start, this.pos)) : null; + val = stringToBigInt(this.input.slice(start, this.pos)); ++this.pos; } else if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); } return this.finishToken(types.num, val) @@ -4658,13 +4925,12 @@ pp$9.readNumber = function(startsWithDot) { var start = this.pos; - if (!startsWithDot && this.readInt(10) === null) { this.raise(start, "Invalid number"); } + if (!startsWithDot && this.readInt(10, undefined, true) === null) { this.raise(start, "Invalid number"); } var octal = this.pos - start >= 2 && this.input.charCodeAt(start) === 48; if (octal && this.strict) { this.raise(start, "Invalid number"); } var next = this.input.charCodeAt(this.pos); if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) { - var str$1 = this.input.slice(start, this.pos); - var val$1 = typeof BigInt !== "undefined" ? BigInt(str$1) : null; + var val$1 = stringToBigInt(this.input.slice(start, this.pos)); ++this.pos; if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); } return this.finishToken(types.num, val$1) @@ -4682,8 +4948,7 @@ } if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); } - var str = this.input.slice(start, this.pos); - var val = octal ? parseInt(str, 8) : parseFloat(str); + var val = stringToNumber(this.input.slice(start, this.pos), octal); return this.finishToken(types.num, val) }; @@ -4846,6 +5111,12 @@ return "" case 56: case 57: + if (this.strict) { + this.invalidStringToken( + this.pos - 1, + "Invalid escape sequence" + ); + } if (inTemplate) { var codePos = this.pos - 1; @@ -4942,7 +5213,7 @@ // Acorn is a tiny, fast JavaScript parser written in JavaScript. - var version = "7.1.0"; + var version = "8.0.4"; Parser.acorn = { Parser: Parser, @@ -5017,4 +5288,5 @@ Object.defineProperty(exports, '__esModule', { value: true }); -})); +}))); +//# sourceMappingURL=acorn.js.map diff --git a/deps/acorn/acorn/dist/acorn.js.map b/deps/acorn/acorn/dist/acorn.js.map new file mode 100644 index 00000000000000..7781620d64592d --- /dev/null +++ b/deps/acorn/acorn/dist/acorn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"acorn.js","sources":["../src/identifier.js","../src/tokentype.js","../src/whitespace.js","../src/util.js","../src/locutil.js","../src/options.js","../src/scopeflags.js","../src/state.js","../src/parseutil.js","../src/statement.js","../src/lval.js","../src/expression.js","../src/location.js","../src/scope.js","../src/node.js","../src/tokencontext.js","../src/unicode-property-data.js","../src/regexp.js","../src/tokenize.js","../src/index.js"],"sourcesContent":["// Reserved word lists for various dialects of the language\n\nexport const reservedWords = {\n 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\",\n 5: \"class enum extends super const export import\",\n 6: \"enum\",\n strict: \"implements interface let package private protected public static yield\",\n strictBind: \"eval arguments\"\n}\n\n// And the keywords\n\nconst 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\"\n\nexport const keywords = {\n 5: ecma5AndLessKeywords,\n \"5module\": ecma5AndLessKeywords + \" export import\",\n 6: ecma5AndLessKeywords + \" const class extends export import super\"\n}\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point above 128.\n// Generated by `bin/generate-identifier-regex.js`.\nlet 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\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\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\\u0860-\\u086a\\u08a0-\\u08b4\\u08b6-\\u08c7\\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\\u09fc\\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\\u0d04-\\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\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\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-\\u1878\\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\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\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-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\u9ffc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7bf\\ua7c2-\\ua7ca\\ua7f5-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\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-\\uab69\\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\"\nlet 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\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u08d3-\\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\\u09fe\\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\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\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\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\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\\u1abf\\u1ac0\\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\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1df9\\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\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\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\"\n\nconst nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\")\nconst nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\")\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null\n\n// These are a run-length and offset encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by bin/generate-identifier-regex.js\n\n// eslint-disable-next-line comma-spacing\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,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,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,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,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,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,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,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,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938]\n\n// eslint-disable-next-line comma-spacing\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,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,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239]\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code, set) {\n let pos = 0x10000\n for (let i = 0; i < set.length; i += 2) {\n pos += set[i]\n if (pos > code) return false\n pos += set[i + 1]\n if (pos >= code) return true\n }\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code, astral) {\n if (code < 65) return code === 36\n if (code < 91) return true\n if (code < 97) return code === 95\n if (code < 123) return true\n if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n if (astral === false) return false\n return isInAstralSet(code, astralIdentifierStartCodes)\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code, astral) {\n if (code < 48) return code === 36\n if (code < 58) return true\n if (code < 65) return false\n if (code < 91) return true\n if (code < 97) return code === 95\n if (code < 123) return true\n if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code))\n if (astral === false) return false\n return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)\n}\n","// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between regular\n// expressions and divisions. It is set on all token types that can\n// be followed by an expression (thus, a slash after them would be a\n// regular expression).\n//\n// The `startsExpr` property is used to check if the token ends a\n// `yield` expression. It is set on all token types that either can\n// directly start an expression (like a quotation mark) or can\n// continue an expression (like the body of a string).\n//\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nexport class TokenType {\n constructor(label, conf = {}) {\n this.label = label\n this.keyword = conf.keyword\n this.beforeExpr = !!conf.beforeExpr\n this.startsExpr = !!conf.startsExpr\n this.isLoop = !!conf.isLoop\n this.isAssign = !!conf.isAssign\n this.prefix = !!conf.prefix\n this.postfix = !!conf.postfix\n this.binop = conf.binop || null\n this.updateContext = null\n }\n}\n\nfunction binop(name, prec) {\n return new TokenType(name, {beforeExpr: true, binop: prec})\n}\nconst beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}\n\n// Map keyword names to token types.\n\nexport const keywords = {}\n\n// Succinct definitions of keyword token types\nfunction kw(name, options = {}) {\n options.keyword = name\n return keywords[name] = new TokenType(name, options)\n}\n\nexport const types = {\n num: new TokenType(\"num\", startsExpr),\n regexp: new TokenType(\"regexp\", startsExpr),\n string: new TokenType(\"string\", startsExpr),\n name: new TokenType(\"name\", startsExpr),\n eof: new TokenType(\"eof\"),\n\n // Punctuation token types.\n bracketL: new TokenType(\"[\", {beforeExpr: true, startsExpr: true}),\n bracketR: new TokenType(\"]\"),\n braceL: new TokenType(\"{\", {beforeExpr: true, startsExpr: true}),\n braceR: new TokenType(\"}\"),\n parenL: new TokenType(\"(\", {beforeExpr: true, startsExpr: true}),\n parenR: new TokenType(\")\"),\n comma: new TokenType(\",\", beforeExpr),\n semi: new TokenType(\";\", beforeExpr),\n colon: new TokenType(\":\", beforeExpr),\n dot: new TokenType(\".\"),\n question: new TokenType(\"?\", beforeExpr),\n questionDot: new TokenType(\"?.\"),\n arrow: new TokenType(\"=>\", beforeExpr),\n template: new TokenType(\"template\"),\n invalidTemplate: new TokenType(\"invalidTemplate\"),\n ellipsis: new TokenType(\"...\", beforeExpr),\n backQuote: new TokenType(\"`\", startsExpr),\n dollarBraceL: new TokenType(\"${\", {beforeExpr: true, startsExpr: true}),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n eq: new TokenType(\"=\", {beforeExpr: true, isAssign: true}),\n assign: new TokenType(\"_=\", {beforeExpr: true, isAssign: true}),\n incDec: new TokenType(\"++/--\", {prefix: true, postfix: true, startsExpr: true}),\n prefix: new TokenType(\"!/~\", {beforeExpr: true, prefix: true, startsExpr: true}),\n logicalOR: binop(\"||\", 1),\n logicalAND: binop(\"&&\", 2),\n bitwiseOR: binop(\"|\", 3),\n bitwiseXOR: binop(\"^\", 4),\n bitwiseAND: binop(\"&\", 5),\n equality: binop(\"==/!=/===/!==\", 6),\n relational: binop(\"/<=/>=\", 7),\n bitShift: binop(\"<>/>>>\", 8),\n plusMin: new TokenType(\"+/-\", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),\n modulo: binop(\"%\", 10),\n star: binop(\"*\", 10),\n slash: binop(\"/\", 10),\n starstar: new TokenType(\"**\", {beforeExpr: true}),\n coalesce: binop(\"??\", 1),\n\n // Keyword token types.\n _break: kw(\"break\"),\n _case: kw(\"case\", beforeExpr),\n _catch: kw(\"catch\"),\n _continue: kw(\"continue\"),\n _debugger: kw(\"debugger\"),\n _default: kw(\"default\", beforeExpr),\n _do: kw(\"do\", {isLoop: true, beforeExpr: true}),\n _else: kw(\"else\", beforeExpr),\n _finally: kw(\"finally\"),\n _for: kw(\"for\", {isLoop: true}),\n _function: kw(\"function\", startsExpr),\n _if: kw(\"if\"),\n _return: kw(\"return\", beforeExpr),\n _switch: kw(\"switch\"),\n _throw: kw(\"throw\", beforeExpr),\n _try: kw(\"try\"),\n _var: kw(\"var\"),\n _const: kw(\"const\"),\n _while: kw(\"while\", {isLoop: true}),\n _with: kw(\"with\"),\n _new: kw(\"new\", {beforeExpr: true, startsExpr: true}),\n _this: kw(\"this\", startsExpr),\n _super: kw(\"super\", startsExpr),\n _class: kw(\"class\", startsExpr),\n _extends: kw(\"extends\", beforeExpr),\n _export: kw(\"export\"),\n _import: kw(\"import\", startsExpr),\n _null: kw(\"null\", startsExpr),\n _true: kw(\"true\", startsExpr),\n _false: kw(\"false\", startsExpr),\n _in: kw(\"in\", {beforeExpr: true, binop: 7}),\n _instanceof: kw(\"instanceof\", {beforeExpr: true, binop: 7}),\n _typeof: kw(\"typeof\", {beforeExpr: true, prefix: true, startsExpr: true}),\n _void: kw(\"void\", {beforeExpr: true, prefix: true, startsExpr: true}),\n _delete: kw(\"delete\", {beforeExpr: true, prefix: true, startsExpr: true})\n}\n","// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\n\nexport const lineBreak = /\\r\\n?|\\n|\\u2028|\\u2029/\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\")\n\nexport function isNewLine(code, ecma2019String) {\n return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029))\n}\n\nexport const nonASCIIwhitespace = /[\\u1680\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff]/\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g\n","const {hasOwnProperty, toString} = Object.prototype\n\n// Checks if an object has a property.\n\nexport function has(obj, propName) {\n return hasOwnProperty.call(obj, propName)\n}\n\nexport const isArray = Array.isArray || ((obj) => (\n toString.call(obj) === \"[object Array]\"\n))\n\nexport function wordsRegexp(words) {\n return new RegExp(\"^(?:\" + words.replace(/ /g, \"|\") + \")$\")\n}\n","import {lineBreakG} from \"./whitespace.js\"\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n constructor(line, col) {\n this.line = line\n this.column = col\n }\n\n offset(n) {\n return new Position(this.line, this.column + n)\n }\n}\n\nexport class SourceLocation {\n constructor(p, start, end) {\n this.start = start\n this.end = end\n if (p.sourceFile !== null) this.source = p.sourceFile\n }\n}\n\n// The `getLineInfo` function is mostly useful when the\n// `locations` option is off (for performance reasons) and you\n// want to find the line/column position for a given character\n// offset. `input` should be the code string that the offset refers\n// into.\n\nexport function getLineInfo(input, offset) {\n for (let line = 1, cur = 0;;) {\n lineBreakG.lastIndex = cur\n let match = lineBreakG.exec(input)\n if (match && match.index < offset) {\n ++line\n cur = match.index + match[0].length\n } else {\n return new Position(line, offset - cur)\n }\n }\n}\n","import {has, isArray} from \"./util.js\"\nimport {SourceLocation} from \"./locutil.js\"\n\n// A second argument must be given to configure the parser process.\n// These options are recognized (only `ecmaVersion` is required):\n\nexport const defaultOptions = {\n // `ecmaVersion` indicates the ECMAScript version to parse. Must be\n // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10\n // (2019), 11 (2020), 12 (2021), or `\"latest\"` (the latest version\n // the library supports). This influences support for strict mode,\n // the set of reserved words, and support for new syntax features.\n ecmaVersion: null,\n // `sourceType` indicates the mode the code should be parsed in.\n // Can be either `\"script\"` or `\"module\"`. This influences global\n // strict mode and parsing of `import` and `export` declarations.\n sourceType: \"script\",\n // `onInsertedSemicolon` can be a callback that will be called\n // when a semicolon is automatically inserted. It will be passed\n // the position of the comma as an offset, and if `locations` is\n // enabled, it is given the location as a `{line, column}` object\n // as second argument.\n onInsertedSemicolon: null,\n // `onTrailingComma` is similar to `onInsertedSemicolon`, but for\n // trailing commas.\n onTrailingComma: null,\n // By default, reserved words are only enforced if ecmaVersion >= 5.\n // Set `allowReserved` to a boolean value to explicitly turn this on\n // an off. When this option has the value \"never\", reserved words\n // and keywords can also not be used as property names.\n allowReserved: null,\n // When enabled, a return at the top level is not considered an\n // error.\n allowReturnOutsideFunction: false,\n // When enabled, import/export statements are not constrained to\n // appearing at the top of the program.\n allowImportExportEverywhere: false,\n // When enabled, await identifiers are allowed to appear at the top-level scope,\n // but they are still not allowed in non-async functions.\n allowAwaitOutsideFunction: false,\n // When enabled, hashbang directive in the beginning of file\n // is allowed and treated as a line comment.\n allowHashBang: false,\n // When `locations` is on, `loc` properties holding objects with\n // `start` and `end` properties in `{line, column}` form (with\n // line being 1-based and column 0-based) will be attached to the\n // nodes.\n locations: false,\n // A function can be passed as `onToken` option, which will\n // cause Acorn to call that function with object in the same\n // format as tokens returned from `tokenizer().getToken()`. Note\n // that you are not allowed to call the parser from the\n // callback—that will corrupt its internal state.\n onToken: null,\n // A function can be passed as `onComment` option, which will\n // cause Acorn to call that function with `(block, text, start,\n // end)` parameters whenever a comment is skipped. `block` is a\n // boolean indicating whether this is a block (`/* */`) comment,\n // `text` is the content of the comment, and `start` and `end` are\n // character offsets that denote the start and end of the comment.\n // When the `locations` option is on, two more parameters are\n // passed, the full `{line, column}` locations of the start and\n // end of the comments. Note that you are not allowed to call the\n // parser from the callback—that will corrupt its internal state.\n onComment: null,\n // Nodes have their start and end characters offsets recorded in\n // `start` and `end` properties (directly on the node, rather than\n // the `loc` object, which holds line/column data. To also add a\n // [semi-standardized][range] `range` property holding a `[start,\n // end]` array with the same numbers, set the `ranges` option to\n // `true`.\n //\n // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678\n ranges: false,\n // It is possible to parse multiple files into a single AST by\n // passing the tree produced by parsing the first file as\n // `program` option in subsequent parses. This will add the\n // toplevel forms of the parsed file to the `Program` (top) node\n // of an existing parse tree.\n program: null,\n // When `locations` is on, you can pass this to record the source\n // file in every node's `loc` object.\n sourceFile: null,\n // This value, if given, is stored in every node, whether\n // `locations` is on or off.\n directSourceFile: null,\n // When enabled, parenthesized expressions are represented by\n // (non-standard) ParenthesizedExpression nodes\n preserveParens: false\n}\n\n// Interpret and default an options object\n\nlet warnedAboutEcmaVersion = false\n\nexport function getOptions(opts) {\n let options = {}\n\n for (let opt in defaultOptions)\n options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]\n\n if (options.ecmaVersion === \"latest\") {\n options.ecmaVersion = 1e8\n } else if (options.ecmaVersion == null) {\n if (!warnedAboutEcmaVersion && typeof console === \"object\" && console.warn) {\n warnedAboutEcmaVersion = true\n console.warn(\"Since Acorn 8.0.0, options.ecmaVersion is required.\\nDefaulting to 2020, but this will stop working in the future.\")\n }\n options.ecmaVersion = 11\n } else if (options.ecmaVersion >= 2015) {\n options.ecmaVersion -= 2009\n }\n\n if (options.allowReserved == null)\n options.allowReserved = options.ecmaVersion < 5\n\n if (isArray(options.onToken)) {\n let tokens = options.onToken\n options.onToken = (token) => tokens.push(token)\n }\n if (isArray(options.onComment))\n options.onComment = pushComment(options, options.onComment)\n\n return options\n}\n\nfunction pushComment(options, array) {\n return function(block, text, start, end, startLoc, endLoc) {\n let comment = {\n type: block ? \"Block\" : \"Line\",\n value: text,\n start: start,\n end: end\n }\n if (options.locations)\n comment.loc = new SourceLocation(this, startLoc, endLoc)\n if (options.ranges)\n comment.range = [start, end]\n array.push(comment)\n }\n}\n","// Each scope gets a bitset that may contain these flags\nexport const\n SCOPE_TOP = 1,\n SCOPE_FUNCTION = 2,\n SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION,\n SCOPE_ASYNC = 4,\n SCOPE_GENERATOR = 8,\n SCOPE_ARROW = 16,\n SCOPE_SIMPLE_CATCH = 32,\n SCOPE_SUPER = 64,\n SCOPE_DIRECT_SUPER = 128\n\nexport function functionFlags(async, generator) {\n return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0)\n}\n\n// Used in checkLVal* and declareName to determine the type of a binding\nexport const\n BIND_NONE = 0, // Not a binding\n BIND_VAR = 1, // Var-style binding\n BIND_LEXICAL = 2, // Let- or const-style binding\n BIND_FUNCTION = 3, // Function declaration\n BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding\n BIND_OUTSIDE = 5 // Special case for function names as bound inside the function\n","import {reservedWords, keywords} from \"./identifier.js\"\nimport {types as tt} from \"./tokentype.js\"\nimport {lineBreak} from \"./whitespace.js\"\nimport {getOptions} from \"./options.js\"\nimport {wordsRegexp} from \"./util.js\"\nimport {SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_SUPER, SCOPE_DIRECT_SUPER} from \"./scopeflags.js\"\n\nexport class Parser {\n constructor(options, input, startPos) {\n this.options = options = getOptions(options)\n this.sourceFile = options.sourceFile\n this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : options.sourceType === \"module\" ? \"5module\" : 5])\n let reserved = \"\"\n if (options.allowReserved !== true) {\n reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3]\n if (options.sourceType === \"module\") reserved += \" await\"\n }\n this.reservedWords = wordsRegexp(reserved)\n let reservedStrict = (reserved ? reserved + \" \" : \"\") + reservedWords.strict\n this.reservedWordsStrict = wordsRegexp(reservedStrict)\n this.reservedWordsStrictBind = wordsRegexp(reservedStrict + \" \" + reservedWords.strictBind)\n this.input = String(input)\n\n // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n this.containsEsc = false\n\n // Set up token state\n\n // The current position of the tokenizer in the input.\n if (startPos) {\n this.pos = startPos\n this.lineStart = this.input.lastIndexOf(\"\\n\", startPos - 1) + 1\n this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length\n } else {\n this.pos = this.lineStart = 0\n this.curLine = 1\n }\n\n // Properties of the current token:\n // Its type\n this.type = tt.eof\n // For tokens that include more information than their type, the value\n this.value = null\n // Its start and end offset\n this.start = this.end = this.pos\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n this.startLoc = this.endLoc = this.curPosition()\n\n // Position information for the previous token\n this.lastTokEndLoc = this.lastTokStartLoc = null\n this.lastTokStart = this.lastTokEnd = this.pos\n\n // The context stack is used to superficially track syntactic\n // context to predict whether a regular expression is allowed in a\n // given position.\n this.context = this.initialContext()\n this.exprAllowed = true\n\n // Figure out if it's a module code.\n this.inModule = options.sourceType === \"module\"\n this.strict = this.inModule || this.strictDirective(this.pos)\n\n // Used to signify the start of a potential arrow function\n this.potentialArrowAt = -1\n\n // Positions to delayed-check that yield/await does not exist in default parameters.\n this.yieldPos = this.awaitPos = this.awaitIdentPos = 0\n // Labels in scope.\n this.labels = []\n // Thus-far undefined exports.\n this.undefinedExports = {}\n\n // If enabled, skip leading hashbang line.\n if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === \"#!\")\n this.skipLineComment(2)\n\n // Scope tracking for duplicate variable names (see scope.js)\n this.scopeStack = []\n this.enterScope(SCOPE_TOP)\n\n // For RegExp validation\n this.regexpState = null\n }\n\n parse() {\n let node = this.options.program || this.startNode()\n this.nextToken()\n return this.parseTopLevel(node)\n }\n\n get inFunction() { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }\n get inGenerator() { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }\n get inAsync() { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }\n get allowSuper() { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }\n get allowDirectSuper() { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }\n get treatFunctionsAsVar() { return this.treatFunctionsAsVarInScope(this.currentScope()) }\n get inNonArrowFunction() { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }\n\n static extend(...plugins) {\n let cls = this\n for (let i = 0; i < plugins.length; i++) cls = plugins[i](cls)\n return cls\n }\n\n static parse(input, options) {\n return new this(options, input).parse()\n }\n\n static parseExpressionAt(input, pos, options) {\n let parser = new this(options, input, pos)\n parser.nextToken()\n return parser.parseExpression()\n }\n\n static tokenizer(input, options) {\n return new this(options, input)\n }\n}\n","import {types as tt} from \"./tokentype.js\"\nimport {Parser} from \"./state.js\"\nimport {lineBreak, skipWhiteSpace} from \"./whitespace.js\"\n\nconst pp = Parser.prototype\n\n// ## Parser utilities\n\nconst literal = /^(?:'((?:\\\\.|[^'\\\\])*?)'|\"((?:\\\\.|[^\"\\\\])*?)\")/\npp.strictDirective = function(start) {\n for (;;) {\n // Try to find string literal.\n skipWhiteSpace.lastIndex = start\n start += skipWhiteSpace.exec(this.input)[0].length\n let match = literal.exec(this.input.slice(start))\n if (!match) return false\n if ((match[1] || match[2]) === \"use strict\") {\n skipWhiteSpace.lastIndex = start + match[0].length\n let spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length\n let next = this.input.charAt(end)\n return next === \";\" || next === \"}\" ||\n (lineBreak.test(spaceAfter[0]) &&\n !(/[(`.[+\\-/*%<>=,?^&]/.test(next) || next === \"!\" && this.input.charAt(end + 1) === \"=\"))\n }\n start += match[0].length\n\n // Skip semicolon, if any.\n skipWhiteSpace.lastIndex = start\n start += skipWhiteSpace.exec(this.input)[0].length\n if (this.input[start] === \";\")\n start++\n }\n}\n\n// Predicate that tests whether the next token is of the given\n// type, and if yes, consumes it as a side effect.\n\npp.eat = function(type) {\n if (this.type === type) {\n this.next()\n return true\n } else {\n return false\n }\n}\n\n// Tests whether parsed token is a contextual keyword.\n\npp.isContextual = function(name) {\n return this.type === tt.name && this.value === name && !this.containsEsc\n}\n\n// Consumes contextual keyword if possible.\n\npp.eatContextual = function(name) {\n if (!this.isContextual(name)) return false\n this.next()\n return true\n}\n\n// Asserts that following token is given contextual keyword.\n\npp.expectContextual = function(name) {\n if (!this.eatContextual(name)) this.unexpected()\n}\n\n// Test whether a semicolon can be inserted at the current position.\n\npp.canInsertSemicolon = function() {\n return this.type === tt.eof ||\n this.type === tt.braceR ||\n lineBreak.test(this.input.slice(this.lastTokEnd, this.start))\n}\n\npp.insertSemicolon = function() {\n if (this.canInsertSemicolon()) {\n if (this.options.onInsertedSemicolon)\n this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc)\n return true\n }\n}\n\n// Consume a semicolon, or, failing that, see if we are allowed to\n// pretend that there is a semicolon at this position.\n\npp.semicolon = function() {\n if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()\n}\n\npp.afterTrailingComma = function(tokType, notNext) {\n if (this.type === tokType) {\n if (this.options.onTrailingComma)\n this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)\n if (!notNext)\n this.next()\n return true\n }\n}\n\n// Expect a token of a given type. If found, consume it, otherwise,\n// raise an unexpected token error.\n\npp.expect = function(type) {\n this.eat(type) || this.unexpected()\n}\n\n// Raise an unexpected token error.\n\npp.unexpected = function(pos) {\n this.raise(pos != null ? pos : this.start, \"Unexpected token\")\n}\n\nexport function DestructuringErrors() {\n this.shorthandAssign =\n this.trailingComma =\n this.parenthesizedAssign =\n this.parenthesizedBind =\n this.doubleProto =\n -1\n}\n\npp.checkPatternErrors = function(refDestructuringErrors, isAssign) {\n if (!refDestructuringErrors) return\n if (refDestructuringErrors.trailingComma > -1)\n this.raiseRecoverable(refDestructuringErrors.trailingComma, \"Comma is not permitted after the rest element\")\n let parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind\n if (parens > -1) this.raiseRecoverable(parens, \"Parenthesized pattern\")\n}\n\npp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {\n if (!refDestructuringErrors) return false\n let {shorthandAssign, doubleProto} = refDestructuringErrors\n if (!andThrow) return shorthandAssign >= 0 || doubleProto >= 0\n if (shorthandAssign >= 0)\n this.raise(shorthandAssign, \"Shorthand property assignments are valid only in destructuring patterns\")\n if (doubleProto >= 0)\n this.raiseRecoverable(doubleProto, \"Redefinition of __proto__ property\")\n}\n\npp.checkYieldAwaitInDefaultParams = function() {\n if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))\n this.raise(this.yieldPos, \"Yield expression cannot be a default value\")\n if (this.awaitPos)\n this.raise(this.awaitPos, \"Await expression cannot be a default value\")\n}\n\npp.isSimpleAssignTarget = function(expr) {\n if (expr.type === \"ParenthesizedExpression\")\n return this.isSimpleAssignTarget(expr.expression)\n return expr.type === \"Identifier\" || expr.type === \"MemberExpression\"\n}\n","import {types as tt} from \"./tokentype.js\"\nimport {Parser} from \"./state.js\"\nimport {lineBreak, skipWhiteSpace} from \"./whitespace.js\"\nimport {isIdentifierStart, isIdentifierChar, keywordRelationalOperator} from \"./identifier.js\"\nimport {has} from \"./util.js\"\nimport {DestructuringErrors} from \"./parseutil.js\"\nimport {functionFlags, SCOPE_SIMPLE_CATCH, BIND_SIMPLE_CATCH, BIND_LEXICAL, BIND_VAR, BIND_FUNCTION} from \"./scopeflags.js\"\n\nconst pp = Parser.prototype\n\n// ### Statement parsing\n\n// Parse a program. Initializes the parser, reads any number of\n// statements, and wraps them in a Program node. Optionally takes a\n// `program` argument. If present, the statements will be appended\n// to its body instead of creating a new node.\n\npp.parseTopLevel = function(node) {\n let exports = {}\n if (!node.body) node.body = []\n while (this.type !== tt.eof) {\n let stmt = this.parseStatement(null, true, exports)\n node.body.push(stmt)\n }\n if (this.inModule)\n for (let name of Object.keys(this.undefinedExports))\n this.raiseRecoverable(this.undefinedExports[name].start, `Export '${name}' is not defined`)\n this.adaptDirectivePrologue(node.body)\n this.next()\n node.sourceType = this.options.sourceType\n return this.finishNode(node, \"Program\")\n}\n\nconst loopLabel = {kind: \"loop\"}, switchLabel = {kind: \"switch\"}\n\npp.isLet = function(context) {\n if (this.options.ecmaVersion < 6 || !this.isContextual(\"let\")) return false\n skipWhiteSpace.lastIndex = this.pos\n let skip = skipWhiteSpace.exec(this.input)\n let next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)\n // For ambiguous cases, determine if a LexicalDeclaration (or only a\n // Statement) is allowed here. If context is not empty then only a Statement\n // is allowed. However, `let [` is an explicit negative lookahead for\n // ExpressionStatement, so special-case it first.\n if (nextCh === 91) return true // '['\n if (context) return false\n\n if (nextCh === 123) return true // '{'\n if (isIdentifierStart(nextCh, true)) {\n let pos = next + 1\n while (isIdentifierChar(this.input.charCodeAt(pos), true)) ++pos\n let ident = this.input.slice(next, pos)\n if (!keywordRelationalOperator.test(ident)) return true\n }\n return false\n}\n\n// check 'async [no LineTerminator here] function'\n// - 'async /*foo*/ function' is OK.\n// - 'async /*\\n*/ function' is invalid.\npp.isAsyncFunction = function() {\n if (this.options.ecmaVersion < 8 || !this.isContextual(\"async\"))\n return false\n\n skipWhiteSpace.lastIndex = this.pos\n let skip = skipWhiteSpace.exec(this.input)\n let next = this.pos + skip[0].length\n return !lineBreak.test(this.input.slice(this.pos, next)) &&\n this.input.slice(next, next + 8) === \"function\" &&\n (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8)))\n}\n\n// Parse a single statement.\n//\n// If expecting a statement and finding a slash operator, parse a\n// regular expression literal. This is to handle cases like\n// `if (foo) /blah/.exec(foo)`, where looking at the previous token\n// does not help.\n\npp.parseStatement = function(context, topLevel, exports) {\n let starttype = this.type, node = this.startNode(), kind\n\n if (this.isLet(context)) {\n starttype = tt._var\n kind = \"let\"\n }\n\n // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n\n switch (starttype) {\n case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword)\n case tt._debugger: return this.parseDebuggerStatement(node)\n case tt._do: return this.parseDoStatement(node)\n case tt._for: return this.parseForStatement(node)\n case tt._function:\n // Function as sole body of either an if statement or a labeled statement\n // works, but not when it is part of a labeled statement that is the sole\n // body of an if statement.\n if ((context && (this.strict || context !== \"if\" && context !== \"label\")) && this.options.ecmaVersion >= 6) this.unexpected()\n return this.parseFunctionStatement(node, false, !context)\n case tt._class:\n if (context) this.unexpected()\n return this.parseClass(node, true)\n case tt._if: return this.parseIfStatement(node)\n case tt._return: return this.parseReturnStatement(node)\n case tt._switch: return this.parseSwitchStatement(node)\n case tt._throw: return this.parseThrowStatement(node)\n case tt._try: return this.parseTryStatement(node)\n case tt._const: case tt._var:\n kind = kind || this.value\n if (context && kind !== \"var\") this.unexpected()\n return this.parseVarStatement(node, kind)\n case tt._while: return this.parseWhileStatement(node)\n case tt._with: return this.parseWithStatement(node)\n case tt.braceL: return this.parseBlock(true, node)\n case tt.semi: return this.parseEmptyStatement(node)\n case tt._export:\n case tt._import:\n if (this.options.ecmaVersion > 10 && starttype === tt._import) {\n skipWhiteSpace.lastIndex = this.pos\n let skip = skipWhiteSpace.exec(this.input)\n let next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)\n if (nextCh === 40 || nextCh === 46) // '(' or '.'\n return this.parseExpressionStatement(node, this.parseExpression())\n }\n\n if (!this.options.allowImportExportEverywhere) {\n if (!topLevel)\n this.raise(this.start, \"'import' and 'export' may only appear at the top level\")\n if (!this.inModule)\n this.raise(this.start, \"'import' and 'export' may appear only with 'sourceType: module'\")\n }\n return starttype === tt._import ? this.parseImport(node) : this.parseExport(node, exports)\n\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n default:\n if (this.isAsyncFunction()) {\n if (context) this.unexpected()\n this.next()\n return this.parseFunctionStatement(node, true, !context)\n }\n\n let maybeName = this.value, expr = this.parseExpression()\n if (starttype === tt.name && expr.type === \"Identifier\" && this.eat(tt.colon))\n return this.parseLabeledStatement(node, maybeName, expr, context)\n else return this.parseExpressionStatement(node, expr)\n }\n}\n\npp.parseBreakContinueStatement = function(node, keyword) {\n let isBreak = keyword === \"break\"\n this.next()\n if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null\n else if (this.type !== tt.name) this.unexpected()\n else {\n node.label = this.parseIdent()\n this.semicolon()\n }\n\n // Verify that there is an actual destination to break or\n // continue to.\n let i = 0\n for (; i < this.labels.length; ++i) {\n let lab = this.labels[i]\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) break\n if (node.label && isBreak) break\n }\n }\n if (i === this.labels.length) this.raise(node.start, \"Unsyntactic \" + keyword)\n return this.finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\")\n}\n\npp.parseDebuggerStatement = function(node) {\n this.next()\n this.semicolon()\n return this.finishNode(node, \"DebuggerStatement\")\n}\n\npp.parseDoStatement = function(node) {\n this.next()\n this.labels.push(loopLabel)\n node.body = this.parseStatement(\"do\")\n this.labels.pop()\n this.expect(tt._while)\n node.test = this.parseParenExpression()\n if (this.options.ecmaVersion >= 6)\n this.eat(tt.semi)\n else\n this.semicolon()\n return this.finishNode(node, \"DoWhileStatement\")\n}\n\n// Disambiguating between a `for` and a `for`/`in` or `for`/`of`\n// loop is non-trivial. Basically, we have to parse the init `var`\n// statement or expression, disallowing the `in` operator (see\n// the second parameter to `parseExpression`), and then check\n// whether the next token is `in` or `of`. When there is no init\n// part (semicolon immediately after the opening parenthesis), it\n// is a regular `for` loop.\n\npp.parseForStatement = function(node) {\n this.next()\n let awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual(\"await\")) ? this.lastTokStart : -1\n this.labels.push(loopLabel)\n this.enterScope(0)\n this.expect(tt.parenL)\n if (this.type === tt.semi) {\n if (awaitAt > -1) this.unexpected(awaitAt)\n return this.parseFor(node, null)\n }\n let isLet = this.isLet()\n if (this.type === tt._var || this.type === tt._const || isLet) {\n let init = this.startNode(), kind = isLet ? \"let\" : this.value\n this.next()\n this.parseVar(init, true, kind)\n this.finishNode(init, \"VariableDeclaration\")\n if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\"))) && init.declarations.length === 1) {\n if (this.options.ecmaVersion >= 9) {\n if (this.type === tt._in) {\n if (awaitAt > -1) this.unexpected(awaitAt)\n } else node.await = awaitAt > -1\n }\n return this.parseForIn(node, init)\n }\n if (awaitAt > -1) this.unexpected(awaitAt)\n return this.parseFor(node, init)\n }\n let refDestructuringErrors = new DestructuringErrors\n let init = this.parseExpression(true, refDestructuringErrors)\n if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\"))) {\n if (this.options.ecmaVersion >= 9) {\n if (this.type === tt._in) {\n if (awaitAt > -1) this.unexpected(awaitAt)\n } else node.await = awaitAt > -1\n }\n this.toAssignable(init, false, refDestructuringErrors)\n this.checkLValPattern(init)\n return this.parseForIn(node, init)\n } else {\n this.checkExpressionErrors(refDestructuringErrors, true)\n }\n if (awaitAt > -1) this.unexpected(awaitAt)\n return this.parseFor(node, init)\n}\n\npp.parseFunctionStatement = function(node, isAsync, declarationPosition) {\n this.next()\n return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync)\n}\n\npp.parseIfStatement = function(node) {\n this.next()\n node.test = this.parseParenExpression()\n // allow function declarations in branches, but only in non-strict mode\n node.consequent = this.parseStatement(\"if\")\n node.alternate = this.eat(tt._else) ? this.parseStatement(\"if\") : null\n return this.finishNode(node, \"IfStatement\")\n}\n\npp.parseReturnStatement = function(node) {\n if (!this.inFunction && !this.options.allowReturnOutsideFunction)\n this.raise(this.start, \"'return' outside of function\")\n this.next()\n\n // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n\n if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null\n else { node.argument = this.parseExpression(); this.semicolon() }\n return this.finishNode(node, \"ReturnStatement\")\n}\n\npp.parseSwitchStatement = function(node) {\n this.next()\n node.discriminant = this.parseParenExpression()\n node.cases = []\n this.expect(tt.braceL)\n this.labels.push(switchLabel)\n this.enterScope(0)\n\n // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n\n let cur\n for (let sawDefault = false; this.type !== tt.braceR;) {\n if (this.type === tt._case || this.type === tt._default) {\n let isCase = this.type === tt._case\n if (cur) this.finishNode(cur, \"SwitchCase\")\n node.cases.push(cur = this.startNode())\n cur.consequent = []\n this.next()\n if (isCase) {\n cur.test = this.parseExpression()\n } else {\n if (sawDefault) this.raiseRecoverable(this.lastTokStart, \"Multiple default clauses\")\n sawDefault = true\n cur.test = null\n }\n this.expect(tt.colon)\n } else {\n if (!cur) this.unexpected()\n cur.consequent.push(this.parseStatement(null))\n }\n }\n this.exitScope()\n if (cur) this.finishNode(cur, \"SwitchCase\")\n this.next() // Closing brace\n this.labels.pop()\n return this.finishNode(node, \"SwitchStatement\")\n}\n\npp.parseThrowStatement = function(node) {\n this.next()\n if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))\n this.raise(this.lastTokEnd, \"Illegal newline after throw\")\n node.argument = this.parseExpression()\n this.semicolon()\n return this.finishNode(node, \"ThrowStatement\")\n}\n\n// Reused empty array added for node fields that are always empty.\n\nconst empty = []\n\npp.parseTryStatement = function(node) {\n this.next()\n node.block = this.parseBlock()\n node.handler = null\n if (this.type === tt._catch) {\n let clause = this.startNode()\n this.next()\n if (this.eat(tt.parenL)) {\n clause.param = this.parseBindingAtom()\n let simple = clause.param.type === \"Identifier\"\n this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0)\n this.checkLValPattern(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL)\n this.expect(tt.parenR)\n } else {\n if (this.options.ecmaVersion < 10) this.unexpected()\n clause.param = null\n this.enterScope(0)\n }\n clause.body = this.parseBlock(false)\n this.exitScope()\n node.handler = this.finishNode(clause, \"CatchClause\")\n }\n node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null\n if (!node.handler && !node.finalizer)\n this.raise(node.start, \"Missing catch or finally clause\")\n return this.finishNode(node, \"TryStatement\")\n}\n\npp.parseVarStatement = function(node, kind) {\n this.next()\n this.parseVar(node, false, kind)\n this.semicolon()\n return this.finishNode(node, \"VariableDeclaration\")\n}\n\npp.parseWhileStatement = function(node) {\n this.next()\n node.test = this.parseParenExpression()\n this.labels.push(loopLabel)\n node.body = this.parseStatement(\"while\")\n this.labels.pop()\n return this.finishNode(node, \"WhileStatement\")\n}\n\npp.parseWithStatement = function(node) {\n if (this.strict) this.raise(this.start, \"'with' in strict mode\")\n this.next()\n node.object = this.parseParenExpression()\n node.body = this.parseStatement(\"with\")\n return this.finishNode(node, \"WithStatement\")\n}\n\npp.parseEmptyStatement = function(node) {\n this.next()\n return this.finishNode(node, \"EmptyStatement\")\n}\n\npp.parseLabeledStatement = function(node, maybeName, expr, context) {\n for (let label of this.labels)\n if (label.name === maybeName)\n this.raise(expr.start, \"Label '\" + maybeName + \"' is already declared\")\n let kind = this.type.isLoop ? \"loop\" : this.type === tt._switch ? \"switch\" : null\n for (let i = this.labels.length - 1; i >= 0; i--) {\n let label = this.labels[i]\n if (label.statementStart === node.start) {\n // Update information about previous labels on this node\n label.statementStart = this.start\n label.kind = kind\n } else break\n }\n this.labels.push({name: maybeName, kind, statementStart: this.start})\n node.body = this.parseStatement(context ? context.indexOf(\"label\") === -1 ? context + \"label\" : context : \"label\")\n this.labels.pop()\n node.label = expr\n return this.finishNode(node, \"LabeledStatement\")\n}\n\npp.parseExpressionStatement = function(node, expr) {\n node.expression = expr\n this.semicolon()\n return this.finishNode(node, \"ExpressionStatement\")\n}\n\n// Parse a semicolon-enclosed block of statements, handling `\"use\n// strict\"` declarations when `allowStrict` is true (used for\n// function bodies).\n\npp.parseBlock = function(createNewLexicalScope = true, node = this.startNode(), exitStrict) {\n node.body = []\n this.expect(tt.braceL)\n if (createNewLexicalScope) this.enterScope(0)\n while (this.type !== tt.braceR) {\n let stmt = this.parseStatement(null)\n node.body.push(stmt)\n }\n if (exitStrict) this.strict = false\n this.next()\n if (createNewLexicalScope) this.exitScope()\n return this.finishNode(node, \"BlockStatement\")\n}\n\n// Parse a regular `for` loop. The disambiguation code in\n// `parseStatement` will already have parsed the init statement or\n// expression.\n\npp.parseFor = function(node, init) {\n node.init = init\n this.expect(tt.semi)\n node.test = this.type === tt.semi ? null : this.parseExpression()\n this.expect(tt.semi)\n node.update = this.type === tt.parenR ? null : this.parseExpression()\n this.expect(tt.parenR)\n node.body = this.parseStatement(\"for\")\n this.exitScope()\n this.labels.pop()\n return this.finishNode(node, \"ForStatement\")\n}\n\n// Parse a `for`/`in` and `for`/`of` loop, which are almost\n// same from parser's perspective.\n\npp.parseForIn = function(node, init) {\n const isForIn = this.type === tt._in\n this.next()\n\n if (\n init.type === \"VariableDeclaration\" &&\n init.declarations[0].init != null &&\n (\n !isForIn ||\n this.options.ecmaVersion < 8 ||\n this.strict ||\n init.kind !== \"var\" ||\n init.declarations[0].id.type !== \"Identifier\"\n )\n ) {\n this.raise(\n init.start,\n `${\n isForIn ? \"for-in\" : \"for-of\"\n } loop variable declaration may not have an initializer`\n )\n }\n node.left = init\n node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign()\n this.expect(tt.parenR)\n node.body = this.parseStatement(\"for\")\n this.exitScope()\n this.labels.pop()\n return this.finishNode(node, isForIn ? \"ForInStatement\" : \"ForOfStatement\")\n}\n\n// Parse a list of variable declarations.\n\npp.parseVar = function(node, isFor, kind) {\n node.declarations = []\n node.kind = kind\n for (;;) {\n let decl = this.startNode()\n this.parseVarId(decl, kind)\n if (this.eat(tt.eq)) {\n decl.init = this.parseMaybeAssign(isFor)\n } else if (kind === \"const\" && !(this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual(\"of\")))) {\n this.unexpected()\n } else if (decl.id.type !== \"Identifier\" && !(isFor && (this.type === tt._in || this.isContextual(\"of\")))) {\n this.raise(this.lastTokEnd, \"Complex binding patterns require an initialization value\")\n } else {\n decl.init = null\n }\n node.declarations.push(this.finishNode(decl, \"VariableDeclarator\"))\n if (!this.eat(tt.comma)) break\n }\n return node\n}\n\npp.parseVarId = function(decl, kind) {\n decl.id = this.parseBindingAtom()\n this.checkLValPattern(decl.id, kind === \"var\" ? BIND_VAR : BIND_LEXICAL, false)\n}\n\nconst FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4\n\n// Parse a function declaration or literal (depending on the\n// `statement & FUNC_STATEMENT`).\n\n// Remove `allowExpressionBody` for 7.0.0, as it is only called with false\npp.parseFunction = function(node, statement, allowExpressionBody, isAsync) {\n this.initFunction(node)\n if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {\n if (this.type === tt.star && (statement & FUNC_HANGING_STATEMENT))\n this.unexpected()\n node.generator = this.eat(tt.star)\n }\n if (this.options.ecmaVersion >= 8)\n node.async = !!isAsync\n\n if (statement & FUNC_STATEMENT) {\n node.id = (statement & FUNC_NULLABLE_ID) && this.type !== tt.name ? null : this.parseIdent()\n if (node.id && !(statement & FUNC_HANGING_STATEMENT))\n // If it is a regular function declaration in sloppy mode, then it is\n // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding\n // mode depends on properties of the current scope (see\n // treatFunctionsAsVar).\n this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION)\n }\n\n let oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos\n this.yieldPos = 0\n this.awaitPos = 0\n this.awaitIdentPos = 0\n this.enterScope(functionFlags(node.async, node.generator))\n\n if (!(statement & FUNC_STATEMENT))\n node.id = this.type === tt.name ? this.parseIdent() : null\n\n this.parseFunctionParams(node)\n this.parseFunctionBody(node, allowExpressionBody, false)\n\n this.yieldPos = oldYieldPos\n this.awaitPos = oldAwaitPos\n this.awaitIdentPos = oldAwaitIdentPos\n return this.finishNode(node, (statement & FUNC_STATEMENT) ? \"FunctionDeclaration\" : \"FunctionExpression\")\n}\n\npp.parseFunctionParams = function(node) {\n this.expect(tt.parenL)\n node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8)\n this.checkYieldAwaitInDefaultParams()\n}\n\n// Parse a class declaration or literal (depending on the\n// `isStatement` parameter).\n\npp.parseClass = function(node, isStatement) {\n this.next()\n\n // ecma-262 14.6 Class Definitions\n // A class definition is always strict mode code.\n const oldStrict = this.strict\n this.strict = true\n\n this.parseClassId(node, isStatement)\n this.parseClassSuper(node)\n let classBody = this.startNode()\n let hadConstructor = false\n classBody.body = []\n this.expect(tt.braceL)\n while (this.type !== tt.braceR) {\n const element = this.parseClassElement(node.superClass !== null)\n if (element) {\n classBody.body.push(element)\n if (element.type === \"MethodDefinition\" && element.kind === \"constructor\") {\n if (hadConstructor) this.raise(element.start, \"Duplicate constructor in the same class\")\n hadConstructor = true\n }\n }\n }\n this.strict = oldStrict\n this.next()\n node.body = this.finishNode(classBody, \"ClassBody\")\n return this.finishNode(node, isStatement ? \"ClassDeclaration\" : \"ClassExpression\")\n}\n\npp.parseClassElement = function(constructorAllowsSuper) {\n if (this.eat(tt.semi)) return null\n\n let method = this.startNode()\n const tryContextual = (k, noLineBreak = false) => {\n const start = this.start, startLoc = this.startLoc\n if (!this.eatContextual(k)) return false\n if (this.type !== tt.parenL && (!noLineBreak || !this.canInsertSemicolon())) return true\n if (method.key) this.unexpected()\n method.computed = false\n method.key = this.startNodeAt(start, startLoc)\n method.key.name = k\n this.finishNode(method.key, \"Identifier\")\n return false\n }\n\n method.kind = \"method\"\n method.static = tryContextual(\"static\")\n let isGenerator = this.eat(tt.star)\n let isAsync = false\n if (!isGenerator) {\n if (this.options.ecmaVersion >= 8 && tryContextual(\"async\", true)) {\n isAsync = true\n isGenerator = this.options.ecmaVersion >= 9 && this.eat(tt.star)\n } else if (tryContextual(\"get\")) {\n method.kind = \"get\"\n } else if (tryContextual(\"set\")) {\n method.kind = \"set\"\n }\n }\n if (!method.key) this.parsePropertyName(method)\n let {key} = method\n let allowsDirectSuper = false\n if (!method.computed && !method.static && (key.type === \"Identifier\" && key.name === \"constructor\" ||\n key.type === \"Literal\" && key.value === \"constructor\")) {\n if (method.kind !== \"method\") this.raise(key.start, \"Constructor can't have get/set modifier\")\n if (isGenerator) this.raise(key.start, \"Constructor can't be a generator\")\n if (isAsync) this.raise(key.start, \"Constructor can't be an async method\")\n method.kind = \"constructor\"\n allowsDirectSuper = constructorAllowsSuper\n } else if (method.static && key.type === \"Identifier\" && key.name === \"prototype\") {\n this.raise(key.start, \"Classes may not have a static property named prototype\")\n }\n this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper)\n if (method.kind === \"get\" && method.value.params.length !== 0)\n this.raiseRecoverable(method.value.start, \"getter should have no params\")\n if (method.kind === \"set\" && method.value.params.length !== 1)\n this.raiseRecoverable(method.value.start, \"setter should have exactly one param\")\n if (method.kind === \"set\" && method.value.params[0].type === \"RestElement\")\n this.raiseRecoverable(method.value.params[0].start, \"Setter cannot use rest params\")\n return method\n}\n\npp.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {\n method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper)\n return this.finishNode(method, \"MethodDefinition\")\n}\n\npp.parseClassId = function(node, isStatement) {\n if (this.type === tt.name) {\n node.id = this.parseIdent()\n if (isStatement)\n this.checkLValSimple(node.id, BIND_LEXICAL, false)\n } else {\n if (isStatement === true)\n this.unexpected()\n node.id = null\n }\n}\n\npp.parseClassSuper = function(node) {\n node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null\n}\n\n// Parses module export declaration.\n\npp.parseExport = function(node, exports) {\n this.next()\n // export * from '...'\n if (this.eat(tt.star)) {\n if (this.options.ecmaVersion >= 11) {\n if (this.eatContextual(\"as\")) {\n node.exported = this.parseIdent(true)\n this.checkExport(exports, node.exported.name, this.lastTokStart)\n } else {\n node.exported = null\n }\n }\n this.expectContextual(\"from\")\n if (this.type !== tt.string) this.unexpected()\n node.source = this.parseExprAtom()\n this.semicolon()\n return this.finishNode(node, \"ExportAllDeclaration\")\n }\n if (this.eat(tt._default)) { // export default ...\n this.checkExport(exports, \"default\", this.lastTokStart)\n let isAsync\n if (this.type === tt._function || (isAsync = this.isAsyncFunction())) {\n let fNode = this.startNode()\n this.next()\n if (isAsync) this.next()\n node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync)\n } else if (this.type === tt._class) {\n let cNode = this.startNode()\n node.declaration = this.parseClass(cNode, \"nullableID\")\n } else {\n node.declaration = this.parseMaybeAssign()\n this.semicolon()\n }\n return this.finishNode(node, \"ExportDefaultDeclaration\")\n }\n // export var|const|let|function|class ...\n if (this.shouldParseExportStatement()) {\n node.declaration = this.parseStatement(null)\n if (node.declaration.type === \"VariableDeclaration\")\n this.checkVariableExport(exports, node.declaration.declarations)\n else\n this.checkExport(exports, node.declaration.id.name, node.declaration.id.start)\n node.specifiers = []\n node.source = null\n } else { // export { x, y as z } [from '...']\n node.declaration = null\n node.specifiers = this.parseExportSpecifiers(exports)\n if (this.eatContextual(\"from\")) {\n if (this.type !== tt.string) this.unexpected()\n node.source = this.parseExprAtom()\n } else {\n for (let spec of node.specifiers) {\n // check for keywords used as local names\n this.checkUnreserved(spec.local)\n // check if export is defined\n this.checkLocalExport(spec.local)\n }\n\n node.source = null\n }\n this.semicolon()\n }\n return this.finishNode(node, \"ExportNamedDeclaration\")\n}\n\npp.checkExport = function(exports, name, pos) {\n if (!exports) return\n if (has(exports, name))\n this.raiseRecoverable(pos, \"Duplicate export '\" + name + \"'\")\n exports[name] = true\n}\n\npp.checkPatternExport = function(exports, pat) {\n let type = pat.type\n if (type === \"Identifier\")\n this.checkExport(exports, pat.name, pat.start)\n else if (type === \"ObjectPattern\")\n for (let prop of pat.properties)\n this.checkPatternExport(exports, prop)\n else if (type === \"ArrayPattern\")\n for (let elt of pat.elements) {\n if (elt) this.checkPatternExport(exports, elt)\n }\n else if (type === \"Property\")\n this.checkPatternExport(exports, pat.value)\n else if (type === \"AssignmentPattern\")\n this.checkPatternExport(exports, pat.left)\n else if (type === \"RestElement\")\n this.checkPatternExport(exports, pat.argument)\n else if (type === \"ParenthesizedExpression\")\n this.checkPatternExport(exports, pat.expression)\n}\n\npp.checkVariableExport = function(exports, decls) {\n if (!exports) return\n for (let decl of decls)\n this.checkPatternExport(exports, decl.id)\n}\n\npp.shouldParseExportStatement = function() {\n return this.type.keyword === \"var\" ||\n this.type.keyword === \"const\" ||\n this.type.keyword === \"class\" ||\n this.type.keyword === \"function\" ||\n this.isLet() ||\n this.isAsyncFunction()\n}\n\n// Parses a comma-separated list of module exports.\n\npp.parseExportSpecifiers = function(exports) {\n let nodes = [], first = true\n // export { x, y as z } [from '...']\n this.expect(tt.braceL)\n while (!this.eat(tt.braceR)) {\n if (!first) {\n this.expect(tt.comma)\n if (this.afterTrailingComma(tt.braceR)) break\n } else first = false\n\n let node = this.startNode()\n node.local = this.parseIdent(true)\n node.exported = this.eatContextual(\"as\") ? this.parseIdent(true) : node.local\n this.checkExport(exports, node.exported.name, node.exported.start)\n nodes.push(this.finishNode(node, \"ExportSpecifier\"))\n }\n return nodes\n}\n\n// Parses import declaration.\n\npp.parseImport = function(node) {\n this.next()\n // import '...'\n if (this.type === tt.string) {\n node.specifiers = empty\n node.source = this.parseExprAtom()\n } else {\n node.specifiers = this.parseImportSpecifiers()\n this.expectContextual(\"from\")\n node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()\n }\n this.semicolon()\n return this.finishNode(node, \"ImportDeclaration\")\n}\n\n// Parses a comma-separated list of module imports.\n\npp.parseImportSpecifiers = function() {\n let nodes = [], first = true\n if (this.type === tt.name) {\n // import defaultObj, { x, y as z } from '...'\n let node = this.startNode()\n node.local = this.parseIdent()\n this.checkLValSimple(node.local, BIND_LEXICAL)\n nodes.push(this.finishNode(node, \"ImportDefaultSpecifier\"))\n if (!this.eat(tt.comma)) return nodes\n }\n if (this.type === tt.star) {\n let node = this.startNode()\n this.next()\n this.expectContextual(\"as\")\n node.local = this.parseIdent()\n this.checkLValSimple(node.local, BIND_LEXICAL)\n nodes.push(this.finishNode(node, \"ImportNamespaceSpecifier\"))\n return nodes\n }\n this.expect(tt.braceL)\n while (!this.eat(tt.braceR)) {\n if (!first) {\n this.expect(tt.comma)\n if (this.afterTrailingComma(tt.braceR)) break\n } else first = false\n\n let node = this.startNode()\n node.imported = this.parseIdent(true)\n if (this.eatContextual(\"as\")) {\n node.local = this.parseIdent()\n } else {\n this.checkUnreserved(node.imported)\n node.local = node.imported\n }\n this.checkLValSimple(node.local, BIND_LEXICAL)\n nodes.push(this.finishNode(node, \"ImportSpecifier\"))\n }\n return nodes\n}\n\n// Set `ExpressionStatement#directive` property for directive prologues.\npp.adaptDirectivePrologue = function(statements) {\n for (let i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {\n statements[i].directive = statements[i].expression.raw.slice(1, -1)\n }\n}\npp.isDirectiveCandidate = function(statement) {\n return (\n statement.type === \"ExpressionStatement\" &&\n statement.expression.type === \"Literal\" &&\n typeof statement.expression.value === \"string\" &&\n // Reject parenthesized strings.\n (this.input[statement.start] === \"\\\"\" || this.input[statement.start] === \"'\")\n )\n}\n","import {types as tt} from \"./tokentype.js\"\nimport {Parser} from \"./state.js\"\nimport {has} from \"./util.js\"\nimport {BIND_NONE, BIND_OUTSIDE, BIND_LEXICAL} from \"./scopeflags.js\"\n\nconst pp = Parser.prototype\n\n// Convert existing expression atom to assignable pattern\n// if possible.\n\npp.toAssignable = function(node, isBinding, refDestructuringErrors) {\n if (this.options.ecmaVersion >= 6 && node) {\n switch (node.type) {\n case \"Identifier\":\n if (this.inAsync && node.name === \"await\")\n this.raise(node.start, \"Cannot use 'await' as identifier inside an async function\")\n break\n\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"AssignmentPattern\":\n case \"RestElement\":\n break\n\n case \"ObjectExpression\":\n node.type = \"ObjectPattern\"\n if (refDestructuringErrors) this.checkPatternErrors(refDestructuringErrors, true)\n for (let prop of node.properties) {\n this.toAssignable(prop, isBinding)\n // Early error:\n // AssignmentRestProperty[Yield, Await] :\n // `...` DestructuringAssignmentTarget[Yield, Await]\n //\n // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|.\n if (\n prop.type === \"RestElement\" &&\n (prop.argument.type === \"ArrayPattern\" || prop.argument.type === \"ObjectPattern\")\n ) {\n this.raise(prop.argument.start, \"Unexpected token\")\n }\n }\n break\n\n case \"Property\":\n // AssignmentProperty has type === \"Property\"\n if (node.kind !== \"init\") this.raise(node.key.start, \"Object pattern can't contain getter or setter\")\n this.toAssignable(node.value, isBinding)\n break\n\n case \"ArrayExpression\":\n node.type = \"ArrayPattern\"\n if (refDestructuringErrors) this.checkPatternErrors(refDestructuringErrors, true)\n this.toAssignableList(node.elements, isBinding)\n break\n\n case \"SpreadElement\":\n node.type = \"RestElement\"\n this.toAssignable(node.argument, isBinding)\n if (node.argument.type === \"AssignmentPattern\")\n this.raise(node.argument.start, \"Rest elements cannot have a default value\")\n break\n\n case \"AssignmentExpression\":\n if (node.operator !== \"=\") this.raise(node.left.end, \"Only '=' operator can be used for specifying default value.\")\n node.type = \"AssignmentPattern\"\n delete node.operator\n this.toAssignable(node.left, isBinding)\n break\n\n case \"ParenthesizedExpression\":\n this.toAssignable(node.expression, isBinding, refDestructuringErrors)\n break\n\n case \"ChainExpression\":\n this.raiseRecoverable(node.start, \"Optional chaining cannot appear in left-hand side\")\n break\n\n case \"MemberExpression\":\n if (!isBinding) break\n\n default:\n this.raise(node.start, \"Assigning to rvalue\")\n }\n } else if (refDestructuringErrors) this.checkPatternErrors(refDestructuringErrors, true)\n return node\n}\n\n// Convert list of expression atoms to binding list.\n\npp.toAssignableList = function(exprList, isBinding) {\n let end = exprList.length\n for (let i = 0; i < end; i++) {\n let elt = exprList[i]\n if (elt) this.toAssignable(elt, isBinding)\n }\n if (end) {\n let last = exprList[end - 1]\n if (this.options.ecmaVersion === 6 && isBinding && last && last.type === \"RestElement\" && last.argument.type !== \"Identifier\")\n this.unexpected(last.argument.start)\n }\n return exprList\n}\n\n// Parses spread element.\n\npp.parseSpread = function(refDestructuringErrors) {\n let node = this.startNode()\n this.next()\n node.argument = this.parseMaybeAssign(false, refDestructuringErrors)\n return this.finishNode(node, \"SpreadElement\")\n}\n\npp.parseRestBinding = function() {\n let node = this.startNode()\n this.next()\n\n // RestElement inside of a function parameter must be an identifier\n if (this.options.ecmaVersion === 6 && this.type !== tt.name)\n this.unexpected()\n\n node.argument = this.parseBindingAtom()\n\n return this.finishNode(node, \"RestElement\")\n}\n\n// Parses lvalue (assignable) atom.\n\npp.parseBindingAtom = function() {\n if (this.options.ecmaVersion >= 6) {\n switch (this.type) {\n case tt.bracketL:\n let node = this.startNode()\n this.next()\n node.elements = this.parseBindingList(tt.bracketR, true, true)\n return this.finishNode(node, \"ArrayPattern\")\n\n case tt.braceL:\n return this.parseObj(true)\n }\n }\n return this.parseIdent()\n}\n\npp.parseBindingList = function(close, allowEmpty, allowTrailingComma) {\n let elts = [], first = true\n while (!this.eat(close)) {\n if (first) first = false\n else this.expect(tt.comma)\n if (allowEmpty && this.type === tt.comma) {\n elts.push(null)\n } else if (allowTrailingComma && this.afterTrailingComma(close)) {\n break\n } else if (this.type === tt.ellipsis) {\n let rest = this.parseRestBinding()\n this.parseBindingListItem(rest)\n elts.push(rest)\n if (this.type === tt.comma) this.raise(this.start, \"Comma is not permitted after the rest element\")\n this.expect(close)\n break\n } else {\n let elem = this.parseMaybeDefault(this.start, this.startLoc)\n this.parseBindingListItem(elem)\n elts.push(elem)\n }\n }\n return elts\n}\n\npp.parseBindingListItem = function(param) {\n return param\n}\n\n// Parses assignment pattern around given atom if possible.\n\npp.parseMaybeDefault = function(startPos, startLoc, left) {\n left = left || this.parseBindingAtom()\n if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left\n let node = this.startNodeAt(startPos, startLoc)\n node.left = left\n node.right = this.parseMaybeAssign()\n return this.finishNode(node, \"AssignmentPattern\")\n}\n\n// The following three functions all verify that a node is an lvalue —\n// something that can be bound, or assigned to. In order to do so, they perform\n// a variety of checks:\n//\n// - Check that none of the bound/assigned-to identifiers are reserved words.\n// - Record name declarations for bindings in the appropriate scope.\n// - Check duplicate argument names, if checkClashes is set.\n//\n// If a complex binding pattern is encountered (e.g., object and array\n// destructuring), the entire pattern is recursively checked.\n//\n// There are three versions of checkLVal*() appropriate for different\n// circumstances:\n//\n// - checkLValSimple() shall be used if the syntactic construct supports\n// nothing other than identifiers and member expressions. Parenthesized\n// expressions are also correctly handled. This is generally appropriate for\n// constructs for which the spec says\n//\n// > It is a Syntax Error if AssignmentTargetType of [the production] is not\n// > simple.\n//\n// It is also appropriate for checking if an identifier is valid and not\n// defined elsewhere, like import declarations or function/class identifiers.\n//\n// Examples where this is used include:\n// a += …;\n// import a from '…';\n// where a is the node to be checked.\n//\n// - checkLValPattern() shall be used if the syntactic construct supports\n// anything checkLValSimple() supports, as well as object and array\n// destructuring patterns. This is generally appropriate for constructs for\n// which the spec says\n//\n// > It is a Syntax Error if [the production] is neither an ObjectLiteral nor\n// > an ArrayLiteral and AssignmentTargetType of [the production] is not\n// > simple.\n//\n// Examples where this is used include:\n// (a = …);\n// const a = …;\n// try { … } catch (a) { … }\n// where a is the node to be checked.\n//\n// - checkLValInnerPattern() shall be used if the syntactic construct supports\n// anything checkLValPattern() supports, as well as default assignment\n// patterns, rest elements, and other constructs that may appear within an\n// object or array destructuring pattern.\n//\n// As a special case, function parameters also use checkLValInnerPattern(),\n// as they also support defaults and rest constructs.\n//\n// These functions deliberately support both assignment and binding constructs,\n// as the logic for both is exceedingly similar. If the node is the target of\n// an assignment, then bindingType should be set to BIND_NONE. Otherwise, it\n// should be set to the appropriate BIND_* constant, like BIND_VAR or\n// BIND_LEXICAL.\n//\n// If the function is called with a non-BIND_NONE bindingType, then\n// additionally a checkClashes object may be specified to allow checking for\n// duplicate argument names. checkClashes is ignored if the provided construct\n// is an assignment (i.e., bindingType is BIND_NONE).\n\npp.checkLValSimple = function(expr, bindingType = BIND_NONE, checkClashes) {\n const isBind = bindingType !== BIND_NONE\n\n switch (expr.type) {\n case \"Identifier\":\n if (this.strict && this.reservedWordsStrictBind.test(expr.name))\n this.raiseRecoverable(expr.start, (isBind ? \"Binding \" : \"Assigning to \") + expr.name + \" in strict mode\")\n if (isBind) {\n if (bindingType === BIND_LEXICAL && expr.name === \"let\")\n this.raiseRecoverable(expr.start, \"let is disallowed as a lexically bound name\")\n if (checkClashes) {\n if (has(checkClashes, expr.name))\n this.raiseRecoverable(expr.start, \"Argument name clash\")\n checkClashes[expr.name] = true\n }\n if (bindingType !== BIND_OUTSIDE) this.declareName(expr.name, bindingType, expr.start)\n }\n break\n\n case \"ChainExpression\":\n this.raiseRecoverable(expr.start, \"Optional chaining cannot appear in left-hand side\")\n break\n\n case \"MemberExpression\":\n if (isBind) this.raiseRecoverable(expr.start, \"Binding member expression\")\n break\n\n case \"ParenthesizedExpression\":\n if (isBind) this.raiseRecoverable(expr.start, \"Binding parenthesized expression\")\n return this.checkLValSimple(expr.expression, bindingType, checkClashes)\n\n default:\n this.raise(expr.start, (isBind ? \"Binding\" : \"Assigning to\") + \" rvalue\")\n }\n}\n\npp.checkLValPattern = function(expr, bindingType = BIND_NONE, checkClashes) {\n switch (expr.type) {\n case \"ObjectPattern\":\n for (let prop of expr.properties) {\n this.checkLValInnerPattern(prop, bindingType, checkClashes)\n }\n break\n\n case \"ArrayPattern\":\n for (let elem of expr.elements) {\n if (elem) this.checkLValInnerPattern(elem, bindingType, checkClashes)\n }\n break\n\n default:\n this.checkLValSimple(expr, bindingType, checkClashes)\n }\n}\n\npp.checkLValInnerPattern = function(expr, bindingType = BIND_NONE, checkClashes) {\n switch (expr.type) {\n case \"Property\":\n // AssignmentProperty has type === \"Property\"\n this.checkLValInnerPattern(expr.value, bindingType, checkClashes)\n break\n\n case \"AssignmentPattern\":\n this.checkLValPattern(expr.left, bindingType, checkClashes)\n break\n\n case \"RestElement\":\n this.checkLValPattern(expr.argument, bindingType, checkClashes)\n break\n\n default:\n this.checkLValPattern(expr, bindingType, checkClashes)\n }\n}\n","// A recursive descent parser operates by defining functions for all\n// syntactic elements, and recursively calling those, each function\n// advancing the input stream and returning an AST node. Precedence\n// of constructs (for example, the fact that `!x[1]` means `!(x[1])`\n// instead of `(!x)[1]` is handled by the fact that the parser\n// function that parses unary prefix operators is called first, and\n// in turn calls the function that parses `[]` subscripts — that\n// way, it'll receive the node for `x[1]` already parsed, and wraps\n// *that* in the unary operator node.\n//\n// Acorn uses an [operator precedence parser][opp] to handle binary\n// operator precedence, because it is much more compact than using\n// the technique outlined above, which uses different, nesting\n// functions to specify precedence, for all of the ten binary\n// precedence levels that JavaScript defines.\n//\n// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser\n\nimport {types as tt} from \"./tokentype.js\"\nimport {Parser} from \"./state.js\"\nimport {DestructuringErrors} from \"./parseutil.js\"\nimport {lineBreak} from \"./whitespace.js\"\nimport {functionFlags, SCOPE_ARROW, SCOPE_SUPER, SCOPE_DIRECT_SUPER, BIND_OUTSIDE, BIND_VAR} from \"./scopeflags.js\"\n\nconst pp = Parser.prototype\n\n// Check if property name clashes with already added.\n// Object/class getters and setters are not allowed to clash —\n// either with each other or with an init property — and in\n// strict mode, init properties are also not allowed to be repeated.\n\npp.checkPropClash = function(prop, propHash, refDestructuringErrors) {\n if (this.options.ecmaVersion >= 9 && prop.type === \"SpreadElement\")\n return\n if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))\n return\n let {key} = prop, name\n switch (key.type) {\n case \"Identifier\": name = key.name; break\n case \"Literal\": name = String(key.value); break\n default: return\n }\n let {kind} = prop\n if (this.options.ecmaVersion >= 6) {\n if (name === \"__proto__\" && kind === \"init\") {\n if (propHash.proto) {\n if (refDestructuringErrors) {\n if (refDestructuringErrors.doubleProto < 0)\n refDestructuringErrors.doubleProto = key.start\n // Backwards-compat kludge. Can be removed in version 6.0\n } else this.raiseRecoverable(key.start, \"Redefinition of __proto__ property\")\n }\n propHash.proto = true\n }\n return\n }\n name = \"$\" + name\n let other = propHash[name]\n if (other) {\n let redefinition\n if (kind === \"init\") {\n redefinition = this.strict && other.init || other.get || other.set\n } else {\n redefinition = other.init || other[kind]\n }\n if (redefinition)\n this.raiseRecoverable(key.start, \"Redefinition of property\")\n } else {\n other = propHash[name] = {\n init: false,\n get: false,\n set: false\n }\n }\n other[kind] = true\n}\n\n// ### Expression parsing\n\n// These nest, from the most general expression type at the top to\n// 'atomic', nondivisible expression types at the bottom. Most of\n// the functions will simply let the function(s) below them parse,\n// and, *if* the syntactic construct they handle is present, wrap\n// the AST node that the inner parser gave them in another node.\n\n// Parse a full expression. The optional arguments are used to\n// forbid the `in` operator (in for loops initalization expressions)\n// and provide reference for storing '=' operator inside shorthand\n// property assignment in contexts where both object expression\n// and object pattern might appear (so it's possible to raise\n// delayed syntax error at correct position).\n\npp.parseExpression = function(noIn, refDestructuringErrors) {\n let startPos = this.start, startLoc = this.startLoc\n let expr = this.parseMaybeAssign(noIn, refDestructuringErrors)\n if (this.type === tt.comma) {\n let node = this.startNodeAt(startPos, startLoc)\n node.expressions = [expr]\n while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors))\n return this.finishNode(node, \"SequenceExpression\")\n }\n return expr\n}\n\n// Parse an assignment expression. This includes applications of\n// operators like `+=`.\n\npp.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {\n if (this.isContextual(\"yield\")) {\n if (this.inGenerator) return this.parseYield(noIn)\n // The tokenizer will assume an expression is allowed after\n // `yield`, but this isn't that kind of yield\n else this.exprAllowed = false\n }\n\n let ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1\n if (refDestructuringErrors) {\n oldParenAssign = refDestructuringErrors.parenthesizedAssign\n oldTrailingComma = refDestructuringErrors.trailingComma\n refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1\n } else {\n refDestructuringErrors = new DestructuringErrors\n ownDestructuringErrors = true\n }\n\n let startPos = this.start, startLoc = this.startLoc\n if (this.type === tt.parenL || this.type === tt.name)\n this.potentialArrowAt = this.start\n let left = this.parseMaybeConditional(noIn, refDestructuringErrors)\n if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)\n if (this.type.isAssign) {\n let node = this.startNodeAt(startPos, startLoc)\n node.operator = this.value\n if (this.type === tt.eq)\n left = this.toAssignable(left, false, refDestructuringErrors)\n if (!ownDestructuringErrors) {\n refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1\n }\n if (refDestructuringErrors.shorthandAssign >= left.start)\n refDestructuringErrors.shorthandAssign = -1 // reset because shorthand default was used correctly\n if (this.type === tt.eq)\n this.checkLValPattern(left)\n else\n this.checkLValSimple(left)\n node.left = left\n this.next()\n node.right = this.parseMaybeAssign(noIn)\n return this.finishNode(node, \"AssignmentExpression\")\n } else {\n if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)\n }\n if (oldParenAssign > -1) refDestructuringErrors.parenthesizedAssign = oldParenAssign\n if (oldTrailingComma > -1) refDestructuringErrors.trailingComma = oldTrailingComma\n return left\n}\n\n// Parse a ternary conditional (`?:`) operator.\n\npp.parseMaybeConditional = function(noIn, refDestructuringErrors) {\n let startPos = this.start, startLoc = this.startLoc\n let expr = this.parseExprOps(noIn, refDestructuringErrors)\n if (this.checkExpressionErrors(refDestructuringErrors)) return expr\n if (this.eat(tt.question)) {\n let node = this.startNodeAt(startPos, startLoc)\n node.test = expr\n node.consequent = this.parseMaybeAssign()\n this.expect(tt.colon)\n node.alternate = this.parseMaybeAssign(noIn)\n return this.finishNode(node, \"ConditionalExpression\")\n }\n return expr\n}\n\n// Start the precedence parser.\n\npp.parseExprOps = function(noIn, refDestructuringErrors) {\n let startPos = this.start, startLoc = this.startLoc\n let expr = this.parseMaybeUnary(refDestructuringErrors, false)\n if (this.checkExpressionErrors(refDestructuringErrors)) return expr\n return expr.start === startPos && expr.type === \"ArrowFunctionExpression\" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn)\n}\n\n// Parse binary operators with the operator precedence parsing\n// algorithm. `left` is the left-hand side of the operator.\n// `minPrec` provides context that allows the function to stop and\n// defer further parser to one of its callers when it encounters an\n// operator that has a lower precedence than the set it is parsing.\n\npp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {\n let prec = this.type.binop\n if (prec != null && (!noIn || this.type !== tt._in)) {\n if (prec > minPrec) {\n let logical = this.type === tt.logicalOR || this.type === tt.logicalAND\n let coalesce = this.type === tt.coalesce\n if (coalesce) {\n // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions.\n // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error.\n prec = tt.logicalAND.binop\n }\n let op = this.value\n this.next()\n let startPos = this.start, startLoc = this.startLoc\n let right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn)\n let node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce)\n if ((logical && this.type === tt.coalesce) || (coalesce && (this.type === tt.logicalOR || this.type === tt.logicalAND))) {\n this.raiseRecoverable(this.start, \"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses\")\n }\n return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)\n }\n }\n return left\n}\n\npp.buildBinary = function(startPos, startLoc, left, right, op, logical) {\n let node = this.startNodeAt(startPos, startLoc)\n node.left = left\n node.operator = op\n node.right = right\n return this.finishNode(node, logical ? \"LogicalExpression\" : \"BinaryExpression\")\n}\n\n// Parse unary operators, both prefix and postfix.\n\npp.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {\n let startPos = this.start, startLoc = this.startLoc, expr\n if (this.isContextual(\"await\") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) {\n expr = this.parseAwait()\n sawUnary = true\n } else if (this.type.prefix) {\n let node = this.startNode(), update = this.type === tt.incDec\n node.operator = this.value\n node.prefix = true\n this.next()\n node.argument = this.parseMaybeUnary(null, true)\n this.checkExpressionErrors(refDestructuringErrors, true)\n if (update) this.checkLValSimple(node.argument)\n else if (this.strict && node.operator === \"delete\" &&\n node.argument.type === \"Identifier\")\n this.raiseRecoverable(node.start, \"Deleting local variable in strict mode\")\n else sawUnary = true\n expr = this.finishNode(node, update ? \"UpdateExpression\" : \"UnaryExpression\")\n } else {\n expr = this.parseExprSubscripts(refDestructuringErrors)\n if (this.checkExpressionErrors(refDestructuringErrors)) return expr\n while (this.type.postfix && !this.canInsertSemicolon()) {\n let node = this.startNodeAt(startPos, startLoc)\n node.operator = this.value\n node.prefix = false\n node.argument = expr\n this.checkLValSimple(expr)\n this.next()\n expr = this.finishNode(node, \"UpdateExpression\")\n }\n }\n\n if (!sawUnary && this.eat(tt.starstar))\n return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), \"**\", false)\n else\n return expr\n}\n\n// Parse call, dot, and `[]`-subscript expressions.\n\npp.parseExprSubscripts = function(refDestructuringErrors) {\n let startPos = this.start, startLoc = this.startLoc\n let expr = this.parseExprAtom(refDestructuringErrors)\n if (expr.type === \"ArrowFunctionExpression\" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== \")\")\n return expr\n let result = this.parseSubscripts(expr, startPos, startLoc)\n if (refDestructuringErrors && result.type === \"MemberExpression\") {\n if (refDestructuringErrors.parenthesizedAssign >= result.start) refDestructuringErrors.parenthesizedAssign = -1\n if (refDestructuringErrors.parenthesizedBind >= result.start) refDestructuringErrors.parenthesizedBind = -1\n }\n return result\n}\n\npp.parseSubscripts = function(base, startPos, startLoc, noCalls) {\n let maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === \"Identifier\" && base.name === \"async\" &&\n this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 &&\n this.potentialArrowAt === base.start\n let optionalChained = false\n\n while (true) {\n let element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained)\n\n if (element.optional) optionalChained = true\n if (element === base || element.type === \"ArrowFunctionExpression\") {\n if (optionalChained) {\n const chainNode = this.startNodeAt(startPos, startLoc)\n chainNode.expression = element\n element = this.finishNode(chainNode, \"ChainExpression\")\n }\n return element\n }\n\n base = element\n }\n}\n\npp.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained) {\n let optionalSupported = this.options.ecmaVersion >= 11\n let optional = optionalSupported && this.eat(tt.questionDot)\n if (noCalls && optional) this.raise(this.lastTokStart, \"Optional chaining cannot appear in the callee of new expressions\")\n\n let computed = this.eat(tt.bracketL)\n if (computed || (optional && this.type !== tt.parenL && this.type !== tt.backQuote) || this.eat(tt.dot)) {\n let node = this.startNodeAt(startPos, startLoc)\n node.object = base\n node.property = computed ? this.parseExpression() : this.parseIdent(this.options.allowReserved !== \"never\")\n node.computed = !!computed\n if (computed) this.expect(tt.bracketR)\n if (optionalSupported) {\n node.optional = optional\n }\n base = this.finishNode(node, \"MemberExpression\")\n } else if (!noCalls && this.eat(tt.parenL)) {\n let refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos\n this.yieldPos = 0\n this.awaitPos = 0\n this.awaitIdentPos = 0\n let exprList = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors)\n if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(tt.arrow)) {\n this.checkPatternErrors(refDestructuringErrors, false)\n this.checkYieldAwaitInDefaultParams()\n if (this.awaitIdentPos > 0)\n this.raise(this.awaitIdentPos, \"Cannot use 'await' as identifier inside an async function\")\n this.yieldPos = oldYieldPos\n this.awaitPos = oldAwaitPos\n this.awaitIdentPos = oldAwaitIdentPos\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true)\n }\n this.checkExpressionErrors(refDestructuringErrors, true)\n this.yieldPos = oldYieldPos || this.yieldPos\n this.awaitPos = oldAwaitPos || this.awaitPos\n this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos\n let node = this.startNodeAt(startPos, startLoc)\n node.callee = base\n node.arguments = exprList\n if (optionalSupported) {\n node.optional = optional\n }\n base = this.finishNode(node, \"CallExpression\")\n } else if (this.type === tt.backQuote) {\n if (optional || optionalChained) {\n this.raise(this.start, \"Optional chaining cannot appear in the tag of tagged template expressions\")\n }\n let node = this.startNodeAt(startPos, startLoc)\n node.tag = base\n node.quasi = this.parseTemplate({isTagged: true})\n base = this.finishNode(node, \"TaggedTemplateExpression\")\n }\n return base\n}\n\n// Parse an atomic expression — either a single token that is an\n// expression, an expression started by a keyword like `function` or\n// `new`, or an expression wrapped in punctuation like `()`, `[]`,\n// or `{}`.\n\npp.parseExprAtom = function(refDestructuringErrors) {\n // If a division operator appears in an expression position, the\n // tokenizer got confused, and we force it to read a regexp instead.\n if (this.type === tt.slash) this.readRegexp()\n\n let node, canBeArrow = this.potentialArrowAt === this.start\n switch (this.type) {\n case tt._super:\n if (!this.allowSuper)\n this.raise(this.start, \"'super' keyword outside a method\")\n node = this.startNode()\n this.next()\n if (this.type === tt.parenL && !this.allowDirectSuper)\n this.raise(node.start, \"super() call outside constructor of a subclass\")\n // The `super` keyword can appear at below:\n // SuperProperty:\n // super [ Expression ]\n // super . IdentifierName\n // SuperCall:\n // super ( Arguments )\n if (this.type !== tt.dot && this.type !== tt.bracketL && this.type !== tt.parenL)\n this.unexpected()\n return this.finishNode(node, \"Super\")\n\n case tt._this:\n node = this.startNode()\n this.next()\n return this.finishNode(node, \"ThisExpression\")\n\n case tt.name:\n let startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc\n let id = this.parseIdent(false)\n if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === \"async\" && !this.canInsertSemicolon() && this.eat(tt._function))\n return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true)\n if (canBeArrow && !this.canInsertSemicolon()) {\n if (this.eat(tt.arrow))\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false)\n if (this.options.ecmaVersion >= 8 && id.name === \"async\" && this.type === tt.name && !containsEsc) {\n id = this.parseIdent(false)\n if (this.canInsertSemicolon() || !this.eat(tt.arrow))\n this.unexpected()\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)\n }\n }\n return id\n\n case tt.regexp:\n let value = this.value\n node = this.parseLiteral(value.value)\n node.regex = {pattern: value.pattern, flags: value.flags}\n return node\n\n case tt.num: case tt.string:\n return this.parseLiteral(this.value)\n\n case tt._null: case tt._true: case tt._false:\n node = this.startNode()\n node.value = this.type === tt._null ? null : this.type === tt._true\n node.raw = this.type.keyword\n this.next()\n return this.finishNode(node, \"Literal\")\n\n case tt.parenL:\n let start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow)\n if (refDestructuringErrors) {\n if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))\n refDestructuringErrors.parenthesizedAssign = start\n if (refDestructuringErrors.parenthesizedBind < 0)\n refDestructuringErrors.parenthesizedBind = start\n }\n return expr\n\n case tt.bracketL:\n node = this.startNode()\n this.next()\n node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)\n return this.finishNode(node, \"ArrayExpression\")\n\n case tt.braceL:\n return this.parseObj(false, refDestructuringErrors)\n\n case tt._function:\n node = this.startNode()\n this.next()\n return this.parseFunction(node, 0)\n\n case tt._class:\n return this.parseClass(this.startNode(), false)\n\n case tt._new:\n return this.parseNew()\n\n case tt.backQuote:\n return this.parseTemplate()\n\n case tt._import:\n if (this.options.ecmaVersion >= 11) {\n return this.parseExprImport()\n } else {\n return this.unexpected()\n }\n\n default:\n this.unexpected()\n }\n}\n\npp.parseExprImport = function() {\n const node = this.startNode()\n\n // Consume `import` as an identifier for `import.meta`.\n // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`.\n if (this.containsEsc) this.raiseRecoverable(this.start, \"Escape sequence in keyword import\")\n const meta = this.parseIdent(true)\n\n switch (this.type) {\n case tt.parenL:\n return this.parseDynamicImport(node)\n case tt.dot:\n node.meta = meta\n return this.parseImportMeta(node)\n default:\n this.unexpected()\n }\n}\n\npp.parseDynamicImport = function(node) {\n this.next() // skip `(`\n\n // Parse node.source.\n node.source = this.parseMaybeAssign()\n\n // Verify ending.\n if (!this.eat(tt.parenR)) {\n const errorPos = this.start\n if (this.eat(tt.comma) && this.eat(tt.parenR)) {\n this.raiseRecoverable(errorPos, \"Trailing comma is not allowed in import()\")\n } else {\n this.unexpected(errorPos)\n }\n }\n\n return this.finishNode(node, \"ImportExpression\")\n}\n\npp.parseImportMeta = function(node) {\n this.next() // skip `.`\n\n const containsEsc = this.containsEsc\n node.property = this.parseIdent(true)\n\n if (node.property.name !== \"meta\")\n this.raiseRecoverable(node.property.start, \"The only valid meta property for import is 'import.meta'\")\n if (containsEsc)\n this.raiseRecoverable(node.start, \"'import.meta' must not contain escaped characters\")\n if (this.options.sourceType !== \"module\")\n this.raiseRecoverable(node.start, \"Cannot use 'import.meta' outside a module\")\n\n return this.finishNode(node, \"MetaProperty\")\n}\n\npp.parseLiteral = function(value) {\n let node = this.startNode()\n node.value = value\n node.raw = this.input.slice(this.start, this.end)\n if (node.raw.charCodeAt(node.raw.length - 1) === 110) node.bigint = node.raw.slice(0, -1).replace(/_/g, \"\")\n this.next()\n return this.finishNode(node, \"Literal\")\n}\n\npp.parseParenExpression = function() {\n this.expect(tt.parenL)\n let val = this.parseExpression()\n this.expect(tt.parenR)\n return val\n}\n\npp.parseParenAndDistinguishExpression = function(canBeArrow) {\n let startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8\n if (this.options.ecmaVersion >= 6) {\n this.next()\n\n let innerStartPos = this.start, innerStartLoc = this.startLoc\n let exprList = [], first = true, lastIsComma = false\n let refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart\n this.yieldPos = 0\n this.awaitPos = 0\n // Do not save awaitIdentPos to allow checking awaits nested in parameters\n while (this.type !== tt.parenR) {\n first ? first = false : this.expect(tt.comma)\n if (allowTrailingComma && this.afterTrailingComma(tt.parenR, true)) {\n lastIsComma = true\n break\n } else if (this.type === tt.ellipsis) {\n spreadStart = this.start\n exprList.push(this.parseParenItem(this.parseRestBinding()))\n if (this.type === tt.comma) this.raise(this.start, \"Comma is not permitted after the rest element\")\n break\n } else {\n exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem))\n }\n }\n let innerEndPos = this.start, innerEndLoc = this.startLoc\n this.expect(tt.parenR)\n\n if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {\n this.checkPatternErrors(refDestructuringErrors, false)\n this.checkYieldAwaitInDefaultParams()\n this.yieldPos = oldYieldPos\n this.awaitPos = oldAwaitPos\n return this.parseParenArrowList(startPos, startLoc, exprList)\n }\n\n if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart)\n if (spreadStart) this.unexpected(spreadStart)\n this.checkExpressionErrors(refDestructuringErrors, true)\n this.yieldPos = oldYieldPos || this.yieldPos\n this.awaitPos = oldAwaitPos || this.awaitPos\n\n if (exprList.length > 1) {\n val = this.startNodeAt(innerStartPos, innerStartLoc)\n val.expressions = exprList\n this.finishNodeAt(val, \"SequenceExpression\", innerEndPos, innerEndLoc)\n } else {\n val = exprList[0]\n }\n } else {\n val = this.parseParenExpression()\n }\n\n if (this.options.preserveParens) {\n let par = this.startNodeAt(startPos, startLoc)\n par.expression = val\n return this.finishNode(par, \"ParenthesizedExpression\")\n } else {\n return val\n }\n}\n\npp.parseParenItem = function(item) {\n return item\n}\n\npp.parseParenArrowList = function(startPos, startLoc, exprList) {\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList)\n}\n\n// New's precedence is slightly tricky. It must allow its argument to\n// be a `[]` or dot subscript expression, but not a call — at least,\n// not without wrapping it in parentheses. Thus, it uses the noCalls\n// argument to parseSubscripts to prevent it from consuming the\n// argument list.\n\nconst empty = []\n\npp.parseNew = function() {\n if (this.containsEsc) this.raiseRecoverable(this.start, \"Escape sequence in keyword new\")\n let node = this.startNode()\n let meta = this.parseIdent(true)\n if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {\n node.meta = meta\n let containsEsc = this.containsEsc\n node.property = this.parseIdent(true)\n if (node.property.name !== \"target\")\n this.raiseRecoverable(node.property.start, \"The only valid meta property for new is 'new.target'\")\n if (containsEsc)\n this.raiseRecoverable(node.start, \"'new.target' must not contain escaped characters\")\n if (!this.inNonArrowFunction)\n this.raiseRecoverable(node.start, \"'new.target' can only be used in functions\")\n return this.finishNode(node, \"MetaProperty\")\n }\n let startPos = this.start, startLoc = this.startLoc, isImport = this.type === tt._import\n node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)\n if (isImport && node.callee.type === \"ImportExpression\") {\n this.raise(startPos, \"Cannot use new with import()\")\n }\n if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false)\n else node.arguments = empty\n return this.finishNode(node, \"NewExpression\")\n}\n\n// Parse template expression.\n\npp.parseTemplateElement = function({isTagged}) {\n let elem = this.startNode()\n if (this.type === tt.invalidTemplate) {\n if (!isTagged) {\n this.raiseRecoverable(this.start, \"Bad escape sequence in untagged template literal\")\n }\n elem.value = {\n raw: this.value,\n cooked: null\n }\n } else {\n elem.value = {\n raw: this.input.slice(this.start, this.end).replace(/\\r\\n?/g, \"\\n\"),\n cooked: this.value\n }\n }\n this.next()\n elem.tail = this.type === tt.backQuote\n return this.finishNode(elem, \"TemplateElement\")\n}\n\npp.parseTemplate = function({isTagged = false} = {}) {\n let node = this.startNode()\n this.next()\n node.expressions = []\n let curElt = this.parseTemplateElement({isTagged})\n node.quasis = [curElt]\n while (!curElt.tail) {\n if (this.type === tt.eof) this.raise(this.pos, \"Unterminated template literal\")\n this.expect(tt.dollarBraceL)\n node.expressions.push(this.parseExpression())\n this.expect(tt.braceR)\n node.quasis.push(curElt = this.parseTemplateElement({isTagged}))\n }\n this.next()\n return this.finishNode(node, \"TemplateLiteral\")\n}\n\npp.isAsyncProp = function(prop) {\n return !prop.computed && prop.key.type === \"Identifier\" && prop.key.name === \"async\" &&\n (this.type === tt.name || this.type === tt.num || this.type === tt.string || this.type === tt.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === tt.star)) &&\n !lineBreak.test(this.input.slice(this.lastTokEnd, this.start))\n}\n\n// Parse an object literal or binding pattern.\n\npp.parseObj = function(isPattern, refDestructuringErrors) {\n let node = this.startNode(), first = true, propHash = {}\n node.properties = []\n this.next()\n while (!this.eat(tt.braceR)) {\n if (!first) {\n this.expect(tt.comma)\n if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(tt.braceR)) break\n } else first = false\n\n const prop = this.parseProperty(isPattern, refDestructuringErrors)\n if (!isPattern) this.checkPropClash(prop, propHash, refDestructuringErrors)\n node.properties.push(prop)\n }\n return this.finishNode(node, isPattern ? \"ObjectPattern\" : \"ObjectExpression\")\n}\n\npp.parseProperty = function(isPattern, refDestructuringErrors) {\n let prop = this.startNode(), isGenerator, isAsync, startPos, startLoc\n if (this.options.ecmaVersion >= 9 && this.eat(tt.ellipsis)) {\n if (isPattern) {\n prop.argument = this.parseIdent(false)\n if (this.type === tt.comma) {\n this.raise(this.start, \"Comma is not permitted after the rest element\")\n }\n return this.finishNode(prop, \"RestElement\")\n }\n // To disallow parenthesized identifier via `this.toAssignable()`.\n if (this.type === tt.parenL && refDestructuringErrors) {\n if (refDestructuringErrors.parenthesizedAssign < 0) {\n refDestructuringErrors.parenthesizedAssign = this.start\n }\n if (refDestructuringErrors.parenthesizedBind < 0) {\n refDestructuringErrors.parenthesizedBind = this.start\n }\n }\n // Parse argument.\n prop.argument = this.parseMaybeAssign(false, refDestructuringErrors)\n // To disallow trailing comma via `this.toAssignable()`.\n if (this.type === tt.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {\n refDestructuringErrors.trailingComma = this.start\n }\n // Finish\n return this.finishNode(prop, \"SpreadElement\")\n }\n if (this.options.ecmaVersion >= 6) {\n prop.method = false\n prop.shorthand = false\n if (isPattern || refDestructuringErrors) {\n startPos = this.start\n startLoc = this.startLoc\n }\n if (!isPattern)\n isGenerator = this.eat(tt.star)\n }\n let containsEsc = this.containsEsc\n this.parsePropertyName(prop)\n if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {\n isAsync = true\n isGenerator = this.options.ecmaVersion >= 9 && this.eat(tt.star)\n this.parsePropertyName(prop, refDestructuringErrors)\n } else {\n isAsync = false\n }\n this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc)\n return this.finishNode(prop, \"Property\")\n}\n\npp.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {\n if ((isGenerator || isAsync) && this.type === tt.colon)\n this.unexpected()\n\n if (this.eat(tt.colon)) {\n prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)\n prop.kind = \"init\"\n } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {\n if (isPattern) this.unexpected()\n prop.kind = \"init\"\n prop.method = true\n prop.value = this.parseMethod(isGenerator, isAsync)\n } else if (!isPattern && !containsEsc &&\n this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === \"Identifier\" &&\n (prop.key.name === \"get\" || prop.key.name === \"set\") &&\n (this.type !== tt.comma && this.type !== tt.braceR && this.type !== tt.eq)) {\n if (isGenerator || isAsync) this.unexpected()\n prop.kind = prop.key.name\n this.parsePropertyName(prop)\n prop.value = this.parseMethod(false)\n let paramCount = prop.kind === \"get\" ? 0 : 1\n if (prop.value.params.length !== paramCount) {\n let start = prop.value.start\n if (prop.kind === \"get\")\n this.raiseRecoverable(start, \"getter should have no params\")\n else\n this.raiseRecoverable(start, \"setter should have exactly one param\")\n } else {\n if (prop.kind === \"set\" && prop.value.params[0].type === \"RestElement\")\n this.raiseRecoverable(prop.value.params[0].start, \"Setter cannot use rest params\")\n }\n } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === \"Identifier\") {\n if (isGenerator || isAsync) this.unexpected()\n this.checkUnreserved(prop.key)\n if (prop.key.name === \"await\" && !this.awaitIdentPos)\n this.awaitIdentPos = startPos\n prop.kind = \"init\"\n if (isPattern) {\n prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key))\n } else if (this.type === tt.eq && refDestructuringErrors) {\n if (refDestructuringErrors.shorthandAssign < 0)\n refDestructuringErrors.shorthandAssign = this.start\n prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key))\n } else {\n prop.value = this.copyNode(prop.key)\n }\n prop.shorthand = true\n } else this.unexpected()\n}\n\npp.parsePropertyName = function(prop) {\n if (this.options.ecmaVersion >= 6) {\n if (this.eat(tt.bracketL)) {\n prop.computed = true\n prop.key = this.parseMaybeAssign()\n this.expect(tt.bracketR)\n return prop.key\n } else {\n prop.computed = false\n }\n }\n return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== \"never\")\n}\n\n// Initialize empty function node.\n\npp.initFunction = function(node) {\n node.id = null\n if (this.options.ecmaVersion >= 6) node.generator = node.expression = false\n if (this.options.ecmaVersion >= 8) node.async = false\n}\n\n// Parse object or class method.\n\npp.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {\n let node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos\n\n this.initFunction(node)\n if (this.options.ecmaVersion >= 6)\n node.generator = isGenerator\n if (this.options.ecmaVersion >= 8)\n node.async = !!isAsync\n\n this.yieldPos = 0\n this.awaitPos = 0\n this.awaitIdentPos = 0\n this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0))\n\n this.expect(tt.parenL)\n node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8)\n this.checkYieldAwaitInDefaultParams()\n this.parseFunctionBody(node, false, true)\n\n this.yieldPos = oldYieldPos\n this.awaitPos = oldAwaitPos\n this.awaitIdentPos = oldAwaitIdentPos\n return this.finishNode(node, \"FunctionExpression\")\n}\n\n// Parse arrow function expression with given parameters.\n\npp.parseArrowExpression = function(node, params, isAsync) {\n let oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos\n\n this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW)\n this.initFunction(node)\n if (this.options.ecmaVersion >= 8) node.async = !!isAsync\n\n this.yieldPos = 0\n this.awaitPos = 0\n this.awaitIdentPos = 0\n\n node.params = this.toAssignableList(params, true)\n this.parseFunctionBody(node, true, false)\n\n this.yieldPos = oldYieldPos\n this.awaitPos = oldAwaitPos\n this.awaitIdentPos = oldAwaitIdentPos\n return this.finishNode(node, \"ArrowFunctionExpression\")\n}\n\n// Parse function body and check parameters.\n\npp.parseFunctionBody = function(node, isArrowFunction, isMethod) {\n let isExpression = isArrowFunction && this.type !== tt.braceL\n let oldStrict = this.strict, useStrict = false\n\n if (isExpression) {\n node.body = this.parseMaybeAssign()\n node.expression = true\n this.checkParams(node, false)\n } else {\n let nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params)\n if (!oldStrict || nonSimple) {\n useStrict = this.strictDirective(this.end)\n // If this is a strict mode function, verify that argument names\n // are not repeated, and it does not try to bind the words `eval`\n // or `arguments`.\n if (useStrict && nonSimple)\n this.raiseRecoverable(node.start, \"Illegal 'use strict' directive in function with non-simple parameter list\")\n }\n // Start a new scope with regard to labels and the `inFunction`\n // flag (restore them to their old value afterwards).\n let oldLabels = this.labels\n this.labels = []\n if (useStrict) this.strict = true\n\n // Add the params to varDeclaredNames to ensure that an error is thrown\n // if a let/const declaration in the function clashes with one of the params.\n this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params))\n // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'\n if (this.strict && node.id) this.checkLValSimple(node.id, BIND_OUTSIDE)\n node.body = this.parseBlock(false, undefined, useStrict && !oldStrict)\n node.expression = false\n this.adaptDirectivePrologue(node.body.body)\n this.labels = oldLabels\n }\n this.exitScope()\n}\n\npp.isSimpleParamList = function(params) {\n for (let param of params)\n if (param.type !== \"Identifier\") return false\n return true\n}\n\n// Checks function params for various disallowed patterns such as using \"eval\"\n// or \"arguments\" and duplicate parameters.\n\npp.checkParams = function(node, allowDuplicates) {\n let nameHash = {}\n for (let param of node.params)\n this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash)\n}\n\n// Parses a comma-separated list of expressions, and returns them as\n// an array. `close` is the token type that ends the list, and\n// `allowEmpty` can be turned on to allow subsequent commas with\n// nothing in between them to be parsed as `null` (which is needed\n// for array literals).\n\npp.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {\n let elts = [], first = true\n while (!this.eat(close)) {\n if (!first) {\n this.expect(tt.comma)\n if (allowTrailingComma && this.afterTrailingComma(close)) break\n } else first = false\n\n let elt\n if (allowEmpty && this.type === tt.comma)\n elt = null\n else if (this.type === tt.ellipsis) {\n elt = this.parseSpread(refDestructuringErrors)\n if (refDestructuringErrors && this.type === tt.comma && refDestructuringErrors.trailingComma < 0)\n refDestructuringErrors.trailingComma = this.start\n } else {\n elt = this.parseMaybeAssign(false, refDestructuringErrors)\n }\n elts.push(elt)\n }\n return elts\n}\n\npp.checkUnreserved = function({start, end, name}) {\n if (this.inGenerator && name === \"yield\")\n this.raiseRecoverable(start, \"Cannot use 'yield' as identifier inside a generator\")\n if (this.inAsync && name === \"await\")\n this.raiseRecoverable(start, \"Cannot use 'await' as identifier inside an async function\")\n if (this.keywords.test(name))\n this.raise(start, `Unexpected keyword '${name}'`)\n if (this.options.ecmaVersion < 6 &&\n this.input.slice(start, end).indexOf(\"\\\\\") !== -1) return\n const re = this.strict ? this.reservedWordsStrict : this.reservedWords\n if (re.test(name)) {\n if (!this.inAsync && name === \"await\")\n this.raiseRecoverable(start, \"Cannot use keyword 'await' outside an async function\")\n this.raiseRecoverable(start, `The keyword '${name}' is reserved`)\n }\n}\n\n// Parse the next token as an identifier. If `liberal` is true (used\n// when parsing properties), it will also convert keywords into\n// identifiers.\n\npp.parseIdent = function(liberal, isBinding) {\n let node = this.startNode()\n if (this.type === tt.name) {\n node.name = this.value\n } else if (this.type.keyword) {\n node.name = this.type.keyword\n\n // To fix https://github.com/acornjs/acorn/issues/575\n // `class` and `function` keywords push new context into this.context.\n // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.\n // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword\n if ((node.name === \"class\" || node.name === \"function\") &&\n (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {\n this.context.pop()\n }\n } else {\n this.unexpected()\n }\n this.next(!!liberal)\n this.finishNode(node, \"Identifier\")\n if (!liberal) {\n this.checkUnreserved(node)\n if (node.name === \"await\" && !this.awaitIdentPos)\n this.awaitIdentPos = node.start\n }\n return node\n}\n\n// Parses yield expression inside generator.\n\npp.parseYield = function(noIn) {\n if (!this.yieldPos) this.yieldPos = this.start\n\n let node = this.startNode()\n this.next()\n if (this.type === tt.semi || this.canInsertSemicolon() || (this.type !== tt.star && !this.type.startsExpr)) {\n node.delegate = false\n node.argument = null\n } else {\n node.delegate = this.eat(tt.star)\n node.argument = this.parseMaybeAssign(noIn)\n }\n return this.finishNode(node, \"YieldExpression\")\n}\n\npp.parseAwait = function() {\n if (!this.awaitPos) this.awaitPos = this.start\n\n let node = this.startNode()\n this.next()\n node.argument = this.parseMaybeUnary(null, true)\n return this.finishNode(node, \"AwaitExpression\")\n}\n","import {Parser} from \"./state.js\"\nimport {Position, getLineInfo} from \"./locutil.js\"\n\nconst pp = Parser.prototype\n\n// This function is used to raise exceptions on parse errors. It\n// takes an offset integer (into the current `input`) to indicate\n// the location of the error, attaches the position to the end\n// of the error message, and then raises a `SyntaxError` with that\n// message.\n\npp.raise = function(pos, message) {\n let loc = getLineInfo(this.input, pos)\n message += \" (\" + loc.line + \":\" + loc.column + \")\"\n let err = new SyntaxError(message)\n err.pos = pos; err.loc = loc; err.raisedAt = this.pos\n throw err\n}\n\npp.raiseRecoverable = pp.raise\n\npp.curPosition = function() {\n if (this.options.locations) {\n return new Position(this.curLine, this.pos - this.lineStart)\n }\n}\n","import {Parser} from \"./state.js\"\nimport {SCOPE_VAR, SCOPE_FUNCTION, SCOPE_TOP, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, BIND_LEXICAL, BIND_SIMPLE_CATCH, BIND_FUNCTION} from \"./scopeflags.js\"\n\nconst pp = Parser.prototype\n\nclass Scope {\n constructor(flags) {\n this.flags = flags\n // A list of var-declared names in the current lexical scope\n this.var = []\n // A list of lexically-declared names in the current lexical scope\n this.lexical = []\n // A list of lexically-declared FunctionDeclaration names in the current lexical scope\n this.functions = []\n }\n}\n\n// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.\n\npp.enterScope = function(flags) {\n this.scopeStack.push(new Scope(flags))\n}\n\npp.exitScope = function() {\n this.scopeStack.pop()\n}\n\n// The spec says:\n// > At the top level of a function, or script, function declarations are\n// > treated like var declarations rather than like lexical declarations.\npp.treatFunctionsAsVarInScope = function(scope) {\n return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP)\n}\n\npp.declareName = function(name, bindingType, pos) {\n let redeclared = false\n if (bindingType === BIND_LEXICAL) {\n const scope = this.currentScope()\n redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1\n scope.lexical.push(name)\n if (this.inModule && (scope.flags & SCOPE_TOP))\n delete this.undefinedExports[name]\n } else if (bindingType === BIND_SIMPLE_CATCH) {\n const scope = this.currentScope()\n scope.lexical.push(name)\n } else if (bindingType === BIND_FUNCTION) {\n const scope = this.currentScope()\n if (this.treatFunctionsAsVar)\n redeclared = scope.lexical.indexOf(name) > -1\n else\n redeclared = scope.lexical.indexOf(name) > -1 || scope.var.indexOf(name) > -1\n scope.functions.push(name)\n } else {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n const scope = this.scopeStack[i]\n if (scope.lexical.indexOf(name) > -1 && !((scope.flags & SCOPE_SIMPLE_CATCH) && scope.lexical[0] === name) ||\n !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name) > -1) {\n redeclared = true\n break\n }\n scope.var.push(name)\n if (this.inModule && (scope.flags & SCOPE_TOP))\n delete this.undefinedExports[name]\n if (scope.flags & SCOPE_VAR) break\n }\n }\n if (redeclared) this.raiseRecoverable(pos, `Identifier '${name}' has already been declared`)\n}\n\npp.checkLocalExport = function(id) {\n // scope.functions must be empty as Module code is always strict.\n if (this.scopeStack[0].lexical.indexOf(id.name) === -1 &&\n this.scopeStack[0].var.indexOf(id.name) === -1) {\n this.undefinedExports[id.name] = id\n }\n}\n\npp.currentScope = function() {\n return this.scopeStack[this.scopeStack.length - 1]\n}\n\npp.currentVarScope = function() {\n for (let i = this.scopeStack.length - 1;; i--) {\n let scope = this.scopeStack[i]\n if (scope.flags & SCOPE_VAR) return scope\n }\n}\n\n// Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\npp.currentThisScope = function() {\n for (let i = this.scopeStack.length - 1;; i--) {\n let scope = this.scopeStack[i]\n if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) return scope\n }\n}\n","import {Parser} from \"./state.js\"\nimport {SourceLocation} from \"./locutil.js\"\n\nexport class Node {\n constructor(parser, pos, loc) {\n this.type = \"\"\n this.start = pos\n this.end = 0\n if (parser.options.locations)\n this.loc = new SourceLocation(parser, loc)\n if (parser.options.directSourceFile)\n this.sourceFile = parser.options.directSourceFile\n if (parser.options.ranges)\n this.range = [pos, 0]\n }\n}\n\n// Start an AST node, attaching a start offset.\n\nconst pp = Parser.prototype\n\npp.startNode = function() {\n return new Node(this, this.start, this.startLoc)\n}\n\npp.startNodeAt = function(pos, loc) {\n return new Node(this, pos, loc)\n}\n\n// Finish an AST node, adding `type` and `end` properties.\n\nfunction finishNodeAt(node, type, pos, loc) {\n node.type = type\n node.end = pos\n if (this.options.locations)\n node.loc.end = loc\n if (this.options.ranges)\n node.range[1] = pos\n return node\n}\n\npp.finishNode = function(node, type) {\n return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)\n}\n\n// Finish node at given position\n\npp.finishNodeAt = function(node, type, pos, loc) {\n return finishNodeAt.call(this, node, type, pos, loc)\n}\n\npp.copyNode = function(node) {\n let newNode = new Node(this, node.start, this.startLoc)\n for (let prop in node) newNode[prop] = node[prop]\n return newNode\n}\n","// The algorithm used to determine whether a regexp can appear at a\n// given point in the program is loosely based on sweet.js' approach.\n// See https://github.com/mozilla/sweet.js/wiki/design\n\nimport {Parser} from \"./state.js\"\nimport {types as tt} from \"./tokentype.js\"\nimport {lineBreak} from \"./whitespace.js\"\n\nexport class TokContext {\n constructor(token, isExpr, preserveSpace, override, generator) {\n this.token = token\n this.isExpr = !!isExpr\n this.preserveSpace = !!preserveSpace\n this.override = override\n this.generator = !!generator\n }\n}\n\nexport const types = {\n b_stat: new TokContext(\"{\", false),\n b_expr: new TokContext(\"{\", true),\n b_tmpl: new TokContext(\"${\", false),\n p_stat: new TokContext(\"(\", false),\n p_expr: new TokContext(\"(\", true),\n q_tmpl: new TokContext(\"`\", true, true, p => p.tryReadTemplateToken()),\n f_stat: new TokContext(\"function\", false),\n f_expr: new TokContext(\"function\", true),\n f_expr_gen: new TokContext(\"function\", true, false, null, true),\n f_gen: new TokContext(\"function\", false, false, null, true)\n}\n\nconst pp = Parser.prototype\n\npp.initialContext = function() {\n return [types.b_stat]\n}\n\npp.braceIsBlock = function(prevType) {\n let parent = this.curContext()\n if (parent === types.f_expr || parent === types.f_stat)\n return true\n if (prevType === tt.colon && (parent === types.b_stat || parent === types.b_expr))\n return !parent.isExpr\n\n // The check for `tt.name && exprAllowed` detects whether we are\n // after a `yield` or `of` construct. See the `updateContext` for\n // `tt.name`.\n if (prevType === tt._return || prevType === tt.name && this.exprAllowed)\n return lineBreak.test(this.input.slice(this.lastTokEnd, this.start))\n if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR || prevType === tt.arrow)\n return true\n if (prevType === tt.braceL)\n return parent === types.b_stat\n if (prevType === tt._var || prevType === tt._const || prevType === tt.name)\n return false\n return !this.exprAllowed\n}\n\npp.inGeneratorContext = function() {\n for (let i = this.context.length - 1; i >= 1; i--) {\n let context = this.context[i]\n if (context.token === \"function\")\n return context.generator\n }\n return false\n}\n\npp.updateContext = function(prevType) {\n let update, type = this.type\n if (type.keyword && prevType === tt.dot)\n this.exprAllowed = false\n else if (update = type.updateContext)\n update.call(this, prevType)\n else\n this.exprAllowed = type.beforeExpr\n}\n\n// Token-specific context update code\n\ntt.parenR.updateContext = tt.braceR.updateContext = function() {\n if (this.context.length === 1) {\n this.exprAllowed = true\n return\n }\n let out = this.context.pop()\n if (out === types.b_stat && this.curContext().token === \"function\") {\n out = this.context.pop()\n }\n this.exprAllowed = !out.isExpr\n}\n\ntt.braceL.updateContext = function(prevType) {\n this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr)\n this.exprAllowed = true\n}\n\ntt.dollarBraceL.updateContext = function() {\n this.context.push(types.b_tmpl)\n this.exprAllowed = true\n}\n\ntt.parenL.updateContext = function(prevType) {\n let statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while\n this.context.push(statementParens ? types.p_stat : types.p_expr)\n this.exprAllowed = true\n}\n\ntt.incDec.updateContext = function() {\n // tokExprAllowed stays unchanged\n}\n\ntt._function.updateContext = tt._class.updateContext = function(prevType) {\n if (prevType.beforeExpr && prevType !== tt._else &&\n !(prevType === tt.semi && this.curContext() !== types.p_stat) &&\n !(prevType === tt._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) &&\n !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat))\n this.context.push(types.f_expr)\n else\n this.context.push(types.f_stat)\n this.exprAllowed = false\n}\n\ntt.backQuote.updateContext = function() {\n if (this.curContext() === types.q_tmpl)\n this.context.pop()\n else\n this.context.push(types.q_tmpl)\n this.exprAllowed = false\n}\n\ntt.star.updateContext = function(prevType) {\n if (prevType === tt._function) {\n let index = this.context.length - 1\n if (this.context[index] === types.f_expr)\n this.context[index] = types.f_expr_gen\n else\n this.context[index] = types.f_gen\n }\n this.exprAllowed = true\n}\n\ntt.name.updateContext = function(prevType) {\n let allowed = false\n if (this.options.ecmaVersion >= 6 && prevType !== tt.dot) {\n if (this.value === \"of\" && !this.exprAllowed ||\n this.value === \"yield\" && this.inGeneratorContext())\n allowed = true\n }\n this.exprAllowed = allowed\n}\n","import {wordsRegexp} from \"./util.js\"\n\n// This file contains Unicode properties extracted from the ECMAScript\n// specification. The lists are extracted like so:\n// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText)\n\n// #table-binary-unicode-properties\nconst ecma9BinaryProperties = \"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS\"\nconst ecma10BinaryProperties = ecma9BinaryProperties + \" Extended_Pictographic\"\nconst ecma11BinaryProperties = ecma10BinaryProperties\nconst ecma12BinaryProperties = ecma11BinaryProperties + \" EBase EComp EMod EPres ExtPict\"\nconst unicodeBinaryProperties = {\n 9: ecma9BinaryProperties,\n 10: ecma10BinaryProperties,\n 11: ecma11BinaryProperties,\n 12: ecma12BinaryProperties\n}\n\n// #table-unicode-general-category-values\nconst unicodeGeneralCategoryValues = \"Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu\"\n\n// #table-unicode-script-values\nconst ecma9ScriptValues = \"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb\"\nconst ecma10ScriptValues = ecma9ScriptValues + \" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd\"\nconst ecma11ScriptValues = ecma10ScriptValues + \" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho\"\nconst ecma12ScriptValues = ecma11ScriptValues + \" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi\"\nconst unicodeScriptValues = {\n 9: ecma9ScriptValues,\n 10: ecma10ScriptValues,\n 11: ecma11ScriptValues,\n 12: ecma12ScriptValues\n}\n\nconst data = {}\nfunction buildUnicodeData(ecmaVersion) {\n let d = data[ecmaVersion] = {\n binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + \" \" + unicodeGeneralCategoryValues),\n nonBinary: {\n General_Category: wordsRegexp(unicodeGeneralCategoryValues),\n Script: wordsRegexp(unicodeScriptValues[ecmaVersion])\n }\n }\n d.nonBinary.Script_Extensions = d.nonBinary.Script\n\n d.nonBinary.gc = d.nonBinary.General_Category\n d.nonBinary.sc = d.nonBinary.Script\n d.nonBinary.scx = d.nonBinary.Script_Extensions\n}\nbuildUnicodeData(9)\nbuildUnicodeData(10)\nbuildUnicodeData(11)\nbuildUnicodeData(12)\n\nexport default data\n","import {isIdentifierStart, isIdentifierChar} from \"./identifier.js\"\nimport {Parser} from \"./state.js\"\nimport UNICODE_PROPERTY_VALUES from \"./unicode-property-data.js\"\nimport {has} from \"./util.js\"\n\nconst pp = Parser.prototype\n\nexport class RegExpValidationState {\n constructor(parser) {\n this.parser = parser\n this.validFlags = `gim${parser.options.ecmaVersion >= 6 ? \"uy\" : \"\"}${parser.options.ecmaVersion >= 9 ? \"s\" : \"\"}`\n this.unicodeProperties = UNICODE_PROPERTY_VALUES[parser.options.ecmaVersion >= 12 ? 12 : parser.options.ecmaVersion]\n this.source = \"\"\n this.flags = \"\"\n this.start = 0\n this.switchU = false\n this.switchN = false\n this.pos = 0\n this.lastIntValue = 0\n this.lastStringValue = \"\"\n this.lastAssertionIsQuantifiable = false\n this.numCapturingParens = 0\n this.maxBackReference = 0\n this.groupNames = []\n this.backReferenceNames = []\n }\n\n reset(start, pattern, flags) {\n const unicode = flags.indexOf(\"u\") !== -1\n this.start = start | 0\n this.source = pattern + \"\"\n this.flags = flags\n this.switchU = unicode && this.parser.options.ecmaVersion >= 6\n this.switchN = unicode && this.parser.options.ecmaVersion >= 9\n }\n\n raise(message) {\n this.parser.raiseRecoverable(this.start, `Invalid regular expression: /${this.source}/: ${message}`)\n }\n\n // If u flag is given, this returns the code point at the index (it combines a surrogate pair).\n // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair).\n at(i, forceU = false) {\n const s = this.source\n const l = s.length\n if (i >= l) {\n return -1\n }\n const c = s.charCodeAt(i)\n if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {\n return c\n }\n const next = s.charCodeAt(i + 1)\n return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c\n }\n\n nextIndex(i, forceU = false) {\n const s = this.source\n const l = s.length\n if (i >= l) {\n return l\n }\n let c = s.charCodeAt(i), next\n if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l ||\n (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) {\n return i + 1\n }\n return i + 2\n }\n\n current(forceU = false) {\n return this.at(this.pos, forceU)\n }\n\n lookahead(forceU = false) {\n return this.at(this.nextIndex(this.pos, forceU), forceU)\n }\n\n advance(forceU = false) {\n this.pos = this.nextIndex(this.pos, forceU)\n }\n\n eat(ch, forceU = false) {\n if (this.current(forceU) === ch) {\n this.advance(forceU)\n return true\n }\n return false\n }\n}\n\nfunction codePointToString(ch) {\n if (ch <= 0xFFFF) return String.fromCharCode(ch)\n ch -= 0x10000\n return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00)\n}\n\n/**\n * Validate the flags part of a given RegExpLiteral.\n *\n * @param {RegExpValidationState} state The state to validate RegExp.\n * @returns {void}\n */\npp.validateRegExpFlags = function(state) {\n const validFlags = state.validFlags\n const flags = state.flags\n\n for (let i = 0; i < flags.length; i++) {\n const flag = flags.charAt(i)\n if (validFlags.indexOf(flag) === -1) {\n this.raise(state.start, \"Invalid regular expression flag\")\n }\n if (flags.indexOf(flag, i + 1) > -1) {\n this.raise(state.start, \"Duplicate regular expression flag\")\n }\n }\n}\n\n/**\n * Validate the pattern part of a given RegExpLiteral.\n *\n * @param {RegExpValidationState} state The state to validate RegExp.\n * @returns {void}\n */\npp.validateRegExpPattern = function(state) {\n this.regexp_pattern(state)\n\n // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of\n // parsing contains a |GroupName|, reparse with the goal symbol\n // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*\n // exception if _P_ did not conform to the grammar, if any elements of _P_\n // were not matched by the parse, or if any Early Error conditions exist.\n if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {\n state.switchN = true\n this.regexp_pattern(state)\n }\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern\npp.regexp_pattern = function(state) {\n state.pos = 0\n state.lastIntValue = 0\n state.lastStringValue = \"\"\n state.lastAssertionIsQuantifiable = false\n state.numCapturingParens = 0\n state.maxBackReference = 0\n state.groupNames.length = 0\n state.backReferenceNames.length = 0\n\n this.regexp_disjunction(state)\n\n if (state.pos !== state.source.length) {\n // Make the same messages as V8.\n if (state.eat(0x29 /* ) */)) {\n state.raise(\"Unmatched ')'\")\n }\n if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) {\n state.raise(\"Lone quantifier brackets\")\n }\n }\n if (state.maxBackReference > state.numCapturingParens) {\n state.raise(\"Invalid escape\")\n }\n for (const name of state.backReferenceNames) {\n if (state.groupNames.indexOf(name) === -1) {\n state.raise(\"Invalid named capture referenced\")\n }\n }\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction\npp.regexp_disjunction = function(state) {\n this.regexp_alternative(state)\n while (state.eat(0x7C /* | */)) {\n this.regexp_alternative(state)\n }\n\n // Make the same message as V8.\n if (this.regexp_eatQuantifier(state, true)) {\n state.raise(\"Nothing to repeat\")\n }\n if (state.eat(0x7B /* { */)) {\n state.raise(\"Lone quantifier brackets\")\n }\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative\npp.regexp_alternative = function(state) {\n while (state.pos < state.source.length && this.regexp_eatTerm(state))\n ;\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term\npp.regexp_eatTerm = function(state) {\n if (this.regexp_eatAssertion(state)) {\n // Handle `QuantifiableAssertion Quantifier` alternative.\n // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion\n // is a QuantifiableAssertion.\n if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {\n // Make the same message as V8.\n if (state.switchU) {\n state.raise(\"Invalid quantifier\")\n }\n }\n return true\n }\n\n if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {\n this.regexp_eatQuantifier(state)\n return true\n }\n\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion\npp.regexp_eatAssertion = function(state) {\n const start = state.pos\n state.lastAssertionIsQuantifiable = false\n\n // ^, $\n if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) {\n return true\n }\n\n // \\b \\B\n if (state.eat(0x5C /* \\ */)) {\n if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) {\n return true\n }\n state.pos = start\n }\n\n // Lookahead / Lookbehind\n if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) {\n let lookbehind = false\n if (this.options.ecmaVersion >= 9) {\n lookbehind = state.eat(0x3C /* < */)\n }\n if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) {\n this.regexp_disjunction(state)\n if (!state.eat(0x29 /* ) */)) {\n state.raise(\"Unterminated group\")\n }\n state.lastAssertionIsQuantifiable = !lookbehind\n return true\n }\n }\n\n state.pos = start\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier\npp.regexp_eatQuantifier = function(state, noError = false) {\n if (this.regexp_eatQuantifierPrefix(state, noError)) {\n state.eat(0x3F /* ? */)\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix\npp.regexp_eatQuantifierPrefix = function(state, noError) {\n return (\n state.eat(0x2A /* * */) ||\n state.eat(0x2B /* + */) ||\n state.eat(0x3F /* ? */) ||\n this.regexp_eatBracedQuantifier(state, noError)\n )\n}\npp.regexp_eatBracedQuantifier = function(state, noError) {\n const start = state.pos\n if (state.eat(0x7B /* { */)) {\n let min = 0, max = -1\n if (this.regexp_eatDecimalDigits(state)) {\n min = state.lastIntValue\n if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) {\n max = state.lastIntValue\n }\n if (state.eat(0x7D /* } */)) {\n // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term\n if (max !== -1 && max < min && !noError) {\n state.raise(\"numbers out of order in {} quantifier\")\n }\n return true\n }\n }\n if (state.switchU && !noError) {\n state.raise(\"Incomplete quantifier\")\n }\n state.pos = start\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom\npp.regexp_eatAtom = function(state) {\n return (\n this.regexp_eatPatternCharacters(state) ||\n state.eat(0x2E /* . */) ||\n this.regexp_eatReverseSolidusAtomEscape(state) ||\n this.regexp_eatCharacterClass(state) ||\n this.regexp_eatUncapturingGroup(state) ||\n this.regexp_eatCapturingGroup(state)\n )\n}\npp.regexp_eatReverseSolidusAtomEscape = function(state) {\n const start = state.pos\n if (state.eat(0x5C /* \\ */)) {\n if (this.regexp_eatAtomEscape(state)) {\n return true\n }\n state.pos = start\n }\n return false\n}\npp.regexp_eatUncapturingGroup = function(state) {\n const start = state.pos\n if (state.eat(0x28 /* ( */)) {\n if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) {\n this.regexp_disjunction(state)\n if (state.eat(0x29 /* ) */)) {\n return true\n }\n state.raise(\"Unterminated group\")\n }\n state.pos = start\n }\n return false\n}\npp.regexp_eatCapturingGroup = function(state) {\n if (state.eat(0x28 /* ( */)) {\n if (this.options.ecmaVersion >= 9) {\n this.regexp_groupSpecifier(state)\n } else if (state.current() === 0x3F /* ? */) {\n state.raise(\"Invalid group\")\n }\n this.regexp_disjunction(state)\n if (state.eat(0x29 /* ) */)) {\n state.numCapturingParens += 1\n return true\n }\n state.raise(\"Unterminated group\")\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom\npp.regexp_eatExtendedAtom = function(state) {\n return (\n state.eat(0x2E /* . */) ||\n this.regexp_eatReverseSolidusAtomEscape(state) ||\n this.regexp_eatCharacterClass(state) ||\n this.regexp_eatUncapturingGroup(state) ||\n this.regexp_eatCapturingGroup(state) ||\n this.regexp_eatInvalidBracedQuantifier(state) ||\n this.regexp_eatExtendedPatternCharacter(state)\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier\npp.regexp_eatInvalidBracedQuantifier = function(state) {\n if (this.regexp_eatBracedQuantifier(state, true)) {\n state.raise(\"Nothing to repeat\")\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter\npp.regexp_eatSyntaxCharacter = function(state) {\n const ch = state.current()\n if (isSyntaxCharacter(ch)) {\n state.lastIntValue = ch\n state.advance()\n return true\n }\n return false\n}\nfunction isSyntaxCharacter(ch) {\n return (\n ch === 0x24 /* $ */ ||\n ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ ||\n ch === 0x2E /* . */ ||\n ch === 0x3F /* ? */ ||\n ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ ||\n ch >= 0x7B /* { */ && ch <= 0x7D /* } */\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter\n// But eat eager.\npp.regexp_eatPatternCharacters = function(state) {\n const start = state.pos\n let ch = 0\n while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {\n state.advance()\n }\n return state.pos !== start\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter\npp.regexp_eatExtendedPatternCharacter = function(state) {\n const ch = state.current()\n if (\n ch !== -1 &&\n ch !== 0x24 /* $ */ &&\n !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) &&\n ch !== 0x2E /* . */ &&\n ch !== 0x3F /* ? */ &&\n ch !== 0x5B /* [ */ &&\n ch !== 0x5E /* ^ */ &&\n ch !== 0x7C /* | */\n ) {\n state.advance()\n return true\n }\n return false\n}\n\n// GroupSpecifier ::\n// [empty]\n// `?` GroupName\npp.regexp_groupSpecifier = function(state) {\n if (state.eat(0x3F /* ? */)) {\n if (this.regexp_eatGroupName(state)) {\n if (state.groupNames.indexOf(state.lastStringValue) !== -1) {\n state.raise(\"Duplicate capture group name\")\n }\n state.groupNames.push(state.lastStringValue)\n return\n }\n state.raise(\"Invalid group\")\n }\n}\n\n// GroupName ::\n// `<` RegExpIdentifierName `>`\n// Note: this updates `state.lastStringValue` property with the eaten name.\npp.regexp_eatGroupName = function(state) {\n state.lastStringValue = \"\"\n if (state.eat(0x3C /* < */)) {\n if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) {\n return true\n }\n state.raise(\"Invalid capture group name\")\n }\n return false\n}\n\n// RegExpIdentifierName ::\n// RegExpIdentifierStart\n// RegExpIdentifierName RegExpIdentifierPart\n// Note: this updates `state.lastStringValue` property with the eaten name.\npp.regexp_eatRegExpIdentifierName = function(state) {\n state.lastStringValue = \"\"\n if (this.regexp_eatRegExpIdentifierStart(state)) {\n state.lastStringValue += codePointToString(state.lastIntValue)\n while (this.regexp_eatRegExpIdentifierPart(state)) {\n state.lastStringValue += codePointToString(state.lastIntValue)\n }\n return true\n }\n return false\n}\n\n// RegExpIdentifierStart ::\n// UnicodeIDStart\n// `$`\n// `_`\n// `\\` RegExpUnicodeEscapeSequence[+U]\npp.regexp_eatRegExpIdentifierStart = function(state) {\n const start = state.pos\n const forceU = this.options.ecmaVersion >= 11\n let ch = state.current(forceU)\n state.advance(forceU)\n\n if (ch === 0x5C /* \\ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {\n ch = state.lastIntValue\n }\n if (isRegExpIdentifierStart(ch)) {\n state.lastIntValue = ch\n return true\n }\n\n state.pos = start\n return false\n}\nfunction isRegExpIdentifierStart(ch) {\n return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */\n}\n\n// RegExpIdentifierPart ::\n// UnicodeIDContinue\n// `$`\n// `_`\n// `\\` RegExpUnicodeEscapeSequence[+U]\n// \n// \npp.regexp_eatRegExpIdentifierPart = function(state) {\n const start = state.pos\n const forceU = this.options.ecmaVersion >= 11\n let ch = state.current(forceU)\n state.advance(forceU)\n\n if (ch === 0x5C /* \\ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {\n ch = state.lastIntValue\n }\n if (isRegExpIdentifierPart(ch)) {\n state.lastIntValue = ch\n return true\n }\n\n state.pos = start\n return false\n}\nfunction isRegExpIdentifierPart(ch) {\n return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape\npp.regexp_eatAtomEscape = function(state) {\n if (\n this.regexp_eatBackReference(state) ||\n this.regexp_eatCharacterClassEscape(state) ||\n this.regexp_eatCharacterEscape(state) ||\n (state.switchN && this.regexp_eatKGroupName(state))\n ) {\n return true\n }\n if (state.switchU) {\n // Make the same message as V8.\n if (state.current() === 0x63 /* c */) {\n state.raise(\"Invalid unicode escape\")\n }\n state.raise(\"Invalid escape\")\n }\n return false\n}\npp.regexp_eatBackReference = function(state) {\n const start = state.pos\n if (this.regexp_eatDecimalEscape(state)) {\n const n = state.lastIntValue\n if (state.switchU) {\n // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape\n if (n > state.maxBackReference) {\n state.maxBackReference = n\n }\n return true\n }\n if (n <= state.numCapturingParens) {\n return true\n }\n state.pos = start\n }\n return false\n}\npp.regexp_eatKGroupName = function(state) {\n if (state.eat(0x6B /* k */)) {\n if (this.regexp_eatGroupName(state)) {\n state.backReferenceNames.push(state.lastStringValue)\n return true\n }\n state.raise(\"Invalid named reference\")\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape\npp.regexp_eatCharacterEscape = function(state) {\n return (\n this.regexp_eatControlEscape(state) ||\n this.regexp_eatCControlLetter(state) ||\n this.regexp_eatZero(state) ||\n this.regexp_eatHexEscapeSequence(state) ||\n this.regexp_eatRegExpUnicodeEscapeSequence(state, false) ||\n (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) ||\n this.regexp_eatIdentityEscape(state)\n )\n}\npp.regexp_eatCControlLetter = function(state) {\n const start = state.pos\n if (state.eat(0x63 /* c */)) {\n if (this.regexp_eatControlLetter(state)) {\n return true\n }\n state.pos = start\n }\n return false\n}\npp.regexp_eatZero = function(state) {\n if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) {\n state.lastIntValue = 0\n state.advance()\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape\npp.regexp_eatControlEscape = function(state) {\n const ch = state.current()\n if (ch === 0x74 /* t */) {\n state.lastIntValue = 0x09 /* \\t */\n state.advance()\n return true\n }\n if (ch === 0x6E /* n */) {\n state.lastIntValue = 0x0A /* \\n */\n state.advance()\n return true\n }\n if (ch === 0x76 /* v */) {\n state.lastIntValue = 0x0B /* \\v */\n state.advance()\n return true\n }\n if (ch === 0x66 /* f */) {\n state.lastIntValue = 0x0C /* \\f */\n state.advance()\n return true\n }\n if (ch === 0x72 /* r */) {\n state.lastIntValue = 0x0D /* \\r */\n state.advance()\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter\npp.regexp_eatControlLetter = function(state) {\n const ch = state.current()\n if (isControlLetter(ch)) {\n state.lastIntValue = ch % 0x20\n state.advance()\n return true\n }\n return false\n}\nfunction isControlLetter(ch) {\n return (\n (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) ||\n (ch >= 0x61 /* a */ && ch <= 0x7A /* z */)\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence\npp.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU = false) {\n const start = state.pos\n const switchU = forceU || state.switchU\n\n if (state.eat(0x75 /* u */)) {\n if (this.regexp_eatFixedHexDigits(state, 4)) {\n const lead = state.lastIntValue\n if (switchU && lead >= 0xD800 && lead <= 0xDBFF) {\n const leadSurrogateEnd = state.pos\n if (state.eat(0x5C /* \\ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) {\n const trail = state.lastIntValue\n if (trail >= 0xDC00 && trail <= 0xDFFF) {\n state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000\n return true\n }\n }\n state.pos = leadSurrogateEnd\n state.lastIntValue = lead\n }\n return true\n }\n if (\n switchU &&\n state.eat(0x7B /* { */) &&\n this.regexp_eatHexDigits(state) &&\n state.eat(0x7D /* } */) &&\n isValidUnicode(state.lastIntValue)\n ) {\n return true\n }\n if (switchU) {\n state.raise(\"Invalid unicode escape\")\n }\n state.pos = start\n }\n\n return false\n}\nfunction isValidUnicode(ch) {\n return ch >= 0 && ch <= 0x10FFFF\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape\npp.regexp_eatIdentityEscape = function(state) {\n if (state.switchU) {\n if (this.regexp_eatSyntaxCharacter(state)) {\n return true\n }\n if (state.eat(0x2F /* / */)) {\n state.lastIntValue = 0x2F /* / */\n return true\n }\n return false\n }\n\n const ch = state.current()\n if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) {\n state.lastIntValue = ch\n state.advance()\n return true\n }\n\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape\npp.regexp_eatDecimalEscape = function(state) {\n state.lastIntValue = 0\n let ch = state.current()\n if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) {\n do {\n state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */)\n state.advance()\n } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */)\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape\npp.regexp_eatCharacterClassEscape = function(state) {\n const ch = state.current()\n\n if (isCharacterClassEscape(ch)) {\n state.lastIntValue = -1\n state.advance()\n return true\n }\n\n if (\n state.switchU &&\n this.options.ecmaVersion >= 9 &&\n (ch === 0x50 /* P */ || ch === 0x70 /* p */)\n ) {\n state.lastIntValue = -1\n state.advance()\n if (\n state.eat(0x7B /* { */) &&\n this.regexp_eatUnicodePropertyValueExpression(state) &&\n state.eat(0x7D /* } */)\n ) {\n return true\n }\n state.raise(\"Invalid property name\")\n }\n\n return false\n}\nfunction isCharacterClassEscape(ch) {\n return (\n ch === 0x64 /* d */ ||\n ch === 0x44 /* D */ ||\n ch === 0x73 /* s */ ||\n ch === 0x53 /* S */ ||\n ch === 0x77 /* w */ ||\n ch === 0x57 /* W */\n )\n}\n\n// UnicodePropertyValueExpression ::\n// UnicodePropertyName `=` UnicodePropertyValue\n// LoneUnicodePropertyNameOrValue\npp.regexp_eatUnicodePropertyValueExpression = function(state) {\n const start = state.pos\n\n // UnicodePropertyName `=` UnicodePropertyValue\n if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) {\n const name = state.lastStringValue\n if (this.regexp_eatUnicodePropertyValue(state)) {\n const value = state.lastStringValue\n this.regexp_validateUnicodePropertyNameAndValue(state, name, value)\n return true\n }\n }\n state.pos = start\n\n // LoneUnicodePropertyNameOrValue\n if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {\n const nameOrValue = state.lastStringValue\n this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue)\n return true\n }\n return false\n}\npp.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {\n if (!has(state.unicodeProperties.nonBinary, name))\n state.raise(\"Invalid property name\")\n if (!state.unicodeProperties.nonBinary[name].test(value))\n state.raise(\"Invalid property value\")\n}\npp.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {\n if (!state.unicodeProperties.binary.test(nameOrValue))\n state.raise(\"Invalid property name\")\n}\n\n// UnicodePropertyName ::\n// UnicodePropertyNameCharacters\npp.regexp_eatUnicodePropertyName = function(state) {\n let ch = 0\n state.lastStringValue = \"\"\n while (isUnicodePropertyNameCharacter(ch = state.current())) {\n state.lastStringValue += codePointToString(ch)\n state.advance()\n }\n return state.lastStringValue !== \"\"\n}\nfunction isUnicodePropertyNameCharacter(ch) {\n return isControlLetter(ch) || ch === 0x5F /* _ */\n}\n\n// UnicodePropertyValue ::\n// UnicodePropertyValueCharacters\npp.regexp_eatUnicodePropertyValue = function(state) {\n let ch = 0\n state.lastStringValue = \"\"\n while (isUnicodePropertyValueCharacter(ch = state.current())) {\n state.lastStringValue += codePointToString(ch)\n state.advance()\n }\n return state.lastStringValue !== \"\"\n}\nfunction isUnicodePropertyValueCharacter(ch) {\n return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch)\n}\n\n// LoneUnicodePropertyNameOrValue ::\n// UnicodePropertyValueCharacters\npp.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {\n return this.regexp_eatUnicodePropertyValue(state)\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass\npp.regexp_eatCharacterClass = function(state) {\n if (state.eat(0x5B /* [ */)) {\n state.eat(0x5E /* ^ */)\n this.regexp_classRanges(state)\n if (state.eat(0x5D /* ] */)) {\n return true\n }\n // Unreachable since it threw \"unterminated regular expression\" error before.\n state.raise(\"Unterminated character class\")\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges\n// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges\n// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash\npp.regexp_classRanges = function(state) {\n while (this.regexp_eatClassAtom(state)) {\n const left = state.lastIntValue\n if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) {\n const right = state.lastIntValue\n if (state.switchU && (left === -1 || right === -1)) {\n state.raise(\"Invalid character class\")\n }\n if (left !== -1 && right !== -1 && left > right) {\n state.raise(\"Range out of order in character class\")\n }\n }\n }\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash\npp.regexp_eatClassAtom = function(state) {\n const start = state.pos\n\n if (state.eat(0x5C /* \\ */)) {\n if (this.regexp_eatClassEscape(state)) {\n return true\n }\n if (state.switchU) {\n // Make the same message as V8.\n const ch = state.current()\n if (ch === 0x63 /* c */ || isOctalDigit(ch)) {\n state.raise(\"Invalid class escape\")\n }\n state.raise(\"Invalid escape\")\n }\n state.pos = start\n }\n\n const ch = state.current()\n if (ch !== 0x5D /* ] */) {\n state.lastIntValue = ch\n state.advance()\n return true\n }\n\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape\npp.regexp_eatClassEscape = function(state) {\n const start = state.pos\n\n if (state.eat(0x62 /* b */)) {\n state.lastIntValue = 0x08 /* */\n return true\n }\n\n if (state.switchU && state.eat(0x2D /* - */)) {\n state.lastIntValue = 0x2D /* - */\n return true\n }\n\n if (!state.switchU && state.eat(0x63 /* c */)) {\n if (this.regexp_eatClassControlLetter(state)) {\n return true\n }\n state.pos = start\n }\n\n return (\n this.regexp_eatCharacterClassEscape(state) ||\n this.regexp_eatCharacterEscape(state)\n )\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter\npp.regexp_eatClassControlLetter = function(state) {\n const ch = state.current()\n if (isDecimalDigit(ch) || ch === 0x5F /* _ */) {\n state.lastIntValue = ch % 0x20\n state.advance()\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence\npp.regexp_eatHexEscapeSequence = function(state) {\n const start = state.pos\n if (state.eat(0x78 /* x */)) {\n if (this.regexp_eatFixedHexDigits(state, 2)) {\n return true\n }\n if (state.switchU) {\n state.raise(\"Invalid escape\")\n }\n state.pos = start\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits\npp.regexp_eatDecimalDigits = function(state) {\n const start = state.pos\n let ch = 0\n state.lastIntValue = 0\n while (isDecimalDigit(ch = state.current())) {\n state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */)\n state.advance()\n }\n return state.pos !== start\n}\nfunction isDecimalDigit(ch) {\n return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits\npp.regexp_eatHexDigits = function(state) {\n const start = state.pos\n let ch = 0\n state.lastIntValue = 0\n while (isHexDigit(ch = state.current())) {\n state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch)\n state.advance()\n }\n return state.pos !== start\n}\nfunction isHexDigit(ch) {\n return (\n (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) ||\n (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) ||\n (ch >= 0x61 /* a */ && ch <= 0x66 /* f */)\n )\n}\nfunction hexToInt(ch) {\n if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) {\n return 10 + (ch - 0x41 /* A */)\n }\n if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) {\n return 10 + (ch - 0x61 /* a */)\n }\n return ch - 0x30 /* 0 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence\n// Allows only 0-377(octal) i.e. 0-255(decimal).\npp.regexp_eatLegacyOctalEscapeSequence = function(state) {\n if (this.regexp_eatOctalDigit(state)) {\n const n1 = state.lastIntValue\n if (this.regexp_eatOctalDigit(state)) {\n const n2 = state.lastIntValue\n if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {\n state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue\n } else {\n state.lastIntValue = n1 * 8 + n2\n }\n } else {\n state.lastIntValue = n1\n }\n return true\n }\n return false\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit\npp.regexp_eatOctalDigit = function(state) {\n const ch = state.current()\n if (isOctalDigit(ch)) {\n state.lastIntValue = ch - 0x30 /* 0 */\n state.advance()\n return true\n }\n state.lastIntValue = 0\n return false\n}\nfunction isOctalDigit(ch) {\n return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */\n}\n\n// https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit\n// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence\npp.regexp_eatFixedHexDigits = function(state, length) {\n const start = state.pos\n state.lastIntValue = 0\n for (let i = 0; i < length; ++i) {\n const ch = state.current()\n if (!isHexDigit(ch)) {\n state.pos = start\n return false\n }\n state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch)\n state.advance()\n }\n return true\n}\n","import {isIdentifierStart, isIdentifierChar} from \"./identifier.js\"\nimport {types as tt, keywords as keywordTypes} from \"./tokentype.js\"\nimport {Parser} from \"./state.js\"\nimport {SourceLocation} from \"./locutil.js\"\nimport {RegExpValidationState} from \"./regexp.js\"\nimport {lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace} from \"./whitespace.js\"\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nexport class Token {\n constructor(p) {\n this.type = p.type\n this.value = p.value\n this.start = p.start\n this.end = p.end\n if (p.options.locations)\n this.loc = new SourceLocation(p, p.startLoc, p.endLoc)\n if (p.options.ranges)\n this.range = [p.start, p.end]\n }\n}\n\n// ## Tokenizer\n\nconst pp = Parser.prototype\n\n// Move to the next token\n\npp.next = function(ignoreEscapeSequenceInKeyword) {\n if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc)\n this.raiseRecoverable(this.start, \"Escape sequence in keyword \" + this.type.keyword)\n if (this.options.onToken)\n this.options.onToken(new Token(this))\n\n this.lastTokEnd = this.end\n this.lastTokStart = this.start\n this.lastTokEndLoc = this.endLoc\n this.lastTokStartLoc = this.startLoc\n this.nextToken()\n}\n\npp.getToken = function() {\n this.next()\n return new Token(this)\n}\n\n// If we're in an ES6 environment, make parsers iterable\nif (typeof Symbol !== \"undefined\")\n pp[Symbol.iterator] = function() {\n return {\n next: () => {\n let token = this.getToken()\n return {\n done: token.type === tt.eof,\n value: token\n }\n }\n }\n }\n\n// Toggle strict mode. Re-reads the next number or string to please\n// pedantic tests (`\"use strict\"; 010;` should fail).\n\npp.curContext = function() {\n return this.context[this.context.length - 1]\n}\n\n// Read a single token, updating the parser object's token-related\n// properties.\n\npp.nextToken = function() {\n let curContext = this.curContext()\n if (!curContext || !curContext.preserveSpace) this.skipSpace()\n\n this.start = this.pos\n if (this.options.locations) this.startLoc = this.curPosition()\n if (this.pos >= this.input.length) return this.finishToken(tt.eof)\n\n if (curContext.override) return curContext.override(this)\n else this.readToken(this.fullCharCodeAtPos())\n}\n\npp.readToken = function(code) {\n // Identifier or keyword. '\\uXXXX' sequences are allowed in\n // identifiers, so '\\' also dispatches to that.\n if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\\' */)\n return this.readWord()\n\n return this.getTokenFromCode(code)\n}\n\npp.fullCharCodeAtPos = function() {\n let code = this.input.charCodeAt(this.pos)\n if (code <= 0xd7ff || code >= 0xe000) return code\n let next = this.input.charCodeAt(this.pos + 1)\n return (code << 10) + next - 0x35fdc00\n}\n\npp.skipBlockComment = function() {\n let startLoc = this.options.onComment && this.curPosition()\n let start = this.pos, end = this.input.indexOf(\"*/\", this.pos += 2)\n if (end === -1) this.raise(this.pos - 2, \"Unterminated comment\")\n this.pos = end + 2\n if (this.options.locations) {\n lineBreakG.lastIndex = start\n let match\n while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {\n ++this.curLine\n this.lineStart = match.index + match[0].length\n }\n }\n if (this.options.onComment)\n this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,\n startLoc, this.curPosition())\n}\n\npp.skipLineComment = function(startSkip) {\n let start = this.pos\n let startLoc = this.options.onComment && this.curPosition()\n let ch = this.input.charCodeAt(this.pos += startSkip)\n while (this.pos < this.input.length && !isNewLine(ch)) {\n ch = this.input.charCodeAt(++this.pos)\n }\n if (this.options.onComment)\n this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,\n startLoc, this.curPosition())\n}\n\n// Called at the start of the parse and after every token. Skips\n// whitespace and comments, and.\n\npp.skipSpace = function() {\n loop: while (this.pos < this.input.length) {\n let ch = this.input.charCodeAt(this.pos)\n switch (ch) {\n case 32: case 160: // ' '\n ++this.pos\n break\n case 13:\n if (this.input.charCodeAt(this.pos + 1) === 10) {\n ++this.pos\n }\n case 10: case 8232: case 8233:\n ++this.pos\n if (this.options.locations) {\n ++this.curLine\n this.lineStart = this.pos\n }\n break\n case 47: // '/'\n switch (this.input.charCodeAt(this.pos + 1)) {\n case 42: // '*'\n this.skipBlockComment()\n break\n case 47:\n this.skipLineComment(2)\n break\n default:\n break loop\n }\n break\n default:\n if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {\n ++this.pos\n } else {\n break loop\n }\n }\n }\n}\n\n// Called at the end of every token. Sets `end`, `val`, and\n// maintains `context` and `exprAllowed`, and skips the space after\n// the token, so that the next one's `start` will point at the\n// right position.\n\npp.finishToken = function(type, val) {\n this.end = this.pos\n if (this.options.locations) this.endLoc = this.curPosition()\n let prevType = this.type\n this.type = type\n this.value = val\n\n this.updateContext(prevType)\n}\n\n// ### Token reading\n\n// This is the function that is called to fetch the next token. It\n// is somewhat obscure, because it works in character codes rather\n// than characters, and because operator parsing has been inlined\n// into it.\n//\n// All in the name of speed.\n//\npp.readToken_dot = function() {\n let next = this.input.charCodeAt(this.pos + 1)\n if (next >= 48 && next <= 57) return this.readNumber(true)\n let next2 = this.input.charCodeAt(this.pos + 2)\n if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'\n this.pos += 3\n return this.finishToken(tt.ellipsis)\n } else {\n ++this.pos\n return this.finishToken(tt.dot)\n }\n}\n\npp.readToken_slash = function() { // '/'\n let next = this.input.charCodeAt(this.pos + 1)\n if (this.exprAllowed) { ++this.pos; return this.readRegexp() }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.slash, 1)\n}\n\npp.readToken_mult_modulo_exp = function(code) { // '%*'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n let tokentype = code === 42 ? tt.star : tt.modulo\n\n // exponentiation operator ** and **=\n if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) {\n ++size\n tokentype = tt.starstar\n next = this.input.charCodeAt(this.pos + 2)\n }\n\n if (next === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tokentype, size)\n}\n\npp.readToken_pipe_amp = function(code) { // '|&'\n let next = this.input.charCodeAt(this.pos + 1)\n if (next === code) {\n if (this.options.ecmaVersion >= 12) {\n let next2 = this.input.charCodeAt(this.pos + 2)\n if (next2 === 61) return this.finishOp(tt.assign, 3)\n }\n return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1)\n}\n\npp.readToken_caret = function() { // '^'\n let next = this.input.charCodeAt(this.pos + 1)\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.bitwiseXOR, 1)\n}\n\npp.readToken_plus_min = function(code) { // '+-'\n let next = this.input.charCodeAt(this.pos + 1)\n if (next === code) {\n if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 &&\n (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {\n // A `-->` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types.incDec, 2) + } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) +}; + +pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // ` 2 meter to 6.56168 feet + // 2. convert the residual of 6.56168 feet (0.56168) to inches, which will be (6.74016 + // inches) + // 3. then, the final result will be (6 feet and 6.74016 inches) + for (int i = 0, n = units_.length(); i < n; i++) { + if (i == 0) { // first element + unitConverters_.emplaceBackAndCheckErrorCode(status, inputUnit, *units_[i], ratesInfo, + status); + } else { + unitConverters_.emplaceBackAndCheckErrorCode(status, *units_[i - 1], *units_[i], ratesInfo, + status); + } + + if (U_FAILURE(status)) { + return; + } + } +} + +UBool ComplexUnitsConverter::greaterThanOrEqual(double quantity, double limit) const { + U_ASSERT(unitConverters_.length() > 0); + + // First converter converts to the biggest quantity. + double newQuantity = unitConverters_[0]->convert(quantity); + return newQuantity >= limit; +} + +MaybeStackVector ComplexUnitsConverter::convert(double quantity, + icu::number::impl::RoundingImpl *rounder, + UErrorCode &status) const { + // TODO(hugovdm): return an error for "foot-and-foot"? + MaybeStackVector result; + int sign = 1; + if (quantity < 0) { + quantity *= -1; + sign = -1; + } + + // For N converters: + // - the first converter converts from the input unit to the largest unit, + // - N-1 converters convert to bigger units for which we want integers, + // - the Nth converter (index N-1) converts to the smallest unit, for which + // we keep a double. + MaybeStackArray intValues(unitConverters_.length() - 1, status); + if (U_FAILURE(status)) { + return result; + } + uprv_memset(intValues.getAlias(), 0, (unitConverters_.length() - 1) * sizeof(int64_t)); + + for (int i = 0, n = unitConverters_.length(); i < n; ++i) { + quantity = (*unitConverters_[i]).convert(quantity); + if (i < n - 1) { + // The double type has 15 decimal digits of precision. For choosing + // whether to use the current unit or the next smaller unit, we + // therefore nudge up the number with which the thresholding + // decision is made. However after the thresholding, we use the + // original values to ensure unbiased accuracy (to the extent of + // double's capabilities). + int64_t roundedQuantity = floor(quantity * (1 + DBL_EPSILON)); + intValues[i] = roundedQuantity; + + // Keep the residual of the quantity. + // For example: `3.6 feet`, keep only `0.6 feet` + // + // When the calculation is near enough +/- DBL_EPSILON, we round to + // zero. (We also ensure no negative values here.) + if ((quantity - roundedQuantity) / quantity < DBL_EPSILON) { + quantity = 0; + } else { + quantity -= roundedQuantity; + } + } else { // LAST ELEMENT + if (rounder == nullptr) { + // Nothing to do for the last element. + break; + } + + // Round the last value + // TODO(ICU-21288): get smarter about precision for mixed units. + number::impl::DecimalQuantity quant; + quant.setToDouble(quantity); + rounder->apply(quant, status); + if (U_FAILURE(status)) { + return result; + } + quantity = quant.toDouble(); + if (i == 0) { + // Last element is also the first element, so we're done + break; + } + + // Check if there's a carry, and bubble it back up the resulting intValues. + int64_t carry = floor(unitConverters_[i]->convertInverse(quantity) * (1 + DBL_EPSILON)); + if (carry <= 0) { + break; + } + quantity -= unitConverters_[i]->convert(carry); + intValues[i - 1] += carry; + + // We don't use the first converter: that one is for the input unit + for (int32_t j = i - 1; j > 0; j--) { + carry = floor(unitConverters_[j]->convertInverse(intValues[j]) * (1 + DBL_EPSILON)); + if (carry <= 0) { + break; + } + intValues[j] -= round(unitConverters_[j]->convert(carry)); + intValues[j - 1] += carry; + } + } + } + + // Package values into Measure instances in result: + for (int i = 0, n = unitConverters_.length(); i < n; ++i) { + if (i < n - 1) { + Formattable formattableQuantity(intValues[i] * sign); + // Measure takes ownership of the MeasureUnit* + MeasureUnit *type = new MeasureUnit(units_[i]->copy(status).build(status)); + if (result.emplaceBackAndCheckErrorCode(status, formattableQuantity, type, status) == + nullptr) { + // Ownership wasn't taken + U_ASSERT(U_FAILURE(status)); + delete type; + } + if (U_FAILURE(status)) { + return result; + } + } else { // LAST ELEMENT + // Add the last element, not an integer: + Formattable formattableQuantity(quantity * sign); + // Measure takes ownership of the MeasureUnit* + MeasureUnit *type = new MeasureUnit(units_[i]->copy(status).build(status)); + if (result.emplaceBackAndCheckErrorCode(status, formattableQuantity, type, status) == + nullptr) { + // Ownership wasn't taken + U_ASSERT(U_FAILURE(status)); + delete type; + } + if (U_FAILURE(status)) { + return result; + } + U_ASSERT(result.length() == i + 1); + U_ASSERT(result[i] != nullptr); + } + } + + MaybeStackVector orderedResult; + int32_t unitsCount = outputUnits_.length(); + U_ASSERT(unitsCount == units_.length()); + Measure **arr = result.getAlias(); + // O(N^2) is fine: mixed units' unitsCount is usually 2 or 3. + for (int32_t i = 0; i < unitsCount; i++) { + for (int32_t j = i; j < unitsCount; j++) { + // Find the next expected unit, and swap it into place. + U_ASSERT(result[j] != nullptr); + if (result[j]->getUnit() == *outputUnits_[i]) { + if (j != i) { + Measure *tmp = arr[j]; + arr[j] = arr[i]; + arr[i] = tmp; + } + } + } + } + + return result; +} + +} // namespace units +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/deps/icu-small/source/i18n/units_complexconverter.h b/deps/icu-small/source/i18n/units_complexconverter.h new file mode 100644 index 00000000000000..83c5b94342f373 --- /dev/null +++ b/deps/icu-small/source/i18n/units_complexconverter.h @@ -0,0 +1,93 @@ +// © 2020 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING +#ifndef __UNITS_COMPLEXCONVERTER_H__ +#define __UNITS_COMPLEXCONVERTER_H__ + +#include "cmemory.h" +#include "measunit_impl.h" +#include "number_roundingutils.h" +#include "unicode/errorcode.h" +#include "unicode/measure.h" +#include "units_converter.h" +#include "units_data.h" + +U_NAMESPACE_BEGIN + +// Export explicit template instantiations of MaybeStackArray, MemoryPool and +// MaybeStackVector. This is required when building DLLs for Windows. (See +// datefmt.h, collationiterator.h, erarules.h and others for similar examples.) +// +// Note: These need to be outside of the units namespace, or Clang will generate +// a compile error. +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API MaybeStackArray; +template class U_I18N_API MemoryPool; +template class U_I18N_API MaybeStackVector; +template class U_I18N_API MaybeStackArray; +template class U_I18N_API MemoryPool; +template class U_I18N_API MaybeStackVector; +template class U_I18N_API MaybeStackArray; +template class U_I18N_API MemoryPool; +template class U_I18N_API MaybeStackVector; +#endif + +namespace units { + +/** + * Converts from single or compound unit to single, compound or mixed units. + * For example, from `meter` to `foot+inch`. + * + * DESIGN: + * This class uses `UnitConverter` in order to perform the single converter (i.e. converters from a + * single unit to another single unit). Therefore, `ComplexUnitsConverter` class contains multiple + * instances of the `UnitConverter` to perform the conversion. + */ +class U_I18N_API ComplexUnitsConverter : public UMemory { + public: + /** + * Constructor of `ComplexUnitsConverter`. + * NOTE: + * - inputUnit and outputUnits must be under the same category + * - e.g. meter to feet and inches --> all of them are length units. + * + * @param inputUnit represents the source unit. (should be single or compound unit). + * @param outputUnits represents the output unit. could be any type. (single, compound or mixed). + * @param status + */ + ComplexUnitsConverter(const MeasureUnitImpl &inputUnit, const MeasureUnitImpl &outputUnits, + const ConversionRates &ratesInfo, UErrorCode &status); + + // Returns true if the specified `quantity` of the `inputUnit`, expressed in terms of the biggest + // unit in the MeasureUnit `outputUnit`, is greater than or equal to `limit`. + // For example, if the input unit is `meter` and the target unit is `foot+inch`. Therefore, this + // function will convert the `quantity` from `meter` to `foot`, then, it will compare the value in + // `foot` with the `limit`. + UBool greaterThanOrEqual(double quantity, double limit) const; + + // Returns outputMeasures which is an array with the corresponding values. + // - E.g. converting meters to feet and inches. + // 1 meter --> 3 feet, 3.3701 inches + // NOTE: + // the smallest element is the only element that could have fractional values. And all + // other elements are floored to the nearest integer + MaybeStackVector + convert(double quantity, icu::number::impl::RoundingImpl *rounder, UErrorCode &status) const; + + private: + MaybeStackVector unitConverters_; + // Individual units of mixed units, sorted big to small + MaybeStackVector units_; + // Individual units of mixed units, sorted in desired output order + MaybeStackVector outputUnits_; +}; + +} // namespace units +U_NAMESPACE_END + +#endif //__UNITS_COMPLEXCONVERTER_H__ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/deps/icu-small/source/i18n/units_converter.cpp b/deps/icu-small/source/i18n/units_converter.cpp new file mode 100644 index 00000000000000..a777d026b98756 --- /dev/null +++ b/deps/icu-small/source/i18n/units_converter.cpp @@ -0,0 +1,546 @@ +// © 2020 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "charstr.h" +#include "cmemory.h" +#include "double-conversion-string-to-double.h" +#include "measunit_impl.h" +#include "uassert.h" +#include "unicode/errorcode.h" +#include "unicode/localpointer.h" +#include "unicode/stringpiece.h" +#include "units_converter.h" +#include +#include +#include +#include + +U_NAMESPACE_BEGIN +namespace units { + +void U_I18N_API Factor::multiplyBy(const Factor &rhs) { + factorNum *= rhs.factorNum; + factorDen *= rhs.factorDen; + for (int i = 0; i < CONSTANTS_COUNT; i++) { + constants[i] += rhs.constants[i]; + } + + // NOTE + // We need the offset when the source and the target are simple units. e.g. the source is + // celsius and the target is Fahrenheit. Therefore, we just keep the value using `std::max`. + offset = std::max(rhs.offset, offset); +} + +void U_I18N_API Factor::divideBy(const Factor &rhs) { + factorNum *= rhs.factorDen; + factorDen *= rhs.factorNum; + for (int i = 0; i < CONSTANTS_COUNT; i++) { + constants[i] -= rhs.constants[i]; + } + + // NOTE + // We need the offset when the source and the target are simple units. e.g. the source is + // celsius and the target is Fahrenheit. Therefore, we just keep the value using `std::max`. + offset = std::max(rhs.offset, offset); +} + +void U_I18N_API Factor::power(int32_t power) { + // multiply all the constant by the power. + for (int i = 0; i < CONSTANTS_COUNT; i++) { + constants[i] *= power; + } + + bool shouldFlip = power < 0; // This means that after applying the absolute power, we should flip + // the Numerator and Denominator. + + factorNum = std::pow(factorNum, std::abs(power)); + factorDen = std::pow(factorDen, std::abs(power)); + + if (shouldFlip) { + // Flip Numerator and Denominator. + std::swap(factorNum, factorDen); + } +} + +void U_I18N_API Factor::flip() { + std::swap(factorNum, factorDen); + + for (int i = 0; i < CONSTANTS_COUNT; i++) { + constants[i] *= -1; + } +} + +void U_I18N_API Factor::applySiPrefix(UMeasureSIPrefix siPrefix) { + if (siPrefix == UMeasureSIPrefix::UMEASURE_SI_PREFIX_ONE) return; // No need to do anything + + double siApplied = std::pow(10.0, std::abs(siPrefix)); + + if (siPrefix < 0) { + factorDen *= siApplied; + return; + } + + factorNum *= siApplied; +} + +void U_I18N_API Factor::substituteConstants() { + for (int i = 0; i < CONSTANTS_COUNT; i++) { + if (this->constants[i] == 0) { + continue; + } + + auto absPower = std::abs(this->constants[i]); + Signum powerSig = this->constants[i] < 0 ? Signum::NEGATIVE : Signum::POSITIVE; + double absConstantValue = std::pow(constantsValues[i], absPower); + + if (powerSig == Signum::NEGATIVE) { + this->factorDen *= absConstantValue; + } else { + this->factorNum *= absConstantValue; + } + + this->constants[i] = 0; + } +} + +namespace { + +/* Helpers */ + +using icu::double_conversion::StringToDoubleConverter; + +// TODO: Make this a shared-utility function. +// Returns `double` from a scientific number(i.e. "1", "2.01" or "3.09E+4") +double strToDouble(StringPiece strNum, UErrorCode &status) { + // We are processing well-formed input, so we don't need any special options to + // StringToDoubleConverter. + StringToDoubleConverter converter(0, 0, 0, "", ""); + int32_t count; + double result = converter.StringToDouble(strNum.data(), strNum.length(), &count); + if (count != strNum.length()) { + status = U_INVALID_FORMAT_ERROR; + } + + return result; +} + +// Returns `double` from a scientific number that could has a division sign (i.e. "1", "2.01", "3.09E+4" +// or "2E+2/3") +double strHasDivideSignToDouble(StringPiece strWithDivide, UErrorCode &status) { + int divisionSignInd = -1; + for (int i = 0, n = strWithDivide.length(); i < n; ++i) { + if (strWithDivide.data()[i] == '/') { + divisionSignInd = i; + break; + } + } + + if (divisionSignInd >= 0) { + return strToDouble(strWithDivide.substr(0, divisionSignInd), status) / + strToDouble(strWithDivide.substr(divisionSignInd + 1), status); + } + + return strToDouble(strWithDivide, status); +} + +/* + Adds single factor to a `Factor` object. Single factor means "23^2", "23.3333", "ft2m^3" ...etc. + However, complex factor are not included, such as "ft2m^3*200/3" +*/ +void addFactorElement(Factor &factor, StringPiece elementStr, Signum signum, UErrorCode &status) { + StringPiece baseStr; + StringPiece powerStr; + int32_t power = + 1; // In case the power is not written, then, the power is equal 1 ==> `ft2m^1` == `ft2m` + + // Search for the power part + int32_t powerInd = -1; + for (int32_t i = 0, n = elementStr.length(); i < n; ++i) { + if (elementStr.data()[i] == '^') { + powerInd = i; + break; + } + } + + if (powerInd > -1) { + // There is power + baseStr = elementStr.substr(0, powerInd); + powerStr = elementStr.substr(powerInd + 1); + + power = static_cast(strToDouble(powerStr, status)); + } else { + baseStr = elementStr; + } + + addSingleFactorConstant(baseStr, power, signum, factor, status); +} + +/* + * Extracts `Factor` from a complete string factor. e.g. "ft2m^3*1007/cup2m3*3" + */ +Factor extractFactorConversions(StringPiece stringFactor, UErrorCode &status) { + Factor result; + Signum signum = Signum::POSITIVE; + auto factorData = stringFactor.data(); + for (int32_t i = 0, start = 0, n = stringFactor.length(); i < n; i++) { + if (factorData[i] == '*' || factorData[i] == '/') { + StringPiece factorElement = stringFactor.substr(start, i - start); + addFactorElement(result, factorElement, signum, status); + + start = i + 1; // Set `start` to point to the start of the new element. + } else if (i == n - 1) { + // Last element + addFactorElement(result, stringFactor.substr(start, i + 1), signum, status); + } + + if (factorData[i] == '/') { + signum = Signum::NEGATIVE; // Change the signum because we reached the Denominator. + } + } + + return result; +} + +// Load factor for a single source +Factor loadSingleFactor(StringPiece source, const ConversionRates &ratesInfo, UErrorCode &status) { + const auto conversionUnit = ratesInfo.extractConversionInfo(source, status); + if (U_FAILURE(status)) return Factor(); + if (conversionUnit == nullptr) { + status = U_INTERNAL_PROGRAM_ERROR; + return Factor(); + } + + Factor result = extractFactorConversions(conversionUnit->factor.toStringPiece(), status); + result.offset = strHasDivideSignToDouble(conversionUnit->offset.toStringPiece(), status); + + return result; +} + +// Load Factor of a compound source unit. +Factor loadCompoundFactor(const MeasureUnitImpl &source, const ConversionRates &ratesInfo, + UErrorCode &status) { + + Factor result; + for (int32_t i = 0, n = source.units.length(); i < n; i++) { + SingleUnitImpl singleUnit = *source.units[i]; + + Factor singleFactor = loadSingleFactor(singleUnit.getSimpleUnitID(), ratesInfo, status); + if (U_FAILURE(status)) return result; + + // Apply SiPrefix before the power, because the power may be will flip the factor. + singleFactor.applySiPrefix(singleUnit.siPrefix); + + // Apply the power of the `dimensionality` + singleFactor.power(singleUnit.dimensionality); + + result.multiplyBy(singleFactor); + } + + return result; +} + +/** + * Checks if the source unit and the target unit are simple. For example celsius or fahrenheit. But not + * square-celsius or square-fahrenheit. + * + * NOTE: + * Empty unit means simple unit. + */ +UBool checkSimpleUnit(const MeasureUnitImpl &unit, UErrorCode &status) { + if (U_FAILURE(status)) return false; + + if (unit.complexity != UMEASURE_UNIT_SINGLE) { + return false; + } + if (unit.units.length() == 0) { + // Empty units means simple unit. + return true; + } + + auto singleUnit = *(unit.units[0]); + + if (singleUnit.dimensionality != 1 || singleUnit.siPrefix != UMEASURE_SI_PREFIX_ONE) { + return false; + } + + return true; +} + +/** + * Extract conversion rate from `source` to `target` + */ +void loadConversionRate(ConversionRate &conversionRate, const MeasureUnitImpl &source, + const MeasureUnitImpl &target, Convertibility unitsState, + const ConversionRates &ratesInfo, UErrorCode &status) { + // Represents the conversion factor from the source to the target. + Factor finalFactor; + + // Represents the conversion factor from the source to the base unit that specified in the conversion + // data which is considered as the root of the source and the target. + Factor sourceToBase = loadCompoundFactor(source, ratesInfo, status); + Factor targetToBase = loadCompoundFactor(target, ratesInfo, status); + + // Merger Factors + finalFactor.multiplyBy(sourceToBase); + if (unitsState == Convertibility::CONVERTIBLE) { + finalFactor.divideBy(targetToBase); + } else if (unitsState == Convertibility::RECIPROCAL) { + finalFactor.multiplyBy(targetToBase); + } else { + status = UErrorCode::U_ARGUMENT_TYPE_MISMATCH; + return; + } + + finalFactor.substituteConstants(); + + conversionRate.factorNum = finalFactor.factorNum; + conversionRate.factorDen = finalFactor.factorDen; + + // In case of simple units (such as: celsius or fahrenheit), offsets are considered. + if (checkSimpleUnit(source, status) && checkSimpleUnit(target, status)) { + conversionRate.sourceOffset = + sourceToBase.offset * sourceToBase.factorDen / sourceToBase.factorNum; + conversionRate.targetOffset = + targetToBase.offset * targetToBase.factorDen / targetToBase.factorNum; + } + + conversionRate.reciprocal = unitsState == Convertibility::RECIPROCAL; +} + +struct UnitIndexAndDimension : UMemory { + int32_t index = 0; + int32_t dimensionality = 0; + + UnitIndexAndDimension(const SingleUnitImpl &singleUnit, int32_t multiplier) { + index = singleUnit.index; + dimensionality = singleUnit.dimensionality * multiplier; + } +}; + +void mergeSingleUnitWithDimension(MaybeStackVector &unitIndicesWithDimension, + const SingleUnitImpl &shouldBeMerged, int32_t multiplier) { + for (int32_t i = 0; i < unitIndicesWithDimension.length(); i++) { + auto &unitWithIndex = *unitIndicesWithDimension[i]; + if (unitWithIndex.index == shouldBeMerged.index) { + unitWithIndex.dimensionality += shouldBeMerged.dimensionality * multiplier; + return; + } + } + + unitIndicesWithDimension.emplaceBack(shouldBeMerged, multiplier); +} + +void mergeUnitsAndDimensions(MaybeStackVector &unitIndicesWithDimension, + const MeasureUnitImpl &shouldBeMerged, int32_t multiplier) { + for (int32_t unit_i = 0; unit_i < shouldBeMerged.units.length(); unit_i++) { + auto singleUnit = *shouldBeMerged.units[unit_i]; + mergeSingleUnitWithDimension(unitIndicesWithDimension, singleUnit, multiplier); + } +} + +UBool checkAllDimensionsAreZeros(const MaybeStackVector &dimensionVector) { + for (int32_t i = 0; i < dimensionVector.length(); i++) { + if (dimensionVector[i]->dimensionality != 0) { + return false; + } + } + + return true; +} + +} // namespace + +// Conceptually, this modifies factor: factor *= baseStr^(signum*power). +// +// baseStr must be a known constant or a value that strToDouble() is able to +// parse. +void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, Signum signum, + Factor &factor, UErrorCode &status) { + if (baseStr == "ft_to_m") { + factor.constants[CONSTANT_FT2M] += power * signum; + } else if (baseStr == "ft2_to_m2") { + factor.constants[CONSTANT_FT2M] += 2 * power * signum; + } else if (baseStr == "ft3_to_m3") { + factor.constants[CONSTANT_FT2M] += 3 * power * signum; + } else if (baseStr == "in3_to_m3") { + factor.constants[CONSTANT_FT2M] += 3 * power * signum; + factor.factorDen *= 12 * 12 * 12; + } else if (baseStr == "gal_to_m3") { + factor.factorNum *= 231; + factor.constants[CONSTANT_FT2M] += 3 * power * signum; + factor.factorDen *= 12 * 12 * 12; + } else if (baseStr == "gal_imp_to_m3") { + factor.constants[CONSTANT_GAL_IMP2M3] += power * signum; + } else if (baseStr == "G") { + factor.constants[CONSTANT_G] += power * signum; + } else if (baseStr == "gravity") { + factor.constants[CONSTANT_GRAVITY] += power * signum; + } else if (baseStr == "lb_to_kg") { + factor.constants[CONSTANT_LB2KG] += power * signum; + } else if (baseStr == "PI") { + factor.constants[CONSTANT_PI] += power * signum; + } else { + if (signum == Signum::NEGATIVE) { + factor.factorDen *= std::pow(strToDouble(baseStr, status), power); + } else { + factor.factorNum *= std::pow(strToDouble(baseStr, status), power); + } + } +} + +/** + * Extracts the compound base unit of a compound unit (`source`). For example, if the source unit is + * `square-mile-per-hour`, the compound base unit will be `square-meter-per-second` + */ +MeasureUnitImpl U_I18N_API extractCompoundBaseUnit(const MeasureUnitImpl &source, + const ConversionRates &conversionRates, + UErrorCode &status) { + + MeasureUnitImpl result; + if (U_FAILURE(status)) return result; + + const auto &singleUnits = source.units; + for (int i = 0, count = singleUnits.length(); i < count; ++i) { + const auto &singleUnit = *singleUnits[i]; + // Extract `ConversionRateInfo` using the absolute unit. For example: in case of `square-meter`, + // we will use `meter` + const auto rateInfo = + conversionRates.extractConversionInfo(singleUnit.getSimpleUnitID(), status); + if (U_FAILURE(status)) { + return result; + } + if (rateInfo == nullptr) { + status = U_INTERNAL_PROGRAM_ERROR; + return result; + } + + // Multiply the power of the singleUnit by the power of the baseUnit. For example, square-hectare + // must be pow4-meter. (NOTE: hectare --> square-meter) + auto baseUnits = + MeasureUnitImpl::forIdentifier(rateInfo->baseUnit.toStringPiece(), status).units; + for (int32_t i = 0, baseUnitsCount = baseUnits.length(); i < baseUnitsCount; i++) { + baseUnits[i]->dimensionality *= singleUnit.dimensionality; + // TODO: Deal with SI-prefix + result.append(*baseUnits[i], status); + + if (U_FAILURE(status)) { + return result; + } + } + } + + return result; +} + +/** + * Determine the convertibility between `source` and `target`. + * For example: + * `meter` and `foot` are `CONVERTIBLE`. + * `meter-per-second` and `second-per-meter` are `RECIPROCAL`. + * `meter` and `pound` are `UNCONVERTIBLE`. + * + * NOTE: + * Only works with SINGLE and COMPOUND units. If one of the units is a + * MIXED unit, an error will occur. For more information, see UMeasureUnitComplexity. + */ +Convertibility U_I18N_API extractConvertibility(const MeasureUnitImpl &source, + const MeasureUnitImpl &target, + const ConversionRates &conversionRates, + UErrorCode &status) { + + if (source.complexity == UMeasureUnitComplexity::UMEASURE_UNIT_MIXED || + target.complexity == UMeasureUnitComplexity::UMEASURE_UNIT_MIXED) { + status = U_INTERNAL_PROGRAM_ERROR; + return UNCONVERTIBLE; + } + + MeasureUnitImpl sourceBaseUnit = extractCompoundBaseUnit(source, conversionRates, status); + MeasureUnitImpl targetBaseUnit = extractCompoundBaseUnit(target, conversionRates, status); + if (U_FAILURE(status)) return UNCONVERTIBLE; + + MaybeStackVector convertible; + MaybeStackVector reciprocal; + + mergeUnitsAndDimensions(convertible, sourceBaseUnit, 1); + mergeUnitsAndDimensions(reciprocal, sourceBaseUnit, 1); + + mergeUnitsAndDimensions(convertible, targetBaseUnit, -1); + mergeUnitsAndDimensions(reciprocal, targetBaseUnit, 1); + + if (checkAllDimensionsAreZeros(convertible)) { + return CONVERTIBLE; + } + + if (checkAllDimensionsAreZeros(reciprocal)) { + return RECIPROCAL; + } + + return UNCONVERTIBLE; +} + +UnitConverter::UnitConverter(const MeasureUnitImpl &source, const MeasureUnitImpl &target, + const ConversionRates &ratesInfo, UErrorCode &status) + : conversionRate_(source.copy(status), target.copy(status)) { + if (source.complexity == UMeasureUnitComplexity::UMEASURE_UNIT_MIXED || + target.complexity == UMeasureUnitComplexity::UMEASURE_UNIT_MIXED) { + status = U_INTERNAL_PROGRAM_ERROR; + return; + } + + Convertibility unitsState = extractConvertibility(source, target, ratesInfo, status); + if (U_FAILURE(status)) return; + if (unitsState == Convertibility::UNCONVERTIBLE) { + status = U_INTERNAL_PROGRAM_ERROR; + return; + } + + loadConversionRate(conversionRate_, conversionRate_.source, conversionRate_.target, unitsState, + ratesInfo, status); +} + +double UnitConverter::convert(double inputValue) const { + double result = + inputValue + conversionRate_.sourceOffset; // Reset the input to the target zero index. + // Convert the quantity to from the source scale to the target scale. + result *= conversionRate_.factorNum / conversionRate_.factorDen; + + result -= conversionRate_.targetOffset; // Set the result to its index. + + if (conversionRate_.reciprocal) { + if (result == 0) { + // TODO: demonstrate the resulting behaviour in tests... and figure + // out desired behaviour. (Theoretical result should be infinity, + // not 0.) + return 0.0; + } + result = 1.0 / result; + } + + return result; +} + +double UnitConverter::convertInverse(double inputValue) const { + double result = inputValue; + if (conversionRate_.reciprocal) { + if (result == 0) { + // TODO: demonstrate the resulting behaviour in tests... and figure + // out desired behaviour. (Theoretical result should be infinity, + // not 0.) + return 0.0; + } + result = 1.0 / result; + } + result += conversionRate_.targetOffset; + result *= conversionRate_.factorDen / conversionRate_.factorNum; + result -= conversionRate_.sourceOffset; + return result; +} + +} // namespace units +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/deps/icu-small/source/i18n/units_converter.h b/deps/icu-small/source/i18n/units_converter.h new file mode 100644 index 00000000000000..7650131b1f6975 --- /dev/null +++ b/deps/icu-small/source/i18n/units_converter.h @@ -0,0 +1,173 @@ +// © 2020 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING +#ifndef __UNITS_CONVERTER_H__ +#define __UNITS_CONVERTER_H__ + +#include "cmemory.h" +#include "measunit_impl.h" +#include "unicode/errorcode.h" +#include "unicode/stringpiece.h" +#include "unicode/uobject.h" +#include "units_converter.h" +#include "units_data.h" + +U_NAMESPACE_BEGIN +namespace units { + +/* Internal Structure */ + +enum Constants { + CONSTANT_FT2M, // ft2m stands for foot to meter. + CONSTANT_PI, // PI + CONSTANT_GRAVITY, // Gravity + CONSTANT_G, + CONSTANT_GAL_IMP2M3, // Gallon imp to m3 + CONSTANT_LB2KG, // Pound to Kilogram + + // Must be the last element. + CONSTANTS_COUNT +}; + +// These values are a hard-coded subset of unitConstants in the units +// resources file. A unit test checks that all constants in the resource +// file are at least recognised by the code. Derived constants' values or +// hard-coded derivations are not checked. +static const double constantsValues[CONSTANTS_COUNT] = { + 0.3048, // CONSTANT_FT2M + 411557987.0 / 131002976.0, // CONSTANT_PI + 9.80665, // CONSTANT_GRAVITY + 6.67408E-11, // CONSTANT_G + 0.00454609, // CONSTANT_GAL_IMP2M3 + 0.45359237, // CONSTANT_LB2KG +}; + +typedef enum Signum { + NEGATIVE = -1, + POSITIVE = 1, +} Signum; + +/* Represents a conversion factor */ +struct U_I18N_API Factor { + double factorNum = 1; + double factorDen = 1; + double offset = 0; + bool reciprocal = false; + int32_t constants[CONSTANTS_COUNT] = {}; + + void multiplyBy(const Factor &rhs); + void divideBy(const Factor &rhs); + + // Apply the power to the factor. + void power(int32_t power); + + // Flip the `Factor`, for example, factor= 2/3, flippedFactor = 3/2 + void flip(); + + // Apply SI prefix to the `Factor` + void applySiPrefix(UMeasureSIPrefix siPrefix); + void substituteConstants(); +}; + +/* + * Adds a single factor element to the `Factor`. e.g "ft3m", "2.333" or "cup2m3". But not "cup2m3^3". + */ +void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, Signum sigNum, + Factor &factor, UErrorCode &status); + +/** + * Represents the conversion rate between `source` and `target`. + */ +struct U_I18N_API ConversionRate : public UMemory { + const MeasureUnitImpl source; + const MeasureUnitImpl target; + double factorNum = 1; + double factorDen = 1; + double sourceOffset = 0; + double targetOffset = 0; + bool reciprocal = false; + + ConversionRate(MeasureUnitImpl &&source, MeasureUnitImpl &&target) + : source(std::move(source)), target(std::move(target)) {} +}; + +enum Convertibility { + RECIPROCAL, + CONVERTIBLE, + UNCONVERTIBLE, +}; + +MeasureUnitImpl U_I18N_API extractCompoundBaseUnit(const MeasureUnitImpl &source, + const ConversionRates &conversionRates, + UErrorCode &status); + +/** + * Check if the convertibility between `source` and `target`. + * For example: + * `meter` and `foot` are `CONVERTIBLE`. + * `meter-per-second` and `second-per-meter` are `RECIPROCAL`. + * `meter` and `pound` are `UNCONVERTIBLE`. + * + * NOTE: + * Only works with SINGLE and COMPOUND units. If one of the units is a + * MIXED unit, an error will occur. For more information, see UMeasureUnitComplexity. + */ +Convertibility U_I18N_API extractConvertibility(const MeasureUnitImpl &source, + const MeasureUnitImpl &target, + const ConversionRates &conversionRates, + UErrorCode &status); + +/** + * Converts from a source `MeasureUnit` to a target `MeasureUnit`. + * + * NOTE: + * Only works with SINGLE and COMPOUND units. If one of the units is a + * MIXED unit, an error will occur. For more information, see UMeasureUnitComplexity. + */ +class U_I18N_API UnitConverter : public UMemory { + public: + /** + * Constructor of `UnitConverter`. + * NOTE: + * - source and target must be under the same category + * - e.g. meter to mile --> both of them are length units. + * + * @param source represents the source unit. + * @param target represents the target unit. + * @param ratesInfo Contains all the needed conversion rates. + * @param status + */ + UnitConverter(const MeasureUnitImpl &source, const MeasureUnitImpl &target, + const ConversionRates &ratesInfo, UErrorCode &status); + + /** + * Convert a measurement expressed in the source unit to a measurement + * expressed in the target unit. + * + * @param inputValue the value to be converted. + * @return the converted value. + */ + double convert(double inputValue) const; + + /** + * The inverse of convert(): convert a measurement expressed in the target + * unit to a measurement expressed in the source unit. + * + * @param inputValue the value to be converted. + * @return the converted value. + */ + double convertInverse(double inputValue) const; + + private: + ConversionRate conversionRate_; +}; + +} // namespace units +U_NAMESPACE_END + +#endif //__UNITS_CONVERTER_H__ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/deps/icu-small/source/i18n/units_data.cpp b/deps/icu-small/source/i18n/units_data.cpp new file mode 100644 index 00000000000000..42bd6248b0b26d --- /dev/null +++ b/deps/icu-small/source/i18n/units_data.cpp @@ -0,0 +1,428 @@ +// © 2020 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "cstring.h" +#include "number_decimalquantity.h" +#include "resource.h" +#include "uassert.h" +#include "unicode/unistr.h" +#include "unicode/ures.h" +#include "units_data.h" +#include "uresimp.h" +#include "util.h" +#include + +U_NAMESPACE_BEGIN +namespace units { + +namespace { + +using icu::number::impl::DecimalQuantity; + +void trimSpaces(CharString& factor, UErrorCode& status){ + CharString trimmed; + for (int i = 0 ; i < factor.length(); i++) { + if (factor[i] == ' ') continue; + + trimmed.append(factor[i], status); + } + + factor = std::move(trimmed); +} + +/** + * A ResourceSink that collects conversion rate information. + * + * This class is for use by ures_getAllItemsWithFallback. + */ +class ConversionRateDataSink : public ResourceSink { + public: + /** + * Constructor. + * @param out The vector to which ConversionRateInfo instances are to be + * added. This vector must outlive the use of the ResourceSink. + */ + explicit ConversionRateDataSink(MaybeStackVector *out) : outVector(out) {} + + /** + * Method for use by `ures_getAllItemsWithFallback`. Adds the unit + * conversion rates that are found in `value` to the output vector. + * + * @param source This string must be "convertUnits": the resource that this + * class supports reading. + * @param value The "convertUnits" resource, containing unit conversion rate + * information. + * @param noFallback Ignored. + * @param status The standard ICU error code output parameter. + */ + void put(const char *source, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) { + if (U_FAILURE(status)) { return; } + if (uprv_strcmp(source, "convertUnits") != 0) { + // This is very strict, however it is the cheapest way to be sure + // that with `value`, we're looking at the convertUnits table. + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + ResourceTable conversionRateTable = value.getTable(status); + const char *srcUnit; + // We're reusing `value`, which seems to be a common pattern: + for (int32_t unit = 0; conversionRateTable.getKeyAndValue(unit, srcUnit, value); unit++) { + ResourceTable unitTable = value.getTable(status); + const char *key; + UnicodeString baseUnit = ICU_Utility::makeBogusString(); + UnicodeString factor = ICU_Utility::makeBogusString(); + UnicodeString offset = ICU_Utility::makeBogusString(); + for (int32_t i = 0; unitTable.getKeyAndValue(i, key, value); i++) { + if (uprv_strcmp(key, "target") == 0) { + baseUnit = value.getUnicodeString(status); + } else if (uprv_strcmp(key, "factor") == 0) { + factor = value.getUnicodeString(status); + } else if (uprv_strcmp(key, "offset") == 0) { + offset = value.getUnicodeString(status); + } + } + if (U_FAILURE(status)) { return; } + if (baseUnit.isBogus() || factor.isBogus()) { + // We could not find a usable conversion rate: bad resource. + status = U_MISSING_RESOURCE_ERROR; + return; + } + + // We don't have this ConversionRateInfo yet: add it. + ConversionRateInfo *cr = outVector->emplaceBack(); + if (!cr) { + status = U_MEMORY_ALLOCATION_ERROR; + return; + } else { + cr->sourceUnit.append(srcUnit, status); + cr->baseUnit.appendInvariantChars(baseUnit, status); + cr->factor.appendInvariantChars(factor, status); + trimSpaces(cr->factor, status); + if (!offset.isBogus()) cr->offset.appendInvariantChars(offset, status); + } + } + return; + } + + private: + MaybeStackVector *outVector; +}; + +bool operator<(const UnitPreferenceMetadata &a, const UnitPreferenceMetadata &b) { + return a.compareTo(b) < 0; +} + +/** + * A ResourceSink that collects unit preferences information. + * + * This class is for use by ures_getAllItemsWithFallback. + */ +class UnitPreferencesSink : public ResourceSink { + public: + /** + * Constructor. + * @param outPrefs The vector to which UnitPreference instances are to be + * added. This vector must outlive the use of the ResourceSink. + * @param outMetadata The vector to which UnitPreferenceMetadata instances + * are to be added. This vector must outlive the use of the ResourceSink. + */ + explicit UnitPreferencesSink(MaybeStackVector *outPrefs, + MaybeStackVector *outMetadata) + : preferences(outPrefs), metadata(outMetadata) {} + + /** + * Method for use by `ures_getAllItemsWithFallback`. Adds the unit + * preferences info that are found in `value` to the output vector. + * + * @param source This string must be "unitPreferenceData": the resource that + * this class supports reading. + * @param value The "unitPreferenceData" resource, containing unit + * preferences data. + * @param noFallback Ignored. + * @param status The standard ICU error code output parameter. Note: if an + * error is returned, outPrefs and outMetadata may be inconsistent. + */ + void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) { + if (U_FAILURE(status)) { return; } + if (uprv_strcmp(key, "unitPreferenceData") != 0) { + // This is very strict, however it is the cheapest way to be sure + // that with `value`, we're looking at the convertUnits table. + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + // The unitPreferenceData structure (see data/misc/units.txt) contains a + // hierarchy of category/usage/region, within which are a set of + // preferences. Hence three for-loops and another loop for the + // preferences themselves: + ResourceTable unitPreferenceDataTable = value.getTable(status); + const char *category; + for (int32_t i = 0; unitPreferenceDataTable.getKeyAndValue(i, category, value); i++) { + ResourceTable categoryTable = value.getTable(status); + const char *usage; + for (int32_t j = 0; categoryTable.getKeyAndValue(j, usage, value); j++) { + ResourceTable regionTable = value.getTable(status); + const char *region; + for (int32_t k = 0; regionTable.getKeyAndValue(k, region, value); k++) { + // `value` now contains the set of preferences for + // category/usage/region. + ResourceArray unitPrefs = value.getArray(status); + if (U_FAILURE(status)) { return; } + int32_t prefLen = unitPrefs.getSize(); + + // Update metadata for this set of preferences. + UnitPreferenceMetadata *meta = metadata->emplaceBack( + category, usage, region, preferences->length(), prefLen, status); + if (!meta) { + status = U_MEMORY_ALLOCATION_ERROR; + return; + } + if (U_FAILURE(status)) { return; } + if (metadata->length() > 1) { + // Verify that unit preferences are sorted and + // without duplicates. + if (!(*(*metadata)[metadata->length() - 2] < + *(*metadata)[metadata->length() - 1])) { + status = U_INVALID_FORMAT_ERROR; + return; + } + } + + // Collect the individual preferences. + for (int32_t i = 0; unitPrefs.getValue(i, value); i++) { + UnitPreference *up = preferences->emplaceBack(); + if (!up) { + status = U_MEMORY_ALLOCATION_ERROR; + return; + } + ResourceTable unitPref = value.getTable(status); + if (U_FAILURE(status)) { return; } + for (int32_t i = 0; unitPref.getKeyAndValue(i, key, value); ++i) { + if (uprv_strcmp(key, "unit") == 0) { + int32_t length; + const UChar *u = value.getString(length, status); + up->unit.appendInvariantChars(u, length, status); + } else if (uprv_strcmp(key, "geq") == 0) { + int32_t length; + const UChar *g = value.getString(length, status); + CharString geq; + geq.appendInvariantChars(g, length, status); + DecimalQuantity dq; + dq.setToDecNumber(geq.data(), status); + up->geq = dq.toDouble(); + } else if (uprv_strcmp(key, "skeleton") == 0) { + up->skeleton = value.getUnicodeString(status); + } + } + } + } + } + } + } + + private: + MaybeStackVector *preferences; + MaybeStackVector *metadata; +}; + +int32_t binarySearch(const MaybeStackVector *metadata, + const UnitPreferenceMetadata &desired, bool *foundCategory, bool *foundUsage, + bool *foundRegion, UErrorCode &status) { + if (U_FAILURE(status)) { return -1; } + int32_t start = 0; + int32_t end = metadata->length(); + *foundCategory = false; + *foundUsage = false; + *foundRegion = false; + while (start < end) { + int32_t mid = (start + end) / 2; + int32_t cmp = (*metadata)[mid]->compareTo(desired, foundCategory, foundUsage, foundRegion); + if (cmp < 0) { + start = mid + 1; + } else if (cmp > 0) { + end = mid; + } else { + return mid; + } + } + return -1; +} + +/** + * Finds the UnitPreferenceMetadata instance that matches the given category, + * usage and region: if missing, region falls back to "001", and usage + * repeatedly drops tailing components, eventually trying "default" + * ("land-agriculture-grain" -> "land-agriculture" -> "land" -> "default"). + * + * @param metadata The full list of UnitPreferenceMetadata instances. + * @param category The category to search for. See getUnitCategory(). + * @param usage The usage for which formatting preferences is needed. If the + * given usage is not known, automatic fallback occurs, see function description + * above. + * @param region The region for which preferences are needed. If there are no + * region-specific preferences, this function automatically falls back to the + * "001" region (global). + * @param status The standard ICU error code output parameter. + * * If an invalid category is given, status will be U_ILLEGAL_ARGUMENT_ERROR. + * * If fallback to "default" or "001" didn't resolve, status will be + * U_MISSING_RESOURCE. + * @return The index into the metadata vector which represents the appropriate + * preferences. If appropriate preferences are not found, -1 is returned. + */ +int32_t getPreferenceMetadataIndex(const MaybeStackVector *metadata, + StringPiece category, StringPiece usage, StringPiece region, + UErrorCode &status) { + if (U_FAILURE(status)) { return -1; } + bool foundCategory, foundUsage, foundRegion; + UnitPreferenceMetadata desired(category, usage, region, -1, -1, status); + int32_t idx = binarySearch(metadata, desired, &foundCategory, &foundUsage, &foundRegion, status); + if (U_FAILURE(status)) { return -1; } + if (idx >= 0) { return idx; } + if (!foundCategory) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return -1; + } + U_ASSERT(foundCategory); + while (!foundUsage) { + int32_t lastDashIdx = desired.usage.lastIndexOf('-'); + if (lastDashIdx > 0) { + desired.usage.truncate(lastDashIdx); + } else if (uprv_strcmp(desired.usage.data(), "default") != 0) { + desired.usage.truncate(0).append("default", status); + } else { + // "default" is not supposed to be missing for any valid category. + status = U_MISSING_RESOURCE_ERROR; + return -1; + } + idx = binarySearch(metadata, desired, &foundCategory, &foundUsage, &foundRegion, status); + if (U_FAILURE(status)) { return -1; } + } + U_ASSERT(foundCategory); + U_ASSERT(foundUsage); + if (!foundRegion) { + if (uprv_strcmp(desired.region.data(), "001") != 0) { + desired.region.truncate(0).append("001", status); + idx = binarySearch(metadata, desired, &foundCategory, &foundUsage, &foundRegion, status); + } + if (!foundRegion) { + // "001" is not supposed to be missing for any valid usage. + status = U_MISSING_RESOURCE_ERROR; + return -1; + } + } + U_ASSERT(foundCategory); + U_ASSERT(foundUsage); + U_ASSERT(foundRegion); + U_ASSERT(idx >= 0); + return idx; +} + +} // namespace + +UnitPreferenceMetadata::UnitPreferenceMetadata(StringPiece category, StringPiece usage, + StringPiece region, int32_t prefsOffset, + int32_t prefsCount, UErrorCode &status) { + this->category.append(category, status); + this->usage.append(usage, status); + this->region.append(region, status); + this->prefsOffset = prefsOffset; + this->prefsCount = prefsCount; +} + +int32_t UnitPreferenceMetadata::compareTo(const UnitPreferenceMetadata &other) const { + int32_t cmp = uprv_strcmp(category.data(), other.category.data()); + if (cmp == 0) { + cmp = uprv_strcmp(usage.data(), other.usage.data()); + } + if (cmp == 0) { + cmp = uprv_strcmp(region.data(), other.region.data()); + } + return cmp; +} + +int32_t UnitPreferenceMetadata::compareTo(const UnitPreferenceMetadata &other, bool *foundCategory, + bool *foundUsage, bool *foundRegion) const { + int32_t cmp = uprv_strcmp(category.data(), other.category.data()); + if (cmp == 0) { + *foundCategory = true; + cmp = uprv_strcmp(usage.data(), other.usage.data()); + } + if (cmp == 0) { + *foundUsage = true; + cmp = uprv_strcmp(region.data(), other.region.data()); + } + if (cmp == 0) { + *foundRegion = true; + } + return cmp; +} + +CharString U_I18N_API getUnitCategory(const char *baseUnitIdentifier, UErrorCode &status) { + CharString result; + LocalUResourceBundlePointer unitsBundle(ures_openDirect(NULL, "units", &status)); + LocalUResourceBundlePointer unitQuantities( + ures_getByKey(unitsBundle.getAlias(), "unitQuantities", NULL, &status)); + int32_t categoryLength; + if (U_FAILURE(status)) { return result; } + const UChar *uCategory = + ures_getStringByKey(unitQuantities.getAlias(), baseUnitIdentifier, &categoryLength, &status); + if (U_FAILURE(status)) { + // TODO(CLDR-13787,hugovdm): special-casing the consumption-inverse + // case. Once CLDR-13787 is clarified, this should be generalised (or + // possibly removed): + if (uprv_strcmp(baseUnitIdentifier, "meter-per-cubic-meter") == 0) { + status = U_ZERO_ERROR; + result.append("consumption-inverse", status); + return result; + } + } + result.appendInvariantChars(uCategory, categoryLength, status); + return result; +} + +// TODO: this may be unnecessary. Fold into ConversionRates class? Or move to anonymous namespace? +void U_I18N_API getAllConversionRates(MaybeStackVector &result, UErrorCode &status) { + LocalUResourceBundlePointer unitsBundle(ures_openDirect(NULL, "units", &status)); + ConversionRateDataSink sink(&result); + ures_getAllItemsWithFallback(unitsBundle.getAlias(), "convertUnits", sink, status); +} + +const ConversionRateInfo *ConversionRates::extractConversionInfo(StringPiece source, + UErrorCode &status) const { + for (size_t i = 0, n = conversionInfo_.length(); i < n; ++i) { + if (conversionInfo_[i]->sourceUnit.toStringPiece() == source) return conversionInfo_[i]; + } + + status = U_INTERNAL_PROGRAM_ERROR; + return nullptr; +} + +U_I18N_API UnitPreferences::UnitPreferences(UErrorCode &status) { + LocalUResourceBundlePointer unitsBundle(ures_openDirect(NULL, "units", &status)); + UnitPreferencesSink sink(&unitPrefs_, &metadata_); + ures_getAllItemsWithFallback(unitsBundle.getAlias(), "unitPreferenceData", sink, status); +} + +// TODO: make outPreferences const? +// +// TODO: consider replacing `UnitPreference **&outPreferences` with slice class +// of some kind. +void U_I18N_API UnitPreferences::getPreferencesFor(StringPiece category, StringPiece usage, + StringPiece region, + const UnitPreference *const *&outPreferences, + int32_t &preferenceCount, UErrorCode &status) const { + int32_t idx = getPreferenceMetadataIndex(&metadata_, category, usage, region, status); + if (U_FAILURE(status)) { return; } + U_ASSERT(idx >= 0); // Failures should have been taken care of by `status`. + const UnitPreferenceMetadata *m = metadata_[idx]; + outPreferences = unitPrefs_.getAlias() + m->prefsOffset; + preferenceCount = m->prefsCount; +} + +} // namespace units +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/deps/icu-small/source/i18n/units_data.h b/deps/icu-small/source/i18n/units_data.h new file mode 100644 index 00000000000000..b6fe8e88de3c2e --- /dev/null +++ b/deps/icu-small/source/i18n/units_data.h @@ -0,0 +1,229 @@ +// © 2020 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING +#ifndef __UNITS_DATA_H__ +#define __UNITS_DATA_H__ + +#include + +#include "charstr.h" +#include "cmemory.h" +#include "unicode/stringpiece.h" +#include "unicode/uobject.h" + +U_NAMESPACE_BEGIN +namespace units { + +/** + * Looks up the unit category of a base unit identifier. + * + * Only supports base units, other units must be resolved to base units before + * passing to this function. + * + * Categories are found in `unitQuantities` in the `units` resource (see + * `units.txt`). + * + * TODO(hugovdm): if we give units_data.cpp access to the functionality of + * `extractCompoundBaseUnit` which is currently in units_converter.cpp, we could + * support all units for which there is a category. Does it make sense to move + * that function to units_data.cpp? + */ +CharString U_I18N_API getUnitCategory(const char *baseUnitIdentifier, UErrorCode &status); + +/** + * Encapsulates "convertUnits" information from units resources, specifying how + * to convert from one unit to another. + * + * Information in this class is still in the form of strings: symbolic constants + * need to be interpreted. Rationale: symbols can cancel out for higher + * precision conversion - going from feet to inches should cancel out the + * `ft_to_m` constant. + */ +class U_I18N_API ConversionRateInfo : public UMemory { + public: + ConversionRateInfo() {} + ConversionRateInfo(StringPiece sourceUnit, StringPiece baseUnit, StringPiece factor, + StringPiece offset, UErrorCode &status) + : sourceUnit(), baseUnit(), factor(), offset() { + this->sourceUnit.append(sourceUnit, status); + this->baseUnit.append(baseUnit, status); + this->factor.append(factor, status); + this->offset.append(offset, status); + } + CharString sourceUnit; + CharString baseUnit; + CharString factor; + CharString offset; +}; + +} // namespace units + +// Export explicit template instantiations of MaybeStackArray, MemoryPool and +// MaybeStackVector. This is required when building DLLs for Windows. (See +// datefmt.h, collationiterator.h, erarules.h and others for similar examples.) +// +// Note: These need to be outside of the units namespace, or Clang will generate +// a compile error. +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API MaybeStackArray; +template class U_I18N_API MemoryPool; +template class U_I18N_API MaybeStackVector; +#endif + +namespace units { + +/** + * Returns ConversionRateInfo for all supported conversions. + * + * @param result Receives the set of conversion rates. + * @param status Receives status. + */ +void U_I18N_API getAllConversionRates(MaybeStackVector &result, UErrorCode &status); + +/** + * Contains all the supported conversion rates. + */ +class U_I18N_API ConversionRates { + public: + /** + * Constructor + * + * @param status Receives status. + */ + ConversionRates(UErrorCode &status) { getAllConversionRates(conversionInfo_, status); } + + /** + * Returns a pointer to the conversion rate info that match the `source`. + * + * @param source Contains the source. + * @param status Receives status. + */ + const ConversionRateInfo *extractConversionInfo(StringPiece source, UErrorCode &status) const; + + private: + MaybeStackVector conversionInfo_; +}; + +// Encapsulates unitPreferenceData information from units resources, specifying +// a sequence of output unit preferences. +struct U_I18N_API UnitPreference : public UMemory { + // Set geq to 1.0 by default + UnitPreference() : geq(1.0) {} + CharString unit; + double geq; + UnicodeString skeleton; +}; + +/** + * Metadata about the preferences in UnitPreferences::unitPrefs_. + * + * This class owns all of its data. + * + * UnitPreferenceMetadata lives in the anonymous namespace, because it should + * only be useful to internal code and unit testing code. + */ +class U_I18N_API UnitPreferenceMetadata : public UMemory { + public: + UnitPreferenceMetadata() {} + // Constructor, makes copies of the parameters passed to it. + UnitPreferenceMetadata(StringPiece category, StringPiece usage, StringPiece region, + int32_t prefsOffset, int32_t prefsCount, UErrorCode &status); + + // Unit category (e.g. "length", "mass", "electric-capacitance"). + CharString category; + // Usage (e.g. "road", "vehicle-fuel", "blood-glucose"). Every category + // should have an entry for "default" usage. TODO(hugovdm): add a test for + // this. + CharString usage; + // Region code (e.g. "US", "CZ", "001"). Every usage should have an entry + // for the "001" region ("world"). TODO(hugovdm): add a test for this. + CharString region; + // Offset into the UnitPreferences::unitPrefs_ list where the relevant + // preferences are found. + int32_t prefsOffset; + // The number of preferences that form this set. + int32_t prefsCount; + + int32_t compareTo(const UnitPreferenceMetadata &other) const; + int32_t compareTo(const UnitPreferenceMetadata &other, bool *foundCategory, bool *foundUsage, + bool *foundRegion) const; +}; + +} // namespace units + +// Export explicit template instantiations of MaybeStackArray, MemoryPool and +// MaybeStackVector. This is required when building DLLs for Windows. (See +// datefmt.h, collationiterator.h, erarules.h and others for similar examples.) +// +// Note: These need to be outside of the units namespace, or Clang will generate +// a compile error. +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API MaybeStackArray; +template class U_I18N_API MemoryPool; +template class U_I18N_API MaybeStackVector; +template class U_I18N_API MaybeStackArray; +template class U_I18N_API MemoryPool; +template class U_I18N_API MaybeStackVector; +#endif + +namespace units { + +/** + * Unit Preferences information for various locales and usages. + */ +class U_I18N_API UnitPreferences { + public: + /** + * Constructor, loads all the preference data. + * + * @param status Receives status. + */ + UnitPreferences(UErrorCode &status); + + /** + * Returns the set of unit preferences in the particular category that best + * matches the specified usage and region. + * + * If region can't be found, falls back to global (001). If usage can't be + * found, falls back to "default". + * + * @param category The category within which to look up usage and region. + * (TODO(hugovdm): improve docs on how to find the category, once the lookup + * function is added.) + * @param usage The usage parameter. (TODO(hugovdm): improve this + * documentation. Add reference to some list of usages we support.) If the + * given usage is not found, the method automatically falls back to + * "default". + * @param region The region whose preferences are desired. If there are no + * specific preferences for the requested region, the method automatically + * falls back to region "001" ("world"). + * @param outPreferences A pointer into an array of preferences: essentially + * an array slice in combination with preferenceCount. + * @param preferenceCount The number of unit preferences that belong to the + * result set. + * @param status Receives status. + * + * TODO(hugovdm): maybe replace `UnitPreference **&outPreferences` with a slice class? + */ + void getPreferencesFor(StringPiece category, StringPiece usage, StringPiece region, + const UnitPreference *const *&outPreferences, int32_t &preferenceCount, + UErrorCode &status) const; + + protected: + // Metadata about the sets of preferences, this is the index for looking up + // preferences in the unitPrefs_ list. + MaybeStackVector metadata_; + // All the preferences as a flat list: which usage and region preferences + // are associated with is stored in `metadata_`. + MaybeStackVector unitPrefs_; +}; + +} // namespace units +U_NAMESPACE_END + +#endif //__UNITS_DATA_H__ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/deps/icu-small/source/i18n/units_router.cpp b/deps/icu-small/source/i18n/units_router.cpp new file mode 100644 index 00000000000000..3158718fd22fba --- /dev/null +++ b/deps/icu-small/source/i18n/units_router.cpp @@ -0,0 +1,132 @@ +// © 2020 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "charstr.h" +#include "cmemory.h" +#include "cstring.h" +#include "measunit_impl.h" +#include "number_decimalquantity.h" +#include "number_roundingutils.h" +#include "resource.h" +#include "unicode/measure.h" +#include "units_data.h" +#include "units_router.h" +#include + +U_NAMESPACE_BEGIN +namespace units { + +using number::Precision; +using number::impl::parseIncrementOption; + +Precision UnitsRouter::parseSkeletonToPrecision(icu::UnicodeString precisionSkeleton, + UErrorCode &status) { + if (U_FAILURE(status)) { + // As a member of UsagePrefsHandler, which is a friend of Precision, we + // get access to the default constructor. + return {}; + } + constexpr int32_t kSkelPrefixLen = 20; + if (!precisionSkeleton.startsWith(UNICODE_STRING_SIMPLE("precision-increment/"))) { + status = U_INVALID_FORMAT_ERROR; + return {}; + } + U_ASSERT(precisionSkeleton[kSkelPrefixLen - 1] == u'/'); + StringSegment segment(precisionSkeleton, false); + segment.adjustOffset(kSkelPrefixLen); + Precision result; + parseIncrementOption(segment, result, status); + return result; +} + +UnitsRouter::UnitsRouter(MeasureUnit inputUnit, StringPiece region, StringPiece usage, + UErrorCode &status) { + // TODO: do we want to pass in ConversionRates and UnitPreferences instead + // of loading in each UnitsRouter instance? (Or make global?) + ConversionRates conversionRates(status); + UnitPreferences prefs(status); + + MeasureUnitImpl inputUnitImpl = MeasureUnitImpl::forMeasureUnitMaybeCopy(inputUnit, status); + MeasureUnit baseUnit = + (extractCompoundBaseUnit(inputUnitImpl, conversionRates, status)).build(status); + CharString category = getUnitCategory(baseUnit.getIdentifier(), status); + + const UnitPreference *const *unitPreferences; + int32_t preferencesCount; + prefs.getPreferencesFor(category.data(), usage, region, unitPreferences, preferencesCount, status); + + for (int i = 0; i < preferencesCount; ++i) { + const auto &preference = *unitPreferences[i]; + + MeasureUnitImpl complexTargetUnitImpl = + MeasureUnitImpl::forIdentifier(preference.unit.data(), status); + if (U_FAILURE(status)) { + return; + } + + UnicodeString precision = preference.skeleton; + + // For now, we only have "precision-increment" in Units Preferences skeleton. + // Therefore, we check if the skeleton starts with "precision-increment" and force the program to + // fail otherwise. + // NOTE: + // It is allowed to have an empty precision. + if (!precision.isEmpty() && !precision.startsWith(u"precision-increment", 19)) { + status = U_INTERNAL_PROGRAM_ERROR; + return; + } + + outputUnits_.emplaceBackAndCheckErrorCode(status, + complexTargetUnitImpl.copy(status).build(status)); + converterPreferences_.emplaceBackAndCheckErrorCode(status, inputUnitImpl, complexTargetUnitImpl, + preference.geq, std::move(precision), + conversionRates, status); + + if (U_FAILURE(status)) { + return; + } + } +} + +RouteResult UnitsRouter::route(double quantity, icu::number::impl::RoundingImpl *rounder, UErrorCode &status) const { + // Find the matching preference + const ConverterPreference *converterPreference = nullptr; + for (int32_t i = 0, n = converterPreferences_.length(); i < n; i++) { + converterPreference = converterPreferences_[i]; + if (converterPreference->converter.greaterThanOrEqual(std::abs(quantity) * (1 + DBL_EPSILON), + converterPreference->limit)) { + break; + } + } + U_ASSERT(converterPreference != nullptr); + + // Set up the rounder for this preference's precision + if (rounder != nullptr && rounder->fPrecision.isBogus()) { + if (converterPreference->precision.length() > 0) { + rounder->fPrecision = parseSkeletonToPrecision(converterPreference->precision, status); + } else { + // We use the same rounding mode as COMPACT notation: known to be a + // human-friendly rounding mode: integers, but add a decimal digit + // as needed to ensure we have at least 2 significant digits. + rounder->fPrecision = Precision::integer().withMinDigits(2); + } + } + + return RouteResult(converterPreference->converter.convert(quantity, rounder, status), + converterPreference->targetUnit.copy(status)); +} + +const MaybeStackVector *UnitsRouter::getOutputUnits() const { + // TODO: consider pulling this from converterPreferences_ and dropping + // outputUnits_? + return &outputUnits_; +} + +} // namespace units +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/deps/icu-small/source/i18n/units_router.h b/deps/icu-small/source/i18n/units_router.h new file mode 100644 index 00000000000000..bd7a93d2d8c531 --- /dev/null +++ b/deps/icu-small/source/i18n/units_router.h @@ -0,0 +1,162 @@ +// © 2020 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING +#ifndef __UNITS_ROUTER_H__ +#define __UNITS_ROUTER_H__ + +#include + +#include "cmemory.h" +#include "measunit_impl.h" +#include "unicode/measunit.h" +#include "unicode/stringpiece.h" +#include "unicode/uobject.h" +#include "units_complexconverter.h" +#include "units_data.h" + +U_NAMESPACE_BEGIN + +// Forward declarations +class Measure; +namespace number { +class Precision; +} + +namespace units { + +struct RouteResult : UMemory { + // A list of measures: a single measure for single units, multiple measures + // for mixed units. + // + // TODO(icu-units/icu#21): figure out the right mixed unit API. + MaybeStackVector measures; + + // The output unit for this RouteResult. This may be a MIXED unit - for + // example: "yard-and-foot-and-inch", for which `measures` will have three + // elements. + MeasureUnitImpl outputUnit; + + RouteResult(MaybeStackVector measures, MeasureUnitImpl outputUnit) + : measures(std::move(measures)), outputUnit(std::move(outputUnit)) {} +}; + +/** + * Contains the complex unit converter and the limit which representing the smallest value that the + * converter should accept. For example, if the converter is converting to `foot+inch` and the limit + * equals 3.0, thus means the converter should not convert to a value less than `3.0 feet`. + * + * NOTE: + * if the limit doest not has a value `i.e. (std::numeric_limits::lowest())`, this mean there + * is no limit for the converter. + */ +struct ConverterPreference : UMemory { + ComplexUnitsConverter converter; + double limit; + UnicodeString precision; + + // The output unit for this ConverterPreference. This may be a MIXED unit - + // for example: "yard-and-foot-and-inch". + MeasureUnitImpl targetUnit; + + // In case there is no limit, the limit will be -inf. + ConverterPreference(const MeasureUnitImpl &source, const MeasureUnitImpl &complexTarget, + UnicodeString precision, const ConversionRates &ratesInfo, UErrorCode &status) + : ConverterPreference(source, complexTarget, std::numeric_limits::lowest(), precision, + ratesInfo, status) {} + + ConverterPreference(const MeasureUnitImpl &source, const MeasureUnitImpl &complexTarget, + double limit, UnicodeString precision, const ConversionRates &ratesInfo, + UErrorCode &status) + : converter(source, complexTarget, ratesInfo, status), limit(limit), + precision(std::move(precision)), targetUnit(complexTarget.copy(status)) {} +}; + +} // namespace units + +// Export explicit template instantiations of MaybeStackArray, MemoryPool and +// MaybeStackVector. This is required when building DLLs for Windows. (See +// datefmt.h, collationiterator.h, erarules.h and others for similar examples.) +// +// Note: These need to be outside of the units namespace, or Clang will generate +// a compile error. +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template class U_I18N_API MaybeStackArray; +template class U_I18N_API MemoryPool; +template class U_I18N_API MaybeStackVector; +#endif + +namespace units { + +/** + * `UnitsRouter` responsible for converting from a single unit (such as `meter` or `meter-per-second`) to + * one of the complex units based on the limits. + * For example: + * if the input is `meter` and the output as following + * {`foot+inch`, limit: 3.0} + * {`inch` , limit: no value (-inf)} + * Thus means if the input in `meter` is greater than or equal to `3.0 feet`, the output will be in + * `foot+inch`, otherwise, the output will be in `inch`. + * + * NOTE: + * the output units and the their limits MUST BE in order, for example, if the output units, from the + * previous example, are the following: + * {`inch` , limit: no value (-inf)} + * {`foot+inch`, limit: 3.0} + * IN THIS CASE THE OUTPUT WILL BE ALWAYS IN `inch`. + * + * NOTE: + * the output units and their limits will be extracted from the units preferences database by knowing + * the followings: + * - input unit + * - locale + * - usage + * + * DESIGN: + * `UnitRouter` uses internally `ComplexUnitConverter` in order to convert the input units to the + * desired complex units and to check the limit too. + */ +class U_I18N_API UnitsRouter { + public: + UnitsRouter(MeasureUnit inputUnit, StringPiece locale, StringPiece usage, UErrorCode &status); + + /** + * Performs locale and usage sensitive unit conversion. + * @param quantity The quantity to convert, expressed in terms of inputUnit. + * @param rounder If not null, this RoundingImpl will be used to do rounding + * on the converted value. If the rounder lacks an fPrecision, the + * rounder will be modified to use the preferred precision for the usage + * and locale preference, alternatively with the default precision. + * @param status Receives status. + */ + RouteResult route(double quantity, icu::number::impl::RoundingImpl *rounder, UErrorCode &status) const; + + /** + * Returns the list of possible output units, i.e. the full set of + * preferences, for the localized, usage-specific unit preferences. + * + * The returned pointer should be valid for the lifetime of the + * UnitsRouter instance. + */ + const MaybeStackVector *getOutputUnits() const; + + private: + // List of possible output units. TODO: converterPreferences_ now also has + // this data available. Maybe drop outputUnits_ and have getOutputUnits + // construct a the list from data in converterPreferences_ instead? + MaybeStackVector outputUnits_; + + MaybeStackVector converterPreferences_; + + static number::Precision parseSkeletonToPrecision(icu::UnicodeString precisionSkeleton, + UErrorCode &status); +}; + +} // namespace units +U_NAMESPACE_END + +#endif //__UNITS_ROUTER_H__ + +#endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/deps/icu-small/source/i18n/unum.cpp b/deps/icu-small/source/i18n/unum.cpp index ba3d519162ce54..de693fc7276244 100644 --- a/deps/icu-small/source/i18n/unum.cpp +++ b/deps/icu-small/source/i18n/unum.cpp @@ -898,7 +898,7 @@ unum_getContext(const UNumberFormat *fmt, UDisplayContextType type, UErrorCode* return ((const NumberFormat*)fmt)->getContext(type, *status); } -U_INTERNAL UFormattable * U_EXPORT2 +U_CAPI UFormattable * U_EXPORT2 unum_parseToUFormattable(const UNumberFormat* fmt, UFormattable *result, const UChar* text, @@ -922,7 +922,7 @@ unum_parseToUFormattable(const UNumberFormat* fmt, return result; } -U_INTERNAL int32_t U_EXPORT2 +U_CAPI int32_t U_EXPORT2 unum_formatUFormattable(const UNumberFormat* fmt, const UFormattable *number, UChar *result, diff --git a/deps/icu-small/source/i18n/upluralrules.cpp b/deps/icu-small/source/i18n/upluralrules.cpp index 5119257fd804f7..73e59a75c4d016 100644 --- a/deps/icu-small/source/i18n/upluralrules.cpp +++ b/deps/icu-small/source/i18n/upluralrules.cpp @@ -20,6 +20,7 @@ #include "unicode/unumberformatter.h" #include "number_decimalquantity.h" #include "number_utypes.h" +#include "numrange_impl.h" U_NAMESPACE_USE @@ -115,6 +116,25 @@ uplrules_selectFormatted(const UPluralRules *uplrules, return result.extract(keyword, capacity, *status); } +U_CAPI int32_t U_EXPORT2 +uplrules_selectForRange(const UPluralRules *uplrules, + const UFormattedNumberRange* urange, + UChar *keyword, int32_t capacity, + UErrorCode *status) +{ + if (U_FAILURE(*status)) { + return 0; + } + if (keyword == NULL ? capacity != 0 : capacity < 0) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + const number::impl::UFormattedNumberRangeData* impl = + number::impl::validateUFormattedNumberRange(urange, *status); + UnicodeString result = ((PluralRules*)uplrules)->select(impl, *status); + return result.extract(keyword, capacity, *status); +} + U_CAPI int32_t U_EXPORT2 uplrules_selectWithFormat(const UPluralRules *uplrules, double number, diff --git a/deps/icu-small/source/i18n/uspoof_impl.h b/deps/icu-small/source/i18n/uspoof_impl.h index 8844a96446e2b5..b0bd8cefc82ddc 100644 --- a/deps/icu-small/source/i18n/uspoof_impl.h +++ b/deps/icu-small/source/i18n/uspoof_impl.h @@ -222,7 +222,7 @@ class SpoofData: public UMemory { SpoofData(const void *serializedData, int32_t length, UErrorCode &status); // Check raw Spoof Data Version compatibility. - // Return TRUE it looks good. + // Return true it looks good. UBool validateDataVersion(UErrorCode &status) const; ~SpoofData(); // Destructor not normally used. diff --git a/deps/icu-small/source/i18n/usrchimp.h b/deps/icu-small/source/i18n/usrchimp.h index 5438417e7e60aa..e056337caecdef 100644 --- a/deps/icu-small/source/i18n/usrchimp.h +++ b/deps/icu-small/source/i18n/usrchimp.h @@ -206,7 +206,7 @@ struct UStringSearch { * the text "\u00e6" * @param strsrch string search data * @param status error status if any -* @return TRUE if an exact match is found, FALSE otherwise +* @return true if an exact match is found, false otherwise */ U_CFUNC UBool usearch_handleNextExact(UStringSearch *strsrch, UErrorCode *status); @@ -217,7 +217,7 @@ UBool usearch_handleNextExact(UStringSearch *strsrch, UErrorCode *status); * of beginning and ending accents if it overlaps that region. * @param strsrch string search data * @param status error status if any -* @return TRUE if a canonical match is found, FALSE otherwise +* @return true if a canonical match is found, false otherwise */ U_CFUNC UBool usearch_handleNextCanonical(UStringSearch *strsrch, UErrorCode *status); @@ -227,7 +227,7 @@ UBool usearch_handleNextCanonical(UStringSearch *strsrch, UErrorCode *status); * Comments follows from handleNextExact * @param strsrch string search data * @param status error status if any -* @return True if a exact math is found, FALSE otherwise. +* @return True if a exact math is found, false otherwise. */ U_CFUNC UBool usearch_handlePreviousExact(UStringSearch *strsrch, UErrorCode *status); @@ -238,7 +238,7 @@ UBool usearch_handlePreviousExact(UStringSearch *strsrch, UErrorCode *status); * of beginning and ending accents if it overlaps that region. * @param strsrch string search data * @param status error status if any -* @return TRUE if a canonical match is found, FALSE otherwise +* @return true if a canonical match is found, false otherwise */ U_CFUNC UBool usearch_handlePreviousCanonical(UStringSearch *strsrch, diff --git a/deps/icu-small/source/i18n/utf16collationiterator.h b/deps/icu-small/source/i18n/utf16collationiterator.h index fd3a05e9efab0b..6305d81c30c66b 100644 --- a/deps/icu-small/source/i18n/utf16collationiterator.h +++ b/deps/icu-small/source/i18n/utf16collationiterator.h @@ -125,7 +125,7 @@ class U_I18N_API FCDUTF16CollationIterator : public UTF16CollationIterator { /** * Extend the FCD text segment forward or normalize around pos. * To be called when checkDir > 0 && pos != limit. - * @return TRUE if success, checkDir == 0 and pos != limit + * @return true if success, checkDir == 0 and pos != limit */ UBool nextSegment(UErrorCode &errorCode); @@ -139,7 +139,7 @@ class U_I18N_API FCDUTF16CollationIterator : public UTF16CollationIterator { /** * Extend the FCD text segment backward or normalize around pos. * To be called when checkDir < 0 && pos != start. - * @return TRUE if success, checkDir == 0 and pos != start + * @return true if success, checkDir == 0 and pos != start */ UBool previousSegment(UErrorCode &errorCode); diff --git a/deps/icu-small/source/i18n/utf8collationiterator.h b/deps/icu-small/source/i18n/utf8collationiterator.h index 9a3ec45aeb41eb..9059e72dcf9e63 100644 --- a/deps/icu-small/source/i18n/utf8collationiterator.h +++ b/deps/icu-small/source/i18n/utf8collationiterator.h @@ -54,7 +54,7 @@ class U_I18N_API UTF8CollationIterator : public CollationIterator { * together with a bogus code point. The caller will ignore that code point. * * Special values may be returned for surrogate code points, which are also illegal in UTF-8, - * but the caller will treat them like U+FFFD because forbidSurrogateCodePoints() returns TRUE. + * but the caller will treat them like U+FFFD because forbidSurrogateCodePoints() returns true. * * Valid lead surrogates are returned from inside a normalized text segment, * where handleGetTrailSurrogate() will return the matching trail surrogate. @@ -117,7 +117,7 @@ class U_I18N_API FCDUTF8CollationIterator : public UTF8CollationIterator { /** * Extends the FCD text segment forward or normalizes around pos. - * @return TRUE if success + * @return true if success */ UBool nextSegment(UErrorCode &errorCode); @@ -128,7 +128,7 @@ class U_I18N_API FCDUTF8CollationIterator : public UTF8CollationIterator { /** * Extends the FCD text segment backward or normalizes around pos. - * @return TRUE if success + * @return true if success */ UBool previousSegment(UErrorCode &errorCode); diff --git a/deps/icu-small/source/i18n/vzone.h b/deps/icu-small/source/i18n/vzone.h index 700687e0cb76ab..9c83c1b7e660cb 100644 --- a/deps/icu-small/source/i18n/vzone.h +++ b/deps/icu-small/source/i18n/vzone.h @@ -91,7 +91,7 @@ vzone_equals(const VZone* zone1, const VZone* zone2); * @param zone, the vzone to use * @param url Receives the RFC2445 TZURL property value. * @param urlLength, length of the url - * @return TRUE if TZURL attribute is available and value is set. + * @return true if TZURL attribute is available and value is set. */ U_CAPI UBool U_EXPORT2 vzone_getTZURL(VZone* zone, UChar* & url, int32_t & urlLength); @@ -112,7 +112,7 @@ vzone_setTZURL(VZone* zone, UChar* url, int32_t urlLength); * is not set. * @param zone, the vzone to use * @param lastModified Receives the last modified date. - * @return TRUE if lastModified attribute is available and value is set. + * @return true if lastModified attribute is available and value is set. */ U_CAPI UBool U_EXPORT2 vzone_getLastModified(VZone* zone, UDate& lastModified); @@ -283,7 +283,7 @@ vzone_useDaylightTime(VZone* zone); * @return true if the given date is in daylight savings time, * false, otherwise. */ -U_INTERNAL UBool U_EXPORT2 +U_CAPI UBool U_EXPORT2 vzone_inDaylightTime(VZone* zone, UDate date, UErrorCode& status); /** @@ -303,7 +303,7 @@ vzone_hasSameRules(VZone* zone, const VZone* other); * @param base The base time. * @param inclusive Whether the base time is inclusive or not. * @param result Receives the first transition after the base time. - * @return TRUE if the transition is found. + * @return true if the transition is found. */ U_CAPI UBool U_EXPORT2 vzone_getNextTransition(VZone* zone, UDate base, UBool inclusive, ZTrans* result); @@ -314,7 +314,7 @@ vzone_getNextTransition(VZone* zone, UDate base, UBool inclusive, ZTrans* result * @param base The base time. * @param inclusive Whether the base time is inclusive or not. * @param result Receives the most recent transition before the base time. - * @return TRUE if the transition is found. + * @return true if the transition is found. */ U_CAPI UBool U_EXPORT2 vzone_getPreviousTransition(VZone* zone, UDate base, UBool inclusive, ZTrans* result); diff --git a/deps/icu-small/source/i18n/zonemeta.h b/deps/icu-small/source/i18n/zonemeta.h index 9dbcc878a22dc8..58724ea3b7d2e4 100644 --- a/deps/icu-small/source/i18n/zonemeta.h +++ b/deps/icu-small/source/i18n/zonemeta.h @@ -59,7 +59,7 @@ class U_I18N_API ZoneMeta { * is not associated with a country, return bogus string. * @param tzid Zone ID * @param country [output] Country code - * @param isPrimary [output] TRUE if the zone is the primary zone for the country + * @param isPrimary [output] true if the zone is the primary zone for the country * @return A reference to the result country */ static UnicodeString& U_EXPORT2 getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country, UBool *isPrimary = NULL); diff --git a/deps/icu-small/source/python/icutools/databuilder/filtration_schema.json b/deps/icu-small/source/python/icutools/databuilder/filtration_schema.json index 2b7ff9989992a1..3aed41a3341f65 100644 --- a/deps/icu-small/source/python/icutools/databuilder/filtration_schema.json +++ b/deps/icu-small/source/python/icutools/databuilder/filtration_schema.json @@ -90,7 +90,7 @@ { "properties": { "filterType": { - "$ref": "#/definitions/blacklistWhitelistFilterTypes" + "$ref": "#/definitions/includeExcludeFilterTypes" }, "whitelist": { "$ref": "#/definitions/stringList" } }, @@ -100,13 +100,33 @@ { "properties": { "filterType": { - "$ref": "#/definitions/blacklistWhitelistFilterTypes" + "$ref": "#/definitions/includeExcludeFilterTypes" }, "blacklist": { "$ref": "#/definitions/stringList" } }, "required": ["blacklist"], "additionalProperties": false }, + { + "properties": { + "filterType": { + "$ref": "#/definitions/includeExcludeFilterTypes" + }, + "includelist": { "$ref": "#/definitions/stringList" } + }, + "required": ["includelist"], + "additionalProperties": false + }, + { + "properties": { + "filterType": { + "$ref": "#/definitions/includeExcludeFilterTypes" + }, + "excludelist": { "$ref": "#/definitions/stringList" } + }, + "required": ["excludelist"], + "additionalProperties": false + }, { "properties": { "filterType": { @@ -134,6 +154,23 @@ "required": ["filterType", "whitelist"], "additionalProperties": false }, + { + "properties": { + "filterType": { + "type": "string", + "enum": ["locale"] + }, + "includeChildren": { + "type": "boolean" + }, + "includeScripts": { + "type": "boolean" + }, + "includelist": { "$ref": "#/definitions/stringList" } + }, + "required": ["filterType", "includelist"], + "additionalProperties": false + }, { "properties": { "filterType": { @@ -150,7 +187,7 @@ } ] }, - "blacklistWhitelistFilterTypes": { + "includeExcludeFilterTypes": { "type": "string", "enum": [ "language", diff --git a/deps/icu-small/source/python/icutools/databuilder/test/sample_data/brkitr/LOCALE_DEPS.json b/deps/icu-small/source/python/icutools/databuilder/test/sample_data/brkitr/LOCALE_DEPS.json index 89329e87eea539..674db09278fc37 100644 --- a/deps/icu-small/source/python/icutools/databuilder/test/sample_data/brkitr/LOCALE_DEPS.json +++ b/deps/icu-small/source/python/icutools/databuilder/test/sample_data/brkitr/LOCALE_DEPS.json @@ -1,5 +1,5 @@ // © 2019 and later: Unicode, Inc. and others. -// License & terms of use: http://www.unicode.org/copyright.html#License +// License & terms of use: http://www.unicode.org/copyright.html ////////////////////////////////////////////////////////////// // This is a sample LOCALE_DEPS.json file for testing only. // diff --git a/deps/icu-small/source/python/icutools/databuilder/test/sample_data/locales/LOCALE_DEPS.json b/deps/icu-small/source/python/icutools/databuilder/test/sample_data/locales/LOCALE_DEPS.json index fd28a741ef67c2..1456ea0d9acff4 100644 --- a/deps/icu-small/source/python/icutools/databuilder/test/sample_data/locales/LOCALE_DEPS.json +++ b/deps/icu-small/source/python/icutools/databuilder/test/sample_data/locales/LOCALE_DEPS.json @@ -1,5 +1,5 @@ // © 2019 and later: Unicode, Inc. and others. -// License & terms of use: http://www.unicode.org/copyright.html#License +// License & terms of use: http://www.unicode.org/copyright.html ////////////////////////////////////////////////////////////// // This is a sample LOCALE_DEPS.json file for testing only. // diff --git a/deps/icu-small/source/python/icutools/databuilder/test/sample_data/rbnf/LOCALE_DEPS.json b/deps/icu-small/source/python/icutools/databuilder/test/sample_data/rbnf/LOCALE_DEPS.json index f079619a3685ba..c6ec208add2b41 100644 --- a/deps/icu-small/source/python/icutools/databuilder/test/sample_data/rbnf/LOCALE_DEPS.json +++ b/deps/icu-small/source/python/icutools/databuilder/test/sample_data/rbnf/LOCALE_DEPS.json @@ -1,5 +1,5 @@ // © 2019 and later: Unicode, Inc. and others. -// License & terms of use: http://www.unicode.org/copyright.html#License +// License & terms of use: http://www.unicode.org/copyright.html ////////////////////////////////////////////////////////////// // This is a sample LOCALE_DEPS.json file for testing only. // diff --git a/deps/icu-small/source/tools/genrb/errmsg.c b/deps/icu-small/source/tools/genrb/errmsg.c index 603f26a174c4e9..91dfd3265e1149 100644 --- a/deps/icu-small/source/tools/genrb/errmsg.c +++ b/deps/icu-small/source/tools/genrb/errmsg.c @@ -21,6 +21,7 @@ #include #include "cstring.h" #include "errmsg.h" +#include "toolutil.h" U_CFUNC void error(uint32_t linenumber, const char *msg, ...) { diff --git a/deps/icu-small/source/tools/genrb/read.c b/deps/icu-small/source/tools/genrb/read.c index c20b4510a28ac4..141e285d25efb9 100644 --- a/deps/icu-small/source/tools/genrb/read.c +++ b/deps/icu-small/source/tools/genrb/read.c @@ -20,6 +20,7 @@ #include "read.h" #include "errmsg.h" +#include "toolutil.h" #include "unicode/ustring.h" #include "unicode/utf16.h" diff --git a/deps/icu-small/source/tools/genrb/reslist.cpp b/deps/icu-small/source/tools/genrb/reslist.cpp index 3186c781e934f3..4bc6adc128ecc3 100644 --- a/deps/icu-small/source/tools/genrb/reslist.cpp +++ b/deps/icu-small/source/tools/genrb/reslist.cpp @@ -39,6 +39,7 @@ #include "unicode/putil.h" #include "errmsg.h" #include "filterrb.h" +#include "toolutil.h" #include "uarrsort.h" #include "uelement.h" diff --git a/deps/icu-small/source/tools/genrb/reslist.h b/deps/icu-small/source/tools/genrb/reslist.h index 34b710c4232670..e7b10fa0961d18 100644 --- a/deps/icu-small/source/tools/genrb/reslist.h +++ b/deps/icu-small/source/tools/genrb/reslist.h @@ -355,7 +355,7 @@ class StringResource : public StringBaseResource { fNumCopies(0), fNumUnitsSaved(0), fNumCharsForLength(numCharsForLength) { // v3 pool string encoded as string-v2 with low offset fRes = URES_MAKE_RESOURCE(URES_STRING_V2, poolStringIndex); - fWritten = TRUE; + fWritten = true; } virtual ~StringResource(); diff --git a/deps/icu-small/source/tools/genrb/rle.c b/deps/icu-small/source/tools/genrb/rle.c index 3d034f78ca3881..c5d29ba1d24b6b 100644 --- a/deps/icu-small/source/tools/genrb/rle.c +++ b/deps/icu-small/source/tools/genrb/rle.c @@ -16,6 +16,7 @@ * 01/11/02 Ram Creation. ******************************************************************************* */ +#include #include "rle.h" /** * The ESCAPE character is used during run-length encoding. It signals @@ -297,7 +298,7 @@ int32_t rleStringToByteArray(uint16_t* src, int32_t srcLen, uint8_t* target, int32_t tgtLen, UErrorCode* status) { int32_t length = 0; - UBool nextChar = TRUE; + UBool nextChar = true; uint16_t c = 0; int32_t node = 0; int32_t runLength = 0; @@ -334,11 +335,11 @@ rleStringToByteArray(uint16_t* src, int32_t srcLen, uint8_t* target, int32_t tgt if (nextChar) { c = src[i++]; b = (uint8_t) (c >> 8); - nextChar = FALSE; + nextChar = false; } else { b = (uint8_t) (c & 0xFF); - nextChar = TRUE; + nextChar = true; } /* This part of the loop is a tiny state machine which handles diff --git a/deps/icu-small/source/tools/icupkg/icupkg.cpp b/deps/icu-small/source/tools/icupkg/icupkg.cpp index ea7be4a90923fd..39707946b0943c 100644 --- a/deps/icu-small/source/tools/icupkg/icupkg.cpp +++ b/deps/icu-small/source/tools/icupkg/icupkg.cpp @@ -59,6 +59,7 @@ printUsage(const char *pname, UBool isHelp) { "%csage: %s [-h|-?|--help ] [-tl|-tb|-te] [-c] [-C comment]\n" "\t[-a list] [-r list] [-x list] [-l [-o outputListFileName]]\n" "\t[-s path] [-d path] [-w] [-m mode]\n" + "\t[--ignore-deps]\n" "\t[--auto_toc_prefix] [--auto_toc_prefix_with_type] [--toc_prefix]\n" "\tinfilename [outfilename]\n", isHelp ? 'U' : 'u', pname); @@ -119,6 +120,10 @@ printUsage(const char *pname, UBool isHelp) { "\t-m mode or --matchmode mode set the matching mode for item names with\n" "\t wildcards\n" "\t noslash: the '*' wildcard does not match the '/' tree separator\n"); + fprintf(where, + "\n" + "\t--ignore-deps Do not fail if not all resource dependencies are met. Use this\n" + "\t option if the missing resources come from another source."); fprintf(where, "\n" "\tIn the .dat package, the Table of Contents (ToC) contains an entry\n" @@ -198,6 +203,8 @@ static UOption options[]={ UOPTION_DEF("matchmode", 'm', UOPT_REQUIRES_ARG), + UOPTION_DEF("ignore-deps", '\1', UOPT_NO_ARG), + UOPTION_DEF("add", 'a', UOPT_REQUIRES_ARG), UOPTION_DEF("remove", 'r', UOPT_REQUIRES_ARG), UOPTION_DEF("extract", 'x', UOPT_REQUIRES_ARG), @@ -225,6 +232,8 @@ enum { OPT_MATCHMODE, + OPT_IGNORE_DEPS, + OPT_ADD_LIST, OPT_REMOVE_LIST, OPT_EXTRACT_LIST, @@ -501,7 +510,7 @@ main(int argc, char *argv[]) { } /* check dependencies between items */ - if(!pkg->checkDependencies()) { + if(!options[OPT_IGNORE_DEPS].doesOccur && !pkg->checkDependencies()) { /* some dependencies are not fulfilled */ return U_MISSING_RESOURCE_ERROR; } diff --git a/deps/icu-small/source/tools/pkgdata/pkgtypes.c b/deps/icu-small/source/tools/pkgdata/pkgtypes.c index 43ee3dfb5e2c33..26bd945df73d48 100644 --- a/deps/icu-small/source/tools/pkgdata/pkgtypes.c +++ b/deps/icu-small/source/tools/pkgdata/pkgtypes.c @@ -17,6 +17,7 @@ * common types for pkgdata */ +#include #include #include #include "unicode/utypes.h" @@ -294,9 +295,9 @@ UBool pkg_listContains(CharList *l, const char *str) { for(;l;l=l->next){ if(!uprv_strcmp(l->str, str)) { - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/deps/icu-small/source/tools/toolutil/dbgutil.cpp b/deps/icu-small/source/tools/toolutil/dbgutil.cpp index 29bab927535e78..17fdfbb1444e29 100644 --- a/deps/icu-small/source/tools/toolutil/dbgutil.cpp +++ b/deps/icu-small/source/tools/toolutil/dbgutil.cpp @@ -29,7 +29,7 @@ static const UnicodeString& _fieldString(UDebugEnumType type, int32_t field, Un if(str == NULL) { return fillin.remove(); } else { - return fillin = UnicodeString(str, ""); // optimize? + return fillin = UnicodeString(str, -1, US_INV); } } diff --git a/deps/icu-small/source/tools/toolutil/filetools.h b/deps/icu-small/source/tools/toolutil/filetools.h index 6a25c3601c0178..40a606a7d49076 100644 --- a/deps/icu-small/source/tools/toolutil/filetools.h +++ b/deps/icu-small/source/tools/toolutil/filetools.h @@ -26,7 +26,7 @@ #include "unicode/utypes.h" U_CAPI UBool U_EXPORT2 -isFileModTimeLater(const char *filePath, const char *checkAgainst, UBool isDir=FALSE); +isFileModTimeLater(const char *filePath, const char *checkAgainst, UBool isDir=false); U_CAPI void U_EXPORT2 swapFileSepChar(char *filePath, const char oldFileSepChar, const char newFileSepChar); diff --git a/deps/icu-small/source/tools/toolutil/package.h b/deps/icu-small/source/tools/toolutil/package.h index 3263c84feb4c37..5f74eb73ef5c9a 100644 --- a/deps/icu-small/source/tools/toolutil/package.h +++ b/deps/icu-small/source/tools/toolutil/package.h @@ -57,13 +57,13 @@ class U_TOOLUTIL_API Package { * Uses the prefix of the first entry of the package in readPackage(), * rather than the package basename. */ - void setAutoPrefix() { doAutoPrefix=TRUE; } + void setAutoPrefix() { doAutoPrefix=true; } /** * Same as setAutoPrefix(), plus the prefix must end with the platform type letter. */ void setAutoPrefixWithType() { - doAutoPrefix=TRUE; - prefixEndsWithType=TRUE; + doAutoPrefix=true; + prefixEndsWithType=true; } void setPrefix(const char *p); @@ -128,7 +128,7 @@ class U_TOOLUTIL_API Package { const Item *getItem(int32_t idx) const; /* - * Check dependencies and return TRUE if all dependencies are fulfilled. + * Check dependencies and return true if all dependencies are fulfilled. */ UBool checkDependencies(); diff --git a/deps/icu-small/source/tools/toolutil/pkg_genc.cpp b/deps/icu-small/source/tools/toolutil/pkg_genc.cpp index 31db2e2184b3be..f9400c5058c206 100644 --- a/deps/icu-small/source/tools/toolutil/pkg_genc.cpp +++ b/deps/icu-small/source/tools/toolutil/pkg_genc.cpp @@ -738,8 +738,8 @@ getOutFilename( exit(U_ILLEGAL_ARGUMENT_ERROR); } - uprv_strcpy(outFilename, outFilenameBuilder.data()); - uprv_strcpy(entryName, entryNameBuilder.data()); + outFilenameBuilder.extract(outFilename, outFilenameCapacity, status); + entryNameBuilder.extract(entryName, entryNameCapacity, status); } #ifdef CAN_GENERATE_OBJECTS diff --git a/deps/icu-small/source/tools/toolutil/pkg_genc.h b/deps/icu-small/source/tools/toolutil/pkg_genc.h index b231aa6170c287..72d96870355020 100644 --- a/deps/icu-small/source/tools/toolutil/pkg_genc.h +++ b/deps/icu-small/source/tools/toolutil/pkg_genc.h @@ -68,13 +68,13 @@ -U_INTERNAL void U_EXPORT2 +U_CAPI void U_EXPORT2 printAssemblyHeadersToStdErr(void); -U_INTERNAL UBool U_EXPORT2 +U_CAPI UBool U_EXPORT2 checkAssemblyHeaderName(const char* optAssembly); -U_INTERNAL void U_EXPORT2 +U_CAPI void U_EXPORT2 writeCCode( const char *filename, const char *destdir, @@ -83,7 +83,7 @@ writeCCode( char *outFilePath, size_t outFilePathCapacity); -U_INTERNAL void U_EXPORT2 +U_CAPI void U_EXPORT2 writeAssemblyCode( const char *filename, const char *destdir, @@ -92,7 +92,7 @@ writeAssemblyCode( char *outFilePath, size_t outFilePathCapacity); -U_INTERNAL void U_EXPORT2 +U_CAPI void U_EXPORT2 writeObjectCode( const char *filename, const char *destdir, diff --git a/deps/icu-small/source/tools/toolutil/pkgitems.cpp b/deps/icu-small/source/tools/toolutil/pkgitems.cpp index b0ea980d605dcb..16b18a3e27345f 100644 --- a/deps/icu-small/source/tools/toolutil/pkgitems.cpp +++ b/deps/icu-small/source/tools/toolutil/pkgitems.cpp @@ -441,6 +441,7 @@ ures_enumDependencies(const char *itemName, const UDataInfo *pInfo, // get dependencies from conversion tables --------------------------------- *** +#if !UCONFIG_NO_CONVERSION /* code adapted from ucnv_swap() */ static void ucnv_enumDependencies(const UDataSwapper *ds, @@ -631,5 +632,6 @@ Package::enumDependencies(Item *pItem, void *context, CheckDependency check) { } } } +#endif /* UCONFIG_NO_CONVERSION */ U_NAMESPACE_END diff --git a/deps/icu-small/source/tools/toolutil/toolutil.cpp b/deps/icu-small/source/tools/toolutil/toolutil.cpp index f0d6be5cf5ee2a..0ce9b02115dd32 100644 --- a/deps/icu-small/source/tools/toolutil/toolutil.cpp +++ b/deps/icu-small/source/tools/toolutil/toolutil.cpp @@ -33,7 +33,7 @@ #include "unicode/utypes.h" #ifndef U_TOOLUTIL_IMPLEMENTATION -#error U_TOOLUTIL_IMPLEMENTATION not set - must be set for all ICU source files in common/ - see http://userguide.icu-project.org/howtouseicu +#error U_TOOLUTIL_IMPLEMENTATION not set - must be set for all ICU source files in common/ - see https://unicode-org.github.io/icu/userguide/howtouseicu #endif #if U_PLATFORM_USES_ONLY_WIN32_API @@ -166,14 +166,11 @@ findBasename(const char *filename) { const char *basename=uprv_strrchr(filename, U_FILE_SEP_CHAR); #if U_FILE_ALT_SEP_CHAR!=U_FILE_SEP_CHAR -#if !(U_PLATFORM == U_PF_CYGWIN && U_PLATFORM_USES_ONLY_WIN32_API) - if(basename==NULL) -#endif - { - /* Use lenient matching on Windows, which can accept either \ or / - This is useful for environments like Win32+CygWin which have both. - */ - basename=uprv_strrchr(filename, U_FILE_ALT_SEP_CHAR); + //be lenient about pathname separators on Windows, like official implementation of C++17 std::filesystem in MSVC + //would be convenient to merge this loop with the one above, but alas, there is no such solution in the standard library + const char *alt_basename=uprv_strrchr(filename, U_FILE_ALT_SEP_CHAR); + if(alt_basename>basename) { + basename=alt_basename; } #endif diff --git a/deps/icu-small/source/tools/toolutil/toolutil.h b/deps/icu-small/source/tools/toolutil/toolutil.h index be07787a9fa950..1d0d26c97477c5 100644 --- a/deps/icu-small/source/tools/toolutil/toolutil.h +++ b/deps/icu-small/source/tools/toolutil/toolutil.h @@ -23,6 +23,12 @@ #include "unicode/utypes.h" +#ifndef TRUE +# define TRUE 1 +#endif +#ifndef FALSE +# define FALSE 0 +#endif #ifdef __cplusplus diff --git a/deps/icu-small/source/tools/toolutil/udbgutil.cpp b/deps/icu-small/source/tools/toolutil/udbgutil.cpp index 285f68a0ec66a1..993694546f4a72 100644 --- a/deps/icu-small/source/tools/toolutil/udbgutil.cpp +++ b/deps/icu-small/source/tools/toolutil/udbgutil.cpp @@ -594,24 +594,11 @@ U_CAPI void udbg_writeIcuInfo(FILE *out) { fprintf(out, " \n"); } -#define ICU_TRAC_URL "http://bugs.icu-project.org/trac/ticket/" -#define CLDR_TRAC_URL "http://unicode.org/cldr/trac/ticket/" -#define CLDR_TICKET_PREFIX "cldrbug:" +#define UNICODE_BUG_URL "https://unicode-org.atlassian.net/browse/" +#define OLD_CLDR_PREFIX "cldrbug:" +#define CLDR_BUG_PREFIX "CLDR-" +#define ICU_BUG_PREFIX "ICU-" -U_CAPI char *udbg_knownIssueURLFrom(const char *ticket, char *buf) { - if( ticket==NULL ) { - return NULL; - } - - if( !strncmp(ticket, CLDR_TICKET_PREFIX, strlen(CLDR_TICKET_PREFIX)) ) { - strcpy( buf, CLDR_TRAC_URL ); - strcat( buf, ticket+strlen(CLDR_TICKET_PREFIX) ); - } else { - strcpy( buf, ICU_TRAC_URL ); - strcat( buf, ticket ); - } - return buf; -} #include @@ -641,8 +628,27 @@ KnownIssues::~KnownIssues() { } -void KnownIssues::add(const char *ticket, const char *where, const UChar *msg, UBool *firstForTicket, UBool *firstForWhere) +/** + * Map cldr:1234 to CLDR-1234 + * Map 1234 to ICU-1234 + */ +static std::string mapTicketId(const char *ticketStr) { + std::string ticket(ticketStr); + // TODO: Can remove this function once all logKnownIssue calls are switched over + // to the ICU-1234 and CLDR-1234 format. + if(ticket.rfind(OLD_CLDR_PREFIX) == 0) { + // map cldrbug:1234 to CLDR-1234 + ticket.replace(0, uprv_strlen(OLD_CLDR_PREFIX), CLDR_BUG_PREFIX); + } else if(::isdigit(ticket[0])) { + // map 1234 to ICU-1234 + ticket.insert(0, ICU_BUG_PREFIX); + } + return ticket; +} + +void KnownIssues::add(const char *ticketStr, const char *where, const UChar *msg, UBool *firstForTicket, UBool *firstForWhere) { + const std::string ticket = mapTicketId(ticketStr); if(fTable.find(ticket) == fTable.end()) { if(firstForTicket!=NULL) *firstForTicket = TRUE; fTable[ticket] = std::map < std::string, std::set < std::string > >(); @@ -664,8 +670,9 @@ void KnownIssues::add(const char *ticket, const char *where, const UChar *msg, U fTable[ticket][where].insert(std::string(icu::CStr(ustr)())); } -void KnownIssues::add(const char *ticket, const char *where, const char *msg, UBool *firstForTicket, UBool *firstForWhere) +void KnownIssues::add(const char *ticketStr, const char *where, const char *msg, UBool *firstForTicket, UBool *firstForWhere) { + const std::string ticket = mapTicketId(ticketStr); if(fTable.find(ticket) == fTable.end()) { if(firstForTicket!=NULL) *firstForTicket = TRUE; fTable[ticket] = std::map < std::string, std::set < std::string > >(); @@ -697,8 +704,13 @@ UBool KnownIssues::print() std::map < std::string, std::set < std::string > > >::iterator i = fTable.begin(); i != fTable.end(); i++ ) { - char URL[1024]; - std::cout << '#' << (*i).first << " <" << udbg_knownIssueURLFrom( (*i).first.c_str(), URL ) << ">" << std::endl; + const std::string ticketid = (*i).first; + std::cout << "[" << ticketid << "] "; + if(ticketid.rfind(ICU_BUG_PREFIX) == 0 || ticketid.rfind(CLDR_BUG_PREFIX) == 0) { + // If it's a unicode.org bug. + std::cout << UNICODE_BUG_URL << ticketid; + } // Else: some other kind of bug. Allow this, but without a URL. + std::cout << std::endl; for( std::map< std::string, std::set < std::string > >::iterator ii = (*i).second.begin(); ii != (*i).second.end(); diff --git a/deps/icu-small/source/tools/toolutil/udbgutil.h b/deps/icu-small/source/tools/toolutil/udbgutil.h index 2f186e6ed87f26..b9af132da5ba64 100644 --- a/deps/icu-small/source/tools/toolutil/udbgutil.h +++ b/deps/icu-small/source/tools/toolutil/udbgutil.h @@ -113,14 +113,6 @@ U_CAPI void udbg_writeIcuInfo(FILE *f); */ #define UDBG_KNOWNISSUE_LEN 255 -/** - * Convert a "known issue" string into a URL - * @param ticket ticket string such as "10245" or "cldrbug:5013" - * @param buf output buffer - must be UDBG_KNOWNISSUE_LEN in size - * @return pointer to output buffer, or NULL on err - */ -U_CAPI char *udbg_knownIssueURLFrom(const char *ticket, char *buf); - /** * Open (or reopen) a 'known issue' table. * @param ptr pointer to 'table'. Opaque. diff --git a/deps/icu-small/source/tools/toolutil/unewdata.cpp b/deps/icu-small/source/tools/toolutil/unewdata.cpp index 22d8540881f454..20f13be5b83ef1 100644 --- a/deps/icu-small/source/tools/toolutil/unewdata.cpp +++ b/deps/icu-small/source/tools/toolutil/unewdata.cpp @@ -57,6 +57,16 @@ udata_create(const char *dir, const char *type, const char *name, return NULL; } + char dirSepChar = U_FILE_SEP_CHAR; +#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR) + // We may need to append a different directory separator when building for Cygwin or MSYS2. + if(dir && *dir) { + if(!uprv_strchr(dir, U_FILE_SEP_CHAR) && uprv_strchr(dir, U_FILE_ALT_SEP_CHAR)) { + dirSepChar = U_FILE_ALT_SEP_CHAR; + } + } +#endif + /* Check that the full path won't be too long */ length = 0; /* Start with nothing */ if(dir != NULL && *dir !=0) /* Add directory length if one was given */ @@ -64,7 +74,7 @@ udata_create(const char *dir, const char *type, const char *name, length += static_cast(strlen(dir)); /* Add 1 if dir doesn't end with path sep */ - if (dir[strlen(dir) - 1]!= U_FILE_SEP_CHAR) { + if (dir[strlen(dir) - 1]!= dirSepChar) { length++; } } @@ -87,8 +97,8 @@ udata_create(const char *dir, const char *type, const char *name, if(dir!=NULL && *dir!=0) { /* if dir has a value, we prepend it to the filename */ char *p=filename+strlen(dir); uprv_strcpy(filename, dir); - if (*(p-1)!=U_FILE_SEP_CHAR) { - *p++=U_FILE_SEP_CHAR; + if (*(p-1)!=dirSepChar) { + *p++=dirSepChar; *p=0; } } else { /* otherwise, we'll output to the current dir */ diff --git a/deps/npm/.eslintrc.json b/deps/npm/.eslintrc.json index 7253bed6af197e..8566613e748a7e 100644 --- a/deps/npm/.eslintrc.json +++ b/deps/npm/.eslintrc.json @@ -1,10 +1,8 @@ { "parserOptions": { - "ecmaVersion": 2020, - "ecmaFeatures": { - "jsx": true - }, - "sourceType": "module" + "ecmaVersion": 2018, + "ecmaFeatures": {}, + "sourceType": "script" }, "env": { @@ -30,20 +28,20 @@ "array-bracket-spacing": ["error", "never"], "arrow-spacing": ["error", { "before": true, "after": true }], "block-spacing": ["error", "always"], - "brace-style": ["error", "1tbs", { "allowSingleLine": true }], + "brace-style": ["error", "1tbs", { "allowSingleLine": false }], "camelcase": ["error", { "properties": "never" }], "comma-dangle": ["error", { - "arrays": "never", - "objects": "never", - "imports": "never", - "exports": "never", + "arrays": "always-multiline", + "objects": "always-multiline", + "imports": "always-multiline", + "exports": "always-multiline", "functions": "never" }], "comma-spacing": ["error", { "before": false, "after": true }], "comma-style": ["error", "last"], "computed-property-spacing": ["error", "never"], "constructor-super": "error", - "curly": ["error", "multi-line"], + "curly": ["error", "multi-or-nest"], "dot-location": ["error", "property"], "dot-notation": ["error", { "allowKeywords": true }], "eol-last": "error", @@ -69,6 +67,13 @@ "key-spacing": ["error", { "beforeColon": false, "afterColon": true }], "keyword-spacing": ["error", { "before": true, "after": true }], "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }], + "max-len": ["error", 80, { + "ignoreUrls": true, + "ignoreComments": false, + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true + }], "new-cap": ["error", { "newIsCap": true, "capIsNew": false, "properties": true }], "new-parens": "error", "no-array-constructor": "error", @@ -77,7 +82,7 @@ "no-case-declarations": "error", "no-class-assign": "error", "no-compare-neg-zero": "error", - "no-cond-assign": "error", + "no-cond-assign": "off", "no-const-assign": "error", "no-constant-condition": ["error", { "checkLoops": false }], "no-control-regex": "error", @@ -104,25 +109,18 @@ "no-invalid-regexp": "error", "no-irregular-whitespace": "error", "no-iterator": "error", - "no-labels": ["error", { "allowLoop": false, "allowSwitch": false }], + "no-labels": ["error", { "allowLoop": true, "allowSwitch": false }], "no-lone-blocks": "error", "no-misleading-character-class": "error", "no-prototype-builtins": "error", "no-useless-catch": "error", - "no-mixed-operators": ["error", { - "groups": [ - ["==", "!=", "===", "!==", ">", ">=", "<", "<="], - ["&&", "||"], - ["in", "instanceof"] - ], - "allowSamePrecedence": true - }], + "no-mixed-operators": "off", "no-mixed-spaces-and-tabs": "error", "no-multi-spaces": "error", "no-multi-str": "error", "no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }], "no-negated-in-lhs": "error", - "no-new": "error", + "no-new": "off", "no-new-func": "error", "no-new-object": "error", "no-new-require": "error", @@ -135,14 +133,14 @@ "no-proto": "error", "no-redeclare": ["error", { "builtinGlobals": false }], "no-regex-spaces": "error", - "no-return-assign": ["error", "except-parens"], - "no-self-assign": ["error", { "props": true }], + "no-return-assign": "off", + "no-self-assign": "off", "no-self-compare": "error", "no-sequences": "error", "no-shadow-restricted-names": "error", "no-sparse-arrays": "error", "no-tabs": "error", - "no-template-curly-in-string": "error", + "no-template-curly-in-string": "off", "no-this-before-super": "error", "no-throw-literal": "off", "no-trailing-spaces": "error", @@ -166,16 +164,17 @@ "no-void": "error", "no-whitespace-before-property": "error", "no-with": "error", - "object-curly-newline": ["error", { "multiline": true, "consistent": true }], - "object-curly-spacing": ["error", "always"], + "nonblock-statement-body-position": [2, "below"], + "object-curly-newline": "off", + "object-curly-spacing": "off", "object-property-newline": ["error", { "allowMultiplePropertiesPerLine": true }], "one-var": ["error", { "initialized": "never" }], - "operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before", "|>": "before" } }], + "operator-linebreak": "off", "padded-blocks": ["error", { "blocks": "never", "switches": "never", "classes": "never" }], "prefer-const": ["error", {"destructuring": "all"}], "prefer-promise-reject-errors": "error", "quote-props": ["error", "as-needed"], - "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }], + "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }], "rest-spread-spacing": ["error", "never"], "semi": ["error", "never"], "semi-spacing": ["error", { "before": false, "after": true }], diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 7134e67e859148..0d3cedb68c8695 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -722,3 +722,22 @@ nlf zhaoxuxu liuye.adam Michaël Zasso +Gareth Jones +Jake Champion +takenspc +iraj +Michele Azzolari +foxxyz +Dr +Jan Tojnar +Jason Attwood +Vlad GURDIGA +Sébastien Puech +Jannis Hell +Hollow Man +kai zhu +Alex Woollam +Daniel Fischer +Yash-Singh1 +Edu93Jer +Tieg Zaharia diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 2b22d5fbb9717c..accfdafe6643e4 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,707 @@ +## 7.3.0 (2020-12-18) + +### FEATURES + +* [`a9b8bf263`](https://github.com/npm/cli/commit/a9b8bf2634c627fbb16ca3a6bb2c2f1058c3e586) + [#2362](https://github.com/npm/cli/issues/2362) + Support multiple set/get/deletes in npm config + ([@isaacs](https://github.com/isaacs)) + +### BUG FIXES + +* [`9eef63849`](https://github.com/npm/cli/commit/9eef638499c88689acb00d812c10f0407cb95c08) + Pass full set of options to login helper functions. + This fixes `npm login --no-strict-ssl`, as well as a host of other + options that one might want to set while logging in. + Reported by: [@toddself](https://github.com/toddself) + ([@isaacs](https://github.com/isaacs)) +* [`628a554bc`](https://github.com/npm/cli/commit/628a554bc113e4e115d34778bfe8a77cfad1d933) + [#2358](https://github.com/npm/cli/issues/2358) + fix doctor test to work correctly for node pre-release versions + ([@nlf](https://github.com/nlf)) +* [`be4a0900b`](https://github.com/npm/cli/commit/be4a0900b14b2c6315bf62bed8f5affb648215ae) + [#2360](https://github.com/npm/cli/issues/2360) + raise an error early if publishing without login, registry + ([@isaacs](https://github.com/isaacs)) +* [`44d433105`](https://github.com/npm/cli/commit/44d4331058c53909ada62470b23b2185102b2128) + [#2366](https://github.com/npm/cli/issues/2366) + Include prerelease versions when deprecating + ([@tiegz](https://github.com/tiegz)) +* [`cba3341da`](https://github.com/npm/cli/commit/cba3341dae4c92541049dc976e82e2ba19566e95) + [#2373](https://github.com/npm/cli/issues/2373) + npm profile refactor + ([@ruyadorno](https://github.com/ruyadorno)) +* [`7539504e3`](https://github.com/npm/cli/commit/7539504e3abdec28039a7798e5ccb745b536cb6e) + [#2382](https://github.com/npm/cli/issues/2382) + remove the metrics sender + ([@nlf](https://github.com/nlf)) + +### DOCS + +* [`b98569a8c`](https://github.com/npm/cli/commit/b98569a8ca28dbd611fe84492aee996e2e567b55) + add note about `INIT_CWD` to run-script doc +* [`292929279`](https://github.com/npm/cli/commit/292929279854a06ca60ff737b574cbd6503ec5db) + [#2368](https://github.com/npm/cli/issues/2368) + Revert bug-reporting links to GH. + Re: + ([@tiegz](https://github.com/tiegz)) +* [`f4560626f`](https://github.com/npm/cli/commit/f4560626f09dba4889d752f7f739aa5a5f3da741) + update `ISSUE_TEMPLATE` with modern links + ([@isaacs](https://github.com/isaacs)) +* [`bc1c567ed`](https://github.com/npm/cli/commit/bc1c567ed3d853ed4f01d33a800eb453956de6ef) + update npm command doc feature request links + ([@isaacs](https://github.com/isaacs)) +* [`0ad958fe1`](https://github.com/npm/cli/commit/0ad958fe1cb811699caca235f361c8328baac8c4) + [#2381](https://github.com/npm/cli/issues/2381) + (docs,test): assorted typo fixes + ([@XhmikosR](https://github.com/XhmikosR)) + +### TESTING + +* [`a92d310b7`](https://github.com/npm/cli/commit/a92d310b7e9e4c48b08f52785c2e3a6d52a82ad7) + [#2361](https://github.com/npm/cli/issues/2361) + Add max-len to lint rules + ([@Edu93Jer](https://github.com/Edu93Jer)) + +### DEPENDENCIES + +* [`4fc2f3e05`](https://github.com/npm/cli/commit/4fc2f3e05b600aa64fe5eb6b8b77bc070e5a9403) + [#2300](https://github.com/npm/cli/issues/2300) + `@npmcli/config@1.2.8`: + * Support setting email without username/password + +## 7.2.0 (2020-12-15) + +### FEATURES + +* [`a9c4b158c`](https://github.com/npm/cli/commit/a9c4b158c46dd0d0c8d8744a97750ffd0c30cc09) + [#2342](https://github.com/npm/cli/issues/2342) + allow npm rebuild to accept a path to a module + ([@nlf](https://github.com/nlf)) + +### DEPENDENCIES + +* [`beb371800`](https://github.com/npm/cli/commit/beb371800292140bf3882253c447168a378bc154) + [#2334](https://github.com/npm/cli/issues/2334) + remove unused top level dep tough-cookie + ([@darcyclarke](https://github.com/darcyclarke)) +* [`d45e181d1`](https://github.com/npm/cli/commit/d45e181d17dd88d82b3a97f8d9cd5fa5b6230e48) + [#2335](https://github.com/npm/cli/issues/2335) + `ini@2.0.0`, `@npmcli/config@1.2.7` + ([@isaacs](https://github.com/isaacs)) +* [`ef4b18b5a`](https://github.com/npm/cli/commit/ef4b18b5a70381b264d234817cff32eeb6848a73) + [#2309](https://github.com/npm/cli/issues/2309) + `@npmcli/arborist@2.0.2` + * properly remove deps when no lockfile and package.json is present +* [`c6c013e6e`](https://github.com/npm/cli/commit/c6c013e6ebc4fe036695db1fd491eb68f3b57c68) + `readdir-scoped-modules@1.1.0` +* [`a1a2134aa`](https://github.com/npm/cli/commit/a1a2134aa9a1092493db6d6c9a729ff5203f0dd4) + remove unused sorted-object dep + ([@nlf](https://github.com/nlf)) +* [`85c2a2d31`](https://github.com/npm/cli/commit/85c2a2d318ae066fb2c161174f5aea97e18bc9c5) + [#2344](https://github.com/npm/cli/issues/2344) + remove editor dependency + ([@nlf](https://github.com/nlf)) + +### TESTING + +* [`3a6dd511c`](https://github.com/npm/cli/commit/3a6dd511c944c5f2699825a99bba1dde333a45ef) + npm edit + ([@nlf](https://github.com/nlf)) +* [`3ba5de4e7`](https://github.com/npm/cli/commit/3ba5de4e7f6c5c0f995a29844926d6ed2833addd) + [#2347](https://github.com/npm/cli/issues/2347) + npm help-search + ([@nlf](https://github.com/nlf)) +* [`6caf19f49`](https://github.com/npm/cli/commit/6caf19f491e144be3e2a1a50f492dad48b01f361) + [#2348](https://github.com/npm/cli/issues/2348) + npm help + ([@nlf](https://github.com/nlf)) +* [`cb5847e32`](https://github.com/npm/cli/commit/cb5847e3203c52062485b5de68e4f6d29b33c361) + [#2349](https://github.com/npm/cli/issues/2349) + npm hook + ([@nlf](https://github.com/nlf)) +* [`996a2f6b1`](https://github.com/npm/cli/commit/996a2f6b130d6678998a2f6a5ec97d75534d5f66) + [#2353](https://github.com/npm/cli/issues/2353) + npm org + ([@nlf](https://github.com/nlf)) +* [`8c67c38a4`](https://github.com/npm/cli/commit/8c67c38a4f476ff5be938db6b6b3ee9ac6b44db5) + [#2354](https://github.com/npm/cli/issues/2354) + npm set + ([@nlf](https://github.com/nlf)) + +## 7.1.2 (2020-12-11) + +### DEPENDENCIES + +* [`c3ba1daf7`](https://github.com/npm/cli/commit/c3ba1daf7cd335d72aeba80ae0e9f9d215ca9ea5) + [#2033](https://github.com/npm/cli/issues/2033) `@npmcli/config@1.2.6`: + * Set `INIT_CWD` to initial current working directory + * Set `NODE` to initial process.execPath +* [`8029608b9`](https://github.com/npm/cli/commit/8029608b914fe5ba35a7cd37ae95ab93b0532e2e) + `json-parse-even-better-errors@2.3.1` +* [`0233818e6`](https://github.com/npm/cli/commit/0233818e606888b80881b17a2c6aca9f10a619b2) + [#2332](https://github.com/npm/cli/issues/2332) `treeverse@1.0.4` +* [`e401d6bb3`](https://github.com/npm/cli/commit/e401d6bb37ffc767b4fefe89878dd3c3ef490b2c) + `ini@1.3.8` +* [`011bb1220`](https://github.com/npm/cli/commit/011bb122035dcd43769ec35982662cca41635068) + [#2320](https://github.com/npm/cli/issues/2320) `@npmcli/arborist@2.0.1`: + * Do not save with `^` and no version + +### BUGFIXES + +* [`244c2069f`](https://github.com/npm/cli/commit/244c2069fd093f053d3061c85575ac13e72e2454) + [#2325](https://github.com/npm/cli/issues/2325) npm search + include/exclude ([@ruyadorno](https://github.com/ruyadorno)) +* [`d825e901e`](https://github.com/npm/cli/commit/d825e901eceea4cf8d860e35238dc30008eb4da4) + [#1905](https://github.com/npm/cli/issues/1905) + [#2316](https://github.com/npm/cli/issues/2316) run install scripts for + root project +* [`315449142`](https://github.com/npm/cli/commit/31544914294948085a84097af7f0f5de2a2e8f7e) + [#2331](https://github.com/npm/cli/issues/2331) + [#2021](https://github.com/npm/cli/issues/2021) Set `NODE_ENV=production` + if 'dev' is on the omit list ([@isaacs](https://github.com/isaacs)) + +### TESTING + +* [`c243e3b9d`](https://github.com/npm/cli/commit/c243e3b9d9bda0580a0fc1b3e230b4d47412176e) + [#2313](https://github.com/npm/cli/issues/2313) tests: completion + ([@nlf](https://github.com/nlf)) +* [`7ff6efbb8`](https://github.com/npm/cli/commit/7ff6efbb866591b2330b967215cef8146dff3ebf) + [#2314](https://github.com/npm/cli/issues/2314) npm team + ([@ruyadorno](https://github.com/ruyadorno)) +* [`7a4f0c96c`](https://github.com/npm/cli/commit/7a4f0c96c2ab9f264f7bda2caf7e72c881571270) + [#2323](https://github.com/npm/cli/issues/2323) npm doctor + ([@nlf](https://github.com/nlf)) + +### DOCUMENTATION + +* [`e340cf64b`](https://github.com/npm/cli/commit/e340cf64ba31ef329a9049b60c32ffd0342cfb7d) + [#2330](https://github.com/npm/cli/issues/2330) explain through + run-script ([@isaacs](https://github.com/isaacs)) + +## 7.1.1 (2020-12-08) + +### DEPENDENCIES + +* [`bf09e719c`](https://github.com/npm/cli/commit/bf09e719c7f563a255b1e9af6b1237ebc5598db6) + `@npmcli/arborist@2.0.0` + * Much stricter tree integrity guarantees + * Fix issues where the root project is a symlink, or linked as a + workspace +* [`7ceb5b728`](https://github.com/npm/cli/commit/7ceb5b728b9f326c567f5ffe5831c9eccf013aa0) + `ini@1.3.6` +* [`77c6ced2a`](https://github.com/npm/cli/commit/77c6ced2a6daaadbff715c8f05b2e61ba76e9bab) + `make-fetch-happen@8.0.11` + * Avoid caching headers that are hazardous or unnecessary to leave + lying around (authorization, npm-session, etc.) + * [#38](https://github.com/npm/make-fetch-happen/pull/38) Include query + string in cache key ([@jpb](https://github.com/jpb)) +* [`0ef25b6cd`](https://github.com/npm/cli/commit/0ef25b6cd2921794d36f066e2b11c406342cf167) + `libnpmsearch@3.1.0`: + * Update to accept query params as options, so we can paginate. + ([@nlf](https://github.com/nlf)) +* [`518a66450`](https://github.com/npm/cli/commit/518a664500bcde30475788e8c1c3e651f23e881b) + `@npmcli/config@1.2.4`: + * Do not allow path options to be set to a boolean `false` value +* [`3d7aff9d8`](https://github.com/npm/cli/commit/3d7aff9d8dd1cf29956aa306464cd44fbc2af426) + update all dependencies using latest npm to install them + +### TESTS + +* [`2848f5940`](https://github.com/npm/cli/commit/2848f594034b87939bfc5546e3e603f123d98a01) + [npm/statusboard#173](https://github.com/npm/statusboard/issues/173) + [#2293](https://github.com/npm/cli/issues/2293) npm shrinkwrap + ([@ruyadorno](https://github.com/ruyadorno)) +* [`f6824459a`](https://github.com/npm/cli/commit/f6824459ae0c86e2fa9c84b3dcec85f572ae8e1b) + [#2302](https://github.com/npm/cli/issues/2302) npm deprecate + ([@nlf](https://github.com/nlf)) +* [`b7d74b627`](https://github.com/npm/cli/commit/b7d74b627859f08fca23209d6e0d3ec6657a4489) + [npm/statusboard#180](https://github.com/npm/statusboard/issues/180) + [#2304](https://github.com/npm/cli/issues/2304) npm unpublish + ([@ruyadorno](https://github.com/ruyadorno)) + +### FEATURES + +* [`3db90d944`](https://github.com/npm/cli/commit/3db90d94474f673591811fdab5eb6a5bfdeba261) + [#2303](https://github.com/npm/cli/issues/2303) allow for passing object + keys to searchopts to allow pagination ([@nlf](https://github.com/nlf)) + +## 7.1.0 (2020-12-04) + +### FEATURES + +* [`6b1575110`](https://github.com/npm/cli/commit/6b15751106beb99234aa4bf39ae05cf40076d42a) + [#2237](https://github.com/npm/cli/pull/2237) + add `npm set-script` command + ([@Yash-Singh1](https://github.com/Yash-Singh1)) +* [`15d7333f8`](https://github.com/npm/cli/commit/15d7333f832e3d68ae16895569f27a27ef86573e) + add interactive `npm exec` + ([@isaacs](https://github.com/isaacs)) + +### BUG FIXES + +* [`2a1192e4b`](https://github.com/npm/cli/commit/2a1192e4b03acdf6e6e24e58de68f736ab9bb35f) + [#2202](https://github.com/npm/cli/pull/2202) + Do not run interactive `npm exec` in CI when a TTY + ([@isaacs](https://github.com/isaacs)) + +### DOCUMENTATION + +* [`0599cc37d`](https://github.com/npm/cli/commit/0599cc37df453bf79d47490eb4fca3cd63f67f80) + [#2271](https://github.com/npm/cli/pull/2271) + don't wrap code block + ([@ethomson](https://github.com/ethomson)) + +### DEPENDENCIES + +* [`def85c726`](https://github.com/npm/cli/commit/def85c72640ffe2d27977c56b7aa06c6f6346ca9) + `@npmcli/arborist@1.0.14` + * fixes running `npm exec` from file system root folder +* [`4c94673ab`](https://github.com/npm/cli/commit/4c94673ab5399d27e5a48e52f7a65b038a456265) + `semver@7.3.4` + +## 7.0.15 (2020-11-27) + +### DEPENDENCIES + +* [`00e6028ef`](https://github.com/npm/cli/commit/00e6028ef83bf76eaae10241fd7ba59e39768603) + `@npmcli/arborist@1.0.13` + * do not override user-defined shorthand values when saving `package.json` + +### BUG FIXES + +* [`9c3413fbc`](https://github.com/npm/cli/commit/9c3413fbcb37e79fc0b3d980e0b5810d7961277c) + [#2034](https://github.com/npm/cli/issues/2034) + [#2245](https://github.com/npm/cli/issues/2245) + `npm link ` should not save `package.json` + ([@ruyadorno](https://github.com/ruyadorno)) + +### DOCUMENTATION + +* [`1875347f9`](https://github.com/npm/cli/commit/1875347f9f4f2b50c28fe8857c5533eeebf42da2) + [#2196](https://github.com/npm/cli/issues/2196) + remove doc on obsolete `unsafe-perm` flag + ([@kaizhu256](https://github.com/kaizhu256)) +* [`f51e50603`](https://github.com/npm/cli/commit/f51e5060340c783a8a00dadd98e5786960caf43f) + [#2200](https://github.com/npm/cli/issues/2200) + `config.md` cleanup + ([@alexwoollam](https://github.com/alexwoollam)) +* [`997cbdb40`](https://github.com/npm/cli/commit/997cbdb400bcd22e457e8a06b69a7be697cfd66d) + [#2238](https://github.com/npm/cli/issues/2238) + Fix broken link to `package.json` documentation + ([@d-fischer](https://github.com/d-fischer)) +* [`9da972dc4`](https://github.com/npm/cli/commit/9da972dc44c21cf0e337f1c3fca44eb9df3e40d5) + [#2241](https://github.com/npm/cli/issues/2241) + `npm star` docs cleanup + ([@ruyadorno](https://github.com/ruyadorno)) + +## 7.0.14 (2020-11-23) + +### DEPENDENCIES +* [`09d21ab90`](https://github.com/npm/cli/commit/09d21ab903dcfebdfd446b8b29ad46c425b6510e) + `@npmcli/run-script@1.8.1` + - fix a regression in how scripts are escaped + +## 7.0.13 (2020-11-20) + +### BUG FIXES +* [`5fc56b6db`](https://github.com/npm/cli/commit/5fc56b6dbcc7d7d1463a761abb67d2fc16ad3657) + [npm/statusboard#174](https://github.com/npm/statusboard/issues/174) + [#2204](https://github.com/npm/cli/issues/2204) + fix npm unstar command + ([@ruyadorno](https://github.com/ruyadorno)) +* [`7842b4d4d`](https://github.com/npm/cli/commit/7842b4d4dca1e076b0d26d554f9dce67484cd7be) + [npm/statusboard#182](https://github.com/npm/statusboard/issues/182) + [#2205](https://github.com/npm/cli/issues/2205) + fix npm version usage output + ([@ruyadorno](https://github.com/ruyadorno)) +* [`a0adbf9f8`](https://github.com/npm/cli/commit/a0adbf9f8f77531fcf81ae31bbc7102698765ee3) + [#2206](https://github.com/npm/cli/issues/2206) + [#2213](https://github.com/npm/cli/issues/2213) + fix: fix flatOptions usage in npm init + ([@ruyadorno](https://github.com/ruyadorno)) + +### DEPENDENCIES + +* [`3daaf000a`](https://github.com/npm/cli/commit/3daaf000aee0ba81af855977d7011850e79099e6) + `@npmcli/arborist@1.0.12` + - fixes some windows specific bugs in how paths are handled and compared + +### DOCUMENTATION + +* [`084a7b6ad`](https://github.com/npm/cli/commit/084a7b6ad6eaf9f2d92eb05da93e745f5357cce2) + [#2210](https://github.com/npm/cli/issues/2210) + docs: Fix typo + ([@HollowMan6](https://github.com/HollowMan6)) + +## 7.0.12 (2020-11-17) + +### BUG FIXES + +* [`7b89576bd`](https://github.com/npm/cli/commit/7b89576bd1fa557a312a841afa66b895558d1b12) + [#2174](https://github.com/npm/cli/issues/2174) + fix running empty scripts with `npm run-script` + ([@nlf](https://github.com/nlf)) +* [`bc9afb195`](https://github.com/npm/cli/commit/bc9afb195f5aad7c06bc96049c0f00dc8e752dee) + [#2002](https://github.com/npm/cli/issues/2002) + [#2184](https://github.com/npm/cli/issues/2184) + Preserve builtin conf when installing npm globally + ([@isaacs](https://github.com/isaacs)) + +### DEPENDENCIES + +* [`b74c05d88`](https://github.com/npm/cli/commit/b74c05d88dc48fabef031ea66ffaa4e548845655) + `@npmcli/run-script@1.8.0` + * fix windows command-line argument escaping + +### DOCUMENTATION + +* [`4e522fdc9`](https://github.com/npm/cli/commit/4e522fdc917bc85af2ca8ff7669a0178e2f35123) + [#2179](https://github.com/npm/cli/issues/2179) + remove mention to --parseable option from `npm audit` docs + ([@Primajin](https://github.com/Primajin)) + +## 7.0.11 (2020-11-13) + +### DEPENDENCIES + +* [`629a667a9`](https://github.com/npm/cli/commit/629a667a9b30b0b870075da965606979622a5e2e) + `eslint@7.13.0` +* [`de9891bd2`](https://github.com/npm/cli/commit/de9891bd2a16fe890ff5cfb140c7b1209aeac0de) + `eslint-plugin-standard@4.1.0` +* [`c3e7aa31c`](https://github.com/npm/cli/commit/c3e7aa31c565dfe21cd1f55a8433bfbcf58aa289) + [#2123](https://github.com/npm/cli/issues/2123) + [#1957](https://github.com/npm/cli/issues/1957) + `@npmcli/arborist@1.0.11` + +### BUG FIXES + +* [`a8aa38513`](https://github.com/npm/cli/commit/a8aa38513ad5c4ad44e6bb3e1499bfc40c31e213) + [#2134](https://github.com/npm/cli/issues/2134) + [#2156](https://github.com/npm/cli/issues/2156) + Fix `cannot read property length of undefined` in `ERESOLVE` explanation code + ([@isaacs](https://github.com/isaacs)) +* [`1dbf0f9bb`](https://github.com/npm/cli/commit/1dbf0f9bb26ba70f4c6d0a807701d7652c31d7d4) + [#2150](https://github.com/npm/cli/issues/2150) + [#2155](https://github.com/npm/cli/issues/2155) + send json errors to stderr, not stdout + ([@isaacs](https://github.com/isaacs)) +* [`fd1d7a21b`](https://github.com/npm/cli/commit/fd1d7a21b247bb35d112c51ff8d8a06fd83c8b44) + [#1927](https://github.com/npm/cli/issues/1927) + [#2154](https://github.com/npm/cli/issues/2154) + Set process.title a bit more usefully + ([@isaacs](https://github.com/isaacs)) +* [`2a80c67ef`](https://github.com/npm/cli/commit/2a80c67ef8c12c3d9d254f5be6293a6461067d99) + [#2008](https://github.com/npm/cli/issues/2008) + [#2153](https://github.com/npm/cli/issues/2153) + Support legacy auth tokens for registries that use them + ([@ruyadorno](https://github.com/ruyadorno)) +* [`786e36404`](https://github.com/npm/cli/commit/786e36404068fd51657ddac766e066a98754edbf) + [#2017](https://github.com/npm/cli/issues/2017) + [#2159](https://github.com/npm/cli/issues/2159) + pass all options to Arborist for `npm ci` + ([@darcyclarke](https://github.com/darcyclarke)) +* [`b47ada7d1`](https://github.com/npm/cli/commit/b47ada7d1623e9ee586ee0cf781ee3ac5ea3c223) + [#2161](https://github.com/npm/cli/issues/2161) + fixed typo + ([@scarabedore](https://github.com/scarabedore)) + +## 7.0.10 (2020-11-10) + +### DOCUMENTATION + +* [`e48badb03`](https://github.com/npm/cli/commit/e48badb03058286a557584d7319db4143049cc6b) + [#2148](https://github.com/npm/cli/issues/2148) + Fix link in documentation + ([@gurdiga](https://github.com/gurdiga)) + +### BUG FIXES + +* [`8edbbdc70`](https://github.com/npm/cli/commit/8edbbdc706694fa32f52d0991c76ae9f207b7bbc) + [#1972](https://github.com/npm/cli/issues/1972) + Support exec auto pick bin when all bin is alias + ([@dr-js](https://github.com/dr-js)) + +### DEPENDENCIES + +* [`04a3e8c10`](https://github.com/npm/cli/commit/04a3e8c10c3f38e1c7a35976d77c2929bdc39868) + [#1962](https://github.com/npm/cli/issues/1962) + `@npmcli/arborist@1.0.10`: + * prevent self-assignment of parent/fsParent + * Support update options in global package space + +## 7.0.9 (2020-11-06) + +### BUG FIXES + +* [`96a0d2802`](https://github.com/npm/cli/commit/96a0d2802d3e619c6ea47290f5c460edfe94070a) + default the 'start' script when server.js present + ([@isaacs](https://github.com/isaacs)) +* [`7716e423e`](https://github.com/npm/cli/commit/7716e423ee92a81730c0dfe5b9ecb4bb41a3f947) + [#2075](https://github.com/npm/cli/issues/2075) + [#2071](https://github.com/npm/cli/issues/2071) print the registry when + using 'npm login' ([@Wicked7000](https://github.com/Wicked7000)) +* [`7046fe10c`](https://github.com/npm/cli/commit/7046fe10c5035ac57246a31ca8a6b09e3f5562bf) + [#2122](https://github.com/npm/cli/issues/2122) tests for `npm cache` + command ([@nlf](https://github.com/nlf)) + +### DEPENDENCIES + +* [`74325f53b`](https://github.com/npm/cli/commit/74325f53b9d813b0e42203c037189418fad2f64a) + [#2124](https://github.com/npm/cli/issues/2124) + `@npmcli/run-script@1.7.5`: + * Export the `isServerPackage` method + * Proxy signals to and from foreground child processes +* [`0e58e6f6b`](https://github.com/npm/cli/commit/0e58e6f6b8f0cd62294642a502c17561aaf46553) + [#1984](https://github.com/npm/cli/issues/1984) + [#2079](https://github.com/npm/cli/issues/2079) + [#1923](https://github.com/npm/cli/issues/1923) + [#606](https://github.com/npm/cli/issues/606) + [#2031](https://github.com/npm/cli/issues/2031) `@npmcli/arborist@1.0.9`: + * Process deps for all link nodes + * Use junctions instead of symlinks + * Use @npmcli/move-file instead of fs.rename +* [`1dad328a1`](https://github.com/npm/cli/commit/1dad328a17d93def7799545596b4eba9833b35aa) + [#1865](https://github.com/npm/cli/issues/1865) + [#2106](https://github.com/npm/cli/issues/2106) + [#2084](https://github.com/npm/cli/issues/2084) `pacote@11.1.13`: + * Properly set the installation command for `prepare` scripts when + installing git/dir deps +* [`e090d706c`](https://github.com/npm/cli/commit/e090d706ca637d4df96d28bff1660590aa3f3b62) + [#2097](https://github.com/npm/cli/issues/2097) `libnpmversion@1.0.7`: + * Do not crash when the package.json file lacks a 'version' field +* [`8fa541a10`](https://github.com/npm/cli/commit/8fa541a10dbdc09376175db7a378cc9b33e8b17b) + `cmark-gfm@0.8.4` + +## 7.0.8 (2020-11-03) + +### DOCUMENTATION + +* [`052e977b9`](https://github.com/npm/cli/commit/052e977b9d071e1b3654976881d10cd3ddcba788) + [#1822](https://github.com/npm/cli/issues/1822) + [#1247](https://github.com/npm/cli/issues/1247) + add section on peerDependenciesMeta field in package.json + ([@foxxyz](https://github.com/foxxyz)) +* [`52d32d175`](https://github.com/npm/cli/commit/52d32d1758c5ebc58944a1e8d98d57e30048e527) + [#1970](https://github.com/npm/cli/issues/1970) + match npm-exec.md -p usage with lib/exec.js + ([@dr-js](https://github.com/dr-js)) +* [`48ee8d01e`](https://github.com/npm/cli/commit/48ee8d01edd11ed6186c483e1169ff4d2070b963) + [#2096](https://github.com/npm/cli/issues/2096) + Fix RFC links in changelog + ([@jtojnar](https://github.com/jtojnar)) + + +### BUG FIXES + +* [`6cd3cd08a`](https://github.com/npm/cli/commit/6cd3cd08af56445e13757cac3af87f3e7d54ed27) + Support *all* conf keys in publishConfig +* [`a1f9be8a7`](https://github.com/npm/cli/commit/a1f9be8a7f9b7a3a813fc3e5e705bc982470b0e2) + [#2074](https://github.com/npm/cli/issues/2074) + Support publishing any kind of spec, not just directories + +### DEPENDENCIES + +* [`545382df6`](https://github.com/npm/cli/commit/545382df62e3014f3e51d7034e52498fb2b01a37) + `libnpmpublish@4.0.0`: + * Support publishing things other than folders +* [`7d88f1719`](https://github.com/npm/cli/commit/7d88f17197e3c8cca9b277378d6f9b054b1b7886) + `npm-registry-fetch@9.0.0` +* [`823b40a4e`](https://github.com/npm/cli/commit/823b40a4e9c6ef76388af6fe01a3624f6f7675be) + `pacote@11.1.12` +* [`90bf57826`](https://github.com/npm/cli/commit/90bf57826edf2f78ddf8deb0793115ead8a8b556) + `npm-profile@5.0.2` +* [`e5a413577`](https://github.com/npm/cli/commit/e5a4135770d13cf114fac439167637181f87d824) + `libnpmteam@2.0.2` +* [`fc5aa7b4a`](https://github.com/npm/cli/commit/fc5aa7b4ad45cb65893f734e1229a6720f7966e5) + `libnpmsearch@3.0.1` +* [`9fc1dee13`](https://github.com/npm/cli/commit/9fc1dee138ca33ecdbd57e63142b27c60cf88f9b) + `libnpmorg@2.0.1` +* [`0ea870ec5`](https://github.com/npm/cli/commit/0ea870ec5d2be1d44f050ad8bc24ed936cc45fde) + `libnpmhook@6.0.1` +* [`32fd744ea`](https://github.com/npm/cli/commit/32fd744ea745f297f0be79a80955f077a57c4ac7) + `libnpmaccess@4.0.1` +* [`fc76f3d9f`](https://github.com/npm/cli/commit/fc76f3d9fcf19e65a9373ab3d9068c4326d2f782) + `@npmcli/arborist@1.0.8` + * Fix `cannot read property 'description' of undefined` in `npm ls` + when `package-lock.json` is corrupted + * Do not allow peerDependencies to be nested under dependents in any + circumstances + * Always resolve peerDependencies in `--prefer-dedupe` mode + +## 7.0.7 (2020-10-30) + +### BUG FIXES + +* [`3990b422d`](https://github.com/npm/cli/commit/3990b422d3ff63c54d96b61596bdb8f26a45ca7b) + [#2067](https://github.com/npm/cli/pull/2067) + use sh as default unix shell, not bash + ([@isaacs](https://github.com/isaacs)) +* [`81d6ceef6`](https://github.com/npm/cli/commit/81d6ceef6947e46355eb3ddb05a73da50870dfc1) + [#1975](https://github.com/npm/cli/issues/1975) + fix npm exec on folders missing package.json + ([@ruyadorno](https://github.com/ruyadorno)) +* [`2a680e91a`](https://github.com/npm/cli/commit/2a680e91a2be1f3f03a6fbd946f74628ee1cb370) + [#2083](https://github.com/npm/cli/pull/2083) + delete the contents of `node_modules` only in `npm ci` + ([@nlf](https://github.com/nlf)) +* [`2636fe1f4`](https://github.com/npm/cli/commit/2636fe1f45383cb1b6fc164564dc49318815db37) + [#2086](https://github.com/npm/cli/pull/2086) + disable banner output if loglevel is silent in `npm run-script` + ([@macno](https://github.com/macno)) + +### DEPENDENCIES + +* [`4156f053e`](https://github.com/npm/cli/commit/4156f053ee8712a4b53a210e62fba1e6562ba43a) + `@npmcli/run-script@1.7.4` + * restore the default `npm start` script +* [`1900ae9ad`](https://github.com/npm/cli/commit/1900ae9adecd227dd6f8b49de61a99c978ba89cf) + `@npmcli/promise-spawn@1.3.2` + * fix errors when processing scripts as root +* [`8cb0c166c`](https://github.com/npm/cli/commit/8cb0c166ccc019146a7a94d13c12723f001d2551) + `@npmcli/arborist@1.0.6` + * make sure missing bin links get set on reify + +## 7.0.6 (2020-10-27) + +### BUG FIXES + +* [`46c7f792a`](https://github.com/npm/cli/commit/46c7f792ab16dd0b091e1ad6d37de860c8885883) + [#2047](https://github.com/npm/cli/pull/2047) + [#1935](https://github.com/npm/cli/issues/1935) + skip the prompt when in a known ci environment + ([@nlf](https://github.com/nlf)) +* [`f8f6e1fad`](https://github.com/npm/cli/commit/f8f6e1fad8057edc02e4ce4382b1bc086d01211c) + [#2049](https://github.com/npm/cli/pull/2049) + properly remove pycache in release script + ([@MylesBorins](https://github.com/MylesBorins)) +* [`5db95b393`](https://github.com/npm/cli/commit/5db95b393e9c461ad34c1774f3515c322bf375bf) + [#2050](https://github.com/npm/cli/pull/2050) + pack: do not show individual files of bundled deps + ([@isaacs](https://github.com/isaacs)) +* [`3ee8f3b34`](https://github.com/npm/cli/commit/3ee8f3b34055da2ef1e735e1a06f64593512f1e3) + [#2051](https://github.com/npm/cli/pull/2051) + view: Better errors when package.json is not JSON + ([@isaacs](https://github.com/isaacs)) + +### DEPENDENCIES + +* [`99ae633f6`](https://github.com/npm/cli/commit/99ae633f6ccc8aa93dc3dcda863071658b0653db) + `libnpmversion@1.0.6` + - respect gitTagVersion = false +* [`d4173f58d`](https://github.com/npm/cli/commit/d4173f58ddefdd5456145f34f3c9f4ba5fca407e) + `@npmcli/promise-spawn@1.3.1` + - do not return empty buffer when stdio is inherited + - attach child process to returned promise +* [`c09380fa5`](https://github.com/npm/cli/commit/c09380fa51b720141a9971602f4bb7aabd4d6242) + `@npmcli/run-script@1.7.3` + - forward SIGINT and SIGTERM to children that inherit stdio +* [`b154861ad`](https://github.com/npm/cli/commit/b154861ad244b6a14020c43738d0cce1948bfdd3) + `@npmcli/arborist@1.0.5` +* [`ffea6596b`](https://github.com/npm/cli/commit/ffea6596b8653da32a2b4c9a4903970e7146eee4) + `agent-base@6.0.2` + - support http proxy for https registries + +## 7.0.5 (2020-10-23) + +* [`77ad86b5e`](https://github.com/npm/cli/commit/77ad86b5eedf139dda3329a6686d5f104dc233bb) + Merge docs deps with main project + +## 7.0.4 (2020-10-23) + +### DOCUMENTATION + +* [`cc026daf8`](https://github.com/npm/cli/commit/cc026daf8c8330256de01375350a1407064562f9) + docs: `npm-dedupe` through `npm-install` +* [`aec77acf8`](https://github.com/npm/cli/commit/aec77acf886d73f85e747cafdf7a2b360befba16) + [#1915](https://github.com/npm/cli/pull/1915) + use "dockhand" for faster static documentation generation + ([@ethomson](https://github.com/ethomson)) +* [`aeb10d210`](https://github.com/npm/cli/commit/aeb10d210816cf6829e0ac557c79d9efd8c4bdd1) + [#2024](https://github.com/npm/cli/pull/2024) + Fix post-install script name + ([@irajtaghlidi](https://github.com/irajtaghlidi)) + +### BUG FIXES + +* [`59e8dd6c6`](https://github.com/npm/cli/commit/59e8dd6c621f9a5c6e0b65533d8256be87a8e0d3) + [#2015](https://github.com/npm/cli/issues/2015) + [#2016](https://github.com/npm/cli/pull/2016) + Properly set `npm_command` environment variable. + +### TESTS + +* [`39ad1ad9e`](https://github.com/npm/cli/commit/39ad1ad9e1e1a9530db5b90a588b5081b71abc8d) + [#2001](https://github.com/npm/cli/pull/2001) + `npm config` tests + ([@ruyadorno](https://github.com/ruyadorno)) +* [`b9c1caa8e`](https://github.com/npm/cli/commit/b9c1caa8e4cc7c900d09657425ea361db5974319) + [#2026](https://github.com/npm/cli/pull/2026) + `npm owner` test and refactor + ([@ruyadorno](https://github.com/ruyadorno)) + +### DEPENDENCIES + +* [`ed6e6a9d3`](https://github.com/npm/cli/commit/ed6e6a9d3c36ffc5fb77fc25b6d66dbcb26beeb9) + `eslint-plugin-standard@4.0.2` +* [`b737ee999`](https://github.com/npm/cli/commit/b737ee99961364827bacf210a3e5ca5d2b7edad2) + [#2009](https://github.com/npm/cli/issues/2009) + [#2007](https://github.com/npm/cli/issues/2007) + `npm-packlist@2.1.4`: + + * Maintain order in package.json files array globs + * Strip slashes from package files list results + +* [`783965508`](https://github.com/npm/cli/commit/783965508d49f8ab0d8ceff38bee700cd0a06a54) + [#1997](https://github.com/npm/cli/issues/1997) + [#2000](https://github.com/npm/cli/issues/2000) + [#2005](https://github.com/npm/cli/issues/2005) + `@npmcli/arborist@1.0.4` + + * Ensure that root is added when root.meta is set + * Include all edges in explain() output when a root edge exists + * Do not conflict on meta-peers that will not be replaced + * Install peerOptionals if explicitly requested, or dev + +## 7.0.3 (2020-10-20) + +### BUG FIXES + +* [`ce4724a38`](https://github.com/npm/cli/commit/ce4724a3835ded9a4a29d8d67323f925461155e5) + [#1986](https://github.com/npm/cli/pull/1986) + check `result` when determining exit code of `ls ` + ([@G-Rath](https://github.com/G-Rath)) +* [`00d926f8d`](https://github.com/npm/cli/commit/00d926f8d884872d08d9a0cd73aa9cace2acb91b) + [#1987](https://github.com/npm/cli/pull/1987) + don't suppress run output when `--silent` is passed + ([@G-Rath](https://github.com/G-Rath)) +* [`043da2347`](https://github.com/npm/cli/commit/043da234745f36d55742e827314837dead5807ab) + improve cache clear error message + ([@isaacs](https://github.com/isaacs)) + +### DOCUMENTATION + +* [`a57f5c466`](https://github.com/npm/cli/commit/a57f5c466ceae59575ef05bb7941cce8752d8c58) + update docs for: access, adduser, audit, bin, bugs, build, cache, ci, + completion, config and dedupe + ([@isaacs](https://github.com/isaacs)) +* [`5b88b72b9`](https://github.com/npm/cli/commit/5b88b72b9821f7114cc4e475bbf52726a1674e52) + remove the long-gone bundle command + ([@isaacs](https://github.com/isaacs)) +* [`ae09aa5c1`](https://github.com/npm/cli/commit/ae09aa5c1cd150727b05ccfaeaba8d45e5697e50) + [#1993](https://github.com/npm/cli/pull/1993) + document --save-peer as a common option to npm install + ([@JakeChampion](https://github.com/JakeChampion)) +* [`c9993e6b1`](https://github.com/npm/cli/commit/c9993e6b1c2918699c2d125bf9b966f44f5d3ebe) + [#1982](https://github.com/npm/cli/pull/1982) + fix url links for init-package-json/node-semver + ([@takenspc](https://github.com/takenspc)) + +### DEPENDENCIES + +* [`5d9df8395`](https://github.com/npm/cli/commit/5d9df83958d3d5e6d8acad2ebabfbe5f3fd23c13) + `node-gyp@7.1.2` + ## 7.0.2 (2020-10-16) ### DOCUMENTATION @@ -345,7 +1049,7 @@ * fix package.json dependencies order * [`49b2bf5a7`](https://github.com/npm/cli/commit/49b2bf5a798b49d52166744088a80b8a39ccaeb6) `@npmcli/config@1.1.8` - * fix unkown envs to be passed through + * fix unknown envs to be passed through * fix setting correct globalPrefix on load * [`f9aac351d`](https://github.com/npm/cli/commit/f9aac351dd36a19d14e1f951a2e8e20b41545822) `libnpmversion@1.0.5` @@ -429,7 +1133,7 @@ sources ([@ruyadorno](https://github.com/ruyadorno)) * [`3a63ecb6f`](https://github.com/npm/cli/commit/3a63ecb6f6a0b235660f73a3ffa329b1f131b0c3) [#1718](https://github.com/npm/cli/pull/1718) - [RFC-0029](https://github.com/npm/rfcs/blob/latest/accepted/0029-add-ability-to-skip-hooks.md) + [RFC-0029](https://github.com/npm/rfcs/blob/latest/implemented/0029-add-ability-to-skip-hooks.md) add ability to skip pre/post hooks to `npm run-script` by using `--ignore-scripts` ([@ruyadorno](https://github.com/ruyadorno)) @@ -656,7 +1360,7 @@ Now on to the list of **BREAKING CHANGES**! ### Programmatic Usage - [RFC - 20](https://github.com/npm/rfcs/blob/latest/accepted/0020-npm-option-handling.md) + 20](https://github.com/npm/rfcs/blob/latest/implemented/0020-npm-option-handling.md) The CLI and its dependencies no longer use the `figgy-pudding` library for configs. Configuration is done using a flat plain old JavaScript object. @@ -686,7 +1390,7 @@ The environment for lifecycle scripts (eg, build scripts, `npm test`, etc.) has changed. - [RFC - 21](https://github.com/npm/rfcs/blob/latest/accepted/0021-reduce-lifecycle-script-environment.md) + 21](https://github.com/npm/rfcs/blob/latest/implemented/0021-reduce-lifecycle-script-environment.md) Environment no longer includes `npm_package_*` fields, or `npm_config_*` fields for default configs. `npm_package_json`, `npm_package_integrity`, `npm_package_resolved`, and `npm_command` environment variables added. @@ -695,13 +1399,13 @@ has changed. release](https://github.com/npm/rfcs/pull/183)) - [RFC - 22](https://github.com/npm/rfcs/blob/latest/accepted/0022-quieter-install-scripts.md) + 22](https://github.com/npm/rfcs/blob/latest/implemented/0022-quieter-install-scripts.md) Scripts run during the normal course of installation are silenced unless they exit in error (ie, with a signal or non-zero exit status code), and are for a non-optional dependency. - [RFC - 24](https://github.com/npm/rfcs/blob/latest/accepted/0024-npm-run-traverse-directory-tree.md) + 24](https://github.com/npm/rfcs/blob/latest/implemented/0024-npm-run-traverse-directory-tree.md) `PATH` environment variable includes all `node_modules/.bin` folders, even if found outside of an existing `node_modules` folder hierarchy. @@ -751,7 +1455,7 @@ We do intend to continue supporting the `npx` that npm ships; just not the ### Files On Disk - [RFC - 13](https://github.com/npm/rfcs/blob/latest/accepted/0013-no-package-json-_fields.md) + 13](https://github.com/npm/rfcs/blob/latest/implemented/0013-no-package-json-_fields.md) Installed `package.json` files no longer are mutated to include extra metadata. (This extra metadata is stored in the lockfile.) - `package-lock.json` is updated to a newer format, using @@ -767,7 +1471,7 @@ These changes affect `install`, `ci`, `install-test`, `install-ci-test`, `update`, `prune`, `dedupe`, `uninstall`, `link`, and `audit fix`. - [RFC - 25](https://github.com/npm/rfcs/blob/latest/accepted/0025-install-peer-deps.md) + 25](https://github.com/npm/rfcs/blob/latest/implemented/0025-install-peer-deps.md) `peerDependencies` are installed by default. This behavior can be disabled by setting the `legacy-peer-deps` configuration flag. @@ -778,7 +1482,7 @@ These changes affect `install`, `ci`, `install-test`, `install-ci-test`, of correctness. Use the `--legacy-peer-deps` config flag if impacted. - [RFC - 23](https://github.com/npm/rfcs/blob/latest/accepted/0023-acceptDependencies.md) + 23](https://github.com/npm/rfcs/blob/latest/implemented/0023-acceptDependencies.md) Support for `acceptDependencies` is added. This can result in dependency resolutions that previous versions of npm will incorrectly flag as invalid. @@ -800,7 +1504,7 @@ These changes affect `install`, `ci`, `install-test`, `install-ci-test`, ### Workspaces - [RFC - 26](https://github.com/npm/rfcs/blob/latest/accepted/0026-workspaces.md) + 26](https://github.com/npm/rfcs/blob/latest/implemented/0026-workspaces.md) First phase of `workspaces` support is added. This changes npm's behavior when a root project's `package.json` file contains a `workspaces` field. @@ -808,7 +1512,7 @@ These changes affect `install`, `ci`, `install-test`, `install-ci-test`, ### `npm update` - [RFC - 19](https://github.com/npm/rfcs/blob/latest/accepted/0019-remove-update-depth-option.md) + 19](https://github.com/npm/rfcs/blob/latest/implemented/0019-remove-update-depth-option.md) Update all dependencies when `npm update` is run without any arguments. As it is no longer relevant, `--depth` config flag removed from `npm update`. @@ -816,7 +1520,7 @@ These changes affect `install`, `ci`, `install-test`, `install-ci-test`, ### `npm outdated` - [RFC - 27](https://github.com/npm/rfcs/blob/latest/accepted/0027-remove-depth-outdated.md) + 27](https://github.com/npm/rfcs/blob/latest/implemented/0027-remove-depth-outdated.md) Remove `--depth` config from `npm outdated`. Only top-level dependencies are shown, unless `--all` config option is set. diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 973934e80b6dc1..4c96615203b026 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -4,12 +4,17 @@ SHELL = bash PUBLISHTAG = $(shell node scripts/publish-tag.js) BRANCH = $(shell git rev-parse --abbrev-ref HEAD) -markdowns = $(shell find docs -name '*.md' | grep -v 'index') README.md +markdowns = $(shell find docs -name '*.md' | grep -v 'index') -cli_mandocs = $(shell find docs/content/cli-commands -name '*.md' \ +# these docs have the @VERSION@ tag in them, so they have to be rebuilt +# whenever the package.json is touched, in case the version changed. +version_mandocs = $(shell grep -rl '@VERSION@' docs/content \ + |sed 's|.md|.1|g' \ + |sed 's|docs/content/commands/|man/man1/|g' ) + +cli_mandocs = $(shell find docs/content/commands -name '*.md' \ |sed 's|.md|.1|g' \ - |sed 's|docs/content/cli-commands/|man/man1/|g' ) \ - man/man1/npm-README.1 + |sed 's|docs/content/commands/|man/man1/|g' ) files_mandocs = $(shell find docs/content/configuring-npm -name '*.md' \ |sed 's|.md|.5|g' \ @@ -23,63 +28,29 @@ mandocs = $(cli_mandocs) $(files_mandocs) $(misc_mandocs) all: docs -latest: - @echo "Installing latest published npm" - @echo "Use 'make install' or 'make link' to install the code" - @echo "in this folder that you're looking at right now." - node bin/npm-cli.js install -g -f npm ${NPMOPTS} - -install: all - node bin/npm-cli.js install -g -f ${NPMOPTS} $(shell node bin/npm-cli.js pack | tail -1) - -# backwards compat -dev: install - -link: uninstall - node bin/npm-cli.js link -f - -clean: markedclean marked-manclean docs-clean - rm -rf npmrc - node bin/npm-cli.js cache clean --force - -uninstall: - node bin/npm-cli.js rm npm -g -f - -mandocs: $(mandocs) +docs: mandocs htmldocs -htmldocs: - cd docs && node ../bin/npm-cli.js install --legacy-peer-deps --no-audit && \ - node ../bin/npm-cli.js run build:static >&2 && \ - rm -rf node_modules .cache public/*js public/*json public/404* public/page-data public/manifest* +mandocs: dev-deps $(mandocs) -docs: mandocs htmldocs +$(version_mandocs): package.json -markedclean: - rm -rf node_modules/marked node_modules/.bin/marked .building_marked +htmldocs: dev-deps + node bin/npm-cli.js rebuild + cd docs && node dockhand.js >&2 -marked-manclean: - rm -rf node_modules/marked-man node_modules/.bin/marked-man .building_marked-man +clean: docs-clean gitclean docsclean: docs-clean + docs-clean: - rm -rf \ - .building_marked \ - .building_marked-man \ - man \ - docs/node_modules \ - docs/public \ - docs/.cache - -## build-time tools for the documentation -build-doc-tools := node_modules/.bin/marked \ - node_modules/.bin/marked-man - -# use `npm install marked-man` for this to work. -man/man1/npm-README.1: README.md scripts/docs-build.js package.json $(build-doc-tools) - @[ -d man/man1 ] || mkdir -p man/man1 - node scripts/docs-build.js $< $@ + rm -rf man -man/man1/%.1: docs/content/cli-commands/%.md scripts/docs-build.js package.json $(build-doc-tools) +## build-time dependencies for the documentation +dev-deps: + node bin/npm-cli.js install --only=dev --no-audit --ignore-scripts + +## targets for man files, these are encouraged to be only built by running `make docs` or `make mandocs` +man/man1/%.1: docs/content/commands/%.md scripts/docs-build.js @[ -d man/man1 ] || mkdir -p man/man1 node scripts/docs-build.js $< $@ @@ -89,47 +60,41 @@ man/man5/npm-json.5: man/man5/package.json.5 man/man5/npm-global.5: man/man5/folders.5 cp $< $@ -man/man5/%.5: docs/content/configuring-npm/%.md scripts/docs-build.js package.json $(build-doc-tools) +man/man5/%.5: docs/content/configuring-npm/%.md scripts/docs-build.js @[ -d man/man5 ] || mkdir -p man/man5 node scripts/docs-build.js $< $@ -man/man7/%.7: docs/content/using-npm/%.md scripts/docs-build.js package.json $(build-doc-tools) +man/man7/%.7: docs/content/using-npm/%.md scripts/docs-build.js @[ -d man/man7 ] || mkdir -p man/man7 node scripts/docs-build.js $< $@ -marked: node_modules/.bin/marked - -node_modules/.bin/marked: - node bin/npm-cli.js install marked --no-global --no-timing --no-save - -marked-man: node_modules/.bin/marked-man - -node_modules/.bin/marked-man: - node bin/npm-cli.js install marked-man --no-global --no-timing --no-save - -test: docs +test: dev-deps node bin/npm-cli.js test -tag: - node bin/npm-cli.js tag npm@$(PUBLISHTAG) latest - ls-ok: - node . ls >/dev/null + node . ls --production >/dev/null gitclean: git clean -fd -publish: gitclean ls-ok link docs-clean docs +uninstall: + node bin/npm-cli.js rm -g -f npm + +link: uninstall + node bin/npm-cli.js link -f --ignore-scripts + +prune: + node bin/npm-cli.js prune --production --no-save --no-audit + @[[ "$(shell git status -s)" != "" ]] && echo "ERR: found unpruned files" && exit 1 || echo "git status is clean" + + +publish: gitclean ls-ok link test docs prune @git push origin :v$(shell node bin/npm-cli.js --no-timing -v) 2>&1 || true git push origin $(BRANCH) &&\ git push origin --tags &&\ node bin/npm-cli.js publish --tag=$(PUBLISHTAG) -release: gitclean ls-ok markedclean marked-manclean docs-clean docs - node bin/npm-cli.js prune --production --no-save +release: gitclean ls-ok docs prune @bash scripts/release.sh -sandwich: - @[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || (echo "make it yourself" && exit 13) - -.PHONY: all latest install dev link docs clean uninstall test man docs-clean docclean release ls-ok realclean +.PHONY: all latest install dev link docs clean uninstall test man docs-clean docsclean release ls-ok dev-deps prune diff --git a/deps/npm/README.md b/deps/npm/README.md index 05da169f259619..3366c4b271f739 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -150,6 +150,8 @@ you should [read this](https://docs.npmjs.com/misc/developers). When you find issues, please report them: * web: + +* archived web: Be sure to include *all* of the output from the npm command that didn't work diff --git a/deps/npm/bin/node-gyp-bin/node-gyp.cmd b/deps/npm/bin/node-gyp-bin/node-gyp.cmd index 083c9c58a502a1..1ef2ae0c68fc4b 100755 --- a/deps/npm/bin/node-gyp-bin/node-gyp.cmd +++ b/deps/npm/bin/node-gyp-bin/node-gyp.cmd @@ -1,5 +1,5 @@ -if not defined npm_config_node_gyp ( - node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* -) else ( +if not defined npm_config_node_gyp ( + node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* +) else ( node "%npm_config_node_gyp%" %* -) +) diff --git a/deps/npm/bin/npm.cmd b/deps/npm/bin/npm.cmd index 880554dcdd686e..f111c59d1efb6e 100755 --- a/deps/npm/bin/npm.cmd +++ b/deps/npm/bin/npm.cmd @@ -1,19 +1,19 @@ -:: Created by npm, please don't edit manually. -@ECHO OFF - -SETLOCAL - -SET "NODE_EXE=%~dp0\node.exe" -IF NOT EXIST "%NODE_EXE%" ( - SET "NODE_EXE=node" -) - -SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" -FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( - SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" -) -IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( - SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" -) - -"%NODE_EXE%" "%NPM_CLI_JS%" %* +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/deps/npm/bin/npx.cmd b/deps/npm/bin/npx.cmd index 9339ebd0652820..b79518ec505409 100755 --- a/deps/npm/bin/npx.cmd +++ b/deps/npm/bin/npx.cmd @@ -1,20 +1,20 @@ -:: Created by npm, please don't edit manually. -@ECHO OFF - -SETLOCAL - -SET "NODE_EXE=%~dp0\node.exe" -IF NOT EXIST "%NODE_EXE%" ( - SET "NODE_EXE=node" -) - -SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" -SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js" -FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( - SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js" -) -IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" ( - SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%" -) - -"%NODE_EXE%" "%NPX_CLI_JS%" %* +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js" +) +IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" ( + SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%" +) + +"%NODE_EXE%" "%NPX_CLI_JS%" %* diff --git a/deps/npm/changelogs/CHANGELOG-5.md b/deps/npm/changelogs/CHANGELOG-5.md index 57496984913d6f..ea8331b1b76f3f 100644 --- a/deps/npm/changelogs/CHANGELOG-5.md +++ b/deps/npm/changelogs/CHANGELOG-5.md @@ -1935,7 +1935,7 @@ helpful when community members go over our code and help clean it up, too! * [`9e5b76140`](https://github.com/npm/npm/commit/9e5b76140ffdb7dcd12aa402793644213fb8c5d7) [#17411](https://github.com/npm/npm/pull/17411) Convert all callback-style `move` usage to use Promises. - ([@vramana](https://github.com/vramana)) + ([@vramana](https://github.com/vramana)) * [`0711c08f7`](https://github.com/npm/npm/commit/0711c08f779ac641ec42ecc96f604c8861008b28) [#17394](https://github.com/npm/npm/pull/17394) Remove unused argument in `deepSortObject`. diff --git a/deps/npm/docs/LICENSE b/deps/npm/docs/LICENSE deleted file mode 100644 index 5169a5e4135e9f..00000000000000 --- a/deps/npm/docs/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 gatsbyjs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/deps/npm/docs/config.json b/deps/npm/docs/config.json new file mode 100644 index 00000000000000..08df95ae4a76d1 --- /dev/null +++ b/deps/npm/docs/config.json @@ -0,0 +1,5 @@ +{ + "github_repo": "npm/cli", + "github_branch": "latest", + "github_path": "docs/content" +} diff --git a/deps/npm/docs/content/cli-commands/npm-audit.md b/deps/npm/docs/content/cli-commands/npm-audit.md deleted file mode 100644 index 8b944e94cc12e2..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-audit.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -section: cli-commands -title: npm-audit -description: Run a security audit ---- - -# npm-audit(1) - -## Run a security audit - -### Synopsis - -```bash -npm audit [--json|--parseable|--audit-level=(low|moderate|high|critical)] -npm audit fix [--force|--package-lock-only|--dry-run] - -common options: [--production] [--only=(dev|prod)] -``` - -### Examples - -Scan your project for vulnerabilities and automatically install any compatible -updates to vulnerable dependencies: -```bash -$ npm audit fix -``` - -Run `audit fix` without modifying `node_modules`, but still updating the -pkglock: -```bash -$ npm audit fix --package-lock-only -``` - -Skip updating `devDependencies`: -```bash -$ npm audit fix --only=prod -``` - -Have `audit fix` install semver-major updates to toplevel dependencies, not just -semver-compatible ones: -```bash -$ npm audit fix --force -``` - -Do a dry run to get an idea of what `audit fix` will do, and _also_ output -install information in JSON format: -```bash -$ npm audit fix --dry-run --json -``` - -Scan your project for vulnerabilities and just show the details, without fixing -anything: -```bash -$ npm audit -``` - -Get the detailed audit report in JSON format: -```bash -$ npm audit --json -``` - -Get the detailed audit report in plain text result, separated by tab characters, allowing for -future reuse in scripting or command line post processing, like for example, selecting -some of the columns printed: -```bash -$ npm audit --parseable -``` - -To parse columns, you can use for example `awk`, and just print some of them: -```bash -$ npm audit --parseable | awk -F $'\t' '{print $1,$4}' -``` - -Fail an audit only if the results include a vulnerability with a level of moderate or higher: -```bash -$ npm audit --audit-level=moderate -``` - -### Description - -The audit command submits a description of the dependencies configured in -your project to your default registry and asks for a report of known -vulnerabilities. The report returned includes instructions on how to act on -this information. The command will exit with a 0 exit code if no -vulnerabilities were found. - -You can also have npm automatically fix the vulnerabilities by running `npm -audit fix`. Note that some vulnerabilities cannot be fixed automatically and -will require manual intervention or review. Also note that since `npm audit fix` -runs a full-fledged `npm install` under the hood, all configs that apply to the -installer will also apply to `npm install` -- so things like `npm audit fix ---package-lock-only` will work as expected. - -By default, the audit command will exit with a non-zero code if any vulnerability -is found. It may be useful in CI environments to include the `--audit-level` parameter -to specify the minimum vulnerability level that will cause the command to fail. This -option does not filter the report output, it simply changes the command's failure -threshold. - -### Content Submitted - -* npm_version -* node_version -* platform -* node_env -* A scrubbed version of your package-lock.json or npm-shrinkwrap.json - -#### Scrubbing - -In order to ensure that potentially sensitive information is not included in -the audit data bundle, some dependencies may have their names (and sometimes -versions) replaced with opaque non-reversible identifiers. It is done for -the following dependency types: - -* Any module referencing a scope that is configured for a non-default - registry has its name scrubbed. (That is, a scope you did a `npm login --scope=@ourscope` for.) -* All git dependencies have their names and specifiers scrubbed. -* All remote tarball dependencies have their names and specifiers scrubbed. -* All local directory and tarball dependencies have their names and specifiers scrubbed. - -The non-reversible identifiers are a sha256 of a session-specific UUID and the -value being replaced, ensuring a consistent value within the payload that is -different between runs. - -### Exit Code - -The `npm audit` command will exit with a 0 exit code if no vulnerabilities were found. - -If vulnerabilities were found the exit code will depend on the `audit-level` -configuration setting. - -### See Also - -* [npm install](/cli-commands/install) -* [package-locks](/configuring-npm/package-locks) -* [config](/using-npm/config) diff --git a/deps/npm/docs/content/cli-commands/npm-bin.md b/deps/npm/docs/content/cli-commands/npm-bin.md deleted file mode 100644 index eb0912ae48a92a..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-bin.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -section: cli-commands -title: npm-bin -description: Display npm bin folder ---- - -# npm-bin(1) - -## Display npm bin folder - -### Synopsis -```bash -npm bin [-g|--global] -``` - -### Description - -Print the folder where npm will install executables. - -### See Also - -* [npm prefix](/cli-commands/prefix) -* [npm root](/cli-commands/root) -* [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/cli-commands/npm-bugs.md b/deps/npm/docs/content/cli-commands/npm-bugs.md deleted file mode 100644 index 1e7272cec92493..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-bugs.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -section: cli-commands -title: npm-bugs -description: Bugs for a package in a web browser maybe ---- - -# npm-bugs(1) - -## Bugs for a package in a web browser maybe - -### Synopsis -```bash -npm bugs [ [ ...]] - -aliases: issues -``` - -### Description - -This command tries to guess at the likely location of a package's -bug tracker URL, and then tries to open it using the `--browser` -config param. If no package name is provided, it will search for -a `package.json` in the current folder and use the `name` property. - -### Configuration - -#### browser - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: String or Boolean - -The browser that is called by the `npm bugs` command to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - -#### registry - -* Default: https://registry.npmjs.org/ -* Type: url - -The base URL of the npm package registry. - - -### See Also - -* [npm docs](/cli-commands/docs) -* [npm view](/cli-commands/view) -* [npm publish](/cli-commands/publish) -* [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) -* [package.json](/configuring-npm/package-json) diff --git a/deps/npm/docs/content/cli-commands/npm-bundle.md b/deps/npm/docs/content/cli-commands/npm-bundle.md deleted file mode 100644 index c4fdc5e6bb0e64..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-bundle.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -section: cli-commands -title: npm-bundle -description: REMOVED ---- - -# npm-bundle(1) - -## REMOVED - -### Description - -The `npm bundle` command has been removed in 1.0, for the simple reason -that it is no longer necessary, as the default behavior is now to -install packages into the local space. - -Just use `npm install` now to do what `npm bundle` used to do. - -### See Also - -* [npm install](/cli-commands/install) diff --git a/deps/npm/docs/content/cli-commands/npm-cache.md b/deps/npm/docs/content/cli-commands/npm-cache.md deleted file mode 100644 index 4d19749b80f2d9..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-cache.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -section: cli-commands -title: npm-cache -description: Manipulates packages cache ---- - -# npm-cache(1) - -## Manipulates packages cache - -### Synopsis - -```bash -npm cache add -npm cache add -npm cache add -npm cache add @ - -npm cache clean [] -aliases: npm cache clear, npm cache rm - -npm cache verify -``` - -### Description - -Used to add, list, or clean the npm cache folder. - -* add: - Add the specified package to the local cache. This command is primarily - intended to be used internally by npm, but it can provide a way to - add data to the local installation cache explicitly. - -* clean: - Delete all data out of the cache folder. - -* verify: - Verify the contents of the cache folder, garbage collecting any unneeded data, - and verifying the integrity of the cache index and all cached data. - -### Details - -npm stores cache data in an opaque directory within the configured `cache`, -named `_cacache`. This directory is a `cacache`-based content-addressable cache -that stores all http request data as well as other package-related data. This -directory is primarily accessed through `pacote`, the library responsible for -all package fetching as of npm@5. - -All data that passes through the cache is fully verified for integrity on both -insertion and extraction. Cache corruption will either trigger an error, or -signal to `pacote` that the data must be refetched, which it will do -automatically. For this reason, it should never be necessary to clear the cache -for any reason other than reclaiming disk space, thus why `clean` now requires -`--force` to run. - -There is currently no method exposed through npm to inspect or directly manage -the contents of this cache. In order to access it, `cacache` must be used -directly. - -npm will not remove data by itself: the cache will grow as new packages are -installed. - -### A note about the cache's design - -The npm cache is strictly a cache: it should not be relied upon as a persistent -and reliable data store for package data. npm makes no guarantee that a -previously-cached piece of data will be available later, and will automatically -delete corrupted contents. The primary guarantee that the cache makes is that, -if it does return data, that data will be exactly the data that was inserted. - -To run an offline verification of existing cache contents, use `npm cache -verify`. - -### Configuration - -#### cache - -Default: `~/.npm` on Posix, or `%AppData%/npm-cache` on Windows. - -The root cache folder. - -### See Also - -* [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) -* [npm install](/cli-commands/install) -* [npm publish](/cli-commands/publish) -* [npm pack](/cli-commands/pack) -* https://npm.im/cacache -* https://npm.im/pacote diff --git a/deps/npm/docs/content/cli-commands/npm-ci.md b/deps/npm/docs/content/cli-commands/npm-ci.md deleted file mode 100644 index b5b6447a485f8f..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-ci.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -section: cli-commands -title: npm-ci -description: Install a project with a clean slate ---- - -# npm-ci(1) - -## Install a project with a clean slate - -### Synopsis -```bash -npm ci -``` - -### Example - -Make sure you have a package-lock and an up-to-date install: - -```bash -$ cd ./my/npm/project -$ npm install -added 154 packages in 10s -$ ls | grep package-lock -``` - -Run `npm ci` in that project - -```bash -$ npm ci -added 154 packages in 5s -``` - -Configure Travis to build using `npm ci` instead of `npm install`: - -```bash -# .travis.yml -install: -- npm ci -# keep the npm cache around to speed up installs -cache: - directories: - - "$HOME/.npm" -``` - -### Description - -This command is similar to [`npm install`](/cli-commands/install), except it's meant to be used in -automated environments such as test platforms, continuous integration, and -deployment -- or any situation where you want to make sure you're doing a clean -install of your dependencies. It can be significantly faster than a regular npm -install by skipping certain user-oriented features. It is also more strict than -a regular install, which can help catch errors or inconsistencies caused by the -incrementally-installed local environments of most npm users. - -In short, the main differences between using `npm install` and `npm ci` are: - -* The project **must** have an existing `package-lock.json` or `npm-shrinkwrap.json`. -* If dependencies in the package lock do not match those in `package.json`, `npm ci` will exit with an error, instead of updating the package lock. -* `npm ci` can only install entire projects at a time: individual dependencies cannot be added with this command. -* If a `node_modules` is already present, it will be automatically removed before `npm ci` begins its install. -* It will never write to `package.json` or any of the package-locks: installs are essentially frozen. - -### See Also - -* [npm install](/cli-commands/install) -* [package-locks](/configuring-npm/package-locks) diff --git a/deps/npm/docs/content/cli-commands/npm-config.md b/deps/npm/docs/content/cli-commands/npm-config.md deleted file mode 100644 index 68d403746fc103..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-config.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -section: cli-commands -title: npm-config -description: Manage the npm configuration files ---- - -# npm-config(1) - -## Manage the npm configuration files - -### Synopsis -```bash -npm config set [-g|--global] -npm config get -npm config delete -npm config list [-l] [--json] -npm config edit -npm get -npm set [-g|--global] - -aliases: c -``` - -### Description - -npm gets its config settings from the command line, environment -variables, `npmrc` files, and in some cases, the `package.json` file. - -See [npmrc](/configuring-npm/npmrc) for more information about the npmrc files. - -See [config](/using-npm/config) for a more thorough discussion of the mechanisms -involved. - -The `npm config` command can be used to update and edit the contents -of the user and global npmrc files. - -### Sub-commands - -Config supports the following sub-commands: - -#### set -```bash -npm config set key value -``` -Sets the config key to the value. - -If value is omitted, then it sets it to "true". - -#### get -```bash -npm config get key -``` - -Echo the config value to stdout. - -#### list -```bash -npm config list -``` - -Show all the config settings. Use `-l` to also show defaults. Use `--json` -to show the settings in json format. - -#### delete -```bash -npm config delete key -``` - -Deletes the key from all configuration files. - -#### edit -```bash -npm config edit -``` - -Opens the config file in an editor. Use the `--global` flag to edit the -global config. - -### See Also - -* [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) -* [package.json](/configuring-npm/package-json) -* [npmrc](/configuring-npm/npmrc) -* [npm](/cli-commands/npm) diff --git a/deps/npm/docs/content/cli-commands/npm-dedupe.md b/deps/npm/docs/content/cli-commands/npm-dedupe.md deleted file mode 100644 index e0493f5e2c98db..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-dedupe.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -section: cli-commands -title: npm-dedupe -description: Reduce duplication ---- - -# npm-dedupe(1) - -## Reduce duplication - -### Synopsis -```bash -npm dedupe -npm ddp - -aliases: find-dupes, ddp -``` - -### Description - -Searches the local package tree and attempts to simplify the overall -structure by moving dependencies further up the tree, where they can -be more effectively shared by multiple dependent packages. - -For example, consider this dependency graph: - -```bash -a -+-- b <-- depends on c@1.0.x -| `-- c@1.0.3 -`-- d <-- depends on c@~1.0.9 - `-- c@1.0.10 -``` - -In this case, `npm dedupe` will transform the tree to: - -```bash -a -+-- b -+-- d -`-- c@1.0.10 -``` - -Because of the hierarchical nature of node's module lookup, b and d -will both get their dependency met by the single c package at the root -level of the tree. - -The deduplication algorithm walks the tree, moving each dependency as far -up in the tree as possible, even if duplicates are not found. This will -result in both a flat and deduplicated tree. - -If a suitable version exists at the target location in the tree -already, then it will be left untouched, but the other duplicates will -be deleted. - -Arguments are ignored. Dedupe always acts on the entire tree. - -Modules - -Note that this operation transforms the dependency tree, but will never -result in new modules being installed. - -Using `npm find-dupes` will run the command in dryRun mode. - -### See Also - -* [npm ls](/cli-commands/ls) -* [npm update](/cli-commands/update) -* [npm install](/cli-commands/install) diff --git a/deps/npm/docs/content/cli-commands/npm-deprecate.md b/deps/npm/docs/content/cli-commands/npm-deprecate.md deleted file mode 100644 index 252c0e70370791..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-deprecate.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -section: cli-commands -title: npm-deprecate -description: Deprecate a version of a package ---- -# npm-deprecate(1) - -## Deprecate a version of a package - -### Synopsis -```bash -npm deprecate [@] -``` - -### Description - -This command will update the npm registry entry for a package, providing -a deprecation warning to all who attempt to install it. - -It works on [version ranges](https://semver.npmjs.com/) as well as specific -versions, so you can do something like this: -```bash -npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3" -``` - -Note that you must be the package owner to deprecate something. See the -`owner` and `adduser` help topics. - -To un-deprecate a package, specify an empty string (`""`) for the `message` -argument. Note that you must use double quotes with no space between them to -format an empty string. - -### See Also - -* [npm publish](/cli-commands/publish) -* [npm registry](/using-npm/registry) diff --git a/deps/npm/docs/content/cli-commands/npm-dist-tag.md b/deps/npm/docs/content/cli-commands/npm-dist-tag.md deleted file mode 100644 index 4f7fcb9f58f1ba..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-dist-tag.md +++ /dev/null @@ -1,100 +0,0 @@ - --- -section: cli-commands -title: npm-dist-tag -description: Modify package distribution tags ---- - -# npm-dist-tag(1) - -## Modify package distribution tags - - -### Synopsis -```bash -npm dist-tag add @ [] -npm dist-tag rm -npm dist-tag ls [] - -aliases: dist-tags -``` - -### Description - -Add, remove, and enumerate distribution tags on a package: - -* add: - Tags the specified version of the package with the specified tag, or the - `--tag` config if not specified. If you have two-factor authentication on - auth-and-writes then you’ll need to include a one-time password on the - command line with `--otp `. - -* rm: - Clear a tag that is no longer in use from the package. - -* ls: - Show all of the dist-tags for a package, defaulting to the package in - the current prefix. This is the default action if none is specified. - -A tag can be used when installing packages as a reference to a version instead -of using a specific version number: - -```bash -npm install @ -``` - -When installing dependencies, a preferred tagged version may be specified: - -```bash -npm install --tag -``` - -This also applies to `npm dedupe`. - -Publishing a package sets the `latest` tag to the published version unless the -`--tag` option is used. For example, `npm publish --tag=beta`. - -By default, `npm install ` (without any `@` or `@` -specifier) installs the `latest` tag. - -### Purpose - -Tags can be used to provide an alias instead of version numbers. - -For example, a project might choose to have multiple streams of development -and use a different tag for each stream, -e.g., `stable`, `beta`, `dev`, `canary`. - -By default, the `latest` tag is used by npm to identify the current version of -a package, and `npm install ` (without any `@` or `@` -specifier) installs the `latest` tag. Typically, projects only use the `latest` -tag for stable release versions, and use other tags for unstable versions such -as prereleases. - -The `next` tag is used by some projects to identify the upcoming version. - -By default, other than `latest`, no tag has any special significance to npm -itself. - -### Caveats - -This command used to be known as `npm tag`, which only created new tags, and so -had a different syntax. - -Tags must share a namespace with version numbers, because they are specified in -the same slot: `npm install @` vs `npm install @`. - -Tags that can be interpreted as valid semver ranges will be rejected. For -example, `v1.4` cannot be used as a tag, because it is interpreted by semver as -`>=1.4.0 <1.5.0`. See . - -The simplest way to avoid semver problems with tags is to use tags that do not -begin with a number or the letter `v`. - -### See Also - -* [npm publish](/cli-commands/publish) -* [npm install](/cli-commands/install) -* [npm dedupe](/cli-commands/dedupe) -* [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/cli-commands/npm-docs.md b/deps/npm/docs/content/cli-commands/npm-docs.md deleted file mode 100644 index ffa5db5ac66122..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-docs.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -section: cli-commands -title: npm-docs -description: Docs for a package in a web browser maybe ---- - -# npm-docs(1) - -## Docs for a package in a web browser maybe - -### Synopsis - -```bash -npm docs [ [ ...]] - -aliases: home -``` - -### Description - -This command tries to guess at the likely location of a package's -documentation URL, and then tries to open it using the `--browser` -config param. You can pass multiple package names at once. If no -package name is provided, it will search for a `package.json` in -the current folder and use the `name` property. - -### Configuration - -#### browser - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: String or Boolean - -The browser that is called by the `npm docs` command to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - -#### registry - -* Default: https://registry.npmjs.org/ -* Type: url - -The base URL of the npm package registry. - - -### See Also - -* [npm view](/cli-commands/view) -* [npm publish](/cli-commands/publish) -* [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) -* [package.json](/configuring-npm/package-json) diff --git a/deps/npm/docs/content/cli-commands/npm-doctor.md b/deps/npm/docs/content/cli-commands/npm-doctor.md deleted file mode 100644 index 60a57ea4765a26..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-doctor.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -section: cli-commands -title: npm-doctor -description: Check your environments ---- - -# npm-doctor(1) - -## Check your environments - -### Synopsis - -```bash -npm doctor -``` - -### Description - -`npm doctor` runs a set of checks to ensure that your npm installation has -what it needs to manage your JavaScript packages. npm is mostly a standalone tool, but it does -have some basic requirements that must be met: - -+ Node.js and git must be executable by npm. -+ The primary npm registry, `registry.npmjs.com`, or another service that uses - the registry API, is available. -+ The directories that npm uses, `node_modules` (both locally and globally), - exist and can be written by the current user. -+ The npm cache exists, and the package tarballs within it aren't corrupt. - -Without all of these working properly, npm may not work properly. Many issues -are often attributable to things that are outside npm's code base, so `npm -doctor` confirms that the npm installation is in a good state. - -Also, in addition to this, there are also very many issue reports due to using -old versions of npm. Since npm is constantly improving, running `npm@latest` is -better than an old version. - -`npm doctor` verifies the following items in your environment, and if there are -any recommended changes, it will display them. - -#### `npm ping` - -By default, npm installs from the primary npm registry, `registry.npmjs.org`. -`npm doctor` hits a special ping endpoint within the registry. This can also be -checked with `npm ping`. If this check fails, you may be using a proxy that -needs to be configured, or may need to talk to your IT staff to get access over -HTTPS to `registry.npmjs.org`. - -This check is done against whichever registry you've configured (you can see -what that is by running `npm config get registry`), and if you're using a -private registry that doesn't support the `/whoami` endpoint supported by the -primary registry, this check may fail. - -#### `npm -v` - -While Node.js may come bundled with a particular version of npm, it's the -policy of the CLI team that we recommend all users run `npm@latest` if they -can. As the CLI is maintained by a small team of contributors, there are only -resources for a single line of development, so npm's own long-term support -releases typically only receive critical security and regression fixes. The -team believes that the latest tested version of npm is almost always likely to -be the most functional and defect-free version of npm. - -#### `node -v` - -For most users, in most circumstances, the best version of Node will be the -latest long-term support (LTS) release. Those of you who want access to new -ECMAscript features or bleeding-edge changes to Node's standard library may be -running a newer version, and some of you may be required to run an older -version of Node because of enterprise change control policies. That's OK! But -in general, the npm team recommends that most users run Node.js LTS. - -#### `npm config get registry` - -Some of you may be installing from private package registries for your project -or company. That's great! Others of you may be following tutorials or -StackOverflow questions in an effort to troubleshoot problems you may be -having. Sometimes, this may entail changing the registry you're pointing at. -This part of `npm doctor` just lets you, and maybe whoever's helping you with -support, know that you're not using the default registry. - -#### `which git` - -While it's documented in the README, it may not be obvious that npm needs Git -installed to do many of the things that it does. Also, in some cases -– especially on Windows – you may have Git set up in such a way that it's not -accessible via your `PATH` so that npm can find it. This check ensures that Git -is available. - -#### Permissions checks - -* Your cache must be readable and writable by the user running npm. -* Global package binaries must be writable by the user running npm. -* Your local `node_modules` path, if you're running `npm doctor` with a project - directory, must be readable and writable by the user running npm. - -#### Validate the checksums of cached packages - -When an npm package is published, the publishing process generates a checksum -that npm uses at install time to verify that the package didn't get corrupted -in transit. `npm doctor` uses these checksums to validate the package tarballs -in your local cache (you can see where that cache is located with `npm config -get cache`, and see what's in that cache with `npm cache ls` – probably more -than you were expecting!). In the event that there are corrupt packages in your -cache, you should probably run `npm cache clean` and reset the cache. - -### See Also - -* [npm bugs](/cli-commands/bugs) -* [npm help](/cli-commands/help) -* [npm ping](/cli-commands/ping) diff --git a/deps/npm/docs/content/cli-commands/npm-edit.md b/deps/npm/docs/content/cli-commands/npm-edit.md deleted file mode 100644 index d4b9bbb819b94f..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-edit.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -section: cli-commands -title: npm-edit -description: Edit an installed package ---- - -# npm-edit(1) - -## Edit an installed package - -### Synopsis - -```bash -npm edit [/...] -``` - -### Description - -Selects a (sub)dependency in the current -working directory and opens the package folder in the default editor -(or whatever you've configured as the npm `editor` config -- see -[`npm-config`](npm-config).) - -After it has been edited, the package is rebuilt so as to pick up any -changes in compiled packages. - -For instance, you can do `npm install connect` to install connect -into your package, and then `npm edit connect` to make a few -changes to your locally installed copy. - -### Configuration - -#### editor - -* Default: `EDITOR` environment variable if set, or `"vi"` on Posix, - or `"notepad"` on Windows. -* Type: path - -The command to run for `npm edit` or `npm config edit`. - -### See Also - -* [npm folders](/configuring-npm/folders) -* [npm explore](/cli-commands/explore) -* [npm install](/cli-commands/install) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/cli-commands/npm-fund.md b/deps/npm/docs/content/cli-commands/npm-fund.md deleted file mode 100644 index 0aa45e8bd0ed93..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-fund.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -section: cli-commands -title: npm-fund -description: Retrieve funding information ---- - -# npm-fund(1) - -## Retrieve funding information - -### Synopsis - -```bash - npm fund [] -``` - -### Description - -This command retrieves information on how to fund the dependencies of -a given project. If no package name is provided, it will list all -dependencies that are looking for funding in a tree-structure in which -are listed the type of funding and the url to visit. If a package name -is provided then it tries to open its funding url using the `--browser` -config param; if there are multiple funding sources for the package, the -user will be instructed to pass the `--which` command to disambiguate. - -The list will avoid duplicated entries and will stack all packages -that share the same url as a single entry. Given this nature the -list is not going to have the same shape of the output from `npm ls`. - -### Configuration - -#### browser - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: String - -The browser that is called by the `npm fund` command to open websites. - -#### json - -* Type: Boolean -* Default: false - -Show information in JSON format. - -#### unicode - -* Type: Boolean -* Default: true - -Whether to represent the tree structure using unicode characters. -Set it to `false` in order to use all-ansi output. - -#### which - -* Type: Number -* Default: undefined - -If there are multiple funding sources, which 1-indexed source URL to open. - -## See Also - -* [npm docs](/cli-commands/docs) -* [npm config](/cli-commands/config) -* [npm install](/cli-commands/install) -* [npm ls](/cli-commands/ls) - diff --git a/deps/npm/docs/content/cli-commands/npm-help-search.md b/deps/npm/docs/content/cli-commands/npm-help-search.md deleted file mode 100644 index 96781856551383..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-help-search.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -section: cli-commands -title: npm-help-search -description: Search npm help documentation ---- - -# npm-help-search(1) - -## Search npm help documentation - -### Synopsis - -```bash -npm help-search -``` - -### Description - -This command will search the npm markdown documentation files for the -terms provided, and then list the results, sorted by relevance. - -If only one result is found, then it will show that help topic. - -If the argument to `npm help` is not a known help topic, then it will -call `help-search`. It is rarely if ever necessary to call this -command directly. - -### Configuration - -#### long - -* Type: Boolean -* Default: false - -If true, the "long" flag will cause help-search to output context around -where the terms were found in the documentation. - -If false, then help-search will just list out the help topics found. - -### See Also - -* [npm](/cli-commands/npm) -* [npm help](/cli-commands/help) diff --git a/deps/npm/docs/content/cli-commands/npm-help.md b/deps/npm/docs/content/cli-commands/npm-help.md deleted file mode 100644 index 358010c05ece33..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-help.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -section: cli-commands -title: npm-help -description: Get help on npm ---- - -# npm-help(1) - -## Get help on npm - -### Synopsis - -```bash -npm help [] -``` - -### Description - -If supplied a topic, then show the appropriate documentation page. - -If the topic does not exist, or if multiple terms are provided, then run -the `help-search` command to find a match. Note that, if `help-search` -finds a single subject, then it will run `help` on that topic, so unique -matches are equivalent to specifying a topic name. - -### Configuration - -#### viewer - -* Default: "man" on Posix, "browser" on Windows -* Type: path - -The program to use to view help content. - -Set to `"browser"` to view html help content in the default web browser. - -### See Also - -* [npm](/cli-commands/npm) -* [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) -* [package.json](/configuring-npm/package-json) -* [npm help-search](/cli-commands/help-search) diff --git a/deps/npm/docs/content/cli-commands/npm-hook.md b/deps/npm/docs/content/cli-commands/npm-hook.md deleted file mode 100644 index ce4bbccb3593b3..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-hook.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -section: cli-commands -title: npm-hook -description: Manage registry hooks ---- - -# npm-hook(1) - -## Manage registry hooks - -### Synopsis - -```bash -npm hook ls [pkg] -npm hook add -npm hook update [secret] -npm hook rm -``` - -### Example - -Add a hook to watch a package for changes: -```bash -$ npm hook add lodash https://example.com/ my-shared-secret -``` - -Add a hook to watch packages belonging to the user `substack`: -```bash -$ npm hook add ~substack https://example.com/ my-shared-secret -``` - -Add a hook to watch packages in the scope `@npm` -```bash -$ npm hook add @npm https://example.com/ my-shared-secret -``` - -List all your active hooks: -```bash -$ npm hook ls -``` - -List your active hooks for the `lodash` package: -```bash -$ npm hook ls lodash -``` - -Update an existing hook's url: -```bash -$ npm hook update id-deadbeef https://my-new-website.here/ -``` - -Remove a hook: -```bash -$ npm hook rm id-deadbeef -``` - -### Description - -Allows you to manage [npm hooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm), -including adding, removing, listing, and updating. - -Hooks allow you to configure URL endpoints that will be notified whenever a -change happens to any of the supported entity types. Three different types of -entities can be watched by hooks: packages, owners, and scopes. - -To create a package hook, simply reference the package name. - -To create an owner hook, prefix the owner name with `~` (as in, `~youruser`). - -To create a scope hook, prefix the scope name with `@` (as in, `@yourscope`). - -The hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls` for -that particular hook. - -The shared secret will be sent along to the URL endpoint so you can verify the -request came from your own configured hook. - -### See Also - -* ["Introducing Hooks" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm) diff --git a/deps/npm/docs/content/cli-commands/npm-init.md b/deps/npm/docs/content/cli-commands/npm-init.md deleted file mode 100644 index 32b7f823019910..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-init.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -section: cli-commands -title: npm-init -description: create a package.json file ---- - -# npm-init(1) - -## create a package.json file - -### Synopsis -```bash -npm init [--force|-f|--yes|-y|--scope] -npm init <@scope> (same as `npx <@scope>/create`) -npm init [<@scope>/] (same as `npx [<@scope>/]create-`) -``` - -### Examples - -Create a new React-based project using [`create-react-app`](https://npm.im/create-react-app): -```bash -$ npm init react-app ./my-react-app -``` - -Create a new `esm`-compatible package using [`create-esm`](https://npm.im/create-esm): -```bash -$ mkdir my-esm-lib && cd my-esm-lib -$ npm init esm --yes -``` - -Generate a plain old package.json using legacy init: -```bash -$ mkdir my-npm-pkg && cd my-npm-pkg -$ git init -$ npm init -``` - -Generate it without having it ask any questions: -```bash -$ npm init -y -``` - -### Description - -`npm init ` can be used to set up a new or existing npm package. - -`initializer` in this case is an npm package named `create-`, which -will be installed by [`npx`](https://npm.im/npx), and then have its main bin -executed -- presumably creating or updating `package.json` and running any other -initialization-related operations. - -The init command is transformed to a corresponding `npx` operation as follows: - -* `npm init foo` -> `npx create-foo` -* `npm init @usr/foo` -> `npx @usr/create-foo` -* `npm init @usr` -> `npx @usr/create` - -Any additional options will be passed directly to the command, so `npm init foo ---hello` will map to `npx create-foo --hello`. - -If the initializer is omitted (by just calling `npm init`), init will fall back -to legacy init behavior. It will ask you a bunch of questions, and then write a -package.json for you. It will attempt to make reasonable guesses based on -existing fields, dependencies, and options selected. It is strictly additive, so -it will keep any fields and values that were already set. You can also use -`-y`/`--yes` to skip the questionnaire altogether. If you pass `--scope`, it -will create a scoped package. - -### See Also - -* -* [package.json](/configuring-npm/package-json) -* [npm version](/cli-commands/version) -* [npm scope](/using-npm/scope) diff --git a/deps/npm/docs/content/cli-commands/npm-install-ci-test.md b/deps/npm/docs/content/cli-commands/npm-install-ci-test.md deleted file mode 100644 index 09d738c79fbed5..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-install-ci-test.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -section: cli-commands -title: npm-install-ci-test -description: Install a project with a clean slate and run tests ---- - -# npm install-ci-test(1) - -## Install a project with a clean slate and run tests - -### Synopsis - -```bash -npm install-ci-test - -alias: npm cit -``` - -### Description - -This command runs an `npm ci` followed immediately by an `npm test`. - -### See Also - -* [npm ci](/cli-commands/ci) -* [npm test](/cli-commands/test) diff --git a/deps/npm/docs/content/cli-commands/npm-install.md b/deps/npm/docs/content/cli-commands/npm-install.md deleted file mode 100644 index 5ffb96f688b6b7..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-install.md +++ /dev/null @@ -1,497 +0,0 @@ ---- -section: cli-commands -title: npm-install -description: Install a package ---- - -# npm-install(1) - -## Install a package - -### Synopsis - -```bash -npm install (with no args, in package dir) -npm install [<@scope>/] -npm install [<@scope>/]@ -npm install [<@scope>/]@ -npm install [<@scope>/]@ -npm install @npm: -npm install :/ -npm install -npm install -npm install -npm install - -aliases: npm i, npm add -common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run] -``` - -### Description - -This command installs a package and any packages that it depends on. If the -package has a package-lock, or an npm shrinkwrap file, or a yarn lock file, the -installation of dependencies will be driven by that, respecting the following -order of precedence: - -* `npm-shrinkwrap.json` -* `package-lock.json` -* `yarn.lock` - -See [package-lock.json](/configuring-npm/package-lock-json) and [`npm shrinkwrap`](/cli-commands/shrinkwrap). - -A `package` is: - -* a) a folder containing a program described by a [`package.json`](/configuring-npm/package-json) file -* b) a gzipped tarball containing (a) -* c) a url that resolves to (b) -* d) a `@` that is published on the registry (see [`registry`](/using-npm/registry)) with (c) -* e) a `@` (see [`npm dist-tag`](/cli-commands/dist-tag)) that points to (d) -* f) a `` that has a "latest" tag satisfying (e) -* g) a `` that resolves to (a) - -Even if you never publish your package, you can still get a lot of -benefits of using npm if you just want to write a node program (a), and -perhaps if you also want to be able to easily install it elsewhere -after packing it up into a tarball (b). - - -* `npm install` (in a package directory, no arguments): - - Install the dependencies in the local `node_modules` folder. - - In global mode (ie, with `-g` or `--global` appended to the command), - it installs the current package context (ie, the current working - directory) as a global package. - - By default, `npm install` will install all modules listed as dependencies - in [`package.json`](/configuring-npm/package-json). - - With the `--production` flag (or when the `NODE_ENV` environment variable - is set to `production`), npm will not install modules listed in - `devDependencies`. To install all modules listed in both `dependencies` - and `devDependencies` when `NODE_ENV` environment variable is set to `production`, - you can use `--production=false`. - - > NOTE: The `--production` flag has no particular meaning when adding a - dependency to a project. - -* `npm install `: - - Install the package in the directory as a symlink in the current project. - Its dependencies will be installed before it's linked. If `` sits - inside the root of your project, its dependencies may be hoisted to the - top-level `node_modules` as they would for other types of dependencies. - -* `npm install `: - - Install a package that is sitting on the filesystem. Note: if you just want - to link a dev directory into your npm root, you can do this more easily by - using [`npm link`](/cli-commands/npm-link). - - Tarball requirements: - * The filename *must* use `.tar`, `.tar.gz`, or `.tgz` as - the extension. - * The package contents should reside in a subfolder inside the tarball (usually it is called `package/`). npm strips one directory layer when installing the package (an equivalent of `tar x --strip-components=1` is run). - * The package must contain a `package.json` file with `name` and `version` properties. - - Example: - - npm install ./package.tgz - -* `npm install `: - - Fetch the tarball url, and then install it. In order to distinguish between - this and other options, the argument must start with "http://" or "https://" - - Example: - - npm install https://github.com/indexzero/forever/tarball/v0.5.6 - -* `npm install [<@scope>/]`: - - Do a `@` install, where `` is the "tag" config. (See - [`config`](/using-npm/config). The config's default value is `latest`.) - - In most cases, this will install the version of the modules tagged as - `latest` on the npm registry. - - Example: - - npm install sax - - `npm install` saves any specified packages into `dependencies` by default. - Additionally, you can control where and how they get saved with some - additional flags: - - * `-P, --save-prod`: Package will appear in your `dependencies`. This is the - default unless `-D` or `-O` are present. - - * `-D, --save-dev`: Package will appear in your `devDependencies`. - - * `-O, --save-optional`: Package will appear in your `optionalDependencies`. - - * `--no-save`: Prevents saving to `dependencies`. - - When using any of the above options to save dependencies to your - package.json, there are two additional, optional flags: - - * `-E, --save-exact`: Saved dependencies will be configured with an - exact version rather than using npm's default semver range - operator. - - * `-B, --save-bundle`: Saved dependencies will also be added to your `bundleDependencies` list. - - Further, if you have an `npm-shrinkwrap.json` or `package-lock.json` then it - will be updated as well. - - `` is optional. The package will be downloaded from the registry - associated with the specified scope. If no registry is associated with - the given scope the default registry is assumed. See [`scope`](/using-npm/scope). - - Note: if you do not include the @-symbol on your scope name, npm will - interpret this as a GitHub repository instead, see below. Scopes names - must also be followed by a slash. - - Examples: - - ```bash - npm install sax - npm install githubname/reponame - npm install @myorg/privatepackage - npm install node-tap --save-dev - npm install dtrace-provider --save-optional - npm install readable-stream --save-exact - npm install ansi-regex --save-bundle - ``` - - **Note**: If there is a file or folder named `` in the current - working directory, then it will try to install that, and only try to - fetch the package by name if it is not valid. - -* `npm install @npm:`: - - Install a package under a custom alias. Allows multiple versions of - a same-name package side-by-side, more convenient import names for - packages with otherwise long ones, and using git forks replacements - or forked npm packages as replacements. Aliasing works only on your - project and does not rename packages in transitive dependencies. - Aliases should follow the naming conventions stated in - [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules). - - Examples: - - npm install my-react@npm:react - npm install jquery2@npm:jquery@2 - npm install jquery3@npm:jquery@3 - npm install npa@npm:npm-package-arg - - -* `npm install [<@scope>/]@`: - - Install the version of the package that is referenced by the specified tag. - If the tag does not exist in the registry data for that package, then this - will fail. - - Example: - - ```bash - npm install sax@latest - npm install @myorg/mypackage@latest - ``` - -* `npm install [<@scope>/]@`: - - Install the specified version of the package. This will fail if the - version has not been published to the registry. - - Example: - - ```bash - npm install sax@0.1.1 - npm install @myorg/privatepackage@1.5.0 - ``` - -* `npm install [<@scope>/]@`: - - Install a version of the package matching the specified version range. This - will follow the same rules for resolving dependencies described in [`package.json`](/configuring-npm/package-json). - - Note that most version ranges must be put in quotes so that your shell will - treat it as a single argument. - - Example: - ```bash - npm install sax@">=0.1.0 <0.2.0" - npm install @myorg/privatepackage@"16 - 17" - ``` - -* `npm install `: - - Installs the package from the hosted git provider, cloning it with `git`. - For a full git remote url, only that URL will be attempted. - - ```bash - ://[[:]@][:][:][/][# | #semver:] - ``` - - `` is one of `git`, `git+ssh`, `git+http`, `git+https`, or - `git+file`. - - If `#` is provided, it will be used to clone exactly that - commit. If the commit-ish has the format `#semver:`, `` can - be any valid semver range or exact version, and npm will look for any tags - or refs matching that range in the remote repository, much as it would for a - registry dependency. If neither `#` or `#semver:` is - specified, then the default branch of the repository is used. - - If the repository makes use of submodules, those submodules will be cloned - as well. - - If the package being installed contains a `prepare` script, its - `dependencies` and `devDependencies` will be installed, and the prepare - script will be run, before the package is packaged and installed. - - The following git environment variables are recognized by npm and will be - added to the environment when running git: - - * `GIT_ASKPASS` - * `GIT_EXEC_PATH` - * `GIT_PROXY_COMMAND` - * `GIT_SSH` - * `GIT_SSH_COMMAND` - * `GIT_SSL_CAINFO` - * `GIT_SSL_NO_VERIFY` - - See the git man page for details. - - Examples: - - ```bash - npm install git+ssh://git@github.com:npm/cli.git#v1.0.27 - npm install git+ssh://git@github.com:npm/cli#pull/273 - npm install git+ssh://git@github.com:npm/cli#semver:^5.0 - npm install git+https://isaacs@github.com/npm/cli.git - npm install git://github.com/npm/cli.git#v1.0.27 - GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git - ``` - -* `npm install /[#]`: -* `npm install github:/[#]`: - - Install the package at `https://github.com/githubname/githubrepo` by - attempting to clone it using `git`. - - If `#` is provided, it will be used to clone exactly that - commit. If the commit-ish has the format `#semver:`, `` can - be any valid semver range or exact version, and npm will look for any tags - or refs matching that range in the remote repository, much as it would for a - registry dependency. If neither `#` or `#semver:` is - specified, then `master` is used. - - As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script before the package is - done installing. - - Examples: - - ```bash - npm install mygithubuser/myproject - npm install github:mygithubuser/myproject - ``` - -* `npm install gist:[/][#|#semver:]`: - - Install the package at `https://gist.github.com/gistID` by attempting to - clone it using `git`. The GitHub username associated with the gist is - optional and will not be saved in `package.json`. - - As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script before the package is - done installing. - - Example: - - ```bash - npm install gist:101a11beef - ``` - -* `npm install bitbucket:/[#]`: - - Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo` - by attempting to clone it using `git`. - - If `#` is provided, it will be used to clone exactly that - commit. If the commit-ish has the format `#semver:`, `` can - be any valid semver range or exact version, and npm will look for any tags - or refs matching that range in the remote repository, much as it would for a - registry dependency. If neither `#` or `#semver:` is - specified, then `master` is used. - - As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script before the package is - done installing. - - Example: - - ```bash - npm install bitbucket:mybitbucketuser/myproject - ``` - -* `npm install gitlab:/[#]`: - - Install the package at `https://gitlab.com/gitlabname/gitlabrepo` - by attempting to clone it using `git`. - - If `#` is provided, it will be used to clone exactly that - commit. If the commit-ish has the format `#semver:`, `` can - be any valid semver range or exact version, and npm will look for any tags - or refs matching that range in the remote repository, much as it would for a - registry dependency. If neither `#` or `#semver:` is - specified, then `master` is used. - - As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script before the package is - done installing. - - Example: - - ```bash - npm install gitlab:mygitlabuser/myproject - npm install gitlab:myusr/myproj#semver:^5.0 - ``` - -You may combine multiple arguments and even multiple types of arguments. -For example: - -```bash -npm install sax@">=0.1.0 <0.2.0" bench supervisor -``` - -The `--tag` argument will apply to all of the specified install targets. If a -tag with the given name exists, the tagged version is preferred over newer -versions. - -The `--dry-run` argument will report in the usual way what the install would -have done without actually installing anything. - -The `--package-lock-only` argument will only update the `package-lock.json`, -instead of checking `node_modules` and downloading dependencies. - -The `-f` or `--force` argument will force npm to fetch remote resources even if a -local copy exists on disk. - -```bash -npm install sax --force -``` - -The `-g` or `--global` argument will cause npm to install the package globally -rather than locally. See [folders](/configuring-npm/folders). - -The `--global-style` argument will cause npm to install the package into -your local `node_modules` folder with the same layout it uses with the -global `node_modules` folder. Only your direct dependencies will show in -`node_modules` and everything they depend on will be flattened in their -`node_modules` folders. This obviously will eliminate some deduping. - -The `--ignore-scripts` argument will cause npm to not execute any -scripts defined in the package.json. See [`scripts`](/using-npm/scripts). - -The `--legacy-bundling` argument will cause npm to install the package such -that versions of npm prior to 1.4, such as the one included with node 0.8, -can install the package. This eliminates all automatic deduping. - -The `--legacy-peer-deps` argument will cause npm to ignore all -`peerDependencies` when installing, similar to npm@6 and older. - -The `--link` argument will cause npm to link global installs into the -local space whenever packages from the global space may satisfy a dependency -required version. - -The `--no-audit` argument can be used to disable sending audit reports to -the configured registries. See [`npm-audit`](npm-audit) for details on what -is sent. - -The `--no-bin-links` argument will prevent npm from creating symlinks for -any binaries the package might contain. - -The `--no-fund` argument will hide the message displayed at the end of each -install that acknowledges the number of dependencies looking for funding. -See [`npm-fund`](/cli-commands/npm-fund) - -The `--no-optional` argument will prevent optional dependencies from -being installed. - -The `--no-shrinkwrap` argument, which will ignore an available -package-lock or shrinkwrap file and use the package.json instead. - -The `--no-package-lock` argument will prevent npm from creating a -`package-lock.json` file. When running with package-lock's disabled npm -will not automatically prune your node modules when installing. - -The `--nodedir=/path/to/node/source` argument will allow npm to find the -node source code so that npm can compile native modules. - -The `--only={prod[uction]|dev[elopment]}` argument will cause either only -`devDependencies` or only non-`devDependencies` to be installed regardless -of the `NODE_ENV`. - -The `--strict-peer-deps` argument will cause the install to fail on any -`peerDependencies` conflict, even if it's possible to use a heuristic to -provide a least-surprising resolution to a given conflict. - -See [`config`](/using-npm/config). Many of the configuration params have some -effect on installation, since that's most of what npm does. - -#### Algorithm - -Given a `package{dep}` structure: `A{B,C}, B{C}, C{D}`, -the npm install algorithm produces: - -```bash -A -+-- B -+-- C -+-- D -``` - -That is, the dependency from B to C is satisfied by the fact that A -already caused C to be installed at a higher level. D is still installed -at the top level because nothing conflicts with it. - -For `A{B,C}, B{C,D@1}, C{D@2}`, this algorithm produces: - -```bash -A -+-- B -+-- C - `-- D@2 -+-- D@1 -``` - -Because B's D@1 will be installed in the top-level, C now has to install D@2 -privately for itself. This algorithm is deterministic, but different trees may -be produced if two dependencies are requested for installation in a different -order. - -See [folders](/configuring-npm/folders) for a more detailed description of the -specific folder structures that npm creates. - -### See Also - -* [npm folders](/configuring-npm/folders) -* [npm update](/cli-commands/update) -* [npm audit](/cli-commands/audit) -* [npm fund](/cli-commands/fund) -* [npm link](/cli-commands/link) -* [npm rebuild](/cli-commands/rebuild) -* [npm scripts](/using-npm/scripts) -* [npm build](/cli-commands/build) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) -* [npm registry](/using-npm/registry) -* [npm dist-tag](/cli-commands/dist-tag) -* [npm uninstall](/cli-commands/uninstall) -* [npm shrinkwrap](/cli-commands/shrinkwrap) -* [package.json](/configuring-npm/package-json) -* [workspaces](/using-npm/workspaces) diff --git a/deps/npm/docs/content/cli-commands/npm-link.md b/deps/npm/docs/content/cli-commands/npm-link.md deleted file mode 100644 index 3f513868dfebd6..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-link.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -section: cli-commands -title: npm-link -description: Symlink a package folder ---- - -# npm-link(1) - -## Symlink a package folder - -### Synopsis - -```bash -npm link (in package dir) -npm link [<@scope>/][@] - -alias: npm ln -``` - -### Description - -Package linking is a two-step process. - -First, `npm link` in a package folder will create a symlink in the global folder -`{prefix}/lib/node_modules/` that links to the package where the `npm -link` command was executed. It will also link any bins in the package to `{prefix}/bin/{name}`. -Note that `npm link` uses the global prefix (see `npm prefix -g` for its value). - -Next, in some other location, `npm link package-name` will create a -symbolic link from globally-installed `package-name` to `node_modules/` -of the current folder. - -Note that `package-name` is taken from `package.json`, -not from directory name. - -The package name can be optionally prefixed with a scope. See [`scope`](/using-npm/npm-scope). -The scope must be preceded by an @-symbol and followed by a slash. - -When creating tarballs for `npm publish`, the linked packages are -"snapshotted" to their current state by resolving the symbolic links. - -This is handy for installing your own stuff, so that you can work on it and -test it iteratively without having to continually rebuild. - -For example: - -```bash - cd ~/projects/node-redis # go into the package directory - npm link # creates global link - cd ~/projects/node-bloggy # go into some other package directory. - npm link redis # link-install the package -``` - -Now, any changes to ~/projects/node-redis will be reflected in -~/projects/node-bloggy/node_modules/node-redis/. Note that the link should -be to the package name, not the directory name for that package. - -You may also shortcut the two steps in one. For example, to do the -above use-case in a shorter way: - -```bash -cd ~/projects/node-bloggy # go into the dir of your main project -npm link ../node-redis # link the dir of your dependency -``` - -The second line is the equivalent of doing: - -```bash -(cd ../node-redis; npm link) -npm link redis -``` - -That is, it first creates a global link, and then links the global -installation target into your project's `node_modules` folder. - -Note that in this case, you are referring to the directory name, `node-redis`, -rather than the package name `redis`. - -If your linked package is scoped (see [`scope`](/using-npm/npm-scope)) your link command must include that scope, e.g. - -```bash -npm link @myorg/privatepackage -``` - -### See Also - -* [npm developers](/using-npm/developers) -* [package.json](/configuring-npm/package-json) -* [npm- nstall](/cli-commands/install) -* [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/cli-commands/npm-logout.md b/deps/npm/docs/content/cli-commands/npm-logout.md deleted file mode 100644 index 5fb7100e8ef7d0..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-logout.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -section: cli-commands -title: npm-logout -description: Log out of the registry ---- - -# npm-logout(1) - -## Log out of the registry - -### Synopsis - -```bash -npm logout [--registry=] [--scope=<@scope>] -``` - -### Description - -When logged into a registry that supports token-based authentication, tell the -server to end this token's session. This will invalidate the token everywhere -you're using it, not just for the current environment. - -When logged into a legacy registry that uses username and password authentication, this will -clear the credentials in your user configuration. In this case, it will _only_ affect -the current environment. - -If `--scope` is provided, this will find the credentials for the registry -connected to that scope, if set. - -### Configuration - -#### registry - -Default: https://registry.npmjs.org/ - -The base URL of the npm package registry. If `scope` is also specified, -it takes precedence. - -#### scope - -Default: The scope of your current project, if any, otherwise none. - -If specified, you will be logged out of the specified scope. See [`scope`](/using-npm/npm-scope). - -```bash -npm logout --scope=@myco -``` - -### See Also - -* [npm adduser](/cli-commands/adduser) -* [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) -* [npm whoami](/cli-commands/whoami) diff --git a/deps/npm/docs/content/cli-commands/npm-ls.md b/deps/npm/docs/content/cli-commands/npm-ls.md deleted file mode 100644 index a3a0541a6c7c47..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-ls.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -section: cli-commands -title: npm-ls -description: List installed packages ---- - -# npm-ls(1) - -## List installed packages - -### Synopsis - -```bash -npm ls [[<@scope>/] ...] - -aliases: list, la, ll -``` - -### Description - -This command will print to stdout all the versions of packages that are -installed, as well as their dependencies, in a tree-structure. - -Positional arguments are `name@version-range` identifiers, which will -limit the results to only the paths to the packages named. Note that -nested packages will *also* show the paths to the specified packages. -For example, running `npm ls promzard` in npm's source tree will show: - -```bash - npm@@VERSION@ /path/to/npm - └─┬ init-package-json@0.0.4 - └── promzard@0.1.5 -``` - -It will print out extraneous, missing, and invalid packages. - -If a project specifies git urls for dependencies these are shown -in parentheses after the name@version to make it easier for users to -recognize potential forks of a project. - -The tree shown is the logical dependency tree, based on package -dependencies, not the physical layout of your node_modules folder. - -When run as `ll` or `la`, it shows extended information by default. - -### Configuration - -#### json - -* Default: false -* Type: Boolean - -Show information in JSON format. - -#### long - -* Default: false -* Type: Boolean - -Show extended information. - -#### parseable - -* Default: false -* Type: Boolean - -Show parseable output instead of tree view. - -#### global - -* Default: false -* Type: Boolean - -List packages in the global install prefix instead of in the current -project. - -#### depth - -* Type: Int - -Max display depth of the dependency tree. - -#### prod / production - -* Type: Boolean -* Default: false - -Display only the dependency tree for packages in `dependencies`. - -#### dev / development - -* Type: Boolean -* Default: false - -Display only the dependency tree for packages in `devDependencies`. - -#### only - -* Type: String - -When "dev" or "development", is an alias to `dev`. - -When "prod" or "production", is an alias to `production`. - -#### link - -* Type: Boolean -* Default: false - -Display only dependencies which are linked - -#### unicode - -* Type: Boolean -* Default: true - -Whether to represent the tree structure using unicode characters. -Set it to false in order to use all-ansi output. - -### See Also - -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) -* [npm folders](/configuring-npm/folders) -* [npm explain](/cli-commands/explain) -* [npm install](/cli-commands/install) -* [npm link](/cli-commands/link) -* [npm prune](/cli-commands/prune) -* [npm outdated](/cli-commands/outdated) -* [npm update](/cli-commands/update) diff --git a/deps/npm/docs/content/cli-commands/npm-outdated.md b/deps/npm/docs/content/cli-commands/npm-outdated.md deleted file mode 100644 index 084ed75dce770f..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-outdated.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -section: cli-commands -title: npm-outdated -description: Check for outdated packages ---- - -# npm-outdated(1) - -## Check for outdated packages - -### Synopsis - -```bash -npm outdated [[<@scope>/] ...] -``` - -### Description - -This command will check the registry to see if any (or, specific) installed -packages are currently outdated. - -In the output: - -* `wanted` is the maximum version of the package that satisfies the semver - range specified in `package.json`. If there's no available semver range (i.e. - you're running `npm outdated --global`, or the package isn't included in - `package.json`), then `wanted` shows the currently-installed version. -* `latest` is the version of the package tagged as latest in the registry. - Running `npm publish` with no special configuration will publish the package - with a dist-tag of `latest`. This may or may not be the maximum version of - the package, or the most-recently published version of the package, depending - on how the package's developer manages the latest [dist-tag](npm-dist-tag). -* `location` is where in the physical tree the package is located. -* `depended by` shows which package depends on the displayed dependency -* `package type` (when using `--long` / `-l`) tells you whether this package is - a `dependency` or a dev/peer/optional dependency. Packages not included in `package.json` - are always marked `dependencies`. -* `homepage` (when using `--long` / `-l`) is the `homepage` value contained in the package's packument -* Red means there's a newer version matching your semver requirements, so you should update now. -* Yellow indicates that there's a newer version above your semver requirements (usually new major, or new 0.x minor) so proceed with caution. - -### An example - -```bash -$ npm outdated -Package Current Wanted Latest Location Depended by -glob 5.0.15 5.0.15 6.0.1 node_modules/glob dependent-package-name -nothingness 0.0.3 git git node_modules/nothingness dependent-package-name -npm 3.5.1 3.5.2 3.5.1 node_modules/npm dependent-package-name -local-dev 0.0.3 linked linked local-dev dependent-package-name -once 1.3.2 1.3.3 1.3.3 node_modules/once dependent-package-name -``` - -With these `dependencies`: -```json -{ - "glob": "^5.0.15", - "nothingness": "github:othiym23/nothingness#master", - "npm": "^3.5.1", - "once": "^1.3.1" -} -``` - -A few things to note: - -* `glob` requires `^5`, which prevents npm from installing `glob@6`, which is - outside the semver range. -* Git dependencies will always be reinstalled, because of how they're specified. - The installed committish might satisfy the dependency specifier (if it's - something immutable, like a commit SHA), or it might not, so `npm outdated` and - `npm update` have to fetch Git repos to check. This is why currently doing a - reinstall of a Git dependency always forces a new clone and install. -* `npm@3.5.2` is marked as "wanted", but "latest" is `npm@3.5.1` because npm - uses dist-tags to manage its `latest` and `next` release channels. `npm update` - will install the _newest_ version, but `npm install npm` (with no semver range) - will install whatever's tagged as `latest`. -* `once` is just plain out of date. Reinstalling `node_modules` from scratch or - running `npm update` will bring it up to spec. - -### Configuration - -#### json - -* Default: false -* Type: Boolean - -Show information in JSON format. - -#### long - -* Default: false -* Type: Boolean - -Show extended information. - -#### parseable - -* Default: false -* Type: Boolean - -Show parseable output instead of tree view. - -#### global - -* Default: false -* Type: Boolean - -Check packages in the global install prefix instead of in the current -project. - -#### all - -* Default: false -* Type: Boolean - -Display all outdated dependencies on the tree. - -### See Also - -* [npm update](/cli-commands/update) -* [npm dist-tag](/cli-commands/dist-tag) -* [npm registry](/using-npm/registry) -* [npm folders](/configuring-npm/folders) diff --git a/deps/npm/docs/content/cli-commands/npm-owner.md b/deps/npm/docs/content/cli-commands/npm-owner.md deleted file mode 100644 index 7088cdaf5cb396..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-owner.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -section: cli-commands -title: npm-owner -description: Manage package owners ---- - -# npm-owner(1) -## Manage package owners - -### Synopsis - -```bash -npm owner add [<@scope>/] -npm owner rm [<@scope>/] -npm owner ls [<@scope>/] - -aliases: author -``` - -### Description - -Manage ownership of published packages. - -* ls: - List all the users who have access to modify a package and push new versions. - Handy when you need to know who to bug for help. -* add: - Add a new user as a maintainer of a package. This user is enabled to modify - metadata, publish new versions, and add other owners. -* rm: - Remove a user from the package owner list. This immediately revokes their - privileges. - -Note that there is only one level of access. Either you can modify a package, -or you can't. Future versions may contain more fine-grained access levels, but -that is not implemented at this time. - -If you have two-factor authentication enabled with `auth-and-writes` then -you'll need to include an otp on the command line when changing ownership -with `--otp`. - -### See Also - -* [npm publish](/cli-commands/publish) -* [npm registry](/using-npm/registry) -* [npm adduser](/cli-commands/adduser) -* [npm disputes](/using-npm/disputes) diff --git a/deps/npm/docs/content/cli-commands/npm-pack.md b/deps/npm/docs/content/cli-commands/npm-pack.md deleted file mode 100644 index d4774ff3716710..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-pack.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -section: cli-commands -title: npm-pack -description: Create a tarball from a package ---- - -# npm-pack(1) - -## Create a tarball from a package - -### Synopsis - -```bash -npm pack [[<@scope>/]...] [--dry-run] -``` - -### Description - -For anything that's installable (that is, a package folder, tarball, -tarball url, name@tag, name@version, name, or scoped name), this -command will fetch it to the cache, and then copy the tarball to the -current working directory as `-.tgz`, and then write -the filenames out to stdout. - -If the same package is specified multiple times, then the file will be -overwritten the second time. - -If no arguments are supplied, then npm packs the current package folder. - -The `--dry-run` argument will do everything that pack usually does without -actually packing anything. Reports on what would have gone into the tarball. - -### See Also - -* [npm cache](/cli-commands/cache) -* [npm publish](/cli-commands/publish) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/cli-commands/npm-prefix.md b/deps/npm/docs/content/cli-commands/npm-prefix.md deleted file mode 100644 index c6b1f7441bcd65..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-prefix.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -section: cli-commands -title: npm-prefix -description: Display prefix ---- - -# npm-prefix(1) - -## Display prefix - -### Synopsis - -```bash -npm prefix [-g] -``` - -### Description - -Print the local prefix to standard out. This is the closest parent directory -to contain a `package.json` file or `node_modules` directory, unless `-g` is -also specified. - -If `-g` is specified, this will be the value of the global prefix. See -[`npm config`](/cli-commands/config) for more detail. - -### See Also - -* [npm root](/cli-commands/root) -* [npm bin](/cli-commands/bin) -* [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/cli-commands/npm-profile.md b/deps/npm/docs/content/cli-commands/npm-profile.md deleted file mode 100644 index 7cc38e2c9c3fe3..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-profile.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -section: cli-commands -title: npm-profile -description: Change settings on your registry profile ---- - -# npm-profile(1) -## Change settings on your registry profile - -### Synopsis - -```bash -npm profile get [--json|--parseable] [] -npm profile set [--json|--parseable] -npm profile set password -npm profile enable-2fa [auth-and-writes|auth-only] -npm profile disable-2fa -``` - -### Description - -Change your profile information on the registry. This not be available if -you're using a non-npmjs registry. - -* `npm profile get []`: - Display all of the properties of your profile, or one or more specific - properties. It looks like: - -```bash -+-----------------+---------------------------+ -| name | example | -+-----------------+---------------------------+ -| email | me@example.com (verified) | -+-----------------+---------------------------+ -| two factor auth | auth-and-writes | -+-----------------+---------------------------+ -| fullname | Example User | -+-----------------+---------------------------+ -| homepage | | -+-----------------+---------------------------+ -| freenode | | -+-----------------+---------------------------+ -| twitter | | -+-----------------+---------------------------+ -| github | | -+-----------------+---------------------------+ -| created | 2015-02-26T01:38:35.892Z | -+-----------------+---------------------------+ -| updated | 2017-10-02T21:29:45.922Z | -+-----------------+---------------------------+ -``` - -* `npm profile set `: - Set the value of a profile property. You can set the following properties this way: - email, fullname, homepage, freenode, twitter, github - -* `npm profile set password`: - Change your password. This is interactive, you'll be prompted for your - current password and a new password. You'll also be prompted for an OTP - if you have two-factor authentication enabled. - -* `npm profile enable-2fa [auth-and-writes|auth-only]`: - Enables two-factor authentication. Defaults to `auth-and-writes` mode. Modes are: - * `auth-only`: Require an OTP when logging in or making changes to your - account's authentication. The OTP will be required on both the website - and the command line. - * `auth-and-writes`: Requires an OTP at all the times `auth-only` does, and also requires one when - publishing a module, setting the `latest` dist-tag, or changing access - via `npm access` and `npm owner`. - -* `npm profile disable-2fa`: - Disables two-factor authentication. - -### Details - -All of the `npm profile` subcommands accept `--json` and `--parseable` and -will tailor their output based on those. Some of these commands may not be -available on non npmjs.com registries. - -### See Also - -* [npm config](/cli-commands/config) diff --git a/deps/npm/docs/content/cli-commands/npm-prune.md b/deps/npm/docs/content/cli-commands/npm-prune.md deleted file mode 100644 index 586c2e7024642b..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-prune.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -section: cli-commands -title: npm-prune -description: Remove extraneous packages ---- - -# npm-prune(1) -## Remove extraneous packages - -### Synopsis - -```bash -npm prune [[<@scope>/]...] [--production] [--dry-run] [--json] -``` - -### Description - -This command removes "extraneous" packages. If a package name is -provided, then only packages matching one of the supplied names are -removed. - -Extraneous packages are packages that are not listed on the parent -package's dependencies list. - -If the `--production` flag is specified or the `NODE_ENV` environment -variable is set to `production`, this command will remove the packages -specified in your `devDependencies`. Setting `--no-production` will -negate `NODE_ENV` being set to `production`. - -If the `--dry-run` flag is used then no changes will actually be made. - -If the `--json` flag is used then the changes `npm prune` made (or would -have made with `--dry-run`) are printed as a JSON object. - -In normal operation with package-locks enabled, extraneous modules are -pruned automatically when modules are installed and you'll only need -this command with the `--production` flag. - -If you've disabled package-locks then extraneous modules will not be removed -and it's up to you to run `npm prune` from time-to-time to remove them. - -### See Also - -* [npm uninstall](/cli-commands/uninstall) -* [npm folders](/configuring-npm/folders) -* [npm ls](/cli-commands/ls) diff --git a/deps/npm/docs/content/cli-commands/npm-publish.md b/deps/npm/docs/content/cli-commands/npm-publish.md deleted file mode 100644 index 199377fa0df32d..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-publish.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -section: cli-commands -title: npm-publish -description: Publish a package ---- - -# npm-publish(1) - -## Publish a package - -### Synopsis -```bash -npm publish [|] [--tag ] [--access ] [--otp otpcode] [--dry-run] - -Publishes '.' if no argument supplied -Sets tag 'latest' if no --tag specified -``` - -### Description - -Publishes a package to the registry so that it can be installed by name. All -files in the package directory are included if no local `.gitignore` or -`.npmignore` file exists. If both files exist and a file is ignored by -`.gitignore` but not by `.npmignore` then it will be included. See -[`developers`](/using-npm/developers) for full details on what's included in the published package, as well as details on how the package is built. - -By default npm will publish to the public registry. This can be overridden by -specifying a different default registry or using a [`scope`](/using-npm/npm-scope) in the name (see [`package.json`](/configuring-npm/package-json)). - -* ``: - A folder containing a package.json file - -* ``: - A url or file path to a gzipped tar archive containing a single folder - with a package.json file inside. - -* `[--tag ]` - Registers the published package with the given tag, such that `npm install - @` will install this version. By default, `npm publish` updates - and `npm install` installs the `latest` tag. See [`npm-dist-tag`](npm-dist-tag) for - details about tags. - -* `[--access ]` - Tells the registry whether this package should be published as public or - restricted. Only applies to scoped packages, which default to `restricted`. - If you don't have a paid account, you must publish with `--access public` - to publish scoped packages. - -* `[--otp ]` - If you have two-factor authentication enabled in `auth-and-writes` mode - then you can provide a code from your authenticator with this. If you - don't include this and you're running from a TTY then you'll be prompted. - -* `[--dry-run]` - As of `npm@6`, does everything publish would do except actually publishing - to the registry. Reports the details of what would have been published. - -Fails if the package name and version combination already exists in -the specified registry. - -Once a package is published with a given name and version, that -specific name and version combination can never be used again, even if -it is removed with [`npm unpublish`](/cli-commands/unpublish). - -As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the -tarball will be submitted to the registry during publication. Subsequent -installs will use the strongest supported algorithm to verify downloads. - -Similar to `--dry-run` see [`npm pack`](/cli-commands/pack), which figures out the files to be -included and packs them into a tarball to be uploaded to the registry. - -### See Also - -* [npm registry](/using-npm/registry) -* [npm scope](/using-npm/scope) -* [npm adduser](/cli-commands/adduser) -* [npm owner](/cli-commands/owner) -* [npm deprecate](/cli-commands/deprecate) -* [npm dist-tag](/cli-commands/dist-tag) -* [npm pack](/cli-commands/pack) -* [npm profile](/cli-commands/profile) diff --git a/deps/npm/docs/content/cli-commands/npm-rebuild.md b/deps/npm/docs/content/cli-commands/npm-rebuild.md deleted file mode 100644 index 9503d6aae84263..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-rebuild.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -section: cli-commands -title: npm-rebuild -description: Rebuild a package ---- - -# npm-rebuild(1) - -## Rebuild a package - -### Synopsis - -```bash -npm rebuild [[<@scope>/]...] - -alias: npm rb -``` - -### Description - -This command runs the `npm build` command on the matched folders. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary. - -### See Also - -* [npm build](/cli-commands/build) -* [npm install](/cli-commands/install) diff --git a/deps/npm/docs/content/cli-commands/npm-repo.md b/deps/npm/docs/content/cli-commands/npm-repo.md deleted file mode 100644 index 04544347cfb55a..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-repo.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -section: cli-commands -title: npm-repo -description: Open package repository page in the browser ---- - -# npm-repo(1) - -## Open package repository page in the browser - -### Synopsis - -```bash -npm repo [ [ ...]] -``` - -### Description - -This command tries to guess at the likely location of a package's -repository URL, and then tries to open it using the `--browser` -config param. If no package name is provided, it will search for -a `package.json` in the current folder and use the `name` property. - -### Configuration - -#### browser - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: String or Boolean - -The browser that is called by the `npm repo` command to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - -### See Also - -* [npm docs](/cli-commands/docs) -* [npm config](/cli-commands/config) diff --git a/deps/npm/docs/content/cli-commands/npm-restart.md b/deps/npm/docs/content/cli-commands/npm-restart.md deleted file mode 100644 index 663b8f45066084..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-restart.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -section: cli-commands -title: npm-restart -description: Restart a package ---- - -# npm-restart(1) - -## Restart a package - -### Synopsis - -```bash -npm restart [-- ] -``` - -### Description - -This restarts a package. - -This runs a package's "stop", "restart", and "start" scripts, and associated -pre- and post- scripts, in the order given below: - -1. prerestart -2. prestop -3. stop -4. poststop -5. restart -6. prestart -7. start -8. poststart -9. postrestart - -### Note - -Note that the "restart" script is run **in addition to** the "stop" -and "start" scripts, not instead of them. - -This is the behavior as of `npm` major version 2. A change in this -behavior will be accompanied by an increase in major version number - -### See Also - -* [npm run-script](/cli-commands/run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/cli-commands/test) -* [npm start](/cli-commands/start) -* [npm stop](/cli-commands/stop) -* [npm restart](/cli-commands/restart) \ No newline at end of file diff --git a/deps/npm/docs/content/cli-commands/npm-root.md b/deps/npm/docs/content/cli-commands/npm-root.md deleted file mode 100644 index fce4490de78eac..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-root.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -section: cli-commands -title: npm-root -description: Display npm root ---- - -# npm-root(1) - -## Display npm root - -### Synopsis -```bash -npm root [-g] -``` - -### Description - -Print the effective `node_modules` folder to standard out. - -### See Also - -* [npm prefix](/cli-commands/prefix) -* [npm bin](/cli-commands/bin) -* [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/cli-commands/npm-run-script.md b/deps/npm/docs/content/cli-commands/npm-run-script.md deleted file mode 100644 index 1ee381e00f2f1e..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-run-script.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -section: cli-commands -title: npm-run-script -description: Run arbitrary package scripts ---- - -# npm-run-script(1) - -## Run arbitrary package scripts - -### Synopsis - -```bash -npm run-script [--silent] [-- ...] - -alias: npm run -``` - -### Description - -This runs an arbitrary command from a package's `"scripts"` object. If no -`"command"` is provided, it will list the available scripts. `run[-script]` is -used by the test, start, restart, and stop commands, but can be called -directly, as well. When the scripts in the package are printed out, they're -separated into lifecycle (test, start, restart) and directly-run scripts. - -As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can -use custom arguments when executing scripts. The special option `--` is used by -[getopt](https://goo.gl/KxMmtG) to delimit the end of the options. npm will pass -all the arguments after the `--` directly to your script: - -```bash -npm run test -- --grep="pattern" -``` - -The arguments will only be passed to the script specified after ```npm run``` -and not to any pre or post script. - -The `env` script is a special built-in command that can be used to list -environment variables that will be available to the script at runtime. If an -"env" command is defined in your package, it will take precedence over the -built-in. - -In addition to the shell's pre-existing `PATH`, `npm run` adds -`node_modules/.bin` to the `PATH` provided to scripts. Any binaries provided by -locally-installed dependencies can be used without the `node_modules/.bin` -prefix. For example, if there is a `devDependency` on `tap` in your package, -you should write: - -```bash -"scripts": {"test": "tap test/\*.js"} -``` - -instead of - -```bash -"scripts": {"test": "node_modules/.bin/tap test/\*.js"} -``` - -to run your tests. - -The actual shell your script is run within is platform dependent. By default, -on Unix-like systems it is the `/bin/sh` command, on Windows it is the `cmd.exe`. -The actual shell referred to by `/bin/sh` also depends on the system. -As of [`npm@5.1.0`](https://github.com/npm/npm/releases/tag/v5.1.0) you can -customize the shell with the `script-shell` configuration. - -Scripts are run from the root of the module, regardless of what your current -working directory is when you call `npm run`. If you want your script to -use different behavior based on what subdirectory you're in, you can use the -`INIT_CWD` environment variable, which holds the full path you were in when -you ran `npm run`. - -`npm run` sets the `NODE` environment variable to the `node` executable with -which `npm` is executed. Also, if the `--scripts-prepend-node-path` is passed, -the directory within which `node` resides is added to the -`PATH`. If `--scripts-prepend-node-path=auto` is passed (which has been the -default in `npm` v3), this is only performed when that `node` executable is -not found in the `PATH`. - -If you try to run a script without having a `node_modules` directory and it fails, -you will be given a warning to run `npm install`, just in case you've forgotten. - -You can use the `--silent` flag to prevent showing `npm ERR!` output on error. - -You can use the `--if-present` flag to avoid exiting with a non-zero exit code -when the script is undefined. This lets you run potentially undefined scripts -without breaking the execution chain. - -### See Also - -* [npm scripts](/using-npm/scripts) -* [npm test](/cli-commands/test) -* [npm start](/cli-commands/start) -* [npm restart](/cli-commands/restart) -* [npm stop](/cli-commands/stop) -* [npm config](/cli-commands/config) diff --git a/deps/npm/docs/content/cli-commands/npm-star.md b/deps/npm/docs/content/cli-commands/npm-star.md deleted file mode 100644 index 440d15d05c652e..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-star.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -section: cli-commands -title: npm-star -description: Mark your favorite packages ---- - -# npm-star(1) - -## Mark your favorite packages - -### Synopsis - -```bash -npm star [...] -npm unstar [...] -``` - -### Description - -"Starring" a package means that you have some interest in it. It's -a vaguely positive way to show that you care. - -"Unstarring" is the same thing, but in reverse. - -It's a boolean thing. Starring repeatedly has no additional effect. - -### See Also - -* [npm view](/cli-commands/view) -* [npm whoami](/cli-commands/whoami) -* [npm adduser](/cli-commands/adduser) diff --git a/deps/npm/docs/content/cli-commands/npm-stars.md b/deps/npm/docs/content/cli-commands/npm-stars.md deleted file mode 100644 index 87b1664ef8595d..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-stars.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -section: cli-commands -title: npm-stars -description: View packages marked as favorites ---- - -# npm-stars(1) - -## View packages marked as favorites - -### Synopsis -```bash -npm stars [] -``` - -### Description - -If you have starred a lot of neat things and want to find them again -quickly this command lets you do just that. - -You may also want to see your friend's favorite packages, in this case -you will most certainly enjoy this command. - -### See Also - -* [npm star](/cli-commands/star) -* [npm view](/cli-commands/view) -* [npm whoami](/cli-commands/whoami) -* [npm adduser](/cli-commands/adduser) diff --git a/deps/npm/docs/content/cli-commands/npm-start.md b/deps/npm/docs/content/cli-commands/npm-start.md deleted file mode 100644 index 70221c9926a5d8..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-start.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -section: cli-commands -title: npm-start -description: Start a package ---- - -# npm-start(1) - -## Start a package - -### Synopsis - -```bash -npm start [-- ] -``` - -### Description - -This runs an arbitrary command specified in the package's `"start"` property of -its `"scripts"` object. If no `"start"` property is specified on the -`"scripts"` object, it will run `node server.js`. - -As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can -use custom arguments when executing scripts. Refer to [`npm run-script`](/cli-commands/run-script) for more details. - -### See Also - -* [npm run-script](/cli-commands/run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/cli-commands/test) -* [npm restart](/cli-commands/restart) -* [npm stop](/cli-commands/stop) diff --git a/deps/npm/docs/content/cli-commands/npm-stop.md b/deps/npm/docs/content/cli-commands/npm-stop.md deleted file mode 100644 index 889f04ec41e3e2..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-stop.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -section: cli-commands -title: npm-stop -description: Stop a package ---- - -# npm-stop(1) - -## Stop a package - -### Synopsis - -```bash -npm stop [-- ] -``` - -### Description - -This runs a package's "stop" script, if one was provided. - -### See Also - -* [npm run-script](/cli-commands/run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/cli-commands/test) -* [npm start](/cli-commands/start) -* [npm restart](/cli-commands/restart) diff --git a/deps/npm/docs/content/cli-commands/npm-test.md b/deps/npm/docs/content/cli-commands/npm-test.md deleted file mode 100644 index 11900fd2fbf5e1..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-test.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -section: cli-commands -title: npm-test -description: Test a package ---- - -# npm-test(1) - -## Test a package - -### Synopsis - -```bash -npm test [-- ] - -aliases: t, tst -``` - -### Description - -This runs a package's "test" script, if one was provided. - -### See Also - -* [npm run-script](/cli-commands/run-script) -* [npm scripts](/using-npm/scripts) -* [npm start](/cli-commands/start) -* [npm restart](/cli-commands/restart) -* [npm stop](/cli-commands/stop) diff --git a/deps/npm/docs/content/cli-commands/npm-whoami.md b/deps/npm/docs/content/cli-commands/npm-whoami.md deleted file mode 100644 index d82f1f89732def..00000000000000 --- a/deps/npm/docs/content/cli-commands/npm-whoami.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -section: cli-commands -title: npm-whoami -description: Display npm username ---- - -# npm-whoami(1) -## Display npm username - -### Synopsis - -```bash -npm whoami [--registry ] -``` - -### Description - -Print the `username` config to standard output. - -### See Also - -* [npm config](/cli-commands/config) -* [npmrc](/configuring-npm/npmrc) -* [npm adduser](/cli-commands/adduser) diff --git a/deps/npm/docs/content/cli-commands/npm-access.md b/deps/npm/docs/content/commands/npm-access.md similarity index 86% rename from deps/npm/docs/content/cli-commands/npm-access.md rename to deps/npm/docs/content/commands/npm-access.md index f4088fe8855139..ed9c7775745ce2 100644 --- a/deps/npm/docs/content/cli-commands/npm-access.md +++ b/deps/npm/docs/content/commands/npm-access.md @@ -1,13 +1,9 @@ --- -section: cli-commands title: npm-access +section: 1 description: Set access level on published packages --- -# npm-access(1) - -## Set access level on published packages - ### Synopsis ```bash @@ -75,11 +71,12 @@ You must have privileges to set the access of a package: * You have been given read-write privileges for a package, either as a member of a team or directly as an owner. -If you have two-factor authentication enabled then you'll have to pass in an -otp with `--otp` when making access changes. +If you have two-factor authentication enabled then you'll be prompted to +provide an otp token, or may use the `--otp=...` option to specify it on +the command line. -If your account is not paid, then attempts to publish scoped packages will fail -with an HTTP 402 status code (logically enough), unless you use +If your account is not paid, then attempts to publish scoped packages will +fail with an HTTP 402 status code (logically enough), unless you use `--access=public`. Management of teams and team memberships is done with the `npm team` command. @@ -87,7 +84,7 @@ Management of teams and team memberships is done with the `npm team` command. ### See Also * [`libnpmaccess`](https://npm.im/libnpmaccess) -* [npm team](/cli-commands/team) -* [npm publish](/cli-commands/publish) -* [npm config](/cli-commands/config) +* [npm team](/commands/npm-team) +* [npm publish](/commands/npm-publish) +* [npm config](/commands/npm-config) * [npm registry](/using-npm/registry) diff --git a/deps/npm/docs/content/cli-commands/npm-adduser.md b/deps/npm/docs/content/commands/npm-adduser.md similarity index 86% rename from deps/npm/docs/content/cli-commands/npm-adduser.md rename to deps/npm/docs/content/commands/npm-adduser.md index ec61cdd39acbad..7960869ad33cce 100644 --- a/deps/npm/docs/content/cli-commands/npm-adduser.md +++ b/deps/npm/docs/content/commands/npm-adduser.md @@ -1,13 +1,9 @@ - --- -section: cli-commands +--- title: npm-adduser -description: Set access level on published packages +section: 1 +description: Add a registry user account --- -# npm-adduser(1) - -## Add a registry user account - ### Synopsis ```bash @@ -54,8 +50,8 @@ with the specified scope. See [`scope`](/using-npm/scope). You can use both at t e.g. ```bash - npm adduser --registry=http://myregistry.example.com --scope=@myco -``` +npm adduser --registry=http://myregistry.example.com --scope=@myco +``` This will set a registry for the given scope and login or create a user for that registry at the same time. @@ -69,7 +65,7 @@ registry should include authorization information. Useful for private registries. Can be used with `--registry` and / or `--scope`, e.g. ```bash - npm adduser --registry=http://private-registry.example.com --always-auth +npm adduser --registry=http://private-registry.example.com --always-auth ``` This will ensure that all requests to that registry (including for tarballs) @@ -89,7 +85,7 @@ username/password entry in legacy npm. ### See Also * [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) +* [npm config](/commands/npm-config) * [npmrc](/configuring-npm/npmrc) -* [npm owner](/cli-commands/owner) -* [npm whoami](/cli-commands/whoami) +* [npm owner](/commands/npm-owner) +* [npm whoami](/commands/npm-whoami) diff --git a/deps/npm/docs/content/commands/npm-audit.md b/deps/npm/docs/content/commands/npm-audit.md new file mode 100644 index 00000000000000..2c0a8f58047ca2 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-audit.md @@ -0,0 +1,194 @@ +--- +title: npm-audit +section: 1 +description: Run a security audit +--- + +### Synopsis + +```bash +npm audit [--json] [--production] [--audit-level=(low|moderate|high|critical)] +npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)] + +common options: [--production] [--only=(dev|prod)] +``` + +### Description + +The audit command submits a description of the dependencies configured in +your project to your default registry and asks for a report of known +vulnerabilities. If any vulnerabilities are found, then the impact and +appropriate remediation will be calculated. If the `fix` argument is +provided, then remediations will be applied to the package tree. + +The command will exit with a 0 exit code if no vulnerabilities were found. + +Note that some vulnerabilities cannot be fixed automatically and will +require manual intervention or review. Also note that since `npm audit +fix` runs a full-fledged `npm install` under the hood, all configs that +apply to the installer will also apply to `npm install` -- so things like +`npm audit fix --package-lock-only` will work as expected. + +By default, the audit command will exit with a non-zero code if any +vulnerability is found. It may be useful in CI environments to include the +`--audit-level` parameter to specify the minimum vulnerability level that +will cause the command to fail. This option does not filter the report +output, it simply changes the command's failure threshold. + +### Audit Endpoints + +There are two audit endpoints that npm may use to fetch vulnerability +information: the `Bulk Advisory` endpoint and the `Quick Audit` endpoint. + +#### Bulk Advisory Endpoint + +As of version 7, npm uses the much faster `Bulk Advisory` endpoint to +optimize the speed of calculating audit results. + +npm will generate a JSON payload with the name and list of versions of each +package in the tree, and POST it to the default configured registry at +the path `/-/npm/v1/security/advisories/bulk`. + +Any packages in the tree that do not have a `version` field in their +package.json file will be ignored. If any `--omit` options are specified +(either via the `--omit` config, or one of the shorthands such as +`--production`, `--only=dev`, and so on), then packages will be omitted +from the submitted payload as appropriate. + +If the registry responds with an error, or with an invalid response, then +npm will attempt to load advisory data from the `Quick Audit` endpoint. + +The expected result will contain a set of advisory objects for each +dependency that matches the advisory range. Each advisory object contains +a `name`, `url`, `id`, `severity`, `vulnerable_versions`, and `title`. + +npm then uses these advisory objects to calculate vulnerabilities and +meta-vulnerabilities of the dependencies within the tree. + +#### Quick Audit Endpoint + +If the `Bulk Advisory` endpoint returns an error, or invalid data, npm will +attempt to load advisory data from the `Quick Audit` endpoint, which is +considerably slower in most cases. + +The full package tree as found in `package-lock.json` is submitted, along +with the following pieces of additional metadata: + +* `npm_version` +* `node_version` +* `platform` +* `arch` +* `node_env` + +All packages in the tree are submitted to the Quick Audit endpoint. +Omitted dependency types are skipped when generating the report. + +#### Scrubbing + +Out of an abundance of caution, npm versions 5 and 6 would "scrub" any +packages from the submitted report if their name contained a `/` character, +so as to avoid leaking the names of potentially private packages or git +URLs. + +However, in practice, this resulted in audits often failing to properly +detect meta-vulnerabilities, because the tree would appear to be invalid +due to missing dependencies, and prevented the detection of vulnerabilities +in package trees that used git dependencies or private modules. + +This scrubbing has been removed from npm as of version 7. + +#### Calculating Meta-Vulnerabilities and Remediations + +npm uses the +[`@npmcli/metavuln-calculator`](http://npm.im/@npmcli/metavuln-calculator) +module to turn a set of security advisories into a set of "vulnerability" +objects. A "meta-vulnerability" is a dependency that is vulnerable by +virtue of dependence on vulnerable versions of a vulnerable package. + +For example, if the package `foo` is vulnerable in the range `>=1.0.2 +<2.0.0`, and the package `bar` depends on `foo@^1.1.0`, then that version +of `bar` can only be installed by installing a vulnerable version of `foo`. +In this case, `bar` is a "metavulnerability". + +Once metavulnerabilities for a given package are calculated, they are +cached in the `~/.npm` folder and only re-evaluated if the advisory range +changes, or a new version of the package is published (in which case, the +new version is checked for metavulnerable status as well). + +If the chain of metavulnerabilities extends all the way to the root +project, and it cannot be updated without changing its dependency ranges, +then `npm audit fix` will require the `--force` option to apply the +remediation. If remediations do not require changes to the dependency +ranges, then all vulnerable packages will be updated to a version that does +not have an advisory or metavulnerability posted against it. + +### Exit Code + +The `npm audit` command will exit with a 0 exit code if no vulnerabilities +were found. The `npm audit fix` command will exit with 0 exit code if no +vulnerabilities are found _or_ if the remediation is able to successfully +fix all vulnerabilities. + +If vulnerabilities were found the exit code will depend on the +`audit-level` configuration setting. + +### Examples + +Scan your project for vulnerabilities and automatically install any compatible +updates to vulnerable dependencies: + +```bash +$ npm audit fix +``` + +Run `audit fix` without modifying `node_modules`, but still updating the +pkglock: + +```bash +$ npm audit fix --package-lock-only +``` + +Skip updating `devDependencies`: + +```bash +$ npm audit fix --only=prod +``` + +Have `audit fix` install SemVer-major updates to toplevel dependencies, not +just SemVer-compatible ones: + +```bash +$ npm audit fix --force +``` + +Do a dry run to get an idea of what `audit fix` will do, and _also_ output +install information in JSON format: + +```bash +$ npm audit fix --dry-run --json +``` + +Scan your project for vulnerabilities and just show the details, without +fixing anything: + +```bash +$ npm audit +``` + +Get the detailed audit report in JSON format: + +```bash +$ npm audit --json +``` + +Fail an audit only if the results include a vulnerability with a level of moderate or higher: + +```bash +$ npm audit --audit-level=moderate +``` + +### See Also + +* [npm install](/commands/npm-install) +* [package-locks](/configuring-npm/package-locks) +* [config](/using-npm/config) diff --git a/deps/npm/docs/content/commands/npm-bin.md b/deps/npm/docs/content/commands/npm-bin.md new file mode 100644 index 00000000000000..4303040e78dacc --- /dev/null +++ b/deps/npm/docs/content/commands/npm-bin.md @@ -0,0 +1,23 @@ +--- +title: npm-bin +section: 1 +description: Display npm bin folder +--- + +### Synopsis + +```bash +npm bin [-g|--global] +``` + +### Description + +Print the folder where npm will install executables. + +### See Also + +* [npm prefix](/commands/npm-prefix) +* [npm root](/commands/npm-root) +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/commands/npm-bugs.md b/deps/npm/docs/content/commands/npm-bugs.md new file mode 100644 index 00000000000000..dd1ab299f9c550 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-bugs.md @@ -0,0 +1,51 @@ +--- +title: npm-bugs +section: 1 +description: Report bugs for a package in a web browser +--- + +### Synopsis + +```bash +npm bugs [ [ ...]] + +aliases: issues +``` + +### Description + +This command tries to guess at the likely location of a package's bug +tracker URL, and then tries to open it using the `--browser` config param. +If no package name is provided, it will search for a `package.json` in the +current folder and use the `name` property. + +### Configuration + +#### browser + +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` +* Type: String or Boolean + +The browser that is called by the `npm bugs` command to open websites. + +Set to `false` to suppress browser behavior and instead print urls to +terminal. + +Set to `true` to use default system URL opener. + +#### registry + +* Default: https://registry.npmjs.org/ +* Type: url + +The base URL of the npm package registry. + +### See Also + +* [npm docs](/commands/npm-docs) +* [npm view](/commands/npm-view) +* [npm publish](/commands/npm-publish) +* [npm registry](/using-npm/registry) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [package.json](/configuring-npm/package-json) diff --git a/deps/npm/docs/content/commands/npm-cache.md b/deps/npm/docs/content/commands/npm-cache.md new file mode 100644 index 00000000000000..13386f2c4a439c --- /dev/null +++ b/deps/npm/docs/content/commands/npm-cache.md @@ -0,0 +1,93 @@ +--- +title: npm-cache +section: 1 +description: Manipulates packages cache +--- + +### Synopsis + +```bash +npm cache add +npm cache add +npm cache add +npm cache add @ + +npm cache clean +aliases: npm cache clear, npm cache rm + +npm cache verify +``` + +### Description + +Used to add, list, or clean the npm cache folder. + +* add: + Add the specified package to the local cache. This command is primarily + intended to be used internally by npm, but it can provide a way to + add data to the local installation cache explicitly. + +* clean: + Delete all data out of the cache folder. Note that this is typically + unnecessary, as npm's cache is self-healing and resistant to data + corruption issues. + +* verify: + Verify the contents of the cache folder, garbage collecting any unneeded + data, and verifying the integrity of the cache index and all cached data. + +### Details + +npm stores cache data in an opaque directory within the configured `cache`, +named `_cacache`. This directory is a +[`cacache`](http://npm.im/cacache)-based content-addressable cache that +stores all http request data as well as other package-related data. This +directory is primarily accessed through `pacote`, the library responsible +for all package fetching as of npm@5. + +All data that passes through the cache is fully verified for integrity on +both insertion and extraction. Cache corruption will either trigger an +error, or signal to `pacote` that the data must be refetched, which it will +do automatically. For this reason, it should never be necessary to clear +the cache for any reason other than reclaiming disk space, thus why `clean` +now requires `--force` to run. + +There is currently no method exposed through npm to inspect or directly +manage the contents of this cache. In order to access it, `cacache` must be +used directly. + +npm will not remove data by itself: the cache will grow as new packages are +installed. + +### A note about the cache's design + +The npm cache is strictly a cache: it should not be relied upon as a +persistent and reliable data store for package data. npm makes no guarantee +that a previously-cached piece of data will be available later, and will +automatically delete corrupted contents. The primary guarantee that the +cache makes is that, if it does return data, that data will be exactly the +data that was inserted. + +To run an offline verification of existing cache contents, use `npm cache +verify`. + +### Configuration + +#### cache + +Default: `~/.npm` on Posix, or `%AppData%/npm-cache` on Windows. + +The root cache folder. + +### See Also + +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [npm install](/commands/npm-install) +* [npm publish](/commands/npm-publish) +* [npm pack](/commands/npm-pack) +* https://npm.im/cacache +* https://npm.im/pacote +* https://npm.im/@npmcli/arborist +* https://npm.im/make-fetch-happen diff --git a/deps/npm/docs/content/commands/npm-ci.md b/deps/npm/docs/content/commands/npm-ci.md new file mode 100644 index 00000000000000..0d874f4f27a50f --- /dev/null +++ b/deps/npm/docs/content/commands/npm-ci.md @@ -0,0 +1,71 @@ +--- +title: npm-ci +section: 1 +description: Install a project with a clean slate +--- + +### Synopsis + +```bash +npm ci +``` + +### Description + +This command is similar to [`npm install`](/cli-commands/install), except +it's meant to be used in automated environments such as test platforms, +continuous integration, and deployment -- or any situation where you want +to make sure you're doing a clean install of your dependencies. + +`npm ci` will be significantly faster when: + +- There is a `package-lock.json` or `npm-shrinkwrap.json` file. +- The `node_modules` folder is missing or empty. + +In short, the main differences between using `npm install` and `npm ci` are: + +* The project **must** have an existing `package-lock.json` or + `npm-shrinkwrap.json`. +* If dependencies in the package lock do not match those in `package.json`, + `npm ci` will exit with an error, instead of updating the package lock. +* `npm ci` can only install entire projects at a time: individual + dependencies cannot be added with this command. +* If a `node_modules` is already present, it will be automatically removed + before `npm ci` begins its install. +* It will never write to `package.json` or any of the package-locks: + installs are essentially frozen. + +### Example + +Make sure you have a package-lock and an up-to-date install: + +```bash +$ cd ./my/npm/project +$ npm install +added 154 packages in 10s +$ ls | grep package-lock +``` + +Run `npm ci` in that project + +```bash +$ npm ci +added 154 packages in 5s +``` + +Configure Travis to build using `npm ci` instead of `npm install`: + +```bash +# .travis.yml +install: +- npm ci +# keep the npm cache around to speed up installs +cache: + directories: + - "$HOME/.npm" +``` + +### See Also + +* [npm install](/commands/npm-install) +* [package-locks](/configuring-npm/package-locks) diff --git a/deps/npm/docs/content/cli-commands/npm-completion.md b/deps/npm/docs/content/commands/npm-completion.md similarity index 89% rename from deps/npm/docs/content/cli-commands/npm-completion.md rename to deps/npm/docs/content/commands/npm-completion.md index 59bfca503e0846..53737c8033194b 100644 --- a/deps/npm/docs/content/cli-commands/npm-completion.md +++ b/deps/npm/docs/content/commands/npm-completion.md @@ -1,14 +1,11 @@ --- -section: cli-commands title: npm-completion +section: 1 description: Tab Completion for npm --- -# npm-completion(1) - -## Tab Completion for npm - ### Synopsis + ```bash source <(npm completion) ``` @@ -39,4 +36,4 @@ completions based on the arguments. ### See Also * [npm developers](/using-npm/developers) -* [npm](/cli-commands/npm) +* [npm](/commands/npm) diff --git a/deps/npm/docs/content/commands/npm-config.md b/deps/npm/docs/content/commands/npm-config.md new file mode 100644 index 00000000000000..51caa5a61b6075 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-config.md @@ -0,0 +1,100 @@ +--- +title: npm-config +section: 1 +description: Manage the npm configuration files +--- + +### Synopsis + +```bash +npm config set = [= ...] +npm config get [ [ ...]] +npm config delete [ ...] +npm config list [--json] +npm config edit +npm set = [= ...] +npm get [ [ ...]] + +alias: c +``` + +### Description + +npm gets its config settings from the command line, environment +variables, `npmrc` files, and in some cases, the `package.json` file. + +See [npmrc](/configuring-npm/npmrc) for more information about the npmrc +files. + +See [config(7)](/using-npm/config) for a more thorough explanation of the +mechanisms involved, and a full list of config options available. + +The `npm config` command can be used to update and edit the contents +of the user and global npmrc files. + +### Sub-commands + +Config supports the following sub-commands: + +#### set + +```bash +npm config set key=value [key=value...] +npm set key=value [key=value...] +``` + +Sets each of the config keys to the value provided. + +If value is omitted, then it sets it to an empty string. + +Note: for backwards compatibility, `npm config set key value` is supported +as an alias for `npm config set key=value`. + +#### get + +```bash +npm config get [key ...] +npm get [key ...] +``` + +Echo the config value(s) to stdout. + +If multiple keys are provided, then the values will be prefixed with the +key names. + +If no keys are provided, then this command behaves the same as `npm config +list`. + +#### list + +```bash +npm config list +``` + +Show all the config settings. Use `-l` to also show defaults. Use `--json` +to show the settings in json format. + +#### delete + +```bash +npm config delete key [key ...] +``` + +Deletes the specified keys from all configuration files. + +#### edit + +```bash +npm config edit +``` + +Opens the config file in an editor. Use the `--global` flag to edit the +global config. + +### See Also + +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [package.json](/configuring-npm/package-json) +* [npmrc](/configuring-npm/npmrc) +* [npm](/commands/npm) diff --git a/deps/npm/docs/content/commands/npm-dedupe.md b/deps/npm/docs/content/commands/npm-dedupe.md new file mode 100644 index 00000000000000..9b14e99dd14f02 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-dedupe.md @@ -0,0 +1,79 @@ +--- +title: npm-dedupe +section: 1 +description: Reduce duplication +--- + +### Synopsis + +```bash +npm dedupe +npm ddp + +aliases: find-dupes, ddp +``` + +### Description + +Searches the local package tree and attempts to simplify the overall +structure by moving dependencies further up the tree, where they can +be more effectively shared by multiple dependent packages. + +For example, consider this dependency graph: + +``` +a ++-- b <-- depends on c@1.0.x +| `-- c@1.0.3 +`-- d <-- depends on c@~1.0.9 + `-- c@1.0.10 +``` + +In this case, `npm dedupe` will transform the tree to: + +```bash +a ++-- b ++-- d +`-- c@1.0.10 +``` + +Because of the hierarchical nature of node's module lookup, b and d +will both get their dependency met by the single c package at the root +level of the tree. + +In some cases, you may have a dependency graph like this: + +``` +a ++-- b <-- depends on c@1.0.x ++-- c@1.0.3 +`-- d <-- depends on c@1.x + `-- c@1.9.9 +``` + +During the installation process, the `c@1.0.3` dependency for `b` was +placed in the root of the tree. Though `d`'s dependency on `c@1.x` could +have been satisfied by `c@1.0.3`, the newer `c@1.9.0` dependency was used, +because npm favors updates by default, even when doing so causes +duplication. + +Running `npm dedupe` will cause npm to note the duplication and +re-evaluate, deleting the nested `c` module, because the one in the root is +sufficient. + +To prefer deduplication over novelty during the installation process, run +`npm install --prefer-dedupe` or `npm config set prefer-dedupe true`. + +Arguments are ignored. Dedupe always acts on the entire tree. + +Note that this operation transforms the dependency tree, but will never +result in new modules being installed. + +Using `npm find-dupes` will run the command in `--dry-run` mode. + +### See Also + +* [npm ls](/cli-commands/ls) +* [npm update](/cli-commands/update) +* [npm install](/cli-commands/install) diff --git a/deps/npm/docs/content/commands/npm-deprecate.md b/deps/npm/docs/content/commands/npm-deprecate.md new file mode 100644 index 00000000000000..139441856bb068 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-deprecate.md @@ -0,0 +1,46 @@ +--- +title: npm-deprecate +section: 1 +description: Deprecate a version of a package +--- + +### Synopsis + +```bash +npm deprecate [@] +``` + +### Description + +This command will update the npm registry entry for a package, providing a +deprecation warning to all who attempt to install it. + +It works on [version ranges](https://semver.npmjs.com/) as well as specific +versions, so you can do something like this: + +```bash +npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3" +``` + +SemVer ranges passed to this command are interpreted such that they *do* +include prerelease versions. For example: + +```bash +npm deprecate my-thing@1.x "1.x is no longer supported" +``` + +In this case, a version `my-thing@1.0.0-beta.0` will also be deprecated. + +You must be the package owner to deprecate something. See the `owner` and +`adduser` help topics. + +To un-deprecate a package, specify an empty string (`""`) for the `message` +argument. Note that you must use double quotes with no space between them to +format an empty string. + +### See Also + +* [npm publish](/commands/npm-publish) +* [npm registry](/using-npm/registry) +* [npm owner](/cli-commands/owner) +* [npm owner](/cli-commands/adduser) diff --git a/deps/npm/docs/content/commands/npm-dist-tag.md b/deps/npm/docs/content/commands/npm-dist-tag.md new file mode 100644 index 00000000000000..585da16ad2d2c4 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-dist-tag.md @@ -0,0 +1,98 @@ +--- +title: npm-dist-tag +section: 1 +description: Modify package distribution tags +--- + +### Synopsis + +```bash +npm dist-tag add @ [] +npm dist-tag rm +npm dist-tag ls [] + +aliases: dist-tags +``` + +### Description + +Add, remove, and enumerate distribution tags on a package: + +* add: Tags the specified version of the package with the specified tag, or + the `--tag` config if not specified. If you have two-factor + authentication on auth-and-writes then you’ll need to include a one-time + password on the command line with `--otp `, or at the + OTP prompt. + +* rm: Clear a tag that is no longer in use from the package. If you have + two-factor authentication on auth-and-writes then you’ll need to include + a one-time password on the command line with `--otp `, + or at the OTP prompt. + +* ls: Show all of the dist-tags for a package, defaulting to the package in + the current prefix. This is the default action if none is specified. + +A tag can be used when installing packages as a reference to a version instead +of using a specific version number: + +```bash +npm install @ +``` + +When installing dependencies, a preferred tagged version may be specified: + +```bash +npm install --tag +``` + +(This also applies to any other commands that resolve and install +dependencies, such as `npm dedupe`, `npm update`, and `npm audit fix`.) + +Publishing a package sets the `latest` tag to the published version unless the +`--tag` option is used. For example, `npm publish --tag=beta`. + +By default, `npm install ` (without any `@` or `@` +specifier) installs the `latest` tag. + +### Purpose + +Tags can be used to provide an alias instead of version numbers. + +For example, a project might choose to have multiple streams of development +and use a different tag for each stream, e.g., `stable`, `beta`, `dev`, +`canary`. + +By default, the `latest` tag is used by npm to identify the current version +of a package, and `npm install ` (without any `@` or `@` +specifier) installs the `latest` tag. Typically, projects only use the +`latest` tag for stable release versions, and use other tags for unstable +versions such as prereleases. + +The `next` tag is used by some projects to identify the upcoming version. + +Other than `latest`, no tag has any special significance to npm itself. + +### Caveats + +This command used to be known as `npm tag`, which only created new tags, +and so had a different syntax. + +Tags must share a namespace with version numbers, because they are +specified in the same slot: `npm install @` vs +`npm install @`. + +Tags that can be interpreted as valid semver ranges will be rejected. For +example, `v1.4` cannot be used as a tag, because it is interpreted by +semver as `>=1.4.0 <1.5.0`. See . + +The simplest way to avoid semver problems with tags is to use tags that do +not begin with a number or the letter `v`. + +### See Also + +* [npm publish](/commands/npm-publish) +* [npm install](/commands/npm-install) +* [npm dedupe](/commands/npm-dedupe) +* [npm registry](/using-npm/registry) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/commands/npm-docs.md b/deps/npm/docs/content/commands/npm-docs.md new file mode 100644 index 00000000000000..c66e5fc627d66c --- /dev/null +++ b/deps/npm/docs/content/commands/npm-docs.md @@ -0,0 +1,51 @@ +--- +title: npm-docs +section: 1 +description: Open documentation for a package in a web browser +--- + +### Synopsis + +```bash +npm docs [ [ ...]] + +aliases: home +``` + +### Description + +This command tries to guess at the likely location of a package's +documentation URL, and then tries to open it using the `--browser` config +param. You can pass multiple package names at once. If no package name is +provided, it will search for a `package.json` in the current folder and use +the `name` property. + +### Configuration + +#### browser + +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` +* Type: String or Boolean + +The browser that is called by the `npm docs` command to open websites. + +Set to `false` to suppress browser behavior and instead print urls to +terminal. + +Set to `true` to use default system URL opener. + +#### registry + +* Default: https://registry.npmjs.org/ +* Type: url + +The base URL of the npm package registry. + +### See Also + +* [npm view](/commands/npm-view) +* [npm publish](/commands/npm-publish) +* [npm registry](/using-npm/registry) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [package.json](/configuring-npm/package-json) diff --git a/deps/npm/docs/content/commands/npm-doctor.md b/deps/npm/docs/content/commands/npm-doctor.md new file mode 100644 index 00000000000000..2aceee23903316 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-doctor.md @@ -0,0 +1,107 @@ +--- +title: npm-doctor +section: 1 +description: Check your npm environment +--- + +### Synopsis + +```bash +npm doctor +``` + +### Description + +`npm doctor` runs a set of checks to ensure that your npm installation has +what it needs to manage your JavaScript packages. npm is mostly a +standalone tool, but it does have some basic requirements that must be met: + ++ Node.js and git must be executable by npm. ++ The primary npm registry, `registry.npmjs.com`, or another service that + uses the registry API, is available. ++ The directories that npm uses, `node_modules` (both locally and + globally), exist and can be written by the current user. ++ The npm cache exists, and the package tarballs within it aren't corrupt. + +Without all of these working properly, npm may not work properly. Many +issues are often attributable to things that are outside npm's code base, +so `npm doctor` confirms that the npm installation is in a good state. + +Also, in addition to this, there are also very many issue reports due to +using old versions of npm. Since npm is constantly improving, running +`npm@latest` is better than an old version. + +`npm doctor` verifies the following items in your environment, and if there +are any recommended changes, it will display them. + +#### `npm ping` + +By default, npm installs from the primary npm registry, +`registry.npmjs.org`. `npm doctor` hits a special ping endpoint within the +registry. This can also be checked with `npm ping`. If this check fails, +you may be using a proxy that needs to be configured, or may need to talk +to your IT staff to get access over HTTPS to `registry.npmjs.org`. + +This check is done against whichever registry you've configured (you can +see what that is by running `npm config get registry`), and if you're using +a private registry that doesn't support the `/whoami` endpoint supported by +the primary registry, this check may fail. + +#### `npm -v` + +While Node.js may come bundled with a particular version of npm, it's the +policy of the CLI team that we recommend all users run `npm@latest` if they +can. As the CLI is maintained by a small team of contributors, there are +only resources for a single line of development, so npm's own long-term +support releases typically only receive critical security and regression +fixes. The team believes that the latest tested version of npm is almost +always likely to be the most functional and defect-free version of npm. + +#### `node -v` + +For most users, in most circumstances, the best version of Node will be the +latest long-term support (LTS) release. Those of you who want access to new +ECMAscript features or bleeding-edge changes to Node's standard library may +be running a newer version, and some may be required to run an older +version of Node because of enterprise change control policies. That's OK! +But in general, the npm team recommends that most users run Node.js LTS. + +#### `npm config get registry` + +You may be installing from private package registries for your project or +company. That's great! Others may be following tutorials or StackOverflow +questions in an effort to troubleshoot problems you may be having. +Sometimes, this may entail changing the registry you're pointing at. This +part of `npm doctor` just lets you, and maybe whoever's helping you with +support, know that you're not using the default registry. + +#### `which git` + +While it's documented in the README, it may not be obvious that npm needs +Git installed to do many of the things that it does. Also, in some cases +– especially on Windows – you may have Git set up in such a way that it's +not accessible via your `PATH` so that npm can find it. This check ensures +that Git is available. + +#### Permissions checks + +* Your cache must be readable and writable by the user running npm. +* Global package binaries must be writable by the user running npm. +* Your local `node_modules` path, if you're running `npm doctor` with a + project directory, must be readable and writable by the user running npm. + +#### Validate the checksums of cached packages + +When an npm package is published, the publishing process generates a +checksum that npm uses at install time to verify that the package didn't +get corrupted in transit. `npm doctor` uses these checksums to validate the +package tarballs in your local cache (you can see where that cache is +located with `npm config get cache`). In the event that there are corrupt +packages in your cache, you should probably run `npm cache clean -f` and +reset the cache. + +### See Also + +* [npm bugs](/commands/npm-bugs) +* [npm help](/commands/npm-help) +* [npm ping](/commands/npm-ping) diff --git a/deps/npm/docs/content/commands/npm-edit.md b/deps/npm/docs/content/commands/npm-edit.md new file mode 100644 index 00000000000000..40fac0408529a2 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-edit.md @@ -0,0 +1,42 @@ +--- +title: npm-edit +section: 1 +description: Edit an installed package +--- + +### Synopsis + +```bash +npm edit +``` + +### Description + +Selects a dependency in the current project and opens the package folder in +the default editor (or whatever you've configured as the npm `editor` +config -- see [`npm-config`](npm-config).) + +After it has been edited, the package is rebuilt so as to pick up any +changes in compiled packages. + +For instance, you can do `npm install connect` to install connect +into your package, and then `npm edit connect` to make a few +changes to your locally installed copy. + +### Configuration + +#### editor + +* Default: `EDITOR` environment variable if set, or `"vi"` on Posix, + or `"notepad"` on Windows. +* Type: path + +The command to run for `npm edit` or `npm config edit`. + +### See Also + +* [npm folders](/configuring-npm/folders) +* [npm explore](/commands/npm-explore) +* [npm install](/commands/npm-install) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/cli-commands/npm-exec.md b/deps/npm/docs/content/commands/npm-exec.md similarity index 83% rename from deps/npm/docs/content/cli-commands/npm-exec.md rename to deps/npm/docs/content/commands/npm-exec.md index 29b7a06e51863f..3ae30fa0cba9a7 100644 --- a/deps/npm/docs/content/cli-commands/npm-exec.md +++ b/deps/npm/docs/content/commands/npm-exec.md @@ -1,29 +1,28 @@ --- -section: cli-commands title: npm-exec +section: 1 description: Run a command from a local or remote npm package --- -# npm-exec(1) - -## Run a command from a local or remote npm package - ### Synopsis ```bash npm exec -- [@] [args...] -npm exec -p [@] -- [args...] +npm exec --package=[@] -- [args...] npm exec -c ' [args...]' -npm exec -p foo -c ' [args...]' +npm exec --package=foo -c ' [args...]' npx [@] [args...] npx -p [@] [args...] npx -c ' [args...]' npx -p [@] -c ' [args...]' +Run without --call or positional args to open interactive subshell alias: npm x, npx --p --package= (may be specified multiple times) +common options: +--package= (may be specified multiple times) +-p is a shorthand for --package only when using npx executable -c --call= (may not be mixed with positional arguments) ``` @@ -33,9 +32,14 @@ This command allows you to run an arbitrary command from an npm package (either one installed locally, or fetched remotely), in a similar context as running it via `npm run`. -Whatever packages are specified by the `--package` or `-p` option will be +Run without positional arguments or `--call`, this allows you to +interactively run commands in the same sort of shell environment that +`package.json` scripts are run. Interactive mode is not supported in CI +environments when standard input is a TTY, to prevent hangs. + +Whatever packages are specified by the `--package` option will be provided in the `PATH` of the executed command, along with any locally -installed package executables. The `--package` or `-p` option may be +installed package executables. The `--package` option may be specified multiple times, to execute the supplied command in an environment where all specified packages are available. @@ -51,13 +55,14 @@ only be considered a match if they have the exact same name and version as the local dependency. If no `-c` or `--call` option is provided, then the positional arguments -are used to generate the command string. If no `-p` or `--package` options +are used to generate the command string. If no `--package` options are provided, then npm will attempt to determine the executable name from the package specifier provided as the first positional argument according to the following heuristic: - If the package has a single entry in its `bin` field in `package.json`, - then that command will be used. + or if all entries are aliases of the same command, then that command + will be used. - If the package has multiple `bin` entries, and one of them matches the unscoped portion of the `name` field, then that command will be used. - If this does not result in exactly one option (either because there are @@ -170,10 +175,10 @@ This resulted in some shifts in its functionality: ### See Also -* [npm run-script](/cli-commands/run-script) +* [npm run-script](/commands/npm-run-script) * [npm scripts](/using-npm/scripts) -* [npm test](/cli-commands/test) -* [npm start](/cli-commands/start) -* [npm restart](/cli-commands/restart) -* [npm stop](/cli-commands/stop) -* [npm config](/cli-commands/config) +* [npm test](/commands/npm-test) +* [npm start](/commands/npm-start) +* [npm restart](/commands/npm-restart) +* [npm stop](/commands/npm-stop) +* [npm config](/commands/npm-config) diff --git a/deps/npm/docs/content/cli-commands/npm-explain.md b/deps/npm/docs/content/commands/npm-explain.md similarity index 81% rename from deps/npm/docs/content/cli-commands/npm-explain.md rename to deps/npm/docs/content/commands/npm-explain.md index e4c73529b06f24..ec63ec34f26d8a 100644 --- a/deps/npm/docs/content/cli-commands/npm-explain.md +++ b/deps/npm/docs/content/commands/npm-explain.md @@ -1,17 +1,15 @@ --- -section: cli-commands title: npm-explain +section: 1 description: Explain installed packages --- -# npm-explain(1) - -## Explain installed packages - ### Synopsis ```bash npm explain + +alias: why ``` ### Description @@ -60,18 +58,18 @@ node_modules/nyc/node_modules/find-up #### json * Default: false -* Type: Bolean +* Type: Boolean Show information in JSON format. ### See Also -* [npm config](/cli-commands/config) +* [npm config](/commands/npm-config) * [npmrc](/configuring-npm/npmrc) * [npm folders](/configuring-npm/folders) -* [npm ls](/cli-commands/ls) -* [npm install](/cli-commands/install) -* [npm link](/cli-commands/link) -* [npm prune](/cli-commands/prune) -* [npm outdated](/cli-commands/outdated) -* [npm update](/cli-commands/update) +* [npm ls](/commands/npm-ls) +* [npm install](/commands/npm-install) +* [npm link](/commands/npm-link) +* [npm prune](/commands/npm-prune) +* [npm outdated](/commands/npm-outdated) +* [npm update](/commands/npm-update) diff --git a/deps/npm/docs/content/cli-commands/npm-explore.md b/deps/npm/docs/content/commands/npm-explore.md similarity index 78% rename from deps/npm/docs/content/cli-commands/npm-explore.md rename to deps/npm/docs/content/commands/npm-explore.md index dfa4d9c0737412..e467a755753b4f 100644 --- a/deps/npm/docs/content/cli-commands/npm-explore.md +++ b/deps/npm/docs/content/commands/npm-explore.md @@ -1,13 +1,9 @@ - --- -section: cli-commands +--- title: npm-explore +section: 1 description: Browse an installed package --- -# npm-explore(1) - -## Browse an installed package - ### Synopsis ```bash @@ -44,7 +40,7 @@ The shell to run for the `npm explore` command. ### See Also * [npm folders](/configuring-npm/folders) -* [npm edit](/cli-commands/edit) -* [npm rebuild](/cli-commands/rebuild) -* [npm build](/cli-commands/build) -* [npm install](/cli-commands/install) +* [npm edit](/commands/npm-edit) +* [npm rebuild](/commands/npm-rebuild) +* [npm build](/commands/npm-build) +* [npm install](/commands/npm-install) diff --git a/deps/npm/docs/content/commands/npm-fund.md b/deps/npm/docs/content/commands/npm-fund.md new file mode 100644 index 00000000000000..aa1b26b9a8971b --- /dev/null +++ b/deps/npm/docs/content/commands/npm-fund.md @@ -0,0 +1,63 @@ +--- +title: npm-fund +section: 1 +description: Retrieve funding information +--- + +### Synopsis + +```bash +npm fund [] +``` + +### Description + +This command retrieves information on how to fund the dependencies of a +given project. If no package name is provided, it will list all +dependencies that are looking for funding in a tree structure, listing the +type of funding and the url to visit. If a package name is provided then it +tries to open its funding url using the `--browser` config param; if there +are multiple funding sources for the package, the user will be instructed +to pass the `--which` option to disambiguate. + +The list will avoid duplicated entries and will stack all packages that +share the same url as a single entry. Thus, the list does not have the same +shape of the output from `npm ls`. + +### Configuration + +#### browser + +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` +* Type: String + +The browser that is called by the `npm fund` command to open websites. + +#### json + +* Type: Boolean +* Default: false + +Show information in JSON format. + +#### unicode + +* Type: Boolean +* Default: true + +Whether to represent the tree structure using unicode characters. +Set it to `false` in order to use all-ansi output. + +#### which + +* Type: Number +* Default: undefined + +If there are multiple funding sources, which 1-indexed source URL to open. + +## See Also + +* [npm install](/commands/npm-install) +* [npm docs](/commands/npm-docs) +* [npm ls](/commands/npm-ls) +* [npm config](/commands/npm-config) diff --git a/deps/npm/docs/content/commands/npm-help-search.md b/deps/npm/docs/content/commands/npm-help-search.md new file mode 100644 index 00000000000000..e10638efa07d95 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-help-search.md @@ -0,0 +1,39 @@ +--- +title: npm-help-search +section: 1 +description: Search npm help documentation +--- + +### Synopsis + +```bash +npm help-search +``` + +### Description + +This command will search the npm markdown documentation files for the terms +provided, and then list the results, sorted by relevance. + +If only one result is found, then it will show that help topic. + +If the argument to `npm help` is not a known help topic, then it will call +`help-search`. It is rarely if ever necessary to call this command +directly. + +### Configuration + +#### long + +* Type: Boolean +* Default: false + +If true, the "long" flag will cause help-search to output context around +where the terms were found in the documentation. + +If false, then help-search will just list out the help topics found. + +### See Also + +* [npm](/commands/npm) +* [npm help](/commands/npm-help) diff --git a/deps/npm/docs/content/commands/npm-help.md b/deps/npm/docs/content/commands/npm-help.md new file mode 100644 index 00000000000000..56e46645522baf --- /dev/null +++ b/deps/npm/docs/content/commands/npm-help.md @@ -0,0 +1,40 @@ +--- +title: npm-help +section: 1 +description: Get help on npm +--- + +### Synopsis + +```bash +npm help [] +``` + +### Description + +If supplied a topic, then show the appropriate documentation page. + +If the topic does not exist, or if multiple terms are provided, then npm +will run the `help-search` command to find a match. Note that, if +`help-search` finds a single subject, then it will run `help` on that +topic, so unique matches are equivalent to specifying a topic name. + +### Configuration + +#### viewer + +* Default: "man" on Posix, "browser" on Windows +* Type: path + +The program to use to view help content. + +Set to `"browser"` to view html help content in the default web browser. + +### See Also + +* [npm](/commands/npm) +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [package.json](/configuring-npm/package-json) +* [npm help-search](/commands/npm-help-search) diff --git a/deps/npm/docs/content/commands/npm-hook.md b/deps/npm/docs/content/commands/npm-hook.md new file mode 100644 index 00000000000000..2ac548ada0c21f --- /dev/null +++ b/deps/npm/docs/content/commands/npm-hook.md @@ -0,0 +1,86 @@ +--- +title: npm-hook +section: 1 +description: Manage registry hooks +--- + +### Synopsis + +```bash +npm hook ls [pkg] +npm hook add +npm hook update [secret] +npm hook rm +``` + +### Description + +Allows you to manage [npm +hooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm), +including adding, removing, listing, and updating. + +Hooks allow you to configure URL endpoints that will be notified whenever a +change happens to any of the supported entity types. Three different types +of entities can be watched by hooks: packages, owners, and scopes. + +To create a package hook, simply reference the package name. + +To create an owner hook, prefix the owner name with `~` (as in, +`~youruser`). + +To create a scope hook, prefix the scope name with `@` (as in, +`@yourscope`). + +The hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls` +for that particular hook. + +The shared secret will be sent along to the URL endpoint so you can verify +the request came from your own configured hook. + +### Example + +Add a hook to watch a package for changes: + +```bash +$ npm hook add lodash https://example.com/ my-shared-secret +``` + +Add a hook to watch packages belonging to the user `substack`: + +```bash +$ npm hook add ~substack https://example.com/ my-shared-secret +``` + +Add a hook to watch packages in the scope `@npm` + +```bash +$ npm hook add @npm https://example.com/ my-shared-secret +``` + +List all your active hooks: + +```bash +$ npm hook ls +``` + +List your active hooks for the `lodash` package: + +```bash +$ npm hook ls lodash +``` + +Update an existing hook's url: + +```bash +$ npm hook update id-deadbeef https://my-new-website.here/ +``` + +Remove a hook: + +```bash +$ npm hook rm id-deadbeef +``` + +### See Also + +* ["Introducing Hooks" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm) diff --git a/deps/npm/docs/content/commands/npm-init.md b/deps/npm/docs/content/commands/npm-init.md new file mode 100644 index 00000000000000..3eac923175b5a1 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-init.md @@ -0,0 +1,79 @@ +--- +title: npm-init +section: 1 +description: create a package.json file +--- + +### Synopsis + +```bash +npm init [--force|-f|--yes|-y|--scope] +npm init <@scope> (same as `npx <@scope>/create`) +npm init [<@scope>/] (same as `npx [<@scope>/]create-`) +``` + +### Description + +`npm init ` can be used to set up a new or existing npm +package. + +`initializer` in this case is an npm package named `create-`, +which will be installed by [`npx`](https://npm.im/npx), and then have its +main bin executed -- presumably creating or updating `package.json` and +running any other initialization-related operations. + +The init command is transformed to a corresponding `npx` operation as +follows: + +* `npm init foo` -> `npx create-foo` +* `npm init @usr/foo` -> `npx @usr/create-foo` +* `npm init @usr` -> `npx @usr/create` + +Any additional options will be passed directly to the command, so `npm init +foo -- --hello` will map to `npx create-foo --hello`. + +If the initializer is omitted (by just calling `npm init`), init will fall +back to legacy init behavior. It will ask you a bunch of questions, and +then write a package.json for you. It will attempt to make reasonable +guesses based on existing fields, dependencies, and options selected. It is +strictly additive, so it will keep any fields and values that were already +set. You can also use `-y`/`--yes` to skip the questionnaire altogether. If +you pass `--scope`, it will create a scoped package. + +### Examples + +Create a new React-based project using +[`create-react-app`](https://npm.im/create-react-app): + +```bash +$ npm init react-app ./my-react-app +``` + +Create a new `esm`-compatible package using +[`create-esm`](https://npm.im/create-esm): + +```bash +$ mkdir my-esm-lib && cd my-esm-lib +$ npm init esm --yes +``` + +Generate a plain old package.json using legacy init: + +```bash +$ mkdir my-npm-pkg && cd my-npm-pkg +$ git init +$ npm init +``` + +Generate it without having it ask any questions: + +```bash +$ npm init -y +``` + +### See Also + +* [init-package-json module](http://npm.im/init-package-json) +* [package.json](/configuring-npm/package-json) +* [npm version](/commands/npm-version) +* [npm scope](/using-npm/scope) diff --git a/deps/npm/docs/content/commands/npm-install-ci-test.md b/deps/npm/docs/content/commands/npm-install-ci-test.md new file mode 100644 index 00000000000000..568d174cf44c5e --- /dev/null +++ b/deps/npm/docs/content/commands/npm-install-ci-test.md @@ -0,0 +1,23 @@ +--- +title: npm-install-ci-test +section: 1 +description: Install a project with a clean slate and run tests +--- + +### Synopsis + +```bash +npm install-ci-test + +alias: npm cit +``` + +### Description + +This command runs `npm ci` followed immediately by `npm test`. + +### See Also + +* [npm install-test](/commands/npm-install-test) +* [npm ci](/commands/npm-ci) +* [npm test](/commands/npm-test) diff --git a/deps/npm/docs/content/cli-commands/npm-install-test.md b/deps/npm/docs/content/commands/npm-install-test.md similarity index 81% rename from deps/npm/docs/content/cli-commands/npm-install-test.md rename to deps/npm/docs/content/commands/npm-install-test.md index 58b8844b4fcfff..6350c5d01ad701 100644 --- a/deps/npm/docs/content/cli-commands/npm-install-test.md +++ b/deps/npm/docs/content/commands/npm-install-test.md @@ -1,13 +1,9 @@ --- -section: cli-commands title: npm-install-test +section: 1 description: Install package(s) and run tests --- -# npm install-test(1) - -## Install package(s) and run tests - ### Synopsis ```bash @@ -31,5 +27,6 @@ takes exactly the same arguments as `npm install`. ### See Also -* [npm install](/cli-commands/install) -* [npm test](/cli-commands/test) +* [npm install](/commands/npm-install) +* [npm install-ci-test](/commands/npm-install-ci-test) +* [npm test](/commands/npm-test) diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md new file mode 100644 index 00000000000000..5ab9275ee4eaf5 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-install.md @@ -0,0 +1,549 @@ +--- +title: npm-install +section: 1 +description: Install a package +--- + +### Synopsis + +```bash +npm install (with no args, in package dir) +npm install [<@scope>/] +npm install [<@scope>/]@ +npm install [<@scope>/]@ +npm install [<@scope>/]@ +npm install @npm: +npm install :/ +npm install +npm install +npm install +npm install + +aliases: npm i, npm add +common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run] +``` + +### Description + +This command installs a package and any packages that it depends on. If the +package has a package-lock, or an npm shrinkwrap file, or a yarn lock file, +the installation of dependencies will be driven by that, respecting the +following order of precedence: + +* `npm-shrinkwrap.json` +* `package-lock.json` +* `yarn.lock` + +See [package-lock.json](/configuring-npm/package-lock-json) and +[`npm shrinkwrap`](/commands/npm-shrinkwrap). + +A `package` is: + +* a) a folder containing a program described by a + [`package.json`](/configuring-npm/package-json) file +* b) a gzipped tarball containing (a) +* c) a url that resolves to (b) +* d) a `@` that is published on the registry (see + [`registry`](/using-npm/registry)) with (c) +* e) a `@` (see [`npm dist-tag`](/commands/npm-dist-tag)) that + points to (d) +* f) a `` that has a "latest" tag satisfying (e) +* g) a `` that resolves to (a) + +Even if you never publish your package, you can still get a lot of benefits +of using npm if you just want to write a node program (a), and perhaps if +you also want to be able to easily install it elsewhere after packing it up +into a tarball (b). + + +* `npm install` (in a package directory, no arguments): + + Install the dependencies in the local `node_modules` folder. + + In global mode (ie, with `-g` or `--global` appended to the command), + it installs the current package context (ie, the current working + directory) as a global package. + + By default, `npm install` will install all modules listed as + dependencies in [`package.json`](/configuring-npm/package-json). + + With the `--production` flag (or when the `NODE_ENV` environment + variable is set to `production`), npm will not install modules listed + in `devDependencies`. To install all modules listed in both + `dependencies` and `devDependencies` when `NODE_ENV` environment + variable is set to `production`, you can use `--production=false`. + + > NOTE: The `--production` flag has no particular meaning when adding a + dependency to a project. + +* `npm install `: + + Install the package in the directory as a symlink in the current + project. Its dependencies will be installed before it's linked. If + `` sits inside the root of your project, its dependencies may + be hoisted to the top-level `node_modules` as they would for other + types of dependencies. + +* `npm install `: + + Install a package that is sitting on the filesystem. Note: if you just + want to link a dev directory into your npm root, you can do this more + easily by using [`npm link`](/commands/npm-link). + + Tarball requirements: + * The filename *must* use `.tar`, `.tar.gz`, or `.tgz` as the + extension. + * The package contents should reside in a subfolder inside the tarball + (usually it is called `package/`). npm strips one directory layer + when installing the package (an equivalent of `tar x + --strip-components=1` is run). + * The package must contain a `package.json` file with `name` and + `version` properties. + + Example: + + ```bash + npm install ./package.tgz + ``` + +* `npm install `: + + Fetch the tarball url, and then install it. In order to distinguish between + this and other options, the argument must start with "http://" or "https://" + + Example: + + ```bash + npm install https://github.com/indexzero/forever/tarball/v0.5.6 + ``` + +* `npm install [<@scope>/]`: + + Do a `@` install, where `` is the "tag" config. (See + [`config`](/using-npm/config). The config's default value is `latest`.) + + In most cases, this will install the version of the modules tagged as + `latest` on the npm registry. + + Example: + + ```bash + npm install sax + ``` + + `npm install` saves any specified packages into `dependencies` by default. + Additionally, you can control where and how they get saved with some + additional flags: + + * `-P, --save-prod`: Package will appear in your `dependencies`. This + is the default unless `-D` or `-O` are present. + + * `-D, --save-dev`: Package will appear in your `devDependencies`. + + * `-O, --save-optional`: Package will appear in your + `optionalDependencies`. + + * `--no-save`: Prevents saving to `dependencies`. + + When using any of the above options to save dependencies to your + package.json, there are two additional, optional flags: + + * `-E, --save-exact`: Saved dependencies will be configured with an + exact version rather than using npm's default semver range operator. + + * `-B, --save-bundle`: Saved dependencies will also be added to your + `bundleDependencies` list. + + Further, if you have an `npm-shrinkwrap.json` or `package-lock.json` + then it will be updated as well. + + `` is optional. The package will be downloaded from the registry + associated with the specified scope. If no registry is associated with + the given scope the default registry is assumed. See + [`scope`](/using-npm/scope). + + Note: if you do not include the @-symbol on your scope name, npm will + interpret this as a GitHub repository instead, see below. Scopes names + must also be followed by a slash. + + Examples: + + ```bash + npm install sax + npm install githubname/reponame + npm install @myorg/privatepackage + npm install node-tap --save-dev + npm install dtrace-provider --save-optional + npm install readable-stream --save-exact + npm install ansi-regex --save-bundle + ``` + + **Note**: If there is a file or folder named `` in the current + working directory, then it will try to install that, and only try to + fetch the package by name if it is not valid. + +* `npm install @npm:`: + + Install a package under a custom alias. Allows multiple versions of + a same-name package side-by-side, more convenient import names for + packages with otherwise long ones, and using git forks replacements + or forked npm packages as replacements. Aliasing works only on your + project and does not rename packages in transitive dependencies. + Aliases should follow the naming conventions stated in + [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules). + + Examples: + + ```bash + npm install my-react@npm:react + npm install jquery2@npm:jquery@2 + npm install jquery3@npm:jquery@3 + npm install npa@npm:npm-package-arg + ``` + +* `npm install [<@scope>/]@`: + + Install the version of the package that is referenced by the specified tag. + If the tag does not exist in the registry data for that package, then this + will fail. + + Example: + + ```bash + npm install sax@latest + npm install @myorg/mypackage@latest + ``` + +* `npm install [<@scope>/]@`: + + Install the specified version of the package. This will fail if the + version has not been published to the registry. + + Example: + + ```bash + npm install sax@0.1.1 + npm install @myorg/privatepackage@1.5.0 + ``` + +* `npm install [<@scope>/]@`: + + Install a version of the package matching the specified version range. + This will follow the same rules for resolving dependencies described in + [`package.json`](/configuring-npm/package-json). + + Note that most version ranges must be put in quotes so that your shell + will treat it as a single argument. + + Example: + + ```bash + npm install sax@">=0.1.0 <0.2.0" + npm install @myorg/privatepackage@"16 - 17" + ``` + +* `npm install `: + + Installs the package from the hosted git provider, cloning it with + `git`. For a full git remote url, only that URL will be attempted. + + ```bash + ://[[:]@][:][:][/][# | #semver:] + ``` + + `` is one of `git`, `git+ssh`, `git+http`, `git+https`, or + `git+file`. + + If `#` is provided, it will be used to clone exactly that + commit. If the commit-ish has the format `#semver:`, `` + can be any valid semver range or exact version, and npm will look for + any tags or refs matching that range in the remote repository, much as + it would for a registry dependency. If neither `#` or + `#semver:` is specified, then the default branch of the + repository is used. + + If the repository makes use of submodules, those submodules will be + cloned as well. + + If the package being installed contains a `prepare` script, its + `dependencies` and `devDependencies` will be installed, and the prepare + script will be run, before the package is packaged and installed. + + The following git environment variables are recognized by npm and will + be added to the environment when running git: + + * `GIT_ASKPASS` + * `GIT_EXEC_PATH` + * `GIT_PROXY_COMMAND` + * `GIT_SSH` + * `GIT_SSH_COMMAND` + * `GIT_SSL_CAINFO` + * `GIT_SSL_NO_VERIFY` + + See the git man page for details. + + Examples: + + ```bash + npm install git+ssh://git@github.com:npm/cli.git#v1.0.27 + npm install git+ssh://git@github.com:npm/cli#pull/273 + npm install git+ssh://git@github.com:npm/cli#semver:^5.0 + npm install git+https://isaacs@github.com/npm/cli.git + npm install git://github.com/npm/cli.git#v1.0.27 + GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git + ``` + +* `npm install /[#]`: +* `npm install github:/[#]`: + + Install the package at `https://github.com/githubname/githubrepo` by + attempting to clone it using `git`. + + If `#` is provided, it will be used to clone exactly that + commit. If the commit-ish has the format `#semver:`, `` + can be any valid semver range or exact version, and npm will look for + any tags or refs matching that range in the remote repository, much as + it would for a registry dependency. If neither `#` or + `#semver:` is specified, then `master` is used. + + As with regular git dependencies, `dependencies` and `devDependencies` + will be installed if the package has a `prepare` script before the + package is done installing. + + Examples: + + ```bash + npm install mygithubuser/myproject + npm install github:mygithubuser/myproject + ``` + +* `npm install gist:[/][#|#semver:]`: + + Install the package at `https://gist.github.com/gistID` by attempting to + clone it using `git`. The GitHub username associated with the gist is + optional and will not be saved in `package.json`. + + As with regular git dependencies, `dependencies` and `devDependencies` will + be installed if the package has a `prepare` script before the package is + done installing. + + Example: + + ```bash + npm install gist:101a11beef + ``` + +* `npm install bitbucket:/[#]`: + + Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo` + by attempting to clone it using `git`. + + If `#` is provided, it will be used to clone exactly that + commit. If the commit-ish has the format `#semver:`, `` can + be any valid semver range or exact version, and npm will look for any tags + or refs matching that range in the remote repository, much as it would for a + registry dependency. If neither `#` or `#semver:` is + specified, then `master` is used. + + As with regular git dependencies, `dependencies` and `devDependencies` will + be installed if the package has a `prepare` script before the package is + done installing. + + Example: + + ```bash + npm install bitbucket:mybitbucketuser/myproject + ``` + +* `npm install gitlab:/[#]`: + + Install the package at `https://gitlab.com/gitlabname/gitlabrepo` + by attempting to clone it using `git`. + + If `#` is provided, it will be used to clone exactly that + commit. If the commit-ish has the format `#semver:`, `` can + be any valid semver range or exact version, and npm will look for any tags + or refs matching that range in the remote repository, much as it would for a + registry dependency. If neither `#` or `#semver:` is + specified, then `master` is used. + + As with regular git dependencies, `dependencies` and `devDependencies` will + be installed if the package has a `prepare` script before the package is + done installing. + + Example: + + ```bash + npm install gitlab:mygitlabuser/myproject + npm install gitlab:myusr/myproj#semver:^5.0 + ``` + +You may combine multiple arguments and even multiple types of arguments. +For example: + +```bash +npm install sax@">=0.1.0 <0.2.0" bench supervisor +``` + +The `--tag` argument will apply to all of the specified install targets. If +a tag with the given name exists, the tagged version is preferred over +newer versions. + +The `--dry-run` argument will report in the usual way what the install +would have done without actually installing anything. + +The `--package-lock-only` argument will only update the +`package-lock.json`, instead of checking `node_modules` and downloading +dependencies. + +The `-f` or `--force` argument will force npm to fetch remote resources +even if a local copy exists on disk. + +```bash +npm install sax --force +``` + +### Configuration + +See the [`config`](/using-npm/config) help doc. Many of the configuration +params have some effect on installation, since that's most of what npm +does. + +These are some of the most common options related to installation. + +#### Configuration Options Affecting Dependency Resolution And Tree Design + +* `-g` or `--global`: install the package globally rather than locally. + See [folders](/configuring-npm/folders). + +* `--global-style`: install the package into your local `node_modules` + folder with the same layout it uses with the global `node_modules` + folder. Only your direct dependencies will show in `node_modules` and + everything they depend on will be flattened in their `node_modules` + folders. This obviously will eliminate some deduping. + +* `--legacy-bundling`: install the package in the style of versions of npm + prior to 1.4, where dependencies are not automatically deduped up to the + shallowest level in the tree possible. This is extremely + disk-inefficient. + +* `--legacy-peer-deps`: ignore all `peerDependencies` when installing, in + the style of npm version 4 through version 6. + +* `--strict-peer-deps`: fail and abort the install process for any + conflicting peerDependencies when encountered. By default, npm will only + crash for peerDependencies conflicts caused by the direct dependencies of + the root project. + +* `--no-package-lock` (alias: `--no-shrinkwrap`): do not read the + lockfile (`package-lock.json` or `npm-shrinkwrap.json`) for the intended + package tree, and do not save the resulting package tree back to a + lockfile. + +#### Omitting Dependency Types + +You may omit certain types of dependencies by using the `--omit=` +config option. This may be specified multiple types on the command line. +To enter `omit` options in `.npmrc` files, use the following syntax: + +```ini +omit[] = dev +omit[] = optional +; etc... +``` + +The dependency types that may be omitted or included are: + +* `peer`: any `peerDependencies`, including those with a + `peerDependenciesMeta` entry specifying `optional: true` +* `optional`: dependencies listed in `optionalDependencies` +* `dev`: dependencies listed in `devDependencies` + +To re-include dependency, use the `--include` option, which may also be +specified multiple times. + +Legacy shorthands for `omit` settings are: + +* `--no-optional`: prevent optionalDependencies from being installed. Note + that their presence is still entered in the `package-lock.json` file, and + the tree is designed such that they _can_ be installed in the future. + +* `--prod`: prevent devDependencies from being installed. + +* `--only=prod`: omit `devDependencies` + +* `--also=dev`: include `devDependencies` + +#### Configuration Options Affecting Build Process + +* `--ignore-scripts`: do not execute any scripts defined in the + package.json. See [`scripts`](/using-npm/scripts). + +* `--no-audit`: disable sending audit reports to the configured registries. + See [`npm-audit`](npm-audit) for details on what is sent. + +* `--no-bin-links`: prevent npm from creating symlinks for any binaries the + package might contain. + +* `--no-fund`: suppress the message displayed at the end of each install + that acknowledges the number of dependencies looking for funding. See + [`npm-fund`](/commands/npm-fund) + +* `--dry-run`: Do not actually install anything into the `node_modules` + folder. Just build the intended tree in memory, and report on it. + +* `--no-save`: Do not save installed dependencies to `package.json` or + `package-lock.json`. + +### Algorithm + +Given a `package{dep}` structure: `A{B,C}, B{C}, C{D}`, +the npm install algorithm produces: + +```bash +A ++-- B ++-- C ++-- D +``` + +That is, the dependency from B to C is satisfied by the fact that A already +caused C to be installed at a higher level. D is still installed at the top +level because nothing conflicts with it. + +For `A{B,C}, B{C,D@1}, C{D@2}`, this algorithm produces: + +```bash +A ++-- B ++-- C + `-- D@2 ++-- D@1 +``` + +Because B's D@1 will be installed in the top-level, C now has to install +D@2 privately for itself. This algorithm is deterministic, but different +trees may be produced if two dependencies are requested for installation in +a different order. + +See [folders](/configuring-npm/folders) for a more detailed description of +the specific folder structures that npm creates. + +### See Also + +* [npm folders](/configuring-npm/folders) +* [npm update](/commands/npm-update) +* [npm audit](/commands/npm-audit) +* [npm fund](/commands/npm-fund) +* [npm link](/commands/npm-link) +* [npm rebuild](/commands/npm-rebuild) +* [npm scripts](/using-npm/scripts) +* [npm build](/commands/npm-build) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [npm registry](/using-npm/registry) +* [npm dist-tag](/commands/npm-dist-tag) +* [npm uninstall](/commands/npm-uninstall) +* [npm shrinkwrap](/commands/npm-shrinkwrap) +* [package.json](/configuring-npm/package-json) +* [workspaces](/using-npm/workspaces) diff --git a/deps/npm/docs/content/commands/npm-link.md b/deps/npm/docs/content/commands/npm-link.md new file mode 100644 index 00000000000000..1a835001fc64f8 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-link.md @@ -0,0 +1,109 @@ +--- +title: npm-link +section: 1 +description: Symlink a package folder +--- + +### Synopsis + +```bash +npm link (in package dir) +npm link [<@scope>/][@] + +alias: npm ln +``` + +### Description + +This is handy for installing your own stuff, so that you can work on it and +test iteratively without having to continually rebuild. + +Package linking is a two-step process. + +First, `npm link` in a package folder will create a symlink in the global +folder `{prefix}/lib/node_modules/` that links to the package +where the `npm link` command was executed. It will also link any bins in +the package to `{prefix}/bin/{name}`. Note that `npm link` uses the global +prefix (see `npm prefix -g` for its value). + +Next, in some other location, `npm link package-name` will create a +symbolic link from globally-installed `package-name` to `node_modules/` of +the current folder. + +Note that `package-name` is taken from `package.json`, _not_ from the +directory name. + +The package name can be optionally prefixed with a scope. See +[`scope`](/using-npm/scope). The scope must be preceded by an @-symbol and +followed by a slash. + +When creating tarballs for `npm publish`, the linked packages are +"snapshotted" to their current state by resolving the symbolic links, if +they are included in `bundleDependencies`. + +For example: + +```bash +cd ~/projects/node-redis # go into the package directory +npm link # creates global link +cd ~/projects/node-bloggy # go into some other package directory. +npm link redis # link-install the package +``` + +Now, any changes to `~/projects/node-redis` will be reflected in +`~/projects/node-bloggy/node_modules/node-redis/`. Note that the link +should be to the package name, not the directory name for that package. + +You may also shortcut the two steps in one. For example, to do the +above use-case in a shorter way: + +```bash +cd ~/projects/node-bloggy # go into the dir of your main project +npm link ../node-redis # link the dir of your dependency +``` + +The second line is the equivalent of doing: + +```bash +(cd ../node-redis; npm link) +npm link redis +``` + +That is, it first creates a global link, and then links the global +installation target into your project's `node_modules` folder. + +Note that in this case, you are referring to the directory name, +`node-redis`, rather than the package name `redis`. + +If your linked package is scoped (see [`scope`](/using-npm/scope)) your +link command must include that scope, e.g. + +```bash +npm link @myorg/privatepackage +``` + +### Caveat + +Note that package dependencies linked in this way are _not_ saved to +`package.json` by default, on the assumption that the intention is to have +a link stand in for a regular non-link dependency. Otherwise, for example, +if you depend on `redis@^3.0.1`, and ran `npm link redis`, it would replace +the `^3.0.1` dependency with `file:../path/to/node-redis`, which you +probably don't want! Additionally, other users or developers on your +project would run into issues if they do not have their folders set up +exactly the same as yours. + +If you are adding a _new_ dependency as a link, you should add it to the +relevant metadata by running `npm install --package-lock-only`. + +If you _want_ to save the `file:` reference in your `package.json` and +`package-lock.json` files, you can use `npm link --save` to do so. + +### See Also + +* [npm developers](/using-npm/developers) +* [package.json](/configuring-npm/package-json) +* [npm install](/commands/npm-install) +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/commands/npm-logout.md b/deps/npm/docs/content/commands/npm-logout.md new file mode 100644 index 00000000000000..7fa858a99993d2 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-logout.md @@ -0,0 +1,50 @@ +--- +title: npm-logout +section: 1 +description: Log out of the registry +--- + +### Synopsis + +```bash +npm logout [--registry=] [--scope=<@scope>] +``` + +### Description + +When logged into a registry that supports token-based authentication, tell +the server to end this token's session. This will invalidate the token +everywhere you're using it, not just for the current environment. + +When logged into a legacy registry that uses username and password +authentication, this will clear the credentials in your user configuration. +In this case, it will _only_ affect the current environment. + +If `--scope` is provided, this will find the credentials for the registry +connected to that scope, if set. + +### Configuration + +#### registry + +Default: https://registry.npmjs.org/ + +The base URL of the npm package registry. If `scope` is also specified, +it takes precedence. + +#### scope + +Default: The scope of your current project, if any, otherwise none. + +If specified, you will be logged out of the specified scope. See [`scope`](/using-npm/scope). + +```bash +npm logout --scope=@myco +``` + +### See Also + +* [npm adduser](/commands/npm-adduser) +* [npm registry](/using-npm/registry) +* [npm config](/commands/npm-config) +* [npm whoami](/commands/npm-whoami) diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md new file mode 100644 index 00000000000000..54787bd6389c6c --- /dev/null +++ b/deps/npm/docs/content/commands/npm-ls.md @@ -0,0 +1,168 @@ +--- +title: npm-ls +section: 1 +description: List installed packages +--- + +### Synopsis + +```bash +npm ls [[<@scope>/] ...] + +aliases: list, la, ll +``` + +### Description + +This command will print to stdout all the versions of packages that are +installed, as well as their dependencies when `--all` is specified, in a +tree structure. + +Note: to get a "bottoms up" view of why a given package is included in the +tree at all, use [`npm explain`](/commands/npm-explain). + +Positional arguments are `name@version-range` identifiers, which will limit +the results to only the paths to the packages named. Note that nested +packages will *also* show the paths to the specified packages. For +example, running `npm ls promzard` in npm's source tree will show: + +```bash +npm@@VERSION@ /path/to/npm +└─┬ init-package-json@0.0.4 + └── promzard@0.1.5 +``` + +It will print out extraneous, missing, and invalid packages. + +If a project specifies git urls for dependencies these are shown +in parentheses after the name@version to make it easier for users to +recognize potential forks of a project. + +The tree shown is the logical dependency tree, based on package +dependencies, not the physical layout of your `node_modules` folder. + +When run as `ll` or `la`, it shows extended information by default. + +### Note: Design Changes Pending + +The `npm ls` command's output and behavior made a _ton_ of sense when npm +created a `node_modules` folder that naively nested every dependency. In +such a case, the logical dependency graph and physical tree of packages on +disk would be roughly identical. + +With the advent of automatic install-time deduplication of dependencies in +npm v3, the `ls` output was modified to display the logical dependency +graph as a tree structure, since this was more useful to most users. +However, without using `npm ls -l`, it became impossible show _where_ a +package was actually installed much of the time! + +With the advent of automatic installation of `peerDependencies` in npm v7, +this gets even more curious, as `peerDependencies` are logically +"underneath" their dependents in the dependency graph, but are always +physically at or above their location on disk. + +Also, in the years since npm got an `ls` command (in version 0.0.2!), +dependency graphs have gotten much larger as a general rule. Therefor, in +order to avoid dumping an excessive amount of content to the terminal, `npm +ls` now only shows the _top_ level dependencies, unless `--all` is +provided. + +A thorough re-examination of the use cases, intention, behavior, and output +of this command, is currently underway. Expect significant changes to at +least the default human-readable `npm ls` output in npm v8. + +### Configuration + +#### all + +* Default: `false` +* Type: Boolean + +When running `npm outdated` and `npm ls`, setting `--all` will show all +outdated or installed packages, rather than only those directly depended +upon by the current project. + +#### json + +* Default: false +* Type: Boolean + +Show information in JSON format. + +#### long + +* Default: false +* Type: Boolean + +Show extended information. + +#### parseable + +* Default: false +* Type: Boolean + +Show parseable output instead of tree view. + +#### global + +* Default: false +* Type: Boolean + +List packages in the global install prefix instead of in the current +project. + +#### depth + +* Type: Int + +Max display depth of the dependency tree. + +#### prod / production + +* Type: Boolean +* Default: false + +Display only the dependency tree for packages in `dependencies`. + +#### dev / development + +* Type: Boolean +* Default: false + +Display only the dependency tree for packages in `devDependencies`. + +#### only + +* Type: String + +When "dev" or "development", is an alias to `dev`. + +When "prod" or "production", is an alias to `production`. + +#### link + +* Type: Boolean +* Default: false + +Display only dependencies which are linked + +#### unicode + +* Type: Boolean +* Default: true + +Whether to represent the tree structure using unicode characters. +Set it to false in order to use all-ansi output. + +### See Also + +* [npm explain](/commands/npm-explain) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [npm folders](/configuring-npm/folders) +* [npm explain](/commands/npm-explain) +* [npm install](/commands/npm-install) +* [npm link](/commands/npm-link) +* [npm prune](/commands/npm-prune) +* [npm outdated](/commands/npm-outdated) +* [npm update](/commands/npm-update) diff --git a/deps/npm/docs/content/cli-commands/npm-org.md b/deps/npm/docs/content/commands/npm-org.md similarity index 81% rename from deps/npm/docs/content/cli-commands/npm-org.md rename to deps/npm/docs/content/commands/npm-org.md index 33db38d0f82a5f..18047d109cc0b0 100644 --- a/deps/npm/docs/content/cli-commands/npm-org.md +++ b/deps/npm/docs/content/commands/npm-org.md @@ -1,13 +1,9 @@ --- -section: cli-commands title: npm-org +section: 1 description: Manage orgs --- -# npm-org(1) - -## Manage orgs - ### Synopsis ```bash @@ -56,10 +52,11 @@ $ npm org ls my-org @mx-santos ### Description -You can use the `npm org` commands to manage and view users of an organization. -It supports adding and removing users, changing their roles, listing them, and -finding specific ones and their roles. +You can use the `npm org` commands to manage and view users of an +organization. It supports adding and removing users, changing their roles, +listing them, and finding specific ones and their roles. ### See Also +* [using orgs](/using-npm/orgs) * [Documentation on npm Orgs](https://docs.npmjs.com/orgs/) diff --git a/deps/npm/docs/content/commands/npm-outdated.md b/deps/npm/docs/content/commands/npm-outdated.md new file mode 100644 index 00000000000000..ee1157f332de08 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-outdated.md @@ -0,0 +1,129 @@ +--- +title: npm-outdated +section: 1 +description: Check for outdated packages +--- + +### Synopsis + +```bash +npm outdated [[<@scope>/] ...] +``` + +### Description + +This command will check the registry to see if any (or, specific) installed +packages are currently outdated. + +By default, only the direct dependencies of the root project are shown. +Use `--all` to find all outdated meta-dependencies as well. + +In the output: + +* `wanted` is the maximum version of the package that satisfies the semver + range specified in `package.json`. If there's no available semver range + (i.e. you're running `npm outdated --global`, or the package isn't + included in `package.json`), then `wanted` shows the currently-installed + version. +* `latest` is the version of the package tagged as latest in the registry. + Running `npm publish` with no special configuration will publish the + package with a dist-tag of `latest`. This may or may not be the maximum + version of the package, or the most-recently published version of the + package, depending on how the package's developer manages the latest + [dist-tag](/commands/npm-dist-tag). +* `location` is where in the physical tree the package is located. +* `depended by` shows which package depends on the displayed dependency +* `package type` (when using `--long` / `-l`) tells you whether this + package is a `dependency` or a dev/peer/optional dependency. Packages not + included in `package.json` are always marked `dependencies`. +* `homepage` (when using `--long` / `-l`) is the `homepage` value contained + in the package's packument +* Red means there's a newer version matching your semver requirements, so + you should update now. +* Yellow indicates that there's a newer version _above_ your semver + requirements (usually new major, or new 0.x minor) so proceed with + caution. + +### An example + +```bash +$ npm outdated +Package Current Wanted Latest Location Depended by +glob 5.0.15 5.0.15 6.0.1 node_modules/glob dependent-package-name +nothingness 0.0.3 git git node_modules/nothingness dependent-package-name +npm 3.5.1 3.5.2 3.5.1 node_modules/npm dependent-package-name +local-dev 0.0.3 linked linked local-dev dependent-package-name +once 1.3.2 1.3.3 1.3.3 node_modules/once dependent-package-name +``` + +With these `dependencies`: +```json +{ + "glob": "^5.0.15", + "nothingness": "github:othiym23/nothingness#master", + "npm": "^3.5.1", + "once": "^1.3.1" +} +``` + +A few things to note: + +* `glob` requires `^5`, which prevents npm from installing `glob@6`, which + is outside the semver range. +* Git dependencies will always be reinstalled, because of how they're + specified. The installed committish might satisfy the dependency + specifier (if it's something immutable, like a commit SHA), or it might + not, so `npm outdated` and `npm update` have to fetch Git repos to check. + This is why currently doing a reinstall of a Git dependency always forces + a new clone and install. +* `npm@3.5.2` is marked as "wanted", but "latest" is `npm@3.5.1` because + npm uses dist-tags to manage its `latest` and `next` release channels. + `npm update` will install the _newest_ version, but `npm install npm` + (with no semver range) will install whatever's tagged as `latest`. +* `once` is just plain out of date. Reinstalling `node_modules` from + scratch or running `npm update` will bring it up to spec. + +### Configuration + +#### json + +* Default: false +* Type: Boolean + +Show information in JSON format. + +#### long + +* Default: false +* Type: Boolean + +Show extended information. + +#### parseable + +* Default: false +* Type: Boolean + +Show parseable output instead of tree view. + +#### global + +* Default: false +* Type: Boolean + +Check packages in the global install prefix instead of in the current +project. + +#### all + +* Default: false +* Type: Boolean + +Display all outdated dependencies on the tree. + +### See Also + +* [npm update](/commands/npm-update) +* [npm dist-tag](/commands/npm-dist-tag) +* [npm registry](/using-npm/registry) +* [npm folders](/configuring-npm/folders) diff --git a/deps/npm/docs/content/commands/npm-owner.md b/deps/npm/docs/content/commands/npm-owner.md new file mode 100644 index 00000000000000..6479f3bdd11f42 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-owner.md @@ -0,0 +1,42 @@ +--- +title: npm-owner +section: 1 +description: Manage package owners +--- + +### Synopsis + +```bash +npm owner add [<@scope>/] +npm owner rm [<@scope>/] +npm owner ls [<@scope>/] + +aliases: author +``` + +### Description + +Manage ownership of published packages. + +* ls: List all the users who have access to modify a package and push new + versions. Handy when you need to know who to bug for help. +* add: Add a new user as a maintainer of a package. This user is enabled + to modify metadata, publish new versions, and add other owners. +* rm: Remove a user from the package owner list. This immediately revokes + their privileges. + +Note that there is only one level of access. Either you can modify a package, +or you can't. Future versions may contain more fine-grained access levels, but +that is not implemented at this time. + +If you have two-factor authentication enabled with `auth-and-writes` (see +[`npm-profile`](/commands/npm-profile)) then you'll need to include an otp +on the command line when changing ownership with `--otp`. + +### See Also + +* [npm profile](/commands/npm-profile) +* [npm publish](/commands/npm-publish) +* [npm registry](/using-npm/registry) +* [npm adduser](/commands/npm-adduser) +* [npm disputes](/using-npm/disputes) diff --git a/deps/npm/docs/content/commands/npm-pack.md b/deps/npm/docs/content/commands/npm-pack.md new file mode 100644 index 00000000000000..cc6b669efb1ef6 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-pack.md @@ -0,0 +1,36 @@ +--- +title: npm-pack +section: 1 +description: Create a tarball from a package +--- + +### Synopsis + +```bash +npm pack [[<@scope>/]...] [--dry-run] +``` + +### Description + +For anything that's installable (that is, a package folder, tarball, +tarball url, git url, name@tag, name@version, name, or scoped name), this +command will fetch it to the cache, copy the tarball to the current working +directory as `-.tgz`, and then write the filenames out to +stdout. + +If the same package is specified multiple times, then the file will be +overwritten the second time. + +If no arguments are supplied, then npm packs the current package folder. + +The `--dry-run` argument will do everything that pack usually does without +actually packing anything. That is, it reports on what would have gone +into the tarball, but nothing else. + +### See Also + +* [npm-packlist package](http://npm.im/npm-packlist) +* [npm cache](/commands/npm-cache) +* [npm publish](/commands/npm-publish) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/cli-commands/npm-ping.md b/deps/npm/docs/content/commands/npm-ping.md similarity index 81% rename from deps/npm/docs/content/cli-commands/npm-ping.md rename to deps/npm/docs/content/commands/npm-ping.md index 8f765501ac9f33..8de06aa1848361 100644 --- a/deps/npm/docs/content/cli-commands/npm-ping.md +++ b/deps/npm/docs/content/commands/npm-ping.md @@ -1,13 +1,9 @@ --- -section: cli-commands title: npm-ping +section: 1 description: Ping npm registry --- -# npm-ping(1) - -## Ping npm registry - ### Synopsis ```bash @@ -29,5 +25,6 @@ Ping error: {*Detail about error} ### See Also -* [npm config](/cli-commands/config) +* [npm doctor](/commands/npm-doctor) +* [npm config](/commands/npm-config) * [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/commands/npm-prefix.md b/deps/npm/docs/content/commands/npm-prefix.md new file mode 100644 index 00000000000000..6894cb5c9298cc --- /dev/null +++ b/deps/npm/docs/content/commands/npm-prefix.md @@ -0,0 +1,28 @@ +--- +title: npm-prefix +section: 1 +description: Display prefix +--- + +### Synopsis + +```bash +npm prefix [-g] +``` + +### Description + +Print the local prefix to standard out. This is the closest parent directory +to contain a `package.json` file or `node_modules` directory, unless `-g` is +also specified. + +If `-g` is specified, this will be the value of the global prefix. See +[`npm config`](/commands/npm-config) for more detail. + +### See Also + +* [npm root](/commands/npm-root) +* [npm bin](/commands/npm-bin) +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/commands/npm-profile.md b/deps/npm/docs/content/commands/npm-profile.md new file mode 100644 index 00000000000000..88edf26d87c410 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-profile.md @@ -0,0 +1,80 @@ +--- +title: npm-profile +section: 1 +description: Change settings on your registry profile +--- + +### Synopsis + +```bash +npm profile get [--json|--parseable] [] +npm profile set [--json|--parseable] +npm profile set password +npm profile enable-2fa [auth-and-writes|auth-only] +npm profile disable-2fa +``` + +### Description + +Change your profile information on the registry. Note that this command +depends on the registry implementation, so third-party registries may not +support this interface. + +* `npm profile get []`: Display all of the properties of your + profile, or one or more specific properties. It looks like: + +```bash ++-----------------+---------------------------+ +| name | example | ++-----------------+---------------------------+ +| email | me@example.com (verified) | ++-----------------+---------------------------+ +| two factor auth | auth-and-writes | ++-----------------+---------------------------+ +| fullname | Example User | ++-----------------+---------------------------+ +| homepage | | ++-----------------+---------------------------+ +| freenode | | ++-----------------+---------------------------+ +| twitter | | ++-----------------+---------------------------+ +| github | | ++-----------------+---------------------------+ +| created | 2015-02-26T01:38:35.892Z | ++-----------------+---------------------------+ +| updated | 2017-10-02T21:29:45.922Z | ++-----------------+---------------------------+ +``` + +* `npm profile set `: Set the value of a profile + property. You can set the following properties this way: email, fullname, + homepage, freenode, twitter, github + +* `npm profile set password`: Change your password. This is interactive, + you'll be prompted for your current password and a new password. You'll + also be prompted for an OTP if you have two-factor authentication + enabled. + +* `npm profile enable-2fa [auth-and-writes|auth-only]`: Enables two-factor + authentication. Defaults to `auth-and-writes` mode. Modes are: + * `auth-only`: Require an OTP when logging in or making changes to your + account's authentication. The OTP will be required on both the website + and the command line. + * `auth-and-writes`: Requires an OTP at all the times `auth-only` does, + and also requires one when publishing a module, setting the `latest` + dist-tag, or changing access via `npm access` and `npm owner`. + +* `npm profile disable-2fa`: Disables two-factor authentication. + +### Details + +All of the `npm profile` subcommands accept `--json` and `--parseable` and +will tailor their output based on those. Some of these commands may not be +available on non npmjs.com registries. + +### See Also + +* [npm adduser](/commands/npm-adduser) +* [npm logout](/commands/npm-logout) +* [npm config](/commands/npm-config) diff --git a/deps/npm/docs/content/commands/npm-prune.md b/deps/npm/docs/content/commands/npm-prune.md new file mode 100644 index 00000000000000..088c1c3470fafa --- /dev/null +++ b/deps/npm/docs/content/commands/npm-prune.md @@ -0,0 +1,40 @@ +--- +title: npm-prune +section: 1 +description: Remove extraneous packages +--- + +### Synopsis + +```bash +npm prune [[<@scope>/]...] [--production] [--dry-run] [--json] +``` + +### Description + +This command removes "extraneous" packages. If a package name is provided, +then only packages matching one of the supplied names are removed. + +Extraneous packages are those present in the `node_modules` folder that are +not listed as any package's dependency list. + +If the `--production` flag is specified or the `NODE_ENV` environment +variable is set to `production`, this command will remove the packages +specified in your `devDependencies`. Setting `--no-production` will negate +`NODE_ENV` being set to `production`. + +If the `--dry-run` flag is used then no changes will actually be made. + +If the `--json` flag is used, then the changes `npm prune` made (or would +have made with `--dry-run`) are printed as a JSON object. + +In normal operation, extraneous modules are pruned automatically, so you'll +only need this command with the `--production` flag. However, in the real +world, operation is not always "normal". When crashes or mistakes happen, +this command can help clean up any resulting garbage. + +### See Also + +* [npm uninstall](/commands/npm-uninstall) +* [npm folders](/configuring-npm/folders) +* [npm ls](/commands/npm-ls) diff --git a/deps/npm/docs/content/commands/npm-publish.md b/deps/npm/docs/content/commands/npm-publish.md new file mode 100644 index 00000000000000..fc13e672223589 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-publish.md @@ -0,0 +1,110 @@ +--- +title: npm-publish +section: 1 +description: Publish a package +--- + +### Synopsis + +```bash +npm publish [|] [--tag ] [--access ] [--otp otpcode] [--dry-run] + +Publishes '.' if no argument supplied +Sets tag 'latest' if no --tag specified +``` + +### Description + +Publishes a package to the registry so that it can be installed by name. + +By default npm will publish to the public registry. This can be overridden +by specifying a different default registry or using a +[`scope`](/using-npm/scope) in the name (see +[`package.json`](/configuring-npm/package-json)). + +* ``: A folder containing a package.json file + +* ``: A url or file path to a gzipped tar archive containing a + single folder with a package.json file inside. + +* `[--tag ]`: Registers the published package with the given tag, such + that `npm install @` will install this version. By default, + `npm publish` updates and `npm install` installs the `latest` tag. See + [`npm-dist-tag`](npm-dist-tag) for details about tags. + +* `[--access ]`: Tells the registry whether this package + should be published as public or restricted. Only applies to scoped + packages, which default to `restricted`. If you don't have a paid + account, you must publish with `--access public` to publish scoped + packages. + +* `[--otp ]`: If you have two-factor authentication enabled in + `auth-and-writes` mode then you can provide a code from your + authenticator with this. If you don't include this and you're running + from a TTY then you'll be prompted. + +* `[--dry-run]`: As of `npm@6`, does everything publish would do except + actually publishing to the registry. Reports the details of what would + have been published. + +The publish will fail if the package name and version combination already +exists in the specified registry. + +Once a package is published with a given name and version, that specific +name and version combination can never be used again, even if it is removed +with [`npm unpublish`](/commands/npm-unpublish). + +As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the +tarball will be submitted to the registry during publication. Subsequent +installs will use the strongest supported algorithm to verify downloads. + +Similar to `--dry-run` see [`npm pack`](/commands/npm-pack), which figures +out the files to be included and packs them into a tarball to be uploaded +to the registry. + +### Files included in package + +To see what will be included in your package, run `npx npm-packlist`. All +files are included by default, with the following exceptions: + +- Certain files that are relevant to package installation and distribution + are always included. For example, `package.json`, `README.md`, + `LICENSE`, and so on. + +- If there is a "files" list in + [`package.json`](/configuring-npm/package-json), then only the files + specified will be included. (If directories are specified, then they + will be walked recursively and their contents included, subject to the + same ignore rules.) + +- If there is a `.gitignore` or `.npmignore` file, then ignored files in + that and all child directories will be excluded from the package. If + _both_ files exist, then the `.gitignore` is ignored, and only the + `.npmignore` is used. + + `.npmignore` files follow the [same pattern + rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring) + as `.gitignore` files + +- If the file matches certain patterns, then it will _never_ be included, + unless explicitly added to the `"files"` list in `package.json`, or + un-ignored with a `!` rule in a `.npmignore` or `.gitignore` file. + +- Symbolic links are never included in npm packages. + + +See [`developers`](/using-npm/developers) for full details on what's +included in the published package, as well as details on how the package is +built. + +### See Also + +* [npm-packlist package](http://npm.im/npm-packlist) +* [npm registry](/using-npm/registry) +* [npm scope](/using-npm/scope) +* [npm adduser](/commands/npm-adduser) +* [npm owner](/commands/npm-owner) +* [npm deprecate](/commands/npm-deprecate) +* [npm dist-tag](/commands/npm-dist-tag) +* [npm pack](/commands/npm-pack) +* [npm profile](/commands/npm-profile) diff --git a/deps/npm/docs/content/commands/npm-rebuild.md b/deps/npm/docs/content/commands/npm-rebuild.md new file mode 100644 index 00000000000000..0a7ade6b165b46 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-rebuild.md @@ -0,0 +1,29 @@ +--- +title: npm-rebuild +section: 1 +description: Rebuild a package +--- + +### Synopsis + +```bash +npm rebuild [[<@scope>/][@] ...] + +alias: rb +``` + +### Description + +This command runs the `npm build` command on the matched folders. This is +useful when you install a new version of node, and must recompile all your +C++ addons with the new binary. It is also useful when installing with +`--ignore-scripts` and `--no-bin-links`, to explicitly choose which +packages to build and/or link bins. + +If one or more package names (and optionally version ranges) are provided, +then only packages with a name and version matching one of the specifiers +will be rebuilt. + +### See Also + +* [npm install](/commands/npm-install) diff --git a/deps/npm/docs/content/commands/npm-repo.md b/deps/npm/docs/content/commands/npm-repo.md new file mode 100644 index 00000000000000..670345bece5c59 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-repo.md @@ -0,0 +1,37 @@ +--- +title: npm-repo +section: 1 +description: Open package repository page in the browser +--- + +### Synopsis + +```bash +npm repo [ [ ...]] +``` + +### Description + +This command tries to guess at the likely location of a package's +repository URL, and then tries to open it using the `--browser` config +param. If no package name is provided, it will search for a `package.json` +in the current folder and use the `repository` property. + +### Configuration + +#### browser + +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` +* Type: String or Boolean + +The browser that is called by the `npm repo` command to open websites. + +Set to `false` to suppress browser behavior and instead print urls to +terminal. + +Set to `true` to use default system URL opener. + +### See Also + +* [npm docs](/commands/npm-docs) +* [npm config](/commands/npm-config) diff --git a/deps/npm/docs/content/commands/npm-restart.md b/deps/npm/docs/content/commands/npm-restart.md new file mode 100644 index 00000000000000..097c9fee7c9c3b --- /dev/null +++ b/deps/npm/docs/content/commands/npm-restart.md @@ -0,0 +1,44 @@ +--- +title: npm-restart +section: 1 +description: Restart a package +--- + +### Synopsis + +```bash +npm restart [-- ] +``` + +### Description + +This restarts a project. It is equivalent to running `npm run-script +restart`. + +If the current project has a `"restart"` script specified in +`package.json`, then the following scripts will be run: + +1. prerestart +2. restart +3. postrestart + +If it does _not_ have a `"restart"` script specified, but it does have +`stop` and/or `start` scripts, then the following scripts will be run: + +1. prerestart +2. prestop +3. stop +4. poststop +6. prestart +7. start +8. poststart +9. postrestart + +### See Also + +* [npm run-script](/commands/npm-run-script) +* [npm scripts](/using-npm/scripts) +* [npm test](/commands/npm-test) +* [npm start](/commands/npm-start) +* [npm stop](/commands/npm-stop) +* [npm restart](/commands/npm-restart) diff --git a/deps/npm/docs/content/commands/npm-root.md b/deps/npm/docs/content/commands/npm-root.md new file mode 100644 index 00000000000000..0d694ac876e92b --- /dev/null +++ b/deps/npm/docs/content/commands/npm-root.md @@ -0,0 +1,32 @@ +--- +title: npm-root +section: 1 +description: Display npm root +--- + +### Synopsis + +```bash +npm root [-g] +``` + +### Description + +Print the effective `node_modules` folder to standard out. + +Useful for using npm in shell scripts that do things with the +`node_modules` folder. For example: + +```bash +#!/bin/bash +global_node_modules="$(npm root --global)" +echo "Global packages installed in: ${global_node_modules}" +``` + +### See Also + +* [npm prefix](/commands/npm-prefix) +* [npm bin](/commands/npm-bin) +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/deps/npm/docs/content/commands/npm-run-script.md b/deps/npm/docs/content/commands/npm-run-script.md new file mode 100644 index 00000000000000..b7ab20a73af473 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-run-script.md @@ -0,0 +1,92 @@ +--- +title: npm-run-script +section: 1 +description: Run arbitrary package scripts +--- + +### Synopsis + +```bash +npm run-script [--if-present] [--silent] [-- ] + +aliases: run, rum, urn +``` + +### Description + +This runs an arbitrary command from a package's `"scripts"` object. If no +`"command"` is provided, it will list the available scripts. + +`run[-script]` is used by the test, start, restart, and stop commands, but +can be called directly, as well. When the scripts in the package are +printed out, they're separated into lifecycle (test, start, restart) and +directly-run scripts. + +Any positional arguments are passed to the specified script. Use `--` to +pass `-`-prefixed flags and options which would otherwise be parsed by npm. + +For example: + +```bash +npm run test -- --grep="pattern" +``` + +The arguments will only be passed to the script specified after ```npm run``` +and not to any pre or post script. + +The `env` script is a special built-in command that can be used to list +environment variables that will be available to the script at runtime. If an +"env" command is defined in your package, it will take precedence over the +built-in. + +In addition to the shell's pre-existing `PATH`, `npm run` adds +`node_modules/.bin` to the `PATH` provided to scripts. Any binaries +provided by locally-installed dependencies can be used without the +`node_modules/.bin` prefix. For example, if there is a `devDependency` on +`tap` in your package, you should write: + +```bash +"scripts": {"test": "tap test/*.js"} +``` + +instead of + +```bash +"scripts": {"test": "node_modules/.bin/tap test/*.js"} +``` + +The actual shell your script is run within is platform dependent. By default, +on Unix-like systems it is the `/bin/sh` command, on Windows it is the `cmd.exe`. +The actual shell referred to by `/bin/sh` also depends on the system. +You can customize the shell with the `script-shell` configuration. + +Scripts are run from the root of the package folder, regardless of what the +current working directory is when `npm run` is called. If you want your +script to use different behavior based on what subdirectory you're in, you +can use the `INIT_CWD` environment variable, which holds the full path you +were in when you ran `npm run`. + +`npm run` sets the `NODE` environment variable to the `node` executable +with which `npm` is executed. Also, if the `--scripts-prepend-node-path` is +passed, the directory within which `node` resides is added to the `PATH`. +If `--scripts-prepend-node-path=auto` is passed (which has been the default +in `npm` v3), this is only performed when that `node` executable is not +found in the `PATH`. + +If you try to run a script without having a `node_modules` directory and it fails, +you will be given a warning to run `npm install`, just in case you've forgotten. + +You can use the `--silent` flag to prevent showing `npm ERR!` output on error. + +You can use the `--if-present` flag to avoid exiting with a non-zero exit code +when the script is undefined. This lets you run potentially undefined scripts +without breaking the execution chain. + +### See Also + +* [npm scripts](/using-npm/scripts) +* [npm test](/commands/npm-test) +* [npm start](/commands/npm-start) +* [npm restart](/commands/npm-restart) +* [npm stop](/commands/npm-stop) +* [npm config](/commands/npm-config) diff --git a/deps/npm/docs/content/cli-commands/npm-search.md b/deps/npm/docs/content/commands/npm-search.md similarity index 95% rename from deps/npm/docs/content/cli-commands/npm-search.md rename to deps/npm/docs/content/commands/npm-search.md index c65e489cba27c8..991bfe9e131f22 100644 --- a/deps/npm/docs/content/cli-commands/npm-search.md +++ b/deps/npm/docs/content/commands/npm-search.md @@ -1,13 +1,9 @@ --- -section: cli-commands title: npm-search +section: 1 description: Search for packages --- -# npm-search(1) - -## Search for packages - ### Synopsis ```bash @@ -109,6 +105,6 @@ setting. ### See Also * [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) +* [npm config](/commands/npm-config) * [npmrc](/configuring-npm/npmrc) -* [npm view](/cli-commands/view) +* [npm view](/commands/npm-view) diff --git a/deps/npm/docs/content/commands/npm-set-script.md b/deps/npm/docs/content/commands/npm-set-script.md new file mode 100644 index 00000000000000..7bc8f75d236537 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-set-script.md @@ -0,0 +1,34 @@ +--- +title: npm-set-script +section: 1 +description: Set tasks in the scripts section of package.json +--- + +### Synopsis +An npm command that lets you create a task in the scripts section of the package.json. + +```bash +npm set-script [

npm access

-

Set access level on published packages

-

Synopsis

-
npm access public [<package>]
-npm access restricted [<package>]
-
-npm access grant <read-only|read-write> <scope:team> [<package>]
-npm access revoke <scope:team> [<package>]
-
-npm access 2fa-required [<package>]
-npm access 2fa-not-required [<package>]
-
-npm access ls-packages [<user>|<scope>|<scope:team>]
-npm access ls-collaborators [<package> [<user>]]
-npm access edit [<package>]
-

Description

-

Used to set access controls on private packages.

-

For all of the subcommands, npm access will perform actions on the packages -in the current working directory if no package name is passed to the -subcommand.

-
    -
  • public / restricted: -Set a package to be either publicly accessible or restricted.
  • -
  • grant / revoke: -Add or remove the ability of users and teams to have read-only or read-write -access to a package.
  • -
  • 2fa-required / 2fa-not-required: -Configure whether a package requires that anyone publishing it have two-factor -authentication enabled on their account.
  • -
  • ls-packages: -Show all of the packages a user or a team is able to access, along with the -access level, except for read-only public packages (it won't print the whole -registry listing)
  • -
  • ls-collaborators: -Show all of the access privileges for a package. Will only show permissions -for packages to which you have at least read access. If <user> is passed in, -the list is filtered only to teams that user happens to belong to.
  • -
  • edit: -Set the access privileges for a package at once using $EDITOR.
  • -
-

Details

-

npm access always operates directly on the current registry, configurable -from the command line using --registry=<registry url>.

-

Unscoped packages are always public.

-

Scoped packages default to restricted, but you can either publish them as -public using npm publish --access=public, or set their access as public using -npm access public after the initial publish.

-

You must have privileges to set the access of a package:

-
    -
  • You are an owner of an unscoped or scoped package.
  • -
  • You are a member of the team that owns a scope.
  • -
  • You have been given read-write privileges for a package, either as a member -of a team or directly as an owner.
  • -
-

If you have two-factor authentication enabled then you'll have to pass in an -otp with --otp when making access changes.

-

If your account is not paid, then attempts to publish scoped packages will fail -with an HTTP 402 status code (logically enough), unless you use ---access=public.

-

Management of teams and team memberships is done with the npm team command.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-adduser/index.html b/deps/npm/docs/public/cli-commands/npm-adduser/index.html deleted file mode 100644 index eef93df121d231..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-adduser/index.html +++ /dev/null @@ -1,148 +0,0 @@ -

-

section: cli-commands -title: npm-adduser -description: Set access level on published packages

-
-

npm adduser

-

Add a registry user account

-

Synopsis

-
npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=legacy]
-
-aliases: login, add-user
-

Description

-

Create or verify a user named <username> in the specified registry, and -save the credentials to the .npmrc file. If no registry is specified, -the default registry will be used (see config).

-

The username, password, and email are read in from prompts.

-

To reset your password, go to https://www.npmjs.com/forgot

-

To change your email address, go to https://www.npmjs.com/email-edit

-

You may use this command multiple times with the same user account to -authorize on a new machine. When authenticating on a new machine, -the username, password and email address must all match with -your existing record.

-

npm login is an alias to adduser and behaves exactly the same way.

-

Configuration

-

registry

-

Default: https://registry.npmjs.org/

-

The base URL of the npm package registry. If scope is also specified, -this registry will only be used for packages with that scope. scope defaults -to the scope of the project directory you're currently in, if any. See scope.

-

scope

-

Default: none

-

If specified, the user and login credentials given will be associated -with the specified scope. See scope. You can use both at the same time, -e.g.

-
    npm adduser --registry=http://myregistry.example.com --scope=@myco
-

This will set a registry for the given scope and login or create a user for -that registry at the same time.

-

always-auth

-

Default: false

-

If specified, save configuration indicating that all requests to the given -registry should include authorization information. Useful for private -registries. Can be used with --registry and / or --scope, e.g.

-
    npm adduser --registry=http://private-registry.example.com --always-auth
-

This will ensure that all requests to that registry (including for tarballs) -include an authorization header. This setting may be necessary for use with -private registries where metadata and package tarballs are stored on hosts with -different hostnames. See always-auth in config for more details on always-auth. Registry-specific configuration of always-auth takes precedence over any global configuration.

-

auth-type

-
    -
  • Default: 'legacy'
  • -
  • Type: 'legacy', 'sso', 'saml', 'oauth'
  • -
-

What authentication strategy to use with adduser/login. Some npm registries -(for example, npmE) might support alternative auth strategies besides classic -username/password entry in legacy npm.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-audit/index.html b/deps/npm/docs/public/cli-commands/npm-audit/index.html deleted file mode 100644 index 87777f5cbee4d3..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-audit/index.html +++ /dev/null @@ -1,170 +0,0 @@ -

npm audit

-

Run a security audit

-

Synopsis

-
npm audit [--json|--parseable|--audit-level=(low|moderate|high|critical)]
-npm audit fix [--force|--package-lock-only|--dry-run]
-
-common options: [--production] [--only=(dev|prod)]
-

Examples

-

Scan your project for vulnerabilities and automatically install any compatible -updates to vulnerable dependencies:

-
$ npm audit fix
-

Run audit fix without modifying node_modules, but still updating the -pkglock:

-
$ npm audit fix --package-lock-only
-

Skip updating devDependencies:

-
$ npm audit fix --only=prod
-

Have audit fix install semver-major updates to toplevel dependencies, not just -semver-compatible ones:

-
$ npm audit fix --force
-

Do a dry run to get an idea of what audit fix will do, and also output -install information in JSON format:

-
$ npm audit fix --dry-run --json
-

Scan your project for vulnerabilities and just show the details, without fixing -anything:

-
$ npm audit
-

Get the detailed audit report in JSON format:

-
$ npm audit --json
-

Get the detailed audit report in plain text result, separated by tab characters, allowing for -future reuse in scripting or command line post processing, like for example, selecting -some of the columns printed:

-
$ npm audit --parseable
-

To parse columns, you can use for example awk, and just print some of them:

-
$ npm audit --parseable | awk -F $'\t' '{print $1,$4}'
-

Fail an audit only if the results include a vulnerability with a level of moderate or higher:

-
$ npm audit --audit-level=moderate
-

Description

-

The audit command submits a description of the dependencies configured in -your project to your default registry and asks for a report of known -vulnerabilities. The report returned includes instructions on how to act on -this information. The command will exit with a 0 exit code if no -vulnerabilities were found.

-

You can also have npm automatically fix the vulnerabilities by running npm -audit fix. Note that some vulnerabilities cannot be fixed automatically and -will require manual intervention or review. Also note that since npm audit fix -runs a full-fledged npm install under the hood, all configs that apply to the -installer will also apply to npm install -- so things like npm audit fix ---package-lock-only will work as expected.

-

By default, the audit command will exit with a non-zero code if any vulnerability -is found. It may be useful in CI environments to include the --audit-level parameter -to specify the minimum vulnerability level that will cause the command to fail. This -option does not filter the report output, it simply changes the command's failure -threshold.

-

Content Submitted

-
    -
  • npm_version
  • -
  • node_version
  • -
  • platform
  • -
  • node_env
  • -
  • A scrubbed version of your package-lock.json or npm-shrinkwrap.json
  • -
-

Scrubbing

-

In order to ensure that potentially sensitive information is not included in -the audit data bundle, some dependencies may have their names (and sometimes -versions) replaced with opaque non-reversible identifiers. It is done for -the following dependency types:

-
    -
  • Any module referencing a scope that is configured for a non-default -registry has its name scrubbed. (That is, a scope you did a npm login --scope=@ourscope for.)
  • -
  • All git dependencies have their names and specifiers scrubbed.
  • -
  • All remote tarball dependencies have their names and specifiers scrubbed.
  • -
  • All local directory and tarball dependencies have their names and specifiers scrubbed.
  • -
-

The non-reversible identifiers are a sha256 of a session-specific UUID and the -value being replaced, ensuring a consistent value within the payload that is -different between runs.

-

Exit Code

-

The npm audit command will exit with a 0 exit code if no vulnerabilities were found.

-

If vulnerabilities were found the exit code will depend on the audit-level -configuration setting.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bin/index.html b/deps/npm/docs/public/cli-commands/npm-bin/index.html deleted file mode 100644 index 67d060195ad756..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-bin/index.html +++ /dev/null @@ -1,99 +0,0 @@ -

npm bin

-

Display npm bin folder

-

Synopsis

-
npm bin [-g|--global]
-

Description

-

Print the folder where npm will install executables.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bugs/index.html b/deps/npm/docs/public/cli-commands/npm-bugs/index.html deleted file mode 100644 index ff06b5ed3423d0..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-bugs/index.html +++ /dev/null @@ -1,122 +0,0 @@ -

npm bugs

-

Bugs for a package in a web browser maybe

-

Synopsis

-
npm bugs [<pkgname> [<pkgname> ...]]
-
-aliases: issues
-

Description

-

This command tries to guess at the likely location of a package's -bug tracker URL, and then tries to open it using the --browser -config param. If no package name is provided, it will search for -a package.json in the current folder and use the name property.

-

Configuration

-

browser

-
    -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • -
  • Type: String or Boolean
  • -
-

The browser that is called by the npm bugs command to open websites.

-

Set to false to suppress browser behavior and instead print urls to -terminal.

-

Set to true to use default system URL opener.

-

registry

- -

The base URL of the npm package registry.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bundle/index.html b/deps/npm/docs/public/cli-commands/npm-bundle/index.html deleted file mode 100644 index 323033f502cb5c..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-bundle/index.html +++ /dev/null @@ -1,96 +0,0 @@ -

npm bundle

-

REMOVED

-

Description

-

The npm bundle command has been removed in 1.0, for the simple reason -that it is no longer necessary, as the default behavior is now to -install packages into the local space.

-

Just use npm install now to do what npm bundle used to do.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-cache/index.html b/deps/npm/docs/public/cli-commands/npm-cache/index.html deleted file mode 100644 index d7132981d6f971..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-cache/index.html +++ /dev/null @@ -1,150 +0,0 @@ -

npm cache

-

Manipulates packages cache

-

Synopsis

-
npm cache add <tarball file>
-npm cache add <folder>
-npm cache add <tarball url>
-npm cache add <name>@<version>
-
-npm cache clean [<path>]
-aliases: npm cache clear, npm cache rm
-
-npm cache verify
-

Description

-

Used to add, list, or clean the npm cache folder.

-
    -
  • add: -Add the specified package to the local cache. This command is primarily -intended to be used internally by npm, but it can provide a way to -add data to the local installation cache explicitly.
  • -
  • clean: -Delete all data out of the cache folder.
  • -
  • verify: -Verify the contents of the cache folder, garbage collecting any unneeded data, -and verifying the integrity of the cache index and all cached data.
  • -
-

Details

-

npm stores cache data in an opaque directory within the configured cache, -named _cacache. This directory is a cacache-based content-addressable cache -that stores all http request data as well as other package-related data. This -directory is primarily accessed through pacote, the library responsible for -all package fetching as of npm@5.

-

All data that passes through the cache is fully verified for integrity on both -insertion and extraction. Cache corruption will either trigger an error, or -signal to pacote that the data must be refetched, which it will do -automatically. For this reason, it should never be necessary to clear the cache -for any reason other than reclaiming disk space, thus why clean now requires ---force to run.

-

There is currently no method exposed through npm to inspect or directly manage -the contents of this cache. In order to access it, cacache must be used -directly.

-

npm will not remove data by itself: the cache will grow as new packages are -installed.

-

A note about the cache's design

-

The npm cache is strictly a cache: it should not be relied upon as a persistent -and reliable data store for package data. npm makes no guarantee that a -previously-cached piece of data will be available later, and will automatically -delete corrupted contents. The primary guarantee that the cache makes is that, -if it does return data, that data will be exactly the data that was inserted.

-

To run an offline verification of existing cache contents, use npm cache -verify.

-

Configuration

-

cache

-

Default: ~/.npm on Posix, or %AppData%/npm-cache on Windows.

-

The root cache folder.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ci/index.html b/deps/npm/docs/public/cli-commands/npm-ci/index.html deleted file mode 100644 index 598c361f8206ec..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-ci/index.html +++ /dev/null @@ -1,127 +0,0 @@ -

npm ci

-

Install a project with a clean slate

-

Synopsis

-
npm ci
-

Example

-

Make sure you have a package-lock and an up-to-date install:

-
$ cd ./my/npm/project
-$ npm install
-added 154 packages in 10s
-$ ls | grep package-lock
-

Run npm ci in that project

-
$ npm ci
-added 154 packages in 5s
-

Configure Travis to build using npm ci instead of npm install:

-
# .travis.yml
-install:
-- npm ci
-# keep the npm cache around to speed up installs
-cache:
-  directories:
-  - "$HOME/.npm"
-

Description

-

This command is similar to npm install, except it's meant to be used in -automated environments such as test platforms, continuous integration, and -deployment -- or any situation where you want to make sure you're doing a clean -install of your dependencies. It can be significantly faster than a regular npm -install by skipping certain user-oriented features. It is also more strict than -a regular install, which can help catch errors or inconsistencies caused by the -incrementally-installed local environments of most npm users.

-

In short, the main differences between using npm install and npm ci are:

-
    -
  • The project must have an existing package-lock.json or npm-shrinkwrap.json.
  • -
  • If dependencies in the package lock do not match those in package.json, npm ci will exit with an error, instead of updating the package lock.
  • -
  • npm ci can only install entire projects at a time: individual dependencies cannot be added with this command.
  • -
  • If a node_modules is already present, it will be automatically removed before npm ci begins its install.
  • -
  • It will never write to package.json or any of the package-locks: installs are essentially frozen.
  • -
-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-completion/index.html b/deps/npm/docs/public/cli-commands/npm-completion/index.html deleted file mode 100644 index b04eb9ec59b0b7..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-completion/index.html +++ /dev/null @@ -1,109 +0,0 @@ -

npm completion

-

Tab Completion for npm

-

Synopsis

-
source <(npm completion)
-

Description

-

Enables tab-completion in all npm commands.

-

The synopsis above -loads the completions into your current shell. Adding it to -your ~/.bashrc or ~/.zshrc will make the completions available -everywhere:

-
npm completion >> ~/.bashrc
-npm completion >> ~/.zshrc
-

You may of course also pipe the output of npm completion to a file -such as /usr/local/etc/bash_completion.d/npm or -/etc/bash_completion.d/npm if you have a system that will read -that file for you.

-

When COMP_CWORD, COMP_LINE, and COMP_POINT are defined in the -environment, npm completion acts in "plumbing mode", and outputs -completions based on the arguments.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-config/index.html b/deps/npm/docs/public/cli-commands/npm-config/index.html deleted file mode 100644 index c63739c8207333..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-config/index.html +++ /dev/null @@ -1,133 +0,0 @@ -

npm config

-

Manage the npm configuration files

-

Synopsis

-
npm config set <key> <value> [-g|--global]
-npm config get <key>
-npm config delete <key>
-npm config list [-l] [--json]
-npm config edit
-npm get <key>
-npm set <key> <value> [-g|--global]
-
-aliases: c
-

Description

-

npm gets its config settings from the command line, environment -variables, npmrc files, and in some cases, the package.json file.

-

See npmrc for more information about the npmrc files.

-

See config for a more thorough discussion of the mechanisms -involved.

-

The npm config command can be used to update and edit the contents -of the user and global npmrc files.

-

Sub-commands

-

Config supports the following sub-commands:

-

set

-
npm config set key value
-

Sets the config key to the value.

-

If value is omitted, then it sets it to "true".

-

get

-
npm config get key
-

Echo the config value to stdout.

-

list

-
npm config list
-

Show all the config settings. Use -l to also show defaults. Use --json -to show the settings in json format.

-

delete

-
npm config delete key
-

Deletes the key from all configuration files.

-

edit

-
npm config edit
-

Opens the config file in an editor. Use the --global flag to edit the -global config.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-dedupe/index.html b/deps/npm/docs/public/cli-commands/npm-dedupe/index.html deleted file mode 100644 index d4c8984937a3ef..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-dedupe/index.html +++ /dev/null @@ -1,127 +0,0 @@ -

npm dedupe

-

Reduce duplication

-

Synopsis

-
npm dedupe
-npm ddp
-
-aliases: find-dupes, ddp
-

Description

-

Searches the local package tree and attempts to simplify the overall -structure by moving dependencies further up the tree, where they can -be more effectively shared by multiple dependent packages.

-

For example, consider this dependency graph:

-
a
-+-- b <-- depends on c@1.0.x
-|   `-- c@1.0.3
-`-- d <-- depends on c@~1.0.9
-    `-- c@1.0.10
-

In this case, npm dedupe will transform the tree to:

-
a
-+-- b
-+-- d
-`-- c@1.0.10
-

Because of the hierarchical nature of node's module lookup, b and d -will both get their dependency met by the single c package at the root -level of the tree.

-

The deduplication algorithm walks the tree, moving each dependency as far -up in the tree as possible, even if duplicates are not found. This will -result in both a flat and deduplicated tree.

-

If a suitable version exists at the target location in the tree -already, then it will be left untouched, but the other duplicates will -be deleted.

-

Arguments are ignored. Dedupe always acts on the entire tree.

-

Modules

-

Note that this operation transforms the dependency tree, but will never -result in new modules being installed.

-

Using npm find-dupes will run the command in dryRun mode.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-deprecate/index.html b/deps/npm/docs/public/cli-commands/npm-deprecate/index.html deleted file mode 100644 index d8da02b0557bd1..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-deprecate/index.html +++ /dev/null @@ -1,105 +0,0 @@ -

npm deprecate

-

Deprecate a version of a package

-

Synopsis

-
npm deprecate <pkg>[@<version>] <message>
-

Description

-

This command will update the npm registry entry for a package, providing -a deprecation warning to all who attempt to install it.

-

It works on version ranges as well as specific -versions, so you can do something like this:

-
npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
-

Note that you must be the package owner to deprecate something. See the -owner and adduser help topics.

-

To un-deprecate a package, specify an empty string ("") for the message -argument. Note that you must use double quotes with no space between them to -format an empty string.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html b/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html deleted file mode 100644 index 677bc9a9895aac..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html +++ /dev/null @@ -1,154 +0,0 @@ -

-

section: cli-commands -title: npm-dist-tag -description: Modify package distribution tags

-
-

npm dist-tag

-

Modify package distribution tags

-

Synopsis

-
npm dist-tag add <pkg>@<version> [<tag>]
-npm dist-tag rm <pkg> <tag>
-npm dist-tag ls [<pkg>]
-
-aliases: dist-tags
-

Description

-

Add, remove, and enumerate distribution tags on a package:

-
    -
  • add: -Tags the specified version of the package with the specified tag, or the ---tag config if not specified. If you have two-factor authentication on -auth-and-writes then you’ll need to include a one-time password on the -command line with --otp <one-time password>.
  • -
  • rm: -Clear a tag that is no longer in use from the package.
  • -
  • ls: -Show all of the dist-tags for a package, defaulting to the package in -the current prefix. This is the default action if none is specified.
  • -
-

A tag can be used when installing packages as a reference to a version instead -of using a specific version number:

-
npm install <name>@<tag>
-

When installing dependencies, a preferred tagged version may be specified:

-
npm install --tag <tag>
-

This also applies to npm dedupe.

-

Publishing a package sets the latest tag to the published version unless the ---tag option is used. For example, npm publish --tag=beta.

-

By default, npm install <pkg> (without any @<version> or @<tag> -specifier) installs the latest tag.

-

Purpose

-

Tags can be used to provide an alias instead of version numbers.

-

For example, a project might choose to have multiple streams of development -and use a different tag for each stream, -e.g., stable, beta, dev, canary.

-

By default, the latest tag is used by npm to identify the current version of -a package, and npm install <pkg> (without any @<version> or @<tag> -specifier) installs the latest tag. Typically, projects only use the latest -tag for stable release versions, and use other tags for unstable versions such -as prereleases.

-

The next tag is used by some projects to identify the upcoming version.

-

By default, other than latest, no tag has any special significance to npm -itself.

-

Caveats

-

This command used to be known as npm tag, which only created new tags, and so -had a different syntax.

-

Tags must share a namespace with version numbers, because they are specified in -the same slot: npm install <pkg>@<version> vs npm install <pkg>@<tag>.

-

Tags that can be interpreted as valid semver ranges will be rejected. For -example, v1.4 cannot be used as a tag, because it is interpreted by semver as ->=1.4.0 <1.5.0. See https://github.com/npm/npm/issues/6082.

-

The simplest way to avoid semver problems with tags is to use tags that do not -begin with a number or the letter v.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-docs/index.html b/deps/npm/docs/public/cli-commands/npm-docs/index.html deleted file mode 100644 index f275a63a3a69f5..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-docs/index.html +++ /dev/null @@ -1,122 +0,0 @@ -

npm docs

-

Docs for a package in a web browser maybe

-

Synopsis

-
npm docs [<pkgname> [<pkgname> ...]]
-
-aliases: home
-

Description

-

This command tries to guess at the likely location of a package's -documentation URL, and then tries to open it using the --browser -config param. You can pass multiple package names at once. If no -package name is provided, it will search for a package.json in -the current folder and use the name property.

-

Configuration

-

browser

-
    -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • -
  • Type: String or Boolean
  • -
-

The browser that is called by the npm docs command to open websites.

-

Set to false to suppress browser behavior and instead print urls to -terminal.

-

Set to true to use default system URL opener.

-

registry

- -

The base URL of the npm package registry.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-doctor/index.html b/deps/npm/docs/public/cli-commands/npm-doctor/index.html deleted file mode 100644 index fbab2cc27202bb..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-doctor/index.html +++ /dev/null @@ -1,168 +0,0 @@ -

npm doctor

-

Check your environments

-

Synopsis

-
npm doctor
-

Description

-

npm doctor runs a set of checks to ensure that your npm installation has -what it needs to manage your JavaScript packages. npm is mostly a standalone tool, but it does -have some basic requirements that must be met:

-
    -
  • Node.js and git must be executable by npm.
  • -
  • The primary npm registry, registry.npmjs.com, or another service that uses -the registry API, is available.
  • -
  • The directories that npm uses, node_modules (both locally and globally), -exist and can be written by the current user.
  • -
  • The npm cache exists, and the package tarballs within it aren't corrupt.
  • -
-

Without all of these working properly, npm may not work properly. Many issues -are often attributable to things that are outside npm's code base, so npm -doctor confirms that the npm installation is in a good state.

-

Also, in addition to this, there are also very many issue reports due to using -old versions of npm. Since npm is constantly improving, running npm@latest is -better than an old version.

-

npm doctor verifies the following items in your environment, and if there are -any recommended changes, it will display them.

-

npm ping

-

By default, npm installs from the primary npm registry, registry.npmjs.org. -npm doctor hits a special ping endpoint within the registry. This can also be -checked with npm ping. If this check fails, you may be using a proxy that -needs to be configured, or may need to talk to your IT staff to get access over -HTTPS to registry.npmjs.org.

-

This check is done against whichever registry you've configured (you can see -what that is by running npm config get registry), and if you're using a -private registry that doesn't support the /whoami endpoint supported by the -primary registry, this check may fail.

-

npm -v

-

While Node.js may come bundled with a particular version of npm, it's the -policy of the CLI team that we recommend all users run npm@latest if they -can. As the CLI is maintained by a small team of contributors, there are only -resources for a single line of development, so npm's own long-term support -releases typically only receive critical security and regression fixes. The -team believes that the latest tested version of npm is almost always likely to -be the most functional and defect-free version of npm.

-

node -v

-

For most users, in most circumstances, the best version of Node will be the -latest long-term support (LTS) release. Those of you who want access to new -ECMAscript features or bleeding-edge changes to Node's standard library may be -running a newer version, and some of you may be required to run an older -version of Node because of enterprise change control policies. That's OK! But -in general, the npm team recommends that most users run Node.js LTS.

-

npm config get registry

-

Some of you may be installing from private package registries for your project -or company. That's great! Others of you may be following tutorials or -StackOverflow questions in an effort to troubleshoot problems you may be -having. Sometimes, this may entail changing the registry you're pointing at. -This part of npm doctor just lets you, and maybe whoever's helping you with -support, know that you're not using the default registry.

-

which git

-

While it's documented in the README, it may not be obvious that npm needs Git -installed to do many of the things that it does. Also, in some cases -– especially on Windows – you may have Git set up in such a way that it's not -accessible via your PATH so that npm can find it. This check ensures that Git -is available.

-

Permissions checks

-
    -
  • Your cache must be readable and writable by the user running npm.
  • -
  • Global package binaries must be writable by the user running npm.
  • -
  • Your local node_modules path, if you're running npm doctor with a project -directory, must be readable and writable by the user running npm.
  • -
-

Validate the checksums of cached packages

-

When an npm package is published, the publishing process generates a checksum -that npm uses at install time to verify that the package didn't get corrupted -in transit. npm doctor uses these checksums to validate the package tarballs -in your local cache (you can see where that cache is located with npm config -get cache, and see what's in that cache with npm cache ls – probably more -than you were expecting!). In the event that there are corrupt packages in your -cache, you should probably run npm cache clean and reset the cache.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-edit/index.html b/deps/npm/docs/public/cli-commands/npm-edit/index.html deleted file mode 100644 index 531e94d6e12580..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-edit/index.html +++ /dev/null @@ -1,115 +0,0 @@ -

npm edit

-

Edit an installed package

-

Synopsis

-
npm edit <pkg>[/<subpkg>...]
-

Description

-

Selects a (sub)dependency in the current -working directory and opens the package folder in the default editor -(or whatever you've configured as the npm editor config -- see -npm-config.)

-

After it has been edited, the package is rebuilt so as to pick up any -changes in compiled packages.

-

For instance, you can do npm install connect to install connect -into your package, and then npm edit connect to make a few -changes to your locally installed copy.

-

Configuration

-

editor

-
    -
  • Default: EDITOR environment variable if set, or "vi" on Posix, -or "notepad" on Windows.
  • -
  • Type: path
  • -
-

The command to run for npm edit or npm config edit.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-exec/index.html b/deps/npm/docs/public/cli-commands/npm-exec/index.html deleted file mode 100644 index 07f33a70a18779..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-exec/index.html +++ /dev/null @@ -1,209 +0,0 @@ -

npm exec

-

Run a command from a local or remote npm package

-

Synopsis

-
npm exec -- <pkg>[@<version>] [args...]
-npm exec -p <pkg>[@<version>] -- <cmd> [args...]
-npm exec -c '<cmd> [args...]'
-npm exec -p foo -c '<cmd> [args...]'
-
-npx <pkg>[@<specifier>] [args...]
-npx -p <pkg>[@<specifier>] <cmd> [args...]
-npx -c '<cmd> [args...]'
-npx -p <pkg>[@<specifier>] -c '<cmd> [args...]'
-
-alias: npm x, npx
-
--p <pkg> --package=<pkg> (may be specified multiple times)
--c <cmd> --call=<cmd> (may not be mixed with positional arguments)
-

Description

-

This command allows you to run an arbitrary command from an npm package -(either one installed locally, or fetched remotely), in a similar context -as running it via npm run.

-

Whatever packages are specified by the --package or -p option will be -provided in the PATH of the executed command, along with any locally -installed package executables. The --package or -p option may be -specified multiple times, to execute the supplied command in an environment -where all specified packages are available.

-

If any requested packages are not present in the local project -dependencies, then they are installed to a folder in the npm cache, which -is added to the PATH environment variable in the executed process. A -prompt is printed (which can be suppressed by providing either --yes or ---no).

-

Package names provided without a specifier will be matched with whatever -version exists in the local project. Package names with a specifier will -only be considered a match if they have the exact same name and version as -the local dependency.

-

If no -c or --call option is provided, then the positional arguments -are used to generate the command string. If no -p or --package options -are provided, then npm will attempt to determine the executable name from -the package specifier provided as the first positional argument according -to the following heuristic:

-
    -
  • If the package has a single entry in its bin field in package.json, -then that command will be used.
  • -
  • If the package has multiple bin entries, and one of them matches the -unscoped portion of the name field, then that command will be used.
  • -
  • If this does not result in exactly one option (either because there are -no bin entries, or none of them match the name of the package), then -npm exec exits with an error.
  • -
-

To run a binary other than the named binary, specify one or more ---package options, which will prevent npm from inferring the package from -the first command argument.

-

npx vs npm exec

-

When run via the npx binary, all flags and options must be set prior to -any positional arguments. When run via npm exec, a double-hyphen -- -flag can be used to suppress npm's parsing of switches and options that -should be sent to the executed command.

-

For example:

-
$ npx foo@latest bar --package=@npmcli/foo
-

In this case, npm will resolve the foo package name, and run the -following command:

-
$ foo bar --package=@npmcli/foo
-

Since the --package option comes after the positional arguments, it is -treated as an argument to the executed command.

-

In contrast, due to npm's argument parsing logic, running this command is -different:

-
$ npm exec foo@latest bar --package=@npmcli/foo
-

In this case, npm will parse the --package option first, resolving the -@npmcli/foo package. Then, it will execute the following command in that -context:

-
$ foo@latest bar
-

The double-hyphen character is recommended to explicitly tell npm to stop -parsing command line options and switches. The following command would -thus be equivalent to the npx command above:

-
$ npm exec -- foo@latest bar --package=@npmcli/foo
-

Examples

-

Run the version of tap in the local dependencies, with the provided -arguments:

-
$ npm exec -- tap --bail test/foo.js
-$ npx tap --bail test/foo.js
-

Run a command other than the command whose name matches the package name -by specifying a --package option:

-
$ npm exec --package=foo -- bar --bar-argument
-# ~ or ~
-$ npx --package=foo bar --bar-argument
-

Run an arbitrary shell script, in the context of the current project:

-
$ npm x -c 'eslint && say "hooray, lint passed"'
-$ npx -c 'eslint && say "hooray, lint passed"'
-

Compatibility with Older npx Versions

-

The npx binary was rewritten in npm v7.0.0, and the standalone npx -package deprecated at that time. npx uses the npm exec -command instead of a separate argument parser and install process, with -some affordances to maintain backwards compatibility with the arguments it -accepted in previous versions.

-

This resulted in some shifts in its functionality:

-
    -
  • Any npm config value may be provided.
  • -
  • To prevent security and user-experience problems from mistyping package -names, npx prompts before installing anything. Suppress this -prompt with the -y or --yes option.
  • -
  • The --no-install option is deprecated, and will be converted to --no.
  • -
  • Shell fallback functionality is removed, as it is not advisable.
  • -
  • The -p argument is a shorthand for --parseable in npm, but shorthand -for --package in npx. This is maintained, but only for the npx -executable.
  • -
  • The --ignore-existing option is removed. Locally installed bins are -always present in the executed process PATH.
  • -
  • The --npm option is removed. npx will always use the npm it ships -with.
  • -
  • The --node-arg and -n options are removed.
  • -
  • The --always-spawn option is redundant, and thus removed.
  • -
  • The --shell option is replaced with --script-shell, but maintained -in the npx executable for backwards compatibility.
  • -
-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-explain/index.html b/deps/npm/docs/public/cli-commands/npm-explain/index.html deleted file mode 100644 index dbba17b1bea649..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-explain/index.html +++ /dev/null @@ -1,138 +0,0 @@ -

npm explain

-

Explain installed packages

-

Synopsis

-
npm explain <folder | specifier>
-

Description

-

This command will print the chain of dependencies causing a given package -to be installed in the current project.

-

Positional arguments can be either folders within node_modules, or -name@version-range specifiers, which will select the dependency -relationships to explain.

-

For example, running npm explain glob within npm's source tree will show:

-
glob@7.1.6
-node_modules/glob
-  glob@"^7.1.4" from the root project
-
-glob@7.1.1 dev
-node_modules/tacks/node_modules/glob
-  glob@"^7.0.5" from rimraf@2.6.2
-  node_modules/tacks/node_modules/rimraf
-    rimraf@"^2.6.2" from tacks@1.3.0
-    node_modules/tacks
-      dev tacks@"^1.3.0" from the root project
-

To explain just the package residing at a specific folder, pass that as the -argument to the command. This can be useful when trying to figure out -exactly why a given dependency is being duplicated to satisfy conflicting -version requirements within the project.

-
$ npm explain node_modules/nyc/node_modules/find-up
-find-up@3.0.0 dev
-node_modules/nyc/node_modules/find-up
-  find-up@"^3.0.0" from nyc@14.1.1
-  node_modules/nyc
-    nyc@"^14.1.1" from tap@14.10.8
-    node_modules/tap
-      dev tap@"^14.10.8" from the root project
-

Configuration

-

json

-
    -
  • Default: false
  • -
  • Type: Bolean
  • -
-

Show information in JSON format.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-explore/index.html b/deps/npm/docs/public/cli-commands/npm-explore/index.html deleted file mode 100644 index 012a888ffa4ab5..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-explore/index.html +++ /dev/null @@ -1,119 +0,0 @@ -

-

section: cli-commands -title: npm-explore -description: Browse an installed package

-
-

npm explore

-

Browse an installed package

-

Synopsis

-
npm explore <pkg> [ -- <command>]
-

Description

-

Spawn a subshell in the directory of the installed package specified.

-

If a command is specified, then it is run in the subshell, which then -immediately terminates.

-

This is particularly handy in the case of git submodules in the -node_modules folder:

-
npm explore some-dependency -- git pull origin master
-

Note that the package is not automatically rebuilt afterwards, so be -sure to use npm rebuild <pkg> if you make any changes.

-

Configuration

-

shell

-
    -
  • Default: SHELL environment variable, or "bash" on Posix, or "cmd" on -Windows
  • -
  • Type: path
  • -
-

The shell to run for the npm explore command.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-fund/index.html b/deps/npm/docs/public/cli-commands/npm-fund/index.html deleted file mode 100644 index 142adcdc1c9789..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-fund/index.html +++ /dev/null @@ -1,133 +0,0 @@ -

npm fund

-

Retrieve funding information

-

Synopsis

-
    npm fund [<pkg>]
-

Description

-

This command retrieves information on how to fund the dependencies of -a given project. If no package name is provided, it will list all -dependencies that are looking for funding in a tree-structure in which -are listed the type of funding and the url to visit. If a package name -is provided then it tries to open its funding url using the --browser -config param; if there are multiple funding sources for the package, the -user will be instructed to pass the --which command to disambiguate.

-

The list will avoid duplicated entries and will stack all packages -that share the same url as a single entry. Given this nature the -list is not going to have the same shape of the output from npm ls.

-

Configuration

-

browser

-
    -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • -
  • Type: String
  • -
-

The browser that is called by the npm fund command to open websites.

-

json

-
    -
  • Type: Boolean
  • -
  • Default: false
  • -
-

Show information in JSON format.

-

unicode

-
    -
  • Type: Boolean
  • -
  • Default: true
  • -
-

Whether to represent the tree structure using unicode characters. -Set it to false in order to use all-ansi output.

-

which

-
    -
  • Type: Number
  • -
  • Default: undefined
  • -
-

If there are multiple funding sources, which 1-indexed source URL to open.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-help-search/index.html b/deps/npm/docs/public/cli-commands/npm-help-search/index.html deleted file mode 100644 index 88ddf20398d172..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-help-search/index.html +++ /dev/null @@ -1,110 +0,0 @@ -

npm help-search

-

Search npm help documentation

-

Synopsis

-
npm help-search <text>
-

Description

-

This command will search the npm markdown documentation files for the -terms provided, and then list the results, sorted by relevance.

-

If only one result is found, then it will show that help topic.

-

If the argument to npm help is not a known help topic, then it will -call help-search. It is rarely if ever necessary to call this -command directly.

-

Configuration

-

long

-
    -
  • Type: Boolean
  • -
  • Default: false
  • -
-

If true, the "long" flag will cause help-search to output context around -where the terms were found in the documentation.

-

If false, then help-search will just list out the help topics found.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-help/index.html b/deps/npm/docs/public/cli-commands/npm-help/index.html deleted file mode 100644 index 662c85d27b4e5f..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-help/index.html +++ /dev/null @@ -1,112 +0,0 @@ -

npm help

-

Get help on npm

-

Synopsis

-
npm help <term> [<terms..>]
-

Description

-

If supplied a topic, then show the appropriate documentation page.

-

If the topic does not exist, or if multiple terms are provided, then run -the help-search command to find a match. Note that, if help-search -finds a single subject, then it will run help on that topic, so unique -matches are equivalent to specifying a topic name.

-

Configuration

-

viewer

-
    -
  • Default: "man" on Posix, "browser" on Windows
  • -
  • Type: path
  • -
-

The program to use to view help content.

-

Set to "browser" to view html help content in the default web browser.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-hook/index.html b/deps/npm/docs/public/cli-commands/npm-hook/index.html deleted file mode 100644 index 9b0d7387aefb27..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-hook/index.html +++ /dev/null @@ -1,124 +0,0 @@ -

npm hook

-

Manage registry hooks

-

Synopsis

-
npm hook ls [pkg]
-npm hook add <entity> <url> <secret>
-npm hook update <id> <url> [secret]
-npm hook rm <id>
-

Example

-

Add a hook to watch a package for changes:

-
$ npm hook add lodash https://example.com/ my-shared-secret
-

Add a hook to watch packages belonging to the user substack:

-
$ npm hook add ~substack https://example.com/ my-shared-secret
-

Add a hook to watch packages in the scope @npm

-
$ npm hook add @npm https://example.com/ my-shared-secret
-

List all your active hooks:

-
$ npm hook ls
-

List your active hooks for the lodash package:

-
$ npm hook ls lodash
-

Update an existing hook's url:

-
$ npm hook update id-deadbeef https://my-new-website.here/
-

Remove a hook:

-
$ npm hook rm id-deadbeef
-

Description

-

Allows you to manage npm hooks, -including adding, removing, listing, and updating.

-

Hooks allow you to configure URL endpoints that will be notified whenever a -change happens to any of the supported entity types. Three different types of -entities can be watched by hooks: packages, owners, and scopes.

-

To create a package hook, simply reference the package name.

-

To create an owner hook, prefix the owner name with ~ (as in, ~youruser).

-

To create a scope hook, prefix the scope name with @ (as in, @yourscope).

-

The hook id used by update and rm are the IDs listed in npm hook ls for -that particular hook.

-

The shared secret will be sent along to the URL endpoint so you can verify the -request came from your own configured hook.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-init/index.html b/deps/npm/docs/public/cli-commands/npm-init/index.html deleted file mode 100644 index d8baf830fb8da8..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-init/index.html +++ /dev/null @@ -1,131 +0,0 @@ -

npm init

-

create a package.json file

-

Synopsis

-
npm init [--force|-f|--yes|-y|--scope]
-npm init <@scope> (same as `npx <@scope>/create`)
-npm init [<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)
-

Examples

-

Create a new React-based project using create-react-app:

-
$ npm init react-app ./my-react-app
-

Create a new esm-compatible package using create-esm:

-
$ mkdir my-esm-lib && cd my-esm-lib
-$ npm init esm --yes
-

Generate a plain old package.json using legacy init:

-
$ mkdir my-npm-pkg && cd my-npm-pkg
-$ git init
-$ npm init
-

Generate it without having it ask any questions:

-
$ npm init -y
-

Description

-

npm init <initializer> can be used to set up a new or existing npm package.

-

initializer in this case is an npm package named create-<initializer>, which -will be installed by npx, and then have its main bin -executed -- presumably creating or updating package.json and running any other -initialization-related operations.

-

The init command is transformed to a corresponding npx operation as follows:

-
    -
  • npm init foo -> npx create-foo
  • -
  • npm init @usr/foo -> npx @usr/create-foo
  • -
  • npm init @usr -> npx @usr/create
  • -
-

Any additional options will be passed directly to the command, so npm init foo ---hello will map to npx create-foo --hello.

-

If the initializer is omitted (by just calling npm init), init will fall back -to legacy init behavior. It will ask you a bunch of questions, and then write a -package.json for you. It will attempt to make reasonable guesses based on -existing fields, dependencies, and options selected. It is strictly additive, so -it will keep any fields and values that were already set. You can also use --y/--yes to skip the questionnaire altogether. If you pass --scope, it -will create a scoped package.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html b/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html deleted file mode 100644 index 9f3bb52e4bca98..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html +++ /dev/null @@ -1,98 +0,0 @@ -

npm install-ci-test

-

Install a project with a clean slate and run tests

-

Synopsis

-
npm install-ci-test
-
-alias: npm cit
-

Description

-

This command runs an npm ci followed immediately by an npm test.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install-test/index.html b/deps/npm/docs/public/cli-commands/npm-install-test/index.html deleted file mode 100644 index 5ad19f2861239c..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-install-test/index.html +++ /dev/null @@ -1,107 +0,0 @@ -

npm install-test

-

Install package(s) and run tests

-

Synopsis

-
npm install-test (with no args, in package dir)
-npm install-test [<@scope>/]<name>
-npm install-test [<@scope>/]<name>@<tag>
-npm install-test [<@scope>/]<name>@<version>
-npm install-test [<@scope>/]<name>@<version range>
-npm install-test <tarball file>
-npm install-test <tarball url>
-npm install-test <folder>
-
-alias: npm it
-common options: [--save|--save-dev|--save-optional] [--save-exact] [--dry-run]
-

Description

-

This command runs an npm install followed immediately by an npm test. It -takes exactly the same arguments as npm install.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install/index.html b/deps/npm/docs/public/cli-commands/npm-install/index.html deleted file mode 100644 index 7d5aeb4c190c2b..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-install/index.html +++ /dev/null @@ -1,460 +0,0 @@ -

npm install

-

Install a package

-

Synopsis

-
npm install (with no args, in package dir)
-npm install [<@scope>/]<name>
-npm install [<@scope>/]<name>@<tag>
-npm install [<@scope>/]<name>@<version>
-npm install [<@scope>/]<name>@<version range>
-npm install <alias>@npm:<name>
-npm install <git-host>:<git-user>/<repo-name>
-npm install <git repo url>
-npm install <tarball file>
-npm install <tarball url>
-npm install <folder>
-
-aliases: npm i, npm add
-common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
-

Description

-

This command installs a package and any packages that it depends on. If the -package has a package-lock, or an npm shrinkwrap file, or a yarn lock file, the -installation of dependencies will be driven by that, respecting the following -order of precedence:

-
    -
  • npm-shrinkwrap.json
  • -
  • package-lock.json
  • -
  • yarn.lock
  • -
-

See package-lock.json and npm shrinkwrap.

-

A package is:

-
    -
  • a) a folder containing a program described by a package.json file
  • -
  • b) a gzipped tarball containing (a)
  • -
  • c) a url that resolves to (b)
  • -
  • d) a <name>@<version> that is published on the registry (see registry) with (c)
  • -
  • e) a <name>@<tag> (see npm dist-tag) that points to (d)
  • -
  • f) a <name> that has a "latest" tag satisfying (e)
  • -
  • g) a <git remote url> that resolves to (a)
  • -
-

Even if you never publish your package, you can still get a lot of -benefits of using npm if you just want to write a node program (a), and -perhaps if you also want to be able to easily install it elsewhere -after packing it up into a tarball (b).

-
    -
  • -

    npm install (in a package directory, no arguments):

    -

    Install the dependencies in the local node_modules folder.

    -

    In global mode (ie, with -g or --global appended to the command), -it installs the current package context (ie, the current working -directory) as a global package.

    -

    By default, npm install will install all modules listed as dependencies -in package.json.

    -

    With the --production flag (or when the NODE_ENV environment variable -is set to production), npm will not install modules listed in -devDependencies. To install all modules listed in both dependencies -and devDependencies when NODE_ENV environment variable is set to production, -you can use --production=false.

    -
    -

    NOTE: The --production flag has no particular meaning when adding a -dependency to a project.

    -
    -
  • -
  • -

    npm install <folder>:

    -

    Install the package in the directory as a symlink in the current project. -Its dependencies will be installed before it's linked. If <folder> sits -inside the root of your project, its dependencies may be hoisted to the -top-level node_modules as they would for other types of dependencies.

    -
  • -
  • -

    npm install <tarball file>:

    -

    Install a package that is sitting on the filesystem. Note: if you just want -to link a dev directory into your npm root, you can do this more easily by -using npm link.

    -

    Tarball requirements:

    -
      -
    • The filename must use .tar, .tar.gz, or .tgz as -the extension.
    • -
    • The package contents should reside in a subfolder inside the tarball (usually it is called package/). npm strips one directory layer when installing the package (an equivalent of tar x --strip-components=1 is run).
    • -
    • The package must contain a package.json file with name and version properties.
    • -
    -

    Example:

    -
      npm install ./package.tgz
    -
  • -
  • -

    npm install <tarball url>:

    -

    Fetch the tarball url, and then install it. In order to distinguish between -this and other options, the argument must start with "http://" or "https://"

    -

    Example:

    -
      npm install https://github.com/indexzero/forever/tarball/v0.5.6
    -
  • -
  • -

    npm install [<@scope>/]<name>:

    -

    Do a <name>@<tag> install, where <tag> is the "tag" config. (See -config. The config's default value is latest.)

    -

    In most cases, this will install the version of the modules tagged as -latest on the npm registry.

    -

    Example:

    -
      npm install sax
    -

    npm install saves any specified packages into dependencies by default. -Additionally, you can control where and how they get saved with some -additional flags:

    -
      -
    • -P, --save-prod: Package will appear in your dependencies. This is the -default unless -D or -O are present.
    • -
    • -D, --save-dev: Package will appear in your devDependencies.
    • -
    • -O, --save-optional: Package will appear in your optionalDependencies.
    • -
    • --no-save: Prevents saving to dependencies.
    • -
    -

    When using any of the above options to save dependencies to your -package.json, there are two additional, optional flags:

    -
      -
    • -E, --save-exact: Saved dependencies will be configured with an -exact version rather than using npm's default semver range -operator.
    • -
    • -B, --save-bundle: Saved dependencies will also be added to your bundleDependencies list.
    • -
    -

    Further, if you have an npm-shrinkwrap.json or package-lock.json then it -will be updated as well.

    -

    <scope> is optional. The package will be downloaded from the registry -associated with the specified scope. If no registry is associated with -the given scope the default registry is assumed. See scope.

    -

    Note: if you do not include the @-symbol on your scope name, npm will -interpret this as a GitHub repository instead, see below. Scopes names -must also be followed by a slash.

    -

    Examples:

    -
    npm install sax
    -npm install githubname/reponame
    -npm install @myorg/privatepackage
    -npm install node-tap --save-dev
    -npm install dtrace-provider --save-optional
    -npm install readable-stream --save-exact
    -npm install ansi-regex --save-bundle
    -

    Note: If there is a file or folder named <name> in the current -working directory, then it will try to install that, and only try to -fetch the package by name if it is not valid.

    -
  • -
  • -

    npm install <alias>@npm:<name>:

    -

    Install a package under a custom alias. Allows multiple versions of -a same-name package side-by-side, more convenient import names for -packages with otherwise long ones, and using git forks replacements -or forked npm packages as replacements. Aliasing works only on your -project and does not rename packages in transitive dependencies. -Aliases should follow the naming conventions stated in -validate-npm-package-name.

    -

    Examples:

    -
      npm install my-react@npm:react
    -  npm install jquery2@npm:jquery@2
    -  npm install jquery3@npm:jquery@3
    -  npm install npa@npm:npm-package-arg
    -
  • -
  • -

    npm install [<@scope>/]<name>@<tag>:

    -

    Install the version of the package that is referenced by the specified tag. -If the tag does not exist in the registry data for that package, then this -will fail.

    -

    Example:

    -
    npm install sax@latest
    -npm install @myorg/mypackage@latest
    -
  • -
  • -

    npm install [<@scope>/]<name>@<version>:

    -

    Install the specified version of the package. This will fail if the -version has not been published to the registry.

    -

    Example:

    -
    npm install sax@0.1.1
    -npm install @myorg/privatepackage@1.5.0
    -
  • -
  • -

    npm install [<@scope>/]<name>@<version range>:

    -

    Install a version of the package matching the specified version range. This -will follow the same rules for resolving dependencies described in package.json.

    -

    Note that most version ranges must be put in quotes so that your shell will -treat it as a single argument.

    -

    Example:

    -
    npm install sax@">=0.1.0 <0.2.0"
    -npm install @myorg/privatepackage@"16 - 17"
    -
  • -
  • -

    npm install <git remote url>:

    -

    Installs the package from the hosted git provider, cloning it with git. -For a full git remote url, only that URL will be attempted.

    -
      <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
    -

    <protocol> is one of git, git+ssh, git+http, git+https, or -git+file.

    -

    If #<commit-ish> is provided, it will be used to clone exactly that -commit. If the commit-ish has the format #semver:<semver>, <semver> can -be any valid semver range or exact version, and npm will look for any tags -or refs matching that range in the remote repository, much as it would for a -registry dependency. If neither #<commit-ish> or #semver:<semver> is -specified, then the default branch of the repository is used.

    -

    If the repository makes use of submodules, those submodules will be cloned -as well.

    -

    If the package being installed contains a prepare script, its -dependencies and devDependencies will be installed, and the prepare -script will be run, before the package is packaged and installed.

    -

    The following git environment variables are recognized by npm and will be -added to the environment when running git:

    -
      -
    • GIT_ASKPASS
    • -
    • GIT_EXEC_PATH
    • -
    • GIT_PROXY_COMMAND
    • -
    • GIT_SSH
    • -
    • GIT_SSH_COMMAND
    • -
    • GIT_SSL_CAINFO
    • -
    • GIT_SSL_NO_VERIFY
    • -
    -

    See the git man page for details.

    -

    Examples:

    -
    npm install git+ssh://git@github.com:npm/cli.git#v1.0.27
    -npm install git+ssh://git@github.com:npm/cli#pull/273
    -npm install git+ssh://git@github.com:npm/cli#semver:^5.0
    -npm install git+https://isaacs@github.com/npm/cli.git
    -npm install git://github.com/npm/cli.git#v1.0.27
    -GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git
    -
  • -
  • npm install <githubname>/<githubrepo>[#<commit-ish>]:
  • -
  • -

    npm install github:<githubname>/<githubrepo>[#<commit-ish>]:

    -

    Install the package at https://github.com/githubname/githubrepo by -attempting to clone it using git.

    -

    If #<commit-ish> is provided, it will be used to clone exactly that -commit. If the commit-ish has the format #semver:<semver>, <semver> can -be any valid semver range or exact version, and npm will look for any tags -or refs matching that range in the remote repository, much as it would for a -registry dependency. If neither #<commit-ish> or #semver:<semver> is -specified, then master is used.

    -

    As with regular git dependencies, dependencies and devDependencies will -be installed if the package has a prepare script before the package is -done installing.

    -

    Examples:

    -
    npm install mygithubuser/myproject
    -npm install github:mygithubuser/myproject
    -
  • -
  • -

    npm install gist:[<githubname>/]<gistID>[#<commit-ish>|#semver:<semver>]:

    -

    Install the package at https://gist.github.com/gistID by attempting to -clone it using git. The GitHub username associated with the gist is -optional and will not be saved in package.json.

    -

    As with regular git dependencies, dependencies and devDependencies will -be installed if the package has a prepare script before the package is -done installing.

    -

    Example:

    -
    npm install gist:101a11beef
    -
  • -
  • -

    npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]:

    -

    Install the package at https://bitbucket.org/bitbucketname/bitbucketrepo -by attempting to clone it using git.

    -

    If #<commit-ish> is provided, it will be used to clone exactly that -commit. If the commit-ish has the format #semver:<semver>, <semver> can -be any valid semver range or exact version, and npm will look for any tags -or refs matching that range in the remote repository, much as it would for a -registry dependency. If neither #<commit-ish> or #semver:<semver> is -specified, then master is used.

    -

    As with regular git dependencies, dependencies and devDependencies will -be installed if the package has a prepare script before the package is -done installing.

    -

    Example:

    -
    npm install bitbucket:mybitbucketuser/myproject
    -
  • -
  • -

    npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]:

    -

    Install the package at https://gitlab.com/gitlabname/gitlabrepo -by attempting to clone it using git.

    -

    If #<commit-ish> is provided, it will be used to clone exactly that -commit. If the commit-ish has the format #semver:<semver>, <semver> can -be any valid semver range or exact version, and npm will look for any tags -or refs matching that range in the remote repository, much as it would for a -registry dependency. If neither #<commit-ish> or #semver:<semver> is -specified, then master is used.

    -

    As with regular git dependencies, dependencies and devDependencies will -be installed if the package has a prepare script before the package is -done installing.

    -

    Example:

    -
    npm install gitlab:mygitlabuser/myproject
    -npm install gitlab:myusr/myproj#semver:^5.0
    -
  • -
-

You may combine multiple arguments and even multiple types of arguments. -For example:

-
npm install sax@">=0.1.0 <0.2.0" bench supervisor
-

The --tag argument will apply to all of the specified install targets. If a -tag with the given name exists, the tagged version is preferred over newer -versions.

-

The --dry-run argument will report in the usual way what the install would -have done without actually installing anything.

-

The --package-lock-only argument will only update the package-lock.json, -instead of checking node_modules and downloading dependencies.

-

The -f or --force argument will force npm to fetch remote resources even if a -local copy exists on disk.

-
npm install sax --force
-

The -g or --global argument will cause npm to install the package globally -rather than locally. See folders.

-

The --global-style argument will cause npm to install the package into -your local node_modules folder with the same layout it uses with the -global node_modules folder. Only your direct dependencies will show in -node_modules and everything they depend on will be flattened in their -node_modules folders. This obviously will eliminate some deduping.

-

The --ignore-scripts argument will cause npm to not execute any -scripts defined in the package.json. See scripts.

-

The --legacy-bundling argument will cause npm to install the package such -that versions of npm prior to 1.4, such as the one included with node 0.8, -can install the package. This eliminates all automatic deduping.

-

The --legacy-peer-deps argument will cause npm to ignore all -peerDependencies when installing, similar to npm@6 and older.

-

The --link argument will cause npm to link global installs into the -local space whenever packages from the global space may satisfy a dependency -required version.

-

The --no-audit argument can be used to disable sending audit reports to -the configured registries. See npm-audit for details on what -is sent.

-

The --no-bin-links argument will prevent npm from creating symlinks for -any binaries the package might contain.

-

The --no-fund argument will hide the message displayed at the end of each -install that acknowledges the number of dependencies looking for funding. -See npm-fund

-

The --no-optional argument will prevent optional dependencies from -being installed.

-

The --no-shrinkwrap argument, which will ignore an available -package-lock or shrinkwrap file and use the package.json instead.

-

The --no-package-lock argument will prevent npm from creating a -package-lock.json file. When running with package-lock's disabled npm -will not automatically prune your node modules when installing.

-

The --nodedir=/path/to/node/source argument will allow npm to find the -node source code so that npm can compile native modules.

-

The --only={prod[uction]|dev[elopment]} argument will cause either only -devDependencies or only non-devDependencies to be installed regardless -of the NODE_ENV.

-

The --strict-peer-deps argument will cause the install to fail on any -peerDependencies conflict, even if it's possible to use a heuristic to -provide a least-surprising resolution to a given conflict.

-

See config. Many of the configuration params have some -effect on installation, since that's most of what npm does.

-

Algorithm

-

Given a package{dep} structure: A{B,C}, B{C}, C{D}, -the npm install algorithm produces:

-
A
-+-- B
-+-- C
-+-- D
-

That is, the dependency from B to C is satisfied by the fact that A -already caused C to be installed at a higher level. D is still installed -at the top level because nothing conflicts with it.

-

For A{B,C}, B{C,D@1}, C{D@2}, this algorithm produces:

-
A
-+-- B
-+-- C
-   `-- D@2
-+-- D@1
-

Because B's D@1 will be installed in the top-level, C now has to install D@2 -privately for itself. This algorithm is deterministic, but different trees may -be produced if two dependencies are requested for installation in a different -order.

-

See folders for a more detailed description of the -specific folder structures that npm creates.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-link/index.html b/deps/npm/docs/public/cli-commands/npm-link/index.html deleted file mode 100644 index bf777f915c69b9..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-link/index.html +++ /dev/null @@ -1,139 +0,0 @@ -

npm link

- -

Synopsis

-
npm link (in package dir)
-npm link [<@scope>/]<pkg>[@<version>]
-
-alias: npm ln
-

Description

-

Package linking is a two-step process.

-

First, npm link in a package folder will create a symlink in the global folder -{prefix}/lib/node_modules/<package> that links to the package where the npm -link command was executed. It will also link any bins in the package to {prefix}/bin/{name}. -Note that npm link uses the global prefix (see npm prefix -g for its value).

-

Next, in some other location, npm link package-name will create a -symbolic link from globally-installed package-name to node_modules/ -of the current folder.

-

Note that package-name is taken from package.json, -not from directory name.

-

The package name can be optionally prefixed with a scope. See scope. -The scope must be preceded by an @-symbol and followed by a slash.

-

When creating tarballs for npm publish, the linked packages are -"snapshotted" to their current state by resolving the symbolic links.

-

This is handy for installing your own stuff, so that you can work on it and -test it iteratively without having to continually rebuild.

-

For example:

-
    cd ~/projects/node-redis    # go into the package directory
-    npm link                    # creates global link
-    cd ~/projects/node-bloggy   # go into some other package directory.
-    npm link redis              # link-install the package
-

Now, any changes to ~/projects/node-redis will be reflected in -~/projects/node-bloggy/node_modules/node-redis/. Note that the link should -be to the package name, not the directory name for that package.

-

You may also shortcut the two steps in one. For example, to do the -above use-case in a shorter way:

-
cd ~/projects/node-bloggy  # go into the dir of your main project
-npm link ../node-redis     # link the dir of your dependency
-

The second line is the equivalent of doing:

-
(cd ../node-redis; npm link)
-npm link redis
-

That is, it first creates a global link, and then links the global -installation target into your project's node_modules folder.

-

Note that in this case, you are referring to the directory name, node-redis, -rather than the package name redis.

-

If your linked package is scoped (see scope) your link command must include that scope, e.g.

-
npm link @myorg/privatepackage
-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-logout/index.html b/deps/npm/docs/public/cli-commands/npm-logout/index.html deleted file mode 100644 index 24b0938d12b4c3..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-logout/index.html +++ /dev/null @@ -1,114 +0,0 @@ -

npm logout

-

Log out of the registry

-

Synopsis

-
npm logout [--registry=<url>] [--scope=<@scope>]
-

Description

-

When logged into a registry that supports token-based authentication, tell the -server to end this token's session. This will invalidate the token everywhere -you're using it, not just for the current environment.

-

When logged into a legacy registry that uses username and password authentication, this will -clear the credentials in your user configuration. In this case, it will only affect -the current environment.

-

If --scope is provided, this will find the credentials for the registry -connected to that scope, if set.

-

Configuration

-

registry

-

Default: https://registry.npmjs.org/

-

The base URL of the npm package registry. If scope is also specified, -it takes precedence.

-

scope

-

Default: The scope of your current project, if any, otherwise none.

-

If specified, you will be logged out of the specified scope. See scope.

-
npm logout --scope=@myco
-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ls/index.html b/deps/npm/docs/public/cli-commands/npm-ls/index.html deleted file mode 100644 index 92fbd568c1b8f3..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-ls/index.html +++ /dev/null @@ -1,182 +0,0 @@ -

npm ls

-

List installed packages

-

Synopsis

-
npm ls [[<@scope>/]<pkg> ...]
-
-aliases: list, la, ll
-

Description

-

This command will print to stdout all the versions of packages that are -installed, as well as their dependencies, in a tree-structure.

-

Positional arguments are name@version-range identifiers, which will -limit the results to only the paths to the packages named. Note that -nested packages will also show the paths to the specified packages. -For example, running npm ls promzard in npm's source tree will show:

-
    npm@7.0.2 /path/to/npm
-    └─┬ init-package-json@0.0.4
-      └── promzard@0.1.5
-

It will print out extraneous, missing, and invalid packages.

-

If a project specifies git urls for dependencies these are shown -in parentheses after the name@version to make it easier for users to -recognize potential forks of a project.

-

The tree shown is the logical dependency tree, based on package -dependencies, not the physical layout of your node_modules folder.

-

When run as ll or la, it shows extended information by default.

-

Configuration

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show information in JSON format.

-

long

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show extended information.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show parseable output instead of tree view.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

List packages in the global install prefix instead of in the current -project.

-

depth

-
    -
  • Type: Int
  • -
-

Max display depth of the dependency tree.

-

prod / production

-
    -
  • Type: Boolean
  • -
  • Default: false
  • -
-

Display only the dependency tree for packages in dependencies.

-

dev / development

-
    -
  • Type: Boolean
  • -
  • Default: false
  • -
-

Display only the dependency tree for packages in devDependencies.

-

only

-
    -
  • Type: String
  • -
-

When "dev" or "development", is an alias to dev.

-

When "prod" or "production", is an alias to production.

- -
    -
  • Type: Boolean
  • -
  • Default: false
  • -
-

Display only dependencies which are linked

-

unicode

-
    -
  • Type: Boolean
  • -
  • Default: true
  • -
-

Whether to represent the tree structure using unicode characters. -Set it to false in order to use all-ansi output.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-org/index.html b/deps/npm/docs/public/cli-commands/npm-org/index.html deleted file mode 100644 index 6bb2030e22f112..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-org/index.html +++ /dev/null @@ -1,112 +0,0 @@ -

npm org

-

Manage orgs

-

Synopsis

-
npm org set <orgname> <username> [developer | admin | owner]
-npm org rm <orgname> <username>
-npm org ls <orgname> [<username>]
-

Example

-

Add a new developer to an org:

-
$ npm org set my-org @mx-smith
-

Add a new admin to an org (or change a developer to an admin):

-
$ npm org set my-org @mx-santos admin
-

Remove a user from an org:

-
$ npm org rm my-org mx-santos
-

List all users in an org:

-
$ npm org ls my-org
-

List all users in JSON format:

-
$ npm org ls my-org --json
-

See what role a user has in an org:

-
$ npm org ls my-org @mx-santos
-

Description

-

You can use the npm org commands to manage and view users of an organization. -It supports adding and removing users, changing their roles, listing them, and -finding specific ones and their roles.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-outdated/index.html b/deps/npm/docs/public/cli-commands/npm-outdated/index.html deleted file mode 100644 index 30674263625527..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-outdated/index.html +++ /dev/null @@ -1,182 +0,0 @@ -

npm outdated

-

Check for outdated packages

-

Synopsis

-
npm outdated [[<@scope>/]<pkg> ...]
-

Description

-

This command will check the registry to see if any (or, specific) installed -packages are currently outdated.

-

In the output:

-
    -
  • wanted is the maximum version of the package that satisfies the semver -range specified in package.json. If there's no available semver range (i.e. -you're running npm outdated --global, or the package isn't included in -package.json), then wanted shows the currently-installed version.
  • -
  • latest is the version of the package tagged as latest in the registry. -Running npm publish with no special configuration will publish the package -with a dist-tag of latest. This may or may not be the maximum version of -the package, or the most-recently published version of the package, depending -on how the package's developer manages the latest dist-tag.
  • -
  • location is where in the physical tree the package is located.
  • -
  • depended by shows which package depends on the displayed dependency
  • -
  • package type (when using --long / -l) tells you whether this package is -a dependency or a dev/peer/optional dependency. Packages not included in package.json -are always marked dependencies.
  • -
  • homepage (when using --long / -l) is the homepage value contained in the package's packument
  • -
  • Red means there's a newer version matching your semver requirements, so you should update now.
  • -
  • Yellow indicates that there's a newer version above your semver requirements (usually new major, or new 0.x minor) so proceed with caution.
  • -
-

An example

-
$ npm outdated
-Package      Current   Wanted   Latest  Location                  Depended by
-glob          5.0.15   5.0.15    6.0.1  node_modules/glob         dependent-package-name
-nothingness    0.0.3      git      git  node_modules/nothingness  dependent-package-name
-npm            3.5.1    3.5.2    3.5.1  node_modules/npm          dependent-package-name
-local-dev      0.0.3   linked   linked  local-dev                 dependent-package-name
-once           1.3.2    1.3.3    1.3.3  node_modules/once         dependent-package-name
-

With these dependencies:

-
{
-  "glob": "^5.0.15",
-  "nothingness": "github:othiym23/nothingness#master",
-  "npm": "^3.5.1",
-  "once": "^1.3.1"
-}
-

A few things to note:

-
    -
  • glob requires ^5, which prevents npm from installing glob@6, which is -outside the semver range.
  • -
  • Git dependencies will always be reinstalled, because of how they're specified. -The installed committish might satisfy the dependency specifier (if it's -something immutable, like a commit SHA), or it might not, so npm outdated and -npm update have to fetch Git repos to check. This is why currently doing a -reinstall of a Git dependency always forces a new clone and install.
  • -
  • npm@3.5.2 is marked as "wanted", but "latest" is npm@3.5.1 because npm -uses dist-tags to manage its latest and next release channels. npm update -will install the newest version, but npm install npm (with no semver range) -will install whatever's tagged as latest.
  • -
  • once is just plain out of date. Reinstalling node_modules from scratch or -running npm update will bring it up to spec.
  • -
-

Configuration

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show information in JSON format.

-

long

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show extended information.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show parseable output instead of tree view.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Check packages in the global install prefix instead of in the current -project.

-

all

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Display all outdated dependencies on the tree.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-owner/index.html b/deps/npm/docs/public/cli-commands/npm-owner/index.html deleted file mode 100644 index 84cd881f2ea934..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-owner/index.html +++ /dev/null @@ -1,119 +0,0 @@ -

npm owner

-

Manage package owners

-

Synopsis

-
npm owner add <user> [<@scope>/]<pkg>
-npm owner rm <user> [<@scope>/]<pkg>
-npm owner ls [<@scope>/]<pkg>
-
-aliases: author
-

Description

-

Manage ownership of published packages.

-
    -
  • ls: -List all the users who have access to modify a package and push new versions. -Handy when you need to know who to bug for help.
  • -
  • add: -Add a new user as a maintainer of a package. This user is enabled to modify -metadata, publish new versions, and add other owners.
  • -
  • rm: -Remove a user from the package owner list. This immediately revokes their -privileges.
  • -
-

Note that there is only one level of access. Either you can modify a package, -or you can't. Future versions may contain more fine-grained access levels, but -that is not implemented at this time.

-

If you have two-factor authentication enabled with auth-and-writes then -you'll need to include an otp on the command line when changing ownership -with --otp.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-pack/index.html b/deps/npm/docs/public/cli-commands/npm-pack/index.html deleted file mode 100644 index 4776b37167ae78..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-pack/index.html +++ /dev/null @@ -1,107 +0,0 @@ -

npm pack

-

Create a tarball from a package

-

Synopsis

-
npm pack [[<@scope>/]<pkg>...] [--dry-run]
-

Description

-

For anything that's installable (that is, a package folder, tarball, -tarball url, name@tag, name@version, name, or scoped name), this -command will fetch it to the cache, and then copy the tarball to the -current working directory as <name>-<version>.tgz, and then write -the filenames out to stdout.

-

If the same package is specified multiple times, then the file will be -overwritten the second time.

-

If no arguments are supplied, then npm packs the current package folder.

-

The --dry-run argument will do everything that pack usually does without -actually packing anything. Reports on what would have gone into the tarball.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ping/index.html b/deps/npm/docs/public/cli-commands/npm-ping/index.html deleted file mode 100644 index 63bf92266ceb21..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-ping/index.html +++ /dev/null @@ -1,100 +0,0 @@ -

npm ping

-

Ping npm registry

-

Synopsis

-
npm ping [--registry <registry>]
-

Description

-

Ping the configured or given npm registry and verify authentication. -If it works it will output something like:

-
Ping success: {*Details about registry*}
-

otherwise you will get:

-
Ping error: {*Detail about error}
-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-prefix/index.html b/deps/npm/docs/public/cli-commands/npm-prefix/index.html deleted file mode 100644 index f85836e5138540..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-prefix/index.html +++ /dev/null @@ -1,103 +0,0 @@ -

npm prefix

-

Display prefix

-

Synopsis

-
npm prefix [-g]
-

Description

-

Print the local prefix to standard out. This is the closest parent directory -to contain a package.json file or node_modules directory, unless -g is -also specified.

-

If -g is specified, this will be the value of the global prefix. See -npm config for more detail.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-profile/index.html b/deps/npm/docs/public/cli-commands/npm-profile/index.html deleted file mode 100644 index 355caa9156a399..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-profile/index.html +++ /dev/null @@ -1,153 +0,0 @@ -

npm profile

-

Change settings on your registry profile

-

Synopsis

-
npm profile get [--json|--parseable] [<property>]
-npm profile set [--json|--parseable] <property> <value>
-npm profile set password
-npm profile enable-2fa [auth-and-writes|auth-only]
-npm profile disable-2fa
-

Description

-

Change your profile information on the registry. This not be available if -you're using a non-npmjs registry.

-
    -
  • npm profile get [<property>]: -Display all of the properties of your profile, or one or more specific -properties. It looks like:
  • -
-
+-----------------+---------------------------+
-| name            | example                   |
-+-----------------+---------------------------+
-| email           | me@example.com (verified) |
-+-----------------+---------------------------+
-| two factor auth | auth-and-writes           |
-+-----------------+---------------------------+
-| fullname        | Example User              |
-+-----------------+---------------------------+
-| homepage        |                           |
-+-----------------+---------------------------+
-| freenode        |                           |
-+-----------------+---------------------------+
-| twitter         |                           |
-+-----------------+---------------------------+
-| github          |                           |
-+-----------------+---------------------------+
-| created         | 2015-02-26T01:38:35.892Z  |
-+-----------------+---------------------------+
-| updated         | 2017-10-02T21:29:45.922Z  |
-+-----------------+---------------------------+
-
    -
  • npm profile set <property> <value>: -Set the value of a profile property. You can set the following properties this way: -email, fullname, homepage, freenode, twitter, github
  • -
  • npm profile set password: -Change your password. This is interactive, you'll be prompted for your -current password and a new password. You'll also be prompted for an OTP -if you have two-factor authentication enabled.
  • -
  • -

    npm profile enable-2fa [auth-and-writes|auth-only]: -Enables two-factor authentication. Defaults to auth-and-writes mode. Modes are:

    -
      -
    • auth-only: Require an OTP when logging in or making changes to your -account's authentication. The OTP will be required on both the website -and the command line.
    • -
    • auth-and-writes: Requires an OTP at all the times auth-only does, and also requires one when -publishing a module, setting the latest dist-tag, or changing access -via npm access and npm owner.
    • -
    -
  • -
  • npm profile disable-2fa: -Disables two-factor authentication.
  • -
-

Details

-

All of the npm profile subcommands accept --json and --parseable and -will tailor their output based on those. Some of these commands may not be -available on non npmjs.com registries.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-prune/index.html b/deps/npm/docs/public/cli-commands/npm-prune/index.html deleted file mode 100644 index cb06d57df8a0a1..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-prune/index.html +++ /dev/null @@ -1,113 +0,0 @@ -

npm prune

-

Remove extraneous packages

-

Synopsis

-
npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
-

Description

-

This command removes "extraneous" packages. If a package name is -provided, then only packages matching one of the supplied names are -removed.

-

Extraneous packages are packages that are not listed on the parent -package's dependencies list.

-

If the --production flag is specified or the NODE_ENV environment -variable is set to production, this command will remove the packages -specified in your devDependencies. Setting --no-production will -negate NODE_ENV being set to production.

-

If the --dry-run flag is used then no changes will actually be made.

-

If the --json flag is used then the changes npm prune made (or would -have made with --dry-run) are printed as a JSON object.

-

In normal operation with package-locks enabled, extraneous modules are -pruned automatically when modules are installed and you'll only need -this command with the --production flag.

-

If you've disabled package-locks then extraneous modules will not be removed -and it's up to you to run npm prune from time-to-time to remove them.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-publish/index.html b/deps/npm/docs/public/cli-commands/npm-publish/index.html deleted file mode 100644 index 14bdcc1b06fc67..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-publish/index.html +++ /dev/null @@ -1,145 +0,0 @@ -

npm publish

-

Publish a package

-

Synopsis

-
npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]
-
-Publishes '.' if no argument supplied
-Sets tag 'latest' if no --tag specified
-

Description

-

Publishes a package to the registry so that it can be installed by name. All -files in the package directory are included if no local .gitignore or -.npmignore file exists. If both files exist and a file is ignored by -.gitignore but not by .npmignore then it will be included. See -developers for full details on what's included in the published package, as well as details on how the package is built.

-

By default npm will publish to the public registry. This can be overridden by -specifying a different default registry or using a scope in the name (see package.json).

-
    -
  • <folder>: -A folder containing a package.json file
  • -
  • <tarball>: -A url or file path to a gzipped tar archive containing a single folder -with a package.json file inside.
  • -
  • [--tag <tag>] -Registers the published package with the given tag, such that npm install -<name>@<tag> will install this version. By default, npm publish updates -and npm install installs the latest tag. See npm-dist-tag for -details about tags.
  • -
  • [--access <public|restricted>] -Tells the registry whether this package should be published as public or -restricted. Only applies to scoped packages, which default to restricted. -If you don't have a paid account, you must publish with --access public -to publish scoped packages.
  • -
  • [--otp <otpcode>] -If you have two-factor authentication enabled in auth-and-writes mode -then you can provide a code from your authenticator with this. If you -don't include this and you're running from a TTY then you'll be prompted.
  • -
  • [--dry-run] -As of npm@6, does everything publish would do except actually publishing -to the registry. Reports the details of what would have been published.
  • -
-

Fails if the package name and version combination already exists in -the specified registry.

-

Once a package is published with a given name and version, that -specific name and version combination can never be used again, even if -it is removed with npm unpublish.

-

As of npm@5, both a sha1sum and an integrity field with a sha512sum of the -tarball will be submitted to the registry during publication. Subsequent -installs will use the strongest supported algorithm to verify downloads.

-

Similar to --dry-run see npm pack, which figures out the files to be -included and packs them into a tarball to be uploaded to the registry.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-rebuild/index.html b/deps/npm/docs/public/cli-commands/npm-rebuild/index.html deleted file mode 100644 index 8bf370f34535d9..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-rebuild/index.html +++ /dev/null @@ -1,98 +0,0 @@ -

npm rebuild

-

Rebuild a package

-

Synopsis

-
npm rebuild [[<@scope>/<name>]...]
-
-alias: npm rb
-

Description

-

This command runs the npm build command on the matched folders. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-repo/index.html b/deps/npm/docs/public/cli-commands/npm-repo/index.html deleted file mode 100644 index 2a4267e0f20328..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-repo/index.html +++ /dev/null @@ -1,109 +0,0 @@ -

npm repo

-

Open package repository page in the browser

-

Synopsis

-
npm repo [<pkgname> [<pkgname> ...]]
-

Description

-

This command tries to guess at the likely location of a package's -repository URL, and then tries to open it using the --browser -config param. If no package name is provided, it will search for -a package.json in the current folder and use the name property.

-

Configuration

-

browser

-
    -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • -
  • Type: String or Boolean
  • -
-

The browser that is called by the npm repo command to open websites.

-

Set to false to suppress browser behavior and instead print urls to -terminal.

-

Set to true to use default system URL opener.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-restart/index.html b/deps/npm/docs/public/cli-commands/npm-restart/index.html deleted file mode 100644 index f57b09a90e9940..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-restart/index.html +++ /dev/null @@ -1,118 +0,0 @@ -

npm restart

-

Restart a package

-

Synopsis

-
npm restart [-- <args>]
-

Description

-

This restarts a package.

-

This runs a package's "stop", "restart", and "start" scripts, and associated -pre- and post- scripts, in the order given below:

-
    -
  1. prerestart
  2. -
  3. prestop
  4. -
  5. stop
  6. -
  7. poststop
  8. -
  9. restart
  10. -
  11. prestart
  12. -
  13. start
  14. -
  15. poststart
  16. -
  17. postrestart
  18. -
-

Note

-

Note that the "restart" script is run in addition to the "stop" -and "start" scripts, not instead of them.

-

This is the behavior as of npm major version 2. A change in this -behavior will be accompanied by an increase in major version number

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-root/index.html b/deps/npm/docs/public/cli-commands/npm-root/index.html deleted file mode 100644 index f02657d2bc9acc..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-root/index.html +++ /dev/null @@ -1,99 +0,0 @@ -

npm root

-

Display npm root

-

Synopsis

-
npm root [-g]
-

Description

-

Print the effective node_modules folder to standard out.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-run-script/index.html b/deps/npm/docs/public/cli-commands/npm-run-script/index.html deleted file mode 100644 index 89c0e561533c56..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-run-script/index.html +++ /dev/null @@ -1,148 +0,0 @@ -

npm run-script

-

Run arbitrary package scripts

-

Synopsis

-
npm run-script <command> [--silent] [-- <args>...]
-
-alias: npm run
-

Description

-

This runs an arbitrary command from a package's "scripts" object. If no -"command" is provided, it will list the available scripts. run[-script] is -used by the test, start, restart, and stop commands, but can be called -directly, as well. When the scripts in the package are printed out, they're -separated into lifecycle (test, start, restart) and directly-run scripts.

-

As of npm@2.0.0, you can -use custom arguments when executing scripts. The special option -- is used by -getopt to delimit the end of the options. npm will pass -all the arguments after the -- directly to your script:

-
npm run test -- --grep="pattern"
-

The arguments will only be passed to the script specified after npm run -and not to any pre or post script.

-

The env script is a special built-in command that can be used to list -environment variables that will be available to the script at runtime. If an -"env" command is defined in your package, it will take precedence over the -built-in.

-

In addition to the shell's pre-existing PATH, npm run adds -node_modules/.bin to the PATH provided to scripts. Any binaries provided by -locally-installed dependencies can be used without the node_modules/.bin -prefix. For example, if there is a devDependency on tap in your package, -you should write:

-
"scripts": {"test": "tap test/\*.js"}
-

instead of

-
"scripts": {"test": "node_modules/.bin/tap test/\*.js"}
-

to run your tests.

-

The actual shell your script is run within is platform dependent. By default, -on Unix-like systems it is the /bin/sh command, on Windows it is the cmd.exe. -The actual shell referred to by /bin/sh also depends on the system. -As of npm@5.1.0 you can -customize the shell with the script-shell configuration.

-

Scripts are run from the root of the module, regardless of what your current -working directory is when you call npm run. If you want your script to -use different behavior based on what subdirectory you're in, you can use the -INIT_CWD environment variable, which holds the full path you were in when -you ran npm run.

-

npm run sets the NODE environment variable to the node executable with -which npm is executed. Also, if the --scripts-prepend-node-path is passed, -the directory within which node resides is added to the -PATH. If --scripts-prepend-node-path=auto is passed (which has been the -default in npm v3), this is only performed when that node executable is -not found in the PATH.

-

If you try to run a script without having a node_modules directory and it fails, -you will be given a warning to run npm install, just in case you've forgotten.

-

You can use the --silent flag to prevent showing npm ERR! output on error.

-

You can use the --if-present flag to avoid exiting with a non-zero exit code -when the script is undefined. This lets you run potentially undefined scripts -without breaking the execution chain.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-search/index.html b/deps/npm/docs/public/cli-commands/npm-search/index.html deleted file mode 100644 index be1f823e16d2fa..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-search/index.html +++ /dev/null @@ -1,173 +0,0 @@ -

npm search

-

Search for packages

-

Synopsis

-
npm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]
-
-aliases: s, se, find
-

Description

-

Search the registry for packages matching the search terms. npm search -performs a linear, incremental, lexically-ordered search through package -metadata for all files in the registry. If color is enabled, it will further -highlight the matches in the results.

-

Additionally, using the --searchopts and --searchexclude options paired with -more search terms will respectively include and exclude further patterns. The -main difference between --searchopts and the standard search terms is that the -former does not highlight results in the output and can be used for more -fine-grained filtering. Additionally, both of these can be added to .npmrc for -default search filtering behavior.

-

Search also allows targeting of maintainers in search results, by prefixing -their npm username with =.

-

If a term starts with /, then it's interpreted as a regular expression and -supports standard JavaScript RegExp syntax. A trailing / will be ignored in -this case. (Note that many regular expression characters must be escaped or -quoted in most shells.)

-

A Note on caching

-

Configuration

-

description

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Used as --no-description, disables search matching in package descriptions and -suppresses display of that field in results.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Output search results as a JSON array.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Output search results as lines with tab-separated columns.

-

long

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Display full package descriptions and other long text across multiple -lines. When disabled (default) search results are truncated to fit -neatly on a single line. Modules with extremely long names will -fall on multiple lines.

-

searchopts

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Space-separated options that are always passed to search.

-

searchexclude

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Space-separated options that limit the results from search.

-

searchstaleness

-
    -
  • Default: 900 (15 minutes)
  • -
  • Type: Number
  • -
-

The age of the cache, in seconds, before another registry request is made.

-

registry

- -

Search the specified registry for modules. If you have configured npm to point -to a different default registry, such as your internal private module -repository, npm search will default to that registry when searching. Pass a -different registry url such as the default above in order to override this -setting.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html b/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html deleted file mode 100644 index 767bff8ff4492f..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html +++ /dev/null @@ -1,106 +0,0 @@ -

npm shrinkwrap

-

Lock down dependency versions for publication

-

Synopsis

-
npm shrinkwrap
-

Description

-

This command repurposes package-lock.json into a publishable -npm-shrinkwrap.json or simply creates a new one. The file created and updated -by this command will then take precedence over any other existing or future -package-lock.json files. For a detailed explanation of the design and purpose -of package locks in npm, see package-locks.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-star/index.html b/deps/npm/docs/public/cli-commands/npm-star/index.html deleted file mode 100644 index 2502908db5ffa5..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-star/index.html +++ /dev/null @@ -1,101 +0,0 @@ -

npm star

-

Mark your favorite packages

-

Synopsis

-
npm star [<pkg>...]
-npm unstar [<pkg>...]
-

Description

-

"Starring" a package means that you have some interest in it. It's -a vaguely positive way to show that you care.

-

"Unstarring" is the same thing, but in reverse.

-

It's a boolean thing. Starring repeatedly has no additional effect.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-stars/index.html b/deps/npm/docs/public/cli-commands/npm-stars/index.html deleted file mode 100644 index a9eec5c52324ff..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-stars/index.html +++ /dev/null @@ -1,101 +0,0 @@ -

npm stars

-

View packages marked as favorites

-

Synopsis

-
npm stars [<user>]
-

Description

-

If you have starred a lot of neat things and want to find them again -quickly this command lets you do just that.

-

You may also want to see your friend's favorite packages, in this case -you will most certainly enjoy this command.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-start/index.html b/deps/npm/docs/public/cli-commands/npm-start/index.html deleted file mode 100644 index 4428ec822bb794..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-start/index.html +++ /dev/null @@ -1,103 +0,0 @@ -

npm start

-

Start a package

-

Synopsis

-
npm start [-- <args>]
-

Description

-

This runs an arbitrary command specified in the package's "start" property of -its "scripts" object. If no "start" property is specified on the -"scripts" object, it will run node server.js.

-

As of npm@2.0.0, you can -use custom arguments when executing scripts. Refer to npm run-script for more details.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-stop/index.html b/deps/npm/docs/public/cli-commands/npm-stop/index.html deleted file mode 100644 index 364899f04eace5..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-stop/index.html +++ /dev/null @@ -1,99 +0,0 @@ -

npm stop

-

Stop a package

-

Synopsis

-
npm stop [-- <args>]
-

Description

-

This runs a package's "stop" script, if one was provided.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-team/index.html b/deps/npm/docs/public/cli-commands/npm-team/index.html deleted file mode 100644 index 0ac85e3cc367df..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-team/index.html +++ /dev/null @@ -1,130 +0,0 @@ -

npm team

-

Manage organization teams and team memberships

-

Synopsis

-
npm team create <scope:team>
-npm team destroy <scope:team>
-
-npm team add <scope:team> <user>
-npm team rm <scope:team> <user>
-
-npm team ls <scope>|<scope:team>
-
-npm team edit <scope:team>
-

Description

-

Used to manage teams in organizations, and change team memberships. Does not -handle permissions for packages.

-

Teams must always be fully qualified with the organization/scope they belong to -when operating on them, separated by a colon (:). That is, if you have a wombats team in a wisdom organization, you must always refer to that team as wisdom:wombats in these commands.

-

If you have two-factor authentication enabled in auth-and-writes mode, then you can provide a code from your authenticator with [--otp <otpcode>]. If you don't include this then you will be prompted.

-
    -
  • create / destroy: -Create a new team, or destroy an existing one. Note: You cannot remove the developers team, learn more.
  • -
  • add / rm: -Add a user to an existing team, or remove a user from a team they belong to.
  • -
  • ls: -If performed on an organization name, will return a list of existing teams -under that organization. If performed on a team, it will instead return a list -of all users belonging to that particular team.
  • -
  • edit: -Edit a current team.
  • -
-

Details

-

npm team always operates directly on the current registry, configurable from -the command line using --registry=<registry url>.

-

In order to create teams and manage team membership, you must be a team admin -under the given organization. Listing teams and team memberships may be done by -any member of the organizations.

-

Organization creation and management of team admins and organization members -is done through the website, not the npm CLI.

-

To use teams to manage permissions on packages belonging to your organization, -use the npm access command to grant or revoke the appropriate permissions.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-test/index.html b/deps/npm/docs/public/cli-commands/npm-test/index.html deleted file mode 100644 index 357a2bc29a28a3..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-test/index.html +++ /dev/null @@ -1,101 +0,0 @@ -

npm test

-

Test a package

-

Synopsis

-
npm test [-- <args>]
-
-aliases: t, tst
-

Description

-

This runs a package's "test" script, if one was provided.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-token/index.html b/deps/npm/docs/public/cli-commands/npm-token/index.html deleted file mode 100644 index 9fe68f663dff2c..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-token/index.html +++ /dev/null @@ -1,138 +0,0 @@ -

npm token

-

Manage your authentication tokens

-

Synopsis

-
  npm token list [--json|--parseable]
-  npm token create [--read-only] [--cidr=1.1.1.1/24,2.2.2.2/16]
-  npm token revoke <id|token>
-

Description

-

This lets you list, create and revoke authentication tokens.

-
    -
  • npm token list: -Shows a table of all active authentication tokens. You can request this as -JSON with --json or tab-separated values with --parseable.
  • -
-
+--------+---------+------------+----------+----------------+
-| id     | token   | created    | read-only | CIDR whitelist |
-+--------+---------+------------+----------+----------------+
-| 7f3134 | 1fa9ba… | 2017-10-02 | yes      |                |
-+--------+---------+------------+----------+----------------+
-| c03241 | af7aef… | 2017-10-02 | no       | 192.168.0.1/24 |
-+--------+---------+------------+----------+----------------+
-| e0cf92 | 3a436a… | 2017-10-02 | no       |                |
-+--------+---------+------------+----------+----------------+
-| 63eb9d | 74ef35… | 2017-09-28 | no       |                |
-+--------+---------+------------+----------+----------------+
-| 2daaa8 | cbad5f… | 2017-09-26 | no       |                |
-+--------+---------+------------+----------+----------------+
-| 68c2fe | 127e51… | 2017-09-23 | no       |                |
-+--------+---------+------------+----------+----------------+
-| 6334e1 | 1dadd1… | 2017-09-23 | no       |                |
-+--------+---------+------------+----------+----------------+
-
    -
  • npm token create [--read-only] [--cidr=<cidr-ranges>]: -Create a new authentication token. It can be --read-only or accept a list of -CIDR ranges to -limit use of this token to. This will prompt you for your password, and, if you have -two-factor authentication enabled, an otp.
  • -
-
+----------------+--------------------------------------+
-| token          | a73c9572-f1b9-8983-983d-ba3ac3cc913d |
-+----------------+--------------------------------------+
-| cidr_whitelist |                                      |
-+----------------+--------------------------------------+
-| readonly       | false                                |
-+----------------+--------------------------------------+
-| created        | 2017-10-02T07:52:24.838Z             |
-+----------------+--------------------------------------+
-
    -
  • npm token revoke <token|id>: -This removes an authentication token, making it immediately unusable. This can accept -both complete tokens (as you get back from npm token create and will -find in your .npmrc) and ids as seen in the npm token list output. -This will NOT accept the truncated token found in npm token list output.
  • -

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-uninstall/index.html b/deps/npm/docs/public/cli-commands/npm-uninstall/index.html deleted file mode 100644 index bae132ad5706bd..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-uninstall/index.html +++ /dev/null @@ -1,123 +0,0 @@ -

npm uninstall

-

Remove a package

-

Synopsis

-
npm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|-D|--save-dev|-O|--save-optional|--no-save]
-
-aliases: remove, rm, r, un, unlink
-

Description

-

This uninstalls a package, completely removing everything npm installed -on its behalf.

-

Example:

-
npm uninstall sax
-

In global mode (ie, with -g or --global appended to the command), -it uninstalls the current package context as a global package.

-

npm uninstall takes 3 exclusive, optional flags which save or update -the package version in your main package.json:

-
    -
  • -S, --save: Package will be removed from your dependencies.
  • -
  • -D, --save-dev: Package will be removed from your devDependencies.
  • -
  • -O, --save-optional: Package will be removed from your optionalDependencies.
  • -
  • --no-save: Package will not be removed from your package.json file.
  • -
-

Further, if you have an npm-shrinkwrap.json then it will be updated as -well.

-

Scope is optional and follows the usual rules for scope.

-

Examples:

-
npm uninstall sax --save
-npm uninstall @myorg/privatepackage --save
-npm uninstall node-tap --save-dev
-npm uninstall dtrace-provider --save-optional
-npm uninstall lodash --no-save
-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-unpublish/index.html b/deps/npm/docs/public/cli-commands/npm-unpublish/index.html deleted file mode 100644 index bd89b9c762e2e5..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-unpublish/index.html +++ /dev/null @@ -1,111 +0,0 @@ -

npm unpublish

-

Remove a package from the registry

-

Synopsis

-

Unpublishing a single version of a package

-
npm unpublish [<@scope>/]<pkg>@<version>
-

Unpublishing an entire package

-
npm unpublish [<@scope>/]<pkg> --force
-

Warning

-

Consider using the deprecate command instead, if your intent is to encourage users to upgrade, or if you no longer want to maintain a package.

-

Description

-

This removes a package version from the registry, deleting its -entry and removing the tarball.

-

If no version is specified, or if all versions are removed then -the root package entry is removed from the registry entirely.

-

Even if a package version is unpublished, that specific name and -version combination can never be reused. In order to publish the -package again, a new version number must be used. If you unpublish the entire package, you may not publish any new versions of that package until 24 hours have passed.

-

To learn more about how unpublish is treated on the npm registry, see our unpublish policies.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-update/index.html b/deps/npm/docs/public/cli-commands/npm-update/index.html deleted file mode 100644 index 2a16ed893fc294..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-update/index.html +++ /dev/null @@ -1,172 +0,0 @@ -

npm update

-

Update a package

-

Synopsis

-
npm update [-g] [<pkg>...]
-
-aliases: up, upgrade
-

Description

-

This command will update all the packages listed to the latest version -(specified by the tag config), respecting semver.

-

It will also install missing packages. As with all commands that install -packages, the --dev flag will cause devDependencies to be processed -as well.

-

If the -g flag is specified, this command will update globally installed -packages.

-

If no package name is specified, all packages in the specified location (global -or local) will be updated.

-

As of npm@2.6.1, the npm update will only inspect top-level packages. -Prior versions of npm would also recursively inspect all dependencies. -To get the old behavior, use npm --depth 9999 update.

-

As of npm@5.0.0, the npm update will change package.json to save the -new version as the minimum required dependency. To get the old behavior, -use npm update --no-save.

-

Example

-

IMPORTANT VERSION NOTE: these examples assume npm@2.6.1 or later. For -older versions of npm, you must specify --depth 0 to get the behavior -described below.

-

For the examples below, assume that the current package is app and it depends -on dependencies, dep1 (dep2, .. etc.). The published versions of dep1 are:

-
{
-  "dist-tags": { "latest": "1.2.2" },
-  "versions": [
-    "1.2.2",
-    "1.2.1",
-    "1.2.0",
-    "1.1.2",
-    "1.1.1",
-    "1.0.0",
-    "0.4.1",
-    "0.4.0",
-    "0.2.0"
-  ]
-}
-

Caret Dependencies

-

If app's package.json contains:

-
"dependencies": {
-  "dep1": "^1.1.1"
-}
-

Then npm update will install dep1@1.2.2, because 1.2.2 is latest and -1.2.2 satisfies ^1.1.1.

-

Tilde Dependencies

-

However, if app's package.json contains:

-
"dependencies": {
-  "dep1": "~1.1.1"
-}
-

In this case, running npm update will install dep1@1.1.2. Even though the latest -tag points to 1.2.2, this version does not satisfy ~1.1.1, which is equivalent -to >=1.1.1 <1.2.0. So the highest-sorting version that satisfies ~1.1.1 is used, -which is 1.1.2.

-

Caret Dependencies below 1.0.0

-

Suppose app has a caret dependency on a version below 1.0.0, for example:

-
"dependencies": {
-  "dep1": "^0.2.0"
-}
-

npm update will install dep1@0.2.0, because there are no other -versions which satisfy ^0.2.0.

-

If the dependence were on ^0.4.0:

-
"dependencies": {
-  "dep1": "^0.4.0"
-}
-

Then npm update will install dep1@0.4.1, because that is the highest-sorting -version that satisfies ^0.4.0 (>= 0.4.0 <0.5.0)

-

Updating Globally-Installed Packages

-

npm update -g will apply the update action to each globally installed -package that is outdated -- that is, has a version that is different from -wanted.

-

Note: Globally installed packages are treated as if they are installed with a caret semver range specified. So if you require to update to latest you may need to run npm install -g [<pkg>...]

-

NOTE: If a package has been upgraded to a version newer than latest, it will -be downgraded.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-version/index.html b/deps/npm/docs/public/cli-commands/npm-version/index.html deleted file mode 100644 index c0e12677dd276f..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-version/index.html +++ /dev/null @@ -1,185 +0,0 @@ -

npm version

-

Bump a package version

-

Synopsis

-
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
-
-'npm [-v | --version]' to print npm version
-'npm view <pkg> version' to view a package's published version
-'npm ls' to inspect current package/dependency versions
-

Description

-

Run this in a package directory to bump the version and write the new -data back to package.json, package-lock.json, and, if present, npm-shrinkwrap.json.

-

The newversion argument should be a valid semver string, a -valid second argument to semver.inc (one of patch, minor, major, -prepatch, preminor, premajor, prerelease), or from-git. In the second case, -the existing version will be incremented by 1 in the specified field. -from-git will try to read the latest git tag, and use that as the new npm version.

-

If run in a git repo, it will also create a version commit and tag. -This behavior is controlled by git-tag-version (see below), and can -be disabled on the command line by running npm --no-git-tag-version version. -It will fail if the working directory is not clean, unless the -f or ---force flag is set.

-

If supplied with -m or --message config option, npm will -use it as a commit message when creating a version commit. If the -message config contains %s then that will be replaced with the -resulting version number. For example:

-
npm version patch -m "Upgrade to %s for reasons"
-

If the sign-git-tag config is set, then the tag will be signed using -the -s flag to git. Note that you must have a default GPG key set up -in your git config for this to work properly. For example:

-
$ npm config set sign-git-tag true
-$ npm version patch
-
-You need a passphrase to unlock the secret key for
-user: "isaacs (http://blog.izs.me/) <i@izs.me>"
-2048-bit RSA key, ID 6C481CF6, created 2010-08-31
-
-Enter passphrase:
-

If preversion, version, or postversion are in the scripts property of -the package.json, they will be executed as part of running npm version.

-

The exact order of execution is as follows:

-
    -
  1. Check to make sure the git working directory is clean before we get started. -Your scripts may add files to the commit in future steps. -This step is skipped if the --force flag is set.
  2. -
  3. Run the preversion script. These scripts have access to the old version in package.json. -A typical use would be running your full test suite before deploying. -Any files you want added to the commit should be explicitly added using git add.
  4. -
  5. Bump version in package.json as requested (patch, minor, major, etc).
  6. -
  7. Run the version script. These scripts have access to the new version in package.json -(so they can incorporate it into file headers in generated files for example). -Again, scripts should explicitly add generated files to the commit using git add.
  8. -
  9. Commit and tag.
  10. -
  11. Run the postversion script. Use it to clean up the file system or automatically push -the commit and/or tag.
  12. -
-

Take the following example:

-
    "scripts": {
-      "preversion": "npm test",
-      "version": "npm run build && git add -A dist",
-      "postversion": "git push && git push --tags && rm -rf build/temp"
-    }
-

This runs all your tests, and proceeds only if they pass. Then runs your build script, and -adds everything in the dist directory to the commit. After the commit, it pushes the new commit -and tag up to the server, and deletes the build/temp directory.

-

Configuration

-

allow-same-version

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Prevents throwing an error when npm version is used to set the new version -to the same value as the current version.

-

git-tag-version

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Commit and tag the version change.

-

commit-hooks

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Run git commit hooks when committing the version change.

-

sign-git-tag

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Pass the -s flag to git to sign the tag.

-

Note that you must have a default GPG key set up in your git config for this to work properly.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-view/index.html b/deps/npm/docs/public/cli-commands/npm-view/index.html deleted file mode 100644 index 2caa4c9c4b80f1..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-view/index.html +++ /dev/null @@ -1,150 +0,0 @@ -

npm view

-

View registry info

-

Synopsis

-
npm view [<@scope>/]<name>[@<version>] [<field>[.<subfield>]...]
-
-aliases: info, show, v
-

Description

-

This command shows data about a package and prints it to the stream -referenced by the outfd config, which defaults to stdout.

-

To show the package registry entry for the connect package, you can do -this:

-
npm view connect
-

The default version is "latest" if unspecified.

-

Field names can be specified after the package descriptor. -For example, to show the dependencies of the ronn package at version -0.3.5, you could do the following:

-
npm view ronn@0.3.5 dependencies
-

You can view child fields by separating them with a period. -To view the git repository URL for the latest version of npm, you could -do this:

-
npm view npm repository.url
-

This makes it easy to view information about a dependency with a bit of -shell scripting. For example, to view all the data about the version of -opts that ronn depends on, you can do this:

-
npm view opts@$(npm view ronn dependencies.opts)
-

For fields that are arrays, requesting a non-numeric field will return -all of the values from the objects in the list. For example, to get all -the contributor names for the "express" project, you can do this:

-
npm view express contributors.email
-

You may also use numeric indices in square braces to specifically select -an item in an array field. To just get the email address of the first -contributor in the list, you can do this:

-
npm view express contributors[0].email
-

Multiple fields may be specified, and will be printed one after another. -For example, to get all the contributor names and email addresses, you -can do this:

-
npm view express contributors.name contributors.email
-

"Person" fields are shown as a string if they would be shown as an -object. So, for example, this will show the list of npm contributors in -the shortened string format. (See package.json for more on this.)

-
npm view npm contributors
-

If a version range is provided, then data will be printed for every -matching version of the package. This will show which version of jsdom -was required by each matching version of yui3:

-
npm view yui3@'>0.5.4' dependencies.jsdom
-

To show the connect package version history, you can do -this:

-
npm view connect versions
-

Output

-

If only a single string field for a single version is output, then it -will not be colorized or quoted, so as to enable piping the output to -another command. If the field is an object, it will be output as a JavaScript object literal.

-

If the --json flag is given, the outputted fields will be JSON.

-

If the version range matches multiple versions, than each printed value -will be prefixed with the version it applies to.

-

If multiple fields are requested, than each of them are prefixed with -the field name.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-whoami/index.html b/deps/npm/docs/public/cli-commands/npm-whoami/index.html deleted file mode 100644 index 4027baf2365adf..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm-whoami/index.html +++ /dev/null @@ -1,97 +0,0 @@ -

npm whoami

-

Display npm username

-

Synopsis

-
npm whoami [--registry <registry>]
-

Description

-

Print the username config to standard output.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm/index.html b/deps/npm/docs/public/cli-commands/npm/index.html deleted file mode 100644 index 3ff90ccfd28580..00000000000000 --- a/deps/npm/docs/public/cli-commands/npm/index.html +++ /dev/null @@ -1,216 +0,0 @@ -

npm

-

javascript package manager

-

Synopsis

-
npm <command> [args]
-

Version

-

7.0.2

-

Description

-

npm is the package manager for the Node JavaScript platform. It puts -modules in place so that node can find them, and manages dependency -conflicts intelligently.

-

It is extremely configurable to support a wide variety of use cases. -Most commonly, it is used to publish, discover, install, and develop node -programs.

-

Run npm help to get a list of available commands.

-

Important

-

npm is configured to use npm, Inc.'s public registry at -https://registry.npmjs.org by default. Use of the npm public registry is -subject to terms of use available at https://www.npmjs.com/policies/terms.

-

You can configure npm to use any compatible registry you like, and even run -your own registry. Use of someone else's registry may be governed by their -terms of use.

-

Introduction

-

You probably got npm because you want to install stuff.

-

Use npm install blerg to install the latest version of "blerg". Check out -npm install for more info. It can do a lot of stuff.

-

Use the npm search command to show everything that's available. -Use npm ls to show everything you've installed.

-

Dependencies

-

If a package references to another package with a git URL, npm depends -on a preinstalled git.

-

If one of the packages npm tries to install is a native node module and -requires compiling of C++ Code, npm will use -node-gyp for that task. -For a Unix system, node-gyp -needs Python, make and a buildchain like GCC. On Windows, -Python and Microsoft Visual Studio C++ are needed. Python 3 is -not supported by node-gyp. -For more information visit -the node-gyp repository and -the node-gyp Wiki.

-

Directories

-

See folders to learn about where npm puts stuff.

-

In particular, npm has two modes of operation:

-
    -
  • global mode: -npm installs packages into the install prefix at -prefix/lib/node_modules and bins are installed in prefix/bin.
  • -
  • local mode: -npm installs packages into the current project directory, which -defaults to the current working directory. Packages are installed to -./node_modules, and bins are installed to ./node_modules/.bin.
  • -
-

Local mode is the default. Use -g or --global on any command to -operate in global mode instead.

-

Developer Usage

-

If you're using npm to develop and publish your code, check out the -following help topics:

-
    -
  • json: -Make a package.json file. See package.json.
  • -
  • link: -For linking your current working code into Node's path, so that you -don't have to reinstall every time you make a change. Use -npm link to do this.
  • -
  • install: -It's a good idea to install things if you don't need the symbolic link. -Especially, installing other peoples code from the registry is done via -npm install
  • -
  • adduser: -Create an account or log in. Credentials are stored in the -user config file.
  • -
  • publish: -Use the npm publish command to upload your code to the registry.
  • -
-

Configuration

-

npm is extremely configurable. It reads its configuration options from -5 places.

-
    -
  • Command line switches: -Set a config with --key val. All keys take a value, even if they -are booleans (the config parser doesn't know what the options are at -the time of parsing). If no value is provided, then the option is set -to boolean true.
  • -
  • Environment Variables: -Set any config by prefixing the name in an environment variable with -npm_config_. For example, export npm_config_key=val.
  • -
  • User Configs: -The file at $HOME/.npmrc is an ini-formatted list of configs. If -present, it is parsed. If the userconfig option is set in the cli -or env, then that will be used instead.
  • -
  • Global Configs: -The file found at ../etc/npmrc (from the node executable, by default -this resolves to /usr/local/etc/npmrc) will be parsed if it is found. -If the globalconfig option is set in the cli, env, or user config, -then that file is parsed instead.
  • -
  • Defaults: -npm's default configuration options are defined in -lib/utils/config-defs.js. These must not be changed.
  • -
-

See config for much much more information.

-

Contributions

-

Patches welcome!

-

If you would like to contribute, but don't know what to work on, read -the contributing guidelines and check the issues list.

- -

Bugs

-

When you find issues, please report them:

- -

Be sure to follow the template and bug reporting guidelines. You can also ask -for help in the support forum if you're -unsure if it's actually a bug or are having trouble coming up with a detailed -reproduction to report.

-

Author

-

Isaac Z. Schlueter :: -isaacs :: -@izs :: -i@izs.me

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npx/index.html b/deps/npm/docs/public/cli-commands/npx/index.html deleted file mode 100644 index 3a46ef463923b6..00000000000000 --- a/deps/npm/docs/public/cli-commands/npx/index.html +++ /dev/null @@ -1,209 +0,0 @@ -

npx

-

Run a command from a local or remote npm package

-

Synopsis

-
npm exec -- <pkg>[@<version>] [args...]
-npm exec -p <pkg>[@<version>] -- <cmd> [args...]
-npm exec -c '<cmd> [args...]'
-npm exec -p foo -c '<cmd> [args...]'
-
-npx <pkg>[@<specifier>] [args...]
-npx -p <pkg>[@<specifier>] <cmd> [args...]
-npx -c '<cmd> [args...]'
-npx -p <pkg>[@<specifier>] -c '<cmd> [args...]'
-
-alias: npm x, npx
-
--p <pkg> --package=<pkg> (may be specified multiple times)
--c <cmd> --call=<cmd> (may not be mixed with positional arguments)
-

Description

-

This command allows you to run an arbitrary command from an npm package -(either one installed locally, or fetched remotely), in a similar context -as running it via npm run.

-

Whatever packages are specified by the --package or -p option will be -provided in the PATH of the executed command, along with any locally -installed package executables. The --package or -p option may be -specified multiple times, to execute the supplied command in an environment -where all specified packages are available.

-

If any requested packages are not present in the local project -dependencies, then they are installed to a folder in the npm cache, which -is added to the PATH environment variable in the executed process. A -prompt is printed (which can be suppressed by providing either --yes or ---no).

-

Package names provided without a specifier will be matched with whatever -version exists in the local project. Package names with a specifier will -only be considered a match if they have the exact same name and version as -the local dependency.

-

If no -c or --call option is provided, then the positional arguments -are used to generate the command string. If no -p or --package options -are provided, then npm will attempt to determine the executable name from -the package specifier provided as the first positional argument according -to the following heuristic:

-
    -
  • If the package has a single entry in its bin field in package.json, -then that command will be used.
  • -
  • If the package has multiple bin entries, and one of them matches the -unscoped portion of the name field, then that command will be used.
  • -
  • If this does not result in exactly one option (either because there are -no bin entries, or none of them match the name of the package), then -npm exec exits with an error.
  • -
-

To run a binary other than the named binary, specify one or more ---package options, which will prevent npm from inferring the package from -the first command argument.

-

npx vs npm exec

-

When run via the npx binary, all flags and options must be set prior to -any positional arguments. When run via npm exec, a double-hyphen -- -flag can be used to suppress npm's parsing of switches and options that -should be sent to the executed command.

-

For example:

-
$ npx foo@latest bar --package=@npmcli/foo
-

In this case, npm will resolve the foo package name, and run the -following command:

-
$ foo bar --package=@npmcli/foo
-

Since the --package option comes after the positional arguments, it is -treated as an argument to the executed command.

-

In contrast, due to npm's argument parsing logic, running this command is -different:

-
$ npm exec foo@latest bar --package=@npmcli/foo
-

In this case, npm will parse the --package option first, resolving the -@npmcli/foo package. Then, it will execute the following command in that -context:

-
$ foo@latest bar
-

The double-hyphen character is recommended to explicitly tell npm to stop -parsing command line options and switches. The following command would -thus be equivalent to the npx command above:

-
$ npm exec -- foo@latest bar --package=@npmcli/foo
-

Examples

-

Run the version of tap in the local dependencies, with the provided -arguments:

-
$ npm exec -- tap --bail test/foo.js
-$ npx tap --bail test/foo.js
-

Run a command other than the command whose name matches the package name -by specifying a --package option:

-
$ npm exec --package=foo -- bar --bar-argument
-# ~ or ~
-$ npx --package=foo bar --bar-argument
-

Run an arbitrary shell script, in the context of the current project:

-
$ npm x -c 'eslint && say "hooray, lint passed"'
-$ npx -c 'eslint && say "hooray, lint passed"'
-

Compatibility with Older npx Versions

-

The npx binary was rewritten in npm v7.0.0, and the standalone npx -package deprecated at that time. npx uses the npm exec -command instead of a separate argument parser and install process, with -some affordances to maintain backwards compatibility with the arguments it -accepted in previous versions.

-

This resulted in some shifts in its functionality:

-
    -
  • Any npm config value may be provided.
  • -
  • To prevent security and user-experience problems from mistyping package -names, npx prompts before installing anything. Suppress this -prompt with the -y or --yes option.
  • -
  • The --no-install option is deprecated, and will be converted to --no.
  • -
  • Shell fallback functionality is removed, as it is not advisable.
  • -
  • The -p argument is a shorthand for --parseable in npm, but shorthand -for --package in npx. This is maintained, but only for the npx -executable.
  • -
  • The --ignore-existing option is removed. Locally installed bins are -always present in the executed process PATH.
  • -
  • The --npm option is removed. npx will always use the npm it ships -with.
  • -
  • The --node-arg and -n options are removed.
  • -
  • The --always-spawn option is redundant, and thus removed.
  • -
  • The --shell option is replaced with --script-shell, but maintained -in the npx executable for backwards compatibility.
  • -
-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/folders/index.html b/deps/npm/docs/public/configuring-npm/folders/index.html deleted file mode 100644 index ea6a649761753c..00000000000000 --- a/deps/npm/docs/public/configuring-npm/folders/index.html +++ /dev/null @@ -1,245 +0,0 @@ -

folders

-

Folder Structures Used by npm

-

Description

-

npm puts various things on your computer. That's its job.

-

This document will tell you what it puts where.

-

tl;dr

-
    -
  • Local install (default): puts stuff in ./node_modules of the current -package root.
  • -
  • Global install (with -g): puts stuff in /usr/local or wherever node -is installed.
  • -
  • Install it locally if you're going to require() it.
  • -
  • Install it globally if you're going to run it on the command line.
  • -
  • If you need both, then install it in both places, or use npm link.
  • -
-

prefix Configuration

-

The prefix config defaults to the location where node is installed. -On most systems, this is /usr/local. On Windows, it's %AppData%\npm. -On Unix systems, it's one level up, since node is typically installed at -{prefix}/bin/node rather than {prefix}/node.exe.

-

When the global flag is set, npm installs things into this prefix. -When it is not set, it uses the root of the current package, or the -current working directory if not in a package already.

-

Node Modules

-

Packages are dropped into the node_modules folder under the prefix. -When installing locally, this means that you can -require("packagename") to load its main module, or -require("packagename/lib/path/to/sub/module") to load other modules.

-

Global installs on Unix systems go to {prefix}/lib/node_modules. -Global installs on Windows go to {prefix}/node_modules (that is, no -lib folder.)

-

Scoped packages are installed the same way, except they are grouped together -in a sub-folder of the relevant node_modules folder with the name of that -scope prefix by the @ symbol, e.g. npm install @myorg/package would place -the package in {prefix}/node_modules/@myorg/package. See scope for more details.

-

If you wish to require() a package, then install it locally.

-

Executables

-

When in global mode, executables are linked into {prefix}/bin on Unix, -or directly into {prefix} on Windows.

-

When in local mode, executables are linked into -./node_modules/.bin so that they can be made available to scripts run -through npm. (For example, so that a test runner will be in the path -when you run npm test.)

-

Man Pages

-

When in global mode, man pages are linked into {prefix}/share/man.

-

When in local mode, man pages are not installed.

-

Man pages are not installed on Windows systems.

-

Cache

-

See npm cache. Cache files are stored in ~/.npm on Posix, or -%AppData%/npm-cache on Windows.

-

This is controlled by the cache configuration param.

-

Temp Files

-

Temporary files are stored by default in the folder specified by the -tmp config, which defaults to the TMPDIR, TMP, or TEMP environment -variables, or /tmp on Unix and c:\windows\temp on Windows.

-

Temp files are given a unique folder under this root for each run of the -program, and are deleted upon successful exit.

-

More Information

-

When installing locally, npm first tries to find an appropriate -prefix folder. This is so that npm install foo@1.2.3 will install -to the sensible root of your package, even if you happen to have cded -into some other folder.

-

Starting at the $PWD, npm will walk up the folder tree checking for a -folder that contains either a package.json file, or a node_modules -folder. If such a thing is found, then that is treated as the effective -"current directory" for the purpose of running npm commands. (This -behavior is inspired by and similar to git's .git-folder seeking -logic when running git commands in a working dir.)

-

If no package root is found, then the current folder is used.

-

When you run npm install foo@1.2.3, then the package is loaded into -the cache, and then unpacked into ./node_modules/foo. Then, any of -foo's dependencies are similarly unpacked into -./node_modules/foo/node_modules/....

-

Any bin files are symlinked to ./node_modules/.bin/, so that they may -be found by npm scripts when necessary.

-

Global Installation

-

If the global configuration is set to true, then npm will -install packages "globally".

-

For global installation, packages are installed roughly the same way, -but using the folders described above.

-

Cycles, Conflicts, and Folder Parsimony

-

Cycles are handled using the property of node's module system that it -walks up the directories looking for node_modules folders. So, at every -stage, if a package is already installed in an ancestor node_modules -folder, then it is not installed at the current location.

-

Consider the case above, where foo -> bar -> baz. Imagine if, in -addition to that, baz depended on bar, so you'd have: -foo -> bar -> baz -> bar -> baz .... However, since the folder -structure is: foo/node_modules/bar/node_modules/baz, there's no need to -put another copy of bar into .../baz/node_modules, since when it calls -require("bar"), it will get the copy that is installed in -foo/node_modules/bar.

-

This shortcut is only used if the exact same -version would be installed in multiple nested node_modules folders. It -is still possible to have a/node_modules/b/node_modules/a if the two -"a" packages are different versions. However, without repeating the -exact same package multiple times, an infinite regress will always be -prevented.

-

Another optimization can be made by installing dependencies at the -highest level possible, below the localized "target" folder.

-

Example

-

Consider this dependency graph:

-
foo
-+-- blerg@1.2.5
-+-- bar@1.2.3
-|   +-- blerg@1.x (latest=1.3.7)
-|   +-- baz@2.x
-|   |   `-- quux@3.x
-|   |       `-- bar@1.2.3 (cycle)
-|   `-- asdf@*
-`-- baz@1.2.3
-    `-- quux@3.x
-        `-- bar
-

In this case, we might expect a folder structure like this:

-
foo
-+-- node_modules
-    +-- blerg (1.2.5) <---[A]
-    +-- bar (1.2.3) <---[B]
-    |   `-- node_modules
-    |       +-- baz (2.0.2) <---[C]
-    |       |   `-- node_modules
-    |       |       `-- quux (3.2.0)
-    |       `-- asdf (2.3.4)
-    `-- baz (1.2.3) <---[D]
-        `-- node_modules
-            `-- quux (3.2.0) <---[E]
-

Since foo depends directly on bar@1.2.3 and baz@1.2.3, those are -installed in foo's node_modules folder.

-

Even though the latest copy of blerg is 1.3.7, foo has a specific -dependency on version 1.2.5. So, that gets installed at [A]. Since the -parent installation of blerg satisfies bar's dependency on blerg@1.x, -it does not install another copy under [B].

-

Bar [B] also has dependencies on baz and asdf, so those are installed in -bar's node_modules folder. Because it depends on baz@2.x, it cannot -re-use the baz@1.2.3 installed in the parent node_modules folder [D], -and must install its own copy [C].

-

Underneath bar, the baz -> quux -> bar dependency creates a cycle. -However, because bar is already in quux's ancestry [B], it does not -unpack another copy of bar into that folder.

-

Underneath foo -> baz [D], quux's [E] folder tree is empty, because its -dependency on bar is satisfied by the parent folder copy installed at [B].

-

For a graphical breakdown of what is installed where, use npm ls.

-

Publishing

-

Upon publishing, npm will look in the node_modules folder. If any of -the items there are not in the bundledDependencies array, then they will -not be included in the package tarball.

-

This allows a package maintainer to install all of their dependencies -(and dev dependencies) locally, but only re-publish those items that -cannot be found elsewhere. See package.json for more information.

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/install/index.html b/deps/npm/docs/public/configuring-npm/install/index.html deleted file mode 100644 index 8082e3384f2382..00000000000000 --- a/deps/npm/docs/public/configuring-npm/install/index.html +++ /dev/null @@ -1,128 +0,0 @@ -

install

-

Download and Install npm

-

Description

-

To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. We strongly recommend using a Node version manager to install Node.js and npm. We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.

-

Overview

- -

Checking your version of npm and Node.js

-

To see if you already have Node.js and npm installed and check the installed version, run the following commands:

-
node -v
-npm -v
-

Using a Node version manager to install Node.js and npm

-

Node version managers allow you to install and switch between multiple versions of Node.js and npm on your system so you can test your applications on multiple versions of npm to ensure they work for users on different versions.

-

OSX or Linux Node version managers

- -

Windows Node version managers

- -

Using a Node installer to install Node.js and npm

-

If you are unable to use a Node version manager, you can use a Node installer to install both Node.js and npm on your system.

- -

OS X or Windows Node installers

-

If you're using OS X or Windows, use one of the installers from the Node.js download page. Be sure to install the version labeled LTS. Other versions have not yet been tested with npm.

-

Linux or other operating systems Node installers

-

If you're using Linux or another operating system, use one of the following installers:

- -

Or see this page to install npm for Linux in the way many Linux developers prefer.

-

Less-common operating systems

-

For more information on installing Node.js on a variety of operating systems, see this page.

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/npmrc/index.html b/deps/npm/docs/public/configuring-npm/npmrc/index.html deleted file mode 100644 index 0064d63472956a..00000000000000 --- a/deps/npm/docs/public/configuring-npm/npmrc/index.html +++ /dev/null @@ -1,150 +0,0 @@ -

npmrc

-

The npm config files

-

Description

-

npm gets its config settings from the command line, environment -variables, and npmrc files.

-

The npm config command can be used to update and edit the contents -of the user and global npmrc files.

-

For a list of available configuration options, see config.

-

Files

-

The four relevant files are:

-
    -
  • per-project config file (/path/to/my/project/.npmrc)
  • -
  • per-user config file (~/.npmrc)
  • -
  • global config file ($PREFIX/etc/npmrc)
  • -
  • npm builtin config file (/path/to/npm/npmrc)
  • -
-

All npm config files are an ini-formatted list of key = value -parameters. Environment variables can be replaced using -${VARIABLE_NAME}. For example:

-
prefix = ${HOME}/.npm-packages
-

Each of these files is loaded, and config options are resolved in -priority order. For example, a setting in the userconfig file would -override the setting in the globalconfig file.

-

Array values are specified by adding "[]" after the key name. For -example:

-
key[] = "first value"
-key[] = "second value"
-

Comments

-

Lines in .npmrc files are interpreted as comments when they begin with a ; or # character. .npmrc files are parsed by npm/ini, which specifies this comment syntax.

-

For example:

-
# last modified: 01 Jan 2016
-; Set a new registry for a scoped package
-@myscope:registry=https://mycustomregistry.example.org
-

Per-project config file

-

When working locally in a project, a .npmrc file in the root of the -project (ie, a sibling of node_modules and package.json) will set -config values specific to this project.

-

Note that this only applies to the root of the project that you're -running npm in. It has no effect when your module is published. For -example, you can't publish a module that forces itself to install -globally, or in a different location.

-

Additionally, this file is not read in global mode, such as when running -npm install -g.

-

Per-user config file

-

$HOME/.npmrc (or the userconfig param, if set in the environment -or on the command line)

-

Global config file

-

$PREFIX/etc/npmrc (or the globalconfig param, if set above): -This file is an ini-file formatted list of key = value parameters. -Environment variables can be replaced as above.

-

Built-in config file

-

path/to/npm/itself/npmrc

-

This is an unchangeable "builtin" configuration file that npm keeps -consistent across updates. Set fields in here using the ./configure -script that comes with npm. This is primarily for distribution -maintainers to override default configs in a standard and consistent -manner.

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-json/index.html b/deps/npm/docs/public/configuring-npm/package-json/index.html deleted file mode 100644 index 6c7577a5e2d28f..00000000000000 --- a/deps/npm/docs/public/configuring-npm/package-json/index.html +++ /dev/null @@ -1,736 +0,0 @@ -

package.json

-

Specifics of npm's package.json handling

-

Description

-

This document is all you need to know about what's required in your package.json -file. It must be actual JSON, not just a JavaScript object literal.

-

A lot of the behavior described in this document is affected by the config -settings described in config.

-

name

-

If you plan to publish your package, the most important things in your -package.json are the name and version fields as they will be required. The name -and version together form an identifier that is assumed to be completely unique. -Changes to the package should come along with changes to the version. If you don't -plan to publish your package, the name and version fields are optional.

-

The name is what your thing is called.

-

Some rules:

-
    -
  • The name must be less than or equal to 214 characters. This includes the scope for -scoped packages.
  • -
  • The names of scoped packages can begin with a dot or an underscore. This is not permitted without a scope.
  • -
  • New packages must not have uppercase letters in the name.
  • -
  • The name ends up being part of a URL, an argument on the command line, and a -folder name. Therefore, the name can't contain any non-URL-safe characters.
  • -
-

Some tips:

-
    -
  • Don't use the same name as a core Node module.
  • -
  • Don't put "js" or "node" in the name. It's assumed that it's js, since you're -writing a package.json file, and you can specify the engine using the "engines" -field. (See below.)
  • -
  • The name will probably be passed as an argument to require(), so it should -be something short, but also reasonably descriptive.
  • -
  • You may want to check the npm registry to see if there's something by that name -already, before you get too attached to it. https://www.npmjs.com/
  • -
-

A name can be optionally prefixed by a scope, e.g. @myorg/mypackage. See -scope for more detail.

-

version

-

If you plan to publish your package, the most important things in your -package.json are the name and version fields as they will be required. The name -and version together form an identifier that is assumed to be completely unique. -Changes to the package should come along with changes to the version. If you don't -plan to publish your package, the name and version fields are optional.

-

Version must be parseable by -node-semver, which is bundled -with npm as a dependency. (npm install semver to use it yourself.)

-

More on version numbers and ranges at semver.

-

description

-

Put a description in it. It's a string. This helps people discover your -package, as it's listed in npm search.

-

keywords

-

Put keywords in it. It's an array of strings. This helps people -discover your package as it's listed in npm search.

-

homepage

-

The url to the project homepage.

-

Example:

-
"homepage": "https://github.com/owner/project#readme"
-

bugs

-

The url to your project's issue tracker and / or the email address to which -issues should be reported. These are helpful for people who encounter issues -with your package.

-

It should look like this:

-
{ "url" : "https://github.com/owner/project/issues"
-, "email" : "project@hostname.com"
-}
-

You can specify either one or both values. If you want to provide only a url, -you can specify the value for "bugs" as a simple string instead of an object.

-

If a url is provided, it will be used by the npm bugs command.

-

license

-

You should specify a license for your package so that people know how they are -permitted to use it, and any restrictions you're placing on it.

-

If you're using a common license such as BSD-2-Clause or MIT, add a -current SPDX license identifier for the license you're using, like this:

-
{ "license" : "BSD-3-Clause" }
-

You can check the full list of SPDX license IDs. -Ideally you should pick one that is -OSI approved.

-

If your package is licensed under multiple common licenses, use an SPDX license -expression syntax version 2.0 string, like this:

-
{ "license" : "(ISC OR GPL-3.0)" }
-

If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use a string value like this one:

-
{ "license" : "SEE LICENSE IN <filename>" }
-

Then include a file named <filename> at the top level of the package.

-

Some old packages used license objects or a "licenses" property containing an -array of license objects:

-
// Not valid metadata
-{ "license" :
-  { "type" : "ISC"
-  , "url" : "https://opensource.org/licenses/ISC"
-  }
-}
-
-// Not valid metadata
-{ "licenses" :
-  [
-    { "type": "MIT"
-    , "url": "https://www.opensource.org/licenses/mit-license.php"
-    }
-  , { "type": "Apache-2.0"
-    , "url": "https://opensource.org/licenses/apache2.0.php"
-    }
-  ]
-}
-

Those styles are now deprecated. Instead, use SPDX expressions, like this:

-
{ "license": "ISC" }
-
-{ "license": "(MIT OR Apache-2.0)" }
-

Finally, if you do not wish to grant others the right to use a private or -unpublished package under any terms:

-
{ "license": "UNLICENSED" }
-

Consider also setting "private": true to prevent accidental publication.

-

people fields: author, contributors

-

The "author" is one person. "contributors" is an array of people. A "person" -is an object with a "name" field and optionally "url" and "email", like this:

-
{ "name" : "Barney Rubble"
-, "email" : "b@rubble.com"
-, "url" : "http://barnyrubble.tumblr.com/"
-}
-

Or you can shorten that all into a single string, and npm will parse it for you:

-
"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)"
-

Both email and url are optional either way.

-

npm also sets a top-level "maintainers" field with your npm user info.

-

funding

-

You can specify an object containing an URL that provides up-to-date -information about ways to help fund development of your package, or -a string URL, or an array of these:

-
"funding": {
-  "type" : "individual",
-  "url" : "http://example.com/donate"
-}
-
-"funding": {
-  "type" : "patreon",
-  "url" : "https://www.patreon.com/my-account"
-}
-
-"funding": "http://example.com/donate"
-
-"funding": [
-  {
-    "type" : "individual",
-    "url" : "http://example.com/donate"
-  },
-  "http://example.com/donateAlso",
-  {
-    "type" : "patreon",
-    "url" : "https://www.patreon.com/my-account"
-  }
-]
-

Users can use the npm fund subcommand to list the funding URLs of all -dependencies of their project, direct and indirect. A shortcut to visit each -funding url is also available when providing the project name such as: -npm fund <projectname> (when there are multiple URLs, the first one will be -visited)

-

files

-

The optional files field is an array of file patterns that describes -the entries to be included when your package is installed as a -dependency. File patterns follow a similar syntax to .gitignore, but -reversed: including a file, directory, or glob pattern (*, **/*, and such) -will make it so that file is included in the tarball when it's packed. Omitting -the field will make it default to ["*"], which means it will include all files.

-

Some special files and directories are also included or excluded regardless of -whether they exist in the files array (see below).

-

You can also provide a .npmignore file in the root of your package or -in subdirectories, which will keep files from being included. At the -root of your package it will not override the "files" field, but in -subdirectories it will. The .npmignore file works just like a -.gitignore. If there is a .gitignore file, and .npmignore is -missing, .gitignore's contents will be used instead.

-

Files included with the "package.json#files" field cannot be excluded -through .npmignore or .gitignore.

-

Certain files are always included, regardless of settings:

-
    -
  • package.json
  • -
  • README
  • -
  • CHANGES / CHANGELOG / HISTORY
  • -
  • LICENSE / LICENCE
  • -
  • NOTICE
  • -
  • The file in the "main" field
  • -
-

README, CHANGES, LICENSE & NOTICE can have any case and extension.

-

Conversely, some files are always ignored:

-
    -
  • .git
  • -
  • CVS
  • -
  • .svn
  • -
  • .hg
  • -
  • .lock-wscript
  • -
  • .wafpickle-N
  • -
  • .*.swp
  • -
  • .DS_Store
  • -
  • ._*
  • -
  • npm-debug.log
  • -
  • .npmrc
  • -
  • node_modules
  • -
  • config.gypi
  • -
  • *.orig
  • -
  • package-lock.json (use shrinkwrap instead)
  • -
-

main

-

The main field is a module ID that is the primary entry point to your program. -That is, if your package is named foo, and a user installs it, and then does -require("foo"), then your main module's exports object will be returned.

-

This should be a module ID relative to the root of your package folder.

-

For most modules, it makes the most sense to have a main script and often not -much else.

-

browser

-

If your module is meant to be used client-side the browser field should be -used instead of the main field. This is helpful to hint users that it might -rely on primitives that aren't available in Node.js modules. (e.g. window)

-

bin

-

A lot of packages have one or more executable files that they'd like to -install into the PATH. npm makes this pretty easy (in fact, it uses this -feature to install the "npm" executable.)

-

To use this, supply a bin field in your package.json which is a map of -command name to local file name. On install, npm will symlink that file into -prefix/bin for global installs, or ./node_modules/.bin/ for local -installs.

-

For example, myapp could have this:

-
{ "bin" : { "myapp" : "./cli.js" } }
-

So, when you install myapp, it'll create a symlink from the cli.js script to -/usr/local/bin/myapp.

-

If you have a single executable, and its name should be the name -of the package, then you can just supply it as a string. For example:

-
{ "name": "my-program"
-, "version": "1.2.5"
-, "bin": "./path/to/program" }
-

would be the same as this:

-
{ "name": "my-program"
-, "version": "1.2.5"
-, "bin" : { "my-program" : "./path/to/program" } }
-

Please make sure that your file(s) referenced in bin starts with -#!/usr/bin/env node, otherwise the scripts are started without the node -executable!

-

man

-

Specify either a single file or an array of filenames to put in place for the -man program to find.

-

If only a single file is provided, then it's installed such that it is the -result from man <pkgname>, regardless of its actual filename. For example:

-
{ "name" : "foo"
-, "version" : "1.2.3"
-, "description" : "A packaged foo fooer for fooing foos"
-, "main" : "foo.js"
-, "man" : "./man/doc.1"
-}
-

would link the ./man/doc.1 file in such that it is the target for man foo

-

If the filename doesn't start with the package name, then it's prefixed. -So, this:

-
{ "name" : "foo"
-, "version" : "1.2.3"
-, "description" : "A packaged foo fooer for fooing foos"
-, "main" : "foo.js"
-, "man" : [ "./man/foo.1", "./man/bar.1" ]
-}
-

will create files to do man foo and man foo-bar.

-

Man files must end with a number, and optionally a .gz suffix if they are -compressed. The number dictates which man section the file is installed into.

-
{ "name" : "foo"
-, "version" : "1.2.3"
-, "description" : "A packaged foo fooer for fooing foos"
-, "main" : "foo.js"
-, "man" : [ "./man/foo.1", "./man/foo.2" ]
-}
-

will create entries for man foo and man 2 foo

-

directories

-

The CommonJS Packages spec details a -few ways that you can indicate the structure of your package using a directories -object. If you look at npm's package.json, -you'll see that it has directories for doc, lib, and man.

-

In the future, this information may be used in other creative ways.

-

directories.lib

-

Tell people where the bulk of your library is. Nothing special is done -with the lib folder in any way, but it's useful meta info.

-

directories.bin

-

If you specify a bin directory in directories.bin, all the files in -that folder will be added.

-

Because of the way the bin directive works, specifying both a -bin path and setting directories.bin is an error. If you want to -specify individual files, use bin, and for all the files in an -existing bin directory, use directories.bin.

-

directories.man

-

A folder that is full of man pages. Sugar to generate a "man" array by -walking the folder.

-

directories.doc

-

Put markdown files in here. Eventually, these will be displayed nicely, -maybe, someday.

-

directories.example

-

Put example scripts in here. Someday, it might be exposed in some clever way.

-

directories.test

-

Put your tests in here. It is currently not exposed, but it might be in the -future.

-

repository

-

Specify the place where your code lives. This is helpful for people who -want to contribute. If the git repo is on GitHub, then the npm docs -command will be able to find you.

-

Do it like this:

-
"repository": {
-  "type" : "git",
-  "url" : "https://github.com/npm/cli.git"
-}
-
-"repository": {
-  "type" : "svn",
-  "url" : "https://v8.googlecode.com/svn/trunk/"
-}
-

The URL should be a publicly available (perhaps read-only) url that can be handed -directly to a VCS program without any modification. It should not be a url to an -html project page that you put in your browser. It's for computers.

-

For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same -shortcut syntax you use for npm install:

-
"repository": "npm/npm"
-
-"repository": "github:user/repo"
-
-"repository": "gist:11081aaa281"
-
-"repository": "bitbucket:user/repo"
-
-"repository": "gitlab:user/repo"
-

If the package.json for your package is not in the root directory (for example -if it is part of a monorepo), you can specify the directory in which it lives:

-
"repository": {
-  "type" : "git",
-  "url" : "https://github.com/facebook/react.git",
-  "directory": "packages/react-dom"
-}
-

scripts

-

The "scripts" property is a dictionary containing script commands that are run -at various times in the lifecycle of your package. The key is the lifecycle -event, and the value is the command to run at that point.

-

See scripts to find out more about writing package scripts.

-

config

-

A "config" object can be used to set configuration parameters used in package -scripts that persist across upgrades. For instance, if a package had the -following:

-
{ "name" : "foo"
-, "config" : { "port" : "8080" } }
-

and then had a "start" command that then referenced the -npm_package_config_port environment variable, then the user could -override that by doing npm config set foo:port 8001.

-

See config and scripts for more on package -configs.

-

dependencies

-

Dependencies are specified in a simple object that maps a package name to a -version range. The version range is a string which has one or more -space-separated descriptors. Dependencies can also be identified with a -tarball or git URL.

-

Please do not put test harnesses or transpilers in your -dependencies object. See devDependencies, below.

-

See semver for more details about specifying version ranges.

-
    -
  • version Must match version exactly
  • -
  • >version Must be greater than version
  • -
  • >=version etc
  • -
  • <version
  • -
  • <=version
  • -
  • ~version "Approximately equivalent to version" See semver
  • -
  • ^version "Compatible with version" See semver
  • -
  • 1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0
  • -
  • http://... See 'URLs as Dependencies' below
  • -
  • * Matches any version
  • -
  • "" (just an empty string) Same as *
  • -
  • version1 - version2 Same as >=version1 <=version2.
  • -
  • range1 || range2 Passes if either range1 or range2 are satisfied.
  • -
  • git... See 'Git URLs as Dependencies' below
  • -
  • user/repo See 'GitHub URLs' below
  • -
  • tag A specific version tagged and published as tag See npm dist-tag
  • -
  • path/path/path See Local Paths below
  • -
-

For example, these are all valid:

-
{ "dependencies" :
-  { "foo" : "1.0.0 - 2.9999.9999"
-  , "bar" : ">=1.0.2 <2.1.2"
-  , "baz" : ">1.0.2 <=2.3.4"
-  , "boo" : "2.0.1"
-  , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0"
-  , "asd" : "http://asdf.com/asdf.tar.gz"
-  , "til" : "~1.2"
-  , "elf" : "~1.2.3"
-  , "two" : "2.x"
-  , "thr" : "3.3.x"
-  , "lat" : "latest"
-  , "dyl" : "file:../dyl"
-  }
-}
-

URLs as Dependencies

-

You may specify a tarball URL in place of a version range.

-

This tarball will be downloaded and installed locally to your package at -install time.

-

Git URLs as Dependencies

-

Git urls are of the form:

-
<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
-

<protocol> is one of git, git+ssh, git+http, git+https, or -git+file.

-

If #<commit-ish> is provided, it will be used to clone exactly that -commit. If the commit-ish has the format #semver:<semver>, <semver> can -be any valid semver range or exact version, and npm will look for any tags -or refs matching that range in the remote repository, much as it would for a -registry dependency. If neither #<commit-ish> or #semver:<semver> is -specified, then master is used.

-

Examples:

-
git+ssh://git@github.com:npm/cli.git#v1.0.27
-git+ssh://git@github.com:npm/cli#semver:^5.0
-git+https://isaacs@github.com/npm/cli.git
-git://github.com/npm/cli.git#v1.0.27
-

GitHub URLs

-

As of version 1.1.65, you can refer to GitHub urls as just "foo": -"user/foo-project". Just as with git URLs, a commit-ish suffix can be -included. For example:

-
{
-  "name": "foo",
-  "version": "0.0.0",
-  "dependencies": {
-    "express": "expressjs/express",
-    "mocha": "mochajs/mocha#4727d357ea",
-    "module": "user/repo#feature\/branch"
-  }
-}
-

Local Paths

-

As of version 2.0.0 you can provide a path to a local directory that contains a -package. Local paths can be saved using npm install -S or -npm install --save, using any of these forms:

-
../foo/bar
-~/foo/bar
-./foo/bar
-/foo/bar
-

in which case they will be normalized to a relative path and added to your -package.json. For example:

-
{
-  "name": "baz",
-  "dependencies": {
-    "bar": "file:../foo/bar"
-  }
-}
-

This feature is helpful for local offline development and creating -tests that require npm installing where you don't want to hit an -external server, but should not be used when publishing packages -to the public registry.

-

devDependencies

-

If someone is planning on downloading and using your module in their -program, then they probably don't want or need to download and build -the external test or documentation framework that you use.

-

In this case, it's best to map these additional items in a devDependencies -object.

-

These things will be installed when doing npm link or npm install -from the root of a package, and can be managed like any other npm -configuration param. See config for more on the topic.

-

For build steps that are not platform-specific, such as compiling -CoffeeScript or other languages to JavaScript, use the prepare -script to do this, and make the required package a devDependency.

-

For example:

-
{ "name": "ethopia-waza",
-  "description": "a delightfully fruity coffee varietal",
-  "version": "1.2.3",
-  "devDependencies": {
-    "coffee-script": "~1.6.3"
-  },
-  "scripts": {
-    "prepare": "coffee -o lib/ -c src/waza.coffee"
-  },
-  "main": "lib/waza.js"
-}
-

The prepare script will be run before publishing, so that users -can consume the functionality without requiring them to compile it -themselves. In dev mode (ie, locally running npm install), it'll -run this script as well, so that you can test it easily.

-

peerDependencies

-

In some cases, you want to express the compatibility of your package with a -host tool or library, while not necessarily doing a require of this host. -This is usually referred to as a plugin. Notably, your module may be exposing -a specific interface, expected and specified by the host documentation.

-

For example:

-
{
-  "name": "tea-latte",
-  "version": "1.3.5",
-  "peerDependencies": {
-    "tea": "2.x"
-  }
-}
-

This ensures your package tea-latte can be installed along with the second -major version of the host package tea only. npm install tea-latte could -possibly yield the following dependency graph:

-
├── tea-latte@1.3.5
-└── tea@2.2.0
-

NOTE: npm versions 1 and 2 will automatically install peerDependencies if -they are not explicitly depended upon higher in the dependency tree. In the -next major version of npm (npm@3), this will no longer be the case. You will -receive a warning that the peerDependency is not installed instead. The -behavior in npms 1 & 2 was frequently confusing and could easily put you into -dependency hell, a situation that npm is designed to avoid as much as possible.

-

Trying to install another plugin with a conflicting requirement will cause an -error. For this reason, make sure your plugin requirement is as broad as -possible, and not to lock it down to specific patch versions.

-

Assuming the host complies with semver, only changes in -the host package's major version will break your plugin. Thus, if you've worked -with every 1.x version of the host package, use "^1.0" or "1.x" to express -this. If you depend on features introduced in 1.5.2, use ">= 1.5.2 < 2".

-

bundledDependencies

-

This defines an array of package names that will be bundled when publishing -the package.

-

In cases where you need to preserve npm packages locally or have them -available through a single file download, you can bundle the packages in a -tarball file by specifying the package names in the bundledDependencies -array and executing npm pack.

-

For example:

-

If we define a package.json like this:

-
{
-  "name": "awesome-web-framework",
-  "version": "1.0.0",
-  "bundledDependencies": [
-    "renderized", "super-streams"
-  ]
-}
-

we can obtain awesome-web-framework-1.0.0.tgz file by running npm pack. -This file contains the dependencies renderized and super-streams which -can be installed in a new project by executing npm install -awesome-web-framework-1.0.0.tgz. Note that the package names do not include -any versions, as that information is specified in dependencies.

-

If this is spelled "bundleDependencies", then that is also honored.

-

optionalDependencies

-

If a dependency can be used, but you would like npm to proceed if it cannot be -found or fails to install, then you may put it in the optionalDependencies -object. This is a map of package name to version or url, just like the -dependencies object. The difference is that build failures do not cause -installation to fail. Running npm install --no-optional will prevent these -dependencies from being installed.

-

It is still your program's responsibility to handle the lack of the -dependency. For example, something like this:

-
try {
-  var foo = require('foo')
-  var fooVersion = require('foo/package.json').version
-} catch (er) {
-  foo = null
-}
-if ( notGoodFooVersion(fooVersion) ) {
-  foo = null
-}
-
-// .. then later in your program ..
-
-if (foo) {
-  foo.doFooThings()
-}
-

Entries in optionalDependencies will override entries of the same name in -dependencies, so it's usually best to only put in one place.

-

engines

-

You can specify the version of node that your stuff works on:

-
{ "engines" : { "node" : ">=0.10.3 <0.12" } }
-

And, like with dependencies, if you don't specify the version (or if you -specify "*" as the version), then any version of node will do.

-

If you specify an "engines" field, then npm will require that "node" be -somewhere on that list. If "engines" is omitted, then npm will just assume -that it works on node.

-

You can also use the "engines" field to specify which versions of npm -are capable of properly installing your program. For example:

-
{ "engines" : { "npm" : "~1.0.20" } }
-

Unless the user has set the engine-strict config flag, this -field is advisory only and will only produce warnings when your package is installed as a dependency.

-

engineStrict

-

This feature was removed in npm 3.0.0

-

Prior to npm 3.0.0, this feature was used to treat this package as if the -user had set engine-strict. It is no longer used.

-

os

-

You can specify which operating systems your -module will run on:

-
"os" : [ "darwin", "linux" ]
-

You can also block instead of allowing operating systems, -just prepend the blocked os with a '!':

-
"os" : [ "!win32" ]
-

The host operating system is determined by process.platform

-

It is allowed to both block and allow an item, although there isn't any -good reason to do this.

-

cpu

-

If your code only runs on certain cpu architectures, -you can specify which ones.

-
"cpu" : [ "x64", "ia32" ]
-

Like the os option, you can also block architectures:

-
"cpu" : [ "!arm", "!mips" ]
-

The host architecture is determined by process.arch

-

preferGlobal

-

DEPRECATED

-

This option used to trigger an npm warning, but it will no longer warn. It is -purely there for informational purposes. It is now recommended that you install -any binaries as local devDependencies wherever possible.

-

private

-

If you set "private": true in your package.json, then npm will refuse -to publish it.

-

This is a way to prevent accidental publication of private repositories. If -you would like to ensure that a given package is only ever published to a -specific registry (for example, an internal registry), then use the -publishConfig dictionary described below to override the registry config -param at publish-time.

-

publishConfig

-

This is a set of config values that will be used at publish-time. It's -especially handy if you want to set the tag, registry or access, so that -you can ensure that a given package is not tagged with "latest", published -to the global public registry or that a scoped module is private by default.

-

Any config values can be overridden, but only "tag", "registry" and "access" -probably matter for the purposes of publishing.

-

See config to see the list of config options that can be -overridden.

-

workspaces

-

The optional workspaces field is an array of file patterns that describes -locations within the local file system that the install client should look up -to find each workspace that needs to be symlinked to -the top level node_modules folder.

-

It can describe either the direct paths of the folders to be used as -workspaces or it can define globs that will resolve to these same folders.

-

In the following example, all folders located inside the folder ./packages -will be treated as workspaces as long as they have valid package.json files -inside them:

-
{
-  "name": "workspace-example",
-  "workspaces": [
-    "./packages/*"
-  ]
-}
-

See workspaces for more examples.

-

DEFAULT VALUES

-

npm will default some values based on package contents.

-
    -
  • -

    "scripts": {"start": "node server.js"}

    -

    If there is a server.js file in the root of your package, then npm -will default the start command to node server.js.

    -
  • -
  • -

    "scripts":{"install": "node-gyp rebuild"}

    -

    If there is a binding.gyp file in the root of your package and you have not defined an install or preinstall script, npm will -default the install command to compile using node-gyp.

    -
  • -
  • -

    "contributors": [...]

    -

    If there is an AUTHORS file in the root of your package, npm will -treat each line as a Name <email> (url) format, where email and url -are optional. Lines which start with a # or are blank, will be -ignored.

    -
  • -
-

SEE ALSO

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-lock-json/index.html b/deps/npm/docs/public/configuring-npm/package-lock-json/index.html deleted file mode 100644 index 398da3c5252699..00000000000000 --- a/deps/npm/docs/public/configuring-npm/package-lock-json/index.html +++ /dev/null @@ -1,191 +0,0 @@ -

package-lock.json

-

A manifestation of the manifest

-

Description

-

package-lock.json is automatically generated for any operations where npm -modifies either the node_modules tree, or package.json. It describes the -exact tree that was generated, such that subsequent installs are able to -generate identical trees, regardless of intermediate dependency updates.

-

This file is intended to be committed into source repositories, and serves -various purposes:

-
    -
  • Describe a single representation of a dependency tree such that teammates, deployments, and continuous integration are guaranteed to install exactly the same dependencies.
  • -
  • Provide a facility for users to "time-travel" to previous states of node_modules without having to commit the directory itself.
  • -
  • To facilitate greater visibility of tree changes through readable source control diffs.
  • -
  • And optimize the installation process by allowing npm to skip repeated metadata resolutions for previously-installed packages.
  • -
-

One key detail about package-lock.json is that it cannot be published, and it -will be ignored if found in any place other than the toplevel package. It shares -a format with npm-shrinkwrap.json, which is essentially the same file, but -allows publication. This is not recommended unless deploying a CLI tool or -otherwise using the publication process for producing production packages.

-

If both package-lock.json and npm-shrinkwrap.json are present in the root of -a package, package-lock.json will be completely ignored.

-

File Format

-

name

-

The name of the package this is a package-lock for. This must match what's in -package.json.

-

version

-

The version of the package this is a package-lock for. This must match what's in -package.json.

-

lockfileVersion

-

An integer version, starting at 1 with the version number of this document -whose semantics were used when generating this package-lock.json.

-

packageIntegrity

-

This is a subresource -integrity value -created from the package.json. No preprocessing of the package.json should -be done. Subresource integrity strings can be produced by modules like -ssri.

- -

Indicates that the install was done with the environment variable -NODE_PRESERVE_SYMLINKS enabled. The installer should insist that the value of -this property match that environment variable.

-

dependencies

-

A mapping of package name to dependency object. Dependency objects have the -following properties:

-
version
-

This is a specifier that uniquely identifies this package and should be -usable in fetching a new copy of it.

-
    -
  • bundled dependencies: Regardless of source, this is a version number that is purely for informational purposes.
  • -
  • registry sources: This is a version number. (eg, 1.2.3)
  • -
  • git sources: This is a git specifier with resolved committish. (eg, git+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e)
  • -
  • http tarball sources: This is the URL of the tarball. (eg, https://example.com/example-1.3.0.tgz)
  • -
  • local tarball sources: This is the file URL of the tarball. (eg file:///opt/storage/example-1.3.0.tgz)
  • -
  • local link sources: This is the file URL of the link. (eg file:libs/our-module)
  • -
-
integrity
-

This is a Standard Subresource -Integrity for this -resource.

-
    -
  • For bundled dependencies this is not included, regardless of source.
  • -
  • For registry sources, this is the integrity that the registry provided, or if one wasn't provided the SHA1 in shasum.
  • -
  • For git sources this is the specific commit hash we cloned from.
  • -
  • For remote tarball sources this is an integrity based on a SHA512 of -the file.
  • -
  • For local tarball sources: This is an integrity field based on the SHA512 of the file.
  • -
-
resolved
-
    -
  • For bundled dependencies this is not included, regardless of source.
  • -
  • For registry sources this is path of the tarball relative to the registry -URL. If the tarball URL isn't on the same server as the registry URL then -this is a complete URL.
  • -
-
bundled
-

If true, this is the bundled dependency and will be installed by the parent -module. When installing, this module will be extracted from the parent -module during the extract phase, not installed as a separate dependency.

-
dev
-

If true then this dependency is either a development dependency ONLY of the -top level module or a transitive dependency of one. This is false for -dependencies that are both a development dependency of the top level and a -transitive dependency of a non-development dependency of the top level.

-
optional
-

If true then this dependency is either an optional dependency ONLY of the -top level module or a transitive dependency of one. This is false for -dependencies that are both an optional dependency of the top level and a -transitive dependency of a non-optional dependency of the top level.

-

All optional dependencies should be included even if they're uninstallable -on the current platform.

-
requires
-

This is a mapping of module name to version. This is a list of everything -this module requires, regardless of where it will be installed. The version -should match via normal matching rules a dependency either in our -dependencies or in a level higher than us.

-
dependencies
-

The dependencies of this dependency, exactly as at the top level.

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-locks/index.html b/deps/npm/docs/public/configuring-npm/package-locks/index.html deleted file mode 100644 index cd5c5941ae7b46..00000000000000 --- a/deps/npm/docs/public/configuring-npm/package-locks/index.html +++ /dev/null @@ -1,219 +0,0 @@ -

package-locks

-

An explanation of npm lockfiles

-

Description

-

Conceptually, the "input" to npm install is a package.json, while its -"output" is a fully-formed node_modules tree: a representation of the -dependencies you declared. In an ideal world, npm would work like a pure -function: the same package.json should produce the exact same node_modules -tree, any time. In some cases, this is indeed true. But in many others, npm is -unable to do this. There are multiple reasons for this:

-
    -
  • different versions of npm (or other package managers) may have been used to install a package, each using slightly different installation algorithms.
  • -
  • a new version of a direct semver-range package may have been published since the last time your packages were installed, and thus a newer version will be used.
  • -
  • A dependency of one of your dependencies may have published a new version, which will update even if you used pinned dependency specifiers (1.2.3 instead of ^1.2.3)
  • -
  • The registry you installed from is no longer available, or allows mutation of versions (unlike the primary npm registry), and a different version of a package exists under the same version number now.
  • -
-

As an example, consider package A:

-
{
-  "name": "A",
-  "version": "0.1.0",
-  "dependencies": {
-    "B": "<0.1.0"
-  }
-}
-

package B:

-
{
-  "name": "B",
-  "version": "0.0.1",
-  "dependencies": {
-    "C": "<0.1.0"
-  }
-}
-

and package C:

-
{
-  "name": "C",
-  "version": "0.0.1"
-}
-

If these are the only versions of A, B, and C available in the -registry, then a normal npm install A will install:

-
A@0.1.0
-`-- B@0.0.1
-    `-- C@0.0.1
-

However, if B@0.0.2 is published, then a fresh npm install A will -install:

-
A@0.1.0
-`-- B@0.0.2
-    `-- C@0.0.1
-

assuming the new version did not modify B's dependencies. Of course, -the new version of B could include a new version of C and any number -of new dependencies. If such changes are undesirable, the author of A -could specify a dependency on B@0.0.1. However, if A's author and B's -author are not the same person, there's no way for A's author to say -that he or she does not want to pull in newly published versions of C -when B hasn't changed at all.

-

To prevent this potential issue, npm uses package-lock.json or, if present, npm-shrinkwrap.json. These files are called package locks, or lockfiles.

-

Whenever you run npm install, npm generates or updates your package lock, -which will look something like this:

-
{
-  "name": "A",
-  "version": "0.1.0",
-  ...metadata fields...
-  "dependencies": {
-    "B": {
-      "version": "0.0.1",
-      "resolved": "https://registry.npmjs.org/B/-/B-0.0.1.tgz",
-      "integrity": "sha512-DeAdb33F+"
-      "dependencies": {
-        "C": {
-          "version": "git://github.com/org/C.git#5c380ae319fc4efe9e7f2d9c78b0faa588fd99b4"
-        }
-      }
-    }
-  }
-}
-

This file describes an exact, and more importantly reproducible -node_modules tree. Once it's present, any future installation will base its -work off this file, instead of recalculating dependency versions off -package.json.

-

The presence of a package lock changes the installation behavior such that:

-
    -
  1. The module tree described by the package lock is reproduced. This means -reproducing the structure described in the file, using the specific files -referenced in "resolved" if available, falling back to normal package resolution -using "version" if one isn't.
  2. -
  3. The tree is walked and any missing dependencies are installed in the usual -fashion.
  4. -
-

If preshrinkwrap, shrinkwrap or postshrinkwrap are in the scripts -property of the package.json, they will be executed in order. preshrinkwrap -and shrinkwrap are executed before the shrinkwrap, postshrinkwrap is -executed afterwards. These scripts run for both package-lock.json and -npm-shrinkwrap.json. For example to run some postprocessing on the generated -file:

-
  "scripts": {
-    "postshrinkwrap": "json -I -e \"this.myMetadata = $MY_APP_METADATA\""
-  }
-

Using locked packages

-

Using a locked package is no different than using any package without a package -lock: any commands that update node_modules and/or package.json's -dependencies will automatically sync the existing lockfile. This includes npm -install, npm rm, npm update, etc. To prevent this update from happening, -you can use the --no-save option to prevent saving altogether, or ---no-shrinkwrap to allow package.json to be updated while leaving -package-lock.json or npm-shrinkwrap.json intact.

-

It is highly recommended you commit the generated package lock to source -control: this will allow anyone else on your team, your deployments, your -CI/continuous integration, and anyone else who runs npm install in your -package source to get the exact same dependency tree that you were developing -on. Additionally, the diffs from these changes are human-readable and will -inform you of any changes npm has made to your node_modules, so you can notice -if any transitive dependencies were updated, hoisted, etc.

-

Resolving lockfile conflicts

-

Occasionally, two separate npm install will create package locks that cause -merge conflicts in source control systems. As of npm@5.7.0, these conflicts -can be resolved by manually fixing any package.json conflicts, and then -running npm install [--package-lock-only] again. npm will automatically -resolve any conflicts for you and write a merged package lock that includes all -the dependencies from both branches in a reasonable tree. If ---package-lock-only is provided, it will do this without also modifying your -local node_modules/.

-

To make this process seamless on git, consider installing -npm-merge-driver, which will teach git how -to do this itself without any user interaction. In short: $ npx -npm-merge-driver install -g will let you do this, and even works with -pre-npm@5.7.0 versions of npm 5, albeit a bit more noisily. Note that if -package.json itself conflicts, you will have to resolve that by hand and run -npm install manually, even with the merge driver.

-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html b/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html deleted file mode 100644 index aceec977e3280c..00000000000000 --- a/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html +++ /dev/null @@ -1,107 +0,0 @@ -

npm shrinkwrap.json

-

A publishable lockfile

-

Description

-

npm-shrinkwrap.json is a file created by npm shrinkwrap. It is identical to -package-lock.json, with one major caveat: Unlike package-lock.json, -npm-shrinkwrap.json may be included when publishing a package.

-

The recommended use-case for npm-shrinkwrap.json is applications deployed -through the publishing process on the registry: for example, daemons and -command-line tools intended as global installs or devDependencies. It's -strongly discouraged for library authors to publish this file, since that would -prevent end users from having control over transitive dependency updates.

-

Additionally, if both package-lock.json and npm-shrinkwrap.json are present -in a package root, package-lock.json will be ignored in favor of this file.

-

For full details and description of the npm-shrinkwrap.json file format, refer -to the manual page for package-lock.json.

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/favicon-32x32.png b/deps/npm/docs/public/favicon-32x32.png deleted file mode 100644 index 2feaae330f0a4e..00000000000000 Binary files a/deps/npm/docs/public/favicon-32x32.png and /dev/null differ diff --git a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLDz8Z1xlEw.woff b/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLDz8Z1xlEw.woff deleted file mode 100644 index 4eefa3c24d47e9..00000000000000 Binary files a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLDz8Z1xlEw.woff and /dev/null differ diff --git a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2 b/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2 deleted file mode 100644 index 025dca3744b8ba..00000000000000 Binary files a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2 and /dev/null differ diff --git a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLGT9Z1xlEw.woff b/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLGT9Z1xlEw.woff deleted file mode 100644 index 59b821e2d093a9..00000000000000 Binary files a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLGT9Z1xlEw.woff and /dev/null differ diff --git a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2 b/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2 deleted file mode 100644 index bb0923bff92a7b..00000000000000 Binary files a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2 and /dev/null differ diff --git a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiEyp8kv8JHgFVrJJfecg.woff2 b/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiEyp8kv8JHgFVrJJfecg.woff2 deleted file mode 100644 index 36195bdd0448c4..00000000000000 Binary files a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiEyp8kv8JHgFVrJJfecg.woff2 and /dev/null differ diff --git a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiEyp8kv8JHgFVrJJfedA.woff b/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiEyp8kv8JHgFVrJJfedA.woff deleted file mode 100644 index 62ac3144e28af6..00000000000000 Binary files a/deps/npm/docs/public/google-fonts/s/poppins/v13/pxiEyp8kv8JHgFVrJJfedA.woff and /dev/null differ diff --git a/deps/npm/docs/public/icons/icon-144x144.png b/deps/npm/docs/public/icons/icon-144x144.png deleted file mode 100644 index cdc55431449e2e..00000000000000 Binary files a/deps/npm/docs/public/icons/icon-144x144.png and /dev/null differ diff --git a/deps/npm/docs/public/icons/icon-192x192.png b/deps/npm/docs/public/icons/icon-192x192.png deleted file mode 100644 index 31dcbfa6bdc219..00000000000000 Binary files a/deps/npm/docs/public/icons/icon-192x192.png and /dev/null differ diff --git a/deps/npm/docs/public/icons/icon-256x256.png b/deps/npm/docs/public/icons/icon-256x256.png deleted file mode 100644 index ea952cc115d9b4..00000000000000 Binary files a/deps/npm/docs/public/icons/icon-256x256.png and /dev/null differ diff --git a/deps/npm/docs/public/icons/icon-384x384.png b/deps/npm/docs/public/icons/icon-384x384.png deleted file mode 100644 index 57649823c6c3c3..00000000000000 Binary files a/deps/npm/docs/public/icons/icon-384x384.png and /dev/null differ diff --git a/deps/npm/docs/public/icons/icon-48x48.png b/deps/npm/docs/public/icons/icon-48x48.png deleted file mode 100644 index a6fe2644f92e34..00000000000000 Binary files a/deps/npm/docs/public/icons/icon-48x48.png and /dev/null differ diff --git a/deps/npm/docs/public/icons/icon-512x512.png b/deps/npm/docs/public/icons/icon-512x512.png deleted file mode 100644 index 7abc6a58653069..00000000000000 Binary files a/deps/npm/docs/public/icons/icon-512x512.png and /dev/null differ diff --git a/deps/npm/docs/public/icons/icon-72x72.png b/deps/npm/docs/public/icons/icon-72x72.png deleted file mode 100644 index f4ccb61f49c6eb..00000000000000 Binary files a/deps/npm/docs/public/icons/icon-72x72.png and /dev/null differ diff --git a/deps/npm/docs/public/icons/icon-96x96.png b/deps/npm/docs/public/icons/icon-96x96.png deleted file mode 100644 index 739a5fe5379e12..00000000000000 Binary files a/deps/npm/docs/public/icons/icon-96x96.png and /dev/null differ diff --git a/deps/npm/docs/public/index.html b/deps/npm/docs/public/index.html deleted file mode 100644 index e22f8d4a7aa29c..00000000000000 --- a/deps/npm/docs/public/index.html +++ /dev/null @@ -1,133 +0,0 @@ -npm cli | npm cli documentation
npm cli _
The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
npm cli _
The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
npm cli _
The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!

The current stable version of npm is available on GitHub.

To upgrade, run: npm install npm@latest -g

\ No newline at end of file diff --git a/deps/npm/docs/public/static/d/2496503923.json b/deps/npm/docs/public/static/d/2496503923.json deleted file mode 100644 index 589f21352c46db..00000000000000 --- a/deps/npm/docs/public/static/d/2496503923.json +++ /dev/null @@ -1 +0,0 @@ -{"data":{"allMarkdownRemark":{"nodes":[{"fields":{"slug":"/using-npm/semver"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/cli-commands/npm-adduser"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/cli-commands/npm-dist-tag"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/cli-commands/npm-explore"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/using-npm/config"},"frontmatter":{"description":"More than you probably want to know about npm configuration","section":"using-npm","title":"config"}},{"fields":{"slug":"/using-npm/developers"},"frontmatter":{"description":"Developer Guide","section":"using-npm","title":"developers"}},{"fields":{"slug":"/using-npm/disputes"},"frontmatter":{"description":"Handling Module Name Disputes","section":"using-npm","title":"disputes"}},{"fields":{"slug":"/configuring-npm/folders"},"frontmatter":{"description":"Folder Structures Used by npm","section":"configuring-npm","title":"folders"}},{"fields":{"slug":"/configuring-npm/install"},"frontmatter":{"description":"Download and install node and npm","section":"configuring-npm","title":"install"}},{"fields":{"slug":"/cli-commands/npm"},"frontmatter":{"description":"javascript package manager","section":"cli-commands","title":"npm"}},{"fields":{"slug":"/cli-commands/npm-access"},"frontmatter":{"description":"Set access level on published packages","section":"cli-commands","title":"npm-access"}},{"fields":{"slug":"/cli-commands/npm-audit"},"frontmatter":{"description":"Run a security audit","section":"cli-commands","title":"npm-audit"}},{"fields":{"slug":"/cli-commands/npm-bin"},"frontmatter":{"description":"Display npm bin folder","section":"cli-commands","title":"npm-bin"}},{"fields":{"slug":"/cli-commands/npm-bugs"},"frontmatter":{"description":"Bugs for a package in a web browser maybe","section":"cli-commands","title":"npm-bugs"}},{"fields":{"slug":"/cli-commands/npm-bundle"},"frontmatter":{"description":"REMOVED","section":"cli-commands","title":"npm-bundle"}},{"fields":{"slug":"/cli-commands/npm-cache"},"frontmatter":{"description":"Manipulates packages cache","section":"cli-commands","title":"npm-cache"}},{"fields":{"slug":"/cli-commands/npm-ci"},"frontmatter":{"description":"Install a project with a clean slate","section":"cli-commands","title":"npm-ci"}},{"fields":{"slug":"/cli-commands/npm-completion"},"frontmatter":{"description":"Tab Completion for npm","section":"cli-commands","title":"npm-completion"}},{"fields":{"slug":"/cli-commands/npm-config"},"frontmatter":{"description":"Manage the npm configuration files","section":"cli-commands","title":"npm-config"}},{"fields":{"slug":"/cli-commands/npm-dedupe"},"frontmatter":{"description":"Reduce duplication","section":"cli-commands","title":"npm-dedupe"}},{"fields":{"slug":"/cli-commands/npm-deprecate"},"frontmatter":{"description":"Deprecate a version of a package","section":"cli-commands","title":"npm-deprecate"}},{"fields":{"slug":"/cli-commands/npm-docs"},"frontmatter":{"description":"Docs for a package in a web browser maybe","section":"cli-commands","title":"npm-docs"}},{"fields":{"slug":"/cli-commands/npm-doctor"},"frontmatter":{"description":"Check your environments","section":"cli-commands","title":"npm-doctor"}},{"fields":{"slug":"/cli-commands/npm-edit"},"frontmatter":{"description":"Edit an installed package","section":"cli-commands","title":"npm-edit"}},{"fields":{"slug":"/cli-commands/npm-exec"},"frontmatter":{"description":"Run a command from a local or remote npm package","section":"cli-commands","title":"npm-exec"}},{"fields":{"slug":"/cli-commands/npm-explain"},"frontmatter":{"description":"Explain installed packages","section":"cli-commands","title":"npm-explain"}},{"fields":{"slug":"/cli-commands/npm-fund"},"frontmatter":{"description":"Retrieve funding information","section":"cli-commands","title":"npm-fund"}},{"fields":{"slug":"/cli-commands/npm-help"},"frontmatter":{"description":"Get help on npm","section":"cli-commands","title":"npm-help"}},{"fields":{"slug":"/cli-commands/npm-help-search"},"frontmatter":{"description":"Search npm help documentation","section":"cli-commands","title":"npm-help-search"}},{"fields":{"slug":"/cli-commands/npm-hook"},"frontmatter":{"description":"Manage registry hooks","section":"cli-commands","title":"npm-hook"}},{"fields":{"slug":"/cli-commands/npm-init"},"frontmatter":{"description":"create a package.json file","section":"cli-commands","title":"npm-init"}},{"fields":{"slug":"/cli-commands/npm-install"},"frontmatter":{"description":"Install a package","section":"cli-commands","title":"npm-install"}},{"fields":{"slug":"/cli-commands/npm-install-ci-test"},"frontmatter":{"description":"Install a project with a clean slate and run tests","section":"cli-commands","title":"npm-install-ci-test"}},{"fields":{"slug":"/cli-commands/npm-install-test"},"frontmatter":{"description":"Install package(s) and run tests","section":"cli-commands","title":"npm-install-test"}},{"fields":{"slug":"/cli-commands/npm-link"},"frontmatter":{"description":"Symlink a package folder","section":"cli-commands","title":"npm-link"}},{"fields":{"slug":"/cli-commands/npm-logout"},"frontmatter":{"description":"Log out of the registry","section":"cli-commands","title":"npm-logout"}},{"fields":{"slug":"/cli-commands/npm-ls"},"frontmatter":{"description":"List installed packages","section":"cli-commands","title":"npm-ls"}},{"fields":{"slug":"/cli-commands/npm-org"},"frontmatter":{"description":"Manage orgs","section":"cli-commands","title":"npm-org"}},{"fields":{"slug":"/cli-commands/npm-outdated"},"frontmatter":{"description":"Check for outdated packages","section":"cli-commands","title":"npm-outdated"}},{"fields":{"slug":"/cli-commands/npm-owner"},"frontmatter":{"description":"Manage package owners","section":"cli-commands","title":"npm-owner"}},{"fields":{"slug":"/cli-commands/npm-pack"},"frontmatter":{"description":"Create a tarball from a package","section":"cli-commands","title":"npm-pack"}},{"fields":{"slug":"/cli-commands/npm-ping"},"frontmatter":{"description":"Ping npm registry","section":"cli-commands","title":"npm-ping"}},{"fields":{"slug":"/cli-commands/npm-prefix"},"frontmatter":{"description":"Display prefix","section":"cli-commands","title":"npm-prefix"}},{"fields":{"slug":"/cli-commands/npm-profile"},"frontmatter":{"description":"Change settings on your registry profile","section":"cli-commands","title":"npm-profile"}},{"fields":{"slug":"/cli-commands/npm-prune"},"frontmatter":{"description":"Remove extraneous packages","section":"cli-commands","title":"npm-prune"}},{"fields":{"slug":"/cli-commands/npm-publish"},"frontmatter":{"description":"Publish a package","section":"cli-commands","title":"npm-publish"}},{"fields":{"slug":"/cli-commands/npm-rebuild"},"frontmatter":{"description":"Rebuild a package","section":"cli-commands","title":"npm-rebuild"}},{"fields":{"slug":"/cli-commands/npm-repo"},"frontmatter":{"description":"Open package repository page in the browser","section":"cli-commands","title":"npm-repo"}},{"fields":{"slug":"/cli-commands/npm-restart"},"frontmatter":{"description":"Restart a package","section":"cli-commands","title":"npm-restart"}},{"fields":{"slug":"/cli-commands/npm-root"},"frontmatter":{"description":"Display npm root","section":"cli-commands","title":"npm-root"}},{"fields":{"slug":"/cli-commands/npm-run-script"},"frontmatter":{"description":"Run arbitrary package scripts","section":"cli-commands","title":"npm-run-script"}},{"fields":{"slug":"/cli-commands/npm-search"},"frontmatter":{"description":"Search for packages","section":"cli-commands","title":"npm-search"}},{"fields":{"slug":"/cli-commands/npm-shrinkwrap"},"frontmatter":{"description":"Lock down dependency versions for publication","section":"cli-commands","title":"npm-shrinkwrap"}},{"fields":{"slug":"/cli-commands/npm-star"},"frontmatter":{"description":"Mark your favorite packages","section":"cli-commands","title":"npm-star"}},{"fields":{"slug":"/cli-commands/npm-stars"},"frontmatter":{"description":"View packages marked as favorites","section":"cli-commands","title":"npm-stars"}},{"fields":{"slug":"/cli-commands/npm-start"},"frontmatter":{"description":"Start a package","section":"cli-commands","title":"npm-start"}},{"fields":{"slug":"/cli-commands/npm-stop"},"frontmatter":{"description":"Stop a package","section":"cli-commands","title":"npm-stop"}},{"fields":{"slug":"/cli-commands/npm-team"},"frontmatter":{"description":"Manage organization teams and team memberships","section":"cli-commands","title":"npm-team"}},{"fields":{"slug":"/cli-commands/npm-test"},"frontmatter":{"description":"Test a package","section":"cli-commands","title":"npm-test"}},{"fields":{"slug":"/cli-commands/npm-token"},"frontmatter":{"description":"Manage your authentication tokens","section":"cli-commands","title":"npm-token"}},{"fields":{"slug":"/cli-commands/npm-uninstall"},"frontmatter":{"description":"Remove a package","section":"cli-commands","title":"npm-uninstall"}},{"fields":{"slug":"/cli-commands/npm-unpublish"},"frontmatter":{"description":"Remove a package from the registry","section":"cli-commands","title":"npm-unpublish"}},{"fields":{"slug":"/cli-commands/npm-update"},"frontmatter":{"description":"Update a package","section":"cli-commands","title":"npm-update"}},{"fields":{"slug":"/cli-commands/npm-version"},"frontmatter":{"description":"Bump a package version","section":"cli-commands","title":"npm-version"}},{"fields":{"slug":"/cli-commands/npm-view"},"frontmatter":{"description":"View registry info","section":"cli-commands","title":"npm-view"}},{"fields":{"slug":"/cli-commands/npm-whoami"},"frontmatter":{"description":"Display npm username","section":"cli-commands","title":"npm-whoami"}},{"fields":{"slug":"/configuring-npm/npmrc"},"frontmatter":{"description":"The npm config files","section":"configuring-npm","title":"npmrc"}},{"fields":{"slug":"/cli-commands/npx"},"frontmatter":{"description":"Run a command from a local or remote npm package","section":"cli-commands","title":"npx"}},{"fields":{"slug":"/using-npm/orgs"},"frontmatter":{"description":"Working with Teams & Orgs","section":"using-npm","title":"orgs"}},{"fields":{"slug":"/configuring-npm/package-lock-json"},"frontmatter":{"description":"A manifestation of the manifest","section":"configuring-npm","title":"package-lock.json"}},{"fields":{"slug":"/configuring-npm/package-locks"},"frontmatter":{"description":"An explanation of npm lockfiles","section":"configuring-npm","title":"package-locks"}},{"fields":{"slug":"/configuring-npm/package-json"},"frontmatter":{"description":"Specifics of npm's package.json handling","section":"configuring-npm","title":"package.json"}},{"fields":{"slug":"/using-npm/registry"},"frontmatter":{"description":"The JavaScript Package Registry","section":"using-npm","title":"registry"}},{"fields":{"slug":"/using-npm/removal"},"frontmatter":{"description":"Cleaning the Slate","section":"using-npm","title":"removal"}},{"fields":{"slug":"/using-npm/scope"},"frontmatter":{"description":"Scoped packages","section":"using-npm","title":"scope"}},{"fields":{"slug":"/using-npm/scripts"},"frontmatter":{"description":"How npm handles the \"scripts\" field","section":"using-npm","title":"scripts"}},{"fields":{"slug":"/configuring-npm/shrinkwrap-json"},"frontmatter":{"description":"A publishable lockfile","section":"configuring-npm","title":"shrinkwrap.json"}},{"fields":{"slug":"/using-npm/workspaces"},"frontmatter":{"description":"Working with workspaces","section":"using-npm","title":"workspaces"}}]}}} \ No newline at end of file diff --git a/deps/npm/docs/public/static/d/63159454.json b/deps/npm/docs/public/static/d/63159454.json deleted file mode 100644 index a7412e7c9b4e80..00000000000000 --- a/deps/npm/docs/public/static/d/63159454.json +++ /dev/null @@ -1 +0,0 @@ -{"data":{"site":{"siteMetadata":{"title":"npm cli documentation","description":"Documentation for the npm cli.","author":"@gatsbyjs"}}}} \ No newline at end of file diff --git a/deps/npm/docs/public/static/network-icon-f659855f70bb0e12addd96250807c241.svg b/deps/npm/docs/public/static/network-icon-f659855f70bb0e12addd96250807c241.svg deleted file mode 100644 index d7ff6bfb1aee8b..00000000000000 --- a/deps/npm/docs/public/static/network-icon-f659855f70bb0e12addd96250807c241.svg +++ /dev/null @@ -1 +0,0 @@ -network-icon \ No newline at end of file diff --git a/deps/npm/docs/public/styles.e93b5499b63484750fba.css b/deps/npm/docs/public/styles.e93b5499b63484750fba.css deleted file mode 100644 index 43ab98eaf07a2c..00000000000000 --- a/deps/npm/docs/public/styles.e93b5499b63484750fba.css +++ /dev/null @@ -1 +0,0 @@ -code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}[hidden]{display:none}html{font-family:Poppins,sans-serif}*{box-sizing:border-box}li,p{font-size:15px;line-height:1.7;font-weight:300}p,ul{padding:10px 0}strong{font-weight:700;color:#c3f}li{list-style-type:disc;list-style-position:inside;padding:8px 0}.documentation h1{font-size:42px;font-weight:600;padding:30px 0 10px}.documentation h2{font-size:22px;font-weight:300}.documentation h3{color:#c3f;font-size:22px;padding:30px 0 5px;font-weight:500}.documentation h4{font-weight:600;padding:20px 0 5px}.documentation p{display:inline-block}:not(pre)>code[class*=language-],pre[class*=language-]{border-radius:4px;background-color:#413844;font-size:13px}:not(pre)>code[class*=language-text]{background-color:rgba(204,139,216,.1);color:#413844;padding:2px 6px;border-radius:0;font-size:14px;font-weight:700;border-radius:1px;display:inline-block}.documentation a,a>code[class*=language-text]{color:#fb3b49;font-weight:600}p>code[class*=language-text]{display:inline-block}.documentation h1:before{content:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 27 26'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='18.13' x2='25.6' y1='13.48' y2='13.48' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23fb8817'/%3E%3Cstop offset='.37' stop-color='%23fb8719'/%3E%3Cstop offset='.51' stop-color='%23fa8420'/%3E%3Cstop offset='.61' stop-color='%23f9802c'/%3E%3Cstop offset='.69' stop-color='%23f7793d'/%3E%3Cstop offset='.76' stop-color='%23f47053'/%3E%3Cstop offset='.82' stop-color='%23f1656e'/%3E%3Cstop offset='.87' stop-color='%23ed578f'/%3E%3Cstop offset='.92' stop-color='%23e948b5'/%3E%3Cstop offset='.97' stop-color='%23e437de'/%3E%3Cstop offset='1' stop-color='%23e02aff'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='17.89' x2='25.84' y1='13.48' y2='13.48' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23fb8817'/%3E%3Cstop offset='1' stop-color='%23e02aff'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' x1='1' x2='18.69' y1='17.84' y2='17.84' xlink:href='%23a'/%3E%3ClinearGradient id='d' x1='.76' x2='18.93' y1='17.84' y2='17.84' xlink:href='%23b'/%3E%3ClinearGradient id='e' x1='1' x2='20.48' y1='7.33' y2='7.33' xlink:href='%23a'/%3E%3ClinearGradient id='f' x1='.76' x2='20.72' y1='7.33' y2='7.33' xlink:href='%23b'/%3E%3C/defs%3E%3Cpath fill='url(%23a)' stroke='url(%23b)' stroke-miterlimit='10' stroke-width='.48' d='M18.53 24.24a.28.28 0 01-.34-.41L25 14.06l-5-11a.28.28 0 11.5-.23L25.58 14a.28.28 0 010 .28l-6.91 9.9a.28.28 0 01-.14.06z'/%3E%3Cpath fill='url(%23c)' stroke='url(%23d)' stroke-miterlimit='10' stroke-width='.48' d='M18.53 24.24a.28.28 0 01-.14 0l-12-1.15a.28.28 0 01-.23-.09L1 11.81a.28.28 0 11.5-.23l5.07 11L18 23.68 13 13a.28.28 0 11.5-.23l5.12 11.12a.28.28 0 01-.09.35z'/%3E%3Cpath fill='url(%23e)' stroke='url(%23f)' stroke-miterlimit='10' stroke-width='.48' d='M13.4 13.12a.25.25 0 01-.14 0L1.25 12a.28.28 0 01-.2-.44L8 1.64a.28.28 0 01.25-.12l12 1.18a.28.28 0 01.2.44L13.51 13a.25.25 0 01-.11.12z'/%3E%3C/svg%3E");position:relative;display:inline-block;padding-right:8px;top:3px;width:28px}.active-sidebar-link{background-color:#ffebff}.active-navbar-link{border-bottom:3px solid #c3f}.header-link-class{margin-left:-24px}.disabled-body{overflow:hidden} \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/config/index.html b/deps/npm/docs/public/using-npm/config/index.html deleted file mode 100644 index 3f5af586a0003a..00000000000000 --- a/deps/npm/docs/public/using-npm/config/index.html +++ /dev/null @@ -1,1187 +0,0 @@ -

config

-

More than you probably want to know about npm configuration

-

Description

-

npm gets its configuration values from the following sources, sorted by priority:

-

Command Line Flags

-

Putting --foo bar on the command line sets the foo configuration -parameter to "bar". A -- argument tells the cli parser to stop -reading flags. Using --flag without specifying any value will set -the value to true.

-

Example: --flag1 --flag2 will set both configuration parameters -to true, while --flag1 --flag2 bar will set flag1 to true, -and flag2 to bar. Finally, --flag1 --flag2 -- bar will set -both configuration parameters to true, and the bar is taken -as a command argument.

-

Environment Variables

-

Any environment variables that start with npm_config_ will be -interpreted as a configuration parameter. For example, putting -npm_config_foo=bar in your environment will set the foo -configuration parameter to bar. Any environment configurations that -are not given a value will be given the value of true. Config -values are case-insensitive, so NPM_CONFIG_FOO=bar will work the -same. However, please note that inside scripts -npm will set its own environment variables and Node will prefer -those lowercase versions over any uppercase ones that you might set. -For details see this issue.

-

Notice that you need to use underscores instead of dashes, so --allow-same-version -would become npm_config_allow_same_version=true.

-

npmrc Files

-

The four relevant files are:

-
    -
  • per-project configuration file (/path/to/my/project/.npmrc)
  • -
  • per-user configuration file (defaults to $HOME/.npmrc; configurable via CLI -option --userconfig or environment variable $NPM_CONFIG_USERCONFIG)
  • -
  • global configuration file (defaults to $PREFIX/etc/npmrc; configurable via -CLI option --globalconfig or environment variable $NPM_CONFIG_GLOBALCONFIG)
  • -
  • npm's built-in configuration file (/path/to/npm/npmrc)
  • -
-

See npmrc for more details.

-

Default Configs

-

Run npm config ls -l to see a set of configuration parameters that are -internal to npm, and are defaults if nothing else is specified.

-

Shorthands and Other CLI Niceties

-

The following shorthands are parsed on the command-line:

-
    -
  • -v: --version
  • -
  • -h, -?, --help, -H: --usage
  • -
  • -s, --silent: --loglevel silent
  • -
  • -q, --quiet: --loglevel warn
  • -
  • -d: --loglevel info
  • -
  • -dd, --verbose: --loglevel verbose
  • -
  • -ddd: --loglevel silly
  • -
  • -g: --global
  • -
  • -C: --prefix
  • -
  • -l: --long
  • -
  • -m: --message
  • -
  • -p, --porcelain: --parseable
  • -
  • -reg: --registry
  • -
  • -f: --force
  • -
  • -desc: --description
  • -
  • -S: --save
  • -
  • -P: --save-prod
  • -
  • -D: --save-dev
  • -
  • -O: --save-optional
  • -
  • -B: --save-bundle
  • -
  • -E: --save-exact
  • -
  • -y: --yes
  • -
  • -n: --yes false
  • -
  • ll and la commands: ls --long
  • -
-

If the specified configuration param resolves unambiguously to a known -configuration parameter, then it is expanded to that configuration -parameter. For example:

-
npm ls --par
-# same as:
-npm ls --parseable
-

If multiple single-character shorthands are strung together, and the -resulting combination is unambiguously not some other configuration -param, then it is expanded to its various component pieces. For -example:

-
npm ls -gpld
-# same as:
-npm ls --global --parseable --long --loglevel info
-

Config Settings

-

access

-
    -
  • Default: restricted
  • -
  • Type: Access
  • -
-

When publishing scoped packages, the access level defaults to restricted. If -you want your scoped package to be publicly viewable (and installable) set ---access=public. The only valid values for access are public and -restricted. Unscoped packages always have an access level of public.

-

all

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When running npm outdated and npm ls, setting --all will show all -outdated or installed packages, rather than only those directly depended -upon by the current project.

-

allow-same-version

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Prevents throwing an error when npm version is used to set the new version -to the same value as the current version.

-

always-auth

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Force npm to always require authentication when accessing the registry, -even for GET requests.

-

also

-
    -
  • Default: null
  • -
  • Type: String
  • -
-

When "dev" or "development" and running local npm shrinkwrap, -npm outdated, or npm update, is an alias for --dev.

-

audit

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" submit audit reports alongside npm install runs to the default -registry and all registries configured for scopes. See the documentation -for npm audit for details on what is submitted.

-

audit-level

-
    -
  • Default: "low"
  • -
  • Type: 'low', 'moderate', 'high', 'critical'
  • -
-

The minimum level of vulnerability for npm audit to exit with -a non-zero exit code.

-

auth-type

-
    -
  • Default: 'legacy'
  • -
  • Type: 'legacy', 'sso', 'saml', 'oauth'
  • -
-

What authentication strategy to use with adduser/login.

-

before

-
    -
  • Alias: enjoy-by
  • -
  • Default: null
  • -
  • Type: Date
  • -
-

If passed to npm install, will rebuild the npm tree such that only versions -that were available on or before the --before time get installed. -If there's no versions available for the current set of direct dependencies, the -command will error.

-

If the requested version is a dist-tag and the given tag does not pass the ---before filter, the most recent version less than or equal to that tag will -be used. For example, foo@latest might install foo@1.2 even though latest -is 2.0.

- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around -the fact that some file systems don't support symlinks, even on -ostensibly Unix systems.

-

browser

-
    -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • -
  • Type: String or Boolean
  • -
-

The browser that is called by npm commands to open websites.

-

Set to false to suppress browser behavior and instead print urls to -terminal.

-

Set to true to use default system URL opener.

-

ca

-
    -
  • Default: The npm CA certificate
  • -
  • Type: String, Array or null
  • -
-

The Certificate Authority signing certificate that is trusted for SSL -connections to the registry. Values should be in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines -replaced by the string "\n". For example:

-
ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
-

Set to null to only allow "known" registrars, or to a specific CA cert -to trust only that specific signing authority.

-

Multiple CAs can be trusted by specifying an array of certificates:

-
ca[]="..."
-ca[]="..."
-

See also the strict-ssl config.

-

cafile

-
    -
  • Default: null
  • -
  • Type: path
  • -
-

A path to a file containing one or multiple Certificate Authority signing -certificates. Similar to the ca setting, but allows for multiple CA's, as -well as for the CA information to be stored in a file on disk.

-

cache

-
    -
  • Default: Windows: %AppData%\npm-cache, Posix: ~/.npm
  • -
  • Type: path
  • -
-

The location of npm's cache directory. See npm cache

-

cache-lock-stale

-
    -
  • Default: 60000 (1 minute)
  • -
  • Type: Number
  • -
-

The number of ms before cache folder lockfiles are considered stale.

-

cache-lock-retries

-
    -
  • Default: 10
  • -
  • Type: Number
  • -
-

Number of times to retry to acquire a lock on cache folder lockfiles.

-

cache-lock-wait

-
    -
  • Default: 10000 (10 seconds)
  • -
  • Type: Number
  • -
-

Number of ms to wait for cache lock files to expire.

-

cache-max

-
    -
  • Default: Infinity
  • -
  • Type: Number
  • -
-

DEPRECATED: This option has been deprecated in favor of --prefer-online.

-

--cache-max=0 is an alias for --prefer-online.

-

cache-min

-
    -
  • Default: 10
  • -
  • Type: Number
  • -
-

DEPRECATED: This option has been deprecated in favor of --prefer-offline.

-

--cache-min=9999 (or bigger) is an alias for --prefer-offline.

-

call

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Optional companion option for npm exec, npx that allows for specifying a -custom command to be run along with the installed packages.

-
npm exec --package yo --package generator-node --call "yo node"
-

cert

-
    -
  • Default: null
  • -
  • Type: String
  • -
-

A client certificate to pass when accessing the registry. Values should be in -PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\n". For example:

-
cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
-

It is not the path to a certificate file (and there is no "certfile" option).

-

cidr

-
    -
  • Default: null
  • -
  • Type: String, Array, null
  • -
-

This is a list of CIDR address to be used when configuring limited access tokens with the npm token create command.

-

commit-hooks

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Run git commit hooks when using the npm version command.

-

color

-
    -
  • Default: true
  • -
  • Type: Boolean or "always"
  • -
-

If false, never shows colors. If "always" then always shows colors. -If true, then only prints color codes for tty file descriptors.

-

This option can also be changed using the environment: colors are -disabled when the environment variable NO_COLOR is set to any value.

-

depth

-
    -
  • Default: null
  • -
  • Type: null or Number
  • -
-

The depth to go when recursing packages for npm ls.

-

To make this default to Infinity instead of null, set --all.

-

description

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Show the description in npm search

-

dev

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

[Deprecated] Install dev-dependencies along with packages.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall. This is NOT currently honored by some network related -commands, eg dist-tags, owner, etc.

-

editor

-
    -
  • Default: EDITOR environment variable if set, or "vi" on Posix, -or "notepad" on Windows.
  • -
  • Type: path
  • -
-

The command to run for npm edit or npm config edit.

-

engine-strict

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, then npm will stubbornly refuse to install (or even -consider installing) any package that claims to not be compatible with -the current Node.js version.

-

force

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input.

-
    -
  • Allow clobbering non-npm files in global installs.
  • -
  • Allow the npm version command to work on an unclean git repository.
  • -
  • Allow deleting the cache folder with npm cache clean.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of npm.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of node, even if --engines-strict is enabled.
  • -
  • Allow npm audit fix to install modules outside your stated dependency -range (including SemVer-major changes).
  • -
  • Allow a module to be installed as a direct dependency of itself.
  • -
  • Allow unpublishing all versions of a published package.
  • -
-

If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option!

-

format-package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Format package-lock.json or npm-shrinkwrap.json as a human readable file.

-

fund

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" displays the message at the end of each npm install -aknowledging the number of dependencies looking for funding. -See npm fund for details.

-

fetch-retries

-
    -
  • Default: 2
  • -
  • Type: Number
  • -
-

The "retries" config for the retry module to use when fetching -packages from the registry.

-

fetch-retry-factor

-
    -
  • Default: 10
  • -
  • Type: Number
  • -
-

The "factor" config for the retry module to use when fetching -packages.

-

fetch-retry-mintimeout

-
    -
  • Default: 10000 (10 seconds)
  • -
  • Type: Number
  • -
-

The "minTimeout" config for the retry module to use when fetching -packages.

-

fetch-retry-maxtimeout

-
    -
  • Default: 60000 (1 minute)
  • -
  • Type: Number
  • -
-

The "maxTimeout" config for the retry module to use when fetching -packages.

-

fetch-timeout

-
    -
  • Default: 300000 (5 minutes)
  • -
  • Type: Number
  • -
-

The maximum amount of time to wait for HTTP requests to complete.

-

git

-
    -
  • Default: "git"
  • -
  • Type: String
  • -
-

The command to use for git commands. If git is installed on the -computer, but is not in the PATH, then set this to the full path to -the git binary.

-

git-tag-version

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tag the commit when using the npm version command.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the -prefix folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead of the -current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

globalconfig

-
    -
  • Default: {prefix}/etc/npmrc
  • -
  • Type: path
  • -
-

The config file to read for global config options.

-

global-style

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Causes npm to install the package into your local node_modules folder with -the same layout it uses with the global node_modules folder. Only your -direct dependencies will show in node_modules and everything they depend -on will be flattened in their node_modules folders. This obviously will -eliminate some deduping. If used with legacy-bundling, legacy-bundling will be -preferred.

-

heading

-
    -
  • Default: "npm"
  • -
  • Type: String
  • -
-

The string that starts all the debugging log output.

-

https-proxy

-
    -
  • Default: null
  • -
  • Type: url
  • -
-

A proxy to use for outgoing https requests. If the HTTPS_PROXY or -https_proxy or HTTP_PROXY or http_proxy environment variables are set, -proxy settings will be honored by the underlying request library.

-

if-present

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm will not exit with an error code when run-script is invoked for -a script that isn't defined in the scripts section of package.json. This -option can be used when it's desirable to optionally run a script when it's -present and fail if the script fails. This is useful, for example, when running -scripts that may only apply for some builds in an otherwise generic CI setup.

-

ignore-prepublish

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm will not run prepublish scripts.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

include

-
    -
  • Default: [prod|dev|optional|peer]
  • -
  • Type: Array
  • -
-

Option that allows for defining which types of dependencies to install.

-

init-module

-
    -
  • Alias: init.module
  • -
  • Default: ~/.npm-init.js
  • -
  • Type: path
  • -
-

A module that will be loaded by the npm init command. See the -documentation for the -init-package-json module -for more information, or npm init.

-

init-author-name

-
    -
  • Alias: init.author.name
  • -
  • Default: ""
  • -
  • Type: String
  • -
-

The value npm init should use by default for the package author's name.

-

init-author-email

-
    -
  • Alias: init.author.email
  • -
  • Default: ""
  • -
  • Type: String
  • -
-

The value npm init should use by default for the package author's email.

-

init-author-url

-
    -
  • Alias: init.author.url
  • -
  • Default: ""
  • -
  • Type: String
  • -
-

The value npm init should use by default for the package author's homepage.

-

init-license

-
    -
  • Alias: init.license
  • -
  • Default: "ISC"
  • -
  • Type: String
  • -
-

The value npm init should use by default for the package license.

-

init-version

-
    -
  • Alias: init.version
  • -
  • Default: "1.0.0"
  • -
  • Type: semver
  • -
-

The value that npm init should use by default for the package -version number, if not already set in package.json.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-

This feature is currently experimental, and the output data structures for many -commands is either not implemented in JSON yet, or subject to change. Only the -output from npm ls --json and npm search --json are currently valid.

-

key

-
    -
  • Default: null
  • -
  • Type: String
  • -
-

A client key to pass when accessing the registry. Values should be in PEM -format with newlines replaced by the string "\n". For example:

-
key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----"
-

It is not the path to a key file (and there is no "keyfile" option).

-

legacy-bundling

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with global-style this option -will be preferred.

-

legacy-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Causes npm to completely ignore peerDependencies when building a package -tree, as in npm versions 3 through 6.

-

If a package cannot be installed because of overly strict -peerDependencies that collide, it provides a way to move forward -resolving the situation.

-

This differs from --omit=peer, in that --omit=peer will avoid unpacking -peerDependencies on disk, but will still design a tree such that -peerDependencies could be unpacked in a correct place.

-

Use of legacy-peer-deps is not recommended, as it will not enforce the -peerDependencies contract that meta-dependencies may rely on.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, then local installs will link if there is a suitable globally -installed package.

-

Note that this means that local installs can cause things to be -installed into the global space at the same time. The link is only done -if one of the two conditions are met:

-
    -
  • The package is not already installed globally, or
  • -
  • the globally installed version is identical to the version that is -being installed locally.
  • -
-

local-address

-
    -
  • Default: undefined
  • -
  • Type: IP Address
  • -
-

The IP address of the local interface to use when making connections -to the npm registry. Must be IPv4 in versions of Node prior to 0.12.

-

loglevel

-
    -
  • Default: "notice"
  • -
  • Type: String
  • -
  • Values: "silent", "error", "warn", "notice", "http", "timing", "info", -"verbose", "silly"
  • -
-

What level of logs to report. On failure, all logs are written to -npm-debug.log in the current working directory.

-

Any logs of a higher level than the setting are shown. The default is "notice".

-

logs-max

-
    -
  • Default: 10
  • -
  • Type: Number
  • -
-

The maximum number of log files to store.

-

long

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show extended information in npm ls and npm search.

-

maxsockets

-
    -
  • Default: 50
  • -
  • Type: Number
  • -
-

The maximum number of connections to use per origin (protocol/host/port -combination). Passed to the http Agent used to make the request.

-

message

-
    -
  • Default: "%s"
  • -
  • Type: String
  • -
-

Commit message which is used by npm version when creating version commit.

-

Any "%s" in the message will be replaced with the version number.

-

metrics-registry

- -

The registry you want to send cli metrics to if send-metrics is true.

-

node-options

-
    -
  • Default: null
  • -
  • Type: String
  • -
-

Options to pass through to Node.js via the NODE_OPTIONS environment -variable. This does not impact how npm itself is executed but it does -impact how lifecycle scripts are called.

-

node-version

-
    -
  • Default: process.version
  • -
  • Type: semver or false
  • -
-

The node version to use when checking a package's engines map.

-

noproxy

-
    -
  • Default: null
  • -
  • Type: String or Array
  • -
-

A comma-separated string or an array of domain extensions that a proxy should not be used for.

-

offline

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Force offline mode: no network requests will be done during install. To allow -the CLI to fill in missing cache data, see --prefer-offline.

-

only

-
    -
  • Default: null
  • -
  • Type: String
  • -
-

When "dev" or "development" and running local npm install without any -arguments, only devDependencies (and their dependencies) are installed.

-

When "dev" or "development" and running local npm ls, npm outdated, or -npm update, is an alias for --dev.

-

When "prod" or "production" and running local npm install without any -arguments, only non-devDependencies (and their dependencies) are -installed.

-

When "prod" or "production" and running local npm ls, npm outdated, or -npm update, is an alias for --production.

-

optional

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Attempt to install packages in the optionalDependencies object. Note -that if these packages fail to install, the overall installation -process is not aborted.

-

otp

-
    -
  • Default: null
  • -
  • Type: Number
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to false, then ignore package-lock.json files when installing. This -will also prevent writing package-lock.json if save is true.

-

When package package-locks are disabled, automatic pruning of extraneous -modules will also be disabled. To remove extraneous modules with -package-locks disabled use npm prune.

-

This option is an alias for --shrinkwrap.

-

package-lock-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, it will update only the package-lock.json, -instead of checking node_modules and downloading dependencies.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Output parseable results from commands that write to -standard output. For npm search, this will be tab-separated table format.

-

prefer-offline

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, staleness checks for cached data will be bypassed, but missing data -will be requested from the server. To force full offline mode, use --offline.

-

This option is effectively equivalent to --cache-min=9999999.

-

prefer-online

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, staleness checks for cached data will be forced, making the CLI look -for updates immediately even for fresh package data.

-

prefix

-
    -
  • Default: see folders
  • -
  • Type: path
  • -
-

The location to install global items. If set on the command line, then -it forces non-global commands to run in the specified folder.

-

preid

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

The "prerelease identifier" to use as a prefix for the "prerelease" part of a -semver. Like the rc in 1.2.0-rc.8.

-

production

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Set to true to run in "production" mode.

-
    -
  1. devDependencies are not installed at the topmost level when running -local npm install without any arguments.
  2. -
  3. Set the NODE_ENV="production" for lifecycle scripts.
  4. -
-

progress

-
    -
  • Default: true, unless TRAVIS or CI env vars set.
  • -
  • Type: Boolean
  • -
-

When set to true, npm will display a progress bar during time intensive -operations, if process.stderr is a TTY.

-

Set to false to suppress the progress bar.

-

proxy

-
    -
  • Default: null
  • -
  • Type: url
  • -
-

A proxy to use for outgoing http requests. If the HTTP_PROXY or -http_proxy environment variables are set, proxy settings will be -honored by the underlying request library.

-

read-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create command.

-

rebuild-bundle

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Rebuild bundled dependencies after installation.

-

registry

- -

The base URL of the npm package registry.

-

rollback

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Remove failed installs.

-

save

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as dependencies.

-

When used with the npm rm command, it removes it from the dependencies -object.

-

Only works if there is already a package.json file present.

-

save-bundle

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If a package would be saved at install time by the use of --save, ---save-dev, or --save-optional, then also put it in the -bundleDependencies list.

-

When used with the npm rm command, it removes it from the -bundledDependencies list.

-

save-prod

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Makes sure that a package will be saved into dependencies specifically. This -is useful if a package already exists in devDependencies or -optionalDependencies, but you want to move it to be a production dep. This is -also the default behavior if --save is true, and neither --save-dev or ---save-optional are true.

-

save-dev

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as devDependencies.

-

When used with the npm rm command, it removes it from the -devDependencies object.

-

Only works if there is already a package.json file present.

-

save-exact

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Dependencies saved to package.json using --save, --save-dev or ---save-optional will be configured with an exact version rather than -using npm's default semver range operator.

-

save-optional

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as -optionalDependencies.

-

When used with the npm rm command, it removes it from the -devDependencies object.

-

Only works if there is already a package.json file present.

-

save-prefix

-
    -
  • Default: '^'
  • -
  • Type: String
  • -
-

Configure how versions of packages installed to a package.json file via ---save or --save-dev get prefixed.

-

For example if a package has version 1.2.3, by default its version is -set to ^1.2.3 which allows minor upgrades for that package, but after -npm config set save-prefix='~' it would be set to ~1.2.3 which only allows -patch upgrades.

-

scope

-
    -
  • Default: the scope of the current project, if any, or ""
  • -
  • Type: String
  • -
-

Associate an operation with a scope for a scoped registry. Useful when logging -in to a private registry for the first time: -npm login --scope=@organization --registry=registry.organization.com, which -will cause @organization to be mapped to the registry for future installation -of packages specified according to the pattern @organization/package.

-

script-shell

-
    -
  • Default: null
  • -
  • Type: path
  • -
-

The shell to use for scripts run with the npm run command.

-

scripts-prepend-node-path

-
    -
  • Default: "warn-only"
  • -
  • Type: Boolean, "auto" or "warn-only"
  • -
-

If set to true, add the directory in which the current node executable -resides to the PATH environment variable when running scripts, -even if that means that npm will invoke a different node executable than -the one which it is running.

-

If set to false, never modify PATH with that.

-

If set to "warn-only", never modify PATH but print a warning if npm thinks -that you may want to run it with true, e.g. because the node executable -in the PATH is not the one npm was invoked with.

-

If set to auto, only add that directory to the PATH environment variable -if the node executable with which npm was invoked and the one that is found -first on the PATH are different.

-

searchexclude

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Space-separated options that limit the results from search.

-

searchopts

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Space-separated options that are always passed to search.

-

searchlimit

-
    -
  • Default: 20
  • -
  • Type: Number
  • -
-

Number of items to limit search results to. Will not apply at all to legacy -searches.

-

searchstaleness

-
    -
  • Default: 900 (15 minutes)
  • -
  • Type: Number
  • -
-

The age of the cache, in seconds, before another registry request is made if -using legacy search endpoint.

-

send-metrics

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, success/failure metrics will be reported to the registry stored in -metrics-registry. These requests contain the number of successful and -failing runs of the npm CLI and the time period overwhich those counts were -gathered. No identifying information is included in these requests.

-

shell

-
    -
  • Default: SHELL environment variable, or "bash" on Posix, or "cmd" on -Windows
  • -
  • Type: path
  • -
-

The shell to run for the npm explore command.

-

shrinkwrap

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to false, then ignore npm-shrinkwrap.json files when installing. This -will also prevent writing npm-shrinkwrap.json if save is true.

-

This option is an alias for --package-lock.

-

sign-git-commit

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, then the npm version command will commit the new package -version using -S to add a signature.

-

Note that git requires you to have set up GPG keys in your git configs -for this to work properly.

-

sign-git-tag

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, then the npm version command will tag the version -using -s to add a signature.

-

Note that git requires you to have set up GPG keys in your git configs -for this to work properly.

-

sso-poll-frequency

-
    -
  • Default: 500
  • -
  • Type: Number
  • -
-

When used with SSO-enabled auth-types, configures how regularly the registry -should be polled while the user is completing authentication.

-

sso-type

-
    -
  • Default: 'oauth'
  • -
  • Type: 'oauth', 'saml', or null
  • -
-

If --auth-type=sso, the type of SSO type to use.

-

strict-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, and --legacy-peer-deps is not set, then any -conflicting peerDependencies will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships.

-

By default, conflicting peerDependencies in the dependency graph will be -resolved using the nearest non-peer dependency specification, even if doing -so will result in some packages receiving a peer dependency outside the -range set in their package's peerDependencies object. When such and -override is performed, a warning is printed, explaining the conflict and -the packages involved. If --strict-peer-deps is set, then the warning is -treated as a failure.

-

strict-ssl

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Whether or not to do SSL key validation when making requests to the -registry via https.

-

See also the ca config.

-

tag

-
    -
  • Default: latest
  • -
  • Type: String
  • -
-

If you ask npm to install a package and don't tell it a specific version, then -it will install the specified tag.

-

Also the tag that is added to the package@version specified by the npm -tag command, if no explicit tag is given.

-

tag-version-prefix

-
    -
  • Default: "v"
  • -
  • Type: String
  • -
-

If set, alters the prefix used when tagging a new version when performing a -version increment using npm-version. To remove the prefix altogether, set it -to the empty string: "".

-

Because other tools may rely on the convention that npm version tags look like -v1.0.0, only use this property if it is absolutely necessary. In -particular, use care when overriding this setting for public packages.

-

timing

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, writes an npm-debug log to _logs and timing information to -_timing.json, both in your cache. _timing.json is a newline delimited -list of JSON objects. You can quickly view it with this -json command line: -json -g < ~/.npm/_timing.json.

-

tmp

-
    -
  • Default: TMPDIR environment variable, or "/tmp"
  • -
  • Type: path
  • -
-

Where to store temporary files and folders. All temp files are deleted -on success, but left behind on failure for forensic purposes.

-

unicode

-
    -
  • Default: false on windows, true on mac/unix systems with a unicode locale
  • -
  • Type: Boolean
  • -
-

When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters to draw trees.

-

update-notifier

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Set to false to suppress the update notification when using an older -version of npm than the latest.

-

usage

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Set to show short usage output (like the -H output) -instead of complete help when doing npm help.

-

userconfig

-
    -
  • Default: ~/.npmrc
  • -
  • Type: path
  • -
-

The location of user-level configuration settings.

-

umask

-
    -
  • Default: 022
  • -
  • Type: Octal numeric string in range 0000..0777 (0..511)
  • -
-

The "umask" value to use when setting the file creation mode on files -and folders.

-

Folders and executables are given a mode which is 0777 masked against -this value. Other files are given a mode which is 0666 masked against -this value. Thus, the defaults are 0755 and 0644 respectively.

-

user-agent

-
    -
  • Default: node/{process.version} {process.platform} {process.arch}
  • -
  • Type: String
  • -
-

Sets a User-Agent to the request header

-

version

-
    -
  • Default: false
  • -
  • Type: boolean
  • -
-

If true, output the npm version and exit successfully.

-

Only relevant when specified explicitly on the command line.

-

versions

-
    -
  • Default: false
  • -
  • Type: boolean
  • -
-

If true, output the npm version as well as node's process.versions map, and -exit successfully.

-

Only relevant when specified explicitly on the command line.

-

viewer

-
    -
  • Default: "man" on Posix, "browser" on Windows
  • -
  • Type: path
  • -
-

The program to use to view help content.

-

Set to "browser" to view html help content in the default web browser.

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/developers/index.html b/deps/npm/docs/public/using-npm/developers/index.html deleted file mode 100644 index 3a9cc7731dea61..00000000000000 --- a/deps/npm/docs/public/using-npm/developers/index.html +++ /dev/null @@ -1,264 +0,0 @@ -

developers

-

Developer Guide

-

Description

-

So, you've decided to use npm to develop (and maybe publish/deploy) -your project.

-

Fantastic!

-

There are a few things that you need to do above the simple steps -that your users will do to install your program.

-

About These Documents

-

These are man pages. If you install npm, you should be able to -then do man npm-thing to get the documentation on a particular -topic, or npm help thing to see the same information.

-

What is a package

-

A package is:

-
    -
  • a) a folder containing a program described by a package.json file
  • -
  • b) a gzipped tarball containing (a)
  • -
  • c) a url that resolves to (b)
  • -
  • d) a <name>@<version> that is published on the registry with (c)
  • -
  • e) a <name>@<tag> that points to (d)
  • -
  • f) a <name> that has a "latest" tag satisfying (e)
  • -
  • g) a git url that, when cloned, results in (a).
  • -
-

Even if you never publish your package, you can still get a lot of -benefits of using npm if you just want to write a node program (a), and -perhaps if you also want to be able to easily install it elsewhere -after packing it up into a tarball (b).

-

Git urls can be of the form:

-
git://github.com/user/project.git#commit-ish
-git+ssh://user@hostname:project.git#commit-ish
-git+http://user@hostname/project/blah.git#commit-ish
-git+https://user@hostname/project/blah.git#commit-ish
-

The commit-ish can be any tag, sha, or branch which can be supplied as -an argument to git checkout. The default is master.

-

The package.json File

-

You need to have a package.json file in the root of your project to do -much of anything with npm. That is basically the whole interface.

-

See package.json for details about what goes in that file. At the very -least, you need:

-
    -
  • -

    name: -This should be a string that identifies your project. Please do not -use the name to specify that it runs on node, or is in JavaScript. -You can use the "engines" field to explicitly state the versions of -node (or whatever else) that your program requires, and it's pretty -well assumed that it's JavaScript.

    -

    It does not necessarily need to match your github repository name.

    -

    So, node-foo and bar-js are bad names. foo or bar are better.

    -
  • -
  • version: -A semver-compatible version.
  • -
  • engines: -Specify the versions of node (or whatever else) that your program -runs on. The node API changes a lot, and there may be bugs or new -functionality that you depend on. Be explicit.
  • -
  • author: -Take some credit.
  • -
  • scripts: -If you have a special compilation or installation script, then you -should put it in the scripts object. You should definitely have at -least a basic smoke-test command as the "scripts.test" field. -See scripts.
  • -
  • main: -If you have a single module that serves as the entry point to your -program (like what the "foo" package gives you at require("foo")), -then you need to specify that in the "main" field.
  • -
  • directories: -This is an object mapping names to folders. The best ones to include are -"lib" and "doc", but if you use "man" to specify a folder full of man pages, -they'll get installed just like these ones.
  • -
-

You can use npm init in the root of your package in order to get you -started with a pretty basic package.json file. See npm init for -more info.

-

Keeping files out of your package

-

Use a .npmignore file to keep stuff out of your package. If there's -no .npmignore file, but there is a .gitignore file, then npm will -ignore the stuff matched by the .gitignore file. If you want to -include something that is excluded by your .gitignore file, you can -create an empty .npmignore file to override it. Like git, npm looks -for .npmignore and .gitignore files in all subdirectories of your -package, not only the root directory.

-

.npmignore files follow the same pattern rules -as .gitignore files:

-
    -
  • Blank lines or lines starting with # are ignored.
  • -
  • Standard glob patterns work.
  • -
  • You can end patterns with a forward slash / to specify a directory.
  • -
  • You can negate a pattern by starting it with an exclamation point !.
  • -
-

By default, the following paths and files are ignored, so there's no -need to add them to .npmignore explicitly:

-
    -
  • .*.swp
  • -
  • ._*
  • -
  • .DS_Store
  • -
  • .git
  • -
  • .hg
  • -
  • .npmrc
  • -
  • .lock-wscript
  • -
  • .svn
  • -
  • .wafpickle-*
  • -
  • config.gypi
  • -
  • CVS
  • -
  • npm-debug.log
  • -
-

Additionally, everything in node_modules is ignored, except for -bundled dependencies. npm automatically handles this for you, so don't -bother adding node_modules to .npmignore.

-

The following paths and files are never ignored, so adding them to -.npmignore is pointless:

-
    -
  • package.json
  • -
  • README (and its variants)
  • -
  • CHANGELOG (and its variants)
  • -
  • LICENSE / LICENCE
  • -
-

If, given the structure of your project, you find .npmignore to be a -maintenance headache, you might instead try populating the files -property of package.json, which is an array of file or directory names -that should be included in your package. Sometimes manually picking -which items to allow is easier to manage than building a block list.

-

Testing whether your .npmignore or files config works

-

If you want to double check that your package will include only the files -you intend it to when published, you can run the npm pack command locally -which will generate a tarball in the working directory, the same way it -does for publishing.

- -

npm link is designed to install a development package and see the -changes in real time without having to keep re-installing it. (You do -need to either re-link or npm rebuild -g to update compiled packages, -of course.)

-

More info at npm link.

-

Before Publishing: Make Sure Your Package Installs and Works

-

This is important.

-

If you can not install it locally, you'll have -problems trying to publish it. Or, worse yet, you'll be able to -publish it, but you'll be publishing a broken or pointless package. -So don't do that.

-

In the root of your package, do this:

-
npm install . -g
-

That'll show you that it's working. If you'd rather just create a symlink -package that points to your working directory, then do this:

-
npm link
-

Use npm ls -g to see if it's there.

-

To test a local install, go into some other folder, and then do:

-
cd ../some-other-folder
-npm install ../my-package
-

to install it locally into the node_modules folder in that other place.

-

Then go into the node-repl, and try using require("my-thing") to -bring in your module's main module.

-

Create a User Account

-

Create a user with the adduser command. It works like this:

-
npm adduser
-

and then follow the prompts.

-

This is documented better in npm adduser.

-

Publish your package

-

This part's easy. In the root of your folder, do this:

-
npm publish
-

You can give publish a url to a tarball, or a filename of a tarball, -or a path to a folder.

-

Note that pretty much everything in that folder will be exposed -by default. So, if you have secret stuff in there, use a -.npmignore file to list out the globs to ignore, or publish -from a fresh checkout.

-

Brag about it

-

Send emails, write blogs, blab in IRC.

-

Tell the world how easy it is to install your program!

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/disputes/index.html b/deps/npm/docs/public/using-npm/disputes/index.html deleted file mode 100644 index b1d312a64f1cd5..00000000000000 --- a/deps/npm/docs/public/using-npm/disputes/index.html +++ /dev/null @@ -1,197 +0,0 @@ -

disputes

-

Handling Module Name Disputes

-

This document describes the steps that you should take to resolve module name -disputes with other npm publishers. It also describes special steps you should -take about names you think infringe your trademarks.

-

This document is a clarification of the acceptable behavior outlined in the -npm Code of Conduct, and nothing in -this document should be interpreted to contradict any aspect of the npm Code of -Conduct.

-

TL;DR

-
    -
  1. Get the author email with npm owner ls <pkgname>
  2. -
  3. Email the author, CC support@npmjs.com
  4. -
  5. After a few weeks, if there's no resolution, we'll sort it out.
  6. -
-

Don't squat on package names. Publish code or move out of the way.

-

Description

-

There sometimes arise cases where a user publishes a module, and then later, -some other user wants to use that name. Here are some common ways that happens -(each of these is based on actual events.)

-
    -
  1. Alice writes a JavaScript module foo, which is not node-specific. Alice -doesn't use node at all. Yusuf wants to use foo in node, so he wraps it in -an npm module. Some time later, Alice starts using node, and wants to take -over management of her program.
  2. -
  3. Yusuf writes an npm module foo, and publishes it. Perhaps much later, Alice -finds a bug in foo, and fixes it. She sends a pull request to Yusuf, but -Yusuf doesn't have the time to deal with it, because he has a new job and a -new baby and is focused on his new Erlang project, and kind of not involved -with node any more. Alice would like to publish a new foo, but can't, -because the name is taken.
  4. -
  5. Yusuf writes a 10-line flow-control library, and calls it foo, and -publishes it to the npm registry. Being a simple little thing, it never -really has to be updated. Alice works for Foo Inc, the makers of the -critically acclaimed and widely-marketed foo JavaScript toolkit framework. -They publish it to npm as foojs, but people are routinely confused when -npm install foo is some different thing.
  6. -
  7. Yusuf writes a parser for the widely-known foo file format, because he -needs it for work. Then, he gets a new job, and never updates the prototype. -Later on, Alice writes a much more complete foo parser, but can't publish, -because Yusuf's foo is in the way.
  8. -
  9. npm owner ls foo. This will tell Alice the email address of the owner -(Yusuf).
  10. -
  11. Alice emails Yusuf, explaining the situation as respectfully as possible, -and what she would like to do with the module name. She adds the npm support -staff support@npmjs.com to the CC list of the email. Mention in the email -that Yusuf can run npm owner add alice foo to add Alice as an owner of the -foo package.
  12. -
  13. After a reasonable amount of time, if Yusuf has not responded, or if Yusuf -and Alice can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least -4 weeks.)
  14. -
-

Reasoning

-

In almost every case so far, the parties involved have been able to reach an -amicable resolution without any major intervention. Most people really do want -to be reasonable, and are probably not even aware that they're in your way.

-

Module ecosystems are most vibrant and powerful when they are as self-directed -as possible. If an admin one day deletes something you had worked on, then that -is going to make most people quite upset, regardless of the justification. When -humans solve their problems by talking to other humans with respect, everyone -has the chance to end up feeling good about the interaction.

-

Exceptions

-

Some things are not allowed, and will be removed without discussion if they are -brought to the attention of the npm registry admins, including but not limited -to:

-
    -
  1. Malware (that is, a package designed to exploit or harm the machine on which -it is installed).
  2. -
  3. Violations of copyright or licenses (for example, cloning an MIT-licensed -program, and then removing or changing the copyright and license statement).
  4. -
  5. Illegal content.
  6. -
  7. "Squatting" on a package name that you plan to use, but aren't actually -using. Sorry, I don't care how great the name is, or how perfect a fit it is -for the thing that someday might happen. If someone wants to use it today, -and you're just taking up space with an empty tarball, you're going to be -evicted.
  8. -
  9. Putting empty packages in the registry. Packages must have SOME -functionality. It can be silly, but it can't be nothing. (See also: -squatting.)
  10. -
  11. Doing weird things with the registry, like using it as your own personal -application database or otherwise putting non-packagey things into it.
  12. -
  13. Other things forbidden by the npm -Code of Conduct such as hateful -language, pornographic content, or harassment.
  14. -
-

If you see bad behavior like this, please report it to abuse@npmjs.com right -away. You are never expected to resolve abusive behavior on your own. We are -here to help.

-

Trademarks

-

If you think another npm publisher is infringing your trademark, such as by -using a confusingly similar package name, email abuse@npmjs.com with a link to -the package or user account on https://www.npmjs.com/. -Attach a copy of your trademark registration certificate.

-

If we see that the package's publisher is intentionally misleading others by -misusing your registered mark without permission, we will transfer the package -name to you. Otherwise, we will contact the package publisher and ask them to -clear up any confusion with changes to their package's README file or -metadata.

-

Changes

-

This is a living document and may be updated from time to time. Please refer to -the git history for this document -to view the changes.

-

License

-

Copyright (C) npm, Inc., All rights reserved

-

This document may be reused under a Creative Commons Attribution-ShareAlike -License.

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/orgs/index.html b/deps/npm/docs/public/using-npm/orgs/index.html deleted file mode 100644 index 4d05c31ac87130..00000000000000 --- a/deps/npm/docs/public/using-npm/orgs/index.html +++ /dev/null @@ -1,149 +0,0 @@ -

orgs

-

Working with Teams & Orgs

-

Description

-

There are three levels of org users:

-
    -
  1. Super admin, controls billing & adding people to the org.
  2. -
  3. Team admin, manages team membership & package access.
  4. -
  5. Developer, works on packages they are given access to.
  6. -
-

The super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a developers team that all users are automatically added to.

-

The team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals.

-

The developer will be able to access packages based on the teams they are on. Access is either read-write or read-only.

-

There are two main commands:

-
    -
  1. npm team see npm team for more details
  2. -
  3. npm access see npm access for more details
  4. -
-

Team Admins create teams

-
    -
  • Check who you’ve added to your org:
  • -
-
npm team ls <org>:developers
-
    -
  • Each org is automatically given a developers team, so you can see the whole list of team members in your org. This team automatically gets read-write access to all packages, but you can change that with the access command.
  • -
  • Create a new team:
  • -
-
npm team create <org:team>
-
    -
  • Add members to that team:
  • -
-
npm team add <org:team> <user>
-

Publish a package and adjust package access

-
    -
  • In package directory, run
  • -
-
npm init --scope=<org>
-

to scope it for your org & publish as usual

-
    -
  • Grant access:
  • -
-
npm access grant <read-only|read-write> <org:team> [<package>]
-
    -
  • Revoke access:
  • -
-
npm access revoke <org:team> [<package>]
-

Monitor your package access

-
    -
  • See what org packages a team member can access:
  • -
-
npm access ls-packages <org> <user>
-
    -
  • See packages available to a specific team:
  • -
-
npm access ls-packages <org:team>
-
    -
  • Check which teams are collaborating on a package:
  • -
-
npm access ls-collaborators <pkg>
-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/registry/index.html b/deps/npm/docs/public/using-npm/registry/index.html deleted file mode 100644 index d518d6ca45ffd4..00000000000000 --- a/deps/npm/docs/public/using-npm/registry/index.html +++ /dev/null @@ -1,161 +0,0 @@ -

registry

-

The JavaScript Package Registry

-

Description

-

To resolve packages by name and version, npm talks to a registry website -that implements the CommonJS Package Registry specification for reading -package info.

-

npm is configured to use npm, Inc.'s public registry at -https://registry.npmjs.org by default. Use of the npm public registry is -subject to terms of use available at https://www.npmjs.com/policies/terms.

-

You can configure npm to use any compatible registry you like, and even run -your own registry. Use of someone else's registry may be governed by their -terms of use.

-

npm's package registry implementation supports several -write APIs as well, to allow for publishing packages and managing user -account information.

-

The npm public registry is powered by a CouchDB database, -of which there is a public mirror at -https://skimdb.npmjs.com/registry. The code for the couchapp is -available at https://github.com/npm/npm-registry-couchapp.

-

The registry URL used is determined by the scope of the package (see -scope. If no scope is specified, the default registry is used, which is -supplied by the registry config parameter. See npm config, -npmrc, and config for more on managing npm's configuration.

-

Does npm send any information about me back to the registry?

-

Yes.

-

When making requests of the registry npm adds two headers with information -about your environment:

-
    -
  • Npm-Scope – If your project is scoped, this header will contain its -scope. In the future npm hopes to build registry features that use this -information to allow you to customize your experience for your -organization.
  • -
  • Npm-In-CI – Set to "true" if npm believes this install is running in a -continuous integration environment, "false" otherwise. This is detected by -looking for the following environment variables: CI, TDDIUM, -JENKINS_URL, bamboo.buildKey. If you'd like to learn more you may find -the original PR -interesting. -This is used to gather better metrics on how npm is used by humans, versus -build farms.
  • -
-

The npm registry does not try to correlate the information in these headers -with any authenticated accounts that may be used in the same requests.

-

Can I run my own private registry?

-

Yes!

-

The easiest way is to replicate the couch database, and use the same (or -similar) design doc to implement the APIs.

-

If you set up continuous replication from the official CouchDB, and then -set your internal CouchDB as the registry config, then you'll be able -to read any published packages, in addition to your private ones, and by -default will only publish internally.

-

If you then want to publish a package for the whole world to see, you can -simply override the --registry option for that publish command.

-

I don't want my package published in the official registry. It's private.

-

Set "private": true in your package.json to prevent it from being -published at all, or -"publishConfig":{"registry":"http://my-internal-registry.local"} -to force it to be published only to your internal registry.

-

See package.json for more info on what goes in the package.json file.

-

Will you replicate from my registry into the public one?

-

No. If you want things to be public, then publish them into the public -registry using npm. What little security there is would be for nought -otherwise.

-

Do I have to use couchdb to build a registry that npm can talk to?

-

No, but it's way easier. Basically, yes, you do, or you have to -effectively implement the entire CouchDB API anyway.

-

Is there a website or something to see package docs and such?

-

Yes, head over to https://www.npmjs.com/

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/removal/index.html b/deps/npm/docs/public/using-npm/removal/index.html deleted file mode 100644 index d984bb73d3a67e..00000000000000 --- a/deps/npm/docs/public/using-npm/removal/index.html +++ /dev/null @@ -1,121 +0,0 @@ -

removal

-

Cleaning the Slate

-

Synopsis

-

So sad to see you go.

-
sudo npm uninstall npm -g
-

Or, if that fails, get the npm source code, and do:

-
sudo make uninstall
-

More Severe Uninstalling

-

Usually, the above instructions are sufficient. That will remove -npm, but leave behind anything you've installed.

-

If that doesn't work, or if you require more drastic measures, -continue reading.

-

Note that this is only necessary for globally-installed packages. Local -installs are completely contained within a project's node_modules -folder. Delete that folder, and everything is gone less a package's -install script is particularly ill-behaved).

-

This assumes that you installed node and npm in the default place. If -you configured node with a different --prefix, or installed npm with a -different prefix setting, then adjust the paths accordingly, replacing -/usr/local with your install prefix.

-

To remove everything npm-related manually:

-
rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
-

If you installed things with npm, then your best bet is to uninstall -them with npm first, and then install them again once you have a -proper install. This can help find any symlinks that are lying -around:

-
ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm
-

Prior to version 0.3, npm used shim files for executables and node -modules. To track those down, you can do the following:

-
find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
-

(This is also in the README file.)

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/scope/index.html b/deps/npm/docs/public/using-npm/scope/index.html deleted file mode 100644 index 3d1ea0bc2043b1..00000000000000 --- a/deps/npm/docs/public/using-npm/scope/index.html +++ /dev/null @@ -1,164 +0,0 @@ -

scope

-

Scoped packages

-

Description

-

All npm packages have a name. Some package names also have a scope. A scope -follows the usual rules for package names (URL-safe characters, no leading dots -or underscores). When used in package names, scopes are preceded by an @ symbol -and followed by a slash, e.g.

-
@somescope/somepackagename
-

Scopes are a way of grouping related packages together, and also affect a few -things about the way npm treats the package.

-

Each npm user/organization has their own scope, and only you can add packages -in your scope. This means you don't have to worry about someone taking your -package name ahead of you. Thus it is also a good way to signal official packages -for organizations.

-

Scoped packages can be published and installed as of npm@2 and are supported -by the primary npm registry. Unscoped packages can depend on scoped packages and -vice versa. The npm client is backwards-compatible with unscoped registries, -so it can be used to work with scoped and unscoped registries at the same time.

-

Installing scoped packages

-

Scoped packages are installed to a sub-folder of the regular installation -folder, e.g. if your other packages are installed in node_modules/packagename, -scoped modules will be installed in node_modules/@myorg/packagename. The scope -folder (@myorg) is simply the name of the scope preceded by an @ symbol, and can -contain any number of scoped packages.

-

A scoped package is installed by referencing it by name, preceded by an -@ symbol, in npm install:

-
npm install @myorg/mypackage
-

Or in package.json:

-
"dependencies": {
-  "@myorg/mypackage": "^1.3.0"
-}
-

Note that if the @ symbol is omitted, in either case, npm will instead attempt to -install from GitHub; see npm install.

-

Requiring scoped packages

-

Because scoped packages are installed into a scope folder, you have to -include the name of the scope when requiring them in your code, e.g.

-
require('@myorg/mypackage')
-

There is nothing special about the way Node treats scope folders. This -simply requires the mypackage module in the folder named @myorg.

-

Publishing scoped packages

-

Scoped packages can be published from the CLI as of npm@2 and can be -published to any registry that supports them, including the primary npm -registry.

-

(As of 2015-04-19, and with npm 2.0 or better, the primary npm registry -does support scoped packages.)

-

If you wish, you may associate a scope with a registry; see below.

-

Publishing public scoped packages to the primary npm registry

-

To publish a public scoped package, you must specify --access public with -the initial publication. This will publish the package and set access -to public as if you had run npm access public after publishing.

-

Publishing private scoped packages to the npm registry

-

To publish a private scoped package to the npm registry, you must have -an npm Private Modules -account.

-

You can then publish the module with npm publish or npm publish ---access restricted, and it will be present in the npm registry, with -restricted access. You can then change the access permissions, if -desired, with npm access or on the npmjs.com website.

-

Associating a scope with a registry

-

Scopes can be associated with a separate registry. This allows you to -seamlessly use a mix of packages from the primary npm registry and one or more -private registries, such as npm Enterprise.

-

You can associate a scope with a registry at login, e.g.

-
npm login --registry=http://reg.example.com --scope=@myco
-

Scopes have a many-to-one relationship with registries: one registry can -host multiple scopes, but a scope only ever points to one registry.

-

You can also associate a scope with a registry using npm config:

-
npm config set @myco:registry http://reg.example.com
-

Once a scope is associated with a registry, any npm install for a package -with that scope will request packages from that registry instead. Any -npm publish for a package name that contains the scope will be published to -that registry instead.

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/scripts/index.html b/deps/npm/docs/public/using-npm/scripts/index.html deleted file mode 100644 index 864f5e90a2f234..00000000000000 --- a/deps/npm/docs/public/using-npm/scripts/index.html +++ /dev/null @@ -1,328 +0,0 @@ -

scripts

-

How npm handles the "scripts" field

-

Description

-

The "scripts" property of of your package.json file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running npm run-script <stage> or npm run <stage> for short. Pre and post commands with matching names will be run for those as well (e.g. premyscript, myscript, postmyscript). Scripts from dependencies can be run with npm explore <pkg> -- npm run <stage>.

-

Pre & Post Scripts

-

To create "pre" or "post" scripts for any scripts defined in the "scripts" section of the package.json, simply create another script with a matching name and add "pre" or "post" to the beginning of them.

-
{
-  "scripts": {
-    "precompress": "{{ executes BEFORE the `compress` script }}",
-    "compress": "{{ run command to compress files }}",
-    "postcompress": "{{ executes AFTER `compress` script }}"
-  }
-}
-

Life Cycle Scripts

-

There are some special life cycle scripts that happen only in certain situations. These scripts happen in addtion to the "pre" and "post" script.

-
    -
  • prepare, prepublish, prepublishOnly, prepack, postpack
  • -
-

prepare (since npm@4.0.0)

-
    -
  • Runs BEFORE the package is packed
  • -
  • Runs BEFORE the package is published
  • -
  • Runs on local npm install without any arguments
  • -
  • Run AFTER prepublish, but BEFORE prepublishOnly
  • -
  • NOTE: If a package being installed through git contains a prepare script, its dependencies and devDependencies will be installed, and the prepare script will be run, before the package is packaged and installed.
  • -
-

prepublish (DEPRECATED)

-
    -
  • Same as prepare
  • -
-

prepublishOnly

-
    -
  • Runs BEFORE the package is prepared and packed, ONLY on npm publish.
  • -
-

prepack

-
    -
  • Runs BEFORE a tarball is packed (on "npm pack", "npm publish", and when installing a git dependencies).
  • -
  • NOTE: "npm run pack" is NOT the same as "npm pack". "npm run pack" is an arbitrary user defined script name, where as, "npm pack" is a CLI defined command.
  • -
-

postpack

-
    -
  • Runs AFTER the tarball has been generated and moved to its final destination.
  • -
-

Prepare and Prepublish

-

Deprecation Note: prepublish

-

Since npm@1.1.71, the npm CLI has run the prepublish script for both npm publish and npm install, because it's a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, very confusing. As of npm@4.0.0, a new event has been introduced, prepare, that preserves this existing behavior. A new event, prepublishOnly has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on npm publish (for instance, running the tests one last time to ensure they're in good shape).

-

See https://github.com/npm/npm/issues/10074 for a much lengthier justification, with further reading, for this change.

-

Use Cases

-

If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a prepublish script. This includes tasks such as:

-
    -
  • Compiling CoffeeScript source code into JavaScript.
  • -
  • Creating minified versions of JavaScript source code.
  • -
  • Fetching remote resources that your package will use.
  • -
-

The advantage of doing these things at prepublish time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that:

-
    -
  • You can depend on coffee-script as a devDependency, and thus -your users don't need to have it installed.
  • -
  • You don't need to include minifiers in your package, reducing -the size for your users.
  • -
  • You don't need to rely on your users having curl or wget or -other system tools on the target machines.
  • -
-

Life Cycle Operation Order

-

npm publish

-
    -
  • prepublishOnly
  • -
  • prepare
  • -
  • prepublish
  • -
  • publish
  • -
  • postpublish
  • -
-

npm pack

-
    -
  • prepack
  • -
  • postpack
  • -
-

npm install

-
    -
  • preinstall
  • -
  • install
  • -
  • postinstall
  • -
-

Also triggers

-
    -
  • prepublish (when on local)
  • -
  • prepare (when on local or workspaces)
  • -
-

npm start

-

npm run start has an npm start shorthand.

-
    -
  • prestart
  • -
  • start
  • -
  • poststart
  • -
-

Default Values

-

npm will default some script values based on package contents.

-
    -
  • -

    "start": "node server.js":

    -

    If there is a server.js file in the root of your package, then npm -will default the start command to node server.js.

    -
  • -
  • -

    "install": "node-gyp rebuild":

    -

    If there is a binding.gyp file in the root of your package and you -haven't defined your own install or preinstall scripts, npm will -default the install command to compile using node-gyp.

    -
  • -
-

User

-

If npm was invoked with root privileges, then it will change the uid -to the user account or uid specified by the user config, which -defaults to nobody. Set the unsafe-perm flag to run scripts with -root privileges.

-

Environment

-

Package scripts run in an environment where many pieces of information -are made available regarding the setup of npm and the current state of -the process.

-

path

-

If you depend on modules that define executable scripts, like test -suites, then those executables will be added to the PATH for -executing the scripts. So, if your package.json has this:

-
{
-  "name" : "foo",
-  "dependencies" : {
-    "bar" : "0.1.x"
-  },
-  "scripts": {
-    "start" : "bar ./test"
-  }
-}
-

then you could run npm start to execute the bar script, which is -exported into the node_modules/.bin directory on npm install.

-

package.json vars

-

The package.json fields are tacked onto the npm_package_ prefix. So, -for instance, if you had {"name":"foo", "version":"1.2.5"} in your -package.json file, then your package scripts would have the -npm_package_name environment variable set to "foo", and the -npm_package_version set to "1.2.5". You can access these variables -in your code with process.env.npm_package_name and -process.env.npm_package_version, and so on for other fields.

-

configuration

-

Configuration parameters are put in the environment with the -npm_config_ prefix. For instance, you can view the effective root -config by checking the npm_config_root environment variable.

-

Special: package.json "config" object

-

The package.json "config" keys are overwritten in the environment if -there is a config param of <name>[@<version>]:<key>. For example, -if the package.json has this:

-
{
-  "name" : "foo",
-  "config" : {
-    "port" : "8080"
-  },
-  "scripts" : {
-    "start" : "node server.js"
-  }
-}
-

and the server.js is this:

-
http.createServer(...).listen(process.env.npm_package_config_port)
-

then the user could change the behavior by doing:

-
  npm config set foo:port 80
-

current lifecycle event

-

Lastly, the npm_lifecycle_event environment variable is set to -whichever stage of the cycle is being executed. So, you could have a -single script used for different parts of the process which switches -based on what's currently happening.

-

Objects are flattened following this format, so if you had -{"scripts":{"install":"foo.js"}} in your package.json, then you'd -see this in the script:

-
process.env.npm_package_scripts_install === "foo.js"
-

Examples

-

For example, if your package.json contains this:

-
{
-  "scripts" : {
-    "install" : "scripts/install.js",
-    "postinstall" : "scripts/install.js",
-    "uninstall" : "scripts/uninstall.js"
-  }
-}
-

then scripts/install.js will be called for the install -and post-install stages of the lifecycle, and scripts/uninstall.js -will be called when the package is uninstalled. Since -scripts/install.js is running for two different phases, it would -be wise in this case to look at the npm_lifecycle_event environment -variable.

-

If you want to run a make command, you can do so. This works just -fine:

-
{
-  "scripts" : {
-    "preinstall" : "./configure",
-    "install" : "make && make install",
-    "test" : "make test"
-  }
-}
-

Exiting

-

Scripts are run by passing the line as a script argument to sh.

-

If the script exits with a code other than 0, then this will abort the -process.

-

Note that these script files don't have to be nodejs or even -javascript programs. They just have to be some kind of executable -file.

-

Hook Scripts

-

If you want to run a specific script at a specific lifecycle event for -ALL packages, then you can use a hook script.

-

Place an executable file at node_modules/.hooks/{eventname}, and -it'll get run for all packages when they are going through that point -in the package lifecycle for any packages installed in that root.

-

Hook scripts are run exactly the same way as package.json scripts. -That is, they are in a separate child process, with the env described -above.

-

Best Practices

-
    -
  • Don't exit with a non-zero error code unless you really mean it. -Except for uninstall scripts, this will cause the npm action to -fail, and potentially be rolled back. If the failure is minor or -only will prevent some optional features, then it's better to just -print a warning and exit successfully.
  • -
  • Try not to use scripts to do what npm can do for you. Read through -package.json to see all the things that you can specify and enable -by simply describing your package appropriately. In general, this -will lead to a more robust and consistent state.
  • -
  • Inspect the env to determine where to put things. For instance, if -the npm_config_binroot environment variable is set to /home/user/bin, then -don't try to install executables into /usr/local/bin. The user -probably set it up that way for a reason.
  • -
  • Don't prefix your script commands with "sudo". If root permissions -are required for some reason, then it'll fail with that error, and -the user will sudo the npm command in question.
  • -
  • Don't use install. Use a .gyp file for compilation, and prepublish -for anything else. You should almost never have to explicitly set a -preinstall or install script. If you are doing this, please consider if -there is another option. The only valid use of install or preinstall -scripts is for compilation which must be done on the target architecture.
  • -
-

See Also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/semver/index.html b/deps/npm/docs/public/using-npm/semver/index.html deleted file mode 100644 index 40e9d2ea6cf068..00000000000000 --- a/deps/npm/docs/public/using-npm/semver/index.html +++ /dev/null @@ -1,440 +0,0 @@ -

semver(7) -- The semantic versioner for npm

-

Install

-
npm install --save semver
-

Usage

-

As a node module:

-
const semver = require('semver')
-
-semver.valid('1.2.3') // '1.2.3'
-semver.valid('a.b.c') // null
-semver.clean('  =v1.2.3   ') // '1.2.3'
-semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
-semver.gt('1.2.3', '9.8.7') // false
-semver.lt('1.2.3', '9.8.7') // true
-semver.minVersion('>=1.0.0') // '1.0.0'
-semver.valid(semver.coerce('v2')) // '2.0.0'
-semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
-

As a command-line utility:

-
$ semver -h
-
-A JavaScript implementation of the https://semver.org/ specification
-Copyright Isaac Z. Schlueter
-
-Usage: semver [options] <version> [<version> [...]]
-Prints valid versions sorted by SemVer precedence
-
-Options:
--r --range <range>
-        Print versions that match the specified range.
-
--i --increment [<level>]
-        Increment a version by the specified level.  Level can
-        be one of: major, minor, patch, premajor, preminor,
-        prepatch, or prerelease.  Default level is 'patch'.
-        Only one version may be specified.
-
---preid <identifier>
-        Identifier to be used to prefix premajor, preminor,
-        prepatch or prerelease version increments.
-
--l --loose
-        Interpret versions and ranges loosely
-
--p --include-prerelease
-        Always include prerelease versions in range matching
-
--c --coerce
-        Coerce a string into SemVer if possible
-        (does not imply --loose)
-
-Program exits successfully if any valid version satisfies
-all supplied ranges, and prints all satisfying versions.
-
-If no satisfying versions are found, then exits failure.
-
-Versions are printed in ascending order, so supplying
-multiple versions to the utility will just sort them.
-

Versions

-

A "version" is described by the v2.0.0 specification found at -https://semver.org/.

-

A leading "=" or "v" character is stripped off and ignored.

-

Ranges

-

A version range is a set of comparators which specify versions -that satisfy the range.

-

A comparator is composed of an operator and a version. The set -of primitive operators is:

-
    -
  • < Less than
  • -
  • <= Less than or equal to
  • -
  • > Greater than
  • -
  • >= Greater than or equal to
  • -
  • = Equal. If no operator is specified, then equality is assumed, -so this operator is optional, but MAY be included.
  • -
-

For example, the comparator >=1.2.7 would match the versions -1.2.7, 1.2.8, 2.5.3, and 1.3.9, but not the versions 1.2.6 -or 1.1.0.

-

Comparators can be joined by whitespace to form a comparator set, -which is satisfied by the intersection of all of the comparators -it includes.

-

A range is composed of one or more comparator sets, joined by ||. A -version matches a range if and only if every comparator in at least -one of the ||-separated comparator sets is satisfied by the version.

-

For example, the range >=1.2.7 <1.3.0 would match the versions -1.2.7, 1.2.8, and 1.2.99, but not the versions 1.2.6, 1.3.0, -or 1.1.0.

-

The range 1.2.7 || >=1.2.9 <2.0.0 would match the versions 1.2.7, -1.2.9, and 1.4.6, but not the versions 1.2.8 or 2.0.0.

-

Prerelease Tags

-

If a version has a prerelease tag (for example, 1.2.3-alpha.3) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same [major, minor, patch] tuple also has a -prerelease tag.

-

For example, the range >1.2.3-alpha.3 would be allowed to match the -version 1.2.3-alpha.7, but it would not be satisfied by -3.4.5-alpha.9, even though 3.4.5-alpha.9 is technically "greater -than" 1.2.3-alpha.3 according to the SemVer sort rules. The version -range only accepts prerelease tags on the 1.2.3 version. The -version 3.4.5 would satisfy the range, because it does not have a -prerelease flag, and 3.4.5 is greater than 1.2.3-alpha.7.

-

The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics.

-

Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use that specific set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the next set of prerelease versions.

-

Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the includePrerelease flag on the options -object to any -functions that do -range matching.

-

Prerelease Identifiers

-

The method .inc takes an additional identifier string argument that -will append the value of the string as a prerelease identifier:

-
semver.inc('1.2.3', 'prerelease', 'beta')
-// '1.2.4-beta.0'
-

command-line example:

-
$ semver 1.2.3 -i prerelease --preid beta
-1.2.4-beta.0
-

Which then can be used to increment further:

-
$ semver 1.2.4-beta.0 -i prerelease
-1.2.4-beta.1
-

Advanced Range Syntax

-

Advanced range syntax desugars to primitive comparators in -deterministic ways.

-

Advanced ranges may be combined in the same way as primitive -comparators using white space or ||.

-

Hyphen Ranges X.Y.Z - A.B.C

-

Specifies an inclusive set.

-
    -
  • 1.2.3 - 2.3.4 := >=1.2.3 <=2.3.4
  • -
-

If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes.

-
    -
  • 1.2 - 2.3.4 := >=1.2.0 <=2.3.4
  • -
-

If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts.

-
    -
  • 1.2.3 - 2.3 := >=1.2.3 <2.4.0
  • -
  • 1.2.3 - 2 := >=1.2.3 <3.0.0
  • -
-

X-Ranges 1.2.x 1.X 1.2.* *

-

Any of X, x, or * may be used to "stand in" for one of the -numeric values in the [major, minor, patch] tuple.

-
    -
  • * := >=0.0.0 (Any version satisfies)
  • -
  • 1.x := >=1.0.0 <2.0.0 (Matching major version)
  • -
  • 1.2.x := >=1.2.0 <1.3.0 (Matching major and minor versions)
  • -
-

A partial version range is treated as an X-Range, so the special -character is in fact optional.

-
    -
  • "" (empty string) := * := >=0.0.0
  • -
  • 1 := 1.x.x := >=1.0.0 <2.0.0
  • -
  • 1.2 := 1.2.x := >=1.2.0 <1.3.0
  • -
-

Tilde Ranges ~1.2.3 ~1.2 ~1

-

Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not.

-
    -
  • ~1.2.3 := >=1.2.3 <1.(2+1).0 := >=1.2.3 <1.3.0
  • -
  • ~1.2 := >=1.2.0 <1.(2+1).0 := >=1.2.0 <1.3.0 (Same as 1.2.x)
  • -
  • ~1 := >=1.0.0 <(1+1).0.0 := >=1.0.0 <2.0.0 (Same as 1.x)
  • -
  • ~0.2.3 := >=0.2.3 <0.(2+1).0 := >=0.2.3 <0.3.0
  • -
  • ~0.2 := >=0.2.0 <0.(2+1).0 := >=0.2.0 <0.3.0 (Same as 0.2.x)
  • -
  • ~0 := >=0.0.0 <(0+1).0.0 := >=0.0.0 <1.0.0 (Same as 0.x)
  • -
  • ~1.2.3-beta.2 := >=1.2.3-beta.2 <1.3.0 Note that prereleases in -the 1.2.3 version will be allowed, if they are greater than or -equal to beta.2. So, 1.2.3-beta.4 would be allowed, but -1.2.4-beta.2 would not, because it is a prerelease of a -different [major, minor, patch] tuple.
  • -
-

Caret Ranges ^1.2.3 ^0.2.5 ^0.0.4

-

Allows changes that do not modify the left-most non-zero digit in the -[major, minor, patch] tuple. In other words, this allows patch and -minor updates for versions 1.0.0 and above, patch updates for -versions 0.X >=0.1.0, and no updates for versions 0.0.X.

-

Many authors treat a 0.x version as if the x were the major -"breaking-change" indicator.

-

Caret ranges are ideal when an author may make breaking changes -between 0.2.4 and 0.3.0 releases, which is a common practice. -However, it presumes that there will not be breaking changes between -0.2.4 and 0.2.5. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices.

-
    -
  • ^1.2.3 := >=1.2.3 <2.0.0
  • -
  • ^0.2.3 := >=0.2.3 <0.3.0
  • -
  • ^0.0.3 := >=0.0.3 <0.0.4
  • -
  • ^1.2.3-beta.2 := >=1.2.3-beta.2 <2.0.0 Note that prereleases in -the 1.2.3 version will be allowed, if they are greater than or -equal to beta.2. So, 1.2.3-beta.4 would be allowed, but -1.2.4-beta.2 would not, because it is a prerelease of a -different [major, minor, patch] tuple.
  • -
  • ^0.0.3-beta := >=0.0.3-beta <0.0.4 Note that prereleases in the -0.0.3 version only will be allowed, if they are greater than or -equal to beta. So, 0.0.3-pr.2 would be allowed.
  • -
-

When parsing caret ranges, a missing patch value desugars to the -number 0, but will allow flexibility within that value, even if the -major and minor versions are both 0.

-
    -
  • ^1.2.x := >=1.2.0 <2.0.0
  • -
  • ^0.0.x := >=0.0.0 <0.1.0
  • -
  • ^0.0 := >=0.0.0 <0.1.0
  • -
-

A missing minor and patch values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero.

-
    -
  • ^1.x := >=1.0.0 <2.0.0
  • -
  • ^0.x := >=0.0.0 <1.0.0
  • -
-

Range Grammar

-

Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors:

-
range-set  ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range      ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen     ::= partial ' - ' partial
-simple     ::= primitive | partial | tilde | caret
-primitive  ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
-partial    ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr         ::= 'x' | 'X' | '*' | nr
-nr         ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
-tilde      ::= '~' partial
-caret      ::= '^' partial
-qualifier  ::= ( '-' pre )? ( '+' build )?
-pre        ::= parts
-build      ::= parts
-parts      ::= part ( '.' part ) *
-part       ::= nr | [-0-9A-Za-z]+
-

Functions

-

All methods and classes take a final options object argument. All -options in this object are false by default. The options supported -are:

-
    -
  • loose Be more forgiving about not-quite-valid semver strings. -(Any resulting output will always be 100% strict compliant, of -course.) For backwards compatibility reasons, if the options -argument is a boolean value instead of an object, it is interpreted -to be the loose param.
  • -
  • includePrerelease Set to suppress the default -behavior of -excluding prerelease tagged versions from ranges unless they are -explicitly opted into.
  • -
-

Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse.

-
    -
  • valid(v): Return the parsed version, or null if it's not valid.
  • -
  • -

    inc(v, release): Return the version incremented by the release -type (major, premajor, minor, preminor, patch, -prepatch, or prerelease), or null if it's not valid

    -
      -
    • premajor in one call will bump the version up to the next major -version and down to a prerelease of that major version. -preminor, and prepatch work the same way.
    • -
    • If called from a non-prerelease version, the prerelease will work the -same as prepatch. It increments the patch version, then makes a -prerelease. If the input version is already a prerelease it simply -increments it.
    • -
    -
  • -
  • prerelease(v): Returns an array of prerelease components, or null -if none exist. Example: prerelease('1.2.3-alpha.1') -> ['alpha', 1]
  • -
  • major(v): Return the major version number.
  • -
  • minor(v): Return the minor version number.
  • -
  • patch(v): Return the patch version number.
  • -
  • intersects(r1, r2, loose): Return true if the two supplied ranges -or comparators intersect.
  • -
  • parse(v): Attempt to parse a string as a semantic version, returning either -a SemVer object or null.
  • -
-

Comparison

-
    -
  • gt(v1, v2): v1 > v2
  • -
  • gte(v1, v2): v1 >= v2
  • -
  • lt(v1, v2): v1 < v2
  • -
  • lte(v1, v2): v1 <= v2
  • -
  • eq(v1, v2): v1 == v2 This is true if they're logically equivalent, -even if they're not the exact same string. You already know how to -compare strings.
  • -
  • neq(v1, v2): v1 != v2 The opposite of eq.
  • -
  • cmp(v1, comparator, v2): Pass in a comparison string, and it'll call -the corresponding function above. "===" and "!==" do simple -string comparison, but are included for completeness. Throws if an -invalid comparison string is provided.
  • -
  • compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if -v2 is greater. Sorts in ascending order if passed to Array.sort().
  • -
  • rcompare(v1, v2): The reverse of compare. Sorts an array of versions -in descending order when passed to Array.sort().
  • -
  • diff(v1, v2): Returns difference between two versions by the release type -(major, premajor, minor, preminor, patch, prepatch, or prerelease), -or null if the versions are the same.
  • -
-

Comparators

-
    -
  • intersects(comparator): Return true if the comparators intersect
  • -
-

Ranges

-
    -
  • validRange(range): Return the valid range or null if it's not valid
  • -
  • satisfies(version, range): Return true if the version satisfies the -range.
  • -
  • maxSatisfying(versions, range): Return the highest version in the list -that satisfies the range, or null if none of them do.
  • -
  • minSatisfying(versions, range): Return the lowest version in the list -that satisfies the range, or null if none of them do.
  • -
  • minVersion(range): Return the lowest version that can possibly match -the given range.
  • -
  • gtr(version, range): Return true if version is greater than all the -versions possible in the range.
  • -
  • ltr(version, range): Return true if version is less than all the -versions possible in the range.
  • -
  • outside(version, range, hilo): Return true if the version is outside -the bounds of the range in either the high or low direction. The -hilo argument must be either the string '>' or '<'. (This is -the function called by gtr and ltr.)
  • -
  • intersects(range): Return true if any of the ranges comparators intersect
  • -
-

Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, or satisfy a range! For -example, the range 1.2 <1.2.9 || >2.0.0 would have a hole from 1.2.9 -until 2.0.0, so the version 1.2.10 would not be greater than the -range (because 2.0.1 satisfies, which is higher), nor less than the -range (since 1.2.8 satisfies, which is lower), and it also does not -satisfy the range.

-

If you want to know if a version satisfies or does not satisfy a -range, use the satisfies(version, range) function.

-

Coercion

-
    -
  • coerce(version): Coerces a string to semver if possible
  • -
-

This aims to provide a very forgiving translation of a non-semver string to -semver. It looks for the first digit in a string, and consumes all -remaining characters which satisfy at least a partial semver (e.g., 1, -1.2, 1.2.3) up to the max permitted length (256 characters). Longer -versions are simply truncated (4.6.3.9.2-alpha2 becomes 4.6.3). All -surrounding text is simply ignored (v3.4 replaces v3.3.1 becomes -3.4.0). Only text which lacks digits will fail coercion (version one -is not valid). The maximum length for any semver component considered for -coercion is 16 characters; longer components will be ignored -(10000000000000000.4.7.4 becomes 4.7.4). The maximum value for any -semver component is Number.MAX_SAFE_INTEGER || (2**53 - 1); higher value -components are invalid (9999999999999999.4.7.4 is likely invalid).

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/workspaces/index.html b/deps/npm/docs/public/using-npm/workspaces/index.html deleted file mode 100644 index 54f92e26279eb9..00000000000000 --- a/deps/npm/docs/public/using-npm/workspaces/index.html +++ /dev/null @@ -1,150 +0,0 @@ -

scope

-

Workspaces

-

Description

-

Workspaces is a generic term that refers to the set of features in the -npm cli that provides support to managing multiple packages from your local -files system from within a singular top-level, root package.

-

This set of features makes up for a much more streamlined workflow handling -linked packages from the local file system. Automating the linking process -as part of npm install and avoiding manually having to use npm link in -order to add references to packages that should be symlinked into the current -node_modules folder.

-

We also refer to these packages being auto-symlinked during npm install as a -single workspace, meaning it's a nested package within the current local -file system that is explicitly defined in the package.json -workspaces configuration.

-

Installing workspaces

-

Workspaces are usually defined via the workspaces property of the -package.json file, e.g:

-
{
-  "name": "my-workspaces-powered-project",
-  "workspaces": [
-    "workspace-a"
-  ]
-}
-

Given the above package.json example living at a current working -directory . that contains a folder named workspace-a that disposes -of a package.json inside it, defining a nodejs package, e.g:

-
.
-+-- package.json
-`-- workspace-a
-   `-- package.json
-

The expected result once running npm install in this current working -directory . is that the folder workspace-a will get symlinked to the -node_modules folder of the current working dir.

-

Below is a post npm install example, given that same previous example -structure of files and folders:

-
.
-+-- node_modules
-|  `-- workspace-a -> ../workspace-a
-+-- package-lock.json
-+-- package.json
-`-- workspace-a
-   `-- package.json
-

Using workspaces

-

Given the specifities of how Node.js handles module resolution it's possible to consume any defined workspace -by it's declared package.json name. Continuing from the example defined -above, let's also create a Node.js script that will require the workspace-a -example module, e.g:

-
// ./workspace-a/index.js
-module.exports = 'a'
-
-// ./lib/index.js
-const moduleA = require('workspace-a')
-console.log(moduleA) // -> a
-

When running it with:

-

node lib/index.js

-

This demonstrates how the nature of node_modules resolution allows for -workspaces to enable a portable workflow for requiring each workspace -in such a way that is also easy to publish these -nested workspaces to be consumed elsewhere.

-

See also

-

👀 Found a typo? Let us know!

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

To report bugs or submit feature requests for the docs, or for any issues regarding the npm command line tool, please post on the npm/cli GitHub project.

\ No newline at end of file diff --git a/deps/npm/docs/src/components/Accordion.js b/deps/npm/docs/src/components/Accordion.js deleted file mode 100644 index e7086f4ec09aac..00000000000000 --- a/deps/npm/docs/src/components/Accordion.js +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import downCarrot from '../images/down-carrot.svg' -import upCarrot from '../images/up-carrot.svg' - -const SectionButton = styled.button` - outline: none; - background-color: transparent; - cursor: pointer; - color: red; - border: none; - font-size: 18px; - font-weight: bold; - padding: 5px 0; - transition: opacity .5s; - - &:after { - background: center / contain no-repeat url(${(props) => props.isOpen ? upCarrot : downCarrot}); - content: ''; - height: 11px; - width: 28px; - display: inline-block; - } - - &:hover { - opacity: .6; - } -` - -class Accordion extends React.Component { - constructor (props) { - super(props) - this.state = { - isOpen: true - } - this.onHide = this.onHide.bind(this) - } - - onHide () { - this.setState({isOpen: !this.state.isOpen}) - } - - render () { - return ( -
- {this.props.section} - {this.state.isOpen && -
- {this.props.children} -
- } -
- ) - } -} - -export default Accordion diff --git a/deps/npm/docs/src/components/Button.js b/deps/npm/docs/src/components/Button.js deleted file mode 100644 index f8372ba7cd5126..00000000000000 --- a/deps/npm/docs/src/components/Button.js +++ /dev/null @@ -1,22 +0,0 @@ -import {Link} from 'gatsby' -import {colors} from '../theme' -import styled from 'styled-components' - -export const LinkButton = styled(Link)` - background-color: ${colors.red}; - color: ${colors.white}; - font-size: 20px; - border-radius: 1px; - padding: 20px; - box-shadow: 8px 8px 0 rgba(251,59,73,.2); - text-decoration: none; - text-align: center; - display: inline-block; - min-width: 180px; - font-weight: 700; - transition: opacity .5s; - - &:hover { - opacity: .8; - } -` diff --git a/deps/npm/docs/src/components/DocLinks.js b/deps/npm/docs/src/components/DocLinks.js deleted file mode 100644 index f3f5ef6484e953..00000000000000 --- a/deps/npm/docs/src/components/DocLinks.js +++ /dev/null @@ -1,72 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import {StaticQuery, graphql} from 'gatsby' -import {Flex} from 'rebass' -import {SidebarLink} from './links' -import Accordion from './Accordion' - -const LinkDesc = styled.span` - font-size: 11px; - line-height: 1.5; - text-transform: lowercase; - display: block; - font-weight: 400; - color: ${(props) => props.theme.colors.darkGray}; -` - -const DocLinks = ({data}) => { - const linkInfo = data.allMarkdownRemark.nodes - const sections = ['cli-commands', 'configuring-npm', 'using-npm'] - let sortedData = {} - - sections.map((section) => ( - sortedData[section] = linkInfo.filter(function (item) { - return item.frontmatter.section === section - }) - )) - - return sections.map((section, index) => ( - - {sortedData[section].map((linkData, index) => { - const title = section === 'cli-commands' - ? linkData.frontmatter.title.replace(/(npm-)+([a-zA-Z\\.-]*)/, 'npm $2') - : linkData.frontmatter.title - - return ( - - - {title} - {linkData.frontmatter.description} - - - ) - }) - } - - )) -} - -export default props => ( - } - /> -) diff --git a/deps/npm/docs/src/components/FoundTypo.js b/deps/npm/docs/src/components/FoundTypo.js deleted file mode 100644 index d3bfe6e0b058b9..00000000000000 --- a/deps/npm/docs/src/components/FoundTypo.js +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react' -import styled from 'styled-components' - -const Container = styled.div` - margin: 80px 0; - border-top: 1px solid black; - padding: 20px 0; -` - -const FoundTypo = () => { - return ( - -

👀 Found a typo? Let us know!

-

The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

-

- To report bugs or submit feature requests for the docs, or for any - issues regarding the npm command line tool, please post on the npm/cli GitHub - project. -

-
- ) -} - -export default FoundTypo diff --git a/deps/npm/docs/src/components/MobileSidebar.js b/deps/npm/docs/src/components/MobileSidebar.js deleted file mode 100644 index 13835e6aa78a1a..00000000000000 --- a/deps/npm/docs/src/components/MobileSidebar.js +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import DocLinks from './DocLinks' -import {} from '../components/Sidebar' - -const MobileContainer = styled.div` - border-left: 1px solid #86838333; - border-bottom: 1px solid #86838333; - padding: 30px 30px 200px; - width: 340px; - display: block; - height: calc(100vh - 54px); - overflow: scroll; - position: fixed; - top: 54px; - right: 0px; - background-color: ${(props) => props.theme.colors.white}; - z-index: 100; - - @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) { - display: none; - } -` - -const MobileSidebar = () => { - return ( - - - - ) -} - -export default MobileSidebar diff --git a/deps/npm/docs/src/components/Sidebar.js b/deps/npm/docs/src/components/Sidebar.js deleted file mode 100644 index 3141cb0fa0fa88..00000000000000 --- a/deps/npm/docs/src/components/Sidebar.js +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import DocLinks from './DocLinks' - -const Container = styled.nav` - border-right: 1px solid #86838333; - padding: 30px; - height: 100vh; - display: none; - width: 380px; - position: sticky; - overflow: scroll; - padding-bottom: 200px; - top: 54px; - background-color: ${(props) => props.theme.colors.white}; - - @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) { - display: block; - } -` - -const Sidebar = () => { - return ( - - - - ) -} - -export default Sidebar diff --git a/deps/npm/docs/src/components/home/DarkBlock.js b/deps/npm/docs/src/components/home/DarkBlock.js deleted file mode 100644 index bba6a9fc51b3d8..00000000000000 --- a/deps/npm/docs/src/components/home/DarkBlock.js +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import {Flex, Box} from 'rebass' -import {LinkButton} from '../Button' - -const Container = styled(Flex)` - background-color: ${(props) => props.theme.colors.purpleBlack}; - color: ${(props) => props.theme.colors.white}; -` - -const ContentWrapper = styled(Flex)` - max-width: 640px; - align-items: center; -` - -const Text = styled.p` - line-height: 1.5; - text-align: center; -` - -const aStyle = { - color: '#fb3b49', - textDecoration: 'none' -} - -const DarkBlock = () => { - return ( - - - -

The current stable version of npm is available on GitHub.

-

To upgrade, run: npm install npm@latest -g

-
- read docs -
-
- ) -} - -export default DarkBlock diff --git a/deps/npm/docs/src/components/home/FeatureCard.js b/deps/npm/docs/src/components/home/FeatureCard.js deleted file mode 100644 index 744a01bb7224ff..00000000000000 --- a/deps/npm/docs/src/components/home/FeatureCard.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import {Flex, Image, Text} from 'rebass' - -const Card = styled(Flex)` - background-color: #f2f2f2ab; - box-shadow: 5px 5px 1px 1px ${(props) => props.theme.colors.red}; - border-radius: 2px; -` - -const Desc = styled.p` - padding: 5px 0; - font-size: 16px; -` - -const Title = styled(Text)` - font-size: 24px; - font-weight: 500; - text-shadow: 1px 2px 2px #f061df6e; -` - -const Icon = styled(Image)` - width: 110px; - flex-shrink: 0; -` - -const FeatureCard = ({icon, text, title}) => { - return ( - - - - {title} - {text} - - - ) -} - -export default FeatureCard diff --git a/deps/npm/docs/src/components/home/Features.js b/deps/npm/docs/src/components/home/Features.js deleted file mode 100644 index e544b4ac9de413..00000000000000 --- a/deps/npm/docs/src/components/home/Features.js +++ /dev/null @@ -1,83 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import FeatureCard from './FeatureCard' -import { FeatureLink } from '../links' -import { Flex } from 'rebass' -import rectangles from '../../images/background-rectangles.svg' -import terminalIcon from '../../images/terminal-icon.svg' -import networkIcon from '../../images/network-icon.svg' -import npmIcon from '../../images/npm-icon.png' -import managerIcon from '../../images/manager-icon.svg' - -const ContainerInner = styled(Flex)` - background: linear-gradient(84deg, #fb881799, #ff4b0199, #c1212799, #e02aff99); -` - -const Container = styled.div` - background: top / cover no-repeat url(${rectangles}); -` - -const ContentWrapper = styled(Flex)` - max-width: 640px; -` - -const featureTexts = { - textOne: 'Download, install, and configure.', - textTwo: 'All available npm commands.', - textThree: 'How npm things work.', - textFour: 'Publish your own public or private packages to the registry with a free or paid account on npmjs.com from npm, Inc.' -} - -const featureTitles = { - titleOne: 'Getting Started', - titleTwo: 'Command Reference', - titleThree: 'Using npm', - titleFour: 'Publishing' -} - -const aStyle = { - color: '#231f20', - textDecoration: 'none' -} -const productsLink = `https://www.npmjs.com/products` - -const Features = () => { - return ( - - - - - - - - - - - - - - - - - - - ) -} - -export default Features diff --git a/deps/npm/docs/src/components/home/Footer.js b/deps/npm/docs/src/components/home/Footer.js deleted file mode 100644 index 851b8dd5652a78..00000000000000 --- a/deps/npm/docs/src/components/home/Footer.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react' -import boxes from '../../images/background-boxes.svg' -import styled from 'styled-components' -import {Flex, Box} from 'rebass' - -const Container = styled(Flex)` - background: center / cover no-repeat url(${boxes}); - height: 380px; - background-color: ${(props) => props.theme.colors.offWhite}; - ` - -const ContentWrapper = styled(Box)` - align-content: center; - width: 100%; - text-align: center; - background-color: ${(props) => props.theme.colors.white}; -` - -const Footer = () => { - return ( - - - Footer Text 🤪 - - - ) -} - -export default Footer diff --git a/deps/npm/docs/src/components/home/Terminal.js b/deps/npm/docs/src/components/home/Terminal.js deleted file mode 100644 index 19d890cb980576..00000000000000 --- a/deps/npm/docs/src/components/home/Terminal.js +++ /dev/null @@ -1,120 +0,0 @@ -import React from 'react' -import styled, {keyframes} from 'styled-components' -import {Flex, Box, Button as RebassButton} from 'rebass' -import closeX from '../../images/x.svg' -import {LinkButton} from '../Button' -import bracket from '../../images/bracket.svg' - -const TerminalBody = styled(Flex)` - background-color: ${(props) => props.theme.colors.purpleBlack}; - border: 2px solid ${(props) => props.theme.colors.purpleBlack}; - color: ${(props) => props.theme.colors.white}; - flex-direction: column; - max-width: 620px; - width: 100%; - height: 100%; - box-shadow: 0px 0px 17px 1px #dc3bc180; - border-radius: 2px; - top: ${(props) => props.top}; - left: ${(props) => props.left}; - right: 0; - position: absolute; -` - -const Top = styled(Flex)` - background-color: ${(props) => props.theme.colors.white}; - height: 18px; -` - -const SiteName = styled(Flex)` - font-size: 45px; - font-family: 'Inconsolata', sans-serif; - font-weight: 700; - letter-spacing: 5px; - text-shadow: 3px 2px 4px #abf1e04d; - - @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) { - font-size: 70px; - } -` - -const Bottom = styled(Flex)` - flex-direction: column; - padding: 30px; - - @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) { - font-size: 70px; - padding: 30px 50px; - - } -` - -const blink = keyframes` - 0% { - opacity: 0; - } - 50% { - opacity 1; - } - 100% { - opacity: 0; - } -` - -const Cursor = styled.span` - color: ${(props) => props.theme.colors.red}; - text-shadow: none; - opacity: 1; - animation: ${blink}; - animation-duration: 3s; - animation-iteration-count: infinite; - animation-fill-mode: both; -` - -const Bracket = styled.span` - background: center / contain no-repeat url(${bracket}); - width: 25px; - margin-right: 5px; - margin-top: 10px; -` - -const Text = styled.span` - font-size: 15px; - font-weight: 400; - letter-spacing: 1px; - line-height: 1.4; - - @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) { - font-size: 18px; - } -` - -const ModalButton = styled(RebassButton)` - cursor: pointer; - background: center no-repeat url(${closeX}); - width: 14px; - height: 14px; -` - -const Terminal = ({onClose, top, left}) => { - return ( - - - - - - npm cli _ - - The intelligent package manager for the Node Javascript Platform. Install stuff and get coding! - - - - read docs - - - - - ) -} - -export default Terminal diff --git a/deps/npm/docs/src/components/home/Windows.js b/deps/npm/docs/src/components/home/Windows.js deleted file mode 100644 index fcdfd0eed029ac..00000000000000 --- a/deps/npm/docs/src/components/home/Windows.js +++ /dev/null @@ -1,73 +0,0 @@ -import React from 'react' -import Terminal from './Terminal' -import styled from 'styled-components' - -const Container = styled.div` - position: relative; - height: 350px; - width: 80%; - margin: auto; - left: -4%; - - @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) { - height: 400px; - } -` - -class Windows extends React.Component { - constructor (props) { - super(props) - this.state = { - showTopTerminal: true, - showMiddleTerminal: true, - showBottomTerminal: true, - counter: 0 - } - this.onHide = this.onHide.bind(this) - } - - onHide (terminal) { - this.setState({ [terminal]: false, counter: this.state.counter + 1 }, () => { - if (this.state.counter === 3) { - this.setState({ - showTopTerminal: true, - showMiddleTerminal: true, - showBottomTerminal: true, - counter: 0 - }) - } - }) - } - - render () { - return ( - - {this.state.showTopTerminal && - this.onHide('showTopTerminal')} - top={'0%'} - left={'0%'} - /> - } - - {this.state.showMiddleTerminal && - this.onHide('showMiddleTerminal')} - top={'8%'} - left={'5%'} - /> - } - - {this.state.showBottomTerminal && - this.onHide('showBottomTerminal')} - top={'16%'} - left={'10%'} - /> - } - - ) - } -} - -export default Windows diff --git a/deps/npm/docs/src/components/home/cubes.js b/deps/npm/docs/src/components/home/cubes.js deleted file mode 100644 index 65a2b8bd953f2b..00000000000000 --- a/deps/npm/docs/src/components/home/cubes.js +++ /dev/null @@ -1,101 +0,0 @@ -import styled, {css, keyframes} from 'styled-components' -import purpleCube from '../../images/purple-cube.svg' -import orangeCube from '../../images/orange-cube.svg' -import redCube from '../../images/red-cube.svg' -import purpleGradientCube from '../../images/purple-gradient-cube.svg' -import pinkGradientCube from '../../images/pink-gradient-cube.svg' - -const commonCubeStyles = css` - background-position: center; - background-repeat: no-repeat; - position: absolute; -` - -const wiggle = keyframes` - 0% { - transform: rotate(0deg); - } - 33% { - transform: rotate(8deg); - } - 100% { - transform: rotate(0deg); - } -` - -export const CubeTopLeft = styled.div` - ${commonCubeStyles}; - background-image: url(${purpleCube}); - height: 35px; - width: 35px; - top: 10%; - left: 8%; - - animation-name: ${wiggle}; - animation-duration: 2.5s; - animation-delay: .5s; - animation-iteration-count: infinite; - animation-fill-mode: both; - animation-timing-function: ease-in-out; -` - -export const CubeMiddleLeft = styled.span` - ${commonCubeStyles}; - background-image: url(${orangeCube}); - height: 30px; - width: 30px; - top: 40%; - left: 17%; - - animation-name: ${wiggle}; - animation-duration: 2.5s; - animation-iteration-count: infinite; - animation-fill-mode: both; - animation-timing-function: ease-in-out; -` - -export const CubeBottomLeft = styled.span` - ${commonCubeStyles}; - background-image: url(${redCube}); - height: 45px; - width: 45px; - top: 78%; - left: 12%; - - animation-name: ${wiggle}; - animation-duration: 3s; - animation-iteration-count: infinite; - animation-fill-mode: both; - animation-timing-function: ease-in-out; -` - -export const CubeBottomRight = styled.span` - ${commonCubeStyles}; - background-image: url(${pinkGradientCube}); - height: 40px; - width: 40px; - top: 70%; - right: 12%; - - animation-name: ${wiggle}; - animation-duration: 2.5s; - animation-iteration-count: infinite; - animation-delay: .3s; - animation-fill-mode: both; - animation-timing-function: ease-in-out; -` - -export const CubeTopRight = styled.span` - ${commonCubeStyles}; - background-image: url(${purpleGradientCube}); - height: 40px; - width: 40px; - top: 14%; - right: 12%; - - animation-name: ${wiggle}; - animation-duration: 3s; - animation-iteration-count: infinite; - animation-fill-mode: backwards; - animation-timing-function: ease-in-out; -` diff --git a/deps/npm/docs/src/components/home/hero.js b/deps/npm/docs/src/components/home/hero.js deleted file mode 100644 index eb690b290de824..00000000000000 --- a/deps/npm/docs/src/components/home/hero.js +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import Windows from './Windows' -import {Flex} from 'rebass' -import {CubeTopLeft, CubeMiddleLeft, CubeBottomLeft, CubeTopRight, CubeBottomRight} from './cubes' - -const Container = styled(Flex)` - background-color: ${(props) => props.theme.colors.offWhite}; - position: relative; -` - -const Hero = () => { - return ( - - - - - - - - - ) -} - -export default Hero diff --git a/deps/npm/docs/src/components/layout.js b/deps/npm/docs/src/components/layout.js deleted file mode 100644 index ebb2636bfcb17a..00000000000000 --- a/deps/npm/docs/src/components/layout.js +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react' -import Navbar from './navbar' -import Sidebar from './Sidebar' -import {Flex, Box} from 'rebass' -import { theme } from 'src/theme' -import { ThemeProvider } from 'styled-components' - -const IS_STATIC = process.env.GATSBY_IS_STATIC - -const Layout = ({children, path}) => { - const showSidebar = IS_STATIC || path.match(/cli-commands|configuring-npm|using-npm/) - - return ( - - - - {showSidebar && } - {children} - - - ) -} - -export default Layout diff --git a/deps/npm/docs/src/components/links.js b/deps/npm/docs/src/components/links.js deleted file mode 100644 index b0424c132cc0c4..00000000000000 --- a/deps/npm/docs/src/components/links.js +++ /dev/null @@ -1,50 +0,0 @@ -import {Link} from 'gatsby' -import styled, {css} from 'styled-components' - -const baseLinkStyles = css` - font-weight: 500; - text-decoration: none; - letter-spacing: .3px; - font-size: 14px; -` -const featureLinkStyles = css` - ${baseLinkStyles} - color: ${(props) => props.theme.colors.black}; - transition: opacity .5s - &:hover { - opacity: .9; - } -` - -const navLinkStyles = css` - ${baseLinkStyles}; - color: ${(props) => props.theme.colors.black}; - transition: opacity .5s; - margin: 0 10px; - - &:hover { - opacity: .5; - } -` -export const FeatureLink = styled(Link)` - ${featureLinkStyles} -` - -export const NavLink = styled(Link)` - ${navLinkStyles}; -` - -export const BasicNavLink = styled.a` - ${navLinkStyles}; -` - -export const SidebarLink = styled(Link)` - ${baseLinkStyles}; - color: ${(props) => props.theme.colors.red}; - padding: 10px; - transition: background-color .3s; - - &:hover { - background-color: ${(props) => props.theme.colors.lightPurple}; - } -` diff --git a/deps/npm/docs/src/components/navbar.js b/deps/npm/docs/src/components/navbar.js deleted file mode 100644 index 37356a6a47a054..00000000000000 --- a/deps/npm/docs/src/components/navbar.js +++ /dev/null @@ -1,136 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import {Flex, Image, Box} from 'rebass' -import cliLogo from '../images/cli-logo.svg' -import {Link} from 'gatsby' -import {NavLink, BasicNavLink} from './links' -import MobileSidebar from '../components/MobileSidebar' -import hamburger from '../images/hamburger.svg' -import hamburgerClose from '../images/hamburger-close.svg' - -const IS_STATIC = !!process.env.GATSBY_IS_STATIC - -const Container = styled(Flex)` - width: 100%; - border-bottom: 1px solid #86838333; - position: sticky; - top: 0; - background-color: ${(props) => props.theme.colors.white}; - z-index: 1; -` - -const Inner = styled(Flex)` - border-top: 3px solid; - border-image: linear-gradient(139deg, #fb8817, #ff4b01, #c12127, #e02aff) 3; - margin: auto; - height: 53px; - padding: 0 30px; - align-items: center; - width: 100%; -` - -const Logo = styled(Image)` - width: 120px; - padding: 0px 5px; - height: 18px; - vertical-align: middle; - display: inline-block; - transition: opacity .5s; - - &:hover { - opacity: .8; - } -` - -const Links = styled.ul` - display: none; - - @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) { - display: block; - margin-left: auto; - } -` - -const Heart = styled(Box)` - font-size: 15px; - display: inline-block; -` - -const Hamburger = styled.button` - border: none; - background: center no-repeat url(${(props) => props.isOpen ? hamburgerClose : hamburger}); - height: 30px; - width: 30px; - display: block; - margin-left: auto; - transition: opacity .5s; - cursor: pointer; - - &:hover { - opacity: .6; - } - - @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) { - display: none; - } -` - -class Navbar extends React.Component { - constructor (props) { - super(props) - this.state = { - value: null, - showMobileNav: false - } - this.enableBody = this.enableBody.bind(this) - this.toggleNav = this.toggleNav.bind(this) - } - - componentDidMount () { - window.addEventListener('resize', () => { - this.enableBody() - this.setState({showMobileNav: false}) - }) - } - - componentWillUnmount () { - this.enableBody() - } - - enableBody () { - window.document.getElementsByTagName('body')[0].classList.remove('disabled-body') - } - - toggleNav () { - this.setState({showMobileNav: !this.state.showMobileNav}) - window.document.getElementsByTagName('body')[0].classList.toggle('disabled-body') - } - - render () { - return ( - - - - - - - - - docs - - npmjs.org - - - - - {this.state.showMobileNav && } - - ) - } -} - -export default Navbar diff --git a/deps/npm/docs/src/components/scripts.js b/deps/npm/docs/src/components/scripts.js deleted file mode 100644 index 75126e11ffaf85..00000000000000 --- a/deps/npm/docs/src/components/scripts.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react' - -const IS_STATIC = process.env.GATSBY_IS_STATIC - -const Scripts = () => { - // Workaround: Make links work on the static html site - if (IS_STATIC) { - return ( - - - - - - - - - - + - - - - - - - - - + - - - - - - - - - - - +

BEHOLD, THIS IS PARSEROR!

Usage

diff --git a/deps/v8/tools/parse-processor.js b/deps/v8/tools/parse-processor.js deleted file mode 100644 index b829cf29d5be80..00000000000000 --- a/deps/v8/tools/parse-processor.js +++ /dev/null @@ -1,1144 +0,0 @@ -// Copyright 2017 the V8 project authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -"use strict"; - - -/** - * A thin wrapper around shell's 'read' function showing a file name on error. - */ -function readFile(fileName) { - try { - return read(fileName); - } catch (e) { - console.log(fileName + ': ' + (e.message || e)); - throw e; - } -} - -// =========================================================================== - -// This is the only true formatting, why? For an international audience the -// confusion between the decimal and thousands separator is big (alternating -// between comma "," vs dot "."). The Swiss formatting uses "'" as a thousands -// separator, dropping most of that confusion. -const numberFormat = new Intl.NumberFormat('de-CH', { - maximumFractionDigits: 2, - minimumFractionDigits: 2, -}); - -function formatNumber(value) { - return numberFormat.format(value); -} - -function BYTES(bytes, total) { - let units = ['B ', 'kB', 'mB', 'gB']; - let unitIndex = 0; - let value = bytes; - while (value > 1000 && unitIndex < units.length) { - value /= 1000; - unitIndex++; - } - let result = formatNumber(value).padStart(10) + ' ' + units[unitIndex]; - if (total !== void 0 && total != 0) { - result += PERCENT(bytes, total).padStart(5); - } - return result; -} - -function PERCENT(value, total) { - return Math.round(value / total * 100) + "%"; -} - -// =========================================================================== -const kNoTimeMetrics = { - __proto__: null, - executionDuration: 0, - firstEventTimestamp: 0, - firstParseEventTimestamp: 0, - lastParseEventTimestamp: 0, - lastEventTimestamp: 0 -}; - -class CompilationUnit { - constructor() { - this.isEval = false; - - // Lazily computed properties. - this.firstEventTimestamp = -1; - this.firstParseEventTimestamp = -1; - this.firstCompileEventTimestamp = -1; - this.lastParseEventTimestamp = -1; - this.lastEventTimestamp = -1; - this.deserializationTimestamp = -1; - - this.preparseTimestamp = -1; - this.parseTimestamp = -1; - this.parse2Timestamp = -1; - this.resolutionTimestamp = -1; - this.compileTimestamp = -1; - this.lazyCompileTimestamp = -1; - this.executionTimestamp = -1; - this.optimizationTimestamp = -1; - - this.deserializationDuration = -0.0; - this.preparseDuration = -0.0; - this.parseDuration = -0.0; - this.parse2Duration = -0.0; - this.resolutionDuration = -0.0; - this.scopeResolutionDuration = -0.0; - this.lazyCompileDuration = -0.0; - this.compileDuration = -0.0; - this.optimizeDuration = -0.0; - - this.ownBytes = -1; - this.compilationCacheHits = []; - } - - finalize() { - this.firstEventTimestamp = this.timestampMin( - this.deserializationTimestamp, this.parseTimestamp, - this.preparseTimestamp, this.resolutionTimestamp, - this.executionTimestamp); - - this.firstParseEventTimestamp = this.timestampMin( - this.deserializationTimestamp, this.parseTimestamp, - this.preparseTimestamp, this.resolutionTimestamp); - - this.firstCompileEventTimestamp = this.rawTimestampMin( - this.deserializationTimestamp, this.compileTimestamp, - this.lazyCompileTimestamp); - // Any excuted script needs to be compiled. - if (this.hasBeenExecuted() && - (this.firstCompileEventTimestamp <= 0 || - this.executionTimestamp < this.firstCompileTimestamp)) { - console.error('Compile < execution timestamp', this); - } - - if (this.ownBytes < 0) console.error(this, 'Own bytes must be positive'); - } - - hasBeenExecuted() { - return this.executionTimestamp > 0; - } - - addCompilationCacheHit(timestamp) { - this.compilationCacheHits.push(timestamp); - } - - // Returns the smallest timestamp from the given list, ignoring - // uninitialized (-1) values. - rawTimestampMin(...timestamps) { - timestamps = timestamps.length == 1 ? timestamps[0] : timestamps; - let result = timestamps.reduce((min, item) => { - return item == -1 ? min : (min == -1 ? item : Math.min(item, item)); - }, -1); - return result; - } - timestampMin(...timestamps) { - let result = this.rawTimestampMin(...timestamps); - if (Number.isNaN(result) || result < 0) { - console.error( - 'Invalid timestamp min:', {result, timestamps, script: this}); - return 0; - } - return result; - } - - timestampMax(...timestamps) { - timestamps = timestamps.length == 1 ? timestamps[0] : timestamps; - let result = Math.max(...timestamps); - if (Number.isNaN(result) || result < 0) { - console.error( - 'Invalid timestamp max:', {result, timestamps, script: this}); - return 0; - } - return result; - } -} - -// =========================================================================== -class Script extends CompilationUnit { - constructor(id) { - super(); - if (id === void 0 || id <= 0) { - throw new Error(`Invalid id=${id} for script`); - } - this.file = ''; - this.id = id; - - this.isNative = false; - this.isBackgroundCompiled = false; - this.isStreamingCompiled = false; - - this.funktions = []; - this.metrics = new Map(); - this.maxNestingLevel = 0; - - this.width = 0; - this.bytesTotal = -1; - this.finalized = false; - this.summary = ''; - this.source = ''; - } - - setFile(name) { - this.file = name; - this.isNative = name.startsWith('native '); - } - - isEmpty() { - return this.funktions.length === 0; - } - - getFunktionAtStartPosition(start) { - if (!this.isEval && start === 0) { - throw 'position 0 is reserved for the script'; - } - if (this.finalized) { - return this.funktions.find(funktion => funktion.start == start); - } - return this.funktions[start]; - } - - // Return the innermost function at the given source position. - getFunktionForPosition(position) { - if (!this.finalized) throw 'Incomplete script'; - for (let i = this.funktions.length - 1; i >= 0; i--) { - let funktion = this.funktions[i]; - if (funktion.containsPosition(position)) return funktion; - } - return undefined; - } - - addMissingFunktions(list) { - if (this.finalized) throw 'script is finalized!'; - list.forEach(fn => { - if (this.funktions[fn.start] === void 0) { - this.addFunktion(fn); - } - }); - } - - addFunktion(fn) { - if (this.finalized) throw 'script is finalized!'; - if (fn.start === void 0) throw "Funktion has no start position"; - if (this.funktions[fn.start] !== void 0) { - fn.print(); - throw "adding same function twice to script"; - } - this.funktions[fn.start] = fn; - } - - finalize() { - this.finalized = true; - // Compact funktions as we no longer need access via start byte position. - this.funktions = this.funktions.filter(each => true); - let parent = null; - let maxNesting = 0; - // Iterate over the Funktions in byte position order. - this.funktions.forEach(fn => { - fn.isEval = this.isEval; - if (parent === null) { - parent = fn; - } else { - // Walk up the nested chain of Funktions to find the parent. - while (parent !== null && !fn.isNestedIn(parent)) { - parent = parent.parent; - } - fn.parent = parent; - if (parent) { - maxNesting = Math.max(maxNesting, parent.addNestedFunktion(fn)); - } - parent = fn; - } - }); - // Sanity checks to ensure that scripts are executed and parsed before any - // of its funktions. - let funktionFirstParseEventTimestamp = -1; - // Second iteration step to finalize the funktions once the proper - // hierarchy has been set up. - this.funktions.forEach(fn => { - fn.finalize(); - - funktionFirstParseEventTimestamp = this.timestampMin( - funktionFirstParseEventTimestamp, fn.firstParseEventTimestamp); - - this.lastParseEventTimestamp = this.timestampMax( - this.lastParseEventTimestamp, fn.lastParseEventTimestamp); - - this.lastEventTimestamp = - this.timestampMax(this.lastEventTimestamp, fn.lastEventTimestamp); - }); - this.maxNestingLevel = maxNesting; - - // Initialize sizes. - if (!this.ownBytes === -1) throw 'Invalid state'; - if (this.funktions.length == 0) { - this.bytesTotal = this.ownBytes = 0; - return; - } - let toplevelFunktionBytes = this.funktions.reduce( - (bytes, each) => bytes + (each.isToplevel() ? each.getBytes() : 0), 0); - if (this.isDeserialized || this.isEval || this.isStreamingCompiled) { - if (this.getBytes() === -1) { - this.bytesTotal = toplevelFunktionBytes; - } - } - this.ownBytes = this.bytesTotal - toplevelFunktionBytes; - // Initialize common properties. - super.finalize(); - // Sanity checks after the minimum timestamps have been computed. - if (funktionFirstParseEventTimestamp < this.firstParseEventTimestamp) { - console.error( - 'invalid firstCompileEventTimestamp', this, - funktionFirstParseEventTimestamp, this.firstParseEventTimestamp); - } - } - - print() { - console.log(this.toString()); - } - - toString() { - let str = `SCRIPT id=${this.id} file=${this.file}\n` + - `functions[${this.funktions.length}]:`; - this.funktions.forEach(fn => str += fn.toString()); - return str; - } - - getBytes() { - return this.bytesTotal; - } - - getOwnBytes() { - return this.ownBytes; - } - - // Also see Funktion.prototype.getMetricBytes - getMetricBytes(name) { - if (name == 'lazyCompileTimestamp') return this.getOwnBytes(); - return this.getOwnBytes(); - } - - getMetricDuration(name) { - return this[name]; - } - - forEach(fn) { - fn(this); - this.funktions.forEach(fn); - } - - // Container helper for TotalScript / Script. - getScripts() { - return [this]; - } - - calculateMetrics(printSummary) { - let log = (str) => this.summary += str + '\n'; - log("SCRIPT: " + this.id); - let all = this.funktions; - if (all.length === 0) return; - - let nofFunktions = all.length; - let ownBytesSum = list => { - return list.reduce((bytes, each) => bytes + each.getOwnBytes(), 0) - }; - - let info = (name, funktions) => { - let ownBytes = ownBytesSum(funktions); - let nofPercent = Math.round(funktions.length / nofFunktions * 100); - let value = (funktions.length + "").padStart(6) + - (nofPercent + "%").padStart(5) + - BYTES(ownBytes, this.bytesTotal).padStart(10); - log((" - " + name).padEnd(20) + value); - this.metrics.set(name + "-bytes", ownBytes); - this.metrics.set(name + "-count", funktions.length); - this.metrics.set(name + "-count-percent", nofPercent); - this.metrics.set(name + "-bytes-percent", - Math.round(ownBytes / this.bytesTotal * 100)); - }; - - log(" - file: " + this.file); - log(' - details: ' + - 'isEval=' + this.isEval + ' deserialized=' + this.isDeserialized + - ' streamed=' + this.isStreamingCompiled); - info("scripts", this.getScripts()); - info("functions", all); - info("toplevel fn", all.filter(each => each.isToplevel())); - info('preparsed', all.filter(each => each.preparseDuration > 0)); - - info('fully parsed', all.filter(each => each.parseDuration > 0)); - // info("fn parsed", all.filter(each => each.parse2Duration > 0)); - // info("resolved", all.filter(each => each.resolutionDuration > 0)); - info("executed", all.filter(each => each.executionTimestamp > 0)); - info('forEval', all.filter(each => each.isEval)); - info("lazy compiled", all.filter(each => each.lazyCompileTimestamp > 0)); - info("eager compiled", all.filter(each => each.compileTimestamp > 0)); - - let parsingCost = - new ExecutionCost('parse', all, each => each.parseDuration); - parsingCost.setMetrics(this.metrics); - log(parsingCost.toString()); - - let preParsingCost = - new ExecutionCost('preparse', all, each => each.preparseDuration); - preParsingCost.setMetrics(this.metrics); - log(preParsingCost.toString()); - - let resolutionCost = - new ExecutionCost('resolution', all, each => each.resolutionDuration); - resolutionCost.setMetrics(this.metrics); - log(resolutionCost.toString()); - - let nesting = new NestingDistribution(all); - nesting.setMetrics(this.metrics); - log(nesting.toString()); - - if (printSummary) console.log(this.summary); - } - - getAccumulatedTimeMetrics( - metrics, start, end, delta, cumulative = true, useDuration = false) { - // Returns an array of the following format: - // [ [start, acc(metric0, start, start), acc(metric1, ...), ...], - // [start+delta, acc(metric0, start, start+delta), ...], - // [start+delta*2, acc(metric0, start, start+delta*2), ...], - // ... - // ] - if (end <= start) throw 'Invalid ranges [' + start + ',' + end + ']'; - const timespan = end - start; - const kSteps = Math.ceil(timespan / delta); - // To reduce the time spent iterating over the funktions of this script - // we iterate once over all funktions and add the metric changes to each - // timepoint: - // [ [0, 300, ...], [1, 15, ...], [2, 100, ...], [3, 0, ...] ... ] - // In a second step we accumulate all values: - // [ [0, 300, ...], [1, 315, ...], [2, 415, ...], [3, 415, ...] ... ] - // - // To limit the number of data points required in the resulting graphs, - // only the rows for entries with actual changes are created. - - const metricProperties = ["time"]; - metrics.forEach(each => { - metricProperties.push(each + 'Timestamp'); - if (useDuration) metricProperties.push(each + 'Duration'); - }); - // Create a packed {rowTemplate} which is copied later-on. - let indexToTime = (t) => (start + t * delta) / kSecondsToMillis; - let rowTemplate = [indexToTime(0)]; - for (let i = 1; i < metricProperties.length; i++) rowTemplate.push(0.0); - // Create rows with 0-time entry. - let rows = new Array(rowTemplate.slice()); - for (let t = 1; t <= kSteps; t++) rows.push(null); - // Create the real metric's property name on the Funktion object. - // Add the increments of each Funktion's metric to the result. - this.forEach(funktionOrScript => { - // Iterate over the Funktion's metric names, skipping position 0 which - // is the time. - const kMetricIncrement = useDuration ? 2 : 1; - for (let i = 1; i < metricProperties.length; i += kMetricIncrement) { - let timestampPropertyName = metricProperties[i]; - let timestamp = funktionOrScript[timestampPropertyName]; - if (timestamp === void 0) continue; - if (timestamp < start || end < timestamp) continue; - timestamp -= start; - let index = Math.floor(timestamp / delta); - let row = rows[index]; - if (row === null) { - // Add a new row if it didn't exist, - row = rows[index] = rowTemplate.slice(); - // .. add the time offset. - row[0] = indexToTime(index); - } - // Add the metric value. - row[i] += funktionOrScript.getMetricBytes(timestampPropertyName); - if (!useDuration) continue; - let durationPropertyName = metricProperties[i + 1]; - row[i + 1] += funktionOrScript.getMetricDuration(durationPropertyName); - } - }); - // Create a packed array again with only the valid entries. - // Accumulate the incremental results by adding the metric values from - // the previous time window. - let previous = rows[0]; - let result = [previous]; - for (let t = 1; t < rows.length; t++) { - let current = rows[t]; - if (current === null) { - // Ensure a zero data-point after each non-zero point. - if (!cumulative && rows[t - 1] !== null) { - let duplicate = rowTemplate.slice(); - duplicate[0] = indexToTime(t); - result.push(duplicate); - } - continue; - } - if (cumulative) { - // Skip i==0 where the corresponding time value in seconds is. - for (let i = 1; i < metricProperties.length; i++) { - current[i] += previous[i]; - } - } - // Make sure we have a data-point in time right before the current one. - if (rows[t - 1] === null) { - let duplicate = (!cumulative ? rowTemplate : previous).slice(); - duplicate[0] = indexToTime(t - 1); - result.push(duplicate); - } - previous = current; - result.push(current); - } - // Make sure there is an entry at the last position to make sure all graphs - // have the same width. - const lastIndex = rows.length - 1; - if (rows[lastIndex] === null) { - let duplicate = previous.slice(); - duplicate[0] = indexToTime(lastIndex); - result.push(duplicate); - } - return result; - } - - getFunktionsAtTime(time, delta, metric) { - // Returns a list of Funktions whose metric changed in the - // [time-delta, time+delta] range. - return this.funktions.filter( - funktion => funktion.didMetricChange(time, delta, metric)); - return result; - } -} - - -class TotalScript extends Script { - constructor() { - super('all files', 'all files'); - this.scripts = []; - } - - addAllFunktions(script) { - // funktions is indexed by byte offset and as such not packed. Add every - // Funktion one by one to keep this.funktions packed. - script.funktions.forEach(fn => this.funktions.push(fn)); - this.scripts.push(script); - this.bytesTotal += script.bytesTotal; - } - - // Iterate over all Scripts and nested Funktions. - forEach(fn) { - this.scripts.forEach(script => script.forEach(fn)); - } - - getScripts() { - return this.scripts; - } -} - - -// =========================================================================== - -class NestingDistribution { - constructor(funktions) { - // Stores the nof bytes per function nesting level. - this.accumulator = [0, 0, 0, 0, 0]; - // Max nof bytes encountered at any nesting level. - this.max = 0; - // avg bytes per nesting level. - this.avg = 0; - this.totalBytes = 0; - - funktions.forEach(each => each.accumulateNestingLevel(this.accumulator)); - this.max = this.accumulator.reduce((max, each) => Math.max(max, each), 0); - this.totalBytes = this.accumulator.reduce((sum, each) => sum + each, 0); - for (let i = 0; i < this.accumulator.length; i++) { - this.avg += this.accumulator[i] * i; - } - this.avg /= this.totalBytes; - } - - print() { - console.log(this.toString()) - } - - toString() { - let ticks = " ▁▂▃▄▅▆▇█"; - let accString = this.accumulator.reduce((str, each) => { - let index = Math.round(each / this.max * (ticks.length - 1)); - return str + ticks[index]; - }, ''); - let percent0 = this.accumulator[0] - let percent1 = this.accumulator[1]; - let percent2plus = this.accumulator.slice(2) - .reduce((sum, each) => sum + each, 0); - return " - nesting level: " + - ' avg=' + formatNumber(this.avg) + - ' l0=' + PERCENT(percent0, this.totalBytes) + - ' l1=' + PERCENT(percent1, this.totalBytes) + - ' l2+=' + PERCENT(percent2plus, this.totalBytes) + - ' distribution=[' + accString + ']'; - - } - - setMetrics(dict) {} -} - -class ExecutionCost { - constructor(prefix, funktions, time_fn) { - this.prefix = prefix; - // Time spent on executed functions. - this.executedCost = 0 - // Time spent on not executed functions. - this.nonExecutedCost = 0; - - this.executedCost = funktions.reduce((sum, each) => { - return sum + (each.hasBeenExecuted() ? time_fn(each) : 0) - }, 0); - this.nonExecutedCost = funktions.reduce((sum, each) => { - return sum + (each.hasBeenExecuted() ? 0 : time_fn(each)) - }, 0); - - } - - print() { - console.log(this.toString()) - } - - toString() { - return (' - ' + this.prefix + '-time:').padEnd(24) + - (" executed=" + formatNumber(this.executedCost) + 'ms').padEnd(20) + - " non-executed=" + formatNumber(this.nonExecutedCost) + 'ms'; - } - - setMetrics(dict) { - dict.set('parseMetric', this.executionCost); - dict.set('parseMetricNegative', this.nonExecutionCost); - } -} - -// =========================================================================== - -class Funktion extends CompilationUnit { - constructor(name, start, end, script) { - super(); - if (start < 0) throw "invalid start position: " + start; - if (script.isEval) { - if (end < start) throw 'invalid start end positions'; - } else { - if (end <= 0) throw 'invalid end position: ' + end; - if (end <= start) throw 'invalid start end positions'; - } - - this.name = name; - this.start = start; - this.end = end; - this.script = script; - this.parent = null; - this.nested = []; - this.nestingLevel = 0; - - if (script) this.script.addFunktion(this); - } - - finalize() { - this.lastParseEventTimestamp = Math.max( - this.preparseTimestamp + this.preparseDuration, - this.parseTimestamp + this.parseDuration, - this.resolutionTimestamp + this.resolutionDuration); - if (!(this.lastParseEventTimestamp > 0)) this.lastParseEventTimestamp = 0; - - this.lastEventTimestamp = - Math.max(this.lastParseEventTimestamp, this.executionTimestamp); - if (!(this.lastEventTimestamp > 0)) this.lastEventTimestamp = 0; - - this.ownBytes = this.nested.reduce( - (bytes, each) => bytes - each.getBytes(), this.getBytes()); - - super.finalize(); - } - - getMetricBytes(name) { - if (name == 'lazyCompileTimestamp') return this.getOwnBytes(); - return this.getOwnBytes(); - } - - getMetricDuration(name) { - if (name in kNoTimeMetrics) return 0; - return this[name]; - } - - isNestedIn(funktion) { - if (this.script != funktion.script) throw "Incompatible script"; - return funktion.start < this.start && this.end <= funktion.end; - } - - isToplevel() { - return this.parent === null; - } - - containsPosition(position) { - return this.start <= position && position <= this.end; - } - - accumulateNestingLevel(accumulator) { - let value = accumulator[this.nestingLevel] || 0; - accumulator[this.nestingLevel] = value + this.getOwnBytes(); - } - - addNestedFunktion(child) { - if (this.script != child.script) throw "Incompatible script"; - if (child == null) throw "Nesting non child"; - this.nested.push(child); - if (this.nested.length > 1) { - // Make sure the nested children don't overlap and have been inserted in - // byte start position order. - let last = this.nested[this.nested.length - 2]; - if (last.end > child.start || last.start > child.start || - last.end > child.end || last.start > child.end) { - throw "Wrongly nested child added"; - } - } - child.nestingLevel = this.nestingLevel + 1; - return child.nestingLevel; - } - - getBytes() { - return this.end - this.start; - } - - getOwnBytes() { - return this.ownBytes; - } - - didMetricChange(time, delta, name) { - let value = this[name + 'Timestamp']; - return (time - delta) <= value && value <= (time + delta); - } - - print() { - console.log(this.toString()); - } - - toString(details = true) { - let result = 'function' + (this.name ? ' ' + this.name : '') + - `() range=${this.start}-${this.end}`; - if (details) result += ` script=${this.script ? this.script.id : 'X'}`; - return result; - } -} - - -// =========================================================================== - -const kTimestampFactor = 1000; -const kSecondsToMillis = 1000; - -function toTimestamp(microseconds) { - return microseconds / kTimestampFactor -} - -function startOf(timestamp, time) { - let result = toTimestamp(timestamp) - time; - if (result < 0) throw "start timestamp cannnot be negative"; - return result; -} - - -class ParseProcessor extends LogReader { - constructor() { - super(); - this.dispatchTable_ = { - // Avoid accidental leaking of __proto__ properties and force this object - // to be in dictionary-mode. - __proto__: null, - // "function",{event type}, - // {script id},{start position},{end position},{time},{timestamp}, - // {function name} - 'function': { - parsers: [ - parseString, parseInt, parseInt, parseInt, parseFloat, parseInt, - parseString - ], - processor: this.processFunctionEvent - }, - // "compilation-cache","hit"|"put",{type},{scriptid},{start position}, - // {end position},{timestamp} - 'compilation-cache': { - parsers: - [parseString, parseString, parseInt, parseInt, parseInt, parseInt], - processor: this.processCompilationCacheEvent - }, - 'script': { - parsers: [parseString, parseInt, parseInt], - processor: this.processScriptEvent - }, - // "script-details", {script_id}, {file}, {line}, {column}, {size} - 'script-details': { - parsers: [parseInt, parseString, parseInt, parseInt, parseInt], - processor: this.processScriptDetails - }, - 'script-source': { - parsers: [parseInt, parseString, parseString], - processor: this.processScriptSource - }, - }; - this.functionEventDispatchTable_ = { - // Avoid accidental leaking of __proto__ properties and force this object - // to be in dictionary-mode. - __proto__: null, - 'full-parse': this.processFull.bind(this), - 'parse-function': this.processParseFunction.bind(this), - // TODO(cbruni): make sure arrow functions emit a normal parse-function - // event. - 'parse': this.processParseFunction.bind(this), - 'parse-script': this.processParseScript.bind(this), - 'parse-eval': this.processParseEval.bind(this), - 'preparse-no-resolution': this.processPreparseNoResolution.bind(this), - 'preparse-resolution': this.processPreparseResolution.bind(this), - 'first-execution': this.processFirstExecution.bind(this), - 'compile-lazy': this.processCompileLazy.bind(this), - 'compile': this.processCompile.bind(this), - 'compile-eval': this.processCompileEval.bind(this), - 'optimize-lazy': this.processOptimizeLazy.bind(this), - 'deserialize': this.processDeserialize.bind(this), - }; - - this.idToScript = new Map(); - this.fileToScript = new Map(); - this.nameToFunction = new Map(); - this.scripts = []; - this.totalScript = new TotalScript(); - this.firstEventTimestamp = -1; - this.lastParseEventTimestamp = -1; - this.lastEventTimestamp = -1; - } - - print() { - console.log("scripts:"); - this.idToScript.forEach(script => script.print()); - } - - processString(string) { - let end = string.length; - let current = 0; - let next = 0; - let line; - let i = 0; - let entry; - while (current < end) { - next = string.indexOf("\n", current); - if (next === -1) break; - i++; - line = string.substring(current, next); - current = next + 1; - this.processLogLine(line); - } - this.postProcess(); - } - - processLogFile(fileName) { - this.collectEntries = true - this.lastLogFileName_ = fileName; - var line; - while (line = readline()) { - this.processLogLine(line); - } - this.postProcess(); - } - - postProcess() { - this.scripts = Array.from(this.idToScript.values()) - .filter(each => !each.isNative); - - this.scripts.forEach(script => { - script.finalize(); - script.calculateMetrics(false) - }); - - this.scripts.forEach(script => this.totalScript.addAllFunktions(script)); - this.totalScript.calculateMetrics(true); - - this.firstEventTimestamp = this.totalScript.timestampMin( - this.scripts.map(each => each.firstEventTimestamp)); - this.lastParseEventTimestamp = this.totalScript.timestampMax( - this.scripts.map(each => each.lastParseEventTimestamp)); - this.lastEventTimestamp = this.totalScript.timestampMax( - this.scripts.map(each => each.lastEventTimestamp)); - - const series = { - firstParseEvent: 'Any Parse Event', - parse: 'Parsing', - preparse: 'Preparsing', - resolution: 'Preparsing with Var. Resolution', - lazyCompile: 'Lazy Compilation', - compile: 'Eager Compilation', - execution: 'First Execution', - }; - let metrics = Object.keys(series); - this.totalScript.getAccumulatedTimeMetrics( - metrics, 0, this.lastEventTimestamp, 10); - } - - processFunctionEvent( - eventName, scriptId, startPosition, endPosition, duration, timestamp, - functionName) { - let handlerFn = this.functionEventDispatchTable_[eventName]; - if (handlerFn === undefined) { - console.error('Couldn\'t find handler for function event:' + eventName); - } - handlerFn( - scriptId, startPosition, endPosition, duration, timestamp, - functionName); - } - - addEntry(entry) { - this.entries.push(entry); - } - - lookupScript(id) { - return this.idToScript.get(id); - } - - getOrCreateFunction( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - if (scriptId == -1) { - return this.lookupFunktionByRange(startPosition, endPosition); - } - let script = this.lookupScript(scriptId); - let funktion = script.getFunktionAtStartPosition(startPosition); - if (funktion === void 0) { - funktion = new Funktion(functionName, startPosition, endPosition, script); - } - return funktion; - } - - // Iterates over all functions and tries to find matching ones. - lookupFunktionsByRange(start, end) { - let results = []; - this.idToScript.forEach(script => { - script.forEach(funktion => { - if (funktion.startPostion == start && funktion.endPosition == end) { - results.push(funktion); - } - }); - }); - return results; - } - lookupFunktionByRange(start, end) { - let results = this.lookupFunktionsByRange(start, end); - if (results.length != 1) throw "Could not find unique function by range"; - return results[0]; - } - - processScriptEvent(eventName, scriptId, timestamp) { - let script = this.idToScript.get(scriptId); - switch (eventName) { - case 'create': - case 'reserve-id': - case 'deserialize': { - if (script !== undefined) return; - script = new Script(scriptId); - this.idToScript.set(scriptId, script); - if (eventName == 'deserialize') { - script.deserializationTimestamp = toTimestamp(timestamp); - } - return; - } - case 'background-compile': - if (script.isBackgroundCompiled) { - throw 'Cannot background-compile twice'; - } - script.isBackgroundCompiled = true; - // TODO(cbruni): remove once backwards compatibility is no longer needed. - script.isStreamingCompiled = true; - // TODO(cbruni): fix parse events for background compilation scripts - script.preparseTimestamp = toTimestamp(timestamp); - return; - case 'streaming-compile': - if (script.isStreamingCompiled) throw 'Cannot stream-compile twice'; - // TODO(cbruni): remove once backwards compatibility is no longer needed. - script.isBackgroundCompiled = true; - script.isStreamingCompiled = true; - // TODO(cbruni): fix parse events for background compilation scripts - script.preparseTimestamp = toTimestamp(timestamp); - return; - default: - console.error('Unhandled script event: ' + eventName); - } - } - - processScriptDetails(scriptId, file, startLine, startColumn, size) { - let script = this.lookupScript(scriptId); - script.setFile(file); - } - - processScriptSource(scriptId, url, source) { - let script = this.lookupScript(scriptId); - script.source = source; - } - - processParseEval( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - if (startPosition != 0 && startPosition != -1) { - console.error('Invalid start position for parse-eval', arguments); - } - let script = this.processParseScript(...arguments); - script.isEval = true; - } - - processFull( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - if (startPosition == 0) { - // This should only happen for eval. - let script = this.lookupScript(scriptId); - script.isEval = true; - return; - } - let funktion = this.getOrCreateFunction(...arguments); - // TODO(cbruni): this should never happen, emit differen event from the - // parser. - if (funktion.parseTimestamp > 0) return; - funktion.parseTimestamp = startOf(timestamp, duration); - funktion.parseDuration = duration; - } - - processParseFunction( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - let funktion = this.getOrCreateFunction(...arguments); - funktion.parseTimestamp = startOf(timestamp, duration); - funktion.parseDuration = duration; - } - - processParseScript( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - // TODO timestamp and duration - let script = this.lookupScript(scriptId); - let ts = startOf(timestamp, duration); - script.parseTimestamp = ts; - script.parseDuration = duration; - return script; - } - - processPreparseResolution( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - let funktion = this.getOrCreateFunction(...arguments); - // TODO(cbruni): this should never happen, emit different event from the - // parser. - if (funktion.resolutionTimestamp > 0) return; - funktion.resolutionTimestamp = startOf(timestamp, duration); - funktion.resolutionDuration = duration; - } - - processPreparseNoResolution( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - let funktion = this.getOrCreateFunction(...arguments); - funktion.preparseTimestamp = startOf(timestamp, duration); - funktion.preparseDuration = duration; - } - - processFirstExecution( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - let script = this.lookupScript(scriptId); - if (startPosition === 0) { - // undefined = eval fn execution - if (script) { - script.executionTimestamp = toTimestamp(timestamp); - } - } else { - let funktion = script.getFunktionAtStartPosition(startPosition); - if (funktion) { - funktion.executionTimestamp = toTimestamp(timestamp); - } else { - // TODO(cbruni): handle funktions from compilation-cache hits. - } - } - } - - processCompileLazy( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - let funktion = this.getOrCreateFunction(...arguments); - funktion.lazyCompileTimestamp = startOf(timestamp, duration); - funktion.lazyCompileDuration = duration; - } - - processCompile( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - let script = this.lookupScript(scriptId); - if (startPosition === 0) { - script.compileTimestamp = startOf(timestamp, duration); - script.compileDuration = duration; - script.bytesTotal = endPosition; - return script; - } else { - let funktion = script.getFunktionAtStartPosition(startPosition); - if (funktion === undefined) { - // This should not happen since any funktion has to be parsed first. - console.error('processCompile funktion not found', ...arguments); - return; - } - funktion.compileTimestamp = startOf(timestamp, duration); - funktion.compileDuration = duration; - return funktion; - } - } - - processCompileEval( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - let compilationUnit = this.processCompile(...arguments); - compilationUnit.isEval = true; - } - - processOptimizeLazy( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - let compilationUnit = this.lookupScript(scriptId); - if (startPosition > 0) { - compilationUnit = - compilationUnit.getFunktionAtStartPosition(startPosition); - if (compilationUnit === undefined) { - // This should not happen since any funktion has to be parsed first. - console.error('processOptimizeLazy funktion not found', ...arguments); - return; - } - } - compilationUnit.optimizationTimestamp = startOf(timestamp, duration); - compilationUnit.optimizationDuration = duration; - } - - processDeserialize( - scriptId, startPosition, endPosition, duration, timestamp, functionName) { - let compilationUnit = this.lookupScript(scriptId); - if (startPosition === 0) { - compilationUnit.bytesTotal = endPosition; - } else { - compilationUnit = this.getOrCreateFunction(...arguments); - } - compilationUnit.deserializationTimestamp = startOf(timestamp, duration); - compilationUnit.deserializationDuration = duration; - } - - processCompilationCacheEvent( - eventType, cacheType, scriptId, startPosition, endPosition, timestamp) { - if (eventType !== 'hit') return; - let compilationUnit = this.lookupScript(scriptId); - if (startPosition > 0) { - compilationUnit = - compilationUnit.getFunktionAtStartPosition(startPosition); - } - compilationUnit.addCompilationCacheHit(toTimestamp(timestamp)); - } - -} - - -class ArgumentsProcessor extends BaseArgumentsProcessor { - getArgsDispatch() { - return {}; - } - - getDefaultResults() { - return { - logFileName: 'v8.log', - range: 'auto,auto', - }; - } -} diff --git a/deps/v8/tools/parse-processor.mjs b/deps/v8/tools/parse-processor.mjs new file mode 100644 index 00000000000000..ed010d55a4e277 --- /dev/null +++ b/deps/v8/tools/parse-processor.mjs @@ -0,0 +1,1146 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +"use strict"; + +import { LogReader, parseString } from "./logreader.mjs"; +import { BaseArgumentsProcessor } from "./arguments.mjs"; + +/** + * A thin wrapper around shell's 'read' function showing a file name on error. + */ +export function readFile(fileName) { + try { + return read(fileName); + } catch (e) { + console.log(fileName + ': ' + (e.message || e)); + throw e; + } +} + +// =========================================================================== + +// This is the only true formatting, why? For an international audience the +// confusion between the decimal and thousands separator is big (alternating +// between comma "," vs dot "."). The Swiss formatting uses "'" as a thousands +// separator, dropping most of that confusion. +const numberFormat = new Intl.NumberFormat('de-CH', { + maximumFractionDigits: 2, + minimumFractionDigits: 2, +}); + +function formatNumber(value) { + return numberFormat.format(value); +} + +function BYTES(bytes, total) { + let units = ['B ', 'kB', 'mB', 'gB']; + let unitIndex = 0; + let value = bytes; + while (value > 1000 && unitIndex < units.length) { + value /= 1000; + unitIndex++; + } + let result = formatNumber(value).padStart(10) + ' ' + units[unitIndex]; + if (total !== void 0 && total != 0) { + result += PERCENT(bytes, total).padStart(5); + } + return result; +} + +function PERCENT(value, total) { + return Math.round(value / total * 100) + "%"; +} + +// =========================================================================== +const kNoTimeMetrics = { + __proto__: null, + executionDuration: 0, + firstEventTimestamp: 0, + firstParseEventTimestamp: 0, + lastParseEventTimestamp: 0, + lastEventTimestamp: 0 +}; + +class CompilationUnit { + constructor() { + this.isEval = false; + + // Lazily computed properties. + this.firstEventTimestamp = -1; + this.firstParseEventTimestamp = -1; + this.firstCompileEventTimestamp = -1; + this.lastParseEventTimestamp = -1; + this.lastEventTimestamp = -1; + this.deserializationTimestamp = -1; + + this.preparseTimestamp = -1; + this.parseTimestamp = -1; + this.parse2Timestamp = -1; + this.resolutionTimestamp = -1; + this.compileTimestamp = -1; + this.lazyCompileTimestamp = -1; + this.executionTimestamp = -1; + this.optimizationTimestamp = -1; + + this.deserializationDuration = -0.0; + this.preparseDuration = -0.0; + this.parseDuration = -0.0; + this.parse2Duration = -0.0; + this.resolutionDuration = -0.0; + this.scopeResolutionDuration = -0.0; + this.lazyCompileDuration = -0.0; + this.compileDuration = -0.0; + this.optimizeDuration = -0.0; + + this.ownBytes = -1; + this.compilationCacheHits = []; + } + + finalize() { + this.firstEventTimestamp = this.timestampMin( + this.deserializationTimestamp, this.parseTimestamp, + this.preparseTimestamp, this.resolutionTimestamp, + this.executionTimestamp); + + this.firstParseEventTimestamp = this.timestampMin( + this.deserializationTimestamp, this.parseTimestamp, + this.preparseTimestamp, this.resolutionTimestamp); + + this.firstCompileEventTimestamp = this.rawTimestampMin( + this.deserializationTimestamp, this.compileTimestamp, + this.lazyCompileTimestamp); + // Any excuted script needs to be compiled. + if (this.hasBeenExecuted() && + (this.firstCompileEventTimestamp <= 0 || + this.executionTimestamp < this.firstCompileTimestamp)) { + console.error('Compile < execution timestamp', this); + } + + if (this.ownBytes < 0) console.error(this, 'Own bytes must be positive'); + } + + hasBeenExecuted() { + return this.executionTimestamp > 0; + } + + addCompilationCacheHit(timestamp) { + this.compilationCacheHits.push(timestamp); + } + + // Returns the smallest timestamp from the given list, ignoring + // uninitialized (-1) values. + rawTimestampMin(...timestamps) { + timestamps = timestamps.length == 1 ? timestamps[0] : timestamps; + let result = timestamps.reduce((min, item) => { + return item == -1 ? min : (min == -1 ? item : Math.min(item, item)); + }, -1); + return result; + } + timestampMin(...timestamps) { + let result = this.rawTimestampMin(...timestamps); + if (Number.isNaN(result) || result < 0) { + console.error( + 'Invalid timestamp min:', {result, timestamps, script: this}); + return 0; + } + return result; + } + + timestampMax(...timestamps) { + timestamps = timestamps.length == 1 ? timestamps[0] : timestamps; + let result = Math.max(...timestamps); + if (Number.isNaN(result) || result < 0) { + console.error( + 'Invalid timestamp max:', {result, timestamps, script: this}); + return 0; + } + return result; + } +} + +// =========================================================================== +class Script extends CompilationUnit { + constructor(id) { + super(); + if (id === void 0 || id <= 0) { + throw new Error(`Invalid id=${id} for script`); + } + this.file = ''; + this.id = id; + + this.isNative = false; + this.isBackgroundCompiled = false; + this.isStreamingCompiled = false; + + this.funktions = []; + this.metrics = new Map(); + this.maxNestingLevel = 0; + + this.width = 0; + this.bytesTotal = -1; + this.finalized = false; + this.summary = ''; + this.source = ''; + } + + setFile(name) { + this.file = name; + this.isNative = name.startsWith('native '); + } + + isEmpty() { + return this.funktions.length === 0; + } + + getFunktionAtStartPosition(start) { + if (!this.isEval && start === 0) { + throw 'position 0 is reserved for the script'; + } + if (this.finalized) { + return this.funktions.find(funktion => funktion.start == start); + } + return this.funktions[start]; + } + + // Return the innermost function at the given source position. + getFunktionForPosition(position) { + if (!this.finalized) throw 'Incomplete script'; + for (let i = this.funktions.length - 1; i >= 0; i--) { + let funktion = this.funktions[i]; + if (funktion.containsPosition(position)) return funktion; + } + return undefined; + } + + addMissingFunktions(list) { + if (this.finalized) throw 'script is finalized!'; + list.forEach(fn => { + if (this.funktions[fn.start] === void 0) { + this.addFunktion(fn); + } + }); + } + + addFunktion(fn) { + if (this.finalized) throw 'script is finalized!'; + if (fn.start === void 0) throw "Funktion has no start position"; + if (this.funktions[fn.start] !== void 0) { + fn.print(); + throw "adding same function twice to script"; + } + this.funktions[fn.start] = fn; + } + + finalize() { + this.finalized = true; + // Compact funktions as we no longer need access via start byte position. + this.funktions = this.funktions.filter(each => true); + let parent = null; + let maxNesting = 0; + // Iterate over the Funktions in byte position order. + this.funktions.forEach(fn => { + fn.isEval = this.isEval; + if (parent === null) { + parent = fn; + } else { + // Walk up the nested chain of Funktions to find the parent. + while (parent !== null && !fn.isNestedIn(parent)) { + parent = parent.parent; + } + fn.parent = parent; + if (parent) { + maxNesting = Math.max(maxNesting, parent.addNestedFunktion(fn)); + } + parent = fn; + } + }); + // Sanity checks to ensure that scripts are executed and parsed before any + // of its funktions. + let funktionFirstParseEventTimestamp = -1; + // Second iteration step to finalize the funktions once the proper + // hierarchy has been set up. + this.funktions.forEach(fn => { + fn.finalize(); + + funktionFirstParseEventTimestamp = this.timestampMin( + funktionFirstParseEventTimestamp, fn.firstParseEventTimestamp); + + this.lastParseEventTimestamp = this.timestampMax( + this.lastParseEventTimestamp, fn.lastParseEventTimestamp); + + this.lastEventTimestamp = + this.timestampMax(this.lastEventTimestamp, fn.lastEventTimestamp); + }); + this.maxNestingLevel = maxNesting; + + // Initialize sizes. + if (!this.ownBytes === -1) throw 'Invalid state'; + if (this.funktions.length == 0) { + this.bytesTotal = this.ownBytes = 0; + return; + } + let toplevelFunktionBytes = this.funktions.reduce( + (bytes, each) => bytes + (each.isToplevel() ? each.getBytes() : 0), 0); + if (this.isDeserialized || this.isEval || this.isStreamingCompiled) { + if (this.getBytes() === -1) { + this.bytesTotal = toplevelFunktionBytes; + } + } + this.ownBytes = this.bytesTotal - toplevelFunktionBytes; + // Initialize common properties. + super.finalize(); + // Sanity checks after the minimum timestamps have been computed. + if (funktionFirstParseEventTimestamp < this.firstParseEventTimestamp) { + console.error( + 'invalid firstCompileEventTimestamp', this, + funktionFirstParseEventTimestamp, this.firstParseEventTimestamp); + } + } + + print() { + console.log(this.toString()); + } + + toString() { + let str = `SCRIPT id=${this.id} file=${this.file}\n` + + `functions[${this.funktions.length}]:`; + this.funktions.forEach(fn => str += fn.toString()); + return str; + } + + getBytes() { + return this.bytesTotal; + } + + getOwnBytes() { + return this.ownBytes; + } + + // Also see Funktion.prototype.getMetricBytes + getMetricBytes(name) { + if (name == 'lazyCompileTimestamp') return this.getOwnBytes(); + return this.getOwnBytes(); + } + + getMetricDuration(name) { + return this[name]; + } + + forEach(fn) { + fn(this); + this.funktions.forEach(fn); + } + + // Container helper for TotalScript / Script. + getScripts() { + return [this]; + } + + calculateMetrics(printSummary) { + let log = (str) => this.summary += str + '\n'; + log("SCRIPT: " + this.id); + let all = this.funktions; + if (all.length === 0) return; + + let nofFunktions = all.length; + let ownBytesSum = list => { + return list.reduce((bytes, each) => bytes + each.getOwnBytes(), 0) + }; + + let info = (name, funktions) => { + let ownBytes = ownBytesSum(funktions); + let nofPercent = Math.round(funktions.length / nofFunktions * 100); + let value = (funktions.length + "").padStart(6) + + (nofPercent + "%").padStart(5) + + BYTES(ownBytes, this.bytesTotal).padStart(10); + log((" - " + name).padEnd(20) + value); + this.metrics.set(name + "-bytes", ownBytes); + this.metrics.set(name + "-count", funktions.length); + this.metrics.set(name + "-count-percent", nofPercent); + this.metrics.set(name + "-bytes-percent", + Math.round(ownBytes / this.bytesTotal * 100)); + }; + + log(" - file: " + this.file); + log(' - details: ' + + 'isEval=' + this.isEval + ' deserialized=' + this.isDeserialized + + ' streamed=' + this.isStreamingCompiled); + info("scripts", this.getScripts()); + info("functions", all); + info("toplevel fn", all.filter(each => each.isToplevel())); + info('preparsed', all.filter(each => each.preparseDuration > 0)); + + info('fully parsed', all.filter(each => each.parseDuration > 0)); + // info("fn parsed", all.filter(each => each.parse2Duration > 0)); + // info("resolved", all.filter(each => each.resolutionDuration > 0)); + info("executed", all.filter(each => each.executionTimestamp > 0)); + info('forEval', all.filter(each => each.isEval)); + info("lazy compiled", all.filter(each => each.lazyCompileTimestamp > 0)); + info("eager compiled", all.filter(each => each.compileTimestamp > 0)); + + let parsingCost = + new ExecutionCost('parse', all, each => each.parseDuration); + parsingCost.setMetrics(this.metrics); + log(parsingCost.toString()); + + let preParsingCost = + new ExecutionCost('preparse', all, each => each.preparseDuration); + preParsingCost.setMetrics(this.metrics); + log(preParsingCost.toString()); + + let resolutionCost = + new ExecutionCost('resolution', all, each => each.resolutionDuration); + resolutionCost.setMetrics(this.metrics); + log(resolutionCost.toString()); + + let nesting = new NestingDistribution(all); + nesting.setMetrics(this.metrics); + log(nesting.toString()); + + if (printSummary) console.log(this.summary); + } + + getAccumulatedTimeMetrics( + metrics, start, end, delta, cumulative = true, useDuration = false) { + // Returns an array of the following format: + // [ [start, acc(metric0, start, start), acc(metric1, ...), ...], + // [start+delta, acc(metric0, start, start+delta), ...], + // [start+delta*2, acc(metric0, start, start+delta*2), ...], + // ... + // ] + if (end <= start) throw 'Invalid ranges [' + start + ',' + end + ']'; + const timespan = end - start; + const kSteps = Math.ceil(timespan / delta); + // To reduce the time spent iterating over the funktions of this script + // we iterate once over all funktions and add the metric changes to each + // timepoint: + // [ [0, 300, ...], [1, 15, ...], [2, 100, ...], [3, 0, ...] ... ] + // In a second step we accumulate all values: + // [ [0, 300, ...], [1, 315, ...], [2, 415, ...], [3, 415, ...] ... ] + // + // To limit the number of data points required in the resulting graphs, + // only the rows for entries with actual changes are created. + + const metricProperties = ["time"]; + metrics.forEach(each => { + metricProperties.push(each + 'Timestamp'); + if (useDuration) metricProperties.push(each + 'Duration'); + }); + // Create a packed {rowTemplate} which is copied later-on. + let indexToTime = (t) => (start + t * delta) / kSecondsToMillis; + let rowTemplate = [indexToTime(0)]; + for (let i = 1; i < metricProperties.length; i++) rowTemplate.push(0.0); + // Create rows with 0-time entry. + let rows = new Array(rowTemplate.slice()); + for (let t = 1; t <= kSteps; t++) rows.push(null); + // Create the real metric's property name on the Funktion object. + // Add the increments of each Funktion's metric to the result. + this.forEach(funktionOrScript => { + // Iterate over the Funktion's metric names, skipping position 0 which + // is the time. + const kMetricIncrement = useDuration ? 2 : 1; + for (let i = 1; i < metricProperties.length; i += kMetricIncrement) { + let timestampPropertyName = metricProperties[i]; + let timestamp = funktionOrScript[timestampPropertyName]; + if (timestamp === void 0) continue; + if (timestamp < start || end < timestamp) continue; + timestamp -= start; + let index = Math.floor(timestamp / delta); + let row = rows[index]; + if (row === null) { + // Add a new row if it didn't exist, + row = rows[index] = rowTemplate.slice(); + // .. add the time offset. + row[0] = indexToTime(index); + } + // Add the metric value. + row[i] += funktionOrScript.getMetricBytes(timestampPropertyName); + if (!useDuration) continue; + let durationPropertyName = metricProperties[i + 1]; + row[i + 1] += funktionOrScript.getMetricDuration(durationPropertyName); + } + }); + // Create a packed array again with only the valid entries. + // Accumulate the incremental results by adding the metric values from + // the previous time window. + let previous = rows[0]; + let result = [previous]; + for (let t = 1; t < rows.length; t++) { + let current = rows[t]; + if (current === null) { + // Ensure a zero data-point after each non-zero point. + if (!cumulative && rows[t - 1] !== null) { + let duplicate = rowTemplate.slice(); + duplicate[0] = indexToTime(t); + result.push(duplicate); + } + continue; + } + if (cumulative) { + // Skip i==0 where the corresponding time value in seconds is. + for (let i = 1; i < metricProperties.length; i++) { + current[i] += previous[i]; + } + } + // Make sure we have a data-point in time right before the current one. + if (rows[t - 1] === null) { + let duplicate = (!cumulative ? rowTemplate : previous).slice(); + duplicate[0] = indexToTime(t - 1); + result.push(duplicate); + } + previous = current; + result.push(current); + } + // Make sure there is an entry at the last position to make sure all graphs + // have the same width. + const lastIndex = rows.length - 1; + if (rows[lastIndex] === null) { + let duplicate = previous.slice(); + duplicate[0] = indexToTime(lastIndex); + result.push(duplicate); + } + return result; + } + + getFunktionsAtTime(time, delta, metric) { + // Returns a list of Funktions whose metric changed in the + // [time-delta, time+delta] range. + return this.funktions.filter( + funktion => funktion.didMetricChange(time, delta, metric)); + return result; + } +} + + +class TotalScript extends Script { + constructor() { + super('all files', 'all files'); + this.scripts = []; + } + + addAllFunktions(script) { + // funktions is indexed by byte offset and as such not packed. Add every + // Funktion one by one to keep this.funktions packed. + script.funktions.forEach(fn => this.funktions.push(fn)); + this.scripts.push(script); + this.bytesTotal += script.bytesTotal; + } + + // Iterate over all Scripts and nested Funktions. + forEach(fn) { + this.scripts.forEach(script => script.forEach(fn)); + } + + getScripts() { + return this.scripts; + } +} + + +// =========================================================================== + +class NestingDistribution { + constructor(funktions) { + // Stores the nof bytes per function nesting level. + this.accumulator = [0, 0, 0, 0, 0]; + // Max nof bytes encountered at any nesting level. + this.max = 0; + // avg bytes per nesting level. + this.avg = 0; + this.totalBytes = 0; + + funktions.forEach(each => each.accumulateNestingLevel(this.accumulator)); + this.max = this.accumulator.reduce((max, each) => Math.max(max, each), 0); + this.totalBytes = this.accumulator.reduce((sum, each) => sum + each, 0); + for (let i = 0; i < this.accumulator.length; i++) { + this.avg += this.accumulator[i] * i; + } + this.avg /= this.totalBytes; + } + + print() { + console.log(this.toString()) + } + + toString() { + let ticks = " ▁▂▃▄▅▆▇█"; + let accString = this.accumulator.reduce((str, each) => { + let index = Math.round(each / this.max * (ticks.length - 1)); + return str + ticks[index]; + }, ''); + let percent0 = this.accumulator[0] + let percent1 = this.accumulator[1]; + let percent2plus = this.accumulator.slice(2) + .reduce((sum, each) => sum + each, 0); + return " - nesting level: " + + ' avg=' + formatNumber(this.avg) + + ' l0=' + PERCENT(percent0, this.totalBytes) + + ' l1=' + PERCENT(percent1, this.totalBytes) + + ' l2+=' + PERCENT(percent2plus, this.totalBytes) + + ' distribution=[' + accString + ']'; + + } + + setMetrics(dict) {} +} + +class ExecutionCost { + constructor(prefix, funktions, time_fn) { + this.prefix = prefix; + // Time spent on executed functions. + this.executedCost = 0 + // Time spent on not executed functions. + this.nonExecutedCost = 0; + + this.executedCost = funktions.reduce((sum, each) => { + return sum + (each.hasBeenExecuted() ? time_fn(each) : 0) + }, 0); + this.nonExecutedCost = funktions.reduce((sum, each) => { + return sum + (each.hasBeenExecuted() ? 0 : time_fn(each)) + }, 0); + + } + + print() { + console.log(this.toString()) + } + + toString() { + return (' - ' + this.prefix + '-time:').padEnd(24) + + (" executed=" + formatNumber(this.executedCost) + 'ms').padEnd(20) + + " non-executed=" + formatNumber(this.nonExecutedCost) + 'ms'; + } + + setMetrics(dict) { + dict.set('parseMetric', this.executionCost); + dict.set('parseMetricNegative', this.nonExecutionCost); + } +} + +// =========================================================================== + +class Funktion extends CompilationUnit { + constructor(name, start, end, script) { + super(); + if (start < 0) throw "invalid start position: " + start; + if (script.isEval) { + if (end < start) throw 'invalid start end positions'; + } else { + if (end <= 0) throw 'invalid end position: ' + end; + if (end <= start) throw 'invalid start end positions'; + } + + this.name = name; + this.start = start; + this.end = end; + this.script = script; + this.parent = null; + this.nested = []; + this.nestingLevel = 0; + + if (script) this.script.addFunktion(this); + } + + finalize() { + this.lastParseEventTimestamp = Math.max( + this.preparseTimestamp + this.preparseDuration, + this.parseTimestamp + this.parseDuration, + this.resolutionTimestamp + this.resolutionDuration); + if (!(this.lastParseEventTimestamp > 0)) this.lastParseEventTimestamp = 0; + + this.lastEventTimestamp = + Math.max(this.lastParseEventTimestamp, this.executionTimestamp); + if (!(this.lastEventTimestamp > 0)) this.lastEventTimestamp = 0; + + this.ownBytes = this.nested.reduce( + (bytes, each) => bytes - each.getBytes(), this.getBytes()); + + super.finalize(); + } + + getMetricBytes(name) { + if (name == 'lazyCompileTimestamp') return this.getOwnBytes(); + return this.getOwnBytes(); + } + + getMetricDuration(name) { + if (name in kNoTimeMetrics) return 0; + return this[name]; + } + + isNestedIn(funktion) { + if (this.script != funktion.script) throw "Incompatible script"; + return funktion.start < this.start && this.end <= funktion.end; + } + + isToplevel() { + return this.parent === null; + } + + containsPosition(position) { + return this.start <= position && position <= this.end; + } + + accumulateNestingLevel(accumulator) { + let value = accumulator[this.nestingLevel] || 0; + accumulator[this.nestingLevel] = value + this.getOwnBytes(); + } + + addNestedFunktion(child) { + if (this.script != child.script) throw "Incompatible script"; + if (child == null) throw "Nesting non child"; + this.nested.push(child); + if (this.nested.length > 1) { + // Make sure the nested children don't overlap and have been inserted in + // byte start position order. + let last = this.nested[this.nested.length - 2]; + if (last.end > child.start || last.start > child.start || + last.end > child.end || last.start > child.end) { + throw "Wrongly nested child added"; + } + } + child.nestingLevel = this.nestingLevel + 1; + return child.nestingLevel; + } + + getBytes() { + return this.end - this.start; + } + + getOwnBytes() { + return this.ownBytes; + } + + didMetricChange(time, delta, name) { + let value = this[name + 'Timestamp']; + return (time - delta) <= value && value <= (time + delta); + } + + print() { + console.log(this.toString()); + } + + toString(details = true) { + let result = 'function' + (this.name ? ' ' + this.name : '') + + `() range=${this.start}-${this.end}`; + if (details) result += ` script=${this.script ? this.script.id : 'X'}`; + return result; + } +} + + +// =========================================================================== + +export const kTimestampFactor = 1000; +export const kSecondsToMillis = 1000; + +function toTimestamp(microseconds) { + return microseconds / kTimestampFactor +} + +function startOf(timestamp, time) { + let result = toTimestamp(timestamp) - time; + if (result < 0) throw "start timestamp cannnot be negative"; + return result; +} + + +export class ParseProcessor extends LogReader { + constructor() { + super(); + this.dispatchTable_ = { + // Avoid accidental leaking of __proto__ properties and force this object + // to be in dictionary-mode. + __proto__: null, + // "function",{event type}, + // {script id},{start position},{end position},{time},{timestamp}, + // {function name} + 'function': { + parsers: [ + parseString, parseInt, parseInt, parseInt, parseFloat, parseInt, + parseString + ], + processor: this.processFunctionEvent + }, + // "compilation-cache","hit"|"put",{type},{scriptid},{start position}, + // {end position},{timestamp} + 'compilation-cache': { + parsers: + [parseString, parseString, parseInt, parseInt, parseInt, parseInt], + processor: this.processCompilationCacheEvent + }, + 'script': { + parsers: [parseString, parseInt, parseInt], + processor: this.processScriptEvent + }, + // "script-details", {script_id}, {file}, {line}, {column}, {size} + 'script-details': { + parsers: [parseInt, parseString, parseInt, parseInt, parseInt], + processor: this.processScriptDetails + }, + 'script-source': { + parsers: [parseInt, parseString, parseString], + processor: this.processScriptSource + }, + }; + this.functionEventDispatchTable_ = { + // Avoid accidental leaking of __proto__ properties and force this object + // to be in dictionary-mode. + __proto__: null, + 'full-parse': this.processFull.bind(this), + 'parse-function': this.processParseFunction.bind(this), + // TODO(cbruni): make sure arrow functions emit a normal parse-function + // event. + 'parse': this.processParseFunction.bind(this), + 'parse-script': this.processParseScript.bind(this), + 'parse-eval': this.processParseEval.bind(this), + 'preparse-no-resolution': this.processPreparseNoResolution.bind(this), + 'preparse-resolution': this.processPreparseResolution.bind(this), + 'first-execution': this.processFirstExecution.bind(this), + 'compile-lazy': this.processCompileLazy.bind(this), + 'compile': this.processCompile.bind(this), + 'compile-eval': this.processCompileEval.bind(this), + 'optimize-lazy': this.processOptimizeLazy.bind(this), + 'deserialize': this.processDeserialize.bind(this), + }; + + this.idToScript = new Map(); + this.fileToScript = new Map(); + this.nameToFunction = new Map(); + this.scripts = []; + this.totalScript = new TotalScript(); + this.firstEventTimestamp = -1; + this.lastParseEventTimestamp = -1; + this.lastEventTimestamp = -1; + } + + print() { + console.log("scripts:"); + this.idToScript.forEach(script => script.print()); + } + + processString(string) { + let end = string.length; + let current = 0; + let next = 0; + let line; + let i = 0; + let entry; + while (current < end) { + next = string.indexOf("\n", current); + if (next === -1) break; + i++; + line = string.substring(current, next); + current = next + 1; + this.processLogLine(line); + } + this.postProcess(); + } + + processLogFile(fileName) { + this.collectEntries = true + this.lastLogFileName_ = fileName; + var line; + while (line = readline()) { + this.processLogLine(line); + } + this.postProcess(); + } + + postProcess() { + this.scripts = Array.from(this.idToScript.values()) + .filter(each => !each.isNative); + + this.scripts.forEach(script => { + script.finalize(); + script.calculateMetrics(false) + }); + + this.scripts.forEach(script => this.totalScript.addAllFunktions(script)); + this.totalScript.calculateMetrics(true); + + this.firstEventTimestamp = this.totalScript.timestampMin( + this.scripts.map(each => each.firstEventTimestamp)); + this.lastParseEventTimestamp = this.totalScript.timestampMax( + this.scripts.map(each => each.lastParseEventTimestamp)); + this.lastEventTimestamp = this.totalScript.timestampMax( + this.scripts.map(each => each.lastEventTimestamp)); + + const series = { + firstParseEvent: 'Any Parse Event', + parse: 'Parsing', + preparse: 'Preparsing', + resolution: 'Preparsing with Var. Resolution', + lazyCompile: 'Lazy Compilation', + compile: 'Eager Compilation', + execution: 'First Execution', + }; + let metrics = Object.keys(series); + this.totalScript.getAccumulatedTimeMetrics( + metrics, 0, this.lastEventTimestamp, 10); + } + + processFunctionEvent( + eventName, scriptId, startPosition, endPosition, duration, timestamp, + functionName) { + let handlerFn = this.functionEventDispatchTable_[eventName]; + if (handlerFn === undefined) { + console.error('Couldn\'t find handler for function event:' + eventName); + } + handlerFn( + scriptId, startPosition, endPosition, duration, timestamp, + functionName); + } + + addEntry(entry) { + this.entries.push(entry); + } + + lookupScript(id) { + return this.idToScript.get(id); + } + + getOrCreateFunction( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + if (scriptId == -1) { + return this.lookupFunktionByRange(startPosition, endPosition); + } + let script = this.lookupScript(scriptId); + let funktion = script.getFunktionAtStartPosition(startPosition); + if (funktion === void 0) { + funktion = new Funktion(functionName, startPosition, endPosition, script); + } + return funktion; + } + + // Iterates over all functions and tries to find matching ones. + lookupFunktionsByRange(start, end) { + let results = []; + this.idToScript.forEach(script => { + script.forEach(funktion => { + if (funktion.startPostion == start && funktion.endPosition == end) { + results.push(funktion); + } + }); + }); + return results; + } + lookupFunktionByRange(start, end) { + let results = this.lookupFunktionsByRange(start, end); + if (results.length != 1) throw "Could not find unique function by range"; + return results[0]; + } + + processScriptEvent(eventName, scriptId, timestamp) { + let script = this.idToScript.get(scriptId); + switch (eventName) { + case 'create': + case 'reserve-id': + case 'deserialize': { + if (script !== undefined) return; + script = new Script(scriptId); + this.idToScript.set(scriptId, script); + if (eventName == 'deserialize') { + script.deserializationTimestamp = toTimestamp(timestamp); + } + return; + } + case 'background-compile': + if (script.isBackgroundCompiled) { + throw 'Cannot background-compile twice'; + } + script.isBackgroundCompiled = true; + // TODO(cbruni): remove once backwards compatibility is no longer needed. + script.isStreamingCompiled = true; + // TODO(cbruni): fix parse events for background compilation scripts + script.preparseTimestamp = toTimestamp(timestamp); + return; + case 'streaming-compile': + if (script.isStreamingCompiled) throw 'Cannot stream-compile twice'; + // TODO(cbruni): remove once backwards compatibility is no longer needed. + script.isBackgroundCompiled = true; + script.isStreamingCompiled = true; + // TODO(cbruni): fix parse events for background compilation scripts + script.preparseTimestamp = toTimestamp(timestamp); + return; + default: + console.error('Unhandled script event: ' + eventName); + } + } + + processScriptDetails(scriptId, file, startLine, startColumn, size) { + let script = this.lookupScript(scriptId); + script.setFile(file); + } + + processScriptSource(scriptId, url, source) { + let script = this.lookupScript(scriptId); + script.source = source; + } + + processParseEval( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + if (startPosition != 0 && startPosition != -1) { + console.error('Invalid start position for parse-eval', arguments); + } + let script = this.processParseScript(...arguments); + script.isEval = true; + } + + processFull( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + if (startPosition == 0) { + // This should only happen for eval. + let script = this.lookupScript(scriptId); + script.isEval = true; + return; + } + let funktion = this.getOrCreateFunction(...arguments); + // TODO(cbruni): this should never happen, emit differen event from the + // parser. + if (funktion.parseTimestamp > 0) return; + funktion.parseTimestamp = startOf(timestamp, duration); + funktion.parseDuration = duration; + } + + processParseFunction( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + let funktion = this.getOrCreateFunction(...arguments); + funktion.parseTimestamp = startOf(timestamp, duration); + funktion.parseDuration = duration; + } + + processParseScript( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + // TODO timestamp and duration + let script = this.lookupScript(scriptId); + let ts = startOf(timestamp, duration); + script.parseTimestamp = ts; + script.parseDuration = duration; + return script; + } + + processPreparseResolution( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + let funktion = this.getOrCreateFunction(...arguments); + // TODO(cbruni): this should never happen, emit different event from the + // parser. + if (funktion.resolutionTimestamp > 0) return; + funktion.resolutionTimestamp = startOf(timestamp, duration); + funktion.resolutionDuration = duration; + } + + processPreparseNoResolution( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + let funktion = this.getOrCreateFunction(...arguments); + funktion.preparseTimestamp = startOf(timestamp, duration); + funktion.preparseDuration = duration; + } + + processFirstExecution( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + let script = this.lookupScript(scriptId); + if (startPosition === 0) { + // undefined = eval fn execution + if (script) { + script.executionTimestamp = toTimestamp(timestamp); + } + } else { + let funktion = script.getFunktionAtStartPosition(startPosition); + if (funktion) { + funktion.executionTimestamp = toTimestamp(timestamp); + } else { + // TODO(cbruni): handle funktions from compilation-cache hits. + } + } + } + + processCompileLazy( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + let funktion = this.getOrCreateFunction(...arguments); + funktion.lazyCompileTimestamp = startOf(timestamp, duration); + funktion.lazyCompileDuration = duration; + } + + processCompile( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + let script = this.lookupScript(scriptId); + if (startPosition === 0) { + script.compileTimestamp = startOf(timestamp, duration); + script.compileDuration = duration; + script.bytesTotal = endPosition; + return script; + } else { + let funktion = script.getFunktionAtStartPosition(startPosition); + if (funktion === undefined) { + // This should not happen since any funktion has to be parsed first. + console.error('processCompile funktion not found', ...arguments); + return; + } + funktion.compileTimestamp = startOf(timestamp, duration); + funktion.compileDuration = duration; + return funktion; + } + } + + processCompileEval( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + let compilationUnit = this.processCompile(...arguments); + compilationUnit.isEval = true; + } + + processOptimizeLazy( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + let compilationUnit = this.lookupScript(scriptId); + if (startPosition > 0) { + compilationUnit = + compilationUnit.getFunktionAtStartPosition(startPosition); + if (compilationUnit === undefined) { + // This should not happen since any funktion has to be parsed first. + console.error('processOptimizeLazy funktion not found', ...arguments); + return; + } + } + compilationUnit.optimizationTimestamp = startOf(timestamp, duration); + compilationUnit.optimizationDuration = duration; + } + + processDeserialize( + scriptId, startPosition, endPosition, duration, timestamp, functionName) { + let compilationUnit = this.lookupScript(scriptId); + if (startPosition === 0) { + compilationUnit.bytesTotal = endPosition; + } else { + compilationUnit = this.getOrCreateFunction(...arguments); + } + compilationUnit.deserializationTimestamp = startOf(timestamp, duration); + compilationUnit.deserializationDuration = duration; + } + + processCompilationCacheEvent( + eventType, cacheType, scriptId, startPosition, endPosition, timestamp) { + if (eventType !== 'hit') return; + let compilationUnit = this.lookupScript(scriptId); + if (startPosition > 0) { + compilationUnit = + compilationUnit.getFunktionAtStartPosition(startPosition); + } + compilationUnit.addCompilationCacheHit(toTimestamp(timestamp)); + } + +} + + +export class ArgumentsProcessor extends BaseArgumentsProcessor { + getArgsDispatch() { + return {}; + } + + getDefaultResults() { + return { + logFileName: 'v8.log', + range: 'auto,auto', + }; + } +} diff --git a/deps/v8/tools/plot-timer-events b/deps/v8/tools/plot-timer-events deleted file mode 100755 index 02176320a5cce9..00000000000000 --- a/deps/v8/tools/plot-timer-events +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh - -# find the name of the log file to process, it must not start with a dash. -log_file="v8.log" -for arg in "$@" -do - if ! expr "X${arg}" : "^X-" > /dev/null; then - log_file=${arg} - fi -done - -tools_path=`cd $(dirname "$0");pwd` -if test ! "$D8_PATH"; then - d8_public=`which d8` - if test -x "$d8_public"; then D8_PATH=$(dirname "$d8_public"); fi -fi - -if test ! -n "$D8_PATH"; then - D8_PATH=$tools_path/.. -fi - -d8_exec=$D8_PATH/d8 - -if test ! -x "$d8_exec"; then - D8_PATH=`pwd`/out/native - d8_exec=$D8_PATH/d8 -fi - -if test ! -x "$d8_exec"; then - d8_exec=`grep -m 1 -o '".*/d8"' $log_file | sed 's/"//g'` -fi - -if test ! -x "$d8_exec"; then - echo "d8 shell not found in $D8_PATH" - echo "Please provide path to d8 as env var in D8_PATH" - exit 1 -fi - - -contains=0; -for arg in "$@"; do - `echo "$arg" | grep -q "^--distortion"` - if test $? -eq 0; then - contains=1 - break - fi -done - -if test "$contains" -eq 0; then - # Try to find out how much the instrumentation overhead is. - calibration_log=calibration.log - calibration_script="for (var i = 0; i < 1000000; i++) print();" - - $d8_exec --noopt --prof --logfile $calibration_log \ - --log-timer-events -e "$calibration_script" > /dev/null - t_1_start=`grep "timer-event-start,\"V8.Execute\"" $calibration_log \ - | tail -n1 | awk -F, '{print $3}'` - t_1_end=`grep "timer-event-end,\"V8.Execute\"" $calibration_log \ - | tail -n1 | awk -F, '{print $3}'` - n_1=`grep "timer-event\|tick" $calibration_log | wc -l` - - $d8_exec --noopt --prof --logfile $calibration_log \ - --log-internal-timer-events -e "$calibration_script" > /dev/null - t_2_start=`grep "timer-event-start,\"V8.Execute\"" $calibration_log \ - | tail -n1 | awk -F, '{print $3}'` - t_2_end=`grep "timer-event-end,\"V8.Execute\"" $calibration_log \ - | tail -n1 | awk -F, '{print $3}'` - n_2=`grep "timer-event\|tick" $calibration_log | wc -l` - - rm $calibration_log - - # Overhead in picoseconds. - distortion=`echo "1000*(($t_1_end - $t_1_start) - ($t_2_end - $t_2_start)) \ - / ($n_1 - $n_2)" | bc` - options="--distortion=$distortion" -fi - -cat $log_file | - $d8_exec $tools_path/csvparser.js $tools_path/splaytree.js \ - $tools_path/codemap.js $tools_path/profile.js $tools_path/profile_view.js \ - $tools_path/logreader.js $tools_path/arguments.js \ - $tools_path/tickprocessor.js$tools_path/profviz/composer.js \ - $tools_path/profviz/stdio.js \ - -- $@ $options 2>/dev/null > timer-events.plot - -success=$? -if test $success -ne 0; then - cat timer-events.plot -else - cat timer-events.plot | gnuplot > timer-events.png -fi - -rm -f timer-events.plot diff --git a/deps/v8/tools/profile.js b/deps/v8/tools/profile.js index f8829679db0dba..50076825ad3fbc 100644 --- a/deps/v8/tools/profile.js +++ b/deps/v8/tools/profile.js @@ -25,6 +25,52 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// TODO: move to separate modules +class SourcePosition { + constructor(script, line, column) { + this.script = script; + this.line = line; + this.column = column; + this.entries = []; + } + addEntry(entry) { + this.entries.push(entry); + } +} + +class Script { + + constructor(id, name, source) { + this.id = id; + this.name = name; + this.source = source; + this.sourcePositions = []; + // Map> + this.lineToColumn = new Map(); + } + + addSourcePosition(line, column, entry) { + let sourcePosition = this.lineToColumn.get(line)?.get(column); + if (sourcePosition === undefined) { + sourcePosition = new SourcePosition(this, line, column, ) + this.#addSourcePosition(line, column, sourcePosition); + } + sourcePosition.addEntry(entry); + return sourcePosition; + } + + #addSourcePosition(line, column, sourcePosition) { + let columnToSourcePosition; + if (this.lineToColumn.has(line)) { + columnToSourcePosition = this.lineToColumn.get(line); + } else { + columnToSourcePosition = new Map(); + this.lineToColumn.set(line, columnToSourcePosition); + } + this.sourcePositions.push(sourcePosition); + columnToSourcePosition.set(column, sourcePosition); + } +} /** * Creates a profile object for processing profiling-related events @@ -38,6 +84,8 @@ function Profile() { this.bottomUpTree_ = new CallTree(); this.c_entries_ = {}; this.ticks_ = []; + this.scripts_ = []; + this.urlToScript_ = new Map(); }; @@ -47,7 +95,7 @@ function Profile() { * * @param {string} name Function name. */ -Profile.prototype.skipThisFunction = function(name) { +Profile.prototype.skipThisFunction = function (name) { return false; }; @@ -89,8 +137,8 @@ Profile.CodeState = { * during stack strace processing, specifies a position of the frame * containing the address. */ -Profile.prototype.handleUnknownCode = function( - operation, addr, opt_stackPos) { +Profile.prototype.handleUnknownCode = function ( + operation, addr, opt_stackPos) { }; @@ -101,10 +149,10 @@ Profile.prototype.handleUnknownCode = function( * @param {number} startAddr Starting address. * @param {number} endAddr Ending address. */ -Profile.prototype.addLibrary = function( - name, startAddr, endAddr) { +Profile.prototype.addLibrary = function ( + name, startAddr, endAddr) { var entry = new CodeMap.CodeEntry( - endAddr - startAddr, name, 'SHARED_LIB'); + endAddr - startAddr, name, 'SHARED_LIB'); this.codeMap_.addLibrary(startAddr, entry); return entry; }; @@ -117,10 +165,10 @@ Profile.prototype.addLibrary = function( * @param {number} startAddr Starting address. * @param {number} endAddr Ending address. */ -Profile.prototype.addStaticCode = function( - name, startAddr, endAddr) { +Profile.prototype.addStaticCode = function ( + name, startAddr, endAddr) { var entry = new CodeMap.CodeEntry( - endAddr - startAddr, name, 'CPP'); + endAddr - startAddr, name, 'CPP'); this.codeMap_.addStaticCode(startAddr, entry); return entry; }; @@ -134,8 +182,8 @@ Profile.prototype.addStaticCode = function( * @param {number} start Starting address. * @param {number} size Code entry size. */ -Profile.prototype.addCode = function( - type, name, timestamp, start, size) { +Profile.prototype.addCode = function ( + type, name, timestamp, start, size) { var entry = new Profile.DynamicCodeEntry(size, type, name); this.codeMap_.addCode(start, entry); return entry; @@ -152,8 +200,8 @@ Profile.prototype.addCode = function( * @param {number} funcAddr Shared function object address. * @param {Profile.CodeState} state Optimization state. */ -Profile.prototype.addFuncCode = function( - type, name, timestamp, start, size, funcAddr, state) { +Profile.prototype.addFuncCode = function ( + type, name, timestamp, start, size, funcAddr, state) { // As code and functions are in the same address space, // it is safe to put them in a single code map. var func = this.codeMap_.findDynamicEntryByStartAddress(funcAddr); @@ -188,7 +236,7 @@ Profile.prototype.addFuncCode = function( * @param {number} from Current code entry address. * @param {number} to New code entry address. */ -Profile.prototype.moveCode = function(from, to) { +Profile.prototype.moveCode = function (from, to) { try { this.codeMap_.moveCode(from, to); } catch (e) { @@ -196,9 +244,9 @@ Profile.prototype.moveCode = function(from, to) { } }; -Profile.prototype.deoptCode = function( - timestamp, code, inliningId, scriptOffset, bailoutType, - sourcePositionText, deoptReasonText) { +Profile.prototype.deoptCode = function ( + timestamp, code, inliningId, scriptOffset, bailoutType, + sourcePositionText, deoptReasonText) { }; /** @@ -206,7 +254,7 @@ Profile.prototype.deoptCode = function( * * @param {number} start Starting address. */ -Profile.prototype.deleteCode = function(start) { +Profile.prototype.deleteCode = function (start) { try { this.codeMap_.deleteCode(start); } catch (e) { @@ -217,17 +265,27 @@ Profile.prototype.deleteCode = function(start) { /** * Adds source positions for given code. */ -Profile.prototype.addSourcePositions = function( - start, script, startPos, endPos, sourcePositions, inliningPositions, - inlinedFunctions) { +Profile.prototype.addSourcePositions = function ( + start, script, startPos, endPos, sourcePositions, inliningPositions, + inlinedFunctions) { // CLI does not need source code => ignore. }; /** * Adds script source code. */ -Profile.prototype.addScriptSource = function(script, source) { - // CLI does not need source code => ignore. +Profile.prototype.addScriptSource = function (id, url, source) { + const script = new Script(id, url, source); + this.scripts_[id] = script; + this.urlToScript_.set(url, script); +}; + + +/** + * Adds script source code. + */ +Profile.prototype.getScript = function (url) { + return this.urlToScript_.get(url); }; /** @@ -236,7 +294,7 @@ Profile.prototype.addScriptSource = function(script, source) { * @param {number} from Current code entry address. * @param {number} to New code entry address. */ -Profile.prototype.moveFunc = function(from, to) { +Profile.prototype.moveFunc = function (from, to) { if (this.codeMap_.findDynamicEntryByStartAddress(from)) { this.codeMap_.moveCode(from, to); } @@ -248,7 +306,7 @@ Profile.prototype.moveFunc = function(from, to) { * * @param {number} addr Entry address. */ -Profile.prototype.findEntry = function(addr) { +Profile.prototype.findEntry = function (addr) { return this.codeMap_.findEntry(addr); }; @@ -259,7 +317,7 @@ Profile.prototype.findEntry = function(addr) { * * @param {Array} stack Stack sample. */ -Profile.prototype.recordTick = function(time_ns, vmState, stack) { +Profile.prototype.recordTick = function (time_ns, vmState, stack) { var processedStack = this.resolveAndFilterFuncs_(stack); this.bottomUpTree_.addPath(processedStack); processedStack.reverse(); @@ -273,7 +331,7 @@ Profile.prototype.recordTick = function(time_ns, vmState, stack) { * * @param {Array} stack Stack sample. */ -Profile.prototype.resolveAndFilterFuncs_ = function(stack) { +Profile.prototype.resolveAndFilterFuncs_ = function (stack) { var result = []; var last_seen_c_function = ''; var look_for_first_c_function = false; @@ -295,9 +353,9 @@ Profile.prototype.resolveAndFilterFuncs_ = function(stack) { if (i === 0) result.push("UNKNOWN"); } if (look_for_first_c_function && - i > 0 && - (!entry || entry.type !== 'CPP') && - last_seen_c_function !== '') { + i > 0 && + (!entry || entry.type !== 'CPP') && + last_seen_c_function !== '') { if (this.c_entries_[last_seen_c_function] === undefined) { this.c_entries_[last_seen_c_function] = 0; } @@ -314,7 +372,7 @@ Profile.prototype.resolveAndFilterFuncs_ = function(stack) { * * @param {function(CallTree.Node)} f Visitor function. */ -Profile.prototype.traverseTopDownTree = function(f) { +Profile.prototype.traverseTopDownTree = function (f) { this.topDownTree_.traverse(f); }; @@ -324,7 +382,7 @@ Profile.prototype.traverseTopDownTree = function(f) { * * @param {function(CallTree.Node)} f Visitor function. */ -Profile.prototype.traverseBottomUpTree = function(f) { +Profile.prototype.traverseBottomUpTree = function (f) { this.bottomUpTree_.traverse(f); }; @@ -335,7 +393,7 @@ Profile.prototype.traverseBottomUpTree = function(f) { * * @param {string} opt_label Node label. */ -Profile.prototype.getTopDownProfile = function(opt_label) { +Profile.prototype.getTopDownProfile = function (opt_label) { return this.getTreeProfile_(this.topDownTree_, opt_label); }; @@ -346,7 +404,7 @@ Profile.prototype.getTopDownProfile = function(opt_label) { * * @param {string} opt_label Node label. */ -Profile.prototype.getBottomUpProfile = function(opt_label) { +Profile.prototype.getBottomUpProfile = function (opt_label) { return this.getTreeProfile_(this.bottomUpTree_, opt_label); }; @@ -357,7 +415,7 @@ Profile.prototype.getBottomUpProfile = function(opt_label) { * @param {Profile.CallTree} tree Call tree. * @param {string} opt_label Node label. */ -Profile.prototype.getTreeProfile_ = function(tree, opt_label) { +Profile.prototype.getTreeProfile_ = function (tree, opt_label) { if (!opt_label) { tree.computeTotalWeights(); return tree; @@ -375,7 +433,7 @@ Profile.prototype.getTreeProfile_ = function(tree, opt_label) { * * @param {string} opt_label Starting node label. */ -Profile.prototype.getFlatProfile = function(opt_label) { +Profile.prototype.getFlatProfile = function (opt_label) { var counters = new CallTree(); var rootLabel = opt_label || CallTree.ROOT_NODE_LABEL; var precs = {}; @@ -424,13 +482,13 @@ Profile.prototype.getFlatProfile = function(opt_label) { }; -Profile.CEntryNode = function(name, ticks) { +Profile.CEntryNode = function (name, ticks) { this.name = name; this.ticks = ticks; } -Profile.prototype.getCEntryProfile = function() { +Profile.prototype.getCEntryProfile = function () { var result = [new Profile.CEntryNode("TOTAL", 0)]; var total_ticks = 0; for (var f in this.c_entries_) { @@ -439,7 +497,7 @@ Profile.prototype.getCEntryProfile = function() { result.push(new Profile.CEntryNode(f, ticks)); } result[0].ticks = total_ticks; // Sorting will keep this at index 0. - result.sort(function(n1, n2) { + result.sort(function (n1, n2) { return n2.ticks - n1.ticks || (n2.name < n1.name ? -1 : 1) }); return result; @@ -449,7 +507,7 @@ Profile.prototype.getCEntryProfile = function() { /** * Cleans up function entries that are not referenced by code entries. */ -Profile.prototype.cleanUpFuncEntries = function() { +Profile.prototype.cleanUpFuncEntries = function () { var referencedFuncEntries = []; var entries = this.codeMap_.getAllDynamicEntriesWithAddresses(); for (var i = 0, l = entries.length; i < l; ++i) { @@ -464,7 +522,7 @@ Profile.prototype.cleanUpFuncEntries = function() { } for (var i = 0, l = entries.length; i < l; ++i) { if (entries[i][1].constructor === Profile.FunctionEntry && - !entries[i][1].used) { + !entries[i][1].used) { this.codeMap_.deleteCode(entries[i][0]); } } @@ -479,7 +537,7 @@ Profile.prototype.cleanUpFuncEntries = function() { * @param {string} name Function name. * @constructor */ -Profile.DynamicCodeEntry = function(size, type, name) { +Profile.DynamicCodeEntry = function (size, type, name) { CodeMap.CodeEntry.call(this, size, name, type); }; @@ -487,7 +545,7 @@ Profile.DynamicCodeEntry = function(size, type, name) { /** * Returns node name. */ -Profile.DynamicCodeEntry.prototype.getName = function() { +Profile.DynamicCodeEntry.prototype.getName = function () { return this.type + ': ' + this.name; }; @@ -495,17 +553,17 @@ Profile.DynamicCodeEntry.prototype.getName = function() { /** * Returns raw node name (without type decoration). */ -Profile.DynamicCodeEntry.prototype.getRawName = function() { +Profile.DynamicCodeEntry.prototype.getRawName = function () { return this.name; }; -Profile.DynamicCodeEntry.prototype.isJSFunction = function() { +Profile.DynamicCodeEntry.prototype.isJSFunction = function () { return false; }; -Profile.DynamicCodeEntry.prototype.toString = function() { +Profile.DynamicCodeEntry.prototype.toString = function () { return this.getName() + ': ' + this.size.toString(16); }; @@ -519,7 +577,7 @@ Profile.DynamicCodeEntry.prototype.toString = function() { * @param {Profile.CodeState} state Code optimization state. * @constructor */ -Profile.DynamicFuncCodeEntry = function(size, type, func, state) { +Profile.DynamicFuncCodeEntry = function (size, type, func, state) { CodeMap.CodeEntry.call(this, size, '', type); this.func = func; this.state = state; @@ -530,14 +588,14 @@ Profile.DynamicFuncCodeEntry.STATE_PREFIX = ["", "~", "*"]; /** * Returns state. */ -Profile.DynamicFuncCodeEntry.prototype.getState = function() { +Profile.DynamicFuncCodeEntry.prototype.getState = function () { return Profile.DynamicFuncCodeEntry.STATE_PREFIX[this.state]; }; /** * Returns node name. */ -Profile.DynamicFuncCodeEntry.prototype.getName = function() { +Profile.DynamicFuncCodeEntry.prototype.getName = function () { var name = this.func.getName(); return this.type + ': ' + this.getState() + name; }; @@ -546,17 +604,17 @@ Profile.DynamicFuncCodeEntry.prototype.getName = function() { /** * Returns raw node name (without type decoration). */ -Profile.DynamicFuncCodeEntry.prototype.getRawName = function() { +Profile.DynamicFuncCodeEntry.prototype.getRawName = function () { return this.func.getName(); }; -Profile.DynamicFuncCodeEntry.prototype.isJSFunction = function() { +Profile.DynamicFuncCodeEntry.prototype.isJSFunction = function () { return true; }; -Profile.DynamicFuncCodeEntry.prototype.toString = function() { +Profile.DynamicFuncCodeEntry.prototype.toString = function () { return this.getName() + ': ' + this.size.toString(16); }; @@ -567,7 +625,7 @@ Profile.DynamicFuncCodeEntry.prototype.toString = function() { * @param {string} name Function name. * @constructor */ -Profile.FunctionEntry = function(name) { +Profile.FunctionEntry = function (name) { CodeMap.CodeEntry.call(this, 0, name); }; @@ -575,7 +633,7 @@ Profile.FunctionEntry = function(name) { /** * Returns node name. */ -Profile.FunctionEntry.prototype.getName = function() { +Profile.FunctionEntry.prototype.getName = function () { var name = this.name; if (name.length == 0) { name = ''; @@ -595,7 +653,7 @@ Profile.FunctionEntry.prototype.toString = CodeMap.CodeEntry.prototype.toString; */ function CallTree() { this.root_ = new CallTree.Node( - CallTree.ROOT_NODE_LABEL); + CallTree.ROOT_NODE_LABEL); }; @@ -614,7 +672,7 @@ CallTree.prototype.totalsComputed_ = false; /** * Returns the tree root. */ -CallTree.prototype.getRoot = function() { +CallTree.prototype.getRoot = function () { return this.root_; }; @@ -624,7 +682,7 @@ CallTree.prototype.getRoot = function() { * * @param {Array} path Call path. */ -CallTree.prototype.addPath = function(path) { +CallTree.prototype.addPath = function (path) { if (path.length == 0) { return; } @@ -644,7 +702,7 @@ CallTree.prototype.addPath = function(path) { * * @param {string} label Child node label. */ -CallTree.prototype.findOrAddChild = function(label) { +CallTree.prototype.findOrAddChild = function (label) { return this.root_.findOrAddChild(label); }; @@ -665,9 +723,9 @@ CallTree.prototype.findOrAddChild = function(label) { * * @param {string} label The label of the new root node. */ -CallTree.prototype.cloneSubtree = function(label) { +CallTree.prototype.cloneSubtree = function (label) { var subTree = new CallTree(); - this.traverse(function(node, parent) { + this.traverse(function (node, parent) { if (!parent && node.label != label) { return null; } @@ -682,7 +740,7 @@ CallTree.prototype.cloneSubtree = function(label) { /** * Computes total weights in the call graph. */ -CallTree.prototype.computeTotalWeights = function() { +CallTree.prototype.computeTotalWeights = function () { if (this.totalsComputed_) { return; } @@ -706,16 +764,17 @@ CallTree.prototype.computeTotalWeights = function() { * @param {function(CallTree.Node, *)} f Visitor function. * The second parameter is the result of calling 'f' on the parent node. */ -CallTree.prototype.traverse = function(f) { +CallTree.prototype.traverse = function (f) { var pairsToProcess = new ConsArray(); - pairsToProcess.concat([{node: this.root_, param: null}]); + pairsToProcess.concat([{ node: this.root_, param: null }]); while (!pairsToProcess.atEnd()) { var pair = pairsToProcess.next(); var node = pair.node; var newParam = f(node, pair.param); var morePairsToProcess = []; node.forEachChild(function (child) { - morePairsToProcess.push({node: child, param: newParam}); }); + morePairsToProcess.push({ node: child, param: newParam }); + }); pairsToProcess.concat(morePairsToProcess); } }; @@ -729,7 +788,7 @@ CallTree.prototype.traverse = function(f) { * @param {function(CallTree.Node)} exit A function called * after visiting node's children. */ -CallTree.prototype.traverseInDepth = function(enter, exit) { +CallTree.prototype.traverseInDepth = function (enter, exit) { function traverse(node) { enter(node); node.forEachChild(traverse); @@ -745,7 +804,7 @@ CallTree.prototype.traverseInDepth = function(enter, exit) { * @param {string} label Node label. * @param {CallTree.Node} opt_parent Node parent. */ -CallTree.Node = function(label, opt_parent) { +CallTree.Node = function (label, opt_parent) { this.label = label; this.parent = opt_parent; this.children = {}; @@ -772,7 +831,7 @@ CallTree.Node.prototype.totalWeight = 0; * * @param {string} label Child node label. */ -CallTree.Node.prototype.addChild = function(label) { +CallTree.Node.prototype.addChild = function (label) { var child = new CallTree.Node(label, this); this.children[label] = child; return child; @@ -783,18 +842,19 @@ CallTree.Node.prototype.addChild = function(label) { * Computes node's total weight. */ CallTree.Node.prototype.computeTotalWeight = - function() { - var totalWeight = this.selfWeight; - this.forEachChild(function(child) { - totalWeight += child.computeTotalWeight(); }); - return this.totalWeight = totalWeight; -}; + function () { + var totalWeight = this.selfWeight; + this.forEachChild(function (child) { + totalWeight += child.computeTotalWeight(); + }); + return this.totalWeight = totalWeight; + }; /** * Returns all node's children as an array. */ -CallTree.Node.prototype.exportChildren = function() { +CallTree.Node.prototype.exportChildren = function () { var result = []; this.forEachChild(function (node) { result.push(node); }); return result; @@ -806,7 +866,7 @@ CallTree.Node.prototype.exportChildren = function() { * * @param {string} label Child node label. */ -CallTree.Node.prototype.findChild = function(label) { +CallTree.Node.prototype.findChild = function (label) { return this.children[label] || null; }; @@ -817,7 +877,7 @@ CallTree.Node.prototype.findChild = function(label) { * * @param {string} label Child node label. */ -CallTree.Node.prototype.findOrAddChild = function(label) { +CallTree.Node.prototype.findOrAddChild = function (label) { return this.findChild(label) || this.addChild(label); }; @@ -827,7 +887,7 @@ CallTree.Node.prototype.findOrAddChild = function(label) { * * @param {function(CallTree.Node)} f Visitor function. */ -CallTree.Node.prototype.forEachChild = function(f) { +CallTree.Node.prototype.forEachChild = function (f) { for (var c in this.children) { f(this.children[c]); } @@ -839,7 +899,7 @@ CallTree.Node.prototype.forEachChild = function(f) { * * @param {function(CallTree.Node)} f Visitor function. */ -CallTree.Node.prototype.walkUpToRoot = function(f) { +CallTree.Node.prototype.walkUpToRoot = function (f) { for (var curr = this; curr != null; curr = curr.parent) { f(curr); } @@ -852,8 +912,8 @@ CallTree.Node.prototype.walkUpToRoot = function(f) { * @param {Array} labels The path. * @param {function(CallTree.Node)} opt_f Visitor function. */ -CallTree.Node.prototype.descendToChild = function( - labels, opt_f) { +CallTree.Node.prototype.descendToChild = function ( + labels, opt_f) { for (var pos = 0, curr = this; pos < labels.length && curr != null; pos++) { var child = curr.findChild(labels[pos]); if (opt_f) { @@ -872,30 +932,30 @@ function JsonProfile() { this.scripts_ = []; } -JsonProfile.prototype.addLibrary = function( - name, startAddr, endAddr) { +JsonProfile.prototype.addLibrary = function ( + name, startAddr, endAddr) { var entry = new CodeMap.CodeEntry( - endAddr - startAddr, name, 'SHARED_LIB'); + endAddr - startAddr, name, 'SHARED_LIB'); this.codeMap_.addLibrary(startAddr, entry); entry.codeId = this.codeEntries_.length; - this.codeEntries_.push({name : entry.name, type : entry.type}); + this.codeEntries_.push({ name: entry.name, type: entry.type }); return entry; }; -JsonProfile.prototype.addStaticCode = function( - name, startAddr, endAddr) { +JsonProfile.prototype.addStaticCode = function ( + name, startAddr, endAddr) { var entry = new CodeMap.CodeEntry( - endAddr - startAddr, name, 'CPP'); + endAddr - startAddr, name, 'CPP'); this.codeMap_.addStaticCode(startAddr, entry); entry.codeId = this.codeEntries_.length; - this.codeEntries_.push({name : entry.name, type : entry.type}); + this.codeEntries_.push({ name: entry.name, type: entry.type }); return entry; }; -JsonProfile.prototype.addCode = function( - kind, name, timestamp, start, size) { +JsonProfile.prototype.addCode = function ( + kind, name, timestamp, start, size) { let codeId = this.codeEntries_.length; // Find out if we have a static code entry for the code. If yes, we will // make sure it is written to the JSON file just once. @@ -909,17 +969,17 @@ JsonProfile.prototype.addCode = function( entry.codeId = codeId; this.codeEntries_[codeId] = { - name : entry.name, + name: entry.name, timestamp: timestamp, - type : entry.type, - kind : kind + type: entry.type, + kind: kind }; return entry; }; -JsonProfile.prototype.addFuncCode = function( - kind, name, timestamp, start, size, funcAddr, state) { +JsonProfile.prototype.addFuncCode = function ( + kind, name, timestamp, start, size, funcAddr, state) { // As code and functions are in the same address space, // it is safe to put them in a single code map. var func = this.codeMap_.findDynamicEntryByStartAddress(funcAddr); @@ -928,13 +988,13 @@ JsonProfile.prototype.addFuncCode = function( this.codeMap_.addCode(funcAddr, func); func.funcId = this.functionEntries_.length; - this.functionEntries_.push({name : name, codes : []}); + this.functionEntries_.push({ name: name, codes: [] }); } else if (func.name !== name) { // Function object has been overwritten with a new one. func.name = name; func.funcId = this.functionEntries_.length; - this.functionEntries_.push({name : name, codes : []}); + this.functionEntries_.push({ name: name, codes: [] }); } // TODO(jarin): Insert the code object into the SFI's code list. var entry = this.codeMap_.findDynamicEntryByStartAddress(start); @@ -964,17 +1024,17 @@ JsonProfile.prototype.addFuncCode = function( } this.codeEntries_.push({ - name : entry.name, - type : entry.type, - kind : kind, - func : func.funcId, - tm : timestamp + name: entry.name, + type: entry.type, + kind: kind, + func: func.funcId, + tm: timestamp }); } return entry; }; -JsonProfile.prototype.moveCode = function(from, to) { +JsonProfile.prototype.moveCode = function (from, to) { try { this.codeMap_.moveCode(from, to); } catch (e) { @@ -982,9 +1042,9 @@ JsonProfile.prototype.moveCode = function(from, to) { } }; -JsonProfile.prototype.addSourcePositions = function( - start, script, startPos, endPos, sourcePositions, inliningPositions, - inlinedFunctions) { +JsonProfile.prototype.addSourcePositions = function ( + start, script, startPos, endPos, sourcePositions, inliningPositions, + inlinedFunctions) { var entry = this.codeMap_.findDynamicEntryByStartAddress(start); if (!entry) return; var codeId = entry.codeId; @@ -1007,26 +1067,23 @@ JsonProfile.prototype.addSourcePositions = function( } this.codeEntries_[entry.codeId].source = { - script : script, - start : startPos, - end : endPos, - positions : sourcePositions, - inlined : inliningPositions, - fns : inlinedFunctions + script: script, + start: startPos, + end: endPos, + positions: sourcePositions, + inlined: inliningPositions, + fns: inlinedFunctions }; }; -JsonProfile.prototype.addScriptSource = function(script, url, source) { - this.scripts_[script] = { - name : url, - source : source - }; +JsonProfile.prototype.addScriptSource = function (id, url, source) { + this.scripts_[id] = new Script(id, url, source); }; -JsonProfile.prototype.deoptCode = function( - timestamp, code, inliningId, scriptOffset, bailoutType, - sourcePositionText, deoptReasonText) { +JsonProfile.prototype.deoptCode = function ( + timestamp, code, inliningId, scriptOffset, bailoutType, + sourcePositionText, deoptReasonText) { let entry = this.codeMap_.findDynamicEntryByStartAddress(code); if (entry) { let codeId = entry.codeId; @@ -1035,18 +1092,18 @@ JsonProfile.prototype.deoptCode = function( // The subsequent deoptimizations should be lazy deopts for // other on-stack activations. this.codeEntries_[codeId].deopt = { - tm : timestamp, - inliningId : inliningId, - scriptOffset : scriptOffset, - posText : sourcePositionText, - reason : deoptReasonText, - bailoutType : bailoutType + tm: timestamp, + inliningId: inliningId, + scriptOffset: scriptOffset, + posText: sourcePositionText, + reason: deoptReasonText, + bailoutType: bailoutType }; } } }; -JsonProfile.prototype.deleteCode = function(start) { +JsonProfile.prototype.deleteCode = function (start) { try { this.codeMap_.deleteCode(start); } catch (e) { @@ -1054,17 +1111,17 @@ JsonProfile.prototype.deleteCode = function(start) { } }; -JsonProfile.prototype.moveFunc = function(from, to) { +JsonProfile.prototype.moveFunc = function (from, to) { if (this.codeMap_.findDynamicEntryByStartAddress(from)) { this.codeMap_.moveCode(from, to); } }; -JsonProfile.prototype.findEntry = function(addr) { +JsonProfile.prototype.findEntry = function (addr) { return this.codeMap_.findEntry(addr); }; -JsonProfile.prototype.recordTick = function(time_ns, vmState, stack) { +JsonProfile.prototype.recordTick = function (time_ns, vmState, stack) { // TODO(jarin) Resolve the frame-less case (when top of stack is // known code). var processedStack = []; @@ -1076,14 +1133,14 @@ JsonProfile.prototype.recordTick = function(time_ns, vmState, stack) { processedStack.push(-1, stack[i]); } } - this.ticks_.push({ tm : time_ns, vm : vmState, s : processedStack }); + this.ticks_.push({ tm: time_ns, vm: vmState, s: processedStack }); }; function writeJson(s) { write(JSON.stringify(s, null, 2)); } -JsonProfile.prototype.writeJson = function() { +JsonProfile.prototype.writeJson = function () { // Write out the JSON in a partially manual way to avoid creating too-large // strings in one JSON.stringify call when there are a lot of ticks. write('{\n') diff --git a/deps/v8/tools/profile.mjs b/deps/v8/tools/profile.mjs new file mode 100644 index 00000000000000..50864dce0f912d --- /dev/null +++ b/deps/v8/tools/profile.mjs @@ -0,0 +1,1175 @@ +// Copyright 2009 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import { CodeMap } from "./codemap.mjs"; +import { ConsArray } from "./consarray.mjs"; + +// TODO: move to separate modules +export class SourcePosition { + constructor(script, line, column) { + this.script = script; + this.line = line; + this.column = column; + this.entries = []; + } + addEntry(entry) { + this.entries.push(entry); + } +} + +export class Script { + + constructor(id, name, source) { + this.id = id; + this.name = name; + this.source = source; + this.sourcePositions = []; + // Map> + this.lineToColumn = new Map(); + } + + addSourcePosition(line, column, entry) { + let sourcePosition = this.lineToColumn.get(line)?.get(column); + if (sourcePosition === undefined) { + sourcePosition = new SourcePosition(this, line, column, ) + this.#addSourcePosition(line, column, sourcePosition); + } + sourcePosition.addEntry(entry); + return sourcePosition; + } + + #addSourcePosition(line, column, sourcePosition) { + let columnToSourcePosition; + if (this.lineToColumn.has(line)) { + columnToSourcePosition = this.lineToColumn.get(line); + } else { + columnToSourcePosition = new Map(); + this.lineToColumn.set(line, columnToSourcePosition); + } + this.sourcePositions.push(sourcePosition); + columnToSourcePosition.set(column, sourcePosition); + } +} + +/** + * Creates a profile object for processing profiling-related events + * and calculating function execution times. + * + * @constructor + */ +export function Profile() { + this.codeMap_ = new CodeMap(); + this.topDownTree_ = new CallTree(); + this.bottomUpTree_ = new CallTree(); + this.c_entries_ = {}; + this.ticks_ = []; + this.scripts_ = []; + this.urlToScript_ = new Map(); +}; + + +/** + * Returns whether a function with the specified name must be skipped. + * Should be overriden by subclasses. + * + * @param {string} name Function name. + */ +Profile.prototype.skipThisFunction = function (name) { + return false; +}; + + +/** + * Enum for profiler operations that involve looking up existing + * code entries. + * + * @enum {number} + */ +Profile.Operation = { + MOVE: 0, + DELETE: 1, + TICK: 2 +}; + + +/** + * Enum for code state regarding its dynamic optimization. + * + * @enum {number} + */ +Profile.CodeState = { + COMPILED: 0, + OPTIMIZABLE: 1, + OPTIMIZED: 2 +}; + + +/** + * Called whenever the specified operation has failed finding a function + * containing the specified address. Should be overriden by subclasses. + * See the Profile.Operation enum for the list of + * possible operations. + * + * @param {number} operation Operation. + * @param {number} addr Address of the unknown code. + * @param {number} opt_stackPos If an unknown address is encountered + * during stack strace processing, specifies a position of the frame + * containing the address. + */ +Profile.prototype.handleUnknownCode = function ( + operation, addr, opt_stackPos) { +}; + + +/** + * Registers a library. + * + * @param {string} name Code entry name. + * @param {number} startAddr Starting address. + * @param {number} endAddr Ending address. + */ +Profile.prototype.addLibrary = function ( + name, startAddr, endAddr) { + var entry = new CodeMap.CodeEntry( + endAddr - startAddr, name, 'SHARED_LIB'); + this.codeMap_.addLibrary(startAddr, entry); + return entry; +}; + + +/** + * Registers statically compiled code entry. + * + * @param {string} name Code entry name. + * @param {number} startAddr Starting address. + * @param {number} endAddr Ending address. + */ +Profile.prototype.addStaticCode = function ( + name, startAddr, endAddr) { + var entry = new CodeMap.CodeEntry( + endAddr - startAddr, name, 'CPP'); + this.codeMap_.addStaticCode(startAddr, entry); + return entry; +}; + + +/** + * Registers dynamic (JIT-compiled) code entry. + * + * @param {string} type Code entry type. + * @param {string} name Code entry name. + * @param {number} start Starting address. + * @param {number} size Code entry size. + */ +Profile.prototype.addCode = function ( + type, name, timestamp, start, size) { + var entry = new Profile.DynamicCodeEntry(size, type, name); + this.codeMap_.addCode(start, entry); + return entry; +}; + + +/** + * Registers dynamic (JIT-compiled) code entry. + * + * @param {string} type Code entry type. + * @param {string} name Code entry name. + * @param {number} start Starting address. + * @param {number} size Code entry size. + * @param {number} funcAddr Shared function object address. + * @param {Profile.CodeState} state Optimization state. + */ +Profile.prototype.addFuncCode = function ( + type, name, timestamp, start, size, funcAddr, state) { + // As code and functions are in the same address space, + // it is safe to put them in a single code map. + var func = this.codeMap_.findDynamicEntryByStartAddress(funcAddr); + if (!func) { + func = new Profile.FunctionEntry(name); + this.codeMap_.addCode(funcAddr, func); + } else if (func.name !== name) { + // Function object has been overwritten with a new one. + func.name = name; + } + var entry = this.codeMap_.findDynamicEntryByStartAddress(start); + if (entry) { + if (entry.size === size && entry.func === func) { + // Entry state has changed. + entry.state = state; + } else { + this.codeMap_.deleteCode(start); + entry = null; + } + } + if (!entry) { + entry = new Profile.DynamicFuncCodeEntry(size, type, func, state); + this.codeMap_.addCode(start, entry); + } + return entry; +}; + + +/** + * Reports about moving of a dynamic code entry. + * + * @param {number} from Current code entry address. + * @param {number} to New code entry address. + */ +Profile.prototype.moveCode = function (from, to) { + try { + this.codeMap_.moveCode(from, to); + } catch (e) { + this.handleUnknownCode(Profile.Operation.MOVE, from); + } +}; + +Profile.prototype.deoptCode = function ( + timestamp, code, inliningId, scriptOffset, bailoutType, + sourcePositionText, deoptReasonText) { +}; + +/** + * Reports about deletion of a dynamic code entry. + * + * @param {number} start Starting address. + */ +Profile.prototype.deleteCode = function (start) { + try { + this.codeMap_.deleteCode(start); + } catch (e) { + this.handleUnknownCode(Profile.Operation.DELETE, start); + } +}; + +/** + * Adds source positions for given code. + */ +Profile.prototype.addSourcePositions = function ( + start, script, startPos, endPos, sourcePositions, inliningPositions, + inlinedFunctions) { + // CLI does not need source code => ignore. +}; + +/** + * Adds script source code. + */ +Profile.prototype.addScriptSource = function (id, url, source) { + const script = new Script(id, url, source); + this.scripts_[id] = script; + this.urlToScript_.set(url, script); +}; + + +/** + * Adds script source code. + */ +Profile.prototype.getScript = function (url) { + return this.urlToScript_.get(url); +}; + +/** + * Reports about moving of a dynamic code entry. + * + * @param {number} from Current code entry address. + * @param {number} to New code entry address. + */ +Profile.prototype.moveFunc = function (from, to) { + if (this.codeMap_.findDynamicEntryByStartAddress(from)) { + this.codeMap_.moveCode(from, to); + } +}; + + +/** + * Retrieves a code entry by an address. + * + * @param {number} addr Entry address. + */ +Profile.prototype.findEntry = function (addr) { + return this.codeMap_.findEntry(addr); +}; + + +/** + * Records a tick event. Stack must contain a sequence of + * addresses starting with the program counter value. + * + * @param {Array} stack Stack sample. + */ +Profile.prototype.recordTick = function (time_ns, vmState, stack) { + var processedStack = this.resolveAndFilterFuncs_(stack); + this.bottomUpTree_.addPath(processedStack); + processedStack.reverse(); + this.topDownTree_.addPath(processedStack); +}; + + +/** + * Translates addresses into function names and filters unneeded + * functions. + * + * @param {Array} stack Stack sample. + */ +Profile.prototype.resolveAndFilterFuncs_ = function (stack) { + var result = []; + var last_seen_c_function = ''; + var look_for_first_c_function = false; + for (var i = 0; i < stack.length; ++i) { + var entry = this.codeMap_.findEntry(stack[i]); + if (entry) { + var name = entry.getName(); + if (i === 0 && (entry.type === 'CPP' || entry.type === 'SHARED_LIB')) { + look_for_first_c_function = true; + } + if (look_for_first_c_function && entry.type === 'CPP') { + last_seen_c_function = name; + } + if (!this.skipThisFunction(name)) { + result.push(name); + } + } else { + this.handleUnknownCode(Profile.Operation.TICK, stack[i], i); + if (i === 0) result.push("UNKNOWN"); + } + if (look_for_first_c_function && + i > 0 && + (!entry || entry.type !== 'CPP') && + last_seen_c_function !== '') { + if (this.c_entries_[last_seen_c_function] === undefined) { + this.c_entries_[last_seen_c_function] = 0; + } + this.c_entries_[last_seen_c_function]++; + look_for_first_c_function = false; // Found it, we're done. + } + } + return result; +}; + + +/** + * Performs a BF traversal of the top down call graph. + * + * @param {function(CallTree.Node)} f Visitor function. + */ +Profile.prototype.traverseTopDownTree = function (f) { + this.topDownTree_.traverse(f); +}; + + +/** + * Performs a BF traversal of the bottom up call graph. + * + * @param {function(CallTree.Node)} f Visitor function. + */ +Profile.prototype.traverseBottomUpTree = function (f) { + this.bottomUpTree_.traverse(f); +}; + + +/** + * Calculates a top down profile for a node with the specified label. + * If no name specified, returns the whole top down calls tree. + * + * @param {string} opt_label Node label. + */ +Profile.prototype.getTopDownProfile = function (opt_label) { + return this.getTreeProfile_(this.topDownTree_, opt_label); +}; + + +/** + * Calculates a bottom up profile for a node with the specified label. + * If no name specified, returns the whole bottom up calls tree. + * + * @param {string} opt_label Node label. + */ +Profile.prototype.getBottomUpProfile = function (opt_label) { + return this.getTreeProfile_(this.bottomUpTree_, opt_label); +}; + + +/** + * Helper function for calculating a tree profile. + * + * @param {Profile.CallTree} tree Call tree. + * @param {string} opt_label Node label. + */ +Profile.prototype.getTreeProfile_ = function (tree, opt_label) { + if (!opt_label) { + tree.computeTotalWeights(); + return tree; + } else { + var subTree = tree.cloneSubtree(opt_label); + subTree.computeTotalWeights(); + return subTree; + } +}; + + +/** + * Calculates a flat profile of callees starting from a node with + * the specified label. If no name specified, starts from the root. + * + * @param {string} opt_label Starting node label. + */ +Profile.prototype.getFlatProfile = function (opt_label) { + var counters = new CallTree(); + var rootLabel = opt_label || CallTree.ROOT_NODE_LABEL; + var precs = {}; + precs[rootLabel] = 0; + var root = counters.findOrAddChild(rootLabel); + + this.topDownTree_.computeTotalWeights(); + this.topDownTree_.traverseInDepth( + function onEnter(node) { + if (!(node.label in precs)) { + precs[node.label] = 0; + } + var nodeLabelIsRootLabel = node.label == rootLabel; + if (nodeLabelIsRootLabel || precs[rootLabel] > 0) { + if (precs[rootLabel] == 0) { + root.selfWeight += node.selfWeight; + root.totalWeight += node.totalWeight; + } else { + var rec = root.findOrAddChild(node.label); + rec.selfWeight += node.selfWeight; + if (nodeLabelIsRootLabel || precs[node.label] == 0) { + rec.totalWeight += node.totalWeight; + } + } + precs[node.label]++; + } + }, + function onExit(node) { + if (node.label == rootLabel || precs[rootLabel] > 0) { + precs[node.label]--; + } + }, + null); + + if (!opt_label) { + // If we have created a flat profile for the whole program, we don't + // need an explicit root in it. Thus, replace the counters tree + // root with the node corresponding to the whole program. + counters.root_ = root; + } else { + // Propagate weights so percents can be calculated correctly. + counters.getRoot().selfWeight = root.selfWeight; + counters.getRoot().totalWeight = root.totalWeight; + } + return counters; +}; + + +Profile.CEntryNode = function (name, ticks) { + this.name = name; + this.ticks = ticks; +} + + +Profile.prototype.getCEntryProfile = function () { + var result = [new Profile.CEntryNode("TOTAL", 0)]; + var total_ticks = 0; + for (var f in this.c_entries_) { + var ticks = this.c_entries_[f]; + total_ticks += ticks; + result.push(new Profile.CEntryNode(f, ticks)); + } + result[0].ticks = total_ticks; // Sorting will keep this at index 0. + result.sort(function (n1, n2) { + return n2.ticks - n1.ticks || (n2.name < n1.name ? -1 : 1) + }); + return result; +} + + +/** + * Cleans up function entries that are not referenced by code entries. + */ +Profile.prototype.cleanUpFuncEntries = function () { + var referencedFuncEntries = []; + var entries = this.codeMap_.getAllDynamicEntriesWithAddresses(); + for (var i = 0, l = entries.length; i < l; ++i) { + if (entries[i][1].constructor === Profile.FunctionEntry) { + entries[i][1].used = false; + } + } + for (var i = 0, l = entries.length; i < l; ++i) { + if ("func" in entries[i][1]) { + entries[i][1].func.used = true; + } + } + for (var i = 0, l = entries.length; i < l; ++i) { + if (entries[i][1].constructor === Profile.FunctionEntry && + !entries[i][1].used) { + this.codeMap_.deleteCode(entries[i][0]); + } + } +}; + + +/** + * Creates a dynamic code entry. + * + * @param {number} size Code size. + * @param {string} type Code type. + * @param {string} name Function name. + * @constructor + */ +Profile.DynamicCodeEntry = function (size, type, name) { + CodeMap.CodeEntry.call(this, size, name, type); +}; + + +/** + * Returns node name. + */ +Profile.DynamicCodeEntry.prototype.getName = function () { + return this.type + ': ' + this.name; +}; + + +/** + * Returns raw node name (without type decoration). + */ +Profile.DynamicCodeEntry.prototype.getRawName = function () { + return this.name; +}; + + +Profile.DynamicCodeEntry.prototype.isJSFunction = function () { + return false; +}; + + +Profile.DynamicCodeEntry.prototype.toString = function () { + return this.getName() + ': ' + this.size.toString(16); +}; + + +/** + * Creates a dynamic code entry. + * + * @param {number} size Code size. + * @param {string} type Code type. + * @param {Profile.FunctionEntry} func Shared function entry. + * @param {Profile.CodeState} state Code optimization state. + * @constructor + */ +Profile.DynamicFuncCodeEntry = function (size, type, func, state) { + CodeMap.CodeEntry.call(this, size, '', type); + this.func = func; + this.state = state; +}; + +Profile.DynamicFuncCodeEntry.STATE_PREFIX = ["", "~", "*"]; + +/** + * Returns state. + */ +Profile.DynamicFuncCodeEntry.prototype.getState = function () { + return Profile.DynamicFuncCodeEntry.STATE_PREFIX[this.state]; +}; + +/** + * Returns node name. + */ +Profile.DynamicFuncCodeEntry.prototype.getName = function () { + var name = this.func.getName(); + return this.type + ': ' + this.getState() + name; +}; + + +/** + * Returns raw node name (without type decoration). + */ +Profile.DynamicFuncCodeEntry.prototype.getRawName = function () { + return this.func.getName(); +}; + + +Profile.DynamicFuncCodeEntry.prototype.isJSFunction = function () { + return true; +}; + + +Profile.DynamicFuncCodeEntry.prototype.toString = function () { + return this.getName() + ': ' + this.size.toString(16); +}; + + +/** + * Creates a shared function object entry. + * + * @param {string} name Function name. + * @constructor + */ +Profile.FunctionEntry = function (name) { + CodeMap.CodeEntry.call(this, 0, name); +}; + + +/** + * Returns node name. + */ +Profile.FunctionEntry.prototype.getName = function () { + var name = this.name; + if (name.length == 0) { + name = ''; + } else if (name.charAt(0) == ' ') { + // An anonymous function with location: " aaa.js:10". + name = '' + name; + } + return name; +}; + +Profile.FunctionEntry.prototype.toString = CodeMap.CodeEntry.prototype.toString; + +/** + * Constructs a call graph. + * + * @constructor + */ +function CallTree() { + this.root_ = new CallTree.Node( + CallTree.ROOT_NODE_LABEL); +}; + + +/** + * The label of the root node. + */ +CallTree.ROOT_NODE_LABEL = ''; + + +/** + * @private + */ +CallTree.prototype.totalsComputed_ = false; + + +/** + * Returns the tree root. + */ +CallTree.prototype.getRoot = function () { + return this.root_; +}; + + +/** + * Adds the specified call path, constructing nodes as necessary. + * + * @param {Array} path Call path. + */ +CallTree.prototype.addPath = function (path) { + if (path.length == 0) { + return; + } + var curr = this.root_; + for (var i = 0; i < path.length; ++i) { + curr = curr.findOrAddChild(path[i]); + } + curr.selfWeight++; + this.totalsComputed_ = false; +}; + + +/** + * Finds an immediate child of the specified parent with the specified + * label, creates a child node if necessary. If a parent node isn't + * specified, uses tree root. + * + * @param {string} label Child node label. + */ +CallTree.prototype.findOrAddChild = function (label) { + return this.root_.findOrAddChild(label); +}; + + +/** + * Creates a subtree by cloning and merging all subtrees rooted at nodes + * with a given label. E.g. cloning the following call tree on label 'A' + * will give the following result: + * + * -- + * / / + * == clone on 'A' ==> -- + * \ \ + * ---- + * + * And 's selfWeight will be the sum of selfWeights of 's from the + * source call tree. + * + * @param {string} label The label of the new root node. + */ +CallTree.prototype.cloneSubtree = function (label) { + var subTree = new CallTree(); + this.traverse(function (node, parent) { + if (!parent && node.label != label) { + return null; + } + var child = (parent ? parent : subTree).findOrAddChild(node.label); + child.selfWeight += node.selfWeight; + return child; + }); + return subTree; +}; + + +/** + * Computes total weights in the call graph. + */ +CallTree.prototype.computeTotalWeights = function () { + if (this.totalsComputed_) { + return; + } + this.root_.computeTotalWeight(); + this.totalsComputed_ = true; +}; + + +/** + * Traverses the call graph in preorder. This function can be used for + * building optionally modified tree clones. This is the boilerplate code + * for this scenario: + * + * callTree.traverse(function(node, parentClone) { + * var nodeClone = cloneNode(node); + * if (parentClone) + * parentClone.addChild(nodeClone); + * return nodeClone; + * }); + * + * @param {function(CallTree.Node, *)} f Visitor function. + * The second parameter is the result of calling 'f' on the parent node. + */ +CallTree.prototype.traverse = function (f) { + var pairsToProcess = new ConsArray(); + pairsToProcess.concat([{ node: this.root_, param: null }]); + while (!pairsToProcess.atEnd()) { + var pair = pairsToProcess.next(); + var node = pair.node; + var newParam = f(node, pair.param); + var morePairsToProcess = []; + node.forEachChild(function (child) { + morePairsToProcess.push({ node: child, param: newParam }); + }); + pairsToProcess.concat(morePairsToProcess); + } +}; + + +/** + * Performs an indepth call graph traversal. + * + * @param {function(CallTree.Node)} enter A function called + * prior to visiting node's children. + * @param {function(CallTree.Node)} exit A function called + * after visiting node's children. + */ +CallTree.prototype.traverseInDepth = function (enter, exit) { + function traverse(node) { + enter(node); + node.forEachChild(traverse); + exit(node); + } + traverse(this.root_); +}; + + +/** + * Constructs a call graph node. + * + * @param {string} label Node label. + * @param {CallTree.Node} opt_parent Node parent. + */ +CallTree.Node = function (label, opt_parent) { + this.label = label; + this.parent = opt_parent; + this.children = {}; +}; + + +/** + * Node self weight (how many times this node was the last node in + * a call path). + * @type {number} + */ +CallTree.Node.prototype.selfWeight = 0; + + +/** + * Node total weight (includes weights of all children). + * @type {number} + */ +CallTree.Node.prototype.totalWeight = 0; + + +/** + * Adds a child node. + * + * @param {string} label Child node label. + */ +CallTree.Node.prototype.addChild = function (label) { + var child = new CallTree.Node(label, this); + this.children[label] = child; + return child; +}; + + +/** + * Computes node's total weight. + */ +CallTree.Node.prototype.computeTotalWeight = + function () { + var totalWeight = this.selfWeight; + this.forEachChild(function (child) { + totalWeight += child.computeTotalWeight(); + }); + return this.totalWeight = totalWeight; + }; + + +/** + * Returns all node's children as an array. + */ +CallTree.Node.prototype.exportChildren = function () { + var result = []; + this.forEachChild(function (node) { result.push(node); }); + return result; +}; + + +/** + * Finds an immediate child with the specified label. + * + * @param {string} label Child node label. + */ +CallTree.Node.prototype.findChild = function (label) { + return this.children[label] || null; +}; + + +/** + * Finds an immediate child with the specified label, creates a child + * node if necessary. + * + * @param {string} label Child node label. + */ +CallTree.Node.prototype.findOrAddChild = function (label) { + return this.findChild(label) || this.addChild(label); +}; + + +/** + * Calls the specified function for every child. + * + * @param {function(CallTree.Node)} f Visitor function. + */ +CallTree.Node.prototype.forEachChild = function (f) { + for (var c in this.children) { + f(this.children[c]); + } +}; + + +/** + * Walks up from the current node up to the call tree root. + * + * @param {function(CallTree.Node)} f Visitor function. + */ +CallTree.Node.prototype.walkUpToRoot = function (f) { + for (var curr = this; curr != null; curr = curr.parent) { + f(curr); + } +}; + + +/** + * Tries to find a node with the specified path. + * + * @param {Array} labels The path. + * @param {function(CallTree.Node)} opt_f Visitor function. + */ +CallTree.Node.prototype.descendToChild = function ( + labels, opt_f) { + for (var pos = 0, curr = this; pos < labels.length && curr != null; pos++) { + var child = curr.findChild(labels[pos]); + if (opt_f) { + opt_f(child, pos); + } + curr = child; + } + return curr; +}; + +export function JsonProfile() { + this.codeMap_ = new CodeMap(); + this.codeEntries_ = []; + this.functionEntries_ = []; + this.ticks_ = []; + this.scripts_ = []; +} + +JsonProfile.prototype.addLibrary = function ( + name, startAddr, endAddr) { + var entry = new CodeMap.CodeEntry( + endAddr - startAddr, name, 'SHARED_LIB'); + this.codeMap_.addLibrary(startAddr, entry); + + entry.codeId = this.codeEntries_.length; + this.codeEntries_.push({ name: entry.name, type: entry.type }); + return entry; +}; + +JsonProfile.prototype.addStaticCode = function ( + name, startAddr, endAddr) { + var entry = new CodeMap.CodeEntry( + endAddr - startAddr, name, 'CPP'); + this.codeMap_.addStaticCode(startAddr, entry); + + entry.codeId = this.codeEntries_.length; + this.codeEntries_.push({ name: entry.name, type: entry.type }); + return entry; +}; + +JsonProfile.prototype.addCode = function ( + kind, name, timestamp, start, size) { + let codeId = this.codeEntries_.length; + // Find out if we have a static code entry for the code. If yes, we will + // make sure it is written to the JSON file just once. + let staticEntry = this.codeMap_.findAddress(start); + if (staticEntry && staticEntry.entry.type === 'CPP') { + codeId = staticEntry.entry.codeId; + } + + var entry = new CodeMap.CodeEntry(size, name, 'CODE'); + this.codeMap_.addCode(start, entry); + + entry.codeId = codeId; + this.codeEntries_[codeId] = { + name: entry.name, + timestamp: timestamp, + type: entry.type, + kind: kind + }; + + return entry; +}; + +JsonProfile.prototype.addFuncCode = function ( + kind, name, timestamp, start, size, funcAddr, state) { + // As code and functions are in the same address space, + // it is safe to put them in a single code map. + var func = this.codeMap_.findDynamicEntryByStartAddress(funcAddr); + if (!func) { + var func = new CodeMap.CodeEntry(0, name, 'SFI'); + this.codeMap_.addCode(funcAddr, func); + + func.funcId = this.functionEntries_.length; + this.functionEntries_.push({ name: name, codes: [] }); + } else if (func.name !== name) { + // Function object has been overwritten with a new one. + func.name = name; + + func.funcId = this.functionEntries_.length; + this.functionEntries_.push({ name: name, codes: [] }); + } + // TODO(jarin): Insert the code object into the SFI's code list. + var entry = this.codeMap_.findDynamicEntryByStartAddress(start); + if (entry) { + if (entry.size === size && entry.func === func) { + // Entry state has changed. + entry.state = state; + } else { + this.codeMap_.deleteCode(start); + entry = null; + } + } + if (!entry) { + entry = new CodeMap.CodeEntry(size, name, 'JS'); + this.codeMap_.addCode(start, entry); + + entry.codeId = this.codeEntries_.length; + + this.functionEntries_[func.funcId].codes.push(entry.codeId); + + if (state === 0) { + kind = "Builtin"; + } else if (state === 1) { + kind = "Unopt"; + } else if (state === 2) { + kind = "Opt"; + } + + this.codeEntries_.push({ + name: entry.name, + type: entry.type, + kind: kind, + func: func.funcId, + tm: timestamp + }); + } + return entry; +}; + +JsonProfile.prototype.moveCode = function (from, to) { + try { + this.codeMap_.moveCode(from, to); + } catch (e) { + printErr("Move: unknown source " + from); + } +}; + +JsonProfile.prototype.addSourcePositions = function ( + start, script, startPos, endPos, sourcePositions, inliningPositions, + inlinedFunctions) { + var entry = this.codeMap_.findDynamicEntryByStartAddress(start); + if (!entry) return; + var codeId = entry.codeId; + + // Resolve the inlined functions list. + if (inlinedFunctions.length > 0) { + inlinedFunctions = inlinedFunctions.substring(1).split("S"); + for (var i = 0; i < inlinedFunctions.length; i++) { + var funcAddr = parseInt(inlinedFunctions[i]); + var func = this.codeMap_.findDynamicEntryByStartAddress(funcAddr); + if (!func || func.funcId === undefined) { + printErr("Could not find function " + inlinedFunctions[i]); + inlinedFunctions[i] = null; + } else { + inlinedFunctions[i] = func.funcId; + } + } + } else { + inlinedFunctions = []; + } + + this.codeEntries_[entry.codeId].source = { + script: script, + start: startPos, + end: endPos, + positions: sourcePositions, + inlined: inliningPositions, + fns: inlinedFunctions + }; +}; + +JsonProfile.prototype.addScriptSource = function (id, url, source) { + this.scripts_[id] = new Script(id, url, source); +}; + + +JsonProfile.prototype.deoptCode = function ( + timestamp, code, inliningId, scriptOffset, bailoutType, + sourcePositionText, deoptReasonText) { + let entry = this.codeMap_.findDynamicEntryByStartAddress(code); + if (entry) { + let codeId = entry.codeId; + if (!this.codeEntries_[codeId].deopt) { + // Only add the deopt if there was no deopt before. + // The subsequent deoptimizations should be lazy deopts for + // other on-stack activations. + this.codeEntries_[codeId].deopt = { + tm: timestamp, + inliningId: inliningId, + scriptOffset: scriptOffset, + posText: sourcePositionText, + reason: deoptReasonText, + bailoutType: bailoutType + }; + } + } +}; + +JsonProfile.prototype.deleteCode = function (start) { + try { + this.codeMap_.deleteCode(start); + } catch (e) { + printErr("Delete: unknown address " + start); + } +}; + +JsonProfile.prototype.moveFunc = function (from, to) { + if (this.codeMap_.findDynamicEntryByStartAddress(from)) { + this.codeMap_.moveCode(from, to); + } +}; + +JsonProfile.prototype.findEntry = function (addr) { + return this.codeMap_.findEntry(addr); +}; + +JsonProfile.prototype.recordTick = function (time_ns, vmState, stack) { + // TODO(jarin) Resolve the frame-less case (when top of stack is + // known code). + var processedStack = []; + for (var i = 0; i < stack.length; i++) { + var resolved = this.codeMap_.findAddress(stack[i]); + if (resolved) { + processedStack.push(resolved.entry.codeId, resolved.offset); + } else { + processedStack.push(-1, stack[i]); + } + } + this.ticks_.push({ tm: time_ns, vm: vmState, s: processedStack }); +}; + +function writeJson(s) { + write(JSON.stringify(s, null, 2)); +} + +JsonProfile.prototype.writeJson = function () { + // Write out the JSON in a partially manual way to avoid creating too-large + // strings in one JSON.stringify call when there are a lot of ticks. + write('{\n') + + write(' "code": '); + writeJson(this.codeEntries_); + write(',\n'); + + write(' "functions": '); + writeJson(this.functionEntries_); + write(',\n'); + + write(' "ticks": [\n'); + for (var i = 0; i < this.ticks_.length; i++) { + write(' '); + writeJson(this.ticks_[i]); + if (i < this.ticks_.length - 1) { + write(',\n'); + } else { + write('\n'); + } + } + write(' ],\n'); + + write(' "scripts": '); + writeJson(this.scripts_); + + write('}\n'); +}; diff --git a/deps/v8/tools/profile_view.mjs b/deps/v8/tools/profile_view.mjs new file mode 100644 index 00000000000000..9349cc6a7a98b1 --- /dev/null +++ b/deps/v8/tools/profile_view.mjs @@ -0,0 +1,202 @@ +// Copyright 2009 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import { ConsArray } from "./consarray.mjs"; + +/** + * Creates a Profile View builder object. + * + * @param {number} samplingRate Number of ms between profiler ticks. + * @constructor + */ +export function ViewBuilder(samplingRate) { + this.samplingRate = samplingRate; +}; + + +/** + * Builds a profile view for the specified call tree. + * + * @param {CallTree} callTree A call tree. + * @param {boolean} opt_bottomUpViewWeights Whether remapping + * of self weights for a bottom up view is needed. + */ +ViewBuilder.prototype.buildView = function( + callTree, opt_bottomUpViewWeights) { + var head; + var samplingRate = this.samplingRate; + var createViewNode = this.createViewNode; + callTree.traverse(function(node, viewParent) { + var totalWeight = node.totalWeight * samplingRate; + var selfWeight = node.selfWeight * samplingRate; + if (opt_bottomUpViewWeights === true) { + if (viewParent === head) { + selfWeight = totalWeight; + } else { + selfWeight = 0; + } + } + var viewNode = createViewNode(node.label, totalWeight, selfWeight, head); + if (viewParent) { + viewParent.addChild(viewNode); + } else { + head = viewNode; + } + return viewNode; + }); + var view = this.createView(head); + return view; +}; + + +/** + * Factory method for a profile view. + * + * @param {ProfileView.Node} head View head node. + * @return {ProfileView} Profile view. + */ +ViewBuilder.prototype.createView = function(head) { + return new ProfileView(head); +}; + + +/** + * Factory method for a profile view node. + * + * @param {string} internalFuncName A fully qualified function name. + * @param {number} totalTime Amount of time that application spent in the + * corresponding function and its descendants (not that depending on + * profile they can be either callees or callers.) + * @param {number} selfTime Amount of time that application spent in the + * corresponding function only. + * @param {ProfileView.Node} head Profile view head. + * @return {ProfileView.Node} Profile view node. + */ +ViewBuilder.prototype.createViewNode = function( + funcName, totalTime, selfTime, head) { + return new ProfileView.Node( + funcName, totalTime, selfTime, head); +}; + + +/** + * Creates a Profile View object. It allows to perform sorting + * and filtering actions on the profile. + * + * @param {ProfileView.Node} head Head (root) node. + * @constructor + */ +export function ProfileView(head) { + this.head = head; +}; + + +/** + * Sorts the profile view using the specified sort function. + * + * @param {function(ProfileView.Node, + * ProfileView.Node):number} sortFunc A sorting + * functions. Must comply with Array.sort sorting function requirements. + */ +ProfileView.prototype.sort = function(sortFunc) { + this.traverse(function (node) { + node.sortChildren(sortFunc); + }); +}; + + +/** + * Traverses profile view nodes in preorder. + * + * @param {function(ProfileView.Node)} f Visitor function. + */ +ProfileView.prototype.traverse = function(f) { + var nodesToTraverse = new ConsArray(); + nodesToTraverse.concat([this.head]); + while (!nodesToTraverse.atEnd()) { + var node = nodesToTraverse.next(); + f(node); + nodesToTraverse.concat(node.children); + } +}; + + +/** + * Constructs a Profile View node object. Each node object corresponds to + * a function call. + * + * @param {string} internalFuncName A fully qualified function name. + * @param {number} totalTime Amount of time that application spent in the + * corresponding function and its descendants (not that depending on + * profile they can be either callees or callers.) + * @param {number} selfTime Amount of time that application spent in the + * corresponding function only. + * @param {ProfileView.Node} head Profile view head. + * @constructor + */ +ProfileView.Node = function( + internalFuncName, totalTime, selfTime, head) { + this.internalFuncName = internalFuncName; + this.totalTime = totalTime; + this.selfTime = selfTime; + this.head = head; + this.parent = null; + this.children = []; +}; + + +/** + * Returns a share of the function's total time in its parent's total time. + */ +ProfileView.Node.prototype.__defineGetter__( + 'parentTotalPercent', + function() { return this.totalTime / + (this.parent ? this.parent.totalTime : this.totalTime) * 100.0; }); + + +/** + * Adds a child to the node. + * + * @param {ProfileView.Node} node Child node. + */ +ProfileView.Node.prototype.addChild = function(node) { + node.parent = this; + this.children.push(node); +}; + + +/** + * Sorts all the node's children recursively. + * + * @param {function(ProfileView.Node, + * ProfileView.Node):number} sortFunc A sorting + * functions. Must comply with Array.sort sorting function requirements. + */ +ProfileView.Node.prototype.sortChildren = function( + sortFunc) { + this.children.sort(sortFunc); +}; diff --git a/deps/v8/tools/profviz/composer.js b/deps/v8/tools/profviz/composer.js deleted file mode 100644 index 411a7248ebd8f9..00000000000000 --- a/deps/v8/tools/profviz/composer.js +++ /dev/null @@ -1,557 +0,0 @@ -// Copyright 2013 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Array.prototype.top = function() { - if (this.length == 0) return undefined; - return this[this.length - 1]; -} - - -function PlotScriptComposer(kResX, kResY, error_output) { - // Constants. - var kV8BinarySuffixes = ["/d8", "/libv8.so"]; - var kStackFrames = 8; // Stack frames to display in the plot. - - var kTimerEventWidth = 0.33; // Width of each timeline. - var kExecutionFrameWidth = 0.2; // Width of the top stack frame line. - var kStackFrameWidth = 0.1; // Width of the lower stack frame lines. - var kGapWidth = 0.05; // Gap between stack frame lines. - - var kY1Offset = 11; // Offset for stack frame vs. event lines. - var kDeoptRow = 7; // Row displaying deopts. - var kGetTimeHeight = 0.5; // Height of marker displaying timed part. - var kMaxDeoptLength = 4; // Draw size of the largest deopt. - var kPauseLabelPadding = 5; // Padding for pause time labels. - var kNumPauseLabels = 7; // Number of biggest pauses to label. - var kCodeKindLabelPadding = 100; // Padding for code kind labels. - - var kTickHalfDuration = 0.5; // Duration of half a tick in ms. - var kMinRangeLength = 0.0005; // Minimum length for an event in ms. - - var kNumThreads = 2; // Number of threads. - var kExecutionThreadId = 0; // ID of main thread. - - // Init values. - var num_timer_event = kY1Offset + 0.5; - - // Data structures. - function TimerEvent(label, color, pause, thread_id) { - assert(thread_id >= 0 && thread_id < kNumThreads, "invalid thread id"); - this.label = label; - this.color = color; - this.pause = pause; - this.ranges = []; - this.thread_id = thread_id; - this.index = ++num_timer_event; - } - - function CodeKind(color, kinds) { - this.color = color; - this.in_execution = []; - this.stack_frames = []; - for (var i = 0; i < kStackFrames; i++) this.stack_frames.push([]); - this.kinds = kinds; - } - - function Range(start, end) { - this.start = start; // In milliseconds. - this.end = end; // In milliseconds. - } - - function Deopt(time, size) { - this.time = time; // In milliseconds. - this.size = size; // In bytes. - } - - Range.prototype.duration = function() { return this.end - this.start; } - - function Tick(tick) { - this.tick = tick; - } - - var TimerEvents = { - 'V8.Execute': - new TimerEvent("execution", "#000000", false, 0), - 'V8.External': - new TimerEvent("external", "#3399FF", false, 0), - 'V8.CompileFullCode': - new TimerEvent("compile unopt", "#CC0000", true, 0), - 'V8.RecompileSynchronous': - new TimerEvent("recompile sync", "#CC0044", true, 0), - 'V8.RecompileConcurrent': - new TimerEvent("recompile async", "#CC4499", false, 1), - 'V8.CompileEvalMicroSeconds': - new TimerEvent("compile eval", "#CC4400", true, 0), - 'V8.ParseMicroSeconds': - new TimerEvent("parse", "#00CC00", true, 0), - 'V8.PreParseMicroSeconds': - new TimerEvent("preparse", "#44CC00", true, 0), - 'V8.ParseLazyMicroSeconds': - new TimerEvent("lazy parse", "#00CC44", true, 0), - 'V8.GCScavenger': - new TimerEvent("gc scavenge", "#0044CC", true, 0), - 'V8.GCCompactor': - new TimerEvent("gc compaction", "#4444CC", true, 0), - 'V8.GCContext': - new TimerEvent("gc context", "#4400CC", true, 0), - }; - - var CodeKinds = { - 'external ': new CodeKind("#3399FF", [-2]), - 'runtime ': new CodeKind("#000000", [-1]), - 'full code': new CodeKind("#DD0000", [0]), - 'opt code ': new CodeKind("#00EE00", [1]), - 'code stub': new CodeKind("#FF00FF", [2]), - 'built-in ': new CodeKind("#AA00AA", [3]), - 'inl.cache': new CodeKind("#4444AA", - [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]), - 'reg.exp. ': new CodeKind("#0000FF", [15]), - }; - - var code_map = new CodeMap(); - var execution_pauses = []; - var deopts = []; - var gettime = []; - var event_stack = []; - var last_time_stamp = []; - for (var i = 0; i < kNumThreads; i++) { - event_stack[i] = []; - last_time_stamp[i] = -1; - } - - var range_start = undefined; - var range_end = undefined; - var obj_index = 0; - var pause_tolerance = 0.005; // Milliseconds. - var distortion = 0; - - // Utility functions. - function assert(something, message) { - if (!something) { - var error = new Error(message); - error_output(error.stack); - } - } - - function FindCodeKind(kind) { - for (name in CodeKinds) { - if (CodeKinds[name].kinds.indexOf(kind) >= 0) { - return CodeKinds[name]; - } - } - } - - function TicksToRanges(ticks) { - var ranges = []; - for (var i = 0; i < ticks.length; i++) { - var tick = ticks[i].tick; - ranges.push( - new Range(tick - kTickHalfDuration, tick + kTickHalfDuration)); - } - return ranges; - } - - function MergeRanges(ranges) { - ranges.sort(function(a, b) { - return (a.start == b.start) ? a.end - b.end : a.start - b.start; - }); - var result = []; - var j = 0; - for (var i = 0; i < ranges.length; i = j) { - var merge_start = ranges[i].start; - if (merge_start > range_end) break; // Out of plot range. - var merge_end = ranges[i].end; - for (j = i + 1; j < ranges.length; j++) { - var next_range = ranges[j]; - // Don't merge ranges if there is no overlap (incl. merge tolerance). - if (next_range.start > merge_end + pause_tolerance) break; - // Merge ranges. - if (next_range.end > merge_end) { // Extend range end. - merge_end = next_range.end; - } - } - if (merge_end < range_start) continue; // Out of plot range. - if (merge_end < merge_start) continue; // Not an actual range. - result.push(new Range(merge_start, merge_end)); - } - return result; - } - - function RestrictRangesTo(ranges, start, end) { - var result = []; - for (var i = 0; i < ranges.length; i++) { - if (ranges[i].start <= end && ranges[i].end >= start) { - result.push(new Range(Math.max(ranges[i].start, start), - Math.min(ranges[i].end, end))); - } - } - return result; - } - - // Public methods. - this.collectData = function(input, distortion_per_entry) { - - var last_timestamp = 0; - - // Parse functions. - var parseTimeStamp = function(timestamp) { - int_timestamp = parseInt(timestamp); - assert(int_timestamp >= last_timestamp, "Inconsistent timestamps."); - last_timestamp = int_timestamp; - distortion += distortion_per_entry; - return int_timestamp / 1000 - distortion; - } - - var processTimerEventStart = function(name, start) { - // Find out the thread id. - var new_event = TimerEvents[name]; - if (new_event === undefined) return; - var thread_id = new_event.thread_id; - - start = Math.max(last_time_stamp[thread_id] + kMinRangeLength, start); - - // Last event on this thread is done with the start of this event. - var last_event = event_stack[thread_id].top(); - if (last_event !== undefined) { - var new_range = new Range(last_time_stamp[thread_id], start); - last_event.ranges.push(new_range); - } - event_stack[thread_id].push(new_event); - last_time_stamp[thread_id] = start; - }; - - var processTimerEventEnd = function(name, end) { - // Find out about the thread_id. - var finished_event = TimerEvents[name]; - var thread_id = finished_event.thread_id; - assert(finished_event === event_stack[thread_id].pop(), - "inconsistent event stack"); - - end = Math.max(last_time_stamp[thread_id] + kMinRangeLength, end); - - var new_range = new Range(last_time_stamp[thread_id], end); - finished_event.ranges.push(new_range); - last_time_stamp[thread_id] = end; - }; - - var processCodeCreateEvent = function(type, kind, address, size, name) { - var code_entry = new CodeMap.CodeEntry(size, name); - code_entry.kind = kind; - code_map.addCode(address, code_entry); - }; - - var processCodeMoveEvent = function(from, to) { - code_map.moveCode(from, to); - }; - - var processCodeDeleteEvent = function(address) { - code_map.deleteCode(address); - }; - - var processCodeDeoptEvent = function(time, size) { - deopts.push(new Deopt(time, size)); - } - - var processCurrentTimeEvent = function(time) { - gettime.push(time); - } - - var processSharedLibrary = function(name, start, end) { - var code_entry = new CodeMap.CodeEntry(end - start, name); - code_entry.kind = -3; // External code kind. - for (var i = 0; i < kV8BinarySuffixes.length; i++) { - var suffix = kV8BinarySuffixes[i]; - if (name.indexOf(suffix, name.length - suffix.length) >= 0) { - code_entry.kind = -1; // V8 runtime code kind. - break; - } - } - code_map.addLibrary(start, code_entry); - }; - - var processTickEvent = function( - pc, timer, unused_x, unused_y, vmstate, stack) { - var tick = new Tick(timer); - - var entry = code_map.findEntry(pc); - if (entry) FindCodeKind(entry.kind).in_execution.push(tick); - - for (var i = 0; i < kStackFrames; i++) { - if (!stack[i]) break; - var entry = code_map.findEntry(stack[i]); - if (entry) FindCodeKind(entry.kind).stack_frames[i].push(tick); - } - }; - // Collect data from log. - var logreader = new LogReader( - { 'timer-event-start': { parsers: [parseString, parseTimeStamp], - processor: processTimerEventStart }, - 'timer-event-end': { parsers: [parseString, parseTimeStamp], - processor: processTimerEventEnd }, - 'shared-library': { parsers: [parseString, parseInt, parseInt], - processor: processSharedLibrary }, - 'code-creation': { parsers: [parseString, parseInt, parseInt, - parseInt, parseString], - processor: processCodeCreateEvent }, - 'code-move': { parsers: [parseInt, parseInt], - processor: processCodeMoveEvent }, - 'code-delete': { parsers: [parseInt], - processor: processCodeDeleteEvent }, - 'code-deopt': { parsers: [parseTimeStamp, parseInt], - processor: processCodeDeoptEvent }, - 'current-time': { parsers: [parseTimeStamp], - processor: processCurrentTimeEvent }, - 'tick': { parsers: [parseInt, parseTimeStamp, parseString, - parseString, parseInt, parseVarArgs], - processor: processTickEvent } - }); - - var line; - while (line = input()) { - for (var s of line.split("\n")) logreader.processLogLine(s); - } - - // Collect execution pauses. - for (name in TimerEvents) { - var event = TimerEvents[name]; - if (!event.pause) continue; - var ranges = event.ranges; - for (var j = 0; j < ranges.length; j++) execution_pauses.push(ranges[j]); - } - execution_pauses = MergeRanges(execution_pauses); - }; - - - this.findPlotRange = function( - range_start_override, range_end_override, result_callback) { - var start_found = (range_start_override || range_start_override == 0); - var end_found = (range_end_override || range_end_override == 0); - range_start = start_found ? range_start_override : Infinity; - range_end = end_found ? range_end_override : -Infinity; - - if (!start_found || !end_found) { - for (name in TimerEvents) { - var ranges = TimerEvents[name].ranges; - for (var i = 0; i < ranges.length; i++) { - if (ranges[i].start < range_start && !start_found) { - range_start = ranges[i].start; - } - if (ranges[i].end > range_end && !end_found) { - range_end = ranges[i].end; - } - } - } - - for (codekind in CodeKinds) { - var ticks = CodeKinds[codekind].in_execution; - for (var i = 0; i < ticks.length; i++) { - if (ticks[i].tick < range_start && !start_found) { - range_start = ticks[i].tick; - } - if (ticks[i].tick > range_end && !end_found) { - range_end = ticks[i].tick; - } - } - } - } - // Set pause tolerance to something appropriate for the plot resolution - // to make it easier for gnuplot. - pause_tolerance = (range_end - range_start) / kResX / 10; - - if (typeof result_callback === 'function') { - result_callback(range_start, range_end); - } - }; - - - this.assembleOutput = function(output) { - output("set yrange [0:" + (num_timer_event + 1) + "]"); - output("set xlabel \"execution time in ms\""); - output("set xrange [" + range_start + ":" + range_end + "]"); - output("set style fill pattern 2 bo 1"); - output("set style rect fs solid 1 noborder"); - output("set style line 1 lt 1 lw 1 lc rgb \"#000000\""); - output("set border 15 lw 0.2"); // Draw thin border box. - output("set style line 2 lt 1 lw 1 lc rgb \"#9944CC\""); - output("set xtics out nomirror"); - output("unset key"); - - function DrawBarBase(color, start, end, top, bottom, transparency) { - obj_index++; - command = "set object " + obj_index + " rect"; - command += " from " + start + ", " + top; - command += " to " + end + ", " + bottom; - command += " fc rgb \"" + color + "\""; - if (transparency) { - command += " fs transparent solid " + transparency; - } - output(command); - } - - function DrawBar(row, color, start, end, width) { - DrawBarBase(color, start, end, row + width, row - width); - } - - function DrawHalfBar(row, color, start, end, width) { - DrawBarBase(color, start, end, row, row - width); - } - - var percentages = {}; - var total = 0; - for (var name in TimerEvents) { - var event = TimerEvents[name]; - var ranges = RestrictRangesTo(event.ranges, range_start, range_end); - var sum = - ranges.map(function(range) { return range.duration(); }) - .reduce(function(a, b) { return a + b; }, 0); - percentages[name] = (sum / (range_end - range_start) * 100).toFixed(1); - } - - // Plot deopts. - deopts.sort(function(a, b) { return b.size - a.size; }); - var max_deopt_size = deopts.length > 0 ? deopts[0].size : Infinity; - - for (var i = 0; i < deopts.length; i++) { - var deopt = deopts[i]; - DrawHalfBar(kDeoptRow, "#9944CC", deopt.time, - deopt.time + 10 * pause_tolerance, - deopt.size / max_deopt_size * kMaxDeoptLength); - } - - // Plot current time polls. - if (gettime.length > 1) { - var start = gettime[0]; - var end = gettime.pop(); - DrawBarBase("#0000BB", start, end, kGetTimeHeight, 0, 0.2); - } - - // Name Y-axis. - var ytics = []; - for (name in TimerEvents) { - var index = TimerEvents[name].index; - var label = TimerEvents[name].label; - ytics.push('"' + label + ' (' + percentages[name] + '%%)" ' + index); - } - ytics.push('"code kind color coding" ' + kY1Offset); - ytics.push('"code kind in execution" ' + (kY1Offset - 1)); - ytics.push('"top ' + kStackFrames + ' js stack frames"' + ' ' + - (kY1Offset - 2)); - ytics.push('"pause times" 0'); - ytics.push('"max deopt size: ' + (max_deopt_size / 1024).toFixed(1) + - ' kB" ' + kDeoptRow); - output("set ytics out nomirror (" + ytics.join(', ') + ")"); - - // Plot timeline. - for (var name in TimerEvents) { - var event = TimerEvents[name]; - var ranges = MergeRanges(event.ranges); - for (var i = 0; i < ranges.length; i++) { - DrawBar(event.index, event.color, - ranges[i].start, ranges[i].end, - kTimerEventWidth); - } - } - - // Plot code kind gathered from ticks. - for (var name in CodeKinds) { - var code_kind = CodeKinds[name]; - var offset = kY1Offset - 1; - // Top most frame. - var row = MergeRanges(TicksToRanges(code_kind.in_execution)); - for (var j = 0; j < row.length; j++) { - DrawBar(offset, code_kind.color, - row[j].start, row[j].end, kExecutionFrameWidth); - } - offset = offset - 2 * kExecutionFrameWidth - kGapWidth; - // Javascript frames. - for (var i = 0; i < kStackFrames; i++) { - offset = offset - 2 * kStackFrameWidth - kGapWidth; - row = MergeRanges(TicksToRanges(code_kind.stack_frames[i])); - for (var j = 0; j < row.length; j++) { - DrawBar(offset, code_kind.color, - row[j].start, row[j].end, kStackFrameWidth); - } - } - } - - // Add labels as legend for code kind colors. - var padding = kCodeKindLabelPadding * (range_end - range_start) / kResX; - var label_x = range_start; - var label_y = kY1Offset; - for (var name in CodeKinds) { - label_x += padding; - output("set label \"" + name + "\" at " + label_x + "," + label_y + - " textcolor rgb \"" + CodeKinds[name].color + "\"" + - " font \"Helvetica,9'\""); - obj_index++; - } - - if (execution_pauses.length == 0) { - // Force plot and return without plotting execution pause impulses. - output("plot 1/0"); - return; - } - - // Label the longest pauses. - execution_pauses = - RestrictRangesTo(execution_pauses, range_start, range_end); - execution_pauses.sort(function(a, b) { - if (a.duration() == b.duration() && b.end == a.end) - return b.start - a.start; - - return (a.duration() == b.duration()) - ? b.end - a.end : b.duration() - a.duration(); - }); - - var max_pause_time = execution_pauses.length > 0 - ? execution_pauses[0].duration() : 0; - padding = kPauseLabelPadding * (range_end - range_start) / kResX; - var y_scale = kY1Offset / max_pause_time / 2; - for (var i = 0; i < execution_pauses.length && i < kNumPauseLabels; i++) { - var pause = execution_pauses[i]; - var label_content = (pause.duration() | 0) + " ms"; - var label_x = pause.end + padding; - var label_y = Math.max(1, (pause.duration() * y_scale)); - output("set label \"" + label_content + "\" at " + - label_x + "," + label_y + " font \"Helvetica,7'\""); - obj_index++; - } - - // Scale second Y-axis appropriately. - var y2range = max_pause_time * num_timer_event / kY1Offset * 2; - output("set y2range [0:" + y2range + "]"); - // Plot graph with impulses as data set. - output("plot '-' using 1:2 axes x1y2 with impulses ls 1"); - for (var i = 0; i < execution_pauses.length; i++) { - var pause = execution_pauses[i]; - output(pause.end + " " + pause.duration()); - obj_index++; - } - output("e"); - return obj_index; - }; -} diff --git a/deps/v8/tools/profviz/gnuplot-4.6.3-emscripten.js b/deps/v8/tools/profviz/gnuplot-4.6.3-emscripten.js deleted file mode 100644 index 99a986eb803671..00000000000000 --- a/deps/v8/tools/profviz/gnuplot-4.6.3-emscripten.js +++ /dev/null @@ -1,4658 +0,0 @@ -// Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley -// -// Permission to use, copy, and distribute this software and its -// documentation for any purpose with or without fee is hereby granted, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. -// -// Permission to modify the software is granted, but not the right to -// distribute the complete modified source code. Modifications are to -// be distributed as patches to the released version. Permission to -// distribute binaries produced by compiling modified sources is granted, -// provided you -// 1. distribute the corresponding source modifications from the -// released version in the form of a patch file along with the binaries, -// 2. add special version identification to distinguish your version -// in addition to the base release version number, -// 3. provide your name and address as the primary contact for the -// support of your modified version, and -// 4. retain our contact information in regard to use of the base -// software. -// Permission to distribute the released version of the source code along -// with corresponding source modifications in the form of a patch file is -// granted with same provisions 2 through 4 for binary distributions. -// -// This software is provided "as is" without express or implied warranty -// to the extent permitted by applicable law. - -// This Javascript port of gnuplot 4.6.3 [1] has been generated using -// Emscripten [2]. This port has been made possible by Christian Huettig [3], -// whose changes to gnuplot's source files can be found below [4] in -// accordance to gnuplot's copyright. -// -// [1] http://www.gnuplot.info/ -// [2] https://github.com/kripken/emscripten/ -// [3] https://github.com/chhu/gnuplot-JS -// [4] Patch to gnuplot 4.6.3 -// --- gnuplot-4.6.3/src/axis.c 2012-11-08 18:13:08.000000000 +0100 -// +++ gnuplot-4.6.3_mod/src/axis.c 2013-05-11 11:08:08.791587160 +0200 -// @@ -467,8 +467,9 @@ copy_or_invent_formatstring(AXIS_INDEX a -// int precision = (ceil(-log10(fabs(axmax-axmin)))); -// if ((axmin*axmax > 0) && precision > 4) -// sprintf(ticfmt[axis],"%%.%df", (precision>14) ? 14 : precision); -// + else -// + strcpy(ticfmt[axis], "%g"); -// } -// - -// return ticfmt[axis]; -// } - -var Module = { - 'noInitialRun': true, - print: function(text) { - self.postMessage({'transaction': -1, 'content': text}); - }, - printErr: function(text) { - self.postMessage({'transaction': -2, 'content': text}); - }, -}; -function gnuplot_create() { -// Note: For maximum-speed code, see "Optimizing Code" on the Emscripten wiki, https://github.com/kripken/emscripten/wiki/Optimizing-Code -// Note: Some Emscripten settings may limit the speed of the generated code. -try { - this['Module'] = Module; - Module.test; -} catch(e) { - this['Module'] = Module = {}; -} -// The environment setup code below is customized to use Module. -// *** Environment setup code *** -var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function'; -var ENVIRONMENT_IS_WEB = typeof window === 'object'; -var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; -var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; -if (typeof module === "object") { - module.exports = Module; -} -if (ENVIRONMENT_IS_NODE) { - // Expose functionality in the same simple way that the shells work - // Note that we pollute the global namespace here, otherwise we break in node - Module['print'] = function(x) { - process['stdout'].write(x + '\n'); - }; - Module['printErr'] = function(x) { - process['stderr'].write(x + '\n'); - }; - var nodeFS = require('fs'); - var nodePath = require('path'); - Module['read'] = function(filename, binary) { - filename = nodePath['normalize'](filename); - var ret = nodeFS['readFileSync'](filename); - // The path is absolute if the normalized version is the same as the resolved. - if (!ret && filename != nodePath['resolve'](filename)) { - filename = path.join(__dirname, '..', 'src', filename); - ret = nodeFS['readFileSync'](filename); - } - if (ret && !binary) ret = ret.toString(); - return ret; - }; - Module['readBinary'] = function(filename) { return Module['read'](filename, true) }; - Module['load'] = function(f) { - globalEval(read(f)); - }; - if (!Module['arguments']) { - Module['arguments'] = process['argv'].slice(2); - } -} -if (ENVIRONMENT_IS_SHELL) { - Module['print'] = print; - if (typeof printErr != 'undefined') Module['printErr'] = printErr; // not present in v8 or older sm - Module['read'] = read; - Module['readBinary'] = function(f) { - return read(f, 'binary'); - }; - if (!Module['arguments']) { - if (typeof scriptArgs != 'undefined') { - Module['arguments'] = scriptArgs; - } else if (typeof arguments != 'undefined') { - Module['arguments'] = arguments; - } - } -} -if (ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER) { - if (!Module['print']) { - Module['print'] = function(x) { - console.log(x); - }; - } - if (!Module['printErr']) { - Module['printErr'] = function(x) { - console.log(x); - }; - } -} -if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { - Module['read'] = function(url) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, false); - xhr.send(null); - return xhr.responseText; - }; - if (!Module['arguments']) { - if (typeof arguments != 'undefined') { - Module['arguments'] = arguments; - } - } -} -if (ENVIRONMENT_IS_WORKER) { - // We can do very little here... - var TRY_USE_DUMP = false; - if (!Module['print']) { - Module['print'] = (TRY_USE_DUMP && (typeof(dump) !== "undefined") ? (function(x) { - dump(x); - }) : (function(x) { - // self.postMessage(x); // enable this if you want stdout to be sent as messages - })); - } - Module['load'] = importScripts; -} -if (!ENVIRONMENT_IS_WORKER && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_SHELL) { - // Unreachable because SHELL is dependent on the others - throw 'Unknown runtime environment. Where are we?'; -} -function globalEval(x) { - eval.call(null, x); -} -if (!Module['load'] == 'undefined' && Module['read']) { - Module['load'] = function(f) { - globalEval(Module['read'](f)); - }; -} -if (!Module['print']) { - Module['print'] = function(){}; -} -if (!Module['printErr']) { - Module['printErr'] = Module['print']; -} -if (!Module['arguments']) { - Module['arguments'] = []; -} -// *** Environment setup code *** -// Closure helpers -Module.print = Module['print']; -Module.printErr = Module['printErr']; -// Callbacks -if (!Module['preRun']) Module['preRun'] = []; -if (!Module['postRun']) Module['postRun'] = []; -// === Auto-generated preamble library stuff === -//======================================== -// Runtime code shared with compiler -//======================================== -var Runtime = { - stackSave: function () { - return STACKTOP; - }, - stackRestore: function (stackTop) { - STACKTOP = stackTop; - }, - forceAlign: function (target, quantum) { - quantum = quantum || 4; - if (quantum == 1) return target; - if (isNumber(target) && isNumber(quantum)) { - return Math.ceil(target/quantum)*quantum; - } else if (isNumber(quantum) && isPowerOfTwo(quantum)) { - var logg = log2(quantum); - return '((((' +target + ')+' + (quantum-1) + ')>>' + logg + ')<<' + logg + ')'; - } - return 'Math.ceil((' + target + ')/' + quantum + ')*' + quantum; - }, - isNumberType: function (type) { - return type in Runtime.INT_TYPES || type in Runtime.FLOAT_TYPES; - }, - isPointerType: function isPointerType(type) { - return type[type.length-1] == '*'; -}, - isStructType: function isStructType(type) { - if (isPointerType(type)) return false; - if (isArrayType(type)) return true; - if (/?/.test(type)) return true; // { i32, i8 } etc. - anonymous struct types - // See comment in isStructPointerType() - return type[0] == '%'; -}, - INT_TYPES: {"i1":0,"i8":0,"i16":0,"i32":0,"i64":0}, - FLOAT_TYPES: {"float":0,"double":0}, - or64: function (x, y) { - var l = (x | 0) | (y | 0); - var h = (Math.round(x / 4294967296) | Math.round(y / 4294967296)) * 4294967296; - return l + h; - }, - and64: function (x, y) { - var l = (x | 0) & (y | 0); - var h = (Math.round(x / 4294967296) & Math.round(y / 4294967296)) * 4294967296; - return l + h; - }, - xor64: function (x, y) { - var l = (x | 0) ^ (y | 0); - var h = (Math.round(x / 4294967296) ^ Math.round(y / 4294967296)) * 4294967296; - return l + h; - }, - getNativeTypeSize: function (type, quantumSize) { - if (Runtime.QUANTUM_SIZE == 1) return 1; - var size = { - '%i1': 1, - '%i8': 1, - '%i16': 2, - '%i32': 4, - '%i64': 8, - "%float": 4, - "%double": 8 - }['%'+type]; // add '%' since float and double confuse Closure compiler as keys, and also spidermonkey as a compiler will remove 's from '_i8' etc - if (!size) { - if (type.charAt(type.length-1) == '*') { - size = Runtime.QUANTUM_SIZE; // A pointer - } else if (type[0] == 'i') { - var bits = parseInt(type.substr(1)); - assert(bits % 8 == 0); - size = bits/8; - } - } - return size; - }, - getNativeFieldSize: function (type) { - return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE); - }, - dedup: function dedup(items, ident) { - var seen = {}; - if (ident) { - return items.filter(function(item) { - if (seen[item[ident]]) return false; - seen[item[ident]] = true; - return true; - }); - } else { - return items.filter(function(item) { - if (seen[item]) return false; - seen[item] = true; - return true; - }); - } -}, - set: function set() { - var args = typeof arguments[0] === 'object' ? arguments[0] : arguments; - var ret = {}; - for (var i = 0; i < args.length; i++) { - ret[args[i]] = 0; - } - return ret; -}, - STACK_ALIGN: 8, - getAlignSize: function (type, size, vararg) { - // we align i64s and doubles on 64-bit boundaries, unlike x86 - if (type == 'i64' || type == 'double' || vararg) return 8; - if (!type) return Math.min(size, 8); // align structures internally to 64 bits - return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE); - }, - calculateStructAlignment: function calculateStructAlignment(type) { - type.flatSize = 0; - type.alignSize = 0; - var diffs = []; - var prev = -1; - type.flatIndexes = type.fields.map(function(field) { - var size, alignSize; - if (Runtime.isNumberType(field) || Runtime.isPointerType(field)) { - size = Runtime.getNativeTypeSize(field); // pack char; char; in structs, also char[X]s. - alignSize = Runtime.getAlignSize(field, size); - } else if (Runtime.isStructType(field)) { - size = Types.types[field].flatSize; - alignSize = Runtime.getAlignSize(null, Types.types[field].alignSize); - } else if (field[0] == 'b') { - // bN, large number field, like a [N x i8] - size = field.substr(1)|0; - alignSize = 1; - } else { - throw 'Unclear type in struct: ' + field + ', in ' + type.name_ + ' :: ' + dump(Types.types[type.name_]); - } - if (type.packed) alignSize = 1; - type.alignSize = Math.max(type.alignSize, alignSize); - var curr = Runtime.alignMemory(type.flatSize, alignSize); // if necessary, place this on aligned memory - type.flatSize = curr + size; - if (prev >= 0) { - diffs.push(curr-prev); - } - prev = curr; - return curr; - }); - type.flatSize = Runtime.alignMemory(type.flatSize, type.alignSize); - if (diffs.length == 0) { - type.flatFactor = type.flatSize; - } else if (Runtime.dedup(diffs).length == 1) { - type.flatFactor = diffs[0]; - } - type.needsFlattening = (type.flatFactor != 1); - return type.flatIndexes; - }, - generateStructInfo: function (struct, typeName, offset) { - var type, alignment; - if (typeName) { - offset = offset || 0; - type = (typeof Types === 'undefined' ? Runtime.typeInfo : Types.types)[typeName]; - if (!type) return null; - if (type.fields.length != struct.length) { - printErr('Number of named fields must match the type for ' + typeName + ': possibly duplicate struct names. Cannot return structInfo'); - return null; - } - alignment = type.flatIndexes; - } else { - var type = { fields: struct.map(function(item) { return item[0] }) }; - alignment = Runtime.calculateStructAlignment(type); - } - var ret = { - __size__: type.flatSize - }; - if (typeName) { - struct.forEach(function(item, i) { - if (typeof item === 'string') { - ret[item] = alignment[i] + offset; - } else { - // embedded struct - var key; - for (var k in item) key = k; - ret[key] = Runtime.generateStructInfo(item[key], type.fields[i], alignment[i]); - } - }); - } else { - struct.forEach(function(item, i) { - ret[item[1]] = alignment[i]; - }); - } - return ret; - }, - dynCall: function (sig, ptr, args) { - if (args && args.length) { - if (!args.splice) args = Array.prototype.slice.call(args); - args.splice(0, 0, ptr); - return Module['dynCall_' + sig].apply(null, args); - } else { - return Module['dynCall_' + sig].call(null, ptr); - } - }, - functionPointers: [], - addFunction: function (func) { - for (var i = 0; i < Runtime.functionPointers.length; i++) { - if (!Runtime.functionPointers[i]) { - Runtime.functionPointers[i] = func; - return 2 + 2*i; - } - } - throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; - }, - removeFunction: function (index) { - Runtime.functionPointers[(index-2)/2] = null; - }, - warnOnce: function (text) { - if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {}; - if (!Runtime.warnOnce.shown[text]) { - Runtime.warnOnce.shown[text] = 1; - Module.printErr(text); - } - }, - funcWrappers: {}, - getFuncWrapper: function (func, sig) { - assert(sig); - if (!Runtime.funcWrappers[func]) { - Runtime.funcWrappers[func] = function() { - return Runtime.dynCall(sig, func, arguments); - }; - } - return Runtime.funcWrappers[func]; - }, - UTF8Processor: function () { - var buffer = []; - var needed = 0; - this.processCChar = function (code) { - code = code & 0xff; - if (needed) { - buffer.push(code); - needed--; - } - if (buffer.length == 0) { - if (code < 128) return String.fromCharCode(code); - buffer.push(code); - if (code > 191 && code < 224) { - needed = 1; - } else { - needed = 2; - } - return ''; - } - if (needed > 0) return ''; - var c1 = buffer[0]; - var c2 = buffer[1]; - var c3 = buffer[2]; - var ret; - if (c1 > 191 && c1 < 224) { - ret = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63)); - } else { - ret = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); - } - buffer.length = 0; - return ret; - } - this.processJSString = function(string) { - string = unescape(encodeURIComponent(string)); - var ret = []; - for (var i = 0; i < string.length; i++) { - ret.push(string.charCodeAt(i)); - } - return ret; - } - }, - stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = ((((STACKTOP)+7)>>3)<<3); return ret; }, - staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = ((((STATICTOP)+7)>>3)<<3); return ret; }, - dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = ((((DYNAMICTOP)+7)>>3)<<3); if (DYNAMICTOP >= TOTAL_MEMORY) enlargeMemory();; return ret; }, - alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 8))*(quantum ? quantum : 8); return ret; }, - makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+(((low)>>>(0))))+((+(((high)>>>(0))))*(+(4294967296)))) : ((+(((low)>>>(0))))+((+(((high)|(0))))*(+(4294967296))))); return ret; }, - GLOBAL_BASE: 8, - QUANTUM_SIZE: 4, - __dummy__: 0 -} -//======================================== -// Runtime essentials -//======================================== -var __THREW__ = 0; // Used in checking for thrown exceptions. -var ABORT = false; // whether we are quitting the application. no code should run after this. set in exit() and abort() -var undef = 0; -// tempInt is used for 32-bit signed values or smaller. tempBigInt is used -// for 32-bit unsigned values or more than 32 bits. TODO: audit all uses of tempInt -var tempValue, tempInt, tempBigInt, tempInt2, tempBigInt2, tempPair, tempBigIntI, tempBigIntR, tempBigIntS, tempBigIntP, tempBigIntD; -var tempI64, tempI64b; -var tempRet0, tempRet1, tempRet2, tempRet3, tempRet4, tempRet5, tempRet6, tempRet7, tempRet8, tempRet9; -function abort(text) { - Module.print(text + ':\n' + (new Error).stack); - ABORT = true; - throw "Assertion: " + text; -} -function assert(condition, text) { - if (!condition) { - abort('Assertion failed: ' + text); - } -} -var globalScope = this; -// C calling interface. A convenient way to call C functions (in C files, or -// defined with extern "C"). -// -// Note: LLVM optimizations can inline and remove functions, after which you will not be -// able to call them. Closure can also do so. To avoid that, add your function to -// the exports using something like -// -// -s EXPORTED_FUNCTIONS='["_main", "_myfunc"]' -// -// @param ident The name of the C function (note that C++ functions will be name-mangled - use extern "C") -// @param returnType The return type of the function, one of the JS types 'number', 'string' or 'array' (use 'number' for any C pointer, and -// 'array' for JavaScript arrays and typed arrays). -// @param argTypes An array of the types of arguments for the function (if there are no arguments, this can be omitted). Types are as in returnType, -// except that 'array' is not possible (there is no way for us to know the length of the array) -// @param args An array of the arguments to the function, as native JS values (as in returnType) -// Note that string arguments will be stored on the stack (the JS string will become a C string on the stack). -// @return The return value, as a native JS value (as in returnType) -function ccall(ident, returnType, argTypes, args) { - return ccallFunc(getCFunc(ident), returnType, argTypes, args); -} -Module["ccall"] = ccall; -// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) -function getCFunc(ident) { - try { - var func = globalScope['Module']['_' + ident]; // closure exported function - if (!func) func = eval('_' + ident); // explicit lookup - } catch(e) { - } - assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)'); - return func; -} -// Internal function that does a C call using a function, not an identifier -function ccallFunc(func, returnType, argTypes, args) { - var stack = 0; - function toC(value, type) { - if (type == 'string') { - if (value === null || value === undefined || value === 0) return 0; // null string - if (!stack) stack = Runtime.stackSave(); - var ret = Runtime.stackAlloc(value.length+1); - writeStringToMemory(value, ret); - return ret; - } else if (type == 'array') { - if (!stack) stack = Runtime.stackSave(); - var ret = Runtime.stackAlloc(value.length); - writeArrayToMemory(value, ret); - return ret; - } - return value; - } - function fromC(value, type) { - if (type == 'string') { - return Pointer_stringify(value); - } - assert(type != 'array'); - return value; - } - var i = 0; - var cArgs = args ? args.map(function(arg) { - return toC(arg, argTypes[i++]); - }) : []; - var ret = fromC(func.apply(null, cArgs), returnType); - if (stack) Runtime.stackRestore(stack); - return ret; -} -// Returns a native JS wrapper for a C function. This is similar to ccall, but -// returns a function you can call repeatedly in a normal way. For example: -// -// var my_function = cwrap('my_c_function', 'number', ['number', 'number']); -// alert(my_function(5, 22)); -// alert(my_function(99, 12)); -// -function cwrap(ident, returnType, argTypes) { - var func = getCFunc(ident); - return function() { - return ccallFunc(func, returnType, argTypes, Array.prototype.slice.call(arguments)); - } -} -Module["cwrap"] = cwrap; -// Sets a value in memory in a dynamic way at run-time. Uses the -// type data. This is the same as makeSetValue, except that -// makeSetValue is done at compile-time and generates the needed -// code then, whereas this function picks the right code at -// run-time. -// Note that setValue and getValue only do *aligned* writes and reads! -// Note that ccall uses JS types as for defining types, while setValue and -// getValue need LLVM types ('i8', 'i32') - this is a lower-level operation -function setValue(ptr, value, type, noSafe) { - type = type || 'i8'; - if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit - switch(type) { - case 'i1': HEAP8[(ptr)]=value; break; - case 'i8': HEAP8[(ptr)]=value; break; - case 'i16': HEAP16[((ptr)>>1)]=value; break; - case 'i32': HEAP32[((ptr)>>2)]=value; break; - case 'i64': (tempI64 = [value>>>0,Math.min(Math.floor((value)/(+(4294967296))), (+(4294967295)))>>>0],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; - case 'float': HEAPF32[((ptr)>>2)]=value; break; - case 'double': HEAPF64[((ptr)>>3)]=value; break; - default: abort('invalid type for setValue: ' + type); - } -} -Module['setValue'] = setValue; -// Parallel to setValue. -function getValue(ptr, type, noSafe) { - type = type || 'i8'; - if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit - switch(type) { - case 'i1': return HEAP8[(ptr)]; - case 'i8': return HEAP8[(ptr)]; - case 'i16': return HEAP16[((ptr)>>1)]; - case 'i32': return HEAP32[((ptr)>>2)]; - case 'i64': return HEAP32[((ptr)>>2)]; - case 'float': return HEAPF32[((ptr)>>2)]; - case 'double': return HEAPF64[((ptr)>>3)]; - default: abort('invalid type for setValue: ' + type); - } - return null; -} -Module['getValue'] = getValue; -var ALLOC_NORMAL = 0; // Tries to use _malloc() -var ALLOC_STACK = 1; // Lives for the duration of the current function call -var ALLOC_STATIC = 2; // Cannot be freed -var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk -var ALLOC_NONE = 4; // Do not allocate -Module['ALLOC_NORMAL'] = ALLOC_NORMAL; -Module['ALLOC_STACK'] = ALLOC_STACK; -Module['ALLOC_STATIC'] = ALLOC_STATIC; -Module['ALLOC_DYNAMIC'] = ALLOC_DYNAMIC; -Module['ALLOC_NONE'] = ALLOC_NONE; -// allocate(): This is for internal use. You can use it yourself as well, but the interface -// is a little tricky (see docs right below). The reason is that it is optimized -// for multiple syntaxes to save space in generated code. So you should -// normally not use allocate(), and instead allocate memory using _malloc(), -// initialize it with setValue(), and so forth. -// @slab: An array of data, or a number. If a number, then the size of the block to allocate, -// in *bytes* (note that this is sometimes confusing: the next parameter does not -// affect this!) -// @types: Either an array of types, one for each byte (or 0 if no type at that position), -// or a single type which is used for the entire block. This only matters if there -// is initial data - if @slab is a number, then this does not matter at all and is -// ignored. -// @allocator: How to allocate memory, see ALLOC_* -function allocate(slab, types, allocator, ptr) { - var zeroinit, size; - if (typeof slab === 'number') { - zeroinit = true; - size = slab; - } else { - zeroinit = false; - size = slab.length; - } - var singleType = typeof types === 'string' ? types : null; - var ret; - if (allocator == ALLOC_NONE) { - ret = ptr; - } else { - ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length)); - } - if (zeroinit) { - var ptr = ret, stop; - assert((ret & 3) == 0); - stop = ret + (size & ~3); - for (; ptr < stop; ptr += 4) { - HEAP32[((ptr)>>2)]=0; - } - stop = ret + size; - while (ptr < stop) { - HEAP8[((ptr++)|0)]=0; - } - return ret; - } - if (singleType === 'i8') { - if (slab.subarray || slab.slice) { - HEAPU8.set(slab, ret); - } else { - HEAPU8.set(new Uint8Array(slab), ret); - } - return ret; - } - var i = 0, type, typeSize, previousType; - while (i < size) { - var curr = slab[i]; - if (typeof curr === 'function') { - curr = Runtime.getFunctionIndex(curr); - } - type = singleType || types[i]; - if (type === 0) { - i++; - continue; - } - if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later - setValue(ret+i, curr, type); - // no need to look up size unless type changes, so cache it - if (previousType !== type) { - typeSize = Runtime.getNativeTypeSize(type); - previousType = type; - } - i += typeSize; - } - return ret; -} -Module['allocate'] = allocate; -function Pointer_stringify(ptr, /* optional */ length) { - // Find the length, and check for UTF while doing so - var hasUtf = false; - var t; - var i = 0; - while (1) { - t = HEAPU8[(((ptr)+(i))|0)]; - if (t >= 128) hasUtf = true; - else if (t == 0 && !length) break; - i++; - if (length && i == length) break; - } - if (!length) length = i; - var ret = ''; - if (!hasUtf) { - var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack - var curr; - while (length > 0) { - curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK))); - ret = ret ? ret + curr : curr; - ptr += MAX_CHUNK; - length -= MAX_CHUNK; - } - return ret; - } - var utf8 = new Runtime.UTF8Processor(); - for (i = 0; i < length; i++) { - t = HEAPU8[(((ptr)+(i))|0)]; - ret += utf8.processCChar(t); - } - return ret; -} -Module['Pointer_stringify'] = Pointer_stringify; -// Memory management -var PAGE_SIZE = 4096; -function alignMemoryPage(x) { - return ((x+4095)>>12)<<12; -} -var HEAP; -var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; -var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area -var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area -var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk -function enlargeMemory() { - abort('Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value, or (2) set Module.TOTAL_MEMORY before the program runs.'); -} -var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; -var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; -var FAST_MEMORY = Module['FAST_MEMORY'] || 2097152; -// Initialize the runtime's memory -// check for full engine support (use string 'subarray' to avoid closure compiler confusion) -assert(!!Int32Array && !!Float64Array && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']), - 'Cannot fallback to non-typed array case: Code is too specialized'); -var buffer = new ArrayBuffer(TOTAL_MEMORY); -HEAP8 = new Int8Array(buffer); -HEAP16 = new Int16Array(buffer); -HEAP32 = new Int32Array(buffer); -HEAPU8 = new Uint8Array(buffer); -HEAPU16 = new Uint16Array(buffer); -HEAPU32 = new Uint32Array(buffer); -HEAPF32 = new Float32Array(buffer); -HEAPF64 = new Float64Array(buffer); -// Endianness check (note: assumes compiler arch was little-endian) -HEAP32[0] = 255; -assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system'); -Module['HEAP'] = HEAP; -Module['HEAP8'] = HEAP8; -Module['HEAP16'] = HEAP16; -Module['HEAP32'] = HEAP32; -Module['HEAPU8'] = HEAPU8; -Module['HEAPU16'] = HEAPU16; -Module['HEAPU32'] = HEAPU32; -Module['HEAPF32'] = HEAPF32; -Module['HEAPF64'] = HEAPF64; -function callRuntimeCallbacks(callbacks) { - while(callbacks.length > 0) { - var callback = callbacks.shift(); - if (typeof callback == 'function') { - callback(); - continue; - } - var func = callback.func; - if (typeof func === 'number') { - if (callback.arg === undefined) { - Runtime.dynCall('v', func); - } else { - Runtime.dynCall('vi', func, [callback.arg]); - } - } else { - func(callback.arg === undefined ? null : callback.arg); - } - } -} -var __ATINIT__ = []; // functions called during startup -var __ATMAIN__ = []; // functions called when main() is to be run -var __ATEXIT__ = []; // functions called during shutdown -var runtimeInitialized = false; -function ensureInitRuntime() { - if (runtimeInitialized) return; - runtimeInitialized = true; - callRuntimeCallbacks(__ATINIT__); -} -function preMain() { - callRuntimeCallbacks(__ATMAIN__); -} -function exitRuntime() { - callRuntimeCallbacks(__ATEXIT__); -} -// Tools -// This processes a JS string into a C-line array of numbers, 0-terminated. -// For LLVM-originating strings, see parser.js:parseLLVMString function -function intArrayFromString(stringy, dontAddNull, length /* optional */) { - var ret = (new Runtime.UTF8Processor()).processJSString(stringy); - if (length) { - ret.length = length; - } - if (!dontAddNull) { - ret.push(0); - } - return ret; -} -Module['intArrayFromString'] = intArrayFromString; -function intArrayToString(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - var chr = array[i]; - if (chr > 0xFF) { - chr &= 0xFF; - } - ret.push(String.fromCharCode(chr)); - } - return ret.join(''); -} -Module['intArrayToString'] = intArrayToString; -// Write a Javascript array to somewhere in the heap -function writeStringToMemory(string, buffer, dontAddNull) { - var array = intArrayFromString(string, dontAddNull); - var i = 0; - while (i < array.length) { - var chr = array[i]; - HEAP8[(((buffer)+(i))|0)]=chr - i = i + 1; - } -} -Module['writeStringToMemory'] = writeStringToMemory; -function writeArrayToMemory(array, buffer) { - for (var i = 0; i < array.length; i++) { - HEAP8[(((buffer)+(i))|0)]=array[i]; - } -} -Module['writeArrayToMemory'] = writeArrayToMemory; -function unSign(value, bits, ignore, sig) { - if (value >= 0) { - return value; - } - return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts - : Math.pow(2, bits) + value; -} -function reSign(value, bits, ignore, sig) { - if (value <= 0) { - return value; - } - var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 - : Math.pow(2, bits-1); - if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that - // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors - // TODO: In i64 mode 1, resign the two parts separately and safely - value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts - } - return value; -} -if (!Math['imul']) Math['imul'] = function(a, b) { - var ah = a >>> 16; - var al = a & 0xffff; - var bh = b >>> 16; - var bl = b & 0xffff; - return (al*bl + ((ah*bl + al*bh) << 16))|0; -}; -// A counter of dependencies for calling run(). If we need to -// do asynchronous work before running, increment this and -// decrement it. Incrementing must happen in a place like -// PRE_RUN_ADDITIONS (used by emcc to add file preloading). -// Note that you can add dependencies in preRun, even though -// it happens right before run - run will be postponed until -// the dependencies are met. -var runDependencies = 0; -var runDependencyTracking = {}; -var calledInit = false, calledRun = false; -var runDependencyWatcher = null; -function addRunDependency(id) { - runDependencies++; - if (Module['monitorRunDependencies']) { - Module['monitorRunDependencies'](runDependencies); - } - if (id) { - assert(!runDependencyTracking[id]); - runDependencyTracking[id] = 1; - } else { - Module.printErr('warning: run dependency added without ID'); - } -} -Module['addRunDependency'] = addRunDependency; -function removeRunDependency(id) { - runDependencies--; - if (Module['monitorRunDependencies']) { - Module['monitorRunDependencies'](runDependencies); - } - if (id) { - assert(runDependencyTracking[id]); - delete runDependencyTracking[id]; - } else { - Module.printErr('warning: run dependency removed without ID'); - } - if (runDependencies == 0) { - if (runDependencyWatcher !== null) { - clearInterval(runDependencyWatcher); - runDependencyWatcher = null; - } - // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) - if (!calledRun && shouldRunNow) run(); - } -} -Module['removeRunDependency'] = removeRunDependency; -Module["preloadedImages"] = {}; // maps url to image data -Module["preloadedAudios"] = {}; // maps url to audio data -function addPreRun(func) { - if (!Module['preRun']) Module['preRun'] = []; - else if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; - Module['preRun'].push(func); -} -var awaitingMemoryInitializer = false; -function loadMemoryInitializer(filename) { - function applyData(data) { - HEAPU8.set(data, STATIC_BASE); - runPostSets(); - } - // always do this asynchronously, to keep shell and web as similar as possible - addPreRun(function() { - if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { - applyData(Module['readBinary'](filename)); - } else { - Browser.asyncLoad(filename, function(data) { - applyData(data); - }, function(data) { - throw 'could not load memory initializer ' + filename; - }); - } - }); - awaitingMemoryInitializer = false; -} -// === Body === -STATIC_BASE = 8; -STATICTOP = STATIC_BASE + 243440; -var _stdout; -var _stdin; -var _stderr; -var _stdout = _stdout=allocate([0,0,0,0,0,0,0,0], "i8", ALLOC_STATIC); -var _stdin = _stdin=allocate([0,0,0,0,0,0,0,0], "i8", ALLOC_STATIC); -var _stderr = _stderr=allocate([0,0,0,0,0,0,0,0], "i8", ALLOC_STATIC); -/* memory initializer */ allocate([0,0,128,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,71,110,117,112,108,111,116,80,0,0,0,0,0,0,0,90,71,110,117,112,108,111,116,68,0,0,0,0,0,0,0,90,71,110,117,112,108,111,116,0,0,0,0,0,0,0,0,58,140,48,226,142,121,69,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,139,1,0,240,84,3,0,80,126,1,0,0,0,0,0,80,131,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,134,1,0,248,132,1,0,232,123,1,0,0,0,0,0,224,128,1,0,0,0,0,0,0,85,1,0,8,0,0,0,208,80,1,0,9,0,0,0,192,76,1,0,10,0,0,0,64,73,1,0,13,0,0,0,240,70,1,0,27,0,0,0,40,67,1,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,244,1,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,0,0,1,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,3,0,0,0,1,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,154,153,153,153,153,153,169,63,184,30,133,235,81,184,158,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,2,0,0,0,1,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,123,20,174,71,225,122,148,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,118,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,193,1,0,16,189,1,0,16,220,1,0,192,222,1,0,0,0,0,0,96,133,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,253,1,0,0,0,0,0,160,149,1,0,32,148,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,1,0,0,0,20,0,0,0,26,0,0,0,21,0,0,0,27,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,26,1,0,0,0,0,0,0,2,0,0,0,94,1,0,0,1,0,0,0,2,0,0,0,88,0,0,0,0,0,0,0,2,0,0,0,26,0,0,0,1,0,0,0,2,0,0,0,58,0,0,0,0,0,0,0,2,0,0,0,48,1,0,0,1,0,0,0,1,0,0,0,96,0,0,0,1,0,0,0,2,0,0,0,96,0,0,0,1,0,0,0,3,0,0,0,96,0,0,0,3,0,0,0,1,0,0,0,96,0,0,0,3,0,0,0,2,0,0,0,96,0,0,0,3,0,0,0,3,0,0,0,96,0,0,0,3,0,0,0,2,0,0,0,26,1,0,0,3,0,0,0,2,0,0,0,88,0,0,0,3,0,0,0,2,0,0,0,58,0,0,0,1,0,0,0,2,0,0,0,134,1,0,0,3,0,0,0,2,0,0,0,134,1,0,0,1,0,0,0,2,0,0,0,140,1,0,0,1,0,0,0,2,0,0,0,8,0,0,0,1,0,0,0,2,0,0,0,38,1,0,0,1,0,0,0,2,0,0,0,54,1,0,0,1,0,0,0,2,0,0,0,94,0,0,0,1,0,0,0,2,0,0,0,182,0,0,0,3,0,0,0,2,0,0,0,140,1,0,0,1,0,0,0,2,0,0,0,14,0,0,0,1,0,0,0,2,0,0,0,16,0,0,0,1,0,0,0,2,0,0,0,24,1,0,0,1,0,0,0,2,0,0,0,132,0,0,0,1,0,0,0,2,0,0,0,118,1,0,0,1,0,0,0,2,0,0,0,108,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,3,0,0,0,2,0,0,0,1,0,0,0,3,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,4,0,0,0,2,0,0,0,1,0,0,0,4,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,1,0,0,0,3,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,2,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,4,0,0,0,3,0,0,0,2,0,0,0,4,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,3,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,1,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,4,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,154,153,153,153,153,153,185,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,93,1,0,8,93,1,0,248,92,1,0,240,92,1,0,208,92,1,0,200,92,1,0,184,92,1,0,160,92,1,0,0,0,0,0,0,0,0,0,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,42,2,0,1,0,0,0,176,34,3,0,2,0,0,0,32,42,2,0,3,0,0,0,0,0,0,0,0,0,0,0,117,110,115,32,112,109,51,100,59,115,101,32,108,109,97,114,103,32,115,99,114,101,32,48,46,48,53,59,115,101,32,114,109,97,114,103,32,115,99,114,101,32,48,46,57,55,53,59,32,115,101,32,98,109,97,114,103,32,115,99,114,101,32,48,46,50,50,59,32,115,101,32,116,109,97,114,103,32,115,99,114,101,32,48,46,56,54,59,115,101,32,103,114,105,100,59,115,101,32,116,105,99,115,32,115,99,97,108,101,32,48,59,32,115,101,32,120,116,105,99,115,32,48,44,48,46,49,59,115,101,32,121,116,105,99,115,32,48,44,48,46,49,59,115,101,32,107,101,121,32,116,111,112,32,114,105,103,104,116,32,97,116,32,115,99,114,101,32,48,46,57,55,53,44,48,46,57,55,53,32,104,111,114,105,122,111,110,116,97,108,32,116,105,116,108,101,32,39,82,44,71,44,66,32,112,114,111,102,105,108,101,115,32,111,102,32,116,104,101,32,99,117,114,114,101,110,116,32,99,111,108,111,114,32,112,97,108,101,116,116,101,39,59,0,0,0,0,0,115,112,108,111,116,32,49,47,48,59,10,10,10,0,0,0,114,101,115,101,116,59,115,101,116,32,109,117,108,116,105,59,117,110,115,32,98,111,114,100,101,114,59,117,110,115,32,107,101,121,59,115,101,116,32,116,105,99,32,105,110,59,117,110,115,32,120,116,105,99,115,59,117,110,115,32,121,116,105,99,115,59,115,101,32,99,98,116,105,99,32,48,44,48,46,49,44,49,32,109,105,114,114,32,102,111,114,109,97,116,32,39,39,59,115,101,32,120,114,91,48,58,49,93,59,115,101,32,121,114,91,48,58,49,93,59,115,101,32,122,114,91,48,58,49,93,59,115,101,32,99,98,114,91,48,58,49,93,59,115,101,32,112,109,51,100,32,109,97,112,59,115,101,116,32,99,111,108,111,114,98,111,120,32,104,111,114,32,117,115,101,114,32,111,114,105,103,32,48,46,48,53,44,48,46,48,50,32,115,105,122,101,32,48,46,57,50,53,44,48,46,49,50,59,0,0,0,0,0,0,0,0,10,10,10,117,110,115,32,109,117,108,116,105,59,10,0,0,248,110,3,0,56,16,3,0,100,0,0,0,100,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,48,1,0,0,190,0,0,0,190,0,0,0,190,0,0,0,2,0,0,0,190,0,0,0,126,0,0,0,126,0,0,0,90,0,0,0,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,13,3,0,128,10,3,0,220,5,0,0,132,3,0,0,45,0,0,0,22,0,0,0,20,0,0,0,20,0,0,0,20,0,0,0,142,1,0,0,158,1,0,0,18,1,0,0,2,0,0,0,120,0,0,0,82,0,0,0,34,0,0,0,174,0,0,0,40,0,0,0,62,0,0,0,158,0,0,0,54,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,9,3,0,176,7,3,0,32,3,0,0,184,1,0,0,20,0,0,0,9,0,0,0,8,0,0,0,6,0,0,0,102,0,0,0,48,0,0,0,218,0,0,0,98,0,0,0,2,0,0,0,12,1,0,0,50,0,0,0,96,0,0,0,158,0,0,0,42,0,0,0,164,0,0,0,124,0,0,0,54,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,6,3,0,176,4,3,0,255,15,0,0,59,12,0,0,71,0,0,0,51,0,0,0,36,0,0,0,36,0,0,0,48,1,0,0,8,0,0,0,104,1,0,0,100,0,0,0,2,0,0,0,52,0,0,0,102,0,0,0,86,0,0,0,38,0,0,0,80,0,0,0,160,0,0,0,124,0,0,0,72,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,2,3,0,96,0,3,0,0,4,0,0,12,3,0,0,25,0,0,0,14,0,0,0,11,0,0,0,11,0,0,0,48,1,0,0,20,1,0,0,40,1,0,0,170,0,0,0,2,0,0,0,172,0,0,0,128,0,0,0,60,0,0,0,106,1,0,0,78,0,0,0,12,0,0,0,124,0,0,0,54,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,232,253,2,0,160,251,2,0,0,4,0,0,12,3,0,0,25,0,0,0,14,0,0,0,11,0,0,0,11,0,0,0,48,1,0,0,234,0,0,0,50,0,0,0,170,0,0,0,2,0,0,0,172,0,0,0,136,0,0,0,42,0,0,0,40,0,0,0,62,0,0,0,12,0,0,0,124,0,0,0,54,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,245,2,0,64,243,2,0,0,4,0,0,12,3,0,0,25,0,0,0,14,0,0,0,11,0,0,0,11,0,0,0,48,1,0,0,20,1,0,0,40,1,0,0,66,0,0,0,2,0,0,0,6,0,0,0,136,0,0,0,42,0,0,0,40,0,0,0,62,0,0,0,12,0,0,0,124,0,0,0,54,0,0,0,48,0,0,0,152,0,0,0,0,0,0,0,65,0,0,0,66,0,0,0,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,234,2,0,192,220,2,0,112,23,0,0,160,15,0,0,100,0,0,0,80,0,0,0,100,0,0,0,100,0,0,0,206,0,0,0,148,0,0,0,222,0,0,0,116,1,0,0,2,0,0,0,180,1,0,0,100,0,0,0,130,0,0,0,140,0,0,0,118,0,0,0,34,0,0,0,20,0,0,0,70,0,0,0,48,0,0,0,60,0,0,0,30,0,0,0,1,11,0,0,0,0,0,0,0,0,0,0,52,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,136,0,0,0,0,0,0,0,56,0,0,0,98,0,0,0,0,0,0,0,4,0,0,0,120,1,0,0,102,0,0,0,24,0,0,0,130,0,0,0,0,0,0,0,0,0,0,0,128,218,2,0,160,216,2,0,73,127,0,0,182,91,0,0,12,3,0,0,177,1,0,0,153,1,0,0,153,1,0,0,106,0,0,0,150,0,0,0,168,0,0,0,2,0,0,0,2,0,0,0,176,1,0,0,40,0,0,0,106,0,0,0,230,0,0,0,28,0,0,0,96,0,0,0,50,0,0,0,58,0,0,0,48,0,0,0,106,0,0,0,40,0,0,0,4,9,0,0,0,0,0,0,0,0,0,0,50,0,0,0,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,42,1,0,0,150,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,214,2,0,120,212,2,0,72,23,0,0,32,28,0,0,220,0,0,0,132,0,0,0,90,0,0,0,90,0,0,0,24,0,0,0,28,1,0,0,62,0,0,0,56,1,0,0,2,0,0,0,46,1,0,0,144,0,0,0,54,0,0,0,28,0,0,0,38,0,0,0,138,0,0,0,146,0,0,0,60,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,210,2,0,248,208,2,0,79,0,0,0,24,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,196,0,0,0,40,0,0,0,242,0,0,0,34,1,0,0,2,0,0,0,86,0,0,0,108,0,0,0,18,0,0,0,146,0,0,0,104,0,0,0,12,0,0,0,124,0,0,0,110,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,28,0,0,0,102,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,207,2,0,0,206,2,0,32,28,0,0,192,18,0,0,124,0,0,0,100,0,0,0,120,0,0,0,120,0,0,0,48,1,0,0,126,1,0,0,254,0,0,0,182,0,0,0,2,0,0,0,90,0,0,0,104,0,0,0,124,0,0,0,70,1,0,0,64,0,0,0,8,0,0,0,194,0,0,0,60,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,204,2,0,144,202,2,0,122,105,0,0,28,79,0,0,38,2,0,0,254,0,0,0,168,0,0,0,168,0,0,0,50,1,0,0,246,0,0,0,148,1,0,0,32,0,0,0,2,0,0,0,74,1,0,0,28,0,0,0,48,0,0,0,220,0,0,0,102,0,0,0,36,0,0,0,184,0,0,0,50,0,0,0,48,0,0,0,180,0,0,0,20,0,0,0,4,25,0,0,0,0,0,0,0,0,0,0,32,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0,0,136,0,0,0,54,0,0,0,64,0,0,0,0,0,0,0,8,0,0,0,238,0,0,0,102,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,199,2,0,232,194,2,0,112,23,0,0,16,14,0,0,125,0,0,0,75,0,0,0,75,0,0,0,75,0,0,0,78,0,0,0,6,1,0,0,178,1,0,0,66,1,0,0,2,0,0,0,56,0,0,0,122,0,0,0,10,0,0,0,128,1,0,0,94,0,0,0,82,0,0,0,94,0,0,0,112,0,0,0,46,0,0,0,0,0,0,0,24,0,0,0,4,1,0,0,0,0,0,0,0,0,0,0,38,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,108,1,0,0,148,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,193,2,0,232,191,2,0,0,2,0,0,134,1,0,0,10,0,0,0,7,0,0,0,5,0,0,0,5,0,0,0,48,1,0,0,192,0,0,0,72,0,0,0,86,1,0,0,2,0,0,0,220,0,0,0,22,0,0,0,16,0,0,0,132,1,0,0,98,0,0,0,118,0,0,0,124,0,0,0,44,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,190,2,0,224,188,2,0,208,2,0,0,104,1,0,0,12,0,0,0,7,0,0,0,8,0,0,0,8,0,0,0,48,1,0,0,250,0,0,0,216,0,0,0,88,1,0,0,2,0,0,0,134,0,0,0,38,0,0,0,46,0,0,0,156,0,0,0,52,0,0,0,28,0,0,0,124,0,0,0,54,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,187,2,0,16,185,2,0,16,39,0,0,76,29,0,0,60,0,0,0,30,0,0,0,107,0,0,0,107,0,0,0,104,0,0,0,8,1,0,0,4,1,0,0,16,1,0,0,2,0,0,0,178,0,0,0,26,0,0,0,4,0,0,0,84,1,0,0,108,0,0,0,22,0,0,0,124,0,0,0,60,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,183,2,0,120,182,2,0,21,177,0,0,148,132,0,0,169,0,0,0,112,0,0,0,106,0,0,0,106,0,0,0,204,0,0,0,110,1,0,0,58,0,0,0,30,1,0,0,2,0,0,0,154,1,0,0,152,0,0,0,92,0,0,0,120,0,0,0,18,0,0,0,2,0,0,0,84,0,0,0,32,0,0,0,48,0,0,0,142,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,181,2,0,88,179,2,0,228,12,0,0,36,9,0,0,60,0,0,0,30,0,0,0,20,0,0,0,20,0,0,0,68,0,0,0,80,1,0,0,88,0,0,0,12,0,0,0,2,0,0,0,70,0,0,0,52,0,0,0,68,0,0,0,168,0,0,0,22,0,0,0,76,0,0,0,168,0,0,0,54,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,178,2,0,168,175,2,0,152,58,0,0,16,39,0,0,66,1,0,0,157,0,0,0,66,0,0,0,66,0,0,0,24,1,0,0,210,0,0,0,64,1,0,0,0,1,0,0,2,0,0,0,198,0,0,0,12,0,0,0,84,0,0,0,18,1,0,0,4,0,0,0,16,0,0,0,80,0,0,0,120,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,174,2,0,152,172,2,0,32,28,0,0,176,19,0,0,140,0,0,0,84,0,0,0,63,0,0,0,63,0,0,0,122,1,0,0,42,0,0,0,42,1,0,0,146,0,0,0,2,0,0,0,162,0,0,0,20,0,0,0,118,0,0,0,242,0,0,0,116,0,0,0,26,0,0,0,154,0,0,0,114,0,0,0,54,0,0,0,90,0,0,0,6,0,0,0,148,29,0,0,0,0,0,0,0,0,0,0,6,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,16,0,0,0,30,1,0,0,8,0,0,0,34,0,0,0,10,0,0,0,132,0,0,0,136,1,0,0,0,1,0,0,86,0,0,0,0,0,0,0,0,0,36,64,248,170,2,0,192,169,2,0,40,35,0,0,112,23,0,0,120,0,0,0,70,0,0,0,70,0,0,0,70,0,0,0,48,1,0,0,228,0,0,0,118,1,0,0,70,1,0,0,2,0,0,0,62,1,0,0,30,0,0,0,56,0,0,0,18,0,0,0,24,0,0,0,12,0,0,0,124,0,0,0,54,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,3,0,64,168,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,1,0,0,34,0,0,0,4,0,0,0,156,0,0,0,2,0,0,0,212,0,0,0,74,0,0,0,62,0,0,0,20,0,0,0,68,0,0,0,132,0,0,0,110,0,0,0,122,0,0,0,48,0,0,0,144,0,0,0,10,0,0,0,5,11,0,0,0,0,0,0,0,0,0,0,28,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,0,0,180,0,0,0,4,1,0,0,14,0,0,0,0,0,0,0,6,0,0,0,82,0,0,0,194,0,0,0,228,0,0,0,102,1,0,0,0,0,0,0,0,0,36,64,208,165,2,0,48,164,2,0,182,3,0,0,122,2,0,0,18,0,0,0,10,0,0,0,7,0,0,0,7,0,0,0,200,0,0,0,248,0,0,0,18,0,0,0,140,1,0,0,2,0,0,0,152,0,0,0,94,0,0,0,142,0,0,0,180,0,0,0,30,0,0,0,176,0,0,0,148,0,0,0,26,0,0,0,10,0,0,0,204,0,0,0,2,0,0,0,1,9,0,0,0,0,0,0,0,0,0,0,24,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,0,0,0,82,1,0,0,138,0,0,0,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,162,2,0,72,161,2,0,232,3,0,0,232,3,0,0,25,0,0,0,16,0,0,0,18,0,0,0,18,0,0,0,230,0,0,0,100,1,0,0,244,0,0,0,76,0,0,0,2,0,0,0,130,0,0,0,32,0,0,0,154,0,0,0,236,0,0,0,96,0,0,0,12,0,0,0,6,0,0,0,60,0,0,0,48,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,160,2,0,208,158,2,0,220,5,0,0,132,3,0,0,45,0,0,0,22,0,0,0,20,0,0,0,20,0,0,0,188,0,0,0,106,1,0,0,182,1,0,0,174,1,0,0,2,0,0,0,26,1,0,0,134,0,0,0,132,0,0,0,160,0,0,0,90,0,0,0,114,0,0,0,30,0,0,0,56,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,157,2,0,72,156,2,0,220,5,0,0,132,3,0,0,45,0,0,0,22,0,0,0,20,0,0,0,20,0,0,0,188,0,0,0,14,1,0,0,158,0,0,0,146,1,0,0,2,0,0,0,26,1,0,0,134,0,0,0,132,0,0,0,160,0,0,0,90,0,0,0,114,0,0,0,30,0,0,0,56,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,154,2,0,248,152,2,0,32,28,0,0,176,19,0,0,110,0,0,0,66,0,0,0,63,0,0,0,63,0,0,0,122,1,0,0,42,0,0,0,186,0,0,0,146,0,0,0,2,0,0,0,162,0,0,0,20,0,0,0,118,0,0,0,34,1,0,0,16,0,0,0,26,0,0,0,154,0,0,0,114,0,0,0,48,0,0,0,90,0,0,0,6,0,0,0,148,32,0,0,0,0,0,0,0,0,0,0,6,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,16,0,0,0,32,0,0,0,8,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,0,0,0,86,0,0,0,0,0,0,0,0,0,0,0,0,152,2,0,216,149,2,0,32,28,0,0,176,19,0,0,100,0,0,0,60,0,0,0,63,0,0,0,63,0,0,0,122,1,0,0,42,0,0,0,186,0,0,0,14,0,0,0,2,0,0,0,162,0,0,0,20,0,0,0,118,0,0,0,242,0,0,0,12,0,0,0,26,0,0,0,154,0,0,0,114,0,0,0,54,0,0,0,0,0,0,0,6,0,0,0,128,32,0,0,0,0,0,0,0,0,0,0,6,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,16,0,0,0,30,1,0,0,8,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,0,0,0,0,0,0,0,0,0,0,0,232,147,2,0,88,146,2,0,32,28,0,0,176,19,0,0,100,0,0,0,60,0,0,0,63,0,0,0,63,0,0,0,122,1,0,0,42,0,0,0,186,0,0,0,14,0,0,0,2,0,0,0,162,0,0,0,20,0,0,0,118,0,0,0,242,0,0,0,12,0,0,0,26,0,0,0,154,0,0,0,114,0,0,0,54,0,0,0,0,0,0,0,6,0,0,0,128,32,0,0,0,0,0,0,0,0,0,0,6,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,16,0,0,0,30,1,0,0,8,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,0,0,0,0,0,0,0,0,0,0,0,240,144,2,0,176,142,2,0,184,11,0,0,8,7,0,0,83,0,0,0,41,0,0,0,41,0,0,0,41,0,0,0,46,0,0,0,84,0,0,0,164,0,0,0,52,1,0,0,2,0,0,0,124,1,0,0,116,0,0,0,44,0,0,0,62,0,0,0,20,0,0,0,64,0,0,0,128,0,0,0,36,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,141,2,0,152,139,2,0,136,19,0,0,184,11,0,0,152,0,0,0,73,0,0,0,69,0,0,0,69,0,0,0,10,1,0,0,152,1,0,0,160,0,0,0,224,0,0,0,2,0,0,0,154,0,0,0,6,0,0,0,72,0,0,0,48,0,0,0,100,0,0,0,88,0,0,0,190,0,0,0,82,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,138,2,0,168,136,2,0,16,39,0,0,16,39,0,0,164,1,0,0,160,0,0,0,200,0,0,0,150,0,0,0,138,1,0,0,92,1,0,0,68,1,0,0,102,1,0,0,2,0,0,0,44,1,0,0,90,0,0,0,66,0,0,0,34,0,0,0,66,0,0,0,116,0,0,0,186,0,0,0,14,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,148,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,134,2,0,8,133,2,0,220,5,0,0,132,3,0,0,45,0,0,0,22,0,0,0,20,0,0,0,20,0,0,0,48,1,0,0,226,0,0,0,54,1,0,0,122,0,0,0,2,0,0,0,176,0,0,0,146,0,0,0,110,0,0,0,142,0,0,0,126,0,0,0,130,0,0,0,170,0,0,0,84,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,131,2,0,0,130,2,0,220,5,0,0,132,3,0,0,45,0,0,0,22,0,0,0,20,0,0,0,20,0,0,0,48,1,0,0,114,0,0,0,130,1,0,0,90,1,0,0,2,0,0,0,94,0,0,0,138,0,0,0,140,0,0,0,120,1,0,0,106,0,0,0,70,0,0,0,198,0,0,0,54,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,128,2,0,136,125,2,0,224,46,0,0,32,28,0,0,110,1,0,0,176,0,0,0,166,0,0,0,166,0,0,0,136,1,0,0,60,1,0,0,126,0,0,0,134,1,0,0,2,0,0,0,252,0,0,0,112,0,0,0,58,0,0,0,204,0,0,0,10,0,0,0,72,0,0,0,200,0,0,0,34,0,0,0,22,0,0,0,68,0,0,0,12,0,0,0,132,1,0,0,0,0,0,0,0,0,0,0,26,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0,0,156,1,0,0,212,0,0,0,120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,123,2,0,208,120,2,0,156,49,0,0,196,29,0,0,165,1,0,0,206,0,0,0,123,0,0,0,123,0,0,0,116,0,0,0,74,0,0,0,58,1,0,0,110,0,0,0,2,0,0,0,54,0,0,0,70,0,0,0,2,0,0,0,46,0,0,0,48,0,0,0,188,0,0,0,112,0,0,0,92,0,0,0,30,0,0,0,38,0,0,0,28,0,0,0,0,59,0,0,0,0,0,0,0,0,0,0,2,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,140,0,0,0,0,0,0,0,178,0,0,0,114,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,63,0,0,0,0,0,0,128,63,0,0,0,0,0,0,240,65,0,0,0,0,0,0,112,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,93,0,0,0,0,0,0,9,46,46,46,105,116,32,105,115,78,101,119,76,101,118,101,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,115,0,0,0,0,0,0,0,97,65,101,69,102,70,103,71,0,0,0,0,0,0,0,0,99,100,105,111,117,120,88,0,104,108,76,113,106,122,90,116,67,83,112,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,21,3,0,160,0,3,0,176,212,2,0,32,192,2,0,224,175,2,0,120,160,2,0,32,145,2,0,136,128,2,0,8,184,2,0,64,79,2,0,120,129,2,0,96,64,2,0,40,56,2,0,168,48,2,0,208,42,2,0,48,36,2,0,152,28,2,0,80,22,2,0,184,14,2,0,232,8,2,0,120,3,2,0,80,254,1,0,56,250,1,0,64,245,1,0,8,240,1,0,200,235,1,0]) -.concat([240,230,1,0,40,226,1,0,224,220,1,0,48,214,1,0,40,209,1,0,160,197,1,0,56,194,1,0,128,190,1,0,192,177,1,0,216,165,1,0,16,162,1,0,184,158,1,0,48,154,1,0,224,151,1,0,240,149,1,0,128,148,1,0,224,139,1,0,240,137,1,0,8,135,1,0,88,133,1,0,144,131,1,0,152,129,1,0,8,127,1,0,96,124,1,0,32,122,1,0,72,120,1,0,200,118,1,0,192,116,1,0,8,115,1,0,56,112,1,0,216,109,1,0,160,107,1,0,184,103,1,0,8,101,1,0,136,98,1,0,232,96,1,0,88,94,1,0,104,92,1,0,80,89,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,136,199,1,0,1,0,0,0,88,199,1,0,2,0,0,0,224,198,1,0,3,0,0,0,40,43,1,0,4,0,0,0,136,198,1,0,4,0,0,0,176,111,1,0,5,0,0,0,88,198,1,0,9,0,0,0,232,197,1,0,10,0,0,0,152,197,1,0,6,0,0,0,8,197,1,0,7,0,0,0,112,196,1,0,8,0,0,0,248,195,1,0,11,0,0,0,0,0,0,0,0,0,0,0,248,60,1,0,56,55,1,0,88,52,1,0,48,50,1,0,200,48,1,0,0,0,0,0,16,241,1,0,152,240,1,0,88,52,1,0,48,50,1,0,200,48,1,0,0,0,0,0,16,241,1,0,152,240,1,0,88,52,1,0,48,50,1,0,104,249,1,0,0,0,0,0,0,0,0,0,0,0,0,0,37,115,115,99,97,108,101,32,109,117,115,116,32,98,101,32,62,32,48,59,32,118,105,101,119,32,117,110,99,104,97,110,103,101,100,0,0,0,0,0,114,111,116,95,37,99,32,109,117,115,116,32,98,101,32,105,110,32,91,48,58,37,100,93,32,100,101,103,114,101,101,115,32,114,97,110,103,101,59,32,118,105,101,119,32,117,110,99,104,97,110,103,101,100,0,0,232,119,1,0,2,0,0,0,16,118,1,0,1,0,0,0,48,116,1,0,1,0,0,0,96,114,1,0,3,0,0,0,176,111,1,0,4,0,0,0,56,109,1,0,5,0,0,0,248,105,1,0,6,0,0,0,8,199,1,0,7,0,0,0,40,100,1,0,8,0,0,0,232,97,1,0,9,0,0,0,248,95,1,0,10,0,0,0,32,93,1,0,11,0,0,0,56,91,1,0,12,0,0,0,0,89,1,0,13,0,0,0,0,84,1,0,14,0,0,0,224,79,1,0,15,0,0,0,16,75,1,0,17,0,0,0,232,72,1,0,18,0,0,0,160,69,1,0,19,0,0,0,16,66,1,0,20,0,0,0,80,60,1,0,21,0,0,0,248,54,1,0,22,0,0,0,24,52,1,0,23,0,0,0,248,49,1,0,16,0,0,0,96,48,1,0,16,0,0,0,0,46,1,0,24,0,0,0,184,43,1,0,25,0,0,0,96,41,1,0,26,0,0,0,24,39,1,0,27,0,0,0,104,37,1,0,28,0,0,0,104,35,1,0,29,0,0,0,200,33,1,0,30,0,0,0,96,32,1,0,31,0,0,0,208,30,1,0,32,0,0,0,112,28,1,0,31,0,0,0,32,111,3,0,32,0,0,0,80,109,3,0,33,0,0,0,80,105,3,0,34,0,0,0,240,102,3,0,35,0,0,0,64,101,3,0,36,0,0,0,32,98,3,0,37,0,0,0,56,96,3,0,37,0,0,0,136,93,3,0,38,0,0,0,0,87,3,0,39,0,0,0,48,85,3,0,40,0,0,0,192,82,3,0,41,0,0,0,128,80,3,0,42,0,0,0,240,77,3,0,44,0,0,0,32,76,3,0,45,0,0,0,56,74,3,0,48,0,0,0,56,72,3,0,49,0,0,0,32,70,3,0,46,0,0,0,128,67,3,0,47,0,0,0,120,65,3,0,52,0,0,0,80,63,3,0,53,0,0,0,208,60,3,0,50,0,0,0,168,58,3,0,51,0,0,0,48,57,3,0,54,0,0,0,56,55,3,0,55,0,0,0,104,52,3,0,68,0,0,0,176,49,3,0,69,0,0,0,88,48,3,0,56,0,0,0,16,46,3,0,57,0,0,0,200,43,3,0,58,0,0,0,136,40,3,0,59,0,0,0,0,38,3,0,61,0,0,0,176,34,3,0,60,0,0,0,64,32,3,0,62,0,0,0,32,31,3,0,63,0,0,0,56,30,3,0,63,0,0,0,16,189,2,0,76,0,0,0,16,29,3,0,77,0,0,0,24,28,3,0,78,0,0,0,56,27,3,0,79,0,0,0,248,172,2,0,80,0,0,0,72,26,3,0,81,0,0,0,24,25,3,0,75,0,0,0,0,24,3,0,82,0,0,0,120,97,1,0,83,0,0,0,152,19,3,0,85,0,0,0,184,16,3,0,84,0,0,0,128,13,3,0,86,0,0,0,176,123,1,0,87,0,0,0,200,10,3,0,88,0,0,0,112,9,3,0,89,0,0,0,216,7,3,0,90,0,0,0,168,6,3,0,91,0,0,0,248,4,3,0,92,0,0,0,224,2,3,0,93,0,0,0,152,0,3,0,94,0,0,0,128,121,1,0,97,0,0,0,24,254,2,0,98,0,0,0,0,252,2,0,99,0,0,0,88,245,2,0,119,0,0,0,120,243,2,0,110,0,0,0,144,235,2,0,101,0,0,0,32,221,2,0,129,0,0,0,216,218,2,0,120,0,0,0,224,216,2,0,138,0,0,0,112,214,2,0,70,0,0,0,168,212,2,0,113,0,0,0,184,210,2,0,104,0,0,0,48,209,2,0,132,0,0,0,232,207,2,0,123,0,0,0,64,206,2,0,141,0,0,0,208,204,2,0,64,0,0,0,232,202,2,0,117,0,0,0,96,200,2,0,118,0,0,0,40,195,2,0,108,0,0,0,200,193,2,0,109,0,0,0,24,192,2,0,136,0,0,0,120,190,2,0,137,0,0,0,8,189,2,0,127,0,0,0,192,187,2,0,128,0,0,0,96,185,2,0,145,0,0,0,160,183,2,0,146,0,0,0,200,182,2,0,147,0,0,0,96,181,2,0,148,0,0,0,120,179,2,0,66,0,0,0,48,178,2,0,67,0,0,0,216,175,2,0,111,0,0,0,80,174,2,0,112,0,0,0,232,172,2,0,102,0,0,0,16,171,2,0,103,0,0,0,0,170,2,0,130,0,0,0,160,168,2,0,131,0,0,0,24,166,2,0,121,0,0,0,112,164,2,0,122,0,0,0,8,163,2,0,139,0,0,0,136,161,2,0,140,0,0,0,104,160,2,0,71,0,0,0,0,159,2,0,72,0,0,0,200,157,2,0,114,0,0,0,120,156,2,0,115,0,0,0,200,154,2,0,105,0,0,0,56,153,2,0,106,0,0,0,16,152,2,0,133,0,0,0,40,150,2,0,134,0,0,0,248,147,2,0,124,0,0,0,152,146,2,0,125,0,0,0,24,145,2,0,142,0,0,0,232,142,2,0,143,0,0,0,64,141,2,0,73,0,0,0,232,139,2,0,74,0,0,0,120,138,2,0,116,0,0,0,232,136,2,0,107,0,0,0,16,135,2,0,135,0,0,0,88,133,2,0,126,0,0,0,224,131,2,0,144,0,0,0,56,130,2,0,65,0,0,0,80,128,2,0,149,0,0,0,192,125,2,0,95,0,0,0,224,123,2,0,96,0,0,0,88,121,2,0,100,0,0,0,192,111,2,0,153,0,0,0,24,109,2,0,154,0,0,0,80,107,2,0,155,0,0,0,240,104,2,0,156,0,0,0,168,96,2,0,157,0,0,0,80,93,2,0,152,0,0,0,248,91,2,0,150,0,0,0,216,90,2,0,151,0,0,0,0,0,0,0,0,0,0,0,48,116,1,0,1,0,0,0,24,20,2,0,2,0,0,0,128,19,2,0,3,0,0,0,136,18,2,0,4,0,0,0,240,17,2,0,5,0,0,0,120,17,2,0,6,0,0,0,160,16,2,0,7,0,0,0,32,16,2,0,8,0,0,0,144,15,2,0,9,0,0,0,168,14,2,0,10,0,0,0,24,14,2,0,11,0,0,0,152,13,2,0,12,0,0,0,40,13,2,0,13,0,0,0,136,12,2,0,14,0,0,0,232,247,1,0,15,0,0,0,48,11,2,0,16,0,0,0,168,10,2,0,17,0,0,0,16,10,2,0,18,0,0,0,144,9,2,0,19,0,0,0,216,8,2,0,20,0,0,0,168,7,2,0,21,0,0,0,240,6,2,0,22,0,0,0,96,6,2,0,23,0,0,0,0,0,0,0,0,0,0,0,240,34,2,0,1,0,0,0,40,34,2,0,2,0,0,0,8,93,1,0,3,0,0,0,128,32,2,0,3,0,0,0,208,250,1,0,4,0,0,0,248,30,2,0,5,0,0,0,88,30,2,0,9,0,0,0,104,29,2,0,10,0,0,0,136,28,2,0,11,0,0,0,112,27,2,0,12,0,0,0,192,26,2,0,6,0,0,0,56,26,2,0,7,0,0,0,168,25,2,0,8,0,0,0,64,25,2,0,13,0,0,0,128,24,2,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,154,153,153,153,153,153,169,63,154,153,153,153,153,153,169,63,154,153,153,153,153,153,201,63,154,153,153,153,153,153,185,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,208,63,102,102,102,102,102,102,230,63,51,51,51,51,51,51,235,63,205,204,204,204,204,204,236,63,154,153,153,153,153,153,217,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,232,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,102,102,102,102,102,102,230,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,205,204,204,204,204,204,236,63,51,51,51,51,51,51,227,63,51,51,51,51,51,51,227,63,51,51,51,51,51,51,227,63,0,0,0,0,0,0,240,63,102,102,102,102,102,102,238,63,102,102,102,102,102,102,238,63,102,102,102,102,102,102,238,63,232,211,1,0,0,0,0,0,128,82,2,0,1,0,0,0,112,82,2,0,2,0,0,0,96,82,2,0,4,0,0,0,80,82,2,0,5,0,0,0,8,82,2,0,3,0,0,0,0,82,2,0,6,0,0,0,128,234,1,0,7,0,0,0,0,0,0,0,8,0,0,0,136,208,2,0,39,0,0,0,104,75,2,0,40,0,0,0,192,74,2,0,41,0,0,0,32,74,2,0,1,0,0,0,88,73,2,0,2,0,0,0,192,72,2,0,3,0,0,0,64,72,2,0,4,0,0,0,56,71,2,0,5,0,0,0,8,70,2,0,6,0,0,0,104,69,2,0,7,0,0,0,216,68,2,0,8,0,0,0,232,67,2,0,13,0,0,0,168,67,2,0,9,0,0,0,192,66,2,0,14,0,0,0,48,116,1,0,10,0,0,0,32,66,2,0,11,0,0,0,88,65,2,0,12,0,0,0,80,64,2,0,15,0,0,0,72,63,2,0,16,0,0,0,64,62,2,0,17,0,0,0,48,61,2,0,18,0,0,0,136,60,2,0,19,0,0,0,200,59,2,0,20,0,0,0,32,59,2,0,21,0,0,0,120,58,2,0,22,0,0,0,232,57,2,0,23,0,0,0,200,56,2,0,24,0,0,0,0,224,1,0,25,0,0,0,192,218,1,0,26,0,0,0,240,53,2,0,27,0,0,0,16,53,2,0,28,0,0,0,40,52,2,0,29,0,0,0,72,51,2,0,30,0,0,0,184,50,2,0,31,0,0,0,64,50,2,0,32,0,0,0,248,49,2,0,37,0,0,0,96,49,2,0,38,0,0,0,128,234,1,0,33,0,0,0,0,48,2,0,34,0,0,0,192,229,1,0,35,0,0,0,192,46,2,0,36,0,0,0,8,46,2,0,36,0,0,0,72,45,2,0,42,0,0,0,200,44,2,0,42,0,0,0,40,44,2,0,43,0,0,0,176,43,2,0,44,0,0,0,88,43,2,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,89,2,0,1,0,0,0,0,82,2,0,2,0,0,0,40,86,2,0,3,0,0,0,112,84,2,0,4,0,0,0,0,83,2,0,5,0,0,0,192,81,2,0,6,0,0,0,200,80,2,0,7,0,0,0,32,80,2,0,8,0,0,0,48,79,2,0,9,0,0,0,8,78,2,0,10,0,0,0,72,77,2,0,11,0,0,0,176,76,2,0,12,0,0,0,0,0,0,0,0,0,0,0,136,208,2,0,0,0,0,0,88,188,2,0,15,0,0,0,24,172,2,0,1,0,0,0,176,73,2,0,2,0,0,0,152,4,2,0,3,0,0,0,160,209,1,0,4,0,0,0,88,157,2,0,5,0,0,0,144,122,1,0,6,0,0,0,184,98,1,0,7,0,0,0,184,67,1,0,8,0,0,0,24,38,1,0,9,0,0,0,40,102,3,0,10,0,0,0,56,75,3,0,11,0,0,0,152,140,2,0,12,0,0,0,112,122,2,0,13,0,0,0,152,88,2,0,14,0,0,0,0,0,0,0,16,0,0,0,120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194,176,0,0,0,0,0,0,160,41,2,0,1,0,0,0,216,40,2,0,2,0,0,0,136,208,2,0,3,0,0,0,32,40,2,0,4,0,0,0,48,116,1,0,4,0,0,0,80,39,2,0,5,0,0,0,184,38,2,0,6,0,0,0,56,38,2,0,7,0,0,0,184,37,2,0,8,0,0,0,56,86,3,0,9,0,0,0,40,36,2,0,10,0,0,0,120,35,2,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,128,1,0,1,0,0,0,16,126,1,0,3,0,0,0,176,123,1,0,2,0,0,0,128,121,1,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,141,2,0,40,140,2,0,160,138,2,0,56,137,2,0,96,135,2,0,0,0,0,0,100,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,72,101,108,118,101,116,105,99,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,205,204,204,204,204,204,236,63,205,204,204,204,204,204,236,63,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,16,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,37,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,128,63,0,0,128,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,63,0,1,0,0,208,7,0,0,250,126,106,188,116,147,104,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,128,63,0,0,128,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,63,0,1,0,0,208,7,0,0,250,126,106,188,116,147,104,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,128,63,0,0,128,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,63,0,1,0,0,208,7,0,0,250,126,106,188,116,147,104,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,128,63,0,0,128,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,63,0,1,0,0,208,7,0,0,250,126,106,188,116,147,104,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,243,1,0,24,150,1,0,104,136,1,0,8,116,1,0,128,90,1,0,48,153,2,0,80,32,1,0,112,22,3,0,64,67,3,0,192,45,3,0,248,26,3,0,168,7,3,0,120,220,2,0,112,202,2,0,96,182,2,0,152,165,2,0,232,151,2,0,216,134,2,0,0,107,2,0,144,82,2,0,144,74,2,0,120,67,2,0,224,58,2,0,128,50,2,0,152,44,2,0,152,38,2,0,112,31,2,0,96,24,2,0,16,17,2,0,8,11,2,0,16,5,2,0,72,0,2,0,240,251,1,0,136,246,1,0,248,241,1,0,8,237,1,0,24,232,1,0,248,227,1,0,136,222,1,0,144,216,1,0,16,210,1,0,152,198,1,0,32,195,1,0,200,191,1,0,184,186,1,0,72,167,1,0,104,163,1,0,0,160,1,0,40,155,1,0,104,152,1,0,80,150,1,0,208,148,1,0,184,140,1,0,152,138,1,0,176,135,1,0,184,133,1,0,56,132,1,0,168,130,1,0,176,127,1,0,32,125,1,0,232,122,1,0,168,120,1,0,48,119,1,0,40,117,1,0,80,115,1,0,152,112,1,0,64,110,1,0,72,108,1,0,168,104,1,0,144,101,1,0,208,98,1,0,72,97,1,0,48,95,1,0,192,92,1,0,152,190,2,0,152,190,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,93,1,0,72,93,1,0,248,92,1,0,208,92,1,0,240,92,1,0,184,92,1,0,160,92,1,0,48,55,1,0,232,54,1,0,200,54,1,0,72,93,1,0,192,54,1,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,255,0,255,0,255,255,255,255,0,143,188,143,255,105,180,0,0,0,255,127,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,89,64,0,0,0,0,0,136,195,64,0,0,0,0,132,215,151,65,0,128,224,55,121,195,65,67,23,110,5,181,181,184,147,70,245,249,63,233,3,79,56,77,50,29,48,249,72,119,130,90,60,191,115,127,221,79,21,117,3,0,0,0,50,0,0,0,50,0,0,0,2,0,0,0,0,0,0,0,0,0,128,63,0,0,128,63,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,65,0,0,128,63,0,0,0,0,208,7,0,0,250,126,106,188,116,147,104,63,0,1,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,3,0,0,0,50,0,0,0,50,0,0,0,2,0,0,0,0,0,0,0,0,0,128,63,0,0,128,63,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,65,0,0,128,63,0,0,0,0,208,7,0,0,250,126,106,188,116,147,104,63,0,1,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,255,255,255,255,0,0,0,0,48,0,0,0,0,0,0,0,128,194,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,115,0,0,0,0,0,0,98,0,97,52,0,0,0,0,0,0,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,224,198,1,0,1,0,0,0,184,195,1,0,33,0,0,0,232,52,2,0,18,0,0,0,48,195,1,0,51,0,0,0,240,194,1,0,51,0,0,0,192,194,1,0,64,0,0,0,104,194,1,0,39,1,0,0]) -.concat([40,194,1,0,39,1,0,0,88,193,1,0,23,1,0,0,240,192,1,0,55,1,0,0,168,192,1,0,102,0,0,0,104,192,1,0,102,0,0,0,16,192,1,0,86,0,0,0,224,191,1,0,118,0,0,0,168,191,1,0,153,0,0,0,112,191,1,0,136,1,0,0,32,191,1,0,89,1,0,0,112,190,1,0,169,0,0,0,88,189,1,0,137,0,0,0,192,188,1,0,177,0,0,0,96,188,1,0,184,0,0,0,40,188,1,0,193,0,0,0,120,187,1,0,209,0,0,0,216,186,1,0,225,0,0,0,104,186,1,0,1,1,0,0,88,185,1,0,252,0,0,0,248,195,1,0,218,1,0,0,0,38,3,0,96,1,0,0,80,184,1,0,112,1,0,0,184,177,1,0,144,1,0,0,248,175,1,0,160,1,0,0,128,172,1,0,176,1,0,0,216,170,1,0,201,1,0,0,176,168,1,0,233,1,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,128,196,1,0,1,0,0,0,0,193,1,0,2,0,0,0,200,188,1,0,3,0,0,0,144,172,1,0,4,0,0,0,216,164,1,0,5,0,0,0,8,161,1,0,6,0,0,0,48,157,1,0,7,0,0,0,16,153,1,0,8,0,0,0,200,150,1,0,9,0,0,0,0,0,0,0,0,0,0,0,67,97,110,32,115,112,101,99,105,102,121,32,96,111,114,105,103,105,110,96,32,111,114,32,96,99,101,110,116,101,114,96,44,32,98,117,116,32,110,111,116,32,98,111,116,104,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,224,1,0,0,0,0,0,216,219,1,0,1,0,0,0,64,212,1,0,2,0,0,0,232,199,1,0,3,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,154,153,153,153,153,153,201,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,123,20,174,71,225,122,148,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,118,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,4,0,0,0,1,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0,0,0,0,0,0,10,215,163,59,56,0,0,0,71,0,0,0,111,18,3,59,49,8,172,61,40,0,0,0,59,0,0,0,111,18,3,59,49,8,172,61,40,0,0,0,110,0,0,0,111,18,3,59,49,8,172,61,40,0,0,0,53,0,0,0,111,18,3,59,49,8,172,61,40,0,0,0,115,0,0,0,111,18,3,59,182,243,125,61,40,0,0,0,75,0,0,0,10,215,163,59,154,153,153,61,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,1,0,0,0,44,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,132,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,32,35,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,28,0,0,0,31,0,0,0,30,0,0,0,31,0,0,0,30,0,0,0,31,0,0,0,31,0,0,0,30,0,0,0,31,0,0,0,30,0,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,13,0,0,0,5,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,231,251,31,65,160,134,0,0,160,134,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,12,0,0,0,3,0,0,0,0,0,0,0,9,0,0,0,8,0,0,0,14,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,43,3,0,136,43,3,0,0,43,3,0,168,42,3,0,120,42,3,0,64,42,3,0,216,41,3,0,128,41,3,0,64,41,3,0,240,40,3,0,152,40,3,0,120,40,3,0,32,40,3,0,0,40,3,0,192,39,3,0,128,39,3,0,64,39,3,0,0,39,3,0,176,38,3,0,160,38,3,0,8,38,3,0,184,37,3,0,48,37,3,0,248,36,3,0,176,36,3,0,80,36,3,0,40,36,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,136,200,1,0,240,196,1,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,150,1,0,48,153,2,0,240,152,2,0,224,156,0,0,232,152,2,0,224,152,2,0,112,169,2,0,0,0,0,0,128,152,2,0,120,152,2,0,96,152,2,0,24,152,2,0,8,152,2,0,248,151,2,0,224,151,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,127,0,0,0,0,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,64,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,205,204,204,204,204,204,236,63,205,204,204,204,204,204,236,63,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,16,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,117,1,0,32,235,1,0,80,230,1,0,192,224,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,175,203,174,131,28,212,63,5,131,82,81,72,84,238,63,69,54,70,161,27,144,249,63,152,255,235,55,110,60,2,64,78,179,64,187,67,42,8,64,182,126,159,22,40,30,15,64,4,60,105,225,178,74,246,63,1,185,171,244,102,150,205,63,22,140,132,149,142,226,195,191,74,181,106,247,109,120,121,63,254,41,194,141,220,23,24,63,203,225,243,45,104,14,165,190,132,27,223,205,9,48,240,63,248,153,229,120,38,16,232,191,53,126,55,150,221,183,137,63,17,80,205,36,107,134,132,63,156,200,73,125,117,186,47,191,218,83,12,136,64,206,160,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,15,0,0,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,56,15,0,14,53,15,0,14,59,15,0,14,58,15,0,14,60,15,0,15,124,15,0,14,61,15,0,14,43,15,0,0,0,0,0,14,121,15,0,14,123,15,0,0,0,0,0,0,0,0,0,0,0,0,0,14,48,15,0,14,122,15,0,14,126,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,122,15,0,14,125,15,0,14,119,15,0,14,120,15,0,0,0,0,0,14,57,15,0,14,33,15,0,14,96,15,0,14,34,15,0,14,97,15,0,14,88,15,0,14,80,15,0,14,83,15,0,14,52,15,0,14,35,15,0,14,92,15,0,14,36,15,0,14,37,15,0,14,102,15,0,14,101,15,0,14,38,15,0,14,39,15,0,14,99,15,0,14,54,15,0,14,104,15,0,14,103,15,0,14,95,15,0,14,105,15,0,14,90,15,0,0,0,0,0,14,82,15,0,14,45,15,0,14,109,15,0,14,46,15,0,14,91,15,0,0,0,0,0,14,112,15,0,14,94,15,0,14,72,15,0,14,68,15,0,14,64,15,0,14,98,15,0,14,76,15,0,14,84,15,0,14,87,15,0,14,53,15,0,14,73,15,0,14,69,15,0,14,65,15,0,14,77,15,0,14,89,15,0,14,85,15,0,14,81,15,0,14,93,15,0,14,100,15,0,14,55,15,0,14,74,15,0,14,70,15,0,14,66,15,0,14,106,15,0,14,78,15,0,0,0,0,0,14,86,15,0,14,75,15,0,14,71,15,0,14,67,15,0,14,79,15,0,0,0,0,0,14,113,15,0,14,111,15,0,14,52,15,0,14,79,15,0,14,69,15,0,14,64,15,0,14,76,15,0,14,72,15,0,14,84,15,0,14,53,15,0,14,65,15,0,14,77,15,0,14,73,15,0,14,93,15,0,14,81,15,0,14,89,15,0,14,88,15,0,14,80,15,0,14,92,15,0,14,87,15,0,14,83,15,0,14,66,15,0,14,78,15,0,14,74,15,0,14,67,15,0,14,75,15,0,14,111,15,0,14,90,15,0,14,91,15,0,14,86,15,0,14,59,15,0,14,82,15,0,0,0,0,0,14,62,15,0,14,68,15,0,14,85,15,0,14,70,15,0,14,71,15,0,14,55,15,0,14,54,15,0,14,121,15,0,14,122,15,0,14,57,15,0,0,0,0,0,0,0,0,0,14,120,15,0,14,119,15,0,14,56,15,0,14,123,15,0,14,125,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,96,15,0,14,34,15,0,14,33,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,63,15,0,14,60,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,98,15,0,14,97,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,58,15,0,14,100,15,0,14,99,15,0,14,36,15,0,14,37,15,0,14,35,15,0,0,0,0,0,14,101,15,0,14,38,15,0,14,39,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,102,15,0,0,0,0,0,14,103,15,0,14,94,15,0,14,95,15,0,14,104,15,0,14,106,15,0,14,105,15,0,0,0,0,0,14,113,15,0,14,112,15,0,14,109,15,0,14,46,15,0,14,45,15,0,0,0,0,0,0,0,0,0,14,48,15,0,14,40,15,0,14,118,15,0,14,126,15,0,0,0,0,0,0,0,0,0,0,0,0,0,14,61,15,0,0,0,0,0,0,0,0,0,14,122,15,0,14,43,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,251,255,255,255,251,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,46,54,0,0,0,0,0,51,0,0,0,0,0,0,0,50,48,49,51,45,48,52,45,49,50,32,0,0,0,0,0,67,111,112,121,114,105,103,104,116,32,40,67,41,32,49,57,56,54,45,49,57,57,51,44,32,49,57,57,56,44,32,50,48,48,52,44,32,50,48,48,55,45,50,48,49,51,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74,97,110,117,97,114,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,101,98,114,117,97,114,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,97,114,99,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,112,114,105,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,97,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74,117,110,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74,117,108,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,117,103,117,115,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,101,112,116,101,109,98,101,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,79,99,116,111,98,101,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,111,118,101,109,98,101,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,101,99,101,109,98,101,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,117,110,100,97,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) -.concat([77,111,110,100,97,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,117,101,115,100,97,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,101,100,110,101,115,100,97,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,104,117,114,115,100,97,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,114,105,100,97,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,97,116,117,114,100,97,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,78,3,0,116,1,0,0,72,75,2,0,32,1,0,0,112,5,2,0,64,1,0,0,64,210,1,0,62,1,0,0,96,150,1,0,36,1,0,0,152,76,3,0,10,1,0,0,248,109,3,0,188,0,0,0,72,68,1,0,128,0,0,0,216,150,1,0,100,0,0,0,104,102,3,0,170,0,0,0,136,75,3,0,210,0,0,0,88,54,3,0,80,1,0,0,224,30,3,0,72,1,0,0,120,15,3,0,222,0,0,0,136,250,2,0,78,1,0,0,176,208,2,0,28,1,0,0,120,188,2,0,232,0,0,0,168,42,2,0,56,1,0,0,24,36,2,0,252,0,0,0,184,140,2,0,172,0,0,0,32,111,3,0,68,0,0,0,168,88,2,0,74,0,0,0,40,77,2,0,124,0,0,0,184,69,2,0,206,0,0,0,0,62,2,0,192,0,0,0,136,53,2,0,166,0,0,0,224,46,2,0,72,0,0,0,80,41,2,0,246,0,0,0,88,34,2,0,96,1,0,0,152,26,2,0,216,0,0,0,192,19,2,0,214,0,0,0,112,13,2,0,74,1,0,0,160,6,2,0,2,0,0,0,208,1,2,0,84,0,0,0,64,253,1,0,208,0,0,0,16,248,1,0,114,1,0,0,184,243,1,0,82,1,0,0,184,238,1,0,104,0,0,0,112,234,1,0,234,0,0,0,176,229,1,0,6,1,0,0,208,223,1,0,30,0,0,0,152,190,2,0,0,0,0,0,72,158,1,0,240,0,0,0,144,199,1,0,104,1,0,0,0,196,1,0,104,1,0,0,144,42,2,0,116,0,0,0,112,188,1,0,176,0,0,0,240,170,1,0,2,1,0,0,120,164,1,0,98,1,0,0,184,160,1,0,12,0,0,0,248,156,1,0,152,0,0,0,216,152,1,0,112,1,0,0,168,150,1,0,110,0,0,0,72,149,1,0,250,0,0,0,120,145,1,0,184,0,0,0,0,139,1,0,130,1,0,0,96,136,1,0,126,0,0,0,80,134,1,0,134,0,0,0,144,132,1,0,20,1,0,0,240,130,1,0,60,0,0,0,64,128,1,0,66,0,0,0,208,125,1,0,70,0,0,0,112,123,1,0,90,1,0,0,88,121,1,0,76,1,0,0,184,119,1,0,76,0,0,0,216,117,1,0,110,1,0,0,0,116,1,0,68,1,0,0,224,113,1,0,36,0,0,0,96,182,2,0,196,0,0,0,0,137,1,0,122,0,0,0,208,105,1,0,106,0,0,0,136,102,1,0,6,0,0,0,224,99,1,0,224,0,0,0,192,97,1,0,226,0,0,0,208,95,1,0,46,1,0,0,0,93,1,0,44,1,0,0,120,90,1,0,82,0,0,0,160,87,1,0,202,0,0,0,168,83,1,0,154,0,0,0,168,79,1,0,164,0,0,0,144,74,1,0,186,0,0,0,184,72,1,0,218,0,0,0,104,69,1,0,44,0,0,0,136,65,1,0,12,1,0,0,184,59,1,0,112,0,0,0,208,54,1,0,8,1,0,0,248,51,1,0,58,1,0,0,208,49,1,0,122,1,0,0,0,48,1,0,78,0,0,0,216,45,1,0,66,1,0,0,120,43,1,0,118,0,0,0,48,41,1,0,52,1,0,0,208,38,1,0,126,1,0,0,48,37,1,0,244,0,0,0,72,35,1,0,64,0,0,0,152,33,1,0,14,1,0,0,72,32,1,0,88,1,0,0,144,30,1,0,254,0,0,0,72,28,1,0,124,1,0,0,240,110,3,0,190,0,0,0,192,108,3,0,50,1,0,0,56,105,3,0,50,0,0,0,208,102,3,0,86,1,0,0,192,165,1,0,60,1,0,0,200,97,3,0,42,0,0,0,32,96,3,0,40,1,0,0,48,93,3,0,198,0,0,0,144,86,3,0,114,1,0,0,240,84,3,0,238,0,0,0,240,161,1,0,238,0,0,0,24,80,3,0,248,0,0,0,192,77,3,0,22,1,0,0,32,42,2,0,10,0,0,0,8,74,3,0,92,1,0,0,0,72,3,0,162,0,0,0,208,69,3,0,162,0,0,0,56,67,3,0,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,25,2,0,232,18,2,0,200,12,2,0,48,6,2,0,128,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,121,1,0,0,0,0,0,8,120,1,0,0,0,0,0,192,172,1,0,240,164,1,0,102,105,116,46,108,111,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,0,0,0,0,120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,167,1,0,0,0,0,0,96,167,1,0,1,0,0,0,8,167,1,0,2,0,0,0,176,166,1,0,3,0,0,0,88,166,1,0,4,0,0,0,160,76,2,0,9,0,0,0,96,244,2,0,10,0,0,0,208,164,1,0,11,0,0,0,112,164,1,0,12,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,80,3,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,50,0,0,0,50,0,0,0,0,0,0,0,0,0,1,0,0,0,128,63,0,0,128,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,65,0,0,128,63,1,0,0,0,208,7,0,0,250,126,106,188,116,147,104,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,2,0,0,0,50,0,0,0,50,0,0,0,0,0,0,0,0,0,1,0,0,0,128,63,0,0,128,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,65,0,0,128,63,1,0,0,0,208,7,0,0,250,126,106,188,116,147,104,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,0,0,241,104,227,136,181,248,228,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,236,1,0,96,25,3,0,176,73,2,0,152,4,2,0,160,209,1,0,32,150,1,0,144,122,1,0,184,98,1,0,184,67,1,0,24,38,1,0,40,102,3,0,56,75,3,0,0,54,3,0,176,30,3,0,240,14,3,0,48,246,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,251,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,65,0,0,0,0,0,0,0,0,0,0,240,63,65,114,105,97,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,65,0,0,0,0,65,114,105,97,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,64,0,0,0,0,0,0,160,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,7,0,0,0,8,0,0,0,0,0,0,0,12,0,0,0,10,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,121,1,0,24,121,1,0,216,120,1,0,152,120,1,0,128,120,1,0,104,120,1,0,88,120,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,57,2,0,1,0,0,0,0,0,1,0,184,49,2,0,0,0,0,0,1,0,1,0,56,49,2,0,3,0,0,0,0,0,2,0,48,43,2,0,2,0,0,0,1,0,2,0,168,36,2,0,5,0,0,0,0,0,4,0,232,28,2,0,4,0,0,0,1,0,4,0,192,22,2,0,7,0,0,0,0,0,8,0,248,14,2,0,6,0,0,0,1,0,8,0,16,9,2,0,8,0,0,0,2,0,4,0,152,3,2,0,9,0,0,0,2,0,8,0,160,254,1,0,8,0,0,0,2,0,4,0,160,250,1,0,9,0,0,0,2,0,8,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,32,73,2,0,0,0,0,0,0,66,2,0,3,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,79,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,101,120,101,99,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,10,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,104,149,1,0,1,0,0,0,72,147,1,0,2,0,0,0,88,139,1,0,3,0,0,0,0,137,1,0,4,0,0,0,120,134,1,0,5,0,0,0,192,132,1,0,6,0,0,0,24,131,1,0,7,0,0,0,0,0,0,0,8,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,129,2,0,88,59,3,0,16,92,2,0,8,161,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,1,0,1,2,2,1,0,1,3,2,1,0,152,187,0,0,10,0,0,0,248,186,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,219,0,0,2,0,0,0,0,0,0,0,1,0,0,0,248,7,0,0,2,0,0,0,1,0,0,0,1,0,0,0,72,3,0,0,2,0,0,0,2,0,0,0,2,0,0,0,168,3,0,0,2,0,0,0,3,0,0,0,2,0,0,0,88,3,0,0,1,0,0,0,6,0,0,0,4,0,0,0,184,3,0,0,1,0,0,0,7,0,0,0,4,0,0,0,80,3,0,0,1,0,0,0,10,0,0,0,8,0,0,0,176,3,0,0,1,0,0,0,11,0,0,0,8,0,0,0,0,165,0,0,1,0,0,0,8,0,0,0,4,0,0,0,8,165,0,0,1,0,0,0,9,0,0,0,8,0,0,0,168,211,0,0,3,0,0,0,0,0,0,0,1,0,0,0,240,7,0,0,1,0,0,0,1,0,0,0,1,0,0,0,88,85,0,0,1,0,0,0,2,0,0,0,2,0,0,0,112,4,0,0,1,0,0,0,3,0,0,0,2,0,0,0,64,146,0,0,4,0,0,0,4,0,0,0,4,0,0,0,184,7,0,0,2,0,0,0,5,0,0,0,4,0,0,0,64,137,0,0,2,0,0,0,6,0,0,0,4,0,0,0,176,7,0,0,2,0,0,0,7,0,0,0,4,0,0,0,16,165,0,0,2,0,0,0,8,0,0,0,4,0,0,0,96,201,0,0,2,0,0,0,9,0,0,0,8,0,0,0,72,55,1,0,253,255,255,255,252,255,255,255,251,255,255,255,200,125,2,0,252,255,255,255,251,255,255,255,253,255,255,255,224,90,2,0,251,255,255,255,253,255,255,255,252,255,255,255,0,78,2,0,252,255,255,255,253,255,255,255,251,255,255,255,48,71,2,0,253,255,255,255,251,255,255,255,252,255,255,255,64,63,2,0,251,255,255,255,252,255,255,255,253,255,255,255,32,55,2,0,253,255,255,255,252,255,255,255,251,255,255,255,248,47,2,0,252,255,255,255,251,255,255,255,253,255,255,255,24,42,2,0,251,255,255,255,253,255,255,255,252,255,255,255,112,35,2,0,252,255,255,255,253,255,255,255,251,255,255,255,88,27,2,0,253,255,255,255,251,255,255,255,252,255,255,255,224,20,2,0,251,255,255,255,252,255,255,255,253,255,255,255,160,76,2,0,253,255,255,255,252,255,255,255,251,255,255,255,64,69,2,0,252,255,255,255,253,255,255,255,251,255,255,255,96,174,2,0,253,255,255,255,252,255,255,255,251,255,255,255,16,159,2,0,252,255,255,255,253,255,255,255,251,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,253,255,255,255,252,255,255,255,251,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,220,1,0,202,0,0,0,240,153,1,0,174,0,0,0,224,126,1,0,164,1,0,0,80,103,1,0,164,1,0,0,80,87,3,0,142,0,0,0,24,42,1,0,124,0,0,0,232,105,3,0,2,1,0,0,80,78,3,0,2,1,0,0,128,57,3,0,144,0,0,0,160,32,3,0,174,0,0,0,224,109,1,0,174,0,0,0,40,17,3,0,64,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194,176,0,0,0,0,0,0,1,0,0,0,1,0,1,0,18,0,0,0,1,0,1,0,33,0,0,0,1,0,1,0,51,0,0,0,1,0,1,0,64,0,0,0,1,0,1,0,86,0,0,0,2,0,1,0,102,0,0,0,2,0,1,0,118,0,0,0,3,0,1,0,137,0,0,0,3,0,1,0,153,0,0,0,1,0,1,0,169,0,0,0,3,0,1,0,177,0,0,0,1,0,1,0,193,0,0,0,1,0,1,0,184,0,0,0,1,0,1,0,209,0,0,0,1,0,1,0,225,0,0,0,2,0,2,0,252,0,0,0,4,0,1,0,1,1,0,0,4,0,1,0,218,1,0,0,2,0,1,0,23,1,0,0,2,0,1,0,39,1,0,0,2,0,1,0,55,1,0,0,3,0,1,0,89,1,0,0,1,0,1,0,96,1,0,0,1,0,2,0,112,1,0,0,2,0,1,0,136,1,0,0,1,0,0,0,144,1,0,0,1,0,2,0,160,1,0,0,3,0,2,0,176,1,0,0,4,0,2,0,201,1,0,0,2,0,1,0,233,1,0,0,2,0,3,0,0,0,0,0,255,255,255,255,0,0,0,0,1,0,0,0,1,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,3,0,0,0,1,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,154,153,153,153,153,153,169,63,184,30,133,235,81,184,158,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,73,1,0,255,255,255,0,72,93,1,0,0,0,0,0,48,5,2,0,160,160,160,0,248,92,1,0,0,0,255,0,32,4,2,0,0,192,0,0,208,3,2,0,255,128,0,0,104,3,2,0,255,0,192,0,136,2,2,0,238,238,0,0,8,2,2,0,0,64,192,0,184,1,2,0,0,200,200,0,96,1,2,0,225,105,65,0,184,0,2,0,32,192,255,0,120,0,2,0,64,128,0,0,0,0,2,0,255,128,192,0,104,255,1,0,128,96,48,0,208,254,1,0,0,0,139,0,64,254,1,0,0,128,64,0,200,253,1,0,255,128,255,0,104,253,1,0,212,255,127,0,200,92,1,0,42,42,165,0,48,55,1,0,0,255,255,0,160,252,1,0,208,224,64,0,16,252,1,0,0,0,0,0,208,251,1,0,26,26,26,0,88,251,1,0,51,51,51,0,216,250,1,0,77,77,77,0,48,250,1,0,102,102,102,0,128,249,1,0,127,127,127,0,88,248,1,0,153,153,153,0,240,247,1,0,179,179,179,0,128,32,2,0,192,192,192,0,144,247,1,0,204,204,204,0,24,247,1,0,229,229,229,0,168,246,1,0,255,255,255,0,64,246,1,0,50,50,240,0,232,245,1,0,144,238,144,0,160,245,1,0,230,216,173,0,48,245,1,0,240,85,240,0,112,244,1,0,255,255,224,0,232,243,1,0,130,221,238,0,144,243,1,0,193,182,255,0,8,243,1,0,238,238,175,0,120,242,1,0,0,215,255,0,208,92,1,0,0,255,0,0,200,241,1,0,0,100,0,0,0,241,1,0,127,255,0,0,136,240,1,0,34,139,34,0,248,239,1,0,87,139,46,0,240,92,1,0,255,0,0,0,248,238,1,0,139,0,0,0,104,238,1,0,112,25,25,0,232,237,1,0,128,0,0,0,104,237,1,0,205,0,0,0,48,237,1,0,235,206,135,0,160,92,1,0,255,255,0,0,184,92,1,0,255,0,255,0,32,236,1,0,209,206,0,0,184,235,1,0,147,20,255,0,192,54,1,0,80,127,255,0,160,234,1,0,128,128,240,0,72,234,1,0,0,69,255,0,216,233,1,0,114,128,250,0,128,233,1,0,122,150,233,0,168,232,1,0,140,230,240,0,240,231,1,0,107,183,189,0,144,231,1,0,11,134,184,0,64,231,1,0,220,245,245,0,232,230,1,0,32,128,160,0,128,230,1,0,0,165,255,0,232,229,1,0,238,130,238,0,136,229,1,0,211,0,148,0,32,229,1,0,221,160,221,0,160,228,1,0,64,80,144,0,56,228,1,0,47,107,85,0,176,227,1,0,0,20,128,0,104,227,1,0,20,20,128,0,176,226,1,0,20,64,128,0,32,226,1,0,128,64,128,0,224,224,1,0,192,96,128,0,56,224,1,0,255,96,128,0,184,223,1,0,0,128,128,0,120,223,1,0,64,128,255,0,40,223,1,0,64,160,255,0,176,222,1,0,96,160,255,0,64,222,1,0,112,160,255,0,216,221,1,0,192,192,255,0,72,221,1,0,128,255,255,0,208,220,1,0,192,255,255,0,56,220,1,0,158,183,205,0,200,219,1,0,240,255,240,0,168,218,1,0,205,182,160,0,96,218,1,0,193,255,193,0,24,218,1,0,176,192,205,0,80,217,1,0,64,255,124,0,112,216,1,0,32,255,160,0,8,93,1,0,190,190,190,0,24,216,1,0,211,211,211,0,120,215,1,0,211,211,211,0,32,214,1,0,160,160,160,0,152,213,1,0,205,182,160,0,56,212,1,0,0,0,0,0,192,211,1,0,26,26,26,0,56,211,1,0,51,51,51,0,248,210,1,0,77,77,77,0,56,210,1,0,102,102,102,0,232,209,1,0,127,127,127,0,152,209,1,0,153,153,153,0,112,209,1,0,179,179,179,0,32,209,1,0,204,204,204,0,152,200,1,0,229,229,229,0,224,199,1,0,255,255,255,0,0,0,0,0,255,255,255,255,100,118,1,0,254,255,255,255,1,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,205,204,204,204,204,204,236,63,154,153,153,153,153,153,201,63,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,154,153,153,153,153,153,169,63,51,51,51,51,51,51,227,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,2,0,0,0,1,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,123,20,174,71,225,122,148,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,118,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) -.concat([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,161,1,0,120,157,1,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,28,0,0,0,0,0,0,72,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,65,0,0,0,0,0,0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,83,119,105,116,122,101,114,108,97,110,100,76,105,103,104,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,85,3,0,88,83,3,0,72,89,1,0,40,81,3,0,96,78,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,56,46,51,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,9,2,0,10,0,0,0,152,31,3,0,160,1,0,0,168,77,2,0,96,0,0,0,80,7,2,0,72,1,0,0,96,212,1,0,30,0,0,0,224,150,1,0,76,1,0,0,208,123,1,0,60,0,0,0,64,100,1,0,214,0,0,0,184,69,1,0,166,1,0,0,64,39,1,0,140,0,0,0,224,194,2,0,98,1,0,0,104,76,3,0,98,1,0,0,96,55,3,0,236,0,0,0,48,31,3,0,166,0,0,0,200,16,3,0,132,1,0,0,8,252,2,0,94,1,0,0,80,209,2,0,36,0,0,0,16,189,2,0,240,0,0,0,248,172,2,0,150,1,0,0,208,157,2,0,112,0,0,0,80,141,2,0,166,1,0,0,232,123,2,0,170,1,0,0,88,89,2,0,208,0,0,0,80,77,2,0,22,1,0,0,24,70,2,0,138,0,0,0,80,62,2,0,128,0,0,0,248,53,2,0,114,1,0,0,144,47,2,0,38,1,0,0,176,41,2,0,184,0,0,0,0,35,2,0,38,0,0,0,208,26,2,0,22,0,0,0,40,20,2,0,108,1,0,0,160,13,2,0,26,0,0,0,0,7,2,0,32,1,0,0,24,2,2,0,232,0,0,0,120,253,1,0,194,0,0,0,96,248,1,0,84,1,0,0,248,243,1,0,144,1,0,0,8,239,1,0,96,1,0,0,176,234,1,0,36,1,0,0,240,148,1,0,118,0,0,0,0,0,0,0,112,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,255,255,255,0,0,0,0,24,24,2,0,114,0,0,0,216,23,2,0,104,0,0,0,88,23,2,0,99,0,0,0,72,22,2,0,121,0,0,0,240,20,2,0,120,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,8,124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,232,13,2,0,144,7,2,0,72,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,254,255,255,255,0,0,0,0,254,255,255,255,254,255,255,255,254,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,112,213,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,32,66,111,108,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,97,1,0,0,0,0,0,57,180,200,118,190,159,240,63,224,95,1,0,0,0,0,0,47,221,36,6,129,149,241,63,16,93,1,0,0,0,0,0,135,22,217,206,247,83,241,63,32,91,1,0,0,0,0,0,147,24,4,86,14,45,240,63,104,134,1,0,0,0,0,0,49,8,172,28,90,100,239,63,8,131,1,0,0,0,0,0,133,235,81,184,30,133,239,63,176,132,1,0,0,0,0,0,227,165,155,196,32,176,238,63,88,128,1,0,0,0,0,0,0,0,0,0,0,0,240,63,48,109,1,0,0,0,0,0,8,172,28,90,100,59,245,63,176,102,1,0,0,0,0,0,8,172,28,90,100,59,245,63,232,105,1,0,0,0,0,0,176,114,104,145,237,124,243,63,16,100,1,0,0,0,0,0,219,249,126,106,188,116,245,63,224,45,1,0,0,0,0,0,78,98,16,88,57,180,236,63,168,141,2,0,0,0,0,0,155,85,159,171,173,216,243,63,88,141,2,0,0,0,0,0,210,111,95,7,206,25,237,63,40,141,2,0,0,0,0,0,39,194,134,167,87,202,243,63,8,141,2,0,0,0,0,0,188,150,144,15,122,54,237,63,240,140,2,0,0,0,0,0,84,82,39,160,137,176,246,63,216,140,2,0,0,0,0,0,215,163,112,61,10,215,241,63,192,140,2,0,0,0,0,0,233,72,46,255,33,253,236,63,160,140,2,0,0,0,0,0,28,124,97,50,85,48,246,63,120,140,2,0,0,0,0,0,224,190,14,156,51,162,246,63,88,140,2,0,0,0,0,0,238,235,192,57,35,74,243,63,48,140,2,0,0,0,0,0,208,213,86,236,47,187,242,63,248,139,2,0,0,0,0,0,201,118,190,159,26,47,245,63,208,139,2,0,0,0,0,0,178,157,239,167,198,75,245,63,128,139,2,0,0,0,0,0,238,235,192,57,35,74,243,63,104,139,2,0,0,0,0,0,121,88,168,53,205,59,243,63,64,139,2,0,0,0,0,0,121,88,168,53,205,59,243,63,16,139,2,0,0,0,0,0,233,72,46,255,33,253,236,63,248,138,2,0,0,0,0,0,233,72,46,255,33,253,236,63,216,138,2,0,0,0,0,0,233,72,46,255,33,253,236,63,200,138,2,0,0,0,0,0,135,22,217,206,247,83,249,63,168,138,2,0,0,0,0,0,211,77,98,16,88,57,242,63,128,138,2,0,0,0,0,0,211,77,98,16,88,57,242,63,96,138,2,0,0,0,0,0,47,221,36,6,129,149,241,63,56,138,2,0,0,0,0,0,147,24,4,86,14,45,240,63,40,138,2,0,0,0,0,0,176,114,104,145,237,124,243,63,16,138,2,0,0,0,0,0,219,249,126,106,188,116,245,63,0,138,2,0,0,0,0,0,227,165,155,196,32,176,238,63,232,137,2,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,160,15,0,0,0,0,0,0,255,255,255,255,0,0,0,0,112,23,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,251,255,255,255,0,0,0,0,152,190,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,153,1,0,40,151,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,63,1,0,0,0,6,0,0,0,252,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,2,0,0,0,0,0,0,0,0,0,0,0,0,56,143,192,0,0,0,0,0,56,143,192,0,0,0,0,0,56,143,192,0,0,0,0,0,56,143,192,0,0,0,0,0,56,143,192,0,0,0,0,0,56,143,192,0,0,0,0,0,56,143,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,37,45,49,55,115,32,32,37,115,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,1,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,1,0,0,0,252,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,46,1,0,0,0,0,0,224,61,3,0,1,0,0,0,112,22,3,0,2,0,0,0,96,89,1,0,3,0,0,0,96,231,1,0,4,0,0,0,88,166,1,0,5,0,0,0,176,166,1,0,6,0,0,0,96,244,2,0,7,0,0,0,208,174,2,0,8,0,0,0,192,222,1,0,9,0,0,0,8,112,3,0,10,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,122,0,0,0,1,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,121,0,0,0,5,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,120,0,0,0,5,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,99,98,0,0,5,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,122,50,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,121,50,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,120,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,114,0,0,0,2,0,0,0,0,0,0,0,0,0,20,192,0,0,0,0,0,0,20,64,116,0,0,0,0,0,0,0,0,0,0,0,0,0,20,192,0,0,0,0,0,0,20,64,117,0,0,0,0,0,0,0,0,0,0,0,0,0,20,192,0,0,0,0,0,0,20,64,118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) -.concat([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,36,192,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) -.concat([0,0,0,0,1,37,32,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,240,63,0,0,0,0,0,0,224,63,1,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,77,2,0,176,69,2,0,240,61,2,0,128,53,2,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74,97,110,0,0,0,0,0,70,101,98,0,0,0,0,0,77,97,114,0,0,0,0,0,65,112,114,0,0,0,0,0,77,97,121,0,0,0,0,0,74,117,110,0,0,0,0,0,74,117,108,0,0,0,0,0,65,117,103,0,0,0,0,0,83,101,112,0,0,0,0,0,79,99,116,0,0,0,0,0,78,111,118,0,0,0,0,0,68,101,99,0,0,0,0,0,83,117,110,0,0,0,0,0,77,111,110,0,0,0,0,0,84,117,101,0,0,0,0,0,87,101,100,0,0,0,0,0,84,104,117,0,0,0,0,0,70,114,105,0,0,0,0,0,83,97,116,0,0,0,0,0,0,0,0,0,0,0,0,0,112,108,111,116,95,97,120,105,115,95,120,109,97,120,0,0,71,80,86,65,76,95,88,95,77,65,88,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,37,115,32,61,32,37,103,59,10,0,0,0,87,105,108,108,32,110,111,116,32,99,104,101,99,107,32,102,111,114,32,117,110,100,101,102,105,110,101,100,32,100,97,116,97,112,111,105,110,116,115,32,40,109,97,121,32,99,97,117,115,101,32,99,114,97,115,104,101,115,41,46,10,0,0,0,117,110,100,101,102,105,110,101,100,32,118,97,114,105,97,98,108,101,58,32,37,115,0,0,101,120,101,99,117,116,105,110,103,58,32,37,115,0,0,0,112,108,111,116,95,97,120,105,115,95,120,109,105,110,0,0,65,109,98,105,103,117,111,117,115,32,114,101,113,117,101,115,116,32,39,37,46,42,115,39,59,32,112,111,115,115,105,98,108,101,32,109,97,116,99,104,101,115,58,10,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,37,115,32,61,32,37,100,59,10,0,0,0,116,109,95,109,100,97,121,0,97,108,108,95,116,101,114,109,95,110,97,109,101,115,50,0,71,80,86,65,76,95,88,95,77,73,78,0,0,0,0,0,108,115,0,0,0,0,0,0,105,110,100,101,120,95,109,105,110,0,0,0,0,0,0,0,110,111,32,99,111,108,117,109,110,32,119,105,116,104,32,104,101,97,100,101,114,32,34,37,115,34,0,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,104,101,105,103,104,116,32,61,32,37,46,49,102,59,10,0,0,0,0,0,0,0,0,10,9,85,115,101,114,32,97,110,100,32,100,101,102,97,117,108,116,32,118,97,114,105,97,98,108,101,115,58,10,0,0,114,101,108,36,97,116,105,118,101,0,0,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,119,105,100,116,104,32,61,32,37,46,49,102,59,10,0,99,104,97,110,103,101,32,118,105,101,119,32,40,115,99,97,108,105,110,103,41,46,32,85,115,101,32,60,99,116,114,108,62,32,116,111,32,115,99,97,108,101,32,116,104,101,32,97,120,101,115,32,111,110,108,121,46,0,0,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,121,116,111,112,32,61,32,37,46,49,102,59,10,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,121,98,111,116,32,61,32,37,46,49,102,59,10,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,120,109,97,120,32,61,32,37,46,49,102,59,10,0,0,101,108,108,105,112,115,101,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,120,109,105,110,32,61,32,37,46,49,102,59,10,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,116,101,114,109,95,121,109,97,120,32,61,32,37,100,59,10,0,0,0,0,0,0,0,67,111,110,116,105,110,117,101,46,0,0,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,116,101,114,109,95,120,109,97,120,32,61,32,37,100,59,10,0,0,0,0,0,0,0,122,116,105,99,115,0,0,0,47,47,32,112,108,111,116,32,98,111,117,110,100,97,114,105,101,115,32,97,110,100,32,97,120,105,115,32,115,99,97,108,105,110,103,32,105,110,102,111,114,109,97,116,105,111,110,32,102,111,114,32,109,111,117,115,105,110,103,32,10,0,0,0,116,109,95,104,111,117,114,0,37,115,32,0,0,0,0,0,10,60,115,99,114,105,112,116,32,116,121,112,101,61,34,116,101,120,116,47,106,97,118,97,115,99,114,105,112,116,34,62,60,33,91,67,68,65,84,65,91,10,0,0,0,0,0,0,108,105,110,101,116,121,112,101,36,115,0,0,0,0,0,0,115,117,109,115,113,0,0,0,115,116,114,105,110,103,99,111,108,117,109,110,40,41,32,99,97,108,108,101,100,32,102,114,111,109,32,105,110,118,97,108,105,100,32,99,111,110,116,101,120,116,0,0,0,0,0,0,32,57,44,52,44,49,44,52,44,49,44,52,0,0,0,0,10,9,86,97,114,105,97,98,108,101,115,32,98,101,103,105,110,110,105,110,103,32,119,105,116,104,32,37,115,58,10,0,32,56,44,52,44,50,44,52,0,0,0,0,0,0,0,0,116,105,109,101,32,102,111,114,109,97,116,32,115,116,114,105,110,103,32,101,120,112,101,99,116,101,100,0,0,0,0,0,10,37,115,111,98,106,101,99,116,32,37,50,100,32,0,0,68,105,109,95,49,0,0,0,60,66,50,45,77,111,116,105,111,110,62,0,0,0,0,0,104,101,97,100,32,115,105,122,101,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,32,50,44,52,0,0,0,0,32,53,44,56,0,0,0,0,83,117,98,116,111,112,105,99,32,111,102,32,0,0,0,0,32,100,61,39,0,0,0,0,99,108,97,115,115,61,34,103,114,105,100,108,105,110,101,34,32,0,0,0,0,0,0,0,115,116,114,111,107,101,45,100,97,115,104,97,114,114,97,121,61,39,37,115,39,32,0,0,83,116,111,112,46,0,0,0,115,116,114,111,107,101,61,39,37,115,39,32,0,0,0,0,115,116,114,111,107,101,61,39,114,103,98,40,37,51,100,44,32,37,51,100,44,32,37,51,100,41,39,32,0,0,0,0,116,109,95,109,105,110,0,0,32,0,0,0,0,0,0,0,9,60,112,97,116,104,32,0,108,105,110,101,115,36,116,121,108,101,0,0,0,0,0,0,77,37,46,49,102,44,37,46,49,102,32,0,0,0,0,0,10,9,65,108,108,32,97,118,97,105,108,97,98,108,101,32,118,97,114,105,97,98,108,101,115,58,10,0,0,0,0,0,10,9,9,9,32,32,32,32,116,111,32,0,0,0,0,0,10,9,9,0,0,0,0,0,76,37,46,49,102,44,37,46,49,102,32,0,0,0,0,0,99,104,97,110,103,101,32,118,105,101,119,32,40,114,111,116,97,116,105,111,110,41,46,32,85,115,101,32,60,99,116,114,108,62,32,116,111,32,114,111,116,97,116,101,32,116,104,101,32,97,120,101,115,32,111,110,108,121,46,0,0,0,0,0,60,47,116,101,120,116,62,10,9,60,47,103,62,10,0,0,38,97,109,112,59,0,0,0,38,108,116,59,0,0,0,0,9,9,60,116,101,120,116,62,0,0,0,0,0,0,0,0,10,10,40,83,41,116,111,112,32,102,105,116,44,32,40,67,41,111,110,116,105,110,117,101,44,32,40,69,41,120,101,99,117,116,101,32,70,73,84,95,83,67,82,73,80,84,58,32,32,0,0,0,0,0,0,0,9,9,60,116,101,120,116,32,120,109,108,58,115,112,97,99,101,61,34,112,114,101,115,101,114,118,101,34,62,0,0,0,32,32,0,0,0,0,0,0,116,109,95,115,101,99,0,0,97,108,108,95,116,101,114,109,95,110,97,109,101,115,0,0,32,116,101,120,116,45,97,110,99,104,111,114,58,37,115,34,62,10,0,0,0,0,0,0,108,97,36,98,101,108,0,0,99,114,101,97,116,101,95,97,110,100,95,115,101,116,95,118,97,114,0,0,0,0,0,0,99,111,108,117,109,110,40,41,32,99,97,108,108,101,100,32,102,114,111,109,32,105,110,118,97,108,105,100,32,99,111,110,116,101,120,116,0,0,0,0,32,102,111,110,116,45,115,116,121,108,101,58,37,115,59,0,97,108,108,0,0,0,0,0,32,102,111,110,116,45,119,101,105,103,104,116,58,37,115,59,0,0,0,0,0,0,0,0,37,97,32,37,98,32,37,100,32,37,72,58,37,77,58,37,83,32,37,89,0,0,0,0,37,115,111,98,106,101,99,116,32,37,50,100,32,112,111,108,121,103,111,110,32,0,0,0,60,66,49,45,77,111,116,105,111,110,62,0,0,0,0,0,110,111,102,105,108,108,36,101,100,0,0,0,0,0,0,0,59,32,102,111,110,116,45,102,97,109,105,108,121,58,37,115,59,32,102,111,110,116,45,115,105,122,101,58,37,46,50,102,112,116,59,0,0,0,0,0,114,103,98,40,37,100,44,37,100,44,37,100,41,0,0,0,104,101,108,112,32,112,114,111,109,112,116,0,0,0,0,0,34,32,115,116,121,108,101,61,34,115,116,114,111,107,101,58,110,111,110,101,59,32,102,105,108,108,58,0,0,0,0,0,32,114,111,116,97,116,101,40,37,105,41,0,0,0,0,0,9,60,103,32,116,114,97,110,115,102,111,114,109,61,34,116,114,97,110,115,108,97,116,101,40,37,46,49,102,44,37,46,49,102,41,0,0,0,0,0,37,115,95,101,114,114,0,0,101,110,100,0,0,0,0,0,109,105,100,100,108,101,0,0,101,120,112,105,110,116,0,0,32,32,37,49,53,115,32,32,37,115,10,0,0,0,0,0,115,116,97,114,116,0,0,0,107,101,121,116,36,105,116,108,101,0,0,0,0,0,0,0,112,111,115,95,109,97,120,95,121,0,0,0,0,0,0,0,68,97,116,97,32,102,105,108,101,32,105,115,32,101,109,112,116,121,0,0,0,0,0,0,9,60,117,115,101,32,120,108,105,110,107,58,104,114,101,102,61,39,35,103,112,80,116,37,117,39,32,116,114,97,110,115,102,111,114,109,61,39,116,114,97,110,115,108,97,116,101,40,37,46,49,102,44,37,46,49,102,41,32,115,99,97,108,101,40,37,46,50,102,41,39,37,115,47,62,10,0,0,0,0,108,105,110,101,115,116,121,108,101,32,110,111,116,32,102,111,117,110,100,0,0,0,0,0,9,60,117,115,101,32,120,108,105,110,107,58,104,114,101,102,61,39,35,103,112,68,111,116,39,32,120,61,39,37,46,49,102,39,32,121,61,39,37,46,49,102,39,37,115,47,62,10,0,0,0,0,0,0,0,0,109,97,114,107,32,122,111,111,109,32,114,101,103,105,111,110,32,40,111,110,108,121,32,102,111,114,32,50,100,45,112,108,111,116,115,32,97,110,100,32,109,97,112,115,41,46,0,0,32,99,111,108,111,114,61,39,37,115,39,0,0,0,0,0,32,99,111,108,111,114,61,39,114,103,98,40,37,51,100,44,32,37,51,100,44,32,37,51,100,41,39,0,0,0,0,0,104,101,108,112,32,98,117,102,102,101,114,0,0,0,0,0,98,111,108,100,0,0,0,0,105,116,97,108,105,99,0,0,47,117,115,114,47,108,111,99,97,108,47,115,104,97,114,101,47,103,110,117,112,108,111,116,47,52,46,54,0,0,0,0,32,73,116,97,108,105,99,0,37,46,48,102,0,0,0,0,32,105,116,97,108,105,99,0,101,120,112,101,99,116,101,100,32,111,112,116,105,111,110,97,108,32,97,120,105,115,32,110,97,109,101,0,0,0,0,0,37,109,47,37,100,47,37,121,0,0,0,0,0,0,0,0,32,66,111,108,100,0,0,0,97,105,114,121,0,0,0,0,10,65,118,97,105,108,97,98,108,101,32,116,101,114,109,105,110,97,108,32,116,121,112,101,115,58,10,0,0,0,0,0,32,98,111,108,100,0,0,0,34,62,10,0,0,0,0,0,107,36,101,121,0,0,0,0,112,111,115,95,109,105,110,95,121,0,0,0,0,0,0,0,68,97,116,97,32,102,105,108,101,32,114,101,97,100,32,101,114,114,111,114,0,0,0,0,80,65,71,69,82,0,0,0,9,108,105,110,101,115,116,121,108,101,32,37,100,44,32,0,109,105,116,101,114,0,0,0,60,66,51,62,0,0,0,0,102,105,108,108,36,101,100,0,59,32,115,116,114,111,107,101,45,119,105,100,116,104,58,37,46,50,102,59,32,115,116,114,111,107,101,45,108,105,110,101,99,97,112,58,37,115,59,32,115,116,114,111,107,101,45,108,105,110,101,106,111,105,110,58,37,115,0,0,0,0,0,0,99,117,114,114,101,110,116,67,111,108,111,114,0,0,0,0,99,112,49,50,53,48,0,0,32,111,112,101,110,32,121,108,111,119,32,121,104,105,103,104,32,121,99,108,111,115,101,32,119,105,100,116,104,0,0,0,114,103,98,40,37,51,100,44,32,37,51,100,44,32,37,51,100,41,0,0,0,0,0,0,60,103,32,115,116,121,108,101,61,34,102,105,108,108,58,110,111,110,101,59,32,99,111,108,111,114,58,37,115,59,32,115,116,114,111,107,101,58,0,0,37,54,46,51,102,32,0,0,9,9,60,47,112,97,116,116,101,114,110,62,10,9,60,47,100,101,102,115,62,10,0,0,9,9,9,60,112,97,116,104,32,115,116,121,108,101,32,61,32,39,37,115,32,37,115,58,99,117,114,114,101,110,116,67,111,108,111,114,39,32,100,61,39,37,115,39,47,62,10,0,108,97,109,98,101,114,116,119,0,0,0,0,0,0,0,0,108,105,115,116,95,116,101,114,109,115,0,0,0,0,0,0,9,9,9,60,112,97,116,104,32,115,116,121,108,101,32,61,32,39,37,115,32,37,115,58,37,115,39,32,100,61,32,39,37,115,39,47,62,10,0,0,105,115,36,111,115,97,109,112,108,101,115,0,0,0,0,0,32,32,68,97,116,97,32,66,108,111,99,107,115,58,32,32,37,42,108,100,10,0,0,0,102,36,105,116,0,0,0,0,9,9,9,60,112,97,116,104,32,115,116,121,108,101,61,39,37,115,32,37,115,58,114,103,98,40,37,100,44,37,100,44,37,100,41,39,32,100,61,39,37,115,39,47,62,10,0,0,108,105,110,101,116,121,112,101,32,110,111,116,32,102,111,117,110,100,0,0,0,0,0,0,83,116,97,116,115,32,99,111,109,109,97,110,100,32,110,111,116,32,97,118,97,105,108,97,98,108,101,32,105,110,32,112,111,108,97,114,32,109,111,100,101,0,0,0,0,0,0,0,115,116,114,111,107,101,58,110,111,110,101,59,0,0,0,0,114,101,109,111,118,101,32,108,97,98,101,108,32,99,108,111,115,101,32,116,111,32,112,111,105,110,116,101,114,32,105,102,32,96,115,101,116,32,109,111,117,115,101,32,108,97,98,101,108,115,96,32,105,115,32,111,110,0,0,0,0,0,0,0,102,105,108,108,58,110,111,110,101,59,0,0,0,0,0,0,10,37,115,32,0,0,0,0,77,45,50,44,48,32,76,52,44,49,50,32,77,48,44,45,52,32,76,56,44,49,50,32,77,52,44,45,52,32,76,49,48,44,56,0,0,0,0,0,77,45,50,44,56,32,76,52,44,45,52,32,77,48,44,49,50,32,76,56,44,45,52,32,77,52,44,49,50,32,76,49,48,44,48,0,0,0,0,0,77,45,52,44,56,32,76,56,44,45,52,32,77,48,44,49,50,32,76,49,50,44,48,0,77,45,52,44,48,32,76,56,44,49,50,32,77,48,44,45,52,32,76,49,50,44,56,0,37,45,49,53,46,49,53,115,0,0,0,0,0,0,0,0,85,110,114,101,99,111,103,110,105,122,101,100,32,111,112,116,105,111,110,46,32,83,101,101,32,39,104,101,108,112,32,115,104,111,119,39,46,0,0,0,77,48,44,48,32,76,48,44,56,32,76,56,44,56,32,76,56,44,48,32,76,48,44,48,0,0,0,0,0,0,0,0,77,48,44,48,32,76,56,44,56,32,77,48,44,56,32,76,56,44,48,32,77,48,44,52,32,76,52,44,56,32,76,56,44,52,32,76,52,44,48,32,76,48,44,52,0,0,0,0,97,116,97,110,104,0,0,0,90,97,112,102,32,68,105,110,103,98,97,116,115,0,0,0,77,48,44,48,32,76,56,44,56,32,77,48,44,56,32,76,56,44,48,0,0,0,0,0,104,105,115,36,116,111,114,121,115,105,122,101,0,0,0,0,32,32,66,108,97,110,107,58,32,32,32,32,32,32,32,32,37,42,108,100,10,0,0,0,46,46,46,0,0,0,0,0,9,60,100,101,102,115,62,10,9,9,60,112,97,116,116,101,114,110,32,105,100,61,39,103,112,80,97,116,37,100,39,32,112,97,116,116,101,114,110,85,110,105,116,115,61,39,117,115,101,114,83,112,97,99,101,79,110,85,115,101,39,32,120,61,39,48,39,32,121,61,39,48,39,32,119,105,100,116,104,61,39,56,39,32,104,101,105,103,104,116,61,39,56,39,62,10,0,0,0,0,0,0,0,0,9,108,105,110,101,116,121,112,101,32,37,100,44,32,0,0,110,111,102,111,114,116,36,114,97,110,0,0,0,0,0,0,103,112,98,105,110,0,0,0,32,117,110,105,116,115,32,0,115,116,114,111,107,101,0,0,60,67,116,114,108,45,66,50,62,0,0,0,0,0,0,0,9,60,103,32,115,116,121,108,101,32,61,32,39,115,116,114,111,107,101,58,110,111,110,101,59,32,115,104,97,112,101,45,114,101,110,100,101,114,105,110,103,58,99,114,105,115,112,69,100,103,101,115,39,62,10,0,103,101,110,95,111,110,101,95,99,111,110,116,111,117,114,58,32,110,111,32,99,111,110,116,111,117,114,32,102,111,117,110,100,10,0,0,0,0,0,0,37,115,32,61,32,39,99,117,114,114,101,110,116,67,111,108,111,114,39,0,0,0,0,0,32,60,32,0,0,0,0,0,37,115,32,61,32,39,37,115,39,0,0,0,0,0,0,0,99,97,110,110,111,116,32,98,101,32,104,101,114,101,0,0,78,101,101,100,32,102,117,108,108,32,117,115,105,110,103,32,115,112,101,99,32,102,111,114,32,121,32,116,105,109,101,32,100,97,116,97,0,0,0,0,37,115,32,61,32,39,114,103,98,40,37,51,100,44,32,37,51,100,44,32,37,51,100,41,39,0,0,0,0,0,0,0,102,105,108,108,0,0,0,0,45,45,100,101,102,97,117,108,116,45,115,101,116,116,105,110,103,115,0,0,0,0,0,0,37,45,54,46,54,115,32,0,39,47,62,10,0,0,0,0,117,115,101,114,32,102,117,110,99,0,0,0,0,0,0,0,37,46,49,102,44,37,46,49,102,37,115,0,0,0,0,0,97,99,111,115,104,0,0,0,90,97,112,102,32,67,104,97,110,99,101,114,121,32,77,101,100,105,117,109,32,73,116,97,108,105,99,0,0,0,0,0,32,112,111,105,110,116,115,32,61,32,39,0,0,0,0,0,109,111,114,101,62,32,0,0,104,105,100,36,100,101,110,51,100,0,0,0,0,0,0,0,32,32,73,110,118,97,108,105,100,58,32,32,32,32,32,32,37,42,108,100,10,0,0,0,96,98,117,105,108,116,105,110,45,116,111,103,103,108,101,45,114,117,108,101,114,96,0,0,37,46,55,55,115,37,115,10,37,115,58,37,100,58,0,0,32,102,105,108,108,32,61,32,39,117,114,108,40,35,103,112,80,97,116,37,100,41,39,0,9,76,105,110,101,116,121,112,101,115,32,114,101,112,101,97,116,32,101,118,101,114,121,32,37,100,32,117,110,108,101,115,115,32,101,120,112,108,105,99,105,116,108,121,32,100,101,102,105,110,101,100,10,0,0,0,32,32,97,110,103,108,101,32,37,103,0,0,0,0,0,0,32,102,105,108,108,45,111,112,97,99,105,116,121,32,61,32,39,37,102,39,0,0,0,0,47,121,115,116,101,112,32,49,32,105,109,97,120,32,100,105,118,32,100,101,102,32,47,121,48,32,48,32,100,101,102,32,47,105,105,32,48,32,100,101,102,10,0,0,0,0,0,0,67,97,110,110,111,116,32,111,112,101,110,32,37,115,32,102,105,108,101,32,39,37,115,39,0,0,0,0,0,0,0,0,99,117,114,118,101,0,0,0,120,32,112,111,115,0,0,0,111,114,32,100,114,97,119,32,108,97,98,101,108,115,32,105,102,32,96,115,101,116,32,109,111,117,115,101,32,108,97,98,101,108,115,32,105,115,32,111,110,96,0,0,0,0,0,0,32,102,105,108,108,32,61,32,39,37,115,39,0,0,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,32,58,32,116,121,112,101,32,110,101,105,116,104,101,114,32,73,78,84,32,111,114,32,67,77,80,76,88,0,0,0,0,0,0,9,9,60,112,111,108,121,103,111,110,32,0,0,0,0,0,99,97,110,110,111,116,32,115,101,116,32,114,97,110,103,101,32,119,105,116,104,32,114,101,112,108,111,116,0,0,0,0,32,120,109,108,58,115,112,97,99,101,61,34,112,114,101,115,101,114,118,101,34,0,0,0,32,102,105,108,108,61,34,110,111,110,101,34,0,0,0,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,100,121,61,34,37,46,50,102,112,116,34,0,0,0,0,32,100,120,61,34,37,46,50,102,101,109,34,0,0,0,0,97,115,105,110,104,0,0,0,83,121,109,98,111,108,0,0,32,102,111,110,116,45,115,116,121,108,101,61,34,37,115,34,32,0,0,0,0,0,0,0,103,36,114,105,100,0,0,0,32,32,79,117,116,32,111,102,32,114,97,110,103,101,58,32,37,42,108,100,10,0,0,0,82,101,119,105,110,100,105,110,103,32,102,100,32,37,100,10,0,0,0,0,0,0,0,0,32,102,111,110,116,45,119,101,105,103,104,116,61,34,37,115,34,32,0,0,0,0,0,0,40,37,115,37,103,44,32,37,115,37,103,44,32,37,115,37,103,41,0,0,0,0,0,0,122,0,0,0,0,0,0,0,44,32,37,115,37,103,0,0,110,111,114,109,97,108,0,0,73,110,32,108,111,103,32,109,111,100,101,32,114,114,97,110,103,101,32,109,117,115,116,32,110,111,116,32,105,110,99,108,117,100,101,32,48,0,0,0,97,110,110,111,116,97,116,101,32,116,104,101,32,103,114,97,112,104,32,117,115,105,110,103,32,96,109,111,117,115,101,102,111,114,109,97,116,96,32,40,115,101,101,32,107,101,121,115,32,39,49,39,44,32,39,50,39,41,0,0,0,0,0,0,32,102,111,110,116,45,115,105,122,101,61,34,37,46,49,102,112,116,34,0,0,0,0,0,32,115,116,121,108,101,61,34,102,111,110,116,45,102,97,109,105,108,121,58,37,115,34,32,0,0,0,0,0,0,0,0,60,116,115,112,97,110,0,0,60,116,115,112,97,110,32,100,120,61,34,45,37,46,49,102,101,109,34,32,100,121,61,34,37,46,49,102,112,116,34,62,0,0,0,0,0,0,0,0,79,110,108,121,32,117,110,100,101,102,105,110,101,100,32,100,97,116,97,112,111,105,110,116,115,32,97,114,101,32,111,109,105,116,116,101,100,32,102,114,111,109,32,116,104,101,32,115,117,114,102,97,99,101,46,10,0,0,0,0,0,0,0,0,37,115,60,47,116,115,112,97,110,62,0,0,0,0,0,0,10,10,99,111,114,114,101,108,97,116,105,111,110,32,109,97,116,114,105,120,32,111,102,32,116,104,101,32,102,105,116,32,112,97,114,97,109,101,116,101,114,115,58,10,10,0,0,0,60,47,103,62,10,0,0,0,10,72,101,108,112,32,116,111,112,105,99,115,32,97,118,97,105,108,97,98,108,101,58,10,0,0,0,0,0,0,0,0,62,10,0,0,0,0,0,0,105,110,118,110,111,114,109,0,80,97,108,97,116,105,110,111,32,66,111,108,100,32,73,116,97,108,105,99,0,0,0,0,111,110,99,108,105,99,107,61,34,103,110,117,112,108,111,116,95,115,118,103,46,116,111,103,103,108,101,86,105,115,105,98,105,108,105,116,121,40,101,118,116,44,39,37,115,95,112,108,111,116,95,37,100,37,115,39,41,34,0,0,0,0,0,0,102,117,36,110,99,116,105,111,110,115,0,0,0,0,0,0,32,32,82,101,99,111,114,100,115,58,32,32,32,32,32,32,37,42,108,100,10,0,0,0,83,107,105,112,112,105,110,103,32,117,110,114,101,97,100,97,98,108,101,32,102,105,108,101,32,34,37,115,34,0,0,0,9,60,103,32,118,105,115,105,98,105,108,105,116,121,61,34,118,105,115,105,98,108,101,34,32,0,0,0,0,0,0,0,40,99,104,97,114,97,99,116,101,114,32,117,110,105,116,115,41,32,0,0,0,0,0,0,37,115,111,98,106,101,99,116,32,37,50,100,32,101,108,108,105,112,115,101,32,0,0,0,62,60,116,105,116,108,101,62,37,115,95,112,108,111,116,95,37,100,37,115,60,47,116,105,116,108,101,62,10,0,0,0,84,104,105,115,32,112,108,111,116,32,115,116,121,108,101,32,100,111,101,115,32,110,111,116,32,119,111,114,107,32,119,105,116,104,32,54,32,99,111,108,115,46,32,83,101,116,116,105,110,103,32,116,111,32,120,121,101,114,114,111,114,98,97,114,115,0,0,0,0,0,0,0,60,66,50,62,0,0,0,0,9,60,103,32,105,100,61,34,37,115,95,112,108,111,116,95,37,100,37,115,34,32,0,0,103,110,117,112,108,111,116,0,105,110,118,97,108,105,100,32,99,111,109,109,97,110,100,0,9,60,47,103,62,10,0,0,32,104,48,46,48,49,39,47,62,0,0,0,0,0,0,0,90,32,0,0,0,0,0,0,43,47,45,0,0,0,0,0,100,36,97,115,104,101,100,0,91,0,0,0,0,0,0,0,105,110,118,101,114,102,0,0,80,97,108,97,116,105,110,111,32,66,111,108,100,0,0,0,108,36,97,110,100,115,99,97,112,101,0,0,0,0,0,0,102,117,36,110,99,116,105,111,110,0,0,0,0,0,0,0,42,32,70,73,76,69,58,32,10,0,0,0,0,0,0,0,114,98,0,0,0,0,0,0,112,36,111,114,116,114,97,105,116,0,0,0,0,0,0,0,40,115,99,114,101,101,110,32,117,110,105,116,115,41,32,0,32,97,114,99,32,91,37,103,58,37,103,93,32,0,0,0,32,37,115,32,102,111,110,116,32,34,37,115,44,37,117,34,0,0,0,0,0,0,0,0,85,110,114,101,99,111,103,110,105,122,101,100,32,53,32,99,111,108,117,109,110,32,112,108,111,116,32,115,116,121,108,101,59,32,114,101,115,101,116,116,105,110,103,32,116,111,32,98,111,120,101,114,114,111,114,98,97,114,115,0,0,0,0,0,32,108,105,110,101,119,105,100,116,104,32,37,102,0,0,0,112,114,105,110,116,32,99,111,111,114,100,105,110,97,116,101,115,32,116,111,32,99,108,105,112,98,111,97,114,100,32,117,115,105,110,103,32,96,99,108,105,112,98,111,97,114,100,102,111,114,109,97,116,96,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,115,101,101,32,107,101,121,115,32,39,51,39,44,32,39,52,39,41,0,0,97,114,114,111,119,115,36,116,121,108,101,0,0,0,0,0,69,68,70,95,66,105,110,97,114,121,70,105,108,101,80,111,115,105,116,105,111,110,0,0,32,109,111,110,111,99,104,114,111,109,101,0,0,0,0,0,78,101,119,32,112,97,114,97,109,101,116,101,114,32,102,105,108,101,110,97,109,101,32,101,120,112,101,99,116,101,100,0,108,97,110,100,115,99,97,112,101,0,0,0,0,0,0,0,112,111,114,116,114,97,105,116,0,0,0,0,0,0,0,0,37,115,32,91,37,117,44,37,117,93,0,0,0,0,0,0,37,45,49,53,46,49,53,115,32,61,32,37,45,49,53,103,32,32,37,45,51,46,51,115,32,37,45,49,50,46,52,103,32,40,37,46,52,103,37,37,41,10,0,0,0,0,0,0,69,120,112,101,99,116,105,110,103,32,102,111,110,116,32,110,97,109,101,32,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,93,39,0,0,0,110,111,114,109,0,0,0,0,80,97,108,97,116,105,110,111,32,73,116,97,108,105,99,0,93,0,0,0,0,0,0,0,102,111,36,114,109,97,116,0,111,117,116,111,102,114,97,110,103,101,0,0,0,0,0,0,34,37,115,34,32,105,115,32,97,32,100,105,114,101,99,116,111,114,121,0,0,0,0,0,39,44,39,32,101,120,112,101,99,116,101,100,0,0,0,0,40,103,114,97,112,104,32,117,110,105,116,115,41,32,0,0,110,111,101,113,117,97,108,36,95,97,120,101,115,0,0,0,37,115,37,103,0,0,0,0,110,111,46,32,119,105,110,100,111,119,115,58,32,91,104,111,114,105,122,111,110,116,97,108,44,118,101,114,116,105,99,97,108,93,32,101,120,112,101,99,116,101,100,0,0,0,0,0,84,104,105,115,32,112,108,111,116,32,115,116,121,108,101,32,100,111,101,115,32,110,111,116,32,119,111,114,107,32,119,105,116,104,32,52,32,99,111,108,115,46,32,83,101,116,116,105,110,103,32,116,111,32,121,101,114,114,111,114,98,97,114,115,0,0,0,0,0,0,0,0,108,105,110,101,119,105,100,116,104,58,32,111,117,116,32,111,102,32,114,97,110,103,101,0,50,120,60,66,49,62,0,0,97,114,114,111,119,115,116,121,108,101,32,37,100,32,110,111,116,32,102,111,117,110,100,0,108,105,110,101,119,105,100,116,104,58,32,119,105,100,116,104,32,105,115,32,110,111,116,32,115,112,101,99,105,102,105,101,100,46,0,0,0,0,0,0,80,97,114,97,109,101,116,101,114,32,102,105,108,101,110,97,109,101,32,101,120,112,101,99,116,101,100,0,0,0,0,0,37,37,84,71,73,70,32,50,46,49,53,45,112,55,10,115,116,97,116,101,40,37,100,44,51,48,44,37,117,44,48,44,48,44,37,117,44,49,54,44,49,44,57,44,49,44,49,44,48,44,48,44,48,44,48,44,49,44,48,44,39,37,115,39,44,48,44,37,117,44,48,44,48,44,49,44,49,48,44,48,44,48,44,49,44,49,44,48,44,49,54,44,48,44,48,44,49,44,49,44,49,41,46,10,37,37,10,37,37,32,64,40,35,41,67,114,101,97,116,111,114,58,32,103,110,117,112,108,111,116,32,37,115,32,112,97,116,99,104,108,101,118,101,108,32,37,115,10,37,37,32,37,37,87,37,37,10,37,37,10,112,97,103,101,40,49,44,34,34,41,46,10,0,0,0,0,119,97,114,110,105,110,103,58,32,117,115,105,110,103,32,115,116,97,110,100,97,114,100,32,109,117,108,116,105,112,108,111,116,10,0,0,0,0,0,0,101,114,114,111,114,58,32,110,117,109,98,101,114,32,111,102,32,112,108,111,116,115,32,62,32,112,108,111,116,115,32,112,101,114,32,112,97,103,101,10,0,0,0,0,0,0,0,0,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,32,32,32,32,32,32,32,32,32,32,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,10,10,0,99,111,114,97,108,0,0,0,72,111,116,80,105,110,107,0,99,101,105,108,0,0,0,0,80,97,108,97,116,105,110,111,32,82,111,109,97,110,0,0,68,97,114,107,83,101,97,71,114,101,101,110,0,0,0,0,102,111,110,116,36,112,97,116,104,0,0,0,0,0,0,0,98,108,111,99,107,115,0,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,105,112,101,32,102,111,114,32,100,97,116,97,0,0,0,0,0,121,101,108,108,111,119,0,0,40,115,101,99,111,110,100,32,97,120,101,115,41,32,0,0,120,121,122,0,0,0,0,0,37,115,111,98,106,101,99,116,32,37,50,100,32,99,105,114,99,108,101,32,0,0,0,0,116,101,120,116,40,39,37,115,39,44,37,117,44,37,117,44,39,37,115,39,44,48,44,37,117,44,49,44,37,117,44,37,117,44,49,44,53,53,44,49,49,57,44,37,117,44,48,44,49,53,44,52,44,48,44,48,44,48,44,48,44,91,10,9,34,37,115,34,93,41,46,10,0,0,0,0,0,0,0,0,84,104,105,115,32,112,108,111,116,32,115,116,121,108,101,32,100,111,101,115,32,110,111,116,32,119,111,114,107,32,119,105,116,104,32,51,32,99,111,108,115,46,32,83,101,116,116,105,110,103,32,116,111,32,121,101,114,114,111,114,98,97,114,115,0,0,0,0,0,0,0,0,117,110,114,101,99,111,103,110,105,122,101,100,32,99,111,108,111,114,32,110,97,109,101,32,97,110,100,32,110,111,116,32,97,32,115,116,114,105,110,103,32,34,35,65,65,82,82,71,71,66,66,34,0,0,0,0,112,111,108,121,103,111,110,40,39,37,115,39,44,55,44,91,10,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,49,44,49,44,49,44,48,44,37,117,44,48,44,48,44,48,44,48,44,48,44,91,10,93,41,46,10,0,0,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,53,55,54,48,44,49,55,50,56,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,111,110,108,121,32,107,101,121,119,111,114,100,115,32,97,114,101,32,39,116,101,114,109,105,110,97,108,39,32,97,110,100,32,39,112,97,108,101,116,116,101,39,0,0,0,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,49,49,53,50,48,44,49,55,50,56,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,49,49,53,50,48,44,49,49,53,50,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,115,121,110,116,97,120,32,101,114,114,111,114,32,105,110,32,112,97,114,97,109,101,116,101,114,32,102,105,108,101,32,37,115,0,0,0,0,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,49,55,50,56,48,44,49,55,50,56,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,70,105,110,97,108,32,115,101,116,32,111,102,32,112,97,114,97,109,101,116,101,114,115,32,32,32,32,32,32,32,32,32,32,32,32,65,115,121,109,112,116,111,116,105,99,32,83,116,97,110,100,97,114,100,32,69,114,114,111,114,10,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,49,55,50,56,48,44,49,49,53,50,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,49,55,50,56,48,44,53,55,54,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,102,108,111,111,114,0,0,0,78,101,119,32,67,101,110,116,117,114,121,32,83,99,104,111,111,108,98,111,111,107,32,66,111,108,100,32,73,116,97,108,105,99,0,0,0,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,48,44,49,55,50,56,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,0,0,102,105,116,0,0,0,0,0,98,108,97,110,107,115,0,0,99,97,110,110,111,116,32,111,112,101,110,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,102,111,114,32,114,101,97,100,105,110,103,32,100,97,116,97,0,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,53,55,54,48,44,49,49,53,50,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,40,102,105,114,115,116,32,97,120,101,115,41,32,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,49,49,53,50,48,44,53,55,54,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,84,104,105,115,32,112,108,111,116,32,115,116,121,108,101,32,100,111,101,115,32,110,111,116,32,119,111,114,107,32,119,105,116,104,32,49,32,111,114,32,50,32,99,111,108,115,46,32,83,101,116,116,105,110,103,32,116,111,32,112,111,105,110,116,115,0,0,0,0,0,0,0,98,105,110,100,95,97,112,112,101,110,100,45,62,110,101,119,0,0,0,0,0,0,0,0,35,37,108,120,0,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,48,44,49,49,53,50,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,53,55,54,48,44,53,55,54,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,115,99,114,101,101,110,100,117,109,112,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,10,0,0,0,0,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,48,44,53,55,54,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,97,114,99,40,39,37,115,39,44,49,44,49,44,49,44,48,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,48,44,37,46,49,102,44,37,46,49,102,44,52,52,56,48,44,50,53,54,48,44,37,117,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,9,103,110,117,112,108,111,116,114,99,32,105,115,32,114,101,97,100,32,102,114,111,109,32,37,115,10,0,0,0,0,0,112,111,108,121,103,111,110,40,39,37,115,39,44,54,44,91,10,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,49,44,49,44,49,44,48,44,37,117]) -.concat([44,48,44,48,44,48,44,48,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,0,67,97,108,99,117,108,97,116,105,111,110,32,101,114,114,111,114,58,32,110,111,110,45,112,111,115,105,116,105,118,101,32,100,105,97,103,111,110,97,108,32,101,108,101,109,101,110,116,32,105,110,32,99,111,118,97,114,46,32,109,97,116,114,105,120,0,0,0,0,0,0,0,70,111,114,109,97,116,32,99,104,97,114,97,99,116,101,114,32,109,105,115,109,97,116,99,104,58,32,37,37,76,32,105,115,32,111,110,108,121,32,118,97,108,105,100,32,119,105,116,104,32,37,37,108,0,0,0,112,111,108,121,103,111,110,40,39,37,115,39,44,54,44,91,10,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,49,44,49,44,48,44,37,117,44,48,44,48,44,48,44,48,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,0,37,100,47,37,109,47,37,121,44,37,72,58,37,77,0,0,37,42,100,0,0,0,0,0,112,111,108,121,103,111,110,40,39,37,115,39,44,53,44,91,10,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,49,44,49,44,49,44,48,44,37,117,44,48,44,48,44,48,44,48,44,48,44,91,10,93,41,46,10,0,114,97,110,100,0,0,0,0,112,111,108,121,103,111,110,40,39,37,115,39,44,53,44,91,10,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,49,44,49,44,48,44,37,117,44,48,44,48,44,48,44,48,44,48,44,91,10,93,41,46,10,0,78,101,119,32,67,101,110,116,117,114,121,32,83,99,104,111,111,108,98,111,111,107,32,66,111,108,100,0,0,0,0,0,100,101,99,36,105,109,97,108,115,105,103,110,0,0,0,0,105,110,118,97,108,105,100,0,112,111,108,121,103,111,110,40,39,37,115,39,44,52,44,91,10,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,49,44,49,44,49,44,48,44,37,117,44,48,44,48,44,48,44,48,44,48,44,91,10,93,41,46,10,0,0,0,9,32,32,102,111,110,116,32,34,37,115,34,10,0,0,0,101,113,117,97,108,36,95,97,120,101,115,0,0,0,0,0,102,114,111,109,32,0,0,0,112,111,108,121,103,111,110,40,39,37,115,39,44,52,44,91,10,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,49,44,49,44,48,44,37,117,44,48,44,48,44,48,44,48,44,48,44,91,10,93,41,46,10,0,0,0,84,111,111,32,109,97,110,121,32,99,111,108,117,109,110,115,32,105,110,32,117,115,105,110,103,32,115,112,101,99,105,102,105,99,97,116,105,111,110,0,68,101,108,101,116,101,0,0,111,118,97,108,40,39,37,115,39,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,49,44,49,44,49,44,37,117,44,48,44,48,44,48,44,91,10,93,41,46,10,0,0,0,0,0,111,118,97,108,40,39,37,115,39,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,50,44,49,44,49,44,37,117,44,48,44,48,44,48,44,91,10,93,41,46,10,0,0,0,0,0,67,97,110,110,111,116,32,111,112,101,110,32,115,97,118,101,32,102,105,108,101,0,0,0,99,112,57,53,48,0,0,0,98,111,120,40,39,37,115,39,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,49,44,49,44,49,44,37,117,44,48,44,48,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,32,111,112,101,110,32,121,108,111,119,32,121,104,105,103,104,32,121,99,108,111,115,101,0,98,111,120,40,39,37,115,39,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,50,44,49,44,49,44,37,117,44,48,44,48,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,99,97,108,108,110,0,0,0,112,111,108,121,40,39,37,115,39,44,50,44,91,10,9,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,50,44,49,44,37,117,44,48,44,48,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,0,70,73,84,95,87,83,83,82,0,0,0,0,0,0,0,0,112,111,108,121,40,39,37,115,39,44,50,44,91,10,9,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,50,44,49,44,37,117,44,48,44,48,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,10,0,0,0,0,0,0,0,0,112,111,108,121,40,39,37,115,39,44,50,44,91,10,9,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,50,44,49,44,37,117,44,48,44,48,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,44,10,0,0,0,0,0,0,0,67,97,110,110,111,116,32,115,112,108,111,116,32,105,110,32,112,111,108,97,114,32,99,111,111,114,100,105,110,97,116,101,32,115,121,115,116,101,109,46,0,0,0,0,0,0,0,0,105,103,97,109,109,97,0,0,103,114,111,117,112,40,91,10,0,0,0,0,0,0,0,0,78,101,119,32,67,101,110,116,117,114,121,32,83,99,104,111,111,108,98,111,111,107,32,73,116,97,108,105,99,0,0,0,101,110,99,36,111,100,105,110,103,0,0,0,0,0,0,0,114,101,99,111,114,100,115,0,101,120,36,105,116,0,0,0,99,97,110,110,111,116,32,112,108,111,116,32,102,114,111,109,32,115,116,100,105,110,47,115,116,100,111,117,116,47,115,116,100,101,114,114,0,0,0,0,103,114,111,117,112,40,91,10,112,111,108,121,40,39,37,115,39,44,50,44,91,10,9,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,50,44,49,44,37,117,44,48,44,48,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,112,111,108,121,40,39,37,115,39,44,50,44,91,10,9,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,50,44,49,44,37,117,44,48,44,48,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,83,116,97,116,115,32,99,111,109,109,97,110,100,32,110,111,116,32,97,118,97,105,108,97,98,108,101,32,105,110,32,116,105,109,101,100,97,116,97,32,109,111,100,101,0,0,0,0,32,115,105,122,101,32,0,0,93,44,10,37,117,44,48,44,91,10,93,41,46,10,0,0,78,111,116,32,101,110,111,117,103,104,32,99,111,108,117,109,110,115,32,105,110,32,117,115,105,110,103,32,115,112,101,99,105,102,105,99,97,116,105,111,110,0,0,0,0,0,0,0,69,115,99,97,112,101,0,0,99,111,108,111,114,115,112,101,99,32,111,112,116,105,111,110,32,110,111,116,32,114,101,99,111,103,110,105,122,101,100,0,103,114,111,117,112,40,91,10,112,111,108,121,40,39,37,115,39,44,50,44,91,10,9,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,50,44,49,44,37,117,44,48,44,48,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,44,10,112,111,108,121,40,39,37,115,39,44,50,44,91,10,9,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,50,44,49,44,37,117,44,48,44,48,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,10,0,0,0,0,0,0,0,112,111,108,121,40,39,37,115,39,44,50,44,91,10,9,37,46,49,102,44,37,46,49,102,44,37,46,49,102,44,37,46,49,102,93,44,48,44,49,44,49,44,37,117,44,48,44,48,44,48,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,0,0,0,112,111,108,121,40,39,37,115,39,44,37,100,44,91,10,9,37,117,44,37,117,44,37,117,44,37,117,93,44,49,44,37,117,44,49,44,37,117,44,48,44,48,44,37,117,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,0,0,37,117,44,37,117,93,44,48,44,37,117,44,49,44,37,117,44,48,44,48,44,37,117,44,48,44,56,44,51,44,48,44,91,10,93,41,46,10,0,0,112,111,108,121,40,39,37,115,39,44,37,100,44,91,10,9,0,0,0,0,0,0,0,0,91,110,111,110,101,93,0,0,70,73,84,95,83,84,68,70,73,84,0,0,0,0,0,0,35,37,46,50,120,37,46,50,120,37,46,50,120,0,0,0,93,44,37,100,44,49,44,48,44,48,44,37,117,44,48,44,48,44,48,44,48,44,91,10,93,41,46,10,0,0,0,0,118,111,105,103,116,0,0,0,37,117,44,37,117,0,0,0,78,101,119,32,67,101,110,116,117,114,121,32,83,99,104,111,111,108,98,111,111,107,32,82,111,109,97,110,0,0,0,0,100,117,36,109,109,121,0,0,37,115,9,37,108,100,10,0,105,110,118,97,108,105,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,116,101,103,101,114,0,10,9,0,0,0,0,0,0,9,32,0,0,0,0,0,0,116,36,105,109,101,0,0,0,99,101,110,116,101,114,32,0,37,117,44,37,117,44,0,0,82,101,116,117,114,110,0,0,112,97,108,101,116,116,101,32,102,114,97,99,116,105,111,110,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,112,111,108,121,103,111,110,40,39,37,115,39,44,37,100,44,91,10,9,0,0,0,0,0,99,111,110,116,111,117,114,32,116,114,105,100,105,97,103,32,109,0,0,0,0,0,0,0,119,104,105,116,101,0,0,0,110,111,32,112,114,101,118,105,111,117,115,32,112,108,111,116,0,0,0,0,0,0,0,0,105,36,110,116,101,114,97,99,116,105,118,101,0,0,0,0,98,108,45,105,110,116,101,114,112,32,98,101,116,119,101,101,110,32,115,99,97,110,0,0,78,101,101,100,32,102,117,108,108,32,117,115,105,110,103,32,115,112,101,99,32,102,111,114,32,120,32,116,105,109,101,32,100,97,116,97,0,0,0,0,85,110,100,101,102,105,110,101,100,32,118,97,108,117,101,32,116,104,105,114,100,32,99,111,108,111,114,32,100,117,114,105,110,103,32,102,117,110,99,116,105,111,110,32,101,118,97,108,117,97,116,105,111,110,0,0,112,36,101,114,108,116,107,0,108,97,98,101,108,112,111,105,110,116,32,108,97,98,101,108,0,0,0,0,0,0,0,0,105,110,116,101,114,97,99,116,105,118,101,0,0,0,0,0,45,100,0,0,0,0,0,0,70,73,84,95,78,68,70,0,112,101,114,108,116,107,0,0,37,115,32,37,115,0,0,0,105,98,101,116,97,0,0,0,105,102,32,123,91,115,116,114,105,110,103,32,108,101,110,103,116,104,32,36,121,50,109,93,62,48,125,32,123,112,117,116,115,32,34,32,36,121,50,109,34,125,32,101,108,115,101,32,123,112,117,116,115,32,34,32,91,101,120,112,114,32,48,46,53,42,40,36,121,50,115,43,36,121,50,101,41,93,34,125,10,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,32,78,97,114,114,111,119,32,66,111,108,100,32,79,98,108,105,113,117,101,0,0,0,100,103,36,114,105,100,51,100,0,0,0,0,0,0,0,0,32,32,77,101,100,105,97,110,58,32,32,32,37,115,32,10,0,0,0,0,0,0,0,0,116,117,114,110,105,110,103,32,114,117,108,101,114,32,111,102,102,46,10,0,0,0,0,0,100,97,116,97,102,105,108,101,32,108,105,110,101,32,98,117,102,102,101,114,0,0,0,0,105,102,32,123,91,115,116,114,105,110,103,32,108,101,110,103,116,104,32,36,120,50,109,93,62,48,125,32,123,112,117,116,115,32,45,110,111,110,101,119,108,105,110,101,32,34,32,36,120,50,109,34,125,32,101,108,115,101,32,123,112,117,116,115,32,45,110,111,110,101,119,108,105,110,101,32,34,32,91,101,120,112,114,32,48,46,53,42,40,36,120,50,115,43,36,120,50,101,41,93,34,125,10,0,41,10,0,0,0,0,0,0,110,111,119,114,105,36,116,101,98,97,99,107,0,0,0,0,105,102,32,123,91,115,116,114,105,110,103,32,108,101,110,103,116,104,32,36,121,49,109,93,62,48,125,32,123,112,117,116,115,32,45,110,111,110,101,119,108,105,110,101,32,34,32,36,121,49,109,34,125,32,101,108,115,101,32,123,112,117,116,115,32,45,110,111,110,101,119,108,105,110,101,32,34,32,91,101,120,112,114,32,48,46,53,42,40,36,121,49,115,43,36,121,49,101,41,93,34,125,10,0,115,101,116,32,0,0,0,0,73,110,118,97,108,105,100,32,115,117,98,115,116,105,116,117,116,105,111,110,32,36,37,99,0,0,0,0,0,0,0,0,37,105,32,37,105,32,116,114,97,110,115,108,97,116,101,32,37,105,32,37,105,32,115,99,97,108,101,32,48,32,115,101,116,108,105,110,101,119,105,100,116,104,10,0,0,0,0,0,115,112,108,105,110,101,32,104,101,108,112,32,118,101,99,116,111,114,0,0,0,0,0,0,75,80,95,69,110,116,101,114,0,0,0,0,0,0,0,0,101,120,112,101,99,116,101,100,32,112,97,108,101,116,116,101,32,102,114,97,99,116,105,111,110,0,0,0,0,0,0,0,105,102,32,123,91,115,116,114,105,110,103,32,108,101,110,103,116,104,32,36,120,49,109,93,62,48,125,32,123,112,117,116,115,32,45,110,111,110,101,119,108,105,110,101,32,34,32,36,120,49,109,34,125,32,101,108,115,101,32,123,112,117,116,115,32,45,110,111,110,101,119,108,105,110,101,32,34,32,91,101,120,112,114,32,48,46,53,42,40,36,120,49,115,43,36,120,49,101,41,93,34,125,10,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,102,95,115,117,109,32,99,111,117,108,100,32,110,111,116,32,97,99,99,101,115,115,32,115,117,109,109,97,116,105,111,110,32,99,111,101,102,102,105,99,105,101,110,116,32,102,117,110,99,116,105,111,110,0,0,0,117,115,101,114,95,103,110,117,112,108,111,116,95,99,111,111,114,100,105,110,97,116,101,115,32,36,119,105,110,32,36,105,100,32,36,120,49,115,32,36,121,49,115,32,36,120,50,115,32,36,121,50,115,32,36,120,49,101,32,36,121,49,101,32,36,120,50,101,32,36,121,50,101,32,36,120,49,109,32,36,121,49,109,32,36,120,50,109,32,36,121,50,109,10,0,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,32,45,32,114,101,102,114,101,115,104,32,111,102,32,117,110,107,110,111,119,110,32,112,108,111,116,32,116,121,112,101,0,0,0,115,101,116,32,105,100,32,91,36,119,105,110,32,102,105,110,100,32,119,105,116,104,116,97,103,32,99,117,114,114,101,110,116,93,10,0,0,0,0,0,85,110,100,101,102,105,110,101,100,32,118,97,108,117,101,32,115,101,99,111,110,100,32,99,111,108,111,114,32,100,117,114,105,110,103,32,102,117,110,99,116,105,111,110,32,101,118,97,108,117,97,116,105,111,110,0,105,102,32,123,40,91,108,108,101,110,103,116,104,32,91,105,110,102,111,32,99,111,109,109,97,110,100,115,32,117,115,101,114,95,103,110,117,112,108,111,116,95,99,111,111,114,100,105,110,97,116,101,115,93,93,41,125,32,123,10,0,0,0,0,112,114,111,99,32,103,110,117,112,108,111,116,95,120,121,32,123,119,105,110,32,120,49,115,32,121,49,115,32,120,50,115,32,121,50,115,32,120,49,101,32,121,49,101,32,120,50,101,32,121,50,101,32,120,49,109,32,121,49,109,32,120,50,109,32,121,50,109,125,32,123,10,0,0,0,0,0,0,0,0,118,97,114,105,97,110,99,101,32,111,102,32,114,101,115,105,100,117,97,108,115,32,40,114,101,100,117,99,101,100,32,99,104,105,115,113,117,97,114,101,41,32,61,32,87,83,83,82,47,110,100,102,32,32,32,58,32,37,103,10,10,0,0,0,114,101,116,117,114,110,32,123,37,102,32,37,102,32,37,102,32,37,102,32,37,102,32,37,102,32,37,102,32,37,102,125,10,0,0,0,0,0,0,0,112,114,111,99,32,103,110,117,112,108,111,116,95,97,120,105,115,114,97,110,103,101,115,32,123,125,32,123,10,0,0,0,108,103,97,109,109,97,0,0,114,101,116,117,114,110,32,123,37,100,32,37,100,32,37,100,32,37,100,125,10,0,0,0,72,101,108,118,101,116,105,99,97,32,78,97,114,114,111,119,32,66,111,108,100,0,0,0,100,97,116,97,36,102,105,108,101,0,0,0,0,0,0,0,32,32,81,117,97,114,116,105,108,101,58,32,37,115,32,10,0,0,0,0,0,0,0,0,112,114,111,99,32,103,110,117,112,108,111,116,95,112,108,111,116,97,114,101,97,32,123,125,32,123,10,0,0,0,0,0,100,117,112,108,105,99,97,116,101,100,32,111,114,32,99,111,110,116,114,97,100,105,99,116,105,110,103,32,97,114,103,117,109,101,110,116,115,32,105,110,32,100,97,116,97,102,105,108,101,32,111,112,116,105,111,110,115,0,0,0,0,0,0,0,44,32,0,0,0,0,0,0,119,114,36,105,116,101,98,97,99,107,0,0,0,0,0,0,125,10,0,0,0,0,0,0,9,0,0,0,0,0,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,32,58,32,100,102,95,114,101,97,100,108,105,110,101,32,114,101,116,117,114,110,101,100,32,37,100,32,58,32,100,97,116,97,102,105,108,101,32,108,105,110,101,32,37,100,0,0,0,0,0,84,97,98,0,0,0,0,0,112,114,105,110,116,32,34,92,110,34,10,0,0,0,0,0,105,102,32,40,108,101,110,103,116,104,40,36,121,50,109,41,62,48,41,32,123,112,114,105,110,116,32,34,32,36,121,50,109,34,59,125,32,101,108,115,101,32,123,112,114,105,110,116,32,34,32,34,44,32,48,46,53,42,40,36,121,50,115,43,36,121,50,101,41,59,125,10,0,0,0,0,0,0,0,0,99,97,110,110,111,116,32,114,101,102,114,101,115,104,32,102,114,111,109,32,116,104,105,115,32,115,116,97,116,101,46,32,116,114,121,105,110,103,32,102,117,108,108,32,114,101,112,108,111,116,0,0,0,0,0,0,105,102,32,40,108,101,110,103,116,104,40,36,120,50,109,41,62,48,41,32,123,112,114,105,110,116,32,34,32,36,120,50,109,34,59,125,32,101,108,115,101,32,123,112,114,105,110,116,32,34,32,34,44,32,48,46,53,42,40,36,120,50,115,43,36,120,50,101,41,59,125,10,0,0,0,0,0,0,0,0,85,110,100,101,102,105,110,101,100,32,118,97,108,117,101,32,102,105,114,115,116,32,99,111,108,111,114,32,100,117,114,105,110,103,32,102,117,110,99,116,105,111,110,32,101,118,97,108,117,97,116,105,111,110,0,0,105,102,32,40,108,101,110,103,116,104,40,36,121,49,109,41,62,48,41,32,123,112,114,105,110,116,32,34,32,36,121,49,109,34,59,125,32,101,108,115,101,32,123,112,114,105,110,116,32,34,32,34,44,32,48,46,53,42,40,36,121,49,115,43,36,121,49,101,41,59,125,10,0,0,0,0,0,0,0,0,105,102,32,40,108,101,110,103,116,104,40,36,120,49,109,41,62,48,41,32,123,112,114,105,110,116,32,34,32,36,120,49,109,34,59,125,32,101,108,115,101,32,123,112,114,105,110,116,32,34,32,34,44,32,48,46,53,42,40,36,120,49,115,43,36,120,49,101,41,59,125,10,0,0,0,0,0,0,0,0,79,117,116,114,97,110,103,101,100,32,97,110,100,32,117,110,100,101,102,105,110,101,100,32,100,97,116,97,112,111,105,110,116,115,32,97,114,101,32,111,109,105,116,116,101,100,32,102,114,111,109,32,116,104,101,32,115,117,114,102,97,99,101,46,10,0,0,0,0,0,0,0,114,109,115,32,111,102,32,114,101,115,105,100,117,97,108,115,32,32,32,32,32,32,40,70,73,84,95,83,84,68,70,73,84,41,32,61,32,115,113,114,116,40,87,83,83,82,47,110,100,102,41,32,32,32,32,58,32,37,103,10,0,0,0,0,125,32,101,108,115,101,32,123,10,0,0,0,0,0,0,0,58,10,0,0,0,0,0,0,117,115,101,114,95,103,110,117,112,108,111,116,95,99,111,111,114,100,105,110,97,116,101,115,32,36,119,105,110,44,32,36,105,100,44,32,36,120,49,115,44,32,36,121,49,115,44,32,36,120,50,115,44,32,36,121,50,115,44,32,36,120,49,101,44,32,36,121,49,101,44,32,36,120,50,101,44,32,36,121,50,101,44,32,36,120,49,109,44,32,36,121,49,109,44,32,36,120,50,109,44,32,36,121,50,109,10,0,0,0,0,0,103,97,109,109,97,0,0,0,109,121,32,36,105,100,32,61,32,36,119,105,110,45,62,102,105,110,100,40,39,119,105,116,104,116,97,103,39,44,32,39,99,117,114,114,101,110,116,39,41,59,10,0,0,0,0,0,72,101,108,118,101,116,105,99,97,32,78,97,114,114,111,119,32,79,98,108,105,113,117,101,0,0,0,0,0,0,0,0,100,97,36,116,97,0,0,0,32,32,77,97,120,105,109,117,109,58,32,32,37,115,32,91,37,42,108,100,93,10,0,0,105,102,32,40,100,101,102,105,110,101,100,32,38,117,115,101,114,95,103,110,117,112,108,111,116,95,99,111,111,114,100,105,110,97,116,101,115,41,32,123,10,0,0,0,0,0,0,0,110,111,97,117,116,111,36,115,99,97,108,101,0,0,0,0,109,121,32,40,36,119,105,110,44,32,36,120,49,115,44,32,36,121,49,115,44,32,36,120,50,115,44,32,36,121,50,115,44,32,36,120,49,101,44,32,36,121,49,101,44,32,36,120,50,101,44,32,36,121,50,101,44,32,36,120,49,109,44,32,36,121,49,109,44,32,36,120,50,109,44,32,36,121,50,109,41,32,61,32,64,95,59,10,0,0,0,0,0,0,0,0,37,115,111,98,106,101,99,116,32,37,50,100,32,114,101,99,116,32,0,0,0,0,0,0,78,111,116,32,101,110,111,117,103,104,32,99,111,108,117,109,110,115,32,102,111,114,32,118,97,114,105,97,98,108,101,32,99,111,108,111,114,0,0,0,66,97,99,107,83,112,97,99,101,0,0,0,0,0,0,0,101,120,112,101,99,116,101,100,32,99,98,32,118,97,108,117,101,0,0,0,0,0,0,0,115,117,98,32,103,110,117,112,108,111,116,95,120,121,32,123,10,0,0,0,0,0,0,0,114,101,116,117,114,110,32,40,37,102,44,32,37,102,44,32,37,102,44,32,37,102,44,32,37,102,44,32,37,102,44,32,37,102,44,32,37,102,41,59,10,0,0,0,0,0,0,0,110,111,32,97,99,116,105,118,101,32,112,108,111,116,59,32,99,97,110,110,111,116,32,114,101,102,114,101,115,104,0,0,115,117,98,32,103,110,117,112,108,111,116,95,97,120,105,115,114,97,110,103,101,115,32,123,10,0,0,0,0,0,0,0,105,110,32,108,97,98,101,108,95,119,105,100,116,104,0,0,37,115,58,37,100,32,111,111,111,112,115,58,32,85,110,107,110,111,119,110,32,99,111,108,111,114,77,111,100,101,32,39,37,99,39,46,10,0,0,0,114,101,116,117,114,110,32,40,37,100,44,32,37,100,44,32,37,100,44,32,37,100,41,59,10,0,0,0,0,0,0,0,115,117,98,32,103,110,117,112,108,111,116,95,112,108,111,116,97,114,101,97,32,123,10,0,100,101,103,114,101,101,115,32,111,102,32,102,114,101,101,100,111,109,32,32,32,32,40,70,73,84,95,78,68,70,41,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,125,59,10,0,0,0,0,0,112,114,111,99,32,103,110,117,112,108,111,116,32,99,97,110,32,123,10,36,99,97,110,32,100,101,108,101,116,101,32,97,108,108,10,115,101,116,32,99,109,120,32,91,101,120,112,114,32,91,119,105,110,102,111,32,119,105,100,116,104,32,36,99,97,110,93,45,50,42,91,36,99,97,110,32,99,103,101,116,32,45,98,111,114,100,101,114,93,45,50,42,91,36,99,97,110,32,99,103,101,116,32,45,104,105,103,104,108,105,103,104,116,116,104,105,99,107,110,101,115,115,93,93,10,105,102,32,123,36,99,109,120,32,60,61,32,49,125,32,123,115,101,116,32,99,109,120,32,91,36,99,97,110,32,99,103,101,116,32,45,119,105,100,116,104,93,125,10,115,101,116,32,99,109,121,32,91,101,120,112,114,32,91,119,105,110,102,111,32,104,101,105,103,104,116,32,36,99,97,110,93,45,50,42,91,36,99,97,110,32,99,103,101,116,32,45,98,111,114,100,101,114,93,45,50,42,91,36,99,97,110,32,99,103,101,116,32,45,104,105,103,104,108,105,103,104,116,116,104,105,99,107,110,101,115,115,93,93,10,105,102,32,123,36,99,109,121,32,60,61,32,49,125,32,123,115,101,116,32,99,109,121,32,91,36,99,97,110,32,99,103,101,116,32,45,104,101,105,103,104,116,93,125,10,0,0,0,0,0,0,0,101,114,102,99,0,0,0,0,115,117,98,32,123,10,109,121,40,36,99,97,110,41,32,61,32,64,95,59,10,36,99,97,110,45,62,100,101,108,101,116,101,40,39,97,108,108,39,41,59,10,109,121,32,36,99,109,120,32,61,32,36,99,97,110,45,62,119,105,100,116,104,32,45,32,50,32,42,32,36,99,97,110,45,62,99,103,101,116,40,45,98,111,114,100,101,114,41,32,45,32,50,32,42,32,36,99,97,110,45,62,99,103,101,116,40,45,104,105,103,104,108,105,103,104,116,116,104,105,99,107,110,101,115,115,41,59,10,105,102,32,40,36,99,109,120,32,60,61,32,49,41,32,123,10,36,99,109,120,32,61,32,40,36,99,97,110,45,62,99,103,101,116,40,45,119,105,100,116,104,41,41,59,10,125,10,109,121,32,36,99,109,121,32,61,32,36,99,97,110,45,62,104,101,105,103,104,116,32,45,32,50,32,42,32,36,99,97,110,45,62,99,103,101,116,40,45,98,111,114,100,101,114,41,32,45,32,50,32,42,32,36,99,97,110,45,62,99,103,101,116,40,45,104,105,103,104,108,105,103,104,116,116,104,105,99,107,110,101,115,115,41,59,10,105,102,32,40,36,99,109,121,32,60,61,32,49,41,32,123,10,36,99,109,121,32,61,32,40,36,99,97,110,45,62,99,103,101,116,40,45,104,101,105,103,104,116,41,41,59,10,125,10,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,32,78,97,114,114,111,119,0,0,0,0,0,0,0,0,99,111,36,110,116,111,117,114,115,0,0,0,0,0,0,0,32,32,77,105,110,105,109,117,109,58,32,32,37,115,32,91,37,42,108,100,93,10,0,0,34,10,0,0,0,0,0,0,118,111,108,97,116,105,108,101,0,0,0,0,0,0,0,0,32,123,125,0,0,0,0,0,103,114,97,112,104,32,0,0,71,80,95,76,65,83,84,95,75,69,89,0,0,0,0,0,99,98,0,0,0,0,0,0,93,32,60,66,117,116,116,111,110,62,32,34,103,110,117,112,108,111,116,95,120,121,32,37,37,87,32,37,102,32,37,102,32,37,102,32,37,102,32,37,102,32,37,102,32,37,102,32,37,102,0,0,0,0,0,0,93,41,59,10,0,0,0,0,100,97,116,97,102,105,108,101,32,110,97,109,101,0,0,0,112,114,105,110,116,32,99,117,114,114,101,110,116,32,100,105,114,0,0,0,0,0,0,0,32,34,34,0,0,0,0,0,32,37,102,0,0,0,0,0,32,34,34,44,0,0,0,0,10,72,109,109,109,109,46,46,46,46,32,83,117,109,32,111,102,32,115,113,117,97,114,101,100,32,114,101,115,105,100,117,97,108,115,32,105,115,32,122,101,114,111,46,32,67,97,110,39,116,32,99,111,109,112,117,116,101,32,101,114,114,111,114,115,46,10,10,0,0,0,0,32,37,102,44,0,0,0,0,44,32,39,60,66,117,116,116,111,110,62,39,32,61,62,32,91,92,38,103,110,117,112,108,111,116,95,120,121,44,32,37,102,44,32,37,102,44,32,37,102,44,32,37,102,44,32,37,102,44,32,37,102,44,32,37,102,44,32,37,102,44,0,0,101,114,102,0,0,0,0,0,112,111,112,32,49,0,0,0,36,99,97,110,32,99,114,101,97,116,101,32,108,105,110,101,32,91,101,120,112,114,32,36,99,109,120,32,42,32,37,100,32,47,49,48,48,48,93,32,91,101,120,112,114,32,36,99,109,121,32,42,32,37,100,32,47,49,48,48,48,93,32,91,101,120,112,114,32,36,99,109,120,32,42,32,37,100,32,47,49,48,48,48,93,32,91,101,120,112,114,32,36,99,109,121,32,42,32,37,100,32,47,49,48,48,48,93,32,45,102,105,108,108,32,37,115,32,45,119,105,100,116,104,32,37,102,32,45,99,97,112,115,116,121,108,101,32,114,111,117,110,100,10,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,32,66,111,108,100,32,79,98,108,105,113,117,101,0,0,99,110,36,116,114,112,97,114,97,109,0,0,0,0,0,0,32,32,67,79,71,58,32,32,32,32,32,32,37,115,32,37,115,10,0,0,0,0,0,0,36,99,97,110,45,62,99,114,101,97,116,101,76,105,110,101,40,36,99,109,120,32,42,32,37,100,32,47,32,49,48,48,48,44,32,36,99,109,121,32,42,32,37,100,32,47,32,49,48,48,48,44,32,36,99,109,120,32,42,32,37,100,32,47,32,49,48,48,48,44,32,36,99,109,121,32,42,32,37,100,32,47,32,49,48,48,48,44,32,45,102,105,108,108,32,61,62,32,113,123,37,115,125,44,32,45,119,105,100,116,104,32,61,62,32,37,102,44,32,45,99,97,112,115,116,121,108,101,32,61,62,32,113,123,114,111,117,110,100,125,41,0,0,0,117,36,115,105,110,103,0,0,9,32,32,101,120,112,108,105,99,105,116,32,108,105,115,116,32,40,0,0,0,0,0,0,36,99,97,110,32,98,105,110,100,32,91,10,0,0,0,0,37,115,32,37,115,37,103,44,32,37,115,37,103,44,32,37,115,37,103,44,32,37,115,37,103,10,0,0,0,0,0,0,78,111,116,32,101,110,111,117,103,104,32,99,111,108,117,109,110,115,32,102,111,114,32,116,104,105,115,32,115,116,121,108,101,0,0,0,0,0,0,0,66,117,116,116,111,110,49,0,112,97,108,101,116,116,101,32,122,32,110,111,116,32,112,111,115,115,105,98,108,101,32,104,101,114,101,0,0,0,0,0,36,99,97,110,45,62,98,105,110,100,40,0,0,0,0,0,99,121,97,110,0,0,0,0,60,115,116,100,101,114,114,62,0,0,0,0,0,0,0,0,109,97,103,101,110,116,97,0,50,42,120,32,45,32,49,0,98,114,111,119,110,0,0,0,103,114,101,101,110,0,0,0,37,45,49,53,46,49,53,115,32,61,32,37,45,49,53,103,10,0,0,0,0,0,0,0,98,108,117,101,0,0,0,0,114,101,100,0,0,0,0,0,98,101,115,121,49,0,0,0,103,114,97,121,0,0,0,0,72,101,108,118,101,116,105,99,97,32,66,111,108,100,0,0,99,36,108,105,112,0,0,0,32,32,77,97,120,105,109,117,109,58,32,32,37,115,32,91,37,42,108,100,32,37,108,100,32,93,10,0,0,0,0,0,98,108,97,99,107,0,0,0,116,104,114,117,36,0,0,0,117,110,107,110,111,119,110,32,116,105,99,100,101,102,32,116,121,112,101,32,105,110,32,115,104,111,119,95,116,105,99,100,101,102,40,41,0,0,0,0,101,118,97,108,32,36,99,97,110,32,99,114,101,97,116,101,32,116,101,120,116,32,91,101,120,112,114,32,36,99,109,120,32,42,32,37,100,32,47,49,48,48,48,93,32,91,101,120,112,114,32,36,99,109,121,32,42,32,37,100,32,47,49,48,48,48,93,32,45,116,101,120,116,32,92,123,37,115,92,125,32,45,102,105,108,108,32,37,115,32,45,97,110,99,104,111,114,32,37,115,32,91,101,120,112,114,32,91,105,110,102,111,32,101,120,105,115,116,115,32,102,111,110,116,93,63,34,45,102,111,110,116,32,92,36,102,111,110,116,34,58,123,125,93,10,0,0,0,0,0,0,0,32,112,111,105,110,116,105,110,116,101,114,118,97,108,32,37,100,0,0,0,0,0,0,0,84,111,111,32,109,97,110,121,32,117,115,105,110,103,32,115,112,101,99,115,32,102,111,114,32,116,104,105,115,32,115,116,121,108,101,0,0,0,0,0,67,108,111,115,101,0,0,0,84,75,95,112,117,116,95,116,101,120,116,58,32,113,117,111,116,101,100,32,115,116,114,105,110,103,0,0,0,0,0,0,36,99,97,110,45,62,99,114,101,97,116,101,84,101,120,116,40,36,99,109,120,32,42,32,37,100,32,47,32,49,48,48,48,44,32,36,99,109,121,32,42,32,37,100,32,47,32,49,48,48,48,44,32,45,116,101,120,116,32,61,62,32,113,123,37,115,125,44,32,45,102,105,108,108,32,61,62,32,113,123,37,115,125,44,32,45,97,110,99,104,111,114,32,61,62,32,39,37,115,39,44,32,40,100,101,102,105,110,101,100,32,36,102,111,110,116,32,63,32,40,45,102,111,110,116,32,61,62,32,36,102,111,110,116,41,32,58,32,40,41,41,41,59,10,0,0,0,0,0,0,0,0,60,115,116,100,111,117,116,62,0,0,0,0,0,0,0,0,99,101,110,116,101,114,0,0,50,32,109,117,108,32,49,32,115,117,98,0,0,0,0,0,110,101,119,32,112,97,114,97,109,101,116,101,114,32,102,105,108,101,32,37,115,32,99,111,117,108,100,32,110,111,116,32,98,101,32,99,114,101,97,116,101,100,0,0,0,0,0,0,93,10,0,0,0,0,0,0,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,32,10,10,0,0,0,0,0,0,32,45,115,105,122,101,32,37,100,0,0,0,0,0,0,0,115,101,116,32,102,111,110,116,32,91,102,111,110,116,32,99,114,101,97,116,101,32,45,102,97,109,105,108,121,32,37,115,0,0,0,0,0,0,0,0,98,101,115,121,48,0,0,0,41,59,10,125,10,0,0,0,72,101,108,118,101,116,105,99,97,32,79,98,108,105,113,117,101,0,0,0,0,0,0,0,99,108,36,97,98,101,108,0,32,32,77,105,110,105,109,117,109,58,32,32,37,115,32,91,37,42,108,100,32,37,108,100,32,93,10,0,0,0,0,0,44,32,45,115,105,122,101,32,61,62,32,37,100,0,0,0,101,118,36,101,114,121,0,0,32,32,110,111,32,97,117,116,111,45,103,101,110,101,114,97,116,101,100,32,116,105,99,115,10,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,91,39,32,111,114,32,39,114,101,115,116,111,114,101,39,0,0,0,0,0,0,105,102,32,40,36,99,97,110,45,62,99,97,110,40,39,102,111,110,116,67,114,101,97,116,101,39,41,41,32,123,10,36,102,111,110,116,32,61,32,36,99,97,110,45,62,102,111,110,116,67,114,101,97,116,101,40,45,102,97,109,105,108,121,32,61,62,32,113,123,37,115,125,0,0,0,0,0,0,0,0,32,112,111,105,110,116,115,105,122,101,32,37,46,51,102,0,118,97,114,99,111,108,111,114,32,97,114,114,97,121,0,0,70,49,50,0,0,0,0,0,111,110,108,121,32,116,99,32,108,116,32,60,110,62,32,112,111,115,115,105,98,108,101,32,104,101,114,101,0,0,0,0,99,97,116,99,104,32,123,117,110,115,101,116,32,36,102,111,110,116,125,10,0,0,0,0,117,110,100,101,102,32,36,102,111,110,116,59,10,0,0,0,110,111,36,114,111,116,97,116,101,0,0,0,0,0,0,0,50,42,120,32,45,32,48,46,53,0,0,0,0,0,0,0,114,111,116,36,97,116,101,0,9,108,111,97,100,112,97,116,104,32,105,115,32,101,109,112,116,121,10,0,0,0,0,0,115,105,36,122,101,0,0,0,70,105,110,97,108,32,115,101,116,32,111,102,32,112,97,114,97,109,101,116,101,114,115,32,10,0,0,0,0,0,0,0,114,36,111,109,97,110,0,0,37,48,42,100,0,0,0,0,99,36,111,117,114,105,101,114,0,0,0,0,0,0,0,0,98,101,115,106,49,0,0,0,32,110,111,114,111,116,97,116,101,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,0,0,0,0,0,0,0,98,111,120,36,119,105,100,116,104,0,0,0,0,0,0,0,32,32,83,117,109,32,83,113,46,58,32,32,37,115,10,0,115,105,122,101,32,37,46,50,102,105,110,44,32,37,46,50,102,105,110,32,0,0,0,0,105,36,110,100,101,120,0,0,32,117,110,116,105,108,32,0,115,105,122,101,32,37,46,50,102,99,109,44,32,37,46,50,102,99,109,32,0,0,0,0,32,112,111,105,110,116,115,105,122,101,32,100,101,102,97,117,108,116,0,0,0,0,0,0,65,108,108,32,112,111,105,110,116,115,32,105,110,32,104,105,115,116,111,103,114,97,109,32,85,78,68,69,70,73,78,69,68,0,0,0,0,0,0,0,70,49,49,0,0,0,0,0,105,108,108,101,103,97,108,32,108,105,110,101,116,121,112,101,0,0,0,0,0,0,0,0,114,111,109,97,110,0,0,0,99,111,117,114,105,101,114,0,99,112,56,53,50,0,0,0,37,115,32,37,100,0,0,0,49,32,121,50,0,0,0,0,50,32,109,117,108,32,48,46,53,32,115,117,98,0,0,0,40,100,111,99,117,109,101,110,116,32,115,112,101,99,105,102,105,99,32,102,111,110,116,41,0,0,0,0,0,0,0,0,73,110,32,116,104,105,115,32,100,101,103,101,110,101,114,97,116,101,32,99,97,115,101,44,32,97,108,108,32,101,114,114,111,114,115,32,97,114,101,32,122,101,114,111,32,98,121,32,100,101,102,105,110,105,116,105,111,110,46,10,10,0,0,0,99,109,116,116,0,0,0,0,37,37,32,71,78,85,80,76,79,84,58,32,76,97,84,101,88,32,112,105,99,116,117,114,101,10,92,115,101,116,108,101,110,103,116,104,123,92,117,110,105,116,108,101,110,103,116,104,125,123,37,102,112,116,125,10,92,105,102,120,92,112,108,111,116,112,111,105,110,116,92,117,110,100,101,102,105,110,101,100,92,110,101,119,115,97,118,101,98,111,120,123,92,112,108,111,116,112,111,105,110,116,125,92,102,105,10,0,0,0,0,0,37,115,58,37,100,32,111,111,111,112,115,58,32,85,110,107,110,111,119,110,32,99,111,108,111,114,32,109,111,100,101,108,32,39,37,99,39,10,0,0,98,101,115,106,48,0,0,0,92,102,111,110,116,92,103,110,117,112,108,111,116,61,37,115,49,48,32,97,116,32,37,100,112,116,10,92,103,110,117,112,108,111,116,10,0,0,0,0,67,111,117,114,105,101,114,32,66,111,108,100,32,79,98,108,105,113,117,101,0,0,0,0,98,111,114,36,100,101,114,0,32,32,83,117,109,58,32,32,32,32,32,32,37,115,10,0,101,118,97,108,36,117,97,116,101,0,0,0,0,0,0,0,100,111,99,0,0,0,0,0,110,111,110,117,110,105,36,102,111,114,109,0,0,0,0,0,32,115,101,99,115,0,0,0,114,101,36,115,116,111,114,101,0,0,0,0,0,0,0,0,83,116,97,116,115,32,99,111,109,109,97,110,100,32,110,111,116,32,97,118,97,105,108,97,98,108,101,32,119,105,116,104,32,108,111,103,115,99,97,108,101,32,97,99,116,105,118,101,0,0,0,0,0,0,0,0,92,98,101,103,105,110,123,112,105,99,116,117,114,101,125,40,37,100,44,37,100,41,40,48,44,48,41,10,0,0,0,0,32,112,111,105,110,116,115,105,122,101,32,118,97,114,105,97,98,108,101,0,0,0,0,0,115,116,97,99,107,104,101,105,103,104,116,32,97,114,114,97,121,0,0,0,0,0,0,0,70,49,48,0,0,0,0,0,101,120,112,101,99,116,101,100,32,108,105,110,101,116,121,112,101,0,0,0,0,0,0,0,92,109,117,108,116,105,112,117,116,40,37,117,44,37,117,41,40,37,46,51,102,44,37,46,51,102,41,123,37,117,125,123,37,115,125,10,0,0,0,0,92,112,117,116,40,37,46,50,102,44,37,46,50,102,41,123,37,115,125,10,0,0,0,0,92,115,112,101,99,105,97,108,123,101,109,58,108,105,110,101,119,105,100,116,104,32,37,46,49,102,112,116,125,37,37,10,0,0,0,0,0,0,0,0,50,42,120,0,0,0,0,0,92,115,98,111,120,123,92,112,108,111,116,112,111,105,110,116,125,123,92,114,117,108,101,91,37,46,51,102,112,116,93,123,37,46,51,102,112,116,125,123,37,46,51,102,112,116,125,125,37,37,10,0,0,0,0,0,123,92,114,111,116,97,116,101,98,111,120,123,37,100,125,0,84,101,114,109,105,110,97,108,32,111,112,116,105,111,110,115,32,97,114,101,32,39,37,115,39,10,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,112,97,100,101,115,117,105,116,36,125,0,0,0,0,0,10,69,120,97,99,116,108,121,32,97,115,32,109,97,110,121,32,100,97,116,97,32,112,111,105,110,116,115,32,97,115,32,116,104,101,114,101,32,97,114,101,32,112,97,114,97,109,101,116,101,114,115,46,10,0,0,103,101,116,95,111,102,102,115,101,116,115,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,104,101,97,114,116,115,117,105,116,36,125,0,0,0,0,0,108,111,103,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,98,108,97,99,107,108,111,122,101,110,103,101,36,125,0,0,67,111,117,114,105,101,114,32,66,111,108,100,0,0,0,0,32,32,83,116,100,32,68,101,118,58,32,32,37,115,10,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,108,111,122,101,110,103,101,36,125,0,0,0,0,0,0,0,32,98,121,32,37,103,37,115,0,0,0,0,0,0,0,0,105,110,116,101,103,101,114,32,111,118,101,114,102,108,111,119,59,32,99,104,97,110,103,105,110,103,32,116,111,32,102,108,111,97,116,105,110,103,32,112,111,105,110,116,0,0,0,0,101,120,112,101,99,116,105,110,103,32,114,105,103,104,116,32,112,97,114,101,110,116,104,101,115,105,115,32,41,0,0,0,101,104,102,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,98,108,97,99,107,116,114,105,97,110,103,108,101,100,111,119,110,36,125,0,0,0,0,0,32,112,111,105,110,116,116,121,112,101,32,37,100,0,0,0,98,111,120,112,108,111,116,32,104,97,115,32,117,110,100,101,102,105,110,101,100,32,120,32,99,111,111,114,100,105,110,97,116,101,0,0,0,0,0,0,70,57,0,0,0,0,0,0,101,120,112,101,99,116,101,100,32,99,111,108,111,114,115,112,101,99,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,116,114,105,97,110,103,108,101,100,111,119,110,36,125,0,0,99,111,110,116,111,117,114,32,100,50,121,0,0,0,0,0]) -.concat([92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,98,108,97,99,107,116,114,105,97,110,103,108,101,36,125,0,115,101,116,32,37,115,114,97,110,103,101,32,91,32,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,98,117,108,108,101,116,36,125,0,0,0,0,0,0,0,0,98,108,45,105,110,116,101,114,112,32,97,108,111,110,103,32,115,99,97,110,0,0,0,0,112,114,101,118,105,111,117,115,32,112,97,114,97,109,101,116,114,105,99,32,102,117,110,99,116,105,111,110,32,110,111,116,32,102,117,108,108,121,32,115,112,101,99,105,102,105,101,100,0,0,0,0,0,0,0,0,50,32,109,117,108,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,99,105,114,99,36,125,0,0,116,101,120,116,95,108,97,98,101,108,32,108,105,115,116,32,119,97,115,32,110,111,116,32,105,110,105,116,105,97,108,105,122,101,100,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,98,108,97,99,107,115,113,117,97,114,101,36,125,0,0,0,45,45,112,101,114,115,105,115,116,0,0,0,0,0,0,0,97,98,115,46,32,99,104,97,110,103,101,32,100,117,114,105,110,103,32,108,97,115,116,32,105,116,101,114,97,116,105,111,110,32,58,32,37,103,10,10,0,0,0,0,0,0,0,0,92,114,97,105,115,101,98,111,120,123,45,46,56,112,116,125,123,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,66,111,120,36,125,125,0,87,97,114,110,105,110,103,32,58,32,117,100,102,32,115,104,97,100,111,119,101,100,32,98,121,32,98,117,105,108,116,45,105,110,32,102,117,110,99,116,105,111,110,32,111,102,32,116,104,101,32,115,97,109,101,32,110,97,109,101,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,97,115,116,36,125,0,0,0,108,111,103,49,48,0,0,0,92,114,117,108,101,123,49,112,116,125,123,49,112,116,125,0,67,111,117,114,105,101,114,32,79,98,108,105,113,117,101,0,98,36,97,114,115,0,0,0,32,32,77,101,97,110,58,32,32,32,32,32,37,115,10,0,77,79,85,83,69,95,82,85,76,69,82,95,89,0,0,0,92,112,117,116,40,37,100,44,37,100,41,123,92,114,117,108,101,123,37,103,112,116,125,123,37,103,112,116,125,125,10,0,37,35,103,0,0,0,0,0,105,110,99,114,101,109,101,110,116,32,109,117,115,116,32,98,101,32,110,101,103,97,116,105,118,101,0,0,0,0,0,0,37,37,32,71,78,85,80,76,79,84,58,32,76,97,84,101,88,32,112,105,99,116,117,114,101,32,119,105,116,104,32,101,109,116,101,120,32,115,112,101,99,105,97,108,115,10,92,115,101,116,108,101,110,103,116,104,123,92,117,110,105,116,108,101,110,103,116,104,125,123,37,102,112,116,125,10,92,105,102,120,92,112,108,111,116,112,111,105,110,116,92,117,110,100,101,102,105,110,101,100,92,110,101,119,115,97,118,101,98,111,120,123,92,112,108,111,116,112,111,105,110,116,125,92,102,105,10,0,32,108,105,110,101,119,105,100,116,104,32,37,46,51,102,0,98,111,120,112,108,111,116,32,112,101,114,109,117,116,97,116,105,111,110,115,32,97,114,114,97,121,0,0,0,0,0,0,115,116,114,111,107,101,32,103,115,97,118,101,9,37,37,32,100,114,97,119,32,103,114,97,121,32,115,99,97,108,101,32,115,109,111,111,116,104,32,98,111,120,10,109,97,120,99,111,108,111,114,115,32,48,32,103,116,32,123,47,105,109,97,120,32,109,97,120,99,111,108,111,114,115,32,100,101,102,125,32,123,47,105,109,97,120,32,49,48,50,52,32,100,101,102,125,32,105,102,101,108,115,101,10,0,0,0,0,0,0,0,0,115,112,108,105,110,101,32,115,111,108,117,116,105,111,110,32,118,101,99,116,111,114,0,0,70,56,0,0,0,0,0,0,92,101,110,100,71,78,85,80,76,79,84,112,105,99,116,117,114,101,10,92,101,110,100,103,114,111,117,112,10,92,101,110,100,105,110,112,117,116,10,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,102,95,115,117,109,32,99,111,117,108,100,32,110,111,116,32,97,99,99,101,115,115,32,105,116,101,114,97,116,105,111,110,32,118,97,114,105,97,98,108,101,46,0,0,0,0,0,0,92,101,110,100,123,112,105,99,116,117,114,101,125,37,10,92,101,110,100,103,114,111,117,112,10,92,101,110,100,105,110,112,117,116,10,0,0,0,0,0,92,101,110,100,123,100,111,99,117,109,101,110,116,125,10,0,124,50,42,120,32,45,32,48,46,53,124,0,0,0,0,0,32,32,32,32,92,103,112,108,98,97,99,107,116,101,120,116,10,32,32,32,32,92,112,117,116,40,48,44,48,41,123,92,105,110,99,108,117,100,101,103,114,97,112,104,105,99,115,123,37,115,125,125,37,37,10,32,32,32,32,92,103,112,108,102,114,111,110,116,116,101,120,116,10,32,32,92,101,110,100,123,112,105,99,116,117,114,101,125,37,37,10,92,101,110,100,103,114,111,117,112,10,0,0,0,114,101,108,46,32,99,104,97,110,103,101,32,100,117,114,105,110,103,32,108,97,115,116,32,105,116,101,114,97,116,105,111,110,32,58,32,37,103,10,10,0,0,0,0,0,0,0,0,92,114,111,116,97,116,101,98,111,120,123,37,100,125,123,0,32,32,32,32,32,32,92,112,117,116,40,37,100,44,37,100,41,123,0,0,0,0,0,0,32,32,32,32,32,32,92,99,111,108,111,114,103,114,97,121,123,37,115,125,37,37,10,0,67,111,117,114,105,101,114,0,97,117,36,116,111,115,99,97,108,101,0,0,0,0,0,0,42,32,67,79,76,85,77,78,58,32,10,0,0,0,0,0,32,32,32,32,32,32,92,99,111,108,111,114,123,119,104,105,116,101,125,37,37,10,0,0,32,102,114,111,109,32,0,0,105,110,99,114,101,109,101,110,116,32,109,117,115,116,32,98,101,32,112,111,115,105,116,105,118,101,0,0,0,0,0,0,32,32,32,32,32,32,92,99,111,108,111,114,123,98,108,97,99,107,125,37,37,10,0,0,32,118,97,114,105,97,98,108,101,0,0,0,0,0,0,0,98,111,120,112,108,111,116,32,108,97,98,101,108,115,32,97,114,114,97,121,0,0,0,0,70,55,0,0,0,0,0,0,114,103,98,0,0,0,0,0,119,98,97,48,49,50,51,52,53,54,55,56,0,0,0,0,32,32,32,32,32,32,92,99,115,110,97,109,101,32,76,84,37,99,92,101,110,100,99,115,110,97,109,101,37,37,10,0,32,32,32,32,32,32,92,99,111,108,111,114,114,103,98,123,37,51,46,50,102,44,37,51,46,50,102,44,37,51,46,50,102,125,37,37,10,0,0,0,50,32,109,117,108,32,48,46,53,32,115,117,98,32,97,98,115,0,0,0,0,0,0,0,37,37,112,109,51,100,95,109,97,112,95,101,110,100,10,0,37,37,112,109,51,100,95,109,97,112,95,98,101,103,105,110,10,0,0,0,0,0,0,0,9,32,32,66,97,99,107,32,115,105,100,101,32,111,102,32,115,117,114,102,97,99,101,115,32,104,97,115,32,108,105,110,101,115,116,121,108,101,32,111,102,102,115,101,116,32,111,102,32,37,100,10,9,32,32,66,105,116,45,77,97,115,107,32,111,102,32,76,105,110,101,115,32,116,111,32,100,114,97,119,32,105,110,32,101,97,99,104,32,116,114,105,97,110,103,108,101,32,105,115,32,37,108,100,10,9,32,32,37,100,58,32,0,0,0,0,0,0,0,0,102,105,110,97,108,32,115,117,109,32,111,102,32,115,113,117,97,114,101,115,32,111,102,32,114,101,115,105,100,117,97,108,115,32,58,32,37,103,10,0,32,32,32,32,92,103,112,108,103,97,100,100,116,111,109,97,99,114,111,92,103,112,108,102,114,111,110,116,116,101,120,116,123,37,10,0,0,0,0,0,32,32,32,32,92,103,112,108,103,97,100,100,116,111,109,97,99,114,111,92,103,112,108,98,97,99,107,116,101,120,116,123,37,10,0,0,0,0,0,0,10,83,117,98,116,111,112,105,99,115,32,97,118,97,105,108,97,98,108,101,32,102,111,114,32,0,0,0,0,0,0,0,32,32,32,32,125,37,10,0,66,111,111,107,109,97,110,32,68,101,109,105,32,73,116,97,108,105,99,0,0,0,0,0,97,114,36,114,111,119,0,0,42,32,77,65,84,82,73,88,58,32,91,37,100,32,88,32,37,100,93,32,10,0,0,0,125,37,10,0,0,0,0,0,78,111,32,112,114,101,118,105,111,117,115,32,102,105,108,101,110,97,109,101,0,0,0,0,32,32,115,101,114,105,101,115,0,0,0,0,0,0,0,0,37,10,32,32,92,115,112,101,99,105,97,108,123,112,115,58,32,99,117,114,114,101,110,116,112,111,105,110,116,32,103,114,101,115,116,111,114,101,32,109,111,118,101,116,111,125,37,10,32,32,0,0,0,0,0,0,70,54,0,0,0,0,0,0,92,114,106,117,115,116,123,92,115,116,114,117,116,123,125,37,115,125,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,91,114,93,123,92,115,116,114,117,116,123,125,37,115,125,0,0,0,0,92,99,106,117,115,116,123,92,115,116,114,117,116,123,125,37,115,125,0,0,0,0,0,0,121,116,105,99,115,0,0,0,52,120,59,49,59,45,50,120,43,49,46,56,52,59,120,47,48,46,48,56,45,49,49,46,53,0,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,92,115,116,114,117,116,123,125,37,115,125,0,0,0,0,0,0,0,92,108,106,117,115,116,123,92,115,116,114,117,116,123,125,37,115,125,0,0,0,0,0,0,10,65,102,116,101,114,32,37,100,32,105,116,101,114,97,116,105,111,110,115,32,116,104,101,32,102,105,116,32,99,111,110,118,101,114,103,101,100,46,10,0,0,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,91,108,93,123,92,115,116,114,117,116,123,125,37,115,125,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,37,115,0,32,32,87,97,114,110,105,110,103,58,32,83,105,110,103,108,101,32,105,115,111,108,105,110,101,32,40,115,99,97,110,41,32,105,115,32,110,111,116,32,101,110,111,117,103,104,32,102,111,114,32,97,32,112,109,51,100,32,112,108,111,116,46,10,9,32,32,32,72,105,110,116,58,32,77,105,115,115,105,110,103,32,98,108,97,110,107,32,108,105,110,101,115,32,105,110,32,116,104,101,32,100,97,116,97,32,102,105,108,101,63,32,83,101,101,32,39,104,101,108,112,32,112,109,51,100,39,32,97,110,100,32,70,65,81,46,10,0,0,0,0,0,0,0,115,103,110,0,0,0,0,0,37,37,10,32,32,92,115,112,101,99,105,97,108,123,112,115,58,32,103,115,97,118,101,32,99,117,114,114,101,110,116,112,111,105,110,116,32,99,117,114,114,101,110,116,112,111,105,110,116,32,116,114,97,110,115,108,97,116,101,10,37,100,32,114,111,116,97,116,101,32,110,101,103,32,101,120,99,104,32,110,101,103,32,101,120,99,104,32,116,114,97,110,115,108,97,116,101,125,37,37,10,32,32,0,66,111,111,107,109,97,110,32,68,101,109,105,0,0,0,0,97,110,36,103,108,101,115,0,109,97,120,95,105,110,100,101,120,0,0,0,0,0,0,0,32,32,92,112,117,116,40,37,100,44,37,100,41,123,0,0,32,32,68,97,121,115,32,99,111,109,112,117,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,10,0,0,92,102,111,110,116,115,105,122,101,123,37,103,125,123,92,98,97,115,101,108,105,110,101,115,107,105,112,125,92,115,101,108,101,99,116,102,111,110,116,10,0,0,0,0,0,0,0,0,32,108,105,110,101,99,111,108,111,114,0,0,0,0,0,0,120,112,45,62,112,95,99,111,117,110,116,32,61,61,32,121,112,45,62,112,95,99,111,117,110,116,0,0,0,0,0,0,70,53,0,0,0,0,0,0,32,32,125,125,37,10,0,0,32,115,105,122,101,32,37,46,50,102,105,110,44,32,37,46,50,102,105,110,32,0,0,0,32,115,105,122,101,32,37,46,50,102,99,109,44,32,37,46,50,102,99,109,32,0,0,0,32,59,10,0,0,0,0,0,100,117,112,32,48,46,52,50,32,108,101,32,123,52,32,109,117,108,125,32,123,100,117,112,32,48,46,57,50,32,108,101,32,123,45,50,32,109,117,108,32,49,46,56,52,32,97,100,100,125,32,123,48,46,48,56,32,100,105,118,32,49,49,46,53,32,115,117,98,125,32,105,102,101,108,115,101,125,32,105,102,101,108,115,101,0,0,0,32,37,100,0,0,0,0,0,32,116,105,110,121,0,0,0,10,84,104,101,32,102,105,116,32,119,97,115,32,115,116,111,112,112,101,100,32,98,121,32,116,104,101,32,117,115,101,114,32,97,102,116,101,114,32,37,100,32,105,116,101,114,97,116,105,111,110,115,46,10,0,0,32,115,109,97,108,108,0,0,32,114,111,116,97,116,101,0,97,98,115,0,0,0,0,0,48,46,53,0,0,0,0,0,32,100,97,115,104,101,100,0,66,111,111,107,109,97,110,32,76,105,103,104,116,32,73,116,97,108,105,99,0,0,0,0,97,116,0,0,0,0,0,0,109,105,110,95,105,110,100,101,120,0,0,0,0,0,0,0,32,99,111,108,111,114,0,0,109,97,120,95,117,115,105,110,103,32,60,61,32,77,65,88,68,65,84,65,67,79,76,83,0,0,0,0,0,0,0,0,32,32,77,111,110,116,104,115,32,99,111,109,112,117,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,10,0,0,0,0,0,0,0,0,100,36,116,105,99,115,0,0,37,115,37,115,37,115,37,115,0,0,0,0,0,0,0,0,32,108,105,110,101,116,121,112,101,32,37,100,0,0,0,0,70,52,0,0,0,0,0,0,112,36,97,116,116,101,114,110,0,0,0,0,0,0,0,0,117,110,114,101,99,111,103,110,105,122,101,100,32,111,112,116,105,111,110,0,0,0,0,0,102,111,110,116,32,115,105,122,101,32,111,117,116,32,111,102,32,98,111,117,110,100,115,32,91,49,46,46,49,48,48,93,0,0,0,0,0,0,0,0,116,36,105,110,121,0,0,0,115,36,109,97,108,108,0,0,50,42,120,45,48,46,56,52,0,0,0,0,0,0,0,0,114,36,111,116,97,116,101,0,10,77,97,120,105,109,117,109,32,105,116,101,114,97,116,105,111,110,32,99,111,117,110,116,32,40,37,100,41,32,114,101,97,99,104,101,100,46,32,70,105,116,32,115,116,111,112,112,101,100,46,10,0,0,0,0,37,37,32,71,78,85,80,76,79,84,58,32,76,97,84,101,88,32,112,105,99,116,117,114,101,32,117,115,105,110,103,32,69,69,80,73,67,32,109,97,99,114,111,115,10,92,115,101,116,108,101,110,103,116,104,123,92,117,110,105,116,108,101,110,103,116,104,125,123,37,102,112,116,125,10,0,0,0,0,0,92,102,111,111,116,110,111,116,101,115,105,122,101,10,0,0,105,110,116,0,0,0,0,0,92,102,111,110,116,115,105,122,101,123,37,100,125,123,37,103,125,92,115,101,108,101,99,116,102,111,110,116,10,0,0,0,66,111,111,107,109,97,110,32,76,105,103,104,116,0,0,0,97,99,36,116,105,111,110,95,116,97,98,108,101,0,0,0,99,111,103,95,121,0,0,0,92,98,101,103,105,110,123,112,105,99,116,117,114,101,125,40,37,100,44,37,100,41,40,37,100,44,37,100,41,10,0,0,32,32,105,110,116,101,114,118,97,108,115,32,99,111,109,112,117,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,10,0,0,0,0,0,109,36,116,105,99,115,0,0,92,116,104,105,110,108,105,110,101,115,32,92,100,111,116,116,101,100,108,105,110,101,123,50,48,125,0,0,0,0,0,0,45,45,45,101,114,114,111,114,33,45,45,45,10,0,0,0,117,115,101,115,95,97,120,105,115,91,83,69,67,79,78,68,95,89,95,65,88,73,83,93,0,0,0,0,0,0,0,0,70,51,0,0,0,0,0,0,92,116,104,105,110,108,105,110,101,115,32,92,100,97,115,104,108,105,110,101,91,54,48,93,123,50,48,125,0,0,0,0,92,116,104,105,110,108,105,110,101,115,32,92,100,111,116,116,101,100,108,105,110,101,123,49,48,125,0,0,0,0,0,0,92,116,104,105,110,108,105,110,101,115,32,92,100,97,115,104,108,105,110,101,91,57,48,93,123,49,48,125,0,0,0,0,50,32,109,117,108,32,48,46,56,52,32,115,117,98,0,0,92,84,104,105,99,107,108,105,110,101,115,32,92,112,97,116,104,0,0,0,0,0,0,0,92,116,104,105,110,108,105,110,101,115,32,92,112,97,116,104,0,0,0,0,0,0,0,0,70,73,84,95,67,79,78,86,69,82,71,69,68,0,0,0,92,116,104,105,110,108,105,110,101,115,32,92,100,114,97,119,108,105,110,101,91,45,53,48,93,0,0,0,0,0,0,0,92,116,104,105,99,107,108,105,110,101,115,32,92,112,97,116,104,0,0,0,0,0,0,0,69,108,108,105,112,116,105,99,80,105,0,0,0,0,0,0,40,37,117,44,37,117,41,0,65,118,97,110,116,71,97,114,100,101,32,68,101,109,105,32,79,98,108,105,113,117,101,0,97,36,108,108,0,0,0,0,99,111,103,95,120,0,0,0,10,37,115,40,37,117,44,37,117,41,0,0,0,0,0,0,102,108,111,97,116,54,52,0,37,115,40,37,117,44,37,117,41,0,0,0,0,0,0,0,101,108,108,105,112,115,101,115,10,0,0,0,0,0,0,0,117,115,101,115,95,97,120,105,115,91,70,73,82,83,84,95,89,95,65,88,73,83,93,0,70,50,0,0,0,0,0,0,101,36,109,112,116,121,0,0,92,99,111,108,111,114,123,121,101,108,108,111,119,125,10,0,92,99,111,108,111,114,123,99,121,97,110,125,10,0,0,0,112,97,117,115,101,100,0,0,92,99,111,108,111,114,123,109,97,103,101,110,116,97,125,10,0,0,0,0,0,0,0,0,92,99,111,108,111,114,123,103,114,101,101,110,125,10,0,0,120,47,48,46,51,50,45,48,46,55,56,49,50,53,0,0,9,108,111,97,100,112,97,116,104,32,102,114,111,109,32,71,78,85,80,76,79,84,95,76,73,66,32,105,115,32,0,0,92,99,111,108,111,114,123,98,108,117,101,125,10,0,0,0,103,112,95,115,116,114,97,100,100,0,0,0,0,0,0,0,70,73,84,58,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,32,100,117,114,105,110,103,32,102,105,116,0,0,92,99,111,108,111,114,123,114,101,100,125,10,0,0,0,0,37,56,46,51,103,0,0,0,116,105,109,101,32,118,97,108,117,101,32,111,117,116,32,111,102,32,114,97,110,103,101,0,92,99,111,108,111,114,123,98,108,97,99,107,125,10,0,0,69,108,108,105,112,116,105,99,69,0,0,0,0,0,0,0,125,125,125,10,0,0,0,0,65,118,97,110,116,71,97,114,100,101,32,68,101,109,105,0,118,36,97,114,105,97,98,108,101,115,0,0,0,0,0,0,105,110,100,101,120,95,109,97,120,95,121,0,0,0,0,0,37,99,92,92,0,0,0,0,102,108,111,97,116,51,50,0,32,32,32,32,111,102,102,115,101,116,32,0,0,0,0,0,97,117,36,116,111,102,114,101,113,0,0,0,0,0,0,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,91,108,116,93,123,92,115,104,111,114,116,115,116,97,99,107,123,0,99,105,114,99,108,101,115,10,0,0,0,0,0,0,0,0,97,108,108,32,112,111,105,110,116,115,32,121,50,32,118,97,108,117,101,32,117,110,100,101,102,105,110,101,100,33,0,0,70,49,0,0,0,0,0,0,116,114,97,110,115,36,112,97,114,101,110,116,0,0,0,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,91,108,93,123,92,115,104,111,114,116,115,116,97,99,107,123,0,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,91,108,98,93,123,92,115,104,111,114,116,115,116,97,99,107,123,0,77,111,117,115,105,110,103,32,110,111,116,32,97,99,116,105,118,101,0,0,0,0,0,0,99,112,56,53,48,0,0,0,37,115,125,125,125,10,0,0,32,120,108,111,119,32,120,104,105,103,104,32,121,108,111,119,32,121,104,105,103,104,0,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,91,108,116,93,123,92,114,111,116,97,116,101,98,111,120,91,111,114,105,103,105,110,61,99,93,123,57,48,125,123,0,0,0,0,48,46,51,50,32,100,105,118,32,48,46,55,56,49,50,53,32,115,117,98,0,0,0,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,91,108,93,123,92,114,111,116,97,116,101,98,111,120,91,111,114,105,103,105,110,61,99,93,123,57,48,125,123,0,0,0,0,0,108,111,103,102,105,108,101,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,91,108,98,93,123,92,114,111,116,97,116,101,98,111,120,91,111,114,105,103,105,110,61,99,93,123,57,48,125,123,0,0,0,0,37,115,125,125,10,0,0,0,69,108,108,105,112,116,105,99,75,0,0,0,0,0,0,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,91,114,93,123,0,0,0,0,0,0,65,118,97,110,116,71,97,114,100,101,32,66,111,111,107,32,79,98,108,105,113,117,101,0,116,36,101,114,109,105,110,97,108,0,0,0,0,0,0,0,105,110,100,101,120,95,109,97,120,95,120,0,0,0,0,0,100,111,0,0,0,0,0,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,123,0,117,105,110,116,54,52,0,0,32,97,110,100,32,97,114,101,32,110,111,116,32,114,111,116,97,116,101,100,44,10,9,0,101,120,112,101,99,116,101,100,32,102,111,114,109,97,116,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,91,108,93,123,0,0,0,0,0,0,114,103,98,105,109,97,103,101,10,0,0,0,0,0,0,0,97,108,108,32,112,111,105,110,116,115,32,121,32,118,97,108,117,101,32,117,110,100,101,102,105,110,101,100,33,0,0,0,75,80,95,57,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,99,114,105,112,116,115,116,121,108,101,92,115,116,97,114,36,125,0,0,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,99,114,105,112,116,115,116,121,108,101,92,116,114,105,97,110,103,108,101,36,125,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,99,114,105,112,116,115,116,121,108,101,92,116,105,109,101,115,36,125,0,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,99,114,105,112,116,115,116,121,108,101,92,66,111,120,36,125,0,124,40,51,120,45,50,41,47,50,124,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,99,114,105,112,116,115,116,121,108,101,32,43,36,125,0,0,0,78,111,32,102,105,116,116,97,98,108,101,32,112,97,114,97,109,101,116,101,114,115,33,10,0,0,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,99,114,105,112,116,115,116,121,108,101,92,68,105,97,109,111,110,100,36,125,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,116,121,108,101,92,115,116,97,114,36,125,0,0,0,0,0,0,116,97,110,104,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,116,121,108,101,92,116,114,105,97,110,103,108,101,36,125,0,0,65,118,97,110,116,71,97,114,100,101,32,66,111,111,107,0,115,36,101,116,0,0,0,0,105,110,100,101,120,95,109,105,110,95,121,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,116,121,108,101,92,116,105,109,101,115,36,125,0,0,0,0,0,105,110,116,54,52,0,0,0,32,105,110,32,50,68,32,109,111,100,101,44,32,116,101,114,109,105,110,97,108,32,112,101,114,109,105,116,116,105,110,103,44,10,9,0,0,0,0,0,99,111,109,36,109,101,110,116,115,99,104,97,114,115,0,0,101,120,112,101,99,116,105,110,103,32,101,120,112,111,110,101,110,116,0,0,0,0,0,0,102,111,114,109,97,116,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,116,121,108,101,92,66,111,120,36,125,0,0,0,0,0,0,0,105,109,97,103,101,10,0,0,101,100,102,0,0,0,0,0,117,115,101,115,95,97,120,105,115,91,83,69,67,79,78,68,95,88,95,65,88,73,83,93,0,0,0,0,0,0,0,0,75,80,95,56,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,116,121,108,101,32,43,36,125,0,99,111,110,116,111,117,114,32,100,50,120,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,99,114,105,112,116,115,116,121,108,101,92,68,105,97,109,111,110,100,36,125,0,0,0,35,32,115,101,116,32,111,117,116,112,117,116,10,0,0,0,92,99,105,114,99,108,101,42,123,50,52,125,0,0,0,0,112,109,51,100,95,112,108,111,116,45,62,113,117,97,100,114,97,110,103,108,101,115,0,0,92,99,105,114,99,108,101,42,123,49,56,125,0,0,0,0,49,46,53,32,109,117,108,32,49,32,115,117,98,32,97,98,115,0,0,0,0,0,0,0,92,99,105,114,99,108,101,42,123,49,50,125,0,0,0,0,45,112,101,114,115,105,115,116,0,0,0,0,0,0,0,0,78,117,109,98,101,114,32,111,102,32,100,97,116,97,32,112,111,105,110,116,115,32,115,109,97,108,108,101,114,32,116,104,97,110,32,110,117,109,98,101,114,32,111,102,32,112,97,114,97,109,101,116,101,114,115,0,92,99,105,114,99,108,101,123,50,52,125,0,0,0,0,0,92,99,105,114,99,108,101,123,49,56,125,0,0,0,0,0,99,111,115,104,0,0,0,0,92,99,105,114,99,108,101,123,49,50,125,0,0,0,0,0,84,105,109,101,115,32,66,111,108,100,32,73,116,97,108,105,99,0,0,0,0,0,0,0,102,36,117,110,99,116,105,111,110,115,0,0,0,0,0,0,105,110,100,101,120,95,109,105,110,95,120,0,0,0,0,0,84,111,111,32,109,97,110,121,32,108,101,118,101,108,115,32,111,102,32,110,101,115,116,101,100,32,109,97,99,114,111,115,0,0,0,0,0,0,0,0,77,79,85,83,69,95,82,85,76,69,82,95,88,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,115,116,97,114,36,125,0,0,117,105,110,116,51,50,0,0,32,98,121,32,37,100,0,0,101,120,112,101,99,116,101,100,32,102,111,110,116,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,116,114,105,97,110,103,108,101,36,125,0,0,0,0,0,0,108,97,98,101,108,115,10,0,99,108,111,115,101,0,0,0,37,105,0,0,0,0,0,0,117,115,101,115,95,97,120,105,115,91,70,73,82,83,84,95,88,95,65,88,73,83,93,0,83,105,110,103,117,108,97,114,32,109,97,116,114,105,120,32,105,110,32,76,85,45,68,69,67,79,77,80,0,0,0,0,115,109,111,111,116,104,95,98,111,120,0,0,0,0,0,0,115,112,108,105,110,101,32,114,105,103,104,116,32,115,105,100,101,0,0,0,0,0,0,0,75,80,95,55,0,0,0,0,100,117,112,108,105,99,97,116,101,100,32,97,114,103,117,109,101,110,116,115,32,105,110,32,115,116,121,108,101,32,115,112,101,99,105,102,105,99,97,116,105,111,110,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,116,105,109,101,115,36,125,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,102,95,115,117,109,32,101,120,112,101,99,116,115,32,97,114,103,117,109,101,110,116,32,40,118,97,114,110,97,109,101,41,32,111,102,32,116,121,112,101,32,115,116,114,105,110,103,46,0,0,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,66,111,120,36,125,0,0,0,37,115,32,97,120,105,115,32,114,97,110,103,101,32,117,110,100,101,102,105,110,101,100,32,111,114,32,111,118,101,114,102,108,111,119,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,43,36,125,0,0,0,0,0,0,92,109,97,107,101,98,111,120,40,48,44,48,41,123,36,92,68,105,97,109,111,110,100,36,125,0,0,0,0,0,0,0,124,40,51,120,45,49,41,47,50,124,0,0,0,0,0,0,92,112,117,116,40,37,100,44,37,100,41,123,37,115,125,10,0,0,0,0,0,0,0,0,37,100,32,37,100,32,37,102,0,0,0,0,0,0,0,0,92,101,110,100,123,112,105,99,116,117,114,101,125,10,0,0,115,105,110,104,0,0,0,0,92,102,111,111,116,110,111,116,101,115,105,122,101,37,10,0,84,105,109,101,115,32,66,111,108,100,0,0,0,0,0,0,104,97,110,110,0,0,0,0,37,115,37,115,9,37,108,100,10,0,0,0,0,0,0,0,116,114,105,109,32,116,111,112,32,38,32,98,111,116,116,111,109,32,109,97,114,103,105,110,115,0,0,0,0,0,0,0,105,110,116,51,50,0,0,0,32,114,111,116,97,116,101,100,0,0,0,0,0,0,0,0,116,114,105,109,32,98,111,116,116,111,109,32,109,97,114,103,105,110,0,0,0,0,0,0,112,109,51,100,10,0,0,0,98,117,116,116,111,110,51,0,75,80,95,54,0,0,0,0,78,111,32,112,111,105,110,116,105,110,116,101,114,118,97,108,32,115,112,101,99,105,102,105,101,114,32,97,108,108,111,119,101,100,44,32,104,101,114,101,0,0,0,0,0,0,0,0,116,114,105,109,32,116,111,112,32,109,97,114,103,105,110,0,116,114,105,109,32,108,101,102,116,32,38,32,114,105,103,104,116,32,109,97,114,103,105,110,115,0,0,0,0,0,0,0,99,104,97,114,36,97,99,116,101,114,0,0,0,0,0,0,116,114,105,109,32,114,105,103,104,116,32,109,97,114,103,105,110,0,0,0,0,0,0,0,116,114,105,109,32,108,101,102,116,32,109,97,114,103,105,110,0,0,0,0,0,0,0,0,49,46,53,32,109,117,108,32,46,53,32,115,117,98,32,97,98,115,0,0,0,0,0,0,37,37,32,0,0,0,0,0,110,111,32,112,97,114,97,109,101,116,101,114,32,115,112,101,99,105,102,105,101,100,0,0,37,10,0,0,0,0,0,0,92,115,112,101,99,105,97,108,123,100,116,32,37,102,125,37,37,10,0,0,0,0,0,0,97,116,97,110,50,0,0,0,92,115,112,101,99,105,97,108,123,100,97,32,37,102,125,37,37,10,0,0,0,0,0,0,84,105,109,101,115,32,73,116,97,108,105,99,0,0,0,0,98,111,120,0,0,0,0,0,109,97,120,0,0,0,0,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,37,115,123,92,115,104,111,114,116,115,116,97,99,107,123,37,115,125,125,125,10,0,0,0,0,0,117,119,111,114,100,0,0,0,102,111,114,109,97,116,32,34,37,115,34,0,0,0,0,0,110,111,114,97,110,103,101,36,108,105,109,105,116,101,100,0,91,108,116,93,0,0,0,0,98,111,120,112,108,111,116,10,0,0,0,0,0,0,0,0,98,117,116,116,111,110,50,0,97,108,108,32,112,111,105,110,116,115,32,117,110,100,101,102,105,110,101,100,33,0,0,0,75,80,95,53,0,0,0,0,112,105,0,0,0,0,0,0,91,108,98,93,0,0,0,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,37,115,123,37,115,125,125,10,0,0,123,92,109,97,107,101,98,111,120,40,48,44,48,41,37,115,125,10,0,0,0,0,0,0,120,116,105,99,115,0,0,0,92,112,117,116,40,37,100,44,37,100,41,0,0,0,0,0,40,51,120,45,50,41,47,50,0,0,0,0,0,0,0,0,92,115,112,101,99,105,97,108,123,112,97,32,37,100,32,37,100,125,0,0,0,0,0,0,102,105,116,116,101,100,32,112,97,114,97,109,101,116,101,114,115,32,105,110,105,116,105,97,108,105,122,101,100,32,119,105,116,104,32,99,117,114,114,101,110,116,32,118,97,114,105,97,98,108,101,32,118,97,108,117,101,115,10,10,0,0,0,0,92,115,112,101,99,105,97,108,123,102,112,125,37,10,0,0,92,115,112,101,99,105,97,108,123,97,114,32,48,32,48,32,37,100,32,37,100,32,48,32,55,125,0,0,0,0,0,0,97,116,97,110,0,0,0,0,92,115,112,101,99,105,97,108,123,112,110,32,37,100,125,0,84,105,109,101,115,32,82,111,109,97,110,0,0,0,0,0,99,97,117,99,104,121,0,0,117,112,95,113,117,97,114,116,105,108,101,0,0,0,0,0,92,115,112,101,99,105,97,108,123,115,104,32,37,102,125,0,117,105,110,116,49,54,0,0,106,117,115,116,105,102,105,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,44,32,0,0,0,0,0,0,0,114,97,110,103,101,36,108,105,109,105,116,101,100,0,0,0,125,37,37,10,0,0,0,0,99,97,110,100,108,101,115,116,105,99,107,115,10,0,0,0,98,117,116,116,111,110,49,0,78,111,32,100,97,116,97,32,105,110,32,112,108,111,116,0,75,80,95,52,0,0,0,0,112,111,105,110,116,105,36,110,116,101,114,118,97,108,0,0,92,114,117,108,101,123,46,49,112,116,125,123,46,49,112,116,125,0,0,0,0,0,0,0,92,112,117,116,40,37,100,44,37,100,41,123,0,0,0,0,92,112,117,116,40,37,100,44,37,100,41,123,92,115,112,101,99,105,97,108,123,101,109,58,108,105,110,101,116,111,125,125,10,0,0,0,0,0,0,0,92,112,117,116,40,37,100,44,37,100,41,123,92,115,112,101,99,105,97,108,123,101,109,58,109,111,118,101,116,111,125,125,10,0,0,0,0,0,0,0,69,68,70,95,66,105,110,97,114,121,70,105,108,101,78,97,109,101,0,0,0,0,0,0,49,46,53,32,109,117,108,32,49,32,115,117,98,0,0,0,92,112,117,116,40,37,46,49,102,44,37,46,49,102,41,123,92,114,117,108,101,91,37,46,51,102,112,116,93,123,37,46,51,102,112,116,125,123,37,46,51,102,112,116,125,125,10,0,79,117,116,32,111,102,32,109,101,109,111,114,121,32,105,110,32,102,105,116,58,32,116,111,111,32,109,97,110,121,32,112,97,114,97,109,101,116,101,114,115,63,0,0,0,0,0,0,92,112,117,116,40,37,46,49,102,44,37,46,49,102,41,123,37,115,125,10,0,0,0,0,92,112,117,116,40,37,46,50,102,44,37,117,41,123,92,114,117,108,101,123,37,46,51,102,112,116,125,123,37,46,51,102,112,116,125,125,10,0,0,0,97,99,111,115,0,0,0,0,112,111,112,32,48,46,53,0,92,109,117,108,116,105,112,117,116,40,37,46,50,102,44,37,46,50,102,41,40,37,46,51,102,44,37,46,51,102,41,123,50,125,123,92,114,117,108,101,123,37,46,51,102,112,116,125,123,37,46,51,102,112,116,125,125,10,0,0,0,0,0,0,77,117,115,116,32,115,101,116,32,111,117,116,112,117,116,32,116,111,32,97,32,102,105,108,101,32,111,114,32,112,117,116,32,97,108,108,32,109,117,108,116,105,112,108,111,116,32,99,111,109,109,97,110,100,115,32,111,110,32,111,110,101,32,105,110,112,117,116,32,108,105,110,101,0,0,0,0,0,0,0,101,120,112,0,0,0,0,0,109,101,100,105,97,110,0,0,92,109,117,108,116,105,112,117,116,40,37,46,50,102,44,37,46,50,102,41,40,37,46,51,102,44,37,46,51,102,41,123,37,117,125,123,92,114,117,108,101,123,37,46,51,102,112,116,125,123,37,46,51,102,112,116,125,125,10,0,0,0,0,0,99,101,110,116,101,114,32,106,117,115,116,105,102,105,101,100,44,32,0,0,0,0,0,0,97,117,116,111,106,36,117,115,116,105,102,121,0,0,0,0,92,112,117,116,40,37,117,44,37,46,50,102,41,123,92,114,117,108,101,123,37,46,51,102,112,116,125,123,37,46,51,102,112,116,125,125,10,0,0,0,102,105,110,97,110,99,101,98,97,114,115,10,0,0,0,0,97,110,121,0,0,0,0,0,69,120,112,101,99,116,105,110,103,32,39,115,117,109,32,91,60,118,97,114,62,32,61,32,60,115,116,97,114,116,62,58,60,101,110,100,62,93,32,60,101,120,112,114,101,115,115,105,111,110,62,39,10,0,0,0,75,80,95,51,0,0,0,0,78,111,32,112,111,105,110,116,115,105,122,101,32,115,112,101,99,105,102,105,101,114,32,97,108,108,111,119,101,100,44,32,104,101,114,101,0,0,0,0,92,117,115,101,98,111,120,123,92,112,108,111,116,112,111,105,110,116,125,0,0,0,0,0,92,112,117,116,40,37,117,44,37,117,41,123,37,115,125,10,0,0,0,0,0,0,0,0,115,101,99,36,111,110,100,0,92,112,117,116,40,37,100,44,37,100,41,123,92,118,101,99,116,111,114,40,37,100,44,37,100,41,123,48,125,125,10,0,92,112,117,116,40,37,100,44,37,100,41,123,92,37,115,40,37,100,44,37,100,41,123,37,100,125,125,10,0,0,0,0,40,51,120,45,49,41,47,50,0,0,0,0,0,0,0,0,92,112,117,116,40,37,100,44,37,100,41,123,92,37,115,40,37,100,44,48,41,123,37,100,125,125,10,0,0,0,0,0,102,105,116,32,112,97,114,97,109,32,114,101,115,105,122,101,0,0,0,0,0,0,0,0,108,105,110,101,0,0,0,0,118,101,99,116,111,114,0,0,32,32,32,32,32,32,32,32,32,0,0,0,0,0,0,0,97,115,105,110,0,0,0,0,92,112,117,116,40,37,100,44,37,100,41,123,92,37,115,40,48,44,37,100,41,123,37,100,125,125,10,0,0,0,0,0,84,104,105,115,32,116,101,114,109,105,110,97,108,32,100,111,101,115,32,110,111,116,32,115,117,112,112,111,114,116,32,109,117,108,116,105,112,108,111,116,0,0,0,0,0,0,0,0,103,97,117,115,115,0,0,0,108,111,95,113,117,97,114,116,105,108,101,0,0,0,0,0,117,36,110,105,116,0,0,0,114,105,103,104,116,32,106,117,115,116,105,102,105,101,100,44,32,0,0,0,0,0,0,0,105,110,116,49,54,0,0,0,114,105,36,103,104,116,0,0,110,111,36,104,97,99,107,116,101,120,116,0,0,0,0,0,118,101,99,116,111,114,10,0,115,117,114,102,97,99,101,0,107,101,121,36,112,114,101,115,115,0,0,0,0,0,0,0,39,93,39,32,101,120,112,101,99,116,101,100,0,0,0,0,75,80,95,50,0,0,0,0,37,32,71,78,85,80,76,79,84,58,32,76,97,84,101,88,32,112,105,99,116,117,114,101,32,117,115,105,110,103,32,80,83,84,82,73,67,75,83,32,109,97,99,114,111,115,10,0,92,99,97,116,99,111,100,101,96,64,61,49,50,10,92,102,105,10,92,101,110,100,112,115,112,105,99,116,117,114,101,10,0,0,0,0,0,0,0,0,102,105,114,36,115,116,0,0,92,112,115,112,105,99,116,117,114,101,40,37,102,44,37,102,41,40,37,102,44,37,102,41,10,92,105,102,120,92,110,111,102,105,103,115,92,117,110,100,101,102,105,110,101,100,10,92,99,97,116,99,111,100,101,96,64,61,49,49,10,10,0,0,92,112,115,115,101,116,123,117,110,105,116,61,53,46,48,105,110,44,120,117,110,105,116,61,53,46,48,105,110,44,121,117,110,105,116,61,51,46,48,105,110,125,10,0,0,0,0,0,49,46,53,32,109,117,108,32,46,53,32,115,117,98,0,0,112,97,114,97,109,101,116,101,114,32,102,105,108,101,32,37,115,32,99,111,117,108,100,32,110,111,116,32,98,101,32,114,101,97,100,0,0,0,0,0,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,65,114,114,111,119,125,123,112,115,108,105,110,101,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,125,10,92,99,97,116,99,111,100,101,96,64,61,49,50,10,10,92,102,105,10,0,0,0,0,0,115,121,110,116,97,120,32,101,114,114,111,114,32,105,110,32,112,97,114,97,109,101,116,101,114,32,102,105,108,101,0,0,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,80,108,117,115,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,43,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,83,113,117,97,114,101,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,115,113,117,97,114,101,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,67,105,114,99,108,101,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,111,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,84,114,105,97,110,103,108,101,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,116,114,105,97,110,103,108,101,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,80,101,110,116,97,103,111,110,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,112,101,110,116,97,103,111,110,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,70,105,108,108,115,113,117,97,114,101,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,115,113,117,97,114,101,42,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,70,105,108,108,99,105,114,99,108,101,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,42,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,70,105,108,108,116,114,105,97,110,103,108,101,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,116,114,105,97,110,103,108,101,42,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83]) -.concat([84,64,70,105,108,108,112,101,110,116,97,103,111,110,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,112,101,110,116,97,103,111,110,42,125,10,0,0,0,0,0,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,68,105,97,109,111,110,100,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,115,113,117,97,114,101,44,100,111,116,97,110,103,108,101,61,52,53,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,70,105,108,108,100,105,97,109,111,110,100,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,115,113,117,97,114,101,42,44,100,111,116,97,110,103,108,101,61,52,53,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,67,114,111,115,115,125,123,112,115,100,111,116,115,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,44,100,111,116,115,116,121,108,101,61,43,44,100,111,116,97,110,103,108,101,61,52,53,125,10,0,0,0,0,0,0,0,0,116,97,110,0,0,0,0,0,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,66,111,114,100,101,114,125,123,112,115,108,105,110,101,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,53,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,65,120,101,115,125,123,112,115,108,105,110,101,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,53,44,108,105,110,101,115,116,121,108,101,61,100,111,116,116,101,100,44,100,111,116,115,101,112,61,46,48,48,52,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,83,111,108,105,100,125,123,112,115,108,105,110,101,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,53,44,108,105,110,101,115,116,121,108,101,61,115,111,108,105,100,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,68,97,115,104,101,100,125,123,112,115,108,105,110,101,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,53,44,108,105,110,101,115,116,121,108,101,61,100,97,115,104,101,100,44,100,97,115,104,61,46,48,49,32,46,48,49,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,68,111,116,116,101,100,125,123,112,115,108,105,110,101,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,50,53,44,108,105,110,101,115,116,121,108,101,61,100,111,116,116,101,100,44,100,111,116,115,101,112,61,46,48,48,56,125,10,92,110,101,119,112,115,111,98,106,101,99,116,123,80,83,84,64,76,111,110,103,68,97,115,104,125,123,112,115,108,105,110,101,125,123,108,105,110,101,119,105,100,116,104,61,46,48,48,49,53,44,108,105,110,101,115,116,121,108,101,61,100,97,115,104,101,100,44,100,97,115,104,61,46,48,50,32,46,48,49,125,10,0,0,0,0,0,0,0,115,112,108,105,110,101,36,115,0,0,0,0,0,0,0,0,109,105,110,0,0,0,0,0,37,32,68,101,102,105,110,101,32,110,101,119,32,80,83,84,32,111,98,106,101,99,116,115,44,32,105,102,32,110,111,116,32,97,108,114,101,97,100,121,32,100,101,102,105,110,101,100,10,92,105,102,120,92,80,83,84,108,111,97,100,101,100,92,117,110,100,101,102,105,110,101,100,10,92,100,101,102,92,80,83,84,108,111,97,100,101,100,123,116,125,10,92,112,115,115,101,116,123,97,114,114,111,119,115,105,122,101,61,46,48,49,32,51,46,50,32,49,46,52,32,46,51,125,10,92,112,115,115,101,116,123,100,111,116,115,105,122,101,61,46,48,49,125,10,92,99,97,116,99,111,100,101,96,64,61,49,49,10,10,0,0,0,0,0,0,0,0,108,101,102,116,32,106,117,115,116,105,102,105,101,100,44,32,0,0,0,0,0,0,0,0,117,98,121,116,101,0,0,0,92,80,83,84,64,76,111,110,103,68,97,115,104,0,0,0,104,105,115,116,101,112,115,10,0,0,0,0,0,0,0,0,105,110,100,101,120,101,115,32,108,117,0,0,0,0,0,0,120,50,32,114,97,110,103,101,32,105,115,32,105,110,118,97,108,105,100,0,0,0,0,0,39,58,39,32,101,120,112,101,99,116,101,100,0,0,0,0,75,80,95,49,0,0,0,0,112,115,0,0,0,0,0,0,92,80,83,84,64,68,111,116,116,101,100,0,0,0,0,0,92,80,83,84,64,68,97,115,104,101,100,0,0,0,0,0,92,80,83,84,64,83,111,108,105,100,0,0,0,0,0,0,92,80,83,84,64,65,120,101,115,0,0,0,0,0,0,0,124,51,120,45,50,124,0,0,34,37,115,34,32,0,0,0,92,80,83,84,64,66,111,114,100,101,114,0,0,0,0,0,59,0,0,0,0,0,0,0,70,73,88,69,68,58,32,32,37,115,10,0,0,0,0,0,40,37,46,52,102,44,37,46,52,102,41,10,0,0,0,0,105,108,108,101,103,97,108,32,100,97,121,32,111,102,32,109,111,110,116,104,0,0,0,0,36,37,102,32,92,116,105,109,101,115,32,49,48,94,123,37,100,125,36,0,0,0,0,0,99,111,115,0,0,0,0,0,36,37,102,36,0,0,0,0,109,112,32,116,105,116,108,101,0,0,0,0,0,0,0,0,113,110,111,114,109,0,0,0,115,117,109,95,115,113,0,0,36,37,100,32,92,116,105,109,101,115,32,49,48,94,123,37,100,125,36,0,0,0,0,0,10,9,32,32,108,97,98,101,108,115,32,97,114,101,32,0,117,105,110,116,56,0,0,0,36,37,100,36,0,0,0,0,102,115,116,101,112,115,10,0,109,97,116,114,105,120,32,58,32,116,104,105,110,32,112,108,97,116,101,32,115,112,108,105,110,101,115,32,50,100,0,0,117,110,101,120,112,101,99,116,101,100,32,125,0,0,0,0,42,42,0,0,0,0,0,0,75,80,95,48,0,0,0,0,112,111,105,110,116,115,36,105,122,101,0,0,0,0,0,0,36,49,48,94,123,37,100,125,36,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,99,112,52,51,55,0,0,0,123,37,115,125,10,0,0,0,32,121,108,111,119,32,121,104,105,103,104,0,0,0,0,0,40,37,46,52,102,44,37,46,52,102,41,0,0,0,0,0,51,32,109,117,108,32,50,32,115,117,98,32,97,98,115,0,112,117,115,104,100,0,0,0,123,76,125,0,0,0,0,0,99,111,117,108,100,32,110,111,116,32,114,101,97,100,32,112,97,114,97,109,101,116,101,114,45,102,105,108,101,32,34,37,115,34,0,0,0,0,0,0,91,114,93,0,0,0,0,0,91,108,93,0,0,0,0,0,115,105,110,0,0,0,0,0,92,114,112,117,116,0,0,0,71,80,86,65,76,95,77,85,76,84,73,80,76,79,84,0,99,110,36,111,114,109,97,108,0,0,0,0,0,0,0,0,115,117,109,0,0,0,0,0,99,108,36,101,97,114,0,0,92,80,83,84,64,70,105,108,108,112,101,110,116,97,103,111,110,0,0,0,0,0,0,0,10,9,32,32,116,105,99,115,32,97,114,101,32,108,105,109,105,116,101,100,32,116,111,32,100,97,116,97,32,114,97,110,103,101,0,0,0,0,0,0,98,121,116,101,0,0,0,0,110,111,114,111,36,116,97,116,101,0,0,0,0,0,0,0,78,101,101,100,32,48,32,116,111,32,50,32,117,115,105,110,103,32,115,112,101,99,115,32,102,111,114,32,115,116,97,116,115,32,99,111,109,109,97,110,100,0,0,0,0,0,0,0,92,80,83,84,64,70,105,108,108,99,105,114,99,108,101,0,115,116,101,112,115,10,0,0,116,104,105,110,32,112,108,97,116,101,32,115,112,108,105,110,101,115,32,105,110,32,100,103,114,105,100,51,100,0,0,0,101,120,112,101,99,116,105,110,103,32,123,119,104,105,108,101,45,99,108,97,117,115,101,125,0,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,101,120,112,114,101,115,115,105,111,110,32,0,0,0,0,0,75,80,95,68,105,118,105,100,101,0,0,0,0,0,0,0,78,111,32,112,111,105,110,116,116,121,112,101,32,115,112,101,99,105,102,105,101,114,32,97,108,108,111,119,101,100,44,32,104,101,114,101,0,0,0,0,92,80,83,84,64,70,105,108,108,116,114,105,97,110,103,108,101,0,0,0,0,0,0,0,92,80,83,84,64,70,105,108,108,115,113,117,97,114,101,0,92,80,83,84,64,70,105,108,108,100,105,97,109,111,110,100,0,0,0,0,0,0,0,0,92,80,83,84,64,80,101,110,116,97,103,111,110,0,0,0,124,51,120,45,49,124,0,0,92,80,83,84,64,84,114,105,97,110,103,108,101,0,0,0,102,105,116,116,101,100,32,112,97,114,97,109,101,116,101,114,115,32,97,110,100,32,105,110,105,116,105,97,108,32,118,97,108,117,101,115,32,102,114,111,109,32,102,105,108,101,58,32,37,115,10,10,0,0,0,0,92,80,83,84,64,67,105,114,99,108,101,0,0,0,0,0,92,80,83,84,64,67,114,111,115,115,0,0,0,0,0,0,99,111,110,106,103,0,0,0,92,80,83,84,64,83,113,117,97,114,101,0,0,0,0,0,105,110,118,97,108,105,100,32,111,114,32,100,117,112,108,105,99,97,116,101,32,111,112,116,105,111,110,0,0,0,0,0,107,36,100,101,110,115,105,116,121,0,0,0,0,0,0,0,115,116,100,100,101,118,0,0,92,80,83,84,64,80,108,117,115,0,0,0,0,0,0,0,32,97,110,100,32,109,105,114,114,111,114,101,100,32,111,110,32,111,112,112,111,115,105,116,101,32,98,111,114,100,101,114,0,0,0,0,0,0,0,0,105,110,116,56,0,0,0,0,92,80,83,84,64,68,105,97,109,111,110,100,0,0,0,0,105,110,112,117,116,32,108,105,110,101,32,99,111,112,121,0,114,111,36,116,97,116,101,0,32,37,100,10,0,0,0,0,98,111,120,120,121,101,114,114,111,114,98,97,114,115,10,0,71,114,105,100,100,105,110,103,32,111,102,32,116,104,101,32,99,111,108,111,114,32,99,111,108,117,109,110,32,105,115,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,101,120,112,101,99,116,105,110,103,32,123,100,111,45,99,108,97,117,115,101,125,0,0,0,98,105,110,0,0,0,0,0,83,107,105,112,112,105,110,103,32,100,97,116,97,32,102,105,108,101,32,119,105,116,104,32,110,111,32,118,97,108,105,100,32,112,111,105,110,116,115,0,37,115,40,37,46,52,102,44,37,46,52,102,41,10,0,0,75,80,95,68,101,99,105,109,97,108,0,0,0,0,0,0,32,43,37,100,10,0,0,0,92,113,100,105,115,107,40,37,46,52,102,44,37,46,52,102,41,123,37,46,52,102,125,10,0,0,0,0,0,0,0,0,99,111,110,116,111,117,114,32,100,101,108,116,97,95,116,0,32,40,117,110,100,101,102,105,110,101,100,41,10,0,0,0,97,100,100,95,116,105,99,95,117,115,101,114,58,32,108,105,115,116,32,115,111,114,116,32,101,114,114,111,114,0,0,0,123,45,62,125,0,0,0,0,35,32,115,101,116,32,111,117,116,112,117,116,32,39,37,115,39,10,0,0,0,0,0,0,32,37,99,32,100,117,109,109,121,10,0,0,0,0,0,0,92,80,83,84,64,65,114,114,111,119,37,115,40,37,46,52,102,44,37,46,52,102,41,40,37,46,52,102,44,37,46,52,102,41,10,0,0,0,0,0,102,117,110,99,116,105,111,110,32,116,111,32,112,108,111,116,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,0,32,37,115,10,0,0,0,0,51,32,109,117,108,32,49,32,115,117,98,32,97,98,115,0,92,100,101,102,92,112,111,108,121,112,109,73,73,73,100,35,49,123,92,112,115,112,111,108,121,103,111,110,91,108,105,110,101,115,116,121,108,101,61,110,111,110,101,44,102,105,108,108,115,116,121,108,101,61,115,111,108,105,100,44,102,105,108,108,99,111,108,111,114,61,80,83,84,64,67,79,76,79,82,35,49,93,125,10,10,0,0,0,10,9,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,0,0,0,0,0,0,85,115,97,103,101,58,32,103,110,117,112,108,111,116,32,91,79,80,84,73,79,78,93,46,46,46,32,91,70,73,76,69,93,10,32,32,45,86,44,32,45,45,118,101,114,115,105,111,110,10,32,32,45,104,44,32,45,45,104,101,108,112,10,32,32,45,112,32,32,45,45,112,101,114,115,105,115,116,10,32,32,45,100,32,32,45,45,100,101,102,97,117,108,116,45,115,101,116,116,105,110,103,115,10,32,32,45,101,32,32,34,99,111,109,109,97,110,100,49,59,32,99,111,109,109,97,110,100,50,59,32,46,46,46,34,10,103,110,117,112,108,111,116,32,37,115,32,112,97,116,99,104,108,101,118,101,108,32,37,115,10,0,0,0,0,0,0,0,92,110,101,119,114,103,98,99,111,108,111,114,123,80,83,84,64,67,79,76,79,82,37,100,125,123,37,103,32,37,103,32,37,103,125,10,0,0,0,0,102,105,116,32,112,97,114,97,109,0,0,0,0,0,0,0,32,40,102,105,120,109,97,120,41,0,0,0,0,0,0,0,112,101,114,109,95,97,116,0,92,110,101,119,103,114,97,121,123,80,83,84,64,67,79,76,79,82,37,100,125,123,37,103,125,10,0,0,0,0,0,0,32,40,102,105,120,109,105,110,41,0,0,0,0,0,0,0,112,115,116,114,105,99,107,115,58,32,80,97,108,101,116,116,101,32,117,115,101,100,32,98,101,102,111,114,101,32,115,101,116,33,10,0,0,0,0,0,97,114,103,0,0,0,0,0,32,40,109,97,120,41,0,0,101,120,112,101,99,116,105,110,103,32,60,121,111,102,102,115,101,116,62,0,0,0,0,0,40,37,46,52,103,44,37,46,52,103,41,0,0,0,0,0,99,117,109,36,117,108,97,116,105,118,101,0,0,0,0,0,109,101,97,110,0,0,0,0,109,111,117,115,101,46,99,0,103,110,117,112,108,111,116,62,32,0,0,0,0,0,0,0,32,40,109,105,110,41,0,0,111,110,32,98,111,114,100,101,114,0,0,0,0,0,0,0,108,102,0,0,0,0,0,0,92,112,111,108,121,112,109,73,73,73,100,123,37,100,125,0,9,37,115,58,32,37,115,37,115,37,115,37,115,37,115,44,32,0,0,0,0,0,0,0,98,111,120,101,114,114,111,114,98,97,114,115,10,0,0,0,78,111,32,117,115,97,98,108,101,32,100,97,116,97,32,105,110,32,116,104,105,115,32,112,108,111,116,32,116,111,32,97,117,116,111,45,115,99,97,108,101,32,97,120,105,115,32,114,97,110,103,101,0,0,0,0,99,97,108,108,95,97,114,103,99,32,62,61,32,48,32,38,38,32,99,97,108,108,95,97,114,103,99,32,60,61,32,57,0,0,0,0,0,0,0,0,101,108,115,101,32,119,105,116,104,111,117,116,32,105,102,0,78,101,101,100,32,117,115,105,110,103,32,115,112,101,99,32,102,111,114,32,121,32,116,105,109,101,32,100,97,116,97,0,99,111,108,117,109,110,0,0,83,105,110,103,117,108,97,114,32,109,97,116,114,105,120,32,105,110,32,73,110,118,101,114,116,95,82,116,82,0,0,0,99,98,111,120,0,0,0,0,115,112,108,105,110,101,32,104,101,108,112,32,109,97,116,114,105,120,0,0,0,0,0,0,37,37,32,71,78,85,80,76,79,84,58,32,76,97,84,101,88,32,117,115,105,110,103,32,84,69,88,68,82,65,87,32,109,97,99,114,111,115,10,0,75,80,95,83,117,98,116,114,97,99,116,0,0,0,0,0,115,112,114,105,110,116,102,95,115,112,101,99,105,102,105,101,114,58,32,110,111,32,102,111,114,109,97,116,32,115,112,101,99,105,102,105,101,114,10,0,9,97,117,116,111,115,99,97,108,105,110,103,32,105,115,32,0,0,0,0,0,0,0,0,92,101,110,100,123,116,101,120,100,114,97,119,125,10,0,0,114,97,110,103,101,32,115,112,101,99,105,102,105,101,114,115,32,111,102,32,115,117,109,32,109,117,115,116,32,104,97,118,101,32,105,110,116,101,103,101,114,32,118,97,108,117,101,115,0,0,0,0,0,0,0,0,9,101,114,114,111,114,115,32,97,114,101,32,112,108,111,116,116,101,100,32,119,105,116,104,111,117,116,32,98,97,114,115,10,0,0,0,0,0,0,0,40,37,100,32,37,100,41,0,9,101,114,114,111,114,98,97,114,115,32,97,114,101,32,112,108,111,116,116,101,100,32,105,110,32,37,115,32,119,105,116,104,32,98,97,114,115,32,111,102,32,115,105,122,101,32,37,102,10,0,0,0,0,0,0,10,92,99,112,97,116,104,32,0,0,0,0,0,0,0,0,9,98,111,114,100,101,114,32,37,100,32,105,115,32,100,114,97,119,110,32,105,110,32,37,115,32,111,102,32,116,104,101,32,112,108,111,116,32,101,108,101,109,101,110,116,115,32,119,105,116,104,10,9,32,0,0,51,120,45,50,0,0,0,0,92,112,97,116,104,32,40,37,100,32,37,100,41,0,0,0,9,98,111,114,100,101,114,32,105,115,32,110,111,116,32,100,114,97,119,110,10,0,0,0,92,108,105,110,101,119,100,32,37,100,10,0,0,0,0,0,78,101,101,100,32,118,105,97,32,97,110,100,32,101,105,116,104,101,114,32,112,97,114,97,109,101,116,101,114,32,108,105,115,116,32,111,114,32,102,105,108,101,0,0,0,0,0,0,114,101,108,97,116,105,118,101,0,0,0,0,0,0,0,0,92,37,99,116,101,120,116,123,37,115,125,10,0,0,0,0,97,98,115,111,108,117,116,101,0,0,0,0,0,0,0,0,92,116,101,120,116,114,101,102,32,104,58,82,32,118,58,67,32,0,0,0,0,0,0,0,105,109,97,103,0,0,0,0,9,98,111,120,119,105,100,116,104,32,105,115,32,37,103,32,37,115,10,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,60,121,115,99,97,108,101,62,0,0,0,0,0,0,92,116,101,120,116,114,101,102,32,104,58,76,32,118,58,67,32,0,0,0,0,0,0,0,102,36,114,101,113,117,101,110,99,121,0,0,0,0,0,0,37,115,37,115,9,37,102,10,0,0,0,0,0,0,0,0,9,98,111,120,119,105,100,116,104,32,105,115,32,97,117,116,111,10,0,0,0,0,0,0,32,97,110,100,32,109,105,114,114,111,114,101,100,32,37,115,0,0,0,0,0,0,0,0,100,111,117,98,108,101,0,0,92,109,111,118,101,32,40,37,100,32,37,100,41,0,0,0,115,99,36,97,108,101,0,0,9,110,111,116,32,100,114,97,119,105,110,103,32,108,105,110,101,115,32,98,101,116,119,101,101,110,32,116,119,111,32,111,117,116,114,97,110,103,101,32,112,111,105,110,116,115,10,0,87,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,99,111,108,117,109,110,115,32,105,110,32,105,110,112,117,116,32,100,97,116,97,32,45,32,108,105,110,101,32,37,100,0,73,110,118,97,108,105,100,32,123,101,108,115,101,45,99,108,97,117,115,101,125,0,0,0,119,111,114,100,115,0,0,0,92,102,99,105,114,32,102,58,48,46,57,32,114,58,49,54,0,0,0,0,0,0,0,0,75,80,95,83,101,112,97,114,97,116,111,114,0,0,0,0,115,112,114,105,110,116,102,95,115,112,101,99,105,102,105,101,114,58,32,117,115,101,100,32,119,105,116,104,32,105,110,118,97,108,105,100,32,102,111,114,109,97,116,32,115,112,101,99,105,102,105,101,114,10,0,0,9,100,114,97,119,105,110,103,32,97,110,100,32,99,108,105,112,112,105,110,103,32,108,105,110,101,115,32,98,101,116,119,101,101,110,32,116,119,111,32,111,117,116,114,97,110,103,101,32,112,111,105,110,116,115,10,0,0,0,0,0,0,0,0,92,102,99,105,114,32,102,58,48,46,57,32,114,58,49,50,0,0,0,0,0,0,0,0,9,110,111,116,32,100,114,97,119,105,110,103,32,108,105,110,101,115,32,98,101,116,119,101,101,110,32,105,110,114,97,110,103,101,32,97,110,100,32,111,117,116,114,97,110,103,101,32,112,111,105,110,116,115,10,0,92,102,99,105,114,32,102,58,48,46,57,32,114,58,57,0,9,100,114,97,119,105,110,103,32,97,110,100,32,99,108,105,112,112,105,110,103,32,108,105,110,101,115,32,98,101,116,119,101,101,110,32,105,110,114,97,110,103,101,32,97,110,100,32,111,117,116,114,97,110,103,101,32,112,111,105,110,116,115,10,0,0,0,0,0,0,0,0,92,108,99,105,114,32,114,58,49,54,0,0,0,0,0,0,9,112,111,105,110,116,32,99,108,105,112,32,105,115,32,37,115,10,0,0,0,0,0,0,51,32,109,117,108,32,50,32,115,117,98,0,0,0,0,0,92,108,99,105,114,32,114,58,49,50,0,0,0,0,0,0,9,99,111,110,116,111,117,114,32,108,105,110,101,32,116,121,112,101,115,32,97,114,101,32,97,108,108,32,116,104,101,32,115,97,109,101,10,0,0,0,92,108,99,105,114,32,114,58,57,0,0,0,0,0,0,0,118,105,97,0,0,0,0,0,9,99,111,110,116,111,117,114,32,108,105,110,101,32,116,121,112,101,115,32,97,114,101,32,118,97,114,105,101,100,32,38,32,108,97,98,101,108,101,100,32,119,105,116,104,32,102,111,114,109,97,116,32,39,37,115,39,10,0,0,0,0,0,0,92,104,116,101,120,116,123,36,92,115,116,97,114,36,125,0,9,9,37,100,32,105,110,99,114,101,109,101,110,116,97,108,32,108,101,118,101,108,115,32,115,116,97,114,116,105,110,103,32,97,116,32,37,103,44,32,115,116,101,112,32,37,103,44,32,101,110,100,32,37,103,10,0,0,0,0,0,0,0,0,92,104,116,101,120,116,123,36,92,116,114,105,97,110,103,108,101,36,125,0,0,0,0,0,98,101,108,111,119,0,0,0,114,101,97,108,0,0,0,0,44,37,103,32,0,0,0,0,111,110,108,121,32,118,97,108,105,100,32,97,115,32,112,97,114,116,32,111,102,32,97,110,32,97,117,116,111,45,108,97,121,111,117,116,32,99,111,109,109,97,110,100,0,0,0,0,92,104,116,101,120,116,123,36,92,116,105,109,101,115,36,125,0,0,0,0,0,0,0,0,97,98,111,118,101,0,0,0,117,36,110,105,113,117,101,0,37,49,49,46,53,101,0,0,111,110,32,97,120,105,115,0,102,0,0,0,0,0,0,0,92,114,109,111,118,101,40,48,32,52,41,92,104,116,101,120,116,123,36,92,66,111,120,36,125,0,0,0,0,0,0,0,111,117,116,36,119,97,114,100,115,0,0,0,0,0,0,0,9,9,37,100,32,100,105,115,99,114,101,116,101,32,108,101,118,101,108,115,32,97,116,32,0,0,0,0,0,0,0,0,100,97,116,97,0,0,0,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,85,110,107,110,111,119,110,32,109,97,112,112,105,110,103,32,116,121,112,101,0,0,0,0,79,108,100,45,115,116,121,108,101,32,105,102,47,101,108,115,101,32,115,116,97,116,101,109,101,110,116,32,101,110,99,111,117,110,116,101,114,101,100,32,105,110,115,105,100,101,32,98,114,97,99,107,101,116,115,0,78,101,119,32,104,105,115,116,111,103,114,97,109,0,0,0,115,112,114,105,110,116,102,0,92,104,116,101,120,116,123,36,43,36,125,0,0,0,0,0,75,80,95,65,100,100,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,115,112,114,105,110,116,102,95,115,112,101,99,105,102,105,101,114,32,99,97,108,108,101,100,32,119,105,116,104,111,117,116,32,39,37,39,10,0,0,0,9,9,97,112,112,114,111,120,46,32,37,100,32,97,117,116,111,109,97,116,105,99,32,108,101,118,101,108,115,10,0,0,92,114,109,111,118,101,40,48,32,52,41,92,104,116,101,120,116,123,36,92,68,105,97,109,111,110,100,36,125,0,0,0,121,50,0,0,0,0,0,0,9,9,97,115,32,98,115,112,108,105,110,101,32,97,112,112,114,111,120,105,109,97,116,105,111,110,32,115,101,103,109,101,110,116,115,32,111,102,32,111,114,100,101,114,32,37,100,32,119,105,116,104,32,37,100,32,112,116,115,10,0,0,0,0,92,104,116,101,120,116,123,36,92,99,100,111,116,36,125,0,120,50,0,0,0,0,0,0,9,9,97,115,32,99,117,98,105,99,32,115,112,108,105,110,101,32,105,110,116,101,114,112,111,108,97,116,105,111,110,32,115,101,103,109,101,110,116,115,32,119,105,116,104,32,37,100,32,112,116,115,10,0,0,0,92,116,101,120,116,114,101,102,32,104,58,67,32,118,58,67,32,0,0,0,0,0,0,0,121,49,0,0,0,0,0,0,9,9,97,115,32,108,105,110,101,97,114,32,115,101,103,109,101,110,116,115,10,0,0,0,67,97,110,39,116,32,117,115,101,32,112,109,51,100,32,102,111,114,32,50,100,32,112,108,111,116,115,0,0,0,0,0,51,120,45,49,0,0,0,0,92,109,111,118,101,32,40,37,100,32,37,100,41,10,0,0,120,49,0,0,0,0,0,0,103,114,105,100,32,98,97,115,101,32,97,110,100,32,115,117,114,102,97,99,101,10,0,0,92,109,111,118,101,32,40,37,100,32,37,100,41,92,37,99,118,101,99,32,40,37,100,32,37,100,41,0,0,0,0,0,99,36,108,111,115,101,100,0,102,117,110,99,116,105,111,110,32,117,115,101,100,32,102,111,114,32,102,105,116,116,105,110,103,58,32,37,115,10,0,0,115,117,114,102,97,99,101,10,0,0,0,0,0,0,0,0,10,10,102,111,110,116,95,105,100,101,110,116,105,102,105,101,114,58,61,34,71,78,85,80,76,79,84,34,59,10,102,111,110,116,95,115,105,122,101,32,55,50,112,116,35,59,10,116,104,35,61,48,46,52,112,116,35,59,32,100,101,102,105,110,101,95,119,104,111,108,101,95,112,105,120,101,108,115,40,116,104,41,59,10,10,112,97,116,104,32,97,114,114,111,119,104,101,97,100,59,10,97,114,114,111,119,104,101,97,100,32,61,32,40,45,55,112,116,44,45,50,112,116,41,123,100,105,114,51,48,125,46,46,40,45,54,112,116,44,48,112,116,41,46,46,123,100,105,114,49,53,48,125,40,45,55,112,116,44,50,112,116,41,32,38,10,32,32,40,45,55,112,116,44,50,112,116,41,45,45,40,48,112,116,44,48,112,116,41,45,45,40,45,55,112,116,44,45,50,112,116,41,32,38,32,99,121,99,108,101,59,10,0,0,0,0,101,108,108,36,105,112,115,101,115,0,0,0,0,0,0,0,103,114,105,100,32,98,97,115,101,10,0,0,0,0,0,0,10,100,101,102,32,101,110,100,99,104,97,114,32,61,10,32,32,37,32,78,101,120,116,32,108,105,110,101,32,115,104,111,117,108,100,32,112,114,111,98,97,98,108,121,32,98,101,32,114,101,109,111,118,101,100,32,105,102,32,67,77,32,98,97,115,101,32,105,115,32,117,115,101,100,10,32,32,108,58,61,48,59,32,114,58,61,119,59,10,32,32,37,73,110,99,108,117,100,101,32,116,104,101,32,110,101,120,116,32,116,119,111,32,108,105,110,101,115,32,105,102,32,121,111,117,32,119,97,110,116,32,116,111,10,32,32,37,114,111,116,97,116,101,32,116,104,101,32,112,105,99,116,117,114,101,32,57,48,32,100,101,103,46,40,80,111,114,116,114,97,105,116,32,116,111,32,76,97,110,100,115,99,97,112,101,41,10,32,32,37,99,117,114,114,101,110,116,112,105,99,116,117,114,101,58,61,99,117,114,114,101,110,116,112,105,99,116,117,114,101,32,114,111,116,97,116,101,100,32,57,48,32,115,104,105,102,116,101,100,32,40,104,44,48,41,59,10,32,32,37,116,109,112,58,61,99,104,97,114,104,116,59,32,99,104,97,114,104,116,58,61,99,104,97,114,119,100,59,32,99,104,97,114,119,100,58,61,116,109,112,59,10,32,32,115,99,97,110,116,111,107,101,110,115,32,101,120,116,114,97,95,101,110,100,99,104,97,114,59,10,32,32,105,102,32,112,114,111,111,102,105,110,103,62,48,58,32,109,97,107,101,98,111,120,40,112,114,111,111,102,114,117,108,101,41,59,32,102,105,10,32,32,99,104,97,114,100,120,58,61,119,59,10,32,32,115,104,105,112,105,116,59,10,32,32,105,102,32,100,105,115,112,108,97,121,105,110,103,62,48,58,32,109,97,107,101,98,111,120,40,115,99,114,101,101,110,114,117,108,101,41,59,32,115,104,111,119,105,116,59,32,102,105,10,32,32,101,110,100,103,114,111,117,112,32,10,101,110,100,100,101,102,59,10,108,101,116,32,101,110,100,99,104,97,114,95,32,61,32,101,110,100,99,104,97,114,59,10,108,101,116,32,103,101,110,101,114,97,116,101,32,61,32,105,110,112,117,116,59,10,108,101,116,32,114,111,109,97,110,32,61,32,114,111,109,97,110,59,10,0,99,105,114,36,99,108,101,115,0,0,0,0,0,0,0,0,51,100,112,108,111,116,0,0,116,105,109,101,99,111,108,117,109,110,0,0,0,0,0,0,32,105,110,32,37,100,32,108,101,118,101,108,115,32,111,110,32,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,60,110,117,109,95,99,111,108,115,62,0,0,0,0,10,99,109,99,104,97,114,32,34,80,101,114,105,111,100,34,59,10,32,32,110,117,109,101,114,105,99,32,100,111,116,95,100,105,97,109,35,59,32,100,111,116,95,100,105,97,109,35,58,61,105,102,32,109,111,110,111,115,112,97,99,101,58,32,53,47,52,32,102,105,92,32,100,111,116,95,115,105,122,101,35,59,10,32,32,100,101,102,105,110,101,95,119,104,111,108,101,95,98,108,97,99,107,101,114,95,112,105,120,101,108,115,40,100,111,116,95,100,105,97,109,41,59,10,32,32,98,101,103,105,110,99,104,97,114,40,34,46,34,44,53,117,35,44,100,111,116,95,100,105,97,109,35,44,48,41,59,10,32,32,97,100,106,117,115,116,95,102,105,116,40,48,44,48,41,59,32,112,105,99,107,117,112,32,102,105,110,101,46,110,105,98,59,10,32,32,112,111,115,49,40,100,111,116,95,100,105,97,109,44,48,41,59,32,112,111,115,50,40,100,111,116,95,100,105,97,109,44,57,48,41,59,10,32,32,108,102,116,32,120,49,108,61,104,114,111,117,110,100,40,46,53,119,45,46,53,100,111,116,95,100,105,97,109,41,59,32,98,111,116,32,121,50,108,61,48,59,32,122,49,61,122,50,59,32,100,111,116,40,49,44,50,41,59,9,37,32,100,111,116,10,32,32,112,101,110,108,97,98,101,108,115,40,49,44,50,41,59,10,101,110,100,99,104,97,114,59,10,0,0,0,0,0,0,0,0,114,103,98,97,36,108,112,104,97,0,0,0,0,0,0,0,115,36,98,101,122,105,101,114,0,0,0,0,0,0,0,0,37,49,49,46,52,102,0,0,110,111,116,32,100,114,97,119,110,10,0,0,0,0,0,0,79,70,70,10,0,0,0,0,102,108,111,97,116,0,0,0,105,110,112,117,116,32,99,109,114,49,48,46,109,102,10,105,102,32,108,105,103,115,62,49,58,32,102,111,110,116,95,99,111,100,105,110,103,95,115,99,104,101,109,101,58,61,34,84,101,88,32,116,101,120,116,34,59,10,32,32,115,112,97,110,105,115,104,95,115,104,114,105,101,107,61,111,99,116,34,48,55,52,34,59,32,115,112,97,110,105,115,104,95,113,117,101,114,121,61,111,99,116,34,48,55,54,34,59,10,101,108,115,101,58,32,102,111,110,116,95,99,111,100,105,110,103,95,115,99,104,101,109,101,58,61,10,32,32,105,102,32,108,105,103,115,61,48,58,32,34,84,101,88,32,116,121,112,101,119,114,105,116,101,114,32,116,101,120,116,34,10,32,32,101,108,115,101,58,32,34,84,101,88,32,116,101,120,116,32,119,105,116,104,111,117,116,32,102,45,108,105,103,97,116,117,114,101,115,34,32,102,105,59,10,32,32,115,112,97,110,105,115,104,95,115,104,114,105,101,107,61,111,99,116,34,48,49,54,34,59,32,115,112,97,110,105,115,104,95,113,117,101,114,121,61,111,99,116,34,48,49,55,34,59,32,102,105,10,102,111,110,116,95,115,101,116,117,112,59,10,105,110,112,117,116,32,114,111,109,97,110,117,46,109,102,32,37,82,111,109,97,110,32,117,112,112,101,114,99,97,115,101,46,10,105,110,112,117,116,32,114,111,109,97,110,108,46,109,102,32,37,82,111,109,97,110,32,108,111,119,101,114,99,97,115,101,46,10,105,110,112,117,116,32,103,114,101,101,107,117,46,109,102,32,37,71,114,101,101,107,32,117,112,112,101,114,99,97,115,101,46,10,105,110,112,117,116,32,114,111,109,97,110,100,46,109,102,32,37,78,117,109,101,114,97,108,115,46,10,105,110,112,117,116,32,114,111,109,97,110,112,46,109,102,32,37,65,109,112,101,114,115,97,110,100,44,32,113,117,101,115,116,105,111,110,32,109,97,114,107,115,44,32,99,117,114,114,101,110,99,121,32,115,105,103,110,46,10,105,110,112,117,116,32,114,111,109,115,112,108,46,109,102,32,37,76,111,119,101,114,99,97,115,101,32,115,112,101,99,105,97,108,115,32,40,100,111,116,108,101,115,115,32,92,105,44,32,108,105,103,97,116,117,114,101,32,92,97,101,44,32,101,116,99,46,41,10,105,110,112,117,116,32,114,111,109,115,112,117,46,109,102,32,37,85,112,112,101,114,99,97,115,101,32,115,112,101,99,105,97,108,115,32,40,92,65,69,44,32,92,79,69,44,32,92,79,41,10,105,110,112,117,116,32,112,117,110,99,116,46,109,102,32,37,80,117,110,99,116,117,97,116,105,111,110,32,115,121,109,98,111,108,115,46,10,10,109,105,110,117,115,61,65,83,67,73,73,34,45,34,59,32,99,109,99,104,97,114,32,34,77,105,110,117,115,32,115,105,103,110,34,59,10,32,98,101,103,105,110,97,114,105,116,104,99,104,97,114,40,109,105,110,117,115,41,59,32,10,32,32,112,105,99,107,117,112,32,114,117,108,101,46,110,105,98,59,10,32,32,108,102,116,32,120,49,61,104,114,111,117,110,100,32,49,46,53,117,45,101,112,115,59,10,32,32,120,50,61,119,45,120,49,59,32,121,49,61,121,50,61,109,97,116,104,95,97,120,105,115,59,10,32,32,100,114,97,119,32,122,49,45,45,122,50,59,9,32,37,32,98,97,114,10,32,32,108,97,98,101,108,115,40,49,44,50,41,59,32,10,101,110,100,99,104,97,114,59,10,0,0,0,0,0,0,0,0,114,103,98,105,109,97,36,103,101,0,0,0,0,0,0,0,105,110,36,119,97,114,100,115,0,0,0,0,0,0,0,0,9,99,111,110,116,111,117,114,32,102,111,114,32,115,117,114,102,97,99,101,115,32,97,114,101,32,37,115,0,0,0,0,102,105,108,108,101,100,99,117,114,118,101,115,32,0,0,0,78,101,101,100,32,50,32,111,114,32,51,32,99,111,108,117,109,110,115,0,0,0,0,0,99,108,97,117,115,101,0,0,76,111,103,32,115,99,97,108,101,32,111,110,32,89,32,105,115,32,105,110,99,111,109,112,97,116,105,98,108,101,32,119,105,116,104,32,115,116,97,99,107,101,100,32,104,105,115,116,111,103,114,97,109,32,112,108,111,116,10,0,0,0,0,0,80,111,115,105,116,105,118,101,32,105,110,116,101,103,101,114,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,0,10,100,101,102,32,101,110,100,99,104,97,114,32,61,10,32,32,114,91,99,104,97,114,99,111,100,101,93,58,61,99,117,114,114,101,110,116,112,105,99,116,117,114,101,59,10,32,32,119,100,91,99,104,97,114,99,111,100,101,93,58,61,119,59,104,116,91,99,104,97,114,99,111,100,101,93,58,61,104,59,100,112,91,99,104,97,114,99,111,100,101,93,58,61,100,59,10,32,32,109,101,115,115,97,103,101,32,34,80,105,99,116,117,114,101,32,111,102,32,99,104,97,114,99,111,100,101,32,110,111,46,34,32,38,32,100,101,99,105,109,97,108,32,99,104,97,114,99,111,100,101,59,10,32,32,101,110,100,103,114,111,117,112,59,10,101,110,100,100,101,102,59,10,108,101,116,32,101,110,100,99,104,97,114,95,32,61,32,101,110,100,99,104,97,114,59,10,108,101,116,32,103,101,110,101,114,97,116,101,32,61,32,114,101,108,97,120,59,10,108,101,116,32,114,111,109,97,110,32,61,32,114,101,108,97,120,59,10,0,0,105,109,97,36,103,101,0,0,75,80,95,77,117,108,116,105,112,108,121,0,0,0,0,0,118,97,114,36,105,97,98,108,101,0,0,0,0,0,0,0,97,116,116,101,109,112,116,32,116,111,32,97,115,115,105,103,110,32,116,111,32,115,111,109,101,116,104,105,110,103,32,111,116,104,101,114,32,116,104,97,110,32,97,32,110,97,109,101,100,32,118,97,114,105,97,98,108,101,0,0,0,0,0,0,9,100,97,116,97,32,103,114,105,100,51,100,32,105,115,32,100,105,115,97,98,108,101,100,10,0,0,0,0,0,0,0,10,100,101,102,32,112,117,116,95,116,101,120,116,40,101,120,112,114,32,116,115,44,120,115,116,97,114,116,44,121,115,116,97,114,116,44,114,111,116,44,106,117,115,116,105,102,105,99,97,116,105,111,110,41,32,61,10,32,32,98,101,103,105,110,103,114,111,117,112,10,32,32,32,32,116,101,120,116,95,119,105,100,116,104,58,61,48,59,116,101,120,116,95,104,101,105,103,104,116,58,61,48,59,116,101,120,116,95,100,101,112,116,104,58,61,48,59,10,32,32,32,32,102,111,114,32,105,110,100,58,61,48,32,115,116,101,112,32,49,32,117,110,116,105,108,32,108,101,110,103,116,104,40,116,115,41,45,49,58,10,32,32,32,32,32,32,100,101,99,95,110,117,109,58,61,65,83,67,73,73,32,115,117,98,115,116,114,105,110,103,32,40,105,110,100,44,105,110,100,43,49,41,32,111,102,32,116,115,59,10,32,32,32,32,32,32,105,102,32,117,110,107,110,111,119,110,32,114,91,100,101,99,95,110,117,109,93,58,32,100,101,99,95,110,117,109,58,61,51,50,59,32,102,105,10,32,32,32,32,32,32,105,102,32,100,101,99,95,110,117,109,61,51,50,58,32,10,32,32,32,32,32,32,32,32,116,101,120,116,95,119,105,100,116,104,58,61,116,101,120,116,95,119,105,100,116,104,43,119,100,91,54,53,93,59,10,32,32,32,32,32,32,32,32,116,101,120,116,95,104,101,105,103,104,116,58,61,109,97,120,40,116,101,120,116,95,104,101,105,103,104,116,44,104,116,91,54,53,93,41,59,10,32,32,32,32,32,32,32,32,116,101,120,116,95,100,101,112,116,104,58,61,109,97,120,40,116,101,120,116,95,100,101,112,116,104,44,100,112,91,54,53,93,41,59,10,32,32,32,32,32,32,101,108,115,101,105,102,32,100,101,99,95,110,117,109,62,61,48,58,32,10,32,32,32,32,32,32,32,32,116,101,120,116,95,119,105,100,116,104,58,61,116,101,120,116,95,119,105,100,116,104,43,119,100,91,100,101,99,95,110,117,109,93,59,10,32,32,32,32,32,32,32,32,116,101,120,116,95,104,101,105,103,104,116,58,61,109,97,120,40,116,101,120,116,95,104,101,105,103,104,116,44,104,116,91,100,101,99,95,110,117,109,93,41,59,10,32,32,32,32,32,32,32,32,116,101,120,116,95,100,101,112,116,104,58,61,109,97,120,40,116,101,120,116,95,100,101,112,116,104,44,100,112,91,100,101,99,95,110,117,109,93,41,59,10,32,32,32,32,32,32,102,105,10,32,32,32,32,101,110,100,102,111,114,10,32,32,32,32,105,102,32,114,111,116,61,57,48,58,10,32,32,32,32,32,32,105,102,32,106,117,115,116,105,102,105,99,97,116,105,111,110,61,49,58,32,121,110,101,120,116,58,61,121,115,116,97,114,116,59,10,32,32,32,32,32,32,101,108,115,101,105,102,32,106,117,115,116,105,102,105,99,97,116,105,111,110,61,50,58,32,121,110,101,120,116,58,61,114,111,117,110,100,40,121,115,116,97,114,116,45,116,101,120,116,95,119,105,100,116,104,47,50,41,59,10,32,32,32,32,32,32,101,108,115,101,58,32,121,110,101,120,116,58,61,114,111,117,110,100,40,121,115,116,97,114,116,45,116,101,120,116,95,119,105,100,116,104,41,59,10,32,32,32,32,32,32,102,105,10,32,32,32,32,32,32,120,110,101,120,116,58,61,120,115,116,97,114,116,43,40,116,101,120,116,95,104,101,105,103,104,116,45,116,101,120,116,95,100,101,112,116,104,41,47,50,59,10,32,32,32,32,101,108,115,101,58,10,32,32,32,32,32,32,105,102,32,106,117,115,116,105,102,105,99,97,116,105,111,110,61,49,58,32,120,110,101,120,116,58,61,120,115,116,97,114,116,59,10,32,32,32,32,32,32,101,108,115,101,105,102,32,106,117,115,116,105,102,105,99,97,116,105,111,110,61,50,58,32,120,110,101,120,116,58,61,114,111,117,110,100,40,120,115,116,97,114,116,45,116,101,120,116,95,119,105,100,116,104,47,50,41,59,10,32,32,32,32,32,32,101,108,115,101,58,32,120,110,101,120,116,58,61,114,111,117,110,100,40,120,115,116,97,114,116,45,116,101,120,116,95,119,105,100,116,104,41,59,10,32,32,32,32,32,32,102,105,10,32,32,32,32,32,32,121,110,101,120,116,58,61,121,115,116,97,114,116,45,40,116,101,120,116,95,104,101,105,103,104,116,45,116,101,120,116,95,100,101,112,116,104,41,47,50,59,10,32,32,32,32,102,105,10,32,32,32,32,102,111,114,32,105,110,100,58,61,48,32,115,116,101,112,32,49,32,117,110,116,105,108,32,108,101,110,103,116,104,40,116,115,41,45,49,58,10,32,32,32,32,32,32,100,101,99,95,110,117,109,58,61,65,83,67,73,73,32,115,117,98,115,116,114,105,110,103,32,40,105,110,100,44,105,110,100,43,49,41,32,111,102,32,116,115,59,10,32,32,32,32,32,32,105,102,32,117,110,107,110,111,119,110,32,114,91,100,101,99,95,110,117,109,93,58,32,100,101,99,95,110,117,109,58,61,51,50,59,32,102,105,10,32,32,32,32,32,32,105,102,32,100,101,99,95,110,117,109,61,51,50,58,32,10,32,32,32,32,32,32,32,32,120,110,101,120,116,58,61,120,110,101,120,116,43,119,100,91,54,53,93,42,99,111,115,100,32,114,111,116,59,10,32,32,32,32,32,32,32,32,121,110,101,120,116,58,61,121,110,101,120,116,43,119,100,91,54,53,93,42,115,105,110,100,32,114,111,116,59,10,32,32,32,32,32,32,101,108,115,101,105,102,32,100,101,99,95,110,117,109,62,61,48,58,32,10,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,112,105,99,116,117,114,101,58,61,99,117,114,114,101,110,116,112,105,99,116,117,114,101,43,114,91,100,101,99,95,110,117,109,93,32,115,104,105,102,116,101,100,40,120,110,101,120,116,44,121,110,101,120,116,41,10,32,32,32,32,32,32,32,32,32,32,114,111,116,97,116,101,100,97,114,111,117,110,100,32,40,40,120,110,101,120,116,44,121,110,101,120,116,41,44,114,111,116,41,59,32,10,32,32,32,32,32,32,32,32,120,110,101,120,116,58,61,120,110,101,120,116,43,119,100,91,100,101,99,95,110,117,109,93,42,99,111,115,100,32,114,111,116,59,10,32,32,32,32,32,32,32,32,121,110,101,120,116,58,61]) -.concat([121,110,101,120,116,43,119,100,91,100,101,99,95,110,117,109,93,42,115,105,110,100,32,114,111,116,59,10,32,32,32,32,32,32,102,105,10,32,32,32,32,101,110,100,102,111,114,10,32,32,101,110,100,103,114,111,117,112,32,10,101,110,100,100,101,102,59,10,0,0,0,0,108,97,98,101,108,115,0,0,44,32,107,100,101,110,115,105,116,121,50,100,32,109,111,100,101,0,0,0,0,0,0,0,99,111,108,111,114,32,97,120,105,115,0,0,0,0,0,0,10,37,73,110,99,108,117,100,101,32,110,101,120,116,32,101,105,103,104,116,32,108,105,110,101,115,32,105,102,32,121,111,117,32,104,97,118,101,32,112,114,111,98,108,101,109,115,32,119,105,116,104,32,116,104,101,32,109,111,100,101,32,111,110,32,121,111,117,114,32,115,121,115,116,101,109,46,46,10,37,112,114,111,111,102,105,110,103,58,61,48,59,10,37,102,111,110,116,109,97,107,105,110,103,58,61,49,59,10,37,116,114,97,99,105,110,103,116,105,116,108,101,115,58,61,48,59,10,37,112,105,120,101,108,115,95,112,101,114,95,105,110,99,104,58,61,51,48,48,59,10,37,98,108,97,99,107,101,114,58,61,48,59,10,37,102,105,108,108,105,110,58,61,46,50,59,10,37,111,95,99,111,114,114,101,99,116,105,111,110,58,61,46,54,59,10,37,102,105,120,95,117,110,105,116,115,59,10,0,0,0,0,0,0,0,0,99,97,110,36,100,108,101,115,116,105,99,107,115,0,0,0,9,100,97,116,97,32,103,114,105,100,51,100,32,105,115,32,101,110,97,98,108,101,100,32,102,111,114,32,109,101,115,104,32,111,102,32,115,105,122,101,32,37,100,120,37,100,44,32,107,101,114,110,101,108,61,37,115,44,10,9,115,99,97,108,101,32,102,97,99,116,111,114,115,32,120,61,37,102,44,32,121,61,37,102,37,115,10,0,105,102,32,117,110,107,110,111,119,110,32,99,109,98,97,115,101,58,32,105,110,112,117,116,32,99,109,98,97,115,101,32,102,105,10,10,116,114,97,99,105,110,103,115,116,97,116,115,58,61,49,59,10,112,105,99,116,117,114,101,32,114,91,93,59,10,10,100,101,102,32,111,112,101,110,105,116,32,61,32,111,112,101,110,119,105,110,100,111,119,32,99,117,114,114,101,110,116,119,105,110,100,111,119,10,32,32,102,114,111,109,32,40,48,44,48,41,32,116,111,32,40,52,48,48,44,56,48,48,41,32,97,116,32,40,45,53,48,44,53,48,48,41,32,101,110,100,100,101,102,59,10,10,109,111,100,101,95,115,101,116,117,112,59,10,0,0,0,102,105,110,36,97,110,99,101,98,97,114,115,0,0,0,0,9,100,97,116,97,32,103,114,105,100,51,100,32,105,115,32,101,110,97,98,108,101,100,32,102,111,114,32,109,101,115,104,32,111,102,32,115,105,122,101,32,37,100,120,37,100,44,32,115,112,108,105,110,101,115,10,0,0,0,0,0,0,0,0,51,32,109,117,108,32,49,32,115,117,98,0,0,0,0,0,101,110,100,99,104,97,114,59,10,0,0,0,0,0,0,0,118,101,99,36,116,111,114,115,0,0,0,0,0,0,0,0,9,100,97,116,97,32,103,114,105,100,51,100,32,105,115,32,101,110,97,98,108,101,100,32,102,111,114,32,109,101,115,104,32,111,102,32,115,105,122,101,32,37,100,120,37,100,44,32,110,111,114,109,61,37,100,10,0,0,0,0,0,0,0,0,68,97,109,97,103,101,100,32,69,68,70,32,104,101,97,100,101,114,32,111,102,32,37,115,58,32,110,111,116,32,109,117,108,116,105,112,108,101,32,111,102,32,53,49,50,32,66,46,10,0,0,0,0,0,0,0,97,58,61,119,47,37,100,59,98,58,61,104,47,37,100,59,10,0,0,0,0,0,0,0,104,105,115,36,116,101,112,115,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,114,101,115,105,100,117,97,108,115,32,97,114,101,32,119,101,105,103,104,116,101,100,32,101,113,117,97,108,108,121,32,40,117,110,105,116,32,119,101,105,103,104,116,41,10,10,0,0,9,99,111,109,109,97,110,100,32,108,105,110,101,32,109,97,99,114,111,115,32,119,105,108,108,32,37,115,98,101,32,101,120,112,97,110,100,101,100,10,0,0,0,0,0,0,0,0,65,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,37,115,0,0,0,0,10,10,98,101,103,105,110,99,104,97,114,40,37,100,44,37,103,105,110,35,44,37,103,105,110,35,44,48,41,59,10,0,102,115,36,116,101,112,115,0,99,121,108,105,110,100,114,105,99,97,108,10,0,0,0,0,100,114,97,119,32,40,37,100,97,44,37,100,98,41,45,45,40,37,100,97,44,37,100,98,41,59,10,0,0,0,0,0,102,105,108,108,115,116,36,101,112,115,0,0,0,0,0,0,118,97,108,105,100,0,0,0,115,112,104,101,114,105,99,97,108,10,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,44,32,60,110,117,109,95,99,111,108,115,62,39,0,0,0,0,0,0,0,0,100,114,97,119,100,111,116,32,40,37,100,97,44,37,100,98,41,59,10,0,0,0,0,0,115,116,36,101,112,115,0,0,99,36,115,112,108,105,110,101,115,0,0,0,0,0,0,0,32,32,83,117,109,32,120,121,58,32,32,32,32,32,32,32,37,46,52,103,10,0,0,0,99,97,114,116,101,115,105,97,110,10,0,0,0,0,0,0,9,37,115,45,97,120,105,115,32,116,105,99,115,58,9,0,108,117,0,0,0,0,0,0,101,114,114,111,114,32,105,110,32,101,100,103,101,51,100,95,105,110,116,101,114,115,101,99,116,0,0,0,0,0,0,0,112,105,99,107,117,112,32,112,101,110,99,105,114,99,108,101,32,115,99,97,108,101,100,32,37,103,116,104,59,10,0,0,98,111,120,120,36,121,101,114,114,111,114,98,97,114,115,0,110,111,109,105,36,114,114,111,114,0,0,0,0,0,0,0,9,109,97,112,112,105,110,103,32,102,111,114,32,51,45,100,32,100,97,116,97,32,105,115,32,0,0,0,0,0,0,0,104,105,115,116,111,103,114,97,109,115,10,0,0,0,0,0,50,32,99,111,108,117,109,110,115,32,111,110,108,121,32,112,111,115,115,105,98,108,101,32,119,105,116,104,32,101,120,112,108,105,99,105,116,32,112,109,51,100,32,115,116,121,108,101,32,40,108,105,110,101,32,37,100,41,0,0,0,0,0,0,76,111,103,32,115,99,97,108,101,32,111,110,32,88,32,105,115,32,105,110,99,111,109,112,97,116,105,98,108,101,32,119,105,116,104,32,104,105,115,116,111,103,114,97,109,32,112,108,111,116,115,10,0,0,0,0,101,120,112,101,99,116,101,100,32,123,101,108,115,101,45,99,108,97,117,115,101,125,0,0,67,111,108,117,109,110,32,110,117,109,98,101,114,32,101,120,112,101,99,116,101,100,0,0,112,117,116,95,116,101,120,116,40,34,37,115,34,44,37,100,97,44,37,100,98,44,37,100,44,37,100,41,59,10,0,0,98,111,120,101,114,36,114,111,114,98,97,114,115,0,0,0,75,80,95,69,113,117,97,108,0,0,0,0,0,0,0,0,65,116,116,101,109,112,116,32,116,111,32,97,115,115,105,103,110,32,116,111,32,97,32,114,101,97,100,45,111,110,108,121,32,118,97,114,105,97,98,108,101,0,0,0,0,0,0,0,9,100,117,109,109,121,32,118,97,114,105,97,98,108,101,115,32,97,114,101,32,34,37,115,34,32,97,110,100,32,34,37,115,34,10,0,0,0,0,0,102,105,108,108,32,97,114,114,111,119,104,101,97,100,32,114,111,116,97,116,101,100,32,97,110,103,108,101,40,37,100,44,37,100,41,32,115,104,105,102,116,101,100,32,40,37,100,97,44,37,100,98,41,59,10,0,102,105,108,108,101,100,99,36,117,114,118,101,115,0,0,0,9,32,32,37,115,45,97,120,105,115,58,32,34,37,115,34,10,0,0,0,0,0,0,0,39,58,39,32,111,114,32,107,101,121,119,111,114,100,32,39,116,111,39,32,101,120,112,101,99,116,101,100,0,0,0,0,102,111,36,110,116,0,0,0,104,105,115,116,36,111,103,114,97,109,115,0,0,0,0,0,9,116,105,99,32,102,111,114,109,97,116,32,105,115,58,10,0,0,0,0,0,0,0,0,109,97,36,103,110,105,102,105,99,97,116,105,111,110,0,0,98,111,120,101,115,0,0,0,9,37,115,32,97,114,101,32,112,108,111,116,116,101,100,32,119,105,116,104,32,0,0,0,51,120,0,0,0,0,0,0,110,111,112,114,111,36,108,111,103,117,101,115,0,0,0,0,120,121,101,36,114,114,111,114,98,97,114,115,0,0,0,0,32,119,105,116,104,32,98,111,114,100,101,114,32,0,0,0,112,114,111,36,108,111,103,117,101,115,0,0,0,0,0,0,120,101,36,114,114,111,114,98,97,114,115,0,0,0,0,0,32,119,105,116,104,32,110,111,32,98,111,114,100,101,114,10,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,35,100,97,116,97,112,111,105,110,116,115,32,61,32,37,100,10,0,0,0,0,0,0,0,110,111,112,115,36,110,102,115,115,0,0,0,0,0,0,0,101,36,114,114,111,114,98,97,114,115,0,0,0,0,0,0,9,70,105,108,108,32,115,116,121,108,101,32,105,115,32,101,109,112,116,121,0,0,0,0,112,115,110,102,115,115,45,118,36,101,114,115,105,111,110,55,0,0,0,0,0,0,0,0,121,101,36,114,114,111,114,98,97,114,115,0,0,0,0,0,9,70,105,108,108,32,115,116,121,108,101,32,117,115,101,115,32,37,115,32,112,97,116,116,101,114,110,115,32,115,116,97,114,116,105,110,103,32,97,116,32,37,100,0,0,0,0,0,112,115,36,110,102,115,115,0,120,121,101,114,114,111,114,108,36,105,110,101,115,0,0,0,98,36,101,122,105,101,114,0,32,32,67,111,114,114,101,108,97,116,105,111,110,58,32,32,114,32,61,32,37,46,52,103,10,0,0,0,0,0,0,0,116,114,97,110,115,112,97,114,101,110,116,0,0,0,0,0,61,0,0,0,0,0,0,0,79,85,84,0,0,0,0,0,117,108,111,110,103,0,0,0,97,109,36,115,116,101,120,0,120,101,114,114,111,114,108,36,105,110,101,115,0,0,0,0,109,105,36,114,114,111,114,0,9,70,105,108,108,32,115,116,121,108,101,32,117,115,101,115,32,37,115,32,115,111,108,105,100,32,99,111,108,111,117,114,32,119,105,116,104,32,100,101,110,115,105,116,121,32,37,46,51,102,0,0,0,0,0,0,98,111,120,101,115,10,0,0,103,101,116,95,100,97,116,97,58,32,107,101,121,32,116,105,116,108,101,32,110,111,116,32,102,111,117,110,100,32,105,110,32,114,101,113,117,101,115,116,101,100,32,99,111,108,117,109,110,10,0,0,0,0,0,0,84,104,105,115,32,112,108,111,116,32,115,116,121,108,101,32,105,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,32,105,110,32,112,111,108,97,114,32,109,111,100,101,0,0,97,52,36,112,97,112,101,114,0,0,0,0,0,0,0,0,101,114,114,111,114,108,36,105,110,101,115,0,0,0,0,0,75,80,95,68,101,108,101,116,101,0,0,0,0,0,0,0,100,101,102,97,117,108,116,32,108,105,110,101,116,121,112,101,115,10,0,0,0,0,0,0,108,97,36,116,101,120,0,0,121,101,114,114,111,114,108,36,105,110,101,115,0,0,0,0,117,115,101,114,45,100,101,102,105,110,101,100,32,108,105,110,101,32,115,116,121,108,101,115,32,114,97,116,104,101,114,32,116,104,97,110,32,100,101,102,97,117,108,116,32,108,105,110,101,32,116,121,112,101,115,10,0,0,0,0,0,0,0,0,116,36,101,120,0,0,0,0,100,36,111,116,115,0,0,0,9,80,108,111,116,32,108,105,110,101,115,32,105,110,99,114,101,109,101,110,116,32,111,118,101,114,32,0,0,0,0,0,110,36,111,116,101,120,0,0,108,112,0,0,0,0,0,0,102,111,114,116,36,114,97,110,0,0,0,0,0,0,0,0,32,116,101,120,116,99,111,108,111,114,32,108,116,32,37,100,0,0,0,0,0,0,0,0,51,32,109,117,108,0,0,0,115,36,111,108,105,100,0,0,108,105,110,101,115,112,36,111,105,110,116,115,0,0,0,0,32,116,105,116,108,101,32,111,102,102,115,101,116,32,0,0,99,36,111,108,111,117,114,0,78,111,32,100,97,116,97,32,116,111,32,102,105,116,32,0,9,72,105,115,116,111,103,114,97,109,32,115,116,121,108,101,32,105,115,32,99,111,108,117,109,110,115,116,97,99,107,101,100,32,0,0,0,0,0,0,99,36,111,108,111,114,0,0,66,97,100,32,97,98,98,114,101,118,105,97,116,101,100,32,109,111,110,116,104,32,110,97,109,101,0,0,0,0,0,0,105,36,109,112,117,108,115,101,115,0,0,0,0,0,0,0,9,72,105,115,116,111,103,114,97,109,32,115,116,121,108,101,32,105,115,32,114,111,119,115,116,97,99,107,101,100,32,0,109,111,36,110,111,99,104,114,111,109,101,0,0,0,0,0,98,111,120,112,108,111,116,0,115,116,114,99,111,108,0,0,9,72,105,115,116,111,103,114,97,109,32,115,116,121,108,101,32,105,115,32,101,114,114,111,114,98,97,114,115,32,119,105,116,104,32,103,97,112,32,37,100,32,108,119,32,37,103,32,0,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,60,110,117,109,95,99,111,108,115,62,44,60,110,117,109,95,114,111,119,115,62,39,0,0,0,0,0,0,0,112,115,110,115,102,115,115,0,114,101,99,116,36,97,110,103,108,101,0,0,0,0,0,0,97,36,99,115,112,108,105,110,101,115,0,0,0,0,0,0,32,32,76,105,110,101,97,114,32,77,111,100,101,108,58,32,121,32,61,32,37,46,52,103,32,120,32,43,32,37,46,52,103,10,0,0,0,0,0,0,9,72,105,115,116,111,103,114,97,109,32,115,116,121,108,101,32,105,115,32,99,108,117,115,116,101,114,101,100,32,119,105,116,104,32,103,97,112,32,37,100,32,0,0,0,0,0,0,73,78,0,0,0,0,0,0,108,100,0,0,0,0,0,0,112,115,110,115,102,115,115,40,118,55,41,0,0,0,0,0,101,108,108,36,105,112,115,101,0,0,0,0,0,0,0,0,97,114,114,111,119,115,116,121,108,101,32,110,111,116,32,102,111,117,110,100,0,0,0,0,120,121,101,114,114,111,114,98,97,114,115,10,0,0,0,0,101,120,112,101,99,116,105,110,103,32,40,101,120,112,114,101,115,115,105,111,110,41,0,0,39,41,39,32,101,120,112,101,99,116,101,100,0,0,0,0,37,115,32,37,115,32,37,115,116,101,120,37,115,37,115,32,109,97,103,32,37,46,51,102,32,37,115,32,37,115,112,114,111,108,111,103,117,101,115,40,37,100,41,0,0,0,0,0,99,105,114,99,36,108,101,0,75,80,95,80,97,103,101,85,112,0,0,0,0,0,0,0,108,105,110,101,99,36,111,108,111,114,0,0,0,0,0,0,32,40,100,101,102,97,117,108,116,32,108,101,110,103,116,104,32,97,110,100,32,97,110,103,108,101,115,41,10,0,0,0,32,97,109,115,116,101,120,0,104,105,115,116,36,111,103,114,97,109,0,0,0,0,0,0,32,108,101,110,103,116,104,32,37,115,37,103,44,32,97,110,103,108,101,32,37,103,32,100,101,103,0,0,0,0,0,0,115,116,97,114,116,105,110,103,32,114,97,110,103,101,32,118,97,108,117,101,32,111,114,32,39,58,39,32,111,114,32,39,116,111,39,32,101,120,112,101,99,116,101,100,0,0,0,0,32,97,52,112,97,112,101,114,0,0,0,0,0,0,0,0,105,110,99,114,36,101,109,101,110,116,0,0,0,0,0,0,9,32,32,97,114,114,111,119,32,104,101,97,100,115,58,32,37,115,44,32,0,0,0,0,108,97,0,0,0,0,0,0,102,115,0,0,0,0,0,0,32,110,111,104,101,97,100,0,124,99,111,115,40,55,50,48,120,41,124,0,0,0,0,0,9,108,111,97,100,112,97,116,104,32,105,115,32,0,0,0,109,111,110,111,99,104,114,111,109,101,0,0,0,0,0,0,32,111,110,101,32,104,101,97,100,32,0,0,0,0,0,0,99,111,108,111,114,0,0,0,108,36,105,110,101,115,0,0,115,116,114,105,110,103,0,0,37,103,93,10,0,0,0,0,32,98,111,116,104,32,104,101,97,100,115,32,0,0,0,0,98,105,110,100,0,0,0,0,105,108,108,101,103,97,108,32,109,111,110,116,104,0,0,0,37,115,32,37,115,32,37,115,116,101,120,37,115,37,115,32,109,97,103,32,37,46,51,102,32,102,111,110,116,32,34,37,115,44,37,46,50,102,34,32,37,115,112,114,111,108,111,103,117,101,115,40,37,100,41,0,102,36,117,110,99,116,105,111,110,0,0,0,0,0,0,0,9,32,37,115,32,37,115,0,101,120,112,101,99,116,105,110,103,32,102,111,110,116,32,110,97,109,101,0,0,0,0,0,100,36,97,116,97,0,0,0,115,116,114,105,110,103,99,111,108,117,109,110,0,0,0,0,9,97,114,114,111,119,115,116,121,108,101,32,37,100,44,32,0,0,0,0,0,0,0,0,116,111,111,32,109,97,110,121,32,108,97,121,111,117,116,32,99,111,109,109,97,110,100,115,0,0,0,0,0,0,0,0,112,99,114,114,56,114,0,0,103,114,97,121,49,48,48,0,120,50,121,49,0,0,0,0,32,32,76,105,110,101,97,114,32,77,111,100,101,108,58,32,121,32,61,32,37,46,52,103,32,120,32,45,32,37,46,52,103,10,0,0,0,0,0,0,97,112,112,101,97,114,32,105,110,32,116,104,101,32,111,114,100,101,114,32,116,104,101,121,32,119,101,114,101,32,102,111,117,110,100,0,0,0,0,0,9,37,115,45,97,120,105,115,32,116,105,99,115,32,97,114,101,32,37,115,44,32,9,109,97,106,111,114,32,116,105,99,115,99,97,108,101,32,105,115,32,37,103,32,97,110,100,32,109,105,110,111,114,32,116,105,99,115,99,97,108,101,32,105,115,32,37,103,10,0,0,0,108,111,110,103,0,0,0,0,99,109,114,49,48,0,0,0,103,114,97,121,57,48,0,0,97,120,36,105,115,0,0,0,98,101,32,115,111,114,116,101,100,32,97,108,112,104,97,98,101,116,105,99,97,108,108,121,0,0,0,0,0,0,0,0,120,101,114,114,111,114,98,97,114,115,10,0,0,0,0,0,66,97,100,32,100,97,116,97,32,111,110,32,108,105,110,101,32,37,100,32,111,102,32,102,105,108,101,32,37,115,0,0,89,111,117,32,104,97,118,101,32,116,111,32,99,111,109,112,105,108,101,32,103,110,117,112,108,111,116,32,119,105,116,104,32,98,117,105,108,116,105,110,32,114,101,97,100,108,105,110,101,32,111,114,32,71,78,85,32,114,101,97,100,108,105,110,101,32,111,114,32,66,83,68,32,101,100,105,116,108,105,110,101,32,116,111,32,101,110,97,98,108,101,32,104,105,115,116,111,114,121,32,115,117,112,112,111,114,116,46,0,0,0,0,10,100,101,102,32,95,119,99,32,61,32,119,105,116,104,112,101,110,32,99,117,114,114,101,110,116,112,101,110,32,119,105,116,104,99,111,108,111,114,32,99,117,114,114,101,110,116,99,111,108,111,114,32,101,110,100,100,101,102,59,10,100,101,102,32,95,97,99,32,61,32,97,100,100,116,111,32,99,117,114,114,101,110,116,112,105,99,116,117,114,101,32,101,110,100,100,101,102,59,10,100,101,102,32,95,115,109,115,32,61,32,115,99,97,108,101,100,32,109,112,116,32,115,104,105,102,116,101,100,32,101,110,100,100,101,102,59,10,37,32,100,114,97,119,105,110,103,32,112,111,105,110,116,45,116,121,112,101,115,10,100,101,102,32,103,112,100,114,97,119,32,40,101,120,112,114,32,110,44,32,120,44,32,121,41,32,61,10,32,32,105,102,32,110,60,48,58,32,95,97,99,32,99,111,110,116,111,117,114,32,102,117,108,108,99,105,114,99,108,101,32,95,115,109,115,32,40,120,44,121,41,10,32,32,101,108,115,101,105,102,32,40,110,61,49,41,32,111,114,32,40,110,61,51,41,58,10,32,32,32,32,95,97,99,32,100,111,117,98,108,101,112,97,116,104,32,112,116,112,97,116,104,91,110,93,32,95,115,109,115,32,40,120,44,121,41,32,95,119,99,59,10,32,32,32,32,95,97,99,32,100,111,117,98,108,101,112,97,116,104,32,112,116,112,97,116,104,91,110,93,32,114,111,116,97,116,101,100,32,57,48,32,95,115,109,115,32,40,120,44,121,41,32,95,119,99,10,32,32,101,108,115,101,105,102,32,110,60,54,58,32,95,97,99,32,100,111,117,98,108,101,112,97,116,104,32,112,116,112,97,116,104,91,110,93,32,95,115,109,115,32,40,120,44,121,41,32,95,119,99,10,32,32,101,108,115,101,58,32,95,97,99,32,99,111,110,116,111,117,114,32,112,116,112,97,116,104,91,110,93,32,95,115,109,115,32,40,120,44,121,41,32,95,119,99,10,32,32,102,105,10,101,110,100,100,101,102,59,10,10,37,32,116,104,101,32,112,111,105,110,116,32,115,104,97,112,101,115,10,112,97,116,104,32,112,116,112,97,116,104,91,93,59,10,37,100,105,97,109,111,110,100,10,112,116,112,97,116,104,48,32,61,32,112,116,112,97,116,104,54,32,61,32,40,45,49,47,50,44,48,41,45,45,40,48,44,45,49,47,50,41,45,45,40,49,47,50,44,48,41,45,45,40,48,44,49,47,50,41,45,45,99,121,99,108,101,59,10,37,32,112,108,117,115,32,115,105,103,110,10,112,116,112,97,116,104,49,32,61,32,40,45,49,47,50,44,48,41,45,45,40,49,47,50,44,48,41,59,10,37,32,115,113,117,97,114,101,10,112,116,112,97,116,104,50,32,61,32,112,116,112,97,116,104,55,32,61,32,40,45,49,47,50,44,45,49,47,50,41,45,45,40,49,47,50,44,45,49,47,50,41,45,45,40,49,47,50,44,49,47,50,41,45,45,40,45,49,47,50,44,49,47,50,41,45,45,99,121,99,108,101,59,10,37,32,99,114,111,115,115,10,112,116,112,97,116,104,51,32,58,61,32,40,45,49,47,50,44,45,49,47,50,41,45,45,40,49,47,50,44,49,47,50,41,59,10,37,32,99,105,114,99,108,101,58,10,112,116,112,97,116,104,52,32,61,32,112,116,112,97,116,104,56,58,61,32,102,117,108,108,99,105,114,99,108,101,59,10,37,32,116,114,105,97,110,103,108,101,10,112,116,112,97,116,104,53,32,61,32,112,116,112,97,116,104,57,32,58,61,32,40,48,44,49,47,50,41,45,45,40,45,49,47,50,44,45,49,47,50,41,45,45,40,49,47,50,44,45,49,47,50,41,45,45,99,121,99,108,101,59,10,10,100,101,102,32,108,105,110,101,116,121,112,101,32,101,120,112,114,32,110,32,61,10,32,32,99,117,114,114,101,110,116,99,111,108,111,114,58,61,32,105,102,32,99,111,108,111,114,108,105,110,101,115,32,58,32,99,111,108,91,110,93,32,101,108,115,101,58,32,98,108,97,99,107,32,102,105,59,10,32,32,105,102,32,110,32,61,32,45,49,32,58,10,32,32,32,32,32,32,100,114,97,119,111,112,116,105,111,110,115,40,119,105,116,104,99,111,108,111,114,32,99,117,114,114,101,110,116,99,111,108,111,114,32,119,105,116,104,112,101,110,32,40,99,117,114,114,101,110,116,112,101,110,32,115,99,97,108,101,100,32,46,53,41,41,59,10,32,32,101,108,115,101,105,102,32,110,32,60,32,49,32,58,10,32,32,32,32,100,114,97,119,111,112,116,105,111,110,115,40,95,119,99,41,59,10,32,32,101,108,115,101,32,58,10,32,32,32,32,100,114,97,119,111,112,116,105,111,110,115,40,32,105,102,32,100,97,115,104,101,100,108,105,110,101,115,58,32,100,97,115,104,101,100,32,108,116,91,110,93,32,102,105,32,95,119,99,41,59,10,32,32,102,105,10,101,110,100,100,101,102,59,10,10,37,32,100,97,115,104,32,112,97,116,116,101,114,110,115,10,112,105,99,116,117,114,101,32,108,116,91,93,59,10,108,116,49,61,100,97,115,104,112,97,116,116,101,114,110,40,111,110,32,50,32,111,102,102,32,50,41,59,32,37,32,100,97,115,104,101,115,10,108,116,50,61,100,97,115,104,112,97,116,116,101,114,110,40,111,110,32,50,32,111,102,102,32,50,32,111,110,32,48,46,50,32,111,102,102,32,50,41,59,32,37,100,97,115,104,45,100,111,116,10,108,116,51,61,108,116,49,32,115,99,97,108,101,100,32,49,46,52,49,52,59,10,108,116,52,61,108,116,50,32,115,99,97,108,101,100,32,49,46,52,49,52,59,10,108,116,53,61,108,116,49,32,115,99,97,108,101,100,32,50,59,10,108,116,54,58,61,108,116,50,32,115,99,97,108,101,100,32,50,59,10,108,116,55,61,100,97,115,104,112,97,116,116,101,114,110,40,111,110,32,48,46,50,32,111,102,102,32,50,41,59,32,37,100,111,116,115,10,10,99,111,108,111,114,32,99,111,108,91,93,44,99,121,97,110,44,32,109,97,103,101,110,116,97,44,32,121,101,108,108,111,119,59,10,99,121,97,110,61,98,108,117,101,43,103,114,101,101,110,59,32,109,97,103,101,110,116,97,61,114,101,100,43,98,108,117,101,59,121,101,108,108,111,119,61,103,114,101,101,110,43,114,101,100,59,10,99,111,108,91,45,50,93,58,61,99,111,108,91,45,49,93,58,61,99,111,108,48,58,61,98,108,97,99,107,59,10,99,111,108,49,58,61,114,101,100,59,10,99,111,108,50,58,61,40,46,50,44,46,50,44,49,41,59,32,37,98,108,117,101,10,99,111,108,51,58,61,40,49,44,46,54,54,44,48,41,59,32,37,111,114,97,110,103,101,10,99,111,108,52,58,61,46,56,53,42,103,114,101,101,110,59,10,99,111,108,53,58,61,46,57,42,109,97,103,101,110,116,97,59,10,99,111,108,54,58,61,48,46,56,53,42,99,121,97,110,59,10,99,111,108,55,58,61,46,56,53,42,121,101,108,108,111,119,59,10,10,37,112,108,97,99,105,110,103,32,116,101,120,116,10,112,105,99,116,117,114,101,32,71,80,116,101,120,116,59,10,100,101,102,32,112,117,116,95,116,101,120,116,40,101,120,112,114,32,112,105,99,44,32,120,44,32,121,44,32,114,44,32,106,41,32,61,10,32,32,71,80,116,101,120,116,58,61,109,97,107,101,112,105,99,40,112,105,99,41,59,10,32,32,71,80,116,101,120,116,58,61,71,80,116,101,120,116,32,115,104,105,102,116,101,100,10,32,32,32,32,105,102,32,106,32,61,32,49,58,32,40,45,40,117,108,99,111,114,110,101,114,32,71,80,116,101,120,116,32,43,32,108,108,99,111,114,110,101,114,32,71,80,116,101,120,116,41,47,50,41,10,32,32,32,32,101,108,115,101,105,102,32,106,32,61,32,50,58,32,40,45,99,101,110,116,101,114,32,71,80,116,101,120,116,41,10,32,32,32,32,101,108,115,101,58,32,40,45,40,117,114,99,111,114,110,101,114,32,71,80,116,101,120,116,32,43,32,108,114,99,111,114,110,101,114,32,71,80,116,101,120,116,41,47,50,41,10,32,32,32,32,102,105,10,32,32,32,32,114,111,116,97,116,101,100,32,114,59,10,32,32,97,100,100,116,111,32,99,117,114,114,101,110,116,112,105,99,116,117,114,101,32,97,108,115,111,32,71,80,116,101,120,116,32,115,104,105,102,116,101,100,32,40,120,44,121,41,10,101,110,100,100,101,102,59,10,0,0,0,0,0,0,0,0,103,114,97,121,56,48,0,0,75,80,95,85,112,0,0,0,108,99,0,0,0,0,0,0,69,82,82,78,79,0,0,0,9,102,97,99,116,111,114,32,108,97,98,101,108,115,32,119,105,108,108,32,37,115,10,0,100,97,115,104,101,100,108,105,110,101,115,58,61,116,114,117,101,59,10,0,0,0,0,0,103,114,97,121,55,48,0,0,97,114,101,32,111,102,102,0,100,97,115,104,101,100,108,105,110,101,115,58,61,102,97,108,115,101,59,10,0,0,0,0,103,114,97,121,54,48,0,0,105,115,111,95,56,56,53,57,95,49,53,0,0,0,0,0,97,114,101,32,97,117,116,111,109,97,116,105,99,0,0,0,32,120,108,111,119,32,120,104,105,103,104,0,0,0,0,0,99,111,108,111,114,108,105,110,101,115,58,61,102,97,108,115,101,59,10,0,0,0,0,0,103,114,97,121,53,48,0,0,119,105,108,108,32,98,101,32,112,117,116,32,111,110,32,116,104,101,32,120,50,32,97,120,105,115,0,0,0,0,0,0,55,50,48,32,109,117,108,32,99,111,115,32,97,98,115,0,99,111,108,111,114,108,105,110,101,115,58,61,116,114,117,101,59,10,0,0,0,0,0,0,103,114,97,121,52,48,0,0,112,117,115,104,100,50,0,0,119,105,108,108,32,98,101,32,112,117,116,32,111,110,32,116,104,101,32,120,32,97,120,105,115,0,0,0,0,0,0,0,100,114,111,112,108,97,115,116,95,100,121,110,97,114,114,97,121,58,32,100,121,110,97,114,114,97,121,32,119,97,115,110,39,116,32,105,110,105,116,105,97,108,105,122,101,100,33,0,10,99,111,108,111,114,32,99,117,114,114,101,110,116,99,111,108,111,114,59,32,99,117,114,114,101,110,116,99,111,108,111,114,58,61,98,108,97,99,107,59,10,99,111,108,111,114,32,102,105,108,108,99,111,108,111,114,59,10,98,111,111,108,101,97,110,32,99,111,108,111,114,108,105,110,101,115,44,100,97,115,104,101,100,108,105,110,101,115,59,10,0,0,0,0,0,103,114,97,121,51,48,0,0,9,102,97,99,116,111,114,32,108,97,98,101,108,115,32,37,115,10,0,0,0,0,0,0,92,115,101,116,102,111,110,116,123,37,115,125,123,37,53,46,50,102,125,10,101,116,101,120,10,0,0,0,0,0,0,0,103,114,97,121,50,48,0,0,9,115,101,112,97,114,97,116,105,111,110,32,98,101,116,119,101,101,110,32,98,111,120,112,108,111,116,115,32,105,115,32,37,103,10,0,0,0,0,0,10,37,102,111,110,116,32,99,104,97,110,103,101,115,10,118,101,114,98,97,116,105,109,116,101,120,10,92,100,101,102,92,115,101,116,102,111,110,116,35,49,35,50,123,37,46,10,32,32,92,102,111,110,116,92,103,112,102,111,110,116,61,35,49,32,97,116,32,35,50,112,116,10,92,103,112,102,111,110,116,125,10,0,0,0,0,0,0,103,114,97,121,49,48,0,0,9,111,117,116,108,105,101,114,115,32,119,105,108,108,32,110,111,116,32,98,101,32,100,114,97,119,110,10,0,0,0,0,108,97,121,36,111,117,116,0,10,100,101,102,97,117,108,116,102,111,110,116,58,61,32,34,37,115,34,59,10,100,101,102,97,117,108,116,115,99,97,108,101,32,58,61,32,37,54,46,51,102,47,102,111,110,116,115,105,122,101,32,100,101,102,97,117,108,116,102,111,110,116,59,10,0,0,0,0,0,0,0,103,114,97,121,48,0,0,0,120,49,121,50,0,0,0,0,32,32,77,101,100,105,97,110,58,32,32,32,37,115,32,37,115,32,37,115,10,0,0,0,99,100,0,0,0,0,0,0,9,111,117,116,108,105,101,114,115,32,119,105,108,108,32,98,101,32,100,114,97,119,110,32,117,115,105,110,103,32,112,111,105,110,116,32,116,121,112,101,32,37,100,10,0,0,0,0,46,48,0,0,0,0,0,0,118,97,114,100,101,102,32,109,97,107,101,112,105,99,40,101,120,112,114,32,115,116,114,41,32,61,10,32,32,105,102,32,112,105,99,116,117,114,101,32,115,116,114,32,58,32,115,116,114,32,115,99,97,108,101,100,32,116,101,120,116,109,97,103,10,32,32,37,32,111,116,104,101,114,119,105,115,101,32,97,32,115,116,114,105,110,103,10,32,32,101,108,115,101,58,32,115,116,114,32,105,110,102,111,110,116,32,100,101,102,97,117,108,116,102,111,110,116,32,115,99,97,108,101,100,32,40,100,101,102,97,117,108,116,115,99,97,108,101,42,116,101,120,116,109,97,103,41,10,32,32,102,105,10,101,110,100,100,101,102,59,10,10,100,101,102,32,105,110,102,111,110,116,115,105,122,101,40,101,120,112,114,32,115,116,114,44,32,115,105,122,101,41,32,61,10,32,32,105,110,102,111,110,116,32,115,116,114,32,115,99,97,108,101,100,32,40,115,105,122,101,32,47,32,102,111,110,116,115,105,122,101,32,115,116,114,41,10,101,110,100,100,101,102,59,10,0,0,115,108,97,116,101,103,114,97,121,0,0,0,0,0,0,0,116,36,105,99,115,0,0,0,67,97,110,39,116,32,114,101,97,100,32,100,97,116,97,32,102,105,108,101,0,0,0,0,32,32,98,111,120,32,98,121,32,37,53,46,50,102,32,111,102,32,116,104,101,32,105,110,116,101,114,113,117,97,114,116,105,108,101,32,100,105,115,116,97,110,99,101,10,0,0,0,121,101,114,114,111,114,98,97,114,115,10,0,0,0,0,0,10,116,101,120,116,109,97,103,58,61,37,54,46,51,102,59,10,0,0,0,0,0,0,0,100,97,114,107,45,103,114,97,121,0,0,0,0,0,0,0,75,80,95,72,111,109,101,0,98,103,110,100,0,0,0,0,110,111,110,45,115,116,114,105,110,103,32,97,114,103,117,109,101,110,116,32,116,111,32,115,121,115,116,101,109,40,41,0,32,32,109,101,100,105,97,110,32,116,111,32,105,110,99,108,117,100,101,32,37,53,46,50,102,32,111,102,32,116,104,101,32,112,111,105,110,116,115,10,0,0,0,0,0,0,0,0,10,119,97,114,110,105,110,103,99,104,101,99,107,58,61,48,59,10,100,101,102,97,117,108,116,109,112,116,58,61,109,112,116,58,61,52,59,10,116,104,58,61,46,54,59,10,37,37,32,72,97,118,101,32,110,105,99,101,32,115,104,97,114,112,32,106,111,105,110,115,32,111,110,32,111,117,114,32,108,105,110,101,115,10,108,105,110,101,99,97,112,58,61,98,117,116,116,59,10,108,105,110,101,106,111,105,110,58,61,109,105,116,101,114,101,100,59,10,10,100,101,102,32,115,99,97,108,101,112,101,110,32,101,120,112,114,32,110,32,61,32,112,105,99,107,117,112,32,112,101,110,99,105,114,99,108,101,32,115,99,97,108,101,100,32,40,110,42,116,104,41,32,101,110,100,100,101,102,59,10,100,101,102,32,112,116,115,105,122,101,32,101,120,112,114,32,110,32,61,32,109,112,116,58,61,110,42,100,101,102,97,117,108,116,109,112,116,32,101,110,100,100,101,102,59,10,10,0,0,0,0,0,108,105,103,104,116,45,103,114,101,121,0,0,0,0,0,0,9,98,111,120,112,108,111,116,32,114,97,110,103,101,32,101,120,116,101,110,100,115,32,102,114,111,109,32,116,104,101,32,0,0,0,0,0,0,0,0,85,112,112,101,114,32,98,111,117,110,100,32,111,102,32,99,111,110,115,116,114,97,105,110,116,32,60,32,108,111,119,101,114,32,98,111,117,110,100,58,32,32,84,117,114,110,105,110,103,32,111,102,32,99,111,110,115,116,114,97,105,110,116,115,46,0,0,0,0,0,0,0,92,98,101,103,105,110,123,100,111,99,117,109,101,110,116,125,10,101,116,101,120,10,37,32,69,78,68,80,82,69,10,0,108,105,103,104,116,45,103,114,97,121,0,0,0,0,0,0,98,111,120,32,97,110,100,32,119,104,105,115,107,101,114,0,92,117,115,101,112,97,99,107,97,103,101,91,105,110,116,108,105,109,105,116,115,93,123,97,109,115,109,97,116,104,125,10,92,117,115,101,112,97,99,107,97,103,101,123,97,109,115,102,111,110,116,115,125,10,0,0,103,114,101,101,110,121,101,108,108,111,119,0,0,0,0,0,102,105,110,97,110,99,101,32,98,97,114,0,0,0,0,0,124,115,105,110,40,55,50,48,120,41,124,0,0,0,0,0,92,117,115,101,112,97,99,107,97,103,101,91,108,97,116,105,110,49,93,123,105,110,112,117,116,101,110,99,125,10,92,117,115,101,112,97,99,107,97,103,101,91,84,49,93,123,102,111,110,116,101,110,99,125,10,92,117,115,101,112,97,99,107,97,103,101,123,116,101,120,116,99,111,109,112,125,10,92,117,115,101,112,97,99,107,97,103,101,123,109,97,116,104,112,116,109,120,125,10,92,117,115,101,112,97,99,107,97,103,101,91,115,99,97,108,101,100,61,46,57,50,93,123,104,101,108,118,101,116,125,10,92,117,115,101,112,97,99,107,97,103,101,123,99,111,117,114,105,101,114,125,10,92,117,115,101,112,97,99,107,97,103,101,123,108,97,116,101,120,115,121,109,125,10,0,0,99,104,97,114,116,114,101,117,115,101,0,0,0,0,0,0,9,98,111,120,112,108,111,116,32,114,101,112,114,101,115,101,110,116,97,116,105,111,110,32,105,115,32,37,115,10,0,0,109,117,108,116,105,112,108,111,116,32,109,111,100,101,32,105,115,32,37,115,10,0,0,0,92,117,115,101,112,97,99,107,97,103,101,91,108,97,116,105,110,49,93,123,105,110,112,117,116,101,110,99,125,10,92,117,115,101,112,97,99,107,97,103,101,91,84,49,93,123,102,111,110,116,101,110,99,125,10,92,117,115,101,112,97,99,107,97,103,101,123,116,105,109,101,115,44,109,97,116,104,112,116,109,120,125,10,92,117,115,101,112,97,99,107,97,103,101,123,104,101,108,118,101,116,125,10,92,117,115,101,112,97,99,107,97,103,101,123,99,111,117,114,105,101,114,125,10,0,0,0,0,97,110,116,105,113,117,101,119,104,105,116,101,0,0,0,0,37,103,58,0,0,0,0,0,44,32,102,105,108,108,115,116,121,108,101,0,0,0,0,0,92,100,111,99,117,109,101,110,116,99,108,97,115,115,123,97,114,116,105,99,108,101,125,10,0,0,0,0,0,0,0,0,115,101,97,103,114,101,101,110,0,0,0,0,0,0,0,0,44,32,108,119,32,37,46,49,102,32,0,0,0,0,0,0,92,100,111,99,117,109,101,110,116,99,108,97,115,115,91,97,52,112,97,112,101,114,93,123,97,114,116,105,99,108,101,125,10,0,0,0,0,0,0,0,115,108,97,116,101,103,114,101,121,0,0,0,0,0,0,0,108,116,32,37,100,0,0,0,110,111,101,110,104,36,97,110,99,101,100,0,0,0,0,0,10,37,37,32,65,100,100,32,92,100,111,99,117,109,101,110,116,99,108,97,115,115,32,97,110,100,32,92,98,101,103,105,110,123,100,99,111,117,109,101,110,116,125,32,102,111,114,32,108,97,116,101,120,10,37,37,32,78,66,32,121,111,117,32,115,104,111,117,108,100,32,115,101,116,32,116,104,101,32,101,110,118,105,114,111,110,109,101,110,116,32,118,97,114,105,97,98,108,101,32,84,69,88,32,116,111,32,116,104,101,32,110,97,109,101,32,111,102,32,121,111,117,114,10,37,37,32,108,97,116,101,120,32,101,120,101,99,117,116,97,98,108,101,32,40,110,111,114,109,97,108,108,121,32,108,97,116,101,120,41,32,105,110,111,114,100,101,114,32,102,111,114,32,109,101,116,97,112,111,115,116,32,116,111,32,119,111,114,107,10,37,37,32,111,114,32,114,117,110,10,37,37,32,109,112,111,115,116,32,45,45,116,101,120,61,108,97,116,101,120,32,46,46,46,10,10,37,32,66,69,71,80,82,69,10,118,101,114,98,97,116,105,109,116,101,120,10,0,104,111,110,101,121,100,101,119,0,0,0,0,0,0,0,0,120,50,121,50,0,0,0,0,32,32,81,117,97,114,116,105,108,101,58,32,37,115,32,37,115,32,37,115,10,0,0,0,98,97,99,107,103,114,111,117,110,100,0,0,0,0,0,0,37,46,49,53,103,0,0,0,117,105,110,116,0,0,0,0,112,114,111,108,111,103,117,101,115,58,61,37,100,59,10,0,99,111,109,109,97,110,100,32,115,116,114,105,110,103,0,0,98,105,115,113,117,101,0,0,98,101,104,105,110,100,0,0,120,121,101,114,114,111,114,108,105,110,101,115,10,0,0,0,78,101,101,100,32,50,32,111,114,32,51,32,99,111,108,117,109,110,115,32,102,111,114,32,112,111,108,97,114,32,100,97,116,97,0,0,0,0,0,0,102,105,108,108,36,115,116,121,108,101,0,0,0,0,0,0,69,120,112,101,99,116,101,100,32,99,111,109,109,97,110,100,32,115,116,114,105,110,103,0,97,118,115,0,0,0,0,0,37,37,71,78,85,80,76,79,84,32,77,101,116,97,112,111,115,116,32,111,117,116,112,117,116,58,32,37,115,10,0,0,108,101,109,111,110,99,104,105,102,102,111,110,0,0,0,0,75,80,95,82,105,103,104,116,0,0,0,0,0,0,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,105,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,32,116,121,112,101,0,0,0,9,82,101,99,116,97,110,103,108,101,32,115,116,121,108,101,32,105,115,32,37,115,44,32,102,105,108,108,32,99,111,108,111,114,32,0,0,0,0,0,101,110,100,46,10,0,0,0,107,104,97,107,105,49,0,0,9,67,105,114,99,108,101,32,115,116,121,108,101,32,104,97,115,32,100,101,102,97,117,108,116,32,114,97,100,105,117,115,32,0,0,0,0,0,0,0,110,111,32,117,112,112,101,114,32,98,111,117,110,100,32,99,111,110,115,116,114,97,105,110,116,32,97,108,108,111,119,101,100,32,105,102,32,110,111,116,32,97,117,116,111,115,99,97,108,105,110,103,0,0,0,0,99,111,110,116,111,117,114,32,98,95,115,112,108,105,110,101,0,0,0,0,0,0,0,0,37,32,69,78,68,80,79,83,84,10,0,0,0,0,0,0,112,105,110,107,0,0,0,0,115,101,116,32,116,101,114,109,105,110,97,108,32,117,110,107,110,111,119,110,10,0,0,0,44,32,98,111,116,104,32,100,105,97,109,101,116,101,114,115,32,97,114,101,32,105,110,32,116,104,101,32,115,97,109,101,32,117,110,105,116,115,32,97,115,32,116,104,101,32,121,32,97,120,105,115,10,0,0,0,60,110,111,62,0,0,0,0,101,116,101,120,10,0,0,0,108,105,103,104,116,45,115,97,108,109,111,110,0,0,0,0,44,32,98,111,116,104,32,100,105,97,109,101,116,101,114,115,32,97,114,101,32,105,110,32,116,104,101,32,115,97,109,101,32,117,110,105,116,115,32,97,115,32,116,104,101,32,120,32,97,120,105,115,10,0,0,0,55,50,48,32,109,117,108,32,115,105,110,32,97,98,115,0,32,92,101,110,100,123,100,111,99,117,109,101,110,116,125,10,0,0,0,0,0,0,0,0,115,97,110,100,121,98,114,111,119,110,0,0,0,0,0,0,117,0,0,0,0,0,0,0,44,32,100,105,97,109,101,116,101,114,115,32,97,114,101,32,105,110,32,100,105,102,102,101,114,101,110,116,32,117,110,105,116,115,32,40,109,97,106,111,114,58,32,120,32,97,120,105,115,44,32,109,105,110,111,114,58,32,121,32,97,120,105,115,41,10,0,0,0,0,0,0,45,45,104,101,108,112,0,0,118,101,114,98,97,116,105,109,116,101,120,10,0,0,0,0,116,97,110,49,0,0,0,0,42,58,0,0,0,0,0,0,44,32,100,101,102,97,117,108,116,32,97,110,103,108,101,32,105,115,32,37,46,49,102,32,100,101,103,114,101,101,115,0,97,99,116,105,111,110,32,116,97,98,108,101,0,0,0,0,37,32,66,69,71,80,79,83,84,10,0,0,0,0,0,0,115,105,101,110,110,97,49,0,9,69,108,108,105,112,115,101,32,115,116,121,108,101,32,104,97,115,32,100,101,102,97,117,108,116,32,115,105,122,101,32,0,0,0,0,0,0,0,0,101,110,100,102,105,103,59,10,0,0,0,0,0,0,0,0,121,101,108,108,111,119,52,0,70,117,110,99,116,105,111,110,115,0,0,0,0,0,0,0,106,116,101,114,110,0,0,0,101,120,112,101,99,116,105,110,103,32,39,114,97,100,105,97,110,115,39,32,111,114,32,39,100,101,103,114,101,101,115,39,0,0,0,0,0,0,0,0,101,110,104,36,97,110,99,101]) -.concat([100,0,0,0,0,0,0,0,115,99,97,108,101,112,101,110,32,49,59,32,112,116,115,105,122,101,32,37,46,51,102,59,108,105,110,101,116,121,112,101,32,45,50,59,10,0,0,0,115,108,97,116,101,98,108,117,101,49,0,0,0,0,0,0,120,49,121,49,0,0,0,0,68,97,116,97,0,0,0,0,32,32,77,97,120,105,109,117,109,58,32,32,37,115,32,91,37,42,108,100,93,32,32,32,37,115,32,91,37,42,108,100,93,10,0,0,0,0,0,0,37,115,58,37,100,32,112,114,111,116,111,99,111,108,32,101,114,114,111,114,10,0,0,0,100,36,101,103,114,101,101,115,0,0,0,0,0,0,0,0,109,117,108,116,105,112,108,111,116,62,32,0,0,0,0,0,37,48,51,111,0,0,0,0,100,0,0,0,0,0,0,0,97,58,61,119,47,37,46,49,102,59,98,58,61,104,47,37,46,49,102,59,10,0,0,0,109,101,100,105,117,109,112,117,114,112,108,101,51,0,0,0,9,37,115,32,105,115,32,117,110,100,101,102,105,110,101,100,10,0,0,0,0,0,0,0,115,116,121,108,101,32,108,105,110,101,0,0,0,0,0,0,114,36,97,100,105,97,110,115,0,0,0,0,0,0,0,0,120,101,114,114,111,114,108,105,110,101,115,10,0,0,0,0,78,101,101,100,32,49,32,111,114,32,51,32,99,111,108,117,109,110,115,32,102,111,114,32,99,97,114,116,101,115,105,97,110,32,100,97,116,97,0,0,67,97,110,39,116,32,99,104,97,110,103,101,32,116,111,32,116,104,105,115,32,100,105,114,101,99,116,111,114,121,0,0,126,0,0,0,0,0,0,0,83,105,110,103,117,108,97,114,32,109,97,116,114,105,120,32,105,110,32,71,105,118,101,110,115,40,41,0,0,0,0,0,67,97,110,39,116,32,99,97,108,99,117,108,97,116,101,32,97,112,112,114,111,120,105,109,97,116,105,111,110,32,115,112,108,105,110,101,115,44,32,97,108,108,32,119,101,105,103,104,116,115,32,104,97,118,101,32,116,111,32,98,101,32,62,32,48,0,0,0,0,0,0,0,10,98,101,103,105,110,102,105,103,40,37,100,41,59,10,119,58,61,37,46,51,102,105,110,59,104,58,61,37,46,51,102,105,110,59,10,0,0,0,0,99,98,116,105,99,115,0,0,111,114,99,104,105,100,52,0,75,80,95,66,101,103,105,110,0,0,0,0,0,0,0,0,9,37,115,10,0,0,0,0,114,103,98,36,99,111,108,111,114,0,0,0,0,0,0,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,115,116,114,105,110,103,32,110,111,116,32,97,108,108,111,99,97,116,101,100,0,0,0,0,100,117,112,108,105,99,97,116,101,32,111,114,32,99,111,110,116,114,97,100,105,99,116,111,114,121,32,97,114,103,117,109,101,110,116,115,0,0,0,0,45,45,40,37,46,49,102,97,44,37,46,49,102,98,41,0,115,105,101,110,110,97,52,0,10,9,85,115,101,114,45,68,101,102,105,110,101,100,32,70,117,110,99,116,105,111,110,115,58,10,0,0,0,0,0,0,102,117,110,99,116,105,111,110,32,37,115,32,114,101,113,117,105,114,101,115,32,37,100,32,118,97,114,105,97,98,108,101,37,99,0,0,0,0,0,0,119,114,111,110,103,32,97,114,103,117,109,101,110,116,32,105,110,32,115,101,116,32,97,114,114,111,119,0,0,0,0,0,109,97,108,102,111,114,109,101,100,32,114,97,110,103,101,32,119,105,116,104,32,99,111,110,115,116,114,97,105,110,116,32,40,117,115,101,32,39,60,39,32,111,110,108,121,41,0,0,100,114,97,119,32,40,37,46,49,102,97,44,37,46,49,102,98,41,0,0,0,0,0,0,98,114,111,119,110,52,0,0,100,101,102,97,117,108,116,32,108,97,121,101,114,0,0,0,101,110,100,32,99,111,111,114,100,105,110,97,116,101,115,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,0,0,108,105,110,101,116,121,112,101,32,37,100,59,10,0,0,0,111,114,97,110,103,101,114,101,100,52,0,0,0,0,0,0,9,71,114,105,100,32,100,114,97,119,110,32,97,116,32,37,115,10,0,0,0,0,0,0,115,116,97,114,116,32,99,111,111,114,100,105,110,97,116,101,115,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,124,99,111,115,40,51,54,48,120,41,124,0,0,0,0,0,112,117,116,95,116,101,120,116,40,32,98,116,101,120,32,37,115,32,101,116,101,120,44,32,37,46,49,102,97,44,32,37,46,49,102,98,44,32,37,100,44,32,37,100,41,59,10,0,100,97,114,107,45,111,108,105,118,101,103,114,101,101,110,0,100,101,103,114,101,101,115,0,97,114,114,111,119,0,0,0,112,117,116,95,116,101,120,116,40,32,98,116,101,120,32,92,115,101,116,102,111,110,116,123,37,115,125,123,37,53,46,50,102,125,32,37,115,32,101,116,101,120,44,32,37,46,49,102,97,44,32,37,46,49,102,98,44,32,37,100,44,32,37,100,41,59,10,0,0,0,0,0,100,97,114,107,45,112,108,117,109,0,0,0,0,0,0,0,114,97,100,105,97,110,115,0,32,32,32,32,32,32,32,32,32,83,107,105,112,112,101,100,32,37,100,32,112,111,105,110,116,115,32,111,117,116,115,105,100,101,32,114,97,110,103,101,32,91,37,115,61,0,0,0,116,97,103,32,109,117,115,116,32,98,101,32,62,32,48,0,112,117,116,95,116,101,120,116,40,34,37,115,34,44,32,37,46,49,102,97,44,32,37,46,49,102,98,44,32,37,100,44,32,37,100,41,59,10,0,0,112,108,117,109,0,0,0,0,9,71,114,105,100,32,114,97,100,105,105,32,100,114,97,119,110,32,101,118,101,114,121,32,37,102,32,37,115,10,0,0,112,117,116,95,116,101,120,116,40,34,37,115,34,32,105,110,102,111,110,116,115,105,122,101,40,34,37,115,34,44,37,53,46,50,102,41,44,32,37,46,49,102,97,44,32,37,46,49,102,98,44,32,37,100,44,32,37,100,41,59,10,0,0,0,100,97,114,107,45,118,105,111,108,101,116,0,0,0,0,0,10,9,77,105,110,111,114,32,103,114,105,100,32,100,114,97,119,110,32,119,105,116,104,0,106,117,109,112,110,122,0,0,104,101,97,100,36,115,0,0,102,111,110,116,0,0,0,0,103,112,100,114,97,119,40,37,100,44,37,46,49,102,97,44,37,46,49,102,98,41,59,10,0,0,0,0,0,0,0,0,118,105,111,108,101,116,0,0,9,77,97,106,111,114,32,103,114,105,100,32,100,114,97,119,110,32,119,105,116,104,0,0,32,32,77,105,110,105,109,117,109,58,32,32,37,115,32,91,37,42,108,100,93,32,32,32,37,115,32,91,37,42,108,100,93,10,0,0,0,0,0,0,97,115,0,0,0,0,0,0,99,111,110,118,95,116,101,120,116,32,98,117,102,102,101,114,0,0,0,0,0,0,0,0,105,0,0,0,0,0,0,0,100,114,97,119,32,40,37,46,49,102,97,44,37,46,49,102,98,41,45,45,40,37,46,49,102,97,44,37,46,49,102,98,41,59,10,0,0,0,0,0,111,114,97,110,103,101,0,0,32,116,105,99,115,10,0,0,108,105,110,101,116,121,112,101,0,0,0,0,0,0,0,0,121,101,114,114,111,114,108,105,110,101,115,10,0,0,0,0,101,120,112,101,99,116,105,110,103,32,100,105,114,101,99,116,111,114,121,32,110,97,109,101,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,100,114,97,119,100,98,108,97,114,114,111,119,0,0,0,0,111,108,105,118,101,0,0,0,75,80,95,76,101,102,116,0,32,109,37,115,0,0,0,0,66,111,116,104,32,112,97,114,97,109,101,116,101,114,115,32,116,111,32,115,116,114,112,116,105,109,101,32,109,117,115,116,32,98,101,32,115,116,114,105,110,103,115,0,0,0,0,0,100,114,97,119,97,114,114,111,119,0,0,0,0,0,0,0,98,101,105,103,101,0,0,0,32,37,115,0,0,0,0,0,98,97,99,107,36,104,101,97,100,0,0,0,0,0,0,0,122,50,0,0,0,0,0,0,37,115,32,40,37,46,49,102,97,44,37,46,49,102,98,41,45,45,40,37,46,49,102,97,44,37,46,49,102,98,41,59,10,0,0,0,0,0,0,0,100,97,114,107,45,103,111,108,100,101,110,114,111,100,0,0,82,101,99,116,97,110,103,117,108,97,114,0,0,0,0,0,121,95,109,105,110,32,115,104,111,117,108,100,32,110,111,116,32,101,113,117,97,108,32,121,95,109,97,120,33,0,0,0,73,110,118,97,108,105,100,32,114,97,110,103,101,0,0,0,112,116,115,105,122,101,32,37,46,51,102,59,10,0,0,0,100,97,114,107,45,107,104,97,107,105,0,0,0,0,0,0,80,111,108,97,114,0,0,0,37,115,102,105,120,109,97,36,120,0,0,0,0,0,0,0,51,54,48,32,109,117,108,32,99,111,115,32,97,98,115,0,102,105,108,108,32,40,37,46,49,102,97,44,37,46,49,102,98,41,45,45,40,37,46,49,102,97,44,37,46,49,102,98,41,45,45,40,37,46,49,102,97,44,37,46,49,102,98,41,45,45,40,37,46,49,102,97,44,37,46,49,102,98,41,45,45,99,121,99,108,101,32,119,105,116,104,112,101,110,32,40,112,101,110,99,105,114,99,108,101,32,115,99,97,108,101,100,32,48,112,116,41,32,119,105,116,104,99,111,108,111,114,32,102,105,108,108,99,111,108,111,114,59,10,0,0,0,0,0,107,104,97,107,105,0,0,0,9,37,115,32,103,114,105,100,32,100,114,97,119,110,32,97,116,0,0,0,0,0,0,0,37,115,102,105,120,109,105,36,110,0,0,0,0,0,0,0,9,32,32,72,105,100,100,101,110,51,100,32,101,108,101,109,101,110,116,115,32,119,105,108,108,32,98,101,32,100,114,97,119,110,32,105,110,32,37,115,32,111,102,32,110,111,110,45,104,105,100,100,101,110,51,100,32,101,108,101,109,101,110,116,115,10,0,0,0,0,0,0,102,105,108,108,32,40,37,46,49,102,97,44,37,46,49,102,98,41,45,45,40,37,46,49,102,97,44,37,46,49,102,98,41,45,45,40,37,46,49,102,97,44,37,46,49,102,98,41,45,45,40,37,46,49,102,97,44,37,46,49,102,98,41,45,45,99,121,99,108,101,32,119,105,116,104,99,111,108,111,114,32,98,97,99,107,103,114,111,117,110,100,59,10,0,0,0,100,97,114,107,45,115,97,108,109,111,110,0,0,0,0,0,9,103,114,105,100,32,105,115,32,79,70,70,10,0,0,0,32,32,32,32,32,32,32,32,32,82,101,97,100,32,37,100,32,112,111,105,110,116,115,10,0,0,0,0,0,0,0,0,37,115,102,105,120,0,0,0,115,99,97,108,101,112,101,110,32,37,46,51,102,59,10,0,115,97,108,109,111,110,0,0,114,97,120,105,115,32,105,115,32,37,115,100,114,97,119,110,10,0,0,0,0,0,0,0,37,115,109,97,36,120,0,0,80,114,101,115,115,32,114,101,116,117,114,110,32,102,111,114,32,109,111,114,101,58,32,0,99,117,114,114,101,110,116,99,111,108,111,114,58,61,37,46,52,103,42,114,101,100,43,37,46,52,103,42,103,114,101,101,110,43,37,46,52,103,42,98,108,117,101,59,10,0,0,0,111,114,97,110,103,101,45,114,101,100,0,0,0,0,0,0,9,37,115,122,101,114,111,97,120,105,115,32,105,115,32,79,70,70,10,0,0,0,0,0,106,117,109,112,122,0,0,0,37,115,109,105,36,110,0,0,116,105,36,116,108,101,0,0,99,117,114,114,101,110,116,99,111,108,111,114,58,61,99,111,108,37,100,59,10,0,0,0,108,105,103,104,116,45,99,111,114,97,108,0,0,0,0,0,125,0,0,0,0,0,0,0,9,37,115,122,101,114,111,97,120,105,115,32,105,115,32,100,114,97,119,110,32,119,105,116,104,0,0,0,0,0,0,0,32,32,83,117,109,32,83,113,46,58,32,32,37,115,32,37,115,32,37,115,10,0,0,0,107,101,36,101,112,102,105,120,0,0,0,0,0,0,0,0,117,110,107,110,111,119,110,32,116,121,112,101,32,105,110,32,100,105,115,112,95,118,97,108,117,101,40,41,0,0,0,0,115,105,110,116,0,0,0,0,99,117,114,114,101,110,116,99,111,108,111,114,58,61,98,108,97,99,107,59,10,0,0,0,108,97,98,101,108,32,110,111,116,32,102,111,117,110,100,0,69,120,116,114,97,110,101,111,117,115,32,97,114,103,117,109,101,110,116,115,32,116,111,32,115,101,116,32,37,115,0,0,102,105,120,0,0,0,0,0,100,111,116,115,10,0,0,0,120,112,45,62,110,101,120,116,95,115,112,32,61,61,32,121,112,0,0,0,0,0,0,0,99,117,114,114,101,110,116,99,111,108,111,114,58,61,37,46,51,103,119,104,105,116,101,59,10,0,0,0,0,0,0,0,100,97,114,107,45,112,105,110,107,0,0,0,0,0,0,0,75,80,95,80,97,103,101,68,111,119,110,0,0,0,0,0,32,112,111,105,110,116,32,119,105,116,104,32,99,111,108,111,114,32,111,102,0,0,0,0,98,117,102,102,101,114,91,108,101,110,103,116,104,45,49,93,32,61,61,32,39,32,39,0,102,117,108,108,36,119,105,100,116,104,0,0,0,0,0,0,59,10,0,0,0,0,0,0,100,97,114,107,45,116,117,114,113,117,111,105,115,101,0,0,32,110,111,112,111,105,110,116,0,0,0,0,0,0,0,0,108,36,97,114,103,101,0,0,100,101,102,97,117,108,116,0,37,115,32,61,32,0,0,0,109,97,108,102,111,114,109,101,100,32,114,97,110,103,101,32,119,105,116,104,32,99,111,110,115,116,97,114,105,110,116,0,99,121,99,108,101,32,119,105,116,104,99,111,108,111,114,32,102,105,108,108,99,111,108,111,114,59,10,0,0,0,0,0,32,102,111,110,116,32,34,37,115,34,0,0,0,0,0,0,120,95,109,105,110,32,115,104,111,117,108,100,32,110,111,116,32,101,113,117,97,108,32,120,95,109,97,120,33,0,0,0,45,45,0,0,0,0,0,0,32,37,115,32,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,97,98,115,111,108,117,116,101,39,32,111,114,32,39,114,101,108,97,116,105,118,101,39,32,0,0,0,0,0,77,79,85,83,69,95,0,0,124,115,105,110,40,51,54,48,120,41,124,0,0,0,0,0,10,45,45,0,0,0,0,0,116,105,109,101,108,97,98,101,108,46,116,101,120,116,0,0,115,107,121,98,108,117,101,0,32,110,111,116,32,114,111,116,97,116,101,100,0,0,0,0,114,36,101,108,97,116,105,118,101,0,0,0,0,0,0,0,40,37,46,49,102,97,44,37,46,49,102,98,41,37,115,0,109,101,100,105,117,109,45,98,108,117,101,0,0,0,0,0,32,114,111,116,97,116,101,100,32,98,121,32,37,100,32,100,101,103,114,101,101,115,32,40,105,102,32,112,111,115,115,105,98,108,101,41,0,0,0,0,97,36,98,115,111,108,117,116,101,0,0,0,0,0,0,0,98,97,100,32,100,97,116,97,32,111,110,32,108,105,110,101,32,37,100,32,111,102,32,100,97,116,97,102,105,108,101,0,115,101,116,32,37,115,122,101,114,111,97,120,105,115,0,0,102,105,108,108,32,0,0,0,110,97,118,121,0,0,0,0,32,99,101,110,116,114,101,0,112,114,105,110,116,95,116,97,98,108,101,58,32,111,117,116,112,117,116,32,98,117,102,102,101,114,0,0,0,0,0,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,32,105,110,32,115,99,105,101,110,116,105,102,105,99,32,110,117,109,98,101,114,32,102,111,114,109,97,116,116,105,110,103,0,0,102,105,108,108,99,111,108,111,114,58,61,99,117,114,114,101,110,116,99,111,108,111,114,59,10,0,0,0,0,0,0,0,109,105,100,110,105,103,104,116,45,98,108,117,101,0,0,0,9,108,97,98,101,108,32,37,100,32,34,37,115,34,32,97,116,32,0,0,0,0,0,0,122,95,109,105,110,51,100,32,115,104,111,117,108,100,32,110,111,116,32,101,113,117,97,108,32,122,95,109,97,120,51,100,33,0,0,0,0,0,0,0,106,117,109,112,0,0,0,0,32,40,0,0,0,0,0,0,102,105,108,108,99,111,108,111,114,58,61,99,117,114,114,101,110,116,99,111,108,111,114,42,37,46,50,102,43,98,97,99,107,103,114,111,117,110,100,42,37,46,50,102,59,10,0,0,100,97,114,107,45,98,108,117,101,0,0,0,0,0,0,0,123,0,0,0,0,0,0,0,32,32,83,117,109,58,32,32,32,32,32,32,37,115,32,37,115,32,37,115,10,0,0,0,34,37,115,34,0,0,0,0,102,105,108,108,99,111,108,111,114,58,61,98,97,99,107,103,114,111,117,110,100,59,10,0,44,32,98,97,99,107,97,110,103,108,101,32,37,103,32,100,101,103,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,108,105,110,101,97,114,39,44,32,39,99,117,98,105,99,115,112,108,105,110,101,39,44,32,39,98,115,112,108,105,110,101,39,44,32,39,112,111,105,110,116,115,39,44,32,39,108,101,118,101,108,115,39,32,111,114,32,39,111,114,100,101,114,39,0,0,0,0,0,115,101,116,32,37,115,116,105,99,115,32,37,115,32,0,0,108,105,110,101,115,112,111,105,110,116,115,10,0,0,0,0,71,80,86,65,76,95,76,65,83,84,95,80,76,79,84,0,47,0,0,0,0,0,0,0,100,101,102,97,117,108,116,102,111,110,116,0,0,0,0,0,115,101,97,45,103,114,101,101,110,0,0,0,0,0,0,0,75,80,95,68,111,119,110,0,10,9,32,32,97,114,114,111,119,32,104,101,97,100,58,32,108,101,110,103,116,104,32,37,115,37,103,44,32,97,110,103,108,101,32,37,103,32,100,101,103,0,0,0,0,0,0,0,98,115,112,108,105,110,101,32,111,114,100,101,114,32,109,117,115,116,32,98,101,32,105,110,32,91,50,46,46,49,48,93,32,114,97,110,103,101,46,0,32,110,111,114,97,110,103,101,108,105,109,105,116,0,0,0,101,120,116,101,114,110,97,108,36,105,109,97,103,101,115,0,102,111,114,101,115,116,45,103,114,101,101,110,0,0,0,0,40,115,101,99,111,110,100,32,120,32,97,120,105,115,41,32,0,0,0,0,0,0,0,0,111,36,114,100,101,114,0,0,32,114,97,110,103,101,108,105,109,105,116,0,0,0,0,0,117,110,102,105,110,105,115,104,101,100,32,114,97,110,103,101,32,119,105,116,104,32,99,111,110,115,116,114,97,105,110,116,0,0,0,0,0,0,0,0,105,110,108,105,110,101,36,105,109,97,103,101,115,0,0,0,115,112,114,105,110,103,45,103,114,101,101,110,0,0,0,0,40,102,105,114,115,116,32,120,32,97,120,105,115,41,32,0,76,101,118,101,108,115,32,116,121,112,101,32,105,115,32,100,105,115,99,114,101,116,101,44,32,105,103,110,111,114,105,110,103,32,110,101,119,32,110,117,109,98,101,114,32,111,102,32,99,111,110,116,111,117,114,32,108,101,118,101,108,115,0,0,84,101,114,109,105,110,97,108,32,99,97,110,118,97,115,32,97,114,101,97,32,116,111,111,32,115,109,97,108,108,32,116,111,32,104,111,108,100,32,112,108,111,116,46,10,9,32,32,32,32,67,104,101,99,107,32,112,108,111,116,32,98,111,117,110,100,97,114,121,32,97,110,100,32,102,111,110,116,32,115,105,122,101,115,46,0,0,0,112,111,105,110,116,115,119,105,116,104,116,101,120,0,0,0,100,97,114,107,45,103,114,101,101,110,0,0,0,0,0,0,32,116,111,32,0,0,0,0,97,117,36,116,111,0,0,0,10,115,101,116,32,37,115,100,116,105,99,115,0,0,0,0,51,54,48,32,109,117,108,32,115,105,110,32,97,98,115,0,112,111,105,110,116,115,119,105,116,104,109,101,116,97,112,111,115,116,0,0,0,0,0,0,32,114,116,111,32,0,0,0,101,120,112,101,99,116,105,110,103,32,99,111,109,109,97,32,116,111,32,115,101,112,97,114,97,116,101,32,105,110,99,114,44,115,116,111,112,32,108,101,118,101,108,115,0,0,0,0,10,115,101,116,32,37,115,109,116,105,99,115,0,0,0,0,112,111,105,110,116,115,119,105,116,104,109,112,0,0,0,0,103,111,108,100,0,0,0,0,10,9,32,32,102,114,111,109,32,0,0,0,0,0,0,0,105,110,99,114,101,109,101,110,116,32,99,97,110,110,111,116,32,98,101,32,48,0,0,0,97,117,116,111,102,114,101,113,32,0,0,0,0,0,0,0,77,97,120,46,32,110,117,109,98,101,114,32,111,102,32,100,97,116,97,32,112,111,105,110,116,115,32,115,99,97,108,101,100,32,117,112,32,116,111,58,32,37,100,10,0,0,0,0,69,68,70,32,104,101,97,100,101,114,0,0,0,0,0,0,116,101,120,36,112,111,105,110,116,115,0,0,0,0,0,0,108,105,103,104,116,45,116,117,114,113,117,111,105,115,101,0,110,111,102,105,108,108,101,100,0,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,99,111,109,109,97,32,116,111,32,115,101,112,97,114,97,116,101,32,115,116,97,114,116,44,105,110,99,114,32,108,101,118,101,108,115,0,0,0,10,115,101,116,32,37,115,116,105,99,115,32,0,0,0,0,108,111,103,49,48,95,98,97,115,101,32,61,61,32,49,46,48,0,0,0,0,0,0,0,109,112,36,112,111,105,110,116,115,0,0,0,0,0,0,0,108,105,103,104,116,45,112,105,110,107,0,0,0,0,0,0,101,109,112,116,121,0,0,0,105,110,36,99,114,101,109,101,110,116,97,108,0,0,0,0,97,115,115,105,103,110,0,0,32,97,117,116,111,106,117,115,116,105,102,121,0,0,0,0,112,111,112,32,48,0,0,0,116,101,120,116,115,99,97,108,101,0,0,0,0,0,0,0,108,105,103,104,116,45,103,111,108,100,101,110,114,111,100,0,119,104,105,108,101,0,0,0,102,105,108,108,101,100,0,0,101,120,112,101,99,116,105,110,103,32,99,111,109,109,97,32,116,111,32,115,101,112,97,114,97,116,101,32,100,105,115,99,114,101,116,101,32,108,101,118,101,108,115,0,0,0,0,0,32,32,83,116,100,32,68,101,118,58,32,32,37,115,32,37,115,32,37,115,10,0,0,0,98,121,32,37,100,32,0,0,117,115,104,111,114,116,0,0,102,111,110,116,115,99,97,108,101,0,0,0,0,0,0,0,108,105,103,104,116,45,99,121,97,110,0,0,0,0,0,0,9,97,114,114,111,119,32,37,100,44,32,37,115,32,37,115,32,37,115,0,0,0,0,0,108,105,110,101,115,116,121,108,101,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,100,105,115,99,114,101,116,101,32,108,101,118,101,108,0,0,0,0,0,0,0,0,105,109,112,117,108,115,101,115,10,0,0,0,0,0,0,0,67,97,110,110,111,116,32,99,111,110,116,111,117,114,32,110,111,110,32,103,114,105,100,32,100,97,116,97,46,32,80,108,101,97,115,101,32,117,115,101,32,34,115,101,116,32,100,103,114,105,100,51,100,34,46,0,98,105,110,100,95,99,111,109,109,97,110,100,45,62,114,104,115,0,0,0,0,0,0,0,108,119,0,0,0,0,0,0,108,105,103,104,116,45,109,97,103,101,110,116,97,0,0,0,75,80,95,69,110,100,0,0,9,107,101,121,32,116,105,116,108,101,32,105,115,32,34,37,115,34,10,0,0,0,0,0,100,105,36,115,99,114,101,116,101,0,0,0,0,0,0,0,82,101,115,117,108,116,105,110,103,32,115,116,114,105,110,103,32,105,115,32,116,111,111,32,108,111,110,103,0,0,0,0,108,105,110,101,119,36,105,100,116,104,0,0,0,0,0,0,108,105,103,104,116,45,98,108,117,101,0,0,0,0,0,0,37,100,32,102,111,114,32,118,101,114,116,105,99,97,108,32,97,108,105,103,110,109,101,110,116,10,0,0,0,0,0,0,108,101,36,118,101,108,115,0,111,117,116,0,0,0,0,0,100,108,0,0,0,0,0,0,108,105,103,104,116,45,103,114,101,101,110,0,0,0,0,0,9,109,97,120,105,109,117,109,32,110,117,109,98,101,114,32,111,102,32,114,111,119,115,32,105,115,32,0,0,0,0,0,98,36,115,112,108,105,110,101,0,0,0,0,0,0,0,0,107,101,121,0,0,0,0,0,100,97,115,104,108,36,101,110,103,116,104,0,0,0,0,0,108,105,103,104,116,45,114,101,100,0,0,0,0,0,0,0,99,97,108,99,117,108,97,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,10,0,0,0,0,0,0,0,99,36,117,98,105,99,115,112,108,105,110,101,0,0,0,0,97,120,105,115,0,0,0,0,99,111,115,40,51,54,48,120,41,0,0,0,0,0,0,0,115,113,117,97,114,101,36,100,0,0,0,0,0,0,0,0,103,114,101,121,49,48,48,0,37,100,32,102,111,114,32,104,111,114,105,122,111,110,116,97,108,32,97,108,105,103,110,109,101,110,116,10,0,0,0,0,108,105,36,110,101,97,114,0,115,101,116,32,37,115,116,105,99,115,32,37,115,32,37,115,32,115,99,97,108,101,32,37,103,44,37,103,32,37,115,109,105,114,114,111,114,32,37,115,32,0,0,0,0,0,0,0,98,101,118,101,108,36,101,100,0,0,0,0,0,0,0,0,103,114,101,121,57,48,0,0,9,109,97,120,105,109,117,109,32,110,117,109,98,101,114,32,111,102,32,99,111,108,117,109,110,115,32,105,115,32,0,0,115,101,116,32,110,111,37,115,116,105,99,115,10,0,0,0,79,117,116,32,111,102,32,109,101,109,111,114,121,32,105,110,32,102,105,116,58,32,116,111,111,32,109,97,110,121,32,100,97,116,97,112,111,105,110,116,115,32,40,37,100,41,63,0,109,105,116,101,114,36,101,100,0,0,0,0,0,0,0,0,103,114,101,121,56,48,0,0,119,105,116,104,32,99,111,108,117,109,110,32,104,101,97,100,101,114,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,98,97,115,101,39,44,32,39,115,117,114,102,97,99,101,39,44,32,111,114,32,39,98,111,116,104,39,0,0,32,108,111,103,102,105,108,101,32,39,37,115,39,0,0,0,115,111,36,108,105,100,0,0,103,114,101,121,55,48,0,0,119,105,116,104,32,102,105,108,101,110,97,109,101,0,0,0,98,111,36,116,104,0,0,0,91,93,0,0,0,0,0,0,115,101,116,32,102,105,116,32,37,115,101,114,114,111,114,118,97,114,105,97,98,108,101,115,0,0,0,0,0,0,0,0,116,101,109,112,32,102,105,108,101,32,115,116,114,105,110,103,0,0,0,0,0,0,0,0,100,97,36,115,104,101,100,0,103,114,101,121,54,48,0,0,117,112,36,100,97,116,101,0,9,115,97,109,112,108,101,32,108,101,110,103,116,104,32,105,115,32,37,103,32,99,104,97,114,97,99,116,101,114,115,10,9,118,101,114,116,105,99,97,108,32,115,112,97,99,105,110,103,32,105,115,32,37,103,32,99,104,97,114,97,99,116,101,114,115,10,9,119,105,100,116,104,32,97,100,106,117,115,116,109,101,110,116,32,105,115,32,37,103,32,99,104,97,114,97,99,116,101,114,115,10,9,104,101,105,103,104,116,32,97,100,106,117,115,116,109,101,110,116,32,105,115,32,37,103,32,99,104,97,114,97,99,116,101,114,115,10,9,99,117,114,118,101,115,32,97,114,101,37,115,32,97,117,116,111,109,97,116,105,99,97,108,108,121,32,116,105,116,108,101,100,32,37,115,10,0,0,0,0,0,0,0,0,115,36,117,114,102,97,99,101,0,0,0,0,0,0,0,0,32,32,77,101,97,110,58,32,32,32,32,32,37,115,32,37,115,32,37,115,10,0,0,0,115,101,116,32,112,115,100,105,114,10,0,0,0,0,0,0,123,37,115,44,32,37,115,125,0,0,0,0,0,0,0,0,115,104,111,114,116,0,0,0,109,111,110,111,36,99,104,114,111,109,101,0,0,0,0,0,103,114,101,121,53,48,0,0,9,107,101,121,32,98,111,120,32,105,115,32,111,112,97,113,117,101,32,97,110,100,32,100,114,97,119,110,32,105,110,32,102,114,111,110,116,32,111,102,32,116,104,101,32,103,114,97,112,104,10,0,0,0,0,0,98,97,36,115,101,0,0,0,115,101,116,32,112,115,100,105,114,32,34,37,115,34,10,0,112,111,105,110,116,115,10,0,65,108,108,32,112,111,105,110,116,115,32,111,102,32,99,111,108,111,114,98,111,120,32,118,97,108,117,101,32,117,110,100,101,102,105,110,101,100,0,0,98,105,110,100,95,99,111,109,109,97,110,100,45,62,108,104,115,0,0,0,0,0,0,0,43,0,0,0,0,0,0,0,99,111,108,36,111,117,114,0,103,114,101,121,52,48,0,0,75,80,95,73,110,115,101,114,116,0,0,0,0,0,0,0,110,111,116,32,98,111,120,101,100,10,0,0,0,0,0,0,83,99,97,108,101,32,102,97,99,116,111,114,115,32,109,117,115,116,32,98,101,32,103,114,101,97,116,101,114,32,116,104,97,110,32,122,101,114,111,32,45,32,110,111,116,32,99,104,97,110,103,101,100,33,0,0,115,101,116,32,102,111,110,116,112,97,116,104,32,0,0,0,68,111,117,98,108,101,0,0,102,95,115,116,114,102,116,105,109,101,58,32,98,117,102,102,101,114,0,0,0,0,0,0,105,110,105,116,32,100,121,110,97,114,114,97,121,0,0,0,99,111,108,36,111,114,0,0,103,114,101,121,51,48,0,0,98,111,120,101,100,10,9,119,105,116,104,32,0,0,0,0,78,117,109,98,101,114,32,111,102,32,103,114,105,100,32,112,111,105,110,116,115,32,109,117,115,116,32,98,101,32,105,110,32,91,50,58,49,48,48,48,93,32,45,32,110,111,116,32,99,104,97,110,103,101,100,33,0,0,0,0,0,0,0,0,117,110,102,105,110,105,115,104,101,100,32,114,97,110,103,101,0,0,0,0,0,0,0,0,110,111,104,101,97,100,101,114,0,0,0,0,0,0,0,0,103,114,101,121,50,48,0,0,114,105,103,104,116,0,0,0,85,110,114,101,99,111,103,110,105,122,101,32,107,101,121,119,111,114,100,32,111,114,32,117,110,101,120,112,101,99,116,101,100,32,118,97,108,117,101,0,100,105,102,102,105,99,117,108,116,121,32,109,97,107,105,110,103,32,114,111,111,109,32,102,111,114,32,120,116,105,99,32,108,97,98,101,108,115,0,0,115,101,116,32,108,111,97,100,112,97,116,104,32,0,0,0,104,101,97,100,101,114,0,0,103,114,101,121,49,48,0,0,108,101,102,116,0,0,0,0,107,100,101,110,115,36,105,116,121,50,100,0,0,0,0,0,51,54,48,32,109,117,108,32,99,111,115,0,0,0,0,0,110,111,116,105,109,101,36,115,116,97,109,112,0,0,0,0,103,114,101,121,48,0,0,0,9,107,101,121,32,105,115,32,37,115,32,106,117,115,116,105,102,105,101,100,44,32,37,115,114,101,118,101,114,115,101,100,44,32,37,115,105,110,118,101,114,116,101,100,44,32,37,115,101,110,104,97,110,99,101,100,32,97,110,100,32,0,0,0,100,101,99,105,109,97,108,95,115,105,103,110,32,105,110,32,108,111,99,97,108,101,32,105,115,32,37,115,10,0,0,0,101,114,114,111,114,32,100,117,114,105,110,103,32,102,105,116,0,0,0,0,0,0,0,0,116,105,109,101,36,115,116,97,109,112,0,0,0,0,0,0,116,117,114,113,117,111,105,115,101,0,0,0,0,0,0,0,9,107,101,121,32,105,115,32,97,116,32,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,102,105,110,100,32,114,101,113,117,101,115,116,101,100,32,108,111,99,97,108,101,0,115,116,97,110,100,36,97,108,111,110,101,0,0,0,0,0,32,114,109,97,114,103,105,110,0,0,0,0,0,0,0,0,76,65,78,71,0,0,0,0,85,83,69,82,78,65,77,69,0,0,0,0,0,0,0,0,105,110,112,36,117,116,0,0,32,108,109,97,114,103,105,110,0,0,0,0,0,0,0,0,76,67,95,78,85,77,69,82,73,67,0,0,0,0,0,0,110,101,115,0,0,0,0,0,67,108,111,115,105,110,103,32,37,115,10,0,0,0,0,0,100,101,102,97,117,108,116,115,105,122,101,0,0,0,0,0,97,113,117,97,109,97,114,105,110,101,0,0,0,0,0,0,117,110,115,36,101,116,0,0,32,98,109,97,114,103,105,110,0,0,0,0,0,0,0,0,76,67,95,65,76,76,0,0,42,32,67,79,76,85,77,78,83,58,10,0,0,0,0,0,102,114,97,99,116,105,111,110,0,0,0,0,0,0,0,0,117,99,104,97,114,0,0,0,115,105,122,101,0,0,0,0,111,114,99,104,105,100,0,0,32,116,109,97,114,103,105,110,0,0,0,0,0,0,0,0,99,97,110,100,108,101,115,0,108,105,110,101,115,10,0,0,65,108,108,32,112,111,105,110,116,115,32,122,32,118,97,108,117,101,32,117,110,100,101,102,105,110,101,100,0,0,0,0,119,104,105,115,107,101,114,36,98,97,114,115,0,0,0,0,99,111,109,109,97,110,100,46,99,0,0,0,0,0,0,0,100,36,101,102,97,117,108,116,0,0,0,0,0,0,0,0,100,97,114,107,45,99,104,97,114,116,114,101,117,115,101,0,75,80,95,70,52,0,0,0,32,111,117,116,115,105,100,101,0,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,115,101,99,111,110,100,32,100,117,109,109,121,32,118,97,114,105,97,98,108,101,32,110,97,109,101,0,0,0,0,120,121,61,37,103,44,37,103,0,0,0,0,0,0,0,0,70,108,111,97,116,0,0,0,102,105,110,97,110,99,101,98,97,114,115,0,0,0,0,0,115,105,122,101,58,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,0,0,100,97,114,107,45,114,101,100,0,0,0,0,0,0,0,0,32,105,110,115,105,100,101,0,101,120,112,101,99,116,105,110,103,32,100,117,109,109,121,32,118,97,114,105,97,98,108,101,32,110,97,109,101,0,0,0,115,101,116,32,115,116,121,108,101,32,98,111,120,112,108,111,116,32,37,115,32,37,115,32,37,53,46,50,102,32,37,115,111,117,116,108,105,101,114,115,32,112,116,32,37,100,32,115,101,112,97,114,97,116,105,111,110,32,37,103,32,108,97,98,101,108,115,32,37,115,32,37,115,115,111,114,116,101,100,10,0,0,0,0,0,0,0,0,105,110,36,99,104,101,115,0,115,116,101,101,108,98,108,117,101,0,0,0,0,0,0,0,32,104,111,114,105,122,111,110,116,97,108,0,0,0,0,0,105,99,111,110,118,32,102,97,105,108,101,100,32,116,111,32,99,111,110,118,101,114,116,32,100,101,103,114,101,101,32,115,105,103,110,0,0,0,0,0,120,116,105,99,0,0,0,0,10,117,110,115,101,116,32,99,111,108,111,114,98,111,120,10,0,0,0,0,0,0,0,0,115,105,122,101,32,114,101,113,117,105,114,101,115,32,116,119,111,32,110,117,109,98,101,114,115,58,32,32,120,115,105,122,101,44,32,121,115,105,122,101,0,0,0,0,0,0,0,0,112,117,114,112,108,101,0,0,32,118,101,114,116,105,99,97,108,0,0,0,0,0,0,0,105,99,111,110,118,95,111,112,101,110,32,102,97,105,108,101,100,32,102,111,114,32,37,115,0,0,0,0,0,0,0,0,98,111,114,100,101,114,32,37,100,0,0,0,0,0,0,0,115,105,110,40,51,54,48,120,41,0,0,0,0,0,0,0,101,120,112,97,110,100,32,108,111,97,100,112,97,116,104,0,102,111,110,116,32,34,37,115,44,37,103,34,0,0,0,0,100,97,114,107,45,115,112,114,105,110,103,45,103,114,101,101,110,0,0,0,0,0,0,0,32,99,101,110,116,101,114,0,98,100,101,102,97,117,108,116,0,0,0,0,0,0,0,0,109,112,112,111,105,110,116,115,32,0,0,0,0,0,0,0,103,111,108,100,101,110,114,111,100,0,0,0,0,0,0,0,41,0,0,0,0,0,0,0,32,114,105,103,104,116,0,0,117,110,114,101,99,111,103,110,105,122,101,100,32,101,110,99,111,100,105,110,103,32,115,112,101,99,105,102,105,99,97,116,105,111,110,59,32,115,101,101,32,39,104,101,108,112,32,101,110,99,111,100,105,110,103,39,46,0,0,0,0,0,0,0,110,111,98,111,114,100,101,114,0,0,0,0,0,0,0,0,101,114,114,36,111,114,115,116,97,116,101,0,0,0,0,0,73,108,108,101,103,97,108,32,100,97,121,32,111,102,32,121,101,97,114,0,0,0,0,0,116,101,120,112,111,105,110,116,115,32,0,0,0,0,0,0,114,111,121,97,108,98,108,117,101,0,0,0,0,0,0,0,32,108,101,102,116,0,0,0,57,51,50,0,0,0,0,0,47,117,115,114,47,108,111,99,97,108,47,115,104,97,114,101,47,103,104,111,115,116,115,99,114,105,112,116,47,102,111,110,116,115,0,0,0,0,0,0,85,83,69,82,0,0,0,0,115,111,108,105,100,0,0,0,100,97,114,107,45,121,101,108,108,111,119,0,0,0,0,0,83,74,73,83,0,0,0,0,101,113,115,0,0,0,0,0,104,111,114,105,122,111,110,116,0,0,0,0,0,0,0,0,78,111,32,116,101,114,109,105,110,97,108,32,100,101,102,105,110,101,100,0,0,0,0,0,100,97,115,104,101,100,0,0,100,97,114,107,45,111,114,97,110,103,101,0,0,0,0,0,117,110,100,36,101,102,105,110,101,0,0,0,0,0,0,0,9,107,101,121,32,105,115,32,79,78,44,32,112,111,115,105,116,105,111,110,58,32,0,0,118,101,114,116,105,99,0,0,99,0,0,0,0,0,0,0,32,37,115,32,100,97,115,104,108,101,110,103,116,104,32,37,103,32,108,105,110,101,119,105,100,116,104,32,37,103,32,102,111,110,116,115,99,97,108,101,32,37,103,32,92,10,32,32,32,0,0,0,0,0,0,0,100,97,114,107,45,99,121,97,110,0,0,0,0,0,0,0,9,107,101,121,32,105,115,32,79,70,70,10,0,0,0,0,85,84,70,0,0,0,0,0,115,101,116,32,99,111,108,111,114,98,111,120,32,37,115,97,108,32,111,114,105,103,105,110,32,0,0,0,0,0,0,0,32,114,103,98,32,34,35,37,54,46,54,120,34,32,0,0,65,108,108,32,112,111,105,110,116,115,32,121,32,118,97,108,117,101,32,117,110,100,101,102,105,110,101,100,0,0,0,0,84,104,105,115,32,112,108,111,116,32,115,116,121,108,101,32,105,115,32,111,110,108,121,32,102,111,114,32,100,97,116,97,102,105,108,101,115,44,32,114,101,118,101,114,116,105,110,103,32,116,111,32,34,112,111,105,110,116,115,34,0,0,0,0,40,98,105,110,100,95,99,111,109,109,97,110,100,41,32,37,115,58,37,100,10,0,0,0,60,61,0,0,0,0,0,0,114,111,117,110,100,0,0,0,100,97,114,107,45,109,97,103,101,110,116,97,0,0,0,0,75,80,95,70,51,0,0,0,32,111,110,108,121,10,0,0,117,116,102,0,0,0,0,0,37,115,61,37,103,0,0,0,68,111,117,98,108,101,86,97,108,117,101,0,0,0,0,0,102,95,115,116,114,102,116,105,109,101,58,32,102,109,116,0,117,115,101,114,0,0,0,0,98,101,118,101,108,101,100,32,0,0,0,0,0,0,0,0,119,101,98,45,98,108,117,101,0,0,0,0,0,0,0,0,9,110,111,32,108,111,103,115,99,97,108,105,110,103,10,0,108,111,99,97,108,101,0,0,115,101,116,32,99,111,108,111,114,98,111,120,32,37,115,10,0,0,0,0,0,0,0,0,114,111,117,110,100,101,100,32,0,0,0,0,0,0,0,0,119,101,98,45,103,114,101,101,110,0,0,0,0,0,0,0,32,97,110,100,0,0,0,0,117,110,107,110,111,119,110,32,45,45,45,32,101,120,112,101,99,116,101,100,32,39,108,111,103,102,105,108,101,39,32,111,114,32,91,110,111,93,101,114,114,111,114,118,97,114,105,97,98,108,101,115,0,0,0,0,65,108,108,32,112,111,105,110,116,115,32,111,102,32,99,111,108,111,114,32,97,120,105,115,32,117,110,100,101,102,105,110,101,100,46,0,0,0,0,0,105,115,111,95,56,56,53,57,95,57,0,0,0,0,0,0,10,35,32,120,32,121,0,0,109,105,116,101,114,101,100,32,0,0,0,0,0,0,0,0,9,108,111,103,115,99,97,108,105,110,103,0,0,0,0,0,110,111,113,117,105,101,116,0,99,117,98,101,104,101,108,105,120,32,115,116,97,114,116,32,37,46,50,103,32,99,121,99,108,101,115,32,37,46,50,103,32,115,97,116,117,114,97,116,105,111,110,32,37,46,50,103,10,0,0,0,0,0,0,0,51,54,48,32,109,117,108,32,115,105,110,0,0,0,0,0,109,111,110,111,99,104,114,111,109,101,32,0,0,0,0,0,100,97,114,107,45,103,114,101,121,0,0,0,0,0,0,0,37,115,32,37,115,32,40,98,97,115,101,32,37,103,41,0,113,117,105,101,116,0,0,0,102,117,110,99,116,105,111,110,115,32,37,115,44,32,37,115,44,32,37,115,10,0,0,0,112,117,115,104,100,49,0,0,99,111,108,111,114,32,0,0,110,101,120,116,102,114,111,109,95,100,121,110,97,114,114,97,121,58,32,100,121,110,97,114,114,97,121,32,119,97,110,39,116,32,105,110,105,116,105,97,108,105,122,101,100,33,0,0,9,111,102,102,115,101,116,115,32,97,114,101,0,0,0,0,110,111,101,114,114,36,111,114,118,97,114,105,97,98,108,101,115,0,0,0,0,0,0,0,32,41,10,0,0,0,0,0,122,58,115,10,0,0,0,0,34,32,92,10,32,32,32,0,9,116,109,97,114,103,105,110,32,105,115,32,99,111,109,112,117,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,10,0,0,0,0,0,101,114,114,36,111,114,118,97,114,105,97,98,108,101,115,0,92,10,32,32,32,32,0,0,47,117,115,114,47,115,104,97,114,101,47,103,104,111,115,116,115,99,114,105,112,116,47,102,111,110,116,115,0,0,0,0,37,51,111,37,110,0,0,0,34,0,0,0,0,0,0,0,99,111,114,110,101,114,115,50,99,36,111,108,111,114,0,0,9,116,109,97,114,103,105,110,32,105,115,32,115,101,116,32,116,111,32,37,103,10,0,0,101,120,112,101,99,116,105,110,103,32,115,116,114,105,110,103,0,0,0,0,0,0,0,0,99,111,110,99,97,116,101,110,97,116,101,0,0,0,0,0,99,97,110,110,111,116,32,111,112,101,110,32,102,105,108,101,59,32,111,117,116,112,117,116,32,110,111,116,32,99,104,97,110,103,101,100,0,0,0,0,37,115,0,0,0,0,0,0,92,10,32,32,32,104,101,97,100,101,114,32,0,0,0,0,101,36,120,112,108,105,99,105,116,0,0,0,0,0,0,0,116,101,115,116,0,0,0,0,9,116,109,97,114,103,105,110,32,105,115,32,115,101,116,32,116,111,32,115,99,114,101,101,110,32,37,103,10,0,0,0,108,111,103,36,102,105,108,101,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,0,0,0,0,0,0,99,97,36,108,108,0,0,0,32,37,46,52,103,32,37,46,52,103,32,37,46,52,103,32,37,46,52,103,0,0,0,0,72,69,76,80,70,73,76,69,32,32,32,32,32,32,32,32,32,32,32,61,32,34,37,115,34,10,0,0,0,0,0,0,115,99,104,97,114,0,0,0,110,111,104,101,97,100,101,114,32,92,10,32,32,32,0,0,110,111,105,36,109,112,108,105,99,105,116,0,0,0,0,0,9,114,109,97,114,103,105,110,32,105,115,32,99,111,109,112,117,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,10,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,102,111,114,109,97,116,32,115,116,114,105,110,103,0,100,101,102,105,110,101,100,32,40,0,0,0,0,0,0,0]) -.concat([79,117,116,32,111,102,32,109,101,109,111,114,121,32,105,110,32,115,116,97,116,115,58,32,116,111,111,32,109,97,110,121,32,100,97,116,97,112,111,105,110,116,115,32,40,37,100,41,63,0,0,0,0,0,0,0,32,114,103,98,32,34,37,115,34,32,0,0,0,0,0,0,65,108,108,32,112,111,105,110,116,115,32,120,32,118,97,108,117,101,32,117,110,100,101,102,105,110,101,100,0,0,0,0,34,119,105,116,104,34,32,97,108,108,111,119,101,100,32,111,110,108,121,32,97,102,116,101,114,32,112,97,114,97,109,101,116,114,105,99,32,102,117,110,99,116,105,111,110,32,102,117,108,108,121,32,115,112,101,99,105,102,105,101,100,0,0,0,97,108,108,36,119,105,110,100,111,119,115,0,0,0,0,0,62,61,0,0,0,0,0,0,110,111,116,105,109,101,115,116,97,109,112,0,0,0,0,0,110,111,101,36,120,112,108,105,99,105,116,0,0,0,0,0,75,80,95,70,50,0,0,0,9,114,109,97,114,103,105,110,32,105,115,32,115,101,116,32,116,111,32,37,103,10,0,0,99,108,111,115,101,100,0,0,70,108,111,97,116,86,97,108,117,101,0,0,0,0,0,0,70,105,114,115,116,32,112,97,114,97,109,101,116,101,114,32,116,111,32,115,116,114,102,116,105,109,101,32,109,117,115,116,32,98,101,32,97,32,102,111,114,109,97,116,32,115,116,114,105,110,103,0,0,0,0,0,114,103,98,102,111,114,109,117,108,97,101,32,37,100,44,32,37,100,44,32,37,100,10,0,114,97,36,105,115,101,0,0,100,111,109,97,105,110,0,0,116,105,109,101,115,116,97,109,112,0,0,0,0,0,0,0,105,36,109,112,108,105,99,105,116,0,0,0,0,0,0,0,9,114,109,97,114,103,105,110,32,105,115,32,115,101,116,32,116,111,32,115,99,114,101,101,110,32,37,103,10,0,0,0,78,97,78,0,0,0,0,0,10,115,101,116,32,112,97,108,101,116,116,101,32,0,0,0,119,104,105,99,104,61,61,65,85,84,79,83,67,65,76,69,95,77,73,78,32,124,124,32,119,104,105,99,104,61,61,65,85,84,79,83,67,65,76,69,95,77,65,88,0,0,0,0,105,110,112,117,116,0,0,0,116,114,36,97,110,115,112,97,114,101,110,116,0,0,0,0,9,98,109,97,114,103,105,110,32,105,115,32,99,111,109,112,117,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,10,0,0,0,0,0,108,97,121,101,114,100,36,101,102,97,117,108,116,0,0,0,87,97,114,110,105,110,103,32,45,32,100,105,102,102,105,99,117,108,116,121,32,102,105,116,116,105,110,103,32,112,108,111,116,32,116,105,116,108,101,115,32,105,110,116,111,32,107,101,121,0,0,0,0,0,0,0,115,97,118,101,46,99,0,0,115,116,97,110,100,97,108,111,110,101,0,0,0,0,0,0,110,111,115,111,36,108,105,100,0,0,0,0,0,0,0,0,9,98,109,97,114,103,105,110,32,105,115,32,115,101,116,32,116,111,32,37,103,10,0,0,110,111,112,111,36,108,97,114,0,0,0,0,0,0,0,0,37,115,58,37,100,32,111,111,111,112,115,58,32,85,110,107,110,111,119,110,32,99,111,108,111,114,32,109,111,100,101,108,32,39,37,99,39,46,10,0,124,99,111,115,40,49,56,48,120,41,124,0,0,0,0,0,115,105,122,101,32,37,103,37,115,44,37,103,37,115,32,37,115,32,37,115,32,37,115,0,110,111,116,114,36,97,110,115,112,97,114,101,110,116,0,0,9,98,109,97,114,103,105,110,32,105,115,32,115,101,116,32,116,111,32,115,99,114,101,101,110,32,37,103,10,0,0,0,112,111,36,108,97,114,0,0,88,89,90,32,0,0,0,0,107,101,121,119,111,114,100,32,39,100,97,116,97,39,32,100,101,112,114,101,99,97,116,101,100,44,32,117,115,101,32,39,115,104,111,119,32,115,116,121,108,101,32,100,97,116,97,39,0,0,0,0,0,0,0,0,101,120,116,114,97,110,101,111,117,115,32,97,114,103,117,109,101,110,116,32,105,110,32,115,101,116,32,116,101,114,109,105,110,97,108,32,37,115,0,0,9,108,109,97,114,103,105,110,32,105,115,32,99,111,109,112,117,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,10,0,0,0,0,0,110,111,114,36,116,105,99,115,0,0,0,0,0,0,0,0,89,73,81,32,0,0,0,0,122,10,0,0,0,0,0,0,71,110,117,112,108,111,116,32,119,97,115,32,98,117,105,108,116,32,119,105,116,104,111,117,116,32,115,117,112,112,111,114,116,32,102,111,114,32,80,78,71,32,105,109,97,103,101,115,46,32,89,111,117,32,99,97,110,110,111,116,32,117,115,101,32,116,104,105,115,32,111,112,116,105,111,110,32,117,110,108,101,115,115,32,121,111,117,32,114,101,98,117,105,108,100,32,103,110,117,112,108,111,116,46,0,0,0,0,0,0,0,0,110,111,104,105,36,100,100,101,110,51,100,0,0,0,0,0,9,108,109,97,114,103,105,110,32,105,115,32,115,101,116,32,116,111,32,37,103,10,0,0,110,111,109,99,98,36,116,105,99,115,0,0,0,0,0,0,67,77,89,32,0,0,0,0,47,117,115,114,47,108,105,98,47,88,49,49,47,102,111,110,116,115,33,0,0,0,0,0,37,52,111,37,110,0,0,0,97,114,114,111,119,32,110,111,116,32,102,111,117,110,100,0,83,116,114,105,110,103,32,99,111,110,116,97,105,110,105,110,103,32,104,101,97,100,101,114,32,105,110,102,111,114,109,97,116,105,111,110,32,101,120,112,101,99,116,101,100,0,0,0,104,105,36,100,100,101,110,51,100,0,0,0,0,0,0,0,9,108,109,97,114,103,105,110,32,105,115,32,115,101,116,32,116,111,32,115,99,114,101,101,110,32,37,103,10,0,0,0,110,111,99,98,36,116,105,99,115,0,0,0,0,0,0,0,72,83,86,32,0,0,0,0,100,111,108,108,97,114,115,0,119,98,0,0,0,0,0,0,101,110,108,0,0,0,0,0,10,92,115,116,97,114,116,116,101,120,116,10,10,0,0,0,109,97,112,0,0,0,0,0,115,121,36,115,116,101,109,0,9,111,117,116,112,117,116,32,105,115,32,115,101,110,116,32,116,111,32,83,84,68,79,85,84,10,0,0,0,0,0,0,110,111,109,121,50,36,116,105,99,115,0,0,0,0,0,0,115,117,109,120,121,0,0,0,82,71,66,32,0,0,0,0,99,104,97,114,0,0,0,0,101,120,116,101,114,110,97,108,0,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,99,104,97,114,97,99,116,101,114,32,37,99,0,0,0,0,99,108,105,112,52,36,105,110,0,0,0,0,0,0,0,0,9,111,117,116,112,117,116,32,105,115,32,115,101,110,116,32,116,111,32,39,37,115,39,10,0,0,0,0,0,0,0,0,110,111,109,120,50,36,116,105,99,115,0,0,0,0,0,0,99,111,108,111,114,32,109,111,100,101,108,32,0,0,0,0,32,114,103,98,32,118,97,114,105,97,98,108,101,32,0,0,110,111,32,102,117,110,99,116,105,111,110,115,32,111,114,32,100,97,116,97,32,116,111,32,112,108,111,116,0,0,0,0,42,0,0,0,0,0,0,0,105,110,108,105,110,101,0,0,99,108,105,112,49,36,105,110,0,0,0,0,0,0,0,0,75,80,95,70,49,0,0,0,9,112,114,105,110,116,32,111,117,116,112,117,116,32,105,115,32,115,101,110,116,32,116,111,32,39,37,115,39,10,0,0,110,111,109,122,36,116,105,99,115,0,0,0,0,0,0,0,98,101,108,111,119,32,0,0,83,105,103,110,101,100,76,111,110,103,0,0,0,0,0,0,102,95,103,112,114,105,110,116,102,0,0,0,0,0,0,0,103,114,97,121,10,0,0,0,32,32,32,32,105,109,97,103,101,115,61,37,115,93,32,37,37,32,42,105,110,108,105,110,101,42,32,124,32,101,120,116,101,114,110,97,108,32,40,105,110,108,105,110,101,32,111,110,108,121,32,119,111,114,107,115,32,105,110,32,77,75,73,86,44,32,101,120,116,101,114,110,97,108,32,114,101,113,117,105,114,101,115,32,112,110,103,32,115,117,112,112,111,114,116,32,105,110,32,103,110,117,112,108,111,116,41,10,0,0,0,0,110,111,102,116,114,36,105,97,110,103,108,101,115,0,0,0,9,100,101,102,97,117,108,116,32,115,121,115,116,101,109,32,100,105,114,101,99,116,111,114,121,32,34,37,115,34,10,0,110,111,109,121,36,116,105,99,115,0,0,0,0,0,0,0,103,97,109,109,97,32,37,103,32,0,0,0,0,0,0,0,99,111,110,116,111,117,114,32,99,111,111,114,100,115,0,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,111,117,116,32,111,102,32,109,101,109,111,114,121,32,105,110,32,115,116,97,116,115,0,0,116,101,120,0,0,0,0,0,102,116,114,36,105,97,110,103,108,101,115,0,0,0,0,0,110,111,109,120,36,116,105,99,115,0,0,0,0,0,0,0,115,101,116,32,116,101,114,109,105,110,97,108,32,37,115,32,37,115,10,0,0,0,0,0,98,111,117,110,100,97,114,121,0,0,0,0,0,0,0,0,35,32,67,111,110,116,111,117,114,58,32,112,111,105,110,116,115,32,37,105,44,32,122,32,37,103,44,32,108,97,98,101,108,58,32,37,115,10,0,0,109,101,116,97,112,111,115,116,0,0,0,0,0,0,0,0,102,108,36,117,115,104,0,0,9,101,110,118,105,114,111,110,109,101,110,116,32,118,97,114,105,97,98,108,101,32,71,78,85,80,76,79,84,95,80,83,95,68,73,82,58,32,0,0,110,111,121,50,36,116,105,99,115,0,0,0,0,0,0,0,117,115,101,32,39,115,101,116,32,116,101,114,109,39,32,116,111,32,115,101,116,32,116,101,114,109,105,110,97,108,32,116,121,112,101,32,102,105,114,115,116,0,0,0,0,0,0,0,49,56,48,32,109,117,108,32,99,111,115,32,97,98,115,0,32,32,32,32,112,111,105,110,116,115,61,37,115,44,32,37,37,32,42,109,101,116,97,112,111,115,116,42,32,124,32,116,101,120,32,40,83,104,111,117,108,100,32,112,111,105,110,116,115,32,98,101,32,100,114,97,119,110,32,119,105,116,104,32,77,101,116,97,80,111,115,116,32,111,114,32,84,101,88,63,41,10,0,0,0,0,0,0,100,101,112,36,116,104,111,114,100,101,114,0,0,0,0,0,110,111,110,101,0,0,0,0,110,111,120,50,36,116,105,99,115,0,0,0,0,0,0,0,110,101,103,97,116,105,118,101,0,0,0,0,0,0,0,0,45,104,0,0,0,0,0,0,32,32,32,32,37,37,102,111,110,116,115,99,97,108,101,61,37,103,44,32,37,37,32,115,99,97,108,105,110,103,32,102,97,99,116,111,114,32,102,111,114,32,116,101,120,116,32,108,97,98,101,108,115,10,0,0,115,99,97,110,115,97,117,116,111,36,109,97,116,105,99,0,110,111,122,36,116,105,99,115,0,0,0,0,0,0,0,0,112,111,115,105,116,105,118,101,0,0,0,0,0,0,0,0,37,115,58,0,0,0,0,0,101,120,112,114,101,115,115,105,111,110,32,101,120,112,101,99,116,101,100,0,0,0,0,0,32,32,32,32,108,105,110,101,119,105,100,116,104,61,37,103,44,32,37,37,32,115,99,97,108,105,110,103,32,102,97,99,116,111,114,32,102,111,114,32,108,105,110,101,32,119,105,100,116,104,115,32,40,49,46,48,32,109,101,97,110,115,32,48,46,53,98,112,41,10,0,0,115,99,97,110,115,98,97,99,107,36,119,97,114,100,0,0,9,100,105,114,101,99,116,111,114,121,32,102,114,111,109,32,39,115,101,116,32,112,115,100,105,114,39,58,32,0,0,0,110,111,121,36,116,105,99,115,0,0,0,0,0,0,0,0,115,101,116,32,112,97,108,101,116,116,101,32,37,115,32,37,115,32,109,97,120,99,111,108,111,114,115,32,37,100,32,0,47,117,115,114,47,88,49,49,82,54,47,108,105,98,47,88,49,49,47,102,111,110,116,115,47,116,114,117,101,116,121,112,101,0,0,0,0,0,0,0,119,97,114,110,105,110,103,58,32,0,0,0,0,0,0,0,101,120,116,114,97,110,101,111,117,115,32,97,114,103,117,109,101,110,116,115,32,116,111,32,117,110,115,101,116,32,97,114,114,111,119,0,0,0,0,0,32,32,32,32,100,97,115,104,108,101,110,103,116,104,61,37,103,44,32,37,37,32,115,99,97,108,105,110,103,32,102,97,99,116,111,114,32,102,111,114,32,100,97,115,104,32,108,101,110,103,116,104,115,10,0,0,115,99,97,110,115,102,111,114,36,119,97,114,100,0,0,0,9,112,97,114,97,109,101,116,114,105,99,32,105,115,32,37,115,10,0,0,0,0,0,0,110,111,120,36,116,105,99,115,0,0,0,0,0,0,0,0,99,37,105,0,0,0,0,0,98,111,111,108,0,0,0,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,105,112,101,59,32,111,117,116,112,117,116,32,110,111,116,32,99,104,97,110,103,101,100,0,0,10,35,32,67,111,110,116,111,117,114,32,37,100,44,32,108,97,98,101,108,58,32,37,115,10,0,0,0,0,0,0,0,110,111,0,0,0,0,0,0,105,110,116,101,114,112,36,111,108,97,116,101,0,0,0,0,115,116,36,97,116,115,0,0,35,37,48,50,120,37,48,50,120,37,48,50,120,32,61,32,37,51,105,32,37,51,105,32,37,51,105,0,0,0,0,0,105,103,110,111,114,105,110,103,32,108,101,102,116,47,99,101,110,116,101,114,47,114,105,103,104,116,59,32,105,110,99,111,109,112,97,116,105,98,108,101,32,119,105,116,104,32,108,109,97,114,103,105,110,47,116,109,97,114,103,105,110,46,0,0,99,111,114,114,101,108,97,116,105,111,110,0,0,0,0,0,114,101,112,108,111,116,0,0,101,120,116,101,110,100,32,116,111,107,101,110,32,116,97,98,108,101,0,0,0,0,0,0,71,78,85,80,76,79,84,95,80,83,95,68,73,82,32,32,32,32,32,61,32,34,37,115,34,10,0,0,0,0,0,0,122,114,116,0,0,0,0,0,121,101,115,0,0,0,0,0,88,89,90,0,0,0,0,0,10,32,32,37,45,49,56,115,32,0,0,0,0,0,0,0,111,102,36,102,115,101,116,0,105,103,110,111,114,105,110,103,32,116,111,112,47,99,101,110,116,101,114,47,98,111,116,116,111,109,59,32,105,110,99,111,109,112,97,116,105,98,108,101,32,119,105,116,104,32,116,109,97,114,103,105,110,47,98,109,97,114,103,105,110,46,0,0,32,112,97,108,101,116,116,101,32,102,114,97,99,116,105,111,110,32,37,52,46,50,102,0,105,103,110,111,114,105,110,103,32,116,114,97,105,108,105,110,103,32,99,111,109,109,97,32,105,110,32,112,108,111,116,32,99,111,109,109,97,110,100,0,46,103,110,117,112,108,111,116,0,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,117,115,97,103,101,58,32,114,97,105,115,101,32,123,112,108,111,116,95,105,100,125,0,0,119,32,61,32,48,32,105,110,32,71,105,118,101,110,115,40,41,59,32,32,67,106,106,32,61,32,37,103,44,32,32,67,105,106,32,61,32,37,103,0,67,97,110,39,116,32,99,97,108,99,117,108,97,116,101,32,97,112,112,114,111,120,105,109,97,116,105,111,110,32,115,112,108,105,110,101,115,44,32,110,101,101,100,32,97,116,32,108,101,97,115,116,32,52,32,112,111,105,110,116,115,0,0,0,32,32,32,32,100,97,115,104,101,100,61,37,115,44,32,37,37,32,42,121,101,115,42,32,124,32,110,111,10,0,0,0,89,73,81,0,0,0,0,0,75,80,95,84,97,98,0,0,102,105,108,108,101,100,95,112,111,108,121,103,111,110,95,122,102,105,120,32,99,111,114,110,101,114,115,0,0,0,0,0,9,84,104,101,114,101,32,97,114,101,32,37,100,32,112,114,101,100,101,102,105,110,101,100,32,99,111,108,111,114,32,110,97,109,101,115,58,0,0,0,117,110,107,110,111,119,110,32,107,101,121,32,111,112,116,105,111,110,0,0,0,0,0,0,97,98,111,118,101,32,0,0,85,110,115,105,103,110,101,100,76,111,110,103,0,0,0,0,70,105,114,115,116,32,112,97,114,97,109,101,116,101,114,32,116,111,32,103,112,114,105,110,116,102,32,109,117,115,116,32,98,101,32,97,32,102,111,114,109,97,116,32,115,116,114,105,110,103,0,0,0,0,0,0,99,97,110,32,111,110,108,121,32,100,111,32,101,108,108,105,112,116,105,99,32,105,110,116,101,103,114,97,108,115,32,111,102,32,114,101,97,108,115,0,44,32,37,37,32,42,98,117,116,116,42,32,124,32,114,111,117,110,100,101,100,32,124,32,115,113,117,97,114,101,100,10,0,0,0,0,0,0,0,0,67,77,89,0,0,0,0,0,37,105,9,37,105,9,37,105,10,0,0,0,0,0,0,0,97,36,117,116,111,109,97,116,105,99,0,0,0,0,0,0,114,101,99,117,114,115,105,111,110,32,100,101,112,116,104,32,108,105,109,105,116,32,101,120,99,101,101,100,101,100,0,0,116,105,99,107,32,105,110,116,101,114,118,97,108,32,116,111,111,32,115,109,97,108,108,32,102,111,114,32,109,97,99,104,105,110,101,32,112,114,101,99,105,115,105,111,110,0,0,0,115,113,117,97,114,101,100,0,72,83,86,0,0,0,0,0,37,48,46,52,102,9,37,48,46,52,102,9,37,48,46,52,102,10,0,0,0,0,0,0,99,111,108,36,117,109,110,104,101,97,100,101,114,0,0,0,95,94,0,0,0,0,0,0,98,117,116,116,0,0,0,0,82,71,66,0,0,0,0,0,46,10,0,0,0,0,0,0,77,117,108,116,105,112,108,101,32,115,116,97,99,107,32,100,105,114,101,99,116,105,111,110,32,115,101,116,116,105,110,103,115,0,0,0,0,0,0,0,32,99,111,114,110,101,114,115,50,99,111,108,111,114,32,0,115,105,110,40,49,56,48,120,41,0,0,0,0,0,0,0,32,32,32,32,108,105,110,101,99,97,112,61,0,0,0,0,99,117,98,101,104,101,108,105,120,0,0,0,0,0,0,0,32,115,97,118,101,100,32,116,111,32,34,37,115,34,46,0,77,117,108,116,105,112,108,101,32,108,111,99,97,116,105,111,110,32,114,101,103,105,111,110,32,115,101,116,116,105,110,103,115,0,0,0,0,0,0,0,32,110,111,104,105,100,100,101,110,51,100,0,0,0,0,0,105,110,118,101,114,115,101,95,101,114,114,111,114,95,102,117,110,99,58,32,84,104,101,32,118,97,108,117,101,32,111,117,116,32,111,102,32,116,104,101,32,114,97,110,103,101,32,111,102,32,116,104,101,32,102,117,110,99,116,105,111,110,0,0,44,32,37,37,32,42,109,105,116,101,114,101,100,42,32,124,32,114,111,117,110,100,101,100,32,124,32,98,101,118,101,108,101,100,10,0,0,0,0,0,103,97,109,36,109,97,0,0,67,111,108,111,114,0,0,0,77,117,108,116,105,112,108,101,32,104,111,114,105,122,111,110,116,97,108,32,112,111,115,105,116,105,111,110,32,115,101,116,116,105,110,103,115,0,0,0,32,104,105,100,100,101,110,51,100,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,102,111,114,109,97,116,32,61,32,0,0,0,0,0,0,0,98,101,118,101,108,101,100,0,109,97,120,99,36,111,108,111,114,115,0,0,0,0,0,0,71,114,97,121,0,0,0,0,77,117,108,116,105,112,108,101,32,118,101,114,116,105,99,97,108,32,112,111,115,105,116,105,111,110,32,115,101,116,116,105,110,103,115,0,0,0,0,0,32,104,105,100,100,101,110,51,100,32,37,100,0,0,0,0,47,117,115,114,47,88,49,49,82,54,47,108,105,98,47,88,49,49,47,102,111,110,116,115,47,84,121,112,101,49,0,0,71,80,86,65,76,95,69,82,82,77,83,71,0,0,0,0,116,121,120,0,0,0,0,0,114,111,117,110,100,101,100,0,112,115,95,97,108,108,99,70,0,0,0,0,0,0,0,0,37,115,32,112,97,108,101,116,116,101,32,119,105,116,104,32,37,105,32,100,105,115,99,114,101,116,101,32,99,111,108,111,114,115,0,0,0,0,0,0,102,105,108,108,95,110,117,109,98,101,114,115,32,99,108,111,115,105,110,103,0,0,0,0,102,116,114,105,97,110,103,108,101,115,0,0,0,0,0,0,102,97,99,116,111,114,105,97,108,0,0,0,0,0,0,0,119,0,0,0,0,0,0,0,37,99,10,0,0,0,0,0,109,105,116,101,114,101,100,0,110,111,112,115,95,97,108,108,99,70,0,0,0,0,0,0,115,112,36,108,111,116,0,0,101,120,112,101,99,116,105,110,103,32,110,111,32,111,112,116,105,111,110,32,111,114,32,105,110,116,32,111,114,32,102,108,111,97,116,0,0,0,0,0,115,116,114,105,110,103,32,101,120,112,101,99,116,101,100,0,105,110,116,101,114,99,101,112,116,0,0,0,0,0,0,0,32,110,111,0,0,0,0,0,47,117,115,114,47,108,111,99,97,108,47,115,104,97,114,101,47,103,110,117,112,108,111,116,47,52,46,54,47,103,110,117,112,108,111,116,46,103,105,104,0,0,0,0,0,0,0,0,116,122,114,0,0,0,0,0,108,105,110,101,106,111,105,110,61,0,0,0,0,0,0,0,109,111,36,100,101,108,0,0,105,36,110,116,0,0,0,0,110,111,112,111,36,105,110,116,0,0,0,0,0,0,0,0,102,105,108,108,95,110,117,109,98,101,114,115,32,114,101,115,105,122,101,32,112,97,116,116,101,114,110,0,0,0,0,0,67,111,110,102,108,105,99,116,32,98,101,116,119,101,101,110,32,115,111,109,101,32,109,97,116,114,105,120,32,98,105,110,97,114,121,32,97,110,100,32,103,101,110,101,114,97,108,32,98,105,110,97,114,121,32,107,101,121,119,111,114,100,115,0,32,112,97,108,101,116,116,101,32,99,98,32,37,103,0,0,115,97,109,112,108,101,115,32,111,114,32,105,115,111,95,115,97,109,112,108,101,115,32,60,32,50,46,32,77,117,115,116,32,98,101,32,97,116,32,108,101,97,115,116,32,50,46,0,103,110,117,112,108,111,116,114,99,0,0,0,0,0,0,0,62,0,0,0,0,0,0,0,117,115,97,103,101,58,32,108,111,119,101,114,32,123,112,108,111,116,95,105,100,125,0,0,92,115,101,116,117,112,71,78,85,80,76,79,84,116,101,114,109,105,110,97,108,10,32,32,32,91,99,111,110,116,101,120,116,93,10,32,32,32,91,0,102,117,110,99,36,116,105,111,110,115,0,0,0,0,0,0,75,80,95,83,112,97,99,101,0,0,0,0,0,0,0,0,102,36,108,111,97,116,0,0,102,105,108,108,95,110,117,109,98,101,114,115,32,110,101,120,116,32,110,117,109,98,101,114,0,0,0,0,0,0,0,0,115,121,110,116,97,120,32,105,115,32,120,121,61,60,120,62,44,60,121,62,0,0,0,0,83,105,103,110,101,100,73,110,116,101,103,101,114,0,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,105,110,118,97,108,105,100,32,115,112,101,99,95,116,121,112,101,0,0,0,0,0,0,0,76,97,115,116,32,108,105,110,101,32,109,117,115,116,32,110,111,116,32,98,101,32,98,101,102,111,114,101,32,102,105,114,115,116,32,108,105,110,101,0,92,115,101,116,117,112,98,111,100,121,102,111,110,116,10,32,32,32,91,37,115,37,115,37,103,112,116,93,10,0,0,0,102,105,108,101,0,0,0,0,112,97,108,101,116,116,101,32,115,105,122,101,32,114,101,113,117,105,114,101,100,0,0,0,99,111,110,115,116,97,110,116,32,101,120,112,114,101,115,115,105,111,110,32,101,120,112,101,99,116,101,100,0,0,0,0,98,101,103,105,110,0,0,0,76,97,115,116,32,112,111,105,110,116,32,109,117,115,116,32,110,111,116,32,98,101,32,98,101,102,111,114,101,32,102,105,114,115,116,32,112,111,105,110,116,0,0,0,0,0,0,0,84,111,111,32,109,97,110,121,32,97,120,105,115,32,116,105,99,107,115,32,114,101,113,117,101,115,116,101,100,32,40,62,37,46,48,103,41,0,0,0,102,117,110,99,116,105,111,110,32,37,115,32,114,101,113,117,105,114,101,115,32,37,100,32,118,97,114,105,97,98,108,101,115,0,0,0,0,0,0,0,92,100,101,102,105,110,101,98,111,100,121,102,111,110,116,101,110,118,105,114,111,110,109,101,110,116,10,32,32,32,91,37,103,112,116,93,10,0,0,0,100,101,102,36,105,110,101,100,0,0,0,0,0,0,0,0,37,51,105,46,32,103,114,97,121,61,37,48,46,52,102,44,32,40,114,44,103,44,98,41,61,40,37,48,46,52,102,44,37,48,46,52,102,44,37,48,46,52,102,41,44,32,35,37,48,50,120,37,48,50,120,37,48,50,120,32,61,32,37,51,105,32,37,51,105,32,37,51,105,10,0,0,0,0,0,0,102,105,108,108,95,110,117,109,98,101,114,115,32,111,117,116,112,117,116,32,98,117,102,102,101,114,0,0,0,0,0,0,69,120,112,101,99,116,101,100,32,110,111,110,45,110,101,103,97,116,105,118,101,32,105,110,116,101,103,101,114,0,0,0,114,103,98,36,102,111,114,109,117,108,97,101,0,0,0,0,9,99,111,108,111,114,32,109,97,112,112,105,110,103,32,42,110,111,116,42,32,100,111,110,101,32,98,121,32,100,101,102,105,110,101,100,32,103,114,97,100,105,101,110,116,46,10,0,112,111,105,110,116,116,36,121,112,101,0,0,0,0,0,0,32,102,108,117,115,104,32,0,69,120,112,101,99,116,101,100,32,112,111,115,105,116,105,118,101,32,105,110,116,101,103,101,114,0,0,0,0,0,0,0,49,56,48,32,109,117,108,32,115,105,110,0,0,0,0,0,92,115,101,116,117,112,99,111,108,111,114,115,10,32,32,32,91,115,116,97,116,101,61,115,116,97,114,116,93,10,0,0,9,32,32,42,32,116,104,117,115,32,116,104,101,32,114,97,110,103,101,115,32,105,110,32,96,115,101,116,32,112,109,51,100,32,114,103,98,102,111,114,109,117,108,97,101,39,32,97,114,101,32,45,37,105,46,46,37,105,10,0,0,0,0,0,108,105,110,101,116,36,121,112,101,0,0,0,0,0,0,0,115,101,116,32,112,109,51,100,32,105,110,116,101,114,112,111,108,97,116,101,32,37,100,44,37,100,0,0,0,0,0,0,73,110,100,101,120,32,115,116,101,112,32,109,117,115,116,32,98,101,32,112,111,115,105,116,105,118,101,0,0,0,0,0,92,117,115,101,109,111,100,117,108,101,10,32,32,32,91,103,110,117,112,108,111,116,93,10,0,0,0,0,0,0,0,0,78,111,32,115,117,99,104,32,111,112,116,105,111,110,32,116,111,32,104,105,100,100,101,110,51,100,32,40,111,114,32,119,114,111,110,103,32,111,114,100,101,114,41,0,0,0,0,0,103,114,101,121,0,0,0,0,9,32,32,42,32,110,101,103,97,116,105,118,101,32,110,117,109,98,101,114,115,32,109,101,97,110,32,105,110,118,101,114,116,101,100,61,110,101,103,97,116,105,118,101,32,99,111,108,111,117,114,32,99,111,109,112,111,110,101,110,116,10,0,0,100,101,112,116,104,111,114,100,101,114,10,0,0,0,0,0,85,112,112,101,114,32,105,110,100,101,120,32,115,104,111,117,108,100,32,98,101,32,98,105,103,103,101,114,32,116,104,97,110,32,108,111,119,101,114,32,105,110,100,101,120,0,0,0,70,73,84,58,32,32,32,32,100,97,116,97,32,114,101,97,100,32,102,114,111,109,32,37,115,10,0,0,0,0,0,0,92,101,110,97,98,108,101,114,101,103,105,109,101,10,32,32,32,91,117,116,102,45,56,93,10,0,0,0,0,0,0,0,37,50,105,58,32,37,45,49,53,115,0,0,0,0,0,0,115,99,97,110,115,98,97,99,107,119,97,114,100,10,0,0,66,105,110,97,114,121,32,109,97,116,114,105,120,32,102,105,108,101,32,102,111,114,109,97,116,32,100,111,101,115,32,110,111,116,32,97,108,108,111,119,32,109,111,114,101,32,116,104,97,110,32,111,110,101,32,115,117,114,102,97,99,101,32,112,101,114,32,102,105,108,101,0,67,0,0,0,0,0,0,0,10,10,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,112,111,105,110,116,115,39,44,32,39,111,110,101,39,44,32,111,114,32,39,116,119,111,39,0,0,0,0,0,76,73,78,69,83,0,0,0,37,37,32,83,101,101,32,97,108,115,111,32,104,116,116,112,58,47,47,119,105,107,105,46,99,111,110,116,101,120,116,103,97,114,100,101,110,46,110,101,116,47,71,110,117,112,108,111,116,10,37,37,10,0,0,0,110,101,103,36,97,116,105,118,101,0,0,0,0,0,0,0,10,9,32,32,32,32,0,0,99,101,110,116,114,101,0,0,115,99,97,110,115,102,111,114,119,97,114,100,10,0,0,0,112,111,119,101,114,0,0,0,73,110,32,109,117,108,116,105,112,108,111,116,32,109,111,100,101,32,121,111,117,32,99,97,110,39,116,32,99,104,97,110,103,101,32,116,104,101,32,111,117,116,112,117,116,10,0,0,32,100,101,108,116,97,95,120,32,100,101,108,116,97,95,121,32,100,101,108,116,97,95,122,0,0,0,0,0,0,0,0,37,37,32,71,78,85,80,76,79,84,32,118,101,114,115,105,111,110,58,32,37,115,46,37,115,44,32,116,101,114,109,105,110,97,108,32,118,101,114,115,105,111,110,58,32,37,115,46,37,115,32,40,37,115,41,10,0,0,0,0,0,0,0,0,112,111,115,36,105,116,105,118,101,0,0,0,0,0,0,0,115,104,36,111,119,0,0,0,9,32,32,42,32,116,104,101,114,101,32,97,114,101,32,37,105,32,97,118,97,105,108,97,98,108,101,32,114,103,98,32,99,111,108,111,114,32,109,97,112,112,105,110,103,32,102,111,114,109,117,108,97,101,58,0,115,108,111,112,101,0,0,0,115,99,97,110,115,97,117,116,111,109,97,116,105,99,10,0,102,70,101,69,103,71,0,0,71,78,85,72,69,76,80,0,10,0,0,0,0,0,0,0,114,116,122,0,0,0,0,0,98,97,36,99,107,0,0,0,9,84,104,101,32,98,101,115,116,32,109,97,116,99,104,32,111,102,32,116,104,101,32,99,117,114,114,101,110,116,32,112,97,108,101,116,116,101,32,99,111,114,114,101,115,112,111,110,100,115,32,116,111,10,9,32,32,32,32,115,101,116,32,112,97,108,101,116,116,101,32,114,103,98,102,111,114,109,117,108,97,101,32,37,105,44,37,105,44,37,105,10,0,0,0,0,112,111,36,105,110,116,0,0,32,97,116,32,37,115,10,0,43,45,35,48,49,50,51,52,53,54,55,56,57,46,0,0,32,112,97,108,101,116,116,101,32,122,0,0,0,0,0,0,121,32,114,97,110,103,101,0,110,101,0,0,0,0,0,0,32,111,110,58,32,37,115,0,102,114,36,111,110,116,0,0,66,101,103,105,110,0,0,0,102,111,114,109,117,108,97,101,32,112,116,115,0,0,0,0,116,109,112,32,108,111,97,100,112,97,116,104,0,0,0,0,101,120,112,108,105,99,105,116,0,0,0,0,0,0,0,0,102,95,115,112,114,105,110,116,102,58,32,97,116,116,101,109,112,116,32,116,111,32,112,114,105,110,116,32,115,116,114,105,110,103,32,118,97,108,117,101,32,119,105,116,104,32,110,117,109,101,114,105,99,32,102,111,114,109,97,116,0,0,0,0,85,110,115,105,103,110,101,100,73,110,116,101,103,101,114,0,116,105,99,108,97,98,101,108,115,32,109,117,115,116,32,99,111,109,101,32,102,114,111,109,32,97,32,114,101,97,108,32,99,111,108,117,109,110,0,0,37,89,45,37,109,45,37,100,32,37,72,58,37,77,32,37,90,0,0,0,0,0,0,0,102,111,114,109,117,108,97,101,0,0,0,0,0,0,0,0,116,109,112,32,102,111,110,116,112,97,116,104,0,0,0,0,105,109,112,108,105,99,105,116,0,0,0,0,0,0,0,0,102,111,114,109,97,116,32,109,117,115,116,32,104,97,118,101,32,49,45,55,32,99,111,110,118,101,114,115,105,111,110,115,32,111,102,32,116,121,112,101,32,100,111,117,98,108,101,32,40,37,37,108,102,41,0,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,32,58,32,117,110,107,110,111,119,110,32,116,105,99,32,116,121,112,101,0,0,0,0,0,0,0,37,37,32,87,114,105,116,116,101,110,32,98,121,32,67,111,110,84,101,88,116,32,116,101,114,109,105,110,97,108,32,102,111,114,32,71,78,85,80,76,79,84,0,0,0,0,0,0,111,36,114,105,103,105,110,0,102,111,114,109,117,108,97,101,83,101,113,0,0,0,0,0,101,120,112,101,99,116,101,100,32,115,116,114,105,110,103,0,115,101,116,32,112,109,51,100,32,0,0,0,0,0,0,0,99,111,114,110,101,114,115,32,102,111,114,32,102,105,108,108,101,100,99,117,114,118,101,115,0,0,0,0,0,0,0,0,67,111,108,117,109,110,32,109,117,115,116,32,98,101,32,62,61,32,45,50,0,0,0,0,92,101,110,100,105,110,112,117,116,10,0,0,0,0,0,0,110,111,98,111,36,114,100,101,114,0,0,0,0,0,0,0,82,71,66,32,112,116,115,0,108,111,103,32,98,97,115,101,32,109,117,115,116,32,98,101,32,62,32,49,46,48,59,32,108,111,103,115,99,97,108,101,32,117,110,99,104,97,110,103,101,100,0,0,0,0,0,0,115,101,116,32,108,111,99,97,108,101,32,34,37,115,34,10,0,0,0,0,0,0,0,0,40,50,120,45,49,41,94,50,0,0,0,0,0,0,0,0,92,115,116,111,112,116,101,120,116,10,0,0,0,0,0,0,98,100,36,101,102,97,117,108,116,0,0,0,0,0,0,0,100,111,112,108,111,116,0,0,9,67,117,114,114,101,110,116,32,112,97,108,101,116,116,101,32,105,115,10,9,32,32,32,32,115,101,116,32,112,97,108,101,116,116,101,32,114,103,98,102,111,114,109,117,108,97,101,32,37,105,44,37,105,44,37,105,10,0,0,0,0,0,0,115,101,116,32,116,109,97,114,103,105,110,32,37,115,32,37,103,10,0,0,0,0,0,0,99,98,116,105,99,36,108,97,98,101,108,115,0,0,0,0,92,115,116,111,112,71,78,85,80,76,79,84,103,114,97,112,104,105,99,10,0,0,0,0,98,111,36,114,100,101,114,0,69,120,112,101,99,116,105,110,103,32,39,103,114,97,100,105,101,110,116,39,32,111,114,32,39,112,97,108,101,116,116,101,32,60,110,62,39,32,111,114,32,39,114,103,98,102,111,114,109,117,108,97,101,39,32,111,114,32,39,99,111,108,111,114,110,97,109,101,115,39,0,0,101,120,112,101,99,116,105,110,103,32,39,99,97,114,116,101,115,105,97,110,39,44,32,39,115,112,104,101,114,105,99,97,108,39,44,32,111,114,32,39,99,121,108,105,110,100,114,105,99,97,108,39,0,0,0,0,115,101,116,32,114,109,97,114,103,105,110,32,37,115,32,37,103,10,0,0,0,0,0,0,122,116,105,99,36,108,97,98,101,108,115,0,0,0,0,0,37,115,10,10,0,0,0,0,92,115,116,111,112,71,78,85,80,76,79,84,112,97,103,101,10,0,0,0,0,0,0,0,117,36,115,101,114,0,0,0,102,105,116,50,114,103,98,36,102,111,114,109,117,108,97,101,0,0,0,0,0,0,0,0,99,121,36,108,105,110,100,114,105,99,97,108,0,0,0,0,115,101,116,32,98,109,97,114,103,105,110,32,37,115,32,37,103,10,0,0,0,0,0,0,121,50,116,105,99,36,108,97,98,101,108,115,0,0,0,0,9,103,110,117,112,108,111,116,32,76,67,95,78,85,77,69,82,73,67,32,37,115,10,0,37,46,49,50,48,115,0,0,116,36,119,111,0,0,0,0,115,101,116,98,111,117,110,100,115,32,99,117,114,114,101,110,116,112,105,99,116,117,114,101,32,116,111,32,117,110,105,116,115,113,117,97,114,101,32,120,121,115,99,97,108,101,100,32,40,119,44,104,41,59,10,0,104,36,111,114,105,122,111,110,116,97,108,0,0,0,0,0,99,111,108,111,114,36,110,97,109,101,115,0,0,0,0,0,115,36,112,104,101,114,105,99,97,108,0,0,0,0,0,0,97,116,32,115,99,114,101,101,110,0,0,0,0,0,0,0,121,95,109,105,110,51,100,32,115,104,111,117,108,100,32,110,111,116,32,101,113,117,97,108,32,121,95,109,97,120,51,100,33,0,0,0,0,0,0,0,121,116,105,99,36,108,97,98,101,108,115,0,0,0,0,0,109,111,100,0,0,0,0,0,100,101,115,116,32,61,61,32,78,85,76,76,32,124,124,32,100,101,115,116,32,33,61,32,111,117,116,115,116,114,0,0,10,35,32,73,115,111,67,117,114,118,101,32,37,100,44,32,37,100,32,112,111,105,110,116,115,10,35,32,120,32,121,32,122,0,0,0,0,0,0,0,118,36,101,114,116,105,99,97,108,0,0,0,0,0,0,0,115,104,101,36,108,108,0,0,99,97,36,114,116,101,115,105,97,110,0,0,0,0,0,0,37,115,9,37,102,10,0,0,115,101,116,32,108,109,97,114,103,105,110,32,37,115,32,37,103,10,0,0,0,0,0,0,120,50,116,105,99,36,108,97,98,101,108,115,0,0,0,0,67,111,109,112,105,108,101,32,111,112,116,105,111,110,115,58,10,37,115,10,0,0,0,0,37,46,52,103,0,0,0,0,114,122,116,0,0,0,0,0,116,105,109,101,0,0,0,0,114,103,98,102,111,114,36,109,117,108,97,101,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,115,99,114,101,101,110,32,60,102,114,97,99,116,105,111,110,62,39,0,0,0,115,101,116,32,122,101,114,111,32,37,103,10,0,0,0,0,120,116,105,99,36,108,97,98,101,108,115,0,0,0,0,0,32,108,105,110,101,115,116,121,108,101,32,37,100,0,0,0,120,32,114,97,110,103,101,0,99,111,108,117,109,110,104,101,97,100,0,0,0,0,0,0,114,99,102,105,108,101,0,0,101,113,0,0,0,0,0,0,41,59,112,111,115,105,116,105,111,110,115,40,0,0,0,0,116,101,114,109,36,105,110,97,108,0,0,0,0,0,0,0,69,110,100,0,0,0,0,0,103,114,97,36,100,105,101,110,116,0,0,0,0,0,0,0,115,99,36,114,101,101,110,0,102,95,115,112,114,105,110,116,102,58,32,97,116,116,101,109,112,116,32,116,111,32,112,114,105,110,116,32,110,117,109,101,114,105,99,32,118,97,108,117,101,32,119,105,116,104,32,115,116,114,105,110,103,32,102,111,114,109,97,116,0,0,0,0,83,105,103,110,101,100,83,104,111,114,116,0,0,0,0,0,40,37,46,51,103,44,37,46,51,103,44,37,46,51,103,41,0,0,0,0,0,0,0,0,110,111,111,112,97,113,117,101,0,0,0,0,0,0,0,0,101,120,116,114,97,32,99,104,97,114,115,32,97,102,116,101,114,32,60,115,101,112,97,114,97,116,105,111,110,95,99,104,97,114,62,0,0,0,0,0,107,101,121,32,101,110,116,114,121,0,0,0,0,0,0,0,10,37,72,58,37,77,0,0,99,111,108,111,114,115,40,0,111,112,97,113,117,101,0,0,9,103,97,109,109,97,32,105,115,32,37,46,52,103,10,0,39,92,116,39,0,0,0,0,104,105,115,116,101,112,115,32,118,97,108,105,100,32,112,111,105,110,116,32,109,97,112,112,105,110,103,0,0,0,0,0,116,101,109,112,32,115,116,114,105,110,103,32,102,111,114,32,108,97,98,101,108,32,104,97,99,107,0,0,0,0,0,0,99,111,108,111,114,95,109,111,100,101,40,103,114,97,100,105,101,110,116,41,59,0,0,0,109,97,120,114,111,119,36,115,0,0,0,0,0,0,0,0,37,115,58,37,100,32,111,111,111,112,115,58,32,85,110,107,110,111,119,110,32,99,111,108,111,114,32,109,111,100,101,32,39,37,99,39,46,10,0,0,34,92,116,34,0,0,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,99,111,108,117,109,110,32,60,61,32,48,32,105,110,32,100,97,116,97,102,105,108,101,46,99,0,0,0,0,0,0,0,50,32,109,117,108,32,49,32,115,117,98,32,100,117,112,32,109,117,108,0,0,0,0,0,99,111,108,111,114,95,109,111,100,101,40,102,117,110,99,116,105,111,110,115,41,0,0,0,109,97,120,99,111,108,117,36,109,110,115,0,0,0,0,0,88,89,90,10,0,0,0,0,101,120,112,101,99,116,101,100,32,34,60,115,101,112,97,114,97,116,111,114,95,99,104,97,114,62,34,0,0,0,0,0,115,101,116,32,116,105,109,101,115,116,97,109,112,32,37,115,32,10,0,0,0,0,0,0,37,49,54,46,51,102,0,0,99,111,108,111,114,95,109,111,100,101,40,114,103,98,41,59,102,111,114,109,117,108,97,101,40,37,100,44,37,100,44,37,100,41,0,0,0,0,0,0,109,97,120,99,111,108,36,115,0,0,0,0,0,0,0,0,89,73,81,10,0,0,0,0,119,104,105,116,101,36,115,112,97,99,101,0,0,0,0,0,32,114,111,116,97,116,101,32,112,97,114,97,108,108,101,108,0,0,0,0,0,0,0,0,116,105,109,101,115,116,114,105,110,103,0,0,0,0,0,0,10,10,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,10,0,0,0,0,0,0,99,111,108,111,114,95,109,111,100,101,40,103,114,97,121,41,0,0,0,0,0,0,0,0,116,101,120,116,36,99,111,108,111,114,0,0,0,0,0,0,84,105,99,32,108,97,98,101,108,32,100,111,101,115,32,110,111,116,32,101,118,97,108,117,97,116,101,32,97,115,32,115,116,114,105,110,103,33,10,0,67,77,89,10,0,0,0,0,101,120,112,101,99,116,101,100,32,115,116,114,105,110,103,32,119,105,116,104,32,99,111,109,109,101,110,116,115,32,99,104,97,114,115,0,0,0,0,0,10,115,101,116,32,37,115,37,115,32,0,0,0,0,0,0,9,103,110,117,112,108,111,116,32,76,67,95,84,73,77,69,32,32,32,32,37,115,10,0,117,116,105,108,46,99,0,0,111,36,110,101,0,0,0,0,103,112,95,109,97,107,101,95,112,97,108,101,116,116,101,40,0,0,0,0,0,0,0,0,116,99,0,0,0,0,0,0,72,83,86,10,0,0,0,0,109,97,120,95,108,105,110,101,95,108,101,110,0,0,0,0,100,105,118,0,0,0,0,0,84,97,98,117,108,97,114,32,111,117,116,112,117,116,32,111,102,32,116,104,105,115,32,51,68,32,112,108,111,116,32,115,116,121,108,101,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,10,0,0,0,70,97,116,97,108,58,32,117,110,100,101,102,105,110,101,100,32,99,111,108,111,114,32,102,111,114,109,117,108,97,32,40,99,97,110,32,98,101,32,48,45,45,37,105,41,10,0,0,37,37,32,102,111,114,32,97,100,100,105,116,105,111,110,97,108,32,117,115,101,114,45,100,101,102,105,110,101,100,32,115,101,116,116,105,110,103,115,10,103,112,95,115,101,116,117,112,95,97,102,116,101,114,59,10,0,0,0,0,0,0,0,0,115,101,36,116,0,0,0,0,82,71,66,10,0,0,0,0,101,120,112,101,99,116,101,100,32,109,105,115,115,105,110,103,45,118,97,108,117,101,32,115,116,114,105,110,103,0,0,0,95,121,0,0,0,0,0,0,115,101,116,32,37,115,37,115,32,34,37,115,34,32,0,0,108,36,111,110,103,0,0,0,103,112,95,115,101,116,95,108,105,110,101,119,105,100,116,104,40,37,103,41,59,10,0,0,122,116,114,0,0,0,0,0,110,111,116,105,36,116,108,101]) -.concat([0,0,0,0,0,0,0,0,9,67,111,108,111,114,45,77,111,100,101,108,58,32,0,0,119,114,111,110,103,32,111,112,116,105,111,110,0,0,0,0,115,101,116,32,109,37,115,116,105,99,115,32,37,102,10,0,37,103,32,37,103,0,0,0,32,108,116,32,37,100,0,0,121,32,114,97,110,103,101,32,105,115,32,105,110,118,97,108,105,100,0,0,0,0,0,0,33,61,0,0,0,0,0,0,37,37,32,108,105,110,101,119,105,100,116,104,32,115,99,97,108,105,110,103,32,102,97,99,116,111,114,32,102,111,114,32,105,110,100,105,118,105,100,117,97,108,32,108,105,110,101,115,10,0,0,0,0,0,0,0,80,97,103,101,68,111,119,110,0,0,0,0,0,0,0,0,32,99,111,108,111,114,32,112,111,115,105,116,105,111,110,115,32,102,111,114,32,100,105,115,99,114,101,116,101,32,112,97,108,101,116,116,101,32,116,101,114,109,105,110,97,108,115,10,0,0,0,0,0,0,0,0,114,117,108,101,114,32,97,116,0,0,0,0,0,0,0,0,115,101,116,32,109,37,115,116,105,99,115,32,100,101,102,97,117,108,116,10,0,0,0,0,117,110,114,101,99,111,103,110,105,122,101,100,32,112,108,111,116,32,116,121,112,101,0,0,37,37,0,0,0,0,0,0,85,110,115,105,103,110,101,100,83,104,111,114,116,0,0,0,103,112,95,115,101,116,95,112,111,105,110,116,115,105,122,101,40,37,103,41,59,10,0,0,110,111,97,36,117,116,111,116,105,116,108,101,115,0,0,0,65,76,76,32,114,101,109,97,105,110,105,110,103,0,0,0,101,120,112,101,99,116,105,110,103,32,114,117,108,101,114,32,99,111,111,114,100,105,110,97,116,101,115,0,0,0,0,0,115,101,116,32,109,37,115,116,105,99,115,10,0,0,0,0,37,100,47,37,109,0,0,0,83,105,103,110,101,100,66,121,116,101,0,0,0,0,0,0,112,118,101,114,116,32,62,61,32,48,0,0,0,0,0,0,37,37,32,112,111,105,110,116,115,105,122,101,32,115,99,97,108,105,110,103,32,102,97,99,116,111,114,10,0,0,0,0,97,36,117,116,111,116,105,116,108,101,115,0,0,0,0,0,77,65,88,32,37,105,0,0,114,117,36,108,101,114,0,0,115,101,116,32,110,111,109,37,115,116,105,99,115,10,0,0,103,112,95,115,99,97,108,101,95,116,101,120,116,32,58,61,32,37,103,59,10,0,0,0,104,36,101,105,103,104,116,0,9,97,108,108,111,99,97,116,105,110,103,32,0,0,0,0,110,111,114,117,36,108,101,114,0,0,0,0,0,0,0,0,115,101,116,32,116,105,99,115,108,101,118,101,108,32,37,103,10,0,0,0,0,0,0,0,124,120,45,48,46,53,124,0,37,37,32,116,101,120,116,32,115,99,97,108,105,110,103,32,102,97,99,116,111,114,32,102,111,114,32,116,104,101,32,119,104,111,108,101,32,102,105,103,117,114,101,10,0,0,0,0,119,36,105,100,116,104,0,0,32,78,79,84,0,0,0,0,115,104,111,117,108,100,32,98,101,58,32,37,100,32,60,61,32,109,111,117,115,101,102,111,114,109,97,116,32,60,61,32,37,100,10,0,0,0,0,0,115,101,116,32,120,121,112,108,97,110,101,32,97,116,32,37,103,10,0,0,0,0,0,0,37,37,32,102,111,114,32,97,100,100,105,116,105,111,110,97,108,32,117,115,101,114,45,100,101,102,105,110,101,100,32,115,101,116,116,105,110,103,115,10,103,112,95,115,101,116,117,112,95,98,101,102,111,114,101,59,10,0,0,0,0,0,0,0,115,112,36,97,99,105,110,103,0,0,0,0,0,0,0,0,9,97,108,108,32,99,111,108,111,114,32,102,111,114,109,117,108,97,101,32,65,82,69,37,115,32,119,114,105,116,116,101,110,32,105,110,116,111,32,111,117,116,112,117,116,32,112,111,115,116,115,99,114,105,112,116,32,102,105,108,101,10,0,0,112,108,101,97,115,101,32,39,115,101,116,32,109,111,117,115,101,32,109,111,117,115,101,102,111,114,109,97,116,32,60,102,109,116,62,39,32,102,105,114,115,116,46,10,0,0,0,0,102,117,110,99,116,105,111,110,0,0,0,0,0,0,0,0,44,32,116,97,110,103,101,110,116,61,37,115,41,0,0,0,99,111,117,108,100,32,110,111,116,32,111,112,101,110,32,108,111,103,45,102,105,108,101,32,37,115,0,0,0,0,0,0,37,37,32,68,105,102,102,101,114,101,110,116,32,105,110,105,116,105,97,108,105,115,97,116,105,111,110,115,10,0,0,0,115,97,36,109,112,108,101,110,0,0,0,0,0,0,0,0,78,69,71,65,84,73,86,69,0,0,0,0,0,0,0,0,109,111,36,117,115,101,102,111,114,109,97,116,0,0,0,0,115,101,116,32,115,116,121,108,101,32,102,117,110,99,116,105,111,110,32,0,0,0,0,0,44,32,37,32,35,46,52,103,100,101,103,41,0,0,0,0,80,115,101,117,100,111,100,97,116,97,32,110,111,116,32,121,101,116,32,105,109,112,108,101,109,101,110,116,101,100,32,102,111,114,32,112,111,108,97,114,32,111,114,32,112,97,114,97,109,101,116,114,105,99,32,103,114,97,112,104,115,0,0,0,9,103,110,117,112,108,111,116,32,101,110,99,111,100,105,110,103,32,32,32,37,115,10,0,108,105,110,101,32,37,100,58,32,0,0,0,0,0,0,0,112,36,111,105,110,116,115,0,37,37,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,10,0,0,0,110,111,98,36,111,120,0,0,105,110,112,117,116,32,100,97,116,97,32,40,39,101,39,32,101,110,100,115,41,32,62,32,0,0,0,0,0,0,0,0,80,79,83,73,84,73,86,69,0,0,0,0,0,0,0,0,115,104,111,117,108,100,32,98,101,58,32,37,100,32,60,61,32,99,108,105,112,98,111,97,114,100,102,111,114,109,97,116,32,60,61,32,37,100,10,0,115,101,116,32,115,116,121,108,101,32,100,97,116,97,32,0,104,101,97,100,115,0,0,0,109,117,108,116,0,0,0,0,10,35,32,83,117,114,102,97,99,101,32,37,100,32,111,102,32,37,100,32,115,117,114,102,97,99,101,115,10,0,0,0,37,37,32,116,101,109,112,111,114,97,114,121,32,118,97,114,105,97,98,108,101,32,102,111,114,32,115,116,111,114,105,110,103,32,116,104,101,32,112,97,116,104,10,115,97,118,101,32,112,59,32,112,97,116,104,32,112,59,10,0,0,0,0,0,98,36,111,120,0,0,0,0,115,99,114,36,101,101,110,100,117,109,112,0,0,0,0,0,9,102,105,103,117,114,101,32,105,115,32,37,115,10,0,0,95,120,0,0,0,0,0,0,115,101,116,32,99,110,116,114,112,97,114,97,109,32,112,111,105,110,116,115,32,37,100,10,115,101,116,32,115,105,122,101,32,114,97,116,105,111,32,37,103,32,37,103,44,37,103,10,115,101,116,32,111,114,105,103,105,110,32,37,103,44,37,103,10,0,0,0,0,0,0,0,93,32,32,100,105,115,116,97,110,99,101,58,32,0,0,0,109,97,116,114,105,120,32,99,111,110,116,97,105,110,115,32,109,105,115,115,105,110,103,32,111,114,32,117,110,100,101,102,105,110,101,100,32,118,97,108,117,101,115,0,0,0,0,0,71,32,78,32,85,32,80,32,76,32,79,32,84,0,0,0,37,37,32,116,101,109,112,111,114,97,114,121,32,118,97,114,105,97,98,108,101,32,102,111,114,32,115,116,111,114,105,110,103,32,116,104,101,32,112,97,116,104,32,97,110,100,32,105,109,97,103,101,115,10,115,97,118,101,32,112,44,32,105,109,103,44,32,105,109,97,59,32,112,97,116,104,32,112,59,32,115,116,114,105,110,103,32,105,109,103,44,32,105,109,97,59,10,0,0,0,0,0,0,0,116,114,122,0,0,0,0,0,115,104,111,119,46,99,0,0,39,102,111,110,116,110,97,109,101,44,102,111,110,116,115,105,122,101,39,32,101,120,112,101,99,116,101,100,0,0,0,0,99,108,36,105,112,98,111,97,114,100,102,111,114,109,97,116,0,0,0,0,0,0,0,0,100,121,50,61,0,0,0,0,100,102,95,109,97,116,114,105,120,0,0,0,0,0,0,0,32,116,101,120,116,99,111,108,111,114,0,0,0,0,0,0,120,32,114,97,110,103,101,32,105,115,32,105,110,118,97,108,105,100,0,0,0,0,0,0,80,105,112,101,115,32,97,110,100,32,115,104,101,108,108,32,99,111,109,109,97,110,100,115,32,110,111,116,32,112,101,114,109,105,116,116,101,100,32,100,117,114,105,110,103,32,105,110,105,116,105,97,108,105,122,97,116,105,111,110,0,0,0,0,61,61,0,0,0,0,0,0,67,97,110,110,111,116,32,115,101,116,32,105,110,116,101,114,110,97,108,32,118,97,114,105,97,98,108,101,115,32,71,80,86,65,76,95,32,97,110,100,32,77,79,85,83,69,95,0,99,109,0,0,0,0,0,0,80,97,103,101,85,112,0,0,37,115,58,37,100,32,111,111,112,115,58,32,85,110,107,110,111,119,110,32,99,111,108,111,114,32,109,111,100,101,32,39,37,99,39,46,10,0,0,0,100,105,115,99,114,101,116,101,32,37,103,0,0,0,0,0,78,111,32,116,101,114,109,105,110,97,108,32,104,97,115,32,98,101,101,110,32,112,117,115,104,101,100,32,121,101,116,10,0,0,0,0,0,0,0,0,100,120,50,61,0,0,0,0,77,97,116,114,105,120,32,100,111,101,115,32,110,111,116,32,114,101,112,114,101,115,101,110,116,32,97,32,103,114,105,100,0,0,0,0,0,0,0,0,105,110,0,0,0,0,0,0,110,111,105,110,118,36,101,114,116,0,0,0,0,0,0,0,9,67,117,98,101,104,101,108,105,120,32,99,111,108,111,114,32,112,97,108,101,116,116,101,58,32,115,116,97,114,116,32,37,103,32,99,121,99,108,101,115,32,37,103,32,115,97,116,117,114,97,116,105,111,110,32,37,103,10,0,0,0,0,0,110,111,122,111,111,109,106,117,36,109,112,0,0,0,0,0,105,110,99,114,101,109,101,110,116,97,108,32,37,103,44,37,103,44,37,103,10,0,0,0,70,105,108,101,32,100,111,101,115,110,39,116,32,102,97,99,116,111,114,105,122,101,32,105,110,116,111,32,102,117,108,108,32,109,97,116,114,105,120,0,37,109,47,37,100,0,0,0,85,110,115,105,103,110,101,100,66,121,116,101,0,0,0,0,37,37,32,115,99,97,108,105,110,103,32,102,97,99,116,111,114,44,32,119,105,100,116,104,32,97,110,100,32,104,101,105,103,104,116,32,111,102,32,116,104,101,32,102,105,103,117,114,101,10,97,32,58,61,32,49,99,109,59,32,119,32,58,61,32,37,46,51,102,97,59,32,104,32,58,61,32,37,46,51,102,97,59,32,37,37,32,40,37,103,37,115,44,32,37,103,37,115,41,10,0,0,0,0,105,110,118,36,101,114,116,0,9,32,32,67,45,102,111,114,109,117,108,97,58,32,37,115,10,0,0,0,0,0,0,0,122,111,111,109,106,117,36,109,112,0,0,0,0,0,0,0,97,117,116,111,32,37,100,10,0,0,0,0,0,0,0,0,82,101,97,100,32,103,114,105,100,32,119,105,100,116,104,32,116,111,111,32,108,97,114,103,101,0,0,0,0,0,0,0,115,116,114,105,110,103,32,116,101,114,109,118,101,114,115,105,111,110,59,32,32,32,32,116,101,114,109,118,101,114,115,105,111,110,32,32,32,32,58,61,32,34,37,115,34,59,10,0,110,111,114,101,118,36,101,114,115,101,0,0,0,0,0,0,9,32,32,66,45,102,111,114,109,117,108,97,58,32,37,115,10,0,0,0,0,0,0,0,110,111,118,101,36,114,98,111,115,101,0,0,0,0,0,0,115,101,116,32,99,110,116,114,112,97,114,97,109,32,108,101,118,101,108,115,32,0,0,0,82,101,97,100,32,103,114,105,100,32,111,102,32,122,101,114,111,32,119,105,100,116,104,0,48,46,53,32,115,117,98,32,97,98,115,0,0,0,0,0,115,116,114,105,110,103,32,103,110,117,112,108,111,116,118,101,114,115,105,111,110,59,32,103,110,117,112,108,111,116,118,101,114,115,105,111,110,32,58,61,32,34,37,115,34,59,10,0,114,101,118,36,101,114,115,101,0,0,0,0,0,0,0,0,9,32,32,65,45,102,111,114,109,117,108,97,58,32,37,115,10,0,0,0,0,0,0,0,118,101,36,114,98,111,115,101,0,0,0,0,0,0,0,0,98,115,112,108,105,110,101,10,0,0,0,0,0,0,0,0,67,97,110,39,116,32,114,101,97,100,32,115,101,99,111,110,100,32,100,105,109,101,110,115,105,111,110,32,105,110,32,100,97,116,97,32,102,105,108,101,32,34,37,115,34,0,0,0,66,82,69,65,75,58,32,37,115,0,0,0,0,0,0,0,92,115,116,97,114,116,71,78,85,80,76,79,84,103,114,97,112,104,105,99,91,37,100,93,10,0,0,0,0,0,0,0,82,36,105,103,104,116,0,0,9,99,111,108,111,114,32,109,97,112,112,105,110,103,32,105,115,32,100,111,110,101,32,98,121,32,117,115,101,114,32,100,101,102,105,110,101,100,32,102,117,110,99,116,105,111,110,115,10,0,0,0,0,0,0,0,110,111,108,97,36,98,101,108,115,0,0,0,0,0,0,0,99,117,98,105,99,115,112,108,105,110,101,10,0,0,0,0,121,61,0,0,0,0,0,0,67,97,110,39,116,32,114,101,97,100,32,102,105,114,115,116,32,100,105,109,101,110,115,105,111,110,32,105,110,32,100,97,116,97,32,102,105,108,101,32,34,37,115,34,0,0,0,0,92,115,116,97,114,116,71,78,85,80,76,79,84,112,97,103,101,32,37,37,32,71,114,97,112,104,105,99,32,78,114,46,32,37,100,10,0,0,0,0,76,36,101,102,116,0,0,0,9,99,111,108,111,114,32,109,97,112,112,105,110,103,32,98,121,32,100,101,102,105,110,101,100,32,103,114,97,100,105,101,110,116,10,0,0,0,0,0,108,97,98,101,108,36,115,0,108,105,110,101,97,114,10,0,120,61,0,0,0,0,0,0,67,97,110,39,116,32,111,112,101,110,32,100,97,116,97,32,102,105,108,101,32,34,37,115,34,0,0,0,0,0,0,0,9,103,110,117,112,108,111,116,32,76,67,95,67,84,89,80,69,32,32,32,37,115,10,0,34,37,115,34,44,32,108,105,110,101,32,37,100,58,32,0,112,32,58,61,32,40,37,46,51,102,97,44,37,46,51,102,97,41,0,0,0,0,0,0,114,109,36,97,114,103,105,110,0,0,0,0,0,0,0,0,9,114,103,98,32,99,111,108,111,114,32,109,97,112,112,105,110,103,32,98,121,32,114,103,98,102,111,114,109,117,108,97,101,32,97,114,101,32,37,105,44,37,105,44,37,105,10,0,110,111,112,111,36,108,97,114,100,105,115,116,97,110,99,101,0,0,0,0,0,0,0,0,115,101,116,32,99,110,116,114,112,97,114,97,109,32,0,0,32,32,32,115,99,97,108,101,58,32,0,0,0,0,0,0,84,111,111,32,109,97,110,121,32,99,111,108,117,109,110,115,32,105,110,32,117,115,105,110,103,32,115,112,101,99,105,102,105,99,97,116,105,111,110,32,97,110,100,32,105,109,112,108,105,101,100,32,115,97,109,112,108,105,110,103,32,97,114,114,97,121,0,0,0,0,0,0,98,97,99,107,104,101,97,100,0,0,0,0,0,0,0,0,109,105,110,117,115,0,0,0,112,114,105,110,116,95,51,100,116,97,98,108,101,32,111,117,116,112,117,116,32,98,117,102,102,101,114,0,0,0,0,0,103,112,95,115,101,116,95,108,105,110,101,116,121,112,101,40,37,100,41,59,10,0,0,0,108,109,36,97,114,103,105,110,0,0,0,0,0,0,0,0,115,97,36,118,101,0,0,0,67,79,76,79,82,0,0,0,112,111,108,97,114,100,105,115,116,97,110,99,101,116,36,97,110,0,0,0,0,0,0,0,115,101,116,32,99,110,116,114,112,97,114,97,109,32,111,114,100,101,114,32,37,100,10,0,118,105,101,119,58,32,0,0,80,108,111,116,32,115,116,121,108,101,32,114,101,113,117,105,114,101,115,32,104,105,103,104,101,114,32,116,104,97,110,32,111,110,101,45,100,105,109,101,110,115,105,111,110,97,108,32,115,97,109,112,108,105,110,103,32,97,114,114,97,121,0,0,37,115,9,102,97,113,44,32,98,117,103,115,44,32,101,116,99,58,32,32,32,116,121,112,101,32,34,104,101,108,112,32,70,65,81,34,10,37,115,9,105,109,109,101,100,105,97,116,101,32,104,101,108,112,58,32,32,32,116,121,112,101,32,34,104,101,108,112,34,32,32,40,112,108,111,116,32,119,105,110,100,111,119,58,32,104,105,116,32,39,104,39,41,10,0,0,123,37,115,125,41,59,10,0,122,121,120,0,0,0,0,0,98,109,36,97,114,103,105,110,0,0,0,0,0,0,0,0,71,82,65,89,0,0,0,0,112,111,36,108,97,114,100,105,115,116,97,110,99,101,100,101,103,0,0,0,0,0,0,0,115,101,116,32,100,97,116,97,102,105,108,101,32,110,111,102,112,101,95,116,114,97,112,10,0,0,0,0,0,0,0,0,122,111,111,109,105,110,103,32,99,97,110,99,101,108,108,101,100,46,10,0,0,0,0,0,80,108,111,116,32,115,116,121,108,101,32,114,101,113,117,105,114,101,115,32,104,105,103,104,101,114,32,116,104,97,110,32,116,119,111,45,100,105,109,101,110,115,105,111,110,97,108,32,115,97,109,112,108,105,110,103,32,97,114,114,97,121,0,0,112,97,114,97,109,101,116,114,105,99,32,102,117,110,99,116,105,111,110,32,110,111,116,32,102,117,108,108,121,32,115,112,101,99,105,102,105,101,100,0,72,79,77,69,32,110,111,116,32,115,101,116,32,45,32,99,97,110,110,111,116,32,101,120,112,97,110,100,32,116,105,108,100,101,0,0,0,0,0,0,38,0,0,0,0,0,0,0,91,37,115,93,0,0,0,0,116,109,36,97,114,103,105,110,0,0,0,0,0,0,0,0,68,111,119,110,0,0,0,0,9,112,97,108,101,116,116,101,32,105,115,32,37,115,10,0,110,111,122,111,111,109,99,111,36,111,114,100,105,110,97,116,101,115,0,0,0,0,0,0,115,101,116,32,100,97,116,97,102,105,108,101,32,102,111,114,116,114,97,110,10,0,0,0,32,32,32,114,101,115,116,111,114,101,100,32,116,101,114,109,105,110,97,108,32,105,115,32,37,115,32,37,115,10,0,0,96,98,117,105,108,116,105,110,45,99,97,110,99,101,108,45,122,111,111,109,96,32,99,97,110,99,101,108,32,122,111,111,109,32,114,101,103,105,111,110,0,0,0,0,0,0,0,0,80,108,111,116,32,115,116,121,108,101,32,100,111,101,115,32,110,111,116,32,99,111,110,102,111,114,109,32,116,111,32,116,104,114,101,101,32,99,111,108,117,109,110,32,100,97,116,97,32,105,110,32,116,104,105,115,32,103,114,97,112,104,32,109,111,100,101,0,0,0,0,0,97,108,105,103,110,40,37,115,41,44,32,92,115,111,109,101,116,120,116,91,103,112,93,0,111,36,117,116,115,105,100,101,0,0,0,0,0,0,0,0,72,79,82,73,90,79,78,84,65,76,0,0,0,0,0,0,122,111,111,109,99,111,36,111,114,100,105,110,97,116,101,115,0,0,0,0,0,0,0,0,115,101,116,32,100,97,116,97,102,105,108,101,32,99,111,109,109,101,110,116,115,99,104,97,114,115,32,39,37,115,39,10,0,0,0,0,0,0,0,0,77,79,85,83,69,95,75,69,89,95,87,73,78,68,79,87,0,0,0,0,0,0,0,0,110,111,95,99,111,108,115,32,60,61,32,77,65,88,68,65,84,65,67,79,76,83,0,0,104,105,100,100,101,110,32,116,104,101,115,101,95,101,100,103,101,115,0,0,0,0,0,0,72,105,103,104,66,121,116,101,70,105,114,115,116,0,0,0,97,110,103,108,101,40,37,100,41,44,32,0,0,0,0,0,105,110,115,36,105,100,101,0,86,69,82,84,73,67,65,76,0,0,0,0,0,0,0,0,110,111,100,111,36,117,98,108,101,99,108,105,99,107,0,0,71,80,86,65,76,95,86,73,69,87,95,90,83,67,65,76,69,0,0,0,0,0,0,0,101,108,108,105,112,115,101,32,112,108,111,116,0,0,0,0,67,97,110,110,111,116,32,103,101,110,101,114,97,116,101,32,99,111,111,114,100,115,32,102,111,114,32,116,104,97,116,32,112,108,111,116,32,115,116,121,108,101,0,0,0,0,0,0,103,112,95,112,117,116,95,116,101,120,116,40,40,37,46,51,102,97,44,32,37,46,51,102,97,41,44,32,0,0,0,0,98,101,36,108,111,119,0,0,9,99,111,108,111,114,32,103,114,97,100,105,101,110,116,32,105,115,32,37,115,32,105,110,32,116,104,101,32,99,111,108,111,114,32,98,111,120,10,0,100,111,36,117,98,108,101,99,108,105,99,107,0,0,0,0,115,101,116,32,100,97,116,97,102,105,108,101,32,115,101,112,97,114,97,116,111,114,32,119,104,105,116,101,115,112,97,99,101,10,0,0,0,0,0,0,71,80,86,65,76,95,86,73,69,87,95,83,67,65,76,69,0,0,0,0,0,0,0,0,77,97,116,114,105,120,32,100,97,116,97,32,99,111,110,116,97,105,110,115,32,111,110,108,121,32,116,104,114,101,101,32,99,111,108,117,109,110,115,0,71,78,85,80,76,79,84,95,76,73,66,0,0,0,0,0,99,111,115,40,57,48,120,41,0,0,0,0,0,0,0,0,103,112,95,112,111,105,110,116,40,37,46,51,102,97,44,37,46,51,102,97,44,37,100,41,59,10,0,0,0,0,0,0,117,36,110,100,101,114,0,0,65,114,103,104,33,0,0,0,103,114,36,97,112,104,0,0,115,101,116,32,100,97,116,97,102,105,108,101,32,115,101,112,97,114,97,116,111,114,32,34,37,99,34,10,0,0,0,0,37,108,102,0,0,0,0,0,97,98,36,111,118,101,0,0,44,0,0,0,0,0,0,0,10,9,32,32,32,32,32,32,32,32,32,32,115,105,122,101,58,32,0,0,0,0,0,0,115,101,116,32,100,97,116,97,102,105,108,101,32,109,105,115,115,105,110,103,32,39,37,115,39,10,0,0,0,0,0,0,78,111,32,100,101,102,97,117,108,116,32,99,111,108,117,109,110,115,32,107,110,111,119,110,32,102,111,114,32,116,104,97,116,32,112,108,111,116,32,115,116,121,108,101,0,0,0,0,76,97,109,98,100,97,32,115,99,97,108,105,110,103,32,102,97,99,116,111,114,115,32,114,101,115,101,116,58,32,32,37,103,10,0,0,0,0,0,0,85,110,114,101,99,111,103,110,105,122,101,100,32,111,112,116,105,111,110,46,32,32,83,101,101,32,39,104,101,108,112,32,117,110,115,101,116,39,46,0,66,97,100,32,116,105,109,101,32,102,111,114,109,97,116,32,105,110,32,115,116,114,105,110,103,0,0,0,0,0,0,0,44,37,103,112,116,0,0,0,111,118,36,101,114,0,0,0,97,116,32,85,83,69,82,32,111,114,105,103,105,110,58,32,0,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,107,101,121,119,111,114,100,32,39,97,112,112,101,110,100,39,0,0,0,0,0,0,116,117,112,108,101,32,115,121,110,116,97,120,32,101,114,114,111,114,0,0,0,0,0,0,37,98,0,0,0,0,0,0,94,10,0,0,0,0,0,0,121,120,0,0,0,0,0,0,103,112,95,115,101,116,95,112,111,105,110,116,115,105,122,101,40,37,46,51,102,41,59,10,0,0,0,0,0,0,0,0,104,111,114,36,105,122,111,110,116,97,108,0,0,0,0,0,97,116,32,68,69,70,65,85,76,84,32,112,111,115,105,116,105,111,110,10,0,0,0,0,97,112,112,101,110,100,0,0,69,120,112,101,99,116,105,110,103,32,39,44,39,32,111,114,32,39,41,39,0,0,0,0,104,101,97,100,0,0,0,0,112,108,117,115,0,0,0,0,32,37,99,10,0,0,0,0,112,32,58,61,32,117,110,105,116,115,113,117,97,114,101,32,120,121,115,99,97,108,101,100,32,40,37,46,51,102,97,44,37,46,51,102,97,41,32,115,104,105,102,116,101,100,32,40,37,46,51,102,97,44,37,46,51,102,97,41,59,10,0,0,118,101,114,36,116,105,99,97,108,0,0,0,0,0,0,0,114,101,115,36,101,116,0,0,78,79,84,32,100,114,97,119,110,10,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,102,105,108,101,110,97,109,101,0,0,0,0,0,0,112,114,101,102,105,120,0,0,37,115,10,37,115,9,37,115,10,37,115,9,86,101,114,115,105,111,110,32,37,115,32,112,97,116,99,104,108,101,118,101,108,32,37,115,32,32,32,32,108,97,115,116,32,109,111,100,105,102,105,101,100,32,37,115,10,37,115,9,66,117,105,108,100,32,83,121,115,116,101,109,58,32,37,115,32,37,115,10,37,115,10,37,115,9,37,115,10,37,115,9,84,104,111,109,97,115,32,87,105,108,108,105,97,109,115,44,32,67,111,108,105,110,32,75,101,108,108,101,121,32,97,110,100,32,109,97,110,121,32,111,116,104,101,114,115,10,37,115,10,37,115,9,103,110,117,112,108,111,116,32,104,111,109,101,58,32,32,32,32,32,104,116,116,112,58,47,47,119,119,119,46,103,110,117,112,108,111,116,46,105,110,102,111,10,0,0,0,0,0,0,103,112,95,115,101,116,95,108,105,110,101,119,105,100,116,104,40,37,46,51,102,41,59,10,0,0,0,0,0,0,0,0,120,122,121,0,0,0,0,0,99,36,101,110,116,101,114,0,100,114,97,119,110,32,98,97,99,107,10,9,0,0,0,0,110,111,114,111,116,36,97,116,101,0,0,0,0,0,0,0,10,9,100,117,109,109,121,32,118,97,114,105,97,98,108,101,32,105,115,32,116,32,102,111,114,32,99,117,114,118,101,115,44,32,117,47,118,32,102,111,114,32,115,117,114,102,97,99,101,115,10,0,0,0,0,0,115,101,116,32,109,97,112,112,105,110,103,32,0,0,0,0,98,111,114,100,101,114,0,0,116,104,105,115,95,112,108,111,116,32,33,61,32,78,85,76,76,0,0,0,0,0,0,0,97,120,101,115,32,109,117,115,116,32,98,101,32,120,49,121,49,44,32,120,49,121,50,44,32,120,50,121,49,32,111,114,32,120,50,121,50,0,0,0,116,105,108,100,101,32,101,120,112,97,110,115,105,111,110,0,94,0,0,0,0,0,0,0,99,111,110,116,101,120,116,46,116,114,109,32,115,101,116,95,99,111,108,111,114,32,117,110,107,110,111,119,110,32,99,111,108,111,114,115,112,101,99,45,62,116,121,112,101,32,37,105,0,0,0,0,0,0,0,0,114,36,105,103,104,116,0,0,100,114,97,119,110,32,102,114,111,110,116,10,9,0,0,0,115,101,116,32,109,97,99,114,111,115,10,0,0,0,0,0,115,101,116,32,116,101,114,109,32,37,115,32,37,115,0,0,102,95,115,112,114,105,110,116,102,0,0,0,0,0,0,0,77,111,114,101,32,116,104,97,110,32,37,100,32,101,108,101,109,101,110,116,115,0,0,0,37,37,103,112,95,115,101,116,95,99,111,108,111,114,40,102,114,97,99,40,37,46,52,102,41,41,59,10,0,0,0,0,108,36,101,102,116,0,0,0,9,99,111,108,111,114,32,98,111,120,32,119,105,116,104,111,117,116,32,98,111,114,100,101,114,32,105,115,32,0,0,0,69,120,112,101,99,116,101,100,32,99,111,109,109,97,46,0,117,110,115,101,116,32,99,108,97,98,101,108,10,0,0,0,104,105,100,100,101,110,32,110,111,114,116,104,95,101,100,103,101,115,0,0,0,0,0,0,76,111,119,66,121,116,101,70,105,114,115,116,0,0,0,0,103,112,95,115,101,116,95,99,111,108,111,114,40,114,103,98,40,37,51,46,50,102,44,37,51,46,50,102,44,37,51,46,50,102,41,41,59,10,0,0,98,36,111,116,116,111,109,0,68,69,70,65,85,76,84,32,108,105,110,101,32,116,121,112,101,32,105,115,32,0,0,0,86,97,108,117,101,32,111,117,116,32,111,102,32,114,97,110,103,101,32,91,48,44,49,93,46,0,0,0,0,0,0,0,115,101,116,32,99,108,97,98,101,108,32,39,37,115,39,10,0,0,0,0,0,0,0,0,105,115,111,95,56,56,53,57,95,50,0,0,0,0,0,0,104,105,115,116,111,103,114,97,109,0,0,0,0,0,0,0,73,110,118,97,108,105,100,32,110,117,109,101,114,105,99,32,111,114,32,116,117,112,108,101,32,102,111,114,109,0,0,0,10,35,32,67,117,114,118,101,32,116,105,116,108,101,58,32,34,37,115,34,0,0,0,0,103,112,95,115,101,116,95,99,111,108,111,114,40,108,116,40,37,100,41,41,59,10,0,0,116,36,111,112,0,0,0,0,108,105,110,101,32,116,121,112,101,32,37,100,32,105,115,32,0,0,0,0,0,0,0,0,85,110,107,110,111,119,110,32,99,111,108,111,114,32,110,97,109,101,46,0,0,0,0,0,32,98,111,116,104,10,0,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,73,110,118,97,108,105,100,32,99,111,109,109,97,32,115,101,112,97,114,97,116,101,100,32,116,121,112,101,0,0,0,0,57,48,32,109,117,108,32,99,111,115,0,0,0,0,0,0,45,45,40,37,46,51,102,97,44,37,46,51,102,97,41,59,10,103,112,95,100,114,97,119,40,112,41,59,10,0,0,0,111,102,102,0,0,0,0,0,9,99,111,108,111,114,32,98,111,120,32,119,105,116,104,32,98,111,114,100,101,114,44,32,0,0,0,0,0,0,0,0,85,110,107,110,111,119,110,32,99,111,108,111,114,32,115,112,101,99,105,102,105,101,114,46,32,85,115,101,32,39,35,114,114,103,103,98,98,39,46,0,32,115,117,114,102,97,99,101,10,0,0,0,0,0,0,0,80,101,114,112,101,110,100,105,99,117,108,97,114,32,118,101,99,116,111,114,32,99,97,110,110,111,116,32,98,101,32,122,101,114,111,0,0,0,0,0,112,117,115,104,99,0,0,0,45,45,99,121,99,108,101,59,10,103,112,95,100,114,97,119,40,112,41,59,10,0,0,0,111,110,0,0,0,0,0,0,101,120,116,101,110,100,32,100,121,110,97,114,114,97,121,0,99,111,114,110,101,114,32,37,105,10,0,0,0,0,0,0,35,37,50,120,37,50,120,37,50,120,0,0,0,0,0,0,32,98,97,115,101,10,0,0,84,104,114,101,101,45,100,105,109,101,110,115,105,111,110,97,108,32,116,117,112,108,101,32,114,101,113,117,105,114,101,100,0,0,0,0,0,0,0,0,76,97,109,98,100,97,32,83,116,97,114,116,32,118,97,108,117,101,32,115,101,116,58,32,37,103,10,0,0,0,0,0,103,112,95,100,111,116,40,37,46,51,102,97,44,37,46,51,102,97,41,59,10,0,0,0,109,97,120,105,109,117,109,32,111,102,32,52,32,99,111,114,110,101,114,115,10,0,0,0,69,120,112,101,99,116,101,100,32,40,32,116,111,32,115,116,97,114,116,32,103,114,97,100,105,101,110,116,32,100,101,102,105,110,105,116,105,111,110,46,0,0,0,0,0,0,0,0,10,115,101,116,32,115,97,109,112,108,101,115,32,37,100,44,32,37,100,10,115,101,116,32,105,115,111,115,97,109,112,108,101,115,32,37,100,44,32,37,100,10,37,115,115,101,116,32,115,117,114,102,97,99,101,10,37,115,115,101,116,32,99,111,110,116,111,117,114,0,0,0,37,66,0,0,0,0,0,0,120,121,0,0,0,0,0,0,41,59,10,0,0,0,0,0,98,97,99,107,0,0,0,0,109,105,110,105,109,117,109,32,111,102,32,52,32,99,111,114,110,101,114,115,10,0,0,0,71,114,97,121,32,115,99,97,108,101,32,110,111,116,32,115,111,114,116,101,100,32,105,110,32,103,114,97,100,105,101,110,116,46,0,0,0,0,0,0,101,113,117,97,108,32,120,121,122,0,0,0,0,0,0,0,37,100,46,32,37,100,46,32,37,48,52,100,32,37,100,58,37,48,50,100,0,0,0,0,110,111,104,101,97,100,0,0,108,101,0,0,0,0,0,0,48,120,37,48,54,120,0,0,44,100,101,110,115,105,116,121,40,48,41,0,0,0,0,0,102,114,111,110,116,0,0,0,114,101,36,114,101,97,100,0,109,101,100,105,97,110,32,111,102,32,52,32,99,111,114,110,101,114,115,10,0,0,0,0,78,111,32,118,97,108,105,100,32,112,97,108,101,116,116,101,32,102,111,117,110,100,0,0,83,84,65,84,83,95,0,0,101,113,117,97,108,32,120,121,0,0,0,0,0,0,0,0,37,100,58,37,48,50,100,0,98,105,36,110,100,0,0,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,32,40,100,97,116,97,102,105,108,101,46,99,41,58,32,85,110,107,110,111,119,110,32,112,108,111,116,32,109,111,100,101,0,0,47,117,115,114,47,108,111,99,97,108,47,98,105,110,0,0,44,112,97,116,116,101,114,110,40,37,100,41,0,0,0,0,121,120,122,0,0,0,0,0,110,111,98,101,110,116,36,111,118,101,114,0,0,0,0,0,103,101,111,109,101,116,114,105,99,97,108,32,109,101,97,110,32,111,102,32,52,32,99,111,114,110,101,114,115,10,0,0,105,110,118,97,108,105,100,32,111,112,116,105,111,110,0,0,66,97,100,32,100,97,116,97,32,111,110,32,108,105,110,101,32,37,100,0,0,0,0,0,10,115,101,116,32,118,105,101,119,32,32,37,115,0,0,0,37,100,46,32,37,100,46,32,37,48,52,100,0,0,0,0,84,104,114,101,101,45,100,105,109,101,110,115,105,111,110,97,108,32,116,117,112,108,101,32,114,101,113,117,105,114,101,100,32,102,111,114,32,115,101,116,116,105,110,103,32,98,105,110,97,114,121,32,112,97,114,97,109,101,116,101,114,115,0,0,109,97,116,36,114,105,120,0,110,111,98,111,114,100,101,114,10,0,0,0,0,0,0,0,116,104,105,115,95,112,108,111,116,32,61,61,32,42,116,112,95,51,100,95,112,116,114,0,67,97,110,110,111,116,32,101,120,112,97,110,100,32,101,109,112,116,121,32,112,97,116,104,0,0,0,0,0,0,0,0,124,0,0,0,0,0,0,0,71,80,70,85,78,95,0,0,44,100,101,110,115,105,116,121,40,37,46,50,102,41,0,0,98,101,110,116,36,111,118,101,114,0,0,0,0,0,0,0,85,112,0,0,0,0,0,0,97,118,101,114,97,103,101,100,32,52,32,99,111,114,110,101,114,115,10,0,0,0,0,0,112,109,51,100,32,103,114,97,100,105,101,110,116,0,0,0,37,103,44,32,37,103,44,32,37,103,44,32,37,103,0,0,99,97,110,32,111,110,108,121,32,100,111,32,98,101,115,115,101,108,32,102,117,110,99,116,105,111,110,115,32,111,102,32,114,101,97,108,115,0,0,0,70,105,114,115,116,32,112,97,114,97,109,101,116,101,114,32,116,111,32,115,112,114,105,110,116,102,32,109,117,115,116,32,98,101,32,97,32,102,111,114,109,97,116,32,115,116,114,105,110,103,0,0,0,0,0,0,84,104,114,101,101,45,100,105,109,101,110,115,105,111,110,97,108,32,116,117,112,108,101,32,114,101,113,117,105,114,101,100,32,102,111,114,32,51,68,32,112,108,111,116,0,0,0,0,44,116,114,97,110,115,112,97,114,101,110,116,0,0,0,0,110,111,97,108,116,36,100,105,97,103,111,110,97,108,0,0,9,113,117,97,100,114,97,110,103,108,101,32,99,111,108,111,114,32,97,99,99,111,114,100,105,110,103,32,116,111,32,0,103,114,97,100,105,101,110,116,0,0,0,0,0,0,0,0,84,119,111,45,100,105,109,101,110,115,105,111,110,97,108,32,116,117,112,108,101,32,114,101,113,117,105,114,101,100,32,102,111,114,32,50,68,32,112,108,111,116,0,0,0,0,0,0,104,105,100,100,101,110,32,116,104,101,115,101,95,112,111,108,121,115,0,0,0,0,0,0,88,114,105,103,104,116,89,117,112,0,0,0,0,0,0,0,103,112,95,102,105,108,108,40,112,0,0,0,0,0,0,0,97,108,116,36,100,105,97,103,111,110,97,108,0,0,0,0,9,115,116,101,112,115,32,102,111,114,32,98,105,108,105,110,101,97,114,32,105,110,116,101,114,112,111,108,97,116,105,111,110,58,32,37,100,44,37,100,10,0,0,0,0,0,0,0,76,101,115,115,32,116,104,97,110,32,51,32,117,115,105,110,103,32,115,112,101,99,115,32,102,111,114,32,112,97,108,101,116,116,101,0,0,0,0,0,115,101,116,32,118,105,101,119,32,0,0,0,0,0,0,0,44,32,40,117,110,100,101,102,105,110,101,100,41,47,0,0,99,117,116,101,32,108,105,116,116,108,101,32,101,108,108,105,112,115,101,32,102,111,114,32,116,104,101,32,107,101,121,32,115,97,109,112,108,101,0,0,78,117,109,98,101,114,32,111,102,32,98,121,116,101,115,32,116,111,32,115,107,105,112,32,109,117,115,116,32,98,101,32,112,111,115,105,116,105,118,101,32,105,110,116,101,103,101,114,0,0,0,0,0,0,0,0,45,45,99,121,99,108,101,59,10,0,0,0,0,0,0,0,110,111,117,110,100,36,101,102,105,110,101,100,0,0,0,0,9,112,109,51,100,45,104,105,100,100,101,110,51,100,32,105,115,32,37,115,10,0,0,0,117,110,115,101,116,32,100,101,99,105,109,97,108,115,105,103,110,10,0,0,0,0,0,0,111,102,102,36,115,101,116,0,115,99,97,36,108,101,0,0,73,109,112,114,111,112,101,114,32,115,99,97,110,110,105,110,103,32,115,116,114,105,110,103,46,32,84,114,121,32,50,32,99,104,97,114,97,99,116,101,114,32,115,116,114,105,110,103,32,102,111,114,32,50,68,32,100,97,116,97,0,0,0,0,117,112,36,119,97,114,100,115,0,0,0,0,0,0,0,0,100,111,119,110,36,119,97,114,100,115,0,0,0,0,0,0,114,111,119,36,115,102,105,114,115,116,0,0,0,0,0,0,99,111,108,36,117,109,110,115,102,105,114,115,116,0,0,0,115,105,110,40,57,48,120,41,0,0,0,0,0,0,0,0,79,114,105,103,105,110,32,105,115,32,97,116,32,40,37,102,44,37,102,41,0,0,0,0,45,45,40,37,46,51,102,97,44,37,46,51,102,97,41,0,46,92,34,71,78,85,80,76,79,84,58,32,71,82,79,70,70,32,112,105,99,116,117,114,101,32,117,115,105,110,103,32,116,104,101,32,103,112,105,99,32,112,114,101,112,114,111,99,101,115,115,111,114,10,0,0,117,110,100,101,102,36,105,110,101,100,0,0,0,0,0,0,46,80,69,10,0,0,0,0,9,112,109,51,100,45,104,105,100,100,101,110,51,100,32,105,115,32,111,110,32,97,110,100,32,119,105,108,108,32,117,115,101,32,108,105,110,101,115,116,121,108,101,32,37,100,10,0,69,120,112,101,99,116,101,100,32,99,111,109,109,97,0,0,115,101,116,32,100,101,99,105,109,97,108,115,105,103,110,32,39,37,115,39,10,0,0,0,120,61,37,102,59,32,121,61,37,102,10,0,0,0,0,0,47,40,117,110,100,101,102,105,110,101,100,41,0,0,0,0,46,80,83,32,37,102,32,37,102,10,0,0,0,0,0,0,109,111,118,101,32,116,111,32,40,120,43,37,102,44,121,43,37,102,41,10,0,0,0,0,73,109,112,114,111,112,101,114,32,115,99,97,110,110,105,110,103,32,115,116,114,105,110,103,46,32,84,114,121,32,51,32,99,104,97,114,97,99,116,101,114,32,115,116,114,105,110,103,32,102,111,114,32,51,68,32,100,97,116,97,0,0,0,0,100,97,115,104,101,100,32,48,46,48,55,53,0,0,0,0,100,97,115,104,101,100,32,48,46,48,53,0,0,0,0,0,100,111,116,116,101,100,0,0,116,104,105,99,107,110,101,115,115,32,49,46,48,0,0,0,32,92,10,32,32,32,116,104,101,110,32,116,111,32,40,120,43,37,102,44,121,43,37,102,41,0,0,0,0,0,0,0,10,32,32,0,0,0,0,0,108,105,110,101,32,37,115,32,116,111,32,40,120,43,37,102,44,121,43,37,102,41,0,0,116,114,105,36,97,110,103,108,101,112,97,116,116,101,114,110,0,0,0,0,0,0,0,0,97,116,32,120,43,37,102,44,121,43,37,102,10,0,0,0,97,108,108,32,52,32,112,111,105,110,116,115,32,111,102,32,116,104,101,32,113,117,97,100,114,97,110,103,108,101,32,105,110,32,120,44,121,32,114,97,110,103,101,115,10,0,0,0,110,111,116,32,101,110,111,117,103,104,32,109,101,109,111,114,121,32,102,111,114,32,102,117,110,99,116,105,111,110,0,0,115,101,116,32,100,101,99,105,109,97,108,115,105,103,110,32,108,111,99,97,108,101,32,34,37,115,34,10,0,0,0,0,114,106,117,115,116,32,0,0,108,106,117,115,116,32,0,0,67,97,110,110,111,116,32,97,108,116,101,114,32,115,99,97,110,110,105,110,103,32,109,101,116,104,111,100,32,102,111,114,32,111,110,101,45,100,105,109,101,110,115,105,111,110,97,108,32,100,97,116,97,0,0,0,59,32,114,101,115,101,116,32,108,105,110,101,119,105,100,10,0,0,0,0,0,0,0,0,84,111,111,32,109,97,110,121,32,114,97,110,103,101,45,115,112,101,99,115,32,102,111,114,32,97,32,37,100,45,118,97,114,105,97,98,108,101,32,102,105,116,0,0,0,0,0,0,108,105,110,101,32,102,114,111,109,32,120,43,37,102,44,121,43,37,102,32,116,111,32,120,43,37,102,44,121,43,37,102,10,0,0,0,0,0,0,0,97,114,114,111,119,104,101,97,100,61,55,59,32,97,114,114,111,119,32,102,114,111,109,32,120,43,37,102,44,121,43,37,102,32,116,111,32,120,43,37,102,44,121,43,37,102,10,0,49,54,0,0,0,0,0,0,27,91,114,27,91,50,52,59,49,72,0,0,0,0,0,0,40,37,46,51,102,97,44,37,46,51,102,97,41,0,0,0,27,91,50,74,27,91,50,52,59,49,72,0,0,0,0,0,110,111,111,102,102,36,115,101,116,0,0,0,0,0,0,0,27,92,27,91,50,52,59,49,72,0,0,0,0,0,0,0,97,116,32,108,101,97,115,116,32,49,32,112,111,105,110,116,32,111,102,32,116,104,101,32,113,117,97,100,114,97,110,103,108,101,32,105,110,32,120,44,121,32,114,97,110,103,101,115,10,0,0,0,0,0,0,0,115,101,116,32,112,111,105,110,116,115,105,122,101,32,37,103,10,115,101,116,32,112,111,105,110,116,105,110,116,101,114,118,97,108,98,111,120,32,37,103,10,115,101,116,32,101,110,99,111,100,105,110,103,32,37,115,10,37,115,115,101,116,32,112,111,108,97,114,10,37,115,115,101,116,32,112,97,114,97,109,101,116,114,105,99,10,0,0,27,91,50,74,27,80,49,112,83,40,67,48,41,83,40,69,41,84,40,65,48,41,10,0,80,91,37,100,44,37,100,93,10,0,0,0,0,0,0,0,118,91,93,118,91,37,100,44,37,100,93,10,0,0,0,0,122,90,0,0,0,0,0,0,87,40,80,37,100,41,10,0,87,40,73,37,100,41,10,0,37,97,0,0,0,0,0,0,84,40,68,48,44,83,49,41,10,0,0,0,0,0,0,0,10,37,115,37,115,10,0,0,84,40,68,57,48,44,83,49,41,10,0,0,0,0,0,0,67,111,109,109,97,110,100,32,39,117,110,115,101,116,32,104,105,115,116,111,114,121,115,105,122,101,39,32,114,101,113,117,105,114,101,115,32,104,105,115,116,111,114,121,32,115,117,112,112,111,114,116,46,0,0,0,100,101,112,114,101,99,97,116,101,100,32,115,121,110,116,97,120,44,32,117,115,101,32,34,117,110,115,101,116,34,0,0,27,77,71,49,27,82,75,33,27,83,75,33,27,76,90,27,37,37,33,49,0,0,0,0,112,32,58,61,32,0,0,0,27,37,37,33,48,27,77,78,48,27,77,67,66,55,67,59,27,77,81,49,27,77,84,49,0,0,0,0,0,0,0,0,27,37,37,33,48,27,76,90,27,37,37,33,49,0,0,0,9,99,108,105,112,112,105,110]) -.concat([103,58,32,0,0,0,0,0,78,97,109,101,100,32,99,111,108,111,114,115,32,119,105,108,108,32,112,114,111,100,117,99,101,32,115,116,114,97,110,103,101,32,114,101,115,117,108,116,115,32,105,102,32,110,111,116,32,105,110,32,99,111,108,111,114,32,109,111,100,101,32,82,71,66,46,0,0,0,0,0,115,101,116,32,111,102,102,115,101,116,115,0,0,0,0,0,27,76,86,49,27,37,37,33,49,0,0,0,0,0,0,0,27,37,37,33,48,27,12,27,76,86,48,0,0,0,0,0,27,76,70,0,0,0,0,0,121,89,0,0,0,0,0,0,115,106,36,105,115,0,0,0,27,76,71,0,0,0,0,0,103,101,0,0,0,0,0,0,37,52,100,32,0,0,0,0,27,77,86,0,0,0,0,0,27,77,76,0,0,0,0,0,27,77,76,63,0,0,0,0,37,108,102,32,44,32,37,108,102,32,37,99,0,0,0,0,27,77,76,53,0,0,0,0,32,32,99,108,105,112,32,99,117,114,114,101,110,116,112,105,99,116,117,114,101,32,116,111,32,117,110,105,116,115,113,117,97,114,101,32,120,121,115,99,97,108,101,100,32,40,37,46,51,102,97,44,37,46,51,102,97,41,32,115,104,105,102,116,101,100,32,40,37,46,51,102,97,44,37,46,51,102,97,41,59,41,59,10,0,0,0,0,27,76,84,0,0,0,0,0,100,101,102,36,97,117,108,116,115,0,0,0,0,0,0,0,114,101,112,36,108,111,116,0,27,77,82,69,58,48,0,0,9,102,108,117,115,104,105,110,103,32,116,114,105,97,110,103,108,101,115,32,97,114,101,32,37,115,100,114,97,119,110,10,0,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,112,97,108,101,116,116,101,32,111,112,116,105,111,110,0,0,69,120,112,101,99,116,105,110,103,32,91,110,111,93,111,117,116,112,117,116,32,111,114,32,112,114,101,102,105,120,0,0,115,101,116,32,108,111,103,115,99,97,108,101,32,37,115,32,37,103,10,0,0,0,0,0,27,77,82,48,48,0,0,0,27,76,72,0,0,0,0,0,27,77,77,0,0,0,0,0,120,88,0,0,0,0,0,0,31,37,115,10,0,0,0,0,27,91,63,51,56,108,0,0,35,33,37,115,47,103,110,117,112,108,111,116,10,35,10,0,96,97,96,97,98,99,100,104,105,106,107,108,0,0,0,0,31,27,3,0,0,0,0,0,67,111,109,109,97,110,100,32,39,115,101,116,32,104,105,115,116,111,114,121,115,105,122,101,39,32,114,101,113,117,105,114,101,115,32,104,105,115,116,111,114,121,32,115,117,112,112,111,114,116,46,0,0,0,0,0,100,114,97,119,32,98,105,116,109,97,112,105,109,97,103,101,32,40,37,117,44,37,117,44,105,109,103,41,32,120,121,115,99,97,108,101,100,32,40,37,46,51,102,97,44,37,46,51,102,97,41,32,115,104,105,102,116,101,100,32,40,37,46,51,102,97,44,37,46,51,102,97,41,59,10,0,0,0,0,0,27,12,0,0,0,0,0,0,110,111,32,109,97,116,99,104,105,110,103,32,39,125,39,0,122,36,101,114,111,0,0,0,121,122,120,0,0,0,0,0,56,57,58,59,0,0,0,0,69,78,68,0,0,0,0,0,112,97,114,97,36,108,108,101,108,0,0,0,0,0,0,0,110,111,110,45,110,101,103,97,116,105,118,101,32,110,117,109,98,101,114,32,114,101,113,117,105,114,101,100,0,0,0,0,117,110,115,101,116,32,108,111,103,115,99,97,108,101,10,0,27,37,99,0,0,0,0,0,27,91,63,51,56,104,0,0,116,105,116,108,101,0,0,0,67,97,110,32,111,110,108,121,32,102,108,105,112,32,120,44,32,121,44,32,97,110,100,47,111,114,32,122,0,0,0,0,32,101,109,112,116,121,32,0,106,115,36,100,105,114,0,0,102,115,105,122,101,0,0,0,97,120,36,101,115,0,0,0,32,106,115,100,105,114,32,34,37,115,34,0,0,0,0,0,47,98,105,110,47,115,104,0,38,38,0,0,0,0,0,0,32,116,105,116,108,101,32,34,37,115,34,0,0,0,0,0,118,97,114,110,97,109,101,0,32,109,111,117,115,105,110,103,0,0,0,0,0,0,0,0,100,114,97,119,32,105,109,97,103,101,40,10,32,32,0,0,32,115,116,97,110,100,97,108,111,110,101,0,0,0,0,0,114,97,120,36,105,115,0,0,32,110,97,109,101,32,34,37,115,34,0,0,0,0,0,0,115,119,97,112,112,101,100,32,112,100,112,32,40,100,105,109,109,108,101,41,0,0,0,0,66,69,71,73,78,0,0,0,85,110,107,110,111,119,110,32,99,111,108,111,114,32,109,111,100,101,108,46,0,0,0,0,37,115,10,0,0,0,0,0,116,105,116,108,101,32,0,0,32,102,111,110,116,115,99,97,108,101,32,37,103,0,0,0,9,99,117,114,114,101,110,116,32,116,101,114,109,105,110,97,108,32,116,121,112,101,32,105,115,32,117,110,107,110,111,119,110,10,0,0,0,0,0,0,77,79,85,83,69,95,67,84,82,76,0,0,0,0,0,0,32,101,110,104,97,110,99,101,100,0,0,0,0,0,0,0,115,112,114,105,110,116,102,32,97,114,103,115,0,0,0,0,37,115,32,102,115,105,122,101,32,37,103,32,108,119,32,37,103,0,0,0,0,0,0,0,120,88,121,89,122,90,0,0,32,115,105,122,101,32,37,100,44,37,100,0,0,0,0,0,32,98,117,116,116,0,0,0,32,114,111,117,110,100,101,100,0,0,0,0,0,0,0,0,32,100,97,115,104,108,101,110,103,116,104,32,37,51,46,49,102,0,0,0,0,0,0,0,32,115,111,108,105,100,0,0,105,109,97,32,58,61,32,34,37,37,10,0,0,0,0,0,102,111,110,116,58,32,101,120,112,101,99,116,105,110,103,32,115,116,114,105,110,103,0,0,122,101,114,111,97,36,120,105,115,0,0,0,0,0,0,0,105,108,108,101,103,97,108,32,106,97,118,97,115,99,114,105,112,116,32,102,117,110,99,116,105,111,110,32,110,97,109,101,0,0,0,0,0,0,0,0,102,108,117,115,104,101,100,32,102,114,111,109,32,37,115,10,0,0,0,0,0,0,0,0,69,120,112,101,99,116,101,100,32,99,111,108,111,114,32,109,111,100,101,108,46,0,0,0,99,111,108,117,109,110,115,116,97,99,107,101,100,32,0,0,101,120,112,101,99,116,105,110,103,32,97,32,106,97,118,97,115,99,114,105,112,116,32,102,117,110,99,116,105,111,110,32,110,97,109,101,0,0,0,0,77,79,85,83,69,95,65,76,84,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,97,110,32,72,84,77,76,32,116,105,116,108,101,32,115,116,114,105,110,103,0,0,60,47,100,105,118,62,10,10,60,47,98,111,100,121,62,10,60,47,104,116,109,108,62,10,0,0,0,0,0,0,0,0,70,108,105,112,112,105,110,103,32,100,105,109,101,110,115,105,111,110,32,100,105,114,101,99,116,105,111,110,32,109,117,115,116,32,98,101,32,49,32,111,114,32,48,0,0,0,0,0,60,47,116,100,62,60,47,116,114,62,60,47,116,97,98,108,101,62,10,0,0,0,0,0,104,105,100,100,101,110,32,110,111,114,116,104,95,112,111,108,121,115,0,0,0,0,0,0,60,116,97,98,108,101,32,99,108,97,115,115,61,34,112,108,111,116,34,62,10,60,116,114,62,60,116,100,62,10,32,32,32,32,60,99,97,110,118,97,115,32,105,100,61,34,103,110,117,112,108,111,116,95,99,97,110,118,97,115,34,32,119,105,100,116,104,61,34,37,100,34,32,104,101,105,103,104,116,61,34,37,100,34,32,116,97,98,105,110,100,101,120,61,34,48,34,62,10,9,83,111,114,114,121,44,32,121,111,117,114,32,98,114,111,119,115,101,114,32,115,101,101,109,115,32,110,111,116,32,116,111,32,115,117,112,112,111,114,116,32,116,104,101,32,72,84,77,76,32,53,32,99,97,110,118,97,115,32,101,108,101,109,101,110,116,10,32,32,32,32,60,47,99,97,110,118,97,115,62,10,60,47,116,100,62,60,47,116,114,62,10,60,47,116,97,98,108,101,62,10,0,0,0,0,0,0,0,60,47,116,100,62,60,116,100,62,10,0,0,0,0,0,0,103,110,117,112,108,111,116,95,99,111,110,116,111,117,114,0,60,47,116,97,98,108,101,62,60,47,116,100,62,60,47,116,114,62,10,60,47,116,97,98,108,101,62,10,0,0,0,0,60,116,114,62,32,60,116,100,32,99,108,97,115,115,61,34,109,98,48,34,62,121,50,38,110,98,115,112,59,60,47,116,100,62,32,60,116,100,32,99,108,97,115,115,61,34,109,98,49,34,62,60,115,112,97,110,32,105,100,61,34,103,110,117,112,108,111,116,95,99,97,110,118,97,115,95,121,50,34,62,38,110,98,115,112,59,60,47,115,112,97,110,62,60,47,116,100,62,32,60,47,116,114,62,10,0,0,0,0,0,0,0,60,116,114,62,32,60,116,100,32,99,108,97,115,115,61,34,109,98,48,34,62,120,50,38,110,98,115,112,59,60,47,116,100,62,32,60,116,100,32,99,108,97,115,115,61,34,109,98,49,34,62,60,115,112,97,110,32,105,100,61,34,103,110,117,112,108,111,116,95,99,97,110,118,97,115,95,120,50,34,62,38,110,98,115,112,59,60,47,115,112,97,110,62,60,47,116,100,62,32,60,47,116,114,62,10,0,0,0,0,0,0,0,37,48,50,120,0,0,0,0,88,114,105,103,104,116,89,100,111,119,110,0,0,0,0,0,122,122,101,114,111,97,36,120,105,115,0,0,0,0,0,0,60,116,97,98,108,101,32,99,108,97,115,115,61,34,109,111,117,115,101,98,111,120,34,32,105,100,61,34,103,110,117,112,108,111,116,95,109,111,117,115,101,98,111,120,34,32,98,111,114,100,101,114,61,49,62,10,60,116,114,62,32,60,116,100,32,99,108,97,115,115,61,34,109,98,48,34,62,120,38,110,98,115,112,59,60,47,116,100,62,32,60,116,100,32,99,108,97,115,115,61,34,109,98,49,34,62,60,115,112,97,110,32,105,100,61,34,103,110,117,112,108,111,116,95,99,97,110,118,97,115,95,120,34,62,38,110,98,115,112,59,60,47,115,112,97,110,62,60,47,116,100,62,32,60,47,116,114,62,10,60,116,114,62,32,60,116,100,32,99,108,97,115,115,61,34,109,98,48,34,62,121,38,110,98,115,112,59,60,47,116,100,62,32,60,116,100,32,99,108,97,115,115,61,34,109,98,49,34,62,60,115,112,97,110,32,105,100,61,34,103,110,117,112,108,111,116,95,99,97,110,118,97,115,95,121,34,62,38,110,98,115,112,59,60,47,115,112,97,110,62,60,47,116,100,62,32,60,47,116,114,62,10,0,0,67,69,78,84,69,82,69,68,10,0,0,0,0,0,0,0,115,97,116,36,117,114,97,116,105,111,110,0,0,0,0,0,114,111,119,115,116,97,99,107,101,100,32,0,0,0,0,0,35,35,32,0,0,0,0,0,32,32,32,32,32,32,60,47,116,97,98,108,101,62,10,32,32,60,47,116,100,62,60,47,116,114,62,10,60,47,116,97,98,108,101,62,60,47,116,100,62,60,47,116,114,62,60,116,114,62,60,116,100,32,99,108,97,115,115,61,34,109,111,117,115,101,98,111,120,34,62,10,0,0,0,0,0,0,0,0,77,79,85,83,69,95,83,72,73,70,84,0,0,0,0,0,9,60,47,116,114,62,10,0,9,32,32,60,116,100,32,99,108,97,115,115,61,34,105,99,111,110,34,32,62,32,60,47,116,100,62,10,0,0,0,0,83,97,109,112,108,101,32,112,101,114,105,111,100,32,109,117,115,116,32,98,101,32,112,111,115,105,116,105,118,101,46,32,84,114,121,32,96,102,108,105,112,96,32,102,111,114,32,99,104,97,110,103,105,110,103,32,100,105,114,101,99,116,105,111,110,0,0,0,0,0,0,0,84,104,105,115,32,116,101,114,109,105,110,97,108,32,100,111,101,115,32,110,111,116,32,115,117,112,112,111,114,116,32,102,105,108,108,101,100,32,112,111,108,121,103,111,110,115,0,0,9,32,32,60,116,100,32,99,108,97,115,115,61,34,105,99,111,110,34,32,111,110,99,108,105,99,107,61,103,110,117,112,108,111,116,46,116,111,103,103,108,101,95,112,108,111,116,40,34,103,112,95,112,108,111,116,95,37,100,34,41,62,37,100,60,47,116,100,62,10,0,0,112,97,114,97,109,101,116,101,114,32,116,111,32,96,112,109,51,100,32,97,116,96,32,114,101,113,117,105,114,101,115,32,99,111,109,98,105,110,97,116,105,111,110,32,111,102,32,117,112,32,116,111,32,54,32,99,104,97,114,97,99,116,101,114,115,32,98,44,115,44,116,10,9,40,100,114,97,119,105,110,103,32,97,116,32,98,111,116,116,111,109,44,32,115,117,114,102,97,99,101,44,32,116,111,112,41,0,0,0,0,0,0,9,60,116,114,62,10,0,0,60,116,97,98,108,101,32,99,108,97,115,115,61,34,109,98,108,101,102,116,34,62,60,116,114,62,60,116,100,32,99,108,97,115,115,61,34,109,111,117,115,101,98,111,120,34,62,10,60,116,97,98,108,101,32,99,108,97,115,115,61,34,109,111,117,115,101,98,111,120,34,32,98,111,114,100,101,114,61,48,62,10,32,32,60,116,114,62,60,116,100,32,99,108,97,115,115,61,34,109,111,117,115,101,98,111,120,34,62,10,32,32,32,32,60,116,97,98,108,101,32,99,108,97,115,115,61,34,109,111,117,115,101,98,111,120,34,32,105,100,61,34,103,110,117,112,108,111,116,95,109,111,117,115,101,98,111,120,34,32,98,111,114,100,101,114,61,48,62,10,32,32,32,32,60,116,114,62,60,116,100,32,99,108,97,115,115,61,34,109,98,104,34,62,60,47,116,100,62,60,47,116,114,62,10,32,32,32,32,60,116,114,62,60,116,100,32,99,108,97,115,115,61,34,109,98,104,34,62,10,32,32,32,32,32,32,60,116,97,98,108,101,32,99,108,97,115,115,61,34,109,111,117,115,101,98,111,120,34,62,10,9,60,116,114,62,10,9,32,32,60,116,100,32,99,108,97,115,115,61,34,105,99,111,110,34,62,60,47,116,100,62,10,9,32,32,60,116,100,32,99,108,97,115,115,61,34,105,99,111,110,34,32,111,110,99,108,105,99,107,61,103,110,117,112,108,111,116,46,116,111,103,103,108,101,95,103,114,105,100,62,60,105,109,103,32,115,114,99,61,34,37,115,103,114,105,100,46,112,110,103,34,32,105,100,61,34,103,110,117,112,108,111,116,95,103,114,105,100,95,105,99,111,110,34,32,99,108,97,115,115,61,34,105,99,111,110,45,105,109,97,103,101,34,32,97,108,116,61,34,35,34,32,116,105,116,108,101,61,34,116,111,103,103,108,101,32,103,114,105,100,34,62,60,47,116,100,62,10,9,32,32,60,116,100,32,99,108,97,115,115,61,34,105,99,111,110,34,32,111,110,99,108,105,99,107,61,103,110,117,112,108,111,116,46,117,110,122,111,111,109,62,60,105,109,103,32,115,114,99,61,34,37,115,112,114,101,118,105,111,117,115,122,111,111,109,46,112,110,103,34,32,105,100,61,34,103,110,117,112,108,111,116,95,117,110,122,111,111,109,95,105,99,111,110,34,32,99,108,97,115,115,61,34,105,99,111,110,45,105,109,97,103,101,34,32,97,108,116,61,34,117,110,122,111,111,109,34,32,116,105,116,108,101,61,34,117,110,122,111,111,109,34,62,60,47,116,100,62,10,9,32,32,60,116,100,32,99,108,97,115,115,61,34,105,99,111,110,34,32,111,110,99,108,105,99,107,61,103,110,117,112,108,111,116,46,114,101,122,111,111,109,62,60,105,109,103,32,115,114,99,61,34,37,115,110,101,120,116,122,111,111,109,46,112,110,103,34,32,105,100,61,34,103,110,117,112,108,111,116,95,114,101,122,111,111,109,95,105,99,111,110,34,32,99,108,97,115,115,61,34,105,99,111,110,45,105,109,97,103,101,34,32,97,108,116,61,34,114,101,122,111,111,109,34,32,116,105,116,108,101,61,34,114,101,122,111,111,109,34,62,60,47,116,100,62,10,9,32,32,60,116,100,32,99,108,97,115,115,61,34,105,99,111,110,34,32,111,110,99,108,105,99,107,61,103,110,117,112,108,111,116,46,116,111,103,103,108,101,95,122,111,111,109,95,116,101,120,116,62,60,105,109,103,32,115,114,99,61,34,37,115,116,101,120,116,122,111,111,109,46,112,110,103,34,32,105,100,61,34,103,110,117,112,108,111,116,95,116,101,120,116,122,111,111,109,95,105,99,111,110,34,32,99,108,97,115,115,61,34,105,99,111,110,45,105,109,97,103,101,34,32,97,108,116,61,34,122,111,111,109,32,116,101,120,116,34,32,116,105,116,108,101,61,34,122,111,111,109,32,116,101,120,116,32,119,105,116,104,32,112,108,111,116,34,62,60,47,116,100,62,10,9,32,32,60,116,100,32,99,108,97,115,115,61,34,105,99,111,110,34,32,111,110,99,108,105,99,107,61,103,110,117,112,108,111,116,46,112,111,112,117,112,95,104,101,108,112,40,41,62,60,105,109,103,32,115,114,99,61,34,37,115,104,101,108,112,46,112,110,103,34,32,105,100,61,34,103,110,117,112,108,111,116,95,104,101,108,112,95,105,99,111,110,34,32,99,108,97,115,115,61,34,105,99,111,110,45,105,109,97,103,101,34,32,97,108,116,61,34,63,34,32,116,105,116,108,101,61,34,104,101,108,112,34,62,60,47,116,100,62,10,9,60,47,116,114,62,10,0,0,0,0,0,60,47,115,99,114,105,112,116,62,10,60,108,105,110,107,32,116,121,112,101,61,34,116,101,120,116,47,99,115,115,34,32,104,114,101,102,61,34,37,115,103,110,117,112,108,111,116,95,109,111,117,115,101,46,99,115,115,34,32,114,101,108,61,34,115,116,121,108,101,115,104,101,101,116,34,62,10,60,47,104,101,97,100,62,10,60,98,111,100,121,32,111,110,108,111,97,100,61,34,103,110,117,112,108,111,116,95,99,97,110,118,97,115,40,41,59,32,103,110,117,112,108,111,116,46,105,110,105,116,40,41,59,34,32,111,110,99,111,110,116,101,120,116,109,101,110,117,61,34,114,101,116,117,114,110,32,102,97,108,115,101,59,34,62,10,10,60,100,105,118,32,99,108,97,115,115,61,34,103,110,117,112,108,111,116,34,62,10,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,116,105,109,101,97,120,105,115,95,120,32,61,32,34,34,59,10,0,0,34,59,10,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,116,105,109,101,97,120,105,115,95,120,32,61,32,34,37,115,34,59,10,0,0,0,0,0,0,0,0,121,50,122,101,114,111,97,36,120,105,115,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,120,109,97,120,32,61,32,37,46,51,102,59,10,0,9,115,117,98,115,101,113,117,101,110,116,32,115,99,97,110,115,32,119,105,116,104,32,100,105,102,102,101,114,101,110,116,32,110,98,32,111,102,32,112,116,115,32,97,114,101,32,0,99,121,99,36,108,101,115,0,101,114,114,111,114,98,97,114,115,32,103,97,112,32,37,100,32,108,119,32,37,103,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,120,109,105,110,32,61,32,37,46,51,102,59,10,0,77,79,85,83,69,95,89,50,0,0,0,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,104,101,105,103,104,116,32,61,32,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,121,109,97,120,32,45,32,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,121,109,105,110,59,10,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,119,105,100,116,104,32,61,32,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,120,109,97,120,32,45,32,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,120,109,105,110,59,10,0,0,0,0,0,77,111,114,101,32,112,97,114,97,109,101,116,101,114,115,32,115,112,101,99,105,102,105,101,100,32,116,104,97,110,32,100,97,116,97,32,114,101,99,111,114,100,115,32,115,112,101,99,105,102,105,101,100,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,108,111,103,97,120,105,115,95,114,32,61,32,37,100,59,10,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,108,111,103,97,120,105,115,95,121,32,61,32,37,100,59,10,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,108,111,103,97,120,105,115,95,120,32,61,32,37,100,59,10,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,121,50,109,105,110,32,61,32,34,110,111,110,101,34,10,0,0,0,0,0,0,0,57,48,32,109,117,108,32,115,105,110,0,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,121,50,109,97,120,0,37,48,50,120,37,48,50,120,37,48,50,120,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,121,50,109,105,110,0,121,122,101,114,111,97,36,120,105,115,0,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,120,50,109,105,110,32,61,32,34,110,111,110,101,34,10,0,0,0,0,0,0,0,9,116,97,107,105,110,103,32,115,99,97,110,115,32,100,105,114,101,99,116,105,111,110,32,97,117,116,111,109,97,116,105,99,97,108,108,121,10,0,0,99,108,117,115,116,101,114,101,100,32,103,97,112,32,37,100,32,0,0,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,120,50,109,97,120,0,101,120,112,97,110,100,105,110,103,32,99,117,114,118,101,32,118,97,114,105,97,98,108,101,32,99,111,108,111,114,115,0,77,79,85,83,69,95,88,50,0,0,0,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,120,50,109,105,110,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,114,109,105,110,32,61,32,37,103,59,10,0,0,0,67,97,110,110,111,116,32,102,108,105,112,32,97,32,110,111,110,45,101,120,105,115,116,101,110,116,32,100,105,109,101,110,115,105,111,110,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,121,109,97,120,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,121,109,105,110,0,0,103,110,117,112,108,111,116,32,37,115,32,112,97,116,99,104,108,101,118,101,108,32,37,115,10,0,0,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,120,109,97,120,0,0,37,115,32,61,32,37,103,59,10,0,0,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,97,120,105,115,95,120,109,105,110,0,0,37,37,10,0,0,0,0,0,37,115,32,61,32,37,100,59,10,0,0,0,0,0,0,0,120,50,122,101,114,111,97,36,120,105,115,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,104,101,105,103,104,116,32,61,32,37,46,49,102,59,10,0,0,0,0,66,65,67,75,87,65,82,68,0,0,0,0,0,0,0,0,99,111,108,111,114,32,102,111,114,109,117,108,97,32,111,117,116,32,111,102,32,114,97,110,103,101,32,40,117,115,101,32,96,115,104,111,119,32,112,97,108,101,116,116,101,32,114,103,98,102,111,114,109,117,108,97,101,39,32,116,111,32,100,105,115,112,108,97,121,32,116,104,101,32,114,97,110,103,101,41,0,0,0,0,0,0,0,0,115,101,116,32,115,116,121,108,101,32,104,105,115,116,111,103,114,97,109,32,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,119,105,100,116,104,32,61,32,37,46,49,102,59,10,0,0,0,0,0,77,79,85,83,69,95,89,0,103,110,117,112,108,111,116,46,112,108,111,116,95,121,116,111,112,32,61,32,37,46,49,102,59,10,0,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,121,98,111,116,32,61,32,37,46,49,102,59,10,0,0,0,0,0,0,70,111,114,109,97,116,32,115,112,101,99,105,102,105,101,114,32,109,117,115,116,32,98,101,103,105,110,32,119,105,116,104,32,39,37,39,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,120,109,97,120,32,61,32,37,46,49,102,59,10,0,0,0,0,0,0,67,97,110,39,116,32,114,101,45,110,97,109,101,32,39,121,39,32,105,110,32,97,32,111,110,101,45,118,97,114,105,97,98,108,101,32,102,105,116,0,117,110,100,101,102,105,110,101,100,32,118,97,108,117,101,0,103,110,117,112,108,111,116,46,112,108,111,116,95,120,109,105,110,32,61,32,37,46,49,102,59,10,0,0,0,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,116,101,114,109,95,121,109,97,120,32,61,32,37,100,59,10,0,0,0,103,110,117,112,108,111,116,46,112,108,111,116,95,116,101,114,109,95,120,109,97,120,32,61,32,37,100,59,10,0,0,0,10,47,47,32,112,108,111,116,32,98,111,117,110,100,97,114,105,101,115,32,97,110,100,32,97,120,105,115,32,115,99,97,108,105,110,103,32,105,110,102,111,114,109,97,116,105,111,110,32,102,111,114,32,109,111,117,115,105,110,103,32,10,0,0,105,109,103,32,58,61,32,34,37,37,10,0,0,0,0,0,67,97,110,118,97,115,84,101,120,116,70,117,110,99,116,105,111,110,115,46,101,110,97,98,108,101,40,99,116,120,41,59,10,99,116,120,46,115,116,114,111,107,101,83,116,121,108,101,32,61,32,34,114,103,98,40,50,49,53,44,50,49,53,44,50,49,53,41,34,59,10,99,116,120,46,108,105,110,101,87,105,100,116,104,32,61,32,37,46,49,103,59,10,10,0,0,120,122,101,114,111,97,36,120,105,115,0,0,0,0,0,0,99,116,120,46,102,105,108,108,83,116,121,108,101,32,61,32,34,37,115,34,59,10,99,116,120,46,102,105,108,108,82,101,99,116,40,48,44,48,44,37,100,44,37,100,41,59,10,0,70,79,82,87,65,82,68,0,99,111,110,102,108,105,99,116,105,110,103,32,111,112,116,105,111,110,115,0,0,0,0,0,99,116,120,46,108,105,110,101,67,97,112,32,61,32,34,37,115,34,59,32,99,116,120,46,108,105,110,101,74,111,105,110,32,61,32,34,37,115,34,59,10,0,0,0,0,0,0,0,77,79,85,83,69,95,88,0,103,110,117,112,108,111,116,46,100,97,115,104,108,101,110,103,116,104,32,61,32,37,100,59,10,0,0,0,0,0,0,0,47,47,32,115,104,111,114,116,32,102,111,114,109,115,32,111,102,32,99,111,109,109,97,110,100,115,32,112,114,111,118,105,100,101,100,32,98,121,32,103,110,117,112,108,111,116,95,99,111,109,109,111,110,46,106,115,10,102,117,110,99,116,105,111,110,32,68,84,32,32,40,100,116,41,32,32,123,103,110,117,112,108,111,116,46,100,97,115,104,116,121,112,101,40,100,116,41,59,125,59,10,102,117,110,99,116,105,111,110,32,68,83,32,32,40,120,44,121,41,32,123,103,110,117,112,108,111,116,46,100,97,115,104,115,116,97,114,116,40,120,44,121,41,59,125,59,10,102,117,110,99,116,105,111,110,32,68,76,32,32,40,120,44,121,41,32,123,103,110,117,112,108,111,116,46,100,97,115,104,115,116,101,112,40,120,44,121,41,59,125,59,10,102,117,110,99,116,105,111,110,32,77,32,32,32,40,120,44,121,41,32,123,105,102,32,40,103,110,117,112,108,111,116,46,112,97,116,116,101,114,110,46,108,101,110,103,116,104,32,62,32,48,41,32,68,83,40,120,44,121,41,59,32,101,108,115,101,32,103,110,117,112,108,111,116,46,77,40,120,44,121,41,59,125,59,10,102,117,110,99,116,105,111,110,32,76,32,32,32,40,120,44,121,41,32,123,105,102,32,40,103,110,117,112,108,111,116,46,112,97,116,116,101,114,110,46,108,101,110,103,116,104,32,62,32,48,41,32,68,76,40,120,44,121,41,59,32,101,108,115,101,32,103,110,117,112,108,111,116,46,76,40,120,44,121,41,59,125,59,10,102,117,110,99,116,105,111,110,32,68,111,116,32,40,120,44,121,41,32,123,103,110,117,112,108,111,116,46,68,111,116,40,120,47,49,48,46,44,121,47,49,48,46,41,59,125,59,10,102,117,110,99,116,105,111,110,32,80,116,32,32,40,78,44,120,44,121,44,119,41,32,123,103,110,117,112,108,111,116,46,80,116,40,78,44,120,47,49,48,46,44,121,47,49,48,46,44,119,47,49,48,46,41,59,125,59,10,102,117,110,99,116,105,111,110,32,82,32,32,32,40,120,44,121,44,119,44,104,41,32,123,103,110,117,112,108,111,116,46,82,40,120,44,121,44,119,44,104,41,59,125,59,10,102,117,110,99,116,105,111,110,32,84,32,32,32,40,120,44,121,44,102,111,110,116,115,105,122,101,44,106,117,115,116,105,102,121,44,115,116,114,105,110,103,41,32,123,103,110,117,112,108,111,116,46,84,40,120,44,121,44,102,111,110,116,115,105,122,101,44,106,117,115,116,105,102,121,44,115,116,114,105,110,103,41,59,125,59,10,102,117,110,99,116,105,111,110,32,84,82,32,32,40,120,44,121,44,97,110,103,108,101,44,102,111,110,116,115,105,122,101,44,106,117,115,116,105,102,121,44,115,116,114,105,110,103,41,32,123,103,110,117,112,108,111,116,46,84,82,40,120,44,121,44,97,110,103,108,101,44,102,111,110,116,115,105,122,101,44,106,117,115,116,105,102,121,44,115,116,114,105,110,103,41,59,125,59,10,102,117,110,99,116,105,111,110,32,98,112,32,32,40,120,44,121,41,32,123,103,110,117,112,108,111,116,46,98,112,40,120,44,121,41,59,125,59,10,102,117,110,99,116,105,111,110,32,99,102,112,32,40,41,32,123,103,110,117,112,108,111,116,46,99,102,112,40,41,59,125,59,10,102,117,110,99,116,105,111,110,32,99,102,115,112,40,41,32,123,103,110,117,112,108,111,116,46,99,102,115,112,40,41,59,125,59,10,10,0,85,110,114,101,99,111,103,110,105,122,101,100,32,98,105,110,97,114,121,32,102,111,114,109,97,116,32,115,112,101,99,105,102,105,99,97,116,105,111,110,0,0,0,0,0,0,0,0,47,47,32,71,110,117,112,108,111,116,32,118,101,114,115,105,111,110,32,37,115,46,37,115,10,0,0,0,0,0,0,0,47,47,32,82,101,105,110,105,116,105,97,108,105,122,101,32,109,111,117,115,101,32,116,114,97,99,107,105,110,103,32,97,110,100,32,122,111,111,109,32,102,111,114,32,116,104,105,115,32,112,97,114,116,105,99,117,108,97,114,32,112,108,111,116,10,105,102,32,40,40,116,121,112,101,111,102,40,103,110,117,112,108,111,116,46,97,99,116,105,118,101,95,112,108,111,116,41,32,61,61,32,34,117,110,100,101,102,105,110,101,100,34,32,124,124,32,103,110,117,112,108,111,116,46,97,99,116,105,118,101,95,112,108,111,116,32,33,61,32,37,115,41,32,32,38,38,32,32,116,121,112,101,111,102,40,103,110,117,112,108,111,116,46,109,111,117,115,101,95,117,112,100,97,116,101,41,32,33,61,32,34,117,110,100,101,102,105,110,101,100,34,41,32,123,10,32,32,103,110,117,112,108,111,116,46,97,99,116,105,118,101,95,112,108,111,116,95,110,97,109,101,32,61,32,34,37,115,34,59,10,32,32,103,110,117,112,108,111,116,46,97,99,116,105,118,101,95,112,108,111,116,32,61,32,37,115,59,10,32,32,99,97,110,118,97,115,46,111,110,109,111,117,115,101,109,111,118,101,32,61,32,103,110,117,112,108,111,116,46,109,111,117,115,101,95,117,112,100,97,116,101,59,10,32,32,99,97,110,118,97,115,46,111,110,109,111,117,115,101,117,112,32,61,32,103,110,117,112,108,111,116,46,122,111,111,109,95,105,110,59,10,32,32,99,97,110,118,97,115,46,111,110,109,111,117,115,101,100,111,119,110,32,61,32,103,110,117,112,108,111,116,46,115,97,118,101,99,108,105,99,107,59,10,32,32,99,97,110,118,97,115,46,111,110,107,101,121,112,114,101,115,115,32,61,32,103,110,117,112,108,111,116,46,100,111,95,104,111,116,107,101,121,59,10,32,32,105,102,32,40,99,97,110,118,97,115,46,97,116,116,97,99,104,69,118,101,110,116,41,32,123,99,97,110,118,97,115,46,97,116,116,97,99,104,69,118,101,110,116,40,39,109,111,117,115,101,111,118,101,114,39,44,32,37,115,41,59,125,10,32,32,101,108,115,101,32,105,102,32,40,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,41,32,123,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,39,109,111,117,115,101,111,118,101,114,39,44,32,37,115,44,32,102,97,108,115,101,41,59,125,32,10,32,32,103,110,117,112,108,111,116,46,122,111,111,109,101,100,32,61,32,102,97,108,115,101,59,10,32,32,103,110,117,112,108,111,116,46,122,111,111,109,95,97,120,105,115,95,119,105,100,116,104,32,61,32,48,59,10,32,32,103,110,117,112,108,111,116,46,122,111,111,109,95,105,110,95,112,114,111,103,114,101,115,115,32,61,32,102,97,108,115,101,59,10,32,32,103,110,117,112,108,111,116,46,112,111,108,97,114,95,109,111,100,101,32,61,32,37,115,59,10,32,32,99,116,120,46,99,108,101,97,114,82,101,99,116,40,48,44,48,44,37,100,44,37,100,41,59,10,125,10,0,37,65,0,0,0,0,0,0,102,117,110,99,116,105,111,110,32,37,115,40,41,32,123,10,99,97,110,118,97,115,32,61,32,100,111,99,117,109,101,110,116,46,103,101,116,69,108,101,109,101,110,116,66,121,73,100,40,34,37,115,34,41,59,10,99,116,120,32,61,32,99,97,110,118,97,115,46,103,101,116,67,111,110,116,101,120,116,40,34,50,100,34,41,59,10,0,102,111,114,109,97,116,32,116,111,111,32,108,111,110,103,32,100,117,101,32,116,111,32,108,111,110,103,32,100,101,99,105,109,97,108,115,105,103,110,32,115,116,114,105,110,103,0,0,101,120,116,114,97,110,101,111,117,115,32,97,114,103,117,109,101,110,116,115,32,116,111,32,117,110,115,101,116,32,108,97,98,101,108,0,0,0,0,0,60,115,99,114,105,112,116,32,116,121,112,101,61,34,116,101,120,116,47,106,97,118,97,115,99,114,105,112,116,34,62,10,118,97,114,32,99,97,110,118,97,115,44,32,99,116,120,59,10,103,110,117,112,108,111,116,46,103,114,105,100,95,108,105,110,101,115,32,61,32,116,114,117,101,59,10,103,110,117,112,108,111,116,46,122,111,111,109,101,100,32,61,32,102,97,108,115,101,59,10,103,110,117,112,108,111,116,46,97,99,116,105,118,101,95,112,108,111,116,95,110,97,109,101,32,61,32,34,103,110,117,112,108,111,116,95,99,97,110,118,97,115,34,59,10,10,102,117,110,99,116,105,111,110,32,103,110,117,112,108,111,116,95,99,97,110,118,97,115,40,41,32,123,10,99,97,110,118,97,115,32,61,32,100,111,99,117,109,101,110,116,46,103,101,116,69,108,101,109,101,110,116,66,121,73,100,40,34,103,110,117,112,108,111,116,95,99,97,110,118,97,115,34,41,59,10,99,116,120,32,61,32,99,97,110,118,97,115,46,103,101,116,67,111,110,116,101,120,116,40,34,50,100,34,41,59,10,0,0,0,0,0,0,0,60,115,99,114,105,112,116,32,116,121,112,101,61,34,116,101,120,116,47,106,97,118,97,115,99,114,105,112,116,34,62,103,110,117,112,108,111,116,46,105,110,105,116,32,61,32,102,117,110,99,116,105,111,110,40,41,32,123,125,59,60,47,115,99,114,105,112,116,62,10,0,0,67,111,110,84,101,88,116,32,119,105,116,104,32,77,101,116,97,70,117,110,32,40,102,111,114,32,80,68,70,32,100,111,99,117,109,101,110,116,115,41,0,0,0,0,0,0,0,0,60,115,99,114,105,112,116,32,116,121,112,101,61,34,116,101,120,116,47,106,97,118,97,115,99,114,105,112,116,34,62,32,103,110,117,112,108,111,116,46,104,101,108,112,95,85,82,76,32,61,32,34,37,115,47,99,97,110,118,97,115,95,104,101,108,112,46,104,116,109,108,34,59,32,60,47,115,99,114,105,112,116,62,10,0,0,0,0,118,114,36,97,110,103,101,0,60,115,99,114,105,112,116,32,115,114,99,61,34,37,115,103,110,117,112,108,111,116,95,109,111,117,115,101,46,106,115,34,62,60,47,115,99,114,105,112,116,62,10,0,0,0,0,0,9,116,97,107,105,110,103,32,115,99,97,110,115,32,105,110,32,37,115,32,100,105,114,101,99,116,105,111,110,10,0,0,105,110,118,97,108,105,100,32,99,111,108,111,114,98,111,120,32,111,112,116,105,111,110,0,115,101,116,32,115,116,121,108,101,32,97,114,114,111,119,32,37,100,0,0,0,0,0,0,60,115,99,114,105,112,116,32,115,114,99,61,34,37,115,103,110,117,112,108,111,116,95,100,97,115,104,101,100,108,105,110,101,115,46,106,115,34,62,60,47,115,99,114,105,112,116,62,10,0,0,0,0,0,0,0,107,101,121,95,99,104,97,114,0,0,0,0,0,0,0,0,99,97,110,118,97,115,116,101,120,116,0,0,0,0,0,0,99,97,110,118,97,115,109,97,116,104,0,0,0,0,0,0,70,97,105,108,117,114,101,32,105,110,32,98,105,110,97,114,121,32,116,97,98,108,101,32,105,110,105,116,105,97,108,105,122,97,116,105,111,110,0,0,107,111,105,56,36,117,0,0,60,33,45,45,91,105,102,32,73,69,93,62,60,115,99,114,105,112,116,32,116,121,112,101,61,34,116,101,120,116,47,106,97,118,97,115,99,114,105,112,116,34,32,115,114,99,61,34,101,120,99,97,110,118,97,115,46,106,115,34,62,60,47,115,99,114,105,112,116,62,60,33,91,101,110,100,105,102,93,45,45,62,10,60,115,99,114,105,112,116,32,115,114,99,61,34,37,115,37,115,46,106,115,34,62,60,47,115,99,114,105,112,116,62,10,60,115,99,114,105,112,116,32,115,114,99,61,34,37,115,103,110,117,112,108,111,116,95,99,111,109,109,111,110,46,106,115,34,62,60,47,115,99,114,105,112,116,62,10,0,60,109,101,116,97,32,104,116,116,112,45,101,113,117,105,118,61,34,99,111,110,116,101,110,116,45,116,121,112,101,34,32,99,111,110,116,101,110,116,61,34,116,101,120,116,47,104,116,109,108,59,32,99,104,97,114,115,101,116,61,85,84,70,45,56,34,62,10,0,0,0,0,71,110,117,112,108,111,116,32,67,97,110,118,97,115,32,71,114,97,112,104,0,0,0,0,60,33,68,79,67,84,89,80,69,32,72,84,77,76,62,10,60,104,116,109,108,62,10,60,104,101,97,100,62,10,60,116,105,116,108,101,62,37,115,60,47,116,105,116,108,101,62,10,0,0,0,0,0,0,0,0,99,116,120,46,98,101,103,105,110,80,97,116,104,40,41,59,10,0,0,0,0,0,0,0,99,111,110,116,101,120,116,0,77,40,37,117,44,37,117,41,59,10,0,0,0,0,0,0,117,114,36,97,110,103,101,0,114,101,102,36,114,101,115,104,0,0,0,0,0,0,0,0,76,40,37,117,44,37,117,41,59,10,0,0,0,0,0,0,9,116,114,117,101,32,100,101,112,116,104,32,111,114,100,101,114,105,110,103,10,0,0,0,101,120,112,101,99,116,105,110,103,32,115,99,114,101,101,110,32,118,97,108,117,101,32,91,48,32,45,32,49,93,0,0,105,108,108,101,103,97,108,32,112,114,101,102,105,120,0,0,117,110,115,101,116,32,115,116,121,108,101,32,97,114,114,111,119,10,0,0,0,0,0,0,68,84,40,103,110,117,112,108,111,116,46,100,97,115,104,112,97,116,116,101,114,110,51,41,59,10,0,0,0,0,0,0,77,79,85,83,69,95,67,72,65,82,0,0,0,0,0,0,68,84,40,103,110,117,112,108,111,116,46,100,97,115,104,112,97,116,116,101,114,110,37,49,100,41,59,10,0,0,0,0,119,120,116,0,0,0,0,0,114,103,98,40,49,55,49,44,50,49,52,44,48,48,48,41,0,0,0,0,0,0,0,0,37,39,34,32,0,0,0,0,114,103,98,40,50,49,52,44,48,48,48,44,49,50,48,41,0,0,0,0,0,0,0,0,114,103,98,40,50,53,53,44,50,48,52,44,48,48,48,41,0,0,0,0,0,0,0,0,114,103,98,40,49,54,51,44,49,52,53,44,50,53,53,41,0,0,0,0,0,0,0,0,116,111,107,101,110,32,116,97,98,108,101,0,0,0,0,0,37,115,37,115,10,37,115,37,115,10,37,115,37,115,10,37,115,37,115,37,115,37,115,10,37,115,10,0,0,0,0,0,114,103,98,40,50,49,52,44,50,49,52,44,48,54,57,41,0,0,0,0,0,0,0,0,114,103,98,40,48,48,48,44,49,53,51,44,49,54,49,41,0,0,0,0,0,0,0,0,77,101,116,97,80,111,115,116,32,112,108,111,116,116,105,110,103,32,115,116,97,110,100,97,114,100,0,0,0,0,0,0,114,103,98,40,50,53,53,44,49,53,51,44,48,48,48,41,0,0,0,0,0,0,0,0,116,114,36,97,110,103,101,0,122,120,121,0,0,0,0,0,114,103,98,40,48,48,48,44,48,48,48,44,49,52,56,41,0,0,0,0,0,0,0,0,84,79,80,0,0,0,0,0,98,121,0,0,0,0,0,0,116,97,103,32,109,117,115,116,32,98,101,32,115,116,114,105,99,116,108,121,32,112,111,115,105,116,105,118,101,32,40,115,101,101,32,96,104,101,108,112,32,115,101,116,32,115,116,121,108,101,32,108,105,110,101,39,41,0,0,0,0,0,0,0,115,101,116,32,115,116,121,108,101,32,108,105,110,101,32,37,100,32,0,0,0,0,0,0,114,103,98,40,48,50,49,44,49,49,55,44,48,54,57,41,0,0,0,0,0,0,0,0,77,79,85,83,69,95,75,69,89,0,0,0,0,0,0,0,114,103,98,40,48,48,48,44,50,53,53,44,50,53,53,41,0,0,0,0,0,0,0,0,114,103,98,40,49,57,48,44,48,48,48,44,49,57,48,41,0,0,0,0,0,0,0,0,117,115,105,110,103,32,100,101,102,97,117,108,116,32,98,105,110,97,114,121,32,102,111,114,109,97,116,0,0,0,0,0,32,100,101,102,97,117,108,116,10,0,0,0,0,0,0,0,114,103,98,40,48,48,48,44,48,48,48,44,50,50,53,41,0,0,0,0,0,0,0,0,100,117,112,108,105,99,97,116,101,100,32,111,114,32,99,111,110,116,114,97,100,105,99,116,105,110,103,32,97,114,103,117,109,101,110,116,115,32,105,110,32,112,108,111,116,32,111,112,116,105,111,110,115,0,0,0,114,103,98,40,48,48,48,44,49,55,49,44,48,48,48,41,0,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,117,110,105,113,117,101,39,44,32,39,102,114,101,113,117,101,110,99,121,39,44,32,39,99,117,109,117,108,97,116,105,118,101,39,44,32,39,99,110,111,114,109,97,108,39,44,32,39,107,100,101,110,115,105,116,121,39,44,32,39,97,99,115,112,108,105,110,101,115,39,44,32,39,99,115,112,108,105,110,101,115,39,44,32,39,98,101,122,105,101,114,39,32,111,114,32,39,115,98,101,122,105,101,114,39,0,0,0,0,114,103,98,40,50,53,53,44,48,48,48,44,48,48,48,41,0,0,0,0,0,0,0,0,83,72,69,76,76,0,0,0,124,124,0,0,0,0,0,0,114,103,98,40,49,54,48,44,49,54,48,44,49,54,48,41,0,0,0,0,0,0,0,0,109,97,116,114,105,120,32,101,108,101,109,101,110,116,115,0]) -.concat([114,103,98,40,48,48,48,44,48,48,48,44,48,48,48,41,0,0,0,0,0,0,0,0,115,112,108,105,110,101,32,109,97,116,114,105,120,0,0,0,109,112,0,0,0,0,0,0,114,103,98,40,50,53,53,44,50,53,53,44,50,53,53,41,0,0,0,0,0,0,0,0,114,114,36,97,110,103,101,0,117,115,105,110,103,32,100,101,102,97,117,108,116,32,98,105,110,97,114,121,32,114,101,99,111,114,100,47,97,114,114,97,121,32,115,116,114,117,99,116,117,114,101,0,0,0,0,0,72,111,109,101,0,0,0,0,34,41,59,10,0,0,0,0,83,85,82,70,65,67,69,0,105,110,118,97,108,105,100,32,112,109,51,100,32,111,112,116,105,111,110,0,0,0,0,0,84,40,37,100,44,37,100,44,37,46,49,102,44,34,37,115,34,44,34,0,0,0,0,0,117,110,115,101,116,32,115,116,121,108,101,32,108,105,110,101,10,0,0,0,0,0,0,0,102,105,108,108,101,100,95,112,111,108,121,103,111,110,51,100,32,99,111,114,110,101,114,115,0,0,0,0,0,0,0,0,32,32,32,112,117,115,104,101,100,32,116,101,114,109,105,110,97,108,32,37,115,32,37,115,10,0,0,0,0,0,0,0,77,79,85,83,69,95,66,85,84,84,79,78,0,0,0,0,84,82,40,37,100,44,37,100,44,37,100,44,37,46,49,102,44,34,37,115,34,44,34,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,32,58,32,110,111,110,45,83,84,82,73,78,71,32,97,114,103,117,109,101,110,116,0,0,0,0,82,105,103,104,116,0,0,0,108,105,116,116,108,101,0,0,80,116,40,37,100,44,37,100,44,37,100,44,37,46,49,102,41,59,10,0,0,0,0,0,68,111,116,40,37,100,44,37,100,41,59,10,0,0,0,0,82,40,37,100,44,37,100,44,37,100,44,37,100,41,59,10,0,0,0,0,0,0,0,0,99,116,120,46,108,105,110,101,87,105,100,116,104,32,61,32,37,103,59,10,0,0,0,0,99,116,120,46,115,116,114,111,107,101,83,116,121,108,101,32,61,32,34,37,115,34,59,10,0,0,0,0,0,0,0,0,77,101,116,97,102,111,110,116,32,112,108,111,116,116,105,110,103,32,115,116,97,110,100,97,114,100,0,0,0,0,0,0,114,103,98,40,37,48,51,100,44,37,48,51,100,44,37,48,51,100,41,0,0,0,0,0,99,98,114,36,97,110,103,101,0,0,0,0,0,0,0,0,37,115,37,99,0,0,0,0,66,79,84,84,79,77,0,0,101,120,112,101,99,116,105,110,103,32,39,109,101,97,110,39,44,32,39,103,101,111,109,101,97,110,39,44,32,39,109,101,100,105,97,110,39,44,32,39,109,105,110,39,44,32,39,109,97,120,39,44,32,39,99,49,39,44,32,39,99,50,39,44,32,39,99,51,39,32,111,114,32,39,99,52,39,0,0,0,117,115,101,114,115,116,121,108,101,115,0,0,0,0,0,0,114,103,98,40,37,51,100,44,37,51,100,44,37,51,100,41,37,99,0,0,0,0,0,0,114,103,98,97,40,50,53,53,44,50,53,53,44,50,53,53,44,48,46,48,48,41,0,0,114,103,98,97,40,37,49,49,46,49,49,115,44,37,52,46,50,102,41,37,99,0,0,0,68,117,112,108,105,99,97,116,101,100,32,111,114,32,99,111,110,116,114,97,100,105,99,116,105,110,103,32,97,114,103,117,109,101,110,116,115,32,105,110,32,100,97,116,97,102,105,108,101,32,111,112,116,105,111,110,115,0,0,0,0,0,0,0,37,77,0,0,0,0,0,0,99,102,115,112,40,41,59,10,0,0,0,0,0,0,0,0,80,108,111,116,32,116,121,112,101,32,105,115,32,110,101,105,116,104,101,114,32,102,117,110,99,116,105,111,110,32,110,111,114,32,100,97,116,97,0,0,99,102,112,40,41,59,10,0,76,40,37,100,44,32,37,100,41,59,10,0,0,0,0,0,98,112,40,37,100,44,32,37,100,41,59,10,0,0,0,0,99,116,120,46,102,105,108,108,83,116,121,108,101,32,61,32,34,37,115,34,59,10,0,0,109,102,0,0,0,0,0,0,68,84,40,103,110,117,112,108,111,116,46,115,111,108,105,100,41,59,10,0,0,0,0,0,122,114,36,97,110,103,101,0,109,0,0,0,0,0,0,0,84,104,105,115,32,99,111,112,121,32,111,102,32,103,110,117,112,108,111,116,32,99,97,110,110,111,116,32,114,101,97,100,32,112,110,103,47,103,105,102,47,106,112,101,103,32,105,109,97,103,101,115,0,0,0,0,44,32,116,104,101,110,32,0,99,52,0,0,0,0,0,0,115,101,116,32,115,116,121,108,101,32,105,110,99,114,101,109,101,110,116,32,37,115,10,0,77,126,60,62,37,87,61,38,64,0,0,0,0,0,0,0,97,120,105,115,32,114,97,110,103,101,115,32,109,117,115,116,32,98,101,32,97,98,111,118,101,32,48,32,102,111,114,32,108,111,103,32,115,99,97,108,101,33,0,0,0,0,0,0,65,99,101,70,86,63,97,98,100,69,103,104,110,111,112,113,117,0,0,0,0,0,0,0,32,74,84,118,94,95,34,42,121,107,76,115,120,122,0,0,109,105,115,115,105,110,103,32,102,111,114,109,97,116,32,115,116,114,105,110,103,0,0,0,40,41,91,93,123,125,92,0,102,116,114,0,0,0,0,0,106,96,39,44,59,58,33,46,0,0,0,0,0,0,0,0,105,73,108,124,0,0,0,0,99,116,120,46,115,116,114,111,107,101,40,41,59,10,0,0,76,97,84,101,88,32,116,101,120,100,114,97,119,32,101,110,118,105,114,111,110,109,101,110,116,0,0,0,0,0,0,0,99,116,120,46,108,105,110,101,87,105,100,116,104,32,61,32,115,97,118,101,87,105,100,116,104,59,10,125,32,47,47,32,103,114,105,100,95,108,105,110,101,115,10,0,0,0,0,0,121,50,114,36,97,110,103,101,0,0,0,0,0,0,0,0,105,102,32,40,103,110,117,112,108,111,116,46,103,114,105,100,95,108,105,110,101,115,41,32,123,10,118,97,114,32,115,97,118,101,87,105,100,116,104,32,61,32,99,116,120,46,108,105,110,101,87,105,100,116,104,59,10,99,116,120,46,108,105,110,101,87,105,100,116,104,32,61,32,99,116,120,46,108,105,110,101,87,105,100,116,104,32,42,32,48,46,53,59,10,0,0,9,112,109,51,100,32,112,108,111,116,116,101,100,32,97,116,32,0,0,0,0,0,0,0,99,51,0,0,0,0,0,0,32,115,105,122,101,32,37,115,32,37,46,51,102,44,37,46,51,102,44,37,46,51,102,0,125,32,47,47,32,69,110,100,32,37,115,95,112,108,111,116,95,37,100,32,10,0,0,0,115,101,116,32,97,117,116,111,115,99,97,108,101,32,107,101,101,112,102,105,120,0,0,0,105,102,32,40,116,121,112,101,111,102,40,103,110,117,112,108,111,116,46,104,105,100,101,95,37,115,95,112,108,111,116,95,37,100,41,32,61,61,32,34,117,110,100,101,102,105,110,101,100,34,124,124,32,33,103,110,117,112,108,111,116,46,104,105,100,101,95,37,115,95,112,108,111,116,95,37,100,41,32,123,10,0,0,0,0,0,0,0,103,112,0,0,0,0,0,0,102,111,114,109,36,97,116,0,99,116,120,46,99,108,111,115,101,80,97,116,104,40,41,59,10,0,0,0,0,0,0,0,119,105,100,36,116,104,0,0,108,105,36,110,101,119,105,100,116,104,0,0,0,0,0,0,110,111,114,36,111,116,97,116,101,0,0,0,0,0,0,0,115,113,114,116,40,115,113,114,116,40,120,41,41,0,0,0,119,105,110,36,119,111,114,100,54,0,0,0,0,0,0,0,116,101,120,100,114,97,119,0,110,111,102,36,111,110,116,108,105,115,116,0,0,0,0,0,121,114,36,97,110,103,101,0,108,97,36,110,100,115,99,97,112,101,0,0,0,0,0,0,101,120,112,108,105,99,105,116,32,40,100,114,97,119,32,112,109,51,100,32,115,117,114,102,97,99,101,32,97,99,99,111,114,100,105,110,103,32,116,111,32,115,116,121,108,101,41,0,99,50,0,0,0,0,0,0,99,104,97,114,97,99,116,101,114,0,0,0,0,0,0,0,32,120,37,48,50,120,37,48,50,120,37,48,50,120,0,0,96,98,117,105,108,116,105,110,45,97,117,116,111,115,99,97,108,101,96,32,40,115,101,116,32,97,117,116,111,115,99,97,108,101,32,107,101,101,112,102,105,120,59,32,114,101,112,108,111,116,41,0,0,0,0,0,110,111,102,111,110,116,108,105,115,116,0,0,0,0,0,0,37,115,32,37,115,32,37,115,32,37,115,32,37,115,32,119,105,100,116,104,32,37,100,32,108,105,110,101,119,105,100,116,104,32,37,100,32,34,37,115,34,32,37,100,0,0,0,0,79,112,116,105,111,110,115,32,97,114,101,32,100,101,102,97,117,108,116,44,32,115,119,97,112,32,40,115,119,97,98,41,44,32,108,105,116,116,108,101,44,32,98,105,103,44,32,109,105,100,100,108,101,32,40,112,100,112,41,0,0,0,0,0,37,115,44,37,100,0,0,0,105,110,118,97,108,105,100,32,99,111,108,111,114,32,115,112,101,99,44,32,109,117,115,116,32,98,101,32,120,82,82,71,71,66,66,0,0,0,0,0,120,37,50,104,120,37,50,104,120,37,50,104,120,0,0,0,119,105,100,116,104,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,0,0,108,105,110,101,119,105,100,116,104,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,76,97,84,101,88,32,112,105,99,116,117,114,101,32,101,110,118,105,114,111,110,109,101,110,116,32,119,105,116,104,32,80,83,84,114,105,99,107,115,32,109,97,99,114,111,115,0,0,99,103,109,32,112,111,108,121,108,105,110,101,115,0,0,0,120,50,114,36,97,110,103,101,0,0,0,0,0,0,0,0,37,46,51,49,115,44,37,100,0,0,0,0,0,0,0,0,105,109,112,108,105,99,105,116,32,40,112,109,51,100,32,100,114,97,119,32,102,111,114,32,97,108,108,32,115,117,114,102,97,99,101,115,41,0,0,0,99,49,0,0,0,0,0,0,115,99,114,101,101,110,0,0,80,73,67,84,85,82,69,49,0,0,0,0,0,0,0,0,96,98,117,105,108,116,105,110,45,116,111,103,103,108,101,45,98,111,114,100,101,114,96,0,67,71,77,32,102,111,110,116,32,108,105,115,116,0,0,0,71,110,117,112,108,111,116,32,118,101,114,115,105,111,110,32,37,115,32,112,97,116,99,104,108,101,118,101,108,32,37,115,44,32,67,111,109,112,117,116,101,114,32,71,114,97,112,104,105,99,115,32,77,101,116,97,102,105,108,101,32,118,101,114,115,105,111,110,32,49,32,112,101,114,32,77,73,76,45,68,45,50,56,48,48,51,65,47,66,65,83,73,67,45,49,46,37,100,0,0,0,0,0,0,112,100,112,0,0,0,0,0,84,105,109,101,115,32,66,111,108,100,32,79,98,108,105,113,117,101,0,0,0,0,0,0,84,105,109,101,115,32,79,98,108,105,113,117,101,0,0,0,67,111,117,114,105,101,114,32,66,111,108,100,32,73,116,97,108,105,99,0,0,0,0,0,67,111,117,114,105,101,114,32,73,116,97,108,105,99,0,0,72,101,108,118,101,116,105,99,97,32,66,111,108,100,32,73,116,97,108,105,99,0,0,0,112,115,116,114,105,99,107,115,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,32,73,116,97,108,105,99,0,0,0,0,0,0,0,0,120,114,36,97,110,103,101,0,49,53,0,0,0,0,0,0,9,112,109,51,100,32,115,116,121,108,101,32,105,115,32,37,115,10,0,0,0,0,0,0,103,114,97,112,104,0,0,0,83,99,114,105,112,116,0,0,96,98,117,105,108,116,105,110,45,114,101,112,108,111,116,96,0,0,0,0,0,0,0,0,90,97,112,102,68,105,110,103,98,97,116,115,0,0,0,0,72,101,114,115,104,101,121,47,83,121,109,98,111,108,95,77,97,116,104,0,0,0,0,0,109,105,100,36,100,108,101,0,72,101,114,115,104,101,121,47,83,121,109,98,111,108,95,83,101,116,95,50,0,0,0,0,72,101,114,115,104,101,121,47,83,121,109,98,111,108,95,83,101,116,95,49,0,0,0,0,76,111,99,97,108,101,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,0,0,0,72,101,114,115,104,101,121,47,71,111,116,104,105,99,95,73,116,97,108,105,97,110,0,0,111,101,69,102,70,103,71,0,99,121,99,108,101,0,0,0,72,101,114,115,104,101,121,47,71,111,116,104,105,99,95,69,110,103,108,105,115,104,0,0,72,101,114,115,104,101,121,47,71,111,116,104,105,99,95,71,101,114,109,97,110,0,0,0,84,80,73,67,32,45,45,32,76,97,84,101,88,32,112,105,99,116,117,114,101,32,101,110,118,105,114,111,110,109,101,110,116,32,119,105,116,104,32,116,112,105,99,32,92,115,112,101,99,105,97,108,115,0,0,0,72,101,114,115,104,101,121,47,84,114,105,112,108,101,120,95,73,116,97,108,105,99,0,0,110,111,99,98,109,116,105,36,99,115,0,0,0,0,0,0,72,101,114,115,104,101,121,47,84,114,105,112,108,101,120,95,82,111,109,97,110,0,0,0,9,112,111,105,110,116,115,105,122,101,32,105,115,32,37,103,10,0,0,0,0,0,0,0,115,101,99,111,110,100,0,0,72,101,114,115,104,101,121,47,68,117,112,108,101,120,95,82,111,109,97,110,0,0,0,0,117,110,115,101,116,32,103,114,105,100,0,0,0,0,0,0,72,101,114,115,104,101,121,47,67,111,109,112,108,101,120,95,67,121,114,105,108,108,105,99,0,0,0,0,0,0,0,0,72,101,114,115,104,101,121,47,67,111,109,112,108,101,120,95,73,116,97,108,105,99,0,0,108,105,116,36,116,108,101,0,107,111,105,56,36,114,0,0,72,101,114,115,104,101,121,47,67,111,109,112,108,101,120,95,83,99,114,105,112,116,0,0,103,116,0,0,0,0,0,0,72,101,114,115,104,101,121,47,67,111,109,112,108,101,120,95,71,114,101,101,107,0,0,0,72,101,114,115,104,101,121,47,67,111,109,112,108,101,120,95,82,111,109,97,110,0,0,0,72,101,114,115,104,101,121,47,83,105,109,112,108,101,120,95,83,99,114,105,112,116,0,0,72,101,114,115,104,101,121,47,83,105,109,112,108,101,120,95,71,114,101,101,107,0,0,0,116,112,105,99,0,0,0,0,72,101,114,115,104,101,121,47,83,105,109,112,108,101,120,95,82,111,109,97,110,0,0,0,99,98,109,116,105,36,99,115,0,0,0,0,0,0,0,0,113,36,117,105,116,0,0,0,72,101,114,115,104,101,121,47,67,97,114,116,111,103,114,97,112,104,105,99,95,71,114,101,101,107,0,0,0,0,0,0,9,112,111,105,110,116,105,110,116,101,114,118,97,108,98,111,120,32,105,115,32,37,103,10,0,0,0,0,0,0,0,0,71,80,86,65,76,95,0,0,102,105,114,115,116,0,0,0,72,101,114,115,104,101,121,47,67,97,114,116,111,103,114,97,112,104,105,99,95,82,111,109,97,110,0,0,0,0,0,0,67,71,77,32,99,111,108,111,114,32,116,97,98,108,101,0,48,32,60,61,32,108,101,110,103,116,104,0,0,0,0,0,115,119,97,98,0,0,0,0,40,48,32,60,61,32,99,103,109,95,105,100,41,32,38,38,32,40,99,103,109,95,105,100,32,60,32,49,50,56,41,0,40,48,32,60,61,32,99,108,97,115,115,41,32,38,38,40,99,108,97,115,115,32,60,49,54,41,0,0,0,0,0,0,118,97,108,117,101,32,60,61,32,51,50,55,54,55,0,0,43,68,65,84,65,83,84,82,73,78,71,83,32,32,43,72,73,83,84,79,71,82,65,77,83,32,32,43,79,66,74,69,67,84,83,32,32,43,83,84,82,73,78,71,86,65,82,83,32,32,43,77,65,67,82,79,83,32,32,43,73,77,65,71,69,32,32,43,85,83,69,82,95,76,73,78,69,84,89,80,69,83,32,43,83,84,65,84,83,32,0,0,0,0,0,0,45,51,50,55,54,56,32,60,61,32,118,97,108,117,101,0,69,69,80,73,67,32,45,45,32,101,120,116,101,110,100,101,100,32,76,97,84,101,88,32,112,105,99,116,117,114,101,32,101,110,118,105,114,111,110,109,101,110,116,0,0,0,0,0,99,111,108,111,117,114,36,0,110,111,122,109,116,105,36,99,115,0,0,0,0,0,0,0,99,111,108,111,114,36,0,0,9,104,111,119,101,118,101,114,32,76,67,95,67,84,89,80,69,32,105,110,32,99,117,114,114,101,110,116,32,108,111,99,97,108,101,32,105,115,32,37,115,10,0,0,0,0,0,0,103,101,111,109,101,97,110,0,37,115,32,34,37,115,34,32,37,100,44,37,48,46,49,102,44,37,48,46,49,102,44,37,48,46,49,102,0,0,0,0,96,98,117,105,108,116,105,110,45,116,111,103,103,108,101,45,103,114,105,100,96,0,0,0,83,119,105,116,122,101,114,108,97,110,100,76,105,103,104,116,0,0,0,0,0,0,0,0,37,37,33,80,83,45,65,100,111,98,101,45,50,46,48,32,69,80,83,70,45,49,46,50,10,37,37,37,37,66,111,117,110,100,105,110,103,66,111,120,58,32,37,100,32,37,100,32,37,100,32,37,100,10,37,37,37,37,84,101,109,112,108,97,116,101,66,111,120,58,32,37,100,32,37,100,32,37,100,32,37,100,10,37,37,37,37,69,110,100,67,111,109,109,101,110,116,115,10,37,37,37,37,69,110,100,80,114,111,108,111,103,10,37,37,37,37,66,101,103,105,110,83,101,116,117,112,10,37,37,37,37,69,110,100,83,101,116,117,112,10,0,0,0,115,119,97,112,0,0,0,0,32,37,115,32,112,97,116,116,101,114,110,32,37,100,32,0,37,48,46,50,102,32,37,48,46,50,102,32,109,10,0,0,110,111,115,117,114,36,102,97,99,101,0,0,0,0,0,0,83,10,37,46,50,102,32,37,46,50,102,32,109,10,0,0,115,36,109,111,111,116,104,0,37,46,50,102,32,37,46,50,102,32,108,10,0,0,0,0,110,111,32,72,79,77,69,32,102,111,117,110,100,0,0,0,101,120,116,101,110,100,95,97,116,0,0,0,0,0,0,0,91,50,32,50,32,50,32,50,32,50,32,50,32,50,32,52,93,32,48,32,100,10,50,32,106,10,48,32,71,10,0,0,48,46,53,32,48,46,53,32,48,46,53,32,48,32,75,10,0,0,0,0,0,0,0,0,102,117,110,99,116,105,111,110,32,100,101,102,105,110,105,116,105,111,110,32,101,120,112,101,99,116,101,100,0,0,0,0,101,101,112,105,99,0,0,0,91,50,32,50,32,50,32,50,32,50,32,52,93,32,48,32,100,10,50,32,106,10,48,32,71,10,0,0,0,0,0,0,122,109,116,105,36,99,115,0,73,110,115,101,114,116,0,0,48,32,48,46,55,32,49,32,48,32,75,10,0,0,0,0,9,110,111,109,105,110,97,108,32,99,104,97,114,97,99,116,101,114,32,101,110,99,111,100,105,110,103,32,105,115,32,37,115,10,0,0,0,0,0,0,91,50,32,50,32,50,32,52,93,32,48,32,100,10,50,32,106,10,48,32,71,10,0,0,102,111,110,116,112,97,116,104,95,102,117,108,108,110,97,109,101,58,32,78,111,32,80,105,112,101,32,97,108,108,111,119,101,100,0,0,0,0,0,0,96,98,117,105,108,116,105,110,45,104,101,108,112,96,0,0,91,52,32,51,32,49,32,51,93,32,48,32,100,10,50,32,106,10,48,32,71,10,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,32,58,32,110,111,110,45,73,78,84,71,82,32,97,114,103,117,109,101,110,116,0,0,0,0,0,48,32,48,32,49,32,48,32,75,10,0,0,0,0,0,0,91,53,32,50,32,49,32,50,93,32,48,32,100,10,50,32,106,10,48,32,71,10,0,0,49,32,48,32,48,32,48,32,75,10,0,0,0,0,0,0,37,102,32,119,10,0,0,0,91,49,32,49,46,53,93,32,48,32,100,10,50,32,106,10,48,32,71,10,0,0,0,0,48,32,49,32,48,32,48,32,75,10,0,0,0,0,0,0,112,108,97,105,110,32,84,101,88,32,119,105,116,104,32,80,111,115,116,83,99,114,105,112,116,32,92,115,112,101,99,105,97,108,115,0,0,0,0,0,91,50,32,51,93,32,48,32,100,10,50,32,106,10,48,32,71,10,0,0,0,0,0,0,110,111,121,50,109,116,105,36,99,115,0,0,0,0,0,0,48,32,49,32,49,32,48,32,75,10,0,0,0,0,0,0,9,100,101,103,114,101,101,32,115,105,103,110,32,102,111,114,32,111,117,116,112,117,116,32,105,115,32,37,115,32,10,0,68,101,112,114,101,99,97,116,101,100,32,115,121,110,116,97,120,32,45,45,45,32,105,103,110,111,114,101,100,0,0,0,91,52,32,50,93,32,48,32,100,10,50,32,106,10,48,32,71,10,0,0,0,0,0,0,67,97,110,110,111,116,32,116,111,103,103,108,101,32,108,111,103,32,115,99,97,108,101,32,102,111,114,32,118,111,108,97,116,105,108,101,32,100,97,116,97,0,0,0,0,0,0,0,49,32,49,32,48,32,48,32,75,10,0,0,0,0,0,0,91,93,32,48,32,100,10,50,32,106,10,48,32,71,10,0,101,110,100,36,105,97,110,0,49,32,48,32,49,32,48,32,75,10,0,0,0,0,0,0,91,49,32,50,93,32,48,32,100,10,48,32,106,10,48,32,71,10,0,0,0,0,0,0,104,105,100,100,101,110,32,115,111,114,116,32,101,100,103,101,115,0,0,0,0,0,0,0,117,110,100,101,102,105,110,101,100,32,102,117,110,99,116,105,111,110,58,32,37,115,0,0,91,93,32,48,32,100,10,48,32,106,10,48,32,71,10,0,48,32,48,32,48,32,49,32,75,10,0,0,0,0,0,0,37,46,50,102,32,119,10,0,112,115,116,101,120,0,0,0,41,116,10,84,10,0,0,0,121,50,109,116,105,36,99,115,0,0,0,0,0,0,0,0,91,48,32,49,32,45,49,32,48,32,37,46,50,102,32,37,46,50,102,93,101,10,48,32,103,10,0,0,0,0,0,0,9,100,101,99,105,109,97,108,115,105,103,110,32,102,111,114,32,111,117,116,112,117,116,32,104,97,115,32,100,101,102,97,117,108,116,32,118,97,108,117,101,32,40,110,111,114,109,97,108,108,121,32,39,46,39,41,10,0,0,0,0,0,0,0,91,49,32,48,32,48,32,49,32,37,46,50,102,32,37,46,50,102,93,101,10,48,32,103,10,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,102,108,117,115,104,32,39,98,101,103,105,110,39,44,32,39,99,101,110,116,101,114,39,32,111,114,32,39,101,110,100,39,0,0,0,0,0,0,32,37,115,32,37,115,32,37,115,0,0,0,0,0,0,0,82,97,115,116,101,114,65,120,101,115,0,0,0,0,0,0,96,98,117,105,108,116,105,110,45,116,111,103,103,108,101,45,108,111,103,96,32,121,32,108,111,103,115,99,97,108,101,32,102,111,114,32,112,108,111,116,115,44,32,122,32,97,110,100,32,99,98,32,102,111,114,32,115,112,108,111,116,115,0,0,47,95,37,115,32,37,100,32,37,100,32,48,32,50,32,122,10,0,0,0,0,0,0,0,47,95,37,115,32,37,100,32,37,100,32,48,32,49,32,122,10,0,0,0,0,0,0,0,115,107,105,112,0,0,0,0,86,105,115,105,98,108,101,32,112,105,120,101,108,32,103,114,105,100,32,104,97,115,32,97,32,115,99,97,110,32,108,105,110,101,32,115,104,111,114,116,101,114,32,116,104,97,110,32,112,114,101,118,105,111,117,115,32,115,99,97,110,32,108,105,110,101,115,46,0,0,0,0,47,95,37,115,32,37,100,32,37,100,32,48,32,48,32,122,10,0,0,0,0,0,0,0,83,10,0,0,0,0,0,0,110,111,101,36,110,104,97,110,99,101,100,0,0,0,0,0,110,111,102,36,101,101,100,0,102,36,101,101,100,0,0,0,76,97,84,101,88,32,112,105,99,116,117,114,101,32,101,110,118,105,114,111,110,109,101,110,116,32,119,105,116,104,32,80,111,115,116,83,99,114,105,112,116,32,92,115,112,101,99,105,97,108,115,0,0,0,0,0,37,115,102,101,101,100,32,37,115,32,115,105,122,101,32,37,100,44,32,37,100,0,0,0,110,111,121,109,116,105,36,99,115,0,0,0,0,0,0,0,100,117,109,98,32,116,101,114,109,105,110,97,108,0,0,0,9,100,101,99,105,109,97,108,115,105,103,110,32,102,111,114,32,111,117,116,112,117,116,32,105,115,32,37,115,32,10,0,101,36,110,100,0,0,0,0,32,32,48,10,69,78,68,83,69,67,10,32,32,48,10,69,79,70,10,0,0,0,0,0,115,101,116,32,108,111,103,32,121,50,0,0,0,0,0,0,55,0,0,0,0,0,0,0,32,32,48,10,69,78,68,84,65,66,10,48,10,69,78,68,83,69,67,10,32,32,48,10,83,69,67,84,73,79,78,10,32,32,50,10,66,76,79,67,75,83,10,32,32,48,10,69,78,68,83,69,67,10,32,32,48,10,83,69,67,84,73,79,78,10,32,32,50,10,69,78,84,73,84,73,69,83,10,0,75,101,121,32,119,111,114,100,32,96,112,101,114,112,101,110,100,105,99,117,108,97,114,96,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,119,105,116,104,32,96,112,108,111,116,96,32,99,111,109,109,97,110,100,0,0,0,0,0,32,32,48,10,76,65,89,69,82,10,32,32,50,10,37,115,10,32,55,48,10,32,32,32,54,52,10,54,50,10,32,32,32,37,115,10,32,32,54,10,37,115,10,0,0,0,0,0,32,32,48,10,84,65,66,76,69,10,32,32,50,10,76,65,89,69,82,10,32,55,48,10,32,32,32,37,45,100,10,0,32,32,48,10,80,79,76,89,76,73,78,69,10,32,32,56,10,37,115,10,32,54,54,10,32,32,32,49,10,32,32,54,10,37,115,10,32,32,48,10,86,69,82,84,69,88,10,32,32,56,10,37,115,10,32,32,54,10,37,115,10,32,49,48,10,37,45,54,46,51,102,10,32,50,48,10,37,45,54,46,51,102,10,32,51,48,10,48,46,48,48,48,10,0,0,0,68,65,83,72,68,79,84,0,115,113,114,116,32,115,113,114,116,0,0,0,0,0,0,0,68,79,84,0,0,0,0,0,112,115,108,97,116,101,120,0,80,72,65,78,84,79,77,0,121,109,116,105,36,99,115,0,67,69,78,84,69,82,0,0,9,100,101,99,105,109,97,108,115,105,103,110,32,102,111,114,32,105,110,112,117,116,32,105,115,32,32,37,115,32,10,0,98,36,101,103,105,110,0,0,115,101,116,32,97,114,114,111,119,32,37,100,32,102,114,111,109,32,0,0,0,0,0,0,72,73,68,68,69,78,0,0,117,110,115,101,116,32,108,111,103,32,121,50,0,0,0,0,68,65,83,72,69,68,0,0,67,79,78,84,73,78,85,79,85,83,0,0,0,0,0,0,112,101,114,112,36,101,110,100,105,99,117,108,97,114,0,0,32,32,48,10,86,69,82,84,69,88,10,32,32,56,10,37,115,10,32,32,54,10,37,115,10,32,32,49,48,10,37,45,54,46,51,102,10,32,32,50,48,10,37,45,54,46,51,102,10,32,32,51,48,10,48,46,48,48,48,10,0,0,0,0,53,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,50,0,0,0,0,0,0,0,76,97,84,101,88,32,112,105,99,116,117,114,101,32,101,110,118,105,114,111,110,109,101,110,116,32,117,115,105,110,103,32,103,114,97,112,104,105,99,120,32,112,97,99,107,97,103,101,0,0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,110,111,120,50,109,116,105,36,99,115,0,0,0,0,0,0,83,84,65,78,68,65,82,68,0,0,0,0,0,0,0,0,78,111,32,102,117,114,116,104,101,114,32,111,112,116,105,111,110,115,32,97,108,108,111,119,101,100,32,97,102,116,101,114,32,39,100,101,102,97,117,108,116,115,39,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,115,116,101,112,32,118,97,108,117,101,115,32,105,44,106,0,0,0,0,0,0,0,117,110,115,101,116,32,97,114,114,111,119,10,0,0,0,0,32,55,50,10,37,100,10,32,49,49,10,37,45,54,46,51,102,10,32,50,49,10,37,45,54,46,51,102,10,32,51,49,10,48,46,48,48,48,10,0,115,101,116,32,108,111,103,32,120,50,0,0,0,0,0,0,32,49,48,10,37,45,54,46,51,102,10,32,50,48,10,37,45,54,46,51,102,10,32,51,48,10,48,46,48,48,48,10,32,52,48,10,37,45,54,46,51,102,10,32,32,49,10,37,115,10,32,53,48,10,37,45,54,46,51,102,10,32,32,55,10,37,115,10,0,0,0,0,32,32,48,10,84,69,88,84,10,32,32,56,10,37,115,10,0,0,0,0,0,0,0,0,32,32,48,10,83,69,81,69,78,68,10,0,0,0,0,0,38,35,120,37,50,46,50,120,59,0,0,0,0,0,0,0,123,125,94,95,64,38,126,0,32,98,97,99,107,103,114,111,117,110,100,32,34,35,37,48,54,120,34,0,0,0,0,0,32,100,97,115,104,108,101,110,103,116,104,32,37,46,49,102,0,0,0,0,0,0,0,0,101,112,115,108,97,116,101,120,0,0,0,0,0,0,0,0,32,108,119,32,37,46,49,102,0,0,0,0,0,0,0,0,120,50,109,116,105,36,99,115,0,0,0,0,0,0,0,0,114,111,116,36,97,116,105,111,110,0,0,0,0,0,0,0,32,115,105,122,101,32,37,100,44,37,100,32,0,0,0,0,9,108,111,103,45,102,105,108,101,32,102,111,114,32,102,105,116,115,32,105,115,32,117,110,99,104,97,110,103,101,100,32,102,114,111,109,32,116,104,101,32,101,110,118,105,114,111,110,109,101,110,116,32,100,101,102,97,117,108,116,32,111,102,10,9,39,37,115,39,10,0,0,32,112,111,105,110,116,0,0,32,102,111,110,116,115,99,97,108,101,32,37,46,49,102,0,117,110,115,101,116,32,108,111,103,32,120,50,0,0,0,0,32,101,110,104,97,110,99,101,100,32,0,0,0,0,0,0,37,115,32,37,115,32,37,115,32,102,111,110,116,32,34,37,115,44,37,103,34,0,0,0,99,111,110,116,111,117,114,32,112,111,108,121,103,111,110,0,37,103,0,0,0,0,0,0,110,111,112,114,111,36,112,111,114,116,105,111,110,97,108,0,98,97,99,107,36,103,114,111,117,110,100,0,0,0,0,0,66,97,100,32,102,111,114,109,97,116,32,99,104,97,114,97,99,116,101,114,0,0,0,0,100,101,36,102,97,117,108,116,0,0,0,0,0,0,0,0,101,120,116,114,97,110,101,111,117,115,32,97,114,103,117,109,101,110,116,115,32,116,111,32,117,110,115,101,116,32,114,101,99,116,97,110,103,108,101,0,116,101,114,109,111,112,116,36,105,111,110,0,0,0,0,0,101,109,102,95,109,111,118,101,58,32,40,37,100,44,37,100,41,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,76,97,84,101,88,32,112,105,99,116,117,114,101,32,101,110,118,105,114,111,110,109,101,110,116,32,119,105,116,104,32,101,109,84,101,88,32,115,112,101,99,105,97,108,115,0,0,0,110,111,120,109,116,105,36,99,115,0,0,0,0,0,0,0,101,109,102,95,115,111,108,105,100,95,118,101,99,116,111,114,58,32,40,37,100,44,37,100,41,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,9,108,111,103,45,102,105,108,101,32,102,111,114,32,102,105,116,115,32,105,115,32,119,97,115,32,115,101,116,32,98,121,32,116,104,101,32,117,115,101,114,32,116,111,32,98,101,32,10,9,39,37,115,39,10,0,10,9,100,117,109,109,121,32,118,97,114,105,97,98,108,101,32,105,115,32,116,32,102,111,114,32,99,117,114,118,101,115,10,0,0,0,0,0,0,0,105,99,111,110,118,32,102,97,105,108,101,100,0,0,0,0,115,101,116,32,108,111,103,32,121,0,0,0,0,0,0,0,105,99,111,110,118,95,111,112,101,110,32,102,97,105,108,101,100,0,0,0,0,0,0,0,85,84,70,45,49,54,76,69,0,0,0,0,0,0,0,0,99,112,52,36,51,55,0,0,83,104,105,102,116,95,74,73,83,0,0,0,0,0,0,0,32,34,37,115,34,10,0,0,85,84,70,45,56,0,0,0,105,99,111,110,118,32,115,116,114,105,110,103,0,0,0,0,32,83,116,114,105,107,101,79,117,116,0,0,0,0,0,0,32,83,116,114,105,107,101,111,117,116,0,0,0,0,0,0,101,109,116,101,120,0,0,0,32,115,116,114,105,107,101,111,117,116,0,0,0,0,0,0,120,109,116,105,36,99,115,0,112,119,100,0,0,0,0,0,32,85,110,100,101,114,108,105,110,101,0,0,0,0,0,0,32,110,111,116,0,0,0,0,117,110,114,101,99,111,103,110,105,122,101,100,32,111,98,106,101,99,116,32,116,121,112,101,0,0,0,0,0,0,0,0,32,117,110,100,101,114,108,105,110,101,0,0,0,0,0,0,117,110,115,101,116,32,108,111,103,32,121,0,0,0,0,0,101,109,102,95,100,97,115,104,101,100,95,118,101,99,116,111,114,58,32,40,37,100,44,37,100,41,32,111,117,116,32,111,102,32,114,97,110,103,101,0,32,105,46,44,59,58,124,33,39,0,0,0,0,0,0,0,111,114,105,103,36,105,110,0,109,119,60,62,0,0,0,0,32,105,106,108,46,44,59,58,124,33,40,41,91,93,73,45,39,0,0,0,0,0,0,0,118,36,101,114,115,105,111,110,0,0,0,0,0,0,0,0,43,85,83,69,95,77,79,85,83,69,32,32,0,0,0,0,116,101,120,116,115,36,112,101,99,105,97,108,0,0,0,0,116,101,120,116,114,36,105,103,105,100,0,0,0,0,0,0,76,97,84,101,88,32,112,105,99,116,117,114,101,32,101,110,118,105,114,111,110,109,101,110,116,0,0,0,0,0,0,0,116,101,120,116,110,36,111,114,109,97,108,0,0,0,0,0,110,111,99,98,100,116,105,36,99,115,0,0,0,0,0,0,114,116,0,0,0,0,0,0,116,101,120,116,104,36,105,100,100,101,110,0,0,0,0,0,9,102,105,116,32,119,105,108,108,37,115,32,112,108,97,99,101,32,112,97,114,97,109,101,116,101,114,32,101,114,114,111,114,115,32,105,110,32,118,97,114,105,97,98,108,101,115,10,0,0,0,0,0,0,0,0,117,110,107,110,111,119,110,32,111,98,106,101,99,116,0,0,116,36,104,105,99,107,110,101,115,115,0,0,0,0,0,0,115,101,116,32,108,111,103,32,120,0,0,0,0,0,0,0,115,109,36,97,108,108,0,0,112,111,114,36,116,114,97,105,116,0,0,0,0,0,0,0,116,114,97,110,115,36,112,111,115,101,0,0,0,0,0,0,112,111,105,36,110,116,115,109,97,120,0,0,0,0,0,0,109,101,36,116,114,105,99,0,110,111,99,111,110,36,116,111,117,114,115,0,0,0,0,0,35,32,32,32,32,69,79,70,10,0,0,0,0,0,0,0,102,36,111,110,116,115,105,122,101,0,0,0,0,0,0,0,72,79,77,69,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,58,39,0,0,0,100,101,36,112,116,104,0,0,98,36,105,103,0,0,0,0,102,117,110,99,116,105,111,110,32,99,111,110,116,97,105,110,115,32,116,111,111,32,109,97,110,121,32,112,97,114,97,109,101,116,101,114,115,0,0,0,108,97,116,101,120,0,0,0,32,115,105,122,101,32,37,102,32,37,102,0,0,0,0,0,99,98,100,116,105,36,99,115,0,0,0,0,0,0,0,0,83,121,115,95,82,101,113,0,32,115,105,122,101,32,37,100,32,37,100,0,0,0,0,0,79,70,70,0,0,0,0,0,112,111,108,121,36,103,111,110,0,0,0,0,0,0,0,0,118,101,114,115,105,111,110,0,108,111,97,100,112,97,116,104,95,102,111,112,101,110,0,0,117,110,115,101,116,32,108,111,103,32,120,0,0,0,0,0,100,101,112,116,104,0,0,0,109,101,116,114,105,99,0,0,115,99,97,110,0,0,0,0,105,110,99,104,101,115,0,0,112,111,105,110,116,115,109,97,120,0,0,0,0,0,0,0,115,109,97,108,108,0,0,0,98,105,103,0,0,0,0,0,37,115,32,37,115,32,37,115,32,37,100,32,37,115,32,37,115,32,37,115,37,115,32,37,115,32,34,37,115,44,37,100,34,32,37,115,32,37,100,32,37,115,32,37,100,32,37,115,32,37,115,0,0,0,0,0,84,107,47,84,99,108,32,99,97,110,118,97,115,32,119,105,100,103,101,116,32,91,112,101,114,108,116,107,93,32,91,105,110,116,101,114,97,99,116,105,118,101,93,0,0,0,0,0,32,116,101,120,116,114,105,103,105,100,0,0,0,0,0,0,110,111,122,100,116,105,36,99,115,0,0,0,0,0,0,0,32,116,101,120,116,104,105,100,100,101,110,0,0,0,0,0,79,78,0,0,0,0,0,0,32,114,111,116,97,116,101,32,98,121,32,37,100,0,0,0,32,116,101,120,116,115,112,101,99,105,97,108,0,0,0,0,115,101,116,32,108,111,103,32,122,0,0,0,0,0,0,0,37,115,37,115,37,115,0,0,32,116,101,120,116,110,111,114,109,97,108,0,0,0,0,0,110,111,102,108,105,112,0,0,37,72,0,0,0,0,0,0,119,114,111,110,103,32,118,101,114,115,105,111,110,32,110,117,109,98,101,114,44,32,109,117,115,116,32,98,101,32,51,46,49,32,111,114,32,51,46,50,0,0,0,0,0,0,0,0,104,105,100,100,101,110,32,115,111,114,116,97,114,114,97,121,0,0,0,0,0,0,0,0,118,101,114,115,105,111,110,58,32,51,46,49,32,111,114,32,51,46,50,32,101,120,112,101,99,116,101,100,0,0,0,0,112,111,105,110,116,115,109,97,120,58,32,110,117,109,98,101,114,32,111,117,116,32,111,102,32,114,97,110,103,101,32,40,50,44,37,108,100,41,0,0,109,97,120,46,32,112,111,105,110,116,115,32,112,101,114,32,112,111,108,121,108,105,110,101,58,32,110,117,109,98,101,114,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,0,100,101,112,116,104,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,0,0,116,107,99,97,110,118,97,115,0,0,0,0,0,0,0,0,100,101,112,116,104,58,32,110,117,109,98,101,114,32,101,120,112,101,99,116,101,100,0,0,122,100,116,105,36,99,115,0,116,104,105,99,107,110,101,115,115,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,9,112,111,108,97,114,32,105,115,32,37,115,10,0,0,0,116,104,105,99,107,110,101,115,115,58,32,110,117,109,98,101,114,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,117,110,115,101,116,32,108,111,103,32,122,0,0,0,0,0,115,105,122,101,58,32,50,32,110,117,109,98,101,114,115,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,0,0,80,83,105,122,101,95,50,0,83,105,110,103,108,101,0,0,102,108,105,112,0,0,0,0,86,105,115,105,98,108,101,32,112,105,120,101,108,32,103,114,105,100,32,104,97,115,32,97,32,115,99,97,110,32,108,105,110,101,32,108,111,110,103,101,114,32,116,104,97,110,32,112,114,101,118,105,111,117,115,32,115,99,97,110,32,108,105,110,101,115,46,0,0,0,0,0,65,52,0,0,0,0,0,0,76,101,116,116,101,114,0,0,35,70,73,71,32,51,46,50,10,37,115,10,37,115,10,37,115,10,37,115,10,37,54,46,50,102,10,37,115,10,37,100,10,37,100,32,37,100,10,0,51,46,50,0,0,0,0,0,77,101,116,114,105,99,0,0,84,71,73,70,32,88,49,49,32,91,109,111,100,101,93,32,91,120,44,121,93,32,91,100,97,115,104,101,100,93,32,91,34,102,111,110,116,34,32,91,102,111,110,116,115,105,122,101,93,93,0,0,0,0,0,0,73,110,99,104,101,115,0,0,110,111,121,50,100,116,105,36,99,115,0,0,0,0,0,0,67,101,110,116,101,114,0,0,100,101,103,114,101,101,115,10,0,0,0,0,0,0,0,0,115,101,116,32,108,97,98,101,108,32,37,100,32,34,37,115,34,32,97,116,32,0,0,0,35,70,73,71,32,51,46,49,10,37,115,10,37,115,10,37,115,10,37,100,32,37,100,10,0,0,0,0,0,0,0,0,115,101,116,32,108,111,103,32,99,98,0,0,0,0,0,0,51,46,49,0,0,0,0,0,70,73,71,95,112,111,105,110,116,115,0,0,0,0,0,0,102,108,105,112,122,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,54,46,51,102,32,37,54,46,51,102,32,37,100,32,37,54,46,51,102,32,37,54,46,51,102,32,37,100,32,37,100,32,37,115,92,48,48,49,10,0,0,0,0,0,0,70,73,71,32,116,101,120,116,0,0,0,0,0,0,0,0,52,10,9,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,0,0,53,10,9,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,0,0,0,0,115,113,114,116,40,120,41,0,50,32,51,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,54,46,51,102,32,48,32,48,32,48,32,48,32,48,32,0,0,0,0,0,0,0,116,103,105,102,0,0,0,0,49,32,51,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,54,46,51,102,32,49,32,48,46,48,48,48,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,10,0,121,50,100,116,105,36,99,115,0,0,0,0,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,0,114,97,100,105,97,110,115,10,0,0,0,0,0,0,0,0,37,100,32,37,100,32,37,46,51,102,32,37,46,51,102,32,37,46,51,102,10,0,0,0,115,97,109,112,108,105,110,103,32,114,97,116,101,32,109,117,115,116,32,98,101,32,62,32,49,59,32,115,97,109,112,108,105,110,103,32,117,110,99,104,97,110,103,101,100,0,0,0,117,110,115,101,116,32,108,97,98,101,108,10,0,0,0,0,114,101,99,116,0,0,0,0,117,110,115,101,116,32,108,111,103,32,99,98,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,57,46,51,102,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,54,46,51,102,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,10,32,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,0,0,77,117,115,116,32,115,112,101,99,105,102,121,32,97,32,115,97,109,112,108,105,110,103,32,97,114,114,97,121,32,115,105,122,101,32,98,101,102,111,114,101,32,105,110,100,105,99,97,116,105,110,103,32,102,108,105,112,32,105,110,32,115,101,99,111,110,100,32,100,105,109,101,110,115,105,111,110,0,0,0,102,105,103,58,32,65,116,116,101,109,112,116,32,116,111,32,115,101,116,32,112,97,108,101,116,116,101,32,116,119,105,99,101,10,0,0,0,0,0,0,37,100,32,37,100,32,35,37,50,46,50,120,37,50,46,50,120,37,50,46,50,120,10,0,77,111,110,111,99,104,114,111,109,101,32,102,105,103,32,102,105,108,101,58,32,117,115,105,110,103,32,103,114,97,121,32,112,97,108,101,116,116,101,32,105,110,115,116,101,97,100,32]) -.concat([111,102,32,99,111,108,111,114,10,0,0,0,0,0,0,0,102,105,103,58,32,80,97,108,101,116,116,101,32,117,115,101,100,32,98,101,102,111,114,101,32,115,101,116,10,0,0,0,32,37,100,32,37,100,0,0,87,51,67,32,83,99,97,108,97,98,108,101,32,86,101,99,116,111,114,32,71,114,97,112,104,105,99,115,32,100,114,105,118,101,114,0,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,57,46,51,102,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,108,100,10,9,0,0,0,110,111,121,100,116,105,36,99,115,0,0,0,0,0,0,0,45,54,10,0,0,0,0,0,9,65,110,103,108,101,115,32,97,114,101,32,105,110,32,0,73,108,108,101,103,97,108,32,118,97,108,117,101,32,102,111,114,32,115,105,122,101,0,0,117,110,115,101,116,32,107,101,121,10,0,0,0,0,0,0,35,32,69,110,100,32,112,108,111,116,32,35,37,100,10,0,96,98,117,105,108,116,105,110,45,110,101,97,114,101,115,116,45,108,111,103,96,32,116,111,103,103,108,101,32,108,111,103,115,99,97,108,101,32,111,102,32,97,120,105,115,32,110,101,97,114,101,115,116,32,99,117,114,115,111,114,0,0,0,0,35,32,66,101,103,105,110,32,112,108,111,116,32,35,37,100,10,0,0,0,0,0,0,0,32,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,102,108,105,112,121,0,0,0,54,0,0,0,0,0,0,0,78,101,101,100,32,50,32,116,111,32,55,32,117,115,105,110,103,32,115,112,101,99,115,0,27,42,109,112,49,109,50,97,50,81,0,0,0,0,0,0,27,42,100,101,84,0,0,0,27,42,100,97,102,108,115,67,0,0,0,0,0,0,0,0,27,42,112,0,0,0,0,0,81,77,83,47,81,85,73,67,32,76,97,115,101,114,32,112,114,105,110,116,101,114,32,40,97,108,115,111,32,84,97,108,97,114,105,115,32,49,50,48,48,32,97,110,100,32,111,116,104,101,114,115,41,0,0,0,27,42,109,37,100,66,0,0,121,100,116,105,36,99,115,0,27,42,100,84,0,0,0,0,9,115,97,109,112,108,105,110,103,32,114,97,116,101,32,105,115,32,37,100,44,32,37,100,10,0,0,0,0,0,0,0,110,111,115,113,36,117,97,114,101,0,0,0,0,0,0,0,115,101,116,32,107,101,121,32,37,115,111,112,97,113,117,101,10,0,0,0,0,0,0,0,72,80,50,54,0,0,0,0,116,117,114,110,105,110,103,32,109,111,117,115,101,32,111,102,102,46,10,0,0,0,0,0,37,100,44,37,100,79,0,0,37,100,44,37,100,80,0,0,102,108,105,112,120,0,0,0,27,42,100,0,0,0,0,0,27,42,109,37,100,78,0,0,9,102,111,110,116,112,97,116,104,32,105,115,32,101,109,112,116,121,10,0,0,0,0,0,27,42,109,49,109,49,110,49,51,54,44,49,99,90,0,0,120,50,94,123,37,100,125,0,27,42,100,97,99,90,0,0,105,110,118,97,108,105,100,32,97,120,105,115,0,0,0,0,27,42,112,97,102,37,100,44,37,100,90,0,0,0,0,0,113,109,115,0,0,0,0,0,27,42,112,98,102,37,100,44,37,100,90,0,0,0,0,0,110,111,120,50,100,116,105,36,99,115,0,0,0,0,0,0,27,42,109,37,100,98,90,0,9,105,115,111,32,115,97,109,112,108,105,110,103,32,114,97,116,101,32,105,115,32,37,100,44,32,37,100,10,0,0,0,110,111,114,97,36,116,105,111,0,0,0,0,0,0,0,0,10,115,101,116,32,107,101,121,32,109,97,120,99,111,108,117,109,110,115,32,37,100,32,109,97,120,114,111,119,115,32,37,100,0,0,0,0,0,0,0,27,42,108,37,115,10,0,0,116,117,114,110,105,110,103,32,109,111,117,115,101,32,111,110,46,10,0,0,0,0,0,0,27,42,109,37,100,110,90,10,0,0,0,0,0,0,0,0,110,111,101,106,101,99,116,0,120,95,109,105,110,51,100,32,115,104,111,117,108,100,32,110,111,116,32,101,113,117,97,108,32,120,95,109,97,120,51,100,33,0,0,0,0,0,0,0,67,117,114,114,101,110,116,108,121,32,110,111,116,32,115,117,112,112,111,114,116,105,110,103,32,116,104,114,101,101,45,100,105,109,101,110,115,105,111,110,97,108,32,115,97,109,112,108,105,110,103,0,0,0,0,0,105,115,111,36,95,56,56,53,57,95,49,0,0,0,0,0,101,106,101,99,116,0,0,0,32,116,121,112,101,10,0,0,37,100,32,112,101,110,115,32,37,115,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,34,101,106,101,99,116,34,32,111,114,32,110,117,109,98,101,114,32,111,102,32,112,101,110,115,0,0,0,0,0,78,117,109,98,101,114,32,111,102,32,112,101,110,115,32,109,117,115,116,32,98,101,32,112,111,115,105,116,105,118,101,0,101,106,101,36,99,116,0,0,80,111,115,116,83,99,114,105,112,116,32,103,114,97,112,104,105,99,115,44,32,105,110,99,108,117,100,105,110,103,32,69,80,83,70,32,101,109,98,101,100,100,101,100,32,102,105,108,101,115,32,40,42,46,101,112,115,41,0,0,0,0,0,0,80,85,83,80,48,59,80,71,59,27,46,90,10,0,0,0,120,50,100,116,105,36,99,115,0,0,0,0,0,0,0,0,112,114,36,105,110,116,0,0,80,85,83,80,48,59,27,46,90,10,0,0,0,0,0,0,105,110,100,101,112,101,110,100,101,110,116,108,121,32,115,99,97,108,101,100,0,0,0,0,114,97,36,116,105,111,0,0,112,114,101,36,102,105,120,0,10,115,101,116,32,107,101,121,32,37,115,105,110,118,101,114,116,32,115,97,109,112,108,101,110,32,37,103,32,115,112,97,99,105,110,103,32,37,103,32,119,105,100,116,104,32,37,103,32,104,101,105,103,104,116,32,37,103,32,0,0,0,0,0,67,65,55,59,0,0,0,0,96,98,117,105,108,116,105,110,45,116,111,103,103,108,101,45,109,111,117,115,101,96,0,0,73,78,59,37,115,10,83,67,48,44,37,100,44,48,44,37,100,59,10,83,82,37,102,44,37,102,59,10,0,0,0,0,27,46,89,10,27,46,73,56,49,59,59,49,55,58,27,46,78,59,49,57,58,27,46,77,53,48,48,58,10,0,0,0,100,122,0,0,0,0,0,0,80,85,59,80,65,37,100,44,37,100,59,10,0,0,0,0,80,65,37,100,44,37,100,59,10,0,0,0,0,0,0,0,80,68,59,80,65,37,100,44,37,100,59,10,0,0,0,0,45,85,83,69,95,67,87,68,82,67,32,32,0,0,0,0,80,85,59,10,83,80,37,100,59,10,0,0,0,0,0,0,3,10,0,0,0,0,0,0,112,111,115,116,115,99,114,105,112,116,0,0,0,0,0,0,76,66,0,0,0,0,0,0,110,111,120,100,116,105,36,99,115,0,0,0,0,0,0,0,116,114,0,0,0,0,0,0,68,73,48,44,49,59,10,0,111,110,32,116,104,101,32,115,97,109,101,32,115,99,97,108,101,0,0,0,0,0,0,0,115,113,36,117,97,114,101,0,110,111,98,111,120,0,0,0,68,73,48,44,45,49,59,10,0,0,0,0,0,0,0,0,96,98,117,105,108,116,105,110,45,112,114,101,118,105,111,117,115,45,109,111,117,115,101,45,102,111,114,109,97,116,96,0,68,73,49,44,48,59,10,0,116,0,0,0,0,0,0,0,112,36,115,112,111,105,110,116,115,0,0,0,0,0,0,0,77,117,115,116,32,115,112,101,99,105,102,121,32,97,32,115,97,109,112,108,105,110,103,32,97,114,114,97,121,32,115,105,122,101,32,98,101,102,111,114,101,32,105,110,100,105,99,97,116,105,110,103,32,115,112,97,99,105,110,103,32,105,110,32,115,101,99,111,110,100,32,100,105,109,101,110,115,105,111,110,0,0,0,0,0,0,0,0,32,37,115,32,115,111,108,105,100,32,37,46,50,102,32,0,110,36,111,112,115,112,111,105,110,116,115,0,0,0,0,0,110,111,104,105,100,100,101,110,36,51,100,0,0,0,0,0,102,36,111,110,116,0,0,0,115,121,110,116,97,120,32,101,114,114,111,114,0,0,0,0,100,97,115,36,104,101,100,0,115,111,108,36,105,100,0,0,110,111,112,115,112,111,105,110,116,115,0,0,0,0,0,0,70,114,97,109,101,32,109,97,107,101,114,32,77,73,70,32,51,46,48,48,32,102,111,114,109,97,116,0,0,0,0,0,112,115,112,111,105,110,116,115,0,0,0,0,0,0,0,0,120,100,116,105,36,99,115,0,83,99,114,111,108,108,95,76,111,99,107,0,0,0,0,0,112,105,116,99,104,0,0,0,120,47,121,47,122,0,0,0,101,120,116,114,97,110,101,111,117,115,32,111,114,32,111,117,116,45,111,102,45,111,114,100,101,114,32,97,114,103,117,109,101,110,116,115,32,105,110,32,115,101,116,32,97,114,114,111,119,115,116,121,108,101,0,0,104,101,105,103,104,116,0,0,115,119,105,116,99,104,101,100,32,109,111,117,115,101,32,102,111,114,109,97,116,32,102,114,111,109,32,37,108,100,32,116,111,32,37,108,100,10,0,0,32,37,115,32,37,100,32,37,115,32,92,10,32,32,32,37,115,32,37,115,32,37,102,32,37,115,0,0,0,0,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,115,117,98,115,116,114,105,110,103,32,114,97,110,103,101,32,111,112,101,114,97,116,111,114,32,97,112,112,108,105,101,100,32,116,111,32,110,111,110,45,83,84,82,73,78,71,32,116,121,112,101,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,112,111,105,110,116,32,115,105,122,101,58,32,114,101,97,108,32,110,117,109,98,101,114,0,0,0,0,0,0,0,100,114,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,102,111,110,116,58,32,115,116,105,99,107,44,32,99,103,95,116,105,109,101,115,44,32,117,110,105,118,101,114,115,44,32,122,97,112,102,95,100,105,110,103,98,97,116,115,44,32,97,110,116,105,113,117,101,95,111,108,105,118,101,44,10,97,114,105,97,108,44,32,99,111,117,114,105,101,114,44,32,103,97,114,97,109,111,110,100,95,97,110,116,105,103,117,97,44,32,108,101,116,116,101,114,95,103,111,116,104,105,99,44,32,99,103,95,111,109,101,103,97,44,32,97,108,98,101,114,116,117,115,44,10,116,105,109,101,115,95,110,101,119,95,114,111,109,97,110,44,32,99,108,97,114,101,110,100,111,110,44,32,99,111,114,111,110,101,116,44,32,109,97,114,105,103,111,108,100,44,32,116,114,117,101,116,121,112,101,95,115,121,109,98,111,108,115,44,32,111,114,32,119,105,110,103,100,105,110,103,115,0,0,0,0,0,0,78,117,109,98,101,114,32,111,102,32,112,101,110,115,32,109,117,115,116,32,98,101,32,97,32,112,111,115,105,116,105,118,101,0,0,0,0,0,0,0,108,101,116,116,101,114,0,0,108,101,116,36,116,101,114,0,108,101,103,97,108,0,0,0,109,105,102,0,0,0,0,0,108,101,103,36,97,108,0,0,110,111,99,98,116,105,36,99,115,0,0,0,0,0,0,0,110,111,101,120,116,101,110,100,101,100,0,0,0,0,0,0,120,47,121,0,0,0,0,0,97,114,114,111,119,115,116,121,108,101,0,0,0,0,0,0,110,111,97,117,116,111,116,105,116,108,101,115,0,0,0,0,110,111,101,120,116,36,101,110,100,101,100,0,0,0,0,0,96,98,117,105,108,116,105,110,45,110,101,120,116,45,109,111,117,115,101,45,102,111,114,109,97,116,96,0,0,0,0,0,101,120,116,101,110,100,101,100,0,0,0,0,0,0,0,0,101,120,116,36,101,110,100,101,100,0,0,0,0,0,0,0,100,121,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,109,111,100,101,58,32,112,111,114,116,114,97,105,116,32,111,114,32,108,97,110,100,115,99,97,112,101,0,0,0,109,36,111,100,101,0,0,0,42,65,108,108,42,32,101,100,103,101,115,32,117,110,100,101,102,105,110,101,100,32,111,114,32,111,117,116,32,111,102,32,114,97,110,103,101,44,32,116,104,117,115,32,110,111,32,112,108,111,116,46,0,0,0,0,27,38,108,48,79,0,0,0,27,38,108,49,79,0,0,0,27,69,27,38,108,49,88,37,115,10,0,0,0,0,0,0,73,109,97,103,101,110,32,108,97,115,101,114,32,112,114,105,110,116,101,114,0,0,0,0,27,37,48,65,27,69,10,0,99,98,116,105,36,99,115,0,27,37,49,65,27,38,108,48,72,10,0,0,0,0,0,0,9,9,37,115,32,97,120,101,115,32,97,114,101,32,37,115,10,0,0,0,0,0,0,0,111,98,106,101,99,116,32,105,110,105,116,105,97,108,105,122,97,116,105,111,110,32,102,97,105,108,117,114,101,0,0,0,97,117,116,111,116,105,116,108,101,115,0,0,0,0,0,0,85,76,49,44,49,48,48,59,10,85,76,50,44,56,44,56,44,57,44,56,44,56,44,57,44,56,44,56,44,57,44,56,44,56,44,57,59,10,85,76,51,44,54,44,54,44,54,44,55,44,54,44,54,44,54,44,55,44,54,44,54,44,54,44,55,44,54,44,54,44,54,44,55,59,10,85,76,52,44,53,44,53,44,53,44,49,48,44,53,44,53,44,53,44,49,48,44,53,44,53,44,53,44,49,48,59,10,85,76,53,44,53,44,53,44,53,44,53,44,53,44,56,44,53,44,53,44,53,44,53,44,53,44,56,44,53,44,53,44,53,44,53,44,53,44,57,59,10,85,76,54,44,56,44,56,44,48,44,57,44,56,44,56,44,48,44,57,44,56,44,56,44,48,44,57,59,10,85,76,55,44,52,44,52,44,52,44,52,44,48,44,52,44,52,44,52,44,52,44,52,44,48,44,52,44,52,44,52,44,52,44,52,44,48,44,52,59,10,85,76,56,44,54,44,54,44,54,44,54,44,54,44,54,44,48,44,54,44,54,44,54,44,54,44,54,44,54,44,54,44,48,44,54,59,10,0,96,98,117,105,108,116,105,110,45,100,101,99,114,101,109,101,110,116,45,99,108,105,112,98,111,97,114,100,109,111,100,101,96,0,0,0,0,0,0,0,73,78,83,80,49,83,68,49,44,37,100,44,50,44,37,100,44,0,0,0,0,0,0,0,27,37,48,66,0,0,0,0,80,83,105,122,101,95,49,0,100,116,0,0,0,0,0,0,105,109,97,103,101,0,0,0,80,69,60,0,0,0,0,0,80,69,0,0,0,0,0,0,46,48,56,0,0,0,0,0,105,109,97,103,101,110,0,0,46,49,54,0,0,0,0,0,110,111,114,116,105,36,99,115,0,0,0,0,0,0,0,0,46,50,52,0,0,0,0,0,37,103,32,114,111,116,95,120,44,32,37,103,32,114,111,116,95,122,44,32,37,103,32,115,99,97,108,101,44,32,37,103,32,115,99,97,108,101,95,122,10,0,0,0,0,0,0,0,111,98,106,101,99,116,0,0,97,117,116,111,116,105,116,108,101,115,32,99,111,108,117,109,110,104,101,97,100,0,0,0,44,50,0,0,0,0,0,0,115,119,105,116,99,104,101,100,32,99,108,105,112,98,111,97,114,100,32,102,111,114,109,97,116,32,102,114,111,109,32,37,108,100,32,116,111,32,37,108,100,10,0,0,0,0,0,0,80,87,46,49,76,84,49,44,46,50,53,0,0,0,0,0,80,87,46,50,76,84,0,0,100,120,0,0,0,0,0,0,80,87,37,115,76,84,0,0,80,87,37,115,76,84,37,100,37,115,0,0,0,0,0,0,80,85,59,10,83,80,49,59,10,80,87,46,50,76,84,49,44,46,50,53,0,0,0,0,80,85,59,10,83,80,49,59,10,80,87,46,50,76,84,0,115,113,114,116,0,0,0,0,80,85,59,10,83,80,37,100,59,10,76,84,59,0,0,0,72,80,32,68,101,115,105,103,110,106,101,116,32,55,53,48,67,44,32,72,80,32,76,97,115,101,114,106,101,116,32,73,73,73,47,73,86,44,32,101,116,99,46,32,40,109,97,110,121,32,111,112,116,105,111,110,115,41,0,0,0,0,0,0,80,85,59,10,83,80,37,100,59,10,76,84,37,100,59,0,114,116,105,36,99,115,0,0,76,66,37,115,3,10,0,0,109,97,112,10,0,0,0,0,73,110,99,111,110,115,105,115,116,101,110,116,32,111,112,116,105,111,110,115,0,0,0,0,68,73,49,44,48,0,0,0,96,98,117,105,108,116,105,110,45,105,110,99,114,101,109,101,110,116,45,99,108,105,112,98,111,97,114,100,109,111,100,101,96,0,0,0,0,0,0,0,68,73,48,44,45,49,0,0,68,73,48,44,49,0,0,0,97,114,114,36,97,121,0,0,76,79,55,0,0,0,0,0,76,79,52,0,0,0,0,0,76,79,49,0,0,0,0,0,87,71,37,46,50,102,44,49,56,48,44,49,56,48,59,69,80,59,10,0,0,0,0,0,69,87,37,46,50,102,44,48,44,49,56,48,59,10,0,0,112,99,108,53,0,0,0,0,80,77,50,59,70,84,49,48,44,51,48,59,70,80,59,69,80,59,70,84,59,10,0,0,110,111,122,116,105,36,99,115,0,0,0,0,0,0,0,0,70,84,49,48,44,51,48,59,87,71,37,46,50,102,44,48,44,51,54,48,59,69,80,59,70,84,59,10,0,0,0,0,9,118,105,101,119,32,105,115,32,0,0,0,0,0,0,0,85,110,114,101,99,111,103,110,105,122,101,100,32,111,114,32,100,117,112,108,105,99,97,116,101,32,111,112,116,105,111,110,0,0,0,0,0,0,0,0,76,101,102,116,0,0,0,0,70,84,49,48,44,51,48,59,82,65,37,100,44,37,100,59,69,80,59,70,84,59,10,0,110,111,116,0,0,0,0,0,82,65,37,100,44,37,100,59,69,80,59,10,0,0,0,0,87,71,37,100,44,48,44,51,54,48,59,69,80,59,10,0,114,101,99,36,111,114,100,0,87,71,37,100,44,57,48,44,50,55,48,59,69,80,59,69,87,37,100,44,48,44,57,48,59,10,0,0,0,0,0,0,87,71,37,100,44,49,56,48,44,50,55,48,59,69,80,59,69,87,37,100,44,57,48,44,57,48,59,10,0,0,0,0,87,71,37,100,44,49,56,48,44,49,56,48,59,69,80,59,69,87,37,100,44,48,44,49,56,48,59,10,0,0,0,0,87,71,37,100,44,50,55,48,44,50,55,48,59,69,80,59,69,87,37,100,44,49,56,48,44,57,48,59,10,0,0,0,87,71,37,100,44,57,48,44,57,48,59,69,80,59,69,87,37,100,44,49,56,48,44,57,48,59,87,71,37,100,44,50,55,48,44,57,48,59,69,80,59,69,87,37,100,44,48,44,57,48,59,10,0,0,0,0,72,80,55,52,55,53,32,97,110,100,32,114,101,108,97,116,105,118,101,115,32,91,110,117,109,98,101,114,32,111,102,32,112,101,110,115,93,32,91,101,106,101,99,116,93,0,0,0,87,71,37,100,44,50,55,48,44,49,56,48,59,69,80,59,69,87,37,100,44,57,48,44,49,56,48,59,10,0,0,0,122,116,105,36,99,115,0,0,87,71,37,100,44,50,55,48,44,57,48,59,69,80,59,69,87,37,100,44,48,44,50,55,48,59,10,0,0,0,0,0,9,115,117,114,102,97,99,101,32,105,115,32,37,115,100,114,97,119,110,10,0,0,0,0,102,105,108,108,99,36,111,108,111,114,0,0,0,0,0,0,104,111,114,105,122,111,110,116,97,108,0,0,0,0,0,0,87,71,37,100,44,48,44,50,55,48,59,69,80,59,69,87,37,100,44,50,55,48,44,57,48,59,10,0,0,0,0,0,100,105,115,116,97,110,99,101,32,116,111,32,114,117,108,101,114,32,119,105,108,108,32,37,115,32,98,101,32,115,104,111,119,110,32,105,110,32,112,111,108,97,114,32,99,111,111,114,100,105,110,97,116,101,115,46,10,0,0,0,0,0,0,0,87,71,37,100,44,57,48,44,49,56,48,59,69,80,59,69,87,37,100,44,50,55,48,44,49,56,48,59,10,0,0,0,87,71,37,100,44,48,44,57,48,59,69,80,59,69,87,37,100,44,57,48,44,57,48,59,87,71,37,100,44,49,56,48,44,57,48,59,69,80,59,69,87,37,100,44,50,55,48,44,57,48,59,10,0,0,0,0,85,110,114,101,99,111,103,110,105,122,101,100,32,102,105,108,101,116,121,112,101,59,32,116,114,121,32,34,115,104,111,119,32,100,97,116,97,102,105,108,101,32,98,105,110,97,114,121,32,102,105,108,101,116,121,112,101,115,34,0,0,0,0,0,87,71,37,100,44,49,56,48,44,57,48,59,69,80,59,69,87,37,100,44,50,55,48,44,50,55,48,59,10,0,0,0,87,71,37,100,44,48,44,49,56,48,59,69,80,59,69,87,37,100,44,49,56,48,44,49,56,48,59,10,0,0,0,0,9,115,121,115,116,101,109,32,102,111,110,116,112,97,116,104,32,105,115,32,0,0,0,0,87,71,37,100,44,57,48,44,57,48,59,69,80,59,69,87,37,100,44,49,56,48,44,50,55,48,59,10,0,0,0,0,120,50,94,123,37,100,125,89,105,0,0,0,0,0,0,0,87,71,37,100,44,48,44,57,48,59,69,80,59,69,87,37,100,44,57,48,44,50,55,48,59,10,0,0,0,0,0,0,121,111,117,32,99,97,110,39,116,32,99,104,97,110,103,101,32,116,104,101,32,111,117,116,112,117,116,32,105,110,32,109,117,108,116,105,112,108,111,116,32,109,111,100,101,0,0,0,37,72,58,37,77,58,37,83,0,0,0,0,0,0,0,0,67,73,37,100,59,10,0,0,104,112,103,108,0,0,0,0,80,77,50,59,70,80,59,69,80,59,10,0,0,0,0,0,110,111,121,50,116,105,36,99,115,0,0,0,0,0,0,0,80,77,48,59,10,0,0,0,100,114,97,119,110,0,0,0,102,99,0,0,0,0,0,0,118,101,114,116,105,99,97,108,0,0,0,0,0,0,0,0,87,71,37,46,50,102,44,48,44,51,54,48,59,69,80,59,10,0,0,0,0,0,0,0,96,98,117,105,108,116,105,110,45,116,111,103,103,108,101,45,112,111,108,97,114,100,105,115,116,97,110,99,101,96,0,0,67,73,37,46,50,102,59,10,0,0,0,0,0,0,0,0,82,65,37,46,50,102,44,37,46,50,102,59,69,80,59,10,0,0,0,0,0,0,0,0,117,116,102,36,56,0,0,0,119,105,110,103,100,105,110,103,115,0,0,0,0,0,0,0,32,32,99,111,108,111,114,0,98,97,110,100,0,0,0,0,119,36,105,110,103,100,105,110,103,115,0,0,0,0,0,0,116,114,117,101,116,121,112,101,95,115,121,109,98,111,108,115,0,0,0,0,0,0,0,0,116,114,36,117,101,116,121,112,101,95,115,121,109,98,111,108,115,0,0,0,0,0,0,0,103,101,116,99,111,108,111,114,46,99,0,0,0,0,0,0,109,97,114,105,103,111,108,100,0,0,0,0,0,0,0,0,72,80,50,54,52,56,32,97,110,100,32,72,80,50,54,52,55,0,0,0,0,0,0,0,109,36,97,114,105,103,111,108,100,0,0,0,0,0,0,0,121,50,116,105,36,99,115,0,112,36,108,111,116,0,0,0,99,111,114,111,110,101,116,0,114,101,109,111,118,101,100,0,73,110,118,97,108,105,100,32,99,111,109,109,97,110,100,32,45,32,100,105,100,32,121,111,117,32,109,101,97,110,32,39,117,110,115,101,116,32,115,116,121,108,101,32,114,101,99,116,97,110,103,108,101,39,63,0,110,111,111,117,116,36,112,117,116,0,0,0,0,0,0,0,32,37,115,32,37,115,32,37,115,114,101,118,101,114,115,101,32,37,115,101,110,104,97,110,99,101,100,32,37,115,32,0,99,111,114,36,111,110,101,116,0,0,0,0,0,0,0,0,99,111,109,109,117,110,105,99,97,116,105,111,110,32,99,111,109,109,97,110,100,115,32,119,105,108,108,32,98,101,32,101,99,104,111,101,100,46,10,0,99,108,97,114,101,110,100,111,110,0,0,0,0,0,0,0,99,108,36,97,114,101,110,100,111,110,0,0,0,0,0,0,102,105,108,101,36,116,121,112,101,0,0,0,0,0,0,0,116,105,109,101,115,95,110,101,119,95,114,111,109,97,110,0,116,105,36,109,101,115,95,110,101,119,95,114,111,109,97,110,0,0,0,0,0,0,0,0,97,108,98,101,114,116,117,115,0,0,0,0,0,0,0,0,43,66,73,78,65,82,89,95,68,65,84,65,32,32,0,0,97,108,36,98,101,114,116,117,115,0,0,0,0,0,0,0,99,103,95,111,109,101,103,97,0,0,0,0,0,0,0,0,104,112,50,54,52,56,0,0,99,103,95,111,36,109,101,103,97,0,0,0,0,0,0,0,110,111,121,116,105,36,99,115,0,0,0,0,0,0,0,0,108,101,116,116,101,114,95,103,111,116,104,105,99,0,0,0,0,0,0,0,0,0,0,0,9,104,105,100,100,101,110,32,115,117,114,102,97,99,101,32,105,115,32,37,115,10,0,0,99,36,101,110,116,114,101,0,32,98,111,116,116,111,109,0,108,36,101,116,116,101,114,95,103,111,116,104,105,99,0,0,101,99,104,111,105,110,103,32,111,102,32,99,111,109,109,117,110,105,99,97,116,105,111,110,32,99,111,109,109,97,110,100,115,32,105,115,32,116,117,114,110,101,100,32,111,102,102,46,10,0,0,0,0,0,0,0,103,97,114,97,109,111,110,100,95,97,110,116,105,103,117,97,0,0,0,0,0,0,0,0,103,36,97,114,97,109,111,110,100,95,97,110,116,105,103,117,97,0,0,0,0,0,0,0,100,97,116,97,102,105,108,101,32,99,111,108,117,109,110,0,115,101,116,32,97,117,116,111,115,99,97,108,101,32,37,115,102,105,120,109,97,120,10,0,99,111,117,36,114,105,101,114,0,0,0,0,0,0,0,0,97,114,105,97,108,0,0,0,97,114,36,105,97,108,0,0,99,117,114,118,101,32,112,111,105,110,116,115,0,0,0,0,117,110,114,101,99,111,103,110,105,122,101,100,32,111,112,116,105,111,110,32,37,115,10,0,105,116,101,114,97,116,105,111,110,32,108,105,110,107,101,100,32,108,105,115,116,0,0,0,97,110,116,105,113,117,101,95,111,108,105,118,101,0,0,0,97,110,36,116,105,113,117,101,95,111,108,105,118,101,0,0,72,80,50,54,50,51,65,32,97,110,100,32,109,97,121,98,101,32,111,116,104,101,114,115,0,0,0,0,0,0,0,0,122,97,112,102,95,100,105,110,103,98,97,116,115,0,0,0,121,116,105,36,99,115,0,0,80,97,117,115,101,0,0,0,122,36,97,112,102,95,100,105,110,103,98,97,116,115,0,0,9,84,114,121,32,116,111,32,115,101,116,32,76,79,67,75,69,68,32,97,115,112,101,99,116,32,114,97,116,105,111,32,116,111,32,37,103,58,49,46,48,10,0,0,0,0,0,0,85,110,114,101,99,111,103,105,110,105,122,101,100,32,111,98,106,101,99,116,32,116,121,112,101,0,0,0,0,0,0,0,32,116,111,112,0,0,0,0,99,103,95,116,105,109,101,115,0,0,0,0,0,0,0,0,108,102,32,116,111,107,101,110,115,0,0,0,0,0,0,0,96,98,117,105,108,116,105,110,45,116,111,103,103,108,101,45,118,101,114,98,111,115,101,96,0,0,0,0,0,0,0,0,99,103,95,116,36,105,109,101,115,0,0,0,0,0,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,115,117,98,115,116,114,105,110,103,32,114,97,110,103,101,32,115,112,101,99,105,102,105,101,114,115,32,109,117,115,116,32,104,97,118,101,32,105,110,116,101,103,101,114,32,118,97,108,117,101,115,0,0,0,0,0,115,116,105,99,107,0,0,0,100,102,95,110,111,95,117,115,101,95,115,112,101,99,115,32,61,61,32,48,32,124,124,32,111,117,116,112,117,116,32,61,61,32,100,102,95,110,111,95,117,115,101,95,115,112,101,99,115,32,124,124,32,111,117,116,112,117,116,32,61,61,32,109,97,120,0,0,0,0,0,0,115,36,116,105,99,107,0,0,117,110,105,118,101,114,115,0,117,36,110,105,118,101,114,115,0,0,0,0,0,0,0,0,53,44,37,100,44,54,44,37,100,44,55,44,37,100,59,83,83,59,10,0,0,0,0,0,51,44,37,102,44,0,0,0,104,112,50,54,50,51,65,0,52,44,37,102,44,0,0,0,110,111,120,50,116,105,36,99,115,0,0,0,0,0,0,0,83,68,49,44,37,100,44,50,44,37,100,44,0,0,0,0,9,78,111,32,97,116,116,101,109,112,116,32,116,111,32,99,111,110,116,114,111,108,32,97,115,112,101,99,116,32,114,97,116,105,111,10,0,0,0,0,85,110,114,101,99,111,103,110,105,122,101,100,32,112,111,108,121,103,111,110,32,115,121,110,116,97,120,0,0,0,0,0,36,0,0,0,0,0,0,0,115,101,116,32,115,105,122,101,32,115,113,117,97,114,101,0,37,100,32,37,115,32,91,37,49,100,44,37,49,100,93,0,99,111,117,114,0,0,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,58,32,117,110,107,110,111,119,110,32,99,111,108,117,109,110,32,116,121,112,101,0,0,0,0,0,37,37,46,37,100,102,0,0,37,115,37,48,50,100,0,0,64,100,111,99,117,109,101,110,116,40,108,97,110,103,117,97,103,101,32,105,109,112,114,101,115,115,44,32,112,97,112,101,114,32,97,52,41,0,0,0,99,111,110,118,101,114,116,101,100,32,108,97,98,101,108,32,115,116,114,105,110,103,0,0,63,36,0,0,0,0,0,0,104,36,101,108,112,0,0,0,70,73,71,32,103,114,97,112,104,105,99,115,32,108,97,110,103,117,97,103,101,32,102,111,114,32,88,70,73,71,32,103,114,97,112,104,105,99,115,32,101,100,105,116,111,114,0,0,112,36,111,108,121,108,105,110,101,0,0,0,0,0,0,0,120,50,116,105,36,99,115,0,118,36,101,99,116,111,114,115,0,0,0,0,0,0,0,0,9,84,114,121,32,116,111,32,115,101,116,32,97,115,112,101,99,116,32,114,97,116,105,111,32,116,111,32,37,103,58,49,46,48,10,0,0,0,0,0,80,111,108,121,103,111,110,32,105,115,32,110,111,116,32,99,108,111,115,101,100,32,45,32,97,100,100,105,110,103,32,101,120,116,114,97,32,118,101,114,116,101,120,10,0,0,0,0,118,101,99,116,111,114,115,0,115,101,116,32,115,105,122,101,32,110,111,115,113,117,97,114,101,0,0,0,0,0,0,0,112,111,108,121,108,105,110,101,0,0,0,0,0,0,0,0,99,111,108,111,117,114,0,0,113,117,111,116,101,0,0,0,85,115,97,103,101,58,32,115,101,116,32,116,101,114,109,105,110,97,108,32,109,105,102,32,91,111,112,116,105,111,110,115,93,10,9,111,112,116,105,111,110,115,58,10,9,9,99,111,108,111,117,114,32,47,32,32,32,32,32,32,32,32,68,114,97,119,32,112,114,105,109,105,116,105,118,101,115,32,119,105,116,104,32,108,105,110,101,32,116,121,112,101,115,32,62,61,32,48,32,105,110,32,99,111,108,111,117,114,32,40,115,101,112,46,32,50,45,55,41,10,9,9,109,111,110,111,99,104,114,111,109,101,32,32,32,32,32,32,68,114,97,119,32,112,114,105,109,105,116,105,118,101,115,32,105,110,32,98,108,97,99,107,32,40,115,101,112,46,32,48,41,10,10,9,9,112,111,108,121,108,105,110,101,32,47,32,32,32,32,32,32,68,114,97,119,32,108,105,110,101,115,32,97,115,32,99,111,110,116,105,110,117,111,117,115,32,99,117,114,118,101,115,10,9,9,118,101,99,116,111,114,115,32,32,32,32,32,32,32,32,32,68,114,97,119,32,108,105,110,101,115,32,97,115,32,99,111,108,108,101,99,116,105,111,110,115,32,111,102,32,118,101,99,116,111,114,115,10,10,9,9,104,101,108,112,32,47,32,63,32,32,32,32,32,32,32,32,80,114,105,110,116,32,115,104,111,114,116,32,117,115,97,103,101,32,100,101,115,99,114,105,112,116,105,111,110,32,111,110,32,115,116,100,101,114,114,10,0,0,0,0,0,0,0,78,117,109,98,101,114,32,111,102,32,112,105,120,101,108,115,32,99,97,110,110,111,116,32,98,101,32,102,97,99,116,111,114,101,100,32,105,110,116,111,32,105,110,116,101,103,101,114,115,32,109,97,116,99,104,105,110,103,32,103,114,105,100,46,32,78,32,61,32,37,100,32,32,75,32,61,32,37,100,0,67,101,110,116,101,114,95,50,0,0,0,0,0,0,0,0,60,77,73,70,70,105,108,101,32,51,46,48,48,62,32,35,32,71,101,110,101,114,97,116,101,100,32,98,121,32,103,110,117,112,108,111,116,32,118,101,114,115,105,111,110,32,37,115,32,112,97,116,99,104,108,101,118,101,108,32,37,115,59,32,105,100,101,110,116,105,102,105,101,115,32,116,104,105,115,32,97,115,32,97,32,77,73,70,32,102,105,108,101,10,35,10,35,32,115,104,111,119,32,98,111,114,100,101,114,115,10,60,68,111,99,117,109,101,110,116,10,60,68,66,111,114,100,101,114,115,79,110,32,89,101,115,62,10,62,10,35,32,83,101,116,32,97,32,100,101,102,97,117,108,116,32,112,101,110,32,112,97,116,116,101,114,110,44,32,112,101,110,32,119,105,100,116,104,44,32,117,110,105,116,32,97,110,100,32,102,111,110,116,32,102,111,114,32,115,117,98,115,101,113,117,101,110,116,32,111,98,106,101,99,116,115,10,60,80,101,110,32,48,62,10,60,70,105,108,108,32,49,53,62,10,60,80,101,110,87,105,100,116,104,32,48,46,53,32,112,116,62,10,60,83,101,112,97,114,97,116,105,111,110,32,48,62,10,60,85,110,105,116,115,32,85,99,109,62,10,60,70,111,110,116,67,97,116,97,108,111,103,10,9,60,70,111,110,116,32,60,70,84,97,103,32,96,37,115,39,62,60,70,70,97,109,105,108,121,32,96,84,105,109,101,115,39,62,60,70,83,105,122,101,32,37,100,62,60,70,80,108,97,105,110,32,89,101,115,62,62,10,9,60,70,111,110,116,32,60,70,84,97,103,32,96,37,115,39,62,60,70,70,97,109,105,108,121,32,96,90,97,112,102,68,105,110,103,98,97,116,115,39,62,60,70,83,105,122,101,32,55,46,48,32,112,116,62,60,70,80,108,97,105,110,32,89,101,115,62,62,10,9,60,70,111,110,116,32,60,70,84,97,103,32,96,37,115,39,62,60,70,70,97,109,105,108,121,32,96,83,121,109,98,111,108,39,62,60,70,83,105,122,101,32,53,46,48,32,112,116,62,60,70,80,108,97,105,110,32,89,101,115,62,62,10,62,10,35,10,0,0,0,0,0,0,35,10,35,32,69,110,100,32,111,102,32,77,73,70,70,105,108,101,10,0,0,0,0,0,62,10,35,32,69,110,100,32,111,102,32,70,114,97,109,101,32,110,117,109,98,101,114,32,37,100,10,35,10,0,0,0,37,115,95,37,115,95,37,115,0,0,0,0,0,0,0,0,9,60,71,114,111,117,112,10,9,9,60,73,68,32,37,100,62,10,9,62,10,0,0,0,102,105,103,0,0,0,0,0,9,35,10,9,35,32,71,114,111,117,112,32,116,104,101,32,116,104,101,32,111,98,106,101,99,116,115,32,105,110,32,103,114,111,117,112,115,32,116,111,32,109,97,107,101,32,116,104,101,32,99,104,97,114,116,32,101,97,115,105,101,114,32,116,111,32,109,97,110,105,112,117,108,97,116,101,10,9,35,32,97,102,116,101,114,32,105,116,39,115,32,105,109,112,111,114,116,101,100,32,105,110,116,111,32,70,114,97,109,101,77,97,107,101,114,46,10,0,0,0,110,111,120,116,105,36,99,115,0,0,0,0,0,0,0,0,35,10,35,32,70,114,97,109,101,32,110,117,109,98,101,114,32,37,100,32,119,105,116,104,32,112,108,111,116,32,111,102,32,103,114,97,112,104,105,99,115,10,60,70,114,97,109,101,10,9,60,80,101,110,32,49,53,62,10,9,60,70,105,108,108,32,49,53,62,10,9,60,80,101,110,87,105,100,116,104,32,32,48,46,53,32,112,116,62,10,9,60,83,101,112,97,114,97,116,105,111,110,32,48,62,10,9,60,66,82,101,99,116,32,50,46,48,48,48,32,37,46,51,102,32,37,46,51,102,32,37,46,51,102,62,10,9,60,78,83,79,102,102,115,101,116,32,32,48,46,48,48,48,62,10,9,60,66,76,79,102,102,115,101,116,32,32,48,46,48,48,48,62,10,0,0,9,115,105,122,101,32,105,115,32,115,99,97,108,101,100,32,98,121,32,37,103,44,37,103,10,0,0,0,0,0,0,0,112,111,108,121,103,111,110,32,118,101,114,116,101,120,0,0,77,73,70,32,100,114,105,118,101,114,0,0,0,0,0,0,115,101,116,32,115,105,122,101,32,114,97,116,105,111,32,45,49,0,0,0,0,0,0,0,32,60,80,101,110,32,37,100,62,32,0,0,0,0,0,0,32,60,70,111,110,116,32,60,70,83,101,112,97,114,97,116,105,111,110,32,37,100,62,62,32,0,0,0,0,0,0,0,76,97,115,116,32,112,111,105,110,116,32,105,110,32,116,104,101,32,98,105,110,97,114,121,32,102,105,108,101,32,100,105,100,32,110,111,116,32,109,97,116,99,104,32,116,104,101,32,115,112,101,99,105,102,105,101,100,32,96,117,115,105,110,103,96,32,99,111,108,117,109,110,115,0,0,0,0,0,0,0,32,60,83,101,112,97,114,97,116,105,111,110,32,37,100,62,32,0,0,0,0,0,0,0,32,60,80,101,110,87,105,100,116,104,32,48,46,49,32,112,116,62,32,0,0,0,0,0,32,60,70,111,110,116,32,60,70,83,101,112,97,114,97,116,105,111,110,32,48,62,62,32,0,0,0,0,0,0,0,0,32,60,80,101,110,87,105,100,116,104,32,49,46,48,32,112,116,62,32,0,0,0,0,0,71,80,86,65,76,95,68,65,84,65,0,0,0,0,0,0,120,94,52,0,0,0,0,0,32,60,83,101,112,97,114,97,116,105,111,110,32,48,62,32,0,0,0,0,0,0,0,0,69,110,104,97,110,99,101,100,32,77,101,116,97,102,105,108,101,32,102,111,114,109,97,116,0,0,0,0,0,0,0,0,9,9,60,84,76,79,114,105,103,105,110,32,32,37,46,51,102,32,37,46,51,102,62,32,37,115,32,60,65,110,103,108,101,32,37,100,62,32,60,83,116,114,105,110,103,32,96,37,115,39,62,10,9,62,10,0,120,116,105,36,99,115,0,0,9,60,84,101,120,116,76,105,110,101,32,60,71,114,111,117,112,73,68,32,37,100,62,32,37,115,32,37,115,32,37,115,32,37,115,10,0,0,0,0,9,111,114,105,103,105,110,32,105,115,32,115,101,116,32,116,111,32,37,103,44,37,103,10,0,0,0,0,0,0,0,0,69,120,112,101,99,116,105,110,103,32,97,114,99,32,91,60,98,101,103,105,110,62,58,60,101,110,100,62,93,0,0,0,97,116,32,0,0,0,0,0,32,60,84,76,65,108,105,103,110,109,101,110,116,32,82,105,103,104,116,62,32,0,0,0,96,98,117,105,108,116,105,110,45,116,111,103,103,108,101,45,114,97,116,105,111,96,0,0,32,60,84,76,65,108,105,103,110,109,101,110,116,32,67,101,110,116,101,114,62,32,0,0,45,86,0,0,0,0,0,0,32,60,84,76,65,108,105,103,110,109,101,110,116,32,76,101,102,116,62,32,0,0,0,0,110,111,116,32,101,110,111,117,103,104,32,109,101,109,111,114,121,32,116,111,32,99,114,101,97,116,101,32,118,101,99,116,111,114,0,0,0,0,0,0,9,60,80,111,108,121,76,105,110,101,32,60,71,114,111,117,112,73,68,32,37,100,62,32,37,115,32,37,115,32,37,115,32,60,70,105,108,108,32,49,53,62,10,0,0,0,0,0,9,9,60,70,111,110,116,10,9,9,9,60,70,84,97,103,32,96,37,115,39,62,10,9,9,62,10,0,0,0,0,0,9,62,10,0,0,0,0,0,9,9,60,84,76,79,114,105,103,105,110,32,32,37,46,51,102,32,37,46,51,102,62,32,37,115,32,60,83,116,114,105,110,103,32,96,37,99,39,62,10,0,0,0,0,0,0,0,76,79,71,0,0,0,0,0,9,60,84,101,120,116,76,105,110,101,32,60,71,114,111,117,112,73,68,32,37,100,62,32,37,115,10,0,0,0,0,0,101,109,102,0,0,0,0,0,9,9,60,83,104,97,112,101,82,101,99,116,32,37,46,51,102,32,37,46,51,102,32,37,46,51,102,32,37,46,51,102,62,10,0,0,0,0,0,0,99,98,108,36,97,98,101,108,0,0,0,0,0,0,0,0,9,60,82,101,99,116,97,110,103,108,101,32,60,71,114,111,117,112,73,68,32,37,100,62,32,37,115,10,0,0,0,0,9,116,101,114,109,105,110,97,108,32,116,121,112,101,32,105,115,32,117,110,107,110,111,119,110,10,0,0,0,0,0,0,58,0,0,0,0,0,0,0,114,109,97,114,103,105,110,0,10,9,62,10,0,0,0,0,110,101,120,116,32,122,111,111,109,46,10,0,0,0,0,0,60,80,111,105,110,116,32,32,37,46,51,102,32,37,46,51,102,62,32,0,0,0,0,0,9,9,60,78,117,109,80,111,105,110,116,115,32,37,100,62,32,0,0,0,0,0,0,0,103,112,98,105,110,97,114,121,32,109,97,116,114,105,120,32,114,111,119,0,0,0,0,0,9,9,60,70,105,108,108,32,37,100,62,10,0,0,0,0,9,60,80,111,108,121,103,111,110,32,60,71,114,111,117,112,73,68,32,37,100,62,10,0,110,111,98,97,99,107,103,36,114,111,117,110,100,0,0,0,110,111,97,100,111,98,101,36,103,108,121,112,104,110,97,109,101,115,0,0,0,0,0,0,77,65,88,0,0,0,0,0,97,100,111,98,101,36,103,108,121,112,104,110,97,109,101,115,0,0,0,0,0,0,0,0,100,120,102,45,102,105,108,101,32,102,111,114,32,65,117,116,111,67,97,100,32,40,100,101,102,97,117,108,116,32,115,105,122,101,32,49,50,48,120,56,48,41,0,0,0,0,0,0,110,101,119,36,115,116,121,108,101,0,0,0,0,0,0,0,122,108,36,97,98,101,108,0,111,108,100,36,115,116,121,108,101,0,0,0,0,0,0,0,32,32,32,116,101,114,109,105,110,97,108,32,116,121,112,101,32,105,115,32,37,115,32,37,115,10,0,0,0,0,0,0,65,110,103,108,101,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,0,0,108,109,97,114,103,105,110,0,110,111,97,36,117,120,102,105,108,101,0,0,0,0,0,0,96,98,117,105,108,116,105,110,45,122,111,111,109,45,110,101,120,116,96,32,103,111,32,116,111,32,110,101,120,116,32,122,111,111,109,32,105,110,32,116,104,101,32,122,111,111,109,32,115,116,97,99,107,0,0,0,97,36,117,120,102,105,108,101,0,0,0,0,0,0,0,0,110,36,111,114,111,116,97,116,101,0,0,0,0,0,0,0,66,105,110,97,114,121,32,100,97,116,97,32,116,121,112,101,32,117,110,107,110,111,119,110,0,0,0,0,0,0,0,0,112,97,108,102,36,117,110,99,112,97,114,97,109,0,0,0,110,111,102,111,110,116,102,36,105,108,101,115,0,0,0,0,9,102,111,110,116,112,97,116,104,32,105,115,32,0,0,0,102,111,110,116,102,36,105,108,101,0,0,0,0,0,0,0,32,107,77,71,84,80,69,90,89,0,0,0,0,0,0,0,114,111,117,36,110,100,101,100,0,0,0,0,0,0,0,0,10,9,100,117,109,109,121,32,118,97,114,105,97,98,108,101,32,105,115,32,120,32,102,111,114,32,99,117,114,118,101,115,44,32,120,47,121,32,102,111,114,32,115,117,114,102,97,99,101,115,10,0,0,0,0,0,46,37,48,42,100,0,0,0,77,73,78,0,0,0,0,0,100,101,102,97,117,108,116,112,36,108,101,120,0,0,0,0,100,120,102,0,0,0,0,0,100,117,36,112,108,101,120,0,121,50,108,36,97,98,101,108,0,0,0,0,0,0,0,0,115,105,36,109,112,108,101,120,0,0,0,0,0,0,0,0]) -.concat([97,114,99,0,0,0,0,0,98,109,97,114,103,105,110,0,99,111,108,111,117,114,116,36,101,120,116,0,0,0,0,0,112,114,101,118,105,111,117,115,32,122,111,111,109,46,10,0,99,111,108,111,114,116,36,101,120,116,0,0,0,0,0,0,98,36,108,97,99,107,116,101,120,116,0,0,0,0,0,0,67,111,117,108,100,110,39,116,32,115,108,117,114,112,32,37,108,100,32,98,121,116,101,115,32,40,114,101,116,117,114,110,32,119,97,115,32,37,122,100,41,10,0,0,0,0,0,0,100,101,102,36,97,117,108,116,0,0,0,0,0,0,0,0,109,36,111,110,111,99,104,114,111,109,101,0,0,0,0,0,116,104,105,115,0,0,0,0,120,111,114,0,0,0,0,0,101,112,36,115,102,0,0,0,32,102,111,110,116,115,99,97,108,101,32,37,51,46,49,102,32,0,0,0,0,0,0,0,37,103,32,0,0,0,0,0,71,80,86,65,76,0,0,0,34,37,115,34,32,37,103,32,0,0,0,0,0,0,0,0,97,115,99,105,105,32,97,114,116,32,102,111,114,32,97,110,121,116,104,105,110,103,32,116,104,97,116,32,112,114,105,110,116,115,32,116,101,120,116,0,34,37,115,34,32,37,103,37,115,32,0,0,0,0,0,0,121,108,36,97,98,101,108,0,100,102,95,114,101,97,100,98,105,110,97,114,121,32,115,108,117,114,112,101,114,0,0,0,112,97,36,117,115,101,0,0,32,37,115,97,100,111,98,101,103,108,121,112,104,110,97,109,101,115,32,92,10,32,32,32,0,0,0,0,0,0,0,0,114,97,100,105,117,115,0,0,111,117,116,36,112,117,116,0,116,109,97,114,103,105,110,0,110,111,104,101,97,100,101,114,32,0,0,0,0,0,0,0,96,98,117,105,108,116,105,110,45,122,111,111,109,45,112,114,101,118,105,111,117,115,96,32,103,111,32,116,111,32,112,114,101,118,105,111,117,115,32,122,111,111,109,32,105,110,32,116,104,101,32,122,111,111,109,32,115,116,97,99,107,0,0,0,104,101,97,100,101,114,32,34,37,115,34,32,0,0,0,0,110,111,97,117,120,102,105,108,101,0,0,0,0,0,0,0,97,117,120,102,105,108,101,0,37,115,32,37,115,32,0,0,32,32,32,112,97,108,102,117,110,99,112,97,114,97,109,32,37,100,44,37,103,32,92,10,32,32,32,0,0,0,0,0,45,66,65,67,75,87,65,82,68,83,95,67,79,77,80,65,84,73,66,73,76,73,84,89,32,32,0,0,0,0,0,0,32,32,32,110,111,98,97,99,107,103,114,111,117,110,100,32,92,10,0,0,0,0,0,0,71,80,86,65,76,95,84,69,82,77,95,89,83,73,90,69,0,0,0,0,0,0,0,0,32,32,32,98,97,99,107,103,114,111,117,110,100,32,34,35,37,48,50,120,37,48,50,120,37,48,50,120,34,32,92,10,0,0,0,0,0,0,0,0,100,117,109,98,0,0,0,0,110,111,99,108,105,112,0,0,120,50,108,36,97,98,101,108,0,0,0,0,0,0,0,0,99,108,105,112,0,0,0,0,116,105,99,115,32,97,114,101,32,105,110,32,37,115,32,111,102,32,112,108,111,116,10,0,99,101,110,36,116,101,114,0,111,117,116,115,105,100,101,0,99,111,108,111,114,116,101,120,116,0,0,0,0,0,0,0,98,108,97,99,107,116,101,120,116,0,0,0,0,0,0,0,108,101,118,101,108,100,101,102,97,117,108,116,0,0,0,0,83,99,97,110,32,115,105,122,101,32,111,102,32,109,97,116,114,105,120,32,105,115,32,122,101,114,111,0,0,0,0,0,115,101,116,32,97,117,116,111,115,99,97,108,101,32,37,115,102,105,120,109,105,110,10,0,108,101,118,101,108,49,0,0,84,104,105,115,32,112,108,111,116,32,115,116,121,108,101,32,105,115,32,111,110,108,121,32,102,111,114,32,100,97,116,97,102,105,108,101,115,32,44,32,114,101,118,101,114,116,105,110,103,32,116,111,32,34,112,111,105,110,116,115,34,0,0,0,32,32,32,37,115,32,37,115,32,37,115,32,92,10,32,32,32,37,115,32,100,97,115,104,108,101,110,103,116,104,32,37,46,49,102,32,108,105,110,101,119,105,100,116,104,32,37,46,49,102,32,37,115,32,37,115,32,92,10,0,0,0,0,0,32,97,117,120,102,105,108,101,0,0,0,0,0,0,0,0,115,121,110,116,97,120,58,32,32,103,110,117,112,108,111,116,32,45,101,32,34,99,111,109,109,97,110,100,115,34,10,0,110,111,114,111,116,97,116,101,0,0,0,0,0,0,0,0,71,80,86,65,76,95,84,69,82,77,95,88,83,73,90,69,0,0,0,0,0,0,0,0,114,111,116,97,116,101,0,0,114,101,102,114,101,115,104,32,110,111,116,32,112,111,115,115,105,98,108,101,32,97,110,100,32,114,101,112,108,111,116,32,105,115,32,100,105,115,97,98,108,101,100,0,0,0,0,0,69,80,83,32,102,111,114,109,97,116,32,102,111,114,32,67,111,114,101,108,68,82,65,87,0,0,0,0,0,0,0,0,100,101,102,97,117,108,116,112,108,101,120,0,0,0,0,0,120,108,36,97,98,101,108,0,67,108,101,97,114,0,0,0,115,105,109,112,108,101,120,0,9,120,121,112,108,97,110,101,32,116,105,99,115,108,101,118,101,108,32,105,115,32,37,103,10,0,0,0,0,0,0,0,69,120,112,101,99,116,105,110,103,32,116,111,32,111,114,32,114,116,111,0,0,0,0,0,105,110,115,105,100,101,0,0,100,117,112,108,101,120,0,0,108,111,97,100,47,101,118,97,108,32,110,101,115,116,101,100,32,116,111,111,32,100,101,101,112,108,121,0,0,0,0,0,59,32,115,101,116,32,120,50,114,91,37,32,35,103,58,37,32,35,103,93,59,32,115,101,116,32,121,50,114,91,37,32,35,103,58,37,32,35,103,93,0,0,0,0,0,0,0,0,110,111,101,110,104,97,110,99,101,100,0,0,0,0,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,32,58,32,110,111,110,45,83,84,82,73,78,71,32,97,114,103,117,109,101,110,116,32,116,111,32,115,116,114,115,116,114,116,0,37,115,32,37,115,32,37,115,32,92,10,0,0,0,0,0,100,102,95,110,111,95,98,105,110,95,99,111,108,115,0,0,32,102,111,110,116,102,105,108,101,32,34,37,115,34,0,0,112,115,95,102,111,110,116,102,105,108,101,95,99,104,97,114,0,0,0,0,0,0,0,0,37,115,44,37,103,0,0,0,111,102,32,102,111,110,116,32,110,97,109,101,0,0,0,0,71,80,86,65,76,95,84,69,82,77,95,89,77,65,88,0,116,101,114,109,105,110,97,108,32,37,115,32,100,111,101,115,32,110,111,116,32,97,108,108,111,119,32,115,112,101,99,105,102,105,99,97,116,105,111,110,32,37,115,0,0,0,0,0,99,111,114,101,108,0,0,0,73,32,119,105,108,108,32,116,114,121,32,116,111,32,102,105,120,32,105,116,32,98,117,116,32,116,104,105,115,32,109,97,121,32,110,111,116,32,119,111,114,107,46,0,0,0,0,0,99,98,100,97,36,116,97,0,73,108,108,101,103,97,108,32,99,104,97,114,97,99,116,101,114,115,32,105,110,32,80,111,115,116,83,99,114,105,112,116,32,102,111,110,116,32,110,97,109,101,46,0,0,0,0,0,9,120,121,112,108,97,110,101,32,105,110,116,101,114,99,101,112,116,115,32,122,32,97,120,105,115,32,97,116,32,37,103,10,0,0,0,0,0,0,0,114,101,108,97,116,105,118,101,32,99,111,111,114,100,105,110,97,116,101,115,32,109,117,115,116,32,109,97,116,99,104,32,105,110,32,116,121,112,101,0,115,101,116,32,107,101,121,32,0,0,0,0,0,0,0,0,40,41,91,93,123,125,124,32,0,0,0,0,0,0,0,0,115,101,116,32,120,114,91,37,46,49,50,103,58,37,46,49,50,103,93,59,32,115,101,116,32,121,114,91,37,46,49,50,103,58,37,46,49,50,103,93,0,0,0,0,0,0,0,0,97,108,108,111,119,101,100,32,100,101,118,105,97,116,105,111,110,32,109,117,115,116,32,98,101,32,60,32,49,0,0,0,67,97,110,39,116,32,100,101,108,101,116,101,32,70,111,110,116,32,102,105,108,101,110,97,109,101,32,39,37,115,39,0,100,102,95,109,97,120,95,98,105,110,105,110,102,111,95,99,111,108,115,32,62,32,100,102,95,110,111,95,98,105,110,95,99,111,108,115,0,0,0,0,37,32,103,0,0,0,0,0,110,101,119,95,112,115,95,102,111,110,116,102,105,108,101,45,62,102,111,110,116,102,105,108,101,95,110,97,109,101,0,0,110,101,119,95,112,115,95,102,111,110,116,102,105,108,101,0,115,101,116,32,104,105,100,100,101,110,51,100,32,37,115,32,111,102,102,115,101,116,32,37,100,32,116,114,105,97,110,103,108,101,112,97,116,116,101,114,110,32,37,108,100,32,117,110,100,101,102,105,110,101,100,32,37,100,32,37,115,97,108,116,100,105,97,103,111,110,97,108,32,37,115,98,101,110,116,111,118,101,114,10,0,0,0,0,100,101,108,36,101,116,101,0,97,100,100,0,0,0,0,0,71,80,86,65,76,95,84,69,82,77,95,89,77,73,78,0,67,97,110,110,111,116,32,117,115,101,32,97,117,120,32,102,105,108,101,32,111,110,32,115,116,100,111,117,116,46,32,83,119,105,116,99,104,105,110,103,32,111,102,102,32,97,117,120,102,105,108,101,32,111,112,116,105,111,110,46,10,0,0,0,67,111,109,112,117,116,101,114,32,71,114,97,112,104,105,99,115,32,77,101,116,97,102,105,108,101,0,0,0,0,0,0,84,117,114,110,105,110,103,32,111,102,102,32,97,117,120,102,105,108,101,32,111,112,116,105,111,110,10,0,0,0,0,0,122,100,97,36,116,97,0,0,67,97,110,110,111,116,32,109,97,107,101,32,80,111,115,116,83,99,114,105,112,116,32,102,105,108,101,32,110,97,109,101,32,102,114,111,109,32,37,115,10,0,0,0,0,0,0,0,85,110,107,110,111,119,110,32,109,105,110,105,116,105,99,32,116,121,112,101,32,105,110,32,115,104,111,119,95,109,116,105,99,115,40,41,0,0,0,0,114,116,111,0,0,0,0,0,67,97,110,110,111,116,32,111,112,101,110,32,97,117,120,32,102,105,108,101,32,37,115,32,102,111,114,32,111,117,116,112,117,116,46,32,83,119,105,116,99,104,105,110,103,32,111,102,102,32,97,117,120,102,105,108,101,32,111,112,116,105,111,110,46,10,0,0,0,0,0,0,117,110,122,111,111,109,46,10,0,0,0,0,0,0,0,0,112,115,108,97,116,101,120,32,97,117,120,32,102,105,108,101,110,97,109,101,0,0,0,0,109,97,120,32,60,61,32,77,65,88,68,65,84,65,67,79,76,83,0,0,0,0,0,0,73,109,97,103,101,32,103,114,105,100,32,109,117,115,116,32,98,101,32,97,116,32,108,101,97,115,116,32,50,32,120,32,50,46,10,10,0,0,0,0,101,112,115,108,97,116,101,120,32,84,101,88,32,102,105,108,101,110,97,109,101,0,0,0,111,112,101,110,32,111,102,32,112,111,115,116,115,99,105,112,116,32,111,117,116,112,117,116,32,102,105,108,101,32,37,115,32,102,97,105,108,101,100,0,67,101,110,116,101,114,95,49,0,0,0,0,0,0,0,0,46,37,115,0,0,0,0,0,45,105,110,99,46,37,115,0,71,80,86,65,76,95,84,69,82,77,95,88,77,65,88,0,45,45,45,32,114,101,111,112,101,110,32,102,97,105,108,101,100,0,0,0,0,0,0,0,99,103,109,0,0,0,0,0,82,101,115,101,116,116,105,110,103,32,112,114,105,109,97,114,121,32,111,117,116,112,117,116,32,102,105,108,101,32,116,111,32,37,115,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,80,111,115,116,83,99,114,105,112,116,32,111,117,116,112,117,116,32,116,111,32,37,115,0,0,121,50,100,97,36,116,97,0,9,109,105,110,111,114,32,37,115,116,105,99,115,32,97,114,101,32,100,114,97,119,110,32,119,105,116,104,32,37,100,32,115,117,98,105,110,116,101,114,118,97,108,115,32,98,101,116,119,101,101,110,32,109,97,106,111,114,32,120,116,105,99,32,109,97,114,107,115,10,0,0,116,111,0,0,0,0,0,0,115,101,116,32,107,101,121,32,116,105,116,108,101,32,34,37,115,34,0,0,0,0,0,0,103,105,118,101,32,116,104,101,32,116,101,120,32,102,105,108,101,110,97,109,101,32,97,115,32,111,117,116,112,117,116,0,96,98,117,105,108,116,105,110,45,117,110,122,111,111,109,96,0,0,0,0,0,0,0,0,70,111,114,32,101,112,115,108,97,116,101,120,32,115,116,97,110,100,97,108,111,110,101,32,109,111,100,101,44,32,121,111,117,32,104,97,118,101,32,116,111,32,37,115,0,0,0,0,46,69,80,83,0,0,0,0,100,97,116,97,95,102,112,32,33,61,32,78,85,76,76,0,46,101,112,115,0,0,0,0,101,112,115,108,97,116,101,120,32,101,112,115,32,102,105,108,101,110,97,109,101,0,0,0,101,112,115,108,97,116,101,120,32,111,117,116,112,117,116,32,102,105,108,101,32,110,97,109,101,32,109,117,115,116,32,98,101,32,111,102,32,116,104,101,32,102,111,114,109,32,102,105,108,101,110,97,109,101,46,120,120,120,0,0,0,0,0,0,92,112,117,116,40,48,44,48,41,123,92,99,111,108,111,114,98,111,120,123,103,112,66,97,99,107,103,114,111,117,110,100,125,123,92,109,97,107,101,98,111,120,40,37,46,50,102,44,37,46,50,102,41,91,93,123,125,125,125,37,37,10,0,0,71,80,86,65,76,95,84,69,82,77,95,88,77,73,78,0,100,117,112,32,109,117,108,32,100,117,112,32,109,117,108,0,92,100,101,102,105,110,101,99,111,108,111,114,123,103,112,66,97,99,107,103,114,111,117,110,100,125,123,114,103,98,125,123,37,46,51,102,44,32,37,46,51,102,44,32,37,46,51,102,125,37,37,10,0,0,0,0,72,84,77,76,32,67,97,110,118,97,115,32,111,98,106,101,99,116,0,0,0,0,0,0,32,32,92,115,101,116,108,101,110,103,116,104,123,92,117,110,105,116,108,101,110,103,116,104,125,123,37,46,52,102,98,112,125,37,37,10,32,32,92,98,101,103,105,110,123,112,105,99,116,117,114,101,125,40,37,46,50,102,44,37,46,50,102,41,37,37,10,0,0,0,0,0,121,100,97,36,116,97,0,0,32,32,32,32,92,101,108,115,101,10,32,32,32,32,32,32,37,32,103,114,97,121,10,32,32,32,32,32,32,92,100,101,102,92,99,111,108,111,114,114,103,98,35,49,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,100,101,102,92,99,111,108,111,114,103,114,97,121,35,49,123,92,99,111,108,111,114,91,103,114,97,121,93,123,35,49,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,119,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,119,104,105,116,101,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,98,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,97,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,48,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,49,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,50,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,51,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,52,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,53,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,54,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,55,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,56,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,92,102,105,10,32,32,92,102,105,10,0,0,0,9,109,105,110,111,114,32,37,115,116,105,99,115,32,97,114,101,32,99,111,109,112,117,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,10,0,0,0,0,0,0,0,102,114,111,109,0,0,0,0,37,115,115,101,116,32,114,97,120,105,115,10,0,0,0,0,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,48,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,49,44,48,44,48,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,49,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,48,44,49,44,48,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,50,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,48,44,48,44,49,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,51,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,49,44,48,44,49,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,52,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,48,44,49,44,49,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,53,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,49,44,49,44,48,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,54,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,48,44,48,44,48,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,55,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,49,44,48,46,51,44,48,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,56,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,48,46,53,44,48,46,53,44,48,46,53,125,125,37,10,0,0,0,0,0,0,0,96,98,117,105,108,116,105,110,45,114,111,116,97,116,101,45,114,105,103,104,116,96,32,111,110,108,121,32,102,111,114,32,115,112,108,111,116,115,59,32,60,115,104,105,102,116,62,32,105,110,99,114,101,97,115,101,115,32,97,109,111,117,110,116,0,0,0,0,0,0,0,0,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,48,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,49,44,48,44,48,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,49,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,48,44,48,44,49,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,50,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,48,44,49,44,49,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,51,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,91,114,103,98,93,123,49,44,48,44,49,125,125,37,10,0,0,0,0,32,32,92,105,102,71,80,98,108,97,99,107,116,101,120,116,10,32,32,32,32,37,32,110,111,32,116,101,120,116,99,111,108,111,114,32,97,116,32,97,108,108,10,32,32,32,32,92,100,101,102,92,99,111,108,111,114,114,103,98,35,49,123,125,37,10,32,32,32,32,92,100,101,102,92,99,111,108,111,114,103,114,97,121,35,49,123,125,37,10,32,32,92,101,108,115,101,10,32,32,32,32,37,32,103,114,97,121,32,111,114,32,99,111,108,111,114,63,10,32,32,32,32,92,105,102,71,80,99,111,108,111,114,10,32,32,32,32,32,32,92,100,101,102,92,99,111,108,111,114,114,103,98,35,49,123,92,99,111,108,111,114,91,114,103,98,93,123,35,49,125,125,37,10,32,32,32,32,32,32,92,100,101,102,92,99,111,108,111,114,103,114,97,121,35,49,123,92,99,111,108,111,114,91,103,114,97,121,93,123,35,49,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,119,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,119,104,105,116,101,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,98,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,32,32,32,32,32,32,92,101,120,112,97,110,100,97,102,116,101,114,92,100,101,102,92,99,115,110,97,109,101,32,76,84,97,92,101,110,100,99,115,110,97,109,101,123,92,99,111,108,111,114,123,98,108,97,99,107,125,125,37,10,0,0,0,0,9,32,32,37,115,0,0,0,32,32,92,109,97,107,101,97,116,108,101,116,116,101,114,10,32,32,92,112,114,111,118,105,100,101,99,111,109,109,97,110,100,92,99,111,108,111,114,91,50,93,91,93,123,37,37,10,32,32,32,32,92,71,101,110,101,114,105,99,69,114,114,111,114,123,40,103,110,117,112,108,111,116,41,32,92,115,112,97,99,101,92,115,112,97,99,101,92,115,112,97,99,101,92,64,115,112,97,99,101,115,125,123,37,37,10,32,32,32,32,32,32,80,97,99,107,97,103,101,32,99,111,108,111,114,32,110,111,116,32,108,111,97,100,101,100,32,105,110,32,99,111,110,106,117,110,99,116,105,111,110,32,119,105,116,104,10,32,32,32,32,32,32,116,101,114,109,105,110,97,108,32,111,112,116,105,111,110,32,96,99,111,108,111,117,114,116,101,120,116,39,37,37,10,32,32,32,32,125,123,83,101,101,32,116,104,101,32,103,110,117,112,108,111,116,32,100,111,99,117,109,101,110,116,97,116,105,111,110,32,102,111,114,32,101,120,112,108,97,110,97,116,105,111,110,46,37,37,10,32,32,32,32,125,123,69,105,116,104,101,114,32,117,115,101,32,39,98,108,97,99,107,116,101,120,116,39,32,105,110,32,103,110,117,112,108,111,116,32,111,114,32,108,111,97,100,32,116,104,101,32,112,97,99,107,97,103,101,10,32,32,32,32,32,32,99,111,108,111,114,46,115,116,121,32,105,110,32,76,97,84,101,88,46,125,37,37,10,32,32,32,32,92,114,101,110,101,119,99,111,109,109,97,110,100,92,99,111,108,111,114,91,50,93,91,93,123,125,37,37,10,32,32,125,37,37,10,32,32,92,112,114,111,118,105,100,101,99,111,109,109,97,110,100,92,105,110,99,108,117,100,101,103,114,97,112,104,105,99,115,91,50,93,91,93,123,37,37,10,32,32,32,32,92,71,101,110,101,114,105,99,69,114,114,111,114,123,40,103,110,117,112,108,111,116,41,32,92,115,112,97,99,101,92,115,112,97,99,101,92,115,112,97,99,101,92,64,115,112,97,99,101,115,125,123,37,37,10,32,32,32,32,32,32,80,97,99,107,97,103,101,32,103,114,97,112,104,105,99,120,32,111,114,32,103,114,97,112,104,105,99,115,32,110,111,116,32,108,111,97,100,101,100,37,37,10,32,32,32,32,125,123,83,101,101,32,116,104,101,32,103,110,117,112,108,111,116,32,100,111,99,117,109,101,110,116,97,116,105,111,110,32,102,111,114,32,101,120,112,108,97,110,97,116,105,111,110,46,37,37,10,32,32,32,32,125,123,84,104,101,32,103,110,117,112,108,111,116,32,101,112,115,108,97,116,101,120,32,116,101,114,109,105,110,97,108,32,110,101,101,100,115,32,103,114,97,112,104,105,99,120,46,115,116,121,32,111,114,32,103,114,97,112,104,105,99,115,46,115,116,121,46,125,37,37,10,32,32,32,32,92,114,101,110,101,119,99,111,109,109,97,110,100,92,105,110,99,108,117,100,101,103,114,97,112,104,105,99,115,91,50,93,91,93,123,125,37,37,10,32,32,125,37,37,10,32,32,92,112,114,111,118,105,100,101,99,111,109,109,97,110,100,92,114,111,116,97,116,101,98,111,120,91,50,93,123,35,50,125,37,37,10,32,32,92,64,105,102,117,110,100,101,102,105,110,101,100,123,105,102,71,80,99,111,108,111,114,125,123,37,37,10,32,32,32,32,92,110,101,119,105,102,92,105,102,71,80,99,111,108,111,114,10,32,32,32,32,92,71,80,99,111,108,111,114,37,115,10,32,32,125,123,125,37,37,10,32,32,92,64,105,102,117,110,100,101,102,105,110,101,100,123,105,102,71,80,98,108,97,99,107,116,101,120,116,125,123,37,37,10,32,32,32,32,92,110,101,119,105,102,92,105,102,71,80,98,108,97,99,107,116,101,120,116,10,32,32,32,32,92,71,80,98,108,97,99,107,116,101,120,116,37,115,10,32,32,125,123,125,37,37,10,32,32,37,37,32,100,101,102,105,110,101,32,97,32,92,103,64,97,100,100,116,111,64,109,97,99,114,111,32,119,105,116,104,111,117,116,32,64,32,105,110,32,116,104,101,32,110,97,109,101,58,10,32,32,92,108,101,116,92,103,112,108,103,97,100,100,116,111,109,97,99,114,111,92,103,64,97,100,100,116,111,64,109,97,99,114,111,10,32,32,37,37,32,100,101,102,105,110,101,32,101,109,112,116,121,32,116,101,109,112,108,97,116,101,115,32,102,111,114,32,97,108,108,32,99,111,109,109,97,110,100,115,32,116,97,107,105,110,103,32,116,101,120,116,58,10,32,32,92,103,100,101,102,92,103,112,108,98,97,99,107,116,101,120,116,123,125,37,37,10,32,32,92,103,100,101,102,92,103,112,108,102,114,111,110,116,116,101,120,116,123,125,37,37,10,32,32,92,109,97,107,101,97,116,111,116,104,101,114,10,0,0,0,0,0,0,0,32,32,92,115,101,108,101,99,116,102,111,110,116,10,0,0,32,32,92,102,111,110,116,115,104,97,112,101,123,37,115,125,37,37,10,0,0,0,0,0,32,32,92,102,111,110,116,115,101,114,105,101,115,123,37,115,125,37,37,10,0,0,0,0,71,80,86,65,76,95,84,69,82,77,95,87,73,78,68,79,87,73,68,0,0,0,0,0,32,32,92,102,111,110,116,102,97,109,105,108,121,123,37,115,125,37,37,10,0,0,0,0,99,97,110,118,97,115,0,0,32,32,37,37,32,69,110,99,111,100,105,110,103,32,105,110,115,105,100,101,32,116,104,101,32,112,108,111,116,46,32,32,73,110,32,116,104,101,32,104,101,97,100,101,114,32,111,102,32,121,111,117,114,32,100,111,99,117,109,101,110,116,44,32,116,104,105,115,32,101,110,99,111,100,105,110,103,10,32,32,37,37,32,115,104,111,117,108,100,32,116,111,32,100,101,102,105,110,101,100,44,32,101,46,103,46,44,32,98,121,32,117,115,105,110,103,10,32,32,37,37,32,92,117,115,101,112,97,99,107,97,103,101,91,37,115,44,60,111,116,104,101,114,32,101,110,99,111,100,105,110,103,115,62,93,123,105,110,112,117,116,101,110,99,125,10,32,32,92,105,110,112,117,116,101,110,99,111,100,105,110,103,123,37,115,125,37,37,10,0,0,0,120,50,100,97,36,116,97,0,92,98,101,103,105,110,103,114,111,117,112,10,0,0,0,0,9,109,105,110,111,114,32,37,115,116,105,99,115,32,97,114,101,32,111,102,102,32,102,111,114,32,108,105,110,101,97,114,32,115,99,97,108,101,115,10,9,109,105,110,111,114,32,37,115,116,105,99,115,32,97,114,101,32,99,111,109,112,117,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,32,102,111,114,32,108,111,103,32,115,99,97,108,101,115,10,0,0,0,0,0,0,0,0,85,110,107,110,111,119,110,32,111,98,106,101,99,116,32,116,121,112,101,0,0,0,0,0,37,0,0,0,0,0,0,0,96,98,117,105,108,116,105,110,45,114,111,116,97,116,101,45,117,112,96,32,111,110,108,121,32,102,111,114,32,115,112,108,111,116,115,59,32,60,115,104,105,102,116,62,32,105,110,99,114,101,97,115,101,115,32,97,109,111,117,110,116,0,0,0,92,109,97,107,101,97,116,108,101,116,116,101,114,10,37,37,32,83,101,108,101,99,116,32,97,110,32,97,112,112,114,111,112,114,105,97,116,101,32,100,101,102,97,117,108,116,32,100,114,105,118,101,114,32,40,102,114,111,109,32,84,101,88,76,105,118,101,32,103,114,97,112,104,105,99,115,46,99,102,103,41,10,92,98,101,103,105,110,103,114,111,117,112,10,32,32,92,99,104,97,114,100,101,102,92,120,61,48,32,37,37,10,32,32,37,37,32,99,104,101,99,107,32,112,100,102,84,101,88,10,32,32,92,64,105,102,117,110,100,101,102,105,110,101,100,123,112,100,102,111,117,116,112,117,116,125,123,125,123,37,37,10,32,32,32,32,92,105,102,99,97,115,101,92,112,100,102,111,117,116,112,117,116,10,32,32,32,32,92,101,108,115,101,10,32,32,32,32,32,32,92,99,104,97,114,100,101,102,92,120,61,49,32,37,37,10,32,32,32,32,92,102,105,10,32,32,125,37,37,10,32,32,37,37,32,99,104,101,99,107,32,86,84,101,88,10,32,32,92,64,105,102,117,110,100,101,102,105,110,101,100,123,79,112,77,111,100,101,125,123,125,123,37,37,10,32,32,32,32,92,99,104,97,114,100,101,102,92,120,61,50,32,37,37,10,32,32,125,37,37,10,92,101,120,112,97,110,100,97,102,116,101,114,92,101,110,100,103,114,111,117,112,10,92,105,102,99,97,115,101,92,120,10,32,32,37,37,32,100,101,102,97,117,108,116,32,99,97,115,101,10,32,32,92,80,97,115,115,79,112,116,105,111,110,115,84,111,80,97,99,107,97,103,101,123,100,118,105,112,115,125,123,103,101,111,109,101,116,114,121,125,10,92,111,114,10,32,32,37,37,32,112,100,102,84,101,88,32,105,115,32,114,117,110,110,105,110,103,32,105,110,32,112,100,102,32,109,111,100,101,10,32,32,92,80,97,115,115,79,112,116,105,111,110,115,84,111,80,97,99,107,97,103,101,123,112,100,102,116,101,120,125,123,103,101,111,109,101,116,114,121,125,10,92,101,108,115,101,10,32,32,37,37,32,86,84,101,88,32,105,115,32,114,117,110,110,105,110,103,10,32,32,92,80,97,115,115,79,112,116,105,111,110,115,84,111,80,97,99,107,97,103,101,123,118,116,101,120,125,123,103,101,111,109,101,116,114,121,125,10,92,102,105,10,92,109,97,107,101,97,116,111,116,104,101,114,10,37,37,32,83,101,116,32,112,97,112,101,114,115,105,122,101,10,92,117,115,101,112,97,99,107,97,103,101,91,112,97,112,101,114,115,105,122,101,61,123,37,46,50,102,98,112,44,37,46,50,102,98,112,125,44,116,101,120,116,61,123,37,46,50,102,98,112,44,37,46,50,102,98,112,125,93,123,103,101,111,109,101,116,114,121,125,10,37,37,32,78,111,32,112,97,103,101,32,110,117,109,98,101,114,115,32,97,110,100,32,110,111,32,112,97,114,97,103,114,97,112,104,32,105,110,100,101,110,116,97,116,105,111,110,10,92,112,97,103,101,115,116,121,108,101,123,101,109,112,116,121,125,10,92,115,101,116,108,101,110,103,116,104,123,92,112,97,114,105,110,100,101,110,116,125,123,48,98,112,125,37,37,10,37,37,32,76,111,97,100,32,99,111,110,102,105,103,117,114,97,116,105,111,110,32,102,105,108,101,10,92,73,110,112,117,116,73,102,70,105,108,101,69,120,105,115,116,115,123,103,110,117,112,108,111,116,46,99,102,103,125,123,37,37,10,32,32,92,116,121,112,101,111,117,116,123,85,115,105,110,103,32,99,111,110,102,105,103,117,114,97,116,105,111,110,32,102,105,108,101,32,103,110,117,112,108,111,116,46,99,102,103,125,37,37,10,125,123,37,37,10,32,92,116,121,112,101,111,117,116,123,78,111,32,99,111,110,102,105,103,117,114,97,116,105,111,110,32,102,105,108,101,32,103,110,117,112,108,111,116,46,99,102,103,32,102,111,117,110,100,46,125,37,37,10,125,37,37,10,37,115,10,92,98,101,103,105,110,123,100,111,99,117,109,101,110,116,125,10,0,0,0,0,0,0,0,0,92,117,115,101,112,97,99,107,97,103,101,91,37,115,93,123,105,110,112,117,116,101,110,99,125,10,0,0,0,0,0,0,9,84,104,105,115,32,118,101,114,115,105,111,110,32,111,102,32,103,110,117,112,108,111,116,32,117,110,100,101,114,115,116,97,110,100,115,32,116,104,101,32,102,111,108,108,111,119,105,110,103,32,98,105,110,97,114,121,32,102,105,108,101,32,116,121,112,101,115,58,10,0,0,37,32,76,111,97,100,32,112,97,99,107,97,103,101,115,10,92,117,115,101,112,97,99,107,97,103,101,123,103,114,97,112,104,105,99,120,125,10,92,117,115,101,112,97,99,107,97,103,101,123,99,111,108,111,114,125,10,0,0,0,0,0,0,0,111,110,108,121,32,54,32,114,97,110,103,101,32,115,112,101,99,115,32,97,114,101,32,112,101,114,109,105,116,116,101,100,0,0,0,0,0,0,0,0,92,114,101,110,101,119,99,111,109,109,97,110,100,42,92,117,112,100,101,102,97,117,108,116,123,37,115,125,37,37,10,0,92,114,101,110,101,119,99,111,109,109,97,110,100,42,92,109,100,100,101,102,97,117,108,116,123,37,115,125,37,37,10,0,92,114,101,110,101,119,99,111,109,109,97,110,100,42,92,114,109,100,101,102,97,117,108,116,123,37,115,125,37,37,10,0,71,80,86,65,76,95,80,87,68,0,0,0,0,0,0,0,92,100,111,99,117,109,101,110,116,99,108,97,115,115,123,109,105,110,105,109,97,108,125,10,37,37,32,83,101,116,32,102,111,110,116,32,115,105,122,101,10,92,109,97,107,101,97,116,108,101,116,116,101,114,10,92,100,101,102,92,64,112,116,115,105,122,101,123,37,100,125,10,92,73,110,112,117,116,73,102,70,105,108,101,69,120,105,115,116,115,123,115,105,122,101,37,100,46,99,108,111,125,123,125,123,37,37,10,32,32,32,92,71,101,110,101,114,105,99,69,114,114,111,114,123,40,103,110,117,112,108,111,116,41,32,92,115,112,97,99,101,92,115,112,97,99,101,92,115,112,97,99,101,92,64,115,112,97,99,101,115,125,123,37,37,10,32,32,32,32,32,32,71,110,117,112,108,111,116,32,69,114,114,111,114,58,32,70,105,108,101,32,96,115,105,122,101,37,100,46,99,108,111,39,32,110,111,116,32,102,111,117,110,100,33,32,67,111,117,108,100,32,110,111,116,32,115,101,116,32,102,111,110,116,32,115,105,122,101,37,37,10,32,32,32,125,123,83,101,101,32,116,104,101,32,103,110,117,112,108,111,116,32,100,111,99,117,109,101,110,116,97,116,105,111,110,32,102,111,114,32,101,120,112,108,97,110,97,116,105,111,110,46,37,37,10,32,32,32,125,123,70,111,114,32,117,115,105,110,103,32,97,32,102,111,110,116,32,115,105,122,101,32,97,32,102,105,108,101,32,96,115,105,122,101,60,102,111,110,116,115,105,122,101,62,46,99,108,111,39,32,104,97,115,32,116,111,32,101,120,105,115,116,46,10,32,32,32,32,32,32,32,32,70,97,108,108,105,110,103,32,98,97,99,107,32,94,94,74,116,111,32,100,101,102,97,117,108,116,32,102,111,110,116,115,105,122,101,32,49,48,112,116,46,125,37,37,10,32,32,92,100,101,102,92,64,112,116,115,105,122,101,123,48,125,10,32,32,92,105,110,112,117,116,123,115,105,122,101,49,48,46,99,108,111,125,37,37,10,125,37,37,10,92,109,97,107,101,97,116,111,116,104,101,114,10,0,0,0,0,88,116,101,114,109,32,84,101,107,116,114,111,110,105,120,32,52,48,49,52,32,77,111,100,101,0,0,0,0,0,0,0,69,80,83,76,65,84,69,88,95,99,111,109,109,111,110,95,105,110,105,116,0,0,0,0,120,100,97,36,116,97,0,0,105,110,118,97,108,105,100,32,105,110,112,117,116,32,101,110,99,111,100,105,110,103,32,117,115,101,100,0,0,0,0,0,9,109,105,110,111,114,32,37,115,116,105,99,115,32,97,114,101,32,111,102,102,10,0,0,108,97,121,101,114,100,101,102,97,117,108,116,0,0,0,0,107,111,105,56,45,117,0,0,96,98,117,105,108,116,105,110,45,114,111,116,97,116,101,45,108,101,102,116,96,32,111,110,108,121,32,102,111,114,32,115,112,108,111,116,115,59,32,60,115,104,105,102,116,62,32,105,110,99,114,101,97,115,101,115,32,97,109,111,117,110,116,0,107,111,105,56,45,114,0,0,99,112,52,51,55,100,101,0,32,45,45,32,112,114,111,99,101,115,115,111,114,32,100,111,101,115,32,110,111,116,32,115,117,112,112,111,114,116,32,116,104,105,115,32,115,105,122,101,0,0,0,0,0,0,0,0,108,97,116,105,110,57,0,0,108,97,116,105,110,53,0,0,114,0,0,0,0,0,0,0,108,97,116,105,110,50,0,0,70,111,114,109,97,116,32,99,104,97,114,97,99,116,101,114,32,109,105,115,109,97,116,99,104,58,32,37,37,66,32,105,115,32,111,110,108,121,32,118,97,108,105,100,32,119,105,116,104,32,37,37,98,0,0,0,108,97,116,105,110,49,0,0,121,111,117,32,99,97,110,39,116,32,117,110,115,101,116,32,116,104,101,32,112,97,108,101,116,116,101,46,10,0,0,0,102,105,108,108,105,110,103,32,71,80,86,65,76,95,80,87,68,0,0,0,0,0,0,0,37,37,32,71,78,85,80,76,79,84,58,32,76,97,84,101,88,32,112,105,99,116,117,114,101,32,119,105,116,104,32,80,111,115,116,115,99,114,105,112,116,10,0,0,0,0,0,0,120,116,101,114,109,0,0,0,101,112,115,108,97,116,101,120,32,116,101,114,109,105,110,97,108,32,99,97,110,110,111,116,32,119,114,105,116,101,32,116,111,32,115,116,97,110,100,97,114,100,32,111,117,116,112,117,116,0,0,0,0,0,0,0,120,121,112,36,108,97,110,101,0,0,0,0,0,0,0,0,9,110,111,116,32,114,111,116,97,116,101,100,10,9,0,0,101,120,112,101,99,116,101,100,32,103,97,112,32,118,97,108,117,101,0,0,0,0,0,0,115,101,116,32,103,114,105,100,32,37,115,32,32,0,0,0,32,32,123,92,71,78,85,80,76,79,84,115,112,101,99,105,97,108,123,34,10,0,0,0,99,104,97,110,103,105,110,103,32,118,105,101,119,32,116,111,32,37,102,44,32,37,102,46,10,0,0,0,0,0,0,0,32,32,92,115,112,101,99,105,97,108,123,112,115,102,105,108,101,61,37,115,32,108,108,120,61,48,32,108,108,121,61,48,32,117,114,120,61,37,100,32,117,114,121,61,37,100,32,114,119,105,61,37,100,125,10,0,92,71,78,85,80,76,79,84,112,105,99,116,117,114,101,40,37,100,44,37,100,41,10,0,40,37,100,41,0,0,0,0,117,116,102,56,0,0,0,0,37,37,32,71,78,85,80,76,79,84,58,32,112,108,97,105,110,32,84,101,88,32,119,105,116,104,32,80,111,115,116,115,99,114,105,112,116,10,92,98,101,103,105,110,103,114,111,117,112,10,92,99,97,116,99,111,100,101,96,92,64,61,49,49,92,114,101,108,97,120,10,92,100,101,102,92,71,78,85,80,76,79,84,115,112,101,99,105,97,108,123,37,37,10,32,32,92,100,101,102,92,100,111,35,35,49,123,92,99,97,116,99,111,100,101,96,35,35,49,61,49,50,92,114,101,108,97,120,125,92,100,111,115,112,101,99,105,97,108,115,10,32,32,92,99,97,116,99,111,100,101,96,92,123,61,49,92,99,97,116,99,111,100,101,96,92,125,61,50,92,99,97,116,99,111,100,101,92,37,37,61,49,52,92,114,101,108,97,120,92,115,112,101,99,105,97,108,125,37,37,10,37,37,10,92,101,120,112,97,110,100,97,102,116,101,114,92,105,102,120,92,99,115,110,97,109,101,32,71,78,85,80,76,79,84,112,105,99,116,117,114,101,92,101,110,100,99,115,110,97,109,101,92,114,101,108,97,120,10,32,32,92,99,115,110,97,109,101,32,110,101,119,100,105,109,101,110,92,101,110,100,99,115,110,97,109,101,92,71,78,85,80,76,79,84,117,110,105,116,10,32,32,92,103,100,101,102,92,71,78,85,80,76,79,84,112,105,99,116,117,114,101,40,35,49,44,35,50,41,123,92,118,98,111,120,32,116,111,35,50,92,71,78,85,80,76,79,84,117,110,105,116,92,98,103,114,111,117,112,10,32,32,32,32,92,100,101,102,92,112,117,116,40,35,35,49,44,35,35,50,41,35,35,51,123,92,117,110,115,107,105,112,92,114,97,105,115,101,35,35,50,92,71,78,85,80,76,79,84,117,110,105,116,10,32,32,32,32,32,32,92,104,98,111,120,32,116,111,48,112,116,123,92,107,101,114,110,35,35,49,92,71,78,85,80,76,79,84,117,110,105,116,32,35,35,51,92,104,115,115,125,92,105,103]) -.concat([110,111,114,101,115,112,97,99,101,115,125,37,37,10,32,32,32,32,92,100,101,102,92,108,106,117,115,116,35,35,49,123,92,118,98,111,120,32,116,111,48,112,116,123,92,118,115,115,92,104,98,111,120,32,116,111,48,112,116,123,35,35,49,92,104,115,115,125,92,118,115,115,125,125,37,37,10,32,32,32,32,92,100,101,102,92,99,106,117,115,116,35,35,49,123,92,118,98,111,120,32,116,111,48,112,116,123,92,118,115,115,92,104,98,111,120,32,116,111,48,112,116,123,92,104,115,115,32,35,35,49,92,104,115,115,125,92,118,115,115,125,125,37,37,10,32,32,32,32,92,100,101,102,92,114,106,117,115,116,35,35,49,123,92,118,98,111,120,32,116,111,48,112,116,123,92,118,115,115,92,104,98,111,120,32,116,111,48,112,116,123,92,104,115,115,32,35,35,49,125,92,118,115,115,125,125,37,37,10,32,32,32,32,92,100,101,102,92,115,116,97,99,107,35,35,49,123,92,108,101,116,92,92,61,92,99,114,92,116,97,98,115,107,105,112,61,48,112,116,92,104,97,108,105,103,110,123,92,104,102,105,108,32,35,35,35,35,92,104,102,105,108,92,99,114,32,35,35,49,92,99,114,99,114,125,125,37,37,10,32,32,32,32,92,100,101,102,92,108,115,116,97,99,107,35,35,49,123,92,104,98,111,120,32,116,111,48,112,116,123,92,118,98,111,120,32,116,111,48,112,116,123,92,118,115,115,92,115,116,97,99,107,123,35,35,49,125,125,92,104,115,115,125,125,37,37,10,32,32,32,32,92,100,101,102,92,99,115,116,97,99,107,35,35,49,123,92,104,98,111,120,32,116,111,48,112,116,123,92,104,115,115,92,118,98,111,120,32,116,111,48,112,116,123,92,118,115,115,92,115,116,97,99,107,123,35,35,49,125,125,92,104,115,115,125,125,37,37,10,32,32,32,32,92,100,101,102,92,114,115,116,97,99,107,35,35,49,123,92,104,98,111,120,32,116,111,48,112,116,123,92,118,98,111,120,32,116,111,48,112,116,123,92,115,116,97,99,107,123,35,35,49,125,92,118,115,115,125,92,104,115,115,125,125,37,37,10,32,32,32,32,92,118,115,115,92,104,98,111,120,32,116,111,35,49,92,71,78,85,80,76,79,84,117,110,105,116,92,98,103,114,111,117,112,92,105,103,110,111,114,101,115,112,97,99,101,115,125,37,37,10,32,32,92,103,100,101,102,92,101,110,100,71,78,85,80,76,79,84,112,105,99,116,117,114,101,123,92,104,115,115,92,101,103,114,111,117,112,92,101,103,114,111,117,112,125,37,37,10,92,102,105,10,92,71,78,85,80,76,79,84,117,110,105,116,61,37,46,52,102,98,112,10,0,104,105,115,116,111,103,114,97,109,115,0,0,0,0,0,0,98,111,114,0,0,0,0,0,92,98,101,103,105,110,123,112,105,99,116,117,114,101,125,40,37,100,44,37,100,41,40,48,44,48,41,37,37,10,0,0,37,37,32,71,78,85,80,76,79,84,58,32,76,97,84,101,88,32,112,105,99,116,117,114,101,32,119,105,116,104,32,80,111,115,116,115,99,114,105,112,116,10,92,98,101,103,105,110,103,114,111,117,112,37,37,10,92,109,97,107,101,97,116,108,101,116,116,101,114,37,37,10,92,110,101,119,99,111,109,109,97,110,100,123,92,71,78,85,80,76,79,84,115,112,101,99,105,97,108,125,123,37,37,10,32,32,92,64,115,97,110,105,116,105,122,101,92,99,97,116,99,111,100,101,96,92,37,37,61,49,52,92,114,101,108,97,120,92,115,112,101,99,105,97,108,125,37,37,10,92,115,101,116,108,101,110,103,116,104,123,92,117,110,105,116,108,101,110,103,116,104,125,123,37,46,52,102,98,112,125,37,37,10,0,80,108,111,116,32,102,97,105,108,101,100,33,0,0,0,0,111,114,32,115,101,116,32,116,104,101,32,108,111,97,100,112,97,116,104,32,97,112,112,114,111,112,114,105,97,116,101,108,121,10,0,0,0,0,0,0,86,84,45,108,105,107,101,32,116,101,107,52,48,120,120,32,116,101,114,109,105,110,97,108,32,101,109,117,108,97,116,111,114,0,0,0,0,0,0,0,111,114,32,115,101,116,32,116,104,101,32,101,110,118,105,114,111,110,109,101,110,116,97,108,32,118,97,114,105,97,98,108,101,32,71,78,85,80,76,79,84,95,80,83,95,68,73,82,10,0,0,0,0,0,0,0,118,105,36,101,119,0,0,0,108,36,111,97,100,0,0,0,80,108,101,97,115,101,32,99,111,112,121,32,37,115,32,116,111,32,111,110,101,32,111,102,32,116,104,101,32,97,98,111,118,101,32,100,105,114,101,99,116,111,114,105,101,115,10,0,9,114,111,116,97,116,101,100,32,105,102,32,116,104,101,32,116,101,114,109,105,110,97,108,32,97,108,108,111,119,115,32,105,116,10,9,0,0,0,0,103,97,112,0,0,0,0,0,32,92,10,0,0,0,0,0,67,97,110,39,116,32,102,105,110,100,32,80,111,115,116,83,99,114,105,112,116,32,112,114,111,108,111,103,117,101,32,102,105,108,101,32,37,115,10,0,71,80,86,65,76,95,86,73,69,87,95,82,79,84,95,90,0,0,0,0,0,0,0,0,71,78,85,80,76,79,84,95,80,83,95,68,73,82,0,0,80,114,111,108,111,103,32,110,97,109,101,0,0,0,0,0,10,9,84,104,101,32,102,111,108,108,111,119,105,110,103,32,98,105,110,97,114,121,32,100,97,116,97,32,115,105,122,101,115,32,97,116,116,101,109,112,116,32,116,111,32,98,101,32,109,97,99,104,105,110,101,32,105,110,100,101,112,101,110,100,101,110,116,58,10,10,9,32,32,110,97,109,101,32,40,115,105,122,101,32,105,110,32,98,121,116,101,115,41,10,10,0,47,117,115,114,47,108,111,99,97,108,47,115,104,97,114,101,47,103,110,117,112,108,111,116,47,52,46,54,47,80,111,115,116,83,99,114,105,112,116,0,97,103,108,105,115,116,0,0,97,103,108,102,110,46,116,120,116,0,0,0,0,0,0,0,47,76,84,51,32,123,32,80,76,32,91,56,32,100,108,49,32,53,32,100,108,49,32,48,46,53,32,100,108,49,32,53,32,100,108,49,93,32,49,32,48,32,49,32,68,76,32,125,32,100,101,102,10,0,0,0,71,80,86,65,76,95,78,97,78,0,0,0,0,0,0,0,47,76,84,50,32,123,32,80,76,32,91,52,32,100,108,49,32,52,32,100,108,49,93,32,48,32,49,32,49,32,68,76,32,125,32,100,101,102,10,0,118,116,116,101,107,0,0,0,47,76,84,49,32,123,32,80,76,32,91,56,32,100,108,49,32,53,32,100,108,49,93,32,48,32,48,32,49,32,68,76,32,125,32,100,101,102,10,0,118,101,36,114,115,105,111,110,0,0,0,0,0,0,0,0,47,76,84,48,32,123,32,80,76,32,91,93,32,49,32,48,32,48,32,68,76,32,125,32,100,101,102,10,0,0,0,0,116,111,112,0,0,0,0,0,99,111,108,117,109,110,115,36,116,97,99,107,101,100,0,0,32,37,115,37,115,116,105,99,115,32,37,115,109,37,115,116,105,99,115,0,0,0,0,0,47,76,84,97,32,123,32,65,76,32,91,49,32,117,100,108,32,109,117,108,32,50,32,117,100,108,32,109,117,108,93,32,48,32,115,101,116,100,97,115,104,32,48,32,48,32,48,32,115,101,116,114,103,98,99,111,108,111,114,32,125,32,100,101,102,10,0,0,0,0,0,0,71,80,86,65,76,95,86,73,69,87,95,82,79,84,95,88,0,0,0,0,0,0,0,0,47,76,84,98,32,123,32,66,76,32,91,93,32,48,32,48,32,48,32,68,76,32,125,32,100,101,102,10,0,0,0,0,47,76,84,119,32,123,32,80,76,32,91,93,32,49,32,115,101,116,103,114,97,121,32,125,32,100,101,102,10,0,0,0,40,37,100,41,10,0,0,0,93,32,41,10,0,0,0,0,37,32,82,101,100,101,102,105,110,101,32,108,105,110,101,32,116,121,112,101,115,32,116,111,32,109,97,116,99,104,32,111,108,100,32,101,112,115,108,97,116,101,120,32,100,114,105,118,101,114,10,0,0,0,0,0,119,36,105,116,104,0,0,0,99,117,114,114,101,110,116,100,105,99,116,32,101,110,100,32,100,101,102,105,110,101,102,111,110,116,32,112,111,112,10,0,100,117,112,32,108,101,110,103,116,104,32,100,105,99,116,32,98,101,103,105,110,32,123,49,32,105,110,100,101,120,32,47,70,73,68,32,101,113,32,123,112,111,112,32,112,111,112,125,32,123,100,101,102,125,32,105,102,101,108,115,101,125,32,102,111,114,97,108,108,10,0,0,45,101,0,0,0,0,0,0,47,67,77,69,88,49,48,45,66,97,115,101,108,105,110,101,32,47,67,77,69,88,49,48,32,102,105,110,100,102,111,110,116,32,91,49,32,48,32,48,32,49,32,48,32,49,93,32,109,97,107,101,102,111,110,116,10,0,0,0,0,0,0,0,71,80,86,65,76,95,112,105,0,0,0,0,0,0,0,0,37,37,66,101,103,105,110,80,114,111,99,83,101,116,58,32,67,77,69,88,49,48,45,66,97,115,101,108,105,110,101,10,0,0,0,0,0,0,0,0,114,101,102,114,101,115,104,10,0,0,0,0,0,0,0,0,84,101,107,116,114,111,110,105,120,32,52,48,49,48,32,97,110,100,32,111,116,104,101,114,115,59,32,109,111,115,116,32,84,69,75,32,101,109,117,108,97,116,111,114,115,0,0,0,67,77,69,88,49,48,0,0,116,105,116,36,108,101,0,0,76,105,110,101,102,101,101,100,0,0,0,0,0,0,0,0,37,37,69,110,100,80,114,111,99,83,101,116,10,0,0,0,98,111,116,116,111,109,0,0,114,111,119,115,36,116,97,99,107,101,100,0,0,0,0,0,115,101,116,32,103,114,105,100,0,0,0,0,0,0,0,0,67,111,109,109,97,110,100,32,39,37,115,39,32,103,101,110,101,114,97,116,101,100,32,101,114,114,111,114,44,32,101,120,105,116,99,111,100,101,32,105,115,32,37,100,0,0,0,0,110,111,116,32,101,110,111,117,103,104,32,109,101,109,111,114,121,32,116,111,32,108,111,97,100,32,102,105,108,101,0,0,67,97,110,39,116,32,99,97,108,99,117,108,97,116,101,32,99,117,98,105,99,32,115,112,108,105,110,101,115,0,0,0,96,98,117,105,108,116,105,110,45,114,111,116,97,116,101,45,100,111,119,110,96,32,111,110,108,121,32,102,111,114,32,115,112,108,111,116,115,59,32,60,115,104,105,102,116,62,32,105,110,99,114,101,97,115,101,115,32,97,109,111,117,110,116,0,80,105,112,101,32,39,37,115,39,32,99,111,110,116,97,105,110,115,32,116,104,101,32,102,111,110,116,32,39,37,115,39,46,10,0,0,0,0,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,32,58,32,115,116,114,108,101,110,32,111,102,32,110,111,110,45,83,84,82,73,78,71,32,97,114,103,117,109,101,110,116,0,0,70,111,110,116,32,102,105,108,101,32,39,37,115,39,32,99,111,110,116,97,105,110,115,32,116,104,101,32,102,111,110,116,32,39,37,115,39,46,32,76,111,99,97,116,105,111,110,58,10,32,32,32,37,115,10,0,108,111,97,100,95,102,111,110,116,102,105,108,101,115,0,0,47,70,111,110,116,78,97,109,101,0,0,0,0,0,0,0,70,111,110,116,32,102,105,108,101,32,39,37,115,39,32,115,101,101,109,115,32,110,111,116,32,116,111,32,98,101,32,97,32,80,70,65,32,102,105,108,101,0,0,0,0,0,0,0,67,111,109,109,97,110,100,32,39,37,115,39,32,115,101,101,109,115,32,110,111,116,32,116,111,32,103,101,110,101,114,97,116,101,32,80,70,65,32,100,97,116,97,0,0,0,0,0,71,80,86,65,76,95,84,69,82,77,73,78,65,76,83,0,37,33,70,111,110,116,84,121,112,101,49,0,0,0,0,0,116,101,107,52,48,120,120,0,37,33,80,83,45,65,100,111,98,101,70,111,110,116,0,0,116,105,109,36,101,115,116,97,109,112,0,0,0,0,0,0,70,111,110,116,32,102,105,108,101,32,39,37,115,39,32,104,97,115,32,117,110,107,110,111,119,110,32,101,120,116,101,110,115,105,111,110,46,32,65,115,115,117,109,101,32,105,116,32,105,115,32,97,32,112,102,97,32,102,105,108,101,0,0,0,9,119,114,105,116,116,101,110,32,105,110,32,37,115,32,99,111,114,110,101,114,10,0,0,101,114,114,111,114,36,98,97,114,115,0,0,0,0,0,0,115,101,116,32,103,114,105,100,32,110,111,112,111,108,97,114,10,0,0,0,0,0,0,0,112,102,97,0,0,0,0,0,78,111,32,99,111,109,109,97,110,100,32,102,111,114,32,97,117,116,111,109,97,116,105,99,32,102,111,110,116,32,99,111,110,118,101,114,115,105,111,110,32,112,102,98,45,62,112,102,97,32,100,101,102,105,110,101,100,0,0,0,0,0,0,0,112,102,98,116,111,112,115,32,37,115,0,0,0,0,0,0,9,32,32,0,0,0,0,0,67,97,110,39,116,32,112,108,111,116,32,119,105,116,104,32,97,110,32,101,109,112,116,121,32,37,115,32,114,97,110,103,101,33,0,0,0,0,0,0,71,78,85,80,76,79,84,95,80,70,66,84,79,80,70,65,0,0,0,0,0,0,0,0,112,102,98,0,0,0,0,0,117,110,115,101,116,32,104,105,100,100,101,110,51,100,10,0,67,111,117,108,100,32,110,111,116,32,101,120,101,99,117,116,101,32,99,111,109,109,97,110,100,32,39,37,115,39,0,0,78,111,32,99,111,109,109,97,110,100,32,102,111,114,32,97,117,116,111,109,97,116,105,99,32,102,111,110,116,32,99,111,110,118,101,114,115,105,111,110,32,116,116,102,45,62,112,102,97,32,100,101,102,105,110,101,100,0,0,0,0,0,0,0,110,101,119,32,107,101,121,32,108,105,115,116,0,0,0,0,116,116,102,50,112,116,49,32,45,97,32,45,101,32,45,87,32,48,32,37,115,32,45,0,84,101,107,116,114,111,110,105,120,32,52,49,48,54,44,32,52,49,48,55,44,32,52,49,48,57,32,97,110,100,32,52,50,48,88,32,116,101,114,109,105,110,97,108,115,0,0,0,71,78,85,80,76,79,84,95,84,84,70,84,79,80,70,65,0,0,0,0,0,0,0,0,116,105,109,101,102,36,109,116,0,0,0,0,0,0,0,0,111,116,102,0,0,0,0,0,99,108,117,115,116,36,101,114,101,100,0,0,0,0,0,0,115,101,116,32,103,114,105,100,32,112,111,108,97,114,32,37,102,10,0,0,0,0,0,0,116,116,102,0,0,0,0,0,112,0,0,0,0,0,0,0,37,37,37,37,66,101,103,105,110,80,114,111,99,83,101,116,58,32,37,115,10,0,0,0,80,83,95,101,115,99,97,112,101,95,115,116,114,105,110,103,0,0,0,0,0,0,0,0,9,84,104,101,32,102,111,108,108,111,119,105,110,103,32,98,105,110,97,114,121,32,100,97,116,97,32,115,105,122,101,115,32,97,114,101,32,109,97,99,104,105,110,101,32,100,101,112,101,110,100,101,110,116,58,10,10,9,32,32,110,97,109,101,32,40,115,105,122,101,32,105,110,32,98,121,116,101,115,41,10,10,0,0,0,0,0,0,76,111,103,32,115,99,97,108,105,110,103,32,111,102,32,51,68,32,105,109,97,103,101,32,112,108,111,116,115,32,105,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,0,101,110,100,10,37,37,69,110,100,80,114,111,108,111,103,10,0,0,0,0,0,0,0,0,40,41,92,0,0,0,0,0,115,116,97,116,117,115,100,105,99,116,32,98,101,103,105,110,32,37,115,32,115,101,116,100,117,112,108,101,120,109,111,100,101,32,101,110,100,10,0,0,79,114,105,103,105,110,95,50,0,0,0,0,0,0,0,0,117,116,102,45,56,46,112,115,0,0,0,0,0,0,0,0,71,80,86,65,76,95,67,79,77,80,73,76,69,95,79,80,84,73,79,78,83,0,0,0,107,111,105,56,117,46,112,115,0,0,0,0,0,0,0,0,116,101,107,52,49,48,120,0,107,111,105,56,114,46,112,115,0,0,0,0,0,0,0,0,116,105,99,115,108,36,101,118,101,108,0,0,0,0,0,0,99,112,49,50,53,49,46,112,115,0,0,0,0,0,0,0,9,115,101,116,32,37,115,100,97,116,97,32,116,105,109,101,10,0,0,0,0,0,0,0,117,110,115,101,116,32,103,114,105,100,10,0,0,0,0,0,99,112,49,50,53,48,46,112,115,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0,99,112,56,53,50,46,112,115,0,0,0,0,0,0,0,0,99,112,56,53,48,46,112,115,0,0,0,0,0,0,0,0,99,112,52,51,55,46,112,115,0,0,0,0,0,0,0,0,56,56,53,57,45,49,53,46,112,115,0,0,0,0,0,0,56,56,53,57,45,57,46,112,115,0,0,0,0,0,0,0,56,56,53,57,45,50,46,112,115,0,0,0,0,0,0,0,108,111,97,100,112,97,116,104,32,61,61,32,78,85,76,76,0,0,0,0,0,0,0,0,71,80,86,65,76,95,80,65,84,67,72,76,69,86,69,76,0,0,0,0,0,0,0,0,56,56,53,57,45,49,46,112,115,0,0,0,0,0,0,0,120,94,51,0,0,0,0,0,82,69,71,73,83,32,103,114,97,112,104,105,99,115,32,108,97,110,103,117,97,103,101,0,112,114,111,108,111,103,117,101,46,112,115,0,0,0,0,0,116,105,99,115,99,36,97,108,101,0,0,0,0,0,0,0,47,100,111,99,108,105,112,32,123,10,32,32,67,108,105,112,84,111,66,111,117,110,100,105,110,103,66,111,120,32,123,10,32,32,32,32,110,101,119,112,97,116,104,32,37,100,32,37,100,32,109,111,118,101,116,111,32,37,100,32,37,100,32,108,105,110,101,116,111,32,37,100,32,37,100,32,108,105,110,101,116,111,32,37,100,32,37,100,32,108,105,110,101,116,111,32,99,108,111,115,101,112,97,116,104,10,32,32,32,32,99,108,105,112,10,32,32,125,32,105,102,10,125,32,100,101,102,10,0,0,0,0,0,0,0,0,104,115,0,0,0,0,0,0,115,101,116,32,116,105,99,115,32,37,115,10,0,0,0,0,37,37,80,97,103,101,115,58,32,40,97,116,101,110,100,41,10,0,0,0,0,0,0,0,80,111,114,116,114,97,105,116,0,0,0,0,0,0,0,0,76,97,110,100,115,99,97,112,101,0,0,0,0,0,0,0,44,32,37,100,32,98,101,102,111,114,101,32,112,108,97,110,101,0,0,0,0,0,0,0,37,37,37,37,79,114,105,101,110,116,97,116,105,111,110,58,32,37,115,10,0,0,0,0,37,37,37,37,66,111,117,110,100,105,110,103,66,111,120,58,32,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,40,97,116,101,110,100,41,0,37,37,37,37,84,105,116,108,101,58,32,37,115,10,0,0,71,80,86,65,76,95,86,69,82,83,73,79,78,0,0,0,37,33,80,83,45,65,100,111,98,101,45,50,46,48,10,0,114,101,103,105,115,0,0,0,37,33,80,83,45,65,100,111,98,101,45,50,46,48,32,69,80,83,70,45,50,46,48,10,0,0,0,0,0,0,0,0,116,105,36,99,115,0,0,0,101,112,115,0,0,0,0,0,40,0,0,0,0,0,0,0,32,110,111,101,110,104,97,110,99,101,100,0,0,0,0,0,117,110,36,115,111,114,116,101,100,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,112,111,115,116,115,99,114,105,112,116,32,102,111,114,109,97,116,32,117,115,101,100,0,0,37,37,37,37,80,97,103,101,115,58,32,37,100,10,0,0,37,115,37,115,0,0,0,0,44,32,37,100,32,98,101,102,111,114,101,32,108,105,110,101,0,0,0,0,0,0,0,0,37,37,68,111,99,117,109,101,110,116,70,111,110,116,115,58,32,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,37,37,84,114,97,105,108,101,114,10,0,0,0,0,0,0,115,116,114,111,107,101,10,103,114,101,115,116,111,114,101,10,101,110,100,10,115,104,111,119,112,97,103,101,10,0,0,0,77,82,115,104,111,119,10,0,66,97,100,32,102,117,108,108,32,109,111,110,116,104,32,110,97,109,101,0,0,0,0,0,71,80,86,65,76,95,69,82,82,78,79,0,0,0,0,0,77,67,115,104,111,119,10,0,71,80,73,67,32,45,45,32,80,114,111,100,117,99,101,32,103,114,97,112,104,115,32,105,110,32,103,114,111,102,102,32,117,115,105,110,103,32,116,104,101,32,103,112,105,99,32,112,114,101,112,114,111,99,101,115,115,111,114,0,0,0,0,0,77,76,115,104,111,119,10,0,116,101,114,109,111,36,112,116,105,111,110,115,0,0,0,0,93,32,37,46,49,102,32,0,44,32,114,111,116,97,116,101,100,32,98,121,32,37,100,32,100,101,103,114,101,101,115,32,105,110,32,50,68,32,112,108,111,116,115,0,0,0,0,0,115,111,36,114,116,101,100,0,92,37,111,0,0,0,0,0,91,32,0,0,0,0,0,0,99,117,114,114,101,110,116,112,111,105,110,116,32,103,115,97,118,101,32,116,114,97,110,115,108,97,116,101,32,37,100,32,114,111,116,97,116,101,32,48,32,48,32,109,111,118,101,116,111,10,0,0,0,0,0,0,10,9,32,32,32,32,83,107,105,112,32,98,121,116,101,115,58,32,37,100,32,98,101,102,111,114,101,32,114,101,99,111,114,100,0,0,0,0,0,0,47,88,89,114,101,115,116,111,114,101,32,123,32,91,40,32,41,32,49,32,50,32,116,114,117,101,32,102,97,108,115,101,32,52,32,40,41,93,32,125,32,98,105,110,100,32,100,101,102,10,0,0,0,0,0,0,47,88,89,115,97,118,101,32,32,32,32,123,32,91,40,32,41,32,49,32,50,32,116,114,117,101,32,102,97,108,115,101,32,51,32,40,41,93,32,125,32,98,105,110,100,32,100,101,102,10,0,0,0,0,0,0,101,120,112,97,110,100,32,102,111,110,116,112,97,116,104,0,32,32,101,120,99,104,32,100,117,112,32,77,70,119,105,100,116,104,32,45,50,32,100,105,118,32,51,32,45,49,32,114,111,108,108,32,82,10,32,32,66,108,97,99,107,116,101,120,116,32,123,103,115,97,118,101,32,48,32,115,101,116,103,114,97,121,32,77,70,115,104,111,119,32,103,114,101,115,116,111,114,101,125,32,123,77,70,115,104,111,119,125,32,105,102,101,108,115,101,32,125,32,98,105,110,100,32,100,101,102,10,0,101,37,43,48,50,100,0,0,47,77,67,115,104,111,119,32,123,32,99,117,114,114,101,110,116,112,111,105,110,116,32,115,116,114,111,107,101,32,77,10,0,0,0,0,0,0,0,0,10,9,100,117,109,109,121,32,118,97,114,105,97,98,108,101,32,105,115,32,120,32,102,111,114,32,99,117,114,118,101,115,10,0,0,0,0,0,0,0,37,72,58,37,77,0,0,0,71,80,86,65,76,95,69,78,67,79,68,73,78,71,0,0,32,32,101,120,99,104,32,100,117,112,32,77,70,119,105,100,116,104,32,110,101,103,32,51,32,45,49,32,114,111,108,108,32,82,10,32,32,66,108,97,99,107,116,101,120,116,32,123,103,115,97,118,101,32,48,32,115,101,116,103,114,97,121,32,77,70,115,104,111,119,32,103,114,101,115,116,111,114,101,125,32,123,77,70,115,104,111,119,125,32,105,102,101,108,115,101,32,125,32,98,105,110,100,32,100,101,102,10,0,0,0,0,103,112,105,99,0,0,0,0,47,77,82,115,104,111,119,32,123,32,99,117,114,114,101,110,116,112,111,105,110,116,32,115,116,114,111,107,101,32,77,10,0,0,0,0,0,0,0,0,116,97,98,108,101,0,0,0,32,32,48,32,101,120,99,104,32,82,10,32,32,66,108,97,99,107,116,101,120,116,32,123,103,115,97,118,101,32,48,32,115,101,116,103,114,97,121,32,77,70,115,104,111,119,32,103,114,101,115,116,111,114,101,125,32,123,77,70,115,104,111,119,125,32,105,102,101,108,115,101,32,125,32,98,105,110,100,32,100,101,102,10,0,0,0,0,44,32,112,97,114,97,108,108,101,108,32,116,111,32,97,120,105,115,32,105,110,32,51,68,32,112,108,111,116,115,0,0,101,120,112,101,99,116,105,110,103,32,39,120,39,44,32,39,120,50,39,44,32,39,97,117,116,111,39,32,111,114,32,39,111,102,102,39,0,0,0,0,115,101,116,32,97,110,103,108,101,115,32,37,115,10,0,0,47,77,76,115,104,111,119,32,123,32,99,117,114,114,101,110,116,112,111,105,110,116,32,115,116,114,111,107,101,32,77,10,0,0,0,0,0,0,0,0,32,32,32,32,32,54,32,103,101,116,32,71,115,119,105,100,116,104,32,112,111,112,32,97,100,100,125,32,123,112,111,112,125,32,105,102,101,108,115,101,125,32,105,102,101,108,115,101,125,32,102,111,114,97,108,108,125,32,100,101,102,10,0,0,32,123,100,117,112,32,51,32,103,101,116,123,100,117,112,32,100,117,112,32,48,32,103,101,116,32,102,105,110,100,102,111,110,116,32,101,120,99,104,32,49,32,103,101,116,32,115,99,97,108,101,102,111,110,116,32,115,101,116,102,111,110,116,10,0,0,0,0,0,0,0,0,37,50,46,50,115,0,0,0,115,106,105,115,0,0,0,0,47,77,70,119,105,100,116,104,32,123,48,32,101,120,99,104,32,123,32,100,117,112,32,53,32,103,101,116,32,51,32,103,101,32,123,32,53,32,103,101,116,32,51,32,101,113,32,123,32,48,32,125,32,123,32,112,111,112,32,125,32,105,102,101,108,115,101,32,125,10,0,0,84,97,98,117,108,97,114,32,111,117,116,112,117,116,32,111,102,32,37,115,32,112,108,111,116,32,115,116,121,108,101,32,110,111,116,32,102,117,108,108,121,32,105,109,112,108,101,109,101,110,116,101,100,10,0,0,108,97,110,100,0,0,0,0,47,71,115,119,105,100,116,104,32,123,100,117,112,32,116,121,112,101,32,47,115,116,114,105,110,103,116,121,112,101,32,101,113,32,123,115,116,114,105,110,103,119,105,100,116,104,125,32,123,112,111,112,32,40,110,41,32,115,116,114,105,110,103,119,105,100,116,104,125,32,105,102,101,108,115,101,125,32,100,101,102,10,0,0,0,0,0,0,32,32,32,102,111,114,97,108,108,125,32,100,101,102,10,0,32,32,32,32,32,105,102,101,108,115,101,32,125,10,0,0,71,80,86,65,76,95,79,85,84,80,85,84,0,0,0,0,32,32,32,32,32,112,111,112,32,97,108,111,97,100,32,112,111,112,32,77,125,32,105,102,101,108,115,101,32,125,105,102,101,108,115,101,32,125,105,102,101,108,115,101,32,125,10,0,85,110,107,110,111,119,110,32,116,101,114,109,105,110,97,108,32,116,121,112,101,32,45,32,110,111,116,32,97,32,112,108,111,116,116,105,110,103,32,100,101,118,105,99,101,0,0,0,32,32,32,32,32,115,104,111,119,32,50,32,105,110,100,101,120,32,123,97,108,111,97,100,32,112,111,112,32,77,32,110,101,103,32,51,32,45,49,32,114,111,108,108,32,110,101,103,32,82,32,112,111,112,32,112,111,112,125,32,123,112,111,112,32,112,111,112,32,112,111,112,10,0,0,0,0,0,0,0,115,117,36,114,102,97,99,101,0,0,0,0,0,0,0,0,101,108,115,101,0,0,0,0,32,32,32,32,32,100,117,112,32,48,32,82,125,32,123,100,117,112,32,54,32,103,101,116,32,115,116,114,105,110,103,119,105,100,116,104,32,112,111,112,32,45,50,32,100,105,118,32,48,32,82,32,54,32,103,101,116,10,0,0,0,0,0,0,44,32,117,115,105,110,103,32,102,111,110,116,32,34,37,115,34,0,0,0,0,0,0,0,97,117,116,111,0,0,0,0,78,111,32,118,97,108,105,100,32,100,97,116,97,32,112,111,105,110,116,115,32,102,111,117,110,100,32,105,110,32,102,105,108,101,0,0,0,0,0,0,115,101,116,32,102,111,114,109,97,116,32,37,115,32,34,37,115,34,10,0,0,0,0,0,32,32,32,32,32,103,101,116,32,49,32,101,113,32,123,100,117,112,32,50,32,103,101,116,32,101,120,99,104,32,100,117,112,32,51,32,103,101,116,32,101,120,99,104,32,54,32,103,101,116,32,115,116,114,105,110,103,119,105,100,116,104,32,112,111,112,32,45,50,32,100,105,118,10,0,0,0,0,0,0,32,32,32,32,32,123,100,117,112,32,51,32,103,101,116,32,123,50,32,103,101,116,32,110,101,103,32,48,32,101,120,99,104,32,82,32,112,111,112,125,32,123,112,111,112,32,97,108,111,97,100,32,112,111,112,32,77,125,32,105,102,101,108,115,101,125,32,123,100,117,112,32,53,10,0,0,0,0,0,0,32,32,32,32,32,103,101,116,32,101,120,99,104,32,52,32,103,101,116,32,123,71,115,104,111,119,125,32,123,115,116,114,105,110,103,119,105,100,116,104,32,112,111,112,32,48,32,82,125,32,105,102,101,108,115,101,32,125,105,102,32,100,117,112,32,53,32,103,101,116,32,48,32,101,113,10,0,0,0,0,10,9,32,32,32,32,83,99,97,110,58,32,0,0,0,0,32,32,32,32,32,91,32,99,117,114,114,101,110,116,112,111,105,110,116,32,93,32,101,120,99,104,32,100,117,112,32,50,32,103,101,116,32,48,32,101,120,99,104,32,82,32,100,117,112,32,53,32,103,101,116,32,50,32,110,101,32,123,100,117,112,32,100,117,112,32,54,10,0,0,0,0,0,0,0,0,32,32,32,32,32,123,100,117,112,32,100,117,112,32,48,32,103,101,116,32,102,105,110,100,102,111,110,116,32,101,120,99,104,32,49,32,103,101,116,32,115,99,97,108,101,102,111,110,116,32,115,101,116,102,111,110,116,10,0,0,0,0,0,0,32,32,32,32,32,123,32,53,32,103,101,116,32,51,32,101,113,32,123,103,115,97,118,101,125,32,123,103,114,101,115,116,111,114,101,125,32,105,102,101,108,115,101,32,125,10,0,0,45,76,73,66,71,68,32,32,0,0,0,0,0,0,0,0,32,32,32,123,32,100,117,112,32,53,32,103,101,116,32,51,32,103,101,10,0,0,0,0,71,80,86,65,76,95,84,69,82,77,79,80,84,73,79,78,83,0,0,0,0,0,0,0,47,77,70,115,104,111,119,32,123,10,0,0,0,0,0,0,123,125,94,95,64,38,126,10,0,0,0,0,0,0,0,0,125,32,105,102,10,0,0,0,115,116,36,121,108,101,0,0,103,115,97,118,101,32,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,32,67,32,99,108,105,112,112,97,116,104,32,102,105,108,108,32,103,114,101,115,116,111,114,101,0,0,9,37,115,37,115,32,105,115,32,34,37,115,34,44,32,111,102,102,115,101,116,32,97,116,32,0,0,0,0,0,0,0,116,101,120,116,95,108,97,98,101,108,0,0,0,0,0,0,115,101,116,32,100,117,109,109,121,32,37,115,44,37,115,10,0,0,0,0,0,0,0,0,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,32,67,32,49,46,48,48,48,32,48,32,48,32,37,46,50,102,32,37,46,50,102,32,66,111,120,67,111,108,70,105,108,108,0,0,0,0,0,0,0,0,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,32,48,32,108,116,32,51,32,49,32,114,111,108,108,32,48,32,108,116,32,101,120,99,104,32,48,32,108,116,32,111,114,32,111,114,32,110,111,116,32,123,0,0,0,0,0,0,0,0,40,37,115,41,32,102,105,110,100,102,111,110,116,32,37,100,32,115,99,97,108,101,102,111,110,116,32,115,101,116,102,111,110,116,10,0,0,0,0,0,10,9,32,32,32,32,51,68,32,110,111,114,109,97,108,32,118,101,99,116,111,114,58,32,40,37,102,44,32,37,102,44,32,37,102,41,0,0,0,0,32,32,35,32,40,99,117,114,114,101,110,116,108,121,32,91,0,0,0,0,0,0,0,0,48,32,115,101,116,103,114,97,121,10,110,101,119,112,97,116,104,10,0,0,0,0,0,0,110,111,116,36,105,116,108,101,0,0,0,0,0,0,0,0,57,48,32,114,111,116,97,116,101,10,48,32,37,100,32,116,114,97,110,115,108,97,116,101,10,0,0,0,0,0,0,0,103,110,117,100,105,99,116,32,98,101,103,105,110,10,103,115,97,118,101,10,100,111,99,108,105,112,10,37,100,32,37,100,32,116,114,97,110,115,108,97,116,101,10,37,46,51,102,32,37,46,51,102,32,115,99,97,108,101,10,0,0,0,0,0,45,0,0,0,0,0,0,0,87,114,105,116,105,110,103,32,111,117,116,32,80,111,115,116,83,99,114,105,112,116,32,109,97,99,114,111,115,32,102,111,114,32,101,110,104,97,110,99,101,100,32,116,101,120,116,32,109,111,100,101,10,0,0,0,37,37,37,37,80,97,103,101,58,32,37,100,32,37,100,10,0,0,0,0,0,0,0,0,46,0,0,0,0,0,0,0,37,100,32,37,100,32,78,10,0,0,0,0,0,0,0,0,71,80,95,70,73,82,83,84,95,75,69,89,0,0,0,0,37,100,32,37,100,32,82,10,0,0,0,0,0,0,0,0,108,97,98,101,108,0,0,0,47,121,48,32,121,48,32,121,115,116,101,112,32,97,100,100,32,100,101,102,32,47,105,105,32,105,105,32,49,32,97,100,100,32,100,101,102,10,105,105,32,105,109,97,120,32,103,101,32,123,101,120,105,116,125,32,105,102,32,125,32,108,111,111,112,10,103,114,101,115,116,111,114,101,32,48,32,115,101,116,103,114,97,121,10,0,0,0,120,0,0,0,0,0,0,0,32,107,100,101,110,115,105,116,121,50,100,0,0,0,0,0,37,100,32,37,100,32,77,10,0,0,0,0,0,0,0,0,116,111,107,101,110,95,116,97,98,108,101,95,115,105,122,101,32,62,61,32,108,102,45,62,110,117,109,95,116,111,107,101,110,115,43,49,0,0,0,0,67,97,110,39,116,32,99,97,108,99,117,108,97,116,101,32,115,112,108,105,110,101,115,44,32,110,101,101,100,32,97,116,32,108,101,97,115,116,32,51,32,112,111,105,110,116,115,0,115,116,114,111,107,101,32,37,100,32,37,100,32,77,10,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,32,58,32,83,84,82,73,78,71,32,111,112,101,114,97,116,111,114,32,97,112,112,108,105,101,100,32,116,111,32,110,111,110,45,83,84,82,73,78,71,32,116,121,112,101,0,0,0,0,0,37,100,32,37,100,32,86,10,0,0,0,0,0,0,0,0,10,9,32,32,32,32,50,68,32,114,111,116,97,116,105,111,110,32,97,110,103,108,101,58,32,37,102,0,0,0,0,0,37,100,32,37,100,32,76,10,0,0,0,0,0,0,0,0,76,84,37,99,10,0,0,0,41,32,82,115,104,111,119,10,0,0,0,0,0,0,0,0,41,32,67,115,104,111,119,10,0,0,0,0,0,0,0,0,71,80,86,65,76,95,84,69,82,77,0,0,0,0,0,0,41,32,76,115,104,111,119,10,0,0,0,0,0,0,0,0,101,115,116,105,109,97,116,101,32,119,105,100,116,104,32,111,102,32,101,110,104,97,110,99,101,100,32,116,101,120,116,32,115,116,114,105,110,103,0,0,93,32,71,82,115,104,111,119,10,0,0,0,0,0,0,0,115,97,36,109,112,108,101,115,0,0,0,0,0,0,0,0,93,32,71,67,115,104,111,119,10,0,0,0,0,0,0,0,110,117,109,101,114,105,99,97,108,0,0,0,0,0,0,0,115,101,116,32,100,103,114,105,100,51,100,32,37,100,44,37,100,32,37,115,37,115,32,37,102,44,37,102,10,0,0,0,93,32,71,76,115,104,111,119,10,0,0,0,0,0,0,0,99,117,114,114,101,110,116,112,111,105,110,116,32,103,115,97,118,101,32,116,114,97,110,115,108,97,116,101,32,37,100,32,114,111,116,97,116,101,32,48,32,48,32,77,10,0,0,0,37,100,32,37,100,32,37,115,10,0,0,0,0,0,0,0,32,40,37,102,44,32,37,102,44,32,37,102,41,0,0,0,97,100,106,117,115,116,105,110,103,32,116,111,32,91,37,103,58,37,103,93,10,0,0,0,80,101,110,116,87,0,0,0,68,105,97,87,0,0,0,0,84,114,105,68,87,0,0,0,84,114,105,85,87,0,0,0,110,101,119,32,108,105,110,101,32,98,117,102,102,101,114,0,67,105,114,99,87,0,0,0,101,115,116,105,109,97,116,101,0,0,0,0,0,0,0,0,66,111,120,87,0,0,0,0,111,98,106,36,101,99,116,0,80,101,110,116,69,0,0,0,108,97,98,36,101,108,115,0,115,101,116,32,100,103,114,105,100,51,100,32,37,100,44,37,100,32,115,112,108,105,110,101,115,10,0,0,0,0,0,0,68,105,97,69,0,0,0,0,84,114,105,68,69,0,0,0,105,115,111,95,56,56,53,57,95,49,0,0,0,0,0,0,84,114,105,85,69,0,0,0,10,9,32,32,32,32,67,101,110,116,101,114,58,0,0,0,67,105,114,99,69,0,0,0,73,109,97,103,101,32,103,114,105,100,32,109,117,115,116,32,98,101,32,97,116,32,108,101,97,115,116,32,52,32,112,111,105,110,116,115,32,40,50,32,120,32,50,41,46,10,10,0,66,111,120,69,0,0,0,0,68,49,53,0,0,0,0,0,68,49,52,0,0,0,0,0,85,110,107,110,111,119,110,32,112,111,105,110,116,32,116,121,112,101,32,105,110,32,112,108,111,116,51,100,95,108,105,110,101,115,0,0,0,0,0,0,79,114,105,103,105,110,95,49,0,0,0,0,0,0,0,0,10,35,32,67,117,114,118,101,32,37,100,32,111,102,32,37,100,44,32,37,100,32,112,111,105,110,116,115,0,0,0,0,68,49,51,0,0,0,0,0,123,125,36,91,93,92,0,0,68,49,50,0,0,0,0,0,112,115,100,105,114,0,0,0,68,49,49,0,0,0,0,0,9,37,115,32,105,115,32,115,101,116,32,116,111,32,37,115,10,0,0,0,0,0,0,0,115,101,112,97,114,97,116,105,111,110,32,109,117,115,116,32,98,101,32,62,32,48,0,0,115,101,116,32,100,103,114,105,100,51,100,32,37,100,44,37,100,44,32,37,100,10,0,0,68,49,48,0,0,0,0,0,76,0,0,0,0,0,0,0,68,57,0,0,0,0,0,0,68,56,0,0,0,0,0,0,10,9,32,32,32,32,79,114,105,103,105,110,58,0,0,0,68,55,0,0,0,0,0,0,68,54,0,0,0,0,0,0,68,53,0,0,0,0,0,0,68,52,0,0,0,0,0,0,68,51,0,0,0,0,0,0,100,117,112,32,100,117,112,32,109,117,108,32,109,117,108,0,101,110,104,97,110,99,101,100,32,116,101,120,116,32,109,111,100,101,32,112,97,114,115,105,110,103,32,101,114,114,111,114,0,0,0,0,0,0,0,0,68,50,0,0,0,0,0,0,112,111,108,36,97,114,0,0,68,49,0,0,0,0,0,0,9,114,101,97,100,32,102,111,114,109,97,116,32,102,111,114,32,116,105,109,101,32,111,110,32,37,115,32,97,120,105,115,32,105,115,32,34,37,115,34,10,0,0,0,0,0,0,0,115,101,112,36,97,114,97,116,105,111,110,0,0,0,0,0,121,121,10,0,0,0,0,0,68,48,0,0,0,0,0,0,108,0,0,0,0,0,0,0,83,49,53,0,0,0,0,0,83,49,52,0,0,0,0,0,44,32,100,122,61,37,102,0,83,49,51,0,0,0,0,0,83,49,50,0,0,0,0,0,83,49,49,0,0,0,0,0,83,49,48,0,0,0,0,0,83,57,0,0,0,0,0,0,101,110,104,97,110,99,101,100,32,116,101,120,116,32,109,111,100,101,32,112,97,114,115,101,114,32,45,32,105,103,110,111,114,105,110,103,32,115,112,117,114,105,111,117,115,32,125,0,83,56,0,0,0,0,0,0,112,111,105,36,110,116,115,105,122,101,0,0,0,0,0,0,83,55,0,0,0,0,0,0,9,122,101,114,111,32,105,115,32,37,103,10,0,0,0,0,83,54,0,0,0,0,0,0,102,105,110,97,110,99,101,36,98,97,114,115,0,0,0,0,120,120,10,0,0,0,0,0,114,101,115,105,122,101,95,100,121,110,97,114,114,97,121,58,32,100,121,110,97,114,114,97,121,32,119,97,115,110,39,116,32,105,110,105,116,105,97,108,105,122,101,100,33,0,0,0,104,0,0,0,0,0,0,0,83,53,0,0,0,0,0,0,83,52,0,0,0,0,0,0,44,32,100,121,61,37,102,0,83,51,0,0,0,0,0,0,83,50,0,0,0,0,0,0,73,47,79,32,101,114,114,111,114,32,100,117,114,105,110,103,32,117,112,100,97,116,101,0,83,49,0,0,0,0,0,0,83,48,0,0,0,0,0,0,71,80,86,65,76,95,86,73,69,87,95,77,65,80,0,0,67,49,53,0,0,0,0,0,115,118,103,0,0,0,0,0,67,49,52,0,0,0,0,0,112,111,105,110,116,105,110,116,36,101,114,118,97,108,98,111,120,0,0,0,0,0,0,0,67,49,51,0,0,0,0,0,102,105,108,101,116,36,121,112,101,115,0,0,0,0,0,0,99,97,110,100,108,101,36,115,116,105,99,107,115,0,0,0,120,121,10,0,0,0,0,0,67,49,50,0,0,0,0,0,103,0,0,0,0,0,0,0,67,49,49,0,0,0,0,0,67,49,48,0,0,0,0,0,10,9,32,32,32,32,83,97,109,112,108,101,32,112,101,114,105,111,100,115,58,32,100,120,61,37,102,0,0,0,0,0,67,57,0,0,0,0,0,0,67,56,0,0,0,0,0,0,36,96,0,0,0,0,0,0,67,55,0,0,0,0,0,0,121,122,97,102,112,110,117,109,32,107,77,71,84,80,69,90,89,0,0,0,0,0,0,0,67,54,0,0,0,0,0,0,37,73,58,37,77,58,37,83,32,37,112,0,0,0,0,0,71,80,86,65,76,95,83,80,76,79,84,0,0,0,0,0,67,53,0,0,0,0,0,0,101,110,104,97,110,99,101,100,32,116,101,120,116,32,112,97,114,115,101,114,32,45,45,32,115,112,117,114,105,111,117,115,32,98,97,99,107,115,108,97,115,104,0,0,0,0,0,0,67,52,0,0,0,0,0,0,99,111,108,111,114,115,0,0,67,51,0,0,0,0,0,0,100,97,116,97,115,36,105,122,101,115,0,0,0,0,0,0,102,114,97,99,116,105,111,110,32,109,117,115,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,49,0,0,0,0,117,110,105,116,115,32,0,0,67,50,0,0,0,0,0,0,101,0,0,0,0,0,0,0,67,49,0,0,0,0,0,0,67,48,0,0,0,0,0,0,97,108,108,32,102,111,114,119,97,114,100,0,0,0,0,0,107,111,105,56,117,0,0,0,80,101,110,116,70,0,0,0,32,32,114,101,100,32,103,114,101,101,110,32,98,108,117,101,32,97,108,112,104,97,0,0,80,101,110,116,0,0,0,0,108,111,114,0,0,0,0,0,68,105,97,70,0,0,0,0,68,105,97,0,0,0,0,0,71,80,86,65,76,95,80,76,79,84,0,0,0,0,0,0,84,114,105,68,70,0,0,0,94,95,64,38,126,123,125,0,84,114,105,68,0,0,0,0,99,111,108,111,114,110,36,97,109,101,115,0,0,0,0,0,105,102,0,0,0,0,0,0,84,114,105,85,70,0,0,0,98,105,110,36,97,114,121,0,102,114,97,99,36,116,105,111,110,0,0,0,0,0,0,0,65,108,108,32,112,111,105,110,116,115,32,111,117,116,32,111,102,32,114,97,110,103,101,0,32,97,110,103,108,101,32,37,103,32,0,0,0,0,0,0,84,114,105,85,0,0,0,0,98,0,0,0,0,0,0,0,67,105,114,99,108,101,70,0,108,111,119,36,101,114,0,0,67,105,114,99,108,101,0,0,37,115,102,108,105,112,32,122,0,0,0,0,0,0,0,0,66,111,120,70,0,0,0,0,66,111,120,0,0,0,0,0,83,116,97,114,0,0,0,0,45,76,73,66,82,69,65,68,76,73,78,69,32,32,45,72,73,83,84,79,82,89,32,32,0,0,0,0,0,0,0,0,67,114,115,0,0,0,0,0,71,80,86,65,76,95,82,95,76,79,71,0,0,0,0,0]) -.concat([80,108,115,0,0,0,0,0,98,97,100,32,115,121,110,116,97,120,32,105,110,32,101,110,104,97,110,99,101,100,32,116,101,120,116,32,115,116,114,105,110,103,0,0,0,0,0,0,80,110,116,0,0,0,0,0,99,111,108,111,114,98,36,111,120,0,0,0,0,0,0,0,103,115,97,118,101,32,91,93,32,48,32,115,101,116,100,97,115,104,10,0,0,0,0,0,9,78,111,32,102,108,111,97,116,105,110,103,32,112,111,105,110,116,32,101,120,99,101,112,116,105,111,110,32,104,97,110,100,108,101,114,32,100,117,114,105,110,103,32,100,97,116,97,32,105,110,112,117,116,10,0,114,97,119,0,0,0,0,0,85,110,114,101,99,111,103,110,105,122,101,100,32,111,112,116,105,111,110,46,32,32,83,101,101,32,39,104,101,108,112,32,115,101,116,39,46,0,0,0,114,97,110,103,101,0,0,0,115,101,116,32,115,116,121,108,101,32,101,108,108,105,112,115,101,32,115,105,122,101,32,0,47,118,115,104,105,102,116,32,37,100,32,100,101,102,10,0,97,0,0,0,0,0,0,0,47,37,115,32,102,105,110,100,102,111,110,116,32,37,103,32,115,99,97,108,101,102,111,110,116,32,115,101,116,102,111,110,116,10,0,0,0,0,0,0,37,102,0,0,0,0,0,0,109,105,115,115,105,110,103,32,102,105,108,101,110,97,109,101,0,0,0,0,0,0,0,0,37,46,51,102,32,85,80,10,0,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,34,116,105,116,108,101,34,32,102,111,114,32,112,108,111,116,0,0,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,48,32,80,97,116,116,101,114,110,70,105,108,108,10,0,0,0,0,0,0,0,0,110,101,119,104,105,115,116,36,111,103,114,97,109,0,0,0,49,32,37,100,32,37,100,32,37,100,32,37,100,32,66,111,120,67,111,108,70,105,108,108,10,0,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,69,114,114,111,114,32,100,117,114,105,110,103,32,105,110,105,116,105,97,108,105,122,97,116,105,111,110,10,10,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,50,32,80,97,116,116,101,114,110,70,105,108,108,10,0,0,0,0,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,49,32,80,97,116,116,101,114,110,70,105,108,108,10,0,0,0,0,0,0,0,0,71,80,86,65,76,95,82,95,77,73,78,0,0,0,0,0,39,59,39,32,101,120,112,101,99,116,101,100,0,0,0,0,101,110,104,97,110,99,101,100,32,116,101,120,116,32,112,97,114,115,101,114,32,45,32,115,112,117,114,105,111,117,115,32,125,0,0,0,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,66,111,120,70,105,108,108,10,0,0,0,0,112,97,108,36,101,116,116,101,0,0,0,0,0,0,0,0,98,105,110,100,58,32,99,97,110,110,111,116,32,112,97,114,115,101,32,37,115,10,0,0,10,32,47,84,114,97,110,115,112,97,114,101,110,116,80,97,116,116,101,114,110,115,32,116,114,117,101,32,100,101,102,10,0,0,0,0,0,0,0,0,9,68,97,116,97,102,105,108,101,32,112,97,114,115,105,110,103,32,119,105,108,108,32,97,99,99,101,112,116,32,70,111,114,116,114,97,110,32,68,32,111,114,32,81,32,99,111,110,115,116,97,110,116,115,10,0,112,116,0,0,0,0,0,0,121,48,32,48,32,78,32,48,32,49,32,86,32,121,115,116,101,112,32,48,32,86,32,48,32,45,49,32,102,10,0,0,32,10,0,0,0,0,0,0,37,46,51,102,32,37,100,32,37,100,32,37,100,32,37,100,32,66,111,120,67,111,108,70,105,108,108,10,0,0,0,0,67,97,110,110,111,116,32,115,109,111,111,116,104,58,32,110,111,32,100,97,116,97,32,119,105,116,104,105,110,32,102,105,120,101,100,32,120,114,97,110,103,101,33,0,0,0,0,0,37,115,65,108,116,45,0,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,32,58,32,97,114,103,117,109,101,110,116,32,110,101,105,116,104,101,114,32,73,78,84,32,111,114,32,67,77,80,76,88,0,0,37,100,32,37,100,32,37,100,32,37,100,32,82,101,99,32,102,105,108,108,10,0,0,0,37,46,51,102,32,85,76,10,0,0,0,0,0,0,0,0,37,115,102,108,105,112,32,121,0,0,0,0,0,0,0,0,32,32,105,102,125,32,105,102,101,108,115,101,125,32,105,102,101,108,115,101,125,32,105,102,101,108,115,101,125,32,100,101,102,10,0,0,0,0,0,0,32,32,88,89,90,50,82,71,66,125,123,67,111,108,111,114,83,112,97,99,101,32,40,67,77,89,41,32,101,113,32,123,67,77,89,50,82,71,66,125,123,67,111,108,111,114,83,112,97,99,101,32,40,89,73,81,41,32,101,113,32,123,89,73,81,50,82,71,66,125,10,0,105,110,118,101,114,115,101,95,110,111,114,109,97,108,95,102,117,110,99,0,0,0,0,0,47,83,101,108,101,99,116,83,112,97,99,101,32,123,67,111,108,111,114,83,112,97,99,101,32,40,72,83,86,41,32,101,113,32,123,72,83,86,50,82,71,66,125,123,67,111,108,111,114,83,112,97,99,101,32,40,88,89,90,41,32,101,113,32,123,10,0,0,0,0,0,0,32,32,101,120,99,104,32,49,46,57,49,32,109,117,108,32,101,120,99,104,32,97,100,100,32,67,111,110,115,116,114,97,105,110,32,51,32,49,32,114,111,108,108,125,32,100,101,102,10,0,0,0,0,0,0,0,32,32,45,48,46,57,56,52,52,32,109,117,108,32,97,100,100,32,67,111,110,115,116,114,97,105,110,32,53,32,49,32,114,111,108,108,32,45,48,46,50,56,57,49,32,109,117,108,32,101,120,99,104,32,45,48,46,53,51,51,56,32,109,117,108,32,97,100,100,10,0,0,105,115,95,106,117,109,112,40,111,112,101,114,97,116,111,114,41,32,124,124,32,40,106,117,109,112,95,111,102,102,115,101,116,32,61,61,32,49,41,0,78,111,32,102,105,108,108,101,100,32,112,111,108,121,103,111,110,115,0,0,0,0,0,0,32,32,67,111,110,115,116,114,97,105,110,32,52,32,49,32,114,111,108,108,32,51,32,99,111,112,121,32,45,48,46,48,50,55,57,32,109,117,108,32,101,120,99,104,32,49,46,57,57,57,32,109,117,108,32,97,100,100,32,101,120,99,104,10,0,0,0,0,0,0,0,0,112,109,36,51,100,0,0,0,32,32,51,32,99,111,112,121,32,45,48,46,57,48,49,55,32,109,117,108,32,101,120,99,104,32,45,48,46,49,49,56,55,32,109,117,108,32,97,100,100,32,101,120,99,104,32,48,46,48,53,56,53,32,109,117,108,32,101,120,99,104,32,97,100,100,10,0,0,0,0,0,9,67,111,109,109,101,110,116,115,32,99,104,97,114,115,32,97,114,101,32,34,37,115,34,10,0,0,0,0,0,0,0,112,111,105,110,116,36,116,121,112,101,0,0,0,0,0,0,115,101,116,32,115,116,121,108,101,32,99,105,114,99,108,101,32,114,97,100,105,117,115,32,0,0,0,0,0,0,0,0,47,88,89,90,50,82,71,66,32,123,0,0,0,0,0,0,32,32,49,32,101,120,99,104,32,115,117,98,32,101,120,99,104,32,49,32,101,120,99,104,32,115,117,98,32,51,32,50,32,114,111,108,108,32,49,32,101,120,99,104,32,115,117,98,32,51,32,49,32,114,111,108,108,32,101,120,99,104,32,125,32,100,101,102,10,0,0,0,67,116,114,108,45,0,0,0,47,67,77,89,50,82,71,66,32,123,0,0,0,0,0,0,102,108,105,112,32,120,0,0,87,97,114,110,105,110,103,58,32,101,109,112,116,121,32,37,115,32,114,97,110,103,101,32,91,37,103,58,37,103,93,44,32,0,0,0,0,0,0,0,32,32,48,46,54,50,49,32,109,117,108,32,101,120,99,104,32,45,48,46,57,53,54,32,109,117,108,32,97,100,100,32,97,100,100,32,67,111,110,115,116,114,97,105,110,32,51,32,49,32,114,111,108,108,32,125,32,100,101,102,10,0,0,0,32,32,51,32,99,111,112,121,32,45,48,46,54,52,55,32,109,117,108,32,101,120,99,104,32,45,48,46,50,55,50,32,109,117,108,32,97,100,100,32,97,100,100,32,67,111,110,115,116,114,97,105,110,32,53,32,49,32,114,111,108,108,10,0,32,32,51,32,99,111,112,121,32,45,49,46,55,48,50,32,109,117,108,32,101,120,99,104,32,45,49,46,49,48,53,32,109,117,108,32,97,100,100,32,97,100,100,32,67,111,110,115,116,114,97,105,110,32,52,32,49,32,114,111,108,108,10,0,47,89,73,81,50,82,71,66,32,123,10,0,0,0,0,0,107,101,121,32,97,114,114,97,121,0,0,0,0,0,0,0,32,32,100,117,112,32,48,32,108,116,32,123,48,32,101,120,99,104,32,112,111,112,125,123,100,117,112,32,49,32,103,116,32,123,49,32,101,120,99,104,32,112,111,112,125,32,105,102,125,32,105,102,101,108,115,101,125,32,100,101,102,10,0,0,102,105,108,108,101,100,32,112,111,108,121,103,111,110,115,58,0,0,0,0,0,0,0,0,47,67,111,110,115,116,114,97,105,110,32,123,10,0,0,0,112,97,36,114,97,109,101,116,114,105,99,0,0,0,0,0,32,32,125,32,105,102,101,108,115,101,125,32,100,101,102,10,0,0,0,0,0,0,0,0,99,111,109,36,109,101,110,116,115,0,0,0,0,0,0,0,111,117,116,36,108,105,101,114,115,0,0,0,0,0,0,0,115,101,116,32,115,116,121,108,101,32,114,101,99,116,97,110,103,108,101,32,37,115,32,102,99,32,0,0,0,0,0,0,9,32,123,72,83,86,118,32,72,83,86,112,32,72,83,86,113,125,32,105,102,101,108,115,101,125,32,105,102,101,108,115,101,125,32,105,102,101,108,115,101,125,32,105,102,101,108,115,101,125,32,105,102,101,108,115,101,10,0,0,0,0,0,0,96,37,115,58,37,100,32,111,111,112,115,46,39,10,0,0,9,32,123,51,32,72,83,86,105,32,101,113,32,123,72,83,86,112,32,72,83,86,113,32,72,83,86,118,125,123,52,32,72,83,86,105,32,101,113,32,123,72,83,86,116,32,72,83,86,112,32,72,83,86,118,125,10,0,0,0,0,0,0,0,9,32,123,49,32,72,83,86,105,32,101,113,32,123,72,83,86,113,32,72,83,86,118,32,72,83,86,112,125,123,50,32,72,83,86,105,32,101,113,32,123,72,83,86,112,32,72,83,86,118,32,72,83,86,116,125,10,0,0,0,0,0,0,0,10,9,32,32,32,32,68,105,114,101,99,116,105,111,110,58,32,0,0,0,0,0,0,0,9,32,47,72,83,86,105,32,72,83,86,105,32,54,32,109,111,100,32,100,101,102,32,48,32,72,83,86,105,32,101,113,32,123,72,83,86,118,32,72,83,86,116,32,72,83,86,112,125,10,0,0,0,0,0,0,78,111,32,112,111,105,110,116,115,32,40,118,105,115,105,98,108,101,32,111,114,32,105,110,118,105,115,105,98,108,101,41,32,116,111,32,112,108,111,116,46,10,10,0,0,0,0,0,9,32,47,72,83,86,116,32,72,83,86,118,32,49,46,48,32,72,83,86,115,32,49,46,48,32,72,83,86,102,32,115,117,98,32,109,117,108,32,115,117,98,32,109,117,108,32,100,101,102,10,0,0,0,0,0,9,32,47,72,83,86,113,32,72,83,86,118,32,49,46,48,32,72,83,86,115,32,72,83,86,102,32,109,117,108,32,115,117,98,32,109,117,108,32,100,101,102,32,10,0,0,0,0,32,32,32,32,47,72,83,86,102,32,101,120,99,104,32,100,101,102,32,47,72,83,86,105,32,101,120,99,104,32,99,118,105,32,100,101,102,32,47,72,83,86,112,32,72,83,86,118,32,49,46,48,32,72,83,86,115,32,115,117,98,32,109,117,108,32,100,101,102,10,0,0,103,114,97,112,104,98,111,120,0,0,0,0,0,0,0,0,32,32,123,32,47,72,83,86,115,32,101,120,99,104,32,100,101,102,32,47,72,83,86,118,32,101,120,99,104,32,100,101,102,32,54,46,48,32,109,117,108,32,100,117,112,32,102,108,111,111,114,32,100,117,112,32,51,32,49,32,114,111,108,108,32,115,117,98,10,32,0,0,66,121,116,101,79,114,100,101,114,0,0,0,0,0,0,0,110,111,110,45,105,110,116,101,103,101,114,32,112,97,115,115,101,100,32,116,111,32,98,111,111,108,101,97,110,32,111,112,101,114,97,116,111,114,0,0,37,50,100,0,0,0,0,0,32,32,101,120,99,104,32,100,117,112,32,48,46,48,32,101,113,32,123,112,111,112,32,101,120,99,104,32,112,111,112,32,100,117,112,32,100,117,112,125,32,37,32,97,99,104,114,111,109,97,116,105,99,32,103,114,97,121,10,0,0,0,0,0,111,36,117,116,112,117,116,0,47,72,83,86,50,82,71,66,32,123,0,0,0,0,0,0,9,100,97,116,97,102,105,108,101,32,102,105,101,108,100,115,32,115,101,112,97,114,97,116,101,100,32,98,121,32,119,104,105,116,101,115,112,97,99,101,10,0,0,0,0,0,0,0,110,111,111,117,116,36,108,105,101,114,115,0,0,0,0,0,115,101,116,32,115,116,121,108,101,32,102,105,108,108,32,0,47,99,70,37,105,32,123,37,115,125,32,98,105,110,100,32,100,101,102,9,37,37,32,37,115,10,0,0,0,0,0,0,32,32,32,32,123,47,100,103,100,120,118,97,108,32,100,103,100,120,32,100,101,102,32,114,101,100,118,97,108,117,101,32,103,114,101,101,110,118,97,108,117,101,32,98,108,117,101,118,97,108,117,101,125,32,105,102,101,108,115,101,125,32,100,101,102,10,0,0,0,0,0,0,32,32,32,32,123,82,101,100,65,32,103,105,100,120,32,103,101,116,32,71,114,101,101,110,65,32,103,105,100,120,32,103,101,116,32,66,108,117,101,65,32,103,105,100,120,32,103,101,116,125,10,0,0,0,0,0,32,32,103,114,97,121,105,110,100,101,120,32,103,114,97,121,118,32,71,114,97,121,65,32,103,105,100,120,32,103,101,116,32,115,117,98,32,97,98,115,32,49,101,45,53,32,108,101,10,0,0,0,0,0,0,0,47,105,110,116,101,114,112,111,108,97,116,101,32,123,10,0,32,32,66,108,117,101,65,32,103,105,100,120,32,103,101,116,32,115,117,98,32,100,103,100,120,118,97,108,32,109,117,108,32,97,100,100,125,32,100,101,102,10,0,0,0,0,0,0,47,98,108,117,101,118,97,108,117,101,32,123,66,108,117,101,65,32,103,105,100,120,32,103,101,116,32,66,108,117,101,65,32,103,105,100,120,32,49,32,115,117,98,32,103,101,116,10,0,0,0,0,0,0,0,0,32,32,71,114,101,101,110,65,32,103,105,100,120,32,103,101,116,32,115,117,98,32,100,103,100,120,118,97,108,32,109,117,108,32,97,100,100,125,32,100,101,102,10,0,0,0,0,0,115,116,97,99,107,32,111,118,101,114,102,108,111,119,0,0,120,94,50,0,0,0,0,0,112,97,116,116,101,114,110,32,102,105,108,108,0,0,0,0,47,103,114,101,101,110,118,97,108,117,101,32,123,71,114,101,101,110,65,32,103,105,100,120,32,103,101,116,32,71,114,101,101,110,65,32,103,105,100,120,32,49,32,115,117,98,32,103,101,116,10,0,0,0,0,0,111,114,36,105,103,105,110,0,32,32,82,101,100,65,32,103,105,100,120,32,103,101,116,32,115,117,98,32,100,103,100,120,118,97,108,32,109,117,108,32,97,100,100,125,32,100,101,102,10,0,0,0,0,0,0,0,9,100,97,116,97,102,105,108,101,32,102,105,101,108,100,115,32,115,101,112,97,114,97,116,101,100,32,98,121,32,34,37,99,34,10,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,100,97,116,97,39,44,32,39,102,117,110,99,116,105,111,110,39,44,32,39,108,105,110,101,39,44,32,39,102,105,108,108,39,44,32,39,114,101,99,116,97,110,103,108,101,39,44,32,39,99,105,114,99,108,101,39,44,32,39,101,108,108,105,112,115,101,39,32,111,114,32,39,97,114,114,111,119,39,0,0,0,0,0,0,0,47,114,101,100,118,97,108,117,101,32,123,82,101,100,65,32,103,105,100,120,32,103,101,116,32,82,101,100,65,32,103,105,100,120,32,49,32,115,117,98,32,103,101,116,10,0,0,0,96,37,115,39,10,0,0,0,32,32,71,114,97,121,65,32,103,105,100,120,32,103,101,116,32,115,117,98,32,100,105,118,125,32,100,101,102,32,10,0,47,100,103,100,120,32,123,103,114,97,121,118,32,71,114,97,121,65,32,103,105,100,120,32,103,101,116,32,115,117,98,32,71,114,97,121,65,32,103,105,100,120,32,49,32,115,117,98,32,103,101,116,10,0,0,0,32,32,123,71,114,97,121,65,32,103,105,100,120,32,103,101,116,32,103,114,97,121,118,32,103,101,32,123,101,120,105,116,125,32,105,102,32,47,103,105,100,120,32,103,105,100,120,32,49,32,97,100,100,32,100,101,102,125,32,108,111,111,112,125,32,100,101,102,10,0,0,0,47,103,114,97,121,105,110,100,101,120,32,123,47,103,105,100,120,32,48,32,100,101,102,10,0,0,0,0,0,0,0,0,93,32,100,101,102,10,0,0,47,37,115,32,91,0,0,0,66,108,117,101,65,0,0,0,78,111,110,45,110,117,109,101,114,105,99,32,115,116,114,105,110,103,32,102,111,117,110,100,32,119,104,101,114,101,32,97,32,110,117,109,101,114,105,99,32,101,120,112,114,101,115,115,105,111,110,32,119,97,115,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,0,0,116,97,103,32,109,117,115,116,32,98,101,32,62,32,122,101,114,111,0,0,0,0,0,0,108,105,110,101,119,105,100,116,104,0,0,0,0,0,0,0,71,114,101,101,110,65,0,0,111,102,36,102,115,101,116,115,0,0,0,0,0,0,0,0,82,101,100,65,0,0,0,0,115,101,112,36,97,114,97,116,111,114,0,0,0,0,0,0,117,36,115,101,114,115,116,121,108,101,115,0,0,0,0,0,71,114,97,121,65,0,0,0,37,99,32,0,0,0,0,0,32,100,101,102,10,0,0,0,37,115,58,37,100,32,111,111,111,112,115,58,32,85,110,107,110,111,119,110,32,99,111,108,111,114,32,109,111,100,101,108,32,39,37,99,39,46,32,87,105,108,108,32,98,101,32,82,71,66,10,0,0,0,0,0,10,9,32,32,32,32,71,101,110,101,114,97,116,101,32,99,111,111,114,100,105,110,97,116,101,115,58,32,37,115,0,0,40,88,89,90,41,0,0,0,40,89,73,81,41,0,0,0,37,45,49,53,46,49,53,115,32,61,32,37,45,49,53,46,49,53,115,32,32,32,37,115,0,0,0,0,0,0,0,0,40,67,77,89,41,0,0,0,40,72,83,86,41,0,0,0,40,82,71,66,41,0,0,0,115,116,97,99,107,32,117,110,100,101,114,102,108,111,119,32,40,102,117,110,99,116,105,111,110,32,99,97,108,108,32,119,105,116,104,32,109,105,115,115,105,110,103,32,112,97,114,97,109,101,116,101,114,115,63,41,0,0,0,0,0,0,0,0,32,32,108,119,32,37,49,100,37,99,0,0,0,0,0,0,47,67,111,108,111,114,83,112,97,99,101,32,0,0,0,0,120,37,100,0,0,0,0,0,110,111,109,99,98,116,36,105,99,115,0,0,0,0,0,0,32,32,47,103,32,123,115,116,114,111,107,101,32,112,109,51,100,114,111,117,110,100,32,112,109,51,100,71,97,109,109,97,32,101,120,112,32,115,101,116,103,114,97,121,125,32,98,105,110,100,32,100,101,102,10,0,9,34,37,115,34,32,105,110,32,100,97,116,97,102,105,108,101,32,105,115,32,105,110,116,101,114,112,114,101,116,101,100,32,97,115,32,109,105,115,115,105,110,103,32,118,97,108,117,101,10,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,117,110,105,116,115,32,123,120,121,124,120,120,124,121,121,125,39,44,32,39,97,110,103,108,101,32,60,110,117,109,98,101,114,62,39,32,111,114,32,39,115,105,122,101,32,60,112,111,115,105,116,105,111,110,62,39,0,0,0,0,0,115,101,116,32,98,111,120,119,105,100,116,104,32,37,103,32,37,115,10,0,0,0,0,0,125,123,10,0,0,0,0,0,32,37,45,49,50,115,32,0,32,32,125,32,105,102,101,108,115,101,10,0,0,0,0,0,10,32,32,32,32,32,32,32,83,101,108,101,99,116,83,112,97,99,101,32,115,101,116,114,103,98,99,111,108,111,114,125,32,98,105,110,100,32,100,101,102,10,0,0,0,0,0,0,103,112,95,105,110,112,117,116,95,108,105,110,101,0,0,0,99,70,37,105,32,67,111,110,115,116,114,97,105,110,32,0,99,70,37,105,32,67,111,110,115,116,114,97,105,110,32,101,120,99,104,32,0,0,0,0,36,40,0,0,0,0,0,0,99,70,37,105,32,67,111,110,115,116,114,97,105,110,32,101,120,99,104,32,100,117,112,32,0,0,0,0,0,0,0,0,70,111,114,109,97,116,32,99,104,97,114,97,99,116,101,114,32,109,105,115,109,97,116,99,104,58,32,37,37,99,32,105,115,32,111,110,108,121,32,118,97,108,105,100,32,119,105,116,104,32,37,37,115,0,0,0,49,32,101,120,99,104,32,115,117,98,32,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,100,97,116,97,39,44,32,39,102,117,110,99,116,105,111,110,39,44,32,39,108,105,110,101,39,44,32,39,102,105,108,108,39,32,111,114,32,39,97,114,114,111,119,39,0,112,109,0,0,0,0,0,0,32,32,47,103,32,123,115,116,114,111,107,101,32,112,109,51,100,114,111,117,110,100,32,100,117,112,32,0,0,0,0,0,10,119,97,114,110,105,110,103,58,32,32,105,110,116,101,114,110,97,108,32,101,114,114,111,114,45,45,115,116,97,99,107,32,110,111,116,32,101,109,112,116,121,33,10,32,32,32,32,32,32,32,32,32,32,40,102,117,110,99,116,105,111,110,32,99,97,108,108,101,100,32,119,105,116,104,32,116,111,111,32,109,97,110,121,32,112,97,114,97,109,101,116,101,114,115,63,41,10,0,0,0,0,0,0,37,100,0,0,0,0,0,0,32,32,125,123,10,0,0,0,73,110,102,0,0,0,0,0,109,99,98,116,36,105,99,115,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,83,101,108,101,99,116,83,112,97,99,101,32,115,101,116,114,103,98,99,111,108,111,114,125,32,98,105,110,100,32,100,101,102,10,0,0,0,0,0,0,9,78,111,32,109,105,115,115,105,110,103,32,100,97,116,97,32,115,116,114,105,110,103,32,115,101,116,32,102,111,114,32,100,97,116,97,102,105,108,101,10,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,39,120,121,39,44,32,39,120,120,39,32,111,114,32,39,121,121,39,0,0,0,0,115,101,116,32,98,111,120,119,105,100,116,104,10,0,0,0,32,32,32,32,47,103,32,123,115,116,114,111,107,101,32,112,109,51,100,114,111,117,110,100,32,47,103,114,97,121,118,32,101,120,99,104,32,100,101,102,32,105,110,116,101,114,112,111,108,97,116,101,10,0,0,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,42,32,105,110,100,105,99,97,116,101,115,32,116,104,105,115,32,107,101,121,32,105,115,32,97,99,116,105,118,101,32,102,114,111,109,32,97,108,108,32,112,108,111,116,32,119,105,110,100,111,119,115,10,0,0,0,0,0,32,32,73,110,116,101,114,112,111,108,97,116,101,100,67,111,108,111,114,32,123,32,37,37,32,73,110,116,101,114,112,111,108,97,116,105,111,110,32,118,115,46,32,82,71,66,45,70,111,114,109,117,108,97,10,0,67,111,108,111,114,32,73,110,116,101,114,112,111,108,97,116,101,100,67,111,108,111,114,32,111,114,32,123,32,37,32,67,79,76,79,85,82,32,118,115,46,32,71,82,65,89,32,109,97,112,10,0,0,0,0,0,101,10,0,0,0,0,0,0,107,111,105,56,114,0,0,0,102,97,108,115,101,32,123,32,37,32,67,79,76,79,85,82,32,118,115,46,32,71,82,65,89,32,109,97,112,10,0,0,32,32,112,105,120,101,108,0,47,112,109,51,100,71,97,109,109,97,32,49,46,48,32,37,103,32,71,97,109,109,97,32,109,117,108,32,100,105,118,32,100,101,102,10,0,0,0,0,117,109,105,110,117,115,0,0,9,123,112,111,112,32,49,125,32,123,109,97,120,99,111,108,111,114,115,32,109,117,108,32,102,108,111,111,114,32,109,97,120,99,111,108,111,114,115,32,49,32,115,117,98,32,100,105,118,125,32,105,102,101,108,115,101,125,32,105,102,125,32,100,101,102,10,0,0,0,0,0,47,112,109,51,100,114,111,117,110,100,32,123,109,97,120,99,111,108,111,114,115,32,48,32,103,116,32,123,100,117,112,32,49,32,103,101,10,0,0,0,46,46,47,116,101,114,109,47,112,111,115,116,46,116,114,109,0,0,0,0,0,0,0,0,117,110,107,110,111,119,110,32,116,121,112,101,32,105,110,32,97,110,103,108,101,40,41,0,115,104,111,119,32,116,105,99,115,99,97,108,101,0,0,0,37,115,58,37,100,32,111,111,111,112,115,58,32,85,110,107,110,111,119,110,32,99,111,108,111,114,32,109,111,100,101,32,39,37,99,39,10,0,0,0,110,111,109,122,116,36,105,99,115,0,0,0,0,0,0,0,9,32,32,32,32,68,105,109,101,110,115,105,111,110,58,32,0,0,0,0,0,0,0,0,104,105,36,115,116,111,114,121,0,0,0,0,0,0,0,0,47,73,110,116,101,114,112,111,108,97,116,101,100,67,111,108,111,114,32,116,114,117,101,32,100,101,102,10,0,0,0,0,109,105,115,115,36,105,110,103,0,0,0,0,0,0,0,0,121,121,0,0,0,0,0,0,47,73,110,116,101,114,112,111,108,97,116,101,100,67,111,108,111,114,32,102,97,108,115,101,32,100,101,102,10,0,0,0,37,48,46,52,102,9,37,48,46,52,102,10,0,0,0,0,99,108,111,115,101,32,116,104,105,115,32,112,108,111,116,32,119,105,110,100,111,119,0,0,47,109,97,120,99,111,108,111,114,115,32,37,105,32,100,101,102,10,0,0,0,0,0,0,103,115,97,118,101,32,37,32,99,111,108,111,117,114,32,112,97,108,101,116,116,101,32,98,101,103,105,110,10,0,0,0,37,115,32,104,97,115,32,37,115,32,99,111,111,114,100,32,111,102,32,37,103,59,32,109,117,115,116,32,98,101,32,97,98,111,118,101,32,48,32,102,111,114,32,108,111,103,32,115,99,97,108,101,33,0,0,0,103,114,101,115,116,111,114,101,32,37,32,99,111,108,111,117,114,32,112,97,108,101,116,116,101,32,101,110,100,10,0,0,37,115,32,103,32,0,0,0,49,32,103,32,0,0,0,0,45,82,69,65,68,76,73,78,69,32,32,0,0,0,0,0,48,32,103,32,0,0,0,0,37,51,46,50,102,32,37,51,46,50,102,32,37,51,46,50,102,32,67,32,0,0,0,0,117,110,107,110,111,119,110,32,116,121,112,101,32,105,110,32,109,97,103,110,105,116,117,100,101,40,41,0,0,0,0,0,99,97,110,39,116,32,114,111,116,97,116,101,32,116,101,120,116,0,0,0,0,0,0,0,76,67,37,49,99,32,115,101,116,114,103,98,99,111,108,111,114,10,0,0,0,0,0,0,105,110,118,97,108,105,100,32,99,111,109,112,108,101,120,32,99,111,110,115,116,97,110,116,0,0,0,0,0,0,0,0,109,122,116,36,105,99,115,0,10,9,32,32,82,101,99,111,114,100,32,37,100,58,10,0,80,76,32,0,0,0,0,0,9,109,111,117,115,101,32,105,115,32,111,102,102,10,0,0,101,120,112,101,99,116,105,110,103,32,100,97,116,97,102,105,108,101,32,109,111,100,105,102,105,101,114,0,0,0,0,0,112,110,103,0,0,0,0,0,120,120,0,0,0,0,0,0,115,101,116,32,37,115,100,97,116,97,32,37,115,10,0,0,32,80,97,116,116,101,114,110,37,100,32,102,105,108,108,32,103,114,101,115,116,111,114,101,10,0,0,0,0,0,0,0,113,0,0,0,0,0,0,0,32,37,46,49,102,32,80,111,108,121,70,105,108,108,10,0,32,47,84,114,97,110,115,112,97,114,101,110,116,80,97,116,116,101,114,110,115,32,116,114,117,101,32,100,101,102,10,0,32,37,46,50,102,32,80,111,108,121,70,105,108,108,10,0,32,49,32,80,111,108,121,70,105,108,108,10,0,0,0,0,32,37,105,32,37,105,32,76,0,0,0,0,0,0,0,0,10,84,101,114,109,105,110,97,108,32,116,121,112,101,32,115,101,116,32,116,111,32,39,37,115,39,10,0,0,0,0,0,32,37,105,32,37,105,32,86,0,0,0,0,0,0,0,0,103,115,97,118,101,32,0,0,117,110,107,110,111,119,110,32,116,121,112,101,32,105,110,32,105,109,97,103,40,41,0,0,32,114,111,116,97,116,101,100,32,98,121,32,45,52,53,32,100,101,103,0,0,0,0,0,32,37,105,32,37,105,32,37,105,32,37,105,32,37,105,32,37,105,32,104,10,0,0,0,110,111,109,121,50,116,36,105,99,115,0,0,0,0,0,0,10,9,32,32,68,101,102,97,117,108,116,32,98,105,110,97,114,121,32,102,111,114,109,97,116,58,32,37,115,0,0,0,99,116,114,108,45,0,0,0,37,105,32,37,105,32,78,0,110,111,116,32,0,0,0,0,42,114,101,116,117,114,110,95,110,117,109,95,98,121,116,101,115,32,60,61,32,109,97,120,95,101,110,99,111,100,101,100,95,98,121,116,101,115,0,0,117,110,105,116,36,115,0,0,48,32,121,48,32,78,32,49,32,48,32,86,32,48,32,121,115,116,101,112,32,86,32,45,49,32,48,32,102,10,0,0,115,101,116,32,116,105,109,101,102,109,116,32,37,115,32,34,37,115,34,10,0,0,0,0,112,100,112,32,40,109,105,100,100,108,101,41,0,0,0,0,85,110,101,120,112,101,99,116,101,100,32,125,0,0,0,0,102,105,118,101,95,100,105,97,103,32,104,101,108,112,32,118,97,114,115,0,0,0,0,0,32,37,45,49,50,115,32,42,32,37,115,10,0,0,0,0,126,62,0,0,0,0,0,0,115,116,114,95,99,111,110,115,116,0,0,0,0,0,0,0,37,49,120,0,0,0,0,0,44,32,39,45,39,32,119,32,108,32,116,105,116,108,101,32,39,78,84,83,67,39,32,108,116,32,45,49,0,0,0,0,101,110,99,111,100,101,100,32,105,109,97,103,101,0,0,0,37,115,105,109,97,103,101,10,0,0,0,0,0,0,0,0,37,115,102,97,108,115,101,32,51,10,37,115,99,111,108,111,114,105,109,97,103,101,10,0,32,32,99,117,114,114,101,110,116,102,105,108,101,32,47,65,83,67,73,73,56,53,68,101,99,111,100,101,32,102,105,108,116,101,114,10,0,0,0,0,68,105,100,32,121,111,117,32,116,114,121,32,116,111,32,103,101,110,101,114,97,116,101,32,97,32,102,105,108,101,32,110,97,109,101,32,117,115,105,110,103,32,100,117,109,109,121,32,118,97,114,105,97,98,108,101,32,120,32,111,114,32,121,63,0,0,0,0,0,0,0,0,32,114,111,116,97,116,101,100,32,98,121,32,43,52,53,32,100,101,103,0,0,0,0,0,123,99,117,114,114,101,110,116,102,105,108,101,32,105,109,97,103,101,98,117,102,32,114,101,97,100,104,101,120,115,116,114,105,110,103,32,112,111,112,125,10,0,0,0,0,0,0,0,109,121,50,116,36,105,99,115,0,0,0,0,0,0,0,0,10,9,32,32,70,105,108,101,32,69,110,100,105,97,110,110,101,115,115,58,32,37,115,0,47,105,109,97,103,101,98,117,102,32,37,100,32,115,116,114,105,110,103,32,100,101,102,10,0,0,0,0,0,0,0,0,9,99,111,109,109,117,110,105,99,97,116,105,111,110,32,99,111,109,109,97,110,100,115,32,119,105,108,108,32,37,115,98,101,32,115,104,111,119,110,10,0,0,0,0,0,0,0,0,97,110,103,36,108,101,0,0,58,32,0,0,0,0,0,0,117,110,115,101,116,32,98,111,114,100,101,114,10,0,0,0,37,115,91,32,37,100,32,48,32,48,32,37,100,32,48,32,48,32,93,10,0,0,0,0,114,97,105,115,101,32,103,110,117,112,108,111,116,32,99,111,110,115,111,108,101,32,119,105,110,100,111,119,0,0,0,0,37,115,37,100,32,37,100,32,37,100,10,0,0,0,0,0,37,115,37,100,32,37,100,32,115,99,97,108,101,10,0,0,98,108,117,101,39,119,32,108,32,108,116,32,51,32,108,99,32,114,103,98,32,39,98,108,117,101,39,0,0,0,0,0,121,0,0,0,0,0,0,0,37,115,37,100,32,37,100,32,116,114,97,110,115,108,97,116,101,10,0,0,0,0,0,0,37,115,123,112,109,51,100,71,97,109,109,97,32,101,120,112,125,32,115,101,116,116,114,97,110,115,102,101,114,10,0,0,9,32,32,87,105,108,108,32,37,115,117,115,101,32,111,116,104,101,114,32,100,105,97,103,111,110,97,108,32,105,102,32,105,116,32,103,105,118,101,115,32,97,32,108,101,115,115,32,106,97,103,103,121,32,111,117,116,108,105,110,101,10,9,32,32,87,105,108,108,32,37,115,100,114,97,119,32,100,105,97,103,111,110,97,108,32,118,105,115,105,98,108,121,32,105,102,32,113,117,97,100,114,97,110,103,108,101,32,105,115,32,39,98,101,110,116,32,111,118,101,114,39,10,0,0,0,0,0,37,115,103,115,97,118,101,10,0,0,0,0,0,0,0,0,37,37,37,37,69,110,100,73,109,97,103,101,10,0,0,0,99,111,110,116,111,117,114,32,101,100,103,101,0,0,0,0,103,114,101,115,116,111,114,101,10,0,0,0,0,0,0,0,101,110,99,111,117,110,116,101,114,101,100,32,97,32,115,116,114,105,110,103,32,119,104,101,110,32,101,120,112,101,99,116,105,110,103,32,97,32,110,117,109,98,101,114,0,0,0,0,114,111,116,97,116,101,100,32,99,101,43,110,116,114,101,100,32,116,101,120,116,0,0,0,10,73,110,116,101,114,112,114,101,116,76,101,118,101,108,49,32,110,111,116,32,123,10,32,32,103,114,101,115,116,111,114,101,10,125,32,105,102,10,0,110,111,109,121,116,36,105,99,115,0,0,0,0,0,0,0,10,103,114,101,115,116,111,114,101,10,0,0,0,0,0,0,9,122,111,111,109,106,117,109,112,32,105,115,32,37,115,10,0,0,0,0,0,0,0,0,115,101,116,32,98,111,114,100,101,114,32,37,100,32,37,115,0,0,0,0,0,0,0,0,32,32,47,73,110,116,101,114,112,111,108,97,116,101,32,102,97,108,115,101,10,62,62,10,105,109,97,103,101,10,0,0,83,112,97,99,101,0,0,0,32,32,47,77,117,108,116,105,112,108,101,68,97,116,97,83,111,117,114,99,101,115,32,102,97,108,115,101,10,0,0,0,32,32,47,68,97,116,97,83,111,117,114,99,101,32,99,117,114,114,101,110,116,102,105,108,101,32,47,65,83,67,73,73,56,53,68,101,99,111,100,101,32,102,105,108,116,101,114,10,0,0,0,0,0,0,0,0,103,114,101,101,110,39,119,32,108,32,108,116,32,50,32,108,99,32,114,103,98,32,39,103,114,101,101,110,39,0,0,0,32,32,47,68,97,116,97,83,111,117,114,99,101,32,123,99,117,114,114,101,110,116,102,105,108,101,32,105,109,97,103,101,98,117,102,32,114,101,97,100,104,101,120,115,116,114,105,110,103,32,112,111,112,125,10,0,112,118,101,114,116,0,0,0,32,32,47,68,101,99,111,100,101,32,91,32,48,32,37,100,32,93,10,0,0,0,0,0,32,32,47,66,105,116,115,80,101,114,67,111,109,112,111,110,101,110,116,32,37,100,10,32,32,47,73,109,97,103,101,77,97,116,114,105,120,32,91,32,37,100,32,48,32,48,32,37,100,32,48,32,48,32,93,10,0,0,0,0,0,0,0,0,32,61,9,10,0,0,0,0,60,60,10,32,32,47,73,109,97,103,101,84,121,112,101,32,49,10,32,32,47,87,105,100,116,104,32,37,100,10,32,32,47,72,101,105,103,104,116,32,37,100,10,0,0,0,0,0,115,116,0,0,0,0,0,0,37,37,37,37,69,110,100,80,97,108,101,116,116,101,10,0,117,110,107,110,111,119,110,32,116,121,112,101,32,105,110,32,114,101,97,108,40,41,0,0,10,32,32,62,10,93,32,115,101,116,99,111,108,111,114,115,112,97,99,101,10,0,0,0,114,105,103,104,116,32,106,117,115,116,105,102,105,101,100,0,68,97,116,97,84,121,112,101,0,0,0,0,0,0,0,0,109,121,116,36,105,99,115,0,32,37,50,46,50,120,37,50,46,50,120,37,50,46,50,120,0,0,0,0,0,0,0,0,9,66,117,116,116,111,110,32,50,32,100,114,97,119,115,32,116,101,109,112,111,114,97,114,121,32,108,97,98,101,108,115,10,0,0,0,0,0,0,0,114,36,97,100,105,117,115,0,117,110,0,0,0,0,0,0,91,32,47,73,110,100,101,120,101,100,10,32,32,47,68,101,118,105,99,101,82,71,66,32,37,100,10,32,32,60,0,0,32,37,45,49,50,115,32,32,32,37,115,10,0,0,0,0,37,37,37,37,66,101,103,105,110,80,97,108,101,116,116,101,10,0,0,0,0,0,0,0,37,100,32,37,100,32,115,99,97,108,101,10,0,0,0,0,114,101,100,39,119,32,108,32,108,116,32,49,32,108,99,32,114,103,98,32,39,114,101,100,39,0,0,0,0,0,0,0,37,100,32,37,100,32,116,114,97,110,115,108,97,116,101,10,0,0,0,0,0,0,0,0,103,115,97,118,101,10,0,0,125,32,123,10,0,0,0,0,67,111,117,108,100,32,110,111,116,32,114,101,110,97,109,101,32,102,105,108,101,32,37,115,32,116,111,32,37,115,0,0,32,32,52,48,32,45,49,49,48,32,82,10,32,32,40,80,83,32,108,101,118,101,108,32,50,32,105,109,97,103,101,41,32,76,115,104,111,119,10,32,32,37,37,32,82,101,97,100,32,100,97,116,97,32,98,117,116,32,105,103,110,111,114,101,32,105,116,10,32,32,47,105,109,97,103,101,98,117,102,32,37,100,32,115,116,114,105,110,103,32,100,101,102,10,32,32,99,117,114,114,101,110,116,102,105,108,101,32,105,109,97,103,101,98,117,102,32,114,101,97,100,115,116,114,105,110,103,10,0,0,0,0,0,0,0,0,125,32,105,102,101,108,115,101,10,0,0,0,0,0,0,0,105,115,111,32,99,117,114,118,101,0,0,0,0,0,0,0,118,97,108,117,101,0,0,0,100,117,112,32,109,117,108,0,99,101,110,116,114,101,43,100,32,116,101,120,116,0,0,0,32,32,99,117,114,114,101,110,116,102,105,108,101,32,105,109,97,103,101,98,117,102,32,114,101,97,100,115,116,114,105,110,103,10,125,32,123,10,0,0,110,111,109,120,50,116,36,105,99,115,0,0,0,0,0,0,10,9,32,32,70,105,108,101,32,84,121,112,101,58,32,0,32,32,47,105,109,97,103,101,98,117,102,32,37,100,32,115,116,114,105,110,103,32,100,101,102,10,0,0,0,0,0,0,9,66,117,116,116,111,110,32,50,32,100,114,97,119,115,32,112,101,114,115,105,115,116,101,110,116,32,108,97,98,101,108,115,32,119,105,116,104,32,111,112,116,105,111,110,115,32,34,37,115,34,10,0,0,0,0,115,116,121,108,101,32,110,111,116,32,117,115,97,98,108,101,32,102,111,114,32,102,117,110,99,116,105,111,110,32,112,108,111,116,115,44,32,108,101,102,116,32,117,110,99,104,97,110,103,101,100,0,0,0,0,0,37,115,115,101,116,32,99,108,105,112,32,112,111,105,110,116,115,10,37,115,115,101,116,32,99,108,105,112,32,111,110,101,10,37,115,115,101,116,32,99,108,105,112,32,116,119,111,10,115,101,116,32,98,97,114,32,37,102,32,37,115,10,0,0,32,32,52,48,32,45,49,49,48,32,82,10,32,32,40,80,83,32,108,101,118,101,108,32,50,32,105,109,97,103,101,41,32,76,115,104,111,119,10,32,32,37,32,82,101,97,100,32,100,97,116,97,32,98,117,116,32,105,103,110,111,114,101,32,105,116,10,0,0,0,0,0,101,120,112,97,110,100,105,110,103,32,99,117,114,118,101,32,112,111,105,110,116,115,0,0,122,111,111,109,32,111,117,116,32,111,110,108,121,32,116,104,101,32,88,32,97,120,105,115,46,0,0,0,0,0,0,0,32,32,37,100,32,37,100,32,76,10,0,0,0,0,0,0,32,32,48,32,37,100,32,86,10,0,0,0,0,0,0,0,39,45,39,116,105,116,39,0,32,32,37,100,32,48,32,86,10,0,0,0,0,0,0,0,32,32,37,100,32,37,100,32,77,10,0,0,0,0,0,0,45,45,118,101,114,115,105,111,110,0,0,0,0,0,0,0,73,110,116,101,114,112,114,101,116,76,101,118,101,108,49,32,123,10,32,32,37,37,32,67,111,110,115,116,114,117,99,116,32,97,32,98,111,120,32,105,110,115,116,101,97,100,32,111,102,32,105,109,97,103,101,10,32,32,76,84,98,10,0,0,46,111,108,100,0,0,0,0,103,115,97,118,101,32,37,100,32,37,100,32,78,32,37,100,32,37,100,32,76,32,37,100,32,37,100,32,76,32,37,100,32,37,100,32,76,32,90,32,99,108,105,112,10,0,0,0,37,37,37,37,66,101,103,105,110,73,109,97,103,101,10,0,101,120,105,115,116,115,0,0,108,101,102,116,32,106,117,115,116,105,102,105,101,100,0,0,71,78,85,80,76,79,84,32,40,112,111,115,116,46,116,114,109,41,58,32,32,67,111,109,112,111,110,101,110,116,32,98,105,116,115,32,40,37,100,41,32,111,117,116,32,111,102,32,114,97,110,103,101,46,10,0,109,120,50,116,36,105,99,115,0,0,0,0,0,0,0,0,9,68,101,102,97,117,108,116,32,98,105,110,97,114,121,32,100,97,116,97,32,102,105,108,101,32,115,101,116,116,105,110,103,115,32,40,105,110,45,102,105,108,101,32,115,101,116,116,105,110,103,115,32,109,97,121,32,111,118,101,114,114,105,100,101,41,58,10,0,0,0,0,47,37,115,32,37,115,0,0,9,97,108,116,101,114,110,97,116,105,118,101,32,102,111,114,109,97,116,32,102,111,114,32,66,117,116,116,111,110,32,50,32,105,115,32,39,37,115,39,10,0,0,0,0,0,0,0,99,97,110,110,111,116,32,111,112,101,110,32,116,97,98,108,101,32,111,117,116,112,117,116,32,102,105,108,101,0,0,0,35,32,115,101,116,32,116,101,114,109,105,110,97,108,32,117,110,107,110,111,119,110,10,0,114,101,101,110,99,111,100,101,75,79,73,56,85,32,100,101,102,10,0,0,0,0,0,0,60,115,104,105,102,116,45,99,111,110,116,114,111,108,45,119,104,101,101,108,45,100,111,119,110,62,0,0,0,0,0,0,114,101,101,110,99,111,100,101,67,80,49,50,53,49,32,100,101,102,10,0,0,0,0,0,114,101,101,110,99,111,100,101,67,80,49,50,53,48,32,100,101,102,10,0,0,0,0,0,114,101,101,110,99,111,100,101,75,79,73,56,82,32,100,101,102,10,0,0,0,0,0,0,99,111,110,115,116,97,110,116,32,101,120,112,114,101,115,115,105,111,110,32,114,101,113,117,105,114,101,100,0,0,0,0,114,101,101,110,99,111,100,101,67,80,56,53,50,32,100,101,102,10,0,0,0,0,0,0,114,101,101,110,99,111,100,101,67,80,56,53,48,32,100,101,102,10,0,0,0,0,0,0,70,73,84,95,76,73,77,73,84,0,0,0,0,0,0,0,114,101,101,110,99,111,100,101,67,80,52,51,55,32,100,101,102,10,0,0,0,0,0,0,118,101,99,0,0,0,0,0,114,101,101,110,99,111,100,101,73,83,79,49,53,32,100,101,102,10,0,0,0,0,0,0,101,120,105,115,116,0,0,0]) -.concat([115,101,116,32,116,101,114,109,111,112,116,32,110,111,101,110,104,0,0,0,0,0,0,0,114,101,101,110,99,111,100,101,73,83,79,57,32,100,101,102,10,0,0,0,0,0,0,0,110,111,109,120,116,36,105,99,115,0,0,0,0,0,0,0,100,97,116,97,102,105,108,101,32,99,111,108,117,109,110,115,32,98,105,110,97,114,121,32,105,110,102,111,114,109,97,116,105,111,110,0,0,0,0,0,114,101,101,110,99,111,100,101,73,83,79,50,32,100,101,102,10,0,0,0,0,0,0,0,9,102,111,114,109,97,116,32,102,111,114,32,66,117,116,116,111,110,32,50,32,105,115,32,37,100,10,0,0,0,0,0,35,32,115,101,116,32,116,101,114,109,105,110,97,108,32,37,115,32,37,115,10,0,0,0,114,101,101,110,99,111,100,101,73,83,79,32,100,101,102,10,0,0,0,0,0,0,0,0,122,111,111,109,32,105,110,32,111,110,108,121,32,116,104,101,32,88,32,97,120,105,115,46,0,0,0,0,0,0,0,0,80,111,115,116,83,99,114,105,112,116,32,70,111,110,116,32,114,101,99,111,114,100,0,0,123,125,91,93,40,41,32,0,99,97,110,110,111,116,32,119,114,105,116,101,32,116,101,109,112,111,114,97,114,121,32,102,105,108,101,0,0,0,0,0,83,121,109,98,111,108,45,79,98,108,105,113,117,101,0,0,37,115,40,0,0,0,0,0,71,78,85,80,76,79,84,95,70,79,78,84,80,65,84,72,0,0,0,0,0,0,0,0,91,40,37,115,41,32,37,46,49,102,32,37,46,49,102,32,37,115,32,37,115,32,37,100,32,0,0,0,0,0,0,0,70,73,84,95,77,65,88,73,84,69,82,0,0,0,0,0,70,111,114,109,97,116,32,99,104,97,114,97,99,116,101,114,32,109,105,115,109,97,116,99,104,58,32,37,37,83,32,105,115,32,111,110,108,121,32,118,97,108,105,100,32,119,105,116,104,32,37,37,115,0,0,0,69,78,72,80,83,95,111,112,101,110,115,101,113,117,101,110,99,101,0,0,0,0,0,0,71,78,85,84,69,82,77,0,97,109,0,0,0,0,0,0,88,89,114,101,115,116,111,114,101,10,0,0,0,0,0,0,115,121,115,116,101,109,0,0,69,110,104,97,110,99,101,100,32,116,101,120,116,58,32,32,32,123,120,64,95,123,48,125,94,123,110,43,49,125,125,0,88,89,115,97,118,101,10,0,109,120,116,36,105,99,115,0,99,111,108,32,62,32,48,0,41,93,10,0,0,0,0,0,9,97,108,116,101,114,110,97,116,105,118,101,32,102,111,114,109,97,116,32,102,111,114,32,66,117,116,116,111,110,32,49,32,105,115,32,39,37,115,39,10,0,0,0,0,0,0,0,79,112,116,105,111,110,115,32,97,114,101,32,39,37,115,39,10,0,0,0,0,0,0,0,37,115,37,103,44,32,37,115,37,103,44,32,37,115,37,103,0,0,0,0,0,0,0,0,117,110,105,37,48,52,108,88,0,0,0,0,0,0,0,0,60,115,104,105,102,116,45,99,111,110,116,114,111,108,45,119,104,101,101,108,45,117,112,62,0,0,0,0,0,0,0,0,117,37,108,88,0,0,0,0,37,115,47,0,0,0,0,0,99,111,109,98,105,110,97,116,105,111,110,32,114,103,98,32,111,114,32,103,98,114,32,111,114,32,98,114,103,32,101,116,99,46,32,101,120,112,101,99,116,101,100,0,0,0,0,0,37,37,32,69,110,100,32,112,108,111,116,32,35,37,100,10,0,0,0,0,0,0,0,0,99,112,49,50,53,52,0,0,105,110,116,101,114,112,111,108,97,116,105,111,110,32,116,97,98,108,101,0,0,0,0,0,32,100,101,108,116,97,95,120,32,100,101,108,116,97,95,121,0,0,0,0,0,0,0,0,37,37,32,66,101,103,105,110,32,112,108,111,116,32,35,37,100,10,0,0,0,0,0,0,98,110,111,116,0,0,0,0,115,116,114,111,107,101,10,0,70,73,84,95,83,84,65,82,84,95,76,65,77,66,68,65,0,0,0,0,0,0,0,0,94,80,89,94,45,10,94,73,79,76,10,94,73,83,89,78,84,65,88,48,48,48,48,48,94,70,94,73,66,49,49,48,48,48,94,73,74,48,48,48,48,48,94,73,84,48,48,48,48,48,10,0,0,0,0,0,94,80,78,94,45,10,0,0,116,101,115,116,32,111,102,32,99,104,97,114,97,99,116,101,114,32,119,105,100,116,104,58,0,0,0,0,0,0,0,0,94,73,71,69,10,94,45,94,44,0,0,0,0,0,0,0,109,117,108,116,105,36,112,108,111,116,0,0,0,0,0,0,69,114,114,111,114,32,97,115,115,105,103,110,105,110,103,32,109,101,109,111,114,121,32,102,111,114,32,98,105,110,97,114,121,32,102,105,108,101,32,100,97,116,97,32,114,101,99,111,114,100,115,0,0,0,0,0,63,0,0,0,0,0,0,0,94,73,71,86,10,0,0,0,9,102,111,114,109,97,116,32,102,111,114,32,66,117,116,116,111,110,32,49,32,105,115,32,37,100,10,0,0,0,0,0,112,111,112,0,0,0,0,0,98,97,100,32,100,97,116,97,32,111,110,32,108,105,110,101,32,37,100,32,111,102,32,102,105,108,101,32,37,115,0,0,32,111,102,102,115,101,116,32,0,0,0,0,0,0,0,0,94,85,37,48,53,100,58,37,48,53,100,10,0,0,0,0,32,122,111,111,109,32,111,117,116,46,0,0,0,0,0,0,94,68,37,48,53,100,58,37,48,53,100,10,0,0,0,0,73,108,108,101,103,97,108,32,115,101,101,100,32,118,97,108,117,101,0,0,0,0,0,0,94,86,48,10,0,0,0,0,94,80,86,51,48,50,49,48,48,94,71,10,94,86,51,10,0,0,0,0,0,0,0,0,94,80,86,50,48,50,48,53,48,94,71,10,94,86,50,10,0,0,0,0,0,0,0,0,94,80,86,49,48,50,48,50,53,94,71,10,94,86,49,10,0,0,0,0,0,0,0,0,70,73,84,95,76,65,77,66,68,65,95,70,65,67,84,79,82,0,0,0,0,0,0,0,99,111,109,112,105,108,101,95,111,112,116,105,111,110,115,0,94,80,87,37,48,50,100,10,0,0,0,0,0,0,0,0,101,120,116,101,110,100,32,105,110,112,117,116,32,108,105,110,101,0,0,0,0,0,0,0,10,94,73,71,86,10,0,0,115,116,114,112,116,105,109,101,0,0,0,0,0,0,0,0,49,50,51,52,53,54,55,56,57,48,49,50,51,52,53,54,55,56,57,48,0,0,0,0,94,73,71,69,10,0,0,0,109,111,36,117,115,101,0,0,98,105,110,97,114,121,32,102,105,108,101,32,100,97,116,97,32,114,101,99,111,114,100,115,0,0,0,0,0,0,0,0,65,114,105,97,108,0,0,0,9,102,111,114,109,97,116,116,105,110,103,32,110,117,109,98,101,114,115,32,119,105,116,104,32,34,37,115,34,10,0,0,110,111,102,112,101,95,116,114,97,112,0,0,0,0,0,0,106,112,103,0,0,0,0,0,112,117,115,104,0,0,0,0,99,104,97,114,97,99,116,101,114,32,0,0,0,0,0,0,60,116,115,112,97,110,32,102,111,110,116,45,115,105,122,101,61,34,37,46,49,102,112,116,34,32,100,121,61,34,37,46,50,102,112,116,34,62,60,47,116,115,112,97,110,62,0,0,60,99,111,110,116,114,111,108,45,119,104,101,101,108,45,100,111,119,110,62,0,0,0,0,37,99,0,0,0,0,0,0,99,111,110,116,111,117,114,32,99,110,116,114,95,115,116,114,117,99,116,0,0,0,0,0,98,97,99,107,103,114,111,117,110,100,32,34,35,37,48,54,120,34,32,0,0,0,0,0,99,111,110,118,101,114,116,32,98,97,99,107,32,34,37,115,34,32,45,32,37,100,47,37,100,47,37,100,58,58,37,100,58,37,100,58,37,100,32,44,32,119,100,97,121,61,37,100,44,32,121,100,97,121,61,37,100,10,0,0,0,0,0,0,32,93,32,37,115,114,101,118,101,114,115,101,32,37,115,119,114,105,116,101,98,97,99,107,0,0,0,0,0,0,0,0,108,105,110,101,119,105,100,116,104,32,37,51,46,49,102,32,0,0,0,0,0,0,0,0,34,116,105,116,108,101,34,32,97,108,108,111,119,101,100,32,111,110,108,121,32,97,102,116,101,114,32,112,97,114,97,109,101,116,114,105,99,32,102,117,110,99,116,105,111,110,32,102,117,108,108,121,32,115,112,101,99,105,102,105,101,100,0,0,115,111,108,105,100,32,0,0,105,115,111,32,99,117,114,118,101,32,112,111,105,110,116,115,0,0,0,0,0,0,0,0,100,97,115,104,101,100,32,0,70,73,84,95,83,67,82,73,80,84,0,0,0,0,0,0,98,117,116,116,32,0,0,0,102,111,114,0,0,0,0,0,109,97,116,114,105,120,32,114,111,119,32,112,111,105,110,116,101,114,115,0,0,0,0,0,102,111,110,116,102,105,108,101,32,34,37,115,34,32,0,0,115,116,114,102,116,105,109,101,0,0,0,0,0,0,0,0,98,101,122,105,101,114,32,99,111,101,102,102,105,99,105,101,110,116,115,0,0,0,0,0,77,111,117,115,101,32,97,110,100,32,104,111,116,107,101,121,115,32,97,114,101,32,115,117,112,112,111,114,116,101,100,44,32,104,105,116,58,32,104,32,114,32,109,32,54,0,0,0,110,97,109,101,32,34,37,115,34,32,0,0,0,0,0,0,98,109,97,114,36,103,105,110,0,0,0,0,0,0,0,0,69,113,117,97,108,32,40,39,61,39,41,32,115,121,109,98,111,108,32,114,101,113,117,105,114,101,100,0,0,0,0,0,97,108,116,45,0,0,0,0,115,116,97,110,100,97,108,111,110,101,32,0,0,0,0,0,9,100,111,117,98,108,101,32,99,108,105,99,107,32,114,101,115,111,108,117,116,105,111,110,32,105,115,32,111,102,102,10,0,0,0,0,0,0,0,0,89,111,117,32,99,97,110,39,116,32,99,104,97,110,103,101,32,116,104,101,32,116,101,114,109,105,110,97,108,32,105,110,32,109,117,108,116,105,112,108,111,116,32,109,111,100,101,0,123,32,121,48,32,103,32,0,115,99,114,101,101,110,32,0,109,111,117,115,105,110,103,32,0,0,0,0,0,0,0,0,108,111,97,100,0,0,0,0,67,97,110,39,116,32,99,97,108,99,117,108,97,116,101,32,97,112,112,114,111,120,105,109,97,116,105,111,110,32,115,112,108,105,110,101,115,0,0,0,101,110,104,97,110,99,101,100,0,0,0,0,0,0,0,0,122,111,111,109,32,105,110,32,116,111,119,97,114,100,32,116,104,101,32,99,101,110,116,101,114,32,111,102,32,116,104,101,32,112,108,111,116,46,0,0,112,109,51,100,32,112,97,108,101,116,116,101,32,99,111,108,111,114,0,0,0,0,0,0,102,97,99,116,111,114,105,97,108,32,40,33,41,32,97,114,103,117,109,101,110,116,32,109,117,115,116,32,98,101,32,97,110,32,105,110,116,101,103,101,114,0,0,0,0,0,0,0,32,100,121,110,97,109,105,99,0,0,0,0,0,0,0,0,105,110,116,101,114,110,97,108,32,61,32,37,102,32,45,32,37,100,47,37,100,47,37,100,58,58,37,100,58,37,100,58,37,100,32,44,32,119,100,97,121,61,37,100,44,32,121,100,97,121,61,37,100,10,0,0,32,102,105,120,101,100,0,0,115,105,122,101,32,37,100,44,37,100,37,115,32,37,115,32,102,110,97,109,101,32,39,37,115,39,32,32,102,115,105,122,101,32,37,103,32,0,0,0,117,110,114,101,99,111,103,110,105,122,101,100,32,116,101,114,109,105,110,97,108,32,111,112,116,105,111,110,0,0,0,0,98,97,99,107,103,36,114,111,117,110,100,0,0,0,0,0,100,97,115,104,36,101,100,0,32,32,116,101,114,109,105,110,97,108,32,116,101,115,116,0,114,111,117,110,100,36,101,100,0,0,0,0,0,0,0,0,116,109,97,114,36,103,105,110,0,0,0,0,0,0,0,0,111,112,116,105,111,110,32,101,120,112,101,99,116,101,100,0,70,111,110,116,32,102,105,108,101,110,97,109,101,32,101,120,112,101,99,116,101,100,0,0,9,100,111,117,98,108,101,32,99,108,105,99,107,32,114,101,115,111,108,117,116,105,111,110,32,105,115,32,37,100,32,109,115,10,0,0,0,0,0,0,84,104,105,115,32,111,112,116,105,111,110,32,99,97,110,110,111,116,32,98,101,32,99,104,97,110,103,101,100,32,117,115,105,110,103,32,39,115,101,116,32,116,101,114,109,111,112,116,105,111,110,39,0,0,0,0,115,101,99,111,110,100,32,0,102,111,110,116,102,105,108,101,0,0,0,0,0,0,0,0,60,99,111,110,116,114,111,108,45,119,104,101,101,108,45,117,112,62,0,0,0,0,0,0,102,115,105,122,101,58,32,101,120,112,101,99,116,105,110,103,32,102,111,110,116,32,115,105,122,101,0,0,0,0,0,0,102,115,36,105,122,101,0,0,115,109,111,111,116,104,32,112,97,108,101,116,116,101,32,105,110,32,37,115,58,32,117,115,105,110,103,32,37,105,32,111,102,32,37,105,32,97,118,97,105,108,97,98,108,101,32,99,111,108,111,114,32,112,111,115,105,116,105,111,110,115,10,0,37,115,32,114,97,110,103,101,32,109,117,115,116,32,98,101,32,103,114,101,97,116,101,114,32,116,104,97,110,32,48,32,102,111,114,32,108,111,103,32,115,99,97,108,101,0,0,0,102,110,36,97,109,101,0,0,102,105,36,120,101,100,0,0,86,97,108,117,101,32,115,116,111,114,101,100,32,102,111,114,32,117,110,100,101,102,105,110,101,100,32,100,97,116,97,112,111,105,110,116,32,104,97,110,100,108,105,110,103,32,105,115,32,105,108,108,101,103,97,108,33,33,33,10,0,0,0,0,100,36,121,110,97,109,105,99,0,0,0,0,0,0,0,0,110,97,109,101,32,109,117,115,116,32,99,111,110,116,97,105,110,32,111,110,108,121,32,97,108,112,104,97,110,117,109,101,114,105,99,115,32,111,114,32,95,0,0,0,0,0,0,0,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,95,49,50,51,52,53,54,55,56,57,48,0,119,111,114,100,0,0,0,0,116,101,114,109,105,110,97,108,32,116,121,112,101,32,105,115,32,117,110,107,110,111,119,110,0,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,97,32,112,108,111,116,32,110,97,109,101,0,0,0,114,109,97,114,36,103,105,110,0,0,0,0,0,0,0,0,110,97,109,101,0,0,0,0,9,110,111,32,112,111,108,97,114,32,100,105,115,116,97,110,99,101,32,116,111,32,114,117,108,101,114,32,119,105,108,108,32,98,101,32,115,104,111,119,110,10,0,0,0,0,0,0,100,101,108,97,121,0,0,0,102,105,114,115,116,32,0,0,109,111,117,115,36,105,110,103,0,0,0,0,0,0,0,0,115,99,114,111,108,108,32,114,105,103,104,116,46,0,0,0,109,111,117,115,101,0,0,0,121,32,115,105,122,101,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,0,101,120,116,101,110,100,32,105,110,32,100,111,95,115,121,115,116,101,109,95,102,117,110,99,0,0,0,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,121,32,115,105,122,101,0,0,0,0,0,0,0,0,112,111,108,121,103,111,110,0,120,32,115,105,122,101,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,0,101,120,112,101,99,116,105,110,103,32,120,32,115,105,122,101,0,0,0,0,0,0,0,0,115,36,105,122,101,0,0,0,67,97,110,110,111,116,32,109,105,120,32,115,99,114,101,101,110,32,111,114,32,99,104,97,114,97,99,116,101,114,32,99,111,111,114,100,115,32,119,105,116,104,32,112,108,111,116,32,99,111,111,114,100,115,0,0,70,111,110,116,32,102,105,108,101,32,39,37,115,39,32,105,115,32,101,109,112,116,121,0,115,117,98,115,116,114,0,0,115,101,116,32,116,101,114,109,111,112,116,32,101,110,104,0,67,111,109,109,97,110,100,32,39,37,115,39,32,103,101,110,101,114,97,116,101,115,32,101,109,112,116,121,32,111,117,116,112,117,116,0,0,0,0,0,67,111,109,109,97,110,100,32,39,37,115,39,32,103,101,110,101,114,97,116,101,100,32,101,114,114,111,114,32,101,120,105,116,99,111,100,101,32,37,100,0,0,0,0,0,0,0,0,108,109,97,114,36,103,105,110,0,0,0,0,0,0,0,0,68,105,109,95,50,0,0,0,9,100,105,115,116,97,110,99,101,32,116,111,32,114,117,108,101,114,32,119,105,108,108,32,98,101,32,115,104,111,119,32,105,110,32,112,111,108,97,114,32,99,111,111,114,100,105,110,97,116,101,115,10,0,0,0,103,105,102,0,0,0,0,0,111,98,106,101,99,116,32,110,111,116,32,102,111,117,110,100,0,0,0,0,0,0,0,0,70,111,110,116,32,102,105,108,101,32,39,37,115,39,32,99,111,110,116,97,105,110,115,32,116,104,101,32,102,111,110,116,32,39,37,115,39,10,0,0,60,115,104,105,102,116,45,119,104,101,101,108,45,100,111,119,110,62,0,0,0,0,0,0,102,111,110,116,45,102,97,109,105,108,121,0,0,0,0,0,70,111,110,116,32,102,105,108,101,32,39,37,115,39,32,110,111,116,32,102,111,117,110,100,0,0,0,0,0,0,0,0,42,118,101,114,121,42,32,108,111,110,103,32,115,121,115,116,101,109,32,99,97,108,108,32,111,117,116,112,117,116,32,104,97,115,32,98,101,101,110,32,116,114,117,110,99,97,116,101,100,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,101,120,101,99,117,116,101,32,112,105,112,101,32,39,37,115,39,0,0,0,0,0,10,9,60,99,105,114,99,108,101,32,105,100,61,39,103,112,68,111,116,39,32,114,61,39,48,46,53,39,32,115,116,114,111,107,101,45,119,105,100,116,104,61,39,48,46,53,39,47,62,10,9,60,112,97,116,104,32,105,100,61,39,103,112,80,116,48,39,32,115,116,114,111,107,101,45,119,105,100,116,104,61,39,37,46,51,102,39,32,115,116,114,111,107,101,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,100,61,39,77,45,49,44,48,32,104,50,32,77,48,44,45,49,32,118,50,39,47,62,10,9,60,112,97,116,104,32,105,100,61,39,103,112,80,116,49,39,32,115,116,114,111,107,101,45,119,105,100,116,104,61,39,37,46,51,102,39,32,115,116,114,111,107,101,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,100,61,39,77,45,49,44,45,49,32,76,49,44,49,32,77,49,44,45,49,32,76,45,49,44,49,39,47,62,10,9,60,112,97,116,104,32,105,100,61,39,103,112,80,116,50,39,32,115,116,114,111,107,101,45,119,105,100,116,104,61,39,37,46,51,102,39,32,115,116,114,111,107,101,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,100,61,39,77,45,49,44,48,32,76,49,44,48,32,77,48,44,45,49,32,76,48,44,49,32,77,45,49,44,45,49,32,76,49,44,49,32,77,45,49,44,49,32,76,49,44,45,49,39,47,62,10,9,60,114,101,99,116,32,105,100,61,39,103,112,80,116,51,39,32,115,116,114,111,107,101,45,119,105,100,116,104,61,39,37,46,51,102,39,32,115,116,114,111,107,101,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,120,61,39,45,49,39,32,121,61,39,45,49,39,32,119,105,100,116,104,61,39,50,39,32,104,101,105,103,104,116,61,39,50,39,47,62,10,9,60,114,101,99,116,32,105,100,61,39,103,112,80,116,52,39,32,115,116,114,111,107,101,45,119,105,100,116,104,61,39,37,46,51,102,39,32,115,116,114,111,107,101,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,102,105,108,108,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,120,61,39,45,49,39,32,121,61,39,45,49,39,32,119,105,100,116,104,61,39,50,39,32,104,101,105,103,104,116,61,39,50,39,47,62,10,9,60,99,105,114,99,108,101,32,105,100,61,39,103,112,80,116,53,39,32,115,116,114,111,107,101,45,119,105,100,116,104,61,39,37,46,51,102,39,32,115,116,114,111,107,101,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,99,120,61,39,48,39,32,99,121,61,39,48,39,32,114,61,39,49,39,47,62,10,9,60,117,115,101,32,120,108,105,110,107,58,104,114,101,102,61,39,35,103,112,80,116,53,39,32,105,100,61,39,103,112,80,116,54,39,32,102,105,108,108,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,115,116,114,111,107,101,61,39,110,111,110,101,39,47,62,10,9,60,112,97,116,104,32,105,100,61,39,103,112,80,116,55,39,32,115,116,114,111,107,101,45,119,105,100,116,104,61,39,37,46,51,102,39,32,115,116,114,111,107,101,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,100,61,39,77,48,44,45,49,46,51,51,32,76,45,49,46,51,51,44,48,46,54,55,32,76,49,46,51,51,44,48,46,54,55,32,122,39,47,62,10,9,60,117,115,101,32,120,108,105,110,107,58,104,114,101,102,61,39,35,103,112,80,116,55,39,32,105,100,61,39,103,112,80,116,56,39,32,102,105,108,108,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,115,116,114,111,107,101,61,39,110,111,110,101,39,47,62,10,9,60,117,115,101,32,120,108,105,110,107,58,104,114,101,102,61,39,35,103,112,80,116,55,39,32,105,100,61,39,103,112,80,116,57,39,32,115,116,114,111,107,101,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,116,114,97,110,115,102,111,114,109,61,39,114,111,116,97,116,101,40,49,56,48,41,39,47,62,10,9,60,117,115,101,32,120,108,105,110,107,58,104,114,101,102,61,39,35,103,112,80,116,57,39,32,105,100,61,39,103,112,80,116,49,48,39,32,102,105,108,108,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,115,116,114,111,107,101,61,39,110,111,110,101,39,47,62,10,9,60,117,115,101,32,120,108,105,110,107,58,104,114,101,102,61,39,35,103,112,80,116,51,39,32,105,100,61,39,103,112,80,116,49,49,39,32,115,116,114,111,107,101,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,116,114,97,110,115,102,111,114,109,61,39,114,111,116,97,116,101,40,52,53,41,39,47,62,10,9,60,117,115,101,32,120,108,105,110,107,58,104,114,101,102,61,39,35,103,112,80,116,49,49,39,32,105,100,61,39,103,112,80,116,49,50,39,32,102,105,108,108,61,39,99,117,114,114,101,110,116,67,111,108,111,114,39,32,115,116,114,111,107,101,61,39,110,111,110,101,39,47,62,10,60,47,100,101,102,115,62,10,0,60,100,101,102,115,62,10,0,9,37,115,32,114,97,110,103,101,32,114,101,115,116,114,105,99,116,101,100,32,116,111,32,91,0,0,0,0,0,0,0,47,62,10,0,0,0,0,0,32,102,105,108,108,61,34,35,37,48,54,120,34,0,0,0,115,116,114,115,116,114,116,0,85,110,107,110,111,119,110,32,111,114,32,97,109,98,105,103,117,111,117,115,32,116,101,114,109,105,110,97,108,32,110,97,109,101,32,39,37,115,39,10,0,0,0,0,0,0,0,0,60,103,32,105,100,61,34,103,110,117,112,108,111,116,95,99,97,110,118,97,115,34,62,10,10,0,0,0,0,0,0,0,109,97,114,36,103,105,110,0,60,103,32,105,100,61,34,103,110,117,112,108,111,116,95,99,97,110,118,97,115,34,32,111,110,99,108,105,99,107,61,34,103,110,117,112,108,111,116,95,115,118,103,46,116,111,103,103,108,101,67,111,111,114,100,66,111,120,40,101,118,116,41,34,32,111,110,109,111,117,115,101,109,111,118,101,61,34,103,110,117,112,108,111,116,95,115,118,103,46,109,111,118,101,67,111,111,114,100,66,111,120,40,101,118,116,41,34,62,10,10,0,9,110,111,32,122,111,111,109,32,99,111,111,114,100,105,110,97,116,101,115,32,119,105,108,108,32,98,101,32,100,114,97,119,110,10,0,0,0,0,0,10,60,33,45,45,32,65,108,115,111,32,116,114,97,99,107,32,109,111,117,115,101,32,119,104,101,110,32,105,116,32,105,115,32,111,110,32,97,32,112,108,111,116,32,101,108,101,109,101,110,116,32,45,45,62,10,0,0,0,0,0,0,0,0,32,102,105,108,108,115,116,121,108,101,32,0,0,0,0,0,115,99,114,111,108,108,32,108,101,102,116,32,40,105,110,32,45,88,32,100,105,114,101,99,116,105,111,110,41,46,0,0,111,110,99,108,105,99,107,61,34,103,110,117,112,108,111,116,95,115,118,103,46,116,111,103,103,108,101,67,111,111,114,100,66,111,120,40,101,118,116,41,34,32,32,111,110,109,111,117,115,101,109,111,118,101,61,34,103,110,117,112,108,111,116,95,115,118,103,46,109,111,118,101,67,111,111,114,100,66,111,120,40,101,118,116,41,34,47,62,10,0,0,0,0,0,0,0,32,102,105,108,108,61,34,35,37,48,54,120,34,32,115,116,114,111,107,101,61,34,98,108,97,99,107,34,32,115,116,114,111,107,101,45,119,105,100,116,104,61,34,49,34,10,0,0,100,111,95,115,121,115,116,101,109,95,102,117,110,99,0,0,60,114,101,99,116,32,120,61,34,37,100,34,32,121,61,34,37,100,34,32,119,105,100,116,104,61,34,37,100,34,32,104,101,105,103,104,116,61,34,37,100,34,0,0,0,0,0,0,10,60,33,45,45,32,84,105,101,32,109,111,117,115,105,110,103,32,116,111,32,101,110,116,105,114,101,32,98,111,117,110,100,105,110,103,32,98,111,120,32,111,102,32,116,104,101,32,112,108,111,116,32,45,45,62,10,0,0,0,0,0,0,0,60,115,99,114,105,112,116,32,108,97,110,103,117,97,103,101,61,34,106,97,118,97,83,99,114,105,112,116,34,32,84,89,80,69,61,34,116,101,120,116,47,106,97,118,97,115,99,114,105,112,116,34,32,62,32,60,33,91,67,68,65,84,65,91,10,0,0,0,0,0,0,0,35,32,70,73,88,69,68,0,70,97,105,108,101,100,32,116,111,32,105,110,115,101,114,116,32,106,97,118,97,115,99,114,105,112,116,32,102,105,108,101,32,37,115,10,0,0,0,0,115,116,114,108,101,110,0,0,106,97,118,97,115,99,114,105,112,116,32,110,97,109,101,0,109,97,112,36,112,105,110,103,51,100,0,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,106,115,0,0,9,122,111,111,109,32,99,111,111,114,100,105,110,97,116,101,115,32,119,105,108,108,32,98,101,32,100,114,97,119,110,10,0,0,0,0,0,0,0,0,60,115,99,114,105,112,116,32,116,121,112,101,61,34,116,101,120,116,47,106,97,118,97,115,99,114,105,112,116,34,32,120,108,105,110,107,58,104,114,101,102,61,34,37,115,103,110,117,112,108,111,116,95,115,118,103,46,106,115,34,47,62,10,0,60,115,104,105,102,116,45,119,104,101,101,108,45,117,112,62,0,0,0,0,0,0,0,0,116,111,111,32,109,97,110,121,32,97,114,103,117,109,101,110,116,115,32,102,111,114,32,39,99,97,108,108,32,60,102,105,108,101,62,39,0,0,0,0,106,115,100,105,114,0,0,0,112,111,112,101,110,32,102,97,105,108,101,100,0,0,0,0,47,117,115,114,47,108,111,99,97,108,47,115,104,97,114,101,47,103,110,117,112,108,111,116,47,52,46,54,47,106,115,0,60,100,101,115,99,62,80,114,111,100,117,99,101,100,32,98,121,32,71,78,85,80,76,79,84,32,37,115,32,112,97,116,99,104,108,101,118,101,108,32,37,115,32,60,47,100,101,115,99,62,10,10,0,0,0,0,71,110,117,112,108,111,116,0,85,110,100,101,102,105,110,101,100,32,118,97,108,117,101,32,100,117,114,105,110,103,32,102,117,110,99,116,105,111,110,32,101,118,97,108,117,97,116,105,111,110,0,0,0,0,0,0,60,116,105,116,108,101,62,37,115,60,47,116,105,116,108,101,62,10,0,0,0,0,0,0,62,10,10,0,0,0,0,0,103,112,114,105,110,116,102,0,84,101,114,109,105,110,97,108,32,116,121,112,101,32,115,101,116,32,116,111,32,39,37,115,39,10,0,0,0,0,0,0,32,120,109,108,110,115,58,120,108,105,110,107,61,34,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,114,103,47,49,57,57,57,47,120,108,105,110,107,34,10,0,0,0,0,109,97,112,36,112,105,110,103,0,0,0,0,0,0,0,0,112,108,111,116,32,116,105,116,108,101,0,0,0,0,0,0,32,120,109,108,110,115,61,34,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,114,103,47,50,48,48,48,47,115,118,103,34,10,0,0,0,0,9,109,111,117,115,101,32,105,115,32,111,110,10,0,0,0,10,32,118,105,101,119,66,111,120,61,34,48,32,48,32,37,117,32,37,117,34,10,0,0,115,99,114,111,108,108,32,100,111,119,110,46,0,0,0,0,46,46,0,0,0,0,0,0,10,32,119,105,100,116,104,61,34,37,117,34,32,104,101,105,103,104,116,61,34,37,117,34,32,0,0,0,0,0,0,0,111,110,108,111,97,100,61,34,105,102,32,40,116,121,112,101,111,102,40,103,110,117,112,108,111,116,95,115,118,103,41,33,61,39,117,110,100,101,102,105,110,101,100,39,41,32,103,110,117,112,108,111,116,95,115,118,103,46,73,110,105,116,40,101,118,116,41,34,32,0,0,0,37,115,32,105,115,32,110,111,116,32,97,32,115,116,114,105,110,103,32,118,97,114,105,97,98,108,101,0,0,0,0,0,60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,37,115,32,115,116,97,110,100,97,108,111,110,101,61,34,110,111,34,63,62,10,60,33,68,79,67,84,89,80,69,32,115,118,103,32,80,85,66,76,73,67,32,34,45,47,47,87,51,67,47,47,68,84,68,32,83,86,71,32,49,46,49,47,47,69,78,34,32,10,32,34,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,114,103,47,71,114,97,112,104,105,99,115,47,83,86,71,47,49,46,49,47,68,84,68,47,115,118,103,49,49,46,100,116,100,34,62,10,60,115,118,103,32,0,0,0,0,0,101,110,99,111,100,105,110,103,61,34,117,116,102,45,56,34,32,0,0,0,0,0,0,0,102,111,110,116,112,97,116,104,32,61,61,32,78,85,76,76,0,0,0,0,0,0,0,0,101,110,99,111,100,105,110,103,61,34,83,104,105,102,116,95,74,73,83,34,32,0,0,0,37,45,49,53,46,49,53,115,32,61,32,37,103,10,0,0,70,111,114,109,97,116,32,99,104,97,114,97,99,116,101,114,32,109,105,115,109,97,116,99,104,58,32,37,37,84,32,105,115,32,111,110,108,121,32,118,97,108,105,100,32,119,105,116,104,32,37,37,116,0,0,0,101,110,99,111,100,105,110,103,61,34,107,111,105,56,45,117,34,32,0,0,0,0,0,0,68,101,112,114,101,99,97,116,101,100,32,115,121,110,116,97,120,32,45,32,112,108,101,97,115,101,32,117,115,101,32,39,115,101,116,32,116,105,99,115,32,115,99,97,108,101,32,100,101,102,97,117,108,116,39,0,37,89,45,37,109,45,37,100,0,0,0,0,0,0,0,0,101,110,99,111,100,105,110,103,61,34,107,111,105,56,45,114,34,32,0,0,0,0,0,0,87,97,114,110,105,110,103,58,32,115,99,97,108,101,32,105,110,116,101,114,102,97,99,101,32,105,115,32,110,111,116,32,110,117,108,108,95,115,99,97,108,101,32,45,32,109,97,121,32,110,111,116,32,119,111,114,107,32,119,105,116,104,32,109,117,108,116,105,112,108,111,116,10,0,0,0,0,0,0,0,101,110,99,111,100,105,110,103,61,34,119,105,110,100,111,119,115,45,49,50,53,49,34,32,0,0,0,0,0,0,0,0,109,97,99,36,114,111,115,0,116,105,109,101,99,111,108,117,109,110,40,41,32,99,97,108,108,101,100,32,102,114,111,109,32,105,110,118,97,108,105,100,32,99,111,110,116,101,120,116,0,0,0,0,0,0,0,0,101,110,99,111,100,105,110,103,61,34,119,105,110,100,111,119,115,45,49,50,53,48,34,32,0,0,0,0,0,0,0,0,9,108,97,115,116,32,112,108,111,116,32,99,111,109,109,97,110,100,32,119,97,115,58,32,37,115,10,0,0,0,0,0,102,99,32,0,0,0,0,0,101,110,99,111,100,105,110,103,61,34,99,112,57,53,48,34,32,0,0,0,0,0,0,0,60,119,104,101,101,108,45,100,111,119,110,62,0,0,0,0,101,110,99,111,100,105,110,103,61,34,105,98,109,45,56,53,50,34,32,0,0,0,0,0,101,110,99,111,100,105,110,103,61,34,105,98,109,45,56,53,48,34,32,0,0,0,0,0,115,116,114,105,110,103,32,118,97,114,105,97,98,108,101,0,99,112,49,50,53,49,0,0,101,110,99,111,100,105,110,103,61,34,105,115,111,45,56,56,53,57,45,49,53,34,32,0,32,108,97,98,101,108,0,0,101,110,99,111,100,105,110,103,61,34,105,115,111,45,56,56,53,57,45,57,34,32,0,0,108,110,111,116,0,0,0,0,101,110,99,111,100,105,110,103,61,34,105,115,111,45,56,56,53,57,45,50,34,32,0,0,105,110,105,116,105,97,108,32,115,101,116,32,111,102,32,102,114,101,101,0,0,0,0,0,101,110,99,111,100,105,110,103,61,34,105,115,111,45,56,56,53,57,45,49,34,32,0,0,35,37,50,46,50,88,37,50,46,50,88,37,50,46,50,88,0,0,0,0,0,0,0,0,116,109,95,121,100,97,121,0,120,49,49,0,0,0,0,0,60,47,115,118,103,62,10,10,0,0,0,0,0,0,0,0,108,111,103,36,115,99,97,108,101,0,0,0,0,0,0,0,64,67,79,76,85,77,78,72,69,65,68,64,0,0,0,0,32,32,32,32,111,110,99,108,105,99,107,61,39,103,110,117,112,108,111,116,95,115,118,103,46,116,111,103,103,108,101,71,114,105,100,40,41,59,39,47,62,10,0,0,0,0,0,0,61,32,0,0,0,0,0,0,83,116,97,116,115,32,99,111,109,109,97,110,100,32,110,111,116,32,97,118,97,105,108,97,98,108,101,32,105,110,32,112,97,114,97,109,101,116,114,105,99,32,109,111,100,101,0,0,108,119,32,37,46,49,102,32,0,0,0,0,0,0,0,0,10,32,32,60,105,109,97,103,101,32,120,61,39,49,48,39,32,121,61,39,37,100,39,32,119,105,100,116,104,61,39,49,54,39,32,104,101,105,103,104,116,61,39,49,54,39,32,120,108,105,110,107,58,104,114,101,102,61,39,103,114,105,100,46,112,110,103,39,10,0,0,0,115,99,114,111,108,108,32,117,112,32,40,105,110,32,43,89,32,100,105,114,101,99,116,105,111,110,41,46,0,0,0,0,102,111,110,116,112,97,116,104,95,102,117,108,108,110,97,109,101,0,0,0,0,0,0,0,32,32,118,105,115,105,98,105,108,105,116,121,61,34,104,105,100,100,101,110,34,62,32,60,47,116,101,120,116,62,10,0,37,115,32,101,114,114,111,114,10,0,0,0,0,0,0,0,32,32,102,111,110,116,45,115,105,122,101,61,34,49,50,34,32,102,111,110,116,45,102,97,109,105,108,121,61,34,65,114,105,97,108,34,10,0,0,0,115,121,115,116,101,109,40,41,32,102,97,105,108,101,100,0,10,32,32,60,116,101,120,116,32,105,100,61,34,99,111,111,114,100,95,116,101,120,116,34,32,116,101,120,116,45,97,110,99,104,111,114,61,34,115,116,97,114,116,34,32,112,111,105,110,116,101,114,45,101,118,101,110,116,115,61,34,110,111,110,101,34,10,0,0,0,0,0,93,93,62,10,60,47,115,99,114,105,112,116,62,10,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,116,105,109,101,97,120,105,115,95,120,32,61,32,34,34,59,10,0,0,0,0,0,0,114,101,115,117,108,116,97,110,116,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,111,114,32,100,101,112,114,101,99,97,116,101,100,32,115,121,110,116,97,120,0,0,0,0,68,97,116,101,84,105,109,101,0,0,0,0,0,0,0,0,84,105,109,101,0,0,0,0,116,109,95,119,100,97,121,0,88,49,49,0,0,0,0,0,68,97,116,101,0,0,0,0,108,111,99,36,97,108,101,0,97,110,97,108,121,122,101,95,115,103,108,95,99,111,108,117,109,110,0,0,0,0,0,0,99,111,108,117,109,110,104,101,97,100,40,41,32,99,97,108,108,101,100,32,102,114,111,109,32,105,110,118,97,108,105,100,32,99,111,110,116,101,120,116,0,0,0,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,116,105,109,101,97,120,105,115,95,120,32,61,32,34,37,115,34,59,10,0,0,0,0,9,37,45,42,115,32,0,0,102,112,101,95,116,114,97,112,0,0,0,0,0,0,0,0,102,110,97,109,101,0,0,0,106,112,101,103,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,97,120,105,115,95,120,109,97,120,32,61,32,37,46,51,102,59,10,0,0,0,0,0,60,119,104,101,101,108,45,117,112,62,0,0,0,0,0,0,114,101,99,117,114,115,105,118,101,102,117,108,108,110,97,109,101,0,0,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,97,120,105,115,95,120,109,105,110,32,61,32,37,46,51,102,59,10,0,0,0,0,0,116,114,97,99,101,95,99,111,110,116,111,117,114,58,32,117,110,101,120,112,101,99,116,101,100,32,101,110,100,32,111,102,32,99,111,110,116,111,117,114,10,0,0,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,108,111,103,97,120,105,115,95,114,32,61,32,37,100,59,10,0,0,0,0,0,0,0,73,109,112,111,115,115,105,98,108,101,32,99,97,115,101,32,105,110,32,115,119,105,116,99,104,0,0,0,0,0,0,0,32,58,32,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,108,111,103,97,120,105,115,95,121,32,61,32,37,100,59,10,0,0,0,0,0,0,0,112,109,51,100,32,115,99,97,110,32,97,114,114,97,121,0,116,36,105,116,108,101,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,108,111,103,97,120,105,115,95,120,32,61,32,37,100,59,10,0,0,0,0,0,0,0,108,97,98,101,108,112,111,105,110,116,32,116,101,120,116,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,97,120,105,115,95,121,50,109,105,110,32,61,32,34,110,111,110,101,34,10,0,0,0,67,111,117,108,100,32,110,111,116,32,108,105,110,101,98,117,102,102,101,114,32,115,116,100,111,117,116,10,0,0,0,0,10,10,32,73,116,101,114,97,116,105,111,110,32,37,100,10,32,87,83,83,82,32,32,32,32,32,32,32,32,58,32,37,45,49,53,103,32,32,32,100,101,108,116,97,40,87,83,83,82,41,47,87,83,83,82,32,32,32,58,32,37,103,10,32,100,101,108,116,97,40,87,83,83,82,41,32,58,32,37,45,49,53,103,32,32,32,108,105,109,105,116,32,102,111,114,32,115,116,111,112,112,105,110,103,32,58,32,37,103,10,32,108,97,109,98,100,97,9,32,32,58,32,37,103,10,10,37,115,32,112,97,114,97,109,101,116,101,114,32,118,97,108,117,101,115,10,10,0,0,0,0,0,112,108,111,116,95,97,120,105,115,95,121,50,109,97,120,0,69,120,112,101,99,116,105,110,103,32,105,116,101,114,97,116,111,114,32,9,102,111,114,32,91,60,118,97,114,62,32,61,32,60,115,116,97,114,116,62,32,58,32,60,101,110,100,62,93,10,9,9,9,111,114,9,102,111,114,32,91,60,118,97,114,62,32,105,110,32,34,115,116,114,105,110,103,32,111,102,32,119,111,114,100,115,34,93,0,0,0,0,0,0,0,0,71,80,86,65,76,95,89,50,95,77,65,88,0,0,0,0,116,109,95,121,101,97,114,0,117,110,107,110,111,119,110,32,111,114,32,97,109,98,105,103,117,111,117,115,32,116,101,114,109,105,110,97,108,32,116,121,112,101,59,32,116,121,112,101,32,106,117,115,116,32,39,115,101,116,32,116,101,114,109,105,110,97,108,39,32,102,111,114,32,97,32,108,105,115,116,0,112,108,111,116,95,97,120,105,115,95,121,50,109,105,110,0,83,121,110,116,97,120,32,101,114,114,111,114,58,32,109,105,115,115,105,110,103,32,98,108,111,99,107,32,116,101,114,109,105,110,97,116,111,114,32,125,0,0,0,0,0,0,0,0,108,111,97,36,100,112,97,116,104,0,0,0,0,0,0,0,98,108,97,110,107,0,0,0,116,117,114,110,105,110,103,32,114,117,108,101,114,32,111,110,46,10,0,0,0,0,0,0,71,80,86,65,76,95,89,50,95,77,73,78,0,0,0,0,101,120,116,114,97,110,101,111,117,115,32,97,114,103,117,109,101,110,116,115,32,105,110,32,115,101,116,32,116,105,99,115,0,0,0,0,0,0,0,0,123,32,48,46,57,57,57,57,57,32,121,48,32,115,117,98,32,103,32,0,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,97,120,105,115,95,120,50,109,105,110,32,61,32,34,110,111,110,101,34,10,0,0,0,99,97,108,108,0,0,0,0,121,32,112,111,115,0,0,0,118,101,114,116,105,99,97,108,32,109,111,116,105,111,110,32,45,45,32,99,104,97,110,103,101,32,120,121,112,108,97,110,101,0,0,0,0,0,0,0,102,97,105,108,115,97,102,101,0,0,0,0,0,0,0,0,112,108,111,116,95,97,120,105,115,95,120,50,109,97,120,0,99,97,110,32,111,110,108,121,32,109,111,100,32,105,110,116,115,0,0,0,0,0,0,0,71,80,86,65,76,95,88,50,95,77,65,88,0,0,0,0,83,111,114,114,121,44,32,110,111,32,104,101,108,112,32,102,111,114,32,39,37,115,39,10,0,0,0,0,0,0,0,0,112,108,111,116,95,97,120,105,115,95,120,50,109,105,110,0,71,80,86,65,76,95,88,50,95,77,73,78,0,0,0,0,103,110,117,112,108,111,116,95,115,118,103,46,112,108,111,116,95,97,120,105,115,95,114,109,105,110,32,61,32,37,103,59,10,0,0,0,0,0,0,0,102,97,108,115,101,0,0,0,116,114,117,101,0,0,0,0,116,109,95,109,111,110,0,0,117,110,107,110,111,119,110,0,103,110,117,112,108,111,116,95,115,118,103,46,112,111,108,97,114,95,109,111,100,101,32,61,32,37,115,59,10,0,0,0,108,116,0,0,0,0,0,0,105,110,100,101,120,95,109,97,120,0,0,0,0,0,0,0,112,97,114,116,105,97,108,32,109,97,116,99,104,32,97,103,97,105,110,115,116,32,99,111,108,117,109,110,32,37,100,32,104,101,97,100,101,114,32,37,115,0,0,0,0,0,0,0,112,108,111,116,95,97,120,105,115,95,121,109,97,120,0,0,68,101,112,114,101,99,97,116,101,100,32,115,121,110,116,97,120,32,45,32,112,108,101,97,115,101,32,117,115,101,32,39,115,101,116,32,116,105,99,115,32,115,99,97,108,101,39,32,107,101,121,119,111,114,100,0,71,80,86,65,76,95,89,95,77,65,88,0,0,0,0,0,60,83,104,105,102,116,45,66,50,45,77,111,116,105,111,110,62,0,0,0,0,0,0,0,112,108,111,116,95,97,120,105,115,95,121,109,105,110,0,0,71,80,86,65,76,95,89,95,77,73,78,0,0,0,0,0,72,101,108,112,32,116,111,112,105,99,58,32,0,0,0,0]) -.concat([118,0,0,0,0,0,0,0,111,117,116,32,111,102,32,109,101,109,111,114,121,32,102,111,114,32,37,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,32,71,78,85,80,76,79,84,58,32,76,97,84,101,88,32,112,105,99,116,117,114,101,32,117,115,105,110,103,32,116,112,105,99,32,92,115,112,101,99,105,97,108,115,10,37,37,32,32,32,32,32,32,32,32,32,32,119,105,116,104,32,37,100,32,112,111,105,110,116,32,116,121,112,101,115,32,97,110,100,32,37,100,32,108,105,110,101,32,116,121,112,101,115,10,37,37,32,79,112,116,105,111,110,115,58,32,112,111,105,110,116,115,105,122,101,32,61,32,37,100,44,32,108,105,110,101,119,105,100,116,104,32,61,32,37,100,44,32,105,110,116,101,114,118,97,108,32,61,32,37,102,10,37,37,32,84,111,32,99,104,97,110,103,101,32,97,98,111,118,101,32,111,112,116,105,111,110,115,44,32,115,97,121,58,10,37,37,32,115,101,116,32,116,101,114,109,105,110,97,108,32,116,112,105,99,32,112,111,105,110,116,115,105,122,101,95,118,97,108,117,101,32,108,105,110,101,119,105,100,116,104,95,118,97,108,117,101,32,105,110,116,101,114,118,97,108,95,118,97,108,117,101,10,37,37,32,40,112,111,105,110,116,115,105,122,101,32,97,110,100,32,108,105,110,101,119,105,100,116,104,32,45,32,105,110,116,101,103,101,114,115,32,105,110,32,109,105,108,108,105,45,105,110,99,104,101,115,46,10,37,37,32,32,105,110,116,101,114,118,97,108,32,45,32,97,32,102,108,111,97,116,32,105,110,32,105,110,99,104,101,115,46,32,32,73,102,32,122,101,114,111,32,105,115,32,115,112,101,99,105,102,105,101,100,44,32,10,37,37,32,32,116,104,101,32,100,101,102,97,117,108,116,32,118,97,108,117,101,32,105,115,32,99,104,111,115,101,110,46,41,10,92,115,101,116,108,101,110,103,116,104,123,92,117,110,105,116,108,101,110,103,116,104,125,123,37,102,105,110,125,37,37,10,0,0,0,0,37,115,92,98,101,103,105,110,123,112,105,99,116,117,114,101,125,40,37,100,44,37,100,41,40,37,100,44,37,100,41,37,37,32,37,115,10,0,0,0,64,74,1,0,0,0,0,0,184,73,1,0,1,0,0,0,0,0,0,0,2,0,0,0,232,195,1,0,0,0,0,0,144,195,1,0,1,0,0,0,80,195,1,0,1,0,0,0,144,245,1,0,2,0,0,0,40,245,1,0,2,0,0,0,32,50,1,0,3,0,0,0,232,49,1,0,4,0,0,0,200,49,1,0,5,0,0,0,40,195,1,0,6,0,0,0,192,49,1,0,7,0,0,0,192,229,1,0,8,0,0,0,72,236,1,0,10,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,166,1,0,200,165,1,0,248,164,1,0,184,164,1,0,88,164,1,0,8,164,1,0,176,163,1,0,120,163,1,0,64,163,1,0,232,162,1,0,152,162,1,0,248,161,1,0,4,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,92,98,101,103,105,110,123,116,101,120,100,114,97,119,125,10,92,110,111,114,109,97,108,115,105,122,101,10,92,105,102,120,92,112,97,116,104,68,69,70,73,78,69,68,92,114,101,108,97,120,92,101,108,115,101,92,108,101,116,92,112,97,116,104,68,69,70,73,78,69,68,92,114,101,108,97,120,10,32,92,100,101,102,92,81,116,71,102,114,123,92,105,102,120,32,40,92,84,71,114,101,32,92,108,101,116,92,89,104,101,116,84,92,99,112,97,116,104,92,101,108,115,101,92,108,101,116,92,89,104,101,116,84,92,114,101,108,97,120,92,102,105,92,89,104,101,116,84,125,10,32,92,100,101,102,92,112,97,116,104,32,40,35,49,32,35,50,41,123,92,109,111,118,101,32,40,35,49,32,35,50,41,92,102,117,116,117,114,101,108,101,116,92,84,71,114,101,92,81,116,71,102,114,125,10,32,92,100,101,102,92,99,112,97,116,104,32,40,35,49,32,35,50,41,123,92,108,118,101,99,32,40,35,49,32,35,50,41,92,102,117,116,117,114,101,108,101,116,92,84,71,114,101,92,81,116,71,102,114,125,10,92,102,105,10,92,100,114,97,119,100,105,109,32,112,116,10,92,115,101,116,117,110,105,116,115,99,97,108,101,32,37,50,46,50,102,10,92,108,105,110,101,119,100,32,37,100,10,92,116,101,120,116,114,101,102,32,104,58,76,32,118,58,67,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,18,0,0,0,0,0,0,255,255,255,255,0,0,0,0,112,23,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,152,190,2,0,192,31,1,0,184,31,1,0,72,31,1,0,24,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,1,0,0,0,3,0,0,0,2,0,0,0,1,0,0,0,3,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,7,0,0,0,7,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,32,3,0,240,30,3,0,160,31,3,0,8,32,3,0,240,31,3,0,192,31,3,0,232,30,3,0,144,31,3,0,184,31,3,0,0,0,0,0,56,32,3,0,8,32,3,0,240,31,3,0,200,31,3,0,192,31,3,0,184,31,3,0,160,31,3,0,144,31,3,0,128,31,3,0,56,31,3,0,24,31,3,0,8,31,3,0,240,30,3,0,232,30,3,0,216,30,3,0,184,30,3,0,152,30,3,0,144,30,3,0,128,30,3,0,64,30,3,0,48,30,3,0,248,29,3,0,208,29,3,0,176,29,3,0,160,29,3,0,152,29,3,0,112,29,3,0,104,29,3,0,88,29,3,0,40,29,3,0,8,29,3,0,248,28,3,0,224,28,3,0,216,28,3,0,184,28,3,0,176,28,3,0,160,28,3,0,152,28,3,0,64,28,3,0,40,28,3,0,16,28,3,0,216,27,3,0,208,27,3,0,200,27,3,0,192,27,3,0,184,27,3,0,168,27,3,0,160,27,3,0,144,27,3,0,64,27,3,0,48,27,3,0,240,26,3,0,232,26,3,0,224,26,3,0,216,26,3,0,208,26,3,0,184,26,3,0,176,26,3,0,160,26,3,0,80,26,3,0,64,26,3,0,48,26,3,0,208,25,3,0,200,25,3,0,192,25,3,0,136,25,3,0,112,25,3,0,88,25,3,0,80,25,3,0,32,25,3,0,16,25,3,0,248,24,3,0,224,24,3,0,216,24,3,0,208,24,3,0,200,24,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,254,1,0,3,0,0,0,32,50,1,0,0,0,0,0,232,49,1,0,1,0,0,0,184,208,2,0,2,0,0,0,0,224,1,0,4,0,0,0,192,218,1,0,5,0,0,0,152,208,2,0,9,0,0,0,144,195,1,0,10,0,0,0,80,195,1,0,10,0,0,0,72,208,2,0,11,0,0,0,56,208,2,0,12,0,0,0,24,208,2,0,12,0,0,0,232,247,1,0,13,0,0,0,80,248,1,0,14,0,0,0,48,246,1,0,15,0,0,0,224,245,1,0,15,0,0,0,144,245,1,0,16,0,0,0,40,245,1,0,16,0,0,0,192,253,1,0,39,0,0,0,248,207,2,0,17,0,0,0,224,207,2,0,18,0,0,0,200,207,2,0,19,0,0,0,16,24,2,0,21,0,0,0,112,207,2,0,20,0,0,0,200,210,2,0,22,0,0,0,176,210,2,0,23,0,0,0,80,207,2,0,24,0,0,0,96,244,1,0,30,0,0,0,48,207,2,0,25,0,0,0,32,207,2,0,26,0,0,0,96,211,2,0,27,0,0,0,24,211,2,0,28,0,0,0,192,229,1,0,29,0,0,0,224,252,1,0,7,0,0,0,24,253,1,0,8,0,0,0,200,251,1,0,37,0,0,0,72,251,1,0,38,0,0,0,56,117,1,0,31,0,0,0,240,206,2,0,32,0,0,0,224,206,2,0,33,0,0,0,152,206,2,0,34,0,0,0,72,206,2,0,35,0,0,0,48,206,2,0,36,0,0,0,232,205,2,0,40,0,0,0,200,205,2,0,41,0,0,0,136,82,3,0,42,0,0,0,184,205,2,0,43,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,44,49,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,101,118,101,108,49,32,83,117,112,112,114,101,115,115,80,68,70,77,97,114,107,32,111,114,32,10,123,125,32,123,10,47,83,68,105,99,116,32,49,48,32,100,105,99,116,32,100,101,102,10,115,121,115,116,101,109,100,105,99,116,32,47,112,100,102,109,97,114,107,32,107,110,111,119,110,32,110,111,116,32,123,10,32,32,117,115,101,114,100,105,99,116,32,47,112,100,102,109,97,114,107,32,115,121,115,116,101,109,100,105,99,116,32,47,99,108,101,97,114,116,111,109,97,114,107,32,103,101,116,32,112,117,116,10,125,32,105,102,10,83,68,105,99,116,32,98,101,103,105,110,32,91,10,32,32,47,84,105,116,108,101,32,40,37,115,41,10,32,32,47,83,117,98,106,101,99,116,32,40,103,110,117,112,108,111,116,32,112,108,111,116,41,10,32,32,47,67,114,101,97,116,111,114,32,40,103,110,117,112,108,111,116,32,37,115,32,112,97,116,99,104,108,101,118,101,108,32,37,115,41,10,32,32,47,65,117,116,104,111,114,32,40,37,115,41,10,37,37,32,32,47,80,114,111,100,117,99,101,114,32,40,103,110,117,112,108,111,116,41,10,37,37,32,32,47,75,101,121,119,111,114,100,115,32,40,41,10,32,32,47,67,114,101,97,116,105,111,110,68,97,116,101,32,40,37,115,41,10,32,32,47,68,79,67,73,78,70,79,32,112,100,102,109,97,114,107,10,101,110,100,10,125,32,105,102,101,108,115,101,10,0,0,0,37,37,37,37,69,110,100,67,111,109,109,101,110,116,115,10,37,37,37,37,66,101,103,105,110,80,114,111,108,111,103,10,47,103,110,117,100,105,99,116,32,50,53,54,32,100,105,99,116,32,100,101,102,10,103,110,117,100,105,99,116,32,98,101,103,105,110,10,37,37,10,37,37,32,84,104,101,32,102,111,108,108,111,119,105,110,103,32,116,114,117,101,47,102,97,108,115,101,32,102,108,97,103,115,32,109,97,121,32,98,101,32,101,100,105,116,101,100,32,98,121,32,104,97,110,100,32,105,102,32,100,101,115,105,114,101,100,46,10,37,37,32,84,104,101,32,117,110,105,116,32,108,105,110,101,32,119,105,100,116,104,32,97,110,100,32,103,114,97,121,115,99,97,108,101,32,105,109,97,103,101,32,103,97,109,109,97,32,99,111,114,114,101,99,116,105,111,110,32,109,97,121,32,97,108,115,111,32,98,101,32,99,104,97,110,103,101,100,46,10,37,37,10,47,67,111,108,111,114,32,37,115,32,100,101,102,10,47,66,108,97,99,107,116,101,120,116,32,37,115,32,100,101,102,10,47,83,111,108,105,100,32,37,115,32,100,101,102,10,47,68,97,115,104,108,101,110,103,116,104,32,37,103,32,100,101,102,10,47,76,97,110,100,115,99,97,112,101,32,37,115,32,100,101,102,10,47,76,101,118,101,108,49,32,37,115,32,100,101,102,10,47,82,111,117,110,100,101,100,32,37,115,32,100,101,102,10,47,67,108,105,112,84,111,66,111,117,110,100,105,110,103,66,111,120,32,37,115,32,100,101,102,10,47,83,117,112,112,114,101,115,115,80,68,70,77,97,114,107,32,102,97,108,115,101,32,100,101,102,10,47,84,114,97,110,115,112,97,114,101,110,116,80,97,116,116,101,114,110,115,32,102,97,108,115,101,32,100,101,102,10,47,103,110,117,108,105,110,101,119,105,100,116,104,32,37,46,51,102,32,100,101,102,10,47,117,115,101,114,108,105,110,101,119,105,100,116,104,32,103,110,117,108,105,110,101,119,105,100,116,104,32,100,101,102,10,47,71,97,109,109,97,32,49,46,48,32,100,101,102,10,47,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,32,123,37,46,51,102,32,37,46,51,102,32,37,46,51,102,125,32,100,101,102,10,37,37,10,47,118,115,104,105,102,116,32,37,100,32,100,101,102,10,47,100,108,49,32,123,10,32,32,37,46,49,102,32,68,97,115,104,108,101,110,103,116,104,32,109,117,108,32,109,117,108,10,32,32,82,111,117,110,100,101,100,32,123,32,99,117,114,114,101,110,116,108,105,110,101,119,105,100,116,104,32,48,46,55,53,32,109,117,108,32,115,117,98,32,100,117,112,32,48,32,108,101,32,123,32,112,111,112,32,48,46,48,49,32,125,32,105,102,32,125,32,105,102,10,125,32,100,101,102,10,47,100,108,50,32,123,10,32,32,37,46,49,102,32,68,97,115,104,108,101,110,103,116,104,32,109,117,108,32,109,117,108,10,32,32,82,111,117,110,100,101,100,32,123,32,99,117,114,114,101,110,116,108,105,110,101,119,105,100,116,104,32,48,46,55,53,32,109,117,108,32,97,100,100,32,125,32,105,102,10,125,32,100,101,102,10,47,104,112,116,95,32,37,46,49,102,32,100,101,102,10,47,118,112,116,95,32,37,46,49,102,32,100,101,102,10,47,104,112,116,32,104,112,116,95,32,100,101,102,10,47,118,112,116,32,118,112,116,95,32,100,101,102,10,0,0,0,0,0,0,37,37,37,37,67,114,101,97,116,111,114,58,32,103,110,117,112,108,111,116,32,37,115,32,112,97,116,99,104,108,101,118,101,108,32,37,115,10,37,37,37,37,67,114,101,97,116,105,111,110,68,97,116,101,58,32,37,115,10,37,37,37,37,68,111,99,117,109,101,110,116,70,111,110,116,115,58,32,37,115,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,153,1,0,40,153,1,0,224,152,1,0,200,152,1,0,184,152,1,0,112,152,1,0,88,152,1,0,64,152,1,0,48,152,1,0,24,152,1,0,112,151,1,0,232,150,1,0,0,0,0,0,0,0,0,0,224,148,1,0,192,148,1,0,176,148,1,0,160,148,1,0,144,148,1,0,40,148,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,232,49,1,0,112,51,1,0,64,179,2,0,21,177,0,0,148,132,0,0,32,50,1,0,128,51,1,0,56,179,2,0,148,132,0,0,21,177,0,0,40,139,3,0,0,0,0,0,64,178,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,232,195,1,0,0,0,0,0,144,195,1,0,1,0,0,0,80,195,1,0,1,0,0,0,40,195,1,0,2,0,0,0,80,248,1,0,3,0,0,0,232,194,1,0,4,0,0,0,184,194,1,0,5,0,0,0,96,194,1,0,6,0,0,0,24,194,1,0,7,0,0,0,80,193,1,0,11,0,0,0,232,192,1,0,8,0,0,0,144,192,1,0,9,0,0,0,88,192,1,0,10,0,0,0,0,192,1,0,14,0,0,0,208,191,1,0,15,0,0,0,152,191,1,0,16,0,0,0,104,191,1,0,12,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,254,255,255,255,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,208,2,0,0,0,0,0,144,195,1,0,1,0,0,0,80,195,1,0,1,0,0,0,48,195,2,0,2,0,0,0,24,195,2,0,3,0,0,0,224,194,2,0,4,0,0,0,216,194,2,0,4,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,192,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,63,5,0,0,0,6,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,0,0,192,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,63,15,0,0,0,10,0,0,0,15,0,0,0,10,0,0,0,0,0,0,0,0,0,192,63,10,0,0,0,15,0,0,0,10,0,0,0,15,0,0,0,0,0,0,0,0,0,192,63,20,0,0,0,10,0,0,0,5,0,0,0,10,0,0,0,0,0,0,0,0,0,192,63,10,0,0,0,6,0,0,0,10,0,0,0,6,0,0,0,0,0,0,0,0,0,192,63,15,0,0,0,6,0,0,0,5,0,0,0,10,0,0,0,0,0,0,0,0,0,192,63,10,0,0,0,6,0,0,0,10,0,0,0,10,0,0,0,0,0,0,0,0,0,192,63,5,0,0,0,6,0,0,0,5,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,2,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,150,1,0,152,190,2,0,152,150,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,130,1,0,208,129,1,0,184,105,1,0,80,105,1,0,240,104,1,0,176,104,1,0,56,104,1,0,0,129,1,0,8,104,1,0,216,103,1,0,88,103,1,0,208,102,1,0,144,102,1,0,104,102,1,0,0,102,1,0,0,0,0,0,176,97,1,0,0,0,0,0,160,97,1,0,1,0,0,0,48,254,1,0,2,0,0,0,120,97,1,0,3,0,0,0,88,97,1,0,4,0,0,0,56,97,1,0,5,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,205,204,204,62,0,0,0,0,205,204,204,62,0,0,160,64,205,204,76,63,0,0,0,0,0,0,128,63,0,0,160,64,154,153,153,63,0,0,0,0,0,0,128,63,0,0,32,65,10,0,0,0,0,0,0,0,100,111,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,4,0,0,0,0,0,0,0,0,3,8,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,16,6,3,6,0,0,0,0,0,0,16,6,8,6,0,0,0,0,0,0,16,4,1,4,8,4,1,4,0,0,16,4,1,8,1,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,9,0,0,0,0,0,0,228,12,0,0,0,0,0,0,36,9,0,0,0,0,0,0,228,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,50,1,0,0,0,0,0,232,49,1,0,1,0,0,0,0,0,0,0,2,0,0,0,246,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,255,255,255,0,0,0,0,246,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,246,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,181,2,0,88,181,2,0,72,181,2,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,246,255,255,255,0,0,0,0,112,249,1,0,0,0,0,0,208,250,1,0,1,0,0,0,40,250,1,0,1,0,0,0,144,175,2,0,2,0,0,0,136,175,2,0,3,0,0,0,112,175,2,0,4,0,0,0,56,86,3,0,5,0,0,0,80,175,2,0,6,0,0,0,216,174,2,0,7,0,0,0,0,0,0,0,8,0,0,0,6,0,0,0,0,0,0,0,152,190,2,0,200,181,2,0,200,181,2,0,200,181,2,0,200,181,2,0,200,181,2,0,200,181,2,0,200,181,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) -.concat([136,193,2,0,128,193,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,52,16,0,0,0,0,0,0,120,193,2,0,40,193,2,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,34,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,208,192,2,0,144,192,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,5,16,0,0,0,0,0,0,40,192,2,0,8,192,2,0,108,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,45,16,0,0,0,0,0,0,216,191,2,0,200,191,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,72,16,0,0,0,0,0,0,128,191,2,0,120,191,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,218,64,0,0,0,0,0,0,104,191,2,0,176,98,1,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,3,16,0,0,0,0,0,0,40,191,2,0,16,191,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,101,16,0,0,0,0,0,0,200,190,2,0,136,190,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,6,16,0,0,0,0,0,0,104,190,2,0,80,190,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,17,16,0,0,0,0,0,0,64,190,2,0,32,190,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,1,0,0,0,10,17,0,0,0,0,0,0,8,190,2,0,248,189,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,5,66,0,0,0,0,0,0,216,189,2,0,200,189,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,4,0,0,0,3,0,0,0,44,16,0,0,0,0,0,0,144,189,2,0,24,189,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,1,0,0,0,0,0,0,0,20,16,0,0,0,0,0,0,248,188,2,0,208,188,2,0,21,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,201,16,0,0,0,0,0,0,168,188,2,0,144,188,2,0,109,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,46,65,0,0,0,0,0,0,128,188,2,0,96,188,2,0,108,72,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,1,0,0,0,0,0,0,0,170,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,152,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,1,0,0,0,7,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,7,0,0,0,2,0,0,0,0,0,0,0,32,32,114,117,108,101,114,58,32,91,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,84,2,0,152,190,2,0,152,190,2,0,24,84,2,0,8,84,2,0,248,83,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,73,84,95,76,79,71,0,176,4,0,0,0,0,0,0,176,4,0,0,0,0,0,0,51,46,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,231,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,160,2,0,3,0,0,0,144,195,1,0,1,0,0,0,80,195,1,0,1,0,0,0,80,248,1,0,15,0,0,0,24,160,2,0,12,0,0,0,192,229,1,0,9,0,0,0,240,159,2,0,10,0,0,0,96,255,1,0,4,0,0,0,232,49,1,0,7,0,0,0,200,159,2,0,5,0,0,0,232,195,1,0,0,0,0,0,184,159,2,0,13,0,0,0,152,159,2,0,6,0,0,0,120,97,1,0,8,0,0,0,144,159,2,0,2,0,0,0,232,247,1,0,14,0,0,0,144,245,1,0,11,0,0,0,112,159,2,0,11,0,0,0,24,159,2,0,18,0,0,0,240,158,2,0,16,0,0,0,192,158,2,0,19,0,0,0,176,158,2,0,17,0,0,0,144,158,2,0,20,0,0,0,0,0,0,0,21,0,0,0,4,0,0,0,2,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,6,0,0,0,0,0,0,0,26,0,0,0,11,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,134,1,0,0,0,0,0,176,132,1,0,1,0,0,0,8,131,1,0,2,0,0,0,88,128,1,0,3,0,0,0,0,126,1,0,4,0,0,0,152,123,1,0,5,0,0,0,112,121,1,0,6,0,0,0,208,119,1,0,7,0,0,0,0,118,1,0,8,0,0,0,24,116,1,0,9,0,0,0,80,114,1,0,10,0,0,0,152,111,1,0,11,0,0,0,48,109,1,0,12,0,0,0,232,105,1,0,13,0,0,0,176,102,1,0,14,0,0,0,16,100,1,0,15,0,0,0,216,97,1,0,16,0,0,0,224,95,1,0,17,0,0,0,16,93,1,0,18,0,0,0,32,91,1,0,19,0,0,0,232,88,1,0,20,0,0,0,224,83,1,0,21,0,0,0,200,79,1,0,22,0,0,0,240,74,1,0,23,0,0,0,200,72,1,0,24,0,0,0,128,69,1,0,25,0,0,0,240,65,1,0,26,0,0,0,192,59,1,0,27,0,0,0,216,54,1,0,28,0,0,0,0,52,1,0,29,0,0,0,216,49,1,0,30,0,0,0,8,48,1,0,31,0,0,0,224,45,1,0,32,0,0,0,128,43,1,0,33,0,0,0,56,41,1,0,34,0,0,0,0,0,0,0,255,255,255,255,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,3,0,200,23,3,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,78,1,0,0,138,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,19,3,0,64,19,3,0,0,19,3,0,192,18,3,0,112,18,3,0,16,18,3,0,192,17,3,0,112,17,3,0,208,16,3,0,104,16,3,0,8,16,3,0,232,15,3,0,216,15,3,0,128,15,3,0,248,14,3,0,160,14,3,0,96,14,3,0,56,14,3,0,136,13,3,0,88,13,3,0,224,12,3,0,120,12,3,0,0,12,3,0,184,11,3,0,128,11,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,255,0,255,0,0,0,128,0,128,0,0,0,0,128,128,0,0,0,0,0,128,128,128,0,0,128,64,0,128,128,0,0,128,0,128,0,192,192,192,0,0,255,255,0,255,255,0,0,0,0,0,0,5,0,0,0,8,0,0,0,5,0,0,0,8,0,0,0,5,0,0,0,8,0,0,0,5,0,0,0,8,0,0,0,4,0,0,0,2,0,0,0,4,0,0,0,2,0,0,0,4,0,0,0,2,0,0,0,4,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,4,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,4,0,0,0,2,0,0,0,4,0,0,0,9,0,0,0,4,0,0,0,2,0,0,0,4,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,136,130,1,0,112,130,1,0,48,130,1,0,208,129,1,0,0,129,1,0,200,128,1,0,72,128,1,0,48,128,1,0,32,128,1,0,200,127,1,0,160,127,1,0,120,127,1,0,64,127,1,0,16,127,1,0,176,126,1,0,40,126,1,0,216,125,1,0,168,125,1,0,72,128,1,0,48,128,1,0,200,127,1,0,160,127,1,0,0,0,0,0,0,0,0,0,120,125,1,0,48,125,1,0,248,124,1,0,200,124,1,0,152,124,1,0,104,124,1,0,72,128,1,0,200,127,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,119,1,0,128,119,1,0,88,119,1,0,160,119,1,0,64,119,1,0,0,0,0,0,0,0,0,0,0,0,0,0,160,119,1,0,128,119,1,0,88,119,1,0,16,119,1,0,240,118,1,0,208,118,1,0,120,118,1,0,0,0,0,0,160,119,1,0,128,119,1,0,88,119,1,0,88,119,1,0,88,119,1,0,88,119,1,0,88,119,1,0,88,119,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,10,84,65,66,76,69,10,32,32,50,10,76,84,89,80,69,10,32,55,48,10,32,32,32,32,37,100,10,48,10,76,84,89,80,69,10,32,32,50,10,67,79,78,84,73,78,85,79,85,83,10,32,55,48,10,32,32,32,32,54,52,10,32,32,51,10,83,111,108,105,100,32,108,105,110,101,10,32,55,50,10,32,32,32,32,54,53,10,32,55,51,10,32,32,32,32,32,32,48,10,32,52,48,10,48,46,48,10,32,32,48,10,76,84,89,80,69,10,32,32,50,10,68,65,83,72,69,68,10,32,55,48,10,32,32,32,32,54,52,10,32,32,51,10,95,95,32,95,95,32,95,95,32,95,95,32,95,95,32,95,95,32,95,95,32,95,95,32,95,95,32,95,95,32,95,95,32,95,95,32,95,95,32,95,95,32,95,95,10,32,55,50,10,32,32,32,32,54,53,10,32,55,51,10,32,32,32,32,32,50,10,32,52,48,10,48,46,55,53,10,32,52,57,10,48,46,53,10,32,52,57,10,45,48,46,50,53,10,32,32,48,10,76,84,89,80,69,10,32,32,50,10,72,73,68,68,69,78,10,32,55,48,10,32,32,32,32,54,52,10,32,32,51,10,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,32,95,10,32,55,50,10,32,32,32,32,54,53,10,32,55,51,10,32,32,32,32,32,50,10,32,52,48,10,48,46,51,55,53,10,32,52,57,10,48,46,50,53,10,32,52,57,10,45,48,46,49,50,53,10,32,32,48,10,76,84,89,80,69,10,32,32,50,10,67,69,78,84,69,82,10,32,55,48,10,32,32,32,32,54,52,10,32,32,51,10,95,95,95,95,32,95,32,95,95,95,95,32,95,32,95,95,95,95,32,95,32,95,95,95,95,32,95,32,95,95,95,95,32,95,32,95,95,95,95,32,95,32,95,95,95,95,10,32,55,50,10,32,32,32,32,54,53,10,32,55,51,10,32,32,32,32,32,52,10,32,52,48,10,50,46,48,10,32,52,57,10,49,46,50,53,10,32,52,57,10,45,48,46,50,53,10,32,52,57,10,48,46,50,53,10,32,52,57,10,45,48,46,50,53,10,32,32,48,10,76,84,89,80,69,10,32,32,50,10,80,72,65,78,84,79,77,10,32,55,48,10,32,32,32,32,54,52,10,32,32,51,10,95,95,95,95,95,32,95,32,95,32,95,95,95,95,95,32,95,32,95,32,95,95,95,95,95,32,95,32,95,32,95,95,95,95,95,32,95,32,95,32,95,95,95,95,10,32,55,50,10,32,32,32,32,54,53,10,32,55,51,10,32,32,32,32,32,54,10,32,52,48,10,50,46,53,10,32,52,57,10,49,46,50,53,10,32,52,57,10,45,48,46,50,53,10,32,52,57,10,48,46,50,53,10,32,52,57,10,45,48,46,50,53,10,32,52,57,10,48,46,50,53,10,32,52,57,10,45,48,46,50,53,10,32,32,48,10,76,84,89,80,69,10,32,32,50,10,68,79,84,10,32,55,48,10,32,32,32,32,54,52,10,32,32,51,10,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,10,32,55,50,10,32,32,32,32,54,53,10,32,55,51,10,32,32,32,32,32,50,10,32,52,48,10,48,46,50,53,10,32,52,57,10,48,46,48,10,32,52,57,10,45,48,46,50,53,10,32,32,48,10,76,84,89,80,69,10,32,32,50,10,68,65,83,72,68,79,84,10,32,55,48,10,32,32,32,32,54,52,10,32,32,51,10,95,95,32,46,32,95,95,32,46,32,95,95,32,46,32,95,95,32,46,32,95,95,32,46,32,95,95,32,46,32,95,95,32,46,32,95,95,32,46,32,95,95,32,46,32,95,95,10,32,55,50,10,32,32,32,32,54,53,10,32,55,51,10,32,32,32,32,32,52,10,32,52,48,10,49,46,48,10,32,52,57,10,48,46,53,10,32,52,57,10,45,48,46,50,53,10,32,52,57,10,48,46,48,10,32,52,57,10,45,48,46,50,53,10,32,32,48,10,69,78,68,84,65,66,10,0,0,0,0,0,0,0,57,57,57,10,37,37,32,71,78,85,80,76,79,84,58,32,100,120,102,32,102,105,108,101,32,102,111,114,32,65,117,116,111,67,97,100,10,32,32,48,10,83,69,67,84,73,79,78,10,32,32,50,10,72,69,65,68,69,82,10,32,32,57,10,36,69,88,84,77,73,78,10,32,49,48,10,48,46,48,48,48,10,32,50,48,10,48,46,48,48,48,10,32,32,57,10,36,69,88,84,77,65,88,10,32,49,48,10,37,45,54,46,51,102,10,32,50,48,10,37,45,54,46,51,102,10,32,32,57,10,36,76,73,77,77,73,78,10,32,49,48,10,48,46,48,48,48,10,32,50,48,10,48,46,48,48,48,10,32,32,57,10,36,76,73,77,77,65,88,10,32,49,48,10,37,45,54,46,51,102,10,32,50,48,10,37,45,54,46,51,102,10,32,32,57,10,36,84,69,88,84,83,84,89,76,69,10,32,32,55,10,37,115,10,32,32,57,10,36,84,69,88,84,83,73,90,69,10,32,52,48,10,37,45,54,46,51,102,10,32,32,57,10,36,80,76,73,78,69,87,73,68,10,32,52,48,10,37,45,54,46,52,102,10,32,32,57,10,36,76,84,83,67,65,76,69,10,32,32,52,48,10,37,45,54,46,51,102,10,32,32,57,10,36,67,79,79,82,68,83,10,32,55,48,10,32,32,49,10,32,32,57,10,36,67,69,76,84,89,80,69,10,32,54,10,66,89,76,65,89,69,82,10,32,32,57,10,36,67,76,65,89,69,82,10,32,32,56,10,48,10,32,32,57,10,36,67,69,67,79,76,79,82,10,32,54,50,10,32,32,32,37,115,10,32,32,57,10,36,77,69,78,85,10,32,32,49,10,97,99,97,100,10,32,32,48,10,69,78,68,83,69,67,10,32,32,48,10,83,69,67,84,73,79,78,10,32,32,50,10,84,65,66,76,69,83,10,0,0,0,0,0,208,149,2,0,0,0,0,0,200,149,2,0,1,0,0,0,0,224,1,0,2,0,0,0,184,149,2,0,3,0,0,0,192,253,1,0,4,0,0,0,0,0,0,0,5,0,0,0,42,35,36,37,64,38,61,0,0,0,0,0,0,0,0,0,200,172,3,0,0,0,0,0,255,255,255,255,255,255,15,0,255,0,255,0,255,15,240,0,255,127,240,0,7,7,7,7,255,7,255,7,255,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,136,208,2,0,0,0,0,0,112,249,1,0,1,0,0,0,248,142,2,0,2,0,0,0,224,142,2,0,2,0,0,0,0,0,0,0,3,0,0,0,49,46,48,0,0,0,0,0,50,48,49,49,45,49,49,45,48,53,0,0,0,0,0,0,99,101,110,116,101,114,0,0,0,0,108,101,102,116,0,0,0,0,0,0,114,105,103,104,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,64,0,0,0,0,0,0,8,64,1,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,8,64,1,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,48,254,1,0,0,0,0,0,192,253,1,0,1,0,0,0,88,253,1,0,2,0,0,0,24,253,1,0,3,0,0,0,224,252,1,0,4,0,0,0,144,252,1,0,5,0,0,0,0,252,1,0,6,0,0,0,200,251,1,0,7,0,0,0,72,251,1,0,8,0,0,0,208,250,1,0,9,0,0,0,40,250,1,0,9,0,0,0,112,249,1,0,10,0,0,0,80,248,1,0,11,0,0,0,232,247,1,0,12,0,0,0,128,247,1,0,13,0,0,0,48,26,2,0,14,0,0,0,8,247,1,0,15,0,0,0,16,24,2,0,16,0,0,0,96,3,2,0,17,0,0,0,152,246,1,0,18,0,0,0,48,246,1,0,19,0,0,0,224,245,1,0,19,0,0,0,144,245,1,0,20,0,0,0,40,245,1,0,20,0,0,0,96,244,1,0,21,0,0,0,216,243,1,0,21,0,0,0,128,243,1,0,22,0,0,0,248,242,1,0,23,0,0,0,104,242,1,0,22,0,0,0,8,242,1,0,22,0,0,0,184,241,1,0,23,0,0,0,240,240,1,0,24,0,0,0,120,240,1,0,25,0,0,0,192,229,1,0,27,0,0,0,232,239,1,0,26,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,253,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,50,1,0,0,0,0,0,24,135,2,0,1,0,0,0,224,155,2,0,2,0,0,0,0,135,2,0,11,0,0,0,232,134,2,0,11,0,0,0,152,208,2,0,3,0,0,0,144,195,1,0,4,0,0,0,80,195,1,0,4,0,0,0,56,117,1,0,5,0,0,0,200,134,2,0,6,0,0,0,80,248,1,0,7,0,0,0,40,195,1,0,8,0,0,0,184,134,2,0,9,0,0,0,40,245,1,0,9,0,0,0,176,134,2,0,10,0,0,0,136,82,3,0,12,0,0,0,0,0,0,0,13,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,16,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,5,0,0,0,1,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,1,0,0,0,8,0,0,0,1,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,1,0,0,0,13,0,0,0,2,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,4,0,0,0,2,0,0,0,5,0,0,0,2,0,0,0,6,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,7,0,0,0,4,0,0,0,11,0,0,0,4,0,0,0,12,0,0,0,4,0,0,0,15,0,0,0,4,0,0,0,16,0,0,0,4,0,0,0,17,0,0,0,4,0,0,0,18,0,0,0,4,0,0,0,19,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,3,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,5,0,0,0,8,0,0,0,5,0,0,0,10,0,0,0,5,0,0,0,14,0,0,0,5,0,0,0,15,0,0,0,5,0,0,0,16,0,0,0,5,0,0,0,18,0,0,0,5,0,0,0,22,0,0,0,5,0,0,0,23,0,0,0,5,0,0,0,24,0,0,0,5,0,0,0,27,0,0,0,5,0,0,0,28,0,0,0,5,0,0,0,29,0,0,0,5,0,0,0,30,0,0,0,5,0,0,0,34,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,5,0,0,0,0,0,0,0,4,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,8,0,0,0,5,0,0,0,8,0,0,0,5,0,0,0,8,0,0,0,5,0,0,0,8,0,0,0,5,0,0,0,3,0,0,0,5,0,0,0,3,0,0,0,5,0,0,0,3,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,8,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,8,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,9,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,10,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,10,0,0,0,4,0,0,0,10,0,0,0,4,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,10,0,0,0,4,0,0,0,10,0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,192,229,1,0,1,0,0,0,128,91,2,0,2,0,0,0,64,85,3,0,3,0,0,0,192,253,1,0,0,0,0,0,152,10,2,0,4,0,0,0,136,85,3,0,7,0,0,0,168,85,3,0,7,0,0,0,120,91,2,0,8,0,0,0,0,224,1,0,9,0,0,0,192,218,1,0,10,0,0,0,40,245,1,0,6,0,0,0,144,245,1,0,6,0,0,0,72,91,2,0,5,0,0,0,96,244,1,0,11,0,0,0,176,1,2,0,12,0,0,0,152,82,3,0,13,0,0,0,48,246,1,0,14,0,0,0,224,245,1,0,14,0,0,0,176,82,3,0,15,0,0,0,16,24,2,0,16,0,0,0,136,82,3,0,17,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,128,2,0,8,128,2,0,224,127,2,0,184,127,2,0,40,127,2,0,216,126,2,0,144,126,2,0,120,126,2,0,80,126,2,0,208,125,2,0,168,125,2,0,112,125,2,0,88,125,2,0,16,125,2,0,248,124,2,0,224,124,2,0,192,124,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) -, "i8", ALLOC_NONE, Runtime.GLOBAL_BASE) -function runPostSets() { -} -if (!awaitingMemoryInitializer) runPostSets(); -var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8); -assert(tempDoublePtr % 8 == 0); -function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much - HEAP8[tempDoublePtr] = HEAP8[ptr]; - HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; - HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; - HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; -} -function copyTempDouble(ptr) { - HEAP8[tempDoublePtr] = HEAP8[ptr]; - HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; - HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; - HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; - HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; - HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; - HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; - HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; -} - var _log=Math.log; - var _fabs=Math.abs; - var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:35,EIDRM:36,ECHRNG:37,EL2NSYNC:38,EL3HLT:39,EL3RST:40,ELNRNG:41,EUNATCH:42,ENOCSI:43,EL2HLT:44,EDEADLK:45,ENOLCK:46,EBADE:50,EBADR:51,EXFULL:52,ENOANO:53,EBADRQC:54,EBADSLT:55,EDEADLOCK:56,EBFONT:57,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:74,ELBIN:75,EDOTDOT:76,EBADMSG:77,EFTYPE:79,ENOTUNIQ:80,EBADFD:81,EREMCHG:82,ELIBACC:83,ELIBBAD:84,ELIBSCN:85,ELIBMAX:86,ELIBEXEC:87,ENOSYS:88,ENMFILE:89,ENOTEMPTY:90,ENAMETOOLONG:91,ELOOP:92,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:106,EPROTOTYPE:107,ENOTSOCK:108,ENOPROTOOPT:109,ESHUTDOWN:110,ECONNREFUSED:111,EADDRINUSE:112,ECONNABORTED:113,ENETUNREACH:114,ENETDOWN:115,ETIMEDOUT:116,EHOSTDOWN:117,EHOSTUNREACH:118,EINPROGRESS:119,EALREADY:120,EDESTADDRREQ:121,EMSGSIZE:122,EPROTONOSUPPORT:123,ESOCKTNOSUPPORT:124,EADDRNOTAVAIL:125,ENETRESET:126,EISCONN:127,ENOTCONN:128,ETOOMANYREFS:129,EPROCLIM:130,EUSERS:131,EDQUOT:132,ESTALE:133,ENOTSUP:134,ENOMEDIUM:135,ENOSHARE:136,ECASECLASH:137,EILSEQ:138,EOVERFLOW:139,ECANCELED:140,ENOTRECOVERABLE:141,EOWNERDEAD:142,ESTRPIPE:143}; - var ___errno_state=0;function ___setErrNo(value) { - // For convenient setting and returning of errno. - HEAP32[((___errno_state)>>2)]=value - return value; - } - var _stdin=allocate(1, "i32*", ALLOC_STATIC); - var _stdout=allocate(1, "i32*", ALLOC_STATIC); - var _stderr=allocate(1, "i32*", ALLOC_STATIC); - var __impure_ptr=allocate(1, "i32*", ALLOC_STATIC);var FS={currentPath:"/",nextInode:2,streams:[null],ignorePermissions:true,createFileHandle:function (stream, fd) { - if (typeof stream === 'undefined') { - stream = null; - } - if (!fd) { - if (stream && stream.socket) { - for (var i = 1; i < 64; i++) { - if (!FS.streams[i]) { - fd = i; - break; - } - } - assert(fd, 'ran out of low fds for sockets'); - } else { - fd = Math.max(FS.streams.length, 64); - for (var i = FS.streams.length; i < fd; i++) { - FS.streams[i] = null; // Keep dense - } - } - } - // Close WebSocket first if we are about to replace the fd (i.e. dup2) - if (FS.streams[fd] && FS.streams[fd].socket && FS.streams[fd].socket.close) { - FS.streams[fd].socket.close(); - } - FS.streams[fd] = stream; - return fd; - },removeFileHandle:function (fd) { - FS.streams[fd] = null; - },joinPath:function (parts, forceRelative) { - var ret = parts[0]; - for (var i = 1; i < parts.length; i++) { - if (ret[ret.length-1] != '/') ret += '/'; - ret += parts[i]; - } - if (forceRelative && ret[0] == '/') ret = ret.substr(1); - return ret; - },absolutePath:function (relative, base) { - if (typeof relative !== 'string') return null; - if (base === undefined) base = FS.currentPath; - if (relative && relative[0] == '/') base = ''; - var full = base + '/' + relative; - var parts = full.split('/').reverse(); - var absolute = ['']; - while (parts.length) { - var part = parts.pop(); - if (part == '' || part == '.') { - // Nothing. - } else if (part == '..') { - if (absolute.length > 1) absolute.pop(); - } else { - absolute.push(part); - } - } - return absolute.length == 1 ? '/' : absolute.join('/'); - },analyzePath:function (path, dontResolveLastLink, linksVisited) { - var ret = { - isRoot: false, - exists: false, - error: 0, - name: null, - path: null, - object: null, - parentExists: false, - parentPath: null, - parentObject: null - }; - path = FS.absolutePath(path); - if (path == '/') { - ret.isRoot = true; - ret.exists = ret.parentExists = true; - ret.name = '/'; - ret.path = ret.parentPath = '/'; - ret.object = ret.parentObject = FS.root; - } else if (path !== null) { - linksVisited = linksVisited || 0; - path = path.slice(1).split('/'); - var current = FS.root; - var traversed = ['']; - while (path.length) { - if (path.length == 1 && current.isFolder) { - ret.parentExists = true; - ret.parentPath = traversed.length == 1 ? '/' : traversed.join('/'); - ret.parentObject = current; - ret.name = path[0]; - } - var target = path.shift(); - if (!current.isFolder) { - ret.error = ERRNO_CODES.ENOTDIR; - break; - } else if (!current.read) { - ret.error = ERRNO_CODES.EACCES; - break; - } else if (!current.contents.hasOwnProperty(target)) { - ret.error = ERRNO_CODES.ENOENT; - break; - } - current = current.contents[target]; - if (current.link && !(dontResolveLastLink && path.length == 0)) { - if (linksVisited > 40) { // Usual Linux SYMLOOP_MAX. - ret.error = ERRNO_CODES.ELOOP; - break; - } - var link = FS.absolutePath(current.link, traversed.join('/')); - ret = FS.analyzePath([link].concat(path).join('/'), - dontResolveLastLink, linksVisited + 1); - return ret; - } - traversed.push(target); - if (path.length == 0) { - ret.exists = true; - ret.path = traversed.join('/'); - ret.object = current; - } - } - } - return ret; - },findObject:function (path, dontResolveLastLink) { - FS.ensureRoot(); - var ret = FS.analyzePath(path, dontResolveLastLink); - if (ret.exists) { - return ret.object; - } else { - ___setErrNo(ret.error); - return null; - } - },createObject:function (parent, name, properties, canRead, canWrite) { - if (!parent) parent = '/'; - if (typeof parent === 'string') parent = FS.findObject(parent); - if (!parent) { - ___setErrNo(ERRNO_CODES.EACCES); - throw new Error('Parent path must exist.'); - } - if (!parent.isFolder) { - ___setErrNo(ERRNO_CODES.ENOTDIR); - throw new Error('Parent must be a folder.'); - } - if (!parent.write && !FS.ignorePermissions) { - ___setErrNo(ERRNO_CODES.EACCES); - throw new Error('Parent folder must be writeable.'); - } - if (!name || name == '.' || name == '..') { - ___setErrNo(ERRNO_CODES.ENOENT); - throw new Error('Name must not be empty.'); - } - if (parent.contents.hasOwnProperty(name)) { - ___setErrNo(ERRNO_CODES.EEXIST); - throw new Error("Can't overwrite object."); - } - parent.contents[name] = { - read: canRead === undefined ? true : canRead, - write: canWrite === undefined ? false : canWrite, - timestamp: Date.now(), - inodeNumber: FS.nextInode++ - }; - for (var key in properties) { - if (properties.hasOwnProperty(key)) { - parent.contents[name][key] = properties[key]; - } - } - return parent.contents[name]; - },createFolder:function (parent, name, canRead, canWrite) { - var properties = {isFolder: true, isDevice: false, contents: {}}; - return FS.createObject(parent, name, properties, canRead, canWrite); - },createPath:function (parent, path, canRead, canWrite) { - var current = FS.findObject(parent); - if (current === null) throw new Error('Invalid parent.'); - path = path.split('/').reverse(); - while (path.length) { - var part = path.pop(); - if (!part) continue; - if (!current.contents.hasOwnProperty(part)) { - FS.createFolder(current, part, canRead, canWrite); - } - current = current.contents[part]; - } - return current; - },createFile:function (parent, name, properties, canRead, canWrite) { - properties.isFolder = false; - return FS.createObject(parent, name, properties, canRead, canWrite); - },createDataFile:function (parent, name, data, canRead, canWrite) { - if (typeof data === 'string') { - var dataArray = new Array(data.length); - for (var i = 0, len = data.length; i < len; ++i) dataArray[i] = data.charCodeAt(i); - data = dataArray; - } - var properties = { - isDevice: false, - contents: data.subarray ? data.subarray(0) : data // as an optimization, create a new array wrapper (not buffer) here, to help JS engines understand this object - }; - return FS.createFile(parent, name, properties, canRead, canWrite); - },createLazyFile:function (parent, name, url, canRead, canWrite) { - if (typeof XMLHttpRequest !== 'undefined') { - if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; - // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. - var LazyUint8Array = function() { - this.lengthKnown = false; - this.chunks = []; // Loaded chunks. Index is the chunk number - } - LazyUint8Array.prototype.get = function(idx) { - if (idx > this.length-1 || idx < 0) { - return undefined; - } - var chunkOffset = idx % this.chunkSize; - var chunkNum = Math.floor(idx / this.chunkSize); - return this.getter(chunkNum)[chunkOffset]; - } - LazyUint8Array.prototype.setDataGetter = function(getter) { - this.getter = getter; - } - LazyUint8Array.prototype.cacheLength = function() { - // Find length - var xhr = new XMLHttpRequest(); - xhr.open('HEAD', url, false); - xhr.send(null); - if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); - var datalength = Number(xhr.getResponseHeader("Content-length")); - var header; - var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; - var chunkSize = 1024*1024; // Chunk size in bytes - if (!hasByteServing) chunkSize = datalength; - // Function to get a range from the remote URL. - var doXHR = (function(from, to) { - if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); - if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); - // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, false); - if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); - // Some hints to the browser that we want binary data. - if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; - if (xhr.overrideMimeType) { - xhr.overrideMimeType('text/plain; charset=x-user-defined'); - } - xhr.send(null); - if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); - if (xhr.response !== undefined) { - return new Uint8Array(xhr.response || []); - } else { - return intArrayFromString(xhr.responseText || '', true); - } - }); - var lazyArray = this; - lazyArray.setDataGetter(function(chunkNum) { - var start = chunkNum * chunkSize; - var end = (chunkNum+1) * chunkSize - 1; // including this byte - end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block - if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { - lazyArray.chunks[chunkNum] = doXHR(start, end); - } - if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); - return lazyArray.chunks[chunkNum]; - }); - this._length = datalength; - this._chunkSize = chunkSize; - this.lengthKnown = true; - } - var lazyArray = new LazyUint8Array(); - Object.defineProperty(lazyArray, "length", { - get: function() { - if(!this.lengthKnown) { - this.cacheLength(); - } - return this._length; - } - }); - Object.defineProperty(lazyArray, "chunkSize", { - get: function() { - if(!this.lengthKnown) { - this.cacheLength(); - } - return this._chunkSize; - } - }); - var properties = { isDevice: false, contents: lazyArray }; - } else { - var properties = { isDevice: false, url: url }; - } - return FS.createFile(parent, name, properties, canRead, canWrite); - },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile) { - Browser.init(); - var fullname = FS.joinPath([parent, name], true); - function processData(byteArray) { - function finish(byteArray) { - if (!dontCreateFile) { - FS.createDataFile(parent, name, byteArray, canRead, canWrite); - } - if (onload) onload(); - removeRunDependency('cp ' + fullname); - } - var handled = false; - Module['preloadPlugins'].forEach(function(plugin) { - if (handled) return; - if (plugin['canHandle'](fullname)) { - plugin['handle'](byteArray, fullname, finish, function() { - if (onerror) onerror(); - removeRunDependency('cp ' + fullname); - }); - handled = true; - } - }); - if (!handled) finish(byteArray); - } - addRunDependency('cp ' + fullname); - if (typeof url == 'string') { - Browser.asyncLoad(url, function(byteArray) { - processData(byteArray); - }, onerror); - } else { - processData(url); - } - },createLink:function (parent, name, target, canRead, canWrite) { - var properties = {isDevice: false, link: target}; - return FS.createFile(parent, name, properties, canRead, canWrite); - },createDevice:function (parent, name, input, output) { - if (!(input || output)) { - throw new Error('A device must have at least one callback defined.'); - } - var ops = {isDevice: true, input: input, output: output}; - return FS.createFile(parent, name, ops, Boolean(input), Boolean(output)); - },forceLoadFile:function (obj) { - if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; - var success = true; - if (typeof XMLHttpRequest !== 'undefined') { - throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); - } else if (Module['read']) { - // Command-line. - try { - // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as - // read() will try to parse UTF8. - obj.contents = intArrayFromString(Module['read'](obj.url), true); - } catch (e) { - success = false; - } - } else { - throw new Error('Cannot load without read() or XMLHttpRequest.'); - } - if (!success) ___setErrNo(ERRNO_CODES.EIO); - return success; - },ensureRoot:function () { - if (FS.root) return; - // The main file system tree. All the contents are inside this. - FS.root = { - read: true, - write: true, - isFolder: true, - isDevice: false, - timestamp: Date.now(), - inodeNumber: 1, - contents: {} - }; - },init:function (input, output, error) { - // Make sure we initialize only once. - assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); - FS.init.initialized = true; - FS.ensureRoot(); - // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here - input = input || Module['stdin']; - output = output || Module['stdout']; - error = error || Module['stderr']; - // Default handlers. - var stdinOverridden = true, stdoutOverridden = true, stderrOverridden = true; - if (!input) { - stdinOverridden = false; - input = function() { - if (!input.cache || !input.cache.length) { - var result; - if (typeof window != 'undefined' && - typeof window.prompt == 'function') { - // Browser. - result = window.prompt('Input: '); - if (result === null) result = String.fromCharCode(0); // cancel ==> EOF - } else if (typeof readline == 'function') { - // Command line. - result = readline(); - } - if (!result) result = ''; - input.cache = intArrayFromString(result + '\n', true); - } - return input.cache.shift(); - }; - } - var utf8 = new Runtime.UTF8Processor(); - function simpleOutput(val) { - if (val === null || val === 10) { - output.printer(output.buffer.join('')); - output.buffer = []; - } else { - output.buffer.push(utf8.processCChar(val)); - } - } - if (!output) { - stdoutOverridden = false; - output = simpleOutput; - } - if (!output.printer) output.printer = Module['print']; - if (!output.buffer) output.buffer = []; - if (!error) { - stderrOverridden = false; - error = simpleOutput; - } - if (!error.printer) error.printer = Module['print']; - if (!error.buffer) error.buffer = []; - // Create the temporary folder, if not already created - try { - FS.createFolder('/', 'tmp', true, true); - } catch(e) {} - // Create the I/O devices. - var devFolder = FS.createFolder('/', 'dev', true, true); - var stdin = FS.createDevice(devFolder, 'stdin', input); - var stdout = FS.createDevice(devFolder, 'stdout', null, output); - var stderr = FS.createDevice(devFolder, 'stderr', null, error); - FS.createDevice(devFolder, 'tty', input, output); - FS.createDevice(devFolder, 'null', function(){}, function(){}); - // Create default streams. - FS.streams[1] = { - path: '/dev/stdin', - object: stdin, - position: 0, - isRead: true, - isWrite: false, - isAppend: false, - isTerminal: !stdinOverridden, - error: false, - eof: false, - ungotten: [] - }; - FS.streams[2] = { - path: '/dev/stdout', - object: stdout, - position: 0, - isRead: false, - isWrite: true, - isAppend: false, - isTerminal: !stdoutOverridden, - error: false, - eof: false, - ungotten: [] - }; - FS.streams[3] = { - path: '/dev/stderr', - object: stderr, - position: 0, - isRead: false, - isWrite: true, - isAppend: false, - isTerminal: !stderrOverridden, - error: false, - eof: false, - ungotten: [] - }; - // TODO: put these low in memory like we used to assert on: assert(Math.max(_stdin, _stdout, _stderr) < 15000); // make sure these are low, we flatten arrays with these - HEAP32[((_stdin)>>2)]=1; - HEAP32[((_stdout)>>2)]=2; - HEAP32[((_stderr)>>2)]=3; - // Other system paths - FS.createPath('/', 'dev/shm/tmp', true, true); // temp files - // Newlib initialization - for (var i = FS.streams.length; i < Math.max(_stdin, _stdout, _stderr) + 4; i++) { - FS.streams[i] = null; // Make sure to keep FS.streams dense - } - FS.streams[_stdin] = FS.streams[1]; - FS.streams[_stdout] = FS.streams[2]; - FS.streams[_stderr] = FS.streams[3]; - allocate([ allocate( - [0, 0, 0, 0, _stdin, 0, 0, 0, _stdout, 0, 0, 0, _stderr, 0, 0, 0], - 'void*', ALLOC_NORMAL) ], 'void*', ALLOC_NONE, __impure_ptr); - },quit:function () { - if (!FS.init.initialized) return; - // Flush any partially-printed lines in stdout and stderr. Careful, they may have been closed - if (FS.streams[2] && FS.streams[2].object.output.buffer.length > 0) FS.streams[2].object.output(10); - if (FS.streams[3] && FS.streams[3].object.output.buffer.length > 0) FS.streams[3].object.output(10); - },standardizePath:function (path) { - if (path.substr(0, 2) == './') path = path.substr(2); - return path; - },deleteFile:function (path) { - path = FS.analyzePath(path); - if (!path.parentExists || !path.exists) { - throw 'Invalid path ' + path; - } - delete path.parentObject.contents[path.name]; - }}; - function _send(fd, buf, len, flags) { - var info = FS.streams[fd]; - if (!info) return -1; - info.sender(HEAPU8.subarray(buf, buf+len)); - return len; - } - function _pwrite(fildes, buf, nbyte, offset) { - // ssize_t pwrite(int fildes, const void *buf, size_t nbyte, off_t offset); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html - var stream = FS.streams[fildes]; - if (!stream || stream.object.isDevice) { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } else if (!stream.isWrite) { - ___setErrNo(ERRNO_CODES.EACCES); - return -1; - } else if (stream.object.isFolder) { - ___setErrNo(ERRNO_CODES.EISDIR); - return -1; - } else if (nbyte < 0 || offset < 0) { - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } else { - var contents = stream.object.contents; - while (contents.length < offset) contents.push(0); - for (var i = 0; i < nbyte; i++) { - contents[offset + i] = HEAPU8[(((buf)+(i))|0)]; - } - stream.object.timestamp = Date.now(); - return i; - } - }function _write(fildes, buf, nbyte) { - // ssize_t write(int fildes, const void *buf, size_t nbyte); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html - var stream = FS.streams[fildes]; - if (stream && ('socket' in stream)) { - return _send(fildes, buf, nbyte, 0); - } else if (!stream) { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } else if (!stream.isWrite) { - ___setErrNo(ERRNO_CODES.EACCES); - return -1; - } else if (nbyte < 0) { - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } else { - if (stream.object.isDevice) { - if (stream.object.output) { - for (var i = 0; i < nbyte; i++) { - try { - stream.object.output(HEAP8[(((buf)+(i))|0)]); - } catch (e) { - ___setErrNo(ERRNO_CODES.EIO); - return -1; - } - } - stream.object.timestamp = Date.now(); - return i; - } else { - ___setErrNo(ERRNO_CODES.ENXIO); - return -1; - } - } else { - var bytesWritten = _pwrite(fildes, buf, nbyte, stream.position); - if (bytesWritten != -1) stream.position += bytesWritten; - return bytesWritten; - } - } - }function _fwrite(ptr, size, nitems, stream) { - // size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fwrite.html - var bytesToWrite = nitems * size; - if (bytesToWrite == 0) return 0; - var bytesWritten = _write(stream, ptr, bytesToWrite); - if (bytesWritten == -1) { - if (FS.streams[stream]) FS.streams[stream].error = true; - return 0; - } else { - return Math.floor(bytesWritten / size); - } - } - Module["_strlen"] = _strlen; - function __reallyNegative(x) { - return x < 0 || (x === 0 && (1/x) === -Infinity); - }function __formatString(format, varargs) { - var textIndex = format; - var argIndex = 0; - function getNextArg(type) { - // NOTE: Explicitly ignoring type safety. Otherwise this fails: - // int x = 4; printf("%c\n", (char)x); - var ret; - if (type === 'double') { - ret = HEAPF64[(((varargs)+(argIndex))>>3)]; - } else if (type == 'i64') { - ret = [HEAP32[(((varargs)+(argIndex))>>2)], - HEAP32[(((varargs)+(argIndex+8))>>2)]]; - argIndex += 8; // each 32-bit chunk is in a 64-bit block - } else { - type = 'i32'; // varargs are always i32, i64, or double - ret = HEAP32[(((varargs)+(argIndex))>>2)]; - } - argIndex += Math.max(Runtime.getNativeFieldSize(type), Runtime.getAlignSize(type, null, true)); - return ret; - } - var ret = []; - var curr, next, currArg; - while(1) { - var startTextIndex = textIndex; - curr = HEAP8[(textIndex)]; - if (curr === 0) break; - next = HEAP8[((textIndex+1)|0)]; - if (curr == 37) { - // Handle flags. - var flagAlwaysSigned = false; - var flagLeftAlign = false; - var flagAlternative = false; - var flagZeroPad = false; - flagsLoop: while (1) { - switch (next) { - case 43: - flagAlwaysSigned = true; - break; - case 45: - flagLeftAlign = true; - break; - case 35: - flagAlternative = true; - break; - case 48: - if (flagZeroPad) { - break flagsLoop; - } else { - flagZeroPad = true; - break; - } - default: - break flagsLoop; - } - textIndex++; - next = HEAP8[((textIndex+1)|0)]; - } - // Handle width. - var width = 0; - if (next == 42) { - width = getNextArg('i32'); - textIndex++; - next = HEAP8[((textIndex+1)|0)]; - } else { - while (next >= 48 && next <= 57) { - width = width * 10 + (next - 48); - textIndex++; - next = HEAP8[((textIndex+1)|0)]; - } - } - // Handle precision. - var precisionSet = false; - if (next == 46) { - var precision = 0; - precisionSet = true; - textIndex++; - next = HEAP8[((textIndex+1)|0)]; - if (next == 42) { - precision = getNextArg('i32'); - textIndex++; - } else { - while(1) { - var precisionChr = HEAP8[((textIndex+1)|0)]; - if (precisionChr < 48 || - precisionChr > 57) break; - precision = precision * 10 + (precisionChr - 48); - textIndex++; - } - } - next = HEAP8[((textIndex+1)|0)]; - } else { - var precision = 6; // Standard default. - } - // Handle integer sizes. WARNING: These assume a 32-bit architecture! - var argSize; - switch (String.fromCharCode(next)) { - case 'h': - var nextNext = HEAP8[((textIndex+2)|0)]; - if (nextNext == 104) { - textIndex++; - argSize = 1; // char (actually i32 in varargs) - } else { - argSize = 2; // short (actually i32 in varargs) - } - break; - case 'l': - var nextNext = HEAP8[((textIndex+2)|0)]; - if (nextNext == 108) { - textIndex++; - argSize = 8; // long long - } else { - argSize = 4; // long - } - break; - case 'L': // long long - case 'q': // int64_t - case 'j': // intmax_t - argSize = 8; - break; - case 'z': // size_t - case 't': // ptrdiff_t - case 'I': // signed ptrdiff_t or unsigned size_t - argSize = 4; - break; - default: - argSize = null; - } - if (argSize) textIndex++; - next = HEAP8[((textIndex+1)|0)]; - // Handle type specifier. - switch (String.fromCharCode(next)) { - case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': { - // Integer. - var signed = next == 100 || next == 105; - argSize = argSize || 4; - var currArg = getNextArg('i' + (argSize * 8)); - var origArg = currArg; - var argText; - // Flatten i64-1 [low, high] into a (slightly rounded) double - if (argSize == 8) { - currArg = Runtime.makeBigInt(currArg[0], currArg[1], next == 117); - } - // Truncate to requested size. - if (argSize <= 4) { - var limit = Math.pow(256, argSize) - 1; - currArg = (signed ? reSign : unSign)(currArg & limit, argSize * 8); - } - // Format the number. - var currAbsArg = Math.abs(currArg); - var prefix = ''; - if (next == 100 || next == 105) { - if (argSize == 8 && i64Math) argText = i64Math.stringify(origArg[0], origArg[1], null); else - argText = reSign(currArg, 8 * argSize, 1).toString(10); - } else if (next == 117) { - if (argSize == 8 && i64Math) argText = i64Math.stringify(origArg[0], origArg[1], true); else - argText = unSign(currArg, 8 * argSize, 1).toString(10); - currArg = Math.abs(currArg); - } else if (next == 111) { - argText = (flagAlternative ? '0' : '') + currAbsArg.toString(8); - } else if (next == 120 || next == 88) { - prefix = (flagAlternative && currArg != 0) ? '0x' : ''; - if (argSize == 8 && i64Math) { - if (origArg[1]) { - argText = (origArg[1]>>>0).toString(16); - var lower = (origArg[0]>>>0).toString(16); - while (lower.length < 8) lower = '0' + lower; - argText += lower; - } else { - argText = (origArg[0]>>>0).toString(16); - } - } else - if (currArg < 0) { - // Represent negative numbers in hex as 2's complement. - currArg = -currArg; - argText = (currAbsArg - 1).toString(16); - var buffer = []; - for (var i = 0; i < argText.length; i++) { - buffer.push((0xF - parseInt(argText[i], 16)).toString(16)); - } - argText = buffer.join(''); - while (argText.length < argSize * 2) argText = 'f' + argText; - } else { - argText = currAbsArg.toString(16); - } - if (next == 88) { - prefix = prefix.toUpperCase(); - argText = argText.toUpperCase(); - } - } else if (next == 112) { - if (currAbsArg === 0) { - argText = '(nil)'; - } else { - prefix = '0x'; - argText = currAbsArg.toString(16); - } - } - if (precisionSet) { - while (argText.length < precision) { - argText = '0' + argText; - } - } - // Add sign if needed - if (flagAlwaysSigned) { - if (currArg < 0) { - prefix = '-' + prefix; - } else { - prefix = '+' + prefix; - } - } - // Add padding. - while (prefix.length + argText.length < width) { - if (flagLeftAlign) { - argText += ' '; - } else { - if (flagZeroPad) { - argText = '0' + argText; - } else { - prefix = ' ' + prefix; - } - } - } - // Insert the result into the buffer. - argText = prefix + argText; - argText.split('').forEach(function(chr) { - ret.push(chr.charCodeAt(0)); - }); - break; - } - case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': { - // Float. - var currArg = getNextArg('double'); - var argText; - if (isNaN(currArg)) { - argText = 'nan'; - flagZeroPad = false; - } else if (!isFinite(currArg)) { - argText = (currArg < 0 ? '-' : '') + 'inf'; - flagZeroPad = false; - } else { - var isGeneral = false; - var effectivePrecision = Math.min(precision, 20); - // Convert g/G to f/F or e/E, as per: - // http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html - if (next == 103 || next == 71) { - isGeneral = true; - precision = precision || 1; - var exponent = parseInt(currArg.toExponential(effectivePrecision).split('e')[1], 10); - if (precision > exponent && exponent >= -4) { - next = ((next == 103) ? 'f' : 'F').charCodeAt(0); - precision -= exponent + 1; - } else { - next = ((next == 103) ? 'e' : 'E').charCodeAt(0); - precision--; - } - effectivePrecision = Math.min(precision, 20); - } - if (next == 101 || next == 69) { - argText = currArg.toExponential(effectivePrecision); - // Make sure the exponent has at least 2 digits. - if (/[eE][-+]\d$/.test(argText)) { - argText = argText.slice(0, -1) + '0' + argText.slice(-1); - } - } else if (next == 102 || next == 70) { - argText = currArg.toFixed(effectivePrecision); - if (currArg === 0 && __reallyNegative(currArg)) { - argText = '-' + argText; - } - } - var parts = argText.split('e'); - if (isGeneral && !flagAlternative) { - // Discard trailing zeros and periods. - while (parts[0].length > 1 && parts[0].indexOf('.') != -1 && - (parts[0].slice(-1) == '0' || parts[0].slice(-1) == '.')) { - parts[0] = parts[0].slice(0, -1); - } - } else { - // Make sure we have a period in alternative mode. - if (flagAlternative && argText.indexOf('.') == -1) parts[0] += '.'; - // Zero pad until required precision. - while (precision > effectivePrecision++) parts[0] += '0'; - } - argText = parts[0] + (parts.length > 1 ? 'e' + parts[1] : ''); - // Capitalize 'E' if needed. - if (next == 69) argText = argText.toUpperCase(); - // Add sign. - if (flagAlwaysSigned && currArg >= 0) { - argText = '+' + argText; - } - } - // Add padding. - while (argText.length < width) { - if (flagLeftAlign) { - argText += ' '; - } else { - if (flagZeroPad && (argText[0] == '-' || argText[0] == '+')) { - argText = argText[0] + '0' + argText.slice(1); - } else { - argText = (flagZeroPad ? '0' : ' ') + argText; - } - } - } - // Adjust case. - if (next < 97) argText = argText.toUpperCase(); - // Insert the result into the buffer. - argText.split('').forEach(function(chr) { - ret.push(chr.charCodeAt(0)); - }); - break; - } - case 's': { - // String. - var arg = getNextArg('i8*'); - var argLength = arg ? _strlen(arg) : '(null)'.length; - if (precisionSet) argLength = Math.min(argLength, precision); - if (!flagLeftAlign) { - while (argLength < width--) { - ret.push(32); - } - } - if (arg) { - for (var i = 0; i < argLength; i++) { - ret.push(HEAPU8[((arg++)|0)]); - } - } else { - ret = ret.concat(intArrayFromString('(null)'.substr(0, argLength), true)); - } - if (flagLeftAlign) { - while (argLength < width--) { - ret.push(32); - } - } - break; - } - case 'c': { - // Character. - if (flagLeftAlign) ret.push(getNextArg('i8')); - while (--width > 0) { - ret.push(32); - } - if (!flagLeftAlign) ret.push(getNextArg('i8')); - break; - } - case 'n': { - // Write the length written so far to the next parameter. - var ptr = getNextArg('i32*'); - HEAP32[((ptr)>>2)]=ret.length - break; - } - case '%': { - // Literal percent sign. - ret.push(curr); - break; - } - default: { - // Unknown specifiers remain untouched. - for (var i = startTextIndex; i < textIndex + 2; i++) { - ret.push(HEAP8[(i)]); - } - } - } - textIndex += 2; - // TODO: Support a/A (hex float) and m (last error) specifiers. - // TODO: Support %1${specifier} for arg selection. - } else { - ret.push(curr); - textIndex += 1; - } - } - return ret; - }function _fprintf(stream, format, varargs) { - // int fprintf(FILE *restrict stream, const char *restrict format, ...); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html - var result = __formatString(format, varargs); - var stack = Runtime.stackSave(); - var ret = _fwrite(allocate(result, 'i8', ALLOC_STACK), 1, result.length, stream); - Runtime.stackRestore(stack); - return ret; - } - Module["_strcpy"] = _strcpy; - function _strncmp(px, py, n) { - var i = 0; - while (i < n) { - var x = HEAPU8[(((px)+(i))|0)]; - var y = HEAPU8[(((py)+(i))|0)]; - if (x == y && x == 0) return 0; - if (x == 0) return -1; - if (y == 0) return 1; - if (x == y) { - i ++; - continue; - } else { - return x > y ? 1 : -1; - } - } - return 0; - }function _strcmp(px, py) { - return _strncmp(px, py, TOTAL_MEMORY); - } - var _exp=Math.exp; - var _ceil=Math.ceil; - function _log10(x) { - return Math.log(x) / Math.LN10; - } - function _snprintf(s, n, format, varargs) { - // int snprintf(char *restrict s, size_t n, const char *restrict format, ...); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html - var result = __formatString(format, varargs); - var limit = (n === undefined) ? result.length - : Math.min(result.length, Math.max(n - 1, 0)); - if (s < 0) { - s = -s; - var buf = _malloc(limit+1); - HEAP32[((s)>>2)]=buf; - s = buf; - } - for (var i = 0; i < limit; i++) { - HEAP8[(((s)+(i))|0)]=result[i]; - } - if (limit < n || (n === undefined)) HEAP8[(((s)+(i))|0)]=0; - return result.length; - }function _sprintf(s, format, varargs) { - // int sprintf(char *restrict s, const char *restrict format, ...); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html - return _snprintf(s, undefined, format, varargs); - } - Module["_strcat"] = _strcat; - function _strchr(ptr, chr) { - ptr--; - do { - ptr++; - var val = HEAP8[(ptr)]; - if (val == chr) return ptr; - } while (val); - return 0; - } - var _floor=Math.floor; - var _llvm_pow_f64=Math.pow; - Module["_memcpy"] = _memcpy;var _llvm_memcpy_p0i8_p0i8_i32=_memcpy; - Module["_memset"] = _memset;var _llvm_memset_p0i8_i32=_memset; - function _ftell(stream) { - // long ftell(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/ftell.html - if (FS.streams[stream]) { - stream = FS.streams[stream]; - if (stream.object.isDevice) { - ___setErrNo(ERRNO_CODES.ESPIPE); - return -1; - } else { - return stream.position; - } - } else { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } - } - function _lseek(fildes, offset, whence) { - // off_t lseek(int fildes, off_t offset, int whence); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/lseek.html - if (FS.streams[fildes] && !FS.streams[fildes].object.isDevice) { - var stream = FS.streams[fildes]; - var position = offset; - if (whence === 1) { // SEEK_CUR. - position += stream.position; - } else if (whence === 2) { // SEEK_END. - position += stream.object.contents.length; - } - if (position < 0) { - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } else { - stream.ungotten = []; - stream.position = position; - return position; - } - } else { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } - }function _fseek(stream, offset, whence) { - // int fseek(FILE *stream, long offset, int whence); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fseek.html - var ret = _lseek(stream, offset, whence); - if (ret == -1) { - return -1; - } else { - FS.streams[stream].eof = false; - return 0; - } - }function _rewind(stream) { - // void rewind(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/rewind.html - _fseek(stream, 0, 0); // SEEK_SET. - if (FS.streams[stream]) FS.streams[stream].error = false; - } - function _recv(fd, buf, len, flags) { - var info = FS.streams[fd]; - if (!info) return -1; - if (!info.hasData()) { - ___setErrNo(ERRNO_CODES.EAGAIN); // no data, and all sockets are nonblocking, so this is the right behavior - return -1; - } - var buffer = info.inQueue.shift(); - if (len < buffer.length) { - if (info.stream) { - // This is tcp (reliable), so if not all was read, keep it - info.inQueue.unshift(buffer.subarray(len)); - } - buffer = buffer.subarray(0, len); - } - HEAPU8.set(buffer, buf); - return buffer.length; - } - function _pread(fildes, buf, nbyte, offset) { - // ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/read.html - var stream = FS.streams[fildes]; - if (!stream || stream.object.isDevice) { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } else if (!stream.isRead) { - ___setErrNo(ERRNO_CODES.EACCES); - return -1; - } else if (stream.object.isFolder) { - ___setErrNo(ERRNO_CODES.EISDIR); - return -1; - } else if (nbyte < 0 || offset < 0) { - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } else { - var bytesRead = 0; - while (stream.ungotten.length && nbyte > 0) { - HEAP8[((buf++)|0)]=stream.ungotten.pop() - nbyte--; - bytesRead++; - } - var contents = stream.object.contents; - var size = Math.min(contents.length - offset, nbyte); - if (contents.subarray) { // typed array - HEAPU8.set(contents.subarray(offset, offset+size), buf); - } else - if (contents.slice) { // normal array - for (var i = 0; i < size; i++) { - HEAP8[(((buf)+(i))|0)]=contents[offset + i] - } - } else { - for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR - HEAP8[(((buf)+(i))|0)]=contents.get(offset + i) - } - } - bytesRead += size; - return bytesRead; - } - }function _read(fildes, buf, nbyte) { - // ssize_t read(int fildes, void *buf, size_t nbyte); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/read.html - var stream = FS.streams[fildes]; - if (stream && ('socket' in stream)) { - return _recv(fildes, buf, nbyte, 0); - } else if (!stream) { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } else if (!stream.isRead) { - ___setErrNo(ERRNO_CODES.EACCES); - return -1; - } else if (nbyte < 0) { - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } else { - var bytesRead; - if (stream.object.isDevice) { - if (stream.object.input) { - bytesRead = 0; - while (stream.ungotten.length && nbyte > 0) { - HEAP8[((buf++)|0)]=stream.ungotten.pop() - nbyte--; - bytesRead++; - } - for (var i = 0; i < nbyte; i++) { - try { - var result = stream.object.input(); - } catch (e) { - ___setErrNo(ERRNO_CODES.EIO); - return -1; - } - if (result === undefined && bytesRead === 0) { - ___setErrNo(ERRNO_CODES.EAGAIN); - return -1; - } - if (result === null || result === undefined) break; - bytesRead++; - HEAP8[(((buf)+(i))|0)]=result - } - return bytesRead; - } else { - ___setErrNo(ERRNO_CODES.ENXIO); - return -1; - } - } else { - var ungotSize = stream.ungotten.length; - bytesRead = _pread(fildes, buf, nbyte, stream.position); - if (bytesRead != -1) { - stream.position += (stream.ungotten.length - ungotSize) + bytesRead; - } - return bytesRead; - } - } - }function _fread(ptr, size, nitems, stream) { - // size_t fread(void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fread.html - var bytesToRead = nitems * size; - if (bytesToRead == 0) return 0; - var bytesRead = _read(stream, ptr, bytesToRead); - var streamObj = FS.streams[stream]; - if (bytesRead == -1) { - if (streamObj) streamObj.error = true; - return 0; - } else { - if (bytesRead < bytesToRead) streamObj.eof = true; - return Math.floor(bytesRead / size); - } - } - function _close(fildes) { - // int close(int fildes); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/close.html - if (FS.streams[fildes]) { - if (FS.streams[fildes].currentEntry) { - _free(FS.streams[fildes].currentEntry); - } - FS.streams[fildes] = null; - return 0; - } else { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } - } - function _fsync(fildes) { - // int fsync(int fildes); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fsync.html - if (FS.streams[fildes]) { - // We write directly to the file system, so there's nothing to do here. - return 0; - } else { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } - }function _fclose(stream) { - // int fclose(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fclose.html - _fsync(stream); - return _close(stream); - } - function _strcspn(pstr, pset) { - var str = pstr, set, strcurr, setcurr; - while (1) { - strcurr = HEAP8[(str)]; - if (!strcurr) return str - pstr; - set = pset; - while (1) { - setcurr = HEAP8[(set)]; - if (!setcurr || setcurr == strcurr) break; - set++; - } - if (setcurr) return str - pstr; - str++; - } - } - Module["_strncpy"] = _strncpy; - function _isspace(chr) { - return chr in { 32: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0 }; - }function __parseInt(str, endptr, base, min, max, bits, unsign) { - // Skip space. - while (_isspace(HEAP8[(str)])) str++; - // Check for a plus/minus sign. - var multiplier = 1; - if (HEAP8[(str)] == 45) { - multiplier = -1; - str++; - } else if (HEAP8[(str)] == 43) { - str++; - } - // Find base. - var finalBase = base; - if (!finalBase) { - if (HEAP8[(str)] == 48) { - if (HEAP8[((str+1)|0)] == 120 || - HEAP8[((str+1)|0)] == 88) { - finalBase = 16; - str += 2; - } else { - finalBase = 8; - str++; - } - } - } else if (finalBase==16) { - if (HEAP8[(str)] == 48) { - if (HEAP8[((str+1)|0)] == 120 || - HEAP8[((str+1)|0)] == 88) { - str += 2; - } - } - } - if (!finalBase) finalBase = 10; - // Get digits. - var chr; - var ret = 0; - while ((chr = HEAP8[(str)]) != 0) { - var digit = parseInt(String.fromCharCode(chr), finalBase); - if (isNaN(digit)) { - break; - } else { - ret = ret * finalBase + digit; - str++; - } - } - // Apply sign. - ret *= multiplier; - // Set end pointer. - if (endptr) { - HEAP32[((endptr)>>2)]=str - } - // Unsign if needed. - if (unsign) { - if (Math.abs(ret) > max) { - ret = max; - ___setErrNo(ERRNO_CODES.ERANGE); - } else { - ret = unSign(ret, bits); - } - } - // Validate range. - if (ret > max || ret < min) { - ret = ret > max ? max : min; - ___setErrNo(ERRNO_CODES.ERANGE); - } - if (bits == 64) { - return ((asm["setTempRet0"](Math.min(Math.floor((ret)/(+(4294967296))), (+(4294967295)))>>>0),ret>>>0)|0); - } - return ret; - }function _strtol(str, endptr, base) { - return __parseInt(str, endptr, base, -2147483648, 2147483647, 32); // LONG_MIN, LONG_MAX. - }function _atoi(ptr) { - return _strtol(ptr, null, 10); - } - function _strstr(ptr1, ptr2) { - var check = 0, start; - do { - if (!check) { - start = ptr1; - check = ptr2; - } - var curr1 = HEAP8[((ptr1++)|0)]; - var curr2 = HEAP8[((check++)|0)]; - if (curr2 == 0) return start; - if (curr2 != curr1) { - // rewind to one character after start, to find ez in eeez - ptr1 = start + 1; - check = 0; - } - } while (curr1); - return 0; - } - Module["_memcmp"] = _memcmp; - function _fputs(s, stream) { - // int fputs(const char *restrict s, FILE *restrict stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fputs.html - return _write(stream, s, _strlen(s)); - } - Module["_memmove"] = _memmove;var _llvm_memmove_p0i8_p0i8_i32=_memmove; - function _fflush(stream) { - // int fflush(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fflush.html - var flush = function(filedes) { - // Right now we write all data directly, except for output devices. - if (FS.streams[filedes] && FS.streams[filedes].object.output) { - if (!FS.streams[filedes].isTerminal) { // don't flush terminals, it would cause a \n to also appear - FS.streams[filedes].object.output(null); - } - } - }; - try { - if (stream === 0) { - for (var i = 0; i < FS.streams.length; i++) if (FS.streams[i]) flush(i); - } else { - flush(stream); - } - return 0; - } catch (e) { - ___setErrNo(ERRNO_CODES.EIO); - return -1; - } - } - function __exit(status) { - // void _exit(int status); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html - function ExitStatus() { - this.name = "ExitStatus"; - this.message = "Program terminated with exit(" + status + ")"; - this.status = status; - Module.print('Exit Status: ' + status); - }; - ExitStatus.prototype = new Error(); - ExitStatus.prototype.constructor = ExitStatus; - exitRuntime(); - ABORT = true; - throw new ExitStatus(); - }function _exit(status) { - __exit(status); - } - function _fgetc(stream) { - // int fgetc(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fgetc.html - if (!FS.streams[stream]) return -1; - var streamObj = FS.streams[stream]; - if (streamObj.eof || streamObj.error) return -1; - var ret = _read(stream, _fgetc.ret, 1); - if (ret == 0) { - streamObj.eof = true; - return -1; - } else if (ret == -1) { - streamObj.error = true; - return -1; - } else { - return HEAPU8[((_fgetc.ret)|0)]; - } - }function _fgets(s, n, stream) { - // char *fgets(char *restrict s, int n, FILE *restrict stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fgets.html - if (!FS.streams[stream]) return 0; - var streamObj = FS.streams[stream]; - if (streamObj.error || streamObj.eof) return 0; - var byte_; - for (var i = 0; i < n - 1 && byte_ != 10; i++) { - byte_ = _fgetc(stream); - if (byte_ == -1) { - if (streamObj.error || (streamObj.eof && i == 0)) return 0; - else if (streamObj.eof) break; - } - HEAP8[(((s)+(i))|0)]=byte_ - } - HEAP8[(((s)+(i))|0)]=0 - return s; - } - function _usleep(useconds) { - // int usleep(useconds_t useconds); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/usleep.html - // We're single-threaded, so use a busy loop. Super-ugly. - var msec = useconds / 1000; - var start = Date.now(); - while (Date.now() - start < msec) { - // Do nothing. - } - return 0; - } - function _fputc(c, stream) { - // int fputc(int c, FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fputc.html - var chr = unSign(c & 0xFF); - HEAP8[((_fputc.ret)|0)]=chr - var ret = _write(stream, _fputc.ret, 1); - if (ret == -1) { - if (FS.streams[stream]) FS.streams[stream].error = true; - return -1; - } else { - return chr; - } - } - function _pclose(stream) { - // int pclose(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/pclose.html - // We allow only one process, so no pipes. - ___setErrNo(ERRNO_CODES.ECHILD); - return -1; - } - function _puts(s) { - // int puts(const char *s); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/puts.html - // NOTE: puts() always writes an extra newline. - var stdout = HEAP32[((_stdout)>>2)]; - var ret = _fputs(s, stdout); - if (ret < 0) { - return ret; - } else { - var newlineRet = _fputc(10, stdout); - return (newlineRet < 0) ? -1 : ret + 1; - } - } - var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"No message of desired type",36:"Identifier removed",37:"Channel number out of range",38:"Level 2 not synchronized",39:"Level 3 halted",40:"Level 3 reset",41:"Link number out of range",42:"Protocol driver not attached",43:"No CSI structure available",44:"Level 2 halted",45:"Deadlock condition",46:"No record locks available",50:"Invalid exchange",51:"Invalid request descriptor",52:"Exchange full",53:"No anode",54:"Invalid request code",55:"Invalid slot",56:"File locking deadlock error",57:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",74:"Multihop attempted",75:"Inode is remote (not really error)",76:"Cross mount point (not really error)",77:"Trying to read unreadable message",79:"Inappropriate file type or format",80:"Given log. name not unique",81:"f.d. invalid for this operation",82:"Remote address changed",83:"Can\t access a needed shared lib",84:"Accessing a corrupted shared lib",85:".lib section in a.out corrupted",86:"Attempting to link in too many libs",87:"Attempting to exec a shared library",88:"Function not implemented",89:"No more files",90:"Directory not empty",91:"File or path name too long",92:"Too many symbolic links",95:"Operation not supported on transport endpoint",96:"Protocol family not supported",104:"Connection reset by peer",105:"No buffer space available",106:"Address family not supported by protocol family",107:"Protocol wrong type for socket",108:"Socket operation on non-socket",109:"Protocol not available",110:"Can't send after socket shutdown",111:"Connection refused",112:"Address already in use",113:"Connection aborted",114:"Network is unreachable",115:"Network interface is not configured",116:"Connection timed out",117:"Host is down",118:"Host is unreachable",119:"Connection already in progress",120:"Socket already connected",121:"Destination address required",122:"Message too long",123:"Unknown protocol",124:"Socket type not supported",125:"Address not available",126:"ENETRESET",127:"Socket is already connected",128:"Socket is not connected",129:"TOOMANYREFS",130:"EPROCLIM",131:"EUSERS",132:"EDQUOT",133:"ESTALE",134:"Not supported",135:"No medium (in tape drive)",136:"No such host or network path",137:"Filename exists with different case",138:"EILSEQ",139:"Value too large for defined data type",140:"Operation canceled",141:"State not recoverable",142:"Previous owner died",143:"Streams pipe error"};function _strerror_r(errnum, strerrbuf, buflen) { - if (errnum in ERRNO_MESSAGES) { - if (ERRNO_MESSAGES[errnum].length > buflen - 1) { - return ___setErrNo(ERRNO_CODES.ERANGE); - } else { - var msg = ERRNO_MESSAGES[errnum]; - for (var i = 0; i < msg.length; i++) { - HEAP8[(((strerrbuf)+(i))|0)]=msg.charCodeAt(i) - } - HEAP8[(((strerrbuf)+(i))|0)]=0 - return 0; - } - } else { - return ___setErrNo(ERRNO_CODES.EINVAL); - } - }function _strerror(errnum) { - if (!_strerror.buffer) _strerror.buffer = _malloc(256); - _strerror_r(errnum, _strerror.buffer, 256); - return _strerror.buffer; - } - function ___errno_location() { - return ___errno_state; - }function _perror(s) { - // void perror(const char *s); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/perror.html - var stdout = HEAP32[((_stdout)>>2)]; - if (s) { - _fputs(s, stdout); - _fputc(58, stdout); - _fputc(32, stdout); - } - var errnum = HEAP32[((___errno_location())>>2)]; - _puts(_strerror(errnum)); - } - function _popen(command, mode) { - // FILE *popen(const char *command, const char *mode); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/popen.html - // We allow only one process, so no pipes. - ___setErrNo(ERRNO_CODES.EMFILE); - return 0; - } - var ___dirent_struct_layout={__size__:1040,d_ino:0,d_name:4,d_off:1028,d_reclen:1032,d_type:1036};function _open(path, oflag, varargs) { - // int open(const char *path, int oflag, ...); - // http://pubs.opengroup.org/onlinepubs/009695399/functions/open.html - // NOTE: This implementation tries to mimic glibc rather than strictly - // following the POSIX standard. - var mode = HEAP32[((varargs)>>2)]; - // Simplify flags. - var accessMode = oflag & 3; - var isWrite = accessMode != 0; - var isRead = accessMode != 1; - var isCreate = Boolean(oflag & 512); - var isExistCheck = Boolean(oflag & 2048); - var isTruncate = Boolean(oflag & 1024); - var isAppend = Boolean(oflag & 8); - // Verify path. - var origPath = path; - path = FS.analyzePath(Pointer_stringify(path)); - if (!path.parentExists) { - ___setErrNo(path.error); - return -1; - } - var target = path.object || null; - var finalPath; - // Verify the file exists, create if needed and allowed. - if (target) { - if (isCreate && isExistCheck) { - ___setErrNo(ERRNO_CODES.EEXIST); - return -1; - } - if ((isWrite || isCreate || isTruncate) && target.isFolder) { - ___setErrNo(ERRNO_CODES.EISDIR); - return -1; - } - if (isRead && !target.read || isWrite && !target.write) { - ___setErrNo(ERRNO_CODES.EACCES); - return -1; - } - if (isTruncate && !target.isDevice) { - target.contents = []; - } else { - if (!FS.forceLoadFile(target)) { - ___setErrNo(ERRNO_CODES.EIO); - return -1; - } - } - finalPath = path.path; - } else { - if (!isCreate) { - ___setErrNo(ERRNO_CODES.ENOENT); - return -1; - } - if (!path.parentObject.write) { - ___setErrNo(ERRNO_CODES.EACCES); - return -1; - } - target = FS.createDataFile(path.parentObject, path.name, [], - mode & 0x100, mode & 0x80); // S_IRUSR, S_IWUSR. - finalPath = path.parentPath + '/' + path.name; - } - // Actually create an open stream. - var id; - if (target.isFolder) { - var entryBuffer = 0; - if (___dirent_struct_layout) { - entryBuffer = _malloc(___dirent_struct_layout.__size__); - } - var contents = []; - for (var key in target.contents) contents.push(key); - id = FS.createFileHandle({ - path: finalPath, - object: target, - // An index into contents. Special values: -2 is ".", -1 is "..". - position: -2, - isRead: true, - isWrite: false, - isAppend: false, - error: false, - eof: false, - ungotten: [], - // Folder-specific properties: - // Remember the contents at the time of opening in an array, so we can - // seek between them relying on a single order. - contents: contents, - // Each stream has its own area for readdir() returns. - currentEntry: entryBuffer - }); - } else { - id = FS.createFileHandle({ - path: finalPath, - object: target, - position: 0, - isRead: isRead, - isWrite: isWrite, - isAppend: isAppend, - error: false, - eof: false, - ungotten: [] - }); - } - return id; - }function _fopen(filename, mode) { - // FILE *fopen(const char *restrict filename, const char *restrict mode); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fopen.html - var flags; - mode = Pointer_stringify(mode); - if (mode[0] == 'r') { - if (mode.indexOf('+') != -1) { - flags = 2; - } else { - flags = 0; - } - } else if (mode[0] == 'w') { - if (mode.indexOf('+') != -1) { - flags = 2; - } else { - flags = 1; - } - flags |= 512; - flags |= 1024; - } else if (mode[0] == 'a') { - if (mode.indexOf('+') != -1) { - flags = 2; - } else { - flags = 1; - } - flags |= 512; - flags |= 8; - } else { - ___setErrNo(ERRNO_CODES.EINVAL); - return 0; - } - var ret = _open(filename, flags, allocate([0x1FF, 0, 0, 0], 'i32', ALLOC_STACK)); // All creation permissions. - return (ret == -1) ? 0 : ret; - } - var _putc=_fputc; - function _getcwd(buf, size) { - // char *getcwd(char *buf, size_t size); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/getcwd.html - if (size == 0) { - ___setErrNo(ERRNO_CODES.EINVAL); - return 0; - } else if (size < FS.currentPath.length + 1) { - ___setErrNo(ERRNO_CODES.ERANGE); - return 0; - } else { - for (var i = 0; i < FS.currentPath.length; i++) { - HEAP8[(((buf)+(i))|0)]=FS.currentPath.charCodeAt(i) - } - HEAP8[(((buf)+(i))|0)]=0 - return buf; - } - } - var _environ=allocate(1, "i32*", ALLOC_STATIC);var ___environ=_environ;function ___buildEnvironment(env) { - // WARNING: Arbitrary limit! - var MAX_ENV_VALUES = 64; - var TOTAL_ENV_SIZE = 1024; - // Statically allocate memory for the environment. - var poolPtr; - var envPtr; - if (!___buildEnvironment.called) { - ___buildEnvironment.called = true; - // Set default values. Use string keys for Closure Compiler compatibility. - ENV['USER'] = 'root'; - ENV['PATH'] = '/'; - ENV['PWD'] = '/'; - ENV['HOME'] = '/home/emscripten'; - ENV['LANG'] = 'en_US.UTF-8'; - ENV['_'] = './this.program'; - // Allocate memory. - poolPtr = allocate(TOTAL_ENV_SIZE, 'i8', ALLOC_STATIC); - envPtr = allocate(MAX_ENV_VALUES * 4, - 'i8*', ALLOC_STATIC); - HEAP32[((envPtr)>>2)]=poolPtr - HEAP32[((_environ)>>2)]=envPtr; - } else { - envPtr = HEAP32[((_environ)>>2)]; - poolPtr = HEAP32[((envPtr)>>2)]; - } - // Collect key=value lines. - var strings = []; - var totalSize = 0; - for (var key in env) { - if (typeof env[key] === 'string') { - var line = key + '=' + env[key]; - strings.push(line); - totalSize += line.length; - } - } - if (totalSize > TOTAL_ENV_SIZE) { - throw new Error('Environment size exceeded TOTAL_ENV_SIZE!'); - } - // Make new. - var ptrSize = 4; - for (var i = 0; i < strings.length; i++) { - var line = strings[i]; - for (var j = 0; j < line.length; j++) { - HEAP8[(((poolPtr)+(j))|0)]=line.charCodeAt(j); - } - HEAP8[(((poolPtr)+(j))|0)]=0; - HEAP32[(((envPtr)+(i * ptrSize))>>2)]=poolPtr; - poolPtr += line.length + 1; - } - HEAP32[(((envPtr)+(strings.length * ptrSize))>>2)]=0; - }var ENV={};function _getenv(name) { - // char *getenv(const char *name); - // http://pubs.opengroup.org/onlinepubs/009695399/functions/getenv.html - if (name === 0) return 0; - name = Pointer_stringify(name); - if (!ENV.hasOwnProperty(name)) return 0; - if (_getenv.ret) _free(_getenv.ret); - _getenv.ret = allocate(intArrayFromString(ENV[name]), 'i8', ALLOC_NORMAL); - return _getenv.ret; - } - function _strncat(pdest, psrc, num) { - var len = _strlen(pdest); - var i = 0; - while(1) { - HEAP8[((pdest+len+i)|0)]=HEAP8[((psrc+i)|0)]; - if (HEAP8[(((pdest)+(len+i))|0)] == 0) break; - i ++; - if (i == num) { - HEAP8[(((pdest)+(len+i))|0)]=0 - break; - } - } - return pdest; - } - function _printf(format, varargs) { - // int printf(const char *restrict format, ...); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html - var stdout = HEAP32[((_stdout)>>2)]; - return _fprintf(stdout, format, varargs); - } - function _system(command) { - // int system(const char *command); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/system.html - // Can't call external programs. - ___setErrNo(ERRNO_CODES.EAGAIN); - return -1; - } - function _isalpha(chr) { - return (chr >= 97 && chr <= 122) || - (chr >= 65 && chr <= 90); - } - function _isalnum(chr) { - return (chr >= 48 && chr <= 57) || - (chr >= 97 && chr <= 122) || - (chr >= 65 && chr <= 90); - } - var _getc=_fgetc; - function _chdir(path) { - // int chdir(const char *path); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/chdir.html - // NOTE: The path argument may be a string, to simplify fchdir(). - if (typeof path !== 'string') path = Pointer_stringify(path); - path = FS.analyzePath(path); - if (!path.exists) { - ___setErrNo(path.error); - return -1; - } else if (!path.object.isFolder) { - ___setErrNo(ERRNO_CODES.ENOTDIR); - return -1; - } else { - FS.currentPath = path.path; - return 0; - } - } - function _tmpnam(s, dir, prefix) { - // char *tmpnam(char *s); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/tmpnam.html - // NOTE: The dir and prefix arguments are for internal use only. - var folder = FS.findObject(dir || '/tmp'); - if (!folder || !folder.isFolder) { - dir = '/tmp'; - folder = FS.findObject(dir); - if (!folder || !folder.isFolder) return 0; - } - var name = prefix || 'file'; - do { - name += String.fromCharCode(65 + Math.floor(Math.random() * 25)); - } while (name in folder.contents); - var result = dir + '/' + name; - if (!_tmpnam.buffer) _tmpnam.buffer = _malloc(256); - if (!s) s = _tmpnam.buffer; - for (var i = 0; i < result.length; i++) { - HEAP8[(((s)+(i))|0)]=result.charCodeAt(i); - } - HEAP8[(((s)+(i))|0)]=0; - return s; - }function _tmpfile() { - // FILE *tmpfile(void); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/tmpfile.html - // TODO: Delete the created file on closing. - if (_tmpfile.mode) { - _tmpfile.mode = allocate(intArrayFromString('w+'), 'i8', ALLOC_NORMAL); - } - return _fopen(_tmpnam(0), _tmpfile.mode); - } - function _memchr(ptr, chr, num) { - chr = unSign(chr); - for (var i = 0; i < num; i++) { - if (HEAP8[(ptr)] == chr) return ptr; - ptr++; - } - return 0; - } - var _sqrt=Math.sqrt; - function _fileno(stream) { - // int fileno(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fileno.html - // We use file descriptor numbers and FILE* streams interchangeably. - return stream; - } - function _fdopen(fildes, mode) { - // FILE *fdopen(int fildes, const char *mode); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fdopen.html - if (FS.streams[fildes]) { - var stream = FS.streams[fildes]; - mode = Pointer_stringify(mode); - if ((mode.indexOf('w') != -1 && !stream.isWrite) || - (mode.indexOf('r') != -1 && !stream.isRead) || - (mode.indexOf('a') != -1 && !stream.isAppend) || - (mode.indexOf('+') != -1 && (!stream.isRead || !stream.isWrite))) { - ___setErrNo(ERRNO_CODES.EINVAL); - return 0; - } else { - stream.error = false; - stream.eof = false; - return fildes; - } - } else { - ___setErrNo(ERRNO_CODES.EBADF); - return 0; - } - } - var ___stat_struct_layout={__size__:68,st_dev:0,st_ino:4,st_mode:8,st_nlink:12,st_uid:16,st_gid:20,st_rdev:24,st_size:28,st_atime:32,st_spare1:36,st_mtime:40,st_spare2:44,st_ctime:48,st_spare3:52,st_blksize:56,st_blocks:60,st_spare4:64};function _stat(path, buf, dontResolveLastLink) { - // http://pubs.opengroup.org/onlinepubs/7908799/xsh/stat.html - // int stat(const char *path, struct stat *buf); - // NOTE: dontResolveLastLink is a shortcut for lstat(). It should never be - // used in client code. - var obj = FS.findObject(Pointer_stringify(path), dontResolveLastLink); - if (obj === null || !FS.forceLoadFile(obj)) return -1; - var offsets = ___stat_struct_layout; - // Constants. - HEAP32[(((buf)+(offsets.st_nlink))>>2)]=1 - HEAP32[(((buf)+(offsets.st_uid))>>2)]=0 - HEAP32[(((buf)+(offsets.st_gid))>>2)]=0 - HEAP32[(((buf)+(offsets.st_blksize))>>2)]=4096 - // Variables. - HEAP32[(((buf)+(offsets.st_ino))>>2)]=obj.inodeNumber - var time = Math.floor(obj.timestamp / 1000); - if (offsets.st_atime === undefined) { - offsets.st_atime = offsets.st_atim.tv_sec; - offsets.st_mtime = offsets.st_mtim.tv_sec; - offsets.st_ctime = offsets.st_ctim.tv_sec; - var nanosec = (obj.timestamp % 1000) * 1000; - HEAP32[(((buf)+(offsets.st_atim.tv_nsec))>>2)]=nanosec - HEAP32[(((buf)+(offsets.st_mtim.tv_nsec))>>2)]=nanosec - HEAP32[(((buf)+(offsets.st_ctim.tv_nsec))>>2)]=nanosec - } - HEAP32[(((buf)+(offsets.st_atime))>>2)]=time - HEAP32[(((buf)+(offsets.st_mtime))>>2)]=time - HEAP32[(((buf)+(offsets.st_ctime))>>2)]=time - var mode = 0; - var size = 0; - var blocks = 0; - var dev = 0; - var rdev = 0; - if (obj.isDevice) { - // Device numbers reuse inode numbers. - dev = rdev = obj.inodeNumber; - size = blocks = 0; - mode = 0x2000; // S_IFCHR. - } else { - dev = 1; - rdev = 0; - // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), - // but this is not required by the standard. - if (obj.isFolder) { - size = 4096; - blocks = 1; - mode = 0x4000; // S_IFDIR. - } else { - var data = obj.contents || obj.link; - size = data.length; - blocks = Math.ceil(data.length / 4096); - mode = obj.link === undefined ? 0x8000 : 0xA000; // S_IFREG, S_IFLNK. - } - } - HEAP32[(((buf)+(offsets.st_dev))>>2)]=dev; - HEAP32[(((buf)+(offsets.st_rdev))>>2)]=rdev; - HEAP32[(((buf)+(offsets.st_size))>>2)]=size - HEAP32[(((buf)+(offsets.st_blocks))>>2)]=blocks - if (obj.read) mode |= 0x16D; // S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH. - if (obj.write) mode |= 0x92; // S_IWUSR | S_IWGRP | S_IWOTH. - HEAP32[(((buf)+(offsets.st_mode))>>2)]=mode - return 0; - } - function _feof(stream) { - // int feof(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/feof.html - return Number(FS.streams[stream] && FS.streams[stream].eof); - } - function _setlocale(category, locale) { - if (!_setlocale.ret) _setlocale.ret = allocate([0], 'i8', ALLOC_NORMAL); - return _setlocale.ret; - } - function ___fpclassifyf(x) { - if (isNaN(x)) return 0; - if (!isFinite(x)) return 1; - if (x == 0) return 2; - // FP_SUBNORMAL..? - return 4; - }var ___fpclassifyd=___fpclassifyf; - var _cos=Math.cos; - var _sin=Math.sin; - Module["_tolower"] = _tolower; - Module["_strncasecmp"] = _strncasecmp; - Module["_strcasecmp"] = _strcasecmp; - function _strrchr(ptr, chr) { - var ptr2 = ptr + _strlen(ptr); - do { - if (HEAP8[(ptr2)] == chr) return ptr2; - ptr2--; - } while (ptr2 >= ptr); - return 0; - } - function _strspn(pstr, pset) { - var str = pstr, set, strcurr, setcurr; - while (1) { - strcurr = HEAP8[(str)]; - if (!strcurr) return str - pstr; - set = pset; - while (1) { - setcurr = HEAP8[(set)]; - if (!setcurr || setcurr == strcurr) break; - set++; - } - if (!setcurr) return str - pstr; - str++; - } - } - function _strpbrk(ptr1, ptr2) { - var curr; - var searchSet = {}; - while (1) { - var curr = HEAP8[((ptr2++)|0)]; - if (!curr) break; - searchSet[curr] = 1; - } - while (1) { - curr = HEAP8[(ptr1)]; - if (!curr) break; - if (curr in searchSet) return ptr1; - ptr1++; - } - return 0; - } - function __isFloat(text) { - return !!(/^[+-]?[0-9]*\.?[0-9]+([eE][+-]?[0-9]+)?$/.exec(text)); - }function __scanString(format, get, unget, varargs) { - if (!__scanString.whiteSpace) { - __scanString.whiteSpace = {}; - __scanString.whiteSpace[32] = 1; - __scanString.whiteSpace[9] = 1; - __scanString.whiteSpace[10] = 1; - __scanString.whiteSpace[11] = 1; - __scanString.whiteSpace[12] = 1; - __scanString.whiteSpace[13] = 1; - __scanString.whiteSpace[' '] = 1; - __scanString.whiteSpace['\t'] = 1; - __scanString.whiteSpace['\n'] = 1; - __scanString.whiteSpace['\v'] = 1; - __scanString.whiteSpace['\f'] = 1; - __scanString.whiteSpace['\r'] = 1; - } - // Supports %x, %4x, %d.%d, %lld, %s, %f, %lf. - // TODO: Support all format specifiers. - format = Pointer_stringify(format); - var soFar = 0; - if (format.indexOf('%n') >= 0) { - // need to track soFar - var _get = get; - get = function() { - soFar++; - return _get(); - } - var _unget = unget; - unget = function() { - soFar--; - return _unget(); - } - } - var formatIndex = 0; - var argsi = 0; - var fields = 0; - var argIndex = 0; - var next; - mainLoop: - for (var formatIndex = 0; formatIndex < format.length;) { - if (format[formatIndex] === '%' && format[formatIndex+1] == 'n') { - var argPtr = HEAP32[(((varargs)+(argIndex))>>2)]; - argIndex += Runtime.getAlignSize('void*', null, true); - HEAP32[((argPtr)>>2)]=soFar; - formatIndex += 2; - continue; - } - // TODO: Support strings like "%5c" etc. - if (format[formatIndex] === '%' && format[formatIndex+1] == 'c') { - var argPtr = HEAP32[(((varargs)+(argIndex))>>2)]; - argIndex += Runtime.getAlignSize('void*', null, true); - fields++; - next = get(); - HEAP8[(argPtr)]=next - formatIndex += 2; - continue; - } - // remove whitespace - while (1) { - next = get(); - if (next == 0) return fields; - if (!(next in __scanString.whiteSpace)) break; - } - unget(); - if (format[formatIndex] === '%') { - formatIndex++; - var suppressAssignment = false; - if (format[formatIndex] == '*') { - suppressAssignment = true; - formatIndex++; - } - var maxSpecifierStart = formatIndex; - while (format[formatIndex].charCodeAt(0) >= 48 && - format[formatIndex].charCodeAt(0) <= 57) { - formatIndex++; - } - var max_; - if (formatIndex != maxSpecifierStart) { - max_ = parseInt(format.slice(maxSpecifierStart, formatIndex), 10); - } - var long_ = false; - var half = false; - var longLong = false; - if (format[formatIndex] == 'l') { - long_ = true; - formatIndex++; - if (format[formatIndex] == 'l') { - longLong = true; - formatIndex++; - } - } else if (format[formatIndex] == 'h') { - half = true; - formatIndex++; - } - var type = format[formatIndex]; - formatIndex++; - var curr = 0; - var buffer = []; - // Read characters according to the format. floats are trickier, they may be in an unfloat state in the middle, then be a valid float later - if (type == 'f' || type == 'e' || type == 'g' || - type == 'F' || type == 'E' || type == 'G') { - var last = 0; - next = get(); - while (next > 0) { - buffer.push(String.fromCharCode(next)); - if (__isFloat(buffer.join(''))) { - last = buffer.length; - } - next = get(); - } - for (var i = 0; i < buffer.length - last + 1; i++) { - unget(); - } - buffer.length = last; - } else { - next = get(); - var first = true; - while ((curr < max_ || isNaN(max_)) && next > 0) { - if (!(next in __scanString.whiteSpace) && // stop on whitespace - (type == 's' || - ((type === 'd' || type == 'u' || type == 'i') && ((next >= 48 && next <= 57) || - (first && next == 45))) || - ((type === 'x' || type === 'X') && (next >= 48 && next <= 57 || - next >= 97 && next <= 102 || - next >= 65 && next <= 70))) && - (formatIndex >= format.length || next !== format[formatIndex].charCodeAt(0))) { // Stop when we read something that is coming up - buffer.push(String.fromCharCode(next)); - next = get(); - curr++; - first = false; - } else { - break; - } - } - unget(); - } - if (buffer.length === 0) return 0; // Failure. - if (suppressAssignment) continue; - var text = buffer.join(''); - var argPtr = HEAP32[(((varargs)+(argIndex))>>2)]; - argIndex += Runtime.getAlignSize('void*', null, true); - switch (type) { - case 'd': case 'u': case 'i': - if (half) { - HEAP16[((argPtr)>>1)]=parseInt(text, 10); - } else if (longLong) { - (tempI64 = [parseInt(text, 10)>>>0,Math.min(Math.floor((parseInt(text, 10))/(+(4294967296))), (+(4294967295)))>>>0],HEAP32[((argPtr)>>2)]=tempI64[0],HEAP32[(((argPtr)+(4))>>2)]=tempI64[1]); - } else { - HEAP32[((argPtr)>>2)]=parseInt(text, 10); - } - break; - case 'X': - case 'x': - HEAP32[((argPtr)>>2)]=parseInt(text, 16) - break; - case 'F': - case 'f': - case 'E': - case 'e': - case 'G': - case 'g': - case 'E': - // fallthrough intended - if (long_) { - HEAPF64[((argPtr)>>3)]=parseFloat(text) - } else { - HEAPF32[((argPtr)>>2)]=parseFloat(text) - } - break; - case 's': - var array = intArrayFromString(text); - for (var j = 0; j < array.length; j++) { - HEAP8[(((argPtr)+(j))|0)]=array[j] - } - break; - } - fields++; - } else if (format[formatIndex] in __scanString.whiteSpace) { - next = get(); - while (next in __scanString.whiteSpace) { - if (next <= 0) break mainLoop; // End of input. - next = get(); - } - unget(next); - formatIndex++; - } else { - // Not a specifier. - next = get(); - if (format[formatIndex].charCodeAt(0) !== next) { - unget(next); - break mainLoop; - } - formatIndex++; - } - } - return fields; - }function _sscanf(s, format, varargs) { - // int sscanf(const char *restrict s, const char *restrict format, ... ); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/scanf.html - var index = 0; - var get = function() { return HEAP8[(((s)+(index++))|0)]; }; - var unget = function() { index--; }; - return __scanString(format, get, unget, varargs); - } - var _atan2=Math.atan2; - var ___errno=___errno_location; - function _putchar(c) { - // int putchar(int c); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/putchar.html - return _fputc(c, HEAP32[((_stdout)>>2)]); - } - Module["_saveSetjmp"] = _saveSetjmp; - Module["_testSetjmp"] = _testSetjmp;var _setjmp=undefined; - function _signal(sig, func) { - // TODO - return 0; - } - function _toupper(chr) { - if (chr >= 97 && chr <= 122) { - return chr - 97 + 65; - } else { - return chr; - } - } - function _longjmp(env, value) { - asm['setThrew'](env, value || 1); - throw 'longjmp'; - } - function _time(ptr) { - var ret = Math.floor(Date.now()/1000); - if (ptr) { - HEAP32[((ptr)>>2)]=ret - } - return ret; - } - var ___tm_struct_layout={__size__:44,tm_sec:0,tm_min:4,tm_hour:8,tm_mday:12,tm_mon:16,tm_year:20,tm_wday:24,tm_yday:28,tm_isdst:32,tm_gmtoff:36,tm_zone:40}; - var ___tm_current=allocate(4*26, "i8", ALLOC_STATIC); - var ___tm_timezones={}; - var __tzname=allocate(8, "i32*", ALLOC_STATIC); - var __daylight=allocate(1, "i32*", ALLOC_STATIC); - var __timezone=allocate(1, "i32*", ALLOC_STATIC);function _tzset() { - // TODO: Use (malleable) environment variables instead of system settings. - if (_tzset.called) return; - _tzset.called = true; - HEAP32[((__timezone)>>2)]=-(new Date()).getTimezoneOffset() * 60 - var winter = new Date(2000, 0, 1); - var summer = new Date(2000, 6, 1); - HEAP32[((__daylight)>>2)]=Number(winter.getTimezoneOffset() != summer.getTimezoneOffset()) - var winterName = 'GMT'; // XXX do not rely on browser timezone info, it is very unpredictable | winter.toString().match(/\(([A-Z]+)\)/)[1]; - var summerName = 'GMT'; // XXX do not rely on browser timezone info, it is very unpredictable | summer.toString().match(/\(([A-Z]+)\)/)[1]; - var winterNamePtr = allocate(intArrayFromString(winterName), 'i8', ALLOC_NORMAL); - var summerNamePtr = allocate(intArrayFromString(summerName), 'i8', ALLOC_NORMAL); - HEAP32[((__tzname)>>2)]=winterNamePtr - HEAP32[(((__tzname)+(4))>>2)]=summerNamePtr - }function _localtime_r(time, tmPtr) { - _tzset(); - var offsets = ___tm_struct_layout; - var date = new Date(HEAP32[((time)>>2)]*1000); - HEAP32[(((tmPtr)+(offsets.tm_sec))>>2)]=date.getSeconds() - HEAP32[(((tmPtr)+(offsets.tm_min))>>2)]=date.getMinutes() - HEAP32[(((tmPtr)+(offsets.tm_hour))>>2)]=date.getHours() - HEAP32[(((tmPtr)+(offsets.tm_mday))>>2)]=date.getDate() - HEAP32[(((tmPtr)+(offsets.tm_mon))>>2)]=date.getMonth() - HEAP32[(((tmPtr)+(offsets.tm_year))>>2)]=date.getFullYear()-1900 - HEAP32[(((tmPtr)+(offsets.tm_wday))>>2)]=date.getDay() - var start = new Date(date.getFullYear(), 0, 1); - var yday = Math.floor((date.getTime() - start.getTime()) / (1000 * 60 * 60 * 24)); - HEAP32[(((tmPtr)+(offsets.tm_yday))>>2)]=yday - HEAP32[(((tmPtr)+(offsets.tm_gmtoff))>>2)]=start.getTimezoneOffset() * 60 - var dst = Number(start.getTimezoneOffset() != date.getTimezoneOffset()); - HEAP32[(((tmPtr)+(offsets.tm_isdst))>>2)]=dst - var timezone = 'GMT'; // XXX do not rely on browser timezone info, it is very unpredictable | date.toString().match(/\(([A-Z]+)\)/)[1]; - if (!(timezone in ___tm_timezones)) { - ___tm_timezones[timezone] = allocate(intArrayFromString(timezone), 'i8', ALLOC_NORMAL); - } - HEAP32[(((tmPtr)+(offsets.tm_zone))>>2)]=___tm_timezones[timezone] - return tmPtr; - }function _localtime(time) { - return _localtime_r(time, ___tm_current); - } - var ___tm_formatted=allocate(4*26, "i8", ALLOC_STATIC); - function _mktime(tmPtr) { - _tzset(); - var offsets = ___tm_struct_layout; - var year = HEAP32[(((tmPtr)+(offsets.tm_year))>>2)]; - var timestamp = new Date(year >= 1900 ? year : year + 1900, - HEAP32[(((tmPtr)+(offsets.tm_mon))>>2)], - HEAP32[(((tmPtr)+(offsets.tm_mday))>>2)], - HEAP32[(((tmPtr)+(offsets.tm_hour))>>2)], - HEAP32[(((tmPtr)+(offsets.tm_min))>>2)], - HEAP32[(((tmPtr)+(offsets.tm_sec))>>2)], - 0).getTime() / 1000; - HEAP32[(((tmPtr)+(offsets.tm_wday))>>2)]=new Date(timestamp).getDay() - var yday = Math.round((timestamp - (new Date(year, 0, 1)).getTime()) / (1000 * 60 * 60 * 24)); - HEAP32[(((tmPtr)+(offsets.tm_yday))>>2)]=yday - return timestamp; - }function _asctime_r(tmPtr, buf) { - var date = new Date(_mktime(tmPtr)*1000); - var formatted = date.toString(); - var datePart = formatted.replace(/\d{4}.*/, '').replace(/ 0/, ' '); - var timePart = formatted.match(/\d{2}:\d{2}:\d{2}/)[0]; - formatted = datePart + timePart + ' ' + date.getFullYear() + '\n'; - formatted.split('').forEach(function(chr, index) { - HEAP8[(((buf)+(index))|0)]=chr.charCodeAt(0) - }); - HEAP8[(((buf)+(25))|0)]=0 - return buf; - }function _asctime(tmPtr) { - return _asctime_r(tmPtr, ___tm_formatted); - }function _ctime(timer) { - return _asctime(_localtime(timer)); - } - var _llvm_va_start=undefined; - function _vfprintf(s, f, va_arg) { - return _fprintf(s, f, HEAP32[((va_arg)>>2)]); - } - function _llvm_va_end() {} - function _rename(old, new_) { - // int rename(const char *old, const char *new); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/rename.html - var oldObj = FS.analyzePath(Pointer_stringify(old)); - var newObj = FS.analyzePath(Pointer_stringify(new_)); - if (newObj.path == oldObj.path) { - return 0; - } else if (!oldObj.exists) { - ___setErrNo(oldObj.error); - return -1; - } else if (oldObj.isRoot || oldObj.path == FS.currentPath) { - ___setErrNo(ERRNO_CODES.EBUSY); - return -1; - } else if (newObj.parentPath && - newObj.parentPath.indexOf(oldObj.path) == 0) { - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } else if (newObj.exists && newObj.object.isFolder) { - ___setErrNo(ERRNO_CODES.EISDIR); - return -1; - } else { - delete oldObj.parentObject.contents[oldObj.name]; - newObj.parentObject.contents[newObj.name] = oldObj.object; - return 0; - } - } - function _strftime(s, maxsize, format, timeptr) { - // size_t strftime(char *restrict s, size_t maxsize, const char *restrict format, const struct tm *restrict timeptr); - // http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html - // TODO: Implement. - return 0; - } - function _qsort(base, num, size, cmp) { - if (num == 0 || size == 0) return; - // forward calls to the JavaScript sort method - // first, sort the items logically - var comparator = function(x, y) { - return Runtime.dynCall('iii', cmp, [x, y]); - } - var keys = []; - for (var i = 0; i < num; i++) keys.push(i); - keys.sort(function(a, b) { - return comparator(base+a*size, base+b*size); - }); - // apply the sort - var temp = _malloc(num*size); - _memcpy(temp, base, num*size); - for (var i = 0; i < num; i++) { - if (keys[i] == i) continue; // already in place - _memcpy(base+i*size, temp+keys[i]*size, size); - } - _free(temp); - } - function _gettimeofday(ptr) { - // %struct.timeval = type { i32, i32 } - var now = Date.now(); - HEAP32[((ptr)>>2)]=Math.floor(now/1000); // seconds - HEAP32[(((ptr)+(4))>>2)]=Math.floor((now-1000*Math.floor(now/1000))*1000); // microseconds - return 0; - } - function _opendir(dirname) { - // DIR *opendir(const char *dirname); - // http://pubs.opengroup.org/onlinepubs/007908799/xsh/opendir.html - // NOTE: Calculating absolute path redundantly since we need to associate it - // with the opened stream. - var path = FS.absolutePath(Pointer_stringify(dirname)); - if (path === null) { - ___setErrNo(ERRNO_CODES.ENOENT); - return 0; - } - var target = FS.findObject(path); - if (target === null) return 0; - if (!target.isFolder) { - ___setErrNo(ERRNO_CODES.ENOTDIR); - return 0; - } else if (!target.read) { - ___setErrNo(ERRNO_CODES.EACCES); - return 0; - } - var contents = []; - for (var key in target.contents) contents.push(key); - var id = FS.createFileHandle({ - path: path, - object: target, - // An index into contents. Special values: -2 is ".", -1 is "..". - position: -2, - isRead: true, - isWrite: false, - isAppend: false, - error: false, - eof: false, - ungotten: [], - // Folder-specific properties: - // Remember the contents at the time of opening in an array, so we can - // seek between them relying on a single order. - contents: contents, - // Each stream has its own area for readdir() returns. - currentEntry: _malloc(___dirent_struct_layout.__size__) - }); - return id; - } - function _readdir_r(dirp, entry, result) { - // int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); - // http://pubs.opengroup.org/onlinepubs/007908799/xsh/readdir_r.html - if (!FS.streams[dirp] || !FS.streams[dirp].object.isFolder) { - return ___setErrNo(ERRNO_CODES.EBADF); - } - var stream = FS.streams[dirp]; - var loc = stream.position; - var entries = 0; - for (var key in stream.contents) entries++; - if (loc < -2 || loc >= entries) { - HEAP32[((result)>>2)]=0 - } else { - var name, inode, type; - if (loc === -2) { - name = '.'; - inode = 1; // Really undefined. - type = 4; //DT_DIR - } else if (loc === -1) { - name = '..'; - inode = 1; // Really undefined. - type = 4; //DT_DIR - } else { - var object; - name = stream.contents[loc]; - object = stream.object.contents[name]; - inode = object.inodeNumber; - type = object.isDevice ? 2 // DT_CHR, character device. - : object.isFolder ? 4 // DT_DIR, directory. - : object.link !== undefined ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. - } - stream.position++; - var offsets = ___dirent_struct_layout; - HEAP32[(((entry)+(offsets.d_ino))>>2)]=inode - HEAP32[(((entry)+(offsets.d_off))>>2)]=stream.position - HEAP32[(((entry)+(offsets.d_reclen))>>2)]=name.length + 1 - for (var i = 0; i < name.length; i++) { - HEAP8[(((entry + offsets.d_name)+(i))|0)]=name.charCodeAt(i) - } - HEAP8[(((entry + offsets.d_name)+(i))|0)]=0 - HEAP8[(((entry)+(offsets.d_type))|0)]=type - HEAP32[((result)>>2)]=entry - } - return 0; - }function _readdir(dirp) { - // struct dirent *readdir(DIR *dirp); - // http://pubs.opengroup.org/onlinepubs/007908799/xsh/readdir_r.html - if (!FS.streams[dirp] || !FS.streams[dirp].object.isFolder) { - ___setErrNo(ERRNO_CODES.EBADF); - return 0; - } else { - if (!_readdir.result) _readdir.result = _malloc(4); - _readdir_r(dirp, FS.streams[dirp].currentEntry, _readdir.result); - if (HEAP32[((_readdir.result)>>2)] === 0) { - return 0; - } else { - return FS.streams[dirp].currentEntry; - } - } - } - function _closedir(dirp) { - // int closedir(DIR *dirp); - // http://pubs.opengroup.org/onlinepubs/007908799/xsh/closedir.html - if (!FS.streams[dirp] || !FS.streams[dirp].object.isFolder) { - return ___setErrNo(ERRNO_CODES.EBADF); - } else { - _free(FS.streams[dirp].currentEntry); - FS.streams[dirp] = null; - return 0; - } - } - function _ungetc(c, stream) { - // int ungetc(int c, FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/ungetc.html - if (FS.streams[stream]) { - c = unSign(c & 0xFF); - FS.streams[stream].ungotten.push(c); - return c; - } else { - return -1; - } - } - function _fmod(x, y) { - return x % y; - } - function _gmtime_r(time, tmPtr) { - var date = new Date(HEAP32[((time)>>2)]*1000); - var offsets = ___tm_struct_layout; - HEAP32[(((tmPtr)+(offsets.tm_sec))>>2)]=date.getUTCSeconds() - HEAP32[(((tmPtr)+(offsets.tm_min))>>2)]=date.getUTCMinutes() - HEAP32[(((tmPtr)+(offsets.tm_hour))>>2)]=date.getUTCHours() - HEAP32[(((tmPtr)+(offsets.tm_mday))>>2)]=date.getUTCDate() - HEAP32[(((tmPtr)+(offsets.tm_mon))>>2)]=date.getUTCMonth() - HEAP32[(((tmPtr)+(offsets.tm_year))>>2)]=date.getUTCFullYear()-1900 - HEAP32[(((tmPtr)+(offsets.tm_wday))>>2)]=date.getUTCDay() - HEAP32[(((tmPtr)+(offsets.tm_gmtoff))>>2)]=0 - HEAP32[(((tmPtr)+(offsets.tm_isdst))>>2)]=0 - var start = new Date(date.getFullYear(), 0, 1); - var yday = Math.round((date.getTime() - start.getTime()) / (1000 * 60 * 60 * 24)); - HEAP32[(((tmPtr)+(offsets.tm_yday))>>2)]=yday - var timezone = "GMT"; - if (!(timezone in ___tm_timezones)) { - ___tm_timezones[timezone] = allocate(intArrayFromString(timezone), 'i8', ALLOC_NORMAL); - } - HEAP32[(((tmPtr)+(offsets.tm_zone))>>2)]=___tm_timezones[timezone] - return tmPtr; - }function _gmtime(time) { - return _gmtime_r(time, ___tm_current); - } - function _setvbuf(stream, buf, type, size) { - // int setvbuf(FILE *restrict stream, char *restrict buf, int type, size_t size); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/setvbuf.html - // TODO: Implement custom buffering. - return 0; - }function _setbuf(stream, buf) { - // void setbuf(FILE *restrict stream, char *restrict buf); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/setbuf.html - if (buf) _setvbuf(stream, buf, 0, 8192); // _IOFBF, BUFSIZ. - else _setvbuf(stream, buf, 2, 8192); // _IONBF, BUFSIZ. - } - function _atexit(func, arg) { - __ATEXIT__.unshift({ func: func, arg: arg }); - } - function _isatty(fildes) { - // int isatty(int fildes); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/isatty.html - if (!FS.streams[fildes]) { - ___setErrNo(ERRNO_CODES.EBADF); - return 0; - } - if (FS.streams[fildes].isTerminal) return 1; - ___setErrNo(ERRNO_CODES.ENOTTY); - return 0; - } - var ___utsname_struct_layout={__size__:160,sysname:0,nodename:32,release:64,version:96,machine:128};function _uname(name) { - // int uname(struct utsname *name); - // http://pubs.opengroup.org/onlinepubs/009695399/functions/uname.html - function copyString(element, value) { - var offset = ___utsname_struct_layout[element]; - for (var i = 0; i < value.length; i++) { - HEAP8[(((name)+(offset + i))|0)]=value.charCodeAt(i) - } - HEAP8[(((name)+(offset + i))|0)]=0 - } - if (name === 0) { - return -1; - } else { - copyString('sysname', 'Emscripten'); - copyString('nodename', 'emscripten'); - copyString('release', '1.0'); - copyString('version', '#1'); - copyString('machine', 'x86-JS'); - return 0; - } - } - function _nl_langinfo(item) { - // char *nl_langinfo(nl_item item); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/nl_langinfo.html - var result; - switch (item) { - case 0: - result = 'ANSI_X3.4-1968'; - break; - case 1: - result = '%a %b %e %H:%M:%S %Y'; - break; - case 2: - result = '%m/%d/%y'; - break; - case 3: - result = '%H:%M:%S'; - break; - case 4: - result = '%I:%M:%S %p'; - break; - case 5: - result = 'AM'; - break; - case 6: - result = 'PM'; - break; - case 7: - result = 'Sunday'; - break; - case 8: - result = 'Monday'; - break; - case 9: - result = 'Tuesday'; - break; - case 10: - result = 'Wednesday'; - break; - case 11: - result = 'Thursday'; - break; - case 12: - result = 'Friday'; - break; - case 13: - result = 'Saturday'; - break; - case 14: - result = 'Sun'; - break; - case 15: - result = 'Mon'; - break; - case 16: - result = 'Tue'; - break; - case 17: - result = 'Wed'; - break; - case 18: - result = 'Thu'; - break; - case 19: - result = 'Fri'; - break; - case 20: - result = 'Sat'; - break; - case 21: - result = 'January'; - break; - case 22: - result = 'February'; - break; - case 23: - result = 'March'; - break; - case 24: - result = 'April'; - break; - case 25: - result = 'May'; - break; - case 26: - result = 'June'; - break; - case 27: - result = 'July'; - break; - case 28: - result = 'August'; - break; - case 29: - result = 'September'; - break; - case 30: - result = 'October'; - break; - case 31: - result = 'November'; - break; - case 32: - result = 'December'; - break; - case 33: - result = 'Jan'; - break; - case 34: - result = 'Feb'; - break; - case 35: - result = 'Mar'; - break; - case 36: - result = 'Apr'; - break; - case 37: - result = 'May'; - break; - case 38: - result = 'Jun'; - break; - case 39: - result = 'Jul'; - break; - case 40: - result = 'Aug'; - break; - case 41: - result = 'Sep'; - break; - case 42: - result = 'Oct'; - break; - case 43: - result = 'Nov'; - break; - case 44: - result = 'Dec'; - break; - case 49: - result = ''; - break; - case 50: - result = '.'; - break; - case 51: - result = ''; - break; - case 52: - result = '^[yY]'; - break; - case 53: - result = '^[nN]'; - break; - case 56: - result = '-'; - break; - case 45: - case 46: - case 47: - case 48: - default: - result = ''; - break; - } - var me = _nl_langinfo; - if (!me.ret) me.ret = _malloc(32); - for (var i = 0; i < result.length; i++) { - HEAP8[(((me.ret)+(i))|0)]=result.charCodeAt(i) - } - HEAP8[(((me.ret)+(i))|0)]=0 - return me.ret; - } - function _iconv_open() { - Module['printErr']('missing function: iconv_open'); abort(-1); - } - function _iconv() { - Module['printErr']('missing function: iconv'); abort(-1); - } - function _iconv_close() { - Module['printErr']('missing function: iconv_close'); abort(-1); - } - function _localeconv() { - // %struct.timeval = type { char* decimal point, other stuff... } - // var indexes = Runtime.calculateStructAlignment({ fields: ['i32', 'i32'] }); - var me = _localeconv; - if (!me.ret) { - me.ret = allocate([allocate(intArrayFromString('.'), 'i8', ALLOC_NORMAL)], 'i8*', ALLOC_NORMAL); // just decimal point, for now - } - return me.ret; - } - function _isprint(chr) { - return 0x1F < chr && chr < 0x7F; - } - function _erfc(x) { - var MATH_TOLERANCE = 1E-12; - var ONE_SQRTPI = 0.564189583547756287; - var a = 1; - var b = x; - var c = x; - var d = x * x + 0.5; - var n = 1.0; - var q2 = b / d; - var q1, t; - if (Math.abs(x) < 2.2) { - return 1.0 - _erf(x); - } - if (x < 0) { - return 2.0 - _erfc(-x); - } - do { - t = a * n + b * x; - a = b; - b = t; - t = c * n + d * x; - c = d; - d = t; - n += 0.5; - q1 = q2; - q2 = b / d; - } while (Math.abs(q1 - q2) / q2 > MATH_TOLERANCE); - return (ONE_SQRTPI * Math.exp(- x * x) * q2); - }function _erf(x) { - var MATH_TOLERANCE = 1E-12; - var TWO_SQRTPI = 1.128379167095512574; - var sum = x; - var term = x; - var xsqr = x*x; - var j = 1; - if (Math.abs(x) > 2.2) { - return 1.0 - _erfc(x); - } - do { - term *= xsqr / j; - sum -= term / (2 * j + 1); - ++j; - term *= xsqr / j; - sum += term / (2 * j + 1); - ++j; - } while (Math.abs(term / sum) > MATH_TOLERANCE); - return (TWO_SQRTPI * sum); - } - function _lgamma() { - Module['printErr']('missing function: lgamma'); abort(-1); - } - function ___signgam() { - Module['printErr']('missing function: __signgam'); abort(-1); - } - function _modf(x, intpart) { - HEAPF64[((intpart)>>3)]=Math.floor(x) - return x - HEAPF64[((intpart)>>3)]; - } - function _cosh(x) { - var p = Math.pow(Math.E, x); - return (p + (1 / p)) / 2; - } - function _sinh(x) { - var p = Math.pow(Math.E, x); - return (p - (1 / p)) / 2; - } - var _tan=Math.tan; - var _asin=Math.asin; - var _acos=Math.acos; - var _atan=Math.atan; - function _sleep(seconds) { - // unsigned sleep(unsigned seconds); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/sleep.html - return _usleep(seconds * 1e6); - } - function _strdup(ptr) { - var len = _strlen(ptr); - var newStr = _malloc(len + 1); - _memcpy(newStr, ptr, len); - HEAP8[(((newStr)+(len))|0)]=0; - return newStr; - } - function _vsnprintf(s, n, format, va_arg) { - return _snprintf(s, n, format, HEAP32[((va_arg)>>2)]); - } - function _abort() { - ABORT = true; - throw 'abort() at ' + (new Error().stack); - } - function _sysconf(name) { - // long sysconf(int name); - // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html - switch(name) { - case 8: return PAGE_SIZE; - case 54: - case 56: - case 21: - case 61: - case 63: - case 22: - case 67: - case 23: - case 24: - case 25: - case 26: - case 27: - case 69: - case 28: - case 101: - case 70: - case 71: - case 29: - case 30: - case 199: - case 75: - case 76: - case 32: - case 43: - case 44: - case 80: - case 46: - case 47: - case 45: - case 48: - case 49: - case 42: - case 82: - case 33: - case 7: - case 108: - case 109: - case 107: - case 112: - case 119: - case 121: - return 200809; - case 13: - case 104: - case 94: - case 95: - case 34: - case 35: - case 77: - case 81: - case 83: - case 84: - case 85: - case 86: - case 87: - case 88: - case 89: - case 90: - case 91: - case 94: - case 95: - case 110: - case 111: - case 113: - case 114: - case 115: - case 116: - case 117: - case 118: - case 120: - case 40: - case 16: - case 79: - case 19: - return -1; - case 92: - case 93: - case 5: - case 72: - case 6: - case 74: - case 92: - case 93: - case 96: - case 97: - case 98: - case 99: - case 102: - case 103: - case 105: - return 1; - case 38: - case 66: - case 50: - case 51: - case 4: - return 1024; - case 15: - case 64: - case 41: - return 32; - case 55: - case 37: - case 17: - return 2147483647; - case 18: - case 1: - return 47839; - case 59: - case 57: - return 99; - case 68: - case 58: - return 2048; - case 0: return 2097152; - case 3: return 65536; - case 14: return 32768; - case 73: return 32767; - case 39: return 16384; - case 60: return 1000; - case 106: return 700; - case 52: return 256; - case 62: return 255; - case 2: return 100; - case 65: return 64; - case 36: return 20; - case 100: return 16; - case 20: return 6; - case 53: return 4; - case 10: return 1; - } - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } - function _sbrk(bytes) { - // Implement a Linux-like 'memory area' for our 'process'. - // Changes the size of the memory area by |bytes|; returns the - // address of the previous top ('break') of the memory area - // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP - var self = _sbrk; - if (!self.called) { - DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned - self.called = true; - assert(Runtime.dynamicAlloc); - self.alloc = Runtime.dynamicAlloc; - Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') }; - } - var ret = DYNAMICTOP; - if (bytes != 0) self.alloc(bytes); - return ret; // Previous break location. - } - function _llvm_lifetime_start() {} - function _llvm_lifetime_end() {} - var _llvm_memset_p0i8_i64=_memset; - var _llvm_memcpy_p0i8_p0i8_i64=_memcpy; - function _llvm_trap() { - throw 'trap! ' + new Error().stack; - } - var Browser={mainLoop:{scheduler:null,shouldPause:false,paused:false,queue:[],pause:function () { - Browser.mainLoop.shouldPause = true; - },resume:function () { - if (Browser.mainLoop.paused) { - Browser.mainLoop.paused = false; - Browser.mainLoop.scheduler(); - } - Browser.mainLoop.shouldPause = false; - },updateStatus:function () { - if (Module['setStatus']) { - var message = Module['statusMessage'] || 'Please wait...'; - var remaining = Browser.mainLoop.remainingBlockers; - var expected = Browser.mainLoop.expectedBlockers; - if (remaining) { - if (remaining < expected) { - Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); - } else { - Module['setStatus'](message); - } - } else { - Module['setStatus'](''); - } - } - }},isFullScreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function () { - if (Browser.initted) return; - Browser.initted = true; - try { - new Blob(); - Browser.hasBlobConstructor = true; - } catch(e) { - Browser.hasBlobConstructor = false; - console.log("warning: no blob constructor, cannot create blobs with mimetypes"); - } - Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); - Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : console.log("warning: cannot create object URLs"); - // Support for plugins that can process preloaded files. You can add more of these to - // your app by creating and appending to Module.preloadPlugins. - // - // Each plugin is asked if it can handle a file based on the file's name. If it can, - // it is given the file's raw data. When it is done, it calls a callback with the file's - // (possibly modified) data. For example, a plugin might decompress a file, or it - // might create some side data structure for use later (like an Image element, etc.). - function getMimetype(name) { - return { - 'jpg': 'image/jpeg', - 'jpeg': 'image/jpeg', - 'png': 'image/png', - 'bmp': 'image/bmp', - 'ogg': 'audio/ogg', - 'wav': 'audio/wav', - 'mp3': 'audio/mpeg' - }[name.substr(name.lastIndexOf('.')+1)]; - } - if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; - var imagePlugin = {}; - imagePlugin['canHandle'] = function(name) { - return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/.exec(name); - }; - imagePlugin['handle'] = function(byteArray, name, onload, onerror) { - var b = null; - if (Browser.hasBlobConstructor) { - try { - b = new Blob([byteArray], { type: getMimetype(name) }); - } catch(e) { - Runtime.warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); - } - } - if (!b) { - var bb = new Browser.BlobBuilder(); - bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range - b = bb.getBlob(); - } - var url = Browser.URLObject.createObjectURL(b); - var img = new Image(); - img.onload = function() { - assert(img.complete, 'Image ' + name + ' could not be decoded'); - var canvas = document.createElement('canvas'); - canvas.width = img.width; - canvas.height = img.height; - var ctx = canvas.getContext('2d'); - ctx.drawImage(img, 0, 0); - Module["preloadedImages"][name] = canvas; - Browser.URLObject.revokeObjectURL(url); - if (onload) onload(byteArray); - }; - img.onerror = function(event) { - console.log('Image ' + url + ' could not be decoded'); - if (onerror) onerror(); - }; - img.src = url; - }; - Module['preloadPlugins'].push(imagePlugin); - var audioPlugin = {}; - audioPlugin['canHandle'] = function(name) { - return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; - }; - audioPlugin['handle'] = function(byteArray, name, onload, onerror) { - var done = false; - function finish(audio) { - if (done) return; - done = true; - Module["preloadedAudios"][name] = audio; - if (onload) onload(byteArray); - } - function fail() { - if (done) return; - done = true; - Module["preloadedAudios"][name] = new Audio(); // empty shim - if (onerror) onerror(); - } - if (Browser.hasBlobConstructor) { - try { - var b = new Blob([byteArray], { type: getMimetype(name) }); - } catch(e) { - return fail(); - } - var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! - var audio = new Audio(); - audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 - audio.onerror = function(event) { - if (done) return; - console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); - function encode64(data) { - var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - var PAD = '='; - var ret = ''; - var leftchar = 0; - var leftbits = 0; - for (var i = 0; i < data.length; i++) { - leftchar = (leftchar << 8) | data[i]; - leftbits += 8; - while (leftbits >= 6) { - var curr = (leftchar >> (leftbits-6)) & 0x3f; - leftbits -= 6; - ret += BASE[curr]; - } - } - if (leftbits == 2) { - ret += BASE[(leftchar&3) << 4]; - ret += PAD + PAD; - } else if (leftbits == 4) { - ret += BASE[(leftchar&0xf) << 2]; - ret += PAD; - } - return ret; - } - audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); - finish(audio); // we don't wait for confirmation this worked - but it's worth trying - }; - audio.src = url; - // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror - Browser.safeSetTimeout(function() { - finish(audio); // try to use it even though it is not necessarily ready to play - }, 10000); - } else { - return fail(); - } - }; - Module['preloadPlugins'].push(audioPlugin); - // Canvas event setup - var canvas = Module['canvas']; - canvas.requestPointerLock = canvas['requestPointerLock'] || - canvas['mozRequestPointerLock'] || - canvas['webkitRequestPointerLock']; - canvas.exitPointerLock = document['exitPointerLock'] || - document['mozExitPointerLock'] || - document['webkitExitPointerLock'] || - function(){}; // no-op if function does not exist - canvas.exitPointerLock = canvas.exitPointerLock.bind(document); - function pointerLockChange() { - Browser.pointerLock = document['pointerLockElement'] === canvas || - document['mozPointerLockElement'] === canvas || - document['webkitPointerLockElement'] === canvas; - } - document.addEventListener('pointerlockchange', pointerLockChange, false); - document.addEventListener('mozpointerlockchange', pointerLockChange, false); - document.addEventListener('webkitpointerlockchange', pointerLockChange, false); - if (Module['elementPointerLock']) { - canvas.addEventListener("click", function(ev) { - if (!Browser.pointerLock && canvas.requestPointerLock) { - canvas.requestPointerLock(); - ev.preventDefault(); - } - }, false); - } - },createContext:function (canvas, useWebGL, setInModule) { - var ctx; - try { - if (useWebGL) { - ctx = canvas.getContext('experimental-webgl', { - alpha: false - }); - } else { - ctx = canvas.getContext('2d'); - } - if (!ctx) throw ':('; - } catch (e) { - Module.print('Could not create canvas - ' + e); - return null; - } - if (useWebGL) { - // Set the background of the WebGL canvas to black - canvas.style.backgroundColor = "black"; - // Warn on context loss - canvas.addEventListener('webglcontextlost', function(event) { - alert('WebGL context lost. You will need to reload the page.'); - }, false); - } - if (setInModule) { - Module.ctx = ctx; - Module.useWebGL = useWebGL; - Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); - Browser.init(); - } - return ctx; - },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas) { - Browser.lockPointer = lockPointer; - Browser.resizeCanvas = resizeCanvas; - if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; - if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; - var canvas = Module['canvas']; - function fullScreenChange() { - Browser.isFullScreen = false; - if ((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] || - document['mozFullScreenElement'] || document['mozFullscreenElement'] || - document['fullScreenElement'] || document['fullscreenElement']) === canvas) { - canvas.cancelFullScreen = document['cancelFullScreen'] || - document['mozCancelFullScreen'] || - document['webkitCancelFullScreen']; - canvas.cancelFullScreen = canvas.cancelFullScreen.bind(document); - if (Browser.lockPointer) canvas.requestPointerLock(); - Browser.isFullScreen = true; - if (Browser.resizeCanvas) Browser.setFullScreenCanvasSize(); - } else if (Browser.resizeCanvas){ - Browser.setWindowedCanvasSize(); - } - if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullScreen); - } - if (!Browser.fullScreenHandlersInstalled) { - Browser.fullScreenHandlersInstalled = true; - document.addEventListener('fullscreenchange', fullScreenChange, false); - document.addEventListener('mozfullscreenchange', fullScreenChange, false); - document.addEventListener('webkitfullscreenchange', fullScreenChange, false); - } - canvas.requestFullScreen = canvas['requestFullScreen'] || - canvas['mozRequestFullScreen'] || - (canvas['webkitRequestFullScreen'] ? function() { canvas['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); - canvas.requestFullScreen(); - },requestAnimationFrame:function (func) { - if (!window.requestAnimationFrame) { - window.requestAnimationFrame = window['requestAnimationFrame'] || - window['mozRequestAnimationFrame'] || - window['webkitRequestAnimationFrame'] || - window['msRequestAnimationFrame'] || - window['oRequestAnimationFrame'] || - window['setTimeout']; - } - window.requestAnimationFrame(func); - },safeCallback:function (func) { - return function() { - if (!ABORT) return func.apply(null, arguments); - }; - },safeRequestAnimationFrame:function (func) { - return Browser.requestAnimationFrame(function() { - if (!ABORT) func(); - }); - },safeSetTimeout:function (func, timeout) { - return setTimeout(function() { - if (!ABORT) func(); - }, timeout); - },safeSetInterval:function (func, timeout) { - return setInterval(function() { - if (!ABORT) func(); - }, timeout); - },getUserMedia:function (func) { - if(!window.getUserMedia) { - window.getUserMedia = navigator['getUserMedia'] || - navigator['mozGetUserMedia']; - } - window.getUserMedia(func); - },getMovementX:function (event) { - return event['movementX'] || - event['mozMovementX'] || - event['webkitMovementX'] || - 0; - },getMovementY:function (event) { - return event['movementY'] || - event['mozMovementY'] || - event['webkitMovementY'] || - 0; - },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,calculateMouseEvent:function (event) { // event should be mousemove, mousedown or mouseup - if (Browser.pointerLock) { - // When the pointer is locked, calculate the coordinates - // based on the movement of the mouse. - // Workaround for Firefox bug 764498 - if (event.type != 'mousemove' && - ('mozMovementX' in event)) { - Browser.mouseMovementX = Browser.mouseMovementY = 0; - } else { - Browser.mouseMovementX = Browser.getMovementX(event); - Browser.mouseMovementY = Browser.getMovementY(event); - } - Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; - Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; - } else { - // Otherwise, calculate the movement based on the changes - // in the coordinates. - var rect = Module["canvas"].getBoundingClientRect(); - var x = event.pageX - (window.scrollX + rect.left); - var y = event.pageY - (window.scrollY + rect.top); - // the canvas might be CSS-scaled compared to its backbuffer; - // SDL-using content will want mouse coordinates in terms - // of backbuffer units. - var cw = Module["canvas"].width; - var ch = Module["canvas"].height; - x = x * (cw / rect.width); - y = y * (ch / rect.height); - Browser.mouseMovementX = x - Browser.mouseX; - Browser.mouseMovementY = y - Browser.mouseY; - Browser.mouseX = x; - Browser.mouseY = y; - } - },xhrLoad:function (url, onload, onerror) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.responseType = 'arraybuffer'; - xhr.onload = function() { - if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 - onload(xhr.response); - } else { - onerror(); - } - }; - xhr.onerror = onerror; - xhr.send(null); - },asyncLoad:function (url, onload, onerror, noRunDep) { - Browser.xhrLoad(url, function(arrayBuffer) { - assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); - onload(new Uint8Array(arrayBuffer)); - if (!noRunDep) removeRunDependency('al ' + url); - }, function(event) { - if (onerror) { - onerror(); - } else { - throw 'Loading data file "' + url + '" failed.'; - } - }); - if (!noRunDep) addRunDependency('al ' + url); - },resizeListeners:[],updateResizeListeners:function () { - var canvas = Module['canvas']; - Browser.resizeListeners.forEach(function(listener) { - listener(canvas.width, canvas.height); - }); - },setCanvasSize:function (width, height, noUpdates) { - var canvas = Module['canvas']; - canvas.width = width; - canvas.height = height; - if (!noUpdates) Browser.updateResizeListeners(); - },windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function () { - var canvas = Module['canvas']; - this.windowedWidth = canvas.width; - this.windowedHeight = canvas.height; - canvas.width = screen.width; - canvas.height = screen.height; - var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]; - flags = flags | 0x00800000; // set SDL_FULLSCREEN flag - HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags - Browser.updateResizeListeners(); - },setWindowedCanvasSize:function () { - var canvas = Module['canvas']; - canvas.width = this.windowedWidth; - canvas.height = this.windowedHeight; - var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]; - flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag - HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags - Browser.updateResizeListeners(); - }}; -__ATINIT__.unshift({ func: function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() } });__ATMAIN__.push({ func: function() { FS.ignorePermissions = false } });__ATEXIT__.push({ func: function() { FS.quit() } });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice; -___errno_state = Runtime.staticAlloc(4); HEAP32[((___errno_state)>>2)]=0; -_fgetc.ret = allocate([0], "i8", ALLOC_STATIC); -_fputc.ret = allocate([0], "i8", ALLOC_STATIC); -___buildEnvironment(ENV); -Module["requestFullScreen"] = function(lockPointer, resizeCanvas) { Browser.requestFullScreen(lockPointer, resizeCanvas) }; - Module["requestAnimationFrame"] = function(func) { Browser.requestAnimationFrame(func) }; - Module["pauseMainLoop"] = function() { Browser.mainLoop.pause() }; - Module["resumeMainLoop"] = function() { Browser.mainLoop.resume() }; - Module["getUserMedia"] = function() { Browser.getUserMedia() } -STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP); -staticSealed = true; // seal the static portion of memory -STACK_MAX = STACK_BASE + 5242880; -DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX); -assert(DYNAMIC_BASE < TOTAL_MEMORY); // Stack must fit in TOTAL_MEMORY; allocations from here on may enlarge TOTAL_MEMORY -var Math_min = Math.min; -function invoke_viiiii(index,a1,a2,a3,a4,a5) { - try { - Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_viffiii(index,a1,a2,a3,a4,a5,a6) { - try { - Module["dynCall_viffiii"](index,a1,a2,a3,a4,a5,a6); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_vf(index,a1) { - try { - Module["dynCall_vf"](index,a1); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_i(index) { - try { - return Module["dynCall_i"](index); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_vi(index,a1) { - try { - Module["dynCall_vi"](index,a1); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_vii(index,a1,a2) { - try { - Module["dynCall_vii"](index,a1,a2); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_ii(index,a1) { - try { - return Module["dynCall_ii"](index,a1); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_iff(index,a1,a2) { - try { - return Module["dynCall_iff"](index,a1,a2); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_iiii(index,a1,a2,a3) { - try { - return Module["dynCall_iiii"](index,a1,a2,a3); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_viii(index,a1,a2,a3) { - try { - Module["dynCall_viii"](index,a1,a2,a3); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_v(index) { - try { - Module["dynCall_v"](index); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_vifiii(index,a1,a2,a3,a4,a5) { - try { - Module["dynCall_vifiii"](index,a1,a2,a3,a4,a5); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_iiiii(index,a1,a2,a3,a4) { - try { - return Module["dynCall_iiiii"](index,a1,a2,a3,a4); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_fii(index,a1,a2) { - try { - return Module["dynCall_fii"](index,a1,a2); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function invoke_iii(index,a1,a2) { - try { - return Module["dynCall_iii"](index,a1,a2); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} -function asmPrintInt(x, y) { - Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack); -} -function asmPrintFloat(x, y) { - Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack); -} -// EMSCRIPTEN_START_ASM -var asm=(function(global,env,buffer){"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.STACKTOP|0;var j=env.STACK_MAX|0;var k=env.tempDoublePtr|0;var l=env.ABORT|0;var m=env._stderr|0;var n=env._stdout|0;var o=env._stdin|0;var p=+env.NaN;var q=+env.Infinity;var r=0;var s=0;var t=0;var u=0;var v=0,w=0,x=0,y=0,z=0.0,A=0,B=0,C=0,D=0.0;var E=0;var F=0;var G=0;var H=0;var I=0;var J=0;var K=0;var L=0;var M=0;var N=0;var O=global.Math.floor;var P=global.Math.abs;var Q=global.Math.sqrt;var R=global.Math.pow;var S=global.Math.cos;var T=global.Math.sin;var U=global.Math.tan;var V=global.Math.acos;var W=global.Math.asin;var X=global.Math.atan;var Y=global.Math.atan2;var Z=global.Math.exp;var _=global.Math.log;var $=global.Math.ceil;var aa=global.Math.imul;var ab=env.abort;var ac=env.assert;var ad=env.asmPrintInt;var ae=env.asmPrintFloat;var af=env.copyTempDouble;var ag=env.copyTempFloat;var ah=env.min;var ai=env.invoke_viiiii;var aj=env.invoke_viffiii;var ak=env.invoke_vf;var al=env.invoke_i;var am=env.invoke_vi;var an=env.invoke_vii;var ao=env.invoke_ii;var ap=env.invoke_iff;var aq=env.invoke_iiii;var ar=env.invoke_viii;var as=env.invoke_v;var at=env.invoke_vifiii;var au=env.invoke_iiiii;var av=env.invoke_fii;var aw=env.invoke_iii;var ax=env._lseek;var ay=env.__scanString;var az=env._fclose;var aA=env._uname;var aB=env._sleep;var aC=env.__isFloat;var aD=env._fflush;var aE=env._strtol;var aF=env._fputc;var aG=env._iconv;var aH=env.___signgam;var aI=env._fwrite;var aJ=env._send;var aK=env._fputs;var aL=env._tmpnam;var aM=env._isspace;var aN=env._localtime;var aO=env._read;var aP=env._ceil;var aQ=env._strstr;var aR=env._fileno;var aS=env._perror;var aT=env._ctime;var aU=env._fsync;var aV=env._signal;var aW=env._opendir;var aX=env._fmod;var aY=env._strcmp;var aZ=env._memchr;var a_=env._strncmp;var a$=env._tmpfile;var a0=env._snprintf;var a1=env._fgetc;var a2=env._pclose;var a3=env._readdir;var a4=env._cosh;var a5=env._atexit;var a6=env._fgets;var a7=env._close;var a8=env._strchr;var a9=env._asin;var ba=env._llvm_lifetime_start;var bb=env.___setErrNo;var bc=env._ftell;var bd=env._exit;var be=env._sprintf;var bf=env._llvm_lifetime_end;var bg=env._asctime;var bh=env._strrchr;var bi=env._iconv_open;var bj=env._modf;var bk=env._strcspn;var bl=env._getcwd;var bm=env._gmtime;var bn=env._localtime_r;var bo=env._asctime_r;var bp=env._recv;var bq=env._cos;var br=env._putchar;var bs=env._isalnum;var bt=env._popen;var bu=env._erfc;var bv=env.__exit;var bw=env._strftime;var bx=env._llvm_va_end;var by=env._tzset;var bz=env._sinh;var bA=env._setlocale;var bB=env._isprint;var bC=env._toupper;var bD=env._printf;var bE=env._pread;var bF=env._fopen;var bG=env._open;var bH=env._usleep;var bI=env._log;var bJ=env._puts;var bK=env._mktime;var bL=env._fdopen;var bM=env._qsort;var bN=env._system;var bO=env._isalpha;var bP=env._strdup;var bQ=env._log10;var bR=env._closedir;var bS=env._isatty;var bT=env.__formatString;var bU=env._getenv;var bV=env._gettimeofday;var bW=env._atoi;var bX=env._vfprintf;var bY=env._chdir;var bZ=env._llvm_pow_f64;var b_=env._sbrk;var b$=env._localeconv;var b0=env.___errno_location;var b1=env._strerror;var b2=env._lgamma;var b3=env._erf;var b4=env._strspn;var b5=env.__parseInt;var b6=env._ungetc;var b7=env._llvm_trap;var b8=env._rename;var b9=env._vsnprintf;var ca=env._sscanf;var cb=env._sysconf;var cc=env._acos;var cd=env._fread;var ce=env._abort;var cf=env._fprintf;var cg=env.___fpclassifyf;var ch=env._tan;var ci=env.___buildEnvironment;var cj=env._feof;var ck=env._strncat;var cl=env._gmtime_r;var cm=env._fabs;var cn=env._floor;var co=env.__reallyNegative;var cp=env._fseek;var cq=env._sqrt;var cr=env._write;var cs=env._rewind;var ct=env._sin;var cu=env._stat;var cv=env._longjmp;var cw=env._atan;var cx=env._readdir_r;var cy=env._strpbrk;var cz=env._iconv_close;var cA=env._setbuf;var cB=env._nl_langinfo;var cC=env._pwrite;var cD=env._strerror_r;var cE=env._atan2;var cF=env._exp;var cG=env._time;var cH=env._setvbuf; -// EMSCRIPTEN_START_FUNCS -function cX(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+7>>3<<3;return b|0}function cY(){return i|0}function cZ(a){a=a|0;i=a}function c_(a,b){a=a|0;b=b|0;if((r|0)==0){r=a;s=b}}function c$(a){a=a|0;E=a}function c0(a){a=a|0;F=a}function c1(a){a=a|0;G=a}function c2(a){a=a|0;H=a}function c3(a){a=a|0;I=a}function c4(a){a=a|0;J=a}function c5(a){a=a|0;K=a}function c6(a){a=a|0;L=a}function c7(a){a=a|0;M=a}function c8(a){a=a|0;N=a}function c9(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,x=0.0;d=i;i=i+96|0;e=d|0;f=d+48|0;do{if((c[64808+(b*688&-1)>>2]|0)==1){if((a[64812+(b*688&-1)|0]&1)==0){break}g=4968+(b*51&-1)|0;a[g]=0;j=4608+(b<<2)|0;k=+da(c[j>>2]|0,+h[64664+(b*688&-1)>>3]);t3(e,k);k=+da(c[j>>2]|0,+h[64672+(b*688&-1)>>3]);t3(f,k);l=c[f+20>>2]|0;m=c[e+20>>2]|0;n=(l|0)==(m|0);do{if(n){if((c[f+28>>2]|0)!=(c[e+28>>2]|0)){break}if((c[f+8>>2]|0)!=(c[e+8>>2]|0)){a[g]=a[172544]|0;a[g+1|0]=a[172545|0]|0;a[g+2|0]=a[172546|0]|0}o=c[j>>2]|0;if(o>>>0>=4){p=g;i=d;return p|0}if((a[g]|0)!=0){q=(uA(g|0)|0)+(4968+(b*51&-1))|0;w=58;a[q]=w&255;w=w>>8;a[q+1|0]=w&255}q=(uA(g|0)|0)+(4968+(b*51&-1))|0;a[q]=a[164672]|0;a[q+1|0]=a[164673|0]|0;a[q+2|0]=a[164674|0]|0;if(o>>>0>=3){p=g;i=d;return p|0}o=(uA(g|0)|0)+(4968+(b*51&-1))|0;w=5449018;a[o]=w&255;w=w>>8;a[o+1|0]=w&255;w=w>>8;a[o+2|0]=w&255;w=w>>8;a[o+3|0]=w&255;p=g;i=d;return p|0}}while(0);o=64813+(b*688&-1)|0;q=a8(o|0,109)|0;r=q>>>0<(a8(o|0,100)|0)>>>0;do{if(n){if(r){a[g]=a[145768]|0;a[g+1|0]=a[145769|0]|0;a[g+2|0]=a[145770|0]|0;a[g+3|0]=a[145771|0]|0;a[g+4|0]=a[145772|0]|0;a[g+5|0]=a[145773|0]|0;break}else{a[g]=a[143792]|0;a[g+1|0]=a[143793|0]|0;a[g+2|0]=a[143794|0]|0;a[g+3|0]=a[143795|0]|0;a[g+4|0]=a[143796|0]|0;a[g+5|0]=a[143797|0]|0;break}}else{o=g;q=o|0;w=r?623865125:623862821;a[q]=w&255;w=w>>8;a[q+1|0]=w&255;w=w>>8;a[q+2|0]=w&255;w=w>>8;a[q+3|0]=w&255;q=o+4|0;w=r?2436964:2436973;a[q]=w&255;w=w>>8;a[q+1|0]=w&255;w=w>>8;a[q+2|0]=w&255;w=w>>8;a[q+3|0]=w&255;q=(uA(g|0)|0)+(4968+(b*51&-1))|0;if(((l|0)/100&-1|0)==((m|0)/100&-1|0)){w=121;a[q]=w&255;w=w>>8;a[q+1|0]=w&255;break}else{w=89;a[q]=w&255;w=w>>8;a[q+1|0]=w&255;break}}}while(0);if((c[j>>2]|0)>>>0>=5){p=g;i=d;return p|0}m=(uA(g|0)|0)+(4968+(b*51&-1))|0;a[m]=a[142240]|0;a[m+1|0]=a[142241|0]|0;a[m+2|0]=a[142242|0]|0;a[m+3|0]=a[142243|0]|0;a[m+4|0]=a[142244|0]|0;a[m+5|0]=a[142245|0]|0;a[m+6|0]=a[142246|0]|0;p=g;i=d;return p|0}}while(0);e=4968+(b*51&-1)|0;uB(e|0,64864+(b*688&-1)|0);if((aY(e|0,186288)|0)!=0){p=e;i=d;return p|0}k=+h[64664+(b*688&-1)>>3];if((a[64788+(b*688&-1)|0]&1)==0){s=+h[64672+(b*688&-1)>>3];t=k}else{u=+h[64800+(b*688&-1)>>3];x=+Z(+(k*u));s=+Z(+(+h[64672+(b*688&-1)>>3]*u));t=x}b=~~+$(+(-0.0- +bQ(+(+P(+(s-t))))));if(t*s>0.0&(b|0)>4){f=(b|0)>14?14:b;be(e|0,180872,(v=i,i=i+8|0,c[v>>2]=f,v)|0);p=e;i=d;return p|0}else{a[e]=a[170912]|0;a[e+1|0]=a[170913|0]|0;a[e+2|0]=a[170914|0]|0;p=e;i=d;return p|0}return 0}function da(a,b){a=a|0;b=+b;var d=0,e=0,f=0.0,g=0,h=0,j=0;d=i;i=i+48|0;e=d|0;if(a>>>0<2){f=b;i=d;return+f}t3(e,b);g=e|0;if((c[g>>2]|0)>55){h=e+4|0;c[h>>2]=(c[h>>2]|0)+1}c[g>>2]=0;do{if(a>>>0>2){g=e+4|0;if((c[g>>2]|0)>55){h=e+8|0;c[h>>2]=(c[h>>2]|0)+1}c[g>>2]=0;if(a>>>0<=3){break}g=e+8|0;if((c[g>>2]|0)>22){c[g>>2]=0;c[e+12>>2]=0;g=e+28|0;c[g>>2]=(c[g>>2]|0)+1;b=+t2(e);t3(e,b)}if(a>>>0<=5){break}g=e+12|0;do{if((c[g>>2]|0)>25){h=e+16|0;j=(c[h>>2]|0)+1|0;c[h>>2]=j;if((j|0)<=11){break}j=e+20|0;c[j>>2]=(c[j>>2]|0)+1;c[h>>2]=0}}while(0);c[g>>2]=1}}while(0);f=+t2(e);i=d;return+f}function db(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;do{if((a|0)==0){f=ut(b)|0;if((f|0)!=0){g=f;break}gk();f=ut(b)|0;if((f|0)!=0|(d|0)==0){g=f;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=d,v)|0);return 0}else{f=uv(a,b)|0;if((f|0)!=0){g=f;break}gk();f=uv(a,b)|0;if((f|0)!=0|(d|0)==0){g=f;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=d,v)|0);return 0}}while(0);i=e;return g|0}function dc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0,j=0.0,k=0,l=0,n=0.0,o=0,p=0,q=0;d=i;e=64664+(a*688&-1)|0;f=+h[e>>3];g=64672+(a*688&-1)|0;j=+h[g>>3];k=(b|0)!=0;do{if(k){if(!(f==8.988465674311579e+307|j==-8.988465674311579e+307)){break}uf(c[13898]|0,b,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if(j-f!=0.0){i=d;return}b=64648+(a*688&-1)|0;l=c[b>>2]|0;if((l|0)==0){uf(-1,197584,(v=i,i=i+8|0,c[v>>2]=56832+(a*24&-1),v)|0)}if(j==0.0){n=1.0}else{n=+P(+j)*.01}o=(a|0)!=0|k;if(o){k=c[m>>2]|0;p=56832+(a*24&-1)|0;cf(k|0,206616,(v=i,i=i+24|0,c[v>>2]=p,h[v+8>>3]=f,h[v+16>>3]=j,v)|0);q=c[b>>2]|0}else{q=l}if((q&1|0)!=0){h[e>>3]=+h[e>>3]-n}if((q&2|0)!=0){h[g>>3]=n+ +h[g>>3]}if(!o){i=d;return}n=+h[g>>3];cf(c[m>>2]|0,202928,(v=i,i=i+16|0,h[v>>3]=+h[e>>3],h[v+8>>3]=n,v)|0);i=d;return}function dd(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,Q=0.0,S=0,T=0.0,U=0.0;e=i;f=c[64648+(b*688&-1)>>2]|0;g=(f&1|0)==0;if(g){j=0}else{j=(f&4|0)==0}k=(f&2|0)==0;if(k){l=0}else{l=(f&8|0)==0}do{if(!g){if((c[64728+(b*688&-1)>>2]&2|0)==0){break}f=64664+(b*688&-1)|0;m=+h[64744+(b*688&-1)>>3];if(+h[f>>3]<=m){break}h[f>>3]=m}}while(0);do{if(!k){if((c[64732+(b*688&-1)>>2]&1|0)==0){break}g=64672+(b*688&-1)|0;m=+h[64752+(b*688&-1)>>3];if(+h[g>>3]>=m){break}h[g>>3]=m}}while(0);if((c[64916+(b*688&-1)>>2]|0)==0){i=e;return}k=64920+(b*688&-1)|0;g=c[k>>2]|0;do{if((g|0)==2){m=+h[64960+(b*688&-1)>>3];h[4880+(b<<3)>>3]=m;if(j){n=+h[64952+(b*688&-1)>>3]==-8.988465674311579e+307}else{n=0}if(!l){o=0;p=n;q=m;break}o=+h[64968+(b*688&-1)>>3]==8.988465674311579e+307;p=n;q=m}else if((g|0)==1){m=+h[64664+(b*688&-1)>>3]- +h[64672+(b*688&-1)>>3];r=+P(+m);do{if(m==0.0){s=1.0}else{if(r>=8.988465674311579e+307){uf(-1,98888,(v=i,i=i+8|0,c[v>>2]=56832+(b*24&-1),v)|0)}t=+R(10.0,+(+O(+(+bQ(+r)))));u=r/t;w=+(d|0);x=w/u;do{if(x>40.0){y=.05}else{if(x>20.0){y=.1;break}if(x>10.0){y=.2;break}if(x>4.0){y=.5;break}if(x>2.0){y=1.0;break}if(x>.5){y=2.0;break}y=+$(+u)}}while(0);u=t*y;x=(a[64788+(b*688&-1)|0]&1)!=0&u<1.0?1.0:u;if((c[64808+(b*688&-1)>>2]|0)!=1){s=x;break}f=(d*3&-1|0)/5&-1;z=4608+(b<<2)|0;c[z>>2]=1;do{if(x>5.0){u=r/60.0;A=+R(12.0,+(+O(+(+_(+u)/2.4849066497880004))));B=u/A;u=+(f|0)/B;do{if(u>24.0){C=A/24.0}else{if(u>12.0){C=A/12.0;break}if(u>6.0){C=A/6.0;break}if(u>4.0){C=A*.25;break}if(u>2.0){C=A*.5;break}if(u>1.0){C=A;break}if(u>.5){C=A*2.0;break}if(u>.3333333333333333){C=A*3.0;break}else{C=A*+$(+B);break}}}while(0);B=C*60.0;if(B<60.0){D=B;break}c[z>>2]=2;D=B}else{D=x}}while(0);do{if(D>300.0){x=r/3600.0;t=+R(12.0,+(+O(+(+_(+x)/2.4849066497880004))));B=x/t;x=+(f|0)/B;do{if(x>24.0){E=t/24.0}else{if(x>12.0){E=t/12.0;break}if(x>6.0){E=t/6.0;break}if(x>4.0){E=t*.25;break}if(x>2.0){E=t*.5;break}if(x>1.0){E=t;break}if(x>.5){E=t*2.0;break}if(x>.3333333333333333){E=t*3.0;break}else{E=t*+$(+B);break}}}while(0);B=E*3600.0;if(B<3600.0){F=B;break}c[z>>2]=3;F=B}else{F=D}}while(0);do{if(F>3600.0){B=r/86400.0;t=+R(12.0,+(+O(+(+_(+B)/2.4849066497880004))));x=B/t;B=+(f|0)/x;do{if(B>24.0){G=t/24.0}else{if(B>12.0){G=t/12.0;break}if(B>6.0){G=t/6.0;break}if(B>4.0){G=t*.25;break}if(B>2.0){G=t*.5;break}if(B>1.0){G=t;break}if(B>.5){G=t*2.0;break}if(B>.3333333333333333){G=t*3.0;break}else{G=t*+$(+x);break}}}while(0);x=G*86400.0;if(x<86400.0){H=x;break}c[z>>2]=4;H=x}else{H=F}}while(0);do{if(H>172800.0){x=r/604800.0;t=+R(10.0,+(+O(+(+bQ(+x)))));B=x/t;x=w/B;do{if(x>40.0){I=.05}else{if(x>20.0){I=.1;break}if(x>10.0){I=.2;break}if(x>4.0){I=.5;break}if(x>2.0){I=1.0;break}if(x>.5){I=2.0;break}I=+$(+B)}}while(0);B=t*I*604800.0;x=B<604800.0?604800.0:B;if(x<604800.0){J=x;break}c[z>>2]=5;J=x}else{J=H}}while(0);do{if(J>1814400.0){x=r/2629800.0;B=+R(10.0,+(+O(+(+bQ(+x)))));A=x/B;x=w/A;do{if(x>40.0){K=.05}else{if(x>20.0){K=.1;break}if(x>10.0){K=.2;break}if(x>4.0){K=.5;break}if(x>2.0){K=1.0;break}if(x>.5){K=2.0;break}K=+$(+A)}}while(0);A=B*K*2629800.0;x=A<2629800.0?2629800.0:A;if(x<2629800.0){L=x;break}c[z>>2]=6;L=x}else{L=J}}while(0);if(L<=2629800.0){s=L;break}w=r/31557600.0;x=+R(12.0,+(+O(+(+_(+w)/2.4849066497880004))));A=w/x;w=+(f|0)/A;do{if(w>24.0){M=x/24.0}else{if(w>12.0){M=x/12.0;break}if(w>6.0){M=x/6.0;break}if(w>4.0){M=x*.25;break}if(w>2.0){M=x*.5;break}if(w>1.0){M=x;break}if(w>.5){M=x*2.0;break}if(w>.3333333333333333){M=x*3.0;break}else{M=x*+$(+A);break}}}while(0);A=M*31557600.0;if(A<31557600.0){s=A;break}c[z>>2]=7;s=A}}while(0);h[4880+(b<<3)>>3]=s;o=l;p=j;q=s}else{o=0;p=0;q=0.0}}while(0);j=(c[64808+(b*688&-1)>>2]|0)==1;do{if(j){if((c[k>>2]|0)!=2){break}if(q>=31536.0e3){c[4608+(b<<2)>>2]=7;break}if(q>=2419200.0){c[4608+(b<<2)>>2]=6;break}if(q>=604800.0){c[4608+(b<<2)>>2]=5;break}if(q>=86400.0){c[4608+(b<<2)>>2]=4;break}if(q>=3600.0){c[4608+(b<<2)>>2]=3;break}l=4608+(b<<2)|0;if(q<60.0){c[l>>2]=1;break}else{c[l>>2]=2;break}}}while(0);do{if(p){k=64664+(b*688&-1)|0;q=+h[k>>3];l=q>=+h[64672+(b*688&-1)>>3];s=+h[4880+(b<<3)>>3];M=q/s;if(l){N=+$(+M)}else{N=+O(+M)}M=s*N;do{if(j){s=+da(c[4608+(b<<2)>>2]|0,M);if(s>M&l){Q=s;break}if(s>3]=Q;if((c[64728+(b*688&-1)>>2]&1|0)==0){break}s=+h[64736+(b*688&-1)>>3];if(Q>=s){break}h[k>>3]=s}}while(0);do{if(o){j=64672+(b*688&-1)|0;Q=+h[j>>3];p=+h[64664+(b*688&-1)>>3]>3];s=Q/N;if(p){T=+$(+s)}else{T=+O(+s)}s=N*T;do{if((c[64808+(b*688&-1)>>2]|0)==1){N=+da(c[4608+(b<<2)>>2]|0,s);if(N>s&p){U=N;break}if(N>3]=U;if((c[64732+(b*688&-1)>>2]&2|0)==0){break}M=+h[64760+(b*688&-1)>>3];if(U<=M){break}h[j>>3]=M}}while(0);c9(b);i=e;return}function de(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0.0,B=0,C=0.0,D=0.0,E=0,F=0.0,G=0.0,H=0.0,I=0.0,J=0,K=0,L=0,M=0,N=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0.0,Y=0.0,aa=0.0,ab=0.0,ac=0.0,ad=0.0,ae=0.0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0.0,ap=0.0,aq=0.0,ar=0.0,as=0.0,at=0.0,au=0,av=0.0,aw=0.0,ax=0.0,ay=0,az=0.0,aA=0.0,aB=0.0,aC=0.0,aD=0.0,aE=0.0,aF=0.0,aG=0.0,aH=0.0,aI=0.0,aJ=0.0,aK=0.0,aL=0.0,aM=0.0,aN=0.0,aO=0.0,aP=0.0,aQ=0.0,aR=0.0,aS=0.0,aT=0.0;e=i;i=i+432|0;f=e|0;g=e+48|0;j=e+96|0;k=e+152|0;l=e+208|0;m=e+264|0;n=e+320|0;o=e+376|0;p=64920+(b*688&-1)|0;q=c[65040+(b*688&-1)>>2]|0;r=+h[65048+(b*688&-1)>>3];s=j;c[s>>2]=c[10012];c[s+4>>2]=c[10013];c[s+8>>2]=c[10014];c[s+12>>2]=c[10015];c[s+16>>2]=c[10016];c[s+20>>2]=c[10017];c[s+24>>2]=c[10018];c[s+28>>2]=c[10019];c[s+32>>2]=c[10020];c[s+36>>2]=c[10021];c[s+40>>2]=c[10022];c[s+44>>2]=c[10023];c[s+48>>2]=c[10024];c[s+52>>2]=c[10025];t=k;c[t>>2]=c[8694];c[t+4>>2]=c[8695];c[t+8>>2]=c[8696];c[t+12>>2]=c[8697];c[t+16>>2]=c[8698];c[t+20>>2]=c[8699];c[t+24>>2]=c[8700];c[t+28>>2]=c[8701];c[t+32>>2]=c[8702];c[t+36>>2]=c[8703];c[t+40>>2]=c[8704];c[t+44>>2]=c[8705];c[t+48>>2]=c[8706];c[t+52>>2]=c[8707];if((a[65036+(b*688&-1)|0]&1)==0){c[j+4>>2]=-3}if((a[65037+(b*688&-1)|0]&1)==0){c[k+4>>2]=-3}u=64944+(b*688&-1)|0;do{if((c[u>>2]|0)==0){w=64664+(b*688&-1)|0;x=64672+(b*688&-1)|0;y=64788+(b*688&-1)|0}else{z=64672+(b*688&-1)|0;A=+h[z>>3];B=64664+(b*688&-1)|0;C=+h[B>>3];D=(A-C)/10.0*.01;E=64788+(b*688&-1)|0;if((a[E]&1)==0){F=1.0}else{F=+bQ(+(+h[64792+(b*688&-1)>>3]))}if((a[30528]&1)==0){G=C;H=A;I=0.0}else{J=c[200]|0;G=+h[64664+(J*688&-1)>>3];H=+h[64672+(J*688&-1)>>3];I=(c[17366]&1|0)==0?+h[8685]:0.0}A=G-D;C=D+H;J=c[u>>2]|0;if((J|0)!=0){K=(b|0)==7;L=A>3];if((a[69604]&1)==0){X=I;Y=D}else{aa=+_(+D);ab=+h[8702];X=+_(+I)/ab;Y=aa/ab}ac=Y-X;ad=D}else{D=+h[W>>3];if((a[E]&1)==0){ae=D}else{ab=+_(+D);ae=ab/+h[V>>3]}ac=ae-I;ad=D}if(L){if(!(acC)){af=272}}else{if(!(acA)){af=272}}do{if((af|0)==272){af=0;J=W+12|0;ag=c[W+8>>2]|0;do{if((c[J>>2]|0)<0){ah=ag;ai=ag;af=280}else{if((ag|0)==0){af=275}else{if((a8(ag|0,37)|0)==0){aj=ag}else{af=275}}do{if((af|0)==275){af=0;ak=(ag|0)!=0?ag:U;if((c[S>>2]|0)==1){t3(g,ad);D=ad- +O(+ad);t4(T,49,ak,g,D);aj=T;break}else{ud(T,50,ak,F,ad);aj=T;break}}}while(0);ak=(c[J>>2]|0)>0;al=ak?0:aj;if(!ak){ah=aj;ai=al;af=280;break}c[M>>2]=c[t>>2];c[M+4>>2]=c[t+4>>2];c[M+8>>2]=c[t+8>>2];c[M+12>>2]=c[t+12>>2];c[M+16>>2]=c[t+16>>2];c[M+20>>2]=c[t+20>>2];c[M+24>>2]=c[t+24>>2];c[M+28>>2]=c[t+28>>2];c[M+32>>2]=c[t+32>>2];c[M+36>>2]=c[t+36>>2];c[M+40>>2]=c[t+40>>2];c[M+44>>2]=c[t+44>>2];c[M+48>>2]=c[t+48>>2];c[M+52>>2]=c[t+52>>2];am=aj;an=al}}while(0);if((af|0)==280){af=0;c[M>>2]=c[s>>2];c[M+4>>2]=c[s+4>>2];c[M+8>>2]=c[s+8>>2];c[M+12>>2]=c[s+12>>2];c[M+16>>2]=c[s+16>>2];c[M+20>>2]=c[s+20>>2];c[M+24>>2]=c[s+24>>2];c[M+28>>2]=c[s+28>>2];c[M+32>>2]=c[s+32>>2];c[M+36>>2]=c[s+36>>2];c[M+40>>2]=c[s+40>>2];c[M+44>>2]=c[s+44>>2];c[M+48>>2]=c[s+48>>2];c[M+52>>2]=c[s+52>>2];am=ah;an=ai}cT[d&15](b,ac,an,m,0);if(!K){break}if((c[17433]&4|0)==0){break}ag=c[N>>2]|0;c[N>>2]=-3;al=(c[J>>2]|0)>0;if(al){c[Q>>2]=c[t>>2];c[Q+4>>2]=c[t+4>>2];c[Q+8>>2]=c[t+8>>2];c[Q+12>>2]=c[t+12>>2];c[Q+16>>2]=c[t+16>>2];c[Q+20>>2]=c[t+20>>2];c[Q+24>>2]=c[t+24>>2];c[Q+28>>2]=c[t+28>>2];c[Q+32>>2]=c[t+32>>2];c[Q+36>>2]=c[t+36>>2];c[Q+40>>2]=c[t+40>>2];c[Q+44>>2]=c[t+44>>2];c[Q+48>>2]=c[t+48>>2];c[Q+52>>2]=c[t+52>>2]}else{c[Q>>2]=c[s>>2];c[Q+4>>2]=c[s+4>>2];c[Q+8>>2]=c[s+8>>2];c[Q+12>>2]=c[s+12>>2];c[Q+16>>2]=c[s+16>>2];c[Q+20>>2]=c[s+20>>2];c[Q+24>>2]=c[s+24>>2];c[Q+28>>2]=c[s+28>>2];c[Q+32>>2]=c[s+32>>2];c[Q+36>>2]=c[s+36>>2];c[Q+40>>2]=c[s+40>>2];c[Q+44>>2]=c[s+44>>2];c[Q+48>>2]=c[s+48>>2];c[Q+52>>2]=c[s+52>>2]}cT[d&15](7,-0.0-ac,al?0:am,n,0);c[N>>2]=ag}}while(0);W=c[W+16>>2]|0;}while((W|0)!=0)}if((c[p>>2]|0)!=3){w=B;x=z;y=E;break}i=e;return}}while(0);ac=+h[w>>3];ad=+h[x>>3];if((a[y]&1)==0){ao=1.0}else{ao=+bQ(+(+h[64792+(b*688&-1)>>3]))}x=ad>2]|0;do{if((p|0)==2){if((a[y]&1)==0|(b|0)==7){ad=+h[64952+(b*688&-1)>>3];ac=+h[64960+(b*688&-1)>>3];ae=+h[64968+(b*688&-1)>>3];if(ad==-8.988465674311579e+307){ap=ac*+O(+(F/ac))}else{ap=ad}if(ae!=8.988465674311579e+307){aq=ae;ar=ac;as=ap;break}aq=ac*+$(+(I/ac));ar=ac;as=ap;break}ac=+h[64968+(b*688&-1)>>3];if(ac<=0.0){i=e;return}ae=+h[64960+(b*688&-1)>>3];if(ae<=0.0){i=e;return}ad=+_(+ae);ae=+h[64800+(b*688&-1)>>3];X=ad/ae;ad=+h[64952+(b*688&-1)>>3];if(ad>0.0){at=+_(+ad)/ae}else{at=X*+O(+(F/X))}if(ac==8.988465674311579e+307){aq=X*+$(+(I/X));ar=X;as=at;break}else{aq=+_(+ac)/ae;ar=X;as=at;break}}else if((p|0)==1){X=+h[4880+(b<<3)>>3];ae=X*+O(+(F/X));aq=X*+$(+(I/X));ar=X;as=ae}else if((p|0)==4){ae=+O(+F);X=+$(+I);ac=+O(+((X-ae)/12.0));if(ac>=1.0){aq=X;ar=ac;as=ae;break}aq=X;ar=1.0;as=ae}else if((p|0)==5){ae=+O(+F);X=+$(+I);ac=+O(+((X-ae)/14.0));if(ac>=1.0){aq=X;ar=ac;as=ae;break}aq=X;ar=1.0;as=ae}else{uk(140640,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);p=aq>3]==0.0){au=q;av=1.0;aw=1.0;ax=0.0;break}do{if((q|0)==2){if(r<=0.0){au=0;av=1.0;aw=1.0;ax=0.0;break L424}as=aq/r;if((a[y]&1)==0){ay=2;az=aq;aA=as;break}ae=+h[64792+(b*688&-1)>>3];ay=2;az=aq*ae;aA=as*ae}else{if((a[y]&1)!=0){if(aq<=1.5){ae=+h[64792+(b*688&-1)>>3];as=ap-at;if(as>=10.0){au=0;av=ae;aw=1.0;ax=0.0;break L424}au=q;av=ae;aw=as<5.0?1.0:3.0;ax=2.0;break L424}as=aq*.2;if(aq<65535.0){aB=+(~~as|0)}else{aB=as}ay=q;az=aq;aA=aB<1.0?1.0:aB;break}if((c[64808+(b*688&-1)>>2]|0)!=1){if((q|0)!=3){au=0;av=1.0;aw=1.0;ax=0.0;break L424}as=+P(+aq);ay=3;az=aq;aA=aq*((~~(as/+R(10.0,+(+O(+(+bQ(+as))))))|0)==2?.5:.2);break}p=c[4608+(b<<2)>>2]|0;w=(p|0)<1?1:p;do{if((w|0)==1|(w|0)==2){if(aq<1440.0){aC=aq<720.0?aq<360.0?aq<120.0?aq<60.0?aq<20.0?aq<10.0?aq<5.0?0.0:1.0:5.0:10.0:20.0:60.0:120.0:180.0;break}aC=360.0}else if((w|0)==3){if(aq<86400.0){aC=aq<43200.0?aq<21600.0?aq<7200.0?aq<3600.0?aq<1200.0?0.0:600.0:1800.0:3600.0:7200.0:10800.0;break}aC=21600.0}else if((w|0)==4){if(aq<=172800.0){aC=aq>86400.0?43200.0:aq>46800.0?21600.0:aq>25200.0?10800.0:aq>14400.0?7200.0:aq>7200.0?3600.0:0.0;break}aC=86400.0}else if((w|0)==5){if(aq<=604800.0){aC=aq>172800.0?86400.0:0.0;break}aC=604800.0}else if((w|0)==6){if(aq<=63115200.0){aC=aq>15778800.0?7889400.0:aq>5259600.0?2629800.0:aq>1296.0e3?864.0e3:aq>172800.0?86400.0:0.0;break}aC=31557600.0}else if((w|0)==7){if(aq<=946728.0e4){aC=aq>631152.0e4?157788.0e4:aq>315576.0e4?631152.0e3:aq>157788.0e4?315576.0e3:aq>315576.0e3?157788.0e3:aq>63115200.0?31557600.0:aq>15778800.0?7889400.0:aq>5259600.0?2629800.0:0.0;break}aC=315576.0e4}else{aC=0.0}}while(0);ay=q;az=aq*.9;aA=aC}}while(0);if(aA>0.0){au=ay;av=az;aw=aA;ax=aA;break}au=0;av=az;aw=aA;ax=aA}}while(0);aA=aq*.01;az=ap+aA;ap=+P(+I);if(aq+((c[(c[3524]|0)+8>>2]|0)>>>0>>>0)){uh(-1,138720,(v=i,i=i+8|0,h[v>>3]=ar,v)|0);i=e;return}h[111]=at-aq;h[110]=at;L473:do{if(+h[110]>az){aF=aq}else{ar=aq*.25;while(1){if(+P(+(+h[110]- +h[111]))az){aF=aq;break L473}}uh(-1,137120,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);aF=az-at}}while(0);if(at>az){i=e;return}ay=(b|0)==7;q=(au|0)==0;au=65064+(b*688&-1)|0;E=64808+(b*688&-1)|0;z=4608+(b<<2)|0;B=aE1.5;n=64800+(b*688&-1)|0;am=o|0;o=4968+(b*51&-1)|0;s=65024+(b*688&-1)|0;t=j+4|0;m=64712+(b*688&-1)|0;an=64720+(b*688&-1)|0;I=at;at=0.0;while(1){do{if(ay){aG=at;aH=I}else{if((a[y]&1)!=0){aG=+Z(+(I*+h[n>>3]));aH=I;break}if((c[E>>2]|0)==1){aI=+da(c[z>>2]|0,I)}else{aI=I}aG=+P(+aI)aD){af=427;break}L495:do{if(aH>2]|0;if((ai|0)==5){ah=(~~+O(+(aG+.5))|0)%7&-1;cT[d&15](b,aH,72464+(((ah|0)<0?ah+7|0:ah)<<3)|0,j,c[u>>2]|0);aJ=aH;af=382;break}else if((ai|0)==4){ai=(~~+O(+(aG+-1.0))|0)%12&-1;cT[d&15](b,aH,72368+(((ai|0)<0?ai+12|0:ai)<<3)|0,j,c[u>>2]|0);aJ=aH;af=382;break}else{do{if((c[E>>2]|0)==1){t3(f,aG);aA=aG- +O(+aG);t4(am,49,o,f,aA);aK=aH}else{if((a[30528]&1)==0){ud(am,50,o,ao,aG);aK=aH;break}aA=+h[8685];ap=(c[17366]&1|0)==0?aA:0.0;aC=+P(+aG)+ap;if(ay){if((a[y]&1)==0){aL=aA;aM=I}else{ap=+_(+I);aB=+h[n>>3];aL=+_(+aA)/aB;aM=ap/aB}aN=I;aO=aM-aL}else{aN=aC;aO=aH}ud(am,50,o,ao,aN);aK=aO}}while(0);do{if((a[s]&1)!=0){aC=+h[m>>3];aB=+h[an>>3];if(aCaB){break L495}else{break}}else{if(aKaC){break L495}else{break}}}}while(0);cT[d&15](b,aK,am,j,c[u>>2]|0);if(!ay){aJ=aK;af=382;break}if((c[17433]&4|0)==0){aJ=aK;af=382;break}ai=c[t>>2]|0;c[t>>2]=-3;cT[d&15](7,-0.0-aK,am,j,c[u>>2]|0);c[t>>2]=ai;aJ=aK;af=382;break}}}while(0);L522:do{if((af|0)==382){af=0;if(q){break}if(+h[au>>3]==0.0|ax>=av){break}if(p){aC=ax;while(1){if((c[E>>2]|0)==1){aP=+da((c[z>>2]|0)-1|0,aJ+aC)}else{aP=aJ+aC}if(B){if(!(aPaD)){af=392}}else{if(!(aPaE)){af=392}}do{if((af|0)==392){af=0;if(w){if(aPF){break}}else{if(aPar){break}}cT[d&15](b,aP,0,k,0)}}while(0);aC=aw+aC;if(aC>=av){break L522}}}if(B){aC=ax;do{if((c[E>>2]|0)==1){aQ=+da((c[z>>2]|0)-1|0,aJ+aC)}else{if((a[y]&1)==0){aR=aC}else{aB=+_(+aC);aR=aB/+h[n>>3]}aQ=aJ+aR}do{if(!(aQaD)){if(w){if(aQF){break}}else{if(aQar){break}}cT[d&15](b,aQ,0,k,0)}}while(0);aC=aw+aC;}while(aC>2]|0)==1){aS=+da((c[z>>2]|0)-1|0,aJ+aC)}else{if((a[y]&1)==0){aT=aC}else{aB=+_(+aC);aT=aB/+h[n>>3]}aS=aJ+aT}do{if(!(aSaE)){if(w){if(aSF){break}}else{if(aSar){break}}cT[d&15](b,aS,0,k,0)}}while(0);aC=aw+aC;}while(aCaz){af=428;break}else{I=aC;at=aG}}if((af|0)==427){i=e;return}else if((af|0)==428){i=e;return}}function df(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0,w=0.0,x=0.0,y=0.0,z=0,A=0;g=c[3524]|0;i=(b&3|0)==1;j=(b&-4|0)==4;if(e>>>0>3){k=64768+(e*688&-1)|0;l=64772+(e*688&-1)|0}else{k=64772+(e*688&-1)|0;l=64768+(e*688&-1)|0}m=c[k>>2]|0;k=c[l>>2]|0;l=64916+(b*688&-1)|0;if((c[l>>2]|0)==0){return}n=65032+(b*688&-1)|0;o=c[n>>2]|0;do{if((o|0)==-270){if((cO[c[g+72>>2]&255](-270)|0)==0){p=c[n>>2]|0;q=441;break}if(i){c[1398]=1;r=j?0:2}else{c[1398]=j?0:2;r=1}c[1384]=r;c[6586]=-270;if((b|0)!=1){break}c[d>>2]=(c[d>>2]|0)+((c[g+16>>2]|0)>>>1)}else{p=o;q=441}}while(0);L599:do{if((q|0)==441){do{if((p|0)!=0){if((cO[c[g+72>>2]&255](p)|0)==0){break}if((b|0)==5){c[1398]=0}else if((b|0)==2){c[1398]=0}else if((b|0)==6){c[1398]=0}else if((b|0)==1){c[d>>2]=~~(+(c[d>>2]|0)+ +((c[g+20>>2]|0)>>>0>>>0)*2.5);c[1398]=2}else{c[1398]=0}c[1384]=1;c[6586]=c[n>>2];break L599}}while(0);if(i){c[1398]=j?0:2;s=1}else{c[1398]=1;s=j?2:0}c[1384]=s;c[6586]=0}}while(0);if((a[65272+(b*688&-1)|0]&1)==0){c[65128+(b*688&-1)>>2]=c[1398]}else{c[1398]=c[65128+(b*688&-1)>>2]}s=c[l>>2]|0;l=(s&4|0)==0;c[1396]=l?-1:m;do{if((s&2|0)==0){q=481}else{if((a[64788+(e*688&-1)|0]&1)!=0){q=481;break}t=+h[64664+(e*688&-1)>>3];u=+h[64672+(e*688&-1)>>3];if(t0.0|u<0.0){q=481;break}}else{if(u>0.0|t<0.0){q=481;break}}m=~~(+(c[64768+(e*688&-1)>>2]|0)+(0.0-t)*+h[64776+(e*688&-1)>>3]+.5);c[1394]=m;n=j?1:-1;c[1400]=n;if(!l){c[1396]=m}p=aa(m-k|0,j?-1:1);if(i){o=g+20|0;do{if(p>>>0>((c[o>>2]|0)*3&-1)>>>0){q=469}else{r=c[11692]|0;if(j){if((r&8|0)==0){q=469;break}else{v=k;break}}else{if((r&2|0)==0){q=469;break}else{v=k;break}}}}while(0);if((q|0)==469){v=m}c[1392]=v;c[1392]=aa(c[o>>2]|0,n)+v;break}r=g+16|0;do{if(p>>>0>c[r>>2]<<1>>>0){t=+(m|0);if(j){w=0.0;x=t;q=479}else{y=t;q=478}}else{z=c[11692]|0;if(j){if((z&4|0)!=0){A=k;break}w=0.0;x=+(m|0);q=479;break}else{if((z&1|0)!=0){A=k;break}y=+(m|0);q=478;break}}}while(0);if((q|0)==478){w=+((c[g+24>>2]|0)>>>0>>>0)*(-0.0- +h[65056+(b*688&-1)>>3]);x=y;q=479}if((q|0)==479){A=~~(x+w)}c[1392]=A;c[1392]=A-(c[r>>2]|0)}}while(0);if((q|0)==481){c[1394]=k;c[1400]=aa((a[65072+(b*688&-1)|0]&1)!=0?1:-1,j?-1:1);c[1392]=c[d>>2]}de(b,f);cO[c[g+72>>2]&255](0);return}function dg(b,d){b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+16|0;f=e|0;g=+h[64664+(d*688&-1)>>3];if(g>0.0){j=+h[64672+(d*688&-1)>>3];if(j>0.0){k=j}else{l=488}}else{l=488}do{if((l|0)==488){if((a[64788+(d*688&-1)|0]&1)!=0){k=+h[64672+(d*688&-1)>>3];break}do{if(g<0.0){j=+h[64672+(d*688&-1)>>3];if(j>=0.0){break}if(j>2]=c[m>>2];i=e;return}}while(0);c[64784+(d*688&-1)>>2]=~~(+(c[64768+(d*688&-1)>>2]|0)+(0.0-g)*+h[64776+(d*688&-1)>>3]+.5);n=c[65284+(b*688&-1)>>2]|0;if((n|0)<=-3){i=e;return}o=f;p=65320+(b*688&-1)|0;c[o>>2]=c[p>>2];c[o+4>>2]=c[p+4>>2];c[o+8>>2]=c[p+8>>2];c[o+12>>2]=c[p+12>>2];do{if((c[65280+(b*688&-1)>>2]|0)!=0){j=+h[65304+(b*688&-1)>>3];p=c[(c[3524]|0)+92>>2]|0;if(j<0.0){cK[p&63](+h[3817]);break}else{cK[p&63](j);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[65296+(b*688&-1)>>3]);p=c[(c[3524]|0)+64>>2]|0;if((n|0)<-5){cM[p&511](-2)}else{cM[p&511](n)}p=c[3524]|0;do{if((a[65312+(b*688&-1)|0]&1)==0){if((c[p+96>>2]&1024|0)!=0){q=p;break}c[f>>2]=1;c[f+4>>2]=n;l=511}else{l=511}}while(0);if((l|0)==511){fn(f,p);q=c[3524]|0}n=c[q+56>>2]|0;if((b&3|0)==2){o=64784+(d*688&-1)|0;cN[n&255](c[64768+(b*688&-1)>>2]|0,c[o>>2]|0);cN[c[(c[3524]|0)+60>>2]&255](c[64772+(b*688&-1)>>2]|0,c[o>>2]|0);i=e;return}else{o=64784+(d*688&-1)|0;cN[n&255](c[o>>2]|0,c[64768+(b*688&-1)>>2]|0);cN[c[(c[3524]|0)+60>>2]&255](c[o>>2]|0,c[64772+(b*688&-1)>>2]|0);i=e;return}}}while(0);if(k>2]=c[r>>2];i=e;return}function dh(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0.0,L=0.0,M=0.0,N=0.0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0.0,W=0.0;g=i;i=i+208|0;j=g|0;k=g+24|0;l=g+48|0;m=g+72|0;n=g+96|0;o=g+144|0;p=g+152|0;q=g+200|0;r=(f|0)==1;s=(f|0)==2;if((f-1|0)>>>0>=2){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=133592,v)|0)}t=c[13898]|0;u=(c[8272]|0)>(t|0);L710:do{if(u){w=c[1054]|0;if((a[w+(t*40&-1)|0]&1)==0){x=533;break}y=c[w+(t*40&-1)+36>>2]|0;z=w+(t*40&-1)+32|0;w=c[10036]|0;A=0;while(1){if((A|0)>=(y|0)){break}if((a[w+((c[z>>2]|0)+A|0)|0]|0)==(a[A+134808|0]|0)){A=A+1|0}else{x=533;break L710}}if((A|0)!=1){x=533;break}c[e>>2]=c[e>>2]|f;if(r){z=64728+(b*688&-1)|0;c[z>>2]=c[z>>2]&-2;h[64736+(b*688&-1)>>3]=0.0}else{z=64732+(b*688&-1)|0;c[z>>2]=c[z>>2]&-2;h[64752+(b*688&-1)>>3]=0.0}z=(c[13898]|0)+1|0;c[13898]=z;B=z}else{x=533}}while(0);L722:do{if((x|0)==533){a[25288]=1;L724:do{if((c[64808+(b*688&-1)>>2]|0)==1){z=c[1054]|0;w=(a[z+(t*40&-1)|0]&1)==0;if(w){x=536}else{y=c[10036]|0;C=a[y+(c[z+(t*40&-1)+32>>2]|0)|0]|0;if((C<<24>>24|0)==39|(C<<24>>24|0)==34){D=y}else{x=536}}if((x|0)==536){y=c[10810]|0;if((y|0)==0){x=558;break}C=z+(t*40&-1)+36|0;E=z+(t*40&-1)+32|0;F=c[10036]|0;G=y;L731:while(1){y=c[G+4>>2]|0;L733:do{if(!(w|u^1)){H=c[C>>2]|0;I=0;while(1){if((I|0)>=(H|0)){break}if((a[F+((c[E>>2]|0)+I|0)|0]|0)==(a[y+I|0]|0)){I=I+1|0}else{break L733}}if((a[y+I|0]|0)==0){break L731}}}while(0);y=c[G>>2]|0;if((y|0)==0){x=558;break L724}else{G=y}}if((a[G+8|0]&1)!=0){x=558;break}if((c[G+16>>2]|0)==3){D=F}else{x=558;break}}L743:do{if(u){L745:do{if(!w){E=c[z+(t*40&-1)+36>>2]|0;C=z+(t*40&-1)+32|0;y=0;while(1){if((y|0)>=(E|0)){break}if((a[D+((c[C>>2]|0)+y|0)|0]|0)==(a[y+103664|0]|0)){y=y+1|0}else{break L745}}if((y|0)==1){J=0;break L743}}}while(0);a[14176]=1;is(m);a[14176]=0;if((c[m>>2]|0)==3){J=c[m+8>>2]|0;break}else{c[13898]=t;J=0;break}}else{J=0}}while(0);if((t1(J,64813+(b*688&-1)|0,n,o)|0)==0){K=0.0}else{L=+t2(n);K=L+ +h[o>>3]}uu(J);M=K}else{x=558}}while(0);do{if((x|0)==558){A=is(l)|0;z=c[A>>2]|0;if((z|0)==1){N=+(c[A+8>>2]|0)}else if((z|0)==2){N=+h[A+8>>3]}else if((z|0)==3){N=+uz(c[A+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}A=l|0;if((c[A>>2]|0)!=3){M=N;break}uu(c[l+8>>2]|0);c[A>>2]=1;M=N}}while(0);a[25288]=0;A=c[13898]|0;z=c[8272]|0;if((A|0)>=(z|0)){uf(A,129840,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}w=c[1054]|0;F=(a[w+(A*40&-1)|0]&1)==0;L772:do{if(!F){G=c[w+(A*40&-1)+36>>2]|0;C=w+(A*40&-1)+32|0;E=c[10036]|0;I=0;while(1){if((I|0)>=(G|0)){x=570;break}if((a[E+((c[C>>2]|0)+I|0)|0]|0)==(a[I+103664|0]|0)){I=I+1|0}else{break}}do{if((x|0)==570){if((I|0)!=1){break}uf(A,129840,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if(F){break}I=c[w+(A*40&-1)+36>>2]|0;C=w+(A*40&-1)+32|0;E=c[10036]|0;G=0;while(1){if((G|0)>=(I|0)){x=576;break}if((a[E+((c[C>>2]|0)+G|0)|0]|0)==(a[G+136608|0]|0)){G=G+1|0}else{break}}do{if((x|0)==576){if((G|0)!=1){break}C=A+1|0;c[13898]=C;if((C|0)>=(z|0)){uf(C,127176,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}I=(a[w+(C*40&-1)|0]&1)==0;if(I){uf(C,126040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}H=c[w+(C*40&-1)+36>>2]|0;O=w+(C*40&-1)+32|0;P=0;while(1){if((P|0)>=(H|0)){x=582;break}if((a[E+((c[O>>2]|0)+P|0)|0]|0)==(a[P+103664|0]|0)){P=P+1|0}else{break}}do{if((x|0)==582){if((P|0)!=1){break}uf(C,127176,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if(I){uf(C,126040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}P=c[w+(C*40&-1)+36>>2]|0;O=w+(C*40&-1)+32|0;H=0;while(1){if((H|0)>=(P|0)){break}if((a[E+((c[O>>2]|0)+H|0)|0]|0)==(a[H+134808|0]|0)){H=H+1|0}else{x=695;break}}if((x|0)==695){uf(C,126040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((H|0)!=1){uf(C,126040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[e>>2]=c[e>>2]|f;if(r){O=64728+(b*688&-1)|0;c[O>>2]=c[O>>2]|1;h[64736+(b*688&-1)>>3]=M}else{O=64732+(b*688&-1)|0;c[O>>2]=c[O>>2]|1;h[64752+(b*688&-1)>>3]=M}O=(c[13898]|0)+1|0;c[13898]=O;B=O;break L722}}while(0);if(F){break}E=c[w+(A*40&-1)+36>>2]|0;G=w+(A*40&-1)+32|0;O=c[10036]|0;P=0;while(1){if((P|0)>=(E|0)){break}if((a[O+((c[G>>2]|0)+P|0)|0]|0)==(a[P+138304|0]|0)){P=P+1|0}else{break L772}}if((P|0)!=1){break}uf(A,123680,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[e>>2]=c[e>>2]&(f^-1);if(r){c[64728+(b*688&-1)>>2]=0;h[64744+(b*688&-1)>>3]=0.0}else{c[64732+(b*688&-1)>>2]=0;h[64760+(b*688&-1)>>3]=0.0}h[d>>3]=M;B=c[13898]|0}}while(0);d=c[8272]|0;l=(B|0)>=(d|0);L830:do{if((c[e>>2]&f|0)==0){if(l){break}J=c[1054]|0;L923:do{if((a[J+(B*40&-1)|0]&1)!=0){o=c[J+(B*40&-1)+36>>2]|0;n=J+(B*40&-1)+32|0;t=c[10036]|0;m=0;while(1){if((m|0)>=(o|0)){break}if((a[t+((c[n>>2]|0)+m|0)|0]|0)==(a[m+103664|0]|0)){m=m+1|0}else{break L923}}if((m|0)==1){break L830}}}while(0);J=c[1054]|0;L930:do{if((a[J+(B*40&-1)|0]&1)!=0){n=c[J+(B*40&-1)+36>>2]|0;t=J+(B*40&-1)+32|0;o=c[10036]|0;P=0;while(1){if((P|0)>=(n|0)){break}if((a[o+((c[t>>2]|0)+P|0)|0]|0)==(a[P+136608|0]|0)){P=P+1|0}else{break L930}}if((P|0)!=1){break}uf(B,122232,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);J=c[1054]|0;if((a[J+(B*40&-1)|0]&1)==0){break}t=c[J+(B*40&-1)+36>>2]|0;o=J+(B*40&-1)+32|0;J=c[10036]|0;n=0;while(1){if((n|0)>=(t|0)){break}if((a[J+((c[o>>2]|0)+n|0)|0]|0)==(a[n+138304|0]|0)){n=n+1|0}else{break L830}}if((n|0)!=1){break}uf(B,122232,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if(l){uf(B,129840,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=c[1054]|0;L835:do{if((a[o+(B*40&-1)|0]&1)!=0){J=c[o+(B*40&-1)+36>>2]|0;t=o+(B*40&-1)+32|0;m=c[10036]|0;D=0;while(1){if((D|0)>=(J|0)){break}if((a[m+((c[t>>2]|0)+D|0)|0]|0)==(a[D+103664|0]|0)){D=D+1|0}else{break L835}}if((D|0)!=1){break}uf(B,129840,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);o=c[1054]|0;L843:do{if((a[o+(B*40&-1)|0]&1)!=0){n=c[o+(B*40&-1)+36>>2]|0;t=o+(B*40&-1)+32|0;m=c[10036]|0;J=0;while(1){if((J|0)>=(n|0)){break}if((a[m+((c[t>>2]|0)+J|0)|0]|0)==(a[J+136608|0]|0)){J=J+1|0}else{break L843}}if((J|0)!=1){break}t=B+1|0;c[13898]=t;if((t|0)>=(d|0)){uf(t,127176,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}n=(a[o+(t*40&-1)|0]&1)==0;L853:do{if(!n){D=c[o+(t*40&-1)+36>>2]|0;P=o+(t*40&-1)+32|0;u=0;while(1){if((u|0)>=(D|0)){break}if((a[m+((c[P>>2]|0)+u|0)|0]|0)==(a[u+103664|0]|0)){u=u+1|0}else{break L853}}if((u|0)!=1){break}uf(t,127176,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);L861:do{if((c[64808+(b*688&-1)>>2]|0)==1){do{if(n){x=627}else{J=a[m+(c[o+(t*40&-1)+32>>2]|0)|0]|0;if(!((J<<24>>24|0)==39|(J<<24>>24|0)==34)){x=627;break}Q=j;x=639}}while(0);if((x|0)==627){u=c[10810]|0;if((u|0)==0){x=649;break}J=o+(t*40&-1)+36|0;P=o+(t*40&-1)+32|0;D=u;L869:while(1){u=c[D+4>>2]|0;L871:do{if(!n){C=c[J>>2]|0;H=0;while(1){if((H|0)>=(C|0)){break}if((a[m+((c[P>>2]|0)+H|0)|0]|0)==(a[u+H|0]|0)){H=H+1|0}else{break L871}}if((a[u+H|0]|0)==0){break L869}}}while(0);u=c[D>>2]|0;if((u|0)==0){x=649;break L861}else{D=u}}if((a[D+8|0]&1)!=0){x=649;break}if((c[D+16>>2]|0)!=3){x=649;break}P=j;if(n){R=P;x=643}else{Q=P;x=639}}L881:do{if((x|0)==639){P=c[o+(t*40&-1)+36>>2]|0;J=o+(t*40&-1)+32|0;u=0;while(1){if((u|0)>=(P|0)){break}if((a[m+((c[J>>2]|0)+u|0)|0]|0)==(a[u+103664|0]|0)){u=u+1|0}else{R=Q;x=643;break L881}}if((u|0)==1){S=0;T=Q}else{R=Q;x=643}}}while(0);do{if((x|0)==643){a[14176]=1;is(j);a[14176]=0;if((c[j>>2]|0)==3){S=c[j+8>>2]|0;T=R;break}else{c[13898]=t;S=0;T=R;break}}}while(0);if((t1(S,64813+(b*688&-1)|0,p,q)|0)==0){U=0.0}else{M=+t2(p);U=M+ +h[q>>3]}uu(S);V=U}else{x=649}}while(0);do{if((x|0)==649){t=is(k)|0;m=c[t>>2]|0;if((m|0)==1){W=+(c[t+8>>2]|0)}else if((m|0)==2){W=+h[t+8>>3]}else if((m|0)==3){W=+uz(c[t+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t=k|0;if((c[t>>2]|0)!=3){V=W;break}uu(c[k+8>>2]|0);c[t>>2]=1;V=W}}while(0);if(r){t=64728+(b*688&-1)|0;c[t>>2]=c[t>>2]|2;h[64744+(b*688&-1)>>3]=V;break L830}else{t=64732+(b*688&-1)|0;c[t>>2]=c[t>>2]|2;h[64760+(b*688&-1)>>3]=V;break L830}}}while(0);o=c[1054]|0;L910:do{if((a[o+(B*40&-1)|0]&1)!=0){t=c[o+(B*40&-1)+36>>2]|0;m=o+(B*40&-1)+32|0;n=c[10036]|0;D=0;while(1){if((D|0)>=(t|0)){break}if((a[n+((c[m>>2]|0)+D|0)|0]|0)==(a[D+138304|0]|0)){D=D+1|0}else{break L910}}if((D|0)!=1){break}uf(B,123680,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if(r){o=64728+(b*688&-1)|0;c[o>>2]=c[o>>2]&-3;h[64744+(b*688&-1)>>3]=0.0;break}else{o=64732+(b*688&-1)|0;c[o>>2]=c[o>>2]&-3;h[64760+(b*688&-1)>>3]=0.0;break}}}while(0);if((c[e>>2]&f|0)==0){i=g;return}do{if(r){f=64728+(b*688&-1)|0;if((c[f>>2]|0)!=3){break}if(+h[64744+(b*688&-1)>>3]>=+h[64736+(b*688&-1)>>3]){break}uh(c[13898]|0,120752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[f>>2]=0}}while(0);if(!s){i=g;return}s=64732+(b*688&-1)|0;if((c[s>>2]|0)!=3){i=g;return}if(+h[64760+(b*688&-1)>>3]>=+h[64752+(b*688&-1)>>3]){i=g;return}uh(c[13898]|0,120752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[s>>2]=0;i=g;return}function di(a,b,d,e,f){a=a|0;b=+b;d=d|0;e=e|0;f=f|0;f=i;a=e;e=i;i=i+56|0;uD(e,a,56);do{if((d|0)!=0){a=ga(d,0)|0;if((a|0)<=(c[216]|0)){break}c[216]=a}}while(0);i=f;return}function dj(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0.0,A=0.0;g=i;i=i+8|0;j=g|0;c[j>>2]=f;k=c[13898]|0;l=c[8272]|0;m=(l|0)>(k|0);if(!m){uf(k,116248,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}n=c[1054]|0;do{if((a[n+(k*40&-1)|0]&1)!=0){o=c[n+(k*40&-1)+36>>2]|0;p=n+(k*40&-1)+32|0;q=c[10036]|0;r=0;while(1){if((r|0)>=(o|0)){s=723;break}if((a[q+((c[p>>2]|0)+r|0)|0]|0)==(a[r+78864|0]|0)){r=r+1|0}else{break}}do{if((s|0)==723){if((r|0)!=1){break}c[64728+(b*688&-1)>>2]=0;c[64732+(b*688&-1)>>2]=0;t=f;i=g;return t|0}}while(0);if(m){break}uf(k,116248,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);m=c[1054]|0;f=(a[m+(k*40&-1)|0]&1)==0;L984:do{if(f){s=742}else{n=c[m+(k*40&-1)+36>>2]|0;r=m+(k*40&-1)+32|0;p=c[10036]|0;q=0;while(1){if((q|0)>=(n|0)){s=730;break}if((a[p+((c[r>>2]|0)+q|0)|0]|0)==(a[q+103664|0]|0)){q=q+1|0}else{break}}do{if((s|0)==730){if((q|0)!=1){break}uf(k,116248,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);if(f){s=742;break}q=c[m+(k*40&-1)+36>>2]|0;r=m+(k*40&-1)+32|0;p=c[10036]|0;n=0;while(1){if((n|0)>=(q|0)){s=736;break}if((a[p+((c[r>>2]|0)+n|0)|0]|0)==(a[n+187176|0]|0)){n=n+1|0}else{break}}if((s|0)==736){if((n|0)==2){u=k;w=l;break}}if(f){s=742;break}r=c[m+(k*40&-1)+36>>2]|0;p=m+(k*40&-1)+32|0;q=c[10036]|0;o=0;while(1){if((o|0)>=(r|0)){break}if((a[q+((c[p>>2]|0)+o|0)|0]|0)==(a[o+183584|0]|0)){o=o+1|0}else{s=742;break L984}}if((o|0)==1){u=k;w=l}else{s=742}}}while(0);if((s|0)==742){dh(b,d,j,1);u=c[13898]|0;w=c[8272]|0}l=(w|0)>(u|0);if(!l){uf(u,114504,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}k=c[1054]|0;do{if((a[k+(u*40&-1)|0]&1)==0){s=750}else{m=c[k+(u*40&-1)+36>>2]|0;f=k+(u*40&-1)+32|0;p=c[10036]|0;q=0;while(1){if((q|0)>=(m|0)){s=748;break}if((a[p+((c[f>>2]|0)+q|0)|0]|0)==(a[q+187176|0]|0)){q=q+1|0}else{break}}if((s|0)==748){if((q|0)==2){x=k;y=p;break}}if(l){s=750;break}uf(u,114504,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);do{if((s|0)==750){l=c[1054]|0;if((a[l+(u*40&-1)|0]&1)==0){uf(u,114504,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}k=c[l+(u*40&-1)+36>>2]|0;f=l+(u*40&-1)+32|0;m=c[10036]|0;o=0;while(1){if((o|0)>=(k|0)){break}if((a[m+((c[f>>2]|0)+o|0)|0]|0)==(a[o+183584|0]|0)){o=o+1|0}else{s=774;break}}if((s|0)==774){uf(u,114504,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((o|0)==1){x=l;y=m;break}uf(u,114504,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);f=u+1|0;c[13898]=f;L1033:do{if((w|0)>(f|0)){if((a[x+(f*40&-1)|0]&1)==0){s=762;break}u=c[x+(f*40&-1)+36>>2]|0;k=x+(f*40&-1)+32|0;p=0;while(1){if((p|0)>=(u|0)){break}if((a[y+((c[k>>2]|0)+p|0)|0]|0)==(a[p+78864|0]|0)){p=p+1|0}else{s=762;break L1033}}if((p|0)!=1){s=762}}else{s=762}}while(0);if((s|0)==762){dh(b,e,j,2)}s=c[j>>2]|0;if((s&3|0)!=0){t=s;i=g;return t|0}z=+h[e>>3];A=+h[d>>3];if(z>=A){t=s;i=g;return t|0}h[d>>3]=z;h[e>>3]=A;e=64656+(b*688&-1)|0;c[e>>2]=c[e>>2]|2;t=s;i=g;return t|0}function dk(){var b=0,d=0,e=0.0,f=0.0,g=0.0,j=0,k=0.0,l=0.0,m=0.0,n=0.0;b=i;d=c[16679]|0;e=+h[8341];if((d&1|0)==0|e<8.988465674311579e+307){f=e}else{e=+h[64664+((c[34]|0)*688&-1)>>3];if((a[64788]&1)==0){g=e}else{g=+Z(+(e*+h[8100]))}h[8341]=g;f=g}j=(a[66852]&1)==0;do{if(j){k=f}else{if(f>0.0){g=+_(+f);k=g/+h[8358];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=112752,c[v+8>>2]=56904,h[v+16>>3]=f,v)|0);return 0}}}while(0);h[8341]=k;f=+h[8342];if((d&2|0)==0|f>-8.988465674311579e+307){l=f}else{f=+h[64672+((c[34]|0)*688&-1)>>3];if((a[64788]&1)==0){m=f}else{m=+Z(+(f*+h[8100]))}h[8342]=m;l=m}do{if(j){n=l}else{if(l>0.0){m=+_(+l);n=m/+h[8358];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=112752,c[v+8>>2]=56904,h[v+16>>3]=l,v)|0);return 0}}}while(0);h[8342]=n;if(k<=n){i=b;return 1}h[8342]=k;h[8341]=n;i=b;return 1}function dl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0.0,M=0.0,N=0,O=0,P=0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0.0;e=i;i=i+328|0;f=e|0;g=e+24|0;j=e+48|0;k=e+72|0;l=e+96|0;m=e+120|0;n=e+144|0;o=e+152|0;p=e+160|0;q=e+208|0;r=e+216|0;s=e+264|0;t=e+272|0;u=e+320|0;c[o>>2]=d;uE(b|0,0,40);dm(o,n);d=c[o>>2]|0;c[b>>2]=d;w=c[n>>2]|0;L1080:do{if((w|0)>-1){if((c[64808+((w+2|0)*688&-1)>>2]|0)!=1){x=826;break}y=c[13898]|0;z=c[1054]|0;A=(a[z+(y*40&-1)|0]&1)==0;if(A){x=804}else{B=c[10036]|0;C=a[B+(c[z+(y*40&-1)+32>>2]|0)|0]|0;if((C<<24>>24|0)==39|(C<<24>>24|0)==34){D=B}else{x=804}}if((x|0)==804){B=c[10810]|0;if((B|0)==0){x=826;break}C=c[8272]|0;E=z+(y*40&-1)+36|0;F=z+(y*40&-1)+32|0;G=c[10036]|0;H=B;L1088:while(1){B=c[H+4>>2]|0;L1090:do{if(!((C|0)<=(y|0)|A)){I=c[E>>2]|0;J=0;while(1){if((J|0)>=(I|0)){break}if((a[G+((c[F>>2]|0)+J|0)|0]|0)==(a[B+J|0]|0)){J=J+1|0}else{break L1090}}if((a[B+J|0]|0)==0){break L1088}}}while(0);B=c[H>>2]|0;if((B|0)==0){x=826;break L1080}else{H=B}}if((a[H+8|0]&1)!=0){x=826;break}if((c[H+16>>2]|0)==3){D=G}else{x=826;break}}L1100:do{if((y|0)<(c[8272]|0)){L1102:do{if(!A){F=c[z+(y*40&-1)+36>>2]|0;E=z+(y*40&-1)+32|0;C=0;while(1){if((C|0)>=(F|0)){break}if((a[D+((c[E>>2]|0)+C|0)|0]|0)==(a[C+103664|0]|0)){C=C+1|0}else{break L1102}}if((C|0)==1){K=0;break L1100}}}while(0);a[14176]=1;is(l);a[14176]=0;if((c[l>>2]|0)==3){K=c[l+8>>2]|0;break}else{c[13898]=y;K=0;break}}else{K=0}}while(0);if((t1(K,66189,p,q)|0)!=0){L=+t2(p);h[b+16>>3]=L+ +h[q>>3]}uu(K)}else{x=826}}while(0);if((x|0)==826){K=is(k)|0;q=c[K>>2]|0;if((q|0)==1){M=+(c[K+8>>2]|0)}else if((q|0)==2){M=+h[K+8>>3]}else if((q|0)==3){M=+uz(c[K+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}K=k|0;if((c[K>>2]|0)==3){uu(c[k+8>>2]|0);c[K>>2]=1}h[b+16>>3]=M}K=c[13898]|0;L1128:do{if((c[8272]|0)>(K|0)){k=c[1054]|0;if((a[k+(K*40&-1)|0]&1)==0){x=874;break}q=c[k+(K*40&-1)+36>>2]|0;p=k+(K*40&-1)+32|0;k=c[10036]|0;l=0;while(1){if((l|0)>=(q|0)){break}if((a[k+((c[p>>2]|0)+l|0)|0]|0)==(a[l+148464|0]|0)){l=l+1|0}else{x=874;break L1128}}if((l|0)!=1){x=874;break}c[13898]=K+1;dm(o,n);p=c[o>>2]|0;c[b+4>>2]=p;k=c[n>>2]|0;L1136:do{if((k|0)>-1){if((c[64808+((k+1|0)*688&-1)>>2]|0)!=1){break}q=c[13898]|0;D=c[1054]|0;w=(a[D+(q*40&-1)|0]&1)==0;if(w){x=844}else{y=c[10036]|0;z=a[y+(c[D+(q*40&-1)+32>>2]|0)|0]|0;if((z<<24>>24|0)==39|(z<<24>>24|0)==34){N=y}else{x=844}}if((x|0)==844){y=c[10810]|0;if((y|0)==0){break}z=c[8272]|0;A=D+(q*40&-1)+36|0;G=D+(q*40&-1)+32|0;H=c[10036]|0;E=y;L1144:while(1){y=c[E+4>>2]|0;L1146:do{if(!((z|0)<=(q|0)|w)){F=c[A>>2]|0;J=0;while(1){if((J|0)>=(F|0)){break}if((a[H+((c[G>>2]|0)+J|0)|0]|0)==(a[y+J|0]|0)){J=J+1|0}else{break L1146}}if((a[y+J|0]|0)==0){break L1144}}}while(0);y=c[E>>2]|0;if((y|0)==0){break L1136}else{E=y}}if((a[E+8|0]&1)!=0){break}if((c[E+16>>2]|0)==3){N=H}else{break}}L1156:do{if((q|0)<(c[8272]|0)){L1158:do{if(!w){G=c[D+(q*40&-1)+36>>2]|0;A=D+(q*40&-1)+32|0;z=0;while(1){if((z|0)>=(G|0)){break}if((a[N+((c[A>>2]|0)+z|0)|0]|0)==(a[z+103664|0]|0)){z=z+1|0}else{break L1158}}if((z|0)==1){O=0;break L1156}}}while(0);a[14176]=1;is(j);a[14176]=0;if((c[j>>2]|0)==3){O=c[j+8>>2]|0;break}else{c[13898]=q;O=0;break}}else{O=0}}while(0);if((t1(O,65501,r,s)|0)!=0){M=+t2(r);h[b+24>>3]=M+ +h[s>>3]}uu(O);P=p;break L1128}}while(0);k=is(g)|0;l=c[k>>2]|0;if((l|0)==1){Q=+(c[k+8>>2]|0)}else if((l|0)==2){Q=+h[k+8>>3]}else if((l|0)==3){Q=+uz(c[k+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=g|0;if((c[k>>2]|0)==3){uu(c[g+8>>2]|0);c[k>>2]=1}h[b+24>>3]=Q;P=p}else{x=874}}while(0);if((x|0)==874){h[b+24>>3]=0.0;c[b+4>>2]=d;P=d}d=c[13898]|0;g=c[8272]|0;L1185:do{if((g|0)>(d|0)){O=c[1054]|0;if((a[O+(d*40&-1)|0]&1)==0){break}s=c[O+(d*40&-1)+36>>2]|0;r=O+(d*40&-1)+32|0;j=c[10036]|0;N=0;while(1){if((N|0)>=(s|0)){break}if((a[j+((c[r>>2]|0)+N|0)|0]|0)==(a[N+148464|0]|0)){N=N+1|0}else{break L1185}}if((N|0)!=1){break}r=d+1|0;s=(a[O+(r*40&-1)|0]&1)==0;if(!s){p=a[j+(c[O+(r*40&-1)+32>>2]|0)|0]|0;if((p<<24>>24|0)==39|(p<<24>>24|0)==34){break}}p=c[10810]|0;L1196:do{if((p|0)==0){R=O+(r*40&-1)+36|0;S=O+(r*40&-1)+32|0}else{K=O+(r*40&-1)+36|0;k=O+(r*40&-1)+32|0;l=p;L1199:while(1){q=c[l+4>>2]|0;L1201:do{if(!((g|0)<=(r|0)|s)){D=c[K>>2]|0;w=0;while(1){if((w|0)>=(D|0)){break}if((a[j+((c[k>>2]|0)+w|0)|0]|0)==(a[q+w|0]|0)){w=w+1|0}else{break L1201}}if((a[q+w|0]|0)==0){break L1199}}}while(0);q=c[l>>2]|0;if((q|0)==0){R=K;S=k;break L1196}else{l=q}}if((a[l+8|0]&1)!=0){R=K;S=k;break}if((c[l+16>>2]|0)==3){break L1185}else{R=K;S=k}}}while(0);p=c[R>>2]|0;O=c[S>>2]|0;L1211:do{if((p|0)>0&(s^1)){N=0;q=0;D=O;while(1){if((a[N+205224|0]|0)==(a[j+(N+D|0)|0]|0)){T=D;U=q}else{if((N|0)!=7){break}T=D-1|0;U=1}z=N+1|0;if((z|0)<(U+p|0)){N=z;q=U;D=T}else{x=899;break}}if((x|0)==899){if((U|0)!=0){break L1185}if((N|0)==6|(N|0)==12){break L1185}}if((p|0)>0&(s^1)){V=0}else{break}do{if((a[V+217064|0]|0)!=(a[j+(V+O|0)|0]|0)){break L1211}V=V+1|0;}while((V|0)<(p|0));if((V|0)==3){break L1185}}}while(0);c[13898]=r;dm(o,n);c[b+8>>2]=c[o>>2];p=c[n>>2]|0;L1227:do{if((p|0)>-1){if((c[64808+(p*688&-1)>>2]|0)!=1){break}O=c[13898]|0;j=c[1054]|0;s=(a[j+(O*40&-1)|0]&1)==0;if(s){x=909}else{N=c[10036]|0;D=a[N+(c[j+(O*40&-1)+32>>2]|0)|0]|0;if((D<<24>>24|0)==39|(D<<24>>24|0)==34){W=N}else{x=909}}if((x|0)==909){N=c[10810]|0;if((N|0)==0){break}D=c[8272]|0;q=j+(O*40&-1)+36|0;k=j+(O*40&-1)+32|0;K=c[10036]|0;l=N;L1235:while(1){N=c[l+4>>2]|0;L1237:do{if(!((D|0)<=(O|0)|s)){z=c[q>>2]|0;H=0;while(1){if((H|0)>=(z|0)){break}if((a[K+((c[k>>2]|0)+H|0)|0]|0)==(a[N+H|0]|0)){H=H+1|0}else{break L1237}}if((a[N+H|0]|0)==0){break L1235}}}while(0);N=c[l>>2]|0;if((N|0)==0){break L1227}else{l=N}}if((a[l+8|0]&1)!=0){break}if((c[l+16>>2]|0)==3){W=K}else{break}}L1247:do{if((O|0)<(c[8272]|0)){L1249:do{if(!s){k=c[j+(O*40&-1)+36>>2]|0;q=j+(O*40&-1)+32|0;D=0;while(1){if((D|0)>=(k|0)){break}if((a[W+((c[q>>2]|0)+D|0)|0]|0)==(a[D+103664|0]|0)){D=D+1|0}else{break L1249}}if((D|0)==1){X=0;break L1247}}}while(0);a[14176]=1;is(f);a[14176]=0;if((c[f>>2]|0)==3){X=c[f+8>>2]|0;break}else{c[13898]=O;X=0;break}}else{X=0}}while(0);if((t1(X,64813,t,u)|0)!=0){Q=+t2(t);h[b+32>>3]=Q+ +h[u>>3]}uu(X);i=e;return}}while(0);p=is(m)|0;r=c[p>>2]|0;if((r|0)==1){Y=+(c[p+8>>2]|0)}else if((r|0)==2){Y=+h[p+8>>3]}else if((r|0)==3){Y=+uz(c[p+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=m|0;if((c[p>>2]|0)==3){uu(c[m+8>>2]|0);c[p>>2]=1}h[b+32>>3]=Y;i=e;return}}while(0);h[b+32>>3]=0.0;c[b+8>>2]=P;i=e;return}function dm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;e=c[13898]|0;f=c[1054]|0;g=c[f+(e*40&-1)+36>>2]|0;h=c[f+(e*40&-1)+32>>2]|0;i=(a[f+(e*40&-1)|0]&1)==0;L1278:do{if((g|0)>0&(i^1)){f=c[10036]|0;j=0;k=0;l=h;while(1){if((a[j+101440|0]|0)==(a[f+(j+l|0)|0]|0)){m=l;n=k}else{if((j|0)!=3){break}m=l-1|0;n=1}o=j+1|0;if((o|0)<(n+g|0)){j=o;k=n;l=m}else{p=950;break}}do{if((p|0)==950){if((n|0)==0){if(!((j|0)==5|(j|0)==2)){break}}c[13898]=e+1;c[b>>2]=0;p=990;break L1278}}while(0);if(!((g|0)>0&(i^1))){p=989;break}j=c[10036]|0;l=0;k=0;f=h;while(1){if((a[l+100944|0]|0)==(a[j+(l+f|0)|0]|0)){q=f;r=k}else{if((l|0)!=3){break}q=f-1|0;r=1}o=l+1|0;if((o|0)<(r+g|0)){l=o;k=r;f=q}else{p=959;break}}do{if((p|0)==959){if((r|0)==0){if(!((l|0)==6|(l|0)==2)){break}}c[13898]=e+1;c[b>>2]=1;p=991;break L1278}}while(0);if(!((g|0)>0&(i^1))){p=989;break}l=c[10036]|0;f=0;k=0;j=h;while(1){if((a[f+148408|0]|0)==(a[l+(f+j|0)|0]|0)){s=j;t=k}else{if((f|0)!=2){break}s=j-1|0;t=1}o=f+1|0;if((o|0)<(t+g|0)){f=o;k=t;j=s}else{p=968;break}}do{if((p|0)==968){if((t|0)==0){if(!((f|0)==5|(f|0)==1)){break}}c[13898]=e+1;c[b>>2]=2;p=992;break L1278}}while(0);if(!((g|0)>0&(i^1))){p=989;break}f=c[10036]|0;j=0;k=0;l=h;while(1){if((a[j+142056|0]|0)==(a[f+(j+l|0)|0]|0)){u=l;v=k}else{if((j|0)!=2){break}u=l-1|0;v=1}o=j+1|0;if((o|0)<(v+g|0)){j=o;k=v;l=u}else{p=977;break}}do{if((p|0)==977){if((v|0)==0){if(!((j|0)==6|(j|0)==1)){break}}c[13898]=e+1;c[b>>2]=3;p=992;break L1278}}while(0);if(!((g|0)>0&(i^1))){p=989;break}j=c[10036]|0;l=0;k=0;f=h;while(1){if((a[l+99320|0]|0)==(a[j+(l+f|0)|0]|0)){w=f;x=k}else{if((l|0)!=4){p=989;break L1278}w=f-1|0;x=1}o=l+1|0;if((o|0)<(x+g|0)){l=o;k=x;f=w}else{break}}if((x|0)==0){if(!((l|0)==3|(l|0)==9)){p=989;break}}c[13898]=e+1;c[b>>2]=4;p=992}else{p=989}}while(0);if((p|0)==989){e=c[b>>2]|0;if((e|0)==0){p=990}else if((e|0)==1){p=991}else{p=992}}if((p|0)==992){c[d>>2]=-1;return}else if((p|0)==990){c[d>>2]=0;return}else if((p|0)==991){c[d>>2]=4;return}}function dn(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=c[8272]|0;d=c[13898]|0;L1352:while(1){e=d+1|0;c[13898]=e;L1354:do{if((b|0)>(d|0)){f=c[1054]|0;if((a[f+(d*40&-1)|0]&1)==0){g=1004;break}h=c[f+(d*40&-1)+36>>2]|0;i=f+(d*40&-1)+32|0;f=c[10036]|0;j=0;while(1){if((j|0)>=(h|0)){break}if((a[f+((c[i>>2]|0)+j|0)|0]|0)==(a[j+78864|0]|0)){j=j+1|0}else{g=1004;break L1354}}if(!((j|0)!=1&(e|0)<(b|0))){g=1011;break L1352}}else{g=1004}}while(0);if((g|0)==1004){g=0;if((e|0)>=(b|0)){g=1012;break}}i=c[1054]|0;if((a[i+(e*40&-1)|0]&1)==0){d=e;continue}f=c[i+(e*40&-1)+36>>2]|0;h=i+(e*40&-1)+32|0;i=c[10036]|0;k=0;while(1){if((k|0)>=(f|0)){break}if((a[i+((c[h>>2]|0)+k|0)|0]|0)==(a[k+103664|0]|0)){k=k+1|0}else{d=e;continue L1352}}if((k|0)==1){g=1013;break}else{d=e}}if((g|0)==1013){return}else if((g|0)==1011){return}else if((g|0)==1012){return}}function dp(b,d,e,f){b=b|0;d=d|0;e=+e;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0;g=i;i=i+24|0;j=g|0;k=(d|0)!=0;if((f|0)<0&(k^1)){i=g;return}if((a[64976+(b*688&-1)|0]&1)==0){c[64920+(b*688&-1)>>2]=3}l=64944+(b*688&-1)|0;b=c[l>>2]|0;m=j+16|0;c[m>>2]=b;h[j>>3]=-1.7976931348623157e+308;n=j;j=b;while(1){o=n+16|0;if((j|0)==0){p=1022;break}q=+h[j>>3];if(q>=e){p=1021;break}n=j;j=c[j+16>>2]|0}do{if((p|0)==1021){if(q>e){p=1022;break}if(q!=e){uh(-1,105096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);r=c[o>>2]|0}else{r=j}if((c[r+12>>2]|0)<(f|0)){i=g;return}n=r+8|0;b=c[n>>2]|0;if((b|0)==0){s=r;break}uu(b);c[n>>2]=0;s=r}}while(0);if((p|0)==1022){p=ut(24)|0;if((p|0)==0){gk();t=ut(24)|0}else{t=p}p=t;h[t>>3]=e;c[t+12>>2]=f;c[t+16>>2]=c[o>>2];c[o>>2]=p;s=p}if(k){c[s+8>>2]=bP(d|0)|0}else{c[s+8>>2]=0}c[l>>2]=c[m>>2];i=g;return}function dq(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;e=c[13898]|0;if((c[8272]|0)<=(e|0)){i=d;return}f=c[1054]|0;if((a[f+(e*40&-1)|0]&1)==0){i=d;return}g=c[f+(e*40&-1)+36>>2]|0;h=f+(e*40&-1)+32|0;f=c[10036]|0;j=0;while(1){if((j|0)>=(g|0)){break}if((a[f+((c[h>>2]|0)+j|0)|0]|0)==(a[j+78280|0]|0)){j=j+1|0}else{k=1056;break}}if((k|0)==1056){i=d;return}if((j|0)!=1){i=d;return}c[13898]=e+1;e=64648+(b*688&-1)|0;c[e>>2]=dj(b,64664+(b*688&-1)|0,64672+(b*688&-1)|0,c[e>>2]|0)|0;e=c[13898]|0;L1421:do{if((c[8272]|0)>(e|0)){b=c[1054]|0;if((a[b+(e*40&-1)|0]&1)==0){break}j=c[b+(e*40&-1)+36>>2]|0;k=b+(e*40&-1)+32|0;b=c[10036]|0;h=0;while(1){if((h|0)>=(j|0)){break}if((a[b+((c[k>>2]|0)+h|0)|0]|0)==(a[h+78864|0]|0)){h=h+1|0}else{break L1421}}if((h|0)!=1){break}c[13898]=e+1;i=d;return}}while(0);uf(e,101328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function dr(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;g=c[13898]|0;if((c[8272]|0)<=(g|0)){h=e;i=f;return h|0}j=c[1054]|0;if((a[j+(g*40&-1)|0]&1)==0){h=e;i=f;return h|0}k=c[j+(g*40&-1)+36>>2]|0;l=j+(g*40&-1)+32|0;m=c[10036]|0;n=0;while(1){if((n|0)>=(k|0)){break}if((a[m+((c[l>>2]|0)+n|0)|0]|0)==(a[n+78280|0]|0)){n=n+1|0}else{h=e;o=1085;break}}if((o|0)==1085){i=f;return h|0}if((n|0)!=1){h=e;i=f;return h|0}n=g+1|0;c[13898]=n;L1447:do{if((a[j+(n*40&-1)|0]&1)==0){p=e}else{if((bO(d[m+(c[j+(n*40&-1)+32>>2]|0)|0]|0|0)|0)==0){if((a[(c[10036]|0)+(c[(c[1054]|0)+(n*40&-1)+32>>2]|0)|0]|0)!=95){p=e;break}}g=c[13898]|0;l=g+1|0;if((c[8272]|0)<=(l|0)){p=e;break}k=c[1054]|0;if((a[k+(l*40&-1)|0]&1)==0){p=e;break}q=c[k+(l*40&-1)+36>>2]|0;r=k+(l*40&-1)+32|0;l=c[10036]|0;k=0;while(1){if((k|0)>=(q|0)){break}if((a[l+((c[r>>2]|0)+k|0)|0]|0)==(a[k+115e3|0]|0)){k=k+1|0}else{p=e;break L1447}}if((k|0)!=1){p=e;break}c[13898]=g+2;p=g}}while(0);e=64648+(b*688&-1)|0;c[e>>2]=dj(b,64664+(b*688&-1)|0,64672+(b*688&-1)|0,c[e>>2]|0)|0;e=c[13898]|0;if((c[8272]|0)<=(e|0)){uf(e,101328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}b=c[1054]|0;if((a[b+(e*40&-1)|0]&1)==0){uf(e,101328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}n=c[b+(e*40&-1)+36>>2]|0;j=b+(e*40&-1)+32|0;b=c[10036]|0;m=0;while(1){if((m|0)>=(n|0)){break}if((a[b+((c[j>>2]|0)+m|0)|0]|0)==(a[m+78864|0]|0)){m=m+1|0}else{o=1089;break}}if((o|0)==1089){uf(e,101328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((m|0)!=1){uf(e,101328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}c[13898]=e+1;h=p;i=f;return h|0}function ds(){var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0.0,B=0,C=0;d=i;e=hA(c[11932]|0,78360)|0;if((e|0)==0){uj(-1,146640,(v=i,i=i+8|0,c[v>>2]=c[11932],v)|0)}else{f=0;g=0}L1479:while(1){if((g|0)!=0){if((a_(f+(g-2|0)|0,86144,2)|0)==0){j=1104;break}}k=g+512|0;l=g+513|0;do{if((f|0)==0){m=ut(l)|0;if((m|0)!=0){n=m;break}gk();m=ut(l)|0;if((m|0)==0){j=1099;break L1479}else{n=m}}else{n=db(f,l,127720)|0}}while(0);l=n+g|0;a[l]=0;if((cd(l|0,512,1,e|0)|0)==0){j=1102;break}a[n+k|0]=0;f=n;g=k}if((j|0)==1099){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=127720,v)|0)}else if((j|0)==1102){uu(n);uj(-1,113448,(v=i,i=i+8|0,c[v>>2]=c[11932],v)|0)}else if((j|0)==1104){az(e|0);e=c[11864]|0;do{if((e|0)<1){n=1-e|0;do{if((c[11880]|0)<1){l=db(c[12172]|0,232,216568)|0;c[12172]=l;if((l|0)==0){c[11880]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[11880]=1;break}}}while(0);if((n|0)<=0){break}k=c[12172]|0;l=0;m=c[11864]|0;do{uD(k+(m*232&-1)|0,48440,232);m=(c[11864]|0)+1|0;c[11864]=m;l=l+1|0;}while((l|0)<(n|0))}}while(0);e=aQ(f|0,100248)|0;L1506:do{if((e|0)==0){j=1122}else{n=a8(e+18|0,61)|0;do{n=n+1|0;}while((aM(a[n]|0|0)|0)!=0);if((n|0)==0){j=1122;break}l=bk(n|0,95048)|0;m=db(c[11932]|0,l+1|0,88488)|0;c[11932]=m;uF(m|0,n|0,l|0);a[(c[11932]|0)+l|0]=0;l=aQ(f|0,78632)|0;do{if((l|0)!=0){m=a8(l+22|0,61)|0;do{m=m+1|0;}while((aM(a[m]|0|0)|0)!=0);if((m|0)==0){break}k=bW(m|0)|0;c[(c[12172]|0)+128>>2]=k;break L1506}}while(0);c[(c[12172]|0)+128>>2]=0}}while(0);if((j|0)==1122){c[(c[12172]|0)+128>>2]=g}c[(c[12172]|0)+152>>2]=1;c[(c[12172]|0)+156>>2]=-1;a[(c[12172]|0)+124|0]=1;c[(c[12172]|0)+112>>2]=-3;c[(c[12172]|0)+116>>2]=-4;eQ(1);g=c[11950]|0;if((c[11884]|0)<1){j=db(g,12,215112)|0;c[11950]=j;c[11884]=1;o=j}else{o=g}c[o>>2]=0;o=c[11950]|0;if((c[11884]|0)<2){g=db(o,24,215112)|0;c[11950]=g;c[11884]=2;p=g}else{p=o}c[p+12>>2]=0;c[11870]=1;c[262]=1;p=aQ(f|0,73608)|0;do{if((p|0)!=0){o=a8(p+5|0,61)|0;do{o=o+1|0;}while((aM(a[o]|0|0)|0)!=0);if((o|0)==0){break}g=bW(o|0)|0;c[(c[12172]|0)+140>>2]=g}}while(0);p=aQ(f|0,218896)|0;do{if((p|0)!=0){g=a8(p+5|0,61)|0;do{g=g+1|0;}while((aM(a[g]|0|0)|0)!=0);if((g|0)==0){break}o=bW(g|0)|0;c[(c[12172]|0)+144>>2]=o}}while(0);p=aQ(f|0,213352)|0;L1542:do{if((p|0)!=0){o=a8(p+8|0,61)|0;do{o=o+1|0;}while((aM(a[o]|0|0)|0)!=0);if((o|0)==0){break}else{q=-1}while(1){r=q+1|0;g=c[46440+(r*12&-1)>>2]|0;if((r|0)==12){break L1542}if((a_(o|0,g|0,uA(g|0)|0)|0)==0){break}else{q=r}}if((r|0)<=-1){break}o=b[46448+(r*12&-1)>>1]|0;if((o|0)==1){g=1328>>>(r>>>0);do{if((g&1|0)==0){j=2752>>>(r>>>0);if(((j|g)&1|0)!=0){s=(j&1|0)!=0?11:5;break}if((q-1|0)>>>0<2){s=3;break}s=r>>>0<2?1:12}else{s=7}}while(0);g=c[11950]|0;if((c[11884]|0)<1){j=db(g,12,215112)|0;c[11950]=j;c[11884]=1;t=j}else{t=g}c[t+4>>2]=s;b[(c[11950]|0)+8>>1]=b[48036+(s<<4)>>1]|0;break}else if((o|0)==2){if((1328>>>(r>>>0)&1|0)==0){u=(2752>>>(r>>>0)&1|0)!=0?9:12}else{u=8}g=c[11950]|0;if((c[11884]|0)<1){j=db(g,12,215112)|0;c[11950]=j;c[11884]=1;w=j}else{w=g}c[w+4>>2]=u;b[(c[11950]|0)+8>>1]=b[48036+(u<<4)>>1]|0;break}else if((o|0)==0){g=1328>>>(r>>>0);do{if((g&1|0)==0){j=2752>>>(r>>>0);if(((j|g)&1|0)!=0){x=(j&1|0)!=0?10:4;break}if((q-1|0)>>>0<2){x=2;break}x=r>>>0<2?0:12}else{x=6}}while(0);g=c[11950]|0;if((c[11884]|0)<1){o=db(g,12,215112)|0;c[11950]=o;c[11884]=1;y=o}else{y=g}c[y+4>>2]=x;b[(c[11950]|0)+8>>1]=b[48036+(x<<4)>>1]|0;break}else{break}}}while(0);x=aQ(f|0,207688)|0;L1579:do{if((x|0)!=0){y=a8(x+9|0,61)|0;do{y=y+1|0;}while((aM(a[y]|0|0)|0)!=0);if((y|0)==0){break}do{if((aY(y|0,149792)|0)==0){z=0}else{r=(a_(y|0,149792,12)|0)!=0;if((aY(y|0,147968)|0)==0){z=1;break}q=(a_(y|0,147968,13)|0)==0&r?1:r<<31>>31;if((q|0)>-1){z=q}else{break L1579}}}while(0);c[12208]=c[46604+(z<<3)>>2]}}while(0);z=aQ(f|0,203264)|0;do{if((z|0)!=0){x=a8(z+8|0,61)|0;do{x=x+1|0;}while((aM(a[x]|0|0)|0)!=0);if((x|0)==0){break}A=+uz(x,0);y=c[12172]|0;h[y+200>>3]=A;c[y+192>>2]=1}}while(0);z=aQ(f|0,198216)|0;do{if((z|0)!=0){y=a8(z+8|0,61)|0;do{y=y+1|0;}while((aM(a[y]|0|0)|0)!=0);if((y|0)==0){break}A=+uz(y,0);x=c[12172]|0;h[x+208>>3]=A;c[x+192>>2]=1}}while(0);z=aQ(f|0,186936)|0;do{if((z|0)!=0){x=a8(z+8|0,61)|0;do{x=x+1|0;}while((aM(a[x]|0|0)|0)!=0);if((x|0)==0){break}A=+uz(x,0);y=c[12172]|0;h[y+200>>3]=A;c[y+192>>2]=2}}while(0);z=aQ(f|0,181632)|0;do{if((z|0)!=0){y=a8(z+8|0,61)|0;do{y=y+1|0;}while((aM(a[y]|0|0)|0)!=0);if((y|0)==0){break}A=+uz(y,0);x=c[12172]|0;h[x+208>>3]=A;c[x+192>>2]=2}}while(0);z=aQ(f|0,177440)|0;do{if((z|0)!=0){x=a8(z+7|0,61)|0;do{x=x+1|0;}while((aM(a[x]|0|0)|0)!=0);if((x|0)==0){break}A=+uz(x,0);h[(c[12172]|0)+168>>3]=A}}while(0);z=aQ(f|0,172936)|0;do{if((z|0)!=0){y=a8(z+7|0,61)|0;do{y=y+1|0;}while((aM(a[y]|0|0)|0)!=0);if((y|0)==0){break}A=+uz(y,0);h[(c[12172]|0)+176>>3]=A}}while(0);z=aQ(f|0,169160)|0;if((z|0)==0){uu(f);i=d;return}x=a8(z+10|0,61)|0;do{x=x+1|0;}while((aM(a[x]|0|0)|0)!=0);if((x|0)==0){uu(f);i=d;return}do{if((aY(x|0,155800)|0)==0){c[(c[12172]|0)+152>>2]=1;B=(c[12172]|0)+156|0}else{if((aY(x|0,151720)|0)==0){c[(c[12172]|0)+152>>2]=1;C=(c[12172]|0)+156|0}else{z=(a_(x|0,155800,11)|0)!=0;q=(a_(x|0,151720,9)|0)==0&z;c[(c[12172]|0)+152>>2]=1;z=(c[12172]|0)+156|0;if(q){C=z}else{B=z;break}}c[C>>2]=1;c[(c[12172]|0)+112>>2]=-3;c[(c[12172]|0)+116>>2]=-4;uu(f);i=d;return}}while(0);c[B>>2]=-1;c[(c[12172]|0)+112>>2]=-3;c[(c[12172]|0)+116>>2]=-4;uu(f);i=d;return}}function dt(){du(0)}function du(a){a=a|0;uf(-1,164848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function dv(){du(0)}function dw(){du(0)}function dx(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0;d=i;i=i+16|0;e=d|0;f=c[12372]|0;if((f|0)==2|(f|0)==5){g=(c[12374]<<4&65520)+f|0;j=1226}else if((f|0)==1|(f|0)==4){g=(c[12373]<<4&65520)+f|0;j=1226}else if((f|0)==0){c[b+8>>2]=1601}else{g=0;j=1226}if((j|0)==1226){c[b+8>>2]=g}cN[c[(c[3524]|0)+148>>2]&255](4,b);if((c[7661]|0)==0){i=d;return}g=e;c[g>>2]=c[7654];c[g+4>>2]=c[30620>>2];c[g+8>>2]=c[30624>>2];c[g+12>>2]=c[30628>>2];g=c[7645]|0;do{if((c[7644]|0)!=0){k=+h[3825];f=c[(c[3524]|0)+92>>2]|0;if(k<0.0){cK[f&63](+h[3817]);break}else{cK[f&63](k);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[3824]);f=c[(c[3524]|0)+64>>2]|0;if((g|0)<-5){cM[f&511](-2)}else{cM[f&511](g)}f=c[3524]|0;do{if((a[30608]&1)==0){if((c[f+96>>2]&1024|0)!=0){l=f;break}c[e>>2]=1;c[e+4>>2]=g;j=1238}else{j=1238}}while(0);if((j|0)==1238){fn(e,f);l=c[3524]|0}f=b|0;e=b+4|0;cN[c[l+56>>2]&255](c[f>>2]|0,c[e>>2]|0);cN[c[(c[3524]|0)+60>>2]&255](c[b+36>>2]|0,c[b+40>>2]|0);cN[c[(c[3524]|0)+60>>2]&255](c[b+24>>2]|0,c[b+28>>2]|0);cN[c[(c[3524]|0)+60>>2]&255](c[b+12>>2]|0,c[b+16>>2]|0);cN[c[(c[3524]|0)+60>>2]&255](c[f>>2]|0,c[e>>2]|0);i=d;return}function dy(a){a=a|0;var b=0,d=0,e=0.0,f=0.0,g=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0.0,E=0,F=0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0;b=i;i=i+48|0;d=b|0;e=+h[64664+((c[200]|0)*688&-1)>>3];f=+h[91];g=+h[96];j=+h[64664+((c[144]|0)*688&-1)>>3];k=+h[21];l=+h[68];m=+h[5279];n=+h[2];o=+h[12];p=+h[403];q=+h[391];r=+h[395];s=+h[399];t=+h[404];u=+h[392];v=+h[396];w=+h[400];x=+h[406];y=+h[394];z=+h[398];A=+h[402];B=+(c[180]|0);C=c[186]|0;D=+(c[40]|0);E=c[46]|0;F=0;do{G=(+h[a+(F<<5)>>3]-e)*f+g+-1.0;H=(+h[a+(F<<5)+8>>3]-j)*k+l+-1.0;I=(+h[a+(F<<5)+16>>3]-m)*n+o+-1.0;J=x+G*y+H*z+I*A;K=J==0.0?1.0e-5:J;c[d+(F*12&-1)>>2]=~~((p+G*q+H*r+I*s)/K*B)+C;c[d+(F*12&-1)+4>>2]=~~((t+G*u+H*v+I*w)/K*D)+E;F=F+1|0;}while((F|0)<4);dx(d|0);i=b;return}function dz(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;d=c[(c[3524]|0)+136>>2]|0;if((d|0)==0){e=1;i=b;return e|0}f=cO[d&255](0)|0;c[5169]=f;if((f|0)==0){if((uG(29056,20648,1024)|0)==0){e=0;i=b;return e|0}d=c[(c[3524]|0)+136>>2]|0;cO[d&255](20648);uD(29056,20648,1024);e=0;i=b;return e|0}d=c[5168]|0;do{if((d|0)>0){if((c[5163]|0)==100){c[5169]=f;g=f;break}if((f|0)<=(d|0)){g=f;break}c[5169]=d;g=d}else{g=f}}while(0);d=c[7264]|0;do{if((d|0)>-1&(c[5162]|0)==(d|0)){if((c[5163]|0)!=(c[7265]|0)){h=1261;break}if((c[5164]|0)!=(c[7266]|0)){h=1261;break}if((c[5165]|0)!=(c[7267]|0)){h=1261;break}if((c[5166]|0)!=(c[7268]|0)){h=1261;break}if(!((a[20668]|0)==(a[29076]|0)&(g|0)==(c[7271]|0))){h=1261}}else{h=1261}}while(0);do{if((h|0)==1261){if((a[37400]&1)==0){break}d=c[m>>2]|0;j=c[c[3524]>>2]|0;cf(d|0,218032,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=g,c[v+16>>2]=f,v)|0)}}while(0);uD(29056,20648,1024);f=c[5170]|0;if((f|0)!=0){uu(f);c[5170]=0}f=(c[5169]|0)*24&-1;g=ut(f)|0;do{if((g|0)==0){gk();h=ut(f)|0;if((h|0)!=0){k=h;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=217512,v)|0);return 0}else{k=g}}while(0);g=k;c[5170]=g;k=c[5169]|0;L1722:do{if((k|0)>0){f=0;h=k;j=g;while(1){fq(+(f|0)/+(h-1|0),j+(f*24&-1)|0);d=f+1|0;l=c[5169]|0;if((d|0)>=(l|0)){break L1722}f=d;h=l;j=c[5170]|0}}}while(0);cO[c[(c[3524]|0)+136>>2]&255](20648);e=0;i=b;return e|0}function dA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0,s=0;d=i;e=a*12&-1;f=ut(e)|0;do{if((f|0)==0){gk();g=ut(e)|0;if((g|0)!=0){j=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=164072,v)|0)}else{j=f}}while(0);f=j;if((a|0)>0){e=0;do{k=(+h[b+(e<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;l=(+h[b+(e<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;m=(+h[b+(e<<6)+24>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;n=+h[406]+k*+h[394]+l*+h[398]+m*+h[402];o=n==0.0?1.0e-5:n;g=~~((+h[404]+k*+h[392]+l*+h[396]+m*+h[400])/o*+(c[40]|0))+(c[46]|0)|0;c[f+(e*12&-1)>>2]=~~((+h[403]+k*+h[391]+l*+h[395]+m*+h[399])/o*+(c[180]|0))+(c[186]|0);c[f+(e*12&-1)+4>>2]=g;e=e+1|0;}while((e|0)<(a|0))}e=c[12372]|0;if((e|0)==1|(e|0)==4){p=(c[12373]<<4&65520)+e|0}else if((e|0)==2|(e|0)==5){p=(c[12374]<<4&65520)+e|0}else if((e|0)==0){c[j+8>>2]=1601;q=c[3524]|0;r=q+148|0;s=c[r>>2]|0;cN[s&255](a,f);uu(j);i=d;return}else{p=0}c[j+8>>2]=p;q=c[3524]|0;r=q+148|0;s=c[r>>2]|0;cN[s&255](a,f);uu(j);i=d;return}function dB(a,b,d){a=a|0;b=b|0;d=+d;var e=0,f=0,g=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0,t=0;e=i;f=a*12&-1;g=ut(f)|0;do{if((g|0)==0){gk();j=ut(f)|0;if((j|0)!=0){k=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=136792,v)|0)}else{k=g}}while(0);g=k;if((a|0)>0){f=0;do{l=(+h[b+(f<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;m=(+h[b+(f<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;n=(d- +h[5279])*+h[2]+ +h[12]+-1.0;o=+h[406]+l*+h[394]+m*+h[398]+n*+h[402];p=o==0.0?1.0e-5:o;j=~~((+h[404]+l*+h[392]+m*+h[396]+n*+h[400])/p*+(c[40]|0))+(c[46]|0)|0;c[g+(f*12&-1)>>2]=~~((+h[403]+l*+h[391]+m*+h[395]+n*+h[399])/p*+(c[180]|0))+(c[186]|0);c[g+(f*12&-1)+4>>2]=j;f=f+1|0;}while((f|0)<(a|0))}f=c[12372]|0;if((f|0)==0){c[k+8>>2]=1601;q=c[3524]|0;r=q+148|0;s=c[r>>2]|0;cN[s&255](a,g);uu(k);i=e;return}else if((f|0)==1|(f|0)==4){t=(c[12373]<<4&65520)+f|0}else if((f|0)==2|(f|0)==5){t=(c[12374]<<4&65520)+f|0}else{t=0}c[k+8>>2]=t;q=c[3524]|0;r=q+148|0;s=c[r>>2]|0;cN[s&255](a,g);uu(k);i=e;return}function dC(b,d,e,f,g){b=b|0;d=+d;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;j=i;i=i+64|0;k=f;f=i;i=i+56|0;uD(f,k,56);k=j|0;l=j+16|0;m=j+32|0;n=j+48|0;o=j+56|0;p=(e|0)!=0;q=c[3524]|0;r=~~(+((c[q+28>>2]|0)>>>0>>>0)*(p?+h[8390]:+h[8391])*((a[67136]&1)!=0?-1.0:1.0));s=+h[8341];t=(d-s)/(+h[8342]-s);if((a[54017]|0)==104){u=c[13528]|0;v=~~(+(u|0)+t*+((c[13529]|0)-u|0));u=c[13530]|0;w=u-r|0;x=v;y=u;z=v}else{v=c[13529]|0;u=c[13530]|0;A=~~(+(u|0)+t*+((c[13531]|0)-u|0));w=A;x=v+r|0;y=A;z=v}v=c[f+4>>2]|0;do{if((v|0)>-3){A=m;u=f+40|0;c[A>>2]=c[u>>2];c[A+4>>2]=c[u+4>>2];c[A+8>>2]=c[u+8>>2];c[A+12>>2]=c[u+12>>2];do{if((c[f>>2]|0)!=0){t=+h[f+24>>3];u=c[q+92>>2]|0;if(t<0.0){cK[u&63](+h[3817]);break}else{cK[u&63](t);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[f+16>>3]);u=c[(c[3524]|0)+64>>2]|0;if((v|0)<-5){cM[u&511](-2)}else{cM[u&511](v)}u=c[3524]|0;do{if((a[f+32|0]&1)==0){if((c[u+96>>2]&1024|0)!=0){B=u;break}c[m>>2]=1;c[m+4>>2]=v;C=1317}else{C=1317}}while(0);if((C|0)==1317){fn(m,u);B=c[3524]|0}A=c[B+56>>2]|0;if((a[54017]|0)==104){cN[A&255](z,c[13530]|0);cN[c[(c[3524]|0)+60>>2]&255](z,c[13531]|0)}else{cN[A&255](c[13528]|0,y);cN[c[(c[3524]|0)+60>>2]&255](c[13529]|0,y)}A=l;c[A>>2]=c[14084];c[A+4>>2]=c[56340>>2];c[A+8>>2]=c[56344>>2];c[A+12>>2]=c[56348>>2];A=c[14075]|0;do{if((c[14074]|0)!=0){t=+h[7040];D=c[(c[3524]|0)+92>>2]|0;if(t<0.0){cK[D&63](+h[3817]);break}else{cK[D&63](t);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);u=c[(c[3524]|0)+64>>2]|0;if((A|0)<-5){cM[u&511](-2)}else{cM[u&511](A)}u=c[3524]|0;if((a[56328]&1)==0){if((c[u+96>>2]&1024|0)!=0){E=u;break}c[l>>2]=1;c[l+4>>2]=A}fn(l,u);E=c[3524]|0}else{E=q}}while(0);cN[c[E+56>>2]&255](z,y);cN[c[(c[3524]|0)+60>>2]&255](x,w);do{if(p){L1804:do{if((g|0)==0){F=e}else{t=+h[8342]- +h[8341];E=g;while(1){if(+P(+((d- +h[E>>3])/t))<=.001){F=0;break L1804}q=c[E+16>>2]|0;if((q|0)==0){F=e;break}else{E=q}}}}while(0);fx(64984+(b*688&-1)|0,n,o,123416);A=64928+(b*688&-1)|0;if((c[A>>2]|0)!=0){fn(A,c[3524]|0)}do{if((a[54017]|0)==104){A=c[3524]|0;E=(c[13530]|0)-(c[A+16>>2]|0)|0;q=65032+(b*688&-1)|0;l=c[q>>2]|0;do{if((l|0)==0){G=0}else{if((cO[c[A+72>>2]&255](l)|0)==0){G=0;break}G=c[q>>2]|0}}while(0);q=E+((r|0)>0?-r|0:0)|0;l=(G|0)!=0;if((a[65272+(b*688&-1)|0]&1)==0){H=l&1^1}else{H=c[65128+(b*688&-1)>>2]|0}ln((c[n>>2]|0)+x|0,(c[o>>2]|0)+((q|0)<0?0:q)|0,F,H,1,G,c[64924+(b*688&-1)>>2]|0);if(!l){break}l=c[(c[3524]|0)+72>>2]|0;cO[l&255](0)}else{if((a[65272+(b*688&-1)|0]&1)==0){I=0}else{I=c[65128+(b*688&-1)>>2]|0}ln((((c[13529]|0)+((r|0)>0?r:0)|0)+(c[(c[3524]|0)+20>>2]|0)|0)+(c[n>>2]|0)|0,(c[o>>2]|0)+w|0,F,I,1,0,c[64924+(b*688&-1)>>2]|0)}}while(0);l=k;c[l>>2]=c[14084];c[l+4>>2]=c[56340>>2];c[l+8>>2]=c[56344>>2];c[l+12>>2]=c[56348>>2];l=c[14075]|0;do{if((c[14074]|0)!=0){t=+h[7040];q=c[(c[3524]|0)+92>>2]|0;if(t<0.0){cK[q&63](+h[3817]);break}else{cK[q&63](t);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);q=c[(c[3524]|0)+64>>2]|0;if((l|0)<-5){cM[q&511](-2)}else{cM[q&511](l)}q=c[3524]|0;if((a[56328]&1)==0){if((c[q+96>>2]&1024|0)!=0){break}c[k>>2]=1;c[k+4>>2]=l}fn(k,q)}}while(0);if((c[16745]&4|0)==0){i=j;return}if((a[54017]|0)==104){k=c[13531]|0;J=k+r|0;K=x;L=k;M=z}else{z=c[13528]|0;J=w;K=z-r|0;L=y;M=z}cN[c[(c[3524]|0)+56>>2]&255](M,L);cN[c[(c[3524]|0)+60>>2]&255](K,J);i=j;return}function dD(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ab=0.0,ac=0.0,ad=0.0,ae=0.0,af=0.0,ag=0.0,ah=0.0,ai=0.0,aj=0.0,ak=0.0,al=0.0,am=0.0,an=0.0,ao=0.0,ap=0.0,aq=0.0,ar=0.0,as=0.0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aJ=0,aK=0.0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0.0,aW=0.0,aX=0,aY=0,aZ=0,a_=0.0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0;d=i;i=i+304|0;e=d|0;f=d+16|0;g=d+32|0;j=d+48|0;k=d+64|0;l=d+80|0;m=d+128|0;n=d+136|0;o=d+144|0;p=d+152|0;q=d+160|0;r=d+168|0;s=d+176|0;t=d+184|0;u=d+192|0;w=d+232|0;x=d+272|0;y=d+280|0;z=d+288|0;A=d+296|0;B=c[10028]|0;C=a[54016]|0;if(C<<24>>24==110){i=d;return}D=c[3524]|0;if((c[D+148>>2]|0)==0){i=d;return}do{if(C<<24>>24==117){do{if((a[37384]&1)==0){fR(54032,o,p,106096);c[13528]=~~+h[o>>3];c[13530]=~~+h[p>>3];fN(54072,q,r,106096);E=~~+h[q>>3];c[13529]=E;F=~~+h[r>>3];c[13531]=F;G=E;H=F}else{if((c[5094]|0)==0){F=D+8|0;c[13528]=~~(+h[6756]*+((c[F>>2]|0)>>>0>>>0)+.5);E=D+12|0;c[13530]=~~(+h[6757]*+((c[E>>2]|0)>>>0>>>0)+.5);I=~~(+h[6761]*+(((c[F>>2]|0)-1|0)>>>0>>>0)+.5);c[13529]=I;F=~~(+h[6762]*+(((c[E>>2]|0)-1|0)>>>0>>>0)+.5);c[13531]=F;G=I;H=F;break}else{fK(54032,s,t,106096);c[13528]=~~+h[s>>3];c[13530]=~~+h[t>>3];fx(54072,54116,54124,106096);G=c[13529]|0;H=c[13531]|0;break}}}while(0);F=c[13528]|0;I=G+F|0;c[13529]=I;E=c[13530]|0;J=H+E|0;c[13531]=J;K=E;L=J;M=F;N=I}else{do{if((b|0)!=2|(c[5094]|0)!=0){if((a[37384]&1)==0){uE(u|0,0,40);c[u>>2]=2;c[u+4>>2]=2;c[u+8>>2]=2;h[u+16>>3]=1.025;uE(w|0,0,40);c[w>>2]=2;c[w+4>>2]=2;c[w+8>>2]=2;h[w+16>>3]=.05;h[w+24>>3]=1.0;fR(u,m,n,106096);I=~~+h[m>>3];c[13530]=~~+h[n>>3];c[13528]=I+(c[13507]|0);fN(w,x,y,106096);I=c[13528]|0;F=~~(+h[x>>3]+ +(I|0));c[13529]=F;J=c[13530]|0;E=~~(+h[y>>3]+ +(J|0));c[13531]=E;O=J;P=E;Q=I;R=F;break}else{F=c[200]|0;S=+h[64672+(F*688&-1)>>3];T=+h[64664+(F*688&-1)>>3];U=S-T;F=c[144]|0;V=+h[64664+(F*688&-1)>>3];W=+h[91];X=+h[96];Y=(S+U*.025-T)*W+X+-1.0;Z=+h[21];_=+h[68];$=(V-V)*Z+_+-1.0;aa=+h[5279];ab=+h[2];ac=+h[12];ad=(+h[7076]-aa)*ab+ac+-1.0;ae=+h[403];af=+h[391];ag=+h[395];ah=+h[399];ai=+h[404];aj=+h[392];ak=+h[396];al=+h[400];am=+h[406];an=+h[394];ao=+h[398];ap=+h[402];aq=am+Y*an+$*ao+ad*ap;ar=aq==0.0?1.0e-5:aq;aq=+(c[180]|0);I=c[186]|0;E=~~((ae+Y*af+$*ag+ad*ah)/ar*aq)+I|0;as=+(c[40]|0);J=c[46]|0;at=~~((ai+Y*aj+$*ak+ad*al)/ar*as)+J|0;c[13528]=E;c[13530]=at;ar=(U*.075+S-T)*W+X+-1.0;X=(+h[64672+(F*688&-1)>>3]-V)*Z+_+-1.0;_=(+h[6915]-aa)*ab+ac+-1.0;ac=am+ar*an+X*ao+_*ap;ap=ac==0.0?1.0e-5:ac;F=~~((ae+ar*af+X*ag+_*ah)/ap*aq)+I|0;I=~~((ai+ar*aj+X*ak+_*al)/ap*as)+J|0;c[13529]=F;c[13531]=I;O=at;P=I;Q=E;R=F;break}}else{as=+(c[186]|0);ap=+(c[180]|0);F=~~(as+ap*.709);c[13528]=F;E=~~(as+ap*.778);c[13529]=E;ap=+(c[46]|0);as=+(c[40]|0);I=~~(ap-as*.147);c[13530]=I;at=~~(ap+as*.497);c[13531]=at;O=I;P=at;Q=F;R=E}}while(0);if((a[54017]|0)!=118){K=O;L=P;M=Q;N=R;break}as=+((c[(c[3524]|0)+28>>2]|0)>>>0>>>0);E=~~(+h[8390]*((a[67136]&1)!=0?-1.0:1.0)*as);F=c[144]|0;at=~~(as*+h[65056+(F*688&-1)>>3]*((a[65072+(F*688&-1)|0]&1)!=0?-1.0:1.0));do{if((E|0)>0){if((c[16745]&4|0)==0){au=Q;av=R;break}F=Q+E|0;c[13528]=F;I=R+E|0;c[13529]=I;au=F;av=I}else{au=Q;av=R}}while(0);if((at|0)<=0){K=O;L=P;M=au;N=av;break}if((c[16401]&4|0)==0){K=O;L=P;M=au;N=av;break}E=au+at|0;c[13528]=E;I=av+at|0;c[13529]=I;K=O;L=P;M=E;N=I}}while(0);if((K|0)>(L|0)){c[13531]=K;c[13530]=L;aw=L;ax=K}else{aw=K;ax=L}if((c[(c[3524]|0)+96>>2]&16|0)==0){if((a[54017]|0)==118){L=l+36|0;c[L>>2]=M;K=l|0;c[K>>2]=M;P=l+24|0;c[P>>2]=N;O=l+12|0;c[O>>2]=N;ay=ax-aw|0;az=ax;aA=aw;aB=l+16|0;aC=l+4|0;aD=l+40|0;aE=l+28|0;aF=L;aG=K;aH=P;aJ=O}else{O=l+16|0;c[O>>2]=aw;P=l+4|0;c[P>>2]=aw;K=l+40|0;c[K>>2]=ax;L=l+28|0;c[L>>2]=ax;ay=N-M|0;az=N;aA=M;aB=O;aC=P;aD=K;aE=L;aF=l+36|0;aG=l|0;aH=l+24|0;aJ=l+12|0}as=+(ay|0)*.0078125;ap=+(az-aA|0);ay=1-aA|0;L=l+8|0;K=l|0;l=k|0;P=k+8|0;O=k+4|0;av=aA;au=0;R=0;while(1){Q=~~(as*+(R+1|0))+aA|0;al=+(ay+av|0)/ap;if((a[20668]|0)==110){aK=1.0-al}else{aK=al}y=(c[3524]|0)+144|0;if((c[y>>2]|0)!=0){c[l>>2]=5;h[P>>3]=aK;c[O>>2]=0;cM[c[y>>2]&511](k)}L1909:do{if((c[5163]|0)==100){y=c[5172]|0;x=c[5173]|0;w=au;n=au;while(1){if((w|0)>=(y|0)){aL=R;aM=n;aN=Q;break L1909}aO=~~(ap*+h[x+(w<<5)>>3])+aA|0;if((av|0)<(aO|0)){if((Q|0)>(aO|0)){break}else{aP=n}}else{aP=w}if((Q|0)<(aO|0)){aL=R;aM=aP;aN=Q;break L1909}else{w=w+1|0;n=aP}}aL=R-1|0;aM=n;aN=aO}else{aL=R;aM=au;aN=Q}}while(0);if((a[54017]|0)==118){c[aB>>2]=av;c[aC>>2]=av;Q=aN+1|0;at=(az|0)<(Q|0)?az:Q;c[aD>>2]=at;c[aE>>2]=at}else{c[aF>>2]=av;c[aG>>2]=av;at=aN+1|0;Q=(az|0)<(at|0)?az:at;c[aH>>2]=Q;c[aJ>>2]=Q}Q=c[12372]|0;if((Q|0)==0){aQ=1601}else if((Q|0)==1|(Q|0)==4){aR=(c[12373]<<4&65520)+Q|0;aS=1421}else if((Q|0)==2|(Q|0)==5){aR=(c[12374]<<4&65520)+Q|0;aS=1421}else{aR=0;aS=1421}if((aS|0)==1421){aS=0;aQ=aR}c[L>>2]=aQ;cN[c[(c[3524]|0)+148>>2]&255](4,K);Q=aL+1|0;if((Q|0)<128){av=aN;au=aM;R=Q}else{break}}}else{aI(92952,104,1,B|0);R=c[13530]|0;cf(B|0,85112,(v=i,i=i+32|0,c[v>>2]=c[13528],c[v+8>>2]=R,c[v+16>>2]=N-M,c[v+24>>2]=ax-aw,v)|0);aI(76928,42,1,B|0);if((a[20668]|0)==110){aI(224696,19,1,B|0)}else{aI(217376,7,1,B|0)}if((a[54017]|0)==118){aI(211744,30,1,B|0)}else{aI(205632,30,1,B|0)}aI(202264,85,1,B|0)}do{if((a[54018]|0)!=0){B=c[13505]|0;do{if((B|0)>-1){aw=c[14074]|0;ap=+h[7039];aK=+h[7040];ax=a[56328]|0;as=+h[7043];M=43280;while(1){aT=c[M>>2]|0;if((aT|0)==0){aS=1429;break}if((c[aT+4>>2]|0)==(B|0)){aS=1428;break}else{M=aT|0}}L1952:do{if((aS|0)==1428){M=c[aT+12>>2]|0;n=a[aT+40|0]|0;N=(n&1)==0;aU=M;aV=+h[aT+24>>3];aW=+h[aT+32>>3];aX=n;aY=N?1:c[aT+48>>2]|0;aZ=N?M:c[aT+52>>2]|0;a_=+h[aT+56>>3]}else if((aS|0)==1429){M=c[8798]|0;N=(M|0)>0;n=B;L1955:while(1){R=43264;while(1){a$=c[R>>2]|0;if((a$|0)==0){break}if((c[a$+4>>2]|0)==(n|0)){break L1955}else{R=a$|0}}R=n-1|0;if(!((n|0)>(M|0)&N)){aU=R;aV=ap;aW=aK;aX=ax;aY=1;aZ=R;a_=as;break L1952}n=((R|0)%(M|0)&-1)+1|0}M=c[a$+12>>2]|0;al=+h[a$+24>>3];_=+h[a$+32>>3];N=a[a$+40|0]|0;R=c[a$+48>>2]|0;aM=c[a$+52>>2]|0;ak=+h[a$+56>>3];if((c[(c[3524]|0)+96>>2]&1024|0)!=0){aU=n;aV=al;aW=_;aX=0;aY=R;aZ=aM;a_=ak;break}au=(N&1)==0;aU=M;aV=al;aW=_;aX=N;aY=au?1:R;aZ=au?M:aM;a_=ak}}while(0);ax=j|0;c[ax>>2]=aY;aM=j+4|0;c[aM>>2]=aZ;h[j+8>>3]=a_;do{if((aw|0)!=0){M=c[(c[3524]|0)+92>>2]|0;if(aW<0.0){cK[M&63](+h[3817]);break}else{cK[M&63](aW);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](aV);aw=c[(c[3524]|0)+64>>2]|0;if((aU|0)<-5){cM[aw&511](-2)}else{cM[aw&511](aU)}aw=c[3524]|0;if((aX&1)==0){if((c[aw+96>>2]&1024|0)!=0){break}c[ax>>2]=1;c[aM>>2]=aU}fn(j,aw)}else{aw=g;c[aw>>2]=c[14084];c[aw+4>>2]=c[56340>>2];c[aw+8>>2]=c[56344>>2];c[aw+12>>2]=c[56348>>2];aw=c[14075]|0;do{if((c[14074]|0)!=0){as=+h[7040];M=c[(c[3524]|0)+92>>2]|0;if(as<0.0){cK[M&63](+h[3817]);break}else{cK[M&63](as);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);aM=c[(c[3524]|0)+64>>2]|0;if((aw|0)<-5){cM[aM&511](-2)}else{cM[aM&511](aw)}aM=c[3524]|0;if((a[56328]&1)==0){if((c[aM+96>>2]&1024|0)!=0){break}c[g>>2]=1;c[g+4>>2]=aw}fn(g,aM)}}while(0);B=c[3524]|0;aM=c[B+172>>2]|0;if((aM|0)==0){a0=B}else{cM[aM&511](0);a0=c[3524]|0}cN[c[a0+56>>2]&255](c[13528]|0,c[13530]|0);cN[c[(c[3524]|0)+60>>2]&255](c[13529]|0,c[13530]|0);cN[c[(c[3524]|0)+60>>2]&255](c[13529]|0,c[13531]|0);cN[c[(c[3524]|0)+60>>2]&255](c[13528]|0,c[13531]|0);cN[c[(c[3524]|0)+60>>2]&255](c[13528]|0,c[13530]|0);aM=c[(c[3524]|0)+172>>2]|0;if((aM|0)!=0){cM[aM&511](1)}aM=f;c[aM>>2]=c[14084];c[aM+4>>2]=c[56340>>2];c[aM+8>>2]=c[56344>>2];c[aM+12>>2]=c[56348>>2];aM=c[14075]|0;do{if((c[14074]|0)!=0){as=+h[7040];B=c[(c[3524]|0)+92>>2]|0;if(as<0.0){cK[B&63](+h[3817]);break}else{cK[B&63](as);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);B=c[(c[3524]|0)+64>>2]|0;if((aM|0)<-5){cM[B&511](-2)}else{cM[B&511](aM)}B=c[3524]|0;if((a[56328]&1)==0){if((c[B+96>>2]&1024|0)!=0){break}c[f>>2]=1;c[f+4>>2]=aM}fn(f,B)}}while(0);if((c[16745]|0)!=0){f=e;c[f>>2]=c[14084];c[f+4>>2]=c[56340>>2];c[f+8>>2]=c[56344>>2];c[f+12>>2]=c[56348>>2];f=c[14075]|0;do{if((c[14074]|0)!=0){aV=+h[7040];a0=c[(c[3524]|0)+92>>2]|0;if(aV<0.0){cK[a0&63](+h[3817]);break}else{cK[a0&63](aV);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);a0=c[(c[3524]|0)+64>>2]|0;if((f|0)<-5){cM[a0&511](-2)}else{cM[a0&511](f)}a0=c[3524]|0;do{if((a[56328]&1)==0){if((c[a0+96>>2]&1024|0)!=0){break}c[e>>2]=1;c[e+4>>2]=f;aS=1485}else{aS=1485}}while(0);if((aS|0)==1485){fn(e,a0)}de(3,8)}if((c[16801]|0)==0){i=d;return}fn(67216,c[3524]|0);aV=+h[8390];a0=(a[67136]&1)!=0;do{if((a[54017]|0)==104){e=~~(aV*(a0?1.0:-1.0)*+((c[(c[3524]|0)+24>>2]|0)>>>0>>>0));fx(67288,z,A,98672);aS=(c[z>>2]|0)+(((c[13529]|0)+(c[13528]|0)|0)/2&-1)|0;c[z>>2]=aS;f=~~(+(c[A>>2]|0)+(+(c[13530]|0)+ +((c[(c[3524]|0)+16>>2]|0)>>>0>>>0)*-2.7))+((e|0)<0?e:0)|0;c[A>>2]=f;if((aS|0)<0){c[z>>2]=0;a1=0}else{a1=aS}if((f|0)<0){c[A>>2]=0;a2=0}else{a2=f}ln(a1,a2,c[16801]|0,1,1,0,c[16802]|0)}else{f=~~(aV*(a0?-1.0:1.0)*+((c[(c[3524]|0)+28>>2]|0)>>>0>>>0));c[216]=0;if((c[16745]&1|0)!=0){c[216]=0;de(3,14)}fx(67288,z,A,98672);aS=c[3524]|0;e=~~(+(c[z>>2]|0)+(+(c[13529]|0)+(+(c[216]|0)+1.5)*+((c[aS+20>>2]|0)>>>0>>>0)))+((f|0)>0?f:0)|0;c[z>>2]=e;f=(c[A>>2]|0)+(((c[13531]|0)+(c[13530]|0)|0)/2&-1)|0;c[A>>2]=f;if((e|0)<0){c[z>>2]=0;a3=0}else{a3=e}if((f|0)<0){c[A>>2]=0;a4=0}else{a4=f}f=(cO[c[aS+72>>2]&255](c[16799]|0)|0)==0;aS=c[16801]|0;if(f){ln(a3,a4,aS,0,0,0,c[16802]|0);break}else{ln(a3,a4,aS,1,0,c[16799]|0,c[16802]|0);aS=c[(c[3524]|0)+72>>2]|0;cO[aS&255](0);break}}}while(0);if((c[16804]|0)==0){i=d;return}cM[c[(c[3524]|0)+64>>2]&511](-2);i=d;return}function dE(){c[13544]=(c[13544]|0)+1;c[13898]=(c[13898]|0)+1;return}function dF(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,p=0,q=0;c[12906]=b;do{if((d|0)==0){if((a[37400]&1)!=0){e=b;f=0;break}c[8272]=0;c[13898]=0;a[c[10036]|0]=0;e=b;f=0}else{e=b;f=d}}while(0);L2054:while(1){d=(c[10036]|0)+f|0;b=(c[10034]|0)-f|0;if((a[37400]&1)!=0){g=c[m>>2]|0;aK(e|0,g|0)}if((a6(d|0,b|0,c[o>>2]|0)|0)==0){h=1518;break}b=c[10036]|0;d=uA(b|0)|0;g=d-1|0;if((g|0)<=-1){break}i=b+g|0;b=a[i]|0;do{if(b<<24>>24==10){a[i]=0;do{if((g|0)>0){j=d-2|0;k=(c[10036]|0)+j|0;if((a[k]|0)!=13){l=g;break}a[k]=0;l=j}else{l=g}}while(0);j=(((l|0)>0)<<31>>31)+l|0;n=j;p=a[(c[10036]|0)+j|0]|0}else{if((d+1|0)>>>0<(c[10034]|0)>>>0){n=g;p=b;break}dG();e=138304;f=d;continue L2054}}while(0);d=p<<24>>24==92;if(d){e=138304;f=d?n:f}else{q=0;h=1533;break}}if((h|0)==1533){return q|0}do{if((h|0)==1518){if((a[37400]&1)!=0){n=c[m>>2]|0;aF(10,n|0)}a[(c[10036]|0)+f|0]=0;c[9354]=(c[9354]|0)+1;if((f|0)>0&(c[12918]|0)==0){break}else{q=1}return q|0}}while(0);q=0;return q|0}function dG(){var b=0,d=0,e=0,f=0;b=i;d=c[10034]|0;if((d|0)!=0){c[10036]=db(c[10036]|0,d+1024|0,216480)|0;c[10034]=(c[10034]|0)+1024;i=b;return}d=ut(1024)|0;do{if((d|0)==0){gk();e=ut(1024)|0;if((e|0)!=0){f=e;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=209632,v)|0)}else{f=d}}while(0);c[10036]=f;c[10034]=1024;a[f]=0;i=b;return}function dH(){var a=0,b=0,d=0,e=0;a=i;b=c[1052]|0;if((b|0)!=0){d=db(c[1054]|0,(b*40&-1)+16e3|0,136360)|0;c[1054]=d;uE(d+((c[1052]|0)*40&-1)|0,0,16e3);c[1052]=(c[1052]|0)+400;i=a;return}d=ut(16e3)|0;do{if((d|0)==0){gk();b=ut(16e3)|0;if((b|0)!=0){e=b;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=163112,v)|0)}else{e=d}}while(0);c[1054]=e;c[1052]=400;uE(e|0,0,16e3);i=a;return}function dI(){var b=0,d=0,e=0;b=i;do{if((a[33512]&1)==0){if((dF(105808,0)|0)==0){break}else{d=1}i=b;return d|0}else{do{if((a[14080]&1)!=0){do{if((a[37400]&1)!=0){e=c[(c[3524]|0)+96>>2]|0;if((e&1|0)!=0){break}if((c[10030]|0)!=(c[n>>2]|0)){if((e&2|0)==0){break}}lm();if((c[(c[3524]|0)+96>>2]&2|0)==0){uf(-1,100528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{uf(-1,101160,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}}while(0);if(a[13032]|0){break}e=c[(c[3524]|0)+100>>2]|0;if((e|0)==0){break}cS[e&511]();a[13032]=1}}while(0);if((dF(123048,0)|0)==0){break}else{d=1}i=b;return d|0}}while(0);a[25280]=a[37400]&1;d=(dJ()|0)!=0&1;i=b;return d|0}function dJ(){var b=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0,z=0,A=0,B=0;b=i;do{if((a[43472]&1)!=0){if((dK()|0)==0){break}if((dK()|0)==0){break}if((dK()|0)==0){break}if((dK()|0)==0){break}uf(-1,98448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);e=c[10036]|0;while(1){if((aM(d[e]|0|0)|0)==0){break}else{e=e+1|0}}do{if((a8(e|0,35)|0)!=0){f=jl(40144,40136)|0;c[8272]=f;g=(c[10036]|0)+(c[(c[1054]|0)+(f*40&-1)+32>>2]|0)|0;if((a[g]|0)!=35){break}a[g]=0}}while(0);g=c[10036]|0;if((e|0)==(g|0)){h=e}else{uH(g|0,e|0,uA(e|0)|0);g=uA(e|0)|0;a[(c[10036]|0)+g|0]=0;h=c[10036]|0}if((a[h]|0)==33){g=h+1|0;if((g|0)==0){j=0;i=b;return j|0}if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}bN(g|0);j=0;i=b;return j|0}c[9368]=0;g=jl(40144,40136)|0;c[8272]=g;h=c[12918]|0;if((h|0)<0){uf(-1,211816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}do{if((h|0)>0){while(1){if((a[37400]&1)==0){if((a[33232]&1)==0){k=1600;break}}e=c[10036]|0;f=e+(uA(e|0)|0)|0;w=59;a[f]=w&255;w=w>>8;a[f+1|0]=w&255;if((dF(76720,uA(c[10036]|0)|0)|0)!=0){k=1597;break}f=jl(40144,40136)|0;c[8272]=f;e=(c[10036]|0)+(c[(c[1054]|0)+(f*40&-1)+32>>2]|0)|0;if((a[e]|0)==35){a[e]=0}if((c[12918]|0)<=0){k=1601;break}}if((k|0)==1597){uf(-1,224544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((k|0)==1600){uf(-1,224544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((k|0)==1601){l=c[8272]|0;break}}else{l=g}}while(0);c[13898]=0;if((l|0)>0){m=0}else{j=0;i=b;return j|0}L2171:while(1){a[55600]=0;a[55651]=0;a[55702]=0;a[55753]=0;a[55804]=0;a[55855]=0;a[55906]=0;a[55957]=0;a[56008]=0;a[56059]=0;a[56110]=0;a[56161]=0;if((t9(m)|0)==0){l=c[13898]|0;g=c[1054]|0;h=c[g+(l*40&-1)+36>>2]|0;e=c[g+(l*40&-1)+32>>2]|0;f=(a[g+(l*40&-1)|0]&1)==0;l=(h|0)>0;g=c[10036]|0;n=53600;o=133488;L2176:while(1){L2178:do{if(!f){if(l){p=0;q=0;r=e;while(1){s=a[o+p|0]|0;if(s<<24>>24==(a[g+(p+r|0)|0]|0)){t=r;u=q}else{if(s<<24>>24!=36){break L2178}t=r-1|0;u=1}x=p+1|0;if((x|0)<(u+h|0)){p=x;q=u;r=t}else{break}}if((u|0)==0){y=x}else{z=n;break L2176}}else{y=0}r=a[o+y|0]|0;if((r<<24>>24|0)==36|(r<<24>>24|0)==0){z=n;break L2176}}}while(0);r=n+8|0;q=c[r>>2]|0;if((q|0)==0){z=r;break}else{n=r;o=q}}cS[c[z+4>>2]&511]()}else{dT()}if((c[13484]|0)!=0){k=1617;break}A=c[13898]|0;o=c[8272]|0;L2193:do{if((A|0)<(o|0)){n=c[1054]|0;h=(a[n+(A*40&-1)|0]&1)==0;if(h){k=1649;break L2171}g=c[n+(A*40&-1)+36>>2]|0;e=n+(A*40&-1)+32|0;l=c[10036]|0;f=0;while(1){if((f|0)>=(g|0)){k=1623;break}if((a[l+((c[e>>2]|0)+f|0)|0]|0)==(a[f+103664|0]|0)){f=f+1|0}else{break}}do{if((k|0)==1623){k=0;if((f|0)!=1){break}e=A+1|0;c[13898]=e;B=e;break L2193}}while(0);if(h){k=1651;break L2171}f=c[n+(A*40&-1)+36>>2]|0;e=n+(A*40&-1)+32|0;l=c[10036]|0;g=0;while(1){if((g|0)>=(f|0)){k=1630;break}if((a[l+((c[e>>2]|0)+g|0)|0]|0)==(a[g+126728|0]|0)){g=g+1|0}else{break}}do{if((k|0)==1630){k=0;if((g|0)!=1){break}c[13544]=(c[13544]|0)+1;e=A+1|0;c[13898]=e;B=e;break L2193}}while(0);if(h){k=1647;break L2171}g=c[n+(A*40&-1)+36>>2]|0;e=n+(A*40&-1)+32|0;l=c[10036]|0;f=0;while(1){if((f|0)>=(g|0)){break}if((a[l+((c[e>>2]|0)+f|0)|0]|0)==(a[f+125616|0]|0)){f=f+1|0}else{k=1650;break L2171}}if((f|0)!=1){k=1648;break L2171}e=c[13544]|0;if((e|0)==0){k=1638;break L2171}c[13544]=e-1;e=A+1|0;c[13898]=e;B=e}else{B=A}}while(0);if((B|0)<(o|0)){m=B}else{j=0;k=1646;break}}if((k|0)==1646){i=b;return j|0}else if((k|0)==1647){uf(A,205408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((k|0)==1648){uf(A,205408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((k|0)==1649){uf(A,205408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((k|0)==1638){uf(A,103896,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((k|0)==1617){c[13484]=0;j=1;i=b;return j|0}else if((k|0)==1650){uf(A,205408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((k|0)==1651){uf(A,205408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}return 0}function dK(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;b=i;if((a8(c[10036]|0,64)|0)==0){d=0;i=b;return d|0}e=c[10034]|0;f=ut(e)|0;do{if((f|0)==0){gk();g=ut(e)|0;if((g|0)!=0){h=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=222744,v)|0);return 0}else{h=f}}while(0);f=c[10036]|0;e=uA(f|0)|0;g=c[10034]|0;j=e>>>0>>0?e:g-1|0;uF(h|0,f|0,j|0);a[h+j|0]=0;L2237:do{if((j|0)==0|(h|0)==0){k=0;l=0}else{f=0;g=0;e=j;m=0;n=0;o=h;p=0;q=0;while(1){r=a[o]|0;if(r<<24>>24==0){k=m;l=n;break L2237}s=r<<24>>24;L2241:do{if((s|0)==64){do{if(q|p|g){t=r}else{u=o+1|0;if((bO(a[u]|0|0)|0)==0){t=a[o]|0;break}else{w=u}while(1){if((bs(a[w]|0|0)|0)==0){x=a[w]|0;if(x<<24>>24!=95){break}}w=w+1|0}a[w]=0;y=e6(u)|0;do{if((y|0)==0){z=1671}else{if((c[y+16>>2]|0)!=3){z=1671;break}A=n+1|0;B=c[y+24>>2]|0;C=m+e|0;D=C+(uA(B|0)|0)|0;if(D>>>0>(c[10034]|0)>>>0){do{dG();D=C+(uA(B|0)|0)|0;}while(D>>>0>(c[10034]|0)>>>0)}C=a[B]|0;if(C<<24>>24==0){E=A;F=m;break}else{G=m;H=B;I=C}while(1){C=H+1|0;D=G+1|0;a[(c[10036]|0)+G|0]=I;J=a[C]|0;if(J<<24>>24==0){E=A;F=D;break}else{G=D;H=C;I=J}}}}while(0);if((z|0)==1671){z=0;uh(-1,221968,(v=i,i=i+8|0,c[v>>2]=u,v)|0);E=n;F=m}a[w]=x;K=0;L=0;M=w-1|0;N=E;O=F;P=0;Q=0;break L2241}}while(0);a[(c[10036]|0)+m|0]=t;K=q;L=p;M=o;N=n;O=m+1|0;P=g;Q=0}else if((s|0)==34){a[(c[10036]|0)+m|0]=r;K=q;L=p^(f^1);M=o;N=n;O=m+1|0;P=g;Q=0}else if((s|0)==39){a[(c[10036]|0)+m|0]=r;K=q^1;L=p;M=o;N=n;O=m+1|0;P=g;Q=0}else if((s|0)==92){a[(c[10036]|0)+m|0]=r;K=q;L=p;M=o;N=n;O=m+1|0;P=g;Q=f^p}else if((s|0)==35){if(q){R=g;z=1679;break}R=g|p^1;z=1679}else{R=g;z=1679}}while(0);if((z|0)==1679){z=0;a[(c[10036]|0)+m|0]=r;K=q;L=p;M=o;N=n;O=m+1|0;P=R;Q=0}s=M+1|0;y=e-1|0;if((y|0)==0|(s|0)==0){k=O;l=N;break}else{f=Q;g=P;e=y;m=O;n=N;o=s;p=L;q=K}}}}while(0);a[(c[10036]|0)+k|0]=0;uu(h);d=l;i=b;return d|0}function dL(b){b=b|0;var d=0,e=0;d=i;if((c[8501]|0)!=0){e=c[m>>2]|0;cf(e|0,154696,(v=i,i=i+8|0,c[v>>2]=b,v)|0)}hx(0,0,b);e=c[10034]|0;if(e>>>0<((uA(b|0)|0)+1|0)>>>0){do{dG();e=c[10034]|0;}while(e>>>0<((uA(b|0)|0)+1|0)>>>0)}uB(c[10036]|0,b|0);a[25280]=0;c[13484]=dJ()|0;hy();i=d;return}function dM(b){b=b|0;var d=0,e=0;d=i;if((b|0)==0){e=0}else{e=bP(b|0)|0}dL(e);if((a[872]&1)!=0&(c[6928]|0)!=0){if((c[8501]|0)!=0){e=c[m>>2]|0;aI(196688,8,1,e|0)}dO();i=d;return}if((a[27704]&1)==0){dP();i=d;return}else{uh(-1,185416,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=d;return}}function dN(){var a=0,b=0;a=i;b=c[13544]|0;if((b|0)==0){uf(c[13898]|0,103896,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[13544]=b-1;c[13898]=(c[13898]|0)+1;i=a;return}}function dO(){var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0;b=i;d=c[10814]|0;e=c[6928]|0;if((d|0)==0&(e|0)==2){uf(-1,87408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=c[10828]|0;if((f|0)==0&(e|0)==3){uf(-1,87408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((e|0)==0){uh(-1,86328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);dP();i=b;return}g=c[16507]|0;c[16506]=g;do{if((g&1|0)==0){j=+h[8257];if((a[66164]&1)==0){k=j;break}l=+_(+j);k=l/+h[8272]}else{k=8.988465674311578e+304}}while(0);h[8255]=k;m=a[66164]|0;do{if((g&2|0)==0){k=+h[8258];if((m&1)==0){n=k;break}l=+_(+k);n=l/+h[8272]}else{n=-8.988465674311578e+304}}while(0);h[8256]=n;if((m&1)==0){o=0.0}else{o=+_(+(+h[8271]))}h[8272]=o;m=c[16335]|0;c[16334]=m;do{if((m&1|0)==0){o=+h[8171];if((a[65476]&1)==0){p=o;break}n=+_(+o);p=n/+h[8186]}else{p=8.988465674311578e+304}}while(0);h[8169]=p;g=a[65476]|0;do{if((m&2|0)==0){p=+h[8172];if((g&1)==0){q=p;break}n=+_(+p);q=n/+h[8186]}else{q=-8.988465674311578e+304}}while(0);h[8170]=q;if((g&1)==0){r=0.0}else{r=+_(+(+h[8185]))}h[8186]=r;g=c[17195]|0;c[17194]=g;do{if((g&1|0)==0){r=+h[8601];if((a[68916]&1)==0){s=r;break}q=+_(+r);s=q/+h[8616]}else{s=8.988465674311578e+304}}while(0);h[8599]=s;m=a[68916]|0;do{if((g&2|0)==0){s=+h[8602];if((m&1)==0){t=s;break}q=+_(+s);t=q/+h[8616]}else{t=-8.988465674311578e+304}}while(0);h[8600]=t;if((m&1)==0){u=0.0}else{u=+_(+(+h[8615]))}h[8616]=u;m=c[17023]|0;c[17022]=m;do{if((m&1|0)==0){u=+h[8515];if((a[68228]&1)==0){w=u;break}t=+_(+u);w=t/+h[8530]}else{w=8.988465674311578e+304}}while(0);h[8513]=w;g=a[68228]|0;do{if((m&2|0)==0){w=+h[8516];if((g&1)==0){x=w;break}t=+_(+w);x=t/+h[8530]}else{x=-8.988465674311578e+304}}while(0);h[8514]=x;if((g&1)==0){y=0.0}else{y=+_(+(+h[8529]))}h[8530]=y;g=c[17539]|0;if((g&1|0)==0){y=+h[8773];if((a[70292]&1)==0){z=y}else{x=+_(+y);z=x/+h[8788]}h[8771]=z}if((g&2|0)==0){z=+h[8774];if((a[70292]&1)==0){A=z}else{x=+_(+z);A=x/+h[8788]}h[8772]=A}g=c[17367]|0;if((g&1|0)==0){A=+h[8687];if((a[69604]&1)==0){B=A}else{x=+_(+A);B=x/+h[8702]}h[8685]=B}if((g&2|0)==0){B=+h[8688];if((a[69604]&1)==0){C=B}else{x=+_(+B);C=x/+h[8702]}h[8686]=C}g=c[16163]|0;if((g&1|0)==0){C=+h[8085];if((a[64788]&1)==0){D=C}else{x=+_(+C);D=x/+h[8100]}h[8083]=D}if((g&2|0)==0){D=+h[8086];if((a[64788]&1)==0){E=D}else{x=+_(+D);E=x/+h[8100]}h[8084]=E}g=c[16679]|0;if((g&1|0)==0){E=+h[8343];if((a[66852]&1)==0){F=E}else{x=+_(+E);F=x/+h[8358]}h[8341]=F}if((g&2|0)==0){F=+h[8344];if((a[66852]&1)==0){G=F}else{x=+_(+F);G=x/+h[8358]}h[8342]=G}if((e|0)==2){iU(d,c[6930]|0)}else if((e|0)==3){i$(f,c[6930]|0)}if((c[16508]&2|0)!=0){G=+h[8256];h[8256]=+h[8255];h[8255]=G}if((c[16336]&2|0)!=0){G=+h[8170];h[8170]=+h[8169];h[8169]=G}if((c[17196]&2|0)!=0){G=+h[8600];h[8600]=+h[8599];h[8599]=G}if((c[17024]&2|0)!=0){G=+h[8514];h[8514]=+h[8513];h[8513]=G}f=c[6928]|0;if((f|0)==2){fS(c[10814]|0,c[6930]|0);i=b;return}else if((f|0)==3){fv(c[10828]|0,c[6930]|0,0);i=b;return}else{uf(-1,85504,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function dP(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0;b=i;d=c[13898]|0;e=c[8272]|0;f=(e|0)>(d|0);L2430:do{if(f){g=c[1054]|0;if((a[g+(d*40&-1)|0]&1)!=0){h=c[g+(d*40&-1)+36>>2]|0;j=g+(d*40&-1)+32|0;g=c[10036]|0;k=0;while(1){if((k|0)>=(h|0)){l=1801;break}if((a[g+((c[j>>2]|0)+k|0)|0]|0)==(a[k+78280|0]|0)){k=k+1|0}else{break}}do{if((l|0)==1801){if((k|0)!=1){break}uf(d,77152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if(!f){l=1804;break}}k=c[1054]|0;L2442:do{if((a[k+(d*40&-1)|0]&1)==0){m=k+(d*40&-1)+32|0}else{j=c[k+(d*40&-1)+36>>2]|0;g=k+(d*40&-1)+32|0;h=c[10036]|0;n=0;while(1){if((n|0)>=(j|0)){break}if((a[h+((c[g>>2]|0)+n|0)|0]|0)==(a[n+103664|0]|0)){n=n+1|0}else{m=g;break L2442}}if((n|0)==1){o=k;p=h;l=1811;break L2430}else{m=g}}}while(0);j=e-1|0;q=uA(c[6924]|0)|0;r=c[k+(j*40&-1)+32>>2]|0;s=c[k+(j*40&-1)+36>>2]|0;j=c[m>>2]|0;t=(((q+3|0)+r|0)+s|0)-j|0;q=s+r|0;r=db(0,(q+1|0)-j|0,116456)|0;j=c[(c[1054]|0)+(d*40&-1)+32>>2]|0;L2450:do{if((j|0)<(q|0)){s=j;u=r;while(1){w=a[(c[10036]|0)+s|0]|0;if(w<<24>>24==0){x=u;break L2450}y=u+1|0;a[u]=w;w=s+1|0;if((w|0)<(q|0)){s=w;u=y}else{x=y;break}}}else{x=r}}while(0);a[x]=0;if((c[10034]|0)>>>0>>0){do{dG();}while((c[10034]|0)>>>0>>0)}t=c[10036]|0;q=c[6924]|0;uB(t|0,q|0);q=c[10036]|0;t=q+(uA(q|0)|0)|0;a[t]=a[86120]|0;a[t+1|0]=a[86121|0]|0;a[t+2|0]=a[86122|0]|0;t=c[10036]|0;uC(t|0,r|0);uu(r)}else{l=1804}}while(0);if((l|0)==1804){o=c[1054]|0;p=c[10036]|0;l=1811}if((l|0)==1811){l=p+(c[o+(d*40&-1)+32>>2]|0)|0;d=uA(c[6924]|0)|0;o=uA(l|0)|0;x=o+1|0;uH(p|0,l|0,x|0);l=(d+1|0)+o|0;if((c[10034]|0)>>>0>>0){do{dG();}while((c[10034]|0)>>>0>>0)}l=c[10036]|0;uH(l+d|0,l|0,x|0);uD(c[10036]|0,c[6924]|0,d)}c[7738]=0;c[6928]=0;a[25280]=0;c[8272]=jl(40144,40136)|0;c[13898]=1;if((a[37384]&1)==0){iS();i=b;return}else{iZ();i=b;return}}function dQ(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;b=i;i=i+56|0;d=b|0;e=d|0;f=(c[13898]|0)+1|0;c[13898]=f;g=c[8272]|0;if((f|0)>=(g|0)){i=b;return}h=d|0;j=f;f=g;L2477:while(1){g=c[1054]|0;k=c[g+(j*40&-1)+36>>2]|0;L2479:do{if((a[g+(j*40&-1)|0]&1)==0){l=c[10036]|0;m=g+(j*40&-1)+32|0}else{n=g+(j*40&-1)+32|0;o=c[10036]|0;p=0;while(1){if((p|0)>=(k|0)){break}if((a[o+((c[n>>2]|0)+p|0)|0]|0)==(a[p+103664|0]|0)){p=p+1|0}else{l=o;m=n;break L2479}}if((p|0)==1){q=1848;break L2477}else{l=o;m=n}}}while(0);uD(e|0,l+(c[m>>2]|0)|0,(k|0)<49?k:49);a[d+((k|0)>49?49:k)|0]=0;r=j+1|0;L2487:do{if((f|0)>(r|0)){if((a[g+(r*40&-1)|0]&1)==0){s=0;t=j;break}u=c[g+(r*40&-1)+36>>2]|0;v=g+(r*40&-1)+32|0;w=0;while(1){if((w|0)>=(u|0)){break}if((a[l+((c[v>>2]|0)+w|0)|0]|0)==(a[w+134808|0]|0)){w=w+1|0}else{s=0;t=j;break L2487}}if((w|0)!=1){s=0;t=j;break}c[13898]=r;s=1;t=r}else{s=0;t=j}}while(0);do{if((a_(h|0,167320,6)|0)==0){x=t;y=f}else{if((a_(h|0,126208,6)|0)==0){x=t;y=f;break}e2(h,s);x=c[13898]|0;y=c[8272]|0}}while(0);r=x+1|0;c[13898]=r;if((r|0)<(y|0)){j=r;f=y}else{q=1847;break}}if((q|0)==1847){i=b;return}else if((q|0)==1848){i=b;return}}function dR(){dU(0);return}function dS(){dU(1);return}function dT(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;b=i;i=i+696|0;d=b|0;e=b+56|0;f=b+80|0;g=c[13898]|0;h=g+1|0;j=c[8272]|0;k=c[1054]|0;L2506:do{if((j|0)>(h|0)){if((a[k+(h*40&-1)|0]&1)==0){break}l=c[k+(h*40&-1)+36>>2]|0;m=k+(h*40&-1)+32|0;n=c[10036]|0;o=0;while(1){if((o|0)>=(l|0)){break}if((a[n+((c[m>>2]|0)+o|0)|0]|0)==(a[o+199040|0]|0)){o=o+1|0}else{break L2506}}if((o|0)!=1){break}uD(f|0,55600,612);m=0;l=g;L2514:while(1){p=l+2|0;c[13898]=p;q=c[k+(p*40&-1)+36>>2]|0;r=(q|0)>49?49:q;q=c[k+(p*40&-1)+32>>2]|0;s=0;while(1){t=s+1|0;a[55600+(m*51&-1)+s|0]=a[n+q|0]|0;if((t|0)==(r|0)){break}else{q=q+1|0;s=t}}u=m+1|0;a[55600+(m*51&-1)+r|0]=0;w=l+3|0;x=(j|0)>(w|0);if(!x){break}if((a[k+(w*40&-1)|0]&1)==0){y=1867;break}s=c[k+(w*40&-1)+36>>2]|0;q=k+(w*40&-1)+32|0;t=0;while(1){if((t|0)>=(s|0)){break}if((a[n+((c[q>>2]|0)+t|0)|0]|0)==(a[t+148464|0]|0)){t=t+1|0}else{y=1866;break L2514}}if((t|0)==1&(u|0)<12){m=u;l=p}else{y=1866;break}}if((y|0)==1866){if(x){y=1867}}L2527:do{if((y|0)==1867){if((a[k+(w*40&-1)|0]&1)==0){break}m=c[k+(w*40&-1)+36>>2]|0;o=k+(w*40&-1)+32|0;q=0;while(1){if((q|0)>=(m|0)){break}if((a[n+((c[o>>2]|0)+q|0)|0]|0)==(a[q+148464|0]|0)){q=q+1|0}else{break L2527}}if((q|0)!=1){break}uf(l+4|0,172072,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);o=l+5|0;c[13898]=o;if((o|0)>=(j|0)){uf(o,168144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}L2539:do{if((a[k+(o*40&-1)|0]&1)!=0){m=c[k+(o*40&-1)+36>>2]|0;p=k+(o*40&-1)+32|0;t=0;while(1){if((t|0)>=(m|0)){break}if((a[n+((c[p>>2]|0)+t|0)|0]|0)==(a[t+103664|0]|0)){t=t+1|0}else{break L2539}}if((t|0)!=1){break}uf(o,168144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);o=iv(g)|0;c[11670]=o;c[o+16>>2]=u;it();n=c[18070]|0;l=db(n,c[n>>2]<<5|8,105624)|0;c[18070]=0;if((l|0)==0){uf(g,152776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}n=o+8|0;p=c[n>>2]|0;if((p|0)!=0){e1(p)}c[n>>2]=l;uD(55600,f|0,612);l=o+12|0;n=(c[13898]|0)-1|0;p=c[1054]|0;m=(c[p+(n*40&-1)+36>>2]|0)+(c[p+(n*40&-1)+32>>2]|0)|0;n=db(c[l>>2]|0,(m+1|0)-(c[p+(g*40&-1)+32>>2]|0)|0,116456)|0;c[l>>2]=n;p=c[(c[1054]|0)+(g*40&-1)+32>>2]|0;L2553:do{if((p|0)<(m|0)){q=p;s=n;while(1){r=a[(c[10036]|0)+q|0]|0;if(r<<24>>24==0){z=s;break L2553}A=s+1|0;a[s]=r;r=q+1|0;if((r|0)<(m|0)){q=r;s=A}else{z=A;break}}}else{z=n}}while(0);a[z]=0;c[11670]=0;n=o+4|0;m=(uA(c[n>>2]|0)|0)+8|0;p=ut(m)|0;do{if((p|0)==0){gk();s=ut(m)|0;if((s|0)!=0){B=s;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=154560,v)|0)}else{B=p}}while(0);a[B]=a[151320]|0;a[B+1|0]=a[151321|0]|0;a[B+2|0]=a[151322|0]|0;a[B+3|0]=a[151323|0]|0;a[B+4|0]=a[151324|0]|0;a[B+5|0]=a[151325|0]|0;a[B+6|0]=a[151326|0]|0;uC(B|0,c[n>>2]|0);p=c[l>>2]|0;m=e6(B)|0;L2562:do{if((m|0)!=0){o=m+8|0;do{if((a[o]&1)==0){s=c[m+24>>2]|0;if((aY(s|0,p|0)|0)==0){break L2562}q=m+16|0;if((c[q>>2]|0)!=3){break}uu(s);c[q>>2]=1}else{a[o]=0}}while(0);if((p|0)==0){C=0}else{C=bP(p|0)|0}c[m+16>>2]=3;c[m+24>>2]=C}}while(0);uu(B);i=b;return}}while(0);B=c[10036]|0;C=k+(g*40&-1)+32|0;z=B+(c[C>>2]|0)|0;if((a_(z|0,167320,6)|0)==0){uf(g,145392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a_(z|0,126208,6)|0)==0){uf(g,145392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=g+2;z=d|0;f=c[k+(g*40&-1)+36>>2]|0;g=(f|0)>49?49:f;f=c[C>>2]|0;C=0;while(1){k=C+1|0;a[d+C|0]=a[B+f|0]|0;if((k|0)==(g|0)){break}else{f=f+1|0;C=k}}a[d+g|0]=0;g=e6(z)|0;is(e);z=g+8|0;do{if((a[z]&1)==0){d=g+16|0;if((c[d>>2]|0)!=3){break}uu(c[g+24>>2]|0);c[d>>2]=1}}while(0);d=g+16|0;g=e;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];c[d+12>>2]=c[g+12>>2];c[d+16>>2]=c[g+16>>2];c[d+20>>2]=c[g+20>>2];a[z]=0;i=b;return}function dU(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=i;i=i+24|0;e=d|0;f=c[13898]|0;g=f+1|0;c[13898]=g;h=c[8272]|0;if((g|0)>=(h|0)){i=d;return}j=c[1054]|0;k=(a[j+(g*40&-1)|0]&1)==0;L2594:do{if(k){l=g}else{m=c[j+(g*40&-1)+36>>2]|0;n=j+(g*40&-1)+32|0;o=c[10036]|0;p=0;while(1){if((p|0)>=(m|0)){q=1921;break}if((a[o+((c[n>>2]|0)+p|0)|0]|0)==(a[p+103664|0]|0)){p=p+1|0}else{break}}do{if((q|0)==1921){if((p|0)!=1){break}i=d;return}}while(0);if(k){l=g;break}p=c[j+(g*40&-1)+36>>2]|0;n=j+(g*40&-1)+32|0;o=c[10036]|0;m=0;while(1){if((m|0)>=(p|0)){q=1926;break}if((a[o+((c[n>>2]|0)+m|0)|0]|0)==(a[m+202112|0]|0)){m=m+1|0}else{q=1927;break}}if((q|0)==1926){if((m|0)!=1){q=1927}}if((q|0)==1927){if(k){l=g;break}n=c[j+(g*40&-1)+36>>2]|0;o=j+(g*40&-1)+32|0;p=c[10036]|0;r=0;while(1){if((r|0)>=(n|0)){break}if((a[p+((c[o>>2]|0)+r|0)|0]|0)==(a[r+129568|0]|0)){r=r+1|0}else{l=g;break L2594}}if((r|0)!=1){l=g;break}}o=f+2|0;c[13898]=o;l=o}}while(0);L2618:do{if((l|0)<(h|0)){f=(a[j+(l*40&-1)|0]&1)==0;do{if(!f){g=c[j+(l*40&-1)+36>>2]|0;k=j+(l*40&-1)+32|0;o=c[10036]|0;p=0;while(1){if((p|0)>=(g|0)){q=1938;break}if((a[o+((c[k>>2]|0)+p|0)|0]|0)==(a[p+103664|0]|0)){p=p+1|0}else{q=1939;break}}if((q|0)==1938){if((p|0)==1|f^1){break L2618}else{break}}else if((q|0)==1939){if(f){break}else{break L2618}}}}while(0);f=is(e)|0;r=c[f>>2]|0;if((r|0)==3){k=c[f+8>>2]|0;uz(k,0)}else if(!((r|0)==1|(r|0)==2)){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}r=e|0;if((c[r>>2]|0)==3){uu(c[e+8>>2]|0);c[r>>2]=1}c[13898]=(c[13898]|0)+1;i=d;return}}while(0);if((b|0)==0){uf(l,136616,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{uf(l,138312,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function dV(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;b=i;d=c[13898]|0;e=d+1|0;c[13898]=e;f=c[8272]|0;g=(e|0)<(f|0);L2642:do{if(g){h=c[1054]|0;j=(a[h+(e*40&-1)|0]&1)==0;if(!j){k=c[h+(e*40&-1)+36>>2]|0;l=h+(e*40&-1)+32|0;n=c[10036]|0;o=0;while(1){if((o|0)>=(k|0)){p=1958;break}if((a[n+((c[l>>2]|0)+o|0)|0]|0)==(a[o+103664|0]|0)){o=o+1|0}else{p=1959;break}}if((p|0)==1959){if(!j){p=1960}}else if((p|0)==1958){if(!((o|0)==1|j)){p=1960}}L2652:do{if((p|0)==1960){l=c[h+(e*40&-1)+36>>2]|0;n=h+(e*40&-1)+32|0;k=c[10036]|0;q=0;while(1){if((q|0)>=(l|0)){break}if((a[k+((c[n>>2]|0)+q|0)|0]|0)==(a[q+124624|0]|0)){q=q+1|0}else{break L2652}}if((q|0)!=1){break}n=c[14128]|0;if((n|0)==0){r=e}else{k=n;while(1){n=k+12|0;l=c[n>>2]|0;if((l|0)!=0){uu(l);c[n>>2]=0}n=c[k+24>>2]|0;uu(k);if((n|0)==0){break}else{k=n}}r=c[13898]|0}c[14128]=0;c[13898]=r+1;i=b;return}}while(0);if(!g){s=0;t=e;break}}h=c[1054]|0;j=(a[h+(e*40&-1)|0]&1)==0;if(j){s=0;t=e;break}o=c[h+(e*40&-1)+36>>2]|0;k=h+(e*40&-1)+32|0;h=c[10036]|0;q=0;while(1){if((q|0)>=(o|0)){p=1975;break}if((a[h+((c[k>>2]|0)+q|0)|0]|0)==(a[q+103664|0]|0)){q=q+1|0}else{break}}if((p|0)==1975){if((q|0)==1){s=0;t=e;break}}if(!((o|0)>0&(j^1))){s=0;t=e;break}h=c[10036]|0;n=0;l=0;u=c[k>>2]|0;while(1){if((a[n+133296|0]|0)==(a[h+(n+u|0)|0]|0)){w=u;x=l}else{if((n|0)!=3){s=0;t=e;break L2642}w=u-1|0;x=1}y=n+1|0;if((y|0)<(x+o|0)){n=y;l=x;u=w}else{break}}if((x|0)==0){if(!((n|0)==2|(n|0)==10)){s=0;t=e;break}}u=d+2|0;c[13898]=u;s=1;t=u}else{s=0;t=e}}while(0);L2689:do{if((t|0)<(f|0)){e=c[1054]|0;L2691:do{if((a[e+(t*40&-1)|0]&1)==0){z=c[10036]|0;A=e+(t*40&-1)+32|0}else{d=c[e+(t*40&-1)+36>>2]|0;x=e+(t*40&-1)+32|0;w=c[10036]|0;g=0;while(1){if((g|0)>=(d|0)){break}if((a[w+((c[x>>2]|0)+g|0)|0]|0)==(a[g+103664|0]|0)){g=g+1|0}else{z=w;A=x;break L2691}}if((g|0)==1){B=0;C=t;D=f;break L2689}else{z=w;A=x}}}while(0);e=z+(c[A>>2]|0)|0;n=e;d=(a8(e|0,32)|0)-n|0;do{if((d|0)<0){r=(a8(e|0,0)|0)-n|0;if((r|0)>=0){E=r;break}r=c[m>>2]|0;cf(r|0,131904,(v=i,i=i+16|0,c[v>>2]=130592,c[v+8>>2]=754,v)|0);i=b;return}else{E=d}}while(0);d=E+1|0;n=ut(d)|0;do{if((n|0)==0){gk();e=ut(d)|0;if((e|0)!=0){F=e;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=129544,v)|0)}else{F=n}}while(0);n=c[13898]|0;d=c[1054]|0;e=a[d+(n*40&-1)|0]|0;do{if((e&1)==0){p=2e3}else{r=c[d+(n*40&-1)+32>>2]|0;u=c[10036]|0;l=a[u+r|0]|0;if(!((l<<24>>24|0)==39|(l<<24>>24|0)==34)){p=2e3;break}l=(c[d+(n*40&-1)+36>>2]|0)-2|0;L2711:do{if((l|0)>0){o=r;h=0;k=u;while(1){j=o+1|0;q=h+1|0;a[F+h|0]=a[k+j|0]|0;if((q|0)==(l|0)){G=l;break L2711}o=j;h=q;k=c[10036]|0}}else{G=0}}while(0);a[F+G|0]=0;if((a[(c[10036]|0)+(c[(c[1054]|0)+(n*40&-1)+32>>2]|0)|0]|0)==34){ua(F);break}else{H=F;I=F}while(1){l=a[I]|0;if((l<<24>>24|0)==0){break}else if((l<<24>>24|0)==39){u=I+1|0;r=(a[u]|0)==39?u:I;J=r;K=a[r]|0}else{J=I;K=l}a[H]=K;H=H+1|0;I=J+1|0}a[H]=0}}while(0);L2724:do{if((p|0)==2e3){if((n|0)<(c[8272]|0)){L=F;M=n;N=d;O=e}else{break}while(1){l=c[N+(M*40&-1)+36>>2]|0;r=N+(M*40&-1)+32|0;L2728:do{if((O&1)!=0){u=c[10036]|0;x=0;while(1){if((x|0)>=(l|0)){break}if((a[u+((c[r>>2]|0)+x|0)|0]|0)==(a[x+103664|0]|0)){x=x+1|0}else{break L2728}}if((x|0)==1){break L2724}}}while(0);u=c[r>>2]|0;w=0;while(1){g=w+1|0;a[L+w|0]=a[(c[10036]|0)+u|0]|0;if((g|0)==(l|0)){break}u=u+1|0;w=g}a[L+l|0]=0;w=c[13898]|0;u=c[1054]|0;r=c[u+(w*40&-1)+36>>2]|0;g=a[(c[10036]|0)+((c[u+(w*40&-1)+32>>2]|0)+r|0)|0]|0;if((g<<24>>24|0)==32|(g<<24>>24|0)==9|(g<<24>>24|0)==0){break L2724}g=w+1|0;c[13898]=g;if((g|0)>=(c[8272]|0)){break L2724}L=L+r|0;M=g;N=u;O=a[u+(g*40&-1)|0]|0}}}while(0);e=(c[13898]|0)+1|0;c[13898]=e;B=F;C=e;D=c[8272]|0}else{B=0;C=t;D=f}}while(0);L2743:do{if((C|0)<(D|0)){f=c[1054]|0;L2745:do{if((a[f+(C*40&-1)|0]&1)==0){P=c[10036]|0}else{t=c[f+(C*40&-1)+36>>2]|0;F=f+(C*40&-1)+32|0;O=c[10036]|0;N=0;while(1){if((N|0)>=(t|0)){break}if((a[O+((c[F>>2]|0)+N|0)|0]|0)==(a[N+103664|0]|0)){N=N+1|0}else{P=O;break L2745}}if((N|0)==1){Q=0;break L2743}else{P=O}}}while(0);f=(uA(P|0)|0)+1|0;F=ut(f)|0;do{if((F|0)==0){gk();t=ut(f)|0;if((t|0)!=0){R=t;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=128272,v)|0)}else{R=F}}while(0);F=c[13898]|0;f=c[1054]|0;t=a[f+(F*40&-1)|0]|0;do{if((t&1)!=0){M=c[f+(F*40&-1)+32>>2]|0;L=c[10036]|0;p=a[L+M|0]|0;if(!((p<<24>>24|0)==39|(p<<24>>24|0)==34)){break}p=(c[f+(F*40&-1)+36>>2]|0)-2|0;L2760:do{if((p|0)>0){H=M;J=0;I=L;while(1){K=H+1|0;G=J+1|0;a[R+J|0]=a[I+K|0]|0;if((G|0)==(p|0)){S=p;break L2760}H=K;J=G;I=c[10036]|0}}else{S=0}}while(0);a[R+S|0]=0;if((a[(c[10036]|0)+(c[(c[1054]|0)+(F*40&-1)+32>>2]|0)|0]|0)==34){ua(R)}else{p=R;L=R;while(1){M=a[L]|0;if((M<<24>>24|0)==39){O=L+1|0;N=(a[O]|0)==39?O:L;T=N;U=a[N]|0}else if((M<<24>>24|0)==0){break}else{T=L;U=M}a[p]=U;p=p+1|0;L=T+1|0}a[p]=0}c[13898]=(c[13898]|0)+1;Q=R;break L2743}}while(0);if((F|0)<(c[8272]|0)){V=R;W=F;X=f;Y=t}else{Q=R;break}while(1){L=c[X+(W*40&-1)+36>>2]|0;M=X+(W*40&-1)+32|0;L2777:do{if((Y&1)!=0){N=c[10036]|0;O=0;while(1){if((O|0)>=(L|0)){break}if((a[N+((c[M>>2]|0)+O|0)|0]|0)==(a[O+103664|0]|0)){O=O+1|0}else{break L2777}}if((O|0)==1){Q=R;break L2743}}}while(0);p=c[M>>2]|0;N=0;while(1){I=N+1|0;a[V+N|0]=a[(c[10036]|0)+p|0]|0;if((I|0)==(L|0)){break}p=p+1|0;N=I}a[V+L|0]=0;N=c[13898]|0;p=c[1054]|0;M=c[p+(N*40&-1)+36>>2]|0;I=V+M|0;J=a[(c[10036]|0)+((c[p+(N*40&-1)+32>>2]|0)+M|0)|0]|0;if((J<<24>>24|0)==32|(J<<24>>24|0)==9|(J<<24>>24|0)==0){J=V+(M+1|0)|0;a[I]=32;a[J]=0;Z=J;_=c[13898]|0}else{Z=I;_=N}N=_+1|0;c[13898]=N;if((N|0)>=(c[8272]|0)){Q=R;break L2743}I=c[1054]|0;V=Z;W=N;X=I;Y=a[I+(N*40&-1)|0]|0}}else{Q=0}}while(0);hR(B,Q,s);i=b;return}function dW(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;b=i;i=i+32|0;d=b|0;e=b+24|0;c[e>>2]=0;f=(c[13898]|0)+1|0;c[13898]=f;L2795:do{if((f|0)<(c[8272]|0)){g=c[1054]|0;L2797:do{if((a[g+(f*40&-1)|0]&1)!=0){h=c[g+(f*40&-1)+36>>2]|0;j=g+(f*40&-1)+32|0;k=c[10036]|0;l=0;while(1){if((l|0)>=(h|0)){break}if((a[k+((c[j>>2]|0)+l|0)|0]|0)==(a[l+103664|0]|0)){l=l+1|0}else{break L2797}}if((l|0)==1){break L2795}}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[d>>2]|0)!=3){c[13898]=f;break}g=c[d+8>>2]|0;c[e>>2]=g;if((g|0)!=0){iQ(e);g=c[e>>2]|0;hw(hA(g,193632)|0,g,1);i=b;return}m=c[13898]|0;uf(m,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[e>>2]=0;m=f;uf(m,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function dX(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;b=i;i=i+32|0;d=b|0;e=b+24|0;c[e>>2]=0;f=(c[13898]|0)+1|0;c[13898]=f;L2814:do{if((f|0)<(c[8272]|0)){g=c[1054]|0;L2816:do{if((a[g+(f*40&-1)|0]&1)!=0){h=c[g+(f*40&-1)+36>>2]|0;j=g+(f*40&-1)+32|0;k=c[10036]|0;l=0;while(1){if((l|0)>=(h|0)){break}if((a[k+((c[j>>2]|0)+l|0)|0]|0)==(a[l+103664|0]|0)){l=l+1|0}else{break L2816}}if((l|0)==1){break L2814}}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[d>>2]|0)!=3){c[13898]=f;break}g=c[d+8>>2]|0;c[e>>2]=g;if((g|0)==0){m=c[13898]|0;uf(m,124592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}iQ(e);g=c[e>>2]|0;if((bY(g|0)|0)==0){e7(5);uu(g);i=b;return}else{uf(c[13898]|0,123232,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);c[e>>2]=0;m=f;uf(m,124592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function dY(){var b=0,d=0,e=0,f=0,h=0,i=0,j=0.0,k=0.0;if((a[14080]&1)==0){lk()}do{if(a[14088]|0){if((a[33512]&1)==0){break}if(!(a[13032]|0)){break}b=c[(c[3524]|0)+104>>2]|0;if((b|0)!=0){cS[b&511]()}a[13032]=0}else{cS[c[(c[3524]|0)+52>>2]&511]();a[14088]=1}}while(0);cM[c[(c[3524]|0)+168>>2]&511](0);b=c[3524]|0;if((c[b+96>>2]&16|0)!=0){c[7271]=-1}c[13880]=0;d=b+8|0;c[13881]=(c[d>>2]|0)-1;c[13882]=0;e=b+12|0;c[13883]=(c[e>>2]|0)-1;if((a[33512]&1)==0){lh();a[25280]=0;f=c[13898]|0;h=f+1|0;c[13898]=h;return}i=c[b+108>>2]|0;if((i|0)==0){lh();a[25280]=0;f=c[13898]|0;h=f+1|0;c[13898]=h;return}j=+((c[d>>2]|0)>>>0>>>0);k=+((c[e>>2]|0)>>>0>>>0);cI[i&63](0,~~(+g[184]*j),~~(+g[44]*k),~~(j*+g[178]),~~(k*+g[38]));lh();a[25280]=0;f=c[13898]|0;h=f+1|0;c[13898]=h;return}function dZ(){var a=0;a=i;c[13898]=(c[13898]|0)+1;uh(-1,116984,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=a;return}function d_(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+24|0;d=b|0;e=(c[13898]|0)+1|0;c[13898]=e;L2860:do{if((e|0)<(c[8272]|0)){f=c[1054]|0;L2862:do{if((a[f+(e*40&-1)|0]&1)!=0){g=c[f+(e*40&-1)+36>>2]|0;h=f+(e*40&-1)+32|0;j=c[10036]|0;k=0;while(1){if((k|0)>=(g|0)){break}if((a[j+((c[h>>2]|0)+k|0)|0]|0)==(a[k+103664|0]|0)){k=k+1|0}else{break L2862}}if((k|0)==1){l=e;break L2860}}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[d>>2]|0)!=3){c[13898]=e;l=e;break}f=c[d+8>>2]|0;if((f|0)==0){l=c[13898]|0;break}else{dL(f);i=b;return}}else{l=e}}while(0);uf(l,122e3,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function d$(){var b=0,d=0,e=0,f=0,g=0;b=(c[13898]|0)+1|0;if((c[8272]|0)<=(b|0)){c[13484]=1;return}d=c[1054]|0;if((a[d+(b*40&-1)|0]&1)==0){c[13484]=1;return}e=c[d+(b*40&-1)+36>>2]|0;f=d+(b*40&-1)+32|0;b=c[10036]|0;d=0;while(1){if((d|0)>=(e|0)){break}if((a[b+((c[f>>2]|0)+d|0)|0]|0)==(a[d+78208|0]|0)){d=d+1|0}else{g=2133;break}}if((g|0)==2133){c[13484]=1;return}if((d|0)==7){bd(0)}else{c[13484]=1;return}}function d0(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;b=i;i=i+24|0;d=b|0;e=(c[13898]|0)+1|0;c[13898]=e;if((c[8272]|0)<=(e|0)){uf(e,116032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=c[1054]|0;if((a[f+(e*40&-1)|0]&1)==0){uf(e,116032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=c[f+(e*40&-1)+36>>2]|0;j=f+(e*40&-1)+32|0;f=c[10036]|0;k=0;while(1){if((k|0)>=(g|0)){break}if((a[f+((c[j>>2]|0)+k|0)|0]|0)==(a[k+199040|0]|0)){k=k+1|0}else{l=2234;break}}if((l|0)==2234){uf(e,116032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((k|0)!=1){uf(e,116032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=is(d)|0;k=c[e>>2]|0;if((k|0)==1){m=+(c[e+8>>2]|0)}else if((k|0)==3){m=+uz(c[e+8>>2]|0,0)}else if((k|0)==2){m=+h[e+8>>3]}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d|0;if((c[e>>2]|0)==3){uu(c[d+8>>2]|0);c[e>>2]=1}e=c[13898]|0;d=c[8272]|0;k=(d|0)>(e|0);L2917:do{if(k){j=c[1054]|0;if((a[j+(e*40&-1)|0]&1)==0){break}f=c[j+(e*40&-1)+36>>2]|0;g=j+(e*40&-1)+32|0;n=c[10036]|0;o=0;while(1){if((o|0)>=(f|0)){break}if((a[n+((c[g>>2]|0)+o|0)|0]|0)==(a[o+126728|0]|0)){o=o+1|0}else{break L2917}}if((o|0)!=1){break}f=c[g>>2]|0;p=e+1|0;c[13898]=p;q=1;r=p;while(1){if((r|0)>=(d|0)){l=2159;break}L2928:do{if((a[j+(r*40&-1)|0]&1)==0){l=2166}else{p=c[j+(r*40&-1)+36>>2]|0;s=j+(r*40&-1)+32|0;t=0;while(1){if((t|0)>=(p|0)){break}if((a[n+((c[s>>2]|0)+t|0)|0]|0)==(a[t+126728|0]|0)){t=t+1|0}else{l=2166;break L2928}}if((t|0)!=1){l=2166;break}u=q+1|0}}while(0);if((l|0)==2166){l=0;L2937:do{if((a[j+(r*40&-1)|0]&1)==0){w=0}else{s=c[j+(r*40&-1)+36>>2]|0;p=j+(r*40&-1)+32|0;x=0;while(1){if((x|0)>=(s|0)){break}if((a[n+((c[p>>2]|0)+x|0)|0]|0)==(a[x+125616|0]|0)){x=x+1|0}else{w=0;break L2937}}w=((x|0)==1)<<31>>31}}while(0);u=w+q|0}p=r+1|0;if((u|0)==0){y=p;break}else{q=u;r=p}}if((l|0)==2159){y=r+1|0}q=c[j+(r*40&-1)+32>>2]|0;c[13898]=y;L2948:do{if((d|0)>(y|0)){if((a[j+(y*40&-1)|0]&1)==0){z=0;A=0;B=y;break}g=c[j+(y*40&-1)+36>>2]|0;o=j+(y*40&-1)+32|0;p=0;while(1){if((p|0)>=(g|0)){break}if((a[n+((c[o>>2]|0)+p|0)|0]|0)==(a[p+200904|0]|0)){p=p+1|0}else{z=0;A=0;B=y;break L2948}}if((p|0)!=4){z=0;A=0;B=y;break}o=y+1|0;c[13898]=o;if((d|0)<=(o|0)){uf(o,114208,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[j+(o*40&-1)|0]&1)==0){uf(o,114208,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=c[j+(o*40&-1)+36>>2]|0;s=j+(o*40&-1)+32|0;t=0;while(1){if((t|0)>=(g|0)){break}if((a[n+((c[s>>2]|0)+t|0)|0]|0)==(a[t+126728|0]|0)){t=t+1|0}else{l=2242;break}}if((l|0)==2242){uf(o,114208,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((t|0)!=1){uf(o,114208,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=c[s>>2]|0;p=y+2|0;c[13898]=p;C=1;D=p;while(1){if((D|0)>=(d|0)){l=2188;break}L2974:do{if((a[j+(D*40&-1)|0]&1)==0){l=2195}else{p=c[j+(D*40&-1)+36>>2]|0;E=j+(D*40&-1)+32|0;F=0;while(1){if((F|0)>=(p|0)){break}if((a[n+((c[E>>2]|0)+F|0)|0]|0)==(a[F+126728|0]|0)){F=F+1|0}else{l=2195;break L2974}}if((F|0)!=1){l=2195;break}G=C+1|0}}while(0);if((l|0)==2195){l=0;L2983:do{if((a[j+(D*40&-1)|0]&1)==0){H=0}else{x=c[j+(D*40&-1)+36>>2]|0;E=j+(D*40&-1)+32|0;p=0;while(1){if((p|0)>=(x|0)){break}if((a[n+((c[E>>2]|0)+p|0)|0]|0)==(a[p+125616|0]|0)){p=p+1|0}else{H=0;break L2983}}H=((p|0)==1)<<31>>31}}while(0);G=H+C|0}E=D+1|0;if((G|0)==0){I=E;break}else{C=G;D=E}}if((l|0)==2188){I=D+1|0}C=c[j+(D*40&-1)+32>>2]|0;c[13898]=I;z=C;A=g;B=I}else{z=0;A=0;B=y}}while(0);j=m!=0.0;n=j?f:A;a[37480]=j&1;r=(A|0)==0;a[37464]=r&1;c[13544]=(c[13544]|0)+1;if(j|r^1){r=(j?q:z)-n|0;j=ut(r)|0;do{if((j|0)==0){gk();C=ut(r)|0;if((C|0)!=0){J=C;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=110688,v)|0)}else{J=j}}while(0);uD(J|0,(c[10036]|0)+(n+1|0)|0,r);a[J+(r-1|0)|0]=0;dL(J);K=c[13898]|0}else{K=B}c[13898]=K-1;i=b;return}}while(0);if((c[13544]|0)>0){uf(e,107896,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9368]=(c[9368]|0)+1;if(m!=0.0){K=d-1|0;B=c[1054]|0;J=(c[B+(K*40&-1)+36>>2]|0)+(c[B+(K*40&-1)+32>>2]|0)|0;K=e-1|0;c[13898]=K;c[B+(K*40&-1)+36>>2]=1;K=J+2|0;c[(c[1054]|0)+((c[13898]|0)*40&-1)+32>>2]=K;a[(c[10036]|0)+K|0]=59;a[(c[10036]|0)+(J+3|0)|0]=0;a[37480]=1;i=b;return}L3011:do{if(k){J=e;L3012:while(1){L3014:do{if((J|0)<(d|0)){K=c[1054]|0;B=J;while(1){L3018:do{if((a[K+(B*40&-1)|0]&1)==0){l=2221}else{z=c[K+(B*40&-1)+36>>2]|0;A=K+(B*40&-1)+32|0;y=c[10036]|0;I=0;while(1){if((I|0)>=(z|0)){break}if((a[y+((c[A>>2]|0)+I|0)|0]|0)==(a[I+103664|0]|0)){I=I+1|0}else{l=2221;break L3018}}A=B+1|0;c[13898]=A;if((I|0)==1){L=A;break L3014}else{M=A}}}while(0);if((l|0)==2221){l=0;p=B+1|0;c[13898]=p;M=p}if((M|0)<(d|0)){B=M}else{N=M;l=2216;break}}}else{N=J;l=2216}}while(0);if((l|0)==2216){l=0;g=N+1|0;c[13898]=g;L=g}L3030:do{if((d|0)>(L|0)){g=c[1054]|0;if((a[g+(L*40&-1)|0]&1)==0){break}D=c[g+(L*40&-1)+36>>2]|0;B=g+(L*40&-1)+32|0;g=c[10036]|0;K=0;while(1){if((K|0)>=(D|0)){break}if((a[g+((c[B>>2]|0)+K|0)|0]|0)==(a[K+200904|0]|0)){K=K+1|0}else{break L3030}}if((K|0)==4){break L3012}}}while(0);if((L|0)<(d|0)){J=L}else{break L3011}}a[37480]=0;c[13898]=L-1;i=b;return}}while(0);c[8272]=0;c[13898]=0;i=b;return}function d1(){return}function d2(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0;b=i;d=c[13898]|0;e=d+1|0;f=c[8272]|0;L3044:do{if((f|0)>(e|0)){g=c[1054]|0;if((a[g+(e*40&-1)|0]&1)==0){break}h=c[g+(e*40&-1)+36>>2]|0;j=g+(e*40&-1)+32|0;k=c[10036]|0;l=0;while(1){if((l|0)>=(h|0)){break}if((a[k+((c[j>>2]|0)+l|0)|0]|0)==(a[l+126728|0]|0)){l=l+1|0}else{break L3044}}if((l|0)!=1){break}if((a[37464]&1)==0){uf(d,106968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}a[37464]=0;c[13898]=e;h=c[j>>2]|0;m=d+2|0;c[13898]=m;n=1;o=m;while(1){if((o|0)>=(f|0)){p=2256;break}L3058:do{if((a[g+(o*40&-1)|0]&1)==0){p=2263}else{m=c[g+(o*40&-1)+36>>2]|0;q=g+(o*40&-1)+32|0;r=0;while(1){if((r|0)>=(m|0)){break}if((a[k+((c[q>>2]|0)+r|0)|0]|0)==(a[r+126728|0]|0)){r=r+1|0}else{p=2263;break L3058}}if((r|0)!=1){p=2263;break}s=n+1|0}}while(0);if((p|0)==2263){p=0;L3067:do{if((a[g+(o*40&-1)|0]&1)==0){t=0}else{q=c[g+(o*40&-1)+36>>2]|0;m=g+(o*40&-1)+32|0;u=0;while(1){if((u|0)>=(q|0)){break}if((a[k+((c[m>>2]|0)+u|0)|0]|0)==(a[u+125616|0]|0)){u=u+1|0}else{t=0;break L3067}}t=((u|0)==1)<<31>>31}}while(0);s=t+n|0}m=o+1|0;if((s|0)==0){w=m;break}else{n=s;o=m}}if((p|0)==2256){w=o+1|0}n=c[g+(o*40&-1)+32>>2]|0;c[13898]=w-1;c[13544]=(c[13544]|0)+1;if((a[37480]&1)!=0){i=b;return}k=n-h|0;n=ut(k)|0;do{if((n|0)==0){gk();j=ut(k)|0;if((j|0)!=0){x=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=110688,v)|0)}else{x=n}}while(0);uD(x|0,(c[10036]|0)+(h+1|0)|0,k);a[x+(k-1|0)|0]=0;dL(x);i=b;return}}while(0);x=c[9368]|0;if((x|0)<1){uf(d,106008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9368]=x-1;if((a[37480]&1)==0){x=c[1054]|0;w=c[x+(d*40&-1)+32>>2]|0;c[x+(d*40&-1)+36>>2]=1;a[(c[10036]|0)+w|0]=59;a[(c[10036]|0)+(w+1|0)|0]=32;a[(c[10036]|0)+(w+2|0)|0]=32;a[(c[10036]|0)+(w+3|0)|0]=32;a[37480]=1;i=b;return}else{c[8272]=0;c[13898]=0;i=b;return}}function d3(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0;b=i;c[13898]=(c[13898]|0)+1;d=iw()|0;e=c[13898]|0;f=c[8272]|0;if((f|0)<=(e|0)){uf(e,104920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=c[1054]|0;if((a[g+(e*40&-1)|0]&1)==0){uf(e,104920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}h=c[g+(e*40&-1)+36>>2]|0;j=g+(e*40&-1)+32|0;k=c[10036]|0;l=0;while(1){if((l|0)>=(h|0)){break}if((a[k+((c[j>>2]|0)+l|0)|0]|0)==(a[l+126728|0]|0)){l=l+1|0}else{m=2323;break}}if((m|0)==2323){uf(e,104920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((l|0)!=1){uf(e,104920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=c[j>>2]|0;j=e+1|0;c[13898]=j;e=1;h=j;while(1){if((h|0)>=(f|0)){m=2295;break}L3114:do{if((a[g+(h*40&-1)|0]&1)==0){m=2302}else{j=c[g+(h*40&-1)+36>>2]|0;n=g+(h*40&-1)+32|0;o=0;while(1){if((o|0)>=(j|0)){break}if((a[k+((c[n>>2]|0)+o|0)|0]|0)==(a[o+126728|0]|0)){o=o+1|0}else{m=2302;break L3114}}if((o|0)!=1){m=2302;break}p=e+1|0}}while(0);if((m|0)==2302){m=0;L3123:do{if((a[g+(h*40&-1)|0]&1)==0){q=0}else{n=c[g+(h*40&-1)+36>>2]|0;j=g+(h*40&-1)+32|0;r=0;while(1){if((r|0)>=(n|0)){break}if((a[k+((c[j>>2]|0)+r|0)|0]|0)==(a[r+125616|0]|0)){r=r+1|0}else{q=0;break L3123}}q=((r|0)==1)<<31>>31}}while(0);p=q+e|0}j=h+1|0;if((p|0)==0){s=j;break}else{e=p;h=j}}if((m|0)==2295){s=h+1|0}m=c[g+(h*40&-1)+32>>2]|0;c[13544]=(c[13544]|0)+1;c[13898]=s-1;s=m-l|0;m=s+2|0;h=ut(m)|0;do{if((h|0)==0){gk();g=ut(m)|0;if((g|0)!=0){t=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=110688,v)|0)}else{t=h}}while(0);uD(t|0,(c[10036]|0)+(l+1|0)|0,s);a[t+(s-1|0)|0]=0;s=(d|0)==0;do{if(!s){if((a[d+38|0]&1)==0){break}l=t;w=59;a[l]=w&255;w=w>>8;a[l+1|0]=w&255}}while(0);l=(t|0)==0;do{if(l){u=0}else{u=bP(t|0)|0}dL(u);}while(ix(d)|0);uu(t);if(s){i=b;return}else{x=d}while(1){d=c[x>>2]|0;uu(c[x+12>>2]|0);uu(x);if((d|0)==0){break}else{x=d}}i=b;return}function d4(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0.0;b=i;i=i+48|0;d=b|0;e=b+24|0;f=(c[13898]|0)+1|0;c[13898]=f;g=is(e)|0;j=c[g>>2]|0;if((j|0)==1){k=+(c[g+8>>2]|0)}else if((j|0)==2){k=+h[g+8>>3]}else if((j|0)==3){k=+uz(c[g+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=e|0;if((c[g>>2]|0)==3){uu(c[e+8>>2]|0);c[g>>2]=1}g=c[13898]|0;e=c[8272]|0;if((e|0)<=(g|0)){uf(g,104360,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=c[1054]|0;if((a[j+(g*40&-1)|0]&1)==0){uf(g,104360,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=c[j+(g*40&-1)+36>>2]|0;m=j+(g*40&-1)+32|0;n=c[10036]|0;o=0;while(1){if((o|0)>=(l|0)){break}if((a[n+((c[m>>2]|0)+o|0)|0]|0)==(a[o+126728|0]|0)){o=o+1|0}else{p=2374;break}}if((p|0)==2374){uf(g,104360,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((o|0)!=1){uf(g,104360,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=c[m>>2]|0;m=g+1|0;c[13898]=m;g=1;l=m;while(1){if((l|0)>=(e|0)){p=2344;break}L3181:do{if((a[j+(l*40&-1)|0]&1)==0){p=2351}else{m=c[j+(l*40&-1)+36>>2]|0;q=j+(l*40&-1)+32|0;r=0;while(1){if((r|0)>=(m|0)){break}if((a[n+((c[q>>2]|0)+r|0)|0]|0)==(a[r+126728|0]|0)){r=r+1|0}else{p=2351;break L3181}}if((r|0)!=1){p=2351;break}s=g+1|0}}while(0);if((p|0)==2351){p=0;L3190:do{if((a[j+(l*40&-1)|0]&1)==0){t=0}else{q=c[j+(l*40&-1)+36>>2]|0;m=j+(l*40&-1)+32|0;u=0;while(1){if((u|0)>=(q|0)){break}if((a[n+((c[m>>2]|0)+u|0)|0]|0)==(a[u+125616|0]|0)){u=u+1|0}else{t=0;break L3190}}t=((u|0)==1)<<31>>31}}while(0);s=t+g|0}m=l+1|0;if((s|0)==0){w=m;break}else{g=s;l=m}}if((p|0)==2344){w=l+1|0}s=(c[j+(l*40&-1)+32>>2]|0)-o|0;l=ut(s)|0;do{if((l|0)==0){gk();j=ut(s)|0;if((j|0)!=0){x=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=110688,v)|0)}else{x=l}}while(0);uD(x|0,(c[10036]|0)+(o+1|0)|0,s);a[x+(s-1|0)|0]=0;c[13544]=(c[13544]|0)+1;if(k==0.0){uu(x);c[13898]=w;i=b;return}s=d|0;o=d+8|0;while(1){dL(bP(x|0)|0);c[13898]=f;l=is(d)|0;j=c[l>>2]|0;if((j|0)==1){y=+(c[l+8>>2]|0)}else if((j|0)==3){y=+uz(c[l+8>>2]|0,0)}else if((j|0)==2){y=+h[l+8>>3]}else{p=2367;break}if((c[s>>2]|0)==3){uu(c[o>>2]|0);c[s>>2]=1}if(y==0.0){p=2377;break}}if((p|0)==2377){uu(x);c[13898]=w;i=b;return}else if((p|0)==2367){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function d5(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,o=0;b=i;i=i+32|0;d=b|0;e=b+24|0;f=(c[13898]|0)+1|0;c[13898]=f;L3222:do{if((f|0)<(c[8272]|0)){g=c[1054]|0;L3224:do{if((a[g+(f*40&-1)|0]&1)!=0){h=c[g+(f*40&-1)+36>>2]|0;j=g+(f*40&-1)+32|0;k=c[10036]|0;l=0;while(1){if((l|0)>=(h|0)){break}if((a[k+((c[j>>2]|0)+l|0)|0]|0)==(a[l+103664|0]|0)){l=l+1|0}else{break L3224}}if((l|0)==1){break L3222}}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[d>>2]|0)!=3){c[13898]=f;break}g=c[d+8>>2]|0;c[e>>2]=g;if((g|0)==0){m=c[13898]|0;uf(m,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}iQ(e);g=c[e>>2]|0;if((aY(g|0,202112)|0)==0){o=c[n>>2]|0;hw(o,g,0);i=b;return}else{o=hA(g,193632)|0;hw(o,g,0);i=b;return}}}while(0);c[e>>2]=0;m=f;uf(m,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function d6(){var b=0;b=c[13898]|0;c[13898]=b+1;c[7738]=b;a[30664]=0;hY(1);a[(e6(159824)|0)+8|0]=1;a[(e6(159208)|0)+8|0]=1;a[(e6(158720)|0)+8|0]=1;a[(e6(158096)|0)+8|0]=1;a[(e6(164136)|0)+8|0]=1;a[(e6(156232)|0)+8|0]=1;a[(e6(155120)|0)+8|0]=1;a[(e6(154768)|0)+8|0]=1;iS();return}function d7(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;b=i;i=i+24|0;d=b|0;if((c[7262]|0)==0){c[7262]=c[m>>2]}a[25280]=0;e=d|0;f=d+8|0;g=0;h=c[13898]|0;L3250:while(1){c[13898]=h+1;is(d);do{if((c[e>>2]|0)==3){j=c[f>>2]|0;k=c[7262]|0;aK(j|0,k|0);if((c[e>>2]|0)!=3){l=0;break}uu(c[f>>2]|0);c[e>>2]=1;l=0}else{if((g|0)!=0){k=c[7262]|0;aF(32,k|0)}j5(c[7262]|0,d,0);l=1}}while(0);k=c[13898]|0;if((k|0)>=(c[8272]|0)){break}j=c[1054]|0;n=(a[j+(k*40&-1)|0]&1)==0;if(n){break}o=c[j+(k*40&-1)+36>>2]|0;p=j+(k*40&-1)+32|0;q=c[10036]|0;r=0;while(1){if((r|0)>=(o|0)){s=2413;break}if((a[q+((c[p>>2]|0)+r|0)|0]|0)==(a[r+103664|0]|0)){r=r+1|0}else{s=2414;break}}if((s|0)==2413){s=0;if((r|0)==1|n){break}}else if((s|0)==2414){s=0;if(n){break}}p=c[j+(k*40&-1)+36>>2]|0;q=j+(k*40&-1)+32|0;o=c[10036]|0;t=0;while(1){if((t|0)>=(p|0)){break}if((a[o+((c[q>>2]|0)+t|0)|0]|0)==(a[t+148464|0]|0)){t=t+1|0}else{break L3250}}if((t|0)==1){g=l;h=k}else{break}}aF(10,c[7262]|0);aD(c[7262]|0);i=b;return}function d8(){c[13898]=(c[13898]|0)+1;dO();return}function d9(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,p=0,q=0,r=0,s=0.0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0.0,O=0,P=0;b=i;i=i+48|0;d=b|0;e=b+24|0;f=c[13898]|0;g=f+1|0;c[13898]=g;c[8026]=0;j=c[8272]|0;L3276:do{if((j|0)>(g|0)){k=c[1054]|0;if((a[k+(g*40&-1)|0]&1)==0){l=2487;break}n=c[k+(g*40&-1)+36>>2]|0;p=k+(g*40&-1)+32|0;q=c[10036]|0;r=0;while(1){if((r|0)>=(n|0)){break}if((a[q+((c[p>>2]|0)+r|0)|0]|0)==(a[r+218536|0]|0)){r=r+1|0}else{l=2487;break L3276}}if((r|0)!=5){l=2487;break}p=f+2|0;c[13898]=p;if(!((c[8496]|0)!=0&(c[3524]|0)!=0)){uh(-1,96888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);s=-1.0;break}L3287:do{if((p|0)<(j|0)){n=0;t=p;while(1){u=t;L3290:while(1){w=(a[k+(u*40&-1)|0]&1)==0;x=c[k+(u*40&-1)+36>>2]|0;y=k+(u*40&-1)+32|0;L3292:do{if(w){z=c[y>>2]|0}else{A=0;while(1){if((A|0)>=(x|0)){l=2434;break}if((a[q+((c[y>>2]|0)+A|0)|0]|0)==(a[A+103664|0]|0)){A=A+1|0}else{break}}if((l|0)==2434){l=0;if((A|0)==1){B=n;break L3287}}C=c[y>>2]|0;if((x|0)>0&(w^1)){D=0;E=0;F=C}else{z=C;break}while(1){if((a[D+101312|0]|0)==(a[q+(D+F|0)|0]|0)){G=F;H=E}else{if((D|0)!=3){z=C;break L3292}G=F-1|0;H=1}I=D+1|0;if((I|0)<(H+x|0)){D=I;E=H;F=G}else{break}}if((H|0)!=0){l=2442;break L3290}if((D|0)==2|(D|0)==8){l=2442;break L3290}else{z=C}}}while(0);J=(j|0)>(u|0);if(!J){B=n;break L3287}if(w){l=2451;break}else{K=0}while(1){if((K|0)>=(x|0)){break}if((a[q+(z+K|0)|0]|0)==(a[K+148464|0]|0)){K=K+1|0}else{l=2450;break L3290}}if((K|0)!=1){l=2450;break}x=u+1|0;c[13898]=x;if((x|0)<(j|0)){u=x}else{B=n;break L3287}}if((l|0)==2450){l=0;if(J){l=2451}else{B=n;break L3287}}else if((l|0)==2442){l=0;x=u+1|0;c[13898]=x;L=n|8;M=x}L3318:do{if((l|0)==2451){l=0;L3320:do{if((a[k+(u*40&-1)|0]&1)!=0){x=c[k+(u*40&-1)+36>>2]|0;w=k+(u*40&-1)+32|0;y=0;while(1){if((y|0)>=(x|0)){break}if((a[q+((c[w>>2]|0)+y|0)|0]|0)==(a[y+100784|0]|0)){y=y+1|0}else{break L3320}}if((y|0)!=3){break}w=u+1|0;c[13898]=w;L=n|63;M=w;break L3318}}while(0);if(!J){B=n;break L3287}if((a[k+(u*40&-1)|0]&1)!=0){w=c[k+(u*40&-1)+36>>2]|0;x=k+(u*40&-1)+32|0;C=0;while(1){if((C|0)>=(w|0)){l=2462;break}if((a[q+((c[x>>2]|0)+C|0)|0]|0)==(a[C+100080|0]|0)){C=C+1|0}else{break}}do{if((l|0)==2462){l=0;if((C|0)!=7){break}x=u+1|0;c[13898]=x;L=n|1;M=x;break L3318}}while(0);if(!J){B=n;break L3287}}L3339:do{if((a[k+(u*40&-1)|0]&1)!=0){C=c[k+(u*40&-1)+36>>2]|0;x=k+(u*40&-1)+32|0;w=0;while(1){if((w|0)>=(C|0)){break}if((a[q+((c[x>>2]|0)+w|0)|0]|0)==(a[w+99640|0]|0)){w=w+1|0}else{break L3339}}if((w|0)!=7){break}x=u+1|0;c[13898]=x;L=n|2;M=x;break L3318}}while(0);if(!J){B=n;break L3287}if((a[k+(u*40&-1)|0]&1)!=0){x=c[k+(u*40&-1)+36>>2]|0;C=k+(u*40&-1)+32|0;y=0;while(1){if((y|0)>=(x|0)){l=2476;break}if((a[q+((c[C>>2]|0)+y|0)|0]|0)==(a[y+99208|0]|0)){y=y+1|0}else{break}}do{if((l|0)==2476){l=0;if((y|0)!=7){break}C=u+1|0;c[13898]=C;L=n|4;M=C;break L3318}}while(0);if(!J){B=n;break L3287}}if((a[k+(u*40&-1)|0]&1)==0){B=n;break L3287}y=c[k+(u*40&-1)+36>>2]|0;C=k+(u*40&-1)+32|0;x=0;while(1){if((x|0)>=(y|0)){break}if((a[q+((c[C>>2]|0)+x|0)|0]|0)==(a[x+98600|0]|0)){x=x+1|0}else{B=n;break L3287}}if((x|0)!=5){B=n;break L3287}C=u+1|0;c[13898]=C;L=n|16;M=C}}while(0);if((M|0)<(j|0)){n=L;t=M}else{B=L;break}}}else{B=0}}while(0);c[8026]=(B|0)==0?7:B;q=e6(163432)|0;a[q+8|0]=0;c[q+16>>2]=1;c[q+24>>2]=-1;q=e6(164136)|0;a[q+8|0]=0;c[q+16>>2]=1;c[q+24>>2]=-1;s=-1.0}else{l=2487}}while(0);do{if((l|0)==2487){B=is(d)|0;L=c[B>>2]|0;if((L|0)==1){N=+(c[B+8>>2]|0)}else if((L|0)==2){N=+h[B+8>>3]}else if((L|0)==3){N=+uz(c[B+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}B=d|0;if((c[B>>2]|0)!=3){s=N;break}uu(c[d+8>>2]|0);c[B>>2]=1;s=N}}while(0);d=c[13898]|0;L3376:do{if((d|0)<(c[8272]|0)){B=c[1054]|0;L3378:do{if((a[B+(d*40&-1)|0]&1)!=0){L=c[B+(d*40&-1)+36>>2]|0;M=B+(d*40&-1)+32|0;j=c[10036]|0;J=0;while(1){if((J|0)>=(L|0)){break}if((a[j+((c[M>>2]|0)+J|0)|0]|0)==(a[J+103664|0]|0)){J=J+1|0}else{break L3378}}if((J|0)==1){l=2500;break L3376}}}while(0);uu(c[8028]|0);B=c[13898]|0;L3385:do{if((B|0)<(c[8272]|0)){M=c[1054]|0;L3387:do{if((a[M+(B*40&-1)|0]&1)!=0){j=c[M+(B*40&-1)+36>>2]|0;L=M+(B*40&-1)+32|0;K=c[10036]|0;z=0;while(1){if((z|0)>=(j|0)){break}if((a[K+((c[L>>2]|0)+z|0)|0]|0)==(a[z+103664|0]|0)){z=z+1|0}else{break L3387}}if((z|0)==1){break L3385}}}while(0);a[14176]=1;is(e);a[14176]=0;if((c[e>>2]|0)!=3){c[13898]=B;break}M=c[e+8>>2]|0;c[8028]=M;if((M|0)!=0){J=c[m>>2]|0;aK(M|0,J|0);O=1;break L3376}P=c[13898]|0;uf(P,132744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[8028]=0;P=B;uf(P,132744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{l=2500}}while(0);if((l|0)==2500){uu(c[8028]|0);c[8028]=bP(96376)|0;O=0}L3406:do{if(s<0.0){l=c[3524]|0;do{if((l|0)!=0){P=c[l+116>>2]|0;if((P|0)==0){break}cL[P&7]();break L3406}}while(0);l=c[8028]|0;B=uA(l|0)|0;P=c[o>>2]|0;a6(l|0,B|0,P|0)}}while(0);if(s>0.0){P=~~(s*1.0e6);bH(P|0)}if((O|0)==0|s<0.0){a[25280]=0;i=b;return}aF(10,c[m>>2]|0);a[25280]=0;i=b;return}function ea(b,d){b=b|0;d=d|0;var e=0,f=0;e=i;f=c[7262]|0;do{if(!((f|0)==0|(f|0)==(c[m>>2]|0)|(f|0)==(c[n>>2]|0))){if((a[c[7260]|0]|0)==124){if((a2(f|0)|0)>=0){break}aS(c[7260]|0);break}else{if((az(f|0)|0)>=0){break}aS(c[7260]|0);break}}}while(0);f=c[7260]|0;if((f|0)!=0){uu(f)}c[7260]=0;if((b|0)==0){c[7262]=c[m>>2];i=e;return}if((aY(b|0,202112)|0)==0){c[7262]=c[n>>2];i=e;return}if((a[b]|0)!=124){f=bF(b|0,(d?205056:137896)|0)|0;c[7262]=f;if((f|0)==0){aS(b|0);i=e;return}else{c[7260]=b;i=e;return}}if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=bt(b+1|0,137896)|0;c[7262]=f;if((f|0)==0){aS(b|0);i=e;return}else{c[7260]=b;i=e;return}}function eb(){var a=0,b=0,d=0,e=0;a=i;b=ut(4096)|0;do{if((b|0)==0){gk();d=ut(4096)|0;if((d|0)!=0){e=d;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=88504,v)|0)}else{e=b}}while(0);bl(e|0,4096);cf(c[m>>2]|0,154696,(v=i,i=i+8|0,c[v>>2]=e,v)|0);uu(e);c[13898]=(c[13898]|0)+1;i=a;return}function ec(){var a=0,b=0;a=c[8804]|0;do{if((a|0)!=0){b=c[a>>2]|0;if((b|0)==0){break}cs(b|0)}}while(0);c[13898]=(c[13898]|0)+1;return}function ed(){c[13898]=(c[13898]|0)+1;aI(81576,27,1,c[m>>2]|0);return}function ee(){var b=0;b=c[13898]|0;c[13898]=b+1;c[7738]=b;a[30664]=0;hY(2);a[(e6(159824)|0)+8|0]=1;a[(e6(159208)|0)+8|0]=1;a[(e6(158720)|0)+8|0]=1;a[(e6(158096)|0)+8|0]=1;a[(e6(164136)|0)+8|0]=1;iZ();return}function ef(){k9();return}function eg(){var b=0,d=0,e=0;b=i;if((a[c[6924]|0]|0)==0){uf(c[13898]|0,84384,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[27704]&1)!=0){a[27704]=0;iL()}d=c[3524]|0;e=c[13898]|0;if((d|0)==0){uf(e,135392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=e+1;if((c[d+96>>2]&8|0)==0){dP();i=b;return}cS[c[d+36>>2]&511]();dP();i=b;return}function eh(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;b=i;i=i+32|0;d=b|0;e=b+24|0;c[e>>2]=0;f=c[13898]|0;g=f+1|0;c[13898]=g;h=c[1054]|0;j=c[h+(g*40&-1)+36>>2]|0;k=c[h+(g*40&-1)+32>>2]|0;l=(a[h+(g*40&-1)|0]&1)==0;m=(j|0)>0;o=c[10036]|0;L3484:do{if(l){p=2648}else{L3486:do{if(m){q=0;r=0;s=k;while(1){if((a[q+98416|0]|0)==(a[o+(q+s|0)|0]|0)){t=s;u=r}else{if((q|0)!=1){break L3486}t=s-1|0;u=1}w=q+1|0;if((w|0)<(u+j|0)){q=w;r=u;s=t}else{break}}if((u|0)==0){x=w;p=2585}else{y=25296;break L3484}}else{x=0;p=2585}}while(0);if((p|0)==2585){s=a[x+98416|0]|0;if((s<<24>>24|0)==36|(s<<24>>24|0)==0){y=25296;break}}if(l){p=2648;break}L3498:do{if(m){s=0;r=0;q=k;while(1){if((a[s+97808|0]|0)==(a[o+(s+q|0)|0]|0)){z=q;A=r}else{if((s|0)!=1){break L3498}z=q-1|0;A=1}B=s+1|0;if((B|0)<(A+j|0)){s=B;r=A;q=z}else{break}}if((A|0)==0){C=B;p=2631}else{y=25304;break L3484}}else{C=0;p=2631}}while(0);if((p|0)==2631){q=a[C+97808|0]|0;if((q<<24>>24|0)==36|(q<<24>>24|0)==0){y=25304;break}}if(l){p=2648;break}L3510:do{if(m){q=0;r=0;s=k;while(1){if((a[q+97200|0]|0)==(a[o+(q+s|0)|0]|0)){D=s;E=r}else{if((q|0)!=1){break L3510}D=s-1|0;E=1}F=q+1|0;if((F|0)<(E+j|0)){q=F;r=E;s=D}else{break}}if((E|0)==0){G=F;p=2639}else{y=25312;break L3484}}else{G=0;p=2639}}while(0);if((p|0)==2639){s=a[G+97200|0]|0;if((s<<24>>24|0)==36|(s<<24>>24|0)==0){y=25312;break}}if(l){p=2648;break}if(m){s=0;r=0;q=k;while(1){if((a[s+96640|0]|0)==(a[o+(s+q|0)|0]|0)){H=q;I=r}else{if((s|0)!=1){p=2648;break L3484}H=q-1|0;I=1}J=s+1|0;if((J|0)<(I+j|0)){s=J;r=I;q=H}else{break}}if((I|0)==0){K=J}else{y=25320;break}}else{K=0}q=a[K+96640|0]|0;if((q<<24>>24|0)==36|(q<<24>>24|0)==0){y=25320}else{p=2648}}}while(0);if((p|0)==2648){y=25328}p=c[y+4>>2]|0;if((p-1|0)>>>0<4){y=f+2|0;c[13898]=y;L=y}else{L=g}L3537:do{if((L|0)<(c[8272]|0)){L3539:do{if((a[h+(L*40&-1)|0]&1)!=0){g=c[h+(L*40&-1)+36>>2]|0;y=h+(L*40&-1)+32|0;f=0;while(1){if((f|0)>=(g|0)){break}if((a[o+((c[y>>2]|0)+f|0)|0]|0)==(a[f+103664|0]|0)){f=f+1|0}else{break L3539}}if((f|0)==1){break L3537}}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[d>>2]|0)!=3){c[13898]=L;break}y=c[d+8>>2]|0;c[e>>2]=y;if((y|0)==0){M=c[13898]|0;uf(M,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if((a[y]|0)==124){if(a[14168]|0){N=bt(y+1|0,137896)|0;O=y;break}else{uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{iQ(e);g=c[e>>2]|0;if((aY(g|0,202112)|0)==0){N=c[n>>2]|0;O=g;break}else{N=hA(g,137896)|0;O=g;break}}}while(0);if((N|0)==0){uj(c[13898]|0,82848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((p|0)==4){jI(N);i8(N);aI(172e3,9,1,N|0)}else if((p|0)==1){jI(N);y=c[10812]|0;if((y|0)!=0){g=y;do{y=c[g+12>>2]|0;if((y|0)!=0){cf(N|0,154696,(v=i,i=i+8|0,c[v>>2]=y,v)|0)}g=c[g>>2]|0;}while((g|0)!=0)}aI(172e3,9,1,N|0)}else if((p|0)==3){jI(N);jb(N);aI(172e3,9,1,N|0)}else if((p|0)==2){jd(N)}else{jc(N)}if((c[n>>2]|0)==(N|0)){uu(O);i=b;return}if((a[O]|0)==124){a2(N|0);uu(O);i=b;return}else{az(N|0);uu(O);i=b;return}}}while(0);c[e>>2]=0;M=L;uf(M,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function ei(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+24|0;d=b|0;e=(c[13898]|0)+1|0;c[13898]=e;if((e|0)>=(c[8272]|0)){f=0;uu(f);i=b;return}g=c[1054]|0;L3594:do{if((a[g+(e*40&-1)|0]&1)!=0){h=c[g+(e*40&-1)+36>>2]|0;j=g+(e*40&-1)+32|0;k=c[10036]|0;l=0;while(1){if((l|0)>=(h|0)){break}if((a[k+((c[j>>2]|0)+l|0)|0]|0)==(a[l+103664|0]|0)){l=l+1|0}else{break L3594}}if((l|0)==1){f=0}else{break}uu(f);i=b;return}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[d>>2]|0)!=3){c[13898]=e;f=0;uu(f);i=b;return}e=c[d+8>>2]|0;if((e|0)==0){f=0;uu(f);i=b;return}if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}bN(e|0);f=e;uu(f);i=b;return}function ej(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0.0,Y=0.0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0.0;b=i;i=i+8312|0;d=b|0;e=b+2048|0;f=b+8192|0;g=b+8240|0;j=b+8248|0;k=b+8256|0;l=b+8304|0;n=c[13898]|0;o=n+1|0;c[13898]=o;p=c[3524]|0;if((p|0)==0){uf(o,135392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}L3617:do{if((o|0)<(c[8272]|0)){q=c[1054]|0;r=(a[q+(o*40&-1)|0]&1)==0;L3619:do{if(r){s=c[10036]|0;t=2765}else{u=c[q+(o*40&-1)+36>>2]|0;w=q+(o*40&-1)+32|0;x=c[10036]|0;y=0;while(1){if((y|0)>=(u|0)){t=2680;break}if((a[x+((c[w>>2]|0)+y|0)|0]|0)==(a[y+103664|0]|0)){y=y+1|0}else{break}}if((t|0)==2680){if((y|0)==1){break L3617}}z=c[w>>2]|0;A=(u|0)>0;if(r){s=x;t=2765;break}L3629:do{if(A){B=0;C=0;D=z;while(1){if((a[B+142016|0]|0)==(a[x+(B+D|0)|0]|0)){E=D;F=C}else{if((B|0)!=4){break L3629}E=D-1|0;F=1}G=B+1|0;if((G|0)<(F+u|0)){B=G;C=F;D=E}else{break}}if((F|0)==0){H=G;t=2689}else{I=5696;J=x;break L3619}}else{H=0;t=2689}}while(0);if((t|0)==2689){w=a[H+142016|0]|0;if((w<<24>>24|0)==36|(w<<24>>24|0)==0){I=5696;J=x;break}}if(r){s=x;t=2765;break}L3641:do{if(A){w=0;y=0;D=z;while(1){if((a[w+205488|0]|0)==(a[x+(w+D|0)|0]|0)){K=D;L=y}else{if((w|0)!=3){break L3641}K=D-1|0;L=1}M=w+1|0;if((M|0)<(L+u|0)){w=M;y=L;D=K}else{break}}if((L|0)==0){N=M;t=2759}else{I=5704;J=x;break L3619}}else{N=0;t=2759}}while(0);if((t|0)==2759){D=a[N+205488|0]|0;if((D<<24>>24|0)==36|(D<<24>>24|0)==0){I=5704;J=x;break}}if(r){s=x;t=2765;break}if(A){D=0;while(1){if((a[D+141856|0]|0)!=(a[x+(D+z|0)|0]|0)){s=x;t=2765;break L3619}y=D+1|0;if((y|0)<(u|0)){D=y}else{P=y;break}}}else{P=0}D=a[P+141856|0]|0;if((D<<24>>24|0)==36|(D<<24>>24|0)==0){I=5712;J=x}else{s=x;t=2765}}}while(0);if((t|0)==2765){I=5720;J=s}r=c[I+4>>2]|0;if((r|0)==2){if((c[p+136>>2]|0)==0){Q=0}else{Q=(c[p+144>>2]|0)!=0}D=a$()|0;u=c[13898]|0;z=u+1|0;c[13898]=z;L3666:do{if((z|0)<(c[8272]|0)){A=c[1054]|0;y=c[A+(z*40&-1)+36>>2]|0;L3668:do{if((a[A+(z*40&-1)|0]&1)==0){R=c[10036]|0;S=A+(z*40&-1)+32|0}else{w=A+(z*40&-1)+32|0;C=c[10036]|0;B=0;while(1){if((B|0)>=(y|0)){break}if((a[C+((c[w>>2]|0)+B|0)|0]|0)==(a[B+103664|0]|0)){B=B+1|0}else{R=C;S=w;break L3668}}if((B|0)==1){T=93664;break L3666}else{R=C;S=w}}}while(0);A=(y|0)!=3;x=A&1;U=R+(c[S>>2]|0)|0;if(A){V=x}else{A=((aZ(U|0,114,3)|0)==0&1)+x|0;x=A+((aZ(U|0,103,3)|0)==0&1)|0;V=x+((aZ(U|0,98,3)|0)==0&1)|0}if((V|0)==0){c[13898]=u+2;T=U;break}else{uf(z,215792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{T=93664}}while(0);if((D|0)==0){uf(-1,215320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{W=0}do{X=+(W|0)/255.0;h[d+(W<<3)>>3]=X;if((a[20668]|0)==110){Y=1.0-X}else{Y=X}fq(Y,e+(W*24&-1)|0);W=W+1|0;}while((W|0)<256);c[11254]=0;z=c[6924]|0;if((z|0)==0){Z=0}else{Z=bP(z|0)|0}z=a[37384]&1;aI(5992,208,1,D|0);if(Q){aI(5976,13,1,D|0)}aI(5728,243,1,D|0);aF(112,D|0);if((a[T]|0)!=0){u=0;do{if((u|0)>0){aF(44,D|0)}aI(214288,7,1,D|0);U=a[T+u|0]|0;if((U|0)==114){aI(213544,25,1,D|0)}else if((U|0)==103){aI(213024,29,1,D|0)}else if((U|0)==98){aI(212416,27,1,D|0)}u=u+1|0;}while(u>>>0<(uA(T|0)|0)>>>0)}aI(211904,28,1,D|0);aF(10,D|0);u=a[T]|0;U=0;do{if((u<<24>>24|0)==103){_=e+(U*24&-1)+8|0}else if((u<<24>>24|0)==114){_=e+(U*24&-1)|0}else{_=e+(U*24&-1)+16|0}X=+h[_>>3];cf(D|0,210888,(v=i,i=i+16|0,h[v>>3]=+h[d+(U<<3)>>3],h[v+8>>3]=X,v)|0);U=U+1|0;}while((U|0)<256);aI(210424,2,1,D|0);U=a[T+1|0]|0;u=0;do{if((U<<24>>24|0)==103){$=e+(u*24&-1)+8|0}else if((U<<24>>24|0)==114){$=e+(u*24&-1)|0}else{$=e+(u*24&-1)+16|0}X=+h[$>>3];cf(D|0,210888,(v=i,i=i+16|0,h[v>>3]=+h[d+(u<<3)>>3],h[v+8>>3]=X,v)|0);u=u+1|0;}while((u|0)<256);aI(210424,2,1,D|0);u=a[T+2|0]|0;U=0;do{if((u<<24>>24|0)==103){aa=e+(U*24&-1)+8|0}else if((u<<24>>24|0)==114){aa=e+(U*24&-1)|0}else{aa=e+(U*24&-1)+16|0}X=+h[aa>>3];cf(D|0,210888,(v=i,i=i+16|0,h[v>>3]=+h[d+(U<<3)>>3],h[v+8>>3]=X,v)|0);U=U+1|0;}while((U|0)<256);aI(210424,2,1,D|0);U=0;do{X=+h[e+(U*24&-1)>>3]*.299+ +h[e+(U*24&-1)+8>>3]*.587+ +h[e+(U*24&-1)+16>>3]*.114;cf(D|0,210888,(v=i,i=i+16|0,h[v>>3]=+h[d+(U<<3)>>3],h[v+8>>3]=X,v)|0);U=U+1|0;}while((U|0)<256);aI(210424,2,1,D|0);aI(6208,14,1,D|0);jI(D);jb(D);aI(172e3,9,1,D|0);cs(D|0);hw(D,0,0);c[11254]=1;uu(c[6924]|0);c[6924]=Z;a[37384]=z;c[8272]=0;c[13898]=0;i=b;return}else if((r|0)==3){U=k;c[g>>2]=0;c[j>>2]=0;u=n+2|0;c[13898]=u;if((a[q+(u*40&-1)|0]&1)==0){i=b;return}x=a[J+(c[q+(u*40&-1)+32>>2]|0)|0]|0;if(!((x<<24>>24|0)==39|(x<<24>>24|0)==34)){i=b;return}ub(g,u,u);u=(c[13898]|0)+1|0;c[13898]=u;x=c[1054]|0;do{if((a[x+(u*40&-1)|0]&1)!=0){A=a[(c[10036]|0)+(c[x+(u*40&-1)+32>>2]|0)|0]|0;if(!((A<<24>>24|0)==39|(A<<24>>24|0)==34)){break}ub(j,u,u);uE(U|0,0,44);A=c[j>>2]|0;ab=c[g>>2]|0;t1(A,ab,k,l);X=+t2(k);ac=c[m>>2]|0;ad=k+12|0;ae=c[ad>>2]|0;af=k+16|0;ag=(c[af>>2]|0)+1|0;ah=k+20|0;ai=(c[ah>>2]|0)%100&-1;aj=k+8|0;ak=c[aj>>2]|0;al=k+4|0;am=c[al>>2]|0;an=k|0;ao=c[an>>2]|0;ap=k+24|0;aq=c[ap>>2]|0;ar=k+28|0;as=c[ar>>2]|0;cf(ac|0,217600,(v=i,i=i+72|0,h[v>>3]=X,c[v+8>>2]=ae,c[v+16>>2]=ag,c[v+24>>2]=ai,c[v+32>>2]=ak,c[v+40>>2]=am,c[v+48>>2]=ao,c[v+56>>2]=aq,c[v+64>>2]=as,v)|0);uE(U|0,0,44);t3(k,X);as=uA(A|0)|0;t3(f,X);at=X- +O(+X);t4(A,as,ab,f,at);ab=c[m>>2]|0;as=c[ad>>2]|0;ad=(c[af>>2]|0)+1|0;af=(c[ah>>2]|0)%100&-1;ah=c[aj>>2]|0;aj=c[al>>2]|0;al=c[an>>2]|0;an=c[ap>>2]|0;ap=c[ar>>2]|0;cf(ab|0,216816,(v=i,i=i+72|0,c[v>>2]=A,c[v+8>>2]=as,c[v+16>>2]=ad,c[v+24>>2]=af,c[v+32>>2]=ah,c[v+40>>2]=aj,c[v+48>>2]=al,c[v+56>>2]=an,c[v+64>>2]=ap,v)|0);uu(A);c[13898]=(c[13898]|0)+1}}while(0);uu(c[g>>2]|0);i=b;return}else if((r|0)==1){lG();i=b;return}else{uf(o,80152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);lG();i=b;return}function ek(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=i;i=i+48|0;d=b|0;e=b+24|0;f=(c[13898]|0)+1|0;c[13898]=f;if((f|0)>=(c[8272]|0)){g=f;uf(g,79192,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}h=c[1054]|0;L3758:do{if((a[h+(f*40&-1)|0]&1)!=0){j=c[h+(f*40&-1)+36>>2]|0;k=h+(f*40&-1)+32|0;l=c[10036]|0;m=0;while(1){if((m|0)>=(j|0)){break}if((a[l+((c[k>>2]|0)+m|0)|0]|0)==(a[m+103664|0]|0)){m=m+1|0}else{break L3758}}if((m|0)==1){g=f}else{break}uf(g,79192,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);a[14176]=1;is(e);a[14176]=0;if((c[e>>2]|0)!=3){c[13898]=f;g=f;uf(g,79192,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=c[e+8>>2]|0;e=c[13898]|0;if((f|0)==0){g=e;uf(g,79192,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((e|0)>=(c[8272]|0)){n=0;fc(f,n);uu(n);uu(f);i=b;return}g=c[1054]|0;h=(a[g+(e*40&-1)|0]&1)==0;L3776:do{if(h){o=d}else{k=c[g+(e*40&-1)+36>>2]|0;l=g+(e*40&-1)+32|0;j=c[10036]|0;p=0;while(1){if((p|0)>=(k|0)){q=2788;break}if((a[j+((c[l>>2]|0)+p|0)|0]|0)==(a[p+103664|0]|0)){p=p+1|0}else{break}}do{if((q|0)==2788){if((p|0)==1){n=0}else{break}fc(f,n);uu(n);uu(f);i=b;return}}while(0);p=d;if(h){o=p;break}l=c[g+(e*40&-1)+36>>2]|0;j=g+(e*40&-1)+32|0;k=c[10036]|0;m=0;while(1){if((m|0)>=(l|0)){break}if((a[k+((c[j>>2]|0)+m|0)|0]|0)==(a[m+103664|0]|0)){m=m+1|0}else{o=p;break L3776}}if((m|0)==1){r=e}else{o=p;break}uf(r,78672,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[d>>2]|0)!=3){c[13898]=e;r=e;uf(r,78672,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=c[d+8>>2]|0;if((e|0)!=0){n=e;fc(f,n);uu(n);uu(f);i=b;return}r=c[13898]|0;uf(r,78672,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function el(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=c[13898]|0;d=c[8272]|0;L3802:do{if((b|0)<(d|0)){e=c[1054]|0;f=b;do{L3806:do{if((a[e+(f*40&-1)|0]&1)!=0){g=c[e+(f*40&-1)+36>>2]|0;h=e+(f*40&-1)+32|0;j=c[10036]|0;k=0;while(1){if((k|0)>=(g|0)){break}if((a[j+((c[h>>2]|0)+k|0)|0]|0)==(a[k+103664|0]|0)){k=k+1|0}else{break L3806}}if((k|0)==1){break L3802}}}while(0);f=f+1|0;c[13898]=f;}while((f|0)<(d|0))}}while(0);uf(b,78216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function em(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;b=i;i=i+8|0;d=b|0;e=bU(140128)|0;f=(e|0)==0?138024:e;if((c[10010]|0)==0){e=ut(1024)|0;do{if((e|0)==0){gk();g=ut(1024)|0;if((g|0)!=0){h=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74912,v)|0)}else{h=e}}while(0);c[10010]=h;h=ut(1024)|0;do{if((h|0)==0){gk();e=ut(1024)|0;if((e|0)!=0){j=e;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74440,v)|0)}else{j=h}}while(0);c[10008]=j;a[j]=0;a[c[10010]|0]=0}if(!(a[40024]|0)){a[c[10008]|0]=0;a[c[10010]|0]=0}a[40024]=0;j=c[10010]|0;h=uA(j|0)|0;e=(c[13898]|0)+1|0;c[13898]=e;g=c[8272]|0;L3829:do{if((e|0)<(g|0)){k=c[1054]|0;l=e;while(1){L3833:do{if((a[k+(l*40&-1)|0]&1)!=0){m=c[k+(l*40&-1)+36>>2]|0;n=k+(l*40&-1)+32|0;o=c[10036]|0;p=0;while(1){if((p|0)>=(m|0)){break}if((a[o+((c[n>>2]|0)+p|0)|0]|0)==(a[p+103664|0]|0)){p=p+1|0}else{break L3833}}if((p|0)==1){q=l;break L3829}}}while(0);n=l+1|0;c[13898]=n;if((n|0)<(g|0)){l=n}else{q=n;break}}}else{q=e}}while(0);if((h|0)>0){a[j+h|0]=32;r=h+1|0;s=c[10010]|0;t=c[13898]|0}else{r=h;s=j;t=q}q=s+r|0;s=t-1|0;t=1024-r|0;r=c[1054]|0;j=(c[r+(s*40&-1)+36>>2]|0)+(c[r+(s*40&-1)+32>>2]|0)|0;s=c[r+(e*40&-1)+32>>2]|0;if((j-s|0)<(t|0)){u=j}else{u=(t-1|0)+s|0}L3847:do{if((s|0)<(u|0)){t=q;j=s;while(1){e=a[(c[10036]|0)+j|0]|0;if(e<<24>>24==0){w=t;break L3847}r=t+1|0;a[t]=e;e=j+1|0;if((e|0)<(u|0)){t=r;j=e}else{w=r;break}}}else{w=q}}while(0);a[w]=0;w=(c[10010]|0)+h|0;q=a[w]|0;if(q<<24>>24==0){x=w}else{u=w;s=w;w=0;j=q;while(1){do{if((aM(j&255|0)|0)==0){a[s]=a[u]|0;y=0;z=s+1|0}else{if(w){y=1;z=s;break}a[s]=32;y=1;z=s+1|0}}while(0);q=u+1|0;t=a[q]|0;if(t<<24>>24==0){x=z;break}else{u=q;s=z;w=y;j=t}}}a[x]=0;x=c[10010]|0;j=uA(x|0)|0;if((aY(x+((h|0)==0?0:h+1|0)|0,216168)|0)==0){a[d]=1;a[x+h|0]=0;A=1;B=c[10010]|0}else{a[d]=0;A=0;B=x}x=gm(B,f,d)|0;if((x|0)==1){B=c[10010]|0;bD(224888,(v=i,i=i+8|0,c[v>>2]=B,v)|0);C=c[10010]|0;D=C+h|0;a[D]=0;i=b;return}else if((x|0)==0){a[25280]=0;if((a[d]&1)==0|A){C=c[10010]|0;D=C+h|0;a[D]=0;i=b;return}A=(j|0)>0;L3873:while(1){j=c[10008]|0;if(A){uD(j|0,73672,13);B=c[10010]|0;ck(j|0,B|0,1008);B=c[10008]|0;y=B+(uA(B|0)|0)|0;a[y]=a[212304]|0;a[y+1|0]=a[212305|0]|0;a[y+2|0]=a[212306|0]|0;E=c[10008]|0}else{uD(j|0,225272,13);E=j}dF(E,0);j=jl(40144,40136)|0;c[8272]=j;c[13898]=0;if((j|0)<1){F=2870;break}j=c[1054]|0;L3880:do{if((a[j|0]&1)!=0){y=c[j+36>>2]|0;B=j+32|0;w=c[10036]|0;z=0;while(1){if((z|0)>=(y|0)){break}if((a[w+((c[B>>2]|0)+z|0)|0]|0)==(a[z+103664|0]|0)){z=z+1|0}else{break L3880}}if((z|0)==1){F=2871;break L3873}}}while(0);c[13898]=-1;a[40024]=1;em();if((a[d]&1)==0){F=2872;break}}if((F|0)==2870){C=c[10010]|0;D=C+h|0;a[D]=0;i=b;return}else if((F|0)==2871){C=c[10010]|0;D=C+h|0;a[D]=0;i=b;return}else if((F|0)==2872){C=c[10010]|0;D=C+h|0;a[D]=0;i=b;return}}else if((x|0)==(-1|0)){aS(f|0);C=c[10010]|0;D=C+h|0;a[D]=0;i=b;return}else{uf(-1,223936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function en(){var b=0,d=0,e=0,f=0,g=0;b=i;a[25280]=0;c[13898]=(c[13898]|0)+1;d=c[256]|0;if((d|0)==0){e=c[m>>2]|0;f=aF(10,e|0)|0;i=b;return}g=uF(46781,d|0,93)|0;if((uA(d|0)|0)>>>0>=93){a[46873]=0}if((bN(g|0)|0)==0){e=c[m>>2]|0;f=aF(10,e|0)|0;i=b;return}else{uj(-1,223328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function eo(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}f=bt(b|0,193632|0)|0;if((f|0)==0){uj(-1,221448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}b=ut(1024)|0;do{if((b|0)==0){gk();g=ut(1024)|0;if((g|0)!=0){h=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=220968,v)|0);return 0}else{h=b}}while(0);a[h]=0;b=h;h=0;g=1024;L3914:while(1){j=h;while(1){k=a1(f|0)|0;if((k|0)==-1){l=2898;break L3914}m=j+1|0;n=b+j|0;a[n]=k&255;if((m|0)==(g|0)){break}else{j=m}}if((g|0)>1048575){l=2896;break}m=g+1024|0;b=db(b,m,218568)|0;h=g;g=m}if((l|0)==2898){o=b+j|0;a[o]=0;p=a2(f|0)|0;q=uA(b|0)|0;r=q+1|0;s=db(b,r,220968)|0;c[d>>2]=s;i=e;return p|0}else if((l|0)==2896){uh(-1,219104,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);o=n;a[o]=0;p=a2(f|0)|0;q=uA(b|0)|0;r=q+1|0;s=db(b,r,220968)|0;c[d>>2]=s;i=e;return p|0}return 0}function ep(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0,N=0.0,S=0.0,T=0,U=0.0,V=0,W=0.0,X=0.0,Y=0.0,ab=0.0,ac=0.0,ad=0.0,ae=0.0,af=0.0,ag=0.0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0.0,bf=0.0,bg=0.0,bh=0,bi=0.0,bj=0.0,bk=0.0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0,bz=0,bA=0.0,bB=0.0,bC=0.0,bD=0,bE=0,bF=0.0,bG=0,bH=0,bI=0,bJ=0.0,bK=0.0,bL=0,bM=0,bN=0,bO=0,bP=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0.0,b3=0,b4=0,b5=0,b6=0,b7=0,b8=0.0,b9=0,ca=0,cb=0.0,cc=0,cd=0,ce=0,cf=0,cg=0,ch=0,ci=0,cj=0,ck=0.0;e=i;i=i+24|0;f=e|0;g=e+8|0;j=e+16|0;k=c[13374]|0;c[9348]=c[13378];c[13370]=0;l=d+8|0;n=c[l>>2]|0;h[15]=8.988465674311579e+307;h[70]=8.988465674311579e+307;h[98]=8.988465674311579e+307;h[16]=-8.988465674311579e+307;h[71]=-8.988465674311579e+307;h[99]=-8.988465674311579e+307;if((b|0)>0){o=(n|0)>0;p=0;q=d;r=-8.988465674311579e+307;s=-8.988465674311579e+307;t=-8.988465674311579e+307;u=8.988465674311579e+307;w=8.988465674311579e+307;x=8.988465674311579e+307;while(1){y=c[q+12>>2]|0;if(o){z=0;A=r;B=s;C=t;D=u;E=w;F=x;while(1){do{if((c[y+(z<<6)>>2]|0)==2){G=A;H=B;I=C;J=D;K=E;L=F}else{M=y+(z<<6)+8|0;N=+h[M>>3];if(N>A){h[99]=N;S=N}else{S=A}T=y+(z<<6)+16|0;N=+h[T>>3];if(N>B){h[71]=N;U=N}else{U=B}V=y+(z<<6)+24|0;N=+h[V>>3];if(N>C){h[16]=N;W=N}else{W=C}N=+h[M>>3];if(N>3];if(N>3];if(N>=F){G=S;H=U;I=W;J=X;K=Y;L=F;break}h[15]=N;G=S;H=U;I=W;J=X;K=Y;L=N}}while(0);V=z+1|0;if((V|0)<(n|0)){z=V;A=G;B=H;C=I;D=J;E=K;F=L}else{ab=G;ac=H;ad=I;ae=J;af=K;ag=L;break}}}else{ab=r;ac=s;ad=t;ae=u;af=w;ag=x}z=p+1|0;if((z|0)<(b|0)){p=z;q=c[q>>2]|0;r=ab;s=ac;t=ad;u=ae;w=af;x=ag}else{break}}}q=c[d+12>>2]|0;p=(c[l>>2]|0)-1|0;l=(p|0)>0;L3955:do{if(l){n=0;o=0;z=0;L3956:while(1){y=q+(z<<6)|0;V=z+1|0;T=q+(V<<6)|0;do{if((c[y>>2]|0)==0){if((c[T>>2]|0)!=0){ah=o;ai=n;break}M=ut(28)|0;if((M|0)==0){gk();aj=ut(28)|0;if((aj|0)==0){break L3956}else{ak=aj}}else{ak=M}M=ak;c[ak>>2]=0;c[ak+4>>2]=0;c[ak+8>>2]=y;c[ak+12>>2]=T;c[ak+16>>2]=0;c[ak+24>>2]=1;if((o|0)==0){ah=M;ai=M;break}c[o+16>>2]=M;ah=M;ai=n}else{ah=o;ai=n}}while(0);if((V|0)<(p|0)){n=ai;o=ah;z=V}else{al=ai;am=ah;break L3955}}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=212672,v)|0);return 0}else{al=0;am=0}}while(0);L3968:do{if((b|0)>1){ah=al;ai=am;ak=0;z=2;o=q;n=d;T=al;y=0;L3969:while(1){M=c[n>>2]|0;aj=c[M+12>>2]|0;do{if((c[o>>2]|0)==0){if((c[aj>>2]|0)!=0){an=0;ao=ai;ap=T;break}aq=ut(28)|0;if((aq|0)==0){gk();ar=ut(28)|0;if((ar|0)==0){as=2935;break L3969}else{at=ar}}else{at=aq}aq=at;c[at>>2]=0;c[at+4>>2]=0;c[at+8>>2]=o;c[at+12>>2]=aj;c[at+16>>2]=0;c[at+24>>2]=1;if((ai|0)==0){an=aq;ao=aq;ap=aq;break}c[ai+16>>2]=aq;an=aq;ao=aq;ap=T}else{an=0;ao=ai;ap=T}}while(0);do{if(l){V=0;aq=ao;ar=0;au=ak;av=an;aw=ah;ax=0;ay=ap;az=y;while(1){do{if((aw|0)==0){aA=0;aB=0}else{if((c[aw+8>>2]|0)!=(o+(ax<<6)|0)){aA=aw;aB=0;break}aA=c[aw+16>>2]|0;aB=aw}}while(0);aC=ax+1|0;aD=o+(aC<<6)|0;aE=aj+(ax<<6)|0;aF=aD|0;aG=aE|0;do{if((c[aF>>2]|0)==0){if((c[aG>>2]|0)!=0){aH=au;aJ=0;aK=1;aL=aq;aM=ay;aN=az;break}aO=ut(28)|0;if((aO|0)==0){gk();aP=ut(28)|0;if((aP|0)==0){as=2946;break L3969}else{aQ=aP}}else{aQ=aO}aO=aQ;aP=aQ;c[aP>>2]=0;aR=aQ+4|0;c[aR>>2]=0;c[aQ+8>>2]=aD;c[aQ+12>>2]=aE;c[aQ+16>>2]=0;aS=aQ+24|0;c[aS>>2]=1;if((aq|0)==0){aT=aO}else{c[aq+16>>2]=aO;aT=ay}c[aS>>2]=3;if((av|0)==0|(aB|0)==0){aH=au;aJ=aO;aK=0;aL=aO;aM=aT;aN=az;break}aS=ut(16)|0;if((aS|0)==0){gk();aU=ut(16)|0;if((aU|0)==0){as=2952;break L3969}else{aV=aU}}else{aV=aS}aS=aV;c[aV>>2]=av;c[aV+4>>2]=aO;c[aV+8>>2]=aB;c[aV+12>>2]=0;aU=av|0;if((c[aU>>2]|0)==0){c[aU>>2]=aS}else{c[av+4>>2]=aS}if((c[aP>>2]|0)==0){c[aP>>2]=aS}else{c[aR>>2]=aS}aR=aB|0;if((c[aR>>2]|0)==0){c[aR>>2]=aS}else{c[aB+4>>2]=aS}if((au|0)==0){aH=aS;aJ=aO;aK=0;aL=aO;aM=aT;aN=aS;break}c[au+12>>2]=aS;aH=aS;aJ=aO;aK=0;aL=aO;aM=aT;aN=az}else{aH=au;aJ=0;aK=1;aL=aq;aM=ay;aN=az}}while(0);aO=aj+(aC<<6)|0;do{if((c[aG>>2]|0)==0){if((c[aO>>2]|0)!=0){aW=0;aX=ar;aY=V;break}aS=ut(28)|0;if((aS|0)==0){gk();aR=ut(28)|0;if((aR|0)==0){as=2968;break L3969}else{aZ=aR}}else{aZ=aS}aS=aZ;c[aZ>>2]=0;c[aZ+4>>2]=0;c[aZ+8>>2]=aE;c[aZ+12>>2]=aO;c[aZ+16>>2]=0;c[aZ+24>>2]=1;if((ar|0)==0){aW=aS;aX=aS;aY=aS;break}c[ar+16>>2]=aS;aW=aS;aX=aS;aY=V}else{aW=0;aX=ar;aY=V}}while(0);do{if((c[aF>>2]|0)==0){if((c[aO>>2]|0)!=0){a_=aH;a$=aL;a0=0;a1=aM;a2=aN;break}aE=ut(28)|0;if((aE|0)==0){gk();aG=ut(28)|0;if((aG|0)==0){as=2975;break L3969}else{a3=aG}}else{a3=aE}aE=a3;aG=a3;c[aG>>2]=0;aS=a3+4|0;c[aS>>2]=0;c[a3+8>>2]=aD;c[a3+12>>2]=aO;c[a3+16>>2]=0;c[a3+24>>2]=1;if((aL|0)==0){a4=aE}else{c[aL+16>>2]=aE;a4=aM}if(aK|(aW|0)==0){a_=aH;a$=aE;a0=aE;a1=a4;a2=aN;break}aR=ut(16)|0;if((aR|0)==0){gk();aP=ut(16)|0;if((aP|0)==0){as=2981;break L3969}else{a5=aP}}else{a5=aR}aR=a5;c[a5>>2]=aJ;c[a5+4>>2]=aW;c[a5+8>>2]=aE;c[a5+12>>2]=0;aP=aJ|0;if((c[aP>>2]|0)==0){c[aP>>2]=aR}else{c[aJ+4>>2]=aR}aP=aW|0;if((c[aP>>2]|0)==0){c[aP>>2]=aR}else{c[aW+4>>2]=aR}if((c[aG>>2]|0)==0){c[aG>>2]=aR}else{c[aS>>2]=aR}if((aH|0)==0){a_=aR;a$=aE;a0=aE;a1=a4;a2=aR;break}c[aH+12>>2]=aR;a_=aR;a$=aE;a0=aE;a1=a4;a2=aN}else{a_=aH;a$=aL;a0=0;a1=aM;a2=aN}}while(0);if((aC|0)<(p|0)){V=aY;aq=a$;ar=aX;au=a_;av=a0;aw=aA;ax=aC;ay=a1;az=a2}else{break}}if((aY|0)==0){a6=a$;a7=a_;a8=0;a9=a1;ba=a2;break}if((a1|0)==0){a6=aX;a7=a_;a8=aY;a9=aY;ba=a2;break}c[a$+16>>2]=aY;a6=aX;a7=a_;a8=aY;a9=a1;ba=a2}else{a6=ao;a7=ak;a8=0;a9=ap;ba=y}}while(0);if((z|0)>=(b|0)){bb=a9;bc=ba;break L3968}ah=a8;ai=a6;ak=a7;z=z+1|0;o=aj;n=M;T=a9;y=ba}if((as|0)==2968){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=212672,v)|0);return 0}else if((as|0)==2935){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=212672,v)|0);return 0}else if((as|0)==2952){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=170896,v)|0);return 0}else if((as|0)==2975){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=212672,v)|0);return 0}else if((as|0)==2981){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=170896,v)|0);return 0}else if((as|0)==2946){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=212672,v)|0);return 0}}else{bb=al;bc=0}}while(0);al=(bb|0)==0;if(!al){ba=bb;do{if((c[ba>>2]|0)==0){as=3001}else{if((c[ba+4>>2]|0)==0){as=3001}}if((as|0)==3001){as=0;c[ba+24>>2]=2}ba=c[ba+16>>2]|0;}while((ba|0)!=0)}c[12922]=0;if((c[13372]|0)==0){ag=+h[16]- +h[15];if(ag==0.0){bd=0;i=e;return bd|0}x=+P(+ag);ba=(c[13374]<<1)+2|0;ag=+R(10.0,+(+O(+(+bQ(+x)))));af=x/ag;x=+(ba|0)/af;do{if(x>40.0){be=.05}else{if(x>20.0){be=.1;break}if(x>10.0){be=.2;break}if(x>4.0){be=.5;break}if(x>2.0){be=1.0;break}if(x>.5){be=2.0;break}be=+$(+af)}}while(0);af=ag*be;be=af*+O(+(+h[15]/af));bf=af;bg=be;bh=~~+O(+((+h[16]-be)/af))}else{bf=0.0;bg=0.0;bh=k}L4084:do{if((bh|0)>0){af=bf*.01;k=0;be=bg;L4086:while(1){ba=c[13372]|0;do{if((ba|0)==2){ag=+h[(c[11662]|0)+(k<<3)>>3];if((a[64788]&1)==0){bi=ag;break}x=+_(+ag);bi=x/+h[8100]}else if((ba|0)==0){x=bf+be;bi=+P(+x)>3];if((a[64788]&1)==0){bj=+h[a9+8>>3];bk=x}else{ag=+_(+x);x=+h[8100];bj=+_(+(+h[a9+8>>3]))/x;bk=ag/x}bi=bk+ +(k|0)*bj}else{bi=be}}while(0);h[6688]=bi;ba=c[13370]|0;x=+h[98];ag=+h[99];w=+h[70];ae=+h[71];do{if(al){c[j>>2]=0}else{M=bb;aj=0;while(1){a9=M+20|0;if(+h[(c[M+8>>2]|0)+24>>3]>=bi^+h[(c[M+12>>2]|0)+24>>3]>=bi){a[a9]=1;bl=aj+1|0}else{a[a9]=0;bl=aj}a9=c[M+16>>2]|0;if((a9|0)==0){break}else{M=a9;aj=bl}}c[j>>2]=bl;if((bl|0)<=0){break}u=ag-x;ad=ae-w;aj=0;while(1){L4110:do{if((aj&1)==0){M=bb;while(1){if((a[M+20|0]&1)!=0){if((c[M+24>>2]|0)==2){break}}a9=c[M+16>>2]|0;if((a9|0)==0){bm=1;as=3037;break L4110}else{M=a9}}bn=eu(M,bi,j,0)|0;bo=aj;as=3043}else{bm=aj;as=3037}}while(0);do{if((as|0)==3037){as=0;aC=bb;while(1){if((a[aC+20|0]&1)!=0){if((c[aC+24>>2]|0)!=2){as=3042;break}}a9=c[aC+16>>2]|0;if((a9|0)==0){as=3041;break}else{aC=a9}}if((as|0)==3041){as=0;c[j>>2]=0;M=c[m>>2]|0;aI(76408,34,1,M|0);bp=bm;break}else if((as|0)==3042){as=0;bn=eu(aC,bi,j,1)|0;bo=1;as=3043;break}}}while(0);do{if((as|0)==3043){as=0;M=(bo&1)!=0;if((bn|0)==0){bp=bo;break}a9=c[9348]|0;L4130:do{if((a9|0)==1){do{if(M){bq=1}else{a7=bn;while(1){a6=c[a7+16>>2]|0;if((a6|0)==0){break}else{a7=a6}}t=+P(+(+h[99]- +h[98]));if(+P(+(+h[a7>>3]- +h[bn>>3]))>=t*1.0e-5){bq=0;break}t=+P(+(+h[71]- +h[70]));bq=+P(+(+h[a7+8>>3]- +h[bn+8>>3]))>2]|0;if((b|0)==0){bs=bn;break}else{a6=b;a8=br}}while(1){bt=bs+16|0;a6=c[bt>>2]|0;if((a6|0)==0){break}else{bs=a6}}do{if(bq){t=+P(+(+h[99]- +h[98]));if(+P(+(+h[bs>>3]- +h[bn>>3]))>3]- +h[bn+8>>3]))>2]=bn;bu=a8+2|0}else{bu=br}}while(0);a8=bu<<3;a6=ut(a8)|0;if((a6|0)==0){gk();b=ut(a8)|0;if((b|0)==0){as=3081;break L4086}else{bv=b}}else{bv=a6}a6=bv;b=ut(a8)|0;if((b|0)==0){gk();ap=ut(a8)|0;if((ap|0)==0){as=3084;break L4086}else{bw=ap}}else{bw=b}b=bw;ap=ut(a8)|0;if((ap|0)==0){gk();ao=ut(a8)|0;if((ao|0)==0){as=3087;break L4086}else{bx=ao}}else{bx=ap}ap=bx;t=+h[11];L4158:do{if((bu|0)>2){ac=ad>t?ad:t;s=u>t?u:t;ao=bu*24&-1;a8=ut(ao)|0;if((a8|0)==0){gk();a2=ut(ao)|0;if((a2|0)==0){as=3091;break L4086}else{by=a2}}else{by=a8}a8=by;a2=bu-1|0;if((a2|0)>0){ao=0;a1=bn;while(1){aY=a1+16|0;a_=b+(ao<<3)|0;h[a_>>3]=+h[c[aY>>2]>>3]- +h[a1>>3];ab=+h[(c[aY>>2]|0)+8>>3]- +h[a1+8>>3];aX=ap+(ao<<3)|0;h[aX>>3]=ab;r=+h[a_>>3]/s;L=ab/ac;ab=+Q(+(r*r+L*L));a$=a6+(ao<<3)|0;h[a$>>3]=ab;h[a_>>3]=+h[a_>>3]/ab;h[aX>>3]=+h[aX>>3]/+h[a$>>3];a$=ao+1|0;if((a$|0)<(a2|0)){ao=a$;a1=c[aY>>2]|0}else{break}}}if(bq){h[a6+(a2<<3)>>3]=+h[a6>>3];h[b+(a2<<3)>>3]=+h[b>>3];h[ap+(a2<<3)>>3]=+h[ap>>3];bz=a2}else{bz=bu-2|0}a1=(bz|0)>0;if(a1){ao=0;while(1){a7=a6+(ao<<3)|0;h[a8+(ao*24&-1)>>3]=+h[a7>>3];aY=ao+1|0;a$=a6+(aY<<3)|0;h[a8+(ao*24&-1)+8>>3]=(+h[a7>>3]+ +h[a$>>3])*2.0;h[a8+(ao*24&-1)+16>>3]=+h[a$>>3];a$=b+(ao<<3)|0;h[a$>>3]=(+h[b+(aY<<3)>>3]- +h[a$>>3])*6.0;a7=ap+(ao<<3)|0;ab=(+h[ap+(aY<<3)>>3]- +h[a7>>3])*6.0;h[a7>>3]=ab;L=+h[a$>>3];r=L/s;K=ab/ac;ab=+Q(+(r*r+K*K))/8.5;if(ab>1.0){h[a$>>3]=L/ab;h[a7>>3]=+h[a7>>3]/ab}if((aY|0)<(bz|0)){ao=aY}else{break}}}if(!bq){ao=by;aY=by+8|0;h[aY>>3]=+h[ao>>3]+ +h[aY>>3];h[ao>>3]=0.0;ao=bz-1|0;aY=a8+(ao*24&-1)+16|0;a7=a8+(ao*24&-1)+8|0;h[a7>>3]=+h[aY>>3]+ +h[a7>>3];h[aY>>3]=0.0}L4180:do{if((bz|0)>=1){ac=+h[by+8>>3];if(ac<=0.0){break}s=+h[by>>3];aY=a8+((bz-1|0)*24&-1)+8|0;ab=+h[aY>>3];a7=bz-2|0;if((a7|0)>0){ao=0;L=s;K=ab;r=ac;while(1){a$=a8+(ao*24&-1)+16|0;J=+h[a$>>3];I=J/r;h[a$>>3]=I;H=L/r;h[a8+(ao*24&-1)>>3]=H;a$=ao+1|0;aX=a8+(a$*24&-1)+8|0;G=+h[aX>>3]-J*I;if(G<=0.0){break L4180}J=L*(-0.0-I);I=K-L*H;h[aX>>3]=G;if((a$|0)<(a7|0)){ao=a$;L=J;K=I;r=G}else{bA=J;bB=I;bC=G;break}}}else{bA=s;bB=ab;bC=ac}if((bz|0)>1){r=bA+ +h[a8+(a7*24&-1)+16>>3];K=r/bC;h[a8+(a7*24&-1)>>3]=K;L=bB-K*r;h[aY>>3]=L;if(L<=0.0){break}}et(a8,b,bz);et(a8,ap,bz);if(a1){ao=bz;while(1){a$=ao-1|0;h[b+(ao<<3)>>3]=+h[b+(a$<<3)>>3];h[ap+(ao<<3)>>3]=+h[ap+(a$<<3)>>3];if((a$|0)>0){ao=a$}else{break}}}if(bq){h[b>>3]=+h[b+(bz<<3)>>3];h[ap>>3]=+h[ap+(bz<<3)>>3]}else{h[b>>3]=+h[bw+8>>3];h[ap>>3]=+h[bx+8>>3];ao=bz+1|0;h[b+(ao<<3)>>3]=+h[b+(bz<<3)>>3];h[ap+(ao<<3)>>3]=+h[ap+(bz<<3)>>3]}uu(by);bD=a2;break L4158}}while(0);uu(by);uu(bv);uu(bw);uu(bx);if(!bq){bE=bn;break L4130}c[bt>>2]=0;bE=bn;break L4130}else{if((bu|0)>1){h[b>>3]=0.0;h[ap>>3]=0.0;h[bw+8>>3]=0.0;h[bx+8>>3]=0.0;h[a6>>3]=1.0;bD=bu-1|0;break}uu(bv);uu(bw);uu(bx);if(!bq){bE=bn;break L4130}c[bt>>2]=0;bE=bn;break L4130}}while(0);a2=aa(c[13366]|0,bD);a1=(bD|0)>0;if(a1){t=0.0;a8=0;do{t=t+ +h[a6+(a8<<3)>>3];a8=a8+1|0;}while((a8|0)<(bD|0));bF=t*.9999999}else{bF=0.0}ac=bF/+(a2|0);ab=+h[bn>>3];s=+h[bn+8>>3];a8=c[12922]|0;if((a8|0)>98){ao=ut(56)|0;if((ao|0)==0){gk();aY=ut(56)|0;if((aY|0)==0){as=3127;break L4086}else{bG=aY}}else{bG=ao}ao=bG;aY=c[12922]<<6;a7=ut(aY)|0;if((a7|0)==0){gk();a$=ut(aY)|0;if((a$|0)==0){as=3130;break L4086}else{bH=a$}}else{bH=a7}a7=bH;a$=bG+4|0;c[a$>>2]=a7;aY=c[12922]|0;L4220:do{if((aY|0)>0){aX=0;a_=a7;while(1){aA=aX<<1;h[a_+(aX<<6)+8>>3]=+h[51696+(aA<<3)>>3];h[(c[a$>>2]|0)+(aX<<6)+16>>3]=+h[51696+((aA|1)<<3)>>3];h[(c[a$>>2]|0)+(aX<<6)+24>>3]=+h[6688];aA=aX+1|0;if((aA|0)>=(aY|0)){break L4220}aX=aA;a_=c[a$>>2]|0}}}while(0);c[bG+44>>2]=aY;c[bG>>2]=c[13370];c[13370]=ao;a[bG+8|0]=0;a$=a8<<1;h[6462]=+h[51696+(a$-2<<3)>>3];h[6463]=+h[51696+(a$-1<<3)>>3];c[12922]=1;bI=1}else{bI=a8}a$=bI<<1;h[51696+(a$<<3)>>3]=ab;h[51696+((a$|1)<<3)>>3]=s;a$=bI+1|0;c[12922]=a$;L4226:do{if(a1){t=s;L=ab;r=ac+0.0;a7=bn;a2=0;a_=a$;while(1){aX=c[a7+16>>2]|0;aA=a6+(a2<<3)|0;K=+h[aA>>3];G=+h[aX>>3];I=+h[aX+8>>3];J=(G-L)/K;H=(I-t)/K;a0=a2+1|0;Y=+h[b+(a0<<3)>>3];X=+h[b+(a2<<3)>>3];W=(Y+X*2.0)/6.0;U=+h[ap+(a0<<3)>>3];S=+h[ap+(a2<<3)>>3];F=(U+S*2.0)/6.0;E=K*6.0;D=(Y-X)/E;X=(U-S)/E;if(r>K){bJ=r;bK=K;bL=a_}else{E=r;p=a_;while(1){S=E-K;U=L+E*(J+S*(W+D*E));Y=t+E*(H+S*(F+X*E));if((p|0)>98){aN=ut(56)|0;if((aN|0)==0){gk();aM=ut(56)|0;if((aM|0)==0){as=3141;break L4086}else{bM=aM}}else{bM=aN}aN=bM;aM=c[12922]<<6;aL=ut(aM)|0;if((aL|0)==0){gk();aH=ut(aM)|0;if((aH|0)==0){as=3144;break L4086}else{bN=aH}}else{bN=aL}aL=bN;aH=bM+4|0;c[aH>>2]=aL;aM=c[12922]|0;L4241:do{if((aM|0)>0){a4=0;aW=aL;while(1){aJ=a4<<1;h[aW+(a4<<6)+8>>3]=+h[51696+(aJ<<3)>>3];h[(c[aH>>2]|0)+(a4<<6)+16>>3]=+h[51696+((aJ|1)<<3)>>3];h[(c[aH>>2]|0)+(a4<<6)+24>>3]=+h[6688];aJ=a4+1|0;if((aJ|0)>=(aM|0)){break L4241}a4=aJ;aW=c[aH>>2]|0}}}while(0);c[bM+44>>2]=aM;c[bM>>2]=c[13370];c[13370]=aN;a[bM+8|0]=0;aH=p<<1;h[6462]=+h[51696+(aH-2<<3)>>3];h[6463]=+h[51696+(aH-1<<3)>>3];c[12922]=1;bO=1}else{bO=p}aH=bO<<1;h[51696+(aH<<3)>>3]=U;h[51696+((aH|1)<<3)>>3]=Y;aH=bO+1|0;c[12922]=aH;S=ac+E;C=+h[aA>>3];if(S>C){bJ=S;bK=C;bL=aH;break}else{E=S;p=aH}}}if((a0|0)>=(bD|0)){break L4226}t=I;L=G;r=bJ-bK;a7=aX;a2=a0;a_=bL}}}while(0);uu(bv);uu(bw);uu(bx);if(bq){c[bt>>2]=0}ap=ut(56)|0;if((ap|0)==0){gk();b=ut(56)|0;if((b|0)==0){as=3156;break L4086}else{bP=b}}else{bP=ap}ap=bP;b=c[12922]<<6;a6=ut(b)|0;if((a6|0)==0){gk();a$=ut(b)|0;if((a$|0)==0){as=3159;break L4086}else{bR=a$}}else{bR=a6}a6=bR;a$=bP+4|0;c[a$>>2]=a6;b=c[12922]|0;L4259:do{if((b|0)>0){a1=0;a8=a6;while(1){ao=a1<<1;h[a8+(a1<<6)+8>>3]=+h[51696+(ao<<3)>>3];h[(c[a$>>2]|0)+(a1<<6)+16>>3]=+h[51696+((ao|1)<<3)>>3];h[(c[a$>>2]|0)+(a1<<6)+24>>3]=+h[6688];ao=a1+1|0;if((ao|0)>=(b|0)){break L4259}a1=ao;a8=c[a$>>2]|0}}}while(0);c[bP+44>>2]=b;c[bP>>2]=c[13370];c[13370]=ap;a[bP+8|0]=0;c[12922]=0;bE=bn}else if((a9|0)==0){a$=bn;a6=c[12922]|0;do{ac=+h[a$>>3];ab=+h[a$+8>>3];if((a6|0)>98){a8=ut(56)|0;if((a8|0)==0){gk();a1=ut(56)|0;if((a1|0)==0){as=3049;break L4086}else{bS=a1}}else{bS=a8}a8=bS;a1=c[12922]<<6;ao=ut(a1)|0;if((ao|0)==0){gk();aY=ut(a1)|0;if((aY|0)==0){as=3052;break L4086}else{bT=aY}}else{bT=ao}ao=bT;aY=bS+4|0;c[aY>>2]=ao;a1=c[12922]|0;L4275:do{if((a1|0)>0){a_=0;a2=ao;while(1){a7=a_<<1;h[a2+(a_<<6)+8>>3]=+h[51696+(a7<<3)>>3];h[(c[aY>>2]|0)+(a_<<6)+16>>3]=+h[51696+((a7|1)<<3)>>3];h[(c[aY>>2]|0)+(a_<<6)+24>>3]=+h[6688];a7=a_+1|0;if((a7|0)>=(a1|0)){break L4275}a_=a7;a2=c[aY>>2]|0}}}while(0);c[bS+44>>2]=a1;c[bS>>2]=c[13370];c[13370]=a8;a[bS+8|0]=0;aY=a6<<1;h[6462]=+h[51696+(aY-2<<3)>>3];h[6463]=+h[51696+(aY-1<<3)>>3];c[12922]=1;bU=1}else{bU=a6}aY=bU<<1;h[51696+(aY<<3)>>3]=ac;h[51696+((aY|1)<<3)>>3]=ab;a6=bU+1|0;c[12922]=a6;a$=c[a$+16>>2]|0;}while((a$|0)!=0);a$=ut(56)|0;if((a$|0)==0){gk();a6=ut(56)|0;if((a6|0)==0){as=3060;break L4086}else{bV=a6}}else{bV=a$}a$=bV;a6=c[12922]<<6;ap=ut(a6)|0;if((ap|0)==0){gk();b=ut(a6)|0;if((b|0)==0){as=3063;break L4086}else{bW=b}}else{bW=ap}ap=bW;b=bV+4|0;c[b>>2]=ap;a6=c[12922]|0;L4288:do{if((a6|0)>0){aY=0;ao=ap;while(1){a2=aY<<1;h[ao+(aY<<6)+8>>3]=+h[51696+(a2<<3)>>3];h[(c[b>>2]|0)+(aY<<6)+16>>3]=+h[51696+((a2|1)<<3)>>3];h[(c[b>>2]|0)+(aY<<6)+24>>3]=+h[6688];a2=aY+1|0;if((a2|0)>=(a6|0)){break L4288}aY=a2;ao=c[b>>2]|0}}}while(0);c[bV+44>>2]=a6;c[bV>>2]=c[13370];c[13370]=a$;a[bV+8|0]=0;c[12922]=0;bE=bn}else if((a9|0)==2){do{if(M){bX=1}else{b=bn;while(1){ap=c[b+16>>2]|0;if((ap|0)==0){break}else{b=ap}}ab=+P(+(+h[99]- +h[98]));if(+P(+(+h[b>>3]- +h[bn>>3]))>=ab*1.0e-5){bX=0;break}ab=+P(+(+h[71]- +h[70]));bX=+P(+(+h[b+8>>3]- +h[bn+8>>3]))>2]|0;if((ao|0)==0){break}else{a6=ao;ap=bY}}a6=a$-1|0;if((bY|0)<2){bE=bn;break}ao=(a6|0)>(ap|0)?ap:a6;do{if(bX){a6=bn;while(1){bZ=a6+16|0;aY=c[bZ>>2]|0;if((aY|0)==0){break}else{a6=aY}}ab=+P(+(+h[99]- +h[98]));do{if(+P(+(+h[a6>>3]- +h[bn>>3]))>3]- +h[bn+8>>3]))>=ac*1.0e-5){b_=bY;b$=bn;break}b_=ap;b$=c[bn+16>>2]|0}else{b_=bY;b$=bn}}while(0);c[bZ>>2]=b$;b=b_+ao|0;b0=a6;b1=b;b2=+(ao|0);b3=b;as=3179}else{if((bY|0)<=(ao|0)){b4=bn;b5=ao;b6=bY;b7=0;b8=0.0;break}b0=0;b1=bY;b2=0.0;b3=bY-ao|0;as=3179}}while(0);L4314:do{if((as|0)==3179){as=0;ab=+(b3|0);ac=1.0/+(c[13366]|0);if(b2>=ab){b4=bn;b5=ao;b6=b1;b7=b0;b8=ab;break}ap=b1-ao|0;a$=2;G=b2;I=b2+1.0;b=ao;aY=bn;while(1){if(G>I){b9=c[aY+16>>2]|0;ca=b+1|0;cb=I+1.0}else{b9=aY;ca=b;cb=I}ev(G,b9,b1,ao,ca,bX,f,g);s=+h[f>>3];r=+h[g>>3];a8=c[12922]|0;if((a8|0)>98){a1=ut(56)|0;if((a1|0)==0){gk();a2=ut(56)|0;if((a2|0)==0){as=3186;break L4086}else{cc=a2}}else{cc=a1}a1=cc;a2=c[12922]<<6;a_=ut(a2)|0;if((a_|0)==0){gk();a0=ut(a2)|0;if((a0|0)==0){as=3189;break L4086}else{cd=a0}}else{cd=a_}a_=cd;a0=cc+4|0;c[a0>>2]=a_;a2=c[12922]|0;L4330:do{if((a2|0)>0){aX=0;a7=a_;while(1){p=aX<<1;h[a7+(aX<<6)+8>>3]=+h[51696+(p<<3)>>3];h[(c[a0>>2]|0)+(aX<<6)+16>>3]=+h[51696+((p|1)<<3)>>3];h[(c[a0>>2]|0)+(aX<<6)+24>>3]=+h[6688];p=aX+1|0;if((p|0)>=(a2|0)){break L4330}aX=p;a7=c[a0>>2]|0}}}while(0);c[cc+44>>2]=a2;c[cc>>2]=c[13370];c[13370]=a1;a[cc+8|0]=0;a0=a8<<1;h[6462]=+h[51696+(a0-2<<3)>>3];h[6463]=+h[51696+(a0-1<<3)>>3];c[12922]=1;ce=1}else{ce=a8}a0=ce<<1;h[51696+(a0<<3)>>3]=s;h[51696+((a0|1)<<3)>>3]=r;c[12922]=ce+1;if((a$|0)==(aa(c[13366]|0,ap)+1|0)){b4=b9;b5=ca;b6=b1;b7=b0;b8=ab;break L4314}Y=ac+G;if(Y>3];I=+h[g>>3];aY=c[12922]|0;if((aY|0)>98){b=ut(56)|0;if((b|0)==0){gk();a$=ut(56)|0;if((a$|0)==0){as=3199;break L4086}else{cf=a$}}else{cf=b}b=cf;a$=c[12922]<<6;ap=ut(a$)|0;if((ap|0)==0){gk();a6=ut(a$)|0;if((a6|0)==0){as=3202;break L4086}else{cg=a6}}else{cg=ap}ap=cg;a6=cf+4|0;c[a6>>2]=ap;a$=c[12922]|0;L4346:do{if((a$|0)>0){a0=0;a_=ap;while(1){a7=a0<<1;h[a_+(a0<<6)+8>>3]=+h[51696+(a7<<3)>>3];h[(c[a6>>2]|0)+(a0<<6)+16>>3]=+h[51696+((a7|1)<<3)>>3];h[(c[a6>>2]|0)+(a0<<6)+24>>3]=+h[6688];a7=a0+1|0;if((a7|0)>=(a$|0)){break L4346}a0=a7;a_=c[a6>>2]|0}}}while(0);c[cf+44>>2]=a$;c[cf>>2]=c[13370];c[13370]=b;a[cf+8|0]=0;a6=aY<<1;h[6462]=+h[51696+(a6-2<<3)>>3];h[6463]=+h[51696+(a6-1<<3)>>3];c[12922]=1;ch=1}else{ch=aY}a6=ch<<1;h[51696+(a6<<3)>>3]=ab;h[51696+((a6|1)<<3)>>3]=I;c[12922]=ch+1;if(bX){c[b7+16>>2]=0}a6=ut(56)|0;if((a6|0)==0){gk();ap=ut(56)|0;if((ap|0)==0){as=3211;break L4086}else{ci=ap}}else{ci=a6}a6=ci;ap=c[12922]<<6;ao=ut(ap)|0;if((ao|0)==0){gk();a_=ut(ap)|0;if((a_|0)==0){as=3214;break L4086}else{cj=a_}}else{cj=ao}ao=cj;a_=ci+4|0;c[a_>>2]=ao;ap=c[12922]|0;L4361:do{if((ap|0)>0){a0=0;a7=ao;while(1){aX=a0<<1;h[a7+(a0<<6)+8>>3]=+h[51696+(aX<<3)>>3];h[(c[a_>>2]|0)+(a0<<6)+16>>3]=+h[51696+((aX|1)<<3)>>3];h[(c[a_>>2]|0)+(a0<<6)+24>>3]=+h[6688];aX=a0+1|0;if((aX|0)>=(ap|0)){break L4361}a0=aX;a7=c[a_>>2]|0}}}while(0);c[ci+44>>2]=ap;c[ci>>2]=c[13370];c[13370]=a6;a[ci+8|0]=0;c[12922]=0;bE=bn}else{bE=bn}}while(0);while(1){M=c[bE+16>>2]|0;uu(bE);if((M|0)==0){bp=bo;break}else{bE=M}}}}while(0);if((c[j>>2]|0)>0){aj=bp}else{break}}}}while(0);aj=c[13370]|0;if((aj|0)!=(ba|0)){a[aj+8|0]=1;aj=(c[13370]|0)+9|0;if((a[64788]&1)==0){ck=bi}else{ck=+Z(+(bi*+h[8100]))}ud(aj,32,53520,1.0,ck);h[(c[13370]|0)+48>>3]=bi}aj=k+1|0;if((aj|0)<(bh|0)){k=aj;be=bi}else{break L4084}}if((as|0)==3052){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=135136,v)|0);return 0}else if((as|0)==3081){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=105064,v)|0);return 0}else if((as|0)==3084){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=98096,v)|0);return 0}else if((as|0)==3049){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=155520,v)|0);return 0}else if((as|0)==3087){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=92152,v)|0);return 0}else if((as|0)==3091){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=84352,v)|0);return 0}else if((as|0)==3127){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=155520,v)|0);return 0}else if((as|0)==3063){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=135136,v)|0);return 0}else if((as|0)==3060){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=155520,v)|0);return 0}else if((as|0)==3130){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=135136,v)|0);return 0}else if((as|0)==3141){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=155520,v)|0);return 0}else if((as|0)==3144){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=135136,v)|0);return 0}else if((as|0)==3156){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=155520,v)|0);return 0}else if((as|0)==3159){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=135136,v)|0);return 0}else if((as|0)==3186){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=155520,v)|0);return 0}else if((as|0)==3189){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=135136,v)|0);return 0}else if((as|0)==3199){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=155520,v)|0);return 0}else if((as|0)==3202){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=135136,v)|0);return 0}else if((as|0)==3211){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=155520,v)|0);return 0}else if((as|0)==3214){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=135136,v)|0);return 0}}}while(0);if((bc|0)!=0){as=bc;while(1){bc=c[as+12>>2]|0;uu(as);if((bc|0)==0){break}else{as=bc}}}if(!al){al=bb;while(1){bb=c[al+16>>2]|0;uu(al);if((bb|0)==0){break}else{al=bb}}}bd=c[13370]|0;i=e;return bd|0}function eq(){a[47544]=0;a[47856]=1;return}function er(){a[47544]=1;a[47856]=1;return}function es(){return}function et(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0.0,f=0,g=0,i=0.0,j=0.0,k=0,l=0,m=0.0,n=0.0,o=0.0;d=b+(c-1<<3)|0;e=+h[d>>3];f=c-2|0;if((f|0)>0){g=0;i=e;j=+h[b>>3];while(1){k=g+1|0;l=b+(k<<3)|0;m=+h[l>>3]- +h[a+(g*24&-1)+16>>3]*j;h[l>>3]=m;n=i- +h[a+(g*24&-1)>>3]*j;if((k|0)<(f|0)){g=k;i=n;j=m}else{o=n;break}}}else{o=e}g=(c|0)>1;if(g){h[d>>3]=o- +h[a+(f*24&-1)>>3]*+h[b+(f<<3)>>3]}if((c|0)>0){k=0;do{l=b+(k<<3)|0;h[l>>3]=+h[l>>3]/+h[a+(k*24&-1)+8>>3];k=k+1|0;}while((k|0)<(c|0))}o=+h[d>>3];if(g){g=b+(f<<3)|0;h[g>>3]=+h[g>>3]-o*+h[a+(f*24&-1)>>3]}g=c-3|0;if((g|0)<=-1){return}c=g;e=+h[b+(f<<3)>>3];while(1){f=b+(c<<3)|0;j=+h[f>>3]-(+h[a+(c*24&-1)+16>>3]*e+o*+h[a+(c*24&-1)>>3]);h[f>>3]=j;if((c|0)>0){c=c-1|0;e=j}else{break}}return}function eu(b,d,e,f){b=b|0;d=+d;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0;if(!f){a[b+20|0]=0;c[e>>2]=(c[e>>2]|0)-1}do{if((c[b>>2]|0)==0){if((c[b+4>>2]|0)==0){g=0}else{break}return g|0}}while(0);f=ew(b,d)|0;i=0;j=b;k=f;while(1){l=c[j>>2]|0;if((l|0)==(i|0)){n=c[j+4>>2]|0}else{n=l}l=c[n>>2]|0;if((l|0)==(j|0)){o=0}else{o=(a[l+20|0]&1)==0?0:l}l=c[n+4>>2]|0;if((l|0)==(j|0)){p=o}else{p=(a[l+20|0]&1)==0?o:l}l=c[n+8>>2]|0;if((l|0)==(j|0)){q=p}else{q=(a[l+20|0]&1)==0?p:l}if((q|0)==0){r=3261;break}a[q+20|0]=0;c[e>>2]=(c[e>>2]|0)-1;l=q+24|0;do{if((c[l>>2]|0)==3){s=k}else{t=ew(q,d)|0;c[k+16>>2]=t;u=+P(+(+h[99]- +h[98]));if(+P(+(+h[k>>3]- +h[t>>3]))>=u*1.0e-5){s=t;break}u=+P(+(+h[71]- +h[70]));if(+P(+(+h[k+8>>3]- +h[t+8>>3]))>=u*1.0e-5){s=t;break}uu(t);s=k}}while(0);if((q|0)==(b|0)){r=3271;break}if((c[l>>2]|0)==2){r=3270;break}else{i=n;j=q;k=s}}if((r|0)==3270){c[s+16>>2]=0;g=f;return g|0}else if((r|0)==3261){c[k+16>>2]=0;if((f|0)!=0){k=f;while(1){q=c[k+16>>2]|0;uu(k);if((q|0)==0){break}else{k=q}}}aI(223848,41,1,c[m>>2]|0);g=0;return g|0}else if((r|0)==3271){c[s+16>>2]=0;h[f>>3]=+h[s>>3];h[f+8>>3]=+h[s+8>>3];g=f;return g|0}return 0}function ev(a,b,d,e,f,g,j,k){a=+a;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0,w=0.0,x=0,y=0,z=0.0,A=0,B=0,C=0.0,D=0.0,E=0.0,F=0,G=0,H=0.0,I=0.0,J=0,K=0.0;l=i;m=f+e<<3;n=ut(m)|0;do{if((n|0)==0){gk();o=ut(m)|0;if((o|0)!=0){p=o;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=122288,v)|0)}else{p=n}}while(0);n=p;o=ut(m)|0;do{if((o|0)==0){gk();q=ut(m)|0;if((q|0)!=0){r=q;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=122288,v)|0)}else{r=o}}while(0);o=r;m=f-e|0;if((e|0)<0){s=n+(f<<3)|0;t=+h[s>>3];h[j>>3]=t;u=o+(f<<3)|0;w=+h[u>>3];h[k>>3]=w;uu(p);uu(r);i=l;return}else{x=m;y=b}while(1){h[n+(x<<3)>>3]=+h[y>>3];h[o+(x<<3)>>3]=+h[y+8>>3];b=x+1|0;if((b|0)>(f|0)){break}else{x=b;y=c[y+16>>2]|0}}if((e|0)<1){s=n+(f<<3)|0;t=+h[s>>3];h[j>>3]=t;u=o+(f<<3)|0;w=+h[u>>3];h[k>>3]=w;uu(p);uu(r);i=l;return}y=e+1|0;z=+(d-e|0);x=1;b=-1;while(1){q=x+m|0;if((q|0)<=(f|0)){A=y+b|0;B=f;while(1){do{if(g){C=+(A+B|0);D=+(B|0)}else{do{if((B|0)>(e|0)){if((B|0)>(d|0)){E=z;break}E=+(B-e|0)}else{E=0.0}}while(0);F=A+B|0;if((F|0)<=(e|0)){C=0.0;D=E;break}if((F|0)>(d|0)){C=z;D=E;break}C=+(F-e|0);D=E}}while(0);if(D==C){G=B-1|0}else{F=n+(B<<3)|0;H=a-D;I=C-D;J=B-1|0;K=C-a;h[F>>3]=H*+h[F>>3]/I+K*+h[n+(J<<3)>>3]/I;F=o+(B<<3)|0;h[F>>3]=H*+h[F>>3]/I+K*+h[o+(J<<3)>>3]/I;G=J}if((G|0)<(q|0)){break}else{B=G}}}B=x+1|0;q=x^-1;if((B|0)>(e|0)){break}else{x=B;b=q}}s=n+(f<<3)|0;t=+h[s>>3];h[j>>3]=t;u=o+(f<<3)|0;w=+h[u>>3];h[k>>3]=w;uu(p);uu(r);i=l;return}function ew(a,b){a=a|0;b=+b;var d=0,e=0,f=0.0,g=0,j=0.0,k=0,l=0;d=i;e=a+8|0;f=+h[(c[e>>2]|0)+24>>3];g=a+12|0;j=(b-f)/(+h[(c[g>>2]|0)+24>>3]-f);f=j<0.0?0.0:j;j=f>1.0?1.0:f;a=ut(24)|0;do{if((a|0)==0){gk();k=ut(24)|0;if((k|0)!=0){l=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=216768,v)|0);return 0}else{l=a}}while(0);f=1.0-j;h[l>>3]=j*+h[(c[g>>2]|0)+8>>3]+f*+h[(c[e>>2]|0)+8>>3];h[l+8>>3]=j*+h[(c[g>>2]|0)+16>>3]+f*+h[(c[e>>2]|0)+16>>3];i=d;return l|0}function ex(){var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0;d=i;i=i+16|0;e=d|0;f=d+8|0;g=hA(c[11932]|0,78360)|0;if((g|0)==0){uj(-1,146640,(v=i,i=i+8|0,c[v>>2]=c[11932],v)|0)}h=e;if((cd(h|0,4,1,g|0)|0)==0){uj(-1,146480,(v=i,i=i+8|0,c[v>>2]=c[11932],v)|0)}j=c[e>>2]|0;k=j>>>0>65535?3:0;l=(k-2|0)>>>0<2;L4523:do{if(l){m=0;n=3;o=j&255;while(1){p=h+n|0;a[h+m|0]=a[p]|0;a[p]=o;p=m+1|0;q=n-1|0;if((p|0)>=(q|0)){break L4523}m=p;n=q;o=a[h+p|0]|0}}}while(0);j=(k-1|0)>>>0<2;if(j){k=h+2|0;o=a[k]|0;n=h+3|0;a[k]=a[n]|0;a[n]=o;o=a[h]|0;n=h+1|0;a[h]=a[n]|0;a[n]=o}o=f;if((cd(o|0,4,1,g|0)|0)==0){uj(-1,146280,(v=i,i=i+8|0,c[v>>2]=c[11932],v)|0)}if(l){l=0;n=3;do{h=o+l|0;k=a[h]|0;m=o+n|0;a[h]=a[m]|0;a[m]=k;l=l+1|0;n=n-1|0;}while((l|0)<(n|0))}if(j){j=o+2|0;n=a[j]|0;l=o+3|0;a[j]=a[l]|0;a[l]=n;n=a[o]|0;l=o+1|0;a[o]=a[l]|0;a[l]=n}az(g|0);a[47544]=0;a[47856]=1;c[(c[12172]|0)+128>>2]=8;c[(c[12172]|0)+140>>2]=c[e>>2];c[(c[12172]|0)+144>>2]=c[f>>2];c[(c[12172]|0)+152>>2]=1;c[(c[12172]|0)+156>>2]=-1;a[(c[12172]|0)+124|0]=1;c[(c[12172]|0)+112>>2]=-3;c[(c[12172]|0)+116>>2]=-4;eQ(4);f=c[11950]|0;if((c[11884]|0)<1){e=db(f,12,215112)|0;c[11950]=e;c[11884]=1;r=e}else{r=f}c[r+4>>2]=1;b[(c[11950]|0)+8>>1]=b[24026]|0;r=c[11950]|0;if((c[11884]|0)<2){f=db(r,24,215112)|0;c[11950]=f;c[11884]=2;s=f}else{s=r}c[s+16>>2]=1;b[(c[11950]|0)+20>>1]=b[24026]|0;s=c[11950]|0;if((c[11884]|0)<3){r=db(s,36,215112)|0;c[11950]=r;c[11884]=3;t=r}else{t=s}c[t+28>>2]=1;b[(c[11950]|0)+32>>1]=b[24026]|0;t=c[11950]|0;if((c[11884]|0)<4){s=db(t,48,215112)|0;c[11950]=s;c[11884]=4;u=s}else{u=t}c[u+40>>2]=1;b[(c[11950]|0)+44>>1]=b[24026]|0;u=c[11950]|0;if((c[11884]|0)>=1){w=u;x=w|0;c[x>>2]=0;c[11870]=4;c[262]=2;c[265]=3;c[268]=4;c[271]=1;i=d;return}t=db(u,12,215112)|0;c[11950]=t;c[11884]=1;w=t;x=w|0;c[x>>2]=0;c[11870]=4;c[262]=2;c[265]=3;c[268]=4;c[271]=1;i=d;return}function ey(e,f,j){e=e|0;f=f|0;j=j|0;var k=0,l=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aN=0,aO=0,aP=0,aQ=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0,a_=0,a$=0,a0=0,a1=0.0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a9=0.0,ba=0,bb=0.0,bd=0,be=0,bf=0,bg=0,bh=0.0,bi=0,bj=0,bk=0,bl=0.0,bm=0,bn=0,bo=0,bp=0.0,bq=0,br=0,bs=0,bu=0.0,bv=0,bw=0,bx=0,by=0.0,bz=0,bA=0.0,bB=0,bC=0,bD=0,bE=0,bF=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bM=0,bN=0,bO=0,bQ=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0,b3=0,b4=0,b5=0,b6=0,b7=0,b8=0,b9=0,ca=0,cb=0,cc=0,cd=0,ce=0,cf=0,cg=0,ch=0,ci=0,cj=0,ck=0,cl=0,cm=0,cn=0,co=0.0,cq=0,cr=0,cs=0,ct=0,cv=0,cw=0,cx=0,cy=0,cz=0,cA=0,cB=0,cC=0,cD=0,cE=0.0,cF=0,cG=0,cH=0,cI=0,cJ=0,cK=0,cL=0,cM=0,cN=0,cO=0,cP=0,cQ=0,cR=0,cS=0,cT=0,cU=0,cV=0,cW=0,cX=0,cY=0,cZ=0,c_=0,c$=0,c0=0,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9=0,da=0,dc=0,dd=0,de=0,df=0,dg=0,dh=0,di=0;k=i;i=i+504|0;l=k|0;p=k+24|0;q=k+48|0;r=k+72|0;s=k+96|0;t=k+120|0;u=k+144|0;x=k+168|0;y=k+192|0;z=k+216|0;A=k+240|0;B=k+264|0;C=k+288|0;D=k+312|0;E=k+336|0;F=k+424|0;G=k+432|0;H=(c[13898]|0)-1|0;a[43464]=1;if((c[12892]|0)!=0){ez();c[12892]=0}uu(c[11930]|0);c[11930]=0;c[11872]=0;uu(c[11902]|0);c[11902]=0;eA();c[11942]=-1;c[11900]=0;c[11898]=0;c[11904]=1;c[11762]=2147483647;uu(c[9356]|0);c[9356]=0;c[11946]=0;c[14126]=2;c[10874]=1;c[10872]=1;c[10808]=0;c[10806]=0;c[8834]=2147483647;c[8832]=2147483647;a[47544]=0;a[47856]=0;c[11858]=0;c[11864]=0;a[47584]=0;a[47464]=0;a[47736]=0;c[11944]=j;c[13488]=-99;a[32928]=0;a[48872]=0;if((f|0)>=8){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=95312,v)|0);return 0}if((e|0)==0){uf(c[13898]|0,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}I=c[11932]|0;do{if((a[e]|0)==0){if((I|0)==0){J=c[13898]|0;uf(J,94168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((a[I]|0)!=0){break}J=c[13898]|0;uf(J,94168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{uu(I);c[11932]=bP(e|0)|0}}while(0);e=c[60]|0;if((e|0)!=0){e1(e)}c[60]=0;e=c[13898]|0;I=c[8272]|0;L4579:do{if((e|0)<(I|0)){J=j+23|0;K=r|0;L=r+8|0;M=p|0;N=p+8|0;O=l|0;P=l+8|0;Q=q|0;R=q+8|0;S=z|0;T=z+8|0;U=y|0;V=y+8|0;W=x|0;X=x+8|0;Y=u|0;Z=u+8|0;_=t|0;$=t+8|0;ab=s|0;ac=s+8|0;ad=D|0;ae=D+8|0;af=C|0;ag=C+8|0;ah=B|0;ai=B+8|0;aj=A|0;ak=A+8|0;al=0;am=0;an=0;ao=0;ap=0;aq=e;ar=I;L4581:while(1){as=c[1054]|0;at=(a[as+(aq*40&-1)|0]&1)==0;if(at){break L4579}au=c[as+(aq*40&-1)+36>>2]|0;av=as+(aq*40&-1)+32|0;aw=c[10036]|0;ax=0;while(1){if((ax|0)>=(au|0)){ay=3362;break}if((a[aw+((c[av>>2]|0)+ax|0)|0]|0)==(a[ax+103664|0]|0)){ax=ax+1|0}else{break}}if((ay|0)==3362){ay=0;if((ax|0)==1){break L4579}}aw=c[av>>2]|0;if(!((au|0)>0&(at^1))){break L4579}az=c[10036]|0;aA=0;aB=0;aC=aw;while(1){if((a[aA+204608|0]|0)==(a[az+(aA+aC|0)|0]|0)){aD=aC;aF=aB}else{if((aA|0)!=3){ay=3393;break}aD=aC-1|0;aF=1}aG=aA+1|0;if((aG|0)<(aF+au|0)){aA=aG;aB=aF;aC=aD}else{ay=3369;break}}do{if((ay|0)==3369){ay=0;if((aF|0)==0){if(!((aA|0)==6|(aA|0)==2)){ay=3393;break}}aC=aq+1|0;c[13898]=aC;if((a[47856]&1)!=0){aH=aC;ay=4033;break L4581}a[47856]=1;a[47544]=1;c[12170]=0;c[12220]=0;c[12222]=0;c[12224]=0;c[11876]=0;aC=c[11950]|0;if((c[11884]|0)<1){aB=db(aC,12,215112)|0;c[11950]=aB;c[11884]=1;aI=aB}else{aI=aC}c[aI>>2]=0;aC=c[12172]|0;aB=c[11864]|0;if((aB|0)>0){az=0;av=aB;while(1){aB=aC+(az*232&-1)+224|0;ax=c[aB>>2]|0;if((ax|0)==0){aJ=av}else{uu(ax);c[aB>>2]=0;aJ=c[11864]|0}aB=az+1|0;if((aB|0)<(aJ|0)){az=aB;av=aJ}else{break}}}c[11864]=0;av=c[11862]|0;if((av|0)==0){c[12204]=c[12200];c[12208]=0;az=c[12172]|0;if((c[11880]|0)<1){aC=db(az,232,216568)|0;aB=aC;c[12172]=aB;if((aC|0)==0){ay=3388;break L4581}c[11880]=1;aK=c[11864]|0;aL=aB}else{aK=0;aL=az}uD(aL+(aK*232&-1)|0,48440,232);c[11864]=(c[11864]|0)+1}else{c[12204]=c[12202];c[12208]=c[12206];if((av|0)>(c[11880]|0)){az=db(c[12172]|0,av*232&-1,216568)|0;c[12172]=az;if((az|0)==0){ay=3381;break L4581}c[11880]=av}az=c[12172]|0;aB=c[11864]|0;if((av|0)>0){aC=0;ax=aB;while(1){uD(az+(ax*232&-1)|0,48440,232);aG=(c[11864]|0)+1|0;c[11864]=aG;aN=aC+1|0;if((aN|0)<(av|0)){aC=aN;ax=aG}else{aO=aG;break}}}else{aO=aB}uD(az|0,c[12168]|0,aO*232&-1)}eB(ap,0);aP=ap;aQ=ao;aS=an;aT=am;aU=al}}while(0);L4629:do{if((ay|0)==3393){ay=0;if(!((au|0)>0&(at^1))){break L4579}aA=c[10036]|0;ax=0;aC=0;av=aw;while(1){if((a[ax+151232|0]|0)==(a[aA+(ax+av|0)|0]|0)){aV=av;aW=aC}else{if((ax|0)!=3){break}aV=av-1|0;aW=1}aG=ax+1|0;if((aG|0)<(aW+au|0)){ax=aG;aC=aW;av=aV}else{ay=3399;break}}do{if((ay|0)==3399){ay=0;if((aW|0)==0){if(!((ax|0)==6|(ax|0)==2)){break}}aX=aq+1|0;c[13898]=aX;if(ap){aH=aX;ay=4035;break L4581}if((a[47544]&1)==0){if((a[47856]&1)!=0){ay=3404;break L4581}}a[47544]=1;a[43464]=0;aP=1;aQ=ao;aS=an;aT=am;aU=al;break L4629}}while(0);if(!((au|0)>0&(at^1))){break L4579}ax=c[10036]|0;av=0;aC=0;aA=aw;while(1){if((a[av+91224|0]|0)==(a[ax+(av+aA|0)|0]|0)){aY=aA;a_=aC}else{if((av|0)!=6){break}aY=aA-1|0;a_=1}az=av+1|0;if((az|0)<(a_+au|0)){av=az;aC=a_;aA=aY}else{ay=3412;break}}do{if((ay|0)==3412){ay=0;if((a_|0)==0){if(!((av|0)==10|(av|0)==5)){break}}c[13898]=aq+1;a[47544]=1;a[47464]=1;a[43464]=0;aP=ap;aQ=ao;aS=an;aT=am;aU=al;break L4629}}while(0);if(!((au|0)>0&(at^1))){break L4579}av=c[10036]|0;aA=0;aC=0;ax=aw;while(1){if((a[aA+90656|0]|0)==(a[av+(aA+ax|0)|0]|0)){a$=ax;a0=aC}else{if((aA|0)!=1){break}a$=ax-1|0;a0=1}az=aA+1|0;if((az|0)<(a0+au|0)){aA=az;aC=a0;ax=a$}else{ay=3421;break}}do{if((ay|0)==3421){ay=0;if((a0|0)==0){if(!((aA|0)==0|(aA|0)==5)){break}}if(al){aH=aq;ay=4034;break L4581}if((a[47856]&1)!=0){if((a[47544]&1)!=0){ay=3426;break L4581}}ax=aq+1|0;c[13898]=ax;L4677:do{if((ax|0)<(ar|0)){L4679:do{if((a[as+(ax*40&-1)|0]&1)!=0){aC=c[as+(ax*40&-1)+36>>2]|0;av=as+(ax*40&-1)+32|0;az=c[10036]|0;aB=0;while(1){if((aB|0)>=(aC|0)){break}if((a[az+((c[av>>2]|0)+aB|0)|0]|0)==(a[aB+103664|0]|0)){aB=aB+1|0}else{break L4679}}if((aB|0)==1){ay=3435;break L4677}}}while(0);a[14176]=1;is(D);a[14176]=0;if((c[ad>>2]|0)!=3){c[13898]=ax;ay=3435;break}av=c[ae>>2]|0;c[9356]=av;if((av|0)==0){break}a[37432]=0;aP=ap;aQ=ao;aS=an;aT=am;aU=1;break L4629}else{ay=3435}}while(0);if((ay|0)==3435){ay=0;c[9356]=0}ax=is(C)|0;av=c[ax>>2]|0;if((av|0)==1){a1=+(c[ax+8>>2]|0)}else if((av|0)==2){a1=+h[ax+8>>3]}else if((av|0)==3){a1=+uz(c[ax+8>>2]|0,0)}else{ay=3442;break L4581}if((c[af>>2]|0)==3){uu(c[ag>>2]|0);c[af>>2]=1}ax=~~a1;c[11898]=ax;av=c[13898]|0;az=c[8272]|0;L4701:do{if((az|0)>(av|0)){aC=c[1054]|0;if((a[aC+(av*40&-1)|0]&1)==0){break}aG=c[aC+(av*40&-1)+36>>2]|0;aN=aC+(av*40&-1)+32|0;a2=c[10036]|0;a3=0;while(1){if((a3|0)>=(aG|0)){break}if((a[a2+((c[aN>>2]|0)+a3|0)|0]|0)==(a[a3+183584|0]|0)){a3=a3+1|0}else{break L4701}}if((a3|0)!=1){break}aN=av+1|0;c[13898]=aN;L4709:do{if((az|0)>(aN|0)){if((a[aC+(aN*40&-1)|0]&1)==0){ay=3458;break}aG=c[aC+(aN*40&-1)+36>>2]|0;a4=aC+(aN*40&-1)+32|0;a5=0;while(1){if((a5|0)>=(aG|0)){break}if((a[a2+((c[a4>>2]|0)+a5|0)|0]|0)==(a[a5+183584|0]|0)){a5=a5+1|0}else{ay=3458;break L4709}}if((a5|0)!=1){ay=3458;break}c[11762]=2147483647;a6=aN;a7=az}else{ay=3458}}while(0);if((ay|0)==3458){ay=0;aN=is(B)|0;a2=c[aN>>2]|0;if((a2|0)==3){a9=+uz(c[aN+8>>2]|0,0)}else if((a2|0)==1){a9=+(c[aN+8>>2]|0)}else if((a2|0)==2){a9=+h[aN+8>>3]}else{ay=3462;break L4581}if((c[ah>>2]|0)==3){uu(c[ai>>2]|0);c[ah>>2]=1}aN=~~a9;c[11762]=aN;ba=c[13898]|0;if((aN|0)<(c[11898]|0)){ay=3467;break L4581}a6=ba;a7=c[8272]|0}if((a7|0)<=(a6|0)){aP=ap;aQ=ao;aS=an;aT=am;aU=1;break L4629}aN=c[1054]|0;if((a[aN+(a6*40&-1)|0]&1)==0){aP=ap;aQ=ao;aS=an;aT=am;aU=1;break L4629}a2=c[aN+(a6*40&-1)+36>>2]|0;aC=aN+(a6*40&-1)+32|0;aN=c[10036]|0;a3=0;while(1){if((a3|0)>=(a2|0)){break}if((a[aN+((c[aC>>2]|0)+a3|0)|0]|0)==(a[a3+183584|0]|0)){a3=a3+1|0}else{aP=ap;aQ=ao;aS=an;aT=am;aU=1;break L4629}}if((a3|0)!=1){aP=ap;aQ=ao;aS=an;aT=am;aU=1;break L4629}c[13898]=a6+1;aC=is(A)|0;aN=c[aC>>2]|0;if((aN|0)==1){bb=+(c[aC+8>>2]|0)}else if((aN|0)==2){bb=+h[aC+8>>3]}else if((aN|0)==3){bb=+uz(c[aC+8>>2]|0,0)}else{ay=3478;break L4581}if((c[aj>>2]|0)==3){uu(c[ak>>2]|0);c[aj>>2]=1}aC=~~bb;aN=(aC|0)>-1?aC:-aC|0;c[11904]=aN;if((aN|0)<1){ay=3482;break L4581}else{aP=ap;aQ=ao;aS=an;aT=am;aU=1;break L4629}}}while(0);c[11762]=ax;aP=ap;aQ=ao;aS=an;aT=am;aU=1;break L4629}}while(0);if(at){break L4579}L4747:do{if((au|0)>0){aA=c[10036]|0;az=0;av=0;aN=aw;while(1){if((a[az+90160|0]|0)==(a[aA+(az+aN|0)|0]|0)){bd=aN;be=av}else{if((az|0)!=2){break L4747}bd=aN-1|0;be=1}aC=az+1|0;if((aC|0)<(be+au|0)){az=aC;av=be;aN=bd}else{break}}if((be|0)==0){if(!((az|0)==1|(az|0)==5)){break}}if(am){aH=aq;ay=4036;break L4581}a[43464]=0;aN=aq+1|0;c[13898]=aN;L4760:do{if((ar|0)>(aN|0)){if((a[as+(aN*40&-1)|0]&1)==0){ay=3500;break}av=c[as+(aN*40&-1)+36>>2]|0;aA=as+(aN*40&-1)+32|0;ax=c[10036]|0;aC=0;while(1){if((aC|0)>=(av|0)){break}if((a[ax+((c[aA>>2]|0)+aC|0)|0]|0)==(a[aC+183584|0]|0)){aC=aC+1|0}else{ay=3500;break L4760}}if((aC|0)==1){bf=aN;bg=ar}else{ay=3500}}else{ay=3500}}while(0);if((ay|0)==3500){ay=0;aN=is(z)|0;az=c[aN>>2]|0;if((az|0)==1){bh=+(c[aN+8>>2]|0)}else if((az|0)==2){bh=+h[aN+8>>3]}else if((az|0)==3){bh=+uz(c[aN+8>>2]|0,0)}else{ay=3504;break L4581}if((c[S>>2]|0)==3){uu(c[T>>2]|0);c[S>>2]=1}aN=~~bh;c[10872]=aN;bi=c[13898]|0;if((aN|0)<1){ay=3509;break L4581}bf=bi;bg=c[8272]|0}L4779:do{if((bg|0)>(bf|0)){aN=c[1054]|0;if((a[aN+(bf*40&-1)|0]&1)==0){bj=bf;bk=bg;break}az=c[aN+(bf*40&-1)+36>>2]|0;aA=aN+(bf*40&-1)+32|0;ax=c[10036]|0;av=0;while(1){if((av|0)>=(az|0)){break}if((a[ax+((c[aA>>2]|0)+av|0)|0]|0)==(a[av+183584|0]|0)){av=av+1|0}else{bj=bf;bk=bg;break L4779}}if((av|0)!=1){bj=bf;bk=bg;break}aA=bf+1|0;c[13898]=aA;L4787:do{if((bg|0)>(aA|0)){if((a[aN+(aA*40&-1)|0]&1)==0){break}az=c[aN+(aA*40&-1)+36>>2]|0;aC=aN+(aA*40&-1)+32|0;a3=0;while(1){if((a3|0)>=(az|0)){break}if((a[ax+((c[aC>>2]|0)+a3|0)|0]|0)==(a[a3+183584|0]|0)){a3=a3+1|0}else{break L4787}}if((a3|0)==1){bj=aA;bk=bg;break L4779}}}while(0);aA=is(y)|0;ax=c[aA>>2]|0;if((ax|0)==1){bl=+(c[aA+8>>2]|0)}else if((ax|0)==2){bl=+h[aA+8>>3]}else if((ax|0)==3){bl=+uz(c[aA+8>>2]|0,0)}else{ay=3526;break L4581}if((c[U>>2]|0)==3){uu(c[V>>2]|0);c[U>>2]=1}aA=~~bl;c[10874]=aA;bm=c[13898]|0;if((aA|0)<1){ay=3531;break L4581}bj=bm;bk=c[8272]|0}else{bj=bf;bk=bg}}while(0);L4805:do{if((bk|0)>(bj|0)){aA=c[1054]|0;if((a[aA+(bj*40&-1)|0]&1)==0){bn=bj;bo=bk;break}ax=c[aA+(bj*40&-1)+36>>2]|0;aN=aA+(bj*40&-1)+32|0;av=c[10036]|0;aC=0;while(1){if((aC|0)>=(ax|0)){break}if((a[av+((c[aN>>2]|0)+aC|0)|0]|0)==(a[aC+183584|0]|0)){aC=aC+1|0}else{bn=bj;bo=bk;break L4805}}if((aC|0)!=1){bn=bj;bo=bk;break}aN=bj+1|0;c[13898]=aN;L4813:do{if((bk|0)>(aN|0)){if((a[aA+(aN*40&-1)|0]&1)==0){break}ax=c[aA+(aN*40&-1)+36>>2]|0;az=aA+(aN*40&-1)+32|0;a5=0;while(1){if((a5|0)>=(ax|0)){break}if((a[av+((c[az>>2]|0)+a5|0)|0]|0)==(a[a5+183584|0]|0)){a5=a5+1|0}else{break L4813}}if((a5|0)==1){bn=aN;bo=bk;break L4805}}}while(0);aN=is(x)|0;av=c[aN>>2]|0;if((av|0)==1){bp=+(c[aN+8>>2]|0)}else if((av|0)==2){bp=+h[aN+8>>3]}else if((av|0)==3){bp=+uz(c[aN+8>>2]|0,0)}else{ay=3548;break L4581}if((c[W>>2]|0)==3){uu(c[X>>2]|0);c[W>>2]=1}aN=~~bp;c[10806]=aN;bq=c[13898]|0;if((aN|0)<0){ay=3553;break L4581}bn=bq;bo=c[8272]|0}else{bn=bj;bo=bk}}while(0);L4831:do{if((bo|0)>(bn|0)){aN=c[1054]|0;if((a[aN+(bn*40&-1)|0]&1)==0){br=bn;bs=bo;break}av=c[aN+(bn*40&-1)+36>>2]|0;aA=aN+(bn*40&-1)+32|0;aC=c[10036]|0;az=0;while(1){if((az|0)>=(av|0)){break}if((a[aC+((c[aA>>2]|0)+az|0)|0]|0)==(a[az+183584|0]|0)){az=az+1|0}else{br=bn;bs=bo;break L4831}}if((az|0)!=1){br=bn;bs=bo;break}aA=bn+1|0;c[13898]=aA;L4839:do{if((bo|0)>(aA|0)){if((a[aN+(aA*40&-1)|0]&1)==0){break}av=c[aN+(aA*40&-1)+36>>2]|0;ax=aN+(aA*40&-1)+32|0;a3=0;while(1){if((a3|0)>=(av|0)){break}if((a[aC+((c[ax>>2]|0)+a3|0)|0]|0)==(a[a3+183584|0]|0)){a3=a3+1|0}else{break L4839}}if((a3|0)==1){br=aA;bs=bo;break L4831}}}while(0);aA=is(u)|0;aC=c[aA>>2]|0;if((aC|0)==1){bu=+(c[aA+8>>2]|0)}else if((aC|0)==2){bu=+h[aA+8>>3]}else if((aC|0)==3){bu=+uz(c[aA+8>>2]|0,0)}else{ay=3570;break L4581}if((c[Y>>2]|0)==3){uu(c[Z>>2]|0);c[Y>>2]=1}aA=~~bu;c[10808]=aA;bv=c[13898]|0;if((aA|0)<0){ay=3575;break L4581}br=bv;bs=c[8272]|0}else{br=bn;bs=bo}}while(0);L4857:do{if((bs|0)>(br|0)){aA=c[1054]|0;if((a[aA+(br*40&-1)|0]&1)==0){bw=br;bx=bs;break}aC=c[aA+(br*40&-1)+36>>2]|0;aN=aA+(br*40&-1)+32|0;az=c[10036]|0;ax=0;while(1){if((ax|0)>=(aC|0)){break}if((a[az+((c[aN>>2]|0)+ax|0)|0]|0)==(a[ax+183584|0]|0)){ax=ax+1|0}else{bw=br;bx=bs;break L4857}}if((ax|0)!=1){bw=br;bx=bs;break}aN=br+1|0;c[13898]=aN;L4865:do{if((bs|0)>(aN|0)){if((a[aA+(aN*40&-1)|0]&1)==0){break}aC=c[aA+(aN*40&-1)+36>>2]|0;av=aA+(aN*40&-1)+32|0;a5=0;while(1){if((a5|0)>=(aC|0)){break}if((a[az+((c[av>>2]|0)+a5|0)|0]|0)==(a[a5+183584|0]|0)){a5=a5+1|0}else{break L4865}}if((a5|0)==1){bw=aN;bx=bs;break L4857}}}while(0);aN=is(t)|0;az=c[aN>>2]|0;if((az|0)==1){by=+(c[aN+8>>2]|0)}else if((az|0)==2){by=+h[aN+8>>3]}else if((az|0)==3){by=+uz(c[aN+8>>2]|0,0)}else{ay=3592;break L4581}if((c[_>>2]|0)==3){uu(c[$>>2]|0);c[_>>2]=1}aN=~~by;c[8832]=aN;bz=c[13898]|0;if((aN|0)<(c[10806]|0)){ay=3597;break L4581}bw=bz;bx=c[8272]|0}else{bw=br;bx=bs}}while(0);if((bx|0)<=(bw|0)){aP=ap;aQ=ao;aS=an;aT=1;aU=al;break L4629}aN=c[1054]|0;if((a[aN+(bw*40&-1)|0]&1)==0){aP=ap;aQ=ao;aS=an;aT=1;aU=al;break L4629}az=c[aN+(bw*40&-1)+36>>2]|0;aA=aN+(bw*40&-1)+32|0;aN=c[10036]|0;ax=0;while(1){if((ax|0)>=(az|0)){break}if((a[aN+((c[aA>>2]|0)+ax|0)|0]|0)==(a[ax+183584|0]|0)){ax=ax+1|0}else{aP=ap;aQ=ao;aS=an;aT=1;aU=al;break L4629}}if((ax|0)!=1){aP=ap;aQ=ao;aS=an;aT=1;aU=al;break L4629}c[13898]=bw+1;aA=is(s)|0;aN=c[aA>>2]|0;if((aN|0)==1){bA=+(c[aA+8>>2]|0)}else if((aN|0)==2){bA=+h[aA+8>>3]}else if((aN|0)==3){bA=+uz(c[aA+8>>2]|0,0)}else{ay=3608;break L4581}if((c[ab>>2]|0)==3){uu(c[ac>>2]|0);c[ab>>2]=1}aA=~~bA;c[8834]=aA;if((aA|0)<(c[10808]|0)){ay=3612;break L4581}else{aP=ap;aQ=ao;aS=an;aT=1;aU=al;break L4629}}}while(0);if(!((au|0)>0&(at^1))){break L4579}aA=c[10036]|0;aN=0;az=0;av=aw;while(1){if((a[aN+89424|0]|0)==(a[aA+(aN+av|0)|0]|0)){bB=av;bC=az}else{if((aN|0)!=4){break}bB=av-1|0;bC=1}aC=aN+1|0;if((aC|0)<(bC+au|0)){aN=aC;az=bC;av=bB}else{ay=3619;break}}do{if((ay|0)==3619){ay=0;if((bC|0)==0){if((aN-3|0)>>>0>=2){break}}if(an){aH=aq;ay=4037;break L4581}c[13898]=aq+1;uB(55600,24544);c[11670]=232;w=121;a[55702]=w&255;w=w>>8;a[55703|0]=w&255;it();av=c[18070]|0;az=db(av,c[av>>2]<<5|8,105624)|0;c[18070]=0;c[60]=az;c[11670]=0;aP=ap;aQ=ao;aS=1;aT=am;aU=al;break L4629}}while(0);if(at){break L4579}L4914:do{if((au|0)>0){aN=c[10036]|0;az=0;av=0;aA=aw;while(1){if((a[az+89072|0]|0)==(a[aN+(az+aA|0)|0]|0)){bD=aA;bE=av}else{if((az|0)!=1){break L4914}bD=aA-1|0;bE=1}aC=az+1|0;if((aC|0)<(bE+au|0)){az=aC;av=bE;aA=bD}else{break}}if((bE|0)==0){if(!((az|0)==0|(az|0)==5)){break}}if(ao){aH=aq;ay=4038;break L4581}if((a[47856]&1)==0){bF=aq;bG=ar}else{eA();bF=c[13898]|0;bG=c[8272]|0}L4930:do{if((bF|0)<(bG|0)){aA=c[1054]|0;L4932:do{if((a[aA+(bF*40&-1)|0]&1)!=0){av=c[aA+(bF*40&-1)+36>>2]|0;aN=aA+(bF*40&-1)+32|0;ax=c[10036]|0;aC=0;while(1){if((aC|0)>=(av|0)){break}if((a[ax+((c[aN>>2]|0)+aC|0)|0]|0)==(a[aC+103664|0]|0)){aC=aC+1|0}else{break L4932}}if((aC|0)==1){bH=bF;bI=bG;break L4930}}}while(0);aN=bF+1|0;c[13898]=aN;if((a[aA+(aN*40&-1)|0]&1)==0){bH=aN;bI=bG;break}ax=c[aA+(aN*40&-1)+32>>2]|0;av=c[10036]|0;a5=a[av+ax|0]|0;if(!((a5<<24>>24|0)==39|(a5<<24>>24|0)==34)){bH=aN;bI=bG;break}L4941:do{if((aN|0)<(bG|0)){a5=c[aA+(aN*40&-1)+36>>2]|0;a3=0;while(1){if((a3|0)>=(a5|0)){ay=3647;break}if((a[av+(a3+ax|0)|0]|0)==(a[a3+103664|0]|0)){a3=a3+1|0}else{break}}if((ay|0)==3647){ay=0;if((a3|0)==1){ay=3650;break}}a[14176]=1;is(r);a[14176]=0;if((c[K>>2]|0)!=3){c[13898]=aN;ay=3650;break}a5=c[L>>2]|0;c[11930]=a5;if((a5|0)==0){bJ=0;break}else{bK=0;bM=a5}L4952:while(1){aC=a8(bM|0,37)|0;if((aC|0)==0){break}else{bN=aC}while(1){aC=bN+1|0;a2=a[aC]|0;if((aZ(140272,a2|0,15)|0)!=0){bN=aC;continue}if((a2|0)==108){break}else if(!((a2|0)==42|(a2|0)==37)){bJ=a5;break L4941}a2=a8(bN+2|0,37)|0;if((a2|0)==0){break L4952}else{bN=a2}}a2=bN+2|0;if((aZ(140120,a[a2]|0|0,7)|0)==0){bJ=a5;break L4941}else{bK=bK+1|0;bM=a2}}if((bK-1|0)>>>0<7){aP=ap;aQ=1;aS=an;aT=am;aU=al;break L4629}else{bJ=a5}}else{ay=3650}}while(0);if((ay|0)==3650){ay=0;c[11930]=0;bJ=0}uu(bJ);c[11930]=0;c[13898]=aN;bH=aN;bI=c[8272]|0}else{bH=bF;bI=bG}}while(0);L4964:do{if((bH|0)<(bI|0)){az=c[1054]|0;L4966:do{if((a[az+(bH*40&-1)|0]&1)==0){bO=0;bQ=bH;bR=bI;bS=az}else{ax=c[az+(bH*40&-1)+36>>2]|0;av=az+(bH*40&-1)+32|0;aA=c[10036]|0;a3=0;while(1){if((a3|0)>=(ax|0)){break}if((a[aA+((c[av>>2]|0)+a3|0)|0]|0)==(a[a3+103664|0]|0)){a3=a3+1|0}else{bO=0;bQ=bH;bR=bI;bS=az;break L4966}}if((a3|0)==1){bT=0;bU=bH;bV=bI;break L4964}else{bO=0;bQ=bH;bR=bI;bS=az}}}while(0);while(1){az=c[11870]|0;if((az|0)>=(f|0)){ay=3666;break L4581}aN=(bR|0)>(bQ|0);av=a[bS+(bQ*40&-1)|0]|0;L4975:do{if(aN){aA=(av&1)==0;if(aA){ay=3680;break}ax=c[bS+(bQ*40&-1)+36>>2]|0;a5=bS+(bQ*40&-1)+32|0;a2=c[10036]|0;aC=0;while(1){if((aC|0)>=(ax|0)){ay=3672;break}if((a[a2+((c[a5>>2]|0)+aC|0)|0]|0)==(a[aC+183584|0]|0)){aC=aC+1|0}else{break}}do{if((ay|0)==3672){ay=0;if((aC|0)!=1){break}c[1048+(az*12&-1)>>2]=az;c[11870]=az+1;bW=(az|0)>(bO|0)?az:bO;break L4975}}while(0);if(aA){ay=3680;break}aC=c[bS+(bQ*40&-1)+36>>2]|0;a5=bS+(bQ*40&-1)+32|0;a2=c[10036]|0;ax=0;while(1){if((ax|0)>=(aC|0)){break}if((a[a2+((c[a5>>2]|0)+ax|0)|0]|0)==(a[ax+199040|0]|0)){ax=ax+1|0}else{ay=3680;break L4975}}if((ax|0)!=1){ay=3680;break}a[43464]=0;c[11670]=0;c[18068]=-99;it();a5=c[18070]|0;a2=db(a5,c[a5>>2]<<5|8,105624)|0;c[18070]=0;a5=c[11870]|0;c[1056+(a5*12&-1)>>2]=a2;a2=c[18068]|0;c[11870]=a5+1;c[1048+(a5*12&-1)>>2]=a2;bW=(bO|0)<(a2|0)?a2:bO}else{ay=3680}}while(0);L4991:do{if((ay|0)==3680){ay=0;az=c[bS+(bQ*40&-1)+36>>2]|0;a3=c[bS+(bQ*40&-1)+32>>2]|0;a2=(av&1)==0;L4993:do{if((az|0)>0&(a2^1)){a5=c[10036]|0;aC=0;aA=0;a4=a3;while(1){if((a[aC+141928|0]|0)==(a[a5+(aC+a4|0)|0]|0)){bX=a4;bY=aA}else{if((aC|0)!=4){break}bX=a4-1|0;bY=1}aG=aC+1|0;if((aG|0)<(bY+az|0)){aC=aG;aA=bY;a4=bX}else{ay=3686;break}}do{if((ay|0)==3686){ay=0;if((bY|0)==0){if(!((aC|0)==3|(aC|0)==10)){break}}eY(3);bW=bO;break L4991}}while(0);if(a2){break}else{bZ=0;b_=0;b$=a3}while(1){if((a[bZ+141800|0]|0)==(a[a5+(bZ+b$|0)|0]|0)){b0=b$;b1=b_}else{if((bZ|0)!=5){b2=0;b3=0;b4=a3;break}b0=b$-1|0;b1=1}aC=bZ+1|0;if((aC|0)<(b1+az|0)){bZ=aC;b_=b1;b$=b0}else{ay=3694;break}}do{if((ay|0)==3694){ay=0;if((b1|0)==0){if(!((bZ|0)==4|(bZ|0)==11)){b2=0;b3=0;b4=a3;break}}eY(4);bW=bO;break L4991}}while(0);while(1){if((a[b2+141632|0]|0)==(a[a5+(b2+b4|0)|0]|0)){b5=b4;b6=b3}else{if((b2|0)!=4){b7=0;b8=0;b9=a3;break}b5=b4-1|0;b6=1}aC=b2+1|0;if((aC|0)<(b6+az|0)){b2=aC;b3=b6;b4=b5}else{ay=3701;break}}do{if((ay|0)==3701){ay=0;if((b6|0)==0){if(!((b2|0)==3|(b2|0)==10)){b7=0;b8=0;b9=a3;break}}eY(5);bW=bO;break L4991}}while(0);while(1){if((a[b7+141416|0]|0)==(a[a5+(b7+b9|0)|0]|0)){ca=b9;cb=b8}else{if((b7|0)!=5){cc=0;cd=0;ce=a3;break}ca=b9-1|0;cb=1}aC=b7+1|0;if((aC|0)<(cb+az|0)){b7=aC;b8=cb;b9=ca}else{ay=3708;break}}do{if((ay|0)==3708){ay=0;if((cb|0)==0){if(!((b7|0)==4|(b7|0)==11)){cc=0;cd=0;ce=a3;break}}eY(6);bW=bO;break L4991}}while(0);while(1){if((a[cc+141296|0]|0)==(a[a5+(cc+ce|0)|0]|0)){cf=ce;cg=cd}else{if((cc|0)!=4){ch=0;ci=0;cj=a3;break}cf=ce-1|0;cg=1}aC=cc+1|0;if((aC|0)<(cg+az|0)){cc=aC;cd=cg;ce=cf}else{ay=3715;break}}do{if((ay|0)==3715){ay=0;if((cg|0)==0){if(!((cc|0)==3|(cc|0)==10)){ch=0;ci=0;cj=a3;break}}eY(7);bW=bO;break L4991}}while(0);while(1){if((a[ch+141096|0]|0)==(a[a5+(ch+cj|0)|0]|0)){ck=cj;cl=ci}else{if((ch|0)!=5){cm=0;break}ck=cj-1|0;cl=1}aC=ch+1|0;if((aC|0)<(cl+az|0)){ch=aC;ci=cl;cj=ck}else{ay=3722;break}}do{if((ay|0)==3722){ay=0;if((cl|0)==0){if(!((ch|0)==4|(ch|0)==11)){cm=0;break}}eY(8);bW=bO;break L4991}}while(0);do{if((a[cm+128552|0]|0)!=(a[a5+(cm+a3|0)|0]|0)){break L4993}cm=cm+1|0;}while((cm|0)<(az|0));if((cm|0)!=3){break}eY(2);bW=bO;break L4991}}while(0);L5068:do{if(aN){L5070:do{if(!a2){ax=c[10036]|0;a5=0;while(1){if((a5|0)>=(az|0)){break}if((a[ax+(a5+a3|0)|0]|0)==(a[a5+103664|0]|0)){a5=a5+1|0}else{break L5070}}if((a5|0)==1){break L5068}}}while(0);a[14176]=1;is(p);a[14176]=0;if((c[M>>2]|0)!=3){c[13898]=bQ;break}ax=c[N>>2]|0;if((ax|0)==0){break}aC=ut(68)|0;if((aC|0)==0){gk();a4=ut(68)|0;if((a4|0)==0){ay=3740;break L4581}else{cn=a4}}else{cn=aC}c[cn>>2]=2;c[cn+8>>2]=1;c[cn+16>>2]=3;c[cn+24>>2]=ax;c[cn+40>>2]=42;c[cn+48>>2]=0;aC=c[11870]|0;c[1056+(aC*12&-1)>>2]=cn;a4=aC+1|0;c[11870]=a4;c[1048+(aC*12&-1)>>2]=-99;a[32928]=1;a[43464]=0;if((a4|0)!=2){bW=bO;break L4991}uu(c[11902]|0);c[11902]=bP(ax|0)|0;bW=bO;break L4991}}while(0);a3=is(l)|0;az=c[a3>>2]|0;if((az|0)==1){co=+(c[a3+8>>2]|0)}else if((az|0)==2){co=+h[a3+8>>3]}else if((az|0)==3){co=+uz(c[a3+8>>2]|0,0)}else{ay=3747;break L4581}if((c[O>>2]|0)==3){uu(c[P>>2]|0);c[O>>2]=1}a3=~~co;if((a3|0)<-2){ay=3751;break L4581}az=c[11870]|0;c[11870]=az+1;c[1048+(az*12&-1)>>2]=a3;bW=(a3|0)>(bO|0)?a3:bO}}while(0);aN=c[13898]|0;av=c[8272]|0;if((av|0)<=(aN|0)){bT=bW;bU=aN;bV=av;break L4964}a3=c[1054]|0;if((a[a3+(aN*40&-1)|0]&1)==0){bT=bW;bU=aN;bV=av;break L4964}az=c[a3+(aN*40&-1)+36>>2]|0;a2=a3+(aN*40&-1)+32|0;ax=c[10036]|0;a4=0;while(1){if((a4|0)>=(az|0)){break}if((a[ax+((c[a2>>2]|0)+a4|0)|0]|0)==(a[a4+183584|0]|0)){a4=a4+1|0}else{bT=bW;bU=aN;bV=av;break L4964}}if((a4|0)!=1){bT=bW;bU=aN;bV=av;break L4964}a2=aN+1|0;c[13898]=a2;if((a2|0)==0){bT=bW;bU=0;bV=av;break}else{bO=bW;bQ=a2;bR=av;bS=a3}}}else{bT=0;bU=bH;bV=bI}}while(0);if((a[47856]&1)==0){cq=bU;cr=bV}else{eQ(bT);cq=c[13898]|0;cr=c[8272]|0}if((cq|0)>=(cr|0)){aP=ap;aQ=1;aS=an;aT=am;aU=al;break L4629}a2=c[1054]|0;if((a[a2+(cq*40&-1)|0]&1)==0){aP=ap;aQ=1;aS=an;aT=am;aU=al;break L4629}ax=c[a2+(cq*40&-1)+36>>2]|0;az=a2+(cq*40&-1)+32|0;a2=c[10036]|0;aC=0;while(1){if((aC|0)>=(ax|0)){ay=3767;break}aA=c[az>>2]|0;if((a[a2+(aA+aC|0)|0]|0)==(a[aC+103664|0]|0)){aC=aC+1|0}else{cs=aA;break}}if((ay|0)==3767){ay=0;if((aC|0)==1){aP=ap;aQ=1;aS=an;aT=am;aU=al;break L4629}cs=c[az>>2]|0}aA=a[a2+cs|0]|0;if((aA<<24>>24|0)==39|(aA<<24>>24|0)==34){ct=0}else{aP=ap;aQ=1;aS=an;aT=am;aU=al;break L4629}while(1){if((ct|0)>=(ax|0)){ay=3772;break}if((a[a2+(ct+cs|0)|0]|0)==(a[ct+103664|0]|0)){ct=ct+1|0}else{break}}if((ay|0)==3772){ay=0;if((ct|0)==1){break L4581}}a[14176]=1;is(q);a[14176]=0;if((c[Q>>2]|0)!=3){ay=3774;break L4581}a2=c[R>>2]|0;c[11930]=a2;if((a2|0)==0){ay=4050;break L4581}else{cv=0;cw=a2}L5123:while(1){a2=a8(cw|0,37)|0;if((a2|0)==0){break}else{cx=a2}while(1){a2=cx+1|0;ax=a[a2]|0;if((aZ(140272,ax|0,15)|0)!=0){cx=a2;continue}if((ax|0)==108){break}else if(!((ax|0)==42|(ax|0)==37)){ay=4051;break L4581}ax=a8(cx+2|0,37)|0;if((ax|0)==0){break L5123}else{cx=ax}}ax=cx+2|0;if((aZ(140120,a[ax]|0|0,7)|0)==0){ay=4052;break L4581}else{cv=cv+1|0;cw=ax}}if((cv-1|0)>>>0<7){aP=ap;aQ=1;aS=an;aT=am;aU=al;break L4629}else{ay=4053;break L4581}}}while(0);if(!((au|0)>0&(at^1))){break L4579}ax=c[10036]|0;a2=0;while(1){if((a[a2+88368|0]|0)!=(a[ax+(a2+aw|0)|0]|0)){break}cy=a2+1|0;if((cy|0)<(au|0)){a2=cy}else{ay=3788;break}}do{if((ay|0)==3788){ay=0;if((cy|0)!=8){break}c[13898]=aq+1;a[872]=1;aP=ap;aQ=ao;aS=an;aT=am;aU=al;break L4629}}while(0);if(!((au|0)>0&(at^1))){break L4579}a2=c[10036]|0;ax=0;az=0;aC=aw;while(1){if((a[ax+87120|0]|0)==(a[a2+(ax+aC|0)|0]|0)){cz=aC;cA=az}else{if((ax|0)!=6){break L4579}cz=aC-1|0;cA=1}aA=ax+1|0;if((aA|0)<(cA+au|0)){ax=aA;az=cA;aC=cz}else{break}}if((cA|0)==0){if(!((ax|0)==5|(ax|0)==11)){break L4579}}c[13898]=aq+1;a[J]=1;aP=ap;aQ=ao;aS=an;aT=am;aU=al}}while(0);au=c[13898]|0;aw=c[8272]|0;if((au|0)<(aw|0)){al=aU;am=aT;an=aS;ao=aQ;ap=aP;aq=au;ar=aw}else{break L4579}}if((ay|0)==3462){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3509){uf(bi,139088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3388){c[11880]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3478){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3404){uf(aX,138160,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3482){uf(c[13898]|0,139280,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3526){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3531){uf(bm,139088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3575){uf(bv,138968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3442){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3381){c[11880]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3426){uf(aq,139624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3570){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3467){uf(ba,139480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3504){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3548){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3553){uf(bq,138968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3592){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3597){uf(bz,138672,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3608){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3612){uf(c[13898]|0,138528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3666){uf(bQ,82688,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3740){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=179864,v)|0);return 0}else if((ay|0)==3747){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3751){uf(c[13898]|0,140816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3774){c[13898]=cq}else if((ay|0)==4033){uf(aH,86056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4034){uf(aH,86056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4035){uf(aH,86056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4036){uf(aH,86056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4037){uf(aH,86056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4038){uf(aH,86056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4050){cB=c[13898]|0;uf(cB,140584,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4051){cB=c[13898]|0;uf(cB,140584,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4052){cB=c[13898]|0;uf(cB,140584,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4053){cB=c[13898]|0;uf(cB,140584,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}c[11930]=0;cB=c[13898]|0;uf(cB,140584,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);L5192:do{if((c[9056]|0)==2){if((c[11870]|0)==1){c[13488]=c[262];break}do{if((j|0)!=0){if((c[j+8>>2]|0)!=3){break}c[13488]=c[268];break L5192}}while(0);c[13488]=c[265]}}while(0);c[7638]=-1;c[8800]=0;c[11854]=0;c[11852]=0;c[11850]=0;if((c[8716]|0)>>>0<160){c[8716]=160;j=ut(160)|0;do{if((j|0)==0){gk();aq=ut(160)|0;if((aq|0)!=0){cC=aq;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=84816,v)|0);return 0}else{cC=j}}while(0);c[8802]=cC}cC=c[11932]|0;j=a[cC]|0;L5209:do{if((j<<24>>24|0)==60){do{if((uA(cC|0)|0)>>>0>1){if((a[cC+1|0]|0)!=38){if((j<<24>>24|0)==60){break}else if((j<<24>>24|0)==45){ay=3830;break L5209}else if((j<<24>>24|0)==43){ay=3836;break L5209}else{ay=3840;break L5209}}aq=aE(cC+2|0,F|0,10)|0;c[12894]=aq;cB=c[F>>2]|0;if((a[cB]|0)!=0|(aq|0)<0){uf(H,84216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((cB|0)==((c[11932]|0)+2|0)){uf(H,84216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((aq|0)==(aR(c[o>>2]|0)|0)){uf(H,83392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}aq=c[12894]|0;if((aq|0)==(aR(c[n>>2]|0)|0)){uf(H,83392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}aq=c[12894]|0;if((aq|0)==(aR(c[m>>2]|0)|0)){uf(H,83392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}aq=bL(c[12894]|0,193632)|0;c[12892]=aq;if((aq|0)!=0){break L5209}uf(H,80992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}aq=bt(cC+1|0,193632)|0;c[12892]=aq;if((aq|0)==0){uj(H,79632,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{a[47440]=1;break}}else if((j<<24>>24|0)==45){ay=3830}else if((j<<24>>24|0)==43){ay=3836}else{ay=3840}}while(0);do{if((ay|0)==3830){if((uA(cC|0)|0)!=1){ay=3840;break}a[30664]=1;a[872]=1;j=c[8804]|0;if((j|0)==0){c[12892]=0;ay=3834}else{F=c[j>>2]|0;c[12892]=F;if((F|0)==0){ay=3834}}if((ay|0)==3834){c[12892]=c[o>>2]}a[34104]=1}else if((ay|0)==3836){F=uA(cC|0)|0;if((F|0)==1){c[11854]=1;break}if(!((a[cC+1|0]|0)==43&(F|0)==2)){break}c[11854]=2}}while(0);do{if((ay|0)==3840){iQ(47728);do{if((cu(c[11932]|0,G|0)|0)>-1){if((c[G+8>>2]&61440|0)!=16384){break}uj(H,78896,(v=i,i=i+8|0,c[v>>2]=c[11932],v)|0);return 0}}while(0);cC=hA(c[11932]|0,(a[47856]&1)!=0?78360:193632)|0;c[12892]=cC;if((cC|0)!=0){break}uh(-1,77960,(v=i,i=i+8|0,c[v>>2]=c[11932],v)|0);a[47736]=1;cD=-1;i=k;return cD|0}}while(0);do{if((a[47544]&1)!=0){H=c[12892]|0;if((a[47856]&1)!=0){G=~~+eE(H);if((G|0)==0){uf(-1,146120,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((G|0)>1e8){uf(-1,145960,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}co=+eE(H);h[5944]=co;if((G|0)>1){cC=(G<<2)-8|0;cp(H|0,cC|0,1);cE=+eE(H)}else{cE=co}h[5946]=cE;h[5945]=+eE(H);cp(H|0,0,2);cC=(bc(H|0)|0)>>>2;F=G+1|0;j=(cC|0)/(F|0)&-1;if((aa(j,F)|0)==(cC|0)){cC=G<<2^-4;cp(H|0,cC|0,2);h[5947]=+eE(H);c[(c[12172]|0)+140>>2]=G;c[(c[12172]|0)+144>>2]=j;cp(H|0,0,0);break}else{uf(-1,145728,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}H=c[11940]|0;if((H|0)!=0){uu(H)}c[12170]=0;c[12220]=0;c[12222]=0;c[12224]=0;c[11876]=0;H=c[11950]|0;if((c[11884]|0)<1){j=db(H,12,215112)|0;c[11950]=j;c[11884]=1;cF=j}else{cF=H}c[cF>>2]=0;H=c[12172]|0;j=c[11864]|0;if((j|0)>0){G=0;cC=j;while(1){j=H+(G*232&-1)+224|0;F=c[j>>2]|0;if((F|0)==0){cG=cC}else{uu(F);c[j>>2]=0;cG=c[11864]|0}j=G+1|0;if((j|0)<(cG|0)){G=j;cC=cG}else{break}}}c[11864]=0;cC=c[11862]|0;if((cC|0)==0){c[12204]=c[12200];c[12208]=0;G=c[12172]|0;do{if((c[11880]|0)<1){H=db(G,232,216568)|0;j=H;c[12172]=j;if((H|0)==0){c[11880]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{c[11880]=1;cH=c[11864]|0;cI=j;break}}else{cH=0;cI=G}}while(0);uD(cI+(cH*232&-1)|0,48440,232);G=(c[11864]|0)+1|0;c[11864]=G;cJ=G;cK=cI}else{c[12204]=c[12202];c[12208]=c[12206];G=c[12172]|0;do{if((cC|0)>(c[11880]|0)){j=db(G,cC*232&-1,216568)|0;H=j;c[12172]=H;if((j|0)==0){c[11880]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{c[11880]=cC;cL=c[11864]|0;cM=H;break}}else{cL=0;cM=G}}while(0);if((cC|0)>0){G=0;H=cL;while(1){uD(cM+(H*232&-1)|0,48440,232);j=(c[11864]|0)+1|0;c[11864]=j;F=G+1|0;if((F|0)<(cC|0)){G=F;H=j}else{cN=j;break}}}else{cN=cL}uD(cM|0,c[12168]|0,cN*232&-1);cJ=c[11864]|0;cK=c[12172]|0}if((cJ|0)>0){H=0;G=cJ;while(1){cC=cK+(H*232&-1)+224|0;j=c[cC>>2]|0;if((j|0)==0){cO=G}else{uu(j);c[cC>>2]=0;cO=c[11864]|0}cC=H+1|0;if((cC|0)<(cO|0)){H=cC;G=cO}else{break}}}c[11864]=0;G=0;H=0;cC=0;j=0;F=0;aq=0;L5319:while(1){cB=cC;aH=j;cq=F;bQ=aq;L5321:while(1){cP=cB;while(1){bz=eV()|0;if((bz|0)==0){ay=3886;break L5321}else{cQ=bz}while(1){if((aM(d[cQ]|0|0)|0)==0){break}else{cQ=cQ+1|0}}cR=a[cQ]|0;if(cR<<24>>24!=0){if((a8(c[11948]|0,cR<<24>>24|0)|0)==0){break}}if((cP|0)==0){cP=0}else{ay=3891;break L5321}}if(a[34104]|0){if((cR<<24>>24|0)==101|(cR<<24>>24|0)==69){ay=3894;break}}cS=eX(cQ)|0;if((cS|0)==0){ay=3911;break}if(!((cq|0)==0|(cS|0)==(cq|0))){ay=3897;break L5319}cT=bQ+1|0;if((cT|0)>(aH|0)){ax=aH<<1;bz=(ax|0)>1?ax:1;cU=db(cP,aa(bz<<2,cS),145264)|0;cV=bz}else{cU=cP;cV=aH}if((cS|0)>0){cW=H;cX=G;cY=0;ay=3903;break}else{cB=cU;aH=cV;cq=cS;bQ=cT}}if((ay|0)==3886){ay=0;a[47736]=1;ay=3911}else if((ay|0)==3891){ay=0;c[11940]=cP}else if((ay|0)==3894){ay=0;a[47736]=1;ay=3911}else if((ay|0)==3903){while(1){ay=0;aH=c[11952]|0;do{if((cY|0)<(c[10806]|0)){if((c[aH+(cY*24&-1)+8>>2]|0)==1){ay=3906;break}g[cU+(cX<<2)>>2]=0.0}else{ay=3906}}while(0);if((ay|0)==3906){ay=0;g[cU+(cX<<2)>>2]=+h[aH+(cY*24&-1)>>3]}cB=cX+1|0;do{if((c[(c[11952]|0)+(cY*24&-1)+8>>2]|0)==1){cZ=cW}else{bz=cW+1|0;if((cW|0)!=0){cZ=bz;break}uh(-1,145016,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cZ=bz}}while(0);aH=cY+1|0;if((aH|0)<(cS|0)){cW=cZ;cX=cB;cY=aH;ay=3903}else{break}}G=cS+G|0;H=cZ;cC=cU;j=cV;F=cS;aq=cT;continue}if((ay|0)==3911){ay=0;c[11940]=cP;if((cP|0)==0){ay=3919;break}}aH=c[11864]|0;if((a[47464]&1)==0){c_=cq;c$=bQ}else{c_=cq-1|0;c$=bQ-1|0}bz=aH+1|0;ax=c[12172]|0;if((bz|0)>(c[11880]|0)){bq=db(ax,bz*232&-1,216568)|0;ba=bq;c[12172]=ba;if((bq|0)==0){ay=3916;break}c[11880]=bz;c0=c[11864]|0;c1=c[11940]|0;c2=ba}else{c0=aH;c1=cP;c2=ax}uD(c2+(c0*232&-1)|0,48440,232);c[11864]=(c[11864]|0)+1;c[c2+(aH*232&-1)+224>>2]=c1;c[11940]=0;c[(c[12172]|0)+(aH*232&-1)+140>>2]=c_;c[(c[12172]|0)+(aH*232&-1)+144>>2]=c$;c[(c[12172]|0)+(aH*232&-1)+148>>2]=0;c[12208]=0;G=0;H=0;cC=0;j=0;F=0;aq=0}if((ay|0)==3897){if((cP|0)==0){uf(-1,145560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}uu(cP);uf(-1,145560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3916){c[11880]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==3919){a[47736]=0;break}}}while(0);cP=a[47856]|0;c$=a[47544]|0;do{if((cP&1)==0){if((c$&1)!=0){ay=3922;break}a[47392]=0}else{ay=3922}}while(0);L5379:do{if((ay|0)==3922){a[47392]=1;c_=E;c1=(c$&1)==0;if((c$&cP&1)!=0){a[47464]=1}c2=c[13898]|0;c0=c[8272]|0;L5384:do{if((c2|0)<(c0|0)){cT=c[1054]|0;cS=c2;while(1){L5388:do{if((a[cT+(cS*40&-1)|0]&1)!=0){cV=c[cT+(cS*40&-1)+36>>2]|0;cU=cT+(cS*40&-1)+32|0;cZ=c[10036]|0;cY=0;while(1){if((cY|0)>=(cV|0)){ay=3930;break}if((a[cZ+((c[cU>>2]|0)+cY|0)|0]|0)==(a[cY+103664|0]|0)){cY=cY+1|0}else{break}}if((ay|0)==3930){ay=0;if((cY|0)==1){c3=cS;break L5384}}if((cV|0)<=0){break}cX=0;cW=0;cQ=c[cU>>2]|0;while(1){if((a[cX+196448|0]|0)==(a[cZ+(cX+cQ|0)|0]|0)){c4=cQ;c5=cW}else{if((cX|0)!=1){break L5388}c4=cQ-1|0;c5=1}cR=cX+1|0;if((cR|0)<(c5+cV|0)){cX=cR;cW=c5;cQ=c4}else{break}}if((c5|0)!=0){c3=cS;break L5384}if((cX|0)==0|(cX|0)==4){c3=cS;break L5384}}}while(0);cB=cS+1|0;c[13898]=cB;if((cB|0)<(c0|0)){cS=cB}else{c3=cB;break}}}else{c3=c2}}while(0);L5407:do{if((c3|0)<(c0|0)){cS=c[1054]|0;L5409:do{if((a[cS+(c3*40&-1)|0]&1)==0){c6=c[10036]|0}else{cT=c[cS+(c3*40&-1)+36>>2]|0;bQ=cS+(c3*40&-1)+32|0;cq=c[10036]|0;cB=0;while(1){if((cB|0)>=(cT|0)){break}if((a[cq+((c[bQ>>2]|0)+cB|0)|0]|0)==(a[cB+103664|0]|0)){cB=cB+1|0}else{c6=cq;break L5409}}if((cB|0)==1){c7=1;break L5407}else{c6=cq}}}while(0);bQ=c3+1|0;c[13898]=bQ;cT=c[cS+(bQ*40&-1)+36>>2]|0;cQ=c[cS+(bQ*40&-1)+32>>2]|0;cW=(a[cS+(bQ*40&-1)|0]&1)==0;bQ=(cT|0)>0;cV=30672;cZ=116448;L5417:while(1){L5419:do{if(!cW){if(bQ){cU=0;cY=0;cR=cQ;while(1){cO=a[cZ+cU|0]|0;if(cO<<24>>24==(a[c6+(cU+cR|0)|0]|0)){c8=cR;c9=cY}else{if(cO<<24>>24!=36){break L5419}c8=cR-1|0;c9=1}da=cU+1|0;if((da|0)<(c9+cT|0)){cU=da;cY=c9;cR=c8}else{break}}if((c9|0)==0){dc=da}else{dd=cV;break L5417}}else{dc=0}cR=a[cZ+dc|0]|0;if((cR<<24>>24|0)==36|(cR<<24>>24|0)==0){dd=cV;break L5417}}}while(0);cq=cV+8|0;cB=c[cq>>2]|0;if((cB|0)==0){dd=cq;break}else{cV=cq;cZ=cB}}cZ=c[dd+4>>2]|0;cV=c3+2|0;c[13898]=cV;if((cZ|0)!=-1){c7=cZ;break}uf(cV,143640,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{c7=1}}while(0);c[13898]=c2;c0=0;while(1){if(c0>>>0>=31){break}if((c[48912+(c0<<3)>>2]|0)==(c7|0)){break}else{c0=c0+1|0}}if((c0|0)==31){uf(c2,148528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}do{if(!c1){if((c[11876]|0)>3){uf(-1,148288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{eQ(3);break}}}while(0);do{if((c[11870]|0)==0){if((a[47544]&1)!=0){c1=b[48918+(c0<<3)>>1]|0;if((c1<<16>>16|0)==2){if((b[48916+(c0<<3)>>1]|0)==1){c[11870]=3;break}else{uf(-1,147704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}else if((c1<<16>>16|0)==1){if((b[48916+(c0<<3)>>1]|0)!=1){uf(-1,147704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((c[11856]|0)==2){c[11870]=3;break}else{c[11870]=2;c[265]=3;break}}else{uf(-1,147704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}c1=b[48916+(c0<<3)>>1]|0;cV=c1<<16>>16;if(c1<<16>>16==0){uf(c2,148528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}do{if((c[11864]|0)==0){ay=3976}else{if((a[(c[12172]|0)+124|0]&1)==0){ay=3976;break}if((b[48918+(c0<<3)>>1]|0)!=0){de=cV;break}uf(c2,148080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);do{if((ay|0)==3976){c1=(b[48918+(c0<<3)>>1]|0)+cV|0;if((c[11856]|0)!=2){de=c1;break}de=c1+1|0}}while(0);if((de|0)<8){c[11870]=de;eQ(de);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=147920,v)|0);return 0}}}while(0);c2=c[11864]|0;if((c2|0)==0){break}cV=c[12172]|0;if((a[cV+124|0]&1)==0){break}if((a[47544]&1)!=0){break}uD(c_|0,1048,84);if((c[cV>>2]|0)==0){if((c[cV+140>>2]|0)==0){df=0}else{ay=3994}}else{ay=3994}do{if((ay|0)==3994){if((c[cV+4>>2]|0)==0){if((c[cV+144>>2]|0)==0){df=1;break}}if((c[cV+8>>2]|0)==0){if((c[cV+148>>2]|0)==0){df=2;break}}df=3}}while(0);c1=c[11870]|0;cZ=c1+df|0;if((cZ|0)>6){uf(-1,146856,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}uD(1048+(df*12&-1)|0,c_|0,c1*12&-1);if((df|0)!=0){c1=0;do{c[1048+(c1*12&-1)>>2]=c[cV+112+(c1<<2)>>2];c[1056+(c1*12&-1)>>2]=0;c1=c1+1|0;}while((c1|0)<(df|0))}c[11870]=cZ;if(!((c[11856]|0)==2&(c2|0)>0)){break}c1=48918+(c0<<3)|0;c_=0;cT=cZ;L5502:while(1){do{if((c[cV+(c_*232&-1)+8>>2]|0)==0){if((c[cV+(c_*232&-1)+148>>2]|0)!=0){dg=cT;break}cQ=b[c1>>1]|0;if(cQ<<16>>16>2){ay=4004;break L5502}do{if((c[cV+(c_*232&-1)+4>>2]|0)==0){if((c[cV+(c_*232&-1)+144>>2]|0)!=0){dh=cT;break}if(cQ<<16>>16>1){ay=4008;break L5502}if((cT|0)>6){ay=4011;break L5502}if((cT|0)>1){bQ=cT;while(1){cW=bQ-1|0;cS=1048+(bQ*12&-1)|0;cB=1048+(cW*12&-1)|0;c[cS>>2]=c[cB>>2];c[cS+4>>2]=c[cB+4>>2];c[cS+8>>2]=c[cB+8>>2];if((cW|0)>1){bQ=cW}else{break}}}c[265]=-4;c[267]=0;bQ=cT+1|0;c[11870]=bQ;dh=bQ}else{dh=cT}}while(0);if((dh|0)>6){ay=4016;break L5502}if((dh|0)>2){cQ=dh;while(1){bQ=cQ-1|0;cW=1048+(cQ*12&-1)|0;cB=1048+(bQ*12&-1)|0;c[cW>>2]=c[cB>>2];c[cW+4>>2]=c[cB+4>>2];c[cW+8>>2]=c[cB+8>>2];if((bQ|0)>2){cQ=bQ}else{break}}}c[268]=-5;c[270]=0;cQ=dh+1|0;c[11870]=cQ;dg=cQ}else{dg=cT}}while(0);cQ=c_+1|0;if((cQ|0)<(c2|0)){c_=cQ;cT=dg}else{break L5379}}if((ay|0)==4004){uf(-1,147376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4008){uf(-1,147096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4011){uf(-1,146856,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((ay|0)==4016){uf(-1,146856,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}}while(0);do{if((a[47544]&1)==0){if((c[11864]|0)!=1){di=0;break}ay=c[12172]|0;if((c[ay+4>>2]|0)>0){di=1;break}di=(c[ay+144>>2]|0)>0&1}else{di=1}}while(0);a[47584]=di;cD=c[11870]|0;i=k;return cD|0}function ez(){var b=0,d=0,e=0;b=i;c[11874]=0;if((c[12892]|0)==0){i=b;return}d=c[60]|0;if((d|0)!=0){e1(d);c[60]=0}d=c[264]|0;if((d|0)!=0){e1(d);c[264]=0}d=c[267]|0;if((d|0)!=0){e1(d);c[267]=0}d=c[270]|0;if((d|0)!=0){e1(d);c[270]=0}d=c[273]|0;if((d|0)!=0){e1(d);c[273]=0}d=c[276]|0;if((d|0)!=0){e1(d);c[276]=0}d=c[279]|0;if((d|0)!=0){e1(d);c[279]=0}d=c[282]|0;if((d|0)!=0){e1(d);c[282]=0}if((a[47584]&1)!=0&(c[11864]|0)>0){d=0;do{uu(c[(c[12172]|0)+(d*232&-1)+224>>2]|0);c[(c[12172]|0)+(d*232&-1)+224>>2]=0;d=d+1|0;}while((d|0)<(c[11864]|0))}do{if(!(a[34104]|0)){d=c[12894]|0;if((d|0)==(aR(c[12892]|0)|0)){cs(c[12892]|0);d=c[m>>2]|0;e=c[12894]|0;cf(d|0,77344,(v=i,i=i+8|0,c[v>>2]=e,v)|0);break}e=c[12892]|0;if(a[47440]|0){a2(e|0);a[47440]=0;break}else{az(e|0);break}}}while(0);a[34104]=0;c[12892]=0;i=b;return}function eA(){var a=0;c[11870]=0;c[262]=1;c[263]=0;a=c[264]|0;if((a|0)!=0){e1(a);c[264]=0}c[12210]=99;c[265]=2;c[266]=0;a=c[267]|0;if((a|0)!=0){e1(a);c[267]=0}c[12211]=99;c[268]=3;c[269]=0;a=c[270]|0;if((a|0)!=0){e1(a);c[270]=0}c[12212]=99;c[271]=4;c[272]=0;a=c[273]|0;if((a|0)!=0){e1(a);c[273]=0}c[12213]=99;c[274]=5;c[275]=0;a=c[276]|0;if((a|0)!=0){e1(a);c[276]=0}c[12214]=99;c[277]=6;c[278]=0;a=c[279]|0;if((a|0)!=0){e1(a);c[279]=0}c[12215]=99;c[280]=7;c[281]=0;a=c[282]|0;if((a|0)==0){c[12216]=99;return}e1(a);c[282]=0;c[12216]=99;return}function eB(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0;e=i;i=i+56|0;f=e|0;g=e+24|0;j=e+48|0;k=j;l=i;i=i+47|0;i=i+7>>3<<3;m=c[12202]|0;if((m|0)>-1){c[12204]=m}m=c[13898]|0;n=c[1054]|0;o=n+(m*40&-1)+36|0;p=c[o>>2]|0;q=n+(m*40&-1)+32|0;r=c[q>>2]|0;s=n+(m*40&-1)|0;L5605:do{if((a[s]&1)==0){t=0;u=4113}else{if((p|0)>0){w=c[10036]|0;x=0;y=0;z=r;while(1){if((a[x+179688|0]|0)==(a[w+(x+z|0)|0]|0)){A=z;B=y}else{if((x|0)!=4){t=0;u=4113;break L5605}A=z-1|0;B=1}C=x+1|0;if((C|0)<(B+p|0)){x=C;y=B;z=A}else{break}}if((B|0)!=0|(C|0)==4){u=4117;break}else{D=C}}else{D=0}t=(D|0)==9;u=4113}}while(0);if((u|0)==4113){if(t|(c[12204]|0)>-1){u=4117}else{E=m}}if((u|0)==4117){c[j>>2]=0;c[j+4>>2]=0;if(b){uf(m,138160,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}a[47544]=0;j=c[o>>2]|0;L5624:do{if((a[s]&1)!=0&(j|0)>0){o=c[10036]|0;t=0;D=0;C=c[q>>2]|0;while(1){if((a[t+179688|0]|0)==(a[o+(t+C|0)|0]|0)){F=C;G=D}else{if((t|0)!=4){break L5624}F=C-1|0;G=1}B=t+1|0;if((B|0)<(G+j|0)){t=B;D=G;C=F}else{break}}if((G|0)==0){if(!((t|0)==3|(t|0)==8)){break}}C=m+1|0;c[13898]=C;if((c[8272]|0)<=(C|0)){H=c[10880]|0;uf(C,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[n+(C*40&-1)|0]&1)==0){H=c[10880]|0;uf(C,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}D=c[n+(C*40&-1)+36>>2]|0;o=n+(C*40&-1)+32|0;B=c[10036]|0;A=0;while(1){if((A|0)>=(D|0)){break}if((a[B+((c[o>>2]|0)+A|0)|0]|0)==(a[A+115e3|0]|0)){A=A+1|0}else{u=4519;break}}if((u|0)==4519){H=c[10880]|0;uf(C,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((A|0)!=1){H=c[10880]|0;uf(C,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=m+2|0;c[13898]=o;D=c[n+(o*40&-1)+36>>2]|0;uD(k|0,B+(c[n+(o*40&-1)+32>>2]|0)|0,(D|0)<7?D:7);a[k+((D|0)>7?7:D)|0]=0;D=0;while(1){t=c[48696+(D<<3)>>2]|0;if((t|0)==0){break}if((uK(k|0,t|0)|0)==0){u=4137;break}else{D=D+1|0}}if((u|0)==4137){c[14150]=c[48700+(D<<3)>>2];c[12204]=D}if((c[12204]|0)==(D|0)){c[13898]=m+3;break}else{uf(o,178808,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((c[11856]|0)!=0){do{if((aY(201e3,c[48696+(c[12204]<<3)>>2]|0)|0)==0){m=bh(c[11932]|0,46)|0;k=m+1|0;do{if((m|0)!=0){n=c[12174]|0;if((n|0)==0){break}else{I=0;J=n}do{if((uK(k|0,J|0)|0)==0){c[14150]=c[48700+(I<<3)>>2]}I=I+1|0;J=c[48696+(I<<3)>>2]|0;}while((J|0)!=0)}}while(0);if((c[14150]|0)!=64){break}uf(-1,178808,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);cS[c[14150]&511]()}if((c[11864]|0)>0){J=0;do{I=c[12172]|0;if((c[I+(J*232&-1)+140>>2]|0)==(c[12145]|0)){K=I}else{c[I+(J*232&-1)>>2]=0;c[(c[12172]|0)+(J*232&-1)+4>>2]=0;c[(c[12172]|0)+(J*232&-1)+8>>2]=0;K=c[12172]|0}do{if(+h[K+(J*232&-1)+168>>3]!=0.0){if((c[K+(J*232&-1)+112>>2]|0)==-3){h[K+(J*232&-1)+24>>3]=0.0}if((c[K+(J*232&-1)+116>>2]|0)==-3){h[K+(J*232&-1)+32>>3]=0.0}if((c[K+(J*232&-1)+120>>2]|0)!=-3){break}h[K+(J*232&-1)+40>>3]=0.0}}while(0);do{if(+h[K+(J*232&-1)+176>>3]!=0.0){if((c[K+(J*232&-1)+112>>2]|0)==-4){h[K+(J*232&-1)+24>>3]=0.0}if((c[K+(J*232&-1)+116>>2]|0)==-4){h[K+(J*232&-1)+32>>3]=0.0}if((c[K+(J*232&-1)+120>>2]|0)!=-4){break}h[K+(J*232&-1)+40>>3]=0.0}}while(0);do{if(+h[K+(J*232&-1)+184>>3]!=0.0){if((c[K+(J*232&-1)+112>>2]|0)==-5){h[K+(J*232&-1)+24>>3]=0.0}if((c[K+(J*232&-1)+116>>2]|0)==-5){h[K+(J*232&-1)+32>>3]=0.0}if((c[K+(J*232&-1)+120>>2]|0)!=-5){break}h[K+(J*232&-1)+40>>3]=0.0}}while(0);if((c[K+(J*232&-1)+192>>2]|0)!=0){c[K+(J*232&-1)+48>>2]=0}J=J+1|0;}while((J|0)<(c[11864]|0))}E=c[13898]|0}J=c[8272]|0;L5717:do{if((E|0)<(J|0)){K=l|0;I=f|0;k=f+8|0;m=g|0;o=g+8|0;D=0;n=0;H=0;G=0;F=0;j=0;q=0;s=0;B=0;C=0;A=0;t=0;p=0;r=0;z=0;y=0;x=E;w=J;L5719:while(1){L=c[1054]|0;M=(a[L+(x*40&-1)|0]&1)==0;N=c[L+(x*40&-1)+36>>2]|0;O=L+(x*40&-1)+32|0;L5721:do{if(M){uD(K|0,31040,47);P=c[O>>2]|0;u=4193}else{Q=c[10036]|0;R=0;while(1){if((R|0)>=(N|0)){u=4166;break}if((a[Q+((c[O>>2]|0)+R|0)|0]|0)==(a[R+103664|0]|0)){R=R+1|0}else{break}}if((u|0)==4166){u=0;if((R|0)==1){S=y;break L5717}}uD(K|0,31040,47);Q=c[O>>2]|0;if(!((N|0)>0&(M^1))){P=Q;u=4193;break}T=c[10036]|0;U=0;V=0;W=Q;while(1){if((a[U+178256|0]|0)==(a[T+(U+W|0)|0]|0)){X=W;Y=V}else{if((U|0)!=3){break}X=W-1|0;Y=1}Z=U+1|0;if((Z|0)<(Y+N|0)){U=Z;V=Y;W=X}else{u=4173;break}}do{if((u|0)==4173){u=0;if((Y|0)==0){if(!((U|0)==2|(U|0)==6)){break}}if(r){u=4538;break L5719}_=x+1|0;c[13898]=_;if(b){u=4177;break L5719}a[47544]=0;eS();$=y;aa=z;ab=1;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5721}}while(0);if(!((N|0)>0&(M^1))){P=Q;u=4193;break}U=c[10036]|0;W=0;V=0;T=Q;while(1){if((a[W+177976|0]|0)==(a[U+(W+T|0)|0]|0)){ap=T;aq=V}else{if((W|0)!=3){P=Q;u=4193;break L5721}ap=T-1|0;aq=1}R=W+1|0;if((R|0)<(aq+N|0)){W=R;V=aq;T=ap}else{break}}if((aq|0)==0){if(!((W|0)==2|(W|0)==5)){P=Q;u=4193;break}}if(H){u=4544;break L5719}ar=x+1|0;c[13898]=ar;if(b){u=4190;break L5719}a[47544]=0;eS();if((c[11864]|0)>0){as=0}else{$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=1;an=n;ao=D;break}while(1){a[(c[12172]|0)+(as*232&-1)+124|0]=1;T=as+1|0;if((T|0)<(c[11864]|0)){as=T}else{$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=1;an=n;ao=D;break}}}}while(0);L5760:do{if((u|0)==4193){u=0;O=(w|0)>(x|0);L5762:do{if(O){if(M){S=y;break L5717}Q=c[10036]|0;W=0;while(1){if((W|0)>=(N|0)){u=4198;break}if((a[Q+(P+W|0)|0]|0)==(a[W+177688|0]|0)){W=W+1|0}else{u=4199;break}}if((u|0)==4198){u=0;if((W|0)!=2){u=4199}}do{if((u|0)==4199){u=0;if(!O){break L5762}if(M){S=y;break L5717}Q=c[10036]|0;T=0;while(1){if((T|0)>=(N|0)){u=4204;break}if((a[Q+(P+T|0)|0]|0)==(a[T+177448|0]|0)){T=T+1|0}else{break}}if((u|0)==4204){u=0;if((T|0)==2){break}}if(!O){break L5762}if(M){S=y;break L5717}Q=c[10036]|0;V=0;while(1){if((V|0)>=(N|0)){u=4218;break}if((a[Q+(P+V|0)|0]|0)==(a[V+176840|0]|0)){V=V+1|0}else{u=4219;break}}if((u|0)==4218){u=0;if((V|0)!=2){u=4219}}do{if((u|0)==4219){u=0;if(!O){break L5762}if(M){S=y;break L5717}Q=c[10036]|0;T=0;while(1){if((T|0)>=(N|0)){u=4224;break}if((a[Q+(P+T|0)|0]|0)==(a[T+176376|0]|0)){T=T+1|0}else{break}}if((u|0)==4224){u=0;if((T|0)==2){break}}if(!O){break L5762}if(M){S=y;break L5717}Q=c[10036]|0;U=0;while(1){if((U|0)>=(N|0)){u=4236;break}if((a[Q+(P+U|0)|0]|0)==(a[U+175576|0]|0)){U=U+1|0}else{break}}if((u|0)==4236){u=0;if((U|0)==2){u=4237;break L5719}}if(!O){break L5762}if(M){S=y;break L5717}Q=c[10036]|0;T=0;while(1){if((T|0)>=(N|0)){u=4243;break}if((a[Q+(P+T|0)|0]|0)==(a[T+174728|0]|0)){T=T+1|0}else{break}}do{if((u|0)==4243){u=0;if((T|0)!=5){break}if(t){u=4537;break L5719}U=x+1|0;c[13898]=U;L5814:do{if((w|0)>(U|0)){if((a[L+(U*40&-1)|0]&1)==0){break}R=c[L+(U*40&-1)+36>>2]|0;Z=L+(U*40&-1)+32|0;at=0;while(1){if((at|0)>=(R|0)){break}if((a[Q+((c[Z>>2]|0)+at|0)|0]|0)==(a[at+115e3|0]|0)){at=at+1|0}else{break L5814}}if((at|0)!=1){break}eT(1,0);$=y;aa=z;ab=r;ac=p;ad=1;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}}while(0);if((c[11864]|0)>0){au=0}else{$=y;aa=z;ab=r;ac=p;ad=1;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}while(1){c[(c[12172]|0)+(au*232&-1)+12>>2]=-1;U=au+1|0;if((U|0)<(c[11864]|0)){au=U}else{$=y;aa=z;ab=r;ac=p;ad=1;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}}}}while(0);if(!O){break L5762}if(M){S=y;break L5717}Q=c[10036]|0;T=0;while(1){if((T|0)>=(N|0)){u=4259;break}if((a[Q+(P+T|0)|0]|0)==(a[T+174440|0]|0)){T=T+1|0}else{break}}do{if((u|0)==4259){u=0;if((T|0)!=5){break}if(p){u=4549;break L5719}U=c[12172]|0;if(!(H|(U|0)!=0)){u=4262;break L5719}Z=x+1|0;c[13898]=Z;L5836:do{if((w|0)>(Z|0)){if((a[L+(Z*40&-1)|0]&1)==0){break}R=c[L+(Z*40&-1)+36>>2]|0;av=L+(Z*40&-1)+32|0;aw=0;while(1){if((aw|0)>=(R|0)){break}if((a[Q+((c[av>>2]|0)+aw|0)|0]|0)==(a[aw+115e3|0]|0)){aw=aw+1|0}else{break L5836}}if((aw|0)!=1){break}eT(1,1);$=y;aa=z;ab=r;ac=1;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}}while(0);if((c[11864]|0)>0){ax=0;ay=U}else{$=y;aa=z;ab=r;ac=1;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}while(1){c[ay+(ax*232&-1)+16>>2]=-1;Z=ax+1|0;if((Z|0)>=(c[11864]|0)){$=y;aa=z;ab=r;ac=1;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}ax=Z;ay=c[12172]|0}}}while(0);if(!O){break L5762}if(M){S=y;break L5717}Q=c[10036]|0;T=0;while(1){if((T|0)>=(N|0)){u=4278;break}if((a[Q+(P+T|0)|0]|0)==(a[T+173304|0]|0)){T=T+1|0}else{break}}if((u|0)==4278){u=0;if((T|0)==5){u=4279;break L5719}}if(!O){break L5762}if(M){S=y;break L5717}Q=c[10036]|0;U=0;while(1){if((U|0)>=(N|0)){u=4285;break}if((a[Q+(P+U|0)|0]|0)==(a[U+172952|0]|0)){U=U+1|0}else{break}}do{if((u|0)==4285){u=0;if((U|0)!=4){break}if(C){u=4535;break L5719}c[13898]=x+1;eT(2,-1);$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=1;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}}while(0);if(!O){break L5762}if(M){S=y;break L5717}U=c[10036]|0;Q=0;while(1){if((Q|0)>=(N|0)){u=4293;break}if((a[U+(P+Q|0)|0]|0)==(a[Q+172536|0]|0)){Q=Q+1|0}else{break}}do{if((u|0)==4293){u=0;if((Q|0)!=6){break}if(A){u=4546;break L5719}c[13898]=x+1;eT(2,1);$=y;aa=z;ab=r;ac=p;ad=t;ae=1;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}}while(0);if(!O){break L5762}if(M){S=y;break L5717}Q=c[10036]|0;U=0;while(1){if((U|0)>=(N|0)){break}if((a[Q+(P+U|0)|0]|0)==(a[U+172256|0]|0)){U=U+1|0}else{break L5762}}if((U|0)!=4){break L5762}if(z){u=4541;break L5719}c[13898]=x+1;eT(3,0);$=y;aa=1;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}}while(0);if(n){u=4536;break L5719}if(!(H|(c[12172]|0)!=0)){u=4227;break L5719}c[13898]=x+1;eT(0,1);if((c[11864]|0)<=0){$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=1;ao=D;break L5760}V=c[12172]|0;Q=0;while(1){h[V+(Q*232&-1)+40>>3]=+h[V+(Q*232&-1)+32>>3];T=Q+1|0;if((T|0)<(c[11864]|0)){Q=T}else{$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=1;ao=D;break L5760}}}}while(0);if(D){u=4540;break L5719}c[13898]=x+1;eT(0,0);W=c[11864]|0;if(n){az=W}else{if((W|0)<=0){$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=0;ao=1;break L5760}W=c[12172]|0;Q=0;while(1){h[W+(Q*232&-1)+32>>3]=+h[W+(Q*232&-1)+24>>3];V=Q+1|0;T=c[11864]|0;if((V|0)<(T|0)){Q=V}else{az=T;break}}}if((az|0)<=0){$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=1;break L5760}Q=c[12172]|0;W=0;while(1){h[Q+(W*232&-1)+40>>3]=+h[Q+(W*232&-1)+24>>3];T=W+1|0;if((T|0)<(c[11864]|0)){W=T}else{$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=1;break L5760}}}}while(0);if(!((N|0)>0&(M^1))){S=y;break L5717}O=c[10036]|0;W=0;Q=0;T=P;while(1){if((a[W+171944|0]|0)==(a[O+(W+T|0)|0]|0)){aA=T;aB=Q}else{if((W|0)!=5){break}aA=T-1|0;aB=1}V=W+1|0;if((V|0)<(aB+N|0)){W=V;Q=aB;T=aA}else{u=4310;break}}do{if((u|0)==4310){u=0;if((aB|0)==0){if(!((W|0)==4|(W|0)==9)){break}}if(z){u=4543;break L5719}c[13898]=x+1;if((c[11864]|0)<=0){$=y;aa=1;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}T=c[12172]|0;Q=0;while(1){O=T+(Q*232&-1)+112|0;c[O>>2]=c[12099];c[O+4>>2]=c[48400>>2];c[O+8>>2]=c[48404>>2];O=Q+1|0;if((O|0)<(c[11864]|0)){Q=O}else{$=y;aa=1;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}}}}while(0);if(M){S=y;break L5717}L5921:do{if((N|0)>0){W=c[10036]|0;Q=0;T=0;O=P;while(1){if((a[Q+171624|0]|0)==(a[W+(Q+O|0)|0]|0)){aC=O;aD=T}else{if((Q|0)!=4){break L5921}aC=O-1|0;aD=1}V=Q+1|0;if((V|0)<(aD+N|0)){Q=V;T=aD;O=aC}else{break}}if((aD|0)==0){if(!((Q|0)==3|(Q|0)==6)){break}}if(G){u=4326;break L5719}if(F){u=4548;break L5719}c[13898]=x+1;eT(4,c[11856]|0);$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=1;al=0;am=H;an=n;ao=D;break L5760}}while(0);if(!((N|0)>0&(M^1))){S=y;break L5717}O=c[10036]|0;T=0;W=0;V=P;while(1){if((a[T+185064|0]|0)==(a[O+(T+V|0)|0]|0)){aE=V;aF=W}else{if((T|0)!=3){break}aE=V-1|0;aF=1}Z=T+1|0;if((Z|0)<(aF+N|0)){T=Z;W=aF;V=aE}else{u=4335;break}}do{if((u|0)==4335){u=0;if((aF|0)==0){if(!((T|0)==2|(T|0)==6)){break}}if(F){u=4338;break L5719}if(G){u=4539;break L5719}c[13898]=x+1;eT(5,c[11856]|0);$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=0;al=1;am=H;an=n;ao=D;break L5760}}while(0);if(M){S=y;break L5717}L5952:do{if((N|0)>0){T=c[10036]|0;V=0;W=0;O=P;while(1){if((a[V+170712|0]|0)==(a[T+(V+O|0)|0]|0)){aG=O;aH=W}else{if((V|0)!=3){u=4350;break L5952}aG=O-1|0;aH=1}Z=V+1|0;if((Z|0)<(aH+N|0)){V=Z;W=aH;O=aG}else{break}}if((aH|0)!=0){break}if(!((V|0)==2|(V|0)==8)){u=4350}}else{u=4350}}while(0);do{if((u|0)==4350){u=0;if(!((N|0)>0&(M^1))){S=y;break L5717}O=c[10036]|0;W=0;T=0;Q=P;while(1){if((a[W+90456|0]|0)==(a[O+(W+Q|0)|0]|0)){aI=Q;aJ=T}else{if((W|0)!=3){break}aI=Q-1|0;aJ=1}Z=W+1|0;if((Z|0)<(aJ+N|0)){W=Z;T=aJ;Q=aI}else{u=4356;break}}if((u|0)==4356){u=0;if((aJ|0)!=0){break}if((W|0)==2|(W|0)==6){break}}if(M){S=y;break L5717}L5976:do{if((N|0)>0){Q=c[10036]|0;T=0;O=0;V=P;while(1){if((a[T+170128|0]|0)==(a[Q+(T+V|0)|0]|0)){aK=V;aL=O}else{if((T|0)!=4){break L5976}aK=V-1|0;aL=1}Z=T+1|0;if((Z|0)<(aL+N|0)){T=Z;O=aL;V=aK}else{break}}if((aL|0)==0){if(!((T|0)==3|(T|0)==13)){break}}if((c[11856]|0)==1){u=4370;break L5719}if(B){u=4545;break L5719}c[13898]=x+1;eT(7,0);$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=1;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}}while(0);if(!((N|0)>0&(M^1))){S=y;break L5717}W=c[10036]|0;V=0;while(1){if((a[V+169288|0]|0)!=(a[W+(V+P|0)|0]|0)){break}aM=V+1|0;if((aM|0)<(N|0)){V=aM}else{u=4377;break}}do{if((u|0)==4377){u=0;if((aM|0)!=4){break}if(j){u=4550;break L5719}c[13898]=x+1;eT(8,0);$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=1;ak=F;al=G;am=H;an=n;ao=D;break L5760}}while(0);if(M){S=y;break L5717}L6001:do{if((N|0)>0){V=c[10036]|0;W=0;O=0;Q=P;while(1){if((a[W+168800|0]|0)==(a[V+(W+Q|0)|0]|0)){aN=Q;aO=O}else{if((W|0)!=3){break L6001}aN=Q-1|0;aO=1}Z=W+1|0;if((Z|0)<(aO+N|0)){W=Z;O=aO;Q=aN}else{break}}if((aO|0)==0){if(!((W|0)==2|(W|0)==6)){break}}if(q){u=4551;break L5719}aP=x+1|0;c[13898]=aP;if((w|0)<=(aP|0)){u=4515;break L5719}if((a[L+(aP*40&-1)|0]&1)==0){u=4516;break L5719}Q=c[L+(aP*40&-1)+36>>2]|0;O=L+(aP*40&-1)+32|0;V=c[10036]|0;T=0;while(1){if((T|0)>=(Q|0)){break}if((a[V+((c[O>>2]|0)+T|0)|0]|0)==(a[T+115e3|0]|0)){T=T+1|0}else{u=4513;break L5719}}if((T|0)!=1){u=4514;break L5719}aQ=x+2|0;c[13898]=aQ;O=c[L+(aQ*40&-1)+36>>2]|0;Q=c[L+(aQ*40&-1)+32>>2]|0;W=(a[L+(aQ*40&-1)|0]&1)==0;L6021:do{if((O|0)>0&(W^1)){Z=0;av=0;R=Q;while(1){if((a[Z+184456|0]|0)==(a[V+(Z+R|0)|0]|0)){aR=R;aS=av}else{if((Z|0)!=3){u=4405;break L6021}aR=R-1|0;aS=1}at=Z+1|0;if((at|0)<(aS+O|0)){Z=at;av=aS;R=aR}else{break}}if((aS|0)==0){if(!((Z|0)==2|(Z|0)==7)){u=4405;break}}c[12208]=0}else{u=4405}}while(0);L6032:do{if((u|0)==4405){u=0;T=(w|0)>(aQ|0);L6034:do{if(T){if(W){u=4521;break L5719}else{aT=0}while(1){if((aT|0)>=(O|0)){u=4409;break}if((a[V+(Q+aT|0)|0]|0)==(a[aT+167960|0]|0)){aT=aT+1|0}else{u=4410;break}}if((u|0)==4409){u=0;if((aT|0)!=4){u=4410}}if((u|0)==4410){u=0;if(!T){break}if(W){u=4522;break L5719}else{aU=0}while(1){if((aU|0)>=(O|0)){break}if((a[V+(Q+aU|0)|0]|0)==(a[aU+167400|0]|0)){aU=aU+1|0}else{break L6034}}if((aU|0)!=4){break}}c[12208]=c[12208]&3^3;break L6032}}while(0);L6050:do{if((O|0)>0&(W^1)){Z=0;R=0;av=Q;while(1){if((a[Z+167056|0]|0)==(a[V+(Z+av|0)|0]|0)){aV=av;aW=R}else{if((Z|0)!=3){break L6050}aV=av-1|0;aW=1}U=Z+1|0;if((U|0)<(aW+O|0)){Z=U;R=aW;av=aV}else{break}}if((aW|0)==0){if(!((Z|0)==2|(Z|0)==6)){break}}c[12208]=0;break L6032}}while(0);L6062:do{if(T){if(W){u=4523;break L5719}else{aX=0}while(1){if((aX|0)>=(O|0)){break}if((a[V+(Q+aX|0)|0]|0)==(a[aX+172296|0]|0)){aX=aX+1|0}else{break L6062}}if((aX|0)!=3){break}c[12208]=3;break L6032}}while(0);L6070:do{if((O|0)>0&(W^1)){Z=0;av=0;R=Q;while(1){if((a[Z+166640|0]|0)==(a[V+(Z+R|0)|0]|0)){aZ=R;a_=av}else{if((Z|0)!=3){u=4437;break L6070}aZ=R-1|0;a_=1}U=Z+1|0;if((U|0)<(a_+O|0)){Z=U;av=a_;R=aZ}else{break}}if((a_|0)!=0){break}if(!((Z|0)==2|(Z|0)==6)){u=4437}}else{u=4437}}while(0);if((u|0)==4437){u=0;if(W|T^1){u=4524;break L5719}else{a$=0}while(1){if((a$|0)>=(O|0)){break}if((a[V+(Q+a$|0)|0]|0)==(a[a$+166368|0]|0)){a$=a$+1|0}else{u=4525;break L5719}}if((a$|0)!=3){u=4526;break L5719}}c[12208]=1}}while(0);c[13898]=x+3;$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=1;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}}while(0);if(!((N|0)>0&(M^1))){S=y;break L5717}Q=c[10036]|0;V=0;O=0;W=P;while(1){if((a[V+165520|0]|0)==(a[Q+(V+W|0)|0]|0)){a0=W;a1=O}else{if((V|0)!=4){S=y;break L5717}a0=W-1|0;a1=1}T=V+1|0;if((T|0)<(a1+N|0)){V=T;O=a1;W=a0}else{break}}if((a1|0)==0){if(!((V|0)==3|(V|0)==6)){S=y;break L5717}}if(y){u=4547;break L5719}a2=x+1|0;c[13898]=a2;if(b){u=4454;break L5719}a[47544]=0;if((w|0)<=(a2|0)){u=4527;break L5719}if((a[L+(a2*40&-1)|0]&1)==0){u=4528;break L5719}W=c[L+(a2*40&-1)+36>>2]|0;O=L+(a2*40&-1)+32|0;Q=c[10036]|0;T=0;while(1){if((T|0)>=(W|0)){break}if((a[Q+((c[O>>2]|0)+T|0)|0]|0)==(a[T+115e3|0]|0)){T=T+1|0}else{u=4529;break L5719}}if((T|0)!=1){u=4530;break L5719}a3=x+2|0;c[13898]=a3;if(!d){if((a3|0)>=(w|0)){a4=a3;u=4531;break L5719}L6111:do{if((a[L+(a3*40&-1)|0]&1)!=0){O=c[L+(a3*40&-1)+36>>2]|0;W=L+(a3*40&-1)+32|0;V=0;while(1){if((V|0)>=(O|0)){break}if((a[Q+((c[W>>2]|0)+V|0)|0]|0)==(a[V+103664|0]|0)){V=V+1|0}else{break L6111}}if((V|0)==1){a4=a3;u=4532;break L5719}}}while(0);a[14176]=1;is(g);a[14176]=0;if((c[m>>2]|0)!=3){u=4480;break L5719}Q=c[o>>2]|0;if((Q|0)==0){u=4482;break L5719}eU(Q);uu(Q);$=1;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}uu(c[11962]|0);Q=c[13898]|0;L6121:do{if((Q|0)<(c[8272]|0)){T=c[1054]|0;L6123:do{if((a[T+(Q*40&-1)|0]&1)!=0){W=c[T+(Q*40&-1)+36>>2]|0;O=T+(Q*40&-1)+32|0;R=c[10036]|0;av=0;while(1){if((av|0)>=(W|0)){break}if((a[R+((c[O>>2]|0)+av|0)|0]|0)==(a[av+103664|0]|0)){av=av+1|0}else{break L6123}}if((av|0)==1){a5=0;break L6121}}}while(0);a[14176]=1;is(f);a[14176]=0;if((c[I>>2]|0)==3){a5=c[k>>2]|0;break}else{c[13898]=Q;a5=0;break}}else{a5=0}}while(0);c[11962]=a5;$=1;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=s;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D;break L5760}}while(0);if(s){u=4542;break L5719}c[13898]=x+1;eT(6,0);$=y;aa=z;ab=r;ac=p;ad=t;ae=A;af=C;ag=B;ah=1;ai=q;aj=j;ak=F;al=G;am=H;an=n;ao=D}}while(0);L=c[13898]|0;N=c[8272]|0;if((L|0)<(N|0)){D=ao;n=an;H=am;G=al;F=ak;j=aj;q=ai;s=ah;B=ag;C=af;A=ae;t=ad;p=ac;r=ab;z=aa;y=$;x=L;w=N}else{S=$;break L5717}}if((u|0)==4227){uf(x,175848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4237){uf(x,175072,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4177){uf(_,138160,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4338){uf(x,K,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4279){uf(x,175072,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4190){uf(ar,138160,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4370){uf(x,169712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4513){a6=c[10880]|0;uf(aP,a6,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4514){a6=c[10880]|0;uf(aP,a6,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4515){a6=c[10880]|0;uf(aP,a6,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4516){a6=c[10880]|0;uf(aP,a6,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4521){uf(aQ,165880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4522){uf(aQ,165880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4523){uf(aQ,165880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4524){uf(aQ,165880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4525){uf(aQ,165880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4526){uf(aQ,165880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4527){a7=c[10880]|0;uf(a2,a7,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4528){a7=c[10880]|0;uf(a2,a7,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4529){a7=c[10880]|0;uf(a2,a7,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4530){a7=c[10880]|0;uf(a2,a7,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4531){uf(a4,165048,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4532){uf(a4,165048,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4535){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4536){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4537){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4538){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4539){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4540){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4541){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4542){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4543){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4544){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4545){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4546){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4547){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4548){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4549){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4550){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4551){uf(x,164608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4454){uf(a2,138160,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4326){uf(x,K,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4262){uf(x,173896,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4480){c[13898]=a3;a4=a3;uf(a4,165048,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==4482){a4=c[13898]|0;uf(a4,165048,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{S=0}}while(0);do{if(!d){if(!((c[11862]|0)!=0&(b^1))){break}uh(-1,163928,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if(S){i=e;return}S=c[11962]|0;if(!((a[47544]&1)==0&(S|0)!=0)){i=e;return}eU(S);uh(-1,163496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=e;return}function eC(f,j){f=f|0;j=j|0;var k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,R=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0.0,am=0.0,an=0.0,ao=0.0,ap=0.0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0.0,aD=0.0,aE=0,aF=0,aG=0,aH=0,aJ=0,aK=0,aL=0,aN=0,aO=0.0,aP=0.0,aQ=0.0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0.0,aX=0.0,aZ=0.0,a$=0.0,a0=0.0,a1=0.0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a9=0,ba=0,bb=0,bc=0,bd=0,bf=0,bg=0,bh=0,bi=0,bj=0.0,bk=0,bl=0.0,bm=0.0,bn=0,bo=0.0,bp=0,bq=0,br=0.0,bs=0.0,bt=0,bu=0,bv=0;k=i;i=i+216|0;l=k|0;n=k+24|0;o=k+48|0;p=k+96|0;q=k+104|0;r=k+152|0;s=k+160|0;t=k+168|0;u=k+192|0;x=c[12892]|0;if(!((x|0)!=0|(c[11854]|0)!=0)){y=-1;i=k;return y|0}if((a[47392]&1)==0){if((c[8716]|0)==0){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=143056,v)|0);return 0}if((j|0)>=8){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=186808,v)|0);return 0}if(a[47736]|0){y=-1;i=k;return y|0}z=eV()|0;L6212:do{if((z|0)!=0){A=l|0;B=l+8|0;C=n|0;D=n+8|0;E=D;F=D;D=n+8|0;G=z;L6214:while(1){c[11900]=(c[11900]|0)+1;c[11874]=0;H=G;while(1){if((aM(d[H]|0|0)|0)==0){break}else{H=H+1|0}}I=a[H]|0;J=I<<24>>24==0;do{if(J){K=4799}else{if((a8(c[11948]|0,I<<24>>24|0)|0)==0){K=4799;break}if((c[9356]|0)==0){break}else{L=H;M=I}while(1){N=M<<24>>24;if(M<<24>>24==0){K=4793}else{if((a8(c[11948]|0,N|0)|0)==0){K=4793}}if((K|0)==4793){K=0;if((aM(N|0)|0)==0){break}}N=L+1|0;L=N;M=a[N]|0}if((a[L]|0)==0){break}N=c[9356]|0;if((a_(L|0,N|0,uA(N|0)|0)|0)!=0){break}a[37432]=1}}while(0);L6232:do{if((K|0)==4799){K=0;N=a[34104]|0;if(N){if((I<<24>>24|0)==101|(I<<24>>24|0)==69){K=4801;break L6214}else if((I<<24>>24|0)==0){K=4803}}else{if(J){K=4803}}if((K|0)==4803){K=0;c[7638]=-1;O=c[14126]|0;R=O+1|0;c[14126]=R;if((O|0)==0){c[8800]=(c[8800]|0)+1}do{if((R|0)==2){U=(c[11946]|0)+1|0;c[11946]=U;c[8800]=0;c[11942]=-1;V=c[9356]|0;if((V|0)!=0){if(a[37432]|0){K=4809;break L6214}}if((U|0)<=(c[11898]|0)){break L6232}if((U|0)<=(c[11762]|0)){W=V;break}if(N){break L6232}else{K=4813;break L6214}}else{W=c[9356]|0}}while(0);if((W|0)!=0){if(!(a[37432]|0)){break}}if((c[11946]|0)<(c[11898]|0)|(R|0)>2){break}else{K=4817;break L6214}}c[14126]=0;if((c[9356]|0)!=0){if(!(a[37432]|0)){break}}N=c[11946]|0;V=c[11898]|0;if((N|0)<(V|0)|(N|0)>(c[11762]|0)){break}if(((N-V|0)%(c[11904]|0)&-1|0)!=0){break}if((a[32928]&1)!=0|(c[13488]|0)>0){if(a[48872]|0){K=4824}}else{K=4824}if((K|0)==4824){K=0;V=c[8800]|0;N=c[10808]|0;if((V|0)<(N|0)|(V|0)>(c[8834]|0)){break}if(((V-N|0)%(c[10874]|0)&-1|0)!=0){break}N=(c[7638]|0)+1|0;c[7638]=N;V=c[10806]|0;if((N|0)<(V|0)|(N|0)>(c[8832]|0)){break}if(((N-V|0)%(c[10872]|0)&-1|0)!=0){break}}c[11942]=(c[11942]|0)+1;do{if((c[11930]|0)==0){eX(H)}else{do{if((c[11882]|0)<7){V=db(c[11952]|0,168,180032)|0;c[11952]=V;N=c[11882]|0;if((N|0)>=7){break}h[V+(N*24&-1)>>3]=0.0;c[V+(N*24&-1)+16>>2]=0;N=(c[11882]|0)+1|0;c[11882]=N;if((N|0)<7){X=N}else{break}do{N=c[11952]|0;h[N+(X*24&-1)>>3]=0.0;c[N+(X*24&-1)+16>>2]=0;X=(c[11882]|0)+1|0;c[11882]=X;}while((X|0)<7)}}while(0);N=c[11952]|0;V=ca(c[8802]|0,c[11930]|0,(v=i,i=i+56|0,c[v>>2]=N,c[v+8>>2]=N+24,c[v+16>>2]=N+48,c[v+24>>2]=N+72,c[v+32>>2]=N+96,c[v+40>>2]=N+120,c[v+48>>2]=N+144,v)|0)|0;c[11874]=V;if((V|0)==-1){K=4835;break L6214}if((V|0)>0){Y=0}else{break}do{c[(c[11952]|0)+(Y*24&-1)+8>>2]=1;c[(c[11952]|0)+(Y*24&-1)+12>>2]=0;Y=Y+1|0;}while((Y|0)<(c[11874]|0))}}while(0);do{if((c[11942]|0)==0){if(a[48872]|0){break}R=c[11874]|0;if((R|0)>0){V=0;while(1){uu(c[(c[11952]|0)+(V*24&-1)+16>>2]|0);N=eD(c[(c[11952]|0)+(V*24&-1)+12>>2]|0)|0;c[(c[11952]|0)+(V*24&-1)+16>>2]=N;N=V+1|0;U=c[11874]|0;if((N|0)<(U|0)){V=N}else{Z=U;break}}}else{Z=R}a[48872]=1;V=c[13488]|0;if((V|0)>(Z|0)){c[13488]=Z;_=Z}else{_=V}if((_|0)>0){K=4845;break L6214}if((a[32928]&1)!=0){K=4850;break L6214}}}while(0);V=c[11870]|0;U=c[11872]|0;N=(V|0)==0?7:U+V|0;$=U+j|0;ab=(N|0)>($|0)?$:N;if((ab|0)>0){ac=0;ad=1}else{ae=0;af=U;ag=V;break L6214}L6293:while(1){V=c[1048+(ac*12&-1)>>2]|0;c[12902]=ac;U=1052+(ac*12&-1)|0;N=c[U>>2]|0;L6295:do{if((N|0)>2){$=c[11944]|0;ah=($|0)==0;if(!ah){if((c[$+12>>2]|0)==474){ai=ad;break}}if((N|0)==5){aj=1;ak=1}else if((N|0)==6){aj=1;ak=5}else if((N|0)==7){aj=2;ak=0}else if((N|0)==8){aj=3;ak=3}else if((N|0)==4){aj=0;ak=6}else{aj=0;ak=2}do{if((ac|0)==1){if((aj|0)==0){al=+(c[11942]|0);break}else{al=+h[f+(aj-1<<3)>>3];break}}else{al=+h[f+(aj<<3)>>3]}}while(0);am=al;do{if(ah){an=am}else{if((c[$+12>>2]|0)!=392){an=am;break}if((ac|0)>1){if((aj|0)==0){ao=+(c[11942]|0)}else{ao=+h[f+(aj-1<<3)>>3]}ap=ao}else{ap=am}an=ap+ +h[(c[$+276>>2]|0)+16>>3]}}while(0);$=c[1056+(ac*12&-1)>>2]|0;if(($|0)==0){ah=eD(c[47056+(ac<<2)>>2]|0)|0;dp(ak,ah,an,-1);uu(ah);aq=ad;K=4942;break}a[43504]=1;e4($,l);a[43504]=0;if((c[A>>2]|0)==3){$=c[B>>2]|0;dp(ak,$,an,-1);uu($);c[A>>2]=1;aq=ad;K=4942;break}else{$=c[m>>2]|0;aI(142872,39,1,$|0);aq=ad;K=4942;break}}else{if((N|0)==2){$=eD(c[47056+(ac<<2)>>2]|0)|0;if((c[11944]|0)!=0){ah=c[11942]|0;ar=ut(192)|0;if((ar|0)==0){gk();as=ut(192)|0;if((as|0)==0){K=4883;break L6214}else{at=as}}else{at=ar}ar=at;if((c[(c[11944]|0)+224>>2]|0)==0){as=ut(192)|0;if((as|0)==0){gk();au=ut(192)|0;if((au|0)==0){K=4887;break L6214}else{av=au}}else{av=as}c[(c[11944]|0)+224>>2]=av;as=(c[11944]|0)+224|0;uE(c[as>>2]|0,0,192);c[(c[as>>2]|0)+4>>2]=-1}if(($|0)==0){aw=0}else{aw=bP($|0)|0}c[at+60>>2]=aw;c[at+4>>2]=ah;c[at+64>>2]=0;c[at>>2]=c[c[(c[11944]|0)+224>>2]>>2];c[c[(c[11944]|0)+224>>2]>>2]=ar}uu($);aq=ad;K=4942;break}$=c[1056+(ac*12&-1)>>2]|0;if(($|0)==0){if((V|0)==(-2|0)){h[f+(ac<<3)>>3]=+(c[11946]|0);aq=ad;K=4942;break}else if((V|0)==(-1|0)){h[f+(ac<<3)>>3]=+(c[8800]|0);aq=ad;K=4942;break}else if((V|0)==0){h[f+(ac<<3)>>3]=+(c[11942]|0);aq=ad;K=4942;break}else{if((V|0)<1){K=4928;break L6214}ar=c[48840+(ac<<2)>>2]|0;do{if((ar|0)!=99){if((c[64808+(ar*688&-1)>>2]|0)!=1){break}h[r>>3]=0.0;if((V|0)>(c[11874]|0)){K=4935;break L6293}ah=V-1|0;as=c[11952]|0;if((c[as+(ah*24&-1)+8>>2]|0)==-5){K=4935;break L6293}au=c[as+(ah*24&-1)+12>>2]|0;if((au|0)==0){K=4935;break L6293}if((t1(au,64813+(ar*688&-1)|0,q,r)|0)==0){K=4935;break L6293}am=+t2(q);h[f+(ac<<3)>>3]=am+ +h[r>>3];aq=ad;K=4942;break L6295}}while(0);if((N|0)==1){ax=ad;K=4945;break}if((V|0)>(c[11874]|0)){K=4941;break L6293}ar=V-1|0;au=c[11952]|0;ah=c[au+(ar*24&-1)+8>>2]|0;if((ah|0)==(-5|0)){y=-5;K=4984;break L6214}else if((ah|0)!=1){K=4941;break L6293}h[f+(ac<<3)>>3]=+h[au+(ar*24&-1)>>3];aq=ad;K=4942;break}}a[43504]=1;e4($,n);a[43504]=0;if((a[1960]&1)!=0){y=-2;K=4981;break L6214}ar=48840+(ac<<2)|0;au=c[ar>>2]|0;do{if((au|0)==99){ay=0;K=4908}else{if((c[64808+(au*688&-1)>>2]|0)!=1){ay=0;K=4908;break}ah=c[C>>2]|0;if((ah|0)==3){az=1;break}if((aY(64813+(au*688&-1)|0,132824)|0)!=0){ay=1;K=4908;break}as=ut(20)|0;if((as|0)==0){gk();aA=ut(20)|0;if((aA|0)==0){K=4901;break L6214}else{aB=aA}}else{aB=as}if((ah|0)==1){aC=+(c[F>>2]|0)}else if((ah|0)==2){aC=+h[D>>3]}else if((ah|0)==3){aC=+uz(c[E>>2]|0,0)}else{K=4906;break L6214}be(aB|0,142616,(v=i,i=i+8|0,h[v>>3]=aC,v)|0);c[C>>2]=3;c[E>>2]=aB;ay=1;K=4908}}while(0);do{if((K|0)==4908){K=0;au=c[C>>2]|0;if((au|0)==3){az=ay;break}else if((au|0)==1){aD=+(c[F>>2]|0)}else if((au|0)==2){aD=+h[D>>3]}else{K=4921;break L6214}h[f+(ac<<3)>>3]=aD;aq=ad;K=4942;break L6295}}while(0);if((c[U>>2]|0)==1){au=c[E>>2]|0;$=(uA(au|0)|0)+3|0;ah=ut($)|0;if((ah|0)==0){gk();as=ut($)|0;if((as|0)==0){K=4912;break L6214}else{aE=as}}else{aE=ah}a[aE]=34;ah=aE+1|0;uB(ah|0,au|0);au=aE+(uA(aE|0)|0)|0;w=34;a[au]=w&255;w=w>>8;a[au+1|0]=w&255;au=47088+(ac<<2)|0;uu(c[au>>2]|0);c[au>>2]=aE;c[47056+(ac<<2)>>2]=aE}do{if(az){h[p>>3]=0.0;au=c[E>>2]|0;if((t1(au,64813+((c[ar>>2]|0)*688&-1)|0,o,p)|0)==0){aF=0;aG=au;break}am=+t2(o);h[f+(ac<<3)>>3]=am+ +h[p>>3];aF=ad;aG=au}else{aF=ad;aG=c[E>>2]|0}}while(0);uu(aG);c[C>>2]=1;aq=aF;K=4942}}while(0);do{if((K|0)==4942){K=0;if((c[U>>2]|0)!=1){ai=aq;break}if((c[1056+(ac*12&-1)>>2]|0)==0){ax=aq;K=4945;break}if((c[47056+(ac<<2)>>2]|0)==0){ax=aq;K=4945}else{ai=aq}}}while(0);do{if((K|0)==4945){K=0;if(!((V|0)==(-1|0)|(V|0)==(-2|0)|(V|0)==0)){ai=ax;break}U=ut(32)|0;if((U|0)==0){gk();N=ut(32)|0;if((N|0)==0){K=4948;break L6214}else{aH=N}}else{aH=U}U=~~+h[f+(ac<<3)>>3];be(aH|0,21e4,(v=i,i=i+8|0,c[v>>2]=U,v)|0);U=47088+(ac<<2)|0;uu(c[U>>2]|0);c[U>>2]=aH;c[47056+(ac<<2)>>2]=aH;ai=ax}}while(0);V=ac+1|0;if((V|0)<(ab|0)){ac=V;ad=ai}else{aJ=ai;aK=V;break}}if((K|0)==4935){K=0;aJ=(c[11870]|0)==0?ad:0;aK=ac}else if((K|0)==4941){K=0;aJ=(c[11870]|0)==0?ad:0;aK=ac}if((aJ|0)!=0){K=4952;break L6214}}}while(0);G=eV()|0;if((G|0)==0){break L6212}}if((K|0)==4984){i=k;return y|0}else if((K|0)==4883){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=142224,v)|0);return 0}else if((K|0)==4928){uf(-1,142440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((K|0)==4850){c[11942]=(c[11942]|0)-1;a[32928]=0;y=-9;i=k;return y|0}else if((K|0)==4887){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=142224,v)|0);return 0}else if((K|0)==4912){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=181200,v)|0);return 0}else if((K|0)==4845){G=c[(c[11952]|0)+((_-1|0)*24&-1)+16>>2]|0;if((G|0)==0){c[11902]=0;y=-7;i=k;return y|0}C=bP(G|0)|0;c[11902]=C;if((C|0)==0){y=-7;i=k;return y|0}c[11942]=(c[11942]|0)-1;c[13488]=-99;a[32928]=0;y=-6;i=k;return y|0}else if((K|0)==4801){a[47736]=1;y=-1;i=k;return y|0}else if((K|0)==4809){a[47736]=1;y=-1;i=k;return y|0}else if((K|0)==4813){a[47736]=1;y=-1;i=k;return y|0}else if((K|0)==4817){y=-3-O|0;i=k;return y|0}else if((K|0)==4835){a[47736]=1;y=-1;i=k;return y|0}else if((K|0)==4921){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((K|0)==4952){ae=aK;af=c[11872]|0;ag=c[11870]|0}else if((K|0)==4901){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=142728,v)|0);return 0}else if((K|0)==4981){i=k;return y|0}else if((K|0)==4906){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((K|0)==4948){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=142320,v)|0);return 0}C=ae-af|0;if((ag|0)==0|(C|0)==(ag|0)|(C|0)==(j|0)){y=C;i=k;return y|0}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=180528,v)|0);return 0}}}while(0);c[11874]=0;a[47736]=1;y=-1;i=k;return y|0}ag=s;if((x|0)==0){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=187320,v)|0);return 0}if((j|0)>=8){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=186808,v)|0);return 0}x=c[11876]|0;if((c[11884]|0)<=(x|0)){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=186248,v)|0);return 0}if((x|0)==0){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=185768,v)|0);return 0}if(a[47736]|0){y=-1;i=k;return y|0}do{if((c[11882]|0)<(x|0)){af=db(c[11952]|0,x*24&-1,180032)|0;c[11952]=af;ae=c[11882]|0;if((ae|0)>=(x|0)){break}h[af+(ae*24&-1)>>3]=0.0;c[af+(ae*24&-1)+16>>2]=0;ae=(c[11882]|0)+1|0;c[11882]=ae;if((ae|0)<(x|0)){aL=ae}else{break}do{ae=c[11952]|0;h[ae+(aL*24&-1)>>3]=0.0;c[ae+(aL*24&-1)+16>>2]=0;aL=(c[11882]|0)+1|0;c[11882]=aL;}while((aL|0)<(x|0))}}while(0);do{if((c[12222]|c[12224]|c[12220]|0)==0){x=c[12172]|0;aL=c[12170]|0;c[11788]=0;c[11787]=0;c[11786]=0;aD=+h[x+(aL*232&-1)+80>>3];if(+P(+aD)<.001){c[11822]=c[6578];c[11823]=c[6579];c[11824]=c[6580];c[11825]=c[6581];c[11826]=c[6582];c[11827]=c[6583];c[11828]=c[6584];c[11829]=c[6585];aN=0;aO=1.0;aP=0.0;aQ=0.0}else{aC=+S(+aD);h[5911]=aC;an=+T(+aD);aD=-0.0-an;h[5912]=aD;h[5913]=an;h[5914]=aC;aN=1;aO=aC;aP=aD;aQ=an}ae=x+(aL*232&-1)+88|0;an=+h[ae>>3];af=x+(aL*232&-1)+96|0;aD=+h[af>>3];aC=an*an+aD*aD;aK=x+(aL*232&-1)+104|0;aD=+h[aK>>3];ap=+Q(+(aC+aD*aD));ao=+Q(+aC);if(ap<1.0e-9|ao>3]);h[5917]=aC*ao*+h[ae>>3];h[5918]=aC*+h[af>>3]*+h[aK>>3];h[5919]=aC*ap*+h[ae>>3];h[5920]=aC*ao*+h[af>>3];h[5921]=ao*(-0.0-ao)*aC;h[5922]=0.0;h[5923]=aC*ao*+h[aK>>3];aR=1}aK=aN?1:aR;a[47128]=aK;if((a[47544]&1)==0){af=x+(aL*232&-1)+48|0;ae=x+(aL*232&-1)+192|0;O=x+(aL*232&-1)+124|0;_=0;do{aJ=x+(aL*232&-1)+(_<<2)|0;ac=c[aJ>>2]|0;do{if((ac|0)==0){if((c[x+(aL*232&-1)+140+(_<<2)>>2]|0)!=0){K=4589;break}aS=-3-(c[x+(aL*232&-1)+112+(_<<2)>>2]|0)|0;K=4595}else{K=4589}}while(0);do{if((K|0)==4589){K=0;ad=x+(aL*232&-1)+112+(_<<2)|0;if((a[O]&1)==0){aT=ac}else{c[1048+(_*12&-1)>>2]=c[ad>>2];aT=c[aJ>>2]|0}ai=-3-(c[ad>>2]|0)|0;if((aT|0)>0){c[47144+(ai<<2)>>2]=aT;aU=aT;aV=ai;break}if((aT|0)>=0){aS=ai;K=4595;break}c[47144+(ai<<2)>>2]=2147483647;aU=2147483647;aV=ai}}while(0);if((K|0)==4595){K=0;aJ=c[x+(aL*232&-1)+140+(aS<<2)>>2]|0;c[47144+(aS<<2)>>2]=aJ;aU=aJ;aV=aS}ao=+h[x+(aL*232&-1)+24+(_<<3)>>3];if(ao!=0.0){h[47240+(aV<<3)>>3]=ao;aW=ao}else{ao=+h[x+(aL*232&-1)+168+(aV<<3)>>3];h[47240+(aV<<3)>>3]=ao;aW=ao}ao=aW*+(aa(c[x+(aL*232&-1)+12+(_<<2)>>2]|0,c[x+(aL*232&-1)+152+(aV<<2)>>2]|0)|0);h[47240+(aV<<3)>>3]=ao;do{if((c[af>>2]|0)==0){if((c[ae>>2]|0)!=0){h[47176+(_<<3)>>3]=+h[x+(aL*232&-1)+200+(aV<<3)>>3];break}if((aU|0)>0){h[47176+(_<<3)>>3]=+(aU-1|0)*+P(+ao)*.5;break}else{h[47176+(_<<3)>>3]=0.0;break}}else{h[47176+(_<<3)>>3]=+h[x+(aL*232&-1)+56+(_<<3)>>3]}}while(0);aJ=c[af>>2]|0;if((aJ|0)==0){if((c[ae>>2]|0)==1){K=4608}else{K=4611}}else if((aJ|0)==1){K=4608}else{K=4611}do{if((K|0)==4608){K=0;if((aU|0)>0&ao<0.0){h[47264+(_<<3)>>3]=+(aU-1|0)*ao;break}else{h[47264+(_<<3)>>3]=0.0;break}}else if((K|0)==4611){K=0;if((aU|0)>0){h[47264+(_<<3)>>3]=+(aU-1|0)*ao*.5;break}else{h[47264+(_<<3)>>3]=0.0;break}}}while(0);_=_+1|0;}while((_|0)<3)}else{_=c[x+(aL*232&-1)+140>>2]|0;c[11786]=_;c[11787]=c[x+(aL*232&-1)+144>>2];if((_|0)==0){uf(-1,185128,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}_=x+(aL*232&-1)+12|0;h[5911]=aO*+(c[_>>2]|0);h[5912]=aP*+(c[_>>2]|0);_=x+(aL*232&-1)+16|0;h[5913]=aQ*+(c[_>>2]|0);h[5914]=aO*+(c[_>>2]|0);_=x+(aL*232&-1)+48|0;if((c[_>>2]|0)==0){aX=(+h[5946]+ +h[5944])*.5}else{aX=+h[x+(aL*232&-1)+56>>3]}h[5897]=aX;if((c[_>>2]|0)==0){aZ=(+h[5947]+ +h[5945])*.5}else{aZ=+h[x+(aL*232&-1)+64>>3]}h[5898]=aZ;if((c[_>>2]|0)==0){a$=0.0}else{a$=+h[x+(aL*232&-1)+72>>3]}h[5899]=a$;if((c[_>>2]|0)==1){a0=+h[5944]}else{a0=(+h[5946]+ +h[5944])*.5}h[5908]=a0;if((c[_>>2]|0)==1){a1=+h[5945]}else{a1=(+h[5947]+ +h[5945])*.5}h[5909]=a1;h[5910]=0.0;c[11802]=0}do{if(aK<<24>>24==0){if(+h[5908]!=+h[5897]){a2=1;break}if(+h[5909]!=+h[5898]){a2=1;break}a2=+h[5910]!=+h[5899]&1}else{a2=1}}while(0);a[47128]=a2;aK=x+(aL*232&-1)+224|0;_=c[aK>>2]|0;c[11800]=_;ae=c[12208]|0;c[11792]=a[47816+(ae>>>0<3?ae:3)|0]|0;ae=c[x+(aL*232&-1)+128>>2]|0;c[11790]=ae;a[47224]=0;a[47232]=0;c[7638]=-1;c[8800]=0;c[11946]=aL;if((_|0)!=0|(c[12204]|0)>0){break}if((a[47856]&1)==0){break}if((a[47584]&1)==0){break}if((a[47464]&1)!=0){break}_=c[11876]|0;af=c[11950]|0;if((_|0)>0){O=0;aJ=0;while(1){ac=((c[af+(aJ*12&-1)>>2]|0)+O|0)+(e[af+(aJ*12&-1)+8>>1]|0)|0;ai=aJ+1|0;if((ai|0)<(_|0)){O=ac;aJ=ai}else{a3=ac;break}}}else{a3=0}aJ=c[11786]|0;O=aa((aJ|0)<1?1:aJ,(c[af+(_*12&-1)>>2]|0)+a3|0);aJ=c[11787]|0;aL=aa(O,(aJ|0)<1?1:aJ);aJ=c[11788]|0;O=aa(aL,(aJ|0)<1?1:aJ)+ae|0;aJ=ut(O)|0;do{if((aJ|0)==0){gk();aL=ut(O)|0;if((aL|0)!=0){a4=aL;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=184632,v)|0);return 0}else{a4=aJ}}while(0);c[11800]=a4;c[aK>>2]=a4;aJ=cd(c[11800]|0,1,O|0,c[12892]|0)|0;if((aJ|0)==(O|0)){break}uh(-1,184408,(v=i,i=i+16|0,c[v>>2]=O,c[v+8>>2]=aJ,v)|0);a[47736]=1;y=-1;i=k;return y|0}}while(0);L6578:do{if(!(a[47736]|0)){a4=s;a3=s;a2=s|0;aU=s;aV=s;aS=f+8|0;aT=f+16|0;aR=t|0;aN=t+8|0;aJ=aN;ae=aN;aN=t+8|0;_=0;L6580:while(1){if(a[47224]|0){K=4629;break}if(a[47232]|0){K=4631;break}af=c[11790]|0;if((af|0)==0){a5=0}else{aL=c[11800]|0;if((aL|0)==0){if((eR(af)|0)!=0){y=-1;K=4966;break}}else{c[11800]=aL+af}c[11790]=0;a5=0}while(1){af=c[(c[11950]|0)+(a5*12&-1)>>2]|0;do{if((af|0)!=0){aL=c[11800]|0;if((aL|0)==0){if((eR(af)|0)==0){break}else{y=-1;K=4967;break L6580}}else{c[11800]=aL+af;break}}}while(0);if((a5|0)==(c[11876]|0)){K=4642;break}do{if((c[11858]|0)==0){af=c[11800]|0;aL=(c[11950]|0)+(a5*12&-1)+8|0;x=b[aL>>1]|0;if((af|0)==0){if((cd(ag|0,x&65535|0,1,c[12892]|0)|0)==1){break}else{K=4649;break L6580}}if(x<<16>>16==0){break}else{a6=0;a7=af}while(1){af=a7+1|0;c[11800]=af;a[ag+a6|0]=a[a7]|0;x=a6+1|0;if((x|0)<(e[aL>>1]|0|0)){a6=x;a7=af}else{break}}}else{a[ag]=0}}while(0);aL=c[11792]|0;af=c[11950]|0;x=e[af+(a5*12&-1)+8>>1]|0;do{if((aL-2|0)>>>0<2){ac=x-1|0;if((ac|0)>0){a9=0;ba=ac}else{break}do{ac=ag+a9|0;ai=a[ac]|0;ad=ag+ba|0;a[ac]=a[ad]|0;a[ad]=ai;a9=a9+1|0;ba=ba-1|0;}while((a9|0)<(ba|0))}}while(0);do{if((aL-1|0)>>>0<2){ai=x-1|0;if((ai|0)>0){bb=ai}else{break}do{ai=ag+(bb-1|0)|0;ad=a[ai]|0;ac=ag+bb|0;a[ai]=a[ac]|0;a[ac]=ad;bb=bb-2|0;}while((bb|0)>0)}}while(0);x=c[af+(a5*12&-1)+4>>2]|0;if((x|0)==0){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+(a[ag]|0|0);bc=aL}else if((x|0)==1){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+((d[ag]|0)>>>0);bc=aL}else if((x|0)==2){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+(b[a4>>1]|0|0);bc=aL}else if((x|0)==3){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+((e[a4>>1]|0)>>>0);bc=aL}else if((x|0)==4){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+(c[a3>>2]|0);bc=aL}else if((x|0)==5){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+((c[a3>>2]|0)>>>0>>>0);bc=aL}else if((x|0)==6){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+(c[a3>>2]|0);bc=aL}else if((x|0)==7){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+((c[a3>>2]|0)>>>0>>>0);bc=aL}else if((x|0)==10){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+((c[a2>>2]|0)>>>0)+ +(c[a2+4>>2]|0)*4294967296.0;bc=aL}else if((x|0)==11){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+((c[a2>>2]|0)>>>0)+ +((c[a2+4>>2]|0)>>>0)*4294967296.0;bc=aL}else if((x|0)==8){aL=c[11952]|0;h[aL+(a5*24&-1)>>3]=+g[aU>>2];bc=aL}else if((x|0)==9){x=c[11952]|0;h[x+(a5*24&-1)>>3]=+h[aV>>3];bc=x}else{K=4669;break L6580}c[bc+(a5*24&-1)+8>>2]=1;c[(c[11952]|0)+(a5*24&-1)+12>>2]=0;x=a[47544]|0;if((x&1)!=0){bd=x;break}a5=a5+1|0}if((K|0)==4642){K=0;bd=a[47544]|0}L6636:do{if((bd&1)==0){c[11942]=(c[7638]|0)+1;if((a5|0)==(c[11876]|0)){K=4702}else{K=4697;break L6580}}else{do{if((a[47464]&1)!=0){x=c[12224]|0;if(!((x|0)!=0|_)){h[5902]=+h[(c[11952]|0)+(a5*24&-1)>>3];bf=1;break L6636}if((c[12222]|x|c[12220]|0)!=0){break}x=c[11802]|0;aL=c[11786]|0;if((x|0)>=(aL|0)){break}ad=c[11784]|0;if((x|0)==0){ac=db(ad,aL<<2,183672)|0;aL=ac;c[11784]=aL;if((ac|0)==0){K=4682;break L6580}bg=c[11802]|0;bh=aL}else{bg=x;bh=ad}g[bh+(bg<<2)>>2]=+h[(c[11952]|0)+(a5*24&-1)>>3];ad=(c[11802]|0)+1|0;c[11802]=ad;bf=_&(ad|0)!=(c[11786]|0);break L6636}}while(0);c[11942]=~~+h[(c[11952]|0)+(a5*24&-1)>>3];af=c[11876]|0;if((af|0)>0){bi=af}else{K=4702;break}while(1){af=bi-1|0;if((bi|0)==1){ad=c[12224]|0;if((a[47464]&1)==0){bj=+(ad|0)}else{bj=+g[(c[11784]|0)+(ad<<2)>>2]}ad=c[11952]|0;h[ad+(af*24&-1)>>3]=bj;bk=ad}else if((bi|0)==2){if((a[47464]&1)==0){bl=+(c[12222]|0)}else{bl=+h[5902]}ad=c[11952]|0;h[ad+(af*24&-1)>>3]=bl;bk=ad}else{ad=c[11952]|0;h[ad+(af*24&-1)>>3]=+h[ad+(a5*24&-1)>>3];bk=ad}c[bk+(af*24&-1)+8>>2]=1;c[(c[11952]|0)+(af*24&-1)+12>>2]=0;if((af|0)>0){bi=af}else{K=4702;break}}}}while(0);do{if((K|0)==4702){K=0;af=c[12224]|0;ad=c[12222]|0;x=c[12220]|0;aL=af+1|0;c[12224]=aL;ac=c[11786]|0;do{if(!((ac|0)<1|(aL|0)<(ac|0))){c[12224]=0;ai=ad+1|0;c[12222]=ai;a[47224]=1;ax=c[11787]|0;if((ax|0)<0|(ai|0)<(ax|0)){break}c[12222]=0;ax=x+1|0;c[12220]=ax;ai=c[11788]|0;if((ai|0)<0|(ax|0)<(ai|0)){break}c[12220]=0;a[47232]=1;ai=(c[12170]|0)+1|0;c[12170]=ai;if((ai|0)<(c[11864]|0)){break}a[47736]=1}}while(0);ac=c[11946]|0;aL=c[11898]|0;if((ac|0)<(aL|0)|(ac|0)>(c[11762]|0)){bf=_;break}if(((ac-aL|0)%(c[11904]|0)&-1|0)!=0){bf=_;break}aL=c[8800]|0;ac=c[10808]|0;if((aL|0)<(ac|0)|(aL|0)>(c[8834]|0)){bf=_;break}if(((aL-ac|0)%(c[10874]|0)&-1|0)!=0){bf=_;break}ac=(c[7638]|0)+1|0;c[7638]=ac;aL=c[10806]|0;if((ac|0)<(aL|0)|(ac|0)>(c[8832]|0)){bf=_;break}if(((ac-aL|0)%(c[10872]|0)&-1|0)!=0){bf=_;break}c[11874]=c[11876];aL=c[11870]|0;ac=(aL|0)!=0?aL:7;aL=(ac|0)>(j|0)?j:ac;L6680:do{if((aL|0)>0){a1=+(x|0);a0=+(ad|0);a$=+(af|0);ac=0;L6682:while(1){ai=c[1048+(ac*12&-1)>>2]|0;ax=c[1056+(ac*12&-1)>>2]|0;do{if((ax|0)==0){if((ai|0)==(-5|0)){aH=c[(c[11944]|0)+12>>2]|0;if((aH|0)==400|(aH|0)==416){aZ=a1*+h[5907];h[f+(ac<<3)>>3]=aZ;bm=aZ;break}else{aZ=+h[c[11952]>>3];h[f+(ac<<3)>>3]=aZ;bm=aZ;break}}else if((ai|0)==(-4|0)){aZ=a0*+h[5906];h[f+(ac<<3)>>3]=aZ;bm=aZ;break}else if((ai|0)==(-3|0)){aZ=a$*+h[5905];h[f+(ac<<3)>>3]=aZ;bm=aZ;break}else if((ai|0)==(-2|0)){aZ=+(c[11946]|0);h[f+(ac<<3)>>3]=aZ;bm=aZ;break}else if((ai|0)==(-1|0)){aZ=+(c[8800]|0);h[f+(ac<<3)>>3]=aZ;bm=aZ;break}else if((ai|0)==0){aZ=+(c[11942]|0);h[f+(ac<<3)>>3]=aZ;bm=aZ;break}else{if((ai|0)<1){K=4738;break L6580}if((ai|0)>(c[11874]|0)){break L6682}aH=ai-1|0;aq=c[11952]|0;aF=c[aq+(aH*24&-1)+8>>2]|0;if((aF|0)==(-5|0)){y=-5;K=4971;break L6580}else if((aF|0)!=1){break L6682}aZ=+h[aq+(aH*24&-1)>>3];h[f+(ac<<3)>>3]=aZ;bm=aZ;break}}else{a[43504]=1;e4(ax,t);a[43504]=0;if((a[1960]&1)!=0){y=-2;K=4970;break L6580}aH=c[aR>>2]|0;if((aH|0)==3){aq=c[aJ>>2]|0;if((c[1052+(ac*12&-1)>>2]|0)==1){aF=(uA(aq|0)|0)+3|0;aG=ut(aF)|0;if((aG|0)==0){gk();p=ut(aF)|0;if((p|0)==0){K=4721;break L6580}else{bn=p}}else{bn=aG}a[bn]=34;aG=bn+1|0;uB(aG|0,aq|0);aG=bn+(uA(bn|0)|0)|0;w=34;a[aG]=w&255;w=w>>8;a[aG+1|0]=w&255;aG=47088+(ac<<2)|0;uu(c[aG>>2]|0);c[aG>>2]=bn;c[47056+(ac<<2)>>2]=bn}uu(aq);c[aR>>2]=1;bm=+h[f+(ac<<3)>>3];break}else if((aH|0)==1){bo=+(c[ae>>2]|0)}else if((aH|0)==2){bo=+h[aN>>3]}else{K=4726;break L6580}h[f+(ac<<3)>>3]=bo;bm=bo}}while(0);if((cg(+bm)|0)==0){if((a[47584]&1)==0){y=-2;K=4972;break L6580}}ax=ac+1|0;if((ax|0)<(aL|0)){ac=ax}else{bp=1;bq=ax;break L6680}}bp=(c[11870]|0)==0&1;bq=ac}else{bp=1;bq=0}}while(0);do{if((a[47128]&1)!=0){a$=+h[f>>3]- +h[5908];a0=+h[aS>>3]- +h[5909];a1=a$*+h[5911]+a0*+h[5912];h[f>>3]=a1;aZ=a$*+h[5913]+a0*+h[5914];h[aS>>3]=aZ;if((c[11856]|0)==2){a0=+h[aT>>3]- +h[5910];a$=a1*+h[5915]+aZ*+h[5916]+a0*+h[5917];h[f>>3]=a$;aX=a1*+h[5918]+aZ*+h[5919]+a0*+h[5920];h[aS>>3]=aX;h[aT>>3]=a1*+h[5921]+aZ*+h[5922]+a0*+h[5923];br=a$;bs=aX}else{br=a1;bs=aZ}h[f>>3]=br+ +h[5897];h[aS>>3]=bs+ +h[5898];if((c[11856]|0)!=2){break}h[aT>>3]=+h[5899]+ +h[aT>>3]}}while(0);if((bp|0)==0){bf=_}else{K=4752;break L6580}}}while(0);if(a[47736]|0){break L6578}else{_=bf}}if((K|0)==4629){a[47224]=0;c[7638]=-1;c[8800]=(c[8800]|0)+1;y=-3;i=k;return y|0}else if((K|0)==4631){a[47232]=0;c[8800]=0;y=-4;i=k;return y|0}else if((K|0)==4649){a[47736]=1;y=-1;i=k;return y|0}else if((K|0)==4669){uf(-1,184064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((K|0)==4682){uf(-1,183240,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((K|0)==4697){if((cj(c[12892]|0)|0)==0){uf(-1,c[6942]|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((a5|0)!=0){uf(-1,182696,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}a[47736]=1;y=-1;i=k;return y|0}else if((K|0)==4721){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=181200,v)|0);return 0}else if((K|0)==4726){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((K|0)==4738){uf(-1,180832,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((K|0)==4752){_=c[11870]|0;if((c[11872]|0)>0){aT=u|0;aS=u+8|0;aN=_;while(1){ae=1052+(aN*12&-1)|0;do{if((c[ae>>2]|0)>2){aR=c[1056+(aN*12&-1)>>2]|0;if((aR|0)==0){break}a[43504]=1;e4(aR,u);a[43504]=0;aR=c[ae>>2]|0;if((aR|0)==4){bt=0;bu=6}else if((aR|0)==5){bt=1;bu=1}else if((aR|0)==6){bt=1;bu=5}else if((aR|0)==7){bt=2;bu=0}else if((aR|0)==8){bt=2;bu=3}else{bt=0;bu=2}if((c[aT>>2]|0)!=3){break}aR=c[aS>>2]|0;dp(bu,aR,+h[f+(bt<<3)>>3],-1);uu(aR);c[aT>>2]=1}}while(0);ae=aN+1|0;aR=c[11870]|0;if((ae|0)<((c[11872]|0)+aR|0)){aN=ae}else{bv=aR;break}}}else{bv=_}if((bv|0)==0|(bq|0)==(bv|0)|(bq|0)==(j|0)){y=bq;i=k;return y|0}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=180528,v)|0);return 0}}else if((K|0)==4966){i=k;return y|0}else if((K|0)==4967){i=k;return y|0}else if((K|0)==4970){i=k;return y|0}else if((K|0)==4971){i=k;return y|0}else if((K|0)==4972){i=k;return y|0}}}while(0);a[47736]=1;y=-1;i=k;return y|0}function eD(b){b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;c=i;i=i+8|0;d=c|0;if((b|0)==0){e=0;i=c;return e|0}do{if((a[b]|0)==34){f=b+1|0;if((f|0)==0){g=0}else{g=bP(f|0)|0}a[g+(bk(g|0,132696)|0)|0]=0;h=g}else{f=a[47120]|0;if(f<<24>>24==0){j=bP(b|0)|0;a[j+(bk(j|0,84256)|0)|0]=0;h=j;break}else{j=d|0;a[j]=f;a[d+1|0]=34;a[d+2|0]=0;f=bP(b|0)|0;a[f+(bk(f|0,j|0)|0)|0]=0;h=f;break}}}while(0);ua(h);e=h;i=c;return e|0}function eE(b){b=b|0;var d=0,e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0.0;d=i;i=i+8|0;e=d|0;f=e;if((cd(f|0,4,1,b|0)|0)!=1){if((cj(b|0)|0)==0){uf(-1,c[6942]|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0.0}else{uf(-1,74632,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0.0}}b=c[12208]|0;h=a[47816+(b>>>0<3?b:3)|0]|0;if((h-2|0)>>>0<2){b=0;j=3;do{k=f+b|0;l=a[k]|0;m=f+j|0;a[k]=a[m]|0;a[m]=l;b=b+1|0;j=j-1|0;}while((b|0)<(j|0))}if((h-1|0)>>>0>=2){n=+g[e>>2];i=d;return+n}h=f+2|0;j=a[h]|0;b=f+3|0;a[h]=a[b]|0;a[b]=j;j=a[f]|0;b=f+1|0;a[f]=a[b]|0;a[b]=j;n=+g[e>>2];i=d;return+n}function eF(b){b=b|0;var d=0,e=0,f=0,g=0,j=0.0,k=0;d=i;e=b+8|0;f=c[e>>2]|0;g=f-1|0;if((f|0)==0){f=c[6354]|0;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=+(c[11942]|0);k=f+1|0;c[6354]=k;c[14296+(k*24&-1)>>2]=2;h[14304+(k*24&-1)>>3]=j;h[14312+(k*24&-1)>>3]=0.0;i=d;return}do{if((g|0)<(c[11874]|0)){k=c[11952]|0;if((c[k+(g*24&-1)+8>>2]|0)!=1){break}f=c[6354]|0;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=+h[k+(g*24&-1)>>3];k=f+1|0;c[6354]=k;c[14296+(k*24&-1)>>2]=2;h[14304+(k*24&-1)>>3]=j;h[14312+(k*24&-1)>>3]=0.0;i=d;return}}while(0);a[1960]=1;g=c[6354]|0;if((g|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=g+1|0;c[6354]=k;g=14296+(k*24&-1)|0;k=b;c[g>>2]=c[k>>2];c[g+4>>2]=c[k+4>>2];c[g+8>>2]=c[k+8>>2];c[g+12>>2]=c[k+12>>2];c[g+16>>2]=c[k+16>>2];c[g+20>>2]=c[k+20>>2];if((c[b>>2]|0)!=3){i=d;return}b=c[e>>2]|0;if((b|0)==0){i=d;return}e=bP(b|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=e;i=d;return}function eG(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0,m=0.0,n=0.0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;k=+h[f>>3];l=c[f>>2]|0;h[d>>3]=k;m=+h[14312+(e*24&-1)>>3];e=l;l=e;if((a[43504]&1)==0){uf((c[13898]|0)-1|0,74216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((g|0)==1){n=+(e|0);o=5045}else if((g|0)==2){n=k;o=5045}else if((g|0)==3){e=d;f=c[11874]|0;L6842:do{if((f|0)>0){p=0;q=f;while(1){r=c[(c[11952]|0)+(p*24&-1)+16>>2]|0;if((r|0)==0){s=q}else{if(ui(l,r+((a[r]|0)==34&1)|0)|0){break}s=c[11874]|0}r=p+1|0;if((r|0)<(s|0)){p=r;q=s}else{t=-9;break L6842}}q=p+1|0;if((c[11902]|0)!=0){t=q;break}r=c[(c[11952]|0)+(p*24&-1)+16>>2]|0;if((r|0)==0){u=0}else{u=bP(r|0)|0}c[11902]=u;t=q}else{t=-9}}while(0);uu(c[e>>2]|0);w=t;x=1}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((o|0)==5045){w=~~n;x=g}if((w|0)==(-2|0)){c[d>>2]=c[11946];g=c[6354]|0;if((g|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=g+1|0;c[6354]=o;g=14296+(o*24&-1)|0;c[g>>2]=1;c[g+4>>2]=j;h[14304+(o*24&-1)>>3]=+h[d>>3];h[14312+(o*24&-1)>>3]=m;i=b;return}else if((w|0)==(-1|0)){c[d>>2]=c[8800];o=c[6354]|0;if((o|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=o+1|0;c[6354]=g;o=14296+(g*24&-1)|0;c[o>>2]=1;c[o+4>>2]=j;h[14304+(g*24&-1)>>3]=+h[d>>3];h[14312+(g*24&-1)>>3]=m;i=b;return}else if((w|0)==0){n=+(c[11942]|0);h[d>>3]=n;g=c[6354]|0;if((g|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=g+1|0;c[6354]=o;g=14296+(o*24&-1)|0;c[g>>2]=2;c[g+4>>2]=j;h[14304+(o*24&-1)>>3]=n;h[14312+(o*24&-1)>>3]=0.0;i=b;return}else{do{if(!((w|0)<1|(w|0)>(c[11874]|0))){o=w-1|0;g=c[11952]|0;if((c[g+(o*24&-1)+8>>2]|0)!=1){break}n=+h[g+(o*24&-1)>>3];h[d>>3]=n;o=c[6354]|0;if((o|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=o+1|0;c[6354]=g;o=14296+(g*24&-1)|0;c[o>>2]=2;c[o+4>>2]=j;h[14304+(g*24&-1)>>3]=n;h[14312+(g*24&-1)>>3]=0.0;i=b;return}}while(0);a[1960]=1;w=c[6354]|0;if((w|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=w+1|0;c[6354]=g;w=14296+(g*24&-1)|0;c[w>>2]=x;c[w+4>>2]=j;j=c[d>>2]|0;h[14304+(g*24&-1)>>3]=+h[d>>3];h[14312+(g*24&-1)>>3]=m;g=j;if((x|0)!=3|(g|0)==0){i=b;return}x=bP(g|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=x;i=b;return}}function eH(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0;b=i;i=i+104|0;d=b|0;e=b+8|0;f=b+40|0;g=b+72|0;j=c[6354]|0;if((j|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=j-1;k=14296+(j*24&-1)|0;l=c[k>>2]|0;m=c[k+4>>2]|0;k=14304+(j*24&-1)|0;n=+h[k>>3];o=c[k>>2]|0;h[d>>3]=n;p=+h[14312+(j*24&-1)>>3];j=o;o=j;if((a[43504]&1)==0){q=c[13898]|0;r=q-1|0;uf(r,73448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[47584]&1)!=0){q=c[13898]|0;r=q-1|0;uf(r,73448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((l|0)==3){r=d;q=c[11874]|0;L6902:do{if((q|0)>0){k=0;s=q;while(1){t=c[(c[11952]|0)+(k*24&-1)+16>>2]|0;if((t|0)==0){u=s}else{if(ui(o,t+((a[t]|0)==34&1)|0)|0){break}u=c[11874]|0}t=k+1|0;if((t|0)<(u|0)){k=t;s=u}else{w=5088;break L6902}}s=k+1|0;if((c[11902]|0)==0){t=c[(c[11952]|0)+(k*24&-1)+16>>2]|0;if((t|0)==0){x=0}else{x=bP(t|0)|0}c[11902]=x}if((s|0)==-9){w=5088}else{y=s}}else{w=5088}}while(0);do{if((w|0)==5088){if((a[47040]&1)==0){y=-9;break}a[47040]=0;uh(-1,72840,(v=i,i=i+8|0,c[v>>2]=c[r>>2],v)|0);x=c[11874]|0;if((x|0)>0){z=0;A=x}else{y=-9;break}while(1){x=c[(c[11952]|0)+(z*24&-1)+16>>2]|0;do{if((x|0)==0){B=A}else{u=x+((a[x]|0)==34&1)|0;if((a_(o|0,u|0,uA(o|0)|0)|0)!=0){B=A;break}uh(-1,225080,(v=i,i=i+16|0,c[v>>2]=z+1,c[v+8>>2]=x,v)|0);B=c[11874]|0}}while(0);x=z+1|0;if((x|0)<(B|0)){z=x;A=B}else{y=-9;break}}}}while(0);uu(c[r>>2]|0);C=y;D=1}else if((l|0)==1){E=+(j|0);w=5097}else if((l|0)==2){E=n;w=5097}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((w|0)==5097){C=~~E;D=l}if((C|0)==(-2|0)){l=e|0;e=c[11946]|0;be(l|0,21e4,(v=i,i=i+8|0,c[v>>2]=e,v)|0);c[d>>2]=l;l=c[6354]|0;if((l|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=l+1|0;c[6354]=e;l=14296+(e*24&-1)|0;c[l>>2]=3;c[l+4>>2]=m;l=c[d>>2]|0;h[14304+(e*24&-1)>>3]=+h[d>>3];h[14312+(e*24&-1)>>3]=p;e=l;if((e|0)==0){i=b;return}l=bP(e|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=l;i=b;return}else if((C|0)==(-1|0)){l=f|0;be(l|0,21e4,(v=i,i=i+8|0,c[v>>2]=c[8800],v)|0);c[d>>2]=l;l=c[6354]|0;if((l|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=l+1|0;c[6354]=f;l=14296+(f*24&-1)|0;c[l>>2]=3;c[l+4>>2]=m;l=c[d>>2]|0;h[14304+(f*24&-1)>>3]=+h[d>>3];h[14312+(f*24&-1)>>3]=p;f=l;if((f|0)==0){i=b;return}l=bP(f|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=l;i=b;return}else if((C|0)==0){l=g|0;be(l|0,21e4,(v=i,i=i+8|0,c[v>>2]=c[11942],v)|0);c[d>>2]=l;l=c[6354]|0;if((l|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=l+1|0;c[6354]=g;l=14296+(g*24&-1)|0;c[l>>2]=3;c[l+4>>2]=m;l=c[d>>2]|0;h[14304+(g*24&-1)>>3]=+h[d>>3];h[14312+(g*24&-1)>>3]=p;g=l;if((g|0)==0){i=b;return}l=bP(g|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=l;i=b;return}else{if((C|0)<1|(C|0)>(c[11874]|0)){a[1960]=1;l=c[6354]|0;if((l|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=l+1|0;c[6354]=g;l=14296+(g*24&-1)|0;c[l>>2]=D;c[l+4>>2]=m;l=c[d>>2]|0;h[14304+(g*24&-1)>>3]=+h[d>>3];h[14312+(g*24&-1)>>3]=p;g=l;if((D|0)!=3|(g|0)==0){i=b;return}D=bP(g|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=D;i=b;return}else{D=eD(c[(c[11952]|0)+((C-1|0)*24&-1)+12>>2]|0)|0;c[d>>2]=D;C=c[6354]|0;if((C|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=C+1|0;c[6354]=g;C=14296+(g*24&-1)|0;c[C>>2]=3;c[C+4>>2]=m;m=c[d>>2]|0;h[14304+(g*24&-1)>>3]=+h[d>>3];h[14312+(g*24&-1)>>3]=p;g=m;if((g|0)!=0){m=bP(g|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=m}uu(D);i=b;return}}}function eI(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0;b=i;i=i+8|0;d=b|0;if((a[43504]&1)==0){uf((c[13898]|0)-1|0,223600,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=14296+(e*24&-1)|0;j=c[g>>2]|0;k=c[g+4>>2]|0;g=14304+(e*24&-1)|0;l=+h[g>>3];m=c[g>>2]|0;h[d>>3]=l;n=+h[14312+(e*24&-1)>>3];e=m;if((j|0)==2){o=l;p=f}else if((j|0)==1){o=+(e|0);p=f}else if((j|0)==3){l=+uz(e,0);o=l;p=c[6354]|0}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13488]=~~o;c[d>>2]=222976;if((p|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=p+1|0;c[6354]=e;p=14296+(e*24&-1)|0;c[p>>2]=3;c[p+4>>2]=k;k=c[d>>2]|0;h[14304+(e*24&-1)>>3]=+h[d>>3];h[14312+(e*24&-1)>>3]=n;e=k;if((e|0)==0){i=b;return}k=bP(e|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=k;i=b;return}function eJ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0.0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,w=0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=14296+(d*24&-1)|0;g=f|0;j=c[g>>2]|0;k=f+4|0;f=c[k>>2]|0;l=14304+(d*24&-1)|0;m=+h[l>>3];n=c[l>>2]|0;h[b>>3]=m;o=14312+(d*24&-1)|0;p=+h[o>>3];q=n;do{if((j|0)==2){r=+P(+m);s=+P(+p);if(p==0.0){t=r;break}if(r>s){u=s/r;t=r*+Q(+(u*u+1.0));break}else{u=r/s;t=s*+Q(+(u*u+1.0));break}}else if((j|0)==1){t=+(((q|0)>-1?q:-q|0)|0)}else{uf(-1,211136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);q=~~t;j=q-1|0;if((q|0)>0&(j|0)<(c[11874]|0)){w=(c[(c[11952]|0)+(j*24&-1)+8>>2]|0)==1&1}else{w=0}c[b>>2]=w;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[6354]=d;c[g>>2]=1;c[k>>2]=f;h[l>>3]=+h[b>>3];h[o>>3]=p;i=a;return}}function eK(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0,u=0,w=0,x=0;b=i;i=i+56|0;d=b|0;e=b+48|0;h[e>>3]=0.0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=14296+(f*24&-1)|0;k=c[j>>2]|0;l=c[j+4>>2]|0;j=14304+(f*24&-1)|0;m=+h[j>>3];n=+h[14312+(f*24&-1)>>3];f=c[j>>2]|0;j=f;do{if((k|0)==1){o=+(((f|0)>-1?f:-f|0)|0)}else if((k|0)==2){p=+P(+m);q=+P(+n);if(n==0.0){o=p;break}if(p>q){r=q/p;o=p*+Q(+(r*r+1.0));break}else{r=p/q;o=q*+Q(+(r*r+1.0));break}}else{uf(-1,211136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);s=~~o;if((a[43504]&1)==0){uf((c[13898]|0)-1|0,222536,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t=c[48840+(c[12902]<<2)>>2]|0;do{if((s|0)<1|(s|0)>(c[11874]|0)){u=g}else{w=c[(c[11952]|0)+((s-1|0)*24&-1)+12>>2]|0;if((w|0)==0){u=g;break}x=(t1(w,64813+(t*688&-1)|0,d,e)|0)==0;w=c[6354]|0;if(x){u=w;break}if((w|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=+h[e>>3];r=+t2(d)+o;x=w+1|0;c[6354]=x;w=14296+(x*24&-1)|0;c[w>>2]=2;c[w+4>>2]=l;h[14304+(x*24&-1)>>3]=r;h[14312+(x*24&-1)>>3]=0.0;i=b;return}}while(0);a[1960]=1;if((u|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=u+1|0;c[6354]=d;u=14296+(d*24&-1)|0;c[u>>2]=k;c[u+4>>2]=l;h[14304+(d*24&-1)>>3]=m;h[14312+(d*24&-1)>>3]=n;if((k|0)!=3|(f|0)==0){i=b;return}f=bP(j|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=f;i=b;return}function eL(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0;d=i;e=c[11902]|0;if((e|0)==0){i=d;return}if((c[b+12>>2]|0)==392&(c[9670]|0)==2){dp(2,e,+(c[b+280>>2]|0)+ +h[(c[b+276>>2]|0)+16>>3],-1);uu(c[11902]|0);c[11902]=0;i=d;return}f=b+16|0;g=c[f>>2]|0;do{if((g|0)!=0){if((a[b+21|0]&1)!=0){break}j=aQ(g|0,222976)|0;if((j|0)==0){i=d;return}k=uA(g|0)|0;l=(uA(e|0)|0)+k|0;k=ut(l)|0;do{if((k|0)==0){gk();m=ut(l)|0;if((m|0)!=0){n=m;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=221744,v)|0)}else{n=k}}while(0);a[j]=0;k=c[f>>2]|0;l=c[11902]|0;m=j+12|0;be(n|0,172512,(v=i,i=i+24|0,c[v>>2]=k,c[v+8>>2]=l,c[v+16>>2]=m,v)|0);uu(c[11902]|0);c[11902]=n}}while(0);if((a[b+22|0]&1)!=0){i=d;return}n=c[f>>2]|0;if((n|0)!=0){uu(n)}a[b+20|0]=a[36231]&1^1;c[f>>2]=c[11902];c[11902]=0;i=d;return}function eM(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,u=0.0;d=i;i=i+48|0;e=d|0;f=d+24|0;g=c[13898]|0;j=g+1|0;c[13898]=j;k=(c[8272]|0)>(j|0);L7071:do{if(k){l=c[1054]|0;if((a[l+(j*40&-1)|0]&1)!=0){m=c[l+(j*40&-1)+36>>2]|0;n=l+(j*40&-1)+32|0;l=c[10036]|0;o=0;while(1){if((o|0)>=(m|0)){p=5212;break}if((a[l+((c[n>>2]|0)+o|0)|0]|0)==(a[o+199040|0]|0)){o=o+1|0}else{break}}do{if((p|0)==5212){if((o|0)!=1){break}c[13898]=g+2;n=is(f)|0;l=c[n>>2]|0;if((l|0)==2){q=+h[n+8>>3]}else if((l|0)==3){q=+uz(c[n+8>>2]|0,0)}else if((l|0)==1){q=+(c[n+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}n=f|0;if((c[n>>2]|0)==3){uu(c[f+8>>2]|0);c[n>>2]=1}n=~~q;c[13488]=n;c[13898]=(c[13898]|0)+1;r=n;break L7071}}while(0);if(!k){p=5236;break}}o=c[1054]|0;n=(a[o+(j*40&-1)|0]&1)==0;do{if(!n){l=c[o+(j*40&-1)+36>>2]|0;m=o+(j*40&-1)+32|0;s=c[10036]|0;t=0;while(1){if((t|0)>=(l|0)){p=5226;break}if((a[s+((c[m>>2]|0)+t|0)|0]|0)==(a[t+103664|0]|0)){t=t+1|0}else{p=5227;break}}if((p|0)==5226){if((t|0)==1|n^1){p=5236;break L7071}else{break}}else if((p|0)==5227){if(n){break}else{p=5236;break L7071}}}}while(0);n=is(e)|0;o=c[n>>2]|0;if((o|0)==1){u=+(c[n+8>>2]|0)}else if((o|0)==2){u=+h[n+8>>3]}else if((o|0)==3){u=+uz(c[n+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}n=e|0;if((c[n>>2]|0)==3){uu(c[e+8>>2]|0);c[n>>2]=1}n=~~u;c[13488]=n;r=n}else{p=5236}}while(0);do{if((p|0)==5236){if((c[11870]|0)==1){e=c[262]|0;c[13488]=e;r=e;break}if((c[b+8>>2]|0)==3){e=c[268]|0;c[13488]=e;r=e;break}else{e=c[265]|0;c[13488]=e;r=e;break}}}while(0);if((r|0)!=-99){i=d;return}c[b+16>>2]=bP(222976)|0;i=d;return}function eN(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0,w=0,x=0.0,y=0.0,z=0;d=i;aI(214576,68,1,b|0);e=c[11862]|0;f=(e|0)==0;g=f?1:e;e=f?48440:c[12168]|0;aI(213904,15,1,b|0);f=c[12202]|0;if((f|0)>-1){j=c[48696+(f<<3)>>2]|0;aK(j|0,b|0)}else{aI(135560,4,1,b|0)}cf(b|0,212192,(v=i,i=i+8|0,c[v>>2]=c[47744+(c[12206]<<2)>>2],v)|0);j=c[11962]|0;cf(b|0,211640,(v=i,i=i+8|0,c[v>>2]=(j|0)!=0?j:135560,v)|0);if((g|0)>0){k=0}else{i=d;return}do{cf(b|0,211256,(v=i,i=i+8|0,c[v>>2]=k,v)|0);aI(210760,16,1,b|0);j=c[e+(k*232&-1)>>2]|0;do{if((j|0)<0){aI(210016,3,1,b|0);l=1}else{cf(b|0,21e4,(v=i,i=i+8|0,c[v>>2]=j,v)|0);f=c[e+(k*232&-1)+4>>2]|0;if((f|0)<=0){l=1;break}cf(b|0,209320,(v=i,i=i+8|0,c[v>>2]=f,v)|0);f=c[e+(k*232&-1)+8>>2]|0;if((f|0)<=0){l=2;break}cf(b|0,209320,(v=i,i=i+8|0,c[v>>2]=f,v)|0);l=3}}while(0);j=e+(k*232&-1)+124|0;cf(b|0,209120,(v=i,i=i+8|0,c[v>>2]=(a[j]&1)!=0?136424:136208,v)|0);do{if((a[j]&1)!=0){aI(207296,17,1,b|0);if((c[e+(k*232&-1)+12>>2]|0)==-1){aI(206608,6,1,b|0);m=0}else{m=1}f=l>>>0>1;L7143:do{if(f){if((c[e+(k*232&-1)+16>>2]|0)==-1){n=m?179864:86120;cf(b|0,205848,(v=i,i=i+8|0,c[v>>2]=n,v)|0);o=0}else{o=m}do{if((l|0)==3){if((c[e+(k*232&-1)+20>>2]|0)!=-1){p=1;break}n=o?179864:86120;cf(b|0,204712,(v=i,i=i+8|0,c[v>>2]=n,v)|0);q=1;r=5268;break L7143}else{p=0}}while(0);if(o){s=p;r=5267}else{q=p;r=5268}}else{if(m){s=0;r=5267;break}t=+h[e+(k*232&-1)+24>>3];cf(b|0,204152,(v=i,i=i+8|0,h[v>>3]=t,v)|0);u=0}}while(0);if((r|0)==5267){r=0;aI(204448,11,1,b|0);q=s;r=5268}do{if((r|0)==5268){r=0;t=+h[e+(k*232&-1)+24>>3];cf(b|0,204152,(v=i,i=i+8|0,h[v>>3]=t,v)|0);if(f){t=+h[e+(k*232&-1)+32>>3];cf(b|0,203944,(v=i,i=i+8|0,h[v>>3]=t,v)|0);if(!q){u=0;break}}else{if(!q){u=0;break}}t=+h[e+(k*232&-1)+40>>3];cf(b|0,203696,(v=i,i=i+8|0,h[v>>3]=t,v)|0);u=1}}while(0);n=e+(k*232&-1)+48|0;w=c[n>>2]|0;if((w|0)==1){aI(203456,13,1,b|0)}else if((w|0)==2){aI(203128,13,1,b|0)}if(((c[n>>2]|0)-1|0)>>>0<2){t=+h[e+(k*232&-1)+56>>3];x=+h[e+(k*232&-1)+64>>3];y=+h[e+(k*232&-1)+72>>3];cf(b|0,202912,(v=i,i=i+24|0,h[v>>3]=t,h[v+8>>3]=x,h[v+16>>3]=y,v)|0)}y=+h[e+(k*232&-1)+80>>3];cf(b|0,202576,(v=i,i=i+8|0,h[v>>3]=y,v)|0);y=+h[e+(k*232&-1)+88>>3];x=+h[e+(k*232&-1)+96>>3];t=+h[e+(k*232&-1)+104>>3];cf(b|0,201912,(v=i,i=i+24|0,h[v>>3]=y,h[v+8>>3]=x,h[v+16>>3]=t,v)|0);n=e+(k*232&-1)+112|0;w=0;while(1){if(w>>>0>=12){break}if((a_(n|0,48188+(w<<4)|0,12)|0)==0){r=5280;break}else{w=w+1|0}}if((r|0)==5280){r=0;aI(201312,12,1,b|0);n=(c[e+(k*232&-1)+8>>2]|0)!=0?132824:200424;z=c[48184+(w<<4)>>2]|0;cf(b|0,n|0,(v=i,i=i+8|0,c[v>>2]=z,v)|0)}cf(b|0,199512,(v=i,i=i+8|0,c[v>>2]=c[e+(k*232&-1)+128>>2],v)|0);if(f){z=c[e+(k*232&-1)+132>>2]|0;cf(b|0,199136,(v=i,i=i+8|0,c[v>>2]=z,v)|0)}if(!u){break}cf(b|0,198848,(v=i,i=i+8|0,c[v>>2]=c[e+(k*232&-1)+136>>2],v)|0)}}while(0);aF(10,b|0);k=k+1|0;}while((k|0)<(g|0));i=d;return}function eO(a){a=a|0;var d=0,f=0,g=0,h=0,j=0;d=i;aI(198008,82,1,a|0);f=0;do{aI(197576,3,1,a|0);g=48028+(f<<4)|0;if((b[g>>1]|0)!=0){h=48024+(f<<4)|0;j=0;do{cf(a|0,103640,(v=i,i=i+8|0,c[v>>2]=c[(c[h>>2]|0)+(j<<2)>>2],v)|0);j=j+1|0;}while((j|0)<(e[g>>1]|0|0))}cf(a|0,196376,(v=i,i=i+8|0,c[v>>2]=e[48036+(f<<4)>>1]|0,v)|0);f=f+1|0;}while(f>>>0<10);aI(195800,95,1,a|0);f=0;do{aI(197576,3,1,a|0);g=47868+(f<<4)|0;if((b[g>>1]|0)!=0){j=47864+(f<<4)|0;h=0;do{cf(a|0,103640,(v=i,i=i+8|0,c[v>>2]=c[(c[j>>2]|0)+(h<<2)>>2],v)|0);h=h+1|0;}while((h|0)<(e[g>>1]|0|0))}cf(a|0,194088,(v=i,i=i+8|0,c[v>>2]=e[47876+(f<<4)>>1]|0,v)|0);if((c[47872+(f<<4)>>2]|0)==12){aI(193568,40,1,a|0)}aF(10,a|0);f=f+1|0;}while(f>>>0<10);i=d;return}function eP(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;b=i;d=(c[13898]|0)+1|0;c[13898]=d;if((d|0)>=(c[8272]|0)){uf(d,217808,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=c[1054]|0;L7206:do{if((a[e+(d*40&-1)|0]&1)!=0){f=c[e+(d*40&-1)+36>>2]|0;g=e+(d*40&-1)+32|0;h=c[10036]|0;j=0;while(1){if((j|0)>=(f|0)){break}if((a[h+((c[g>>2]|0)+j|0)|0]|0)==(a[j+103664|0]|0)){j=j+1|0}else{break L7206}}if((j|0)!=1){break}uf(d,217808,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);d=c[12172]|0;e=c[11864]|0;if((e|0)>0){g=0;h=e;while(1){e=d+(g*232&-1)+224|0;f=c[e>>2]|0;if((f|0)==0){k=h}else{uu(f);c[e>>2]=0;k=c[11864]|0}e=g+1|0;if((e|0)<(k|0)){g=e;h=k}else{break}}}c[11864]=0;if((c[12168]|0)==0){c[12204]=c[12200];c[12208]=0;k=c[12172]|0;do{if((c[11880]|0)<1){h=db(k,232,216568)|0;g=h;c[12172]=g;if((h|0)==0){c[11880]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[11880]=1;l=c[11864]|0;m=g;break}}else{l=0;m=k}}while(0);uD(m+(l*232&-1)|0,48440,232);c[11864]=(c[11864]|0)+1}else{c[12204]=c[12202];c[12208]=c[12206];l=c[11862]|0;do{if((l|0)>(c[11880]|0)){m=db(c[12172]|0,l*232&-1,216568)|0;c[12172]=m;if((m|0)==0){c[11880]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[11880]=l;break}}}while(0);m=c[12172]|0;k=c[11864]|0;if((l|0)>0){g=0;h=k;while(1){uD(m+(h*232&-1)|0,48440,232);d=(c[11864]|0)+1|0;c[11864]=d;e=g+1|0;if((e|0)<(l|0)){g=e;h=d}else{n=d;break}}}else{n=k}uD(m|0,c[12168]|0,n*232&-1)}c[11856]=0;eB(0,1);c[12202]=c[12204];c[12206]=c[12208];n=c[12168]|0;m=c[11862]|0;if((m|0)>0){k=0;h=m;while(1){m=n+(k*232&-1)+224|0;g=c[m>>2]|0;if((g|0)==0){o=h}else{uu(g);c[m>>2]=0;o=c[11862]|0}m=k+1|0;if((m|0)<(o|0)){k=m;h=o}else{break}}}c[11862]=0;o=c[11864]|0;do{if((o|0)>(c[11878]|0)){h=db(c[12168]|0,o*232&-1,216568)|0;c[12168]=h;if((h|0)==0){c[11878]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[11878]=o;break}}}while(0);h=c[12168]|0;k=c[11862]|0;if((o|0)>0){p=0;q=k}else{r=k;s=h;t=c[12172]|0;u=t;w=r*232&-1;uD(s|0,u|0,w);i=b;return}while(1){uD(h+(q*232&-1)|0,48440,232);k=(c[11862]|0)+1|0;c[11862]=k;n=p+1|0;if((n|0)<(o|0)){p=n;q=k}else{r=k;break}}s=h;t=c[12172]|0;u=t;w=r*232&-1;uD(s|0,u|0,w);i=b;return}function eQ(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;e=c[11876]|0;if((e|0)>=(a|0)){i=d;return}if((e|0)>0){f=c[(c[11950]|0)+((e-1|0)*12&-1)+4>>2]|0}else{f=8}e=48036+(f<<4)|0;g=a;while(1){h=g+1|0;if((h|0)<=0){j=5346;break}k=c[11950]|0;if((c[11884]|0)<(h|0)){l=db(k,h*12&-1,215112)|0;c[11950]=l;c[11884]=h;m=l}else{m=k}c[m+(g*12&-1)>>2]=0;if((g|0)<=0){j=5350;break}k=c[11950]|0;if((c[11884]|0)<(g|0)){l=db(k,g*12&-1,215112)|0;c[11950]=l;c[11884]=g;n=l}else{n=k}k=g-1|0;c[n+(k*12&-1)+4>>2]=f;b[(c[11950]|0)+(k*12&-1)+8>>1]=b[e>>1]|0;if((k|0)>(c[11876]|0)){g=k}else{j=5354;break}}if((j|0)==5354){c[11876]=a;i=d;return}else if((j|0)==5350){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=215616,v)|0)}else if((j|0)==5346){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=215616,v)|0)}}function eR(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+8|0;e=d|0;do{if(a[47440]|0){f=b}else{if((a[30664]&1)!=0){f=b;break}if((cp(c[12892]|0,b|0,1)|0)==0){g=0;i=d;return g|0}if((cj(c[12892]|0)|0)==0){uf(-1,c[6942]|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}a[47736]=1;g=-1;i=d;return g|0}}while(0);while(1){if((f|0)==0){g=0;h=5372;break}if((cd(e|0,1,1,c[12892]|0)|0)==1){f=f-1|0}else{break}}if((h|0)==5372){i=d;return g|0}if((cj(c[12892]|0)|0)==0){uf(-1,c[6942]|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}a[47736]=1;g=-1;i=d;return g|0}function eS(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0,Y=0.0;b=i;i=i+80|0;d=b|0;e=b+24|0;f=b+48|0;g=b+72|0;j=g|0;k=i;i=i+4|0;i=i+7>>3<<3;l=c[13898]|0;if((c[8272]|0)<=(l|0)){m=c[10880]|0;uf(l,m,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}n=c[1054]|0;if((a[n+(l*40&-1)|0]&1)==0){m=c[10880]|0;uf(l,m,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=c[n+(l*40&-1)+36>>2]|0;p=n+(l*40&-1)+32|0;q=c[10036]|0;r=0;while(1){if((r|0)>=(o|0)){break}if((a[q+((c[p>>2]|0)+r|0)|0]|0)==(a[r+115e3|0]|0)){r=r+1|0}else{s=5462;break}}if((s|0)==5462){m=c[10880]|0;uf(l,m,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((r|0)!=1){m=c[10880]|0;uf(l,m,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=c[12172]|0;r=c[11864]|0;if((r|0)>0){p=0;q=r;while(1){r=m+(p*232&-1)+224|0;o=c[r>>2]|0;if((o|0)==0){t=q}else{uu(o);c[r>>2]=0;t=c[11864]|0}r=p+1|0;if((r|0)<(t|0)){p=r;q=t}else{break}}u=c[13898]|0;w=c[1054]|0}else{u=l;w=n}c[11864]=0;n=e|0;l=e+8|0;t=g|0;q=g+1|0;p=d|0;m=d+8|0;r=f|0;o=f+8|0;x=0;y=u;u=w;L7326:while(1){w=y+1|0;c[13898]=w;L7328:do{if((a[u+(w*40&-1)|0]&1)==0){z=x+1|0;A=c[11864]|0;if((z|0)>(A|0)){B=A+1|0;if((B|0)>(c[11880]|0)){C=db(c[12172]|0,B*232&-1,216568)|0;c[12172]=C;if((C|0)==0){s=5391;break L7326}c[11880]=B;D=c[11864]|0}else{D=A}uD((c[12172]|0)+(D*232&-1)|0,48440,232);c[11864]=(c[11864]|0)+1}A=is(e)|0;B=c[A>>2]|0;if((B|0)==2){E=+h[A+8>>3]}else if((B|0)==1){E=+(c[A+8>>2]|0)}else if((B|0)==3){E=+uz(c[A+8>>2]|0,0)}else{s=5398;break L7326}if((c[n>>2]|0)==3){uu(c[l>>2]|0);c[n>>2]=1}c[(c[12172]|0)+(((c[11864]|0)-1|0)*232&-1)>>2]=~~E;A=c[13898]|0;B=c[8272]|0;if((A|0)>=(B|0)){F=z;G=A;H=B;break}C=c[1054]|0;L7346:do{if((a[C+(A*40&-1)|0]&1)==0){I=c[10036]|0;J=C+(A*40&-1)+32|0;K=C+(A*40&-1)+36|0}else{L=C+(A*40&-1)+36|0;M=c[L>>2]|0;N=C+(A*40&-1)+32|0;O=c[10036]|0;P=0;while(1){if((P|0)>=(M|0)){break}if((a[O+((c[N>>2]|0)+P|0)|0]|0)==(a[P+103664|0]|0)){P=P+1|0}else{I=O;J=N;K=L;break L7346}}if((P|0)==1){F=z;G=A;H=B;break L7328}else{I=O;J=N;K=L}}}while(0);c[k>>2]=0;C=c[K>>2]|0;uD(j|0,I+(c[J>>2]|0)|0,(C|0)<5?C:5);a[g+((C|0)>5?5:C)|0]=0;if((a[t]|0)!=120){F=z;G=A;H=B;break}ca(q|0,21e4,(v=i,i=i+8|0,c[v>>2]=k,v)|0);c[(c[12172]|0)+(((c[11864]|0)-1|0)*232&-1)+4>>2]=c[k>>2];C=(c[13898]|0)+1|0;c[13898]=C;F=z;G=C;H=c[8272]|0}else{C=c[8272]|0;if((C|0)<=(w|0)){F=x;G=w;H=C;break}M=c[u+(w*40&-1)+36>>2]|0;Q=u+(w*40&-1)+32|0;R=c[10036]|0;S=0;while(1){if((S|0)>=(M|0)){break}if((a[R+((c[Q>>2]|0)+S|0)|0]|0)==(a[S+199040|0]|0)){S=S+1|0}else{F=x;G=w;H=C;break L7328}}if((S|0)!=1){F=x;G=w;H=C;break}c[13898]=y+2;Q=x+1|0;R=c[11864]|0;if((Q|0)>(R|0)){M=R+1|0;if((M|0)>(c[11880]|0)){z=db(c[12172]|0,M*232&-1,216568)|0;c[12172]=z;if((z|0)==0){s=5418;break L7326}c[11880]=M;T=c[11864]|0}else{T=R}uD((c[12172]|0)+(T*232&-1)|0,48440,232);c[11864]=(c[11864]|0)+1}R=is(d)|0;M=c[R>>2]|0;if((M|0)==1){U=+(c[R+8>>2]|0)}else if((M|0)==2){U=+h[R+8>>3]}else if((M|0)==3){U=+uz(c[R+8>>2]|0,0)}else{s=5425;break L7326}if((c[p>>2]|0)==3){uu(c[m>>2]|0);c[p>>2]=1}c[(c[12172]|0)+(((c[11864]|0)-1|0)*232&-1)>>2]=~~U;R=c[13898]|0;M=c[8272]|0;L7377:do{if((M|0)>(R|0)){z=c[1054]|0;if((a[z+(R*40&-1)|0]&1)==0){V=R;W=M;break}B=c[z+(R*40&-1)+36>>2]|0;A=z+(R*40&-1)+32|0;z=c[10036]|0;X=0;while(1){if((X|0)>=(B|0)){break}if((a[z+((c[A>>2]|0)+X|0)|0]|0)==(a[X+148464|0]|0)){X=X+1|0}else{V=R;W=M;break L7377}}if((X|0)!=1){V=R;W=M;break}c[13898]=R+1;A=is(f)|0;z=c[A>>2]|0;if((z|0)==1){Y=+(c[A+8>>2]|0)}else if((z|0)==2){Y=+h[A+8>>3]}else if((z|0)==3){Y=+uz(c[A+8>>2]|0,0)}else{s=5438;break L7326}if((c[r>>2]|0)==3){uu(c[o>>2]|0);c[r>>2]=1}c[(c[12172]|0)+(((c[11864]|0)-1|0)*232&-1)+4>>2]=~~Y;V=c[13898]|0;W=c[8272]|0}else{V=R;W=M}}while(0);if((W|0)<=(V|0)){s=5459;break L7326}M=c[1054]|0;if((a[M+(V*40&-1)|0]&1)==0){s=5460;break L7326}R=c[M+(V*40&-1)+36>>2]|0;C=M+(V*40&-1)+32|0;M=c[10036]|0;S=0;while(1){if((S|0)>=(R|0)){break}if((a[M+((c[C>>2]|0)+S|0)|0]|0)==(a[S+131272|0]|0)){S=S+1|0}else{s=5457;break L7326}}if((S|0)!=1){s=5458;break L7326}C=V+1|0;c[13898]=C;F=Q;G=C;H=W}}while(0);if((H|0)<=(G|0)){s=5465;break}w=c[1054]|0;if((a[w+(G*40&-1)|0]&1)==0){s=5466;break}C=c[w+(G*40&-1)+36>>2]|0;M=w+(G*40&-1)+32|0;R=c[10036]|0;A=0;while(1){if((A|0)>=(C|0)){break}if((a[R+((c[M>>2]|0)+A|0)|0]|0)==(a[A+183584|0]|0)){A=A+1|0}else{s=5467;break L7326}}if((A|0)==1){x=F;y=G;u=w}else{s=5468;break}}if((s|0)==5391){c[11880]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((s|0)==5457){uf(V,148760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((s|0)==5458){uf(V,148760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((s|0)==5460){uf(V,148760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((s|0)==5438){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((s|0)==5459){uf(V,148760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((s|0)==5466){i=b;return}else if((s|0)==5467){i=b;return}else if((s|0)==5468){i=b;return}else if((s|0)==5418){c[11880]=0;uf(c[13898]|0,216112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((s|0)==5425){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((s|0)==5398){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((s|0)==5465){i=b;return}}function eT(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0.0,X=0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0;e=i;i=i+80|0;f=e|0;g=e+24|0;j=e+48|0;k=e+72|0;l=c[13898]|0;m=c[8272]|0;if((m|0)<=(l|0)){n=c[10880]|0;uf(l,n,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=c[1054]|0;if((a[o+(l*40&-1)|0]&1)==0){n=c[10880]|0;uf(l,n,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=c[o+(l*40&-1)+36>>2]|0;q=o+(l*40&-1)+32|0;r=c[10036]|0;s=0;while(1){if((s|0)>=(p|0)){break}if((a[r+((c[q>>2]|0)+s|0)|0]|0)==(a[s+115e3|0]|0)){s=s+1|0}else{t=5660;break}}if((t|0)==5660){n=c[10880]|0;uf(l,n,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((s|0)!=1){n=c[10880]|0;uf(l,n,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}n=l+1|0;c[13898]=n;if((n|0)>=(m|0)){i=e;return}l=f|0;s=f+8|0;q=j|0;p=k|0;u=(b|0)==4?1:2;w=j+16|0;x=j;y=j+8|0;j=g|0;z=g+8|0;A=0;B=n;n=o;o=m;m=r;L7441:while(1){r=(a[n+(B*40&-1)|0]&1)==0;L7443:do{if(!r){C=c[n+(B*40&-1)+36>>2]|0;D=n+(B*40&-1)+32|0;E=0;while(1){if((E|0)>=(C|0)){break}if((a[m+((c[D>>2]|0)+E|0)|0]|0)==(a[E+103664|0]|0)){E=E+1|0}else{break L7443}}if((E|0)==1){t=5677;break L7441}}}while(0);if((b|0)==4|(b|0)==5|(b|0)==7){if((o|0)<=(B|0)|r){F=B;t=5651;break}D=c[n+(B*40&-1)+36>>2]|0;C=n+(B*40&-1)+32|0;G=0;while(1){if((G|0)>=(D|0)){break}if((a[m+((c[C>>2]|0)+G|0)|0]|0)==(a[G+199040|0]|0)){G=G+1|0}else{F=B;t=5652;break L7441}}if((G|0)!=1){F=B;t=5654;break}C=B+1|0;c[13898]=C;if((C|0)<(o|0)){H=q;I=1;J=0;K=C;L=o;M=n}else{F=C;t=5653;break}L7467:while(1){C=I;N=K;while(1){D=(a[M+(N*40&-1)|0]&1)==0;L7471:do{if(!D){r=c[M+(N*40&-1)+36>>2]|0;O=M+(N*40&-1)+32|0;P=c[10036]|0;Q=0;while(1){if((Q|0)>=(r|0)){break}if((a[P+((c[O>>2]|0)+Q|0)|0]|0)==(a[Q+103664|0]|0)){Q=Q+1|0}else{break L7471}}if((Q|0)==1){F=N;t=5656;break L7441}}}while(0);if(C){break}if(D|(L|0)<=(N|0)){t=5648;break L7441}R=c[M+(N*40&-1)+36>>2]|0;S=M+(N*40&-1)+32|0;T=c[10036]|0;O=0;while(1){if((O|0)>=(R|0)){break}if((a[T+((c[S>>2]|0)+O|0)|0]|0)==(a[O+148464|0]|0)){O=O+1|0}else{U=0;break L7467}}if((O|0)!=1){U=0;break L7467}D=N+1|0;c[13898]=D;if((D|0)<(L|0)){C=1;N=D}else{F=D;t=5655;break L7441}}V=J+1|0;if((V|0)>=4){t=5507;break L7441}C=is(g)|0;E=c[C>>2]|0;if((E|0)==1){W=+(c[C+8>>2]|0)}else if((E|0)==3){W=+uz(c[C+8>>2]|0,0)}else if((E|0)==2){W=+h[C+8>>3]}else{t=5502;break L7441}if((c[j>>2]|0)==3){uu(c[z>>2]|0);c[j>>2]=1}h[H>>3]=W;C=c[13898]|0;E=c[8272]|0;if((C|0)>=(E|0)){F=C;t=5657;break L7441}H=H+8|0;I=0;J=V;K=C;L=E;M=c[1054]|0}while(1){if((U|0)>=(R|0)){break}if((a[T+((c[S>>2]|0)+U|0)|0]|0)==(a[U+131272|0]|0)){U=U+1|0}else{t=5649;break L7441}}if((U|0)!=1){t=5647;break}G=N+1|0;c[13898]=G;if((J|0)==0){F=G;t=5650;break}else{X=J}}else if((b|0)==3|(b|0)==2){X=1}else{G=is(f)|0;E=c[G>>2]|0;if((E|0)==2){Y=+h[G+8>>3]}else if((E|0)==3){Y=+uz(c[G+8>>2]|0,0)}else if((E|0)==1){Y=+(c[G+8>>2]|0)}else{t=5522;break}if((c[l>>2]|0)==3){uu(c[s>>2]|0);c[l>>2]=1}h[q>>3]=Y;X=1}if((A|0)>=(c[11864]|0)){t=5528;break}do{if((b|0)==7){if((X|0)!=3){t=5615;break L7441}Z=+h[q>>3];_=+h[y>>3];$=+h[w>>3];if(Z*Z+_*_+$*$<2.220446049250313e-14){t=5617;break L7441}G=(c[12172]|0)+(A*232&-1)+88|0;c[G>>2]=c[x>>2];c[G+4>>2]=c[x+4>>2];c[G+8>>2]=c[x+8>>2];c[G+12>>2]=c[x+12>>2];c[G+16>>2]=c[x+16>>2];c[G+20>>2]=c[x+20>>2]}else if((b|0)==2){aa=c[13898]|0;G=c[1054]|0;E=c[G+(aa*40&-1)+36>>2]|0;C=(E|0)>3?3:E;E=c[10036]|0;D=c[G+(aa*40&-1)+32>>2]|0;G=0;while(1){P=G+1|0;a[k+G|0]=a[E+D|0]|0;if((P|0)==(C|0)){break}else{D=D+1|0;G=P}}a[k+C|0]=0;G=uA(p|0)|0;if((G|0)!=(b4(p|0,154840)|0)){t=5542;break L7441}if((cy(p|0,154104)|0)!=0){G=c[12172]|0;if((c[G+(A*232&-1)>>2]|0)==0){t=5546;break L7441}c[G+(A*232&-1)+12>>2]=d}if((cy(p|0,153744)|0)!=0){G=c[12172]|0;if((c[G+(A*232&-1)+4>>2]|0)==0){t=5550;break L7441}c[G+(A*232&-1)+16>>2]=d}if((cy(p|0,153360)|0)!=0){G=c[12172]|0;if((c[G+(A*232&-1)+8>>2]|0)==0){t=5554;break L7441}c[G+(A*232&-1)+20>>2]=d}c[13898]=(c[13898]|0)+1}else if((b|0)==1){G=c[12172]|0;if((c[G+(A*232&-1)>>2]|0)==0){t=5538;break L7441}$=+h[q>>3];if($==0.0){c[G+(A*232&-1)+12+(d<<2)>>2]=0;break}if($!=1.0){t=5537;break L7441}c[G+(A*232&-1)+12+(d<<2)>>2]=1}else if((b|0)==0){$=+h[q>>3];h[(c[12172]|0)+(A*232&-1)+24+(d<<3)>>3]=$;if($<=0.0){t=5531;break L7441}}else if((b|0)==3){G=c[12172]|0;if((c[G+(A*232&-1)>>2]|0)==0){if((c[G+(A*232&-1)+140>>2]|0)==0){t=5659;break L7441}}if((c[G+(A*232&-1)+4>>2]|0)==0){if((c[G+(A*232&-1)+144>>2]|0)==0){t=5658;break L7441}}do{if((c[G+(A*232&-1)+8>>2]|0)==0){if((c[G+(A*232&-1)+148>>2]|0)!=0){t=5564;break}D=c[13898]|0;E=(c[8272]|0)>(D|0);P=c[1054]|0;r=P+(D*40&-1)|0;ab=P+(D*40&-1)+36|0;ac=P+(D*40&-1)+32|0;D=c[10036]|0;P=c[12094]|0;if(!E){t=5668;break L7441}do{if((a[r]&1)==0){t=5629}else{ad=c[ab>>2]|0;ae=0;while(1){if((ae|0)>=(ad|0)){t=5580;break}if((a[D+((c[ac>>2]|0)+ae|0)|0]|0)==(a[P+ae|0]|0)){ae=ae+1|0}else{break}}if((t|0)==5580){t=0;if((a[P+ae|0]|0)==0){af=0;break}}if(E){t=5629}else{t=5666;break L7441}}}while(0);L7551:do{if((t|0)==5629){t=0;P=c[12098]|0;L7553:do{if((a[r]&1)!=0){O=c[ab>>2]|0;ad=0;while(1){if((ad|0)>=(O|0)){break}if((a[D+((c[ac>>2]|0)+ad|0)|0]|0)==(a[P+ad|0]|0)){ad=ad+1|0}else{break L7553}}if((a[P+ad|0]|0)==0){af=1;break L7551}}}while(0);P=c[12102]|0;if(!E){t=5669;break L7441}if((a[r]&1)!=0){ae=c[ab>>2]|0;O=0;while(1){if((O|0)>=(ae|0)){t=5639;break}if((a[D+((c[ac>>2]|0)+O|0)|0]|0)==(a[P+O|0]|0)){O=O+1|0}else{break}}if((t|0)==5639){t=0;if((a[P+O|0]|0)==0){af=2;break}}if(!E){t=5667;break L7441}}ae=c[12106]|0;if((a[r]&1)==0){t=5670;break L7441}Q=c[ab>>2]|0;ag=0;while(1){if((ag|0)>=(Q|0)){break}if((a[D+((c[ac>>2]|0)+ag|0)|0]|0)==(a[ae+ag|0]|0)){ag=ag+1|0}else{t=5665;break L7441}}if((a[ae+ag|0]|0)==0){af=3}else{t=5664;break L7441}}}while(0);ac=G+(A*232&-1)+112|0;D=48380+(af<<4)|0;c[ac>>2]=c[D>>2];c[ac+4>>2]=c[D+4>>2];c[ac+8>>2]=c[D+8>>2]}else{t=5564}}while(0);if((t|0)==5564){t=0;C=c[13898]|0;D=(c[8272]|0)>(C|0);ac=c[1054]|0;ab=ac+(C*40&-1)|0;r=ac+(C*40&-1)+36|0;E=ac+(C*40&-1)+32|0;C=c[10036]|0;ac=0;L7579:while(1){Q=c[48184+(ac<<4)>>2]|0;L7581:do{if(D){if((a[ab]&1)==0){break}O=c[r>>2]|0;P=0;while(1){if((P|0)>=(O|0)){break}if((a[C+((c[E>>2]|0)+P|0)|0]|0)==(a[Q+P|0]|0)){P=P+1|0}else{break L7581}}if((a[Q+P|0]|0)==0){t=5571;break L7579}}}while(0);Q=ac+1|0;if(Q>>>0<12){ac=Q}else{ah=Q;break}}if((t|0)==5571){t=0;E=G+(A*232&-1)+112|0;C=48188+(ac<<4)|0;c[E>>2]=c[C>>2];c[E+4>>2]=c[C+4>>2];c[E+8>>2]=c[C+8>>2];ah=ac}if((ah|0)==12){t=5574;break L7441}}C=G+(A*232&-1)+152|0;c[C>>2]=c[12148];c[C+4>>2]=c[48596>>2];c[C+8>>2]=c[48600>>2];c[13898]=(c[13898]|0)+1}else if((b|0)==4|(b|0)==5){c[(c[12172]|0)+(A*232&-1)+48>>2]=u;if((d|0)==2){if((X|0)!=3){t=5592;break L7441}}else if((d|0)==0){if((X|0)!=3){t=5594;break L7441}}else if((d|0)==1){if((X|0)!=2){t=5589;break L7441}h[w>>3]=0.0}else{t=5595;break L7441}C=(c[12172]|0)+(A*232&-1)+56|0;c[C>>2]=c[x>>2];c[C+4>>2]=c[x+4>>2];c[C+8>>2]=c[x+8>>2];c[C+12>>2]=c[x+12>>2];c[C+16>>2]=c[x+16>>2];c[C+20>>2]=c[x+20>>2]}else if((b|0)==8){$=+h[q>>3];c[(c[12172]|0)+(A*232&-1)+128>>2]=~~$;C=c[(c[12172]|0)+(A*232&-1)+128>>2]|0;if(+(C|0)!=$|(C|0)<0){t=5586;break L7441}}else if((b|0)==6){C=c[13898]|0;E=c[1054]|0;r=a[E+(C*40&-1)|0]|0;L7602:do{if((c[8272]|0)>(C|0)){if((r&1)==0){t=5604;break}ab=c[E+(C*40&-1)+36>>2]|0;D=E+(C*40&-1)+32|0;Q=c[10036]|0;O=0;while(1){if((O|0)>=(ab|0)){break}if((a[Q+((c[D>>2]|0)+O|0)|0]|0)==(a[O+99680|0]|0)){O=O+1|0}else{t=5604;break L7602}}if((O|0)!=2){t=5604;break}h[q>>3]=+h[q>>3]*3.141592653589793;c[13898]=C+1}else{t=5604}}while(0);L7610:do{if((t|0)==5604){t=0;G=c[E+(C*40&-1)+36>>2]|0;if(!((r&1)!=0&(G|0)>0)){break}ac=c[10036]|0;D=0;Q=0;ab=c[E+(C*40&-1)+32>>2]|0;while(1){if((a[D+123032|0]|0)==(a[ac+(D+ab|0)|0]|0)){ai=ab;aj=Q}else{if((D|0)!=1){break L7610}ai=ab-1|0;aj=1}ag=D+1|0;if((ag|0)<(aj+G|0)){D=ag;Q=aj;ab=ai}else{break}}if((aj|0)==0){if(!((D|0)==0|(D|0)==7)){break}}h[q>>3]=+h[q>>3]*.017453292519943295;c[13898]=C+1}}while(0);h[(c[12172]|0)+(A*232&-1)+80>>3]=+h[q>>3]}else{t=5619;break L7441}}while(0);C=c[13898]|0;E=c[8272]|0;if((E|0)<=(C|0)){t=5674;break}r=c[1054]|0;if((a[r+(C*40&-1)|0]&1)==0){t=5675;break}ab=c[r+(C*40&-1)+36>>2]|0;Q=r+(C*40&-1)+32|0;G=c[10036]|0;ac=0;while(1){if((ac|0)>=(ab|0)){break}if((a[G+((c[Q>>2]|0)+ac|0)|0]|0)==(a[ac+183584|0]|0)){ac=ac+1|0}else{t=5676;break L7441}}if((ac|0)!=1){t=5671;break}Q=C+1|0;c[13898]=Q;if((Q|0)<(E|0)){A=A+1|0;B=Q;n=r;o=E;m=G}else{t=5672;break}}if((t|0)==5649){uf(N,148888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5650){uf(F,149968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5651){uf(F,149968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5652){uf(F,149968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5542){uf(aa,154448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5546){uf(aa,158792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5528){uf(c[13898]|0,158272,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5574){uf(c[13898]|0,152504,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5592){uf(c[13898]|0,151520,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5615){uf(c[13898]|0,150440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5531){uf((c[13898]|0)-2|0,156288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5554){uf(c[13898]|0,158792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5550){uf(c[13898]|0,158792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5647){uf(N,148888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5648){uf(N,148888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5594){uf(c[13898]|0,151168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5595){uf(c[13898]|0,150960,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5666){ak=c[13898]|0;uf(ak,152080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5667){ak=c[13898]|0;uf(ak,152080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5668){ak=c[13898]|0;uf(ak,152080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5669){ak=c[13898]|0;uf(ak,152080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5537){uf((c[13898]|0)-1|0,155200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5538){uf(c[13898]|0,158792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5589){uf(c[13898]|0,151648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5653){uf(F,149968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5654){uf(F,149968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5655){uf(F,149968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5656){uf(F,149968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5657){uf(F,149968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5617){uf(c[13898]|0,150304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5619){uf(-1,150112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5670){ak=c[13898]|0;uf(ak,152080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5671){i=e;return}else if((t|0)==5672){i=e;return}else if((t|0)==5674){i=e;return}else if((t|0)==5675){i=e;return}else if((t|0)==5676){i=e;return}else if((t|0)==5586){uf(c[13898]|0,151928,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5502){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5522){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5507){uf(N-1|0,149640,(v=i,i=i+8|0,c[v>>2]=V,v)|0)}else if((t|0)==5664){ak=c[13898]|0;uf(ak,152080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5665){ak=c[13898]|0;uf(ak,152080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5658){al=c[13898]|0;uf(al,152856,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5659){al=c[13898]|0;uf(al,152856,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==5677){i=e;return}}function eU(d){d=d|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;f=i;i=i+8|0;g=f|0;c[g>>2]=d;h=8;j=0;k=d;L7680:while(1){d=k;while(1){l=a[d]|0;if((l<<24>>24|0)==0|(l<<24>>24|0)==34|(l<<24>>24|0)==39){m=5681;break L7680}else if((l<<24>>24|0)==37){break}else if((l<<24>>24|0)!=32){m=5715;break L7680}l=d+1|0;c[g>>2]=l;d=l}l=d+1|0;c[g>>2]=l;n=a[l]|0;o=n<<24>>24==42;if(o){p=d+2|0;c[g>>2]=p;q=p;r=a[p]|0}else{q=l;r=n}if(((r<<24>>24)-48|0)>>>0<10){n=aE(q|0,g|0,10)|0;s=n;t=c[g>>2]|0}else{s=1;t=q}n=b[23918]|0;L7692:do{if(n<<16>>16==0){u=0;m=5710}else{l=c[11958]|0;p=0;while(1){w=b[l+(p<<4)+4>>1]|0;if(w<<16>>16==0){x=0}else{y=c[l+(p<<4)>>2]|0;z=0;while(1){A=c[y+(z<<2)>>2]|0;B=uA(A|0)|0;if((a_(t|0,A|0,B|0)|0)==0){A=t+B|0;if((aZ(163032,a[A]|0|0,5)|0)!=0){C=A;D=p;E=47832;F=l;break L7692}}A=z+1|0;if((A|0)<(w&65535|0)){z=A}else{x=A;break}}}z=p+1|0;if((z|0)<(n&65535|0)){p=z}else{u=x;m=5710;break}}}}while(0);L7704:do{if((m|0)==5710){m=0;n=b[23922]|0;if(n<<16>>16==0){G=0;H=u}else{d=c[11960]|0;p=0;while(1){l=b[d+(p<<4)+4>>1]|0;if(l<<16>>16==0){I=0}else{z=c[d+(p<<4)>>2]|0;w=0;while(1){y=c[z+(w<<2)>>2]|0;A=uA(y|0)|0;if((a_(t|0,y|0,A|0)|0)==0){y=t+A|0;if((aZ(163032,a[y]|0|0,5)|0)!=0){C=y;D=p;E=47840;F=d;break L7704}}y=w+1|0;if((y|0)<(l&65535|0)){w=y}else{I=y;break}}}w=p+1|0;if((w|0)<(n&65535|0)){p=w}else{G=w;H=I;break}}}if((G|0)!=(e[23922]|0|0)){h=h;j=j;k=t;continue L7680}if((H|0)==(e[(c[11960]|0)+(G-1<<4)+4>>1]|0|0)){m=5714;break L7680}else{h=h;j=j;k=t;continue L7680}}}while(0);c[g>>2]=C;if(o){p=c[11950]|0;if((p|0)==0){m=5706;break}n=aa(e[F+(D<<4)+12>>1]|0,s);d=p+(j*12&-1)|0;c[d>>2]=n+(c[d>>2]|0);h=h;j=j;k=C;continue}if((s|0)>0){J=j;K=0}else{h=h;j=j;k=C;continue}while(1){L=J+1|0;d=J+2|0;if((d|0)<=0){m=5697;break L7680}n=c[11950]|0;if((c[11884]|0)<(d|0)){p=db(n,d*12&-1,215112)|0;c[11950]=p;c[11884]=d;M=p}else{M=n}c[M+(L*12&-1)>>2]=0;n=c[(c[E>>2]|0)+(D<<4)+8>>2]|0;if((L|0)<=0){m=5701;break L7680}p=c[11950]|0;if((c[11884]|0)<(L|0)){d=db(p,L*12&-1,215112)|0;c[11950]=d;c[11884]=L;N=d}else{N=p}c[N+(J*12&-1)+4>>2]=n;b[(c[11950]|0)+(J*12&-1)+8>>1]=b[48036+(n<<4)>>1]|0;n=K+1|0;if((n|0)<(s|0)){J=L;K=n}else{break}}h=c[(c[E>>2]|0)+(D<<4)+8>>2]|0;j=L;k=C}if((m|0)==5706){uf(-1,162376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((m|0)==5714){uf(c[13898]|0,160672,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((m|0)==5715){uf(c[13898]|0,159280,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((m|0)==5701){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=215616,v)|0)}else if((m|0)==5697){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=215616,v)|0)}else if((m|0)==5681){if((j|0)>=(c[11876]|0)){O=j;c[11876]=O;i=f;return}C=48036+(h<<4)|0;k=j;while(1){j=k+1|0;if((j|0)<=0){m=5717;break}L=c[11950]|0;if((c[11884]|0)<(j|0)){D=db(L,j*12&-1,215112)|0;c[11950]=D;c[11884]=j;P=D}else{P=L}c[P+(k*12&-1)>>2]=0;if((k|0)<=0){m=5721;break}L=c[11950]|0;if((c[11884]|0)<(k|0)){D=db(L,k*12&-1,215112)|0;c[11950]=D;c[11884]=k;Q=D}else{Q=L}L=k-1|0;c[Q+(L*12&-1)>>2]=0;D=c[11950]|0;if((c[11884]|0)<(k|0)){E=db(D,k*12&-1,215112)|0;c[11950]=E;c[11884]=k;R=E}else{R=D}c[R+(L*12&-1)+4>>2]=h;b[(c[11950]|0)+(L*12&-1)+8>>1]=b[C>>1]|0;if((j|0)<(c[11876]|0)){k=j}else{O=j;m=5735;break}}if((m|0)==5717){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=215616,v)|0)}else if((m|0)==5721){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=215616,v)|0)}else if((m|0)==5735){c[11876]=O;i=f;return}}}function eV(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0,E=0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0,L=0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0,R=0.0,S=0.0;b=i;do{if(a[34104]|0){if((a[37400]&1)==0){break}d=c[m>>2]|0;aI(144664,24,1,d|0)}}while(0);d=c[11854]|0;if((d|0)==1){e=5741}else if((d|0)==0){if((a6(c[8802]|0,c[8716]|0,c[12892]|0)|0)==0){f=0;i=b;return f|0}if(a[34104]|0){c[9354]=(c[9354]|0)+1;g=0}else{g=0}while(1){j=c[8802]|0;k=(uA(j+g|0)|0)+g|0;if((k|0)>0){l=j+(k-1|0)|0;if((a[l]|0)==10){e=5792;break}}n=c[8716]|0;if((n-k|0)>>>0<32){o=n<<1;c[8716]=o;p=db(j,o,84816)|0;c[8802]=p;q=p;r=c[8716]|0}else{q=j;r=n}if((a6(q+k|0,r-k|0,c[12892]|0)|0)==0){e=5796;break}else{g=k}}if((e|0)==5792){a[l]=0;f=c[8802]|0;i=b;return f|0}else if((e|0)==5796){f=c[8802]|0;i=b;return f|0}}else{s=d}if((e|0)==5741){e=c[11852]|0;d=c[6352]|0;if((e|0)>=(d|0)){f=0;i=b;return f|0}if((e|0)==0){if((a[32936]&1)!=0){uf(-1,144512,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((a[30528]&1)!=0){uf(-1,144512,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if(+h[8256]==-8.988465674311579e+307){h[8256]=10.0}if(+h[8255]==8.988465674311579e+307){h[8255]=-10.0}l=c[200]|0;t=+h[64664+(l*688&-1)>>3];h[5960]=t;u=+h[64672+(l*688&-1)>>3];h[5961]=u;g=a[64788+(l*688&-1)|0]|0;do{if((g&1)==0){w=u;x=t}else{if(t>0.0&u>0.0){y=+_(+t);z=+h[64800+(l*688&-1)>>3];A=y/z;h[5960]=A;y=+_(+u)/z;h[5961]=y;w=y;x=A;break}else{uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56832+(l*24&-1),v)|0);return 0}}}while(0);u=(w-x)/+(d-1|0);h[5959]=u;B=x;C=u;D=l;E=g}else{g=c[200]|0;B=+h[5960];C=+h[5959];D=g;E=a[64788+(g*688&-1)|0]|0}u=B+ +(e|0)*C;if((E&1)==0){F=u}else{F=+Z(+(u*+h[64800+(D*688&-1)>>3]))}D=c[8802]|0;be(D|0,170912,(v=i,i=i+8|0,h[v>>3]=F,v)|0);c[11852]=(c[11852]|0)+1;s=c[11854]|0}if((s|0)==2){s=c[11852]|0;if((s|0)>=(c[11926]|0)&(s|0)>0){c[11852]=0;D=(c[11850]|0)+1|0;c[11850]=D;f=(D|0)<(c[11924]|0)?179864:0;i=b;return f|0}D=c[11850]|0;if((D|0)==0){if((c[6352]|0)<2|(c[6350]|0)<2|(c[9344]|0)<2|(c[9342]|0)<2){uf(-1,138240,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}dc(2,145296);dc(1,143440);F=+h[8255];E=a[66164]|0;do{if((E&1)==0){h[5957]=F;G=+h[8256];H=F}else{if(F<=0.0){uk(210984,(v=i,i=i+24|0,c[v>>2]=141960,c[v+8>>2]=56880,h[v+16>>3]=F,v)|0);return 0}u=+_(+F);C=+h[8272];B=u/C;h[5957]=B;u=+h[8256];if(u>0.0){G=+_(+u)/C;H=B;break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=141960,c[v+8>>2]=56880,h[v+16>>3]=u,v)|0);return 0}}}while(0);h[5958]=G;F=+h[8169];do{if((a[65476]&1)==0){h[5953]=F;I=+h[8170];J=F}else{if(F<=0.0){uk(210984,(v=i,i=i+24|0,c[v>>2]=140304,c[v+8>>2]=56856,h[v+16>>3]=F,v)|0);return 0}u=+_(+F);B=+h[8186];C=u/B;h[5953]=C;u=+h[8170];if(u>0.0){I=+_(+u)/B;J=C;break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=140304,c[v+8>>2]=56856,h[v+16>>3]=u,v)|0);return 0}}}while(0);h[5954]=I;e=(a[38984]&1)==0?c[6352]|0:c[9344]|0;F=(G-H)/+(e-1|0);h[5956]=F;c[11926]=e;e=c[9342]|0;G=(I-J)/+(e-1|0);h[5955]=G;c[11924]=e;K=c[11852]|0;L=c[11850]|0;M=H;N=F;O=I;P=G;Q=E}else{K=s;L=D;M=+h[5957];N=+h[5956];O=+h[5954];P=+h[5955];Q=a[66164]|0}G=M+N*+(K|0);N=O-P*+(L|0);L=c[8802]|0;if((Q&1)==0){R=G}else{R=+Z(+(G*+h[8272]))}if((a[65476]&1)==0){S=N}else{S=+Z(+(N*+h[8186]))}be(L|0,143424,(v=i,i=i+16|0,h[v>>3]=R,h[v+8>>3]=S,v)|0);c[11852]=(c[11852]|0)+1}f=c[8802]|0;i=b;return f|0}function eW(a){a=a|0;c[9340]=c[a>>2];return}function eX(b){b=b|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;e=i;i=i+16|0;f=e|0;g=e+8|0;uE(47056,0,28);c[11874]=0;if((a[b]|0)==0){j=0;i=e;return j|0}else{k=b;l=0}while(1){b=c[11882]|0;do{if((b|0)<=(l|0)){m=(b|0)<20?b+20|0:b<<1;n=db(c[11952]|0,m*24&-1,180032)|0;c[11952]=n;o=c[11882]|0;if((o|0)>=(m|0)){break}h[n+(o*24&-1)>>3]=0.0;c[n+(o*24&-1)+16>>2]=0;o=(c[11882]|0)+1|0;c[11882]=o;if((o|0)<(m|0)){p=o}else{break}do{o=c[11952]|0;h[o+(p*24&-1)>>3]=0.0;c[o+(p*24&-1)+16>>2]=0;p=(c[11882]|0)+1|0;c[11882]=p;}while((p|0)<(m|0))}}while(0);c[(c[11952]|0)+((c[11874]|0)*24&-1)+12>>2]=k;b=c[11874]|0;do{if((b|0)==((c[262]|0)-1|0)){c[11764]=k;if((c[263]|0)!=1){q=b;break}c[(c[11952]|0)+(b*24&-1)+8>>2]=1;q=c[11874]|0}else{q=b}}while(0);do{if((q|0)==((c[265]|0)-1|0)){c[11765]=k;if((c[266]|0)!=1){r=q;break}c[(c[11952]|0)+(q*24&-1)+8>>2]=1;r=c[11874]|0}else{r=q}}while(0);do{if((r|0)==((c[268]|0)-1|0)){c[11766]=k;if((c[269]|0)!=1){s=r;break}c[(c[11952]|0)+(r*24&-1)+8>>2]=1;s=c[11874]|0}else{s=r}}while(0);do{if((s|0)==((c[271]|0)-1|0)){c[11767]=k;if((c[272]|0)!=1){t=s;break}c[(c[11952]|0)+(s*24&-1)+8>>2]=1;t=c[11874]|0}else{t=s}}while(0);do{if((t|0)==((c[274]|0)-1|0)){c[11768]=k;if((c[275]|0)!=1){u=t;break}c[(c[11952]|0)+(t*24&-1)+8>>2]=1;u=c[11874]|0}else{u=t}}while(0);do{if((u|0)==((c[277]|0)-1|0)){c[11769]=k;if((c[278]|0)!=1){v=u;break}c[(c[11952]|0)+(u*24&-1)+8>>2]=1;v=c[11874]|0}else{v=u}}while(0);do{if((v|0)==((c[280]|0)-1|0)){c[11770]=k;if((c[281]|0)!=1){break}c[(c[11952]|0)+(v*24&-1)+8>>2]=1}}while(0);b=a[k]|0;if(b<<24>>24!=34|(a[47120]|0)==0){w=k;x=0;y=b}else{b=k+1|0;c[(c[11952]|0)+((c[11874]|0)*24&-1)+12>>2]=b;w=b;x=1;y=a[b]|0}L7903:do{if(y<<24>>24==34){c[(c[11952]|0)+((c[11874]|0)*24&-1)+8>>2]=-5;c[(c[11952]|0)+((c[11874]|0)*24&-1)+8>>2]=-8;c[11874]=(c[11874]|0)+1;if(x){z=w}else{A=w;B=5850}}else{b=c[8528]|0;do{if((b|0)!=0){m=uA(b|0)|0;if((a_(w|0,b|0,m|0)|0)!=0){break}o=w+m|0;if((aM(d[o]|0|0)|0)==0){if((a[o]|0)!=0){break}}c[(c[11952]|0)+((c[11874]|0)*24&-1)+8>>2]=-5;C=+uz(133568,0);o=c[11874]|0;h[(c[11952]|0)+(o*24&-1)>>3]=C;c[11874]=o+1;if(x){A=w;B=5850;break L7903}else{z=w;break L7903}}}while(0);b=(c[11874]|0)+1|0;o=c[11870]|0;L7912:do{if((o|0)==0|a[43464]^1){B=5835}else{do{if((o|0)>0){if((c[262]|0)==(b|0)){B=5835;break L7912}if((o|0)<=1){D=w;break}if((c[265]|0)==(b|0)){B=5835;break L7912}if((o|0)<=2){D=w;break}if((c[268]|0)==(b|0)){B=5835;break L7912}if((o|0)<=3){D=w;break}if((c[271]|0)==(b|0)){B=5835;break L7912}if((o|0)<=4){D=w;break}if((c[274]|0)==(b|0)|(o|0)>5){B=5835;break L7912}else{D=w}}else{D=w}}while(0);while(1){m=(aM(d[D]|0|0)|0)!=0;E=a[D]|0;F=a[47120]|0;G=E<<24>>24!=F<<24>>24;if(!(m&G)){break}D=D+1|0}m=E<<24>>24==0?0:G&1;if(F<<24>>24==0|x^1){H=D;I=x;J=E}else{n=D;while(1){K=n+1|0;L=a[K]|0;if((L<<24>>24|0)==0|(L<<24>>24|0)==34){H=K;I=0;J=L;break}else{n=K}}}n=H;K=J;while(1){if((aM(K&255|0)|0)!=0){M=n;N=I;O=m;P=0;break L7912}L=a[n]|0;Q=n+1|0;if(L<<24>>24==0|L<<24>>24==(a[47120]|0)){M=n;N=I;O=m;P=0;break L7912}n=Q;K=a[Q]|0}}}while(0);if((B|0)==5835){B=0;C=+uz(w,f);h[(c[11952]|0)+((c[11874]|0)*24&-1)>>3]=C;o=c[f>>2]|0;M=w;N=x;O=(o|0)!=(w|0)&1;P=o-w|0}do{if((a[47712]&1)!=0&(O|0)==1){o=M+P|0;b=a[o]|0;if(!((b<<24>>24|0)==100|(b<<24>>24|0)==68|(b<<24>>24|0)==113|(b<<24>>24|0)==81)){R=1;break}a[o]=101;C=+uz(M,g);h[(c[11952]|0)+((c[11874]|0)*24&-1)>>3]=C;K=(c[g>>2]|0)!=(M|0)&1;a[o]=b;R=K}else{R=O}}while(0);c[(c[11952]|0)+((c[11874]|0)*24&-1)+8>>2]=(R|0)==1&1;K=(cg(+(+h[(c[11952]|0)+((c[11874]|0)*24&-1)>>3]))|0)==0;b=c[11874]|0;if(K){c[(c[11952]|0)+(b*24&-1)+8>>2]=0;c[11874]=(c[11874]|0)+1;if(N){A=M;B=5850;break}else{z=M;break}}else{c[11874]=b+1;if(N){A=M;B=5850;break}else{z=M;break}}}}while(0);if((B|0)==5850){while(1){B=0;b=A+1|0;K=a[b]|0;if((K<<24>>24|0)==0|(K<<24>>24|0)==34){z=b;break}else{A=b;B=5850}}}b=a[47120]|0;L7951:do{if(b<<24>>24==0){K=z;while(1){if((aM(d[K]|0|0)|0)!=0){S=K;break}if((a[K]|0)==0){S=K;break}K=K+1|0}while(1){if((aM(d[S]|0|0)|0)==0){T=S;break L7951}S=S+1|0}}else{K=z;while(1){U=a[K]|0;if(!(U<<24>>24!=0&U<<24>>24!=b<<24>>24)){break}K=K+1|0}if(U<<24>>24==b<<24>>24){V=K}else{T=K;break}while(1){o=V+1|0;n=a[o]|0;if(n<<24>>24==0){T=o;break L7951}if((aM(n&255|0)|0)==0){T=o;break L7951}if((a[o]|0)==(a[47120]|0)){T=o;break}else{V=o}}}}while(0);b=c[11874]|0;if((a[T]|0)==0){j=b;break}else{k=T;l=b}}i=e;return j|0}function eY(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0;d=i;i=i+24|0;e=d|0;f=(c[13898]|0)+2|0;c[13898]=f;g=c[1054]|0;L7970:do{if((a[g+(f*40&-1)|0]&1)!=0){j=c[10810]|0;L7972:do{if((j|0)!=0){k=(c[8272]|0)>(f|0);l=g+(f*40&-1)+36|0;m=g+(f*40&-1)+32|0;n=c[10036]|0;o=j;L7974:while(1){p=c[o+4>>2]|0;L7976:do{if(k){q=c[l>>2]|0;r=0;while(1){if((r|0)>=(q|0)){break}if((a[n+((c[m>>2]|0)+r|0)|0]|0)==(a[p+r|0]|0)){r=r+1|0}else{break L7976}}if((a[p+r|0]|0)==0){break L7974}}}while(0);p=c[o>>2]|0;if((p|0)==0){break L7972}else{o=p}}if((a[o+8|0]&1)!=0){break}if((c[o+16>>2]|0)==1){break L7970}}}while(0);it();j=c[18070]|0;m=db(j,c[j>>2]<<5|8,105624)|0;c[18070]=0;j=c[11870]|0;n=c[11872]|0;c[1056+((n+j|0)*12&-1)>>2]=m;a[43464]=0;s=1;t=c[13898]|0;u=j;w=n;x=t+1|0;c[13898]=x;y=w+u|0;z=1052+(y*12&-1)|0;c[z>>2]=b;A=1048+(y*12&-1)|0;c[A>>2]=s;B=w+1|0;c[11872]=B;i=d;return}}while(0);f=is(e)|0;g=c[f>>2]|0;if((g|0)==3){C=+uz(c[f+8>>2]|0,0)}else if((g|0)==2){C=+h[f+8>>3]}else if((g|0)==1){C=+(c[f+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e|0;if((c[f>>2]|0)==3){uu(c[e+8>>2]|0);c[f>>2]=1}f=~~C;e=c[11870]|0;g=c[11872]|0;c[1056+((g+e|0)*12&-1)>>2]=0;n=c[13898]|0;if((f|0)<1){uf(n,140472,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{s=f;t=n;u=e;w=g;x=t+1|0;c[13898]=x;y=w+u|0;z=1052+(y*12&-1)|0;c[z>>2]=b;A=1048+(y*12&-1)|0;c[A>>2]=s;B=w+1|0;c[11872]=B;i=d;return}}function eZ(a){a=a|0;var b=0;a=c[6354]|0;if((c[14296+(a*24&-1)>>2]|0)==1){b=14304+(a*24&-1)|0;c[b>>2]=(c[b>>2]|0)!=0&1;i=i;return}else{uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function e_(a){a=a|0;var b=0,d=0;b=i;d=c[6354]|0;if((c[14296+(d*24&-1)>>2]|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[14304+(d*24&-1)>>2]|0)==0){c[9340]=c[a>>2];i=b;return}if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;i=b;return}function e$(a){a=a|0;var b=0,d=0;b=i;d=c[6354]|0;if((c[14296+(d*24&-1)>>2]|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[14304+(d*24&-1)>>2]|0)!=0){c[9340]=c[a>>2];i=b;return}if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;i=b;return}function e0(a){a=a|0;var b=0,d=0;b=i;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;if((c[14296+(d*24&-1)>>2]|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[14304+(d*24&-1)>>2]|0)!=0){i=b;return}c[9340]=c[a>>2];i=b;return}function e1(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;if((a|0)==0){return}b=a|0;if((c[b>>2]|0)>0){d=0;do{e=a+8+(d<<5)|0;f=c[e>>2]|0;do{if((f|0)==1|(f|0)==31){g=a+8+(d<<5)+8|0;if((c[g>>2]|0)!=3){h=f;break}uu(c[a+8+(d<<5)+16>>2]|0);c[g>>2]=1;h=c[e>>2]|0}else{h=f}}while(0);if((h|0)==8){f=a+8+(d<<5)+8|0;e1(c[(c[f>>2]|0)+8>>2]|0);uu(c[f>>2]|0)}d=d+1|0;}while((d|0)<(c[b>>2]|0))}uu(a);return}function e2(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=c[10810]|0;if((e|0)==0){return}else{f=e}L8058:while(1){e=c[f+4>>2]|0;do{if(d){if((a_(b|0,e|0,uA(b|0)|0)|0)!=0){break}a[f+8|0]=1;g=f+16|0;if((c[g>>2]|0)!=3){break}uu(c[f+24>>2]|0);c[g>>2]=1}else{if((aY(b|0,e|0)|0)==0){break L8058}}}while(0);e=c[f>>2]|0;if((e|0)==0){h=5965;break}else{f=e}}if((h|0)==5965){return}a[f+8|0]=1;h=f+16|0;if((c[h>>2]|0)!=3){return}uu(c[f+24>>2]|0);c[h>>2]=1;return}function e3(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=e6(b)|0;if((e|0)==0){return}b=e+8|0;do{if((a[b]&1)==0){if((aY(c[e+24>>2]|0,d|0)|0)==0){return}f=e+16|0;if((c[f>>2]|0)!=3){break}uu(c[e+24>>2]|0);c[f>>2]=1}else{a[b]=0}}while(0);if((d|0)==0){g=0}else{g=bP(d|0)|0}c[e+16>>2]=3;c[e+24>>2]=g;return}function e4(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,t=0.0;e=i;f=1;g=0;j=i;i=i+168|0;c[j>>2]=0;while(1)switch(f|0){case 1:a[1960]=0;k=al(4)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return}r=s=0;c[k>>2]=0;c[6354]=-1;if((a[43504]&1)==0){f=3;break}else{f=2;break};case 2:if((a[47472]&1)==0){f=3;break}else{f=5;break};case 3:l=uL(42120,f,j)|0;f=27;break;case 27:if((l|0)==0){f=4;break}else{f=26;break};case 4:av(2,8,136);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return}r=s=0;f=5;break;case 5:n=c[9340]|0;o=0;f=6;break;case 6:if((o|0)<(c[b>>2]|0)){f=7;break}else{f=9;break};case 7:k=c[b+8+(o<<5)>>2]|0;c[9340]=1;am(c[41164+(k<<3)>>2]|0,b+8+(o<<5)+8|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return}r=s=0;p=c[9340]|0;if((k-37|0)>>>0<4|(p|0)==1){o=p+o|0;f=6;break}else{f=8;break};case 8:ar(6,-1|0,113648,(v=i,i=i+8|0,c[v>>2]=206200,v)|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return}r=s=0;case 9:c[9340]=n;if((a[43504]&1)==0){f=11;break}else{f=10;break};case 10:if((a[47472]&1)==0){f=11;break}else{f=12;break};case 11:av(2,8,0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return}r=s=0;f=12;break;case 12:p=al(4)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return}r=s=0;if((c[p>>2]|0)==33){f=14;break}else{f=13;break};case 13:p=al(4)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return}r=s=0;if((c[p>>2]|0)==34){f=14;break}else{f=15;break};case 14:a[1960]=1;f=26;break;case 15:if((a[1960]&1)==0){f=16;break}else{f=26;break};case 16:q=c[6354]|0;if((q|0)<0){f=17;break}else{f=18;break};case 17:ar(6,-1|0,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return}r=s=0;case 18:c[6354]=q-1;p=d;k=14296+(q*24&-1)|0;c[p>>2]=c[k>>2];c[p+4>>2]=c[k+4>>2];c[p+8>>2]=c[k+8>>2];c[p+12>>2]=c[k+12>>2];c[p+16>>2]=c[k+16>>2];c[p+20>>2]=c[k+20>>2];if((q|0)==0){f=20;break}else{f=19;break};case 19:au(4,209896,98,1,c[m>>2]|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return}r=s=0;f=20;break;case 20:k=c[d>>2]|0;if((k|0)==1){f=21;break}else if((k|0)==2){f=22;break}else if((k|0)==3){t=0.0;f=24;break}else{f=23;break};case 21:t=+(c[d+8>>2]|0);f=24;break;case 22:t=+h[d+8>>3];f=24;break;case 23:ar(6,-1|0,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return}r=s=0;case 24:if(t>8.988465674311579e+307|t<-8.988465674311579e+307){f=25;break}else{f=26;break};case 25:a[1960]=1;f=26;break;case 26:i=e;return;case-1:if((g|0)==3){l=s;f=27}r=s=0;break}}function e5(b){b=b|0;aV(8,136);a[1960]=1;cv(42120|0,1)}function e6(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;e=43240;while(1){f=c[e>>2]|0;if((f|0)==0){break}if((aY(b|0,c[f+4>>2]|0)|0)==0){g=f;h=5992;break}else{e=f|0}}if((h|0)==5992){i=d;return g|0}h=ut(40)|0;do{if((h|0)==0){gk();f=ut(40)|0;if((f|0)!=0){j=f;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=213816,v)|0);return 0}else{j=h}}while(0);c[e>>2]=j;c[j>>2]=0;if((b|0)==0){k=0}else{k=bP(b|0)|0}c[(c[e>>2]|0)+4>>2]=k;a[(c[e>>2]|0)+8|0]=1;c[(c[e>>2]|0)+16>>2]=0;g=c[e>>2]|0;i=d;return g|0}function e7(b){b=b|0;var d=0,e=0,f=0.0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0;d=i;if((b|0)==3|(b|0)==2|(b|0)==0){e=6024}else if((b|0)==1){e8(2);e8(1);e8(6);e8(5);e8(0);e8(3);e8(8);e8(9);e8(10);f=+h[8685];j=e6(205392)|0;if((j|0)!=0){a[j+8|0]=0;c[j+16>>2]=2;h[j+24>>3]=f;h[j+32>>3]=0.0}f=+h[8701];j=e6(204792)|0;if((j|0)!=0){a[j+8|0]=0;c[j+16>>2]=2;h[j+24>>3]=f;h[j+32>>3]=0.0}j=c[16536]|0;f=+h[(c[3524]|0)+176>>3];k=e6(187496)|0;if((k|0)!=0){a[k+8|0]=0;c[k+16>>2]=1;c[k+24>>2]=~~(+(j|0)/f)}j=c[16537]|0;f=+h[(c[3524]|0)+176>>3];k=e6(186968)|0;if((k|0)!=0){a[k+8|0]=0;c[k+16>>2]=1;c[k+24>>2]=~~(+(j|0)/f)}j=c[16364]|0;f=+h[(c[3524]|0)+176>>3];k=e6(186448)|0;if((k|0)!=0){a[k+8|0]=0;c[k+16>>2]=1;c[k+24>>2]=~~(+(j|0)/f)}j=c[16365]|0;f=+h[(c[3524]|0)+176>>3];k=e6(185848)|0;if((k|0)!=0){a[k+8|0]=0;c[k+16>>2]=1;c[k+24>>2]=~~(+(j|0)/f)}j=c[13881]|0;k=e6(185384)|0;if((k|0)!=0){a[k+8|0]=0;c[k+16>>2]=1;c[k+24>>2]=j+1}j=c[13883]|0;k=e6(184936)|0;if((k|0)!=0){a[k+8|0]=0;c[k+16>>2]=1;c[k+24>>2]=j+1}j=a[37384]|0;k=e6(204536)|0;if((k|0)!=0){a[k+8|0]=0;c[k+16>>2]=1;c[k+24>>2]=(j&1^1)&255}j=a[37384]|0;k=e6(204264)|0;if((k|0)!=0){a[k+8|0]=0;c[k+16>>2]=1;c[k+24>>2]=j&1}j=c[5094]|0;k=e6(204008)|0;if((k|0)!=0){a[k+8|0]=0;c[k+16>>2]=1;c[k+24>>2]=(j|0)!=0&1}f=+g[3538];j=e6(196288)|0;if((j|0)!=0){a[j+8|0]=0;c[j+16>>2]=2;h[j+24>>3]=f;h[j+32>>3]=0.0}f=+g[3536];j=e6(195744)|0;if((j|0)!=0){a[j+8|0]=0;c[j+16>>2]=2;h[j+24>>3]=f;h[j+32>>3]=0.0}f=+g[3534];j=e6(148264)|0;if((j|0)!=0){a[j+8|0]=0;c[j+16>>2]=2;h[j+24>>3]=f;h[j+32>>3]=0.0}f=+g[3532];j=e6(148040)|0;if((j|0)==0){i=d;return}a[j+8|0]=0;c[j+16>>2]=2;h[j+24>>3]=f;h[j+32>>3]=0.0;i=d;return}do{if((e|0)==6024){j=c[3524]|0;L8156:do{if((j|0)==0){k=e6(202664)|0;if((k|0)==0){break}l=k+8|0;do{if((a[l]&1)==0){if((aY(c[k+24>>2]|0,225016)|0)==0){break L8156}m=k+16|0;if((c[m>>2]|0)!=3){n=m;break}uu(c[k+24>>2]|0);c[m>>2]=1;n=m}else{a[l]=0;n=k+16|0}}while(0);l=bP(225016)|0;c[n>>2]=3;c[k+24>>2]=l}else{e3(202664,c[j>>2]|0)}}while(0);j=e6(201560)|0;L8167:do{if((j|0)!=0){l=j+8|0;do{if((a[l]&1)==0){if((aY(c[j+24>>2]|0,13048)|0)==0){break L8167}m=j+16|0;if((c[m>>2]|0)!=3){o=m;break}uu(c[j+24>>2]|0);c[m>>2]=1;o=m}else{a[l]=0;o=j+16|0}}while(0);l=bP(13048)|0;c[o>>2]=3;c[j+24>>2]=l}}while(0);j=c[8244]|0;e3(200696,(j|0)!=0?j:179864);e3(199888,c[44936+(c[11252]<<2)>>2]|0);if((b|0)==3){p=43240}else if((b|0)==2){j=e6(199272)|0;if((j|0)==0){i=d;return}else{a[j+8|0]=0;c[j+16>>2]=1;c[j+24>>2]=1;break}}else{break}while(1){j=c[p>>2]|0;if((j|0)==0){e=6045;break}if((aY(198952,c[j+4>>2]|0)|0)==0){q=j;e=6049;break}else{p=j|0}}if((e|0)==6045){j=ut(40)|0;do{if((j|0)==0){gk();l=ut(40)|0;if((l|0)!=0){r=l;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=213816,v)|0)}else{r=j}}while(0);c[p>>2]=r;c[r>>2]=0;j=bP(198952)|0;c[(c[p>>2]|0)+4>>2]=j;a[(c[p>>2]|0)+8|0]=1;c[(c[p>>2]|0)+16>>2]=0;j=c[p>>2]|0;if((j|0)==0){s=43240}else{q=j;e=6049}}do{if((e|0)==6049){j=q+8|0;if((a[j]&1)==0){s=43240;break}a[j]=0;f=+uz(40152,0);c[q+16>>2]=2;h[q+24>>3]=f;h[q+32>>3]=0.0;s=43240}}while(0);while(1){j=c[s>>2]|0;if((j|0)==0){e=6053;break}if((aY(198528,c[j+4>>2]|0)|0)==0){t=j;e=6057;break}else{s=j|0}}if((e|0)==6053){j=ut(40)|0;do{if((j|0)==0){gk();l=ut(40)|0;if((l|0)!=0){u=l;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=213816,v)|0)}else{u=j}}while(0);c[s>>2]=u;c[u>>2]=0;j=bP(198528)|0;c[(c[s>>2]|0)+4>>2]=j;a[(c[s>>2]|0)+8|0]=1;c[(c[s>>2]|0)+16>>2]=0;j=c[s>>2]|0;if((j|0)==0){w=43240}else{t=j;e=6057}}L8202:do{if((e|0)==6057){if((a[t+8|0]&1)==0){w=43240;break}j=e6(198528)|0;if((j|0)==0){w=43240;break}l=j+8|0;do{if((a[l]&1)==0){if((aY(c[j+24>>2]|0,40160)|0)==0){w=43240;break L8202}k=j+16|0;if((c[k>>2]|0)!=3){x=k;break}uu(c[j+24>>2]|0);c[k>>2]=1;x=k}else{a[l]=0;x=j+16|0}}while(0);l=bP(40160)|0;c[x>>2]=3;c[j+24>>2]=l;w=43240}}while(0);while(1){l=c[w>>2]|0;if((l|0)==0){e=6067;break}if((aY(198248,c[l+4>>2]|0)|0)==0){y=l;e=6071;break}else{w=l|0}}if((e|0)==6067){l=ut(40)|0;do{if((l|0)==0){gk();k=ut(40)|0;if((k|0)!=0){z=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=213816,v)|0)}else{z=l}}while(0);c[w>>2]=z;c[z>>2]=0;l=bP(198248)|0;c[(c[w>>2]|0)+4>>2]=l;a[(c[w>>2]|0)+8|0]=1;c[(c[w>>2]|0)+16>>2]=0;l=c[w>>2]|0;if((l|0)!=0){y=l;e=6071}}do{if((e|0)==6071){if((a[y+8|0]&1)==0){break}e3(198248,c[13388]|0)}}while(0);l=e6(104120)|0;if((l|0)!=0){a[l+8|0]=0;c[l+16>>2]=1;c[l+24>>2]=0}l=e6(204536)|0;if((l|0)!=0){a[l+8|0]=0;c[l+16>>2]=1;c[l+24>>2]=0}l=e6(204264)|0;if((l|0)!=0){a[l+8|0]=0;c[l+16>>2]=1;c[l+24>>2]=0}l=lt()|0;e3(197288,l);uu(l);e3(199888,c[44936+(c[11252]<<2)>>2]|0);l=e6(196632)|0;if((l|0)!=0){a[l+8|0]=0;c[l+16>>2]=2;h[l+24>>3]=3.141592653589793;h[l+32>>3]=0.0}f=+uz(133568,0);l=e6(196016)|0;if((l|0)==0){break}a[l+8|0]=0;c[l+16>>2]=2;h[l+24>>3]=f;h[l+32>>3]=0.0}}while(0);L8239:do{if((b-3|0)>>>0<2){y=e6(199272)|0;if((y|0)!=0){a[y+8|0]=0;c[y+16>>2]=1;c[y+24>>2]=0}y=e6(137752)|0;if((y|0)==0){break}w=y+8|0;do{if((a[w]&1)==0){if((a[c[y+24>>2]|0]|0)==0){break L8239}z=y+16|0;if((c[z>>2]|0)!=3){A=z;break}uu(c[y+24>>2]|0);c[z>>2]=1;A=z}else{a[w]=0;A=y+16|0}}while(0);w=bP(179864)|0;c[A>>2]=3;c[y+24>>2]=w}}while(0);if((b|0)==5|(b|0)==3){e=6094}else if((b|0)!=6){i=d;return}do{if((e|0)==6094){A=ut(4096)|0;do{if((A|0)==0){gk();w=ut(4096)|0;if((w|0)!=0){B=w;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=193744,v)|0)}else{B=A}}while(0);bl(B|0,4096);e3(192848,B);uu(B);if((b|0)==6){break}i=d;return}}while(0);b=c[12900]|0;B=e6(191128)|0;if((B|0)==0){i=d;return}a[B+8|0]=0;c[B+16>>2]=1;c[B+24>>2]=b;i=d;return}function e8(b){b=b|0;var d=0,e=0,f=0.0,g=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0;d=i;i=i+24|0;e=64788+(b*688&-1)|0;f=+h[64664+(b*688&-1)>>3];if((a[e]&1)==0){g=+h[64672+(b*688&-1)>>3];j=f}else{k=+h[64800+(b*688&-1)>>3];l=+Z(+(f*k));g=+Z(+(+h[64672+(b*688&-1)>>3]*k));j=l}m=(c[64656+(b*688&-1)>>2]&2|0)!=0&j>g;l=m?j:g;k=m?g:j;m=d|0;n=56832+(b*24&-1)|0;be(m|0,182200,(v=i,i=i+24|0,c[v>>2]=184544,c[v+8>>2]=n,c[v+16>>2]=184256,v)|0);o=a[m]|0;if(o<<24>>24!=0){p=m;q=o;do{a[p]=bC(q<<24>>24|0)&255;p=p+1|0;q=a[p]|0;}while(q<<24>>24!=0)}q=e6(m)|0;if((q|0)!=0){a[q+8|0]=0;c[q+16>>2]=2;h[q+24>>3]=k;h[q+32>>3]=0.0}be(m|0,182200,(v=i,i=i+24|0,c[v>>2]=184544,c[v+8>>2]=n,c[v+16>>2]=183776,v)|0);q=a[m]|0;if(q<<24>>24!=0){p=m;o=q;do{a[p]=bC(o<<24>>24|0)&255;p=p+1|0;o=a[p]|0;}while(o<<24>>24!=0)}o=e6(m)|0;if((o|0)!=0){a[o+8|0]=0;c[o+16>>2]=2;h[o+24>>3]=l;h[o+32>>3]=0.0}l=+h[64792+(b*688&-1)>>3];be(m|0,182200,(v=i,i=i+24|0,c[v>>2]=184544,c[v+8>>2]=n,c[v+16>>2]=183416,v)|0);o=a[m]|0;if(o<<24>>24!=0){p=m;q=o;do{a[p]=bC(q<<24>>24|0)&255;p=p+1|0;q=a[p]|0;}while(q<<24>>24!=0)}q=e6(m)|0;if((q|0)!=0){a[q+8|0]=0;c[q+16>>2]=2;h[q+24>>3]=l;h[q+32>>3]=0.0}if(b>>>0>=7){i=d;return}l=+h[64712+(b*688&-1)>>3];if((a[e]&1)==0){r=l}else{r=+Z(+(l*+h[64800+(b*688&-1)>>3]))}be(m|0,182200,(v=i,i=i+24|0,c[v>>2]=182880,c[v+8>>2]=n,c[v+16>>2]=184256,v)|0);q=a[m]|0;if(q<<24>>24!=0){p=m;o=q;do{a[p]=bC(o<<24>>24|0)&255;p=p+1|0;o=a[p]|0;}while(o<<24>>24!=0)}o=e6(m)|0;if((o|0)!=0){a[o+8|0]=0;c[o+16>>2]=2;h[o+24>>3]=r;h[o+32>>3]=0.0}r=+h[64720+(b*688&-1)>>3];if((a[e]&1)==0){s=r}else{s=+Z(+(r*+h[64800+(b*688&-1)>>3]))}be(m|0,182200,(v=i,i=i+24|0,c[v>>2]=182880,c[v+8>>2]=n,c[v+16>>2]=183776,v)|0);n=a[m]|0;if(n<<24>>24!=0){b=m;e=n;do{a[b]=bC(e<<24>>24|0)&255;b=b+1|0;e=a[b]|0;}while(e<<24>>24!=0)}e=e6(m)|0;if((e|0)==0){i=d;return}a[e+8|0]=0;c[e+16>>2]=2;h[e+24>>3]=s;h[e+32>>3]=0.0;i=d;return}function e9(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}e=d+1|0;c[6354]=e;d=14296+(e*24&-1)|0;c[d>>2]=3;c[14304+(e*24&-1)>>2]=a;f=d+12|0;d=b|0;c[f>>2]=c[d>>2];c[f+4>>2]=c[d+4>>2];c[f+8>>2]=c[d+8>>2];if((a|0)==0){g=e}else{e=bP(a|0)|0;a=c[6354]|0;c[14304+(a*24&-1)>>2]=e;g=a}if((g|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}a=g+1|0;c[6354]=a;g=14296+(a*24&-1)|0;c[g>>2]=1;c[14304+(a*24&-1)>>2]=-1;a=g+12|0;c[a>>2]=c[d>>2];c[a+4>>2]=c[d+4>>2];c[a+8>>2]=c[d+8>>2];hb(0);d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{c[6354]=d-1;i=b;return c[14304+(d*24&-1)>>2]|0}return 0}function fa(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}f=e+1|0;c[6354]=f;e=14296+(f*24&-1)|0;c[e>>2]=3;c[14304+(f*24&-1)>>2]=a;g=e+12|0;e=d|0;c[g>>2]=c[e>>2];c[g+4>>2]=c[e+4>>2];c[g+8>>2]=c[e+8>>2];if((a|0)==0){h=f}else{f=bP(a|0)|0;a=c[6354]|0;c[14304+(a*24&-1)>>2]=f;h=a}if((h|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}a=h+1|0;c[6354]=a;h=14296+(a*24&-1)|0;c[h>>2]=1;c[14304+(a*24&-1)>>2]=b;b=h+12|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];c[b+8>>2]=c[e+8>>2];hb(0);e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{c[6354]=e-1;i=d;return c[14304+(e*24&-1)>>2]|0}return 0}function fb(){var b=0,d=0;uD(42280,101104,9);b=a8(42280,0)|0;while(1){d=b-1|0;if((a[d]|0)==10){b=d}else{break}}d=b;w=10;a[d]=w&255;w=w>>8;a[d+1|0]=w&255;aK(42280,c[m>>2]|0);d=b+1|0;w=10;a[d]=w&255;w=w>>8;a[d+1|0]=w&255;d=c[8762]|0;if((d|0)!=0){cf(d|0,146328,(v=i,i=i+8|0,c[v>>2]=42280,v)|0);d=c[8762]|0;az(d|0);c[8762]=0}d=c[10062]|0;if((d|0)!=0){e1(d);c[10062]=0}aV(2,4);aV(13,1);uf(-1,130168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function fc(d,e){d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0.0,O=0,P=0.0,Q=0,R=0.0,S=0,T=0,U=0;f=i;i=i+968|0;g=f|0;j=f+256|0;k=f+512|0;l=f+576|0;m=f+704|0;n=f+960|0;o=j|0;do{if((e|0)==0){p=6169}else{if((a[e]|0)==0){p=6169;break}q=m|0;uF(q|0,d|0,256);if((uA(d|0)|0)>>>0<256){r=e;break}a[m+255|0]=0;r=e}}while(0);do{if((p|0)==6169){e=m|0;uB(e|0,d|0);q=m+(uA(e|0)|0)|0;a[q]=a[214408]|0;a[q+1|0]=a[214409|0]|0;a[q+2|0]=a[214410|0]|0;a[q+3|0]=a[214411|0]|0;a[q+4|0]=a[214412|0]|0;if((b8(d|0,e|0)|0)==0){r=d;break}be(42289,213616,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=e,v)|0);fb()}}while(0);d=m|0;e=g|0;g=(uA(d|0)|0)-1|0;q=m+g|0;L8361:do{if((g|0)<0){s=q}else{m=q;while(1){t=a[m]|0;if((t<<24>>24|0)==92|(t<<24>>24|0)==47|(t<<24>>24|0)==58){s=m;break L8361}t=m-1|0;if(t>>>0>>0){s=t;break}else{m=t}}}}while(0);uB(e|0,s+1|0);s=hA(d,193632)|0;if((s|0)==0){be(42289,101576,(v=i,i=i+8|0,c[v>>2]=d,v)|0);fb()}d=bF(r|0,137896)|0;if((d|0)==0){be(42289,89920,(v=i,i=i+8|0,c[v>>2]=r,v)|0);fb()}L8372:do{if((a6(o|0,256,s|0)|0)!=0){r=l|0;q=l;g=l+126|0;m=k|0;t=k+63|0;u=0;L8374:while(1){w=o;while(1){x=a[w]|0;if((x<<24>>24|0)==35|(x<<24>>24|0)==0){aK(o|0,d|0);if((a6(o|0,256,s|0)|0)==0){break L8372}else{w=o;continue}}else if((x<<24>>24|0)==32|(x<<24>>24|0)==9|(x<<24>>24|0)==10){w=w+1|0;continue}else{break}}w=a8(o|0,35)|0;if((w|0)==0){b[q>>1]=10;y=o}else{uF(r|0,w|0,127);if((uA(w|0)|0)>>>0>=127){a[g]=0}a[w]=0;y=o}while(1){w=a[y]|0;if((w<<24>>24|0)==10|(w<<24>>24|0)==0){z=0;A=u;B=o;break}else if(!((w<<24>>24|0)==32|(w<<24>>24|0)==9|(w<<24>>24|0)==61)){p=6190;break}y=y+1|0}if((p|0)==6190){p=0;w=cy(y|0,213208)|0;if((w|0)==0){C=y+(uA(y|0)|0)|0}else{C=w}w=a[C]|0;a[C]=0;z=y;A=w;B=C+1|0}w=a[z]|0;if(w<<24>>24!=0){x=z;D=w;do{if((bs(D&255|0)|0)==0){if((a[x]|0)!=95){p=6244;break L8374}}x=x+1|0;D=a[x]|0;}while(D<<24>>24!=0)}if((uA(z|0)|0)>>>0>50){p=6243;break}uF(m|0,z|0,64);if((uA(z|0)|0)>>>0>=64){a[t]=0}if(A<<24>>24==61){E=B}else{D=a8(B|0,61)|0;if((D|0)==0){p=6203;break}E=D+1|0}D=E;while(1){x=a[D]|0;if((x<<24>>24|0)==10|(x<<24>>24|0)==0){F=0;G=A;H=E;break}else if(!((x<<24>>24|0)==32|(x<<24>>24|0)==9|(x<<24>>24|0)==61)){p=6208;break}D=D+1|0}if((p|0)==6208){p=0;x=cy(D|0,213208)|0;if((x|0)==0){I=D+(uA(D|0)|0)|0}else{I=x}x=a[I]|0;a[I]=0;F=D;G=x;H=I+1|0}if((ca(F|0,148448,(v=i,i=i+8|0,c[v>>2]=n,v)|0)|0)==0){p=6212;break}else{J=H}while(1){x=a[J]|0;if((x<<24>>24|0)==10|(x<<24>>24|0)==0){K=G;break}else if(!((x<<24>>24|0)==32|(x<<24>>24|0)==9|(x<<24>>24|0)==61)){p=6215;break}J=J+1|0}if((p|0)==6215){p=0;D=cy(J|0,213208)|0;if((D|0)==0){L=J+(uA(J|0)|0)|0}else{L=D}D=a[L]|0;a[L]=0;if((J|0)==0){K=D}else{p=6218;break}}D=43240;while(1){M=c[D>>2]|0;if((M|0)==0){p=6221;break}if((aY(m|0,c[M+4>>2]|0)|0)==0){p=6223;break}else{D=M|0}}if((p|0)==6223){p=0;D=c[M+16>>2]|0;if((D|0)==1){N=+(c[M+24>>2]|0)}else if((D|0)==3){N=+uz(c[M+24>>2]|0,0)}else if((D|0)==2){N=+h[M+24>>3]}else{p=6227;break}h[n>>3]=N;if(N==0.0){O=43240;p=6229}else{P=N}}else if((p|0)==6221){p=0;h[n>>3]=0.0;O=43240;p=6229}if((p|0)==6229){while(1){p=0;Q=c[O>>2]|0;if((Q|0)==0){R=0.0;break}if((aY(m|0,c[Q+4>>2]|0)|0)==0){p=6231;break}else{O=Q|0;p=6229}}do{if((p|0)==6231){p=0;if((c[Q+16>>2]|0)!=1){R=0.0;break}R=+(c[Q+24>>2]|0)}}while(0);h[n>>3]=R;P=R}be(o|0,170912,(v=i,i=i+8|0,h[v>>3]=P,v)|0);do{if((a8(o|0,46)|0)==0){if((a8(o|0,101)|0)!=0){break}D=j+(uA(o|0)|0)|0;a[D]=a[119960]|0;a[D+1|0]=a[119961|0]|0;a[D+2|0]=a[119962|0]|0}}while(0);cf(d|0,209168,(v=i,i=i+24|0,c[v>>2]=m,c[v+8>>2]=o,c[v+16>>2]=r,v)|0);if((a6(o|0,256,s|0)|0)==0){break L8372}else{u=K}}if((p|0)==6243){S=az(d|0)|0;T=az(s|0)|0;U=be(42289,80408,(v=i,i=i+8|0,c[v>>2]=e,v)|0)|0;fb()}else if((p|0)==6203){az(d|0);az(s|0);be(42289,80408,(v=i,i=i+8|0,c[v>>2]=e,v)|0);fb()}else if((p|0)==6212){az(d|0);az(s|0);be(42289,80408,(v=i,i=i+8|0,c[v>>2]=e,v)|0);fb()}else if((p|0)==6244){S=az(d|0)|0;T=az(s|0)|0;U=be(42289,80408,(v=i,i=i+8|0,c[v>>2]=e,v)|0)|0;fb()}else if((p|0)==6227){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((p|0)==6218){az(d|0);az(s|0);be(42289,80408,(v=i,i=i+8|0,c[v>>2]=e,v)|0);fb()}}}while(0);if((az(d|0)|0)!=0){uD(42289,203968,24);fb()}if((az(s|0)|0)==0){i=f;return}else{uD(42289,203968,24);fb()}}function fd(){var b=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0,D=0.0,E=0.0,F=0,G=0.0,H=0,I=0.0,J=0.0,K=0.0,L=0,M=0.0,N=0.0,R=0.0,S=0,T=0.0,U=0.0,V=0.0,W=0,X=0.0,Y=0.0,Z=0.0,$=0.0,ab=0.0,ac=0.0,ad=0.0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0.0,aq=0,ar=0,as=0,at=0,au=0.0,av=0,aw=0.0,ax=0,ay=0,aA=0,aB=0,aC=0,aD=0,aE=0,aG=0,aH=0,aJ=0,aL=0,aM=0,aN=0,aO=0,aP=0,aR=0,aS=0,aU=0.0,aW=0,aX=0,aZ=0,a_=0,a$=0,a0=0,a2=0,a3=0,a4=0,a5=0,a7=0,a9=0,ba=0,bb=0.0,bc=0,bd=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0,bz=0,bB=0,bC=0.0,bE=0,bG=0.0,bH=0.0,bI=0.0,bK=0,bL=0.0,bM=0,bN=0.0,bQ=0,bR=0,bS=0.0,bT=0,bV=0.0,bW=0.0,bX=0.0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0,b3=0,b4=0,b5=0,b6=0.0;b=i;i=i+320|0;e=b|0;f=b+8|0;g=b+16|0;j=b+40|0;k=b+88|0;l=b+136|0;n=b+216|0;p=b+240|0;q=b+272|0;r=q;s=i;i=i+56|0;t=i;i=i+4|0;i=i+7>>3<<3;u=i;i=i+688|0;w=i;i=i+8|0;x=i;i=i+1025|0;i=i+7>>3<<3;uE(p|0,-1|0,28);y=(c[13898]|0)+1|0;c[13898]=y;z=c[16507]|0;c[16506]=z;if((z&3|0)==0){A=+h[8258];B=+h[8257];if(A>3];if((a[66164]&1)==0){G=0.0}else{G=+_(+(+h[8271]))}h[8272]=G;h[8261]=8.988465674311579e+307;h[8262]=-8.988465674311579e+307;C=c[16335]|0;c[16334]=C;if((C&3|0)==0){G=+h[8172];D=+h[8171];if(G>3];if((a[65476]&1)==0){K=0.0}else{K=+_(+(+h[8185]))}h[8186]=K;h[8175]=8.988465674311579e+307;h[8176]=-8.988465674311579e+307;H=c[17539]|0;c[17538]=H;if((H&3|0)==0){K=+h[8774];I=+h[8773];if(K>3];if((a[70292]&1)==0){R=0.0}else{R=+_(+(+h[8787]))}h[8788]=R;h[8777]=8.988465674311579e+307;h[8778]=-8.988465674311579e+307;L=c[17711]|0;c[17710]=L;if((L&3|0)==0){R=+h[8860];M=+h[8859];if(R>3];if((a[70980]&1)==0){V=0.0}else{V=+_(+(+h[8873]))}h[8874]=V;h[8863]=8.988465674311579e+307;h[8864]=-8.988465674311579e+307;S=c[17883]|0;c[17882]=S;if((S&3|0)==0){V=+h[8946];T=+h[8945];if(V>3];if((a[71668]&1)==0){Z=0.0}else{Z=+_(+(+h[8959]))}h[8960]=Z;h[8949]=8.988465674311579e+307;h[8950]=-8.988465674311579e+307;W=c[16163]|0;c[16162]=W;do{if((W&3|0)==0){Z=+h[8086];X=+h[8085];if(Z>=X){$=X;ab=Z;F=6281;break}h[8083]=Z;ac=X}else{$=+h[8085];ab=+h[8086];F=6281}}while(0);if((F|0)==6281){h[8083]=(W&1|0)==0?$:8.988465674311579e+307;ac=(W&2|0)==0?ab:-8.988465674311579e+307}h[8084]=ac;if((a[64788]&1)==0){ad=0.0}else{ad=+_(+(+h[8099]))}h[8100]=ad;h[8089]=8.988465674311579e+307;h[8090]=-8.988465674311579e+307;c[200]=2;c[144]=1;c[34]=0;L8524:do{if((c[8272]|0)>(y|0)){W=u;S=p+24|0;L=-1;H=0;C=y;while(1){z=c[1054]|0;if((a[z+(C*40&-1)|0]&1)==0){ae=L;af=H;ag=C;break L8524}ah=c[z+(C*40&-1)+36>>2]|0;ai=z+(C*40&-1)+32|0;z=c[10036]|0;aj=0;while(1){if((aj|0)>=(ah|0)){break}if((a[z+((c[ai>>2]|0)+aj|0)|0]|0)==(a[aj+78280|0]|0)){aj=aj+1|0}else{ae=L;af=H;ag=C;break L8524}}if((aj|0)!=1){ae=L;af=H;ag=C;break L8524}if((H|0)>5){break}ai=c[42584+(H<<2)>>2]|0;uD(W|0,64648+(ai*688&-1)|0,688);c[S>>2]=c[p+(ai<<2)>>2];c[p+(H<<2)>>2]=dr(ai,-1)|0;ai=c[13898]|0;z=H+1|0;if((c[8272]|0)>(ai|0)){L=ai;H=z;C=ai}else{ae=ai;af=z;ag=ai;break L8524}}uf(C,192712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{ae=-1;af=0;ag=y}}while(0);y=c[10062]|0;if((y|0)!=0){e1(y);c[10062]=0}c[11670]=40240;uB(42608,24544);uB(42659,24595);y=0;do{H=c[p+(y<<2)>>2]|0;if((H|0)>-1){L=c[1054]|0;S=c[L+(H*40&-1)+36>>2]|0;W=(S|0)>49?49:S;S=c[10036]|0;ai=c[L+(H*40&-1)+32>>2]|0;H=0;while(1){L=H+1|0;a[55600+(y*51&-1)+H|0]=a[S+ai|0]|0;if((L|0)==(W|0)){break}else{ai=ai+1|0;H=L}}a[55600+(y*51&-1)+W|0]=0}else{uB(55600+(y*51&-1)|0,42608+(y*51&-1)|0)}y=y+1|0;}while((y|0)<5);it();y=c[18070]|0;H=db(y,c[y>>2]<<5|8,105624)|0;c[18070]=0;c[10062]=H;c[11670]=0;H=c[13898]|0;if((H|0)>=(c[8272]|0)){ak=H;uf(ak,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}y=c[1054]|0;L8553:do{if((a[y+(H*40&-1)|0]&1)!=0){ai=c[y+(H*40&-1)+36>>2]|0;S=y+(H*40&-1)+32|0;C=c[10036]|0;L=0;while(1){if((L|0)>=(ai|0)){break}if((a[C+((c[S>>2]|0)+L|0)|0]|0)==(a[L+103664|0]|0)){L=L+1|0}else{break L8553}}if((L|0)==1){ak=H}else{break}uf(ak,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);a[14176]=1;is(n);a[14176]=0;if((c[n>>2]|0)!=3){c[13898]=H;ak=H;uf(ak,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}y=c[n+8>>2]|0;if((y|0)==0){ak=c[13898]|0;uf(ak,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[11856]=0;c[13486]=ey(y,7,0)|0;uu(y);y=c[13486]|0;if((y|0)<0){uf(-1,120240,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((y|0)==1){uf(c[13898]|0,174456,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}ak=(y|0)<3?1:y-2|0;c[8304]=ak;if((c[64808+((c[200]|0)*688&-1)>>2]|0)==1&(y|0)<2){uf(c[13898]|0,84448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[64808+((c[144]|0)*688&-1)>>2]|0)==1&(y|0)<1){uf(c[13898]|0,106024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((ak|0)>0){y=(ak|0)>1?ak:1;uD(48840,42584,y<<2);al=y}else{al=0}c[48840+(al<<2)>>2]=0;c[48840+(al+1<<2)>>2]=99;al=c[p+4>>2]|0;if((al|0)>-1&(ak|0)==1){uf(al,159352,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}al=ak+1|0;if((af|0)>(al|0)){uf(ae,152936,(v=i,i=i+8|0,c[v>>2]=ak,v)|0)}if((af|0)==(al|0)&(ak|0)<5){ak=af-1|0;af=c[42584+(ak<<2)>>2]|0;al=64648+(af*688&-1)|0;ae=al|0;y=c[34]|0;c[64648+(y*688&-1)>>2]=c[ae>>2];n=c[ae>>2]|0;if((n&1|0)==0){h[64664+(y*688&-1)>>3]=+h[64664+(af*688&-1)>>3];am=c[ae>>2]|0}else{am=n}if((am&2|0)==0){h[64672+(y*688&-1)>>3]=+h[64672+(af*688&-1)>>3]}uD(al|0,u|0,688);c[p+(ak<<2)>>2]=c[p+24>>2]}p=c[13898]|0;ak=43240;while(1){an=c[ak>>2]|0;if((an|0)==0){ao=43240;break}if((aY(214968,c[an+4>>2]|0)|0)==0){F=6337;break}else{ak=an|0}}do{if((F|0)==6337){ak=c[an+16>>2]|0;if((ak|0)==2){ap=+h[an+24>>3]}else if((ak|0)==3){ap=+uz(c[an+24>>2]|0,0)}else if((ak|0)==1){ap=+(c[an+24>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(!(ap<1.0&ap>0.0)){ao=43240;break}h[5479]=ap;ao=43240}}while(0);while(1){aq=c[ao>>2]|0;if((aq|0)==0){ar=0;break}if((aY(215432,c[aq+4>>2]|0)|0)==0){F=6346;break}else{ao=aq|0}}do{if((F|0)==6346){if((c[aq+16>>2]|0)!=1){ar=0;break}ar=c[aq+24>>2]|0}}while(0);c[8708]=ar;ar=43240;while(1){as=c[ar>>2]|0;if((as|0)==0){at=43240;break}if((aY(215960,c[as+4>>2]|0)|0)==0){F=6351;break}else{ar=as|0}}do{if((F|0)==6351){ar=c[as+16>>2]|0;if((ar|0)==1){au=+(c[as+24>>2]|0)}else if((ar|0)==2){au=+h[as+24>>3]}else if((ar|0)==3){au=+uz(c[as+24>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(au<=0.0){at=43240;break}h[1782]=au;bD(150480,(v=i,i=i+8|0,h[v>>3]=au,v)|0);at=43240}}while(0);while(1){av=c[at>>2]|0;if((av|0)==0){break}if((aY(216424,c[av+4>>2]|0)|0)==0){F=6360;break}else{at=av|0}}do{if((F|0)==6360){at=c[av+16>>2]|0;if((at|0)==1){aw=+(c[av+24>>2]|0)}else if((at|0)==2){aw=+h[av+24>>3]}else if((at|0)==3){aw=+uz(c[av+24>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(aw<=0.0){break}h[4485]=aw;h[4484]=aw;bD(148576,(v=i,i=i+8|0,h[v>>3]=aw,v)|0)}}while(0);uu(c[10638]|0);c[10638]=0;av=bU(217040)|0;if((av|0)!=0){c[10638]=bP(av|0)|0}av=fg()|0;at=c[8762]|0;do{if((at|0)==0){as=bF(av|0,205056)|0;c[8762]=as;if((as|0)!=0){ax=as;break}be(42289,144360,(v=i,i=i+8|0,c[v>>2]=av,v)|0);fb()}else{ax=at}}while(0);if((av|0)==0){ay=ax}else{uu(av);ay=c[8762]|0}aI(142744,82,1,ay|0);cG(t|0);ay=c[8762]|0;av=aT(t|0)|0;cf(ay|0,141312,(v=i,i=i+8|0,c[v>>2]=av,v)|0);av=p-1|0;p=c[1054]|0;ay=(c[p+(av*40&-1)+36>>2]|0)+(c[p+(av*40&-1)+32>>2]|0)|0;av=db(0,(ay+1|0)-(c[p+(H*40&-1)+32>>2]|0)|0,116456)|0;p=c[(c[1054]|0)+(H*40&-1)+32>>2]|0;L8653:do{if((p|0)<(ay|0)){t=p;ax=av;while(1){at=a[(c[10036]|0)+t|0]|0;if(at<<24>>24==0){aA=ax;break L8653}as=ax+1|0;a[ax]=at;at=t+1|0;if((at|0)<(ay|0)){t=at;ax=as}else{aA=as;break}}}else{aA=av}}while(0);a[aA]=0;cf(c[8762]|0,139528,(v=i,i=i+8|0,c[v>>2]=av,v)|0);aI(137608,17,1,c[8762]|0);uu(av);L8658:do{if((c[8304]|0)>0){av=0;while(1){aA=c[13486]|0;ay=c[8762]|0;if((av|0)>=(aA-1|0)){aB=ay;aC=aA;break L8658}cf(ay|0,135712,(v=i,i=i+8|0,c[v>>2]=55600+(av*51&-1),v)|0);ay=av+1|0;if((ay|0)<(c[8304]|0)){av=ay}else{F=6378;break}}}else{F=6378}}while(0);if((F|0)==6378){aB=c[8762]|0;aC=c[13486]|0}cf(aB|0,((aC|0)<3?134160:132576)|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);aC=c[8304]|0;if((aC|0)<0){aD=aC}else{aB=l|0;l=0;av=0;ay=aC;while(1){if((c[64648+(l*688&-1)>>2]&3|0)==3){aE=ay}else{aC=c[8762]|0;if((av|0)==0){aG=77416}else{aG=55600+(av*51&-1)|0}cf(aC|0,220408,(v=i,i=i+8|0,c[v>>2]=aG,v)|0);aA=64648+(l*688&-1)|0;do{if((c[aA>>2]&1|0)==0){if((c[64808+(l*688&-1)>>2]|0)==1){aF(34,aC|0);p=64813+(l*688&-1)|0;aw=+h[64664+(l*688&-1)>>3];t3(k,aw);au=aw- +O(+aw);t4(aB,80,p,k,au);aK(aB|0,aC|0);aF(34,aC|0);break}else{au=+h[64664+(l*688&-1)>>3];cf(aC|0,92736,(v=i,i=i+8|0,h[v>>3]=au,v)|0);break}}else{aF(42,aC|0)}}while(0);aI(223968,3,1,aC|0);do{if((c[aA>>2]&2|0)==0){if((c[64808+(l*688&-1)>>2]|0)==1){aF(34,aC|0);p=64813+(l*688&-1)|0;au=+h[64672+(l*688&-1)>>3];t3(j,au);aw=au- +O(+au);t4(aB,80,p,j,aw);aK(aB|0,aC|0);aF(34,aC|0);break}else{aw=+h[64672+(l*688&-1)>>3];cf(aC|0,92736,(v=i,i=i+8|0,h[v>>3]=aw,v)|0);break}}else{aF(42,aC|0)}}while(0);aI(89968,2,1,aC|0);aE=c[8304]|0}aA=av+1|0;if((aA|0)>(aE|0)){aD=aE;break}else{l=c[42584+(av<<2)>>2]|0;av=aA;ay=aE}}}c[8718]=2048;do{if((aD<<11|0)<1){c[10636]=0;aH=2048;F=6405}else{aE=aD<<14;ay=ut(aE)|0;do{if((ay|0)==0){gk();av=ut(aE)|0;if((av|0)!=0){aJ=av;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0)}else{aJ=ay}}while(0);ay=c[8718]|0;c[10636]=aJ;if((ay|0)>=1){aH=ay;F=6405;break}c[10634]=0;aL=0}}while(0);do{if((F|0)==6405){aJ=aH<<3;aD=ut(aJ)|0;do{if((aD|0)==0){gk();ay=ut(aJ)|0;if((ay|0)!=0){aM=ay;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0)}else{aM=aD}}while(0);aD=c[8718]|0;c[10634]=aM;if((aD|0)<1){aL=0;break}aJ=aD<<3;aD=ut(aJ)|0;do{if((aD|0)==0){gk();ay=ut(aJ)|0;if((ay|0)!=0){aN=ay;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0)}else{aN=aD}}while(0);aL=aN}}while(0);c[10878]=aL;c[8306]=0;uE(r|0,0,48);r=c[8270]|0;do{if((r|0)!=0){if((aY(r|0,139696)|0)==0){break}bA(4,r|0)}}while(0);r=s|0;aL=eC(r,7)|0;L8714:do{if((aL|0)==-1){aO=0}else{aN=q|0;aM=s+8|0;aH=0;aD=aL;while(1){aJ=c[8718]|0;if((c[8306]|0)>=(aJ|0)){ay=(aJ*3&-1|0)/2&-1;c[8718]=ay;aJ=aa(c[8304]|0,ay);if((aJ|0)<1){F=6420;break}ay=db(c[10636]|0,aJ<<3,215008)|0;c[10636]=ay;if((ay|0)==0){F=6711;break}ay=c[8718]|0;if((ay|0)<1){F=6423;break}aJ=db(c[10634]|0,ay<<3,215008)|0;c[10634]=aJ;if((aJ|0)==0){F=6714;break}aJ=c[8718]|0;if((aJ|0)<1){F=6426;break}ay=db(c[10878]|0,aJ<<3,215008)|0;c[10878]=ay;if((ay|0)==0){F=6716;break}ay=c[m>>2]|0;aJ=c[8718]|0;cf(ay|0,127672,(v=i,i=i+8|0,c[v>>2]=aJ,v)|0)}if((aD|0)==1){h[aM>>3]=+h[r>>3];h[r>>3]=+(c[11942]|0);F=6434}else if((aD|0)==(-5|0)|(aD|0)==(-2|0)|(aD|0)==(-3|0)|(aD|0)==(-4|0)){aP=aH}else if((aD|0)==0){F=6432;break}else{F=6434}L8729:do{if((F|0)==6434){F=0;aJ=aH+1|0;ay=c[8304]|0;L8731:do{if((ay|0)>0){aE=aa(ay,c[8306]|0);aC=c[10636]|0;av=0;while(1){aR=c[42584+(av<<2)>>2]|0;l=c[64648+(aR*688&-1)>>2]|0;if((l&1|0)==0){if(+h[s+(av<<3)>>3]<+h[64664+(aR*688&-1)>>3]){F=6438;break}}aw=+h[s+(av<<3)>>3];if((l&2|0)==0){if(aw>+h[64672+(aR*688&-1)>>3]){F=6441;break}}h[aC+(aE+av<<3)>>3]=aw;l=av+1|0;if((l|0)<(ay|0)){av=l}else{aS=l;break L8731}}if((F|0)==6441){F=0;av=q+(aR<<2)|0;c[av>>2]=(c[av>>2]|0)+1;aP=aJ;break L8729}else if((F|0)==6438){F=0;av=q+(aR<<2)|0;c[av>>2]=(c[av>>2]|0)+1;aP=aJ;break L8729}}else{aS=0}}while(0);ay=c[16162]|0;do{if((ay&1|0)==0){if(+h[s+(aS<<3)>>3]>=+h[8083]){break}c[aN>>2]=(c[aN>>2]|0)+1;aP=aJ;break L8729}}while(0);aw=+h[s+(aS<<3)>>3];if((ay&2|0)==0&aw>+h[8084]){c[aN>>2]=(c[aN>>2]|0)+1;aP=aJ;break}av=c[8306]|0;h[(c[10634]|0)+(av<<3)>>3]=aw;if((c[13486]|0)>2){aU=+h[s+(aS+1<<3)>>3]}else{aU=1.0}c[8306]=av+1;h[(c[10878]|0)+(av<<3)>>3]=aU;aP=aJ}}while(0);aj=eC(r,7)|0;if((aj|0)==-1){aO=aP;break L8714}else{aH=aP;aD=aj}}if((F|0)==6423){c[10634]=0;ez();aW=c[8718]|0;aX=be(42289,128848,(v=i,i=i+8|0,c[v>>2]=aW,v)|0)|0;fb()}else if((F|0)==6420){c[10636]=0;ez();aW=c[8718]|0;aX=be(42289,128848,(v=i,i=i+8|0,c[v>>2]=aW,v)|0)|0;fb()}else if((F|0)==6426){c[10878]=0;ez();aW=c[8718]|0;aX=be(42289,128848,(v=i,i=i+8|0,c[v>>2]=aW,v)|0)|0;fb()}else if((F|0)==6711){ez();aW=c[8718]|0;aX=be(42289,128848,(v=i,i=i+8|0,c[v>>2]=aW,v)|0)|0;fb()}else if((F|0)==6714){ez();aW=c[8718]|0;aX=be(42289,128848,(v=i,i=i+8|0,c[v>>2]=aW,v)|0)|0;fb()}else if((F|0)==6716){ez();aW=c[8718]|0;aX=be(42289,128848,(v=i,i=i+8|0,c[v>>2]=aW,v)|0)|0;fb()}else if((F|0)==6432){be(42289,126384,(v=i,i=i+8|0,c[v>>2]=c[11900],v)|0);fb()}}}while(0);ez();aW=c[8270]|0;do{if((aW|0)!=0){if((aY(aW|0,139696)|0)==0){break}bA(4,139696)}}while(0);aW=c[8306]|0;if((aW|0)<2){bD(125344,(v=i,i=i+8|0,c[v>>2]=aO,v)|0);aO=0;do{aX=c[42584+(aO<<2)>>2]|0;aP=c[q+(aX<<2)>>2]|0;do{if((aP|0)!=0){if((aO|0)<5){aZ=55600+(aO*51&-1)|0}else{aZ=77416}bD(124088,(v=i,i=i+16|0,c[v>>2]=aP,c[v+8>>2]=aZ,v)|0);r=64648+(aX*688&-1)|0;if((c[r>>2]&1|0)==0){aU=+h[64664+(aX*688&-1)>>3];bD(121384,(v=i,i=i+8|0,h[v>>3]=aU,v)|0)}else{bD(122672,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[r>>2]&2|0)==0){aU=+h[64672+(aX*688&-1)>>3];bD(116464,(v=i,i=i+8|0,h[v>>3]=aU,v)|0);break}else{bJ(14192);break}}}while(0);aO=aO+1|0;}while((aO|0)<6);uD(42289,115544,16);fb()}aO=aa(c[8304]|0,aW);do{if((aO|0)<1){c[10636]=0;a_=aW;F=6471}else{aZ=db(c[10636]|0,aO<<3,215008)|0;q=c[8306]|0;c[10636]=aZ;if((q|0)>=1){a_=q;F=6471;break}c[10634]=0;a$=0;a0=q}}while(0);do{if((F|0)==6471){aO=db(c[10634]|0,a_<<3,215008)|0;aW=c[8306]|0;c[10634]=aO;if((aW|0)<1){a$=0;a0=aW;break}aO=db(c[10878]|0,aW<<3,215008)|0;a$=aO;a0=c[8306]|0}}while(0);c[10878]=a$;cf(c[8762]|0,114744,(v=i,i=i+8|0,c[v>>2]=a0,v)|0);if((c[13486]|0)<3){a0=c[8762]|0;aI(113544,54,1,a0|0)}a0=H-1|0;H=c[1054]|0;a$=(c[H+(a0*40&-1)+36>>2]|0)+(c[H+(a0*40&-1)+32>>2]|0)|0;a0=db(0,(a$+1|0)-(c[H+(ag*40&-1)+32>>2]|0)|0,116456)|0;H=c[(c[1054]|0)+(ag*40&-1)+32>>2]|0;L8802:do{if((H|0)<(a$|0)){ag=H;a_=a0;while(1){aO=a[(c[10036]|0)+ag|0]|0;if(aO<<24>>24==0){a2=a_;break L8802}aW=a_+1|0;a[a_]=aO;aO=ag+1|0;if((aO|0)<(a$|0)){ag=aO;a_=aW}else{a2=aW;break}}}else{a2=a0}}while(0);a[a2]=0;cf(c[8762]|0,108456,(v=i,i=i+8|0,c[v>>2]=a0,v)|0);uu(a0);c[8714]=32;a0=c[13898]|0;a2=a0+1|0;c[13898]=a2;if((c[8272]|0)<=(a0|0)){uf(a2,106560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}a$=c[1054]|0;if((a[a$+(a0*40&-1)|0]&1)==0){uf(a2,106560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}H=c[a$+(a0*40&-1)+36>>2]|0;a_=a$+(a0*40&-1)+32|0;a0=c[10036]|0;a$=0;while(1){if((a$|0)>=(H|0)){break}if((a[a0+((c[a_>>2]|0)+a$|0)|0]|0)==(a[a$+107456|0]|0)){a$=a$+1|0}else{F=6705;break}}if((F|0)==6705){uf(a2,106560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a$|0)!=3){uf(a2,106560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}a2=ut(256)|0;do{if((a2|0)==0){gk();a$=ut(256)|0;if((a$|0)!=0){a3=a$;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0)}else{a3=a2}}while(0);a2=((c[8714]|0)*51&-1)+51|0;c[18130]=a3;a3=ut(a2)|0;do{if((a3|0)==0){gk();a$=ut(a2)|0;if((a$|0)!=0){a4=a$;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=105592,v)|0)}else{a4=a3}}while(0);c[8236]=a4;c[8302]=0;a4=c[13898]|0;a3=c[1054]|0;a2=(a[a3+(a4*40&-1)|0]&1)==0;if(a2){F=6493}else{a$=a[(c[10036]|0)+(c[a3+(a4*40&-1)+32>>2]|0)|0]|0;if((a$<<24>>24|0)==39|(a$<<24>>24|0)==34){F=6503}else{F=6493}}L8832:do{if((F|0)==6493){a$=c[10810]|0;L8834:do{if((a$|0)!=0){a_=c[8272]|0;a0=a3+(a4*40&-1)+36|0;H=a3+(a4*40&-1)+32|0;ag=c[10036]|0;aW=a$;L8836:while(1){aO=c[aW+4>>2]|0;L8838:do{if(!((a_|0)<=(a4|0)|a2)){q=c[a0>>2]|0;aZ=0;while(1){if((aZ|0)>=(q|0)){break}if((a[ag+((c[H>>2]|0)+aZ|0)|0]|0)==(a[aO+aZ|0]|0)){aZ=aZ+1|0}else{break L8838}}if((a[aO+aZ|0]|0)==0){break L8836}}}while(0);aO=c[aW>>2]|0;if((aO|0)==0){break L8834}else{aW=aO}}if((a[aW+8|0]&1)!=0){break}if((c[aW+16>>2]|0)==3){F=6503;break L8832}}}while(0);a$=c[8762]|0;aI(99808,60,1,a$|0);a$=c[13898]|0;H=c[1054]|0;L8848:while(1){if((a[H+(a$*40&-1)|0]&1)==0){F=6725;break}ag=(bO(d[(c[10036]|0)+(c[H+(a$*40&-1)+32>>2]|0)|0]|0|0)|0)==0;a0=c[1054]|0;if(ag){if((a[(c[10036]|0)+(c[a0+(a$*40&-1)+32>>2]|0)|0]|0)!=95){F=6726;break}}ag=(c[8236]|0)+((c[8302]|0)*51&-1)|0;a_=c[13898]|0;aO=c[a0+(a_*40&-1)+32>>2]|0;aJ=c[a0+(a_*40&-1)+36>>2]|0;a_=((aJ|0)>50?50:aJ)+aO|0;L8854:do{if((aO|0)<(a_|0)){aJ=ag;a0=aO;while(1){ay=a[(c[10036]|0)+a0|0]|0;if(ay<<24>>24==0){a5=aJ;break L8854}q=aJ+1|0;a[aJ]=ay;ay=a0+1|0;if((ay|0)<(a_|0)){aJ=q;a0=ay}else{a5=q;break}}}else{a5=ag}}while(0);a[a5]=0;ag=c[8302]|0;a_=c[8714]|0;if((ag|0)<(a_|0)){a7=ag;a9=c[8236]|0}else{ag=a_*3&-1;a_=(ag|0)/2&-1;c[8714]=a_;if((ag|0)<2){F=6577;break}ag=db(c[18130]|0,a_<<3,215008)|0;c[18130]=ag;if((ag|0)==0){F=6728;break}ag=db(c[8236]|0,((c[8714]|0)*51&-1)+51|0,101064)|0;a_=ag;c[8236]=a_;if((ag|0)==0){F=6729;break}a7=c[8302]|0;a9=a_}a_=a9+(a7*51&-1)|0;ag=43240;while(1){ba=c[ag>>2]|0;if((ba|0)==0){F=6592;break}if((aY(a_|0,c[ba+4>>2]|0)|0)==0){F=6585;break}else{ag=ba|0}}do{if((F|0)==6585){F=0;ag=ba+8|0;if((a[ag]&1)!=0){a[ag]=0;c[ba+16>>2]=2;h[ba+24>>3]=1.0;h[ba+32>>3]=0.0;bb=1.0;break}ag=ba+16|0;aO=c[ag>>2]|0;if((aO|0)==2){bb=+h[ba+24>>3];break}else if((aO|0)==1){aU=+(c[ba+24>>2]|0);c[ag>>2]=2;h[ba+24>>3]=aU;h[ba+32>>3]=0.0;bb=aU;break}else if((aO|0)==3){bb=+uz(c[ba+24>>2]|0,0);break}else{F=6591;break L8848}}else if((F|0)==6592){F=0;aO=e6(a_)|0;c[aO+16>>2]=2;h[aO+24>>3]=1.0;h[aO+32>>3]=0.0;a[aO+8|0]=0;bb=1.0}}while(0);a_=c[8302]|0;h[(c[18130]|0)+(a_<<3)>>3]=bb;aO=a_+1|0;c[8302]=aO;a_=c[13898]|0;ag=a_+1|0;c[13898]=ag;if((c[8272]|0)<=(ag|0)){bc=aO;break L8832}aW=c[1054]|0;if((a[aW+(ag*40&-1)|0]&1)==0){bc=aO;break L8832}a0=c[aW+(ag*40&-1)+36>>2]|0;aJ=aW+(ag*40&-1)+32|0;ag=c[10036]|0;q=0;while(1){if((q|0)>=(a0|0)){break}if((a[ag+((c[aJ>>2]|0)+q|0)|0]|0)==(a[q+148464|0]|0)){q=q+1|0}else{bc=aO;break L8832}}if((q|0)!=1){bc=aO;break L8832}aJ=a_+2|0;c[13898]=aJ;if((aJ|0)==0){bc=aO;break L8832}else{a$=aJ;H=aW}}if((F|0)==6725){uD(42289,99416,23);fb()}else if((F|0)==6726){uD(42289,99416,23);fb()}else if((F|0)==6728){uD(42289,100336,43);fb()}else if((F|0)==6729){uD(42289,100336,43);fb()}else if((F|0)==6591){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((F|0)==6577){c[18130]=0;uD(42289,100336,43);fb()}}}while(0);if((F|0)==6503){uu(c[10644]|0);ba=c[13898]|0;L8897:do{if((ba|0)<(c[8272]|0)){a7=c[1054]|0;L8899:do{if((a[a7+(ba*40&-1)|0]&1)!=0){a9=c[a7+(ba*40&-1)+36>>2]|0;a5=a7+(ba*40&-1)+32|0;a2=c[10036]|0;a4=0;while(1){if((a4|0)>=(a9|0)){break}if((a[a2+((c[a5>>2]|0)+a4|0)|0]|0)==(a[a4+103664|0]|0)){a4=a4+1|0}else{break L8899}}if((a4|0)==1){bd=0;break L8897}}}while(0);a[14176]=1;is(g);a[14176]=0;if((c[g>>2]|0)==3){bd=c[g+8>>2]|0;break}else{c[13898]=ba;bd=0;break}}else{bd=0}}while(0);c[10644]=bd;ba=c[8762]|0;cf(ba|0,104576,(v=i,i=i+8|0,c[v>>2]=bd,v)|0);bd=hA(c[10644]|0,193632)|0;if((bd|0)==0){ba=c[10644]|0;be(42289,104048,(v=i,i=i+8|0,c[v>>2]=ba,v)|0);fb()}ba=x|0;L8913:do{if((a6(ba|0,1025,bd|0)|0)!=0){x=0;L8914:while(1){L8916:while(1){g=aQ(ba|0,221168)|0;if((g|0)==0){bf=0}else{a[g]=0;g=c[8762]|0;cf(g|0,103672,(v=i,i=i+8|0,c[v>>2]=ba,v)|0);bf=1}g=a8(ba|0,35)|0;if((g|0)==0){bg=ba}else{a[g]=0;bg=ba}while(1){g=a[bg]|0;if((g<<24>>24|0)==35|(g<<24>>24|0)==0){break}else if(!((g<<24>>24|0)==32|(g<<24>>24|0)==9|(g<<24>>24|0)==10)){bh=ba;break L8916}bg=bg+1|0}if((a6(ba|0,1025,bd|0)|0)==0){break L8913}}while(1){a4=a[bh]|0;if((a4<<24>>24|0)==10|(a4<<24>>24|0)==0){bi=0;bj=ba;bk=x;break}else if(!((a4<<24>>24|0)==32|(a4<<24>>24|0)==9|(a4<<24>>24|0)==61)){F=6525;break}bh=bh+1|0}if((F|0)==6525){F=0;a4=cy(bh|0,213208)|0;if((a4|0)==0){bl=bh+(uA(bh|0)|0)|0}else{bl=a4}a4=a[bl]|0;a[bl]=0;bi=bh;bj=bl+1|0;bk=a4}a4=a[bi]|0;if(a4<<24>>24!=0){g=bi;a7=a4;do{if((bs(a7&255|0)|0)==0){if((a[g]|0)!=95){F=6720;break L8914}}g=g+1|0;a7=a[g]|0;}while(a7<<24>>24!=0)}if((uA(bi|0)|0)>>>0>50){F=6719;break}a7=c[8302]|0;g=c[8236]|0;uF(g+(a7*51&-1)|0,bi|0,51);if((uA(bi|0)|0)>>>0>=51){a[g+(a7*51&-1)+50|0]=0}if(bk<<24>>24==61){bm=bj}else{a7=a8(bj|0,61)|0;if((a7|0)==0){F=6538;break}bm=a7+1|0}a7=bm;while(1){g=a[a7]|0;if((g<<24>>24|0)==10|(g<<24>>24|0)==0){bn=0;bo=bm;bp=bk;break}else if(!((g<<24>>24|0)==32|(g<<24>>24|0)==9|(g<<24>>24|0)==61)){F=6543;break}a7=a7+1|0}if((F|0)==6543){F=0;g=cy(a7|0,213208)|0;if((g|0)==0){bq=a7+(uA(a7|0)|0)|0}else{bq=g}g=a[bq]|0;a[bq]=0;bn=a7;bo=bq+1|0;bp=g}if((ca(bn|0,148448,(v=i,i=i+8|0,c[v>>2]=w,v)|0)|0)!=1){F=6547;break}if(bf){bb=+h[w>>3];g=e6((c[8236]|0)+((c[8302]|0)*51&-1)|0)|0;c[g+16>>2]=2;c[g+20>>2]=br;h[g+24>>3]=bb;h[g+32>>3]=0.0;a[g+8|0]=0;bt=bo}else{g=c[8302]|0;a4=c[8714]|0;if((g|0)<(a4|0)){bu=g}else{g=a4*3&-1;a4=(g|0)/2&-1;c[8714]=a4;if((g|0)<2){F=6552;break}g=db(c[18130]|0,a4<<3,215008)|0;c[18130]=g;if((g|0)==0){F=6709;break}g=db(c[8236]|0,((c[8714]|0)*51&-1)+51|0,101064)|0;c[8236]=g;if((g|0)==0){F=6710;break}bu=c[8302]|0}bb=+h[w>>3];c[8302]=bu+1;h[(c[18130]|0)+(bu<<3)>>3]=bb;bt=bo}while(1){g=a[bt]|0;if((g<<24>>24|0)==10|(g<<24>>24|0)==0){bv=bp;break}else if(!((g<<24>>24|0)==32|(g<<24>>24|0)==9|(g<<24>>24|0)==61)){F=6560;break}bt=bt+1|0}if((F|0)==6560){F=0;a7=cy(bt|0,213208)|0;if((a7|0)==0){bw=bt+(uA(bt|0)|0)|0}else{bw=a7}a7=a[bw]|0;a[bw]=0;if((bt|0)==0){bv=a7}else{F=6564;break}}if((a6(ba|0,1025,bd|0)|0)==0){break L8913}else{x=bv}}if((F|0)==6709){bx=az(bd|0)|0;uD(42289,100336,43);fb()}else if((F|0)==6710){bx=az(bd|0)|0;uD(42289,100336,43);fb()}else if((F|0)==6719){by=az(bd|0)|0;uD(42289,101704,31);fb()}else if((F|0)==6720){by=az(bd|0)|0;uD(42289,101704,31);fb()}else if((F|0)==6552){c[18130]=0;bx=az(bd|0)|0;uD(42289,100336,43);fb()}else if((F|0)==6547){az(bd|0);uD(42289,101704,31);fb()}else if((F|0)==6564){az(bd|0);uD(42289,101704,31);fb()}else if((F|0)==6538){az(bd|0);uD(42289,101704,31);fb()}}}while(0);az(bd|0);bc=c[8302]|0}if((bc|0)<1){bz=0;bB=bc}else{bd=db(c[18130]|0,bc<<3,215008)|0;bz=bd;bB=c[8302]|0}c[18130]=bz;c[8236]=db(c[8236]|0,(bB*51&-1)+51|0,105592)|0;bB=c[8306]|0;bz=c[8302]|0;if((bB|0)<(bz|0)){uD(42289,98280,56);fb()}if((bz|0)>0){bd=c[18130]|0;bc=0;do{bx=bd+(bc<<3)|0;if(+h[bx>>3]==0.0){h[bx>>3]=1.0e-30}bc=bc+1|0;}while((bc|0)<(bz|0))}if((bz|0)==0){uh(-1,97624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{bc=c[18130]|0;h[e>>3]=1.0e+30;bd=hp(bz+bB|0,bz)|0;h[f>>3]=-1.0;aV(2,52);if((fh(bc,bd,e,f)|0)==1){uD(42289,96504,31);fb()}bb=+h[e>>3];aU=+h[f>>3];do{if((a[42560]&1)==0){bz=c[m>>2]|0;aw=bb-bb;if(bb>1.0e-30){bC=aw/bb}else{bC=0.0}au=+h[5479];cf(bz|0,224168,(v=i,i=i+56|0,c[v>>2]=0,h[v+8>>3]=bb,h[v+16>>3]=bC,h[v+24>>3]=aw,h[v+32>>3]=au,h[v+40>>3]=aU,c[v+48>>2]=222856,v)|0);if((c[8302]|0)>0){bE=0}else{bG=aw;break}while(1){au=+h[bc+(bE<<3)>>3];cf(bz|0,222224,(v=i,i=i+16|0,c[v>>2]=(c[8236]|0)+(bE*51&-1),h[v+8>>3]=au,v)|0);bB=bE+1|0;if((bB|0)<(c[8302]|0)){bE=bB}else{bG=aw;break}}}else{bG=bb-bb}}while(0);bE=c[8762]|0;if(bb>1.0e-30){bH=bG/bb}else{bH=0.0}bC=+h[5479];cf(bE|0,224168,(v=i,i=i+56|0,c[v>>2]=0,h[v+8>>3]=bb,h[v+16>>3]=bH,h[v+24>>3]=bG,h[v+32>>3]=bC,h[v+40>>3]=aU,c[v+48>>2]=222856,v)|0);if((c[8302]|0)>0){bz=0;do{bC=+h[bc+(bz<<3)>>3];cf(bE|0,222224,(v=i,i=i+16|0,c[v>>2]=(c[8236]|0)+(bz*51&-1),h[v+8>>3]=bC,v)|0);bz=bz+1|0;}while((bz|0)<(c[8302]|0))}bz=e6(96112)|0;a[bz+8|0]=0;c[bz+16>>2]=1;c[bz+24>>2]=0;a[1016]=0;bC=1.0e+30;bz=0;bE=2;bG=aU;L9027:while(1){if(a[51680]|0){aU=+h[e>>3];bB=c[m>>2]|0;bH=aU-bC;if(aU>1.0e-30){bI=bH/aU}else{bI=0.0}bb=+h[5479];bx=(bz|0)>0?223472:222856;cf(bB|0,224168,(v=i,i=i+56|0,c[v>>2]=bz,h[v+8>>3]=aU,h[v+16>>3]=bI,h[v+24>>3]=bH,h[v+32>>3]=bb,h[v+40>>3]=bG,c[v+48>>2]=bx,v)|0);if((c[8302]|0)>0){bx=0;do{bb=+h[bc+(bx<<3)>>3];cf(bB|0,222224,(v=i,i=i+16|0,c[v>>2]=(c[8236]|0)+(bx*51&-1),h[v+8>>3]=bb,v)|0);bx=bx+1|0;}while((bx|0)<(c[8302]|0))}a[51680]=0;while(1){aI(74040,49,1,c[m>>2]|0);bx=a1(c[o>>2]|0)|0;if((bx|0)==99|(bx|0)==67){break}else if((bx|0)==(-1|0)|(bx|0)==115|(bx|0)==83){F=6637;break L9027}else if(!((bx|0)==101|(bx|0)==69)){continue}bx=c[10638]|0;bB=(bx|0)!=0?bx:136352;cf(c[m>>2]|0,72672,(v=i,i=i+8|0,c[v>>2]=bB,v)|0);if((c[8302]|0)>0){bx=0;do{bb=+h[(c[18130]|0)+(bx<<3)>>3];by=e6((c[8236]|0)+(bx*51&-1)|0)|0;c[by+16>>2]=2;h[by+24>>3]=bb;h[by+32>>3]=0.0;a[by+8|0]=0;bx=bx+1|0;}while((bx|0)<(c[8302]|0))}if((bB|0)==0){bK=0}else{bK=bP(bB|0)|0}dL(bK)}aI(73232,9,1,c[m>>2]|0)}if((bE|0)==2){bL=+h[e>>3];bM=bz+1|0}else{bL=bC;bM=bz}bx=fh(bc,bd,e,f)|0;if((bx|0)==1){bN=bL;bQ=bM;bR=1;break}else if((bx|0)==2){do{if((a[42560]&1)==0){bb=+h[e>>3];bH=+h[f>>3];by=c[m>>2]|0;aU=bb-bL;if(bb>1.0e-30){bS=aU/bb}else{bS=0.0}aw=+h[5479];bv=(bM|0)>0?223472:222856;cf(by|0,224168,(v=i,i=i+56|0,c[v>>2]=bM,h[v+8>>3]=bb,h[v+16>>3]=bS,h[v+24>>3]=aU,h[v+32>>3]=aw,h[v+40>>3]=bH,c[v+48>>2]=bv,v)|0);if((c[8302]|0)>0){bT=0}else{bV=bH;break}while(1){aw=+h[bc+(bT<<3)>>3];cf(by|0,222224,(v=i,i=i+16|0,c[v>>2]=(c[8236]|0)+(bT*51&-1),h[v+8>>3]=aw,v)|0);bv=bT+1|0;if((bv|0)<(c[8302]|0)){bT=bv}else{bV=bH;break}}}else{bV=+h[f>>3]}}while(0);if(bV<1.0e20){bW=bV}else{bN=bL;bQ=bM;bR=2;break}}else{bH=+h[f>>3];if(bH<1.0e20){bW=bH}else{bN=bL;bQ=bM;bR=bx;break}}by=c[8708]|0;if((by|0)!=0&(bM|0)>(by|0)){bN=bL;bQ=bM;bR=bx;break}if((bx|0)==3){bC=bL;bz=bM;bE=3;bG=bW;continue}bH=+h[e>>3];aw=bL-bH;if(bH>1.0e-30){bX=aw/bH}else{bX=aw}if(bX>+h[5479]){bC=bL;bz=bM;bE=bx;bG=bW}else{bN=bL;bQ=bM;bR=bx;break}}if((F|0)==6637){bM=c[m>>2]|0;aI(73744,5,1,bM|0);a[1016]=1;bN=bC;bQ=bz;bR=bE}aV(2,4);aV(13,1);bE=c[8708]|0;do{if((bE|0)>0&(bQ|0)>(bE|0)){fe(95552,(v=i,i=i+8|0,c[v>>2]=bE,v)|0)}else{if(a[1016]|0){fe(95160,(v=i,i=i+8|0,c[v>>2]=bQ,v)|0);break}else{fe(94448,(v=i,i=i+8|0,c[v>>2]=bQ,v)|0);bz=e6(96112)|0;a[bz+8|0]=0;c[bz+16>>2]=1;c[bz+24>>2]=1;break}}}while(0);bC=+h[e>>3];fe(93944,(v=i,i=i+8|0,h[v>>3]=bC,v)|0);bL=bC-bN;if(bC>1.0e-30){fe(93376,(v=i,i=i+8|0,h[v>>3]=bL/bC,v)|0)}else{fe(92448,(v=i,i=i+8|0,h[v>>3]=bL,v)|0)}if((bR|0)==1){uD(42289,96504,31);fb()}bR=c[8302]|0;if((a[42568]&1)!=0&(bR|0)>0){bQ=0;while(1){fi((c[8236]|0)+(bQ*51&-1)|0,0.0);bE=bQ+1|0;bz=c[8302]|0;if((bE|0)<(bz|0)){bQ=bE}else{bY=bz;break}}}else{bY=bR}bR=c[8306]|0;L9092:do{if((bR|0)==(bY|0)){fe(91680,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);fe(90880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);fe(90496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);fe(89976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);bQ=c[8302]|0;if((bQ|0)>0){bZ=0}else{b_=bQ;break}while(1){bL=+h[bc+(bZ<<3)>>3];fe(89304,(v=i,i=i+16|0,c[v>>2]=(c[8236]|0)+(bZ*51&-1),h[v+8>>3]=bL,v)|0);bQ=bZ+1|0;bz=c[8302]|0;if((bQ|0)<(bz|0)){bZ=bQ}else{b_=bz;break}}}else{if(bC<1.0e-30){fe(88552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);fe(90496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);fe(89976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);bx=c[8302]|0;if((bx|0)>0){b$=0}else{b_=bx;break}while(1){bL=+h[bc+(b$<<3)>>3];fe(89304,(v=i,i=i+16|0,c[v>>2]=(c[8236]|0)+(b$*51&-1),h[v+8>>3]=bL,v)|0);bx=b$+1|0;bz=c[8302]|0;if((bx|0)<(bz|0)){b$=bx}else{b_=bz;break L9092}}}bz=bR-bY|0;bL=bC/+(bz|0);bN=+Q(+bL);fe(87584,(v=i,i=i+8|0,c[v>>2]=bz,v)|0);fe(86752,(v=i,i=i+8|0,h[v>>3]=bN,v)|0);fe(85792,(v=i,i=i+8|0,h[v>>3]=bL,v)|0);bx=e6(84600)|0;a[bx+8|0]=0;c[bx+16>>2]=1;c[bx+24>>2]=bz;bz=e6(84088)|0;a[bz+8|0]=0;c[bz+16>>2]=2;h[bz+24>>3]=bN;h[bz+32>>3]=0.0;bz=e6(83096)|0;a[bz+8|0]=0;c[bz+16>>2]=2;h[bz+24>>3]=bC;h[bz+32>>3]=0.0;hr(bd,0,0,0,c[8306]|0,c[8302]|0,0);bz=c[8306]|0;hs(bd,bd+(bz<<2)|0,c[8302]|0);bx=c[8302]|0;do{if((bx|0)<1){b0=bx;b1=0;b2=0}else{bQ=bx<<3;bE=ut(bQ)|0;do{if((bE|0)==0){gk();bM=ut(bQ)|0;if((bM|0)!=0){b3=bM;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0)}else{b3=bE}}while(0);bE=b3;bQ=c[8302]|0;if((bQ|0)>0){b4=0}else{b0=bQ;b1=0;b2=bE;break}while(1){bN=+h[(c[bd+(b4+bz<<2)>>2]|0)+(b4<<3)>>3];if(bN<=0.0){F=6678;break}h[bE+(b4<<3)>>3]=+Q(+bN);bM=b4+1|0;if((bM|0)<(bQ|0)){b4=bM}else{b5=0;break}}if((F|0)==6678){uD(42289,81952,66);fb()}while(1){bM=bE+(b5<<3)|0;bT=bd+(b5+bz<<2)|0;bK=0;do{by=(c[bT>>2]|0)+(bK<<3)|0;h[by>>3]=+h[by>>3]/(+h[bM>>3]*+h[bE+(bK<<3)>>3]);bK=bK+1|0;}while((bK|0)<=(b5|0));bK=b5+1|0;if((bK|0)<(bQ|0)){b5=bK}else{b0=bQ;b1=1;b2=bE;break}}}}while(0);bN=+Q(+(bC/+((c[8306]|0)-b0|0)));h[e>>3]=bN;if(b1){bx=0;do{bE=b2+(bx<<3)|0;h[bE>>3]=bN*+h[bE>>3];bx=bx+1|0;}while((bx|0)<(b0|0))}fe(80552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);fe(79488,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);if((c[8302]|0)>0){bx=0;do{bN=+h[bc+(bx<<3)>>3];bE=+P(+bN)<1.0e-30;bQ=b2+(bx<<3)|0;bL=+h[bQ>>3];if(bE){b6=0.0}else{b6=+P(+(bL*100.0/bN))}fe(78752,(v=i,i=i+40|0,c[v>>2]=(c[8236]|0)+(bx*51&-1),h[v+8>>3]=bN,c[v+16>>2]=78264,h[v+24>>3]=bL,h[v+32>>3]=b6,v)|0);if((a[42568]&1)!=0){fi((c[8236]|0)+(bx*51&-1)|0,+h[bQ>>3])}bx=bx+1|0;}while((bx|0)<(c[8302]|0))}fe(77728,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);fe(77224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);if((c[8302]|0)>0){bx=0;do{fe(76616,(v=i,i=i+8|0,c[v>>2]=(c[8236]|0)+(bx*51&-1),v)|0);bx=bx+1|0;}while((bx|0)<(c[8302]|0))}fe(140136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);if((c[8302]|0)>0){bx=0;do{fe(75944,(v=i,i=i+8|0,c[v>>2]=(c[8236]|0)+(bx*51&-1),v)|0);bQ=bd+(bx+bz<<2)|0;bE=0;do{fe(75392,(v=i,i=i+8|0,h[v>>3]=+h[(c[bQ>>2]|0)+(bE<<3)>>3],v)|0);bE=bE+1|0;}while((bE|0)<=(bx|0));fe(140136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);bx=bx+1|0;}while((bx|0)<(c[8302]|0))}uu(b2);b_=c[8302]|0}}while(0);b2=b_-1|0;b6=+h[bc+(b2<<3)>>3];b_=e6((c[8236]|0)+(b2*51&-1)|0)|0;c[b_+16>>2]=2;h[b_+24>>3]=b6;h[b_+32>>3]=0.0;a[b_+8|0]=0;h[f>>3]=-2.0;fh(bc,bd,e,f);uu(c[bd>>2]|0);uu(bd)}az(c[8762]|0);c[8762]=0;uu(c[10636]|0);uu(c[10634]|0);uu(c[10878]|0);uu(c[18130]|0);uu(c[8236]|0);bd=c[10062]|0;if((bd|0)!=0){e1(bd);c[10062]=0}bd=c[10036]|0;uF(35352,bd|0,512);if((uA(bd|0)|0)>>>0<512){i=b;return}a[35863]=0;i=b;return}function fe(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e|0;g=f|0;h=f;c[h>>2]=d;c[h+4>>2]=0;if((a[42560]&1)==0){f=c[m>>2]|0;bX(f|0,b|0,g|0)}c[h>>2]=d;c[h+4>>2]=0;bX(c[8762]|0,b|0,g|0);i=e;return}function ff(b){b=b|0;aV(2,52);a[51680]=1;return}function fg(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;d=c[10568]|0;if((d|0)!=0){e=bP(d|0)|0;i=b;return e|0}d=bU(236952)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}f=a[d+((uA(d|0)|0)-1|0)|0]|0;if(!((f<<24>>24|0)==47|(f<<24>>24|0)==92)){e=bP(d|0)|0;i=b;return e|0}f=(uA(d|0)|0)+8|0;g=ut(f)|0;do{if((g|0)==0){gk();h=ut(f)|0;if((h|0)!=0){j=h;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=97072,v)|0);return 0}else{j=g}}while(0);uB(j|0,d|0);g=j+(uA(j|0)|0)|0;f=g|0;w=779381094;a[f]=w&255;w=w>>8;a[f+1|0]=w&255;w=w>>8;a[f+2|0]=w&255;w=w>>8;a[f+3|0]=w&255;f=g+4|0;w=6778732;a[f]=w&255;w=w>>8;a[f+1|0]=w&255;w=w>>8;a[f+2|0]=w&255;w=w>>8;a[f+3|0]=w&255;e=j;i=b;return e|0}}while(0);e=bP(42264)|0;i=b;return e|0}function fh(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0.0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0.0,A=0.0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,R=0,S=0,T=0.0,U=0,V=0.0,W=0.0,X=0.0,Y=0;g=i;i=i+8|0;j=g|0;k=+h[f>>3];if(k!=-1.0){if(k==-2.0){uu(c[8730]|0);uu(c[8720]|0);uu(c[8728]|0);uu(c[8724]|0);uu(c[8726]|0);l=c[8722]|0;uu(c[l>>2]|0);uu(l);n=0;i=g;return n|0}l=c[8306]|0;o=c[8302]|0;if((o+l|0)>0){p=0;q=o;while(1){uD(c[(c[8722]|0)+(p<<2)>>2]|0,c[d+(p<<2)>>2]|0,q<<3);o=p+1|0;r=c[8306]|0;s=c[8302]|0;if((o|0)<(s+r|0)){p=o;q=s}else{t=r;break}}}else{t=l}uD(c[8720]|0,c[8730]|0,t<<3);t=c[8302]|0;if((t|0)>0){l=c[8306]|0;q=c[8722]|0;p=c[8720]|0;r=0;while(1){s=l+r|0;h[(c[q+(s<<2)>>2]|0)+(r<<3)>>3]=+h[f>>3];h[p+(s<<3)>>3]=0.0;s=r+1|0;if((s|0)<(t|0)){r=s}else{u=q;w=p;x=l;break}}}else{u=c[8722]|0;w=c[8720]|0;x=c[8306]|0}hr(u,w,c[8728]|0,c[8726]|0,x+t|0,t,1);t=c[8302]|0;if((t|0)>0){x=c[8728]|0;w=c[8724]|0;u=0;while(1){h[w+(u<<3)>>3]=+h[b+(u<<3)>>3]+ +h[x+(u<<3)>>3];l=u+1|0;if((l|0)<(t|0)){u=l}else{y=w;break}}}else{y=c[8724]|0}fj(y,c[8722]|0,c[8720]|0,j);k=+h[j>>3];if(k>=+h[e>>3]){if((a[42560]&1)==0){j=c[m>>2]|0;aF(42,j|0)}h[f>>3]=+h[4484]*+h[f>>3];n=3;i=g;return n|0}z=+h[f>>3];if(z>1.0e-20){if((a[42560]&1)==0){j=c[m>>2]|0;aF(47,j|0);A=+h[f>>3]}else{A=z}h[f>>3]=A/+h[4485]}h[e>>3]=k;if((c[8306]|0)>0){j=0;do{uD(c[d+(j<<2)>>2]|0,c[(c[8722]|0)+(j<<2)>>2]|0,c[8302]<<3);h[(c[8730]|0)+(j<<3)>>3]=+h[(c[8720]|0)+(j<<3)>>3];j=j+1|0;}while((j|0)<(c[8306]|0))}j=c[8302]|0;if((j|0)<=0){n=2;i=g;return n|0}y=c[8724]|0;w=0;while(1){h[b+(w<<3)>>3]=+h[y+(w<<3)>>3];u=w+1|0;if((u|0)<(j|0)){w=u}else{n=2;break}}i=g;return n|0}w=c[8302]|0;if((w|0)<1){B=0;C=w}else{j=w<<3;w=ut(j)|0;do{if((w|0)==0){gk();y=ut(j)|0;if((y|0)!=0){D=y;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0);return 0}else{D=w}}while(0);B=D;C=c[8302]|0}c[8724]=B;B=c[8306]|0;D=C+B|0;if((D|0)<1){E=0;F=B;G=C}else{C=D<<3;D=ut(C)|0;do{if((D|0)==0){gk();B=ut(C)|0;if((B|0)!=0){H=B;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0);return 0}else{H=D}}while(0);E=H;F=c[8306]|0;G=c[8302]|0}c[8730]=E;E=G+F|0;if((E|0)<1){I=0;J=G}else{G=E<<3;E=ut(G)|0;do{if((E|0)==0){gk();F=ut(G)|0;if((F|0)!=0){K=F;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0);return 0}else{K=E}}while(0);I=K;J=c[8302]|0}c[8720]=I;if((J|0)<1){L=0;M=J}else{I=J<<3;J=ut(I)|0;do{if((J|0)==0){gk();K=ut(I)|0;if((K|0)!=0){N=K;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0);return 0}else{N=J}}while(0);L=N;M=c[8302]|0}c[8728]=L;L=c[8306]|0;N=M+L|0;if((N|0)<1){O=0;P=L;R=M}else{M=N<<3;N=ut(M)|0;do{if((N|0)==0){gk();L=ut(M)|0;if((L|0)!=0){S=L;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0);return 0}else{S=N}}while(0);O=S;P=c[8306]|0;R=c[8302]|0}c[8726]=O;c[8722]=hp(R+P|0,R)|0;fj(b,d,c[8730]|0,e);k=+h[1782];if(k!=0.0){T=k;U=c[8302]|0}else{h[f>>3]=0.0;e=c[8306]|0;b=c[8302]|0;if((e|0)>0){R=0;k=0.0;while(1){if((b|0)>0){P=d+(R<<2)|0;O=0;A=k;while(1){z=+h[(c[P>>2]|0)+(O<<3)>>3];V=A+z*z;h[f>>3]=V;S=O+1|0;if((S|0)<(b|0)){O=S;A=V}else{W=V;break}}}else{W=k}O=R+1|0;if((O|0)<(e|0)){R=O;k=W}else{X=W;break}}}else{X=0.0}T=+Q(+(X/+(e|0)/+(b|0)));U=b}h[f>>3]=T;if((U|0)>0){Y=0}else{n=0;i=g;return n|0}while(1){if((Y|0)>0){f=c[8306]|0;b=0;do{h[(c[d+(f+Y<<2)>>2]|0)+(b<<3)>>3]=0.0;h[(c[d+(f+b<<2)>>2]|0)+(Y<<3)>>3]=0.0;b=b+1|0;}while((b|0)<(Y|0))}b=Y+1|0;if((b|0)<(U|0)){Y=b}else{n=0;break}}i=g;return n|0}function fi(b,d){b=b|0;d=+d;var e=0,f=0,g=0,j=0,k=0;e=i;f=(uA(b|0)|0)+5|0;g=ut(f)|0;do{if((g|0)==0){gk();j=ut(f)|0;if((j|0)!=0){k=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=179864,v)|0)}else{k=g}}while(0);be(k|0,74544,(v=i,i=i+8|0,c[v>>2]=b,v)|0);b=e6(k)|0;c[b+16>>2]=2;h[b+24>>3]=d;h[b+32>>3]=0.0;a[b+8|0]=0;uu(k);i=e;return}function fj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0,t=0;f=i;h[e>>3]=0.0;g=c[8306]|0;if((g|0)<1){j=0}else{k=g<<3;g=ut(k)|0;do{if((g|0)==0){gk();l=ut(k)|0;if((l|0)!=0){m=l;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0)}else{m=g}}while(0);j=m}m=c[8302]|0;if((m|0)<1){n=0}else{g=m<<3;m=ut(g)|0;do{if((m|0)==0){gk();k=ut(g)|0;if((k|0)!=0){o=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0)}else{o=m}}while(0);n=o}o=n;fk(a,d);m=c[8302]|0;if((m|0)>0){g=0;while(1){h[n+(g<<3)>>3]=+h[a+(g<<3)>>3];k=g+1|0;if((k|0)<(m|0)){g=k}else{p=0;break}}do{g=a+(p<<3)|0;q=+h[g>>3];r=+P(+q)<1.0e-30?1.0e-30:q;m=n+(p<<3)|0;h[m>>3]=r*1.001;fk(n,j);k=c[8306]|0;if((k|0)>0){q=r*.001;l=0;do{h[(c[b+(l<<2)>>2]|0)+(p<<3)>>3]=(+h[j+(l<<3)>>3]- +h[d+(l<<3)>>3])/q;l=l+1|0;}while((l|0)<(k|0))}h[m>>3]=+h[g>>3];p=p+1|0;}while((p|0)<(c[8302]|0))}uu(j);uu(o);o=c[8306]|0;if((o|0)<=0){i=f;return}j=c[10634]|0;p=c[10878]|0;n=c[8302]|0;a=0;do{k=d+(a<<3)|0;l=p+(a<<3)|0;q=(+h[k>>3]- +h[j+(a<<3)>>3])/+h[l>>3];h[k>>3]=q;h[e>>3]=+h[e>>3]+q*q;if((n|0)>0){k=b+(a<<2)|0;s=0;do{t=(c[k>>2]|0)+(s<<3)|0;h[t>>3]=+h[t>>3]/+h[l>>3];s=s+1|0;}while((s|0)<(n|0))}a=a+1|0;}while((a|0)<(o|0));i=f;return}function fk(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0,r=0.0,s=0,t=0.0;e=i;i=i+24|0;f=e|0;if((c[8302]|0)>0){g=f|0;j=f+8|0;k=f+16|0;l=f;m=0;do{n=+h[b+(m<<3)>>3];c[g>>2]=2;h[j>>3]=n;h[k>>3]=0.0;o=e6((c[8236]|0)+(m*51&-1)|0)|0;p=o+16|0;c[p>>2]=c[l>>2];c[p+4>>2]=c[l+4>>2];c[p+8>>2]=c[l+8>>2];c[p+12>>2]=c[l+12>>2];c[p+16>>2]=c[l+16>>2];c[p+20>>2]=c[l+20>>2];a[o+8|0]=0;m=m+1|0;}while((m|0)<(c[8302]|0))}if((c[8306]|0)<=0){i=e;return}m=f|0;l=f+8|0;k=l;j=f+8|0;g=l;l=0;L9333:while(1){b=0;do{o=55600+(b*51&-1)|0;L9337:do{if((a[(e6(o)|0)+8|0]&1)==0){p=43240;while(1){q=c[p>>2]|0;if((q|0)==0){r=0.0;break L9337}if((aY(o|0,c[q+4>>2]|0)|0)==0){break}else{p=q|0}}p=c[q+16>>2]|0;if((p|0)==3){r=+uz(c[q+24>>2]|0,0);break}else if((p|0)==1){r=+(c[q+24>>2]|0);break}else if((p|0)==2){r=+h[q+24>>3];break}else{s=6863;break L9333}}else{r=0.0}}while(0);c[40264+(b*24&-1)>>2]=2;h[40272+(b*24&-1)>>3]=r;h[40280+(b*24&-1)>>3]=0.0;b=b+1|0;}while((b|0)<5);b=c[8304]|0;if((b|0)>0){o=c[10636]|0;p=0;do{n=+h[o+(aa(b,l)+p<<3)>>3];c[40264+(p*24&-1)>>2]=2;h[40272+(p*24&-1)>>3]=n;h[40280+(p*24&-1)>>3]=0.0;p=p+1|0;}while((p|0)<(b|0))}e4(c[10062]|0,f);if((a[1960]&1)!=0){s=6869;break}b=c[m>>2]|0;if((b|0)==2){t=+h[j>>3]}else if((b|0)==3){t=+uz(c[g>>2]|0,0)}else if((b|0)==1){t=+(c[k>>2]|0)}else{s=6874;break}h[d+(l<<3)>>3]=t;b=l+1|0;if((b|0)<(c[8306]|0)){l=b}else{s=6877;break}}if((s|0)==6869){uD(42289,221560,43);fb()}else if((s|0)==6874){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((s|0)==6877){i=e;return}else if((s|0)==6863){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function fl(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;f=i;i=i+32|0;g=f|0;h=f+16|0;j=c[a>>2]|0;k=c[b>>2]|0;l=c[13542]|0;if((l|0)==0){m=0;n=0;o=0}else{p=c[l>>2]|0;q=(p|0)>(j|0)&1;r=c[l+4>>2]|0;s=(r|0)<(j|0)?q|2:q;q=c[l+8>>2]|0;t=(q|0)>(k|0)?s|4:s;s=c[l+12>>2]|0;u=c[d>>2]|0;v=c[e>>2]|0;w=(p|0)>(u|0)&1;p=(r|0)<(u|0)?w|2:w;w=(q|0)>(v|0)?p|4:p;m=(s|0)<(v|0)?w|8:w;n=(s|0)<(k|0)?t|8:t;o=l}l=(n|0)!=0;t=l^1;s=(m|0)==0;if(s&t){x=1;i=f;return x|0}if((m&n|0)!=0){x=0;i=f;return x|0}n=c[d>>2]|0;m=n-j|0;w=c[e>>2]|0;v=w-k|0;do{if((w|0)==(k|0)){y=0;z=k}else{p=c[o+8>>2]|0;q=((aa(p-w|0,m)|0)/(v|0)&-1)+n|0;u=c[o>>2]|0;do{if((q|0)<(u|0)){A=0}else{if((q|0)>(c[o+4>>2]|0)){A=0;break}c[g>>2]=q;c[h>>2]=p;A=1}}while(0);p=o+12|0;q=n+((aa((c[p>>2]|0)-w|0,m)|0)/(v|0)&-1)|0;if((q|0)<(u|0)){y=A;z=w;break}if((q|0)>(c[o+4>>2]|0)){y=A;z=w;break}c[g+(A<<2)>>2]=q;c[h+(A<<2)>>2]=c[p>>2];y=A+1|0;z=w}}while(0);do{if((n|0)==(j|0)){B=y;C=j}else{w=c[o>>2]|0;A=z+((aa(w-n|0,v)|0)/(m|0)&-1)|0;p=o+8|0;q=c[p>>2]|0;do{if((A|0)<(q|0)){D=y;E=q}else{if((A|0)>(c[o+12>>2]|0)){D=y;E=q;break}c[g+(y<<2)>>2]=w;c[h+(y<<2)>>2]=A;D=y+1|0;E=c[p>>2]|0}}while(0);p=c[o+4>>2]|0;A=z+((aa(p-n|0,v)|0)/(m|0)&-1)|0;if((A|0)<(E|0)){B=D;C=n;break}if((A|0)>(c[o+12>>2]|0)){B=D;C=n;break}c[g+(D<<2)>>2]=p;c[h+(D<<2)>>2]=A;B=D+1|0;C=n}}while(0);if((B|0)<2){x=0;i=f;return x|0}B=(j|0)<(C|0);n=B?C:j;D=B?j:C;B=(k|0)<(z|0);o=B?z:k;E=B?k:z;L9395:do{if(s|t){B=c[g>>2]|0;if(l){y=aa(C-B|0,m);A=c[h>>2]|0;if((aa(z-A|0,v)+y|0)>0){c[a>>2]=B;c[b>>2]=A;break}else{c[a>>2]=c[g+4>>2];c[b>>2]=c[h+4>>2];break}}else{A=aa(B-j|0,m);y=c[h>>2]|0;if((aa(y-k|0,v)+A|0)>0){c[d>>2]=B;c[e>>2]=y;break}else{c[d>>2]=c[g+4>>2];c[e>>2]=c[h+4>>2];break}}}else{y=c[g+4>>2]|0;B=c[g>>2]|0;A=(aa(y-B|0,m)|0)<0;p=c[h+4>>2]|0;w=c[h>>2]|0;do{if(!A){if((aa(p-w|0,v)|0)<0){break}c[a>>2]=B;c[b>>2]=w;c[d>>2]=y;c[e>>2]=p;break L9395}}while(0);c[a>>2]=y;c[b>>2]=p;c[d>>2]=B;c[e>>2]=w}}while(0);v=c[a>>2]|0;if((v|0)<(D|0)|(v|0)>(n|0)){x=0;i=f;return x|0}v=c[d>>2]|0;if((v|0)<(D|0)|(v|0)>(n|0)){x=0;i=f;return x|0}n=c[b>>2]|0;if((n|0)<(E|0)|(n|0)>(o|0)){x=0;i=f;return x|0}else{x=c[e>>2]|0;i=f;return((x|0)<=(o|0)&(x|0)>=(E|0))<<31>>31|0}return 0}function fm(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=i;i=i+32|0;h=g|0;j=g+8|0;k=g+16|0;l=g+24|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;m=c[3524]|0;n=c[13542]|0;if((n|0)==0){o=1;p=f}else{q=c[n>>2]|0;r=(q|0)>(a|0)&1;s=c[n+4>>2]|0;t=(s|0)<(a|0)?r|2:r;r=c[n+8>>2]|0;a=(r|0)>(b|0)?t|4:t;t=c[n+12>>2]|0;n=(q|0)>(d|0)&1;q=(s|0)<(d|0)?n|2:n;n=(r|0)>(e|0)?q|4:q;o=(((t|0)<(e|0)?n|8:n)|0)==0;p=(((t|0)<(b|0)?a|8:a)|0)==0?f:f&-3}fl(h,j,k,l);cI[c[m+84>>2]&63](c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,o?p:p&-2);i=g;return}function fn(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0;e=i;i=i+104|0;f=e|0;g=e+16|0;j=e+32|0;k=e+48|0;l=c[b>>2]|0;if((l|0)==2){m=c[b+4>>2]|0;n=43280;while(1){o=c[n>>2]|0;if((o|0)==0){p=6930;break}if((c[o+4>>2]|0)==(m|0)){p=6928;break}else{n=o|0}}do{if((p|0)==6930){n=c[8798]|0;q=(n|0)>0;r=m;L9433:while(1){s=43264;while(1){t=c[s>>2]|0;if((t|0)==0){break}if((c[t+4>>2]|0)==(r|0)){break L9433}else{s=t|0}}u=r-1|0;if(!((r|0)>(n|0)&q)){p=6940;break}r=((u|0)%(n|0)&-1)+1|0}if((p|0)==6940){c[k+4>>2]=u;c[k+40>>2]=1;c[k+44>>2]=u;c[k+8>>2]=u;break}n=k;q=t+8|0;c[n>>2]=c[q>>2];c[n+4>>2]=c[q+4>>2];c[n+8>>2]=c[q+8>>2];c[n+12>>2]=c[q+12>>2];c[n+16>>2]=c[q+16>>2];c[n+20>>2]=c[q+20>>2];c[n+24>>2]=c[q+24>>2];c[n+28>>2]=c[q+28>>2];c[n+32>>2]=c[q+32>>2];c[n+36>>2]=c[q+36>>2];c[n+40>>2]=c[q+40>>2];c[n+44>>2]=c[q+44>>2];c[n+48>>2]=c[q+48>>2];c[n+52>>2]=c[q+52>>2];if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[k+4>>2]=r;a[k+32|0]=0;break}if((a[k+32|0]&1)!=0){break}c[k+40>>2]=1;c[k+44>>2]=c[k+4>>2]}else if((p|0)==6928){q=k;n=o+8|0;c[q>>2]=c[n>>2];c[q+4>>2]=c[n+4>>2];c[q+8>>2]=c[n+8>>2];c[q+12>>2]=c[n+12>>2];c[q+16>>2]=c[n+16>>2];c[q+20>>2]=c[n+20>>2];c[q+24>>2]=c[n+24>>2];c[q+28>>2]=c[n+28>>2];c[q+32>>2]=c[n+32>>2];c[q+36>>2]=c[n+36>>2];c[q+40>>2]=c[n+40>>2];c[q+44>>2]=c[n+44>>2];c[q+48>>2]=c[n+48>>2];c[q+52>>2]=c[n+52>>2];if((a[k+32|0]&1)!=0){break}c[k+40>>2]=1;c[k+44>>2]=c[k+4>>2]}}while(0);o=k+40|0;v=o;w=c[o>>2]|0}else{v=b;w=l}do{if((w|0)==0){cM[c[d+64>>2]&511](-2);i=e;return}else if((w|0)==1){l=c[d+144>>2]|0;if((l|0)==0){cM[c[d+64>>2]&511](c[v+4>>2]|0);i=e;return}else{cM[l&511](v);i=e;return}}else if((w|0)==3){l=c[d+144>>2]|0;if((l|0)==0){break}cM[l&511](v);i=e;return}}while(0);do{if(a[31104]|0){if((c[d+144>>2]|0)==0){break}if((w|0)==6){x=+h[v+8>>3];l=c[34]|0;b=(a[66852]&1)==0;do{if((a[64788+(l*688&-1)|0]&1)==0){if(b){y=x;break}if(x>0.0){z=+_(+x);y=z/+h[8358];break}else{y=+h[8341];break}}else{if(b){y=+Z(+(x*+h[64800+(l*688&-1)>>3]));break}if(+h[64792+(l*688&-1)>>3]==+h[8357]){y=x;break}y=x*+h[64800+(l*688&-1)>>3]/+h[8358]}}while(0);x=+h[8341];do{if(x>2]|0)==0){i=e;return}c[f>>2]=5;h[f+8>>3]=A;c[f+4>>2]=0;cM[c[l>>2]&511](f);i=e;return}else if((w|0)==4){x=+h[v+8>>3];B=+h[8341];do{if(B>2]|0)==0){i=e;return}c[g>>2]=5;h[g+8>>3]=C;c[g+4>>2]=0;cM[c[l>>2]&511](g);i=e;return}else if((w|0)==5){B=+h[v+8>>3];if((a[20668]|0)==112){E=B}else{E=1.0-B}l=(c[3524]|0)+144|0;if((c[l>>2]|0)==0){i=e;return}c[j>>2]=5;h[j+8>>3]=E;c[j+4>>2]=0;cM[c[l>>2]&511](j);i=e;return}else{i=e;return}}}while(0);cM[c[d+64>>2]&511](-2);i=e;return}function fo(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;i=i+32|0;j=g|0;k=g+8|0;l=g+16|0;m=g+24|0;if((c[b+88>>2]|0)==0){c[e>>2]=0;n=0}else{c[e>>2]=~~(+h[3817]*+((c[d+28>>2]|0)>>>0>>>0)*.5);n=~~(+h[3817]*+((c[d+24>>2]|0)>>>0>>>0)*.5)}c[f>>2]=n;n=b+144|0;if((a[37384]&1)==0){fN(n,l,m,91736);c[e>>2]=(c[e>>2]|0)+~~+h[l>>3];o=(c[f>>2]|0)+~~+h[m>>3]|0;c[f>>2]=o;i=g;return}else{fx(n,j,k,91736);c[e>>2]=(c[e>>2]|0)+(c[j>>2]|0);o=(c[f>>2]|0)+(c[k>>2]|0)|0;c[f>>2]=o;i=g;return}}function fp(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0;f=i;i=i+48|0;g=f|0;j=f+16|0;k=f+32|0;l=f+40|0;fn(e+72|0,c[3524]|0);m=a[e+184|0]&1;do{if(m<<24>>24!=0){if((a[37456]&1)!=0){break}a[37456]=1;n=c[(c[3524]|0)+88>>2]|0;if((n|0)==0){break}cO[n&255](179864)}}while(0);a[37456]=m;fo(e,c[3524]|0,k,l);m=e+52|0;n=c[m>>2]|0;do{if((n|0)==0){o=7011}else{if((cO[c[(c[3524]|0)+72>>2]&255](n)|0)==0){o=7011;break}ln((c[k>>2]|0)+b|0,(c[l>>2]|0)+d|0,c[e+60>>2]|0,c[e+48>>2]|0,0,c[m>>2]|0,c[e+64>>2]|0);p=c[(c[3524]|0)+72>>2]|0;cO[p&255](0)}}while(0);if((o|0)==7011){ln((c[k>>2]|0)+b|0,(c[l>>2]|0)+d|0,c[e+60>>2]|0,c[e+48>>2]|0,0,0,c[e+64>>2]|0)}if((c[e+88>>2]|0)==0){a[37456]=0;i=f;return}l=c[3524]|0;do{if((c[l+96>>2]&128|0)==0){if((b|0)<=0){a[37456]=0;i=f;return}if(!((c[l+8>>2]|0)>>>0>b>>>0&(d|0)>0)){a[37456]=0;i=f;return}if((c[l+12>>2]|0)>>>0>d>>>0){break}a[37456]=0;i=f;return}}while(0);k=g;m=e+128|0;c[k>>2]=c[m>>2];c[k+4>>2]=c[m+4>>2];c[k+8>>2]=c[m+8>>2];c[k+12>>2]=c[m+12>>2];m=c[e+92>>2]|0;q=+h[e+112>>3];k=c[l+92>>2]|0;if(q<0.0){cK[k&63](+h[3817])}else{cK[k&63](q)}cK[c[(c[3524]|0)+112>>2]&63](+h[e+104>>3]);k=c[(c[3524]|0)+64>>2]|0;if((m|0)<-5){cM[k&511](-2)}else{cM[k&511](m)}k=c[3524]|0;do{if((a[e+120|0]&1)==0){if((c[k+96>>2]&1024|0)!=0){r=k;break}c[g>>2]=1;c[g+4>>2]=m;o=7026}else{o=7026}}while(0);if((o|0)==7026){fn(g,k);r=c[3524]|0}cR[c[r+80>>2]&127](b,d,c[e+96>>2]|0);e=j;c[e>>2]=c[14084];c[e+4>>2]=c[56340>>2];c[e+8>>2]=c[56344>>2];c[e+12>>2]=c[56348>>2];e=c[14075]|0;do{if((c[14074]|0)!=0){q=+h[7040];d=c[(c[3524]|0)+92>>2]|0;if(q<0.0){cK[d&63](+h[3817]);break}else{cK[d&63](q);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);d=c[(c[3524]|0)+64>>2]|0;if((e|0)<-5){cM[d&511](-2)}else{cM[d&511](e)}d=c[3524]|0;do{if((a[56328]&1)==0){if((c[d+96>>2]&1024|0)==0){c[j>>2]=1;c[j+4>>2]=e;break}else{a[37456]=0;i=f;return}}}while(0);fn(j,d);a[37456]=0;i=f;return}function fq(a,b){a=+a;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0;d=i;ft(a,b);if((c[5163]|0)==103){i=d;return}e=c[5174]|0;if((e|0)==104){f=b|0;g=b+8|0;a=+h[g>>3];j=b+16|0;k=+h[j>>3];if(a==0.0){h[j>>3]=k;h[g>>3]=k;h[f>>3]=k;i=d;return}l=+h[f>>3]*6.0;n=~~+O(+l);o=l- +(n|0);l=k*(1.0-a);p=k*(1.0-a*o);q=k*(1.0-a*(1.0-o));r=(n|0)%6&-1;if((r|0)==1){h[f>>3]=p;h[g>>3]=k;h[j>>3]=l;i=d;return}else if((r|0)==0){h[f>>3]=k;h[g>>3]=q;h[j>>3]=l;i=d;return}else if((r|0)==4){h[f>>3]=q;h[g>>3]=l;h[j>>3]=k;i=d;return}else if((r|0)==3){h[f>>3]=l;h[g>>3]=p;h[j>>3]=k;i=d;return}else if((r|0)==2){h[f>>3]=l;h[g>>3]=k;h[j>>3]=q;i=d;return}else{h[f>>3]=k;h[g>>3]=l;h[j>>3]=p;i=d;return}}else if((e|0)==121){j=b|0;p=+h[j>>3];g=b+8|0;l=+h[g>>3];f=b+16|0;k=+h[f>>3];q=p-l*.956+k*.621;do{if(q<0.0){s=0.0}else{if(q>1.0){s=1.0;break}s=q}}while(0);h[j>>3]=s;s=p-l*.272-k*.647;do{if(s<0.0){t=0.0}else{if(s>1.0){t=1.0;break}t=s}}while(0);h[g>>3]=t;t=p-l*1.105-k*1.702;do{if(t<0.0){u=0.0}else{if(t>1.0){u=1.0;break}u=t}}while(0);h[f>>3]=u;i=d;return}else if((e|0)==99){f=b|0;g=b+8|0;u=+h[g>>3];j=b+16|0;t=+h[j>>3];k=1.0- +h[f>>3];do{if(k<0.0){w=0.0}else{if(k>1.0){w=1.0;break}w=k}}while(0);h[f>>3]=w;w=1.0-u;do{if(w<0.0){x=0.0}else{if(w>1.0){x=1.0;break}x=w}}while(0);h[g>>3]=x;x=1.0-t;do{if(x<0.0){y=0.0}else{if(x>1.0){y=1.0;break}y=x}}while(0);h[j>>3]=y;i=d;return}else if((e|0)==120){j=b|0;y=+h[j>>3];g=b+8|0;x=+h[g>>3];f=b+16|0;t=+h[f>>3];w=y*1.91-x*.5338-t*.2891;do{if(w<0.0){z=0.0}else{if(w>1.0){z=1.0;break}z=w}}while(0);h[j>>3]=z;z=y*-.9844+x*1.999-t*.0279;do{if(z<0.0){A=0.0}else{if(z>1.0){A=1.0;break}A=z}}while(0);h[g>>3]=A;A=y*.0585-x*.1187-t*.9017;do{if(A<0.0){B=0.0}else{if(A>1.0){B=1.0;break}B=A}}while(0);h[f>>3]=B;i=d;return}else if((e|0)==114){i=d;return}else{cf(c[m>>2]|0,91064,(v=i,i=i+24|0,c[v>>2]=179392,c[v+8>>2]=310,c[v+16>>2]=e<<24>>24,v)|0);i=d;return}}function fr(b,d){b=+b;d=d|0;var e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0,n=0,o=0.0,p=0,q=0.0,r=0,s=0.0;e=i;i=i+24|0;f=e|0;g=c[5168]|0;L9652:do{if((g|0)==0){j=b}else{k=+O(+(+(g|0)*b))/+(g-1|0);if((c[5163]|0)!=100){j=k;break}l=c[5172]|0;if((l|0)<3&k==0.0){j=k;break}m=c[5173]|0;n=0;o=k;while(1){if((n|0)>=(l|0)){j=o;break L9652}k=+h[m+(n<<5)>>3];p=n+1|0;q=+h[m+(p<<5)>>3];r=q>b;do{if(k<=b&r){if(!(oq)){s=o;break}s=(k+q)*.5}else{s=o}}while(0);if(r){j=s;break}else{n=p;o=s}}}}while(0);fq(j,f);j=+h[f+8>>3];s=+h[f+16>>3];a[d|0]=~~(+h[f>>3]*255.0+.5);a[d+1|0]=~~(j*255.0+.5);a[d+2|0]=~~(s*255.0+.5);i=e;return}function fs(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;var f=0,g=0,j=0.0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0,w=0,x=0,y=0,z=0.0,A=0.0,B=0,C=0,D=0,E=0,F=0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,Q=0.0,R=0.0,S=0.0,T=0,U=0,V=0,W=0,X=0,Y=0;a=i;i=i+24|0;f=a|0;g=(b|0)<1?2e3:b;j=d>0.0?d:.003;b=ut(1600)|0;k=b;l=ut(2400)|0;m=l;ft(0.0,m);h[b>>3]=0.0;n=b+8|0;c[n>>2]=c[l>>2];c[n+4>>2]=c[l+4>>2];c[n+8>>2]=c[l+8>>2];c[n+12>>2]=c[l+12>>2];c[n+16>>2]=c[l+16>>2];c[n+20>>2]=c[l+20>>2];d=+(g|0);ft(1.0/d,l+24|0);do{if((g|0)>0){l=0;o=0.0;n=50;b=k;p=100;q=m;r=1;while(1){s=q;t=p;u=o;v=2;while(1){w=v+l|0;if((w|0)>(g|0)){x=s;y=t;z=u;break}A=+(w|0)/d;if((v|0)==(t|0)){B=v+50|0;C=uv(s,B<<5)|0;D=B}else{C=s;D=t}B=C+(v*24&-1)|0;ft(A,B);E=v-2|0;F=v-1|0;G=+h[C+(E*24&-1)>>3];H=+h[C+(E*24&-1)+8>>3];I=+h[C+(E*24&-1)+16>>3];J=+h[C+(F*24&-1)>>3];K=+h[C+(F*24&-1)+8>>3];L=+h[C+(F*24&-1)+16>>3];M=+h[B>>3];N=+h[C+(v*24&-1)+8>>3];O=+h[C+(v*24&-1)+16>>3];if(GM){x=C;y=D;z=A;break}if(HN){x=C;y=D;z=A;break}if(IO){x=C;y=D;z=A;break}if(G>J&JK&KL&L>3];I=+h[C+8>>3];K=+h[C+16>>3];H=+(v|0);J=(M-L)/H;M=(N-I)/H;N=(O-K)/H;H=0.0;B=1;while(1){if((B|0)>=(v|0)){Q=H;break}O=+(B|0);G=+P(+(L+J*O- +h[C+(B*24&-1)>>3]));R=+P(+(I+M*O- +h[C+(B*24&-1)+8>>3]));S=+P(+(K+N*O- +h[C+(B*24&-1)+16>>3]));O=G>H?G:H;G=R>O?R:O;O=S>G?S:G;if(Oj){x=C;y=D;z=A;break}else{s=C;t=D;u=A;v=v+1|0}}if((r|0)==(n|0)){t=r+25|0;T=uv(b,t<<5)|0;U=t}else{T=b;U=n}h[T+(r<<5)>>3]=z;t=T+(r<<5)+8|0;s=x+((v-1|0)*24&-1)|0;c[t>>2]=c[s>>2];c[t+4>>2]=c[s+4>>2];c[t+8>>2]=c[s+8>>2];c[t+12>>2]=c[s+12>>2];c[t+16>>2]=c[s+16>>2];c[t+20>>2]=c[s+20>>2];V=r+1|0;t=x;c[t>>2]=c[s>>2];c[t+4>>2]=c[s+4>>2];c[t+8>>2]=c[s+8>>2];c[t+12>>2]=c[s+12>>2];c[t+16>>2]=c[s+16>>2];c[t+20>>2]=c[s+20>>2];s=x+24|0;t=x+(v*24&-1)|0;c[s>>2]=c[t>>2];c[s+4>>2]=c[t+4>>2];c[s+8>>2]=c[t+8>>2];c[s+12>>2]=c[t+12>>2];c[s+16>>2]=c[t+16>>2];c[s+20>>2]=c[t+20>>2];if((w|0)<(g|0)){l=w;o=z;n=U;b=T;p=y;q=x;r=V}else{break}}ft(1.0,f);if((V|0)!=(U|0)){W=T;X=V;Y=x;break}W=uv(T,(V<<5)+32|0)|0;X=V;Y=x}else{ft(1.0,f);W=k;X=1;Y=m}}while(0);h[W+(X<<5)>>3]=1.0;m=W+(X<<5)+8|0;k=f;c[m>>2]=c[k>>2];c[m+4>>2]=c[k+4>>2];c[m+8>>2]=c[k+8>>2];c[m+12>>2]=c[k+12>>2];c[m+16>>2]=c[k+16>>2];c[m+20>>2]=c[k+20>>2];uu(Y);c[e>>2]=X+1;i=a;return W|0}function ft(b,d){b=+b;d=d|0;var e=0,f=0,g=0.0,j=0,k=0.0,l=0.0,n=0.0,o=0.0,p=0,q=0.0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0;e=i;i=i+24|0;f=e|0;do{if(b<0.0){g=0.0}else{if(b<=1.0){g=b;break}g=1.0}}while(0);j=c[5163]|0;if((j|0)==99){b=(+h[2706]/3.0+g*+h[2707])*6.283185307179586;k=+h[2705];if(k!=1.0){l=+R(+g,+(1.0/k))}else{l=g}k=(1.0-l)*l*+h[2708]*.5;n=+S(+b);o=+T(+b);b=l+k*(n*-.14861+o*1.78277);p=d|0;h[p>>3]=b;q=l+k*(n*-.29227-o*.90649);r=d+8|0;h[r>>3]=q;o=l+n*1.97294*k;s=d+16|0;h[s>>3]=o;do{if(b>1.0){h[p>>3]=1.0}else{if(b>=0.0){break}h[p>>3]=0.0}}while(0);do{if(q>1.0){h[r>>3]=1.0}else{if(q>=0.0){break}h[r>>3]=0.0}}while(0);if(o>1.0){h[s>>3]=1.0;i=e;return}if(o>=0.0){i=e;return}h[s>>3]=0.0;i=e;return}else if((j|0)==100){if(g<0.0){h[d>>3]=+h[(c[5173]|0)+8>>3];h[d+8>>3]=+h[(c[5173]|0)+16>>3];h[d+16>>3]=+h[(c[5173]|0)+24>>3];i=e;return}s=c[5172]|0;if(g>1.0){r=s-1|0;h[d>>3]=+h[(c[5173]|0)+(r<<5)+8>>3];h[d+8>>3]=+h[(c[5173]|0)+(r<<5)+16>>3];h[d+16>>3]=+h[(c[5173]|0)+(r<<5)+24>>3];i=e;return}L9731:do{if((s|0)>1){r=c[5173]|0;p=0;t=s-1|0;L9733:while(1){u=p;while(1){if((u|0)==(t|0)){w=t;x=r;break L9731}y=(u+t|0)/2&-1;if(+h[r+(y<<5)>>3]>3];if(o==g){h[d>>3]=+h[s>>3];h[d+8>>3]=+h[x+(w<<5)+16>>3];h[d+16>>3]=+h[x+(w<<5)+24>>3];i=e;return}else{t=w-1|0;q=+h[x+(t<<5)>>3];b=(g-q)/(o-q);q=+h[x+(t<<5)+8>>3];h[d>>3]=q+b*(+h[s>>3]-q);q=+h[x+(t<<5)+16>>3];h[d+8>>3]=q+b*(+h[x+(w<<5)+16>>3]-q);q=+h[x+(t<<5)+24>>3];h[d+16>>3]=q+b*(+h[x+(w<<5)+24>>3]-q);i=e;return}}else if((j|0)==114){h[d>>3]=+fu(c[5164]|0,g);h[d+8>>3]=+fu(c[5165]|0,g);h[d+16>>3]=+fu(c[5166]|0,g);i=e;return}else if((j|0)==102){c[5182]=2;h[2592]=g;h[2593]=0.0;e4(c[5178]|0,f);if((a[1960]&1)!=0){uf(-1,86464,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}w=f|0;x=c[w>>2]|0;if((x|0)==1){z=+(c[f+8>>2]|0)}else if((x|0)==3){z=+uz(c[f+8>>2]|0,0)}else if((x|0)==2){z=+h[f+8>>3]}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(z<0.0){A=0.0}else{A=z>1.0?1.0:z}c[5260]=2;h[2631]=g;h[2632]=0.0;e4(c[5256]|0,f);if((a[1960]&1)!=0){uf(-1,85592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}x=c[w>>2]|0;if((x|0)==3){B=+uz(c[f+8>>2]|0,0)}else if((x|0)==1){B=+(c[f+8>>2]|0)}else if((x|0)==2){B=+h[f+8>>3]}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(B<0.0){C=0.0}else{C=B>1.0?1.0:B}c[5338]=2;h[2670]=g;h[2671]=0.0;e4(c[5334]|0,f);if((a[1960]&1)!=0){uf(-1,84488,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}x=c[w>>2]|0;if((x|0)==1){D=+(c[f+8>>2]|0)}else if((x|0)==3){D=+uz(c[f+8>>2]|0,0)}else if((x|0)==2){D=+h[f+8>>3]}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(D<0.0){E=0.0}else{E=D>1.0?1.0:D}h[d>>3]=A;h[d+8>>3]=C;h[d+16>>3]=E;i=e;return}else if((j|0)==103){E=+R(+g,+(1.0/+h[2705]));h[d+16>>3]=E;h[d+8>>3]=E;h[d>>3]=E;i=e;return}else{cf(c[m>>2]|0,87488,(v=i,i=i+24|0,c[v>>2]=179392,c[v+8>>2]=272,c[v+16>>2]=j<<24>>24,v)|0);i=e;return}}function fu(a,b){a=a|0;b=+b;var d=0,e=0.0,f=0,g=0.0,h=0.0;d=i;if((a|0)<0){e=1.0-b;f=-a|0}else{e=b;f=a}do{if((f|0)==18){g=+P(+(+S(+(e*360.0*.017453292519943295))))}else if((f|0)==33){g=+P(+(e*2.0+-.5))}else if((f|0)==0){h=0.0;i=d;return+h}else if((f|0)==25){g=+P(+(e*3.0+-2.0))}else if((f|0)==10){g=+S(+(e*90.0*.017453292519943295))}else if((f|0)==2){h=1.0;i=d;return+h}else if((f|0)==11){g=+P(+(e+-.5))}else if((f|0)==31){if(e<=.42){h=0.0;i=d;return+h}if(e<.92){g=e*2.0+-.84;break}else{h=1.0;i=d;return+h}}else if((f|0)==15){g=+T(+(e*360.0*.017453292519943295))}else if((f|0)==16){g=+S(+(e*360.0*.017453292519943295))}else if((f|0)==26){g=e*1.5+-.5}else if((f|0)==21){g=e*3.0}else if((f|0)==14){g=+P(+(+S(+(e*180.0*.017453292519943295))))}else if((f|0)==19){g=+P(+(+T(+(e*720.0*.017453292519943295))))}else if((f|0)==20){g=+P(+(+S(+(e*720.0*.017453292519943295))))}else if((f|0)==23){g=e*3.0+-2.0}else if((f|0)==24){g=+P(+(e*3.0+-1.0))}else if((f|0)==28){g=+P(+(e*1.5+-.5))}else if((f|0)==3){g=e}else if((f|0)==22){g=e*3.0+-1.0}else if((f|0)==29){g=+P(+(e*1.5+-1.0))}else if((f|0)==27){g=e*1.5+-1.0}else if((f|0)==1){h=.5;i=d;return+h}else if((f|0)==30){if(e<=.25){h=0.0;i=d;return+h}if(e<.57){g=e/.32+-.78125;break}else{h=1.0;i=d;return+h}}else if((f|0)==34){g=e*2.0}else if((f|0)==35){g=e*2.0+-.5}else if((f|0)==5){g=e*e*e}else if((f|0)==6){g=e*e*e*e}else if((f|0)==9){g=+T(+(e*90.0*.017453292519943295))}else if((f|0)==36){g=e*2.0+-1.0}else if((f|0)==4){g=e*e}else if((f|0)==12){b=e*2.0+-1.0;g=b*b}else if((f|0)==32){if(e<=.42){g=e*4.0;break}if(e>.92){g=e/.08-11.5;break}else{g=e*-2.0+1.84;break}}else if((f|0)==7){g=+Q(+e)}else if((f|0)==13){g=+T(+(e*180.0*.017453292519943295))}else if((f|0)==8){g=+Q(+(+Q(+e)))}else if((f|0)==17){g=+P(+(+T(+(e*360.0*.017453292519943295))))}else{cf(c[m>>2]|0,143136,(v=i,i=i+8|0,c[v>>2]=(c[5162]|0)-1,v)|0);bd(1);return 0.0}}while(0);if(g<=0.0){h=0.0;i=d;return+h}h=g<1.0?g:1.0;i=d;return+h}function fv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0,R=0,U=0,V=0,W=0,X=0,Y=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aJ=0.0,aK=0.0,aL=0.0,aM=0.0,aO=0.0,aP=0,aQ=0,aR=0.0,aS=0.0,aT=0.0,aU=0.0,aV=0.0,aW=0.0,aX=0,aY=0,aZ=0,a_=0.0,a$=0,a0=0,a1=0.0,a2=0.0,a3=0,a4=0.0,a5=0,a6=0,a7=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bx=0,by=0,bz=0,bA=0,bB=0.0,bC=0,bD=0,bE=0,bF=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bL=0,bM=0,bN=0,bO=0,bP=0,bQ=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0.0,bY=0,bZ=0,b_=0.0,b$=0.0,b0=0.0,b1=0.0,b2=0.0,b3=0.0,b5=0.0,b6=0.0,b7=0.0,b8=0,b9=0,ca=0,cb=0.0,cc=0.0,cd=0.0,ce=0.0,cf=0.0,cg=0,ch=0,ci=0.0,cj=0,ck=0.0,cl=0.0,cm=0.0,cn=0.0,co=0.0,cp=0.0,cq=0.0,cr=0.0,cs=0.0,ct=0.0,cu=0.0,cv=0.0,cw=0.0,cx=0.0,cy=0.0,cz=0.0,cA=0.0,cB=0,cC=0,cD=0.0,cE=0,cF=0,cH=0,cI=0.0,cJ=0,cL=0,cP=0,cQ=0,cT=0,cU=0,cV=0,cW=0,cX=0,cY=0,cZ=0,c_=0,c$=0,c0=0,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0.0,c7=0.0,c8=0,c9=0,da=0,db=0,dc=0,dd=0,de=0,df=0,dg=0,dh=0,di=0,dj=0.0,dk=0.0,dl=0,dm=0.0,dn=0,dp=0,dq=0.0,dr=0,ds=0,dt=0,du=0,dv=0,dw=0.0,dx=0.0,dy=0,dA=0,dB=0,dC=0,dE=0,dF=0,dG=0,dH=0,dI=0,dJ=0,dK=0,dL=0,dM=0,dN=0,dO=0,dP=0,dQ=0.0,dR=0.0,dS=0,dT=0,dU=0,dV=0,dW=0.0,dX=0,dY=0,dZ=0,d_=0;f=i;i=i+1992|0;j=f|0;k=f+48|0;l=f+96|0;n=f+104|0;o=f+112|0;p=f+120|0;q=f+128|0;r=f+144|0;s=f+160|0;t=f+168|0;u=f+176|0;w=f+184|0;x=f+192|0;y=f+200|0;z=f+208|0;A=f+216|0;B=f+224|0;C=f+240|0;D=f+256|0;E=f+264|0;F=f+272|0;G=f+312|0;H=f+328|0;I=f+336|0;J=f+344|0;K=f+384|0;L=f+400|0;M=f+424|0;N=f+432|0;O=f+440|0;Q=f+448|0;R=f+456|0;U=f+464|0;V=f+472|0;W=f+480|0;X=f+488|0;Y=f+496|0;$=f+504|0;ab=f+512|0;ac=f+520|0;ad=f+528|0;ae=f+536|0;af=f+544|0;ag=f+552|0;ah=f+560|0;ai=f+568|0;aj=f+576|0;ak=f+584|0;al=f+600|0;am=f+608|0;an=f+616|0;ao=f+624|0;ap=f+632|0;aq=f+648|0;ar=f+664|0;as=f+672|0;at=f+680|0;au=f+688|0;av=f+696|0;aw=f+704|0;ax=f+712|0;ay=f+728|0;az=f+736|0;aA=f+864|0;aB=f+872|0;aC=f+880|0;aD=f+1912|0;aE=f+1920|0;aF=f+1928|0;aG=f+1936|0;aH=c[3524]|0;aJ=+g[3536]*.017453292519943295;aK=+S(+aJ);aL=+T(+aJ);uE(3136,0,24);uE(3176,0,32);h[401]=1.0;uE(3216,0,32);h[406]=1.0;h[391]=aK;aJ=-0.0-aL;h[392]=aJ;h[395]=aL;h[396]=aK;aL=+g[3538]*.017453292519943295;aM=+S(+aL);aO=+T(+aL);aL=-0.0-aO;aP=az;aQ=0;aR=aK;aK=aJ;aJ=0.0;aS=0.0;while(1){aT=aK*0.0;aU=aJ*0.0;aV=aS*0.0;h[az+(aQ<<5)>>3]=aR+0.0+aT+aU+aV;aW=aR*0.0+0.0;h[az+(aQ<<5)+8>>3]=aW+aM*aK+aO*aJ+aV;h[az+(aQ<<5)+16>>3]=aW+aK*aL+aM*aJ+aV;h[az+(aQ<<5)+24>>3]=aS+(aW+aT+aU);aX=aQ+1|0;if((aX|0)>=4){break}aQ=aX;aR=+h[3128+(aX<<5)>>3];aK=+h[3136+(aX<<5)>>3];aJ=+h[3144+(aX<<5)>>3];aS=+h[3152+(aX<<5)>>3]}c[782]=c[aP>>2];c[783]=c[aP+4>>2];c[784]=c[aP+8>>2];c[785]=c[aP+12>>2];c[786]=c[aP+16>>2];c[787]=c[aP+20>>2];c[788]=c[aP+24>>2];c[789]=c[aP+28>>2];aQ=az+32|0;c[790]=c[aQ>>2];c[3164>>2]=c[aQ+4>>2];c[3168>>2]=c[aQ+8>>2];c[3172>>2]=c[aQ+12>>2];c[3176>>2]=c[aQ+16>>2];c[3180>>2]=c[aQ+20>>2];c[3184>>2]=c[aQ+24>>2];c[3188>>2]=c[aQ+28>>2];aX=az+64|0;c[798]=c[aX>>2];c[3196>>2]=c[aX+4>>2];c[3200>>2]=c[aX+8>>2];c[3204>>2]=c[aX+12>>2];c[3208>>2]=c[aX+16>>2];c[3212>>2]=c[aX+20>>2];c[3216>>2]=c[aX+24>>2];c[3220>>2]=c[aX+28>>2];aY=az+96|0;c[806]=c[aY>>2];c[3228>>2]=c[aY+4>>2];c[3232>>2]=c[aY+8>>2];c[3236>>2]=c[aY+12>>2];c[3240>>2]=c[aY+16>>2];c[3244>>2]=c[aY+20>>2];c[3248>>2]=c[aY+24>>2];c[3252>>2]=c[aY+28>>2];aS=+g[3534]*.5;aZ=0;do{aJ=+h[3128+(aZ<<5)>>3];aK=+h[3136+(aZ<<5)>>3];aR=aK*0.0;aM=+h[3144+(aZ<<5)>>3];aL=aM*0.0;aO=+h[3152+(aZ<<5)>>3];aU=aO*0.0;h[az+(aZ<<5)>>3]=aS*aJ+0.0+aR+aL+aU;aT=aJ*0.0+0.0;h[az+(aZ<<5)+8>>3]=aT+aS*aK+aL+aU;aK=aT+aR;h[az+(aZ<<5)+16>>3]=aK+aS*aM+aU;h[az+(aZ<<5)+24>>3]=aO+(aK+aL);aZ=aZ+1|0;}while((aZ|0)<4);c[782]=c[aP>>2];c[783]=c[aP+4>>2];c[784]=c[aP+8>>2];c[785]=c[aP+12>>2];c[786]=c[aP+16>>2];c[787]=c[aP+20>>2];c[788]=c[aP+24>>2];c[789]=c[aP+28>>2];c[790]=c[aQ>>2];c[3164>>2]=c[aQ+4>>2];c[3168>>2]=c[aQ+8>>2];c[3172>>2]=c[aQ+12>>2];c[3176>>2]=c[aQ+16>>2];c[3180>>2]=c[aQ+20>>2];c[3184>>2]=c[aQ+24>>2];c[3188>>2]=c[aQ+28>>2];c[798]=c[aX>>2];c[3196>>2]=c[aX+4>>2];c[3200>>2]=c[aX+8>>2];c[3204>>2]=c[aX+12>>2];c[3208>>2]=c[aX+16>>2];c[3212>>2]=c[aX+20>>2];c[3216>>2]=c[aX+24>>2];c[3220>>2]=c[aX+28>>2];c[806]=c[aY>>2];c[3228>>2]=c[aY+4>>2];c[3232>>2]=c[aY+8>>2];c[3236>>2]=c[aY+12>>2];c[3240>>2]=c[aY+16>>2];c[3244>>2]=c[aY+20>>2];c[3248>>2]=c[aY+24>>2];c[3252>>2]=c[aY+28>>2];if((a[30528]&1)!=0){uk(83256,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if((a[624]&1)==0){aY=c[34]|0;aS=+h[64664+(aY*688&-1)>>3];a_=aS-(+h[64672+(aY*688&-1)>>3]-aS)*+h[77]}else{aS=+h[77];if((a[64788]&1)==0){a_=aS;break}aL=+_(+aS);a_=aL/+h[8100]}}while(0);h[7076]=a_;aY=c[200]|0;L9870:do{if((c[64916+(aY*688&-1)>>2]|0)==0){if((c[64916+((c[144]|0)*688&-1)>>2]|0)==0){a$=0}else{a0=7282;break}while(1){if(a$>>>0>=8){break}if((a[65036+(a$*688&-1)|0]&1)!=0){a0=7282;break L9870}if((a[65037+(a$*688&-1)|0]&1)==0){a$=a$+1|0}else{a0=7282;break L9870}}aX=c[34]|0;aL=+h[64664+(aX*688&-1)>>3];h[5279]=aL;aS=+h[64672+(aX*688&-1)>>3];h[6915]=aS;a1=aL;a2=aS}else{a0=7282}}while(0);do{if((a0|0)==7282){a$=c[34]|0;aS=+h[64664+(a$*688&-1)>>3];if((c[64656+(a$*688&-1)>>2]&2|0)==0){h[5279]=aS>3];h[6915]=aL>a_?aL:a_;a1=aS;a2=aL;break}else{h[5279]=aS>a_?aS:a_;aL=+h[64672+(a$*688&-1)>>3];h[6915]=aL>3]==+h[64672+(aY*688&-1)>>3]){uk(175032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}aY=c[144]|0;if(+h[64664+(aY*688&-1)>>3]==+h[64672+(aY*688&-1)>>3]){uk(141592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(a1==a2){uk(126608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[14080]&1)==0){lk()}do{if(a[14088]|0){if((a[33512]&1)==0){break}if(!(a[13032]|0)){break}aY=c[(c[3524]|0)+104>>2]|0;if((aY|0)!=0){cS[aY&511]()}a[13032]=0}else{cS[c[(c[3524]|0)+52>>2]&511]();a[14088]=1}}while(0);cM[c[(c[3524]|0)+168>>2]&511](0);aY=c[3524]|0;if((c[aY+96>>2]&16|0)!=0){c[7271]=-1}c[13880]=0;c[13881]=(c[aY+8>>2]|0)-1;c[13882]=0;c[13883]=(c[aY+12>>2]|0)-1;a[25280]=0;cM[c[aY+168>>2]&511](1);aY=c[3524]|0;c[1100]=0;a$=aY+24|0;aX=aY+28|0;a2=+h[4524];if(a2<0.0){a3=0;a4=+h[3817]}else{a1=+h[3817];a3=~~(a2*+((c[aY+20>>2]|0)>>>0>>>0)+a1*+((c[aX>>2]|0)>>>0>>>0));a4=a1}c[9002]=a3;a1=+h[4525];a3=~~(a1*a4*+((c[a$>>2]|0)>>>0>>>0)*1.25);c[9022]=a3;aQ=aY+16|0;aP=c[aQ>>2]|0;if(a3>>>0>>0){c[9022]=~~(a1*+(aP>>>0>>>0))}aP=(d|0)>0;if(aP){a3=0;aZ=0;az=0;a5=b;while(1){a6=c[a5+16>>2]|0;do{if((a6|0)==0){a7=aZ;a9=a3}else{if((a[a6]|0)==0){a7=aZ;a9=a3;break}if((a[a5+22|0]&1)!=0){a7=aZ;a9=a3;break}ba=lp(a6)|0;a7=(ba|0)>(aZ|0)?ba:aZ;a9=a3+1|0}}while(0);do{if((c[11690]|0)==0){bb=a7;bc=a9}else{a6=a[35888]|0;if((a6&1)==0){bb=a7;bc=a9;break}ba=c[a5+256>>2]|0;if((ba|0)==0){bb=a7;bc=a9;break}else{bd=0;be=0;bf=ba;bg=a6}while(1){do{if((bg&1)==0){bh=be;bi=bd}else{if((a[bf+8|0]|0)==0){bh=be;bi=bd;break}a6=bf+9|0;ba=lp(a6)|0;bj=b4(a6|0,73808)|0;a6=ba-bj|0;bh=((ba|0)!=(bj|0)&1)+be|0;bi=(a6|0)>(bd|0)?a6:bd}}while(0);a6=c[bf>>2]|0;if((a6|0)==0){break}bd=bi;be=bh;bf=a6;bg=a[35888]|0}bb=(bi|0)>(a7|0)?bi:a7;bc=bh+a9|0}}while(0);a6=az+1|0;if((a6|0)<(d|0)){a3=bc;aZ=bb;az=a6;a5=c[a5>>2]|0}else{bk=bc;bl=bb;break}}}else{bk=0;bl=0}c[6962]=bk;c[8712]=bl;a1=+(ga(36288,ay)|0);bl=~~(a1-(+h[4524]+2.0));a1=+(c[ay>>2]|0);h[4487]=a1;bk=c[8712]|0;if((bl|0)>(bk|0)){c[8712]=bl;bm=bl}else{bm=bk}bk=bm+4|0;bm=aY+20|0;bl=aa(bk,c[bm>>2]|0);bb=c[9002]|0;bc=bl+bb|0;c[9028]=bc;bl=c[8786]|0;a5=(bl|0)==3;a4=+h[4395];do{if(a5){az=~~(a4*+((c[aY+8>>2]|0)>>>0>>>0)+.5);c[7938]=az;bn=az}else{az=c[bm>>2]|0;if(a4<0.0){aZ=(c[aX>>2]|0)+(az<<1)|0;c[7938]=aZ;bn=aZ;break}else{aZ=~~(a4*+(az>>>0>>>0)+.5);c[7938]=aZ;bn=aZ;break}}}while(0);aZ=c[6598]|0;az=(aZ|0)==3;if(az){bo=~~(+h[3301]*+((c[aY+8>>2]|0)>>>0>>>0)+.5)}else{bo=~~(+g[178]*+((c[aY+8>>2]|0)>>>0>>>0)- +(c[bm>>2]<<1>>>0>>>0)- +((c[aX>>2]|0)>>>0>>>0))}c[7939]=bo;a3=c[6962]|0;c[9014]=a3;c[9024]=1;a9=c[9339]|0;bh=(a9|0)>0;if((a3|0)>(a9|0)&bh){c[9014]=a9;a7=((a3-1|0)/(a9|0)&-1)+1|0;c[9024]=a7;bp=a9;bq=a7}else{bp=a3;bq=1}a7=a[36120]&1;bi=a7<<24>>24==0;do{if(bi){br=bp;bs=bc;bt=bq}else{if(!(((c[9031]|0)-1|0)>>>0<2&(c[9032]|0)==1)){br=bp;bs=bc;bt=bq;break}if((a3|0)>0){bg=bo-bn|0;bf=(bg>>>0)/((aa(c[bm>>2]|0,bk)+bb|0)>>>0)>>>0;be=a3-1|0;bd=((be|0)/(((bf|0)==0?1:bf)|0)&-1)+1|0;bf=(bd|0)>(a9|0)&bh?a9:bd;c[9014]=bf;bd=((be|0)/(bf|0)&-1)+1|0;c[9024]=bd;be=(bg|0)/(bd|0)&-1;c[9028]=be;br=bf;bs=be;bt=bd;break}else{c[9028]=0;c[9024]=0;c[9014]=0;br=0;bs=0;bt=0;break}}}while(0);bb=(c[14100]|0)==3;do{if(bb){bk=~~(+h[7052]*+((c[aY+12>>2]|0)>>>0>>>0)+.5);c[7940]=bk;bu=bk}else{a4=+h[7052];bk=c[aQ>>2]|0;if((c[5094]|0)!=0&a4>=0.0){bq=~~(a4*+(bk>>>0>>>0));c[7940]=bq;bu=bq;break}else{bq=~~(+(bk>>>0>>>0)*2.5+1.0);c[7940]=bq;bu=bq;break}}}while(0);do{if(a7<<24>>24!=0&(br|0)!=0){if(!(((c[9031]|0)-1|0)>>>0<2&(c[9032]|0)==1)){bv=bu;break}a4=+(aa(c[9022]|0,br)|0);bq=~~(+(bu|0)+(a4+a1*+((c[aQ>>2]|0)>>>0>>>0)));c[7940]=bq;bv=bq}else{bv=bu}}while(0);bu=c[1119]|0;L9970:do{if((bu|0)!=0){br=(c[1100]|0)+1|0;c[1100]=br;c[ay>>2]=0;a7=a[bu]|0;if(a7<<24>>24==0){break}else{bx=1;by=br;bz=a7}while(1){if(bz<<24>>24==92){a7=by+1|0;c[1100]=a7;bA=a7}else{bA=by}c[ay>>2]=bx;if(bx>>>0>=(uA(bu|0)|0)>>>0){break L9970}a7=a[bu+bx|0]|0;bx=bx+1|0;by=bA;bz=a7}}}while(0);bz=(c[1066]|0)==3;if(bz){bB=+h[535]*+((c[aY+12>>2]|0)>>>0>>>0)+.5}else{bB=+g[38]*+((c[aY+12>>2]|0)>>>0>>>0)- +((c[aQ>>2]|0)>>>0>>>0)*(+(c[1100]|0)+1.5)+-1.0}bA=~~bB;c[7941]=bA;do{if(bi){bC=bn;bD=bl;bE=aZ;bF=bo}else{by=c[9031]|0;if((by|0)==0){a0=7360}else if((by|0)==1|(by|0)==2){if((c[9032]|0)==3){a0=7360}else{bG=bt}}else{bG=bt}do{if((a0|0)==7360){bx=~~(+(((((bA-bv|0)>>>0)/((c[aQ>>2]|0)>>>0)>>>0)-1|0)>>>0>>>0)-a1);bu=(bx|0)>(a9|0)&bh?a9:bx;bx=(bu|0)==0?1:bu;c[ay>>2]=bx;if((a3|0)<=(bx|0)){bG=bt;break}bu=a3-1|0;a7=((bu|0)/(bx|0)&-1)+1|0;c[9024]=a7;c[9014]=((bu|0)/(a7|0)&-1)+1;bG=a7}}while(0);a7=by-1|0;bu=c[9032]|0;bx=(bu|0)!=3|a7>>>0>1;if(bx|az){bH=bx?aZ:3;bI=bo}else{bx=c[bm>>2]|0;br=((bo-bs|0)-aa(bG-1|0,bs)|0)+(bx<<1)|0;c[7939]=br;bH=aZ;bI=br}if(!(a7>>>0<2&(bu|0)==2)){bC=bn;bD=bl;bE=bH;bF=bI;break}if(a5){bC=bn;bD=3;bE=bH;bF=bI;break}bu=c[bm>>2]|0;a7=((bs+bn|0)+aa(bG-1|0,bs)|0)-(bu<<1)|0;c[7938]=a7;bC=a7;bD=bl;bE=bH;bF=bI}}while(0);bI=(c[5094]|0)==0;bH=c[18072]|0;do{if(bI&(bH|0)>0){bl=bA-bv|0;bs=bF-bC|0;if((bl|0)>(bs|0)){bG=(bl-bs|0)/2&-1;bn=bG+bv|0;c[7940]=bn;bm=bA-bG|0;c[7941]=bm;bJ=bF;bK=bC;bL=bm;bM=bn;break}else{bn=(bs-bl|0)/2&-1;bl=bn+bC|0;c[7938]=bl;bs=bF-bn|0;c[7939]=bs;bJ=bs;bK=bl;bL=bA;bM=bv;break}}else{bJ=bF;bK=bC;bL=bA;bM=bv}}while(0);bv=(bD|0)==3;if(bv){bN=bK}else{bD=~~(+(bK|0)+ +((c[aY+8>>2]|0)>>>0>>>0)*+g[184]);c[7938]=bD;bN=bD}bD=(bE|0)==3;if(bD){bO=bJ}else{bE=~~(+(bJ|0)+ +((c[aY+8>>2]|0)>>>0>>>0)*+g[184]);c[7939]=bE;bO=bE}if(bz){bP=bL}else{bE=~~(+(bL|0)+ +((c[aY+12>>2]|0)>>>0>>>0)*+g[44]);c[7941]=bE;bP=bE}if(bb){bQ=bM}else{bE=~~(+(bM|0)+ +((c[aY+12>>2]|0)>>>0>>>0)*+g[44]);c[7940]=bE;bQ=bE}bE=(bO+bN|0)/2&-1;c[186]=bE;aY=(bQ+bP|0)/2&-1;c[46]=aY;bM=bO-bN|0;bL=(bM<<2|0)/7&-1;c[180]=bL;bJ=bP-bQ|0;bK=(bJ<<2|0)/7&-1;c[40]=bK;if(bz|bb){bb=~~(+(bJ|0)/+g[3534]);c[40]=bb;bR=bb}else{bR=bK}if(bD|bv){bv=~~(+(bM|0)/+g[3534]);c[180]=bv;bS=bv}else{bS=bL}if((bR|0)==0){c[40]=1;bT=1}else{bT=bR}if((bS|0)==0){c[180]=1;bU=1}else{bU=bS}do{if(bI){if((c[(c[3524]|0)+96>>2]&128|0)==0){c[13542]=55520;bV=bU;bW=bT;break}else{c[13542]=0;bV=bU;bW=bT;break}}else{a1=+g[18074];do{if(a1!=0.0){do{if(a1<0.0){bS=c[200]|0;bB=+h[64672+(bS*688&-1)>>3]- +h[64664+(bS*688&-1)>>3];if(bB==0.0){a0=7392;break}bS=c[144]|0;bX=(-0.0-a1)*+P(+((+h[64672+(bS*688&-1)>>3]- +h[64664+(bS*688&-1)>>3])/bB))}else{a0=7392}}while(0);if((a0|0)==7392){bX=a1}if(!(bX>=.01&bX<=100.0)){bY=bU;bZ=bT;break}bB=+(bT|0);a4=+(bU|0);a2=bX*+((c[a$>>2]|0)>>>0>>>0)/+((c[aX>>2]|0)>>>0>>>0);if(bB/a4>a2){bS=~~(a4*a2);c[40]=bS;bY=bU;bZ=bS;break}else{bS=~~(bB/a2);c[180]=bS;bY=bS;bZ=bT;break}}else{bY=bU;bZ=bT}}while(0);c[13542]=31752;bV=bY;bW=bZ}}while(0);c[16536]=bN;c[16537]=bO;c[16364]=bQ;c[16365]=bP;bX=+h[5279];a1=+h[6915];c[16192]=~~bX;c[16193]=~~a1;a2=a1-bX;a1=2.0/a2*+g[3532];h[2]=a1;bP=c[144]|0;bB=+h[64664+(bP*688&-1)>>3];a4=2.0/(+h[64672+(bP*688&-1)>>3]-bB);h[21]=a4;bP=c[200]|0;a_=+h[64664+(bP*688&-1)>>3];aL=2.0/(+h[64672+(bP*688&-1)>>3]-a_);h[91]=aL;h[12]=0.0;h[68]=0.0;h[96]=0.0;do{if((bH|0)>1){do{if(a4>aL){aS=1.0-aL/a4;h[68]=aS;h[21]=aL;b_=aL;b$=0.0;b0=aL;b1=aS}else{if(aL<=a4){b_=aL;b$=0.0;b0=a4;b1=0.0;break}aS=1.0-a4/aL;h[96]=aS;h[91]=a4;b_=a4;b$=aS;b0=a4;b1=0.0}}while(0);if((bH|0)<=2){b2=a1;b3=b_;b5=b$;b6=b0;b7=b1;break}h[2]=b_;b2=b_;b3=b_;b5=b$;b6=b0;b7=b1}else{b2=a1;b3=aL;b5=0.0;b6=a4;b7=0.0}}while(0);a4=b2*a2*-.5+1.0;h[12]=a4;if(!bI){a2=+h[8255];aL=+h[8169];a1=(a2-a_)*b3+b5+-1.0;b1=(aL-bB)*b6+b7+-1.0;b0=a4+(0.0-bX)*b2+-1.0;b2=+h[403];bX=+h[391];a4=+h[395];b$=b0*+h[399];b_=+h[404];aS=+h[392];aK=+h[396];aO=b0*+h[400];aU=+h[406];aM=+h[394];aR=+h[398];aT=b0*+h[402];b0=aU+a1*aM+b1*aR+aT;aJ=b0==0.0?1.0e-5:b0;b0=+(bV|0);bV=~~((b2+a1*bX+b1*a4+b$)/aJ*b0)+bE|0;aW=+(bW|0);bW=~~((b_+a1*aS+b1*aK+aO)/aJ*aW)+aY|0;aJ=+h[8256];b1=+h[8170];a1=b5+b3*(aJ-a_)+-1.0;a_=b7+b6*(b1-bB)+-1.0;bB=aT+(aU+aM*a1+aR*a_);aR=bB==0.0?1.0e-5:bB;bI=~~(b0*((b$+(b2+bX*a1+a4*a_))/aR))+bE|0;bE=~~(aW*((aO+(b_+aS*a1+aK*a_))/aR))+aY|0;h[8269]=+(bI-bV|0)/(aJ-a2);h[8183]=+(bE-bW|0)/(b1-aL);c[16536]=bV;c[16537]=bI;c[16364]=bW;c[16365]=bE}bE=(e|0)!=0;if(!bE){do{if(a[31104]|0){if((dz()|0)!=0){b8=0;break}b8=(c[(c[3524]|0)+144>>2]|0)!=0&1}else{b8=0}}while(0);a[55536]=b8}fO(c[10818]|0,-1,3);b8=ax;c[b8>>2]=c[14084];c[b8+4>>2]=c[56340>>2];c[b8+8>>2]=c[56344>>2];c[b8+12>>2]=c[56348>>2];b8=c[14075]|0;do{if((c[14074]|0)!=0){aL=+h[7040];e=c[(c[3524]|0)+92>>2]|0;if(aL<0.0){cK[e&63](+h[3817]);break}else{cK[e&63](aL);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);e=c[(c[3524]|0)+64>>2]|0;if((b8|0)<-5){cM[e&511](-2)}else{cM[e&511](b8)}e=c[3524]|0;do{if((a[56328]&1)==0){if((c[e+96>>2]&1024|0)!=0){break}c[ax>>2]=1;c[ax+4>>2]=b8;a0=7425}else{a0=7425}}while(0);if((a0|0)==7425){fn(ax,e)}e=~~(+g[3536]/90.0);ax=c[200]|0;if((e+1&2|0)==0){aL=+h[64664+(ax*688&-1)>>3];h[14]=aL;b1=+h[64672+(ax*688&-1)>>3];h[3305]=b1;b8=c[144]|0;a2=+h[64672+(b8*688&-1)>>3];h[7088]=a2;b9=64664+(b8*688&-1)|0;ca=b8;cb=aL;cc=a2;cd=b1}else{b1=+h[64672+(ax*688&-1)>>3];h[14]=b1;a2=+h[64664+(ax*688&-1)>>3];h[3305]=a2;ax=c[144]|0;aL=+h[64664+(ax*688&-1)>>3];h[7088]=aL;b9=64672+(ax*688&-1)|0;ca=ax;cb=a2;cc=aL;cd=b1}b1=+h[b9>>3];h[5263]=b1;if((e&2|0)==0){h[13]=+h[64664+(ca*688&-1)>>3];ce=cd;cf=cb;cg=64672+(ca*688&-1)|0}else{h[13]=+h[64672+(ca*688&-1)>>3];ce=cb;cf=cd;cg=64664+(ca*688&-1)|0}h[3304]=+h[cg>>3];h[7089]=cf;h[5264]=ce;cg=+g[3538]>90.0;h[69]=cg?cf:ce;h[97]=cg?cc:b1;do{if((a[38984]&1)==0&(c[10026]|0)==0){fw(b,d,0,0)}else{if(!((c[5094]|0)!=0&(c[14088]|0)==0)){break}fw(b,d,3,0)}}while(0);if((a[38984]&1)==0&(c[10026]|0)==-1){fw(b,d,2,0)}cg=(c[5094]|0)==0;if(cg){b1=+h[7076];ca=c[200]|0;cc=+h[64664+(ca*688&-1)>>3];ce=+h[91];cf=+h[96];cd=(+h[14]-cc)*ce+cf+-1.0;e=c[144]|0;cb=+h[64664+(e*688&-1)>>3];aL=+h[21];a2=+h[68];aJ=(+h[13]-cb)*aL+a2+-1.0;aR=+h[5279];a_=+h[2];aK=+h[12];a1=(b1-aR)*a_+aK+-1.0;aS=+h[403];b_=+h[391];aO=+h[395];aW=+h[399];a4=a1*aW;bX=+h[406];b2=+h[394];b$=+h[398];b0=+h[402];bB=a1*b0;a1=bX+cd*b2+aJ*b$+bB;b9=c[180]|0;aM=+(b9|0);ax=c[186]|0;b8=~~((aS+cd*b_+aJ*aO+a4)/(a1==0.0?1.0e-5:a1)*aM)+ax|0;a1=cf+ce*(+h[7089]-cc)+-1.0;aJ=a2+aL*(+h[7088]-cb)+-1.0;cd=bB+(bX+b2*a1+b$*aJ);bW=~~(aM*((a4+(aS+b_*a1+aO*aJ))/(cd==0.0?1.0e-5:cd)))+ax|0;cd=cf+ce*(+h[3305]-cc)+-1.0;aJ=a2+aL*(+h[3304]-cb)+-1.0;a1=bB+(bX+b2*cd+b$*aJ);bI=~~(aM*((a4+(aS+b_*cd+aO*aJ))/(a1==0.0?1.0e-5:a1)))+ax|0;c[7938]=(b8|0)<(bW|0)?b8:bW;c[7939]=(bW|0)>(bI|0)?bW:bI;ch=ca;ci=cc;cj=e;ck=cb;cl=b1;cm=ce;cn=cf;co=aL;cp=a2;cq=aR;cr=a_;cs=aK;ct=aS;cu=b_;cv=aO;cw=aW;cx=bX;cy=b2;cz=b$;cA=b0;cB=b9;cC=ax}else{ax=c[200]|0;b0=+h[64664+(ax*688&-1)>>3];b9=c[144]|0;b$=+h[64664+(b9*688&-1)>>3];b2=+h[7076];bX=+h[91];aW=+h[96];aO=(b0-b0)*bX+aW+-1.0;b_=+h[21];aS=+h[68];aK=(b$-b$)*b_+aS+-1.0;a_=+h[5279];aR=+h[2];a2=+h[12];aL=(b2-a_)*aR+a2+-1.0;cf=+h[403];ce=+h[391];b1=+h[395];cb=+h[399];cc=aL*cb;a1=+h[404];aJ=+h[392];cd=+h[396];a4=aL*+h[400];aM=+h[406];bB=+h[394];aU=+h[398];aT=+h[402];b6=aL*aT;aL=aM+aO*bB+aK*aU+b6;b7=aL==0.0?1.0e-5:aL;e=c[180]|0;aL=+(e|0);ca=c[186]|0;b3=+(c[40]|0);bI=c[46]|0;b5=aW+bX*(+h[64672+(ax*688&-1)>>3]-b0)+-1.0;aV=aS+b_*(+h[64672+(b9*688&-1)>>3]-b$)+-1.0;cD=b6+(aM+bB*b5+aU*aV);b6=cD==0.0?1.0e-5:cD;c[7938]=~~((cf+aO*ce+aK*b1+cc)/b7*aL)+ca;c[7939]=~~(aL*((cc+(cf+ce*b5+b1*aV))/b6))+ca;c[7940]=~~(b3*((a4+(a1+aJ*b5+cd*aV))/b6))+bI;c[7941]=~~((a1+aO*aJ+aK*cd+a4)/b7*b3)+bI;ch=ax;ci=b0;cj=b9;ck=b$;cl=b2;cm=bX;cn=aW;co=b_;cp=aS;cq=a_;cr=aR;cs=a2;ct=cf;cu=ce;cv=b1;cw=cb;cx=aM;cy=bB;cz=aU;cA=aT;cB=e;cC=ca}if((c[1119]|0)!=0){if(cg){fx(4560,aA,aB,109288);cg=(c[aA>>2]|0)+(((c[7939]|0)+(c[7938]|0)|0)/2&-1)|0;ca=(c[aB>>2]|0)+(c[7941]|0)|0;cE=cg;cF=ca+aa(c[aH+20>>2]|0,c[1100]|0)|0}else{if((c[64916+(ch*688&-1)>>2]&4|0)==0){cH=0}else{ca=~~(+((c[(c[3524]|0)+24>>2]|0)>>>0>>>0)*+h[65056+(ch*688&-1)>>3]*((a[65072+(ch*688&-1)|0]&1)!=0?-1.0:1.0));cH=(ca|0)<0?0:ca}aT=(ci-ci)*cm+cn+-1.0;aU=(ck-ck)*co+cp+-1.0;bB=(cl-cq)*cr+cs+-1.0;cs=bB*cw;cw=bB*cA;cA=cx+aT*cy+aU*cz+cw;cr=cA==0.0?1.0e-5:cA;cA=+(cB|0);cB=~~((+h[404]+aT*+h[392]+aU*+h[396]+bB*+h[400])/cr*+(c[40]|0));ca=c[46]|0;bB=cn+cm*(+h[64672+(ch*688&-1)>>3]-ci)+-1.0;ci=cp+co*(+h[64672+(cj*688&-1)>>3]-ck)+-1.0;ck=cw+(cx+cy*bB+cz*ci);fx(4560,aA,aB,109288);cE=(c[aA>>2]|0)+(((~~(cA*((cs+(ct+cu*bB+cv*ci))/(ck==0.0?1.0e-5:ck)))+~~((ct+aT*cu+aU*cv+cs)/cr*cA)|0)+(cC<<1)|0)/2&-1)|0;cF=~~(+(((ca+cH|0)+cB|0)+(c[aB>>2]|0)|0)+ +((c[aH+16>>2]|0)>>>0>>>0)*(+(c[1100]|0)+1.0+-.5))}aB=a[4600]&1;do{if(aB<<24>>24!=0){if((a[37456]&1)!=0){break}a[37456]=1;cB=c[(c[3524]|0)+88>>2]|0;if((cB|0)==0){break}cO[cB&255](179864)}}while(0);a[37456]=aB;fn(4488,aH);ln(cE,cF,c[1119]|0,1,0,0,c[1120]|0);if((c[1122]|0)!=0){cM[c[aH+64>>2]&511](-2)}a[37456]=0}L10120:do{if((c[1183]|0)!=0){fx(4816,aE,aF,109288);cF=c[aH+16>>2]|0;cE=(c[aE>>2]|0)+cF|0;if((c[1166]|0)==0){cI=+((((c[7941]|0)-cF|0)+(c[aF>>2]|0)|0)>>>0>>>0)}else{cI=+(cF>>>0>>>0)+(+g[44]*+h[64672+((c[144]|0)*688&-1)>>3]+ +(c[aF>>2]|0))}cF=~~cI;cG(aD|0);aB=aC|0;cB=c[1183]|0;cH=aN(aD|0)|0;bw(aB|0,1024,cB|0,cH|0);do{if((c[1164]|0)!=0){cH=aH+72|0;if((cO[c[cH>>2]&255](-270)|0)==0){break}cB=c[1184]|0;if((c[1166]|0)==0){ln(cE,cF,aB,2,0,-270,cB)}else{ln(cE,cF,aB,0,0,-270,cB)}cB=c[cH>>2]|0;cO[cB&255](0);break L10120}}while(0);cB=c[1184]|0;if((c[1166]|0)==0){ln(cE,cF,aB,0,0,0,cB);break}else{ln(cE,cF,aB,0,2,0,cB);break}}}while(0);do{if(!bE){if((a[55536]&1)==0){break}if(!(a[31104]|0)){break}if(!((a[54016]|0)!=110&(c[13506]|0)==0)){break}dD(2)}}while(0);fO(c[10818]|0,0,3);aD=c[10822]|0;aC=c[(c[3524]|0)+92>>2]|0;if((aC|0)!=0){cK[aC&63](+h[3817])}if((aD|0)!=0){aC=aD;do{if((c[aC+56>>2]|0)==0){fK(aC+8|0,at,au,202256);fp(~~+h[at>>3],~~+h[au>>3],aC)}aC=c[aC>>2]|0;}while((aC|0)!=0)}fy(0);cM[c[(c[3524]|0)+168>>2]&511](2);do{if((a[38984]&1)!=0){if((a[46752]&1)==0|bE){break}gs();c[225]=0;c[11605]=0;c[7625]=0}}while(0);if((a[36229]&1)==0){c[9010]=0;aC=c[9002]|0;c[9006]=aC;au=aH+20|0;at=c[8712]|0;c[8990]=aa(at+1|0,-(c[au>>2]|0)|0);c[8986]=-(c[au>>2]|0);aD=~~(+((c[au>>2]|0)>>>0>>>0)*(+h[4526]+ +(at+2|0)));c[8998]=aD;at=aC+(c[au>>2]|0)|0;c[8994]=at;cJ=0;cL=aC;cP=aD;cQ=at}else{at=c[9002]|0;aD=-at|0;c[9010]=aD;c[9006]=0;aC=aH+20|0;c[8990]=c[aC>>2];au=c[8712]|0;c[8986]=aa(au+1|0,c[aC>>2]|0);aF=~~(+((c[aC>>2]|0)>>>0>>>0)*(+(au+2|0)+ +h[4526]));c[8994]=aF;au=at+(c[aC>>2]|0)|0;c[8998]=au;cJ=aD;cL=0;cP=au;cQ=aF}c[9018]=(cL+cJ|0)/2&-1;cJ=c[9031]|0;L10163:do{if((a[36120]&1)==0){cT=0;cU=cP;a0=7507}else{do{if((cJ|0)==0){a0=7493}else if((cJ|0)==3){a0=7508;break L10163}else{if((c[9032]|0)!=1){a0=7493;break}cL=c[6962]|0;if((cL|0)<=0){cV=0;cW=cP;cX=c[aH+16>>2]|0;break}aF=c[7938]|0;au=(c[7939]|0)-aF|0;aD=(au|0)/(c[9028]|0)&-1;aC=(aD|0)<1?1:aD;c[9024]=aC;aD=cL-1|0;cL=(aD+aC|0)/(aC|0)&-1;c[9014]=cL;aC=c[9339]|0;if((cL|0)>(aC|0)&(aC|0)>0){c[9014]=aC;cY=aC}else{cY=cL}cL=(aD+cY|0)/(cY|0)&-1;c[9024]=cL;c[9028]=(au|0)/(cL|0)&-1;aD=aa(au,cP);au=((aD|0)/(aa(cQ+cP|0,cL)|0)&-1)+aF|0;cI=+g[44]*+((c[aH+12>>2]|0)>>>0>>>0);cA=cI+ +(aa(c[9022]|0,cY)|0);aF=c[aH+16>>2]|0;cV=~~(cA+(+h[4487]+2.0)*+(aF>>>0>>>0));cW=au;cX=aF}}while(0);L10174:do{if((a0|0)==7493){if((c[9044]|0)==0){aB=c[aH+16>>2]|0;cZ=((c[7941]|0)-(c[aH+24>>2]|0)|0)-aB|0;c_=aB}else{aB=(c[aH+24>>2]|0)+(c[7940]|0)|0;cA=+((aB+aa(c[9014]|0,c[9022]|0)|0)>>>0>>>0);aB=c[aH+16>>2]|0;cZ=~~(cA+ +h[4487]*+(aB>>>0>>>0));c_=aB}aB=(cJ|0)!=0;cF=c[9032]|0;if(aB&(cF|0)==3){cV=cZ;cW=((c[aH+28>>2]|0)+(c[7939]|0)|0)+cP|0;cX=c_;break}if(aB&(cF|0)==2){cV=cZ;cW=(c[aH+20>>2]<<1)+cP|0;cX=c_;break}if((c[9045]|0)==0){cV=cZ;cW=((c[aH+28>>2]|0)+(c[7938]|0)|0)+cP|0;cX=c_;break}do{if((c[6598]|0)==3){if((cJ-1|0)>>>0>=2){break}cV=cZ;cW=(((c[7939]|0)-cQ|0)+(c[9028]|0)|0)-(c[aH+20>>2]<<1)|0;cX=c_;break L10174}}while(0);cF=(c[7939]|0)-cQ|0;cV=cZ;cW=cF-aa((c[9024]|0)-1|0,c[9028]|0)|0;cX=c_}}while(0);c[56]=~~(+(cV|0)- +h[4487]*+(cX>>>0>>>0));cT=cV;cU=cW;a0=7507}}while(0);if((a0|0)==7507){if((cJ|0)==3){a0=7508}else{c$=cT;c0=cU;c1=cQ;c2=cP}}if((a0|0)==7508){fK(36136,ar,as,128552);c$=~~+h[as>>3];c0=~~+h[ar>>3];c1=c[8994]|0;c2=c[8998]|0}ar=(c1+c0|0)+aa((c[9024]|0)-1|0,c[9028]|0)|0;c[9335]=ar;c1=c0-c2|0;c[9334]=c1;cA=+(c$|0);c2=aH+16|0;c[9337]=~~(cA+ +((c[c2>>2]|0)>>>0>>>0)*+h[4487]);c[9336]=c$-aa(c[9014]|0,c[9022]|0);if((c1|0)<0){c[9334]=0;c3=0}else{c3=c1}c1=a[36120]|0;if((c1&1)==0|(a[36288]|0)==0){c4=c$;c5=c1}else{if((c[9330]|0)==3&+h[4666]<0.0){fn(36272,aH)}else{fn(37320,aH)}c1=aH+96|0;if((c[c1>>2]&32|0)==0){c6=0.0}else{c6=(a8(36288,94)|0)==0?0.0:.51}ln((c3+ar|0)/2&-1,~~(+(c[9337]|0)-(c6*.5+.5)*+((c[c2>>2]|0)>>>0>>>0)),36288,1,0,0,c[9329]|0);do{if((c[c1>>2]&32|0)==0){c7=c6}else{if((a8(36288,95)|0)==0){c7=c6;break}c7=c6+.3}}while(0);h[4487]=c7+ +h[4487];c6=c7*+((c[c2>>2]|0)>>>0>>>0);c[9336]=~~(+(c[9336]|0)-c6);cM[c[aH+64>>2]&511](-2);c4=~~(cA-c6);c5=a[36120]|0}c1=c[9059]|0;do{if((c5&1)!=0&(c1|0)>-3){ar=c[9336]|0;if((c[9337]|0)==(ar|0)){c8=c4;break}c3=~~(+h[4527]*.5*+((c[c2>>2]|0)>>>0>>>0));c[9336]=ar-(c3<<1);ar=c4-c3|0;c3=aq;c[c3>>2]=c[9068];c[c3+4>>2]=c[36276>>2];c[c3+8>>2]=c[36280>>2];c[c3+12>>2]=c[36284>>2];do{if((c[9058]|0)!=0){c6=+h[4532];c3=c[(c[3524]|0)+92>>2]|0;if(c6<0.0){cK[c3&63](+h[3817]);break}else{cK[c3&63](c6);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[4531]);c3=c[(c[3524]|0)+64>>2]|0;if((c1|0)<-5){cM[c3&511](-2)}else{cM[c3&511](c1)}c3=c[3524]|0;do{if((a[36264]&1)==0){if((c[c3+96>>2]&1024|0)!=0){c9=c3;break}c[aq>>2]=1;c[aq+4>>2]=c1;a0=7533}else{a0=7533}}while(0);if((a0|0)==7533){fn(aq,c3);c9=c[3524]|0}c$=c[c9+172>>2]|0;if((c$|0)!=0){cM[c$&511](0)}c$=aH+56|0;cN[c[c$>>2]&255](c[9334]|0,c[9336]|0);as=aH+60|0;cN[c[as>>2]&255](c[9334]|0,c[9337]|0);cN[c[as>>2]&255](c[9335]|0,c[9337]|0);cN[c[as>>2]&255](c[9335]|0,c[9336]|0);cN[c[as>>2]&255](c[9334]|0,c[9336]|0);cP=c[(c[3524]|0)+172>>2]|0;if((cP|0)!=0){cM[cP&511](1)}cN[c[c$>>2]&255](c[9334]|0,~~(+(c[9337]|0)- +h[4487]*+((c[c2>>2]|0)>>>0>>>0)));cN[c[as>>2]&255](c[9335]|0,~~(+(c[9337]|0)- +h[4487]*+((c[c2>>2]|0)>>>0>>>0)));c8=ar}else{c8=c4}}while(0);do{if((a[38984]&1)!=0&(c[9744]|0)==0){if((a[46752]&1)==0|bE){break}cM[c[(c[3524]|0)+168>>2]&511](6);gv(b,d);cM[c[(c[3524]|0)+168>>2]&511](7)}}while(0);c4=c8-((c[9022]|0)/2&-1)|0;c[56]=c4;do{if((d|0)==1){if((c[b+252>>2]|0)!=1){break}if((a[55536]&1)==0){break}if(!((c[b+12>>2]|0)==352|(c[7662]|0)==1)){break}c8=c[m>>2]|0;aI(94544,137,1,c8|0)}}while(0);if((c[11690]|0)==0&(a[55536]&1)!=0&(a[30641]|0)==100){c8=c[6952]|0;if((c8|0)!=0){uu(c8)}c[6952]=0;c[18084]=0;c[12904]=0;da=1}else{da=0}L10258:do{if(!(bE|aP^1)){c8=ap;c2=ap|0;c9=ap+4|0;aq=aG;c1=aG+4|0;c5=C;as=aG+40|0;c$=as;cP=aG|0;cQ=aG+16|0;cU=aG+32|0;cT=C|0;cJ=C+4|0;cW=aH+64|0;cV=B;cX=B|0;c_=B+4|0;cZ=aG+24|0;cY=j|0;cF=j+8|0;aB=j+16|0;cE=j+32|0;aF=j+40|0;au=k|0;cL=k+8|0;aD=k+16|0;aC=k+32|0;at=k+40|0;aE=aG+40|0;cB=r|0;cH=r+8|0;ca=r+4|0;cC=aG+44|0;aA=aG+48|0;cj=q;ch=q|0;cg=q+4|0;e=ak|0;b9=ak+4|0;ax=ak+8|0;bI=L|0;bW=K;b8=L+7|0;bV=K|0;aY=K+4|0;bH=J;bP=J+4|0;bQ=J+8|0;bO=J+16|0;bN=J|0;bZ=G;bY=G|0;bT=G+4|0;bU=F;aX=F+4|0;a$=F+8|0;by=F+16|0;bS=F|0;bR=c0;bL=c4;bv=0;bM=b;bD=1;while(1){if((a[55536]&1)==0){db=0}else{db=(a[bM+56|0]&1)!=0}if((c[bM+8>>2]|0)==4){dc=bv;dd=bL;de=bR}else{cM[c[(c[3524]|0)+168>>2]&511](6);if((a[55536]&1)!=0&(c[7662]|0)==1){i5(bM)}do{if((a[36120]&1)==0){df=0}else{bK=bM+16|0;bb=c[bK>>2]|0;if((bb|0)==0){df=0;break}if((a[bb]|0)==0){df=0;break}if((a[bM+22|0]&1)!=0){df=0;break}if((c[9330]|0)==0){cM[c[cW>>2]&511](-2)}else{fn(37320,aH)}bb=a[bM+20|0]&1;do{if(bb<<24>>24!=0){if((a[37456]&1)!=0){break}a[37456]=1;bJ=c[(c[3524]|0)+88>>2]|0;if((bJ|0)==0){break}cO[bJ&255](179864)}}while(0);a[37456]=bb;fz(bR,bL,c[bK>>2]|0);a[37456]=0;df=1}}while(0);bJ=bM+24|0;bz=bM+64|0;c[c8>>2]=c[bz>>2];c[c8+4>>2]=c[bz+4>>2];c[c8+8>>2]=c[bz+8>>2];c[c8+12>>2]=c[bz+12>>2];bz=c[bM+28>>2]|0;bA=bJ|0;do{if((c[bA>>2]|0)!=0){c6=+h[bM+48>>3];bC=c[(c[3524]|0)+92>>2]|0;if(c6<0.0){cK[bC&63](+h[3817]);break}else{cK[bC&63](c6);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[bM+40>>3]);bC=c[(c[3524]|0)+64>>2]|0;if((bz|0)<-5){cM[bC&511](-2)}else{cM[bC&511](bz)}bC=bM+56|0;bF=c[3524]|0;do{if((a[bC]&1)==0){if((c[bF+96>>2]&1024|0)!=0){break}c[c2>>2]=1;c[c9>>2]=bz;a0=7580}else{a0=7580}}while(0);if((a0|0)==7580){a0=0;fn(ap,bF)}bz=bM+12|0;bl=c[bz>>2]|0;L10301:do{if((bl|0)==64){if((a[46752]&1)==0){break}if((a[bM+238|0]&1)!=0){break}c[bM+32>>2]=-1;c[bA>>2]=1;do{if(df){if((a[bC]&1)!=0){fD(bM,bR,bL,-1);break}bs=c[13542]|0;bn=c[3524]|0;c[13542]=(c[bn+96>>2]&128|0)==0?55520:0;cM[c[bn+168>>2]&511](8);bn=(c[9018]|0)+bR|0;bm=c[13542]|0;if((bm|0)==0){a0=7690}else{bG=(c[bm>>2]|0)>(bn|0)&1;a5=(c[bm+4>>2]|0)<(bn|0)?bG|2:bG;bG=(c[bm+8>>2]|0)>(bL|0)?a5|4:a5;if((((c[bm+12>>2]|0)<(bL|0)?bG|8:bG)|0)==0){a0=7690}}if((a0|0)==7690){a0=0;cR[c[(c[3524]|0)+80>>2]&127](bn,bL,-1)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=bs}}while(0);if((a[38984]&1)!=0){if((a[bM+236|0]&1)==0){break}}fE(bM,-1)}else if((bl|0)==225){do{if(df){if((a[bC]&1)!=0){fA(bM,bR,bL);break}bK=c[13542]|0;bb=c[3524]|0;c[13542]=(c[bb+96>>2]&128|0)==0?55520:0;cM[c[bb+168>>2]&511](8);bb=(c[9006]|0)+bR|0;c[M>>2]=(c[9010]|0)+bR;c[N>>2]=bL;c[O>>2]=bb;c[Q>>2]=bL;bb=c[3524]|0;if((fl(M,N,O,Q)|0)!=0){cN[c[bb+56>>2]&255](c[M>>2]|0,c[N>>2]|0);cN[c[bb+60>>2]&255](c[O>>2]|0,c[Q>>2]|0)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=bK}}while(0);if((a[38984]&1)!=0){if((a[bM+236|0]&1)==0){break}}bK=bM+260|0;bb=c[bK>>2]|0;bs=c[bb+12>>2]|0;bn=c[(c[bb>>2]|0)+12>>2]|0;bb=c[bM+88>>2]|0;bG=c[bM+92>>2]|0;c6=+h[bM+104>>3];cA=+h[bM+112>>3];bm=a[bM+120|0]|0;uD(bI|0,bM+121|0,23);a5=c[bM+144>>2]|0;c7=+h[bM+152>>3];aZ=c[bM+160>>2]|0;cI=+h[bM+168>>3];cr=+h[bM+176>>3];bo=c[bM+184>>2]|0;uD(bW|0,b8|0,16);do{if((bb|0)!=0){az=c[(c[3524]|0)+92>>2]|0;if(cA<0.0){cK[az&63](+h[3817]);break}else{cK[az&63](cA);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](c6);bb=c[(c[3524]|0)+64>>2]|0;if((bG|0)<-5){cM[bb&511](-2)}else{cM[bb&511](bG)}bb=c[3524]|0;do{if((bm&1)==0){if((c[bb+96>>2]&1024|0)!=0){break}c[bV>>2]=1;c[aY>>2]=bG;a0=7713}else{a0=7713}}while(0);if((a0|0)==7713){a0=0;fn(K,bb)}bG=c[200]|0;h[64776+(bG*688&-1)>>3]=+((c[7939]|0)-(c[7938]|0)|0)/(+h[64672+(bG*688&-1)>>3]- +h[64664+(bG*688&-1)>>3]);c[12912]=bo;c[12910]=0;if(c7>0.0){uE(bH|0,0,40);c[bP>>2]=2;c[bQ>>2]=2;h[bO>>3]=c7;c[bN>>2]=aZ;fN(J,H,I,123984);h[6458]=cI;h[6457]=cr;c[12910]=~~+h[H>>3]}if((c[(c[bK>>2]|0)+8>>2]|0)<=0){break}bG=bM+80|0;bm=a5;az=0;while(1){a3=bs+(az<<6)|0;bt=a3|0;do{if((c[bt>>2]|0)==2){dg=bm}else{ay=bn+(az<<6)|0;if((c[ay>>2]|0)==2){dg=bm;break}do{if((c[bG>>2]|0)==-3){a9=~~+h[bs+(az<<6)+32>>3];bh=43296;while(1){dh=c[bh>>2]|0;if((dh|0)==0){a0=7724;break}if((c[dh+4>>2]|0)==(a9|0)){a0=7725;break}else{bh=dh|0}}do{if((a0|0)==7724){a0=0;uD(bI|0,51521,23);uh(-1,79128,(v=i,i=i+8|0,c[v>>2]=a9,v)|0);uD(bZ|0,b8|0,16);di=0;dj=90.0;dk=15.0;dl=0;dm=0.0;dn=1;dp=0;dq=1.0;dr=-2}else if((a0|0)==7725){a0=0;bh=c[dh+16>>2]|0;aQ=c[dh+20>>2]|0;c6=+h[dh+32>>3];cA=+h[dh+40>>3];bi=a[dh+48|0]|0;uD(bI|0,dh+49|0,23);a7=c[dh+72>>2]|0;cs=+h[dh+80>>3];bu=c[dh+88>>2]|0;cv=+h[dh+96>>3];aU=+h[dh+104>>3];br=c[dh+112>>2]|0;uD(bZ|0,b8|0,16);if((bh|0)==0){di=br;dj=aU;dk=cv;dl=bu;dm=cs;dn=a7;dp=bi;dq=c6;dr=aQ;break}bh=c[(c[3524]|0)+92>>2]|0;if(cA<0.0){cK[bh&63](+h[3817]);di=br;dj=aU;dk=cv;dl=bu;dm=cs;dn=a7;dp=bi;dq=c6;dr=aQ;break}else{cK[bh&63](cA);di=br;dj=aU;dk=cv;dl=bu;dm=cs;dn=a7;dp=bi;dq=c6;dr=aQ;break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](dq);a9=c[(c[3524]|0)+64>>2]|0;if((dr|0)<-5){cM[a9&511](-2)}else{cM[a9&511](dr)}a9=c[3524]|0;do{if((dp&1)==0){if((c[a9+96>>2]&1024|0)!=0){break}c[bY>>2]=1;c[bT>>2]=dr;a0=7735}else{a0=7735}}while(0);if((a0|0)==7735){a0=0;fn(G,a9)}c[12912]=di;c[12910]=0;if(dm<=0.0){ds=dn;break}uE(bU|0,0,40);c[aX>>2]=2;c[a$>>2]=2;h[by>>3]=dm;c[bS>>2]=dl;fN(F,D,E,123984);h[6458]=dk;h[6457]=dj;c[12910]=~~+h[D>>3];ds=dn}else{fL(bM,a3);ds=bm}}while(0);if((c[bt>>2]|0)!=0){dg=ds;break}if((c[ay>>2]|0)!=0){dg=ds;break}c6=+h[64664+((c[200]|0)*688&-1)>>3];cs=+h[91];cv=+h[96];aU=(+h[bs+(az<<6)+8>>3]-c6)*cs+cv+-1.0;cA=+h[64664+((c[144]|0)*688&-1)>>3];cu=+h[21];aT=+h[68];ct=(+h[bs+(az<<6)+16>>3]-cA)*cu+aT+-1.0;ck=+h[5279];ci=+h[2];bB=+h[12];cz=(+h[bs+(az<<6)+24>>3]-ck)*ci+bB+-1.0;cy=+h[403];cx=+h[391];cw=+h[395];co=+h[399];cp=+h[404];cm=+h[392];cn=+h[396];cq=+h[400];cl=+h[406];aM=+h[394];cb=+h[398];b1=+h[402];ce=cl+aU*aM+ct*cb+cz*b1;cf=ce==0.0?1.0e-5:ce;ce=+(c[180]|0);aQ=c[186]|0;a2=+(c[40]|0);bi=c[46]|0;aR=cv+cs*(+h[bn+(az<<6)+8>>3]-c6)+-1.0;c6=aT+cu*(+h[bn+(az<<6)+16>>3]-cA)+-1.0;cA=bB+ci*(+h[bn+(az<<6)+24>>3]-ck)+-1.0;ck=cl+aM*aR+cb*c6+b1*cA;b1=ck==0.0?1.0e-5:ck;fm(~~((cy+aU*cx+ct*cw+cz*co)/cf*ce)+aQ|0,~~((cp+aU*cm+ct*cn+cz*cq)/cf*a2)+bi|0,~~(ce*((cy+cx*aR+cw*c6+co*cA)/b1))+aQ|0,~~(a2*((cp+cm*aR+cn*c6+cq*cA)/b1))+bi|0,ds);dg=ds}}while(0);bt=az+1|0;if((bt|0)<(c[(c[bK>>2]|0)+8>>2]|0)){bm=dg;az=bt}else{break}}}else if((bl|0)==416){c[bM+228>>2]=1;f3(bM,0)}else if((bl|0)==432){c[bM+228>>2]=2;f3(bM,0)}else if((bl|0)==295|(bl|0)==279|(bl|0)==311|(bl|0)==102|(bl|0)==86|(bl|0)==118|(bl|0)==137|(bl|0)==169|(bl|0)==252|(bl|0)==474|(bl|0)==257|(bl|0)==457|(bl|0)==489|(bl|0)==18){if((a[46752]&1)==0){break}if((a[bM+238|0]&1)!=0){break}do{if(df){az=c[bM+32>>2]|0;if((a[bC]&1)!=0){fD(bM,bR,bL,az);break}bm=c[13542]|0;bK=c[3524]|0;c[13542]=(c[bK+96>>2]&128|0)==0?55520:0;cM[c[bK+168>>2]&511](8);bK=(c[9018]|0)+bR|0;bn=c[13542]|0;if((bn|0)==0){a0=7655}else{bs=(c[bn>>2]|0)>(bK|0)&1;bG=(c[bn+4>>2]|0)<(bK|0)?bs|2:bs;bs=(c[bn+8>>2]|0)>(bL|0)?bG|4:bG;if((((c[bn+12>>2]|0)<(bL|0)?bs|8:bs)|0)==0){a0=7655}}if((a0|0)==7655){a0=0;cR[c[(c[3524]|0)+80>>2]&127](bK,bL,az)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=bm}}while(0);if((a[38984]&1)!=0){if((a[bM+236|0]&1)==0){break}}fE(bM,c[bM+32>>2]|0)}else if((bl|0)==368){if((a[38984]&1)!=0){if((a[bM+236|0]&1)==0){break}}bm=c[c[bM+224>>2]>>2]|0;az=c[(c[3524]|0)+92>>2]|0;if((az|0)!=0){cK[az&63](+h[3817])}if((bm|0)==0){break}else{dt=bm}do{L10414:do{if((c[dt+56>>2]|0)==99){cr=(+h[dt+24>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;cI=(+h[dt+32>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;c7=(+h[dt+40>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;b1=+h[406]+cr*+h[394]+cI*+h[398]+c7*+h[402];cA=b1==0.0?1.0e-5:b1;bm=~~((+h[403]+cr*+h[391]+cI*+h[395]+c7*+h[399])/cA*+(c[180]|0))+(c[186]|0)|0;az=~~((+h[404]+cr*+h[392]+cI*+h[396]+c7*+h[400])/cA*+(c[40]|0))+(c[46]|0)|0;do{if((c[5094]|0)!=0){bK=c[13542]|0;if((bK|0)==0){break}bs=(c[bK>>2]|0)>(bm|0)&1;bn=(c[bK+4>>2]|0)<(bm|0)?bs|2:bs;bs=(c[bK+8>>2]|0)>(az|0)?bn|4:bn;if((((c[bK+12>>2]|0)<(az|0)?bs|8:bs)|0)!=0){break L10414}}}while(0);fp(bm,az,dt)}}while(0);dt=c[dt>>2]|0;}while((dt|0)!=0)}else if((bl|0)==400){c[bM+228>>2]=0;f3(bM,0)}else if((bl|0)==352){if((a[46752]&1)==0){break}if((a[bM+238|0]&1)!=0){break}if(!((a[55536]&1)!=0&(c[7662]|0)!=1)){break}i5(bM);if(da){break}i3()}else if((bl|0)==153|(bl|0)==345|(bl|0)==33){if(df){ay=c[13542]|0;bs=c[3524]|0;c[13542]=(c[bs+96>>2]&128|0)==0?55520:0;cM[c[bs+168>>2]&511](8);bs=(c[9006]|0)+bR|0;c[al>>2]=(c[9010]|0)+bR;c[am>>2]=bL;c[an>>2]=bs;c[ao>>2]=bL;bs=c[3524]|0;if((fl(al,am,an,ao)|0)!=0){cN[c[bs+56>>2]&255](c[al>>2]|0,c[am>>2]|0);cN[c[bs+60>>2]&255](c[an>>2]|0,c[ao>>2]|0)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=ay}do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}if((a[bM+238|0]&1)==0){break L10301}}}while(0);ay=c[bM+260>>2]|0;bs=c[bM+64>>2]|0;do{if((a[55536]&1)==0){du=0}else{if((a[bM+239|0]&1)==0){du=0;break}du=+h[bM+72>>3]<0.0}}while(0);do{if(!((bs|0)!=3|du)){bK=c[bM+68>>2]|0;bn=(c[3524]|0)+144|0;if((c[bn>>2]|0)==0){break}c[e>>2]=3;c[b9>>2]=bK;h[ax>>3]=0.0;cM[c[bn>>2]&511](ak)}}while(0);if((ay|0)==0){break}else{dv=ay}do{bs=c[dv+12>>2]|0;bn=dv+8|0;if((c[bn>>2]|0)>0){bK=0;do{bG=bs+(bK<<6)|0;fL(bM,bG);a5=c[bG>>2]|0;L10451:do{if((a5|0)==0){cA=+h[bs+(bK<<6)+24>>3];c7=(+h[bs+(bK<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;cI=(+h[bs+(bK<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;cr=+h[5279];b1=+h[2];cq=+h[12];c6=(cA-cr)*b1+cq+-1.0;cn=+h[403]+c7*+h[391]+cI*+h[395];aR=+h[399];cm=+h[404]+c7*+h[392]+cI*+h[396];cp=+h[400];a2=+h[406]+c7*+h[394]+cI*+h[398];cI=+h[402];c7=a2+c6*cI;co=c7==0.0?1.0e-5:c7;c7=+(c[180]|0);bG=c[186]|0;aZ=~~((cn+c6*aR)/co*c7)+bG|0;cw=+(c[40]|0);bo=c[46]|0;bb=~~((cm+c6*cp)/co*cw)+bo|0;bt=c[34]|0;co=+h[64664+(bt*688&-1)>>3];c6=+h[64672+(bt*688&-1)>>3];if(co0.0|c6<0.0){a0=7602}else{a0=7601}}else{if(c6>0.0|co<0.0){a0=7602}else{a0=7601}}do{if((a0|0)==7601){a0=0;cx=(0.0-cr)*b1+cq+-1.0;cy=a2+cx*cI;ce=cy==0.0?1.0e-5:cy;dw=(cm+cx*cp)/ce;dx=(cn+cx*aR)/ce}else if((a0|0)==7602){a0=0;if(cA>0.0){if(co<0.0|co>cA){a0=7606}else{a0=7605}}else{if(co0.0){a0=7606}else{a0=7605}}if((a0|0)==7605){a0=0;ce=cq+b1*(co-cr)+-1.0;cx=a2+cI*ce;cy=cx==0.0?1.0e-5:cx;dw=(cm+cp*ce)/cy;dx=(cn+aR*ce)/cy;break}else if((a0|0)==7606){a0=0;cy=cq+b1*(c6-cr)+-1.0;ce=a2+cI*cy;cx=ce==0.0?1.0e-5:ce;dw=(cm+cp*cy)/cx;dx=(cn+aR*cy)/cx;break}}}while(0);a9=~~(cw*dw)+bo|0;bt=~~(c7*dx)+bG|0;c[8490]=bt;c[8488]=a9;c[ac>>2]=bt;c[ad>>2]=a9;c[ae>>2]=aZ;c[af>>2]=bb;a9=c[3524]|0;if((fl(ac,ad,ae,af)|0)!=0){cN[c[a9+56>>2]&255](c[ac>>2]|0,c[ad>>2]|0);cN[c[a9+60>>2]&255](c[ae>>2]|0,c[af>>2]|0)}c[8490]=aZ;c[8488]=bb}else if((a5|0)==1){a9=c[200]|0;aR=+h[64664+(a9*688&-1)>>3];cn=+h[64672+(a9*688&-1)>>3];cp=+h[bs+(bK<<6)+8>>3];if(aRcn){break}}else{if(cpaR){break}}a9=c[144]|0;cn=+h[64664+(a9*688&-1)>>3];cm=+h[64672+(a9*688&-1)>>3];cI=+h[bs+(bK<<6)+16>>3];if(cncm){break}}else{if(cIcn){break}}a9=c[34]|0;cm=+h[64664+(a9*688&-1)>>3];a2=+h[64672+(a9*688&-1)>>3];if(cm0.0|a2<0.0){a0=7624}else{a0=7619}}else{if(a2>0.0|cm<0.0){a0=7624}else{a0=7619}}do{if((a0|0)==7619){a0=0;cr=(cp-aR)*+h[91]+ +h[96]+-1.0;c6=(cI-cn)*+h[21]+ +h[68]+-1.0;b1=+h[5279];cq=+h[2];co=+h[12];cA=(0.0-b1)*cq+co+-1.0;cx=+h[403]+cr*+h[391]+c6*+h[395];cy=+h[399];ce=+h[404]+cr*+h[392]+c6*+h[396];cf=+h[400];cz=+h[406]+cr*+h[394]+c6*+h[398];c6=+h[402];cr=cz+cA*c6;ct=cr==0.0?1.0e-5:cr;cr=+(c[180]|0);a9=c[186]|0;bt=~~((cx+cA*cy)/ct*cr)+a9|0;aU=+(c[40]|0);a3=c[46]|0;bi=~~((ce+cA*cf)/ct*aU)+a3|0;ct=+h[bs+(bK<<6)+24>>3];if(ct>0.0){if(cm<=ct&cm>=0.0&cm!=0.0&cm!=ct){a0=7622}else{a0=7623}}else{if(cm<=0.0&cm>=ct&cm!=0.0&cm!=ct){a0=7622}else{a0=7623}}if((a0|0)==7622){a0=0;ct=(cm-b1)*cq+co+-1.0;cA=cz+ct*c6;ck=cA==0.0?1.0e-5:cA;dy=bi;dA=bt;dB=~~(aU*((ce+ct*cf)/ck))+a3|0;dC=~~(cr*((cx+ct*cy)/ck))+a9|0;break}else if((a0|0)==7623){a0=0;ck=(a2-b1)*cq+co+-1.0;co=cz+ck*c6;c6=co==0.0?1.0e-5:co;dy=bi;dA=bt;dB=~~(aU*((ce+ck*cf)/c6))+a3|0;dC=~~(cr*((cx+ck*cy)/c6))+a9|0;break}}else if((a0|0)==7624){a0=0;c6=+h[bs+(bK<<6)+24>>3];if(c6>0.0){if(cm<0.0|cm>c6){break L10451}if(a2<0.0|a2>c6){break L10451}}else{if(cm0.0){break L10451}if(a20.0){break L10451}}c6=(cp-aR)*+h[91]+ +h[96]+-1.0;cy=(cI-cn)*+h[21]+ +h[68]+-1.0;ck=+h[5279];cx=+h[2];cr=+h[12];cf=(a2-ck)*cx+cr+-1.0;ce=+h[403]+c6*+h[391]+cy*+h[395];aU=+h[399];co=+h[404]+c6*+h[392]+cy*+h[396];cz=+h[400];cq=+h[406]+c6*+h[394]+cy*+h[398];cy=+h[402];c6=cq+cf*cy;b1=c6==0.0?1.0e-5:c6;c6=+(c[180]|0);a9=c[186]|0;ct=+(c[40]|0);a3=c[46]|0;cA=cr+cx*(cm-ck)+-1.0;ck=cq+cA*cy;cy=ck==0.0?1.0e-5:ck;dy=~~(ct*((co+cA*cz)/cy))+a3|0;dA=~~(c6*((ce+cA*aU)/cy))+a9|0;dB=~~((co+cf*cz)/b1*ct)+a3|0;dC=~~((ce+cf*aU)/b1*c6)+a9|0}}while(0);c[8490]=dA;c[8488]=dy;c[ag>>2]=dA;c[ah>>2]=dy;c[ai>>2]=dC;c[aj>>2]=dB;bb=c[3524]|0;if((fl(ag,ah,ai,aj)|0)!=0){cN[c[bb+56>>2]&255](c[ag>>2]|0,c[ah>>2]|0);cN[c[bb+60>>2]&255](c[ai>>2]|0,c[aj>>2]|0)}c[8490]=dC;c[8488]=dB}}while(0);bK=bK+1|0;}while((bK|0)<(c[bn>>2]|0))}dv=c[dv>>2]|0;}while((dv|0)!=0)}else if((bl|0)==51){if((a[46752]&1)==0){break}if((a[bM+238|0]&1)!=0){break}do{if(df){if((a[bC]&1)!=0){fA(bM,bR,bL);break}ay=c[13542]|0;bn=c[3524]|0;c[13542]=(c[bn+96>>2]&128|0)==0?55520:0;cM[c[bn+168>>2]&511](8);bn=(c[9006]|0)+bR|0;c[R>>2]=(c[9010]|0)+bR;c[U>>2]=bL;c[V>>2]=bn;c[W>>2]=bL;bn=c[3524]|0;if((fl(R,U,V,W)|0)!=0){cN[c[bn+56>>2]&255](c[R>>2]|0,c[U>>2]|0);cN[c[bn+60>>2]&255](c[V>>2]|0,c[W>>2]|0)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=ay}}while(0);if((a[38984]&1)==0){a0=7670}else{if((a[bM+236|0]&1)!=0){a0=7670}}do{if((a0|0)==7670){a0=0;if(db){fB(bM);break}else{fC(bM);break}}}while(0);do{if(df){ay=c[bM+32>>2]|0;if((a[bC]&1)!=0){fD(bM,bR,bL,ay);break}bn=c[13542]|0;bK=c[3524]|0;c[13542]=(c[bK+96>>2]&128|0)==0?55520:0;cM[c[bK+168>>2]&511](8);bK=(c[9018]|0)+bR|0;bs=c[13542]|0;if((bs|0)==0){a0=7678}else{a5=(c[bs>>2]|0)>(bK|0)&1;az=(c[bs+4>>2]|0)<(bK|0)?a5|2:a5;a5=(c[bs+8>>2]|0)>(bL|0)?az|4:az;if((((c[bs+12>>2]|0)<(bL|0)?a5|8:a5)|0)==0){a0=7678}}if((a0|0)==7678){a0=0;cR[c[(c[3524]|0)+80>>2]&127](bK,bL,ay)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=bn}}while(0);if((a[38984]&1)!=0){if((a[bM+236|0]&1)==0){break}}fE(bM,c[bM+32>>2]|0)}else if((bl|0)==177|(bl|0)==184|(bl|0)==193|(bl|0)==209|(bl|0)==1){if((a[46752]&1)==0){break}if((a[bM+238|0]&1)!=0){break}do{if(df){if((a[bC]&1)!=0){fA(bM,bR,bL);break}bn=c[13542]|0;ay=c[3524]|0;c[13542]=(c[ay+96>>2]&128|0)==0?55520:0;cM[c[ay+168>>2]&511](8);ay=(c[9006]|0)+bR|0;c[X>>2]=(c[9010]|0)+bR;c[Y>>2]=bL;c[$>>2]=ay;c[ab>>2]=bL;ay=c[3524]|0;if((fl(X,Y,$,ab)|0)!=0){cN[c[ay+56>>2]&255](c[X>>2]|0,c[Y>>2]|0);cN[c[ay+60>>2]&255](c[$>>2]|0,c[ab>>2]|0)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=bn}}while(0);if((a[38984]&1)!=0){if((a[bM+236|0]&1)==0){break}}if(db){fB(bM);break}else{fC(bM);break}}}while(0);do{if(df){bC=bv+1|0;if((bC|0)<(c[9014]|0)){dE=bC;dF=bL-(c[9022]|0)|0;dG=bR;break}else{dE=0;dF=c[56]|0;dG=(c[9028]|0)+bR|0;break}}else{dE=bv;dF=bL;dG=bR}}while(0);do{if((c[11690]|0)==0){dH=dE;dI=dF;dJ=dG}else{bC=c[bM+256>>2]|0;if((bC|0)==0){dH=dE;dI=dF;dJ=dG;break}bl=bJ;c[aq>>2]=c[bl>>2];c[aq+4>>2]=c[bl+4>>2];c[aq+8>>2]=c[bl+8>>2];c[aq+12>>2]=c[bl+12>>2];c[aq+16>>2]=c[bl+16>>2];c[aq+20>>2]=c[bl+20>>2];c[aq+24>>2]=c[bl+24>>2];c[aq+28>>2]=c[bl+28>>2];c[aq+32>>2]=c[bl+32>>2];c[aq+36>>2]=c[bl+36>>2];c[aq+40>>2]=c[bl+40>>2];c[aq+44>>2]=c[bl+44>>2];c[aq+48>>2]=c[bl+48>>2];c[aq+52>>2]=c[bl+52>>2];bl=(a[38984]&1)+(c[c1>>2]|0)|0;c[c1>>2]=bl;c[c5>>2]=c[c$>>2];c[c5+4>>2]=c[c$+4>>2];c[c5+8>>2]=c[c$+8>>2];c[c5+12>>2]=c[c$+12>>2];do{if((c[cP>>2]|0)!=0){cm=+h[cZ>>3];bA=c[(c[3524]|0)+92>>2]|0;if(cm<0.0){cK[bA&63](+h[3817]);break}else{cK[bA&63](cm);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[cQ>>3]);bA=c[(c[3524]|0)+64>>2]|0;if((bl|0)<-5){cM[bA&511](-2)}else{cM[bA&511](bl)}bA=c[3524]|0;do{if((a[cU]&1)==0){if((c[bA+96>>2]&1024|0)!=0){break}c[cT>>2]=1;c[cJ>>2]=bl;a0=7778}else{a0=7778}}while(0);if((a0|0)==7778){a0=0;fn(C,bA)}do{if((a[36120]&1)==0){dK=dE;dL=dF;dM=dG}else{bl=bM+16|0;bF=c[bl>>2]|0;if((bF|0)==0){dK=dE;dL=dF;dM=dG;break}if((a[bF]|0)==0){dK=dE;dL=dF;dM=dG;break}if((a[bM+22|0]&1)!=0){dK=dE;dL=dF;dM=dG;break}if((a[46752]&1)!=0){dK=dE;dL=dF;dM=dG;break}if((a[35888]&1)!=0){dK=dE;dL=dF;dM=dG;break}cM[c[cW>>2]&511](-2);fz(dG,dF,c[bl>>2]|0);c[cV>>2]=c[c$>>2];c[cV+4>>2]=c[c$+4>>2];c[cV+8>>2]=c[c$+8>>2];c[cV+12>>2]=c[c$+12>>2];bl=c[c1>>2]|0;do{if((c[cP>>2]|0)!=0){cm=+h[cZ>>3];bF=c[(c[3524]|0)+92>>2]|0;if(cm<0.0){cK[bF&63](+h[3817]);break}else{cK[bF&63](cm);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[cQ>>3]);bF=c[(c[3524]|0)+64>>2]|0;if((bl|0)<-5){cM[bF&511](-2)}else{cM[bF&511](bl)}bF=c[3524]|0;do{if((a[cU]&1)==0){if((c[bF+96>>2]&1024|0)!=0){break}c[cX>>2]=1;c[c_>>2]=bl;a0=7795}else{a0=7795}}while(0);if((a0|0)==7795){a0=0;fn(B,bF)}bl=c[bz>>2]|0;if((bl|0)==33|(bl|0)==1|(bl|0)==153|(bl|0)==345|(bl|0)==225|(bl|0)==177|(bl|0)==193|(bl|0)==209){bn=c[13542]|0;ay=c[3524]|0;c[13542]=(c[ay+96>>2]&128|0)==0?55520:0;cM[c[ay+168>>2]&511](8);ay=(c[9006]|0)+dG|0;c[x>>2]=(c[9010]|0)+dG;c[y>>2]=dF;c[z>>2]=ay;c[A>>2]=dF;ay=c[3524]|0;if((fl(x,y,z,A)|0)!=0){cN[c[ay+56>>2]&255](c[x>>2]|0,c[y>>2]|0);cN[c[ay+60>>2]&255](c[z>>2]|0,c[A>>2]|0)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=bn}else if((bl|0)==295|(bl|0)==279|(bl|0)==311|(bl|0)==102|(bl|0)==86|(bl|0)==118|(bl|0)==169|(bl|0)==137|(bl|0)==252|(bl|0)==474|(bl|0)==257|(bl|0)==457|(bl|0)==489|(bl|0)==18){bn=c[bM+32>>2]|0;ay=c[13542]|0;bK=c[3524]|0;c[13542]=(c[bK+96>>2]&128|0)==0?55520:0;cM[c[bK+168>>2]&511](8);bK=(c[9018]|0)+dG|0;a5=c[13542]|0;if((a5|0)==0){a0=7802}else{bs=(c[a5>>2]|0)>(bK|0)&1;az=(c[a5+4>>2]|0)<(bK|0)?bs|2:bs;bs=(c[a5+8>>2]|0)>(dF|0)?az|4:az;if((((c[a5+12>>2]|0)<(dF|0)?bs|8:bs)|0)==0){a0=7802}}if((a0|0)==7802){a0=0;cR[c[(c[3524]|0)+80>>2]&127](bK,dF,bn)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=ay}else if((bl|0)==51){ay=c[13542]|0;bn=c[3524]|0;c[13542]=(c[bn+96>>2]&128|0)==0?55520:0;cM[c[bn+168>>2]&511](8);bn=(c[9006]|0)+dG|0;c[s>>2]=(c[9010]|0)+dG;c[t>>2]=dF;c[u>>2]=bn;c[w>>2]=dF;bn=c[3524]|0;if((fl(s,t,u,w)|0)!=0){cN[c[bn+56>>2]&255](c[s>>2]|0,c[t>>2]|0);cN[c[bn+60>>2]&255](c[u>>2]|0,c[w>>2]|0)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=ay}else if((bl|0)==64){bl=c[13542]|0;ay=c[3524]|0;c[13542]=(c[ay+96>>2]&128|0)==0?55520:0;cM[c[ay+168>>2]&511](8);ay=(c[9018]|0)+dG|0;bn=c[13542]|0;if((bn|0)==0){a0=7809}else{bK=(c[bn>>2]|0)>(ay|0)&1;bs=(c[bn+4>>2]|0)<(ay|0)?bK|2:bK;bK=(c[bn+8>>2]|0)>(dF|0)?bs|4:bs;if((((c[bn+12>>2]|0)<(dF|0)?bK|8:bK)|0)==0){a0=7809}}if((a0|0)==7809){a0=0;cR[c[(c[3524]|0)+80>>2]&127](ay,dF,-1)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=bl}bl=dE+1|0;if((bl|0)<(c[9014]|0)){dK=bl;dL=dF-(c[9022]|0)|0;dM=dG;break}else{dK=0;dL=c[56]|0;dM=(c[9028]|0)+dG|0;break}}}while(0);bA=bM+22|0;bl=bM+32|0;ay=dM;bK=dL;bn=dK;bs=bC;while(1){do{if((a[35888]&1)==0){dN=bn;dO=bK;dP=ay}else{if((a[bs+8|0]|0)==0){dN=bn;dO=bK;dP=ay;break}do{if((a[36120]&1)!=0){if((a[bA]&1)!=0){break}cM[c[cW>>2]&511](-2);fz(ay,bK,bs+9|0)}}while(0);do{if(db){if((c[aE>>2]|0)!=6){a0=7839;break}cm=+h[bs+48>>3];a5=c[34]|0;az=(a[66852]&1)==0;do{if((a[64788+(a5*688&-1)|0]&1)==0){if(az){dQ=cm;break}if(cm>0.0){a2=+_(+cm);dQ=a2/+h[8358];break}else{dQ=+h[8341];break}}else{if(az){dQ=+Z(+(cm*+h[64800+(a5*688&-1)>>3]));break}if(+h[64792+(a5*688&-1)>>3]==+h[8357]){dQ=cm;break}dQ=cm*+h[64800+(a5*688&-1)>>3]/+h[8358]}}while(0);cm=+h[8341];do{if(cm>2]|0)==0){break}c[cB>>2]=5;h[cH>>3]=dR;c[ca>>2]=0;cM[c[a5>>2]&511](r)}else{a0=7839}}while(0);do{if((a0|0)==7839){a0=0;cm=+h[aA>>3];a5=c[c1>>2]|0;if((a5|0)==-6){c[c1>>2]=0;a[cU]=1;dS=0}else{dS=a5}L10667:do{if((a[30080]&1)==0){a0=7855}else{if((a[35888]&1)==0){a0=7855;break}a5=dS+1|0;c[c1>>2]=a5;az=dS+2|0;bm=43280;while(1){dT=c[bm>>2]|0;if((dT|0)==0){break}if((c[dT+4>>2]|0)==(az|0)){a0=7846;break}else{bm=dT|0}}if((a0|0)==7846){a0=0;bm=(a[dT+40|0]&1)==0;dU=bm?1:c[dT+48>>2]|0;dV=bm?c[dT+12>>2]|0:c[dT+52>>2]|0;dW=+h[dT+56>>3];dX=a5;break}bm=c[8798]|0;bb=(bm|0)>0;aZ=az;L10676:while(1){bG=43264;while(1){dY=c[bG>>2]|0;if((dY|0)==0){break}if((c[dY+4>>2]|0)==(aZ|0)){break L10676}else{bG=dY|0}}bG=aZ-1|0;if(!((aZ|0)>(bm|0)&bb)){dU=1;dV=bG;dW=cm;dX=a5;break L10667}aZ=((bG|0)%(bm|0)&-1)+1|0}bm=c[dY+48>>2]|0;aZ=c[dY+52>>2]|0;cn=+h[dY+56>>3];if((c[(c[3524]|0)+96>>2]&1024|0)!=0){dU=bm;dV=aZ;dW=cn;dX=a5;break}bb=(a[dY+40|0]&1)==0;dU=bb?1:bm;dV=bb?c[dY+12>>2]|0:aZ;dW=cn;dX=a5}}while(0);L10685:do{if((a0|0)==7855){a0=0;aZ=dS+1|0;c[c1>>2]=aZ;bb=c[8798]|0;bm=(bb|0)>0;az=dS+2|0;L10687:while(1){bG=43264;while(1){dZ=c[bG>>2]|0;if((dZ|0)==0){break}if((c[dZ+4>>2]|0)==(az|0)){break L10687}else{bG=dZ|0}}bG=az-1|0;if(!((az|0)>(bb|0)&bm)){dU=1;dV=bG;dW=cm;dX=aZ;break L10685}az=((bG|0)%(bb|0)&-1)+1|0}bb=c[dZ+48>>2]|0;az=c[dZ+52>>2]|0;cn=+h[dZ+56>>3];if((c[(c[3524]|0)+96>>2]&1024|0)!=0){dU=bb;dV=az;dW=cn;dX=aZ;break}bm=(a[dZ+40|0]&1)==0;dU=bm?1:bb;dV=bm?c[dZ+12>>2]|0:az;dW=cn;dX=aZ}}while(0);c[aE>>2]=dU;c[cC>>2]=dV;h[aA>>3]=dW;c[cj>>2]=c[c$>>2];c[cj+4>>2]=c[c$+4>>2];c[cj+8>>2]=c[c$+8>>2];c[cj+12>>2]=c[c$+12>>2];do{if((c[cP>>2]|0)!=0){cm=+h[cZ>>3];az=c[(c[3524]|0)+92>>2]|0;if(cm<0.0){cK[az&63](+h[3817]);break}else{cK[az&63](cm);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[cQ>>3]);az=c[(c[3524]|0)+64>>2]|0;if((dX|0)<-5){cM[az&511](-2)}else{cM[az&511](dX)}az=c[3524]|0;if((a[cU]&1)==0){if((c[az+96>>2]&1024|0)!=0){break}c[ch>>2]=1;c[cg>>2]=dX}fn(q,az)}}while(0);if((a[36120]&1)==0){dN=bn;dO=bK;dP=ay;break}if((a[bA]&1)!=0){dN=bn;dO=bK;dP=ay;break}az=c[bz>>2]|0;if((az|0)==33|(az|0)==1|(az|0)==51|(az|0)==153|(az|0)==345|(az|0)==225|(az|0)==177|(az|0)==193|(az|0)==209|(az|0)==352){bm=c[13542]|0;bb=c[3524]|0;c[13542]=(c[bb+96>>2]&128|0)==0?55520:0;cM[c[bb+168>>2]&511](8);bb=(c[9006]|0)+ay|0;c[l>>2]=(c[9010]|0)+ay;c[n>>2]=bK;c[o>>2]=bb;c[p>>2]=bK;bb=c[3524]|0;if((fl(l,n,o,p)|0)!=0){cN[c[bb+56>>2]&255](c[l>>2]|0,c[n>>2]|0);cN[c[bb+60>>2]&255](c[o>>2]|0,c[p>>2]|0)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=bm}else if((az|0)==295|(az|0)==279|(az|0)==311|(az|0)==102|(az|0)==86|(az|0)==118|(az|0)==169|(az|0)==137|(az|0)==252|(az|0)==474|(az|0)==257|(az|0)==457|(az|0)==489|(az|0)==18){bm=c[bl>>2]|0;bb=c[13542]|0;a5=c[3524]|0;c[13542]=(c[a5+96>>2]&128|0)==0?55520:0;cM[c[a5+168>>2]&511](8);a5=(c[9018]|0)+ay|0;bG=c[13542]|0;if((bG|0)==0){a0=7882}else{bo=(c[bG>>2]|0)>(a5|0)&1;a9=(c[bG+4>>2]|0)<(a5|0)?bo|2:bo;bo=(c[bG+8>>2]|0)>(bK|0)?a9|4:a9;if((((c[bG+12>>2]|0)<(bK|0)?bo|8:bo)|0)==0){a0=7882}}if((a0|0)==7882){a0=0;cR[c[(c[3524]|0)+80>>2]&127](a5,bK,bm)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=bb}else if((az|0)==64){az=c[13542]|0;bb=c[3524]|0;c[13542]=(c[bb+96>>2]&128|0)==0?55520:0;cM[c[bb+168>>2]&511](8);bb=(c[9018]|0)+ay|0;bm=c[13542]|0;if((bm|0)==0){a0=7886}else{a5=(c[bm>>2]|0)>(bb|0)&1;bo=(c[bm+4>>2]|0)<(bb|0)?a5|2:a5;a5=(c[bm+8>>2]|0)>(bK|0)?bo|4:bo;if((((c[bm+12>>2]|0)<(bK|0)?a5|8:a5)|0)==0){a0=7886}}if((a0|0)==7886){a0=0;cR[c[(c[3524]|0)+80>>2]&127](bb,bK,-1)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=az}az=bn+1|0;if((az|0)<(c[9014]|0)){dN=az;dO=bK-(c[9022]|0)|0;dP=ay;break}else{dN=0;dO=c[56]|0;dP=(c[9028]|0)+ay|0;break}}}while(0);bF=c[bz>>2]|0;do{if((bF|0)==153|(bF|0)==345|(bF|0)==225|(bF|0)==33){if((c[11690]&2|0)==0){fG(bs,aG);break}az=bs+44|0;if((c[az>>2]|0)<=0){break}bb=bs+4|0;a5=0;do{bm=c[bb>>2]|0;bo=bm+(a5<<6)+24|0;cm=+h[bo>>3];cn=(+h[bm+(a5<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;a2=(+h[bm+(a5<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;cI=+h[5279];aR=+h[2];cp=+h[12];c7=(cm-cI)*aR+cp+-1.0;cw=+h[403]+cn*+h[391]+a2*+h[395];c6=+h[399];b1=+h[404]+cn*+h[392]+a2*+h[396];aU=+h[400];cf=+h[405]+cn*+h[393]+a2*+h[397];ce=+h[401];ct=+h[406]+cn*+h[394]+a2*+h[398];a2=+h[402];cn=ct+c7*a2;cz=cn==0.0?1.0e-5:cn;h[cY>>3]=(cw+c7*c6)/cz;h[cF>>3]=(b1+c7*aU)/cz;h[aB>>3]=(cf+c7*ce)/cz;h[cE>>3]=cm;c[aF>>2]=0;cm=(0.0-cI)*aR+cp+-1.0;cp=ct+cm*a2;a2=cp==0.0?1.0e-5:cp;h[au>>3]=(cw+cm*c6)/a2;h[cL>>3]=(b1+cm*aU)/a2;h[aD>>3]=(cf+cm*ce)/a2;h[aC>>3]=0.0;c[at>>2]=0;h[aC>>3]=+h[bo>>3];do{if((a[38984]&1)==0){a0=7898}else{if((a[46752]&1)==0){a0=7898;break}gt(j,k,aG)}}while(0);if((a0|0)==7898){a0=0;un(j,k,aG,as)}a5=a5+1|0;}while((a5|0)<(c[az>>2]|0))}else if((bF|0)==177|(bF|0)==193|(bF|0)==209|(bF|0)==1|(bF|0)==352){fF(bs,aG)}else if((bF|0)==51){fF(bs,aG);a0=7903}else if((bF|0)==295|(bF|0)==279|(bF|0)==311|(bF|0)==102|(bF|0)==86|(bF|0)==118|(bF|0)==169|(bF|0)==137|(bF|0)==252|(bF|0)==257|(bF|0)==457|(bF|0)==489|(bF|0)==64|(bF|0)==18){a0=7903}}while(0);if((a0|0)==7903){a0=0;fG(bs,aG)}bF=c[bs>>2]|0;if((bF|0)==0){dH=dN;dI=dO;dJ=dP;break}else{ay=dP;bK=dO;bn=dN;bs=bF}}}}while(0);cM[c[(c[3524]|0)+168>>2]&511](7);dc=dH;dd=dI;de=dJ}if((bD|0)>=(d|0)){break L10258}bR=de;bL=dd;bv=dc;bM=c[bM>>2]|0;bD=bD+1|0}}}while(0);if(da){i3()}da=a[38984]|0;do{if((da&1)!=0&(c[9744]|0)==1){if((a[46752]&1)==0|bE){d_=da;break}cM[c[(c[3524]|0)+168>>2]&511](6);gv(b,d);cM[c[(c[3524]|0)+168>>2]&511](7);d_=a[38984]|0}else{d_=da}}while(0);da=c[10026]|0;do{if((d_&1)!=0|(da|0)==1){fw(b,d,0,1)}else{if((da|0)!=-1){break}fw(b,d,1,1)}}while(0);if((c[5094]|0)!=0&(c[14088]|0)==1){fw(b,d,3,1)}do{if(!bE){if((a[55536]&1)==0){break}if(!(a[31104]|0)){break}if(!((a[54016]|0)!=110&(c[13506]|0)==1)){break}dD(2)}}while(0);fO(c[10818]|0,1,3);bE=c[10822]|0;d=c[(c[3524]|0)+92>>2]|0;if((d|0)!=0){cK[d&63](+h[3817])}if((bE|0)!=0){d=bE;do{if((c[d+56>>2]|0)==1){fK(d+8|0,av,aw,202256);fp(~~+h[av>>3],~~+h[aw>>3],d)}d=c[d>>2]|0;}while((d|0)!=0)}fy(1);d=c[200]|0;dW=+h[64664+(d*688&-1)>>3];aw=c[144]|0;dR=+h[64664+(aw*688&-1)>>3];dQ=+h[91];dx=+h[96];dw=(dW-dW)*dQ+dx+-1.0;dj=+h[21];dk=+h[68];dm=(dR-dR)*dj+dk+-1.0;dq=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;a2=+h[403];ce=+h[391];cm=a2+dw*ce;cf=+h[395];aU=dm*cf;b1=dq*+h[399];c6=+h[404];cw=+h[392];cp=c6+dw*cw;ct=+h[396];aR=dm*ct;cI=dq*+h[400];cz=+h[406];c7=+h[394];cn=cz+dw*c7;dw=+h[398];co=dm*dw;dm=dq*+h[402];dq=cn+co+dm;cy=dq==0.0?1.0e-5:dq;dq=+(c[180]|0);av=c[186]|0;bE=~~((cm+aU+b1)/cy*dq)+av|0;cA=+(c[40]|0);b=c[46]|0;da=~~((cp+aR+cI)/cy*cA)+b|0;c[18064]=bE;c[18062]=da;cy=(+h[64672+(d*688&-1)>>3]-dW)*dQ+dx+-1.0;dx=cz+cy*c7+co+dm;co=dx==0.0?1.0e-5:dx;c[18060]=(~~((a2+cy*ce+aU+b1)/co*dq)+av|0)-bE;c[18058]=(~~((c6+cy*cw+aR+cI)/co*cA)+b|0)-da;co=(+h[64672+(aw*688&-1)>>3]-dR)*dj+dk+-1.0;dk=cn+co*dw+dm;dm=dk==0.0?1.0e-5:dk;c[18056]=(~~((cm+co*cf+b1)/dm*dq)+av|0)-bE;c[18054]=(~~((cp+co*ct+cI)/dm*cA)+b|0)-da;do{if(a[31104]|0){da=c[(c[3524]|0)+140>>2]|0;if((da|0)==0){break}cS[da&511]()}}while(0);lh();if((a[38984]&1)==0){i=f;return}if((a[46752]&1)==0){i=f;return}uu(c[7628]|0);c[7628]=0;c[7624]=0;c[7625]=0;uu(c[11608]|0);c[11608]=0;c[11604]=0;c[11605]=0;uu(c[228]|0);c[228]=0;c[224]=0;c[225]=0;i=f;return}function fw(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0,$=0,aa=0.0,ab=0,ac=0,ad=0.0,ae=0.0,af=0.0,ag=0.0,ah=0,ai=0.0,aj=0.0,ak=0.0,al=0.0,am=0.0,an=0.0,ao=0.0,ap=0.0,aq=0.0,ar=0.0,as=0.0,at=0.0,au=0.0,av=0.0,aw=0.0,ax=0.0,ay=0.0,az=0.0,aA=0.0,aB=0.0,aC=0.0,aD=0.0,aE=0,aF=0,aG=0.0,aH=0.0,aI=0.0,aJ=0.0,aK=0.0,aL=0.0,aM=0.0,aN=0.0,aO=0.0,aP=0.0,aQ=0.0,aR=0.0,aS=0.0,aT=0.0,aU=0.0,aV=0.0,aW=0.0,aX=0.0,aY=0.0,aZ=0.0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0.0,bn=0.0,bo=0,bp=0.0,bq=0.0,br=0.0,bs=0,bt=0.0,bu=0.0,bv=0.0,bw=0,bx=0,by=0,bz=0.0,bA=0,bB=0,bC=0,bD=0.0,bE=0.0,bF=0.0,bG=0,bH=0.0,bI=0.0,bJ=0,bK=0,bL=0.0,bM=0.0,bN=0.0,bO=0,bP=0,bQ=0,bR=0,bS=0,bT=0.0,bU=0.0,bV=0.0,bW=0.0,bX=0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0,b3=0;j=i;i=i+1392|0;k=j|0;l=j+16|0;m=j+32|0;n=j+80|0;o=j+128|0;p=j+176|0;q=j+224|0;r=j+272|0;s=j+320|0;t=j+368|0;u=j+416|0;v=j+464|0;w=j+512|0;x=j+560|0;y=j+608|0;z=j+640|0;A=j+672|0;B=j+720|0;C=j+768|0;D=j+816|0;E=j+864|0;F=j+912|0;G=j+960|0;H=j+1008|0;I=j+1056|0;J=j+1064|0;K=j+1072|0;L=j+1080|0;M=j+1088|0;N=j+1136|0;Q=j+1184|0;R=j+1232|0;S=j+1280|0;T=j+1328|0;U=j+1376|0;V=j+1384|0;W=c[3524]|0;X=c[13542]|0;Z=c[11692]|0;_=(Z|0)!=0;L10803:do{if(_&(c[5094]|0)!=0){if((c[14088]|0)!=(f|0)){break}$=l;c[$>>2]=c[14084];c[$+4>>2]=c[56340>>2];c[$+8>>2]=c[56344>>2];c[$+12>>2]=c[56348>>2];$=c[14075]|0;do{if((c[14074]|0)!=0){aa=+h[7040];ab=c[W+92>>2]|0;if(aa<0.0){cK[ab&63](+h[3817]);break}else{cK[ab&63](aa);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);ab=c[(c[3524]|0)+64>>2]|0;if(($|0)<-5){cM[ab&511](-2)}else{cM[ab&511]($)}ab=c[3524]|0;do{if((a[56328]&1)==0){if((c[ab+96>>2]&1024|0)!=0){break}c[l>>2]=1;c[l+4>>2]=$;ac=7953}else{ac=7953}}while(0);if((ac|0)==7953){fn(l,ab)}do{if((c[11692]&15|0)==15){$=c[(c[3524]|0)+172>>2]|0;if(($|0)==0){break}cM[$&511](0)}}while(0);aa=(+h[14]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;ad=(+h[13]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;ae=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;af=+h[406]+aa*+h[394]+ad*+h[398]+ae*+h[402];ag=af==0.0?1.0e-5:af;cN[c[(c[3524]|0)+56>>2]&255](~~((+h[403]+aa*+h[391]+ad*+h[395]+ae*+h[399])/ag*+(c[180]|0))+(c[186]|0)|0,~~((+h[404]+aa*+h[392]+ad*+h[396]+ae*+h[400])/ag*+(c[40]|0))+(c[46]|0)|0);ag=(+h[7089]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;ae=(+h[7088]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;ad=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;aa=+h[406]+ag*+h[394]+ae*+h[398]+ad*+h[402];af=aa==0.0?1.0e-5:aa;ab=~~((+h[403]+ag*+h[391]+ae*+h[395]+ad*+h[399])/af*+(c[180]|0))+(c[186]|0)|0;$=~~((+h[404]+ag*+h[392]+ae*+h[396]+ad*+h[400])/af*+(c[40]|0))+(c[46]|0)|0;ah=c[3524]|0;if((c[11692]&2|0)==0){cN[c[ah+56>>2]&255](ab,$)}else{cN[c[ah+60>>2]&255](ab,$)}af=(+h[3305]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;ad=(+h[3304]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;ae=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;ag=+h[406]+af*+h[394]+ad*+h[398]+ae*+h[402];aa=ag==0.0?1.0e-5:ag;$=~~((+h[403]+af*+h[391]+ad*+h[395]+ae*+h[399])/aa*+(c[180]|0))+(c[186]|0)|0;ab=~~((+h[404]+af*+h[392]+ad*+h[396]+ae*+h[400])/aa*+(c[40]|0))+(c[46]|0)|0;ah=c[3524]|0;if((c[11692]&8|0)==0){cN[c[ah+56>>2]&255]($,ab)}else{cN[c[ah+60>>2]&255]($,ab)}aa=(+h[5264]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;ae=(+h[5263]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;ad=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;af=+h[406]+aa*+h[394]+ae*+h[398]+ad*+h[402];ag=af==0.0?1.0e-5:af;ab=~~((+h[403]+aa*+h[391]+ae*+h[395]+ad*+h[399])/ag*+(c[180]|0))+(c[186]|0)|0;$=~~((+h[404]+aa*+h[392]+ae*+h[396]+ad*+h[400])/ag*+(c[40]|0))+(c[46]|0)|0;ah=c[3524]|0;if((c[11692]&4|0)==0){cN[c[ah+56>>2]&255](ab,$)}else{cN[c[ah+60>>2]&255](ab,$)}ag=(+h[14]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;ad=(+h[13]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;ae=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;aa=+h[406]+ag*+h[394]+ad*+h[398]+ae*+h[402];af=aa==0.0?1.0e-5:aa;$=~~((+h[403]+ag*+h[391]+ad*+h[395]+ae*+h[399])/af*+(c[180]|0))+(c[186]|0)|0;ab=~~((+h[404]+ag*+h[392]+ad*+h[396]+ae*+h[400])/af*+(c[40]|0))+(c[46]|0)|0;ah=c[3524]|0;if((c[11692]&1|0)==0){cN[c[ah+56>>2]&255]($,ab)}else{cN[c[ah+60>>2]&255]($,ab)}if((c[11692]&15|0)!=15){break}ab=c[(c[3524]|0)+172>>2]|0;if((ab|0)==0){break}cM[ab&511](1)}else{if(!_){break}af=+h[7076];ae=+h[64664+((c[200]|0)*688&-1)>>3];ad=+h[91];ag=+h[96];aa=(+h[14]-ae)*ad+ag+-1.0;ai=+h[64664+((c[144]|0)*688&-1)>>3];aj=+h[21];ak=+h[68];al=(+h[13]-ai)*aj+ak+-1.0;am=(af- +h[5279])*+h[2]+ +h[12]+-1.0;an=+h[403];ao=+h[391];ap=+h[395];aq=am*+h[399];ar=+h[404];as=+h[392];at=+h[396];au=am*+h[400];av=+h[405];aw=+h[393];ax=+h[397];ay=am*+h[401];az=+h[406];aA=+h[394];aB=+h[398];aC=am*+h[402];am=az+aa*aA+al*aB+aC;aD=am==0.0?1.0e-5:am;h[m>>3]=(an+aa*ao+al*ap+aq)/aD;h[m+8>>3]=(ar+aa*as+al*at+au)/aD;h[m+16>>3]=(av+aa*aw+al*ax+ay)/aD;h[m+32>>3]=af;c[m+40>>2]=0;aD=(+h[7089]-ae)*ad+ag+-1.0;al=(+h[7088]-ai)*aj+ak+-1.0;aa=az+aD*aA+al*aB+aC;am=aa==0.0?1.0e-5:aa;h[n>>3]=(an+aD*ao+al*ap+aq)/am;h[n+8>>3]=(ar+aD*as+al*at+au)/am;h[n+16>>3]=(av+aD*aw+al*ax+ay)/am;h[n+32>>3]=af;c[n+40>>2]=0;am=(+h[3305]-ae)*ad+ag+-1.0;al=(+h[3304]-ai)*aj+ak+-1.0;aD=az+am*aA+al*aB+aC;aa=aD==0.0?1.0e-5:aD;h[o>>3]=(an+am*ao+al*ap+aq)/aa;h[o+8>>3]=(ar+am*as+al*at+au)/aa;h[o+16>>3]=(av+am*aw+al*ax+ay)/aa;h[o+32>>3]=af;c[o+40>>2]=0;aa=(+h[5264]-ae)*ad+ag+-1.0;ag=(+h[5263]-ai)*aj+ak+-1.0;ak=az+aa*aA+ag*aB+aC;aC=ak==0.0?1.0e-5:ak;h[p>>3]=(an+aa*ao+ag*ap+aq)/aC;h[p+8>>3]=(ar+aa*as+ag*at+au)/aC;h[p+16>>3]=(av+aa*aw+ag*ax+ay)/aC;h[p+32>>3]=af;c[p+40>>2]=0;ab=(e|0)!=2;do{if(ab){L10808:do{if((Z&4|0)!=0){do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(o,p,56296);break L10808}}while(0);un(o,p,56296,56336)}}while(0);L10815:do{if((c[11692]&1|0)!=0){do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(m,p,56296);break L10815}}while(0);un(m,p,56296,56336)}}while(0);if((e|0)==1){aE=0;break}aF=c[11692]|0;ac=7986}else{aF=Z;ac=7986}}while(0);L10823:do{if((ac|0)==7986){L10825:do{if((aF&2|0)!=0){do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(m,n,56296);break L10825}}while(0);un(m,n,56296,56336)}}while(0);if((c[11692]&8|0)==0){aE=1;break}do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(o,n,56296);aE=1;break L10823}}while(0);un(o,n,56296,56336);aE=1}}while(0);do{if((a[46752]&1)==0){if((c[11690]&2|0)!=0){break}if((c[7662]|0)!=1){break L10803}if((cy(30632,213264)|0)==0){break L10803}}}while(0);af=+h[5279];$=c[200]|0;aC=+h[64664+($*688&-1)>>3];ay=+h[14]-aC;ax=+h[91];ag=+h[96];aw=ay*ax+ag+-1.0;ah=c[144]|0;aa=+h[64664+(ah*688&-1)>>3];av=+h[13]-aa;au=+h[21];at=+h[68];as=av*au+at+-1.0;ar=+h[2];aq=+h[12];ap=(af-af)*ar+aq+-1.0;ao=+h[403];an=+h[391];ak=+h[395];aB=ao+aw*an+as*ak;aA=+h[399];az=ap*aA;aj=+h[404];ai=+h[392];ad=+h[396];ae=aj+aw*ai+as*ad;al=+h[400];am=ap*al;aD=+h[405];aG=+h[393];aH=+h[397];aI=aD+aw*aG+as*aH;aJ=+h[401];aK=ap*aJ;aL=+h[406];aM=+h[394];aN=+h[398];aO=aL+aw*aM+as*aN;as=+h[402];aw=ap*as;ap=aO+aw;aP=ap==0.0?1.0e-5:ap;h[q>>3]=(aB+az)/aP;h[q+8>>3]=(ae+am)/aP;h[q+16>>3]=(aI+aK)/aP;h[q+32>>3]=af;c[q+40>>2]=0;aP=+h[7089]-aC;ap=aP*ax+ag+-1.0;aQ=+h[7088]-aa;aR=aQ*au+at+-1.0;aS=ao+ap*an+aR*ak;aT=aj+ap*ai+aR*ad;aU=aD+ap*aG+aR*aH;aV=aL+ap*aM+aR*aN;aR=aV+aw;ap=aR==0.0?1.0e-5:aR;h[r>>3]=(aS+az)/ap;h[r+8>>3]=(aT+am)/ap;h[r+16>>3]=(aU+aK)/ap;h[r+32>>3]=af;c[r+40>>2]=0;ap=(+h[3305]-aC)*ax+ag+-1.0;aR=(+h[3304]-aa)*au+at+-1.0;aW=ao+ap*an+aR*ak;aX=aj+ap*ai+aR*ad;aY=aD+ap*aG+aR*aH;aZ=aL+ap*aM+aR*aN;aR=aZ+aw;ap=aR==0.0?1.0e-5:aR;h[s>>3]=(aW+az)/ap;h[s+8>>3]=(aX+am)/ap;h[s+16>>3]=(aY+aK)/ap;h[s+32>>3]=af;c[s+40>>2]=0;ap=(+h[5264]-aC)*ax+ag+-1.0;ag=(+h[5263]-aa)*au+at+-1.0;at=ao+ap*an+ag*ak;ak=aj+ap*ai+ag*ad;ad=aD+ap*aG+ag*aH;aH=aL+ap*aM+ag*aN;aN=aH+aw;aw=aN==0.0?1.0e-5:aN;h[t>>3]=(at+az)/aw;h[t+8>>3]=(ak+am)/aw;h[t+16>>3]=(ad+aK)/aw;h[t+32>>3]=af;c[t+40>>2]=0;aw=+h[6915];aK=(aw-af)*ar+aq+-1.0;am=aK*aA;az=aK*al;aN=aK*aJ;ag=aK*as;aK=aO+ag;aM=aK==0.0?1.0e-5:aK;h[u>>3]=(aB+am)/aM;h[u+8>>3]=(ae+az)/aM;h[u+16>>3]=(aI+aN)/aM;h[u+32>>3]=aw;c[u+40>>2]=0;aM=aV+ag;aV=aM==0.0?1.0e-5:aM;h[v>>3]=(aS+am)/aV;h[v+8>>3]=(aT+az)/aV;h[v+16>>3]=(aU+aN)/aV;h[v+32>>3]=aw;c[v+40>>2]=0;aV=aZ+ag;aZ=aV==0.0?1.0e-5:aV;h[w>>3]=(aW+am)/aZ;h[w+8>>3]=(aX+az)/aZ;h[w+16>>3]=(aY+aN)/aZ;h[w+32>>3]=aw;c[w+40>>2]=0;aZ=aH+ag;ag=aZ==0.0?1.0e-5:aZ;h[x>>3]=(at+am)/ag;h[x+8>>3]=(ak+az)/ag;h[x+16>>3]=(ad+aN)/ag;h[x+32>>3]=aw;c[x+40>>2]=0;a_=c[11692]|0;L10843:do{if((a_&240|0)==240){L10965:do{if(aE){do{if((a[38984]&1)==0){ac=8005}else{if((a[46752]&1)==0){ac=8005;break}gt(q,u,56296)}}while(0);if((ac|0)==8005){un(q,u,56296,56336)}do{if((a[38984]&1)==0){ac=8009}else{if((a[46752]&1)==0){ac=8009;break}gt(r,v,56296)}}while(0);if((ac|0)==8009){un(r,v,56296,56336)}do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(s,w,56296);break L10965}}while(0);un(s,w,56296,56336)}}while(0);if(!ab){break}do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(t,x,56296);break L10843}}while(0);un(t,x,56296,56336)}else{aw=+h[64672+($*688&-1)>>3];ag=aw-aC;a$=~~(ay/ag+.1);aN=+h[64672+(ah*688&-1)>>3];ad=aN-aa;a0=~~(av/ad+.1);a1=~~(aP/ag+.1);a2=~~(aQ/ad+.1);az=+h[7076];h[y+24>>3]=az;h[y+16>>3]=az;h[y+8>>3]=az;h[y>>3]=az;h[z+24>>3]=az;h[z+16>>3]=az;h[z+8>>3]=az;h[z>>3]=az;if((d|0)>0){a3=b;a4=d;while(1){a5=a4-1|0;a6=c[a3+260>>2]|0;a7=c[a3+8>>2]|0;do{if((a7|0)==3){if((c[a3+244>>2]|0)==0){break}a9=a3+252|0;ac=8023}else if((a7|0)!=4){a9=37368;ac=8023}}while(0);do{if((ac|0)==8023){ac=0;a7=c[a9>>2]|0;ba=c[a6+8>>2]|0;bb=c[a6+12>>2]|0;bc=c[bb>>2]|0;do{if((bc|0)==0){az=+h[bb+8>>3];ak=az-aC;am=+P(+ak);at=+h[11];if(am>=at){if(+P(+(az-aw))>=at){break}}az=+h[bb+16>>3];am=az-aa;if(+P(+am)>=at){if(+P(+(az-aN))>=at){break}}bd=~~(ak/(aw-aC)+.1);be=~~(am/ad+.1);bf=y+(bd<<4)+(be<<3)|0;am=+h[bb+24>>3];if(+h[bf>>3]>3]=am}bf=z+(bd<<4)+(be<<3)|0;if(+h[bf>>3]<=am){break}h[bf>>3]=am}}while(0);bf=ba-1|0;do{if((c[bb+(bf<<6)>>2]|0)==0){am=+h[bb+(bf<<6)+8>>3];ak=am-aC;at=+P(+ak);az=+h[11];if(at>=az){if(+P(+(am-aw))>=az){break}}am=+h[bb+(bf<<6)+16>>3];at=am-aa;if(+P(+at)>=az){if(+P(+(am-aN))>=az){break}}be=~~(ak/(aw-aC)+.1);bd=~~(at/ad+.1);bg=y+(be<<4)+(bd<<3)|0;at=+h[bb+(bf<<6)+24>>3];if(+h[bg>>3]>3]=at}bg=z+(be<<4)+(bd<<3)|0;if(+h[bg>>3]<=at){break}h[bg>>3]=at}}while(0);ba=a7-1|0;if((ba|0)==0){bh=a6;bi=bb;bj=bc}else{bg=a6;bd=ba;do{bg=c[bg>>2]|0;bd=bd-1|0;}while((bd|0)!=0);bd=c[bg+12>>2]|0;bh=bg;bi=bd;bj=c[bd>>2]|0}bd=bh+12|0;do{if((bj|0)==0){at=+h[bi+8>>3];ak=at-aC;az=+P(+ak);am=+h[11];if(az>=am){if(+P(+(at-aw))>=am){break}}at=+h[bi+16>>3];az=at-aa;if(+P(+az)>=am){if(+P(+(at-aN))>=am){break}}bc=~~(ak/(aw-aC)+.1);bb=~~(az/ad+.1);a7=y+(bc<<4)+(bb<<3)|0;az=+h[bi+24>>3];if(+h[a7>>3]>3]=az}a7=z+(bc<<4)+(bb<<3)|0;if(+h[a7>>3]<=az){break}h[a7>>3]=az}}while(0);bg=c[bd>>2]|0;if((c[bg+(bf<<6)>>2]|0)!=0){break}az=+h[bg+(bf<<6)+8>>3];ak=az-aC;am=+P(+ak);at=+h[11];if(am>=at){if(+P(+(az-aw))>=at){break}}az=+h[bg+(bf<<6)+16>>3];am=az-aa;if(+P(+am)>=at){if(+P(+(az-aN))>=at){break}}a7=~~(ak/ag+.1);bb=~~(am/ad+.1);bc=y+(a7<<4)+(bb<<3)|0;am=+h[bg+(bf<<6)+24>>3];if(+h[bc>>3]>3]=am}bc=z+(a7<<4)+(bb<<3)|0;if(+h[bc>>3]<=am){break}h[bc>>3]=am}}while(0);if((a5|0)>0){a3=c[a3>>2]|0;a4=a5}else{break}}}L10910:do{if(aE){L10912:do{if((a_&16|0)==0){ad=+h[y+(a$<<4)+(a0<<3)>>3];ag=+h[z+(a$<<4)+(a0<<3)>>3];if(ad==ag){break}aN=(ag-af)*ar+aq+-1.0;aw=aO+aN*as;am=aw==0.0?1.0e-5:aw;h[A>>3]=(aB+aN*aA)/am;h[A+8>>3]=(ae+aN*al)/am;h[A+16>>3]=(aI+aN*aJ)/am;h[A+32>>3]=ag;c[A+40>>2]=0;ag=(ad-af)*ar+aq+-1.0;am=aO+ag*as;aN=am==0.0?1.0e-5:am;h[B>>3]=(aB+ag*aA)/aN;h[B+8>>3]=(ae+ag*al)/aN;h[B+16>>3]=(aI+ag*aJ)/aN;h[B+32>>3]=ad;c[B+40>>2]=0;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(A,B,56296);break L10912}}while(0);un(A,B,56296,56336)}else{do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(q,u,56296);break L10912}}while(0);un(q,u,56296,56336)}}while(0);L10925:do{if((c[11692]&32|0)==0){ad=+h[y+(a1<<4)+(a2<<3)>>3];aN=+h[z+(a1<<4)+(a2<<3)>>3];if(ad==aN){break}ag=(+h[7089]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;am=(+h[7088]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aw=+h[5279];ak=+h[2];at=+h[12];az=(aN-aw)*ak+at+-1.0;aZ=+h[403]+ag*+h[391]+am*+h[395];aH=+h[399];aY=+h[404]+ag*+h[392]+am*+h[396];aX=+h[400];aW=+h[405]+ag*+h[393]+am*+h[397];aV=+h[401];aU=+h[406]+ag*+h[394]+am*+h[398];am=+h[402];ag=aU+az*am;aT=ag==0.0?1.0e-5:ag;h[C>>3]=(aZ+az*aH)/aT;h[C+8>>3]=(aY+az*aX)/aT;h[C+16>>3]=(aW+az*aV)/aT;h[C+32>>3]=aN;c[C+40>>2]=0;aN=(ad-aw)*ak+at+-1.0;at=aU+aN*am;am=at==0.0?1.0e-5:at;h[D>>3]=(aZ+aN*aH)/am;h[D+8>>3]=(aY+aN*aX)/am;h[D+16>>3]=(aW+aN*aV)/am;h[D+32>>3]=ad;c[D+40>>2]=0;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(C,D,56296);break L10925}}while(0);un(C,D,56296,56336)}else{do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(r,v,56296);break L10925}}while(0);un(r,v,56296,56336)}}while(0);if((c[11692]&64|0)!=0){do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(s,w,56296);break L10910}}while(0);un(s,w,56296,56336);break}a5=1-a0|0;bf=1-a$|0;ad=+h[y+(bf<<4)+(a5<<3)>>3];am=+h[z+(bf<<4)+(a5<<3)>>3];if(ad==am){break}aV=(+h[3305]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aN=(+h[3304]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aW=+h[5279];aX=+h[2];aY=+h[12];aH=(am-aW)*aX+aY+-1.0;aZ=+h[403]+aV*+h[391]+aN*+h[395];at=+h[399];aU=+h[404]+aV*+h[392]+aN*+h[396];ak=+h[400];aw=+h[405]+aV*+h[393]+aN*+h[397];aT=+h[401];az=+h[406]+aV*+h[394]+aN*+h[398];aN=+h[402];aV=az+aH*aN;ag=aV==0.0?1.0e-5:aV;h[E>>3]=(aZ+aH*at)/ag;h[E+8>>3]=(aU+aH*ak)/ag;h[E+16>>3]=(aw+aH*aT)/ag;h[E+32>>3]=am;c[E+40>>2]=0;am=(ad-aW)*aX+aY+-1.0;aY=az+am*aN;aN=aY==0.0?1.0e-5:aY;h[F>>3]=(aZ+am*at)/aN;h[F+8>>3]=(aU+am*ak)/aN;h[F+16>>3]=(aw+am*aT)/aN;h[F+32>>3]=ad;c[F+40>>2]=0;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(E,F,56296);break L10910}}while(0);un(E,F,56296,56336)}}while(0);if(!ab){break}if((c[11692]&128|0)!=0){do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(t,x,56296);break L10843}}while(0);un(t,x,56296,56336);break}a$=1-a2|0;a0=1-a1|0;ad=+h[y+(a0<<4)+(a$<<3)>>3];aN=+h[z+(a0<<4)+(a$<<3)>>3];if(ad==aN){break}aT=(+h[5264]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;am=(+h[5263]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aw=+h[5279];ak=+h[2];aU=+h[12];at=(aN-aw)*ak+aU+-1.0;aZ=+h[403]+aT*+h[391]+am*+h[395];aY=+h[399];az=+h[404]+aT*+h[392]+am*+h[396];aX=+h[400];aW=+h[405]+aT*+h[393]+am*+h[397];ag=+h[401];aH=+h[406]+aT*+h[394]+am*+h[398];am=+h[402];aT=aH+at*am;aV=aT==0.0?1.0e-5:aT;h[G>>3]=(aZ+at*aY)/aV;h[G+8>>3]=(az+at*aX)/aV;h[G+16>>3]=(aW+at*ag)/aV;h[G+32>>3]=aN;c[G+40>>2]=0;aN=(ad-aw)*ak+aU+-1.0;aU=aH+aN*am;am=aU==0.0?1.0e-5:aU;h[H>>3]=(aZ+aN*aY)/am;h[H+8>>3]=(az+aN*aX)/am;h[H+16>>3]=(aW+aN*ag)/am;h[H+32>>3]=ad;c[H+40>>2]=0;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(G,H,56296);break L10843}}while(0);un(G,H,56296,56336)}}while(0);L10990:do{if(aE){L10992:do{if((c[11692]&256|0)!=0){do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(u,v,56296);break L10992}}while(0);un(u,v,56296,56336)}}while(0);if((c[11692]&512|0)==0){break}do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(w,v,56296);break L10990}}while(0);un(w,v,56296,56336)}}while(0);if(!ab){break}L11006:do{if((c[11692]&1024|0)!=0){do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(u,x,56296);break L11006}}while(0);un(u,x,56296,56336)}}while(0);if((c[11692]&2048|0)==0){break}do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(w,x,56296);break L10803}}while(0);un(w,x,56296,56336)}}while(0);do{if((c[5094]|0)==0){if((e|0)!=3){break}i=j;return}else{x=c[10026]|0;if((((x|0)>-1?x:-x|0)|0)!=(f|0)|(e|0)==3){i=j;return}else{c[13542]=0;break}}}while(0);f=c[200]|0;x=(c[64916+(f*688&-1)>>2]|0)==0;if(x){if((c[65140+(f*688&-1)>>2]|0)!=0){ac=8133}}else{ac=8133}L11069:do{if((ac|0)==8133){w=c[144]|0;aJ=+h[64664+(w*688&-1)>>3];aI=+h[97];al=aJ+ +h[64672+(w*688&-1)>>3]-aI;ae=+h[64664+(f*688&-1)>>3];aA=(+h[64672+(f*688&-1)>>3]+ae)*.5;aB=+h[96]+ +h[91]*(aA-ae)+-1.0;ae=+h[21];as=+h[68];aO=(aI-aJ)*ae+as+-1.0;aI=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;aq=+h[403]+aB*+h[391];ar=+h[395];af=aI*+h[399];aa=+h[404]+aB*+h[392];aC=+h[396];aQ=aI*+h[400];aP=+h[405]+aB*+h[393];av=+h[397];ay=aI*+h[401];ad=+h[406]+aB*+h[394];aB=+h[398];am=aI*+h[402];aI=ad+aO*aB+am;ag=aI==0.0?1.0e-5:aI;aI=(al-aJ)*ae+as+-1.0;as=ad+aI*aB+am;am=as==0.0?1.0e-5:as;as=+(c[40]|0);h[695]=((aq+aI*ar+af)/am-(aq+aO*ar+af)/ag)/as;h[694]=((aa+aI*aC+aQ)/am-(aa+aO*aC+aQ)/ag)/as;h[693]=((aP+aI*av+ay)/am-(aP+aO*av+ay)/ag)/as;as=+g[3538];if(as>90.0|(e|0)==1){if(as<=90.0|(e|0)==2|x){bk=f}else{ac=8136}}else{if(x){bk=f}else{ac=8136}}if((ac|0)==8136){de(2,10);bk=c[200]|0}if((c[65140+(bk*688&-1)>>2]|0)==0){break}as=+g[3538];do{if(as>90.0|(e|0)==2){if(as>90.0){w=c[5094]|0;if((e|0)!=1|(w|0)!=0){bl=w;ac=8144;break}else{break L11069}}if((c[5094]|0)==0){break L11069}bm=+h[97];ac=8145}else{bl=c[5094]|0;ac=8144}}while(0);do{if((ac|0)==8144){as=+h[97];if((bl|0)!=0){bm=as;ac=8145;break}ag=(as-al)*.25;do{if((c[65084+(bk*688&-1)>>2]|0)==-3){ay=+h[64664+(bk*688&-1)>>3];av=+h[91];aO=+h[96];aP=(ay-ay)*av+aO+-1.0;am=(as- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aI=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;aQ=+h[403];aC=+h[391];aa=am*+h[395];af=aI*+h[399];ar=+h[404];aq=+h[392];aB=am*+h[396];ad=aI*+h[400];ae=+h[406];aJ=+h[394];aN=am*+h[398];am=aI*+h[402];aI=ae+aP*aJ+aN+am;aW=aI==0.0?1.0e-5:aI;aI=+(c[180]|0);w=c[186]|0;aX=+(c[40]|0);u=c[46]|0;az=aO+av*(+h[64672+(bk*688&-1)>>3]-ay)+-1.0;ay=am+(aN+(ae+aJ*az));aJ=ay==0.0?1.0e-5:ay;ay=+Y(+(+(~~(aX*((ad+(aB+(ar+aq*az)))/aJ))+u|0)- +(~~((ar+aP*aq+aB+ad)/aW*aX)+u|0)),+(+(~~(aI*((af+(aa+(aQ+aC*az)))/aJ))+w|0)- +(~~((aQ+aP*aC+aa+af)/aW*aI)+w|0)))/.017453292519943295;if(ay>0.0){bn=ay+.5}else{bn=ay+-.5}w=~~+O(+bn);ay=ag*.5;if(ay<=0.0){bo=w;bp=ay;break}bo=w+180|0;bp=ay}else{bo=0;bp=ag}}while(0);if((c[64916+(bk*688&-1)>>2]&2|0)==0){ag=(aA- +h[64664+(bk*688&-1)>>3])*+h[91]+ +h[96]+-1.0;ay=(bp+as- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aI=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;aW=+h[406]+ag*+h[394]+ay*+h[398]+aI*+h[402];af=aW==0.0?1.0e-5:aW;bq=(+h[403]+ag*+h[391]+ay*+h[395]+aI*+h[399])/af;br=(+h[404]+ag*+h[392]+ay*+h[396]+aI*+h[400])/af;bs=a[65072+(bk*688&-1)|0]|0}else{w=a[65072+(bk*688&-1)|0]|0;if((w&1)==0){bt=-0.0-bp}else{bt=bp}af=(aA- +h[64664+(bk*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aI=(bt*.5- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;ay=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;ag=+h[406]+af*+h[394]+aI*+h[398]+ay*+h[402];aW=ag==0.0?1.0e-5:ag;bq=(+h[403]+af*+h[391]+aI*+h[395]+ay*+h[399])/aW;br=(+h[404]+af*+h[392]+aI*+h[396]+ay*+h[400])/aW;bs=w}if((bs&1)==0){aW=+h[65056+(bk*688&-1)>>3];ay=+((c[W+24>>2]|0)>>>0>>>0);bu=bq- +h[695]*aW*ay;bv=br-ay*aW*+h[694]}else{bu=bq;bv=br}bw=bo;bx=~~(bu*+(c[180]|0))+(c[186]|0)|0;by=~~(bv*+(c[40]|0))+(c[46]|0)|0}}while(0);if((ac|0)==8145){al=(aA- +h[64664+(bk*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aW=(bm- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;ay=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;aI=+h[406]+al*+h[394]+aW*+h[398]+ay*+h[402];af=aI==0.0?1.0e-5:aI;aI=+h[694];ag=+((c[W+16>>2]|0)>>>0>>>0);aa=(+h[404]+al*+h[392]+aW*+h[396]+ay*+h[400])/af-aI*ag;if((a[65072+(bk*688&-1)|0]&1)==0){bz=aa- +h[65056+(bk*688&-1)>>3]*aI*+((c[W+24>>2]|0)>>>0>>>0)}else{bz=aa}bw=c[65132+(bk*688&-1)>>2]|0;bx=~~((+h[403]+al*+h[391]+aW*+h[395]+ay*+h[399])/af*+(c[180]|0))+(c[186]|0)|0;by=(~~(bz*+(c[40]|0))+(c[46]|0)|0)-~~(ag*1.5)|0}fx(65224+(bk*688&-1)|0,I,J,207600);w=(c[I>>2]|0)+bx|0;u=(c[J>>2]|0)+by|0;v=c[200]|0;aE=a[65264+(v*688&-1)|0]&1;do{if(aE<<24>>24==0){bA=v}else{if((a[37456]&1)!=0){bA=v;break}a[37456]=1;H=c[(c[3524]|0)+88>>2]|0;if((H|0)==0){bA=v;break}cO[H&255](179864);bA=c[200]|0}}while(0);a[37456]=aE;fn(65152+(bA*688&-1)|0,W);do{if((bw|0)==0){ac=8169}else{if((cO[c[(c[3524]|0)+72>>2]&255](bw)|0)==0){ac=8169;break}v=c[200]|0;ln(w,u,c[65140+(v*688&-1)>>2]|0,1,0,bw,c[65144+(v*688&-1)>>2]|0);v=c[(c[3524]|0)+72>>2]|0;cO[v&255](0)}}while(0);if((ac|0)==8169){aE=c[200]|0;ln(w,u,c[65140+(aE*688&-1)>>2]|0,1,0,0,c[65144+(aE*688&-1)>>2]|0)}if((c[65152+((c[200]|0)*688&-1)>>2]|0)!=0){cM[c[W+64>>2]&511](-2)}a[37456]=0}}while(0);bw=c[144]|0;bA=(c[64916+(bw*688&-1)>>2]|0)==0;if(bA){if((c[65140+(bw*688&-1)>>2]|0)!=0){ac=8175}}else{ac=8175}L11129:do{if((ac|0)==8175){by=c[200]|0;bz=+h[64664+(by*688&-1)>>3];bm=+h[69];bv=bz+ +h[64672+(by*688&-1)>>3]-bm;bu=+h[64664+(bw*688&-1)>>3];br=(+h[64672+(bw*688&-1)>>3]+bu)*.5;bq=+h[91];bt=+h[96];bp=(bm-bz)*bq+bt+-1.0;bm=(br-bu)*+h[21]+ +h[68]+-1.0;bu=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;bn=+h[403];aA=+h[391];ag=bm*+h[395];af=bu*+h[399];ay=+h[404];aW=+h[392];al=bm*+h[396];aa=bu*+h[400];aI=+h[405];aC=+h[393];aP=bm*+h[397];aQ=bu*+h[401];aJ=+h[406];az=+h[394];aX=bm*+h[398];bm=bu*+h[402];bu=aJ+bp*az+aX+bm;ad=bu==0.0?1.0e-5:bu;bu=(bv-bz)*bq+bt+-1.0;bt=aJ+bu*az+aX+bm;bm=bt==0.0?1.0e-5:bt;bt=+(c[180]|0);h[695]=((bn+bu*aA+ag+af)/bm-(bn+bp*aA+ag+af)/ad)/bt;h[694]=((ay+bu*aW+al+aa)/bm-(ay+bp*aW+al+aa)/ad)/bt;h[693]=((aI+bu*aC+aP+aQ)/bm-(aI+bp*aC+aP+aQ)/ad)/bt;bt=+g[3538];if(bt>90.0|(e|0)==1){if(bt<=90.0|(e|0)==2|bA){bB=bw}else{ac=8178}}else{if(bA){bB=bw}else{ac=8178}}if((ac|0)==8178){de(1,12);bB=c[144]|0}if((c[65140+(bB*688&-1)>>2]|0)==0){break}bt=+g[3538];do{if(bt>90.0|(e|0)==2){if(bt>90.0){by=c[5094]|0;if((e|0)!=1|(by|0)!=0){bC=by;ac=8186;break}else{break L11129}}if((c[5094]|0)==0){break L11129}bD=+h[69];ac=8187}else{bC=c[5094]|0;ac=8186}}while(0);do{if((ac|0)==8186){bt=+h[69];if((bC|0)!=0){bD=bt;ac=8187;break}ad=(bv-bt)*.25;do{if((c[65084+(bB*688&-1)>>2]|0)==-3){aQ=+h[64664+(bB*688&-1)>>3];aP=(bt- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aC=+h[21];bp=+h[68];aI=(aQ-aQ)*aC+bp+-1.0;bm=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;bu=+h[403]+aP*+h[391];aa=+h[395];al=bm*+h[399];aW=+h[404]+aP*+h[392];ay=+h[396];af=bm*+h[400];ag=+h[406]+aP*+h[394];aP=+h[398];aA=bm*+h[402];bm=ag+aI*aP+aA;bn=bm==0.0?1.0e-5:bm;bm=+(c[180]|0);u=c[186]|0;aX=+(c[40]|0);w=c[46]|0;az=bp+aC*(+h[64672+(bB*688&-1)>>3]-aQ)+-1.0;aQ=aA+(ag+aP*az);aP=aQ==0.0?1.0e-5:aQ;aQ=+Y(+(+(~~(aX*((af+(aW+ay*az))/aP))+w|0)- +(~~((aW+aI*ay+af)/bn*aX)+w|0)),+(+(~~(bm*((al+(bu+aa*az))/aP))+u|0)- +(~~((bu+aI*aa+al)/bn*bm)+u|0)))/.017453292519943295;if(aQ>0.0){bE=aQ+.5}else{bE=aQ+-.5}u=~~+O(+bE);aQ=ad*.5;if(aQ<=0.0){bF=aQ;bG=u;break}bF=aQ;bG=u+180|0}else{bF=ad;bG=0}}while(0);if((c[64916+(bB*688&-1)>>2]&2|0)==0){u=c[200]|0;ad=(bt-bF- +h[64664+(u*688&-1)>>3])*+h[91]+ +h[96]+-1.0;as=(br- +h[64664+(bB*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aQ=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;bm=+h[406]+ad*+h[394]+as*+h[398]+aQ*+h[402];bn=bm==0.0?1.0e-5:bm;bH=(+h[403]+ad*+h[391]+as*+h[395]+aQ*+h[399])/bn;bI=(+h[404]+ad*+h[392]+as*+h[396]+aQ*+h[400])/bn;bJ=u;bK=a[65072+(u*688&-1)|0]|0}else{u=c[200]|0;w=a[65072+(u*688&-1)|0]|0;if((w&1)==0){bL=bF}else{bL=-0.0-bF}bn=(bL*.5- +h[64664+(u*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aQ=(br- +h[64664+(bB*688&-1)>>3])*+h[21]+ +h[68]+-1.0;as=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;ad=+h[406]+bn*+h[394]+aQ*+h[398]+as*+h[402];bm=ad==0.0?1.0e-5:ad;bH=(+h[403]+bn*+h[391]+aQ*+h[395]+as*+h[399])/bm;bI=(+h[404]+bn*+h[392]+aQ*+h[396]+as*+h[400])/bm;bJ=u;bK=w}if((bK&1)==0){bm=+h[65056+(bJ*688&-1)>>3];as=+((c[W+28>>2]|0)>>>0>>>0);bM=bH- +h[695]*bm*as;bN=bI-as*bm*+h[694]}else{bM=bH;bN=bI}bO=bG;bP=0;bQ=~~(bN*+(c[40]|0))+(c[46]|0)|0;bR=~~(bM*+(c[180]|0))+(c[186]|0)|0;bS=bB}}while(0);if((ac|0)==8187){w=c[200]|0;bv=+h[64664+(w*688&-1)>>3];bm=+h[91];as=+h[96];aQ=(bD-bv)*bm+as+-1.0;bn=+h[64664+(bB*688&-1)>>3];ad=+h[21];al=+h[68];aa=(br-bn)*ad+al+-1.0;aI=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;bu=+h[403];aP=+h[391];az=+h[395];aX=aI*+h[399];af=+h[404];ay=+h[392];aW=+h[396];ag=aI*+h[400];aA=+h[406];aC=+h[394];bp=+h[398];aJ=aI*+h[402];aI=aA+aQ*aC+aa*bp+aJ;bq=aI==0.0?1.0e-5:aI;aI=(bu+aQ*aP+aa*az+aX)/bq;bz=(af+aQ*ay+aa*aW+ag)/bq;u=c[64916+(bB*688&-1)>>2]|0;do{if((u&2|0)==0){bT=aI;bU=bz}else{if((a[64788+(w*688&-1)|0]&1)!=0){bT=aI;bU=bz;break}bq=+h[64672+(w*688&-1)>>3];if(bv0.0|bq<0.0){bT=aI;bU=bz;break}}else{if(bq>0.0|bv<0.0){bT=aI;bU=bz;break}}bq=(0.0-bv)*bm+as+-1.0;aa=(bD-bn)*ad+al+-1.0;aQ=aA+bq*aC+aa*bp+aJ;aB=aQ==0.0?1.0e-5:aQ;bT=(bu+bq*aP+aa*az+aX)/aB;bU=(af+bq*ay+aa*aW+ag)/aB}}while(0);ag=+h[695];by=W+20|0;aW=bT-ag*+((c[by>>2]|0)>>>0>>>0);if((a[65072+(w*688&-1)|0]&1)==0){bV=aW- +h[65056+(w*688&-1)>>3]*ag*+((c[W+28>>2]|0)>>>0>>>0)}else{bV=aW}J=~~(bV*+(c[180]|0))+(c[186]|0)|0;bx=~~(bU*+(c[40]|0))+(c[46]|0)|0;c[216]=0;if((u&1|0)==0){bW=.5;bX=bB}else{c[216]=0;de(1,14);bW=+(c[216]|0)+.5;bX=c[144]|0}bO=c[65132+(bX*688&-1)>>2]|0;bP=2;bQ=bx;bR=J-~~(bW*+((c[by>>2]|0)>>>0>>>0))|0;bS=bX}fx(65224+(bS*688&-1)|0,K,L,207600);by=(c[K>>2]|0)+bR|0;J=(c[L>>2]|0)+bQ|0;bx=c[144]|0;I=a[65264+(bx*688&-1)|0]&1;do{if(I<<24>>24==0){bY=bx}else{if((a[37456]&1)!=0){bY=bx;break}a[37456]=1;bk=c[(c[3524]|0)+88>>2]|0;if((bk|0)==0){bY=bx;break}cO[bk&255](179864);bY=c[144]|0}}while(0);a[37456]=I;fn(65152+(bY*688&-1)|0,W);do{if((bO|0)==0){ac=8219}else{if((cO[c[(c[3524]|0)+72>>2]&255](bO)|0)==0){ac=8219;break}bx=c[144]|0;ln(by,J,c[65140+(bx*688&-1)>>2]|0,1,bP,bO,c[65144+(bx*688&-1)>>2]|0);bx=c[(c[3524]|0)+72>>2]|0;cO[bx&255](0)}}while(0);if((ac|0)==8219){I=c[144]|0;ln(by,J,c[65140+(I*688&-1)>>2]|0,1,bP,0,c[65144+(I*688&-1)>>2]|0)}if((c[65152+((c[144]|0)*688&-1)>>2]|0)!=0){cM[c[W+64>>2]&511](-2)}a[37456]=0}}while(0);L11198:do{if((c[64916+((c[34]|0)*688&-1)>>2]|0)!=0){if(!((e|0)!=1&(c[5094]|0)==0)){break}do{if((a[46752]&1)==0){if((c[11690]&2|0)!=0){break}if((a8(30632,115)|0)==0){break L11198}}}while(0);de(0,6)}}while(0);e=c[144]|0;L11206:do{if((c[65284+(e*688&-1)>>2]|0)>-3){J=c[200]|0;if((a[64788+(J*688&-1)|0]&1)!=0){break}bW=+h[64664+(J*688&-1)>>3];bU=+h[64672+(J*688&-1)>>3];if(bW0.0|bU<0.0){break}}else{if(bU>0.0|bW<0.0){break}}bU=+h[64664+(e*688&-1)>>3];bV=+h[7076];bT=(0.0-bW)*+h[91]+ +h[96]+-1.0;bW=+h[21];bD=+h[68];bM=(bU-bU)*bW+bD+-1.0;bN=(bV- +h[5279])*+h[2]+ +h[12]+-1.0;bI=+h[403]+bT*+h[391];bH=+h[395];bL=bN*+h[399];bF=+h[404]+bT*+h[392];bE=+h[396];aW=bN*+h[400];ag=+h[405]+bT*+h[393];ay=+h[397];af=bN*+h[401];aX=+h[406]+bT*+h[394];bT=+h[398];az=bN*+h[402];bN=aX+bM*bT+az;aP=bN==0.0?1.0e-5:bN;h[M>>3]=(bI+bM*bH+bL)/aP;h[M+8>>3]=(bF+bM*bE+aW)/aP;h[M+16>>3]=(ag+bM*ay+af)/aP;h[M+32>>3]=bV;c[M+40>>2]=0;aP=(+h[64672+(e*688&-1)>>3]-bU)*bW+bD+-1.0;bD=aX+aP*bT+az;az=bD==0.0?1.0e-5:bD;h[N>>3]=(bI+aP*bH+bL)/az;h[N+8>>3]=(bF+aP*bE+aW)/az;h[N+16>>3]=(ag+aP*ay+af)/az;h[N+32>>3]=bV;c[N+40>>2]=0;J=65280+(e*688&-1)|0;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(M,N,J);break L11206}}while(0);un(M,N,J,65320+(e*688&-1)|0)}}while(0);e=c[34]|0;L11218:do{if((c[65284+(e*688&-1)>>2]|0)>-3){N=c[200]|0;if((a[64788+(N*688&-1)|0]&1)!=0){break}bV=+h[64664+(N*688&-1)>>3];az=+h[64672+(N*688&-1)>>3];if(bV0.0|az<0.0){break}}else{if(az>0.0|bV<0.0){break}}az=+h[64664+(e*688&-1)>>3];af=(0.0-bV)*+h[91]+ +h[96]+-1.0;bV=(0.0- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;ay=+h[5279];aP=+h[2];ag=+h[12];aW=(az-ay)*aP+ag+-1.0;bE=+h[403]+af*+h[391]+bV*+h[395];bF=+h[399];bL=+h[404]+af*+h[392]+bV*+h[396];bH=+h[400];bI=+h[405]+af*+h[393]+bV*+h[397];bD=+h[401];bT=+h[406]+af*+h[394]+bV*+h[398];bV=+h[402];af=bT+aW*bV;aX=af==0.0?1.0e-5:af;h[Q>>3]=(bE+aW*bF)/aX;h[Q+8>>3]=(bL+aW*bH)/aX;h[Q+16>>3]=(bI+aW*bD)/aX;h[Q+32>>3]=az;c[Q+40>>2]=0;az=+h[64672+(e*688&-1)>>3];aX=(az-ay)*aP+ag+-1.0;ag=bT+aX*bV;bV=ag==0.0?1.0e-5:ag;h[R>>3]=(bE+aX*bF)/bV;h[R+8>>3]=(bL+aX*bH)/bV;h[R+16>>3]=(bI+aX*bD)/bV;h[R+32>>3]=az;c[R+40>>2]=0;N=65280+(e*688&-1)|0;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(Q,R,N);break L11218}}while(0);un(Q,R,N,65320+(e*688&-1)|0)}}while(0);e=c[200]|0;R=c[65284+(e*688&-1)>>2]|0;L11230:do{if((R|0)>-3){Q=c[144]|0;if((a[64788+(Q*688&-1)|0]&1)!=0){break}az=+h[64664+(Q*688&-1)>>3];bV=+h[64672+(Q*688&-1)>>3];if(az0.0|bV<0.0){break}}else{if(bV>0.0|az<0.0){break}}Q=k;J=65320+(e*688&-1)|0;c[Q>>2]=c[J>>2];c[Q+4>>2]=c[J+4>>2];c[Q+8>>2]=c[J+8>>2];c[Q+12>>2]=c[J+12>>2];do{if((c[65280+(e*688&-1)>>2]|0)!=0){az=+h[65304+(e*688&-1)>>3];J=c[(c[3524]|0)+92>>2]|0;if(az<0.0){cK[J&63](+h[3817]);break}else{cK[J&63](az);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[65296+(e*688&-1)>>3]);N=c[(c[3524]|0)+64>>2]|0;if((R|0)<-5){cM[N&511](-2)}else{cM[N&511](R)}N=c[3524]|0;do{if((a[65312+(e*688&-1)|0]&1)==0){if((c[N+96>>2]&1024|0)!=0){break}c[k>>2]=1;c[k+4>>2]=R;ac=8262}else{ac=8262}}while(0);if((ac|0)==8262){fn(k,N)}J=c[200]|0;az=+h[64664+(J*688&-1)>>3];bV=+h[7076];bD=+h[91];aX=+h[96];bI=(az-az)*bD+aX+-1.0;bH=(0.0- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;bL=(bV- +h[5279])*+h[2]+ +h[12]+-1.0;bF=+h[403];bE=+h[391];ag=bH*+h[395];bT=bL*+h[399];aP=+h[404];ay=+h[392];aW=bH*+h[396];af=bL*+h[400];bW=+h[405];bU=+h[393];bM=bH*+h[397];bN=bL*+h[401];bu=+h[406];aJ=+h[394];bp=bH*+h[398];bH=bL*+h[402];bL=bu+bI*aJ+bp+bH;aC=bL==0.0?1.0e-5:bL;h[S>>3]=(bF+bI*bE+ag+bT)/aC;h[S+8>>3]=(aP+bI*ay+aW+af)/aC;h[S+16>>3]=(bW+bI*bU+bM+bN)/aC;h[S+32>>3]=bV;c[S+40>>2]=0;aC=(+h[64672+(J*688&-1)>>3]-az)*bD+aX+-1.0;aX=bu+aC*aJ+bp+bH;bH=aX==0.0?1.0e-5:aX;h[T>>3]=(bF+aC*bE+ag+bT)/bH;h[T+8>>3]=(aP+aC*ay+aW+af)/bH;h[T+16>>3]=(bW+aC*bU+bM+bN)/bH;h[T+32>>3]=bV;c[T+40>>2]=0;Q=65280+(J*688&-1)|0;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(S,T,Q);break L11230}}while(0);un(S,T,Q,65320+(J*688&-1)|0)}}while(0);T=c[34]|0;S=c[5094]|0;if((c[65140+(T*688&-1)>>2]|0)!=0&(S|0)==0){do{if((a[46752]&1)==0){if((c[11690]&2|0)!=0){break}if((cy(30632,213264)|0)!=0){break}i=j;return}}while(0);bV=(+h[64672+(T*688&-1)>>3]+ +h[64664+(T*688&-1)>>3])*.5;if((c[64916+(T*688&-1)>>2]&2|0)==0){bH=(+h[14]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;bN=(+h[13]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;bM=(bV- +h[5279])*+h[2]+ +h[12]+-1.0;bU=+h[406]+bH*+h[394]+bN*+h[398]+bM*+h[402];aC=bU==0.0?1.0e-5:bU;bZ=1;b_=(~~((+h[403]+bH*+h[391]+bN*+h[395]+bM*+h[399])/aC*+(c[180]|0))+(c[186]|0)|0)+((c[W+20>>2]|0)*-7&-1)|0;b$=~~((+h[404]+bH*+h[392]+bN*+h[396]+bM*+h[400])/aC*+(c[40]|0))+(c[46]|0)|0}else{aC=(0.0- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;bM=(0.0- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;bN=(bV- +h[5279])*+h[2]+ +h[12]+-1.0;bV=+h[406]+aC*+h[394]+bM*+h[398]+bN*+h[402];bH=bV==0.0?1.0e-5:bV;bZ=2;b_=(~~((+h[403]+aC*+h[391]+bM*+h[395]+bN*+h[399])/bH*+(c[180]|0))+(c[186]|0)|0)+((c[W+20>>2]|0)*-5&-1)|0;b$=~~((+h[404]+aC*+h[392]+bM*+h[396]+bN*+h[400])/bH*+(c[40]|0))+(c[46]|0)|0}fx(65224+(T*688&-1)|0,U,V,207600);T=(c[U>>2]|0)+b_|0;b_=(c[V>>2]|0)+b$|0;b$=c[34]|0;V=a[65264+(b$*688&-1)|0]&1;do{if(V<<24>>24==0){b0=b$}else{if((a[37456]&1)!=0){b0=b$;break}a[37456]=1;U=c[(c[3524]|0)+88>>2]|0;if((U|0)==0){b0=b$;break}cO[U&255](179864);b0=c[34]|0}}while(0);a[37456]=V;fn(65152+(b0*688&-1)|0,W);b0=c[34]|0;V=65132+(b0*688&-1)|0;if((c[65084+(b0*688&-1)>>2]|0)==-3){c[V>>2]=-270;b1=-270;ac=8281}else{b$=c[V>>2]|0;if((b$|0)==0){b2=b0;ac=8283}else{b1=b$;ac=8281}}do{if((ac|0)==8281){b$=(cO[c[(c[3524]|0)+72>>2]&255](b1)|0)==0;b0=c[34]|0;if(b$){b2=b0;ac=8283;break}ln(T,b_,c[65140+(b0*688&-1)>>2]|0,bZ,0,c[65132+(b0*688&-1)>>2]|0,c[65144+(b0*688&-1)>>2]|0);b0=c[(c[3524]|0)+72>>2]|0;cO[b0&255](0)}}while(0);if((ac|0)==8283){ln(T,b_,c[65140+(b2*688&-1)>>2]|0,bZ,0,0,c[65144+(b2*688&-1)>>2]|0)}if((c[65152+((c[34]|0)*688&-1)>>2]|0)!=0){cM[c[W+64>>2]&511](-2)}a[37456]=0;b3=c[5094]|0}else{b3=S}if((b3|0)==0){i=j;return}c[13542]=X;i=j;return}function fx(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0.0,v=0.0;f=i;i=i+24|0;g=f|0;j=f+8|0;k=f+16|0;h[g>>3]=+h[a+16>>3];h[j>>3]=+h[a+24>>3];h[k>>3]=+h[a+32>>3];l=(fM(a,e,g,j,k)|0)==0;m=+h[g>>3];if(!l){c[b>>2]=~~m;n=~~+h[j>>3];c[d>>2]=n;i=f;return}o=(m- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;m=(+h[j>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;p=(+h[k>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;q=+h[406]+o*+h[394]+m*+h[398]+p*+h[402];r=q==0.0?1.0e-5:q;l=~~((+h[404]+o*+h[392]+m*+h[396]+p*+h[400])/r*+(c[40]|0))+(c[46]|0)|0;c[b>>2]=~~((+h[403]+o*+h[391]+m*+h[395]+p*+h[399])/r*+(c[180]|0))+(c[186]|0);c[d>>2]=l;if((c[a>>2]|0)==2){s=+h[64664+((c[200]|0)*688&-1)>>3]}else{s=0.0}h[g>>3]=s;g=(c[5094]|0)!=0;do{if((c[a+4>>2]|0)==2){l=c[144]|0;if(g){t=64672+(l*688&-1)|0}else{t=64664+(l*688&-1)|0}u=+h[t>>3]}else{if(!g){u=0.0;break}u=+h[64672+((c[144]|0)*688&-1)>>3]}}while(0);h[j>>3]=u;if((c[a+8>>2]|0)==2){v=+h[64664+((c[34]|0)*688&-1)>>3]}else{v=0.0}h[k>>3]=v;r=(s- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;s=(u- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;u=(v- +h[5279])*+h[2]+ +h[12]+-1.0;v=+h[406]+r*+h[394]+s*+h[398]+u*+h[402];p=v==0.0?1.0e-5:v;k=~~((+h[404]+r*+h[392]+s*+h[396]+u*+h[400])/p*+(c[40]|0));a=c[46]|0;c[b>>2]=(c[b>>2]|0)-(~~((+h[403]+r*+h[391]+s*+h[395]+u*+h[399])/p*+(c[180]|0))+(c[186]|0)|0);n=(c[d>>2]|0)-(k+a|0)|0;c[d>>2]=n;i=f;return}function fy(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0.0,I=0;d=i;i=i+120|0;e=d|0;f=d+8|0;g=d+16|0;j=d+56|0;k=d+72|0;l=d+80|0;m=d+88|0;n=d+96|0;o=d+104|0;p=d+112|0;q=c[13542]|0;c[13542]=(c[(c[3524]|0)+96>>2]&128|0)==0?55520:0;r=c[10826]|0;if((r|0)==0){c[13542]=q;i=d;return}s=j;t=j|0;u=j+4|0;v=g;w=g+4|0;x=g+8|0;y=g+16|0;z=g|0;A=r;do{if((c[A+100>>2]|0)==(b|0)){fK(A+8|0,m,n,123984);r=~~+h[m>>3];B=~~+h[n>>3];C=A+48|0;if((a[A+88|0]&1)==0){fK(C,k,l,123984);D=~~+h[k>>3];c[o>>2]=D;E=~~+h[l>>3];c[p>>2]=E;F=D;G=E}else{fx(C,o,p,123984);C=(c[o>>2]|0)+r|0;c[o>>2]=C;E=(c[p>>2]|0)+B|0;c[p>>2]=E;F=C;G=E}E=A+144|0;c[s>>2]=c[E>>2];c[s+4>>2]=c[E+4>>2];c[s+8>>2]=c[E+8>>2];c[s+12>>2]=c[E+12>>2];E=c[A+108>>2]|0;do{if((c[A+104>>2]|0)!=0){H=+h[A+128>>3];C=c[(c[3524]|0)+92>>2]|0;if(H<0.0){cK[C&63](+h[3817]);break}else{cK[C&63](H);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[A+120>>3]);C=c[(c[3524]|0)+64>>2]|0;if((E|0)<-5){cM[C&511](-2)}else{cM[C&511](E)}C=c[3524]|0;do{if((a[A+136|0]&1)==0){if((c[C+96>>2]&1024|0)!=0){break}c[t>>2]=1;c[u>>2]=E;I=8328}else{I=8328}}while(0);if((I|0)==8328){I=0;fn(j,C)}E=c[200]|0;h[64776+(E*688&-1)>>3]=+((c[7939]|0)-(c[7938]|0)|0)/(+h[64672+(E*688&-1)>>3]- +h[64664+(E*688&-1)>>3]);c[12912]=c[A+200>>2];c[12910]=0;H=+h[A+168>>3];if(H>0.0){uE(v|0,0,40);c[w>>2]=2;c[x>>2]=2;h[y>>3]=H;c[z>>2]=c[A+176>>2];fN(g,e,f,123984);h[6458]=+h[A+184>>3];h[6457]=+h[A+192>>3];c[12910]=~~+h[e>>3]}fm(r,B,F,G,c[A+160>>2]|0)}A=c[A>>2]|0;}while((A|0)!=0);c[13542]=q;i=d;return}function fz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;cM[c[(c[3524]|0)+168>>2]&511](8);e=c[(c[3524]|0)+76>>2]|0;do{if((c[9046]|0)!=0|(c[9031]|0)==3){if((cO[e&255](2)|0)==0){f=(c[8986]|0)+a|0;g=c[(c[3524]|0)+20>>2]|0;h=f-aa(lp(d)|0,g)|0;cR[c[(c[3524]|0)+68>>2]&127](h,b,d);break}else{cR[c[(c[3524]|0)+68>>2]&127]((c[8986]|0)+a|0,b,d);break}}else{cO[e&255](0);cR[c[(c[3524]|0)+68>>2]&127]((c[8990]|0)+a|0,b,d)}}while(0);cM[c[(c[3524]|0)+168>>2]&511](9);return}function fA(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0,U=0.0,V=0,W=0,X=0;f=i;i=i+96|0;g=f|0;j=f+8|0;k=f+16|0;l=f+24|0;m=f+32|0;n=f+48|0;o=f+64|0;p=f+72|0;q=f+80|0;r=f+88|0;s=c[9006]|0;t=c[9010]|0;u=s-t|0;v=(u|0)>-1?u:-u|0;w=(v|0)>24?24:v;v=s+d|0;x=+(w|0);y=+(u|0)/x;u=t+d|0;t=b+64|0;s=c[t>>2]|0;if((s|0)==1){z=8345}else if((s|0)==3){if(+h[b+72>>3]>=0.0){z=8345}}else if((s|0)==2){if((c[b+28>>2]|0)!=-6){z=8345}}if((z|0)==8345){fn(t,c[3524]|0);t=c[13542]|0;z=c[3524]|0;c[13542]=(c[z+96>>2]&128|0)==0?55520:0;cM[c[z+168>>2]&511](8);z=(c[9006]|0)+d|0;c[o>>2]=(c[9010]|0)+d;c[p>>2]=e;c[q>>2]=z;c[r>>2]=e;z=c[3524]|0;if((fl(o,p,q,r)|0)!=0){cN[c[z+56>>2]&255](c[o>>2]|0,c[p>>2]|0);cN[c[z+60>>2]&255](c[q>>2]|0,c[r>>2]|0)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=t;i=f;return}t=(a[b+239|0]&1)==0;r=c[b+260>>2]|0;if((r|0)==0){i=f;return}q=c[b+252>>2]|0;b=0;z=r;A=-8.988465674311579e+307;B=-8.988465674311579e+307;C=8.988465674311579e+307;while(1){if((b|0)>=(q|0)){D=B;E=C;break}r=c[z+12>>2]|0;p=c[z+8>>2]|0;if((p|0)>0){o=0;F=A;G=B;H=C;while(1){do{if((c[r+(o<<6)>>2]|0)==0){if(t){I=r+(o<<6)+24|0}else{I=r+(o<<6)+32|0}J=+h[I>>3];d=J>2]|0;if((o|0)==0){D=Q;E=R;break}else{b=b+1|0;z=o;A=P;B=Q;C=R}}if(E>D){i=f;return}R=+h[8341];C=E>R?E:R;E=+h[8342];Q=D>24==112&1|0);T=z;break}D=(C-R)/(E-R);z=a[20668]|0;if(z<<24>>24==112){S=D;T=112;break}S=1.0-D;T=z}else{z=a[20668]|0;S=+(z<<24>>24!=112&1|0);T=z}}while(0);do{if(R>24==112&1|0);break}C=(Q-R)/(E-R);if(T<<24>>24==112){U=C;break}U=1.0-C}else{U=+(T<<24>>24!=112&1|0)}}while(0);R=(U-S)/x;if((c[9031]|0)==3){c[8490]=u;c[8488]=e}else{cN[c[(c[3524]|0)+56>>2]&255](u,e)}if((w|0)<1){i=f;return}T=m|0;z=m+8|0;b=m+4|0;I=n|0;t=n+8|0;q=n+4|0;o=u;p=1;while(1){if((p|0)==(w|0)){r=c[3524]|0;d=r+144|0;if((c[d>>2]|0)==0){V=r}else{c[T>>2]=5;h[z>>3]=U;c[b>>2]=0;cM[c[d>>2]&511](m);V=c[3524]|0}cN[c[V+56>>2]&255](o,e);W=v}else{x=+(p|0);d=c[3524]|0;r=d+144|0;if((c[r>>2]|0)==0){X=d}else{c[I>>2]=5;h[t>>3]=S+R*x;c[q>>2]=0;cM[c[r>>2]&511](n);X=c[3524]|0}cN[c[X+56>>2]&255](o,e);W=~~(y*x+.5)+u|0}if((c[9031]|0)==3){r=c[8488]|0;c[g>>2]=c[8490];c[j>>2]=r;c[k>>2]=W;c[l>>2]=e;r=c[3524]|0;if((fl(g,j,k,l)|0)!=0){cN[c[r+56>>2]&255](c[g>>2]|0,c[j>>2]|0);cN[c[r+60>>2]&255](c[k>>2]|0,c[l>>2]|0)}c[8490]=W;c[8488]=e}else{cN[c[(c[3524]|0)+60>>2]&255](W,e)}r=p+1|0;if((r|0)>(w|0)){break}else{o=W;p=r}}i=f;return}function fB(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0.0,au=0.0,av=0.0,aw=0.0,ax=0.0,ay=0.0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0.0,aG=0.0,aH=0.0,aI=0.0,aJ=0.0,aK=0.0,aL=0.0,aM=0,aN=0,aO=0,aP=0.0,aQ=0.0,aR=0.0,aS=0.0,aT=0.0,aU=0.0,aV=0.0,aW=0.0,aX=0.0,aY=0.0,aZ=0.0,a_=0,a$=0,a0=0,a1=0,a2=0.0,a3=0.0,a4=0.0,a5=0.0,a6=0.0,a7=0.0,a8=0.0,a9=0.0,ba=0.0,bb=0.0,bc=0.0,bd=0,be=0.0,bf=0.0,bg=0.0,bh=0.0,bi=0.0,bj=0.0,bk=0.0,bl=0.0,bm=0.0,bn=0.0,bo=0.0,bp=0.0,bq=0.0,br=0.0,bs=0.0,bt=0.0,bu=0.0,bv=0.0,bw=0.0,bx=0.0,by=0.0,bz=0.0,bA=0.0,bB=0.0,bC=0.0,bD=0.0,bE=0.0,bF=0.0,bG=0.0,bH=0.0,bI=0.0,bJ=0.0,bK=0,bL=0,bM=0;d=i;i=i+208|0;e=d|0;f=d+8|0;g=d+16|0;j=d+24|0;k=d+32|0;l=d+48|0;m=d+56|0;n=d+64|0;o=d+72|0;p=d+80|0;q=d+96|0;r=d+104|0;s=d+112|0;t=d+120|0;u=d+128|0;w=d+144|0;x=d+152|0;y=d+160|0;z=d+168|0;A=d+176|0;B=d+192|0;C=d+200|0;D=C;E=i;i=i+8|0;F=E;G=i;i=i+8|0;H=i;i=i+8|0;I=i;i=i+8|0;J=i;i=i+16|0;K=i;i=i+16|0;L=i;i=i+16|0;c[C>>2]=0;c[C+4>>2]=0;c[E>>2]=0;c[E+4>>2]=0;M=a[b+239|0]|0;N=b+64|0;O=c[N>>2]|0;if((O|0)==3){fn(N,c[3524]|0);fC(b);i=d;return}else if((O|0)==2){fC(b);i=d;return}else{do{if((c[b+244>>2]|0)!=0){if((a[38984]&1)==0){break}i=d;return}}while(0);O=B|0;N=B+4|0;P=F+4|0;Q=D+4|0;R=b+260|0;S=b+252|0;i4(c[R>>2]|0,c[S>>2]|0,O,C);C=c[S>>2]|0;c[E>>2]=C;E=c[R>>2]|0;if((C|0)>0){R=0;S=E;while(1){b=R+1|0;T=c[S>>2]|0;if((b|0)<(C|0)){R=b;S=T}else{U=T;break}}}else{U=E}do{if((U|0)==0){V=8408}else{E=U;S=0;do{S=S+1|0;E=c[E>>2]|0;}while((E|0)!=0);if((S|0)<=0){V=8408;break}c[P>>2]=S;i4(U,S,N,Q)}}while(0);if((V|0)==8408){c[N>>2]=0}Q=(M&1)==0;M=A|0;U=A+8|0;P=A+4|0;E=u|0;R=u+8|0;C=u+4|0;T=p|0;b=p+8|0;W=p+4|0;X=J|0;Y=K|0;$=L|0;aa=J+8|0;J=K+8|0;K=L+8|0;L=k|0;ab=k+8|0;ac=k+4|0;ad=0;L11450:do{ae=(c[D+(ad<<2)>>2]|0)==0;af=ae?1:-1;ag=c[F+(ad<<2)>>2]|0;L11452:do{if((ag|0)>0){ah=c[B+(ad<<2)>>2]|0;ai=(ah|0)==0;aj=0;ak=0;do{if(ai){break L11452}al=c[ah+(aj<<2)>>2]|0;am=c[al+8>>2]|0;ak=ae?ak:am-1|0;an=c[al+12>>2]|0;ao=al+8|0;if((am|0)>0){am=2;al=0;ap=ak;while(1){aq=an+(ap<<6)|0;ar=c[aq>>2]|0;do{if((ar|0)==0){as=an+(ap<<6)+24|0;at=+h[as>>3];au=(+h[an+(ap<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;av=(+h[an+(ap<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aw=(at- +h[5279])*+h[2]+ +h[12]+-1.0;ax=+h[406]+au*+h[394]+av*+h[398]+aw*+h[402];ay=ax==0.0?1.0e-5:ax;az=~~((+h[403]+au*+h[391]+av*+h[395]+aw*+h[399])/ay*+(c[180]|0))+(c[186]|0)|0;aA=~~((+h[404]+au*+h[392]+av*+h[396]+aw*+h[400])/ay*+(c[40]|0))+(c[46]|0)|0;if((am|0)==0){aB=ap-af|0;if(Q){ay=+h[an+(aB<<6)+24>>3];aC=c[34]|0;aD=(a[64788+(aC*688&-1)|0]&1)==0;aE=(a[66852]&1)==0;do{if(aD){if(aE){aF=at;aG=ay;break}if(ay>0.0){aw=+_(+ay);aH=aw/+h[8358];V=8428;break}else{aI=+h[8341];V=8427;break}}else{if(aE){aI=+Z(+(ay*+h[64800+(aC*688&-1)>>3]));V=8427;break}if(+h[64792+(aC*688&-1)>>3]==+h[8357]){aJ=ay;V=8434;break}aJ=ay*+h[64800+(aC*688&-1)>>3]/+h[8358];V=8434}}while(0);do{if((V|0)==8427){V=0;if(aD){aH=aI;V=8428;break}if(!aE){aJ=aI;V=8434;break}aF=+Z(+(at*+h[64800+(aC*688&-1)>>3]));aG=aI}}while(0);do{if((V|0)==8428){V=0;if(aE){aF=at;aG=aH;break}if(at>0.0){ay=+_(+at);aF=ay/+h[8358];aG=aH;break}else{aF=+h[8341];aG=aH;break}}else if((V|0)==8434){V=0;if(+h[64792+(aC*688&-1)>>3]==+h[8357]){aF=at;aG=aJ;break}aF=at*+h[64800+(aC*688&-1)>>3]/+h[8358];aG=aJ}}while(0);aK=aG+aF}else{aK=+h[an+(aB<<6)+32>>3]+ +h[an+(ap<<6)+32>>3]}at=aK*.5;ay=+h[8341];do{if(ay>2]|0)==0){aM=aB}else{c[M>>2]=5;h[U>>3]=aL;c[P>>2]=0;cM[c[aC>>2]&511](A);aM=c[3524]|0}aC=c[8488]|0;c[w>>2]=c[8490];c[x>>2]=aC;c[y>>2]=az;c[z>>2]=aA;if((fl(w,x,y,z)|0)!=0){cN[c[aM+56>>2]&255](c[w>>2]|0,c[x>>2]|0);cN[c[aM+60>>2]&255](c[y>>2]|0,c[z>>2]|0)}c[8490]=az;c[8488]=aA;break}else if((am|0)==1){if((a[54160]&1)==0){c[8490]=az;c[8488]=aA;break}aC=ap-af|0;ul(an,aC,ap,G,H,I);ay=(+h[G>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;at=(+h[H>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;av=(+h[I>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;aw=+h[406]+ay*+h[394]+at*+h[398]+av*+h[402];au=aw==0.0?1.0e-5:aw;aB=~~((+h[403]+ay*+h[391]+at*+h[395]+av*+h[399])/au*+(c[180]|0))+(c[186]|0)|0;aE=~~((+h[404]+ay*+h[392]+at*+h[396]+av*+h[400])/au*+(c[40]|0))+(c[46]|0)|0;c[8490]=aB;c[8488]=aE;if(Q){au=+h[an+(aC<<6)+24>>3];aD=c[34]|0;aN=(a[64788+(aD*688&-1)|0]&1)==0;aO=(a[66852]&1)==0;L11513:do{if(aN){do{if(aO){aP=au}else{if(au>0.0){av=+_(+au);aP=av/+h[8358];break}else{aQ=+h[8341];V=8463;break L11513}}}while(0);aR=aP;aS=+h[as>>3];V=8464}else{if(aO){aQ=+Z(+(au*+h[64800+(aD*688&-1)>>3]));V=8463;break}if(+h[64792+(aD*688&-1)>>3]==+h[8357]){aT=au}else{aT=au*+h[64800+(aD*688&-1)>>3]/+h[8358]}aU=aT;aV=+h[as>>3];V=8465}}while(0);if((V|0)==8463){V=0;au=+h[as>>3];if(aN){aR=aQ;aS=au;V=8464}else{aU=aQ;aV=au;V=8465}}do{if((V|0)==8464){V=0;if(aO){aW=aS;aX=aR;break}if(aS>0.0){au=+_(+aS);aW=au/+h[8358];aX=aR;break}else{aW=+h[8341];aX=aR;break}}else if((V|0)==8465){V=0;if(aO){aW=+Z(+(aV*+h[64800+(aD*688&-1)>>3]));aX=aU;break}if(+h[64792+(aD*688&-1)>>3]==+h[8357]){aW=aV;aX=aU;break}aW=aV*+h[64800+(aD*688&-1)>>3]/+h[8358];aX=aU}}while(0);aY=aX+aW}else{aY=+h[an+(aC<<6)+32>>3]+ +h[an+(ap<<6)+32>>3]}au=aY*.5;av=+h[8341];do{if(av>2]|0)==0){a_=aB;a$=aE;a0=aC}else{c[E>>2]=5;h[R>>3]=aZ;c[C>>2]=0;cM[c[aD>>2]&511](u);a_=c[8490]|0;a$=c[8488]|0;a0=c[3524]|0}c[q>>2]=a_;c[r>>2]=a$;c[s>>2]=az;c[t>>2]=aA;if((fl(q,r,s,t)|0)!=0){cN[c[a0+56>>2]&255](c[q>>2]|0,c[r>>2]|0);cN[c[a0+60>>2]&255](c[s>>2]|0,c[t>>2]|0)}c[8490]=az;c[8488]=aA;break}else{c[8490]=az;c[8488]=aA;break}}else if((ar|0)==1){if((am|0)==0){if((a[54160]&1)==0){break}aD=ap-af|0;ul(an,aD,ap,G,H,I);av=(+h[G>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;au=(+h[H>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;ay=(+h[I>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;at=+h[406]+av*+h[394]+au*+h[398]+ay*+h[402];aw=at==0.0?1.0e-5:at;aC=~~((+h[403]+av*+h[391]+au*+h[395]+ay*+h[399])/aw*+(c[180]|0))+(c[186]|0)|0;aO=~~((+h[404]+av*+h[392]+au*+h[396]+ay*+h[400])/aw*+(c[40]|0))+(c[46]|0)|0;if(Q){aw=+h[an+(aD<<6)+24>>3];aN=c[34]|0;as=(a[64788+(aN*688&-1)|0]&1)==0;a1=(a[66852]&1)==0;L11565:do{if(as){do{if(a1){a2=aw}else{if(aw>0.0){ay=+_(+aw);a2=ay/+h[8358];break}else{a3=+h[8341];V=8500;break L11565}}}while(0);a4=a2;a5=+h[an+(ap<<6)+24>>3];V=8501}else{if(a1){a3=+Z(+(aw*+h[64800+(aN*688&-1)>>3]));V=8500;break}if(+h[64792+(aN*688&-1)>>3]==+h[8357]){a6=aw}else{a6=aw*+h[64800+(aN*688&-1)>>3]/+h[8358]}a7=a6;a8=+h[an+(ap<<6)+24>>3];V=8502}}while(0);if((V|0)==8500){V=0;aw=+h[an+(ap<<6)+24>>3];if(as){a4=a3;a5=aw;V=8501}else{a7=a3;a8=aw;V=8502}}do{if((V|0)==8501){V=0;if(a1){a9=a5;ba=a4;break}if(a5>0.0){aw=+_(+a5);a9=aw/+h[8358];ba=a4;break}else{a9=+h[8341];ba=a4;break}}else if((V|0)==8502){V=0;if(a1){a9=+Z(+(a8*+h[64800+(aN*688&-1)>>3]));ba=a7;break}if(+h[64792+(aN*688&-1)>>3]==+h[8357]){a9=a8;ba=a7;break}a9=a8*+h[64800+(aN*688&-1)>>3]/+h[8358];ba=a7}}while(0);bb=ba+a9}else{bb=+h[an+(aD<<6)+32>>3]+ +h[an+(ap<<6)+32>>3]}aw=bb*.5;ay=+h[8341];do{if(ay>2]|0)==0){bd=aD}else{c[T>>2]=5;h[b>>3]=bc;c[W>>2]=0;cM[c[aN>>2]&511](p);bd=c[3524]|0}aN=c[8488]|0;c[l>>2]=c[8490];c[m>>2]=aN;c[n>>2]=aC;c[o>>2]=aO;if((fl(l,m,n,o)|0)!=0){cN[c[bd+56>>2]&255](c[l>>2]|0,c[m>>2]|0);cN[c[bd+60>>2]&255](c[n>>2]|0,c[o>>2]|0)}c[8490]=aC;c[8488]=aO;break}else if((am|0)!=1){break}if((a[54152]&1)==0){break}aN=ap-af|0;if(!(um(an,aN,ap,X,Y,$)|0)){break}ay=+h[64664+((c[200]|0)*688&-1)>>3];aw=+h[91];av=+h[96];au=(+h[X>>3]-ay)*aw+av+-1.0;at=+h[64664+((c[144]|0)*688&-1)>>3];ax=+h[21];be=+h[68];bf=(+h[Y>>3]-at)*ax+be+-1.0;bg=+h[5279];bh=+h[2];bi=+h[12];bj=(+h[$>>3]-bg)*bh+bi+-1.0;bk=+h[403];bl=+h[391];bm=+h[395];bn=+h[399];bo=+h[404];bp=+h[392];bq=+h[396];br=+h[400];bs=+h[406];bt=+h[394];bu=+h[398];bv=+h[402];bw=bs+au*bt+bf*bu+bj*bv;bx=bw==0.0?1.0e-5:bw;bw=+(c[180]|0);aD=c[186]|0;a1=~~((bk+au*bl+bf*bm+bj*bn)/bx*bw)+aD|0;by=+(c[40]|0);as=c[46]|0;aA=~~((bo+au*bp+bf*bq+bj*br)/bx*by)+as|0;bx=av+aw*(+h[aa>>3]-ay)+-1.0;ay=be+ax*(+h[J>>3]-at)+-1.0;at=bi+bh*(+h[K>>3]-bg)+-1.0;bg=bs+bt*bx+bu*ay+bv*at;bv=bg==0.0?1.0e-5:bg;az=~~(bw*((bk+bl*bx+bm*ay+bn*at)/bv))+aD|0;aD=~~(by*((bo+bp*bx+bq*ay+br*at)/bv))+as|0;c[8490]=a1;c[8488]=aA;if(Q){bv=+h[an+(aN<<6)+24>>3];as=c[34]|0;aE=(a[64788+(as*688&-1)|0]&1)==0;aB=(a[66852]&1)==0;L11615:do{if(aE){do{if(aB){bz=bv}else{if(bv>0.0){at=+_(+bv);bz=at/+h[8358];break}else{bA=+h[8341];V=8536;break L11615}}}while(0);bB=bz;bC=+h[an+(ap<<6)+24>>3];V=8537}else{if(aB){bA=+Z(+(bv*+h[64800+(as*688&-1)>>3]));V=8536;break}if(+h[64792+(as*688&-1)>>3]==+h[8357]){bD=bv}else{bD=bv*+h[64800+(as*688&-1)>>3]/+h[8358]}bE=bD;bF=+h[an+(ap<<6)+24>>3];V=8538}}while(0);if((V|0)==8536){V=0;bv=+h[an+(ap<<6)+24>>3];if(aE){bB=bA;bC=bv;V=8537}else{bE=bA;bF=bv;V=8538}}do{if((V|0)==8537){V=0;if(aB){bG=bC;bH=bB;break}if(bC>0.0){bv=+_(+bC);bG=bv/+h[8358];bH=bB;break}else{bG=+h[8341];bH=bB;break}}else if((V|0)==8538){V=0;if(aB){bG=+Z(+(bF*+h[64800+(as*688&-1)>>3]));bH=bE;break}if(+h[64792+(as*688&-1)>>3]==+h[8357]){bG=bF;bH=bE;break}bG=bF*+h[64800+(as*688&-1)>>3]/+h[8358];bH=bE}}while(0);bI=bH+bG}else{bI=+h[an+(aN<<6)+32>>3]+ +h[an+(ap<<6)+32>>3]}bv=bI*.5;at=+h[8341];do{if(at>2]|0)==0){bK=a1;bL=aA;bM=aN}else{c[L>>2]=5;h[ab>>3]=bJ;c[ac>>2]=0;cM[c[as>>2]&511](k);bK=c[8490]|0;bL=c[8488]|0;bM=c[3524]|0}c[e>>2]=bK;c[f>>2]=bL;c[g>>2]=az;c[j>>2]=aD;if((fl(e,f,g,j)|0)!=0){cN[c[bM+56>>2]&255](c[e>>2]|0,c[f>>2]|0);cN[c[bM+60>>2]&255](c[g>>2]|0,c[j>>2]|0)}c[8490]=az;c[8488]=aD}else if((ar|0)!=2){V=8557;break L11450}}while(0);ar=al+1|0;if((ar|0)<(c[ao>>2]|0)){am=c[aq>>2]|0;al=ar;ap=ap+af|0}else{break}}}aj=aj+1|0;}while((aj|0)<(ag|0))}}while(0);ad=ad+1|0;}while((ad|0)<2);if((V|0)==8557){uk(203224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}V=c[O>>2]|0;if((V|0)!=0){uu(V)}V=c[N>>2]|0;if((V|0)==0){i=d;return}uu(V);i=d;return}}function fC(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0,_=0,$=0,aa=0,ab=0.0,ac=0.0,ad=0.0,ae=0.0,af=0.0,ag=0.0,ah=0.0,ai=0.0,aj=0.0,ak=0.0,al=0.0,am=0.0,an=0.0,ao=0.0,ap=0.0,aq=0.0,ar=0.0,as=0.0,at=0.0,au=0.0,av=0.0,aw=0.0,ax=0,ay=0;d=i;i=i+216|0;e=d|0;f=d+8|0;g=d+16|0;j=d+24|0;k=d+32|0;l=d+40|0;m=d+48|0;n=d+56|0;o=d+64|0;p=d+72|0;q=d+80|0;r=d+88|0;s=d+96|0;t=d+104|0;u=d+112|0;w=d+120|0;x=d+128|0;y=d+144|0;z=d+152|0;A=d+160|0;B=d+168|0;C=d+184|0;D=d+200|0;E=c[b+260>>2]|0;do{if((c[b+244>>2]|0)!=0){if((a[38984]&1)==0){break}i=d;return}}while(0);do{if((a[b+239|0]&1)==0){F=0}else{if((c[b+64>>2]|0)!=3){F=0;break}F=+h[b+72>>3]<0.0}}while(0);if((E|0)==0){i=d;return}G=x|0;H=x+4|0;I=x+8|0;J=B|0;K=C|0;L=D|0;M=B+8|0;B=C+8|0;C=D+8|0;D=b+64|0;N=D|0;O=b+68|0;b=E;L11686:while(1){E=c[b+12>>2]|0;P=b+8|0;if((c[P>>2]|0)>0){Q=0;R=2;while(1){do{if(F){S=(c[3524]|0)+144|0;if((c[S>>2]|0)==0){break}T=~~+h[E+(Q<<6)+32>>3];c[G>>2]=3;c[H>>2]=T;h[I>>3]=0.0;cM[c[S>>2]&511](x)}else{if((c[N>>2]|0)!=2){break}c[O>>2]=~~+h[E+(Q<<6)+32>>3];fn(D,c[3524]|0)}}while(0);S=E+(Q<<6)|0;T=c[S>>2]|0;do{if((T|0)==0){U=(+h[E+(Q<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;V=(+h[E+(Q<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;W=(+h[E+(Q<<6)+24>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;X=+h[406]+U*+h[394]+V*+h[398]+W*+h[402];Y=X==0.0?1.0e-5:X;Z=~~((+h[403]+U*+h[391]+V*+h[395]+W*+h[399])/Y*+(c[180]|0))+(c[186]|0)|0;_=~~((+h[404]+U*+h[392]+V*+h[396]+W*+h[400])/Y*+(c[40]|0))+(c[46]|0)|0;if((R|0)==0){$=c[8488]|0;c[s>>2]=c[8490];c[t>>2]=$;c[u>>2]=Z;c[w>>2]=_;$=c[3524]|0;if((fl(s,t,u,w)|0)!=0){cN[c[$+56>>2]&255](c[s>>2]|0,c[t>>2]|0);cN[c[$+60>>2]&255](c[u>>2]|0,c[w>>2]|0)}c[8490]=Z;c[8488]=_;break}else if((R|0)==1){if((a[54160]&1)==0){c[8490]=Z;c[8488]=_;break}ul(E,Q-1|0,Q,y,z,A);Y=(+h[y>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;W=(+h[z>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;V=(+h[A>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;U=+h[406]+Y*+h[394]+W*+h[398]+V*+h[402];X=U==0.0?1.0e-5:U;$=~~((+h[403]+Y*+h[391]+W*+h[395]+V*+h[399])/X*+(c[180]|0))+(c[186]|0)|0;aa=~~((+h[404]+Y*+h[392]+W*+h[396]+V*+h[400])/X*+(c[40]|0))+(c[46]|0)|0;c[8490]=$;c[8488]=aa;c[k>>2]=$;c[l>>2]=aa;c[m>>2]=Z;c[n>>2]=_;aa=c[3524]|0;if((fl(k,l,m,n)|0)!=0){cN[c[aa+56>>2]&255](c[k>>2]|0,c[l>>2]|0);cN[c[aa+60>>2]&255](c[m>>2]|0,c[n>>2]|0)}c[8490]=Z;c[8488]=_;break}else{c[8490]=Z;c[8488]=_;break}}else if((T|0)==1){if((R|0)==0){if((a[54160]&1)==0){break}ul(E,Q-1|0,Q,y,z,A);X=(+h[y>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;V=(+h[z>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;W=(+h[A>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;Y=+h[406]+X*+h[394]+V*+h[398]+W*+h[402];U=Y==0.0?1.0e-5:Y;_=~~((+h[403]+X*+h[391]+V*+h[395]+W*+h[399])/U*+(c[180]|0))+(c[186]|0)|0;Z=~~((+h[404]+X*+h[392]+V*+h[396]+W*+h[400])/U*+(c[40]|0))+(c[46]|0)|0;aa=c[8488]|0;c[e>>2]=c[8490];c[f>>2]=aa;c[g>>2]=_;c[j>>2]=Z;aa=c[3524]|0;if((fl(e,f,g,j)|0)!=0){cN[c[aa+56>>2]&255](c[e>>2]|0,c[f>>2]|0);cN[c[aa+60>>2]&255](c[g>>2]|0,c[j>>2]|0)}c[8490]=_;c[8488]=Z;break}else if((R|0)!=1){break}if((a[54152]&1)==0){break}if(!(um(E,Q-1|0,Q,J,K,L)|0)){break}U=+h[64664+((c[200]|0)*688&-1)>>3];W=+h[91];V=+h[96];X=(+h[J>>3]-U)*W+V+-1.0;Y=+h[64664+((c[144]|0)*688&-1)>>3];ab=+h[21];ac=+h[68];ad=(+h[K>>3]-Y)*ab+ac+-1.0;ae=+h[5279];af=+h[2];ag=+h[12];ah=(+h[L>>3]-ae)*af+ag+-1.0;ai=+h[403];aj=+h[391];ak=+h[395];al=+h[399];am=+h[404];an=+h[392];ao=+h[396];ap=+h[400];aq=+h[406];ar=+h[394];as=+h[398];at=+h[402];au=aq+X*ar+ad*as+ah*at;av=au==0.0?1.0e-5:au;au=+(c[180]|0);Z=c[186]|0;_=~~((ai+X*aj+ad*ak+ah*al)/av*au)+Z|0;aw=+(c[40]|0);aa=c[46]|0;$=~~((am+X*an+ad*ao+ah*ap)/av*aw)+aa|0;av=V+W*(+h[M>>3]-U)+-1.0;U=ac+ab*(+h[B>>3]-Y)+-1.0;Y=ag+af*(+h[C>>3]-ae)+-1.0;ae=aq+ar*av+as*U+at*Y;at=ae==0.0?1.0e-5:ae;ax=~~(au*((ai+aj*av+ak*U+al*Y)/at))+Z|0;Z=~~(aw*((am+an*av+ao*U+ap*Y)/at))+aa|0;c[8490]=_;c[8488]=$;c[o>>2]=_;c[p>>2]=$;c[q>>2]=ax;c[r>>2]=Z;$=c[3524]|0;if((fl(o,p,q,r)|0)!=0){cN[c[$+56>>2]&255](c[o>>2]|0,c[p>>2]|0);cN[c[$+60>>2]&255](c[q>>2]|0,c[r>>2]|0)}c[8490]=ax;c[8488]=Z}else if((T|0)!=2){ay=8605;break L11686}}while(0);T=Q+1|0;if((T|0)<(c[P>>2]|0)){Q=T;R=c[S>>2]|0}else{break}}}R=c[b>>2]|0;if((R|0)==0){ay=8611;break}else{b=R}}if((ay|0)==8605){uk(203224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ay|0)==8611){i=d;return}}function fD(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0.0,D=0.0,E=0.0,F=0,G=0.0,H=0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0,S=0.0,T=0.0,U=0;g=i;i=i+16|0;j=g|0;k=c[13542]|0;l=c[9006]|0;m=l+d|0;n=c[9010]|0;o=n+d|0;p=b+64|0;q=c[p>>2]|0;r=c[3524]|0;if((f|0)==-1){s=1.0}else{s=((+h[3817]+-1.0)*.5+1.0)*3.0}t=+(l-n|0);n=~~(t/(+((c[r+20>>2]|0)>>>0>>>0)*s)+.5);l=(n|0)<2?2:n;s=+(l|0);u=t/s;if((q|0)==1){v=8617}else if((q|0)==3){if(+h[b+72>>3]>=0.0){v=8617}}else if((q|0)==2){if((c[b+28>>2]|0)!=-6){v=8617}}if((v|0)==8617){fn(p,r);p=c[13542]|0;q=c[3524]|0;c[13542]=(c[q+96>>2]&128|0)==0?55520:0;cM[c[q+168>>2]&511](8);q=(c[9018]|0)+d|0;d=c[13542]|0;if((d|0)==0){v=8619}else{n=(c[d>>2]|0)>(q|0)&1;w=(c[d+4>>2]|0)<(q|0)?n|2:n;n=(c[d+8>>2]|0)>(e|0)?w|4:w;if((((c[d+12>>2]|0)<(e|0)?n|8:n)|0)==0){v=8619}}if((v|0)==8619){cR[c[(c[3524]|0)+80>>2]&127](q,e,f)}cM[c[(c[3524]|0)+168>>2]&511](9);c[13542]=p;i=g;return}p=(a[b+239|0]&1)==0;q=c[b+260>>2]|0;if((q|0)==0){i=g;return}n=c[b+252>>2]|0;b=0;d=q;t=-8.988465674311579e+307;x=-8.988465674311579e+307;y=8.988465674311579e+307;while(1){if((b|0)>=(n|0)){z=x;A=y;break}q=c[d+12>>2]|0;w=c[d+8>>2]|0;if((w|0)>0){B=0;C=t;D=x;E=y;while(1){do{if((c[q+(B<<6)>>2]|0)==0){if(p){F=q+(B<<6)+24|0}else{F=q+(B<<6)+32|0}G=+h[F>>3];H=G>2]|0;if((B|0)==0){z=O;A=P;break}else{b=b+1|0;d=B;t=N;x=O;y=P}}if(A>z){i=g;return}P=+h[8341];y=A>P?A:P;A=+h[8342];O=z>24==112&1|0);R=d;break}z=(y-P)/(A-P);d=a[20668]|0;if(d<<24>>24==112){Q=z;R=112;break}Q=1.0-z;R=d}else{d=a[20668]|0;Q=+(d<<24>>24!=112&1|0);R=d}}while(0);do{if(P>24==112&1|0);break}y=(O-P)/(A-P);if(R<<24>>24==112){S=y;break}S=1.0-y}else{S=+(R<<24>>24!=112&1|0)}}while(0);P=(S-Q)/s;c[13542]=(c[r+96>>2]&128|0)==0?55520:0;if((l|0)>=0){r=j|0;R=j+8|0;d=j+4|0;b=0;do{F=(b|0)==(l|0);if(F){T=S}else{T=Q+P*+(b|0)}p=(c[3524]|0)+144|0;if((c[p>>2]|0)!=0){c[r>>2]=5;h[R>>3]=T;c[d>>2]=0;cM[c[p>>2]&511](j)}p=(b|0)==0;if(p|F){U=p?o:m}else{U=~~(u*+(b|0)+.5)+o|0}p=c[13542]|0;if((p|0)==0){v=8657}else{F=(c[p>>2]|0)>(U|0)&1;n=(c[p+4>>2]|0)<(U|0)?F|2:F;F=(c[p+8>>2]|0)>(e|0)?n|4:n;if((((c[p+12>>2]|0)<(e|0)?F|8:F)|0)==0){v=8657}}if((v|0)==8657){v=0;cR[c[(c[3524]|0)+80>>2]&127](U,e,f)}b=b+1|0;}while((b|0)<=(l|0))}c[13542]=k;i=g;return}function fE(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0,H=0,I=0,J=0,K=0,L=0;e=i;i=i+16|0;f=e|0;g=c[3524]|0;j=c[b+260>>2]|0;if((j|0)==0){i=e;return}k=b+64|0;l=b+239|0;m=b+72|0;n=b+68|0;o=f|0;p=f+4|0;q=f+8|0;r=b+12|0;s=g+80|0;t=b+48|0;u=g+92|0;g=j;do{j=(c[k>>2]|0)==3;if((a[l]&1)!=0&j){v=+h[m>>3]<0.0}else{v=0}do{if(!(v|j^1)){w=c[n>>2]|0;x=(c[3524]|0)+144|0;if((c[x>>2]|0)==0){break}c[o>>2]=3;c[p>>2]=w;h[q>>3]=0.0;cM[c[x>>2]&511](f)}}while(0);j=g+8|0;x=c[j>>2]|0;if((x|0)>0){w=g+12|0;y=0;z=x;while(1){x=c[w>>2]|0;A=x+(y<<6)|0;do{if((c[A>>2]|0)==0){B=(+h[x+(y<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;C=(+h[x+(y<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;D=(+h[x+(y<<6)+24>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;E=+h[406]+B*+h[394]+C*+h[398]+D*+h[402];F=E==0.0?1.0e-5:E;G=~~((+h[403]+B*+h[391]+C*+h[395]+D*+h[399])/F*+(c[180]|0))+(c[186]|0)|0;H=~~((+h[404]+B*+h[392]+C*+h[396]+D*+h[400])/F*+(c[40]|0))+(c[46]|0)|0;I=c[13542]|0;if((I|0)!=0){J=(c[I>>2]|0)>(G|0)&1;K=(c[I+4>>2]|0)<(G|0)?J|2:J;J=(c[I+8>>2]|0)>(H|0)?K|4:K;if((((c[I+12>>2]|0)<(H|0)?J|8:J)|0)!=0){L=z;break}}fL(b,A);J=c[r>>2]|0;do{if((J|0)==18|(J|0)==51){if(+h[t>>3]!=-3.0){break}cK[c[u>>2]&63](+h[3817]*+h[x+(y<<6)+48>>3])}}while(0);cR[c[s>>2]&127](G,H,d);L=c[j>>2]|0}else{L=z}}while(0);x=y+1|0;if((x|0)<(L|0)){y=x;z=L}else{break}}}g=c[g>>2]|0;}while((g|0)!=0);i=e;return}function fF(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;e=i;i=i+48|0;f=e|0;g=c[13542]|0;if((c[5094]|0)!=0){c[13542]=31752}j=c[11690]|0;if((j&2|0)==0){k=j}else{j=b+4|0;l=c[j>>2]|0;m=+h[l+24>>3];n=(+h[l+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;o=(+h[l+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;p=(m- +h[5279])*+h[2]+ +h[12]+-1.0;q=+h[404]+n*+h[392]+o*+h[396]+p*+h[400];r=+h[405]+n*+h[393]+o*+h[397]+p*+h[401];s=+h[406]+n*+h[394]+o*+h[398]+p*+h[402];t=s==0.0?1.0e-5:s;s=(+h[403]+n*+h[391]+o*+h[395]+p*+h[399])/t;l=f|0;h[l>>3]=s;p=q/t;u=f+8|0;h[u>>3]=p;q=r/t;v=f+16|0;h[v>>3]=q;w=f+32|0;h[w>>3]=m;x=f+40|0;c[x>>2]=0;if((a[38984]&1)==0){y=f;c[7612]=c[y>>2];c[7613]=c[y+4>>2];c[7614]=c[y+8>>2];c[7615]=c[y+12>>2];c[7616]=c[y+16>>2];c[7617]=c[y+20>>2];c[7618]=c[y+24>>2];c[7619]=c[y+28>>2];c[7620]=c[y+32>>2];c[7621]=c[y+36>>2];c[7622]=c[y+40>>2];c[7623]=c[y+44>>2];z=8695}else{if(q==-2.0){y=f;c[7612]=c[y>>2];c[7613]=c[y+4>>2];c[7614]=c[y+8>>2];c[7615]=c[y+12>>2];c[7616]=c[y+16>>2];c[7617]=c[y+20>>2];c[7618]=c[y+24>>2];c[7619]=c[y+28>>2];c[7620]=c[y+32>>2];c[7621]=c[y+36>>2];c[7622]=c[y+40>>2];c[7623]=c[y+44>>2]}else{h[v>>3]=q+.01;y=f;c[7612]=c[y>>2];c[7613]=c[y+4>>2];c[7614]=c[y+8>>2];c[7615]=c[y+12>>2];c[7616]=c[y+16>>2];c[7617]=c[y+20>>2];c[7618]=c[y+24>>2];c[7619]=c[y+28>>2];c[7620]=c[y+32>>2];c[7621]=c[y+36>>2];c[7622]=c[y+40>>2];c[7623]=c[y+44>>2]}if((a[46752]&1)==0){z=8695}}if((z|0)==8695){cN[c[(c[3524]|0)+56>>2]&255](~~(s*+(c[180]|0))+(c[186]|0)|0,~~(p*+(c[40]|0))+(c[46]|0)|0)}y=b+44|0;if((c[y>>2]|0)>1){A=1;do{B=c[j>>2]|0;p=+h[B+(A<<6)+24>>3];s=(+h[B+(A<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;q=(+h[B+(A<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;m=(p- +h[5279])*+h[2]+ +h[12]+-1.0;t=+h[404]+s*+h[392]+q*+h[396]+m*+h[400];r=+h[405]+s*+h[393]+q*+h[397]+m*+h[401];o=+h[406]+s*+h[394]+q*+h[398]+m*+h[402];n=o==0.0?1.0e-5:o;h[l>>3]=(+h[403]+s*+h[391]+q*+h[395]+m*+h[399])/n;h[u>>3]=t/n;t=r/n;h[v>>3]=t;h[w>>3]=p;c[x>>2]=0;if(!((a[38984]&1)==0|t==-2.0)){h[v>>3]=t+.01}up(f,d);A=A+1|0;}while((A|0)<(c[y>>2]|0))}k=c[11690]|0}do{if((k&1|0)!=0){y=b+4|0;A=c[y>>2]|0;t=+h[7076];p=(+h[A+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;n=(+h[A+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;r=(t- +h[5279])*+h[2]+ +h[12]+-1.0;m=+h[404]+p*+h[392]+n*+h[396]+r*+h[400];q=+h[405]+p*+h[393]+n*+h[397]+r*+h[401];s=+h[406]+p*+h[394]+n*+h[398]+r*+h[402];o=s==0.0?1.0e-5:s;s=(+h[403]+p*+h[391]+n*+h[395]+r*+h[399])/o;v=f|0;h[v>>3]=s;r=m/o;x=f+8|0;h[x>>3]=r;w=f+16|0;h[w>>3]=q/o;u=f+32|0;h[u>>3]=t;l=f+40|0;c[l>>2]=0;h[u>>3]=+h[A+24>>3];A=f;c[7612]=c[A>>2];c[7613]=c[A+4>>2];c[7614]=c[A+8>>2];c[7615]=c[A+12>>2];c[7616]=c[A+16>>2];c[7617]=c[A+20>>2];c[7618]=c[A+24>>2];c[7619]=c[A+28>>2];c[7620]=c[A+32>>2];c[7621]=c[A+36>>2];c[7622]=c[A+40>>2];c[7623]=c[A+44>>2];if((a[38984]&1)==0){z=8704}else{if((a[46752]&1)==0){z=8704}}if((z|0)==8704){cN[c[(c[3524]|0)+56>>2]&255](~~(s*+(c[180]|0))+(c[186]|0)|0,~~(r*+(c[40]|0))+(c[46]|0)|0)}A=b+44|0;if((c[A>>2]|0)>1){C=1}else{break}do{j=c[y>>2]|0;r=+h[7076];s=(+h[j+(C<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;t=(+h[j+(C<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;o=(r- +h[5279])*+h[2]+ +h[12]+-1.0;q=+h[404]+s*+h[392]+t*+h[396]+o*+h[400];m=+h[405]+s*+h[393]+t*+h[397]+o*+h[401];n=+h[406]+s*+h[394]+t*+h[398]+o*+h[402];p=n==0.0?1.0e-5:n;h[v>>3]=(+h[403]+s*+h[391]+t*+h[395]+o*+h[399])/p;h[x>>3]=q/p;h[w>>3]=m/p;h[u>>3]=r;c[l>>2]=0;h[u>>3]=+h[j+(C<<6)+24>>3];up(f,d);C=C+1|0;}while((C|0)<(c[A>>2]|0))}}while(0);if((c[5094]|0)==0){i=e;return}c[13542]=g;i=e;return}function fG(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0;e=i;i=i+48|0;f=e|0;g=c[11690]|0;do{if((g&2|0)==0){j=g}else{k=b+44|0;if((c[k>>2]|0)<=0){j=g;break}l=b+4|0;m=f|0;n=f+8|0;o=f+16|0;p=f+32|0;q=f+40|0;r=0;do{s=c[l>>2]|0;t=+h[s+(r<<6)+24>>3];u=(+h[s+(r<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;v=(+h[s+(r<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;w=(t- +h[5279])*+h[2]+ +h[12]+-1.0;x=+h[404]+u*+h[392]+v*+h[396]+w*+h[400];y=+h[405]+u*+h[393]+v*+h[397]+w*+h[401];z=+h[406]+u*+h[394]+v*+h[398]+w*+h[402];A=z==0.0?1.0e-5:z;h[m>>3]=(+h[403]+u*+h[391]+v*+h[395]+w*+h[399])/A;h[n>>3]=x/A;x=y/A;h[o>>3]=x;h[p>>3]=t;c[q>>2]=0;if(!((a[38984]&1)==0|x==-2.0)){h[o>>3]=x+.01}uo(f,d);r=r+1|0;}while((r|0)<(c[k>>2]|0));j=c[11690]|0}}while(0);if((j&1|0)==0){i=e;return}j=b+44|0;if((c[j>>2]|0)<=0){i=e;return}g=b+4|0;b=f|0;k=f+8|0;r=f+16|0;o=f+32|0;q=f+40|0;p=0;do{n=c[g>>2]|0;x=(+h[n+(p<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;t=(+h[n+(p<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;A=(+h[7076]- +h[5279])*+h[2]+ +h[12]+-1.0;y=+h[404]+x*+h[392]+t*+h[396]+A*+h[400];w=+h[405]+x*+h[393]+t*+h[397]+A*+h[401];v=+h[406]+x*+h[394]+t*+h[398]+A*+h[402];u=v==0.0?1.0e-5:v;h[b>>3]=(+h[403]+x*+h[391]+t*+h[395]+A*+h[399])/u;h[k>>3]=y/u;h[r>>3]=w/u;c[q>>2]=0;h[o>>3]=+h[n+(p<<6)+24>>3];uo(f,d);p=p+1|0;}while((p|0)<(c[j>>2]|0));i=e;return}function fH(b,d,e,f,g){b=b|0;d=+d;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0,R=0,S=0,T=0.0,U=0.0,V=0,W=0,X=0;j=i;i=i+144|0;k=f;f=i;i=i+56|0;uD(f,k,56);k=j|0;l=j+16|0;m=j+32|0;n=j+80|0;o=j+128|0;p=j+136|0;q=(e|0)!=0;if(q){r=65056+(b*688&-1)|0}else{r=65064+(b*688&-1)|0}s=65072+(b*688&-1)|0;t=+h[r>>3]*((a[s]&1)!=0?1.0:-1.0);r=c[144]|0;u=+h[64664+(r*688&-1)>>3];v=+h[97];w=u+ +h[64672+(r*688&-1)>>3]-v;r=c[3524]|0;x=+h[7076];y=c[200]|0;z=(d- +h[64664+(y*688&-1)>>3])*+h[91]+ +h[96]+-1.0;A=(v-u)*+h[21]+ +h[68]+-1.0;u=(x- +h[5279])*+h[2]+ +h[12]+-1.0;v=+h[404]+z*+h[392]+A*+h[396]+u*+h[400];B=+h[405]+z*+h[393]+A*+h[397]+u*+h[401];C=+h[406]+z*+h[394]+A*+h[398]+u*+h[402];D=C==0.0?1.0e-5:C;E=m|0;h[E>>3]=(+h[403]+z*+h[391]+A*+h[395]+u*+h[399])/D;F=m+8|0;h[F>>3]=v/D;G=m+16|0;h[G>>3]=B/D;H=m+32|0;h[H>>3]=x;I=m+40|0;c[I>>2]=0;if((c[f+4>>2]|0)>-3){J=r+168|0;cM[c[J>>2]&511](3);x=+h[7076];D=(d- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;B=(w- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;v=(x- +h[5279])*+h[2]+ +h[12]+-1.0;u=+h[404]+D*+h[392]+B*+h[396]+v*+h[400];A=+h[405]+D*+h[393]+B*+h[397]+v*+h[401];z=+h[406]+D*+h[394]+B*+h[398]+v*+h[402];C=z==0.0?1.0e-5:z;h[n>>3]=(+h[403]+D*+h[391]+B*+h[395]+v*+h[399])/C;h[n+8>>3]=u/C;h[n+16>>3]=A/C;h[n+32>>3]=x;c[n+40>>2]=0;do{if((a[38984]&1)==0){K=8734}else{if((a[46752]&1)==0){K=8734;break}gt(m,n,f)}}while(0);if((K|0)==8734){un(m,n,f,f+40|0)}cM[c[J>>2]&511](4);L=c[200]|0}else{L=y}do{if((c[64916+(L*688&-1)>>2]&2|0)!=0){y=c[144]|0;if((a[64788+(y*688&-1)|0]&1)!=0){break}x=+h[64664+(y*688&-1)>>3];C=+h[64672+(y*688&-1)>>3];if(x0.0|C<0.0){break}}else{if(C>0.0|x<0.0){break}}C=+h[7076];A=(d- +h[64664+(L*688&-1)>>3])*+h[91]+ +h[96]+-1.0;u=(0.0-x)*+h[21]+ +h[68]+-1.0;x=(C- +h[5279])*+h[2]+ +h[12]+-1.0;v=+h[404]+A*+h[392]+u*+h[396]+x*+h[400];B=+h[405]+A*+h[393]+u*+h[397]+x*+h[401];D=+h[406]+A*+h[394]+u*+h[398]+x*+h[402];z=D==0.0?1.0e-5:D;h[E>>3]=(+h[403]+A*+h[391]+u*+h[395]+x*+h[399])/z;h[F>>3]=v/z;h[G>>3]=B/z;h[H>>3]=C;c[I>>2]=0}}while(0);L=r+24|0;y=n|0;h[y>>3]=+h[E>>3]+t*+h[695]*+((c[L>>2]|0)>>>0>>>0);J=n+8|0;h[J>>3]=+h[F>>3]+t*+h[694]*+((c[L>>2]|0)>>>0>>>0);f=n+16|0;h[f>>3]=+h[G>>3]+t*+h[693]*+((c[L>>2]|0)>>>0>>>0);M=n+32|0;h[M>>3]=+h[H>>3];do{if((a[38984]&1)==0){K=8745}else{if((a[46752]&1)==0){K=8745;break}gt(m,n,56296)}}while(0);if((K|0)==8745){un(m,n,56296,56336)}N=l;c[N>>2]=c[14084];c[N+4>>2]=c[56340>>2];c[N+8>>2]=c[56344>>2];c[N+12>>2]=c[56348>>2];N=c[14075]|0;do{if((c[14074]|0)!=0){C=+h[7040];O=c[(c[3524]|0)+92>>2]|0;if(C<0.0){cK[O&63](+h[3817]);break}else{cK[O&63](C);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);O=c[(c[3524]|0)+64>>2]|0;if((N|0)<-5){cM[O&511](-2)}else{cM[O&511](N)}O=c[3524]|0;do{if((a[56328]&1)==0){if((c[O+96>>2]&1024|0)!=0){break}c[l>>2]=1;c[l+4>>2]=N;K=8756}else{K=8756}}while(0);if((K|0)==8756){fn(l,O)}do{if(q){L11938:do{if((g|0)==0){Q=e}else{O=c[200]|0;C=+h[64672+(O*688&-1)>>3]- +h[64664+(O*688&-1)>>3];O=g;while(1){if(+P(+((d- +h[O>>3])/C))<=.001){Q=0;break L11938}l=c[O+16>>2]|0;if((l|0)==0){Q=e;break}else{O=l}}}}while(0);fx(64984+(b*688&-1)|0,o,p,99744);C=+h[695];z=+(c[180]|0);B=C*z;if(B<-.9){R=0}else{R=B<.9?1:2}O=c[5094]|0;do{if((O|0)==0){S=R}else{if((a[65272+(b*688&-1)|0]&1)==0){S=R;break}S=c[65128+(b*688&-1)>>2]|0}}while(0);B=+h[E>>3]-C*+((c[r+20>>2]|0)>>>0>>>0);h[y>>3]=B;v=+h[694];x=+h[F>>3]-v*+((c[r+16>>2]|0)>>>0>>>0);h[J>>3]=x;if((a[s]&1)==0){u=+h[65056+(b*688&-1)>>3];A=B-u*C*+((c[L>>2]|0)>>>0>>>0);h[y>>3]=A;D=x-u*v*+((c[L>>2]|0)>>>0>>>0);h[J>>3]=D;T=A;U=D}else{T=B;U=x}l=~~(T*z)+(c[186]|0)|0;N=~~(U*+(c[40]|0))+(c[46]|0)|0;V=64928+(b*688&-1)|0;if((c[V>>2]|0)==0){W=O}else{fn(V,r);W=c[5094]|0}V=c[65032+(b*688&-1)>>2]|0;if((W|0)==0|(V|0)==0){K=8773}else{if((cO[c[(c[3524]|0)+72>>2]&255](V)|0)==0){K=8773}else{X=V}}if((K|0)==8773){X=0}ln(l+(c[o>>2]|0)|0,N+(c[p>>2]|0)|0,Q,S,0,X,c[64924+(b*688&-1)>>2]|0);N=c[(c[3524]|0)+72>>2]|0;cO[N&255](0);N=k;c[N>>2]=c[14084];c[N+4>>2]=c[56340>>2];c[N+8>>2]=c[56344>>2];c[N+12>>2]=c[56348>>2];N=c[14075]|0;do{if((c[14074]|0)!=0){x=+h[7040];l=c[(c[3524]|0)+92>>2]|0;if(x<0.0){cK[l&63](+h[3817]);break}else{cK[l&63](x);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);O=c[(c[3524]|0)+64>>2]|0;if((N|0)<-5){cM[O&511](-2)}else{cM[O&511](N)}O=c[3524]|0;if((a[56328]&1)==0){if((c[O+96>>2]&1024|0)!=0){break}c[k>>2]=1;c[k+4>>2]=N}fn(k,O)}}while(0);k=c[200]|0;if((c[64916+(k*688&-1)>>2]&4|0)==0){i=j;return}U=+h[7076];T=(d- +h[64664+(k*688&-1)>>3])*+h[91]+ +h[96]+-1.0;d=(w- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;w=(U- +h[5279])*+h[2]+ +h[12]+-1.0;z=+h[404]+T*+h[392]+d*+h[396]+w*+h[400];C=+h[405]+T*+h[393]+d*+h[397]+w*+h[401];x=+h[406]+T*+h[394]+d*+h[398]+w*+h[402];B=x==0.0?1.0e-5:x;x=(+h[403]+T*+h[391]+d*+h[395]+w*+h[399])/B;h[E>>3]=x;w=z/B;h[F>>3]=w;z=C/B;h[G>>3]=z;h[H>>3]=U;c[I>>2]=0;h[y>>3]=x-t*+h[695]*+((c[L>>2]|0)>>>0>>>0);h[J>>3]=w-t*+h[694]*+((c[L>>2]|0)>>>0>>>0);h[f>>3]=z-t*+h[693]*+((c[L>>2]|0)>>>0>>>0);h[M>>3]=U;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(m,n,56296);i=j;return}}while(0);un(m,n,56296,56336);i=j;return}function fI(b,d,e,f,g){b=b|0;d=+d;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0,R=0,S=0.0,T=0.0,U=0,V=0.0,W=0,X=0.0,Y=0,Z=0,_=0,$=0;j=i;i=i+128|0;k=f;f=i;i=i+56|0;uD(f,k,56);k=j|0;l=j+16|0;m=j+64|0;n=j+112|0;o=j+120|0;p=(e|0)!=0;if(p){q=65056+(b*688&-1)|0}else{q=65064+(b*688&-1)|0}r=65072+(b*688&-1)|0;s=+h[q>>3]*((a[r]&1)!=0?1.0:-1.0);q=c[200]|0;t=+h[64664+(q*688&-1)>>3];u=+h[69];v=t+ +h[64672+(q*688&-1)>>3]-u;q=c[3524]|0;w=+h[7076];x=(u-t)*+h[91]+ +h[96]+-1.0;y=c[144]|0;t=(d- +h[64664+(y*688&-1)>>3])*+h[21]+ +h[68]+-1.0;u=(w- +h[5279])*+h[2]+ +h[12]+-1.0;z=+h[404]+x*+h[392]+t*+h[396]+u*+h[400];A=+h[405]+x*+h[393]+t*+h[397]+u*+h[401];B=+h[406]+x*+h[394]+t*+h[398]+u*+h[402];C=B==0.0?1.0e-5:B;D=l|0;h[D>>3]=(+h[403]+x*+h[391]+t*+h[395]+u*+h[399])/C;E=l+8|0;h[E>>3]=z/C;F=l+16|0;h[F>>3]=A/C;G=l+32|0;h[G>>3]=w;H=l+40|0;c[H>>2]=0;if((c[f+4>>2]|0)>-3){I=q+168|0;cM[c[I>>2]&511](3);w=+h[7076];C=(v- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;A=(d- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;z=(w- +h[5279])*+h[2]+ +h[12]+-1.0;u=+h[404]+C*+h[392]+A*+h[396]+z*+h[400];t=+h[405]+C*+h[393]+A*+h[397]+z*+h[401];x=+h[406]+C*+h[394]+A*+h[398]+z*+h[402];B=x==0.0?1.0e-5:x;h[m>>3]=(+h[403]+C*+h[391]+A*+h[395]+z*+h[399])/B;h[m+8>>3]=u/B;h[m+16>>3]=t/B;h[m+32>>3]=w;c[m+40>>2]=0;do{if((a[38984]&1)==0){J=8801}else{if((a[46752]&1)==0){J=8801;break}gt(l,m,f)}}while(0);if((J|0)==8801){un(l,m,f,f+40|0)}cM[c[I>>2]&511](4);K=c[144]|0}else{K=y}do{if((c[64916+(K*688&-1)>>2]&2|0)!=0){y=c[200]|0;if((a[64788+(y*688&-1)|0]&1)!=0){break}w=+h[64664+(y*688&-1)>>3];B=+h[64672+(y*688&-1)>>3];if(w0.0|B<0.0){break}}else{if(B>0.0|w<0.0){break}}B=+h[7076];t=(0.0-w)*+h[91]+ +h[96]+-1.0;w=(d- +h[64664+(K*688&-1)>>3])*+h[21]+ +h[68]+-1.0;u=(B- +h[5279])*+h[2]+ +h[12]+-1.0;z=+h[404]+t*+h[392]+w*+h[396]+u*+h[400];A=+h[405]+t*+h[393]+w*+h[397]+u*+h[401];C=+h[406]+t*+h[394]+w*+h[398]+u*+h[402];x=C==0.0?1.0e-5:C;h[D>>3]=(+h[403]+t*+h[391]+w*+h[395]+u*+h[399])/x;h[E>>3]=z/x;h[F>>3]=A/x;h[G>>3]=B;c[H>>2]=0}}while(0);K=q+28|0;y=m|0;h[y>>3]=+h[D>>3]+s*+h[695]*+((c[K>>2]|0)>>>0>>>0);I=m+8|0;h[I>>3]=+h[E>>3]+s*+h[694]*+((c[K>>2]|0)>>>0>>>0);f=m+16|0;h[f>>3]=+h[F>>3]+s*+h[693]*+((c[K>>2]|0)>>>0>>>0);L=m+32|0;h[L>>3]=+h[G>>3];do{if((a[38984]&1)==0){J=8812}else{if((a[46752]&1)==0){J=8812;break}gt(l,m,56296)}}while(0);if((J|0)==8812){un(l,m,56296,56336)}do{if(p){L12016:do{if((g|0)==0){M=e}else{N=c[144]|0;B=+h[64672+(N*688&-1)>>3]- +h[64664+(N*688&-1)>>3];N=g;while(1){if(+P(+((d- +h[N>>3])/B))<=.001){M=0;break L12016}O=c[N+16>>2]|0;if((O|0)==0){M=e;break}else{N=O}}}}while(0);fx(64984+(b*688&-1)|0,n,o,94352);B=+h[695];N=c[180]|0;x=B*+(N|0);if(x<-.9){Q=0}else{Q=x<.9?1:2}O=c[5094]|0;do{if((O|0)==0){R=Q}else{if((a[65272+(b*688&-1)|0]&1)==0){R=Q;break}R=c[65128+(b*688&-1)>>2]|0}}while(0);x=+h[D>>3]-B*+((c[q+20>>2]|0)>>>0>>>0);h[y>>3]=x;A=+h[694];z=+h[E>>3]-A*+((c[q+16>>2]|0)>>>0>>>0);h[I>>3]=z;if((a[r]&1)==0){u=+h[65056+(b*688&-1)>>3];w=x-u*B*+((c[K>>2]|0)>>>0>>>0);h[y>>3]=w;t=z-u*A*+((c[q+24>>2]|0)>>>0>>>0);h[I>>3]=t;S=w;T=t}else{S=x;T=z}U=64928+(b*688&-1)|0;if((c[U>>2]|0)==0){V=S;W=N;X=T;Y=O}else{fn(U,q);V=+h[y>>3];W=c[180]|0;X=+h[I>>3];Y=c[5094]|0}U=~~(V*+(W|0))+(c[186]|0)|0;Z=~~(X*+(c[40]|0))+(c[46]|0)|0;_=c[65032+(b*688&-1)>>2]|0;if((Y|0)==0|(_|0)==0){J=8829}else{if((cO[c[(c[3524]|0)+72>>2]&255](_)|0)==0){J=8829}else{$=_}}if((J|0)==8829){$=0}ln(U+(c[n>>2]|0)|0,Z+(c[o>>2]|0)|0,M,R,0,$,c[64924+(b*688&-1)>>2]|0);Z=c[(c[3524]|0)+72>>2]|0;cO[Z&255](0);Z=k;c[Z>>2]=c[14084];c[Z+4>>2]=c[56340>>2];c[Z+8>>2]=c[56344>>2];c[Z+12>>2]=c[56348>>2];Z=c[14075]|0;do{if((c[14074]|0)!=0){z=+h[7040];U=c[(c[3524]|0)+92>>2]|0;if(z<0.0){cK[U&63](+h[3817]);break}else{cK[U&63](z);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);O=c[(c[3524]|0)+64>>2]|0;if((Z|0)<-5){cM[O&511](-2)}else{cM[O&511](Z)}O=c[3524]|0;if((a[56328]&1)==0){if((c[O+96>>2]&1024|0)!=0){break}c[k>>2]=1;c[k+4>>2]=Z}fn(k,O)}}while(0);k=c[144]|0;if((c[64916+(k*688&-1)>>2]&4|0)==0){i=j;return}X=+h[7076];V=(v- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;v=(d- +h[64664+(k*688&-1)>>3])*+h[21]+ +h[68]+-1.0;d=(X- +h[5279])*+h[2]+ +h[12]+-1.0;T=+h[404]+V*+h[392]+v*+h[396]+d*+h[400];S=+h[405]+V*+h[393]+v*+h[397]+d*+h[401];B=+h[406]+V*+h[394]+v*+h[398]+d*+h[402];z=B==0.0?1.0e-5:B;B=(+h[403]+V*+h[391]+v*+h[395]+d*+h[399])/z;h[D>>3]=B;d=T/z;h[E>>3]=d;T=S/z;h[F>>3]=T;h[G>>3]=X;c[H>>2]=0;h[y>>3]=B-s*+h[695]*+((c[K>>2]|0)>>>0>>>0);h[I>>3]=d-s*+h[694]*+((c[K>>2]|0)>>>0>>>0);h[f>>3]=T-s*+h[693]*+((c[K>>2]|0)>>>0>>>0);h[L>>3]=X;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(l,m,56296);i=j;return}}while(0);un(l,m,56296,56336);i=j;return}function fJ(b,d,e,f,g){b=b|0;d=+d;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0,_=0,$=0,aa=0,ab=0,ac=0.0,ad=0.0,ae=0.0,af=0.0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0;j=i;i=i+176|0;k=f;f=i;i=i+56|0;uD(f,k,56);k=j|0;l=j+16|0;m=j+64|0;n=j+112|0;o=j+160|0;p=j+168|0;q=(e|0)!=0;if(q){r=65056+(b*688&-1)|0}else{r=65064+(b*688&-1)|0}s=65072+(b*688&-1)|0;t=c[3524]|0;u=~~(+((c[t+28>>2]|0)>>>0>>>0)*+h[r>>3]*((a[s]&1)!=0?1.0:-1.0));if((c[64916+(b*688&-1)>>2]&2|0)==0){v=(+h[14]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;w=(+h[13]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;x=(d- +h[5279])*+h[2]+ +h[12]+-1.0;y=+h[404]+v*+h[392]+w*+h[396]+x*+h[400];z=+h[405]+v*+h[393]+w*+h[397]+x*+h[401];A=+h[406]+v*+h[394]+w*+h[398]+x*+h[402];B=A==0.0?1.0e-5:A;A=(+h[403]+v*+h[391]+w*+h[395]+x*+h[399])/B;h[l>>3]=A;x=y/B;h[l+8>>3]=x;y=z/B;h[l+16>>3]=y;h[l+32>>3]=d;c[l+40>>2]=0;C=A;D=x;E=y}else{y=(0.0- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;x=(0.0- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;A=(d- +h[5279])*+h[2]+ +h[12]+-1.0;B=+h[404]+y*+h[392]+x*+h[396]+A*+h[400];z=+h[405]+y*+h[393]+x*+h[397]+A*+h[401];w=+h[406]+y*+h[394]+x*+h[398]+A*+h[402];v=w==0.0?1.0e-5:w;w=(+h[403]+y*+h[391]+x*+h[395]+A*+h[399])/v;h[l>>3]=w;A=B/v;h[l+8>>3]=A;B=z/v;h[l+16>>3]=B;h[l+32>>3]=d;c[l+40>>2]=0;C=w;D=A;E=B}if((c[f+4>>2]|0)>-3){r=t+168|0;cM[c[r>>2]&511](3);B=+h[64664+((c[200]|0)*688&-1)>>3];A=+h[91];w=+h[96];v=(+h[7089]-B)*A+w+-1.0;z=+h[64664+((c[144]|0)*688&-1)>>3];x=+h[21];y=+h[68];F=(+h[7088]-z)*x+y+-1.0;G=(d- +h[5279])*+h[2]+ +h[12]+-1.0;H=+h[403];I=+h[391];J=+h[395];K=G*+h[399];L=+h[404];M=+h[392];N=+h[396];O=G*+h[400];Q=+h[405];R=+h[393];S=+h[397];T=G*+h[401];U=+h[406];V=+h[394];W=+h[398];X=G*+h[402];G=U+v*V+F*W+X;Y=G==0.0?1.0e-5:G;t=m|0;h[t>>3]=(H+v*I+F*J+K)/Y;Z=m+8|0;h[Z>>3]=(L+v*M+F*N+O)/Y;_=m+16|0;h[_>>3]=(Q+v*R+F*S+T)/Y;$=m+32|0;h[$>>3]=d;c[m+40>>2]=0;Y=(+h[3305]-B)*A+w+-1.0;w=(+h[3304]-z)*x+y+-1.0;y=U+Y*V+w*W+X;X=y==0.0?1.0e-5:y;h[n>>3]=(H+Y*I+w*J+K)/X;h[n+8>>3]=(L+Y*M+w*N+O)/X;h[n+16>>3]=(Q+Y*R+w*S+T)/X;h[n+32>>3]=d;c[n+40>>2]=0;do{if((a[38984]&1)==0){aa=8861}else{if((a[46752]&1)==0){aa=8861;break}gt(l,m,f)}}while(0);if((aa|0)==8861){un(l,m,f,f+40|0)}do{if((a[38984]&1)==0){aa=8865}else{if((a[46752]&1)==0){aa=8865;break}gt(m,n,f)}}while(0);if((aa|0)==8865){un(m,n,f,f+40|0)}cM[c[r>>2]&511](4);r=l|0;f=l+8|0;n=l+16|0;ab=l+32|0;ac=+h[r>>3];ad=+h[f>>3];ae=+h[n>>3];af=+h[ab>>3];ag=r;ah=t;ai=f;aj=Z;ak=n;al=_;am=ab;an=$}else{ac=C;ad=D;ae=E;af=d;ag=l|0;ah=m|0;ai=l+8|0;aj=m+8|0;ak=l+16|0;al=m+16|0;am=l+32|0;an=m+32|0}E=+(u|0);h[ah>>3]=ac+E/+(c[180]|0);h[aj>>3]=ad;h[al>>3]=ae;h[an>>3]=af;do{if((a[38984]&1)==0){aa=8870}else{if((a[46752]&1)==0){aa=8870;break}gt(l,m,56296)}}while(0);if((aa|0)==8870){un(l,m,56296,56336)}do{if(q){L12097:do{if((g|0)==0){ao=e}else{u=c[34]|0;af=+h[64672+(u*688&-1)>>3]- +h[64664+(u*688&-1)>>3];u=g;while(1){if(+P(+((d- +h[u>>3])/af))<=.001){ao=0;break L12097}$=c[u+16>>2]|0;if(($|0)==0){ao=e;break}else{u=$}}}}while(0);fx(64984+(b*688&-1)|0,o,p,73288);u=~~(+h[ai>>3]*+(c[40]|0))+(c[46]|0)|0;$=c[3524]|0;ab=c[$+28>>2]|0;_=(~~(+h[ag>>3]*+(c[180]|0))+(c[186]|0)|0)-(ab<<1)|0;if((a[s]&1)==0){ap=~~(+(_>>>0>>>0)- +(ab>>>0>>>0)*+h[65056+(b*688&-1)>>3])}else{ap=_}_=64928+(b*688&-1)|0;ab=c[_>>2]|0;if((ab|0)==6){h[64936+(b*688&-1)>>3]=d;aa=8880}else if((ab|0)!=0){aa=8880}if((aa|0)==8880){fn(_,$)}ln((c[o>>2]|0)+ap|0,u+(c[p>>2]|0)|0,ao,2,1,0,c[64924+(b*688&-1)>>2]|0);u=k;c[u>>2]=c[14084];c[u+4>>2]=c[56340>>2];c[u+8>>2]=c[56344>>2];c[u+12>>2]=c[56348>>2];u=c[14075]|0;do{if((c[14074]|0)!=0){af=+h[7040];$=c[(c[3524]|0)+92>>2]|0;if(af<0.0){cK[$&63](+h[3817]);break}else{cK[$&63](af);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);$=c[(c[3524]|0)+64>>2]|0;if((u|0)<-5){cM[$&511](-2)}else{cM[$&511](u)}$=c[3524]|0;if((a[56328]&1)==0){if((c[$+96>>2]&1024|0)!=0){break}c[k>>2]=1;c[k+4>>2]=u}fn(k,$)}}while(0);if((c[64916+((c[34]|0)*688&-1)>>2]&4|0)==0){i=j;return}af=(+h[3305]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;ae=(+h[3304]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;ad=(d- +h[5279])*+h[2]+ +h[12]+-1.0;ac=+h[404]+af*+h[392]+ae*+h[396]+ad*+h[400];D=+h[405]+af*+h[393]+ae*+h[397]+ad*+h[401];C=+h[406]+af*+h[394]+ae*+h[398]+ad*+h[402];X=C==0.0?1.0e-5:C;C=(+h[403]+af*+h[391]+ae*+h[395]+ad*+h[399])/X;h[ag>>3]=C;ad=ac/X;h[ai>>3]=ad;ac=D/X;h[ak>>3]=ac;h[am>>3]=d;c[l+40>>2]=0;h[ah>>3]=C-E/+(c[180]|0);h[aj>>3]=ad;h[al>>3]=ac;h[an>>3]=d;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(l,m,56296);i=j;return}}while(0);un(l,m,56296,56336);i=j;return}function fK(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0;f=i;i=i+24|0;g=f|0;j=f+8|0;k=f+16|0;h[g>>3]=+h[a+16>>3];h[j>>3]=+h[a+24>>3];h[k>>3]=+h[a+32>>3];l=(fM(a,e,g,j,k)|0)==0;m=+h[g>>3];if(l){n=(m- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;o=(+h[j>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;p=(+h[k>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;q=+h[406]+n*+h[394]+o*+h[398]+p*+h[402];r=q==0.0?1.0e-5:q;q=(+h[404]+n*+h[392]+o*+h[396]+p*+h[400])/r;h[b>>3]=+(~~((+h[403]+n*+h[391]+o*+h[395]+p*+h[399])/r*+(c[180]|0))+(c[186]|0)|0);s=+(~~(q*+(c[40]|0))+(c[46]|0)|0);h[d>>3]=s;i=f;return}else{h[b>>3]=m;s=+h[j>>3];h[d>>3]=s;i=f;return}}function fL(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,s=0.0,t=0.0;e=i;i=i+48|0;f=e|0;g=e+16|0;j=e+32|0;k=b+64|0;l=c[k>>2]|0;if((l|0)==6|(l|0)==0){if((a[55536]&1)==0){i=e;return}if((a[b+56|0]&1)==0){i=e;return}if((a[b+239|0]&1)!=0){m=+h[d+32>>3];n=+h[8341];do{if(n>2]|0)==0){i=e;return}c[g>>2]=5;h[g+8>>3]=p;c[g+4>>2]=0;cM[c[r>>2]&511](g);i=e;return}p=+h[d+24>>3];g=c[34]|0;r=(a[66852]&1)==0;do{if((a[64788+(g*688&-1)|0]&1)==0){if(r){s=p;break}if(p>0.0){n=+_(+p);s=n/+h[8358];break}else{s=+h[8341];break}}else{if(r){s=+Z(+(p*+h[64800+(g*688&-1)>>3]));break}if(+h[64792+(g*688&-1)>>3]==+h[8357]){s=p;break}s=p*+h[64800+(g*688&-1)>>3]/+h[8358]}}while(0);p=+h[8341];do{if(p>2]|0)==0){i=e;return}c[f>>2]=5;h[f+8>>3]=t;c[f+4>>2]=0;cM[c[g>>2]&511](f);i=e;return}else if((l|0)==3){if((a[b+239|0]&1)==0){i=e;return}f=(c[3524]|0)+144|0;if((c[f>>2]|0)==0){i=e;return}g=~~+h[d+32>>3];c[j>>2]=3;c[j+4>>2]=g;h[j+8>>3]=0.0;cM[c[f>>2]&511](j);i=e;return}else if((l|0)==2){c[b+68>>2]=~~+h[d+32>>3];fn(k,c[3524]|0);i=e;return}else{i=e;return}}function fM(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,w=0,x=0.0,y=0,z=0,A=0,B=0.0;j=i;k=c[b>>2]|0;if((k|0)==4){h[e>>3]=+h[e>>3]*+((c[(c[3524]|0)+20>>2]|0)>>>0>>>0)+.5;l=0;m=1;n=0}else if((k|0)==2){o=c[200]|0;p=+h[64664+(o*688&-1)>>3];h[e>>3]=p+ +h[e>>3]*(+h[64672+(o*688&-1)>>3]-p);l=1;m=0;n=0}else if((k|0)==3){h[e>>3]=+h[e>>3]*+(((c[(c[3524]|0)+8>>2]|0)-1|0)>>>0>>>0)+.5;l=0;m=0;n=1}else if((k|0)==0|(k|0)==1){p=+h[e>>3];do{if((a[66164]&1)==0){q=p}else{if(p>0.0){r=+_(+p);q=r/+h[8272];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=d,c[v+8>>2]=56880,h[v+16>>3]=p,v)|0);return 0}}}while(0);h[e>>3]=q;l=1;m=0;n=0}else{l=0;m=0;n=0}e=c[b+4>>2]|0;if((e|0)==2){k=c[144]|0;if((c[5094]|0)==0){q=+h[64664+(k*688&-1)>>3];s=q+ +h[f>>3]*(+h[64672+(k*688&-1)>>3]-q)}else{q=+h[64672+(k*688&-1)>>3];s=q- +h[f>>3]*(q- +h[64664+(k*688&-1)>>3])}h[f>>3]=s;t=1;u=m;w=n}else if((e|0)==4){h[f>>3]=+h[f>>3]*+((c[(c[3524]|0)+16>>2]|0)>>>0>>>0)+.5;t=l;u=1;w=n}else if((e|0)==0|(e|0)==1){s=+h[f>>3];do{if((a[65476]&1)==0){x=s}else{if(s>0.0){q=+_(+s);x=q/+h[8186];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=d,c[v+8>>2]=56856,h[v+16>>3]=s,v)|0);return 0}}}while(0);h[f>>3]=x;t=1;u=m;w=n}else if((e|0)==3){h[f>>3]=+h[f>>3]*+(((c[(c[3524]|0)+12>>2]|0)-1|0)>>>0>>>0)+.5;t=l;u=m;w=1}else{t=l;u=m;w=n}n=c[b+8>>2]|0;if((n|0)==2){b=c[34]|0;x=+h[64664+(b*688&-1)>>3];h[g>>3]=x+ +h[g>>3]*(+h[64672+(b*688&-1)>>3]-x);y=1;z=u;A=w}else if((n|0)==4){y=t;z=1;A=w}else if((n|0)==0|(n|0)==1){x=+h[g>>3];do{if((a[64788]&1)==0){B=x}else{if(x>0.0){s=+_(+x);B=s/+h[8100];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=d,c[v+8>>2]=56832,h[v+16>>3]=x,v)|0);return 0}}}while(0);h[g>>3]=B;y=1;z=u;A=w}else if((n|0)==3){y=t;z=u;A=1}else{y=t;z=u;A=w}w=A|z;if(y&w){uk(218688,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{i=j;return w&1|0}return 0}function fN(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0;g=i;j=c[b>>2]|0;if((j|0)==2){h[d>>3]=+h[b+16>>3]*+((c[7939]|0)-(c[7938]|0)|0)}else if((j|0)==3){h[d>>3]=+h[b+16>>3]*+(((c[(c[3524]|0)+8>>2]|0)-1|0)>>>0>>>0)}else if((j|0)==4){h[d>>3]=+h[b+16>>3]*+((c[(c[3524]|0)+20>>2]|0)>>>0>>>0)}else if((j|0)==0){k=+h[b+16>>3];do{if((a[66164]&1)==0){l=k}else{if(k>0.0){m=+_(+k);l=m/+h[8272];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=f,c[v+8>>2]=56880,h[v+16>>3]=k,v)|0)}}}while(0);h[d>>3]=l*+h[8269]}else if((j|0)==1){l=+h[b+16>>3];do{if((a[68916]&1)==0){n=l}else{if(l>0.0){k=+_(+l);n=k/+h[8616];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=f,c[v+8>>2]=56976,h[v+16>>3]=l,v)|0)}}}while(0);h[d>>3]=n*+h[8613]}d=c[b+4>>2]|0;if((d|0)==4){h[e>>3]=+h[b+24>>3]*+((c[(c[3524]|0)+16>>2]|0)>>>0>>>0);i=g;return}else if((d|0)==1){n=+h[b+24>>3];do{if((a[68228]&1)==0){o=n}else{if(n>0.0){l=+_(+n);o=l/+h[8530];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=f,c[v+8>>2]=56952,h[v+16>>3]=n,v)|0)}}}while(0);h[e>>3]=o*+h[8527];i=g;return}else if((d|0)==0){o=+h[b+24>>3];do{if((a[65476]&1)==0){p=o}else{if(o>0.0){n=+_(+o);p=n/+h[8186];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=f,c[v+8>>2]=56856,h[v+16>>3]=o,v)|0)}}}while(0);h[e>>3]=p*+h[8183];i=g;return}else if((d|0)==2){h[e>>3]=+h[b+24>>3]*+((c[7941]|0)-(c[7940]|0)|0);i=g;return}else if((d|0)==3){h[e>>3]=+h[b+24>>3]*+(((c[(c[3524]|0)+12>>2]|0)-1|0)>>>0>>>0);i=g;return}else{i=g;return}}function fO(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0.0,X=0.0,Y=0,Z=0,_=0,$=0.0,aa=0.0,ab=0,ac=0,ad=0,ae=0,af=0.0,ag=0.0,ah=0.0,ai=0.0,aj=0,ak=0,al=0.0,am=0.0,an=0.0,ao=0.0,ap=0,aq=0.0,ar=0.0,as=0.0,at=0.0,au=0,av=0.0,aw=0.0,ax=0.0,ay=0.0,az=0.0,aA=0.0,aB=0.0,aC=0.0,aD=0.0,aE=0.0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0.0,aO=0.0,aP=0,aQ=0.0,aR=0;f=i;i=i+224|0;g=f|0;j=f+16|0;k=f+32|0;l=f+48|0;m=f+64|0;n=f+72|0;o=f+80|0;p=f+88|0;q=f+96|0;r=f+120|0;s=f+128|0;t=f+136|0;u=f+144|0;v=f+152|0;w=f+160|0;x=f+168|0;y=f+192|0;z=f+200|0;A=f+208|0;B=f+216|0;if((b|0)==0){i=f;return}C=x|0;D=(e|0)==2;E=k;F=x+7|0;x=k|0;G=k+4|0;H=j;I=j|0;J=j+4|0;K=g;L=g|0;M=g+4|0;N=q|0;O=l;P=q+7|0;q=l|0;Q=l+4|0;R=b;do{L12294:do{if((c[R+8>>2]|0)==(d|0)){b=R+52|0;S=c[b>>2]|0;do{if((S|0)==-7){if((c[R+12>>2]|0)!=1){T=9026;break}U=c[12302]|0;V=c[12303]|0;W=+h[6153];X=+h[6154];Y=a[49240]|0;uD(C|0,49241,23);Z=U;_=V;$=W;aa=X;ab=Y}else{T=9026}}while(0);if((T|0)==9026){T=0;Y=c[R+48>>2]|0;X=+h[R+64>>3];W=+h[R+72>>3];V=a[R+80|0]|0;uD(C|0,R+81|0,23);Z=Y;_=S;$=X;aa=W;ab=V}V=R+16|0;Y=V|0;if((c[Y>>2]|0)==3){if((c[R+12>>2]|0)==1){ac=49176}else{T=9029}}else{T=9029}if((T|0)==9029){T=0;ac=V}U=c[ac>>2]|0;if((U|0)==1|(U|0)==4){ad=(c[ac+4>>2]<<4&65520)+U|0}else if((U|0)==2|(U|0)==5){ad=(c[ac+8>>2]<<4&65520)+U|0}else{ad=0}U=c[R+12>>2]|0;if((U|0)==1){do{if((c[R+104>>2]|0)==1){ae=R+112|0;do{if(D){T=9089}else{if((c[ae>>2]|0)==3){T=9089;break}if((c[5094]|0)==0){break L12294}fK(ae,m,n,173728);fx(R+152|0,t,u,173728);W=+(c[t>>2]|0);h[r>>3]=W;X=+(c[u>>2]|0);h[s>>3]=X;af=W;ag=X}}while(0);if((T|0)==9089){T=0;fR(ae,m,n,173728);fN(R+152|0,r,s,173728);af=+h[r>>3];ag=+h[s>>3]}X=+h[m>>3]-af*.5;h[m>>3]=X;W=+h[n>>3]-ag*.5;h[n>>3]=W;ah=af+X;h[o>>3]=ah;ai=ag+W;h[p>>3]=ai;aj=(c[R+156>>2]|0)>>>0<2;ak=(c[R+152>>2]|0)>>>0<2;al=ah;am=X;an=ai;ao=W}else{ap=R+192|0;do{if(D){T=9096}else{if((c[ap>>2]|0)==3){if((c[R+232>>2]|0)==3){T=9096;break}}if((c[5094]|0)==0){break L12294}fK(ap,m,n,173728);fK(R+232|0,o,p,173728)}}while(0);if((T|0)==9096){T=0;fR(ap,m,n,173728);fR(R+232|0,o,p,173728)}W=+h[m>>3];ai=+h[o>>3];if(W>ai){h[m>>3]=ai;h[o>>3]=W;aq=W;ar=ai}else{aq=ai;ar=W}W=+h[n>>3];ai=+h[p>>3];if(W>ai){h[n>>3]=ai;h[p>>3]=W;as=W;at=ai}else{as=ai;at=W}if((c[R+192>>2]|0)==3){au=0}else{au=(c[R+232>>2]|0)!=3}if((c[R+196>>2]|0)==3){aj=0;ak=au;al=aq;am=ar;an=as;ao=at;break}aj=(c[R+236>>2]|0)!=3;ak=au;al=aq;am=ar;an=as;ao=at}}while(0);S=c[13542]|0;if((S|0)==0){av=al;aw=am;ax=an;ay=ao}else{do{if(ak){W=+(c[S>>2]|0);if(am>3]=W;az=W}else{az=am}W=+(c[S+4>>2]|0);if(al<=W){aA=az;aB=al;break}h[o>>3]=W;aA=az;aB=W}else{aA=am;aB=al}}while(0);do{if(aj){W=+(c[S+8>>2]|0);if(ao>3]=W;aC=W}else{aC=ao}W=+(c[S+12>>2]|0);if(an<=W){aD=aC;aE=an;break}h[p>>3]=W;aD=aC;aE=W}else{aD=ao;aE=an}}while(0);if(aA>aB|aD>aE){break}else{av=aB;aw=aA;ax=aE;ay=aD}}S=~~(av-aw);ae=~~(ax-ay);aF=~~aw;aG=~~ay;if((S|0)==0|(ae|0)==0){break}aH=c[b>>2]|0;if((aH|0)==-7){aI=c[12302]|0;aJ=c[12303]|0;W=+h[6153];ai=+h[6154];aK=a[49240]|0;uD(N|0,49241,23);aL=aI;aM=aJ;aN=W;aO=ai;aP=aK}else{aK=c[R+48>>2]|0;ai=+h[R+64>>3];W=+h[R+72>>3];aJ=a[R+80|0]|0;uD(N|0,R+81|0,23);aL=aK;aM=aH;aN=ai;aO=W;aP=aJ}if(aN>0.0){aQ=+h[R+64>>3]}else{aQ=aN}aJ=(c[Y>>2]|0)==3?49176:V;uD(O|0,P|0,16);do{if((aL|0)!=0){aH=c[(c[3524]|0)+92>>2]|0;if(aO<0.0){cK[aH&63](+h[3817]);break}else{cK[aH&63](aO);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](aQ);V=c[(c[3524]|0)+64>>2]|0;if((aM|0)<-5){cM[V&511](-2)}else{cM[V&511](aM)}V=c[3524]|0;do{if((aP&1)==0){if((c[V+96>>2]&1024|0)!=0){break}c[q>>2]=1;c[Q>>2]=aM;T=9135}else{T=9135}}while(0);if((T|0)==9135){T=0;fn(l,V)}Y=c[aJ>>2]|0;if((Y|0)==1|(Y|0)==4){aR=aJ+4|0;T=9139}else if((Y|0)==2|(Y|0)==5){aR=aJ+8|0;T=9139}do{if((T|0)==9139){T=0;b=(c[aR>>2]<<4&65520)+Y|0;if((b|0)==0){break}aH=c[(c[3524]|0)+108>>2]|0;if((aH|0)==0){break}cI[aH&63](b,aF,aG,S,ae)}}while(0);if(!(hG(aJ)|0)){break}cN[c[(c[3524]|0)+56>>2]&255](aF,aG);Y=ae+aG|0;cN[c[(c[3524]|0)+60>>2]&255](aF,Y);V=S+aF|0;cN[c[(c[3524]|0)+60>>2]&255](V,Y);cN[c[(c[3524]|0)+60>>2]&255](V,aG);cN[c[(c[3524]|0)+60>>2]&255](aF,aG);break}else if((U|0)==2){V=c[13542]|0;Y=R+112|0;do{if(D){T=9036}else{if((c[Y>>2]|0)==3){T=9036;break}if((c[5094]|0)==0){break L12294}fK(Y,v,w,173728);fx(R+152|0,A,B,173728);h[y>>3]=+(c[A>>2]|0)}}while(0);if((T|0)==9036){T=0;fR(Y,v,w,173728);fN(R+152|0,y,z,173728)}uD(E|0,F|0,16);do{if((Z|0)!=0){aG=c[(c[3524]|0)+92>>2]|0;if(aa<0.0){cK[aG&63](+h[3817]);break}else{cK[aG&63](aa);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63]($);Y=c[(c[3524]|0)+64>>2]|0;if((_|0)<-5){cM[Y&511](-2)}else{cM[Y&511](_)}Y=c[3524]|0;do{if((ab&1)==0){if((c[Y+96>>2]&1024|0)!=0){break}c[x>>2]=1;c[G>>2]=_;T=9049}else{T=9049}}while(0);if((T|0)==9049){T=0;fn(k,Y)}do{if((c[R+112>>2]|0)==3){if((c[R+116>>2]|0)!=3){break}c[13542]=55520}}while(0);Y=R+192|0;aG=R+200|0;lq(~~+h[v>>3],~~+h[w>>3],+h[y>>3],+h[Y>>3],+h[aG>>3],ad);if(hG(ac)|0){lq(~~+h[v>>3],~~+h[w>>3],+h[y>>3],+h[Y>>3],+h[aG>>3],0)}c[13542]=V;break}else if((U|0)==3){uD(H|0,F|0,16);do{if((Z|0)!=0){aG=c[(c[3524]|0)+92>>2]|0;if(aa<0.0){cK[aG&63](+h[3817]);break}else{cK[aG&63](aa);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63]($);V=c[(c[3524]|0)+64>>2]|0;if((_|0)<-5){cM[V&511](-2)}else{cM[V&511](_)}V=c[3524]|0;do{if((ab&1)==0){if((c[V+96>>2]&1024|0)!=0){break}c[I>>2]=1;c[J>>2]=_;T=9066}else{T=9066}}while(0);if((T|0)==9066){T=0;fn(j,V)}if(D){fP(2,R+104|0,ad,1)}else{if((c[5094]|0)==0){break}fP(3,R+104|0,ad,1)}if(!(hG(ac)|0)){break}fP(e,R+104|0,0,1);break}else if((U|0)==4){uD(K|0,F|0,16);do{if((Z|0)!=0){aG=c[(c[3524]|0)+92>>2]|0;if(aa<0.0){cK[aG&63](+h[3817]);break}else{cK[aG&63](aa);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63]($);U=c[(c[3524]|0)+64>>2]|0;if((_|0)<-5){cM[U&511](-2)}else{cM[U&511](_)}U=c[3524]|0;do{if((ab&1)==0){if((c[U+96>>2]&1024|0)!=0){break}c[L>>2]=1;c[M>>2]=_;T=9083}else{T=9083}}while(0);if((T|0)==9083){T=0;fn(g,U)}V=R+104|0;fQ(e,V,ad);if(!(hG(ac)|0)){break}fQ(e,V,0);break}else{break}}}while(0);R=c[R>>2]|0;}while((R|0)!=0);i=f;return}function fP(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0,H=0,I=0.0,J=0.0,K=0;f=i;i=i+1568|0;g=f|0;j=f+8|0;k=f+16|0;l=f+24|0;m=f+32|0;n=f+1472|0;o=f+1480|0;p=f+1488|0;q=f+1496|0;r=f+1504|0;s=f+1512|0;t=f+1520|0;u=f+1528|0;v=+h[b+88>>3]*.017453292519943295;w=+S(+v);x=+T(+v);v=+h[b+64>>3]*.5;y=+h[b+72>>3]*.5;z=u;A=b+48|0;c[z>>2]=c[A>>2];c[z+4>>2]=c[A+4>>2];c[z+8>>2]=c[A+8>>2];c[z+12>>2]=c[A+12>>2];c[z+16>>2]=c[A+16>>2];c[z+20>>2]=c[A+20>>2];c[z+24>>2]=c[A+24>>2];c[z+28>>2]=c[A+28>>2];c[z+32>>2]=c[A+32>>2];c[z+36>>2]=c[A+36>>2];A=c[3524]|0;B=+((c[A+24>>2]|0)>>>0>>>0)/+((c[A+28>>2]|0)>>>0>>>0);do{if(e){A=b+8|0;if((a|0)==2){fR(A,n,o,73152);break}else{fK(A,n,o,73152);break}}else{h[n>>3]=+h[b+24>>3];h[o>>3]=+h[b+32>>3]}}while(0);c[m+8>>2]=d;C=w*v;D=x*y;A=u+16|0;E=x*v;v=w*y;z=u+24|0;F=(a|0)==2;a=b|0;b=n;G=o;y=0.0;H=0;while(1){w=+S(+y);x=+T(+y);I=C*w-D*x;h[A>>3]=I;J=E*w+v*x;h[z>>3]=J;do{if(e){K=c[a>>2]|0;if(F){if((K|0)==2){fN(u,r,q,73152);h[z>>3]=+h[A>>3];fN(u,r,p,73152);break}else if((K|0)==0){fN(u,p,q,73152);break}else if((K|0)==1){fN(u,p,r,73152);h[A>>3]=+h[z>>3];fN(u,q,r,73152);break}else{break}}else{if((K|0)==2){fx(u,s,t,73152);h[q>>3]=+(c[t>>2]|0);h[z>>3]=+h[A>>3];fx(u,t,s,73152);h[p>>3]=+(c[s>>2]|0);break}else if((K|0)==0){fx(u,s,t,73152);h[p>>3]=+(c[s>>2]|0);h[q>>3]=+(c[t>>2]|0);break}else if((K|0)==1){fx(u,s,t,73152);h[p>>3]=+(c[s>>2]|0);h[A>>3]=+h[z>>3];fx(u,t,s,73152);h[q>>3]=+(c[t>>2]|0);break}else{break}}}else{h[p>>3]=I;h[q>>3]=J}}while(0);K=m+(H*12&-1)|0;c[K>>2]=~~(+h[n>>3]+ +h[p>>3]);J=+h[o>>3];I=+h[q>>3];if(e){c[m+(H*12&-1)+4>>2]=~~(J+I)}else{c[m+(H*12&-1)+4>>2]=~~(J+B*I)}fl(b,G,K,m+(H*12&-1)+4|0);K=H+1|0;if((K|0)<73){y=y+.08726646259971647;H=K}else{break}}H=m|0;if((d|0)!=0){d=c[(c[3524]|0)+148>>2]|0;if((d|0)==0){i=f;return}cN[d&255](72,H);i=f;return}H=0;while(1){d=c[m+(H*12&-1)+4>>2]|0;G=H+1|0;b=c[m+(G*12&-1)>>2]|0;e=c[m+(G*12&-1)+4>>2]|0;c[g>>2]=c[m+(H*12&-1)>>2];c[j>>2]=d;c[k>>2]=b;c[l>>2]=e;e=c[3524]|0;if((fl(g,j,k,l)|0)!=0){cN[c[e+56>>2]&255](c[g>>2]|0,c[j>>2]|0);cN[c[e+60>>2]&255](c[k>>2]|0,c[l>>2]|0)}if((G|0)<72){H=G}else{break}}i=f;return}function fQ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;e=i;i=i+112|0;f=e|0;g=e+8|0;j=e+16|0;k=e+24|0;l=e+32|0;m=e+40|0;n=e+48|0;o=e+56|0;p=e+64|0;q=e+72|0;r=e+80|0;s=e+88|0;t=e+96|0;u=c[13542]|0;v=b+4|0;if((c[v>>2]|0)==0){i=e;return}w=b|0;b=c[w>>2]|0;if((b|0)<2){i=e;return}c[11720]=db(c[11720]|0,b*12&-1,218624)|0;c[11722]=db(c[11722]|0,(c[w>>2]|0)*24&-1,218624)|0;do{if((c[w>>2]|0)>0){b=(a|0)==3;x=0;y=0;z=c[v>>2]|0;while(1){A=z+(y*40&-1)|0;B=c[11720]|0;C=B+(y*12&-1)|0;D=B+(y*12&-1)+4|0;if(b){fK(A,r,s,213112);c[C>>2]=~~+h[r>>3];c[D>>2]=~~+h[s>>3]}else{fR(A,p,q,213112);c[C>>2]=~~+h[p>>3];c[D>>2]=~~+h[q>>3]}D=c[v>>2]|0;C=c[D+(y*40&-1)>>2]|0;if((C|0)==3){E=9189}else{if((c[D+(y*40&-1)+4>>2]|0)==3){E=9189}else{F=x}}if((E|0)==9189){E=0;F=1}if((C|0)==2){E=9192}else{if((c[D+(y*40&-1)+4>>2]|0)==2){E=9192}else{G=F}}if((E|0)==9192){E=0;G=1}C=y+1|0;if((C|0)<(c[w>>2]|0)){x=G;y=C;z=D}else{break}}if(!G){H=y;break}c[13542]=55520;H=y}else{H=-1}}while(0);G=c[3524]|0;do{if((c[G+148>>2]|0)==0|(d|0)==0){w=c[G+172>>2]|0;if((w|0)!=0){cM[w&511](0)}w=c[11720]|0;F=c[w>>2]|0;do{if((H|0)>0){v=0;q=w;p=F;do{s=c[q+(v*12&-1)+4>>2]|0;v=v+1|0;r=c[q+(v*12&-1)>>2]|0;a=c[q+(v*12&-1)+4>>2]|0;c[l>>2]=p;c[m>>2]=s;c[n>>2]=r;c[o>>2]=a;a=c[3524]|0;if((fl(l,m,n,o)|0)!=0){cN[c[a+56>>2]&255](c[l>>2]|0,c[m>>2]|0);cN[c[a+60>>2]&255](c[n>>2]|0,c[o>>2]|0)}q=c[11720]|0;p=c[q+(v*12&-1)>>2]|0}while((v|0)<(H|0));v=c[q>>2]|0;if((p|0)==(v|0)){I=v;J=q;K=H;E=9216;break}L=c[q+(H*12&-1)+4>>2]|0;M=c[q+4>>2]|0;N=q;O=v;P=H;E=9217}else{I=F;J=w;K=0;E=9216}}while(0);if((E|0)==9216){w=c[J+(K*12&-1)+4>>2]|0;F=c[J+4>>2]|0;if((w|0)!=(F|0)){L=w;M=F;N=J;O=I;P=K;E=9217}}do{if((E|0)==9217){c[f>>2]=c[N+(P*12&-1)>>2];c[g>>2]=L;c[j>>2]=O;c[k>>2]=M;F=c[3524]|0;if((fl(f,g,j,k)|0)==0){break}cN[c[F+56>>2]&255](c[f>>2]|0,c[g>>2]|0);cN[c[F+60>>2]&255](c[j>>2]|0,c[k>>2]|0)}}while(0);F=c[(c[3524]|0)+172>>2]|0;if((F|0)==0){break}cM[F&511](1)}else{F=t;w=1;y=0;v=0;L12560:while(1){Q=w;R=v;while(1){if((R|0)>=(H|0)){break L12560}a=c[11720]|0;r=(c[11722]|0)+(y*12&-1)|0;s=a+(R*12&-1)|0;c[r>>2]=c[s>>2];c[r+4>>2]=c[s+4>>2];c[r+8>>2]=c[s+8>>2];S=R+1|0;s=a+(S*12&-1)|0;c[F>>2]=c[s>>2];c[F+4>>2]=c[s+4>>2];c[F+8>>2]=c[s+8>>2];T=fl(a+(R*12&-1)|0,a+(R*12&-1)+4|0,a+(S*12&-1)|0,a+(S*12&-1)+4|0)|0;if((T|0)==0){Q=0;R=S}else{break}}q=((T|0)>0&1)+y|0;if((T|0)>=0){w=T;y=q;v=S;continue}p=c[11722]|0;a=c[11720]|0;s=p+(q*12&-1)|0;r=a+(R*12&-1)|0;c[s>>2]=c[r>>2];c[s+4>>2]=c[r+4>>2];c[s+8>>2]=c[r+8>>2];r=p+((q+1|0)*12&-1)|0;p=a+(S*12&-1)|0;c[r>>2]=c[p>>2];c[r+4>>2]=c[p+4>>2];c[r+8>>2]=c[p+8>>2];c[p>>2]=c[F>>2];c[p+4>>2]=c[F+4>>2];c[p+8>>2]=c[F+8>>2];w=T;y=q+2|0;v=S}if((Q|0)==1){v=c[11722]|0;w=v+(y*12&-1)|0;F=(c[11720]|0)+(R*12&-1)|0;c[w>>2]=c[F>>2];c[w+4>>2]=c[F+4>>2];c[w+8>>2]=c[F+8>>2];U=y+1|0;V=v}else{U=y;V=c[11722]|0}c[V+8>>2]=d;cN[c[(c[3524]|0)+148>>2]&255](U,c[11722]|0)}}while(0);c[13542]=u;i=e;return}function fR(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0;g=i;j=c[b>>2]|0;if((j|0)==4){h[d>>3]=+h[b+16>>3]*+((c[(c[3524]|0)+20>>2]|0)>>>0>>>0)}else if((j|0)==2){k=c[7938]|0;h[d>>3]=+(k|0)+ +h[b+16>>3]*+((c[7939]|0)-k|0)}else if((j|0)==1){l=+h[b+16>>3];do{if((a[68916]&1)==0){m=l}else{if(l>0.0){n=+_(+l);m=n/+h[8616];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=f,c[v+8>>2]=56976,h[v+16>>3]=l,v)|0)}}}while(0);h[d>>3]=+(~~(+(c[17224]|0)+(m- +h[8599])*+h[8613]+.5)|0)}else if((j|0)==3){h[d>>3]=+h[b+16>>3]*+(((c[(c[3524]|0)+8>>2]|0)-1|0)>>>0>>>0)}else if((j|0)==0){m=+h[b+16>>3];do{if((a[66164]&1)==0){o=m}else{if(m>0.0){l=+_(+m);o=l/+h[8272];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=f,c[v+8>>2]=56880,h[v+16>>3]=m,v)|0)}}}while(0);h[d>>3]=+(~~(+(c[16536]|0)+(o- +h[8255])*+h[8269]+.5)|0)}j=c[b+4>>2]|0;if((j|0)==2){k=c[7940]|0;h[e>>3]=+(k|0)+ +h[b+24>>3]*+((c[7941]|0)-k|0)}else if((j|0)==3){h[e>>3]=+h[b+24>>3]*+(((c[(c[3524]|0)+12>>2]|0)-1|0)>>>0>>>0)}else if((j|0)==1){o=+h[b+24>>3];do{if((a[68228]&1)==0){p=o}else{if(o>0.0){m=+_(+o);p=m/+h[8530];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=f,c[v+8>>2]=56952,h[v+16>>3]=o,v)|0)}}}while(0);h[e>>3]=+(~~(+(c[17052]|0)+(p- +h[8513])*+h[8527]+.5)|0)}else if((j|0)==0){p=+h[b+24>>3];do{if((a[65476]&1)==0){q=p}else{if(p>0.0){o=+_(+p);q=o/+h[8186];break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=f,c[v+8>>2]=56856,h[v+16>>3]=p,v)|0)}}}while(0);h[e>>3]=+(~~(+(c[16364]|0)+(q- +h[8169])*+h[8183]+.5)|0)}else if((j|0)==4){h[e>>3]=+h[b+24>>3]*+((c[(c[3524]|0)+16>>2]|0)>>>0>>>0)}h[d>>3]=+h[d>>3]+.5;h[e>>3]=+h[e>>3]+.5;i=g;return}function fS(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0,R=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0.0,a6=0.0,a7=0.0,a8=0.0,a9=0.0,ba=0.0,bb=0.0,bc=0.0,bd=0.0,be=0.0,bf=0.0,bg=0.0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bx=0,by=0,bz=0,bA=0,bB=0,bC=0,bD=0.0,bE=0.0,bF=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bL=0,bN=0,bO=0,bP=0,bQ=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0,b3=0,b4=0,b5=0,b6=0,b7=0,b8=0,b9=0,ca=0,cb=0,cc=0,cd=0,ce=0,cf=0,cg=0,ch=0,ci=0,cj=0,ck=0,cl=0,cm=0,cn=0,co=0,cp=0,cq=0,cr=0,cs=0.0,ct=0.0,cu=0,cv=0,cw=0,cx=0,cz=0,cA=0.0,cB=0,cC=0.0,cD=0,cE=0,cF=0.0,cH=0.0,cJ=0.0,cL=0,cP=0,cQ=0,cT=0,cU=0,cV=0,cW=0,cX=0,cY=0,cZ=0,c_=0,c$=0,c0=0,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9=0,da=0,df=0,dh=0,di=0,dj=0,dl=0,dm=0,dn=0,dp=0,dq=0,dr=0.0,ds=0.0,dt=0.0,du=0.0,dv=0.0,dw=0.0,dx=0.0,dy=0.0,dA=0,dB=0,dC=0,dE=0,dF=0,dG=0,dH=0,dI=0,dJ=0.0,dK=0.0,dL=0,dM=0,dN=0,dO=0,dP=0,dQ=0,dR=0,dS=0,dT=0,dU=0,dV=0.0,dW=0.0,dX=0.0,dY=0.0,dZ=0.0,d_=0,d$=0,d0=0,d1=0.0,d2=0.0,d3=0,d4=0,d5=0.0,d6=0.0,d7=0.0,d8=0.0,d9=0.0,ea=0,eb=0,ec=0,ed=0,ee=0,ef=0.0,eg=0.0,eh=0,ei=0.0,ej=0,ek=0,el=0.0,em=0,en=0,eo=0,ep=0,eq=0,er=0,es=0.0,et=0,eu=0,ev=0.0,ew=0.0,ex=0,ey=0,ez=0.0,eA=0.0,eB=0.0,eC=0,eD=0,eE=0,eF=0.0,eG=0,eH=0,eI=0,eJ=0,eK=0.0,eL=0.0,eM=0.0,eN=0,eO=0.0,eP=0.0,eQ=0.0,eR=0.0,eS=0.0,eT=0,eU=0.0,eV=0.0,eW=0,eX=0,eY=0.0,eZ=0.0,e_=0,e$=0,e0=0,e1=0,e2=0,e3=0,e4=0,e5=0,e6=0,e7=0,e8=0,e9=0,fa=0,fb=0.0,fc=0,fd=0,fe=0,ff=0,fg=0,fh=0.0,fi=0.0,fj=0;e=i;i=i+1424|0;f=e|0;j=e+8|0;k=e+16|0;l=e+24|0;m=e+32|0;n=e+40|0;o=e+48|0;p=e+56|0;q=e+64|0;r=e+80|0;s=e+352|0;t=e+368|0;u=e+384|0;w=e+392|0;x=e+400|0;y=e+416|0;z=e+424|0;A=e+432|0;B=e+496|0;C=e+504|0;D=e+512|0;E=e+552|0;F=e+568|0;G=e+576|0;H=e+584|0;I=e+624|0;J=e+640|0;K=e+768|0;L=e+776|0;M=e+784|0;N=e+808|0;O=e+816|0;Q=e+824|0;R=e+840|0;U=e+856|0;V=e+864|0;W=e+880|0;X=e+888|0;Y=e+896|0;Z=e+904|0;$=e+912|0;ab=e+920|0;ac=e+928|0;ad=e+936|0;ae=e+944|0;af=e+952|0;ag=e+960|0;ah=e+968|0;ai=e+976|0;aj=e+984|0;ak=e+992|0;al=e+1008|0;am=e+1016|0;an=e+1024|0;ao=e+1032|0;ap=e+1040|0;aq=e+1048|0;ar=e+1056|0;as=e+1064|0;at=e+1072|0;au=e+1080|0;av=e+1088|0;aw=e+1096|0;ax=e+1104|0;ay=e+1112|0;az=e+1120|0;aA=e+1128|0;aB=e+1136|0;aC=e+1144|0;aD=e+1152|0;aE=e+1160|0;aF=e+1168|0;aG=e+1176|0;aH=e+1184|0;aI=e+1192|0;aJ=e+1200|0;aK=e+1208|0;aL=e+1216|0;aM=e+1224|0;aO=e+1232|0;aP=e+1240|0;aQ=e+1248|0;aR=e+1256|0;aS=e+1264|0;aT=e+1272|0;aU=e+1280|0;aV=e+1288|0;aW=e+1296|0;aX=e+1304|0;aY=e+1312|0;aZ=e+1320|0;a_=e+1328|0;a$=e+1336|0;a0=e+1344|0;a1=e+1352|0;a2=e+1360|0;a3=e+1368|0;a4=c[3524]|0;c[aS>>2]=0;c[aT>>2]=0;c[200]=2;c[144]=1;if((c[14091]|0)==2){a5=+P(+(+h[8170]- +h[8169]));a6=a5*+h[7048]}else{a6=+h[7048]}if((c[1057]|0)==2){a5=+P(+(+h[8170]- +h[8169]));a7=a5*+h[531]}else{a7=+h[531]}if((c[8764]|0)==2){a5=+P(+(+h[8256]- +h[8255]));a8=a5*+h[4384]}else{a8=+h[4384]}if((c[6588]|0)==2){a5=+P(+(+h[8256]- +h[8255]));a9=a5*+h[3296]}else{a9=+h[3296]}a5=+h[8169];ba=+h[8170];if(a5>3<<3,c[v>>2]=0,v)|0)}if(bd==be){uf(-1,124848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}lk();if((a[14080]&1)==0){lk()}do{if(a[14088]|0){if((a[33512]&1)==0){break}if(!(a[13032]|0)){break}bh=c[(c[3524]|0)+104>>2]|0;if((bh|0)!=0){cS[bh&511]()}a[13032]=0}else{cS[c[(c[3524]|0)+52>>2]&511]();a[14088]=1}}while(0);cM[c[(c[3524]|0)+168>>2]&511](0);bh=c[3524]|0;if((c[bh+96>>2]&16|0)!=0){c[7271]=-1}c[13880]=0;c[13881]=(c[bh+8>>2]|0)-1;c[13882]=0;c[13883]=(c[bh+12>>2]|0)-1;i6(0,1);c[ap>>2]=0;c[aq>>2]=0;c[ar>>2]=0;bh=c[3524]|0;bi=bh+72|0;bj=(cO[c[bi>>2]&255](-270)|0)!=0;bk=bj?c[1164]|0:0;bl=c[16602]|0;bm=c[17290]|0;bn=bj?c[16430]|0:0;bo=bj?c[17118]|0:0;a[35184]=a[36120]&1;c[1098]=0;c[206]=0;c[188]=0;c[148]=0;c[48]=0;c[174]=0;bp=c[1119]|0;if((bp|0)!=0){ga(bp,4392)}bp=c[16629]|0;if((bp|0)!=0){ga(bp,752)}do{if((c[(c[3524]|0)+96>>2]&32|0)!=0){bp=c[16629]|0;if((bp|0)==0){break}if((cy(bp|0,137224)|0)==0){break}c[188]=(c[188]|0)+1}}while(0);bp=c[17317]|0;if((bp|0)!=0){ga(bp,824)}bp=c[16457]|0;if((bp|0)!=0){ga(bp,192)}bp=c[17145]|0;if((bp|0)!=0){ga(bp,592)}do{if((c[16573]|0)!=0){ga(66240,696);if((c[174]|0)!=0|(c[16580]|0)==0){break}c[174]=1}}while(0);if((c[17261]|0)!=0){ga(68992,808)}if((c[16401]|0)!=0){ga(65552,ap)}if((c[17089]|0)!=0){ga(68304,aq)}bp=c[1183]|0;if((bp|0)!=0){ga(bp,ar)}if((c[1098]|0)==0){bq=0}else{fN(4560,as,at,135256);be=+(aa((c[1098]|0)+1|0,c[bh+16>>2]|0)>>>0>>>0);bq=~~(+h[at>>3]+be)}do{if((c[206]|0)==0){br=0;bs=c[17261]|0;bt=9319}else{fN(69352,au,av,135256);at=c[bh+16>>2]|0;be=+(aa(at,c[206]|0)>>>0>>>0);as=~~(+h[av>>3]+be);bp=c[17261]|0;if((bp|0)!=0){br=as;bs=bp;bt=9319;break}bu=0;bv=~~(+(at>>>0>>>0)*.5+ +(as|0));bx=1}}while(0);do{if((bt|0)==9319){if((bs&1|0)==0){bu=0;bv=br;bx=1;break}bu=aa(c[bh+16>>2]|0,c[202]|0);bv=br;bx=0}}while(0);do{if((a[69200]&1)==0){if(bx){if((c[16573]&5|0)!=5){by=0;break}}by=~~(+((c[bh+24>>2]|0)>>>0>>>0)*+h[8648])}else{by=0}}while(0);if((c[1183]|0)==0|(c[1166]|0)!=0){bz=0}else{fN(4816,aw,ax,135256);be=+(aa((c[ar>>2]|0)+2|0,c[bh+16>>2]|0)>>>0>>>0);bz=~~(+h[ax>>3]+be)}if((c[16457]|0)==0|bj){bA=0}else{fN(65912,ay,az,135256);be=+(aa(c[bh+16>>2]|0,c[48]|0)>>>0>>>0);bA=~~(+h[az>>3]+be)}if((c[17145]|0)==0|bj){bB=0}else{fN(68664,aA,aB,135256);be=+(aa(c[bh+16>>2]|0,c[148]|0)>>>0>>>0);bB=~~(+h[aB>>3]+be)}be=+g[38]+ +g[44];aB=bh+12|0;aA=~~(be*+(((c[aB>>2]|0)-1|0)>>>0>>>0)+.5);c[7941]=aA;bd=+h[535];do{if((c[1066]|0)==3){c[7941]=~~(bd*+(((c[aB>>2]|0)-1|0)>>>0>>>0))}else{if(bd>=0.0){c[7941]=aA-~~(bd*+((c[bh+16>>2]|0)>>>0>>>0)+.5);break}az=bv+bq|0;ay=bA+bz|0;ax=(ay|0)>(az|0)?ay:az;az=(by+bu|0)+((bB|0)>(ax|0)?bB:ax)|0;if((az|0)>(by|0)){bC=(c[bh+16>>2]|0)+az|0}else{bC=az}az=aA-bC|0;c[7941]=az;if((az|0)!=(~~(be*+(((c[aB>>2]|0)-1|0)>>>0>>>0)+.5)|0)){break}c[7941]=az-(c[bh+20>>2]<<1)}}while(0);if((c[8786]|0)==3){bD=+h[4395]*+((c[bh+8>>2]|0)>>>0>>>0)}else{be=+h[4395];bD=+g[184]*+((c[bh+8>>2]|0)>>>0>>>0)+ +((c[bh+20>>2]|0)>>>0>>>0)*(be>=0.0?be:1.0)}c[7938]=~~bD;if((c[6598]|0)==3){bE=+h[3301]*+(((c[bh+8>>2]|0)-1|0)>>>0>>>0)}else{bD=+h[3301];bE=(+g[178]+ +g[184])*+(((c[bh+8>>2]|0)-1|0)>>>0>>>0)- +((c[bh+20>>2]|0)>>>0>>>0)*(bD>=0.0?bD:2.0)}c[7939]=~~bE;bC=c[16573]|0;if((bC&2|0)==0){bF=0;bt=9351}else{bE=+h[8169];bD=+h[8170];if(bE0.0|bD<0.0){bt=9349}else{bG=0}}else{if(bD>0.0|bE<0.0){bt=9349}else{bG=0}}if((bt|0)==9349){bG=1}if(+P(+(bE/(bD-bE)))<.05){bt=9352}else{bF=bG;bt=9351}}if((bt|0)==9351){if((bC&1|0)!=0|bF){bt=9352}else{bH=0}}if((bt|0)==9352){bH=aa((c[174]|0)+1|0,c[bh+16>>2]|0)}do{if((a[66448]&1)==0){if((bC&1|0)==0){if((c[17261]&5|0)!=5){bI=0;break}}bI=~~(+((c[bh+24>>2]|0)>>>0>>>0)*+h[8304])}else{bI=0}}while(0);do{if((c[188]|0)==0){bJ=0}else{fN(66600,aC,aD,135256);bE=+((c[bh+16>>2]|0)>>>0>>>0);bC=~~(bE*(+(c[188]|0)+.2)- +h[aD>>3]);if((c[16573]|0)!=0){bJ=bC;break}bJ=~~(bE*.5+ +(bC|0))}}while(0);if((c[1183]|0)!=0&(c[1166]|0)!=0){fN(4816,aE,aF,135256);bE=+(aa(c[bh+16>>2]|0,c[ar>>2]|0)>>>0>>>0);bK=~~(bE- +h[aF>>3])}else{bK=0}bE=+g[44];aF=~~(bE*+((c[aB>>2]|0)>>>0>>>0));c[7940]=aF;bD=+h[7052];do{if((c[14100]|0)==3){c[7940]=~~(bD*+((c[aB>>2]|0)>>>0>>>0))}else{if(bD>=0.0){c[7940]=~~(+(aF|0)+(bD*+((c[bh+16>>2]|0)>>>0>>>0)+.5));break}aE=(((bI+bH|0)+((bJ|0)>0?bJ:0)|0)+((bK|0)>0?bK:0)|0)+aF|0;c[7940]=aE;if((aE|0)!=(~~(bE*+((c[aB>>2]|0)>>>0>>>0))|0)){break}c[7940]=(c[bh+20>>2]<<1)+aE}}while(0);L12774:do{if((a[35184]&1)==0){bL=1;bN=0}else{bE=+h[3817];aF=~~(bE*+((c[bh+28>>2]|0)>>>0>>>0));c[8240]=aF;aE=~~(bE*+((c[bh+24>>2]|0)>>>0>>>0));c[8242]=aE;bE=+h[4524];if(bE<0.0){bO=0}else{bO=~~(+(aF|0)+bE*+((c[bh+20>>2]|0)>>>0>>>0))}c[9e3]=bO;bE=+h[4525];aF=~~(+(aE|0)*1.25*bE);c[9020]=aF;aE=bh+16|0;aD=c[aE>>2]|0;if(aF>>>0>>0){aC=~~(bE*+(aD>>>0>>>0));c[9020]=aC;bP=aC}else{bP=aF}if((bP|0)==0){c[9020]=1}if((d|0)>0){aF=0;aC=0;aD=0;bC=0;bF=b;while(1){bG=bF+16|0;aA=c[bG>>2]|0;do{if((aA|0)==0){bQ=aD;bR=aF}else{if((a[bF+22|0]&1)!=0){bQ=aD;bR=aF;break}az=a[bF+20|0]&1;do{if(az<<24>>24==0){bS=aA}else{if((a[37456]&1)!=0){bS=aA;break}a[37456]=1;ax=c[(c[3524]|0)+88>>2]|0;if((ax|0)==0){bS=aA;break}cO[ax&255](179864);bS=c[bG>>2]|0}}while(0);a[37456]=az;ax=lp(bS)|0;if((ax|0)==0){bT=aD;bU=aF}else{bT=aD+1|0;bU=(ax|0)>(aF|0)?ax:aF}a[37456]=0;bQ=bT;bR=bU}}while(0);bG=bF+12|0;aA=c[bG>>2]|0;ax=(aA|0)==392;if(ax&(bC|0)==392){bV=((c[bF+280>>2]|0)==0&(bQ|0)>1&1)+bQ|0}else{bV=bQ}do{if(ax){ay=c[bF+224>>2]|0;if((ay|0)==0){bW=bV;bX=bR;bY=392;break}aw=c[ay>>2]|0;if((aw|0)==0){bW=bV;bX=bR;bY=392;break}else{bZ=bR;b_=bV;b$=aw}do{b_=b_+1|0;aw=c[b$+60>>2]|0;if((aw|0)==0){b0=0}else{b0=lp(aw)|0}bZ=(b0|0)>(bZ|0)?b0:bZ;b$=c[b$>>2]|0;}while((b$|0)!=0);bW=b_;bX=bZ;bY=c[bG>>2]|0}else{bW=bV;bX=bR;bY=aA}}while(0);aA=aC+1|0;if((aA|0)<(d|0)){aF=bX;aC=aA;aD=bW;bC=bY;bF=c[bF>>2]|0}else{b1=bX;b2=bW;break}}}else{b1=0;b2=0}c[6960]=b2;c[8710]=b1;bF=ga(36288,aG)|0;bC=~~(+(bF|0)-(+h[4524]+2.0));bF=c[8710]|0;aD=(c[9047]|0)==1;if((bC|0)<=(bF|0)|aD){b3=bF}else{c[8710]=bC;b3=bC}bE=+(c[aG>>2]|0);h[4488]=bE;if((a[36229]&1)==0){c[9008]=0;bC=c[9e3]|0;c[9004]=bC;bF=bh+20|0;aC=~~(+((c[bF>>2]|0)>>>0>>>0)*(+(b3+1|0)+ +h[4526]));c[8988]=-aC;c[8984]=-(c[bF>>2]|0);c[8996]=aC;b4=(c[bF>>2]|0)+bC|0;b5=0;b6=bC;b7=aC}else{aC=c[9e3]|0;bC=-aC|0;c[9008]=bC;c[9004]=0;bF=bh+20|0;c[8988]=c[bF>>2];aF=~~(+((c[bF>>2]|0)>>>0>>>0)*(+(b3+1|0)+ +h[4526]));c[8984]=aF;aA=(c[bF>>2]|0)+aC|0;c[8996]=aA;b4=aF;b5=bC;b6=0;b7=aA}c[8992]=b4;c[9016]=(b5+b6|0)/2&-1;aA=b4+b7|0;c[9026]=aA;bC=c[6960]|0;c[9012]=bC;do{if(aD){aF=(c[7939]|0)-(c[7938]|0)|0;aC=(aF|0)/(aA|0)&-1;bF=c[9338]|0;bG=(bF|0)>0&(aC|0)>(bF|0)?bF:aC;if((bG|0)==0){c[9026]=aF;b8=1;b9=1;ca=aF}else{b8=0;b9=bG;ca=aA}bG=bC-1|0;aF=(bG+b9|0)/(b9|0)&-1;c[9012]=aF;if((aF|0)==0){cb=1}else{cb=(bG+aF|0)/(aF|0)&-1}bG=(cb|0)==0;cc=bG|b8<<24>>24!=0;cd=bG?1:cb;ce=aF;cf=ca}else{bD=+((c[aE>>2]|0)>>>0>>>0);aF=(~~(+((c[7941]|0)-(c[7940]|0)|0)- +h[4527]*bD-(bE+1.0)*bD)|0)/(c[9020]|0)&-1;bG=c[9339]|0;aC=(bG|0)>0&(aF|0)>(bG|0)?bG:aF;aF=(aC|0)==0;bG=aF?1:aC;if((bC|0)<=(bG|0)){cc=aF;cd=1;ce=bC;cf=aA;break}aC=bC-1|0;bF=(bG+aC|0)/(bG|0)&-1;bG=(bF|0)==0;ax=bG?1:bF;bF=(ax+aC|0)/(ax|0)&-1;c[9012]=bF;cc=bG|aF;cd=ax;ce=bF;cf=aA}}while(0);aA=c[9031]|0;if((aA|0)==1){if((c[9045]|0)!=1|(c[9044]|0)!=1){bt=9410}else{bt=9421}}else if((aA|0)==2){bt=9410}else{bt=9421}do{if((bt|0)==9410){aA=c[9032]|0;if((aA|0)==1&+h[7052]<0.0){bC=aa(c[9020]|0,ce);bD=+((c[aE>>2]|0)>>>0>>>0);aD=(((c[7940]|0)+bC|0)+~~((bE+1.0)*bD)|0)+~~(bD*+h[4527])|0;if((aD|0)>(c[7941]|0)){cg=0;break}c[7940]=aD;if(cc){cg=0;break}else{bL=cd;bN=0;break L12774}}if((aA|0)==0&+h[535]<0.0){aD=aa(c[9020]|0,ce);bD=+((c[aE>>2]|0)>>>0>>>0);bC=(((c[7941]|0)-aD|0)-~~((bE+1.0)*bD)|0)+~~(bD*+h[4527])|0;if((bC|0)<(c[7940]|0)){cg=0;break}c[7941]=bC;if(cc){cg=0;break}else{bL=cd;bN=0;break L12774}}if((aA|0)==2&+h[4395]<0.0){bC=aa(cd,cf);aD=c[7938]|0;bF=(aD+bC|0)>(c[7939]|0);ax=bF?0:bC;c[7938]=ax+aD;if(bF|cc){cg=ax;break}else{bL=cd;bN=ax;break L12774}}if(!((aA|0)==3&+h[3301]<0.0)){bt=9421;break}aA=aa(cd,cf);ax=(c[7939]|0)-aA|0;if((ax|0)<(c[7938]|0)){cg=0;break}c[7939]=ax;if(cc){cg=0}else{bL=cd;bN=0;break L12774}}}while(0);if((bt|0)==9421){if(cc){cg=0}else{bL=cd;bN=0;break}}uh(-1,133720,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);bL=cd;bN=cg}}while(0);dd(1,20);dd(5,20);do{if(a[31104]|0){dk();dc(3,132208);if((a[54016]|0)==110){break}dd(3,20)}}while(0);cg=c[16401]|0;if((cg&2|0)==0){ch=0;bt=9432}else{bE=+h[8255];bD=+h[8256];if(bE0.0|bD<0.0){bt=9430}else{ci=0}}else{if(bD>0.0|bE<0.0){bt=9430}else{ci=0}}if((bt|0)==9430){ci=1}if(+P(+(bE/(bD-bE)))<.1){bt=9433}else{ch=ci;bt=9432}}if((bt|0)==9432){if((cg&1|0)!=0|ch){bt=9433}else{cj=0}}do{if((bt|0)==9433){if((bn|0)==0){c[216]=0;de(1,14);cj=aa((c[216]|0)+2|0,c[bh+20>>2]|0);break}else{cj=aa((c[ap>>2]|0)+2|0,c[bh+16>>2]|0);break}}}while(0);do{if((a[65760]&1)==0){if((c[16401]&1|0)==0){if((c[17089]&5|0)!=5){ck=0;break}}ck=~~(+((c[bh+28>>2]|0)>>>0>>>0)*+h[8218])}else{ck=0}}while(0);ap=bj^1;do{if((c[16457]|0)==0|ap){cl=0}else{fN(65912,aH,aI,135256);bj=c[bh+16>>2]|0;bE=+(aa(bj,c[48]|0)>>>0>>>0);ch=~~(bE- +h[aH>>3]);if((c[16401]|0)!=0){cl=ch;break}cl=~~(+(bj>>>0>>>0)*.5+ +(ch|0))}}while(0);aH=(bk|0)==0;if((c[1183]|0)==0|aH){cm=0}else{fN(4816,aJ,aK,135256);cm=~~((+(c[ar>>2]|0)+1.5)*+((c[bh+16>>2]|0)>>>0>>>0)- +h[aJ>>3])}if(+h[4395]<0.0){aJ=(bN|0)<(cm|0)?cm:bN;bN=bh+8|0;ar=ck+cj|0;c[7938]=(((aJ|0)<(cl|0)?cl:aJ)+ar|0)+~~(+g[184]*+((c[bN>>2]|0)>>>0>>>0));fN(4816,aL,aM,135256);aM=c[7938]|0;do{if(aH){aJ=~~+h[aL>>3];if((aM-ar|0)>=(-aJ|0)){cn=aM;break}aK=ar-aJ|0;c[7938]=aK;cn=aK}else{cn=aM}}while(0);aM=bh+20|0;if((cn|0)==(~~(+((c[bN>>2]|0)>>>0>>>0)*+g[184])|0)){bN=(c[aM>>2]<<1)+cn|0;c[7938]=bN;co=bN}else{co=cn}c[7938]=~~(+(co|0)+ +((c[aM>>2]|0)>>>0>>>0)*.5)}do{if((c[17089]&1|0)==0){cp=0}else{if((bo|0)==0){c[216]=0;de(5,14);cp=aa((c[216]|0)+2|0,c[bh+20>>2]|0);break}else{cp=aa((c[aq>>2]|0)+2|0,c[bh+16>>2]|0);break}}}while(0);aq=c[16580]|0;do{if((aq|0)==0){cq=0}else{aM=c[7939]|0;co=c[7938]|0;h[8269]=+(aM-co|0)/(+h[8256]- +h[8255]);c[16536]=co;c[16537]=aM;co=aq;cn=aM;L12904:while(1){aM=c[co+8>>2]|0;do{if((aM|0)==0){cr=cn}else{bE=+(lp(aM)|0);bN=c[16602]|0;bD=bE*+S(+(+(bN|0)*.017453292519943295));ar=~~(bD*+((c[(c[3524]|0)+20>>2]|0)>>>0>>>0));bD=+h[8257];bE=+h[8258];cs=+h[co>>3];if(bDbE){cr=cn;break}}else{if(csbD){cr=cn;break}}if((a[66164]&1)==0){ct=cs}else{if(cs<=0.0){bt=9464;break L12904}bD=+_(+cs);ct=bD/+h[8272]}if((bN|0)==0){cu=(ar|0)/2&-1}else{cu=ar}bD=+(~~(+(c[16536]|0)+(ct- +h[8255])*+h[8269]+.5)|0)+ +(cu|0);if(+(cn|0)>=bD){cr=cn;break}cr=~~bD}}while(0);aM=c[co+16>>2]|0;if((aM|0)==0){break}else{co=aM;cn=cr}}if((bt|0)==9464){uk(210984,(v=i,i=i+24|0,c[v>>2]=130992,c[v+8>>2]=56880,h[v+16>>3]=cs,v)|0)}cn=cr-(c[7939]|0)|0;co=(c[(c[3524]|0)+8>>2]|0)>>>2;if(cn>>>0<=co>>>0){cq=cn;break}uh(-1,129936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cq=co}}while(0);do{if((a[68512]&1)==0){if((c[17089]&1|0)==0){if((c[16401]&5|0)!=5){cv=0;break}}cv=~~(+((c[bh+28>>2]|0)>>>0>>>0)*+h[8562])}else{cv=0}}while(0);do{if((c[17145]|0)==0|ap){cw=0}else{fN(68664,aO,aP,135256);cr=c[bh+16>>2]|0;cs=+(aa(cr,c[148]|0)>>>0>>>0);cu=~~(+h[aO>>3]+cs);if((c[17089]|0)!=0){cw=cu;break}cw=~~(+(cr>>>0>>>0)*.5+ +(cu|0))}}while(0);do{if((c[6598]|0)!=3){aO=a[54016]|0;if(a[31104]&aO<<24>>24!=110){if(!((aO<<24>>24|0)==110|(aO<<24>>24|0)==117)){aO=c[7939]|0;aP=~~(+(aO|0)- +(aO-(c[7938]|0)|0)*.1);c[7939]=aP;c[7939]=aP+((c[bh+20>>2]|0)*-3&-1)}c[13507]=0}if(+h[3301]>=0.0){break}aP=c[7939]|0;c[13507]=aP;aO=(((cw|0)>0?-cw|0:0)-(cv+cp|0)|0)+aP|0;c[7939]=aO;cu=bh+20|0;cs=(+g[178]+ +g[184])*+(((c[bh+8>>2]|0)-1|0)>>>0>>>0)- +(c[cu>>2]<<1>>>0>>>0);if(+(aO|0)>cs){cr=~~cs;c[7939]=cr;cx=cr}else{cx=aO}c[13507]=aP-cx;aP=c[(c[3524]|0)+8>>2]|0;if((aP-cx|0)>>>0>>0){aO=aP-cq|0;c[7939]=aO;cz=aO}else{cz=cx}c[7939]=~~(+(cz|0)- +((c[cu>>2]|0)>>>0>>>0))}}while(0);dd(2,20);dd(6,20);if((a[30528]&1)!=0){dd(7,10)}cs=+g[18074];do{if(cs!=0.0){do{if(cs<0.0){cz=c[200]|0;ct=+h[64672+(cz*688&-1)>>3]- +h[64664+(cz*688&-1)>>3];if(ct==0.0){bt=9497;break}cz=c[144]|0;cA=(-0.0-cs)*+P(+((+h[64672+(cz*688&-1)>>3]- +h[64664+(cz*688&-1)>>3])/ct))}else{bt=9497}}while(0);if((bt|0)==9497){cA=cs}if(!(cA>=.01&cA<=100.0)){break}cz=c[7941]|0;cx=c[7940]|0;cq=cz-cx|0;ct=+(cq|0);cu=c[7939]|0;aO=c[7938]|0;aP=cu-aO|0;bD=+(aP|0);bE=cA*+((c[bh+24>>2]|0)>>>0>>>0)/+((c[bh+28>>2]|0)>>>0>>>0);if(ct/bD>bE){cr=~~(bD*bE);if((c[14100]|0)==3){c[7941]=cr+cx;break}if((c[1066]|0)==3){c[7940]=cz-cr;break}else{aq=(cq-cr|0)/2&-1;c[7940]=aq+cx;c[7941]=cz-aq;break}}else{aq=~~(ct/bE);if((c[8786]|0)==3){c[7939]=aq+aO;break}if((c[6598]|0)==3){c[7938]=cu-aq;break}else{cz=(aP-aq|0)/2&-1;c[7938]=cz+aO;c[7939]=cu-cz;break}}}}while(0);cz=(bm|0)==0|ap;do{if((c[17261]&1|0)==0|cz){cB=bu}else{cA=+T(+(+(c[17290]|0)*.017453292519943295));bm=c[17314]|0;if((bm|0)==2){cC=cA*-1.0}else if((bm|0)==1){cC=+P(+cA)*.5}else{cC=cA}c[216]=0;de(6,14);bm=+h[535]<0.0;if(bm){c[7941]=(c[7941]|0)+bu}if(cC>0.0){cD=~~(+(bu|0)+cC*+(aa(c[216]|0,c[bh+20>>2]|0)|0))}else{cD=bu}if(!bm){cB=cD;break}c[7941]=(c[7941]|0)-cD;cB=cD}}while(0);cD=(bl|0)==0|ap;do{if((c[16573]&1|0)==0|cD){cE=bH}else{bl=c[16602]|0;do{if((bl|0)==(-270|0)){if((a[66648]&1)!=0){cF=-1.0;bt=9525;break}c[16626]=2;cH=-1.0;bt=9526}else if((bl|0)==90){cF=-1.0;bt=9525}else{cF=-0.0- +T(+(+(bl|0)*.017453292519943295));bt=9525}}while(0);if((bt|0)==9525){if((c[16626]|0)==2){cH=cF;bt=9526}else{cJ=cF}}if((bt|0)==9526){cJ=cH*-1.0}c[216]=0;de(2,14);bl=+h[7052]<0.0;if(bl){c[7940]=(c[7940]|0)-bH}if(cJ>0.0){cC=cJ*+(aa(c[216]|0,c[bh+20>>2]|0)|0);cL=~~(+((c[bh+16>>2]|0)>>>0>>>0)+cC)}else{cL=bH}if(!bl){cE=cL;break}c[7940]=(c[7940]|0)+cL;cE=cL}}while(0);cL=c[7941]|0;bH=c[7940]|0;if((cL|0)<(bH|0)){c[7941]=bH;c[7940]=cL;cP=bH;cQ=cL}else{cP=cL;cQ=bH}bH=((by+bv|0)+cB|0)+cP|0;c[208]=bH;do{if((cB|0)==0){cT=bH}else{if((bv|bq|0)==0){cT=bH;break}cL=(c[bh+16>>2]|0)+bH|0;c[208]=cL;cT=cL}}while(0);bH=cT+bq|0;c[1102]=bH;cT=((bA+by|0)+cB|0)+cP|0;c[50]=cT;c[150]=((bB+by|0)+cB|0)+cP;bB=bJ+bI|0;cL=bh+16|0;bl=~~(+(cQ-(cE+bB|0)|0)+ +((c[cL>>2]|0)>>>0>>>0)*(+(c[188]|0)+.2));c[190]=bl;bu=c[7938]|0;bm=(bu-ck|0)-cj|0;c[52]=bm;if(!((c[16457]|0)==0|ap)){c[52]=bm-cl}cl=(cv+cp|0)+(c[7939]|0)|0;c[152]=cl;if(!((c[17145]|0)==0|ap)){c[152]=(cl+cw|0)-aa(c[cL>>2]|0,c[148]|0)}cw=(bk|0)!=0;bk=(c[1166]|0)!=0;do{if(cw){if(bk){cU=(bJ-bK|0)+bl|0;bt=9551;break}else{c[1216]=(bz-(bv+bq|0)|0)+bH;bt=9552;break}}else{if(bk){c[1216]=(cQ-((bK+bB|0)+cE|0)|0)+(c[cL>>2]|0);bt=9553;break}if((bA|0)>0){c[1216]=cT+bz;bt=9553;break}else{cU=(((bz+by|0)+cB|0)+cP|0)+(c[bh+20>>2]|0)|0;bt=9551;break}}}while(0);if((bt|0)==9551){c[1216]=cU;if(cw){bt=9552}else{bt=9553}}if((bt|0)==9553){fN(4816,aQ,aR,135256);aR=c[7938]|0;cV=(aR-(ck+cj|0)|0)+~~+h[aQ>>3]|0;cW=c[7940]|0;cX=c[7941]|0;cY=aR}else if((bt|0)==9552){cV=bu-((ck+cj|0)+cm|0)|0;cW=cQ;cX=cP;cY=bu}c[1218]=cV;cV=bh+20|0;c[176]=(cW-bI|0)-(c[(cD?cL:cV)>>2]|0);if(cz){cZ=cB}else{cZ=c[cV>>2]|0}c[204]=(cX+by|0)+cZ;if((bn|0)==0){c_=c[cV>>2]|0}else{c_=cj-(c[cL>>2]|0)|0}c[36]=(cY-ck|0)-c_;c[146]=((c[7939]|0)+cv|0)+(c[((bo|0)==0?cV:cL)>>2]|0);cO[c[bi>>2]&255](0);bi=c[7941]|0;bo=c[7940]|0;cJ=+(bi-bo|0);h[8183]=cJ/(+h[8170]- +h[8169]);h[8527]=cJ/(+h[8514]- +h[8513]);cv=c[7939]|0;c_=c[7938]|0;cJ=+(cv-c_|0);h[8269]=cJ/(+h[8256]- +h[8255]);h[8613]=cJ/(+h[8600]- +h[8599]);c[16536]=c_;c[16537]=cv;c[16364]=bo;c[16365]=bi;c[17224]=c_;c[17225]=cv;c[17052]=bo;c[17053]=bi;ck=aa(c[9026]|0,bL);cJ=+((c[cL>>2]|0)>>>0>>>0);cH=+h[4488]*cJ;cL=~~(cH+ +(aa(c[9020]|0,c[9012]|0)|0));bL=cL+~~(cJ*+h[4527])|0;cL=c[9031]|0;do{if((cL|0)==1){if((c[9044]|0)==1&(c[9045]|0)==1){bt=9564}else{bt=9570}}else if((cL|0)==0){cY=c[9044]|0;if((cY|0)==0){cj=bi-(c[bh+24>>2]|0)|0;c[9337]=cj;c[9336]=cj-bL;bt=9565;break}else if((cY|0)==2){cY=(c[bh+24>>2]|0)+bo|0;c[9336]=cY;c[9337]=cY+bL;bt=9565;break}else{bt=9564;break}}else{if((cL-1|0)>>>0<2){bt=9570;break}fR(36136,an,ao,128552);cY=~~+h[an>>3];cj=~~+h[ao>>3];c[9334]=cY;bn=c[9045]|0;if((bn|0)==1){cZ=cY-((ck|0)/2&-1)|0;c[9334]=cZ;c$=cZ}else if((bn|0)==2){bn=cY-ck|0;c[9334]=bn;c$=bn}else{c$=cY}c[9335]=c$+ck;c[9337]=cj;cY=c[9044]|0;if((cY|0)==1){bn=((bL|0)/2&-1)+cj|0;c[9337]=bn;c0=bn}else if((cY|0)==2){cY=cj+bL|0;c[9337]=cY;c0=cY}else{c0=cj}c[9336]=c0-bL;c1=c[7939]|0;c2=c[7938]|0}}while(0);L13067:do{if((bt|0)==9564){c0=(bL|0)/2&-1;c$=(bo+bi|0)/2&-1;c[9336]=c$-c0;c[9337]=c$+c0;bt=9565}else if((bt|0)==9570){c0=c[9032]|0;do{if((c0|0)==0){c$=~~((+g[38]+ +g[44])*+((c[aB>>2]|0)>>>0>>>0)- +((c[bh+24>>2]|0)>>>0>>>0));c[9337]=c$;c[9336]=c$-bL}else if((c0|0)==1){c$=~~(+g[44]*+((c[aB>>2]|0)>>>0>>>0)+ +((c[bh+24>>2]|0)>>>0>>>0));c[9336]=c$;c[9337]=c$+bL}else{c$=c[9044]|0;if((c$|0)==0){c[9337]=bi;c[9336]=bi-bL}else if((c$|0)==1){c$=(bL|0)/2&-1;ao=(bo+bi|0)/2&-1;c[9336]=ao-c$;c[9337]=ao+c$}else{c[9336]=bo;c[9337]=bL+bo}if((c0|0)==2){c$=~~(+g[184]*+((c[bh+8>>2]|0)>>>0>>>0)+ +((c[cV>>2]|0)>>>0>>>0));c[9334]=c$;c[9335]=c$+ck;c1=cv;c2=c_;break L13067}else if((c0|0)==3){c$=~~((+g[178]+ +g[184])*+(((c[bh+8>>2]|0)-1|0)>>>0>>>0)- +((c[cV>>2]|0)>>>0>>>0));c[9335]=c$;c[9334]=c$-ck;c1=cv;c2=c_;break L13067}else{break}}}while(0);c0=c[9045]|0;if((c0|0)==0){c[9334]=c_;c[9335]=ck+c_;c1=cv;c2=c_;break}else if((c0|0)==1){c0=(ck|0)/2&-1;c$=(c_+cv|0)/2&-1;c[9334]=c$-c0;c[9335]=c$+c0;c1=cv;c2=c_;break}else{c[9335]=cv;c[9334]=cv-ck;c1=cv;c2=c_;break}}}while(0);do{if((bt|0)==9565){bh=c[9045]|0;if((bh|0)==0){bo=(c[cV>>2]|0)+c_|0;c[9334]=bo;c[9335]=bo+ck;c1=cv;c2=c_;break}else if((bh|0)==2){bh=cv-(c[cV>>2]|0)|0;c[9335]=bh;c[9334]=bh-ck;c1=cv;c2=c_;break}else{bh=(ck|0)/2&-1;bo=(c_+cv|0)/2&-1;c[9334]=bo-bh;c[9335]=bo+bh;c1=cv;c2=c_;break}}}while(0);c[13542]=31752;if((c1|0)<(c2|0)){bt=9593}else{if((c[7941]|0)<(c[7940]|0)){bt=9593}}if((bt|0)==9593){uh(-1,127328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(a[31104]|0){dz()}fO(c[10818]|0,-1,2);a[25280]=0;cM[c[(c[3524]|0)+168>>2]&511](1);c2=c[10026]|0;if((c2|0)==(-1|0)|(c2|0)==0){fT();c3=c[10026]|0}else{c3=c2}if((c3|0)==(-1|0)|(c3|0)==0){c[200]=2;c[144]=1;dg(2,1);dg(1,2);c[200]=6;c[144]=5;dg(6,5);dg(5,6)}if((c[11692]|0)!=0){fU()}if((c[16457]|0)!=0){c3=a[65952]&1;do{if(c3<<24>>24!=0){if((a[37456]&1)!=0){break}a[37456]=1;c2=c[(c[3524]|0)+88>>2]|0;if((c2|0)==0){break}cO[c2&255](179864)}}while(0);a[37456]=c3;fn(65840,a4);c3=a4+72|0;if((cO[c[c3>>2]&255](c[16455]|0)|0)==0){ln(c[52]|0,c[50]|0,c[16457]|0,0,0,0,c[16458]|0)}else{fN(65912,aU,aV,141e3);ln(((c[a4+16>>2]|0)>>>1)+(c[52]|0)|0,~~(+(((c[7940]|0)+(c[7941]|0)|0)/2&-1|0)+ +h[aV>>3]),c[16457]|0,1,0,c[16455]|0,c[16458]|0);aV=c[c3>>2]|0;cO[aV&255](0)}if((c[16460]|0)!=0){cM[c[a4+64>>2]&511](-2)}a[37456]=0}if((c[17145]|0)!=0){aV=a[68704]&1;do{if(aV<<24>>24!=0){if((a[37456]&1)!=0){break}a[37456]=1;c3=c[(c[3524]|0)+88>>2]|0;if((c3|0)==0){break}cO[c3&255](179864)}}while(0);a[37456]=aV;fn(68592,a4);aV=a4+72|0;if((cO[c[aV>>2]&255](c[17143]|0)|0)==0){ln(c[152]|0,c[150]|0,c[17145]|0,2,0,0,c[17146]|0)}else{fN(68664,aW,aX,141e3);ln(((c[152]|0)-1|0)+((c[a4+16>>2]|0)>>>1)|0,~~(+(((c[7940]|0)+(c[7941]|0)|0)/2&-1|0)+ +h[aX>>3]),c[17145]|0,1,0,c[17143]|0,c[17146]|0);aX=c[aV>>2]|0;cO[aX&255](0)}if((c[17148]|0)!=0){cM[c[a4+64>>2]&511](-2)}a[37456]=0}if((c[16629]|0)!=0){fN(66600,aY,aZ,141e3);aZ=~~(+(((c[7938]|0)+(c[7939]|0)|0)/2&-1|0)+ +h[aY>>3]);aY=(c[190]|0)-((c[a4+16>>2]|0)>>>1)|0;aX=a[66640]&1;do{if(aX<<24>>24!=0){if((a[37456]&1)!=0){break}a[37456]=1;aV=c[(c[3524]|0)+88>>2]|0;if((aV|0)==0){break}cO[aV&255](179864)}}while(0);a[37456]=aX;fn(66528,a4);ln(aZ,aY,c[16629]|0,1,0,0,c[16630]|0);if((c[16632]|0)!=0){cM[c[a4+64>>2]&511](-2)}a[37456]=0}if((c[1119]|0)!=0){fN(4560,a_,a$,141e3);a$=~~(+(((c[7939]|0)+(c[7938]|0)|0)/2&-1|0)+ +h[a_>>3]);a_=(c[1102]|0)-((c[a4+16>>2]|0)>>>1)|0;aY=a[4600]&1;do{if(aY<<24>>24!=0){if((a[37456]&1)!=0){break}a[37456]=1;aZ=c[(c[3524]|0)+88>>2]|0;if((aZ|0)==0){break}cO[aZ&255](179864)}}while(0);a[37456]=aY;fn(4488,a4);ln(a$,a_,c[1119]|0,1,0,0,c[1120]|0);if((c[1122]|0)!=0){cM[c[a4+64>>2]&511](-2)}a[37456]=0}if((c[17317]|0)!=0){fN(69352,a0,a1,141e3);a1=~~(+(((c[7938]|0)+(c[7939]|0)|0)/2&-1|0)+ +h[a0>>3]);a0=((c[208]|0)-1|0)-((c[a4+16>>2]|0)>>>1)|0;a_=a[69392]&1;do{if(a_<<24>>24!=0){if((a[37456]&1)!=0){break}a[37456]=1;a$=c[(c[3524]|0)+88>>2]|0;if((a$|0)==0){break}cO[a$&255](179864)}}while(0);a[37456]=a_;fn(69280,a4);ln(a1,a0,c[17317]|0,1,0,0,c[17318]|0);if((c[17320]|0)!=0){cM[c[a4+64>>2]&511](-2)}a[37456]=0}if((c[1183]|0)!=0){a0=c[1218]|0;a1=c[1216]|0;cG(a2|0);a_=ut(1025)|0;do{if((a_|0)==0){gk();a$=ut(1025)|0;if((a$|0)!=0){c4=a$;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=126240,v)|0)}else{c4=a_}}while(0);a_=c[1183]|0;a$=aN(a2|0)|0;bw(c4|0,1024,a_|0,a$|0);do{if((c[1164]|0)==0){bt=9658}else{a$=a4+72|0;if((cO[c[a$>>2]&255](-270)|0)==0){bt=9658;break}a_=((c[a4+16>>2]|0)>>>1)+a0|0;a2=c[1184]|0;if((c[1166]|0)==0){ln(a_,a1,c4,2,0,-270,a2)}else{ln(a_,a1,c4,0,0,-270,a2)}a2=c[a$>>2]|0;cO[a2&255](0)}}while(0);do{if((bt|0)==9658){a2=a1-((c[a4+16>>2]|0)>>>1)|0;a$=c[1184]|0;if((c[1166]|0)==0){ln(a0,a2,c4,0,0,0,a$);break}else{ln(a0,a2,c4,0,2,0,a$);break}}}while(0);uu(c4)}do{if(a[31104]&(a[54016]|0)!=110){if(!((c[(c[3524]|0)+144>>2]|0)!=0&(c[13506]|0)==0)){break}dD(1)}}while(0);fO(c[10818]|0,0,2);c4=c[10822]|0;a0=c[(c[3524]|0)+92>>2]|0;if((a0|0)!=0){cK[a0&63](+h[3817])}if((c4|0)!=0){a0=c4;do{if((c[a0+56>>2]|0)==0){fR(a0+8|0,al,am,202256);fp(~~+h[al>>3],~~+h[am>>3],a0)}a0=c[a0>>2]|0;}while((a0|0)!=0)}fV(0);cM[c[(c[3524]|0)+168>>2]&511](2);if((a[35184]&1)!=0){fW(0,aS,aT)}a0=a4+168|0;am=(d|0)>0;al=ak;c4=ak|0;a1=ak+4|0;a$=a3;a3=a4+144|0;a2=a4+92|0;a_=a4+80|0;aY=s;aZ=s|0;aX=s+4|0;aV=V;aW=V|0;c3=V+4|0;aU=Q|0;c2=R|0;c1=Q+8|0;Q=R+8|0;R=J;c_=M|0;cv=I;ck=M+7|0;M=I|0;cV=I+4|0;bh=H;bo=H+4|0;bL=H+8|0;bi=H+16|0;aB=H|0;c0=J|0;c$=J|0;ao=J+72|0;an=J+80|0;cL=E;cj=E|0;cY=E+4|0;bn=D;cZ=D+4|0;by=D+8|0;cX=D+16|0;cB=D|0;cz=J+64|0;cD=J+8|0;bI=J+16|0;J=A+8|0;cW=A+40|0;bu=A+32|0;cP=A|0;cQ=A+16|0;cm=A+24|0;aR=A+48|0;aQ=A+56|0;cw=x;cU=x|0;bz=x+4|0;cT=t;bA=t|0;cE=t+4|0;bB=0;bK=0;L13212:while(1){cM[c[a0>>2]&511](10);bk=a[35184]|0;if(am){bH=0;bq=bB;bv=b;bl=0;bJ=bk;while(1){cM[c[(c[3524]|0)+168>>2]&511](6);cl=bv+304|0;c[200]=c[cl>>2];ap=bv+308|0;c[144]=c[ap>>2];cp=bv+24|0;bm=bv+64|0;c[al>>2]=c[bm>>2];c[al+4>>2]=c[bm+4>>2];c[al+8>>2]=c[bm+8>>2];c[al+12>>2]=c[bm+12>>2];cu=bv+28|0;aO=c[cu>>2]|0;aq=cp|0;do{if((c[aq>>2]|0)!=0){cJ=+h[bv+48>>3];aP=c[(c[3524]|0)+92>>2]|0;if(cJ<0.0){cK[aP&63](+h[3817]);break}else{cK[aP&63](cJ);break}}}while(0);aP=bv+40|0;cK[c[(c[3524]|0)+112>>2]&63](+h[aP>>3]);cx=c[(c[3524]|0)+64>>2]|0;if((aO|0)<-5){cM[cx&511](-2)}else{cM[cx&511](aO)}cx=bv+56|0;cr=c[3524]|0;do{if((a[cx]&1)==0){if((c[cr+96>>2]&1024|0)!=0){break}c[c4>>2]=1;c[a1>>2]=aO;bt=9686}else{bt=9686}}while(0);if((bt|0)==9686){bt=0;fn(ak,cr)}aO=bv+12|0;do{if((c[aO>>2]|0)==392){if((a[30080]&1)==0){c5=1}else{lK(cp,(c[cu>>2]|0)+1|0);c5=(c[aO>>2]|0)==392}if(!(c5&(bH|0)==392)){c6=bq;break}if((c[bv+280>>2]|0)!=0){c6=bq;break}cq=c[aT>>2]|0;co=c[54]|0;if((cq|0)==(co|0)){c6=bq;break}cn=bq+1|0;if((cn|0)<(c[9012]|0)){c[aT>>2]=cq-(c[9020]|0);c6=cn;break}else{c[aT>>2]=co;c[aS>>2]=(c[aS>>2]|0)+(c[9026]|0);c6=0;break}}else{c6=bq}}while(0);do{if((c[aO>>2]|0)==392&(c[9670]|0)==2){cr=bv+224|0;co=c[cr>>2]|0;if((co|0)==0){c7=0;c8=c6;break}if(!bK){if((a[36228]&1)!=0){c7=0;c8=c6;break}}cn=cp;c[a$>>2]=c[cn>>2];c[a$+4>>2]=c[cn+4>>2];c[a$+8>>2]=c[cn+8>>2];c[a$+12>>2]=c[cn+12>>2];c[a$+16>>2]=c[cn+16>>2];c[a$+20>>2]=c[cn+20>>2];c[a$+24>>2]=c[cn+24>>2];c[a$+28>>2]=c[cn+28>>2];c[a$+32>>2]=c[cn+32>>2];c[a$+36>>2]=c[cn+36>>2];c[a$+40>>2]=c[cn+40>>2];c[a$+44>>2]=c[cn+44>>2];c[a$+48>>2]=c[cn+48>>2];c[a$+52>>2]=c[cn+52>>2];cq=c[co>>2]|0;if((cq|0)==0){c9=c6;da=co}else{co=bv+200|0;aM=bv+64|0;ar=bv+68|0;bN=bv+32|0;aL=c6;aH=cq;while(1){cq=aH+4|0;c[cu>>2]=c[cq>>2];c[co>>2]=c[cq>>2];aK=aH+60|0;if((c[aK>>2]|0)!=0){aJ=(c[cq>>2]|0)+1|0;do{if((a[30080]&1)==0){cq=c[aq>>2]|0;aI=c[8798]|0;ch=(aI|0)>0;bj=aJ;L13260:while(1){cg=43264;while(1){df=c[cg>>2]|0;if((df|0)==0){break}if((c[df+4>>2]|0)==(bj|0)){break L13260}else{cg=df|0}}dh=bj-1|0;if(!((bj|0)>(aI|0)&ch)){bt=9715;break}bj=((dh|0)%(aI|0)&-1)+1|0}if((bt|0)==9715){bt=0;c[cu>>2]=dh;c[aM>>2]=1;c[ar>>2]=dh;c[bN>>2]=dh;break}aI=df+8|0;c[cn>>2]=c[aI>>2];c[cn+4>>2]=c[aI+4>>2];c[cn+8>>2]=c[aI+8>>2];c[cn+12>>2]=c[aI+12>>2];c[cn+16>>2]=c[aI+16>>2];c[cn+20>>2]=c[aI+20>>2];c[cn+24>>2]=c[aI+24>>2];c[cn+28>>2]=c[aI+28>>2];c[cn+32>>2]=c[aI+32>>2];c[cn+36>>2]=c[aI+36>>2];c[cn+40>>2]=c[aI+40>>2];c[cn+44>>2]=c[aI+44>>2];c[cn+48>>2]=c[aI+48>>2];c[cn+52>>2]=c[aI+52>>2];c[aq>>2]=cq;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[cu>>2]=bj;a[cx]=0;break}if((a[cx]&1)!=0){break}c[aM>>2]=1;c[ar>>2]=c[cu>>2]}else{lK(cp,aJ)}}while(0);fY(bv,c[aK>>2]|0,a4,c[aS>>2]|0,c[aT>>2]|0)}aJ=aL+1|0;if((aJ|0)<(c[9012]|0)){c[aT>>2]=(c[aT>>2]|0)-(c[9020]|0);di=aJ}else{c[aT>>2]=c[54];c[aS>>2]=(c[aS>>2]|0)+(c[9026]|0);di=0}aJ=c[aH>>2]|0;if((aJ|0)==0){break}else{aL=di;aH=aJ}}c9=di;da=c[cr>>2]|0}aH=c[da+64>>2]|0;if((aH|0)==0){dj=da}else{uu(aH);dj=da}while(1){aL=c[dj+60>>2]|0;if((aL|0)!=0){uu(aL)}aL=c[dj+64>>2]|0;if(!((aL|0)==0|(aL|0)==(aH|0))){uu(aL)}aL=c[dj>>2]|0;uu(dj);if((aL|0)==0){break}else{dj=aL}}c[cr>>2]=0;c[cn>>2]=c[a$>>2];c[cn+4>>2]=c[a$+4>>2];c[cn+8>>2]=c[a$+8>>2];c[cn+12>>2]=c[a$+12>>2];c[cn+16>>2]=c[a$+16>>2];c[cn+20>>2]=c[a$+20>>2];c[cn+24>>2]=c[a$+24>>2];c[cn+28>>2]=c[a$+28>>2];c[cn+32>>2]=c[a$+32>>2];c[cn+36>>2]=c[a$+36>>2];c[cn+40>>2]=c[a$+40>>2];c[cn+44>>2]=c[a$+44>>2];c[cn+48>>2]=c[a$+48>>2];c[cn+52>>2]=c[a$+52>>2];c7=0;c8=c9}else{aH=bv+16|0;aL=c[aH>>2]|0;if((aL|0)!=0){if((a[aL]|0)==0){c7=0;c8=c6;break}}if((c[bv+8>>2]|0)==4){c7=0;c8=c6;break}if(!bK){if((a[36228]&1)!=0){c7=(bJ&1)!=0;c8=c6;break}}aL=a[bv+20|0]&1;do{if(aL<<24>>24!=0){if((a[37456]&1)!=0){break}a[37456]=1;ar=c[(c[3524]|0)+88>>2]|0;if((ar|0)==0){break}cO[ar&255](179864)}}while(0);a[37456]=aL;cn=bJ&1;do{if(cn<<24>>24==0){dl=c6}else{cr=c[aH>>2]|0;if((cr|0)==0){dl=c6;break}if((a[bv+22|0]&1)!=0){dl=c6;break}if((a[36230]&1)==0){dm=cr;dn=c[aT>>2]|0}else{cr=(((c[54]|0)+(c[9336]|0)|0)+((c[9020]|0)/2&-1)|0)-(c[aT>>2]|0)|0;c[aT>>2]=cr;dm=c[aH>>2]|0;dn=cr}fY(bv,dm,a4,c[aS>>2]|0,dn);dl=c6+1|0}}while(0);a[37456]=0;c7=cn<<24>>24!=0;c8=dl}}while(0);cp=bv+23|0;aH=a[cp]|0;L13316:do{if(!((aH&1)==0|bK)){aL=bv+300|0;if((c[aL>>2]|0)<=0){break}cr=bv+320|0;ar=0;aM=aH;while(1){do{if((aM&1)!=0){c[(c[cr>>2]|0)+(ar<<6)>>2]=0;bN=c[cl>>2]|0;cJ=+h[64664+(bN*688&-1)>>3];cH=+h[64672+(bN*688&-1)>>3];bN=c[cr>>2]|0;cF=+h[bN+(ar<<6)+8>>3];if(cJcH){bt=9754}else{dp=bN}}else{if(cFcJ){bt=9754}else{dp=bN}}if((bt|0)==9754){bt=0;c[bN+(ar<<6)>>2]=1;dp=c[cr>>2]|0}bN=c[ap>>2]|0;cJ=+h[64664+(bN*688&-1)>>3];cF=+h[64672+(bN*688&-1)>>3];cH=+h[dp+(ar<<6)+16>>3];if(cJcF)){break}}else{if(!(cHcJ)){break}}c[dp+(ar<<6)>>2]=1}}while(0);aK=ar+1|0;if((aK|0)>=(c[aL>>2]|0)){break L13316}ar=aK;aM=a[cp]|0}}}while(0);cp=bv+8|0;do{if(!((c[cp>>2]|0)==4|bK)){aH=c[aO>>2]|0;if((aH|0)==18){fZ(bv);break}else if((aH|0)==51){fX(bv);fZ(bv);break}else if((aH|0)==64){aM=bv+300|0;ar=c[aM>>2]|0;if((ar|0)<=0){break}aL=bv+320|0;cr=bv+316|0;cn=(c[3524]|0)+80|0;aK=0;bN=ar;while(1){ar=c[aL>>2]|0;if((c[ar+(aK<<6)>>2]|0)==0){co=c[200]|0;aJ=~~(+(c[64768+(co*688&-1)>>2]|0)+(+h[ar+(aK<<6)+8>>3]- +h[64664+(co*688&-1)>>3])*+h[64776+(co*688&-1)>>3]+.5);co=c[144]|0;aI=~~(+(c[64768+(co*688&-1)>>2]|0)+(+h[ar+(aK<<6)+16>>3]- +h[64664+(co*688&-1)>>3])*+h[64776+(co*688&-1)>>3]+.5);co=(c[cr>>2]|0)+(aK<<3)|0;f9(bv,co);cR[c[cn>>2]&127](aJ,aI,-1);dq=c[aM>>2]|0}else{dq=bN}aI=aK+1|0;if((aI|0)<(dq|0)){aK=aI;bN=dq}else{break}}}else if((aH|0)==295|(aH|0)==279|(aH|0)==311){fX(bv);f_(bv);fZ(bv);break}else if((aH|0)==102|(aH|0)==86|(aH|0)==118){f_(bv);fZ(bv);break}else if((aH|0)==137|(aH|0)==153){f$(bv,c[64784+((c[144]|0)*688&-1)>>2]|0);break}else if((aH|0)==392){if((c[14156]|0)==1){f$(bv,c[64784+((c[144]|0)*688&-1)>>2]|0)}do{if((c[9670]|0)==4){cK[c[(c[3524]|0)+112>>2]&63](+h[4840]);if(!(hG(49488)|0)){cM[c[(c[3524]|0)+64>>2]&511](c[cu>>2]|0)}f_(bv);c[aV>>2]=c[bm>>2];c[aV+4>>2]=c[bm+4>>2];c[aV+8>>2]=c[bm+8>>2];c[aV+12>>2]=c[bm+12>>2];bN=c[cu>>2]|0;do{if((c[aq>>2]|0)!=0){cJ=+h[bv+48>>3];aK=c[(c[3524]|0)+92>>2]|0;if(cJ<0.0){cK[aK&63](+h[3817]);break}else{cK[aK&63](cJ);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[aP>>3]);aK=c[(c[3524]|0)+64>>2]|0;if((bN|0)<-5){cM[aK&511](-2)}else{cM[aK&511](bN)}aK=c[3524]|0;if((a[cx]&1)==0){if((c[aK+96>>2]&1024|0)!=0){break}c[aW>>2]=1;c[c3>>2]=bN}fn(V,aK)}}while(0);if((c[14156]|0)==1){break}f$(bv,c[64784+((c[144]|0)*688&-1)>>2]|0);break}else if((aH|0)==33){aK=c[64784+((c[200]|0)*688&-1)>>2]|0;aM=c[64784+((c[144]|0)*688&-1)>>2]|0;cn=bv+300|0;if((c[cn>>2]|0)<=0){break}cr=bv+320|0;aL=bv+316|0;aI=0;do{aJ=c[cr>>2]|0;L13380:do{if((c[aJ+(aI<<6)>>2]|0)!=2){co=c[200]|0;do{if((a[30528]&1)==0){cJ=+h[64664+(co*688&-1)>>3];cH=+h[64672+(co*688&-1)>>3];cF=+h[aJ+(aI<<6)+8>>3];if(cJcH){break L13380}else{dr=cF;ds=cJ;break}}else{if(cFcJ){break L13380}else{dr=cF;ds=cJ;break}}}else{dr=+h[aJ+(aI<<6)+8>>3];ds=+h[64664+(co*688&-1)>>3]}}while(0);bj=~~(+(c[64768+(co*688&-1)>>2]|0)+(dr-ds)*+h[64776+(co*688&-1)>>3]+.5);cq=c[144]|0;ar=~~(+(c[64768+(cq*688&-1)>>2]|0)+(+h[aJ+(aI<<6)+16>>3]- +h[64664+(cq*688&-1)>>3])*+h[64776+(cq*688&-1)>>3]+.5);cq=(c[aL>>2]|0)+(aI<<3)|0;f9(bv,cq);if((a[30528]&1)==0){c[ac>>2]=bj;c[ad>>2]=aM;c[ae>>2]=bj;c[af>>2]=ar;cq=c[3524]|0;if((fl(ac,ad,ae,af)|0)==0){break}cN[c[cq+56>>2]&255](c[ac>>2]|0,c[ad>>2]|0);cN[c[cq+60>>2]&255](c[ae>>2]|0,c[af>>2]|0);break}else{c[ag>>2]=aK;c[ah>>2]=aM;c[ai>>2]=bj;c[aj>>2]=ar;ar=c[3524]|0;if((fl(ag,ah,ai,aj)|0)==0){break}cN[c[ar+56>>2]&255](c[ag>>2]|0,c[ah>>2]|0);cN[c[ar+60>>2]&255](c[ai>>2]|0,c[aj>>2]|0);break}}}while(0);aI=aI+1|0;}while((aI|0)<(c[cn>>2]|0))}else if((aH|0)==169){if((c[14156]|0)!=1){f_(bv)}f$(bv,c[64784+((c[144]|0)*688&-1)>>2]|0);if((c[14156]|0)!=1){break}f_(bv);break}else if((aH|0)==345){cn=bv+244|0;aI=c[cn>>2]|0;if((aI|0)==13){f0(bv);break}else if((aI|0)==10){f0(bv);break}else{aI=c[3524]|0;c[U>>2]=0;if((c[aI+148>>2]|0)==0){fX(bv)}else{aI=bv+240|0;do{if((c[aI>>2]|0)==0){aM=aI;if((c[cp>>2]|0)==1){c[aM>>2]=c[10858];c[aM+4>>2]=c[10859];c[aM+8>>2]=c[10860];c[aM+12>>2]=c[10861];c[aM+16>>2]=c[10862];c[aM+20>>2]=c[10863];c[aM+24>>2]=c[10864];c[aM+28>>2]=c[10865];break}else{c[aM>>2]=c[10850];c[aM+4>>2]=c[10851];c[aM+8>>2]=c[10852];c[aM+12>>2]=c[10853];c[aM+16>>2]=c[10854];c[aM+20>>2]=c[10855];c[aM+24>>2]=c[10856];c[aM+28>>2]=c[10857];break}}}while(0);aI=c[cn>>2]|0;do{if((aI|0)==5){aM=bv+248|0;cJ=+h[aM>>3];cF=+h[8255];if(cJ>3]=cF;dt=cF}else{dt=cJ}cJ=+h[8256];if(dt<=cJ){break}h[aM>>3]=cJ}else if((aI|0)==7){aM=bv+248|0;cJ=+h[aM>>3];cF=+h[8599];if(cJ>3]=cF;du=cF}else{du=cJ}cJ=+h[8600];if(du<=cJ){break}h[aM>>3]=cJ}else if((aI|0)==6){aM=bv+248|0;cJ=+h[aM>>3];cF=+h[8169];if(cJ>3]=cF;dv=cF}else{dv=cJ}cJ=+h[8170];if(dv<=cJ){break}h[aM>>3]=cJ}else if((aI|0)==8){aM=bv+248|0;cJ=+h[aM>>3];cF=+h[8513];if(cJ>3]=cF;dw=cF}else{dw=cJ}cJ=+h[8514];if(dw<=cJ){break}h[aM>>3]=cJ}else if((aI|0)==9){aM=bv+248|0;cJ=+h[aM>>3];cF=+h[8255];if(cJ>3]=cF;dx=cF}else{dx=cJ}cJ=+h[8256];if(dx>cJ){h[aM>>3]=cJ}aM=bv+256|0;cJ=+h[aM>>3];cF=+h[8169];if(cJ>3]=cF;dy=cF}else{dy=cJ}cJ=+h[8170];if(dy<=cJ){break}h[aM>>3]=cJ}}while(0);aM=bv+300|0;if((c[aM>>2]|0)>0){aK=bv+320|0;aL=bv+264|0;cr=bv+248|0;aJ=2;bN=0;ar=0;bj=0;cq=0;ch=0;cg=2;while(1){ci=c[7934]|0;if((cg|0)>=(ci|0)){cd=ci+128|0;c[7934]=cd;c[7936]=db(c[7936]|0,cd*12&-1,140784)|0}cd=c[aK>>2]|0;ci=c[cd+(ch<<6)>>2]|0;L13454:do{if((ci|0)==1){cc=(c[cn>>2]|0)==0;if(cc){bt=10021}else{if((a[54152]&1)==0){dA=bj;dB=ar}else{bt=10021}}if((bt|0)==10021){bt=0;cf=c[200]|0;ce=~~(+(c[64768+(cf*688&-1)>>2]|0)+(+h[cd+(ch<<6)+8>>3]- +h[64664+(cf*688&-1)>>3])*+h[64776+(cf*688&-1)>>3]+.5);cf=c[144]|0;ca=~~(+(c[64768+(cf*688&-1)>>2]|0)+(+h[cd+(ch<<6)+16>>3]- +h[64664+(cf*688&-1)>>3])*+h[64776+(cf*688&-1)>>3]+.5);cf=c[13542]|0;if((cf|0)==0){dC=0}else{cb=(c[cf>>2]|0)>(ce|0)&1;b8=(c[cf+4>>2]|0)<(ce|0)?cb|2:cb;cb=(c[cf+8>>2]|0)>(ca|0)?b8|4:b8;dC=(c[cf+12>>2]|0)<(ca|0)?cb|8:cb}cb=dC&3;ca=dC&12;dA=(cb|0)==0?bj:cb;dB=(ca|0)==0?ar:ca}if((aJ|0)==0){if(!((a[54160]&1)!=0|cc)){if((a[54152]&1)==0){dE=cq;dF=dA;dG=dB;dH=bN;break}}ca=gb(cd,ch,N,O)|0;cb=c[200]|0;c[(c[7936]|0)+((c[U>>2]|0)*12&-1)>>2]=~~(+(c[64768+(cb*688&-1)>>2]|0)+(+h[N>>3]- +h[64664+(cb*688&-1)>>3])*+h[64776+(cb*688&-1)>>3]+.5);cb=c[144]|0;cf=~~(+(c[64768+(cb*688&-1)>>2]|0)+(+h[O>>3]- +h[64664+(cb*688&-1)>>3])*+h[64776+(cb*688&-1)>>3]+.5);cb=c[U>>2]|0;c[U>>2]=cb+1;c[(c[7936]|0)+(cb*12&-1)+4>>2]=cf;dE=cq;dF=dA;dG=dB;dH=ca;break}else if((aJ|0)!=1){dE=cq;dF=dA;dG=dB;dH=bN;break}if(!cc){if((a[54152]&1)==0){dE=cq;dF=dA;dG=dB;dH=bN;break}}if(!(gc(cd,ch,aU,c2)|0)){dE=cq;dF=dA;dG=dB;dH=bN;break}cc=c[200]|0;cJ=+h[aU>>3];c[(c[7936]|0)+((c[U>>2]|0)*12&-1)>>2]=~~(+(c[64768+(cc*688&-1)>>2]|0)+(cJ- +h[64664+(cc*688&-1)>>3])*+h[64776+(cc*688&-1)>>3]+.5);cc=c[144]|0;cF=+h[c2>>3];ca=~~(+(c[64768+(cc*688&-1)>>2]|0)+(cF- +h[64664+(cc*688&-1)>>3])*+h[64776+(cc*688&-1)>>3]+.5);cc=c[U>>2]|0;c[U>>2]=cc+1;c[(c[7936]|0)+(cc*12&-1)+4>>2]=ca;ca=c[aK>>2]|0;cc=ca+(ch<<6)+8|0;cH=+h[cc>>3];cC=+h[ca+(ch<<6)+16>>3];cA=+h[c1>>3];h[cc>>3]=cA;cs=+h[Q>>3];h[(c[aK>>2]|0)+(ch<<6)+16>>3]=cs;cc=gb(c[aK>>2]|0,ch,N,O)|0;h[(c[aK>>2]|0)+(ch<<6)+8>>3]=cH;h[(c[aK>>2]|0)+(ch<<6)+16>>3]=cC;do{if((bN|0)==0){dI=cc}else{if((cc|0)==(bN|0)){dI=cq;break}gi(c[7936]|0,U,bN,cc,dB,dA);dI=cq}}while(0);cc=c[200]|0;c[(c[7936]|0)+((c[U>>2]|0)*12&-1)>>2]=~~(+(c[64768+(cc*688&-1)>>2]|0)+(cA- +h[64664+(cc*688&-1)>>3])*+h[64776+(cc*688&-1)>>3]+.5);cc=c[144]|0;co=~~(+(c[64768+(cc*688&-1)>>2]|0)+(cs- +h[64664+(cc*688&-1)>>3])*+h[64776+(cc*688&-1)>>3]+.5);cc=c[U>>2]|0;c[U>>2]=cc+1;c[(c[7936]|0)+(cc*12&-1)+4>>2]=co;co=ch-1|0;cc=c[aK>>2]|0;ca=cc+(co<<6)+8|0;cC=+h[ca>>3];cH=+h[cc+(co<<6)+16>>3];h[ca>>3]=cJ;h[(c[aK>>2]|0)+(co<<6)+16>>3]=cF;ca=gb(c[aK>>2]|0,ch,N,O)|0;h[(c[aK>>2]|0)+(co<<6)+8>>3]=cC;h[(c[aK>>2]|0)+(co<<6)+16>>3]=cH;dE=dI;dF=dA;dG=dB;dH=ca}else if((ci|0)==2){if((aJ|0)==2){dE=cq;dF=bj;dG=ar;dH=bN;break}if(!((cq|0)==0|(cq|0)==(bN|0))){gi(c[7936]|0,U,bN,cq,ar,bj)}gj(c[U>>2]|0,c[7936]|0,bv);c[U>>2]=0;dE=0;dF=bj;dG=ar;dH=0}else if((ci|0)==0){ca=c[200]|0;cH=+(c[64768+(ca*688&-1)>>2]|0);cC=+h[cd+(ch<<6)+8>>3];bE=+h[64664+(ca*688&-1)>>3];ct=+h[64776+(ca*688&-1)>>3];ca=~~(cH+(cC-bE)*ct+.5);co=c[144]|0;bD=+h[cd+(ch<<6)+16>>3];cc=~~(+(c[64768+(co*688&-1)>>2]|0)+(bD- +h[64664+(co*688&-1)>>3])*+h[64776+(co*688&-1)>>3]+.5);if((aJ|0)==0){do{if((c[aL>>2]|0)!=0){co=c[cn>>2]|0;if((co|0)==5|(co|0)==7){be=+h[cr>>3];cf=ch-1|0;bd=be- +h[cd+(cf<<6)+8>>3];bg=be-cC;if(bg*bd>=0.0){break}bf=+h[cd+(cf<<6)+16>>3];h[N>>3]=be;dJ=bf+bd*(bD-bf)/(bd-bg);dK=be}else if((co|0)==6|(co|0)==8){be=+h[cr>>3];co=ch-1|0;bg=be- +h[cd+(co<<6)+16>>3];bd=be-bD;bf=+h[cd+(co<<6)+8>>3];if(bd*bg>=0.0){break}a7=bf+bg*(cC-bf)/(bg-bd);h[N>>3]=a7;dJ=be;dK=a7}else{break}h[O>>3]=dJ;c[(c[7936]|0)+((c[U>>2]|0)*12&-1)>>2]=~~(cH+ct*(dK-bE)+.5);co=c[144]|0;cf=~~(+(c[64768+(co*688&-1)>>2]|0)+(dJ- +h[64664+(co*688&-1)>>3])*+h[64776+(co*688&-1)>>3]+.5);co=c[U>>2]|0;c[U>>2]=co+1;c[(c[7936]|0)+(co*12&-1)+4>>2]=cf;gj(c[U>>2]|0,c[7936]|0,bv);c[U>>2]=0;cf=c[200]|0;c[c[7936]>>2]=~~(+(c[64768+(cf*688&-1)>>2]|0)+(dK- +h[64664+(cf*688&-1)>>3])*+h[64776+(cf*688&-1)>>3]+.5);cf=c[144]|0;co=~~(+(c[64768+(cf*688&-1)>>2]|0)+(dJ- +h[64664+(cf*688&-1)>>3])*+h[64776+(cf*688&-1)>>3]+.5);cf=c[U>>2]|0;c[U>>2]=cf+1;c[(c[7936]|0)+(cf*12&-1)+4>>2]=co}}while(0);c[(c[7936]|0)+((c[U>>2]|0)*12&-1)>>2]=ca;co=c[U>>2]|0;c[U>>2]=co+1;c[(c[7936]|0)+(co*12&-1)+4>>2]=cc;dE=cq;dF=bj;dG=ar;dH=bN;break}else if((aJ|0)==1){do{if((c[cn>>2]|0)!=0){if((a[54152]&1)!=0){break}co=(a[54160]&1)==0;gj(c[U>>2]|0,c[7936]|0,bv);c[U>>2]=0;if(co){c[c[7936]>>2]=ca;co=c[U>>2]|0;c[U>>2]=co+1;c[(c[7936]|0)+(co*12&-1)+4>>2]=cc;dE=cq;dF=bj;dG=ar;dH=bN;break L13454}else{co=c[aK>>2]|0;gb(co,ch,N,O);co=c[200]|0;c[(c[7936]|0)+((c[U>>2]|0)*12&-1)>>2]=~~(+(c[64768+(co*688&-1)>>2]|0)+(+h[N>>3]- +h[64664+(co*688&-1)>>3])*+h[64776+(co*688&-1)>>3]+.5);co=c[144]|0;cf=~~(+(c[64768+(co*688&-1)>>2]|0)+(+h[O>>3]- +h[64664+(co*688&-1)>>3])*+h[64776+(co*688&-1)>>3]+.5);co=c[U>>2]|0;c[U>>2]=co+1;c[(c[7936]|0)+(co*12&-1)+4>>2]=cf;c[(c[7936]|0)+((c[U>>2]|0)*12&-1)>>2]=ca;cf=c[U>>2]|0;c[U>>2]=cf+1;c[(c[7936]|0)+(cf*12&-1)+4>>2]=cc;dE=cq;dF=bj;dG=ar;dH=bN;break L13454}}}while(0);cf=gb(cd,ch,N,O)|0;do{if((bN|0)==0){dL=cf}else{if((cf|0)==(bN|0)){dL=cq;break}gi(c[7936]|0,U,bN,cf,ar,bj);dL=cq}}while(0);cf=c[200]|0;c[(c[7936]|0)+((c[U>>2]|0)*12&-1)>>2]=~~(+(c[64768+(cf*688&-1)>>2]|0)+(+h[N>>3]- +h[64664+(cf*688&-1)>>3])*+h[64776+(cf*688&-1)>>3]+.5);cf=c[144]|0;co=~~(+(c[64768+(cf*688&-1)>>2]|0)+(+h[O>>3]- +h[64664+(cf*688&-1)>>3])*+h[64776+(cf*688&-1)>>3]+.5);cf=c[U>>2]|0;c[U>>2]=cf+1;c[(c[7936]|0)+(cf*12&-1)+4>>2]=co;c[(c[7936]|0)+((c[U>>2]|0)*12&-1)>>2]=ca;co=c[U>>2]|0;c[U>>2]=co+1;c[(c[7936]|0)+(co*12&-1)+4>>2]=cc;dE=dL;dF=bj;dG=ar;dH=bN;break}else{gj(c[U>>2]|0,c[7936]|0,bv);c[U>>2]=0;c[c[7936]>>2]=ca;co=c[U>>2]|0;c[U>>2]=co+1;c[(c[7936]|0)+(co*12&-1)+4>>2]=cc;c[(c[7936]|0)+((c[U>>2]|0)*12&-1)>>2]=ca;co=c[U>>2]|0;c[U>>2]=co+1;c[(c[7936]|0)+(co*12&-1)+4>>2]=cc;dE=cq;dF=bj;dG=ar;dH=bN;break}}else{dE=cq;dF=bj;dG=ar;dH=bN}}while(0);cd=ch+1|0;if((cd|0)>=(c[aM>>2]|0)){break}aJ=c[(c[aK>>2]|0)+(ch<<6)>>2]|0;bN=dH;ar=dG;bj=dF;cq=dE;ch=cd;cg=(c[U>>2]|0)+2|0}dM=dH;dN=dG;dO=dF;dP=dE;dQ=c[cn>>2]|0}else{dM=0;dN=0;dO=0;dP=0;dQ=aI}if((dQ|0)==0){if(!((dP|0)==0|(dP|0)==(dM|0))){bt=10045}}else{if(!((a[54152]&1)==0|(dP|0)==0|(dP|0)==(dM|0))){bt=10045}}if((bt|0)==10045){bt=0;gi(c[7936]|0,U,dM,dP,dN,dO)}gj(c[U>>2]|0,c[7936]|0,bv)}if(!(hG(bv+192|0)|0)){break}fX(bv);break}}else if((aH|0)==193){cg=c[3524]|0;ch=bv+300|0;if((c[ch>>2]|0)<=0){break}cq=bv+320|0;bj=cg+56|0;ar=cg+60|0;cg=0;bN=0;aK=0;aJ=2;aM=c[cq>>2]|0;while(1){cr=c[aM+(aK<<6)>>2]|0;if((cr|0)==0){aL=c[200]|0;cd=~~(+(c[64768+(aL*688&-1)>>2]|0)+(+h[aM+(aK<<6)+8>>3]- +h[64664+(aL*688&-1)>>3])*+h[64776+(aL*688&-1)>>3]+.5);aL=c[144]|0;ci=~~(+(c[64768+(aL*688&-1)>>2]|0)+(+h[aM+(aK<<6)+16>>3]- +h[64664+(aL*688&-1)>>3])*+h[64776+(aL*688&-1)>>3]+.5);do{if((aJ|0)==0){cN[c[ar>>2]&255](cg,ci);cN[c[ar>>2]&255](cd,ci)}else if((aJ|0)==1){if((a[54160]&1)==0){break}gf(aM,aK,Y,Z);aL=c[200]|0;co=~~(+(c[64768+(aL*688&-1)>>2]|0)+(+h[Y>>3]- +h[64664+(aL*688&-1)>>3])*+h[64776+(aL*688&-1)>>3]+.5);aL=c[144]|0;cN[c[bj>>2]&255](co,~~(+(c[64768+(aL*688&-1)>>2]|0)+(+h[Z>>3]- +h[64664+(aL*688&-1)>>3])*+h[64776+(aL*688&-1)>>3]+.5));cN[c[ar>>2]&255](co,ci);cN[c[ar>>2]&255](cd,ci)}}while(0);cN[c[bj>>2]&255](cd,ci);dR=ci;dS=cd}else if((cr|0)==1){L13532:do{if((aJ|0)==0){if((a[54160]&1)==0){dT=bN;dU=cg;break}gf(aM,aK,Y,Z);co=c[200]|0;aL=~~(+(c[64768+(co*688&-1)>>2]|0)+(+h[Y>>3]- +h[64664+(co*688&-1)>>3])*+h[64776+(co*688&-1)>>3]+.5);co=c[144]|0;cf=~~(+(c[64768+(co*688&-1)>>2]|0)+(+h[Z>>3]- +h[64664+(co*688&-1)>>3])*+h[64776+(co*688&-1)>>3]+.5);cN[c[ar>>2]&255](cg,cf);cN[c[ar>>2]&255](aL,cf);dT=cf;dU=aL}else if((aJ|0)==1){if((a[54152]&1)==0){dT=bN;dU=cg;break}aL=aK-1|0;bE=+h[aM+(aL<<6)+8>>3];ct=+h[aM+(aL<<6)+16>>3];cH=+h[aM+(aK<<6)+8>>3];cC=+h[aM+(aK<<6)+16>>3];aL=c[200]|0;bD=+h[64664+(aL*688&-1)>>3];if((bE>cH?bE:cH)>3];if((bEcF){dT=bN;dU=cg;break}cf=c[144]|0;cJ=+h[64664+(cf*688&-1)>>3];if((ct>cC?ct:cC)>3];if((ctcs){dT=bN;dU=cg;break}co=cJcs){bt=9876}else{bt=9880}}else{if(cCcJ){bt=9876}else{bt=9881}}if((bt|0)==9876){bt=0;if(bDcF){dT=bN;dU=cg;break}}else{if(bEbD){dT=bN;dU=cg;break}}if(co){bt=9880}else{bt=9881}}if((bt|0)==9880){bt=0;if(cCcs){bt=9900}else{bt=9882}}else if((bt|0)==9881){bt=0;if(cCcJ){bt=9901}else{bt=9882}}do{if((bt|0)==9882){bt=0;cb=bDcF){bt=9899}}else{if(bEbD){bt=9899}}if((bt|0)==9899){bt=0;if(co){bt=9900;break}else{bt=9901;break}}do{if(co){if(ct>cs){dV=cs;break}if(ct>=cJ){dV=ct;break}dV=cJ}else{if(ct>cJ){dV=cJ;break}if(ct>=cs){dV=ct;break}dV=cs}}while(0);if(cb){if(cH>cF){dW=dV;dX=cC;dY=bE;dZ=cF;break}if(cH>=bD){dW=dV;dX=cC;dY=bE;dZ=cH;break}dW=dV;dX=cC;dY=bE;dZ=bD;break}else{if(cH>bD){dW=dV;dX=cC;dY=bE;dZ=bD;break}if(cH>=cF){dW=dV;dX=cC;dY=bE;dZ=cH;break}dW=dV;dX=cC;dY=bE;dZ=cF;break}}}while(0);if((bt|0)==9900){bt=0;if(cCcs){bt=9902}else{dW=cC;dX=cC;dY=bD;dZ=cF}}else if((bt|0)==9901){bt=0;if(cCcJ){bt=9902}else{dW=cC;dX=cC;dY=bD;dZ=cF}}do{if((bt|0)==9902){bt=0;if(bDcF){dT=bN;dU=cg;break L13532}else{dW=cJ;dX=cs;dY=bE;dZ=bE;break}}else{if(bEbD){dT=bN;dU=cg;break L13532}else{dW=cJ;dX=cs;dY=bE;dZ=bE;break}}}}while(0);bE=+(c[64768+(aL*688&-1)>>2]|0);cs=+h[64776+(aL*688&-1)>>3];co=~~(bE+(dY-bD)*cs+.5);cF=+(c[64768+(cf*688&-1)>>2]|0);cC=+h[64776+(cf*688&-1)>>3];cc=~~(bE+(dZ-bD)*cs+.5);ca=~~(cF+(dX-cJ)*cC+.5);cN[c[bj>>2]&255](co,~~(cF+(dW-cJ)*cC+.5));cN[c[ar>>2]&255](co,ca);cN[c[ar>>2]&255](cc,ca);dT=ca;dU=cc}else{dT=bN;dU=cg}}while(0);cN[c[bj>>2]&255](dU,dT);dR=dT;dS=dU}else{dR=bN;dS=cg}cr=c[cq>>2]|0;cd=c[cr+(aK<<6)>>2]|0;ci=aK+1|0;if((ci|0)<(c[ch>>2]|0)){cg=dS;bN=dR;aK=ci;aJ=cd;aM=cr}else{break}}}else if((aH|0)==1){fX(bv);break}else if((aH|0)==177|(aH|0)==184){aM=c[3524]|0;do{if((aH&8|0)==0){d_=0;d$=0}else{if((c[aM+108>>2]|0)==0){d_=0;d$=0;break}aJ=c[bv+192>>2]|0;if((aJ|0)==1|(aJ|0)==4){d0=(c[bv+196>>2]<<4&65520)+aJ|0}else if((aJ|0)==2|(aJ|0)==5){d0=(c[bv+200>>2]<<4&65520)+aJ|0}else{d0=0}aJ=c[144]|0;do{if((a[64788+(aJ*688&-1)|0]&1)==0){h[ab>>3]=0.0;cC=+h[64664+(aJ*688&-1)>>3];cF=+h[64672+(aJ*688&-1)>>3];if(cC>3]=cF;d1=cF;d2=cC;break}if(cC<=0.0){d1=0.0;d2=cC;break}h[ab>>3]=cC;d1=cC;d2=cC;break}else{if(cC<0.0){h[ab>>3]=cC;d1=cC;d2=cC;break}if(cF<=0.0){d1=0.0;d2=cC;break}h[ab>>3]=cF;d1=cF;d2=cC;break}}else{cC=+h[64664+(aJ*688&-1)>>3];h[ab>>3]=cC;d1=cC;d2=cC}}while(0);d_=d0;d$=~~(+(c[64768+(aJ*688&-1)>>2]|0)+(d1-d2)*+h[64776+(aJ*688&-1)>>3]+.5)}}while(0);aK=bv+300|0;if((c[aK>>2]|0)<=0){break}bN=bv+320|0;cg=aM+56|0;ch=(d_|0)==0;cq=aM+60|0;bj=aM+108|0;ar=0;aI=0;cn=0;cr=2;cd=c[bN>>2]|0;while(1){ci=c[cd+(cn<<6)>>2]|0;if((ci|0)==1){L13617:do{if((cr|0)==0){if((a[54160]&1)==0){d3=aI;d4=ar;break}gg(cd,cn,$,ab);cc=c[200]|0;ca=~~(+(c[64768+(cc*688&-1)>>2]|0)+(+h[$>>3]- +h[64664+(cc*688&-1)>>3])*+h[64776+(cc*688&-1)>>3]+.5);cc=c[144]|0;co=~~(+(c[64768+(cc*688&-1)>>2]|0)+(+h[ab>>3]- +h[64664+(cc*688&-1)>>3])*+h[64776+(cc*688&-1)>>3]+.5);if(ch){cN[c[cq>>2]&255](ca,aI);cN[c[cq>>2]&255](ca,co);d3=co;d4=ca;break}else{cI[c[bj>>2]&63](d_,ar,d$,ca-ar|0,aI-d$|0);d3=co;d4=ca;break}}else if((cr|0)==1){if((a[54152]&1)==0){d3=aI;d4=ar;break}ca=cn-1|0;cC=+h[cd+(ca<<6)+8>>3];cF=+h[cd+(ca<<6)+16>>3];cs=+h[cd+(cn<<6)+8>>3];bE=+h[cd+(cn<<6)+16>>3];ca=c[200]|0;cH=+h[64664+(ca*688&-1)>>3];if((cC>cs?cC:cs)>3];if((cCct){d3=aI;d4=ar;break}co=c[144]|0;cA=+h[64664+(co*688&-1)>>3];if((cF>bE?cF:bE)>3];if((cFa7){d3=aI;d4=ar;break}cc=cAa7){bt=9824}else{bt=9828}}else{if(cFcA){bt=9824}else{bt=9829}}if((bt|0)==9824){bt=0;if(cHct){d3=aI;d4=ar;break}}else{if(cscH){d3=aI;d4=ar;break}}if(cc){bt=9828}else{bt=9829}}if((bt|0)==9828){bt=0;if(cFa7){bt=9847}else{bt=9830}}else if((bt|0)==9829){bt=0;if(cFcA){bt=9848}else{bt=9830}}do{if((bt|0)==9830){bt=0;do{if(cHct){bt=9846;break}if(cC>ct){d5=ct;break}if(cC>=cH){d5=cC;break}d5=cH}else{if(cscH){bt=9846;break}if(cC>cH){d5=cH;break}if(cC>=ct){d5=cC;break}d5=ct}}while(0);if((bt|0)==9846){bt=0;if(cc){bt=9847;break}else{bt=9848;break}}if(cc){if(bE>a7){d6=cF;d7=a7;d8=d5;d9=cs;break}if(bE>=cA){d6=cF;d7=bE;d8=d5;d9=cs;break}d6=cF;d7=cA;d8=d5;d9=cs;break}else{if(bE>cA){d6=cF;d7=cA;d8=d5;d9=cs;break}if(bE>=a7){d6=cF;d7=bE;d8=d5;d9=cs;break}d6=cF;d7=a7;d8=d5;d9=cs;break}}}while(0);if((bt|0)==9847){bt=0;if(cFa7){bt=9849}else{d6=cF;d7=cF;d8=cH;d9=ct}}else if((bt|0)==9848){bt=0;if(cFcA){bt=9849}else{d6=cF;d7=cF;d8=cH;d9=ct}}do{if((bt|0)==9849){bt=0;if(cHct){d3=aI;d4=ar;break L13617}else{d6=cA;d7=a7;d8=cs;d9=cs;break}}else{if(cCcH){d3=aI;d4=ar;break L13617}else{d6=cA;d7=a7;d8=cs;d9=cs;break}}}}while(0);cs=+(c[64768+(ca*688&-1)>>2]|0);a7=+h[64776+(ca*688&-1)>>3];cc=~~(cs+(d8-cH)*a7+.5);cC=+(c[64768+(co*688&-1)>>2]|0);ct=+h[64776+(co*688&-1)>>3];cf=~~(cC+(d6-cA)*ct+.5);aL=~~(cs+(d9-cH)*a7+.5);cb=~~(cC+(d7-cA)*ct+.5);if(ch){cN[c[cg>>2]&255](cc,cf);cN[c[cq>>2]&255](aL,cf);cN[c[cq>>2]&255](aL,cb);d3=cb;d4=aL;break}else{cI[c[bj>>2]&63](d_,cc,d$,aL-cc|0,cf-d$|0);d3=cb;d4=aL;break}}else{d3=aI;d4=ar}}while(0);cN[c[cg>>2]&255](d4,d3);ea=d3;eb=d4}else if((ci|0)==0){aJ=c[200]|0;aL=~~(+(c[64768+(aJ*688&-1)>>2]|0)+(+h[cd+(cn<<6)+8>>3]- +h[64664+(aJ*688&-1)>>3])*+h[64776+(aJ*688&-1)>>3]+.5);aJ=c[144]|0;cb=~~(+(c[64768+(aJ*688&-1)>>2]|0)+(+h[cd+(cn<<6)+16>>3]- +h[64664+(aJ*688&-1)>>3])*+h[64776+(aJ*688&-1)>>3]+.5);do{if((cr|0)==1){if((a[54160]&1)==0){break}gg(cd,cn,$,ab);aJ=c[200]|0;cf=~~(+(c[64768+(aJ*688&-1)>>2]|0)+(+h[$>>3]- +h[64664+(aJ*688&-1)>>3])*+h[64776+(aJ*688&-1)>>3]+.5);aJ=c[144]|0;cc=~~(+(c[64768+(aJ*688&-1)>>2]|0)+(+h[ab>>3]- +h[64664+(aJ*688&-1)>>3])*+h[64776+(aJ*688&-1)>>3]+.5);if(ch){cN[c[cg>>2]&255](cf,cc);cN[c[cq>>2]&255](aL,cc);cN[c[cq>>2]&255](aL,cb);break}aJ=cc-d$|0;b8=c[bj>>2]|0;ce=aL-cf|0;if((aJ|0)<0){cI[b8&63](d_,cf,cc,ce,d$-cc|0);break}else{cI[b8&63](d_,cf,d$,ce,aJ);break}}else if((cr|0)==0){if(ch){cN[c[cq>>2]&255](aL,aI);cN[c[cq>>2]&255](aL,cb);break}aJ=aI-d$|0;ce=c[bj>>2]|0;cf=aL-ar|0;if((aJ|0)<0){cI[ce&63](d_,ar,aI,cf,d$-aI|0);break}else{cI[ce&63](d_,ar,d$,cf,aJ);break}}}while(0);cN[c[cg>>2]&255](aL,cb);ea=cb;eb=aL}else{ea=aI;eb=ar}ci=c[bN>>2]|0;aJ=c[ci+(cn<<6)>>2]|0;cf=cn+1|0;if((cf|0)<(c[aK>>2]|0)){ar=eb;aI=ea;cn=cf;cr=aJ;cd=ci}else{break}}}else if((aH|0)==225){cd=c[3524]|0;cr=c[bv+88>>2]|0;cn=c[bv+92>>2]|0;ct=+h[bv+104>>3];cC=+h[bv+112>>3];aI=a[bv+120|0]|0;uD(c_|0,bv+121|0,23);ar=c[bv+144>>2]|0;a7=+h[bv+152>>3];aK=c[bv+160>>2]|0;cs=+h[bv+168>>3];cF=+h[bv+176>>3];bN=c[bv+184>>2]|0;uD(cv|0,ck|0,16);do{if((cr|0)!=0){cg=c[cd+92>>2]|0;if(cC<0.0){cK[cg&63](+h[3817]);break}else{cK[cg&63](cC);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](ct);cr=c[(c[3524]|0)+64>>2]|0;if((cn|0)<-5){cM[cr&511](-2)}else{cM[cr&511](cn)}cr=c[3524]|0;do{if((aI&1)==0){if((c[cr+96>>2]&1024|0)!=0){break}c[M>>2]=1;c[cV>>2]=cn;bt=10059}else{bt=10059}}while(0);if((bt|0)==10059){bt=0;fn(I,cr)}c[12912]=bN;c[12910]=0;if(a7>0.0){uE(bh|0,0,40);c[bo>>2]=2;c[bL>>2]=2;h[bi>>3]=a7;c[aB>>2]=aK;fN(H,F,G,123984);h[6458]=cs;h[6457]=cF;c[12910]=~~+h[F>>3]}cn=bv+300|0;if((c[cn>>2]|0)<=0){break}aI=bv+320|0;cg=bv+80|0;bj=bv+316|0;cq=cd+84|0;ch=ar;aM=0;while(1){ci=c[aI>>2]|0;uD(R|0,ci+(aM<<6)|0,64);aJ=c[c$>>2]|0;L13717:do{if((aJ|0)==2){ec=ch}else{ct=+h[ci+(aM<<6)+56>>3];h[ao>>3]=ct;cC=+h[ci+(aM<<6)+40>>3];h[an>>3]=cC;do{if((c[cg>>2]|0)==-3){cf=~~+h[ci+(aM<<6)+24>>3];ce=43296;while(1){ed=c[ce>>2]|0;if((ed|0)==0){bt=10069;break}if((c[ed+4>>2]|0)==(cf|0)){bt=10070;break}else{ce=ed|0}}do{if((bt|0)==10069){bt=0;uD(c_|0,51521,23);uh(-1,79128,(v=i,i=i+8|0,c[v>>2]=cf,v)|0);uD(cL|0,ck|0,16);ee=0;ef=90.0;eg=15.0;eh=0;ei=0.0;ej=1;ek=0;el=1.0;em=-2}else if((bt|0)==10070){bt=0;ce=c[ed+16>>2]|0;b8=c[ed+20>>2]|0;bE=+h[ed+32>>3];cJ=+h[ed+40>>3];cc=a[ed+48|0]|0;uD(c_|0,ed+49|0,23);b9=c[ed+72>>2]|0;bD=+h[ed+80>>3];b7=c[ed+88>>2]|0;be=+h[ed+96>>3];bd=+h[ed+104>>3];b4=c[ed+112>>2]|0;uD(cL|0,ck|0,16);if((ce|0)==0){ee=b4;ef=bd;eg=be;eh=b7;ei=bD;ej=b9;ek=cc;el=bE;em=b8;break}ce=c[(c[3524]|0)+92>>2]|0;if(cJ<0.0){cK[ce&63](+h[3817]);ee=b4;ef=bd;eg=be;eh=b7;ei=bD;ej=b9;ek=cc;el=bE;em=b8;break}else{cK[ce&63](cJ);ee=b4;ef=bd;eg=be;eh=b7;ei=bD;ej=b9;ek=cc;el=bE;em=b8;break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](el);cf=c[(c[3524]|0)+64>>2]|0;if((em|0)<-5){cM[cf&511](-2)}else{cM[cf&511](em)}cf=c[3524]|0;do{if((ek&1)==0){if((c[cf+96>>2]&1024|0)!=0){break}c[cj>>2]=1;c[cY>>2]=em;bt=10080}else{bt=10080}}while(0);if((bt|0)==10080){bt=0;fn(E,cf)}c[12912]=ee;c[12910]=0;if(ei<=0.0){en=ej;break}uE(bn|0,0,40);c[cZ>>2]=2;c[by>>2]=2;h[cX>>3]=ei;c[cB>>2]=eh;fN(D,B,C,123984);h[6458]=eg;h[6457]=ef;c[12910]=~~+h[B>>3];en=ej}else{en=ch}}while(0);co=(c[bj>>2]|0)+(aM<<3)|0;f9(bv,co);co=c[200]|0;cA=+h[64664+(co*688&-1)>>3];cH=+h[64672+(co*688&-1)>>3];if(cAcH)){bt=10086}}else{if(!(ctcA)){bt=10086}}do{if((bt|0)==10086){bt=0;ca=c[144]|0;cH=+h[64664+(ca*688&-1)>>3];bE=+h[64672+(ca*688&-1)>>3];if(cHbE){break}}else{if(cCcH){break}}c[cz>>2]=0;bE=+(c[64768+(co*688&-1)>>2]|0);bD=+h[64776+(co*688&-1)>>3];b8=~~(bE+(ct-cA)*bD+.5);be=+(c[64768+(ca*688&-1)>>2]|0);bd=+h[64776+(ca*688&-1)>>3];ca=~~(be+(cC-cH)*bd+.5);if((aJ|0)==0){cI[c[cq>>2]&63](~~(bE+bD*(+h[cD>>3]-cA)+.5),~~(be+bd*(+h[bI>>3]-cH)+.5),b8,ca,en);ec=en;break L13717}else if((aJ|0)!=1){ec=en;break L13717}if((a[54160]&1)==0){ec=en;break L13717}gb(c0,1,K,L);cc=c[200]|0;b9=~~(+(c[64768+(cc*688&-1)>>2]|0)+(+h[K>>3]- +h[64664+(cc*688&-1)>>3])*+h[64776+(cc*688&-1)>>3]+.5);cc=c[144]|0;b7=~~(+(c[64768+(cc*688&-1)>>2]|0)+(+h[L>>3]- +h[64664+(cc*688&-1)>>3])*+h[64776+(cc*688&-1)>>3]+.5);cc=c[cq>>2]|0;if((en&1|0)==0){cI[cc&63](b9,b7,b8,ca,0);ec=en;break L13717}else{cI[cc&63](b9,b7,b8,ca,1);ec=en;break L13717}}}while(0);c[cz>>2]=1;if((aJ|0)==1){if((a[54152]&1)==0){ec=en;break}if(!(gc(c0,1,aU,c2)|0)){ec=en;break}ca=c[200]|0;cC=+(c[64768+(ca*688&-1)>>2]|0);ct=+h[64664+(ca*688&-1)>>3];cH=+h[64776+(ca*688&-1)>>3];ca=c[144]|0;bd=+(c[64768+(ca*688&-1)>>2]|0);be=+h[64664+(ca*688&-1)>>3];bD=+h[64776+(ca*688&-1)>>3];cI[c[cq>>2]&63](~~(cC+(+h[aU>>3]-ct)*cH+.5),~~(bd+(+h[c2>>3]-be)*bD+.5),~~(cC+cH*(+h[c1>>3]-ct)+.5),~~(bd+bD*(+h[Q>>3]-be)+.5),0);ec=en;break}else if((aJ|0)!=0){ec=en;break}if((a[54160]&1)==0){ec=en;break}ca=~~(+(c[64768+(co*688&-1)>>2]|0)+(+h[cD>>3]-cA)*+h[64776+(co*688&-1)>>3]+.5);b8=c[144]|0;b7=~~(+(c[64768+(b8*688&-1)>>2]|0)+(+h[bI>>3]- +h[64664+(b8*688&-1)>>3])*+h[64776+(b8*688&-1)>>3]+.5);gb(c0,1,K,L);b8=c[200]|0;b9=~~(+(c[64768+(b8*688&-1)>>2]|0)+(+h[K>>3]- +h[64664+(b8*688&-1)>>3])*+h[64776+(b8*688&-1)>>3]+.5);b8=c[144]|0;cc=~~(+(c[64768+(b8*688&-1)>>2]|0)+(+h[L>>3]- +h[64664+(b8*688&-1)>>3])*+h[64776+(b8*688&-1)>>3]+.5);b8=c[cq>>2]|0;if((en&2|0)==0){cI[b8&63](ca,b7,b9,cc,0);ec=en;break}else{cI[b8&63](b9,cc,ca,b7,2);ec=en;break}}}while(0);aJ=aM+1|0;if((aJ|0)<(c[cn>>2]|0)){ch=ec;aM=aJ}else{break}}}else if((aH|0)==209){aM=c[3524]|0;ch=bv+300|0;cn=c[ch>>2]|0;if((cn|0)<=0){break}cq=bv+320|0;bj=c[cq>>2]|0;cg=0;aI=0;do{aI=((c[bj+(cg<<6)>>2]|0)>>>0<2&1)+aI|0;cg=cg+1|0;}while((cg|0)<(cn|0));if((aI|0)<2){break}cn=aI<<2;cg=ut(cn)|0;if((cg|0)==0){gk();bj=ut(cn)|0;if((bj|0)==0){bt=9914;break L13212}else{eo=bj}}else{eo=cg}cg=eo;bj=c[ch>>2]|0;if((bj|0)>0){cn=0;ar=0;cd=bj;while(1){if((c[(c[cq>>2]|0)+(cn<<6)>>2]|0)>>>0<2){c[cg+(ar<<2)>>2]=cn;ep=ar+1|0;eq=c[ch>>2]|0}else{ep=ar;eq=cd}bj=cn+1|0;if((bj|0)<(eq|0)){cn=bj;ar=ep;cd=eq}else{er=ep;break}}}else{er=0}c[9732]=bv;bM(eo|0,er|0,4,30);c[9732]=0;cd=c[144]|0;cF=+h[64664+(cd*688&-1)>>3];if((a[64788+(cd*688&-1)|0]&1)==0){es=0.0}else{cs=+h[64672+(cd*688&-1)>>3];es=cF>2]|0;cn=c[cq>>2]|0;cs=(+h[cn+(ar<<6)+8>>3]*3.0- +h[cn+(c[eo+4>>2]<<6)+8>>3])*.5;ch=c[200]|0;aI=~~(+(c[64768+(ch*688&-1)>>2]|0)+(cs- +h[64664+(ch*688&-1)>>3])*+h[64776+(ch*688&-1)>>3]+.5);c[W>>2]=aI;ch=~~(+(c[64768+(cd*688&-1)>>2]|0)+(es-cF)*+h[64776+(cd*688&-1)>>3]+.5);c[X>>2]=ch;cd=c[13542]|0;if((cd|0)==0){bt=9923}else{bj=(c[cd>>2]|0)>(aI|0)&1;aK=(c[cd+4>>2]|0)<(aI|0)?bj|2:bj;bj=(c[cd+8>>2]|0)>(ch|0)?aK|4:aK;if((((c[cd+12>>2]|0)<(ch|0)?bj|8:bj)|0)==0){bt=9923}else{et=ar;eu=cn}}if((bt|0)==9923){bt=0;cN[c[aM+56>>2]&255](aI,ch);et=c[cg>>2]|0;eu=c[cq>>2]|0}ch=er-1|0;cF=+h[eu+(et<<6)+16>>3];if((ch|0)>0){a7=cs;be=es;aI=1;cn=et;ar=eu;bD=cF;while(1){ev=(a[64788+((c[144]|0)*688&-1)|0]&1)!=0&bD>3]+ +h[ar+(c[bj>>2]<<6)+8>>3])*.5;gd(W,X,a7,be,ev);ge(W,X,a7,ew,ev);ex=c[bj>>2]|0;ey=c[cq>>2]|0;ez=+h[ey+(ex<<6)+16>>3];if((aI|0)>=(ch|0)){break}a7=ew;be=ev;aI=aI+1|0;cn=ex;ar=ey;bD=ez}eA=ew;eB=ev;eC=er-2|0;eD=ex;eE=ey;eF=ez}else{eA=cs;eB=es;eC=-1;eD=et;eE=eu;eF=cF}bD=(+h[eE+(eD<<6)+8>>3]*3.0- +h[eE+(c[cg+(eC<<2)>>2]<<6)+8>>3])*.5;gd(W,X,eA,eB,eF);ge(W,X,eA,bD,eF);gd(W,X,bD,eF,es);uu(eo);break}else if((aH|0)==257){f1(bv);break}else if((aH|0)==252){f2(bv);break}else if((aH|0)==474){ar=bv+320|0;cn=c[ar>>2]|0;aI=c[bv+288>>2]|0;ch=(aI|0)==0?1:aI;aI=bv+300|0;cq=c[aI>>2]|0;if((ch|0)<=0){break}aM=(ch|0)>1;bj=(cq|0)>0;cd=bv+292|0;aK=bv+48|0;bN=bv+32|0;bD=0.0;be=0.0;cr=0;aJ=cq;while(1){if(aM){c[aI>>2]=cq;do{if((a[56292]&1)==0){eG=cr}else{ci=c[cd>>2]|0;if((ci|0)==0){eG=cr;break}eG=c[ci+(cr<<2)>>2]|0}}while(0);ci=c[ar>>2]|0;if(bj){a7=+(eG|0);aL=0;cb=ci;while(1){h[cb+(aL<<6)+16>>3]=+h[cb+(aL<<6)+40>>3];c[(c[ar>>2]|0)+(aL<<6)>>2]=0;b7=c[ar>>2]|0;if(+h[b7+(aL<<6)+32>>3]!=a7){c[b7+(aL<<6)>>2]=2;h[(c[ar>>2]|0)+(aL<<6)+16>>3]=8.988465674311579e+307;eH=c[ar>>2]|0}else{eH=b7}b7=aL+1|0;if((b7|0)<(cq|0)){aL=b7;cb=eH}else{eI=eH;break}}}else{eI=ci}bM(eI|0,cq|0,64,12);cb=c[ar>>2]|0;aL=cq;while(1){b7=aL-1|0;if((c[cb+(b7<<6)>>2]|0)==2){aL=b7}else{break}}c[aI>>2]=aL;eJ=aL}else{eJ=aJ}if((eJ|0)<4){h[J>>3]=+h[(c[ar>>2]|0)+8>>3]+ +(cr|0)*+h[7035];h[cW>>3]=-8.988465674311579e+307;h[bu>>3]=8.988465674311579e+307;eK=be;eL=bD}else{if((eJ&1|0)==0){cb=(eJ|0)/2&-1;ci=c[ar>>2]|0;eM=(+h[ci+(cb-1<<6)+16>>3]+ +h[ci+(cb<<6)+16>>3])*.5;eN=ci}else{ci=c[ar>>2]|0;eM=+h[ci+(((eJ-1|0)/2&-1)<<6)+16>>3];eN=ci}if((eJ&3|0)==0){ci=(eJ|0)/4&-1;cb=eJ-ci|0;eO=(+h[eN+(cb<<6)+16>>3]+ +h[eN+(cb-1<<6)+16>>3])*.5;eP=(+h[eN+(ci-1<<6)+16>>3]+ +h[eN+(ci<<6)+16>>3])*.5}else{ci=(eJ+3|0)/4&-1;eO=+h[eN+(eJ-ci<<6)+16>>3];eP=+h[eN+(ci-1<<6)+16>>3]}L13836:do{if((c[14062]|0)==0){a7=(eO-eP)*+h[7032];bd=eP-a7;ci=0;while(1){if((ci|0)>=(eJ|0)){eQ=bd;break}ct=+h[eN+(ci<<6)+16>>3];if(ct>3];if(cA>bd){ci=co}else{eR=eQ;eS=cA;eT=eN;break}}}else{bd=+(eJ|0);a7=+h[7032];ci=0;co=eJ-1|0;cA=be;ct=bD;cb=eN;L13846:while(1){b7=1-ci|0;ca=co;cH=cA;cC=ct;cc=cb;while(1){if(+(b7+ca|0)/bd>3];eV=+h[cc+(ci<<6)+16>>3];bE=eU-eM;cJ=eM-eV;L13851:do{if(bE>3]==+h[eN+(b9-2<<6)+16>>3]){b9=b4;b8=eN}else{eW=b4;eX=eN;break}}}}while(0);if(bE>cJ){ca=eW;cH=eV;cC=eU;cc=eX}else{break}}cc=ci+1|0;while(1){if((cc|0)>=(eW|0)){ci=cc;co=eW;cA=eV;ct=eU;cb=eX;continue L13846}ca=cc+1|0;if(+h[eX+(cc<<6)+16>>3]==+h[eX+(ca<<6)+16>>3]){cc=ca}else{ci=cc;co=eW;cA=eV;ct=eU;cb=eX;continue L13846}}}}}while(0);c[cP>>2]=0;ct=+h[eT+8>>3];if((c[cp>>2]|0)==0){h[J>>3]=(ct+ +h[eT+(eJ-1<<6)+8>>3])*.5;eY=+h[7035];eZ=+(cr|0)}else{cA=+h[7035];a7=+(cr|0);h[J>>3]=ct+a7*cA;eY=cA;eZ=a7}h[cQ>>3]=eP;h[cm>>3]=eO;h[bu>>3]=eR;h[cW>>3]=eS;h[aR>>3]=+h[eT+48>>3]+eZ*eY;h[aQ>>3]=eM;c[ar>>2]=A;c[aI>>2]=1;if((c[14068]|0)==257){f1(bv)}else{f2(bv)}c[ar>>2]=cn;c[aI>>2]=eJ;eK=eR;eL=eS}do{if((a[56264]&1)==0){e_=eJ}else{c[8240]=~~(+h[aK>>3]*+((c[(c[3524]|0)+28>>2]|0)>>>0>>>0));aL=c[aI>>2]|0;if((aL|0)>0){e$=0;e0=aL}else{e_=aL;break}while(1){aL=c[ar>>2]|0;a7=+h[aL+(e$<<6)+16>>3];if(a7<+h[bu>>3]){bt=10156}else{if(a7>+h[cW>>3]){bt=10156}else{e1=e0}}do{if((bt|0)==10156){bt=0;if((c[aL+(e$<<6)>>2]|0)!=0){e1=e0;break}cb=c[200]|0;co=~~(+(c[64768+(cb*688&-1)>>2]|0)+(+h[J>>3]- +h[64664+(cb*688&-1)>>3])*+h[64776+(cb*688&-1)>>3]+.5);cb=c[144]|0;ci=~~(+(c[64768+(cb*688&-1)>>2]|0)+(a7- +h[64664+(cb*688&-1)>>3])*+h[64776+(cb*688&-1)>>3]+.5);if((a[54144]&1)!=0){cb=c[8240]|0;if((co|0)<(cb+(c[7938]|0)|0)){e1=e0;break}cc=c[8242]|0;if((ci|0)<(cc+(c[7940]|0)|0)){e1=e0;break}if((co|0)>((c[7939]|0)-cb|0)){e1=e0;break}if((ci|0)>((c[7941]|0)-cc|0)){e1=e0;break}}L13885:do{if((e$|0)<1){e2=co}else{cc=c[8240]|0;cb=1;ca=co;while(1){if(a7!=+h[aL+(e$-cb<<6)+16>>3]){e2=ca;break L13885}b7=aa((cb&1|0)==0?-cb|0:cb,cc)+ca|0;cf=cb+1|0;if((e$|0)<(cf|0)){e2=b7;break}else{cb=cf;ca=b7}}}}while(0);cR[c[(c[3524]|0)+80>>2]&127](e2,ci,c[bN>>2]|0);e1=c[aI>>2]|0}}while(0);aL=e$+1|0;if((aL|0)<(e1|0)){e$=aL;e0=e1}else{e_=e1;break}}}}while(0);aL=cr+1|0;if((aL|0)<(ch|0)){bD=eL;be=eK;cr=aL;aJ=e_}else{break}}}else if((aH|0)==352){uh(-1,108328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);break}else if((aH|0)==368){aJ=c[c[bv+224>>2]>>2]|0;cr=c[(c[3524]|0)+92>>2]|0;if((cr|0)!=0){cK[cr&63](+h[3817])}if((aJ|0)==0){break}else{e3=aJ}do{L13900:do{if((c[e3+56>>2]|0)==99){aJ=c[200]|0;be=+h[e3+24>>3];cr=c[144]|0;bD=+h[e3+32>>3];ch=~~(+(c[64768+(cr*688&-1)>>2]|0)+(bD- +h[64664+(cr*688&-1)>>3])*+h[64776+(cr*688&-1)>>3]+.5);cr=~~(+(c[64768+(aJ*688&-1)>>2]|0)+(be- +h[64664+(aJ*688&-1)>>3])*+h[64776+(aJ*688&-1)>>3]+.5);aJ=c[e3+8>>2]|0;do{if((aJ|0)==0){cF=+h[8255];cs=+h[8256];if(cFcs){break L13900}else{break}}else{if(becF){break L13900}else{break}}}else if((aJ|0)==1){cF=+h[8599];cs=+h[8600];if(cFcs){break L13900}else{break}}else{if(becF){break L13900}else{break}}}}while(0);aJ=c[e3+12>>2]|0;do{if((aJ|0)==0){be=+h[8169];cF=+h[8170];if(becF){break L13900}else{break}}else{if(bDbe){break L13900}else{break}}}else if((aJ|0)==1){be=+h[8513];cF=+h[8514];if(becF){break L13900}else{break}}else{if(bDbe){break L13900}else{break}}}}while(0);fp(cr,ch,e3)}}while(0);e3=c[e3>>2]|0;}while((e3|0)!=0)}else if((aH|0)==400){c[bv+228>>2]=0;f3(bv,0);break}else if((aH|0)==416){c[bv+228>>2]=1;f3(bv,0);break}else if((aH|0)==432){c[bv+228>>2]=2;f3(bv,0);break}else if((aH|0)==457){aJ=bv+192|0;aI=c[aJ>>2]|0;if((aI|0)==1|(aI|0)==4){e4=(c[bv+196>>2]<<4&65520)+aI|0}else if((aI|0)==2|(aI|0)==5){e4=(c[bv+200>>2]<<4&65520)+aI|0}else{e4=0}if((c[bv+208>>2]|0)==1){if((c[bv+212>>2]|0)==-3){e5=0}else{bt=10198}}else{bt=10198}if((bt|0)==10198){bt=0;e5=1}aI=bv+300|0;if((c[aI>>2]|0)<=0){break}bN=bv+320|0;ar=bv+316|0;aK=e5^1;cn=bv+24|0;cq=bv+48|0;bj=0;do{cd=c[bN>>2]|0;do{if((c[cd+(bj<<6)>>2]|0)==0){aM=c[200]|0;bD=+(c[64768+(aM*688&-1)>>2]|0);be=+h[64664+(aM*688&-1)>>3];cF=+h[64776+(aM*688&-1)>>3];aM=~~(bD+(+h[cd+(bj<<6)+8>>3]-be)*cF+.5);cg=c[144]|0;aL=~~(+(c[64768+(cg*688&-1)>>2]|0)+(+h[cd+(bj<<6)+16>>3]- +h[64664+(cg*688&-1)>>3])*+h[64776+(cg*688&-1)>>3]+.5);h[y>>3]=+(aM-~~(bD+cF*(+h[cd+(bj<<6)+48>>3]-be)+.5)|0);if(+h[cd+(bj<<6)+24>>3]==-1.0){fN(50952,y,z,184696);e6=c[bN>>2]|0}else{e6=cd}be=+h[e6+(bj<<6)+32>>3];cF=+h[e6+(bj<<6)+56>>3];do{if(!(f9(bv,(c[ar>>2]|0)+(bj<<3)|0)|aK)){c[cw>>2]=c[bm>>2];c[cw+4>>2]=c[bm+4>>2];c[cw+8>>2]=c[bm+8>>2];c[cw+12>>2]=c[bm+12>>2];cg=c[cu>>2]|0;do{if((c[cn>>2]|0)!=0){bD=+h[cq>>3];co=c[(c[3524]|0)+92>>2]|0;if(bD<0.0){cK[co&63](+h[3817]);break}else{cK[co&63](bD);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[aP>>3]);co=c[(c[3524]|0)+64>>2]|0;if((cg|0)<-5){cM[co&511](-2)}else{cM[co&511](cg)}co=c[3524]|0;if((a[cx]&1)==0){if((c[co+96>>2]&1024|0)!=0){break}c[cU>>2]=1;c[bz>>2]=cg}fn(x,co)}}while(0);bD=+h[y>>3];lq(aM,aL,bD,be,cF,e4);if(!e5){break}hG(aJ);lq(aM,aL,bD,be,cF,0)}}while(0);bj=bj+1|0;}while((bj|0)<(c[aI>>2]|0))}else if((aH|0)==489){aI=ut(96)|0;if((aI|0)==0){gk();bj=ut(96)|0;if((bj|0)==0){bt=10221;break L13212}else{e7=bj}}else{e7=aI}aI=e7;bj=bv+192|0;aJ=c[bj>>2]|0;if((aJ|0)==1|(aJ|0)==4){e8=(c[bv+196>>2]<<4&65520)+aJ|0}else if((aJ|0)==2|(aJ|0)==5){e8=(c[bv+200>>2]<<4&65520)+aJ|0}else{e8=0}if((c[bv+208>>2]|0)==1){if((c[bv+212>>2]|0)==-3){e9=0}else{bt=10227}}else{bt=10227}if((bt|0)==10227){bt=0;e9=1}aJ=e7+48|0;cq=aJ;c[aJ>>2]=(c[cl>>2]|0)==6&1;c[e7+52>>2]=(c[ap>>2]|0)==5&1;aJ=e7;c[aJ>>2]=c[bv+272>>2];cn=bv+300|0;if((c[cn>>2]|0)>0){aK=bv+320|0;ar=e7+24|0;bN=e7+32|0;cd=e7+64|0;ch=e7+72|0;cr=e7+88|0;co=bv+316|0;ca=e9^1;cb=bv+24|0;cc=bv+48|0;b7=0;do{cf=c[aK>>2]|0;do{if((c[cf+(b7<<6)>>2]|0)==0){b8=c[200]|0;h[ar>>3]=+(~~(+(c[64768+(b8*688&-1)>>2]|0)+(+h[cf+(b7<<6)+8>>3]- +h[64664+(b8*688&-1)>>3])*+h[64776+(b8*688&-1)>>3]+.5)|0);b8=c[144]|0;h[bN>>3]=+(~~(+(c[64768+(b8*688&-1)>>2]|0)+(+h[(c[aK>>2]|0)+(b7<<6)+16>>3]- +h[64664+(b8*688&-1)>>3])*+h[64776+(b8*688&-1)>>3]+.5)|0);h[cd>>3]=+h[(c[aK>>2]|0)+(b7<<6)+48>>3];h[ch>>3]=+h[(c[aK>>2]|0)+(b7<<6)+56>>3];b8=c[aJ>>2]|0;if((b8|0)==0){fN(cq,u,w,73152);h[cd>>3]=+h[u>>3];h[ch>>3]=+h[w>>3]}else if((b8|0)==1){fN(cq,u,w,73152);bD=+h[u>>3];h[cd>>3]=+h[ch>>3];fN(cq,w,u,73152);h[cd>>3]=bD;h[ch>>3]=+h[w>>3]}else if((b8|0)==2){fN(cq,u,w,73152);bD=+h[w>>3];h[ch>>3]=+h[cd>>3];fN(cq,w,u,73152);h[cd>>3]=+h[u>>3];h[ch>>3]=bD}b8=c[aK>>2]|0;bD=+h[b8+(b7<<6)+24>>3];if(bD>-1.0){fa=b8;fb=bD}else{fN(49672,cd,ch,73152);b8=c[aK>>2]|0;fa=b8;fb=+h[b8+(b7<<6)+24>>3]}if(fb==-2.0){fc=49712}else{fc=fa+(b7<<6)+32|0}h[cr>>3]=+h[fc>>3];do{if(!(f9(bv,(c[co>>2]|0)+(b7<<3)|0)|ca)){c[cT>>2]=c[bm>>2];c[cT+4>>2]=c[bm+4>>2];c[cT+8>>2]=c[bm+8>>2];c[cT+12>>2]=c[bm+12>>2];b8=c[cu>>2]|0;do{if((c[cb>>2]|0)!=0){bD=+h[cc>>3];b9=c[(c[3524]|0)+92>>2]|0;if(bD<0.0){cK[b9&63](+h[3817]);break}else{cK[b9&63](bD);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[aP>>3]);cg=c[(c[3524]|0)+64>>2]|0;if((b8|0)<-5){cM[cg&511](-2)}else{cM[cg&511](b8)}cg=c[3524]|0;if((a[cx]&1)==0){if((c[cg+96>>2]&1024|0)!=0){break}c[bA>>2]=1;c[cE>>2]=b8}fn(t,cg)}}while(0);fP(2,aI,e8,0);if(!e9){break}hG(bj);fP(2,aI,0,0)}}while(0);b7=b7+1|0;}while((b7|0)<(c[cn>>2]|0))}uu(e7);break}else{break}}}while(0);do{if(((a[36228]&1)==0|bK)&c7){if((c[bv+16>>2]|0)==0){fd=c8;break}if((a[bv+22|0]&1)!=0){fd=c8;break}ap=c[aO>>2]|0;if((ap|0)==51){do{if((c[bv+36>>2]|0)<0){cl=c[a3>>2]|0;if((cl|0)!=0){cM[cl&511](56688)}cK[c[a2>>2]&63](+h[3817]*+h[3818]);cR[c[a_>>2]&127]((c[9016]|0)+(c[aS>>2]|0)|0,c[aT>>2]|0,6);c[aY>>2]=c[bm>>2];c[aY+4>>2]=c[bm+4>>2];c[aY+8>>2]=c[bm+8>>2];c[aY+12>>2]=c[bm+12>>2];cl=c[cu>>2]|0;do{if((c[aq>>2]|0)!=0){cF=+h[bv+48>>3];cp=c[(c[3524]|0)+92>>2]|0;if(cF<0.0){cK[cp&63](+h[3817]);break}else{cK[cp&63](cF);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[aP>>3]);cp=c[(c[3524]|0)+64>>2]|0;if((cl|0)<-5){cM[cp&511](-2)}else{cM[cp&511](cl)}cp=c[3524]|0;if((a[cx]&1)==0){if((c[cp+96>>2]&1024|0)!=0){break}c[aZ>>2]=1;c[aX>>2]=cl}fn(s,cp)}}while(0);fe=c[aO>>2]|0}else{fe=ap}do{if((fe|0)==64){cp=(c[9016]|0)+(c[aS>>2]|0)|0;cn=c[aT>>2]|0;b7=c[3524]|0;if((c[b7+96>>2]&128|0)==0){if((cp|0)<=0){break}if(!((c[b7+8>>2]|0)>>>0>cp>>>0&(cn|0)>0)){break}if((c[b7+12>>2]|0)>>>0<=cn>>>0){break}}cR[c[a_>>2]&127](cp,cn,-1)}else if((fe|0)!=474){if((fe&2|0)==0){break}if(+h[bv+48>>3]==-3.0){cK[c[a2>>2]&63](+h[3817])}cM[c[a0>>2]&511](8);cn=(c[9016]|0)+(c[aS>>2]|0)|0;cp=c[aT>>2]|0;b7=c[3524]|0;do{if((c[b7+96>>2]&128|0)==0){if((cn|0)<=0){break}if(!((c[b7+8>>2]|0)>>>0>cn>>>0&(cp|0)>0)){break}if((c[b7+12>>2]|0)>>>0>cp>>>0){bt=10287}}else{bt=10287}}while(0);if((bt|0)==10287){bt=0;cR[c[a_>>2]&127](cn,cp,c[bv+32>>2]|0)}cM[c[a0>>2]&511](9)}}while(0);if((a[36230]&1)!=0){c[aT>>2]=(((c[54]|0)+(c[9336]|0)|0)+((c[9020]|0)/2&-1)|0)-(c[aT>>2]|0)}if((c8|0)<(c[9012]|0)){c[aT>>2]=(c[aT>>2]|0)-(c[9020]|0);fd=c8;break}else{c[aT>>2]=c[54];c[aS>>2]=(c[aS>>2]|0)+(c[9026]|0);fd=0;break}}else{fd=c8}}while(0);cM[c[(c[3524]|0)+168>>2]&511](7);cx=bl+1|0;aP=a[35184]|0;if((cx|0)<(d|0)){bH=c[aO>>2]|0;bq=fd;bv=c[bv>>2]|0;bl=cx;bJ=aP}else{ff=fd;fg=aP;break}}}else{ff=bB;fg=bk}if((fg&1)==0){bt=10298;break}if((a[36228]&1)==0|bK){bt=10298;break}fW(1,aS,aT);bB=ff;bK=1}if((bt|0)==9914){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=142288,v)|0)}else if((bt|0)==10221){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=148064,v)|0)}else if((bt|0)==10298){if((c[10026]|0)==1){fT()}do{if((a[30528]&1)!=0){if((a[27776]&1)==0){break}uD(r|0,31816,272);bK=c[200]|0;fb=+(c[64768+(bK*688&-1)>>2]|0);eK=+h[64664+(bK*688&-1)>>3];eL=+h[64776+(bK*688&-1)>>3];bK=~~(fb+(0.0-eK)*eL+.5);ff=c[144]|0;bB=~~(+(c[64768+(ff*688&-1)>>2]|0)+(0.0- +h[64664+(ff*688&-1)>>3])*+h[64776+(ff*688&-1)>>3]+.5);eS=(c[17366]&2|0)==0?+h[8688]:+h[8686];if((a[69604]&1)==0){fh=+h[8687];fi=eS}else{eR=+_(+eS);eS=+h[8702];fh=+_(+(+h[8687]))/eS;fi=eR/eS}ff=~~(fb+eL*(fi-fh-eK)+.5);aT=q;c[aT>>2]=c[14084];c[aT+4>>2]=c[56340>>2];c[aT+8>>2]=c[56344>>2];c[aT+12>>2]=c[56348>>2];aT=c[14075]|0;do{if((c[14074]|0)!=0){eK=+h[7040];aS=c[(c[3524]|0)+92>>2]|0;if(eK<0.0){cK[aS&63](+h[3817]);break}else{cK[aS&63](eK);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);bk=c[(c[3524]|0)+64>>2]|0;if((aT|0)<-5){cM[bk&511](-2)}else{cM[bk&511](aT)}bk=c[3524]|0;do{if((a[56328]&1)==0){if((c[bk+96>>2]&1024|0)!=0){fj=bk;break}c[q>>2]=1;c[q+4>>2]=aT;bt=10315}else{bt=10315}}while(0);if((bt|0)==10315){fn(q,bk);fj=c[3524]|0}c[m>>2]=bK;c[n>>2]=bB;c[o>>2]=ff;c[p>>2]=bB;if((fl(m,n,o,p)|0)!=0){cN[c[fj+56>>2]&255](c[m>>2]|0,c[n>>2]|0);cN[c[fj+60>>2]&255](c[o>>2]|0,c[p>>2]|0)}if(!((c[17366]&1|0)==0&+h[8687]!=0.0)){break}fO(r,1,2)}}while(0);if((c[10026]|0)==1){c[200]=2;c[144]=1;dg(2,1);dg(1,2);c[200]=6;c[144]=5;dg(6,5);dg(5,6)}if((c[11692]|0)!=0&(c[14088]|0)==1){fU()}do{if(a[31104]&(a[54016]|0)!=110){if(!((c[(c[3524]|0)+144>>2]|0)!=0&(c[13506]|0)==1)){break}dD(1)}}while(0);fO(c[10818]|0,1,2);r=c[10822]|0;p=c[(c[3524]|0)+92>>2]|0;if((p|0)!=0){cK[p&63](+h[3817])}if((r|0)!=0){p=r;do{if((c[p+56>>2]|0)==1){fR(p+8|0,k,l,202256);fp(~~+h[k>>3],~~+h[l>>3],p)}p=c[p>>2]|0;}while((p|0)!=0)}p=c[9682]|0;if((p|0)!=0){l=p;do{p=l+116|0;k=c[p>>2]|0;do{if((k|0)!=0){if((a[k]|0)==0){break}fN(38880,f,j,149952);r=c[200]|0;o=~~(+(c[64768+(r*688&-1)>>2]|0)+ +h[64776+(r*688&-1)>>3]*((+h[l+16>>3]+ +h[l+24>>3])*.5- +h[64664+(r*688&-1)>>3])+.5)+~~+h[f>>3]|0;r=c[3524]|0;fj=~~(+((c[190]|0)>>>0>>>0)+(+(~~+h[j>>3]|0)+ +((c[r+16>>2]|0)>>>0>>>0)*.25));n=l+128|0;fn(n,r);ln(o,fj,c[p>>2]|0,1,2,0,c[l+120>>2]|0);if((c[n>>2]|0)==0){break}cM[c[(c[3524]|0)+64>>2]&511](-2)}}while(0);l=c[l+48>>2]|0;}while((l|0)!=0)}fV(1);if(!(a[31104]|0)){lh();i=e;return}l=c[(c[3524]|0)+140>>2]|0;if((l|0)==0){lh();i=e;return}cS[l&511]();lh();i=e;return}}function fT(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0.0,r=0.0,s=0.0;b=i;i=i+64|0;d=b|0;e=b+8|0;f=b+16|0;g=b+24|0;j=b+32|0;k=b+48|0;l=c[3524]|0;m=k;c[m>>2]=c[14084];c[m+4>>2]=c[56340>>2];c[m+8>>2]=c[56344>>2];c[m+12>>2]=c[56348>>2];m=c[14075]|0;do{if((c[14074]|0)!=0){n=+h[7040];o=c[l+92>>2]|0;if(n<0.0){cK[o&63](+h[3817]);break}else{cK[o&63](n);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);o=c[(c[3524]|0)+64>>2]|0;if((m|0)<-5){cM[o&511](-2)}else{cM[o&511](m)}o=c[3524]|0;do{if((a[56328]&1)==0){if((c[o+96>>2]&1024|0)!=0){break}c[k>>2]=1;c[k+4>>2]=m;p=10357}else{p=10357}}while(0);if((p|0)==10357){fn(k,o)}h[4483]=0.0;c[200]=2;c[144]=1;df(1,144,2,4);df(2,704,1,2);c[200]=6;c[144]=5;df(5,584,6,4);df(6,816,5,2);c[200]=2;c[144]=1;if(!((a[30528]&1)==0|(c[17433]|0)==0)){o=~~(+(c[16364]|0)+(0.0- +h[8169])*+h[8183]+.5);c[1394]=o;c[1396]=o;c[1392]=o-(c[l+16>>2]|0);o=c[17462]|0;c[6586]=o;do{if((o|0)==0){c[1398]=1}else{if((cO[c[l+72>>2]&255](o)|0)==0){break}c[1398]=(c[6586]|0)==-270?2:0}}while(0);if((a[70088]&1)!=0){c[1398]=c[17486]}de(7,2);o=c[l+72>>2]|0;cO[o&255](0)}if(+h[3815]==0.0){i=b;return}o=c[200]|0;l=~~(+(c[64768+(o*688&-1)>>2]|0)+(0.0- +h[64664+(o*688&-1)>>3])*+h[64776+(o*688&-1)>>3]+.5);o=c[144]|0;k=~~(+(c[64768+(o*688&-1)>>2]|0)+(0.0- +h[64664+(o*688&-1)>>3])*+h[64776+(o*688&-1)>>3]+.5);o=j;c[o>>2]=c[10022];c[o+4>>2]=c[40092>>2];c[o+8>>2]=c[40096>>2];c[o+12>>2]=c[40100>>2];o=c[10013]|0;do{if((c[10012]|0)!=0){n=+h[5009];m=c[(c[3524]|0)+92>>2]|0;if(n<0.0){cK[m&63](+h[3817]);break}else{cK[m&63](n);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[5008]);m=c[(c[3524]|0)+64>>2]|0;if((o|0)<-5){cM[m&511](-2)}else{cM[m&511](o)}m=c[3524]|0;do{if((a[40080]&1)==0){if((c[m+96>>2]&1024|0)!=0){break}c[j>>2]=1;c[j+4>>2]=o;p=10377}else{p=10377}}while(0);if((p|0)==10377){fn(j,m)}n=0.0;while(1){m=c[200]|0;q=+(c[64768+(m*688&-1)>>2]|0);r=+h[4483];s=r*+S(+n);j=~~(q+(s- +h[64664+(m*688&-1)>>3])*+h[64776+(m*688&-1)>>3]+.5);m=c[144]|0;s=+(c[64768+(m*688&-1)>>2]|0);q=r*+T(+n);p=~~(s+(q- +h[64664+(m*688&-1)>>3])*+h[64776+(m*688&-1)>>3]+.5);c[d>>2]=l;c[e>>2]=k;c[f>>2]=j;c[g>>2]=p;p=c[3524]|0;if((fl(d,e,f,g)|0)!=0){cN[c[p+56>>2]&255](c[d>>2]|0,c[e>>2]|0);cN[c[p+60>>2]&255](c[f>>2]|0,c[g>>2]|0)}if(n>=6.29){break}n=n+ +h[3815]}i=b;return}function fU(){var b=0,d=0,e=0,f=0.0,g=0,j=0,k=0.0,l=0.0;b=i;i=i+16|0;d=b|0;e=d;c[e>>2]=c[14084];c[e+4>>2]=c[56340>>2];c[e+8>>2]=c[56344>>2];c[e+12>>2]=c[56348>>2];e=c[14075]|0;do{if((c[14074]|0)!=0){f=+h[7040];g=c[(c[3524]|0)+92>>2]|0;if(f<0.0){cK[g&63](+h[3817]);break}else{cK[g&63](f);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);g=c[(c[3524]|0)+64>>2]|0;if((e|0)<-5){cM[g&511](-2)}else{cM[g&511](e)}g=c[3524]|0;do{if((a[56328]&1)==0){if((c[g+96>>2]&1024|0)!=0){break}c[d>>2]=1;c[d+4>>2]=e;j=10396}else{j=10396}}while(0);if((j|0)==10396){fn(d,g)}do{if((c[11692]&15|0)==15){g=c[(c[3524]|0)+172>>2]|0;if((g|0)==0){break}cM[g&511](0)}}while(0);cN[c[(c[3524]|0)+56>>2]&255](c[7938]|0,c[7941]|0);do{if((c[11692]&2|0)==0){cN[c[(c[3524]|0)+56>>2]&255](c[7938]|0,c[7940]|0)}else{if((a[65712]&1)==0){cN[c[(c[3524]|0)+60>>2]&255](c[7938]|0,c[7940]|0);break}else{f=+(c[16364]|0);k=+h[8169];l=+h[8183];g=~~(f+l*(+h[8175]-k)+.5);cN[c[(c[3524]|0)+56>>2]&255](c[7938]|0,~~(f+(+h[8176]-k)*l+.5));cN[c[(c[3524]|0)+60>>2]&255](c[7938]|0,g);cN[c[(c[3524]|0)+56>>2]&255](c[7938]|0,c[7940]|0);break}}}while(0);do{if((c[11692]&1|0)==0){cN[c[(c[3524]|0)+56>>2]&255](c[7939]|0,c[7940]|0)}else{if((a[66400]&1)==0){cN[c[(c[3524]|0)+60>>2]&255](c[7939]|0,c[7940]|0);break}else{l=+(c[16536]|0);k=+h[8255];f=+h[8269];g=~~(l+(+h[8262]-k)*f+.5);cN[c[(c[3524]|0)+56>>2]&255](~~(l+f*(+h[8261]-k)+.5),c[7940]|0);cN[c[(c[3524]|0)+60>>2]&255](g,c[7940]|0);cN[c[(c[3524]|0)+56>>2]&255](c[7939]|0,c[7940]|0);break}}}while(0);do{if((c[11692]&8|0)==0){cN[c[(c[3524]|0)+56>>2]&255](c[7939]|0,c[7941]|0)}else{if((a[68464]&1)==0){cN[c[(c[3524]|0)+60>>2]&255](c[7939]|0,c[7941]|0);break}else{k=+(c[17052]|0);f=+h[8513];l=+h[8527];g=~~(k+l*(+h[8519]-f)+.5);cN[c[(c[3524]|0)+56>>2]&255](c[7939]|0,~~(k+(+h[8520]-f)*l+.5));cN[c[(c[3524]|0)+60>>2]&255](c[7939]|0,g);cN[c[(c[3524]|0)+56>>2]&255](c[7939]|0,c[7940]|0);break}}}while(0);do{if((c[11692]&4|0)==0){cN[c[(c[3524]|0)+56>>2]&255](c[7938]|0,c[7941]|0)}else{if((a[69152]&1)==0){cN[c[(c[3524]|0)+60>>2]&255](c[7938]|0,c[7941]|0);break}else{l=+(c[17224]|0);f=+h[8599];k=+h[8613];g=~~(l+(+h[8606]-f)*k+.5);cN[c[(c[3524]|0)+56>>2]&255](~~(l+k*(+h[8605]-f)+.5),c[7941]|0);cN[c[(c[3524]|0)+60>>2]&255](g,c[7941]|0);cN[c[(c[3524]|0)+56>>2]&255](c[7939]|0,c[7941]|0);break}}}while(0);if((c[11692]&15|0)!=15){i=b;return}g=c[(c[3524]|0)+172>>2]|0;if((g|0)==0){i=b;return}cM[g&511](1);i=b;return}function fV(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0,D=0,E=0.0,F=0.0,G=0,H=0,I=0,J=0;d=i;i=i+120|0;e=d|0;f=d+16|0;g=d+24|0;j=d+32|0;k=d+72|0;l=d+88|0;m=d+96|0;n=d+104|0;o=d+112|0;p=c[13542]|0;c[13542]=(c[(c[3524]|0)+96>>2]&128|0)==0?55520:0;q=c[10826]|0;if((q|0)!=0){r=k;s=k|0;t=k+4|0;u=j;v=j+4|0;w=j+8|0;x=j+16|0;y=j|0;z=q;do{if((c[z+100>>2]|0)==(b|0)){fR(z+8|0,l,m,123984);A=+h[l>>3];q=~~A;B=+h[m>>3];C=~~B;D=z+48|0;if((a[z+88|0]&1)==0){fR(D,n,o,123984);E=+h[o>>3];F=+h[n>>3]}else{fN(D,n,o,123984);E=B+ +h[o>>3];F=A+ +h[n>>3]}D=~~F;G=~~E;H=z+144|0;c[r>>2]=c[H>>2];c[r+4>>2]=c[H+4>>2];c[r+8>>2]=c[H+8>>2];c[r+12>>2]=c[H+12>>2];H=c[z+108>>2]|0;do{if((c[z+104>>2]|0)!=0){A=+h[z+128>>3];I=c[(c[3524]|0)+92>>2]|0;if(A<0.0){cK[I&63](+h[3817]);break}else{cK[I&63](A);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[z+120>>3]);I=c[(c[3524]|0)+64>>2]|0;if((H|0)<-5){cM[I&511](-2)}else{cM[I&511](H)}I=c[3524]|0;do{if((a[z+136|0]&1)==0){if((c[I+96>>2]&1024|0)!=0){break}c[s>>2]=1;c[t>>2]=H;J=10443}else{J=10443}}while(0);if((J|0)==10443){J=0;fn(k,I)}c[12912]=c[z+200>>2];c[12910]=0;A=+h[z+168>>3];if(A>0.0){uE(u|0,0,40);c[v>>2]=2;c[w>>2]=2;h[x>>3]=A;c[y>>2]=c[z+176>>2];fN(j,f,g,123984);h[6458]=+h[z+184>>3];h[6457]=+h[z+192>>3];c[12910]=~~+h[f>>3]}fm(q,C,D,G,c[z+160>>2]|0)}z=c[z>>2]|0;}while((z|0)!=0)}z=e;c[z>>2]=c[14084];c[z+4>>2]=c[56340>>2];c[z+8>>2]=c[56344>>2];c[z+12>>2]=c[56348>>2];z=c[14075]|0;do{if((c[14074]|0)!=0){E=+h[7040];f=c[(c[3524]|0)+92>>2]|0;if(E<0.0){cK[f&63](+h[3817]);break}else{cK[f&63](E);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);f=c[(c[3524]|0)+64>>2]|0;if((z|0)<-5){cM[f&511](-2)}else{cM[f&511](z)}f=c[3524]|0;do{if((a[56328]&1)==0){if((c[f+96>>2]&1024|0)==0){c[e>>2]=1;c[e+4>>2]=z;break}else{c[13542]=p;i=d;return}}}while(0);fn(e,f);c[13542]=p;i=d;return}function fW(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0.0,K=0.0,L=0,M=0,N=0,O=0,P=0.0,Q=0,R=0,S=0.0,T=0,U=0;f=i;i=i+176|0;g=f|0;j=f+8|0;k=f+16|0;l=f+24|0;m=f+32|0;n=f+40|0;o=f+48|0;p=f+56|0;q=f+64|0;r=f+72|0;s=f+80|0;t=f+88|0;u=f+96|0;v=f+104|0;w=f+112|0;x=f+120|0;y=f+128|0;z=f+136|0;A=f+144|0;B=f+152|0;C=f+160|0;D=c[3524]|0;E=(c[8996]|0)+(c[9334]|0)|0;F=c[9337]|0;do{if(b){G=D+108|0;if((c[G>>2]|0)==0){break}H=c[9336]|0;if((a[36288]|0)==0){I=H}else{do{if((c[D+96>>2]&32|0)==0){J=0.0}else{K=(a8(36288,94)|0)==0?0.0:.51;if((a8(36288,95)|0)==0){J=K;break}J=K+.3}}while(0);I=~~(+(H|0)-J*+((c[D+16>>2]|0)>>>0>>>0))}cM[c[D+144>>2]&511](56688);L=c[9334]|0;cI[c[G>>2]&63](1601,L,I,(c[9335]|0)-L|0,(c[9337]|0)-I|0)}}while(0);if((a[36288]|0)==0){M=F;N=c[D+16>>2]|0}else{I=((c[9335]|0)+(c[9334]|0)|0)/2&-1;L=D+96|0;O=c[L>>2]|0;if((O&32|0)==0){P=0.0}else{P=(a8(36288,94)|0)==0?0.0:.51}if(b){Q=10476}else{if((a[36228]&1)==0){Q=10476}else{R=O}}if((Q|0)==10476){if((c[9330]|0)==3&+h[4666]<0.0){fn(36272,D)}else{fn(37320,D)}ln(I,~~(+(F|0)-(P*.5+.5)*+((c[D+16>>2]|0)>>>0>>>0)),36288,1,0,0,c[9329]|0);cM[c[D+64>>2]&511](-2);R=c[L>>2]|0}do{if((R&32|0)==0){S=P}else{if((a8(36288,95)|0)==0){S=P;break}S=P+.3}}while(0);P=S+ +h[4488];h[4488]=P;R=D+16|0;c[9336]=~~(+(c[9336]|0)-S*+((c[R>>2]|0)>>>0>>>0));L=c[R>>2]|0;M=~~(+(F|0)- +(L>>>0>>>0)*P);N=L}L=D+16|0;D=(M-~~(+h[4527]*.5*+(N>>>0>>>0))|0)+((c[9020]|0)/-2&-1)|0;c[54]=D;N=c[9059]|0;if((N|0)<=-3){c[d>>2]=E;c[e>>2]=D;i=f;return}M=c[13542]|0;F=c[3524]|0;c[13542]=(c[F+96>>2]&128|0)==0?55520:0;R=C;c[R>>2]=c[9068];c[R+4>>2]=c[36276>>2];c[R+8>>2]=c[36280>>2];c[R+12>>2]=c[36284>>2];do{if((c[9058]|0)!=0){P=+h[4532];R=c[F+92>>2]|0;if(P<0.0){cK[R&63](+h[3817]);break}else{cK[R&63](P);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[4531]);F=c[(c[3524]|0)+64>>2]|0;if((N|0)<-5){cM[F&511](-2)}else{cM[F&511](N)}F=c[3524]|0;do{if((a[36264]&1)==0){if((c[F+96>>2]&1024|0)!=0){T=F;break}c[C>>2]=1;c[C+4>>2]=N;Q=10495}else{Q=10495}}while(0);if((Q|0)==10495){fn(C,F);T=c[3524]|0}F=c[T+172>>2]|0;if((F|0)==0){U=T}else{cM[F&511](0);U=c[3524]|0}F=c[9334]|0;T=c[9336]|0;C=c[9337]|0;c[y>>2]=F;c[z>>2]=T;c[A>>2]=F;c[B>>2]=C;if((fl(y,z,A,B)|0)!=0){cN[c[U+56>>2]&255](c[y>>2]|0,c[z>>2]|0);cN[c[U+60>>2]&255](c[A>>2]|0,c[B>>2]|0)}B=c[9337]|0;A=c[9335]|0;c[u>>2]=c[9334];c[v>>2]=B;c[w>>2]=A;c[x>>2]=B;B=c[3524]|0;if((fl(u,v,w,x)|0)!=0){cN[c[B+56>>2]&255](c[u>>2]|0,c[v>>2]|0);cN[c[B+60>>2]&255](c[w>>2]|0,c[x>>2]|0)}x=c[9335]|0;w=c[9337]|0;B=c[9336]|0;c[q>>2]=x;c[r>>2]=w;c[s>>2]=x;c[t>>2]=B;B=c[3524]|0;if((fl(q,r,s,t)|0)!=0){cN[c[B+56>>2]&255](c[q>>2]|0,c[r>>2]|0);cN[c[B+60>>2]&255](c[s>>2]|0,c[t>>2]|0)}t=c[9336]|0;s=c[9334]|0;c[m>>2]=c[9335];c[n>>2]=t;c[o>>2]=s;c[p>>2]=t;t=c[3524]|0;if((fl(m,n,o,p)|0)!=0){cN[c[t+56>>2]&255](c[m>>2]|0,c[n>>2]|0);cN[c[t+60>>2]&255](c[o>>2]|0,c[p>>2]|0)}p=c[(c[3524]|0)+172>>2]|0;if((p|0)!=0){cM[p&511](1)}do{if((a[36288]|0)!=0){p=~~(+(c[9337]|0)- +h[4488]*+((c[L>>2]|0)>>>0>>>0));o=c[9335]|0;c[g>>2]=c[9334];c[j>>2]=p;c[k>>2]=o;c[l>>2]=p;p=c[3524]|0;if((fl(g,j,k,l)|0)==0){break}cN[c[p+56>>2]&255](c[g>>2]|0,c[j>>2]|0);cN[c[p+60>>2]&255](c[k>>2]|0,c[l>>2]|0)}}while(0);c[13542]=M;c[d>>2]=E;c[e>>2]=D;i=f;return}function fX(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;d=i;i=i+48|0;e=d|0;f=d+8|0;g=d+16|0;j=d+32|0;k=c[3524]|0;l=b+300|0;if((c[l>>2]|0)<=0){i=d;return}m=b+316|0;n=b+320|0;o=k+56|0;p=k+60|0;k=g|0;q=j|0;r=g+8|0;g=j+8|0;j=0;s=2;do{f9(b,(c[m>>2]|0)+(j<<3)|0);t=c[n>>2]|0;u=c[t+(j<<6)>>2]|0;do{if((u|0)==0){v=c[200]|0;w=~~(+(c[64768+(v*688&-1)>>2]|0)+(+h[t+(j<<6)+8>>3]- +h[64664+(v*688&-1)>>3])*+h[64776+(v*688&-1)>>3]+.5);v=c[144]|0;x=~~(+(c[64768+(v*688&-1)>>2]|0)+(+h[t+(j<<6)+16>>3]- +h[64664+(v*688&-1)>>3])*+h[64776+(v*688&-1)>>3]+.5);if((s|0)==0){cN[c[p>>2]&255](w,x);break}else if((s|0)==1){if((a[54160]&1)==0){cN[c[o>>2]&255](w,x);break}else{gb(t,j,e,f);v=c[200]|0;y=c[144]|0;cN[c[o>>2]&255](~~(+(c[64768+(v*688&-1)>>2]|0)+(+h[e>>3]- +h[64664+(v*688&-1)>>3])*+h[64776+(v*688&-1)>>3]+.5),~~(+(c[64768+(y*688&-1)>>2]|0)+(+h[f>>3]- +h[64664+(y*688&-1)>>3])*+h[64776+(y*688&-1)>>3]+.5));cN[c[p>>2]&255](w,x);break}}else{cN[c[o>>2]&255](w,x);cN[c[p>>2]&255](w,x);break}}else if((u|0)==1){if((s|0)==0){if((a[54160]&1)==0){break}gb(t,j,e,f);x=c[200]|0;w=c[144]|0;cN[c[p>>2]&255](~~(+(c[64768+(x*688&-1)>>2]|0)+(+h[e>>3]- +h[64664+(x*688&-1)>>3])*+h[64776+(x*688&-1)>>3]+.5),~~(+(c[64768+(w*688&-1)>>2]|0)+(+h[f>>3]- +h[64664+(w*688&-1)>>3])*+h[64776+(w*688&-1)>>3]+.5));break}else if((s|0)!=1){break}if((a[54152]&1)==0){break}if(!(gc(t,j,k,q)|0)){break}w=c[200]|0;x=c[144]|0;cN[c[o>>2]&255](~~(+(c[64768+(w*688&-1)>>2]|0)+(+h[k>>3]- +h[64664+(w*688&-1)>>3])*+h[64776+(w*688&-1)>>3]+.5),~~(+(c[64768+(x*688&-1)>>2]|0)+(+h[q>>3]- +h[64664+(x*688&-1)>>3])*+h[64776+(x*688&-1)>>3]+.5));x=c[200]|0;w=c[144]|0;cN[c[p>>2]&255](~~(+(c[64768+(x*688&-1)>>2]|0)+(+h[r>>3]- +h[64664+(x*688&-1)>>3])*+h[64776+(x*688&-1)>>3]+.5),~~(+(c[64768+(w*688&-1)>>2]|0)+(+h[g>>3]- +h[64664+(w*688&-1)>>3])*+h[64776+(w*688&-1)>>3]+.5))}}while(0);s=c[(c[n>>2]|0)+(j<<6)>>2]|0;j=j+1|0;}while((j|0)<(c[l>>2]|0));i=d;return}function fY(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0.0,an=0;j=i;i=i+280|0;k=j|0;l=j+8|0;m=j+16|0;n=j+24|0;o=j+32|0;p=j+40|0;q=j+48|0;r=j+56|0;s=j+64|0;t=j+72|0;u=j+80|0;w=j+88|0;x=j+96|0;y=j+104|0;z=j+112|0;A=j+152|0;B=j+160|0;C=j+168|0;D=j+176|0;E=j+184|0;F=j+192|0;G=j+200|0;H=j+208|0;I=j+216|0;J=j+224|0;K=j+232|0;L=j+240|0;M=j+248|0;N=j+256|0;O=j+264|0;P=j+272|0;Q=c[13542]|0;c[13542]=(c[(c[3524]|0)+96>>2]&128|0)==0?55520:0;R=e+168|0;cM[c[R>>2]&511](8);S=c[9330]|0;if((S|0)==0){cM[c[e+64>>2]&511](-2)}else if((S|0)!=7){fn(37320,e)}L14405:do{if((c[9046]|0)==0){ln((c[8988]|0)+f|0,g,d,0,0,0,c[9329]|0)}else{S=(cO[c[e+76>>2]&255](2)|0)==0;T=(c[8984]|0)+f|0;if(!S){ln(T,g,d,2,0,0,c[9329]|0);break}S=c[e+20>>2]|0;U=T-aa(lp(d)|0,S)|0;do{if(((c[9031]|0)-1|0)>>>0>=2){S=c[7938]|0;T=c[7939]|0;if((S|0)<(T|0)){if((U|0)<(S|0)|(U|0)>(T|0)){break L14405}else{break}}else{if((U|0)<(T|0)|(U|0)>(S|0)){break L14405}else{break}}}}while(0);ln(U,g,d,0,0,0,c[9329]|0)}}while(0);d=e+64|0;S=b+28|0;cM[c[d>>2]&511](c[S>>2]|0);T=b+56|0;if((a[T]&1)!=0){fn(b+64|0,e)}V=b+12|0;W=c[V>>2]|0;do{if((W&8|0)==0){X=10585}else{Y=c[e+108>>2]|0;if((Y|0)==0){X=10585;break}Z=b+192|0;_=Z|0;$=c[_>>2]|0;if(($|0)==1|($|0)==4){ab=(c[b+196>>2]<<4&65520)+$|0}else if(($|0)==2|($|0)==5){ab=(c[b+200>>2]<<4&65520)+$|0}else{ab=0}$=c[9008]|0;ac=$+f|0;ad=c[9020]|0;ae=(ad|0)/4&-1;af=g-ae|0;ag=c[9004]|0;ah=ag-$|0;ai=(ad|0)/2&-1;ad=(ag|0)==($|0);if(!((W|0)!=457|ad)){lq((c[9016]|0)+f|0,g,+(ae|0),0.0,360.0,ab);break}if(!((W|0)!=489|ad)){ae=ut(96)|0;do{if((ae|0)==0){gk();$=ut(96)|0;if(($|0)!=0){aj=$;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=151888,v)|0)}else{aj=ae}}while(0);h[aj+24>>3]=+((c[9016]|0)+f|0);h[aj+32>>3]=+(g|0);h[aj+64>>3]=+((ah<<1>>>0)/3>>>0>>>0>>>0);h[aj+72>>3]=+(ai>>>0>>>0);h[aj+88>>3]=0.0;fP(2,aj,ab,0);uu(aj);break}if(ad){break}ae=(ab|0)==0;if(ae){ak=W}else{cI[Y&63](ab,ac,af,ah,ai);ak=c[V>>2]|0}do{if((ak|0)==252){if((c[b+208>>2]|0)!=1){X=10566;break}if((c[b+212>>2]|0)==-3|ae){X=10568}else{X=10567}}else{X=10566}}while(0);if((X|0)==10566){if(ae){X=10568}else{X=10567}}if((X|0)==10567){if(hG(Z)|0){X=10568}}do{if((X|0)==10568){ai=c[3524]|0;ah=c[ai+172>>2]|0;if((ah|0)==0){al=ai}else{cM[ah&511](0);al=c[3524]|0}ah=g-((c[9020]|0)/4&-1)|0;ai=(c[9004]|0)+f|0;c[M>>2]=(c[9008]|0)+f;c[N>>2]=ah;c[O>>2]=ai;c[P>>2]=ah;if((fl(M,N,O,P)|0)!=0){cN[c[al+56>>2]&255](c[M>>2]|0,c[N>>2]|0);cN[c[al+60>>2]&255](c[O>>2]|0,c[P>>2]|0)}ah=(c[9004]|0)+f|0;ai=(c[9020]|0)/4&-1;c[I>>2]=ah;c[J>>2]=g-ai;c[K>>2]=ah;c[L>>2]=ai+g;ai=c[3524]|0;if((fl(I,J,K,L)|0)!=0){cN[c[ai+56>>2]&255](c[I>>2]|0,c[J>>2]|0);cN[c[ai+60>>2]&255](c[K>>2]|0,c[L>>2]|0)}ai=((c[9020]|0)/4&-1)+g|0;ah=(c[9008]|0)+f|0;c[E>>2]=(c[9004]|0)+f;c[F>>2]=ai;c[G>>2]=ah;c[H>>2]=ai;ai=c[3524]|0;if((fl(E,F,G,H)|0)!=0){cN[c[ai+56>>2]&255](c[E>>2]|0,c[F>>2]|0);cN[c[ai+60>>2]&255](c[G>>2]|0,c[H>>2]|0)}ai=(c[9008]|0)+f|0;ah=(c[9020]|0)/4&-1;c[A>>2]=ai;c[B>>2]=ah+g;c[C>>2]=ai;c[D>>2]=g-ah;ah=c[3524]|0;if((fl(A,B,C,D)|0)!=0){cN[c[ah+56>>2]&255](c[A>>2]|0,c[B>>2]|0);cN[c[ah+60>>2]&255](c[C>>2]|0,c[D>>2]|0)}ah=c[(c[3524]|0)+172>>2]|0;if((ah|0)==0){break}cM[ah&511](1)}}while(0);Z=c[_>>2]|0;if((Z|0)==0|(Z|0)==3){break}if((c[b+208>>2]|0)==1){if((c[b+212>>2]|0)==-3){break}}cM[c[d>>2]&511](c[S>>2]|0);if((a[T]&1)==0){break}fn(b+64|0,e)}}while(0);L14473:do{if((X|0)==10585){do{if((W|0)==225){if((c[e+84>>2]|0)==0){break}c[12912]=c[b+184>>2];c[12910]=0;am=+h[b+152>>3];if(am>0.0){uE(z|0,0,40);c[z+4>>2]=2;c[z+8>>2]=2;h[z+16>>3]=am;c[z>>2]=c[b+160>>2];fN(z,x,y,123984);h[6458]=+h[b+168>>3];h[6457]=+h[b+176>>3];c[12910]=~~+h[x>>3]}c[12910]=-1;fm((c[9008]|0)+f|0,g,(c[9004]|0)+f|0,g,c[b+144>>2]|0);break L14473}else{if((W&1|0)!=0){break}if((W&4|0)==0){break L14473}if((c[b+8>>2]|0)!=1){break L14473}}}while(0);_=(c[9004]|0)+f|0;c[s>>2]=(c[9008]|0)+f;c[t>>2]=g;c[u>>2]=_;c[w>>2]=g;_=c[3524]|0;if((fl(s,t,u,w)|0)==0){break}cN[c[_+56>>2]&255](c[s>>2]|0,c[t>>2]|0);cN[c[_+60>>2]&255](c[u>>2]|0,c[w>>2]|0)}}while(0);if((c[b+8>>2]|0)!=1){an=c[R>>2]|0;cM[an&511](9);c[13542]=Q;i=j;return}b=c[V>>2]|0;if((b&4|0)==0){an=c[R>>2]|0;cM[an&511](9);c[13542]=Q;i=j;return}if(!((b|0)!=252&+h[7077]>0.0)){an=c[R>>2]|0;cM[an&511](9);c[13542]=Q;i=j;return}b=(c[9008]|0)+f|0;V=e+28|0;e=c[V>>2]|0;w=e>>>0>3?e>>>1:1;c[o>>2]=b;c[p>>2]=w+g;c[q>>2]=b;c[r>>2]=g-w;w=c[3524]|0;if((fl(o,p,q,r)|0)!=0){cN[c[w+56>>2]&255](c[o>>2]|0,c[p>>2]|0);cN[c[w+60>>2]&255](c[q>>2]|0,c[r>>2]|0)}r=(c[9004]|0)+f|0;f=c[V>>2]|0;V=f>>>0>3?f>>>1:1;c[k>>2]=r;c[l>>2]=V+g;c[m>>2]=r;c[n>>2]=g-V;V=c[3524]|0;if((fl(k,l,m,n)|0)==0){an=c[R>>2]|0;cM[an&511](9);c[13542]=Q;i=j;return}cN[c[V+56>>2]&255](c[k>>2]|0,c[l>>2]|0);cN[c[V+60>>2]&255](c[m>>2]|0,c[n>>2]|0);an=c[R>>2]|0;cM[an&511](9);c[13542]=Q;i=j;return}function fZ(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0.0;d=i;i=i+16|0;e=d|0;f=c[b+36>>2]|0;g=c[3524]|0;j=b+300|0;k=c[j>>2]|0;if((k|0)<=0){i=d;return}l=b+12|0;m=(f|0)==0;n=b+320|0;o=(f|0)<0;p=g+144|0;q=g+92|0;r=g+80|0;g=e;s=b+64|0;t=b+28|0;u=b+24|0;v=b+40|0;w=b+56|0;x=e|0;y=e+4|0;z=b+48|0;A=b+316|0;B=b+32|0;C=0;D=k;while(1){k=c[l>>2]|0;if((k|0)!=51|m){E=10612}else{if(((C|0)%(f|0)&-1|0)==0){E=10612}else{F=D}}do{if((E|0)==10612){E=0;G=c[n>>2]|0;if((c[G+(C<<6)>>2]|0)!=0){F=D;break}H=c[200]|0;I=~~(+(c[64768+(H*688&-1)>>2]|0)+(+h[G+(C<<6)+8>>3]- +h[64664+(H*688&-1)>>3])*+h[64776+(H*688&-1)>>3]+.5);H=c[144]|0;J=~~(+(c[64768+(H*688&-1)>>2]|0)+(+h[G+(C<<6)+16>>3]- +h[64664+(H*688&-1)>>3])*+h[64776+(H*688&-1)>>3]+.5);if((a[54144]&1)!=0){H=c[8240]|0;if((I|0)<(H+(c[7938]|0)|0)){F=D;break}K=c[8242]|0;if((J|0)<(K+(c[7940]|0)|0)){F=D;break}if((I|0)>((c[7939]|0)-H|0)){F=D;break}if((J|0)>((c[7941]|0)-K|0)){F=D;break}}do{if((k|0)==18|(k|0)==51){if(+h[z>>3]==-3.0){cK[c[q>>2]&63](+h[3817]*+h[G+(C<<6)+24>>3]);L=c[l>>2]|0}else{L=k}if(!((L|0)==51&o)){break}K=c[p>>2]|0;if((K|0)!=0){cM[K&511](56688)}cK[c[q>>2]&63](+h[3817]*+h[3818]);cR[c[r>>2]&127](I,J,6);c[g>>2]=c[s>>2];c[g+4>>2]=c[s+4>>2];c[g+8>>2]=c[s+8>>2];c[g+12>>2]=c[s+12>>2];K=c[t>>2]|0;do{if((c[u>>2]|0)!=0){M=+h[z>>3];H=c[(c[3524]|0)+92>>2]|0;if(M<0.0){cK[H&63](+h[3817]);break}else{cK[H&63](M);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[v>>3]);H=c[(c[3524]|0)+64>>2]|0;if((K|0)<-5){cM[H&511](-2)}else{cM[H&511](K)}H=c[3524]|0;if((a[w]&1)==0){if((c[H+96>>2]&1024|0)!=0){break}c[x>>2]=1;c[y>>2]=K}fn(e,H)}}while(0);G=(c[A>>2]|0)+(C<<3)|0;f9(b,G);cR[c[r>>2]&127](I,J,c[B>>2]|0);F=c[j>>2]|0}}while(0);k=C+1|0;if((k|0)<(F|0)){C=k;D=F}else{break}}i=d;return}function f_(b){b=b|0;var d=0,e=0,f=0.0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0,v=0.0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0,P=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0.0,_=0,$=0,ab=0.0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0.0,an=0,ao=0,ap=0.0,aq=0,ar=0,as=0,at=0,au=0,av=0.0,aw=0,ax=0,ay=0,az=0.0,aA=0,aB=0,aC=0,aD=0,aE=0.0;d=c[3524]|0;e=c[d+28>>2]|0;if(e>>>0>3){f=+(e>>>1|0)}else{f=1.0}e=b+12|0;g=c[e>>2]|0;do{if((g|0)==102|(g|0)==118|(g|0)==169|(g|0)==295|(g|0)==311|(g|0)==392|(g|0)==345){i=b+300|0;if((c[i>>2]|0)<=0){j=g;break}k=b+320|0;l=b+276|0;m=b+280|0;n=b+316|0;o=d+108|0;p=b+192|0;q=d+56|0;r=d+60|0;s=0.0;t=0;while(1){u=c[k>>2]|0;L14555:do{if((c[u+(t<<6)>>2]|0)==2){v=s}else{w=+h[u+(t<<6)+8>>3];x=c[e>>2]|0;y=(x|0)==392;if(y){z=c[l>>2]|0;A=c[9671]|0;B=A+(c[z+8>>2]|0)|0;C=aa(B-1|0,t-1|0);D=+(B|0);E=(+h[u+(t<<6)+56>>3]- +h[u+(t<<6)+48>>3])/(D*2.0);F=(+((A|0)/2&-1|0)+(w+ +(C+(c[m>>2]|0)|0)))/D+(+h[z+16>>3]+.5)}else{E=s;F=w}z=c[200]|0;w=+h[64664+(z*688&-1)>>3];D=+h[64672+(z*688&-1)>>3];C=wD){v=E;break}}else{if(Fw){v=E;break}}G=+(c[64768+(z*688&-1)>>2]|0);H=+h[64776+(z*688&-1)>>3];z=~~(G+(F-w)*H+.5);I=+h[u+(t<<6)+16>>3];A=c[144]|0;J=+h[64664+(A*688&-1)>>3];K=+h[64672+(A*688&-1)>>3];B=JK){v=E;break}}else{if(IJ){v=E;break}}L=+(c[64768+(A*688&-1)>>2]|0);M=+h[64776+(A*688&-1)>>3];A=~~(L+(I-J)*M+.5);I=+h[u+(t<<6)+40>>3];N=+h[u+(t<<6)+32>>3];do{if(B){if(I>3];Z=+h[u+(t<<6)+48>>3];do{if(y){ac=~~(G+(F-E-w)*H+.5);ad=~~(G+(F+E-w)*H+.5)}else{do{if(C){if(I>2]|0)+(t<<3)|0;f9(b,B);if((c[e>>2]|0)!=169){ac=ao;ad=an;break}if((c[o>>2]|0)==0){ac=ao;ad=an;break}hG(p);ac=ao;ad=an}}while(0);if((a[30528]&1)==0){cN[c[q>>2]&255](z,_);cN[c[r>>2]&255](z,$);H=+h[7077];if(H<0.0){cN[c[q>>2]&255](ac,_);cN[c[r>>2]&255](ad,_);cN[c[q>>2]&255](ac,$);cN[c[r>>2]&255](ad,$);v=E;break}if(H<=0.0){v=E;break}G=+(z>>>0>>>0);cN[c[q>>2]&255](~~(G-f*H),_);cN[c[r>>2]&255](~~(G+f*+h[7077]),_);cN[c[q>>2]&255](~~(G-f*+h[7077]),$);cN[c[r>>2]&255](~~(G+f*+h[7077]),$);v=E;break}x=ad-ac|0;C=aa(x,x);x=$-_|0;G=+((C+aa(x,x)|0)>>>0>>>0);H=+h[3817];if(G<=f*H*f*H*4.5){v=E;break}x=c[q>>2]|0;if((ac|0)==(ad|0)){cN[x&255](z,_);H=+(A>>>0>>>0);cN[c[r>>2]&255](z,~~(H-f*+h[3817]));cN[c[q>>2]&255](z,~~(H+f*+h[3817]));cN[c[r>>2]&255](z,$)}else{cN[x&255](ac,_);cN[c[r>>2]&255](ad,$)}H=+h[7077];if(H<=0.0){v=E;break}G=+(ac>>>0>>>0);w=+(ad>>>0>>>0);D=+($>>>0>>>0);Z=+(_>>>0>>>0);I=(G-w)/(D-Z+1.0e-10);M=+Q(+(I*I+1.0));L=f*H/M;H=G+L;J=G-L;cN[c[q>>2]&255](~~H,~~(Z+I*(H-G)));cN[c[r>>2]&255](~~J,~~(Z+I*(J-G)));G=f*+h[7077]/M;M=w+G;J=w-G;cN[c[q>>2]&255](~~M,~~(D+I*(M-w)));cN[c[r>>2]&255](~~J,~~(D+I*(J-w)));v=E}}while(0);u=t+1|0;if((u|0)<(c[i>>2]|0)){s=v;t=u}else{break}}j=c[e>>2]|0}else{j=g}}while(0);if(!((j|0)==86|(j|0)==118|(j|0)==279|(j|0)==311)){return}j=b+300|0;if((c[j>>2]|0)<=0){return}g=b+320|0;e=b+316|0;_=d+56|0;$=d+60|0;d=0;do{ad=c[g>>2]|0;do{if((c[ad+(d<<6)>>2]|0)!=2){v=+h[ad+(d<<6)+16>>3];ac=c[144]|0;E=+h[64664+(ac*688&-1)>>3];ap=+h[64672+(ac*688&-1)>>3];if(Eap){break}}else{if(vE){break}}an=~~(+(c[64768+(ac*688&-1)>>2]|0)+(v-E)*+h[64776+(ac*688&-1)>>3]+.5);E=+h[ad+(d<<6)+56>>3];v=+h[ad+(d<<6)+48>>3];ac=c[200]|0;ap=+h[64664+(ac*688&-1)>>3];F=+h[64672+(ac*688&-1)>>3];do{if(ap>2]|0;ab=+h[64776+(ac*688&-1)>>3];ak=~~(+(ao|0)+(E-ap)*ab+.5);if(as){av=ab;aw=ao;ax=ak;R=10732}else{ay=0;az=ab;aA=ao;aB=ak;R=10733}}else if((R|0)==10729){R=0;ab=F-ap;ak=c[64768+(ac*688&-1)>>2]|0;s=+(ak|0);if((E-F)*ab<0.0){w=+h[64776+(ac*688&-1)>>3];ao=~~(s+(ap-ap)*w+.5);if(at){av=w;aw=ak;ax=ao;R=10732;break}else{ay=1;az=w;aA=ak;aB=ao;R=10733;break}}else{w=+h[64776+(ac*688&-1)>>3];ao=~~(s+ab*w+.5);if(at){av=w;aw=ak;ax=ao;R=10732;break}else{ay=1;az=w;aA=ak;aB=ao;R=10733;break}}}}while(0);if((R|0)==10732){R=0;aC=~~(+(aw|0)+(v-ap)*av+.5);aD=ax}else if((R|0)==10733){R=0;E=F-ap;if((v-F)*E<0.0){aE=ap-ap}else{aE=E}ac=~~(+(aA|0)+aE*az+.5);if((ac|0)==(aB|0)&ay){break}else{aC=ac;aD=aB}}ac=(c[e>>2]|0)+(d<<3)|0;f9(b,ac);cN[c[_>>2]&255](aC,an);cN[c[$>>2]&255](aD,an);E=+h[7077];if(E<=0.0){break}w=+(an>>>0>>>0);cN[c[_>>2]&255](aC,~~(w-f*E));cN[c[$>>2]&255](aC,~~(w+f*+h[7077]));cN[c[_>>2]&255](aD,~~(w-f*+h[7077]));cN[c[$>>2]&255](aD,~~(w+f*+h[7077]))}}while(0);d=d+1|0;}while((d|0)<(c[j>>2]|0));return}function f$(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0,Y=0.0,Z=0.0,_=0,$=0.0,ab=0.0,ac=0.0,ad=0.0,ae=0,af=0.0,ag=0.0,ah=0.0,ai=0,aj=0.0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0.0,ar=0.0,as=0.0,at=0.0,au=0.0,av=0.0,aw=0.0,ax=0.0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0.0,aL=0.0,aM=0.0,aN=0.0,aO=0.0,aP=0.0,aQ=0.0,aR=0.0,aS=0.0,aT=0,aU=0.0,aV=0,aW=0,aX=0;e=i;i=i+112|0;f=e|0;g=e+56|0;j=c[3524]|0;k=b+12|0;l=b+300|0;do{if((c[k>>2]|0)==392){m=c[l>>2]|0;n=c[9670]|0;do{if((n|0)==1){if((c[b+280>>2]|0)!=0){break}c[3572]=0}else if((n|0)==2){c[3572]=0}}while(0);n=c[3568]|0;if((n|0)!=0){if((c[3572]|0)>=(m|0)){break}o=db(n,m<<6,91376)|0;c[3568]=o;n=c[3572]|0;if((n|0)<(m|0)){p=n;while(1){n=p+1|0;uE(o+(p<<6)+32|0,0,16);if((n|0)<(m|0)){p=n}else{break}}}c[3572]=m;break}p=m<<6;o=ut(p)|0;do{if((o|0)==0){gk();n=ut(p)|0;if((n|0)!=0){q=n;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=91376,v)|0)}else{q=o}}while(0);o=q;c[3568]=o;if((m|0)>0){p=0;while(1){n=p+1|0;uE(o+(p<<6)+32|0,0,16);if((n|0)<(m|0)){p=n}else{break}}}c[3572]=m}}while(0);q=c[l>>2]|0;if((q|0)<=0){i=e;return}p=b+320|0;o=b+276|0;n=g|0;r=g+4|0;s=g+40|0;t=g+44|0;u=g+8|0;w=g+40|0;x=g;y=g+32|0;g=b+200|0;z=f|0;A=f+4|0;B=f+40|0;C=f+44|0;D=f+8|0;E=f;F=f+32|0;G=f+40|0;f=b+280|0;H=b+192|0;I=H|0;J=j+56|0;K=j+60|0;L=j+108|0;M=b+208|0;N=j+64|0;O=b+28|0;P=b+56|0;Q=b+64|0;R=b+196|0;S=b+316|0;T=2;U=0.0;V=0;W=d;d=c[p>>2]|0;X=q;while(1){L14718:do{if((c[d+(V<<6)>>2]|0)>>>0<2){if(+h[d+(V<<6)+24>>3]<0.0){q=(T|0)==2;Y=+h[7030];do{if(q){if(Y<=0.0){Z=0.0;break}if((a[56232]&1)==0){Z=0.0;break}Z=Y*-.5}else{if(Y<0.0){Z=(+h[d+(V-1<<6)+8>>3]- +h[d+(V<<6)+8>>3])*.5;break}if((a[56232]&1)==0){Z=Y*(+h[d+(V-1<<6)+8>>3]- +h[d+(V<<6)+8>>3])*.5;break}else{Z=Y*-.5;break}}}while(0);do{if((V|0)<(X-1|0)){_=V+1|0;if((c[d+(_<<6)>>2]|0)==2){$=-0.0-Z;break}if(Y<0.0){$=(+h[d+(_<<6)+8>>3]- +h[d+(V<<6)+8>>3])*.5;break}if((a[56232]&1)==0){$=Y*(+h[d+(_<<6)+8>>3]- +h[d+(V<<6)+8>>3])*.5;break}else{$=Y*.5;break}}else{$=-0.0-Z}}while(0);if(q){ab=-0.0-$}else{ab=Z}Y=+h[d+(V<<6)+8>>3];ac=ab+Y;ad=$+Y}else{ac=+h[d+(V<<6)+48>>3];ad=+h[d+(V<<6)+56>>3]}_=c[k>>2]|0;if((_|0)==137){Y=+h[d+(V<<6)+32>>3];ae=c[144]|0;af=+h[64664+(ae*688&-1)>>3];ag=+h[64672+(ae*688&-1)>>3];do{if(afag){ah=ag;break}if(Y>=af){ah=Y;break}ah=af}else{if(Y>af){ah=af;break}if(Y>=ag){ah=Y;break}ah=ag}}while(0);ai=~~(+(c[64768+(ae*688&-1)>>2]|0)+(ah-af)*+h[64776+(ae*688&-1)>>3]+.5);aj=ah;ak=d+(V<<6)+40|0}else{ai=W;aj=U;ak=d+(V<<6)+16|0}ag=+h[ak>>3];do{if((_|0)==392){q=c[o>>2]|0;al=c[q+32>>2]|0;am=((al|0)>0?al:0)+V|0;al=c[9670]|0;if((al|0)==3|(al|0)==4){an=c[9671]|0;ao=an+(c[q+8>>2]|0)|0;ap=aa(ao-1|0,~~+h[d+(V<<6)+8>>3]-1|0);Y=+(ap+(c[f>>2]|0)|0);aq=+((an|0)/2&-1|0);ar=+(ao|0);as=+h[q+16>>3]+.5;at=(aq+(ac+Y))/ar+as;au=aj;av=(aq+(ad+Y))/ar+as;aw=ag;break}else if((al|0)==2){as=+h[q+16>>3];ar=+h[7030]*.5;Y=+(c[f>>2]|0);aq=as-ar+Y;ax=as+ar+Y;if((a[30080]&1)==0){ao=c[n>>2]|0;an=c[8798]|0;ap=(an|0)>0;ay=am;L14771:while(1){az=43264;while(1){aA=c[az>>2]|0;if((aA|0)==0){break}if((c[aA+4>>2]|0)==(ay|0)){aB=10821;break L14771}else{az=aA|0}}aC=ay-1|0;if(!((ay|0)>(an|0)&ap)){aB=10827;break}ay=((aC|0)%(an|0)&-1)+1|0}do{if((aB|0)==10821){aB=0;an=aA+8|0;c[x>>2]=c[an>>2];c[x+4>>2]=c[an+4>>2];c[x+8>>2]=c[an+8>>2];c[x+12>>2]=c[an+12>>2];c[x+16>>2]=c[an+16>>2];c[x+20>>2]=c[an+20>>2];c[x+24>>2]=c[an+24>>2];c[x+28>>2]=c[an+28>>2];c[x+32>>2]=c[an+32>>2];c[x+36>>2]=c[an+36>>2];c[x+40>>2]=c[an+40>>2];c[x+44>>2]=c[an+44>>2];c[x+48>>2]=c[an+48>>2];c[x+52>>2]=c[an+52>>2];c[n>>2]=ao;an=c[3524]|0;if((c[an+96>>2]&1024|0)!=0){c[r>>2]=ay;a[y]=0;aD=an;break}if((a[y]&1)!=0){aD=an;break}c[s>>2]=1;c[t>>2]=c[r>>2];aD=an}else if((aB|0)==10827){aB=0;c[r>>2]=aC;c[s>>2]=1;c[t>>2]=aC;c[u>>2]=aC;aD=c[3524]|0}}while(0);fn(w,aD)}else{ay=am+1|0;ao=c[z>>2]|0;an=43280;while(1){aE=c[an>>2]|0;if((aE|0)==0){aB=10805;break}if((c[aE+4>>2]|0)==(ay|0)){aB=10803;break}else{an=aE|0}}do{if((aB|0)==10803){aB=0;an=aE+8|0;c[E>>2]=c[an>>2];c[E+4>>2]=c[an+4>>2];c[E+8>>2]=c[an+8>>2];c[E+12>>2]=c[an+12>>2];c[E+16>>2]=c[an+16>>2];c[E+20>>2]=c[an+20>>2];c[E+24>>2]=c[an+24>>2];c[E+28>>2]=c[an+28>>2];c[E+32>>2]=c[an+32>>2];c[E+36>>2]=c[an+36>>2];c[E+40>>2]=c[an+40>>2];c[E+44>>2]=c[an+44>>2];c[E+48>>2]=c[an+48>>2];c[E+52>>2]=c[an+52>>2];c[z>>2]=ao;if((a[F]&1)!=0){break}c[B>>2]=1;c[C>>2]=c[A>>2]}else if((aB|0)==10805){aB=0;an=c[8798]|0;ap=(an|0)>0;az=ay;L14794:while(1){aF=43264;while(1){aG=c[aF>>2]|0;if((aG|0)==0){break}if((c[aG+4>>2]|0)==(az|0)){break L14794}else{aF=aG|0}}aH=az-1|0;if(!((az|0)>(an|0)&ap)){aB=10815;break}az=((aH|0)%(an|0)&-1)+1|0}if((aB|0)==10815){aB=0;c[A>>2]=aH;c[B>>2]=1;c[C>>2]=aH;c[D>>2]=aH;break}an=aG+8|0;c[E>>2]=c[an>>2];c[E+4>>2]=c[an+4>>2];c[E+8>>2]=c[an+8>>2];c[E+12>>2]=c[an+12>>2];c[E+16>>2]=c[an+16>>2];c[E+20>>2]=c[an+20>>2];c[E+24>>2]=c[an+24>>2];c[E+28>>2]=c[an+28>>2];c[E+32>>2]=c[an+32>>2];c[E+36>>2]=c[an+36>>2];c[E+40>>2]=c[an+40>>2];c[E+44>>2]=c[an+44>>2];c[E+48>>2]=c[an+48>>2];c[E+52>>2]=c[an+52>>2];c[z>>2]=ao;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[A>>2]=az;a[F]=0;break}if((a[F]&1)!=0){break}c[B>>2]=1;c[C>>2]=c[A>>2]}}while(0);fn(G,c[3524]|0)}c[g>>2]=am;aI=0;aJ=c[p>>2]|0;aK=ax;aL=aq}else if((al|0)==1){Y=+h[q+16>>3];aI=V;aJ=d;aK=ad+Y;aL=ac+Y}else{at=ac;au=aj;av=ad;aw=ag;break}Y=+h[aJ+(V<<6)+16>>3];ao=c[3568]|0;if(Y<0.0){ay=ao+(aI<<6)+32|0;ar=+h[ay>>3];h[ay>>3]=Y+ar;aM=ar}else{ay=ao+(aI<<6)+40|0;ar=+h[ay>>3];h[ay>>3]=Y+ar;aM=ar}ar=ag+aM;ay=c[144]|0;Y=+h[64664+(ay*688&-1)>>3];as=+h[64672+(ay*688&-1)>>3];ay=YY){aB=10835}else{aN=aM}}if((aB|0)==10835){aB=0;aN=Y}if(!(ay&aN>as)){if(!(as>3];af=+h[64672+(_*688&-1)>>3];do{if(agaf){aO=af;break}if(aw>=ag){aO=aw;break}aO=ag}else{if(aw>ag){aO=ag;break}if(aw>=af){aO=aw;break}aO=af}}while(0);ae=c[200]|0;ar=+h[64664+(ae*688&-1)>>3];as=+h[64672+(ae*688&-1)>>3];do{if(aras){aP=as}else{if(av>=ar){aP=av;break}aP=ar}}while(0);if(at>as){aQ=as;aR=aP;break}if(at>=ar){aQ=at;aR=aP;break}aQ=ar;aR=aP}else{do{if(av>ar){aS=ar}else{if(av>=as){aS=av;break}aS=as}}while(0);if(at>ar){aQ=ar;aR=aS;break}if(at>=as){aQ=at;aR=aS;break}aQ=as;aR=aS}}while(0);if(aR==aQ){if(aR==ar|aR==as){aT=ai;aU=au;break}}aq=+(c[64768+(ae*688&-1)>>2]|0);ax=+h[64776+(ae*688&-1)>>3];q=~~(aq+(aQ-ar)*ax+.5);al=~~(aq+(aR-ar)*ax+.5);ax=+(c[64768+(_*688&-1)>>2]|0);aq=+h[64776+(_*688&-1)>>3];am=~~(ax+(aO-ag)*aq+.5);if((ai|0)==(am|0)){if(aO==ag|aO==af){aT=ai;aU=au;break}}ay=c[k>>2]|0;do{if((ay|0)==153|(ay|0)==137|(ay|0)==169){ao=(c[S>>2]|0)+(V<<3)|0;f9(b,ao);aV=ai}else if((ay|0)==392){if(((c[9670]|0)-1|0)>>>0>=2){aV=ai;break}aV=~~(ax+(au-ag)*aq+.5)}else{aV=ai}}while(0);ay=c[I>>2]|0;do{if((ay|0)!=0){_=c[L>>2]|0;if((_|0)==0){break}ae=al-q|0;ao=am-aV|0;an=(ae|0)<0;ap=an?al:q;aF=(an?q-al|0:ae)+1|0;ae=(ao|0)<0;an=ae?am:aV;aW=(ae?aV-am|0:ao)+1|0;if((ay|0)==1|(ay|0)==4){aX=(c[R>>2]<<4&65520)+ay|0}else if((ay|0)==2|(ay|0)==5){aX=(c[g>>2]<<4&65520)+ay|0}else{aX=0}cI[_&63](aX,ap,an,aF,aW);if(!(hG(H)|0)){aT=ai;aU=au;break L14718}}}while(0);ay=c[(c[3524]|0)+172>>2]|0;if((ay|0)!=0){cM[ay&511](0)}cN[c[J>>2]&255](q,aV);cN[c[K>>2]&255](q,am);cN[c[K>>2]&255](al,am);cN[c[K>>2]&255](al,aV);cN[c[K>>2]&255](q,aV);ay=c[(c[3524]|0)+172>>2]|0;if((ay|0)!=0){cM[ay&511](1)}if((c[L>>2]|0)==0){aT=ai;aU=au;break}if((c[M>>2]|0)==0){aT=ai;aU=au;break}cM[c[N>>2]&511](c[O>>2]|0);if((a[P]&1)==0){aT=ai;aU=au;break}fn(Q,j);aT=ai;aU=au}else{aT=W;aU=U}}while(0);m=c[p>>2]|0;ay=V+1|0;aW=c[l>>2]|0;if((ay|0)<(aW|0)){T=c[m+(V<<6)>>2]|0;U=aU;V=ay;W=aT;d=m;X=aW}else{break}}i=e;return}function f0(b){b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0;if((c[(c[3524]|0)+148>>2]|0)==0){f_(b);return}d=b+300|0;if(((c[d>>2]|0)-1|0)<=0){return}e=b+320|0;f=0;while(1){g=c[e>>2]|0;i=f+1|0;do{if((c[g+(f<<6)>>2]|0)!=2){if((c[g+(i<<6)>>2]|0)==2){break}j=+h[g+(f<<6)+8>>3];k=+h[g+(f<<6)+56>>3];l=+h[g+(f<<6)+16>>3];m=+h[g+(f<<6)+40>>3];n=+h[g+(i<<6)+8>>3];o=+h[g+(i<<6)+56>>3];p=+h[g+(i<<6)+16>>3];q=+h[g+(i<<6)+40>>3];if((a[30528]&1)==0){r=m-l;if(r*(q-p)<0.0){s=p-q;t=(n*r+j*s)/(r+s);s=m+(q-m)*(t-j)/(n-j);gh(j,k,l,m,t,t,s,s,b);gh(t,t,s,s,n,o,p,q,b);break}else{gh(j,k,l,m,n,o,p,q,b);break}}else{s=(p-l)/(n-j);t=(q-m)/(o-k);r=l-j*s;u=(m-k*t-r)/(s-t);t=r+s*u;if((j-u)*(u-n)>0.0){gh(j,k,l,m,u,u,t,t,b);gh(u,u,t,t,n,o,p,q,b);break}else{gh(j,k,l,m,n,o,p,q,b);break}}}}while(0);if((i|0)<((c[d>>2]|0)-1|0)){f=i}else{break}}return}function f1(a){a=a|0;var b=0,d=0,e=0,f=0.0,g=0,i=0,j=0,k=0,l=0,m=0.0,n=0,o=0.0,p=0.0,q=0,r=0.0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0,D=0.0,E=0,F=0,G=0,H=0.0,I=0,J=0,K=0.0,L=0.0,M=0.0,N=0,O=0;b=c[3524]|0;d=c[b+28>>2]|0;e=d>>>0<8;if(e){f=e?1.0:0.0}else{f=+(d>>>2|0)}d=a+300|0;if((c[d>>2]|0)<=0){return}e=a+320|0;g=a+316|0;i=b+56|0;j=b+60|0;b=a+12|0;k=0;do{l=c[e>>2]|0;do{if((c[l+(k<<6)>>2]|0)!=2){m=+h[l+(k<<6)+8>>3];n=c[200]|0;o=+h[64664+(n*688&-1)>>3];p=+h[64672+(n*688&-1)>>3];if(op){break}}else{if(mo){break}}q=~~(+(c[64768+(n*688&-1)>>2]|0)+(m-o)*+h[64776+(n*688&-1)>>3]+.5);o=+h[l+(k<<6)+40>>3];m=+h[l+(k<<6)+32>>3];p=+h[l+(k<<6)+24>>3];r=+h[l+(k<<6)+16>>3];n=c[144]|0;s=+h[64664+(n*688&-1)>>3];t=+h[64672+(n*688&-1)>>3];do{if(s>2]|0;B=+h[64776+(n*688&-1)>>3];C=~~(+(x|0)+(o-s)*B+.5);if(y){D=B;E=x;F=C;w=10925}else{G=0;H=B;I=x;J=C;w=10926}}else if((w|0)==10922){w=0;B=t-s;C=c[64768+(n*688&-1)>>2]|0;K=+(C|0);if((o-t)*B<0.0){L=+h[64776+(n*688&-1)>>3];x=~~(K+(s-s)*L+.5);if(z){D=L;E=C;F=x;w=10925;break}else{G=1;H=L;I=C;J=x;w=10926;break}}else{L=+h[64776+(n*688&-1)>>3];x=~~(K+B*L+.5);if(z){D=L;E=C;F=x;w=10925;break}else{G=1;H=L;I=C;J=x;w=10926;break}}}}while(0);if((w|0)==10926){w=0;o=t-s;if((m-t)*o<0.0){M=s-s}else{M=o}n=~~(+(I|0)+M*H+.5);if((n|0)==(J|0)&G){break}else{N=n;O=J}}else if((w|0)==10925){w=0;N=~~(+(E|0)+(m-s)*D+.5);O=F}n=(c[g>>2]|0)+(k<<3)|0;f9(a,n);cN[c[i>>2]&255](q,N);cN[c[j>>2]&255](q,O);o=+(q>>>0>>>0);n=c[144]|0;cN[c[i>>2]&255](~~(o-f*+h[7077]),~~(+(c[64768+(n*688&-1)>>2]|0)+(r- +h[64664+(n*688&-1)>>3])*+h[64776+(n*688&-1)>>3]+.5));n=c[144]|0;cN[c[j>>2]&255](q,~~(+(c[64768+(n*688&-1)>>2]|0)+(r- +h[64664+(n*688&-1)>>3])*+h[64776+(n*688&-1)>>3]+.5));n=c[144]|0;cN[c[i>>2]&255](~~(o+f*+h[7077]),~~(+(c[64768+(n*688&-1)>>2]|0)+(p- +h[64664+(n*688&-1)>>3])*+h[64776+(n*688&-1)>>3]+.5));n=c[144]|0;cN[c[j>>2]&255](q,~~(+(c[64768+(n*688&-1)>>2]|0)+(p- +h[64664+(n*688&-1)>>3])*+h[64776+(n*688&-1)>>3]+.5));if((c[b>>2]|0)!=474){break}n=c[144]|0;x=~~(+(c[64768+(n*688&-1)>>2]|0)+(+h[(c[e>>2]|0)+(k<<6)+56>>3]- +h[64664+(n*688&-1)>>3])*+h[64776+(n*688&-1)>>3]+.5);cN[c[i>>2]&255](~~(o-f*+h[7077]),x);cN[c[j>>2]&255](~~(o+f*+h[7077]),x)}}while(0);k=k+1|0;}while((k|0)<(c[d>>2]|0));return}function f2(b){b=b|0;var d=0,e=0,f=0,g=0.0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0.0,I=0.0,J=0.0,K=0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0,S=0.0,T=0.0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0.0,ab=0,ac=0,ad=0.0,ae=0,af=0,ag=0,ah=0.0,ai=0,aj=0,ak=0.0,al=0.0,am=0.0,an=0,ao=0,ap=0,aq=0.0,ar=0,as=0,at=0.0,au=0.0,av=0.0,aw=0.0,ax=0.0,ay=0.0,az=0.0,aA=0.0,aB=0.0,aC=0.0,aD=0.0,aE=0.0,aF=0.0,aG=0.0,aH=0,aI=0,aJ=0,aK=0,aL=0.0,aM=0.0,aN=0,aO=0,aP=0.0,aQ=0,aR=0,aS=0.0,aT=0,aU=0,aV=0,aW=0;d=c[3524]|0;e=c[d+28>>2]|0;f=e>>>0<8;if(f){g=f?1.0:0.0}else{g=+(e>>>2|0)}e=b+300|0;f=c[e>>2]|0;if((f|0)<=0){return}i=b+320|0;j=b+192|0;k=b+208|0;l=d+64|0;m=b+28|0;n=b+56|0;o=b+64|0;p=b+316|0;q=d+56|0;r=d+60|0;s=b+12|0;t=b+144|0;u=b+152|0;v=j|0;w=d+108|0;x=b+196|0;y=b+200|0;z=b+212|0;A=2;B=0;C=c[i>>2]|0;D=f;while(1){do{if((c[C+(B<<6)>>2]|0)==2){E=A;F=C;G=D}else{H=+h[C+(B<<6)+8>>3];f=c[200]|0;I=+h[64664+(f*688&-1)>>3];J=+h[64672+(f*688&-1)>>3];K=IJ){E=A;F=C;G=D;break}}else{if(HI){E=A;F=C;G=D;break}}L=+(c[64768+(f*688&-1)>>2]|0);M=+h[64776+(f*688&-1)>>3];f=~~(L+(H-I)*M+.5);N=+h[C+(B<<6)+40>>3];O=+h[C+(B<<6)+32>>3];P=+h[C+(B<<6)+24>>3];Q=+h[C+(B<<6)+16>>3];R=N>3];N=+h[64672+(R*688&-1)>>3];U=O>2]|0;aa=+h[64776+(R*688&-1)>>3];ab=~~(+(Y|0)+(S-O)*aa+.5);if(Z){ac=1;ad=aa;ae=Y;af=ab;X=10957}else{ag=1;ah=aa;ai=Y;aj=ab;X=10958}}else if((X|0)==10954){X=0;aa=N-O;ab=c[64768+(R*688&-1)>>2]|0;ak=+(ab|0);if((S-N)*aa<0.0){al=+h[64776+(R*688&-1)>>3];Y=~~(ak+(O-O)*al+.5);if(_){ac=0;ad=al;ae=ab;af=Y;X=10957;break}else{ag=0;ah=al;ai=ab;aj=Y;X=10958;break}}else{al=+h[64776+(R*688&-1)>>3];Y=~~(ak+aa*al+.5);if(_){ac=0;ad=al;ae=ab;af=Y;X=10957;break}else{ag=0;ah=al;ai=ab;aj=Y;X=10958;break}}}}while(0);if((X|0)==10958){X=0;S=N-O;if((T-N)*S<0.0){am=O-O}else{am=S}R=~~(+(ai|0)+am*ah+.5);if((R|0)==(aj|0)&(ag^1)){E=A;F=C;G=D;break}else{an=R;ao=0;ap=ag;aq=ah;ar=ai;as=aj}}else if((X|0)==10957){X=0;an=~~(+(ae|0)+(T-O)*ad+.5);ao=1;ap=ac;aq=ad;ar=ae;as=af}S=+h[C+(B<<6)+48>>3];do{if(S!=H){al=H*2.0-S;do{if(K){do{if(al>J){at=J}else{if(al>=I){at=al;break}at=I}}while(0);if(S>J){au=J;av=at;break}if(S>=I){au=S;av=at;break}au=I;av=at}else{do{if(al>I){aw=I}else{if(al>=J){aw=al;break}aw=J}}while(0);if(S>I){au=I;av=aw;break}if(S>=J){au=S;av=aw;break}au=J;av=aw}}while(0);ax=L+(au-I)*M+.5;ay=L+(av-I)*M+.5}else{if((c[s>>2]|0)==474){al=+h[7030];if((a[56232]&1)!=0&al>0.0){az=al*.5}else{az=.25}ax=L+(H-az-I)*M+.5;ay=L+(H+az-I)*M+.5;break}al=+h[7030];if(al<0.0){aa=+(f|0);ak=g*+h[7077];ax=aa-ak;ay=aa+ak;break}ak=al*-.5;R=(A|0)==2;do{if(R){aA=ak}else{if((a[56232]&1)!=0){aA=ak;break}aA=al*(+h[C+(B-1<<6)+8>>3]-H)*.5}}while(0);ak=-0.0-aA;do{if((B|0)<(D-1|0)){Y=B+1|0;if((c[C+(Y<<6)>>2]|0)==2){aB=ak;break}if((a[56232]&1)==0){aB=(+h[C+(Y<<6)+8>>3]-H)*al*.5;break}else{aB=al*.5;break}}else{aB=ak}}while(0);if(R){aC=-0.0-aB}else{aC=aA}ak=H+aC;al=H+aB;do{if(K){do{if(al>J){aD=J}else{if(al>=I){aD=al;break}aD=I}}while(0);if(ak>J){aE=J;aF=aD;break}if(ak>=I){aE=ak;aF=aD;break}aE=I;aF=aD}else{do{if(al>I){aG=I}else{if(al>=J){aG=al;break}aG=J}}while(0);if(ak>I){aE=I;aF=aG;break}if(ak>=J){aE=ak;aF=aG;break}aE=J;aF=aG}}while(0);ax=L+(aE-I)*M+.5;ay=L+(aF-I)*M+.5}}while(0);K=~~ax;R=~~ay;do{if((R-K&1|0)==0){aH=R;aI=f}else{Y=R+1|0;ab=(((f-K|0)>(Y-f|0))<<31>>31)+f|0;if((ab-K|0)>=(Y-ab|0)){aH=Y;aI=ab;break}aH=Y;aI=ab+1|0}}while(0);do{if(U){if(QN){aL=N}else{if(Q>=O){aL=Q;break}aL=O}}while(0);if(P>N){aM=N;aN=aK;aO=aJ;aP=aL;break}if(P>=O){aM=P;aN=aK;aO=aJ;aP=aL;break}aM=O;aN=aK;aO=aJ;aP=aL}else{if(QO){aS=O}else{if(Q>=N){aS=Q;break}aS=N}}while(0);if(P>O){aM=O;aN=aR;aO=aQ;aP=aS;break}if(P>=N){aM=P;aN=aR;aO=aQ;aP=aS;break}aM=N;aN=aR;aO=aQ;aP=aS}}while(0);N=+(ar|0);U=~~(N+(aP-O)*aq+.5);f=~~(N+(aM-O)*aq+.5);R=(U|0)<(f|0);ab=R?U:f;Y=R?f:U;U=(ab|0)==(Y|0)&((aO|aN)^1);f=c[k>>2]|0;if((f|0)==1){if((c[z>>2]|0)!=-3){X=11032}}else if((f|0)!=0){X=11032}do{if((X|0)==11032){X=0;cM[c[l>>2]&511](c[m>>2]|0);if((a[n]&1)==0){break}fn(o,d)}}while(0);f=(c[p>>2]|0)+(B<<3)|0;f9(b,f);do{if(!((c[(c[3524]|0)+108>>2]|0)==0|U)){f=c[v>>2]|0;if((f|0)==2|(f|0)==5){aT=(c[y>>2]<<4&65520)+f|0}else if((f|0)==1|(f|0)==4){aT=(c[x>>2]<<4&65520)+f|0}else{aT=0}if(!((aT|0)!=0|aP>aM)){break}if((aT|0)==0){aU=(c[s>>2]|0)==474?0:1601}else{aU=aT}cI[c[w>>2]&63](aU,K,ab,aH-K|0,Y-ab|0);f=c[v>>2]|0;if((f|0)==2|(f|0)==5){aV=y}else if((f|0)==1|(f|0)==4){aV=x}else{break}if((c[aV>>2]<<4&65520|0)==(-f|0)){break}hG(j)}}while(0);cN[c[q>>2]&255](aI,an);cN[c[r>>2]&255](aI,ab);cN[c[q>>2]&255](aI,Y);cN[c[r>>2]&255](aI,as);do{if(!U){f=c[(c[3524]|0)+172>>2]|0;if((f|0)!=0){cM[f&511](0)}f=c[144]|0;cN[c[q>>2]&255](K,~~(+(c[64768+(f*688&-1)>>2]|0)+(aP- +h[64664+(f*688&-1)>>3])*+h[64776+(f*688&-1)>>3]+.5));f=c[144]|0;cN[c[r>>2]&255](aH,~~(+(c[64768+(f*688&-1)>>2]|0)+(aP- +h[64664+(f*688&-1)>>3])*+h[64776+(f*688&-1)>>3]+.5));f=c[144]|0;cN[c[r>>2]&255](aH,~~(+(c[64768+(f*688&-1)>>2]|0)+(aM- +h[64664+(f*688&-1)>>3])*+h[64776+(f*688&-1)>>3]+.5));f=c[144]|0;cN[c[r>>2]&255](K,~~(+(c[64768+(f*688&-1)>>2]|0)+(aM- +h[64664+(f*688&-1)>>3])*+h[64776+(f*688&-1)>>3]+.5));f=c[144]|0;cN[c[r>>2]&255](K,~~(+(c[64768+(f*688&-1)>>2]|0)+(aP- +h[64664+(f*688&-1)>>3])*+h[64776+(f*688&-1)>>3]+.5));f=c[(c[3524]|0)+172>>2]|0;if((f|0)==0){break}cM[f&511](1)}}while(0);do{if((c[s>>2]|0)==474){O=+h[7077];if(O<0.0){aW=0;X=11056;break}aW=~~(+(aH-K|0)*.5-O*+((c[(c[3524]|0)+28>>2]|0)>>>0>>>0));X=11056}else{if((c[t>>2]|0)!=3){break}O=+h[u>>3];if(O<=0.0){aW=0;X=11056;break}aW=~~(+(aH-K|0)*(1.0-O)*.5);X=11056}}while(0);do{if((X|0)==11056){X=0;if(ap){cN[c[q>>2]&255](aW+K|0,as);cN[c[r>>2]&255](aH-aW|0,as)}if(!ao){break}cN[c[q>>2]&255](aW+K|0,an);cN[c[r>>2]&255](aH-aW|0,an)}}while(0);if((c[s>>2]|0)==474){U=c[144]|0;f=~~(+(c[64768+(U*688&-1)>>2]|0)+(+h[(c[i>>2]|0)+(B<<6)+56>>3]- +h[64664+(U*688&-1)>>3])*+h[64776+(U*688&-1)>>3]+.5);cN[c[q>>2]&255](K,f);cN[c[r>>2]&255](aH,f)}do{if(aP>aM){if((c[(c[3524]|0)+108>>2]|0)!=0){break}cN[c[q>>2]&255](aI,ab);cN[c[r>>2]&255](aI,Y);f=(aI+K|0)/2&-1;cN[c[q>>2]&255](f,ab);cN[c[r>>2]&255](f,Y);f=(aH+aI|0)/2&-1;cN[c[q>>2]&255](f,ab);cN[c[r>>2]&255](f,Y)}}while(0);Y=c[i>>2]|0;E=c[Y+(B<<6)>>2]|0;F=Y;G=c[e>>2]|0}}while(0);Y=B+1|0;if((Y|0)<(G|0)){A=E;B=Y;C=F;D=G}else{break}}return}function f3(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0,$=0,ab=0.0,ac=0.0,ad=0.0,ae=0.0,af=0.0,ag=0.0,ah=0,ai=0.0,aj=0,ak=0.0,al=0,am=0,an=0.0,ao=0.0,ap=0,aq=0.0,ar=0.0,as=0.0,at=0.0,au=0,av=0,aw=0.0,ax=0.0,ay=0,az=0.0,aA=0.0,aB=0.0,aC=0,aD=0.0,aE=0.0,aF=0.0,aG=0.0,aH=0.0,aI=0.0,aJ=0.0,aK=0.0,aL=0.0,aM=0.0,aN=0.0,aO=0,aP=0,aQ=0.0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0.0,a5=0.0,a6=0.0,a7=0.0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0.0,bq=0.0,br=0.0,bs=0.0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0,bz=0.0,bA=0.0,bB=0.0,bC=0.0,bD=0.0,bE=0.0,bF=0.0,bG=0.0,bH=0.0,bI=0.0,bJ=0.0,bK=0.0,bL=0.0,bM=0.0,bN=0.0,bO=0.0,bP=0.0,bQ=0.0,bR=0.0,bS=0.0,bT=0.0,bU=0.0,bV=0.0,bW=0.0,bX=0.0,bY=0.0,bZ=0.0,b_=0,b$=0,b0=0,b1=0.0,b2=0.0,b3=0,b4=0,b5=0.0,b6=0.0,b7=0,b8=0.0,b9=0,ca=0.0,cb=0;e=i;i=i+256|0;f=e|0;g=e+16|0;j=e+32|0;k=e+48|0;l=e+96|0;m=e+192|0;uE(j|0,-1|0,16);n=((c[b+8>>2]|0)-2|0)>>>0<2;if(n){o=c[b+260>>2]|0;p=o+12|0;q=o+8|0}else{p=b+320|0;q=b+300|0}o=c[p>>2]|0;p=c[q>>2]|0;q=c[b+228>>2]|0;if((p|0)<1){uh(-1,207376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=e;return}if((p|0)<4){uh(-1,203152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=e;return}r=c[200]|0;s=a[64788+(r*688&-1)|0]|0;t=(s&1)==0;L15142:do{if(n){do{if(t){u=c[144]|0;if((a[64788+(u*688&-1)|0]&1)!=0){break}if((a[64788+((c[34]|0)*688&-1)|0]&1)!=0){break}w=+h[64664+(r*688&-1)>>3];x=+h[91];y=+h[96];z=(+h[o+8>>3]-w)*x+y+-1.0;A=+h[64664+(u*688&-1)>>3];B=+h[21];C=+h[68];D=(+h[o+16>>3]-A)*B+C+-1.0;E=+h[5279];F=+h[2];G=+h[12];H=(+h[o+24>>3]-E)*F+G+-1.0;I=+h[403];J=+h[391];K=+h[395];L=+h[399];M=+h[404];N=+h[392];O=+h[396];Q=+h[400];R=+h[406];S=+h[394];T=+h[398];U=+h[402];V=R+z*S+D*T+H*U;W=V==0.0?1.0e-5:V;V=+(c[180]|0);u=c[186]|0;X=+(c[40]|0);Y=c[46]|0;$=p-1|0;ab=y+x*(+h[o+($<<6)+8>>3]-w)+-1.0;w=C+B*(+h[o+($<<6)+16>>3]-A)+-1.0;A=G+F*(+h[o+($<<6)+24>>3]-E)+-1.0;E=R+S*ab+T*w+U*A;U=E==0.0?1.0e-5:E;ac=+(~~(V*((I+J*ab+K*w+L*A)/U))+u|0);ad=+(~~(X*((M+N*ab+O*w+Q*A)/U))+Y|0);ae=+(~~((I+z*J+D*K+H*L)/W*V)+u|0);af=+(~~((M+z*N+D*O+H*Q)/W*X)+Y|0);break L15142}}while(0);uh(-1,198096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=e;return}else{do{if(t){if((a[64788+((c[144]|0)*688&-1)|0]&1)!=0){break}Y=p-1|0;ac=+h[o+(Y<<6)+8>>3];ad=+h[o+(Y<<6)+16>>3];ae=+h[o+8>>3];af=+h[o+16>>3];break L15142}}while(0);Y=c[b+304>>2]|0;u=(a[64788+(Y*688&-1)|0]&1)==0;X=+h[o+8>>3];if(u){ag=X}else{ag=+Z(+(X*+h[64800+(Y*688&-1)>>3]))}$=c[b+308>>2]|0;ah=(a[64788+($*688&-1)|0]&1)==0;X=+h[o+16>>3];if(ah){ai=X}else{ai=+Z(+(X*+h[64800+($*688&-1)>>3]))}aj=p-1|0;X=+h[o+(aj<<6)+8>>3];if(u){ak=X}else{ak=+Z(+(X*+h[64800+(Y*688&-1)>>3]))}X=+h[o+(aj<<6)+16>>3];if(ah){ac=ak;ad=X;ae=ag;af=ai;break}ac=ak;ad=+Z(+(X*+h[64800+($*688&-1)>>3]));ae=ag;af=ai}}while(0);ai=af-ad;ag=ac-ae;L15166:do{if((p|0)>1){t=64664+(r*688&-1)|0;ak=+h[91];X=+h[96];$=c[144]|0;ah=64664+($*688&-1)|0;W=+h[21];Q=+h[68];H=+h[5279];O=+h[2];D=+h[12];N=+h[403];z=+h[391];M=+h[395];V=+h[399];L=+h[404];K=+h[392];J=+h[396];I=+h[400];U=+h[406];A=+h[394];w=+h[398];ab=+h[402];E=+(c[180]|0);aj=c[186]|0;T=+(c[40]|0);Y=c[46]|0;u=64788+($*688&-1)|0;$=b+304|0;al=b+308|0;S=ag;R=ai;F=-0.0-(ae*ai+af*ag);am=1;L15168:while(1){L15170:do{if(n){G=(+h[o+(am<<6)+8>>3]- +h[t>>3])*ak+X+-1.0;B=(+h[o+(am<<6)+16>>3]- +h[ah>>3])*W+Q+-1.0;C=(+h[o+(am<<6)+24>>3]-H)*O+D+-1.0;x=U+G*A+B*w+C*ab;y=x==0.0?1.0e-5:x;an=+(~~((N+G*z+B*M+C*V)/y*E)+aj|0);ao=+(~~((L+G*K+B*J+C*I)/y*T)+Y|0)}else{do{if((s&1)==0){if((a[u]&1)!=0){break}an=+h[o+(am<<6)+8>>3];ao=+h[o+(am<<6)+16>>3];break L15170}}while(0);ap=c[$>>2]|0;y=+h[o+(am<<6)+8>>3];if((a[64788+(ap*688&-1)|0]&1)==0){aq=y}else{aq=+Z(+(y*+h[64800+(ap*688&-1)>>3]))}ap=c[al>>2]|0;y=+h[o+(am<<6)+16>>3];if((a[64788+(ap*688&-1)|0]&1)==0){an=aq;ao=y;break}an=aq;ao=+Z(+(y*+h[64800+(ap*688&-1)>>3]))}}while(0);ap=F+(S*ao+R*an)<0.0;do{if((am|0)==1){if(!ap){ar=F;as=R;at=S;break}ar=-0.0-F;as=-0.0-R;at=-0.0-S}else{if(ap){break L15168}else{ar=F;as=R;at=S}}}while(0);ap=am+1|0;if((ap|0)<(p|0)){S=at;R=as;F=ar;am=ap}else{au=11111;break L15166}}if((am|0)==(p|0)){au=11111}else{av=am}}else{au=11111}}while(0);if((au|0)==11111){uh(-1,186832,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);av=p}s=(p|0)/(av|0)&-1;if(+(s|0)!=+(p|0)/+(av|0)){uh(-1,181552,(v=i,i=i+16|0,c[v>>2]=p,c[v+8>>2]=av,v)|0);i=e;return}c[j>>2]=0;r=av-1|0;c[j+4>>2]=r;c[j+12>>2]=p-1;al=p-av|0;c[j+8>>2]=al;L15195:do{if(n){$=c[200]|0;ar=(+h[o+(r<<6)+8>>3]- +h[64664+($*688&-1)>>3])*+h[91]+ +h[96]+-1.0;as=(+h[o+(r<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;at=(+h[o+(r<<6)+24>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;an=+h[406]+ar*+h[394]+as*+h[398]+at*+h[402];ao=an==0.0?1.0e-5:an;aw=+(~~((+h[403]+ar*+h[391]+as*+h[395]+at*+h[399])/ao*+(c[180]|0))+(c[186]|0)|0);ax=+(~~((+h[404]+ar*+h[392]+as*+h[396]+at*+h[400])/ao*+(c[40]|0))+(c[46]|0)|0);ay=$}else{$=c[200]|0;do{if((a[64788+($*688&-1)|0]&1)==0){if((a[64788+((c[144]|0)*688&-1)|0]&1)!=0){break}aw=+h[o+(r<<6)+8>>3];ax=+h[o+(r<<6)+16>>3];ay=$;break L15195}}while(0);am=c[b+304>>2]|0;ao=+h[o+(r<<6)+8>>3];if((a[64788+(am*688&-1)|0]&1)==0){az=ao}else{az=+Z(+(ao*+h[64800+(am*688&-1)>>3]))}am=c[b+308>>2]|0;ao=+h[o+(r<<6)+16>>3];if((a[64788+(am*688&-1)|0]&1)==0){aw=az;ax=ao;ay=$;break}aw=az;ax=+Z(+(ao*+h[64800+(am*688&-1)>>3]));ay=$}}while(0);az=+(r|0);ao=(aw-ae)/az;ae=(ax-af)/az;am=s-1|0;af=+(am|0);at=(ac-aw)/af;aw=(ad-ax)/af;if(d){ax=+(r<<1|0);ad=+(am<<1|0);am=b+304|0;d=b+308|0;u=b+23|0;Y=0;do{do{if((a[64788+(ay*688&-1)|0]&1)==0){if((a[64788+((c[144]|0)*688&-1)|0]&1)!=0){au=11127;break}aj=c[j+(Y<<2)>>2]|0;ac=+h[o+(aj<<6)+8>>3];as=+h[o+(aj<<6)+16>>3];aj=c[j+(((5-Y|0)%4&-1)<<2)>>2]|0;ah=c[j+(((Y+2|0)%4&-1)<<2)>>2]|0;aA=ac-(+h[o+(aj<<6)+8>>3]-ac)/ax-(+h[o+(ah<<6)+8>>3]-ac)/ad;aB=as-(+h[o+(aj<<6)+16>>3]-as)/ax-(+h[o+(ah<<6)+16>>3]-as)/ad;aC=c[am>>2]|0}else{au=11127}}while(0);if((au|0)==11127){au=0;$=c[am>>2]|0;ah=(a[64788+($*688&-1)|0]&1)==0;as=+h[o+(Y<<6)+8>>3];if(ah){aD=as}else{aD=+Z(+(as*+h[64800+($*688&-1)>>3]))}aj=c[d>>2]|0;t=(a[64788+(aj*688&-1)|0]&1)==0;ac=+h[o+(Y<<6)+16>>3];if(t){aE=ac}else{aE=+Z(+(ac*+h[64800+(aj*688&-1)>>3]))}ap=(5-Y|0)%4&-1;ar=+h[o+(ap<<6)+8>>3];if(ah){aF=as;aG=ar}else{an=+h[64800+($*688&-1)>>3];aq=+Z(+(ar*an));aF=+Z(+(as*an));aG=aq}aq=+h[o+(ap<<6)+16>>3];if(t){aH=ac;aI=aq}else{an=+h[64800+(aj*688&-1)>>3];ar=+Z(+(aq*an));aH=+Z(+(ac*an));aI=ar}ap=(Y+2|0)%4&-1;ar=+h[o+(ap<<6)+8>>3];if(ah){aJ=as;aK=ar}else{an=+h[64800+($*688&-1)>>3];aq=+Z(+(ar*an));aJ=+Z(+(as*an));aK=aq}aq=+h[o+(ap<<6)+16>>3];if(t){aL=ac;aM=aq}else{an=+h[64800+(aj*688&-1)>>3];as=+Z(+(aq*an));aL=+Z(+(ac*an));aM=as}aA=aD-(aG-aF)/ax-(aK-aJ)/ad;aB=aE-(aI-aH)/ax-(aM-aL)/ad;aC=$}L15235:do{if((aC|0)!=99){if(!(aA>-8.988465674311579e+307&aA<8.988465674311579e+307)){break}if((a[64788+(aC*688&-1)|0]&1)==0){aN=aA}else{if(aA<=0.0){break}as=+_(+aA);aN=as/+h[64800+(aC*688&-1)>>3]}if((a[u]&1)!=0|(aC|0)<0){break}$=64712+(aC*688&-1)|0;if(aN<+h[$>>3]){h[$>>3]=aN;aO=c[am>>2]|0}else{aO=aC}$=64664+(aO*688&-1)|0;do{if(aN<+h[$>>3]){if((c[64648+(aO*688&-1)>>2]&1|0)==0){break L15235}if((c[64728+(aO*688&-1)>>2]&1|0)==0){h[$>>3]=aN;break}as=+h[64736+(aO*688&-1)>>3];if(as>aN){h[$>>3]=as;break L15235}else{h[$>>3]=aN;break}}}while(0);$=c[am>>2]|0;aj=64720+($*688&-1)|0;if(aN>+h[aj>>3]){h[aj>>3]=aN;aP=c[am>>2]|0}else{aP=$}$=64672+(aP*688&-1)|0;if(aN<=+h[$>>3]){break}if((c[64648+(aP*688&-1)>>2]&2|0)==0){break}if((c[64732+(aP*688&-1)>>2]&2|0)==0){h[$>>3]=aN;break}as=+h[64760+(aP*688&-1)>>3];if(as>3]=as;break}else{h[$>>3]=aN;break}}}while(0);$=c[d>>2]|0;L15268:do{if(($|0)!=99){if(!(aB>-8.988465674311579e+307&aB<8.988465674311579e+307)){break}if((a[64788+($*688&-1)|0]&1)==0){aQ=aB}else{if(aB<=0.0){break}as=+_(+aB);aQ=as/+h[64800+($*688&-1)>>3]}if((a[u]&1)!=0|($|0)<0){break}aj=64712+($*688&-1)|0;if(aQ<+h[aj>>3]){h[aj>>3]=aQ;aR=c[d>>2]|0}else{aR=$}aj=64664+(aR*688&-1)|0;do{if(aQ<+h[aj>>3]){if((c[64648+(aR*688&-1)>>2]&1|0)==0){break L15268}if((c[64728+(aR*688&-1)>>2]&1|0)==0){h[aj>>3]=aQ;break}as=+h[64736+(aR*688&-1)>>3];if(as>aQ){h[aj>>3]=as;break L15268}else{h[aj>>3]=aQ;break}}}while(0);aj=c[d>>2]|0;t=64720+(aj*688&-1)|0;if(aQ>+h[t>>3]){h[t>>3]=aQ;aS=c[d>>2]|0}else{aS=aj}aj=64672+(aS*688&-1)|0;if(aQ<=+h[aj>>3]){break}if((c[64648+(aS*688&-1)>>2]&2|0)==0){break}if((c[64732+(aS*688&-1)>>2]&2|0)==0){h[aj>>3]=aQ;break}as=+h[64760+(aS*688&-1)>>3];if(as>3]=as;break}else{h[aj>>3]=aQ;break}}}while(0);Y=Y+1|0;}while((Y|0)<4);i=e;return}aQ=+P(+ao);aB=+P(+at);do{if(aQ>>0<2){if((c[(c[3524]|0)+144>>2]|0)!=0){break}i=e;return}}while(0);if(!d){aV=aU;aW=0;aX=aS;aY=ay;break}aV=(c[(c[3524]|0)+96>>2]&512|0)==0|aU;aW=1;aX=aS;aY=ay}}while(0);ay=(a[64788+(aY*688&-1)|0]&1)==0;if(ay){if((a[64788+((c[144]|0)*688&-1)|0]&1)==0){aZ=aV}else{au=11205}}else{au=11205}if((au|0)==11205){aZ=1}aV=c[64652+(aY*688&-1)>>2]|0;if((aV&1|0)==0){a_=64680+(aY*688&-1)|0}else{a_=64664+(aY*688&-1)|0}aN=+h[a_>>3];if((aV&2|0)==0){a$=64688+(aY*688&-1)|0}else{a$=64672+(aY*688&-1)|0}aA=+h[a$>>3];a$=c[144]|0;aV=c[64652+(a$*688&-1)>>2]|0;if((aV&1|0)==0){a0=64680+(a$*688&-1)|0}else{a0=64664+(a$*688&-1)|0}ad=+h[a0>>3];if((aV&2|0)==0){a1=64688+(a$*688&-1)|0}else{a1=64672+(a$*688&-1)|0}aL=+h[a1>>3];if(n){a1=c[34]|0;aV=c[64652+(a1*688&-1)>>2]|0;if((aV&1|0)==0){a2=64680+(a1*688&-1)|0}else{a2=64664+(a1*688&-1)|0}if((aV&2|0)==0){a3=64688+(a1*688&-1)|0}else{a3=64672+(a1*688&-1)|0}a4=+h[a3>>3];a5=+h[a2>>3]}else{a4=0.0;a5=0.0}do{if(aT){if((c[(c[3524]|0)+152>>2]|0)==0|aZ){break}if(n){a6=1.0;a7=1.0}else{a6=+h[64776+(aY*688&-1)>>3]>0.0?1.0:-1.0;a7=+h[64776+(a$*688&-1)>>3]>0.0?1.0:-1.0}if(aQ>aB){a2=aw*a7>0.0;a3=ao*a6>0.0;a1=aa(a2?s:1,av)-(a3?av:1)|0;aV=-av|0;a8=av;a9=a3?1:-1;ba=(a3?aV:av)+(a2?aV:av)|0;bb=a1;bc=aa(s,av)}else{a1=at*a6>0.0;aV=ae*a7>0.0;a2=aa(a1?1:s,av)-(aV?1:av)|0;a3=aa(s,av);a8=s;a9=a1?av:-av|0;ba=aa(a3,a1?-1:1)+(aV?-1:1)|0;bb=a2;bc=a3}if(aX){bd=bc*3&-1}else{bd=aW?bc<<2:bc}a3=bd<<3;a2=ut(a3)|0;do{if((a2|0)==0){gk();aV=ut(a3)|0;if((aV|0)!=0){be=aV;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=177456,v)|0)}else{be=a2}}while(0);a2=be;aM=+h[o+8>>3];ax=((aM- +h[o+(r<<6)+8>>3])/az+(aM- +h[o+(al<<6)+8>>3])/af)*.5;aM=+h[o+16>>3];aH=((aM- +h[o+(r<<6)+16>>3])/az+(aM- +h[o+(al<<6)+16>>3])/af)*.5;aM=+h[o+24>>3];aI=((aM- +h[o+(r<<6)+24>>3])/az+(aM- +h[o+(al<<6)+24>>3])/af)*.5;do{if((p|0)>0){a3=aN>3];aE=+h[o+(a_<<6)+16>>3];aJ=+h[o+(a_<<6)+24>>3];aK=aM-ax;aF=ax+aM;aM=aE-aH;aG=aH+aE;aE=aJ-aI;aD=aI+aJ;do{if(a3){if(!(aKaA)){au=11246;break}if(aFaA){au=11257}else{au=11246}}else{if(!(aKaN)){au=11246;break}if(aFaN){au=11257}else{au=11246}}}while(0);L15382:do{if((au|0)==11246){au=0;do{if(aS){if(!(aMaL)){break}if(aGaL){au=11257;break L15382}}else{if(!(aMad)){break}if(aGad){au=11257;break L15382}}}while(0);if(!n){au=11273;break}if(d){if(!(aEa4)){au=11273;break}if(aDa4){au=11257;break}else{au=11273;break}}else{if(!(aEa5)){au=11273;break}if(aDa5){au=11257;break}else{au=11273;break}}}}while(0);L15396:do{if((au|0)==11257){au=0;do{if(aKaF)){break}if(aAaF){bf=aP;bg=u;bh=aR;bi=aU;bj=a0;bk=a1;break L15396}}else{if(!(aNaK)){break}if(aAaK){bf=aP;bg=u;bh=aR;bi=aU;bj=a0;bk=a1;break L15396}}}while(0);do{if(aMaG)){break}if(aLaG){bf=aP;bg=u;bh=aR;bi=aU;bj=a0;bk=a1;break L15396}}else{if(!(adaM)){break}if(aLaM){bf=aP;bg=u;bh=aR;bi=aU;bj=a0;bk=a1;break L15396}}}while(0);if(!n){au=11273;break}if(aEaD)){au=11273;break}if(a4aD){bf=aP;bg=u;bh=aR;bi=aU;bj=a0;bk=a1;break}else{au=11273;break}}else{if(!(a5aE)){au=11273;break}if(a4aE){bf=aP;bg=u;bh=aR;bi=aU;bj=a0;bk=a1;break}else{au=11273;break}}}}while(0);do{if((au|0)==11273){au=0;if((aP|0)<0){bl=a_;bm=1;bn=1;bo=0}else{aO=((u|0)==0&1)+a0|0;aC=u+1|0;if((aO|0)!=1&(aC|0)>(a1|0)){au=11275;break L15375}else{bl=aP;bm=aC;bn=aO;bo=a1}}if(Y){aE=+h[o+(a_<<6)+32>>3];aD=+h[8341];do{if(aD>3]=bp;bf=bl;bg=bm;bh=a_;bi=aU+1|0;bj=bn;bk=bo;break}aD=+h[o+(a_<<6)+40>>3];aE=+h[8341];do{if(aE>3]=bq;aE=+h[o+(a_<<6)+48>>3];aD=+h[8341];do{if(aD>3]=br;aD=+h[o+(a_<<6)+56>>3];aE=+h[8341];do{if(aE>3]=bs;if(!aW){bf=bl;bg=bm;bh=a_;bi=aO;bj=bn;bk=bo;break}h[a2+(aO<<3)>>3]=+h[o+(a_<<6)+32>>3];bf=bl;bg=bm;bh=a_;bi=aU+4|0;bj=bn;bk=bo}}while(0);aO=a_+a9|0;j=aV-1|0;if((j|0)==0){if((bk|0)==0){bt=bg}else{if((bg|0)<1|(bg|0)==(bk|0)){bt=bk}else{au=11307;break}}bu=0;bv=aO+ba|0;bw=bt;bx=a8}else{bu=bg;bv=aO;bw=bk;bx=j}j=am+1|0;if((j|0)<(p|0)){aV=bx;a1=bw;a0=bj;a_=bv;aU=bi;aR=bh;u=bu;aP=bf;am=j}else{au=11310;break}}if((au|0)==11307){uh(-1,169296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=e;return}else if((au|0)==11310){if(!((bw|0)>0&(bj|0)>0)){break}if(n){aE=+h[64664+((c[200]|0)*688&-1)>>3];aD=+h[91];aM=+h[96];aG=(+h[o+(bf<<6)+8>>3]-aE)*aD+aM+-1.0;aK=+h[64664+((c[144]|0)*688&-1)>>3];aF=+h[21];aJ=+h[68];as=(+h[o+(bf<<6)+16>>3]-aK)*aF+aJ+-1.0;an=+h[5279];ac=+h[2];aq=+h[12];ar=(+h[o+(bf<<6)+24>>3]-an)*ac+aq+-1.0;ag=+h[403];ai=+h[391];F=+h[395];R=+h[399];S=+h[404];T=+h[392];I=+h[396];J=+h[400];K=+h[406];L=+h[394];E=+h[398];V=+h[402];M=K+aG*L+as*E+ar*V;z=M==0.0?1.0e-5:M;M=+(c[180]|0);am=c[186]|0;N=+(c[40]|0);aP=c[46]|0;ab=+P(+(ao+at))*.5;c[k>>2]=~~(+(~~((ag+aG*ai+as*F+ar*R)/z*M)+am|0)-ab);w=+P(+(ae+aw))*.5;c[k+4>>2]=~~(w+ +(~~((S+aG*T+as*I+ar*J)/z*N)+aP|0));z=(+h[o+(bh<<6)+8>>3]-aE)*aD+aM+-1.0;ar=(+h[o+(bh<<6)+16>>3]-aK)*aF+aJ+-1.0;as=(+h[o+(bh<<6)+24>>3]-an)*ac+aq+-1.0;aG=K+z*L+ar*E+as*V;A=aG==0.0?1.0e-5:aG;c[k+12>>2]=~~(ab+ +(~~((ag+z*ai+ar*F+as*R)/A*M)+am|0));c[k+16>>2]=~~(+(~~((S+z*T+ar*I+as*J)/A*N)+aP|0)-w);w=(aN-aE)*aD+aM+-1.0;A=(ad-aK)*aF+aJ+-1.0;as=(a5-an)*ac+aq+-1.0;ar=K+w*L+A*E+as*V;z=ar==0.0?1.0e-5:ar;c[k+24>>2]=~~((ag+w*ai+A*F+as*R)/z*M)+am;c[k+28>>2]=~~((S+w*T+A*I+as*J)/z*N)+aP;z=(aA-aE)*aD+aM+-1.0;aM=(aL-aK)*aF+aJ+-1.0;aJ=(a4-an)*ac+aq+-1.0;aq=K+z*L+aM*E+aJ*V;V=aq==0.0?1.0e-5:aq;c[k+36>>2]=~~((ag+z*ai+aM*F+aJ*R)/V*M)+am;c[k+40>>2]=~~((S+z*T+aM*I+aJ*J)/V*N)+aP}else{aP=c[200]|0;N=+(c[64768+(aP*688&-1)>>2]|0);V=+h[o+(bf<<6)+8>>3];J=a6*+P(+ax);aJ=+h[64664+(aP*688&-1)>>3];I=+h[64776+(aP*688&-1)>>3];c[k>>2]=~~(N+I*(V-J-aJ)+.5);aP=c[144]|0;V=+(c[64768+(aP*688&-1)>>2]|0);aM=+h[o+(bf<<6)+16>>3];T=a7*+P(+aH);z=+h[64664+(aP*688&-1)>>3];S=+h[64776+(aP*688&-1)>>3];c[k+4>>2]=~~(V+S*(aM+T-z)+.5);c[k+12>>2]=~~(N+(J+ +h[o+(bh<<6)+8>>3]-aJ)*I+.5);c[k+16>>2]=~~(V+(+h[o+(bh<<6)+16>>3]-T-z)*S+.5);c[k+24>>2]=~~(N+(aN-aJ)*I+.5);c[k+28>>2]=~~(V+(aL-z)*S+.5);c[k+36>>2]=~~(N+(aA-aJ)*I+.5);c[k+40>>2]=~~(V+(ad-z)*S+.5)}cI[c[(c[3524]|0)+152>>2]&63](bw,bj,a2,k|0,q);break}else if((au|0)==11275){uh(-1,172960,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=e;return}}}while(0);uu(be);i=e;return}}while(0);if(ay){by=(a[64788+(a$*688&-1)|0]&1)!=0}else{by=1}if((c[(c[3524]|0)+148>>2]|0)==0){uf(-1,156360,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(by){a$=c[b+304>>2]|0;ay=(a[64788+(a$*688&-1)|0]&1)==0;a7=+h[o+(r<<6)+8>>3];if(ay){a6=+h[o+8>>3];bz=a6;bA=a7;bB=a6}else{a6=+h[64800+(a$*688&-1)>>3];aw=+Z(+(a7*a6));a7=+h[o+8>>3];bz=+Z(+(a7*a6));bA=aw;bB=a7}be=c[b+308>>2]|0;q=(a[64788+(be*688&-1)|0]&1)==0;a7=+h[o+(r<<6)+16>>3];if(q){aw=+h[o+16>>3];bC=aw;bD=a7;bE=aw}else{aw=+h[64800+(be*688&-1)>>3];a6=+Z(+(a7*aw));a7=+h[o+16>>3];bC=+Z(+(a7*aw));bD=a6;bE=a7}k=c[b+312>>2]|0;bj=(a[64788+(k*688&-1)|0]&1)==0;a7=+h[o+(r<<6)+24>>3];if(bj){a6=+h[o+24>>3];bF=a6;bG=a7;bH=a6}else{a6=+h[64800+(k*688&-1)>>3];aw=+Z(+(a7*a6));a7=+h[o+24>>3];bF=+Z(+(a7*a6));bG=aw;bH=a7}a7=+h[o+(al<<6)+8>>3];if(ay){bI=bB;bJ=a7}else{aw=+h[64800+(a$*688&-1)>>3];a6=+Z(+(a7*aw));bI=+Z(+(bB*aw));bJ=a6}a6=+h[o+(al<<6)+16>>3];if(q){bK=bE;bL=a6}else{aw=+h[64800+(be*688&-1)>>3];bB=+Z(+(a6*aw));bK=+Z(+(bE*aw));bL=bB}bB=+h[o+(al<<6)+24>>3];if(bj){bM=bH;bN=bB}else{aw=+h[64800+(k*688&-1)>>3];bE=+Z(+(bB*aw));bM=+Z(+(bH*aw));bN=bE}bO=bA-bz;bP=bD-bC;bQ=bG-bF;bR=bJ-bI;bS=bL-bK;bT=bN-bM}else{bM=+h[o+8>>3];bN=+h[o+16>>3];bK=+h[o+24>>3];bO=+h[o+(r<<6)+8>>3]-bM;bP=+h[o+(r<<6)+16>>3]-bN;bQ=+h[o+(r<<6)+24>>3]-bK;bR=+h[o+(al<<6)+8>>3]-bM;bS=+h[o+(al<<6)+16>>3]-bN;bT=+h[o+(al<<6)+24>>3]-bK}bK=bO/az;bO=bP/az;bP=bQ/az;az=bR/af;bR=bS/af;bS=bT/af;af=(bK+az)*.5;bT=(bO+bR)*.5;bQ=(bP+bS)*.5;bN=(bK-az)*.5;bM=(bO-bR)*.5;bL=(bP-bS)*.5;if((s|0)<=0){i=e;return}al=b+304|0;r=o+8|0;k=b+308|0;bj=o+16|0;be=b+312|0;b=o+24|0;q=(av|0)>0;a$=l|0;ay=l+8|0;bw=l+16|0;bh=l+24|0;bf=l+32|0;bu=l+40|0;bi=l+48|0;bv=l+56|0;bx=l+64|0;p=l+72|0;bk=l+80|0;bg=l+88|0;a8=aN>2]|0;bI=+h[r>>3];if((a[64788+(aR*688&-1)|0]&1)==0){bU=bI}else{bU=+Z(+(bI*+h[64800+(aR*688&-1)>>3]))}bI=+(am|0);aR=c[k>>2]|0;bJ=+h[bj>>3];if((a[64788+(aR*688&-1)|0]&1)==0){bV=bJ}else{bV=+Z(+(bJ*+h[64800+(aR*688&-1)>>3]))}aR=c[be>>2]|0;bJ=+h[b>>3];if((a[64788+(aR*688&-1)|0]&1)==0){bW=bJ}else{bW=+Z(+(bJ*+h[64800+(aR*688&-1)>>3]))}bX=bS*bI+bW;bY=bR*bI+bV;bZ=az*bI+bU}else{bI=+(am|0);bX=bS*bI+ +h[b>>3];bY=bR*bI+ +h[bj>>3];bZ=az*bI+ +h[r>>3]}if(q){aR=u;aU=0;while(1){do{if(aW){bI=+h[o+(aR<<6)+32>>3];if(bI==0.0){break}if(bI>=128.0){au=11354;break}if((c[(c[3524]|0)+96>>2]&512|0)!=0){au=11354}}else{au=11354}}while(0);L15534:do{if((au|0)==11354){au=0;bI=+(aU|0);bJ=bZ+bK*bI;bF=bY+bO*bI;bG=bX+bP*bI;bI=af+bJ;h[a$>>3]=bI;h[ay>>3]=bT+bF;h[bw>>3]=bQ+bG;h[bh>>3]=bN+bJ;h[bf>>3]=bM+bF;h[bu>>3]=bL+bG;h[bi>>3]=bJ-af;h[bv>>3]=bF-bT;h[bx>>3]=bG-bQ;h[p>>3]=bJ-bN;h[bk>>3]=bF-bM;h[bg>>3]=bG-bL;a_=(c[5094]|0)!=0|a9;a0=0;a1=0;bG=bI;while(1){if(a8){if(bGaA){b_=a0}else{au=11358}}else{if(bGaN){b_=a0}else{au=11358}}do{if((au|0)==11358){au=0;bI=+h[l+(a1*24&-1)+8>>3];if(bt){if(bIaL){b_=a0;break}}else{if(bIad){b_=a0;break}}bI=+h[l+(a1*24&-1)+16>>3];if(ba){if(!(bI<=a4&bI>=a5|a_)){b_=a0;break}}else{if(!(bI<=a5&bI>=a4|a_)){b_=a0;break}}b_=a0+1|0}}while(0);aC=a1+1|0;if((aC|0)>=4){break}a0=b_;a1=aC;bG=+h[l+(aC*24&-1)>>3]}if((b_|0)<=0){break}c[bn>>2]=3;a1=(b_|0)<4;a0=0;do{do{if(n){bG=(+h[l+(a0*24&-1)>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;bI=(+h[l+(a0*24&-1)+8>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;bF=(+h[l+(a0*24&-1)+16>>3]- +h[5279])*+h[2]+ +h[12]+-1.0;bJ=+h[406]+bG*+h[394]+bI*+h[398]+bF*+h[402];bC=bJ==0.0?1.0e-5:bJ;a_=~~((+h[403]+bG*+h[391]+bI*+h[395]+bF*+h[399])/bC*+(c[180]|0))+(c[186]|0)|0;aC=~~((+h[404]+bG*+h[392]+bI*+h[396]+bF*+h[400])/bC*+(c[40]|0))+(c[46]|0)|0;c[m+(a0*12&-1)>>2]=a_;c[m+(a0*12&-1)+4>>2]=aC;b$=a_;b0=aC}else{aC=c[200]|0;bC=+(c[64768+(aC*688&-1)>>2]|0);if(!by){a_=~~(bC+(+h[l+(a0*24&-1)>>3]- +h[64664+(aC*688&-1)>>3])*+h[64776+(aC*688&-1)>>3]+.5);c[m+(a0*12&-1)>>2]=a_;aV=c[144]|0;d=~~(+(c[64768+(aV*688&-1)>>2]|0)+(+h[l+(a0*24&-1)+8>>3]- +h[64664+(aV*688&-1)>>3])*+h[64776+(aV*688&-1)>>3]+.5);c[m+(a0*12&-1)+4>>2]=d;b$=a_;b0=d;break}bF=+h[l+(a0*24&-1)>>3];if((a[64788+(aC*688&-1)|0]&1)==0){b1=bF}else{bI=+_(+bF);b1=bI/+h[64800+(aC*688&-1)>>3]}d=~~(bC+(b1- +h[64664+(aC*688&-1)>>3])*+h[64776+(aC*688&-1)>>3]+.5);c[m+(a0*12&-1)>>2]=d;aC=c[144]|0;bC=+(c[64768+(aC*688&-1)>>2]|0);bI=+h[l+(a0*24&-1)+8>>3];if((a[64788+(aC*688&-1)|0]&1)==0){b2=bI}else{bF=+_(+bI);b2=bF/+h[64800+(aC*688&-1)>>3]}a_=~~(bC+(b2- +h[64664+(aC*688&-1)>>3])*+h[64776+(aC*688&-1)>>3]+.5);c[m+(a0*12&-1)+4>>2]=a_;b$=d;b0=a_}}while(0);do{if(aT){if(!((c[(c[3524]|0)+108>>2]|0)!=0&a1)){break}a_=m+(a0*12&-1)|0;d=c[13542]|0;aC=c[d>>2]|0;if((b$|0)<(aC|0)){c[a_>>2]=aC;b3=aC}else{b3=b$}aC=c[d+4>>2]|0;if((b3|0)>(aC|0)){c[a_>>2]=aC}aC=m+(a0*12&-1)+4|0;a_=c[d+12>>2]|0;if((b0|0)>(a_|0)){c[aC>>2]=a_;b4=a_}else{b4=b0}a_=c[d+8>>2]|0;if((b4|0)>=(a_|0)){break}c[aC>>2]=a_}}while(0);a0=a0+1|0;}while((a0|0)<4);do{if(Y){if((c[o+(aR<<6)>>2]|0)==2){break L15534}a0=o+(aR<<6)+32|0;if((cg(+(+h[a0>>3]))|0)==0){break L15534}bC=+h[a0>>3];bF=+h[8341];do{if(bF>2]|0)==0){break}c[bm>>2]=5;h[bl>>3]=b5;c[bb>>2]=0;cM[c[a0>>2]&511](f)}else{bF=+h[o+(aR<<6)+40>>3];bC=+h[8341];do{if(bC>24==112&1|0);b7=a0;break}bI=(bF-bC)/(bG-bC);a0=a[20668]|0;if(a0<<24>>24==112){b6=bI;b7=112;break}b6=1.0-bI;b7=a0}else{a0=a[20668]|0;b6=+(a0<<24>>24!=112&1|0);b7=a0}}while(0);a0=~~(b6*255.0+.5);bF=+h[o+(aR<<6)+48>>3];do{if(bC>24==112&1|0);b9=b7;break}bG=(bF-bC)/(bI-bC);if(b7<<24>>24==112){b8=bG;b9=112;break}b8=1.0-bG;b9=b7}else{b8=+(b7<<24>>24!=112&1|0);b9=b7}}while(0);a1=~~(b8*255.0+.5);bF=+h[o+(aR<<6)+56>>3];do{if(bC>24==112&1|0);break}bI=(bF-bC)/(bG-bC);if(b9<<24>>24==112){ca=bI;break}ca=1.0-bI}else{ca=+(b9<<24>>24!=112&1|0)}}while(0);a_=(c[3524]|0)+144|0;if((c[a_>>2]|0)==0){break}c[aZ>>2]=3;c[a2>>2]=((a1<<8)+(a0<<16)|0)+~~(ca*255.0+.5);h[aP>>3]=0.0;cM[c[a_>>2]&511](g)}}while(0);do{if(aW){a_=~~(+h[o+(aR<<6)+32>>3]*100.0/255.0);if((a_|0)==0){break L15534}if((c[(c[3524]|0)+96>>2]&512|0)==0){break}c[bn>>2]=a_<<4|4}}while(0);a_=c[3524]|0;do{if(aT){aC=c[a_+108>>2]|0;if((aC|0)==0){break}d=c[bd>>2]|0;aV=c[bc>>2]|0;aS=c[aX>>2]|0;a3=c[aY>>2]|0;j=aV-d|0;aO=a3-aS|0;cI[aC&63](c[bn>>2]|0,(d|0)<(aV|0)?d:aV,(aS|0)<(a3|0)?aS:a3,(j|0)>-1?j:-j|0,(aO|0)>-1?aO:-aO|0);break L15534}}while(0);cN[c[a_+148>>2]&255](4,bo)}}while(0);aO=aU+1|0;if((aO|0)<(av|0)){aR=aR+1|0;aU=aO}else{break}}cb=av+u|0}else{cb=u}aU=am+1|0;if((aU|0)<(s|0)){am=aU;u=cb}else{break}}i=e;return}function f4(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0.0,g=0;d=c[(c[9732]|0)+320>>2]|0;e=+h[d+(c[a>>2]<<6)+8>>3];f=+h[d+(c[b>>2]<<6)+8>>3];if(ef&1;return g|0}function f5(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0;c=+h[a+16>>3];d=+h[b+16>>3];if(c>d){e=1;return e|0}e=(c>31;return e|0}function f6(b,d,e,f,g){b=b|0;d=+d;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0,w=0,x=0.0,y=0.0,z=0,A=0,B=0,C=0,D=0.0,E=0.0,F=0.0,G=0,H=0,I=0,J=0.0,K=0.0,L=0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0;j=i;i=i+96|0;k=f;f=i;i=i+56|0;uD(f,k,56);k=j|0;l=j+16|0;m=j+32|0;n=j+40|0;o=j+48|0;p=j+56|0;q=j+64|0;r=j+80|0;s=j+88|0;t=c[3524]|0;u=+(aa(c[t+24>>2]|0,c[1400]|0)|0);if((e|0)==0){v=65064+(b*688&-1)|0}else{v=65056+(b*688&-1)|0}w=~~(u*+h[v>>3]);v=c[200]|0;u=+(c[64768+(v*688&-1)>>2]|0);x=+h[64664+(v*688&-1)>>3];y=+h[64776+(v*688&-1)>>3];v=~~(u+(d-x)*y+.5);L15653:do{if((g|0)==0){z=e}else{A=(a[64788+(b*688&-1)|0]&1)==0;B=64800+(b*688&-1)|0;C=g;while(1){D=+h[C>>3];if(A){E=D}else{F=+_(+D);E=F/+h[B>>3]}G=~~(u+(E-x)*y+.5)-v|0;if((((G|0)>-1?G:-G|0)|0)<3){z=0;break L15653}G=c[C+16>>2]|0;if((G|0)==0){z=e;break}else{C=G}}}}while(0);e=c[f+4>>2]|0;if((e|0)>-3){g=t+168|0;cM[c[g>>2]&511](3);C=q;B=f+40|0;c[C>>2]=c[B>>2];c[C+4>>2]=c[B+4>>2];c[C+8>>2]=c[B+8>>2];c[C+12>>2]=c[B+12>>2];do{if((c[f>>2]|0)!=0){y=+h[f+24>>3];B=c[(c[3524]|0)+92>>2]|0;if(y<0.0){cK[B&63](+h[3817]);break}else{cK[B&63](y);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[f+16>>3]);B=c[(c[3524]|0)+64>>2]|0;if((e|0)<-5){cM[B&511](-2)}else{cM[B&511](e)}B=c[3524]|0;do{if((a[f+32|0]&1)==0){if((c[B+96>>2]&1024|0)!=0){break}c[q>>2]=1;c[q+4>>2]=e;H=11474}else{H=11474}}while(0);if((H|0)==11474){fn(q,B)}L15680:do{if(+h[3815]!=0.0){B=c[200]|0;q=c[64768+(B*688&-1)>>2]|0;y=+h[64664+(B*688&-1)>>3];x=+h[64776+(B*688&-1)>>3];B=~~(+(q|0)+(d-y)*x+.5);e=c[144]|0;f=c[64768+(e*688&-1)>>2]|0;E=+h[64664+(e*688&-1)>>3];u=+h[64776+(e*688&-1)>>3];e=~~(+(f|0)+(0.0-E)*u+.5);F=+h[4483];do{if(F=D){break}h[4483]=D}}while(0);C=2;A=B;G=e;F=0.0;D=d;I=q;J=y;K=x;L=f;M=E;N=u;while(1){O=D*.9950041652780258-F*.09983341664682815;P=F*.9950041652780258+D*.09983341664682815;Q=~~(+(I|0)+(O-J)*K+.5);R=~~(+(L|0)+(P-M)*N+.5);c[m>>2]=A;c[n>>2]=G;c[o>>2]=Q;c[p>>2]=R;S=c[3524]|0;if((fl(m,n,o,p)|0)!=0){cN[c[S+56>>2]&255](c[m>>2]|0,c[n>>2]|0);cN[c[S+60>>2]&255](c[o>>2]|0,c[p>>2]|0)}if((C|0)>=64){break L15680}S=c[200]|0;T=c[144]|0;C=C+1|0;A=Q;G=R;F=P;D=O;I=c[64768+(S*688&-1)>>2]|0;J=+h[64664+(S*688&-1)>>3];K=+h[64776+(S*688&-1)>>3];L=c[64768+(T*688&-1)>>2]|0;M=+h[64664+(T*688&-1)>>3];N=+h[64776+(T*688&-1)>>3]}}else{do{if((a[35184]&1)!=0&(v|0)<(c[9335]|0)&(v|0)>(c[9334]|0)){L=c[9337]|0;I=c[7940]|0;if((L|0)<=(I|0)){U=I;break}G=c[9336]|0;A=c[7941]|0;if((G|0)>=(A|0)){U=I;break}if((G|0)>(I|0)){cN[c[t+56>>2]&255](v,I);cN[c[t+60>>2]&255](v,c[9336]|0);V=c[9337]|0;W=c[7941]|0}else{V=L;W=A}if((V|0)>=(W|0)){break L15680}cN[c[t+56>>2]&255](v,V);cN[c[t+60>>2]&255](v,c[7941]|0);break L15680}else{U=c[7940]|0}}while(0);cN[c[t+56>>2]&255](v,U);cN[c[t+60>>2]&255](v,c[7941]|0)}}while(0);U=l;c[U>>2]=c[14084];c[U+4>>2]=c[56340>>2];c[U+8>>2]=c[56344>>2];c[U+12>>2]=c[56348>>2];U=c[14075]|0;do{if((c[14074]|0)!=0){d=+h[7040];V=c[(c[3524]|0)+92>>2]|0;if(d<0.0){cK[V&63](+h[3817]);break}else{cK[V&63](d);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);V=c[(c[3524]|0)+64>>2]|0;if((U|0)<-5){cM[V&511](-2)}else{cM[V&511](U)}V=c[3524]|0;do{if((a[56328]&1)==0){if((c[V+96>>2]&1024|0)!=0){break}c[l>>2]=1;c[l+4>>2]=U;H=11504}else{H=11504}}while(0);if((H|0)==11504){fn(l,V)}cM[c[g>>2]&511](4)}g=t+56|0;cN[c[g>>2]&255](v,c[1394]|0);V=t+60|0;cN[c[V>>2]&255](v,(c[1394]|0)+w|0);l=c[1396]|0;if((l|0)>-1){cN[c[g>>2]&255](v,l);cN[c[V>>2]&255](v,(c[1396]|0)-w|0)}if((z|0)==0){i=j;return}fN(64984+(b*688&-1)|0,r,s,99744);w=64928+(b*688&-1)|0;if((c[w>>2]|0)!=0){fn(w,t)}ln(~~+h[r>>3]+v|0,~~+h[s>>3]+(c[1392]|0)|0,z,c[1398]|0,c[1384]|0,c[6586]|0,c[64924+(b*688&-1)>>2]|0);b=k;c[b>>2]=c[14084];c[b+4>>2]=c[56340>>2];c[b+8>>2]=c[56344>>2];c[b+12>>2]=c[56348>>2];b=c[14075]|0;do{if((c[14074]|0)!=0){d=+h[7040];z=c[(c[3524]|0)+92>>2]|0;if(d<0.0){cK[z&63](+h[3817]);break}else{cK[z&63](d);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);z=c[(c[3524]|0)+64>>2]|0;if((b|0)<-5){cM[z&511](-2)}else{cM[z&511](b)}z=c[3524]|0;do{if((a[56328]&1)==0){if((c[z+96>>2]&1024|0)==0){c[k>>2]=1;c[k+4>>2]=b;break}else{i=j;return}}}while(0);fn(k,z);i=j;return}function f7(b,d,e,f,g){b=b|0;d=+d;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0,w=0,x=0.0,y=0.0,z=0,A=0,B=0,C=0,D=0.0,E=0.0,F=0.0,G=0,H=0,I=0.0,J=0.0,K=0,L=0,M=0,N=0;j=i;i=i+96|0;k=f;f=i;i=i+56|0;uD(f,k,56);k=j|0;l=j+16|0;m=j+32|0;n=j+40|0;o=j+48|0;p=j+56|0;q=j+64|0;r=j+80|0;s=j+88|0;t=c[3524]|0;u=+(aa(c[t+28>>2]|0,c[1400]|0)|0);if((e|0)==0){v=65064+(b*688&-1)|0}else{v=65056+(b*688&-1)|0}w=~~(u*+h[v>>3]);v=c[144]|0;u=+(c[64768+(v*688&-1)>>2]|0);x=+h[64664+(v*688&-1)>>3];y=+h[64776+(v*688&-1)>>3];v=~~(u+(d-x)*y+.5);L15753:do{if((g|0)==0){z=e}else{A=(a[64788+(b*688&-1)|0]&1)==0;B=64800+(b*688&-1)|0;C=g;while(1){D=+h[C>>3];if(A){E=D}else{F=+_(+D);E=F/+h[B>>3]}G=~~(u+(E-x)*y+.5)-v|0;if((((G|0)>-1?G:-G|0)|0)<3){z=0;break L15753}G=c[C+16>>2]|0;if((G|0)==0){z=e;break}else{C=G}}}}while(0);e=c[f+4>>2]|0;if((e|0)>-3){g=t+168|0;cM[c[g>>2]&511](3);C=q;B=f+40|0;c[C>>2]=c[B>>2];c[C+4>>2]=c[B+4>>2];c[C+8>>2]=c[B+8>>2];c[C+12>>2]=c[B+12>>2];do{if((c[f>>2]|0)!=0){y=+h[f+24>>3];B=c[(c[3524]|0)+92>>2]|0;if(y<0.0){cK[B&63](+h[3817]);break}else{cK[B&63](y);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[f+16>>3]);B=c[(c[3524]|0)+64>>2]|0;if((e|0)<-5){cM[B&511](-2)}else{cM[B&511](e)}B=c[3524]|0;do{if((a[f+32|0]&1)==0){if((c[B+96>>2]&1024|0)!=0){break}c[q>>2]=1;c[q+4>>2]=e;H=11546}else{H=11546}}while(0);if((H|0)==11546){fn(q,B)}L15780:do{if(+h[3815]!=0.0){y=+h[4483];do{if(y=x){break}h[4483]=x}}while(0);B=c[200]|0;q=c[64768+(B*688&-1)>>2]|0;y=+h[64664+(B*688&-1)>>3];x=+h[64776+(B*688&-1)>>3];B=~~(+(q|0)+(0.0-y)*x+.5);e=c[144]|0;f=c[64768+(e*688&-1)>>2]|0;E=+h[64664+(e*688&-1)>>3];u=+h[64776+(e*688&-1)>>3];e=~~(+(f|0)+(d-E)*u+.5);c[8490]=B;c[8488]=e;F=d;D=0.0;C=2;A=B;B=e;e=q;I=y;y=x;q=f;x=E;E=u;while(1){u=D*.9950041652780258-F*.09983341664682815;J=F*.9950041652780258+D*.09983341664682815;f=~~(+(e|0)+(u-I)*y+.5);G=~~(+(q|0)+(J-x)*E+.5);c[m>>2]=A;c[n>>2]=B;c[o>>2]=f;c[p>>2]=G;K=c[3524]|0;if((fl(m,n,o,p)|0)!=0){cN[c[K+56>>2]&255](c[m>>2]|0,c[n>>2]|0);cN[c[K+60>>2]&255](c[o>>2]|0,c[p>>2]|0)}c[8490]=f;c[8488]=G;if((C|0)>=64){break L15780}K=c[200]|0;L=c[144]|0;F=J;D=u;C=C+1|0;A=f;B=G;e=c[64768+(K*688&-1)>>2]|0;I=+h[64664+(K*688&-1)>>3];y=+h[64776+(K*688&-1)>>3];q=c[64768+(L*688&-1)>>2]|0;x=+h[64664+(L*688&-1)>>3];E=+h[64776+(L*688&-1)>>3]}}else{do{if((a[35184]&1)!=0&(v|0)<(c[9337]|0)&(v|0)>(c[9336]|0)){q=c[9334]|0;e=c[7939]|0;if((q|0)>=(e|0)){break}B=c[9335]|0;A=c[7938]|0;if((B|0)<=(A|0)){break}if((q|0)>(A|0)){cN[c[t+56>>2]&255](A,v);cN[c[t+60>>2]&255](c[9334]|0,v);M=c[9335]|0;N=c[7939]|0}else{M=B;N=e}if((M|0)>=(N|0)){break L15780}cN[c[t+56>>2]&255](M,v);cN[c[t+60>>2]&255](c[7939]|0,v);break L15780}}while(0);cN[c[t+56>>2]&255](c[7938]|0,v);cN[c[t+60>>2]&255](c[7939]|0,v)}}while(0);M=l;c[M>>2]=c[14084];c[M+4>>2]=c[56340>>2];c[M+8>>2]=c[56344>>2];c[M+12>>2]=c[56348>>2];M=c[14075]|0;do{if((c[14074]|0)!=0){d=+h[7040];N=c[(c[3524]|0)+92>>2]|0;if(d<0.0){cK[N&63](+h[3817]);break}else{cK[N&63](d);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);N=c[(c[3524]|0)+64>>2]|0;if((M|0)<-5){cM[N&511](-2)}else{cM[N&511](M)}N=c[3524]|0;do{if((a[56328]&1)==0){if((c[N+96>>2]&1024|0)!=0){break}c[l>>2]=1;c[l+4>>2]=M;H=11575}else{H=11575}}while(0);if((H|0)==11575){fn(l,N)}cM[c[g>>2]&511](4)}g=t+56|0;cN[c[g>>2]&255](c[1394]|0,v);N=t+60|0;cN[c[N>>2]&255]((c[1394]|0)+w|0,v);l=c[1396]|0;if((l|0)>-1){cN[c[g>>2]&255](l,v);cN[c[N>>2]&255]((c[1396]|0)-w|0,v)}if((z|0)==0){i=j;return}fN(64984+(b*688&-1)|0,r,s,94352);w=64928+(b*688&-1)|0;if((c[w>>2]|0)!=0){fn(w,t)}ln(~~+h[r>>3]+(c[1392]|0)|0,~~+h[s>>3]+v|0,z,c[1398]|0,c[1384]|0,c[6586]|0,c[64924+(b*688&-1)>>2]|0);b=k;c[b>>2]=c[14084];c[b+4>>2]=c[56340>>2];c[b+8>>2]=c[56344>>2];c[b+12>>2]=c[56348>>2];b=c[14075]|0;do{if((c[14074]|0)!=0){d=+h[7040];z=c[(c[3524]|0)+92>>2]|0;if(d<0.0){cK[z&63](+h[3817]);break}else{cK[z&63](d);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[7039]);z=c[(c[3524]|0)+64>>2]|0;if((b|0)<-5){cM[z&511](-2)}else{cM[z&511](b)}z=c[3524]|0;do{if((a[56328]&1)==0){if((c[z+96>>2]&1024|0)==0){c[k>>2]=1;c[k+4>>2]=b;break}else{i=j;return}}}while(0);fn(k,z);i=j;return}function f8(a){a=a|0;var b=0;if((a|0)==0){return}b=c[a+116>>2]|0;if((b|0)!=0){uu(b)}b=a+48|0;a=c[b>>2]|0;if((a|0)==0){return}else{f8(a);uu(c[b>>2]|0);c[b>>2]=0;return}}function f9(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0,w=0;e=i;i=i+88|0;f=e|0;g=e+16|0;j=e+32|0;if((c[b+316>>2]|0)==0){k=0;i=e;return k|0}l=c[b+64>>2]|0;if(+h[b+72>>3]<0.0&(l|0)==3){m=(c[3524]|0)+144|0;if((c[m>>2]|0)==0){k=1;i=e;return k|0}n=~~+h[d>>3];c[g>>2]=3;c[g+4>>2]=n;h[g+8>>3]=0.0;cM[c[m>>2]&511](g);k=1;i=e;return k|0}if((l|0)==6){o=+h[d>>3];p=+h[8341];do{if(p>2]|0)==0){k=1;i=e;return k|0}c[f>>2]=5;h[f+8>>3]=r;c[f+4>>2]=0;cM[c[l>>2]&511](f);k=1;i=e;return k|0}if((c[b+28>>2]|0)!=-6){k=0;i=e;return k|0}b=~~+h[d>>3];d=43280;while(1){t=c[d>>2]|0;if((t|0)==0){u=11624;break}if((c[t+4>>2]|0)==(b|0)){u=11622;break}else{d=t|0}}do{if((u|0)==11624){d=c[8798]|0;f=(d|0)>0;l=b;L15891:while(1){g=43264;while(1){v=c[g>>2]|0;if((v|0)==0){break}if((c[v+4>>2]|0)==(l|0)){break L15891}else{g=v|0}}w=l-1|0;if(!((l|0)>(d|0)&f)){u=11634;break}l=((w|0)%(d|0)&-1)+1|0}if((u|0)==11634){c[j+4>>2]=w;c[j+40>>2]=1;c[j+44>>2]=w;c[j+8>>2]=w;break}d=j;f=v+8|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];c[d+16>>2]=c[f+16>>2];c[d+20>>2]=c[f+20>>2];c[d+24>>2]=c[f+24>>2];c[d+28>>2]=c[f+28>>2];c[d+32>>2]=c[f+32>>2];c[d+36>>2]=c[f+36>>2];c[d+40>>2]=c[f+40>>2];c[d+44>>2]=c[f+44>>2];c[d+48>>2]=c[f+48>>2];c[d+52>>2]=c[f+52>>2];if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[j+4>>2]=l;a[j+32|0]=0;break}if((a[j+32|0]&1)!=0){break}c[j+40>>2]=1;c[j+44>>2]=c[j+4>>2]}else if((u|0)==11622){f=j;d=t+8|0;c[f>>2]=c[d>>2];c[f+4>>2]=c[d+4>>2];c[f+8>>2]=c[d+8>>2];c[f+12>>2]=c[d+12>>2];c[f+16>>2]=c[d+16>>2];c[f+20>>2]=c[d+20>>2];c[f+24>>2]=c[d+24>>2];c[f+28>>2]=c[d+28>>2];c[f+32>>2]=c[d+32>>2];c[f+36>>2]=c[d+36>>2];c[f+40>>2]=c[d+40>>2];c[f+44>>2]=c[d+44>>2];c[f+48>>2]=c[d+48>>2];c[f+52>>2]=c[d+52>>2];if((a[j+32|0]&1)!=0){break}c[j+40>>2]=1;c[j+44>>2]=c[j+4>>2]}}while(0);fn(j+40|0,c[3524]|0);k=1;i=e;return k|0}function ga(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;do{if((b|0)!=0){if((a[b]|0)==0){break}f=(uA(b|0)|0)+2|0;g=ut(f)|0;do{if((g|0)==0){gk();h=ut(f)|0;if((h|0)!=0){j=h;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=87472,v)|0);return 0}else{j=g}}while(0);uB(j|0,b|0);g=j+(uA(j|0)|0)|0;w=10;a[g]=w&255;w=w>>8;a[g+1|0]=w&255;g=a8(j|0,10)|0;if((g|0)==0){k=0;l=0}else{f=j;h=0;m=0;n=g;while(1){a[n]=0;g=lp(f)|0;o=(g|0)>(h|0)?g:h;if((g|m|0)==0){if((a[b]|0)==10){p=11654}else{q=m}}else{p=11654}if((p|0)==11654){p=0;q=m+1|0}g=n+1|0;r=a8(g|0,10)|0;if((r|0)==0){k=o;l=q;break}else{f=g;h=o;m=q;n=r}}}if((d|0)!=0){c[d>>2]=l}uu(j);s=k;i=e;return s|0}}while(0);if((d|0)==0){s=0;i=e;return s|0}c[d>>2]=0;s=0;i=e;return s|0}function gb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0;f=b-1|0;g=+h[a+(f<<6)+8>>3];i=+h[a+(f<<6)+16>>3];j=+h[a+(b<<6)+8>>3];k=+h[a+(b<<6)+16>>3];f=(c[a+(b<<6)>>2]|0)==0;l=f?j:g;m=f?k:i;n=f?g:j;j=f?i:k;f=n==-8.988465674311579e+307;b=j==-8.988465674311579e+307;if(f|b){h[d>>3]=l;h[e>>3]=m;if(!f){h[e>>3]=+h[64664+((c[144]|0)*688&-1)>>3];o=4;return o|0}if(b){o=5;return o|0}h[d>>3]=+h[64664+((c[200]|0)*688&-1)>>3];o=1;return o|0}do{if(m==j){h[e>>3]=m;b=l>3];do{if(b){if(!(kn)){p=11674;break}q=+h[64664+(f*688&-1)>>3];p=11677}else{if(!(kl)){p=11674;break}r=+h[64664+(f*688&-1)>>3];p=11678}}while(0);do{if((p|0)==11674){if(k==l){i=+h[64664+(f*688&-1)>>3];if(b){q=i;p=11677;break}else{r=i;p=11678;break}}h[d>>3]=k;o=2;return o|0}}while(0);if((p|0)==11677){if(qn){break}else{s=q}}else if((p|0)==11678){if(rl){break}else{s=r}}if(s==l){break}h[d>>3]=s;o=1;return o|0}else{if(l==n){h[d>>3]=l;b=m>3];do{if(b){if(!(kj)){p=11687;break}t=+h[64664+(f*688&-1)>>3];p=11690}else{if(!(km)){p=11687;break}u=+h[64664+(f*688&-1)>>3];p=11691}}while(0);do{if((p|0)==11687){if(k==m){i=+h[64664+(f*688&-1)>>3];if(b){t=i;p=11690;break}else{u=i;p=11691;break}}h[e>>3]=k;o=8;return o|0}}while(0);if((p|0)==11691){if(um){break}else{v=u}}else if((p|0)==11690){if(tj){break}else{v=t}}if(v==m){break}h[e>>3]=v;o=4;return o|0}b=m>3];do{if(b){if(!(kj)){p=11699;break}w=+h[64672+(f*688&-1)>>3];p=11705}else{if(!(km)){p=11699;break}x=+h[64672+(f*688&-1)>>3];p=11706}}while(0);if((p|0)==11699){do{if(k!=m&k!=j){i=l+(k-m)*((n-l)/(j-m));y=c[200]|0;g=+h[64664+(y*688&-1)>>3];z=+h[64672+(y*688&-1)>>3];if(gz){break}}else{if(ig){break}}h[d>>3]=i;h[e>>3]=+h[a>>3];o=4;return o|0}}while(0);i=+h[64672+(f*688&-1)>>3];if(b){w=i;p=11705}else{x=i;p=11706}}if((p|0)==11706){if(xm){A=x}else{B=x;p=11707}}else if((p|0)==11705){if(wj){A=w}else{B=w;p=11707}}do{if((p|0)==11707){a=64672+(f*688&-1)|0;if(!(B!=m&B!=j)){A=B;break}i=l+(B-m)*((n-l)/(j-m));y=c[200]|0;g=+h[64664+(y*688&-1)>>3];z=+h[64672+(y*688&-1)>>3];if(gz){A=B;break}}else{if(ig){A=B;break}}h[d>>3]=i;h[e>>3]=+h[a>>3];o=8;return o|0}}while(0);f=l>3];do{if(f){if(!(in)){p=11717;break}C=+h[64672+(b*688&-1)>>3];p=11723}else{if(!(il)){p=11717;break}D=+h[64672+(b*688&-1)>>3];p=11724}}while(0);if((p|0)==11717){do{if(i!=l&i!=n){g=m+(i-l)*((j-m)/(n-l));if(kA){break}}else{if(gk){break}}h[d>>3]=i;h[e>>3]=g;o=1;return o|0}}while(0);i=+h[64672+(b*688&-1)>>3];if(f){C=i;p=11723}else{D=i;p=11724}}if((p|0)==11724){if(Dl){break}else{E=D}}else if((p|0)==11723){if(Cn){break}else{E=C}}if(!(E!=l&E!=n)){break}i=m+(E-l)*((j-m)/(n-l));if(kA){break}}else{if(ik){break}}h[d>>3]=E;h[e>>3]=i;o=2;return o|0}}while(0);h[d>>3]=l;h[e>>3]=m;o=0;return o|0}function gc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0;f=b-1|0;g=+h[a+(f<<6)+8>>3];i=+h[a+(f<<6)+16>>3];j=+h[a+(b<<6)+8>>3];k=+h[a+(b<<6)+16>>3];b=g==-8.988465674311579e+307;a=j==-8.988465674311579e+307;f=i==-8.988465674311579e+307;l=k==-8.988465674311579e+307;if((((a?b?2:1:b&1)+(f&1)|0)+(l&1)|0)>1){m=0;return m|0}if(a|b){n=b?k:i;a=c[200]|0;o=64672+(a*688&-1)|0;p=+h[o>>3];q=+h[64664+(a*688&-1)>>3];if((b?j:g)<=(p>q?p:q)){m=0;return m|0}b=c[144]|0;p=+h[64664+(b*688&-1)>>3];r=+h[64672+(b*688&-1)>>3];do{if(pr){m=0}else{break}return m|0}else{if(np){m=0}else{break}return m|0}}while(0);h[d>>3]=q;h[e>>3]=n;h[d+8>>3]=+h[o>>3];h[e+8>>3]=n;m=1;return m|0}if(l|f){n=f?j:g;l=c[144]|0;o=64664+(l*688&-1)|0;q=+h[o>>3];b=64672+(l*688&-1)|0;p=+h[b>>3];if((f?k:i)<=(q>p?q:p)){m=0;return m|0}f=c[200]|0;p=+h[64664+(f*688&-1)>>3];q=+h[64672+(f*688&-1)>>3];do{if(pq){m=0}else{break}return m|0}else{if(np){m=0}else{break}return m|0}}while(0);h[d>>3]=n;h[e>>3]=+h[o>>3];h[d+8>>3]=n;h[e+8>>3]=+h[b>>3];m=1;return m|0}b=g==j;o=i==k;if(b&o){m=0;return m|0}if(b){b=c[200]|0;n=+h[64664+(b*688&-1)>>3];p=+h[64672+(b*688&-1)>>3];do{if(np){m=0}else{break}return m|0}else{if(gn){m=0}else{break}return m|0}}while(0);b=c[144]|0;f=64664+(b*688&-1)|0;n=+h[f>>3];do{if(ik){m=0}else{break}return m|0}else{if(ni){m=0}else{break}return m|0}}while(0);h[d>>3]=g;h[e>>3]=+h[f>>3];h[d+8>>3]=g;h[e+8>>3]=+h[64672+(b*688&-1)>>3];m=1;return m|0}if(o){o=c[144]|0;n=+h[64664+(o*688&-1)>>3];p=+h[64672+(o*688&-1)>>3];do{if(np){m=0}else{break}return m|0}else{if(in){m=0}else{break}return m|0}}while(0);o=c[200]|0;n=+h[64664+(o*688&-1)>>3];do{if(gj){m=0}else{break}return m|0}else{if(ng){m=0}else{break}return m|0}}while(0);h[d>>3]=n;h[e>>3]=i;h[d+8>>3]=+h[64672+(o*688&-1)>>3];h[e+8>>3]=i;m=1;return m|0}else{o=c[200]|0;b=64664+(o*688&-1)|0;n=j-g;j=(+h[b>>3]-g)/n;f=64672+(o*688&-1)|0;p=(+h[f>>3]-g)/n;o=j>p;q=o?j:p;r=o?p:j;o=c[144]|0;l=64664+(o*688&-1)|0;j=k-i;k=(+h[l>>3]-i)/j;a=64672+(o*688&-1)|0;p=(+h[a>>3]-i)/j;o=k>p;s=o?k:p;t=o?p:k;k=r>t?r:t;t=k>0.0?k:0.0;k=qs){m=0;return m|0}h[d>>3]=g+n*t;h[e>>3]=i+j*t;h[d+8>>3]=g+n*s;h[e+8>>3]=i+j*s;s=+h[b>>3];j=+h[f>>3];i=(j-s)*1.0e-5;n=s-i;s=j+i;i=+h[d>>3];if(ns)){u=11778}}else{if(!(in)){u=11778}}do{if((u|0)==11778){n=+h[l>>3];i=+h[a>>3];s=(i-n)*1.0e-5;j=n-s;n=i+s;s=+h[e>>3];if(jn){break}else{m=1}return m|0}else{if(sj){break}else{m=1}return m|0}}}while(0);m=0;return m|0}return 0}function gd(a,b,d,e,f){a=a|0;b=b|0;d=+d;e=+e;f=+f;var g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0;g=i;i=i+24|0;j=g|0;k=g+8|0;l=g+16|0;m=c[3524]|0;n=c[200]|0;c[j>>2]=~~(+(c[64768+(n*688&-1)>>2]|0)+(d- +h[64664+(n*688&-1)>>3])*+h[64776+(n*688&-1)>>3]+.5);n=c[144]|0;d=+(c[64768+(n*688&-1)>>2]|0);o=+h[64664+(n*688&-1)>>3];p=+h[64776+(n*688&-1)>>3];c[k>>2]=~~(d+(e-o)*p+.5);c[l>>2]=~~(d+(f-o)*p+.5);if((fl(j,k,j,l)|0)==0){i=g;return}n=c[j>>2]|0;cN[c[m+56>>2]&255](n,c[k>>2]|0);k=c[l>>2]|0;cN[c[m+60>>2]&255](n,k);c[a>>2]=n;c[b>>2]=k;i=g;return}function ge(a,b,d,e,f){a=a|0;b=b|0;d=+d;e=+e;f=+f;var g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0;g=i;i=i+24|0;j=g|0;k=g+8|0;l=g+16|0;m=c[3524]|0;n=c[200]|0;o=+(c[64768+(n*688&-1)>>2]|0);p=+h[64664+(n*688&-1)>>3];q=+h[64776+(n*688&-1)>>3];c[j>>2]=~~(o+(d-p)*q+.5);c[k>>2]=~~(o+(e-p)*q+.5);n=c[144]|0;c[l>>2]=~~(+(c[64768+(n*688&-1)>>2]|0)+(f- +h[64664+(n*688&-1)>>3])*+h[64776+(n*688&-1)>>3]+.5);if((fl(j,l,k,l)|0)==0){i=g;return}n=c[l>>2]|0;cN[c[m+56>>2]&255](c[j>>2]|0,n);j=c[k>>2]|0;cN[c[m+60>>2]&255](j,n);c[a>>2]=j;c[b>>2]=n;i=g;return}function gf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0.0;f=b-1|0;g=+h[a+(f<<6)+8>>3];i=+h[a+(f<<6)+16>>3];j=+h[a+(b<<6)+8>>3];k=+h[a+(b<<6)+16>>3];if((c[a+(b<<6)>>2]|0)==0){b=c[200]|0;a=64664+(b*688&-1)|0;l=+h[a>>3];f=64672+(b*688&-1)|0;m=+h[f>>3];if(lm){n=11829}else{n=11821}}else{if(gl){n=11829}else{n=11821}}if((n|0)==11829){h[e>>3]=k;l=+h[a>>3];m=+h[f>>3];do{if(lm){o=m;break}if(j>=l){o=j;break}o=l}else{if(j>l){o=l;break}if(j>=m){o=j;break}o=m}}while(0);h[d>>3]=o;return}else if((n|0)==11821){h[d>>3]=g;f=c[144]|0;o=+h[64664+(f*688&-1)>>3];m=+h[64672+(f*688&-1)>>3];do{if(om){p=m;break}if(i>=o){p=i;break}p=o}else{if(i>o){p=o;break}if(i>=m){p=i;break}p=m}}while(0);h[e>>3]=p;return}}else{f=c[144]|0;a=64664+(f*688&-1)|0;p=+h[a>>3];b=64672+(f*688&-1)|0;m=+h[b>>3];if(pm){n=11848}else{n=11840}}else{if(kp){n=11848}else{n=11840}}if((n|0)==11840){h[e>>3]=k;f=c[200]|0;p=+h[64664+(f*688&-1)>>3];m=+h[64672+(f*688&-1)>>3];do{if(pm){q=m;break}if(j>=p){q=j;break}q=p}else{if(j>p){q=p;break}if(j>=m){q=j;break}q=m}}while(0);h[d>>3]=q;return}else if((n|0)==11848){h[d>>3]=g;g=+h[a>>3];q=+h[b>>3];do{if(gq){r=q;break}if(k>=g){r=k;break}r=g}else{if(k>g){r=g;break}if(k>=q){r=k;break}r=q}}while(0);h[e>>3]=r;return}}}function gg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0.0;f=b-1|0;g=+h[a+(f<<6)+8>>3];i=+h[a+(f<<6)+16>>3];j=+h[a+(b<<6)+8>>3];k=+h[a+(b<<6)+16>>3];if((c[a+(b<<6)>>2]|0)==0){b=c[144]|0;a=64664+(b*688&-1)|0;l=+h[a>>3];f=64672+(b*688&-1)|0;m=+h[f>>3];if(lm){n=11873}else{n=11865}}else{if(il){n=11873}else{n=11865}}if((n|0)==11865){h[e>>3]=i;b=c[200]|0;l=+h[64664+(b*688&-1)>>3];m=+h[64672+(b*688&-1)>>3];do{if(lm){o=m;break}if(g>=l){o=g;break}o=l}else{if(g>l){o=l;break}if(g>=m){o=g;break}o=m}}while(0);h[d>>3]=o;return}else if((n|0)==11873){h[d>>3]=j;o=+h[a>>3];m=+h[f>>3];do{if(om){p=m;break}if(i>=o){p=i;break}p=o}else{if(i>o){p=o;break}if(i>=m){p=i;break}p=m}}while(0);h[e>>3]=p;return}}else{f=c[200]|0;a=64664+(f*688&-1)|0;p=+h[a>>3];b=64672+(f*688&-1)|0;m=+h[b>>3];if(pm){n=11892}else{n=11884}}else{if(jp){n=11892}else{n=11884}}if((n|0)==11892){h[e>>3]=i;i=+h[a>>3];p=+h[b>>3];do{if(ip){q=p;break}if(j>=i){q=j;break}q=i}else{if(j>i){q=i;break}if(j>=p){q=j;break}q=p}}while(0);h[d>>3]=q;return}else if((n|0)==11884){h[d>>3]=j;d=c[144]|0;j=+h[64664+(d*688&-1)>>3];q=+h[64672+(d*688&-1)>>3];do{if(jq){r=q;break}if(k>=j){r=k;break}r=j}else{if(k>j){r=j;break}if(k>=q){r=k;break}r=q}}while(0);h[e>>3]=r;return}}}function gh(b,d,e,f,g,j,k,l,m){b=+b;d=+d;e=+e;f=+f;g=+g;j=+j;k=+k;l=+l;m=m|0;var n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0.0,D=0.0,E=0.0,F=0.0,G=0,H=0,I=0.0,J=0.0,K=0,L=0,M=0.0;n=i;i=i+224|0;o=n|0;p=n+96|0;q=c[m+304>>2]|0;r=+h[64664+(q*688&-1)>>3];s=+h[64672+(q*688&-1)>>3];t=rs?r:s;do{if(tb|ug|ub|tg|tb){r=t-b;v=t;w=(k-e)*r/s+e;x=(l-f)*r/s+f}else{v=b;w=e;x=f}if(u>2]|0;k=+h[64664+(B*688&-1)>>3];g=+h[64672+(B*688&-1)>>3];s=kg?k:g;if(wf&x>f&z>f&A>f){i=n;return}B=c[200]|0;g=+(c[64768+(B*688&-1)>>2]|0);k=+h[64664+(B*688&-1)>>3];u=+h[64776+(B*688&-1)>>3];e=+(~~(g+(v-k)*u+.5)|0);h[p>>3]=e;B=c[144]|0;b=+(c[64768+(B*688&-1)>>2]|0);r=+h[64664+(B*688&-1)>>3];t=+h[64776+(B*688&-1)>>3];C=+(~~(b+(w-r)*t+.5)|0);h[p+8>>3]=C;D=+(~~(g+((q?v:d)-k)*u+.5)|0);h[p+16>>3]=D;d=+(~~(b+(x-r)*t+.5)|0);h[p+24>>3]=d;E=s-x;F=s-A;if(E!=F&E*F<0.0){h[p+40>>3]=+(~~(b+(s-r)*t+.5)|0);h[p+32>>3]=+(~~(g+(v+l*E/(E-F)-k)*u+.5)|0);G=3}else{G=2}F=f-x;E=f-A;if(F!=E&F*E<0.0){h[p+(G<<4)+8>>3]=+(~~(b+(f-r)*t+.5)|0);h[p+(G<<4)>>3]=+(~~(g+(v+l*F/(F-E)-k)*u+.5)|0);H=G+1|0}else{H=G}E=+(~~(g+((q?y:j)-k)*u+.5)|0);h[p+(H<<4)>>3]=E;j=+(~~(b+(A-r)*t+.5)|0);G=H+1|0;h[p+(H<<4)+8>>3]=j;F=+(~~(g+(y-k)*u+.5)|0);h[p+(G<<4)>>3]=F;y=+(~~(b+(z-r)*t+.5)|0);B=H+2|0;h[p+(G<<4)+8>>3]=y;I=s-w;J=s-z;if(I!=J&I*J<0.0){h[p+(B<<4)+8>>3]=+(~~(b+(s-r)*t+.5)|0);h[p+(B<<4)>>3]=+(~~(g+(v+l*I/(I-J)-k)*u+.5)|0);K=H+3|0}else{K=B}J=f-w;I=f-z;if(J!=I&J*I<0.0){h[p+(K<<4)+8>>3]=+(~~(b+(f-r)*t+.5)|0);h[p+(K<<4)>>3]=+(~~(g+(v+l*J/(J-I)-k)*u+.5)|0);L=K+1|0}else{L=K}if((L|0)>0){K=~~(b+(s-r)*t+.5);B=~~(b+(f-r)*t+.5);H=(K|0)<(B|0);f=+(B|0);s=+(K|0);K=0;do{c[o+(K*12&-1)>>2]=~~+h[p+(K<<4)>>3];B=p+(K<<4)+8|0;I=+h[B>>3];do{if(H){if(I>f){h[B>>3]=f;M=f;break}if(I>=s){M=I;break}h[B>>3]=s;M=s}else{if(I>s){h[B>>3]=s;M=s;break}if(I>=f){M=I;break}h[B>>3]=f;M=f}}while(0);c[o+(K*12&-1)+4>>2]=~~M;K=K+1|0;}while((K|0)<(L|0))}if(q){c[o+(L*12&-1)>>2]=x-w+(A-z)<0.0&1}else{z=+(~~(g+(0.0-k)*u+.5)|0);u=+(~~(b+(0.0-r)*t+.5)|0);t=e-z;e=C-u;C=D-z;D=d-u;d=F-z;F=y-u;y=E-z;z=j-u;c[o+(L*12&-1)>>2]=C*C+D*D-(t*t+e*e)+(y*y+z*z-(d*d+F*F))<0.0&1}gj(L,o|0,m);i=n;return}function gi(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var i=0,j=0,k=0.0,l=0.0,m=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0;i=e|d;if((i|0)==12){j=(g&1|0)!=0;g=c[200]|0;if(j){k=+h[64664+(g*688&-1)>>3];l=(k-k)*+h[64776+(g*688&-1)>>3]}else{l=(+h[64672+(g*688&-1)>>3]- +h[64664+(g*688&-1)>>3])*+h[64776+(g*688&-1)>>3]}c[a+((c[b>>2]|0)*12&-1)>>2]=~~(+(c[64768+(g*688&-1)>>2]|0)+l+.5);g=c[144]|0;if((d&8|0)==0){l=+h[64664+(g*688&-1)>>3];m=(l-l)*+h[64776+(g*688&-1)>>3]}else{m=(+h[64672+(g*688&-1)>>3]- +h[64664+(g*688&-1)>>3])*+h[64776+(g*688&-1)>>3]}n=~~(+(c[64768+(g*688&-1)>>2]|0)+m+.5);g=c[b>>2]|0;c[b>>2]=g+1;c[a+(g*12&-1)+4>>2]=n;n=c[200]|0;if(j){m=+h[64664+(n*688&-1)>>3];o=(m-m)*+h[64776+(n*688&-1)>>3]}else{o=(+h[64672+(n*688&-1)>>3]- +h[64664+(n*688&-1)>>3])*+h[64776+(n*688&-1)>>3]}c[a+((c[b>>2]|0)*12&-1)>>2]=~~(+(c[64768+(n*688&-1)>>2]|0)+o+.5);n=c[144]|0;if((e&8|0)==0){o=+h[64664+(n*688&-1)>>3];p=(o-o)*+h[64776+(n*688&-1)>>3]}else{p=(+h[64672+(n*688&-1)>>3]- +h[64664+(n*688&-1)>>3])*+h[64776+(n*688&-1)>>3]}j=~~(+(c[64768+(n*688&-1)>>2]|0)+p+.5);n=c[b>>2]|0;c[b>>2]=n+1;c[a+(n*12&-1)+4>>2]=j;return}else if((i|0)==3){j=c[200]|0;if((d&1|0)==0){q=(+h[64672+(j*688&-1)>>3]- +h[64664+(j*688&-1)>>3])*+h[64776+(j*688&-1)>>3]}else{p=+h[64664+(j*688&-1)>>3];q=(p-p)*+h[64776+(j*688&-1)>>3]}c[a+((c[b>>2]|0)*12&-1)>>2]=~~(+(c[64768+(j*688&-1)>>2]|0)+q+.5);j=(f&8|0)!=0;f=c[144]|0;if(j){r=(+h[64672+(f*688&-1)>>3]- +h[64664+(f*688&-1)>>3])*+h[64776+(f*688&-1)>>3]}else{q=+h[64664+(f*688&-1)>>3];r=(q-q)*+h[64776+(f*688&-1)>>3]}d=~~(+(c[64768+(f*688&-1)>>2]|0)+r+.5);f=c[b>>2]|0;c[b>>2]=f+1;c[a+(f*12&-1)+4>>2]=d;d=c[200]|0;if((e&1|0)==0){s=(+h[64672+(d*688&-1)>>3]- +h[64664+(d*688&-1)>>3])*+h[64776+(d*688&-1)>>3]}else{r=+h[64664+(d*688&-1)>>3];s=(r-r)*+h[64776+(d*688&-1)>>3]}c[a+((c[b>>2]|0)*12&-1)>>2]=~~(+(c[64768+(d*688&-1)>>2]|0)+s+.5);d=c[144]|0;if(j){t=(+h[64672+(d*688&-1)>>3]- +h[64664+(d*688&-1)>>3])*+h[64776+(d*688&-1)>>3]}else{s=+h[64664+(d*688&-1)>>3];t=(s-s)*+h[64776+(d*688&-1)>>3]}j=~~(+(c[64768+(d*688&-1)>>2]|0)+t+.5);d=c[b>>2]|0;c[b>>2]=d+1;c[a+(d*12&-1)+4>>2]=j;return}else{j=c[200]|0;if((i&1|0)==0){u=(+h[64672+(j*688&-1)>>3]- +h[64664+(j*688&-1)>>3])*+h[64776+(j*688&-1)>>3]}else{t=+h[64664+(j*688&-1)>>3];u=(t-t)*+h[64776+(j*688&-1)>>3]}c[a+((c[b>>2]|0)*12&-1)>>2]=~~(+(c[64768+(j*688&-1)>>2]|0)+u+.5);j=c[144]|0;if((i&8|0)==0){u=+h[64664+(j*688&-1)>>3];v=(u-u)*+h[64776+(j*688&-1)>>3]}else{v=(+h[64672+(j*688&-1)>>3]- +h[64664+(j*688&-1)>>3])*+h[64776+(j*688&-1)>>3]}i=~~(+(c[64768+(j*688&-1)>>2]|0)+v+.5);j=c[b>>2]|0;c[b>>2]=j+1;c[a+(j*12&-1)+4>>2]=i;return}}function gj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;if((a|0)<1){return}e=c[d+244>>2]|0;do{if((e|0)==9){f=c[200]|0;c[b+(a*12&-1)>>2]=~~(+(c[64768+(f*688&-1)>>2]|0)+(+h[d+248>>3]- +h[64664+(f*688&-1)>>3])*+h[64776+(f*688&-1)>>3]+.5);f=c[144]|0;c[b+(a*12&-1)+4>>2]=~~(+(c[64768+(f*688&-1)>>2]|0)+(+h[d+256>>3]- +h[64664+(f*688&-1)>>3])*+h[64776+(f*688&-1)>>3]+.5);g=a+1|0}else if((e|0)==1){c[b+(a*12&-1)>>2]=c[b+((a-1|0)*12&-1)>>2];f=a+1|0;c[b+(f*12&-1)>>2]=c[b>>2];i=c[16364]|0;c[b+(f*12&-1)+4>>2]=i;c[b+(a*12&-1)+4>>2]=i;g=a+2|0}else if((e|0)==4){c[b+(a*12&-1)+4>>2]=c[b+((a-1|0)*12&-1)+4>>2];i=a+1|0;c[b+(i*12&-1)+4>>2]=c[b+4>>2];f=c[16537]|0;c[b+(i*12&-1)>>2]=f;c[b+(a*12&-1)>>2]=f;g=a+2|0}else if((e|0)==5|(e|0)==7){f=c[200]|0;i=~~(+(c[64768+(f*688&-1)>>2]|0)+(+h[d+248>>3]- +h[64664+(f*688&-1)>>3])*+h[64776+(f*688&-1)>>3]+.5);f=a+1|0;c[b+(f*12&-1)>>2]=i;c[b+(a*12&-1)>>2]=i;c[b+(a*12&-1)+4>>2]=c[b+((a-1|0)*12&-1)+4>>2];c[b+(f*12&-1)+4>>2]=c[b+4>>2];if((a|0)>0){f=0;j=0;while(1){k=((c[b+(j*12&-1)>>2]|0)+f|0)-i|0;l=j+1|0;if((l|0)<(a|0)){f=k;j=l}else{m=k;break}}}else{m=0}n=a+2|0;o=m;p=12004}else if((e|0)==3){c[b+(a*12&-1)>>2]=c[b+((a-1|0)*12&-1)>>2];j=a+1|0;c[b+(j*12&-1)>>2]=c[b>>2];f=c[16365]|0;c[b+(j*12&-1)+4>>2]=f;c[b+(a*12&-1)+4>>2]=f;g=a+2|0}else if((e|0)==6|(e|0)==8){f=c[144]|0;j=~~(+(c[64768+(f*688&-1)>>2]|0)+(+h[d+248>>3]- +h[64664+(f*688&-1)>>3])*+h[64776+(f*688&-1)>>3]+.5);f=a+1|0;c[b+(f*12&-1)+4>>2]=j;c[b+(a*12&-1)+4>>2]=j;c[b+(a*12&-1)>>2]=c[b+((a-1|0)*12&-1)>>2];c[b+(f*12&-1)>>2]=c[b>>2];if((a|0)>0){f=0;i=0;while(1){k=((c[b+(i*12&-1)+4>>2]|0)+f|0)-j|0;l=i+1|0;if((l|0)<(a|0)){f=k;i=l}else{q=k;break}}}else{q=0}n=a+2|0;o=q;p=12004}else if((e|0)==2){c[b+(a*12&-1)+4>>2]=c[b+((a-1|0)*12&-1)+4>>2];i=a+1|0;c[b+(i*12&-1)+4>>2]=c[b+4>>2];f=c[16536]|0;c[b+(i*12&-1)>>2]=f;c[b+(a*12&-1)>>2]=f;g=a+2|0}else if((e|0)==10|(e|0)==13){f=(c[b+(a*12&-1)>>2]|0)>0?1:-1;if((c[d+192>>2]|0)!=4){n=a;o=f;p=12004;break}i=b+24|0;j=c[i>>2]|0;k=(j|0)<(c[b>>2]|0)?-1:1;if((a|0)<=3){n=a;o=f;p=12004;break}l=b+36|0;r=c[l>>2]|0;if((j|0)==(r|0)){s=j-k|0;c[i>>2]=s;c[l>>2]=s;n=a;o=f;p=12004;break}if((a|0)<=4){n=a;o=f;p=12004;break}s=b+48|0;if((r|0)!=(c[s>>2]|0)){n=a;o=f;p=12004;break}i=r-k|0;c[l>>2]=i;c[s>>2]=i;n=a;o=f;p=12004}else{g=a}}while(0);do{if((p|0)==12004){a=c[d+264>>2]|0;if((a|0)>0&(o|0)<0){return}if(!((a|0)<0&(o|0)>0)){g=n;break}return}}while(0);n=c[d+192>>2]|0;if((n|0)==1|(n|0)==4){t=(c[d+196>>2]<<4&65520)+n|0}else if((n|0)==2|(n|0)==5){t=(c[d+200>>2]<<4&65520)+n|0}else{t=0}c[b+8>>2]=t;cN[c[(c[3524]|0)+148>>2]&255](g,b);return}function gk(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=c[8978]|0;if((b|0)==0){return}if((c[8982]|0)>0){d=0;e=b;while(1){uu(c[e+(d<<4)>>2]|0);f=c[8978]|0;do{if((a[f+(d<<4)+12|0]&1)==0){g=f}else{h=c[f+(d<<4)+8>>2]|0;if((h|0)==0){g=f;break}else{i=h}while(1){uu(c[i>>2]|0);h=c[i+4>>2]|0;uu(i);if((h|0)==0){break}else{i=h}}g=c[8978]|0}}while(0);f=d+1|0;if((f|0)<(c[8982]|0)){d=f;e=g}else{j=g;break}}}else{j=b}uu(j);c[8978]=0;c[8982]=0;return}function gl(a,b){a=a|0;b=b|0;return aY(c[a>>2]|0,c[b>>2]|0)|0}function gm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0;f=i;i=i+2048|0;g=f|0;h=f+1024|0;c[b0()>>2]=0;if((a_(39e3,d|0,1024)|0)!=0){gk()}do{if((c[8978]|0)==0){j=h|0;k=bF(d|0,193632)|0;c[9748]=k;if((k|0)==0){l=-1;i=f;return l|0}n=(a6(j|0,1023,k|0)|0)!=0;if(!(n&(a[j]|0)==63)){l=-1;i=f;return l|0}L16406:do{if((cj(c[9748]|0)|0)==0){n=h+1|0;k=1;p=0;q=0;L16408:while(1){if((a[j]|0)==63){a[h+(uA(n|0)|0)|0]=0;r=ut(20)|0;if((r|0)==0){gk();s=ut(20)|0;if((s|0)==0){t=12038;break}else{u=s}}else{u=r}r=u;c[u>>2]=bP(n|0)|0;c[u+16>>2]=c[8980];c[8980]=r;c[8982]=(c[8982]|0)+1;a[u+12|0]=k;c[u+8>>2]=0;c[u+4>>2]=0;s=bc(c[9748]|0)|0;if((a6(j|0,1023,c[9748]|0)|0)==0){x=s;y=r}else{k=0;p=s;q=r;continue}}else{x=p;y=q}r=ut(8)|0;if((r|0)==0){gk();s=ut(8)|0;if((s|0)==0){t=12042;break}else{z=s}}else{z=r}r=z;c[z>>2]=bP(j|0)|0;c[z+4>>2]=0;s=(a6(j|0,1023,c[9748]|0)|0)==0;if(s|(a[j]|0)==63){A=y}else{s=r;while(1){B=ut(8)|0;if((B|0)==0){gk();C=ut(8)|0;if((C|0)==0){t=12046;break L16408}else{D=C}}else{D=B}B=D;c[D>>2]=bP(j|0)|0;c[D+4>>2]=0;c[s+4>>2]=B;C=(a6(j|0,1023,c[9748]|0)|0)==0;if(C|(a[j]|0)==63){A=y;break}else{s=B}}}while(1){c[A+4>>2]=x;c[A+8>>2]=r;E=c[A+16>>2]|0;if((a[A+12|0]&1)!=0|(E|0)==0){break}else{A=E}}if((cj(c[9748]|0)|0)==0){k=1;p=x;q=E}else{break L16406}}if((t|0)==12038){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=197768,v)|0);return 0}else if((t|0)==12042){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=202984,v)|0);return 0}else if((t|0)==12046){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=202984,v)|0);return 0}}}while(0);j=c[9748]|0;az(j|0);j=(c[8982]<<4)+16|0;q=ut(j)|0;do{if((q|0)==0){gk();p=ut(j)|0;if((p|0)!=0){F=p;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=206864,v)|0);return 0}else{F=q}}while(0);q=F;c[8978]=q;j=c[8980]|0;if((j|0)==0){G=q}else{p=j;j=0;k=q;while(1){c[k+(j<<4)>>2]=c[p>>2];c[(c[8978]|0)+(j<<4)+4>>2]=c[p+4>>2];c[(c[8978]|0)+(j<<4)+8>>2]=c[p+8>>2];a[(c[8978]|0)+(j<<4)+12|0]=a[p+12|0]&1;q=c[p+16>>2]|0;uu(p);if((q|0)==0){break}p=q;j=j+1|0;k=c[8978]|0}G=c[8978]|0}c[G+(c[8982]<<4)>>2]=0;c[(c[8978]|0)+(c[8982]<<4)+4>>2]=0;c[(c[8978]|0)+(c[8982]<<4)+8>>2]=0;bM(c[8978]|0,c[8982]|0,16,32);uF(39e3,d|0,1024);if((uA(d|0)|0)>>>0<1024){break}a[40023]=0}}while(0);d=c[8978]|0;G=d|0;F=c[G>>2]|0;if((F|0)==0){l=1;i=f;return l|0}E=bk(b|0,73808)|0;x=d;d=G;G=F;L16448:while(1){if((a_(b|0,G|0,E|0)|0)==0){do{if((a[G+E|0]|0)==0){H=G}else{F=x+16|0;A=F|0;y=c[A>>2]|0;if((y|0)==0){H=G;break}else{I=G;J=0;K=F;L=A;M=y}L16454:while(1){y=I+E|0;A=K;F=L;D=M;while(1){if((a_(G|0,D|0,E|0)|0)!=0){break L16454}if((a_(D|0,I|0,(bk(y|0,73808)|0)+E|0)|0)!=0){break}z=A+16|0;u=z|0;k=c[u>>2]|0;if((k|0)==0){break L16454}else{A=z;F=u;D=k}}if(J){N=D}else{y=c[m>>2]|0;cf(y|0,72704,(v=i,i=i+16|0,c[v>>2]=E,c[v+8>>2]=G,v)|0);y=c[m>>2]|0;cf(y|0,123448,(v=i,i=i+8|0,c[v>>2]=I,v)|0);N=c[F>>2]|0}cf(c[m>>2]|0,123448,(v=i,i=i+8|0,c[v>>2]=N,v)|0);y=A+16|0;k=y|0;u=c[k>>2]|0;if((u|0)==0){O=45032;break L16448}else{I=c[F>>2]|0;J=1;K=y;L=k;M=u}}if(J){O=45032;break L16448}H=c[d>>2]|0}}while(0);u=uA(H|0)|0;if((u|0)==(E|0)){P=E}else{k=u-E|0;y=(uA(b|0)|0)+k|0;if(y>>>0>>0){Q=H}else{z=y;do{a[b+z|0]=a[b+(z-k|0)|0]|0;z=z-1|0;}while(z>>>0>=E>>>0);Q=c[d>>2]|0}uF(b|0,Q|0,u|0);P=u}if((a[b+P|0]|0)!=32){t=12080;break}z=P+1|0;R=x-16|0;S=(bk(b+z|0,73808)|0)+z|0}else{R=x;S=E}z=R+16|0;k=z|0;y=c[k>>2]|0;if((y|0)==0){l=1;t=12159;break}else{E=S;x=z;d=k;G=y}}if((t|0)==12159){i=f;return l|0}do{if((t|0)==12080){if((x|0)==0){l=1}else{O=x;break}i=f;return l|0}}while(0);x=O+8|0;if((c[x>>2]|0)==0){l=0;i=f;return l|0}gq();G=(e|0)==0;if(G){t=12084}else{if((a[e]&1)==0){t=12084}}do{if((t|0)==12084){d=c[x>>2]|0;if((d|0)==0){break}else{T=d}do{d=c[T>>2]|0;S=c[8250]|0;if((S|0)==(c[m>>2]|0)){if((c[8238]|0)<((c[6318]|0)-2|0)){U=S}else{aI(125440,23,1,S|0);do{E=a1(c[o>>2]|0)|0}while(!((E|0)==(-1|0)|(E|0)==10));c[8238]=0;U=c[m>>2]|0}aK(d|0,U|0);c[8238]=(c[8238]|0)+1}else{aK(d|0,S|0)}T=c[T+4>>2]|0;}while((T|0)!=0)}}while(0);T=h|0;a[T]=0;U=O|0;x=c[U>>2]|0;u=uA(x|0)|0;E=O+16|0;R=c[E>>2]|0;do{if((R|0)==0){V=0}else{b=(u|0)==0;P=u+1|0;Q=O;H=0;J=0;M=0;L=E;K=R;I=x;L16505:while(1){N=(J|0)==0;y=Q;k=L;z=K;while(1){if((a_(z|0,I|0,u|0)|0)!=0){W=H;X=M;break L16505}j=z+u|0;if(b){if((a[y+28|0]&1)!=0){Y=j;t=12102}}else{if((a[j]|0)!=32){W=H;X=M;break L16505}Y=z+P|0;t=12102}if((t|0)==12102){t=0;if(N){break}if((a_(Y|0,J|0,bk(Y|0,73808)|0)|0)!=0){break}}j=k+16|0;p=c[j>>2]|0;if((p|0)==0){W=H;X=M;break L16505}else{y=k;k=j;z=p}}if((H|0)==0){if(b){uD(T|0,77784,25)}else{uD(T|0,94064,26);ck(T|0,I|0,996);z=h+(uA(T|0)|0)|0;a[z]=a[86832]|0;a[z+1|0]=a[86833|0]|0;a[z+2|0]=a[86834|0]|0}z=c[8250]|0;y=c[m>>2]|0;if((z|0)==(y|0)){if((c[8238]|0)<((c[6318]|0)-2|0)){Z=z}else{aI(125440,23,1,z|0);do{z=a1(c[o>>2]|0)|0}while(!((z|0)==(-1|0)|(z|0)==10));c[8238]=0;Z=c[m>>2]|0}aK(T|0,Z|0);c[8238]=(c[8238]|0)+1}else{aK(T|0,y|0)}a[T]=0;_=1}else{_=H}z=M+1|0;c[g+(M<<2)>>2]=Y;N=k+16|0;S=c[N>>2]|0;if((S|0)==0){W=_;X=z;break}Q=k;H=_;J=Y;M=z;L=N;K=S;I=c[U>>2]|0}if((X|0)>0){$=0;aa=0;ab=0}else{V=W;break}while(1){I=c[g+($<<2)>>2]|0;K=bk(I|0,73808)|0;L=(ab|0)==0?4:aa;if((L|0)>0){M=0;do{J=h+(uA(T|0)|0)|0;w=32;a[J]=w&255;w=w>>8;a[J+1|0]=w&255;M=M+1|0;}while((M|0)<(L|0))}ck(T|0,I|0,K|0);L=18-K|0;if((L|0)<1){M=((K-18|0)>>>0)/18>>>0;ac=(36-K|0)+(M*18&-1)|0;ad=(ab+1|0)+M|0}else{ac=L;ad=ab}L=ad+1|0;if((L|0)>3){M=h+(uA(T|0)|0)|0;w=10;a[M]=w&255;w=w>>8;a[M+1|0]=w&255;M=c[8250]|0;k=c[m>>2]|0;if((M|0)==(k|0)){if((c[8238]|0)<((c[6318]|0)-2|0)){ae=M}else{aI(125440,23,1,M|0);do{M=a1(c[o>>2]|0)|0}while(!((M|0)==(-1|0)|(M|0)==10));c[8238]=0;ae=c[m>>2]|0}aK(T|0,ae|0);c[8238]=(c[8238]|0)+1}else{aK(T|0,k|0)}a[T]=0;af=0}else{af=L}K=$+1|0;if((K|0)<(X|0)){$=K;aa=ac;ab=af}else{break}}if(!((W|0)>0&(af|0)>0)){V=W;break}K=h+(uA(T|0)|0)|0;w=10;a[K]=w&255;w=w>>8;a[K+1|0]=w&255;K=c[8250]|0;I=c[m>>2]|0;if((K|0)!=(I|0)){aK(T|0,I|0);V=W;break}if((c[8238]|0)<((c[6318]|0)-2|0)){ag=K}else{aI(125440,23,1,K|0);do{K=a1(c[o>>2]|0)|0}while(!((K|0)==(-1|0)|(K|0)==10));c[8238]=0;ag=c[m>>2]|0}aK(T|0,ag|0);c[8238]=(c[8238]|0)+1;V=W}}while(0);if(!G){a[e]=(V|0)!=0&1}V=c[8250]|0;e=c[m>>2]|0;if((V|0)==(e|0)){if((c[8238]|0)<((c[6318]|0)-2|0)){ah=V}else{aI(125440,23,1,V|0);do{V=a1(c[o>>2]|0)|0}while(!((V|0)==(-1|0)|(V|0)==10));c[8238]=0;ah=c[m>>2]|0}aF(10,ah|0);c[8238]=(c[8238]|0)+1}else{aF(10,e|0)}e=c[8250]|0;if((e|0)==(c[m>>2]|0)){l=0;i=f;return l|0}a2(e|0);l=0;i=f;return l|0}function gn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0;d=c[11608]|0;e=c[228]|0;f=+h[e+((c[d+((c[a>>2]|0)*20&-1)+4>>2]|0)*48&-1)+16>>3]- +h[e+((c[d+((c[b>>2]|0)*20&-1)+4>>2]|0)*48&-1)+16>>3];if(f<-1.0e-5){g=-1;return g|0}g=f>1.0e-5&1;return g|0}function go(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0;d=c[7628]|0;e=+h[d+((c[a>>2]|0)*104&-1)+56>>3]- +h[d+((c[b>>2]|0)*104&-1)+56>>3];if(e<-1.0e-5){f=-1;return f|0}f=e>1.0e-5&1;return f|0}function gp(){var b=0,d=0,e=0;b=i;cf(c[m>>2]|0,125144,(v=i,i=i+8|0,c[v>>2]=(c[9744]|0)==0?150704:150856,v)|0);d=c[9734]|0;e=c[9738]|0;cf(c[m>>2]|0,93824,(v=i,i=i+24|0,c[v>>2]=c[9742],c[v+8>>2]=d,c[v+16>>2]=e,v)|0);e=c[9738]|0;if((e|0)==2){d=c[m>>2]|0;aI(77648,56,1,d|0)}else if((e|0)==1){aI(86680,65,1,c[m>>2]|0)}else if((e|0)==3){aI(72584,61,1,c[m>>2]|0)}else{aI(218160,60,1,c[m>>2]|0)}e=a[38960]|0?211688:179864;cf(c[m>>2]|0,212512,(v=i,i=i+16|0,c[v>>2]=a[38944]|0?211688:179864,c[v+8>>2]=e,v)|0);i=b;return}function gq(){var b=0,d=0,e=0,f=0,g=0;b=i;d=bU(75160)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=bt(d|0,137896)|0;c[8250]=e;if((e|0)==0){break}i=b;return}}while(0);c[8250]=c[m>>2];d=bU(139752)|0;if((d|0)==0){f=12184}else{e=aE(d|0,0,0)|0;if((e|0)<3){f=12184}else{g=e}}if((f|0)==12184){g=24}c[6318]=g;c[8238]=0;i=b;return}function gr(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0.0,Q=0.0;b=i;i=i+72|0;d=b|0;e=b+24|0;f=b+48|0;g=c[13898]|0;j=c[8272]|0;if((g|0)>=(j|0)){i=b;return}k=e|0;l=e+8|0;m=d|0;n=d+8|0;o=f|0;p=f+8|0;q=g;g=j;L16625:while(1){r=c[1054]|0;j=(a[r+(q*40&-1)|0]&1)==0;s=c[r+(q*40&-1)+36>>2]|0;L16627:do{if(j){t=c[10036]|0;u=r+(q*40&-1)+32|0}else{w=r+(q*40&-1)+32|0;x=c[10036]|0;y=0;while(1){if((y|0)>=(s|0)){break}if((a[x+((c[w>>2]|0)+y|0)|0]|0)==(a[y+103664|0]|0)){y=y+1|0}else{t=x;u=w;break L16627}}if((y|0)==1){z=12257;break L16625}else{t=x;u=w}}}while(0);A=c[u>>2]|0;B=(s|0)>0;C=24304;D=153928;L16635:while(1){L16637:do{if(!j){if(B){E=0;F=0;G=A;while(1){H=a[D+E|0]|0;if(H<<24>>24==(a[t+(E+G|0)|0]|0)){I=G;J=F}else{if(H<<24>>24!=36){break L16637}I=G-1|0;J=1}K=E+1|0;if((K|0)<(J+s|0)){E=K;F=J;G=I}else{break}}if((J|0)==0){L=K}else{M=C;break L16635}}else{L=0}G=a[D+L|0]|0;if((G<<24>>24|0)==36|(G<<24>>24|0)==0){M=C;break L16635}}}while(0);w=C+8|0;x=c[w>>2]|0;if((x|0)==0){M=w;break}else{C=w;D=x}}D=c[M+4>>2]|0;if((D|0)==0){z=12247;break}else if((D|0)==1){z=12208;break}else if((D|0)==3){c[9742]=0;N=q}else if((D|0)==6){c[9738]=3;N=q}else if((D|0)==2){c[13898]=q+1;C=is(e)|0;s=c[C>>2]|0;if((s|0)==3){O=+uz(c[C+8>>2]|0,0)}else if((s|0)==2){O=+h[C+8>>3]}else if((s|0)==1){O=+(c[C+8>>2]|0)}else{z=12219;break}if((c[k>>2]|0)==3){uu(c[l>>2]|0);c[k>>2]=1}c[9742]=~~O;C=(c[13898]|0)-1|0;c[13898]=C;N=C}else if((D|0)==5){c[13898]=q+1;C=is(f)|0;s=c[C>>2]|0;if((s|0)==2){P=+h[C+8>>3]}else if((s|0)==1){P=+(c[C+8>>2]|0)}else if((s|0)==3){P=+uz(c[C+8>>2]|0,0)}else{z=12236;break}if((c[o>>2]|0)==3){uu(c[p>>2]|0);c[o>>2]=1}C=~~P;c[9738]=(C-1|0)>>>0>2?3:C;C=(c[13898]|0)-1|0;c[13898]=C;N=C}else if((D|0)==7){a[38944]=0;N=q}else if((D|0)==8){a[38944]=1;N=q}else if((D|0)==12){c[9744]=0;N=q}else if((D|0)==11){c[9744]=1;N=q}else if((D|0)==9){a[38960]=0;N=q}else if((D|0)==10){a[38960]=1;N=q}else if((D|0)==4){c[13898]=q+1;D=is(d)|0;C=c[D>>2]|0;if((C|0)==1){Q=+(c[D+8>>2]|0)}else if((C|0)==2){Q=+h[D+8>>3]}else if((C|0)==3){Q=+uz(c[D+8>>2]|0,0)}else{z=12228;break}if((c[m>>2]|0)==3){uu(c[n>>2]|0);c[m>>2]=1}c[9734]=~~Q;D=(c[13898]|0)-1|0;c[13898]=D;N=D}else{N=q}D=N+1|0;c[13898]=D;C=c[8272]|0;if((D|0)<(C|0)){q=D;g=C}else{z=12255;break}}if((z|0)==12257){i=b;return}else if((z|0)==12247){uf(q,139344,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==12208){c[9742]=1;c[9734]=3;c[9738]=1;a[38944]=0;a[38960]=0;c[9744]=0;N=q+1|0;c[13898]=N;if((N|0)>=(g|0)){i=b;return}if((a[r+(N*40&-1)|0]&1)==0){uf(N,170328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=c[r+(N*40&-1)+36>>2]|0;q=r+(N*40&-1)+32|0;r=0;while(1){if((r|0)>=(g|0)){break}if((a[t+((c[q>>2]|0)+r|0)|0]|0)==(a[r+103664|0]|0)){r=r+1|0}else{z=12251;break}}if((z|0)==12251){uf(N,170328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((r|0)==1){i=b;return}else{uf(N,170328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else if((z|0)==12255){i=b;return}else if((z|0)==12228){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==12219){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==12236){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function gs(){var a=0,b=0,d=0,e=0,f=0,g=0;a=i;if((c[9738]|0)<1){c[9738]=3}c[228]=0;b=ut(4800)|0;do{if((b|0)==0){gk();d=ut(4800)|0;if((d|0)!=0){e=d;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=129728,v)|0)}else{e=b}}while(0);c[228]=e;c[224]=100;c[225]=0;c[226]=100;c[227]=48;c[11608]=0;e=ut(2e3)|0;do{if((e|0)==0){gk();b=ut(2e3)|0;if((b|0)!=0){f=b;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=129728,v)|0)}else{f=e}}while(0);c[11608]=f;c[11604]=100;c[11605]=0;c[11606]=100;c[11607]=20;c[7628]=0;f=ut(10400)|0;if((f|0)!=0){g=f;c[7628]=g;c[7624]=100;c[7625]=0;c[7626]=100;c[7627]=104;i=a;return}gk();f=ut(10400)|0;if((f|0)==0){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=129728,v)|0)}else{g=f;c[7628]=g;c[7624]=100;c[7625]=0;c[7626]=100;c[7627]=104;i=a;return}}function gt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;e=i;i=i+8|0;f=e|0;if((c[7625]|0)==0){un(a,b,d,d+40|0);i=e;return}g=c[228]|0;if((g|0)==0){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=c[225]|0;k=c[224]|0;do{if((j|0)<(k|0)){l=j;m=g}else{n=(c[226]|0)+k|0;if((n|0)==0){uu(g);c[228]=0;c[224]=0;c[225]=0;l=0;m=0;break}else{o=db(g,aa(c[227]|0,n),150384)|0;c[228]=o;c[224]=n;l=c[225]|0;m=o;break}}}while(0);c[225]=l+1;g=m;m=g+(l*48&-1)|0;k=a;c[m>>2]=c[k>>2];c[m+4>>2]=c[k+4>>2];c[m+8>>2]=c[k+8>>2];c[m+12>>2]=c[k+12>>2];c[m+16>>2]=c[k+16>>2];c[m+20>>2]=c[k+20>>2];c[m+24>>2]=c[k+24>>2];c[m+28>>2]=c[k+28>>2];c[m+32>>2]=c[k+32>>2];c[m+36>>2]=c[k+36>>2];c[m+40>>2]=c[k+40>>2];c[m+44>>2]=c[k+44>>2];k=(b|0)!=0;m=g+(l*48&-1)+24|0;if(k){c[m>>2]=0;g=c[228]|0;if((g|0)==0){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}a=c[225]|0;j=c[224]|0;do{if((a|0)<(j|0)){p=a;q=g}else{o=(c[226]|0)+j|0;if((o|0)==0){uu(g);c[228]=0;c[224]=0;c[225]=0;p=0;q=0;break}else{n=db(g,aa(c[227]|0,o),150384)|0;c[228]=n;c[224]=o;p=c[225]|0;q=n;break}}}while(0);c[225]=p+1;g=q;q=g+(p*48&-1)|0;j=b;c[q>>2]=c[j>>2];c[q+4>>2]=c[j+4>>2];c[q+8>>2]=c[j+8>>2];c[q+12>>2]=c[j+12>>2];c[q+16>>2]=c[j+16>>2];c[q+20>>2]=c[j+20>>2];c[q+24>>2]=c[j+24>>2];c[q+28>>2]=c[j+28>>2];c[q+32>>2]=c[j+32>>2];c[q+36>>2]=c[j+36>>2];c[q+40>>2]=c[j+40>>2];c[q+44>>2]=c[j+44>>2];c[g+(p*48&-1)+24>>2]=0;r=p}else{c[m>>2]=d;r=l}m=c[d+4>>2]|0;p=c[11608]|0;if((p|0)==0){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=c[11605]|0;j=c[11604]|0;do{if((g|0)<(j|0)){s=p;t=g}else{q=(c[11606]|0)+j|0;if((q|0)==0){uu(p);c[11608]=0;c[11604]=0;c[11605]=0;s=0;t=0;break}else{b=db(p,aa(c[11607]|0,q),150384)|0;c[11608]=b;c[11604]=q;s=b;t=c[11605]|0;break}}}while(0);p=c[11607]|0;c[11605]=t+1;j=aa(p,t);t=s+j|0;p=c[228]|0;g=s+(j+8|0)|0;c[g>>2]=m;c[s+(j+12|0)>>2]=d;c[s+(j+16|0)>>2]=-1;m=t;do{if(+h[p+(l*48&-1)+16>>3]<+h[p+(r*48&-1)+16>>3]){c[m>>2]=r;c[s+(j+4|0)>>2]=l;if((c[d+8>>2]|0)!=-10){break}c[g>>2]=-11}else{c[m>>2]=l;c[s+(j+4|0)>>2]=r;if((c[d+8>>2]|0)!=-10){break}c[g>>2]=-10}}while(0);g=c[11608]|0;d=(t-g|0)/20&-1;c[f>>2]=c[8022];t=g;gu(d,c[t+(d*20&-1)>>2]|0,c[t+(d*20&-1)+4>>2]|0,f);if((c[11608]|0)==0){uk(119400,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=c[11605]|0;if((f|0)!=0){c[11605]=f-1}if((c[228]|0)==0){uk(119400,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=c[225]|0;if((f|0)==0){u=0}else{d=f-1|0;c[225]=d;u=d}if((u|0)==0|k^1){i=e;return}c[225]=u-1;i=e;return}function gu(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0.0,ac=0.0,ad=0.0,ae=0.0,af=0.0,ag=0.0,ah=0.0,ai=0.0,aj=0.0,ak=0.0,al=0.0,am=0.0,an=0.0,ao=0.0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0.0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0;f=i;i=i+56|0;g=f|0;j=f+8|0;k=c[228]|0;l=k;m=l+(b*48&-1)|0;n=l+(d*48&-1)|0;o=+h[l+(b*48&-1)+16>>3]>+h[l+(d*48&-1)+16>>3];d=o?n:m;l=o?m:n;n=k;m=(l-n|0)/48&-1;o=(d-n|0)/48&-1;p=+h[d+16>>3];q=+h[l>>3];r=+h[d>>3];n=q>r;s=+h[l+8>>3];t=+h[d+8>>3];b=s>t;u=c[225]|0;w=c[e>>2]|0;do{if((w|0)>-1){x=j|0;y=p;z=b?s:t;A=b?t:s;B=n?q:r;C=n?r:q;D=d;E=l;F=o;G=m;H=w;L16789:while(1){I=c[7628]|0;J=I+(H*104&-1)|0;L16791:do{if(+h[I+(H*104&-1)+24>>3]>3]>B){K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break}if(+h[I+(H*104&-1)+40>>3]>3]>z){K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break}T=+h[I+(H*104&-1)+56>>3];if(T=p){K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break}c[e>>2]=H;K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break}U=c[J>>2]|0;V=c[11608]|0;W=c[V+(a*20&-1)>>2]|0;do{if((U|0)==(W|0)){X=12326}else{Y=c[I+(H*104&-1)+4>>2]|0;if((Y|0)==(W|0)){X=12326;break}Z=c[I+(H*104&-1)+8>>2]|0;if((Z|0)==(W|0)){X=12326}else{_=Y;$=Z}}}while(0);if((X|0)==12326){X=0;W=c[V+(a*20&-1)+4>>2]|0;if((U|0)==(W|0)){K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break}Z=c[I+(H*104&-1)+4>>2]|0;if((Z|0)==(W|0)){K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break}Y=c[I+(H*104&-1)+8>>2]|0;if((Y|0)==(W|0)){K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break}else{_=Z;$=Y}}aa=c[228]|0;Y=aa;Z=E|0;T=+h[Z>>3];W=E+8|0;ab=+h[W>>3];ac=+h[E+16>>3];ad=+h[I+(H*104&-1)+64>>3];ae=+h[I+(H*104&-1)+72>>3];af=+h[I+(H*104&-1)+80>>3];ag=+h[I+(H*104&-1)+88>>3]+(T*ad+ab*ae+ac*af);if(ag==0.0){ah=0.0}else{ah=ag/(ad*(T- +h[D>>3])+ae*(ab- +h[D+8>>3])+af*(ac- +h[D+16>>3]))}ac=+h[Z>>3];af=+h[W>>3];ab=+h[Y+(U*48&-1)>>3];ae=+h[Y+(U*48&-1)+8>>3];T=+h[Y+(_*48&-1)>>3];ad=+h[Y+(_*48&-1)+8>>3];ag=T-ab;ai=ad-ae;aj=(af-ae)*ag-(ac-ab)*ai;if(aj==0.0){ak=0.0}else{ak=aj/(ai*(+h[D>>3]-ac)-ag*(+h[D+8>>3]-af))}af=+h[Z>>3];ag=+h[W>>3];ac=+h[Y+($*48&-1)>>3];ai=+h[Y+($*48&-1)+8>>3];aj=ac-T;al=ai-ad;am=(ag-ad)*aj-(af-T)*al;if(am==0.0){an=0.0}else{an=am/(al*(+h[D>>3]-af)-aj*(+h[D+8>>3]-ag))}ag=+h[Z>>3];aj=+h[W>>3];af=ab-ac;ab=ae-ai;ae=(aj-ai)*af-(ag-ac)*ab;if(ae==0.0){ao=0.0}else{ao=ae/(ab*(+h[D>>3]-ag)-af*(+h[D+8>>3]-aj))}h[x>>3]=0.0;if(ah>0.0&ah<1.0){h[j+8>>3]=ah;ap=2}else{ap=1}if(ak>0.0&ak<1.0){h[j+(ap<<3)>>3]=ak;aq=ap+1|0}else{aq=ap}if(an>0.0&an<1.0){h[j+(aq<<3)>>3]=an;ar=aq+1|0}else{ar=aq}if(ao>0.0&ao<1.0){h[j+(ar<<3)>>3]=ao;as=ar+1|0}else{as=ar}h[j+(as<<3)>>3]=1.0;L16832:do{if((as|0)>1){W=1;while(1){Z=W+1|0;Y=(Z|0)<(as|0);if(!Y){at=0;break L16832}au=j+(W<<3)|0;av=Z;do{aj=+h[au>>3];aw=j+(av<<3)|0;af=+h[aw>>3];if(aj>af){h[au>>3]=af;h[aw>>3]=aj}av=av+1|0;}while((av|0)<(as|0));if(Y){W=Z}else{at=0;break}}}else{at=0}}while(0);while(1){if((at|0)>=(as|0)){K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break L16791}ax=+h[j+(at<<3)>>3];ay=gB(E,D,ax,J)|0;if((ay|0)==0){at=at+1|0}else{az=0;aA=at;break}}while(1){if((aA|0)>=(as|0)){break}U=aA+1|0;V=gB(E,D,+h[j+(U<<3)>>3],J)|0;if((V|0)==0){break}else{az=V;aA=U}}if((at|0)==(aA|0)){K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break}if((ay|0)==2&(az|0)==2){K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break}U=(aA|0)==(as|0);if((at|0)==0){if(U){break L16789}V=gC(G,F,+h[j+(aA<<3)>>3])|0;W=c[228]|0;av=W;au=av+(V*48&-1)|0;aw=av+(F*48&-1)|0;aB=+h[av+(V*48&-1)+16>>3]>+h[av+(F*48&-1)+16>>3];av=aB?aw:au;V=aB?au:aw;aw=W;aj=+h[V>>3];af=+h[av>>3];W=aj>af;ag=+h[V+8>>3];ab=+h[av+8>>3];au=ag>ab;K=(V-aw|0)/48&-1;L=(av-aw|0)/48&-1;M=V;N=av;O=W?af:aj;P=W?aj:af;Q=au?ab:ag;R=au?ag:ab;S=+h[av+16>>3];break}av=gC(G,F,ax)|0;if(U){U=c[228]|0;au=U;W=au+(G*48&-1)|0;V=au+(av*48&-1)|0;aw=+h[au+(G*48&-1)+16>>3]>+h[au+(av*48&-1)+16>>3];au=aw?V:W;aB=aw?W:V;V=U;ab=+h[aB>>3];ag=+h[au>>3];U=ab>ag;af=+h[aB+8>>3];aj=+h[au+8>>3];W=af>aj;K=(aB-V|0)/48&-1;L=(au-V|0)/48&-1;M=aB;N=au;O=U?ag:ab;P=U?ab:ag;Q=W?aj:af;R=W?af:aj;S=+h[au+16>>3];break}au=gC(G,F,+h[j+(aA<<3)>>3])|0;if((au|0)==(G|0)){K=G;L=F;M=E;N=D;O=C;P=B;Q=A;R=z;S=y;break}c[g>>2]=c[(c[7628]|0)+(H*104&-1)+100>>2];gu(a,au,F,g);au=c[228]|0;W=au;U=W+(G*48&-1)|0;aB=W+(av*48&-1)|0;V=+h[W+(G*48&-1)+16>>3]>+h[W+(av*48&-1)+16>>3];av=V?aB:U;W=V?U:aB;aB=au;aj=+h[W>>3];af=+h[av>>3];au=aj>af;ag=+h[W+8>>3];ab=+h[av+8>>3];U=ag>ab;K=(W-aB|0)/48&-1;L=(av-aB|0)/48&-1;M=W;N=av;O=au?af:aj;P=au?aj:af;Q=U?ab:ag;R=U?ag:ab;S=+h[av+16>>3]}}while(0);J=c[I+(H*104&-1)+100>>2]|0;if((J|0)>-1){y=S;z=R;A=Q;B=P;C=O;D=N;E=M;F=L;G=K;H=J}else{X=12367;break}}if((X|0)==12367){aC=L;aD=K;aE=c[228]|0;break}H=c[225]|0;if((H|0)<=(u|0)){i=f;return}G=(aa|0)==0;F=H;while(1){if(G){X=12358;break}if((F|0)==0){if((u|0)<0){F=0;continue}else{X=12385;break}}else{H=F-1|0;c[225]=H;if((H|0)>(u|0)){F=H;continue}else{X=12382;break}}}if((X|0)==12358){uk(119400,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((X|0)==12385){i=f;return}else if((X|0)==12382){i=f;return}}else{aC=o;aD=m;aE=k}}while(0);k=aE;gw((c[11608]|0)+(a*20&-1)|0,k+(aD*48&-1)|0,k+(aC*48&-1)|0);aC=c[225]|0;if((aC|0)<=(u|0)){i=f;return}k=(c[228]|0)==0;aD=aC;while(1){if(k){X=12372;break}if((aD|0)==0){if((u|0)<0){aD=0;continue}else{X=12386;break}}else{aC=aD-1|0;c[225]=aC;if((aC|0)>(u|0)){aD=aC;continue}else{X=12384;break}}}if((X|0)==12384){i=f;return}else if((X|0)==12386){i=f;return}else if((X|0)==12372){uk(119400,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function gv(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0.0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0.0,aC=0.0,aD=0.0,aE=0.0,aF=0.0,aG=0.0,aH=0.0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0.0,aW=0,aX=0.0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0;e=i;i=i+128|0;f=e|0;g=e+8|0;j=e+16|0;k=e+56|0;l=e+120|0;do{if((d|0)>0){m=0;n=0;o=0;p=-1;q=0;r=b;L16892:while(1){s=c[r+8>>2]|0;do{if((s|0)==4){t=p;u=o;w=n;x=m}else{y=c[r+260>>2]|0;z=c[y+8>>2]|0;if((a[r+236|0]&1)!=0){t=p;u=o;w=n;x=m;break}A=(z|0)>(p|0)?z:p;do{if((s|0)==2){if((y|0)==0){B=0}else{C=0;D=y;while(1){E=C+1|0;F=c[D>>2]|0;if((F|0)==0){B=E;break}else{C=E;D=F}}}G=B;H=aa(B,z)}else if((s|0)==3){D=c[r+252>>2]|0;if((c[r+244>>2]|0)!=0){G=D;H=aa(D,z);break}if((c[r+12>>2]|0)==225){G=D;H=z;break}if((y|0)==0){G=D;H=0;break}C=c[y>>2]|0;if((C|0)==0){G=D;H=z;break}else{I=z;J=C}while(1){C=I+(c[J+8>>2]|0)|0;F=c[J>>2]|0;if((F|0)==0){G=D;H=C;break}else{I=C;J=F}}}else{K=12401;break L16892}}while(0);y=c[r+12>>2]|0;if((y|0)==153|(y|0)==345|(y|0)==33|(y|0)==225){t=A;u=(H<<1)+o|0;w=H+n|0;x=m;break}else if((y|0)==352|(y|0)==51|(y|0)==177|(y|0)==193|(y|0)==209|(y|0)==1){y=H+o|0;D=(H-G|0)+n|0;if((c[r+244>>2]|0)==0){t=A;u=y;w=D;x=m;break}t=A;u=y;w=(((-(z<<1)|1)-G|0)+(H<<1)|0)+D|0;x=aa((G<<1)-2|0,z-1|0)+m|0;break}else{t=A;u=H+o|0;w=H+n|0;x=m;break}}}while(0);s=q+1|0;if((s|0)<(d|0)){m=x;n=w;o=u;p=t;q=s;r=c[r>>2]|0}else{break}}if((K|0)==12401){uk(164696,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((t|0)<1){break}r=c[228]|0;if((r|0)==0){uk(203872,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((u|0)==0){uu(r);c[228]=0;c[224]=0;c[225]=0}else{c[228]=db(r,aa(c[227]|0,u),150384)|0;c[224]=u}r=c[11608]|0;if((r|0)==0){uk(203872,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((w|0)==0){uu(r);c[11608]=0;c[11604]=0;c[11605]=0}else{c[11608]=db(r,aa(c[11607]|0,w),150384)|0;c[11604]=w}r=c[7628]|0;if((r|0)==0){uk(203872,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((x|0)==0){uu(r);c[7628]=0;c[7624]=0;c[7625]=0}else{c[7628]=db(r,aa(c[7627]|0,x),150384)|0;c[7624]=x}r=t<<3;q=ut(r)|0;do{if((q|0)==0){gk();p=ut(r)|0;if((p|0)!=0){L=p;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=155272,v)|0)}else{L=q}}while(0);q=L;p=ut(r)|0;do{if((p|0)==0){gk();o=ut(r)|0;if((o|0)!=0){M=o;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=151696,v)|0)}else{M=p}}while(0);p=M;r=t*12&-1;o=ut(r)|0;do{if((o|0)==0){gk();n=ut(r)|0;if((n|0)!=0){N=n;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=149768,v)|0)}else{N=o}}while(0);o=N;n=ut(r)|0;do{if((n|0)==0){gk();m=ut(r)|0;if((m|0)!=0){O=m;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=147944,v)|0)}else{O=n}}while(0);n=j;r=j+4|0;m=j+8|0;s=j+16|0;D=j|0;y=k|0;F=k+8|0;C=k+16|0;E=k+24|0;P=k+32|0;Q=O;R=o;S=p;T=q;U=0;V=b;L16959:while(1){W=a[V+239|0]|0;X=V+24|0;L16961:do{if((c[V+8>>2]|0)==4){Y=T;Z=S;_=R;$=Q}else{ab=V+260|0;ac=c[(c[ab>>2]|0)+8>>2]|0;if((a[V+236|0]&1)!=0){Y=T;Z=S;_=R;$=Q;break}ad=c[V+240>>2]|0;ae=(ad|0)==-9;af=V+12|0;ag=c[af>>2]|0;ah=(ag|0)==352;ai=ah?-3:ae?-8:(c[9742]|0)+ad|0;aj=ah?-3:ae?-8:ad;do{if((ag|0)==225){c[V+32>>2]=-10;ad=V+152|0;if((c[V+144>>2]|0)==0){h[ad>>3]=1.0;h[V+168>>3]=0.0}ae=c[200]|0;h[64776+(ae*688&-1)>>3]=+((c[7939]|0)-(c[7938]|0)|0)/(+h[64672+(ae*688&-1)>>3]- +h[64664+(ae*688&-1)>>3]);c[12912]=c[V+184>>2];c[12910]=0;ak=+h[ad>>3];if(ak<=0.0){break}uE(n|0,0,40);c[r>>2]=2;c[m>>2]=2;h[s>>3]=ak;c[D>>2]=c[V+160>>2];fN(j,f,g,123984);h[6458]=+h[V+168>>3];h[6457]=+h[V+176>>3];c[12910]=~~+h[f>>3]}}while(0);ag=c[ab>>2]|0;if((c[V+244>>2]|0)!=0){if((c[ag+8>>2]|0)>0){A=0;do{z=A*3&-1;c[R+(z+2<<2)>>2]=-3;c[R+(z+1<<2)>>2]=-3;c[R+(z<<2)>>2]=-3;z=A<<1;c[T+((z|1)<<2)>>2]=-3;c[T+(z<<2)>>2]=-3;A=A+1|0;al=c[ab>>2]|0;}while((A|0)<(c[al+8>>2]|0));if((al|0)==0){Y=T;Z=S;_=R;$=Q;break}else{am=al}}else{am=ag}A=(W&1)!=0;ab=V+68|0;z=am;ad=Q;ae=R;ah=S;an=T;ao=0;while(1){ap=c[z+12>>2]|0;aq=z+8|0;if((c[aq>>2]|0)>0){ar=(ao|0)>0;as=0;do{at=ap+(as<<6)|0;au=c[228]|0;if((au|0)==0){K=12531;break L16959}av=c[225]|0;aw=c[224]|0;do{if((av|0)<(aw|0)){ax=au;ay=av}else{az=(c[226]|0)+aw|0;if((az|0)==0){uu(au);c[228]=0;c[224]=0;c[225]=0;ax=0;ay=0;break}else{aA=db(au,aa(c[227]|0,az),150384)|0;c[228]=aA;c[224]=az;ax=aA;ay=c[225]|0;break}}}while(0);au=c[227]|0;c[225]=ay+1;aw=aa(au,ay);au=ax+aw|0;c[ax+(aw+24|0)>>2]=X;av=at|0;if((c[av>>2]|0)<(c[9738]|0)){aA=ap+(as<<6)+24|0;ak=+h[aA>>3];aB=(+h[ap+(as<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aC=(+h[ap+(as<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aD=(ak- +h[5279])*+h[2]+ +h[12]+-1.0;aE=+h[404]+aB*+h[392]+aC*+h[396]+aD*+h[400];aF=+h[405]+aB*+h[393]+aC*+h[397]+aD*+h[401];aG=+h[406]+aB*+h[394]+aC*+h[398]+aD*+h[402];aH=aG==0.0?1.0e-5:aG;h[au>>3]=(+h[403]+aB*+h[391]+aC*+h[395]+aD*+h[399])/aH;h[ax+(aw+8|0)>>3]=aE/aH;h[ax+(aw+16|0)>>3]=aF/aH;az=ax+(aw+32|0)|0;h[az>>3]=ak;c[ax+(aw+40|0)>>2]=0;if(A){h[az>>3]=+h[ap+(as<<6)+32>>3];c[ab>>2]=-6}else{h[az>>3]=+h[aA>>3]}c[ax+(aw+44|0)>>2]=at;aI=(au-(c[228]|0)|0)/48&-1}else{h[ax+(aw+16|0)>>3]=-2.0;aI=-1}aw=as*3&-1;au=ad+(aw+2<<2)|0;c[au>>2]=-3;aA=ad+(aw+1<<2)|0;c[aA>>2]=-3;az=ad+(aw<<2)|0;c[az>>2]=-3;aJ=as<<1;aK=ah+((aJ|1)<<2)|0;c[aK>>2]=-3;aL=ah+(aJ<<2)|0;c[aL>>2]=-3;aM=c[af>>2]|0;do{if((aM|0)==352|(aM|0)==51|(aM|0)==177|(aM|0)==193|(aM|0)==209|(aM|0)==1){if((as|0)<=0){if(!(ar&(aI|0)>-1)){break}c[aA>>2]=gy(aI,1,ac,X,aj)|0;break}if((aI|0)<0){if(!(ar&(a[38944]^1))){break}aN=gy((c[225]|0)-1|0,3,ac,X,aj)|0;c[au>>2]=aN;if((aN|0)<=-2){break}aO=gz((c[225]|0)-1|0,3,ac)|0;aP=as-1|0;gA(aN,c[ad+((aP*3&-1)+1<<2)>>2]|0,aO,c[ah+((aP<<1|1)<<2)>>2]|0,aj,ai);gA(aN,c[ae+(aw<<2)>>2]|0,aO,c[an+(aJ<<2)>>2]|0,aj,ai);break}aO=gy(aI,0,ac,X,aj)|0;c[az>>2]=aO;if(!ar){break}aN=gy(aI,1,ac,X,aj)|0;c[aA>>2]=aN;aP=gy(aI,2,ac,X,aj)|0;c[au>>2]=aP;aQ=(aO|0)>-2;if((aP|0)>-2){if(aQ){aR=gz(aI,2,ac)|0;c[aL>>2]=aR;aS=as-1|0;gA(aO,c[ad+((aS*3&-1)+1<<2)>>2]|0,aR,c[ah+((aS<<1|1)<<2)>>2]|0,aj,ai)}if((aN|0)>-2){aS=gz(aI,0,ac)|0;c[aK>>2]=aS;gA(aN,c[ae+(aw<<2)>>2]|0,aS,c[an+(aJ<<2)>>2]|0,aj,ai)}gA(aP,aP,c[aL>>2]|0,c[aK>>2]|0,aj,ai);break}else{if(!aQ){break}if(!((aN|0)>-2&(a[38944]^1))){break}aQ=gy(aI,3,ac,X,aj)|0;c[au>>2]=aQ;if((aQ|0)<=-2){break}aP=gz(aI,1,ac)|0;c[aK>>2]=aP;c[aL>>2]=aP;if((a[(c[7628]|0)+(aP*104&-1)+96|0]&1)!=0){break}c[(c[11608]|0)+(aQ*20&-1)+8>>2]=ai;c[(c[11608]|0)+(aN*20&-1)+8>>2]=ai;c[(c[11608]|0)+(aO*20&-1)+8>>2]=ai;break}}else if((aM|0)==153|(aM|0)==345|(aM|0)==33){if((aI|0)<0){break}aO=ap+(as<<6)+24|0;ak=+h[aO>>3];h[aO>>3]=(aM|0)==33?0.0:+h[8083];aN=c[228]|0;if((aN|0)==0){K=12564;break L16959}aQ=c[225]|0;aP=c[224]|0;do{if((aQ|0)<(aP|0)){aT=aN;aU=aQ}else{aS=(c[226]|0)+aP|0;if((aS|0)==0){uu(aN);c[228]=0;c[224]=0;c[225]=0;aT=0;aU=0;break}else{aR=db(aN,aa(c[227]|0,aS),150384)|0;c[228]=aR;c[224]=aS;aT=aR;aU=c[225]|0;break}}}while(0);aN=c[227]|0;c[225]=aU+1;aP=aa(aN,aU);aN=aT+aP|0;c[aT+(aP+24|0)>>2]=X;if((c[av>>2]|0)>=(c[9738]|0)){h[aT+(aP+16|0)>>3]=-2.0;h[aO>>3]=ak;break}aH=+h[aO>>3];aF=(+h[ap+(as<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aE=(+h[ap+(as<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aD=(aH- +h[5279])*+h[2]+ +h[12]+-1.0;aC=+h[404]+aF*+h[392]+aE*+h[396]+aD*+h[400];aB=+h[405]+aF*+h[393]+aE*+h[397]+aD*+h[401];aG=+h[406]+aF*+h[394]+aE*+h[398]+aD*+h[402];aV=aG==0.0?1.0e-5:aG;h[aN>>3]=(+h[403]+aF*+h[391]+aE*+h[395]+aD*+h[399])/aV;h[aT+(aP+8|0)>>3]=aC/aV;h[aT+(aP+16|0)>>3]=aB/aV;aQ=aT+(aP+32|0)|0;h[aQ>>3]=aH;c[aT+(aP+40|0)>>2]=0;if(A){h[aQ>>3]=+h[ap+(as<<6)+32>>3];c[ab>>2]=-6}else{h[aQ>>3]=+h[aO>>3]}c[aT+(aP+44|0)>>2]=at;aP=aN-(c[228]|0)|0;h[aO>>3]=ak;if((aP|0)<=0){break}gy((aP|0)/48&-1,4,0,X,aj)}else{if((aI|0)<0){break}gy(aI,5,ac,X,aj)}}while(0);as=as+1|0;}while((as|0)<(c[aq>>2]|0))}aq=c[z>>2]|0;if((aq|0)==0){Y=ah;Z=an;_=ad;$=ae;break L16961}else{as=ah;ap=ad;ad=ae;ah=an;z=aq;ao=ao+1|0;an=as;ae=ap}}}if((ag|0)==0){Y=T;Z=S;_=R;$=Q;break}ae=X|0;an=V+224|0;ao=W&1;z=ao<<24>>24==0;ah=ao<<24>>24!=0;ao=V+68|0;ad=ag;while(1){ab=c[ad+12>>2]|0;do{if((c[af>>2]|0)==368){c[ae>>2]=1;c[y>>2]=0;A=c[c[an>>2]>>2]|0;if((A|0)==0){break}else{aW=A}do{h[F>>3]=+h[aW+24>>3];h[C>>3]=+h[aW+32>>3];h[E>>3]=+h[aW+40>>3];if((c[aW+72>>2]|0)==6){aX=+h[aW+80>>3]}else{aX=+(c[aW+76>>2]|0)}h[P>>3]=aX;A=c[228]|0;if((A|0)==0){K=12456;break L16959}ai=c[225]|0;ap=c[224]|0;do{if((ai|0)<(ap|0)){aY=A;aZ=ai}else{as=(c[226]|0)+ap|0;if((as|0)==0){uu(A);c[228]=0;c[224]=0;c[225]=0;aY=0;aZ=0;break}else{aq=db(A,aa(c[227]|0,as),150384)|0;c[228]=aq;c[224]=as;aY=aq;aZ=c[225]|0;break}}}while(0);A=c[227]|0;c[225]=aZ+1;ap=aa(A,aZ);A=aY+ap|0;c[aY+(ap+24|0)>>2]=X;do{if((c[y>>2]|0)<(c[9738]|0)){ak=+h[E>>3];aH=(+h[F>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aV=(+h[C>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aB=(ak- +h[5279])*+h[2]+ +h[12]+-1.0;aC=+h[404]+aH*+h[392]+aV*+h[396]+aB*+h[400];aD=+h[405]+aH*+h[393]+aV*+h[397]+aB*+h[401];aE=+h[406]+aH*+h[394]+aV*+h[398]+aB*+h[402];aF=aE==0.0?1.0e-5:aE;h[A>>3]=(+h[403]+aH*+h[391]+aV*+h[395]+aB*+h[399])/aF;h[aY+(ap+8|0)>>3]=aC/aF;h[aY+(ap+16|0)>>3]=aD/aF;ai=aY+(ap+32|0)|0;h[ai>>3]=ak;c[aY+(ap+40|0)>>2]=0;if(z){h[ai>>3]=+h[E>>3]}else{h[ai>>3]=+h[P>>3];c[ao>>2]=-6}c[aY+(ap+44|0)>>2]=k;ai=c[228]|0;aO=A-ai|0;aq=(aO|0)/48&-1;if((aO|0)<0){break}c[ai+(aq*48&-1)+40>>2]=aW;gy(aq,5,ac,X,aj)}else{h[aY+(ap+16|0)>>3]=-2.0}}while(0);aW=c[aW>>2]|0;}while((aW|0)!=0)}else{ap=ad+8|0;if((c[ap>>2]|0)<=0){break}A=ad|0;aq=-1;ai=0;while(1){aO=ab+(ai<<6)|0;as=c[228]|0;if((as|0)==0){K=12470;break L16959}ar=c[225]|0;at=c[224]|0;do{if((ar|0)<(at|0)){a_=as;a$=ar}else{av=(c[226]|0)+at|0;if((av|0)==0){uu(as);c[228]=0;c[224]=0;c[225]=0;a_=0;a$=0;break}else{aM=db(as,aa(c[227]|0,av),150384)|0;c[228]=aM;c[224]=av;a_=aM;a$=c[225]|0;break}}}while(0);as=c[227]|0;c[225]=a$+1;at=aa(as,a$);as=a_+at|0;c[a_+(at+24|0)>>2]=X;ar=aO|0;if((c[ar>>2]|0)<(c[9738]|0)){aM=ab+(ai<<6)+24|0;ak=+h[aM>>3];aF=(+h[ab+(ai<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aD=(+h[ab+(ai<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aC=(ak- +h[5279])*+h[2]+ +h[12]+-1.0;aB=+h[404]+aF*+h[392]+aD*+h[396]+aC*+h[400];aV=+h[405]+aF*+h[393]+aD*+h[397]+aC*+h[401];aH=+h[406]+aF*+h[394]+aD*+h[398]+aC*+h[402];aE=aH==0.0?1.0e-5:aH;h[as>>3]=(+h[403]+aF*+h[391]+aD*+h[395]+aC*+h[399])/aE;h[a_+(at+8|0)>>3]=aB/aE;h[a_+(at+16|0)>>3]=aV/aE;av=a_+(at+32|0)|0;h[av>>3]=ak;c[a_+(at+40|0)>>2]=0;if(ah){h[av>>3]=+h[ab+(ai<<6)+32>>3];c[ao>>2]=-6}else{h[av>>3]=+h[aM>>3]}c[a_+(at+44|0)>>2]=aO;a0=(as-(c[228]|0)|0)/48&-1}else{h[a_+(at+16|0)>>3]=-2.0;a0=-1}do{if((c[af>>2]|0)==225){at=c[(c[A>>2]|0)+12>>2]|0;as=at+(ai<<6)|0;aM=c[228]|0;if((aM|0)==0){K=12483;break L16959}av=c[225]|0;aL=c[224]|0;do{if((av|0)<(aL|0)){a1=aM;a2=av}else{aK=(c[226]|0)+aL|0;if((aK|0)==0){uu(aM);c[228]=0;c[224]=0;c[225]=0;a1=0;a2=0;break}else{au=db(aM,aa(c[227]|0,aK),150384)|0;c[228]=au;c[224]=aK;a1=au;a2=c[225]|0;break}}}while(0);aM=c[227]|0;c[225]=a2+1;aL=aa(aM,a2);c[a1+(aL+24|0)>>2]=0;if((c[as>>2]|0)<(c[9738]|0)){aM=at+(ai<<6)+24|0;ak=+h[aM>>3];aE=(+h[at+(ai<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aV=(+h[at+(ai<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aB=(ak- +h[5279])*+h[2]+ +h[12]+-1.0;aC=+h[404]+aE*+h[392]+aV*+h[396]+aB*+h[400];aD=+h[405]+aE*+h[393]+aV*+h[397]+aB*+h[401];aF=+h[406]+aE*+h[394]+aV*+h[398]+aB*+h[402];aH=aF==0.0?1.0e-5:aF;h[a1+aL>>3]=(+h[403]+aE*+h[391]+aV*+h[395]+aB*+h[399])/aH;h[a1+(aL+8|0)>>3]=aC/aH;h[a1+(aL+16|0)>>3]=aD/aH;av=a1+(aL+32|0)|0;h[av>>3]=ak;c[a1+(aL+40|0)>>2]=0;h[av>>3]=+h[aM>>3];c[a1+(aL+44|0)>>2]=as;break}else{h[a1+(aL+16|0)>>3]=-2.0;break}}}while(0);do{if((a0|0)>=0){aL=c[af>>2]|0;if((aL|0)==225){gy(a0,6,0,X,aj);break}else if((aL|0)==153|(aL|0)==345){aM=ab+(ai<<6)+24|0;ak=+h[aM>>3];h[aM>>3]=+h[8083];av=c[228]|0;if((av|0)==0){K=12497;break L16959}au=c[225]|0;aK=c[224]|0;do{if((au|0)<(aK|0)){a3=av;a4=au}else{aJ=(c[226]|0)+aK|0;if((aJ|0)==0){uu(av);c[228]=0;c[224]=0;c[225]=0;a3=0;a4=0;break}else{aw=db(av,aa(c[227]|0,aJ),150384)|0;c[228]=aw;c[224]=aJ;a3=aw;a4=c[225]|0;break}}}while(0);av=c[227]|0;c[225]=a4+1;aK=aa(av,a4);av=a3+aK|0;c[a3+(aK+24|0)>>2]=X;if((c[ar>>2]|0)>=(c[9738]|0)){h[a3+(aK+16|0)>>3]=-2.0;h[aM>>3]=ak;break}aH=+h[aM>>3];aD=(+h[ab+(ai<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aC=(+h[ab+(ai<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aB=(aH- +h[5279])*+h[2]+ +h[12]+-1.0;aV=+h[404]+aD*+h[392]+aC*+h[396]+aB*+h[400];aE=+h[405]+aD*+h[393]+aC*+h[397]+aB*+h[401];aF=+h[406]+aD*+h[394]+aC*+h[398]+aB*+h[402];aG=aF==0.0?1.0e-5:aF;h[av>>3]=(+h[403]+aD*+h[391]+aC*+h[395]+aB*+h[399])/aG;h[a3+(aK+8|0)>>3]=aV/aG;h[a3+(aK+16|0)>>3]=aE/aG;au=a3+(aK+32|0)|0;h[au>>3]=aH;c[a3+(aK+40|0)>>2]=0;if(ah){h[au>>3]=+h[ab+(ai<<6)+32>>3];c[ao>>2]=-6}else{h[au>>3]=+h[aM>>3]}c[a3+(aK+44|0)>>2]=aO;aK=av-(c[228]|0)|0;h[aM>>3]=ak;if((aK|0)<=0){break}gy((aK|0)/48&-1,4,0,X,aj);break}else if((aL|0)==33){aK=ab+(ai<<6)+24|0;aH=+h[aK>>3];h[aK>>3]=0.0;av=c[228]|0;if((av|0)==0){K=12510;break L16959}au=c[225]|0;as=c[224]|0;do{if((au|0)<(as|0)){a5=av;a6=au}else{at=(c[226]|0)+as|0;if((at|0)==0){uu(av);c[228]=0;c[224]=0;c[225]=0;a5=0;a6=0;break}else{aw=db(av,aa(c[227]|0,at),150384)|0;c[228]=aw;c[224]=at;a5=aw;a6=c[225]|0;break}}}while(0);av=c[227]|0;c[225]=a6+1;as=aa(av,a6);av=a5+as|0;c[a5+(as+24|0)>>2]=X;if((c[ar>>2]|0)>=(c[9738]|0)){h[a5+(as+16|0)>>3]=-2.0;h[aK>>3]=aH;break}ak=+h[aK>>3];aG=(+h[ab+(ai<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;aE=(+h[ab+(ai<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;aV=(ak- +h[5279])*+h[2]+ +h[12]+-1.0;aB=+h[404]+aG*+h[392]+aE*+h[396]+aV*+h[400];aC=+h[405]+aG*+h[393]+aE*+h[397]+aV*+h[401];aD=+h[406]+aG*+h[394]+aE*+h[398]+aV*+h[402];aF=aD==0.0?1.0e-5:aD;h[av>>3]=(+h[403]+aG*+h[391]+aE*+h[395]+aV*+h[399])/aF;h[a5+(as+8|0)>>3]=aB/aF;h[a5+(as+16|0)>>3]=aC/aF;au=a5+(as+32|0)|0;h[au>>3]=ak;c[a5+(as+40|0)>>2]=0;if(ah){h[au>>3]=+h[ab+(ai<<6)+32>>3];c[ao>>2]=-6}else{h[au>>3]=+h[aK>>3]}c[a5+(as+44|0)>>2]=aO;as=av-(c[228]|0)|0;h[aK>>3]=aH;if((as|0)<=0){break}gy((as|0)/48&-1,4,0,X,aj);break}else if((aL|0)==352|(aL|0)==51|(aL|0)==177|(aL|0)==193|(aL|0)==209|(aL|0)==1){if((aq|0)<=-1){break}gy(a0,0,0,X,aj);break}else{gy(a0,5,ac,X,aj);break}}}while(0);aO=ai+1|0;if((aO|0)<(c[ap>>2]|0)){aq=a0;ai=aO}else{break}}}}while(0);ab=c[ad>>2]|0;if((ab|0)==0){Y=T;Z=S;_=R;$=Q;break}else{ad=ab}}}}while(0);X=U+1|0;if((X|0)<(d|0)){Q=$;R=_;S=Z;T=Y;U=X;V=c[V>>2]|0}else{K=12581;break}}if((K|0)==12497){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((K|0)==12510){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((K|0)==12581){uu(Z);uu(Y);uu($);uu(_);break}else if((K|0)==12470){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((K|0)==12483){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((K|0)==12456){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((K|0)==12531){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((K|0)==12564){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);K=c[11605]|0;if((K|0)==0){uu(c[7628]|0);c[7628]=0;c[7624]=0;c[7625]=0;uu(c[11608]|0);c[11608]=0;c[11604]=0;c[11605]=0;uu(c[228]|0);c[228]=0;c[224]=0;c[225]=0;uk(176896,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}_=(c[7625]|0)==0;$=K<<2;K=ut($)|0;do{if((K|0)==0){gk();Y=ut($)|0;if((Y|0)!=0){a7=Y;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=168848,v)|0)}else{a7=K}}while(0);K=a7;$=c[11605]|0;if(($|0)>0){Y=0;while(1){c[K+(Y<<2)>>2]=Y;Z=Y+1|0;d=c[11605]|0;if((Z|0)<(d|0)){Y=Z}else{a8=d;break}}}else{a8=$}bM(a7|0,a8|0,4,6);a8=(c[11608]|0)+((c[K>>2]|0)*20&-1)|0;if((c[11605]|0)>1){$=1;Y=a8;while(1){d=K+($<<2)|0;c[Y+16>>2]=c[d>>2];Z=(c[11608]|0)+((c[d>>2]|0)*20&-1)|0;d=$+1|0;if((d|0)<(c[11605]|0)){$=d;Y=Z}else{a9=Z;break}}}else{a9=a8}c[a9+16>>2]=-1;c[11566]=c[K>>2];uu(a7);if(_){_=c[11566]|0;if((_|0)<=-1){i=e;return}a7=_;_=c[11608]|0;do{K=_;a9=K+(a7*20&-1)|0;a8=c[228]|0;gw(a9,a8+((c[a9>>2]|0)*48&-1)|0,a8+((c[K+(a7*20&-1)+4>>2]|0)*48&-1)|0);_=c[11608]|0;a7=c[_+((c[11566]|0)*20&-1)+16>>2]|0;c[11566]=a7;}while((a7|0)>-1);i=e;return}a7=c[7625]|0;if((a7|0)!=0){_=a7<<2;a7=ut(_)|0;do{if((a7|0)==0){gk();K=ut(_)|0;if((K|0)!=0){ba=K;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=172600,v)|0)}else{ba=a7}}while(0);a7=ba;_=c[7625]|0;if((_|0)>0){K=0;while(1){c[a7+(K<<2)>>2]=K;a8=K+1|0;a9=c[7625]|0;if((a8|0)<(a9|0)){K=a8}else{bb=a9;break}}}else{bb=_}bM(ba|0,bb|0,4,14);bb=(c[7628]|0)+((c[a7>>2]|0)*104&-1)|0;if((c[7625]|0)>1){_=1;K=bb;while(1){a9=a7+(_<<2)|0;c[K+100>>2]=c[a9>>2];a8=(c[7628]|0)+((c[a9>>2]|0)*104&-1)|0;a9=_+1|0;if((a9|0)<(c[7625]|0)){_=a9;K=a8}else{bc=a8;break}}}else{bc=bb}c[bc+100>>2]=-1;c[8022]=c[a7>>2];uu(ba)}c[l>>2]=c[8022];ba=c[11566]|0;if((ba|0)<=-1){i=e;return}a7=ba;ba=c[11608]|0;while(1){bc=ba;if((c[bc+(a7*20&-1)+8>>2]|0)==-3){bd=a7;be=ba}else{gu(a7,c[bc+(a7*20&-1)>>2]|0,c[bc+(a7*20&-1)+4>>2]|0,l);bd=c[11566]|0;be=c[11608]|0}bc=c[be+(bd*20&-1)+16>>2]|0;c[11566]=bc;if((bc|0)>-1){a7=bc;ba=be}else{break}}i=e;return}function gw(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;f=i;i=i+72|0;g=f|0;j=f+16|0;k=b+12|0;l=c[k>>2]|0;m=g;n=l+40|0;c[m>>2]=c[n>>2];c[m+4>>2]=c[n+4>>2];c[m+8>>2]=c[n+8>>2];c[m+12>>2]=c[n+12>>2];n=j;o=l;c[n>>2]=c[o>>2];c[n+4>>2]=c[o+4>>2];c[n+8>>2]=c[o+8>>2];c[n+12>>2]=c[o+12>>2];c[n+16>>2]=c[o+16>>2];c[n+20>>2]=c[o+20>>2];c[n+24>>2]=c[o+24>>2];c[n+28>>2]=c[o+28>>2];c[n+32>>2]=c[o+32>>2];c[n+36>>2]=c[o+36>>2];c[n+40>>2]=c[o+40>>2];c[n+44>>2]=c[o+44>>2];c[n+48>>2]=c[o+48>>2];c[n+52>>2]=c[o+52>>2];p=j+8|0;q=((c[p>>2]|0)+11|0)>>>0<2;if(q){if((c[b+8>>2]|0)==-11){r=e}else{s=12616}}else{s=12616}if((s|0)==12616){r=d}t=~~+h[r+32>>3];do{if((c[g>>2]|0)==3){if((c[g+4>>2]|0)==-6){c[j+44>>2]=t;s=12651;break}if((c[b+8>>2]|0)==-8){s=12651;break}if((l|0)!=56296){s=12623;break}c[j+44>>2]=t}else{s=12623}}while(0);do{if((s|0)==12623){r=j+4|0;if((c[r>>2]|0)==-6){u=j|0;v=c[u>>2]|0;w=c[8798]|0;x=(w|0)>0;y=t;L17222:while(1){z=43264;while(1){A=c[z>>2]|0;if((A|0)==0){break}if((c[A+4>>2]|0)==(y|0)){break L17222}else{z=A|0}}B=y-1|0;if(!((y|0)>(w|0)&x)){s=12634;break}y=((B|0)%(w|0)&-1)+1|0}if((s|0)==12634){c[r>>2]=B;c[j+40>>2]=1;c[j+44>>2]=B;c[p>>2]=B;s=12651;break}w=A+8|0;c[n>>2]=c[w>>2];c[n+4>>2]=c[w+4>>2];c[n+8>>2]=c[w+8>>2];c[n+12>>2]=c[w+12>>2];c[n+16>>2]=c[w+16>>2];c[n+20>>2]=c[w+20>>2];c[n+24>>2]=c[w+24>>2];c[n+28>>2]=c[w+28>>2];c[n+32>>2]=c[w+32>>2];c[n+36>>2]=c[w+36>>2];c[n+40>>2]=c[w+40>>2];c[n+44>>2]=c[w+44>>2];c[n+48>>2]=c[w+48>>2];c[n+52>>2]=c[w+52>>2];c[u>>2]=v;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[r>>2]=y;a[j+32|0]=0;s=12651;break}if((a[j+32|0]&1)!=0){s=12651;break}c[j+40>>2]=1;c[j+44>>2]=c[r>>2];s=12651;break}if(q){c[p>>2]=c[b+8>>2];break}if((c[9742]|0)==0){break}if((c[l+40>>2]|0)==6){break}w=j|0;x=c[w>>2]|0;z=c[8798]|0;C=(z|0)>0;D=c[b+8>>2]|0;L17242:while(1){E=D+1|0;F=43264;while(1){G=c[F>>2]|0;if((G|0)==0){break}if((c[G+4>>2]|0)==(E|0)){s=12643;break L17242}else{F=G|0}}if(!((E|0)>(z|0)&C)){s=12649;break}D=(D|0)%(z|0)&-1}do{if((s|0)==12643){z=G+8|0;c[n>>2]=c[z>>2];c[n+4>>2]=c[z+4>>2];c[n+8>>2]=c[z+8>>2];c[n+12>>2]=c[z+12>>2];c[n+16>>2]=c[z+16>>2];c[n+20>>2]=c[z+20>>2];c[n+24>>2]=c[z+24>>2];c[n+28>>2]=c[z+28>>2];c[n+32>>2]=c[z+32>>2];c[n+36>>2]=c[z+36>>2];c[n+40>>2]=c[z+40>>2];c[n+44>>2]=c[z+44>>2];c[n+48>>2]=c[z+48>>2];c[n+52>>2]=c[z+52>>2];c[w>>2]=x;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[r>>2]=E;a[j+32|0]=0;break}if((a[j+32|0]&1)!=0){break}c[j+40>>2]=1;c[j+44>>2]=c[r>>2]}else if((s|0)==12649){c[r>>2]=D;c[j+40>>2]=1;c[j+44>>2]=D;c[p>>2]=D}}while(0);D=j+40|0;c[m>>2]=c[D>>2];c[m+4>>2]=c[D+4>>2];c[m+8>>2]=c[D+8>>2];c[m+12>>2]=c[D+12>>2];s=12651}}while(0);do{if((s|0)==12651){E=j+40|0;c[m>>2]=c[E>>2];c[m+4>>2]=c[E+4>>2];c[m+8>>2]=c[E+8>>2];c[m+12>>2]=c[E+12>>2];c[n>>2]=c[o>>2];c[n+4>>2]=c[o+4>>2];c[n+8>>2]=c[o+8>>2];c[n+12>>2]=c[o+12>>2];c[n+16>>2]=c[o+16>>2];c[n+20>>2]=c[o+20>>2];c[n+24>>2]=c[o+24>>2];c[n+28>>2]=c[o+28>>2];c[n+32>>2]=c[o+32>>2];c[n+36>>2]=c[o+36>>2];c[E>>2]=c[m>>2];c[E+4>>2]=c[m+4>>2];c[E+8>>2]=c[m+8>>2];c[E+12>>2]=c[m+12>>2];a[j+32|0]=1;if(!q){break}c[p>>2]=c[b+8>>2]}}while(0);un(d,e,j,g);if((c[c[k>>2]>>2]|0)==0){i=f;return}gx(d);gx(e);i=f;return}function gx(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0.0,H=0.0,I=0;d=i;i=i+120|0;e=d|0;f=d+16|0;g=d+32|0;j=d+48|0;k=d+64|0;l=~~(+h[b>>3]*+(c[180]|0))+(c[186]|0)|0;m=~~(+h[b+8>>3]*+(c[40]|0))+(c[46]|0)|0;n=b+24|0;o=c[n>>2]|0;if((o|0)==0){i=d;return}if((c[o+8>>2]|0)<=-2){i=d;return}p=c[13542]|0;do{if((p|0)!=0){q=(c[p>>2]|0)>(l|0)&1;r=(c[p+4>>2]|0)<(l|0)?q|2:q;q=(c[p+8>>2]|0)>(m|0)?r|4:r;if((((c[p+12>>2]|0)<(m|0)?q|8:q)|0)==0){break}i=d;return}}while(0);p=c[b+40>>2]|0;if((p|0)!=0){fp(l,m,p);c[n>>2]=0;i=d;return}p=c[o+40>>2]|0;do{if((p|0)==6){s=+h[b+32>>3];q=c[34]|0;r=(a[66852]&1)==0;do{if((a[64788+(q*688&-1)|0]&1)==0){if(r){t=s;break}if(s>0.0){u=+_(+s);t=u/+h[8358];break}else{t=+h[8341];break}}else{if(r){t=+Z(+(s*+h[64800+(q*688&-1)>>3]));break}if(+h[64792+(q*688&-1)>>3]==+h[8357]){t=s;break}t=s*+h[64800+(q*688&-1)>>3]/+h[8358]}}while(0);s=+h[8341];do{if(s>2]|0)==0){break}c[f>>2]=5;h[f+8>>3]=v;c[f+4>>2]=0;cM[c[q>>2]&511](f)}else if((p|0)==2){if((c[o+44>>2]|0)!=-6){break}q=k;r=o;c[q>>2]=c[r>>2];c[q+4>>2]=c[r+4>>2];c[q+8>>2]=c[r+8>>2];c[q+12>>2]=c[r+12>>2];c[q+16>>2]=c[r+16>>2];c[q+20>>2]=c[r+20>>2];c[q+24>>2]=c[r+24>>2];c[q+28>>2]=c[r+28>>2];c[q+32>>2]=c[r+32>>2];c[q+36>>2]=c[r+36>>2];c[q+40>>2]=c[r+40>>2];c[q+44>>2]=c[r+44>>2];c[q+48>>2]=c[r+48>>2];c[q+52>>2]=c[r+52>>2];r=k|0;x=c[r>>2]|0;y=c[8798]|0;z=(y|0)>0;A=~~+h[b+32>>3];L17305:while(1){B=43264;while(1){C=c[B>>2]|0;if((C|0)==0){break}if((c[C+4>>2]|0)==(A|0)){D=12670;break L17305}else{B=C|0}}E=A-1|0;if(!((A|0)>(y|0)&z)){D=12676;break}A=((E|0)%(y|0)&-1)+1|0}do{if((D|0)==12670){y=C+8|0;c[q>>2]=c[y>>2];c[q+4>>2]=c[y+4>>2];c[q+8>>2]=c[y+8>>2];c[q+12>>2]=c[y+12>>2];c[q+16>>2]=c[y+16>>2];c[q+20>>2]=c[y+20>>2];c[q+24>>2]=c[y+24>>2];c[q+28>>2]=c[y+28>>2];c[q+32>>2]=c[y+32>>2];c[q+36>>2]=c[y+36>>2];c[q+40>>2]=c[y+40>>2];c[q+44>>2]=c[y+44>>2];c[q+48>>2]=c[y+48>>2];c[q+52>>2]=c[y+52>>2];c[r>>2]=x;y=c[3524]|0;if((c[y+96>>2]&1024|0)!=0){c[k+4>>2]=A;a[k+32|0]=0;F=y;break}if((a[k+32|0]&1)!=0){F=y;break}c[k+40>>2]=1;c[k+44>>2]=c[k+4>>2];F=y}else if((D|0)==12676){c[k+4>>2]=E;c[k+40>>2]=1;c[k+44>>2]=E;c[k+8>>2]=E;F=c[3524]|0}}while(0);fn(k+40|0,F)}else if((p|0)==3){if((c[o+44>>2]|0)==-6){A=(c[3524]|0)+144|0;if((c[A>>2]|0)==0){break}x=~~+h[b+32>>3];c[j>>2]=3;c[j+4>>2]=x;h[j+8>>3]=0.0;cM[c[A>>2]&511](j);break}else{A=c[o+44>>2]|0;x=(c[3524]|0)+144|0;if((c[x>>2]|0)==0){break}c[g>>2]=3;c[g+4>>2]=A;h[g+8>>3]=0.0;cM[c[x>>2]&511](g);break}}else if((p|0)==4){s=+h[b+32>>3];w=+h[8341];do{if(w>2]|0)==0){break}c[e>>2]=5;h[e+8>>3]=G;c[e+4>>2]=0;cM[c[x>>2]&511](e)}}while(0);e=c[n>>2]|0;if(+h[e+24>>3]==-3.0){cK[c[(c[3524]|0)+92>>2]&63](+h[3817]*+h[(c[b+44>>2]|0)+48>>3]);I=c[n>>2]|0}else{I=e}cR[c[(c[3524]|0)+80>>2]&127](l,m,c[I+8>>2]|0);c[n>>2]=0;i=d;return}function gy(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=i;j=c[228]|0;k=j;l=k+(a*48&-1)|0;m=1<>>1;o=k+((a-d|0)*48&-1)|0;p=k+((a-1|0)*48&-1)|0}else if((b|0)==4){n=0;o=k+((a-1|0)*48&-1)|0;p=l}else if((b|0)==2){n=m;o=k+(((a-1|0)-d|0)*48&-1)|0;p=l}else if((b|0)==1){n=m;o=k+((a-d|0)*48&-1)|0;p=l}else{n=m;o=0;p=l}l=(o-j|0)/48&-1;if(+h[p+16>>3]==-2.0){q=-2;i=g;return q|0}if(+h[o+16>>3]==-2.0){q=-2;i=g;return q|0}if((n|0)==0){r=f}else{r=(c[9734]&n|0)==0?-3:f}f=c[11608]|0;if((f|0)==0){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}n=c[11605]|0;o=c[11604]|0;do{if((n|0)<(o|0)){s=f;t=n}else{p=(c[11606]|0)+o|0;if((p|0)==0){uu(f);c[11608]=0;c[11604]=0;c[11605]=0;s=0;t=0;break}else{j=db(f,aa(c[11607]|0,p),150384)|0;c[11608]=j;c[11604]=p;s=j;t=c[11605]|0;break}}}while(0);f=c[11607]|0;c[11605]=t+1;o=aa(f,t);t=s+o|0;f=c[228]|0;n=s+(o+8|0)|0;c[n>>2]=r;c[s+(o+12|0)>>2]=e;c[s+(o+16|0)>>2]=-1;r=t;do{if(+h[f+(a*48&-1)+16>>3]<+h[f+(l*48&-1)+16>>3]){c[r>>2]=l;c[s+(o+4|0)>>2]=a;if((c[e+8>>2]|0)!=-10){break}c[n>>2]=-11}else{c[r>>2]=a;c[s+(o+4|0)>>2]=l;if((c[e+8>>2]|0)!=-10){break}c[n>>2]=-10}}while(0);q=(t-(c[11608]|0)|0)/20&-1;i=g;return q|0}function gz(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0,B=0,C=0,D=0.0,E=0.0,F=0,G=0.0,H=0.0,I=0,J=0.0,K=0.0,L=0,M=0.0,N=0.0,O=0,R=0.0,S=0.0,T=0,U=0.0,V=0.0,W=0,X=0.0,Y=0,Z=0.0,_=0.0,$=0.0,ab=0,ac=0,ad=0.0,ae=0.0,af=0.0,ag=0.0,ah=0.0,ai=0,aj=0.0;f=i;if((d|0)==2){j=b-1|0;k=j-e|0;l=j;m=b}else if((d|0)==0){j=b-e|0;k=j;l=j-1|0;m=b}else if((d|0)==3){j=b-1|0;k=b-e|0;l=j-e|0;m=j}else if((d|0)==1){k=b-e|0;l=b-1|0;m=b}else{k=0;l=0;m=0}b=c[228]|0;n=+h[b+(m*48&-1)+16>>3];if(n==-2.0){o=-2;i=f;return o|0}p=+h[b+(l*48&-1)+16>>3];if(p==-2.0){o=-2;i=f;return o|0}q=+h[b+(k*48&-1)+16>>3];if(q==-2.0){o=-2;i=f;return o|0}r=+h[b+(m*48&-1)>>3];s=+h[b+(l*48&-1)>>3];t=+P(+(r-s));u=+h[b+(m*48&-1)+8>>3];w=+h[b+(l*48&-1)+8>>3];x=t+ +P(+(u-w));if(x+ +P(+(n-p))+-1.0e-5<=0.0){o=-2;i=f;return o|0}x=+h[b+(k*48&-1)>>3];t=+P(+(s-x));s=+h[b+(k*48&-1)+8>>3];y=t+ +P(+(w-s));if(y+ +P(+(p-q))+-1.0e-5<=0.0){o=-2;i=f;return o|0}p=+P(+(x-r));r=p+ +P(+(s-u));if(r+ +P(+(q-n))+-1.0e-5<=0.0){o=-2;i=f;return o|0}b=c[7628]|0;if((b|0)==0){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}e=c[7625]|0;d=c[7624]|0;do{if((e|0)<(d|0)){z=b;A=e}else{j=(c[7626]|0)+d|0;if((j|0)==0){uu(b);c[7628]=0;c[7624]=0;c[7625]=0;z=0;A=0;break}else{B=db(b,aa(c[7627]|0,j),150384)|0;c[7628]=B;c[7624]=j;z=B;A=c[7625]|0;break}}}while(0);b=c[7627]|0;c[7625]=A+1;d=aa(b,A);A=z+d|0;c[A>>2]=m;c[z+(d+4|0)>>2]=l;c[z+(d+8|0)>>2]=k;c[z+(d+100|0)>>2]=-1;n=+h[(c[228]|0)+(m*48&-1)>>3];b=z+(d+16|0)|0;h[b>>3]=n;e=c[228]|0;q=+h[e+(l*48&-1)>>3];if(q>3]=q;C=c[228]|0;D=q}else{C=e;D=n}n=+h[C+(k*48&-1)>>3];if(n>3]=n;E=n}else{E=D}b=A;D=+g[3534];n=-0.0-D;if(E>3];C=z+(d+32|0)|0;h[C>>3]=E;e=c[228]|0;q=+h[e+(l*48&-1)+8>>3];if(q>3]=q;F=c[228]|0;G=q}else{F=e;G=E}E=+h[F+(k*48&-1)+8>>3];if(E>3]=E;H=E}else{H=G}if(H>3];C=z+(d+48|0)|0;h[C>>3]=H;F=c[228]|0;G=+h[F+(l*48&-1)+16>>3];if(G>3]=G;I=c[228]|0;J=G}else{I=F;J=H}H=+h[I+(k*48&-1)+16>>3];if(H>3]=H;K=H}else{K=J}if(K>3];C=z+(d+24|0)|0;h[C>>3]=n;I=c[228]|0;K=+h[I+(l*48&-1)>>3];if(K>n){h[C>>3]=K;L=c[228]|0;M=K}else{L=I;M=n}n=+h[L+(k*48&-1)>>3];if(n>M){h[C>>3]=n;N=n}else{N=M}M=D;if(N>M){a[46904]=1}N=+h[(c[228]|0)+(m*48&-1)+8>>3];C=z+(d+40|0)|0;h[C>>3]=N;L=c[228]|0;D=+h[L+(l*48&-1)+8>>3];if(D>N){h[C>>3]=D;O=c[228]|0;R=D}else{O=L;R=N}N=+h[O+(k*48&-1)+8>>3];if(N>R){h[C>>3]=N;S=N}else{S=R}if(S>M){a[46904]=1}S=+h[(c[228]|0)+(m*48&-1)+16>>3];C=z+(d+56|0)|0;h[C>>3]=S;O=c[228]|0;R=+h[O+(l*48&-1)+16>>3];if(R>S){h[C>>3]=R;T=c[228]|0;U=R}else{T=O;U=S}S=+h[T+(k*48&-1)+16>>3];if(S>U){h[C>>3]=S;V=S}else{V=U}if(V>M){a[46904]=1}C=z+(d+64|0)|0;T=c[228]|0;O=T+(k*48&-1)+8|0;L=T+(m*48&-1)+8|0;I=T+(k*48&-1)+16|0;F=T+(m*48&-1)+16|0;M=(+h[O>>3]- +h[L>>3])*(+h[I>>3]+ +h[F>>3]);h[C>>3]=M;e=T+(k*48&-1)|0;B=T+(m*48&-1)|0;V=(+h[I>>3]- +h[F>>3])*(+h[e>>3]+ +h[B>>3]);I=z+(d+72|0)|0;h[I>>3]=V;U=(+h[e>>3]- +h[B>>3])*(+h[O>>3]+ +h[L>>3]);O=z+(d+80|0)|0;h[O>>3]=U;e=c[228]|0;T=e+(l*48&-1)|0;j=e+(l*48&-1)+8|0;W=e+(l*48&-1)+16|0;S=M+(+h[L>>3]- +h[j>>3])*(+h[F>>3]+ +h[W>>3]);h[C>>3]=S;l=T|0;M=V+(+h[F>>3]- +h[W>>3])*(+h[B>>3]+ +h[l>>3]);h[I>>3]=M;V=U+(+h[B>>3]- +h[l>>3])*(+h[L>>3]+ +h[j>>3]);h[O>>3]=V;L=c[228]|0;B=L+(k*48&-1)|0;F=L+(k*48&-1)+8|0;e=L+(k*48&-1)+16|0;U=S+(+h[j>>3]- +h[F>>3])*(+h[W>>3]+ +h[e>>3]);h[C>>3]=U;k=B|0;S=M+(+h[W>>3]- +h[e>>3])*(+h[l>>3]+ +h[k>>3]);h[I>>3]=S;M=V+(+h[l>>3]- +h[k>>3])*(+h[j>>3]+ +h[F>>3]);h[O>>3]=M;V=+Q(+(U*U+S*S+M*M));if(V+-1.0e-5>0.0){X=V;Y=T;Z=M;_=U;$=S}else{T=c[228]|0;F=T+(m*48&-1)|0;j=F|0;k=T+(m*48&-1)+8|0;l=T+(m*48&-1)+16|0;m=1;e=B;while(1){if((m|0)>=3){ab=12789;break}B=c[b+(m<<2)>>2]|0;W=T+(B*48&-1)|0;S=+h[j>>3];U=+P(+(S- +h[W>>3]));M=+h[k>>3];V=U+ +P(+(M- +h[T+(B*48&-1)+8>>3]));U=+h[l>>3];if(V+ +P(+(U- +h[T+(B*48&-1)+16>>3]))+-1.0e-5>0.0){ac=W;ad=S;ae=M;af=U;break}else{m=m+1|0;e=W}}if((ab|0)==12789){ac=e;ad=+h[j>>3];ae=+h[k>>3];af=+h[l>>3]}e=ac+8|0;U=+h[e>>3];if(+P(+(ae-U))<1.0e-5){ag=ae+1.0;ah=ad}else{ag=ae;ah=ad+1.0}ab=ac+16|0;ad=+h[ab>>3];M=ag*(af-ad)+((af-af)*U+ae*(ad-af));h[C>>3]=M;m=ac|0;ad=+h[m>>3];ae=+h[j>>3];U=af*(ae-ad)+(+h[l>>3]*(ad-ah)+ +h[ab>>3]*(ah-ae));h[I>>3]=U;ae=+h[e>>3];ad=+h[k>>3];af=ah*(ad-ae)+(+h[j>>3]*(ae-ag)+ +h[m>>3]*(ag-ad));h[O>>3]=af;X=+Q(+(M*M+U*U+af*af));Y=F;Z=af;_=M;$=U}if(Z<0.0){ai=0;aj=X*-1.0}else{ai=1;aj=X}X=_/aj;h[C>>3]=X;_=$/aj;h[I>>3]=_;$=Z/aj;h[O>>3]=$;h[z+(d+88|0)>>3]=+h[Y>>3]*(-0.0-X)-_*+h[Y+8>>3]-$*+h[Y+16>>3];a[z+(d+96|0)|0]=ai;o=(A-(c[7628]|0)|0)/104&-1;i=f;return o|0}function gA(b,d,e,f,g,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;k=i;if((e|0)<=-2){i=k;return}l=(f|0)<-1?e:f;f=c[7628]|0;m=(a[f+(l*104&-1)+96|0]&1)<<1|a[f+(e*104&-1)+96|0]&1;do{if((m|0)==0){f=c[11608]|0;n=f+(b*20&-1)+8|0;if((c[n>>2]|0)==-3){o=f}else{c[n>>2]=j;o=c[11608]|0}n=o+(d*20&-1)+8|0;if((c[n>>2]|0)==-3){i=k;return}c[n>>2]=j;i=k;return}else if((m|0)==2){n=(c[11608]|0)+(b*20&-1)+8|0;if((c[n>>2]|0)==-3){break}c[n>>2]=j}else if((m|0)!=1){i=k;return}}while(0);m=c[11608]|0;do{if(!((b|0)==(d|0)&(a[38960]^1))){if((c[m+(d*20&-1)+8>>2]|0)!=-3){break}i=k;return}}while(0);b=m;m=c[b+(d*20&-1)>>2]|0;o=c[b+(d*20&-1)+4>>2]|0;n=c[7628]|0;f=c[n+(e*104&-1)>>2]|0;p=c[n+(e*104&-1)+4>>2]|0;do{if((f|0)==(m|0)){q=c[n+(e*104&-1)+8>>2]|0;if((p|0)==(o|0)){r=q;break}r=(q|0)==(o|0)?p:-1}else{if((p|0)==(m|0)){q=c[n+(e*104&-1)+8>>2]|0;if((f|0)==(o|0)){r=q;break}r=(q|0)==(o|0)?f:-1;break}if((c[n+(e*104&-1)+8>>2]|0)!=(m|0)){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=143816,v)|0)}if((f|0)==(o|0)){r=p;break}r=(p|0)==(o|0)?f:-1}}while(0);if((r|0)<=-1){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=143816,v)|0)}f=c[228]|0;if(+h[n+(l*104&-1)+88>>3]+(+h[f+(r*48&-1)>>3]*+h[n+(l*104&-1)+64>>3]+ +h[f+(r*48&-1)+8>>3]*+h[n+(l*104&-1)+72>>3]+ +h[f+(r*48&-1)+16>>3]*+h[n+(l*104&-1)+80>>3])>0.0){c[b+(d*20&-1)+8>>2]=(a[n+(e*104&-1)+96|0]&1)!=0?g:j;i=k;return}else{c[b+(d*20&-1)+8>>2]=(a[n+(l*104&-1)+96|0]&1)!=0?g:j;i=k;return}}function gB(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;var f=0.0,g=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0;f=+h[e+80>>3];if(f==0.0){g=0;return g|0}i=c[228]|0;j=c[e>>2]|0;k=c[e+4>>2]|0;l=c[e+8>>2]|0;m=+h[a>>3];n=m+(+h[b>>3]-m)*d;m=+h[a+8>>3];o=m+(+h[b+8>>3]-m)*d;m=+h[a+16>>3];p=m+(+h[b+16>>3]-m)*d;d=+h[i+(j*48&-1)>>3];m=+h[i+(j*48&-1)+8>>3];q=+h[i+(k*48&-1)>>3];r=+h[i+(k*48&-1)+8>>3];s=(o-m)*(q-d)-(n-d)*(r-m);t=+h[i+(l*48&-1)>>3];u=+h[i+(l*48&-1)+8>>3];v=(o-r)*(t-q)-(n-q)*(u-r);r=(d-t)*(o-u)-(n-t)*(m-u);do{if(s<-1.0e-5|v<-1.0e-5|r<-1.0e-5){if(s+-1.0e-5>0.0){g=0;return g|0}if(v+-1.0e-5>0.0){g=0;return g|0}if(r+-1.0e-5>0.0){g=0}else{break}return g|0}}while(0);r=(-0.0-(+h[e+88>>3]+(n*+h[e+64>>3]+o*+h[e+72>>3])))/f;if(r>3<<3,c[v>>2]=0,v)|0);return 0}g=c[225]|0;j=c[224]|0;do{if((g|0)<(j|0)){k=f;l=g}else{m=(c[226]|0)+j|0;if((m|0)==0){uu(f);c[228]=0;c[224]=0;c[225]=0;k=0;l=0;break}else{n=db(f,aa(c[227]|0,m),150384)|0;c[228]=n;c[224]=m;k=n;l=c[225]|0;break}}}while(0);f=c[227]|0;c[225]=l+1;j=aa(f,l);l=k+j|0;f=k;o=+h[f+(a*48&-1)>>3];p=o+(+h[f+(b*48&-1)>>3]-o)*d;h[l>>3]=p;f=c[228]|0;o=+h[f+(a*48&-1)+8>>3];q=o+(+h[f+(b*48&-1)+8>>3]-o)*d;h[k+(j+8|0)>>3]=q;f=c[228]|0;o=+h[f+(a*48&-1)+16>>3];r=o+(+h[f+(b*48&-1)+16>>3]-o)*d;h[k+(j+16|0)>>3]=r;f=c[228]|0;o=+h[f+(a*48&-1)+32>>3];h[k+(j+32|0)>>3]=o+(+h[f+(b*48&-1)+32>>3]-o)*d;c[k+(j+24|0)>>2]=0;j=c[228]|0;k=j;d=+P(+(p- +h[k+(a*48&-1)>>3]));o=d+ +P(+(q- +h[k+(a*48&-1)+8>>3]));if(o+ +P(+(r- +h[k+(a*48&-1)+16>>3]))+-1.0e-5<=0.0){if((j|0)==0){uk(119400,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}f=c[225]|0;if((f|0)==0){s=a;i=e;return s|0}c[225]=f-1;s=a;i=e;return s|0}o=+P(+(p- +h[k+(b*48&-1)>>3]));p=o+ +P(+(q- +h[k+(b*48&-1)+8>>3]));if(p+ +P(+(r- +h[k+(b*48&-1)+16>>3]))+-1.0e-5>0.0){s=(l-j|0)/48&-1;i=e;return s|0}j=c[225]|0;if((j|0)==0){s=b;i=e;return s|0}c[225]=j-1;s=b;i=e;return s|0}function gD(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;e=c[b>>2]|0;if((a[e+8|0]&1)!=0){uf(-1,72648,(v=i,i=i+8|0,c[v>>2]=c[e+4>>2],v)|0)}b=e+16|0;f=c[6354]|0;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f+1|0;c[6354]=g;f=14296+(g*24&-1)|0;g=b;c[f>>2]=c[g>>2];c[f+4>>2]=c[g+4>>2];c[f+8>>2]=c[g+8>>2];c[f+12>>2]=c[g+12>>2];c[f+16>>2]=c[g+16>>2];c[f+20>>2]=c[g+20>>2];if((c[b>>2]|0)!=3){i=d;return}b=c[e+24>>2]|0;if((b|0)==0){i=d;return}e=bP(b|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=e;i=d;return}function gE(a){a=a|0;var b=0,d=0,e=0;b=i;d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d+1|0;c[6354]=e;d=14296+(e*24&-1)|0;e=a;c[d>>2]=c[e>>2];c[d+4>>2]=c[e+4>>2];c[d+8>>2]=c[e+8>>2];c[d+12>>2]=c[e+12>>2];c[d+16>>2]=c[e+16>>2];c[d+20>>2]=c[e+20>>2];if((c[a>>2]|0)!=3){i=b;return}e=c[a+8>>2]|0;if((e|0)==0){i=b;return}a=bP(e|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=a;i=b;return}function gF(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;d=c[a>>2]|0;a=d+24|0;e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e+1|0;c[6354]=f;e=14296+(f*24&-1)|0;f=a;c[e>>2]=c[f>>2];c[e+4>>2]=c[f+4>>2];c[e+8>>2]=c[f+8>>2];c[e+12>>2]=c[f+12>>2];c[e+16>>2]=c[f+16>>2];c[e+20>>2]=c[f+20>>2];if((c[a>>2]|0)!=3){i=b;return}a=c[d+32>>2]|0;if((a|0)==0){i=b;return}d=bP(a|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=d;i=b;return}function gG(a){a=a|0;var b=0;a=i;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=b-1;if((c[14296+(b*24&-1)>>2]|0)!=3){i=a;return}uu(c[14304+(b*24&-1)>>2]|0);i=a;return}function gH(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;d=c[a>>2]|0;a=d+48|0;e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e+1|0;c[6354]=f;e=14296+(f*24&-1)|0;f=a;c[e>>2]=c[f>>2];c[e+4>>2]=c[f+4>>2];c[e+8>>2]=c[f+8>>2];c[e+12>>2]=c[f+12>>2];c[e+16>>2]=c[f+16>>2];c[e+20>>2]=c[f+20>>2];if((c[a>>2]|0)!=3){i=b;return}a=c[d+56>>2]|0;if((a|0)==0){i=b;return}d=bP(a|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=d;i=b;return}function gI(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=c[14304+(d*24&-1)>>2]|0;g=c[a>>2]|0;a=g+24+(f*24&-1)|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d;e=14296+(d*24&-1)|0;d=a;c[e>>2]=c[d>>2];c[e+4>>2]=c[d+4>>2];c[e+8>>2]=c[d+8>>2];c[e+12>>2]=c[d+12>>2];c[e+16>>2]=c[d+16>>2];c[e+20>>2]=c[d+20>>2];if((c[a>>2]|0)!=3){i=b;return}a=c[g+24+(f*24&-1)+8>>2]|0;if((a|0)==0){i=b;return}f=bP(a|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=f;i=b;return}function gJ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=i;i=i+24|0;d=c[a>>2]|0;a=d+8|0;if((c[a>>2]|0)==0){uf(-1,168872,(v=i,i=i+8|0,c[v>>2]=c[d+4>>2],v)|0)}e=d+24|0;f=b|0;g=e;c[f>>2]=c[g>>2];c[f+4>>2]=c[g+4>>2];c[f+8>>2]=c[g+8>>2];c[f+12>>2]=c[g+12>>2];c[f+16>>2]=c[g+16>>2];c[f+20>>2]=c[g+20>>2];h=c[6354]|0;if((h|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=h-1;j=14296+(h*24&-1)|0;c[g>>2]=c[j>>2];c[g+4>>2]=c[j+4>>2];c[g+8>>2]=c[j+8>>2];c[g+12>>2]=c[j+12>>2];c[g+16>>2]=c[j+16>>2];c[g+20>>2]=c[j+20>>2];j=c[d+16>>2]|0;if((j|0)!=1){uf(-1,138760,(v=i,i=i+16|0,c[v>>2]=c[d+4>>2],c[v+8>>2]=j,v)|0)}j=c[6932]|0;c[6932]=j+1;if((j|0)>250){uf(-1,137088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=c[a>>2]|0;a=c[9340]|0;h=c[j>>2]|0;k=0;while(1){if((k|0)>=(h|0)){break}l=c[j+8+(k<<5)>>2]|0;c[9340]=1;cM[c[41164+(l<<3)>>2]&511](j+8+(k<<5)+8|0);m=c[9340]|0;if((l-37|0)>>>0<4|(m|0)==1){k=m+k|0}else{n=12954;break}}if((n|0)==12954){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=206200,v)|0)}c[9340]=a;a=e|0;if((c[a>>2]|0)!=3){c[g>>2]=c[f>>2];c[g+4>>2]=c[f+4>>2];c[g+8>>2]=c[f+8>>2];c[g+12>>2]=c[f+12>>2];c[g+16>>2]=c[f+16>>2];c[g+20>>2]=c[f+20>>2];o=c[6932]|0;p=o-1|0;c[6932]=p;i=b;return}uu(c[d+32>>2]|0);c[a>>2]=1;c[g>>2]=c[f>>2];c[g+4>>2]=c[f+4>>2];c[g+8>>2]=c[f+8>>2];c[g+12>>2]=c[f+12>>2];c[g+16>>2]=c[f+16>>2];c[g+20>>2]=c[f+20>>2];o=c[6932]|0;p=o-1|0;c[6932]=p;i=b;return}function gK(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=i;i=i+288|0;d=b|0;e=c[a>>2]|0;a=e+8|0;if((c[a>>2]|0)==0){uf(-1,168872,(v=i,i=i+8|0,c[v>>2]=c[e+4>>2],v)|0)}f=d;g=e+24|0;c[f>>2]=c[g>>2];c[f+4>>2]=c[g+4>>2];c[f+8>>2]=c[g+8>>2];c[f+12>>2]=c[g+12>>2];c[f+16>>2]=c[g+16>>2];c[f+20>>2]=c[g+20>>2];f=d+24|0;h=e+48|0;c[f>>2]=c[h>>2];c[f+4>>2]=c[h+4>>2];c[f+8>>2]=c[h+8>>2];c[f+12>>2]=c[h+12>>2];c[f+16>>2]=c[h+16>>2];c[f+20>>2]=c[h+20>>2];h=d+48|0;f=e+72|0;c[h>>2]=c[f>>2];c[h+4>>2]=c[f+4>>2];c[h+8>>2]=c[f+8>>2];c[h+12>>2]=c[f+12>>2];c[h+16>>2]=c[f+16>>2];c[h+20>>2]=c[f+20>>2];f=d+72|0;h=e+96|0;c[f>>2]=c[h>>2];c[f+4>>2]=c[h+4>>2];c[f+8>>2]=c[h+8>>2];c[f+12>>2]=c[h+12>>2];c[f+16>>2]=c[h+16>>2];c[f+20>>2]=c[h+20>>2];h=d+96|0;f=e+120|0;c[h>>2]=c[f>>2];c[h+4>>2]=c[f+4>>2];c[h+8>>2]=c[f+8>>2];c[h+12>>2]=c[f+12>>2];c[h+16>>2]=c[f+16>>2];c[h+20>>2]=c[f+20>>2];f=d+120|0;h=e+144|0;c[f>>2]=c[h>>2];c[f+4>>2]=c[h+4>>2];c[f+8>>2]=c[h+8>>2];c[f+12>>2]=c[h+12>>2];c[f+16>>2]=c[h+16>>2];c[f+20>>2]=c[h+20>>2];h=d+144|0;f=e+168|0;c[h>>2]=c[f>>2];c[h+4>>2]=c[f+4>>2];c[h+8>>2]=c[f+8>>2];c[h+12>>2]=c[f+12>>2];c[h+16>>2]=c[f+16>>2];c[h+20>>2]=c[f+20>>2];f=d+168|0;h=e+192|0;c[f>>2]=c[h>>2];c[f+4>>2]=c[h+4>>2];c[f+8>>2]=c[h+8>>2];c[f+12>>2]=c[h+12>>2];c[f+16>>2]=c[h+16>>2];c[f+20>>2]=c[h+20>>2];h=d+192|0;f=e+216|0;c[h>>2]=c[f>>2];c[h+4>>2]=c[f+4>>2];c[h+8>>2]=c[f+8>>2];c[h+12>>2]=c[f+12>>2];c[h+16>>2]=c[f+16>>2];c[h+20>>2]=c[f+20>>2];f=d+216|0;h=e+240|0;c[f>>2]=c[h>>2];c[f+4>>2]=c[h+4>>2];c[f+8>>2]=c[h+8>>2];c[f+12>>2]=c[h+12>>2];c[f+16>>2]=c[h+16>>2];c[f+20>>2]=c[h+20>>2];h=d+240|0;f=e+264|0;c[h>>2]=c[f>>2];c[h+4>>2]=c[f+4>>2];c[h+8>>2]=c[f+8>>2];c[h+12>>2]=c[f+12>>2];c[h+16>>2]=c[f+16>>2];c[h+20>>2]=c[f+20>>2];f=d+264|0;h=e+288|0;c[f>>2]=c[h>>2];c[f+4>>2]=c[h+4>>2];c[f+8>>2]=c[h+8>>2];c[f+12>>2]=c[h+12>>2];c[f+16>>2]=c[h+16>>2];c[f+20>>2]=c[h+20>>2];h=c[6354]|0;if((h|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=h-1|0;c[6354]=f;j=c[14304+(h*24&-1)>>2]|0;h=c[e+16>>2]|0;if((j|0)!=(h|0)){uf(-1,123608,(v=i,i=i+24|0,c[v>>2]=c[e+4>>2],c[v+8>>2]=h,c[v+16>>2]=(h|0)==1?0:115,v)|0)}L17671:do{if((j|0)>12){h=j-12|0;if((h|0)>0){k=0;l=f}else{m=11;n=f;o=12972;break}while(1){if((l|0)<0){break}p=l-1|0;c[6354]=p;q=14296+(l*24&-1)|0;c[g>>2]=c[q>>2];c[g+4>>2]=c[q+4>>2];c[g+8>>2]=c[q+8>>2];c[g+12>>2]=c[q+12>>2];c[g+16>>2]=c[q+16>>2];c[g+20>>2]=c[q+20>>2];q=k+1|0;if((q|0)<(h|0)){k=q;l=p}else{m=11;n=p;o=12972;break L17671}}uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h=j-1|0;if((h|0)>-1){m=h;n=f;o=12972}}}while(0);L17678:do{if((o|0)==12972){while(1){o=0;if((n|0)<0){break}f=n-1|0;c[6354]=f;j=e+24+(m*24&-1)|0;l=14296+(n*24&-1)|0;c[j>>2]=c[l>>2];c[j+4>>2]=c[l+4>>2];c[j+8>>2]=c[l+8>>2];c[j+12>>2]=c[l+12>>2];c[j+16>>2]=c[l+16>>2];c[j+20>>2]=c[l+20>>2];if((m|0)>0){m=m-1|0;n=f;o=12972}else{break L17678}}uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);n=c[6932]|0;c[6932]=n+1;if((n|0)>250){uf(-1,137088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}n=c[a>>2]|0;a=c[9340]|0;m=c[n>>2]|0;f=0;while(1){if((f|0)>=(m|0)){break}l=c[n+8+(f<<5)>>2]|0;c[9340]=1;cM[c[41164+(l<<3)>>2]&511](n+8+(f<<5)+8|0);j=c[9340]|0;if((l-37|0)>>>0<4|(j|0)==1){f=j+f|0}else{o=12980;break}}if((o|0)==12980){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=206200,v)|0)}c[9340]=a;c[6932]=(c[6932]|0)-1;a=0;do{o=e+24+(a*24&-1)|0;f=o|0;if((c[f>>2]|0)==3){uu(c[e+24+(a*24&-1)+8>>2]|0);c[f>>2]=1}f=o;o=d+(a*24&-1)|0;c[f>>2]=c[o>>2];c[f+4>>2]=c[o+4>>2];c[f+8>>2]=c[o+8>>2];c[f+12>>2]=c[o+12>>2];c[f+16>>2]=c[o+16>>2];c[f+20>>2]=c[o+20>>2];a=a+1|0;}while((a|0)<12);i=b;return}function gL(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0,t=0.0,u=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0.0,E=0.0,F=0.0;d=i;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=c[14296+(e*24&-1)>>2]|0;j=c[14304+(e*24&-1)>>2]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=e-2|0;c[6354]=k;l=c[14304+(f*24&-1)>>2]|0;if((k|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=c[14296+(f*24&-1)>>2]|0;c[6354]=e-3;e=c[14304+(k*24&-1)>>2]|0;if(!((m|0)==1&(g|0)==1)){uf(-1,106264,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[14296+(k*24&-1)>>2]|0)==3){n=43240}else{uf(-1,98792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}while(1){o=c[n>>2]|0;if((o|0)==0){p=12998;break}if((aY(e|0,c[o+4>>2]|0)|0)==0){break}else{n=o|0}}if((p|0)==12998){uf(-1,93136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}a[o+8|0]=0;n=c[b>>2]|0;if((n|0)==0){uf(-1,85336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}L17723:do{if((l|0)>(j|0)){q=0.0;r=0.0;s=0}else{b=o+16|0;k=o+24|0;g=n+8|0;t=0.0;m=l;u=0.0;L17725:while(1){c[b>>2]=1;c[k>>2]=m;f=c[g>>2]|0;w=c[9340]|0;x=c[f>>2]|0;y=0;while(1){if((y|0)>=(x|0)){break}z=c[f+8+(y<<5)>>2]|0;c[9340]=1;cM[c[41164+(z<<3)>>2]&511](f+8+(y<<5)+8|0);A=c[9340]|0;if((z-37|0)>>>0<4|(A|0)==1){y=A+y|0}else{p=13006;break L17725}}c[9340]=w;y=c[6354]|0;if((y|0)<0){p=13008;break}c[6354]=y-1;f=14296+(y*24&-1)|0;x=c[f>>2]|0;A=c[f+4>>2]|0;f=14304+(y*24&-1)|0;B=c[f>>2]|0;if((x|0)==2){C=+h[14312+(y*24&-1)>>3];D=+h[f>>3]}else if((x|0)==3){p=13013;break}else if((x|0)==1){C=0.0;D=+(B|0)}else{p=13011;break}E=u+D;F=t+C;x=m+1|0;if((x|0)>(j|0)){q=F;r=E;s=A;break L17723}else{t=F;m=x;u=E}}if((p|0)==13013){m=B;uz(m,0);uh(-1,212704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uf(-1,212032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((p|0)==13011){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((p|0)==13006){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=206200,v)|0)}else if((p|0)==13008){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);uu(e);e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{p=e+1|0;c[6354]=p;e=14296+(p*24&-1)|0;c[e>>2]=2;c[e+4>>2]=s;h[14304+(p*24&-1)>>3]=r;h[14312+(p*24&-1)>>3]=q;i=d;return}}function gM(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;a=i;i=i+16|0;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=14296+(b*24&-1)|0;f=e;g=e|0;e=c[g>>2]|0;h=f+4|0;j=c[h>>2]|0;k=14304+(b*24&-1)|0;l=c[k>>2]|0;m=f+12|0;f=a|0;c[f>>2]=c[m>>2];c[f+4>>2]=c[m+4>>2];c[f+8>>2]=c[m+8>>2];if((e|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[6354]=b;c[g>>2]=1;c[h>>2]=j;c[k>>2]=(l|0)==0&1;c[m>>2]=c[f>>2];c[m+4>>2]=c[f+4>>2];c[m+8>>2]=c[f+8>>2];i=a;return}}function gN(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;a=i;i=i+16|0;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=14296+(b*24&-1)|0;f=e;g=e|0;e=c[g>>2]|0;h=f+4|0;j=c[h>>2]|0;k=14304+(b*24&-1)|0;l=c[k>>2]|0;m=f+12|0;f=a|0;c[f>>2]=c[m>>2];c[f+4>>2]=c[m+4>>2];c[f+8>>2]=c[m+8>>2];if((e|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[6354]=b;c[g>>2]=1;c[h>>2]=j;c[k>>2]=l^-1;c[m>>2]=c[f>>2];c[m+4>>2]=c[f+4>>2];c[m+8>>2]=c[f+8>>2];i=a;return}}function gO(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;a=i;i=i+16|0;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=c[14304+(b*24&-1)>>2]|0;if((c[14296+(b*24&-1)>>2]|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=b-2|0;c[6354]=f;b=14296+(d*24&-1)|0;g=b;h=b|0;b=c[h>>2]|0;j=g+4|0;k=c[j>>2]|0;l=14304+(d*24&-1)|0;m=c[l>>2]|0;n=g+12|0;g=a|0;c[g>>2]=c[n>>2];c[g+4>>2]=c[n+4>>2];c[g+8>>2]=c[n+8>>2];if((b|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((m|0)==0){o=(e|0)!=0&1}else{o=1}if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[6354]=d;c[h>>2]=1;c[j>>2]=k;c[l>>2]=o;c[n>>2]=c[g>>2];c[n+4>>2]=c[g+4>>2];c[n+8>>2]=c[g+8>>2];i=a;return}}function gP(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;a=i;i=i+16|0;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=c[14304+(b*24&-1)>>2]|0;if((c[14296+(b*24&-1)>>2]|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=b-2|0;c[6354]=f;b=14296+(d*24&-1)|0;g=b;h=b|0;b=c[h>>2]|0;j=g+4|0;k=c[j>>2]|0;l=14304+(d*24&-1)|0;m=c[l>>2]|0;n=g+12|0;g=a|0;c[g>>2]=c[n>>2];c[g+4>>2]=c[n+4>>2];c[g+8>>2]=c[n+8>>2];if((b|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((m|0)==0){o=0}else{o=(e|0)!=0&1}if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[6354]=d;c[h>>2]=1;c[j>>2]=k;c[l>>2]=o;c[n>>2]=c[g>>2];c[n+4>>2]=c[g+4>>2];c[n+8>>2]=c[g+8>>2];i=a;return}}function gQ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;a=i;i=i+16|0;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=c[14304+(b*24&-1)>>2]|0;if((c[14296+(b*24&-1)>>2]|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=b-2|0;c[6354]=f;b=14296+(d*24&-1)|0;g=b;h=b|0;b=c[h>>2]|0;j=g+4|0;k=c[j>>2]|0;l=14304+(d*24&-1)|0;m=c[l>>2]|0;n=g+12|0;g=a|0;c[g>>2]=c[n>>2];c[g+4>>2]=c[n+4>>2];c[g+8>>2]=c[n+8>>2];if((b|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[6354]=d;c[h>>2]=1;c[j>>2]=k;c[l>>2]=m|e;c[n>>2]=c[g>>2];c[n+4>>2]=c[g+4>>2];c[n+8>>2]=c[g+8>>2];i=a;return}}function gR(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;a=i;i=i+16|0;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=c[14304+(b*24&-1)>>2]|0;if((c[14296+(b*24&-1)>>2]|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=b-2|0;c[6354]=f;b=14296+(d*24&-1)|0;g=b;h=b|0;b=c[h>>2]|0;j=g+4|0;k=c[j>>2]|0;l=14304+(d*24&-1)|0;m=c[l>>2]|0;n=g+12|0;g=a|0;c[g>>2]=c[n>>2];c[g+4>>2]=c[n+4>>2];c[g+8>>2]=c[n+8>>2];if((b|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[6354]=d;c[h>>2]=1;c[j>>2]=k;c[l>>2]=m^e;c[n>>2]=c[g>>2];c[n+4>>2]=c[g+4>>2];c[n+8>>2]=c[g+8>>2];i=a;return}}function gS(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;a=i;i=i+16|0;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=c[14304+(b*24&-1)>>2]|0;if((c[14296+(b*24&-1)>>2]|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=b-2|0;c[6354]=f;b=14296+(d*24&-1)|0;g=b;h=b|0;b=c[h>>2]|0;j=g+4|0;k=c[j>>2]|0;l=14304+(d*24&-1)|0;m=c[l>>2]|0;n=g+12|0;g=a|0;c[g>>2]=c[n>>2];c[g+4>>2]=c[n+4>>2];c[g+8>>2]=c[n+8>>2];if((b|0)!=1){uf(-1,207704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[6354]=d;c[h>>2]=1;c[j>>2]=k;c[l>>2]=m&e;c[n>>2]=c[g>>2];c[n+4>>2]=c[g+4>>2];c[n+8>>2]=c[g+8>>2];i=a;return}}function gT(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,s=0,t=0.0,u=0,w=0;a=i;i=i+16|0;b=a|0;d=a+8|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=14296+(e*24&-1)|0;j=c[g>>2]|0;k=c[g+4>>2]|0;g=14304+(e*24&-1)|0;l=+h[g>>3];m=c[g>>2]|0;h[d>>3]=l;n=+h[14312+(e*24&-1)>>3];e=m;m=e;do{if((j|0)==3){o=+uz(m,b);g=(m|0)==(c[b>>2]|0);uu(m);if(g){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[d>>3]=o;p=0.0;q=o;r=c[6354]|0;s=13099;break}}else{if((j|0)==2){p=n;q=l;r=f;s=13099;break}else if((j|0)==1){c[d>>2]=-e;t=n;u=1;w=f;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((s|0)==13099){h[d>>3]=-0.0-q;t=-0.0-p;u=2;w=r}if((w|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{r=w+1|0;c[6354]=r;w=14296+(r*24&-1)|0;c[w>>2]=u;c[w+4>>2]=k;h[14304+(r*24&-1)>>3]=+h[d>>3];h[14312+(r*24&-1)>>3]=t;i=a;return}}function gU(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0.0,s=0,t=0.0,u=0,w=0.0,x=0.0,y=0,z=0,A=0.0;a=i;i=i+24|0;b=a|0;d=a+8|0;e=a+16|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=c[14296+(f*24&-1)>>2]|0;l=14304+(f*24&-1)|0;m=+h[l>>3];n=+h[14312+(f*24&-1)>>3];f=c[l>>2]|0;l=f;do{if((j|0)==3){o=+uz(l,d);p=(l|0)==(c[d>>2]|0);uu(l);if(p){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=o;q=2;r=0.0;s=c[6354]|0;t=o;u=c[k>>2]|0;break}}else{q=j;r=n;s=g;t=m;u=f}}while(0);if((s|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=s-1;f=14296+(s*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(s*24&-1)|0;m=+h[f>>3];l=c[f>>2]|0;h[e>>3]=m;n=+h[14312+(s*24&-1)>>3];s=l;l=s;do{if((g|0)==3){o=+uz(l,b);f=(l|0)==(c[b>>2]|0);uu(l);if(f){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[e>>3]=o;w=0.0;x=o;y=13122;break}}else{if((g|0)==2){w=n;x=m;y=13122;break}else if((g|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((q|0)==1){z=(s|0)==(u|0)&1;A=n;break}else if((q|0)==2){if(+(s|0)!=t){z=0;A=n;break}z=r==0.0&1;A=n;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((y|0)==13122){if((q|0)==1){if(+(u|0)!=x){z=0;A=w;break}z=w==0.0&1;A=w;break}else if((q|0)==2){if(x!=t){z=0;A=w;break}z=w==r&1;A=w;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);c[e>>2]=z;z=c[6354]|0;if((z|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{q=z+1|0;c[6354]=q;z=14296+(q*24&-1)|0;c[z>>2]=1;c[z+4>>2]=j;h[14304+(q*24&-1)>>3]=+h[e>>3];h[14312+(q*24&-1)>>3]=A;i=a;return}}function gV(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0.0,s=0,t=0.0,u=0,w=0.0,x=0.0,y=0,z=0,A=0.0;a=i;i=i+24|0;b=a|0;d=a+8|0;e=a+16|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=c[14296+(f*24&-1)>>2]|0;l=14304+(f*24&-1)|0;m=+h[l>>3];n=+h[14312+(f*24&-1)>>3];f=c[l>>2]|0;l=f;do{if((j|0)==3){o=+uz(l,d);p=(l|0)==(c[d>>2]|0);uu(l);if(p){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=o;q=2;r=0.0;s=c[6354]|0;t=o;u=c[k>>2]|0;break}}else{q=j;r=n;s=g;t=m;u=f}}while(0);if((s|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=s-1;f=14296+(s*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(s*24&-1)|0;m=+h[f>>3];l=c[f>>2]|0;h[e>>3]=m;n=+h[14312+(s*24&-1)>>3];s=l;l=s;do{if((g|0)==3){o=+uz(l,b);f=(l|0)==(c[b>>2]|0);uu(l);if(f){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[e>>3]=o;w=0.0;x=o;y=13150;break}}else{if((g|0)==2){w=n;x=m;y=13150;break}else if((g|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((q|0)==2){if(+(s|0)!=t){z=1;A=n;break}z=r!=0.0&1;A=n;break}else if((q|0)==1){z=(s|0)!=(u|0)&1;A=n;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((y|0)==13150){if((q|0)==2){if(x!=t){z=1;A=w;break}z=w!=r&1;A=w;break}else if((q|0)==1){if(+(u|0)!=x){z=1;A=w;break}z=w!=0.0&1;A=w;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);c[e>>2]=z;z=c[6354]|0;if((z|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{u=z+1|0;c[6354]=u;z=14296+(u*24&-1)|0;c[z>>2]=1;c[z+4>>2]=j;h[14304+(u*24&-1)>>3]=+h[e>>3];h[14312+(u*24&-1)>>3]=A;i=a;return}}function gW(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,l=0,m=0.0,n=0.0,o=0,p=0,q=0,r=0.0,s=0,t=0.0,u=0.0,w=0.0,x=0,y=0,z=0.0;a=i;i=i+24|0;b=a|0;d=a+8|0;e=a+16|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=c[14296+(f*24&-1)>>2]|0;l=14304+(f*24&-1)|0;m=+h[l>>3];f=c[l>>2]|0;l=f;do{if((j|0)==3){n=+uz(l,d);o=(l|0)==(c[d>>2]|0);uu(l);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=n;p=2;q=c[6354]|0;r=n;s=c[k>>2]|0;break}}else{p=j;q=g;r=m;s=f}}while(0);if((q|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=q-1;f=14296+(q*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(q*24&-1)|0;m=+h[f>>3];l=c[f>>2]|0;h[e>>3]=m;n=+h[14312+(q*24&-1)>>3];q=l;l=q;do{if((g|0)==3){t=+uz(l,b);f=(l|0)==(c[b>>2]|0);uu(l);if(f){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[e>>3]=t;u=0.0;w=t;x=13177;break}}else{if((g|0)==2){u=n;w=m;x=13177;break}else if((g|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((p|0)==2){y=+(q|0)>r;z=n;break}else if((p|0)==1){y=(q|0)>(s|0);z=n;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((x|0)==13177){if((p|0)==1){y=w>+(s|0);z=u;break}else if((p|0)==2){y=w>r;z=u;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);c[e>>2]=y&1;y=c[6354]|0;if((y|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{p=y+1|0;c[6354]=p;y=14296+(p*24&-1)|0;c[y>>2]=1;c[y+4>>2]=j;h[14304+(p*24&-1)>>3]=+h[e>>3];h[14312+(p*24&-1)>>3]=z;i=a;return}}function gX(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,l=0,m=0.0,n=0.0,o=0,p=0,q=0,r=0.0,s=0,t=0.0,u=0.0,w=0.0,x=0,y=0,z=0.0;a=i;i=i+24|0;b=a|0;d=a+8|0;e=a+16|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=c[14296+(f*24&-1)>>2]|0;l=14304+(f*24&-1)|0;m=+h[l>>3];f=c[l>>2]|0;l=f;do{if((j|0)==3){n=+uz(l,d);o=(l|0)==(c[d>>2]|0);uu(l);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=n;p=2;q=c[6354]|0;r=n;s=c[k>>2]|0;break}}else{p=j;q=g;r=m;s=f}}while(0);if((q|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=q-1;f=14296+(q*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(q*24&-1)|0;m=+h[f>>3];l=c[f>>2]|0;h[e>>3]=m;n=+h[14312+(q*24&-1)>>3];q=l;l=q;do{if((g|0)==3){t=+uz(l,b);f=(l|0)==(c[b>>2]|0);uu(l);if(f){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[e>>3]=t;u=0.0;w=t;x=13202;break}}else{if((g|0)==2){u=n;w=m;x=13202;break}else if((g|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((p|0)==1){y=(q|0)<(s|0);z=n;break}else if((p|0)==2){y=+(q|0)>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((x|0)==13202){if((p|0)==2){y=w>3<<3,c[v>>2]=0,v)|0)}}}while(0);c[e>>2]=y&1;y=c[6354]|0;if((y|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{s=y+1|0;c[6354]=s;y=14296+(s*24&-1)|0;c[y>>2]=1;c[y+4>>2]=j;h[14304+(s*24&-1)>>3]=+h[e>>3];h[14312+(s*24&-1)>>3]=z;i=a;return}}function gY(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,l=0,m=0.0,n=0.0,o=0,p=0,q=0,r=0.0,s=0,t=0.0,u=0.0,w=0.0,x=0,y=0,z=0.0;a=i;i=i+24|0;b=a|0;d=a+8|0;e=a+16|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=c[14296+(f*24&-1)>>2]|0;l=14304+(f*24&-1)|0;m=+h[l>>3];f=c[l>>2]|0;l=f;do{if((j|0)==3){n=+uz(l,d);o=(l|0)==(c[d>>2]|0);uu(l);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=n;p=2;q=c[6354]|0;r=n;s=c[k>>2]|0;break}}else{p=j;q=g;r=m;s=f}}while(0);if((q|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=q-1;f=14296+(q*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(q*24&-1)|0;m=+h[f>>3];l=c[f>>2]|0;h[e>>3]=m;n=+h[14312+(q*24&-1)>>3];q=l;l=q;do{if((g|0)==3){t=+uz(l,b);f=(l|0)==(c[b>>2]|0);uu(l);if(f){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[e>>3]=t;u=0.0;w=t;x=13227;break}}else{if((g|0)==2){u=n;w=m;x=13227;break}else if((g|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((p|0)==2){y=+(q|0)>=r;z=n;break}else if((p|0)==1){y=(q|0)>=(s|0);z=n;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((x|0)==13227){if((p|0)==1){y=w>=+(s|0);z=u;break}else if((p|0)==2){y=w>=r;z=u;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);c[e>>2]=y&1;y=c[6354]|0;if((y|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{p=y+1|0;c[6354]=p;y=14296+(p*24&-1)|0;c[y>>2]=1;c[y+4>>2]=j;h[14304+(p*24&-1)>>3]=+h[e>>3];h[14312+(p*24&-1)>>3]=z;i=a;return}}function gZ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,l=0,m=0.0,n=0.0,o=0,p=0,q=0,r=0.0,s=0,t=0.0,u=0.0,w=0.0,x=0,y=0,z=0.0;a=i;i=i+24|0;b=a|0;d=a+8|0;e=a+16|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=c[14296+(f*24&-1)>>2]|0;l=14304+(f*24&-1)|0;m=+h[l>>3];f=c[l>>2]|0;l=f;do{if((j|0)==3){n=+uz(l,d);o=(l|0)==(c[d>>2]|0);uu(l);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=n;p=2;q=c[6354]|0;r=n;s=c[k>>2]|0;break}}else{p=j;q=g;r=m;s=f}}while(0);if((q|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=q-1;f=14296+(q*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(q*24&-1)|0;m=+h[f>>3];l=c[f>>2]|0;h[e>>3]=m;n=+h[14312+(q*24&-1)>>3];q=l;l=q;do{if((g|0)==3){t=+uz(l,b);f=(l|0)==(c[b>>2]|0);uu(l);if(f){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[e>>3]=t;u=0.0;w=t;x=13252;break}}else{if((g|0)==2){u=n;w=m;x=13252;break}else if((g|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((p|0)==1){y=(q|0)<=(s|0);z=n;break}else if((p|0)==2){y=+(q|0)<=r;z=n;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((x|0)==13252){if((p|0)==2){y=w<=r;z=u;break}else if((p|0)==1){y=w<=+(s|0);z=u;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);c[e>>2]=y&1;y=c[6354]|0;if((y|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{s=y+1|0;c[6354]=s;y=14296+(s*24&-1)|0;c[y>>2]=1;c[y+4>>2]=j;h[14304+(s*24&-1)>>3]=+h[e>>3];h[14312+(s*24&-1)>>3]=z;i=a;return}}function g_(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0.0,s=0,t=0.0,u=0,w=0.0,x=0.0,y=0,z=0,A=0.0;a=i;i=i+24|0;b=a|0;d=a+8|0;e=a+16|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=c[14296+(f*24&-1)>>2]|0;l=14304+(f*24&-1)|0;m=+h[l>>3];n=+h[14312+(f*24&-1)>>3];f=c[l>>2]|0;l=f;do{if((j|0)==3){o=+uz(l,d);p=(l|0)==(c[d>>2]|0);uu(l);if(p){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=o;q=2;r=0.0;s=c[6354]|0;t=o;u=c[k>>2]|0;break}}else{q=j;r=n;s=g;t=m;u=f}}while(0);if((s|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=s-1;f=c[14296+(s*24&-1)>>2]|0;g=14304+(s*24&-1)|0;m=+h[g>>3];j=c[g>>2]|0;g=j;do{if((f|0)==3){n=+uz(g,b);l=(g|0)==(c[b>>2]|0);uu(g);if(!l){w=0.0;x=n;y=13276;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==2){w=+h[14312+(s*24&-1)>>3];x=m;y=13276;break}else if((f|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((q|0)==1){c[e>>2]=u+j;z=1;A=0.0;break}else if((q|0)==2){h[e>>3]=+(j|0)+t;z=2;A=r;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((y|0)==13276){if((q|0)==2){h[e>>3]=x+t;z=2;A=r+w;break}else if((q|0)==1){h[e>>3]=+(u|0)+x;z=2;A=w;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);u=c[6354]|0;if((u|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{q=u+1|0;c[6354]=q;c[14296+(q*24&-1)>>2]=z;h[14304+(q*24&-1)>>3]=+h[e>>3];h[14312+(q*24&-1)>>3]=A;i=a;return}}function g$(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0.0,s=0,t=0.0,u=0,w=0.0,x=0.0,y=0,z=0,A=0.0;a=i;i=i+24|0;b=a|0;d=a+8|0;e=a+16|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=c[14296+(f*24&-1)>>2]|0;l=14304+(f*24&-1)|0;m=+h[l>>3];n=+h[14312+(f*24&-1)>>3];f=c[l>>2]|0;l=f;do{if((j|0)==3){o=+uz(l,d);p=(l|0)==(c[d>>2]|0);uu(l);if(p){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=o;q=2;r=0.0;s=c[6354]|0;t=o;u=c[k>>2]|0;break}}else{q=j;r=n;s=g;t=m;u=f}}while(0);if((s|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=s-1;f=c[14296+(s*24&-1)>>2]|0;g=14304+(s*24&-1)|0;m=+h[g>>3];j=c[g>>2]|0;g=j;do{if((f|0)==3){n=+uz(g,b);l=(g|0)==(c[b>>2]|0);uu(g);if(!l){w=0.0;x=n;y=17;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==2){w=+h[14312+(s*24&-1)>>3];x=m;y=17;break}else if((f|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((q|0)==1){c[e>>2]=j-u;z=1;A=0.0;break}else if((q|0)==2){h[e>>3]=+(j|0)-t;z=2;A=-0.0-r;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((y|0)==17){if((q|0)==1){h[e>>3]=x- +(u|0);z=2;A=w;break}else if((q|0)==2){h[e>>3]=x-t;z=2;A=w-r;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);q=c[6354]|0;if((q|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{u=q+1|0;c[6354]=u;c[14296+(u*24&-1)>>2]=z;h[14304+(u*24&-1)>>3]=+h[e>>3];h[14312+(u*24&-1)>>3]=A;i=a;return}}function g0(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0.0,s=0,t=0.0,u=0,w=0.0,x=0.0,y=0,z=0,A=0.0;a=i;i=i+24|0;b=a|0;d=a+8|0;e=a+16|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=c[14296+(f*24&-1)>>2]|0;l=14304+(f*24&-1)|0;m=+h[l>>3];n=+h[14312+(f*24&-1)>>3];f=c[l>>2]|0;l=f;do{if((j|0)==3){o=+uz(l,d);p=(l|0)==(c[d>>2]|0);uu(l);if(p){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=o;q=2;r=0.0;s=c[6354]|0;t=o;u=c[k>>2]|0;break}}else{q=j;r=n;s=g;t=m;u=f}}while(0);if((s|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=s-1;f=c[14296+(s*24&-1)>>2]|0;g=14304+(s*24&-1)|0;m=+h[g>>3];j=c[g>>2]|0;g=j;do{if((f|0)==3){n=+uz(g,b);l=(g|0)==(c[b>>2]|0);uu(g);if(!l){w=0.0;x=n;y=43;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==2){w=+h[14312+(s*24&-1)>>3];x=m;y=43;break}else if((f|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((q|0)==1){n=+(j|0)*+(u|0);if(+P(+n)<2147483647.0){c[e>>2]=aa(u,j);z=1;A=0.0;break}else{h[e>>3]=n;z=2;A=0.0;break}}else if((q|0)==2){n=+(j|0);h[e>>3]=n*t;z=2;A=r*n;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((y|0)==43){if((q|0)==1){m=+(u|0);h[e>>3]=m*x;z=2;A=w*m;break}else if((q|0)==2){h[e>>3]=x*t-r*w;z=2;A=r*x+w*t;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);q=c[6354]|0;if((q|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{u=q+1|0;c[6354]=u;c[14296+(u*24&-1)>>2]=z;h[14304+(u*24&-1)>>3]=+h[e>>3];h[14312+(u*24&-1)>>3]=A;i=a;return}}function g1(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0.0,t=0,u=0.0,w=0,x=0.0,y=0.0,z=0,A=0,B=0.0;b=i;i=i+24|0;d=b|0;e=b+8|0;f=b+16|0;g=c[6354]|0;if((g|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=g-1|0;c[6354]=j;l=c[14296+(g*24&-1)>>2]|0;m=14304+(g*24&-1)|0;n=+h[m>>3];o=+h[14312+(g*24&-1)>>3];g=c[m>>2]|0;m=g;do{if((l|0)==3){p=+uz(m,e);q=(m|0)==(c[e>>2]|0);uu(m);if(q){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=p;r=2;s=0.0;t=c[6354]|0;u=p;w=c[k>>2]|0;break}}else{r=l;s=o;t=j;u=n;w=g}}while(0);if((t|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=t-1;g=c[14296+(t*24&-1)>>2]|0;j=14304+(t*24&-1)|0;n=+h[j>>3];l=c[j>>2]|0;j=l;do{if((g|0)==3){o=+uz(j,d);m=(j|0)==(c[d>>2]|0);uu(j);if(!m){x=0.0;y=o;z=71;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((g|0)==2){x=+h[14312+(t*24&-1)>>3];y=n;z=71;break}else if((g|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((r|0)==1){if((w|0)==0){c[f>>2]=0;a[1960]=1;A=1;B=0.0;break}else{c[f>>2]=(l|0)/(w|0)&-1;A=1;B=0.0;break}}else if((r|0)==2){o=s*s+u*u;if(o!=0.0){h[f>>3]=u*+(l|0)/o;A=2;B=s*+(-l|0)/o;break}else{h[f>>3]=0.0;a[1960]=1;A=2;B=0.0;break}}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((z|0)==71){if((r|0)==1){if((w|0)==0){h[f>>3]=0.0;a[1960]=1;A=2;B=0.0;break}else{n=+(w|0);h[f>>3]=y/n;A=2;B=x/n;break}}else if((r|0)==2){n=s*s+u*u;if(n!=0.0){h[f>>3]=(s*x+u*y)/n;A=2;B=(x*u-s*y)/n;break}else{h[f>>3]=0.0;a[1960]=1;A=2;B=0.0;break}}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);r=c[6354]|0;if((r|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{w=r+1|0;c[6354]=w;c[14296+(w*24&-1)>>2]=A;h[14304+(w*24&-1)>>3]=+h[f>>3];h[14312+(w*24&-1)>>3]=B;i=b;return}}function g2(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,l=0,m=0,n=0.0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0.0,x=0;b=i;i=i+24|0;d=b|0;e=b+8|0;f=b+16|0;g=c[6354]|0;if((g|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=g-1|0;c[6354]=j;l=c[14296+(g*24&-1)>>2]|0;m=c[14304+(g*24&-1)>>2]|0;g=m;do{if((l|0)==3){n=+uz(g,e);o=(g|0)==(c[e>>2]|0);uu(g);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=n;p=2;q=c[6354]|0;r=c[k>>2]|0;break}}else{p=l;q=j;r=m}}while(0);if((q|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=q-1|0;c[6354]=m;j=14296+(q*24&-1)|0;l=j|0;g=c[l>>2]|0;e=j+4|0;j=c[e>>2]|0;o=14304+(q*24&-1)|0;s=c[o>>2]|0;h[f>>3]=+h[o>>3];t=14312+(q*24&-1)|0;n=+h[t>>3];u=s;s=u;if((g|0)==3){w=+uz(s,d);x=(s|0)==(c[d>>2]|0);uu(s);if(x){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}h[f>>3]=w;uf(-1,224848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(!((g|0)==1&(p|0)==1)){uf(-1,224848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=f;if((r|0)==0){c[p>>2]=0;if((m|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=q;c[l>>2]=1;c[e>>2]=j;h[o>>3]=+h[f>>3];h[t>>3]=n;a[1960]=1;i=b;return}else{c[p>>2]=(u|0)%(r|0)&-1;if((m|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=q;c[l>>2]=1;c[e>>2]=j;h[o>>3]=+h[f>>3];h[t>>3]=n;i=b;return}}function g3(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0.0,t=0,u=0.0,w=0,x=0.0,y=0.0,z=0,A=0,B=0.0,C=0,D=0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,U=0.0,V=0.0;b=i;i=i+24|0;d=b|0;e=b+8|0;f=b+16|0;g=c[6354]|0;if((g|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=g-1|0;c[6354]=j;l=c[14296+(g*24&-1)>>2]|0;m=14304+(g*24&-1)|0;n=+h[m>>3];o=+h[14312+(g*24&-1)>>3];g=c[m>>2]|0;m=g;do{if((l|0)==3){p=+uz(m,e);q=(m|0)==(c[e>>2]|0);uu(m);if(q){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=p;r=2;s=0.0;t=c[6354]|0;u=p;w=c[k>>2]|0;break}}else{r=l;s=o;t=j;u=n;w=g}}while(0);if((t|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=t-1;g=c[14296+(t*24&-1)>>2]|0;j=14304+(t*24&-1)|0;n=+h[j>>3];l=c[j>>2]|0;j=l;do{if((g|0)==3){o=+uz(j,d);m=(j|0)==(c[d>>2]|0);uu(j);if(!m){x=0.0;y=o;z=143;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((g|0)==2){x=+h[14312+(t*24&-1)>>3];y=n;z=143;break}else if((g|0)!=1){uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((r|0)==1){if((l|0)==0){if((w|0)<0){a[1960]=1}c[f>>2]=(w|0)==0&1;A=1;B=0.0;break}o=+R(+(+(l|0)),+(+(w|0)));if(o>2147483647.0|(w|0)<0){h[f>>3]=o;A=2;B=0.0;break}if((w|0)>0){m=0;e=1;while(1){q=aa(l,e);C=m+1|0;if((C|0)<(w|0)){m=C;e=q}else{D=q;break}}}else{D=1}c[f>>2]=D;A=1;B=0.0;break}else if((r|0)==2){if((l|0)==0){if(s!=0.0|u<0.0){a[1960]=1}h[f>>3]=u==0.0?1.0:0.0;A=2;B=0.0;break}o=+R(+(+(((l|0)>-1?l:-l|0)|0)),+(+P(+u)));do{if(u<0.0){if(o!=0.0){E=1.0/o;break}else{a[1960]=1;E=o;break}}else{E=o}}while(0);o=((l|0)>-1?0.0:3.141592653589793)*(-0.0-s);if(o<-706.893623549172){F=0.0}else{F=+Z(+o)}o=E*F;e=(l|0)>-1;p=u*(e?0.0:3.141592653589793)+s*+_(+(+((e?l:-l|0)|0)));G=o*+S(+p);H=o*+T(+p);h[f>>3]=G;A=2;B=H;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((z|0)==143){if((r|0)==1){if(x==0.0){F=+R(+y,+(+(((w|0)>-1?w:-w|0)|0)));do{if((w|0)<0){if(F!=0.0){I=1.0/F;break}else{a[1960]=1;I=F;break}}else{I=F}}while(0);h[f>>3]=I;A=2;B=0.0;break}F=+P(+y);E=+P(+x);if(F>E){n=E/F;J=F*+Q(+(n*n+1.0))}else{n=F/E;J=E*+Q(+(n*n+1.0))}n=+R(+J,+(+(((w|0)>-1?w:-w|0)|0)));do{if((w|0)<0){if(n!=0.0){K=1.0/n;break}else{a[1960]=1;K=n;break}}else{K=n}}while(0);n=+Y(+x,+y)*+(w|0);E=K*+S(+n);F=K*+T(+n);h[f>>3]=E;A=2;B=F;break}else if((r|0)==2){l=x==0.0;if(y==0.0&l){if(s!=0.0|u<0.0){a[1960]=1}h[f>>3]=u==0.0?1.0:0.0;A=2;B=0.0;break}F=+P(+y);E=+P(+x);do{if(l){L=F}else{if(F>E){n=E/F;L=F*+Q(+(n*n+1.0));break}else{n=F/E;L=E*+Q(+(n*n+1.0));break}}}while(0);n=+R(+L,+(+P(+u)));do{if(u<0.0){if(n!=0.0){M=1.0/n;break}else{a[1960]=1;M=n;break}}else{M=n}}while(0);if(l){N=y<0.0?3.141592653589793:0.0}else{N=+Y(+x,+y)}n=N*(-0.0-s);if(n<-706.893623549172){O=0.0}else{O=+Z(+n)}n=M*O;do{if(l){U=F;V=u*(y<0.0?3.141592653589793:0.0)}else{H=u*+Y(+x,+y);if(F>E){G=E/F;U=F*+Q(+(G*G+1.0));V=H;break}else{G=F/E;U=E*+Q(+(G*G+1.0));V=H;break}}}while(0);E=V+s*+_(+U);F=n*+S(+E);H=n*+T(+E);h[f>>3]=F;A=2;B=H;break}else{uf(-1,77088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);r=c[6354]|0;if((r|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{w=r+1|0;c[6354]=w;c[14296+(w*24&-1)>>2]=A;h[14304+(w*24&-1)>>3]=+h[f>>3];h[14312+(w*24&-1)>>3]=B;i=b;return}}function g4(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=14296+(d*24&-1)|0;g=f|0;j=c[g>>2]|0;k=f+4|0;f=c[k>>2]|0;l=14304+(d*24&-1)|0;m=c[l>>2]|0;n=m;if((j|0)==3){uz(n,b);o=(n|0)==(c[b>>2]|0);uu(n);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{uf(-1,217536,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}if((j|0)!=1){uf(-1,217536,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((m|0)>1){j=m;p=1.0;while(1){q=p*+(j|0);m=j-1|0;if((m|0)>1){j=m;p=q}else{r=q;break}}}else{r=1.0}if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{c[6354]=d;c[g>>2]=2;c[k>>2]=f;h[l>>3]=r;h[14312+(d*24&-1)>>3]=0.0;i=a;return}}function g5(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;a=i;i=i+16|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=c[14296+(d*24&-1)>>2]|0;g=c[14304+(d*24&-1)>>2]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-2;d=c[14296+(e*24&-1)>>2]|0;h=c[14304+(e*24&-1)>>2]|0;if((f|0)==1){e=ut(32)|0;do{if((e|0)==0){gk();j=ut(32)|0;if((j|0)!=0){k=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=211880,v)|0)}else{k=e}}while(0);e=k;a0(k|0,32,21e4,(v=i,i=i+8|0,c[v>>2]=g,v)|0);l=3;m=e}else{l=f;m=g}if(!((d|0)==3&(l|0)==3)){uf(-1,202496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=m;m=uc(h,l)|0;uu(h);uu(l);l=c[6354]|0;if((l|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}h=l+1|0;c[6354]=h;l=14296+(h*24&-1)|0;d=l;c[l>>2]=3;c[d+4>>2]=n;c[14304+(h*24&-1)>>2]=m;h=d+12|0;d=b|0;c[h>>2]=c[d>>2];c[h+4>>2]=c[d+4>>2];c[h+8>>2]=c[d+8>>2];if((m|0)==0){uu(m);i=a;return}d=bP(m|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=d;uu(m);i=a;return}function g6(a){a=a|0;var b=0,d=0,e=0,f=0;a=i;i=i+16|0;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=c[14304+(b*24&-1)>>2]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=c[14296+(b*24&-1)>>2]|0;c[6354]=b-2;b=c[14304+(d*24&-1)>>2]|0;if(!((c[14296+(d*24&-1)>>2]|0)==3&(f|0)==3)){uf(-1,202496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=aY(b|0,e|0)|0;uu(b);uu(e);e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{b=e+1|0;c[6354]=b;e=14296+(b*24&-1)|0;c[e>>2]=1;c[14304+(b*24&-1)>>2]=(f|0)==0&1;f=e+12|0;e=a|0;c[f>>2]=c[e>>2];c[f+4>>2]=c[e+4>>2];c[f+8>>2]=c[e+8>>2];i=a;return}}function g7(a){a=a|0;var b=0,d=0,e=0,f=0;a=i;i=i+16|0;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=c[14304+(b*24&-1)>>2]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=c[14296+(b*24&-1)>>2]|0;c[6354]=b-2;b=c[14304+(d*24&-1)>>2]|0;if(!((c[14296+(d*24&-1)>>2]|0)==3&(f|0)==3)){uf(-1,202496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=aY(b|0,e|0)|0;uu(b);uu(e);e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{b=e+1|0;c[6354]=b;e=14296+(b*24&-1)|0;c[e>>2]=1;c[14304+(b*24&-1)>>2]=(f|0)!=0&1;f=e+12|0;e=a|0;c[f>>2]=c[e>>2];c[f+4>>2]=c[e+4>>2];c[f+8>>2]=c[e+8>>2];i=a;return}}function g8(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;b=i;i=i+16|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=c[14304+(e*24&-1)>>2]|0;if((c[14296+(e*24&-1)>>2]|0)!=3){uf(-1,197056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if((c[11252]|0)==15){e=a[f]|0;if(e<<24>>24==0){g=0;break}else{h=0;j=0;k=e}while(1){e=((k&-64)<<24>>24!=-128&1)+j|0;l=h+1|0;m=a[f+l|0]|0;if(m<<24>>24==0){g=e;break}else{h=l;j=e;k=m}}}else{g=uA(f|0)|0}}while(0);uu(f);f=c[6354]|0;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{k=f+1|0;c[6354]=k;f=14296+(k*24&-1)|0;c[f>>2]=1;c[14304+(k*24&-1)>>2]=g;g=f+12|0;f=d|0;c[g>>2]=c[f>>2];c[g+4>>2]=c[f+4>>2];c[g+8>>2]=c[f+8>>2];i=b;return}}function g9(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;a=i;i=i+16|0;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=c[14304+(b*24&-1)>>2]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=c[14296+(b*24&-1)>>2]|0;c[6354]=b-2;b=c[14304+(d*24&-1)>>2]|0;if((f|0)!=3){uf(-1,185704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[14296+(d*24&-1)>>2]|0)!=3){uf(-1,185704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=aQ(b|0,e|0)|0;if((d|0)==0){g=0}else{g=(1-b|0)+d|0}uu(e);uu(b);b=c[6354]|0;if((b|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{e=b+1|0;c[6354]=e;b=14296+(e*24&-1)|0;c[b>>2]=1;c[14304+(e*24&-1)>>2]=g;g=b+12|0;b=a|0;c[g>>2]=c[b>>2];c[g+4>>2]=c[b+4>>2];c[g+8>>2]=c[b+8>>2];i=a;return}}function ha(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;b=i;i=i+16|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=c[14296+(e*24&-1)>>2]|0;h=c[14304+(e*24&-1)>>2]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=e-2|0;c[6354]=j;k=c[14304+(f*24&-1)>>2]|0;if((j|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=c[14296+(f*24&-1)>>2]|0;f=e-3|0;c[6354]=f;m=c[14304+(j*24&-1)>>2]|0;if(!((g|0)==1&(l|0)==1)){uf(-1,180448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[14296+(j*24&-1)>>2]|0)!=3){uf(-1,176264,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=(c[11252]|0)==15;do{if(j){l=a[m]|0;if(l<<24>>24==0){n=0;break}else{o=0;p=0;q=l}while(1){l=((q&-64)<<24>>24!=-128&1)+p|0;g=o+1|0;r=a[m+g|0]|0;if(r<<24>>24==0){n=l;break}else{o=g;p=l;q=r}}}else{n=uA(m|0)|0}}while(0);do{if(h>>>0>n>>>0){if(!j){s=uA(m|0)|0;break}q=a[m]|0;if(q<<24>>24==0){s=0;break}else{t=0;u=0;w=q}while(1){q=((w&-64)<<24>>24!=-128&1)+u|0;p=t+1|0;o=a[m+p|0]|0;if(o<<24>>24==0){s=q;break}else{t=p;u=q;w=o}}}else{s=h}}while(0);h=(k|0)<1?1:k;if((h|0)>(s|0)){if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-2|0;c[6354]=f;e=14296+(f*24&-1)|0;c[e>>2]=3;c[14304+(f*24&-1)>>2]=179864;f=e+12|0;e=d|0;c[f>>2]=c[e>>2];c[f+4>>2]=c[e+4>>2];c[f+8>>2]=c[e+8>>2];e=bP(179864)|0;c[14304+((c[6354]|0)*24&-1)>>2]=e;uu(m);i=b;return}e=h-1|0;L406:do{if(j){if((e|0)<1){x=m}else{h=a[m]|0;L411:do{if(h<<24>>24==0){y=m}else{f=0;k=0;w=m;u=h;while(1){if((u&-64)<<24>>24==-128){z=k}else{if((k|0)==(e|0)){y=w;break L411}else{z=k+1|0}}t=f+1|0;n=m+t|0;o=a[n]|0;if(o<<24>>24==0){y=n;break}else{f=t;k=z;w=n;u=o}}}}while(0);if(j){x=y}else{A=y;B=297;break}}if((s|0)<1){C=m;D=x;break}h=a[m]|0;if(h<<24>>24==0){C=m;D=x;break}else{E=0;F=0;G=m;H=h}while(1){if((H&-64)<<24>>24==-128){I=F}else{if((F|0)==(s|0)){C=G;D=x;break L406}else{I=F+1|0}}h=E+1|0;u=m+h|0;w=a[u]|0;if(w<<24>>24==0){C=u;D=x;break}else{E=h;F=I;G=u;H=w}}}else{A=m+e|0;B=297}}while(0);if((B|0)==297){C=m+s|0;D=A}a[C]=0;C=c[6354]|0;if((C|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}A=C+1|0;c[6354]=A;C=14296+(A*24&-1)|0;s=C;c[C>>2]=3;c[s+4>>2]=J;c[14304+(A*24&-1)>>2]=D;A=s+12|0;s=d|0;c[A>>2]=c[s>>2];c[A+4>>2]=c[s+4>>2];c[A+8>>2]=c[s+8>>2];if((D|0)==0){uu(m);i=b;return}s=bP(D|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=s;uu(m);i=b;return}function hb(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;b=i;i=i+16|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=c[14304+(e*24&-1)>>2]|0;if((c[14296+(e*24&-1)>>2]|0)!=1){uf(-1,168392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-2;e=c[14304+(f*24&-1)>>2]|0;if((c[14296+(f*24&-1)>>2]|0)==3){h=e;j=0;k=179864}else{uf(-1,164176,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}while(1){f=a[h]|0;if(f<<24>>24==0){l=j;m=k;break}else{n=h;o=f}while(1){f=n+1|0;if((aM(o<<24>>24|0)|0)==0){break}n=f;o=a[f]|0}f=a[n]|0;if(f<<24>>24==0){l=j;m=k;break}p=j+1|0;q=(p|0)==(g|0);if(q){r=n}else{r=k}s=n;t=f;while(1){if(t<<24>>24==0){break}f=s+1|0;if((aM(t<<24>>24|0)|0)!=0){break}s=f;t=a[f]|0}if(q){u=325;break}else{h=s;j=p;k=r}}if((u|0)==325){a[s]=0;l=g;m=r}r=(g|0)<0?l:m;m=g>>31&-2;g=c[6354]|0;if((g|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=g+1|0;c[6354]=l;g=14296+(l*24&-1)|0;s=g;c[g>>2]=m+3;c[s+4>>2]=w;c[14304+(l*24&-1)>>2]=r;l=s+12|0;s=d|0;c[l>>2]=c[s>>2];c[l+4>>2]=c[s+4>>2];c[l+8>>2]=c[s+8>>2];if((m|0)!=0|(r|0)==0){uu(e);i=b;return}m=bP(r|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=m;uu(e);i=b;return}function hc(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0.0,Z=0.0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0;b=i;i=i+256|0;d=b|0;e=b+240|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=f-1;g=c[14304+(f*24&-1)>>2]|0;if((g|0)>10){f=g*24&-1;j=ut(f)|0;do{if((j|0)==0){gk();k=ut(f)|0;if((k|0)!=0){l=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=154800,v)|0)}else{l=j}}while(0);m=l}else{m=d|0}l=(g|0)>0;L484:do{if(l){j=0;f=c[6354]|0;while(1){if((f|0)<0){break}k=f-1|0;c[6354]=k;n=m+(j*24&-1)|0;o=14296+(f*24&-1)|0;c[n>>2]=c[o>>2];c[n+4>>2]=c[o+4>>2];c[n+8>>2]=c[o+8>>2];c[n+12>>2]=c[o+12>>2];c[n+16>>2]=c[o+16>>2];c[n+20>>2]=c[o+20>>2];o=j+1|0;if((o|0)<(g|0)){j=o;f=k}else{break L484}}uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);f=g-1|0;if((c[m+(f*24&-1)>>2]|0)!=3){uf(-1,151464,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=m+(f*24&-1)+8|0;k=(uA(c[j>>2]|0)|0)+80|0;o=ut(k)|0;do{if((o|0)==0){gk();n=ut(k)|0;if((n|0)!=0){p=n;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=149624,v)|0)}else{p=o}}while(0);o=c[j>>2]|0;j=bk(o|0,191528)|0;uF(p|0,o|0,j|0);n=o+j|0;o=p+j|0;q=c[8270]|0;do{if((q|0)!=0){if((aY(q|0,139696)|0)==0){break}bA(4,q|0)}}while(0);L502:do{if((f|0)>0){q=o;r=n;s=j;t=k;u=p;w=g-2|0;L504:while(1){x=m+(w*24&-1)|0;y=q;z=t;A=u;while(1){B=y;C=r;D=a[r]|0;L508:while(1){if(D<<24>>24==0){E=B;F=A;break L502}G=C+1|0;H=a[G]|0;if(H<<24>>24==0){I=B;J=C;K=z;L=A;M=D;N=393;break L502}if((a_(C|0,143664,2)|0)==0){O=G;P=B;Q=H}else{break}while(1){H=O+1|0;R=P+1|0;a[P]=Q;S=a[H]|0;if((S<<24>>24|0)==0|(S<<24>>24|0)==37){B=R;C=H;D=S;continue L508}else{O=H;P=R;Q=S}}}T=C+((bk(G|0,191528)|0)+1|0)|0;D=a[T]|0;a[T]=0;if((a[C]|0)!=37){N=363;break L504}S=bk(C|0,20296)|0;R=bk(C|0,20304)|0;H=bk(C|0,20320)|0;U=bk(C|0,20328)|0;if((U|0)<(H|0)&(U|0)<(R|0)&(U|0)<(S|0)){N=365;break L504}do{if((S|0)<(R|0)&(S|0)<(H|0)){if((c[x>>2]|0)!=3){N=372;break L504}b0();U=(z-B|0)+A|0;V=c[m+(w*24&-1)+8>>2]|0;a0(B|0,U|0,C|0,(v=i,i=i+8|0,c[v>>2]=V,v)|0)}else{if((R|0)<(H|0)){W=2}else{if(H>>>0<(uA(C|0)|0)>>>0){W=1}else{N=369;break L504}}V=x|0;if((c[V>>2]|0)==3){N=374;break L504}b0();if((W|0)==2){U=(z-B|0)+A|0;X=c[V>>2]|0;if((X|0)==1){Y=+(c[m+(w*24&-1)+8>>2]|0)}else if((X|0)==2){Y=+h[m+(w*24&-1)+8>>3]}else if((X|0)==3){Y=+uz(c[m+(w*24&-1)+8>>2]|0,0)}else{N=386;break L504}a0(B|0,U|0,C|0,(v=i,i=i+8|0,h[v>>3]=Y,v)|0);break}else if((W|0)==1){U=(z-B|0)+A|0;X=c[V>>2]|0;if((X|0)==1){Z=+(c[m+(w*24&-1)+8>>2]|0)}else if((X|0)==2){Z=+h[m+(w*24&-1)+8>>3]}else if((X|0)==3){Z=+uz(c[m+(w*24&-1)+8>>2]|0,0)}else{N=380;break L504}a0(B|0,U|0,C|0,(v=i,i=i+8|0,c[v>>2]=~~Z,v)|0);break}else{N=388;break L504}}}while(0);a[T]=D;_=uA(A|0)|0;if(_>>>0<(z-2|0)>>>0){break}C=z<<1;B=db(A,C,149624)|0;y=B+s|0;z=C;A=B}y=A+_|0;if((w|0)>0){q=y;r=T;s=_;t=z;u=A;w=w-1|0}else{$=y;aa=T;ab=z;ac=A;N=392;break L502}}if((N|0)==369){uf(-1,106184,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((N|0)==372){uf(-1,142064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((N|0)==386){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((N|0)==388){uf(-1,138488,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((N|0)==363){uf(-1,108e3,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((N|0)==365){uf(-1,107040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((N|0)==374){uf(-1,140392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((N|0)==380){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{$=o;aa=n;ab=k;ac=p;N=392}}while(0);if((N|0)==392){I=$;J=aa;K=ab;L=ac;M=a[aa]|0;N=393}L552:do{if((N|0)==393){if(M<<24>>24==0){E=I;F=L;break}aa=I;ac=J;ab=(K-I|0)+L|0;$=M;while(1){p=ab-1|0;if((p|0)<=0){E=aa;F=L;break L552}if($<<24>>24==37){k=ac+1|0;n=(a[k]|0)==37?k:ac;ad=n;ae=a[n]|0}else{ad=ac;ae=$}n=ad+1|0;k=aa+1|0;a[aa]=ae;o=a[n]|0;if(o<<24>>24==0){E=k;F=L;break}else{aa=k;ac=n;ab=p;$=o}}}}while(0);a[E]=0;E=c[6354]|0;if((E|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}L=E+1|0;c[6354]=L;E=14296+(L*24&-1)|0;ae=E;c[E>>2]=3;c[ae+4>>2]=af;c[14304+(L*24&-1)>>2]=F;L=ae+12|0;ae=e|0;c[L>>2]=c[ae>>2];c[L+4>>2]=c[ae+4>>2];c[L+8>>2]=c[ae+8>>2];if((F|0)!=0){ae=bP(F|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=ae}uu(F);if(l){l=0;do{F=m+(l*24&-1)|0;if((c[F>>2]|0)==3){uu(c[m+(l*24&-1)+8>>2]|0);c[F>>2]=1}l=l+1|0;}while((l|0)<(g|0))}if((m|0)!=(d|0)){uu(m)}m=c[8270]|0;if((m|0)==0){i=b;return}if((aY(m|0,139696)|0)==0){i=b;return}bA(4,139696);i=b;return}function hd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0,m=0,n=0,o=0.0;a=i;i=i+16|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=c[14296+(d*24&-1)>>2]|0;g=14304+(d*24&-1)|0;j=+h[g>>3];k=c[g>>2]|0;g=k;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-2;d=c[14304+(e*24&-1)>>2]|0;if((c[14296+(e*24&-1)>>2]|0)!=3){uf(-1,136912,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=(uA(d|0)|0)+80|0;l=ut(e)|0;do{if((l|0)==0){gk();m=ut(e)|0;if((m|0)!=0){n=m;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=134920,v)|0)}else{n=l}}while(0);if((f|0)==1){o=+(k|0)}else if((f|0)==3){o=+uz(g,0)}else if((f|0)==2){o=j}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}ud(n,e,d,10.0,o);e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e+1|0;c[6354]=f;e=14296+(f*24&-1)|0;c[e>>2]=3;c[14304+(f*24&-1)>>2]=n;f=e+12|0;e=b|0;c[f>>2]=c[e>>2];c[f+4>>2]=c[e+4>>2];c[f+8>>2]=c[e+8>>2];if((n|0)==0){uu(d);uu(n);i=a;return}e=bP(n|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=e;uu(d);uu(n);i=a;return}function he(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0.0,p=0,q=0,r=0,s=0,t=0,u=0.0;b=i;i=i+56|0;d=b|0;e=b+48|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=14296+(f*24&-1)|0;k=c[j>>2]|0;l=c[j+4>>2]|0;j=14304+(f*24&-1)|0;m=+h[j>>3];n=c[j>>2]|0;h[e>>3]=m;o=+h[14312+(f*24&-1)>>3];j=n;n=j;if((g|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=f-2;f=c[14304+(g*24&-1)>>2]|0;if((c[14296+(g*24&-1)>>2]|0)!=3){uf(-1,133408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=uA(f|0)|0;p=g+1|0;q=g+2|0;g=ut(q)|0;do{if((g|0)==0){gk();r=ut(q)|0;if((r|0)!=0){s=r;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=132008,v)|0)}else{s=g}}while(0);uF(s|0,f|0,p|0);ck(s|0,73808,p|0);g=(p<<1)+80|0;p=ut(g)|0;do{if((p|0)==0){gk();q=ut(g)|0;if((q|0)!=0){t=q;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=129704,v)|0)}else{t=p}}while(0);if((k|0)==1){u=+(j|0)}else if((k|0)==3){u=+uz(n,0)}else if((k|0)==2){u=m}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t3(d,u);j=t4(t,g,s,d,u- +O(+u))|0;if(!((j|0)!=0&(j|0)<(g|0))){uf(-1,128368,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=t+(j-1|0)|0;if((a[g]|0)!=32){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=125936,v)|0)}a[g]=0;if((k|0)==3){uu(n)}uu(f);uu(s);c[e>>2]=t;s=c[6354]|0;if((s|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=s+1|0;c[6354]=f;s=14296+(f*24&-1)|0;c[s>>2]=3;c[s+4>>2]=l;l=c[e>>2]|0;h[14304+(f*24&-1)>>3]=+h[e>>3];h[14312+(f*24&-1)>>3]=o;f=l;if((f|0)==0){uu(t);i=b;return}l=bP(f|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=l;uu(t);i=b;return}function hf(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0;a=i;i=i+56|0;b=a|0;d=a+48|0;h[d>>3]=0.0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=14296+(e*24&-1)|0;j=c[g+4>>2]|0;k=c[14304+(e*24&-1)>>2]|0;l=k;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=c[g>>2]|0;c[6354]=e-2;e=c[14304+(f*24&-1)>>2]|0;if(!((c[14296+(f*24&-1)>>2]|0)==3&(m|0)==3)){uf(-1,124672,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((e|0)==0|(k|0)==0){uf(-1,123472,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t1(l,e,b,d);n=+t2(b);o=+h[d>>3];uu(l);uu(e);e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{l=e+1|0;c[6354]=l;e=14296+(l*24&-1)|0;c[e>>2]=2;c[e+4>>2]=j;h[14304+(l*24&-1)>>3]=n+o;h[14312+(l*24&-1)>>3]=0.0;i=a;return}}function hg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0.0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0.0,r=0,s=0,t=0;a=i;i=i+16|0;b=a|0;d=a+8|0;bV(d|0,0);e=d|0;f=~~(+(c[e>>2]|0)+-946684800.0);c[e>>2]=f;g=+(c[d+4>>2]|0)/1.0e6+ +(f|0);f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=f-1|0;c[6354]=d;e=14296+(f*24&-1)|0;j=e|0;k=c[j>>2]|0;l=e+4|0;e=c[l>>2]|0;m=14304+(f*24&-1)|0;n=+h[m>>3];o=c[m>>2]|0;h[b>>3]=n;p=14312+(f*24&-1)|0;q=+h[p>>3];r=o;o=r;if((k|0)==3){if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=f;c[j>>2]=3;c[l>>2]=e;h[m>>3]=n;h[p>>3]=q;if((r|0)==0){s=f}else{r=bP(o|0)|0;o=c[6354]|0;c[14304+(o*24&-1)>>2]=r;s=o}if((s|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=s+1|0;c[6354]=o;s=14296+(o*24&-1)|0;c[s>>2]=2;c[s+4>>2]=t;h[14304+(o*24&-1)>>3]=g;h[14312+(o*24&-1)>>3]=0.0;he(0);i=a;return}else if((k|0)==2){h[b>>3]=g;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=f;c[j>>2]=2;c[l>>2]=e;h[m>>3]=g;h[p>>3]=0.0;i=a;return}else if((k|0)==1){c[b>>2]=~~g;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=f;c[j>>2]=1;c[l>>2]=e;h[m>>3]=+h[b>>3];h[p>>3]=q;i=a;return}else{uf(-1,122096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function hh(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;b=i;i=i+24|0;d=b|0;e=b+16|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=f-1;g=c[14304+(f*24&-1)>>2]|0;if((c[14296+(f*24&-1)>>2]|0)!=3){uf(-1,120384,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=eo(g,e)|0;h=e6(119096)|0;if((h|0)!=0){a[h+8|0]=0;c[h+16>>2]=1;c[h+24>>2]=f}f=c[e>>2]|0;e=uA(f|0)|0;do{if((e|0)>0){h=f+(e-1|0)|0;if((a[h]|0)!=10){break}a[h]=0}}while(0);e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}h=e+1|0;c[6354]=h;e=14296+(h*24&-1)|0;c[e>>2]=3;c[14304+(h*24&-1)>>2]=f;h=e+12|0;e=d|0;c[h>>2]=c[e>>2];c[h+4>>2]=c[e+4>>2];c[h+8>>2]=c[e+8>>2];if((f|0)==0){uu(f);uu(g);i=b;return}e=bP(f|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=e;uu(f);uu(g);i=b;return}function hi(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;i=i+16|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=14296+(d*24&-1)|0;g=f;h=c[f>>2]|0;f=c[g+4>>2]|0;j=c[14304+(d*24&-1)>>2]|0;k=g+12|0;g=b|0;c[g>>2]=c[k>>2];c[g+4>>2]=c[k+4>>2];c[g+8>>2]=c[k+8>>2];if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-2;d=c[14304+(e*24&-1)>>2]|0;if((c[14296+(e*24&-1)>>2]|0)!=3){uf(-1,111072,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a_(d|0,167320,6)|0)==0){uf(-1,114320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a_(d|0,126208,6)|0)==0){uf(-1,114320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=e6(d)|0;uu(d);d=e+8|0;k=e+16|0;do{if((a[d]&1)==0){if((c[k>>2]|0)!=3){break}uu(c[e+24>>2]|0);c[k>>2]=1}}while(0);c[k>>2]=h;k=e;c[k+20>>2]=f;c[e+24>>2]=j;e=k+28|0;c[e>>2]=c[g>>2];c[e+4>>2]=c[g+4>>2];c[e+8>>2]=c[g+8>>2];a[d]=0;d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d+1|0;c[6354]=e;d=14296+(e*24&-1)|0;k=d;c[d>>2]=h;c[k+4>>2]=f;c[14304+(e*24&-1)>>2]=j;e=k+12|0;c[e>>2]=c[g>>2];c[e+4>>2]=c[g+4>>2];c[e+8>>2]=c[g+8>>2];if((h|0)!=3|(j|0)==0){i=b;return}h=bP(j|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=h;i=b;return}function hj(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0,t=0,u=0.0,w=0,x=0,y=0,z=0.0,A=0,B=0,C=0.0;b=i;i=i+24|0;d=b+16|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=c[10810]|0;g=e-1|0;c[6354]=g;j=14296+(e*24&-1)|0;k=j;l=j|0;j=c[l>>2]|0;m=k+4|0;n=c[m>>2]|0;o=14304+(e*24&-1)|0;p=c[o>>2]|0;q=k+12|0;k=b|0;c[k>>2]=c[q>>2];c[k+4>>2]=c[q+4>>2];c[k+8>>2]=c[q+8>>2];if((j|0)!=3){if((g|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e;c[l>>2]=j;c[m>>2]=n;c[o>>2]=p;c[q>>2]=c[k>>2];c[q+4>>2]=c[k+4>>2];c[q+8>>2]=c[k+8>>2];i=b;return}L752:do{if((f|0)==0){r=0.0;s=0;t=548}else{k=f;while(1){if((aY(c[k+4>>2]|0,p|0)|0)==0){break}q=c[k>>2]|0;if((q|0)==0){r=0.0;s=0;t=548;break L752}else{k=q}}q=c[k+16>>2]|0;o=c[k+20>>2]|0;n=k+24|0;m=c[n>>2]|0;h[d>>3]=+h[n>>3];u=+h[k+32>>3];n=m;m=n;if((a[k+8|0]&1)!=0){r=u;s=o;t=548;break}if((q|0)==3){if((n|0)==0){w=0}else{w=bP(m|0)|0}c[d>>2]=w;x=3}else{x=q}uu(p);if((k|0)==0){y=o;z=u;t=550}else{A=x;B=o;C=u}}}while(0);if((t|0)==548){uu(p);y=s;z=r;t=550}if((t|0)==550){h[d>>3]=+uz(133568,0);A=2;B=y;C=z}y=c[6354]|0;if((y|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t=y+1|0;c[6354]=t;y=14296+(t*24&-1)|0;c[y>>2]=A;c[y+4>>2]=B;B=c[d>>2]|0;h[14304+(t*24&-1)>>3]=+h[d>>3];h[14312+(t*24&-1)>>3]=C;t=B;if((A|0)!=3|(t|0)==0){i=b;return}A=bP(t|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=A;i=b;return}function hk(b){b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0,z=0,A=0.0,B=0.0,C=0,D=0,E=0,F=0.0,G=0.0,H=0.0,I=0.0,J=0,K=0,L=0,M=0.0,N=0.0,O=0,P=0,Q=0,R=0,S=0,T=0.0,U=0,V=0.0,W=0,X=0.0,Y=0.0,$=0.0,aa=0.0,ab=0.0,ac=0.0,ad=0.0,ae=0.0,af=0,ag=0.0,ah=0.0,ai=0.0,aj=0.0;d=b+320|0;e=b+300|0;f=c[e>>2]|0;g=0;i=0;while(1){L779:do{if((i|0)<(f|0)){j=c[d>>2]|0;k=i;while(1){if((c[j+(k<<6)>>2]|0)!=2){l=k;break L779}m=k+1|0;if((m|0)<(f|0)){k=m}else{l=m;break}}}else{l=i}}while(0);k=0;while(1){n=k+l|0;if((n|0)>=(f|0)){break}if((c[(c[d>>2]|0)+(n<<6)>>2]|0)==2){break}else{k=k+1|0}}if((k|0)>0){g=g+1|0;i=n}else{break}}n=b+284|0;if((c[n>>2]|0)==9){if((g|0)>0){o=0;p=0;q=0.0}else{return}while(1){L796:do{if((o|0)<(f|0)){i=c[d>>2]|0;l=o;while(1){if((c[i+(l<<6)>>2]|0)!=2){r=l;break L796}j=l+1|0;if((j|0)<(f|0)){l=j}else{r=j;break}}}else{r=o}}while(0);k=0;while(1){s=k+r|0;if((s|0)>=(f|0)){break}if((c[(c[d>>2]|0)+(s<<6)>>2]|0)==2){break}else{k=k+1|0}}if((k|0)>0){l=c[d>>2]|0;i=r;t=q;while(1){if((c[l+(i<<6)>>2]|0)==2){u=t}else{u=t+ +h[l+(i<<6)+16>>3]}j=i+1|0;if((j|0)<(s|0)){i=j;t=u}else{v=u;break}}}else{v=q}i=p+1|0;if((i|0)<(g|0)){o=(r+1|0)+k|0;p=i;q=v}else{w=v;break}}}else{w=0.0}if((g|0)<=0){return}p=b+304|0;r=b+308|0;b=0;o=1;s=f;while(1){L820:do{if((b|0)<(s|0)){f=c[d>>2]|0;i=b;while(1){if((c[f+(i<<6)>>2]|0)!=2){x=i;break L820}l=i+1|0;if((l|0)<(s|0)){i=l}else{x=l;break}}}else{x=b}}while(0);k=0;while(1){y=k+x|0;if((y|0)>=(s|0)){break}if((c[(c[d>>2]|0)+(y<<6)>>2]|0)==2){break}else{k=k+1|0}}i=c[n>>2]|0;do{if((i|0)==7){if((k|0)>0){z=x;A=0.0}else{break}while(1){f=c[d>>2]|0;if((c[f+(z<<6)>>2]|0)==2){B=A}else{l=f+(z<<6)+16|0;v=A+ +h[l>>3];h[l>>3]=v;B=v}l=z+1|0;if((l|0)<(y|0)){z=l;A=B}else{break}}C=c[n>>2]|0;D=598}else{C=i;D=598}}while(0);do{if((D|0)==598){D=0;if((C|0)==9&(k|0)>0){E=x;F=0.0}else{break}while(1){i=c[d>>2]|0;if((c[i+(E<<6)>>2]|0)==2){G=F}else{l=i+(E<<6)+16|0;v=F+ +h[l>>3];h[l>>3]=v/w;G=v}l=E+1|0;if((l|0)<(y|0)){E=l;F=G}else{break}}}}while(0);l=c[p>>2]|0;i=c[r>>2]|0;f=64788+(l*688&-1)|0;j=64664+(l*688&-1)|0;v=+h[j>>3];if((a[f]&1)==0){m=64672+(l*688&-1)|0;H=+h[m>>3];I=v;J=m}else{q=+_(+v);v=+h[64800+(l*688&-1)>>3];m=64672+(l*688&-1)|0;H=+_(+(+h[m>>3]))/v;I=q/v;J=m}m=64788+(i*688&-1)|0;K=64664+(i*688&-1)|0;v=+h[K>>3];if((a[m]&1)==0){L=64672+(i*688&-1)|0;M=+h[L>>3];N=v;O=L}else{q=+_(+v);v=+h[64800+(i*688&-1)>>3];L=64672+(i*688&-1)|0;M=+_(+(+h[L>>3]))/v;N=q/v;O=L}L=c[d>>2]|0;do{if((k|0)>0){P=64648+(l*688&-1)|0;Q=64648+(i*688&-1)|0;v=M;q=N;u=H;t=I;R=0;while(1){S=R+x|0;T=+h[L+(S<<6)+8>>3];U=L+(S<<6)+16|0;V=+h[U>>3];W=L+(S<<6)|0;c[W>>2]=0;if(T>2]&1|0)==0){X=t;D=614}else{Y=T;D=612}}else{Y=t;D=612}L860:do{if((D|0)==612){D=0;if(T>u){if((c[P>>2]&2|0)==0){X=Y;D=614;break}else{$=T}}else{$=u}h[U>>3]=V;do{if(V>2]&1|0)!=0){aa=V;break}c[W>>2]=1;ab=q;ac=v;ad=$;ae=Y;break L860}else{aa=q}}while(0);if(V<=v){ab=aa;ac=v;ad=$;ae=Y;break}if((c[Q>>2]&2|0)!=0){ab=aa;ac=V;ad=$;ae=Y;break}c[W>>2]=1;ab=aa;ac=v;ad=$;ae=Y}}while(0);if((D|0)==614){D=0;c[W>>2]=1;h[U>>3]=V;ab=q;ac=v;ad=u;ae=X}h[L+(S<<6)+56>>3]=T;h[L+(S<<6)+48>>3]=T;h[L+(S<<6)+40>>3]=V;h[L+(S<<6)+32>>3]=V;h[L+(S<<6)+24>>3]=-1.0;af=R+1|0;if((af|0)<(k|0)){v=ac;q=ab;u=ad;t=ae;R=af}else{break}}if(ad>H){if((a[f]&1)==0){ag=ad}else{ag=+Z(+(ad*+h[64800+(l*688&-1)>>3]))}h[J>>3]=ag}if(ae>3]))}h[j>>3]=ah}if(ac>M){if((a[m]&1)==0){ai=ac}else{ai=+Z(+(ac*+h[64800+(i*688&-1)>>3]))}h[O>>3]=ai}if(ab>=N){break}if((a[m]&1)==0){aj=ab}else{aj=+Z(+(ab*+h[64800+(i*688&-1)>>3]))}h[K>>3]=aj}}while(0);if((o|0)>=(g|0)){break}b=(x+1|0)+k|0;o=o+1|0;s=c[e>>2]|0}return}function hl(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0.0,$=0.0,ab=0,ac=0,ad=0.0,ae=0,af=0,ag=0.0,ah=0,ai=0.0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0.0,aq=0.0,ar=0,as=0.0,at=0.0,au=0.0,av=0.0,aw=0.0,ax=0.0,ay=0,az=0.0,aA=0.0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0.0,aJ=0.0,aK=0.0,aL=0.0,aM=0,aN=0.0,aO=0.0,aP=0.0,aQ=0.0,aR=0.0,aS=0.0,aT=0.0,aU=0.0,aV=0.0,aW=0.0,aX=0.0,aY=0.0,aZ=0.0,a_=0.0,a$=0.0,a0=0.0,a1=0.0,a2=0.0,a3=0.0,a4=0.0,a5=0.0,a6=0.0,a7=0.0,a8=0.0,a9=0.0,ba=0.0,bb=0.0,bc=0.0,bd=0.0,be=0.0,bf=0.0,bg=0.0,bh=0.0,bi=0.0,bj=0.0,bk=0.0,bl=0.0,bm=0.0,bn=0.0,bo=0.0,bp=0.0,bq=0.0,br=0,bs=0,bt=0,bu=0;d=i;e=b+320|0;f=b+300|0;g=c[f>>2]|0;j=0;k=0;while(1){L903:do{if((k|0)<(g|0)){l=c[e>>2]|0;m=k;while(1){if((c[l+(m<<6)>>2]|0)!=2){n=m;break L903}o=m+1|0;if((o|0)<(g|0)){m=o}else{n=o;break}}}else{n=k}}while(0);m=0;while(1){p=m+n|0;if((p|0)>=(g|0)){break}if((c[(c[e>>2]|0)+(p<<6)>>2]|0)==2){break}else{m=m+1|0}}if((m|0)>0){j=j+1|0;k=p}else{break}}p=aa(j<<6,(c[6352]|0)+1|0);k=ut(p)|0;do{if((k|0)==0){gk();g=ut(p)|0;if((g|0)!=0){q=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215872,v)|0)}else{q=k}}while(0);k=q;if((j|0)<=0){r=c[e>>2]|0;s=r;uu(s);c[e>>2]=k;t=c[6352]|0;u=t+1|0;w=aa(u,j);x=b+296|0;c[x>>2]=w;y=w-1|0;c[f>>2]=y;i=d;return}q=b+284|0;p=b+304|0;g=b+308|0;n=0;l=0;L921:while(1){o=c[f>>2]|0;L923:do{if((n|0)<(o|0)){z=c[e>>2]|0;A=n;while(1){if((c[z+(A<<6)>>2]|0)!=2){B=A;break L923}C=A+1|0;if((C|0)<(o|0)){A=C}else{B=C;break}}}else{B=n}}while(0);m=0;while(1){D=m+B|0;if((D|0)>=(o|0)){break}if((c[(c[e>>2]|0)+(D<<6)>>2]|0)==2){break}else{m=m+1|0}}o=c[q>>2]|0;do{if((o|0)==1){c[200]=c[p>>2];c[144]=c[g>>2];A=m<<5;z=ut(A)|0;if((z|0)==0){gk();C=ut(A)|0;if((C|0)==0){E=727;break L921}else{F=C}}else{F=z}z=F;if((m|0)<4){E=729;break L921}C=c[e>>2]|0;A=0;while(1){if((A|0)>=(m|0)){break}if(+h[C+(A+B<<6)+24>>3]>0.0){A=A+1|0}else{E=733;break L921}}A=m-2|0;G=A*40&-1;H=ut(G)|0;if((H|0)==0){gk();I=ut(G)|0;if((I|0)==0){E=736;break L921}else{J=I}}else{J=H}H=J;I=A<<3;K=ut(I)|0;if((K|0)==0){gk();L=ut(I)|0;if((L|0)==0){E=739;break L921}else{M=L}}else{M=K}K=M;L=ut(I)|0;if((L|0)==0){gk();N=ut(I)|0;if((N|0)==0){E=742;break L921}else{O=N}}else{O=L}L=O;N=m-1|0;I=N<<3;P=ut(I)|0;if((P|0)==0){gk();S=ut(I)|0;if((S|0)==0){E=745;break L921}else{T=S}}else{T=P}P=T;S=m<<3;I=ut(S)|0;if((I|0)==0){gk();U=ut(S)|0;if((U|0)==0){E=748;break L921}else{V=U}}else{V=I}I=V;U=ut(S)|0;if((U|0)==0){gk();W=ut(S)|0;if((W|0)==0){E=751;break L921}else{X=W}}else{X=U}U=X;W=c[200]|0;S=64788+(W*688&-1)|0;Y=+h[C+(B<<6)+8>>3];if((a[S]&1)==0){$=Y}else{$=+Z(+(Y*+h[64800+(W*688&-1)>>3]))}h[I>>3]=$;ab=c[144]|0;ac=64788+(ab*688&-1)|0;Y=+h[C+(B<<6)+16>>3];if((a[ac]&1)==0){ad=Y}else{ad=+Z(+(Y*+h[64800+(ab*688&-1)>>3]))}h[U>>3]=ad;if((m|0)>1){ae=64800+(ab*688&-1)|0;ab=64800+(W*688&-1)|0;W=1;do{af=W+B|0;Y=+h[C+(af<<6)+8>>3];if((a[S]&1)==0){ag=Y}else{ag=+Z(+(Y*+h[ab>>3]))}ah=I+(W<<3)|0;h[ah>>3]=ag;Y=+h[C+(af<<6)+16>>3];if((a[ac]&1)==0){ai=Y}else{ai=+Z(+(Y*+h[ae>>3]))}h[U+(W<<3)>>3]=ai;af=W-1|0;h[P+(af<<3)>>3]=+h[ah>>3]- +h[I+(af<<3)>>3];W=W+1|0;}while((W|0)<(m|0))}W=m-3|0;if((W|0)>=0){I=m-4|0;ae=m-5|0;ac=0;while(1){ab=ac+2|0;S=ac+1|0;Y=+h[U+(S<<3)>>3];af=P+(S<<3)|0;ah=P+(ac<<3)|0;h[K+(ac<<3)>>3]=((+h[U+(ab<<3)>>3]-Y)/+h[af>>3]-(Y- +h[U+(ac<<3)>>3])/+h[ah>>3])*3.0;do{if((ac|0)<2){h[H+(ac*40&-1)>>3]=0.0;if((ac|0)<1){h[H+(ac*40&-1)+8>>3]=0.0;aj=C+(ac+B<<6)+24|0;ak=C+(S+B<<6)+24|0;break}else{al=C+(ac+B<<6)+24|0;am=P+(ac-1<<3)|0;E=770;break}}else{an=C+(ac+B<<6)+24|0;ao=P+(ac-1<<3)|0;h[H+(ac*40&-1)>>3]=6.0/+h[an>>3]/+h[ao>>3]/+h[ah>>3];al=an;am=ao;E=770}}while(0);if((E|0)==770){E=0;Y=+h[ah>>3];ap=1.0/Y;ao=C+(S+B<<6)+24|0;h[H+(ac*40&-1)+8>>3]=Y-6.0/+h[al>>3]/Y*(1.0/+h[am>>3]+ap)-6.0/+h[ao>>3]/Y*(ap+1.0/+h[af>>3]);aj=al;ak=ao}ap=+h[ah>>3];Y=+h[af>>3];aq=1.0/ap+1.0/Y;ao=C+(ab+B<<6)+24|0;h[H+(ac*40&-1)+16>>3]=(ap+Y)*2.0+6.0/+h[aj>>3]/ap/ap+aq*6.0/+h[ak>>3]*aq+6.0/+h[ao>>3]/Y/Y;if((ac|0)>(I|0)){h[H+(ac*40&-1)+24>>3]=0.0}else{Y=+h[af>>3];aq=1.0/Y;h[H+(ac*40&-1)+24>>3]=Y-6.0/+h[ak>>3]/Y*(1.0/+h[ah>>3]+aq)-6.0/+h[ao>>3]/Y*(aq+1.0/+h[P+(ab<<3)>>3])}if((ac|0)>(ae|0)){h[H+(ac*40&-1)+32>>3]=0.0}else{h[H+(ac*40&-1)+32>>3]=6.0/+h[ao>>3]/+h[af>>3]/+h[P+(ab<<3)>>3]}if((S|0)>(W|0)){break}else{ac=S}}}ac=G+40|0;ae=ut(ac)|0;if((ae|0)==0){gk();I=ut(ac)|0;if((I|0)==0){E=780;break L921}else{ar=I}}else{ar=ae}ae=ar;aq=+h[J+16>>3];I=ar;h[I>>3]=aq;if(aq==0.0){E=782;break L921}Y=+h[J+24>>3]/aq;h[ar+8>>3]=Y;ap=+h[J+32>>3]/aq;h[ar+16>>3]=ap;as=+h[J+48>>3];h[ar+64>>3]=as;at=+h[J+56>>3]-Y*as;h[ar+40>>3]=at;if(at==0.0){E=784;break L921}au=(+h[J+64>>3]-ap*as)/at;h[ar+48>>3]=au;h[ar+56>>3]=+h[J+72>>3]/at;if((A|0)>2){ac=2;at=Y;Y=ap;ap=au;while(1){ao=H+(ac*40&-1)|0;au=+h[H+(ac*40&-1)+8>>3]-at*+h[ao>>3];h[ae+(ac*40&-1)+24>>3]=au;as=+h[H+(ac*40&-1)+16>>3]-Y*+h[ao>>3]-ap*au;h[ae+(ac*40&-1)>>3]=as;if(as==0.0){E=787;break L921}av=+h[ae+((ac-1|0)*40&-1)+16>>3];aw=(+h[H+(ac*40&-1)+24>>3]-au*av)/as;h[ae+(ac*40&-1)+8>>3]=aw;h[ae+(ac*40&-1)+16>>3]=+h[H+(ac*40&-1)+32>>3]/as;ao=ac+1|0;if((ao|0)<(A|0)){ac=ao;at=ap;Y=av;ap=aw}else{break}}ax=+h[I>>3]}else{ax=aq}h[ar+32>>3]=0.0;ap=+h[K>>3]/ax;h[ar+72>>3]=ap;if((A|0)>1){ac=1;Y=0.0;at=ap;while(1){ap=(+h[K+(ac<<3)>>3]-Y*+h[H+(ac*40&-1)>>3]-at*+h[ae+(ac*40&-1)+24>>3])/+h[ae+(ac*40&-1)>>3];G=ac+1|0;h[ae+(G*40&-1)+32>>3]=ap;if((G|0)<(A|0)){ac=G;Y=at;at=ap}else{break}}}at=+h[ae+(A*40&-1)+32>>3];h[L+(W<<3)>>3]=at;ac=m-4|0;Y=+h[ae+(W*40&-1)+32>>3]-at*+h[ae+(ac*40&-1)+8>>3];h[L+(ac<<3)>>3]=Y;H=m-5|0;L1015:do{if((H|0)>-1){aq=+h[ae+(ac*40&-1)+32>>3]-Y*+h[ae+(H*40&-1)+8>>3]-at*+h[ae+(H*40&-1)+16>>3];h[L+(H<<3)>>3]=aq;if((H|0)<=0){break}K=m-6|0;ap=+h[ae+(H*40&-1)+32>>3]-aq*+h[ae+(K*40&-1)+8>>3]-Y*+h[ae+(K*40&-1)+16>>3];h[L+(K<<3)>>3]=ap;if((K|0)>0){ay=K;az=ap;aA=aq}else{break}while(1){K=ay-1|0;aq=+h[ae+(ay*40&-1)+32>>3]-az*+h[ae+(K*40&-1)+8>>3]-aA*+h[ae+(K*40&-1)+16>>3];h[L+(K<<3)>>3]=aq;if((K|0)<=0){break L1015}ap=+h[L+(ay<<3)>>3];ay=K;az=aq;aA=ap}}}while(0);uu(ar);ae=F+16|0;h[ae>>3]=0.0;H=(A|0)<1;if(!H){ac=1;do{h[z+(ac<<5)+16>>3]=+h[L+(ac-1<<3)>>3];ac=ac+1|0;}while((ac|0)<=(A|0))}h[z+(N<<5)+16>>3]=0.0;Y=+h[ae>>3];at=+h[F+48>>3];ac=F;h[ac>>3]=+h[U>>3]+2.0/+h[C+(B<<6)+24>>3]/+h[P>>3]*(Y-at);if(!H){L=1;ap=Y;aq=at;while(1){at=+h[P+(L-1<<3)>>3];aw=+h[P+(L<<3)>>3];W=L+1|0;av=+h[z+(W<<5)+16>>3];h[z+(L<<5)>>3]=+h[U+(L<<3)>>3]-2.0/+h[C+(L+B<<6)+24>>3]*(av/aw+(ap/at-aq*(1.0/at+1.0/aw)));if((W|0)>(A|0)){break}else{L=W;ap=aq;aq=av}}}h[z+(N<<5)>>3]=+h[U+(N<<3)>>3]-2.0/+h[C+(N+B<<6)+24>>3]/+h[P+(A<<3)>>3]*+h[z+(A<<5)+16>>3];if((A|0)>=0){L=0;aq=+h[ac>>3];ap=Y;while(1){H=L+1|0;av=+h[z+(H<<5)>>3];ae=P+(L<<3)|0;aw=+h[ae>>3];at=+h[z+(H<<5)+16>>3];h[z+(L<<5)+8>>3]=(av-aq)/aw-aw/3.0*(ap*2.0+at);h[z+(L<<5)+24>>3]=(at-ap)/3.0/+h[ae>>3];if((H|0)>(A|0)){break}else{L=H;aq=av;ap=at}}}uu(T);uu(O);uu(M);uu(J);uu(V);uu(X);ho(b,z,B,m,k+(aa((c[6352]|0)+1|0,l)<<6)|0);uu(F)}else if((o|0)==3){c[200]=c[p>>2];c[144]=c[g>>2];if((m|0)<3){E=667;break L921}L=c[e>>2]|0;A=m<<5;P=ut(A)|0;if((P|0)==0){gk();ac=ut(A)|0;if((ac|0)==0){E=670;break L921}else{aB=ac}}else{aB=P}P=aB;ac=m-2|0;A=ac*24&-1;N=ut(A)|0;if((N|0)==0){gk();C=ut(A)|0;if((C|0)==0){E=673;break L921}else{aC=C}}else{aC=N}N=aC;C=ac<<3;A=ut(C)|0;if((A|0)==0){gk();U=ut(C)|0;if((U|0)==0){E=676;break L921}else{aD=U}}else{aD=A}A=aD;U=ut(C)|0;if((U|0)==0){gk();H=ut(C)|0;if((H|0)==0){E=679;break L921}else{aE=H}}else{aE=U}U=aE;H=m-1|0;C=H<<3;ae=ut(C)|0;if((ae|0)==0){gk();W=ut(C)|0;if((W|0)==0){E=682;break L921}else{aF=W}}else{aF=ae}ae=aF;W=m<<3;C=ut(W)|0;if((C|0)==0){gk();S=ut(W)|0;if((S|0)==0){E=685;break L921}else{aG=S}}else{aG=C}C=aG;S=ut(W)|0;if((S|0)==0){gk();ab=ut(W)|0;if((ab|0)==0){E=688;break L921}else{aH=ab}}else{aH=S}S=aH;ab=c[200]|0;W=64788+(ab*688&-1)|0;ap=+h[L+(B<<6)+8>>3];if((a[W]&1)==0){aI=ap}else{aI=+Z(+(ap*+h[64800+(ab*688&-1)>>3]))}h[C>>3]=aI;af=c[144]|0;ah=64788+(af*688&-1)|0;ap=+h[L+(B<<6)+16>>3];if((a[ah]&1)==0){aJ=ap}else{aJ=+Z(+(ap*+h[64800+(af*688&-1)>>3]))}h[S>>3]=aJ;if((m|0)>1){K=64800+(af*688&-1)|0;af=64800+(ab*688&-1)|0;ab=1;do{I=ab+B|0;ap=+h[L+(I<<6)+8>>3];if((a[W]&1)==0){aK=ap}else{aK=+Z(+(ap*+h[af>>3]))}G=C+(ab<<3)|0;h[G>>3]=aK;ap=+h[L+(I<<6)+16>>3];if((a[ah]&1)==0){aL=ap}else{aL=+Z(+(ap*+h[K>>3]))}h[S+(ab<<3)>>3]=aL;I=ab-1|0;h[ae+(I<<3)>>3]=+h[G>>3]- +h[C+(I<<3)>>3];ab=ab+1|0;}while((ab|0)<(m|0))}ab=m-3|0;if((ab|0)>=0){C=m-4|0;K=0;while(1){ah=K+1|0;ap=+h[S+(ah<<3)>>3];L=ae+(ah<<3)|0;af=ae+(K<<3)|0;h[A+(K<<3)>>3]=((+h[S+(K+2<<3)>>3]-ap)/+h[L>>3]-(ap- +h[S+(K<<3)>>3])/+h[af>>3])*3.0;if((K|0)<1){h[N+(K*24&-1)>>3]=0.0}else{h[N+(K*24&-1)>>3]=+h[af>>3]}h[N+(K*24&-1)+8>>3]=(+h[af>>3]+ +h[L>>3])*2.0;if((K|0)>(C|0)){h[N+(K*24&-1)+16>>3]=0.0}else{h[N+(K*24&-1)+16>>3]=+h[L>>3]}if((ah|0)>(ab|0)){break}else{K=ah}}}if((ac|0)>1){K=1;do{C=K-1|0;ap=+h[N+(C*24&-1)+8>>3];if(ap==0.0){E=898;break L921}aq=+h[N+(K*24&-1)>>3]/ap;ah=N+(K*24&-1)+8|0;h[ah>>3]=+h[ah>>3]-aq*+h[N+(C*24&-1)+16>>3];ah=A+(K<<3)|0;h[ah>>3]=+h[ah>>3]-aq*+h[A+(C<<3)>>3];K=K+1|0;}while((K|0)<(ac|0))}aq=+h[N+(ab*24&-1)+8>>3];if(aq==0.0){E=899;break L921}ap=+h[A+(ab<<3)>>3]/aq;h[U+(ab<<3)>>3]=ap;K=m-4|0;if((K|0)>-1){C=K;aq=ap;while(1){ap=+h[N+(C*24&-1)+8>>3];if(ap==0.0){E=900;break L921}Y=(+h[A+(C<<3)>>3]-aq*+h[N+(C*24&-1)+16>>3])/ap;h[U+(C<<3)>>3]=Y;if((C|0)>0){C=C-1|0;aq=Y}else{break}}}C=aB+16|0;h[C>>3]=0.0;if((ac|0)>=1){N=1;do{h[P+(N<<5)+16>>3]=+h[U+(N-1<<3)>>3];N=N+1|0;}while((N|0)<=(ac|0))}h[P+(H<<5)+16>>3]=0.0;if((H|0)>=0){N=0;do{h[P+(N<<5)>>3]=+h[S+(N<<3)>>3];N=N+1|0;}while((N|0)<=(H|0))}if((ac|0)>=0){H=0;aq=+h[aB>>3];Y=+h[C>>3];while(1){N=H+1|0;ap=+h[P+(N<<5)>>3];S=ae+(H<<3)|0;at=+h[S>>3];av=+h[P+(N<<5)+16>>3];h[P+(H<<5)+8>>3]=(ap-aq)/at-at/3.0*(Y*2.0+av);h[P+(H<<5)+24>>3]=(av-Y)/3.0/+h[S>>3];if((N|0)>(ac|0)){break}else{H=N;aq=ap;Y=av}}}uu(aF);uu(aE);uu(aD);uu(aC);uu(aG);uu(aH);ho(b,P,B,m,k+(aa((c[6352]|0)+1|0,l)<<6)|0);uu(aB)}else if((o|0)==2|(o|0)==4){H=m<<3;ac=ut(H)|0;if((ac|0)==0){gk();ae=ut(H)|0;if((ae|0)==0){E=808;break L921}else{aM=ae}}else{aM=ac}ac=aM;ae=m-1|0;H=(ae|0)/2&-1;h[ac>>3]=0.0;if((ae|0)>1){C=0;Y=0.0;while(1){N=C+1|0;aq=Y+ +_(+(+(ae-C|0)/+(N|0)));h[ac+(N<<3)>>3]=aq;if((N|0)<(H|0)){C=N;Y=aq}else{break}}}if((ae|0)>=(H|0)){C=ae;do{h[ac+(C<<3)>>3]=+h[ac+(ae-C<<3)>>3];C=C-1|0;}while((C|0)>=(H|0))}H=c[6352]|0;C=aa(H+1|0,l);P=c[p>>2]|0;c[200]=P;N=c[g>>2]|0;c[144]=N;Y=+h[64664+(P*688&-1)>>3];if((a[64788+(P*688&-1)|0]&1)==0){aN=+h[64672+(P*688&-1)>>3];aO=Y}else{aq=+_(+Y);Y=+h[64800+(P*688&-1)>>3];aN=+_(+(+h[64672+(P*688&-1)>>3]))/Y;aO=aq/Y}Y=+h[64664+(N*688&-1)>>3];if((a[64788+(N*688&-1)|0]&1)==0){aP=+h[64672+(N*688&-1)>>3];aQ=Y}else{aq=+_(+Y);Y=+h[64800+(N*688&-1)>>3];aP=+_(+(+h[64672+(N*688&-1)>>3]))/Y;aQ=aq/Y}do{if((H|0)>0){N=ae+B|0;Y=+(ae>>>0>>>0);aq=aP;av=aQ;ap=aN;at=aO;P=0;S=H;while(1){aw=+(P|0)/+(S-1|0);U=c[e>>2]|0;do{if(aw==0.0){aR=+h[U+(B<<6)+16>>3];aS=+h[U+(B<<6)+8>>3]}else{if(aw==1.0){aR=+h[U+(N<<6)+16>>3];aS=+h[U+(N<<6)+8>>3];break}as=+_(+(1.0-aw));au=Y*as;aT=+_(+aw)-as;as=0.0;aU=0.0;A=0;while(1){aV=+Z(+(aT*+(A>>>0>>>0)+(au+ +h[ac+(A<<3)>>3])));ab=A+B|0;aW=aU+aV*+h[U+(ab<<6)+8>>3];aX=as+aV*+h[U+(ab<<6)+16>>3];ab=A+1|0;if(ab>>>0>ae>>>0){aR=aX;aS=aW;break}else{as=aX;aU=aW;A=ab}}}}while(0);U=P+C|0;A=k+(U<<6)|0;c[A>>2]=0;h[k+(U<<6)+8>>3]=aS;if(aS>2]&1|0)==0){aY=at;E=831}else{aZ=aS;E=829}}else{aZ=at;E=829}L1147:do{if((E|0)==829){E=0;if(aS>ap){if((c[64648+((c[200]|0)*688&-1)>>2]&2|0)==0){aY=aZ;E=831;break}else{a_=aS}}else{a_=ap}h[k+(U<<6)+16>>3]=aR;do{if(aR>2]&1|0)!=0){a$=aR;break}c[A>>2]=1;a0=av;a1=aq;a2=a_;a3=aZ;break L1147}else{a$=av}}while(0);if(aR<=aq){a0=a$;a1=aq;a2=a_;a3=aZ;break}if((c[64648+((c[144]|0)*688&-1)>>2]&2|0)!=0){a0=a$;a1=aR;a2=a_;a3=aZ;break}c[A>>2]=1;a0=a$;a1=aq;a2=a_;a3=aZ}}while(0);if((E|0)==831){E=0;c[A>>2]=1;h[k+(U<<6)+16>>3]=aR;a0=av;a1=aq;a2=ap;a3=aY}h[k+(U<<6)+56>>3]=aS;h[k+(U<<6)+48>>3]=aS;h[k+(U<<6)+40>>3]=aR;h[k+(U<<6)+32>>3]=aR;h[k+(U<<6)+24>>3]=-1.0;ab=P+1|0;K=c[6352]|0;if((ab|0)<(K|0)){aq=a1;av=a0;ap=a2;at=a3;P=ab;S=K}else{break}}if(a2>aN){S=c[200]|0;if((a[64788+(S*688&-1)|0]&1)==0){a4=a2}else{a4=+Z(+(a2*+h[64800+(S*688&-1)>>3]))}h[64672+(S*688&-1)>>3]=a4}if(a3>3]))}h[64664+(S*688&-1)>>3]=a5}if(a1>aP){S=c[144]|0;if((a[64788+(S*688&-1)|0]&1)==0){a6=a1}else{a6=+Z(+(a1*+h[64800+(S*688&-1)>>3]))}h[64672+(S*688&-1)>>3]=a6}if(a0>=aQ){break}S=c[144]|0;if((a[64788+(S*688&-1)|0]&1)==0){a7=a0}else{a7=+Z(+(a0*+h[64800+(S*688&-1)>>3]))}h[64664+(S*688&-1)>>3]=a7}}while(0);uu(aM)}else if((o|0)==8){C=c[6352]|0;ae=aa(C+1|0,l);ac=c[p>>2]|0;c[200]=ac;H=c[g>>2]|0;c[144]=H;at=+h[64664+(ac*688&-1)>>3];if((a[64788+(ac*688&-1)|0]&1)==0){a8=+h[64672+(ac*688&-1)>>3];a9=at}else{ap=+_(+at);at=+h[64800+(ac*688&-1)>>3];a8=+_(+(+h[64672+(ac*688&-1)>>3]))/at;a9=ap/at}at=+h[64664+(H*688&-1)>>3];if((a[64788+(H*688&-1)|0]&1)==0){ba=+h[64672+(H*688&-1)>>3];bb=at}else{ap=+_(+at);at=+h[64800+(H*688&-1)>>3];ba=+_(+(+h[64672+(H*688&-1)>>3]))/at;bb=ap/at}if((C|0)<=0){break}H=m-1|0;at=+(m|0);ap=4.0/(at*3.0);av=ba;aq=bb;Y=a8;aw=a9;ac=0;S=C;while(1){C=S-1|0;P=c[e>>2]|0;aU=0.0;as=0.0;au=1.7976931348623157e+308;aT=-1.7976931348623157e+308;N=0;do{aW=+h[P+(N+B<<6)+8>>3];aU=aU+aW;as=as+aW*aW;au=aWaT?aW:aT;N=N+1|0;}while(N>>>0<=H>>>0);aW=aU/at;aX=+Q(+(as/at-aW*aW));aW=aX*+R(+ap,.2);aX=au+(aT-au)*(+(ac|0)/+(C|0));aV=0.0;N=0;do{K=N+B|0;bc=+h[P+(K<<6)+24>>3];bd=bc>0.0?bc:aW;bc=(aX- +h[P+(K<<6)+8>>3])/bd;be=+h[P+(K<<6)+16>>3];aV=aV+be*+Z(+(bc*bc*-.5))/bd;N=N+1|0;}while(N>>>0<=H>>>0);aW=aV/2.5066282746310002;N=ac+ae|0;P=k+(N<<6)|0;c[P>>2]=0;h[k+(N<<6)+8>>3]=aX;if(aX>2]&1|0)==0){bf=aw;E=872}else{bg=aX;E=870}}else{bg=aw;E=870}L1205:do{if((E|0)==870){E=0;if(aX>Y){if((c[64648+((c[200]|0)*688&-1)>>2]&2|0)==0){bf=bg;E=872;break}else{bh=aX}}else{bh=Y}h[k+(N<<6)+16>>3]=aW;do{if(aW>2]&1|0)!=0){bi=aW;break}c[P>>2]=1;bj=aq;bk=av;bl=bh;bm=bg;break L1205}else{bi=aq}}while(0);if(aW<=av){bj=bi;bk=av;bl=bh;bm=bg;break}if((c[64648+((c[144]|0)*688&-1)>>2]&2|0)!=0){bj=bi;bk=aW;bl=bh;bm=bg;break}c[P>>2]=1;bj=bi;bk=av;bl=bh;bm=bg}}while(0);if((E|0)==872){E=0;c[P>>2]=1;h[k+(N<<6)+16>>3]=aW;bj=aq;bk=av;bl=Y;bm=bf}h[k+(N<<6)+56>>3]=aX;h[k+(N<<6)+48>>3]=aX;h[k+(N<<6)+40>>3]=aW;h[k+(N<<6)+32>>3]=aW;h[k+(N<<6)+24>>3]=-1.0;U=ac+1|0;A=c[6352]|0;if((U|0)<(A|0)){av=bk;aq=bj;Y=bl;aw=bm;ac=U;S=A}else{break}}if(bl>a8){S=c[200]|0;if((a[64788+(S*688&-1)|0]&1)==0){bn=bl}else{bn=+Z(+(bl*+h[64800+(S*688&-1)>>3]))}h[64672+(S*688&-1)>>3]=bn}if(bm>3]))}h[64664+(S*688&-1)>>3]=bo}if(bk>ba){S=c[144]|0;if((a[64788+(S*688&-1)|0]&1)==0){bp=bk}else{bp=+Z(+(bk*+h[64800+(S*688&-1)>>3]))}h[64672+(S*688&-1)>>3]=bp}if(bj>=bb){break}S=c[144]|0;if((a[64788+(S*688&-1)|0]&1)==0){bq=bj}else{bq=+Z(+(bj*+h[64800+(S*688&-1)>>3]))}h[64664+(S*688&-1)>>3]=bq}}while(0);m=l+1|0;c[k+(aa((c[6352]|0)+1|0,m)-1<<6)>>2]=2;if((m|0)<(j|0)){n=D;l=m}else{E=905;break}}if((E|0)==727){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=163872,v)|0)}else if((E|0)==729){uf(c[b+4>>2]|0,136680,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((E|0)==733){uf(c[b+4>>2]|0,123304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((E|0)==736){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=106104,v)|0)}else if((E|0)==673){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=106104,v)|0)}else if((E|0)==676){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=98688,v)|0)}else if((E|0)==739){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=98688,v)|0)}else if((E|0)==742){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=93064,v)|0)}else if((E|0)==745){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=85160,v)|0)}else if((E|0)==748){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=77016,v)|0)}else if((E|0)==751){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=224768,v)|0)}else if((E|0)==688){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=224768,v)|0)}else if((E|0)==679){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=93064,v)|0)}else if((E|0)==682){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=85160,v)|0)}else if((E|0)==685){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=77016,v)|0)}else if((E|0)==667){uf(c[b+4>>2]|0,202432,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((E|0)==670){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=163872,v)|0)}else if((E|0)==780){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=211832,v)|0)}else if((E|0)==782){uu(ar);uu(T);uu(O);uu(M);uu(J);uu(V);uu(X);br=b+4|0;bs=c[br>>2]|0;uf(bs,217416,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((E|0)==784){uu(ar);uu(T);uu(O);uu(M);uu(J);uu(V);uu(X);br=b+4|0;bs=c[br>>2]|0;uf(bs,217416,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((E|0)==787){uu(ar);uu(T);uu(O);uu(M);uu(J);uu(V);uu(X);br=b+4|0;bs=c[br>>2]|0;uf(bs,217416,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((E|0)==808){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=217128,v)|0)}else if((E|0)==898){uu(aF);uu(aE);uu(aD);uu(aC);uu(aG);uu(aH);bt=b+4|0;bu=c[bt>>2]|0;uf(bu,196920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((E|0)==899){uu(aF);uu(aE);uu(aD);uu(aC);uu(aG);uu(aH);bt=b+4|0;bu=c[bt>>2]|0;uf(bu,196920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((E|0)==900){uu(aF);uu(aE);uu(aD);uu(aC);uu(aG);uu(aH);bt=b+4|0;bu=c[bt>>2]|0;uf(bu,196920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((E|0)==905){r=c[e>>2]|0;s=r;uu(s);c[e>>2]=k;t=c[6352]|0;u=t+1|0;w=aa(u,j);x=b+296|0;c[x>>2]=w;y=w-1|0;c[f>>2]=y;i=d;return}}function hm(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0;c=+h[a+8>>3];d=+h[b+8>>3];if(c>d){e=1;return e|0}e=(c>31;return e|0}function hn(b){b=b|0;var d=0,e=0,f=0,g=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0,I=0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0,R=0,S=0,T=0.0,U=0,V=0.0,W=0.0,X=0.0,Y=0.0,_=0,$=0,aa=0.0,ab=0.0,ac=0.0,ad=0,ae=0.0,af=0.0,ag=0.0,ah=0.0;c[200]=c[b+304>>2];c[144]=c[b+308>>2];d=b+320|0;e=b+300|0;f=b+284|0;g=0;i=0.0;j=0.0;k=0.0;l=0.0;m=0.0;n=0.0;o=0.0;p=0;q=0;while(1){r=c[e>>2]|0;L1281:do{if((q|0)<(r|0)){s=c[d>>2]|0;t=q;while(1){if((c[s+(t<<6)>>2]|0)!=2){u=t;break L1281}v=t+1|0;if((v|0)<(r|0)){t=v}else{u=v;break}}}else{u=q}}while(0);t=0;while(1){w=t+u|0;if((w|0)>=(r|0)){break}if((c[(c[d>>2]|0)+(w<<6)>>2]|0)==2){break}else{t=t+1|0}}if((t|0)>0){x=u;y=p;z=0;A=o;B=n;C=m;D=l;E=k;F=j;G=i;H=g}else{break}while(1){r=c[d>>2]|0;s=c[r+(x<<6)>>2]|0;do{if((s|0)==2){I=H;J=G;K=F;L=E;M=D;N=C;O=B;P=A;Q=z;R=y;S=x}else{T=+h[r+(x<<6)+8>>3];if((z|0)==0){I=(s|0)==0;J=+h[r+(x<<6)+24>>3];K=+h[r+(x<<6)+32>>3];L=+h[r+(x<<6)+40>>3];M=+h[r+(x<<6)+48>>3];N=+h[r+(x<<6)+56>>3];O=+h[r+(x<<6)+16>>3];P=T;Q=1;R=y;S=x;break}if(T==A){I=(s|0)==0&H;J=G+ +h[r+(x<<6)+24>>3];K=F+ +h[r+(x<<6)+32>>3];L=E+ +h[r+(x<<6)+40>>3];M=D+ +h[r+(x<<6)+48>>3];N=C+ +h[r+(x<<6)+56>>3];O=B+ +h[r+(x<<6)+16>>3];P=A;Q=z+1|0;R=y;S=x;break}h[r+(y<<6)+8>>3]=A;v=c[f>>2]|0;if((v|0)==6|(v|0)==7|(v|0)==9){U=1}else{U=z}T=+(U|0);V=B/T;h[(c[d>>2]|0)+(y<<6)+16>>3]=V;h[(c[d>>2]|0)+(y<<6)+56>>3]=C/T;h[(c[d>>2]|0)+(y<<6)+48>>3]=D/T;h[(c[d>>2]|0)+(y<<6)+40>>3]=E/T;h[(c[d>>2]|0)+(y<<6)+32>>3]=F/T;h[(c[d>>2]|0)+(y<<6)+24>>3]=G/T;c[(c[d>>2]|0)+(y<<6)>>2]=0;L1304:do{if(H){W=V;X=A}else{v=c[200]|0;do{if((a[64788+(v*688&-1)|0]&1)==0){Y=A}else{if(A>-8.988465674311579e+307){Y=+Z(+(A*+h[64800+(v*688&-1)>>3]));break}else{c[(c[d>>2]|0)+(y<<6)>>2]=1;W=V;X=A;break L1304}}}while(0);if(Y<+h[64664+(v*688&-1)>>3]){if((c[64648+(v*688&-1)>>2]&1|0)!=0){_=934}}else{_=934}do{if((_|0)==934){_=0;if(Y>+h[64672+(v*688&-1)>>3]){if((c[64648+(v*688&-1)>>2]&2|0)==0){break}}$=c[144]|0;do{if((a[64788+($*688&-1)|0]&1)==0){aa=V}else{if(V>-8.988465674311579e+307){aa=+Z(+(V*+h[64800+($*688&-1)>>3]));break}else{c[(c[d>>2]|0)+(y<<6)>>2]=1;W=V;X=Y;break L1304}}}while(0);if(aa<+h[64664+($*688&-1)>>3]){if((c[64648+($*688&-1)>>2]&1|0)!=0){_=943}}else{_=943}if((_|0)==943){_=0;if(aa<=+h[64672+($*688&-1)>>3]){W=aa;X=Y;break L1304}if((c[64648+($*688&-1)>>2]&2|0)!=0){W=aa;X=Y;break L1304}}c[(c[d>>2]|0)+(y<<6)>>2]=1;W=aa;X=Y;break L1304}}while(0);c[(c[d>>2]|0)+(y<<6)>>2]=1;W=V;X=Y}}while(0);I=H;J=G;K=F;L=E;M=D;N=C;O=W;P=X;Q=0;R=y+1|0;S=x-1|0}}while(0);r=S+1|0;if((r|0)<(w|0)){x=r;y=R;z=Q;A=P;B=O;C=N;D=M;E=L;F=K;G=J;H=I}else{break}}if((Q|0)==0){ab=O;ac=P;ad=R}else{h[(c[d>>2]|0)+(R<<6)+8>>3]=P;V=((c[f>>2]|0)-6|0)>>>0<2?1.0:+(Q|0);T=O/V;h[(c[d>>2]|0)+(R<<6)+16>>3]=T;h[(c[d>>2]|0)+(R<<6)+56>>3]=N/V;h[(c[d>>2]|0)+(R<<6)+48>>3]=M/V;h[(c[d>>2]|0)+(R<<6)+40>>3]=L/V;h[(c[d>>2]|0)+(R<<6)+32>>3]=K/V;h[(c[d>>2]|0)+(R<<6)+24>>3]=J/V;c[(c[d>>2]|0)+(R<<6)>>2]=0;L1337:do{if(I){ae=T;af=P}else{t=c[200]|0;do{if((a[64788+(t*688&-1)|0]&1)==0){ag=P}else{if(P>-8.988465674311579e+307){ag=+Z(+(P*+h[64800+(t*688&-1)>>3]));break}else{c[(c[d>>2]|0)+(R<<6)>>2]=1;ae=T;af=P;break L1337}}}while(0);if(ag<+h[64664+(t*688&-1)>>3]){if((c[64648+(t*688&-1)>>2]&1|0)!=0){_=956}}else{_=956}do{if((_|0)==956){_=0;if(ag>+h[64672+(t*688&-1)>>3]){if((c[64648+(t*688&-1)>>2]&2|0)==0){break}}r=c[144]|0;do{if((a[64788+(r*688&-1)|0]&1)==0){ah=T}else{if(T>-8.988465674311579e+307){ah=+Z(+(T*+h[64800+(r*688&-1)>>3]));break}else{c[(c[d>>2]|0)+(R<<6)>>2]=1;ae=T;af=ag;break L1337}}}while(0);if(ah<+h[64664+(r*688&-1)>>3]){if((c[64648+(r*688&-1)>>2]&1|0)!=0){_=965}}else{_=965}if((_|0)==965){_=0;if(ah<=+h[64672+(r*688&-1)>>3]){ae=ah;af=ag;break L1337}if((c[64648+(r*688&-1)>>2]&2|0)!=0){ae=ah;af=ag;break L1337}}c[(c[d>>2]|0)+(R<<6)>>2]=1;ae=ah;af=ag;break L1337}}while(0);c[(c[d>>2]|0)+(R<<6)>>2]=1;ae=T;af=ag}}while(0);ab=ae;ac=af;ad=R+1|0}if((ad|0)>=(c[e>>2]|0)){g=I;i=J;j=K;k=L;l=M;m=N;n=ab;o=ac;p=ad;q=w;continue}c[(c[d>>2]|0)+(ad<<6)>>2]=2;g=I;i=J;j=K;k=L;l=M;m=N;n=ab;o=ac;p=ad+1|0;q=w}c[e>>2]=p;iR(b,p);return}function ho(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0,Q=0.0,R=0.0,S=0.0,T=0.0;j=i;k=c[b+304>>2]|0;c[200]=k;l=c[b+308>>2]|0;c[144]=l;m=+h[64664+(k*688&-1)>>3];if((a[64788+(k*688&-1)|0]&1)==0){n=+h[64672+(k*688&-1)>>3];o=m}else{p=+_(+m);m=+h[64800+(k*688&-1)>>3];n=+_(+(+h[64672+(k*688&-1)>>3]))/m;o=p/m}m=+h[64664+(l*688&-1)>>3];if((a[64788+(l*688&-1)|0]&1)==0){q=+h[64672+(l*688&-1)>>3];r=m}else{p=+_(+m);m=+h[64800+(l*688&-1)>>3];q=+_(+(+h[64672+(l*688&-1)>>3]))/m;r=p/m}l=c[b+320>>2]|0;m=+h[l+(e<<6)+8>>3];p=m>o?m:o;m=+h[l+((e-1|0)+f<<6)+8>>3];s=m=s){uf(c[b+4>>2]|0,205704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}b=c[6352]|0;m=(s-p)/+(b-1|0);if((b|0)<=0){i=j;return}b=f-2|0;s=r-(q-r);t=n;u=r;w=q;x=o;f=0;k=0;while(1){y=p+m*+(k|0);z=f;while(1){A=z+1|0;if(y>=+h[l+(A+e<<6)+8>>3]&(z|0)<(b|0)){z=A}else{break}}A=c[200]|0;if((a[64788+(A*688&-1)|0]&1)==0){B=+h[l+(z+e<<6)+8>>3];C=y}else{D=+Z(+(y*+h[64800+(A*688&-1)>>3]));B=+Z(+(+h[l+(z+e<<6)+8>>3]*+h[64800+(A*688&-1)>>3]));C=D}D=C-B;E=+h[d+(z<<5)>>3]+D*(+h[d+(z<<5)+8>>3]+D*(+h[d+(z<<5)+24>>3]*D+ +h[d+(z<<5)+16>>3]));A=c[144]|0;do{if((a[64788+(A*688&-1)|0]&1)==0){F=E}else{if(E<=0.0){F=s;break}D=+_(+E);F=D/+h[64800+(A*688&-1)>>3]}}while(0);A=g+(k<<6)|0;c[A>>2]=0;h[g+(k<<6)+8>>3]=y;do{if(y>2]&1|0)!=0){G=y;H=993;break}I=x;H=996}else{G=x;H=993}}while(0);L1400:do{if((H|0)==993){H=0;do{if(y>t){if((c[64648+((c[200]|0)*688&-1)>>2]&2|0)!=0){J=y;break}I=G;H=996;break L1400}else{J=t}}while(0);h[g+(k<<6)+16>>3]=F;do{if(F>2]&1|0)!=0){K=F;break}c[A>>2]=1;L=w;M=u;N=J;O=G;break L1400}else{K=u}}while(0);if(F<=w){L=w;M=K;N=J;O=G;break}if((c[64648+((c[144]|0)*688&-1)>>2]&2|0)!=0){L=F;M=K;N=J;O=G;break}c[A>>2]=1;L=w;M=K;N=J;O=G}}while(0);if((H|0)==996){H=0;c[A>>2]=1;h[g+(k<<6)+16>>3]=F;L=w;M=u;N=t;O=I}h[g+(k<<6)+56>>3]=y;h[g+(k<<6)+48>>3]=y;h[g+(k<<6)+40>>3]=F;h[g+(k<<6)+32>>3]=F;h[g+(k<<6)+24>>3]=-1.0;P=k+1|0;if((P|0)<(c[6352]|0)){t=N;u=M;w=L;x=O;f=z;k=P}else{break}}if(N>n){k=c[200]|0;if((a[64788+(k*688&-1)|0]&1)==0){Q=N}else{Q=+Z(+(N*+h[64800+(k*688&-1)>>3]))}h[64672+(k*688&-1)>>3]=Q}if(O>3]))}h[64664+(k*688&-1)>>3]=R}if(L>q){k=c[144]|0;if((a[64788+(k*688&-1)|0]&1)==0){S=L}else{S=+Z(+(L*+h[64800+(k*688&-1)>>3]))}h[64672+(k*688&-1)>>3]=S}if(M>=r){i=j;return}k=c[144]|0;if((a[64788+(k*688&-1)|0]&1)==0){T=M}else{T=+Z(+(M*+h[64800+(k*688&-1)>>3]))}h[64664+(k*688&-1)>>3]=T;i=j;return}function hp(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;if((a|0)<1|(b|0)<1){e=0;i=d;return e|0}f=a<<2;g=ut(f)|0;do{if((g|0)==0){gk();h=ut(f)|0;if((h|0)!=0){j=h;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=217072,v)|0);return 0}else{j=g}}while(0);g=j;j=aa(a<<3,b);f=ut(j)|0;do{if((f|0)==0){gk();h=ut(j)|0;if((h|0)!=0){k=h;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=163832,v)|0);return 0}else{k=f}}while(0);f=k;c[g>>2]=f;if((a|0)>1){l=1;m=f}else{e=g;i=d;return e|0}while(1){f=m+(b<<3)|0;c[g+(l<<2)>>2]=f;k=l+1|0;if((k|0)<(a|0)){l=k;m=f}else{e=g;break}}i=d;return e|0}function hq(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,l=0.0,m=0,n=0.0,o=0,p=0,q=0.0,r=0,s=0,t=0.0,u=0,v=0,w=0,x=0.0;f=(b|0)>0;if(f){g=-1;i=0;j=a}else{return}while(1){k=e+(c[d+(i<<2)>>2]<<3)|0;l=+h[k>>3];m=e+(i<<3)|0;h[k>>3]=+h[m>>3];do{if((g|0)>-1){k=i-1|0;if((g|0)>(k|0)){n=l;o=g;break}p=g;q=l;r=e+(g<<3)|0;s=(c[j>>2]|0)+(g<<3)|0;while(1){t=q- +h[s>>3]*+h[r>>3];u=p+1|0;if((u|0)>(k|0)){n=t;o=g;break}else{p=u;q=t;r=r+8|0;s=s+8|0}}}else{if(l==0.0){n=l;o=g;break}n=l;o=i}}while(0);h[m>>3]=n;s=i+1|0;if((s|0)<(b|0)){g=o;i=s;j=j+4|0}else{break}}if(f){v=a+(b<<2)|0;w=b}else{return}while(1){a=v-4|0;f=w-1|0;j=e+(f<<3)|0;L1476:do{if((w|0)<(b|0)){i=w;o=e+(w<<3)|0;g=(c[a>>2]|0)+(w<<3)|0;n=+h[j>>3];while(1){l=n- +h[g>>3]*+h[o>>3];h[j>>3]=l;d=i+1|0;if((d|0)>=(b|0)){x=l;break L1476}i=d;o=o+8|0;g=g+8|0;n=l}}else{x=+h[j>>3]}}while(0);h[j>>3]=x/+h[(c[a>>2]|0)+(f<<3)>>3];if((f|0)>0){v=a;w=f}else{break}}return}function hr(a,b,d,e,f,g,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0,J=0,K=0.0,L=0.0,M=0.0,N=0.0;k=i;l=(g|0)>0;L1485:do{if(l){m=(b|0)==0;n=0;L1487:while(1){o=n+1|0;if((o|0)<(f|0)){p=a+(n<<2)|0;q=(o|0)<(g|0);r=b+(n<<3)|0;s=o;do{t=a+(s<<2)|0;u=+h[(c[t>>2]|0)+(n<<3)>>3];do{if(u!=0.0){w=(c[p>>2]|0)+(n<<3)|0;x=+h[w>>3];y=+P(+x);do{if(y<+P(+u)*2.220446049250313e-16){z=1.0;A=1.0;B=0.0;C=-0.0-u}else{if(x>0.0){D=1.0}else{D=+((x<0.0)<<31>>31|0)}E=D*+Q(+(x*x+u*u));if(E==0.0){break L1487}F=x/E;G=(-0.0-u)/E;if(+P(+G)0.0){H=1.0}else{H=+((G<0.0)<<31>>31|0)}z=H/F;A=G;B=F;C=E}}while(0);h[w>>3]=C;h[(c[t>>2]|0)+(n<<3)>>3]=z;if(q){I=o;do{y=+h[(c[p>>2]|0)+(I<<3)>>3];J=(c[t>>2]|0)+(I<<3)|0;E=+h[J>>3];h[J>>3]=A*y+B*E;h[(c[p>>2]|0)+(I<<3)>>3]=B*y-A*E;I=I+1|0;}while((I|0)<(g|0))}if(m){break}E=+h[r>>3];I=b+(s<<3)|0;y=+h[I>>3];h[I>>3]=A*E+B*y;h[r>>3]=B*E-A*y}}while(0);s=s+1|0;}while((s|0)<(f|0))}if((o|0)<(g|0)){n=o}else{break L1485}}be(42289,136640,(v=i,i=i+16|0,h[v>>3]=x,h[v+8>>3]=u,v)|0);fb()}}while(0);if((b|0)==0){i=k;return}n=g-1|0;L1519:do{if(l){m=n;while(1){u=+h[b+(m<<3)>>3];h[e+(m<<3)>>3]=0.0;s=m+1|0;r=c[a+(m<<2)>>2]|0;if((s|0)<(g|0)){x=u;p=s;while(1){A=x+ +h[r+(p<<3)>>3]*+h[d+(p<<3)>>3];s=p+1|0;if((s|0)<(g|0)){x=A;p=s}else{K=A;break}}}else{K=u}x=+h[r+(m<<3)>>3];if(x==0.0){break}h[d+(m<<3)>>3]=(-0.0-K)/x;if((m|0)>0){m=m-1|0}else{break L1519}}uD(42289,123272,28);fb()}}while(0);if((g|0)<(f|0)){d=g;do{h[e+(d<<3)>>3]=+h[b+(d<<3)>>3];d=d+1|0;}while((d|0)<(f|0))}if((j|0)==0|l^1){i=k;return}l=(f|0)>0;j=n;while(1){if(l){n=e+(j<<3)|0;d=f;do{d=d-1|0;K=+h[(c[a+(d<<2)>>2]|0)+(j<<3)>>3];do{if(K==1.0){L=1.0;M=0.0}else{x=+P(+K);if(x<1.0){L=K;M=+Q(+(1.0-K*K));break}A=1.0/x;if(K>0.0){N=1.0}else{N=+((K<0.0)<<31>>31|0)}L=N*+Q(+(1.0-A*A));M=A}}while(0);K=+h[n>>3];r=e+(d<<3)|0;u=+h[r>>3];h[r>>3]=K*(-0.0-L)+M*u;h[n>>3]=M*K+L*u;}while((d|0)>0)}if((j|0)>0){j=j-1|0}else{break}}i=k;return}function hs(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0;e=0;while(1){if((e|0)>=(d|0)){break}f=b+(e<<2)|0;g=c[f>>2]|0;if((e|0)>0){i=0;j=g;while(1){h[j+(i<<3)>>3]=0.0;k=i+1|0;l=c[f>>2]|0;if((k|0)<(e|0)){i=k;j=l}else{m=l;break}}}else{m=g}h[m+(e<<3)>>3]=1.0;if(+h[(c[a+(e<<2)>>2]|0)+(e<<3)>>3]!=0.0){e=e+1|0}else{n=1108;break}}if((n|0)==1108){uD(42289,106064,30);fb()}n=(d|0)>0;if(n){o=0}else{return}do{e=o;do{m=(c[b+(e<<2)>>2]|0)+(o<<3)|0;p=+h[m>>3];if((o|0)<(e|0)){j=o;q=p;while(1){r=q- +h[(c[a+(j<<2)>>2]|0)+(e<<3)>>3]*+h[(c[b+(j<<2)>>2]|0)+(o<<3)>>3];i=j+1|0;if((i|0)<(e|0)){j=i;q=r}else{s=r;break}}}else{s=p}h[m>>3]=s/+h[(c[a+(e<<2)>>2]|0)+(e<<3)>>3];e=e+1|0;}while((e|0)<(d|0));o=o+1|0;}while((o|0)<(d|0));if(!n){return}n=d-1|0;o=0;do{if((n|0)>=(o|0)){e=d;g=n;while(1){j=(c[b+(g<<2)>>2]|0)+(o<<3)|0;s=+h[j>>3];i=c[a+(g<<2)>>2]|0;if((e|0)<(d|0)){f=e;q=s;while(1){r=q- +h[i+(f<<3)>>3]*+h[(c[b+(f<<2)>>2]|0)+(o<<3)>>3];l=f+1|0;if((l|0)<(d|0)){f=l;q=r}else{t=r;break}}}else{t=s}h[j>>3]=t/+h[i+(g<<3)>>3];f=g-1|0;if((f|0)<(o|0)){break}else{e=g;g=f}}}o=o+1|0;}while((o|0)<(d|0));return}function ht(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0,t=0.0,u=0,w=0,x=0,y=0,z=0.0,A=0,B=0,C=0,D=0.0,E=0,F=0.0,G=0,H=0,I=0;f=i;if((b|0)<1){h[e>>3]=1.0;g=0;j=g;uu(j);i=f;return}k=b<<3;l=ut(k)|0;do{if((l|0)==0){gk();m=ut(k)|0;if((m|0)!=0){n=m;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0)}else{n=l}}while(0);l=n;h[e>>3]=1.0;n=a+(b<<2)|0;k=a;m=l;while(1){o=c[k>>2]|0;p=o+(b<<3)|0;q=o;r=0.0;L1601:while(1){o=q;while(1){if(o>>>0>=p>>>0){break L1601}s=o+8|0;t=+P(+(+h[o>>3]));if(t>r){q=s;r=t;continue L1601}else{o=s}}}if(r==0.0){u=1137;break}h[m>>3]=1.0/r;q=k+4|0;if(q>>>0>>0){k=q;m=m+8|0}else{break}}if((u|0)==1137){uf(-1,98640,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}u=b-1|0;m=a;k=0;n=-1;while(1){q=(k|0)>0;if(q){p=0;do{o=a+(p<<2)|0;s=c[o>>2]|0;w=s+(k<<3)|0;L1616:do{if((p|0)>0){x=0;t=+h[w>>3];y=s;while(1){z=t- +h[y+(x<<3)>>3]*+h[(c[a+(x<<2)>>2]|0)+(k<<3)>>3];h[w>>3]=z;A=x+1|0;if((A|0)>=(p|0)){break L1616}x=A;t=z;y=c[o>>2]|0}}}while(0);p=p+1|0;}while((p|0)<(k|0))}p=l+(k<<3)|0;r=0.0;o=p;w=n;s=k;while(1){y=a+(s<<2)|0;x=c[y>>2]|0;A=x+(k<<3)|0;t=+h[A>>3];L1625:do{if(q){B=0;z=t;C=x;while(1){D=z- +h[C+(B<<3)>>3]*+h[(c[a+(B<<2)>>2]|0)+(k<<3)>>3];h[A>>3]=D;E=B+1|0;if((E|0)>=(k|0)){F=D;break L1625}B=E;z=D;C=c[y>>2]|0}}else{F=t}}while(0);t=+h[o>>3];z=t*+P(+F);y=z>2]|0;o=c[m>>2]|0;while(1){r=+h[w>>3];h[w>>3]=+h[o>>3];h[o>>3]=r;q=s+1|0;if((q|0)<(b|0)){s=q;w=w+8|0;o=o+8|0}else{break}}h[e>>3]=-0.0- +h[e>>3];h[l+(G<<3)>>3]=+h[p>>3]}c[d+(k<<2)>>2]=G;o=(c[m>>2]|0)+(k<<3)|0;if(+h[o>>3]==0.0){h[o>>3]=1.0e-30}do{if((k|0)==(u|0)){H=k+1|0}else{r=1.0/+h[(c[m>>2]|0)+(k<<3)>>3];o=k+1|0;if((o|0)<(b|0)){I=o}else{H=o;break}while(1){w=(c[a+(I<<2)>>2]|0)+(k<<3)|0;h[w>>3]=r*+h[w>>3];w=I+1|0;if((w|0)<(b|0)){I=w}else{H=o;break}}}}while(0);if((H|0)<(b|0)){m=m+4|0;k=H;n=G}else{g=l;break}}j=g;uu(j);i=f;return}function hu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;d=ut(16)|0;do{if((d|0)==0){gk();e=ut(16)|0;if((e|0)!=0){f=e;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=213800,v)|0);return 0}else{f=d}}while(0);d=f;c[f+4>>2]=(a|0)<0?0:a;c[f+8>>2]=0;if((a|0)<=0){c[f+12>>2]=0;g=f;c[g>>2]=0;i=b;return d|0}e=a<<6;a=ut(e)|0;do{if((a|0)==0){gk();h=ut(e)|0;if((h|0)!=0){j=h;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=217008,v)|0);return 0}else{j=a}}while(0);c[f+12>>2]=j;uE(j|0,0,e|0);g=f;c[g>>2]=0;i=b;return d|0}function hv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;e=a+4|0;if((c[e>>2]|0)==(b|0)){i=d;return}f=a+12|0;a=c[f>>2]|0;g=(a|0)==0;if((b|0)<=0){if(!g){uu(a)}c[f>>2]=0;c[e>>2]=0;i=d;return}do{if(g){h=b<<6;j=ut(h)|0;if((j|0)!=0){k=j;break}gk();j=ut(h)|0;if((j|0)!=0){k=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=217008,v)|0)}else{k=db(a,b<<6,214200)|0}}while(0);a=k;c[f>>2]=a;f=c[e>>2]|0;if((f|0)<(b|0)){uE(a+(f<<6)|0,0,b-f<<6|0)}c[e>>2]=b;i=d;return}function hw(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0;f=i;hx(b,d,0);a[46896]=e&1;if((b|0)==0){uj(-1,76976,(v=i,i=i+16|0,c[v>>2]=e?224760:217408,c[v+8>>2]=d,v)|0)}if((c[o>>2]|0)==(b|0)){a[37400]=1;do{}while((dI()|0)==0);g=hy()|0;i=f;return}c[13896]=0;if(e){c[13896]=0;d=c[13898]|0;h=c[8272]|0;L1694:do{if((d|0)<(h|0)){j=d;k=h;while(1){l=c[1054]|0;m=(a[l+(j*40&-1)|0]&1)==0;L1697:do{if(!m){n=c[l+(j*40&-1)+36>>2]|0;p=l+(j*40&-1)+32|0;q=c[10036]|0;r=0;while(1){if((r|0)>=(n|0)){break}if((a[q+((c[p>>2]|0)+r|0)|0]|0)==(a[r+103664|0]|0)){r=r+1|0}else{break L1697}}if((r|0)==1){s=k;t=j;break L1694}}}while(0);p=c[13896]|0;if((p|0)>=10){s=k;t=j;break L1694}do{if(m){c[13896]=p+1;u=55544+(p<<2)|0;w=l+(j*40&-1)+32|0;x=1212}else{q=l+(j*40&-1)+32|0;n=a[(c[10036]|0)+(c[q>>2]|0)|0]|0;if(n<<24>>24==39){c[13896]=p+1;y=55544+(p<<2)|0}else{c[13896]=p+1;z=55544+(p<<2)|0;if(n<<24>>24==34){y=z}else{u=z;w=q;x=1212;break}}ub(y,j,j)}}while(0);if((x|0)==1212){x=0;p=c[l+(j*40&-1)+36>>2]|0;m=p+(c[w>>2]|0)|0;q=db(c[u>>2]|0,p+1|0,116456)|0;c[u>>2]=q;p=c[(c[1054]|0)+(j*40&-1)+32>>2]|0;L1714:do{if((p|0)<(m|0)){z=p;n=q;while(1){A=a[(c[10036]|0)+z|0]|0;if(A<<24>>24==0){B=n;break L1714}C=n+1|0;a[n]=A;A=z+1|0;if((A|0)<(m|0)){z=A;n=C}else{B=C;break}}}else{B=q}}while(0);a[B]=0}q=(c[13898]|0)+1|0;c[13898]=q;m=c[8272]|0;if((q|0)<(m|0)){j=q;k=m}else{s=m;t=q;break}}}else{s=h;t=d}}while(0);do{if((t|0)<(s|0)){d=c[1054]|0;if((a[d+(t*40&-1)|0]&1)==0){D=t+1|0;c[13898]=D;uf(D,221400,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}h=c[d+(t*40&-1)+36>>2]|0;B=d+(t*40&-1)+32|0;d=c[10036]|0;u=0;while(1){if((u|0)>=(h|0)){break}if((a[d+((c[B>>2]|0)+u|0)|0]|0)==(a[u+103664|0]|0)){u=u+1|0}else{x=1274;break}}if((x|0)==1274){D=t+1|0;c[13898]=D;uf(D,221400,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((u|0)==1){break}D=t+1|0;c[13898]=D;uf(D,221400,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[(c[8804]|0)+44>>2]=t}c[9354]=0;a[37400]=0;L1735:while(1){t=0;D=c[10034]|0;s=c[10036]|0;L1737:while(1){if((a6(s+t|0,D|0,b|0)|0)==0){x=1228;break}c[9354]=(c[9354]|0)+1;B=c[10036]|0;d=uA(B|0)|0;h=d-1|0;w=B+h|0;B=a[w]|0;do{if(B<<24>>24==10){a[w]=0;y=(h|0)>0?d-2|0:h;k=(c[10036]|0)+y|0;j=a[k]|0;if(j<<24>>24!=13){E=y;F=j;x=1234;break}a[k]=0;k=(((y|0)>0)<<31>>31)+y|0;E=k;F=a[(c[10036]|0)+k|0]|0;x=1234}else{if((d+1|0)<(D|0)){E=h;F=B;x=1234;break}dG();G=((1-d|0)-1|0)+(c[10034]|0)|0;H=d}}while(0);do{if((x|0)==1234){x=0;if(F<<24>>24==92){G=(c[10034]|0)-E|0;H=E;break}if((a[43472]&1)!=0){dK()}d=jl(40144,40136)|0;c[8272]=d;B=(c[10036]|0)+(c[(c[1054]|0)+(d*40&-1)+32>>2]|0)|0;if((a[B]|0)==35){a[B]=0}B=c[12918]|0;if((B|0)<0){x=1242;break L1735}if((B|0)<=0){x=1244;break L1737}if((E+4|0)>>>0>(c[10034]|0)>>>0){dG()}B=c[10036]|0;d=B+(uA(B|0)|0)|0;a[d]=a[125976]|0;a[d+1|0]=a[125977|0]|0;a[d+2|0]=a[125978|0]|0;d=uA(c[10036]|0)|0;G=(c[10034]|0)-d|0;H=d}}while(0);d=c[10036]|0;if(0){I=0;J=d;break}else{t=H;D=G;s=d}}if((x|0)==1244){x=0;I=0;J=c[10036]|0}else if((x|0)==1228){x=0;a[(c[10036]|0)+t|0]=0;I=1;J=c[10036]|0}if((a[J]|0)==0){K=I}else{if(e){s=bP(J|0)|0;a[c[10036]|0]=0;D=0;u=s;while(1){d=a[u]|0;if((d<<24>>24|0)==36){B=u+1|0;L=a[B]|0;do{if((L|0)==35){h=c[13896]|0;if(h>>>0>=10){x=1255;break L1735}be(43480,98608,(v=i,i=i+8|0,c[v>>2]=h,v)|0);M=43480}else if((L|0)==36){M=180784}else{h=L-48|0;if(h>>>0>=10){x=1260;break L1735}if((h|0)>=(c[13896]|0)){M=179864;break}M=c[55544+(h<<2)>>2]|0}}while(0);h=uA(M|0)|0;w=h+1|0;if(((c[10034]|0)-D|0)>>>0>>0){do{dG();}while(((c[10034]|0)-D|0)>>>0>>0)}w=(c[10036]|0)+D|0;uB(w|0,M|0);N=h+D|0;O=B}else if((d<<24>>24|0)==0){break}else{w=D+1|0;if(w>>>0>(c[10034]|0)>>>0){dG();P=a[u]|0}else{P=d}a[(c[10036]|0)+D|0]=P;N=w;O=u}D=N;u=O+1|0}if((D+1|0)>>>0>(c[10034]|0)>>>0){dG()}a[(c[10036]|0)+D|0]=0;uu(s)}a[25280]=0;K=(dJ()|0)==0?I:1}if((K|0)!=0){x=1276;break}}if((x|0)==1255){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=105968,v)|0)}else if((x|0)==1260){uf(-1,85080,(v=i,i=i+8|0,c[v>>2]=L,v)|0)}else if((x|0)==1242){uf(-1,211816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((x|0)==1276){g=hy()|0;i=f;return}}function hx(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;g=ut(96)|0;do{if((g|0)==0){gk();h=ut(96)|0;if((h|0)!=0){j=h;break}if((b|0)==0){k=c[13898]|0;uf(k,196888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}az(b|0);k=c[13898]|0;uf(k,196888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{j=g}}while(0);c[j>>2]=b;c[j+4>>2]=d;c[j+8>>2]=e;a[j+12|0]=a[37400]&1;c[j+16>>2]=c[9354];a[j+13|0]=a[46896]&1;c[j+52>>2]=c[13896];c[j+56>>2]=c[13886];c[13886]=0;c[j+60>>2]=c[13887];c[13887]=0;c[j+64>>2]=c[13888];c[13888]=0;c[j+68>>2]=c[13889];c[13889]=0;c[j+72>>2]=c[13890];c[13890]=0;c[j+76>>2]=c[13891];c[13891]=0;c[j+80>>2]=c[13892];c[13892]=0;c[j+84>>2]=c[13893];c[13893]=0;c[j+88>>2]=c[13894];c[13894]=0;c[j+92>>2]=c[13895];c[13895]=0;e=j;d=c[8804]|0;do{if((d|0)==0){c[j+20>>2]=0}else{b=(c[d+20>>2]|0)+1|0;c[j+20>>2]=b;if((b|0)<=250){break}uf(-1,185608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[j+24>>2]=c[9368];a[j+28|0]=a[37464]&1;a[j+29|0]=a[37480]&1;c[j+44>>2]=c[13898];c[j+40>>2]=c[8272];d=((c[8272]|0)*40&-1)+40|0;b=ut(d)|0;do{if((b|0)==0){gk();g=ut(d)|0;if((g|0)!=0){l=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=180384,v)|0)}else{l=b}}while(0);c[j+36>>2]=l;uD(l|0,c[1054]|0,((c[8272]|0)*40&-1)+40|0);l=c[10036]|0;if((l|0)==0){m=0;n=j+32|0;o=n;c[o>>2]=m;p=c[8804]|0;q=j+48|0;r=q;c[r>>2]=p;c[8804]=e;i=f;return}m=bP(l|0)|0;n=j+32|0;o=n;c[o>>2]=m;p=c[8804]|0;q=j+48|0;r=q;c[r>>2]=p;c[8804]=e;i=f;return}function hy(){var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=c[8804]|0;if((d|0)==0){e=0;i=b;return e|0}f=c[d>>2]|0;L1827:do{if(!((f|0)==0|(f|0)==(c[o>>2]|0))){g=c[d+4>>2]|0;do{if((g|0)!=0){if((a[g]|0)!=60){break}a2(f|0);break L1827}}while(0);az(f|0)}}while(0);f=c[13886]|0;if((f|0)!=0){uu(f)}c[13886]=c[d+56>>2];f=c[13887]|0;if((f|0)!=0){uu(f)}c[13887]=c[d+60>>2];f=c[13888]|0;if((f|0)!=0){uu(f)}c[13888]=c[d+64>>2];f=c[13889]|0;if((f|0)!=0){uu(f)}c[13889]=c[d+68>>2];f=c[13890]|0;if((f|0)!=0){uu(f)}c[13890]=c[d+72>>2];f=c[13891]|0;if((f|0)!=0){uu(f)}c[13891]=c[d+76>>2];f=c[13892]|0;if((f|0)!=0){uu(f)}c[13892]=c[d+80>>2];f=c[13893]|0;if((f|0)!=0){uu(f)}c[13893]=c[d+84>>2];f=c[13894]|0;if((f|0)!=0){uu(f)}c[13894]=c[d+88>>2];f=c[13895]|0;if((f|0)!=0){uu(f)}c[13895]=c[d+92>>2];c[13896]=c[d+52>>2];a[46896]=a[d+13|0]&1;a[37400]=a[d+12|0]&1;c[9354]=c[d+16>>2];c[9368]=c[d+24>>2];a[37480]=a[d+29|0]&1;a[37464]=a[d+28|0]&1;f=d+36|0;do{if((c[f>>2]|0)!=0){g=d+40|0;c[8272]=c[g>>2];c[13898]=c[d+44>>2];h=(c[g>>2]|0)+1|0;if((c[1052]|0)<(h|0)){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=202392,v)|0);return 0}else{uD(c[1054]|0,c[f>>2]|0,h*40&-1);uu(c[f>>2]|0);break}}}while(0);f=d+32|0;h=c[f>>2]|0;if((h|0)!=0){g=c[10036]|0;uB(g|0,h|0);uu(c[f>>2]|0)}uu(c[d+4>>2]|0);uu(c[d+8>>2]|0);c[8804]=c[d+48>>2];uu(d);e=1;i=b;return e|0}function hz(a){a=a|0;var b=0,d=0,e=0;b=i;if((c[3524]|0)==0){if((a|0)==0){i=b;return}d=c[m>>2]|0;aI(154728,34,1,d|0);i=b;return}uu(c[6958]|0);uu(c[6956]|0);d=c[c[3524]>>2]|0;if((d|0)==0){e=0}else{e=bP(d|0)|0}c[6958]=e;e=bP(13048)|0;c[6956]=e;if((a|0)==0){i=b;return}cf(c[m>>2]|0,164104,(v=i,i=i+16|0,c[v>>2]=c[6958],c[v+8>>2]=e,v)|0);i=b;return}function hA(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;L1890:do{if((a[b]|0)==60){if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}f=bt(b+1|0,193632)|0;if((f|0)==0){g=0}else{h=f;break}i=e;return g|0}else{f=bF(b|0,d|0)|0;if((f|0)==0){j=0}else{h=f;break}while(1){f=c[8776]|0;if((f|0)==0){break}k=c[8774]|0;do{if((k|0)==0){c[8774]=f;l=c[8778]|0;if((l|0)!=0){m=f;n=l;break}l=c[8780]|0;c[8778]=l;m=f;n=l}else{l=k+((uA(k|0)|0)+1|0)|0;c[8774]=l;m=l;n=c[8778]|0}}while(0);if(m>>>0>=n>>>0){o=1356;break}if((m|0)==0){break}k=uA(m|0)|0;p=db(j,(k+2|0)+(uA(b|0)|0)|0,172208)|0;uB(p|0,m|0);k=uA(p|0)|0;f=(k|0)==0?0:k-1|0;k=a[p+f|0]|0;if(!((k<<24>>24|0)==47|(k<<24>>24|0)==0)){a[p+(f+1|0)|0]=47;a[p+(f+2|0)|0]=0}uC(p|0,b|0);q=bF(p|0,d|0)|0;if((q|0)==0){j=p}else{o=1361;break}}if((o|0)==1356){c[8774]=0;c[8778]=0}else if((o|0)==1361){uu(p);f=c[8776]|0;if((f|0)==0){h=q;break}while(1){k=c[8774]|0;do{if((k|0)==0){c[8774]=f;l=c[8778]|0;if((l|0)!=0){r=f;s=l;break}l=c[8780]|0;c[8778]=l;r=f;s=l}else{l=k+((uA(k|0)|0)+1|0)|0;c[8774]=l;r=l;s=c[8778]|0}}while(0);if(r>>>0>=s>>>0){break}if((r|0)==0|(f|0)==0){h=q;break L1890}}c[8774]=0;c[8778]=0;h=q;break}if((j|0)==0){h=0;break}uu(j);h=0}}while(0);g=h;i=e;return g|0}function hB(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;if((a[b]|0)==60){uj(-1,168312,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}L1930:do{if((bF(b|0,193632)|0)==0){e=ur(8,0)|0;if((e|0)==0){f=0;break}else{g=e}while(1){h=bP(g|0)|0;e=h+((uA(h|0)|0)-1|0)|0;if((a[e]|0)==33){a[e]=0;j=1}else{j=0}k=hC(h,b,j)|0;if((k|0)!=0){break}uu(h);e=ur(8,0)|0;if((e|0)==0){f=0;break L1930}else{g=e}}do{}while((ur(8,0)|0)!=0);uu(h);f=k}else{if((b|0)==0){f=0;break}f=bP(b|0)|0}}while(0);i=d;return f|0}function hC(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+72|0;g=f|0;h=uA(b|0)|0;j=(h+2|0)+(uA(d|0)|0)|0;h=ut(j)|0;do{if((h|0)==0){gk();k=ut(j)|0;if((k|0)!=0){l=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=223784,v)|0);return 0}else{l=h}}while(0);uB(l|0,b|0);h=uA(l|0)|0;j=(h|0)==0?0:h-1|0;h=a[l+j|0]|0;if(!((h<<24>>24|0)==47|(h<<24>>24|0)==0)){a[l+(j+1|0)|0]=47;a[l+(j+2|0)|0]=0}uC(l|0,d|0);j=bF(l|0,193632)|0;if((j|0)!=0){az(j|0);m=l;i=f;return m|0}uu(l);if(!e){m=0;i=f;return m|0}e=aW(b|0)|0;if((e|0)==0){m=0;i=f;return m|0}l=a3(e|0)|0;L1962:do{if((l|0)==0){n=0}else{j=g+8|0;h=l;while(1){k=uA(b|0)|0;o=h+4|0;p=(k+2|0)+(uA(o|0)|0)|0;k=ut(p)|0;if((k|0)==0){gk();q=ut(p)|0;if((q|0)==0){break}else{r=q}}else{r=k}uB(r|0,b|0);k=uA(r|0)|0;q=(k|0)==0?0:k-1|0;k=a[r+q|0]|0;if(!((k<<24>>24|0)==47|(k<<24>>24|0)==0)){a[r+(q+1|0)|0]=47;a[r+(q+2|0)|0]=0}uC(r|0,o|0);cu(r|0,g|0);do{if((c[j>>2]&61440|0)==16384){if((aY(o|0,202200)|0)==0){break}if((aY(o|0,221856)|0)==0){break}q=hC(r,d,1)|0;if((q|0)!=0){n=q;break L1962}}}while(0);uu(r);o=a3(e|0)|0;if((o|0)==0){n=0;break L1962}else{h=o}}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=223216,v)|0);return 0}}while(0);bR(e|0);m=n;i=f;return m|0}function hD(){var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=c[6958]|0;if((d|0)==0){e=c[m>>2]|0;aI(145512,32,1,e|0);i=b;return}e=(uA(d|0)|0)+11|0;d=c[6956]|0;if((d|0)==0){f=e}else{g=d;while(1){d=a[g]|0;if((d<<24>>24|0)==92|(d<<24>>24|0)==10){a[g]=32}else if((d<<24>>24|0)==0){break}g=g+1|0}f=(uA(c[6956]|0)|0)+e|0}e=ut(f)|0;do{if((e|0)==0){gk();g=ut(f)|0;if((g|0)!=0){h=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=216216,v)|0)}else{h=e}}while(0);e=a[37400]&1;a[37400]=0;f=c[6956]|0;be(h|0,149608,(v=i,i=i+16|0,c[v>>2]=c[6958],c[v+8>>2]=(f|0)!=0?f:179864,v)|0);dL(h);a[37400]=e;if(e<<24>>24==0){i=b;return}e=(a[13048]|0)!=0?13048:179864;cf(c[m>>2]|0,147624,(v=i,i=i+16|0,c[v>>2]=c[c[3524]>>2],c[v+8>>2]=e,v)|0);i=b;return}function hE(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0.0,N=0.0;d=i;i=i+48|0;e=d|0;f=d+24|0;g=c[13898]|0;j=c[1054]|0;k=c[j+(g*40&-1)+36>>2]|0;l=c[j+(g*40&-1)+32>>2]|0;m=(a[j+(g*40&-1)|0]&1)==0;g=(k|0)>0;j=c[10036]|0;n=43320;o=108448;L2002:while(1){L2004:do{if(!m){if(g){p=0;q=0;r=l;while(1){s=a[o+p|0]|0;if(s<<24>>24==(a[j+(p+r|0)|0]|0)){t=r;u=q}else{if(s<<24>>24!=36){break L2004}t=r-1|0;u=1}w=p+1|0;if((w|0)<(u+k|0)){p=w;q=u;r=t}else{break}}if((u|0)==0){x=w}else{y=n;break L2002}}else{x=0}r=a[o+x|0]|0;if((r<<24>>24|0)==36|(r<<24>>24|0)==0){y=n;break L2002}}}while(0);r=n+8|0;q=c[r>>2]|0;if((q|0)==0){y=r;break}else{n=r;o=q}}o=c[y+4>>2]|0;do{if((o|0)==11){c[b+24>>2]=1;y=(c[13898]|0)+1|0;c[13898]=y;n=c[1054]|0;x=c[n+(y*40&-1)+36>>2]|0;w=c[n+(y*40&-1)+32>>2]|0;u=(a[n+(y*40&-1)|0]&1)==0;y=(x|0)>0;n=c[10036]|0;t=43320;k=108448;L2019:while(1){L2021:do{if(!u){if(y){j=0;l=0;g=w;while(1){m=a[k+j|0]|0;if(m<<24>>24==(a[n+(j+g|0)|0]|0)){z=g;A=l}else{if(m<<24>>24!=36){break L2021}z=g-1|0;A=1}B=j+1|0;if((B|0)<(A+x|0)){j=B;l=A;g=z}else{break}}if((A|0)==0){C=B}else{D=t;break L2019}}else{C=0}g=a[k+C|0]|0;if((g<<24>>24|0)==36|(g<<24>>24|0)==0){D=t;break L2019}}}while(0);g=t+8|0;l=c[g>>2]|0;if((l|0)==0){D=g;break}else{t=g;k=l}}E=c[D+4>>2]|0}else{k=b+24|0;if((o|0)!=12){c[k>>2]=0;E=o;break}c[k>>2]=-1;k=(c[13898]|0)+1|0;c[13898]=k;t=c[1054]|0;x=c[t+(k*40&-1)+36>>2]|0;n=c[t+(k*40&-1)+32>>2]|0;w=(a[t+(k*40&-1)|0]&1)==0;k=(x|0)>0;t=c[10036]|0;y=43320;u=108448;L2038:while(1){L2040:do{if(!w){if(k){l=0;g=0;j=n;while(1){m=a[u+l|0]|0;if(m<<24>>24==(a[t+(l+j|0)|0]|0)){F=j;G=g}else{if(m<<24>>24!=36){break L2040}F=j-1|0;G=1}H=l+1|0;if((H|0)<(G+x|0)){l=H;g=G;j=F}else{break}}if((G|0)==0){I=H}else{J=y;break L2038}}else{I=0}j=a[u+I|0]|0;if((j<<24>>24|0)==36|(j<<24>>24|0)==0){J=y;break L2038}}}while(0);j=y+8|0;g=c[j>>2]|0;if((g|0)==0){J=j;break}else{y=j;u=g}}E=c[J+4>>2]|0}}while(0);J=b|0;if((E|0)==-1){c[J>>2]=0;i=d;return}c[J>>2]=1;c[13898]=(c[13898]|0)+1;J=b+4|0;c[J>>2]=E;I=b+8|0;h[I>>3]=0.0;H=c[13898]|0;if((c[8272]|0)<=(H|0)){i=d;return}G=c[1054]|0;if((a[G+(H*40&-1)|0]&1)==0){i=d;return}F=c[G+(H*40&-1)+36>>2]|0;o=G+(H*40&-1)+32|0;G=c[10036]|0;D=0;while(1){if((D|0)>=(F|0)){break}if((a[G+((c[o>>2]|0)+D|0)|0]|0)==(a[D+115e3|0]|0)){D=D+1|0}else{K=1504;break}}if((K|0)==1504){i=d;return}if((D|0)!=1){i=d;return}if((E|0)<9){c[J>>2]=E+4;L=c[13898]|0}else{L=H}c[13898]=L+1;L=is(e)|0;H=c[L>>2]|0;if((H|0)==1){M=+(c[L+8>>2]|0)}else if((H|0)==2){M=+h[L+8>>3]}else if((H|0)==3){M=+uz(c[L+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}L=e|0;if((c[L>>2]|0)==3){uu(c[e+8>>2]|0);c[L>>2]=1}h[I>>3]=M;if((E|0)!=9){i=d;return}E=c[13898]|0;if((c[8272]|0)<=(E|0)){uf(E,138448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}I=c[1054]|0;if((a[I+(E*40&-1)|0]&1)==0){uf(E,138448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}L=c[I+(E*40&-1)+36>>2]|0;e=I+(E*40&-1)+32|0;I=c[10036]|0;H=0;while(1){if((H|0)>=(L|0)){break}if((a[I+((c[e>>2]|0)+H|0)|0]|0)==(a[H+148464|0]|0)){H=H+1|0}else{K=1507;break}}if((K|0)==1507){uf(E,138448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((H|0)!=1){uf(E,138448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=E+1;E=is(f)|0;H=c[E>>2]|0;if((H|0)==1){N=+(c[E+8>>2]|0)}else if((H|0)==2){N=+h[E+8>>3]}else if((H|0)==3){N=+uz(c[E+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}E=f|0;if((c[E>>2]|0)==3){uu(c[f+8>>2]|0);c[E>>2]=1}h[b+16>>3]=N;i=d;return}function hF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0.0;d=i;if((c[a>>2]|0)==0){i=d;return}e=c[a+24>>2]|0;if((e|0)!=0){f=(e|0)>0?136888:134896;aI(f|0,6,1,b|0)}f=c[a+4>>2]|0;if((f|0)==0){aI(133384,6,1,b|0);i=d;return}if((f|0)<5){e=c[43320+(f<<3)>>2]|0;aK(e|0,b|0);i=d;return}if((f|0)<9){e=c[43320+(f-4<<3)>>2]|0;g=+h[a+8>>3];cf(b|0,131984,(v=i,i=i+16|0,c[v>>2]=e,h[v+8>>3]=g,v)|0);i=d;return}if((f|0)!=9){i=d;return}g=+h[a+16>>3];cf(b|0,130704,(v=i,i=i+16|0,h[v>>3]=+h[a+8>>3],h[v+8>>3]=g,v)|0);i=d;return}function hG(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=i;i=i+56|0;e=d|0;f=e+40|0;g=f;h=b+16|0;c[g>>2]=c[h>>2];c[g+4>>2]=c[h+4>>2];c[g+8>>2]=c[h+8>>2];c[g+12>>2]=c[h+12>>2];h=f|0;g=c[h>>2]|0;if((g|0)==1){b=e+44|0;j=c[b>>2]|0;if((j|0)==-3){k=0;i=d;return k|0}l=c[8798]|0;m=(l|0)>0;n=j;L2142:while(1){o=n+1|0;j=43264;while(1){p=c[j>>2]|0;if((p|0)==0){break}if((c[p+4>>2]|0)==(o|0)){q=1535;break L2142}else{j=p|0}}if(!((o|0)>(l|0)&m)){q=1541;break}n=(n|0)%(l|0)&-1}do{if((q|0)==1535){l=e;m=p+8|0;c[l>>2]=c[m>>2];c[l+4>>2]=c[m+4>>2];c[l+8>>2]=c[m+8>>2];c[l+12>>2]=c[m+12>>2];c[l+16>>2]=c[m+16>>2];c[l+20>>2]=c[m+20>>2];c[l+24>>2]=c[m+24>>2];c[l+28>>2]=c[m+28>>2];c[l+32>>2]=c[m+32>>2];c[l+36>>2]=c[m+36>>2];c[l+40>>2]=c[m+40>>2];c[l+44>>2]=c[m+44>>2];c[l+48>>2]=c[m+48>>2];c[l+52>>2]=c[m+52>>2];if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[e+4>>2]=o;a[e+32|0]=0;break}if((a[e+32|0]&1)!=0){break}c[e+40>>2]=1;c[b>>2]=c[e+4>>2]}else if((q|0)==1541){c[e+4>>2]=n;c[e+40>>2]=1;c[b>>2]=n;c[e+8>>2]=n}}while(0);r=c[h>>2]|0}else{r=g}if((r|0)==0){k=1;i=d;return k|0}fn(f,c[3524]|0);k=1;i=d;return k|0} -function hH(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0.0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0.0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0.0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0.0,bp=0.0,bq=0.0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0.0,bz=0.0,bA=0,bB=0,bC=0,bD=0.0,bE=0.0,bF=0;f=i;i=i+272|0;g=f|0;j=f+24|0;k=f+48|0;l=f+72|0;m=f+96|0;n=f+120|0;o=f+144|0;p=f+168|0;q=f+192|0;r=f+216|0;s=r;t=b;c[s>>2]=c[t>>2];c[s+4>>2]=c[t+4>>2];c[s+8>>2]=c[t+8>>2];c[s+12>>2]=c[t+12>>2];c[s+16>>2]=c[t+16>>2];c[s+20>>2]=c[t+20>>2];c[s+24>>2]=c[t+24>>2];c[s+28>>2]=c[t+28>>2];c[s+32>>2]=c[t+32>>2];c[s+36>>2]=c[t+36>>2];c[s+40>>2]=c[t+40>>2];c[s+44>>2]=c[t+44>>2];c[s+48>>2]=c[t+48>>2];c[s+52>>2]=c[t+52>>2];L2163:do{if(d){s=c[13898]|0;u=c[1054]|0;w=c[u+(s*40&-1)+36>>2]|0;x=c[u+(s*40&-1)+32>>2]|0;y=(a[u+(s*40&-1)|0]&1)==0;L2165:do{if((w|0)>0&(y^1)){u=c[10036]|0;z=0;A=0;B=x;while(1){if((a[z+73824|0]|0)==(a[u+(z+B|0)|0]|0)){C=B;D=A}else{if((z|0)!=5){E=1558;break L2165}C=B-1|0;D=1}F=z+1|0;if((F|0)<(D+w|0)){z=F;A=D;B=C}else{break}}if((D|0)!=0){break}if(!((z|0)==4|(z|0)==9)){E=1558}}else{E=1558}}while(0);if((E|0)==1558){if((c[8272]|0)<=(s|0)|y){break}B=c[10036]|0;A=0;while(1){if((A|0)>=(w|0)){break}if((a[B+(x+A|0)|0]|0)==(a[A+72816|0]|0)){A=A+1|0}else{break L2163}}if((A|0)!=2){break}}c[13898]=s+1;x=is(p)|0;B=c[x>>2]|0;if((B|0)==3){G=+uz(c[x+8>>2]|0,0)}else if((B|0)==1){G=+(c[x+8>>2]|0)}else if((B|0)==2){G=+h[x+8>>3]}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}x=p|0;if((c[x>>2]|0)==3){uu(c[p+8>>2]|0);c[x>>2]=1}lK(b,~~G)}}while(0);p=c[13898]|0;D=c[8272]|0;L2193:do{if((p|0)<(D|0)){C=n|0;x=n+8|0;B=r+12|0;w=q|0;y=q+8|0;u=m|0;F=m+8|0;H=r+24|0;I=g|0;J=g+8|0;K=r+8|0;L=j|0;M=j+8|0;N=r+16|0;O=r+32|0;P=r+40|0;Q=r+44|0;R=l|0;S=l+8|0;T=r+48|0;U=k|0;V=k+8|0;W=r+4|0;X=r+40|0;Y=o|0;Z=o+8|0;_=b+4|0;$=d^1;aa=b|0;ab=b+40|0;ac=b+44|0;ad=b+8|0;ae=b+32|0;G=0.0;af=0;ag=0;ah=0;ai=0;aj=0;ak=0;al=0;am=p;an=D;L2195:while(1){ao=c[1054]|0;ap=(a[ao+(am*40&-1)|0]&1)==0;aq=c[ao+(am*40&-1)+36>>2]|0;ar=ao+(am*40&-1)+32|0;L2197:do{if(ap){as=c[ar>>2]|0;E=1587}else{at=c[10036]|0;au=0;while(1){if((au|0)>=(aq|0)){E=1578;break}if((a[at+((c[ar>>2]|0)+au|0)|0]|0)==(a[au+103664|0]|0)){au=au+1|0}else{break}}if((E|0)==1578){E=0;if((au|0)==1){av=al;aw=aj;ax=ai;ay=ah;az=ag;aA=af;aB=ak;aC=am;break L2193}}at=c[ar>>2]|0;if(!((aq|0)>0&(ap^1))){as=at;E=1587;break}aD=c[10036]|0;aE=0;aF=0;aG=at;while(1){if((a[aE+139232|0]|0)==(a[aD+(aE+aG|0)|0]|0)){aH=aG;aI=aF}else{if((aE|0)!=5){as=at;E=1587;break L2197}aH=aG-1|0;aI=1}aJ=aE+1|0;if((aJ|0)<(aI+aq|0)){aE=aJ;aF=aI;aG=aH}else{break}}if((aI|0)!=0){E=1592;break}if((aE|0)==4|(aE|0)==8){E=1592}else{as=at;E=1587}}}while(0);L2215:do{if((E|0)==1587){E=0;if((an|0)<=(am|0)|ap){aK=al;aL=ag;aM=af;break}ar=c[10036]|0;z=0;while(1){if((z|0)>=(aq|0)){break}if((a[ar+(as+z|0)|0]|0)==(a[z+225056|0]|0)){z=z+1|0}else{aK=al;aL=ag;aM=af;break L2215}}if((z|0)==2){E=1592}else{aK=al;aL=ag;aM=af}}}while(0);L2222:do{if((E|0)==1592){E=0;aq=af+1|0;if((af|0)!=0){av=al;aw=aj;ax=ai;ay=ah;az=ag;aA=aq;aB=ak;aC=am;break L2193}ap=am+1|0;c[13898]=ap;ar=c[ao+(ap*40&-1)+36>>2]|0;at=c[ao+(ap*40&-1)+32>>2]|0;aE=(a[ao+(ap*40&-1)|0]&1)==0;L2225:do{if((ar|0)>0&(aE^1)){aG=c[10036]|0;aF=0;aD=0;au=at;while(1){if((a[aF+123456|0]|0)==(a[aG+(aF+au|0)|0]|0)){aN=au;aO=aD}else{if((aF|0)!=3){break}aN=au-1|0;aO=1}aJ=aF+1|0;if((aJ|0)<(aO+ar|0)){aF=aJ;aD=aO;au=aN}else{E=1599;break}}do{if((E|0)==1599){E=0;if((aO|0)==0){if(!((aF|0)==2|(aF|0)==8)){break}}au=ag+1|0;if((ag|0)!=0){av=al;aw=aj;ax=ai;ay=ah;az=au;aA=aq;aB=ak;aC=ap;break L2193}c[13898]=am;hI(X,3);a[O]=1;aK=al;aL=au;aM=aq;break L2222}}while(0);if(!((ar|0)>0&(aE^1))){break}aF=c[10036]|0;au=0;aD=0;aG=at;while(1){if((a[au+205488|0]|0)==(a[aF+(au+aG|0)|0]|0)){aP=aG;aQ=aD}else{if((au|0)!=3){break L2225}aP=aG-1|0;aQ=1}aJ=au+1|0;if((aJ|0)<(aQ+ar|0)){au=aJ;aD=aQ;aG=aP}else{break}}if((aQ|0)==0){if(!((au|0)==2|(au|0)==7)){break}}aG=ag+1|0;if((ag|0)!=0){av=al;aw=aj;ax=ai;ay=ah;az=aG;aA=aq;aB=ak;aC=ap;break L2193}c[13898]=am;hI(X,6);a[O]=1;aK=al;aL=aG;aM=aq;break L2222}}while(0);L2253:do{if(!((an|0)<=(ap|0)|aE)){z=c[10036]|0;aG=0;while(1){if((aG|0)>=(ar|0)){break}if((a[z+(at+aG|0)|0]|0)==(a[aG+120376|0]|0)){aG=aG+1|0}else{break L2253}}if((aG|0)!=4){break}c[t>>2]=c[14158];c[t+4>>2]=c[14159];c[t+8>>2]=c[14160];c[t+12>>2]=c[14161];c[t+16>>2]=c[14162];c[t+20>>2]=c[14163];c[t+24>>2]=c[14164];c[t+28>>2]=c[14165];c[t+32>>2]=c[14166];c[t+36>>2]=c[14167];c[t+40>>2]=c[14168];c[t+44>>2]=c[14169];c[t+48>>2]=c[14170];c[t+52>>2]=c[14171];c[13898]=(c[13898]|0)+1;aK=al;aL=ag;aM=aq;break L2222}}while(0);at=is(o)|0;ar=c[at>>2]|0;if((ar|0)==1){aR=+(c[at+8>>2]|0)}else if((ar|0)==2){aR=+h[at+8>>3]}else if((ar|0)==3){aR=+uz(c[at+8>>2]|0,0)}else{E=1623;break L2195}if((c[Y>>2]|0)==3){uu(c[Z>>2]|0);c[Y>>2]=1}at=~~aR;c[_>>2]=at-1;if(!((a[30080]&1)==0|$)){lK(b,at);aK=at;aL=ag;aM=aq;break}ar=c[aa>>2]|0;aE=c[8798]|0;ap=(aE|0)>0;z=at;L2272:while(1){au=43264;while(1){aS=c[au>>2]|0;if((aS|0)==0){break}if((c[aS+4>>2]|0)==(z|0)){break L2272}else{au=aS|0}}aT=z-1|0;if(!((z|0)>(aE|0)&ap)){E=1638;break}z=((aT|0)%(aE|0)&-1)+1|0}if((E|0)==1638){E=0;c[_>>2]=aT;c[ab>>2]=1;c[ac>>2]=aT;c[ad>>2]=aT;aK=at;aL=ag;aM=aq;break}aE=aS+8|0;c[t>>2]=c[aE>>2];c[t+4>>2]=c[aE+4>>2];c[t+8>>2]=c[aE+8>>2];c[t+12>>2]=c[aE+12>>2];c[t+16>>2]=c[aE+16>>2];c[t+20>>2]=c[aE+20>>2];c[t+24>>2]=c[aE+24>>2];c[t+28>>2]=c[aE+28>>2];c[t+32>>2]=c[aE+32>>2];c[t+36>>2]=c[aE+36>>2];c[t+40>>2]=c[aE+40>>2];c[t+44>>2]=c[aE+44>>2];c[t+48>>2]=c[aE+48>>2];c[t+52>>2]=c[aE+52>>2];c[aa>>2]=ar;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[_>>2]=z;a[ae]=0;aK=at;aL=ag;aM=aq;break}if((a[ae]&1)!=0){aK=at;aL=ag;aM=aq;break}c[ab>>2]=1;c[ac>>2]=c[_>>2];aK=at;aL=ag;aM=aq}}while(0);ao=c[13898]|0;aE=c[1054]|0;ap=c[aE+(ao*40&-1)+36>>2]|0;au=c[aE+(ao*40&-1)+32>>2]|0;aG=(a[aE+(ao*40&-1)|0]&1)==0;L2287:do{if((ap|0)>0&(aG^1)){aD=c[10036]|0;aF=0;aJ=0;aU=au;while(1){if((a[aF+205488|0]|0)==(a[aD+(aF+aU|0)|0]|0)){aV=aU;aW=aJ}else{if((aF|0)!=3){E=1650;break L2287}aV=aU-1|0;aW=1}aX=aF+1|0;if((aX|0)<(aW+ap|0)){aF=aX;aJ=aW;aU=aV}else{break}}if((aW|0)==0){if(!((aF|0)==2|(aF|0)==7)){E=1650;break}}aU=aL+1|0;if((aL|0)!=0){av=aK;aw=aj;ax=ai;ay=ah;az=aU;aA=aM;aB=ak;aC=ao;break L2193}c[13898]=ao-1;hI(X,6);a[O]=1;aY=ak;aZ=aj;a_=ai;a$=ah;a0=aU;a1=aM;a2=G}else{E=1650}}while(0);L2300:do{if((E|0)==1650){E=0;aU=c[8272]|0;aJ=(aU|0)>(ao|0);L2302:do{if(aJ){if(aG){av=aK;aw=aj;ax=ai;ay=ah;az=aL;aA=aM;aB=ak;aC=ao;break L2193}aD=c[10036]|0;aq=0;while(1){if((aq|0)>=(ap|0)){break}if((a[aD+(au+aq|0)|0]|0)==(a[aq+119088|0]|0)){aq=aq+1|0}else{E=1656;break L2302}}if((aq|0)!=2){E=1656}}else{E=1656}}while(0);L2309:do{if((E|0)==1656){E=0;L2311:do{if((ap|0)>0&(aG^1)){aF=c[10036]|0;aD=0;at=0;z=au;while(1){if((a[aD+116144|0]|0)==(a[aF+(aD+z|0)|0]|0)){a3=z;a4=at}else{if((aD|0)!=5){break L2311}a3=z-1|0;a4=1}ar=aD+1|0;if((ar|0)<(a4+ap|0)){aD=ar;at=a4;z=a3}else{break}}if((a4|0)!=0){break L2309}if((aD|0)==4|(aD|0)==9){break L2309}}}while(0);L2322:do{if(aJ){if(aG){E=1746;break}aq=c[10036]|0;z=0;while(1){if((z|0)>=(ap|0)){break}if((a[aq+(au+z|0)|0]|0)==(a[z+179168|0]|0)){z=z+1|0}else{E=1670;break L2322}}if((z|0)==2){break L2309}else{E=1670}}else{E=1670}}while(0);L2329:do{if((E|0)==1670){E=0;if(!((ap|0)>0&(aG^1))){E=1746;break}aq=c[10036]|0;aD=0;at=0;aF=au;while(1){if((a[aD+178592|0]|0)==(a[aq+(aD+aF|0)|0]|0)){a5=aF;a6=at}else{if((aD|0)!=5){break}a5=aF-1|0;a6=1}ar=aD+1|0;if((ar|0)<(a6+ap|0)){aD=ar;at=a6;aF=a5}else{E=1676;break}}if((E|0)==1676){E=0;if((a6|0)!=0){break L2309}if((aD|0)==4|(aD|0)==9){break L2309}}if(!((ap|0)>0&(aG^1))){E=1746;break}aF=c[10036]|0;at=0;aq=0;z=au;while(1){if((a[at+128400|0]|0)==(a[aF+(at+z|0)|0]|0)){a7=z;a8=aq}else{if((at|0)!=5){E=1746;break L2329}a7=z-1|0;a8=1}ar=at+1|0;if((ar|0)<(a8+ap|0)){at=ar;aq=a8;z=a7}else{break}}if((a8|0)!=0){break}if(!((at|0)==4|(at|0)==9)){E=1746}}}while(0);L2351:do{if((E|0)==1746){E=0;L2353:do{if(aJ){if(aG){av=aK;aw=aj;ax=ai;ay=ah;az=aL;aA=aM;aB=ak;aC=ao;break L2193}z=c[10036]|0;aq=0;while(1){if((aq|0)>=(ap|0)){E=1751;break}if((a[z+(au+aq|0)|0]|0)==(a[aq+128296|0]|0)){aq=aq+1|0}else{break}}if((E|0)==1751){E=0;if((aq|0)==2){break L2351}}if(!aJ){break}if(aG){av=aK;aw=aj;ax=ai;ay=ah;az=aL;aA=aM;aB=ak;aC=ao;break L2193}z=c[10036]|0;aF=0;while(1){if((aF|0)>=(ap|0)){break}if((a[z+(au+aF|0)|0]|0)==(a[aF+120376|0]|0)){aF=aF+1|0}else{break L2353}}if((aF|0)!=4){break}z=aM+1|0;if((aM|0)!=0){av=aK;aw=aj;ax=ai;ay=ah;az=aL;aA=z;aB=ak;aC=ao;break L2193}c[13898]=ao+1;c[t>>2]=c[14158];c[t+4>>2]=c[14159];c[t+8>>2]=c[14160];c[t+12>>2]=c[14161];c[t+16>>2]=c[14162];c[t+20>>2]=c[14163];c[t+24>>2]=c[14164];c[t+28>>2]=c[14165];c[t+32>>2]=c[14166];c[t+36>>2]=c[14167];c[t+40>>2]=c[14168];c[t+44>>2]=c[14169];c[t+48>>2]=c[14170];c[t+52>>2]=c[14171];aY=ak;aZ=aj;a_=ai;a$=ah;a0=aL;a1=z;a2=G;break L2300}}while(0);L2371:do{if((ap|0)>0&(aG^1)){at=c[10036]|0;z=0;aq=0;aD=au;while(1){if((a[z+139064|0]|0)==(a[at+(z+aD|0)|0]|0)){a9=aD;ba=aq}else{if((z|0)!=6){E=1778;break L2371}a9=aD-1|0;ba=1}ar=z+1|0;if((ar|0)<(ba+ap|0)){z=ar;aq=ba;aD=a9}else{break}}if((ba|0)!=0){break}if(!((z|0)==5|(z|0)==9)){E=1778}}else{E=1778}}while(0);L2381:do{if((E|0)==1778){E=0;L2383:do{if(aJ){if(aG){av=aK;aw=aj;ax=ai;ay=ah;az=aL;aA=aM;aB=ak;aC=ao;break L2193}aD=c[10036]|0;aq=0;while(1){if((aq|0)>=(ap|0)){break}if((a[aD+(au+aq|0)|0]|0)==(a[aq+205624|0]|0)){aq=aq+1|0}else{break L2383}}if((aq|0)==2){break L2381}}}while(0);L2391:do{if((ap|0)>0&(aG^1)){z=c[10036]|0;aD=0;at=0;aF=au;while(1){if((a[aD+103928|0]|0)==(a[z+(aD+aF|0)|0]|0)){bb=aF;bc=at}else{if((aD|0)!=6){E=1803;break L2391}bb=aF-1|0;bc=1}ar=aD+1|0;if((ar|0)<(bc+ap|0)){aD=ar;at=bc;aF=bb}else{break}}if((bc|0)!=0){break}if(!((aD|0)==5|(aD|0)==9)){E=1803}}else{E=1803}}while(0);L2401:do{if((E|0)==1803){E=0;L2403:do{if(aJ){if(aG){E=1847;break}aF=c[10036]|0;at=0;while(1){if((at|0)>=(ap|0)){break}if((a[aF+(au+at|0)|0]|0)==(a[at+103560|0]|0)){at=at+1|0}else{E=1839;break L2403}}if((at|0)==2){break L2401}else{E=1839}}else{E=1839}}while(0);L2410:do{if((E|0)==1839){E=0;if(!((ap|0)>0&(aG^1))){E=1847;break}aD=c[10036]|0;aF=0;z=0;aq=au;while(1){if((a[aF+100112|0]|0)==(a[aD+(aF+aq|0)|0]|0)){bd=aq;be=z}else{if((aF|0)!=6){E=1847;break L2410}bd=aq-1|0;be=1}ar=aF+1|0;if((ar|0)<(be+ap|0)){aF=ar;z=be;aq=bd}else{break}}if((be|0)!=0){break}if(!((aF|0)==5|(aF|0)==13)){E=1847}}}while(0);if((E|0)==1847){E=0;if(!aJ){av=aK;aw=aj;ax=ai;ay=ah;az=aL;aA=aM;aB=ak;aC=ao;break L2193}if(aG){av=aK;aw=aj;ax=ai;ay=ah;az=aL;aA=aM;aB=ak;aC=ao;break L2193}aq=c[10036]|0;z=0;while(1){if((z|0)>=(ap|0)){break}if((a[aq+(au+z|0)|0]|0)==(a[z+99680|0]|0)){z=z+1|0}else{av=aK;aw=aj;ax=ai;ay=ah;az=aL;aA=aM;aB=ak;aC=ao;break L2193}}if((z|0)!=2){av=aK;aw=aj;ax=ai;ay=ah;az=aL;aA=aM;aB=ak;aC=ao;break L2193}}aq=ao+1|0;c[13898]=aq;if(!e){uh(aq,99224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);aq=is(q)|0;aD=c[aq>>2]|0;if((aD|0)==3){at=c[aq+8>>2]|0;uz(at,0)}else if(!((aD|0)==1|(aD|0)==2)){E=1864;break L2195}if((c[w>>2]|0)!=3){aY=ak;aZ=aj;a_=ai;a$=ah;a0=aL;a1=aM;a2=G;break L2300}uu(c[y>>2]|0);c[w>>2]=1;aY=ak;aZ=aj;a_=ai;a$=ah;a0=aL;a1=aM;a2=G;break L2300}aD=is(n)|0;at=c[aD>>2]|0;if((at|0)==2){bf=+h[aD+8>>3]}else if((at|0)==3){bf=+uz(c[aD+8>>2]|0,0)}else if((at|0)==1){bf=+(c[aD+8>>2]|0)}else{E=1858;break L2195}if((c[C>>2]|0)==3){uu(c[x>>2]|0);c[C>>2]=1}c[B>>2]=~~bf;aY=1;aZ=aj;a_=ai;a$=ah;a0=aL;a1=aM;a2=G;break L2300}}while(0);if(!e){uh(ao,100856,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[13898]=(c[13898]|0)+2;aY=ak;aZ=aj;a_=ai;a$=ah;a0=aL;a1=aM;a2=G;break L2300}aD=aj+1|0;if((aj|0)!=0){av=aK;aw=aD;ax=ai;ay=ah;az=aL;aA=aM;aB=ak;aC=ao;break L2193}at=ao+1|0;c[13898]=at;aq=c[aE+(at*40&-1)+36>>2]|0;ar=c[aE+(at*40&-1)+32>>2]|0;aX=(a[aE+(at*40&-1)|0]&1)==0;L2450:do{if((aq|0)>0&(aX^1)){at=c[10036]|0;bg=0;bh=0;bi=ar;while(1){if((a[bg+111056|0]|0)==(a[at+(bg+bi|0)|0]|0)){bj=bi;bk=bh}else{if((bg|0)!=3){break}bj=bi-1|0;bk=1}bl=bg+1|0;if((bl|0)<(bk+aq|0)){bg=bl;bh=bk;bi=bj}else{E=1817;break}}do{if((E|0)==1817){E=0;if((bk|0)==0){if(!((bg|0)==2|(bg|0)==8)){break}}h[H>>3]=-3.0;c[13898]=ao+2;aY=ak;aZ=aD;a_=ai;a$=ah;a0=aL;a1=aM;a2=G;break L2300}}while(0);if(!((aq|0)>0&(aX^1))){break}bg=c[10036]|0;bi=0;bh=0;at=ar;while(1){if((a[bi+184456|0]|0)==(a[bg+(bi+at|0)|0]|0)){bm=at;bn=bh}else{if((bi|0)!=3){break L2450}bm=at-1|0;bn=1}z=bi+1|0;if((z|0)<(bn+aq|0)){bi=z;bh=bn;at=bm}else{break}}if((bn|0)==0){if(!((bi|0)==2|(bi|0)==7)){break}}h[H>>3]=-2.0;c[13898]=ao+2;aY=ak;aZ=aD;a_=ai;a$=ah;a0=aL;a1=aM;a2=G;break L2300}}while(0);aq=is(m)|0;ar=c[aq>>2]|0;if((ar|0)==1){bo=+(c[aq+8>>2]|0)}else if((ar|0)==2){bo=+h[aq+8>>3]}else if((ar|0)==3){bo=+uz(c[aq+8>>2]|0,0)}else{E=1833;break L2195}if((c[u>>2]|0)==3){uu(c[F>>2]|0);c[u>>2]=1}h[H>>3]=bo;if(bo>=0.0){aY=ak;aZ=aD;a_=ai;a$=ah;a0=aL;a1=aM;a2=G;break L2300}h[H>>3]=0.0;aY=ak;aZ=aD;a_=ai;a$=ah;a0=aL;a1=aM;a2=G;break L2300}}while(0);if(!e){uh(ao,104432,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[13898]=(c[13898]|0)+2;aY=ak;aZ=aj;a_=ai;a$=ah;a0=aL;a1=aM;a2=G;break L2300}aq=ai+1|0;if((ai|0)!=0){av=aK;aw=aj;ax=aq;ay=ah;az=aL;aA=aM;aB=ak;aC=ao;break L2193}c[13898]=ao+1;ar=is(g)|0;aX=c[ar>>2]|0;if((aX|0)==1){bp=+(c[ar+8>>2]|0)}else if((aX|0)==2){bp=+h[ar+8>>3]}else if((aX|0)==3){bp=+uz(c[ar+8>>2]|0,0)}else{E=1790;break L2195}if((c[I>>2]|0)==3){uu(c[J>>2]|0);c[I>>2]=1}c[K>>2]=~~bp-1;aY=ak;aZ=aj;a_=aq;a$=ah;a0=aL;a1=aM;a2=G;break L2300}}while(0);aq=ah+1|0;if((ah|0)!=0){av=aK;aw=aj;ax=ai;ay=aq;az=aL;aA=aM;aB=ak;aC=ao;break L2193}c[13898]=ao+1;ar=is(j)|0;aX=c[ar>>2]|0;if((aX|0)==1){bq=+(c[ar+8>>2]|0)}else if((aX|0)==2){bq=+h[ar+8>>3]}else if((aX|0)==3){bq=+uz(c[ar+8>>2]|0,0)}else{E=1757;break L2195}if((c[L>>2]|0)==3){uu(c[M>>2]|0);c[L>>2]=1}h[N>>3]=bq;if(bq>=0.0){aY=ak;aZ=aj;a_=ai;a$=aq;a0=aL;a1=aM;a2=G;break L2300}h[N>>3]=0.0;aY=ak;aZ=aj;a_=ai;a$=aq;a0=aL;a1=aM;a2=G;break L2300}}while(0);a[O]=1;aJ=aL+1|0;if((aL|0)!=0){av=aK;aw=aj;ax=ai;ay=ah;az=aJ;aA=aM;aB=ak;aC=ao;break L2193}aq=ao+1|0;c[13898]=aq;ar=c[aE+(aq*40&-1)+36>>2]|0;aX=c[aE+(aq*40&-1)+32>>2]|0;at=(a[aE+(aq*40&-1)|0]&1)==0;L2511:do{if((ar|0)>0&(at^1)){bh=c[10036]|0;bg=0;z=0;bl=aX;while(1){if((a[bg+123456|0]|0)==(a[bh+(bg+bl|0)|0]|0)){br=bl;bs=z}else{if((bg|0)!=3){break}br=bl-1|0;bs=1}bt=bg+1|0;if((bt|0)<(bs+ar|0)){bg=bt;z=bs;bl=br}else{E=1685;break}}do{if((E|0)==1685){E=0;if((bs|0)==0){if(!((bg|0)==8|(bg|0)==2)){break}}c[13898]=ao;hI(X,3);aY=ak;aZ=aj;a_=ai;a$=ah;a0=aJ;a1=aM;a2=G;break L2300}}while(0);if(!((ar|0)>0&(at^1))){break}bg=c[10036]|0;bl=0;z=0;bh=aX;while(1){if((a[bl+205488|0]|0)==(a[bg+(bl+bh|0)|0]|0)){bu=bh;bv=z}else{if((bl|0)!=3){break L2511}bu=bh-1|0;bv=1}bt=bl+1|0;if((bt|0)<(bv+ar|0)){bl=bt;z=bv;bh=bu}else{break}}if((bv|0)==0){if(!((bl|0)==7|(bl|0)==2)){break}}c[13898]=ao;hI(X,6);aY=ak;aZ=aj;a_=ai;a$=ah;a0=aJ;a1=aM;a2=G;break L2300}}while(0);L2537:do{if((aU|0)>(aq|0)){if(at){break}bh=c[10036]|0;z=0;while(1){if((z|0)>=(ar|0)){break}if((a[bh+(aX+z|0)|0]|0)==(a[z+120376|0]|0)){z=z+1|0}else{E=1704;break L2537}}if((z|0)!=4){E=1704;break}c[P>>2]=1;c[Q>>2]=-4;c[13898]=ao+2;aY=ak;aZ=aj;a_=ai;a$=ah;a0=aJ;a1=aM;a2=G;break L2300}else{E=1704}}while(0);L2545:do{if((E|0)==1704){E=0;if(!((ar|0)>0&(at^1))){break}aq=c[10036]|0;aU=0;bh=0;bl=aX;while(1){if((a[aU+111056|0]|0)==(a[aq+(aU+bl|0)|0]|0)){bw=bl;bx=bh}else{if((aU|0)!=3){break L2545}bw=bl-1|0;bx=1}bg=aU+1|0;if((bg|0)<(bx+ar|0)){aU=bg;bh=bx;bl=bw}else{break}}if((bx|0)==0){if(!((aU|0)==2|(aU|0)==8)){break}}c[13898]=ao+2;c[W>>2]=-6;c[P>>2]=2;aY=ak;aZ=aj;a_=ai;a$=ah;a0=aJ;a1=aM;a2=G;break L2300}}while(0);if(!d){c[P>>2]=1;ar=is(k)|0;aX=c[ar>>2]|0;if((aX|0)==1){by=+(c[ar+8>>2]|0)}else if((aX|0)==2){by=+h[ar+8>>3]}else if((aX|0)==3){by=+uz(c[ar+8>>2]|0,0)}else{E=1734;break L2195}if((c[U>>2]|0)==3){uu(c[V>>2]|0);c[U>>2]=1}c[Q>>2]=~~by-1;aY=ak;aZ=aj;a_=ai;a$=ah;a0=aJ;a1=aM;a2=G;break}ar=is(l)|0;aX=c[ar>>2]|0;if((aX|0)==1){bz=+(c[ar+8>>2]|0)}else if((aX|0)==2){bz=+h[ar+8>>3]}else if((aX|0)==3){bz=+uz(c[ar+8>>2]|0,0)}else{E=1718;break L2195}if((c[R>>2]|0)==3){uu(c[S>>2]|0);c[R>>2]=1}ar=c[8798]|0;aX=(ar|0)>0;at=~~bz;L2578:while(1){bl=43264;while(1){bA=c[bl>>2]|0;if((bA|0)==0){break}if((c[bA+4>>2]|0)==(at|0)){E=1725;break L2578}else{bl=bA|0}}bl=at-1|0;if(!((at|0)>(ar|0)&aX)){bB=1;bC=bl;bD=G;break}at=((bl|0)%(ar|0)&-1)+1|0}do{if((E|0)==1725){E=0;ar=c[bA+48>>2]|0;at=c[bA+52>>2]|0;bE=+h[bA+56>>3];if((c[(c[3524]|0)+96>>2]&1024|0)!=0){bB=ar;bC=at;bD=bE;break}aX=(a[bA+40|0]&1)==0;bB=aX?1:ar;bC=aX?c[bA+12>>2]|0:at;bD=bE}}while(0);c[P>>2]=bB;c[Q>>2]=bC;h[T>>3]=bD;aY=ak;aZ=aj;a_=ai;a$=ah;a0=aJ;a1=aM;a2=bD}}while(0);ao=c[13898]|0;aE=c[8272]|0;if((ao|0)<(aE|0)){G=a2;af=a1;ag=a0;ah=a$;ai=a_;aj=aZ;ak=aY;al=aK;am=ao;an=aE}else{av=aK;aw=aZ;ax=a_;ay=a$;az=a0;aA=a1;aB=aY;aC=ao;break L2193}}if((E|0)==1757){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((E|0)==1623){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((E|0)==1718){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((E|0)==1858){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((E|0)==1864){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((E|0)==1790){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((E|0)==1734){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((E|0)==1833){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}else{av=0;aw=0;ax=0;ay=0;az=0;aA=0;aB=0;aC=p}}while(0);if((aA|0)>1|(az|0)>1|(ay|0)>1|(ax|0)>1|(aw|0)>1){uf(aC,98720,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((az|0)==0){bF=av}else{av=b+40|0;az=r+40|0;c[av>>2]=c[az>>2];c[av+4>>2]=c[az+4>>2];c[av+8>>2]=c[az+8>>2];c[av+12>>2]=c[az+12>>2];a[b+32|0]=a[r+32|0]&1;bF=-8}if((ay|0)!=0){h[b+16>>3]=+h[r+16>>3]}if((ax|0)!=0){c[b+8>>2]=c[r+8>>2]}if((aw|0)!=0){h[b+24>>3]=+h[r+24>>3]}if((aB|0)!=0){c[b+12>>2]=c[r+12>>2]}if((c[r+4>>2]|0)!=-6){i=f;return bF|0}c[b+4>>2]=-6;i=f;return bF|0}function hI(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0.0,T=0,U=0,V=0.0,W=0.0,X=0,Y=0;e=i;i=i+96|0;f=e|0;g=e+24|0;j=e+48|0;k=e+72|0;l=c[13898]|0;m=l+1|0;c[13898]=m;n=c[8272]|0;if((m|0)>=(n|0)){uf(m,92096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=c[1054]|0;p=(a[o+(m*40&-1)|0]&1)==0;q=c[o+(m*40&-1)+36>>2]|0;r=o+(m*40&-1)+32|0;L2626:do{if(p){s=c[r>>2]|0}else{t=c[10036]|0;u=0;while(1){if((u|0)>=(q|0)){w=1890;break}if((a[t+((c[r>>2]|0)+u|0)|0]|0)==(a[u+103664|0]|0)){u=u+1|0}else{break}}do{if((w|0)==1890){if((u|0)!=1){break}uf(m,92096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);u=c[r>>2]|0;if(p){s=u;break}if((q|0)>0){t=c[10036]|0;x=0;y=0;z=u;while(1){if((a[x+184456|0]|0)==(a[t+(x+z|0)|0]|0)){A=z;B=y}else{if((x|0)!=3){break}A=z-1|0;B=1}C=x+1|0;if((C|0)<(B+q|0)){x=C;y=B;z=A}else{w=1899;break}}do{if((w|0)==1899){if((B|0)==0){if(!((x|0)==7|(x|0)==2)){break}}c[13898]=l+2;c[b>>2]=0;i=e;return}}while(0);if(p){s=u;break}}x=c[10036]|0;z=0;while(1){if((z|0)>=(q|0)){w=1906;break}if((a[x+(u+z|0)|0]|0)==(a[z+120376|0]|0)){z=z+1|0}else{break}}do{if((w|0)==1906){if((z|0)!=4){break}c[13898]=l+2;c[b>>2]=1;c[b+4>>2]=-4;i=e;return}}while(0);if(p){s=u;break}z=c[10036]|0;x=0;while(1){if((x|0)>=(q|0)){break}if((a[z+(u+x|0)|0]|0)==(a[x+225056|0]|0)){x=x+1|0}else{s=u;break L2626}}if((x|0)!=2){s=u;break}y=l+2|0;c[13898]=y;if((y|0)>=(n|0)){uf(y,91408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}L2669:do{if((a[o+(y*40&-1)|0]&1)!=0){t=c[o+(y*40&-1)+36>>2]|0;C=o+(y*40&-1)+32|0;D=0;while(1){if((D|0)>=(t|0)){break}if((a[z+((c[C>>2]|0)+D|0)|0]|0)==(a[D+103664|0]|0)){D=D+1|0}else{break L2669}}if((D|0)!=1){break}uf(y,91408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);y=b|0;c[y>>2]=1;z=is(j)|0;u=c[z>>2]|0;if((u|0)==1){E=+(c[z+8>>2]|0)}else if((u|0)==2){E=+h[z+8>>3]}else if((u|0)==3){E=+uz(c[z+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}z=j|0;if((c[z>>2]|0)==3){uu(c[j+8>>2]|0);c[z>>2]=1}z=~~E-1|0;c[b+4>>2]=z;if((z|0)>=-4){i=e;return}c[y>>2]=0;uh(c[13898]|0,90768,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=e;return}}while(0);if((d|0)<2){c[b>>2]=0;uf(c[13898]|0,90352,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}L2695:do{if(!p){j=c[10036]|0;B=0;while(1){if((B|0)>=(q|0)){w=1935;break}if((a[j+(s+B|0)|0]|0)==(a[B+72816|0]|0)){B=B+1|0}else{w=1936;break}}if((w|0)==1935){if((B|0)!=2){w=1936}}do{if((w|0)==1936){if(!((q|0)>0&(p^1))){break L2695}j=c[10036]|0;A=0;r=0;y=s;while(1){if((a[A+73824|0]|0)==(a[j+(A+y|0)|0]|0)){F=y;G=r}else{if((A|0)!=5){break}F=y-1|0;G=1}z=A+1|0;if((z|0)<(G+q|0)){A=z;r=G;y=F}else{w=1942;break}}if((w|0)==1942){if((G|0)!=0){break}if((A|0)==4|(A|0)==9){break}}if(p){break L2695}L2716:do{if((q|0)>0){y=c[10036]|0;r=0;j=0;D=s;while(1){if((a[r+123456|0]|0)==(a[y+(r+D|0)|0]|0)){H=D;I=j}else{if((r|0)!=3){break L2716}H=D-1|0;I=1}z=r+1|0;if((z|0)<(I+q|0)){r=z;j=I;D=H}else{break}}if((I|0)==0){if(!((r|0)==8|(r|0)==2)){break}}c[13898]=l+2;c[b>>2]=3;D=c[13898]|0;j=c[1054]|0;y=c[j+(D*40&-1)+36>>2]|0;z=c[j+(D*40&-1)+32>>2]|0;L2728:do{if((a[j+(D*40&-1)|0]&1)==0){w=1970}else{if((y|0)<=0){J=b+8|0;break}u=c[10036]|0;x=0;C=0;t=z;while(1){if((a[x+111056|0]|0)==(a[u+(x+t|0)|0]|0)){K=t;L=C}else{if((x|0)!=3){w=1970;break L2728}K=t-1|0;L=1}M=x+1|0;if((M|0)<(L+y|0)){x=M;C=L;t=K}else{break}}if((L|0)!=0|(M|0)==3){N=b+8|0}else{t=b+8|0;if((M|0)==9){N=t}else{J=t;break}}h[N>>3]=-1.0;c[13898]=(c[13898]|0)+1;i=e;return}}while(0);if((w|0)==1970){J=b+8|0}h[J>>3]=0.0;c[b+4>>2]=hK()|0;i=e;return}}while(0);if(!((q|0)>0&(p^1))){break L2695}A=c[10036]|0;y=0;z=0;D=s;while(1){if((a[y+205488|0]|0)==(a[A+(y+D|0)|0]|0)){O=D;P=z}else{if((y|0)!=3){break L2695}O=D-1|0;P=1}j=y+1|0;if((j|0)<(P+q|0)){y=j;z=P;D=O}else{break}}if((P|0)==0){if(!((y|0)==2|(y|0)==7)){break L2695}}D=l+2|0;c[13898]=D;z=(n|0)>(D|0);L2761:do{if(z){if((a[o+(D*40&-1)|0]&1)!=0){A=c[o+(D*40&-1)+36>>2]|0;j=o+(D*40&-1)+32|0;r=c[10036]|0;t=0;while(1){if((t|0)>=(A|0)){w=1988;break}if((a[r+((c[j>>2]|0)+t|0)|0]|0)==(a[t+77416|0]|0)){t=t+1|0}else{break}}do{if((w|0)==1988){if((t|0)!=1){break}j=b|0;if((d|0)<=5){c[j>>2]=0;uf(c[13898]|0,89200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[j>>2]=6;c[13898]=(c[13898]|0)+1;i=e;return}}while(0);if(!z){w=1993;break}}t=a[o+(D*40&-1)|0]|0;if((t&1)==0){Q=t;break}j=c[o+(D*40&-1)+36>>2]|0;r=o+(D*40&-1)+32|0;A=c[10036]|0;C=0;while(1){if((C|0)>=(j|0)){break}if((a[A+((c[r>>2]|0)+C|0)|0]|0)==(a[C+88416|0]|0)){C=C+1|0}else{Q=t;break L2761}}if((C|0)!=2){Q=t;break}c[b>>2]=4;r=(c[13898]|0)+1|0;c[13898]=r;if((r|0)>=(c[8272]|0)){uf(r,87312,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}A=c[1054]|0;L2786:do{if((a[A+(r*40&-1)|0]&1)!=0){j=c[A+(r*40&-1)+36>>2]|0;x=A+(r*40&-1)+32|0;u=c[10036]|0;R=0;while(1){if((R|0)>=(j|0)){break}if((a[u+((c[x>>2]|0)+R|0)|0]|0)==(a[R+103664|0]|0)){R=R+1|0}else{break L2786}}if((R|0)!=1){break}uf(r,87312,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);r=is(f)|0;A=c[r>>2]|0;if((A|0)==1){S=+(c[r+8>>2]|0)}else if((A|0)==2){S=+h[r+8>>3]}else if((A|0)==3){S=+uz(c[r+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}r=f|0;if((c[r>>2]|0)==3){uu(c[f+8>>2]|0);c[r>>2]=1}h[b+8>>3]=S;i=e;return}else{w=1993}}while(0);if((w|0)==1993){Q=a[o+(D*40&-1)|0]|0}z=c[o+(D*40&-1)+36>>2]|0;L2807:do{if((Q&1)!=0&(z|0)>0){y=c[10036]|0;r=0;A=0;t=c[o+(D*40&-1)+32>>2]|0;while(1){if((a[r+204616|0]|0)==(a[y+(r+t|0)|0]|0)){T=t;U=A}else{if((r|0)!=4){break L2807}T=t-1|0;U=1}C=r+1|0;if((C|0)<(U+z|0)){r=C;A=U;t=T}else{break}}if((U|0)==0){if(!((r|0)==3|(r|0)==8)){break}}c[b>>2]=5;t=(c[13898]|0)+1|0;c[13898]=t;if((t|0)>=(c[8272]|0)){uf(t,85200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}A=c[1054]|0;L2822:do{if((a[A+(t*40&-1)|0]&1)!=0){y=c[A+(t*40&-1)+36>>2]|0;C=A+(t*40&-1)+32|0;x=c[10036]|0;u=0;while(1){if((u|0)>=(y|0)){break}if((a[x+((c[C>>2]|0)+u|0)|0]|0)==(a[u+103664|0]|0)){u=u+1|0}else{break L2822}}if((u|0)!=1){break}uf(t,85200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);t=is(k)|0;A=c[t>>2]|0;if((A|0)==1){V=+(c[t+8>>2]|0)}else if((A|0)==2){V=+h[t+8>>3]}else if((A|0)==3){V=+uz(c[t+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t=k|0;if((c[t>>2]|0)==3){uu(c[k+8>>2]|0);c[t>>2]=1}h[b+8>>3]=V;if(V<0.0|V>1.0){uf(c[13898]|0,84296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{i=e;return}}}while(0);if((d|0)<=5){i=e;return}c[b>>2]=6;i=e;return}}while(0);c[13898]=l+2;c[b>>2]=2;B=is(g)|0;z=c[B>>2]|0;if((z|0)==1){W=+(c[B+8>>2]|0)}else if((z|0)==2){W=+h[B+8>>3]}else if((z|0)==3){W=+uz(c[B+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}B=g|0;if((c[B>>2]|0)==3){uu(c[g+8>>2]|0);c[B>>2]=1}c[b+4>>2]=~~W;i=e;return}}while(0);if(!((q|0)>0&(((d|0)<7|p)^1))){uf(m,83704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=c[10036]|0;d=0;g=0;l=s;while(1){if((a[d+111056|0]|0)==(a[p+(d+l|0)|0]|0)){X=l;Y=g}else{if((d|0)!=3){w=2058;break}X=l-1|0;Y=1}s=d+1|0;if((s|0)<(Y+q|0)){d=s;g=Y;l=X}else{break}}if((w|0)==2058){uf(m,83704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if((Y|0)==0){if((d|0)==2|(d|0)==8){break}uf(m,83704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[b>>2]=7;c[13898]=(c[13898]|0)+1;i=e;return}function hJ(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0.0,as=0,at=0,au=0,av=0.0,aw=0.0;j=i;i=i+72|0;k=g;g=i;i=i+16|0;c[g>>2]=c[k>>2];c[g+4>>2]=c[k+4>>2];c[g+8>>2]=c[k+8>>2];c[g+12>>2]=c[k+12>>2];k=j|0;l=j+24|0;m=j+48|0;n=b|0;c[n>>2]=d;d=b+4|0;c[d>>2]=e;e=b+8|0;c[e>>2]=f;f=b+16|0;o=f;p=g;c[o>>2]=c[p>>2];c[o+4>>2]=c[p+4>>2];c[o+8>>2]=c[p+8>>2];c[o+12>>2]=c[p+12>>2];p=c[13898]|0;o=c[8272]|0;if((p|0)>=(o|0)){i=j;return}g=c[1054]|0;q=(a[g+(p*40&-1)|0]&1)==0;if(q){i=j;return}r=c[g+(p*40&-1)+36>>2]|0;s=g+(p*40&-1)+32|0;t=c[10036]|0;u=0;while(1){if((u|0)>=(r|0)){w=2080;break}if((a[t+((c[s>>2]|0)+u|0)|0]|0)==(a[u+103664|0]|0)){u=u+1|0}else{w=2081;break}}do{if((w|0)==2080){if(!((u|0)==1|q)){break}i=j;return}else if((w|0)==2081){if(!q){break}i=j;return}}while(0);u=c[g+(p*40&-1)+36>>2]|0;s=g+(p*40&-1)+32|0;t=c[10036]|0;r=0;while(1){if((r|0)>=(u|0)){w=2085;break}if((a[t+((c[s>>2]|0)+r|0)|0]|0)==(a[r+116360|0]|0)){r=r+1|0}else{w=2086;break}}if((w|0)==2085){if((r|0)!=2){w=2086}}do{if((w|0)==2086){r=c[g+(p*40&-1)+36>>2]|0;if(!((r|0)>0&(q^1))){i=j;return}s=c[10036]|0;t=0;u=0;x=c[g+(p*40&-1)+32>>2]|0;while(1){if((a[t+121984|0]|0)==(a[s+(t+x|0)|0]|0)){y=x;z=u}else{if((t|0)!=4){w=2253;break}y=x-1|0;z=1}A=t+1|0;if((A|0)<(z+r|0)){t=A;u=z;x=y}else{break}}if((w|0)==2253){i=j;return}if((z|0)!=0){break}if((t|0)==3|(t|0)==9){break}i=j;return}}while(0);z=p+1|0;c[13898]=z;if((z|0)>=(o|0)){i=j;return}o=l|0;p=l+8|0;y=m|0;q=m+8|0;x=f|0;u=b+20|0;b=k|0;r=k+8|0;s=0;A=0;B=0;C=z;z=g;L2917:while(1){g=a[z+(C*40&-1)|0]|0;D=(g&1)==0;E=c[z+(C*40&-1)+36>>2]|0;F=z+(C*40&-1)+32|0;L2919:do{if(D){G=B;H=C;I=E;J=c[F>>2]|0;K=g}else{L=c[10036]|0;M=0;while(1){if((M|0)>=(E|0)){w=2101;break}if((a[L+((c[F>>2]|0)+M|0)|0]|0)==(a[M+103664|0]|0)){M=M+1|0}else{break}}if((w|0)==2101){w=0;if((M|0)==1){w=2256;break L2917}}L=c[F>>2]|0;if(!((E|0)>0&(D^1))){G=B;H=C;I=E;J=L;K=g;break}N=c[10036]|0;O=0;P=0;Q=L;while(1){if((a[O+96808|0]|0)==(a[N+(O+Q|0)|0]|0)){R=Q;S=P}else{if((O|0)!=5){G=B;H=C;I=E;J=L;K=g;break L2919}R=Q-1|0;S=1}T=O+1|0;if((T|0)<(S+E|0)){O=T;P=S;Q=R}else{break}}if((S|0)==0){if(!((O|0)==4|(O|0)==11)){G=B;H=C;I=E;J=L;K=g;break}}Q=C+1|0;c[13898]=Q;G=1;H=Q;I=c[z+(Q*40&-1)+36>>2]|0;J=c[z+(Q*40&-1)+32>>2]|0;K=a[z+(Q*40&-1)|0]|0}}while(0);g=(K&1)==0;L2940:do{if((I|0)>0&(g^1)){E=c[10036]|0;D=0;F=0;t=J;while(1){if((a[D+96336|0]|0)==(a[E+(D+t|0)|0]|0)){U=t;V=F}else{if((D|0)!=1){break}U=t-1|0;V=1}Q=D+1|0;if((Q|0)<(V+I|0)){D=Q;F=V;t=U}else{w=2117;break}}do{if((w|0)==2117){w=0;if((V|0)==0){if(!((D|0)==0|(D|0)==5)){break}}c[n>>2]=0;t=(c[13898]|0)+1|0;c[13898]=t;W=s;X=t;break L2940}}while(0);if(g){W=s;X=H;break}L2955:do{if((I|0)>0){D=c[10036]|0;t=0;F=0;E=J;while(1){if((a[t+115496|0]|0)==(a[D+(t+E|0)|0]|0)){Y=E;Z=F}else{if((t|0)!=1){break L2955}Y=E-1|0;Z=1}L=t+1|0;if((L|0)<(Z+I|0)){t=L;F=Z;E=Y}else{break}}if((Z|0)==0){if(!((t|0)==0|(t|0)==5)){break}}c[n>>2]=G?4:1;E=(c[13898]|0)+1|0;c[13898]=E;W=1;X=E;break L2940}}while(0);if(!((I|0)>0&(g^1))){W=s;X=H;break}E=c[10036]|0;F=0;D=0;L=J;while(1){if((a[F+95432|0]|0)==(a[E+(F+L|0)|0]|0)){_=L;$=D}else{if((F|0)!=1){W=s;X=H;break L2940}_=L-1|0;$=1}O=F+1|0;if((O|0)<($+I|0)){F=O;D=$;L=_}else{break}}if(($|0)==0){if(!((F|0)==0|(F|0)==7)){W=s;X=H;break}}c[n>>2]=G?5:2;L=(c[13898]|0)+1|0;c[13898]=L;W=1;X=L}else{W=s;X=H}}while(0);L2980:do{if((X|0)<(c[8272]|0)){g=c[1054]|0;L=(a[g+(X*40&-1)|0]&1)==0;D=c[g+(X*40&-1)+36>>2]|0;E=g+(X*40&-1)+32|0;L2982:do{if(L){aa=c[E>>2]|0}else{g=c[10036]|0;O=0;while(1){if((O|0)>=(D|0)){w=2145;break}if((a[g+((c[E>>2]|0)+O|0)|0]|0)==(a[O+103664|0]|0)){O=O+1|0}else{break}}if((w|0)==2145){w=0;if((O|0)==1){ab=A;break L2980}}g=c[E>>2]|0;if(!((D|0)>0&(L^1))){aa=g;break}t=c[10036]|0;Q=0;P=0;N=g;while(1){if((a[Q+141136|0]|0)==(a[t+(Q+N|0)|0]|0)){ac=N;ad=P}else{if((Q|0)!=2){break}ac=N-1|0;ad=1}M=Q+1|0;if((M|0)<(ad+D|0)){Q=M;P=ad;N=ac}else{w=2152;break}}do{if((w|0)==2152){w=0;if((ad|0)==0){if(!((Q|0)==1|(Q|0)==6)){break}}c[x>>2]=0;N=c[13898]|0;P=N+1|0;c[13898]=P;t=c[8272]|0;O=(t|0)>(P|0);M=c[1054]|0;T=a[M+(P*40&-1)|0]|0;L3003:do{if(O){if((T&1)==0){w=2160;break}ae=c[M+(P*40&-1)+36>>2]|0;af=M+(P*40&-1)+32|0;ag=c[10036]|0;ah=0;while(1){if((ah|0)>=(ae|0)){break}if((a[ag+((c[af>>2]|0)+ah|0)|0]|0)==(a[ah+202112|0]|0)){ah=ah+1|0}else{w=2160;break L3003}}if((ah|0)!=1){w=2160}}else{w=2160}}while(0);do{if((w|0)==2160){w=0;if((T&1)==0){break}af=c[M+(P*40&-1)+36>>2]|0;ag=M+(P*40&-1)+32|0;L3013:do{if((t|0)>(P|0)){ae=c[10036]|0;ai=0;while(1){if((ai|0)>=(af|0)){break}if((a[ae+((c[ag>>2]|0)+ai|0)|0]|0)==(a[ai+119088|0]|0)){ai=ai+1|0}else{w=2174;break L3013}}if((ai|0)!=2){w=2174}}else{w=2174}}while(0);L3019:do{if((w|0)==2174){w=0;ah=c[ag>>2]|0;L3021:do{if((af|0)>0){ae=c[10036]|0;aj=0;ak=0;al=ah;while(1){if((a[aj+116144|0]|0)==(a[ae+(aj+al|0)|0]|0)){am=al;an=ak}else{if((aj|0)!=5){break L3021}am=al-1|0;an=1}ao=aj+1|0;if((ao|0)<(an+af|0)){aj=ao;ak=an;al=am}else{break}}if((an|0)!=0){break L3019}if((aj|0)==4|(aj|0)==9){break L3019}}}while(0);L3032:do{if(O){ai=c[10036]|0;al=0;while(1){if((al|0)>=(af|0)){w=2187;break}if((a[ai+(ah+al|0)|0]|0)==(a[al+93664|0]|0)){al=al+1|0}else{break}}if((w|0)==2187){w=0;if((al|0)==3){break}}if(!O){w=2193;break}ai=c[10036]|0;aj=0;while(1){if((aj|0)>=(af|0)){break}if((a[ai+(ah+aj|0)|0]|0)==(a[aj+225056|0]|0)){aj=aj+1|0}else{w=2193;break L3032}}if((aj|0)!=2){w=2193}}else{w=2193}}while(0);do{if((w|0)==2193){w=0;if((af|0)<=0){ab=A;break L2980}ai=c[10036]|0;al=0;ak=0;ae=ah;while(1){if((a[al+139232|0]|0)==(a[ai+(al+ae|0)|0]|0)){ap=ae;aq=ak}else{if((al|0)!=5){ab=A;break L2980}ap=ae-1|0;aq=1}ao=al+1|0;if((ao|0)<(aq+af|0)){al=ao;ak=aq;ae=ap}else{break}}if((aq|0)!=0){break}if(!((al|0)==4|(al|0)==8)){ab=A;break L2980}}}while(0);c[13898]=N;hI(f,6);ab=A;break L2980}}while(0);hI(f,6);ab=A;break L2980}}while(0);c[x>>2]=1;N=is(k)|0;O=c[N>>2]|0;if((O|0)==1){ar=+(c[N+8>>2]|0)}else if((O|0)==2){ar=+h[N+8>>3]}else if((O|0)==3){ar=+uz(c[N+8>>2]|0,0)}else{w=2165;break L2917}if((c[b>>2]|0)==3){uu(c[r>>2]|0);c[b>>2]=1}c[u>>2]=~~ar-1;ab=A;break L2980}}while(0);if(!((D|0)>0&(L^1))){aa=g;break}Q=c[10036]|0;N=0;O=0;P=g;while(1){if((a[N+140856|0]|0)==(a[Q+(N+P|0)|0]|0)){as=P;at=O}else{if((N|0)!=4){aa=g;break L2982}as=P-1|0;at=1}t=N+1|0;if((t|0)<(at+D|0)){N=t;O=at;P=as}else{break}}if((at|0)==0){if(!((N|0)==3|(N|0)==8)){aa=g;break}}c[x>>2]=1;c[u>>2]=-3;c[13898]=(c[13898]|0)+1;ab=A;break L2980}}while(0);if(A|W^1){w=2258;break L2917}L3081:do{if(!L){E=c[10810]|0;if((E|0)==0){w=2259;break L2917}F=c[10036]|0;P=E;while(1){O=c[P+4>>2]|0;Q=0;while(1){if((Q|0)>=(D|0)){w=2220;break}if((a[F+(aa+Q|0)|0]|0)==(a[O+Q|0]|0)){Q=Q+1|0}else{break}}if((w|0)==2220){w=0;if((a[O+Q|0]|0)==0){w=2221;break}}t=c[P>>2]|0;if((t|0)==0){au=E;break}else{P=t}}do{if((w|0)==2221){w=0;if((a[P+8|0]&1)!=0){au=E;break}if((c[P+16>>2]|0)==1){break L3081}else{au=E}}}while(0);while(1){E=c[au+4>>2]|0;P=0;while(1){if((P|0)>=(D|0)){w=2227;break}if((a[F+(aa+P|0)|0]|0)==(a[E+P|0]|0)){P=P+1|0}else{break}}if((w|0)==2227){w=0;if((a[E+P|0]|0)==0){break}}Q=c[au>>2]|0;if((Q|0)==0){w=2261;break L2917}else{au=Q}}if((a[au+8|0]&1)!=0){w=2260;break L2917}if((c[au+16>>2]|0)!=2){w=2262;break L2917}}}while(0);D=c[n>>2]|0;if((D|0)==1|(D|0)==4){L=is(l)|0;F=c[L>>2]|0;if((F|0)==1){av=+(c[L+8>>2]|0)}else if((F|0)==2){av=+h[L+8>>3]}else if((F|0)==3){av=+uz(c[L+8>>2]|0,0)}else{w=2236;break L2917}if((c[o>>2]|0)==3){uu(c[p>>2]|0);c[o>>2]=1}L=~~(av*100.0+.5);F=(L|0)<0?0:L;c[d>>2]=(F|0)>100?100:F;ab=1;break}else if((D|0)==2|(D|0)==5){D=is(m)|0;F=c[D>>2]|0;if((F|0)==1){aw=+(c[D+8>>2]|0)}else if((F|0)==2){aw=+h[D+8>>3]}else if((F|0)==3){aw=+uz(c[D+8>>2]|0,0)}else{w=2244;break L2917}if((c[y>>2]|0)==3){uu(c[q>>2]|0);c[y>>2]=1}D=~~aw;c[e>>2]=(D|0)<0?0:D;ab=1;break}else{ab=0;break}}else{ab=A}}while(0);D=c[13898]|0;if((D|0)>=(c[8272]|0)){w=2257;break}s=W;A=ab;B=G;C=D;z=c[1054]|0}if((w|0)==2256){i=j;return}else if((w|0)==2257){i=j;return}else if((w|0)==2258){i=j;return}else if((w|0)==2259){i=j;return}else if((w|0)==2165){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((w|0)==2236){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((w|0)==2244){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((w|0)==2260){i=j;return}else if((w|0)==2261){i=j;return}else if((w|0)==2262){i=j;return}}function hK(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0.0;b=i;i=i+56|0;d=b|0;e=b+24|0;f=b+48|0;c[f>>2]=-2;g=c[13898]|0;j=c[1054]|0;k=c[j+(g*40&-1)+36>>2]|0;L3139:do{if((a[j+(g*40&-1)|0]&1)!=0&(k|0)>0){l=c[10036]|0;m=0;n=0;o=c[j+(g*40&-1)+32>>2]|0;while(1){if((a[m+123456|0]|0)==(a[l+(m+o|0)|0]|0)){p=o;q=n}else{if((m|0)!=3){r=g;break L3139}p=o-1|0;q=1}s=m+1|0;if((s|0)<(q+k|0)){m=s;n=q;o=p}else{break}}if((q|0)==0){if(!((m|0)==2|(m|0)==8)){r=g;break}}o=g-1|0;n=c[j+(o*40&-1)+36>>2]|0;if(!((a[j+(o*40&-1)|0]&1)!=0&(n|0)>0)){r=g;break}l=c[10036]|0;s=0;t=0;u=c[j+(o*40&-1)+32>>2]|0;while(1){if((a[s+170936|0]|0)==(a[l+(s+u|0)|0]|0)){w=u;x=t}else{if((s|0)!=4){r=g;break L3139}w=u-1|0;x=1}o=s+1|0;if((o|0)<(x+n|0)){s=o;t=x;u=w}else{break}}if((x|0)==0){if(!((s|0)==3|(s|0)==10)){r=g;break}}u=g+1|0;c[13898]=u;r=u}else{r=g}}while(0);L3163:do{if((r|0)<(c[8272]|0)){L3165:do{if((a[j+(r*40&-1)|0]&1)!=0){g=c[j+(r*40&-1)+36>>2]|0;x=j+(r*40&-1)+32|0;w=c[10036]|0;q=0;while(1){if((q|0)>=(g|0)){break}if((a[w+((c[x>>2]|0)+q|0)|0]|0)==(a[q+103664|0]|0)){q=q+1|0}else{break L3165}}if((q|0)==1){break L3163}}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[d>>2]|0)!=3){c[13898]=r;break}s=c[d+8>>2]|0;if((s|0)==0){break}x=c[7642]|0;w=c[x>>2]|0;do{if((w|0)==0){c[f>>2]=-1;y=2296}else{g=0;p=-1;k=w;while(1){if((aY(s|0,k|0)|0)==0){z=g;break}u=(a_(s|0,k|0,uA(k|0)|0)|0)==0&(p|0)<0?g:p;t=g+1|0;n=c[x+(t<<3)>>2]|0;if((n|0)==0){z=u;break}else{g=t;p=u;k=n}}c[f>>2]=z;if((z|0)<=-1){y=2296;break}c[f>>2]=c[x+(z<<3)+4>>2]}}while(0);if((y|0)==2296){ca(s|0,81360,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}uu(s);x=c[f>>2]|0;if((x|0)==-2){uf(c[13898]|0,79872,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{A=x;i=b;return A|0}}}while(0);y=is(e)|0;z=c[y>>2]|0;if((z|0)==1){B=+(c[y+8>>2]|0)}else if((z|0)==2){B=+h[y+8>>3]}else if((z|0)==3){B=+uz(c[y+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}y=e|0;if((c[y>>2]|0)==3){uu(c[e+8>>2]|0);c[y>>2]=1}y=~~B;c[f>>2]=y;A=y;i=b;return A|0}function hL(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0.0;e=i;i=i+64|0;f=e|0;g=e+24|0;j=c[13898]|0;L3201:do{if(d){k=c[1054]|0;l=c[k+(j*40&-1)+36>>2]|0;m=c[k+(j*40&-1)+32>>2]|0;n=(a[k+(j*40&-1)|0]&1)==0;L3204:do{if((l|0)>0&(n^1)){o=c[10036]|0;p=0;q=0;r=m;while(1){if((a[p+78616|0]|0)==(a[o+(p+r|0)|0]|0)){s=r;t=q}else{if((p|0)!=6){u=2320;break L3204}s=r-1|0;t=1}w=p+1|0;if((w|0)<(t+l|0)){p=w;q=t;r=s}else{break}}if((t|0)!=0){break}if(!((p|0)==5|(p|0)==10)){u=2320}}else{u=2320}}while(0);if((u|0)==2320){r=c[8272]|0;if((r|0)<=(j|0)|n){x=r;break}q=c[10036]|0;o=0;while(1){if((o|0)>=(l|0)){break}if((a[q+(m+o|0)|0]|0)==(a[o+124464|0]|0)){o=o+1|0}else{x=r;break L3201}}if((o|0)!=2){x=r;break}}m=j+1|0;c[13898]=m;q=c[k+(m*40&-1)+36>>2]|0;L3222:do{if((a[k+(m*40&-1)|0]&1)!=0&(q|0)>0){l=c[10036]|0;n=0;w=0;y=c[k+(m*40&-1)+32>>2]|0;while(1){if((a[n+111056|0]|0)==(a[l+(n+y|0)|0]|0)){z=y;A=w}else{if((n|0)!=3){break L3222}z=y-1|0;A=1}B=n+1|0;if((B|0)<(A+q|0)){n=B;w=A;y=z}else{break}}if((A|0)==0){if(!((n|0)==2|(n|0)==8)){break}}c[b>>2]=-3;c[13898]=(c[13898]|0)+1;i=e;return}}while(0);q=is(f)|0;m=c[q>>2]|0;if((m|0)==3){C=+uz(c[q+8>>2]|0,0)}else if((m|0)==2){C=+h[q+8>>3]}else if((m|0)==1){C=+(c[q+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}q=f|0;if((c[q>>2]|0)==3){uu(c[f+8>>2]|0);c[q>>2]=1}q=~~C;m=43296;while(1){D=c[m>>2]|0;if((D|0)==0){u=2347;break}if((c[D+4>>2]|0)==(q|0)){u=2346;break}else{m=D|0}}if((u|0)==2346){uD(b|0,D+8|0,112);i=e;return}else if((u|0)==2347){c[b>>2]=-1;c[b+4>>2]=0;m=b+8|0;c[m>>2]=c[12872];c[m+4>>2]=c[12873];c[m+8>>2]=c[12874];c[m+12>>2]=c[12875];c[m+16>>2]=c[12876];c[m+20>>2]=c[12877];c[m+24>>2]=c[12878];c[m+28>>2]=c[12879];c[m+32>>2]=c[12880];c[m+36>>2]=c[12881];c[m+40>>2]=c[12882];c[m+44>>2]=c[12883];c[m+48>>2]=c[12884];c[m+52>>2]=c[12885];c[b+64>>2]=1;h[b+72>>3]=0.0;c[b+80>>2]=0;h[b+88>>3]=15.0;h[b+96>>3]=90.0;c[b+104>>2]=0;uh(-1,79128,(v=i,i=i+8|0,c[v>>2]=q,v)|0);i=e;return}}else{x=c[8272]|0}}while(0);L3254:do{if((j|0)<(x|0)){D=b+64|0;f=g+8|0;A=g+4|0;z=g|0;t=g+16|0;s=b+72|0;d=b+80|0;m=g+24|0;k=b+88|0;r=g+32|0;o=b+96|0;y=b+4|0;w=b+8|0;l=b+104|0;p=0;B=0;E=0;F=0;G=0;H=j;I=x;L3256:while(1){J=c[1054]|0;K=(a[J+(H*40&-1)|0]&1)==0;L3258:do{if(!K){L=c[J+(H*40&-1)+36>>2]|0;M=J+(H*40&-1)+32|0;N=c[10036]|0;O=0;while(1){if((O|0)>=(L|0)){break}if((a[N+((c[M>>2]|0)+O|0)|0]|0)==(a[O+103664|0]|0)){O=O+1|0}else{break L3258}}if((O|0)==1){P=G;Q=F;R=E;S=B;T=p;U=H;break L3254}}}while(0);n=(I|0)>(H|0);L3265:do{if(n){do{if(!K){M=c[J+(H*40&-1)+36>>2]|0;N=J+(H*40&-1)+32|0;L=c[10036]|0;V=0;while(1){if((V|0)>=(M|0)){u=2358;break}if((a[L+((c[N>>2]|0)+V|0)|0]|0)==(a[V+150816|0]|0)){V=V+1|0}else{break}}do{if((u|0)==2358){u=0;if((V|0)!=6){break}N=B+1|0;if((B|0)!=0){P=G;Q=F;R=E;S=N;T=p;U=H;break L3254}c[13898]=H+1;c[D>>2]=0;W=G;X=F;Y=E;Z=N;_=p;break L3265}}while(0);if(!n){u=2387;break L3265}if(K){break}V=c[J+(H*40&-1)+36>>2]|0;N=J+(H*40&-1)+32|0;L=c[10036]|0;M=0;while(1){if((M|0)>=(V|0)){u=2367;break}if((a[L+((c[N>>2]|0)+M|0)|0]|0)==(a[M+148912|0]|0)){M=M+1|0}else{break}}do{if((u|0)==2367){u=0;if((M|0)!=4){break}N=B+1|0;if((B|0)!=0){P=G;Q=F;R=E;S=N;T=p;U=H;break L3254}c[13898]=H+1;c[D>>2]=1;W=G;X=F;Y=E;Z=N;_=p;break L3265}}while(0);if(!n){u=2387;break L3265}if(K){break}M=c[J+(H*40&-1)+36>>2]|0;N=J+(H*40&-1)+32|0;L=c[10036]|0;V=0;while(1){if((V|0)>=(M|0)){u=2375;break}if((a[L+((c[N>>2]|0)+V|0)|0]|0)==(a[V+146928|0]|0)){V=V+1|0}else{break}}do{if((u|0)==2375){u=0;if((V|0)!=8){break}N=B+1|0;if((B|0)!=0){P=G;Q=F;R=E;S=N;T=p;U=H;break L3254}c[13898]=H+1;c[D>>2]=2;W=G;X=F;Y=E;Z=N;_=p;break L3265}}while(0);if(!n){u=2387;break L3265}if(K){break}V=c[J+(H*40&-1)+36>>2]|0;N=J+(H*40&-1)+32|0;L=c[10036]|0;M=0;while(1){if((M|0)>=(V|0)){break}if((a[L+((c[N>>2]|0)+M|0)|0]|0)==(a[M+144768|0]|0)){M=M+1|0}else{u=2387;break L3265}}if((M|0)!=5){u=2387;break L3265}N=B+1|0;if((B|0)!=0){P=G;Q=F;R=E;S=N;T=p;U=H;break L3254}c[13898]=H+1;c[D>>2]=3;W=G;X=F;Y=E;Z=N;_=p;break L3265}}while(0);$=c[J+(H*40&-1)+36>>2]|0;aa=c[J+(H*40&-1)+32>>2]|0;u=2397}else{u=2387}}while(0);L3306:do{if((u|0)==2387){u=0;O=c[J+(H*40&-1)+36>>2]|0;N=c[J+(H*40&-1)+32>>2]|0;if(!((O|0)>0&(K^1))){ab=O;ac=N;u=2415;break}L=c[10036]|0;V=0;ad=0;ae=N;while(1){if((a[V+75200|0]|0)==(a[L+(V+ae|0)|0]|0)){af=ae;ag=ad}else{if((V|0)!=4){$=O;aa=N;u=2397;break L3306}af=ae-1|0;ag=1}ah=V+1|0;if((ah|0)<(ag+O|0)){V=ah;ad=ag;ae=af}else{break}}if((ag|0)==0){if(!((V|0)==3|(V|0)==6)){$=O;aa=N;u=2397;break}}ae=F+1|0;if((F|0)!=0){P=G;Q=ae;R=E;S=B;T=p;U=H;break L3254}c[13898]=H+1;c[l>>2]=2;W=G;X=ae;Y=E;Z=B;_=p}}while(0);L3320:do{if((u|0)==2397){u=0;if(K){ab=$;ac=aa;u=2415;break}L3323:do{if(($|0)>0){ae=c[10036]|0;ad=0;do{if((a[ad+127904|0]|0)!=(a[ae+(ad+aa|0)|0]|0)){break L3323}ad=ad+1|0;}while((ad|0)<($|0));if((ad|0)!=5){break}ae=F+1|0;if((F|0)!=0){P=G;Q=ae;R=E;S=B;T=p;U=H;break L3254}c[13898]=H+1;c[l>>2]=1;W=G;X=ae;Y=E;Z=B;_=p;break L3320}}while(0);if(!(($|0)>0&(K^1))){ab=$;ac=aa;u=2415;break}N=c[10036]|0;O=0;V=0;ae=aa;while(1){if((a[O+74368|0]|0)==(a[N+(O+ae|0)|0]|0)){ai=ae;aj=V}else{if((O|0)!=6){ab=$;ac=aa;u=2415;break L3320}ai=ae-1|0;aj=1}M=O+1|0;if((M|0)<(aj+$|0)){O=M;V=aj;ae=ai}else{break}}if((aj|0)==0){if(!((O|0)==5|(O|0)==8)){ab=$;ac=aa;u=2415;break}}ae=F+1|0;if((F|0)!=0){P=G;Q=ae;R=E;S=B;T=p;U=H;break L3254}c[13898]=H+1;c[l>>2]=0;W=G;X=ae;Y=E;Z=B;_=p}}while(0);L3344:do{if((u|0)==2415){u=0;L3346:do{if(!(K|n^1)){ae=c[10036]|0;V=0;while(1){if((V|0)>=(ab|0)){u=2419;break}if((a[ae+(ac+V|0)|0]|0)==(a[V+130496|0]|0)){V=V+1|0}else{break}}do{if((u|0)==2419){u=0;if((V|0)!=4){break}ad=E+1|0;if((E|0)!=0){P=G;Q=F;R=ad;S=B;T=p;U=H;break L3254}c[f>>2]=0;c[A>>2]=0;c[z>>2]=0;ak=H+1|0;c[13898]=ak;if((ak|0)>=(I|0)){u=2454;break L3256}L3356:do{if((a[J+(ak*40&-1)|0]&1)!=0){N=c[J+(ak*40&-1)+36>>2]|0;M=J+(ak*40&-1)+32|0;L=0;while(1){if((L|0)>=(N|0)){break}if((a[ae+((c[M>>2]|0)+L|0)|0]|0)==(a[L+103664|0]|0)){L=L+1|0}else{break L3356}}if((L|0)==1){u=2453;break L3256}}}while(0);dl(g,0);h[s>>3]=+h[t>>3];c[d>>2]=c[z>>2];C=+h[m>>3];h[k>>3]=C;al=+h[r>>3];h[o>>3]=al;if(al>C){W=G;X=F;Y=ad;Z=B;_=p;break L3344}h[o>>3]=90.0;W=G;X=F;Y=ad;Z=B;_=p;break L3344}}while(0);if(K|n^1){break}ae=c[10036]|0;V=0;while(1){if((V|0)>=(ab|0)){u=2434;break}if((a[ae+(ac+V|0)|0]|0)==(a[V+150704|0]|0)){V=V+1|0}else{break}}do{if((u|0)==2434){u=0;if((V|0)!=4){break}ae=G+1|0;if((G|0)!=0){P=ae;Q=F;R=E;S=B;T=p;U=H;break L3254}c[13898]=H+1;c[y>>2]=0;W=ae;X=F;Y=E;Z=B;_=p;break L3344}}while(0);if(K|n^1){break}V=c[10036]|0;ae=0;while(1){if((ae|0)>=(ab|0)){break}if((a[V+(ac+ae|0)|0]|0)==(a[ae+150856|0]|0)){ae=ae+1|0}else{break L3346}}if((ae|0)!=5){break}V=G+1|0;if((G|0)!=0){P=V;Q=F;R=E;S=B;T=p;U=H;break L3254}c[13898]=H+1;c[y>>2]=1;W=V;X=F;Y=E;Z=B;_=p;break L3344}}while(0);hH(w,1,0);O=c[13898]|0;if((H|0)==(O|0)){P=G;Q=F;R=E;S=B;T=p;U=H;break L3254}V=p+1|0;if((p|0)==0){W=G;X=F;Y=E;Z=B;_=V}else{P=G;Q=F;R=E;S=B;T=V;U=O;break L3254}}}while(0);n=c[13898]|0;K=c[8272]|0;if((n|0)<(K|0)){p=_;B=Z;E=Y;F=X;G=W;H=n;I=K}else{P=W;Q=X;R=Y;S=Z;T=_;U=n;break L3254}}if((u|0)==2453){uf(ak,73632,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==2454){uf(ak,73632,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{P=0;Q=0;R=0;S=0;T=0;U=j}}while(0);if((P|0)>1|(T|0)>1|(S|0)>1|(R|0)>1|(Q|0)>1){uf(U,98720,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{i=e;return}}function hM(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,x=0,y=0,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0.0,af=0,ag=0.0,ah=0,ai=0.0,aj=0.0;b=i;i=i+1032|0;d=b|0;e=b+48|0;f=b+96|0;j=b+144|0;k=b+192|0;l=b+448|0;m=b+520|0;n=b+776|0;o=m|0;p=n|0;if((a[14080]&1)==0){i=b;return}L3395:do{if((c[8496]|0)==0){a[o]=0}else{do{if((a[37384]&1)!=0){if(+P(+(+aX(+(+g[3536]),90.0)))<.1){if(+P(+(+aX(+(+g[3538]),180.0)))<.1){break}}a[p]=0;q=n+(uA(p|0)|0)|0;a[q]=a[147088]|0;a[q+1|0]=a[147089|0]|0;a[q+2|0]=a[147090|0]|0;a[q+3|0]=a[147091|0]|0;a[q+4|0]=a[147092|0]|0;a[q+5|0]=a[147093|0]|0;a[q+6|0]=a[147094|0]|0;q=c[8503]|0;uC(p|0,q|0);q=n+(uA(p|0)|0)|0;a[q]=a[86120]|0;a[q+1|0]=a[86121|0]|0;a[q+2|0]=a[86122|0]|0;q=c[8503]|0;uC(p|0,q|0);uD(n+(uA(p|0)|0)|0,146840,11);q=c[8503]|0;uC(p|0,q|0);q=n+(uA(p|0)|0)|0;a[q]=a[86120]|0;a[q+1|0]=a[86121|0]|0;a[q+2|0]=a[86122|0]|0;q=c[8503]|0;uC(p|0,q|0);r=+g[3538];s=+g[3536];t=+g[3534];u=+g[3532];be(o|0,p|0,(v=i,i=i+32|0,h[v>>3]=r,h[v+8>>3]=s,h[v+16>>3]=t,h[v+24>>3]=u,v)|0);break L3395}}while(0);do{if((c[17261]&3|0)==0){if((c[17089]&3|0)!=0){break}q=iq(o,+h[3470],+h[3468],c[8506]|0,c[8510]|0)|0;if((a[26192]&1)==0){break L3395}u=+h[3470];t=+h[3468];x=k|0;y=l|0;uD(x|0,236632,255);z=c[8503]|0;uC(x|0,z|0);z=k+(uA(x|0)|0)|0;a[z]=a[86120]|0;a[z+1|0]=a[86121|0]|0;a[z+2|0]=a[86122|0]|0;z=c[8503]|0;uC(x|0,z|0);uD(k+(uA(x|0)|0)|0,145e3,14);z=c[8503]|0;uC(x|0,z|0);z=k+(uA(x|0)|0)|0;a[z]=a[86120]|0;a[z+1|0]=a[86121|0]|0;a[z+2|0]=a[86122|0]|0;z=c[8503]|0;uC(x|0,z|0);s=+h[3275];do{if((a[66164]&1)==0){A=u-s}else{if(s==0.0){A=99999.0;break}A=u/s}}while(0);r=+h[3276];do{if((a[65476]&1)==0){B=t-r}else{if(r==0.0){B=99999.0;break}B=t/r}}while(0);be(q|0,x|0,(v=i,i=i+32|0,h[v>>3]=s,h[v+8>>3]=r,h[v+16>>3]=A,h[v+24>>3]=B,v)|0);if((c[8500]|0)==0){break L3395}z=(a[66164]&1)==0;if(z){C=u}else{D=+_(+u);C=D/+h[8272]}E=(a[65476]&1)==0;if(E){F=t}else{D=+_(+t);F=D/+h[8186]}D=+h[3275];if(z){G=D}else{H=+_(+D);G=H/+h[8272]}H=+h[3276];if(E){I=H}else{D=+_(+H);I=D/+h[8186]}a[x]=0;E=k+(uA(x|0)|0)|0;a[E]=a[126656]|0;a[E+1|0]=a[126657|0]|0;a[E+2|0]=a[126658|0]|0;E=c[8503]|0;uC(x|0,E|0);D=C-G;H=F-I;J=+Q(+(D*D+H*H));if((c[8500]|0)==1){K=+Y(+H,+D)*57.29577951308232;uD(k+(uA(x|0)|0)|0,144496,13);L=K}else{if(D==0.0){M=H>0.0?8.988465674311579e+307:-8.988465674311579e+307}else{M=H/D}E=k+(uA(x|0)|0)|0;z=c[8503]|0;be(E|0,144344,(v=i,i=i+8|0,c[v>>2]=z,v)|0);L=M}be(y|0,x|0,(v=i,i=i+16|0,h[v>>3]=J,h[v+8>>3]=L,v)|0);uC(q|0,y|0);break L3395}}while(0);if((c[16573]&3|0)==0){N=o}else{z=m+2|0;a[o]=a[146632]|0;a[o+1|0]=a[146633|0]|0;a[o+2|0]=a[146634|0]|0;J=+h[3470];if(J<8.988465674311579e+307){if((c[16546]|0)==1){E=c9(2)|0;R=a8(E|0,10)|0;if((R|0)!=0){S=R;do{a[S]=32;S=a8(E|0,10)|0;}while((S|0)!=0)}D=+h[3470];t3(j,D);H=D- +O(+D);t4(z,40,E,j,H)}else{S=c[8503]|0;be(z|0,S|0,(v=i,i=i+8|0,h[v>>3]=J,v)|0)}T=m+((uA(z|0)|0)+2|0)|0}else{T=z}a[T]=32;N=T+1|0}if((c[16401]&3|0)==0){U=N}else{S=N+2|0;a[N]=a[146472]|0;a[N+1|0]=a[146473|0]|0;a[N+2|0]=a[146474|0]|0;H=+h[3468];if(H<8.988465674311579e+307){if((c[16374]|0)==1){R=c9(1)|0;V=a8(R|0,10)|0;if((V|0)!=0){W=V;do{a[W]=32;W=a8(R|0,10)|0;}while((W|0)!=0)}J=+h[3468];t3(f,J);D=J- +O(+J);t4(S,40,R,f,D)}else{W=c[8503]|0;be(S|0,W|0,(v=i,i=i+8|0,h[v>>3]=H,v)|0)}X=N+((uA(S|0)|0)+2|0)|0}else{X=S}a[X]=32;U=X+1|0}if((c[17261]&3|0)==0){Z=U}else{W=U+3|0;z=U;w=4010616;a[z]=w&255;w=w>>8;a[z+1|0]=w&255;w=w>>8;a[z+2|0]=w&255;w=w>>8;a[z+3|0]=w&255;D=+h[3469];if(D<8.988465674311579e+307){if((c[17234]|0)==1){z=c9(6)|0;E=a8(z|0,10)|0;if((E|0)!=0){V=E;do{a[V]=32;V=a8(z|0,10)|0;}while((V|0)!=0)}H=+h[3469];t3(e,H);J=H- +O(+H);t4(W,40,z,e,J)}else{V=c[8503]|0;be(W|0,V|0,(v=i,i=i+8|0,h[v>>3]=D,v)|0)}$=U+((uA(W|0)|0)+3|0)|0}else{$=W}a[$]=32;Z=$+1|0}if((c[17089]&3|0)==0){aa=Z}else{V=Z+3|0;S=Z;w=4010617;a[S]=w&255;w=w>>8;a[S+1|0]=w&255;w=w>>8;a[S+2|0]=w&255;w=w>>8;a[S+3|0]=w&255;J=+h[3467];if(J<8.988465674311579e+307){if((c[17062]|0)==1){S=c9(5)|0;R=a8(S|0,10)|0;if((R|0)!=0){E=R;do{a[E]=32;E=a8(S|0,10)|0;}while((E|0)!=0)}D=+h[3467];t3(d,D);H=D- +O(+D);t4(V,40,S,d,H)}else{E=c[8503]|0;be(V|0,E|0,(v=i,i=i+8|0,h[v>>3]=J,v)|0)}ab=Z+((uA(V|0)|0)+3|0)|0}else{ab=V}a[ab]=32;aa=ab+1|0}do{if((a[26192]&1)==0){ac=aa}else{if((c[16573]&3|0)==0){ad=aa}else{E=aa;w=4028516;a[E]=w&255;w=w>>8;a[E+1|0]=w&255;w=w>>8;a[E+2|0]=w&255;w=w>>8;a[E+3|0]=w&255;E=aa+3|0;W=c[8503]|0;do{if((a[66164]&1)==0){ae=+h[3470]- +h[3275]}else{H=+h[3275];if(H==0.0){ae=99999.0;break}ae=+h[3470]/H}}while(0);be(E|0,W|0,(v=i,i=i+8|0,h[v>>3]=ae,v)|0);ad=aa+(uA(aa|0)|0)|0}if((c[16401]&3|0)==0){af=ad}else{y=ad;w=4028772;a[y]=w&255;w=w>>8;a[y+1|0]=w&255;w=w>>8;a[y+2|0]=w&255;w=w>>8;a[y+3|0]=w&255;y=ad+3|0;q=c[8503]|0;do{if((a[65476]&1)==0){ag=+h[3468]- +h[3276]}else{t=+h[3276];if(t==0.0){ag=99999.0;break}ag=+h[3468]/t}}while(0);be(y|0,q|0,(v=i,i=i+8|0,h[v>>3]=ag,v)|0);af=ad+(uA(ad|0)|0)|0}if((c[17261]&3|0)==0){ah=af}else{a[af]=a[145552]|0;a[af+1|0]=a[145553|0]|0;a[af+2|0]=a[145554|0]|0;a[af+3|0]=a[145555|0]|0;a[af+4|0]=a[145556|0]|0;W=af+4|0;E=c[8503]|0;do{if((a[68916]&1)==0){ai=+h[3469]- +h[3277]}else{t=+h[3277];if(t==0.0){ai=99999.0;break}ai=+h[3469]/t}}while(0);be(W|0,E|0,(v=i,i=i+8|0,h[v>>3]=ai,v)|0);ah=af+(uA(af|0)|0)|0}if((c[17089]&3|0)==0){ac=ah;break}a[ah]=a[145256]|0;a[ah+1|0]=a[145257|0]|0;a[ah+2|0]=a[145258|0]|0;a[ah+3|0]=a[145259|0]|0;a[ah+4|0]=a[145260|0]|0;q=ah+4|0;y=c[8503]|0;do{if((a[68228]&1)==0){aj=+h[3467]- +h[3278]}else{t=+h[3278];if(t==0.0){aj=99999.0;break}aj=+h[3467]/t}}while(0);be(q|0,y|0,(v=i,i=i+8|0,h[v>>3]=aj,v)|0);ac=ah+(uA(ah|0)|0)|0}}while(0);a[ac-1|0]=0}}while(0);ac=c[(c[3524]|0)+120>>2]|0;if((ac|0)==0){i=b;return}cN[ac&255](0,o);i=b;return}function hN(b,d,e,f,g,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;i=i|0;var j=0,k=0.0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0;j=(a[37384]&1)==0;do{if(j){if((c[7939]|0)==(c[7938]|0)){h[g>>3]=8.988465674311579e+307;h[e>>3]=8.988465674311579e+307}else{k=+(b|0);h[e>>3]=(k- +(c[16536]|0))/+h[8269]+ +h[8255];h[g>>3]=(k- +(c[17224]|0))/+h[8613]+ +h[8599]}if((c[7941]|0)==(c[7940]|0)){h[i>>3]=8.988465674311579e+307;h[f>>3]=8.988465674311579e+307;break}else{k=+(d|0);h[f>>3]=(k- +(c[16364]|0))/+h[8183]+ +h[8169];h[i>>3]=(k- +(c[17052]|0))/+h[8527]+ +h[8513];break}}else{l=b-(c[18064]|0)|0;m=d-(c[18062]|0)|0;n=c[18060]|0;o=c[18058]|0;do{if((((n|0)>-1?n:-n|0)|0)>(((o|0)>-1?o:-o|0)|0)){k=+h[8255];h[e>>3]=k+ +(l|0)/+(n|0)*(+h[8256]-k)}else{if((o|0)==0){h[e>>3]=8.988465674311579e+307;break}else{k=+h[8255];h[e>>3]=k+ +(m|0)/+(o|0)*(+h[8256]-k);break}}}while(0);o=c[18056]|0;n=c[18054]|0;do{if((((o|0)>-1?o:-o|0)|0)>(((n|0)>-1?n:-n|0)|0)){k=+h[8169];h[f>>3]=k+ +(l|0)/+(o|0)*(+h[8170]-k)}else{if((n|0)==0){h[f>>3]=8.988465674311579e+307;break}else{k=+h[8169];h[f>>3]=k+ +(m|0)/+(n|0)*(+h[8170]-k);break}}}while(0);h[i>>3]=8.988465674311579e+307;h[g>>3]=8.988465674311579e+307}}while(0);k=+h[e>>3];if((a[66164]&1)==0){p=k}else{p=+Z(+(k*+h[8272]))}h[e>>3]=p;p=+h[f>>3];if((a[65476]&1)==0){q=p}else{q=+Z(+(p*+h[8186]))}h[f>>3]=q;if(!j){return}q=+h[g>>3];if((a[68916]&1)==0){r=q}else{r=+Z(+(q*+h[8616]))}h[g>>3]=r;r=+h[i>>3];if((a[68228]&1)==0){s=r}else{s=+Z(+(r*+h[8530]))}h[i>>3]=s;return}function hO(b){b=b|0;var d=0,e=0;c[8512]=0;c[14056]=0;do{if((b|0)!=0){if(!(a[21856]|0)){break}d=c[(c[3524]|0)+128>>2]|0;if((d|0)!=0){cR[d&127](0,0,0)}a[21856]=0;if((c[8501]|0)==0){break}d=c[m>>2]|0;aI(147352,19,1,d|0)}}while(0);d=c[3524]|0;do{if((d|0)!=0){e=c[d+128>>2]|0;if((e|0)==0){break}cR[e&127](0,0,0);if((c[8498]|0)==0){break}e=c[(c[3524]|0)+120>>2]|0;if((e|0)==0){break}cN[e&255](1,179864);cN[c[(c[3524]|0)+120>>2]&255](2,179864)}}while(0);do{if((c[8026]|0)!=0){c[8026]=0;d=c[3524]|0;if((d|0)==0){break}e=c[d>>2]|0;if((a_(222936,e|0,3)|0)!=0){if((a_(163e3,e|0,3)|0)!=0){break}}e=c[o>>2]|0;b6(10,e|0)}}while(0);if((b|0)==1){return}c[b+12>>2]=1062;c[b+16>>2]=0;hQ(b,1);return}function hP(b){b=b|0;var d=0;if((b|0)==0){d=147656;return d|0}if(!(a[21856]|0)){d=0;return d|0}b=c[(c[3524]|0)+128>>2]|0;if((b|0)!=0){cR[b&127](0,0,0)}a[21856]=0;if((c[8501]|0)==0){d=0;return d|0}aI(147352,19,1,c[m>>2]|0);d=0;return d|0}function hQ(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=i;f=c[b+12>>2]|0;g=c[b+16>>2]|0;h=c[b+4>>2]|0;j=c[b+8>>2]|0;if((c[14128]|0)==0){hS()}k=c[8512]|0;do{if((k&1|0)==0){l=f;n=k&255}else{if((f&255|0)!=0){l=f;n=k&255;break}o=bC(f|0)|0;l=o;n=c[8512]&255}}while(0);if(!((l|0)<1|(c[8026]&8|0)==0|d^1)){ir(+(h|0),+(j|0),0,l);i=e;return}f=c[14128]|0;if((f|0)==0){i=e;return}k=(g&1|0)==0;g=b+20|0;o=f;L3631:while(1){do{if((l|0)==(c[o+4>>2]|0)){if(((a[o+8|0]^n)&6)!=0){break}f=e6(147896)|0;if((f|0)!=0){a[f+8|0]=0;p=c[g>>2]|0;c[f+16>>2]=1;c[f+24>>2]=p}if((a[o+20|0]&1)!=0){q=o+12|0;if((c[q>>2]|0)!=0){r=2635;break L3631}}if(!d){r=2655;break L3631}if(k){s=c[o+12>>2]|0;if((s|0)!=0){r=2644;break L3631}}p=c[o+16>>2]|0;if((p|0)==0){f=c[m>>2]|0;cf(f|0,123008,(v=i,i=i+16|0,c[v>>2]=105800,c[v+8>>2]=1370,v)|0);break}else{cO[p&255](b);break}}}while(0);p=c[o+24>>2]|0;if((p|0)==0){r=2652;break}else{o=p}}if((r|0)==2635){if(d){ir(+(h|0),+(j|0),0,l)}else{ir(0.0,0.0,0,l)}l=c[q>>2]|0;if((l|0)==0){t=0}else{t=bP(l|0)|0}dL(t);c[b>>2]=3;i=e;return}else if((r|0)==2655){i=e;return}else if((r|0)==2644){dL(bP(s|0)|0);i=e;return}else if((r|0)==2652){i=e;return}}function hR(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+32|0;g=f|0;if((c[14128]|0)==0){hS()}do{if((d|0)==0){hT(b)}else{hV(b,d,0);if(!e){break}if((hZ(g,b)|0)==0){break}h=c[14128]|0;if((h|0)==0){break}j=c[g+4>>2]|0;k=a[g+8|0]|0;l=h;do{do{if((j|0)==(c[l+4>>2]|0)){if(((a[l+8|0]^k)&6)!=0){break}a[l+20|0]=1}}while(0);l=c[l+24>>2]|0;}while((l|0)!=0)}}while(0);if((b|0)==0){i=f;return}uu(b);i=f;return}function hS(){var a=0,b=0,d=0;a=c[14128]|0;if((a|0)!=0){b=a;while(1){a=b+12|0;d=c[a>>2]|0;if((d|0)!=0){uu(d);c[a>>2]=0}a=c[b+24>>2]|0;uu(b);if((a|0)==0){break}else{b=a}}}c[14128]=0;hV(205056,0,182);hV(204680,0,172);hV(204424,0,14);hV(204128,0,120);hV(203920,0,40);hV(203672,0,86);hV(203432,0,104);hV(164840,0,156);hV(193632,0,122);hV(170288,0,66);hV(170224,0,100);hV(40160,0,32);hV(170216,0,202);hV(170208,0,92);hV(174448,0,44);hV(169624,0,78);hV(198400,0,196);hV(197952,0,206);hV(122560,0,150);hV(164216,0,46);hV(151360,0,134);hV(178184,0,174);hV(147552,0,24);hV(83696,0,74);return}function hT(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+48|0;e=d|0;if((c[14128]|0)==0){hS()}if((b|0)==0){f=d+32|0;uD(f|0,56584,12);g=c[m>>2]|0;aF(10,g|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=79120,c[v+8>>2]=78520,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=78176,c[v+8>>2]=77480,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=179864,c[v+8>>2]=77024,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=76336,c[v+8>>2]=75728,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=75192,c[v+8>>2]=74816,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=74352,c[v+8>>2]=73928,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=73616,c[v+8>>2]=72992,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=225216,c[v+8>>2]=224776,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=223768,c[v+8>>2]=223184,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=222680,c[v+8>>2]=221840,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=221376,c[v+8>>2]=220792,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=219032,c[v+8>>2]=218520,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=217968,c[v+8>>2]=217472,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=216736,c[v+8>>2]=216288,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=215744,c[v+8>>2]=215256,v)|0);g=c[m>>2]|0;cf(g|0,f|0,(v=i,i=i+16|0,c[v>>2]=214784,c[v+8>>2]=214224,v)|0);f=c[m>>2]|0;aF(10,f|0);f=c[m>>2]|0;cf(f|0,213488,(v=i,i=i+16|0,c[v>>2]=212928,c[v+8>>2]=212352,v)|0);f=c[m>>2]|0;cf(f|0,211856,(v=i,i=i+16|0,c[v>>2]=211392,c[v+8>>2]=210904,v)|0);f=c[m>>2]|0;aF(10,f|0);f=c[14128]|0;if((f|0)!=0){g=f;do{h$(g);g=c[g+24>>2]|0;}while((g|0)!=0)}g=c[m>>2]|0;aF(10,g|0);g=c[m>>2]|0;aI(210240,67,1,g|0);g=c[m>>2]|0;aF(10,g|0);i=d;return}if((hZ(e,b)|0)==0){i=d;return}b=c[14128]|0;if((b|0)==0){i=d;return}g=c[e+4>>2]|0;f=a[e+8|0]|0;e=b;while(1){if((g|0)==(c[e+4>>2]|0)){if(((a[e+8|0]^f)&6)==0){break}}b=c[e+24>>2]|0;if((b|0)==0){h=2693;break}else{e=b}}if((h|0)==2693){i=d;return}h$(e);i=d;return}function hU(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0;f=i;if(!((b|0)!=0&(c[6928]|0)!=0)){dP();i=f;return}g=c[200]|0;do{if((a[64788+(g*688&-1)|0]&1)==0){j=2704}else{k=c[64652+(g*688&-1)>>2]|0;if((k&1|0)==0){if(+h[64680+(g*688&-1)>>3]<=0.0){break}}if((k&2|0)!=0){j=2704;break}if(+h[64688+(g*688&-1)>>3]>0.0){j=2704}}}while(0);L3731:do{if((j|0)==2704){g=c[144]|0;do{if((a[64788+(g*688&-1)|0]&1)!=0){k=c[64652+(g*688&-1)>>2]|0;if((k&1|0)==0){if(+h[64680+(g*688&-1)>>3]<=0.0){break L3731}}if((k&2|0)!=0){break}if(+h[64688+(g*688&-1)>>3]<=0.0){break L3731}}}while(0);g=c[34]|0;do{if((a[64788+(g*688&-1)|0]&1)!=0){k=c[64652+(g*688&-1)>>2]|0;if((k&1|0)==0){if(+h[64680+(g*688&-1)>>3]<=0.0){break L3731}}if((k&2|0)!=0){break}if(+h[64688+(g*688&-1)>>3]<=0.0){break L3731}}}while(0);if((a[66852]&1)!=0){g=c[16679]|0;if(!((g&1|0)!=0|+h[8343]>0.0)){break}if(!((g&2|0)!=0|+h[8344]>0.0)){break}}fv(b,d,e);i=f;return}}while(0);uk(164960,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function hV(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;g=ut(28)|0;do{if((g|0)==0){gk();h=ut(28)|0;if((h|0)!=0){j=h;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=81336,v)|0)}else{j=g}}while(0);g=j;if((hZ(g,b)|0)==0){uu(j);i=f;return}b=c[14128]|0;do{if((b|0)==0){c[14128]=g;k=g}else{h=c[j+4>>2]|0;l=j+8|0;m=b;while(1){if((h|0)==(c[m+4>>2]|0)){if(((a[m+8|0]^a[l])&6)==0){break}}n=c[m+24>>2]|0;if((n|0)==0){o=2741;break}else{m=n}}if((o|0)==2741){c[(c[b>>2]|0)+24>>2]=g;c[j>>2]=c[c[14128]>>2];k=c[14128]|0;break}do{if((d|0)==0){c[m+16>>2]=e}else{if((a[d]|0)==0){h_(m);break}l=m+12|0;h=c[l>>2]|0;if((h|0)!=0){uu(h);c[l>>2]=0}c[l>>2]=d}}while(0);uu(j);i=f;return}}while(0);c[k>>2]=g;c[j+24>>2]=0;a[j+20|0]=0;if((d|0)==0){c[j+16>>2]=e;i=f;return}if((a[d]|0)==0){h_(g);i=f;return}else{c[j+12>>2]=d;i=f;return}}function hW(){var b=0,d=0,e=0,f=0.0,g=0,j=0.0,k=0.0,l=0,m=0.0,n=0,o=0,p=0.0;b=i;i=i+8|0;d=b|0;e=c[(c[3524]|0)+124>>2]|0;if((e|0)==0){i=b;return}if((a[26192]&1)==0){i=b;return}cN[e&255](-1,-1);if((a[37384]&1)==0){e=(a[66164]&1)!=0;f=+h[3275];if(e&f<0.0){g=-1}else{if(e){j=+_(+f);k=j/+h[8272]}else{k=f}g=~~(+(c[16536]|0)+(k- +h[8255])*+h[8269]+.5)}c[6558]=g;e=(a[65476]&1)!=0;k=+h[3276];if(e&k<0.0){l=-1}else{if(e){f=+_(+k);m=f/+h[8186]}else{m=k}l=~~(+(c[16364]|0)+(m- +h[8169])*+h[8183]+.5)}c[6559]=l;hN(g,l,d,d,26216,26224);n=c[6558]|0;o=c[6559]|0}else{h[d>>3]=1.0;m=(+h[3275]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;k=(+h[3276]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;f=(1.0- +h[5279])*+h[2]+ +h[12]+-1.0;j=+h[406]+m*+h[394]+k*+h[398]+f*+h[402];p=j==0.0?1.0e-5:j;d=~~((+h[403]+m*+h[391]+k*+h[395]+f*+h[399])/p*+(c[180]|0))+(c[186]|0)|0;l=~~((+h[404]+m*+h[392]+k*+h[396]+f*+h[400])/p*+(c[40]|0))+(c[46]|0)|0;c[6558]=d;c[6559]=l;n=d;o=l}cN[c[(c[3524]|0)+124>>2]&255](n,o);i=b;return}function hX(b){b=b|0;var d=0,e=0,f=0,i=0,j=0,k=0.0;if((b|0)==0){d=76768;return d|0}e=c[3524]|0;f=e+124|0;if((c[f>>2]|0)==0){d=0;return d|0}do{if((a[26192]&1)==0){if((a[37384]&1)!=0){if(+P(+(+aX(+(+g[3536]),90.0)))>=.1){break}if(+P(+(+aX(+(+g[3538]),180.0)))>=.1){break}}a[26192]=1;i=c[b+4>>2]|0;c[6558]=i;j=c[b+8>>2]|0;c[6559]=j;hN(i,j,26200,26208,26216,26224);cN[c[(c[3524]|0)+124>>2]&255](c[6558]|0,c[6559]|0);j=e6(98488)|0;if((j|0)!=0){a[j+8|0]=0;k=+h[3275];c[j+16>>2]=2;h[j+24>>3]=k;h[j+32>>3]=0.0}j=e6(92688)|0;if((j|0)!=0){a[j+8|0]=0;k=+h[3276];c[j+16>>2]=2;h[j+24>>3]=k;h[j+32>>3]=0.0}if((c[8501]|0)==0){break}j=c[m>>2]|0;aI(224616,18,1,j|0)}else{a[26192]=0;do{if((e|0)!=0){j=c[f>>2]|0;if((j|0)==0){break}cN[j&255](-1,-1)}}while(0);j=e6(98488)|0;if((j|0)!=0){a[j+8|0]=1}j=e6(92688)|0;if((j|0)!=0){a[j+8|0]=1}if((c[8501]|0)==0){break}j=c[m>>2]|0;aI(84792,19,1,j|0);if((c[8501]|0)==0){break}j=c[m>>2]|0;aI(84792,19,1,j|0)}}while(0);hM();d=0;return d|0}function hY(b){b=b|0;var d=0,e=0,f=0,g=0;d=c[7772]|0;if((b-1|0)>>>0>=2){e=d;return e|0}do{if((d|0)!=(b|0)){if((a[26192]&1)==0){break}a[26192]=0;f=c[3524]|0;do{if((f|0)!=0){g=c[f+124>>2]|0;if((g|0)==0){break}cN[g&255](-1,-1)}}while(0);f=e6(98488)|0;if((f|0)!=0){a[f+8|0]=1}f=e6(92688)|0;if((f|0)!=0){a[f+8|0]=1}if((c[8501]|0)==0){break}f=c[m>>2]|0;aI(84792,19,1,f|0)}}while(0);c[7772]=b;e=b;return e|0}function hZ(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0;e=i;f=b+4|0;c[f>>2]=-1;g=b+8|0;a[g]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b>>2]=0;c[b+24>>2]=0;if((d|0)==0){h=0;i=e;return h|0}else{j=d;k=-1;l=0}L3876:while(1){b=a[j]|0;if(b<<24>>24==0){n=k;o=2836;break}L3879:do{if((uJ(j|0,217264,4)|0)==0){p=l|4;a[g]=p;q=j+4|0;r=k;s=p}else{if((uJ(j|0,211672,5)|0)==0){p=l|2;a[g]=p;q=j+5|0;r=k;s=p;break}L3884:do{if((aY(j|0,87296)|0)==0){t=0;o=2824}else{p=(a_(j|0,87296,9)|0)!=0;if((aY(j|0,86224)|0)==0){t=1;o=2824;break}u=(a_(j|0,86224,3)|0)==0&p?1:p<<31>>31;if((aY(j|0,85184)|0)==0){t=2;o=2824;break}p=(a_(j|0,85184,8)|0)==0&(u|0)<0?2:u;if((aY(j|0,84288)|0)==0){t=3;o=2824;break}u=(a_(j|0,84288,6)|0)==0&(p|0)<0?3:p;if((aY(j|0,83696)|0)==0){t=4;o=2824;break}p=(a_(j|0,83696,6)|0)==0&(u|0)<0?4:u;if((aY(j|0,82728)|0)==0){t=5;o=2824;break}u=(a_(j|0,82728,6)|0)==0&(p|0)<0?5:p;if((u|0)>-1){t=u;o=2824;break}else{w=20384}while(1){u=c[w>>2]|0;if((u|0)==0){break L3884}if((aY(j|0,u|0)|0)==0){break}else{w=w+4|0}}x=(w-20384>>2)+1e3|0;y=uA(j|0)|0;o=2832}}while(0);if((o|0)==2824){o=0;u=uA(c[960+(t<<3)>>2]|0)|0;x=c[964+(t<<3)>>2]|0;y=u;o=2832}do{if((o|0)==2832){o=0;if((x|0)==-1){break}c[f>>2]=x;q=j+y|0;r=x;s=l;break L3879}}while(0);u=j+1|0;p=b<<24>>24;c[f>>2]=p;z=a[u]|0;if((z<<24>>24|0)==0|(z<<24>>24|0)==45){q=u;r=p;s=l}else{o=2835;break L3876}}}while(0);if((q|0)==0){n=r;o=2836;break}else{j=q;k=r;l=s}}if((o|0)==2836){h=(n|0)!=-1&1;i=e;return h|0}else if((o|0)==2835){cf(c[m>>2]|0,205504,(v=i,i=i+8|0,c[v>>2]=d,v)|0);h=0;i=e;return h|0}return 0}function h_(a){a=a|0;var b=0,d=0,e=0,f=0;if((a|0)==0){return}if((c[a+16>>2]|0)!=0){b=a+12|0;d=c[b>>2]|0;if((d|0)==0){return}uu(d);c[b>>2]=0;return}b=a|0;d=c[b>>2]|0;e=a+24|0;if((d|0)==0){f=0}else{c[d+24>>2]=c[e>>2];f=c[b>>2]|0}b=c[e>>2]|0;if((b|0)==0){c[c[14128]>>2]=f}else{c[b>>2]=f}f=a+12|0;b=c[f>>2]|0;if((b|0)!=0){uu(b);c[f>>2]=0}do{if((c[14128]|0)==(a|0)){f=c[e>>2]|0;c[14128]=f;if((f|0)==0){break}b=c[f>>2]|0;if((b|0)==0){break}c[b+24>>2]=0}}while(0);uu(a);return}function h$(d){d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0;e=i;i=i+8|0;f=e|0;g=c[m>>2]|0;h=f;a[56520]=0;do{if((d|0)!=0){j=d+8|0;k=a[j]|0;if((k&2)==0){l=k}else{a[56520]=a[206584]|0;a[56521|0]=a[206585|0]|0;a[56522|0]=a[206586|0]|0;a[56523|0]=a[206587|0]|0;a[56524|0]=a[206588|0]|0;a[56525|0]=a[206589|0]|0;l=a[j]|0}if((l&4)!=0){j=56520+(uA(56520)|0)|0;a[j]=a[205752]|0;a[j+1|0]=a[205753|0]|0;a[j+2|0]=a[205754|0]|0;a[j+3|0]=a[205755|0]|0;a[j+4|0]=a[205756|0]|0;a[j+5|0]=a[205757|0]|0;a[j+6|0]=a[205758|0]|0}j=c[d+4>>2]|0;if((j-1001|0)>>>0<63){k=c[20384+(j-1e3<<2)>>2]|0;uC(56520,k|0);break}else{n=0}while(1){if((n|0)==6){o=2872;break}if((c[964+(n<<3)>>2]|0)==(j|0)){o=2871;break}else{n=n+1|0}}if((o|0)==2871){k=c[960+(n<<3)>>2]|0;uC(56520,k|0);break}else if((o|0)==2872){b[f>>1]=0;a[h]=j&255;uC(56520,h|0);break}}}while(0);cf(g|0,209560,(v=i,i=i+8|0,c[v>>2]=56520,v)|0);cf(c[m>>2]|0,209048,(v=i,i=i+8|0,c[v>>2]=(a[d+20|0]&1)!=0?42:32,v)|0);g=c[d+12>>2]|0;if((g|0)!=0){h=c[m>>2]|0;cf(h|0,208640,(v=i,i=i+8|0,c[v>>2]=g,v)|0);i=e;return}g=c[d+16>>2]|0;d=c[m>>2]|0;if((g|0)==0){cf(d|0,207152,(v=i,i=i+16|0,c[v>>2]=105800,c[v+8>>2]=2288,v)|0);i=e;return}else{h=cO[g&255](0)|0;cf(d|0,154696,(v=i,i=i+8|0,c[v>>2]=h,v)|0);i=e;return}}function h0(a){a=a|0;var b=0;if((a|0)==0){b=165760}else{dM(165400);b=0}return b|0}function h1(b){b=b|0;var d=0,e=0,f=0,g=0;if((b|0)==0){d=166224;return d|0}b=c[11692]|0;e=c[260]|0;do{if((b|0)==0){if((e|0)==0){f=0;g=2889;break}c[11692]=e}else{f=e;g=2889}}while(0);do{if((g|0)==2889){if((b|0)==(f|0)&(b|0)!=31){c[11692]=31;break}if((a[37384]&1)!=0&(b|0)==31){c[11692]=4095;break}else{c[11692]=0;break}}}while(0);dM(179864);d=0;return d|0}function h2(a){a=a|0;var b=0;if((a|0)==0){b=166576}else{dM(179864);b=0}return b|0}function h3(b){b=b|0;var c=0,d=0,e=0;if((b|0)==0){c=167768;return c|0}else{d=0}while(1){if(d>>>0>=8){e=2905;break}if((a[65036+(d*688&-1)|0]&1)!=0){e=2906;break}if((a[65037+(d*688&-1)|0]&1)==0){d=d+1|0}else{e=2906;break}}if((e|0)==2906){dM(166984);c=0;return c|0}else if((e|0)==2905){dM(196824);c=0;return c|0}return 0}function h4(b){b=b|0;var d=0;if((b|0)==0){d=168352;return d|0}aF(10,c[m>>2]|0);hT(0);if((a[37400]&1)==0){d=0;return d|0}aI(105808,9,1,c[m>>2]|0);aD(c[m>>2]|0);d=0;return d|0}function h5(b){b=b|0;var d=0,e=0,f=0;d=i;if((b|0)==0){e=169176;i=d;return e|0}if((a[872]&1)!=0){uh(-1,168720,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);e=0;i=d;return e|0}b=c[8494]|0;do{if((c[13528]|0)<(b|0)&(b|0)<(c[13529]|0)){f=c[8492]|0;if(!((c[13530]|0)<(f|0)&(f|0)<(c[13531]|0))){break}dM((a[66852]&1)!=0?173736:173264);e=0;i=d;return e|0}}while(0);if((a[37384]&1)==0|(c[5094]|0)!=0){dM((a[65476]&1)!=0?171552:171296);e=0;i=d;return e|0}else{dM((a[64788+((c[34]|0)*688&-1)|0]&1)!=0?172888:172496);e=0;i=d;return e|0}return 0}function h6(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((b|0)==0){d=174336;return d|0}b=c[8494]|0;do{if((c[13528]|0)<(b|0)&(b|0)<(c[13529]|0)){e=c[8492]|0;if(!((c[13530]|0)<(e|0)&(e|0)<(c[13531]|0))){break}dM((a[66852]&1)!=0?173736:173264);d=0;return d|0}}while(0);if(!((a[37384]&1)==0|(c[5094]|0)!=0)){dM((a[64788+((c[34]|0)*688&-1)|0]&1)!=0?172888:172496);d=0;return d|0}e=c[8492]|0;f=c[7940]|0;g=c[7941]|0;h=(g-f|0)/4&-1;i=c[7938]|0;if((e|0)<(h+f|0)){j=c[7939]|0;k=(b|0)>(i|0)&(b|0)<(j|0);l=j}else{k=0;l=c[7939]|0}j=(l-i|0)/4&-1;if((b|0)<(j+i|0)){m=(e|0)>(f|0)&(e|0)<(g|0)}else{m=0}if((e|0)>(g-h|0)){n=(b|0)>(i|0)&(b|0)<(l|0)}else{n=0}if((b|0)>(l-j|0)){o=(e|0)>(f|0)&(e|0)<(g|0)}else{o=0}if(k){dL(bP(((a[66164]&1)!=0?172224:171904)|0)|0)}if(m){dL(bP(((a[65476]&1)!=0?171552:171296)|0)|0)}g=c[5094]|0;if((g|0)!=0|n^1){p=g}else{dL(bP(((a[68916]&1)!=0?170840:170464)|0)|0);p=c[5094]|0}if(!((p|0)!=0|o^1)){dL(bP(((a[68228]&1)!=0?170088:169608)|0)|0)}do{if(!k){if((c[5094]|0)!=0&(m^1)){dM((a[64788+((c[34]|0)*688&-1)|0]&1)!=0?172888:172496)}if(m|n|o){break}else{d=0}return d|0}}while(0);dM(179864);d=0;return d|0}function h7(a){a=a|0;var b=0;if((a|0)==0){b=175488;return b|0}do{if((c[8496]|0)==0){c[8496]=1;if((c[8501]|0)==0){break}a=c[m>>2]|0;aI(174984,18,1,a|0)}else{c[8496]=0;if((c[8501]|0)==0){break}a=c[m>>2]|0;aI(174688,19,1,a|0)}}while(0);hM();b=0;return b|0}function h8(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;if((b|0)==0){e=175784;i=d;return e|0}b=c[8506]|0;f=b-1|0;c[8506]=f;g=c[8510]|0;do{if((f|0)!=7|(g|0)!=0){if((f|0)>7){c[8506]=1;break}if((f|0)>=1){break}c[8506]=7;if((g|0)!=0){break}if((a[30528]&1)!=0){break}c[8506]=6}else{if((a[30528]&1)!=0){break}c[8506]=6}}while(0);hM();if((c[8501]|0)==0){e=0;i=d;return e|0}g=c[8506]|0;cf(c[m>>2]|0,176192,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=g,v)|0);e=0;i=d;return e|0}function h9(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;if((b|0)==0){e=176776;i=d;return e|0}b=c[8506]|0;f=b+1|0;c[8506]=f;g=c[8510]|0;do{if((f|0)!=7|(g|0)!=0){if((f|0)>7){h=2998;break}if((b|0)>=0){break}c[8506]=7;if((g|0)!=0){break}if((a[30528]&1)!=0){break}c[8506]=6}else{if((a[30528]&1)!=0){break}c[8506]=8;h=2998}}while(0);if((h|0)==2998){c[8506]=1}hM();if((c[8501]|0)==0){e=0;i=d;return e|0}h=c[8506]|0;cf(c[m>>2]|0,176192,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=h,v)|0);e=0;i=d;return e|0}function ia(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;if((a|0)==0){d=177368;i=b;return d|0}a=c[13532]|0;e=a-1|0;c[13532]=e;f=c[13534]|0;do{if((e|0)!=7|(f|0)!=0){if((e|0)>7){c[13532]=0;g=0;break}if((e|0)>=0){g=e;break}c[13532]=7;if((f|0)!=0){g=7;break}c[13532]=6;g=6}else{c[13532]=6;g=6}}while(0);if((c[8501]|0)==0){d=0;i=b;return d|0}cf(c[m>>2]|0,177616,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=g,v)|0);d=0;i=b;return d|0}function ib(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;if((a|0)==0){d=177920;i=b;return d|0}a=c[13532]|0;e=a+1|0;c[13532]=e;f=c[13534]|0;do{if((e|0)!=7|(f|0)!=0){if((e|0)>7){g=3027;break}if((e|0)>=0){h=e;break}c[13532]=7;if((f|0)!=0){h=7;break}c[13532]=6;h=6}else{c[13532]=8;g=3027}}while(0);if((g|0)==3027){c[13532]=0;h=0}if((c[8501]|0)==0){d=0;i=b;return d|0}cf(c[m>>2]|0,177616,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=h,v)|0);d=0;i=b;return d|0}function ic(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;if((a|0)==0){d=179216;i=b;return d|0}e=(c[8500]|0)+1|0;f=(e|0)>2?0:e;c[8500]=f;cR[c[(c[3524]|0)+128>>2]&127]((f|0)!=0?-3:-4,c[a+4>>2]|0,c[a+8>>2]|0);hM();if((c[8501]|0)==0){d=0;i=b;return d|0}cf(c[m>>2]|0,178656,(v=i,i=i+8|0,c[v>>2]=(c[8500]|0)!=0?179864:178216,v)|0);d=0;i=b;return d|0}function id(a){a=a|0;var b=0;if((a|0)==0){b=180400;return b|0}do{if((c[8501]|0)==0){c[8501]=1}else{a=c[m>>2]|0;aI(179928,49,1,a|0);a=(c[8501]|0)==0;c[8501]=a&1;if(a){break}else{b=0}return b|0}}while(0);aI(179616,39,1,c[m>>2]|0);b=0;return b|0}function ie(a){a=a|0;var b=0,c=0.0;do{if((a|0)==0){b=183160}else{c=+g[18074];if(c==0.0){dM(182624);b=0;break}if(c==1.0){dM(181152);b=0;break}else{dM(180792);b=0;break}}}while(0);return b|0}function ig(a){a=a|0;var b=0,d=0,e=0;if((a|0)==0){b=183976;return b|0}a=c[6]|0;do{if((a|0)==0){d=3063}else{e=c[a+72>>2]|0;if((e|0)==0){d=3063;break}ip(e)}}while(0);if((d|0)==3063){d=c[m>>2]|0;aF(7,d|0)}if((c[8501]|0)==0){b=0;return b|0}aI(183608,11,1,c[m>>2]|0);b=0;return b|0}function ih(a){a=a|0;var b=0,d=0,e=0;if((a|0)==0){b=184736;return b|0}a=c[6]|0;do{if((a|0)==0){d=3074}else{e=c[a+68>>2]|0;if((e|0)==0){d=3074;break}ip(e)}}while(0);if((d|0)==3074){d=c[m>>2]|0;aF(7,d|0)}if((c[8501]|0)==0){b=0;return b|0}aI(184360,15,1,c[m>>2]|0);b=0;return b|0}function ii(a){a=a|0;var b=0,d=0;if((a|0)==0){b=187240;return b|0}a=c[8]|0;if((a|0)==0|(c[6]|0)==(a|0)){d=c[m>>2]|0;aF(7,d|0)}else{ip(a)}if((c[8501]|0)==0){b=0;return b|0}aI(186768,8,1,c[m>>2]|0);b=0;return b|0}function ij(b){b=b|0;var c=0;do{if((b|0)==0){c=189200}else{if((a[37384]&1)==0){c=0;break}io(0,-1);c=0}}while(0);return c|0}function ik(b){b=b|0;var c=0;do{if((b|0)==0){c=191536}else{if((a[37384]&1)==0){c=0;break}io(1,0);c=0}}while(0);return c|0}function il(b){b=b|0;var c=0;do{if((b|0)==0){c=193488}else{if((a[37384]&1)==0){c=0;break}io(0,1);c=0}}while(0);return c|0}function im(b){b=b|0;var c=0;do{if((b|0)==0){c=196952}else{if((a[37384]&1)==0){c=0;break}io(-1,0);c=0}}while(0);return c|0}function io(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0.0,l=0.0,n=0.0;e=i;if((c[8512]&1|0)==0){f=d;j=b}else{f=d*10&-1;j=b*10&-1}do{if((j|0)!=0){k=+(j|0)+ +g[3538];if(k<0.0){l=k+360.0}else{l=k}g[3538]=l;if(l<=360.0){break}g[3538]=l+-360.0}}while(0);do{if((f|0)!=0){l=+(f|0)+ +g[3536];if(l<0.0){n=l+360.0}else{n=l}g[3536]=n;if(n<=360.0){break}g[3536]=n+-360.0}}while(0);do{if((f|j|0)!=0){n=+g[3538];b=e6(196288)|0;if((b|0)!=0){a[b+8|0]=0;c[b+16>>2]=2;h[b+24>>3]=n;h[b+32>>3]=0.0}n=+g[3536];b=e6(195744)|0;if((b|0)==0){break}a[b+8|0]=0;c[b+16>>2]=2;h[b+24>>3]=n;h[b+32>>3]=0.0}}while(0);if((c[8501]|0)!=0){j=c[m>>2]|0;n=+g[3538];l=+g[3536];cf(j|0,193976,(v=i,i=i+16|0,h[v>>3]=n,h[v+8>>3]=l,v)|0)}hU(c[10828]|0,c[7952]|0,0);do{if((a[37384]&1)!=0){if(+P(+(+aX(+(+g[3536]),90.0)))>=.1){i=e;return}if(+P(+(+aX(+(+g[3538]),180.0)))<.1){break}i=e;return}}while(0);if((c[(c[3524]|0)+120>>2]|0)==0){i=e;return}hN(c[8494]|0,c[8492]|0,27760,27744,27752,27736);hM();i=e;return}function ip(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0.0,o=0.0,p=0.0,q=0.0;d=i;i=i+1024|0;e=d|0;if((a[37384]&1)==0){f=0}else{f=(c[5094]|0)==1}g=c[6]|0;do{if((g|0)==0){j=0}else{h[g>>3]=+h[8257];h[g+16>>3]=+h[8258];h[g+32>>3]=+h[8601];h[g+48>>3]=+h[8602];c[g+64>>2]=f&1;if(f){k=c[6]|0;h[k+8>>3]=+h[8172];h[k+24>>3]=+h[8171];h[k+40>>3]=+h[8516];h[k+56>>3]=+h[8515];j=k;break}else{k=c[6]|0;h[k+8>>3]=+h[8171];h[k+24>>3]=+h[8172];h[k+40>>3]=+h[8515];h[k+56>>3]=+h[8516];j=k;break}}}while(0);g=c[8]|0;if(!((j|0)!=(g|0)|(g|0)==(b|0))){uD(57080,64648,7568);c[16506]=0;c[16334]=0;c[17194]=0;c[17022]=0}c[6]=b;if((b|0)==0){b=c[m>>2]|0;aF(7,b|0);i=d;return}cM[c[(c[3524]|0)+168>>2]&511](11);b=c[6]|0;if(f){l=(c[b+64>>2]|0)!=0}else{l=0}g=e|0;n=+h[b+16>>3];j=b+24|0;k=b+8|0;o=+h[(l?j:k)>>3];p=+h[(l?k:j)>>3];be(g|0,186136,(v=i,i=i+32|0,h[v>>3]=+h[b>>3],h[v+8>>3]=n,h[v+16>>3]=o,h[v+24>>3]=p,v)|0);if((a[37384]&1)==0){b=e+(uA(g|0)|0)|0;e=c[6]|0;p=+h[e+32>>3];o=+h[e+48>>3];n=+h[e+40>>3];q=+h[e+56>>3];be(b|0,185640,(v=i,i=i+32|0,h[v>>3]=p,h[v+8>>3]=o,h[v+16>>3]=n,h[v+24>>3]=q,v)|0)}do{if((c[6]|0)==(c[8]|0)){b=0;do{uD(57512+(b*688&-1)|0,65080+(b*688&-1)|0,192);c[57376+(b*688&-1)>>2]=c[64944+(b*688&-1)>>2];c[57356+(b*688&-1)>>2]=c[64924+(b*688&-1)>>2];b=b+1|0;}while((b|0)<11);uD(64648,57080,7568);a[g]=0;if((a[872]&1)==0){break}b=c[6928]|0;if((b|0)==2){dO();i=d;return}if(!(f&(b|0)==3)){break}dO();i=d;return}else{a[37408]=1}}while(0);dM(g);a[37408]=0;i=d;return}function iq(b,d,e,f,g){b=b|0;d=+d;e=+e;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0;j=i;i=i+1080|0;k=j|0;l=j+48|0;m=j+312|0;n=j+568|0;o=j+824|0;if((f-4|0)>>>0<3|(f|0)==3){p=m|0;uE(p|0,0,255);a[p]=91;a[m+1|0]=37;a[m+2|0]=115;a[m+3|0]=44;a[m+4|0]=32;q=c[8503]|0;uC(p|0,q|0);q=m+(uA(p|0)|0)|0;w=93;a[q]=w&255;w=w>>8;a[q+1|0]=w&255;q=j+56|0;c[l>>2]=~~(d+946684800.0);m=bm(l|0)|0;if((f|0)==4){l=c[m+12>>2]|0;r=(c[m+16>>2]|0)+1|0;s=c[m+20>>2]|0;t=((s|0)<69?2e3:1900)+s|0;be(q|0,151152,(v=i,i=i+24|0,c[v>>2]=l,c[v+8>>2]=r,c[v+16>>2]=t,v)|0)}else if((f|0)==3){t3(k,d);t4(q,255,66189,k,d- +O(+d))}else if((f|0)==6){k=(c[m+16>>2]|0)+1|0;t=c[m+20>>2]|0;r=c[m+8>>2]|0;l=c[m+4>>2]|0;be(q|0,150792,(v=i,i=i+40|0,c[v>>2]=c[m+12>>2],c[v+8>>2]=k,c[v+16>>2]=((t|0)<69?2e3:1900)+t,c[v+24>>2]=r,c[v+32>>2]=l,v)|0)}else if((f|0)==5){l=c[m+4>>2]|0;be(q|0,150944,(v=i,i=i+16|0,c[v>>2]=c[m+8>>2],c[v+8>>2]=l,v)|0)}else{be(q|0,c[8503]|0,(v=i,i=i+8|0,h[v>>3]=d,v)|0)}be(b|0,p|0,(v=i,i=i+16|0,c[v>>2]=q,h[v+8>>3]=e,v)|0);u=b;x=uA(u|0)|0;y=u+x|0;i=j;return y|0}do{if((f|0)==1){a[632]=0;q=c[8503]|0;ck(632,q|0,30);q=632+(uA(632)|0)|0;a[q]=a[86120]|0;a[q+1|0]=a[86121|0]|0;a[q+2|0]=a[86122|0]|0;q=c[8503]|0;ck(632,q|0,30);be(b|0,632,(v=i,i=i+16|0,h[v>>3]=d,h[v+8>>3]=e,v)|0);u=b;x=uA(u|0)|0;y=u+x|0;i=j;return y|0}else if((f|0)==2){z=+h[8256]- +h[8255];A=+h[8170]- +h[8169];if(z!=0.0){q=n|0;uE(q|0,0,255);a[q]=47;p=c[8503]|0;uC(q|0,p|0);B=(d- +h[8255])/z;be(b|0,q|0,(v=i,i=i+8|0,h[v>>3]=B,v)|0)}else{uD(b|0,152448,13)}q=b+(uA(b|0)|0)|0;if(A!=0.0){p=o|0;uE(p|0,0,255);a[p]=44;a[o+1|0]=32;l=c[8503]|0;uC(p|0,l|0);l=o+(uA(p|0)|0)|0;w=47;a[l]=w&255;w=w>>8;a[l+1|0]=w&255;B=(e- +h[8169])/A;be(q|0,p|0,(v=i,i=i+8|0,h[v>>3]=B,v)|0);u=q;x=uA(u|0)|0;y=u+x|0;i=j;return y|0}else{uD(q|0,151872,15);u=q;x=uA(u|0)|0;y=u+x|0;i=j;return y|0}}else if((f|0)==7){q=(g|0)!=0;p=a[30528]|0;if(!q){if((p&1)==0){break}}if((p&1)==0){be(b|0,g|0,(v=i,i=i+16|0,h[v>>3]=d,h[v+8>>3]=e,v)|0);u=b;x=uA(u|0)|0;y=u+x|0;i=j;return y|0}B=(c[17366]&1|0)==0?+h[8687]:0.0;A=+Y(+e,+d);p=(a[69604]&1)==0;z=d/+S(+A);if(p){C=B+z}else{D=+_(+B);B=+h[8702];C=+Z(+(B*(z+D/B)))}if(q){B=A/+h[9040];be(b|0,g|0,(v=i,i=i+16|0,h[v>>3]=B,h[v+8>>3]=C,v)|0);u=b;x=uA(u|0)|0;y=u+x|0;i=j;return y|0}else{q=b;p=q|0;w=1634496368;a[p]=w&255;w=w>>8;a[p+1|0]=w&255;w=w>>8;a[p+2|0]=w&255;w=w>>8;a[p+3|0]=w&255;p=q+4|0;w=2112114;a[p]=w&255;w=w>>8;a[p+1|0]=w&255;w=w>>8;a[p+2|0]=w&255;w=w>>8;a[p+3|0]=w&255;p=b+(uA(b|0)|0)|0;a[632]=0;q=c[8503]|0;ck(632,q|0,30);q=632+(uA(632)|0)|0;a[q]=a[86120]|0;a[q+1|0]=a[86121|0]|0;a[q+2|0]=a[86122|0]|0;q=c[8503]|0;ck(632,q|0,30);B=A/+h[9040];be(p|0,632,(v=i,i=i+16|0,h[v>>3]=B,h[v+8>>3]=C,v)|0);u=p;x=uA(u|0)|0;y=u+x|0;i=j;return y|0}}}while(0);a[632]=0;ck(632,c[8503]|0,30);g=632+(uA(632)|0)|0;a[g]=a[86120]|0;a[g+1|0]=a[86121|0]|0;a[g+2|0]=a[86122|0]|0;ck(632,c[8503]|0,30);be(b|0,632,(v=i,i=i+16|0,h[v>>3]=d,h[v+8>>3]=e,v)|0);u=b;x=uA(u|0)|0;y=u+x|0;i=j;return y|0}function ir(b,d,e,f){b=+b;d=+d;e=e|0;f=f|0;var g=0,j=0,k=0,l=0;g=i;hN(~~b,~~d,27760,27744,27752,27736);j=e6(164136)|0;if((j|0)!=0){a[j+8|0]=e&1^1;c[j+16>>2]=1;c[j+24>>2]=e?f:-1}e=e6(163432)|0;if((e|0)!=0){a[e+8|0]=0;c[e+16>>2]=1;c[e+24>>2]=f}e=e6(162952)|0;if((e|0)!=0){j=ut(2)|0;do{if((j|0)==0){gk();k=ut(2)|0;if((k|0)!=0){l=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=162328,v)|0)}else{l=j}}while(0);a[l]=f&255;a[l+1|0]=0;f=e+8|0;j=e+16|0;do{if((a[f]&1)==0){if((c[j>>2]|0)!=3){break}uu(c[e+24>>2]|0);c[j>>2]=1}}while(0);a[f]=0;c[j>>2]=3;c[e+24>>2]=l}l=e6(159824)|0;if((l|0)!=0){a[l+8|0]=0;d=+h[3470];c[l+16>>2]=2;h[l+24>>3]=d;h[l+32>>3]=0.0}l=e6(159208)|0;if((l|0)!=0){a[l+8|0]=0;d=+h[3468];c[l+16>>2]=2;h[l+24>>3]=d;h[l+32>>3]=0.0}l=e6(158720)|0;if((l|0)!=0){a[l+8|0]=0;d=+h[3469];c[l+16>>2]=2;h[l+24>>3]=d;h[l+32>>3]=0.0}l=e6(158096)|0;if((l|0)!=0){a[l+8|0]=0;d=+h[3467];c[l+16>>2]=2;h[l+24>>3]=d;h[l+32>>3]=0.0}l=e6(156232)|0;if((l|0)!=0){a[l+8|0]=0;e=c[8512]&1;c[l+16>>2]=1;c[l+24>>2]=e}e=e6(155120)|0;if((e|0)!=0){a[e+8|0]=0;l=c[8512]&4;c[e+16>>2]=1;c[e+24>>2]=l}l=e6(154768)|0;if((l|0)==0){i=g;return}a[l+8|0]=0;e=c[8512]&2;c[l+16>>2]=1;c[l+24>>2]=e;i=g;return}function is(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;e=c[13898]|0;if((e|0)>=(c[8272]|0)){uf(e,214888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}f=c[1054]|0;L4406:do{if((a[f+(e*40&-1)|0]&1)!=0){g=c[f+(e*40&-1)+36>>2]|0;h=f+(e*40&-1)+32|0;j=c[10036]|0;k=0;while(1){if((k|0)>=(g|0)){break}if((a[j+((c[h>>2]|0)+k|0)|0]|0)==(a[k+103664|0]|0)){k=k+1|0}else{break L4406}}if((k|0)!=1){break}uf(e,214888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);c[11670]=0;e4(it()|0,b);if((a[1960]&1)==0){i=d;return b|0}else{uf(e,159392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}return 0}function it(){var a=0,b=0,d=0,e=0,f=0;a=i;b=c[18070]|0;if((b|0)!=0){e1(b)}b=ut(4808)|0;do{if((b|0)==0){gk();d=ut(4808)|0;if((d|0)!=0){e=d;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=122712,v)|0);return 0}else{e=b}}while(0);c[18070]=e;uE(e|0,0,4808);c[18066]=150;c[8230]=0;if((iy()|0)!=0){f=c[18070]|0;i=a;return f|0}c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1;f=c[18070]|0;i=a;return f|0}function iu(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=i;i=i+48|0;e=d|0;f=d+24|0;uu(c[3546]|0);c[3546]=0;g=(b|0)!=0;if(g){c[b>>2]=0}h=c[13898]|0;if((h|0)>=(c[8272]|0)){uf(h,135720,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}j=c[1054]|0;k=(a[j+(h*40&-1)|0]&1)==0;do{if(!k){l=c[j+(h*40&-1)+36>>2]|0;m=j+(h*40&-1)+32|0;n=c[10036]|0;o=0;while(1){if((o|0)>=(l|0)){p=3259;break}if((a[n+((c[m>>2]|0)+o|0)|0]|0)==(a[o+103664|0]|0)){o=o+1|0}else{break}}do{if((p|0)==3259){if((o|0)!=1){break}uf(h,135720,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);if(k){break}o=c[j+(h*40&-1)+32>>2]|0;m=c[10036]|0;n=a[m+o|0]|0;if(!((n<<24>>24|0)==39|(n<<24>>24|0)==34)){break}n=c[j+(h*40&-1)+36>>2]|0;l=0;while(1){if((l|0)>=(n|0)){p=3266;break}if((a[m+(o+l|0)|0]|0)==(a[l+103664|0]|0)){l=l+1|0}else{p=3267;break}}if((p|0)==3266){if((l|0)==1){q=0}else{p=3267}}do{if((p|0)==3267){a[14176]=1;is(e);a[14176]=0;if((c[e>>2]|0)==3){q=c[e+8>>2]|0;break}else{c[13898]=h;q=0;break}}}while(0);c[3546]=q;r=q;i=d;return r|0}}while(0);it();q=c[18070]|0;h=c[q>>2]|0;e=0;while(1){if((e|0)>=(h|0)){p=3274;break}j=c[q+8+(e<<5)>>2]|0;if((j-2|0)>>>0<3|(j|0)==8){break}else{e=e+1|0}}do{if((p|0)==3274){e4(q,f);if((a[1960]&1)!=0){break}if((c[f>>2]|0)!=3){break}c[3546]=c[f+8>>2]}}while(0);if(g){c[b>>2]=c[18070]}r=c[3546]|0;i=d;return r|0}function iv(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0;d=i;e=c[10812]|0;f=c[8272]|0;L4473:do{if((e|0)==0){g=43248;h=c[1054]|0;j=c[10036]|0}else{k=(f|0)>(b|0);l=c[1054]|0;m=l+(b*40&-1)|0;n=l+(b*40&-1)+36|0;o=l+(b*40&-1)+32|0;p=c[10036]|0;q=e;L4475:while(1){r=c[q+4>>2]|0;L4477:do{if(k){if((a[m]&1)==0){break}s=c[n>>2]|0;t=0;while(1){if((t|0)>=(s|0)){break}if((a[p+((c[o>>2]|0)+t|0)|0]|0)==(a[r+t|0]|0)){t=t+1|0}else{break L4477}}if((a[r+t|0]|0)==0){u=q;break L4475}}}while(0);r=q|0;s=c[r>>2]|0;if((s|0)==0){g=r;h=l;j=p;break L4473}else{q=s}}i=d;return u|0}}while(0);e=(f|0)>(b|0);f=h+(b*40&-1)|0;q=h+(b*40&-1)+36|0;p=h+(b*40&-1)+32|0;h=41;L4488:while(1){l=c[41160+(h<<3)>>2]|0;L4490:do{if(e){if((a[f]&1)==0){break}o=c[q>>2]|0;n=0;while(1){if((n|0)>=(o|0)){break}if((a[j+((c[p>>2]|0)+n|0)|0]|0)==(a[l+n|0]|0)){n=n+1|0}else{break L4490}}if((a[l+n|0]|0)==0){w=3303;break L4488}}}while(0);l=h+1|0;if((l|0)==117){break}else{h=l}}do{if((w|0)==3303){if((h|0)==0){break}uh(b,92536,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);h=ut(312)|0;do{if((h|0)==0){gk();w=ut(312)|0;if((w|0)!=0){x=w;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=144328,v)|0);return 0}else{x=h}}while(0);c[g>>2]=x;c[x>>2]=0;c[(c[g>>2]|0)+12>>2]=0;c[(c[g>>2]|0)+8>>2]=0;x=(c[(c[1054]|0)+(b*40&-1)+36>>2]|0)+1|0;h=ut(x)|0;do{if((h|0)==0){gk();w=ut(x)|0;if((w|0)!=0){y=w;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=76632,v)|0);return 0}else{y=h}}while(0);c[(c[g>>2]|0)+4>>2]=y;y=c[(c[g>>2]|0)+4>>2]|0;h=c[1054]|0;x=c[h+(b*40&-1)+36>>2]|0;w=c[h+(b*40&-1)+32>>2]|0;b=0;while(1){h=b+1|0;a[y+b|0]=a[(c[10036]|0)+w|0]|0;if((h|0)==(x|0)){break}else{w=w+1|0;b=h}}a[y+x|0]=0;x=c[g>>2]|0;c[x+24>>2]=1;c[x+32>>2]=0;x=c[g>>2]|0;c[x+48>>2]=1;c[x+56>>2]=0;x=c[g>>2]|0;c[x+72>>2]=1;c[x+80>>2]=0;x=c[g>>2]|0;c[x+96>>2]=1;c[x+104>>2]=0;x=c[g>>2]|0;c[x+120>>2]=1;c[x+128>>2]=0;x=c[g>>2]|0;c[x+144>>2]=1;c[x+152>>2]=0;x=c[g>>2]|0;c[x+168>>2]=1;c[x+176>>2]=0;x=c[g>>2]|0;c[x+192>>2]=1;c[x+200>>2]=0;x=c[g>>2]|0;c[x+216>>2]=1;c[x+224>>2]=0;x=c[g>>2]|0;c[x+240>>2]=1;c[x+248>>2]=0;x=c[g>>2]|0;c[x+264>>2]=1;c[x+272>>2]=0;x=c[g>>2]|0;c[x+288>>2]=1;c[x+296>>2]=0;u=c[g>>2]|0;i=d;return u|0}function iw(){var b=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0.0,Q=0,R=0,S=0,T=0.0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0.0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0;b=i;i=i+152|0;e=b|0;f=b+24|0;g=b+48|0;j=b+72|0;k=b+96|0;l=c[13898]|0;m=c[8272]|0;if((m|0)<=(l|0)){n=0;i=b;return n|0}o=k|0;p=j|0;q=j+8|0;r=g|0;s=g+8|0;t=f|0;u=f+8|0;w=e|0;x=e+8|0;y=0;z=0;A=l;l=m;L4518:while(1){m=A;B=l;while(1){C=c[1054]|0;if((a[C+(m*40&-1)|0]&1)==0){n=y;D=3435;break L4518}E=c[C+(m*40&-1)+36>>2]|0;F=C+(m*40&-1)+32|0;G=c[10036]|0;H=0;while(1){if((H|0)>=(E|0)){break}if((a[G+((c[F>>2]|0)+H|0)|0]|0)==(a[H+217064|0]|0)){H=H+1|0}else{n=y;D=3438;break L4518}}if((H|0)!=3){n=y;D=3436;break L4518}F=m+1|0;E=m+2|0;c[13898]=E;if((B|0)<=(F|0)){I=E;D=3452;break L4518}if((a[C+(F*40&-1)|0]&1)==0){I=E;D=3455;break L4518}J=c[C+(F*40&-1)+36>>2]|0;K=C+(F*40&-1)+32|0;F=0;while(1){if((F|0)>=(J|0)){break}if((a[G+((c[K>>2]|0)+F|0)|0]|0)==(a[F+78280|0]|0)){F=F+1|0}else{I=E;D=3456;break L4518}}if((F|0)!=1){I=E;D=3454;break L4518}if((a[C+(E*40&-1)|0]&1)==0){I=E;D=3457;break L4518}K=(bO(d[G+(c[C+(E*40&-1)+32>>2]|0)|0]|0|0)|0)==0;J=c[1054]|0;if(K){K=c[10036]|0;if((a[K+(c[J+(E*40&-1)+32>>2]|0)|0]|0)==95){L=K}else{D=3335;break L4518}}else{L=c[10036]|0}K=c[13898]|0;c[13898]=K+1;H=c[J+(K*40&-1)+36>>2]|0;M=(H|0)>49?49:H;H=c[J+(K*40&-1)+32>>2]|0;K=0;while(1){J=K+1|0;a[k+K|0]=a[L+H|0]|0;if((J|0)==(M|0)){break}else{H=H+1|0;K=J}}a[k+M|0]=0;N=e6(o)|0;K=c[13898]|0;H=c[8272]|0;E=(H|0)>(K|0);L4543:do{if(E){C=c[1054]|0;if((a[C+(K*40&-1)|0]&1)==0){D=3344;break}G=c[C+(K*40&-1)+36>>2]|0;F=C+(K*40&-1)+32|0;C=c[10036]|0;J=0;while(1){if((J|0)>=(G|0)){break}if((a[C+((c[F>>2]|0)+J|0)|0]|0)==(a[J+115e3|0]|0)){J=J+1|0}else{D=3344;break L4543}}F=K+1|0;c[13898]=F;if((J|0)!=1){O=F;D=3392;break}F=is(j)|0;C=c[F>>2]|0;if((C|0)==1){P=+(c[F+8>>2]|0)}else if((C|0)==2){P=+h[F+8>>3]}else if((C|0)==3){P=+uz(c[F+8>>2]|0,0)}else{D=3350;break L4518}if((c[p>>2]|0)==3){uu(c[q>>2]|0);c[p>>2]=1}F=~~P;Q=c[13898]|0;c[13898]=Q+1;if((c[8272]|0)<=(Q|0)){D=3447;break L4518}C=c[1054]|0;if((a[C+(Q*40&-1)|0]&1)==0){D=3445;break L4518}G=c[C+(Q*40&-1)+36>>2]|0;R=C+(Q*40&-1)+32|0;C=c[10036]|0;S=0;while(1){if((S|0)>=(G|0)){break}if((a[C+((c[R>>2]|0)+S|0)|0]|0)==(a[S+183584|0]|0)){S=S+1|0}else{D=3444;break L4518}}if((S|0)!=1){D=3446;break L4518}R=is(g)|0;C=c[R>>2]|0;if((C|0)==1){T=+(c[R+8>>2]|0)}else if((C|0)==2){T=+h[R+8>>3]}else if((C|0)==3){T=+uz(c[R+8>>2]|0,0)}else{D=3364;break L4518}if((c[r>>2]|0)==3){uu(c[s>>2]|0);c[r>>2]=1}R=~~T;C=c[13898]|0;G=c[8272]|0;L4574:do{if((G|0)>(C|0)){J=c[1054]|0;if((a[J+(C*40&-1)|0]&1)==0){U=1;V=C;W=G;break}X=c[J+(C*40&-1)+36>>2]|0;Y=J+(C*40&-1)+32|0;J=c[10036]|0;Z=0;while(1){if((Z|0)>=(X|0)){break}if((a[J+((c[Y>>2]|0)+Z|0)|0]|0)==(a[Z+183584|0]|0)){Z=Z+1|0}else{U=1;V=C;W=G;break L4574}}if((Z|0)!=1){U=1;V=C;W=G;break}c[13898]=C+1;Y=is(f)|0;J=c[Y>>2]|0;if((J|0)==1){_=+(c[Y+8>>2]|0)}else if((J|0)==2){_=+h[Y+8>>3]}else if((J|0)==3){_=+uz(c[Y+8>>2]|0,0)}else{D=3377;break L4518}if((c[t>>2]|0)==3){uu(c[u>>2]|0);c[t>>2]=1}U=~~_;V=c[13898]|0;W=c[8272]|0}else{U=1;V=C;W=G}}while(0);c[13898]=V+1;if((W|0)<=(V|0)){D=3458;break L4518}G=c[1054]|0;if((a[G+(V*40&-1)|0]&1)==0){D=3459;break L4518}C=c[G+(V*40&-1)+36>>2]|0;S=G+(V*40&-1)+32|0;G=c[10036]|0;Y=0;while(1){if((Y|0)>=(C|0)){break}if((a[G+((c[S>>2]|0)+Y|0)|0]|0)==(a[Y+78864|0]|0)){Y=Y+1|0}else{D=3460;break L4518}}if((Y|0)!=1){D=3461;break L4518}S=N+8|0;G=N+16|0;do{if((a[S]&1)==0){if((c[G>>2]|0)!=3){break}uu(c[N+24>>2]|0);c[G>>2]=1}}while(0);c[G>>2]=1;c[N+24>>2]=F;a[S]=0;$=U;ab=R;ac=F;ad=0}else{D=3344}}while(0);if((D|0)==3344){D=0;M=K+1|0;c[13898]=M;O=M;D=3392}if((D|0)==3392){D=0;if(!E){D=3441;break L4518}M=c[1054]|0;if((a[M+(K*40&-1)|0]&1)==0){D=3442;break L4518}Y=c[M+(K*40&-1)+36>>2]|0;C=M+(K*40&-1)+32|0;J=c[10036]|0;X=0;while(1){if((X|0)>=(Y|0)){break}if((a[J+((c[C>>2]|0)+X|0)|0]|0)==(a[X+145600|0]|0)){X=X+1|0}else{D=3443;break L4518}}if((X|0)!=2){D=3440;break L4518}if((O|0)>=(H|0)){ae=O;D=3462;break L4518}L4614:do{if((a[M+(O*40&-1)|0]&1)!=0){C=c[M+(O*40&-1)+36>>2]|0;Y=M+(O*40&-1)+32|0;K=0;while(1){if((K|0)>=(C|0)){break}if((a[J+((c[Y>>2]|0)+K|0)|0]|0)==(a[K+103664|0]|0)){K=K+1|0}else{break L4614}}if((K|0)==1){ae=O;D=3463;break L4518}}}while(0);a[14176]=1;is(e);a[14176]=0;if((c[w>>2]|0)!=3){D=3405;break L4518}J=c[x>>2]|0;af=c[13898]|0;if((J|0)==0){ae=af;D=3465;break L4518}c[13898]=af+1;if((c[8272]|0)<=(af|0)){D=3450;break L4518}M=c[1054]|0;if((a[M+(af*40&-1)|0]&1)==0){D=3451;break L4518}H=c[M+(af*40&-1)+36>>2]|0;X=M+(af*40&-1)+32|0;M=c[10036]|0;Y=0;while(1){if((Y|0)>=(H|0)){break}if((a[M+((c[X>>2]|0)+Y|0)|0]|0)==(a[Y+78864|0]|0)){Y=Y+1|0}else{D=3448;break L4518}}if((Y|0)!=1){D=3449;break L4518}X=e9(J)|0;M=N+8|0;H=N+16|0;do{if((a[M]&1)==0){if((c[H>>2]|0)!=3){break}uu(c[N+24>>2]|0);c[H>>2]=1}}while(0);Y=fa(J,1)|0;c[H>>2]=3;c[N+24>>2]=Y;a[M]=0;$=1;ab=X;ac=1;ad=J}if((N|0)==0){ag=0}else{ag=aa(ab-ac|0,$)>>>31&255}if(!(($|0)==0|(ac|0)==(ab|0))){Y=ab-ac|0;if((((Y|0)>-1?Y:-Y|0)|0)>=((($|0)>-1?$:-$|0)|0)){break}}Y=c[13898]|0;C=c[8272]|0;if((C|0)>(Y|0)){m=Y;B=C}else{n=y;D=3437;break L4518}}B=ut(40)|0;if((B|0)==0){gk();m=ut(40)|0;if((m|0)==0){D=3427;break}else{ah=m}}else{ah=B}B=ah;c[ah+8>>2]=N;c[ah+12>>2]=ad;c[ah+16>>2]=ac;c[ah+20>>2]=ab;c[ah+24>>2]=$;c[ah+28>>2]=ac;c[ah>>2]=0;m=ah+4|0;c[m>>2]=0;uE(ah+32|0,0,7);if((z|0)==0){ai=B}else{C=y+4|0;c[c[C>>2]>>2]=B;c[m>>2]=c[C>>2];ai=y}c[ai+4>>2]=B;B=ai+38|0;if((a[B]&1)==0){a[B]=ag}B=c[13898]|0;C=c[8272]|0;if((C|0)>(B|0)){y=ai;z=z+1|0;A=B;l=C}else{n=ai;D=3434;break}}if((D|0)==3455){aj=I-1|0;uf(aj,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3456){aj=I-1|0;uf(aj,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3457){aj=I-1|0;uf(aj,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3458){uf(V,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3459){uf(V,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3460){uf(V,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3461){uf(V,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3462){ak=ae-1|0;uf(ak,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3463){ak=ae-1|0;uf(ak,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3465){ak=ae-1|0;uf(ak,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3427){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=180144,v)|0);return 0}else if((D|0)==3434){i=b;return n|0}else if((D|0)==3435){i=b;return n|0}else if((D|0)==3436){i=b;return n|0}else if((D|0)==3437){i=b;return n|0}else if((D|0)==3438){i=b;return n|0}else if((D|0)==3440){al=O-1|0;uf(al,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3335){I=c[13898]|0;aj=I-1|0;uf(aj,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3364){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3350){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3377){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3441){al=O-1|0;uf(al,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3442){al=O-1|0;uf(al,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3443){al=O-1|0;uf(al,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3444){uf(Q,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3445){uf(Q,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3446){uf(Q,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3447){uf(Q,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3448){uf(af,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3449){uf(af,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3450){uf(af,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3451){uf(af,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3452){aj=I-1|0;uf(aj,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3454){aj=I-1|0;uf(aj,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((D|0)==3405){c[13898]=O;ae=O;ak=ae-1|0;uf(ak,224336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}return 0}function ix(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((b|0)==0){d=0;return d|0}if((a[b+38|0]&1)!=0){d=0;return d|0}e=c[b+4>>2]|0;if((e|0)==0){d=0;return d|0}f=b+37|0;g=a[f]|0;L4699:do{if((g&1)!=0|(e|0)==(b|0)){h=e;i=g}else{j=e;k=g;while(1){l=j+36|0;if((a[l]&1)==0){h=j;i=k;break L4699}m=c[j+16>>2]|0;n=j+28|0;c[n>>2]=m;a[l]=0;l=j+12|0;o=j+8|0;p=(c[o>>2]|0)+24|0;if((c[l>>2]|0)==0){c[p>>2]=m}else{uu(c[p>>2]|0);p=fa(c[l>>2]|0,c[n>>2]|0)|0;c[(c[o>>2]|0)+24>>2]=p}p=c[j+4>>2]|0;o=a[f]|0;if((o&1)!=0|(p|0)==(b|0)){h=p;i=o;break}else{j=p;k=o}}}}while(0);g=h+8|0;if((c[g>>2]|0)==0){c[h+32>>2]=0;d=0;return d|0}e=b+32|0;c[e>>2]=(c[e>>2]|0)+1;if((i&1)==0){i=h+28|0;c[i>>2]=(c[i>>2]|0)+(c[h+24>>2]|0)}i=h+12|0;if((c[i>>2]|0)==0){c[(c[g>>2]|0)+24>>2]=c[h+28>>2]}else{uu(c[(c[g>>2]|0)+24>>2]|0);e=fa(c[i>>2]|0,c[h+28>>2]|0)|0;c[(c[g>>2]|0)+24>>2]=e}e=c[h+24>>2]|0;a[h+36|0]=aa(((c[h+20>>2]|0)-(c[h+28>>2]|0)|0)-e|0,e)>>>31&255;e=b;b=0;while(1){if(b){q=1}else{q=(a[e+36|0]&1)==0}h=c[e>>2]|0;if((h|0)==0){break}else{e=h;b=q}}if(q){d=1;return d|0}if((a[f]&1)!=0){d=0;return d|0}a[f]=1;d=1;return d|0}function iy(){var b=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=c[13898]|0;e=c[1054]|0;if((a[e+(b*40&-1)|0]&1)==0){f=0;return f|0}do{if((bO(d[(c[10036]|0)+(c[e+(b*40&-1)+32>>2]|0)|0]|0|0)|0)==0){if((a[(c[10036]|0)+(c[(c[1054]|0)+(b*40&-1)+32>>2]|0)|0]|0)==95){break}else{f=0}return f|0}}while(0);b=(c[13898]|0)+1|0;if((c[8272]|0)<=(b|0)){f=0;return f|0}e=c[1054]|0;if((a[e+(b*40&-1)|0]&1)==0){f=0;return f|0}g=c[e+(b*40&-1)+36>>2]|0;h=e+(b*40&-1)+32|0;b=c[10036]|0;e=0;while(1){if((e|0)>=(g|0)){break}if((a[b+((c[h>>2]|0)+e|0)|0]|0)==(a[e+115e3|0]|0)){e=e+1|0}else{f=0;i=3519;break}}if((i|0)==3519){return f|0}if((e|0)!=1){f=0;return f|0}e=c[18070]|0;i=c[e>>2]|0;h=c[18066]|0;if((i|0)<(h|0)){j=e;k=i}else{i=db(e,(h<<5)+4808|0,168072)|0;h=i;c[18070]=h;c[18066]=(c[18066]|0)+150;j=h;k=c[i>>2]|0}c[j+8+(k<<5)>>2]=1;k=c[18070]|0;j=c[k>>2]|0;c[k>>2]=j+1;k=c[18070]|0;i=c[13898]|0;h=c[1054]|0;e=c[h+(i*40&-1)+36>>2]|0;b=e+(c[h+(i*40&-1)+32>>2]|0)|0;h=db(0,e+1|0,116456)|0;e=c[(c[1054]|0)+(i*40&-1)+32>>2]|0;L4758:do{if((e|0)<(b|0)){i=e;g=h;while(1){l=a[(c[10036]|0)+i|0]|0;if(l<<24>>24==0){m=g;break L4758}n=g+1|0;a[g]=l;l=i+1|0;if((l|0)<(b|0)){i=l;g=n}else{m=n;break}}}else{m=h}}while(0);a[m]=0;c[k+8+(j<<5)+8>>2]=3;c[k+8+(j<<5)+16>>2]=h;c[13898]=(c[13898]|0)+2;if((iy()|0)==0){c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}h=c[18070]|0;j=c[h>>2]|0;k=c[18066]|0;if((j|0)<(k|0)){o=h;p=j}else{j=db(h,(k<<5)+4808|0,168072)|0;k=j;c[18070]=k;c[18066]=(c[18066]|0)+150;o=k;p=c[j>>2]|0}c[o+8+(p<<5)>>2]=36;p=c[18070]|0;c[p>>2]=(c[p>>2]|0)+1;f=1;return f|0}function iz(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;iA();b=c[13898]|0;if((c[8272]|0)>(b|0)){d=b}else{return}L4773:while(1){b=c[1054]|0;if((a[b+(d*40&-1)|0]&1)==0){e=3540;break}f=c[b+(d*40&-1)+36>>2]|0;g=b+(d*40&-1)+32|0;b=c[10036]|0;h=0;while(1){if((h|0)>=(f|0)){break}if((a[b+((c[g>>2]|0)+h|0)|0]|0)==(a[h+163800|0]|0)){h=h+1|0}else{e=3539;break L4773}}if((h|0)!=2){e=3538;break}c[13898]=d+1;g=c[18070]|0;b=c[g>>2]|0;f=c[18066]|0;if((b|0)<(f|0)){i=g;j=b}else{k=db(g,(f<<5)+4808|0,168072)|0;f=k;c[18070]=f;c[18066]=(c[18066]|0)+150;i=f;j=c[k>>2]|0}c[i+8+(j<<5)>>2]=39;k=c[18070]|0;c[k>>2]=(c[k>>2]|0)+1;iA();k=c[18070]|0;c[k+8+(b<<5)+8>>2]=(c[k>>2]|0)-b;b=c[18070]|0;k=c[b>>2]|0;f=c[18066]|0;if((k|0)<(f|0)){l=b;m=k}else{k=db(b,(f<<5)+4808|0,168072)|0;f=k;c[18070]=f;c[18066]=(c[18066]|0)+150;l=f;m=c[k>>2]|0}c[l+8+(m<<5)>>2]=30;k=c[18070]|0;c[k>>2]=(c[k>>2]|0)+1;k=c[13898]|0;if((c[8272]|0)>(k|0)){d=k}else{e=3536;break}}if((e|0)==3539){return}else if((e|0)==3538){return}else if((e|0)==3536){return}else if((e|0)==3540){return}}function iA(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;iB();b=c[13898]|0;if((c[8272]|0)>(b|0)){d=b}else{return}L4795:while(1){b=c[1054]|0;if((a[b+(d*40&-1)|0]&1)==0){e=3555;break}f=c[b+(d*40&-1)+36>>2]|0;g=b+(d*40&-1)+32|0;b=c[10036]|0;h=0;while(1){if((h|0)>=(f|0)){break}if((a[b+((c[g>>2]|0)+h|0)|0]|0)==(a[h+154536|0]|0)){h=h+1|0}else{e=3556;break L4795}}if((h|0)!=2){e=3554;break}c[13898]=d+1;g=c[18070]|0;b=c[g>>2]|0;f=c[18066]|0;if((b|0)<(f|0)){i=g;j=b}else{k=db(g,(f<<5)+4808|0,168072)|0;f=k;c[18070]=f;c[18066]=(c[18066]|0)+150;i=f;j=c[k>>2]|0}c[i+8+(j<<5)>>2]=38;k=c[18070]|0;c[k>>2]=(c[k>>2]|0)+1;iB();k=c[18070]|0;c[k+8+(b<<5)+8>>2]=(c[k>>2]|0)-b;b=c[18070]|0;k=c[b>>2]|0;f=c[18066]|0;if((k|0)<(f|0)){l=b;m=k}else{k=db(b,(f<<5)+4808|0,168072)|0;f=k;c[18070]=f;c[18066]=(c[18066]|0)+150;l=f;m=c[k>>2]|0}c[l+8+(m<<5)>>2]=30;k=c[18070]|0;c[k>>2]=(c[k>>2]|0)+1;k=c[13898]|0;if((c[8272]|0)>(k|0)){d=k}else{e=3553;break}}if((e|0)==3554){return}else if((e|0)==3555){return}else if((e|0)==3553){return}else if((e|0)==3556){return}}function iB(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;iD();b=c[13898]|0;if((c[8272]|0)>(b|0)){d=b}else{return}L4817:while(1){b=c[1054]|0;if((a[b+(d*40&-1)|0]&1)==0){e=3572;break}f=c[b+(d*40&-1)+36>>2]|0;g=b+(d*40&-1)+32|0;b=c[10036]|0;h=0;while(1){if((h|0)>=(f|0)){break}if((a[b+((c[g>>2]|0)+h|0)|0]|0)==(a[h+151312|0]|0)){h=h+1|0}else{e=3571;break L4817}}if((h|0)!=1){e=3570;break}c[13898]=d+1;iD();g=c[18070]|0;b=c[g>>2]|0;f=c[18066]|0;if((b|0)<(f|0)){i=g;j=b}else{b=db(g,(f<<5)+4808|0,168072)|0;f=b;c[18070]=f;c[18066]=(c[18066]|0)+150;i=f;j=c[b>>2]|0}c[i+8+(j<<5)>>2]=14;b=c[18070]|0;c[b>>2]=(c[b>>2]|0)+1;b=c[13898]|0;if((c[8272]|0)>(b|0)){d=b}else{e=3568;break}}if((e|0)==3571){return}else if((e|0)==3572){return}else if((e|0)==3568){return}else if((e|0)==3570){return}}function iC(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;b=i;d=c[13898]|0;if((c[8272]|0)<=(d|0)){i=b;return}e=c[1054]|0;if((a[e+(d*40&-1)|0]&1)==0){i=b;return}f=c[e+(d*40&-1)+36>>2]|0;g=e+(d*40&-1)+32|0;e=c[10036]|0;h=0;while(1){if((h|0)>=(f|0)){break}if((a[e+((c[g>>2]|0)+h|0)|0]|0)==(a[h+216168|0]|0)){h=h+1|0}else{j=3603;break}}if((j|0)==3603){i=b;return}if((h|0)!=1){i=b;return}c[8230]=(c[8230]|0)-1;c[13898]=d+1;d=c[18070]|0;h=c[d>>2]|0;g=c[18066]|0;if((h|0)<(g|0)){k=d;l=h}else{e=db(d,(g<<5)+4808|0,168072)|0;g=e;c[18070]=g;c[18066]=(c[18066]|0)+150;k=g;l=c[e>>2]|0}c[k+8+(l<<5)>>2]=40;l=c[18070]|0;c[l>>2]=(c[l>>2]|0)+1;if((iy()|0)==0){c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}l=c[13898]|0;if((c[8272]|0)<=(l|0)){uf(l,172040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=c[1054]|0;if((a[k+(l*40&-1)|0]&1)==0){uf(l,172040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=c[k+(l*40&-1)+36>>2]|0;g=k+(l*40&-1)+32|0;k=c[10036]|0;d=0;while(1){if((d|0)>=(e|0)){break}if((a[k+((c[g>>2]|0)+d|0)|0]|0)==(a[d+183584|0]|0)){d=d+1|0}else{j=3598;break}}if((j|0)==3598){uf(l,172040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((d|0)!=1){uf(l,172040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=l+1;l=c[18070]|0;d=c[l>>2]|0;j=c[18066]|0;if((d|0)<(j|0)){m=l;n=d}else{g=db(l,(j<<5)+4808|0,168072)|0;j=g;c[18070]=j;c[18066]=(c[18066]|0)+150;m=j;n=c[g>>2]|0}c[m+8+(n<<5)>>2]=37;n=c[18070]|0;c[n>>2]=(c[n>>2]|0)+1;n=c[18070]|0;c[n+8+(h<<5)+8>>2]=(c[n>>2]|0)-h;if((iy()|0)==0){c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}h=c[18070]|0;c[h+8+(d<<5)+8>>2]=(c[h>>2]|0)-d;c[8230]=(c[8230]|0)+1;i=b;return}function iD(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;iE();b=c[13898]|0;if((c[8272]|0)>(b|0)){d=b}else{return}L4880:while(1){b=c[1054]|0;if((a[b+(d*40&-1)|0]&1)==0){e=3617;break}f=c[b+(d*40&-1)+36>>2]|0;g=b+(d*40&-1)+32|0;b=c[10036]|0;h=0;while(1){if((h|0)>=(f|0)){break}if((a[b+((c[g>>2]|0)+h|0)|0]|0)==(a[h+149504|0]|0)){h=h+1|0}else{e=3618;break L4880}}if((h|0)!=1){e=3616;break}c[13898]=d+1;iE();g=c[18070]|0;b=c[g>>2]|0;f=c[18066]|0;if((b|0)<(f|0)){i=g;j=b}else{b=db(g,(f<<5)+4808|0,168072)|0;f=b;c[18070]=f;c[18066]=(c[18066]|0)+150;i=f;j=c[b>>2]|0}c[i+8+(j<<5)>>2]=15;b=c[18070]|0;c[b>>2]=(c[b>>2]|0)+1;b=c[13898]|0;if((c[8272]|0)>(b|0)){d=b}else{e=3615;break}}if((e|0)==3616){return}else if((e|0)==3615){return}else if((e|0)==3618){return}else if((e|0)==3617){return}}function iE(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;iF();b=c[13898]|0;if((c[8272]|0)>(b|0)){d=b}else{return}L4899:while(1){b=c[1054]|0;if((a[b+(d*40&-1)|0]&1)==0){e=3632;break}f=c[b+(d*40&-1)+36>>2]|0;g=b+(d*40&-1)+32|0;b=c[10036]|0;h=0;while(1){if((h|0)>=(f|0)){break}if((a[b+((c[g>>2]|0)+h|0)|0]|0)==(a[h+147520|0]|0)){h=h+1|0}else{e=3630;break L4899}}if((h|0)!=1){e=3633;break}c[13898]=d+1;iF();g=c[18070]|0;b=c[g>>2]|0;f=c[18066]|0;if((b|0)<(f|0)){i=g;j=b}else{b=db(g,(f<<5)+4808|0,168072)|0;f=b;c[18070]=f;c[18066]=(c[18066]|0)+150;i=f;j=c[b>>2]|0}c[i+8+(j<<5)>>2]=16;b=c[18070]|0;c[b>>2]=(c[b>>2]|0)+1;b=c[13898]|0;if((c[8272]|0)>(b|0)){d=b}else{e=3634;break}}if((e|0)==3633){return}else if((e|0)==3632){return}else if((e|0)==3630){return}else if((e|0)==3634){return}}function iF(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;iI();iJ();iH();iG();L4916:while(1){b=c[13898]|0;d=(c[8272]|0)>(b|0);if(!d){e=3675;break}f=c[1054]|0;if((a[f+(b*40&-1)|0]&1)!=0){g=c[f+(b*40&-1)+36>>2]|0;h=f+(b*40&-1)+32|0;f=c[10036]|0;i=0;while(1){if((i|0)>=(g|0)){e=3641;break}if((a[f+((c[h>>2]|0)+i|0)|0]|0)==(a[i+145384|0]|0)){i=i+1|0}else{break}}do{if((e|0)==3641){e=0;if((i|0)!=2){break}c[13898]=b+1;iI();iJ();iH();iG();h=c[18070]|0;f=c[h>>2]|0;g=c[18066]|0;if((f|0)<(g|0)){j=h;k=f}else{f=db(h,(g<<5)+4808|0,168072)|0;g=f;c[18070]=g;c[18066]=(c[18066]|0)+150;j=g;k=c[f>>2]|0}c[j+8+(k<<5)>>2]=17;f=c[18070]|0;c[f>>2]=(c[f>>2]|0)+1;continue L4916}}while(0);if(!d){e=3674;break}}i=c[1054]|0;L4932:do{if((a[i+(b*40&-1)|0]&1)!=0){f=c[i+(b*40&-1)+36>>2]|0;g=i+(b*40&-1)+32|0;h=c[10036]|0;l=0;while(1){if((l|0)>=(f|0)){break}if((a[h+((c[g>>2]|0)+l|0)|0]|0)==(a[l+143464|0]|0)){l=l+1|0}else{break L4932}}if((l|0)!=2){break}c[13898]=b+1;iI();iJ();iH();iG();g=c[18070]|0;h=c[g>>2]|0;f=c[18066]|0;if((h|0)<(f|0)){m=g;n=h}else{h=db(g,(f<<5)+4808|0,168072)|0;f=h;c[18070]=f;c[18066]=(c[18066]|0)+150;m=f;n=c[h>>2]|0}c[m+8+(n<<5)>>2]=18;h=c[18070]|0;c[h>>2]=(c[h>>2]|0)+1;continue L4916}}while(0);if(!d){e=3673;break}i=c[1054]|0;if((a[i+(b*40&-1)|0]&1)!=0){h=c[i+(b*40&-1)+36>>2]|0;f=i+(b*40&-1)+32|0;i=c[10036]|0;g=0;while(1){if((g|0)>=(h|0)){e=3659;break}if((a[i+((c[f>>2]|0)+g|0)|0]|0)==(a[g+141992|0]|0)){g=g+1|0}else{break}}do{if((e|0)==3659){e=0;if((g|0)!=2){break}c[13898]=b+1;iI();iJ();iH();iG();f=c[18070]|0;i=c[f>>2]|0;h=c[18066]|0;if((i|0)<(h|0)){o=f;p=i}else{i=db(f,(h<<5)+4808|0,168072)|0;h=i;c[18070]=h;c[18066]=(c[18066]|0)+150;o=h;p=c[i>>2]|0}c[o+8+(p<<5)>>2]=33;i=c[18070]|0;c[i>>2]=(c[i>>2]|0)+1;continue L4916}}while(0);if(!d){e=3676;break}}g=c[1054]|0;if((a[g+(b*40&-1)|0]&1)==0){e=3677;break}i=c[g+(b*40&-1)+36>>2]|0;h=g+(b*40&-1)+32|0;g=c[10036]|0;f=0;while(1){if((f|0)>=(i|0)){break}if((a[g+((c[h>>2]|0)+f|0)|0]|0)==(a[f+140312|0]|0)){f=f+1|0}else{e=3678;break L4916}}if((f|0)!=2){e=3679;break}c[13898]=b+1;iI();iJ();iH();iG();h=c[18070]|0;g=c[h>>2]|0;i=c[18066]|0;if((g|0)<(i|0)){q=h;r=g}else{g=db(h,(i<<5)+4808|0,168072)|0;i=g;c[18070]=i;c[18066]=(c[18066]|0)+150;q=i;r=c[g>>2]|0}c[q+8+(r<<5)>>2]=34;g=c[18070]|0;c[g>>2]=(c[g>>2]|0)+1}if((e|0)==3679){return}else if((e|0)==3673){return}else if((e|0)==3674){return}else if((e|0)==3675){return}else if((e|0)==3676){return}else if((e|0)==3677){return}else if((e|0)==3678){return}}function iG(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;L4975:while(1){b=c[13898]|0;d=c[8272]|0;e=(d|0)>(b|0);if(!e){f=3726;break}g=c[1054]|0;if((a[g+(b*40&-1)|0]&1)!=0){h=c[g+(b*40&-1)+36>>2]|0;i=g+(b*40&-1)+32|0;g=c[10036]|0;j=0;while(1){if((j|0)>=(h|0)){f=3686;break}if((a[g+((c[i>>2]|0)+j|0)|0]|0)==(a[j+138304|0]|0)){j=j+1|0}else{break}}do{if((f|0)==3686){f=0;if((j|0)!=1){break}c[13898]=b+1;iI();iJ();iH();i=c[18070]|0;g=c[i>>2]|0;h=c[18066]|0;if((g|0)<(h|0)){k=i;l=g}else{g=db(i,(h<<5)+4808|0,168072)|0;h=g;c[18070]=h;c[18066]=(c[18066]|0)+150;k=h;l=c[g>>2]|0}c[k+8+(l<<5)>>2]=19;g=c[18070]|0;c[g>>2]=(c[g>>2]|0)+1;continue L4975}}while(0);if(!e){f=3729;break}}j=c[1054]|0;L4991:do{if((a[j+(b*40&-1)|0]&1)!=0){g=c[j+(b*40&-1)+36>>2]|0;h=j+(b*40&-1)+32|0;i=c[10036]|0;m=0;while(1){if((m|0)>=(g|0)){break}if((a[i+((c[h>>2]|0)+m|0)|0]|0)==(a[m+136608|0]|0)){m=m+1|0}else{break L4991}}if((m|0)!=1){break}h=b+1|0;L4998:do{if((a[25288]&1)!=0&(d|0)>(h|0)){if((a[j+(h*40&-1)|0]&1)==0){break}g=c[j+(h*40&-1)+36>>2]|0;n=j+(h*40&-1)+32|0;o=0;while(1){if((o|0)>=(g|0)){break}if((a[i+((c[n>>2]|0)+o|0)|0]|0)==(a[o+134808|0]|0)){o=o+1|0}else{break L4998}}if((o|0)==1){f=3728;break L4975}}}while(0);c[13898]=h;iI();iJ();iH();i=c[18070]|0;m=c[i>>2]|0;n=c[18066]|0;if((m|0)<(n|0)){p=i;q=m}else{m=db(i,(n<<5)+4808|0,168072)|0;n=m;c[18070]=n;c[18066]=(c[18066]|0)+150;p=n;q=c[m>>2]|0}c[p+8+(q<<5)>>2]=20;m=c[18070]|0;c[m>>2]=(c[m>>2]|0)+1;continue L4975}}while(0);if(!e){f=3730;break}j=c[1054]|0;if((a[j+(b*40&-1)|0]&1)!=0){d=c[j+(b*40&-1)+36>>2]|0;m=j+(b*40&-1)+32|0;j=c[10036]|0;n=0;while(1){if((n|0)>=(d|0)){f=3710;break}if((a[j+((c[m>>2]|0)+n|0)|0]|0)==(a[n+133312|0]|0)){n=n+1|0}else{break}}do{if((f|0)==3710){f=0;if((n|0)!=2){break}c[13898]=b+1;iI();iJ();iH();m=c[18070]|0;j=c[m>>2]|0;d=c[18066]|0;if((j|0)<(d|0)){r=m;s=j}else{j=db(m,(d<<5)+4808|0,168072)|0;d=j;c[18070]=d;c[18066]=(c[18066]|0)+150;r=d;s=c[j>>2]|0}c[r+8+(s<<5)>>2]=21;j=c[18070]|0;c[j>>2]=(c[j>>2]|0)+1;continue L4975}}while(0);if(!e){f=3727;break}}n=c[1054]|0;if((a[n+(b*40&-1)|0]&1)==0){f=3731;break}j=c[n+(b*40&-1)+36>>2]|0;d=n+(b*40&-1)+32|0;n=c[10036]|0;m=0;while(1){if((m|0)>=(j|0)){break}if((a[n+((c[d>>2]|0)+m|0)|0]|0)==(a[m+131928|0]|0)){m=m+1|0}else{f=3724;break L4975}}if((m|0)!=2){f=3725;break}c[13898]=b+1;iI();iJ();iH();d=c[18070]|0;n=c[d>>2]|0;j=c[18066]|0;if((n|0)<(j|0)){t=d;u=n}else{n=db(d,(j<<5)+4808|0,168072)|0;j=n;c[18070]=j;c[18066]=(c[18066]|0)+150;t=j;u=c[n>>2]|0}c[t+8+(u<<5)>>2]=22;n=c[18070]|0;c[n>>2]=(c[n>>2]|0)+1}if((f|0)==3726){return}else if((f|0)==3727){return}else if((f|0)==3728){return}else if((f|0)==3724){return}else if((f|0)==3725){return}else if((f|0)==3729){return}else if((f|0)==3730){return}else if((f|0)==3731){return}}function iH(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;L5043:while(1){b=c[13898]|0;d=(c[8272]|0)>(b|0);L5045:do{if(d){e=c[1054]|0;if((a[e+(b*40&-1)|0]&1)==0){break}f=c[e+(b*40&-1)+36>>2]|0;g=e+(b*40&-1)+32|0;e=c[10036]|0;h=0;while(1){if((h|0)>=(f|0)){break}if((a[e+((c[g>>2]|0)+h|0)|0]|0)==(a[h+202200|0]|0)){h=h+1|0}else{break L5045}}if((h|0)!=1){break}c[13898]=b+1;iI();iJ();g=c[18070]|0;e=c[g>>2]|0;f=c[18066]|0;if((e|0)<(f|0)){i=g;j=e}else{e=db(g,(f<<5)+4808|0,168072)|0;f=e;c[18070]=f;c[18066]=(c[18066]|0)+150;i=f;j=c[e>>2]|0}c[i+8+(j<<5)>>2]=32;e=c[18070]|0;c[e>>2]=(c[e>>2]|0)+1;continue L5043}}while(0);if(a[14176]&(c[8230]|0)==1|d^1){k=3763;break}e=c[1054]|0;if((a[e+(b*40&-1)|0]&1)!=0){f=c[e+(b*40&-1)+36>>2]|0;g=e+(b*40&-1)+32|0;e=c[10036]|0;l=0;while(1){if((l|0)>=(f|0)){k=3747;break}if((a[e+((c[g>>2]|0)+l|0)|0]|0)==(a[l+129568|0]|0)){l=l+1|0}else{break}}do{if((k|0)==3747){k=0;if((l|0)!=1){break}c[13898]=b+1;iI();iJ();g=c[18070]|0;e=c[g>>2]|0;f=c[18066]|0;if((e|0)<(f|0)){m=g;n=e}else{e=db(g,(f<<5)+4808|0,168072)|0;f=e;c[18070]=f;c[18066]=(c[18066]|0)+150;m=f;n=c[e>>2]|0}c[m+8+(n<<5)>>2]=23;e=c[18070]|0;c[e>>2]=(c[e>>2]|0)+1;continue L5043}}while(0);if(!d){k=3764;break}}l=c[1054]|0;if((a[l+(b*40&-1)|0]&1)==0){k=3765;break}e=c[l+(b*40&-1)+36>>2]|0;f=l+(b*40&-1)+32|0;l=c[10036]|0;g=0;while(1){if((g|0)>=(e|0)){break}if((a[l+((c[f>>2]|0)+g|0)|0]|0)==(a[g+202112|0]|0)){g=g+1|0}else{k=3761;break L5043}}if((g|0)!=1){k=3762;break}c[13898]=b+1;iI();iJ();f=c[18070]|0;l=c[f>>2]|0;e=c[18066]|0;if((l|0)<(e|0)){o=f;p=l}else{l=db(f,(e<<5)+4808|0,168072)|0;e=l;c[18070]=e;c[18066]=(c[18066]|0)+150;o=e;p=c[l>>2]|0}c[o+8+(p<<5)>>2]=24;l=c[18070]|0;c[l>>2]=(c[l>>2]|0)+1}if((k|0)==3762){return}else if((k|0)==3763){return}else if((k|0)==3761){return}else if((k|0)==3764){return}else if((k|0)==3765){return}}function iI(){var b=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0;b=i;i=i+104|0;e=b|0;f=b+56|0;g=b+72|0;h=b+88|0;j=c[13898]|0;k=(c[8272]|0)>(j|0);L5087:do{if(k){l=c[1054]|0;if((a[l+(j*40&-1)|0]&1)!=0){m=c[l+(j*40&-1)+36>>2]|0;n=l+(j*40&-1)+32|0;l=c[10036]|0;o=0;while(1){if((o|0)>=(m|0)){p=3771;break}if((a[l+((c[n>>2]|0)+o|0)|0]|0)==(a[o+124624|0]|0)){o=o+1|0}else{break}}do{if((p|0)==3771){if((o|0)!=1){break}c[13898]=j+1;iI();n=c[18070]|0;l=c[n>>2]|0;m=c[18066]|0;if((l|0)<(m|0)){q=n;r=l}else{l=db(n,(m<<5)+4808|0,168072)|0;m=l;c[18070]=m;c[18066]=(c[18066]|0)+150;q=m;r=c[l>>2]|0}c[q+8+(r<<5)>>2]=9;l=c[18070]|0;c[l>>2]=(c[l>>2]|0)+1;i=b;return}}while(0);if(!k){break}}o=c[1054]|0;L5103:do{if((a[o+(j*40&-1)|0]&1)!=0){l=c[o+(j*40&-1)+36>>2]|0;m=o+(j*40&-1)+32|0;n=c[10036]|0;s=0;while(1){if((s|0)>=(l|0)){break}if((a[n+((c[m>>2]|0)+s|0)|0]|0)==(a[s+123264|0]|0)){s=s+1|0}else{break L5103}}if((s|0)!=1){break}c[13898]=j+1;iI();m=c[18070]|0;n=c[m>>2]|0;l=c[18066]|0;if((n|0)<(l|0)){t=m;u=n}else{n=db(m,(l<<5)+4808|0,168072)|0;l=n;c[18070]=l;c[18066]=(c[18066]|0)+150;t=l;u=c[n>>2]|0}c[t+8+(u<<5)>>2]=10;n=c[18070]|0;c[n>>2]=(c[n>>2]|0)+1;i=b;return}}while(0);if(!k){break}o=c[1054]|0;if((a[o+(j*40&-1)|0]&1)!=0){n=c[o+(j*40&-1)+36>>2]|0;l=o+(j*40&-1)+32|0;o=c[10036]|0;m=0;while(1){if((m|0)>=(n|0)){p=3789;break}if((a[o+((c[l>>2]|0)+m|0)|0]|0)==(a[m+202112|0]|0)){m=m+1|0}else{break}}do{if((p|0)==3789){if((m|0)!=1){break}c[13898]=j+1;iI();l=c[18070]|0;o=c[l>>2]|0;n=c[18066]|0;if((o|0)<(n|0)){w=l;x=o}else{o=db(l,(n<<5)+4808|0,168072)|0;n=o;c[18070]=n;c[18066]=(c[18066]|0)+150;w=n;x=c[o>>2]|0}c[w+8+(x<<5)>>2]=11;o=c[18070]|0;c[o>>2]=(c[o>>2]|0)+1;i=b;return}}while(0);if(!k){break}}m=c[1054]|0;if((a[m+(j*40&-1)|0]&1)==0){break}o=c[m+(j*40&-1)+36>>2]|0;n=m+(j*40&-1)+32|0;m=c[10036]|0;l=0;while(1){if((l|0)>=(o|0)){break}if((a[m+((c[n>>2]|0)+l|0)|0]|0)==(a[l+129568|0]|0)){l=l+1|0}else{break L5087}}if((l|0)!=1){break}c[13898]=j+1;iI();i=b;return}}while(0);x=f|0;f=g|0;g=h|0;L5138:do{if(k){h=c[1054]|0;if((a[h+(j*40&-1)|0]&1)!=0){w=c[h+(j*40&-1)+36>>2]|0;u=h+(j*40&-1)+32|0;h=c[10036]|0;t=0;while(1){if((t|0)>=(w|0)){p=3805;break}if((a[h+((c[u>>2]|0)+t|0)|0]|0)==(a[t+199040|0]|0)){t=t+1|0}else{break}}do{if((p|0)==3805){if((t|0)!=1){break}c[13898]=j+1;if((iy()|0)==0){c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}u=c[13898]|0;h=c[8272]|0;L5151:do{if((h|0)>(u|0)){w=u;l=h;while(1){r=c[1054]|0;if((a[r+(w*40&-1)|0]&1)==0){y=w;z=l;break L5151}q=c[r+(w*40&-1)+36>>2]|0;n=r+(w*40&-1)+32|0;r=c[10036]|0;m=0;while(1){if((m|0)>=(q|0)){break}if((a[r+((c[n>>2]|0)+m|0)|0]|0)==(a[m+148464|0]|0)){m=m+1|0}else{y=w;z=l;break L5151}}if((m|0)!=1){y=w;z=l;break L5151}c[13898]=w+1;n=c[18070]|0;r=c[n>>2]|0;q=c[18066]|0;if((r|0)<(q|0)){A=n;B=r}else{r=db(n,(q<<5)+4808|0,168072)|0;q=r;c[18070]=q;c[18066]=(c[18066]|0)+150;A=q;B=c[r>>2]|0}c[A+8+(B<<5)>>2]=5;r=c[18070]|0;c[r>>2]=(c[r>>2]|0)+1;if((iy()|0)==0){c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}r=c[13898]|0;q=c[8272]|0;if((q|0)>(r|0)){w=r;l=q}else{y=r;z=q;break}}}else{y=u;z=h}}while(0);if((z|0)<=(y|0)){uf(y,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}h=c[1054]|0;if((a[h+(y*40&-1)|0]&1)==0){uf(y,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}u=c[h+(y*40&-1)+36>>2]|0;s=h+(y*40&-1)+32|0;h=c[10036]|0;l=0;while(1){if((l|0)>=(u|0)){break}if((a[h+((c[s>>2]|0)+l|0)|0]|0)==(a[l+131272|0]|0)){l=l+1|0}else{p=4123;break}}if((p|0)==4123){uf(y,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((l|0)==1){c[13898]=y+1;break L5138}else{uf(y,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if(!k){p=3828;break}}t=c[1054]|0;s=a[t+(j*40&-1)|0]|0;if((s&1)==0){C=t;D=s;p=3843;break}h=c[t+(j*40&-1)+36>>2]|0;u=t+(j*40&-1)+32|0;w=c[10036]|0;q=0;while(1){if((q|0)>=(h|0)){break}if((a[w+((c[u>>2]|0)+q|0)|0]|0)==(a[q+180784|0]|0)){q=q+1|0}else{C=t;D=s;p=3843;break L5138}}if((q|0)!=1){C=t;D=s;p=3843;break}u=j+1|0;c[13898]=u;if((a[t+(u*40&-1)|0]&1)!=0){uf(u,114232,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}w=j+2|0;c[13898]=w;h=t+(u*40&-1)+8|0;r=h;n=c[h>>2]|0;h=c[r+4>>2]|0;o=c[t+(u*40&-1)+16>>2]|0;u=r+12|0;c[x>>2]=c[u>>2];c[x+4>>2]=c[u+4>>2];c[x+8>>2]=c[u+8>>2];if((n|0)!=1|(o|0)<0){uf(w,110760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[18068]|0)<(o|0)){c[18068]=o}w=c[18070]|0;n=c[w>>2]|0;u=c[18066]|0;if((n|0)<(u|0)){E=w;F=n}else{n=db(w,(u<<5)+4808|0,168072)|0;u=n;c[18070]=u;c[18066]=(c[18066]|0)+150;E=u;F=c[n>>2]|0}c[E+8+(F<<5)>>2]=31;n=c[18070]|0;u=c[n>>2]|0;c[n>>2]=u+1;n=c[18070]|0;w=n+8+(u<<5)+8|0;r=w;c[w>>2]=1;c[r+4>>2]=h;c[n+8+(u<<5)+16>>2]=o;o=r+12|0;c[o>>2]=c[x>>2];c[o+4>>2]=c[x+4>>2];c[o+8>>2]=c[x+8>>2]}else{p=3828}}while(0);if((p|0)==3828){x=c[1054]|0;C=x;D=a[x+(j*40&-1)|0]|0;p=3843}L5204:do{if((p|0)==3843){if((D&1)==0){x=c[18070]|0;F=c[x>>2]|0;E=c[18066]|0;if((F|0)<(E|0)){G=x;H=F}else{F=db(x,(E<<5)+4808|0,168072)|0;E=F;c[18070]=E;c[18066]=(c[18066]|0)+150;G=E;H=c[F>>2]|0}c[G+8+(H<<5)>>2]=1;F=c[18070]|0;E=c[F>>2]|0;c[F>>2]=E+1;F=(c[18070]|0)+8+(E<<5)+8|0;E=(c[1054]|0)+((c[13898]|0)*40&-1)+8|0;c[F>>2]=c[E>>2];c[F+4>>2]=c[E+4>>2];c[F+8>>2]=c[E+8>>2];c[F+12>>2]=c[E+12>>2];c[F+16>>2]=c[E+16>>2];c[F+20>>2]=c[E+20>>2];c[13898]=(c[13898]|0)+1;break}do{if((bO(d[(c[10036]|0)+(c[C+(j*40&-1)+32>>2]|0)|0]|0|0)|0)==0){E=c[1054]|0;F=c[10036]|0;x=c[13898]|0;if((a[F+(c[E+(j*40&-1)+32>>2]|0)|0]|0)==95){I=x;break}if((a[E+(x*40&-1)|0]&1)==0){uf(x,104392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=a[F+(c[E+(x*40&-1)+32>>2]|0)|0]|0;if(!((k<<24>>24|0)==39|(k<<24>>24|0)==34)){uf(x,104392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}x=c[18070]|0;k=c[x>>2]|0;E=c[18066]|0;if((k|0)<(E|0)){J=x;K=k}else{k=db(x,(E<<5)+4808|0,168072)|0;E=k;c[18070]=E;c[18066]=(c[18066]|0)+150;J=E;K=c[k>>2]|0}c[J+8+(K<<5)>>2]=1;k=c[18070]|0;E=c[k>>2]|0;c[k>>2]=E+1;k=c[18070]|0;c[k+8+(E<<5)+8>>2]=3;x=k+8+(E<<5)+16|0;c[x>>2]=0;E=c[13898]|0;ub(x,E,E);c[13898]=(c[13898]|0)+1;break L5204}else{I=c[13898]|0}}while(0);t=I+1|0;s=c[8272]|0;q=(s|0)>(t|0);L5226:do{if(q){E=c[1054]|0;if((a[E+(t*40&-1)|0]&1)==0){break}x=c[E+(t*40&-1)+36>>2]|0;k=E+(t*40&-1)+32|0;F=c[10036]|0;y=0;while(1){if((y|0)>=(x|0)){break}if((a[F+((c[k>>2]|0)+y|0)|0]|0)==(a[y+199040|0]|0)){y=y+1|0}else{break L5226}}if((y|0)!=1){break}k=(s|0)>(I|0);x=E+(I*40&-1)|0;l=E+(I*40&-1)+36|0;z=E+(I*40&-1)+32|0;B=41;L5234:while(1){A=c[41160+(B<<3)>>2]|0;L5236:do{if(k){if((a[x]&1)==0){break}o=c[l>>2]|0;r=0;while(1){if((r|0)>=(o|0)){break}if((a[F+((c[z>>2]|0)+r|0)|0]|0)==(a[A+r|0]|0)){r=r+1|0}else{break L5236}}if((a[A+r|0]|0)==0){L=B;break L5234}}}while(0);A=B+1|0;if((A|0)==117){L=0;break}else{B=A}}c[13898]=I+2;if((iy()|0)==0){c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}B=c[13898]|0;z=c[8272]|0;F=(z|0)>(B|0);if((L|0)==0){L5250:do{if(F){l=c[1054]|0;x=a[l+(B*40&-1)|0]|0;if((x&1)==0){M=6;N=B;O=z;break}k=c[l+(B*40&-1)+36>>2]|0;E=l+(B*40&-1)+32|0;y=c[10036]|0;A=0;while(1){if((A|0)>=(k|0)){break}if((a[y+((c[E>>2]|0)+A|0)|0]|0)==(a[A+148464|0]|0)){A=A+1|0}else{M=6;N=B;O=z;break L5250}}if((A|0)==1){P=1;Q=B;R=l;S=x}else{M=6;N=B;O=z;break}L5257:while(1){if((S&1)==0){T=P;break}E=c[R+(Q*40&-1)+36>>2]|0;y=R+(Q*40&-1)+32|0;k=c[10036]|0;o=0;while(1){if((o|0)>=(E|0)){break}if((a[k+((c[y>>2]|0)+o|0)|0]|0)==(a[o+148464|0]|0)){o=o+1|0}else{T=P;break L5257}}if((o|0)!=1){T=P;break}y=P+1|0;c[13898]=Q+1;if((iy()|0)==0){c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}k=c[13898]|0;if((c[8272]|0)<=(k|0)){T=y;break}E=c[1054]|0;P=y;Q=k;R=E;S=a[E+(k*40&-1)|0]|0}x=c[18070]|0;l=c[x>>2]|0;A=c[18066]|0;if((l|0)<(A|0)){U=x;V=l}else{l=db(x,(A<<5)+4808|0,168072)|0;A=l;c[18070]=A;c[18066]=(c[18066]|0)+150;U=A;V=c[l>>2]|0}c[U+8+(V<<5)>>2]=1;l=c[18070]|0;A=c[l>>2]|0;c[l>>2]=A+1;l=c[18070]|0;x=l+8+(A<<5)+8|0;c[x>>2]=1;c[l+8+(A<<5)+16>>2]=T;A=x+12|0;c[A>>2]=c[f>>2];c[A+4>>2]=c[f+4>>2];c[A+8>>2]=c[f+8>>2];M=7;N=c[13898]|0;O=c[8272]|0}else{M=6;N=B;O=z}}while(0);if((O|0)<=(N|0)){uf(N,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}A=c[1054]|0;if((a[A+(N*40&-1)|0]&1)==0){uf(N,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}x=c[A+(N*40&-1)+36>>2]|0;l=A+(N*40&-1)+32|0;A=c[10036]|0;k=0;while(1){if((k|0)>=(x|0)){break}if((a[A+((c[l>>2]|0)+k|0)|0]|0)==(a[k+131272|0]|0)){k=k+1|0}else{p=4154;break}}if((p|0)==4154){uf(N,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((k|0)!=1){uf(N,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=N+1;l=iv(I)|0;A=c[18070]|0;x=c[A>>2]|0;E=c[18066]|0;if((x|0)<(E|0)){W=A;X=x}else{x=db(A,(E<<5)+4808|0,168072)|0;E=x;c[18070]=E;c[18066]=(c[18066]|0)+150;W=E;X=c[x>>2]|0}c[W+8+(X<<5)>>2]=M;x=c[18070]|0;E=c[x>>2]|0;c[x>>2]=E+1;c[(c[18070]|0)+8+(E<<5)+8>>2]=l;break L5204}L5293:do{if(F){l=1;E=B;x=z;while(1){A=c[1054]|0;if((a[A+(E*40&-1)|0]&1)==0){Y=E;Z=l;_=x;break L5293}y=c[A+(E*40&-1)+36>>2]|0;r=A+(E*40&-1)+32|0;A=c[10036]|0;m=0;while(1){if((m|0)>=(y|0)){break}if((a[A+((c[r>>2]|0)+m|0)|0]|0)==(a[m+148464|0]|0)){m=m+1|0}else{Y=E;Z=l;_=x;break L5293}}if((m|0)!=1){Y=E;Z=l;_=x;break L5293}c[13898]=E+1;r=l+1|0;if((iy()|0)==0){c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}A=c[13898]|0;y=c[8272]|0;if((y|0)>(A|0)){l=r;E=A;x=y}else{Y=A;Z=r;_=y;break}}}else{Y=B;Z=1;_=z}}while(0);if((_|0)<=(Y|0)){uf(Y,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}z=c[1054]|0;if((a[z+(Y*40&-1)|0]&1)==0){uf(Y,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}B=c[z+(Y*40&-1)+36>>2]|0;F=z+(Y*40&-1)+32|0;z=c[10036]|0;k=0;while(1){if((k|0)>=(B|0)){break}if((a[z+((c[F>>2]|0)+k|0)|0]|0)==(a[k+131272|0]|0)){k=k+1|0}else{p=4166;break}}if((p|0)==4166){uf(Y,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((k|0)!=1){uf(Y,116056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=Y+1;F=c[41160+(L<<3)>>2]|0;if((aY(F|0,107968)|0)==0){z=c[18070]|0;B=c[z>>2]|0;x=c[18066]|0;if((B|0)<(x|0)){$=z;aa=B}else{B=db(z,(x<<5)+4808|0,168072)|0;x=B;c[18070]=x;c[18066]=(c[18066]|0)+150;$=x;aa=c[B>>2]|0}c[$+8+(aa<<5)>>2]=1;B=c[18070]|0;x=c[B>>2]|0;c[B>>2]=x+1;B=c[18070]|0;z=B+8+(x<<5)+8|0;c[z>>2]=1;c[B+8+(x<<5)+16>>2]=Z;x=z+12|0;c[x>>2]=c[f>>2];c[x+4>>2]=c[f+4>>2];c[x+8>>2]=c[f+8>>2]}if((aY(F|0,106992)|0)==0){x=c[18070]|0;z=c[x>>2]|0;B=c[18066]|0;if((z|0)<(B|0)){ab=x;ac=z}else{z=db(x,(B<<5)+4808|0,168072)|0;B=z;c[18070]=B;c[18066]=(c[18066]|0)+150;ab=B;ac=c[z>>2]|0}c[ab+8+(ac<<5)>>2]=1;z=c[18070]|0;B=c[z>>2]|0;c[z>>2]=B+1;z=c[18070]|0;x=z+8+(B<<5)+8|0;c[x>>2]=1;c[z+8+(B<<5)+16>>2]=-1;B=x+12|0;c[B>>2]=c[f>>2];c[B+4>>2]=c[f+4>>2];c[B+8>>2]=c[f+8>>2]}B=(aY(F|0,106056)|0)==0;F=c[18070]|0;do{if(B){x=(c[F>>2]|0)-1|0;z=F+8+(x<<5)|0;E=c[z>>2]|0;if((E|0)==1){l=c[F+8+(x<<5)+8>>2]|0;if((l|0)==3){a[32928]=1;break}else if((l|0)!=1){break}l=c[F+8+(x<<5)+16>>2]|0;if((c[18068]|0)>=(l|0)){break}c[18068]=l;ad=c[z>>2]|0}else{ad=E}if((ad|0)!=0){break}E=c[F+8+(x<<5)+8>>2]|0;if((c[E+16>>2]|0)!=1){break}x=c[E+24>>2]|0;if((c[18068]|0)>=(x|0)){break}c[18068]=x}}while(0);B=c[F>>2]|0;k=c[18066]|0;if((B|0)<(k|0)){ae=F;af=B}else{B=db(F,(k<<5)+4808|0,168072)|0;k=B;c[18070]=k;c[18066]=(c[18066]|0)+150;ae=k;af=c[B>>2]|0}c[ae+8+(af<<5)>>2]=L;B=c[18070]|0;c[B>>2]=(c[B>>2]|0)+1;break L5204}}while(0);B=(s|0)>(I|0);L5350:do{if(B){k=c[1054]|0;if((a[k+(I*40&-1)|0]&1)==0){break}x=c[k+(I*40&-1)+36>>2]|0;E=k+(I*40&-1)+32|0;z=c[10036]|0;l=0;while(1){if((l|0)>=(x|0)){break}if((a[z+((c[E>>2]|0)+l|0)|0]|0)==(a[l+104152|0]|0)){l=l+1|0}else{break L5350}}if((l|0)!=3|q^1){break}if((a[k+(t*40&-1)|0]&1)==0){break}E=c[k+(t*40&-1)+36>>2]|0;x=k+(t*40&-1)+32|0;F=0;while(1){if((F|0)>=(E|0)){break}if((a[z+((c[x>>2]|0)+F|0)|0]|0)==(a[F+78280|0]|0)){F=F+1|0}else{break L5350}}if((F|0)!=1){break}x=I+2|0;c[13898]=x;if((a[k+(x*40&-1)|0]&1)==0){ag=x;uf(ag,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if((bO(d[z+(c[k+(x*40&-1)+32>>2]|0)|0]|0|0)|0)==0){E=c[1054]|0;l=c[13898]|0;if((a[(c[10036]|0)+(c[E+(x*40&-1)+32>>2]|0)|0]|0)==95){ah=l;ai=E;break}else{ag=l}uf(ag,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{ah=c[13898]|0;ai=c[1054]|0}}while(0);x=c[ai+(ah*40&-1)+36>>2]|0;k=x+(c[ai+(ah*40&-1)+32>>2]|0)|0;z=db(0,x+1|0,116456)|0;x=c[(c[1054]|0)+(ah*40&-1)+32>>2]|0;L5372:do{if((x|0)<(k|0)){F=x;l=z;while(1){E=a[(c[10036]|0)+F|0]|0;if(E<<24>>24==0){aj=l;break L5372}y=l+1|0;a[l]=E;E=F+1|0;if((E|0)<(k|0)){F=E;l=y}else{aj=y;break}}}else{aj=z}}while(0);a[aj]=0;k=c[13898]|0;x=e|0;l=c[1054]|0;F=c[l+(k*40&-1)+36>>2]|0;y=(F|0)>49?49:F;F=c[10036]|0;E=c[l+(k*40&-1)+32>>2]|0;k=0;while(1){l=k+1|0;a[e+k|0]=a[F+E|0]|0;if((l|0)==(y|0)){break}else{E=E+1|0;k=l}}a[e+y|0]=0;e6(x);k=c[18070]|0;E=c[k>>2]|0;F=c[18066]|0;if((E|0)<(F|0)){ak=k;al=E}else{E=db(k,(F<<5)+4808|0,168072)|0;F=E;c[18070]=F;c[18066]=(c[18066]|0)+150;ak=F;al=c[E>>2]|0}c[ak+8+(al<<5)>>2]=1;E=c[18070]|0;F=c[E>>2]|0;c[E>>2]=F+1;E=c[18070]|0;c[E+8+(F<<5)+8>>2]=3;c[E+8+(F<<5)+16>>2]=z;F=c[13898]|0;E=F+1|0;c[13898]=E;if((c[8272]|0)<=(E|0)){uf(E,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=c[1054]|0;if((a[k+(E*40&-1)|0]&1)==0){uf(E,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=c[k+(E*40&-1)+36>>2]|0;r=k+(E*40&-1)+32|0;k=c[10036]|0;A=0;while(1){if((A|0)>=(l|0)){break}if((a[k+((c[r>>2]|0)+A|0)|0]|0)==(a[A+115e3|0]|0)){A=A+1|0}else{p=4127;break}}if((p|0)==4127){uf(E,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((A|0)!=1){uf(E,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=F+2;if((iy()|0)==0){c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}r=c[13898]|0;if((c[8272]|0)<=(r|0)){uf(r,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=c[1054]|0;if((a[k+(r*40&-1)|0]&1)==0){uf(r,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=c[k+(r*40&-1)+36>>2]|0;z=k+(r*40&-1)+32|0;k=c[10036]|0;x=0;while(1){if((x|0)>=(l|0)){break}if((a[k+((c[z>>2]|0)+x|0)|0]|0)==(a[x+183584|0]|0)){x=x+1|0}else{p=4133;break}}if((p|0)==4133){uf(r,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((x|0)!=1){uf(r,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=r+1;if((iy()|0)==0){c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}z=c[13898]|0;if((c[8272]|0)<=(z|0)){uf(z,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=c[1054]|0;if((a[k+(z*40&-1)|0]&1)==0){uf(z,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=c[k+(z*40&-1)+36>>2]|0;F=k+(z*40&-1)+32|0;k=c[10036]|0;E=0;while(1){if((E|0)>=(l|0)){break}if((a[k+((c[F>>2]|0)+E|0)|0]|0)==(a[E+78864|0]|0)){E=E+1|0}else{p=4162;break}}if((p|0)==4162){uf(z,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((E|0)!=1){uf(z,100792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=z+1;F=c[18070]|0;k=c[18066]|0;c[18070]=0;l=ut(312)|0;do{if((l|0)==0){gk();r=ut(312)|0;if((r|0)!=0){am=r;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=104152,v)|0)}else{am=l}}while(0);c[am>>2]=0;c[am+4>>2]=0;it();l=c[18070]|0;c[am+8>>2]=db(l,c[l>>2]<<5|8,105624)|0;c[am+12>>2]=0;c[am+16>>2]=0;c[am+24>>2]=1;c[am+32>>2]=0;c[am+48>>2]=1;c[am+56>>2]=0;c[am+72>>2]=1;c[am+80>>2]=0;c[am+96>>2]=1;c[am+104>>2]=0;c[am+120>>2]=1;c[am+128>>2]=0;c[am+144>>2]=1;c[am+152>>2]=0;c[am+168>>2]=1;c[am+176>>2]=0;c[am+192>>2]=1;c[am+200>>2]=0;c[am+216>>2]=1;c[am+224>>2]=0;c[am+240>>2]=1;c[am+248>>2]=0;c[am+264>>2]=1;c[am+272>>2]=0;c[am+288>>2]=1;c[am+296>>2]=0;c[18070]=F;c[18066]=k;l=c[F>>2]|0;if((l|0)<(k|0)){an=F;ao=l}else{l=db(F,(k<<5)+4808|0,168072)|0;z=l;c[18070]=z;c[18066]=(c[18066]|0)+150;an=z;ao=c[l>>2]|0}c[an+8+(ao<<5)>>2]=8;l=c[18070]|0;z=c[l>>2]|0;c[l>>2]=z+1;c[(c[18070]|0)+8+(z<<5)+8>>2]=am;break L5204}}while(0);q=c[11670]|0;if((q|0)==0){s=e|0;z=c[1054]|0;l=c[z+(I*40&-1)+36>>2]|0;E=(l|0)>49?49:l;l=c[10036]|0;r=c[z+(I*40&-1)+32>>2]|0;z=0;while(1){x=z+1|0;a[e+z|0]=a[l+r|0]|0;if((x|0)==(E|0)){break}else{r=r+1|0;z=x}}a[e+E|0]=0;z=e6(s)|0;r=c[18070]|0;l=c[r>>2]|0;x=c[18066]|0;if((l|0)<(x|0)){ap=r;aq=l}else{l=db(r,(x<<5)+4808|0,168072)|0;x=l;c[18070]=x;c[18066]=(c[18066]|0)+150;ap=x;aq=c[l>>2]|0}c[ap+8+(aq<<5)>>2]=0;l=c[18070]|0;x=c[l>>2]|0;c[l>>2]=x+1;c[(c[18070]|0)+8+(x<<5)+8>>2]=z;c[13898]=(c[13898]|0)+1;break}L5451:do{if(B){z=c[1054]|0;if((a[z+(I*40&-1)|0]&1)!=0){x=c[z+(I*40&-1)+36>>2]|0;l=z+(I*40&-1)+32|0;z=c[10036]|0;r=0;while(1){if((r|0)>=(x|0)){p=3992;break}if((a[z+((c[l>>2]|0)+r|0)|0]|0)==(a[r+55600|0]|0)){r=r+1|0}else{break}}do{if((p|0)==3992){if((a[r+55600|0]|0)!=0){break}c[13898]=t;l=c[18070]|0;z=c[l>>2]|0;x=c[18066]|0;if((z|0)<(x|0)){ar=l;as=z}else{z=db(l,(x<<5)+4808|0,168072)|0;x=z;c[18070]=x;c[18066]=(c[18066]|0)+150;ar=x;as=c[z>>2]|0}c[ar+8+(as<<5)>>2]=2;z=c[18070]|0;x=c[z>>2]|0;c[z>>2]=x+1;c[(c[18070]|0)+8+(x<<5)+8>>2]=q;break L5204}}while(0);if(!B){p=3997;break}}r=c[1054]|0;if((a[r+(I*40&-1)|0]&1)==0){at=r;break}x=c[r+(I*40&-1)+36>>2]|0;z=r+(I*40&-1)+32|0;l=c[10036]|0;k=0;while(1){if((k|0)>=(x|0)){break}if((a[l+((c[z>>2]|0)+k|0)|0]|0)==(a[k+55651|0]|0)){k=k+1|0}else{at=r;break L5451}}if((a[k+55651|0]|0)!=0){at=r;break}c[13898]=t;z=c[18070]|0;l=c[z>>2]|0;x=c[18066]|0;if((l|0)<(x|0)){au=z;av=l}else{l=db(z,(x<<5)+4808|0,168072)|0;x=l;c[18070]=x;c[18066]=(c[18066]|0)+150;au=x;av=c[l>>2]|0}c[au+8+(av<<5)>>2]=3;l=c[18070]|0;x=c[l>>2]|0;c[l>>2]=x+1;c[(c[18070]|0)+8+(x<<5)+8>>2]=q;break L5204}else{p=3997}}while(0);if((p|0)==3997){at=c[1054]|0}q=c[10036]|0;s=2;L5478:while(1){L5480:do{if(B){if((a[at+(I*40&-1)|0]&1)==0){break}E=c[at+(I*40&-1)+36>>2]|0;x=at+(I*40&-1)+32|0;l=0;while(1){if((l|0)>=(E|0)){break}if((a[q+((c[x>>2]|0)+l|0)|0]|0)==(a[55600+(s*51&-1)+l|0]|0)){l=l+1|0}else{break L5480}}if((a[55600+(s*51&-1)+l|0]|0)==0){p=4013;break L5478}}}while(0);r=s+1|0;if((r|0)<12){s=r}else{p=4019;break}}if((p|0)==4019){B=e|0;r=c[at+(I*40&-1)+36>>2]|0;k=(r|0)>49?49:r;r=c[at+(I*40&-1)+32>>2]|0;x=0;while(1){E=x+1|0;a[e+x|0]=a[q+r|0]|0;if((E|0)==(k|0)){break}else{r=r+1|0;x=E}}a[e+k|0]=0;x=e6(B)|0;r=c[18070]|0;q=c[r>>2]|0;E=c[18066]|0;if((q|0)<(E|0)){aw=r;ax=q}else{q=db(r,(E<<5)+4808|0,168072)|0;E=q;c[18070]=E;c[18066]=(c[18066]|0)+150;aw=E;ax=c[q>>2]|0}c[aw+8+(ax<<5)>>2]=0;q=c[18070]|0;E=c[q>>2]|0;c[q>>2]=E+1;c[(c[18070]|0)+8+(E<<5)+8>>2]=x;c[13898]=(c[13898]|0)+1;break}else if((p|0)==4013){c[13898]=t;x=c[18070]|0;E=c[x>>2]|0;q=c[18066]|0;if((E|0)<(q|0)){ay=x;az=E}else{E=db(x,(q<<5)+4808|0,168072)|0;q=E;c[18070]=q;c[18066]=(c[18066]|0)+150;ay=q;az=c[E>>2]|0}c[ay+8+(az<<5)>>2]=1;E=c[18070]|0;q=c[E>>2]|0;c[E>>2]=q+1;E=c[18070]|0;x=E+8+(q<<5)+8|0;c[x>>2]=1;c[E+8+(q<<5)+16>>2]=s;q=x+12|0;c[q>>2]=c[g>>2];c[q+4>>2]=c[g+4>>2];c[q+8>>2]=c[g+8>>2];q=c[11670]|0;x=c[18070]|0;E=c[x>>2]|0;r=c[18066]|0;if((E|0)<(r|0)){aA=x;aB=E}else{E=db(x,(r<<5)+4808|0,168072)|0;r=E;c[18070]=r;c[18066]=(c[18066]|0)+150;aA=r;aB=c[E>>2]|0}c[aA+8+(aB<<5)>>2]=4;E=c[18070]|0;r=c[E>>2]|0;c[E>>2]=r+1;c[(c[18070]|0)+8+(r<<5)+8>>2]=q;break}}}while(0);aB=c[13898]|0;aA=c[8272]|0;L5504:do{if((aA|0)>(aB|0)){g=aB;az=aA;while(1){ay=c[1054]|0;if((a[ay+(g*40&-1)|0]&1)==0){aC=g;aD=az;break L5504}ax=c[ay+(g*40&-1)+36>>2]|0;aw=ay+(g*40&-1)+32|0;ay=c[10036]|0;e=0;while(1){if((e|0)>=(ax|0)){break}if((a[ay+((c[aw>>2]|0)+e|0)|0]|0)==(a[e+124624|0]|0)){e=e+1|0}else{aC=g;aD=az;break L5504}}if((e|0)!=1){aC=g;aD=az;break L5504}c[13898]=g+1;aw=c[18070]|0;ay=c[aw>>2]|0;ax=c[18066]|0;if((ay|0)<(ax|0)){aE=aw;aF=ay}else{ay=db(aw,(ax<<5)+4808|0,168072)|0;ax=ay;c[18070]=ax;c[18066]=(c[18066]|0)+150;aE=ax;aF=c[ay>>2]|0}c[aE+8+(aF<<5)>>2]=29;ay=c[18070]|0;c[ay>>2]=(c[ay>>2]|0)+1;ay=c[13898]|0;ax=c[8272]|0;if((ax|0)>(ay|0)){g=ay;az=ax}else{aC=ay;aD=ax;break}}}else{aC=aB;aD=aA}}while(0);L5517:do{if((aD|0)>(aC|0)){aA=c[1054]|0;if((a[aA+(aC*40&-1)|0]&1)==0){aG=aC;aH=aD;break}aB=c[aA+(aC*40&-1)+36>>2]|0;aF=aA+(aC*40&-1)+32|0;aA=c[10036]|0;aE=0;while(1){if((aE|0)>=(aB|0)){break}if((a[aA+((c[aF>>2]|0)+aE|0)|0]|0)==(a[aE+103912|0]|0)){aE=aE+1|0}else{aG=aC;aH=aD;break L5517}}if((aE|0)!=2){aG=aC;aH=aD;break}c[13898]=aC+1;iI();aF=c[18070]|0;aA=c[aF>>2]|0;aB=c[18066]|0;if((aA|0)<(aB|0)){aI=aF;aJ=aA}else{aA=db(aF,(aB<<5)+4808|0,168072)|0;aB=aA;c[18070]=aB;c[18066]=(c[18066]|0)+150;aI=aB;aJ=c[aA>>2]|0}c[aI+8+(aJ<<5)>>2]=28;aA=c[18070]|0;c[aA>>2]=(c[aA>>2]|0)+1;aG=c[13898]|0;aH=c[8272]|0}else{aG=aC;aH=aD}}while(0);if((aH|0)<=(aG|0)){i=b;return}aD=c[1054]|0;if((a[aD+(aG*40&-1)|0]&1)==0){i=b;return}aC=c[aD+(aG*40&-1)+36>>2]|0;aJ=aD+(aG*40&-1)+32|0;aI=c[10036]|0;aA=0;while(1){if((aA|0)>=(aC|0)){break}if((a[aI+((c[aJ>>2]|0)+aA|0)|0]|0)==(a[aA+78280|0]|0)){aA=aA+1|0}else{p=4147;break}}if((p|0)==4147){i=b;return}if((aA|0)!=1){i=b;return}aA=aG+1|0;c[13898]=aA;aG=(aH|0)>(aA|0);L5544:do{if(aG){do{if((a[aD+(aA*40&-1)|0]&1)==0){p=4066}else{aH=c[aD+(aA*40&-1)+36>>2]|0;aJ=aD+(aA*40&-1)+32|0;aC=0;while(1){if((aC|0)>=(aH|0)){p=4064;break}if((a[aI+((c[aJ>>2]|0)+aC|0)|0]|0)==(a[aC+134808|0]|0)){aC=aC+1|0}else{break}}if((p|0)==4064){if((aC|0)==1){break}}if(aG){p=4066}else{p=4080;break L5544}}}while(0);if((p|0)==4066){if((a[aD+(aA*40&-1)|0]&1)==0){p=4080;break}aE=c[aD+(aA*40&-1)+36>>2]|0;aJ=aD+(aA*40&-1)+32|0;aH=0;while(1){if((aH|0)>=(aE|0)){break}if((a[aI+((c[aJ>>2]|0)+aH|0)|0]|0)==(a[aH+183584|0]|0)){aH=aH+1|0}else{p=4080;break L5544}}if((aH|0)!=1){p=4080;break}}aJ=c[18070]|0;aE=c[aJ>>2]|0;e=c[18066]|0;if((aE|0)<(e|0)){aK=aJ;aL=aE}else{aE=db(aJ,(e<<5)+4808|0,168072)|0;e=aE;c[18070]=e;c[18066]=(c[18066]|0)+150;aK=e;aL=c[aE>>2]|0}c[aK+8+(aL<<5)>>2]=1;aE=c[18070]|0;e=c[aE>>2]|0;c[aE>>2]=e+1;aE=c[18070]|0;c[aE+8+(e<<5)+8>>2]=1;c[aE+8+(e<<5)+16>>2]=1;e=c[13898]|0;if((c[8272]|0)<=(e|0)){break}aE=c[1054]|0;if((a[aE+(e*40&-1)|0]&1)==0){break}aJ=c[aE+(e*40&-1)+36>>2]|0;aB=aE+(e*40&-1)+32|0;aE=c[10036]|0;aF=0;while(1){if((aF|0)>=(aJ|0)){break}if((a[aE+((c[aB>>2]|0)+aF|0)|0]|0)==(a[aF+134808|0]|0)){aF=aF+1|0}else{break L5544}}if((aF|0)!=1){break}c[13898]=e+1}else{p=4080}}while(0);do{if((p|0)==4080){if((iy()|0)!=0){break}c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}}while(0);aL=c[13898]|0;aK=c[8272]|0;if((aK|0)<=(aL|0)){uf(aL,103536,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}aI=c[1054]|0;if((a[aI+(aL*40&-1)|0]&1)==0){uf(aL,103536,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}aA=c[aI+(aL*40&-1)+36>>2]|0;aD=aI+(aL*40&-1)+32|0;aG=c[10036]|0;aB=0;while(1){if((aB|0)>=(aA|0)){break}if((a[aG+((c[aD>>2]|0)+aB|0)|0]|0)==(a[aB+183584|0]|0)){aB=aB+1|0}else{p=4137;break}}if((p|0)==4137){uf(aL,103536,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((aB|0)!=1){uf(aL,103536,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}aB=aL+1|0;c[13898]=aB;aL=(aK|0)>(aB|0);L5591:do{if(aL){do{if((a[aI+(aB*40&-1)|0]&1)==0){p=4096}else{aK=c[aI+(aB*40&-1)+36>>2]|0;aD=aI+(aB*40&-1)+32|0;aA=0;while(1){if((aA|0)>=(aK|0)){p=4094;break}if((a[aG+((c[aD>>2]|0)+aA|0)|0]|0)==(a[aA+134808|0]|0)){aA=aA+1|0}else{break}}if((p|0)==4094){if((aA|0)==1){break}}if(aL){p=4096}else{p=4110;break L5591}}}while(0);if((p|0)==4096){if((a[aI+(aB*40&-1)|0]&1)==0){p=4110;break}e=c[aI+(aB*40&-1)+36>>2]|0;aF=aI+(aB*40&-1)+32|0;aD=0;while(1){if((aD|0)>=(e|0)){break}if((a[aG+((c[aF>>2]|0)+aD|0)|0]|0)==(a[aD+78864|0]|0)){aD=aD+1|0}else{p=4110;break L5591}}if((aD|0)!=1){p=4110;break}}aF=c[18070]|0;e=c[aF>>2]|0;aK=c[18066]|0;if((e|0)<(aK|0)){aM=aF;aN=e}else{e=db(aF,(aK<<5)+4808|0,168072)|0;aK=e;c[18070]=aK;c[18066]=(c[18066]|0)+150;aM=aK;aN=c[e>>2]|0}c[aM+8+(aN<<5)>>2]=1;e=c[18070]|0;aK=c[e>>2]|0;c[e>>2]=aK+1;e=c[18070]|0;c[e+8+(aK<<5)+8>>2]=1;c[e+8+(aK<<5)+16>>2]=65535;aK=c[13898]|0;if((c[8272]|0)<=(aK|0)){break}e=c[1054]|0;if((a[e+(aK*40&-1)|0]&1)==0){break}aF=c[e+(aK*40&-1)+36>>2]|0;aC=e+(aK*40&-1)+32|0;e=c[10036]|0;aE=0;while(1){if((aE|0)>=(aF|0)){break}if((a[e+((c[aC>>2]|0)+aE|0)|0]|0)==(a[aE+134808|0]|0)){aE=aE+1|0}else{break L5591}}if((aE|0)!=1){break}c[13898]=aK+1}else{p=4110}}while(0);do{if((p|0)==4110){if((iy()|0)!=0){break}c[8230]=(c[8230]|0)+1;iz();iC();c[8230]=(c[8230]|0)-1}}while(0);aN=c[13898]|0;if((c[8272]|0)<=(aN|0)){uf(aN,101328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}aM=c[1054]|0;if((a[aM+(aN*40&-1)|0]&1)==0){uf(aN,101328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}aG=c[aM+(aN*40&-1)+36>>2]|0;aB=aM+(aN*40&-1)+32|0;aM=c[10036]|0;aI=0;while(1){if((aI|0)>=(aG|0)){break}if((a[aM+((c[aB>>2]|0)+aI|0)|0]|0)==(a[aI+78864|0]|0)){aI=aI+1|0}else{p=4141;break}}if((p|0)==4141){uf(aN,101328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((aI|0)!=1){uf(aN,101328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=aN+1;aN=c[18070]|0;aI=c[aN>>2]|0;p=c[18066]|0;if((aI|0)<(p|0)){aO=aN;aP=aI}else{aI=db(aN,(p<<5)+4808|0,168072)|0;p=aI;c[18070]=p;c[18066]=(c[18066]|0)+150;aO=p;aP=c[aI>>2]|0}c[aO+8+(aP<<5)>>2]=35;aP=c[18070]|0;c[aP>>2]=(c[aP>>2]|0)+1;i=b;return}function iJ(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;L5643:while(1){b=c[13898]|0;d=(c[8272]|0)>(b|0);if(!d){e=4202;break}f=c[1054]|0;if((a[f+(b*40&-1)|0]&1)!=0){g=c[f+(b*40&-1)+36>>2]|0;h=f+(b*40&-1)+32|0;f=c[10036]|0;i=0;while(1){if((i|0)>=(g|0)){e=4174;break}if((a[f+((c[h>>2]|0)+i|0)|0]|0)==(a[i+134808|0]|0)){i=i+1|0}else{break}}do{if((e|0)==4174){e=0;if((i|0)!=1){break}c[13898]=b+1;iI();h=c[18070]|0;f=c[h>>2]|0;g=c[18066]|0;if((f|0)<(g|0)){j=h;k=f}else{f=db(h,(g<<5)+4808|0,168072)|0;g=f;c[18070]=g;c[18066]=(c[18066]|0)+150;j=g;k=c[f>>2]|0}c[j+8+(k<<5)>>2]=25;f=c[18070]|0;c[f>>2]=(c[f>>2]|0)+1;continue L5643}}while(0);if(!d){e=4198;break}}i=c[1054]|0;L5659:do{if((a[i+(b*40&-1)|0]&1)!=0){f=c[i+(b*40&-1)+36>>2]|0;g=i+(b*40&-1)+32|0;h=c[10036]|0;l=0;while(1){if((l|0)>=(f|0)){break}if((a[h+((c[g>>2]|0)+l|0)|0]|0)==(a[l+126944|0]|0)){l=l+1|0}else{break L5659}}if((l|0)!=1){break}c[13898]=b+1;iI();g=c[18070]|0;h=c[g>>2]|0;f=c[18066]|0;if((h|0)<(f|0)){m=g;n=h}else{h=db(g,(f<<5)+4808|0,168072)|0;f=h;c[18070]=f;c[18066]=(c[18066]|0)+150;m=f;n=c[h>>2]|0}c[m+8+(n<<5)>>2]=26;h=c[18070]|0;c[h>>2]=(c[h>>2]|0)+1;continue L5643}}while(0);if(!d){e=4199;break}i=c[1054]|0;if((a[i+(b*40&-1)|0]&1)==0){e=4200;break}h=c[i+(b*40&-1)+36>>2]|0;f=i+(b*40&-1)+32|0;i=c[10036]|0;g=0;while(1){if((g|0)>=(h|0)){break}if((a[i+((c[f>>2]|0)+g|0)|0]|0)==(a[g+191528|0]|0)){g=g+1|0}else{e=4201;break L5643}}if((g|0)!=1){e=4197;break}c[13898]=b+1;iI();f=c[18070]|0;i=c[f>>2]|0;h=c[18066]|0;if((i|0)<(h|0)){o=f;p=i}else{i=db(f,(h<<5)+4808|0,168072)|0;h=i;c[18070]=h;c[18066]=(c[18066]|0)+150;o=h;p=c[i>>2]|0}c[o+8+(p<<5)>>2]=27;i=c[18070]|0;c[i>>2]=(c[i>>2]|0)+1}if((e|0)==4201){return}else if((e|0)==4202){return}else if((e|0)==4198){return}else if((e|0)==4197){return}else if((e|0)==4199){return}else if((e|0)==4200){return}}function iK(){var b=0,d=0;b=i;do{if((c[258]|0)==0){d=bU(172032)|0;if((d|0)!=0){c[258]=bP(d|0)|0;break}if((a[37400]&1)==0){break}uh(-1,168056,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if((c[256]|0)!=0){i=b;return}d=bU(163792)|0;c[256]=bP(((d|0)==0?154528:d)|0)|0;i=b;return}function iL(){cv(53560|0,1)}function iM(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,p=0,q=0,t=0,u=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;e=i;i=i+160|0;f=1;g=0;j=i;i=i+168|0;c[j>>2]=0;while(1)switch(f|0){case 1:k=e|0;if((b|0)>1){l=1;f=2;break}else{f=16;break};case 2:p=c[d+(l<<2)>>2]|0;if((p|0)==0){f=15;break}else{f=3;break};case 3:q=aw(8,p|0,183208)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=5;break}else{f=4;break};case 4:q=aw(8,p|0,214328)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=5;break}else{f=6;break};case 5:aw(26,158880,(v=i,i=i+16|0,c[v>>2]=40152,c[v+8>>2]=40160,v)|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;t=0;f=81;break;case 6:q=aw(8,p|0,135600)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=8;break}else{f=7;break};case 7:q=aw(8,p|0,122640)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=8;break}else{f=9;break};case 8:aw(26,105384,(v=i,i=i+16|0,c[v>>2]=40152,c[v+8>>2]=40160,v)|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;t=0;f=81;break;case 9:q=aq(2,p|0,98264,2)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=11;break}else{f=10;break};case 10:q=aw(8,p|0,92432)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=11;break}else{f=12;break};case 11:a[32096]=1;f=15;break;case 12:q=aq(2,p|0,84592,2)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=14;break}else{f=13;break};case 13:q=aw(8,p|0,76592)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=14;break}else{f=15;break};case 14:a[21672]=1;f=15;break;case 15:q=l+1|0;if((q|0)<(b|0)){l=q;f=2;break}else{f=16;break};case 16:an(88,c[m>>2]|0,0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;q=au(2,c[n>>2]|0,0,1,1024)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=18;break}else{f=17;break};case 17:au(4,224136,28,1,c[m>>2]|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;f=18;break;case 18:au(2,c[o>>2]|0,0,2,0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;c[10030]=c[n>>2];c[500]=2;h[251]=3.141592653589793;h[252]=0.0;q=ao(4,133568)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;c[506]=q;u=+av(4,133568,0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;c[q+16>>2]=2;h[q+24>>3]=u;h[q+32>>3]=0.0;a[(c[506]|0)+8|0]=0;as(384);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;as(44);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;q=ao(56,1)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=19;break}else{w=q;f=21;break};case 19:as(424);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;q=ao(56,1)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((q|0)==0){f=20;break}else{w=q;f=21;break};case 20:ar(6,-1|0,225296,(v=i,i=i+8|0,c[v>>2]=116456,v)|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;return 0;case 21:c[6924]=w;a[w]=0;a[37400]=0;as(108);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((c[3524]|0)==0){f=25;break}else{f=22;break};case 22:am(98,c[6958]|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;am(98,c[6956]|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;x=c[c[3524]>>2]|0;if((x|0)==0){y=0;f=24;break}else{f=23;break};case 23:q=ao(162,x|0)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;y=q;f=24;break;case 24:c[6958]=y;q=ao(162,13048)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;c[6956]=q;f=25;break;case 25:ao(102,92);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;q=ao(58,c[o>>2]|0)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;z=ao(18,q|0)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;a[37400]=(z|0)!=0&1;A=1;f=26;break;case 26:if((A|0)<(b|0)){f=27;break}else{f=30;break};case 27:B=c[d+(A<<2)>>2]|0;if((a[B]|0)==45){f=28;break}else{f=29;break};case 28:if((a[B+1|0]|0)==101){f=29;break}else{A=A+1|0;f=26;break};case 29:a[37400]=0;f=30;break;case 30:z=ao(108,k|0)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((z|0)>-1){f=31;break}else{f=32;break};case 31:aw(28,33040,k|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;aw(28,33008,k+128|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;f=32;break;case 32:if((a[37400]&1)==0){f=34;break}else{f=33;break};case 33:am(272,c[m>>2]|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;f=35;break;case 34:am(272,0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;f=35;break;case 35:am(200,3);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;C=uL(53560,f,j)|0;f=82;break;case 82:if((C|0)==0){f=36;break}else{f=42;break};case 36:av(2,2,4);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;av(2,13,1);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;as(418);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;aw(24,1,0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;am(98,c[12908]|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;aw(10,5,179864);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;aw(10,2,179864);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;D=aw(10,5,0)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((D|0)==0){E=0;f=38;break}else{f=37;break};case 37:z=ao(162,D|0)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;E=z;f=38;break;case 38:c[12908]=E;as(138);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;c[5162]=37;c[5164]=7;c[5165]=5;c[5166]=15;a[20668]=112;c[5172]=0;c[5173]=0;uE(20672,0,13);c[5174]=114;c[5334]=0;c[5256]=0;c[5178]=0;h[2705]=1.5;uD(54016,50688,112);am(92,0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((a[21672]&1)==0){f=39;break}else{f=40;break};case 39:am(98,0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;f=40;break;case 40:c[10062]=0;a[14168]=1;am(92,2);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;F=c[3524]|0;if((a[37400]&1)!=0&(F|0)!=0){f=41;break}else{G=0;f=48;break};case 41:aq(4,c[m>>2]|0,211496,(v=i,i=i+8|0,c[v>>2]=c[F>>2],v)|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;G=0;f=48;break;case 42:if(a[14168]|0){f=44;break}else{f=43;break};case 43:a[14168]=1;au(4,205272,38,1,c[m>>2]|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;f=44;break;case 44:H=a[37400]&1^1;f=45;break;case 45:z=al(2)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if(z){f=45;break}else{f=46;break};case 46:I=H&255;if((a[37400]&1)==0){f=47;break}else{G=I;f=48;break};case 47:if((a[33232]&1)==0){f=49;break}else{G=I;f=48;break};case 48:z=b-1|0;if((z|0)>0){J=b;K=d;L=z;f=59;break}else{f=79;break};case 49:c[8026]=0;if((a[14080]&1)==0){f=58;break}else{f=50;break};case 50:if(a[13032]|0){f=51;break}else{f=54;break};case 51:M=c[(c[3524]|0)+104>>2]|0;if((M|0)==0){f=53;break}else{f=52;break};case 52:as(M|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;f=53;break;case 53:a[13032]=0;f=54;break;case 54:if(a[14088]|0){f=55;break}else{f=56;break};case 55:as(c[(c[3524]|0)+44>>2]|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;a[14088]=0;f=56;break;case 56:if((a[14080]&1)==0){f=58;break}else{f=57;break};case 57:as(c[(c[3524]|0)+40>>2]|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;a[14080]=0;c[10028]=0;f=58;break;case 58:am(356,1);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;return 0;case 59:N=K+4|0;c[13898]=0;O=c[N>>2]|0;z=aq(2,O|0,98264,2)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((z|0)==0){P=N;Q=L;f=65;break}else{f=60;break};case 60:z=aw(8,O|0,92432)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((z|0)==0){P=N;Q=L;f=65;break}else{f=61;break};case 61:z=aw(8,O|0,202112)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((z|0)==0){f=62;break}else{f=66;break};case 62:a[37400]=1;f=63;break;case 63:z=al(6)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((z|0)==0){f=63;break}else{f=64;break};case 64:a[37400]=0;P=N;Q=L;f=65;break;case 65:z=Q-1|0;if((z|0)>0){J=Q;K=P;L=z;f=59;break}else{f=79;break};case 66:z=aw(8,O|0,196560)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((z|0)==0){f=67;break}else{f=72;break};case 67:R=J-2|0;S=K+8|0;if((R|0)<1){f=68;break}else{f=69;break};case 68:au(4,185336,31,1,c[m>>2]|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;t=0;f=81;break;case 69:a[37400]=0;a[33232]=0;T=c[S>>2]|0;if((T|0)==0){U=0;f=71;break}else{f=70;break};case 70:z=ao(162,T|0)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;U=z;f=71;break;case 71:am(150,U|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;P=S;Q=R;f=65;break;case 72:z=aq(2,O|0,84592,2)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((z|0)==0){P=N;Q=L;f=65;break}else{f=73;break};case 73:z=aw(8,O|0,76592)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((z|0)==0){P=N;Q=L;f=65;break}else{f=74;break};case 74:if((a[O]|0)==45){f=75;break}else{f=76;break};case 75:aq(4,c[m>>2]|0,180120,(v=i,i=i+8|0,c[v>>2]=O,v)|0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;P=N;Q=L;f=65;break;case 76:a[37400]=0;a[33232]=0;V=aw(20,O|0,193632)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;W=c[N>>2]|0;if((W|0)==0){X=0;f=78;break}else{f=77;break};case 77:z=ao(162,W|0)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;X=z;f=78;break;case 78:ar(76,V|0,X|0,0);if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;P=N;Q=L;f=65;break;case 79:if((a[33232]&1)==0){t=G;f=81;break}else{f=80;break};case 80:z=al(6)|0;if((r|0)!=0&(s|0)!=0){g=uM(c[r>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;if((z|0)==0){f=80;break}else{t=G;f=81;break};case 81:i=e;return t|0;case-1:if((g|0)==35){C=s;f=82}r=s=0;break}return 0}function iN(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;if((a[21672]&1)!=0){i=d;return}do{if((b|0)==1){e=0}else if((b|0)==0){f=ut(39)|0;do{if((f|0)==0){gk();g=ut(39)|0;if((g|0)!=0){h=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=141984,v)|0)}else{h=f}}while(0);uD(h|0,74944,29);f=uA(h|0)|0;g=(f|0)==0?0:f-1|0;f=a[h+g|0]|0;if(!((f<<24>>24|0)==47|(f<<24>>24|0)==0)){a[h+(g+1|0)|0]=47;a[h+(g+2|0)|0]=0}uD(h+(uA(h|0)|0)|0,138288,10);j=bF(h|0,193632)|0;k=h;l=4229}else{g=c[258]|0;if(!((b|0)==2&(g|0)!=0)){e=0;break}f=(uA(g|0)|0)+10|0;g=ut(f)|0;do{if((g|0)==0){gk();m=ut(f)|0;if((m|0)!=0){n=m;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=141984,v)|0)}else{n=g}}while(0);uB(n|0,c[258]|0);g=uA(n|0)|0;f=(g|0)==0?0:g-1|0;g=a[n+f|0]|0;if(!((g<<24>>24|0)==47|(g<<24>>24|0)==0)){a[n+(f+1|0)|0]=47;a[n+(f+2|0)|0]=0}uD(n+(uA(n|0)|0)|0,136592,9);j=bF(n|0,193632)|0;k=n;l=4229}}while(0);do{if((l|0)==4229){if((j|0)==0){e=k;break}n=(k|0)!=0?k:136592;if((n|0)==0){o=0}else{o=bP(n|0)|0}hw(j,o,0);if((c[3524]|0)==0){e=k;break}uu(c[6958]|0);uu(c[6956]|0);n=c[c[3524]>>2]|0;if((n|0)==0){p=0}else{p=bP(n|0)|0}c[6958]=p;c[6956]=bP(13048)|0;e=k}}while(0);uu(e);i=d;return}function iO(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;if((a|0)==0){return}else{b=a}while(1){a=c[b>>2]|0;d=b+16|0;uu(c[d>>2]|0);c[d>>2]=0;d=b+320|0;uu(c[d>>2]|0);c[d>>2]=0;d=b+316|0;uu(c[d>>2]|0);c[d>>2]=0;d=b+224|0;e=c[d>>2]|0;if((e|0)!=0){f=c[e+64>>2]|0;if((f|0)==0){g=e}else{uu(f);g=e}while(1){e=c[g+60>>2]|0;if((e|0)!=0){uu(e)}e=c[g+64>>2]|0;if(!((e|0)==0|(e|0)==(f|0))){uu(e)}e=c[g>>2]|0;uu(g);if((e|0)==0){break}else{g=e}}}c[d>>2]=0;f=b+292|0;uu(c[f>>2]|0);c[f>>2]=0;uu(b);if((a|0)==0){break}else{b=a}}return}function iP(b){b=b|0;aV(2,4);aV(8,0);c[8026]=0;do{if((a[14080]&1)!=0){if(a[13032]|0){b=c[(c[3524]|0)+104>>2]|0;if((b|0)!=0){cS[b&511]()}a[13032]=0}if(a[14088]|0){cS[c[(c[3524]|0)+44>>2]&511]();a[14088]=0}if((a[14080]&1)==0){break}cS[c[(c[3524]|0)+40>>2]&511]();a[14080]=0;c[10028]=0}}while(0);aF(10,c[m>>2]|0);iL()}function iQ(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=c[b>>2]|0;if((e|0)==0){uf(-1,151280,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[e]|0)!=126){i=d;return}if((a[e+1|0]|0)!=47){i=d;return}f=c[258]|0;if((f|0)==0){uh(-1,147480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=d;return}else{g=uA(e|0)|0;h=db(e,(uA(f|0)|0)+g|0,149488)|0;c[b>>2]=h;uH(h+((uA(c[258]|0)|0)-1|0)|0,h|0,g+1|0);g=c[b>>2]|0;b=c[258]|0;uD(g|0,b|0,uA(b|0)|0);i=d;return}}function iR(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;e=a+296|0;if((c[e>>2]|0)==(b|0)){i=d;return}f=a+320|0;g=c[f>>2]|0;if((b|0)<=0){uu(g);c[f>>2]=0;c[e>>2]=0;h=a+316|0;uu(c[h>>2]|0);c[h>>2]=0;i=d;return}do{if((g|0)==0){h=b<<6;j=ut(h)|0;do{if((j|0)==0){gk();k=ut(h)|0;if((k|0)!=0){l=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=180104,v)|0)}else{l=j}}while(0);c[f>>2]=l}else{c[f>>2]=db(g,b<<6,214200)|0;j=a+316|0;h=c[j>>2]|0;if((h|0)==0){break}c[j>>2]=db(h,b<<3,158688)|0}}while(0);c[e>>2]=b;i=d;return}function iS(){var d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0,s=0,t=0,u=0,w=0;d=i;i=i+24|0;e=d|0;if((c[3524]|0)==0){uf(c[13898]|0,135392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}a[37384]=0;if(a[20368]|0){a[20368]=0;g[3538]=+g[5090];g[3536]=+g[5088];g[3534]=+g[5086];c[16336]=c[16336]^2;c[17024]=c[17024]^2}do{if((a[32936]&1)!=0){if((aY(24544,122560)|0)!=0){break}b[12272]=116}}while(0);c[16506]=c[16507];h[8255]=+h[8257];h[8256]=+h[8258];h[8261]=8.988465674311579e+307;h[8262]=-8.988465674311579e+307;f=c[16335]|0;c[16334]=f;h[8169]=(f&1|0)==0?+h[8171]:8.988465674311579e+307;h[8170]=(f&2|0)==0?+h[8172]:-8.988465674311579e+307;h[8175]=8.988465674311579e+307;h[8176]=-8.988465674311579e+307;c[17194]=c[17195];h[8599]=+h[8601];h[8600]=+h[8602];h[8605]=8.988465674311579e+307;h[8606]=-8.988465674311579e+307;f=c[17023]|0;c[17022]=f;h[8513]=(f&1|0)==0?+h[8515]:8.988465674311579e+307;h[8514]=(f&2|0)==0?+h[8516]:-8.988465674311579e+307;h[8519]=8.988465674311579e+307;h[8520]=-8.988465674311579e+307;c[17538]=c[17539];h[8771]=+h[8773];h[8772]=+h[8774];h[8777]=8.988465674311579e+307;h[8778]=-8.988465674311579e+307;f=c[17367]|0;c[17366]=f;h[8685]=(f&1|0)==0?+h[8687]:8.988465674311579e+307;h[8686]=(f&2|0)==0?+h[8688]:-8.988465674311579e+307;h[8691]=8.988465674311579e+307;h[8692]=-8.988465674311579e+307;f=c[16679]|0;c[16678]=f;h[8341]=(f&1|0)==0?+h[8343]:8.988465674311579e+307;h[8342]=(f&2|0)==0?+h[8344]:-8.988465674311579e+307;h[8347]=8.988465674311579e+307;h[8348]=-8.988465674311579e+307;L5811:do{if((a[37408]&1)!=0){f=c[13898]|0;if((c[8272]|0)>(f|0)){j=f}else{break}do{f=c[1054]|0;if((a[f+(j*40&-1)|0]&1)==0){break L5811}k=c[f+(j*40&-1)+36>>2]|0;l=f+(j*40&-1)+32|0;f=c[10036]|0;m=0;while(1){if((m|0)>=(k|0)){break}if((a[f+((c[l>>2]|0)+m|0)|0]|0)==(a[m+78280|0]|0)){m=m+1|0}else{break L5811}}if((m|0)!=1){break L5811}dn();j=c[13898]|0;}while((c[8272]|0)>(j|0))}}while(0);if((a[32936]&1)==0){n=(a[30528]&1)!=0?8:2}else{n=8}j=dr(n,-1)|0;if((a[32936]&1)==0){if((a[30528]&1)!=0){o=4309}}else{o=4309}if((o|0)==4309){dq(2)}do{if((c[16506]&3|0)==0){p=+h[8256];q=+h[8255];if(p>=q){o=4313;break}h[8255]=p;h[8256]=q;r=1}else{o=4313}}while(0);if((o|0)==4313){r=(c[16508]|0)>>>1&1}a[66036]=r;dq(1);do{if((c[16334]&3|0)==0){q=+h[8170];p=+h[8169];if(q>=p){o=4317;break}h[8169]=q;h[8170]=p;s=1}else{o=4317}}while(0);if((o|0)==4317){s=(c[16336]|0)>>>1&1}a[65348]=s;dq(6);do{if((c[17194]&3|0)==0){p=+h[8600];q=+h[8599];if(p>=q){o=4321;break}h[8599]=p;h[8600]=q;t=1}else{o=4321}}while(0);if((o|0)==4321){t=(c[17196]|0)>>>1&1}a[68788]=t;dq(5);do{if((c[17022]&3|0)==0){q=+h[8514];p=+h[8513];if(q>=p){o=4325;break}h[8513]=q;h[8514]=p;u=1}else{o=4325}}while(0);if((o|0)==4325){u=(c[17024]|0)>>>1&1}a[68100]=u;u=e;t=e+16|0;s=0;do{r=64944+(s*688&-1)|0;n=c[r>>2]|0;if((n|0)==0){o=4334}else{c[u>>2]=c[7254];c[u+4>>2]=c[7255];c[u+8>>2]=c[7256];c[u+12>>2]=c[7257];c[u+16>>2]=c[7258];c[u+20>>2]=c[7259];l=e;f=n;L5858:while(1){n=f;while(1){if((c[n+12>>2]|0)>=0){break}uu(c[n+8>>2]|0);k=c[n+16>>2]|0;uu(n);if((k|0)==0){w=l;break L5858}else{n=k}}c[l+16>>2]=n;m=c[n+16>>2]|0;if((m|0)==0){w=n;break}else{l=n;f=m}}c[w+16>>2]=0;f=c[t>>2]|0;c[r>>2]=f;if((f|0)==0){o=4334}}do{if((o|0)==4334){o=0;f=64920+(s*688&-1)|0;if((c[f>>2]|0)!=3){break}c[f>>2]=1}}while(0);s=s+1|0;}while((s|0)<11);if((j|0)<=-1){uB(55600,24544);iT();i=d;return}s=c[1054]|0;o=c[s+(j*40&-1)+36>>2]|0;t=(o|0)>49?49:o;o=c[10036]|0;w=c[s+(j*40&-1)+32>>2]|0;j=0;while(1){s=j+1|0;a[j+55600|0]=a[o+w|0]|0;if((s|0)==(t|0)){break}else{w=w+1|0;j=s}}a[t+55600|0]=0;iT();i=d;return}function iT(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0,U=0,V=0,W=0,X=0,Y=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0.0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0.0,aX=0,aZ=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0,bz=0,bB=0,bC=0,bD=0,bE=0,bF=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bL=0,bN=0,bO=0,bQ=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0,b3=0,b4=0,b5=0,b6=0,b7=0,b8=0,b9=0,ca=0,cb=0,cc=0,cd=0,ce=0,cf=0,cg=0,ch=0,ci=0,cj=0,ck=0,cl=0,cm=0,cn=0,co=0,cp=0,cq=0,cr=0,cs=0,ct=0,cu=0,cv=0,cw=0,cx=0,cy=0,cz=0,cA=0,cB=0,cC=0,cD=0,cE=0,cF=0,cG=0,cH=0,cI=0,cJ=0,cK=0,cL=0,cM=0,cN=0,cO=0,cP=0,cQ=0,cR=0,cS=0,cT=0,cU=0,cV=0,cW=0,cX=0,cY=0,cZ=0,c_=0,c$=0,c0=0.0,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9=0,da=0,dd=0,de=0,df=0,dg=0,dh=0,di=0,dj=0,dk=0,dl=0,dm=0,dn=0,dq=0,dr=0,ds=0,dt=0,du=0,dv=0,dw=0,dx=0,dy=0,dz=0,dA=0,dB=0,dC=0,dD=0,dE=0,dF=0,dG=0,dH=0,dI=0,dJ=0,dK=0,dL=0,dM=0,dN=0,dO=0,dP=0,dQ=0,dR=0,dS=0,dU=0,dV=0,dW=0,dX=0,dY=0,dZ=0,d_=0,d$=0,d0=0,d1=0,d2=0,d3=0,d4=0,d5=0,d6=0,d7=0,d8=0,d9=0,ea=0,eb=0,ec=0,ed=0.0,ee=0.0,ef=0.0,eg=0.0,eh=0.0,ei=0.0,ej=0.0,ek=0,el=0.0,em=0.0,en=0.0,eo=0.0,ep=0.0,eq=0.0,er=0.0,es=0.0,et=0,eu=0,ev=0,ew=0,ex=0.0,eA=0,eB=0.0,eE=0.0,eF=0.0,eG=0.0,eH=0,eI=0,eJ=0,eK=0,eN=0.0,eO=0.0,eP=0,eQ=0,eR=0,eS=0.0,eT=0.0,eU=0,eV=0,eW=0,eX=0,eY=0,eZ=0,e_=0,e$=0,e0=0,e1=0,e2=0,e3=0,e5=0,e8=0.0,e9=0,fa=0,fb=0,fc=0,fd=0,fe=0,ff=0,fg=0,fh=0,fi=0,fj=0,fk=0,fl=0.0,fm=0,fn=0,fo=0,fp=0,fq=0,fr=0,fs=0,ft=0,fu=0,fv=0.0,fw=0,fx=0.0,fy=0.0,fz=0,fA=0,fB=0,fC=0,fD=0,fE=0.0,fF=0,fG=0,fH=0,fI=0,fJ=0,fK=0,fL=0,fM=0,fN=0,fO=0,fP=0,fQ=0,fR=0,fT=0.0,fU=0,fV=0,fW=0,fX=0,fY=0,fZ=0,f_=0,f$=0,f0=0,f1=0,f2=0,f4=0,f5=0,f6=0,f7=0,f9=0,ga=0,gb=0.0,gc=0.0,gd=0,ge=0,gf=0,gg=0,gh=0,gi=0,gj=0.0,gl=0.0,gm=0.0,gn=0.0,go=0,gp=0.0,gq=0.0,gr=0.0,gs=0.0,gt=0.0,gu=0.0,gv=0,gw=0.0,gx=0.0,gy=0.0,gz=0.0,gA=0,gB=0,gC=0.0,gD=0,gE=0,gF=0.0,gG=0,gH=0,gI=0.0,gJ=0,gK=0.0,gL=0,gM=0,gN=0,gO=0,gP=0,gQ=0,gR=0,gS=0,gT=0,gU=0,gV=0,gW=0,gX=0,gY=0,gZ=0,g_=0,g$=0,g0=0,g1=0,g2=0.0,g3=0,g4=0,g5=0,g6=0,g7=0,g8=0,g9=0,ha=0,hb=0,hc=0,hd=0,he=0.0,hf=0.0,hg=0,hh=0.0,hi=0.0,hj=0,hm=0,ho=0.0;b=i;i=i+512|0;d=b|0;e=b+8|0;f=b+96|0;g=b+120|0;j=b+144|0;k=b+216|0;l=b+240|0;n=b+264|0;o=b+288|0;p=b+336|0;q=b+368|0;r=b+424|0;s=b+480|0;t=b+488|0;u=c[13898]|0;h[4834]=0.0;f8(38680);w=c[3568]|0;if((w|0)!=0){uu(w)}c[3568]=0;w=o+20|0;c[w>>2]=0;x=o+24|0;c[x>>2]=0;y=o+4|0;c[y>>2]=0;z=o+8|0;c[z>>2]=0;A=c[10814]|0;if((A|0)!=0){iO(A)}c[10814]=0;A=c[12374]|0;a[872]=0;c[7774]=iw()|0;B=c[13898]|0;if((B|0)>=(c[8272]|0)){C=B;uf(C,105216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}D=b+168|0;E=b+64|0;F=e|0;G=e+8|0;H=e+16|0;I=e+24|0;J=e+32|0;K=e+40|0;L=f|0;M=f+8|0;N=r+40|0;O=q;Q=q+4|0;U=q+16|0;V=q+24|0;W=q+8|0;X=q|0;Y=q+40|0;$=q+44|0;aa=q+32|0;ab=g|0;ac=j|0;ad=j+8|0;ae=b+192|0;af=p+8|0;ag=n|0;ah=n+8|0;ai=l|0;aj=l+8|0;ak=k|0;al=k+8|0;am=0;an=-5;ao=1;ap=-1;aq=0.0;ar=0;as=0;at=A;A=0;au=0;av=0;aw=0;ax=0;ay=43256;az=B;L5888:while(1){B=ar;aA=A;aB=az;L5890:while(1){aC=c[1054]|0;aD=(a[aC+(aB*40&-1)|0]&1)==0;L5892:do{if(!aD){aE=c[aC+(aB*40&-1)+36>>2]|0;aF=aC+(aB*40&-1)+32|0;aG=c[10036]|0;aH=0;while(1){if((aH|0)>=(aE|0)){break}if((a[aG+((c[aF>>2]|0)+aH|0)|0]|0)==(a[aH+103664|0]|0)){aH=aH+1|0}else{break L5892}}if((aH|0)==1){aJ=B;aK=aA;aL=am;aM=au;aN=ax;aO=aB;aP=4357;break L5888}}}while(0);if(au){aQ=B}else{aQ=aA?B:aB}aF=c[aC+(aB*40&-1)+36>>2]|0;L5902:do{if((aF|0)>0&(aD^1)){aG=c[10036]|0;aE=0;aR=0;aS=c[aC+(aB*40&-1)+32>>2]|0;while(1){if((a[aE+205224|0]|0)==(a[aG+(aE+aS|0)|0]|0)){aT=aS;aU=aR}else{if((aE|0)!=7){break L5902}aT=aS-1|0;aU=1}aV=aE+1|0;if((aV|0)<(aU+aF|0)){aE=aV;aR=aU;aS=aT}else{break}}if((aU|0)!=0){aP=4369;break L5890}if((aE|0)==12|(aE|0)==6){aP=4369;break L5890}}}while(0);if((t9(aB)|0)==0){aP=4446;break}dT();aF=c[13898]|0;aC=c[8272]|0;aD=(aC|0)>(aF|0);if(!aD){aJ=aQ;aK=1;aL=am;aM=au;aN=ax;aO=aF;aP=4357;break L5888}aS=c[1054]|0;if((a[aS+(aF*40&-1)|0]&1)==0){B=aQ;aA=1;aB=aF;continue}aR=c[aS+(aF*40&-1)+36>>2]|0;aG=aS+(aF*40&-1)+32|0;aS=c[10036]|0;aH=0;while(1){if((aH|0)>=(aR|0)){aP=4445;break}if((a[aS+((c[aG>>2]|0)+aH|0)|0]|0)==(a[aH+148464|0]|0)){aH=aH+1|0}else{break}}if((aP|0)==4445){aP=0;if((aH|0)==1){aW=aq;aX=ap;aZ=ao;a$=an;a0=aF;a1=aC;aP=5304;break}}if(aD){B=aQ;aA=1;aB=aF}else{aJ=aQ;aK=1;aL=am;aM=au;aN=ax;aO=aF;aP=4357;break L5888}}do{if((aP|0)==4446){aP=0;B=am+1|0;c[11670]=31424;aG=iu(0)|0;c[11670]=0;aS=(a[32936]&1)==0;aR=au^1;if((aG|0)==0){aV=aS?au:aR;a2=c[ay>>2]|0;a3=(c[6352]|0)+1|0;if((a2|0)==0){uE(D|0,0,24);a4=ut(328)|0;if((a4|0)==0){gk();a5=ut(328)|0;if((a5|0)==0){aP=4462;break L5888}else{a6=a5}}else{a6=a4}a4=a6;uE(a6|0,0,328);c[a6+296>>2]=(a3|0)<0?0:a3;if((a3|0)>0){a5=a3<<6;a7=ut(a5)|0;if((a7|0)==0){gk();a8=ut(a5)|0;if((a8|0)==0){aP=4466;break L5888}else{a9=a8}}else{a9=a7}c[a6+320>>2]=a9}c[a6+24>>2]=0;c[a6+28>>2]=-2;a7=a6+32|0;c[a7>>2]=0;c[a7+4>>2]=0;h[a6+40>>3]=1.0;h[a6+48>>3]=-2.0;a7=a6+56|0;c[a7>>2]=c[D>>2];c[a7+4>>2]=c[D+4>>2];c[a7+8>>2]=c[D+8>>2];c[a7+12>>2]=c[D+12>>2];c[a7+16>>2]=c[D+16>>2];c[a7+20>>2]=c[D+20>>2];c[a6+80>>2]=-1;c[a6+84>>2]=0;a7=a6+88|0;c[a7>>2]=c[12872];c[a7+4>>2]=c[12873];c[a7+8>>2]=c[12874];c[a7+12>>2]=c[12875];c[a7+16>>2]=c[12876];c[a7+20>>2]=c[12877];c[a7+24>>2]=c[12878];c[a7+28>>2]=c[12879];c[a7+32>>2]=c[12880];c[a7+36>>2]=c[12881];c[a7+40>>2]=c[12882];c[a7+44>>2]=c[12883];c[a7+48>>2]=c[12884];c[a7+52>>2]=c[12885];c[a6+144>>2]=1;h[a6+152>>3]=0.0;c[a6+160>>2]=0;h[a6+168>>3]=15.0;h[a6+176>>3]=90.0;c[a6+184>>2]=0;a7=a6+192|0;c[a7>>2]=c[12372];c[a7+4>>2]=c[12373];c[a7+8>>2]=c[12374];c[a7+12>>2]=c[12375];c[a7+16>>2]=c[12376];c[a7+20>>2]=c[12377];c[a7+24>>2]=c[12378];c[a7+28>>2]=c[12379];c[ay>>2]=a4;ba=a4}else{iR(a2,a3);ba=a2}c[ba+8>>2]=0;c[ba+12>>2]=c[10058];c[ba+240>>2]=0;a[ba+56|0]=0;a2=c[13898]|0;bb=ba;bc=1;bd=aV;be=a2-1|0;bf=0;bg=a2}else{if(!(aS|aR)){aP=4448;break L5888}aR=c[ay>>2]|0;if((aR|0)==0){uE(ae|0,0,24);aS=ut(328)|0;if((aS|0)==0){gk();a2=ut(328)|0;if((a2|0)==0){aP=4452;break L5888}else{bh=a2}}else{bh=aS}aS=bh;uE(bh|0,0,328);c[bh+296>>2]=100;a2=ut(6400)|0;if((a2|0)==0){gk();aV=ut(6400)|0;if((aV|0)==0){aP=4455;break L5888}else{bi=aV}}else{bi=a2}c[bh+320>>2]=bi;c[bh+24>>2]=0;c[bh+28>>2]=-2;a2=bh+32|0;c[a2>>2]=0;c[a2+4>>2]=0;h[bh+40>>3]=1.0;h[bh+48>>3]=-2.0;a2=bh+56|0;c[a2>>2]=c[ae>>2];c[a2+4>>2]=c[ae+4>>2];c[a2+8>>2]=c[ae+8>>2];c[a2+12>>2]=c[ae+12>>2];c[a2+16>>2]=c[ae+16>>2];c[a2+20>>2]=c[ae+20>>2];c[bh+80>>2]=-1;c[bh+84>>2]=0;a2=bh+88|0;c[a2>>2]=c[12872];c[a2+4>>2]=c[12873];c[a2+8>>2]=c[12874];c[a2+12>>2]=c[12875];c[a2+16>>2]=c[12876];c[a2+20>>2]=c[12877];c[a2+24>>2]=c[12878];c[a2+28>>2]=c[12879];c[a2+32>>2]=c[12880];c[a2+36>>2]=c[12881];c[a2+40>>2]=c[12882];c[a2+44>>2]=c[12883];c[a2+48>>2]=c[12884];c[a2+52>>2]=c[12885];c[bh+144>>2]=1;h[bh+152>>3]=0.0;c[bh+160>>2]=0;h[bh+168>>3]=15.0;h[bh+176>>3]=90.0;c[bh+184>>2]=0;a2=bh+192|0;c[a2>>2]=c[12372];c[a2+4>>2]=c[12373];c[a2+8>>2]=c[12374];c[a2+12>>2]=c[12375];c[a2+16>>2]=c[12376];c[a2+20>>2]=c[12377];c[a2+24>>2]=c[12378];c[a2+28>>2]=c[12379];c[ay>>2]=aS;bj=aS}else{bj=aR}c[bj+8>>2]=1;c[bj+12>>2]=c[12890];c[bj+284>>2]=0;c[bj+240>>2]=0;a[bj+56|0]=0;c[11856]=1;aR=ey(aG,7,bj)|0;aG=(c[13898]|0)-1|0;c[bj+4>>2]=aG;bb=bj;bc=ax;bd=au;be=aG;bf=aR;bg=c[13898]|0}c[200]=2;c[144]=1;aR=c[8272]|0;if((bg|0)<(aR|0)){aG=bb+12|0;aS=bb+144|0;a2=bb+152|0;aV=bb+80|0;a3=bb+80|0;a4=bb+84|0;a7=bb+88|0;a8=a7;a5=bb+160|0;bk=bb+168|0;bl=bb+176|0;bm=bb+184|0;bn=aw+1|0;bo=a7|0;bp=bb+92|0;bq=bb+128|0;br=bb+132|0;bs=bb+96|0;bt=bb+120|0;bu=bb+272|0;bv=bb+224|0;bw=bb+64|0;bx=bb+56|0;by=bb+192|0;bz=by|0;bB=bb+24|0;bC=bd^1;bD=bb+240|0;bE=bb+8|0;bF=bb+232|0;bG=bb+22|0;bH=(as|0)==0;bI=bb+20|0;bJ=bb+16|0;bK=bb+284|0;bL=0;bN=0;bO=0;bQ=0;bR=0;bS=0;bT=0;bU=0;bV=bg;bW=aR;L5954:while(1){aR=c[1054]|0;bX=(a[aR+(bV*40&-1)|0]&1)==0;bY=c[aR+(bV*40&-1)+36>>2]|0;bZ=aR+(bV*40&-1)+32|0;L5956:do{if(bX){b_=c[bZ>>2]|0;aP=4648}else{b$=c[10036]|0;b0=0;while(1){if((b0|0)>=(bY|0)){aP=4478;break}if((a[b$+((c[bZ>>2]|0)+b0|0)|0]|0)==(a[b0+103664|0]|0)){b0=b0+1|0}else{break}}if((aP|0)==4478){aP=0;if((b0|0)==1){b1=bS;b2=bR;b3=bO;break L5954}}b$=c[bZ>>2]|0;if(!((bY|0)>0&(bX^1))){b_=b$;aP=4648;break}b4=c[10036]|0;b5=0;b6=0;b7=b$;while(1){if((a[b5+168032|0]|0)==(a[b4+(b5+b7|0)|0]|0)){b8=b7;b9=b6}else{if((b5|0)!=1){break}b8=b7-1|0;b9=1}ca=b5+1|0;if((ca|0)<(b9+bY|0)){b5=ca;b6=b9;b7=b8}else{aP=4485;break}}do{if((aP|0)==4485){aP=0;if((b9|0)==0){if(!((b5|0)==0|(b5|0)==6)){break}}if(bL){cb=bV;aP=6078;break L5888}cc=bV+1|0;c[13898]=cc;b7=c[aR+(cc*40&-1)+36>>2]|0;b6=c[aR+(cc*40&-1)+32>>2]|0;b4=(a[aR+(cc*40&-1)|0]&1)==0;b0=(b7|0)>0;ca=c[10036]|0;cd=30960;ce=115840;L5978:while(1){L5980:do{if(!b4){if(b0){cf=0;cg=0;ch=b6;while(1){ci=a[ce+cf|0]|0;if(ci<<24>>24==(a[ca+(cf+ch|0)|0]|0)){cj=ch;ck=cg}else{if(ci<<24>>24!=36){break L5980}cj=ch-1|0;ck=1}cl=cf+1|0;if((cl|0)<(ck+b7|0)){cf=cl;cg=ck;ch=cj}else{break}}if((ck|0)==0){cm=cl}else{cn=cd;break L5978}}else{cm=0}ch=a[ce+cm|0]|0;if((ch<<24>>24|0)==36|(ch<<24>>24|0)==0){cn=cd;break L5978}}}while(0);ch=cd+8|0;cg=c[ch>>2]|0;if((cg|0)==0){cn=ch;break}else{cd=ch;ce=cg}}ce=c[cn+4>>2]|0;if((ce-1|0)>>>0>=9){aP=4501;break L5888}c[bK>>2]=ce;c[aG>>2]=1;c[13898]=(c[13898]|0)+1;co=bU;cp=bT;cq=bS;cr=bR;cs=bQ;ct=bO;cu=bN;cv=1;break L5956}}while(0);if(bX){b_=b$;aP=4648;break}L5996:do{if((bY|0)>0){b5=c[10036]|0;ce=0;cd=0;b7=b$;while(1){if((a[ce+154504|0]|0)==(a[b5+(ce+b7|0)|0]|0)){cw=b7;cx=cd}else{if((ce|0)!=2){aP=4511;break L5996}cw=b7-1|0;cx=1}ca=ce+1|0;if((ca|0)<(cx+bY|0)){ce=ca;cd=cx;b7=cw}else{break}}if((cx|0)!=0){break}if(!((ce|0)==1|(ce|0)==4)){aP=4511}}else{aP=4511}}while(0);do{if((aP|0)==4511){aP=0;if(!((bY|0)>0&(bX^1))){b_=b$;aP=4648;break L5956}b7=c[10036]|0;cd=0;b5=0;ca=b$;while(1){if((a[cd+116896|0]|0)==(a[b7+(cd+ca|0)|0]|0)){cy=ca;cz=b5}else{if((cd|0)!=2){break}cy=ca-1|0;cz=1}b6=cd+1|0;if((b6|0)<(cz+bY|0)){cd=b6;b5=cz;ca=cy}else{aP=4517;break}}if((aP|0)==4517){aP=0;if((cz|0)!=0){break}if((cd|0)==1|(cd|0)==4){break}}if(bX){b_=b$;aP=4648;break L5956}L6020:do{if((bY|0)>0){ca=c[10036]|0;b5=0;b7=0;ce=b$;while(1){if((a[b5+224032|0]|0)==(a[ca+(b5+ce|0)|0]|0)){cA=ce;cB=b7}else{if((b5|0)!=1){break L6020}cA=ce-1|0;cB=1}b6=b5+1|0;if((b6|0)<(cB+bY|0)){b5=b6;b7=cB;ce=cA}else{break}}if((cB|0)==0){if(!((b5|0)==0|(b5|0)==5)){break}}if(bO){cb=bV;aP=6075;break L5888}a[bI]=a[36231]&1^1;do{if((a[32936]&1)!=0){if(bd){aP=4546;break L5888}if(bH){break}a[as]=0}}while(0);b5=c[13898]|0;cC=b5+1|0;c[13898]=cC;ce=c[1054]|0;b7=c[ce+(cC*40&-1)+36>>2]|0;ca=c[ce+(cC*40&-1)+32>>2]|0;b6=ce+(cC*40&-1)|0;L6038:do{if((a[b6]&1)!=0&(b7|0)>0){b0=c[10036]|0;b4=0;cg=0;ch=ca;while(1){if((a[b4+137208|0]|0)==(a[b0+(b4+ch|0)|0]|0)){cD=ch;cE=cg}else{if((b4|0)!=3){break L6038}cD=ch-1|0;cE=1}cf=b4+1|0;if((cf|0)<(cE+b7|0)){b4=cf;cg=cE;ch=cD}else{break}}if((cE|0)==0){if(!((b4|0)==2|(b4|0)==12)){break}}ch=c[8272]|0;L6050:do{if((ch|0)>(cC|0)){cg=c[10036]|0;b0=0;while(1){if((b0|0)>=(b7|0)){break}if((a[cg+(ca+b0|0)|0]|0)==(a[b0+141968|0]|0)){b0=b0+1|0}else{break L6050}}if((b0|0)!=10){break}cf=b5+2|0;if((ch|0)<=(cf|0)){break}if((a[ce+(cf*40&-1)|0]&1)==0){break}ci=c[ce+(cf*40&-1)+36>>2]|0;cF=ce+(cf*40&-1)+32|0;cf=0;while(1){if((cf|0)>=(ci|0)){break}if((a[cg+((c[cF>>2]|0)+cf|0)|0]|0)==(a[cf+199040|0]|0)){cf=cf+1|0}else{break L6050}}if((cf|0)==1){break L6038}}}while(0);eM(bb);co=bU;cp=bT;cq=bS;cr=bR;cs=bQ;ct=1;cu=bN;cv=bL;break L5956}}while(0);a[43504]=1;if((cC|0)>=(c[8272]|0)){aP=4577;break L5888}L6066:do{if((a[b6]&1)!=0){ce=c[10036]|0;b5=0;while(1){if((b5|0)>=(b7|0)){break}if((a[ce+(ca+b5|0)|0]|0)==(a[b5+103664|0]|0)){b5=b5+1|0}else{break L6066}}if((b5|0)==1){aP=4577;break L5888}}}while(0);a[14176]=1;is(j);a[14176]=0;if((c[ac>>2]|0)!=3){aP=4576;break L5888}ca=c[ad>>2]|0;c[bJ>>2]=ca;if((ca|0)==0){aP=6068;break L5888}a[43504]=0;co=bU;cp=bT;cq=bS;cr=bR;cs=bQ;ct=1;cu=bN;cv=bL;break L5956}}while(0);if(!((bY|0)>0&(bX^1))){b_=b$;aP=4648;break L5956}cd=c[10036]|0;ca=0;b7=0;b6=b$;while(1){if((a[ca+202e3|0]|0)==(a[cd+(ca+b6|0)|0]|0)){cG=b6;cH=b7}else{if((ca|0)!=3){break}cG=b6-1|0;cH=1}ce=ca+1|0;if((ce|0)<(cH+bY|0)){ca=ce;b7=cH;b6=cG}else{aP=4587;break}}do{if((aP|0)==4587){aP=0;if((cH|0)==0){if(!((ca|0)==2|(ca|0)==7)){break}}if(bO){cb=bV;aP=6077;break L5888}b6=bV+1|0;c[13898]=b6;b7=(a[aR+(b6*40&-1)|0]&1)==0;if(b7){aP=4592}else{cd=c[10036]|0;ce=a[cd+(c[aR+(b6*40&-1)+32>>2]|0)|0]|0;if((ce<<24>>24|0)==39|(ce<<24>>24|0)==34){cI=cd;aP=4602}else{aP=4592}}L6091:do{if((aP|0)==4592){aP=0;cd=c[10810]|0;if((cd|0)==0){break}ce=aR+(b6*40&-1)+36|0;ch=aR+(b6*40&-1)+32|0;b4=c[10036]|0;cF=cd;L6094:while(1){cd=c[cF+4>>2]|0;L6096:do{if(!((bW|0)<=(b6|0)|b7)){cg=c[ce>>2]|0;ci=0;while(1){if((ci|0)>=(cg|0)){break}if((a[b4+((c[ch>>2]|0)+ci|0)|0]|0)==(a[cd+ci|0]|0)){ci=ci+1|0}else{break L6096}}if((a[cd+ci|0]|0)==0){break L6094}}}while(0);cd=c[cF>>2]|0;if((cd|0)==0){break L6091}else{cF=cd}}if((a[cF+8|0]&1)!=0){break}if((c[cF+16>>2]|0)==3){cI=b4;aP=4602}}}while(0);L6105:do{if((aP|0)==4602){aP=0;if((b6|0)>=(bW|0)){break}L6108:do{if(!b7){ch=c[aR+(b6*40&-1)+36>>2]|0;ce=aR+(b6*40&-1)+32|0;b5=0;while(1){if((b5|0)>=(ch|0)){break}if((a[cI+((c[ce>>2]|0)+b5|0)|0]|0)==(a[b5+103664|0]|0)){b5=b5+1|0}else{break L6108}}if((b5|0)==1){break L6105}}}while(0);a[14176]=1;is(g);a[14176]=0;if((c[ab>>2]|0)==3){break}c[13898]=b6}}while(0);a[bG]=1;if(bH){co=bU;cp=bT;cq=bS;cr=bR;cs=bQ;ct=1;cu=bN;cv=bL;break L5956}a[as]=0;co=bU;cp=bT;cq=bS;cr=bR;cs=bQ;ct=1;cu=bN;cv=bL;break L5956}}while(0);if(!((bY|0)>0&(bX^1))){b_=b$;aP=4648;break L5956}ca=c[10036]|0;b6=0;b7=0;b4=b$;while(1){if((a[b6+196448|0]|0)==(a[ca+(b6+b4|0)|0]|0)){cJ=b4;cK=b7}else{if((b6|0)!=1){b_=b$;aP=4648;break L5956}cJ=b4-1|0;cK=1}cF=b6+1|0;if((cF|0)<(cK+bY|0)){b6=cF;b7=cK;b4=cJ}else{break}}if((cK|0)==0){if(!((b6|0)==0|(b6|0)==4)){b_=b$;aP=4648;break L5956}}if(bQ){cb=bV;aP=6082;break L5888}if(!((a[32936]&1)==0|bC)){aP=4622;break L5888}b4=bV+1|0;c[13898]=b4;b7=c[aR+(b4*40&-1)+36>>2]|0;ca=c[aR+(b4*40&-1)+32>>2]|0;cF=(a[aR+(b4*40&-1)|0]&1)==0;b4=(b7|0)>0;ce=c[10036]|0;ch=30672;cd=116448;L6132:while(1){L6134:do{if(!cF){if(b4){cf=0;cg=0;b0=ca;while(1){cL=a[cd+cf|0]|0;if(cL<<24>>24==(a[ce+(cf+b0|0)|0]|0)){cM=b0;cN=cg}else{if(cL<<24>>24!=36){break L6134}cM=b0-1|0;cN=1}cO=cf+1|0;if((cO|0)<(cN+b7|0)){cf=cO;cg=cN;b0=cM}else{break}}if((cN|0)==0){cP=cO}else{cQ=ch;break L6132}}else{cP=0}b0=a[cd+cP|0]|0;if((b0<<24>>24|0)==36|(b0<<24>>24|0)==0){cQ=ch;break L6132}}}while(0);b0=ch+8|0;cg=c[b0>>2]|0;if((cg|0)==0){cQ=b0;break}else{ch=b0;cd=cg}}cd=c[cQ+4>>2]|0;cR=bV+2|0;c[13898]=cR;if((cd|0)==-1){aP=4634;break L5888}c[aG>>2]=cd;if((cd|0)==345){hE(bD);cS=c[aG>>2]|0}else{cS=cd}L6151:do{if((cS|0)==400|(cS|0)==416|(cS|0)==432){cd=c[13898]|0;if((c[8272]|0)<=(cd|0)){break}ch=c[1054]|0;if((a[ch+(cd*40&-1)|0]&1)==0){break}b7=c[ch+(cd*40&-1)+36>>2]|0;ce=ch+(cd*40&-1)+32|0;ch=c[10036]|0;ca=0;while(1){if((ca|0)>=(b7|0)){break}if((a[ch+((c[ce>>2]|0)+ca|0)|0]|0)==(a[ca+224816|0]|0)){ca=ca+1|0}else{break L6151}}if((ca|0)!=8){break}c[13898]=cd+1;a[bF]=1}}while(0);if((c[bE>>2]|0)!=0){co=bU;cp=bT;cq=bS;cr=bR;cs=1;ct=bO;cu=bN;cv=bL;break L5956}ce=c[aG>>2]|0;if(!((ce&4|0)!=0|(ce|0)==368)){co=bU;cp=bT;cq=bS;cr=bR;cs=1;ct=bO;cu=bN;cv=bL;break L5956}uh(c[13898]|0,131840,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[aG>>2]=18;co=bU;cp=bT;cq=bS;cr=bR;cs=1;ct=bO;cu=bN;cv=bL;break L5956}}while(0);if(bN){cb=bV;aP=6081;break L5888}if(!((a[32936]&1)==0|bC)){aP=4521;break L5888}cT=bV+1|0;c[13898]=cT;b$=c[aR+(cT*40&-1)+36>>2]|0;ce=c[aR+(cT*40&-1)+32>>2]|0;ch=(a[aR+(cT*40&-1)|0]&1)==0;b7=(b$|0)>0;b4=c[10036]|0;L6166:do{if(ch){aP=6064}else{L6168:do{if(b7){cF=0;while(1){if((a[cF+122952|0]|0)!=(a[b4+(cF+ce|0)|0]|0)){break L6168}b6=cF+1|0;if((b6|0)<(b$|0)){cF=b6}else{cU=b6;aP=4526;break}}}else{cU=0;aP=4526}}while(0);if((aP|0)==4526){aP=0;cF=a[cU+122952|0]|0;if((cF<<24>>24|0)==36|(cF<<24>>24|0)==0){cV=31768;break}}if(ch){aP=6064;break}L6176:do{if(b7){cF=0;while(1){if((a[cF+121816|0]|0)!=(a[b4+(cF+ce|0)|0]|0)){break L6176}cd=cF+1|0;if((cd|0)<(b$|0)){cF=cd}else{cW=cd;aP=6053;break}}}else{cW=0;aP=6053}}while(0);if((aP|0)==6053){aP=0;cF=a[cW+121816|0]|0;if((cF<<24>>24|0)==36|(cF<<24>>24|0)==0){cV=31776;break}}if(ch){aP=6064;break}L6184:do{if(b7){cF=0;while(1){if((a[cF+119872|0]|0)!=(a[b4+(cF+ce|0)|0]|0)){break L6184}cd=cF+1|0;if((cd|0)<(b$|0)){cF=cd}else{cX=cd;aP=6058;break}}}else{cX=0;aP=6058}}while(0);if((aP|0)==6058){aP=0;cF=a[cX+119872|0]|0;if((cF<<24>>24|0)==36|(cF<<24>>24|0)==0){cV=31784;break}}if(ch){aP=6064;break}if(b7){cF=0;while(1){if((a[cF+116712|0]|0)!=(a[b4+(cF+ce|0)|0]|0)){aP=6064;break L6166}cd=cF+1|0;if((cd|0)<(b$|0)){cF=cd}else{cY=cd;break}}}else{cY=0}cF=a[cY+116712|0]|0;if((cF<<24>>24|0)==36|(cF<<24>>24|0)==0){cV=31792}else{aP=6064}}}while(0);if((aP|0)==6064){aP=0;cV=31800}b$=c[cV+4>>2]|0;if((b$|0)==0){c[200]=2;c[144]=1;c[13898]=bV+2;co=bU;cp=bT;cq=bS;cr=bR;cs=bQ;ct=bO;cu=1;cv=bL;break}else if((b$|0)==1){c[200]=6;c[144]=5;c[13898]=bV+2;co=bU;cp=bT;cq=bS;cr=bR;cs=bQ;ct=bO;cu=1;cv=bL;break}else if((b$|0)==2){c[200]=2;c[144]=5;c[13898]=bV+2;co=bU;cp=bT;cq=bS;cr=bR;cs=bQ;ct=bO;cu=1;cv=bL;break}else if((b$|0)==3){c[200]=6;c[144]=1;c[13898]=bV+2;co=bU;cp=bT;cq=bS;cr=bR;cs=bQ;ct=bO;cu=1;cv=bL;break}else{aP=4533;break L5888}}}while(0);L6205:do{if((aP|0)==4648){aP=0;aR=c[aG>>2]|0;if((aR|0)==252){L6209:do{if((bY|0)>0&(bX^1)){bZ=c[10036]|0;aE=0;b$=0;ce=b_;while(1){if((a[aE+130576|0]|0)==(a[bZ+(aE+ce|0)|0]|0)){cZ=ce;c_=b$}else{if((aE|0)!=7){break L6209}cZ=ce-1|0;c_=1}b4=aE+1|0;if((b4|0)<(c_+bY|0)){aE=b4;b$=c_;ce=cZ}else{break}}if((c_|0)==0){if(!((aE|0)==6|(aE|0)==11)){break}}c[aS>>2]=3;ce=(c[13898]|0)+1|0;c[13898]=ce;b$=c[1054]|0;L6221:do{if((a[b$+(ce*40&-1)|0]&1)!=0){bZ=c[10810]|0;if((bZ|0)==0){break L6209}b4=(c[8272]|0)>(ce|0);b7=b$+(ce*40&-1)+36|0;ch=b$+(ce*40&-1)+32|0;cF=c[10036]|0;cd=bZ;L6224:while(1){ca=c[cd+4>>2]|0;L6226:do{if(b4){b6=c[b7>>2]|0;cg=0;while(1){if((cg|0)>=(b6|0)){break}if((a[cF+((c[ch>>2]|0)+cg|0)|0]|0)==(a[ca+cg|0]|0)){cg=cg+1|0}else{break L6226}}if((a[ca+cg|0]|0)==0){aP=4665;break L6224}}}while(0);ca=c[cd>>2]|0;if((ca|0)==0){c$=bZ;break}else{cd=ca}}do{if((aP|0)==4665){aP=0;if((a[cd+8|0]&1)!=0){c$=bZ;break}if((c[cd+16>>2]|0)==1){break L6221}else{c$=bZ}}}while(0);L6236:while(1){bZ=c[c$+4>>2]|0;L6238:do{if(b4){cd=c[b7>>2]|0;ca=0;while(1){if((ca|0)>=(cd|0)){break}if((a[cF+((c[ch>>2]|0)+ca|0)|0]|0)==(a[bZ+ca|0]|0)){ca=ca+1|0}else{break L6238}}if((a[bZ+ca|0]|0)==0){break L6236}}}while(0);bZ=c[c$>>2]|0;if((bZ|0)==0){break L6209}else{c$=bZ}}if((a[c$+8|0]&1)!=0){break L6209}if((c[c$+16>>2]|0)!=2){break L6209}}}while(0);ce=is(f)|0;b$=c[ce>>2]|0;if((b$|0)==1){c0=+(c[ce+8>>2]|0)}else if((b$|0)==2){c0=+h[ce+8>>3]}else if((b$|0)==3){c0=+uz(c[ce+8>>2]|0,0)}else{aP=4680;break L5888}if((c[L>>2]|0)==3){uu(c[M>>2]|0);c[L>>2]=1}h[a2>>3]=c0}}while(0);c1=c[aG>>2]|0}else{c1=aR}do{if((c1|0)==225){ce=c[13898]|0;do{if(!bR){c[a3>>2]=-1;c[a4>>2]=0;c[a8>>2]=c[12872];c[a8+4>>2]=c[12873];c[a8+8>>2]=c[12874];c[a8+12>>2]=c[12875];c[a8+16>>2]=c[12876];c[a8+20>>2]=c[12877];c[a8+24>>2]=c[12878];c[a8+28>>2]=c[12879];c[a8+32>>2]=c[12880];c[a8+36>>2]=c[12881];c[a8+40>>2]=c[12882];c[a8+44>>2]=c[12883];c[a8+48>>2]=c[12884];c[a8+52>>2]=c[12885];c[aS>>2]=1;h[a2>>3]=0.0;c[a5>>2]=0;h[bk>>3]=15.0;h[bl>>3]=90.0;c[bm>>2]=0;if((a[30080]&1)!=0){lK(a7,bn);break}b$=c[8798]|0;aE=(b$|0)>0;ch=bn;L6265:while(1){cF=43264;while(1){c2=c[cF>>2]|0;if((c2|0)==0){break}if((c[c2+4>>2]|0)==(ch|0)){break L6265}else{cF=c2|0}}c3=ch-1|0;if(!((ch|0)>(b$|0)&aE)){aP=4699;break}ch=((c3|0)%(b$|0)&-1)+1|0}if((aP|0)==4699){aP=0;c[bp>>2]=c3;c[bq>>2]=1;c[br>>2]=c3;c[bs>>2]=c3;break}b$=c2+8|0;c[a8>>2]=c[b$>>2];c[a8+4>>2]=c[b$+4>>2];c[a8+8>>2]=c[b$+8>>2];c[a8+12>>2]=c[b$+12>>2];c[a8+16>>2]=c[b$+16>>2];c[a8+20>>2]=c[b$+20>>2];c[a8+24>>2]=c[b$+24>>2];c[a8+28>>2]=c[b$+28>>2];c[a8+32>>2]=c[b$+32>>2];c[a8+36>>2]=c[b$+36>>2];c[a8+40>>2]=c[b$+40>>2];c[a8+44>>2]=c[b$+44>>2];c[a8+48>>2]=c[b$+48>>2];c[a8+52>>2]=c[b$+52>>2];c[bo>>2]=0;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[bp>>2]=ch;a[bt]=0;break}if((a[bt]&1)!=0){break}c[bq>>2]=1;c[br>>2]=c[bp>>2]}}while(0);hL(aV,1);b$=c[13898]|0;if((ce|0)==(b$|0)){c4=c[aG>>2]|0;break}else{if(bR){cb=b$;aP=6076;break L5888}else{co=bU;cp=bT;cq=bS;cr=1;cs=bQ;ct=bO;cu=bN;cv=bL;break L6205}}}else{c4=c1}}while(0);aR=c[13898]|0;do{if((c4|0)==489){if(bU){c5=aR}else{c[bu>>2]=c[12406];c5=c[13898]|0}b$=c[1054]|0;aE=c[b$+(c5*40&-1)+36>>2]|0;L6289:do{if((a[b$+(c5*40&-1)|0]&1)!=0&(aE|0)>0){cF=c[10036]|0;b7=0;b4=0;bZ=c[b$+(c5*40&-1)+32>>2]|0;while(1){if((a[b7+211736|0]|0)==(a[cF+(b7+bZ|0)|0]|0)){c6=bZ;c7=b4}else{if((b7|0)!=4){c8=c5;break L6289}c6=bZ-1|0;c7=1}cd=b7+1|0;if((cd|0)<(c7+aE|0)){b7=cd;b4=c7;bZ=c6}else{break}}if((c7|0)==0){if(!((b7|0)==3|(b7|0)==5)){c8=c5;break}}c9=c5+1|0;c[13898]=c9;bZ=(c[8272]|0)>(c9|0);if(!bZ){aP=6074;break L5888}L6302:do{if((a[b$+(c9*40&-1)|0]&1)==0){aP=4722}else{b4=c[b$+(c9*40&-1)+36>>2]|0;cF=b$+(c9*40&-1)+32|0;ch=c[10036]|0;cd=0;while(1){if((cd|0)>=(b4|0)){aP=4719;break}if((a[ch+((c[cF>>2]|0)+cd|0)|0]|0)==(a[cd+150688|0]|0)){cd=cd+1|0}else{break}}do{if((aP|0)==4719){aP=0;if((cd|0)!=2){break}c[bu>>2]=0;break L6302}}while(0);if(bZ){aP=4722}else{aP=6071;break L5888}}}while(0);L6311:do{if((aP|0)==4722){aP=0;L6313:do{if((a[b$+(c9*40&-1)|0]&1)!=0){b7=c[b$+(c9*40&-1)+36>>2]|0;cd=b$+(c9*40&-1)+32|0;cF=c[10036]|0;ch=0;while(1){if((ch|0)>=(b7|0)){break}if((a[cF+((c[cd>>2]|0)+ch|0)|0]|0)==(a[ch+211336|0]|0)){ch=ch+1|0}else{break L6313}}if((ch|0)!=2){break}c[bu>>2]=1;break L6311}}while(0);if(!bZ){aP=6072;break L5888}if((a[b$+(c9*40&-1)|0]&1)==0){aP=6073;break L5888}cd=c[b$+(c9*40&-1)+36>>2]|0;cF=b$+(c9*40&-1)+32|0;b7=c[10036]|0;ca=0;while(1){if((ca|0)>=(cd|0)){break}if((a[b7+((c[cF>>2]|0)+ca|0)|0]|0)==(a[ca+210848|0]|0)){ca=ca+1|0}else{aP=6069;break L5888}}if((ca|0)!=2){aP=6070;break L5888}c[bu>>2]=2}}while(0);bZ=(c[13898]|0)+1|0;c[13898]=bZ;c8=bZ}else{c8=c5}}while(0);if((aR|0)==(c8|0)){da=c[aG>>2]|0;break}else{if(bU){cb=c8;aP=6079;break L5888}else{co=1;cp=bT;cq=bS;cr=bR;cs=bQ;ct=bO;cu=bN;cv=bL;break L6205}}}else{da=c4}}while(0);do{if((da|0)==368){b$=c[bv>>2]|0;if((b$|0)==0){uE(E|0,0,28);aE=ut(192)|0;if((aE|0)==0){gk();ce=ut(192)|0;if((ce|0)==0){aP=4744;break L5888}else{dd=ce}}else{dd=aE}c[dd>>2]=0;c[dd+4>>2]=-1;c[dd+72>>2]=0;c[dd+88>>2]=0;uE(dd+8|0,0,60);c[dd+96>>2]=1;c[dd+144>>2]=4;c[dd+148>>2]=4;c[dd+152>>2]=4;aE=dd+156|0;c[aE>>2]=c[E>>2];c[aE+4>>2]=c[E+4>>2];c[aE+8>>2]=c[E+8>>2];c[aE+12>>2]=c[E+12>>2];c[aE+16>>2]=c[E+16>>2];c[aE+20>>2]=c[E+20>>2];c[aE+24>>2]=c[E+24>>2];a[dd+184|0]=0;c[bv>>2]=dd;c[dd+48>>2]=1;c[(c[bv>>2]|0)+56>>2]=99;de=c[bv>>2]|0}else{de=b$}jw(de);b$=c[13898]|0;if((aR|0)==(b$|0)){break}if(bT){cb=b$;aP=6080;break L5888}else{co=bU;cp=1;cq=bS;cr=bR;cs=bQ;ct=bO;cu=bN;cv=bL;break L6205}}else{uE(O|0,0,56);h[U>>3]=1.0;h[V>>3]=-2.0;c[Q>>2]=aw;c[W>>2]=av;do{if((a[30080]&1)==0){b$=c[8798]|0;aE=(b$|0)>0;ce=bn;L6346:while(1){bZ=43264;while(1){df=c[bZ>>2]|0;if((df|0)==0){break}if((c[df+4>>2]|0)==(ce|0)){break L6346}else{bZ=df|0}}dg=ce-1|0;if(!((ce|0)>(b$|0)&aE)){aP=4774;break}ce=((dg|0)%(b$|0)&-1)+1|0}if((aP|0)==4774){aP=0;c[Q>>2]=dg;c[Y>>2]=1;c[$>>2]=dg;c[W>>2]=dg;break}b$=df+8|0;c[O>>2]=c[b$>>2];c[O+4>>2]=c[b$+4>>2];c[O+8>>2]=c[b$+8>>2];c[O+12>>2]=c[b$+12>>2];c[O+16>>2]=c[b$+16>>2];c[O+20>>2]=c[b$+20>>2];c[O+24>>2]=c[b$+24>>2];c[O+28>>2]=c[b$+28>>2];c[O+32>>2]=c[b$+32>>2];c[O+36>>2]=c[b$+36>>2];c[O+40>>2]=c[b$+40>>2];c[O+44>>2]=c[b$+44>>2];c[O+48>>2]=c[b$+48>>2];c[O+52>>2]=c[b$+52>>2];c[X>>2]=0;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[Q>>2]=ce;a[aa]=0;break}if((a[aa]&1)!=0){break}c[Y>>2]=1;c[$>>2]=c[Q>>2]}else{b$=43280;while(1){dh=c[b$>>2]|0;if((dh|0)==0){break}if((c[dh+4>>2]|0)==(bn|0)){aP=4751;break}else{b$=dh|0}}if((aP|0)==4751){aP=0;b$=dh+8|0;c[O>>2]=c[b$>>2];c[O+4>>2]=c[b$+4>>2];c[O+8>>2]=c[b$+8>>2];c[O+12>>2]=c[b$+12>>2];c[O+16>>2]=c[b$+16>>2];c[O+20>>2]=c[b$+20>>2];c[O+24>>2]=c[b$+24>>2];c[O+28>>2]=c[b$+28>>2];c[O+32>>2]=c[b$+32>>2];c[O+36>>2]=c[b$+36>>2];c[O+40>>2]=c[b$+40>>2];c[O+44>>2]=c[b$+44>>2];c[O+48>>2]=c[b$+48>>2];c[O+52>>2]=c[b$+52>>2];c[X>>2]=0;if((a[aa]&1)!=0){break}c[Y>>2]=1;c[$>>2]=c[Q>>2];break}b$=c[8798]|0;ce=(b$|0)>0;aE=bn;L6367:while(1){bZ=43264;while(1){di=c[bZ>>2]|0;if((di|0)==0){break}if((c[di+4>>2]|0)==(aE|0)){break L6367}else{bZ=di|0}}dj=aE-1|0;if(!((aE|0)>(b$|0)&ce)){aP=4763;break}aE=((dj|0)%(b$|0)&-1)+1|0}if((aP|0)==4763){aP=0;c[Q>>2]=dj;c[Y>>2]=1;c[$>>2]=dj;c[W>>2]=dj;break}b$=di+8|0;c[O>>2]=c[b$>>2];c[O+4>>2]=c[b$+4>>2];c[O+8>>2]=c[b$+8>>2];c[O+12>>2]=c[b$+12>>2];c[O+16>>2]=c[b$+16>>2];c[O+20>>2]=c[b$+20>>2];c[O+24>>2]=c[b$+24>>2];c[O+28>>2]=c[b$+28>>2];c[O+32>>2]=c[b$+32>>2];c[O+36>>2]=c[b$+36>>2];c[O+40>>2]=c[b$+40>>2];c[O+44>>2]=c[b$+44>>2];c[O+48>>2]=c[b$+48>>2];c[O+52>>2]=c[b$+52>>2];c[X>>2]=0;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[Q>>2]=aE;a[aa]=0;break}if((a[aa]&1)!=0){break}c[Y>>2]=1;c[$>>2]=c[Q>>2]}}while(0);b$=c[aG>>2]|0;if((b$|0)==474){c[W>>2]=c[14067];dk=c[aG>>2]|0}else{dk=b$}b$=(dk&2|0)!=0;hH(q,1,b$);b$=c[13898]|0;if((aR|0)==(b$|0)){break}if(bR){cb=b$;aP=6083;break L5888}c[bB>>2]=c[O>>2];c[bB+4>>2]=c[O+4>>2];c[bB+8>>2]=c[O+8>>2];c[bB+12>>2]=c[O+12>>2];c[bB+16>>2]=c[O+16>>2];c[bB+20>>2]=c[O+20>>2];c[bB+24>>2]=c[O+24>>2];c[bB+28>>2]=c[O+28>>2];c[bB+32>>2]=c[O+32>>2];c[bB+36>>2]=c[O+36>>2];c[bB+40>>2]=c[O+40>>2];c[bB+44>>2]=c[O+44>>2];c[bB+48>>2]=c[O+48>>2];c[bB+52>>2]=c[O+52>>2];co=bU;cp=bT;cq=bS;cr=1;cs=bQ;ct=bO;cu=bN;cv=bL;break L6205}}while(0);if((c[aG>>2]&8|0)==0){b1=bS;b2=bR;b3=bO;break L5954}b$=c[1054]|0;ce=a[b$+(aR*40&-1)|0]|0;L6389:do{if((c[8272]|0)>(aR|0)){if((ce&1)==0){aP=4787;break}bZ=c[b$+(aR*40&-1)+36>>2]|0;ca=b$+(aR*40&-1)+32|0;cF=c[10036]|0;b7=0;while(1){if((b7|0)>=(bZ|0)){break}if((a[cF+((c[ca>>2]|0)+b7|0)|0]|0)==(a[b7+116360|0]|0)){b7=b7+1|0}else{aP=4787;break L6389}}if((b7|0)==2){aP=4795}else{aP=4787}}else{aP=4787}}while(0);L6396:do{if((aP|0)==4787){aP=0;ca=c[b$+(aR*40&-1)+36>>2]|0;if(!((ce&1)!=0&(ca|0)>0)){dl=bS;break}cF=c[10036]|0;bZ=0;cd=0;b4=c[b$+(aR*40&-1)+32>>2]|0;while(1){if((a[bZ+121984|0]|0)==(a[cF+(bZ+b4|0)|0]|0)){dm=b4;dn=cd}else{if((bZ|0)!=4){dl=bS;break L6396}dm=b4-1|0;dn=1}cg=bZ+1|0;if((cg|0)<(dn+ca|0)){bZ=cg;cd=dn;b4=dm}else{break}}if((dn|0)!=0){aP=4795;break}if((bZ|0)==3|(bZ|0)==9){aP=4795}else{dl=bS}}}while(0);do{if((aP|0)==4795){aP=0;hJ(by,c[12372]|0,c[12373]|0,at,49504);if((c[aG>>2]|0)!=345){dl=1;break}if((c[bz>>2]|0)!=0){dl=1;break}c[bz>>2]=1;dl=1}}while(0);b$=c[13898]|0;ce=c[1054]|0;b4=a[ce+(b$*40&-1)|0]|0;L6412:do{if((c[8272]|0)>(b$|0)){if((b4&1)==0){aP=4804;break}cd=c[ce+(b$*40&-1)+36>>2]|0;ca=ce+(b$*40&-1)+32|0;cF=c[10036]|0;b7=0;while(1){if((b7|0)>=(cd|0)){break}if((a[cF+((c[ca>>2]|0)+b7|0)|0]|0)==(a[b7+179168|0]|0)){b7=b7+1|0}else{aP=4804;break L6412}}if((b7|0)==2){aP=4812}else{aP=4804}}else{aP=4804}}while(0);L6419:do{if((aP|0)==4804){aP=0;ca=c[ce+(b$*40&-1)+36>>2]|0;if(!((b4&1)!=0&(ca|0)>0)){dq=bR;dr=b$;break}cF=c[10036]|0;cd=0;bZ=0;cg=c[ce+(b$*40&-1)+32>>2]|0;while(1){if((a[cd+178592|0]|0)==(a[cF+(cd+cg|0)|0]|0)){ds=cg;dt=bZ}else{if((cd|0)!=5){dq=bR;dr=b$;break L6419}ds=cg-1|0;dt=1}b6=cd+1|0;if((b6|0)<(dt+ca|0)){cd=b6;bZ=dt;cg=ds}else{break}}if((dt|0)!=0){aP=4812;break}if((cd|0)==4|(cd|0)==9){aP=4812}else{dq=bR;dr=b$}}}while(0);if((aP|0)==4812){aP=0;hH(r,0,0);c[bw>>2]=c[N>>2];c[bw+4>>2]=c[N+4>>2];c[bw+8>>2]=c[N+8>>2];c[bw+12>>2]=c[N+12>>2];a[bx]=1;dq=1;dr=c[13898]|0}if((aR|0)==(dr|0)){b1=dl;b2=dq;b3=bO;break L5954}else{co=bU;cp=bT;cq=dl;cr=dq;cs=bQ;ct=bO;cu=bN;cv=bL}}}while(0);bY=c[13898]|0;bX=c[8272]|0;if((bY|0)<(bX|0)){bL=cv;bN=cu;bO=ct;bQ=cs;bR=cr;bS=cq;bT=cp;bU=co;bV=bY;bW=bX}else{b1=cq;b2=cr;b3=ct;break}}bW=bb+21|0;a[bW]=0;if(b3){du=as;dv=b2;dw=b1}else{dx=b2;dy=b1;dz=bW;aP=4816}}else{bW=bb+21|0;a[bW]=0;dx=0;dy=0;dz=bW;aP=4816}do{if((aP|0)==4816){aP=0;a[bb+20|0]=1;if((c[9056]|0)!=1){if((as|0)==0){du=0;dv=dx;dw=dy;break}a[as]=0;du=as;dv=dx;dw=dy;break}bW=bb+16|0;bU=c[1054]|0;bT=(c[bU+(be*40&-1)+36>>2]|0)+(c[bU+(be*40&-1)+32>>2]|0)|0;bS=db(c[bW>>2]|0,(bT+1|0)-(c[bU+(aQ*40&-1)+32>>2]|0)|0,116456)|0;c[bW>>2]=bS;bU=c[(c[1054]|0)+(aQ*40&-1)+32>>2]|0;L6441:do{if((bU|0)<(bT|0)){bR=bU;bQ=bS;while(1){bO=a[(c[10036]|0)+bR|0]|0;if(bO<<24>>24==0){dA=bQ;break L6441}bN=bQ+1|0;a[bQ]=bO;bO=bR+1|0;if((bO|0)<(bT|0)){bR=bO;bQ=bN}else{dA=bN;break}}}else{dA=bS}}while(0);a[dA]=0;if(bd){dB=c[bW>>2]|0}else{dB=as}a[dz]=1;du=dB;dv=dx;dw=dy}}while(0);bS=bb+12|0;bT=c[bS>>2]|0;do{if((bT|0)==225){if(dv){dC=bb+88|0}else{bU=bb+80|0;bQ=bb+88|0;bR=aw+1|0;do{if((a[30080]&1)==0){aR=bQ|0;bN=c[aR>>2]|0;bO=c[8798]|0;bL=(bO|0)>0;bx=bR;L6458:while(1){bw=43264;while(1){dD=c[bw>>2]|0;if((dD|0)==0){break}if((c[dD+4>>2]|0)==(bx|0)){break L6458}else{bw=dD|0}}dE=bx-1|0;if(!((bx|0)>(bO|0)&bL)){aP=4840;break}bx=((dE|0)%(bO|0)&-1)+1|0}if((aP|0)==4840){aP=0;c[bb+92>>2]=dE;c[bb+128>>2]=1;c[bb+132>>2]=dE;c[bb+96>>2]=dE;break}bO=bQ;bL=dD+8|0;c[bO>>2]=c[bL>>2];c[bO+4>>2]=c[bL+4>>2];c[bO+8>>2]=c[bL+8>>2];c[bO+12>>2]=c[bL+12>>2];c[bO+16>>2]=c[bL+16>>2];c[bO+20>>2]=c[bL+20>>2];c[bO+24>>2]=c[bL+24>>2];c[bO+28>>2]=c[bL+28>>2];c[bO+32>>2]=c[bL+32>>2];c[bO+36>>2]=c[bL+36>>2];c[bO+40>>2]=c[bL+40>>2];c[bO+44>>2]=c[bL+44>>2];c[bO+48>>2]=c[bL+48>>2];c[bO+52>>2]=c[bL+52>>2];c[aR>>2]=bN;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[bb+92>>2]=bx;a[bb+120|0]=0;break}if((a[bb+120|0]&1)!=0){break}c[bb+128>>2]=1;c[bb+132>>2]=c[bb+92>>2]}else{lK(bQ,bR)}}while(0);hL(bU,1);dC=bQ}bR=bb+24|0;bW=dC;c[bR>>2]=c[bW>>2];c[bR+4>>2]=c[bW+4>>2];c[bR+8>>2]=c[bW+8>>2];c[bR+12>>2]=c[bW+12>>2];c[bR+16>>2]=c[bW+16>>2];c[bR+20>>2]=c[bW+20>>2];c[bR+24>>2]=c[bW+24>>2];c[bR+28>>2]=c[bW+28>>2];c[bR+32>>2]=c[bW+32>>2];c[bR+36>>2]=c[bW+36>>2];c[bR+40>>2]=c[bW+40>>2];c[bR+44>>2]=c[bW+44>>2];c[bR+48>>2]=c[bW+48>>2];c[bR+52>>2]=c[bW+52>>2];dF=1}else{if(dv){dF=1;break}bW=bb+24|0;bR=bb+28|0;c[bR>>2]=aw;h[bb+40>>3]=1.0;bL=bb+32|0;c[bL>>2]=av;h[bb+48>>3]=+h[3817];bO=bb+56|0;a[bO]=0;bw=aw+1|0;do{if((a[30080]&1)==0){cd=bW|0;bz=c[cd>>2]|0;aG=c[8798]|0;by=(aG|0)>0;bB=bw;L6479:while(1){bn=43264;while(1){dG=c[bn>>2]|0;if((dG|0)==0){break}if((c[dG+4>>2]|0)==(bB|0)){break L6479}else{bn=dG|0}}dH=bB-1|0;if(!((bB|0)>(aG|0)&by)){aP=4856;break}bB=((dH|0)%(aG|0)&-1)+1|0}if((aP|0)==4856){aP=0;c[bR>>2]=dH;c[bb+64>>2]=1;c[bb+68>>2]=dH;c[bL>>2]=dH;dI=bT;break}aG=bW;by=dG+8|0;c[aG>>2]=c[by>>2];c[aG+4>>2]=c[by+4>>2];c[aG+8>>2]=c[by+8>>2];c[aG+12>>2]=c[by+12>>2];c[aG+16>>2]=c[by+16>>2];c[aG+20>>2]=c[by+20>>2];c[aG+24>>2]=c[by+24>>2];c[aG+28>>2]=c[by+28>>2];c[aG+32>>2]=c[by+32>>2];c[aG+36>>2]=c[by+36>>2];c[aG+40>>2]=c[by+40>>2];c[aG+44>>2]=c[by+44>>2];c[aG+48>>2]=c[by+48>>2];c[aG+52>>2]=c[by+52>>2];c[cd>>2]=bz;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[bR>>2]=bB;a[bO]=0;dI=bT;break}if((a[bO]&1)!=0){dI=bT;break}c[bb+64>>2]=1;c[bb+68>>2]=c[bR>>2];dI=bT}else{lK(bW,bw);dI=c[bS>>2]|0}}while(0);if((dI|0)==474){c[bL>>2]=c[14067]}bw=(dI&2|0)!=0;hH(bW,1,bw);dF=0}}while(0);bT=c[bS>>2]|0;bw=(bT&2|0)==0;if(!bw){c[bb+24>>2]=1}bR=bb+8|0;do{if(!((c[bR>>2]|0)!=0|bw)){bO=bb+48|0;if(+h[bO>>3]!=-3.0){break}h[bO>>3]=1.0}}while(0);if((a[30528]&1)!=0){if(!((bT|0)==1|(bT|0)==18|(bT|0)==33|(bT|0)==51|(bT|0)==64|(bT|0)==225|(bT|0)==345|(bT|0)==368|(bT|0)==457|(bT|0)==102|(bT|0)==295)){aP=4867;break L5888}}do{if((bT&8|0)==0){dJ=at;dK=bT}else{if(!dw){hJ(bb+192|0,c[12372]|0,c[12373]|0,at,49504)}bw=bb+192|0;bO=c[bw>>2]|0;if((bO|0)==2|(bO|0)==5){dL=(c[bb+200>>2]|0)+1|0}else{dL=at}bQ=c[bS>>2]|0;if((bQ|0)!=345){dJ=dL;dK=bQ;break}if((bO|0)!=0){dJ=dL;dK=345;break}c[bw>>2]=1;dJ=dL;dK=345}}while(0);bT=bb+304|0;c[bT>>2]=c[200];bw=bb+308|0;c[bw>>2]=c[144];if((dK|0)==368){bO=bb+224|0;bQ=c[bO>>2]|0;if((bQ|0)==0){uE(E|0,0,28);bU=ut(192)|0;if((bU|0)==0){gk();by=ut(192)|0;if((by|0)==0){aP=4880;break L5888}else{dM=by}}else{dM=bU}c[dM>>2]=0;c[dM+4>>2]=-1;c[dM+72>>2]=0;c[dM+88>>2]=0;uE(dM+8|0,0,60);c[dM+96>>2]=1;c[dM+144>>2]=4;c[dM+148>>2]=4;c[dM+152>>2]=4;bU=dM+156|0;c[bU>>2]=c[E>>2];c[bU+4>>2]=c[E+4>>2];c[bU+8>>2]=c[E+8>>2];c[bU+12>>2]=c[E+12>>2];c[bU+16>>2]=c[E+16>>2];c[bU+20>>2]=c[E+20>>2];c[bU+24>>2]=c[E+24>>2];a[dM+184|0]=0;c[bO>>2]=dM;c[dM+48>>2]=1;c[(c[bO>>2]|0)+56>>2]=99;dN=c[bO>>2]|0}else{dN=bQ}c[dN+8>>2]=(c[200]|0)==6&1;c[(c[bO>>2]|0)+12>>2]=(c[144]|0)==5&1;bQ=bb+64|0;bU=c[bO>>2]|0;bO=bQ;by=bU+72|0;c[bO>>2]=c[by>>2];c[bO+4>>2]=c[by+4>>2];c[bO+8>>2]=c[by+8>>2];c[bO+12>>2]=c[by+12>>2];by=bU+72|0;if((c[by>>2]|0)==7){c[bb+28>>2]=-6}do{if((c[bU+88>>2]|0)>0){aG=c[by>>2]|0;if((aG|0)==3){if(+h[bU+80>>3]<0.0){break}}else if((aG|0)==6|(aG|0)==7){break}aG=bU+128|0;bx=c[aG>>2]|0;do{if((bx|0)==3){if(+h[bU+136>>3]>=0.0){break}bN=aG;c[bO>>2]=c[bN>>2];c[bO+4>>2]=c[bN+4>>2];c[bO+8>>2]=c[bN+8>>2];c[bO+12>>2]=c[bN+12>>2];dO=c[bU+128>>2]|0;aP=4890}else{dO=bx;aP=4890}}while(0);do{if((aP|0)==4890){aP=0;if((dO|0)!=6){break}c[bQ>>2]=6}}while(0);if((c[bU+92>>2]|0)!=-6){break}c[bb+28>>2]=-6}}while(0);dP=c[bS>>2]|0}else{dP=dK}do{if((dP|0)==474){bU=bb+224|0;if((c[bU>>2]|0)!=0){dQ=474;dR=ap;break}uE(E|0,0,28);bQ=ut(192)|0;if((bQ|0)==0){gk();bO=ut(192)|0;if((bO|0)==0){aP=4899;break L5888}else{dS=bO}}else{dS=bQ}c[dS>>2]=0;c[dS+4>>2]=-1;c[dS+72>>2]=0;c[dS+88>>2]=0;uE(dS+8|0,0,60);c[dS+96>>2]=1;c[dS+144>>2]=4;c[dS+148>>2]=4;c[dS+152>>2]=4;bQ=dS+156|0;c[bQ>>2]=c[E>>2];c[bQ+4>>2]=c[E+4>>2];c[bQ+8>>2]=c[E+8>>2];c[bQ+12>>2]=c[E+12>>2];c[bQ+16>>2]=c[E+16>>2];c[bQ+20>>2]=c[E+20>>2];c[bQ+24>>2]=c[E+24>>2];a[dS+184|0]=0;c[bU>>2]=dS;dU=c[bS>>2]|0;aP=4901}else{dU=dP;aP=4901}}while(0);do{if((aP|0)==4901){aP=0;if((dU|0)==392){if((a[64788+((c[200]|0)*688&-1)|0]&1)!=0){aP=4903;break L5888}if(((c[9670]|0)-1|0)>>>0<2){if((a[64788+((c[144]|0)*688&-1)|0]&1)!=0){aP=4906;break L5888}}bU=ap+1|0;bQ=bb+280|0;c[bQ>>2]=bU;if((bU|0)==0){bO=ut(248)|0;if((bO|0)==0){gk();by=ut(248)|0;if((by|0)==0){aP=4910;break L5888}else{dV=by}}else{dV=bO}bO=dV;by=bb+276|0;c[by>>2]=bO;bx=c[9666]|0;aG=c[3568]|0;if((aG|0)!=0){uu(aG)}c[3568]=0;c[dV>>2]=c[9670];c[dV+4>>2]=c[9671];c[dV+8>>2]=c[9672];c[dV+12>>2]=c[9673];c[dV+16>>2]=c[9674];c[dV+20>>2]=c[9675];c[dV+24>>2]=c[9676];c[dV+28>>2]=c[9677];c[dV+32>>2]=c[9678];c[dV+36>>2]=c[9679];c[dV+40>>2]=c[9680];c[dV+44>>2]=c[9681];c[dV+48>>2]=c[9682];c[dV+52>>2]=c[9683];uE(dV+56|0,0,192);c[9682]=bO;c[dV+116>>2]=bx;c[9666]=0;h[(c[by>>2]|0)+16>>3]=aq;c[(c[by>>2]|0)+32>>2]=ao;c[(c[by>>2]|0)+36>>2]=an}else{by=c[9682]|0;c[bb+276>>2]=by;bx=by+8|0;c[bx>>2]=(c[bx>>2]|0)+1}bx=c[bb+276>>2]|0;do{if(!dF){by=c[bx+32>>2]|0;if((by|0)==-5){break}bO=bb+24|0;aG=bO|0;bW=c[aG>>2]|0;bL=c[8798]|0;bN=(bL|0)>0;aR=(c[bQ>>2]|0)+by|0;L6573:while(1){by=43264;while(1){dW=c[by>>2]|0;if((dW|0)==0){break}if((c[dW+4>>2]|0)==(aR|0)){break L6573}else{by=dW|0}}dX=aR-1|0;if(!((aR|0)>(bL|0)&bN)){aP=4928;break}aR=((dX|0)%(bL|0)&-1)+1|0}if((aP|0)==4928){aP=0;c[bb+28>>2]=dX;c[bb+64>>2]=1;c[bb+68>>2]=dX;c[bb+32>>2]=dX;break}bL=bO;bN=dW+8|0;c[bL>>2]=c[bN>>2];c[bL+4>>2]=c[bN+4>>2];c[bL+8>>2]=c[bN+8>>2];c[bL+12>>2]=c[bN+12>>2];c[bL+16>>2]=c[bN+16>>2];c[bL+20>>2]=c[bN+20>>2];c[bL+24>>2]=c[bN+24>>2];c[bL+28>>2]=c[bN+28>>2];c[bL+32>>2]=c[bN+32>>2];c[bL+36>>2]=c[bN+36>>2];c[bL+40>>2]=c[bN+40>>2];c[bL+44>>2]=c[bN+44>>2];c[bL+48>>2]=c[bN+48>>2];c[bL+52>>2]=c[bN+52>>2];c[aG>>2]=bW;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[bb+28>>2]=aR;a[bb+56|0]=0;break}if((a[bb+56|0]&1)!=0){break}c[bb+64>>2]=1;c[bb+68>>2]=c[bb+28>>2]}}while(0);bN=c[bx+36>>2]|0;if((bN|0)!=-5){c[bb+200>>2]=(c[bQ>>2]|0)+bN}dY=bU;dZ=c[bS>>2]|0}else{dY=ap;dZ=dU}if((dZ|0)!=400){dQ=dZ;dR=dY;break}a[bb+56|0]=1;dQ=400;dR=dY}}while(0);do{if((c[bR>>2]|0)==1){if((bf|0)<0){c[bR>>2]=4;d_=aw+1|0;d$=(dQ>>>1&1)+av|0;break}bN=c[200]|0;bL=o+(bN<<2)|0;bB=c[bL>>2]|0;do{if((bB&1|0)==0){bz=c[64648+(bN*688&-1)>>2]|0;if((bz|0)==0){break}if((bz&1|0)!=0){h[64664+(bN*688&-1)>>3]=8.988465674311579e+307}if((bz&2|0)==0){break}h[64672+(bN*688&-1)>>3]=-8.988465674311579e+307}}while(0);if((c[64808+(bN*688&-1)>>2]|0)==1&(bf|0)<2){aP=4944;break L5888}bU=c[144]|0;if((c[64808+(bU*688&-1)>>2]|0)==1&(bf|0)<1){aP=4946;break L5888}c[12210]=bN;c[12211]=bU;c[bL>>2]=bB|1;bQ=o+(bU<<2)|0;c[bQ>>2]=c[bQ>>2]|1;aP=4950}else{if(!((a[32936]&1)==0|bd^1)){aP=4950;break}bQ=o+(c[200]<<2)|0;c[bQ>>2]=c[bQ>>2]|2;bQ=o+(c[144]<<2)|0;c[bQ>>2]=c[bQ>>2]|2;aP=4950}}while(0);do{if((aP|0)==4950){aP=0;do{if(bd){d0=aw;d1=av}else{bQ=c[bS>>2]|0;if((bQ|0)==400|(bQ|0)==416|(bQ|0)==432){d0=aw;d1=av;break}d0=aw+1|0;d1=(bQ>>>1&1)+av|0}}while(0);if((c[bR>>2]|0)!=1){d_=d0;d$=d1;break}d2=bb+4|0;bB=c[d2>>2]|0;bL=bb+316|0;do{if((c[bL>>2]|0)==0){bN=c[bb+64>>2]|0;do{if((bN|0)==3){if(+h[bb+72>>3]>=0.0){d3=0;break}d3=1}else{d3=0}}while(0);if(!((c[bb+284>>2]|0)==0&((c[bb+28>>2]|0)==-6|((bN|0)==6|d3)))){break}aR=c[bb+296>>2]<<3;bW=ut(aR)|0;if((bW|0)==0){gk();aG=ut(aR)|0;if((aG|0)==0){aP=4961;break L5888}else{d4=aG}}else{d4=bW}c[bL>>2]=d4}}while(0);bW=bb+312|0;c[bW>>2]=99;aG=c[11870]|0;if((aG|0)==1){c[12210]=c[12211]}aR=c[bS>>2]|0;do{if((aR|0)==311|(aR|0)==118|(aR|0)==137){if((aG|0)<=5){d5=4;d6=7;break}bO=c[12210]|0;c[12213]=bO;c[12212]=bO;bO=c[12211]|0;c[12215]=bO;c[12214]=bO;d5=4;d6=7}else if((aR|0)==257){c[bW>>2]=c[bw>>2];bO=c[12211]|0;c[12214]=bO;c[12213]=bO;c[12212]=bO;d5=5;d6=6}else if((aR|0)==474){c[272]=1;bO=c[273]|0;if((bO|0)==0){d5=2;d6=4;break}if((c[bO>>2]|0)!=2){d5=2;d6=4;break}bQ=bO+40|0;if((c[bQ>>2]|0)!=42){d5=2;d6=4;break}c[bQ>>2]=43;d5=2;d6=4}else if((aR|0)==252){c[bW>>2]=c[bw>>2];bQ=c[12211]|0;c[12214]=bQ;c[12213]=bQ;c[12212]=bQ;d5=5;d6=7}else if((aR|0)==169){if(!((aG|0)==4&+h[7030]==-2.0|(aG|0)>4)){d5=3;d6=6;break}bQ=c[12211]|0;c[12213]=bQ;c[12212]=bQ;d5=3;d6=6}else if((aR|0)==279|(aR|0)==86){if((aG|0)<=3){d5=3;d6=5;break}bQ=c[12210]|0;c[12213]=bQ;c[12212]=bQ;d5=3;d6=5}else if((aR|0)==295|(aR|0)==102){if((aG|0)<=3){d5=2;d6=5;break}bQ=c[12211]|0;c[12213]=bQ;c[12212]=bQ;d5=2;d6=5}else if((aR|0)==392){d5=1;d6=3}else if((aR|0)==153){d5=1;d6=4}else if((aR|0)==345){c[12212]=c[12211];d5=1;d6=3}else if((aR|0)==33|(aR|0)==1|(aR|0)==64){d5=1;d6=3}else if((aR|0)==368){c[269]=1;bQ=c[270]|0;if((bQ|0)==0){d5=3;d6=4;break}if((c[bQ>>2]|0)!=2){d5=3;d6=4;break}bO=bQ+40|0;if((c[bO>>2]|0)!=42){d5=3;d6=4;break}c[bO>>2]=43;d5=3;d6=4}else if((aR|0)==400){d5=3;d6=3}else if((aR|0)==416){d5=5;d6=6}else if((aR|0)==432){d5=6;d6=6}else if((aR|0)==457){d5=2;d6=6}else if((aR|0)==489){d5=2;d6=6}else if((aR|0)==18|(aR|0)==51){d5=1;d6=4}else if((aR|0)==225){d5=4;d6=5}else{d5=1;d6=2}}while(0);aR=bb+284|0;if((c[aR>>2]|0)==1){c[bW>>2]=0;c[12212]=0;d7=3}else{d7=d6}aG=c[11870]|0;if((aG|0)>(d7|0)){aP=4998;break L5888}if((aG|0)>0&(aG|0)<(d5|0)){aP=5e3;break L5888}aG=c[8270]|0;do{if((aG|0)!=0){if((aY(aG|0,139696)|0)==0){break}bA(4,aG|0)}}while(0);a[47040]=1;aG=eC(F,d7)|0;do{if((aG|0)==-1){d8=0;d9=0}else{bW=bb+296|0;bO=bb+320|0;bQ=bb+280|0;bU=bb+276|0;bx=bb+244|0;bz=bb+224|0;cd=bb+23|0;by=bb+288|0;bn=0;bv=0;bu=aG;while(1){if((bv|0)>=(c[bW>>2]|0)){iR(bb,(bv<<1)+1e3|0)}do{if((bu|0)>0){aV=bn+1|0;bp=c[bL>>2]|0;if((bp|0)==0){ea=bu;eb=aV;break}br=c[bS>>2]|0;if((br|0)==252|(br|0)==257){if((bu|0)<6){aP=5012;break L5888}}else if((br|0)==311|(br|0)==118|(br|0)==137){if(!((bu|0)==7|(bu|0)==5)){aP=5014;break L5888}}else if((br|0)==225){if((bu|0)<5){aP=5016;break L5888}}else if((br|0)==368|(br|0)==169|(br|0)==279|(br|0)==86|(br|0)==295|(br|0)==102){if((bu|0)<4){aP=5018;break L5888}}else if((br|0)==457){if((bu|0)==5|(bu|0)<3){aP=5020;break L5888}}else if((br|0)==489|(br|0)==153|(br|0)==18|(br|0)==51|(br|0)==33|(br|0)==1|(br|0)==64){if((bu|0)<3){aP=5022;break L5888}}br=bu-1|0;h[bp+(bv<<3)>>3]=+h[e+(br<<3)>>3];ea=br;eb=aV}else{ea=bu;eb=bn}}while(0);do{if((ea|0)==(-5|0)){if((c[bS>>2]|0)!=392){ec=bv;break}c[(c[bO>>2]|0)+(bv<<6)>>2]=2;ec=bv+1|0}else if((ea|0)==(-4|0)|(ea|0)==(-9|0)){ec=bv}else if((ea|0)==(-2|0)){c[(c[bO>>2]|0)+(bv<<6)>>2]=2;ec=bv+1|0}else if((ea|0)==(-3|0)){aV=c[bS>>2]|0;if((aV|0)==400|(aV|0)==416|(aV|0)==432){ec=bv;break}uD((c[bO>>2]|0)+(bv<<6)|0,56440,64);ec=bv+1|0}else if((ea|0)==(-6|0)){eL(bb);ec=bv}else if((ea|0)==(-7|0)){aI(115120,50,1,c[m>>2]|0);ec=bv}else if((ea|0)==0){aP=5034;break L5888}else if((ea|0)==1){h[G>>3]=+h[F>>3];h[F>>3]=+(c[11942]|0);aP=5036}else if((ea|0)==2){aP=5036}else if((ea|0)==3){if((c[aR>>2]|0)==1){ed=+h[F>>3];ee=+h[G>>3];iX(bb,bv,ed,ee,ed,ed,ee,ee,+h[H>>3]);ec=bv+1|0;break}aV=c[bS>>2]|0;if((aV|0)==392){if((c[9670]|0)==4){aP=5036;break}else{aP=5068}}else if((aV|0)==295|(aV|0)==102|(aV|0)==169){ee=+h[F>>3];ed=+h[G>>3];ef=+h[H>>3];iX(bb,bv,ee,ed,ee,ee,ed-ef,ed+ef,-1.0);ec=bv+1|0;break}else if((aV|0)==279|(aV|0)==86){ef=+h[F>>3];ed=+h[G>>3];ee=+h[H>>3];iX(bb,bv,ef,ed,ef-ee,ef+ee,ed,ed,0.0);ec=bv+1|0;break}else if((aV|0)==153){ed=+h[F>>3];ee=+h[G>>3];ef=+h[H>>3]*.5;iX(bb,bv,ed,ee,ed-ef,ed+ef,ee,ee,0.0);ec=bv+1|0;break}else if((aV|0)==368){ee=+h[F>>3];ef=+h[G>>3];iX(bb,bv,ee,ef,ee,ee,ef,ef,-1.0);br=(c[bO>>2]|0)+(bv<<6)|0;if((c[br>>2]|0)!=2){bp=c[bL>>2]|0;if((bp|0)==0){eg=0.0}else{eg=+h[bp+(bv<<3)>>3]}iW(c[bz>>2]|0,br,bv,c[11766]|0,eg)}ec=bv+1|0;break}else if((aV|0)==400){ef=+h[F>>3];ee=+h[G>>3];iX(bb,bv,ef,ee,ef,ef,ee,ee,+h[H>>3]);br=c[bO>>2]|0;bp=c[br+(bv<<6)>>2]|0;ee=+h[H>>3];L6717:do{if(ee>-8.988465674311579e+307&ee<8.988465674311579e+307){do{if((a[66852]&1)==0){h[br+(bv<<6)+32>>3]=ee}else{if(ee<0.0){h[br+(bv<<6)+32>>3]=ee;break L6717}if(ee==0.0){h[br+(bv<<6)+32>>3]=-8.988465674311579e+307;break L6717}else{ef=+_(+ee);h[br+(bv<<6)+32>>3]=ef/+h[8358];break}}}while(0);if(!((a[cd]&1)==0&(bp|0)==0)){break}ef=+h[H>>3];if(ef<+h[8347]){h[8347]=ef}do{if(ef<+h[8341]){if((c[16678]&1|0)==0){break L6717}if((c[16698]&1|0)==0){h[8341]=ef;break}ed=+h[8350];if(ed>ef){h[8341]=ed;break L6717}else{h[8341]=ef;break}}}while(0);if(ef>+h[8348]){h[8348]=ef}if(ef<=+h[8342]){break}if((c[16678]&2|0)==0){break}if((c[16699]&2|0)==0){h[8342]=ef;break}ed=+h[8353];if(ed>3]=ee}}while(0);ec=bv+1|0;break}else if((aV|0)==18|(aV|0)==51|(aV|0)==33|(aV|0)==1|(aV|0)==64){ee=+h[F>>3];ed=+h[G>>3];iX(bb,bv,ee,ed,ee,ee,ed,ed,+h[H>>3]);ec=bv+1|0;break}else if((aV|0)==474){ed=+h[F>>3];ee=+h[G>>3];eh=+h[H>>3];ei=eh*.5;iX(bb,bv,ed,ee,ed-ei,ed+ei,ee,ee,eh);ec=bv+1|0;break}else if((aV|0)==457){eh=+h[F>>3];ee=+h[H>>3];iX(bb,bv,eh,+h[G>>3],eh-ee,eh+ee,0.0,360.0,ee>=0.0?0.0:-1.0);ec=bv+1|0;break}else if((aV|0)==489){ee=+h[F>>3];eh=+h[G>>3];ei=+h[H>>3];ed=+P(+ei);iX(bb,bv,ee,eh,ed,ed,0.0,ei,ei>=0.0?0.0:-1.0);ec=bv+1|0;break}else if((aV|0)!=345){aP=5068}if((aP|0)==5068){aP=0;uh(bB,79800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[bS>>2]=102}c[bx>>2]=13;ei=+h[F>>3];ed=+h[G>>3];iX(bb,bv,ei,ed,ei,ei,ed,+h[H>>3],-1.0);ec=bv+1|0}else if((ea|0)==4){br=c[bS>>2]|0;if((br|0)==137|(br|0)==311|(br|0)==118){ed=+h[F>>3];ei=+h[G>>3];eh=+h[H>>3];ee=+h[I>>3];iX(bb,bv,ed,ei,ed-eh,ed+eh,ei-ee,ei+ee,0.0);ec=bv+1|0;break}else if((br|0)==153){ee=+h[G>>3];iX(bb,bv,+h[F>>3],ee,+h[H>>3],+h[I>>3],ee,ee,0.0);ec=bv+1|0;break}else if((br|0)==279|(br|0)==86){ee=+h[G>>3];iX(bb,bv,+h[F>>3],ee,+h[H>>3],+h[I>>3],ee,ee,0.0);ec=bv+1|0;break}else if((br|0)==169){bp=bv+1|0;ee=+h[F>>3];ei=+h[G>>3];if(+h[7030]==-2.0){iX(bb,bv,ee,ei,ee,ee,+h[H>>3],+h[I>>3],-1.0);ec=bp;break}else{eh=+h[I>>3]*.5;ed=+h[H>>3];iX(bb,bv,ee,ei,ee-eh,ee+eh,ei-ed,ei+ed,0.0);ec=bp;break}}else if((br|0)==474){bp=bv+1|0;ed=+h[F>>3];ei=+h[G>>3];eh=+h[H>>3]*.5;ee=ed-eh;ej=ed+eh;aE=c[11767]|0;bq=c[by>>2]|0;L6774:do{if((aE|0)==0){ek=0}else{bt=c[bz>>2]|0;bo=eD(aE)|0;a8=uA(bo|0)|0;L6776:do{if((bt|0)!=0){bs=bt;while(1){a7=c[bs+60>>2]|0;if((a7|0)!=0){if((a_(bo|0,a7|0,a8|0)|0)==0){break}}a7=c[bs>>2]|0;if((a7|0)==0){break L6776}else{bs=a7}}uu(bo);ek=c[bs+4>>2]|0;break L6774}}while(0);c[by>>2]=bq+1;iW(c[bz>>2]|0,c[bO>>2]|0,bq,bo,0.0);uu(bo);ek=bq}}while(0);iX(bb,bv,ed,ei,ee,ej,+(ek|0),+h[G>>3],+h[H>>3]);ec=bp;break}else if((br|0)==225){ef=+h[F>>3];eh=+h[G>>3];iX(bb,bv,ef,eh,ef,ef+ +h[H>>3],eh,eh+ +h[I>>3],0.0);ec=bv+1|0;break}else if((br|0)==18|(br|0)==51|(br|0)==368){eh=+h[F>>3];ef=+h[G>>3];iX(bb,bv,eh,ef,eh,eh,ef,ef,+h[H>>3]);ec=bv+1|0;break}else if((br|0)==489){ef=+h[F>>3];eh=+h[G>>3];el=+h[H>>3];em=+P(+el);en=+h[I>>3];eo=+P(+en);if(el<0.0){ep=-1.0}else{ep=en>=0.0?0.0:-1.0}iX(bb,bv,ef,eh,em,eo,0.0,el,ep);ec=bv+1|0;break}else if(!((br|0)==295|(br|0)==102)){uh(bB,79024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[bS>>2]=102}el=+h[F>>3];iX(bb,bv,el,+h[G>>3],el,el,+h[H>>3],+h[I>>3],-1.0);ec=bv+1|0}else if((ea|0)==5){bq=c[bS>>2]|0;if((bq|0)==257|(bq|0)==252){el=+h[F>>3];iX(bb,bv,el,+h[G>>3],el,el,+h[H>>3],+h[I>>3],+h[J>>3]);ec=bv+1|0;break}else if((bq|0)==225){el=+h[F>>3];eo=+h[G>>3];iX(bb,bv,el,eo,el,el+ +h[H>>3],eo,eo+ +h[I>>3],+h[J>>3]);ec=bv+1|0;break}else if((bq|0)==457){eo=+h[F>>3];el=+h[H>>3];iX(bb,bv,eo,+h[G>>3],eo-el,eo+el,+h[I>>3],+h[J>>3],el>=0.0?0.0:-1.0);ec=bv+1|0;break}else if((bq|0)==489){el=+h[F>>3];eo=+h[G>>3];em=+h[H>>3];eh=+P(+em);ef=+h[I>>3];en=+P(+ef);if(em<0.0){eq=-1.0}else{eq=ef>=0.0?0.0:-1.0}iX(bb,bv,el,eo,eh,en,+h[J>>3],em,eq);ec=bv+1|0;break}else if((bq|0)==416){aP=5148;break}else if((bq|0)!=169){uh(bB,78440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[bS>>2]=169}em=+h[F>>3];en=+h[J>>3]*.5;iX(bb,bv,em,+h[G>>3],em-en,em+en,+h[H>>3],+h[I>>3],0.0);ec=bv+1|0}else if((ea|0)==7|(ea|0)==6){bq=c[bS>>2]|0;if((bq|0)==252){en=+h[F>>3];em=+h[K>>3];if(em>0.0){er=en-em*.5}else{er=en}iX(bb,bv,en,+h[G>>3],er,en,+h[H>>3],+h[I>>3],+h[J>>3]);ec=bv+1|0;break}else if((bq|0)==432|(bq|0)==416){aP=5148;break}else if(!((bq|0)==311|(bq|0)==118|(bq|0)==137)){uh(bB,78104,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[bS>>2]=118}iX(bb,bv,+h[F>>3],+h[G>>3],+h[H>>3],+h[I>>3],+h[J>>3],+h[K>>3],0.0);ec=bv+1|0}else{aP=5025;break L5888}}while(0);L6811:do{if((aP|0)==5036){aP=0;bq=c[bS>>2]|0;if((bq|0)!=392){en=+h[7030];do{if((bq|0)==153&en>0.0){if((a[56232]&1)==0){break}aE=c[bT>>2]|0;if((a[64788+(aE*688&-1)|0]&1)==0){em=+h[F>>3];eh=+h[G>>3];eo=en*.5;iX(bb,bv,em,eh,em-eo,eo+em,eh,eh,0.0);ec=bv+1|0;break L6811}else{eh=+h[64792+(aE*688&-1)>>3];em=+h[F>>3];eo=+h[G>>3];el=em*+R(+eh,+(en*-.5));iX(bb,bv,em,eo,el,em*+R(+eh,+(en*.5)),eo,eo,0.0);ec=bv+1|0;break L6811}}}while(0);if((bq|0)==457){en=+h[F>>3];iX(bb,bv,en,+h[G>>3],en,en,0.0,360.0,-1.0);ec=bv+1|0;break}else if((bq|0)==489){iX(bb,bv,+h[F>>3],+h[G>>3],0.0,0.0,0.0,0.0,-2.0);ec=bv+1|0;break}else if((bq|0)==102){en=+h[G>>3];h[H>>3]=en;ej=+h[F>>3];h[G>>3]=ej;ee=+(c[11942]|0);h[F>>3]=ee;iX(bb,bv,ee,ej,ee,ee,ej-en,en+ej,-1.0);ec=bv+1|0;break}else if((bq|0)==252|(bq|0)==257){uh(bB,81264,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[bS>>2]=18}ej=+h[F>>3];en=+h[G>>3];iX(bb,bv,ej,en,ej,ej,en,en,-1.0);ec=bv+1|0;break}br=c[9670]|0;if((br|0)==4){if((ea|0)==1){aP=5039;break L5888}else if((ea|0)==2){en=+h[F>>3];ej=+h[G>>3];h[I>>3]=en+ej;h[H>>3]=en-ej;es=en}else{h[I>>3]=+h[H>>3];h[H>>3]=+h[G>>3];es=+h[F>>3]}h[G>>3]=es;h[F>>3]=+(c[11942]|0)}else{if((ea|0)>1){aP=5044;break L5888}en=+h[G>>3];h[I>>3]=en;h[H>>3]=en}do{if((br|0)==2){en=+(c[bQ>>2]|0)+ +h[(c[bU>>2]|0)+16>>3];h[4834]=en;h[(c[bU>>2]|0)+24>>3]=en}else{en=+h[F>>3]+ +h[(c[bU>>2]|0)+16>>3];if(en<=+h[4834]){break}h[4834]=en;h[(c[bU>>2]|0)+24>>3]=en}}while(0);en=+h[7030];br=bv+1|0;ej=+h[F>>3];ee=+h[G>>3];if(en>0.0){ei=en*.5;iX(bb,bv,ej,ee,ej-ei,ej+ei,+h[H>>3],+h[I>>3],0.0);ec=br;break}else{iX(bb,bv,ej,ee,ej+-.5,ej+.5,+h[H>>3],+h[I>>3],0.0);ec=br;break}}else if((aP|0)==5148){aP=0;ej=+h[F>>3];ee=+h[G>>3];iX(bb,bv,ej,ee,ej,ej,ee,ee,+h[H>>3]);br=c[bO>>2]|0;h[br+(bv<<6)+40>>3]=+h[H>>3];h[br+(bv<<6)+48>>3]=+h[I>>3];h[br+(bv<<6)+56>>3]=+h[J>>3];h[br+(bv<<6)+32>>3]=+h[K>>3];ec=bv+1|0}}while(0);br=eC(F,d7)|0;if((br|0)==-1){break}else{bn=eb;bv=ec;bu=br}}if((ec|0)<=0){d8=ec;d9=eb;break}bu=ec-1|0;d8=(c[(c[bO>>2]|0)+(bu<<6)>>2]|0)==2?bu:ec;d9=eb}}while(0);bB=bb+300|0;c[bB>>2]=d8;iR(bb,d8);eL(bb);ez();bL=c[8270]|0;do{if((bL|0)!=0){if((aY(bL|0,139696)|0)==0){break}bA(4,139696)}}while(0);if((d9|0)==0){uh(-1,104952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[bR>>2]=4;d_=d0;d$=d1;break}bL=c[bS>>2]|0;if((bL|0)==392){aG=c[9670]|0;L6860:do{if((aG|0)==1){if((c[64648+((c[bw>>2]|0)*688&-1)>>2]&2|0)==0){aP=5181;break}do{if((c[bb+280>>2]|0)==0){bu=c[3566]|0;if((bu|0)!=0){uu(bu)}bu=c[bB>>2]<<6;bv=ut(bu)|0;if((bv|0)==0){gk();bn=ut(bu)|0;if((bn|0)==0){aP=5164;break L5888}else{et=bn}}else{et=bv}bv=et;c[3566]=bv;c[3570]=0;if((c[bB>>2]|0)>0){eu=0}else{aP=5181;break L6860}while(1){bn=eu+1|0;uE(bv+(eu<<6)+32|0,0,16);c[3570]=bn;if((bn|0)<(c[bB>>2]|0)){eu=bn}else{ev=bn;break}}}else{bv=c[bB>>2]|0;bn=c[3570]|0;if((bv|0)<=(bn|0)){ev=bn;break}bn=db(c[3566]|0,bv<<6,91376)|0;c[3566]=bn;bv=c[3570]|0;if((bv|0)<(c[bB>>2]|0)){ew=bv}else{ev=bv;break}while(1){bv=ew+1|0;uE(bn+(ew<<6)+32|0,0,16);c[3570]=bv;if((bv|0)<(c[bB>>2]|0)){ew=bv}else{ev=bv;break}}}}while(0);if((ev|0)<=0){aP=5181;break}bO=bb+320|0;bn=0;while(1){bv=c[bO>>2]|0;do{if((c[bv+(bn<<6)>>2]|0)!=2){ee=+h[bv+(bn<<6)+16>>3];bu=c[3566]|0;if(ee<0.0){bU=bu+(bn<<6)+32|0;h[bU>>3]=ee+ +h[bU>>3];ex=+h[bu+(bn<<6)+40>>3]}else{bU=bu+(bn<<6)+40|0;ej=ee+ +h[bU>>3];h[bU>>3]=ej;ex=ej}bU=c[bw>>2]|0;bQ=64672+(bU*688&-1)|0;if(+h[bQ>>3]>3]=ex;eA=c[bw>>2]|0}else{eA=bU}bU=64664+(eA*688&-1)|0;ej=+h[bu+(bn<<6)+32>>3];if(+h[bU>>3]<=ej){break}h[bU>>3]=ej}}while(0);bv=bn+1|0;if((bv|0)<(ev|0)){bn=bv}else{aP=5181;break}}}else if((aG|0)==3|(aG|0)==4){aP=5181}else if((aG|0)==2){do{if((c[16507]|0)!=0){ej=+(c[bb+280>>2]|0)+(+h[(c[bb+276>>2]|0)+16>>3]+1.0);if(+h[8255]>-1.0){h[8255]=-1.0}if(+h[8256]==ej){break}h[8256]=ej}}while(0);bn=c[16335]|0;if((bn|0)==0){break}bO=c[bB>>2]|0;if((bO|0)>0){bv=c[bb+320>>2]|0;bU=0;ej=0.0;ee=0.0;while(1){do{if((c[bv+(bU<<6)>>2]|0)==2){eB=ee;eE=ej}else{ei=+h[bv+(bU<<6)+16>>3];if(ei<0.0){eB=ee;eE=ej+ei;break}else{eB=ee+ei;eE=ej;break}}}while(0);bu=bU+1|0;if((bu|0)<(bO|0)){bU=bu;ej=eE;ee=eB}else{eF=eE;eG=eB;break}}}else{eF=0.0;eG=0.0}do{if((bn&2|0)!=0){bU=64672+((c[bw>>2]|0)*688&-1)|0;if(+h[bU>>3]>=eG){break}h[bU>>3]=eG}}while(0);if((bn&1|0)==0){break}bU=64664+((c[bw>>2]|0)*688&-1)|0;if(+h[bU>>3]<=eF){break}h[bU>>3]=eF}}while(0);do{if((aP|0)==5181){aP=0;aG=c[16506]|0;if((aG|0)==0){break}do{if((aG&1|0)!=0){ee=+h[(c[bb+276>>2]|0)+16>>3]+-1.0;if(+h[8255]<=ee){break}h[8255]=ee}}while(0);if((aG&2|0)==0){break}bn=c[bb+320>>2]|0;bU=c[bB>>2]|0;while(1){eH=bU-1|0;if((c[bn+(eH<<6)>>2]|0)!=2){break}c[bB>>2]=eH;if((eH|0)==0){aP=5189;break L5888}else{bU=eH}}ee=+h[bn+(eH<<6)+8>>3]+(+h[(c[bb+276>>2]|0)+16>>3]+1.0);if(+h[8256]>=ee){break}h[8256]=ee}}while(0);eI=c[bS>>2]|0}else{eI=bL}do{if((eI|0)==153){bU=c[bB>>2]|0;aG=bU-1|0;if((aG|0)==0){break}bO=c[bT>>2]|0;bv=c[64648+(bO*688&-1)>>2]|0;do{if((bv&1|0)==0){eJ=bO;eK=bv}else{bu=c[bb+320>>2]|0;if((c[bu>>2]|0)==2){eJ=bO;eK=bv;break}if((c[bu+64>>2]|0)==2){eJ=bO;eK=bv;break}ee=+h[bu+8>>3];ej=ee-(+h[bu+72>>3]-ee)*.5;if((a[64788+(bO*688&-1)|0]&1)==0){eN=ej}else{eN=+Z(+(ej*+h[64800+(bO*688&-1)>>3]))}bu=64664+(bO*688&-1)|0;if(+h[bu>>3]<=eN){eJ=bO;eK=bv;break}h[bu>>3]=eN;bu=c[bT>>2]|0;eJ=bu;eK=c[64648+(bu*688&-1)>>2]|0}}while(0);if((eK&2|0)==0){break}bv=c[bb+320>>2]|0;if((c[bv+(aG<<6)>>2]|0)==2){break}bO=bU-2|0;if((c[bv+(bO<<6)>>2]|0)==2){break}ej=+h[bv+(aG<<6)+8>>3];ee=ej+(ej- +h[bv+(bO<<6)+8>>3])*.5;if((a[64788+(eJ*688&-1)|0]&1)==0){eO=ee}else{eO=+Z(+(ee*+h[64800+(eJ*688&-1)>>3]))}bO=64672+(eJ*688&-1)|0;if(+h[bO>>3]>=eO){break}h[bO>>3]=eO}}while(0);bL=c[bS>>2]|0;if((bL|0)==474){bO=c[bB>>2]|0;bv=bb+320|0;bn=c[bv>>2]|0;if((bO|0)>0){bu=0;bQ=bn;while(1){if((c[bQ+(bu<<6)>>2]|0)==2){h[bQ+(bu<<6)+16>>3]=8.988465674311579e+307;eP=c[bv>>2]|0}else{eP=bQ}bz=bu+1|0;if((bz|0)<(bO|0)){bu=bz;bQ=eP}else{eQ=eP;break}}}else{eQ=bn}bM(eQ|0,bO|0,64,12);bQ=c[bv>>2]|0;bu=bO;while(1){eR=bu-1|0;if((c[bQ+(eR<<6)>>2]|0)==2){bu=eR}else{break}}c[bB>>2]=bu;if((c[bQ>>2]|0)==2){aP=5236;break L5888}ee=+h[bQ+56>>3]- +h[bQ+48>>3];do{if(ee==0.0){ej=+h[7030];if(ej<=0.0){eS=.5;break}eT=(a[56232]&1)!=0?ej:.5;aP=5240}else{eT=ee;aP=5240}}while(0);do{if((aP|0)==5240){aP=0;if(eT>=0.0){eS=eT;break}eS=-0.0-eT}}while(0);bu=c[bT>>2]|0;do{if((c[64648+(bu*688&-1)>>2]&1|0)!=0){bO=64664+(bu*688&-1)|0;ee=+h[bO>>3];ej=+h[bQ+8>>3];if(ee>=ej){h[bO>>3]=ee-eS*1.5;break}if(ee>3]=ee-eS}}while(0);bQ=c[bT>>2]|0;do{if((c[64648+(bQ*688&-1)>>2]&2|0)!=0){bu=64672+(bQ*688&-1)|0;ee=+h[bu>>3];ej=+h[(c[bv>>2]|0)+(eR<<6)+8>>3];do{if(ee>ej){if(ee>eS+ej){break}h[bu>>3]=eS+ee}else{h[bu>>3]=eS*1.5+ee}}while(0);bu=c[bb+288>>2]|0;if((bu|0)<=1){break}aG=64672+((c[bT>>2]|0)*688&-1)|0;h[aG>>3]=+(bu-1|0)*+h[7035]+ +h[aG>>3]}}while(0);eU=c[bS>>2]|0}else{eU=bL}do{if((eU|0)==416|(eU|0)==432){bv=c[16678]|0;if((bv&1|0)!=0){h[8341]=0.0}if((bv&2|0)==0){break}h[8342]=255.0}}while(0);L6997:do{if((c[bS>>2]|0)==474){bL=bb+288|0;bv=c[bL>>2]|0;if((bv|0)<=0){break}do{if(!((a[56292]&1)==0|(bv|0)<2)){bQ=bb+224|0;aG=c[bQ>>2]|0;if((aG|0)==0){break}if((c[aG>>2]|0)==0){break}aG=bv<<2;bu=ut(aG)|0;if((bu|0)==0){gk();bU=ut(aG)|0;if((bU|0)==0){aP=5267;break L5888}else{eV=bU}}else{eV=bu}bu=eV;bU=c[bL>>2]<<2;aG=ut(bU)|0;if((aG|0)==0){gk();bO=ut(bU)|0;if((bO|0)==0){aP=5270;break L5888}else{eW=bO}}else{eW=aG}aG=eW;bO=c[bL>>2]|0;if((bO|0)>0){bU=0;bn=c[bQ>>2]|0;while(1){bz=c[bn>>2]|0;c[bu+(bU<<2)>>2]=bz;by=bU+1|0;bx=c[bL>>2]|0;if((by|0)<(bx|0)){bU=by;bn=bz}else{eX=bx;break}}}else{eX=bO}bM(eV|0,eX|0,4,22);if((c[bL>>2]|0)>0){bn=0;do{c[aG+(bn<<2)>>2]=c[(c[bu+(bn<<2)>>2]|0)+4>>2];bn=bn+1|0;}while((bn|0)<(c[bL>>2]|0))}bn=c[bu>>2]|0;c[c[bQ>>2]>>2]=bn;if(((c[bL>>2]|0)-1|0)>0){bO=bn;bU=0;while(1){bx=bU+1|0;bz=c[bu+(bx<<2)>>2]|0;c[bO>>2]=bz;if((bx|0)<((c[bL>>2]|0)-1|0)){bO=bz;bU=bx}else{eY=bz;break}}}else{eY=bn}c[eY>>2]=0;uu(eV);c[bb+292>>2]=aG}}while(0);bL=c[14072]|0;if((bL|0)==2){eZ=2}else if((bL|0)==0){break}else{eZ=(bL|0)==3?6:c[200]|0}bL=c[c[bb+224>>2]>>2]|0;if((bL|0)==0){break}bv=bb+320|0;bU=0;bO=bL;while(1){dp(eZ,c[bO+60>>2]|0,+h[(c[bv>>2]|0)+8>>3]+ +(bU|0)*+h[7035],-1);bL=c[bO>>2]|0;if((bL|0)==0){break L6997}bU=bU+1|0;bO=bL}}}while(0);bO=c[aR>>2]|0;if((bO|0)==5|(bO|0)==6|(bO|0)==7|(bO|0)==9|(bO|0)==3|(bO|0)==1|(bO|0)==4){bU=bb+320|0;bv=0;while(1){bL=c[bB>>2]|0;L7036:do{if((bv|0)<(bL|0)){bu=c[bU>>2]|0;bQ=bv;while(1){if((c[bu+(bQ<<6)>>2]|0)!=2){e_=bQ;break L7036}bz=bQ+1|0;if((bz|0)<(bL|0)){bQ=bz}else{e_=bz;break}}}else{e_=bv}}while(0);bQ=0;while(1){e$=bQ+e_|0;if((e$|0)>=(bL|0)){break}if((c[(c[bU>>2]|0)+(e$<<6)>>2]|0)==2){break}else{bQ=bQ+1|0}}if((bQ|0)<=0){break}bM((c[bU>>2]|0)+(e_<<6)|0,bQ|0,64,18);bv=e$}hn(bb);e0=c[aR>>2]|0}else{e0=bO}if((e0|0)==6|(e0|0)==7|(e0|0)==9){hk(bb)}else if((e0|0)==3|(e0|0)==1|(e0|0)==2|(e0|0)==4|(e0|0)==8){hl(bb)}bv=c[bS>>2]|0;if(!((bv|0)==400|(bv|0)==416|(bv|0)==432)){d_=d0;d$=d1;break}c[bb+228>>2]=0;f3(bb,1);d_=d0;d$=d1}}while(0);c[bb+4>>2]=c[13898];bS=bb|0;if(!bd){e1=B;e2=an;e3=ao;e5=dR;e8=aq;e9=du;fa=dJ;fb=0;fc=d$;fd=d_;fe=bc;ff=bS;fg=bb;aP=5313;break}fh=B;fi=an;fj=ao;fk=dR;fl=aq;fm=du;fn=dJ;fo=0;fp=d$;fq=d_;fr=bc;fs=bS;ft=c[13898]|0;fu=c[8272]|0;aP=5305}else if((aP|0)==4369){aP=0;c[13898]=aB+1;uu(c[9666]|0);c[9666]=0;ee=+h[4834];if(ee>0.0){fv=ee+2.0}else{fv=aq}c[af>>2]=-5;ee=fv;bS=aw+1|0;fw=c[13898]|0;while(1){L7062:do{if((c[8272]|0)>(fw|0)){bT=c[1054]|0;if((a[bT+(fw*40&-1)|0]&1)==0){fx=ee;break}bw=c[bT+(fw*40&-1)+36>>2]|0;bR=bT+(fw*40&-1)+32|0;bT=c[10036]|0;bv=0;while(1){if((bv|0)>=(bw|0)){break}if((a[bT+((c[bR>>2]|0)+bv|0)|0]|0)==(a[bv+95280|0]|0)){bv=bv+1|0}else{fx=ee;break L7062}}if((bv|0)!=2){fx=ee;break}c[13898]=fw+1;bR=is(n)|0;bT=c[bR>>2]|0;if((bT|0)==1){fy=+(c[bR+8>>2]|0)}else if((bT|0)==3){fy=+uz(c[bR+8>>2]|0,0)}else if((bT|0)==2){fy=+h[bR+8>>3]}else{aP=4382;break L5888}if((c[ag>>2]|0)!=3){fx=fy;break}uu(c[ah>>2]|0);c[ag>>2]=1;fx=fy}else{fx=ee}}while(0);L7077:do{if((c[9666]|0)==0){bO=c[13898]|0;aR=c[1054]|0;bR=(a[aR+(bO*40&-1)|0]&1)==0;if(bR){aP=4388}else{bT=c[10036]|0;bw=a[bT+(c[aR+(bO*40&-1)+32>>2]|0)|0]|0;if((bw<<24>>24|0)==39|(bw<<24>>24|0)==34){fz=bT}else{aP=4388}}if((aP|0)==4388){aP=0;bT=c[10810]|0;if((bT|0)==0){break}bw=c[8272]|0;bQ=aR+(bO*40&-1)+36|0;bU=aR+(bO*40&-1)+32|0;bB=c[10036]|0;bL=bT;L7084:while(1){bT=c[bL+4>>2]|0;L7086:do{if(!((bw|0)<=(bO|0)|bR)){bu=c[bQ>>2]|0;aG=0;while(1){if((aG|0)>=(bu|0)){break}if((a[bB+((c[bU>>2]|0)+aG|0)|0]|0)==(a[bT+aG|0]|0)){aG=aG+1|0}else{break L7086}}if((a[bT+aG|0]|0)==0){break L7084}}}while(0);bT=c[bL>>2]|0;if((bT|0)==0){break L7077}else{bL=bT}}if((a[bL+8|0]&1)!=0){break}if((c[bL+16>>2]|0)==3){fz=bB}else{break}}L7096:do{if((bO|0)<(c[8272]|0)){L7098:do{if(!bR){bU=c[aR+(bO*40&-1)+36>>2]|0;bQ=aR+(bO*40&-1)+32|0;bw=0;while(1){if((bw|0)>=(bU|0)){break}if((a[fz+((c[bQ>>2]|0)+bw|0)|0]|0)==(a[bw+103664|0]|0)){bw=bw+1|0}else{break L7098}}if((bw|0)==1){fA=0;break L7096}}}while(0);a[14176]=1;is(l);a[14176]=0;if((c[ai>>2]|0)==3){fA=c[aj>>2]|0;break}else{c[13898]=bO;fA=0;break}}else{fA=0}}while(0);c[9666]=fA}}while(0);bO=c[13898]|0;aR=c[1054]|0;bR=a[aR+(bO*40&-1)|0]|0;L7110:do{if((c[8272]|0)>(bO|0)){if((bR&1)==0){aP=4414;break}bB=c[aR+(bO*40&-1)+36>>2]|0;bL=aR+(bO*40&-1)+32|0;bQ=c[10036]|0;bU=0;while(1){if((bU|0)>=(bB|0)){break}if((a[bQ+((c[bL>>2]|0)+bU|0)|0]|0)==(a[bU+225056|0]|0)){bU=bU+1|0}else{aP=4414;break L7110}}if((bU|0)==2){aP=4422}else{aP=4414}}else{aP=4414}}while(0);L7117:do{if((aP|0)==4414){aP=0;bL=c[aR+(bO*40&-1)+36>>2]|0;if(!((bR&1)!=0&(bL|0)>0)){fB=bS;break}bQ=c[10036]|0;bB=0;aG=0;bv=c[aR+(bO*40&-1)+32>>2]|0;while(1){if((a[bB+139232|0]|0)==(a[bQ+(bB+bv|0)|0]|0)){fC=bv;fD=aG}else{if((bB|0)!=5){fB=bS;break L7117}fC=bv-1|0;fD=1}bT=bB+1|0;if((bT|0)<(fD+bL|0)){bB=bT;aG=fD;bv=fC}else{break}}if((fD|0)!=0){aP=4422;break}if((bB|0)==4|(bB|0)==8){aP=4422}else{fB=bS}}}while(0);if((aP|0)==4422){aP=0;c[13898]=bO+1;aR=is(k)|0;bR=c[aR>>2]|0;if((bR|0)==1){fE=+(c[aR+8>>2]|0)}else if((bR|0)==2){fE=+h[aR+8>>3]}else if((bR|0)==3){fE=+uz(c[aR+8>>2]|0,0)}else{aP=4426;break L5888}if((c[ak>>2]|0)==3){uu(c[al>>2]|0);c[ak>>2]=1}fB=~~fE}hJ(p,1,100,c[af>>2]|0,49504);aR=c[13898]|0;if((aR|0)==(fw|0)){break}else{ee=fx;bS=fB;fw=aR}}bS=c[af>>2]|0;B=c[8272]|0;if((B|0)<=(fw|0)){aP=6084;break L5888}aR=c[1054]|0;if((a[aR+(fw*40&-1)|0]&1)==0){aP=6085;break L5888}bR=c[aR+(fw*40&-1)+36>>2]|0;bv=aR+(fw*40&-1)+32|0;aR=c[10036]|0;aG=0;while(1){if((aG|0)>=(bR|0)){break}if((a[aR+((c[bv>>2]|0)+aG|0)|0]|0)==(a[aG+148464|0]|0)){aG=aG+1|0}else{aP=6086;break L5888}}if((aG|0)==1){aW=fx;aX=-1;aZ=fB;a$=bS;a0=fw;a1=B;aP=5304}else{aP=6087;break L5888}}}while(0);if((aP|0)==5304){aP=0;if(au){fh=am;fi=a$;fj=aZ;fk=aX;fl=aW;fm=as;fn=at;fo=aA;fp=av;fq=aw;fr=ax;fs=ay;ft=a0;fu=a1;aP=5305}else{e1=am;e2=a$;e3=aZ;e5=aX;e8=aW;e9=as;fa=at;fb=aA;fc=av;fd=aw;fe=ax;ff=ay;fg=0;aP=5313}}L7148:do{if((aP|0)==5305){aP=0;if((fu|0)<=(ft|0)){fF=fr;fG=1;fH=fo;fI=aQ;fJ=fh;aP=5328;break L5888}aB=c[1054]|0;if((a[aB+(ft*40&-1)|0]&1)==0){fF=fr;fG=1;fH=fo;fI=aQ;fJ=fh;aP=5328;break L5888}bv=c[aB+(ft*40&-1)+36>>2]|0;aR=aB+(ft*40&-1)+32|0;aB=c[10036]|0;bR=0;while(1){if((bR|0)>=(bv|0)){break}if((a[aB+((c[aR>>2]|0)+bR|0)|0]|0)==(a[bR+148464|0]|0)){bR=bR+1|0}else{fF=fr;fG=1;fH=fo;fI=aQ;fJ=fh;aP=5328;break L5888}}if((bR|0)!=1){fF=fr;fG=1;fH=fo;fI=aQ;fJ=fh;aP=5328;break L5888}aR=ft+1|0;c[13898]=aR;fK=fs;fL=fr;fM=fq;fN=fp;fO=1;fP=fo;fQ=fn;fR=fm;fT=fl;fU=fk;fV=fj;fW=fi;fX=fh;fY=aR}else if((aP|0)==5313){aP=0;aR=c[7774]|0;do{if((aR|0)==0){aP=5316}else{if((a[aR+38|0]&1)==0|(fg|0)==0){aP=5316;break}c[fg+8>>2]=4}}while(0);do{if((aP|0)==5316){aP=0;if(!(ix(aR)|0)){break}c[13898]=aQ;fK=ff;fL=fe;fM=fd;fN=fc;fO=0;fP=fb;fQ=fa;fR=e9;fT=e8;fU=e5;fV=e3;fW=e2;fX=e1;fY=aQ;break L7148}}while(0);aR=c[7774]|0;if((aR|0)!=0){bR=aR;while(1){aR=c[bR>>2]|0;uu(c[bR+12>>2]|0);uu(bR);if((aR|0)==0){break}else{bR=aR}}}c[7774]=0;bR=c[13898]|0;if((c[8272]|0)<=(bR|0)){aP=5327;break L5888}aR=c[1054]|0;if((a[aR+(bR*40&-1)|0]&1)==0){aP=5327;break L5888}aB=c[aR+(bR*40&-1)+36>>2]|0;bv=aR+(bR*40&-1)+32|0;aR=c[10036]|0;B=0;while(1){if((B|0)>=(aB|0)){break}if((a[aR+((c[bv>>2]|0)+B|0)|0]|0)==(a[B+148464|0]|0)){B=B+1|0}else{aP=5327;break L5888}}if((B|0)!=1){aP=5327;break L5888}c[13898]=bR+1;c[7774]=iw()|0;fK=ff;fL=fe;fM=fd;fN=fc;fO=0;fP=fb;fQ=fa;fR=e9;fT=e8;fU=e5;fV=e3;fW=e2;fX=e1;fY=c[13898]|0}}while(0);if((fY|0)<(c[8272]|0)){am=fX;an=fW;ao=fV;ap=fU;aq=fT;ar=aQ;as=fR;at=fQ;A=fP;au=fO;av=fN;aw=fM;ax=fL;ay=fK;az=fY}else{aJ=aQ;aK=fP;aL=fX;aM=fO;aN=fL;aO=fY;aP=4357;break}}do{if((aP|0)==4501){uf(cc,163648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4426){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4357){if((aL|0)==0){C=aO}else{fF=aN;fG=aM;fH=aK;fI=aJ;fJ=aL;aP=5328;break}uf(C,105216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4680){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4906){uf(c[13898]|0,110696,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4910){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=107952,v)|0)}else if((aP|0)==4944){uf(c[13898]|0,84448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4946){uf(c[13898]|0,106024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4744){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=201712,v)|0)}else if((aP|0)==4867){uf(-1,115176,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4880){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=201712,v)|0)}else if((aP|0)==4899){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=201712,v)|0)}else if((aP|0)==4903){uf(c[13898]|0,114152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4576){c[13898]=cC;aP=4577}else if((aP|0)==4634){uf(cR,143640,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4466){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=180104,v)|0)}else if((aP|0)==4546){uf(c[13898]|0,216936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4455){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=180104,v)|0)}else if((aP|0)==4533){uf(cT,149448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4382){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4521){uf(bV,92272,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4622){uf(bV,133232,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4462){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=77008,v)|0)}else if((aP|0)==4452){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=77008,v)|0)}else if((aP|0)==4448){uf(c[13898]|0,92272,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==4961){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=90328,v)|0)}else if((aP|0)==4998){uf(-1,89648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5e3){uf(-1,89152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5012){uf(-1,87256,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5014){uf(-1,87256,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5016){uf(-1,87256,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5018){uf(-1,87256,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5020){uf(-1,87256,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5022){uf(-1,87256,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5025){ez();fY=c[11900]|0;uf(c[13898]|0,86160,(v=i,i=i+16|0,c[v>>2]=ea,c[v+8>>2]=fY,v)|0)}else if((aP|0)==5034){ez();fY=c[11932]|0;uf(c[d2>>2]|0,116952,(v=i,i=i+16|0,c[v>>2]=c[11900],c[v+8>>2]=(fY|0)!=0?fY:179864,v)|0)}else if((aP|0)==5039){uf(c[13898]|0,83648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5044){uf(c[13898]|0,82688,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5164){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=91376,v)|0)}else if((aP|0)==5189){uf(-1,90720,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5236){uf(-1,92048,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5267){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=93632,v)|0)}else if((aP|0)==5270){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=92920,v)|0)}else if((aP|0)==5327){if((a[32936]&1)==0){fZ=fe;f_=0;f$=fb;f0=aQ;f1=e1;aP=5331}else{f2=fe;f4=0;f5=fb;f6=aQ;f7=e1}}else if((aP|0)==6068){f9=c[13898]|0;uf(f9,205152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6069){uf(c9,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6070){uf(c9,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6071){uf(c9,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6072){uf(c9,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6073){uf(c9,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6074){uf(c9,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6075){uf(cb,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6076){uf(cb,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6077){uf(cb,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6078){uf(cb,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6079){uf(cb,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6080){uf(cb,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6081){uf(cb,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6082){uf(cb,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6083){uf(cb,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6084){uf(fw,175992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6085){uf(fw,175992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6086){uf(fw,175992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==6087){uf(fw,175992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if((aP|0)==4577){c[bJ>>2]=0;f9=c[13898]|0;uf(f9,205152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if((aP|0)==5328){f9=(a[32936]&1)==0;if(f9|fG^1){if(f9){fZ=fF;f_=fG;f$=fH;f0=fI;f1=fJ;aP=5331;break}else{f2=fF;f4=fG;f5=fH;f6=fI;f7=fJ;break}}else{uf(-1,147440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((aP|0)==5331){if((a[30528]&1)!=0){f2=fZ;f4=f_;f5=f$;f6=f0;f7=f1;break}do{if((fZ|0)!=0){if((c[z>>2]|0)==0){break}if(!(+h[8256]==-8.988465674311579e+307|+h[8255]==8.988465674311579e+307)){break}h[8255]=-10.0;h[8256]=10.0}}while(0);dc(2,145296);if((c[x>>2]&1|0)!=0){dc(6,103512);f2=fZ;f4=f_;f5=f$;f6=f0;f7=f1;break}fJ=c[17194]|0;if((fJ|0)==0){f2=fZ;f4=f_;f5=f$;f6=f0;f7=f1;break}if((fJ&1|0)!=0){h[8599]=+h[8255]}if((fJ&2|0)==0){f2=fZ;f4=f_;f5=f$;f6=f0;f7=f1;break}h[8600]=+h[8256];f2=fZ;f4=f_;f5=f$;f6=f0;f7=f1}}while(0);do{if((f2|0)==0){ga=f7}else{f1=(a[32936]&1)==0;if(f1){if((a[30528]&1)==0){aP=5357}else{aP=5346}}else{aP=5346}if((aP|0)==5346){do{if((c[z>>2]&1|0)==0){f0=c[16506]|0;if((f0&1|0)!=0){h[8255]=8.988465674311579e+307}if((f0&2|0)==0){break}h[8256]=-8.988465674311579e+307}}while(0);do{if((c[x>>2]&1|0)==0){f0=c[17194]|0;if((f0&1|0)!=0){h[8599]=8.988465674311579e+307}if((f0&2|0)==0){break}h[8600]=-8.988465674311579e+307}}while(0);if(f1){aP=5357}else{aP=5358}}if((aP|0)==5357){if((a[30528]&1)==0){gb=0.0;gc=0.0}else{aP=5358}}if((aP|0)==5358){fT=+h[8771];gb=(+h[8772]-fT)/+((c[6352]|0)-1|0);gc=fT}f0=c[10814]|0;c[13898]=u;c[7774]=iw()|0;f$=t|0;f_=t+8|0;fZ=f_;fJ=t+8|0;fI=f_;f_=t+16|0;fH=f0;fT=gb;f0=f4;fG=f5;fF=f6;aq=gc;f9=0;L7293:while(1){bJ=fG;fw=fF;L7295:while(1){cb=c[13898]|0;if(f0){gd=fw}else{gd=bJ?fw:cb}if((t9(cb)|0)==0){aP=5370;break}dT();cb=c[13898]|0;if((c[8272]|0)<=(cb|0)){bJ=1;fw=gd;continue}c9=c[1054]|0;if((a[c9+(cb*40&-1)|0]&1)==0){bJ=1;fw=gd;continue}e1=c[c9+(cb*40&-1)+36>>2]|0;aQ=c9+(cb*40&-1)+32|0;cb=c[10036]|0;c9=0;while(1){if((c9|0)>=(e1|0)){break}if((a[cb+((c[aQ>>2]|0)+c9|0)|0]|0)==(a[c9+148464|0]|0)){c9=c9+1|0}else{bJ=1;fw=gd;continue L7295}}if((c9|0)==1){aP=5664;break}else{bJ=1;fw=gd}}L7307:do{if((aP|0)==5370){aP=0;ge=c[13898]|0;if((ge|0)>=(c[8272]|0)){aP=5377;break L7293}fw=c[1054]|0;bR=fw+(ge*40&-1)|0;L7310:do{if((a[bR]&1)==0){gf=0}else{B=c[fw+(ge*40&-1)+36>>2]|0;aQ=fw+(ge*40&-1)+32|0;cb=c[10036]|0;e1=0;while(1){if((e1|0)>=(B|0)){break}if((a[cb+((c[aQ>>2]|0)+e1|0)|0]|0)==(a[e1+103664|0]|0)){e1=e1+1|0}else{gf=0;break L7310}}gf=(e1|0)==1}}while(0);if(gf|(fH|0)==0){aP=5377;break L7293}c9=fH+304|0;c[200]=c[c9>>2];c[144]=c[fH+308>>2];aQ=f9+1|0;c[11670]=31424;cb=c[fw+(ge*40&-1)+36>>2]|0;L7318:do{if((a[bR]&1)!=0&(cb|0)>0){B=c[10036]|0;bB=0;bO=0;fb=c[fw+(ge*40&-1)+32>>2]|0;while(1){if((a[bB+205224|0]|0)==(a[B+(bB+fb|0)|0]|0)){gg=fb;gh=bO}else{if((bB|0)!=7){aP=5386;break L7318}gg=fb-1|0;gh=1}fe=bB+1|0;if((fe|0)<(gh+cb|0)){bB=fe;bO=gh;fb=gg}else{break}}if((gh|0)!=0){break}if(!((bB|0)==6|(bB|0)==12)){aP=5386}}else{aP=5386}}while(0);do{if((aP|0)==5386){aP=0;if((iu(s)|0)!=0){break}cb=a[32936]&1;fw=f0^cb<<24>>24!=0;c[7858]=c[s>>2];do{if(cb<<24>>24==0){if((a[30528]&1)!=0){aP=5394;break}gi=c[200]|0;e8=+h[64664+(gi*688&-1)>>3];fl=+h[64672+(gi*688&-1)>>3];if((a[64788+(gi*688&-1)|0]&1)==0){gj=fl;gl=e8}else{if(!(e8>0.0&fl>0.0)){aP=5391;break L7293}aW=+_(+e8);e8=+h[64800+(gi*688&-1)>>3];gj=+_(+fl)/e8;gl=aW/e8}bR=c[6352]|0;gm=(gj-gl)/+(bR-1|0);gn=gl;go=bR}else{aP=5394}}while(0);if((aP|0)==5394){aP=0;gm=fT;gn=aq;go=c[6352]|0}if((go|0)>0){cb=fH+320|0;bB=fH+12|0;bR=fH+23|0;fb=fw^1;bO=fH+244|0;B=fH+248|0;e1=0;while(1){e8=gn+gm*+(e1|0);do{if(+P(+e8)<1.0e-9){if(+P(+gm)<=1.0e-6){gp=e8;break}gp=0.0}else{gp=e8}}while(0);do{if((a[32936]&1)==0){if((a[30528]&1)!=0){gq=gp;break}fe=c[200]|0;if((a[64788+(fe*688&-1)|0]&1)==0){gq=gp;break}gq=+Z(+(gp*+h[64800+(fe*688&-1)>>3]))}else{gq=gp}}while(0);c[7862]=2;h[3932]=gq;h[3933]=0.0;e4(c[7858]|0,t);L7354:do{if((a[1960]&1)==0){fe=c[f$>>2]|0;if((fe|0)==2){gr=+h[f_>>3]}else if((fe|0)==3){aP=5407;break L7293}else if((fe|0)==1){gr=0.0}else{aP=5408;break L7293}e8=+P(+gr);if(e8>+h[11]){aP=5410;break}uE((c[cb>>2]|0)+(e1<<6)|0,0,64);if((fe|0)==1){gs=+(c[fZ>>2]|0)}else if((fe|0)==2){gs=+h[fJ>>3]}else if((fe|0)==3){gs=+uz(c[fI>>2]|0,0)}else{aP=5415;break L7293}h[(c[cb>>2]|0)+(e1<<6)+24>>3]=-1.0;c[(c[cb>>2]|0)+(e1<<6)>>2]=0;if((a[32936]&1)!=0){h[(c[cb>>2]|0)+(e1<<6)+8>>3]=gp;h[(c[cb>>2]|0)+(e1<<6)+16>>3]=gs;if(+h[7030]<0.0){break}if((a[56232]&1)==0){break}h[(c[cb>>2]|0)+(e1<<6)+24>>3]=0.0;break}if((a[30528]&1)==0){h[(c[cb>>2]|0)+(e1<<6)+8>>3]=gp;fe=c[bB>>2]|0;if((fe|0)==153&+h[7030]>=0.0){L7374:do{if((a[56232]&1)!=0){h[(c[cb>>2]|0)+(e1<<6)+24>>3]=0.0;d2=c[c9>>2]|0;if((a[64788+(d2*688&-1)|0]&1)==0){e8=+h[7030]*.5;gt=gq+e8;gu=gq-e8}else{e8=+h[64792+(d2*688&-1)>>3];aW=+h[7030];fl=gq*+R(+e8,+(aW*-.5));gt=gq*+R(+e8,+(aW*.5));gu=fl}d2=c[200]|0;if((d2|0)==99){break}L7381:do{if(gu>-8.988465674311579e+307&gu<8.988465674311579e+307){do{if((a[64788+(d2*688&-1)|0]&1)==0){h[(c[cb>>2]|0)+(e1<<6)+48>>3]=gu}else{if(gu<0.0){break L7381}if(gu==0.0){h[(c[cb>>2]|0)+(e1<<6)+48>>3]=-8.988465674311579e+307;break L7381}else{fl=+_(+gu);h[(c[cb>>2]|0)+(e1<<6)+48>>3]=fl/+h[64800+(d2*688&-1)>>3];break}}}while(0);if((a[bR]&1)!=0|(d2|0)<0){break}bs=64712+(d2*688&-1)|0;if(gu<+h[bs>>3]){h[bs>>3]=gu}bs=64664+(d2*688&-1)|0;do{if(gu<+h[bs>>3]){if((c[64648+(d2*688&-1)>>2]&1|0)==0){break L7381}if((c[64728+(d2*688&-1)>>2]&1|0)==0){h[bs>>3]=gu;break}fl=+h[64736+(d2*688&-1)>>3];if(fl>gu){h[bs>>3]=fl;break L7381}else{h[bs>>3]=gu;break}}}while(0);bs=64720+(d2*688&-1)|0;if(gu>+h[bs>>3]){h[bs>>3]=gu}bs=64672+(d2*688&-1)|0;if(gu<=+h[bs>>3]){break}if((c[64648+(d2*688&-1)>>2]&2|0)==0){break}if((c[64732+(d2*688&-1)>>2]&2|0)==0){h[bs>>3]=gu;break}fl=+h[64760+(d2*688&-1)>>3];if(fl>3]=fl;break}else{h[bs>>3]=gu;break}}}while(0);if(!(gt>-8.988465674311579e+307><8.988465674311579e+307)){break}do{if((a[64788+(d2*688&-1)|0]&1)==0){h[(c[cb>>2]|0)+(e1<<6)+56>>3]=gt}else{if(gt<0.0){break L7374}if(gt==0.0){h[(c[cb>>2]|0)+(e1<<6)+56>>3]=-8.988465674311579e+307;break L7374}else{fl=+_(+gt);h[(c[cb>>2]|0)+(e1<<6)+56>>3]=fl/+h[64800+(d2*688&-1)>>3];break}}}while(0);if((a[bR]&1)!=0|(d2|0)<0){break}bo=64712+(d2*688&-1)|0;if(gt<+h[bo>>3]){h[bo>>3]=gt}bo=64664+(d2*688&-1)|0;do{if(gt<+h[bo>>3]){if((c[64648+(d2*688&-1)>>2]&1|0)==0){break L7374}if((c[64728+(d2*688&-1)>>2]&1|0)==0){h[bo>>3]=gt;break}fl=+h[64736+(d2*688&-1)>>3];if(fl>gt){h[bo>>3]=fl;break L7374}else{h[bo>>3]=gt;break}}}while(0);bo=64720+(d2*688&-1)|0;if(gt>+h[bo>>3]){h[bo>>3]=gt}bo=64672+(d2*688&-1)|0;if(gt<=+h[bo>>3]){break}if((c[64648+(d2*688&-1)>>2]&2|0)==0){break}if((c[64732+(d2*688&-1)>>2]&2|0)==0){h[bo>>3]=gt;break}fl=+h[64760+(d2*688&-1)>>3];if(fl>3]=fl;break}else{h[bo>>3]=gt;break}}}while(0);gv=c[bB>>2]|0}else{gv=fe}if((gv|0)==457){h[(c[cb>>2]|0)+(e1<<6)+24>>3]=-1.0;h[(c[cb>>2]|0)+(e1<<6)+32>>3]=0.0;h[(c[cb>>2]|0)+(e1<<6)+56>>3]=360.0}else if((gv|0)==489){h[(c[cb>>2]|0)+(e1<<6)+24>>3]=-1.0;h[(c[cb>>2]|0)+(e1<<6)+32>>3]=+h[6214]}if(fw){if((c[200]|0)!=0){break}}else{if((c[144]|0)==99){break}}if(!(gs>-8.988465674311579e+307&gs<8.988465674311579e+307)){c[(c[cb>>2]|0)+(e1<<6)>>2]=2;break}bw=c[200]|0;bo=fw?bw:c[144]|0;do{if((a[64788+(bo*688&-1)|0]&1)==0){h[(c[cb>>2]|0)+(e1<<6)+16>>3]=gs}else{if(gs<0.0){c[(c[cb>>2]|0)+(e1<<6)>>2]=2;break L7354}if(gs==0.0){h[(c[cb>>2]|0)+(e1<<6)+16>>3]=-8.988465674311579e+307;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7354}else{fl=+_(+gs);h[(c[cb>>2]|0)+(e1<<6)+16>>3]=fl/+h[64800+(bo*688&-1)>>3];break}}}while(0);if((a[bR]&1)!=0){break}if((c[(c[cb>>2]|0)+(e1<<6)>>2]|0)!=0){break}if(!((bw|0)==0|fb)){break}fe=64712+(bo*688&-1)|0;if(gs<+h[fe>>3]){h[fe>>3]=gs}fe=64664+(bo*688&-1)|0;do{if(gs<+h[fe>>3]){if((c[64648+(bo*688&-1)>>2]&1|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7354}if((c[64728+(bo*688&-1)>>2]&1|0)==0){h[fe>>3]=gs;break}fl=+h[64736+(bo*688&-1)>>3];if(fl>gs){h[fe>>3]=fl;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7354}else{h[fe>>3]=gs;break}}}while(0);fe=64720+(bo*688&-1)|0;if(gs>+h[fe>>3]){h[fe>>3]=gs}fe=64672+(bo*688&-1)|0;if(gs<=+h[fe>>3]){break}if((c[64648+(bo*688&-1)>>2]&2|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}if((c[64732+(bo*688&-1)>>2]&2|0)==0){h[fe>>3]=gs;break}fl=+h[64760+(bo*688&-1)>>3];if(fl>3]=fl;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}else{h[fe>>3]=gs;break}}do{if(gs>+h[8686]){if((c[17366]&2|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}else{h[8686]=gs;break}}}while(0);fl=+h[8685];do{if(gs>2]|0)==345){if((c[bO>>2]|0)!=10){break}fE=+h[B>>3];if(bo){gy=gw;gz=fE}else{fy=+_(+fE);fE=+h[8702];gy=+_(+gw)/fE;gz=fy/fE}fE=gz-gy;fy=fE*fl;fv=fE*fx;fe=c[200]|0;L7527:do{if((fe|0)!=99){if(!(fv>-8.988465674311579e+307&fv<8.988465674311579e+307)){c[(c[cb>>2]|0)+(e1<<6)>>2]=2;break L7354}do{if((a[64788+(fe*688&-1)|0]&1)==0){h[(c[cb>>2]|0)+(e1<<6)+56>>3]=fv}else{if(fv<0.0){c[(c[cb>>2]|0)+(e1<<6)>>2]=2;break L7354}if(fv==0.0){h[(c[cb>>2]|0)+(e1<<6)+56>>3]=-8.988465674311579e+307;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7527}else{fE=+_(+fv);h[(c[cb>>2]|0)+(e1<<6)+56>>3]=fE/+h[64800+(fe*688&-1)>>3];break}}}while(0);if((a[bR]&1)!=0){break}if((c[(c[cb>>2]|0)+(e1<<6)>>2]|0)!=0|(fe|0)<0){break}bw=64712+(fe*688&-1)|0;if(fv<+h[bw>>3]){h[bw>>3]=fv}bw=64664+(fe*688&-1)|0;do{if(fv<+h[bw>>3]){if((c[64648+(fe*688&-1)>>2]&1|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7527}if((c[64728+(fe*688&-1)>>2]&1|0)==0){h[bw>>3]=fv;break}fE=+h[64736+(fe*688&-1)>>3];if(fE>fv){h[bw>>3]=fE;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7527}else{h[bw>>3]=fv;break}}}while(0);bw=64720+(fe*688&-1)|0;if(fv>+h[bw>>3]){h[bw>>3]=fv}bw=64672+(fe*688&-1)|0;if(fv<=+h[bw>>3]){break}if((c[64648+(fe*688&-1)>>2]&2|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}if((c[64732+(fe*688&-1)>>2]&2|0)==0){h[bw>>3]=fv;break}fE=+h[64760+(fe*688&-1)>>3];if(fE>3]=fE;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}else{h[bw>>3]=fv;break}}}while(0);fe=c[144]|0;if((fe|0)==99){break}if(!(fy>-8.988465674311579e+307&fy<8.988465674311579e+307)){c[(c[cb>>2]|0)+(e1<<6)>>2]=2;break L7354}do{if((a[64788+(fe*688&-1)|0]&1)==0){h[(c[cb>>2]|0)+(e1<<6)+40>>3]=fy}else{if(fy<0.0){c[(c[cb>>2]|0)+(e1<<6)>>2]=2;break L7354}if(fy==0.0){h[(c[cb>>2]|0)+(e1<<6)+40>>3]=-8.988465674311579e+307;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7521}else{fv=+_(+fy);h[(c[cb>>2]|0)+(e1<<6)+40>>3]=fv/+h[64800+(fe*688&-1)>>3];break}}}while(0);if((a[bR]&1)!=0){break}if((c[(c[cb>>2]|0)+(e1<<6)>>2]|0)!=0|(fe|0)<0){break}d2=64712+(fe*688&-1)|0;if(fy<+h[d2>>3]){h[d2>>3]=fy}d2=64664+(fe*688&-1)|0;do{if(fy<+h[d2>>3]){if((c[64648+(fe*688&-1)>>2]&1|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7521}if((c[64728+(fe*688&-1)>>2]&1|0)==0){h[d2>>3]=fy;break}fv=+h[64736+(fe*688&-1)>>3];if(fv>fy){h[d2>>3]=fv;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7521}else{h[d2>>3]=fy;break}}}while(0);d2=64720+(fe*688&-1)|0;if(fy>+h[d2>>3]){h[d2>>3]=fy}d2=64672+(fe*688&-1)|0;if(fy<=+h[d2>>3]){break}if((c[64648+(fe*688&-1)>>2]&2|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}if((c[64732+(fe*688&-1)>>2]&2|0)==0){h[d2>>3]=fy;break}fv=+h[64760+(fe*688&-1)>>3];if(fv>3]=fv;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}else{h[d2>>3]=fy;break}}}while(0);bo=c[200]|0;L7618:do{if((bo|0)!=99){if(!(aW>-8.988465674311579e+307&aW<8.988465674311579e+307)){c[(c[cb>>2]|0)+(e1<<6)>>2]=2;break L7354}do{if((a[64788+(bo*688&-1)|0]&1)==0){h[(c[cb>>2]|0)+(e1<<6)+8>>3]=aW}else{if(aW<0.0){c[(c[cb>>2]|0)+(e1<<6)>>2]=2;break L7354}if(aW==0.0){h[(c[cb>>2]|0)+(e1<<6)+8>>3]=-8.988465674311579e+307;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7618}else{fx=+_(+aW);h[(c[cb>>2]|0)+(e1<<6)+8>>3]=fx/+h[64800+(bo*688&-1)>>3];break}}}while(0);if((a[bR]&1)!=0){break}if((c[(c[cb>>2]|0)+(e1<<6)>>2]|0)!=0|(bo|0)<0){break}fe=64712+(bo*688&-1)|0;if(aW<+h[fe>>3]){h[fe>>3]=aW}fe=64664+(bo*688&-1)|0;do{if(aW<+h[fe>>3]){if((c[64648+(bo*688&-1)>>2]&1|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7618}if((c[64728+(bo*688&-1)>>2]&1|0)==0){h[fe>>3]=aW;break}fy=+h[64736+(bo*688&-1)>>3];if(fy>aW){h[fe>>3]=fy;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7618}else{h[fe>>3]=aW;break}}}while(0);fe=64720+(bo*688&-1)|0;if(aW>+h[fe>>3]){h[fe>>3]=aW}fe=64672+(bo*688&-1)|0;if(aW<=+h[fe>>3]){break}if((c[64648+(bo*688&-1)>>2]&2|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}if((c[64732+(bo*688&-1)>>2]&2|0)==0){h[fe>>3]=aW;break}fy=+h[64760+(bo*688&-1)>>3];if(fy>3]=fy;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}else{h[fe>>3]=aW;break}}}while(0);bo=c[144]|0;if((bo|0)==99){break}if(!(e8>-8.988465674311579e+307&e8<8.988465674311579e+307)){c[(c[cb>>2]|0)+(e1<<6)>>2]=2;break}do{if((a[64788+(bo*688&-1)|0]&1)==0){h[(c[cb>>2]|0)+(e1<<6)+16>>3]=e8}else{if(e8<0.0){c[(c[cb>>2]|0)+(e1<<6)>>2]=2;break L7354}if(e8==0.0){h[(c[cb>>2]|0)+(e1<<6)+16>>3]=-8.988465674311579e+307;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7354}else{aW=+_(+e8);h[(c[cb>>2]|0)+(e1<<6)+16>>3]=aW/+h[64800+(bo*688&-1)>>3];break}}}while(0);if((a[bR]&1)!=0){break}if((c[(c[cb>>2]|0)+(e1<<6)>>2]|0)!=0|(bo|0)<0){break}fe=64712+(bo*688&-1)|0;if(e8<+h[fe>>3]){h[fe>>3]=e8}fe=64664+(bo*688&-1)|0;do{if(e8<+h[fe>>3]){if((c[64648+(bo*688&-1)>>2]&1|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7354}if((c[64728+(bo*688&-1)>>2]&1|0)==0){h[fe>>3]=e8;break}aW=+h[64736+(bo*688&-1)>>3];if(aW>e8){h[fe>>3]=aW;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break L7354}else{h[fe>>3]=e8;break}}}while(0);fe=64720+(bo*688&-1)|0;if(e8>+h[fe>>3]){h[fe>>3]=e8}fe=64672+(bo*688&-1)|0;if(e8<=+h[fe>>3]){break}if((c[64648+(bo*688&-1)>>2]&2|0)==0){c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}if((c[64732+(bo*688&-1)>>2]&2|0)==0){h[fe>>3]=e8;break}aW=+h[64760+(bo*688&-1)>>3];if(aW>3]=aW;c[(c[cb>>2]|0)+(e1<<6)>>2]=1;break}else{h[fe>>3]=e8;break}}else{aP=5410}}while(0);if((aP|0)==5410){aP=0;c[(c[cb>>2]|0)+(e1<<6)>>2]=2}fe=e1+1|0;if((fe|0)<(c[6352]|0)){e1=fe}else{gA=fe;break}}}else{gA=0}c[fH+300>>2]=gA;c[13898]=c[fH+4>>2];e1=c[fH>>2]|0;if(fw){gB=aQ;gC=gn;gD=0;gE=1;gF=gm;gG=e1;break L7307}else{gH=aQ;gI=gn;gJ=0;gK=gm;gL=e1;aP=5665;break L7307}}}while(0);c[13898]=c[fH+4>>2];c9=c[fH>>2]|0;if(f0){gB=aQ;gC=aq;gD=0;gE=1;gF=fT;gG=c9}else{gH=aQ;gI=aq;gJ=0;gK=fT;gL=c9;aP=5665}}else if((aP|0)==5664){aP=0;if(f0){gB=f9;gC=aq;gD=bJ;gE=1;gF=fT;gG=fH}else{gH=f9;gI=aq;gJ=bJ;gK=fT;gL=fH;aP=5665}}}while(0);do{if((aP|0)==5665){aP=0;if(!(ix(c[7774]|0)|0)){gB=gH;gC=gI;gD=gJ;gE=0;gF=gK;gG=gL;break}c[13898]=gd;fH=gL;fT=gK;f0=0;fG=gJ;fF=gd;aq=gI;f9=gH;continue L7293}}while(0);bJ=c[7774]|0;if((bJ|0)!=0){c9=bJ;while(1){bJ=c[c9>>2]|0;uu(c[c9+12>>2]|0);uu(c9);if((bJ|0)==0){break}else{c9=bJ}}}c[7774]=0;c9=c[13898]|0;if((c[8272]|0)<=(c9|0)){gM=gB;break}bJ=c[1054]|0;if((a[bJ+(c9*40&-1)|0]&1)==0){gM=gB;break}e1=c[bJ+(c9*40&-1)+36>>2]|0;cb=bJ+(c9*40&-1)+32|0;bJ=c[10036]|0;bR=0;while(1){if((bR|0)>=(e1|0)){break}if((a[bJ+((c[cb>>2]|0)+bR|0)|0]|0)==(a[bR+148464|0]|0)){bR=bR+1|0}else{gM=gB;break L7293}}if((bR|0)!=1){gM=gB;break}c[13898]=c9+1;if(gE){fH=gG;fT=gF;f0=1;fG=gD;fF=gd;aq=gC;f9=gB;continue}c[7774]=iw()|0;fH=gG;fT=gF;f0=0;fG=gD;fF=gd;aq=gC;f9=gB}if((aP|0)==5377){uh(ge,136552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);gM=f9}else if((aP|0)==5391){uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56832+(gi*24&-1),v)|0)}else if((aP|0)==5407){uh(-1,212704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uf(-1,212032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5408){uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aP|0)==5415){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[32936]&1)==0){ga=gM;break}fF=c[10814]|0;c[d>>2]=fF;L7738:do{if((gM|0)<1){gN=d;gO=0;gP=gM}else{fG=d;f0=0;fH=fF;fI=1;fJ=gM;while(1){fZ=fG;f_=fH;f$=fI;while(1){gQ=f_|0;gR=c[gQ>>2]|0;if((c[f_+8>>2]|0)==0){break}f1=f$+1|0;if((f1|0)>(fJ|0)){gN=gQ;gO=f0;gP=fJ;break L7738}else{fZ=gQ;f_=gR;f$=f1}}aQ=fJ-1|0;f1=c[f_+300>>2]|0;cb=gR+300|0;if((f1|0)!=(c[cb>>2]|0)){break}if((f1|0)>0){f1=f_+320|0;bJ=gR+320|0;e1=gR+304|0;B=gR+308|0;bO=f_+23|0;bB=f_+304|0;fb=f_+308|0;fe=(a[30528]&1)==0;d2=0;do{L7750:do{if(fe){aq=+h[(c[f1>>2]|0)+(d2<<6)+16>>3];bw=c[bJ>>2]|0;fT=+h[bw+(d2<<6)+16>>3];aW=+h[7030];L7933:do{if(aW<0.0){aP=5874}else{if((a[56232]&1)==0){aP=5874;break}bs=c[e1>>2]|0;if((bs|0)==99){break}fy=aq-aW*.5;L7937:do{if(fy>-8.988465674311579e+307&fy<8.988465674311579e+307){do{if((a[64788+(bs*688&-1)|0]&1)==0){h[bw+(d2<<6)+48>>3]=fy}else{if(fy<0.0){aP=5845;break L7937}if(fy==0.0){h[bw+(d2<<6)+48>>3]=-8.988465674311579e+307;aP=5845;break L7937}else{fx=+_(+fy);h[bw+(d2<<6)+48>>3]=fx/+h[64800+(bs*688&-1)>>3];break}}}while(0);if((a[bO]&1)!=0){aP=5845;break}ea=c[e1>>2]|0;if((ea|0)<0){gS=ea;break}fx=aq- +h[7030]*.5;bV=64712+(ea*688&-1)|0;if(fx<+h[bV>>3]){h[bV>>3]=fx;gT=c[e1>>2]|0}else{gT=ea}ea=64664+(gT*688&-1)|0;do{if(fx<+h[ea>>3]){if((c[64648+(gT*688&-1)>>2]&1|0)==0){aP=5845;break L7937}if((c[64728+(gT*688&-1)>>2]&1|0)==0){h[ea>>3]=fx;break}fl=+h[64736+(gT*688&-1)>>3];if(fl>fx){h[ea>>3]=fl;aP=5845;break L7937}else{h[ea>>3]=fx;break}}}while(0);ea=c[e1>>2]|0;bV=64720+(ea*688&-1)|0;if(fx>+h[bV>>3]){h[bV>>3]=fx;gU=c[e1>>2]|0}else{gU=ea}ea=64672+(gU*688&-1)|0;if(fx<=+h[ea>>3]){gV=gU;aP=5846;break}if((c[64648+(gU*688&-1)>>2]&2|0)==0){aP=5845;break}if((c[64732+(gU*688&-1)>>2]&2|0)==0){h[ea>>3]=fx;aP=5845;break}fl=+h[64760+(gU*688&-1)>>3];if(fl>3]=fl;aP=5845;break}else{h[ea>>3]=fx;aP=5845;break}}else{aP=5845}}while(0);if((aP|0)==5845){aP=0;gV=c[e1>>2]|0;aP=5846}if((aP|0)==5846){aP=0;if((gV|0)==99){aP=5874;break}else{gS=gV}}fy=aq+ +h[7030]*.5;if(!(fy>-8.988465674311579e+307&fy<8.988465674311579e+307)){aP=5874;break}do{if((a[64788+(gS*688&-1)|0]&1)==0){h[(c[bJ>>2]|0)+(d2<<6)+56>>3]=fy}else{if(fy<0.0){aP=5874;break L7933}if(fy==0.0){h[(c[bJ>>2]|0)+(d2<<6)+56>>3]=-8.988465674311579e+307;aP=5874;break L7933}else{e8=+_(+fy);h[(c[bJ>>2]|0)+(d2<<6)+56>>3]=e8/+h[64800+(gS*688&-1)>>3];break}}}while(0);if((a[bO]&1)!=0){aP=5874;break}bs=c[e1>>2]|0;if((bs|0)<0){gW=bs;aP=5875;break}fy=aq+ +h[7030]*.5;bo=64712+(bs*688&-1)|0;if(fy<+h[bo>>3]){h[bo>>3]=fy;gX=c[e1>>2]|0}else{gX=bs}bs=64664+(gX*688&-1)|0;do{if(fy<+h[bs>>3]){if((c[64648+(gX*688&-1)>>2]&1|0)==0){aP=5874;break L7933}if((c[64728+(gX*688&-1)>>2]&1|0)==0){h[bs>>3]=fy;break}e8=+h[64736+(gX*688&-1)>>3];if(e8>fy){h[bs>>3]=e8;aP=5874;break L7933}else{h[bs>>3]=fy;break}}}while(0);bs=c[e1>>2]|0;bo=64720+(bs*688&-1)|0;if(fy>+h[bo>>3]){h[bo>>3]=fy;gY=c[e1>>2]|0}else{gY=bs}bs=64672+(gY*688&-1)|0;if(fy<=+h[bs>>3]){aP=5874;break}if((c[64648+(gY*688&-1)>>2]&2|0)==0){aP=5874;break}if((c[64732+(gY*688&-1)>>2]&2|0)==0){h[bs>>3]=fy;aP=5874;break}e8=+h[64760+(gY*688&-1)>>3];if(e8>3]=e8;aP=5874;break}else{h[bs>>3]=fy;aP=5874;break}}}while(0);if((aP|0)==5874){aP=0;bw=c[e1>>2]|0;if((bw|0)!=99){gW=bw;aP=5875}}L8015:do{if((aP|0)==5875){aP=0;if(!(aq>-8.988465674311579e+307&aq<8.988465674311579e+307)){c[(c[bJ>>2]|0)+(d2<<6)>>2]=2;break}do{if((a[64788+(gW*688&-1)|0]&1)==0){h[(c[bJ>>2]|0)+(d2<<6)+8>>3]=aq}else{if(aq<0.0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=2;break L8015}if(aq==0.0){h[(c[bJ>>2]|0)+(d2<<6)+8>>3]=-8.988465674311579e+307;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L8015}else{aW=+_(+aq);h[(c[bJ>>2]|0)+(d2<<6)+8>>3]=aW/+h[64800+(gW*688&-1)>>3];break}}}while(0);if((a[bO]&1)!=0){break}if((c[(c[bJ>>2]|0)+(d2<<6)>>2]|0)!=0){break}bw=c[e1>>2]|0;if((bw|0)<0){break}bs=64712+(bw*688&-1)|0;if(aq<+h[bs>>3]){h[bs>>3]=aq;gZ=c[e1>>2]|0}else{gZ=bw}bw=64664+(gZ*688&-1)|0;do{if(aq<+h[bw>>3]){if((c[64648+(gZ*688&-1)>>2]&1|0)==0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L8015}if((c[64728+(gZ*688&-1)>>2]&1|0)==0){h[bw>>3]=aq;break}fy=+h[64736+(gZ*688&-1)>>3];if(fy>aq){h[bw>>3]=fy;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L8015}else{h[bw>>3]=aq;break}}}while(0);bw=c[e1>>2]|0;bs=64720+(bw*688&-1)|0;if(aq>+h[bs>>3]){h[bs>>3]=aq;g_=c[e1>>2]|0}else{g_=bw}bw=64672+(g_*688&-1)|0;if(aq<=+h[bw>>3]){break}if((c[64648+(g_*688&-1)>>2]&2|0)==0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break}if((c[64732+(g_*688&-1)>>2]&2|0)==0){h[bw>>3]=aq;break}fy=+h[64760+(g_*688&-1)>>3];if(fy>3]=fy;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break}else{h[bw>>3]=aq;break}}}while(0);bw=c[B>>2]|0;if((bw|0)==99){break}if(!(fT>-8.988465674311579e+307&fT<8.988465674311579e+307)){c[(c[bJ>>2]|0)+(d2<<6)>>2]=2;break}do{if((a[64788+(bw*688&-1)|0]&1)==0){h[(c[bJ>>2]|0)+(d2<<6)+16>>3]=fT}else{if(fT<0.0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=2;break L7750}if(fT==0.0){h[(c[bJ>>2]|0)+(d2<<6)+16>>3]=-8.988465674311579e+307;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L7750}else{aq=+_(+fT);h[(c[bJ>>2]|0)+(d2<<6)+16>>3]=aq/+h[64800+(bw*688&-1)>>3];break}}}while(0);if((a[bO]&1)!=0){break}if((c[(c[bJ>>2]|0)+(d2<<6)>>2]|0)!=0){break}bw=c[B>>2]|0;if((bw|0)<0){break}bs=64712+(bw*688&-1)|0;if(fT<+h[bs>>3]){h[bs>>3]=fT;g$=c[B>>2]|0}else{g$=bw}bw=64664+(g$*688&-1)|0;do{if(fT<+h[bw>>3]){if((c[64648+(g$*688&-1)>>2]&1|0)==0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L7750}if((c[64728+(g$*688&-1)>>2]&1|0)==0){h[bw>>3]=fT;break}aq=+h[64736+(g$*688&-1)>>3];if(aq>fT){h[bw>>3]=aq;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L7750}else{h[bw>>3]=fT;break}}}while(0);bw=c[B>>2]|0;bs=64720+(bw*688&-1)|0;if(fT>+h[bs>>3]){h[bs>>3]=fT;g0=c[B>>2]|0}else{g0=bw}bw=64672+(g0*688&-1)|0;if(fT<=+h[bw>>3]){break}if((c[64648+(g0*688&-1)>>2]&2|0)==0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break}if((c[64732+(g0*688&-1)>>2]&2|0)==0){h[bw>>3]=fT;break}aq=+h[64760+(g0*688&-1)>>3];if(aq>3]=aq;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break}else{h[bw>>3]=fT;break}}else{bw=c[bJ>>2]|0;aq=+h[bw+(d2<<6)+16>>3];fy=+h[(c[f1>>2]|0)+(d2<<6)+16>>3]*+h[9040];bs=c[17366]|0;if((bs&2|0)==0&aq>+h[8686]){c[bw+(d2<<6)>>2]=1;g1=c[17366]|0}else{g1=bs}if((g1&1|0)==0){g2=aq- +h[8685]}else{g2=aq}aq=g2*+S(+fy);aW=g2*+T(+fy);fy=+h[7030];L7758:do{if(fy<0.0){aP=5749}else{if((a[56232]&1)==0){aP=5749;break}bs=c[bB>>2]|0;if((bs|0)==99){break}e8=aq-fy*.5;L7762:do{if(e8>-8.988465674311579e+307&e8<8.988465674311579e+307){do{if((a[64788+(bs*688&-1)|0]&1)==0){h[(c[bJ>>2]|0)+(d2<<6)+48>>3]=e8}else{if(e8<0.0){aP=5720;break L7762}if(e8==0.0){h[(c[bJ>>2]|0)+(d2<<6)+48>>3]=-8.988465674311579e+307;aP=5720;break L7762}else{fl=+_(+e8);h[(c[bJ>>2]|0)+(d2<<6)+48>>3]=fl/+h[64800+(bs*688&-1)>>3];break}}}while(0);if((a[bO]&1)!=0){aP=5720;break}bw=c[bB>>2]|0;if((bw|0)<0){g3=bw;break}fx=aq- +h[7030]*.5;bo=64712+(bw*688&-1)|0;if(fx<+h[bo>>3]){h[bo>>3]=fx;g4=c[bB>>2]|0}else{g4=bw}bw=64664+(g4*688&-1)|0;do{if(fx<+h[bw>>3]){if((c[64648+(g4*688&-1)>>2]&1|0)==0){aP=5720;break L7762}if((c[64728+(g4*688&-1)>>2]&1|0)==0){h[bw>>3]=fx;break}fl=+h[64736+(g4*688&-1)>>3];if(fl>fx){h[bw>>3]=fl;aP=5720;break L7762}else{h[bw>>3]=fx;break}}}while(0);bw=c[bB>>2]|0;bo=64720+(bw*688&-1)|0;if(fx>+h[bo>>3]){h[bo>>3]=fx;g5=c[bB>>2]|0}else{g5=bw}bw=64672+(g5*688&-1)|0;if(fx<=+h[bw>>3]){g6=g5;aP=5721;break}if((c[64648+(g5*688&-1)>>2]&2|0)==0){aP=5720;break}if((c[64732+(g5*688&-1)>>2]&2|0)==0){h[bw>>3]=fx;aP=5720;break}fl=+h[64760+(g5*688&-1)>>3];if(fl>3]=fl;aP=5720;break}else{h[bw>>3]=fx;aP=5720;break}}else{aP=5720}}while(0);if((aP|0)==5720){aP=0;g6=c[bB>>2]|0;aP=5721}if((aP|0)==5721){aP=0;if((g6|0)==99){aP=5749;break}else{g3=g6}}e8=aq+ +h[7030]*.5;if(!(e8>-8.988465674311579e+307&e8<8.988465674311579e+307)){aP=5749;break}do{if((a[64788+(g3*688&-1)|0]&1)==0){h[(c[bJ>>2]|0)+(d2<<6)+56>>3]=e8}else{if(e8<0.0){aP=5749;break L7758}if(e8==0.0){h[(c[bJ>>2]|0)+(d2<<6)+56>>3]=-8.988465674311579e+307;aP=5749;break L7758}else{fl=+_(+e8);h[(c[bJ>>2]|0)+(d2<<6)+56>>3]=fl/+h[64800+(g3*688&-1)>>3];break}}}while(0);if((a[bO]&1)!=0){aP=5749;break}bs=c[bB>>2]|0;if((bs|0)<0){g7=bs;aP=5750;break}e8=aq+ +h[7030]*.5;bw=64712+(bs*688&-1)|0;if(e8<+h[bw>>3]){h[bw>>3]=e8;g8=c[bB>>2]|0}else{g8=bs}bs=64664+(g8*688&-1)|0;do{if(e8<+h[bs>>3]){if((c[64648+(g8*688&-1)>>2]&1|0)==0){aP=5749;break L7758}if((c[64728+(g8*688&-1)>>2]&1|0)==0){h[bs>>3]=e8;break}fl=+h[64736+(g8*688&-1)>>3];if(fl>e8){h[bs>>3]=fl;aP=5749;break L7758}else{h[bs>>3]=e8;break}}}while(0);bs=c[bB>>2]|0;bw=64720+(bs*688&-1)|0;if(e8>+h[bw>>3]){h[bw>>3]=e8;g9=c[bB>>2]|0}else{g9=bs}bs=64672+(g9*688&-1)|0;if(e8<=+h[bs>>3]){aP=5749;break}if((c[64648+(g9*688&-1)>>2]&2|0)==0){aP=5749;break}if((c[64732+(g9*688&-1)>>2]&2|0)==0){h[bs>>3]=e8;aP=5749;break}fl=+h[64760+(g9*688&-1)>>3];if(fl>3]=fl;aP=5749;break}else{h[bs>>3]=e8;aP=5749;break}}}while(0);if((aP|0)==5749){aP=0;bs=c[bB>>2]|0;if((bs|0)!=99){g7=bs;aP=5750}}L7840:do{if((aP|0)==5750){aP=0;if(!(aq>-8.988465674311579e+307&aq<8.988465674311579e+307)){c[(c[bJ>>2]|0)+(d2<<6)>>2]=2;break}do{if((a[64788+(g7*688&-1)|0]&1)==0){h[(c[bJ>>2]|0)+(d2<<6)+8>>3]=aq}else{if(aq<0.0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=2;break L7840}if(aq==0.0){h[(c[bJ>>2]|0)+(d2<<6)+8>>3]=-8.988465674311579e+307;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L7840}else{fy=+_(+aq);h[(c[bJ>>2]|0)+(d2<<6)+8>>3]=fy/+h[64800+(g7*688&-1)>>3];break}}}while(0);if((a[bO]&1)!=0){break}if((c[(c[bJ>>2]|0)+(d2<<6)>>2]|0)!=0){break}bs=c[bB>>2]|0;if((bs|0)<0){break}bw=64712+(bs*688&-1)|0;if(aq<+h[bw>>3]){h[bw>>3]=aq;ha=c[bB>>2]|0}else{ha=bs}bs=64664+(ha*688&-1)|0;do{if(aq<+h[bs>>3]){if((c[64648+(ha*688&-1)>>2]&1|0)==0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L7840}if((c[64728+(ha*688&-1)>>2]&1|0)==0){h[bs>>3]=aq;break}e8=+h[64736+(ha*688&-1)>>3];if(e8>aq){h[bs>>3]=e8;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L7840}else{h[bs>>3]=aq;break}}}while(0);bs=c[bB>>2]|0;bw=64720+(bs*688&-1)|0;if(aq>+h[bw>>3]){h[bw>>3]=aq;hb=c[bB>>2]|0}else{hb=bs}bs=64672+(hb*688&-1)|0;if(aq<=+h[bs>>3]){break}if((c[64648+(hb*688&-1)>>2]&2|0)==0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break}if((c[64732+(hb*688&-1)>>2]&2|0)==0){h[bs>>3]=aq;break}e8=+h[64760+(hb*688&-1)>>3];if(e8>3]=e8;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break}else{h[bs>>3]=aq;break}}}while(0);bs=c[fb>>2]|0;if((bs|0)==99){break}if(!(aW>-8.988465674311579e+307&aW<8.988465674311579e+307)){c[(c[bJ>>2]|0)+(d2<<6)>>2]=2;break}do{if((a[64788+(bs*688&-1)|0]&1)==0){h[(c[bJ>>2]|0)+(d2<<6)+16>>3]=aW}else{if(aW<0.0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=2;break L7750}if(aW==0.0){h[(c[bJ>>2]|0)+(d2<<6)+16>>3]=-8.988465674311579e+307;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L7750}else{aq=+_(+aW);h[(c[bJ>>2]|0)+(d2<<6)+16>>3]=aq/+h[64800+(bs*688&-1)>>3];break}}}while(0);if((a[bO]&1)!=0){break}if((c[(c[bJ>>2]|0)+(d2<<6)>>2]|0)!=0){break}bs=c[fb>>2]|0;if((bs|0)<0){break}bw=64712+(bs*688&-1)|0;if(aW<+h[bw>>3]){h[bw>>3]=aW;hc=c[fb>>2]|0}else{hc=bs}bs=64664+(hc*688&-1)|0;do{if(aW<+h[bs>>3]){if((c[64648+(hc*688&-1)>>2]&1|0)==0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L7750}if((c[64728+(hc*688&-1)>>2]&1|0)==0){h[bs>>3]=aW;break}aq=+h[64736+(hc*688&-1)>>3];if(aq>aW){h[bs>>3]=aq;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break L7750}else{h[bs>>3]=aW;break}}}while(0);bs=c[fb>>2]|0;bw=64720+(bs*688&-1)|0;if(aW>+h[bw>>3]){h[bw>>3]=aW;hd=c[fb>>2]|0}else{hd=bs}bs=64672+(hd*688&-1)|0;if(aW<=+h[bs>>3]){break}if((c[64648+(hd*688&-1)>>2]&2|0)==0){c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break}if((c[64732+(hd*688&-1)>>2]&2|0)==0){h[bs>>3]=aW;break}aq=+h[64760+(hd*688&-1)>>3];if(aq>3]=aq;c[(c[bJ>>2]|0)+(d2<<6)>>2]=1;break}else{h[bs>>3]=aW;break}}}while(0);d2=d2+1|0;}while((d2|0)<(c[cb>>2]|0))}c[gQ>>2]=f0;c[fZ>>2]=gR;cb=gR|0;d2=f$+1|0;if((d2|0)>(aQ|0)){gN=cb;gO=f_;gP=aQ;break L7738}else{fG=cb;f0=f_;fH=c[cb>>2]|0;fI=d2;fJ=aQ}}uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=94952,v)|0)}}while(0);c[10814]=c[d>>2];c[gN>>2]=gO;dc(2,0);if((c[x>>2]|0)==0){ga=gP;break}dc(6,0);ga=gP}}while(0);gP=c[10814]|0;if((ga|0)==0|(gP|0)==0){uf(c[13898]|0,134776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}gO=(c[z>>2]|0)==0;do{if(gO){if((c[x>>2]|0)!=0){aP=5960;break}if((c[gP+8>>2]|0)!=4){aP=5959;break}uf(-1,100088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{g2=+h[8256];gC=+h[8255];if(g2==-8.988465674311579e+307|gC==8.988465674311579e+307){uf(-1,99648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[66036]&1)==0){he=gC;hf=g2}else{h[8255]=g2;h[8256]=gC;he=g2;hf=gC}if((a[66164]&1)==0){aP=5959;break}if(he>0.0&hf>0.0){gC=+_(+he);g2=+h[8272];h[8255]=gC/g2;h[8256]=+_(+hf)/g2;aP=5959;break}else{uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56880,v)|0)}}}while(0);do{if((aP|0)==5959){gP=(c[x>>2]|0)==0;if(!gP){aP=5960;break}if(gO){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=98616,v)|0)}z=c[17194]|0;if((z&1|0)!=0){h[8599]=+h[8255]}if((z&2|0)!=0){h[8600]=+h[8256]}if((z|0)!=0){hg=gP;break}if((a[68788]&1)!=0){hf=+h[8599];h[8599]=+h[8600];h[8600]=hf}if((a[68916]&1)==0){hg=gP;break}hf=+h[8599];if(hf<=0.0){uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56976,v)|0)}he=+h[8600];if(he>0.0){g2=+_(+hf);hf=+h[8616];h[8599]=g2/hf;h[8600]=+_(+he)/hf;hg=gP;break}else{uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56976,v)|0)}}}while(0);do{if((aP|0)==5960){hf=+h[8600];he=+h[8599];if(hf==-8.988465674311579e+307|he==8.988465674311579e+307){uf(-1,99648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[68788]&1)==0){hh=he;hi=hf}else{h[8599]=hf;h[8600]=he;hh=hf;hi=he}if((a[68916]&1)==0){hg=0;break}if(hh>0.0&hi>0.0){he=+_(+hh);hf=+h[8616];h[8599]=he/hf;h[8600]=+_(+hi)/hf;hg=0;break}else{uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56976,v)|0)}}}while(0);do{if(gO){if(hg){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=98024,v)|0)}aP=c[16506]|0;if((aP&1|0)!=0){h[8255]=+h[8599]}if((aP&2|0)==0){break}h[8256]=+h[8600]}}while(0);hg=(c[y>>2]|0)==0;do{if(!hg){dc(1,97344);if((a[65348]&1)!=0){hi=+h[8169];h[8169]=+h[8170];h[8170]=hi}if((a[65476]&1)==0){break}hi=+h[8169];if(hi<=0.0){uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}hh=+h[8170];if(hh>0.0){hf=+_(+hi);hi=+h[8186];h[8169]=hf/hi;h[8170]=+_(+hh)/hi;break}else{uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}}}while(0);y=(c[w>>2]|0)==0;do{if(y){if(hg){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=96304,v)|0)}w=c[17022]|0;if((w&1|0)!=0){h[8513]=+h[8169]}if((w&2|0)!=0){h[8514]=+h[8170]}if((w|0)!=0){break}if((a[68100]&1)!=0){hi=+h[8513];h[8513]=+h[8514];h[8514]=hi}if((a[68228]&1)==0){break}hi=+h[8513];if(hi<=0.0){uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}hh=+h[8514];if(hh>0.0){hf=+_(+hi);hi=+h[8530];h[8513]=hf/hi;h[8514]=+_(+hh)/hi;break}else{uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}}else{dc(5,96768);if((a[68100]&1)!=0){hi=+h[8513];h[8513]=+h[8514];h[8514]=hi}if((a[68228]&1)==0){break}hi=+h[8513];if(hi<=0.0){uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}hh=+h[8514];if(hh>0.0){hf=+_(+hi);hi=+h[8530];h[8513]=hf/hi;h[8514]=+_(+hh)/hi;break}else{uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}}}while(0);do{if(hg){if(y){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=95912,v)|0)}w=c[16334]|0;if((w&1|0)!=0){h[8169]=+h[8513]}if((w&2|0)==0){break}h[8170]=+h[8514]}}while(0);y=c[7738]|0;L8234:do{if((y|0)!=-1){hg=(c[13898]|0)-1|0;w=c[1054]|0;gO=(c[w+(hg*40&-1)+36>>2]|0)+(c[w+(hg*40&-1)+32>>2]|0)|0;hg=db(c[6924]|0,(gO+1|0)-(c[w+(y*40&-1)+32>>2]|0)|0,116456)|0;c[6924]=hg;w=c[(c[1054]|0)+(y*40&-1)+32>>2]|0;L8236:do{if((w|0)<(gO|0)){aP=w;x=hg;while(1){gP=a[(c[10036]|0)+aP|0]|0;if(gP<<24>>24==0){hj=x;break L8236}z=x+1|0;a[x]=gP;gP=aP+1|0;if((gP|0)<(gO|0)){aP=gP;x=z}else{hj=z;break}}}else{hj=hg}}while(0);a[hj]=0;c[7738]=-1;hg=c[6924]|0;gO=e6(126928)|0;if((gO|0)==0){break}w=gO+8|0;do{if((a[w]&1)==0){x=c[gO+24>>2]|0;if((aY(x|0,hg|0)|0)==0){break L8234}aP=gO+16|0;if((c[aP>>2]|0)!=3){break}uu(x);c[aP>>2]=1}else{a[w]=0}}while(0);if((hg|0)==0){hm=0}else{hm=bP(hg|0)|0}c[gO+16>>2]=3;c[gO+24>>2]=hm}}while(0);hm=c[10814]|0;if((a[14112]&1)!=0){lf(hm,ga);e7(1);i=b;return}fS(hm,ga);hm=0;do{if((c[64656+(hm*688&-1)>>2]&1|0)!=0){hi=+h[64664+(hm*688&-1)>>3];if((a[64788+(hm*688&-1)|0]&1)==0){h[64696+(hm*688&-1)>>3]=hi;ho=+h[64672+(hm*688&-1)>>3]}else{hh=+h[64800+(hm*688&-1)>>3];h[64696+(hm*688&-1)>>3]=+Z(+(hi*hh));ho=+Z(+(+h[64672+(hm*688&-1)>>3]*hh))}h[64704+(hm*688&-1)>>3]=ho}hm=hm+1|0;}while(hm>>>0<11);c[6930]=ga;c[6928]=2;e7(1);i=b;return}function iU(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0,C=0,D=0,E=0;e=(d|0)>0;if(e){f=0;g=b}else{return}while(1){i=c[g+304>>2]|0;j=c[g+308>>2]|0;k=c[g+12>>2]|0;do{if((k|0)==400|(k|0)==416){if((c[64652+(i*688&-1)>>2]|0)==0){if((c[64652+(j*688&-1)>>2]|0)==0){break}}f3(g,1)}else{l=g+300|0;if((c[l>>2]|0)<=0){break}m=g+320|0;n=g+23|0;o=64652+(i*688&-1)|0;p=64672+(i*688&-1)|0;q=64664+(i*688&-1)|0;r=64652+(j*688&-1)|0;s=64672+(j*688&-1)|0;t=64664+(j*688&-1)|0;u=0;do{v=c[m>>2]|0;w=v+(u<<6)|0;do{if((c[w>>2]|0)!=2){c[w>>2]=0;do{if((a[n]&1)==0){x=c[o>>2]|0;do{if((x&1|0)!=0){y=+h[v+(u<<6)+8>>3];if(y>=+h[q>>3]){break}h[q>>3]=y}}while(0);if((x&2|0)==0){break}y=+h[v+(u<<6)+8>>3];if(y<=+h[p>>3]){break}h[p>>3]=y}}while(0);y=+h[q>>3];z=+h[p>>3];A=+h[v+(u<<6)+8>>3];if(yz){B=6117}}else{if(Ay){B=6117}}if((B|0)==6117){B=0;c[w>>2]=1;break}do{if((a[n]&1)==0){C=c[r>>2]|0;do{if((C&1|0)!=0){y=+h[v+(u<<6)+16>>3];if(y>=+h[t>>3]){break}h[t>>3]=y}}while(0);if((C&2|0)==0){break}y=+h[v+(u<<6)+16>>3];if(y<=+h[s>>3]){break}h[s>>3]=y}}while(0);y=+h[t>>3];A=+h[s>>3];z=+h[v+(u<<6)+16>>3];if(yA)){break}}else{if(!(zy)){break}}c[w>>2]=1}}while(0);u=u+1|0;}while((u|0)<(c[l>>2]|0))}}while(0);j=f+1|0;if((j|0)<(d|0)){f=j;g=c[g>>2]|0}else{break}}if(e){D=0;E=b}else{return}while(1){dc(c[E+304>>2]|0,0);dc(c[E+308>>2]|0,0);b=D+1|0;if((b|0)<(d|0)){D=b;E=c[E>>2]|0}else{break}}return}function iV(a,b){a=a|0;b=b|0;return a_(c[(c[a>>2]|0)+60>>2]|0,c[(c[b>>2]|0)+60>>2]|0,64)|0}function iW(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=+g;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,w=0,x=0,y=0,z=0.0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;j=i;if((b|0)==0){uf(-1,92360,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{k=b}while(1){l=k|0;m=c[l>>2]|0;if((m|0)==0){break}else{k=m}}m=ut(192)|0;do{if((m|0)==0){gk();n=ut(192)|0;if((n|0)!=0){o=n;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=84552,v)|0)}else{o=m}}while(0);c[l>>2]=o;uD(o|0,k|0,192);k=c[l>>2]|0;c[k>>2]=0;c[k+4>>2]=e;h[k+24>>3]=+h[d+8>>3];h[k+32>>3]=+h[d+16>>3];h[k+40>>3]=+h[d+24>>3];d=k+72|0;do{if((c[d>>2]|0)==6){h[k+80>>3]=g}else{e=c[b+72>>2]|0;if((e|0)==3){if(+h[b+80>>3]>=0.0){break}c[k+76>>2]=~~g;break}else if((e|0)!=7){break}e=c[8798]|0;l=(e|0)>0;o=~~g;L8336:while(1){m=43264;while(1){p=c[m>>2]|0;if((p|0)==0){break}if((c[p+4>>2]|0)==(o|0)){q=6152;break L8336}else{m=p|0}}m=o-1|0;if(!((o|0)>(e|0)&l)){r=1;s=m;t=0.0;break}o=((m|0)%(e|0)&-1)+1|0}do{if((q|0)==6152){e=c[p+48>>2]|0;o=c[p+52>>2]|0;u=+h[p+56>>3];if((c[(c[3524]|0)+96>>2]&1024|0)!=0){r=e;s=o;t=u;break}l=(a[p+40|0]&1)==0;r=l?1:e;s=l?c[p+12>>2]|0:o;t=u}}while(0);c[d>>2]=r;c[k+76>>2]=s;h[k+80>>3]=t}}while(0);L8349:do{if((c[b+88>>2]|0)>0){s=k+128|0;if((c[s>>2]|0)==6){h[k+136>>3]=g;break}do{if((c[b+128>>2]|0)==3){if(+h[b+136>>3]>=0.0){break}c[k+132>>2]=~~g;break L8349}}while(0);if((c[b+92>>2]|0)!=-6){break}r=c[8798]|0;d=(r|0)>0;p=~~g;L8359:while(1){o=43264;while(1){w=c[o>>2]|0;if((w|0)==0){break}if((c[w+4>>2]|0)==(p|0)){q=6168;break L8359}else{o=w|0}}o=p-1|0;if(!((p|0)>(r|0)&d)){x=1;y=o;z=0.0;break}p=((o|0)%(r|0)&-1)+1|0}do{if((q|0)==6168){r=c[w+48>>2]|0;p=c[w+52>>2]|0;t=+h[w+56>>3];if((c[(c[3524]|0)+96>>2]&1024|0)!=0){x=r;y=p;z=t;break}d=(a[w+40|0]&1)==0;x=d?1:r;y=d?c[w+12>>2]|0:p;z=t}}while(0);c[s>>2]=x;c[k+132>>2]=y;h[k+136>>3]=z}}while(0);y=(f|0)==0?179864:f;f=a[47120]|0;L8371:do{if(f<<24>>24==0){L8382:do{if((a[y]|0)==34){x=1;while(1){w=a[y+x|0]|0;if((w<<24>>24|0)==0|(w<<24>>24|0)==34){A=x;break L8382}x=x+1|0}}else{A=0}}while(0);while(1){s=a[y+A|0]|0;if(s<<24>>24==0){B=A;break L8371}if((aM(s<<24>>24|0)|0)==0){A=A+1|0}else{B=A;break}}}else{s=0;x=0;while(1){w=a[y+x|0]|0;if((w<<24>>24|0)==34){C=s^1}else if((w<<24>>24|0)==0){D=x;break}else{if(w<<24>>24!=f<<24>>24|s){C=s}else{D=x;break}}s=C;x=x+1|0}while(1){if((D|0)<=0){B=D;break L8371}x=D-1|0;if((aM(a[y+x|0]|0|0)|0)==0){B=D;break}else{D=x}}}}while(0);do{if((a[y]|0)==34){if((a[y+(B-1|0)|0]|0)!=34){E=B;F=y;break}E=B-2|0;F=y+1|0}else{E=B;F=y}}while(0);y=E+1|0;B=ut(y)|0;if((B|0)!=0){G=B;H=k+60|0;c[H>>2]=G;I=uF(G|0,F|0,E|0)|0;J=c[H>>2]|0;K=J+E|0;a[K]=0;L=c[H>>2]|0;ua(L);i=j;return}gk();B=ut(y)|0;if((B|0)==0){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=224080,v)|0)}else{G=B;H=k+60|0;c[H>>2]=G;I=uF(G|0,F|0,E|0)|0;J=c[H>>2]|0;K=J+E|0;a[K]=0;L=c[H>>2]|0;ua(L);i=j;return}}function iX(b,d,e,f,g,j,k,l,m){b=b|0;d=d|0;e=+e;f=+f;g=+g;j=+j;k=+k;l=+l;m=+m;var n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0,H=0.0,I=0,J=0,K=0.0,L=0.0,M=0,N=0,O=0,Q=0,R=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0.0,bm=0.0,bn=0.0;n=i;i=i+24|0;o=n|0;p=c[b+320>>2]|0;q=c[60]|0;do{if((q|0)==0){r=f;s=l;t=k}else{c[64]=2;h[33]=f;h[34]=0.0;c[76]=c[64];c[308>>2]=c[260>>2];c[312>>2]=c[264>>2];c[316>>2]=c[268>>2];c[320>>2]=c[272>>2];c[324>>2]=c[276>>2];e4(q,o);do{if((a[1960]&1)==0){u=c[o>>2]|0;if((u|0)==2){w=+h[o+8>>3];break}else if((u|0)==1){w=+(c[o+8>>2]|0);break}else if((u|0)==3){w=+uz(c[o+8>>2]|0,0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{w=0.0}}while(0);c[64]=2;h[33]=k;h[34]=0.0;c[76]=c[64];c[308>>2]=c[260>>2];c[312>>2]=c[264>>2];c[316>>2]=c[268>>2];c[320>>2]=c[272>>2];c[324>>2]=c[276>>2];e4(c[60]|0,o);do{if((a[1960]&1)==0){u=c[o>>2]|0;if((u|0)==3){x=+uz(c[o+8>>2]|0,0);break}else if((u|0)==1){x=+(c[o+8>>2]|0);break}else if((u|0)==2){x=+h[o+8>>3];break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{x=0.0}}while(0);c[64]=2;h[33]=l;h[34]=0.0;c[76]=c[64];c[308>>2]=c[260>>2];c[312>>2]=c[264>>2];c[316>>2]=c[268>>2];c[320>>2]=c[272>>2];c[324>>2]=c[276>>2];e4(c[60]|0,o);if((a[1960]&1)!=0){r=w;s=0.0;t=x;break}u=c[o>>2]|0;if((u|0)==3){r=w;s=+uz(c[o+8>>2]|0,0);t=x;break}else if((u|0)==2){r=w;s=+h[o+8>>3];t=x;break}else if((u|0)==1){r=w;s=+(c[o+8>>2]|0);t=x;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);o=p+(d<<6)|0;c[o>>2]=0;do{if((a[30528]&1)==0){y=e;z=r;A=g;B=s;C=t;D=j}else{if(r<+h[8691]){h[8691]=r}do{if(r<+h[8685]){if((c[17366]&1|0)==0){break}h[8685]=r>0.0?0.0:r}}while(0);if(r>+h[8692]){h[8692]=r}do{if(r>+h[8686]){if((c[17366]&2|0)==0){c[o>>2]=1;break}if((c[17387]&2|0)==0){h[8686]=r;break}x=+h[8697];if(x>3<<3,c[v>>2]=0,v)|0)}u=c[17366]|0;if((u&1|0)==0){w=+_(+r);l=+h[8702];E=w/l- +_(+x)/l;F=u;break}else{uf(-1,77440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);l=+h[9040]*e;x=E*+S(+l);w=E*+T(+l);if((c[b+12>>2]|0)==457){l=(j-g)*.5;y=x;z=w;A=x-l;B=s;C=t;D=l+x;break}if((F&2|0)==0&s>+h[8686]){c[o>>2]=1;G=a[69604]|0}else{G=q}do{if((G&1)==0){u=c[17366]|0;if((u&1|0)!=0){H=s;I=u;break}H=s- +h[8685];I=u}else{l=+_(+s);k=+h[8702];f=l/k- +_(+(+h[8685]))/k;H=f;I=c[17366]|0}}while(0);f=+h[9040]*j;k=H*+S(+f);l=H*+T(+f);if((I&2|0)==0&t>+h[8686]){c[o>>2]=1;J=a[69604]|0}else{J=G}do{if((J&1)==0){if((c[17366]&1|0)!=0){K=t;break}K=t- +h[8685]}else{f=+_(+t);L=+h[8702];K=f/L- +_(+(+h[8685]))/L}}while(0);L=+h[9040]*g;f=K*+S(+L);y=x;z=w;A=f;B=l;C=K*+T(+L);D=k}}while(0);J=b+304|0;G=c[J>>2]|0;L8481:do{if((G|0)!=99){if(!(y>-8.988465674311579e+307&y<8.988465674311579e+307)){c[o>>2]=2;i=n;return}do{if((a[64788+(G*688&-1)|0]&1)==0){h[p+(d<<6)+8>>3]=y}else{if(y<0.0){c[o>>2]=2;i=n;return}if(y==0.0){h[p+(d<<6)+8>>3]=-8.988465674311579e+307;c[o>>2]=1;break L8481}else{K=+_(+y);h[p+(d<<6)+8>>3]=K/+h[64800+(G*688&-1)>>3];break}}}while(0);if((a[b+23|0]&1)!=0){break}if((c[o>>2]|0)!=0){break}I=c[J>>2]|0;if((I|0)<0){break}F=64712+(I*688&-1)|0;if(y<+h[F>>3]){h[F>>3]=y;M=c[J>>2]|0}else{M=I}I=64664+(M*688&-1)|0;do{if(y<+h[I>>3]){if((c[64648+(M*688&-1)>>2]&1|0)==0){c[o>>2]=1;break L8481}if((c[64728+(M*688&-1)>>2]&1|0)==0){h[I>>3]=y;break}k=+h[64736+(M*688&-1)>>3];if(k>y){h[I>>3]=k;c[o>>2]=1;break L8481}else{h[I>>3]=y;break}}}while(0);I=c[J>>2]|0;F=64720+(I*688&-1)|0;if(y>+h[F>>3]){h[F>>3]=y;N=c[J>>2]|0}else{N=I}I=64672+(N*688&-1)|0;if(y<=+h[I>>3]){break}if((c[64648+(N*688&-1)>>2]&2|0)==0){c[o>>2]=1;break}if((c[64732+(N*688&-1)>>2]&2|0)==0){h[I>>3]=y;break}k=+h[64760+(N*688&-1)>>3];if(k>3]=k;c[o>>2]=1;break}else{h[I>>3]=y;break}}}while(0);N=b+308|0;M=c[N>>2]|0;L8530:do{if((M|0)!=99){if(!(z>-8.988465674311579e+307&z<8.988465674311579e+307)){c[o>>2]=2;i=n;return}do{if((a[64788+(M*688&-1)|0]&1)==0){h[p+(d<<6)+16>>3]=z}else{if(z<0.0){c[o>>2]=2;i=n;return}if(z==0.0){h[p+(d<<6)+16>>3]=-8.988465674311579e+307;c[o>>2]=1;break L8530}else{k=+_(+z);h[p+(d<<6)+16>>3]=k/+h[64800+(M*688&-1)>>3];break}}}while(0);if((a[b+23|0]&1)!=0){break}if((c[o>>2]|0)!=0){break}G=c[N>>2]|0;if((G|0)<0){break}I=64712+(G*688&-1)|0;if(z<+h[I>>3]){h[I>>3]=z;O=c[N>>2]|0}else{O=G}G=64664+(O*688&-1)|0;do{if(z<+h[G>>3]){if((c[64648+(O*688&-1)>>2]&1|0)==0){c[o>>2]=1;break L8530}if((c[64728+(O*688&-1)>>2]&1|0)==0){h[G>>3]=z;break}k=+h[64736+(O*688&-1)>>3];if(k>z){h[G>>3]=k;c[o>>2]=1;break L8530}else{h[G>>3]=z;break}}}while(0);G=c[N>>2]|0;I=64720+(G*688&-1)|0;if(z>+h[I>>3]){h[I>>3]=z;Q=c[N>>2]|0}else{Q=G}G=64672+(Q*688&-1)|0;if(z<=+h[G>>3]){break}if((c[64648+(Q*688&-1)>>2]&2|0)==0){c[o>>2]=1;break}if((c[64732+(Q*688&-1)>>2]&2|0)==0){h[G>>3]=z;break}k=+h[64760+(Q*688&-1)>>3];if(k>3]=k;c[o>>2]=1;break}else{h[G>>3]=z;break}}}while(0);Q=c[b+12>>2]|0;L8579:do{if((Q|0)==474){h[p+(d<<6)+32>>3]=C;O=c[N>>2]|0;L8581:do{if((O|0)==99){R=0}else{if(!(B>-8.988465674311579e+307&B<8.988465674311579e+307)){h[p+(d<<6)+40>>3]=-8.988465674311579e+307;R=2;break}do{if((a[64788+(O*688&-1)|0]&1)==0){h[p+(d<<6)+40>>3]=B}else{if(B<0.0){h[p+(d<<6)+40>>3]=-8.988465674311579e+307;R=2;break L8581}if(B==0.0){h[p+(d<<6)+40>>3]=-8.988465674311579e+307;R=1;break L8581}else{k=+_(+B);h[p+(d<<6)+40>>3]=k/+h[64800+(O*688&-1)>>3];break}}}while(0);if((a[b+23|0]&1)!=0){R=0;break}M=c[N>>2]|0;if((M|0)<0){R=0;break}G=64712+(M*688&-1)|0;if(B<+h[G>>3]){h[G>>3]=B;U=c[N>>2]|0}else{U=M}M=64664+(U*688&-1)|0;do{if(B<+h[M>>3]){if((c[64648+(U*688&-1)>>2]&1|0)==0){R=1;break L8581}if((c[64728+(U*688&-1)>>2]&1|0)==0){h[M>>3]=B;break}k=+h[64736+(U*688&-1)>>3];if(k>B){h[M>>3]=k;R=1;break L8581}else{h[M>>3]=B;break}}}while(0);M=c[N>>2]|0;G=64720+(M*688&-1)|0;if(B>+h[G>>3]){h[G>>3]=B;V=c[N>>2]|0}else{V=M}M=64672+(V*688&-1)|0;if(B<=+h[M>>3]){R=0;break}if((c[64648+(V*688&-1)>>2]&2|0)==0){R=1;break}if((c[64732+(V*688&-1)>>2]&2|0)==0){h[M>>3]=B;R=0;break}k=+h[64760+(V*688&-1)>>3];if(k>3]=k;R=1;break}else{h[M>>3]=B;R=0;break}}}while(0);O=c[J>>2]|0;if((O|0)==99){W=R;break}L8624:do{if(A>-8.988465674311579e+307&A<8.988465674311579e+307){do{if((a[64788+(O*688&-1)|0]&1)==0){h[p+(d<<6)+48>>3]=A}else{if(A<0.0){h[p+(d<<6)+48>>3]=-8.988465674311579e+307;X=2;Y=6440;break L8624}if(A==0.0){h[p+(d<<6)+48>>3]=-8.988465674311579e+307;X=1;Y=6440;break L8624}else{k=+_(+A);h[p+(d<<6)+48>>3]=k/+h[64800+(O*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&(R|0)==0)){X=R;Y=6440;break}M=c[J>>2]|0;if((M|0)<0){Z=M;$=0;break}G=64712+(M*688&-1)|0;if(A<+h[G>>3]){h[G>>3]=A;aa=c[J>>2]|0}else{aa=M}M=64664+(aa*688&-1)|0;do{if(A<+h[M>>3]){if((c[64648+(aa*688&-1)>>2]&1|0)==0){X=1;Y=6440;break L8624}if((c[64728+(aa*688&-1)>>2]&1|0)==0){h[M>>3]=A;break}k=+h[64736+(aa*688&-1)>>3];if(k>A){h[M>>3]=k;X=1;Y=6440;break L8624}else{h[M>>3]=A;break}}}while(0);M=c[J>>2]|0;G=64720+(M*688&-1)|0;if(A>+h[G>>3]){h[G>>3]=A;ab=c[J>>2]|0}else{ab=M}M=64672+(ab*688&-1)|0;if(A<=+h[M>>3]){ac=0;ad=ab;Y=6441;break}if((c[64648+(ab*688&-1)>>2]&2|0)==0){X=1;Y=6440;break}if((c[64732+(ab*688&-1)>>2]&2|0)==0){h[M>>3]=A;X=0;Y=6440;break}k=+h[64760+(ab*688&-1)>>3];if(k>3]=k;X=1;Y=6440;break}else{h[M>>3]=A;X=0;Y=6440;break}}else{h[p+(d<<6)+48>>3]=-8.988465674311579e+307;X=2;Y=6440}}while(0);if((Y|0)==6440){ac=X;ad=c[J>>2]|0;Y=6441}if((Y|0)==6441){if((ad|0)==99){W=ac;break}else{Z=ad;$=ac}}if(!(D>-8.988465674311579e+307&D<8.988465674311579e+307)){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;W=2;break}do{if((a[64788+(Z*688&-1)|0]&1)==0){h[p+(d<<6)+56>>3]=D}else{if(D<0.0){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;W=2;break L8579}if(D==0.0){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;W=1;break L8579}else{k=+_(+D);h[p+(d<<6)+56>>3]=k/+h[64800+(Z*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&($|0)==0)){W=$;break}O=c[J>>2]|0;if((O|0)<0){W=0;break}M=64712+(O*688&-1)|0;if(D<+h[M>>3]){h[M>>3]=D;ae=c[J>>2]|0}else{ae=O}O=64664+(ae*688&-1)|0;do{if(D<+h[O>>3]){if((c[64648+(ae*688&-1)>>2]&1|0)==0){W=1;break L8579}if((c[64728+(ae*688&-1)>>2]&1|0)==0){h[O>>3]=D;break}k=+h[64736+(ae*688&-1)>>3];if(k>D){h[O>>3]=k;W=1;break L8579}else{h[O>>3]=D;break}}}while(0);O=c[J>>2]|0;M=64720+(O*688&-1)|0;if(D>+h[M>>3]){h[M>>3]=D;af=c[J>>2]|0}else{af=O}O=64672+(af*688&-1)|0;if(D<=+h[O>>3]){W=0;break}if((c[64648+(af*688&-1)>>2]&2|0)==0){W=1;break}if((c[64732+(af*688&-1)>>2]&2|0)==0){h[O>>3]=D;W=0;break}k=+h[64760+(af*688&-1)>>3];if(k>3]=k;W=1;break}else{h[O>>3]=D;W=0;break}}else if((Q|0)==18|(Q|0)==1|(Q|0)==51|(Q|0)==368|(Q|0)==64|(Q|0)==33|(Q|0)==177|(Q|0)==193|(Q|0)==209){h[p+(d<<6)+48>>3]=A;h[p+(d<<6)+56>>3]=D;h[p+(d<<6)+32>>3]=C;h[p+(d<<6)+40>>3]=B;W=0}else if((Q|0)==153){h[p+(d<<6)+32>>3]=C;h[p+(d<<6)+40>>3]=B;O=c[J>>2]|0;if((O|0)==99){W=0;break}L8710:do{if(A>-8.988465674311579e+307&A<8.988465674311579e+307){do{if((a[64788+(O*688&-1)|0]&1)==0){h[p+(d<<6)+48>>3]=A}else{if(A<0.0){h[p+(d<<6)+48>>3]=-8.988465674311579e+307;ag=2;Y=6349;break L8710}if(A==0.0){h[p+(d<<6)+48>>3]=-8.988465674311579e+307;ag=1;Y=6349;break L8710}else{k=+_(+A);h[p+(d<<6)+48>>3]=k/+h[64800+(O*688&-1)>>3];break}}}while(0);if((a[b+23|0]&1)!=0){ag=0;Y=6349;break}M=c[J>>2]|0;if((M|0)<0){ah=M;ai=0;break}G=64712+(M*688&-1)|0;if(A<+h[G>>3]){h[G>>3]=A;aj=c[J>>2]|0}else{aj=M}M=64664+(aj*688&-1)|0;do{if(A<+h[M>>3]){if((c[64648+(aj*688&-1)>>2]&1|0)==0){ag=1;Y=6349;break L8710}if((c[64728+(aj*688&-1)>>2]&1|0)==0){h[M>>3]=A;break}k=+h[64736+(aj*688&-1)>>3];if(k>A){h[M>>3]=k;ag=1;Y=6349;break L8710}else{h[M>>3]=A;break}}}while(0);M=c[J>>2]|0;G=64720+(M*688&-1)|0;if(A>+h[G>>3]){h[G>>3]=A;ak=c[J>>2]|0}else{ak=M}M=64672+(ak*688&-1)|0;if(A<=+h[M>>3]){al=0;am=ak;Y=6350;break}if((c[64648+(ak*688&-1)>>2]&2|0)==0){ag=1;Y=6349;break}if((c[64732+(ak*688&-1)>>2]&2|0)==0){h[M>>3]=A;ag=0;Y=6349;break}k=+h[64760+(ak*688&-1)>>3];if(k>3]=k;ag=1;Y=6349;break}else{h[M>>3]=A;ag=0;Y=6349;break}}else{h[p+(d<<6)+48>>3]=-8.988465674311579e+307;ag=2;Y=6349}}while(0);if((Y|0)==6349){al=ag;am=c[J>>2]|0;Y=6350}if((Y|0)==6350){if((am|0)==99){W=al;break}else{ah=am;ai=al}}if(!(D>-8.988465674311579e+307&D<8.988465674311579e+307)){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;W=2;break}do{if((a[64788+(ah*688&-1)|0]&1)==0){h[p+(d<<6)+56>>3]=D}else{if(D<0.0){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;W=2;break L8579}if(D==0.0){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;W=1;break L8579}else{k=+_(+D);h[p+(d<<6)+56>>3]=k/+h[64800+(ah*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&(ai|0)==0)){W=ai;break}O=c[J>>2]|0;if((O|0)<0){W=0;break}M=64712+(O*688&-1)|0;if(D<+h[M>>3]){h[M>>3]=D;an=c[J>>2]|0}else{an=O}O=64664+(an*688&-1)|0;do{if(D<+h[O>>3]){if((c[64648+(an*688&-1)>>2]&1|0)==0){W=1;break L8579}if((c[64728+(an*688&-1)>>2]&1|0)==0){h[O>>3]=D;break}k=+h[64736+(an*688&-1)>>3];if(k>D){h[O>>3]=k;W=1;break L8579}else{h[O>>3]=D;break}}}while(0);O=c[J>>2]|0;M=64720+(O*688&-1)|0;if(D>+h[M>>3]){h[M>>3]=D;ao=c[J>>2]|0}else{ao=O}O=64672+(ao*688&-1)|0;if(D<=+h[O>>3]){W=0;break}if((c[64648+(ao*688&-1)>>2]&2|0)==0){W=1;break}if((c[64732+(ao*688&-1)>>2]&2|0)==0){h[O>>3]=D;W=0;break}k=+h[64760+(ao*688&-1)>>3];if(k>3]=k;W=1;break}else{h[O>>3]=D;W=0;break}}else if((Q|0)==457){h[p+(d<<6)+40>>3]=B;O=c[J>>2]|0;L8794:do{if((O|0)==99){ap=0}else{L8796:do{if(A>-8.988465674311579e+307&A<8.988465674311579e+307){do{if((a[64788+(O*688&-1)|0]&1)==0){h[p+(d<<6)+48>>3]=A}else{if(A<0.0){h[p+(d<<6)+48>>3]=-8.988465674311579e+307;aq=2;Y=6501;break L8796}if(A==0.0){h[p+(d<<6)+48>>3]=-8.988465674311579e+307;aq=1;Y=6501;break L8796}else{k=+_(+A);h[p+(d<<6)+48>>3]=k/+h[64800+(O*688&-1)>>3];break}}}while(0);if((a[b+23|0]&1)!=0){aq=0;Y=6501;break}M=c[J>>2]|0;if((M|0)<0){ar=M;as=0;break}G=64712+(M*688&-1)|0;if(A<+h[G>>3]){h[G>>3]=A;at=c[J>>2]|0}else{at=M}M=64664+(at*688&-1)|0;do{if(A<+h[M>>3]){if((c[64648+(at*688&-1)>>2]&1|0)==0){aq=1;Y=6501;break L8796}if((c[64728+(at*688&-1)>>2]&1|0)==0){h[M>>3]=A;break}k=+h[64736+(at*688&-1)>>3];if(k>A){h[M>>3]=k;aq=1;Y=6501;break L8796}else{h[M>>3]=A;break}}}while(0);M=c[J>>2]|0;G=64720+(M*688&-1)|0;if(A>+h[G>>3]){h[G>>3]=A;au=c[J>>2]|0}else{au=M}M=64672+(au*688&-1)|0;if(A<=+h[M>>3]){av=0;aw=au;Y=6502;break}if((c[64648+(au*688&-1)>>2]&2|0)==0){aq=1;Y=6501;break}if((c[64732+(au*688&-1)>>2]&2|0)==0){h[M>>3]=A;aq=0;Y=6501;break}k=+h[64760+(au*688&-1)>>3];if(k>3]=k;aq=1;Y=6501;break}else{h[M>>3]=A;aq=0;Y=6501;break}}else{h[p+(d<<6)+48>>3]=-8.988465674311579e+307;aq=2;Y=6501}}while(0);if((Y|0)==6501){av=aq;aw=c[J>>2]|0;Y=6502}if((Y|0)==6502){if((aw|0)==99){ap=av;break}else{ar=aw;as=av}}if(!(D>-8.988465674311579e+307&D<8.988465674311579e+307)){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;ap=2;break}do{if((a[64788+(ar*688&-1)|0]&1)==0){h[p+(d<<6)+56>>3]=D}else{if(D<0.0){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;ap=2;break L8794}if(D==0.0){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;ap=1;break L8794}else{k=+_(+D);h[p+(d<<6)+56>>3]=k/+h[64800+(ar*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&(as|0)==0)){ap=as;break}M=c[J>>2]|0;if((M|0)<0){ap=0;break}G=64712+(M*688&-1)|0;if(D<+h[G>>3]){h[G>>3]=D;ax=c[J>>2]|0}else{ax=M}M=64664+(ax*688&-1)|0;do{if(D<+h[M>>3]){if((c[64648+(ax*688&-1)>>2]&1|0)==0){ap=1;break L8794}if((c[64728+(ax*688&-1)>>2]&1|0)==0){h[M>>3]=D;break}k=+h[64736+(ax*688&-1)>>3];if(k>D){h[M>>3]=k;ap=1;break L8794}else{h[M>>3]=D;break}}}while(0);M=c[J>>2]|0;G=64720+(M*688&-1)|0;if(D>+h[G>>3]){h[G>>3]=D;ay=c[J>>2]|0}else{ay=M}M=64672+(ay*688&-1)|0;if(D<=+h[M>>3]){ap=0;break}if((c[64648+(ay*688&-1)>>2]&2|0)==0){ap=1;break}if((c[64732+(ay*688&-1)>>2]&2|0)==0){h[M>>3]=D;ap=0;break}k=+h[64760+(ay*688&-1)>>3];if(k>3]=k;ap=1;break}else{h[M>>3]=D;ap=0;break}}}while(0);h[p+(d<<6)+32>>3]=C;h[p+(d<<6)+56>>3]=B;if(+P(+C)<=1.0e3){if(+P(+B)<=1.0e3){W=ap;break}}c[o>>2]=2;W=ap}else if((Q|0)==489){O=c[J>>2]|0;L9055:do{if((O|0)==99){az=0}else{k=(A>D?A:D)*.5;M=b+272|0;l=y-k*((c[M>>2]|0)==1?1.1:1.0);L9057:do{if(l>-8.988465674311579e+307&l<8.988465674311579e+307){do{if((a[64788+(O*688&-1)|0]&1)==0){h[p+(d<<6)+48>>3]=l}else{if(l<0.0){h[p+(d<<6)+48>>3]=-8.988465674311579e+307;aA=2;Y=6565;break L9057}if(l==0.0){h[p+(d<<6)+48>>3]=-8.988465674311579e+307;aA=1;Y=6565;break L9057}else{w=+_(+l);h[p+(d<<6)+48>>3]=w/+h[64800+(O*688&-1)>>3];break}}}while(0);if((a[b+23|0]&1)!=0){aA=0;Y=6565;break}G=c[J>>2]|0;if((G|0)<0){aB=G;aC=0;break}I=c[M>>2]|0;w=y-k*((I|0)==1?1.1:1.0);F=64712+(G*688&-1)|0;if(w<+h[F>>3]){h[F>>3]=w;aD=c[M>>2]|0;aE=c[J>>2]|0}else{aD=I;aE=G}w=y-k*((aD|0)==1?1.1:1.0);G=64664+(aE*688&-1)|0;do{if(w<+h[G>>3]){if((c[64648+(aE*688&-1)>>2]&1|0)==0){aA=1;Y=6565;break L9057}if((c[64728+(aE*688&-1)>>2]&1|0)==0){h[G>>3]=w;break}x=+h[64736+(aE*688&-1)>>3];if(x>w){h[G>>3]=x;aA=1;Y=6565;break L9057}else{h[G>>3]=w;break}}}while(0);G=c[M>>2]|0;w=y-k*((G|0)==1?1.1:1.0);I=c[J>>2]|0;F=64720+(I*688&-1)|0;if(w>+h[F>>3]){h[F>>3]=w;aF=c[M>>2]|0;aG=c[J>>2]|0}else{aF=G;aG=I}w=y-k*((aF|0)==1?1.1:1.0);I=64672+(aG*688&-1)|0;if(w<=+h[I>>3]){aH=0;aI=aG;Y=6566;break}if((c[64648+(aG*688&-1)>>2]&2|0)==0){aA=1;Y=6565;break}if((c[64732+(aG*688&-1)>>2]&2|0)==0){h[I>>3]=w;aA=0;Y=6565;break}x=+h[64760+(aG*688&-1)>>3];if(x>3]=x;aA=1;Y=6565;break}else{h[I>>3]=w;aA=0;Y=6565;break}}else{h[p+(d<<6)+48>>3]=-8.988465674311579e+307;aA=2;Y=6565}}while(0);if((Y|0)==6565){aH=aA;aI=c[J>>2]|0;Y=6566}if((Y|0)==6566){if((aI|0)==99){az=aH;break}else{aB=aI;aC=aH}}l=y+k*((c[M>>2]|0)==1?1.1:1.0);if(!(l>-8.988465674311579e+307&l<8.988465674311579e+307)){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;az=2;break}do{if((a[64788+(aB*688&-1)|0]&1)==0){h[p+(d<<6)+56>>3]=l}else{if(l<0.0){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;az=2;break L9055}if(l==0.0){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;az=1;break L9055}else{w=+_(+l);h[p+(d<<6)+56>>3]=w/+h[64800+(aB*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&(aC|0)==0)){az=aC;break}I=c[J>>2]|0;if((I|0)<0){az=0;break}G=c[M>>2]|0;l=y+k*((G|0)==1?1.1:1.0);F=64712+(I*688&-1)|0;if(l<+h[F>>3]){h[F>>3]=l;aJ=c[M>>2]|0;aK=c[J>>2]|0}else{aJ=G;aK=I}l=y+k*((aJ|0)==1?1.1:1.0);I=64664+(aK*688&-1)|0;do{if(l<+h[I>>3]){if((c[64648+(aK*688&-1)>>2]&1|0)==0){az=1;break L9055}if((c[64728+(aK*688&-1)>>2]&1|0)==0){h[I>>3]=l;break}w=+h[64736+(aK*688&-1)>>3];if(w>l){h[I>>3]=w;az=1;break L9055}else{h[I>>3]=l;break}}}while(0);I=c[M>>2]|0;l=y+k*((I|0)==1?1.1:1.0);G=c[J>>2]|0;F=64720+(G*688&-1)|0;if(l>+h[F>>3]){h[F>>3]=l;aL=c[M>>2]|0;aM=c[J>>2]|0}else{aL=I;aM=G}l=y+k*((aL|0)==1?1.1:1.0);G=64672+(aM*688&-1)|0;if(l<=+h[G>>3]){az=0;break}if((c[64648+(aM*688&-1)>>2]&2|0)==0){az=1;break}if((c[64732+(aM*688&-1)>>2]&2|0)==0){h[G>>3]=l;az=0;break}w=+h[64760+(aM*688&-1)>>3];if(w>3]=w;az=1;break}else{h[G>>3]=l;az=0;break}}}while(0);O=c[N>>2]|0;L9141:do{if((O|0)==99){aN=az}else{l=(A>D?A:D)*.5;G=b+272|0;w=z-l*((c[G>>2]|0)==2?1.0:1.4);L9143:do{if(w>-8.988465674311579e+307&w<8.988465674311579e+307){do{if((a[64788+(O*688&-1)|0]&1)==0){h[p+(d<<6)+32>>3]=w}else{if(w<0.0){h[p+(d<<6)+32>>3]=-8.988465674311579e+307;aO=2;Y=6626;break L9143}if(w==0.0){h[p+(d<<6)+32>>3]=-8.988465674311579e+307;aO=1;Y=6626;break L9143}else{x=+_(+w);h[p+(d<<6)+32>>3]=x/+h[64800+(O*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&(az|0)==0)){aO=az;Y=6626;break}I=c[N>>2]|0;if((I|0)<0){aP=I;aQ=0;break}F=c[G>>2]|0;x=z-l*((F|0)==2?1.0:1.4);q=64712+(I*688&-1)|0;if(x<+h[q>>3]){h[q>>3]=x;aR=c[G>>2]|0;aS=c[N>>2]|0}else{aR=F;aS=I}x=z-l*((aR|0)==2?1.0:1.4);I=64664+(aS*688&-1)|0;do{if(x<+h[I>>3]){if((c[64648+(aS*688&-1)>>2]&1|0)==0){aO=1;Y=6626;break L9143}if((c[64728+(aS*688&-1)>>2]&1|0)==0){h[I>>3]=x;break}K=+h[64736+(aS*688&-1)>>3];if(K>x){h[I>>3]=K;aO=1;Y=6626;break L9143}else{h[I>>3]=x;break}}}while(0);I=c[G>>2]|0;x=z-l*((I|0)==2?1.0:1.4);F=c[N>>2]|0;q=64720+(F*688&-1)|0;if(x>+h[q>>3]){h[q>>3]=x;aT=c[G>>2]|0;aU=c[N>>2]|0}else{aT=I;aU=F}x=z-l*((aT|0)==2?1.0:1.4);F=64672+(aU*688&-1)|0;if(x<=+h[F>>3]){aV=0;aW=aU;Y=6627;break}if((c[64648+(aU*688&-1)>>2]&2|0)==0){aO=1;Y=6626;break}if((c[64732+(aU*688&-1)>>2]&2|0)==0){h[F>>3]=x;aO=0;Y=6626;break}K=+h[64760+(aU*688&-1)>>3];if(K>3]=K;aO=1;Y=6626;break}else{h[F>>3]=x;aO=0;Y=6626;break}}else{h[p+(d<<6)+32>>3]=-8.988465674311579e+307;aO=2;Y=6626}}while(0);if((Y|0)==6626){aV=aO;aW=c[N>>2]|0;Y=6627}if((Y|0)==6627){if((aW|0)==99){aN=aV;break}else{aP=aW;aQ=aV}}w=z+l*((c[G>>2]|0)==2?1.0:1.4);if(!(w>-8.988465674311579e+307&w<8.988465674311579e+307)){h[p+(d<<6)+40>>3]=-8.988465674311579e+307;aN=2;break}do{if((a[64788+(aP*688&-1)|0]&1)==0){h[p+(d<<6)+40>>3]=w}else{if(w<0.0){h[p+(d<<6)+40>>3]=-8.988465674311579e+307;aN=2;break L9141}if(w==0.0){h[p+(d<<6)+40>>3]=-8.988465674311579e+307;aN=1;break L9141}else{k=+_(+w);h[p+(d<<6)+40>>3]=k/+h[64800+(aP*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&(aQ|0)==0)){aN=aQ;break}M=c[N>>2]|0;if((M|0)<0){aN=0;break}F=c[G>>2]|0;w=z+l*((F|0)==2?1.0:1.4);I=64712+(M*688&-1)|0;if(w<+h[I>>3]){h[I>>3]=w;aX=c[G>>2]|0;aY=c[N>>2]|0}else{aX=F;aY=M}w=z+l*((aX|0)==2?1.0:1.4);M=64664+(aY*688&-1)|0;do{if(w<+h[M>>3]){if((c[64648+(aY*688&-1)>>2]&1|0)==0){aN=1;break L9141}if((c[64728+(aY*688&-1)>>2]&1|0)==0){h[M>>3]=w;break}k=+h[64736+(aY*688&-1)>>3];if(k>w){h[M>>3]=k;aN=1;break L9141}else{h[M>>3]=w;break}}}while(0);M=c[G>>2]|0;w=z+l*((M|0)==2?1.0:1.4);F=c[N>>2]|0;I=64720+(F*688&-1)|0;if(w>+h[I>>3]){h[I>>3]=w;aZ=c[G>>2]|0;a_=c[N>>2]|0}else{aZ=M;a_=F}w=z+l*((aZ|0)==2?1.0:1.4);F=64672+(a_*688&-1)|0;if(w<=+h[F>>3]){aN=0;break}if((c[64648+(a_*688&-1)>>2]&2|0)==0){aN=1;break}if((c[64732+(a_*688&-1)>>2]&2|0)==0){h[F>>3]=w;aN=0;break}k=+h[64760+(a_*688&-1)>>3];if(k>3]=k;aN=1;break}else{h[F>>3]=w;aN=0;break}}}while(0);h[p+(d<<6)+48>>3]=A;h[p+(d<<6)+56>>3]=D;h[p+(d<<6)+32>>3]=C;W=aN}else{O=c[J>>2]|0;L8884:do{if((O|0)==99){a$=0}else{L8886:do{if(A>-8.988465674311579e+307&A<8.988465674311579e+307){do{if((a[64788+(O*688&-1)|0]&1)==0){h[p+(d<<6)+48>>3]=A}else{if(A<0.0){h[p+(d<<6)+48>>3]=-8.988465674311579e+307;a0=2;Y=6688;break L8886}if(A==0.0){h[p+(d<<6)+48>>3]=-8.988465674311579e+307;a0=1;Y=6688;break L8886}else{w=+_(+A);h[p+(d<<6)+48>>3]=w/+h[64800+(O*688&-1)>>3];break}}}while(0);if((a[b+23|0]&1)!=0){a0=0;Y=6688;break}F=c[J>>2]|0;if((F|0)<0){a1=F;a2=0;break}M=64712+(F*688&-1)|0;if(A<+h[M>>3]){h[M>>3]=A;a3=c[J>>2]|0}else{a3=F}F=64664+(a3*688&-1)|0;do{if(A<+h[F>>3]){if((c[64648+(a3*688&-1)>>2]&1|0)==0){a0=1;Y=6688;break L8886}if((c[64728+(a3*688&-1)>>2]&1|0)==0){h[F>>3]=A;break}w=+h[64736+(a3*688&-1)>>3];if(w>A){h[F>>3]=w;a0=1;Y=6688;break L8886}else{h[F>>3]=A;break}}}while(0);F=c[J>>2]|0;M=64720+(F*688&-1)|0;if(A>+h[M>>3]){h[M>>3]=A;a4=c[J>>2]|0}else{a4=F}F=64672+(a4*688&-1)|0;if(A<=+h[F>>3]){a5=0;a6=a4;Y=6689;break}if((c[64648+(a4*688&-1)>>2]&2|0)==0){a0=1;Y=6688;break}if((c[64732+(a4*688&-1)>>2]&2|0)==0){h[F>>3]=A;a0=0;Y=6688;break}w=+h[64760+(a4*688&-1)>>3];if(w>3]=w;a0=1;Y=6688;break}else{h[F>>3]=A;a0=0;Y=6688;break}}else{h[p+(d<<6)+48>>3]=-8.988465674311579e+307;a0=2;Y=6688}}while(0);if((Y|0)==6688){a5=a0;a6=c[J>>2]|0;Y=6689}if((Y|0)==6689){if((a6|0)==99){a$=a5;break}else{a1=a6;a2=a5}}if(!(D>-8.988465674311579e+307&D<8.988465674311579e+307)){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;a$=2;break}do{if((a[64788+(a1*688&-1)|0]&1)==0){h[p+(d<<6)+56>>3]=D}else{if(D<0.0){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;a$=2;break L8884}if(D==0.0){h[p+(d<<6)+56>>3]=-8.988465674311579e+307;a$=1;break L8884}else{l=+_(+D);h[p+(d<<6)+56>>3]=l/+h[64800+(a1*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&(a2|0)==0)){a$=a2;break}G=c[J>>2]|0;if((G|0)<0){a$=0;break}F=64712+(G*688&-1)|0;if(D<+h[F>>3]){h[F>>3]=D;a7=c[J>>2]|0}else{a7=G}G=64664+(a7*688&-1)|0;do{if(D<+h[G>>3]){if((c[64648+(a7*688&-1)>>2]&1|0)==0){a$=1;break L8884}if((c[64728+(a7*688&-1)>>2]&1|0)==0){h[G>>3]=D;break}l=+h[64736+(a7*688&-1)>>3];if(l>D){h[G>>3]=l;a$=1;break L8884}else{h[G>>3]=D;break}}}while(0);G=c[J>>2]|0;F=64720+(G*688&-1)|0;if(D>+h[F>>3]){h[F>>3]=D;a8=c[J>>2]|0}else{a8=G}G=64672+(a8*688&-1)|0;if(D<=+h[G>>3]){a$=0;break}if((c[64648+(a8*688&-1)>>2]&2|0)==0){a$=1;break}if((c[64732+(a8*688&-1)>>2]&2|0)==0){h[G>>3]=D;a$=0;break}l=+h[64760+(a8*688&-1)>>3];if(l>3]=l;a$=1;break}else{h[G>>3]=D;a$=0;break}}}while(0);O=c[N>>2]|0;if((O|0)==99){W=a$;break}L8971:do{if(C>-8.988465674311579e+307&C<8.988465674311579e+307){do{if((a[64788+(O*688&-1)|0]&1)==0){h[p+(d<<6)+32>>3]=C}else{if(C<0.0){h[p+(d<<6)+32>>3]=-8.988465674311579e+307;a9=2;Y=6749;break L8971}if(C==0.0){h[p+(d<<6)+32>>3]=-8.988465674311579e+307;a9=1;Y=6749;break L8971}else{l=+_(+C);h[p+(d<<6)+32>>3]=l/+h[64800+(O*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&(a$|0)==0)){a9=a$;Y=6749;break}G=c[N>>2]|0;if((G|0)<0){ba=G;bb=0;break}F=64712+(G*688&-1)|0;if(C<+h[F>>3]){h[F>>3]=C;bc=c[N>>2]|0}else{bc=G}G=64664+(bc*688&-1)|0;do{if(C<+h[G>>3]){if((c[64648+(bc*688&-1)>>2]&1|0)==0){a9=1;Y=6749;break L8971}if((c[64728+(bc*688&-1)>>2]&1|0)==0){h[G>>3]=C;break}l=+h[64736+(bc*688&-1)>>3];if(l>C){h[G>>3]=l;a9=1;Y=6749;break L8971}else{h[G>>3]=C;break}}}while(0);G=c[N>>2]|0;F=64720+(G*688&-1)|0;if(C>+h[F>>3]){h[F>>3]=C;bd=c[N>>2]|0}else{bd=G}G=64672+(bd*688&-1)|0;if(C<=+h[G>>3]){be=0;bf=bd;Y=6750;break}if((c[64648+(bd*688&-1)>>2]&2|0)==0){a9=1;Y=6749;break}if((c[64732+(bd*688&-1)>>2]&2|0)==0){h[G>>3]=C;a9=0;Y=6749;break}l=+h[64760+(bd*688&-1)>>3];if(l>3]=l;a9=1;Y=6749;break}else{h[G>>3]=C;a9=0;Y=6749;break}}else{h[p+(d<<6)+32>>3]=-8.988465674311579e+307;a9=2;Y=6749}}while(0);if((Y|0)==6749){be=a9;bf=c[N>>2]|0;Y=6750}if((Y|0)==6750){if((bf|0)==99){W=be;break}else{ba=bf;bb=be}}if(!(B>-8.988465674311579e+307&B<8.988465674311579e+307)){h[p+(d<<6)+40>>3]=-8.988465674311579e+307;W=2;break}do{if((a[64788+(ba*688&-1)|0]&1)==0){h[p+(d<<6)+40>>3]=B}else{if(B<0.0){h[p+(d<<6)+40>>3]=-8.988465674311579e+307;W=2;break L8579}if(B==0.0){h[p+(d<<6)+40>>3]=-8.988465674311579e+307;W=1;break L8579}else{l=+_(+B);h[p+(d<<6)+40>>3]=l/+h[64800+(ba*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&(bb|0)==0)){W=bb;break}O=c[N>>2]|0;if((O|0)<0){W=0;break}G=64712+(O*688&-1)|0;if(B<+h[G>>3]){h[G>>3]=B;bg=c[N>>2]|0}else{bg=O}O=64664+(bg*688&-1)|0;do{if(B<+h[O>>3]){if((c[64648+(bg*688&-1)>>2]&1|0)==0){W=1;break L8579}if((c[64728+(bg*688&-1)>>2]&1|0)==0){h[O>>3]=B;break}l=+h[64736+(bg*688&-1)>>3];if(l>B){h[O>>3]=l;W=1;break L8579}else{h[O>>3]=B;break}}}while(0);O=c[N>>2]|0;G=64720+(O*688&-1)|0;if(B>+h[G>>3]){h[G>>3]=B;bh=c[N>>2]|0}else{bh=O}O=64672+(bh*688&-1)|0;if(B<=+h[O>>3]){W=0;break}if((c[64648+(bh*688&-1)>>2]&2|0)==0){W=1;break}if((c[64732+(bh*688&-1)>>2]&2|0)==0){h[O>>3]=B;W=0;break}l=+h[64760+(bh*688&-1)>>3];if(l>3]=l;W=1;break}else{h[O>>3]=B;W=0;break}}}while(0);bh=b+312|0;N=c[bh>>2]|0;L9228:do{if((N|0)==99){h[p+(d<<6)+24>>3]=m;bi=W}else{if(!(m>-8.988465674311579e+307&m<8.988465674311579e+307)){h[p+(d<<6)+24>>3]=-8.988465674311579e+307;bi=2;break}do{if((a[64788+(N*688&-1)|0]&1)==0){h[p+(d<<6)+24>>3]=m}else{if(m<0.0){h[p+(d<<6)+24>>3]=-8.988465674311579e+307;bi=2;break L9228}if(m==0.0){h[p+(d<<6)+24>>3]=-8.988465674311579e+307;bi=1;break L9228}else{B=+_(+m);h[p+(d<<6)+24>>3]=B/+h[64800+(N*688&-1)>>3];break}}}while(0);if(!((a[b+23|0]&1)==0&(W|0)==0)){bi=W;break}bg=c[bh>>2]|0;if((bg|0)<0){bi=0;break}bb=64712+(bg*688&-1)|0;if(+h[bb>>3]>m){h[bb>>3]=m;bj=c[bh>>2]|0}else{bj=bg}bg=64664+(bj*688&-1)|0;do{if(+h[bg>>3]>m){if((c[64648+(bj*688&-1)>>2]&1|0)==0){bi=1;break L9228}if((c[64728+(bj*688&-1)>>2]&1|0)==0){h[bg>>3]=m;break}B=+h[64736+(bj*688&-1)>>3];if(B>m){h[bg>>3]=B;bi=1;break L9228}else{h[bg>>3]=m;break}}}while(0);bg=c[bh>>2]|0;bb=64720+(bg*688&-1)|0;if(+h[bb>>3]>3]=m;bk=c[bh>>2]|0}else{bk=bg}bg=64672+(bk*688&-1)|0;if(+h[bg>>3]>=m){bi=0;break}if((c[64648+(bk*688&-1)>>2]&2|0)==0){bi=1;break}if((c[64732+(bk*688&-1)>>2]&2|0)==0){h[bg>>3]=m;bi=0;break}B=+h[64760+(bk*688&-1)>>3];if(B>3]=B;bi=1;break}else{h[bg>>3]=m;bi=0;break}}}while(0);if((c[b+64>>2]|0)!=6){i=n;return}bk=b+316|0;bh=c[bk>>2]|0;if((bh|0)==0){i=n;return}bj=bh+(d<<3)|0;m=+h[bj>>3];if(!(m>-8.988465674311579e+307&m<8.988465674311579e+307)){i=n;return}do{if((a[66852]&1)==0){bl=m}else{if(m<0.0){i=n;return}if(m!=0.0){B=+_(+m);bl=B/+h[8358];break}h[bj>>3]=-8.988465674311579e+307;i=n;return}}while(0);h[bj>>3]=bl;if(!((a[b+23|0]&1)==0&(bi|0)==0)){i=n;return}bl=+h[(c[bk>>2]|0)+(d<<3)>>3];if(bl<+h[8347]){h[8347]=bl;bm=+h[(c[bk>>2]|0)+(d<<3)>>3]}else{bm=bl}do{if(bm<+h[8341]){if((c[16678]&1|0)==0){i=n;return}if((c[16698]&1|0)==0){h[8341]=bm;break}bl=+h[8350];if(bl<=bm){h[8341]=bm;break}h[8341]=bl;i=n;return}}while(0);bm=+h[(c[bk>>2]|0)+(d<<3)>>3];if(bm>+h[8348]){h[8348]=bm;bn=+h[(c[bk>>2]|0)+(d<<3)>>3]}else{bn=bm}if(bn<=+h[8342]){i=n;return}if((c[16678]&2|0)==0){i=n;return}if((c[16699]&2|0)==0){h[8342]=bn;i=n;return}bm=+h[8353];if(bm>2]|0;d=c[b+16>>2]|0;if((d|0)!=0){uu(d)}d=b+256|0;e=c[d>>2]|0;if((e|0)!=0){f=e;while(1){e=c[f>>2]|0;uu(c[f+4>>2]|0);uu(c[d>>2]|0);c[d>>2]=e;if((e|0)==0){break}else{f=e}}}f=b+260|0;d=c[f>>2]|0;if((d|0)!=0){e=d;while(1){d=c[e>>2]|0;g=c[e+12>>2]|0;if((g|0)!=0){uu(g)}uu(e);c[f>>2]=d;if((d|0)==0){break}else{e=d}}}e=b+224|0;f=c[e>>2]|0;if((f|0)!=0){d=c[f+64>>2]|0;if((d|0)==0){h=f}else{uu(d);h=f}while(1){f=c[h+60>>2]|0;if((f|0)!=0){uu(f)}f=c[h+64>>2]|0;if(!((f|0)==0|(f|0)==(d|0))){uu(f)}f=c[h>>2]|0;uu(h);if((f|0)==0){break}else{h=f}}c[e>>2]=0}uu(b);if((a|0)==0){break}else{b=a}}return}function iZ(){var d=0,e=0,f=0,j=0,k=0.0,l=0.0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0,s=0.0,t=0.0,u=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0.0,D=0.0,E=0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0,M=0,N=0,O=0,P=0;d=i;i=i+24|0;e=d|0;a[37384]=1;do{if((c[5094]|0)==1){if(a[20368]|0){break}a[20368]=1;g[5090]=+g[3538];g[5088]=+g[3536];g[5086]=+g[3534];g[3538]=180.0;g[3536]=0.0;g[3534]=1.2999999523162842;c[16336]=c[16336]^2;c[17024]=c[17024]^2}}while(0);f=a[32936]&1;do{if(f<<24>>24!=0){if((aY(24544,175824)|0)!=0){break}b[12272]=117;w=118;a[24595]=w&255;w=w>>8;a[24596|0]=w&255}}while(0);j=c[16507]|0;c[16506]=j;if((j&3|0)==0){k=+h[8258];l=+h[8257];if(k>3];if((a[66164]&1)==0){q=0.0}else{q=+_(+(+h[8271]))}h[8272]=q;h[8261]=8.988465674311579e+307;h[8262]=-8.988465674311579e+307;m=c[16335]|0;c[16334]=m;if((m&3|0)==0){q=+h[8172];n=+h[8171];if(q>3];if((a[65476]&1)==0){u=0.0}else{u=+_(+(+h[8185]))}h[8186]=u;h[8175]=8.988465674311579e+307;h[8176]=-8.988465674311579e+307;r=c[16163]|0;c[16162]=r;do{if((r&3|0)==0){u=+h[8086];s=+h[8085];if(u>=s){x=s;y=u;p=6902;break}h[8083]=u;z=s}else{x=+h[8085];y=+h[8086];p=6902}}while(0);if((p|0)==6902){h[8083]=(r&1|0)==0?x:8.988465674311579e+307;z=(r&2|0)==0?y:-8.988465674311579e+307}h[8084]=z;if((a[64788]&1)==0){A=0.0}else{A=+_(+(+h[8099]))}h[8100]=A;h[8089]=8.988465674311579e+307;h[8090]=-8.988465674311579e+307;r=c[17711]|0;c[17710]=r;if((r&3|0)==0){A=+h[8860];z=+h[8859];if(A>3];a[70980]=0;h[8873]=1.0;h[8874]=0.0;h[8863]=8.988465674311579e+307;h[8864]=-8.988465674311579e+307;B=c[17883]|0;c[17882]=B;if((B&3|0)==0){C=+h[8946];D=+h[8945];if(C>3];a[71668]=0;h[8959]=1.0;h[8960]=0.0;h[8949]=8.988465674311579e+307;h[8950]=-8.988465674311579e+307;E=c[16679]|0;c[16678]=E;do{if((E&3|0)==0){F=+h[8344];G=+h[8343];if(F>=G){H=G;I=F;p=6917;break}h[8341]=F;J=G}else{H=+h[8343];I=+h[8344];p=6917}}while(0);if((p|0)==6917){h[8341]=(E&1|0)==0?H:8.988465674311579e+307;J=(E&2|0)==0?I:-8.988465674311579e+307}h[8342]=J;if((a[66852]&1)==0){K=0.0}else{K=+_(+(+h[8357]))}h[8358]=K;h[8347]=8.988465674311579e+307;h[8348]=-8.988465674311579e+307;if((c[3524]|0)==0){uf(c[13898]|0,135392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}E=f<<24>>24!=0;f=E?10:1;B=dr(E?9:2,-1)|0;do{if((c[5094]|0)==1){if((a[32936]&1)!=0){break}if(!(a[20368]|0)){break}a[20368]=0;g[3538]=+g[5090];g[3536]=+g[5088];g[3534]=+g[5086];c[16336]=c[16336]^2;c[17024]=c[17024]^2}}while(0);E=dr(f,-1)|0;f=a[32936]|0;do{if((c[5094]|0)==1){if((f&1)!=0){break}if(a[20368]|0){break}a[20368]=1;g[5090]=+g[3538];g[5088]=+g[3536];g[5086]=+g[3534];g[3538]=180.0;g[3536]=0.0;g[3534]=1.2999999523162842;c[16336]=c[16336]^2;c[17024]=c[17024]^2}}while(0);do{if((f&1)!=0){dq(2);do{if((c[5094]|0)==1){if(!(a[20368]|0)){break}a[20368]=0;g[3538]=+g[5090];g[3536]=+g[5088];g[3534]=+g[5086];c[16336]=c[16336]^2;c[17024]=c[17024]^2}}while(0);dq(1);if((c[5094]|0)!=1){break}if(a[20368]|0){break}a[20368]=1;g[5090]=+g[3538];g[5088]=+g[3536];g[5086]=+g[3534];g[3538]=180.0;g[3536]=0.0;g[3534]=1.2999999523162842;c[16336]=c[16336]^2;c[17024]=c[17024]^2}}while(0);dq(0);do{if((c[16506]&3|0)==0){K=+h[8256];J=+h[8255];if(K>=J){p=6940;break}h[8255]=K;h[8256]=J;L=1}else{p=6940}}while(0);if((p|0)==6940){L=(c[16508]|0)>>>1&1}a[66036]=L;do{if((c[16334]&3|0)==0){J=+h[8170];K=+h[8169];if(J>=K){p=6944;break}h[8169]=J;h[8170]=K;M=1}else{p=6944}}while(0);if((p|0)==6944){M=(c[16336]|0)>>>1&1}a[65348]=M;do{if((c[16162]&3|0)==0){K=+h[8084];J=+h[8083];if(K>=J){p=6948;break}h[8083]=K;h[8084]=J;N=1}else{p=6948}}while(0);if((p|0)==6948){N=(c[16164]|0)>>>1&1}a[64660]=N;N=e;M=e+16|0;L=0;do{f=64944+(L*688&-1)|0;r=c[f>>2]|0;if((r|0)==0){p=6957}else{c[N>>2]=c[7254];c[N+4>>2]=c[7255];c[N+8>>2]=c[7256];c[N+12>>2]=c[7257];c[N+16>>2]=c[7258];c[N+20>>2]=c[7259];m=e;j=r;L9464:while(1){r=j;while(1){if((c[r+12>>2]|0)>=0){break}uu(c[r+8>>2]|0);O=c[r+16>>2]|0;uu(r);if((O|0)==0){P=m;break L9464}else{r=O}}c[m+16>>2]=r;O=c[r+16>>2]|0;if((O|0)==0){P=r;break}else{m=r;j=O}}c[P+16>>2]=0;j=c[M>>2]|0;c[f>>2]=j;if((j|0)==0){p=6957}}do{if((p|0)==6957){p=0;j=64920+(L*688&-1)|0;if((c[j>>2]|0)!=3){break}c[j>>2]=1}}while(0);L=L+1|0;}while(L>>>0<11);if((B|0)>-1){L=c[1054]|0;p=c[L+(B*40&-1)+36>>2]|0;M=(p|0)>49?49:p;p=c[10036]|0;P=c[L+(B*40&-1)+32>>2]|0;B=0;while(1){L=B+1|0;a[B+55600|0]=a[p+P|0]|0;if((L|0)==(M|0)){break}else{P=P+1|0;B=L}}a[M+55600|0]=0}else{uB(55600,24544)}if((E|0)<=-1){uB(55651,24595);i_();i=d;return}M=c[1054]|0;B=c[M+(E*40&-1)+36>>2]|0;P=(B|0)>49?49:B;B=c[10036]|0;p=c[M+(E*40&-1)+32>>2]|0;E=0;while(1){M=E+1|0;a[E+55651|0]=a[B+p|0]|0;if((M|0)==(P|0)){break}else{p=p+1|0;E=M}}a[P+55651|0]=0;i_();i=d;return}function i_(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,U=0,V=0,W=0,X=0,Y=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0,bz=0,bB=0,bC=0,bD=0,bE=0,bF=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bL=0,bM=0,bN=0,bO=0,bQ=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0,b3=0,b4=0,b5=0,b6=0,b7=0,b8=0,b9=0,ca=0,cb=0,cc=0,cd=0,ce=0,cf=0,cg=0,ch=0,ci=0,cj=0,ck=0,cl=0,cm=0,cn=0,co=0,cp=0,cq=0,cr=0,cs=0,ct=0,cu=0,cv=0,cw=0,cx=0,cy=0,cz=0,cA=0,cB=0,cC=0,cD=0,cE=0,cF=0,cG=0,cH=0.0,cI=0,cJ=0,cK=0,cL=0,cM=0,cN=0,cO=0.0,cP=0,cQ=0,cR=0.0,cS=0.0,cT=0.0,cU=0.0,cV=0,cW=0.0,cX=0.0,cY=0.0,cZ=0.0,c_=0.0,c$=0.0,c0=0,c1=0.0,c2=0,c3=0.0,c4=0,c5=0.0,c6=0,c7=0.0,c8=0.0,c9=0.0,da=0.0,de=0,df=0.0,dg=0.0,dh=0,di=0,dj=0.0,dl=0.0,dm=0.0,dn=0.0,dp=0.0,dq=0.0,dr=0.0,ds=0.0,dt=0.0,du=0.0,dv=0.0,dw=0.0,dx=0.0,dy=0.0,dz=0.0,dA=0.0,dB=0.0,dC=0.0,dD=0,dE=0,dF=0,dG=0,dH=0,dI=0,dJ=0,dK=0,dL=0,dM=0,dN=0.0,dO=0,dP=0,dQ=0,dR=0,dS=0,dU=0,dV=0,dW=0,dX=0,dY=0,dZ=0,d_=0.0,d$=0.0,d0=0.0,d1=0.0,d2=0,d3=0.0,d4=0.0,d5=0.0,d6=0.0,d7=0.0,d8=0.0,d9=0.0,ea=0.0,eb=0.0,ec=0.0,ed=0.0,ee=0.0,ef=0,eg=0.0,eh=0,ei=0,ej=0,ek=0,el=0,em=0,en=0,eo=0,eq=0,er=0,es=0,et=0,eu=0,ev=0,ew=0,ex=0,eA=0,eB=0,eD=0,eE=0,eF=0,eG=0,eH=0,eI=0,eJ=0,eK=0,eN=0,eO=0,eP=0,eQ=0,eR=0,eS=0,eT=0,eU=0,eV=0,eW=0.0,eX=0.0,eY=0.0,eZ=0.0,e_=0,e$=0,e0=0,e1=0,e2=0,e3=0,e4=0,e5=0,e8=0,e9=0,fa=0,fb=0,fc=0,fd=0,fe=0,ff=0,fg=0,fh=0,fi=0,fj=0,fk=0.0,fl=0,fm=0,fn=0.0;b=i;i=i+272|0;d=b|0;e=b+32|0;f=b+40|0;g=b+128|0;j=b+152|0;k=b+200|0;l=b+256|0;n=b+264|0;o=c[10828]|0;if((o|0)!=0&(c[7952]|0)>0){iY(o)}c[7952]=0;c[10828]=0;c[200]=2;c[144]=1;c[34]=0;a[872]=0;o=c[13898]|0;c[7774]=iw()|0;p=c[13898]|0;if((p|0)>=(c[8272]|0)){q=p;uf(q,105216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}r=b+96|0;s=k;t=k+4|0;u=k+16|0;w=k+24|0;x=k+8|0;y=k|0;z=k+40|0;A=k+44|0;B=k+32|0;C=g|0;D=j|0;E=j+8|0;F=f|0;G=f+8|0;H=f+16|0;I=f+24|0;J=f+32|0;K=f+40|0;L=f+48|0;f=b+8|0;M=b+176|0;N=0;O=0;U=0;V=0;W=0;X=0;Y=0;$=0;ab=0;ac=0;ad=43312;ae=p;L9498:while(1){p=(V|0)==0;af=Y;ag=ac;ah=ae;while(1){ai=c[1054]|0;L9502:do{if((a[ai+(ah*40&-1)|0]&1)!=0){aj=c[ai+(ah*40&-1)+36>>2]|0;ak=ai+(ah*40&-1)+32|0;al=c[10036]|0;am=0;while(1){if((am|0)>=(aj|0)){break}if((a[al+((c[ak>>2]|0)+am|0)|0]|0)==(a[am+103664|0]|0)){am=am+1|0}else{break L9502}}if((am|0)==1){an=af;ao=ag;ap=N;aq=V;ar=$;as=ab;at=ah;au=6983;break L9498}}}while(0);if(p){av=af?ag:ah}else{av=ag}if((t9(ah)|0)==0){au=6995;break}dT();ai=c[13898]|0;ak=(c[8272]|0)>(ai|0);if(!ak){an=1;ao=av;ap=N;aq=V;ar=$;as=ab;at=ai;au=6983;break L9498}al=c[1054]|0;if((a[al+(ai*40&-1)|0]&1)==0){af=1;ag=av;ah=ai;continue}aj=c[al+(ai*40&-1)+36>>2]|0;aw=al+(ai*40&-1)+32|0;al=c[10036]|0;ax=0;while(1){if((ax|0)>=(aj|0)){au=6994;break}if((a[al+((c[aw>>2]|0)+ax|0)|0]|0)==(a[ax+148464|0]|0)){ax=ax+1|0}else{break}}if((au|0)==6994){au=0;if((ax|0)==1){ay=ad;az=av;aA=ab;aB=$;aC=af;aD=X;aE=W;aF=V;aG=U;aH=O;aJ=N;break}}if(ak){af=1;ag=av;ah=ai}else{an=1;ao=av;ap=N;aq=V;ar=$;as=ab;at=ai;au=6983;break L9498}}do{if((au|0)==6995){au=0;if(af){aK=av}else{aK=(a[32936]&1)==0|p?c[13898]|0:av}c[11670]=31112;ah=iu(0)|0;c[11670]=0;if((ah|0)==0){ag=N+1|0;if((a[32936]&1)==0){aL=V}else{aL=(V+2|0)%3&-1}aw=c[ad>>2]|0;al=(a[38984]&1)==0;L9562:do{if((aw|0)==0){if(al){aM=i0(c[6352]|0,c[9344]|0,c[6350]|0,c[9342]|0)|0}else{aM=i0(c[9344]|0,0,0,c[9342]|0)|0}c[ad>>2]=aM;aN=aM}else{if(!al){aj=c[9344]|0;aO=c[9342]|0;aP=aw+260|0;aQ=c[aP>>2]|0;if((aQ|0)!=0){aR=aQ;while(1){aQ=c[aR>>2]|0;if((aR|0)!=0){aS=c[aR+12>>2]|0;if((aS|0)!=0){uu(aS)}uu(aR)}if((aQ|0)==0){break}else{aR=aQ}}}c[aP>>2]=0;if((aO|0)>0&(aj|0)>0){aR=0;while(1){am=hu(aj)|0;c[am>>2]=c[aP>>2];c[aP>>2]=am;am=aR+1|0;if((am|0)<(aO|0)){aR=am}else{aN=aw;break L9562}}}else{c[aP>>2]=0;aN=aw;break}}aR=c[6352]|0;aO=c[9344]|0;aj=c[6350]|0;am=c[9342]|0;aQ=aw+260|0;aS=c[aQ>>2]|0;if((aS|0)!=0){aT=aS;while(1){aS=c[aT>>2]|0;if((aT|0)!=0){aU=c[aT+12>>2]|0;if((aU|0)!=0){uu(aU)}uu(aT)}if((aS|0)==0){break}else{aT=aS}}}c[aQ>>2]=0;if(!((am|0)>0&(aR|0)>0)){c[aQ>>2]=0;aN=aw;break}if((aO|0)>0){aT=0;while(1){aP=hu(aj)|0;c[aP>>2]=c[aQ>>2];c[aQ>>2]=aP;aP=aT+1|0;if((aP|0)<(aO|0)){aT=aP}else{aV=0;break}}}else{aV=0}while(1){aT=hu(aR)|0;c[aT>>2]=c[aQ>>2];c[aQ>>2]=aT;aT=aV+1|0;if((aT|0)<(am|0)){aV=aT}else{aN=aw;break}}}}while(0);c[aN+8>>2]=2;c[aN+244>>2]=1;c[aN+12>>2]=c[10058];c[aN+252>>2]=c[9342];aW=(c[13898]|0)-1|0;aX=ab;aZ=1;a_=aL;a$=aN;a0=ag}else{if(!((a[32936]&1)==0|p)){au=6999;break L9498}do{if(!ab){aw=c[16506]|0;if((aw&1|0)!=0){h[8255]=8.988465674311579e+307}if((aw&2|0)!=0){h[8256]=-8.988465674311579e+307}aw=c[16334]|0;if((aw&1|0)!=0){h[8169]=8.988465674311579e+307}if((aw&2|0)==0){break}h[8170]=-8.988465674311579e+307}}while(0);ag=c[ad>>2]|0;if((ag|0)==0){uE(M|0,0,24);aw=ut(272)|0;if((aw|0)==0){gk();al=ut(272)|0;if((al|0)==0){au=7012;break L9498}else{a1=al}}else{a1=aw}aw=a1;uE(a1|0,0,272);c[a1+28>>2]=-2;al=a1+32|0;c[al>>2]=0;c[al+4>>2]=0;h[a1+40>>3]=1.0;h[a1+48>>3]=-2.0;al=a1+56|0;c[al>>2]=c[M>>2];c[al+4>>2]=c[M+4>>2];c[al+8>>2]=c[M+8>>2];c[al+12>>2]=c[M+12>>2];c[al+16>>2]=c[M+16>>2];c[al+20>>2]=c[M+20>>2];c[a1+80>>2]=-1;c[a1+84>>2]=0;al=a1+88|0;c[al>>2]=c[12872];c[al+4>>2]=c[12873];c[al+8>>2]=c[12874];c[al+12>>2]=c[12875];c[al+16>>2]=c[12876];c[al+20>>2]=c[12877];c[al+24>>2]=c[12878];c[al+28>>2]=c[12879];c[al+32>>2]=c[12880];c[al+36>>2]=c[12881];c[al+40>>2]=c[12882];c[al+44>>2]=c[12883];c[al+48>>2]=c[12884];c[al+52>>2]=c[12885];c[a1+144>>2]=1;h[a1+152>>3]=0.0;c[a1+160>>2]=0;h[a1+168>>3]=15.0;h[a1+176>>3]=90.0;c[a1+184>>2]=0;c[ad>>2]=aw;a2=aw}else{a2=ag}c[a2+8>>2]=3;c[a2+12>>2]=c[12890];c[11856]=2;ag=ey(ah,7,a2)|0;if((a[47584]&1)!=0){c[a2+244>>2]=1}aw=(c[13898]|0)-1|0;c[a2+4>>2]=aw;al=c[7774]|0;if((al|0)==0){a3=0}else{a3=c[al+32>>2]|0}c[a2+248>>2]=a3;if((ag|0)<3){if((c[16546]|0)==1){au=7020;break L9498}if((c[16374]|0)==1){au=7022;break L9498}}c[12210]=2;c[12211]=1;c[12212]=0;aW=aw;aX=1;aZ=$;a_=V;a$=a2;a0=N}a4=a$+16|0;aw=c[a4>>2]|0;if((aw|0)!=0){uu(aw);c[a4>>2]=0}aw=a$+24|0;ag=a$+56|0;a[ag]=0;al=a$+28|0;c[al>>2]=X;ai=a$+32|0;c[ai>>2]=W;ak=a$+240|0;c[ak>>2]=X;ax=X+1|0;do{if((a[30080]&1)==0){am=aw|0;aQ=c[am>>2]|0;aR=c[8798]|0;aT=(aR|0)>0;aO=ax;L9612:while(1){aj=43264;while(1){a5=c[aj>>2]|0;if((a5|0)==0){break}if((c[a5+4>>2]|0)==(aO|0)){break L9612}else{aj=a5|0}}a6=aO-1|0;if(!((aO|0)>(aR|0)&aT)){au=7067;break}aO=((a6|0)%(aR|0)&-1)+1|0}if((au|0)==7067){au=0;c[al>>2]=a6;c[a$+64>>2]=1;c[a$+68>>2]=a6;c[ai>>2]=a6;break}aR=aw;aT=a5+8|0;c[aR>>2]=c[aT>>2];c[aR+4>>2]=c[aT+4>>2];c[aR+8>>2]=c[aT+8>>2];c[aR+12>>2]=c[aT+12>>2];c[aR+16>>2]=c[aT+16>>2];c[aR+20>>2]=c[aT+20>>2];c[aR+24>>2]=c[aT+24>>2];c[aR+28>>2]=c[aT+28>>2];c[aR+32>>2]=c[aT+32>>2];c[aR+36>>2]=c[aT+36>>2];c[aR+40>>2]=c[aT+40>>2];c[aR+44>>2]=c[aT+44>>2];c[aR+48>>2]=c[aT+48>>2];c[aR+52>>2]=c[aT+52>>2];c[am>>2]=aQ;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[al>>2]=aO;a[ag]=0;break}if((a[ag]&1)!=0){break}c[a$+64>>2]=1;c[a$+68>>2]=c[al>>2]}else{lK(aw,ax)}}while(0);ah=a$+12|0;aT=a$+224|0;aR=a$+80|0;aj=a$+88|0;aP=aw;aS=aj;aU=a$+80|0;a7=a$+84|0;a8=a$+144|0;a9=a$+152|0;ba=a$+160|0;bb=a$+168|0;bc=a$+176|0;bd=a$+184|0;be=aj|0;aj=a$+92|0;bf=a$+128|0;bg=a$+132|0;bh=a$+96|0;bi=a$+120|0;bj=a$+238|0;bk=a$+237|0;bl=a$+236|0;bm=a$+8|0;bn=a$+232|0;bo=a$+264|0;bp=a$+22|0;bq=(U|0)==0;br=(O|0)==0;bs=a$+20|0;bt=a$;bu=(a_|0)==0;bv=0;bw=0;bx=0;by=0;bz=0;L9627:while(1){bB=c[13898]|0;bC=c[8272]|0;L9629:do{if((bB|0)<(bC|0)){bD=c[1054]|0;bE=a[bD+(bB*40&-1)|0]|0;if((bE&1)==0){bF=bD;bG=bE;break}bH=c[bD+(bB*40&-1)+36>>2]|0;bI=bD+(bB*40&-1)+32|0;bJ=c[10036]|0;bK=0;while(1){if((bK|0)>=(bH|0)){break}if((a[bJ+((c[bI>>2]|0)+bK|0)|0]|0)==(a[bK+103664|0]|0)){bK=bK+1|0}else{bF=bD;bG=bE;break L9629}}if((bK|0)!=1|bw^1){bF=bD;bG=bE}else{break L9627}}else{if(bw){break L9627}bI=c[1054]|0;bF=bI;bG=a[bI+(bB*40&-1)|0]|0}}while(0);aO=c[bF+(bB*40&-1)+36>>2]|0;aQ=c[bF+(bB*40&-1)+32>>2]|0;am=(bG&1)==0;L9639:do{if((aO|0)>0&(am^1)){bI=c[10036]|0;bJ=0;bH=0;bL=aQ;while(1){if((a[bJ+224032|0]|0)==(a[bI+(bJ+bL|0)|0]|0)){bM=bL;bN=bH}else{if((bJ|0)!=1){break}bM=bL-1|0;bN=1}bO=bJ+1|0;if((bO|0)<(bN+aO|0)){bJ=bO;bH=bN;bL=bM}else{au=7083;break}}do{if((au|0)==7083){au=0;if((bN|0)==0){if(!((bJ|0)==0|(bJ|0)==5)){break}}if(bz){bQ=bB;au=8109;break L9498}a[bs]=a[36231]&1^1;do{if((a[32936]&1)!=0){if(!bu){au=7088;break L9498}if(!bq){a[U]=0}if(br){break}a[O]=0}}while(0);bR=(c[13898]|0)+1|0;c[13898]=bR;bL=c[1054]|0;bH=c[bL+(bR*40&-1)+36>>2]|0;bI=c[bL+(bR*40&-1)+32>>2]|0;bE=(a[bL+(bR*40&-1)|0]&1)==0;L9661:do{if((bH|0)>0&(bE^1)){bL=c[10036]|0;bD=0;bK=0;bO=bI;while(1){if((a[bD+137208|0]|0)==(a[bL+(bD+bO|0)|0]|0)){bS=bO;bT=bK}else{if((bD|0)!=3){break L9661}bS=bO-1|0;bT=1}bU=bD+1|0;if((bU|0)<(bT+bH|0)){bD=bU;bK=bT;bO=bS}else{break}}if((bT|0)==0){if(!((bD|0)==2|(bD|0)==12)){break}}eM(bt);bv=bv;bw=bw;bx=bx;by=by;bz=1;continue L9627}}while(0);if((bR|0)>=(c[8272]|0)){au=7110;break L9498}L9675:do{if(!bE){bO=c[10036]|0;bK=0;while(1){if((bK|0)>=(bH|0)){break}if((a[bO+(bI+bK|0)|0]|0)==(a[bK+103664|0]|0)){bK=bK+1|0}else{break L9675}}if((bK|0)==1){au=7110;break L9498}}}while(0);a[14176]=1;is(j);a[14176]=0;if((c[D>>2]|0)!=3){au=7109;break L9498}bI=c[E>>2]|0;c[a4>>2]=bI;if((bI|0)==0){au=8108;break L9498}else{bv=bv;bw=bw;bx=bx;by=by;bz=1;continue L9627}}}while(0);if(am){break}L9685:do{if((aO|0)>0){bJ=c[10036]|0;bI=0;bH=0;bE=aQ;while(1){if((a[bI+202e3|0]|0)==(a[bJ+(bI+bE|0)|0]|0)){bV=bE;bW=bH}else{if((bI|0)!=3){break L9685}bV=bE-1|0;bW=1}bO=bI+1|0;if((bO|0)<(bW+aO|0)){bI=bO;bH=bW;bE=bV}else{break}}if((bW|0)==0){if(!((bI|0)==2|(bI|0)==7)){break}}if(bz){bQ=bB;au=8110;break L9498}bE=bB+1|0;c[13898]=bE;bH=(a[bF+(bE*40&-1)|0]&1)==0;if(bH){au=7125}else{bJ=c[10036]|0;bO=a[bJ+(c[bF+(bE*40&-1)+32>>2]|0)|0]|0;if((bO<<24>>24|0)==39|(bO<<24>>24|0)==34){bX=bJ;au=7135}else{au=7125}}L9700:do{if((au|0)==7125){au=0;bJ=c[10810]|0;if((bJ|0)==0){break}bO=bF+(bE*40&-1)+36|0;bD=bF+(bE*40&-1)+32|0;bL=c[10036]|0;bU=bJ;L9703:while(1){bJ=c[bU+4>>2]|0;L9705:do{if(!((bC|0)<=(bE|0)|bH)){bY=c[bO>>2]|0;bZ=0;while(1){if((bZ|0)>=(bY|0)){break}if((a[bL+((c[bD>>2]|0)+bZ|0)|0]|0)==(a[bJ+bZ|0]|0)){bZ=bZ+1|0}else{break L9705}}if((a[bJ+bZ|0]|0)==0){break L9703}}}while(0);bJ=c[bU>>2]|0;if((bJ|0)==0){break L9700}else{bU=bJ}}if((a[bU+8|0]&1)!=0){break}if((c[bU+16>>2]|0)==3){bX=bL;au=7135}}}while(0);L9714:do{if((au|0)==7135){au=0;if((bE|0)>=(bC|0)){break}L9717:do{if(!bH){bI=c[bF+(bE*40&-1)+36>>2]|0;bD=bF+(bE*40&-1)+32|0;bO=0;while(1){if((bO|0)>=(bI|0)){break}if((a[bX+((c[bD>>2]|0)+bO|0)|0]|0)==(a[bO+103664|0]|0)){bO=bO+1|0}else{break L9717}}if((bO|0)==1){break L9714}}}while(0);a[14176]=1;is(g);a[14176]=0;if((c[C>>2]|0)==3){break}c[13898]=bE}}while(0);a[bp]=1;if(!bq){a[U]=0}if(br){bv=bv;bw=bw;bx=bx;by=by;bz=1;continue L9627}a[O]=0;bv=bv;bw=bw;bx=bx;by=by;bz=1;continue L9627}}while(0);if(!((aO|0)>0&(am^1))){break}bE=c[10036]|0;bH=0;bL=0;bU=aQ;while(1){if((a[bH+196448|0]|0)==(a[bE+(bH+bU|0)|0]|0)){b_=bU;b$=bL}else{if((bH|0)!=1){break}b_=bU-1|0;b$=1}bD=bH+1|0;if((bD|0)<(b$+aO|0)){bH=bD;bL=b$;bU=b_}else{au=7153;break}}do{if((au|0)==7153){au=0;if((b$|0)==0){if(!((bH|0)==0|(bH|0)==4)){break}}if(by){bQ=bB;au=8111;break L9498}bU=bB+1|0;c[13898]=bU;bL=c[bF+(bU*40&-1)+36>>2]|0;bE=c[bF+(bU*40&-1)+32>>2]|0;bD=(a[bF+(bU*40&-1)|0]&1)==0;bU=(bL|0)>0;bI=c[10036]|0;bK=30672;bJ=116448;L9744:while(1){L9746:do{if(!bD){if(bU){bY=0;b0=0;b1=bE;while(1){b2=a[bJ+bY|0]|0;if(b2<<24>>24==(a[bI+(bY+b1|0)|0]|0)){b3=b1;b4=b0}else{if(b2<<24>>24!=36){break L9746}b3=b1-1|0;b4=1}b5=bY+1|0;if((b5|0)<(b4+bL|0)){bY=b5;b0=b4;b1=b3}else{break}}if((b4|0)==0){b6=b5}else{b7=bK;break L9744}}else{b6=0}b1=a[bJ+b6|0]|0;if((b1<<24>>24|0)==36|(b1<<24>>24|0)==0){b7=bK;break L9744}}}while(0);b1=bK+8|0;b0=c[b1>>2]|0;if((b0|0)==0){b7=b1;break}else{bK=b1;bJ=b0}}bJ=c[b7+4>>2]|0;b8=bB+2|0;c[13898]=b8;if((bJ|0)==-1){au=7167;break L9498}c[ah>>2]=bJ;do{if((c[bm>>2]|0)==2){if(!((bJ&4|0)!=0|(bJ|0)==368)){b9=bJ;break}uh(c[13898]|0,185192,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[ah>>2]=18;b9=18}else{b9=bJ}}while(0);L9764:do{if(((c[12890]|b9)&352|0)==0){ca=b9}else{bJ=c[13898]|0;if((c[8272]|0)<=(bJ|0)){ca=b9;break}bK=c[1054]|0;if((a[bK+(bJ*40&-1)|0]&1)==0){ca=b9;break}bL=c[bK+(bJ*40&-1)+36>>2]|0;bI=bK+(bJ*40&-1)+32|0;bK=c[10036]|0;bE=0;while(1){if((bE|0)>=(bL|0)){break}if((a[bK+((c[bI>>2]|0)+bE|0)|0]|0)==(a[bE+95280|0]|0)){bE=bE+1|0}else{ca=b9;break L9764}}if((bE|0)!=2){ca=b9;break}c[13898]=bJ+1;if((i9(bo)|0)!=0){au=8116;break L9498}ca=c[ah>>2]|0}}while(0);if(!((ca|0)==400|(ca|0)==432|(ca|0)==416)){bv=bv;bw=bw;bx=bx;by=1;bz=bz;continue L9627}bI=c[13898]|0;if((c[8272]|0)<=(bI|0)){bv=bv;bw=bw;bx=bx;by=1;bz=bz;continue L9627}bK=c[1054]|0;if((a[bK+(bI*40&-1)|0]&1)==0){bv=bv;bw=bw;bx=bx;by=1;bz=bz;continue L9627}bL=c[bK+(bI*40&-1)+36>>2]|0;bU=bK+(bI*40&-1)+32|0;bK=c[10036]|0;bD=0;while(1){if((bD|0)>=(bL|0)){break}if((a[bK+((c[bU>>2]|0)+bD|0)|0]|0)==(a[bD+224816|0]|0)){bD=bD+1|0}else{bv=bv;bw=bw;bx=bx;by=1;bz=bz;continue L9627}}if((bD|0)!=8){bv=bv;bw=bw;bx=bx;by=1;bz=bz;continue L9627}c[13898]=bI+1;a[bn]=1;bv=bv;bw=bw;bx=bx;by=1;bz=bz;continue L9627}}while(0);if(am){break}L9785:do{if((aO|0)>0){bH=c[10036]|0;bU=0;bK=0;bL=aQ;while(1){if((a[bU+175968|0]|0)==(a[bH+(bU+bL|0)|0]|0)){cb=bL;cc=bK}else{if((bU|0)!=8){break L9785}cb=bL-1|0;cc=1}b0=bU+1|0;if((b0|0)<(cc+aO|0)){bU=b0;bK=cc;bL=cb}else{break}}if((cc|0)==0){if(!((bU|0)==10|(bU|0)==7)){break}}c[13898]=bB+1;a[bl]=1;bv=bv;bw=bw;bx=bx;by=by;bz=bz;continue L9627}}while(0);if(!((aO|0)>0&(am^1))){break}bL=c[10036]|0;bK=0;bH=0;bI=aQ;while(1){if((a[bK+171984|0]|0)==(a[bL+(bK+bI|0)|0]|0)){cd=bI;ce=bH}else{if((bK|0)!=5){break}cd=bI-1|0;ce=1}bD=bK+1|0;if((bD|0)<(ce+aO|0)){bK=bD;bH=ce;bI=cd}else{au=7204;break}}do{if((au|0)==7204){au=0;if((ce|0)==0){if(!((bK|0)==10|(bK|0)==4)){break}}c[13898]=bB+1;a[bk]=1;bv=bv;bw=bw;bx=bx;by=by;bz=bz;continue L9627}}while(0);if(!((aO|0)>0&(am^1))){break}bK=c[10036]|0;bI=0;bH=0;bL=aQ;while(1){if((a[bI+168e3|0]|0)==(a[bK+(bI+bL|0)|0]|0)){cf=bL;cg=bH}else{if((bI|0)!=5){break L9639}cf=bL-1|0;cg=1}bD=bI+1|0;if((bD|0)<(cg+aO|0)){bI=bD;bH=cg;bL=cf}else{break}}if((cg|0)==0){if(!((bI|0)==4|(bI|0)==9)){break}}c[13898]=bB+1;a[bj]=1;bv=bv;bw=bw;bx=bx;by=by;bz=bz;continue L9627}}while(0);aO=c[ah>>2]|0;do{if((aO|0)==368){aQ=c[aT>>2]|0;if((aQ|0)==0){uE(r|0,0,28);am=ut(192)|0;if((am|0)==0){gk();bC=ut(192)|0;if((bC|0)==0){au=7220;break L9498}else{ch=bC}}else{ch=am}c[ch>>2]=0;c[ch+4>>2]=-1;c[ch+72>>2]=0;c[ch+88>>2]=0;uE(ch+8|0,0,60);c[ch+96>>2]=1;c[ch+144>>2]=4;c[ch+148>>2]=4;c[ch+152>>2]=4;am=ch+156|0;c[am>>2]=c[r>>2];c[am+4>>2]=c[r+4>>2];c[am+8>>2]=c[r+8>>2];c[am+12>>2]=c[r+12>>2];c[am+16>>2]=c[r+16>>2];c[am+20>>2]=c[r+20>>2];c[am+24>>2]=c[r+24>>2];a[ch+184|0]=0;c[aT>>2]=ch;c[ch+48>>2]=1;c[(c[aT>>2]|0)+56>>2]=99;ci=c[aT>>2]|0}else{ci=aQ}jw(ci);aQ=c[13898]|0;if((bB|0)==(aQ|0)){cj=1;ck=c[ah>>2]|0;break}else{if(bv){bQ=aQ;au=8112;break L9498}else{bv=1;bw=1;bx=bx;by=by;bz=bz;continue L9627}}}else{cj=bw;ck=aO}}while(0);if((ck|0)==225){do{if(!cj){c[aU>>2]=-1;c[a7>>2]=0;c[aS>>2]=c[12872];c[aS+4>>2]=c[12873];c[aS+8>>2]=c[12874];c[aS+12>>2]=c[12875];c[aS+16>>2]=c[12876];c[aS+20>>2]=c[12877];c[aS+24>>2]=c[12878];c[aS+28>>2]=c[12879];c[aS+32>>2]=c[12880];c[aS+36>>2]=c[12881];c[aS+40>>2]=c[12882];c[aS+44>>2]=c[12883];c[aS+48>>2]=c[12884];c[aS+52>>2]=c[12885];c[a8>>2]=1;h[a9>>3]=0.0;c[ba>>2]=0;h[bb>>3]=15.0;h[bc>>3]=90.0;c[bd>>2]=0;aO=c[8798]|0;aQ=(aO|0)>0;am=ax;L9839:while(1){bC=43264;while(1){cl=c[bC>>2]|0;if((cl|0)==0){break}if((c[cl+4>>2]|0)==(am|0)){break L9839}else{bC=cl|0}}cm=am-1|0;if(!((am|0)>(aO|0)&aQ)){au=7237;break}am=((cm|0)%(aO|0)&-1)+1|0}if((au|0)==7237){au=0;c[aj>>2]=cm;c[bf>>2]=1;c[bg>>2]=cm;c[bh>>2]=cm;break}aO=cl+8|0;c[aS>>2]=c[aO>>2];c[aS+4>>2]=c[aO+4>>2];c[aS+8>>2]=c[aO+8>>2];c[aS+12>>2]=c[aO+12>>2];c[aS+16>>2]=c[aO+16>>2];c[aS+20>>2]=c[aO+20>>2];c[aS+24>>2]=c[aO+24>>2];c[aS+28>>2]=c[aO+28>>2];c[aS+32>>2]=c[aO+32>>2];c[aS+36>>2]=c[aO+36>>2];c[aS+40>>2]=c[aO+40>>2];c[aS+44>>2]=c[aO+44>>2];c[aS+48>>2]=c[aO+48>>2];c[aS+52>>2]=c[aO+52>>2];c[be>>2]=0;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[aj>>2]=am;a[bi]=0;break}if((a[bi]&1)!=0){break}c[bf>>2]=1;c[bg>>2]=c[aj>>2]}}while(0);hL(aR,1);aO=c[13898]|0;if((bB|0)==(aO|0)){break}if(bx){bQ=aO;au=8113;break L9498}c[aP>>2]=c[aS>>2];c[aP+4>>2]=c[aS+4>>2];c[aP+8>>2]=c[aS+8>>2];c[aP+12>>2]=c[aS+12>>2];c[aP+16>>2]=c[aS+16>>2];c[aP+20>>2]=c[aS+20>>2];c[aP+24>>2]=c[aS+24>>2];c[aP+28>>2]=c[aS+28>>2];c[aP+32>>2]=c[aS+32>>2];c[aP+36>>2]=c[aS+36>>2];c[aP+40>>2]=c[aS+40>>2];c[aP+44>>2]=c[aS+44>>2];c[aP+48>>2]=c[aS+48>>2];c[aP+52>>2]=c[aS+52>>2];bv=bv;bw=1;bx=1;by=by;bz=bz;continue}uE(s|0,0,56);h[u>>3]=1.0;h[w>>3]=-2.0;c[t>>2]=X;c[x>>2]=W;do{if((a[30080]&1)==0){aO=c[8798]|0;aQ=(aO|0)>0;bI=ax;L9880:while(1){bC=43264;while(1){cn=c[bC>>2]|0;if((cn|0)==0){break}if((c[cn+4>>2]|0)==(bI|0)){break L9880}else{bC=cn|0}}co=bI-1|0;if(!((bI|0)>(aO|0)&aQ)){au=7267;break}bI=((co|0)%(aO|0)&-1)+1|0}if((au|0)==7267){au=0;c[t>>2]=co;c[z>>2]=1;c[A>>2]=co;c[x>>2]=co;break}aO=cn+8|0;c[s>>2]=c[aO>>2];c[s+4>>2]=c[aO+4>>2];c[s+8>>2]=c[aO+8>>2];c[s+12>>2]=c[aO+12>>2];c[s+16>>2]=c[aO+16>>2];c[s+20>>2]=c[aO+20>>2];c[s+24>>2]=c[aO+24>>2];c[s+28>>2]=c[aO+28>>2];c[s+32>>2]=c[aO+32>>2];c[s+36>>2]=c[aO+36>>2];c[s+40>>2]=c[aO+40>>2];c[s+44>>2]=c[aO+44>>2];c[s+48>>2]=c[aO+48>>2];c[s+52>>2]=c[aO+52>>2];c[y>>2]=0;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[t>>2]=bI;a[B]=0;break}if((a[B]&1)!=0){break}c[z>>2]=1;c[A>>2]=c[t>>2]}else{aO=43280;while(1){cp=c[aO>>2]|0;if((cp|0)==0){break}if((c[cp+4>>2]|0)==(ax|0)){au=7244;break}else{aO=cp|0}}if((au|0)==7244){au=0;aO=cp+8|0;c[s>>2]=c[aO>>2];c[s+4>>2]=c[aO+4>>2];c[s+8>>2]=c[aO+8>>2];c[s+12>>2]=c[aO+12>>2];c[s+16>>2]=c[aO+16>>2];c[s+20>>2]=c[aO+20>>2];c[s+24>>2]=c[aO+24>>2];c[s+28>>2]=c[aO+28>>2];c[s+32>>2]=c[aO+32>>2];c[s+36>>2]=c[aO+36>>2];c[s+40>>2]=c[aO+40>>2];c[s+44>>2]=c[aO+44>>2];c[s+48>>2]=c[aO+48>>2];c[s+52>>2]=c[aO+52>>2];c[y>>2]=0;if((a[B]&1)!=0){break}c[z>>2]=1;c[A>>2]=c[t>>2];break}aO=c[8798]|0;bI=(aO|0)>0;aQ=ax;L9865:while(1){am=43264;while(1){cq=c[am>>2]|0;if((cq|0)==0){break}if((c[cq+4>>2]|0)==(aQ|0)){break L9865}else{am=cq|0}}cr=aQ-1|0;if(!((aQ|0)>(aO|0)&bI)){au=7256;break}aQ=((cr|0)%(aO|0)&-1)+1|0}if((au|0)==7256){au=0;c[t>>2]=cr;c[z>>2]=1;c[A>>2]=cr;c[x>>2]=cr;break}aO=cq+8|0;c[s>>2]=c[aO>>2];c[s+4>>2]=c[aO+4>>2];c[s+8>>2]=c[aO+8>>2];c[s+12>>2]=c[aO+12>>2];c[s+16>>2]=c[aO+16>>2];c[s+20>>2]=c[aO+20>>2];c[s+24>>2]=c[aO+24>>2];c[s+28>>2]=c[aO+28>>2];c[s+32>>2]=c[aO+32>>2];c[s+36>>2]=c[aO+36>>2];c[s+40>>2]=c[aO+40>>2];c[s+44>>2]=c[aO+44>>2];c[s+48>>2]=c[aO+48>>2];c[s+52>>2]=c[aO+52>>2];c[y>>2]=0;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[t>>2]=aQ;a[B]=0;break}if((a[B]&1)!=0){break}c[z>>2]=1;c[A>>2]=c[t>>2]}}while(0);aO=hH(k,1,(c[ah>>2]&2|0)!=0)|0;bI=c[13898]|0;if((bB|0)==(bI|0)){break}if(bx){bQ=bI;au=8114;break L9498}c[aP>>2]=c[s>>2];c[aP+4>>2]=c[s+4>>2];c[aP+8>>2]=c[s+8>>2];c[aP+12>>2]=c[s+12>>2];c[aP+16>>2]=c[s+16>>2];c[aP+20>>2]=c[s+20>>2];c[aP+24>>2]=c[s+24>>2];c[aP+28>>2]=c[s+28>>2];c[aP+32>>2]=c[s+32>>2];c[aP+36>>2]=c[s+36>>2];c[aP+40>>2]=c[s+40>>2];c[aP+44>>2]=c[s+44>>2];c[aP+48>>2]=c[s+48>>2];c[aP+52>>2]=c[s+52>>2];if((aO|0)==0){bv=bv;bw=1;bx=1;by=by;bz=bz;continue}c[ak>>2]=aO-1;bv=bv;bw=1;bx=1;by=by;bz=bz}by=a$+21|0;a[by]=0;do{if(bz){cs=U;ct=O}else{a[bs]=1;if((c[9056]|0)!=1){if(!bq){a[U]=0}if(br){cs=U;ct=0;break}a[O]=0;cs=U;ct=O;break}bw=c[1054]|0;bv=(c[bw+(aW*40&-1)+36>>2]|0)+(c[bw+(aW*40&-1)+32>>2]|0)|0;bg=db(c[a4>>2]|0,(bv+1|0)-(c[bw+(aK*40&-1)+32>>2]|0)|0,116456)|0;c[a4>>2]=bg;bw=c[(c[1054]|0)+(aK*40&-1)+32>>2]|0;L9908:do{if((bw|0)<(bv|0)){bf=bw;bi=bg;while(1){be=a[(c[10036]|0)+bf|0]|0;if(be<<24>>24==0){cu=bi;break L9908}bh=bi+1|0;a[bi]=be;be=bf+1|0;if((be|0)<(bv|0)){bf=be;bi=bh}else{cu=bh;break}}}else{cu=bg}}while(0);a[cu]=0;if((a_|0)==2){cv=c[a4>>2]|0;cw=O}else if((a_|0)==1){cv=U;cw=c[a4>>2]|0}else{cv=U;cw=O}a[by]=1;cs=cv;ct=cw}}while(0);do{if(!bx){by=c[ah>>2]|0;if((by|0)==225){c[aj>>2]=X;hL(aR,1);c[aP>>2]=c[aS>>2];c[aP+4>>2]=c[aS+4>>2];c[aP+8>>2]=c[aS+8>>2];c[aP+12>>2]=c[aS+12>>2];c[aP+16>>2]=c[aS+16>>2];c[aP+20>>2]=c[aS+20>>2];c[aP+24>>2]=c[aS+24>>2];c[aP+28>>2]=c[aS+28>>2];c[aP+32>>2]=c[aS+32>>2];c[aP+36>>2]=c[aS+36>>2];c[aP+40>>2]=c[aS+40>>2];c[aP+44>>2]=c[aS+44>>2];c[aP+48>>2]=c[aS+48>>2];c[aP+52>>2]=c[aS+52>>2];break}c[al>>2]=X;h[a$+40>>3]=1.0;c[ai>>2]=W;h[a$+48>>3]=+h[3817];a[ag]=0;do{if((a[30080]&1)==0){br=aw|0;bq=c[br>>2]|0;bs=c[8798]|0;bz=(bs|0)>0;bg=ax;L9926:while(1){bv=43264;while(1){cx=c[bv>>2]|0;if((cx|0)==0){break}if((c[cx+4>>2]|0)==(bg|0)){break L9926}else{bv=cx|0}}cy=bg-1|0;if(!((bg|0)>(bs|0)&bz)){au=7301;break}bg=((cy|0)%(bs|0)&-1)+1|0}if((au|0)==7301){au=0;c[al>>2]=cy;c[a$+64>>2]=1;c[a$+68>>2]=cy;c[ai>>2]=cy;cz=by;break}bs=cx+8|0;c[aP>>2]=c[bs>>2];c[aP+4>>2]=c[bs+4>>2];c[aP+8>>2]=c[bs+8>>2];c[aP+12>>2]=c[bs+12>>2];c[aP+16>>2]=c[bs+16>>2];c[aP+20>>2]=c[bs+20>>2];c[aP+24>>2]=c[bs+24>>2];c[aP+28>>2]=c[bs+28>>2];c[aP+32>>2]=c[bs+32>>2];c[aP+36>>2]=c[bs+36>>2];c[aP+40>>2]=c[bs+40>>2];c[aP+44>>2]=c[bs+44>>2];c[aP+48>>2]=c[bs+48>>2];c[aP+52>>2]=c[bs+52>>2];c[br>>2]=bq;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[al>>2]=bg;a[ag]=0;cz=by;break}if((a[ag]&1)!=0){cz=by;break}c[a$+64>>2]=1;c[a$+68>>2]=c[al>>2];cz=by}else{lK(aw,ax);cz=c[ah>>2]|0}}while(0);by=hH(aw,1,(cz&2|0)!=0)|0;if((by|0)==0){c[ak>>2]=X;break}else{c[ak>>2]=by-1;break}}}while(0);ak=c[ah>>2]|0;ax=(ak&2|0)==0;if(!ax){c[aw>>2]=1}do{if(!((c[bm>>2]|0)!=2|ax)){al=a$+48|0;if(+h[al>>3]!=-3.0){break}h[al>>3]=1.0}}while(0);if((ak|0)==1){a[bl]=0}do{if(bu){if((ak|0)==352|(ak|0)==400|(ak|0)==416|(ak|0)==432){cA=X;cB=W;break}aw=c[11690]|0;if(ax){cC=W;cD=a[38984]|0}else{al=a[38984]|0;cC=(((aw|0)!=0?2:1)+W|0)+(al&1)|0;cD=al}cA=(((aw|0)!=0?2:1)+X|0)+(cD&1)|0;cB=cC}else{cA=X;cB=W}}while(0);do{if((ak|0)==400){a[ag]=1}else if((ak|0)==416|(ak|0)==432){ax=c[16678]|0;if((ax&1|0)!=0){h[8341]=0.0}if((ax&2|0)==0){break}h[8342]=255.0}}while(0);if((a$|0)!=(c[ad>>2]|0)){au=7325;break L9498}if((c[bm>>2]|0)==3){cE=c[a$+4>>2]|0;ak=a0;ag=a$;while(1){if((ag|0)==0){au=7329;break L9498}cF=ag+4|0;c[cF>>2]=cE;ax=c[11870]|0;do{if((c[8732]|0)==0){if((ax|0)==2){au=7332;break L9498}else if((ax|0)!=1){break}c[12210]=0}else{if((ax|0)==1){au=7335;break L9498}}}while(0);ax=ag+252|0;c[ax>>2]=0;bu=ag+244|0;c[bu>>2]=1;bl=ag+239|0;a[bl]=0;aw=ag+260|0;al=c[aw>>2]|0;if((al|0)!=0){ai=al;while(1){al=c[ai>>2]|0;aS=c[ai+12>>2]|0;if((aS|0)!=0){uu(aS)}uu(ai);if((al|0)==0){break}else{ai=al}}c[aw>>2]=0}if((a[47584]&1)!=0){c[bu>>2]=1}ai=hu(c[6352]|0)|0;al=ag+12|0;aS=c[al>>2]|0;if((aS|0)==368){c[272]=1;aR=c[273]|0;do{if((aR|0)!=0){if((c[aR>>2]|0)!=2){break}aj=aR+40|0;if((c[aj>>2]|0)!=42){break}c[aj>>2]=43}}while(0);cG=c[al>>2]|0}else{cG=aS}if((cG|0)==225){aR=hu(c[6352]|0)|0;c[ai>>2]=aR;c[aR+8>>2]=0}aR=c[8270]|0;do{if((aR|0)!=0){if((aY(aR|0,139696)|0)==0){break}bA(4,aR|0)}}while(0);a[47040]=1;aR=ag+64|0;aS=ag+48|0;aj=ag+23|0;bx=ag+28|0;by=ag+56|0;bs=ag+224|0;bz=ag;bv=0;bw=0;bB=0;cH=8.988465674311579e+307;bi=0;bf=0;aQ=ai;L10008:while(1){cI=eC(F,7)|0;if((cI|0)==(-9|0)){bv=bv;bw=bw;bB=bB;cH=cH;bi=bi;bf=bf;aQ=aQ;continue}else if((cI|0)==0){bh=c[11932]|0;uh(-1,116952,(v=i,i=i+16|0,c[v>>2]=c[11900],c[v+8>>2]=(bh|0)!=0?bh:179864,v)|0)}else if((cI|0)==(-3|0)){bh=c[al>>2]|0;if((bh|0)==400|(bh|0)==416|(bh|0)==432|(bh|0)==225){bv=bv;bw=bw;bB=bB;cH=cH;bi=bi;bf=bf;aQ=aQ;continue}if((bf|0)==0){if((bv|0)==0){bv=0;bw=bw;bB=bB;cH=cH;bi=bi;bf=0;aQ=aQ;continue}else{cJ=bv}}else{cJ=bf}if((bv|0)<=0){bv=bv;bw=bw;bB=bB;cH=cH;bi=bi;bf=cJ;aQ=aQ;continue}c[aQ+8>>2]=bv;c[aQ>>2]=c[aw>>2];c[aw>>2]=aQ;c[ax>>2]=(c[ax>>2]|0)+1;if((bv|0)!=(cJ|0)){c[bu>>2]=0}bv=0;bw=bw+1|0;bB=bB;cH=cH;bi=bi;bf=cJ;aQ=hu(cJ)|0;continue}else if((cI|0)==(-6|0)){eL(bz);bv=bv;bw=bw;bB=bB;cH=cH;bi=bi;bf=bf;aQ=aQ;continue}else if((cI|0)==(-7|0)){aI(115120,50,1,c[m>>2]|0);bv=bv;bw=bw;bB=bB;cH=cH;bi=bi;bf=bf;aQ=aQ;continue}else if((cI|0)==(-1|0)|(cI|0)==(-4|0)){break}do{if((bv|0)<(c[aQ+4>>2]|0)){au=7370}else{bh=(bv<<1)+1e3|0;hv(aQ,bh);if((c[al>>2]|0)==225){be=aQ|0;hv(c[be>>2]|0,bh);c[(c[be>>2]|0)+8>>2]=0;au=7370;break}else{be=c[aQ+12>>2]|0;cK=bi;cL=be;cM=be+(bv<<6)|0;break}}}while(0);do{if((au|0)==7370){au=0;bg=c[aQ+12>>2]|0;bq=bg+(bv<<6)|0;if((c[al>>2]|0)!=225){cK=bi;cL=bg;cM=bq;break}if((cI|0)<6){c[bq>>2]=2;bv=bv;bw=bw;bB=bB;cH=cH;bi=bi;bf=bf;aQ=aQ;continue L10008}else{cK=(c[(c[aQ>>2]|0)+12>>2]|0)+(bv<<6)|0;cL=bg;cM=bq;break}}}while(0);bq=cM|0;L10036:do{if((cI|0)==(-2|0)|(cI|0)==(-5|0)){c[bq>>2]=2;cN=bB;cO=cH}else{c[bq>>2]=0;bg=c[8732]|0;do{if((bg|0)==0){if((cI|0)==1){cP=3;cQ=bB;cR=cH;cS=+h[F>>3];cT=+(bw|0);cU=+(bv|0);break}else if((cI|0)==2){if((c[al>>2]|0)!=352){au=7380;break L9498}cP=3;cQ=1;cR=+h[G>>3];cS=+h[F>>3];cT=+(bw|0);cU=+(bv|0);break}else{if((cI|0)<=2){cP=cI;cQ=bB;cR=cH;cS=0.0;cT=0.0;cU=0.0;break}cP=cI;cQ=bB;cR=cH;cS=+h[H>>3];cT=+h[G>>3];cU=+h[F>>3];break}}else if((bg|0)==1){if((cI|0)<2){au=7385;break L9498}if((cI|0)<3){h[H>>3]=1.0;cV=3;cW=1.0}else{cV=cI;cW=+h[H>>3]}cX=+h[9040];cY=cX*+h[F>>3];h[F>>3]=cY;cZ=cX*+h[G>>3];h[G>>3]=cZ;cX=cW*+S(+cY);c_=+S(+cZ);c$=c_*cW*+T(+cY);cP=cV;cQ=bB;cR=cH;cS=cW*+T(+cZ);cT=c$;cU=cX*c_}else if((bg|0)==2){if((cI|0)<2){au=7391;break L9498}if((cI|0)<3){h[H>>3]=1.0;c0=3;c1=1.0}else{c0=cI;c1=+h[H>>3]}c_=+h[9040]*+h[F>>3];h[F>>3]=c_;cX=c1*+S(+c_);c$=c1*+T(+c_);cP=c0;cQ=bB;cR=cH;cS=+h[G>>3];cT=c$;cU=cX}else{au=7396;break L9498}}while(0);if((cP|0)<(c[11870]|0)){au=7398;break L9498}bg=c[al>>2]|0;if((bg|0)==33){br=(c[aR>>2]|0)==6;c2=br?1:cQ;c3=br?cS:cR}else{c2=cQ;c3=cR}do{if((cP|0)>3){do{if((bg|0)==18|(bg|0)==51){if(+h[aS>>3]==-3.0){h[cL+(bv<<6)+48>>3]=+h[I>>3];c4=0;c5=cS;break}else{if((bg|0)==368){c4=0;c5=cS;break}else{au=7406;break}}}else if((bg|0)==368){c4=0;c5=cS}else{au=7406}}while(0);if((au|0)==7406){au=0;c4=1;c5=+h[I>>3]}if((cP|0)<=4){c6=c4;c7=c5;c8=0.0;c9=0.0;da=0.0;break}bJ=c[al>>2]|0;if((bJ|0)==18|(bJ|0)==51){if(+h[aS>>3]!=-3.0){c6=c4;c7=c5;c8=0.0;c9=0.0;da=0.0;break}cX=+h[J>>3];de=1;df=cX;dg=cX}else{de=c4;df=c5;dg=+h[J>>3]}bE=(bJ|0)==368;if(!((cP|0)>5&(bJ|0)==225)){c6=bE?1:de;c7=bE?dg:df;c8=0.0;c9=0.0;da=0.0;break}bE=(cP|0)>6;c6=bE&1;c7=bE?+h[L>>3]:cS;c8=cS+ +h[K>>3];c9=cT+dg;da=cU+ +h[I>>3]}else{c6=c2;c7=c3;c8=0.0;c9=0.0;da=0.0}}while(0);c[bq>>2]=0;bg=c[200]|0;L10082:do{if((bg|0)!=99){if(!(cU>-8.988465674311579e+307&cU<8.988465674311579e+307)){c[bq>>2]=2;cN=c6;cO=c7;break L10036}do{if((a[64788+(bg*688&-1)|0]&1)==0){h[cL+(bv<<6)+8>>3]=cU}else{if(cU<0.0){c[bq>>2]=2;cN=c6;cO=c7;break L10036}if(cU==0.0){h[cL+(bv<<6)+8>>3]=-8.988465674311579e+307;c[bq>>2]=1;break L10082}else{cX=+_(+cU);h[cL+(bv<<6)+8>>3]=cX/+h[64800+(bg*688&-1)>>3];break}}}while(0);if((a[aj]&1)!=0){break}if((c[bq>>2]|0)!=0|(bg|0)<0){break}bE=64712+(bg*688&-1)|0;if(cU<+h[bE>>3]){h[bE>>3]=cU}bE=64664+(bg*688&-1)|0;do{if(cU<+h[bE>>3]){if((c[64648+(bg*688&-1)>>2]&1|0)==0){c[bq>>2]=1;break L10082}if((c[64728+(bg*688&-1)>>2]&1|0)==0){h[bE>>3]=cU;break}cX=+h[64736+(bg*688&-1)>>3];if(cX>cU){h[bE>>3]=cX;c[bq>>2]=1;break L10082}else{h[bE>>3]=cU;break}}}while(0);bE=64720+(bg*688&-1)|0;if(cU>+h[bE>>3]){h[bE>>3]=cU}bE=64672+(bg*688&-1)|0;if(cU<=+h[bE>>3]){break}if((c[64648+(bg*688&-1)>>2]&2|0)==0){c[bq>>2]=1;break}if((c[64732+(bg*688&-1)>>2]&2|0)==0){h[bE>>3]=cU;break}cX=+h[64760+(bg*688&-1)>>3];if(cX>3]=cX;c[bq>>2]=1;break}else{h[bE>>3]=cU;break}}}while(0);bg=c[144]|0;L10128:do{if((bg|0)!=99){if(!(cT>-8.988465674311579e+307&cT<8.988465674311579e+307)){c[bq>>2]=2;cN=c6;cO=c7;break L10036}do{if((a[64788+(bg*688&-1)|0]&1)==0){h[cL+(bv<<6)+16>>3]=cT}else{if(cT<0.0){c[bq>>2]=2;cN=c6;cO=c7;break L10036}if(cT==0.0){h[cL+(bv<<6)+16>>3]=-8.988465674311579e+307;c[bq>>2]=1;break L10128}else{cX=+_(+cT);h[cL+(bv<<6)+16>>3]=cX/+h[64800+(bg*688&-1)>>3];break}}}while(0);if((a[aj]&1)!=0){break}if((c[bq>>2]|0)!=0|(bg|0)<0){break}bE=64712+(bg*688&-1)|0;if(cT<+h[bE>>3]){h[bE>>3]=cT}bE=64664+(bg*688&-1)|0;do{if(cT<+h[bE>>3]){if((c[64648+(bg*688&-1)>>2]&1|0)==0){c[bq>>2]=1;break L10128}if((c[64728+(bg*688&-1)>>2]&1|0)==0){h[bE>>3]=cT;break}cX=+h[64736+(bg*688&-1)>>3];if(cX>cT){h[bE>>3]=cX;c[bq>>2]=1;break L10128}else{h[bE>>3]=cT;break}}}while(0);bE=64720+(bg*688&-1)|0;if(cT>+h[bE>>3]){h[bE>>3]=cT}bE=64672+(bg*688&-1)|0;if(cT<=+h[bE>>3]){break}if((c[64648+(bg*688&-1)>>2]&2|0)==0){c[bq>>2]=1;break}if((c[64732+(bg*688&-1)>>2]&2|0)==0){h[bE>>3]=cT;break}cX=+h[64760+(bg*688&-1)>>3];if(cX>3]=cX;c[bq>>2]=1;break}else{h[bE>>3]=cT;break}}}while(0);L10174:do{if((c[al>>2]|0)==225){c[cK>>2]=0;bg=c[200]|0;L10176:do{if((bg|0)!=99){if(!(da>-8.988465674311579e+307&da<8.988465674311579e+307)){c[bq>>2]=2;cN=c6;cO=c7;break L10036}do{if((a[64788+(bg*688&-1)|0]&1)==0){h[cK+8>>3]=da}else{if(da<0.0){c[bq>>2]=2;cN=c6;cO=c7;break L10036}if(da==0.0){h[cK+8>>3]=-8.988465674311579e+307;c[bq>>2]=1;break L10176}else{cX=+_(+da);h[cK+8>>3]=cX/+h[64800+(bg*688&-1)>>3];break}}}while(0);if((a[aj]&1)!=0){break}if((c[bq>>2]|0)!=0|(bg|0)<0){break}bE=64712+(bg*688&-1)|0;if(da<+h[bE>>3]){h[bE>>3]=da}bE=64664+(bg*688&-1)|0;do{if(da<+h[bE>>3]){if((c[64648+(bg*688&-1)>>2]&1|0)==0){c[bq>>2]=1;break L10176}if((c[64728+(bg*688&-1)>>2]&1|0)==0){h[bE>>3]=da;break}cX=+h[64736+(bg*688&-1)>>3];if(cX>da){h[bE>>3]=cX;c[bq>>2]=1;break L10176}else{h[bE>>3]=da;break}}}while(0);bE=64720+(bg*688&-1)|0;if(da>+h[bE>>3]){h[bE>>3]=da}bE=64672+(bg*688&-1)|0;if(da<=+h[bE>>3]){break}if((c[64648+(bg*688&-1)>>2]&2|0)==0){c[bq>>2]=1;break}if((c[64732+(bg*688&-1)>>2]&2|0)==0){h[bE>>3]=da;break}cX=+h[64760+(bg*688&-1)>>3];if(cX>3]=cX;c[bq>>2]=1;break}else{h[bE>>3]=da;break}}}while(0);bg=c[144]|0;if((bg|0)==99){break}if(!(c9>-8.988465674311579e+307&c9<8.988465674311579e+307)){c[bq>>2]=2;cN=c6;cO=c7;break L10036}do{if((a[64788+(bg*688&-1)|0]&1)==0){h[cK+16>>3]=c9}else{if(c9<0.0){c[bq>>2]=2;cN=c6;cO=c7;break L10036}if(c9==0.0){h[cK+16>>3]=-8.988465674311579e+307;c[bq>>2]=1;break L10174}else{cX=+_(+c9);h[cK+16>>3]=cX/+h[64800+(bg*688&-1)>>3];break}}}while(0);if((a[aj]&1)!=0){break}if((c[bq>>2]|0)!=0|(bg|0)<0){break}bE=64712+(bg*688&-1)|0;if(c9<+h[bE>>3]){h[bE>>3]=c9}bE=64664+(bg*688&-1)|0;do{if(c9<+h[bE>>3]){if((c[64648+(bg*688&-1)>>2]&1|0)==0){c[bq>>2]=1;break L10174}if((c[64728+(bg*688&-1)>>2]&1|0)==0){h[bE>>3]=c9;break}cX=+h[64736+(bg*688&-1)>>3];if(cX>c9){h[bE>>3]=cX;c[bq>>2]=1;break L10174}else{h[bE>>3]=c9;break}}}while(0);bE=64720+(bg*688&-1)|0;if(c9>+h[bE>>3]){h[bE>>3]=c9}bE=64672+(bg*688&-1)|0;if(c9<=+h[bE>>3]){break}if((c[64648+(bg*688&-1)>>2]&2|0)==0){c[bq>>2]=1;break}if((c[64732+(bg*688&-1)>>2]&2|0)==0){h[bE>>3]=c9;break}cX=+h[64760+(bg*688&-1)>>3];if(cX>3]=cX;c[bq>>2]=1;break}else{h[bE>>3]=c9;break}}}while(0);L10267:do{if((a[47032]&1)==0){if((c[al>>2]|0)==400){h[cL+(bv<<6)+32>>3]=cS}bE=c[34]|0;L10274:do{if((bE|0)!=99){if(!(cS>-8.988465674311579e+307&cS<8.988465674311579e+307)){c[bq>>2]=2;cN=c6;cO=c7;break L10036}do{if((a[64788+(bE*688&-1)|0]&1)==0){h[cL+(bv<<6)+24>>3]=cS}else{if(cS<0.0){c[bq>>2]=2;cN=c6;cO=c7;break L10036}if(cS==0.0){h[cL+(bv<<6)+24>>3]=-8.988465674311579e+307;c[bq>>2]=1;break L10274}else{cX=+_(+cS);h[cL+(bv<<6)+24>>3]=cX/+h[64800+(bE*688&-1)>>3];break}}}while(0);if((a[aj]&1)!=0){break}if((c[bq>>2]|0)!=0|(bE|0)<0){break}bJ=64712+(bE*688&-1)|0;if(cS<+h[bJ>>3]){h[bJ>>3]=cS}bJ=64664+(bE*688&-1)|0;do{if(cS<+h[bJ>>3]){if((c[64648+(bE*688&-1)>>2]&1|0)==0){c[bq>>2]=1;break L10274}if((c[64728+(bE*688&-1)>>2]&1|0)==0){h[bJ>>3]=cS;break}cX=+h[64736+(bE*688&-1)>>3];if(cX>cS){h[bJ>>3]=cX;c[bq>>2]=1;break L10274}else{h[bJ>>3]=cS;break}}}while(0);bJ=64720+(bE*688&-1)|0;if(cS>+h[bJ>>3]){h[bJ>>3]=cS}bJ=64672+(bE*688&-1)|0;if(cS<=+h[bJ>>3]){break}if((c[64648+(bE*688&-1)>>2]&2|0)==0){c[bq>>2]=1;break}if((c[64732+(bE*688&-1)>>2]&2|0)==0){h[bJ>>3]=cS;break}cX=+h[64760+(bE*688&-1)>>3];if(cX>3]=cX;c[bq>>2]=1;break}else{h[bJ>>3]=cS;break}}}while(0);bE=c[34]|0;L10320:do{if(!((c[al>>2]|0)!=225|(bE|0)==99)){if(!(c8>-8.988465674311579e+307&c8<8.988465674311579e+307)){c[bq>>2]=2;cN=c6;cO=c7;break L10036}do{if((a[64788+(bE*688&-1)|0]&1)==0){h[cK+24>>3]=c8}else{if(c8<0.0){c[bq>>2]=2;cN=c6;cO=c7;break L10036}if(c8==0.0){h[cK+24>>3]=-8.988465674311579e+307;c[bq>>2]=1;break L10320}else{cX=+_(+c8);h[cK+24>>3]=cX/+h[64800+(bE*688&-1)>>3];break}}}while(0);if((a[aj]&1)!=0){break}if((c[bq>>2]|0)!=0|(bE|0)<0){break}bg=64712+(bE*688&-1)|0;if(c8<+h[bg>>3]){h[bg>>3]=c8}bg=64664+(bE*688&-1)|0;do{if(c8<+h[bg>>3]){if((c[64648+(bE*688&-1)>>2]&1|0)==0){c[bq>>2]=1;break L10320}if((c[64728+(bE*688&-1)>>2]&1|0)==0){h[bg>>3]=c8;break}cX=+h[64736+(bE*688&-1)>>3];if(cX>c8){h[bg>>3]=cX;c[bq>>2]=1;break L10320}else{h[bg>>3]=c8;break}}}while(0);bg=64720+(bE*688&-1)|0;if(c8>+h[bg>>3]){h[bg>>3]=c8}bg=64672+(bE*688&-1)|0;if(c8<=+h[bg>>3]){break}if((c[64648+(bE*688&-1)>>2]&2|0)==0){c[bq>>2]=1;break}if((c[64732+(bE*688&-1)>>2]&2|0)==0){h[bg>>3]=c8;break}cX=+h[64760+(bE*688&-1)>>3];if(cX>3]=cX;c[bq>>2]=1;break}else{h[bg>>3]=c8;break}}}while(0);if((c[bx>>2]|0)==-6){h[cL+(bv<<6)+32>>3]=c7}if(!((c[al>>2]|0)==352|(c[7662]|0)==1)){if((a[by]&1)==0){au=7669;break}}bE=c[bq>>2]|0;if((c6|0)==0){if(!(cS>-8.988465674311579e+307&cS<8.988465674311579e+307)){cN=0;cO=c7;break L10036}do{if((a[66852]&1)==0){h[cL+(bv<<6)+32>>3]=cS}else{if(cS<0.0){cN=0;cO=c7;break L10036}if(cS==0.0){h[cL+(bv<<6)+32>>3]=-8.988465674311579e+307;au=7669;break L10267}else{cX=+_(+cS);h[cL+(bv<<6)+32>>3]=cX/+h[8358];break}}}while(0);if(!((a[aj]&1)==0&(bE|0)==0)){au=7669;break}if(cS<+h[8347]){h[8347]=cS}do{if(cS<+h[8341]){if((c[16678]&1|0)==0){au=7669;break L10267}if((c[16698]&1|0)==0){h[8341]=cS;break}cX=+h[8350];if(cX>cS){h[8341]=cX;au=7669;break L10267}else{h[8341]=cS;break}}}while(0);if(cS>+h[8348]){h[8348]=cS}if(cS<=+h[8342]){au=7669;break}if((c[16678]&2|0)==0){au=7669;break}if((c[16699]&2|0)==0){h[8342]=cS;au=7669;break}cX=+h[8353];if(cX-8.988465674311579e+307&c7<8.988465674311579e+307)){cN=c6;cO=c7;break L10036}do{if((a[66852]&1)==0){h[cL+(bv<<6)+32>>3]=c7}else{if(c7<0.0){cN=c6;cO=c7;break L10036}if(c7==0.0){h[cL+(bv<<6)+32>>3]=-8.988465674311579e+307;au=7669;break L10267}else{cX=+_(+c7);h[cL+(bv<<6)+32>>3]=cX/+h[8358];break}}}while(0);if(!((a[aj]&1)==0&(bE|0)==0)){au=7669;break}if(c7<+h[8347]){h[8347]=c7}do{if(c7<+h[8341]){if((c[16678]&1|0)==0){au=7669;break L10267}if((c[16698]&1|0)==0){h[8341]=c7;break}cX=+h[8350];if(cX>c7){h[8341]=cX;au=7669;break L10267}else{h[8341]=c7;break}}}while(0);if(c7>+h[8348]){h[8348]=c7}if(c7<=+h[8342]){au=7669;break}if((c[16678]&2|0)==0){au=7669;break}if((c[16699]&2|0)==0){h[8342]=c7;au=7669;break}cX=+h[8353];if(cX>3]=cS;bE=c[al>>2]|0;if((bE|0)!=225){dh=bE;break}h[cK+24>>3]=c8;au=7669}}while(0);if((au|0)==7669){au=0;dh=c[al>>2]|0}if((dh|0)==368){iW(c[bs>>2]|0,cM,bv,c[11767]|0,c7);di=c[al>>2]|0}else{di=dh}if(!((di|0)==416|(di|0)==432)){cN=c6;cO=c7;break}h[cL+(bv<<6)+40>>3]=+h[I>>3];h[cL+(bv<<6)+48>>3]=+h[J>>3];h[cL+(bv<<6)+56>>3]=+h[K>>3];h[cL+(bv<<6)+32>>3]=+h[L>>3];cN=c6;cO=c7}}while(0);bv=bv+1|0;bw=bw;bB=cN;cH=cO;bi=cK;bf=bf;aQ=aQ}bi=c[8270]|0;do{if((bi|0)!=0){if((aY(bi|0,139696)|0)==0){break}bA(4,139696)}}while(0);if((bB|0)!=0){a[bl]=1}do{if((bv|0)>0){c[ax>>2]=(c[ax>>2]|0)+1;c[aQ+8>>2]=bv;if((c[al>>2]|0)!=225){c[aQ>>2]=c[aw>>2]}c[aw>>2]=aQ;if((bv|0)==(bf|0)){break}c[bu>>2]=0}else{do{if((c[al>>2]|0)==225){bi=c[aQ>>2]|0;if((bi|0)==0){break}bw=c[bi+12>>2]|0;if((bw|0)!=0){uu(bw)}uu(bi)}}while(0);if((aQ|0)==0){break}bi=c[aQ+12>>2]|0;if((bi|0)!=0){uu(bi)}uu(aQ)}}while(0);do{if((a[47032]&1)!=0){if((c[ax>>2]|0)<=0){break}aQ=c[aw>>2]|0;al=c[aQ+12>>2]|0;cH=+h[al+8>>3];cX=+h[al+16>>3];al=(aQ|0)==0;if(al){dj=cH;dl=cH;dm=cX;dn=cX}else{c$=cH;c_=cH;cH=cX;cZ=cX;bf=aQ;while(1){bv=c[bf+8>>2]|0;if((bv|0)>0){cX=c$;cY=c_;dp=cH;dq=cZ;bB=c[bf+12>>2]|0;bi=0;while(1){do{if((c[bB>>2]|0)==2){dr=dq;ds=dp;dt=cY;du=cX}else{dv=+h[bB+8>>3];dw=cX>dv?dv:cX;dx=cY>3];dy=dp>dv?dv:dp;if(dq>=dv){dr=dq;ds=dy;dt=dx;du=dw;break}dr=dv;ds=dy;dt=dx;du=dw}}while(0);bw=bi+1|0;if((bw|0)<(bv|0)){cX=du;cY=dt;dp=ds;dq=dr;bB=bB+64|0;bi=bw}else{dz=du;dA=dt;dB=ds;dC=dr;break}}}else{dz=c$;dA=c_;dB=cH;dC=cZ}bi=c[bf>>2]|0;if((bi|0)==0){dj=dz;dl=dA;dm=dB;dn=dC;break}else{c$=dz;c_=dA;cH=dB;cZ=dC;bf=bi}}}cZ=(dl-dj)/+((c[11756]|0)-1|0);cH=(dn-dm)/+((c[11732]|0)-1|0);c[aw>>2]=0;c[ax>>2]=c[11756];c[bu>>2]=1;if((c[11752]|0)==2){if(al){dD=0}else{bf=0;bi=aQ;while(1){bB=(c[bi+8>>2]|0)+bf|0;bv=c[bi>>2]|0;if((bv|0)==0){dD=bB;break}else{bf=bB;bi=bv}}}bi=dD+3|0;bf=aa(bi<<3,dD+8|0);bv=ut(bf)|0;if((bv|0)==0){gk();bB=ut(bf)|0;if((bB|0)==0){au=7709;break L9498}else{dE=bB}}else{dE=bv}bv=dE;bB=bi<<2;bi=ut(bB)|0;if((bi|0)==0){gk();bf=ut(bB)|0;if((bf|0)==0){au=7712;break L9498}else{dF=bf}}else{dF=bi}bi=dF;bf=dD<<1;bB=bf+dD|0;bw=bv+(bB<<3)|0;if(al){dG=0;dH=3;au=7715}else{bs=0;by=aQ;while(1){bx=by+8|0;aS=c[bx>>2]|0;if((aS|0)>0){aR=bs;bz=0;ai=c[by+12>>2]|0;bq=aS;while(1){if((c[ai>>2]|0)==2){dI=aR;dJ=bq}else{h[bv+(aR<<3)>>3]=+h[ai+8>>3];h[bv+(aR+dD<<3)>>3]=+h[ai+16>>3];h[bv+(aR+bf<<3)>>3]=+h[ai+24>>3];dI=aR+1|0;dJ=c[bx>>2]|0}aS=bz+1|0;if((aS|0)<(dJ|0)){aR=dI;bz=aS;ai=ai+64|0;bq=dJ}else{dK=dI;break}}}else{dK=bs}bq=c[by>>2]|0;if((bq|0)==0){break}else{bs=dK;by=bq}}by=dK+3|0;if((by|0)>0){dG=dK;dH=by;au=7715}else{dL=dK;dM=by}}if((au|0)==7715){au=0;by=0;while(1){bs=by+1|0;c[bi+(by<<2)>>2]=bv+(aa(bs,dH)+bB<<3);if((bs|0)<(dH|0)){by=bs}else{dL=dG;dM=dH;break}}}if((dL|0)>0){by=0;while(1){bs=by+1|0;bq=(bs|0)<(dL|0);if(bq){ai=bv+(by<<3)|0;bz=bv+(by+dD<<3)|0;aR=bi+(by<<2)|0;bx=bs;while(1){c_=+h[ai>>3]- +h[bv+(bx<<3)>>3];c$=+h[bz>>3]- +h[bv+(bx+dD<<3)>>3];dq=+Q(+(c_*c_+c$*c$));if(dq>0.0){dN=dq*dq*+_(+dq)}else{dN=0.0}dq=-0.0-dN;h[(c[bi+(bx<<2)>>2]|0)+(by<<3)>>3]=dq;h[(c[aR>>2]|0)+(bx<<3)>>3]=dq;aS=bx+1|0;if((aS|0)<(dL|0)){bx=aS}else{dO=aR;break}}}else{dO=bi+(by<<2)|0}h[(c[dO>>2]|0)+(by<<3)>>3]=0.0;h[bv+(by+bB<<3)>>3]=+h[bv+(by+bf<<3)>>3];if(bq){by=bs}else{break}}by=bi+(dL<<2)|0;bf=dL+1|0;aR=bi+(bf<<2)|0;bx=dL+2|0;bz=bi+(bx<<2)|0;ai=0;while(1){h[(c[by>>2]|0)+(ai<<3)>>3]=1.0;aS=bi+(ai<<2)|0;h[(c[aS>>2]|0)+(dL<<3)>>3]=1.0;dq=+h[bv+(ai<<3)>>3];h[(c[aR>>2]|0)+(ai<<3)>>3]=dq;h[(c[aS>>2]|0)+(bf<<3)>>3]=dq;dq=+h[bv+(ai+dD<<3)>>3];h[(c[bz>>2]|0)+(ai<<3)>>3]=dq;h[(c[aS>>2]|0)+(bx<<3)>>3]=dq;aS=ai+1|0;if((aS|0)<(dL|0)){ai=aS}else{dP=bf;dQ=bx;dR=by;dS=aR;dU=bz;break}}}else{bz=dL+1|0;aR=dL+2|0;dP=bz;dQ=aR;dR=bi+(dL<<2)|0;dS=bi+(bz<<2)|0;dU=bi+(aR<<2)|0}h[bv+(dL+bB<<3)>>3]=0.0;h[bv+(dP+bB<<3)>>3]=0.0;h[bv+(dQ+bB<<3)>>3]=0.0;h[(c[dR>>2]|0)+(dL<<3)>>3]=0.0;h[(c[dR>>2]|0)+(dP<<3)>>3]=0.0;h[(c[dR>>2]|0)+(dQ<<3)>>3]=0.0;h[(c[dS>>2]|0)+(dL<<3)>>3]=0.0;h[(c[dS>>2]|0)+(dP<<3)>>3]=0.0;h[(c[dS>>2]|0)+(dQ<<3)>>3]=0.0;h[(c[dU>>2]|0)+(dL<<3)>>3]=0.0;h[(c[dU>>2]|0)+(dP<<3)>>3]=0.0;h[(c[dU>>2]|0)+(dQ<<3)>>3]=0.0;aR=dM<<2;bz=ut(aR)|0;if((bz|0)==0){gk();by=ut(aR)|0;if((by|0)==0){au=7736;break L9498}else{dV=by}}else{dV=bz}bz=dV;ht(bi,dM,bz,e);hq(bi,dM,bz,bw);uu(dF);uu(dV);dW=bv+((dL*3&-1)<<3)|0;dX=bv+(dL<<3)|0;dY=dL;dZ=bv}else{dW=0;dX=0;dY=0;dZ=0}if((c[11756]|0)>0){bz=dW+(dY<<3)|0;by=(dY|0)>0;aR=dW+(dY+1<<3)|0;bx=dW+(dY+2<<3)|0;dq=dj;bf=0;ai=c[11732]|0;while(1){aS=hu(ai+1|0)|0;c[aS+8>>2]=c[11732];c[aS>>2]=c[aw>>2];c[aw>>2]=aS;bE=c[11732]|0;if((bE|0)>0){c$=dm;bg=c[aS+12>>2]|0;aS=0;while(1){bJ=bg|0;c[bJ>>2]=0;br=c[11752]|0;L10552:do{if((br|0)==2){c_=+h[bz>>3];if(by){dp=c_;be=0;while(1){cY=+h[dZ+(be<<3)>>3]-dq;cX=+h[dX+(be<<3)>>3]-c$;dw=+h[dW+(be<<3)>>3];dx=+Q(+(cY*cY+cX*cX));if(dx>0.0){d_=dx*dx*+_(+dx)}else{d_=0.0}dx=dp-dw*d_;bh=be+1|0;if((bh|0)<(dY|0)){dp=dx;be=bh}else{d$=dx;break}}}else{d$=c_}d0=d$+dq*+h[aR>>3]+c$*+h[bx>>3];d1=0.0}else{if(al){d0=0.0;d1=0.0;break}be=(br|0)==1;bh=c[11734]|0;dp=+(bh|0);dx=+h[5865];dw=+h[5864];cX=0.0;cY=0.0;bd=aQ;L10555:while(1){bc=c[bd+8>>2]|0;if((bc|0)>0){dy=cX;dv=cY;bb=0;d2=c[bd+12>>2]|0;while(1){d3=+h[d2+8>>3]-dq;if(be){d4=+P(+d3);d5=+P(+(+h[d2+16>>3]-c$));if((bh|0)==1){d6=d4+d5}else if((bh|0)==2){d6=d4*d4+d5*d5}else if((bh|0)==4){d7=d4*d4+d5*d5;d6=d7*d7}else if((bh|0)==8){d7=d4*d4+d5*d5;d8=d7*d7;d6=d8*d8}else if((bh|0)==16){d8=d4*d4+d5*d5;d7=d8*d8;d8=d7*d7;d6=d8*d8}else{d8=+R(+d4,+dp);d6=d8+ +R(+d5,+dp)}if(d6==0.0){break L10555}d9=+h[d2+24>>3]/d6;ea=1.0/d6}else{d5=(+h[d2+16>>3]-c$)/dw;d8=+P(+(d3/dx));d3=+P(+d5);do{if(d8>d3){eb=d8*+Q(+(d3*d3/(d8*d8)+1.0))}else{if(d5==0.0){eb=0.0;break}eb=d3*+Q(+(d8*d8/(d3*d3)+1.0))}}while(0);do{if((br|0)==3){ec=+Z(+(eb*(-0.0-eb)))}else if((br|0)==5){ec=1.0/(eb*eb+1.0)}else if((br|0)==4){ec=+Z(+(-0.0-eb))}else if((br|0)==6){ec=eb<1.0?1.0:0.0}else if((br|0)==7){if(eb>=1.0){ec=0.0;break}ec=(1.0- +S(+(eb*6.283185307179586)))*.5}else{ec=0.0}}while(0);d9=ec*+h[d2+24>>3];ea=ec}d3=dv+d9;d8=dy+ea;ba=bb+1|0;if((ba|0)<(bc|0)){dy=d8;dv=d3;bb=ba;d2=d2+64|0}else{ed=d8;ee=d3;break}}}else{ed=cX;ee=cY}bb=c[bd>>2]|0;if((bb|0)==0){d0=ee;d1=ed;break L10552}else{cX=ed;cY=ee;bd=bb}}c[bJ>>2]=2;d0=+h[d2+24>>3];d1=1.0}}while(0);c[bJ>>2]=0;h[bg+8>>3]=dq;h[bg+16>>3]=c$;br=c[200]|0;if(dq<+h[64664+(br*688&-1)>>3]){if((c[64648+(br*688&-1)>>2]&1|0)==0){au=7785}else{au=7779}}else{au=7779}do{if((au|0)==7779){au=0;if(dq>+h[64672+(br*688&-1)>>3]){if((c[64648+(br*688&-1)>>2]&2|0)==0){au=7785;break}}bd=c[144]|0;if(c$<+h[64664+(bd*688&-1)>>3]){if((c[64648+(bd*688&-1)>>2]&1|0)==0){au=7785;break}}if(c$<=+h[64672+(bd*688&-1)>>3]){ef=0;break}if((c[64648+(bd*688&-1)>>2]&2|0)==0){au=7785}else{ef=0}}}while(0);if((au|0)==7785){au=0;c[bJ>>2]=1;ef=1}do{if((c[11752]|0)==2){eg=d0}else{if((a[47016]&1)!=0){eg=d0;break}eg=d0/d1}}while(0);br=c[34]|0;L10616:do{if((br|0)!=99){if(!(eg>-8.988465674311579e+307&eg<8.988465674311579e+307)){c[bJ>>2]=2;break}do{if((a[64788+(br*688&-1)|0]&1)==0){h[bg+24>>3]=eg}else{if(eg<0.0){c[bJ>>2]=2;break L10616}if(eg==0.0){h[bg+24>>3]=-8.988465674311579e+307;c[bJ>>2]=1;break L10616}else{cY=+_(+eg);h[bg+24>>3]=cY/+h[64800+(br*688&-1)>>3];break}}}while(0);if((a[aj]&1)!=0){break}if((ef|0)!=0|(br|0)<0){break}bd=64712+(br*688&-1)|0;if(eg<+h[bd>>3]){h[bd>>3]=eg}bd=64664+(br*688&-1)|0;do{if(eg<+h[bd>>3]){if((c[64648+(br*688&-1)>>2]&1|0)==0){c[bJ>>2]=1;break L10616}if((c[64728+(br*688&-1)>>2]&1|0)==0){h[bd>>3]=eg;break}cY=+h[64736+(br*688&-1)>>3];if(cY>eg){h[bd>>3]=cY;c[bJ>>2]=1;break L10616}else{h[bd>>3]=eg;break}}}while(0);bd=64720+(br*688&-1)|0;if(eg>+h[bd>>3]){h[bd>>3]=eg}bd=64672+(br*688&-1)|0;if(eg<=+h[bd>>3]){break}if((c[64648+(br*688&-1)>>2]&2|0)==0){c[bJ>>2]=1;break}if((c[64732+(br*688&-1)>>2]&2|0)==0){h[bd>>3]=eg;break}cY=+h[64760+(br*688&-1)>>3];if(cY>3]=cY;c[bJ>>2]=1;break}else{h[bd>>3]=eg;break}}}while(0);if((a[bl]&1)!=0){au=7822;break L9498}br=c[bJ>>2]|0;L10663:do{if(eg>-8.988465674311579e+307&eg<8.988465674311579e+307){do{if((a[66852]&1)==0){h[bg+32>>3]=eg}else{if(eg<0.0){break L10663}if(eg==0.0){h[bg+32>>3]=-8.988465674311579e+307;break L10663}else{cY=+_(+eg);h[bg+32>>3]=cY/+h[8358];break}}}while(0);if(!((a[aj]&1)==0&(br|0)==0)){break}if(eg<+h[8347]){h[8347]=eg}do{if(eg<+h[8341]){if((c[16678]&1|0)==0){break L10663}if((c[16698]&1|0)==0){h[8341]=eg;break}cY=+h[8350];if(cY>eg){h[8341]=cY;break L10663}else{h[8341]=eg;break}}}while(0);if(eg>+h[8348]){h[8348]=eg}if(eg<=+h[8342]){break}if((c[16678]&2|0)==0){break}if((c[16699]&2|0)==0){h[8342]=eg;break}cY=+h[8353];if(cY>2]|0;bf=c[ei+12>>2]|0;if((bf|0)!=0){uu(bf)}uu(ei);if((ai|0)==0){break}else{ei=ai}}}}while(0);aj=c[200]|0;do{if(+h[64664+(aj*688&-1)>>3]==8.988465674311579e+307){au=7861}else{if(+h[64672+(aj*688&-1)>>3]==-8.988465674311579e+307){au=7861;break}bl=c[144]|0;if(+h[64664+(bl*688&-1)>>3]==8.988465674311579e+307){au=7861;break}if(+h[64672+(bl*688&-1)>>3]==-8.988465674311579e+307){au=7861;break}bl=c[34]|0;if(+h[64664+(bl*688&-1)>>3]==8.988465674311579e+307){au=7861;break}if(+h[64672+(bl*688&-1)>>3]==-8.988465674311579e+307){au=7861}}}while(0);if((au|0)==7861){au=0;uh(-1,105912,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}aj=c[ax>>2]|0;do{if((aj|0)<2){c[bu>>2]=0}else{if((c[bu>>2]|0)==0){break}if((a[38984]&1)!=0){break}bl=c[aw>>2]|0;aQ=c[bl+8>>2]|0;if((aQ|0)>0){al=0;ai=0;while(1){ej=hu(aj)|0;c[ej+8>>2]=aj;bf=c[aw>>2]|0;if((bf|0)!=0){bx=ej+12|0;aR=0;by=bf;while(1){uD((c[bx>>2]|0)+(aR<<6)|0,(c[by+12>>2]|0)+(ai<<6)|0,64);bf=c[by>>2]|0;if((bf|0)==0){break}else{aR=aR+1|0;by=bf}}}c[ej>>2]=al;by=ai+1|0;if((by|0)<(aQ|0)){al=ej;ai=by}else{break}}ek=ej;el=c[aw>>2]|0}else{ek=0;el=bl}ai=el;do{em=ai|0;ai=c[em>>2]|0;}while((ai|0)!=0);c[em>>2]=ek}}while(0);c[cF>>2]=c[13898];aw=c[7774]|0;if((aw|0)==0){en=0}else{en=c[aw+32>>2]|0}c[ag+248>>2]=en;if((c[ax>>2]|0)==0){c[ag+8>>2]=4}if((ag|0)!=(a$|0)){aw=ag+264|0;uB(aw|0,bo|0)}eo=ak+1|0;eq=ag|0;if((cI|0)==-1){break}aw=c[eq>>2]|0;do{if((aw|0)==0){uE(f|0,0,24);aj=ut(272)|0;if((aj|0)==0){gk();bu=ut(272)|0;if((bu|0)==0){au=7887;break L9498}else{er=bu}}else{er=aj}aj=er;uE(er|0,0,272);c[er+28>>2]=-2;bu=er+32|0;c[bu>>2]=0;c[bu+4>>2]=0;h[er+40>>3]=1.0;h[er+48>>3]=-2.0;bu=er+56|0;c[bu>>2]=c[f>>2];c[bu+4>>2]=c[f+4>>2];c[bu+8>>2]=c[f+8>>2];c[bu+12>>2]=c[f+12>>2];c[bu+16>>2]=c[f+16>>2];c[bu+20>>2]=c[f+20>>2];c[er+80>>2]=-1;c[er+84>>2]=0;bu=er+88|0;c[bu>>2]=c[12872];c[bu+4>>2]=c[12873];c[bu+8>>2]=c[12874];c[bu+12>>2]=c[12875];c[bu+16>>2]=c[12876];c[bu+20>>2]=c[12877];c[bu+24>>2]=c[12878];c[bu+28>>2]=c[12879];c[bu+32>>2]=c[12880];c[bu+36>>2]=c[12881];c[bu+40>>2]=c[12882];c[bu+44>>2]=c[12883];c[bu+48>>2]=c[12884];c[bu+52>>2]=c[12885];c[er+144>>2]=1;h[er+152>>3]=0.0;c[er+160>>2]=0;h[er+168>>3]=15.0;h[er+176>>3]=90.0;c[er+184>>2]=0;c[eq>>2]=aj;es=aj}else{aj=aw+16|0;bu=c[aj>>2]|0;if((bu|0)==0){es=aw;break}uu(bu);c[aj>>2]=0;es=aw}}while(0);c[es+8>>2]=3;aw=c[7774]|0;if((aw|0)==0){et=0}else{et=c[aw+32>>2]|0}c[es+248>>2]=et;aw=c[ah>>2]|0;c[es+12>>2]=aw;ax=es+24|0;c[ax>>2]=c[aP>>2];c[ax+4>>2]=c[aP+4>>2];c[ax+8>>2]=c[aP+8>>2];c[ax+12>>2]=c[aP+12>>2];c[ax+16>>2]=c[aP+16>>2];c[ax+20>>2]=c[aP+20>>2];c[ax+24>>2]=c[aP+24>>2];c[ax+28>>2]=c[aP+28>>2];c[ax+32>>2]=c[aP+32>>2];c[ax+36>>2]=c[aP+36>>2];c[ax+40>>2]=c[aP+40>>2];c[ax+44>>2]=c[aP+44>>2];c[ax+48>>2]=c[aP+48>>2];c[ax+52>>2]=c[aP+52>>2];if((aw|0)==368){uE(r|0,0,28);aw=ut(192)|0;if((aw|0)==0){gk();ax=ut(192)|0;if((ax|0)==0){au=7894;break L9498}else{eu=ax}}else{eu=aw}c[eu>>2]=0;c[eu+4>>2]=-1;c[eu+72>>2]=0;c[eu+88>>2]=0;uE(eu+8|0,0,60);c[eu+96>>2]=1;c[eu+144>>2]=4;c[eu+148>>2]=4;c[eu+152>>2]=4;aw=eu+156|0;c[aw>>2]=c[r>>2];c[aw+4>>2]=c[r+4>>2];c[aw+8>>2]=c[r+8>>2];c[aw+12>>2]=c[r+12>>2];c[aw+16>>2]=c[r+16>>2];c[aw+20>>2]=c[r+20>>2];c[aw+24>>2]=c[r+24>>2];a[eu+184|0]=0;aw=es+224|0;c[aw>>2]=eu;uD(eu|0,c[aT>>2]|0,192);c[c[aw>>2]>>2]=0}ak=eo;ag=c[eq>>2]|0}ez();ev=eq;ew=ag;ex=eo}else{c[a$+4>>2]=c[13898];ak=c[7774]|0;if((ak|0)==0){eA=0}else{eA=c[ak+32>>2]|0}c[a$+248>>2]=eA;ev=a$|0;ew=a$;ex=a0}ak=c[7774]|0;if((ak|0)==0){ay=ev;az=aK;aA=aX;aB=aZ;aC=0;aD=cA;aE=cB;aF=a_;aG=cs;aH=ct;aJ=ex;break}if((a[ak+38|0]&1)==0){ay=ev;az=aK;aA=aX;aB=aZ;aC=0;aD=cA;aE=cB;aF=a_;aG=cs;aH=ct;aJ=ex;break}c[ew+8>>2]=4;ay=ev;az=aK;aA=aX;aB=aZ;aC=0;aD=cA;aE=cB;aF=a_;aG=cs;aH=ct;aJ=ex}}while(0);do{if((aF|0)==0){if(ix(c[7774]|0)|0){c[13898]=az;eB=0;eD=az;break}p=c[7774]|0;if((p|0)!=0){af=p;while(1){p=c[af>>2]|0;uu(c[af+12>>2]|0);uu(af);if((p|0)==0){break}else{af=p}}}c[7774]=0;af=c[13898]|0;if((c[8272]|0)<=(af|0)){au=7924;break L9498}ag=c[1054]|0;if((a[ag+(af*40&-1)|0]&1)==0){au=7924;break L9498}p=c[ag+(af*40&-1)+36>>2]|0;ak=ag+(af*40&-1)+32|0;ag=c[10036]|0;aT=0;while(1){if((aT|0)>=(p|0)){break}if((a[ag+((c[ak>>2]|0)+aT|0)|0]|0)==(a[aT+148464|0]|0)){aT=aT+1|0}else{au=7924;break L9498}}if((aT|0)!=1){au=7924;break L9498}c[13898]=af+1;c[7774]=iw()|0;eB=0;eD=c[13898]|0}else{ak=c[13898]|0;if((c[8272]|0)<=(ak|0)){eE=az;eF=aA;eG=aB;eH=aC;eI=aF;eJ=aJ;au=7925;break L9498}ag=c[1054]|0;if((a[ag+(ak*40&-1)|0]&1)==0){eE=az;eF=aA;eG=aB;eH=aC;eI=aF;eJ=aJ;au=7925;break L9498}p=c[ag+(ak*40&-1)+36>>2]|0;aP=ag+(ak*40&-1)+32|0;ag=c[10036]|0;ah=0;while(1){if((ah|0)>=(p|0)){break}if((a[ag+((c[aP>>2]|0)+ah|0)|0]|0)==(a[ah+148464|0]|0)){ah=ah+1|0}else{eE=az;eF=aA;eG=aB;eH=aC;eI=aF;eJ=aJ;au=7925;break L9498}}if((ah|0)!=1){eE=az;eF=aA;eG=aB;eH=aC;eI=aF;eJ=aJ;au=7925;break L9498}aP=ak+1|0;c[13898]=aP;eB=aF;eD=aP}}while(0);if((eD|0)<(c[8272]|0)){N=aJ;O=aH;U=aG;V=eB;W=aE;X=aD;Y=aC;$=aB;ab=aA;ac=az;ad=ay;ae=eD}else{an=aC;ao=az;ap=aJ;aq=eB;ar=aB;as=aA;at=eD;au=6983;break}}do{if((au|0)==6983){if((ap|0)==0){q=at}else{eE=ao;eF=as;eG=ar;eH=an;eI=aq;eJ=ap;au=7925;break}uf(q,105216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==8108){eK=c[13898]|0;uf(eK,205152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==8109){uf(bQ,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==8110){uf(bQ,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==8111){uf(bQ,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==8112){uf(bQ,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==8113){uf(bQ,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==8114){uf(bQ,163568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==8116){i=b;return}else if((au|0)==6999){uf(c[13898]|0,92272,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7012){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=101304,v)|0)}else if((au|0)==7020){uf(c[13898]|0,84448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7022){uf(c[13898]|0,76512,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7088){uf(c[13898]|0,216936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7109){c[13898]=bR;au=7110}else if((au|0)==7167){uf(b8,143640,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7220){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=201712,v)|0)}else if((au|0)==7325){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=151256,v)|0)}else if((au|0)==7329){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=149424,v)|0)}else if((au|0)==7332){uf(cE,123192,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7335){uf(cE,121944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7380){uf(c[cF>>2]|0,114088,(v=i,i=i+8|0,c[v>>2]=c[11900],v)|0)}else if((au|0)==7385){uf(c[cF>>2]|0,110664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7391){uf(c[cF>>2]|0,110664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7396){uf(-1,107856,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7398){uf(c[cF>>2]|0,106920,(v=i,i=i+8|0,c[v>>2]=c[11900],v)|0)}else if((au|0)==7709){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=104328,v)|0)}else if((au|0)==7712){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=103864,v)|0)}else if((au|0)==7736){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=103496,v)|0)}else if((au|0)==7822){uf(-1,104872,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==7887){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=101304,v)|0)}else if((au|0)==7894){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=201712,v)|0)}else if((au|0)==7924){eD=a[32936]|0;if(aB){eN=eD&1;eO=eD;eP=az;eQ=aA;eR=aC;eS=0;eT=aJ;au=7928}else{eU=aJ}}}while(0);if((au|0)==7110){c[a4>>2]=0;eK=c[13898]|0;uf(eK,205152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if((au|0)==7925){eK=a[32936]|0;a4=eK&1;if(a4<<24>>24==0|(eI|0)==0){if(eG){eN=a4;eO=eK;eP=eE;eQ=eF;eR=eH;eS=eI;eT=eJ;au=7928;break}else{eU=eJ;break}}else{uf(-1,147440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((au|0)==7928){eJ=eN<<24>>24!=0;eI=eJ?9:2;eH=eJ?10:1;if(eJ){eV=eO}else{dc(2,145296);dc(1,143440);eV=a[32936]|0}do{if(!((eV&1)==0|eQ)){eJ=c[16506]|0;if((eJ&1|0)!=0){h[8255]=8.988465674311579e+307}if((eJ&2|0)!=0){h[8256]=-8.988465674311579e+307}eJ=c[16334]|0;if((eJ&1|0)!=0){h[8169]=8.988465674311579e+307}if((eJ&2|0)==0){break}h[8170]=-8.988465674311579e+307}}while(0);eg=+h[64664+(eI*688&-1)>>3];eJ=(a[64788+(eI*688&-1)|0]&1)==0;do{if(eJ){eW=+h[64672+(eI*688&-1)>>3];eX=eg}else{if(eg<=0.0){uk(210984,(v=i,i=i+24|0,c[v>>2]=141960,c[v+8>>2]=56832+(eI*24&-1),h[v+16>>3]=eg,v)|0)}d1=+_(+eg);d0=d1/+h[64800+(eI*688&-1)>>3];d1=+h[64672+(eI*688&-1)>>3];if(eJ){eW=d1;eX=d0;break}if(d1>0.0){ee=+_(+d1);eW=ee/+h[64800+(eI*688&-1)>>3];eX=d0;break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=141960,c[v+8>>2]=56832+(eI*24&-1),h[v+16>>3]=d1,v)|0)}}}while(0);eg=+h[64664+(eH*688&-1)>>3];eJ=(a[64788+(eH*688&-1)|0]&1)==0;do{if(eJ){eY=+h[64672+(eH*688&-1)>>3];eZ=eg}else{if(eg<=0.0){uk(210984,(v=i,i=i+24|0,c[v>>2]=140304,c[v+8>>2]=56832+(eH*24&-1),h[v+16>>3]=eg,v)|0)}d1=+_(+eg);d0=d1/+h[64800+(eH*688&-1)>>3];d1=+h[64672+(eH*688&-1)>>3];if(eJ){eY=d1;eZ=d0;break}if(d1>0.0){ee=+_(+d1);eY=ee/+h[64800+(eH*688&-1)>>3];eZ=d0;break}else{uk(210984,(v=i,i=i+24|0,c[v>>2]=140304,c[v+8>>2]=56832+(eH*24&-1),h[v+16>>3]=d1,v)|0)}}}while(0);if((c[6352]|0)<2|(c[6350]|0)<2|(c[9344]|0)<2|(c[9342]|0)<2){uf(-1,138240,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}eJ=c[10828]|0;c[13898]=o;c[7774]=iw()|0;eF=(a[38984]&1)==0;eg=eW-eX;d1=eY-eZ;eE=c[9342]|0;d0=d1/+((eF?c[6350]|0:eE)-1|0);eG=c[9344]|0;ee=eg/+((eF?c[6352]|0:eG)-1|0);ed=eg/+(eG-1|0);eg=d1/+(eE-1|0);eE=eP;eG=eJ;eJ=eR;eF=eS;L10882:while(1){eK=(eF|0)==0;a4=eE;aJ=eJ;L10884:while(1){aC=c[13898]|0;if(eK){e_=aJ?a4:aC}else{e_=a4}if((t9(aC)|0)==0){au=7968;break}dT();aC=c[13898]|0;if((c[8272]|0)<=(aC|0)){a4=e_;aJ=1;continue}aA=c[1054]|0;if((a[aA+(aC*40&-1)|0]&1)==0){a4=e_;aJ=1;continue}az=c[aA+(aC*40&-1)+36>>2]|0;aB=aA+(aC*40&-1)+32|0;aA=c[10036]|0;cF=0;while(1){if((cF|0)>=(az|0)){break}if((a[aA+((c[aB>>2]|0)+cF|0)|0]|0)==(a[cF+148464|0]|0)){cF=cF+1|0}else{a4=e_;aJ=1;continue L10884}}if((cF|0)==1){e$=eG;e0=aJ;e1=eF;e2=aC;break}else{a4=e_;aJ=1}}L10896:do{if((au|0)==7968){au=0;e3=c[13898]|0;if((e3|0)>=(c[8272]|0)){au=7975;break L10882}aJ=c[1054]|0;L10899:do{if((a[aJ+(e3*40&-1)|0]&1)==0){e4=0}else{a4=c[aJ+(e3*40&-1)+36>>2]|0;eK=aJ+(e3*40&-1)+32|0;ak=c[10036]|0;ah=0;while(1){if((ah|0)>=(a4|0)){break}if((a[ak+((c[eK>>2]|0)+ah|0)|0]|0)==(a[ah+103664|0]|0)){ah=ah+1|0}else{e4=0;break L10899}}e4=(ah|0)==1}}while(0);if(e4|(eG|0)==0){au=7975;break L10882}c[11670]=31112;do{if((iu(l)|0)==0){c[n>>2]=c[eG+260>>2];if((a[32936]&1)==0){e5=eF}else{e5=(eF+2|0)%3&-1}c[7780]=c[l>>2];aJ=eG+12|0;if((c[aJ>>2]|0)==352|(c[7662]|0)==1){e8=1}else{e8=(a[eG+56|0]&1)!=0}i1(e5,0,n,eH,eZ,eg,c[9342]|0,eI,eX,ee,(a[38984]&1)!=0?c[9344]|0:c[6352]|0,e8);if((a[38984]&1)!=0){e9=e5;break}if((c[aJ>>2]|0)==352|(c[7662]|0)==1){fa=1}else{fa=(a[eG+56|0]&1)!=0}i1(e5,1,n,eI,eX,ed,c[9344]|0,eH,eZ,d0,c[6350]|0,fa);e9=e5}else{e9=eF}}while(0);aJ=c[eG+4>>2]|0;c[13898]=aJ;aC=c[eG+248>>2]|0;cF=eG;while(1){eK=c[cF>>2]|0;if((eK|0)==0){e$=0;e0=0;e1=e9;e2=aJ;break L10896}if((c[eK+4>>2]|0)!=(aJ|0)){e$=eK;e0=0;e1=e9;e2=aJ;break L10896}if((c[eK+248>>2]|0)==(aC|0)){cF=eK}else{e$=eK;e0=0;e1=e9;e2=aJ;break}}}}while(0);aJ=(e1|0)==0;if(aJ){if(ix(c[7774]|0)|0){c[13898]=e_;eE=e_;eG=e$;eJ=e0;eF=0;continue}cF=c[7774]|0;if((cF|0)!=0){aC=cF;while(1){cF=c[aC>>2]|0;uu(c[aC+12>>2]|0);uu(aC);if((cF|0)==0){break}else{aC=cF}}}c[7774]=0;fb=c[13898]|0}else{fb=e2}if((c[8272]|0)<=(fb|0)){break}aC=c[1054]|0;if((a[aC+(fb*40&-1)|0]&1)==0){break}cF=c[aC+(fb*40&-1)+36>>2]|0;eK=aC+(fb*40&-1)+32|0;aC=c[10036]|0;ak=0;while(1){if((ak|0)>=(cF|0)){break}if((a[aC+((c[eK>>2]|0)+ak|0)|0]|0)==(a[ak+148464|0]|0)){ak=ak+1|0}else{break L10882}}if((ak|0)!=1){break}c[13898]=fb+1;if(!aJ){eE=e_;eG=e$;eJ=e0;eF=e1;continue}c[7774]=iw()|0;eE=e_;eG=e$;eJ=e0;eF=0}if((au|0)==7975){uh(e3,136552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[32936]&1)==0){eU=eT;break}eF=c[10828]|0;c[d>>2]=eF;L10947:do{if((eT|0)>0){eJ=0;eG=d;eE=0;eH=eF;eI=eT;eK=eT;while(1){if((c[eH+8>>2]|0)==2){aC=eH|0;cF=c[aC>>2]|0;a4=cF|0;aB=c[a4>>2]|0;aA=c[aB+260>>2]|0;az=eI-2|0;if((aA|0)!=0){cE=eH+260|0;b8=cF+260|0;bR=aA;while(1){aA=c[cE>>2]|0;bQ=c[b8>>2]|0;q=c[aA+12>>2]|0;ap=c[bQ+12>>2]|0;aq=c[bR+12>>2]|0;an=bR+8|0;if((c[an>>2]|0)>0){ar=0;do{h[aq+(ar<<6)+8>>3]=+h[q+(ar<<6)+24>>3];h[aq+(ar<<6)+16>>3]=+h[ap+(ar<<6)+24>>3];as=aq+(ar<<6)|0;ao=c[as>>2]|0;at=c[q+(ar<<6)>>2]|0;if(ao>>>0>>0){c[as>>2]=at;fc=at}else{fc=ao}ao=c[ap+(ar<<6)>>2]|0;if(fc>>>0>>0){c[as>>2]=ao}ar=ar+1|0;}while((ar|0)<(c[an>>2]|0))}an=c[bR>>2]|0;if((an|0)==0){break}else{cE=aA|0;b8=bQ|0;bR=an}}if((c[aC>>2]|0)!=(cF|0)){break}}c[a4>>2]=eE;c[eG>>2]=aB;fd=eH;fe=aB;ff=az;fg=az}else{fd=eE;fe=eH;ff=eI;fg=eK}bR=fe|0;b8=eJ+1|0;if((b8|0)<(ff|0)){eJ=b8;eG=bR;eE=fd;eH=c[bR>>2]|0;eI=ff;eK=fg}else{fh=bR;fi=fd;fj=fg;break L10947}}uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=125824,v)|0)}else{fh=d;fi=0;fj=eT}}while(0);c[fh>>2]=fi;c[10828]=c[d>>2];eU=fj}}while(0);if((eU|0)==0|(c[10828]|0)==0){uf(c[13898]|0,134776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}dc(2,133200);if((a[66036]&1)!=0){eZ=+h[8255];h[8255]=+h[8256];h[8256]=eZ}do{if((a[66164]&1)!=0){eZ=+h[8255];if(eZ<=0.0){uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56880,v)|0)}eX=+h[8256];if(eX>0.0){eY=+_(+eZ);eZ=+h[8272];h[8255]=eY/eZ;h[8256]=+_(+eX)/eZ;break}else{uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56880,v)|0)}}}while(0);dc(1,131808);if((a[65348]&1)!=0){eZ=+h[8169];h[8169]=+h[8170];h[8170]=eZ}do{if((a[65476]&1)!=0){eZ=+h[8169];if(eZ<=0.0){uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}eX=+h[8170];if(eX>0.0){eY=+_(+eZ);eZ=+h[8186];h[8169]=eY/eZ;h[8170]=+_(+eX)/eZ;break}else{uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}}}while(0);do{if((c[5094]|0)==0){dc(0,130544)}else{eZ=+h[8083];eX=+h[8084];if(eX-eZ!=0.0){break}fj=c[16162]|0;if((fj|0)==0){uf(-1,197584,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}if(eX==0.0){fk=1.0}else{fk=+P(+eX)*.01}if((fj&1|0)!=0){h[8083]=eZ-fk}if((fj&2|0)==0){break}h[8084]=fk+eX}}while(0);if((a[64660]&1)!=0){fk=+h[8083];h[8083]=+h[8084];h[8084]=fk}do{if((a[64788]&1)!=0){fk=+h[8083];if(fk<=0.0){uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}eX=+h[8084];if(eX>0.0){eZ=+_(+fk);fk=+h[8100];h[8083]=eZ/fk;h[8084]=+_(+eX)/fk;break}else{uf(-1,218096,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}}}while(0);dd(2,20);dd(1,20);dd(0,20);i6(eU,2);if(a[31104]|0){dk();dc(3,129504);dd(3,20)}do{if((c[16508]&1|0)!=0){fj=c[16506]|0;if((fj&1|0)!=0){h[8257]=+h[8255]}if((fj&2|0)==0){break}h[8258]=+h[8256]}}while(0);fj=c[10828]|0;if((fj|0)==0){uf(c[13898]|0,134776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[11690]|0)!=0&(eU|0)>0){d=fj;fj=0;while(1){fi=d+256|0;fh=c[fi>>2]|0;if((fh|0)!=0){eT=fh;while(1){fh=c[eT>>2]|0;uu(c[eT+4>>2]|0);uu(eT);if((fh|0)==0){break}else{eT=fh}}c[fi>>2]=0}eT=c[d+12>>2]|0;do{if(!((eT|0)==368|(eT|0)==225|(eT|0)==400|(eT|0)==416|(eT|0)==432)){if((a[d+237|0]&1)!=0){break}if((c[d+244>>2]|0)==0){uh(-1,128216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);break}if((c[d+8>>2]|0)==3){c[fi>>2]=ep(c[d+252>>2]|0,c[d+260>>2]|0)|0;break}else{c[fi>>2]=ep(c[9342]|0,c[d+260>>2]|0)|0;break}}}while(0);fi=fj+1|0;if((fi|0)<(eU|0)){d=c[d>>2]|0;fj=fi}else{break}}}fj=c[7738]|0;L11058:do{if((fj|0)!=-1){d=(c[13898]|0)-1|0;fi=c[1054]|0;eT=(c[fi+(d*40&-1)+36>>2]|0)+(c[fi+(d*40&-1)+32>>2]|0)|0;d=db(c[6924]|0,(eT+1|0)-(c[fi+(fj*40&-1)+32>>2]|0)|0,116456)|0;c[6924]=d;fi=c[(c[1054]|0)+(fj*40&-1)+32>>2]|0;L11060:do{if((fi|0)<(eT|0)){fh=fi;fg=d;while(1){fd=a[(c[10036]|0)+fh|0]|0;if(fd<<24>>24==0){fl=fg;break L11060}ff=fg+1|0;a[fg]=fd;fd=fh+1|0;if((fd|0)<(eT|0)){fh=fd;fg=ff}else{fl=ff;break}}}else{fl=d}}while(0);a[fl]=0;c[7738]=-1;d=c[6924]|0;eT=e6(126928)|0;if((eT|0)==0){break}fi=eT+8|0;do{if((a[fi]&1)==0){fg=c[eT+24>>2]|0;if((aY(fg|0,d|0)|0)==0){break L11058}fh=eT+16|0;if((c[fh>>2]|0)!=3){break}uu(fg);c[fh>>2]=1}else{a[fi]=0}}while(0);if((d|0)==0){fm=0}else{fm=bP(d|0)|0}c[eT+16>>2]=3;c[eT+24>>2]=fm}}while(0);c[7952]=eU;if((a[14112]&1)!=0){li(eU);i=b;return}fv(c[10828]|0,eU,0);fm=0;do{if((c[64656+(fm*688&-1)>>2]&1|0)!=0){fk=+h[64664+(fm*688&-1)>>3];if((a[64788+(fm*688&-1)|0]&1)==0){h[64696+(fm*688&-1)>>3]=fk;fn=+h[64672+(fm*688&-1)>>3]}else{eX=+h[64800+(fm*688&-1)>>3];h[64696+(fm*688&-1)>>3]=+Z(+(fk*eX));fn=+Z(+(+h[64672+(fm*688&-1)>>3]*eX))}h[64704+(fm*688&-1)>>3]=fn}fm=fm+1|0;}while(fm>>>0<11);e7(1);c[6930]=eU;c[6928]=3;i=b;return}function i$(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0,w=0,x=0.0;e=i;if((d|0)>0){f=0;g=b;while(1){b=c[g+12>>2]|0;do{if((b|0)==400|(b|0)==416|(b|0)==432){if((c[16507]|0)==0){break}f3(g,1)}else{j=c[g+260>>2]|0;if((j|0)==0){break}k=g+23|0;l=j;do{j=l+8|0;if((c[j>>2]|0)>0){m=l+12|0;n=0;do{o=c[m>>2]|0;p=o+(n<<6)|0;do{if((c[p>>2]|0)!=2){c[p>>2]=0;do{if((a[k]&1)==0){q=c[16507]|0;do{if((q&1|0)!=0){r=+h[o+(n<<6)+8>>3];if(r>=+h[8255]){break}h[8255]=r}}while(0);if((q&2|0)==0){break}r=+h[o+(n<<6)+8>>3];if(r<=+h[8256]){break}h[8256]=r}}while(0);r=+h[8255];s=+h[8256];t=+h[o+(n<<6)+8>>3];if(rs){u=8137}}else{if(tr){u=8137}}if((u|0)==8137){u=0;c[p>>2]=1;break}do{if((a[k]&1)==0){w=c[16335]|0;do{if((w&1|0)!=0){r=+h[o+(n<<6)+16>>3];if(r>=+h[8169]){break}h[8169]=r}}while(0);if((w&2|0)==0){break}r=+h[o+(n<<6)+16>>3];if(r<=+h[8170]){break}h[8170]=r}}while(0);r=+h[8169];t=+h[8170];s=+h[o+(n<<6)+16>>3];if(rt){u=8148}}else{if(sr){u=8148}}if((u|0)==8148){u=0;c[p>>2]=1;break}do{if((a[k]&1)==0){q=c[16163]|0;do{if((q&1|0)!=0){r=+h[o+(n<<6)+24>>3];if(r>=+h[8083]){break}h[8083]=r}}while(0);if((q&2|0)==0){break}r=+h[o+(n<<6)+24>>3];if(r<=+h[8084]){break}h[8084]=r}}while(0);r=+h[8083];s=+h[8084];t=+h[o+(n<<6)+24>>3];if(rs)){break}}else{if(!(tr)){break}}c[p>>2]=1}}while(0);n=n+1|0;}while((n|0)<(c[j>>2]|0))}l=c[l>>2]|0;}while((l|0)!=0)}}while(0);b=f+1|0;if((b|0)<(d|0)){f=b;g=c[g>>2]|0}else{break}}}dc(2,0);dc(1,0);r=+h[8083];t=+h[8084];if(t-r!=0.0){i=e;return}g=c[16162]|0;if((g|0)==0){uf(-1,197584,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}if(t==0.0){x=1.0}else{x=+P(+t)*.01}if((g&1|0)!=0){h[8083]=r-x}if((g&2|0)==0){i=e;return}h[8084]=x+t;i=e;return}function i0(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0;f=i;i=i+24|0;g=f|0;uE(g|0,0,24);j=ut(272)|0;do{if((j|0)==0){gk();k=ut(272)|0;if((k|0)!=0){l=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=101304,v)|0);return 0}else{l=j}}while(0);j=l;uE(l|0,0,272);c[l+28>>2]=-2;k=l+32|0;c[k>>2]=0;c[k+4>>2]=0;h[l+40>>3]=1.0;h[l+48>>3]=-2.0;k=l+56|0;c[k>>2]=c[g>>2];c[k+4>>2]=c[g+4>>2];c[k+8>>2]=c[g+8>>2];c[k+12>>2]=c[g+12>>2];c[k+16>>2]=c[g+16>>2];c[k+20>>2]=c[g+20>>2];c[l+80>>2]=-1;c[l+84>>2]=0;g=l+88|0;c[g>>2]=c[12872];c[g+4>>2]=c[12873];c[g+8>>2]=c[12874];c[g+12>>2]=c[12875];c[g+16>>2]=c[12876];c[g+20>>2]=c[12877];c[g+24>>2]=c[12878];c[g+28>>2]=c[12879];c[g+32>>2]=c[12880];c[g+36>>2]=c[12881];c[g+40>>2]=c[12882];c[g+44>>2]=c[12883];c[g+48>>2]=c[12884];c[g+52>>2]=c[12885];c[l+144>>2]=1;h[l+152>>3]=0.0;c[l+160>>2]=0;h[l+168>>3]=15.0;h[l+176>>3]=90.0;c[l+184>>2]=0;if(!((e|0)>0&(a|0)>0)){i=f;return j|0}if((b|0)>0){g=l+260|0;k=0;do{m=hu(d)|0;c[m>>2]=c[g>>2];c[g>>2]=m;k=k+1|0;}while((k|0)<(b|0))}b=l+260|0;l=0;do{k=hu(a)|0;c[k>>2]=c[b>>2];c[b>>2]=k;l=l+1|0;}while((l|0)<(e|0));i=f;return j|0}function i1(b,d,e,f,g,j,k,l,m,n,o,p){b=b|0;d=d|0;e=e|0;f=f|0;g=+g;j=+j;k=k|0;l=l|0;m=+m;n=+n;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0.0,X=0.0,Y=0,$=0.0,aa=0.0,ab=0,ac=0.0,ad=0,ae=0.0,af=0,ag=0;q=i;i=i+24|0;r=q|0;if(p){s=(b|0)==0|(a[32936]&1)==0}else{s=0}if((k|0)<=0){i=q;return}p=d&1;t=p^1;u=64788+(f*688&-1)|0;w=31136+(t*24&-1)|0;x=31144+(t*24&-1)|0;y=31152+(t*24&-1)|0;t=(o|0)>0;z=64788+(l*688&-1)|0;A=31136+(p*24&-1)|0;B=31144+(p*24&-1)|0;C=31152+(p*24&-1)|0;p=r|0;D=r+8|0;E=D;F=(b|0)==99;G=64788+(b*688&-1)|0;H=(b|0)<0;I=64712+(b*688&-1)|0;J=64664+(b*688&-1)|0;K=64648+(b*688&-1)|0;L=64728+(b*688&-1)|0;M=64736+(b*688&-1)|0;N=64720+(b*688&-1)|0;O=64672+(b*688&-1)|0;Q=64732+(b*688&-1)|0;R=64760+(b*688&-1)|0;S=64800+(b*688&-1)|0;b=r+8|0;T=D;D=r+16|0;U=64800+(l*688&-1)|0;l=64800+(f*688&-1)|0;f=c[(c[e>>2]|0)+12>>2]|0;V=0;L11194:while(1){W=+(V|0)*j+g;if((a[u]&1)==0){X=W}else{X=+Z(+(W*+h[l>>3]))}c[w>>2]=2;h[x>>3]=X;h[y>>3]=0.0;if(t){Y=0;do{$=+(Y|0)*n+m;if((a[z]&1)==0){aa=$}else{aa=+Z(+($*+h[U>>3]))}c[A>>2]=2;h[B>>3]=aa;h[C>>3]=0.0;ab=f+(Y<<6)+8|0;if(d){h[ab>>3]=W;h[f+(Y<<6)+16>>3]=$}else{h[ab>>3]=$;h[f+(Y<<6)+16>>3]=W}e4(c[7780]|0,r);L11209:do{if((a[1960]&1)==0){ab=c[p>>2]|0;if((ab|0)==2){ac=+h[D>>3]}else if((ab|0)==3){ad=8203;break L11194}else if((ab|0)==1){ac=0.0}else{ad=8204;break L11194}$=+P(+ac);if($>+h[11]){ad=8206;break}if((ab|0)==1){ae=+(c[E>>2]|0)}else if((ab|0)==2){ae=+h[b>>3]}else if((ab|0)==3){ae=+uz(c[T>>2]|0,0)}else{ad=8211;break L11194}ab=f+(Y<<6)|0;c[ab>>2]=0;L11220:do{if(!F){if(!(ae>-8.988465674311579e+307&ae<8.988465674311579e+307)){c[ab>>2]=2;break}do{if((a[G]&1)==0){h[f+(Y<<6)+24>>3]=ae}else{if(ae<0.0){c[ab>>2]=2;break L11220}if(ae==0.0){h[f+(Y<<6)+24>>3]=-8.988465674311579e+307;c[ab>>2]=1;break L11220}else{$=+_(+ae);h[f+(Y<<6)+24>>3]=$/+h[S>>3];break}}}while(0);if(H){break}if(ae<+h[I>>3]){h[I>>3]=ae}do{if(ae<+h[J>>3]){if((c[K>>2]&1|0)==0){c[ab>>2]=1;break L11220}if((c[L>>2]&1|0)==0){h[J>>3]=ae;break}$=+h[M>>3];if($>ae){h[J>>3]=$;c[ab>>2]=1;break L11220}else{h[J>>3]=ae;break}}}while(0);if(ae>+h[N>>3]){h[N>>3]=ae}if(ae<=+h[O>>3]){break}if((c[K>>2]&2|0)==0){c[ab>>2]=1;break}if((c[Q>>2]&2|0)==0){h[O>>3]=ae;break}$=+h[R>>3];if($>3]=$;c[ab>>2]=1;break}else{h[O>>3]=ae;break}}}while(0);if(!s){break}af=c[ab>>2]|0;if(!(ae>-8.988465674311579e+307&ae<8.988465674311579e+307)){break}do{if((a[66852]&1)==0){h[f+(Y<<6)+32>>3]=ae}else{if(ae<0.0){break L11209}if(ae==0.0){h[f+(Y<<6)+32>>3]=-8.988465674311579e+307;break L11209}else{$=+_(+ae);h[f+(Y<<6)+32>>3]=$/+h[8358];break}}}while(0);if((af|0)!=0){break}if(ae<+h[8347]){h[8347]=ae}do{if(ae<+h[8341]){if((c[16678]&1|0)==0){break L11209}if((c[16698]&1|0)==0){h[8341]=ae;break}$=+h[8350];if($>ae){h[8341]=$;break L11209}else{h[8341]=ae;break}}}while(0);if(ae>+h[8348]){h[8348]=ae}if(ae<=+h[8342]){break}if((c[16678]&2|0)==0){break}if((c[16699]&2|0)==0){h[8342]=ae;break}$=+h[8353];if($>2]=2}Y=Y+1|0;}while((Y|0)<(o|0))}c[(c[e>>2]|0)+8>>2]=o;Y=c[c[e>>2]>>2]|0;c[e>>2]=Y;if((Y|0)==0){ag=0}else{ag=c[Y+12>>2]|0}Y=V+1|0;if((Y|0)<(k|0)){f=ag;V=Y}else{ad=8276;break}}if((ad|0)==8211){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ad|0)==8204){uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ad|0)==8203){uh(-1,212704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uf(-1,212032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ad|0)==8276){i=q;return}}function i2(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0;c=+h[a+8>>3];d=+h[b+8>>3];if(c>d){e=1;return e|0}e=(c>31;return e|0}function i3(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0,L=0,M=0,N=0,O=0,P=0;b=i;i=i+32|0;d=b|0;e=b+16|0;if((a[30641]|0)!=100){i=b;return}f=c[12904]|0;g=c[6952]|0;do{if((f|0)>0&(g|0)!=0){j=g+(f*152&-1)|0;if((f|0)!=0){k=64664+((c[200]|0)*688&-1)|0;l=64664+((c[144]|0)*688&-1)|0;m=g;do{n=+h[k>>3];o=+h[91];p=+h[96];q=+h[l>>3];r=+h[21];s=+h[68];t=+h[5279];u=+h[2];v=+h[12];w=+h[405];x=+h[393];y=+h[397];z=+h[401];A=+h[406];B=+h[394];C=+h[398];D=+h[402];E=(+h[m+16>>3]-n)*o+p+-1.0;F=(+h[m+24>>3]-q)*r+s+-1.0;G=(+h[m+32>>3]-t)*u+v+-1.0;H=A+E*B+F*C+G*D;I=(w+E*x+F*y+G*z)/(H==0.0?1.0e-5:H);H=(+h[m+48>>3]-n)*o+p+-1.0;G=(+h[m+56>>3]-q)*r+s+-1.0;F=(+h[m+64>>3]-t)*u+v+-1.0;E=A+H*B+G*C+F*D;J=(w+H*x+G*y+F*z)/(E==0.0?1.0e-5:E);E=J>I?J:I;I=(+h[m+80>>3]-n)*o+p+-1.0;J=(+h[m+88>>3]-q)*r+s+-1.0;F=(+h[m+96>>3]-t)*u+v+-1.0;G=A+I*B+J*C+F*D;H=(w+I*x+J*y+F*z)/(G==0.0?1.0e-5:G);G=H>E?H:E;E=(+h[m+112>>3]-n)*o+p+-1.0;p=(+h[m+120>>3]-q)*r+s+-1.0;s=(+h[m+128>>3]-t)*u+v+-1.0;v=A+E*B+p*C+s*D;D=(w+E*x+p*y+s*z)/(v==0.0?1.0e-5:v);h[m+8>>3]=D>G?D:G;m=m+152|0;}while((m|0)!=(j|0))}bM(g|0,f|0,152,16);j=c[6952]|0;m=c[12904]|0;l=j+(m*152&-1)|0;if((m|0)!=0){m=d|0;k=d+8|0;K=d+4|0;L=e|0;M=e+4|0;N=e+8|0;O=j;do{G=+h[O>>3];do{if((a[54008]&1)==0){j=(c[3524]|0)+144|0;if((c[j>>2]|0)==0){break}c[m>>2]=5;h[k>>3]=G;c[K>>2]=0;cM[c[j>>2]&511](d)}else{j=(c[3524]|0)+144|0;if((c[j>>2]|0)==0){break}c[L>>2]=3;c[M>>2]=~~G;h[N>>3]=0.0;cM[c[j>>2]&511](e)}}while(0);if((c[7661]|0)<0){j=c[O+144>>2]|0;c[7654]=c[j>>2];c[30620>>2]=c[j+4>>2];c[30624>>2]=c[j+8>>2];c[30628>>2]=c[j+12>>2]}dy(O+16|0);O=O+152|0;}while((O|0)!=(l|0))}if((a[30641]|0)==100){P=c[6952]|0;break}else{i=b;return}}else{P=g}}while(0);if((P|0)!=0){uu(P)}c[6952]=0;c[18084]=0;c[12904]=0;i=b;return}function i4(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0,r=0.0,s=0.0,t=0,u=0.0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0.0,E=0,F=0,G=0.0,H=0.0,I=0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0,U=0,V=0,W=0,X=0;g=i;j=d<<2;k=ut(j)|0;do{if((k|0)==0){gk();l=ut(j)|0;if((l|0)!=0){m=l;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=224016,v)|0)}else{m=k}}while(0);k=m;c[e>>2]=k;L11355:do{if((a[30641]|0)!=97|(b|0)==0){n=0}else{o=0.0;p=0.0;e=b;m=d;L11356:while(1){j=(c[e+8>>2]|0)-1|0;do{if((j|0)<1){q=m;r=p;s=o}else{l=e+12|0;t=0;while(1){if((t|0)>(j|0)){u=o;break}w=c[l>>2]|0;if((c[w+(t<<6)>>2]|0)==2){t=t+1|0}else{x=8314;break}}if((x|0)==8314){x=0;y=(+h[w+(t<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;z=(+h[w+(t<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;A=(0.0- +h[5279])*+h[2]+ +h[12]+-1.0;B=+h[406]+y*+h[394]+z*+h[398]+A*+h[402];u=(+h[405]+y*+h[393]+z*+h[397]+A*+h[401])/(B==0.0?1.0e-5:B)}C=j;while(1){if((C|0)<=(t|0)){D=p;break}E=c[l>>2]|0;if((c[E+(C<<6)>>2]|0)==2){C=C-1|0}else{x=8318;break}}if((x|0)==8318){x=0;B=(+h[E+(C<<6)+8>>3]- +h[64664+((c[200]|0)*688&-1)>>3])*+h[91]+ +h[96]+-1.0;A=(+h[E+(C<<6)+16>>3]- +h[64664+((c[144]|0)*688&-1)>>3])*+h[21]+ +h[68]+-1.0;z=(0.0- +h[5279])*+h[2]+ +h[12]+-1.0;y=+h[406]+B*+h[394]+A*+h[398]+z*+h[402];D=(+h[405]+B*+h[393]+A*+h[397]+z*+h[401])/(y==0.0?1.0e-5:y)}if(+(C-t|0)<=+(j|0)*.1){q=m;r=D;s=u;break}c[f>>2]=D<=u&1;if((m|0)<3){q=m;r=D;s=u;break}F=64664+((c[200]|0)*688&-1)|0;G=+h[91];H=+h[96];I=64664+((c[144]|0)*688&-1)|0;J=+h[21];K=+h[68];y=(0.0- +h[5279])*+h[2]+ +h[12]+-1.0;L=+h[405];M=+h[393];N=+h[397];O=y*+h[401];P=+h[406];Q=+h[394];R=+h[398];S=y*+h[402];l=m;while(1){T=l-2|0;U=e;while(1){V=c[U>>2]|0;if((V|0)!=0&(T|0)!=0){T=T-1|0;U=V}else{break}}L11379:do{if((V|0)!=0){U=c[V+8>>2]|0;if((U|0)==0){break}T=V+12|0;W=t;while(1){if((W|0)>=(U|0)){break L11379}X=c[T>>2]|0;if((c[X+(W<<6)>>2]|0)==2){W=W+1|0}else{break L11356}}}}while(0);T=l-1|0;if((T|0)<3){q=T;r=D;s=u;break}else{l=T}}}}while(0);j=c[e>>2]|0;if((j|0)==0){n=0;break L11355}else{o=s;p=r;e=j;m=q-1|0}}p=(+h[X+(W<<6)+8>>3]- +h[F>>3])*G+H+-1.0;o=(+h[X+(W<<6)+16>>3]- +h[I>>3])*J+K+-1.0;y=P+p*Q+o*R+S;n=(L+p*M+o*N+O)/(y==0.0?1.0e-5:y)<=u&1}}while(0);if((d|0)<=0){i=g;return}I=(n|0)==1;n=0;W=b;b=d;while(1){d=b-1|0;X=a[30641]|0;do{if((X<<24>>24|0)==97){if(I){c[k+(d<<2)>>2]=W;break}else{c[k+(n<<2)>>2]=W;break}}else if((X<<24>>24|0)==102){c[k+(d<<2)>>2]=W}else{c[k+(n<<2)>>2]=W}}while(0);if((d|0)<=0){break}n=n+1|0;W=c[W>>2]|0;b=d}i=g;return}function i5(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0.0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0.0,aS=0,aT=0,aU=0.0,aV=0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a9=0,ba=0,bb=0.0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0.0,bn=0,bo=0,bp=0,bq=0.0,br=0.0,bs=0.0,bt=0.0,bu=0.0,bv=0.0,bw=0.0,bx=0.0,by=0.0,bz=0.0,bA=0.0,bB=0.0,bC=0.0,bD=0.0,bE=0.0,bF=0.0,bG=0.0,bH=0.0,bI=0.0,bJ=0.0,bK=0.0,bL=0.0,bM=0,bN=0.0,bO=0,bP=0.0,bQ=0.0,bR=0,bS=0,bT=0,bU=0.0,bV=0.0,bW=0.0,bX=0.0,bY=0.0,bZ=0.0,b_=0.0,b$=0.0,b0=0.0,b1=0.0,b2=0.0,b3=0.0,b4=0.0,b5=0,b6=0,b7=0,b8=0,b9=0.0,ca=0.0,cb=0.0,cc=0.0,cd=0.0,ce=0.0,cf=0.0,cg=0.0,ch=0.0,ci=0.0,cj=0.0,ck=0.0,cl=0.0,cm=0.0,cn=0.0,co=0.0,cp=0.0,cq=0.0,cr=0.0,cs=0.0,ct=0.0,cu=0.0,cv=0.0,cw=0.0,cx=0.0,cy=0.0,cz=0.0,cA=0,cB=0.0,cC=0,cD=0;d=i;i=i+224|0;e=d|0;f=d+16|0;g=d+32|0;j=d+48|0;k=d+64|0;l=d+80|0;m=d+88|0;n=d+96|0;o=b+264|0;p=(a[o]|0)==0?30632:o;o=a[p]|0;if(o<<24>>24==0){i=d;return}if((a[30641]|0)==100){q=o;r=8348}else{cM[c[(c[3524]|0)+168>>2]&511](12);o=a[p]|0;if(o<<24>>24!=0){q=o;r=8348}}L11410:do{if((r|0)==8348){o=n;s=b+239|0;t=b+64|0;u=t|0;w=b+72|0;x=b+24|0;y=k;z=k|0;A=k+4|0;B=b+260|0;C=b+252|0;D=g|0;E=g+8|0;F=g+4|0;G=j|0;H=j+4|0;I=j+8|0;J=n|0;K=n|0;L=n+8|0;M=n+32|0;N=n+40|0;R=n+64|0;S=n+72|0;T=n+96|0;U=n+104|0;V=n+16|0;W=n+48|0;X=n+80|0;Y=n+112|0;$=n+24|0;ab=n+56|0;ac=n+88|0;ad=n+120|0;ae=e|0;af=e+8|0;ag=e+4|0;ah=f|0;ai=f+4|0;aj=f+8|0;ak=0;al=q;L11412:while(1){am=al<<24>>24;c[l>>2]=0;an=a[s]|0;if((c[u>>2]|0)==3){ao=+h[w>>3]==-1.0&1}else{ao=0}a[54008]=ao;c[7644]=c[x>>2];c[7645]=c[x+4>>2];c[7646]=c[x+8>>2];c[7647]=c[x+12>>2];c[7648]=c[x+16>>2];c[7649]=c[x+20>>2];c[7650]=c[x+24>>2];c[7651]=c[x+28>>2];c[7652]=c[x+32>>2];c[7653]=c[x+36>>2];c[7654]=c[x+40>>2];c[7655]=c[x+44>>2];c[7656]=c[x+48>>2];c[7657]=c[x+52>>2];ap=c[7661]|0;if((ap|0)>0){lK(30576,ap)}c[y>>2]=c[7654];c[y+4>>2]=c[30620>>2];c[y+8>>2]=c[30624>>2];c[y+12>>2]=c[30628>>2];ap=c[7645]|0;do{if((c[7644]|0)!=0){aq=+h[3825];ar=c[(c[3524]|0)+92>>2]|0;if(aq<0.0){cK[ar&63](+h[3817]);break}else{cK[ar&63](aq);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[3824]);ar=c[(c[3524]|0)+64>>2]|0;if((ap|0)<-5){cM[ar&511](-2)}else{cM[ar&511](ap)}ar=c[3524]|0;do{if((a[30608]&1)==0){if((c[ar+96>>2]&1024|0)!=0){break}c[z>>2]=1;c[A>>2]=ap;r=8363}else{r=8363}}while(0);if((r|0)==8363){r=0;fn(k,ar)}do{if((am|0)==116|(am|0)==115|(am|0)==98){if((c[(c[3524]|0)+148>>2]|0)==0){break}if((am|0)==98){aq=+h[7076];h[Y>>3]=aq;h[X>>3]=aq;h[W>>3]=aq;h[V>>3]=aq}else if((am|0)==116){aq=+h[6915];h[Y>>3]=aq;h[X>>3]=aq;h[W>>3]=aq;h[V>>3]=aq}i4(c[B>>2]|0,c[C>>2]|0,m,l);ap=c[7664]|0;as=c[7665]|0;at=(ap|0)<1;au=(as|0)<1;do{if(at|au){av=(c[C>>2]|0)-1|0;if((av|0)>0){aw=c[m>>2]|0;ax=0;ay=0;az=0;while(1){aA=c[aw+(az<<2)>>2]|0;aB=c[aA+12>>2]|0;aC=c[aA+8>>2]|0;do{if((aC|0)>0){aA=0;aD=0;do{aA=((c[aB+(aD<<6)>>2]|0)==0&1)+aA|0;aD=aD+1|0;}while((aD|0)<(aC|0));if((aA|0)<=0){aE=ay;aF=ax;break}aE=ay+1|0;aF=(ax|0)>(aA|0)?ax:aA}else{aE=ay;aF=ax}}while(0);aC=az+1|0;if((aC|0)<(av|0)){ax=aF;ay=aE;az=aC}else{aG=aF;aH=aE;break}}}else{aG=0;aH=0}if(at){aI=~~(+O(+(+((((ap|0)==0?200:-ap|0)|0)/(aG|0)&-1|0)))+1.0)}else{aI=ap}if(!au){aJ=as;aK=aI;break}aJ=~~(+O(+(+((((as|0)==0?200:-as|0)|0)/(aH|0)&-1|0)))+1.0);aK=aI}else{aJ=as;aK=ap}}while(0);if((a[30641]|0)==100){if(((c[C>>2]|0)-1|0)>0){ap=c[m>>2]|0;as=(a[30640]|0)==0;au=0;while(1){at=au+1|0;az=c[(c[ap+(au<<2)>>2]|0)+8>>2]|0;ay=c[(c[ap+(at<<2)>>2]|0)+8>>2]|0;do{if(as){aL=ay;r=8387}else{if((az|0)==(ay|0)){aL=az;r=8387;break}aM=(((az|0)>(ay|0)?az:ay)-1|0)+(c[18084]|0)|0}}while(0);if((r|0)==8387){r=0;aM=((c[18084]|0)-1|0)+((az|0)<(aL|0)?az:aL)|0}c[18084]=aM;if((at|0)<((c[C>>2]|0)-1|0)){au=at}else{aN=aM;break}}}else{aN=c[18084]|0}au=aa(aa((aJ|0)>1?aJ:1,(aK|0)>1?aK:1),aN);c[18084]=au;c[6952]=db(c[6952]|0,au*152&-1,98184)|0}au=(aJ|0)>1;as=(aK|0)>1|au;do{if(as){ap=(aK<<2)+4|0;ay=ut(ap)|0;if((ay|0)==0){gk();ax=ut(ap)|0;if((ax|0)==0){r=8394;break L11412}else{aO=ax}}else{aO=ay}ay=aO;if((aK|0)<0){aP=ay;break}ax=(aJ<<5)+32|0;ap=0;while(1){av=ut(ax)|0;if((av|0)==0){gk();aw=ut(ax)|0;if((aw|0)==0){r=8399;break L11412}else{aQ=aw}}else{aQ=av}c[ay+(ap<<2)>>2]=aQ;av=ap+1|0;if((av|0)>(aK|0)){aP=ay;break}else{ap=av}}}else{aP=0}}while(0);ap=c[C>>2]|0;if((ap-1|0)>0){ay=c[m>>2]|0;ax=(aK|0)<2&(aJ|0)<2;at=an&1;az=at<<24>>24==0;av=as|al<<24>>24==115;aw=(aK|0)<0;aC=(aK|0)>0;aB=(aJ|0)>0;aq=+(aK|0);aD=at<<24>>24!=0;aR=+(aJ|0);at=(c[l>>2]|0)==0;aS=-999;aT=-999;aU=0.0;aV=0;aW=ap;while(1){ap=c[ay+(aV<<2)>>2]|0;aX=aV+1|0;aY=c[ay+(aX<<2)>>2]|0;aZ=c[ap+12>>2]|0;a_=c[aY+12>>2]|0;a$=a[30639]|0;if((a$<<24>>24|0)==114){a0=c[ap+8>>2]|0;a1=c[aY+8>>2]|0;a2=a0-a1|0;a3=(a2|0)>-1?a2:-a2|0;a4=a0;a5=a1}else if((a$<<24>>24|0)==99){a$=c[ap+8>>2]|0;a1=c[aY+8>>2]|0;a0=a$-a1|0;a3=(((a0|0)>-1?a0:-a0|0)|0)/2&-1;a4=a$;a5=a1}else{a3=0;a4=c[ap+8>>2]|0;a5=c[aY+8>>2]|0}a1=ap+8|0;ap=aY+8|0;aY=(a4|0)<(a5|0)?a4:a5;a$=aY-2|0;if((a[30640]|0)!=0&(a4|0)!=(a5|0)){a6=(a4|0)>(a5|0)?a4:a5;a7=a$+a3|0;a9=a3;ba=1}else{a6=aY;a7=aT;a9=aS;ba=0}aY=a6-1|0;if((aY|0)>0){a0=(1-a3|0)+a7|0;a2=ba?a3:0;bb=aU;bc=0;while(1){do{if(ba){if(!((bc|0)<(a9|0)|(bc|0)>(a7|0))){r=8416;break}bd=(bc|0)>(a9|0)?a0:0;be=bd;bf=bd;bg=bc}else{r=8416}}while(0);if((r|0)==8416){r=0;bd=bc-a2|0;if((a[30641]|0)==97){bh=at?bd:a$-bd|0}else{bh=bd}be=bh;bf=bh+1|0;bg=bh+a3|0}bd=bg+1|0;bi=(c[a1>>2]|0)>(c[ap>>2]|0);bj=bi?bf:bd;bk=bi?be:bg;bl=bi?bd:bf;bd=bi?bg:be;bi=c[aZ+(bd<<6)>>2]|0;do{if((a[30642]|0)==52){if((bi|0)!=0){bm=bb;break}if((c[aZ+(bl<<6)>>2]|0)!=0){bm=bb;break}if((c[a_+(bk<<6)>>2]|0)!=0){bm=bb;break}if((c[a_+(bj<<6)>>2]|0)==0){r=8429}else{bm=bb}}else{if((bi|0)==2){bm=bb;break}bn=c[aZ+(bl<<6)>>2]|0;if((bn|0)==2){bm=bb;break}bo=c[a_+(bk<<6)>>2]|0;if((bo|0)==2){bm=bb;break}bp=c[a_+(bj<<6)>>2]|0;if((bp|0)==2){bm=bb;break}if((bi|0)==1&(bn|0)==1&(bo|0)==1&(bp|0)==1){bm=bb}else{r=8429}}}while(0);do{if((r|0)==8429){r=0;bi=(a[30641]|0)==100;do{if(ax|bi){do{if(az){bq=+h[aZ+(bd<<6)+24>>3];bp=c[34]|0;bo=(a[64788+(bp*688&-1)|0]&1)==0;bn=(a[66852]&1)==0;L11530:do{if(bo){do{if(bn){br=bq}else{if(bq>0.0){bs=+_(+bq);br=bs/+h[8358];break}else{bt=+h[8341];r=8443;break L11530}}}while(0);bu=br;bv=+h[aZ+(bl<<6)+24>>3];r=8444}else{if(bn){bt=+Z(+(bq*+h[64800+(bp*688&-1)>>3]));r=8443;break}if(+h[64792+(bp*688&-1)>>3]==+h[8357]){bw=bq}else{bw=bq*+h[64800+(bp*688&-1)>>3]/+h[8358]}bx=bw;by=+h[aZ+(bl<<6)+24>>3];r=8445}}while(0);if((r|0)==8443){r=0;bq=+h[aZ+(bl<<6)+24>>3];if(bo){bu=bt;bv=bq;r=8444}else{bx=bt;by=bq;r=8445}}do{if((r|0)==8444){r=0;if(bn){bz=bv;bA=bu;break}if(bv>0.0){bq=+_(+bv);bz=bq/+h[8358];bA=bu;break}else{bz=+h[8341];bA=bu;break}}else if((r|0)==8445){r=0;if(bn){bz=+Z(+(by*+h[64800+(bp*688&-1)>>3]));bA=bx;break}if(+h[64792+(bp*688&-1)>>3]==+h[8357]){bz=by;bA=bx;break}bz=by*+h[64800+(bp*688&-1)>>3]/+h[8358];bA=bx}}while(0);bq=+h[a_+(bk<<6)+24>>3];L11559:do{if(bo){do{if(bn){bB=bq}else{if(bq>0.0){bs=+_(+bq);bB=bs/+h[8358];break}else{bC=+h[8341];r=8463;break L11559}}}while(0);bD=bB;bE=+h[a_+(bj<<6)+24>>3];r=8464}else{if(bn){bC=+Z(+(bq*+h[64800+(bp*688&-1)>>3]));r=8463;break}if(+h[64792+(bp*688&-1)>>3]==+h[8357]){bF=bq}else{bF=bq*+h[64800+(bp*688&-1)>>3]/+h[8358]}bG=bF;bH=+h[a_+(bj<<6)+24>>3];r=8465}}while(0);if((r|0)==8463){r=0;bq=+h[a_+(bj<<6)+24>>3];if(bo){bD=bC;bE=bq;r=8464}else{bG=bC;bH=bq;r=8465}}if((r|0)==8464){r=0;if(bn){bI=bE;bJ=bD;bK=bz;bL=bA;break}if(bE>0.0){bq=+_(+bE);bI=bq/+h[8358];bJ=bD;bK=bz;bL=bA;break}else{bI=+h[8341];bJ=bD;bK=bz;bL=bA;break}}else if((r|0)==8465){r=0;if(bn){bI=+Z(+(bH*+h[64800+(bp*688&-1)>>3]));bJ=bG;bK=bz;bL=bA;break}if(+h[64792+(bp*688&-1)>>3]==+h[8357]){bI=bH;bJ=bG;bK=bz;bL=bA;break}bI=bH*+h[64800+(bp*688&-1)>>3]/+h[8358];bJ=bG;bK=bz;bL=bA;break}}else{bI=+h[a_+(bj<<6)+32>>3];bJ=+h[a_+(bk<<6)+32>>3];bK=+h[aZ+(bl<<6)+32>>3];bL=+h[aZ+(bd<<6)+32>>3]}}while(0);bM=c[7663]|0;do{if((bM|0)==5){bq=bL*bK*bJ*bI;if(bq==0.0){bN=0.0;break}bs=+Q(+(+Q(+(+P(+bq)))));if(((((bK<0.0&1)+(bL<0.0&1)|0)+(bJ<0.0&1)|0)+(bI<0.0&1)|0)<3){bN=bs;break}bN=-0.0-bs}else if((bM|0)==6){bO=bL>bK;bs=bO?bK:bL;bq=bO?bL:bK;bO=bJ>bI;bP=bO?bI:bJ;bQ=bO?bJ:bI;bN=((bsbK?bL:bK;bQ=bJ>bI?bJ:bI;bN=bq>bQ?bq:bQ}else if((bM|0)==1){bN=bK}else if((bM|0)==2){bN=bJ}else if((bM|0)==3){bN=bI}else if((bM|0)==0){bN=bL}else{if((a[54008]&1)==0){bN=(bL+bK+bJ+bI)*.25;break}else{bO=~~bL;bR=~~bK;bS=~~bJ;bT=~~bI;bN=+(((((bR&16711680)+(bO&16711680)|0)+(bS&16711680)|0)+(bT&16711680)|0)>>>2&16711680|((((bR&65280)+(bO&65280)|0)+(bS&65280)|0)+(bT&65280)|0)>>>2&65280|((((bR&255)+(bO&255)|0)+(bS&255)|0)+(bT&255)|0)>>>2&255|0);break}}}while(0);bM=(a[54008]&1)==0;do{if(bM){bQ=+h[8341];if(bQ>=bN){bU=+((a[20668]|0)!=112&1|0);break}bq=+h[8342];if(bq<=bN){bU=+((a[20668]|0)==112&1|0);break}bs=(bN-bQ)/(bq-bQ);if((a[20668]|0)==112){bU=bs;break}bU=1.0-bs}else{bU=bN}}while(0);if(bi){bV=bU;break}if(bM){bT=(c[3524]|0)+144|0;if((c[bT>>2]|0)==0){bV=bU;break}c[D>>2]=5;h[E>>3]=bU;c[F>>2]=0;cM[c[bT>>2]&511](g);bV=bU;break}else{bT=(c[3524]|0)+144|0;if((c[bT>>2]|0)==0){bV=bU;break}c[G>>2]=3;c[H>>2]=~~bU;h[I>>3]=0.0;cM[c[bT>>2]&511](j);bV=bU;break}}else{bV=bb}}while(0);bs=+h[aZ+(bd<<6)+8>>3];h[K>>3]=bs;bQ=+h[aZ+(bd<<6)+16>>3];h[L>>3]=bQ;bq=+h[a_+(bk<<6)+8>>3];h[M>>3]=bq;bP=+h[a_+(bk<<6)+16>>3];h[N>>3]=bP;bW=+h[a_+(bj<<6)+8>>3];h[R>>3]=bW;bX=+h[a_+(bj<<6)+16>>3];h[S>>3]=bX;bY=+h[aZ+(bl<<6)+8>>3];h[T>>3]=bY;bZ=+h[aZ+(bl<<6)+16>>3];h[U>>3]=bZ;do{if(av){h[V>>3]=+h[aZ+(bd<<6)+24>>3];h[W>>3]=+h[a_+(bk<<6)+24>>3];h[X>>3]=+h[a_+(bj<<6)+24>>3];h[Y>>3]=+h[aZ+(bl<<6)+24>>3];if(az){break}h[$>>3]=+h[aZ+(bd<<6)+32>>3];h[ab>>3]=+h[a_+(bk<<6)+32>>3];h[ac>>3]=+h[a_+(bj<<6)+32>>3];h[ad>>3]=+h[aZ+(bl<<6)+32>>3]}}while(0);if(!as){if((a[30641]|0)==100){bi=c[6952]|0;aA=c[12904]|0;uD(bi+(aA*152&-1)+16|0,o|0,128);h[bi+(aA*152&-1)>>3]=bV;c[bi+(aA*152&-1)+144>>2]=t;c[12904]=(c[12904]|0)+1;bm=bV;break}else{dy(J);bm=bV;break}}if(!aw){b_=+h[Y>>3];b$=+h[V>>3];b0=+h[X>>3];b1=+h[W>>3];aA=0;do{b2=+(aA|0);bi=aP+(aA<<2)|0;h[c[bi>>2]>>3]=bs+b2*((bY-bs)/aq);h[(c[bi>>2]|0)+(aJ<<5)>>3]=bq+b2*((bW-bq)/aq);h[(c[bi>>2]|0)+8>>3]=bQ+b2*((bZ-bQ)/aq);h[(c[bi>>2]|0)+(aJ<<5)+8>>3]=bP+b2*((bX-bP)/aq);h[(c[bi>>2]|0)+16>>3]=b$+b2*((b_-b$)/aq);h[(c[bi>>2]|0)+(aJ<<5)+16>>3]=b1+b2*((b0-b1)/aq);if(aD){b3=+h[$>>3];h[(c[bi>>2]|0)+24>>3]=b3+b2*((+h[ad>>3]-b3)/aq);b3=+h[ab>>3];h[(c[bi>>2]|0)+(aJ<<5)+24>>3]=b3+b2*((+h[ac>>3]-b3)/aq)}if(au){bT=1;do{bS=c[bi>>2]|0;b3=+h[bS>>3];b2=+(bT|0);h[bS+(bT<<5)>>3]=b3+b2*((+h[bS+(aJ<<5)>>3]-b3)/aR);bS=c[bi>>2]|0;b3=+h[bS+8>>3];h[bS+(bT<<5)+8>>3]=b3+b2*((+h[bS+(aJ<<5)+8>>3]-b3)/aR);bS=c[bi>>2]|0;b3=+h[bS+16>>3];h[bS+(bT<<5)+16>>3]=b3+b2*((+h[bS+(aJ<<5)+16>>3]-b3)/aR);if(aD){bS=c[bi>>2]|0;b3=+h[bS+24>>3];h[bS+(bT<<5)+24>>3]=b3+b2*((+h[bS+(aJ<<5)+24>>3]-b3)/aR)}bT=bT+1|0;}while((bT|0)<(aJ|0))}aA=aA+1|0;}while((aA|0)<=(aK|0))}if(aC){b4=bV;b5=0}else{bm=bV;break}while(1){if(aB){aA=aP+(b5<<2)|0;bT=b5+1|0;bi=aP+(bT<<2)|0;bM=0;while(1){bS=c[aA>>2]|0;h[K>>3]=+h[bS+(bM<<5)>>3];h[L>>3]=+h[bS+(bM<<5)+8>>3];b1=+h[bS+(bM<<5)+16>>3];h[V>>3]=b1;bO=c[bi>>2]|0;h[M>>3]=+h[bO+(bM<<5)>>3];h[N>>3]=+h[bO+(bM<<5)+8>>3];b0=+h[bO+(bM<<5)+16>>3];h[W>>3]=b0;bR=bM+1|0;h[R>>3]=+h[bO+(bR<<5)>>3];h[S>>3]=+h[bO+(bR<<5)+8>>3];b$=+h[bO+(bR<<5)+16>>3];h[X>>3]=b$;h[T>>3]=+h[bS+(bR<<5)>>3];h[U>>3]=+h[bS+(bR<<5)+8>>3];b_=+h[bS+(bR<<5)+16>>3];h[Y>>3]=b_;L11652:do{if(az){b6=c[34]|0;b7=(a[64788+(b6*688&-1)|0]&1)==0;b8=(a[66852]&1)==0;do{if(b7){if(b8){b9=b_;ca=b$;cb=b0;cc=b1;break L11652}if(b1>0.0){bP=+_(+b1);cd=bP/+h[8358];r=8531;break}else{ce=+h[8341];r=8526;break}}else{if(b8){ce=+Z(+(b1*+h[64800+(b6*688&-1)>>3]));r=8526;break}bP=+h[64792+(b6*688&-1)>>3];bX=+h[8357];if(bP==bX){cf=b1;cg=bP;ch=bX;r=8534;break}cf=b1*+h[64800+(b6*688&-1)>>3]/+h[8358];cg=bP;ch=bX;r=8534}}while(0);do{if((r|0)==8526){r=0;if(b7){if(b8){b9=b_;ca=b$;cb=b0;cc=ce;break L11652}else{cd=ce;r=8531;break}}if(b8){ci=+Z(+(b0*+h[64800+(b6*688&-1)>>3]));cj=ce;r=8539;break}else{cf=ce;cg=+h[64792+(b6*688&-1)>>3];ch=+h[8357];r=8534;break}}}while(0);do{if((r|0)==8531){r=0;if(b0>0.0){bX=+_(+b0);ck=bX/+h[8358];cl=cd;r=8536;break}else{ck=+h[8341];cl=cd;r=8536;break}}else if((r|0)==8534){r=0;if(cg==ch){ck=b0;cl=cf;r=8536;break}ck=b0*+h[64800+(b6*688&-1)>>3]/+h[8358];cl=cf;r=8536}}while(0);do{if((r|0)==8536){r=0;if(!b7){if(b8){ci=ck;cj=cl;r=8539;break}bX=+h[64792+(b6*688&-1)>>3];bP=+h[8357];if(bX==bP){cm=b$;cn=cl;co=ck;cp=bX;cq=bP;r=8553;break}cm=b$*+h[64800+(b6*688&-1)>>3]/+h[8358];cn=cl;co=ck;cp=bX;cq=bP;r=8553;break}if(b8){b9=b_;ca=b$;cb=ck;cc=cl;break L11652}if(b$>0.0){bP=+_(+b$);cr=ck;cs=cl;ct=bP/+h[8358];break}else{cu=+h[8341];cv=cl;cw=ck;r=8545;break}}}while(0);if((r|0)==8539){r=0;cu=+Z(+(b$*+h[64800+(b6*688&-1)>>3]));cv=cj;cw=ci;r=8545}do{if((r|0)==8545){r=0;if(b7){if(b8){b9=b_;ca=cu;cb=cw;cc=cv;break L11652}else{cr=cw;cs=cv;ct=cu;break}}if(b8){b9=+Z(+(b_*+h[64800+(b6*688&-1)>>3]));ca=cu;cb=cw;cc=cv;break L11652}else{cm=cu;cn=cv;co=cw;cp=+h[64792+(b6*688&-1)>>3];cq=+h[8357];r=8553;break}}}while(0);if((r|0)==8553){r=0;if(cp==cq){b9=b_;ca=cm;cb=co;cc=cn;break}b9=b_*+h[64800+(b6*688&-1)>>3]/+h[8358];ca=cm;cb=co;cc=cn;break}if(b_>0.0){bP=+_(+b_);b9=bP/+h[8358];ca=ct;cb=cr;cc=cs;break}else{b9=+h[8341];ca=ct;cb=cr;cc=cs;break}}else{bP=+h[bS+(bM<<5)+24>>3];h[$>>3]=bP;bX=+h[bO+(bM<<5)+24>>3];h[ab>>3]=bX;bQ=+h[bO+(bR<<5)+24>>3];h[ac>>3]=bQ;bZ=+h[bS+(bR<<5)+24>>3];h[ad>>3]=bZ;b9=bZ;ca=bQ;cb=bX;cc=bP}}while(0);bS=c[7663]|0;do{if((bS|0)==4){cx=(cc+cb+ca+b9)*.25}else if((bS|0)==5){b_=cc*cb*ca*b9;if(b_==0.0){cx=0.0;break}b$=+Q(+(+Q(+(+P(+b_)))));if(((((cb<0.0&1)+(cc<0.0&1)|0)+(ca<0.0&1)|0)+(b9<0.0&1)|0)<3){cx=b$;break}cx=-0.0-b$}else if((bS|0)==6){bO=cc>cb;b$=bO?cb:cc;b_=bO?cc:cb;bO=ca>b9;b0=bO?b9:ca;b1=bO?ca:b9;cx=((b$cb?cc:cb;b1=ca>b9?ca:b9;cx=b_>b1?b_:b1}else if((bS|0)==1){cx=cb}else if((bS|0)==2){cx=ca}else if((bS|0)==3){cx=b9}else if((bS|0)==0){cx=cc}else{r=8566;break L11412}}while(0);bS=(a[54008]&1)==0;do{if(bS){b1=+h[8341];if(b1>=cx){cy=+((a[20668]|0)!=112&1|0);break}b_=+h[8342];if(b_<=cx){cy=+((a[20668]|0)==112&1|0);break}b$=(cx-b1)/(b_-b1);if((a[20668]|0)==112){cy=b$;break}cy=1.0-b$}else{cy=cx}}while(0);if((a[30641]|0)==100){bO=c[6952]|0;bp=c[12904]|0;uD(bO+(bp*152&-1)+16|0,o|0,128);h[bO+(bp*152&-1)>>3]=cy;c[bO+(bp*152&-1)+144>>2]=t;c[12904]=(c[12904]|0)+1}else{do{if(bS){bp=(c[3524]|0)+144|0;if((c[bp>>2]|0)==0){break}c[ae>>2]=5;h[af>>3]=cy;c[ag>>2]=0;cM[c[bp>>2]&511](e)}else{bp=(c[3524]|0)+144|0;if((c[bp>>2]|0)==0){break}c[ah>>2]=3;c[ai>>2]=~~cy;h[aj>>3]=0.0;cM[c[bp>>2]&511](f)}}while(0);dy(J)}if((bR|0)<(aJ|0)){bM=bR}else{cz=cy;cA=bT;break}}}else{cz=b4;cA=b5+1|0}if((cA|0)<(aK|0)){b4=cz;b5=cA}else{bm=cz;break}}}}while(0);bl=bc+1|0;if((bl|0)<(aY|0)){bb=bm;bc=bl}else{break}}cB=bm;cC=c[C>>2]|0}else{cB=aU;cC=aW}if((aX|0)<(cC-1|0)){aS=a9;aT=a7;aU=cB;aV=aX;aW=cC}else{break}}}if((aP|0)!=0){if((aK|0)>=0){aW=0;do{uu(c[aP+(aW<<2)>>2]|0);aW=aW+1|0;}while((aW|0)<=(aK|0))}uu(aP)}uu(c[m>>2]|0)}}while(0);ak=ak+1|0;al=a[p+ak|0]|0;if(al<<24>>24==0){break L11410}}if((r|0)==8394){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=92248,v)|0)}else if((r|0)==8399){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=84424,v)|0)}else if((r|0)==8566){uf(-1,76496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((a8(p|0,67)|0)!=0){r=c[11690]|0;if((r&2|0)==0){cD=r}else{i7(b,2);cD=c[11690]|0}if((cD&1|0)==0){break}i7(b,1)}}while(0);if((a[30641]|0)==100){i=d;return}cM[c[(c[3524]|0)+168>>2]&511](13);i=d;return}function i6(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=c[10828]|0;f=c[10814]|0;g=c[10822]|0;a[31104]=1;if((c[7662]|0)==1){return}L11775:do{if((d|0)==1){if((f|0)==0){h=0;break}else{i=f}while(1){if((c[i+12>>2]|0)==400){j=8642;break}if((a[i+56|0]&1)!=0){if((c[i+64>>2]|0)>3){j=8637;break}}k=c[i+224>>2]|0;if((k|0)!=0){if(((c[k+72>>2]|0)-4|0)>>>0<3){j=8640;break}}k=c[i>>2]|0;if((k|0)==0){j=8614;break L11775}else{i=k}}if((j|0)==8637){return}else if((j|0)==8640){return}else if((j|0)==8642){return}}else{j=8614}}while(0);L11790:do{if((j|0)==8614){i=(d|0)==2;if(!i){h=0;break}if((b|0)>0){l=e;m=1}else{h=1;break}while(1){f=c[l+12>>2]|0;if((f|0)==352|(f|0)==400){j=8638;break}if((a[l+56|0]&1)!=0){if(((c[l+64>>2]|0)-1|0)>>>0>=3){j=8644;break}}f=c[l+224>>2]|0;if((f|0)!=0){if((c[f+72>>2]|0)>3){j=8645;break}}if((m|0)<(b|0)){l=c[l>>2]|0;m=m+1|0}else{h=i;break L11790}}if((j|0)==8638){return}else if((j|0)==8644){return}else if((j|0)==8645){return}}}while(0);L11807:do{if((g|0)!=0){j=g;while(1){if(((c[j+72>>2]|0)-4|0)>>>0<3){break}j=c[j>>2]|0;if((j|0)==0){break L11807}}return}}while(0);if(((c[1122]|0)-4|0)>>>0<3){return}if(((c[16632]|0)-4|0)>>>0<3){return}if(((c[16460]|0)-4|0)>>>0<3){return}if(((c[17320]|0)-4|0)>>>0<3){return}if(((c[17148]|0)-4|0)>>>0<3){return}do{if(h){if(((c[16288]|0)-4|0)>>>0>=3){break}return}}while(0);if(((c[16804]|0)-4|0)>>>0<3){return}a[31104]=0;return}function i7(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0;e=i;i=i+16|0;f=e|0;g=(a[b+239|0]&1)==0;if((b|0)==0){i=e;return}j=c[b+256>>2]|0;if((j|0)==0){i=e;return}if((d-1|0)>>>0>1){i=e;return}if((c[(c[3524]|0)+148>>2]|0)==0){i=e;return}b=(d|0)==2;d=f|0;k=f+8|0;l=f+4|0;m=j;do{j=m+44|0;n=m+4|0;o=+h[(c[n>>2]|0)+24>>3];p=m+9|0;bD(135272,(v=i,i=i+24|0,c[v>>2]=c[j>>2],h[v+8>>3]=o,c[v+16>>2]=(p|0)==0?122416:p,v)|0);do{if((a[m+8|0]|0)!=0){bJ(14200);p=c[n>>2]|0;do{if(g){o=+h[p+24>>3];q=c[34]|0;r=(a[66852]&1)==0;do{if((a[64788+(q*688&-1)|0]&1)==0){if(r){s=o;break}if(o>0.0){t=+_(+o);s=t/+h[8358];break}else{s=+h[8341];break}}else{if(r){s=+Z(+(o*+h[64800+(q*688&-1)>>3]));break}if(+h[64792+(q*688&-1)>>3]==+h[8357]){s=o;break}s=o*+h[64800+(q*688&-1)>>3]/+h[8358]}}while(0);o=+h[8341];if(o>=s){u=+((a[20668]|0)!=112&1|0);break}t=+h[8342];if(t<=s){u=+((a[20668]|0)==112&1|0);break}w=(s-o)/(t-o);if((a[20668]|0)==112){u=w;break}u=1.0-w}else{w=+h[p+32>>3];o=+h[8341];if(o>=w){u=+((a[20668]|0)!=112&1|0);break}t=+h[8342];if(t<=w){u=+((a[20668]|0)==112&1|0);break}x=(w-o)/(t-o);if((a[20668]|0)==112){u=x;break}u=1.0-x}}while(0);p=(c[3524]|0)+144|0;if((c[p>>2]|0)==0){break}c[d>>2]=5;h[k>>3]=u;c[l>>2]=0;cM[c[p>>2]&511](f)}}while(0);p=c[j>>2]|0;q=c[n>>2]|0;if(b){dA(p,q)}else{dB(p,q,+h[7076])}m=c[m>>2]|0;}while((m|0)!=0);i=e;return}function i8(b){b=b|0;var d=0,e=0,f=0;d=i;e=c[c[10810]>>2]|0;if((e|0)==0){i=d;return}else{f=e}do{do{if((a[f+8|0]&1)==0){e=c[f+4>>2]|0;if((a_(e|0,167320,6)|0)==0){break}if((a_(e|0,126208,6)|0)==0){break}if((a_(e|0,133568,4)|0)==0){break}cf(b|0,126032,(v=i,i=i+8|0,c[v>>2]=e,v)|0);j5(b,f+16|0,1);aF(10,b|0)}}while(0);f=c[f>>2]|0;}while((f|0)!=0);i=d;return}function i9(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=c[13898]|0;if((d|0)>=(c[8272]|0)){ja();return 0}e=c[1054]|0;f=c[e+(d*40&-1)+36>>2]|0;L11906:do{if((a[e+(d*40&-1)|0]&1)!=0){g=e+(d*40&-1)+32|0;h=c[10036]|0;i=0;while(1){if((i|0)>=(f|0)){break}if((a[h+((c[g>>2]|0)+i|0)|0]|0)==(a[i+103664|0]|0)){i=i+1|0}else{break L11906}}if((i|0)!=1){break}ja();return 0}}while(0);if(f>>>0>6){ja();return 0}uD(b|0,(c[10036]|0)+(c[e+(d*40&-1)+32>>2]|0)|0,f);a[b+(c[(c[1054]|0)+((c[13898]|0)*40&-1)+36>>2]|0)|0]=0;f=b;while(1){b=a[f]|0;if((b<<24>>24|0)==0){j=8713;break}else if(!((b<<24>>24|0)==67|(b<<24>>24|0)==98|(b<<24>>24|0)==116|(b<<24>>24|0)==115)){j=8711;break}f=f+1|0}if((j|0)==8713){c[13898]=(c[13898]|0)+1;return 0}else if((j|0)==8711){ja();return 0}return 0}function ja(){uf(c[13898]|0,156480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function jb(b){b=b|0;var d=0,e=0,f=0,j=0.0,k=0,l=0,n=0,o=0,p=0,q=0.0,r=0,s=0.0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0.0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aG=0,aH=0,aJ=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aZ=0,a_=0;d=i;e=c[3524]|0;if((e|0)==0){aI(214736,23,1,b|0)}else{f=c[e>>2]|0;cf(b|0,215208,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=13048,v)|0)}f=c[8244]|0;if((f|0)==0){aI(98152,13,1,b|0)}else{cf(b|0,105136,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}f=(a[54160]&1)!=0?179864:213448;e=(a[54152]&1)!=0?179864:213448;j=+h[7077];k=(c[14156]|0)==0?150704:150856;cf(b|0,214064,(v=i,i=i+40|0,c[v>>2]=(a[54144]&1)!=0?179864:213448,c[v+8>>2]=f,c[v+16>>2]=e,h[v+24>>3]=j,c[v+32>>2]=k,v)|0);k=c[11692]|0;if((k|0)==0){aI(212312,13,1,b|0);l=0}else{e=(c[14088]|0)==0?150704:150856;cf(b|0,212872,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=e,v)|0);ji(b,56296,0);aF(10,b|0);l=0}L11936:while(1){do{if((l|0)!=4){e=64813+(l*688&-1)|0;if((a[e]|0)!=0){k=56832+(l*24&-1)|0;f=j3(e)|0;cf(b|0,211776,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=f,v)|0)}if((l|0)==3){break}f=56832+(l*24&-1)|0;k=(c[64808+(l*688&-1)>>2]|0)==1?141856:179864;cf(b|0,211344,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=k,v)|0);k=l+1|0;if((k|0)<7){l=k;continue L11936}else{break L11936}}}while(0);l=l+1|0}j=+h[7030];if(j<0.0){aI(210168,13,1,b|0)}else{l=(a[56232]&1)!=0?106640:106608;cf(b|0,209528,(v=i,i=i+16|0,h[v>>3]=j,c[v+8>>2]=l,v)|0)}aI(207904,15,1,b|0);jf(b,49488);l=c[12292]|0;if((l|0)>0){n=150856}else{n=(l|0)<0?121920:150704}cf(b|0,207056,(v=i,i=i+8|0,c[v>>2]=n,v)|0);if((a[49240]&1)==0){n=(c[12303]|0)+1|0;cf(b|0,121528,(v=i,i=i+8|0,c[v>>2]=n,v)|0)}else{jg(b,49248)}aI(220776,11,1,b|0);jf(b,49176);aI(206464,24,1,b|0);n=c[12738]|0;if((n|0)==0){o=179864}else{o=c[53424+(n<<2)>>2]|0}j=+h[6371];l=c[12739]|0;if((l|0)==(n|0)){p=179864}else{p=c[53424+(l<<2)>>2]|0}q=+h[6372];n=c[12740]|0;if((n|0)==(l|0)){r=179864}else{r=c[53424+(n<<2)>>2]|0}s=+h[6373];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=o,h[v+8>>3]=j,c[v+16>>2]=p,h[v+24>>3]=q,c[v+32>>2]=r,h[v+40>>3]=s,v)|0);aI(205664,2,1,b|0);aI(205016,23,1,b|0);r=c[12418]|0;if((r|0)==0){t=179864}else{t=c[53424+(r<<2)>>2]|0}s=+h[6211];p=c[12419]|0;if((p|0)==(r|0)){u=179864}else{u=c[53424+(p<<2)>>2]|0}q=+h[6212];r=c[12420]|0;if((r|0)==(p|0)){w=179864}else{w=c[53424+(r<<2)>>2]|0}j=+h[6213];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=t,h[v+8>>3]=s,c[v+16>>2]=u,h[v+24>>3]=q,c[v+32>>2]=w,h[v+40>>3]=j,v)|0);cf(b|0,204656,(v=i,i=i+8|0,h[v>>3]=+h[6214],v)|0);aI(204408,6,1,b|0);w=c[12406]|0;if((w|0)==0){aI(204112,3,1,b|0)}else if((w|0)==1){aI(203864,3,1,b|0)}else if((w|0)==2){aI(203656,3,1,b|0)}do{if((a[47032]&1)!=0){w=c[11752]|0;if((w|0)==1){u=c[11732]|0;t=c[11756]|0;r=c[11734]|0;cf(b|0,203400,(v=i,i=i+24|0,c[v>>2]=u,c[v+8>>2]=t,c[v+16>>2]=r,v)|0);break}r=c[11732]|0;t=c[11756]|0;if((w|0)==2){cf(b|0,203056,(v=i,i=i+16|0,c[v>>2]=r,c[v+8>>2]=t,v)|0);break}else{x=-1}while(1){u=x+1|0;if((u|0)==7){y=0;break}if((c[46948+(u<<3)>>2]|0)==(w|0)){y=c[46944+(u<<3)>>2]|0;break}else{x=u}}w=(a[47016]&1)!=0?202360:179864;j=+h[5865];q=+h[5864];cf(b|0,202800,(v=i,i=i+48|0,c[v>>2]=r,c[v+8>>2]=t,c[v+16>>2]=y,c[v+24>>2]=w,h[v+32>>3]=j,h[v+40>>3]=q,v)|0)}}while(0);cf(b|0,201728,(v=i,i=i+16|0,c[v>>2]=24544,c[v+8>>2]=24595,v)|0);y=j3(66240)|0;cf(b|0,201048,(v=i,i=i+16|0,c[v>>2]=56880,c[v+8>>2]=y,v)|0);y=j3(65552)|0;cf(b|0,201048,(v=i,i=i+16|0,c[v>>2]=56856,c[v+8>>2]=y,v)|0);y=j3(68992)|0;cf(b|0,201048,(v=i,i=i+16|0,c[v>>2]=56976,c[v+8>>2]=y,v)|0);y=j3(68304)|0;cf(b|0,201048,(v=i,i=i+16|0,c[v>>2]=56952,c[v+8>>2]=y,v)|0);y=j3(64864)|0;cf(b|0,201048,(v=i,i=i+16|0,c[v>>2]=56832,c[v+8>>2]=y,v)|0);y=j3(66928)|0;cf(b|0,201048,(v=i,i=i+16|0,c[v>>2]=56904,c[v+8>>2]=y,v)|0);y=j3(69680)|0;cf(b|0,201048,(v=i,i=i+16|0,c[v>>2]=57e3,c[v+8>>2]=y,v)|0);cf(b|0,200232,(v=i,i=i+8|0,c[v>>2]=+h[9040]==1.0?124080:123976,v)|0);y=c[10026]|0;if((y|0)>-1){x=(y|0)==0?150704:150856;cf(b|0,198776,(v=i,i=i+8|0,c[v>>2]=x,v)|0);z=0}else{z=0}while(1){if(z>>>0>=8){A=8770;break}if((a[65036+(z*688&-1)|0]&1)!=0){A=8771;break}if((a[65037+(z*688&-1)|0]&1)==0){z=z+1|0}else{A=8771;break}}if((A|0)==8770){aI(198368,11,1,b|0)}else if((A|0)==8771){q=+h[3815];if(q!=0.0){j=q/+h[9040];cf(b|0,197920,(v=i,i=i+8|0,h[v>>3]=j,v)|0)}else{aI(197464,17,1,b|0)}aI(196824,8,1,b|0);z=(a[66413]&1)!=0?179864:136208;cf(b|0,196192,(v=i,i=i+32|0,c[v>>2]=(a[66412]&1)!=0?179864:136208,c[v+8>>2]=56880,c[v+16>>2]=z,c[v+24>>2]=56880,v)|0);z=(a[65725]&1)!=0?179864:136208;cf(b|0,196192,(v=i,i=i+32|0,c[v>>2]=(a[65724]&1)!=0?179864:136208,c[v+8>>2]=56856,c[v+16>>2]=z,c[v+24>>2]=56856,v)|0);z=(a[65037]&1)!=0?179864:136208;cf(b|0,196192,(v=i,i=i+32|0,c[v>>2]=(a[65036]&1)!=0?179864:136208,c[v+8>>2]=56832,c[v+16>>2]=z,c[v+24>>2]=56832,v)|0);aI(195696,3,1,b|0);z=(a[69165]&1)!=0?179864:136208;cf(b|0,196192,(v=i,i=i+32|0,c[v>>2]=(a[69164]&1)!=0?179864:136208,c[v+8>>2]=56976,c[v+16>>2]=z,c[v+24>>2]=56976,v)|0);z=(a[68477]&1)!=0?179864:136208;cf(b|0,196192,(v=i,i=i+32|0,c[v>>2]=(a[68476]&1)!=0?179864:136208,c[v+8>>2]=56952,c[v+16>>2]=z,c[v+24>>2]=56952,v)|0);z=(a[67101]&1)!=0?179864:136208;cf(b|0,196192,(v=i,i=i+32|0,c[v>>2]=(a[67100]&1)!=0?179864:136208,c[v+8>>2]=56904,c[v+16>>2]=z,c[v+24>>2]=56904,v)|0);aF(10,b|0);z=c[10026]|0;if((z|0)==-1){B=193464}else{B=(z|0)==0?150704:150856}cf(b|0,193936,(v=i,i=i+8|0,c[v>>2]=B,v)|0);ji(b,40048,0);aI(86120,2,1,b|0);ji(b,34776,0);aF(10,b|0)}cf(b|0,188584,(v=i,i=i+8|0,c[v>>2]=(a[27776]&1)!=0?179864:213448,v)|0);B=j3(36288)|0;cf(b|0,187184,(v=i,i=i+8|0,c[v>>2]=B,v)|0);B=c[9329]|0;if((B|0)!=0){cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=B,v)|0)}B=c[9330]|0;if(!((B|0)==1&(c[9331]|0)==-2|(B|0)==0)){aI(145280,10,1,b|0);jg(b,37320)}aF(10,b|0);aI(186104,8,1,b|0);B=c[9031]|0;do{if((B|0)==0){aI(185592,6,1,b|0);A=8796}else if((B|0)==1){aI(185072,7,1,b|0);A=8796}else if((B|0)==2){z=c[9032]|0;if((z|0)==0){aI(184712,7,1,b|0);A=8796;break}else if((z|0)==1){aI(184336,7,1,b|0);A=8796;break}else if((z|0)==2){aI(183952,7,1,b|0);A=8796;break}else if((z|0)==3){aI(183592,7,1,b|0);A=8796;break}else{A=8796;break}}else if((B|0)==3){aI(183128,3,1,b|0);z=c[9034]|0;if((z|0)==0){C=179864}else{C=c[53424+(z<<2)>>2]|0}j=+h[4519];x=c[9035]|0;if((x|0)==(z|0)){D=179864}else{D=c[53424+(x<<2)>>2]|0}q=+h[4520];z=c[9036]|0;if((z|0)==(x|0)){E=179864}else{E=c[53424+(z<<2)>>2]|0}s=+h[4521];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=C,h[v+8>>3]=j,c[v+16>>2]=D,h[v+24>>3]=q,c[v+32>>2]=E,h[v+40>>3]=s,v)|0);A=8796}else{A=8798}}while(0);do{if((A|0)==8796){if((c[9031]|0)!=2){A=8798;break}if(((c[9032]|0)-2|0)>>>0>=2){A=8798}}}while(0);do{if((A|0)==8798){E=c[9045]|0;if((E|0)==2){aI(131280,6,1,b|0);break}else if((E|0)==0){aI(131440,5,1,b|0);break}else if((E|0)==1){aI(131216,7,1,b|0);break}else{break}}}while(0);do{if(!((c[9031]|0)==2&(c[9032]|0)>>>0<2)){E=c[9044]|0;if((E|0)==0){aI(180360,4,1,b|0);break}else if((E|0)==2){aI(179904,7,1,b|0);break}else if((E|0)==1){aI(131216,7,1,b|0);break}else{break}}}while(0);E=(c[9046]|0)==0?178184:164216;D=(a[36229]&1)!=0?179864:136208;C=(a[36231]&1)!=0?179864:136208;B=c[9056]|0;if((B|0)==2){F=177584}else{F=(B|0)==1?177096:176744}cf(b|0,179568,(v=i,i=i+40|0,c[v>>2]=(c[9047]|0)==0?179176:178608,c[v+8>>2]=E,c[v+16>>2]=D,c[v+24>>2]=C,c[v+32>>2]=F,v)|0);if((c[9059]|0)>-3){aI(99520,3,1,b|0);ji(b,36232,0)}else{aI(175760,5,1,b|0)}s=+h[4524];q=+h[4525];j=+h[4526];G=+h[4527];cf(b|0,175416,(v=i,i=i+40|0,c[v>>2]=(a[36230]&1)!=0?179864:136208,h[v+8>>3]=s,h[v+16>>3]=q,h[v+24>>3]=j,h[v+32>>3]=G,v)|0);F=c[9339]|0;cf(b|0,174936,(v=i,i=i+16|0,c[v>>2]=c[9338],c[v+8>>2]=F,v)|0);aF(10,b|0);cf(b|0,174656,(v=i,i=i+8|0,c[v>>2]=(a[36228]&1)!=0?179864:136208,v)|0);if((a[36120]&1)==0){aI(174304,10,1,b|0)}aI(173712,12,1,b|0);F=c[10822]|0;if((F|0)!=0){C=F;do{F=c[C+4>>2]|0;D=j3(c[C+60>>2]|0)|0;cf(b|0,173208,(v=i,i=i+16|0,c[v>>2]=F,c[v+8>>2]=D,v)|0);D=c[C+8>>2]|0;if((D|0)==0){H=179864}else{H=c[53424+(D<<2)>>2]|0}G=+h[C+24>>3];F=c[C+12>>2]|0;if((F|0)==(D|0)){I=179864}else{I=c[53424+(F<<2)>>2]|0}j=+h[C+32>>3];D=c[C+16>>2]|0;if((D|0)==(F|0)){J=179864}else{J=c[53424+(D<<2)>>2]|0}q=+h[C+40>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=H,h[v+8>>3]=G,c[v+16>>2]=I,h[v+24>>3]=j,c[v+32>>2]=J,h[v+40>>3]=q,v)|0);D=c[C+48>>2]|0;if((D|0)==0){aI(131440,5,1,b|0)}else if((D|0)==1){aI(126448,7,1,b|0)}else if((D|0)==2){aI(131280,6,1,b|0)}D=c[C+52>>2]|0;if((D|0)==0){aI(90568,9,1,b|0)}else{cf(b|0,172464,(v=i,i=i+8|0,c[v>>2]=D,v)|0)}D=c[C+64>>2]|0;if((D|0)!=0){cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=D,v)|0)}cf(b|0,124744,(v=i,i=i+8|0,c[v>>2]=(c[C+56>>2]|0)==0?150704:150856,v)|0);if((a[C+184|0]&1)!=0){aI(199048,11,1,b|0)}D=C+72|0;if((c[D>>2]|0)!=0){aI(145280,10,1,b|0);jg(b,D)}D=C+88|0;if((c[D>>2]|0)==0){aI(126e3,8,1,b|0)}else{aI(170816,6,1,b|0);ji(b,D,1)}aI(216256,8,1,b|0);D=c[C+144>>2]|0;if((D|0)==0){K=179864}else{K=c[53424+(D<<2)>>2]|0}q=+h[C+160>>3];F=c[C+148>>2]|0;if((F|0)==(D|0)){L=179864}else{L=c[53424+(F<<2)>>2]|0}j=+h[C+168>>3];D=c[C+152>>2]|0;if((D|0)==(F|0)){M=179864}else{M=c[53424+(D<<2)>>2]|0}G=+h[C+176>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=K,h[v+8>>3]=q,c[v+16>>2]=L,h[v+24>>3]=j,c[v+32>>2]=M,h[v+40>>3]=G,v)|0);aF(10,b|0);C=c[C>>2]|0;}while((C|0)!=0)}aI(170408,12,1,b|0);C=c[10826]|0;if((C|0)!=0){M=C;do{cf(b|0,170056,(v=i,i=i+8|0,c[v>>2]=c[M+4>>2],v)|0);C=c[M+8>>2]|0;if((C|0)==0){N=179864}else{N=c[53424+(C<<2)>>2]|0}G=+h[M+24>>3];L=c[M+12>>2]|0;if((L|0)==(C|0)){O=179864}else{O=c[53424+(L<<2)>>2]|0}j=+h[M+32>>3];C=c[M+16>>2]|0;if((C|0)==(L|0)){P=179864}else{P=c[53424+(C<<2)>>2]|0}q=+h[M+40>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=N,h[v+8>>3]=G,c[v+16>>2]=O,h[v+24>>3]=j,c[v+32>>2]=P,h[v+40>>3]=q,v)|0);aK(((a[M+88|0]&1)!=0?127520:127448)|0,b|0);C=c[M+48>>2]|0;if((C|0)==0){Q=179864}else{Q=c[53424+(C<<2)>>2]|0}q=+h[M+64>>3];L=c[M+52>>2]|0;if((L|0)==(C|0)){R=179864}else{R=c[53424+(L<<2)>>2]|0}j=+h[M+72>>3];C=c[M+56>>2]|0;if((C|0)==(L|0)){S=179864}else{S=c[53424+(C<<2)>>2]|0}G=+h[M+80>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=Q,h[v+8>>3]=q,c[v+16>>2]=R,h[v+24>>3]=j,c[v+32>>2]=S,h[v+40>>3]=G,v)|0);C=(c[M+100>>2]|0)==0?150704:150856;L=c[M+200>>2]|0;if((L|0)==2){T=128e3}else{T=(L|0)==1?127904:127768}cf(b|0,169144,(v=i,i=i+24|0,c[v>>2]=c[72304+(c[M+160>>2]<<2)>>2],c[v+8>>2]=C,c[v+16>>2]=T,v)|0);ji(b,M+104|0,0);G=+h[M+168>>3];if(G>0.0){C=c[25376+(c[M+176>>2]<<2)>>2]|0;j=+h[M+184>>3];q=+h[M+192>>3];cf(b|0,165352,(v=i,i=i+32|0,c[v>>2]=C,h[v+8>>3]=G,h[v+16>>3]=j,h[v+24>>3]=q,v)|0)}aF(10,b|0);M=c[M>>2]|0;}while((M|0)!=0)}cf(b|0,164920,(v=i,i=i+8|0,c[v>>2]=(a[30080]&1)!=0?164520:126024,v)|0);aI(164048,17,1,b|0);M=c[10820]|0;if((M|0)!=0){T=M;do{cf(b|0,163384,(v=i,i=i+8|0,c[v>>2]=c[T+4>>2],v)|0);ji(b,T+8|0,1);aF(10,b|0);T=c[T>>2]|0;}while((T|0)!=0)}aI(162896,18,1,b|0);T=c[10824]|0;if((T|0)!=0){M=T;do{cf(b|0,162248,(v=i,i=i+8|0,c[v>>2]=c[M+4>>2],v)|0);T=(c[M+12>>2]|0)==0?150704:150856;S=c[M+112>>2]|0;if((S|0)==2){U=128e3}else{U=(S|0)==1?127904:127768}cf(b|0,169144,(v=i,i=i+24|0,c[v>>2]=c[72304+(c[M+72>>2]<<2)>>2],c[v+8>>2]=T,c[v+16>>2]=U,v)|0);ji(b,M+16|0,0);q=+h[M+80>>3];if(q>0.0){T=c[25376+(c[M+88>>2]<<2)>>2]|0;j=+h[M+96>>3];G=+h[M+104>>3];cf(b|0,165352,(v=i,i=i+32|0,c[v>>2]=T,h[v+8>>3]=q,h[v+16>>3]=j,h[v+24>>3]=G,v)|0)}aF(10,b|0);M=c[M>>2]|0;}while((M|0)!=0)}aI(159152,20,1,b|0);M=c[9670]|0;if((M|0)==4){U=c[9671]|0;G=+h[4840];cf(b|0,158040,(v=i,i=i+16|0,c[v>>2]=U,h[v+8>>3]=G,v)|0)}else if((M|0)==1){aI(156128,11,1,b|0)}else if((M|0)==2){aI(155064,14,1,b|0)}else{cf(b|0,158640,(v=i,i=i+8|0,c[v>>2]=c[9671],v)|0)}aI(154704,6,1,b|0);aI(216256,8,1,b|0);M=c[9720]|0;if((M|0)==0){V=179864}else{V=c[53424+(M<<2)>>2]|0}G=+h[4862];U=c[9721]|0;if((U|0)==(M|0)){W=179864}else{W=c[53424+(U<<2)>>2]|0}j=+h[4863];M=c[9722]|0;if((M|0)==(U|0)){X=179864}else{X=c[53424+(M<<2)>>2]|0}q=+h[4864];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=V,h[v+8>>3]=G,c[v+16>>2]=W,h[v+24>>3]=j,c[v+32>>2]=X,h[v+40>>3]=q,v)|0);aF(10,b|0);jj(b,0);aI(154408,15,1,b|0);if((a[66164]&1)!=0){q=+h[8271];cf(b|0,154056,(v=i,i=i+16|0,c[v>>2]=56880,h[v+8>>3]=q,v)|0)}if((a[65476]&1)!=0){q=+h[8185];cf(b|0,154056,(v=i,i=i+16|0,c[v>>2]=56856,h[v+8>>3]=q,v)|0)}if((a[68916]&1)!=0){q=+h[8615];cf(b|0,154056,(v=i,i=i+16|0,c[v>>2]=56976,h[v+8>>3]=q,v)|0)}if((a[68228]&1)!=0){q=+h[8529];cf(b|0,154056,(v=i,i=i+16|0,c[v>>2]=56952,h[v+8>>3]=q,v)|0)}if((a[64788]&1)!=0){q=+h[8099];cf(b|0,154056,(v=i,i=i+16|0,c[v>>2]=56832,h[v+8>>3]=q,v)|0)}if((a[66852]&1)!=0){q=+h[8357];cf(b|0,154056,(v=i,i=i+16|0,c[v>>2]=56904,h[v+8>>3]=q,v)|0)}if((a[69604]&1)!=0){q=+h[8701];cf(b|0,154056,(v=i,i=i+16|0,c[v>>2]=57e3,h[v+8>>3]=q,v)|0)}X=(c[8764]|0)==2?88392:179864;q=+h[4384];W=(c[6588]|0)==2?88392:179864;j=+h[3296];V=(c[1057]|0)==2?88392:179864;G=+h[531];M=(c[14091]|0)==2?88392:179864;s=+h[7048];cf(b|0,89120,(v=i,i=i+72|0,c[v>>2]=153688,c[v+8>>2]=X,h[v+16>>3]=q,c[v+24>>2]=W,h[v+32>>3]=j,c[v+40>>2]=V,h[v+48>>3]=G,c[v+56>>2]=M,h[v+64>>3]=s,v)|0);s=+h[3818];M=c[44936+(c[11252]<<2)>>2]|0;V=(a[30528]&1)!=0?179864:213448;W=(a[32936]&1)!=0?179864:213448;cf(b|0,153216,(v=i,i=i+40|0,h[v>>3]=+h[3817],h[v+8>>3]=s,c[v+16>>2]=M,c[v+24>>2]=V,c[v+32>>2]=W,v)|0);W=c[8270]|0;if((W|0)!=0){cf(b|0,152808,(v=i,i=i+8|0,c[v>>2]=W,v)|0)}W=c[12886]|0;if((W|0)==0){Y=0}else{cf(b|0,152408,(v=i,i=i+8|0,c[v>>2]=W,v)|0);Y=(c[12886]|0)!=0}if(!((c[8270]|0)!=0|Y)){aI(152040,18,1,b|0)}aI(151856,9,1,b|0);if((c[5094]|0)==1){aI(134552,3,1,b|0)}else{s=+g[3538];G=+g[3536];j=+g[3534];q=+g[3532];cf(b|0,151408,(v=i,i=i+32|0,h[v>>3]=s,h[v+8>>3]=G,h[v+16>>3]=j,h[v+24>>3]=q,v)|0)}Y=c[18072]|0;if((Y|0)==2){Z=150928;A=8906}else if((Y|0)!=0){Z=(Y|0)==3?150776:179864;A=8906}if((A|0)==8906){cf(b|0,151136,(v=i,i=i+8|0,c[v>>2]=Z,v)|0)}Z=c[6350]|0;A=c[9344]|0;Y=c[9342]|0;W=(a[46752]&1)!=0?179864:213448;V=(c[11690]|0)!=0?179864:213448;cf(b|0,150608,(v=i,i=i+48|0,c[v>>2]=c[6352],c[v+8>>2]=Z,c[v+16>>2]=A,c[v+24>>2]=Y,c[v+32>>2]=W,c[v+40>>2]=V,v)|0);V=c[11690]|0;if((V|0)==0){aF(10,b|0)}else if((V|0)==1){aI(150432,6,1,b|0)}else if((V|0)==2){aI(150288,9,1,b|0)}else if((V|0)==3){aI(150104,6,1,b|0)}if((a[35888]&1)==0){aI(149752,13,1,b|0)}else{cf(b|0,149912,(v=i,i=i+8|0,c[v>>2]=53520,v)|0)}if((a[43472]&1)!=0){aI(149592,11,1,b|0)}aI(149400,12,1,b|0);V=c[8732]|0;if((V|0)==1){aI(113784,10,1,b|0)}else if((V|0)==2){aI(113712,12,1,b|0)}else{aI(113904,10,1,b|0)}V=c[8528]|0;if((V|0)!=0){cf(b|0,148496,(v=i,i=i+8|0,c[v>>2]=V,v)|0)}V=a[47120]|0;if(V<<24>>24==0){aI(148224,34,1,b|0)}else{W=V<<24>>24;cf(b|0,148416,(v=i,i=i+8|0,c[v>>2]=W,v)|0)}W=c[11948]|0;if((aY(W|0,199184)|0)!=0){cf(b|0,147856,(v=i,i=i+8|0,c[v>>2]=W,v)|0)}if((a[47712]&1)!=0){aI(147600,21,1,b|0)}if((a[47472]&1)!=0){aI(147320,24,1,b|0)}if((a[38984]&1)==0){aI(197656,15,1,b|0)}else{W=(c[9744]|0)==0?150704:150856;V=c[9742]|0;Y=c[9734]|0;A=c[9738]|0;Z=a[38944]|0?136208:179864;M=a[38960]|0?136208:179864;cf(b|0,186344,(v=i,i=i+48|0,c[v>>2]=W,c[v+8>>2]=V,c[v+16>>2]=Y,c[v+24>>2]=A,c[v+32>>2]=Z,c[v+40>>2]=M,v)|0)}cf(b|0,147064,(v=i,i=i+8|0,c[v>>2]=c[13368],v)|0);aI(146824,14,1,b|0);M=c[13378]|0;if((M|0)==0){aI(146624,7,1,b|0)}else if((M|0)==1){aI(146456,12,1,b|0)}else if((M|0)==2){aI(146264,8,1,b|0)}aI(146096,21,1,b|0);M=c[13372]|0;if((M|0)==0){Z=c[13374]|0;cf(b|0,145944,(v=i,i=i+8|0,c[v>>2]=Z,v)|0)}else if((M|0)==1){Z=c[11662]|0;q=+h[Z>>3];j=+h[Z+8>>3];G=q+j*+(c[13374]|0);cf(b|0,145704,(v=i,i=i+24|0,h[v>>3]=q,h[v+8>>3]=j,h[v+16>>3]=G,v)|0)}else if((M|0)==2){cf(b|0,145496,(v=i,i=i+8|0,h[v>>3]=+h[c[11662]>>3],v)|0);if((c[13374]|0)>1){M=1;do{cf(b|0,107648,(v=i,i=i+8|0,h[v>>3]=+h[(c[11662]|0)+(M<<3)>>3],v)|0);M=M+1|0;}while((M|0)<(c[13374]|0))}aF(10,b|0)}G=+g[18074];j=+g[178];q=+g[38];s=+g[184];_=+g[44];cf(b|0,144928,(v=i,i=i+48|0,c[v>>2]=c[13366],h[v+8>>3]=G,h[v+16>>3]=j,h[v+24>>3]=q,h[v+32>>3]=s,h[v+40>>3]=_,v)|0);aI(144752,15,1,b|0);jh(b,107848,c[12890]|0);aI(144472,19,1,b|0);jh(b,144328,c[10058]|0);cf(b|0,126416,(v=i,i=i+8|0,c[v>>2]=56880,v)|0);ji(b,66656,0);aF(10,b|0);cf(b|0,126416,(v=i,i=i+8|0,c[v>>2]=56856,v)|0);ji(b,65968,0);aF(10,b|0);cf(b|0,126416,(v=i,i=i+8|0,c[v>>2]=56832,v)|0);ji(b,65280,0);aF(10,b|0);cf(b|0,126416,(v=i,i=i+8|0,c[v>>2]=56976,v)|0);ji(b,69408,0);aF(10,b|0);cf(b|0,126416,(v=i,i=i+8|0,c[v>>2]=56952,v)|0);ji(b,68720,0);aF(10,b|0);_=+h[77];if((a[624]&1)==0){cf(b|0,143976,(v=i,i=i+8|0,h[v>>3]=_,v)|0)}else{cf(b|0,144112,(v=i,i=i+8|0,h[v>>3]=_,v)|0)}M=c[16604]&3;if((M|0)==0){cf(b|0,143896,(v=i,i=i+8|0,c[v>>2]=56880,v)|0)}else if((M|0)==3){cf(b|0,143776,(v=i,i=i+8|0,c[v>>2]=56880,v)|0)}else if((M|0)==1){cf(b|0,143616,(v=i,i=i+8|0,c[v>>2]=56880,v)|0)}else if((M|0)==2){_=+h[8303];cf(b|0,143408,(v=i,i=i+16|0,c[v>>2]=56880,h[v+8>>3]=_,v)|0)}M=c[16432]&3;if((M|0)==0){cf(b|0,143896,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}else if((M|0)==3){cf(b|0,143776,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}else if((M|0)==1){cf(b|0,143616,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}else if((M|0)==2){_=+h[8217];cf(b|0,143408,(v=i,i=i+16|0,c[v>>2]=56856,h[v+8>>3]=_,v)|0)}M=c[16260]&3;if((M|0)==0){cf(b|0,143896,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}else if((M|0)==3){cf(b|0,143776,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}else if((M|0)==1){cf(b|0,143616,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}else if((M|0)==2){_=+h[8131];cf(b|0,143408,(v=i,i=i+16|0,c[v>>2]=56832,h[v+8>>3]=_,v)|0)}M=c[17292]&3;if((M|0)==0){cf(b|0,143896,(v=i,i=i+8|0,c[v>>2]=56976,v)|0)}else if((M|0)==3){cf(b|0,143776,(v=i,i=i+8|0,c[v>>2]=56976,v)|0)}else if((M|0)==1){cf(b|0,143616,(v=i,i=i+8|0,c[v>>2]=56976,v)|0)}else if((M|0)==2){_=+h[8647];cf(b|0,143408,(v=i,i=i+16|0,c[v>>2]=56976,h[v+8>>3]=_,v)|0)}M=c[17120]&3;if((M|0)==0){cf(b|0,143896,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}else if((M|0)==3){cf(b|0,143776,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}else if((M|0)==1){cf(b|0,143616,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}else if((M|0)==2){_=+h[8561];cf(b|0,143408,(v=i,i=i+16|0,c[v>>2]=56952,h[v+8>>3]=_,v)|0)}M=c[16776]&3;if((M|0)==0){cf(b|0,143896,(v=i,i=i+8|0,c[v>>2]=56904,v)|0)}else if((M|0)==3){cf(b|0,143776,(v=i,i=i+8|0,c[v>>2]=56904,v)|0)}else if((M|0)==1){cf(b|0,143616,(v=i,i=i+8|0,c[v>>2]=56904,v)|0)}else if((M|0)==2){_=+h[8389];cf(b|0,143408,(v=i,i=i+16|0,c[v>>2]=56904,h[v+8>>3]=_,v)|0)}jk(b,2);jk(b,1);jk(b,0);jk(b,6);jk(b,5);jk(b,3);jk(b,7);M=c[1119]|0;if((M|0)==0){$=179864}else{$=j3(M)|0}cf(b|0,143304,(v=i,i=i+24|0,c[v>>2]=179864,c[v+8>>2]=154440,c[v+16>>2]=$,v)|0);cf(b|0,142960,(v=i,i=i+16|0,c[v>>2]=179864,c[v+8>>2]=154440,v)|0);aI(216256,8,1,b|0);$=c[1140]|0;if(($|0)==0){aa=179864}else{aa=c[53424+($<<2)>>2]|0}_=+h[572];M=c[1141]|0;if((M|0)==($|0)){ab=179864}else{ab=c[53424+(M<<2)>>2]|0}s=+h[573];$=c[1142]|0;if(($|0)==(M|0)){ac=179864}else{ac=c[53424+($<<2)>>2]|0}q=+h[574];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=aa,h[v+8>>3]=_,c[v+16>>2]=ab,h[v+24>>3]=s,c[v+32>>2]=ac,h[v+40>>3]=q,v)|0);ac=c[1120]|0;if((ac|0)==0){ad=179864}else{ad=j3(ac)|0}cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=ad,v)|0);if((c[1122]|0)!=0){aI(145280,10,1,b|0);jg(b,4488)}if((c[1105]|0)==-3){aI(142704,16,1,b|0)}ad=c[1117]|0;if((ad|0)==0){aI(90568,9,1,b|0)}else{cf(b|0,172464,(v=i,i=i+8|0,c[v>>2]=ad,v)|0)}cf(b|0,154696,(v=i,i=i+8|0,c[v>>2]=(a[4600]&1)!=0?199048:179864,v)|0);cf(b|0,142592,(v=i,i=i+8|0,c[v>>2]=(c[1166]|0)!=0?196800:196168,v)|0);ad=c[1183]|0;if((ad|0)==0){ae=179864}else{ae=j3(ad)|0}cf(b|0,143304,(v=i,i=i+24|0,c[v>>2]=179864,c[v+8>>2]=133504,c[v+16>>2]=ae,v)|0);cf(b|0,142960,(v=i,i=i+16|0,c[v>>2]=179864,c[v+8>>2]=133504,v)|0);aI(216256,8,1,b|0);ae=c[1204]|0;if((ae|0)==0){af=179864}else{af=c[53424+(ae<<2)>>2]|0}q=+h[604];ad=c[1205]|0;if((ad|0)==(ae|0)){ag=179864}else{ag=c[53424+(ad<<2)>>2]|0}s=+h[605];ae=c[1206]|0;if((ae|0)==(ad|0)){ah=179864}else{ah=c[53424+(ae<<2)>>2]|0}_=+h[606];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=af,h[v+8>>3]=q,c[v+16>>2]=ag,h[v+24>>3]=s,c[v+32>>2]=ah,h[v+40>>3]=_,v)|0);ah=c[1184]|0;if((ah|0)==0){ai=179864}else{ai=j3(ah)|0}cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=ai,v)|0);if((c[1186]|0)!=0){aI(145280,10,1,b|0);jg(b,4744)}if((c[1169]|0)==-3){aI(142704,16,1,b|0)}ai=c[1181]|0;if((ai|0)==0){aI(90568,9,1,b|0)}else{cf(b|0,172464,(v=i,i=i+8|0,c[v>>2]=ai,v)|0)}cf(b|0,154696,(v=i,i=i+8|0,c[v>>2]=(a[4856]&1)!=0?199048:179864,v)|0);je(b,7);je(b,8);je(b,9);je(b,10);ai=c[16629]|0;if((ai|0)==0){aj=179864}else{aj=j3(ai)|0}cf(b|0,143304,(v=i,i=i+24|0,c[v>>2]=56880,c[v+8>>2]=202256,c[v+16>>2]=aj,v)|0);cf(b|0,142960,(v=i,i=i+16|0,c[v>>2]=56880,c[v+8>>2]=202256,v)|0);aI(216256,8,1,b|0);aj=c[16650]|0;if((aj|0)==0){ak=179864}else{ak=c[53424+(aj<<2)>>2]|0}_=+h[8327];ai=c[16651]|0;if((ai|0)==(aj|0)){al=179864}else{al=c[53424+(ai<<2)>>2]|0}s=+h[8328];aj=c[16652]|0;if((aj|0)==(ai|0)){am=179864}else{am=c[53424+(aj<<2)>>2]|0}q=+h[8329];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=ak,h[v+8>>3]=_,c[v+16>>2]=al,h[v+24>>3]=s,c[v+32>>2]=am,h[v+40>>3]=q,v)|0);am=c[16630]|0;if((am|0)==0){an=179864}else{an=j3(am)|0}cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=an,v)|0);if((c[16632]|0)!=0){aI(145280,10,1,b|0);jg(b,66528)}if((c[16615]|0)==-3){aI(142704,16,1,b|0)}an=c[16627]|0;if((an|0)==0){aI(90568,9,1,b|0)}else{cf(b|0,172464,(v=i,i=i+8|0,c[v>>2]=an,v)|0)}cf(b|0,154696,(v=i,i=i+8|0,c[v>>2]=(a[66640]&1)!=0?199048:179864,v)|0);an=c[17317]|0;if((an|0)==0){ao=179864}else{ao=j3(an)|0}cf(b|0,143304,(v=i,i=i+24|0,c[v>>2]=56976,c[v+8>>2]=202256,c[v+16>>2]=ao,v)|0);cf(b|0,142960,(v=i,i=i+16|0,c[v>>2]=56976,c[v+8>>2]=202256,v)|0);aI(216256,8,1,b|0);ao=c[17338]|0;if((ao|0)==0){ap=179864}else{ap=c[53424+(ao<<2)>>2]|0}q=+h[8671];an=c[17339]|0;if((an|0)==(ao|0)){aq=179864}else{aq=c[53424+(an<<2)>>2]|0}s=+h[8672];ao=c[17340]|0;if((ao|0)==(an|0)){ar=179864}else{ar=c[53424+(ao<<2)>>2]|0}_=+h[8673];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=ap,h[v+8>>3]=q,c[v+16>>2]=aq,h[v+24>>3]=s,c[v+32>>2]=ar,h[v+40>>3]=_,v)|0);ar=c[17318]|0;if((ar|0)==0){as=179864}else{as=j3(ar)|0}cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=as,v)|0);if((c[17320]|0)!=0){aI(145280,10,1,b|0);jg(b,69280)}if((c[17303]|0)==-3){aI(142704,16,1,b|0)}as=c[17315]|0;if((as|0)==0){aI(90568,9,1,b|0)}else{cf(b|0,172464,(v=i,i=i+8|0,c[v>>2]=as,v)|0)}cf(b|0,154696,(v=i,i=i+8|0,c[v>>2]=(a[69392]&1)!=0?199048:179864,v)|0);je(b,2);je(b,6);as=c[16457]|0;if((as|0)==0){at=179864}else{at=j3(as)|0}cf(b|0,143304,(v=i,i=i+24|0,c[v>>2]=56856,c[v+8>>2]=202256,c[v+16>>2]=at,v)|0);cf(b|0,142960,(v=i,i=i+16|0,c[v>>2]=56856,c[v+8>>2]=202256,v)|0);aI(216256,8,1,b|0);at=c[16478]|0;if((at|0)==0){au=179864}else{au=c[53424+(at<<2)>>2]|0}_=+h[8241];as=c[16479]|0;if((as|0)==(at|0)){av=179864}else{av=c[53424+(as<<2)>>2]|0}s=+h[8242];at=c[16480]|0;if((at|0)==(as|0)){aw=179864}else{aw=c[53424+(at<<2)>>2]|0}q=+h[8243];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=au,h[v+8>>3]=_,c[v+16>>2]=av,h[v+24>>3]=s,c[v+32>>2]=aw,h[v+40>>3]=q,v)|0);aw=c[16458]|0;if((aw|0)==0){ax=179864}else{ax=j3(aw)|0}cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=ax,v)|0);if((c[16460]|0)!=0){aI(145280,10,1,b|0);jg(b,65840)}if((c[16443]|0)==-3){aI(142704,16,1,b|0)}ax=c[16455]|0;if((ax|0)==0){aI(90568,9,1,b|0)}else{cf(b|0,172464,(v=i,i=i+8|0,c[v>>2]=ax,v)|0)}cf(b|0,154696,(v=i,i=i+8|0,c[v>>2]=(a[65952]&1)!=0?199048:179864,v)|0);ax=c[17145]|0;if((ax|0)==0){ay=179864}else{ay=j3(ax)|0}cf(b|0,143304,(v=i,i=i+24|0,c[v>>2]=56952,c[v+8>>2]=202256,c[v+16>>2]=ay,v)|0);cf(b|0,142960,(v=i,i=i+16|0,c[v>>2]=56952,c[v+8>>2]=202256,v)|0);aI(216256,8,1,b|0);ay=c[17166]|0;if((ay|0)==0){az=179864}else{az=c[53424+(ay<<2)>>2]|0}q=+h[8585];ax=c[17167]|0;if((ax|0)==(ay|0)){aA=179864}else{aA=c[53424+(ax<<2)>>2]|0}s=+h[8586];ay=c[17168]|0;if((ay|0)==(ax|0)){aB=179864}else{aB=c[53424+(ay<<2)>>2]|0}_=+h[8587];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=az,h[v+8>>3]=q,c[v+16>>2]=aA,h[v+24>>3]=s,c[v+32>>2]=aB,h[v+40>>3]=_,v)|0);aB=c[17146]|0;if((aB|0)==0){aC=179864}else{aC=j3(aB)|0}cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=aC,v)|0);if((c[17148]|0)!=0){aI(145280,10,1,b|0);jg(b,68592)}if((c[17131]|0)==-3){aI(142704,16,1,b|0)}aC=c[17143]|0;if((aC|0)==0){aI(90568,9,1,b|0)}else{cf(b|0,172464,(v=i,i=i+8|0,c[v>>2]=aC,v)|0)}cf(b|0,154696,(v=i,i=i+8|0,c[v>>2]=(a[68704]&1)!=0?199048:179864,v)|0);do{if((c[5094]|0)==0){je(b,1);je(b,5)}else{if(a[20368]|0){a[20368]=0;g[3538]=+g[5090];g[3536]=+g[5088];g[3534]=+g[5086];c[16336]=c[16336]^2;c[17024]=c[17024]^2}je(b,1);je(b,5);if(a[20368]|0){break}a[20368]=1;g[5090]=+g[3538];g[5088]=+g[3536];g[5086]=+g[3534];g[3538]=180.0;g[3536]=0.0;g[3534]=1.2999999523162842;c[16336]=c[16336]^2;c[17024]=c[17024]^2}}while(0);aC=c[16285]|0;if((aC|0)==0){aD=179864}else{aD=j3(aC)|0}cf(b|0,143304,(v=i,i=i+24|0,c[v>>2]=56832,c[v+8>>2]=202256,c[v+16>>2]=aD,v)|0);cf(b|0,142960,(v=i,i=i+16|0,c[v>>2]=56832,c[v+8>>2]=202256,v)|0);aI(216256,8,1,b|0);aD=c[16306]|0;if((aD|0)==0){aE=179864}else{aE=c[53424+(aD<<2)>>2]|0}_=+h[8155];aC=c[16307]|0;if((aC|0)==(aD|0)){aG=179864}else{aG=c[53424+(aC<<2)>>2]|0}s=+h[8156];aD=c[16308]|0;if((aD|0)==(aC|0)){aH=179864}else{aH=c[53424+(aD<<2)>>2]|0}q=+h[8157];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=aE,h[v+8>>3]=_,c[v+16>>2]=aG,h[v+24>>3]=s,c[v+32>>2]=aH,h[v+40>>3]=q,v)|0);aH=c[16286]|0;if((aH|0)==0){aJ=179864}else{aJ=j3(aH)|0}cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=aJ,v)|0);if((c[16288]|0)!=0){aI(145280,10,1,b|0);jg(b,65152)}if((c[16271]|0)==-3){aI(142704,16,1,b|0)}aJ=c[16283]|0;if((aJ|0)==0){aI(90568,9,1,b|0)}else{cf(b|0,172464,(v=i,i=i+8|0,c[v>>2]=aJ,v)|0)}cf(b|0,154696,(v=i,i=i+8|0,c[v>>2]=(a[65264]&1)!=0?199048:179864,v)|0);je(b,0);aJ=c[16801]|0;if((aJ|0)==0){aL=179864}else{aL=j3(aJ)|0}cf(b|0,143304,(v=i,i=i+24|0,c[v>>2]=56904,c[v+8>>2]=202256,c[v+16>>2]=aL,v)|0);cf(b|0,142960,(v=i,i=i+16|0,c[v>>2]=56904,c[v+8>>2]=202256,v)|0);aI(216256,8,1,b|0);aL=c[16822]|0;if((aL|0)==0){aM=179864}else{aM=c[53424+(aL<<2)>>2]|0}q=+h[8413];aJ=c[16823]|0;if((aJ|0)==(aL|0)){aN=179864}else{aN=c[53424+(aJ<<2)>>2]|0}s=+h[8414];aL=c[16824]|0;if((aL|0)==(aJ|0)){aO=179864}else{aO=c[53424+(aL<<2)>>2]|0}_=+h[8415];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=aM,h[v+8>>3]=q,c[v+16>>2]=aN,h[v+24>>3]=s,c[v+32>>2]=aO,h[v+40>>3]=_,v)|0);aO=c[16802]|0;if((aO|0)==0){aP=179864}else{aP=j3(aO)|0}cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=aP,v)|0);if((c[16804]|0)!=0){aI(145280,10,1,b|0);jg(b,67216)}if((c[16787]|0)==-3){aI(142704,16,1,b|0)}aP=c[16799]|0;if((aP|0)==0){aI(90568,9,1,b|0)}else{cf(b|0,172464,(v=i,i=i+8|0,c[v>>2]=aP,v)|0)}cf(b|0,154696,(v=i,i=i+8|0,c[v>>2]=(a[67328]&1)!=0?199048:179864,v)|0);je(b,3);cf(b|0,141912,(v=i,i=i+8|0,h[v>>3]=+h[11],v)|0);_=+h[4395];cf(b|0,141776,(v=i,i=i+16|0,c[v>>2]=(c[8786]|0)==3?141576:179864,h[v+8>>3]=_,v)|0);_=+h[7052];cf(b|0,141392,(v=i,i=i+16|0,c[v>>2]=(c[14100]|0)==3?141576:179864,h[v+8>>3]=_,v)|0);_=+h[3301];cf(b|0,141272,(v=i,i=i+16|0,c[v>>2]=(c[6598]|0)==3?141576:179864,h[v+8>>3]=_,v)|0);_=+h[535];cf(b|0,141072,(v=i,i=i+16|0,c[v>>2]=(c[1066]|0)==3?141576:179864,h[v+8>>3]=_,v)|0);cf(b|0,140928,(v=i,i=i+8|0,c[v>>2]=c[12908],v)|0);aI(140768,9,1,b|0);aI(((c[7662]|0)==1?140568:140376)|0,8,1,b|0);cf(b|0,140264,(v=i,i=i+8|0,c[v>>2]=30632,v)|0);aI(140768,9,1,b|0);aP=a[30641]|0;if((aP|0)==97){aI(140104,15,1,b|0)}else if((aP|0)==102){aI(139848,13,1,b|0)}else if((aP|0)==98){aI(139608,14,1,b|0)}else if((aP|0)==100){aI(139464,11,1,b|0)}aP=c[7665]|0;cf(b|0,139248,(v=i,i=i+16|0,c[v>>2]=c[7664],c[v+8>>2]=aP,v)|0);aI(139080,7,1,b|0);aP=a[30639]|0;if((aP|0)==99){aI(89896,6,1,b|0)}else if((aP|0)==98){aI(138664,5,1,b|0)}else if((aP|0)==114){aI(74552,3,1,b|0)}aK(((a[30640]|0)!=0?73808:138016)|0,b|0);aI(137864,10,1,b|0);aP=c[7661]|0;if((aP|0)>0){cf(b|0,137704,(v=i,i=i+8|0,c[v>>2]=aP,v)|0)}else{aO=(aP|0)!=0?137592:137416;aK(aO|0,b|0)}aI(137296,15,1,b|0);aO=c[7663]|0;if((aO|0)==4){aI(105792,4,1,b|0)}else if((aO|0)==5){aI(167728,7,1,b|0)}else if((aO|0)==6){aI(100616,6,1,b|0)}else if((aO|0)==7){aI(103256,3,1,b|0)}else if((aO|0)==8){aI(99528,3,1,b|0)}else{cf(b|0,136120,(v=i,i=i+8|0,c[v>>2]=aO+1,v)|0)}aF(10,b|0);aO=(a[20684]|0)!=0?137784:137920;aP=c[5168]|0;cf(b|0,135880,(v=i,i=i+24|0,c[v>>2]=(a[20668]|0)==112?135696:135584,c[v+8>>2]=aO,c[v+16>>2]=aP,v)|0);cf(b|0,135120,(v=i,i=i+8|0,h[v>>3]=+h[2705],v)|0);do{if((c[5163]|0)==103){aI(134936,5,1,b|0)}else{aI(134744,12,1,b|0);aP=c[5174]|0;if((aP|0)==114){aI(134624,4,1,b|0)}else if((aP|0)==104){aI(134504,4,1,b|0)}else if((aP|0)==99){aI(134336,4,1,b|0)}else if((aP|0)==121){aI(134152,4,1,b|0)}else if((aP|0)==120){aI(133992,4,1,b|0)}else{cf(c[m>>2]|0,133856,(v=i,i=i+24|0,c[v>>2]=133776,c[v+8>>2]=871,c[v+16>>2]=aP<<24>>24,v)|0)}aI(133576,13,1,b|0);aP=c[5163]|0;if((aP|0)==114){aO=c[5164]|0;aN=c[5165]|0;aM=c[5166]|0;cf(b|0,133464,(v=i,i=i+24|0,c[v>>2]=aO,c[v+8>>2]=aN,c[v+16>>2]=aM,v)|0);break}else if((aP|0)==100){aI(133112,9,1,b|0);if((c[5172]|0)>0){aM=0;do{aN=c[5173]|0;_=+h[aN+(aM<<5)+8>>3];s=+h[aN+(aM<<5)+16>>3];q=+h[aN+(aM<<5)+24>>3];cf(b|0,132952,(v=i,i=i+32|0,h[v>>3]=+h[aN+(aM<<5)>>3],h[v+8>>3]=_,h[v+16>>3]=s,h[v+24>>3]=q,v)|0);do{if((aM|0)<((c[5172]|0)-1|0)){aF(44,b|0);if(!((aM|0)==2|((aM|0)%4&-1|0)==2)){break}aI(132648,6,1,b|0)}}while(0);aM=aM+1|0;}while((aM|0)<(c[5172]|0))}aI(132568,3,1,b|0);break}else if((aP|0)==102){aM=c[5257]|0;t=c[5335]|0;cf(b|0,132440,(v=i,i=i+24|0,c[v>>2]=c[5179],c[v+8>>2]=aM,c[v+16>>2]=t,v)|0);break}else if((aP|0)==99){q=+h[2707];s=+h[2708];cf(b|0,132312,(v=i,i=i+24|0,h[v>>3]=+h[2706],h[v+8>>3]=q,h[v+16>>3]=s,v)|0);break}else{cf(c[m>>2]|0,142392,(v=i,i=i+24|0,c[v>>2]=133776,c[v+8>>2]=905,c[v+16>>2]=aP<<24>>24,v)|0);break}}}while(0);t=a[54016]|0;if(t<<24>>24!=110){aM=t<<24>>24==100?126024:132024;cf(b|0,132088,(v=i,i=i+8|0,c[v>>2]=aM,v)|0)}cf(b|0,131760,(v=i,i=i+8|0,c[v>>2]=(a[54017]|0)==118?131648:131544,v)|0);aM=c[13508]|0;if((aM|0)==0){aQ=179864}else{aQ=c[53424+(aM<<2)>>2]|0}s=+h[6756];t=c[13509]|0;if((t|0)==(aM|0)){aR=179864}else{aR=c[53424+(t<<2)>>2]|0}q=+h[6757];aM=c[13510]|0;if((aM|0)==(t|0)){aS=179864}else{aS=c[53424+(aM<<2)>>2]|0}_=+h[6758];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=aQ,h[v+8>>3]=s,c[v+16>>2]=aR,h[v+24>>3]=q,c[v+32>>2]=aS,h[v+40>>3]=_,v)|0);aI(83624,6,1,b|0);aS=c[13518]|0;if((aS|0)==0){aT=179864}else{aT=c[53424+(aS<<2)>>2]|0}_=+h[6761];aR=c[13519]|0;if((aR|0)==(aS|0)){aU=179864}else{aU=c[53424+(aR<<2)>>2]|0}q=+h[6762];aS=c[13520]|0;if((aS|0)==(aR|0)){aV=179864}else{aV=c[53424+(aS<<2)>>2]|0}s=+h[6763];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=aT,h[v+8>>3]=_,c[v+16>>2]=aU,h[v+24>>3]=q,c[v+32>>2]=aV,h[v+40>>3]=s,v)|0);cf(b|0,126160,(v=i,i=i+8|0,c[v>>2]=(c[13506]|0)==1?150856:150704,v)|0);do{if((a[54018]|0)==0){aI(131352,8,1,b|0)}else{aV=c[13505]|0;if((aV|0)<0){aI(131224,8,1,b|0);break}else{cf(b|0,131128,(v=i,i=i+8|0,c[v>>2]=aV,v)|0);break}}}while(0);if((a[54016]|0)==110){aI(131e3,16,1,b|0)}else{aF(10,b|0)}aV=(c[14068]|0)==257?130728:130528;aU=(c[14062]|0)==1?130472:205008;s=+h[7032];aT=(a[56264]&1)!=0?179864:136208;aS=(c[14067]|0)+1|0;q=+h[7035];aR=c[14072]|0;do{if((aR|0)==2){aW=202352}else{if((aR|0)==3){aW=108208;break}aW=(aR|0)==1?201e3:150208}}while(0);aR=(a[56292]&1)!=0?179864:213448;cf(b|0,130824,(v=i,i=i+64|0,c[v>>2]=aV,c[v+8>>2]=aU,h[v+16>>3]=s,c[v+24>>2]=aT,c[v+32>>2]=aS,h[v+40>>3]=q,c[v+48>>2]=aW,c[v+56>>2]=aR,v)|0);aI(129976,13,1,b|0);aR=c[8782]|0;c[8778]=aR;aW=c[8776]|0;L12586:do{if((aW|0)!=0){aS=aW;aT=aR;while(1){aU=c[8774]|0;do{if((aU|0)==0){c[8774]=aS;if((aT|0)!=0){aX=aS;aZ=aT;break}aV=c[8780]|0;c[8778]=aV;aX=aS;aZ=aV}else{aV=aU+((uA(aU|0)|0)+1|0)|0;c[8774]=aV;aX=aV;aZ=aT}}while(0);if(aX>>>0>=aZ>>>0){break}if((aX|0)==0){break L12586}cf(b|0,103640,(v=i,i=i+8|0,c[v>>2]=aX,v)|0);aT=c[8782]|0;c[8778]=aT;aS=c[8776]|0;if((aS|0)==0){break L12586}}c[8774]=0;c[8778]=0}}while(0);aF(10,b|0);aI(129680,13,1,b|0);aX=ur(16,0)|0;if((aX|0)!=0){aZ=aX;do{cf(b|0,103640,(v=i,i=i+8|0,c[v>>2]=aZ,v)|0);aZ=ur(16,0)|0;}while((aZ|0)!=0)}aF(10,b|0);aZ=c[57238]|0;if((aZ|0)==0){aI(129352,10,1,b|0)}else{cf(b|0,129480,(v=i,i=i+8|0,c[v>>2]=aZ,v)|0)}cf(b|0,129048,(v=i,i=i+8|0,c[v>>2]=(a[42568]&1)!=0?179864:136208,v)|0);aZ=c[10568]|0;if((aZ|0)==0){a_=aF(10,b|0)|0;i=d;return}cf(b|0,128984,(v=i,i=i+8|0,c[v>>2]=aZ,v)|0);a_=aF(10,b|0)|0;i=d;return}function jc(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;jI(b);jb(b);e=c[10812]|0;if((e|0)!=0){f=e;do{e=c[f+12>>2]|0;if((e|0)!=0){cf(b|0,154696,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}f=c[f>>2]|0;}while((f|0)!=0)}i8(b);cf(b|0,154696,(v=i,i=i+8|0,c[v>>2]=c[6924],v)|0);if((a[35352]|0)==0){g=aI(172e3,9,1,b|0)|0;i=d;return}aI(156144,3,1,b|0);if((b|0)!=0){aK(35352,b|0)}aF(10,b|0);g=aI(172e3,9,1,b|0)|0;i=d;return}function jd(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;jI(a);d=c[3524]|0;if((d|0)==0){aI(122336,21,1,a|0)}else{e=c[d>>2]|0;cf(a|0,135232,(v=i,i=i+16|0,c[v>>2]=e,c[v+8>>2]=13048,v)|0)}e=c[8244]|0;if((e|0)==0){aI(98152,13,1,a|0);f=aI(172e3,9,1,a|0)|0;i=b;return}else{cf(a|0,105136,(v=i,i=i+8|0,c[v>>2]=e,v)|0);f=aI(172e3,9,1,a|0)|0;i=b;return}}function je(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0.0,E=0,F=0;d=i;i=i+1024|0;e=d|0;f=d+48|0;g=d+96|0;j=d+144|0;k=d+192|0;l=d+240|0;n=d+288|0;o=d+336|0;p=d+384|0;q=d+464|0;r=d+544|0;s=d+624|0;t=d+704|0;u=d+784|0;w=d+864|0;x=d+944|0;y=56832+(b*24&-1)|0;cf(a|0,92200,(v=i,i=i+8|0,c[v>>2]=y,v)|0);z=64652+(b*688&-1)|0;do{if((c[z>>2]&1|0)==0){if((c[64808+(b*688&-1)>>2]|0)==1){aF(34,a|0);A=r|0;B=64813+(b*688&-1)|0;C=+h[64680+(b*688&-1)>>3];t3(l,C);D=C- +O(+C);t4(A,80,B,l,D);B=j3(A)|0;aK(B|0,a|0);aF(34,a|0);break}else{D=+h[64680+(b*688&-1)>>3];cf(a|0,92736,(v=i,i=i+8|0,h[v>>3]=D,v)|0);break}}else{B=64728+(b*688&-1)|0;if((c[B>>2]&1|0)!=0){if((c[64808+(b*688&-1)>>2]|0)==1){aF(34,a|0);A=p|0;E=64813+(b*688&-1)|0;D=+h[64736+(b*688&-1)>>3];t3(o,D);C=D- +O(+D);t4(A,80,E,o,C);E=j3(A)|0;aK(E|0,a|0);aF(34,a|0)}else{C=+h[64736+(b*688&-1)>>3];cf(a|0,92736,(v=i,i=i+8|0,h[v>>3]=C,v)|0)}aI(76472,3,1,a|0)}aF(42,a|0);if((c[B>>2]&2|0)==0){break}aI(76472,3,1,a|0);if((c[64808+(b*688&-1)>>2]|0)==1){aF(34,a|0);B=q|0;E=64813+(b*688&-1)|0;C=+h[64744+(b*688&-1)>>3];t3(n,C);D=C- +O(+C);t4(B,80,E,n,D);E=j3(B)|0;aK(E|0,a|0);aF(34,a|0);break}else{D=+h[64744+(b*688&-1)>>3];cf(a|0,92736,(v=i,i=i+8|0,h[v>>3]=D,v)|0);break}}}while(0);aI(223968,3,1,a|0);do{if((c[z>>2]&2|0)==0){if((c[64808+(b*688&-1)>>2]|0)==1){aF(34,a|0);n=u|0;q=64813+(b*688&-1)|0;D=+h[64688+(b*688&-1)>>3];t3(g,D);C=D- +O(+D);t4(n,80,q,g,C);q=j3(n)|0;aK(q|0,a|0);aF(34,a|0);break}else{C=+h[64688+(b*688&-1)>>3];cf(a|0,92736,(v=i,i=i+8|0,h[v>>3]=C,v)|0);break}}else{q=64732+(b*688&-1)|0;if((c[q>>2]&1|0)!=0){if((c[64808+(b*688&-1)>>2]|0)==1){aF(34,a|0);n=s|0;o=64813+(b*688&-1)|0;C=+h[64752+(b*688&-1)>>3];t3(k,C);D=C- +O(+C);t4(n,80,o,k,D);o=j3(n)|0;aK(o|0,a|0);aF(34,a|0)}else{D=+h[64752+(b*688&-1)>>3];cf(a|0,92736,(v=i,i=i+8|0,h[v>>3]=D,v)|0)}aI(76472,3,1,a|0)}aF(42,a|0);if((c[q>>2]&2|0)==0){break}aI(76472,3,1,a|0);if((c[64808+(b*688&-1)>>2]|0)==1){aF(34,a|0);q=t|0;o=64813+(b*688&-1)|0;D=+h[64760+(b*688&-1)>>3];t3(j,D);C=D- +O(+D);t4(q,80,o,j,C);o=j3(q)|0;aK(o|0,a|0);aF(34,a|0);break}else{C=+h[64760+(b*688&-1)>>3];cf(a|0,92736,(v=i,i=i+8|0,h[v>>3]=C,v)|0);break}}}while(0);j=c[64656+(b*688&-1)>>2]|0;cf(a|0,216880,(v=i,i=i+16|0,c[v>>2]=(j&2|0)!=0?179864:136208,c[v+8>>2]=(j&1|0)!=0?179864:136208,v)|0);if(!((c[z>>2]|0)!=0&(c[m>>2]|0)==(a|0))){aF(10,a|0);i=d;return}aI(201952,16,1,a|0);do{if((c[z>>2]&1|0)!=0){if((c[64808+(b*688&-1)>>2]|0)==1){aF(34,a|0);j=w|0;t=64813+(b*688&-1)|0;C=+h[64664+(b*688&-1)>>3];t3(f,C);D=C- +O(+C);t4(j,80,t,f,D);t=j3(j)|0;aK(t|0,a|0);aF(34,a|0);break}else{D=+h[64664+(b*688&-1)>>3];cf(a|0,92736,(v=i,i=i+8|0,h[v>>3]=D,v)|0);break}}}while(0);aF(58,a|0);do{if((c[z>>2]&2|0)!=0){if((c[64808+(b*688&-1)>>2]|0)==1){aF(34,a|0);f=x|0;w=64813+(b*688&-1)|0;D=+h[64672+(b*688&-1)>>3];t3(e,D);C=D- +O(+D);t4(f,80,w,e,C);w=j3(f)|0;aK(w|0,a|0);aF(34,a|0);break}else{C=+h[64672+(b*688&-1)>>3];cf(a|0,92736,(v=i,i=i+8|0,h[v>>3]=C,v)|0);break}}}while(0);aI(196384,4,1,a|0);b=c[z>>2]|0;if((b&4|0)==0){F=b}else{cf(a|0,185160,(v=i,i=i+8|0,c[v>>2]=y,v)|0);F=c[z>>2]|0}if((F&8|0)==0){i=d;return}cf(a|0,180048,(v=i,i=i+8|0,c[v>>2]=y,v)|0);i=d;return}function jf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0.0;d=i;e=c[b>>2]|0;if((e|0)==3){aI(163528,9,1,a|0);i=d;return}else if((e|0)==2|(e|0)==5){f=c[b+8>>2]|0;cf(a|0,167968,(v=i,i=i+16|0,c[v>>2]=(e|0)==2?179864:114984,c[v+8>>2]=f,v)|0)}else if((e|0)==1|(e|0)==4){g=+(c[b+4>>2]|0)/100.0;cf(a|0,175936,(v=i,i=i+16|0,c[v>>2]=(e|0)==1?179864:114984,h[v+8>>3]=g,v)|0)}else{aI(154480,7,1,a|0)}e=b+16|0;do{if((c[e>>2]|0)==1){if((c[b+20>>2]|0)!=-3){break}aI(151240,9,1,a|0);i=d;return}}while(0);aI(149416,6,1,a|0);jg(a,e);aF(10,a|0);i=d;return}function jg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0,j=0,k=0,l=0,m=0,n=0;d=i;e=c[b>>2]|0;if((e|0)==5){f=+h[b+8>>3];cf(a|0,136528,(v=i,i=i+8|0,h[v>>3]=f,v)|0);i=d;return}else if((e|0)==4){cf(a|0,138224,(v=i,i=i+8|0,h[v>>3]=+h[b+8>>3],v)|0);i=d;return}else if((e|0)==6){aI(140288,10,1,a|0);i=d;return}else if((e|0)==2){cf(a|0,141944,(v=i,i=i+8|0,c[v>>2]=c[b+4>>2],v)|0);i=d;return}else if((e|0)==3){g=c[7642]|0;j=c[b+4>>2]|0;k=-1;while(1){l=k+1|0;m=c[g+(l<<3)>>2]|0;if((m|0)==0){n=0;break}if((c[g+(l<<3)+4>>2]|0)==(j|0)){n=m;break}else{k=l}}if(+h[b+8>>3]<0.0){aI(134760,14,1,a|0);i=d;return}if((n|0)==0){cf(a|0,131792,(v=i,i=i+8|0,c[v>>2]=j,v)|0);i=d;return}else{cf(a|0,133184,(v=i,i=i+8|0,c[v>>2]=n,v)|0);i=d;return}}else if((e|0)==1){cf(a|0,143432,(v=i,i=i+8|0,c[v>>2]=(c[b+4>>2]|0)+1,v)|0);i=d;return}else{i=d;return}}function jh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((c|0)==311){aI(121928,13,1,a|0);return}else if((c|0)==18){aI(129496,7,1,a|0);return}else if((c|0)==209){aI(103480,8,1,a|0);return}else if((c|0)==102){aI(120312,11,1,a|0);return}else if((c|0)==33){aI(128200,9,1,a|0);return}else if((c|0)==392){aI(114072,11,1,a|0);return}else if((c|0)==137){aI(104856,15,1,a|0);return}else if((c|0)==177){aI(104320,6,1,a|0);return}else if((c|0)==368){aI(98592,7,1,a|0);return}else if((c|0)==51){aI(126912,12,1,a|0);return}else if((c|0)==400){aI(98008,6,1,a|0);return}else if((c|0)==295){aI(124576,12,1,a|0);return}else if((c|0)==86){aI(116936,11,1,a|0);return}else if((c|0)==118){aI(116016,12,1,a|0);return}else if((c|0)==252){aI(100064,13,1,a|0);return}else if((c|0)==345){aI(110648,13,1,a|0);do{if((aY(b|0,107848)|0)==0){d=9320}else{if((aY(b|0,122960)|0)==0){d=9320;break}hF(43400,a)}}while(0);if((d|0)==9320){hF(43432,a)}aF(10,a|0);return}else if((c|0)==279){aI(123176,12,1,a|0);return}else if((c|0)==257){aI(100768,12,1,a|0);return}else if((c|0)==64){aI(125816,5,1,a|0);return}else if((c|0)==153){aI(115112,6,1,a|0);return}else if((c|0)==1){aI(130536,6,1,a|0);return}else if((c|0)==193){aI(103856,7,1,a|0);return}else if((c|0)==489){aI(96288,9,1,a|0);return}else if((c|0)==416){aI(97328,9,1,a|0);return}else if((c|0)==225){aI(101296,7,1,a|0);return}else if((c|0)==169){aI(105896,13,1,a|0);return}else if((c|0)==457){aI(96752,8,1,a|0);return}else if((c|0)==474){aI(99624,8,1,a|0);return}else if((c|0)==352){aI(99200,5,1,a|0);return}else{aI(95896,13,1,a|0);return}}function ji(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0.0;f=i;g=d+4|0;cf(b|0,95408,(v=i,i=i+8|0,c[v>>2]=(c[g>>2]|0)+1,v)|0);L12805:do{if((a[d+32|0]&1)!=0){aI(94936,10,1,b|0);j=d+40|0;k=c[j>>2]|0;if((k|0)==2){l=9373}else if((k|0)==1){cf(b|0,95144,(v=i,i=i+8|0,c[v>>2]=(c[d+44>>2]|0)+1,v)|0);break}do{if((l|0)==9373){if((c[g>>2]|0)!=-6){break}aI(93616,9,1,b|0);break L12805}}while(0);jg(b,j)}}while(0);cf(b|0,92904,(v=i,i=i+8|0,h[v>>3]=+h[d+16>>3],v)|0);if(!e){i=f;return}cf(b|0,92032,(v=i,i=i+8|0,c[v>>2]=(c[d+8>>2]|0)+1,v)|0);m=+h[d+24>>3];do{if(m==-3.0){aI(91352,19,1,b|0)}else{if(m==-2.0){aI(90696,18,1,b|0);break}else{cf(b|0,90312,(v=i,i=i+8|0,h[v>>3]=m,v)|0);break}}}while(0);cf(b|0,89624,(v=i,i=i+8|0,c[v>>2]=c[d+12>>2],v)|0);i=f;return}function jj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0,w=0.0,x=0,y=0.0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0;e=i;f=c[10818]|0;if((f|0)==0){g=0}else{j=(d|0)==0;k=0;l=f;while(1){f=c[l+12>>2]|0;L12830:do{if((f|0)==1){n=c[l+4>>2]|0;do{if(j){o=n}else{if((n|0)==(d|0)){o=d;break}if((f|0)==4){p=9449;break L12830}else if((f|0)==3){p=9431;break L12830}else if((f|0)==2){p=9419;break L12830}else{p=9448;break L12830}}}while(0);n=(c[m>>2]|0)==(b|0)?86152:85072;q=l+4|0;cf(b|0,87232,(v=i,i=i+16|0,c[v>>2]=n,c[v+8>>2]=o,v)|0);if((c[l+104>>2]|0)==1){aI(84272,7,1,b|0);n=c[l+112>>2]|0;if((n|0)==0){r=179864}else{r=c[53424+(n<<2)>>2]|0}s=+h[l+128>>3];t=c[l+116>>2]|0;if((t|0)==(n|0)){u=179864}else{u=c[53424+(t<<2)>>2]|0}w=+h[l+136>>3];n=c[l+120>>2]|0;if((n|0)==(t|0)){x=179864}else{x=c[53424+(n<<2)>>2]|0}y=+h[l+144>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=r,h[v+8>>3]=s,c[v+16>>2]=u,h[v+24>>3]=w,c[v+32>>2]=x,h[v+40>>3]=y,v)|0);aI(83624,6,1,b|0);n=c[l+152>>2]|0;if((n|0)==0){z=179864}else{z=c[53424+(n<<2)>>2]|0}y=+h[l+168>>3];t=c[l+156>>2]|0;if((t|0)==(n|0)){A=179864}else{A=c[53424+(t<<2)>>2]|0}w=+h[l+176>>3];n=c[l+160>>2]|0;if((n|0)==(t|0)){B=179864}else{B=c[53424+(n<<2)>>2]|0}s=+h[l+184>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=z,h[v+8>>3]=y,c[v+16>>2]=A,h[v+24>>3]=w,c[v+32>>2]=B,h[v+40>>3]=s,v)|0);C=1;D=q;break}else{aI(82592,5,1,b|0);n=c[l+192>>2]|0;if((n|0)==0){E=179864}else{E=c[53424+(n<<2)>>2]|0}s=+h[l+208>>3];t=c[l+196>>2]|0;if((t|0)==(n|0)){F=179864}else{F=c[53424+(t<<2)>>2]|0}w=+h[l+216>>3];n=c[l+200>>2]|0;if((n|0)==(t|0)){G=179864}else{G=c[53424+(n<<2)>>2]|0}y=+h[l+224>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=E,h[v+8>>3]=s,c[v+16>>2]=F,h[v+24>>3]=w,c[v+32>>2]=G,h[v+40>>3]=y,v)|0);aI(127448,4,1,b|0);n=c[l+232>>2]|0;if((n|0)==0){H=179864}else{H=c[53424+(n<<2)>>2]|0}y=+h[l+248>>3];t=c[l+236>>2]|0;if((t|0)==(n|0)){I=179864}else{I=c[53424+(t<<2)>>2]|0}w=+h[l+256>>3];n=c[l+240>>2]|0;if((n|0)==(t|0)){J=179864}else{J=c[53424+(n<<2)>>2]|0}s=+h[l+264>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=H,h[v+8>>3]=y,c[v+16>>2]=I,h[v+24>>3]=w,c[v+32>>2]=J,h[v+40>>3]=s,v)|0);C=1;D=q;break}}else if((f|0)==4){p=9449}else if((f|0)==3){p=9431}else if((f|0)==2){p=9419}else{p=9448}}while(0);L12875:do{if((p|0)==9419){p=0;q=c[l+4>>2]|0;do{if(j){K=q}else{if((q|0)==(d|0)){K=d;break}if((f|0)==4){p=9449;break L12875}else if((f|0)==3){p=9431;break L12875}else{p=9448;break L12875}}}while(0);q=(c[m>>2]|0)==(b|0)?86152:85072;n=l+4|0;cf(b|0,79696,(v=i,i=i+16|0,c[v>>2]=q,c[v+8>>2]=K,v)|0);aI(84272,7,1,b|0);q=c[l+112>>2]|0;if((q|0)==0){L=179864}else{L=c[53424+(q<<2)>>2]|0}s=+h[l+128>>3];t=c[l+116>>2]|0;if((t|0)==(q|0)){M=179864}else{M=c[53424+(t<<2)>>2]|0}w=+h[l+136>>3];q=c[l+120>>2]|0;if((q|0)==(t|0)){N=179864}else{N=c[53424+(q<<2)>>2]|0}y=+h[l+144>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=L,h[v+8>>3]=s,c[v+16>>2]=M,h[v+24>>3]=w,c[v+32>>2]=N,h[v+40>>3]=y,v)|0);aI(83624,6,1,b|0);q=c[l+152>>2]|0;if((q|0)==0){O=179864}else{O=c[53424+(q<<2)>>2]|0}y=+h[l+168>>3];cf(b|0,78968,(v=i,i=i+16|0,c[v>>2]=O,h[v+8>>3]=y,v)|0);y=+h[l+192>>3];w=+h[l+200>>3];cf(b|0,78400,(v=i,i=i+16|0,h[v>>3]=y,h[v+8>>3]=w,v)|0);C=1;D=n}}while(0);L12893:do{if((p|0)==9431){p=0;n=c[l+4>>2]|0;do{if(j){P=n}else{if((n|0)==(d|0)){P=d;break}if((f|0)==4){p=9449;break L12893}else{p=9448;break L12893}}}while(0);n=(c[m>>2]|0)==(b|0)?86152:85072;q=l+4|0;cf(b|0,78048,(v=i,i=i+16|0,c[v>>2]=n,c[v+8>>2]=P,v)|0);aI(84272,7,1,b|0);n=c[l+112>>2]|0;if((n|0)==0){Q=179864}else{Q=c[53424+(n<<2)>>2]|0}w=+h[l+128>>3];t=c[l+116>>2]|0;if((t|0)==(n|0)){R=179864}else{R=c[53424+(t<<2)>>2]|0}y=+h[l+136>>3];n=c[l+120>>2]|0;if((n|0)==(t|0)){S=179864}else{S=c[53424+(n<<2)>>2]|0}s=+h[l+144>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=Q,h[v+8>>3]=w,c[v+16>>2]=R,h[v+24>>3]=y,c[v+32>>2]=S,h[v+40>>3]=s,v)|0);aI(83624,6,1,b|0);n=l+152|0;t=c[n>>2]|0;if((t|0)==0){T=179864}else{T=c[53424+(t<<2)>>2]|0}s=+h[l+168>>3];cf(b|0,78968,(v=i,i=i+16|0,c[v>>2]=T,h[v+8>>3]=s,v)|0);t=c[l+156>>2]|0;if((t|0)==(c[n>>2]|0)){U=179864}else{U=c[53424+(t<<2)>>2]|0}s=+h[l+176>>3];cf(b|0,77424,(v=i,i=i+16|0,c[v>>2]=U,h[v+8>>3]=s,v)|0);s=+h[l+192>>3];cf(b|0,76888,(v=i,i=i+8|0,h[v>>3]=s,v)|0);aI(76320,7,1,b|0);t=c[l+104>>2]|0;if((t|0)==2){aI(210848,2,1,b|0);C=1;D=q;break}else if((t|0)==0){aI(150688,2,1,b|0);C=1;D=q;break}else if((t|0)==1){aI(211336,2,1,b|0);C=1;D=q;break}else{C=1;D=q;break}}}while(0);do{if((p|0)==9448){p=0;C=k;D=l+4|0}else if((p|0)==9449){p=0;f=l+4|0;q=c[f>>2]|0;if(j){V=q}else{if((q|0)==(d|0)){V=d}else{C=k;D=f;break}}f=l+104|0;q=(c[m>>2]|0)==(b|0)?86152:85072;t=l+4|0;cf(b|0,74328,(v=i,i=i+16|0,c[v>>2]=q,c[v+8>>2]=V,v)|0);q=f+4|0;if((c[q>>2]|0)!=0){aI(82592,5,1,b|0);n=c[q>>2]|0;W=c[n>>2]|0;if((W|0)==0){X=179864}else{X=c[53424+(W<<2)>>2]|0}s=+h[n+16>>3];Y=c[n+4>>2]|0;if((Y|0)==(W|0)){Z=179864}else{Z=c[53424+(Y<<2)>>2]|0}y=+h[n+24>>3];W=c[n+8>>2]|0;if((W|0)==(Y|0)){_=179864}else{_=c[53424+(W<<2)>>2]|0}w=+h[n+32>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=X,h[v+8>>3]=s,c[v+16>>2]=Z,h[v+24>>3]=y,c[v+32>>2]=_,h[v+40>>3]=w,v)|0)}n=f|0;if((c[n>>2]|0)>1){$=1}else{C=1;D=t;break}while(1){cf(b|0,((c[m>>2]|0)==(b|0)?73888:127448)|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);f=c[q>>2]|0;W=c[f+($*40&-1)>>2]|0;if((W|0)==0){aa=179864}else{aa=c[53424+(W<<2)>>2]|0}w=+h[f+($*40&-1)+16>>3];Y=c[f+($*40&-1)+4>>2]|0;if((Y|0)==(W|0)){ab=179864}else{ab=c[53424+(Y<<2)>>2]|0}y=+h[f+($*40&-1)+24>>3];W=c[f+($*40&-1)+8>>2]|0;if((W|0)==(Y|0)){ac=179864}else{ac=c[53424+(W<<2)>>2]|0}s=+h[f+($*40&-1)+32>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=aa,h[v+8>>3]=w,c[v+16>>2]=ab,h[v+24>>3]=y,c[v+32>>2]=ac,h[v+40>>3]=s,v)|0);f=$+1|0;if((f|0)<(c[n>>2]|0)){$=f}else{C=1;D=t;break}}}}while(0);t=(c[m>>2]|0)==(b|0)?86152:85072;n=c[D>>2]|0;cf(b|0,73592,(v=i,i=i+16|0,c[v>>2]=t,c[v+8>>2]=n,v)|0);n=c[l+8>>2]|0;if((n|0)>0){ad=150856}else{ad=(n|0)<0?121920:150704}cf(b|0,73368,(v=i,i=i+8|0,c[v>>2]=ad,v)|0);s=+h[l+64>>3];if(s!=0.0){cf(b|0,223096,(v=i,i=i+8|0,h[v>>3]=s,v)|0)}aI(222648,3,1,b|0);n=c[l+52>>2]|0;do{if((n|0)==-7){aI(126024,7,1,b|0)}else{if((a[l+80|0]&1)==0){t=n+1|0;cf(b|0,121528,(v=i,i=i+8|0,c[v>>2]=t,v)|0);break}else{jg(b,l+88|0);break}}}while(0);aI(220776,11,1,b|0);jf(b,l+16|0);n=c[l>>2]|0;if((n|0)==0){g=C;break}else{k=C;l=n}}}if((d|0)<1|g){i=e;return}else{uf(c[13898]|0,218968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function jk(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0,w=0,x=0,y=0,z=0.0,A=0;e=i;i=i+384|0;f=e|0;g=e+48|0;j=e+96|0;k=e+144|0;l=e+224|0;m=e+304|0;n=c[64916+(d*688&-1)>>2]|0;o=n&3;p=56832+(d*24&-1)|0;if((o|0)==0){cf(b|0,128832,(v=i,i=i+8|0,c[v>>2]=p,v)|0);i=e;return}q=(a[65072+(d*688&-1)|0]&1)!=0?145600:128472;r=+h[65056+(d*688&-1)>>3];s=+h[65064+(d*688&-1)>>3];t=65032+(d*688&-1)|0;u=(c[t>>2]|0)!=0?185408:185368;cf(b|0,128728,(v=i,i=i+56|0,c[v>>2]=p,c[v+8>>2]=(o|0)==2?128640:149416,c[v+16>>2]=q,h[v+24>>3]=r,h[v+32>>3]=s,c[v+40>>2]=(n&4|0)!=0?179864:136208,c[v+48>>2]=u,v)|0);u=c[t>>2]|0;if((u|0)!=0){cf(b|0,128080,(v=i,i=i+8|0,c[v>>2]=u,v)|0)}aI(216256,8,1,b|0);u=c[64984+(d*688&-1)>>2]|0;if((u|0)==0){w=179864}else{w=c[53424+(u<<2)>>2]|0}s=+h[65e3+(d*688&-1)>>3];t=c[64988+(d*688&-1)>>2]|0;if((t|0)==(u|0)){x=179864}else{x=c[53424+(t<<2)>>2]|0}r=+h[65008+(d*688&-1)>>3];u=c[64992+(d*688&-1)>>2]|0;if((u|0)==(t|0)){y=179864}else{y=c[53424+(u<<2)>>2]|0}z=+h[65016+(d*688&-1)>>3];cf(b|0,215704,(v=i,i=i+48|0,c[v>>2]=w,h[v+8>>3]=s,c[v+16>>2]=x,h[v+24>>3]=r,c[v+32>>2]=y,h[v+40>>3]=z,v)|0);do{if((a[65272+(d*688&-1)|0]&1)==0){aI(127936,12,1,b|0)}else{y=c[65128+(d*688&-1)>>2]|0;if((y|0)==2){aI(131280,6,1,b|0);break}else if((y|0)==0){aI(131440,5,1,b|0);break}else if((y|0)==1){aI(131216,7,1,b|0);break}else{break}}}while(0);cf(b|0,127832,(v=i,i=i+8|0,c[v>>2]=p,v)|0);y=64920+(d*688&-1)|0;x=c[y>>2]|0;do{if((x|0)==2){w=64952+(d*688&-1)|0;z=+h[w>>3];if(z!=-8.988465674311579e+307){if((c[64808+(d*688&-1)>>2]|0)==1){aF(34,b|0);u=k|0;t=64813+(d*688&-1)|0;r=+h[w>>3];t3(j,r);s=r- +O(+r);t4(u,80,t,j,s);t=j3(u)|0;aK(t|0,b|0);aF(34,b|0)}else{cf(b|0,92736,(v=i,i=i+8|0,h[v>>3]=z,v)|0)}aF(44,b|0)}z=+h[64960+(d*688&-1)>>3];cf(b|0,170912,(v=i,i=i+8|0,h[v>>3]=z,v)|0);t=64968+(d*688&-1)|0;if(+h[t>>3]==8.988465674311579e+307){break}aF(44,b|0);if((c[64808+(d*688&-1)>>2]|0)==1){aF(34,b|0);u=l|0;w=64813+(d*688&-1)|0;z=+h[t>>3];t3(g,z);s=z- +O(+z);t4(u,80,w,g,s);w=j3(u)|0;aK(w|0,b|0);aF(34,b|0);break}else{s=+h[t>>3];cf(b|0,92736,(v=i,i=i+8|0,h[v>>3]=s,v)|0);break}}else if((x|0)==1){aI(127656,9,1,b|0)}else if((x|0)==4){cf(b|0,127576,(v=i,i=i+8|0,c[v>>2]=p,v)|0)}else if((x|0)==5){cf(b|0,127464,(v=i,i=i+8|0,c[v>>2]=p,v)|0)}}while(0);cf(b|0,((a[65024+(d*688&-1)|0]&1)!=0?127160:127080)|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);x=c[64924+(d*688&-1)>>2]|0;do{if((x|0)!=0){if((a[x]|0)==0){break}cf(b|0,126104,(v=i,i=i+8|0,c[v>>2]=x,v)|0)}}while(0);x=64928+(d*688&-1)|0;if((c[x>>2]|0)!=0){aI(145280,10,1,b|0);jg(b,x)}aF(10,b|0);x=64944+(d*688&-1)|0;if((c[x>>2]|0)==0){i=e;return}g=(c[y>>2]|0)==3?179864:186440;cf(b|0,126896,(v=i,i=i+16|0,c[v>>2]=p,c[v+8>>2]=g,v)|0);aI(126656,2,1,b|0);g=c[x>>2]|0;if((g|0)!=0){x=64808+(d*688&-1)|0;p=m|0;m=64813+(d*688&-1)|0;d=g;do{g=d+12|0;do{if((c[g>>2]|0)<0){A=d+16|0}else{y=c[d+8>>2]|0;if((y|0)!=0){l=j3(y)|0;cf(b|0,103640,(v=i,i=i+8|0,c[v>>2]=l,v)|0)}if((c[x>>2]|0)==1){aF(34,b|0);s=+h[d>>3];t3(f,s);z=s- +O(+s);t4(p,80,m,f,z);l=j3(p)|0;aK(l|0,b|0);aF(34,b|0)}else{z=+h[d>>3];cf(b|0,92736,(v=i,i=i+8|0,h[v>>3]=z,v)|0)}l=c[g>>2]|0;if((l|0)!=0){cf(b|0,95144,(v=i,i=i+8|0,c[v>>2]=l,v)|0)}l=d+16|0;if((c[l>>2]|0)==0){A=l;break}aI(86120,2,1,b|0);A=l}}while(0);d=c[A>>2]|0;}while((d|0)!=0)}aI(84944,2,1,b|0);i=e;return}function jl(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0;f=i;i=i+8|0;g=f|0;h=c[b>>2]|0;c[12918]=0;c[3530]=0;j=a[h]|0;if(j<<24>>24==0){k=0;l=c[3530]|0;m=c[1054]|0;n=m+(l*40&-1)+32|0;c[n>>2]=k;o=c[3530]|0;p=c[1054]|0;q=p+(o*40&-1)+36|0;c[q>>2]=0;r=c[3530]|0;s=c[1054]|0;t=s+(r*40&-1)|0;a[t]=1;u=c[3530]|0;i=f;return u|0}else{w=h;x=0;y=h;z=j;A=1}L13041:while(1){if((A|0)<(c[1052]|0)){B=z}else{dH();B=a[y]|0}L13046:do{if((aM(B&255|0)|0)==0){c[(c[1054]|0)+((c[3530]|0)*40&-1)+32>>2]=x;c[(c[1054]|0)+((c[3530]|0)*40&-1)+36>>2]=1;a[(c[1054]|0)+((c[3530]|0)*40&-1)|0]=1;j=a[y]|0;if(j<<24>>24==96){jm(b,e,x);C=x-1|0;D=c[b>>2]|0;break}L13051:do{if((bO(j&255|0)|0)==0){h=a[y]|0;if(h<<24>>24==95){E=x;F=9542;break}if(((h&255)-48|0)>>>0<10){a[(c[1054]|0)+((c[3530]|0)*40&-1)|0]=0;G=jn(y)|0;c[(c[1054]|0)+((c[3530]|0)*40&-1)+36>>2]=G;H=(x-1|0)+(c[(c[1054]|0)+((c[3530]|0)*40&-1)+36>>2]|0)|0;I=w;break}J=h<<24>>24;if((h<<24>>24|0)==46){if(((a[w+(x+1|0)|0]|0)-48|0)>>>0>=10){H=x;I=w;break}a[(c[1054]|0)+((c[3530]|0)*40&-1)|0]=0;G=jn(y)|0;c[(c[1054]|0)+((c[3530]|0)*40&-1)+36>>2]=G;H=(x-1|0)+(c[(c[1054]|0)+((c[3530]|0)*40&-1)+36>>2]|0)|0;I=w;break}else if((h<<24>>24|0)==39|(h<<24>>24|0)==34){G=(c[1054]|0)+((c[3530]|0)*40&-1)+36|0;c[G>>2]=(c[G>>2]|0)+1;G=a[y]|0;K=x+1|0;L=w+K|0;M=a[L]|0;if(M<<24>>24==G<<24>>24){H=K;I=w;break}N=G<<24>>24==34;O=G<<24>>24==39;P=w;Q=x;R=K;K=L;L=M;L13062:while(1){S=Q;T=R;U=K;M=L;L13064:while(1){if(M<<24>>24==0){break L13062}do{if(N&M<<24>>24==92){V=S+2|0;if((a[P+V|0]|0)==0){F=9567;break}W=(c[1054]|0)+((c[3530]|0)*40&-1)+36|0;c[W>>2]=(c[W>>2]|0)+2;X=V}else{F=9567}}while(0);L13070:do{if((F|0)==9567){F=0;do{if(N){if(M<<24>>24==96){break L13064}}else{if(!O){break}if((a[P+(S+2|0)|0]|0)!=39){break}V=S+3|0;if((a[P+V|0]|0)!=39){break}W=(c[1054]|0)+((c[3530]|0)*40&-1)+36|0;c[W>>2]=(c[W>>2]|0)+3;X=V;break L13070}}while(0);V=(c[1054]|0)+((c[3530]|0)*40&-1)+36|0;c[V>>2]=(c[V>>2]|0)+1;X=T}}while(0);V=X+1|0;W=P+V|0;Y=a[W]|0;if(Y<<24>>24==G<<24>>24){H=V;I=P;break L13051}else{S=X;T=V;U=W;M=Y}}jm(b,e,T);M=c[b>>2]|0;Y=S+1|0;W=M+Y|0;V=a[W]|0;if(V<<24>>24==34){H=Y;I=M;break L13051}else{P=M;Q=S;R=Y;K=W;L=V}}a[U]=G;a[P+(S+2|0)|0]=0;H=T;I=P;break}else if((h<<24>>24|0)==123){a[(c[1054]|0)+((c[3530]|0)*40&-1)|0]=0;c[(c[1054]|0)+((c[3530]|0)*40&-1)+8>>2]=2;L=x+1|0;K=c[3530]|0;R=c[1054]|0;Q=ca(w+L|0,153808,(v=i,i=i+24|0,c[v>>2]=R+(K*40&-1)+16,c[v+8>>2]=R+(K*40&-1)+24,c[v+16>>2]=g,v)|0)|0;if((Q|0)<1){c[12918]=(c[12918]|0)+1;K=c[3530]|0;c[3530]=K+1;a[(c[1054]|0)+(K*40&-1)|0]=1;C=x;D=w;break L13046}Z=c[3530]|0;if(!((Q|0)==3&(a[g]|0)==125)){F=9553;break L13041}Q=(c[1054]|0)+(Z*40&-1)+36|0;c[Q>>2]=(c[Q>>2]|0)+2;Q=L;while(1){L=Q+1|0;K=w+L|0;if((a[K]|0)==125){H=L;I=w;break L13051}R=(c[1054]|0)+((c[3530]|0)*40&-1)+36|0;c[R>>2]=(c[R>>2]|0)+1;if((a[K]|0)==0){F=9557;break L13041}else{Q=L}}}else{if((J|0)==35){k=x;F=9588;break L13041}else if((J|0)==125){c[12918]=(c[12918]|0)-1;H=x;I=w;break}else if((J|0)==94|(J|0)==43|(J|0)==45|(J|0)==47|(J|0)==37|(J|0)==126|(J|0)==40|(J|0)==41|(J|0)==91|(J|0)==93|(J|0)==59|(J|0)==58|(J|0)==63|(J|0)==44|(J|0)==36){H=x;I=w;break}else if((J|0)==33|(J|0)==60|(J|0)==62){Q=x+1|0;if((a[w+Q|0]|0)!=61){H=x;I=w;break}P=(c[1054]|0)+((c[3530]|0)*40&-1)+36|0;c[P>>2]=(c[P>>2]|0)+1;H=Q;I=w;break}else if((J|0)==38|(J|0)==124|(J|0)==61|(J|0)==42){Q=x+1|0;if(h<<24>>24!=(a[w+Q|0]|0)){H=x;I=w;break}P=(c[1054]|0)+((c[3530]|0)*40&-1)+36|0;c[P>>2]=(c[P>>2]|0)+1;H=Q;I=w;break}else{F=9581;break L13041}}}else{E=x;F=9542}}while(0);L13097:do{if((F|0)==9542){while(1){F=0;j=E+1|0;Q=w+j|0;if((bs(d[Q]|0|0)|0)==0){if((a[Q]|0)!=95){H=E;I=w;break L13097}}Q=(c[1054]|0)+((c[3530]|0)*40&-1)+36|0;c[Q>>2]=(c[Q>>2]|0)+1;E=j;F=9542}}}while(0);c[3530]=(c[3530]|0)+1;C=H;D=I}else{C=x;D=w}}while(0);h=C+1|0;j=D+h|0;Q=a[j]|0;if(Q<<24>>24==0){k=h;F=9587;break}w=D;x=h;y=j;z=Q;A=(c[3530]|0)+1|0}if((F|0)==9553){uf(Z,211216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((F|0)==9581){uf(c[3530]|0,134656,(v=i,i=i+8|0,c[v>>2]=J,v)|0);return 0}else if((F|0)==9588){l=c[3530]|0;m=c[1054]|0;n=m+(l*40&-1)+32|0;c[n>>2]=k;o=c[3530]|0;p=c[1054]|0;q=p+(o*40&-1)+36|0;c[q>>2]=0;r=c[3530]|0;s=c[1054]|0;t=s+(r*40&-1)|0;a[t]=1;u=c[3530]|0;i=f;return u|0}else if((F|0)==9557){uf(c[3530]|0,154312,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((F|0)==9587){l=c[3530]|0;m=c[1054]|0;n=m+(l*40&-1)+32|0;c[n>>2]=k;o=c[3530]|0;p=c[1054]|0;q=p+(o*40&-1)+36|0;c[q>>2]=0;r=c[3530]|0;s=c[1054]|0;t=s+(r*40&-1)|0;a[t]=1;u=c[3530]|0;i=f;return u|0}return 0}function jm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;f=i;i=i+8|0;g=f|0;h=c[b>>2]|0;j=h+e|0;k=j;while(1){l=k+1|0;m=a[l]|0;if((m<<24>>24|0)==0|(m<<24>>24|0)==96){break}else{k=l}}m=l-j|0;n=ut(m)|0;do{if((n|0)==0){gk();o=ut(m)|0;if((o|0)!=0){p=o;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=121896,v)|0)}else{p=n}}while(0);n=h+(e+1|0)|0;uF(p|0,n|0,m|0);if((uA(n|0)|0)>>>0>=m>>>0){a[p+((l|0)==(j|0)?0:m-1|0)|0]=0}do{if((a[l]|0)==0){q=0;r=0}else{m=k+2|0;j=(uA(m|0)|0)+1|0;if(j>>>0<=1){q=j;r=0;break}n=ut(j)|0;do{if((n|0)==0){gk();h=ut(j)|0;if((h|0)!=0){s=h;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=104824,v)|0)}else{s=n}}while(0);uB(s|0,m|0);q=j;r=s}}while(0);eo(p,g);uu(p);p=c[g>>2]|0;g=0;s=e;while(1){e=g+1|0;k=a[p+g|0]|0;if((k<<24>>24|0)==0){break}else if((k<<24>>24|0)==10|(k<<24>>24|0)==13){t=s}else{a[(c[b>>2]|0)+s|0]=k;t=s+1|0}if((t|0)!=(c[d>>2]|0)){g=e;s=t;continue}dG();g=e;s=t}a[(c[b>>2]|0)+s|0]=0;uu(p);if((r|0)==0){a[25280]=0;i=f;return}p=s+q|0;if(p>>>0>(c[d>>2]|0)>>>0){do{dG();}while(p>>>0>(c[d>>2]|0)>>>0)}uB((c[b>>2]|0)+s|0,r|0);uu(r);a[25280]=0;i=f;return}function jn(b){b=b|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0.0;e=i;i=i+8|0;f=e|0;a[(c[1054]|0)+((c[3530]|0)*40&-1)|0]=0;c[(c[1054]|0)+((c[3530]|0)*40&-1)+8>>2]=1;g=0;while(1){j=a[b+g|0]|0;if(((j&255)-48|0)>>>0<10){g=g+1|0}else{break}}if(j<<24>>24==46){c[(c[1054]|0)+((c[3530]|0)*40&-1)+8>>2]=2;k=g;while(1){l=k+1|0;m=a[b+l|0]|0;if(((m&255)-48|0)>>>0<10){k=l}else{n=l;o=m;break}}}else{n=g;o=j}if((o<<24>>24|0)==101|(o<<24>>24|0)==69){c[(c[1054]|0)+((c[3530]|0)*40&-1)+8>>2]=2;o=n+1|0;j=a[b+o|0]|0;if((j<<24>>24|0)==45|(j<<24>>24|0)==43){g=n+2|0;p=g;q=a[b+g|0]|0}else{p=o;q=j}if(((q&255)-48|0)>>>0<10){q=p;while(1){j=q+1|0;if(((d[b+j|0]|0)-48|0)>>>0<10){q=j}else{r=j;break}}}else{q=(c[1054]|0)+((c[3530]|0)*40&-1)+32|0;c[q>>2]=(c[q>>2]|0)+p;uf(c[3530]|0,97936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}else{r=n}n=c[3530]|0;p=c[1054]|0;do{if((c[p+(n*40&-1)+8>>2]|0)==1){c[b0()>>2]=0;q=aE(b|0,f|0,0)|0;j=(c[b0()>>2]|0)==0;o=c[3530]|0;if(!j){uh(o,91904,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[(c[1054]|0)+((c[3530]|0)*40&-1)+8>>2]=2;s=c[3530]|0;t=c[1054]|0;break}c[(c[1054]|0)+(o*40&-1)+16>>2]=q;u=(c[f>>2]|0)-b|0;i=e;return u|0}else{s=n;t=p}}while(0);h[t+(s*40&-1)+24>>3]=0.0;w=+uz(b,0);h[(c[1054]|0)+((c[3530]|0)*40&-1)+16>>3]=w;u=r;i=e;return u|0}function jo(){var d=0,e=0,f=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aH=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aZ=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,bf=0,bg=0,bh=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0,bz=0,bB=0,bC=0,bD=0,bE=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bL=0,bM=0,bN=0,bO=0,bQ=0,bR=0,bS=0,bT=0,bV=0,bW=0,bX=0,bY=0,bZ=0,b_=0,b0=0,b1=0,b2=0,b3=0,b4=0,b5=0,b6=0,b7=0,b8=0,b9=0,cb=0,cc=0,cd=0,ce=0,cg=0,ch=0,ci=0,cj=0,ck=0,cl=0,cm=0,cn=0,co=0,cp=0,cq=0,cr=0,cs=0,ct=0,cu=0,cv=0,cw=0,cx=0,cy=0,cA=0,cC=0,cD=0,cE=0,cF=0,cG=0,cH=0,cI=0,cJ=0,cK=0,cL=0,cM=0,cN=0,cO=0,cP=0,cQ=0,cR=0,cT=0,cU=0,cV=0,cW=0,cX=0,cY=0,cZ=0,c_=0,c$=0,c0=0,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9=0,da=0,dc=0,dd=0,de=0,df=0,dg=0,dh=0,di=0,dj=0,dk=0,dm=0,dn=0,dp=0,dq=0,dr=0,ds=0,dt=0,du=0,dv=0,dw=0,dx=0,dy=0,dz=0,dA=0,dB=0,dC=0,dD=0,dE=0,dF=0,dG=0,dH=0,dI=0,dJ=0,dK=0,dL=0,dM=0,dN=0,dO=0,dP=0,dQ=0,dR=0,dS=0,dT=0,dU=0,dV=0,dW=0,dX=0,dY=0,dZ=0,d_=0,d$=0,d0=0,d1=0,d2=0,d3=0,d4=0,d5=0,d6=0,d7=0,d8=0,d9=0,eb=0,ec=0,ed=0,ee=0,ef=0,eg=0,eh=0,ei=0,ej=0,ek=0,el=0,em=0,en=0,eo=0,ep=0,eq=0,er=0,es=0,et=0,eu=0,ev=0,ew=0,ex=0,eA=0,eB=0,eD=0,eE=0,eF=0,eG=0,eH=0,eI=0,eJ=0,eK=0,eL=0,eM=0,eN=0,eO=0,eQ=0,eR=0,eS=0,eT=0,eU=0,eV=0,eW=0,eX=0,eY=0,eZ=0,e_=0,e$=0,e0=0,e2=0,e3=0,e4=0,e5=0,e6=0,e8=0,e9=0,fa=0,fb=0,fc=0,fd=0,fe=0,ff=0,fg=0,fh=0,fi=0,fj=0,fk=0,fl=0,fm=0,fn=0,fo=0,fp=0,fq=0,fr=0,fs=0,ft=0,fu=0,fv=0,fw=0,fx=0,fy=0,fz=0,fA=0,fB=0,fC=0,fD=0,fE=0,fF=0,fG=0,fH=0,fI=0,fJ=0,fK=0,fL=0,fM=0,fN=0,fO=0,fP=0,fQ=0,fS=0,fT=0,fU=0,fV=0,fW=0,fX=0,fY=0,fZ=0,f_=0,f$=0,f0=0,f1=0,f2=0,f3=0,f4=0,f5=0,f6=0,f7=0,f8=0,f9=0,ga=0,gb=0,gc=0,gd=0,ge=0,gf=0,gg=0,gh=0,gi=0,gj=0,gl=0,gm=0,gn=0,go=0,gp=0,gq=0,gs=0,gt=0,gu=0,gv=0,gw=0,gx=0,gy=0,gz=0,gA=0,gB=0,gC=0,gD=0,gE=0,gF=0,gG=0,gH=0,gI=0,gJ=0,gK=0,gL=0,gM=0,gN=0,gO=0,gP=0,gQ=0,gR=0,gS=0,gT=0,gU=0,gV=0,gW=0,gX=0.0,gY=0,gZ=0,g_=0,g$=0,g0=0,g1=0,g2=0,g3=0,g4=0,g5=0,g6=0,g7=0,g8=0,g9=0,ha=0,hb=0,hc=0.0,hd=0,he=0,hf=0,hg=0,hh=0,hi=0,hj=0,hk=0,hl=0,hm=0,hn=0,ho=0,hp=0,hq=0,hr=0,hs=0,ht=0,hu=0,hv=0,hw=0,hx=0,hy=0,hA=0,hB=0,hC=0,hF=0,hG=0,hK=0,hN=0,hP=0,hQ=0,hR=0,hS=0,hT=0,hU=0,hV=0,hW=0,hY=0,hZ=0,h_=0,h$=0,h0=0,h1=0,h2=0,h3=0,h4=0,h5=0,h6=0,h7=0,h8=0,h9=0,ia=0,ib=0,ic=0,id=0,ie=0,ig=0,ih=0,ii=0,ij=0,ik=0,il=0,im=0,io=0,ip=0,iq=0,ir=0,iu=0,iv=0,iy=0,iz=0,iA=0,iB=0,iC=0,iD=0,iE=0,iF=0,iG=0,iH=0,iI=0,iJ=0,iK=0,iL=0,iM=0,iN=0,iP=0,iR=0,iS=0,iT=0,iU=0,iV=0,iW=0,iX=0,iZ=0,i_=0,i$=0,i0=0,i1=0,i2=0,i3=0,i4=0,i5=0,i6=0,i7=0,i8=0,ja=0,jb=0,jc=0,jd=0,je=0,jf=0,jg=0,jh=0,ji=0,jj=0,jk=0,jl=0,jm=0,jn=0,jo=0,jy=0,jz=0,jA=0,jB=0,jC=0,jD=0,jE=0,jF=0,jG=0,jH=0,jI=0,jJ=0,jK=0,jL=0,jM=0,jN=0,jO=0,jP=0,jQ=0,jR=0,jS=0,jT=0,jU=0,jV=0,jW=0,jX=0,jY=0,jZ=0,j_=0,j$=0,j0=0,j1=0,j2=0,j3=0,j4=0,j5=0,j6=0,j7=0,j8=0,j9=0,ka=0,kb=0,kc=0,kd=0,ke=0,kf=0,kg=0,kh=0,ki=0,kj=0,kk=0,kl=0,km=0,kn=0,ko=0,kp=0,kq=0,kr=0,ks=0,kt=0,ku=0,kv=0,kw=0,kx=0,ky=0,kz=0,kA=0,kB=0,kC=0,kD=0,kE=0,kF=0,kG=0,kH=0,kI=0,kJ=0,kK=0,kL=0,kM=0,kN=0,kO=0,kP=0,kQ=0,kR=0,kS=0,kT=0,kU=0,kV=0,kW=0,kX=0,kY=0,kZ=0,k_=0,k$=0,k0=0,k1=0,k2=0,k3=0.0,k4=0,k5=0,k6=0,k7=0,k8=0,k9=0,la=0.0,lb=0.0,lc=0,ld=0,le=0,lf=0,lg=0,lh=0,li=0,lk=0,lm=0,ln=0,lo=0,lp=0,lq=0,lr=0,lt=0,lu=0,lv=0,lw=0,lx=0,ly=0,lA=0,lB=0,lC=0,lD=0,lE=0,lF=0,lG=0,lH=0,lI=0,lJ=0,lK=0,lL=0,lM=0,lN=0,lO=0,lP=0,lQ=0,lR=0,lS=0,lT=0,lU=0,lV=0.0,lW=0,lX=0,lY=0,lZ=0,l_=0,l$=0,l0=0,l1=0,l2=0,l3=0,l4=0,l5=0,l6=0,l7=0,l8=0,l9=0,ma=0,mb=0,mc=0,md=0,me=0,mf=0,mg=0,mh=0,mi=0,mj=0,mk=0.0,ml=0,mm=0,mn=0,mo=0,mp=0.0,mq=0,mr=0,ms=0,mt=0,mu=0,mv=0,mw=0,mx=0,my=0,mz=0,mA=0.0,mB=0,mC=0.0,mD=0,mE=0,mF=0.0,mG=0,mH=0,mI=0.0,mJ=0.0,mK=0,mL=0,mM=0.0,mN=0,mO=0,mP=0,mQ=0,mR=0,mS=0,mT=0,mU=0,mV=0,mW=0,mX=0,mY=0,mZ=0,m_=0,m$=0,m0=0,m1=0,m2=0.0,m3=0.0,m4=0.0,m5=0.0,m6=0,m7=0,m8=0,m9=0,na=0,nb=0.0,nc=0.0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0,nk=0,nl=0,nm=0,nn=0,no=0,np=0,nq=0.0,nr=0.0,ns=0,nt=0,nu=0,nv=0.0,nw=0,nx=0,ny=0,nz=0.0,nA=0.0,nB=0.0,nC=0.0,nD=0.0,nE=0,nF=0,nG=0,nH=0,nI=0,nJ=0,nK=0,nL=0,nM=0,nN=0,nO=0,nP=0,nQ=0,nR=0,nS=0,nT=0,nU=0,nV=0,nW=0,nX=0,nY=0,nZ=0,n_=0,n$=0,n0=0,n1=0,n2=0,n3=0,n4=0,n5=0,n6=0,n7=0,n8=0,n9=0,oa=0,ob=0,oc=0,od=0,oe=0,of=0,og=0,oh=0,oi=0,oj=0,ok=0,ol=0,om=0,on=0,oo=0,op=0,oq=0,or=0,os=0,ot=0,ou=0,ov=0,ow=0,ox=0,oy=0,oz=0,oA=0,oB=0,oC=0,oD=0,oE=0,oF=0,oG=0,oH=0,oI=0,oJ=0,oK=0,oL=0,oM=0,oN=0,oO=0,oP=0,oQ=0,oR=0,oS=0,oT=0,oU=0,oV=0,oW=0,oX=0,oY=0,oZ=0,o_=0,o$=0,o0=0,o1=0,o2=0,o3=0,o4=0,o5=0,o6=0,o7=0,o8=0,o9=0,pa=0,pb=0,pc=0,pd=0,pe=0,pf=0,pg=0,ph=0,pi=0,pj=0,pk=0,pl=0,pm=0,pn=0,po=0,pp=0,pq=0,pr=0,ps=0,pt=0,pu=0,pv=0,pw=0,px=0,py=0,pz=0,pA=0,pB=0,pC=0,pD=0,pE=0,pF=0,pG=0,pH=0,pI=0,pJ=0,pK=0,pL=0,pM=0,pN=0,pO=0,pP=0,pQ=0,pR=0,pS=0,pT=0,pU=0,pV=0,pW=0,pX=0,pY=0,pZ=0,p_=0,p$=0,p0=0,p1=0,p2=0,p3=0,p4=0,p5=0,p6=0,p7=0,p8=0,p9=0,qa=0,qb=0,qc=0,qd=0,qe=0,qf=0,qg=0,qh=0,qi=0,qj=0,qk=0,ql=0,qm=0,qn=0,qo=0,qp=0,qq=0,qr=0,qs=0,qt=0,qu=0,qv=0,qw=0,qx=0,qy=0,qz=0,qA=0,qB=0,qC=0,qD=0,qE=0,qF=0,qG=0.0,qH=0,qI=0,qJ=0,qK=0,qL=0,qM=0,qN=0,qO=0.0,qP=0,qQ=0,qR=0,qS=0.0,qT=0,qU=0,qV=0,qW=0,qX=0,qY=0,qZ=0,q_=0,q$=0,q0=0,q1=0,q2=0,q3=0,q4=0,q5=0,q6=0.0,q7=0.0,q8=0.0,q9=0.0,ra=0.0,rb=0,rc=0,rd=0,re=0,rf=0,rg=0,rh=0,ri=0,rj=0,rk=0.0,rl=0,rm=0,rn=0,ro=0,rp=0.0,rq=0,rr=0.0,rs=0,rt=0,ru=0,rv=0,rw=0,rx=0,ry=0,rz=0,rA=0,rB=0,rC=0,rD=0,rE=0,rF=0,rG=0,rH=0,rI=0,rJ=0,rK=0,rL=0,rM=0,rN=0,rO=0,rP=0,rQ=0,rR=0.0,rS=0,rT=0,rU=0,rV=0,rW=0,rX=0,rY=0,rZ=0,r_=0,r$=0,r0=0,r1=0,r2=0,r3=0,r4=0.0,r5=0,r6=0,r7=0,r8=0,r9=0,sa=0,sb=0,sc=0,sd=0,se=0,sf=0,sg=0,sh=0,si=0,sj=0,sk=0,sl=0,sm=0,sn=0,so=0,sp=0,sq=0,sr=0,ss=0,st=0,su=0,sv=0,sw=0,sx=0,sy=0.0,sz=0.0,sA=0,sB=0,sC=0,sD=0,sE=0,sF=0,sG=0,sH=0,sI=0,sJ=0,sK=0,sL=0,sM=0,sN=0,sO=0,sP=0,sQ=0,sR=0,sS=0,sT=0,sU=0,sV=0,sW=0,sX=0,sY=0,sZ=0,s_=0,s$=0,s0=0,s1=0,s2=0,s3=0,s4=0,s5=0,s6=0,s7=0,s8=0,s9=0,ta=0,tb=0,tc=0,td=0,te=0,tf=0,tg=0,th=0,ti=0,tj=0,tk=0,tl=0,tm=0,tn=0,to=0,tp=0,tq=0,tr=0,ts=0,tt=0,tu=0,tv=0,tw=0,tx=0,ty=0,tz=0,tA=0,tB=0,tC=0,tD=0,tE=0,tF=0,tG=0.0,tH=0,tI=0,tJ=0,tK=0,tL=0,tM=0,tN=0,tO=0,tP=0,tQ=0,tR=0,tS=0,tT=0,tU=0,tV=0,tW=0,tX=0,tY=0,tZ=0,t_=0,t$=0,t0=0,t1=0,t2=0,t3=0,t4=0,t6=0,t7=0,t8=0,t9=0,ub=0,uc=0,ue=0,ug=0,ui=0,ul=0,um=0,un=0,uo=0,up=0,uv=0,uw=0,ux=0,uy=0,uC=0,uG=0,uH=0,uI=0,uJ=0,uK=0,uL=0,uM=0,uN=0,uO=0,uP=0,uQ=0,uR=0,uS=0,uT=0,uU=0,uV=0,uW=0,uX=0,uY=0,uZ=0,u_=0,u$=0,u0=0,u1=0,u2=0,u3=0,u4=0,u5=0,u6=0,u7=0.0,u8=0,u9=0,va=0,vb=0,vc=0,vd=0,ve=0.0,vf=0,vg=0,vh=0,vi=0,vj=0,vk=0,vl=0,vm=0,vn=0,vo=0,vp=0,vq=0,vr=0,vs=0,vt=0.0,vu=0,vv=0,vw=0.0,vx=0,vy=0,vz=0.0,vA=0,vB=0,vC=0.0,vD=0.0,vE=0,vF=0.0,vG=0.0,vH=0,vI=0,vJ=0,vK=0,vL=0,vM=0,vN=0,vO=0,vP=0,vQ=0,vR=0,vS=0,vT=0,vU=0.0,vV=0,vW=0.0,vX=0,vY=0,vZ=0,v_=0,v$=0,v0=0,v1=0,v2=0,v3=0,v4=0,v5=0,v6=0,v7=0,v8=0,v9=0,wa=0,wb=0.0,wc=0,wd=0,we=0,wf=0,wg=0,wh=0,wi=0,wj=0,wk=0,wl=0,wm=0,wn=0,wo=0,wp=0,wq=0,wr=0,ws=0,wt=0,wu=0,wv=0.0,ww=0.0,wx=0.0,wy=0.0,wz=0,wA=0,wB=0,wC=0,wD=0.0,wE=0,wF=0,wG=0,wH=0,wI=0,wJ=0.0,wK=0,wL=0,wM=0.0,wN=0,wO=0,wP=0,wQ=0,wR=0,wS=0,wT=0,wU=0,wV=0,wW=0,wX=0,wY=0,wZ=0,w_=0,w$=0,w0=0.0,w1=0,w2=0,w3=0,w4=0,w5=0,w6=0.0,w7=0.0,w8=0.0,w9=0.0,xa=0.0,xb=0.0,xc=0,xd=0,xe=0,xf=0,xg=0,xh=0,xi=0,xj=0,xk=0,xl=0,xm=0,xn=0,xo=0,xp=0.0,xq=0.0,xr=0.0,xs=0.0,xt=0.0,xu=0.0,xv=0,xw=0,xx=0,xy=0,xz=0,xA=0,xB=0,xC=0,xD=0,xE=0,xF=0,xG=0,xH=0,xI=0,xJ=0,xK=0,xL=0,xM=0,xN=0.0,xO=0,xP=0,xQ=0,xR=0,xS=0,xT=0,xU=0,xV=0,xW=0,xX=0,xY=0,xZ=0,x_=0.0,x$=0,x0=0,x1=0.0,x2=0.0,x3=0.0,x4=0.0,x5=0,x6=0,x7=0,x8=0,x9=0,ya=0,yb=0,yc=0,yd=0,ye=0,yf=0,yg=0,yh=0,yi=0,yj=0,yk=0,yl=0,ym=0,yn=0,yo=0,yp=0,yq=0,yr=0,ys=0,yt=0,yu=0,yv=0,yw=0,yx=0,yy=0.0,yz=0,yA=0,yB=0,yC=0,yD=0,yE=0,yF=0,yG=0,yH=0,yI=0,yJ=0,yK=0,yL=0,yM=0,yN=0,yO=0,yP=0,yQ=0,yR=0,yS=0,yT=0.0,yU=0,yV=0,yW=0,yX=0.0,yY=0,yZ=0,y_=0,y$=0,y0=0,y1=0,y2=0,y3=0,y4=0,y5=0,y6=0,y7=0,y8=0,y9=0,za=0,zb=0,zc=0.0,zd=0,ze=0,zf=0,zg=0,zh=0,zi=0,zj=0,zk=0.0,zl=0.0,zm=0,zn=0,zo=0,zp=0,zq=0,zr=0,zs=0,zt=0,zu=0,zv=0,zw=0,zx=0,zy=0,zz=0,zA=0,zB=0,zC=0.0,zD=0,zE=0,zF=0,zG=0,zH=0,zI=0,zJ=0,zK=0,zL=0,zM=0,zN=0,zO=0,zP=0,zQ=0,zR=0,zS=0,zT=0,zU=0.0,zV=0,zW=0,zX=0,zY=0,zZ=0,z_=0,z$=0,z0=0,z1=0,z2=0,z3=0,z4=0,z5=0,z6=0,z7=0,z8=0,z9=0,Aa=0,Ab=0,Ac=0,Ad=0,Ae=0,Af=0,Ag=0,Ah=0,Ai=0,Aj=0,Ak=0,Al=0,Am=0,An=0,Ao=0,Ap=0,Aq=0,Ar=0,As=0,At=0,Au=0,Av=0,Aw=0,Ax=0,Ay=0,Az=0,AA=0,AB=0,AC=0,AD=0.0,AE=0,AF=0,AG=0,AH=0,AI=0,AJ=0,AK=0,AL=0.0,AM=0,AN=0,AO=0,AP=0,AQ=0,AR=0,AS=0,AT=0,AU=0,AV=0,AW=0,AX=0,AY=0,AZ=0,A_=0,A$=0,A0=0,A1=0,A2=0,A3=0,A4=0,A5=0,A6=0,A7=0,A8=0,A9=0,Ba=0,Bb=0,Bc=0,Bd=0,Be=0,Bf=0,Bg=0.0,Bh=0,Bi=0,Bj=0,Bk=0,Bl=0,Bm=0.0,Bn=0,Bo=0,Bp=0,Bq=0,Br=0,Bs=0,Bt=0,Bu=0,Bv=0,Bw=0,Bx=0,By=0,Bz=0,BA=0,BB=0,BC=0.0,BD=0,BE=0,BF=0,BG=0,BH=0,BI=0,BJ=0,BK=0,BL=0,BM=0,BN=0,BO=0,BP=0,BQ=0,BR=0,BS=0.0,BT=0,BU=0,BV=0,BW=0,BX=0,BY=0,BZ=0,B_=0,B$=0,B0=0,B1=0,B2=0,B3=0,B4=0,B5=0,B6=0,B7=0,B8=0,B9=0,Ca=0,Cb=0,Cc=0,Cd=0,Ce=0,Cf=0,Cg=0,Ch=0,Ci=0,Cj=0,Ck=0,Cl=0,Cm=0,Cn=0,Co=0,Cp=0,Cq=0,Cr=0,Cs=0,Ct=0,Cu=0,Cv=0,Cw=0,Cx=0,Cy=0,Cz=0,CA=0,CB=0,CC=0,CD=0,CE=0,CF=0,CG=0,CH=0,CI=0,CJ=0,CK=0,CL=0,CM=0,CN=0,CO=0,CP=0,CQ=0,CR=0,CS=0,CT=0,CU=0,CV=0,CW=0,CX=0,CY=0,CZ=0,C_=0,C$=0,C0=0,C1=0,C2=0,C3=0.0,C4=0.0,C5=0.0,C6=0,C7=0,C8=0,C9=0,Da=0,Db=0.0,Dc=0,Dd=0,De=0,Df=0,Dg=0,Dh=0,Di=0,Dj=0,Dk=0,Dl=0,Dm=0,Dn=0,Do=0,Dp=0,Dq=0,Dr=0,Ds=0,Dt=0,Du=0,Dv=0,Dw=0,Dx=0,Dy=0,Dz=0,DA=0,DB=0,DC=0,DD=0,DE=0,DF=0,DG=0,DH=0,DI=0,DJ=0,DK=0,DL=0,DM=0,DN=0,DO=0,DP=0,DQ=0,DR=0,DS=0,DT=0,DU=0,DV=0,DW=0,DX=0,DY=0,DZ=0,D_=0,D$=0.0,D0=0.0,D1=0.0,D2=0,D3=0.0,D4=0,D5=0,D6=0,D7=0,D8=0,D9=0,Ea=0,Eb=0,Ec=0,Ed=0,Ee=0,Ef=0,Eg=0,Eh=0,Ei=0,Ej=0,Ek=0,El=0,Em=0,En=0,Eo=0,Ep=0,Eq=0,Er=0,Es=0,Et=0,Eu=0,Ev=0,Ew=0,Ex=0,Ey=0,Ez=0,EA=0,EB=0,EC=0,ED=0,EE=0,EF=0,EG=0,EH=0,EI=0,EJ=0,EK=0,EL=0,EM=0,EN=0,EO=0,EP=0,EQ=0,ER=0,ES=0,ET=0,EU=0,EV=0.0,EW=0.0,EX=0,EY=0,EZ=0,E_=0,E$=0,E0=0,E1=0,E2=0,E3=0,E4=0,E5=0,E6=0,E7=0,E8=0.0,E9=0.0,Fa=0.0,Fb=0.0,Fc=0.0,Fd=0.0,Fe=0,Ff=0,Fg=0,Fh=0.0,Fi=0,Fj=0.0,Fk=0,Fl=0,Fm=0,Fn=0.0,Fo=0.0,Fp=0,Fq=0,Fr=0,Fs=0,Ft=0,Fu=0,Fv=0,Fw=0,Fx=0,Fy=0,Fz=0;d=i;i=i+3552|0;e=d|0;f=d+24|0;j=d+48|0;k=d+72|0;l=d+96|0;n=d+120|0;o=d+144|0;p=d+168|0;q=d+192|0;r=d+216|0;s=d+240|0;t=d+264|0;u=d+288|0;x=d+312|0;y=d+336|0;z=d+360|0;A=d+384|0;B=d+408|0;C=d+432|0;D=d+456|0;E=d+480|0;F=d+504|0;G=d+544|0;H=d+560|0;I=d+584|0;J=d+608|0;K=d+632|0;L=d+656|0;M=d+680|0;N=d+704|0;O=d+728|0;R=d+752|0;S=d+776|0;T=d+968|0;U=d+992|0;V=d+1016|0;W=d+1040|0;X=d+1064|0;Y=d+1088|0;Z=d+1112|0;$=d+1136|0;ab=d+1160|0;ac=d+1184|0;ad=d+1208|0;ae=d+1216|0;af=d+1240|0;ag=d+1264|0;ah=d+1288|0;ai=d+1312|0;aj=d+1368|0;ak=d+1392|0;al=d+1424|0;am=d+1448|0;an=d+1472|0;ao=d+1496|0;ap=d+1520|0;aq=d+1544|0;ar=d+1552|0;as=d+1560|0;at=d+1568|0;au=d+1592|0;av=d+1616|0;aw=d+1640|0;ax=d+1664|0;ay=d+1688|0;aA=d+1712|0;aB=d+1736|0;aC=d+1760|0;aD=d+1784|0;aE=d+1808|0;aF=d+1832|0;aH=d+1840|0;aJ=d+1864|0;aK=d+1888|0;aL=d+1912|0;aM=d+1936|0;aN=d+1960|0;aO=d+1984|0;aP=d+2008|0;aR=d+2032|0;aS=d+2056|0;aT=d+2080|0;aU=d+2104|0;aV=d+2128|0;aW=d+2152|0;aX=d+2176|0;aZ=d+2184|0;a$=d+2192|0;a0=d+2216|0;a1=d+2240|0;a2=d+2280|0;a3=d+2304|0;a4=d+2328|0;a5=d+2352|0;a6=d+2368|0;a7=d+2392|0;a8=d+2416|0;a9=d+2424|0;ba=d+2448|0;bb=d+2472|0;bc=d+2496|0;bd=d+2528|0;bf=d+2552|0;bg=d+2576|0;bh=d+2600|0;bj=d+2624|0;bk=d+2648|0;bl=d+2672|0;bm=d+2696|0;bn=d+2720|0;bo=d+2744|0;bp=d+2768|0;bq=d+2792|0;br=d+2808|0;bs=d+2832|0;bt=d+2856|0;bu=d+2880|0;bv=d+2904|0;bw=d+2912|0;bx=d+2936|0;by=d+2944|0;bz=d+2952|0;bB=d+2960|0;bC=d+2968|0;bD=d+2976|0;bE=d+3e3|0;bG=d+3024|0;bH=d+3048|0;bI=d+3072|0;bJ=d+3096|0;bK=d+3120|0;bL=d+3144|0;bM=d+3168|0;bN=d+3192|0;bO=d+3216|0;bQ=d+3240|0;bR=d+3264|0;bS=d+3288|0;bT=d+3312|0;bV=d+3336|0;bW=d+3360|0;bX=d+3384|0;bY=d+3408|0;bZ=d+3432|0;b_=d+3456|0;b0=d+3480|0;b1=d+3504|0;b2=d+3528|0;b3=(c[13898]|0)+1|0;c[13898]=b3;b4=c[1054]|0;b5=c[b4+(b3*40&-1)+32>>2]|0;b6=c[10036]|0;do{if((a[b6+b5|0]|0)==110){if((a[b6+(b5+1|0)|0]|0)!=111){b7=6;break}if((a[37400]&1)==0){b8=b3;b9=b4;cb=b5}else{uh(b3,153488,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cc=c[13898]|0;cd=c[1054]|0;b8=cc;b9=cd;cb=c[cd+(cc*40&-1)+32>>2]|0}c[b9+(b8*40&-1)+32>>2]=cb+2;cc=(c[1054]|0)+((c[13898]|0)*40&-1)+36|0;c[cc>>2]=(c[cc>>2]|0)-2;c[13898]=(c[13898]|0)-1;t5()}else{b7=6}}while(0);L7:do{if((b7|0)==6){cb=iw()|0;c[6074]=cb;do{if((cb|0)!=0){if((a[cb+38|0]&1)==0){break}b8=c[13898]|0;b9=c[8272]|0;L12:do{if((b8|0)<(b9|0)){b3=c[1054]|0;b5=b8;while(1){L16:do{if((a[b3+(b5*40&-1)|0]&1)!=0){b4=c[b3+(b5*40&-1)+36>>2]|0;b6=b3+(b5*40&-1)+32|0;cc=c[10036]|0;cd=0;while(1){if((cd|0)>=(b4|0)){break}if((a[cc+((c[b6>>2]|0)+cd|0)|0]|0)==(a[cd+103664|0]|0)){cd=cd+1|0}else{break L16}}if((cd|0)==1){ce=cb;break L12}}}while(0);b6=b5+1|0;c[13898]=b6;if((b6|0)<(b9|0)){b5=b6}else{ce=cb;break}}}else{ce=cb}}while(0);while(1){b9=c[ce>>2]|0;uu(c[ce+12>>2]|0);uu(ce);if((b9|0)==0){break}else{ce=b9}}i=d;return}}while(0);cb=c[13898]|0;b9=b2|0;b8=b2+8|0;b5=b0|0;b3=b1|0;b6=b_|0;cc=b_+8|0;b4=bZ|0;cg=bZ+8|0;ch=bY|0;ci=bY+8|0;cj=bX|0;ck=bX+8|0;cl=bW|0;cm=bW+8|0;cn=bT|0;co=bT+8|0;cp=bS|0;cq=bS+8|0;cr=bR|0;cs=bR+8|0;ct=bQ|0;cu=bQ+8|0;cv=bO|0;cw=bO+8|0;cx=bN|0;cy=bN+8|0;cA=bM|0;cC=bM+8|0;cD=bV|0;cE=bV+8|0;cF=bI|0;cG=bI+8|0;cH=bH|0;cI=bH+8|0;cJ=bG|0;cK=bG+8|0;cL=bL|0;cM=bL+8|0;cN=bK|0;cO=bK+8|0;cP=bJ|0;cQ=bJ+8|0;cR=bE|0;cT=bE+8|0;cU=bD|0;cV=bD+8|0;cW=bx|0;cX=bw|0;cY=bw+8|0;cZ=bu|0;c_=bu+8|0;c$=bt|0;c0=bt+8|0;c1=bs|0;c2=bs+8|0;c3=br|0;c4=br+8|0;c5=bq;c6=bp|0;c7=bp+8|0;c8=bo|0;c9=bo+8|0;da=bn|0;dc=bn+8|0;dd=bm|0;de=bm+8|0;df=bl|0;dg=bl+8|0;dh=bk|0;di=bk+8|0;dj=bj|0;dk=bj+8|0;dm=bq|0;dn=bq+8|0;dp=bh|0;dq=bh+8|0;dr=bg|0;ds=bg+8|0;dt=bf|0;du=bf+8|0;dv=bd|0;dw=bd+8|0;dx=bc|0;dy=bb|0;dz=bb+8|0;dA=dz;dB=dz;dz=bb+8|0;dC=a9|0;dD=a9+8|0;dE=ba|0;dF=ba+8|0;dG=a7|0;dH=a7+8|0;dI=a6|0;dJ=a6+8|0;dK=a5|0;dL=a4|0;dM=a4+8|0;dN=a2|0;dO=a2+8|0;dP=a3|0;dQ=a3+8|0;dR=a0+4|0;dS=a0+8|0;dT=aW+4|0;dU=aW+8|0;dV=aT|0;dW=aT+8|0;dX=aS|0;dY=aS+8|0;dZ=aP|0;d_=aP+8|0;d$=aO|0;d0=aO+8|0;d1=aR|0;d2=aR+8|0;d3=aV|0;d4=aV+8|0;d5=a$|0;d6=a$+8|0;d7=aM|0;d8=aM+8|0;d9=aL|0;eb=aL+8|0;ec=aK|0;ed=aK+8|0;ee=aN|0;ef=aN+8|0;eg=aH|0;eh=aH+8|0;ei=aJ|0;ej=aJ+8|0;ek=aE|0;el=aE+8|0;em=aC|0;en=aC+8|0;eo=aB|0;ep=aB+8|0;eq=aD|0;er=aD+8|0;es=aA|0;et=aA+8|0;eu=ay|0;ev=ay+8|0;ew=ax|0;ex=ax+8|0;eA=aw|0;eB=aw+8|0;eD=av|0;eE=av+8|0;eF=at|0;eG=at+8|0;eH=au|0;eI=au+8|0;eJ=ap|0;eK=ap+8|0;eL=ao|0;eM=ao+8|0;eN=an|0;eO=an+8|0;eQ=am|0;eR=am+8|0;eS=al|0;eT=al+8|0;eU=aj|0;eV=aj+8|0;eW=ak|0;eX=ak+8|0;eY=ak+16|0;eZ=ak+24|0;e_=ai|0;e$=ah|0;e0=ah+8|0;e2=ag|0;e3=ag+8|0;e4=af|0;e5=af+8|0;e6=ae|0;e8=ae+8|0;e9=ac|0;fa=ac+8|0;fb=ab|0;fc=ab+8|0;fd=$|0;fe=$+8|0;ff=Z|0;fg=Z+8|0;fh=Y|0;fi=Y+8|0;fj=V|0;fk=V+8|0;fl=X|0;fm=X+8|0;fn=W|0;fo=W+8|0;fp=U|0;fq=U+8|0;fr=T|0;fs=T+8|0;ft=S;fu=O|0;fv=O+8|0;fw=R|0;fx=R+8|0;fy=S+144|0;fz=S+72|0;fA=L|0;fB=L+8|0;fC=N|0;fD=N+8|0;fE=K|0;fF=K+8|0;fG=M|0;fH=M+8|0;fI=J|0;fJ=J+8|0;fK=I|0;fL=I+8|0;fM=H|0;fN=H+8|0;fO=F;fP=G;fQ=E|0;fS=E+8|0;fT=D|0;fU=D+8|0;fV=C|0;fW=C+8|0;fX=B|0;fY=B+8|0;fZ=z|0;f_=z+8|0;f$=A|0;f0=A+8|0;f1=y|0;f2=y+8|0;f3=x|0;f4=x+8|0;f5=t|0;f6=t+8|0;f7=u|0;f8=u+8|0;f9=s|0;ga=s+8|0;gb=q|0;gc=q+8|0;gd=p|0;ge=p+8|0;gf=o|0;gg=o+8|0;gh=n|0;gi=n+8|0;gj=l|0;gl=l+8|0;gm=k|0;gn=k+8|0;go=f|0;gp=f+8|0;gq=j|0;gs=j+8|0;gt=e|0;gu=e+8|0;gv=c[13898]|0;L27:while(1){gw=c[1054]|0;gx=c[gw+(gv*40&-1)+36>>2]|0;gy=c[gw+(gv*40&-1)+32>>2]|0;gz=(a[gw+(gv*40&-1)|0]&1)==0;gA=(gx|0)>0;gB=c[10036]|0;gC=21960;gD=96232;L29:while(1){L31:do{if(!gz){if(gA){gE=0;gF=0;gG=gy;while(1){gH=a[gD+gE|0]|0;if(gH<<24>>24==(a[gB+(gE+gG|0)|0]|0)){gI=gG;gJ=gF}else{if(gH<<24>>24!=36){break L31}gI=gG-1|0;gJ=1}gK=gE+1|0;if((gK|0)<(gJ+gx|0)){gE=gK;gF=gJ;gG=gI}else{break}}if((gJ|0)==0){gL=gK}else{gM=gC;break L29}}else{gL=0}gG=a[gD+gL|0]|0;if((gG<<24>>24|0)==36|(gG<<24>>24|0)==0){gM=gC;break L29}}}while(0);gG=gC+8|0;gF=c[gG>>2]|0;if((gF|0)==0){gM=gG;break}else{gC=gG;gD=gF}}gD=c[gM+4>>2]|0;L44:do{if((gD|0)==3){gN=gv+1|0;c[13898]=gN;L46:do{if((gN|0)<(c[8272]|0)){if((a[gw+(gN*40&-1)|0]&1)==0){b7=5107;break L27}gC=c[gw+(gN*40&-1)+36>>2]|0;gx=gw+(gN*40&-1)+32|0;gy=0;while(1){if((gy|0)>=(gC|0)){b7=34;break}gA=c[gx>>2]|0;if((a[gB+(gA+gy|0)|0]|0)==(a[gy+103664|0]|0)){gy=gy+1|0}else{gO=gA;break}}if((b7|0)==34){b7=0;if((gy|0)==1){b7=36;break}gO=c[gx>>2]|0}if((gC|0)>0){gP=0;gQ=0;gR=gO}else{b7=5108;break L27}while(1){if((a[gP+123160|0]|0)==(a[gB+(gP+gR|0)|0]|0)){gS=gR;gT=gQ}else{if((gP|0)!=1){gU=0;gV=0;gW=gO;break}gS=gR-1|0;gT=1}gA=gP+1|0;if((gA|0)<(gT+gC|0)){gP=gA;gQ=gT;gR=gS}else{b7=42;break}}do{if((b7|0)==42){b7=0;if((gT|0)==0){if(!((gP|0)==7|(gP|0)==0)){gU=0;gV=0;gW=gO;break}}c[13898]=gv+2;h[9040]=1.0;gX=1.0;break L46}}while(0);while(1){if((a[gU+123032|0]|0)==(a[gB+(gU+gW|0)|0]|0)){gY=gW;gZ=gV}else{if((gU|0)!=1){b7=5109;break L27}gY=gW-1|0;gZ=1}gx=gU+1|0;if((gx|0)<(gZ+gC|0)){gU=gx;gV=gZ;gW=gY}else{break}}if((gZ|0)==0){if(!((gU|0)==7|(gU|0)==0)){b7=5110;break L27}}c[13898]=gv+2;h[9040]=.017453292519943295;gX=.017453292519943295}else{b7=36}}while(0);if((b7|0)==36){b7=0;h[9040]=1.0;gX=1.0}if((a[30528]&1)==0|(c[17539]|0)==0){break}h[8773]=0.0;h[8774]=6.283185307179586/gX}else if((gD|0)==4){gC=gv+1|0;c[13898]=gC;gx=c[gw+(gC*40&-1)+36>>2]|0;gy=c[gw+(gC*40&-1)+32>>2]|0;gA=(a[gw+(gC*40&-1)|0]&1)==0;gz=(gx|0)>0&(gA^1);L82:do{if(gz){gF=0;gG=0;gE=gy;while(1){if((a[gF+124752|0]|0)==(a[gB+(gF+gE|0)|0]|0)){g_=gE;g$=gG}else{if((gF|0)!=4){b7=62;break L82}g_=gE-1|0;g$=1}gH=gF+1|0;if((gH|0)<(g$+gx|0)){gF=gH;gG=g$;gE=g_}else{break}}if((g$|0)!=0){b7=102;break}if((gF|0)==3|(gF|0)==8){b7=102}else{b7=62}}else{b7=62}}while(0);L91:do{if((b7|0)==62){b7=0;gE=(c[8272]|0)>(gC|0);L93:do{if(gE){if(gA){break}else{g0=0}while(1){if((g0|0)>=(gx|0)){b7=66;break}if((a[gB+(g0+gy|0)|0]|0)==(a[g0+150856|0]|0)){g0=g0+1|0}else{g1=0;break}}if((b7|0)==66){b7=0;if((g0|0)==5){b7=102;break L91}else{g1=0}}while(1){if((g1|0)>=(gx|0)){b7=69;break}if((a[gB+(g1+gy|0)|0]|0)==(a[g1+188576|0]|0)){g1=g1+1|0}else{g2=0;break}}if((b7|0)==69){b7=0;if((g1|0)==4){b7=102;break L91}else{g2=0}}while(1){if((g2|0)>=(gx|0)){b7=72;break}if((a[gB+(g2+gy|0)|0]|0)==(a[g2+130496|0]|0)){g2=g2+1|0}else{g3=0;break}}if((b7|0)==72){b7=0;if((g2|0)==4){b7=102;break L91}else{g3=0}}while(1){if((g3|0)>=(gx|0)){b7=75;break}if((a[gB+(g3+gy|0)|0]|0)==(a[g3+187176|0]|0)){g3=g3+1|0}else{g4=0;break}}if((b7|0)==75){b7=0;if((g3|0)==2){b7=102;break L91}else{g4=0}}while(1){if((g4|0)>=(gx|0)){b7=78;break}if((a[gB+(g4+gy|0)|0]|0)==(a[g4+186688|0]|0)){g4=g4+1|0}else{g5=0;break}}if((b7|0)==78){b7=0;if((g4|0)==3){b7=102;break L91}else{g5=0}}while(1){if((g5|0)>=(gx|0)){b7=81;break}if((a[gB+(g5+gy|0)|0]|0)==(a[g5+128e3|0]|0)){g5=g5+1|0}else{g6=0;break}}if((b7|0)==81){b7=0;if((g5|0)==6){b7=102;break L91}else{g6=0}}while(1){if((g6|0)>=(gx|0)){b7=84;break}if((a[gB+(g6+gy|0)|0]|0)==(a[g6+127904|0]|0)){g6=g6+1|0}else{g7=0;break}}if((b7|0)==84){b7=0;if((g6|0)==5){b7=102;break L91}else{g7=0}}while(1){if((g7|0)>=(gx|0)){b7=87;break}if((a[gB+(g7+gy|0)|0]|0)==(a[g7+124464|0]|0)){g7=g7+1|0}else{g8=0;break}}if((b7|0)==87){b7=0;if((g7|0)==2){b7=102;break L91}else{g8=0}}while(1){if((g8|0)>=(gx|0)){break}if((a[gB+(g8+gy|0)|0]|0)==(a[g8+176728|0]|0)){g8=g8+1|0}else{b7=91;break L93}}if((g8|0)==10){b7=102;break L91}else{b7=91}}else{b7=91}}while(0);L139:do{if((b7|0)==91){b7=0;L141:do{if(gz){gF=0;cd=0;gG=gy;while(1){if((a[gF+124344|0]|0)==(a[gB+(gF+gG|0)|0]|0)){g9=gG;ha=cd}else{if((gF|0)!=4){break L141}g9=gG-1|0;ha=1}gH=gF+1|0;if((gH|0)<(ha+gx|0)){gF=gH;cd=ha;gG=g9}else{break}}if((ha|0)!=0){b7=102;break L91}if((gF|0)==3|(gF|0)==5){b7=102;break L91}}}while(0);if(gA|gE^1){break}else{hb=0}while(1){if((hb|0)>=(gx|0)){break}if((a[gB+(hb+gy|0)|0]|0)==(a[hb+150816|0]|0)){hb=hb+1|0}else{break L139}}if((hb|0)==6){b7=102;break L91}}}while(0);gE=is(b2)|0;gG=c[gE>>2]|0;if((gG|0)==1){hc=+(c[gE+8>>2]|0)}else if((gG|0)==2){hc=+h[gE+8>>3]}else if((gG|0)==3){hc=+uz(c[gE+8>>2]|0,0)}else{b7=109;break L27}if((c[b9>>2]|0)==3){uu(c[b8>>2]|0);c[b9>>2]=1}hd=~~hc;b7=113}}while(0);L164:do{if((b7|0)==102){b7=0;gy=c[10826]|0;if((gy|0)==0){he=1;hf=0;hg=0;b7=119;break}else{hh=1;hi=gy}while(1){if((c[hi+4>>2]|0)!=(hh|0)){hd=hh;b7=113;break L164}gy=hh+1|0;gx=c[hi>>2]|0;if((gx|0)==0){hd=gy;b7=113;break}else{hh=gy;hi=gx}}}}while(0);L169:do{if((b7|0)==113){b7=0;if((hd|0)<1){b7=114;break L27}gx=c[10826]|0;if((gx|0)==0){he=hd;hf=0;hg=0;b7=119;break}else{hj=0;hk=gx}while(1){hl=c[hk+4>>2]|0;if((hd|0)<=(hl|0)){break}gx=c[hk>>2]|0;if((gx|0)==0){he=hd;hf=hk;hg=0;b7=119;break L169}else{hj=hk;hk=gx}}if((hd|0)==(hl|0)){hm=hk}else{he=hd;hf=hj;hg=hk;b7=119}}}while(0);if((b7|0)==119){b7=0;gx=ut(208)|0;if((gx|0)==0){gk();gy=ut(208)|0;if((gy|0)==0){b7=121;break L27}else{hn=gy}}else{hn=gx}gx=hn;if((hf|0)==0){c[10826]=gx}else{c[hf>>2]=gx}c[hn+4>>2]=he;c[hn>>2]=hg;uE(hn+8|0,0,80);c[hn+96>>2]=-1;c[hn+100>>2]=0;gy=hn+104|0;c[gy>>2]=c[12872];c[gy+4>>2]=c[12873];c[gy+8>>2]=c[12874];c[gy+12>>2]=c[12875];c[gy+16>>2]=c[12876];c[gy+20>>2]=c[12877];c[gy+24>>2]=c[12878];c[gy+28>>2]=c[12879];c[gy+32>>2]=c[12880];c[gy+36>>2]=c[12881];c[gy+40>>2]=c[12882];c[gy+44>>2]=c[12883];c[gy+48>>2]=c[12884];c[gy+52>>2]=c[12885];c[hn+160>>2]=1;h[hn+168>>3]=0.0;c[hn+176>>2]=0;h[hn+184>>3]=15.0;h[hn+192>>3]=90.0;c[hn+200>>2]=0;hm=gx}gx=c[13898]|0;gy=c[8272]|0;if((gx|0)>=(gy|0)){break}gA=hm+96|0;gz=hm+88|0;gC=hm+48|0;gE=hm+8|0;gG=0;cd=0;gH=gx;gx=gy;while(1){gy=cd;ho=gH;hp=gx;L189:while(1){hq=ho;hr=hp;L191:while(1){hs=c[1054]|0;L193:do{if((a[hs+(hq*40&-1)|0]&1)!=0){ht=c[hs+(hq*40&-1)+36>>2]|0;hu=hs+(hq*40&-1)+32|0;hv=c[10036]|0;hw=0;while(1){if((hw|0)>=(ht|0)){b7=134;break}if((a[hv+((c[hu>>2]|0)+hw|0)|0]|0)==(a[hw+103664|0]|0)){hw=hw+1|0}else{break}}if((b7|0)==134){b7=0;if((hw|0)==1){break L44}}if((hr|0)>(hq|0)){hx=0}else{break}while(1){if((hx|0)>=(ht|0)){b7=138;break}if((a[hv+((c[hu>>2]|0)+hx|0)|0]|0)==(a[hx+188576|0]|0)){hx=hx+1|0}else{hy=0;break}}if((b7|0)==138){b7=0;if((hx|0)==4){break L189}else{hy=0}}while(1){if((hy|0)>=(ht|0)){b7=150;break}if((a[hv+((c[hu>>2]|0)+hy|0)|0]|0)==(a[hy+187176|0]|0)){hy=hy+1|0}else{hA=0;break}}if((b7|0)==150){b7=0;if((hy|0)==2){break L191}else{hA=0}}while(1){if((hA|0)>=(ht|0)){break}if((a[hv+((c[hu>>2]|0)+hA|0)|0]|0)==(a[hA+186688|0]|0)){hA=hA+1|0}else{break L193}}if((hA|0)==3){break L191}}}while(0);hL(gA,1);gF=c[13898]|0;hw=c[8272]|0;hB=(gF|0)<(hw|0);if((hq|0)==(gF|0)&hB){hC=c[1054]|0;if((a[hC+(hq*40&-1)|0]&1)==0){b7=5115;break L27}hF=c[hC+(hq*40&-1)+36>>2]|0;hG=hC+(hq*40&-1)+32|0;hC=c[10036]|0;hK=0;while(1){if((hK|0)>=(hF|0)){break}if((a[hC+((c[hG>>2]|0)+hK|0)|0]|0)==(a[hK+103664|0]|0)){hK=hK+1|0}else{b7=5116;break L27}}if((hK|0)!=1){b7=5117;break L27}}if(hB){hq=gF;hr=hw}else{break L44}}if(gy){b7=5119;break L27}else{hN=0}while(1){if((hN|0)>=(ht|0)){b7=157;break}if((a[hv+((c[hu>>2]|0)+hN|0)|0]|0)==(a[hN+186688|0]|0)){hN=hN+1|0}else{hP=0;break}}if((b7|0)==157){b7=0;hP=(hN|0)==3&1}a[gz]=hP;hQ=(c[13898]|0)+1|0;c[13898]=hQ;if((hQ|0)>=(c[8272]|0)){b7=5113;break L27}hG=c[1054]|0;L232:do{if((a[hG+(hQ*40&-1)|0]&1)!=0){hC=c[hG+(hQ*40&-1)+36>>2]|0;hF=hG+(hQ*40&-1)+32|0;hR=c[10036]|0;hS=0;while(1){if((hS|0)>=(hC|0)){break}if((a[hR+((c[hF>>2]|0)+hS|0)|0]|0)==(a[hS+103664|0]|0)){hS=hS+1|0}else{break L232}}if((hS|0)==1){b7=5114;break L27}}}while(0);dl(gC,0);hG=c[13898]|0;hF=c[8272]|0;if((hG|0)<(hF|0)){gy=1;ho=hG;hp=hF}else{break L44}}if(gG){b7=5118;break L27}hT=hq+1|0;c[13898]=hT;if((hT|0)>=(hr|0)){b7=5111;break L27}L242:do{if((a[hs+(hT*40&-1)|0]&1)!=0){hp=c[hs+(hT*40&-1)+36>>2]|0;ho=hs+(hT*40&-1)+32|0;hF=0;while(1){if((hF|0)>=(hp|0)){break}if((a[hv+((c[ho>>2]|0)+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{break L242}}if((hF|0)==1){b7=5112;break L27}}}while(0);dl(gE,0);ho=c[13898]|0;hp=c[8272]|0;if((ho|0)<(hp|0)){gG=1;cd=gy;gH=ho;gx=hp}else{break}}}else if((gD|0)==5){gx=gv+1|0;c[13898]=gx;L250:do{if((gx|0)<(c[8272]|0)){gH=(a[gw+(gx*40&-1)|0]&1)==0;L252:do{if(!gH){cd=c[gw+(gx*40&-1)+36>>2]|0;gG=gw+(gx*40&-1)+32|0;gE=0;while(1){if((gE|0)>=(cd|0)){b7=180;break}if((a[gB+((c[gG>>2]|0)+gE|0)|0]|0)==(a[gE+103664|0]|0)){gE=gE+1|0}else{hU=0;break}}if((b7|0)==180){b7=0;if((gE|0)==1){break L250}else{hU=0}}while(1){if((hU|0)>=(cd|0)){b7=184;break}if((a[gB+((c[gG>>2]|0)+hU|0)|0]|0)==(a[hU+150688|0]|0)){hU=hU+1|0}else{b7=185;break}}if((b7|0)==184){b7=0;if((hU|0)!=2){b7=185}}do{if((b7|0)==185){b7=0;if(gH){break L252}gG=c[gw+(gx*40&-1)+36>>2]|0;cd=gw+(gx*40&-1)+32|0;gE=0;while(1){if((gE|0)>=(gG|0)){b7=189;break}if((a[gB+((c[cd>>2]|0)+gE|0)|0]|0)==(a[gE+148800|0]|0)){gE=gE+1|0}else{break}}if((b7|0)==189){b7=0;if((gE|0)==2){break}}if(gH){break L252}cd=c[gw+(gx*40&-1)+36>>2]|0;gG=gw+(gx*40&-1)+32|0;hS=0;while(1){if((hS|0)>=(cd|0)){b7=195;break}if((a[gB+((c[gG>>2]|0)+hS|0)|0]|0)==(a[hS+125808|0]|0)){hS=hS+1|0}else{break}}do{if((b7|0)==195){b7=0;if((hS|0)!=3){break}c[16163]=c[16163]|12;c[16335]=c[16335]|12;c[16507]=c[16507]|12;c[16679]=c[16679]|12;c[16851]=c[16851]|12;c[17023]=c[17023]|12;c[17195]=c[17195]|12;c[17367]=c[17367]|12;c[17539]=c[17539]|12;c[17711]=c[17711]|12;c[17883]=c[17883]|12;c[13898]=gv+2;break L44}}while(0);hS=c[gw+(gx*40&-1)+36>>2]|0;gG=c[gw+(gx*40&-1)+32>>2]|0;if(gH){break L252}if((hS|0)>0){cd=0;gE=0;hF=gG;while(1){if((a[cd+125680|0]|0)==(a[gB+(cd+hF|0)|0]|0)){hV=hF;hW=gE}else{if((cd|0)!=2){break}hV=hF-1|0;hW=1}gC=cd+1|0;if((gC|0)<(hW+hS|0)){cd=gC;gE=hW;hF=hV}else{b7=203;break}}do{if((b7|0)==203){b7=0;if((hW|0)==0){if(!((cd|0)==1|(cd|0)==7)){break}}c[16163]=c[16163]|3;c[16335]=c[16335]|3;c[16507]=c[16507]|3;c[16679]=c[16679]|3;c[16851]=c[16851]|3;c[17023]=c[17023]|3;c[17195]=c[17195]|3;c[17367]=c[17367]|3;c[17539]=c[17539]|3;c[17711]=c[17711]|3;c[17883]=c[17883]|3;c[13898]=gv+2;break L44}}while(0);if(gH){break L252}else{hY=0}}else{hY=0}while(1){if((hY|0)>=(hS|0)){break}if((a[gB+(gG+hY|0)|0]|0)==(a[hY+57e3|0]|0)){hY=hY+1|0}else{break L252}}if((a[hY+57e3|0]|0)!=0){break L252}c[17367]=3;c[17386]=0;c[17387]=0;c[13898]=gv+2;break L44}}while(0);c[16335]=3;c[16507]=3;c[16355]=0;c[16354]=0;c[16527]=0;c[16526]=0;c[13898]=gv+2;break L44}}while(0);be(b5|0,125560,(v=i,i=i+8|0,c[v>>2]=57e3,v)|0);gH=c[13898]|0;gy=c[1054]|0;gG=c[gy+(gH*40&-1)+36>>2]|0;hS=c[gy+(gH*40&-1)+32>>2]|0;L302:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gG|0)>0){cd=c[10036]|0;hF=0;gE=0;gC=hS;while(1){gz=a[b0+hF|0]|0;if(gz<<24>>24==(a[cd+(hF+gC|0)|0]|0)){hZ=gC;h_=gE}else{if(gz<<24>>24!=36){break L302}hZ=gC-1|0;h_=1}h$=hF+1|0;if((h$|0)<(h_+gG|0)){hF=h$;gE=h_;gC=hZ}else{break}}if((h_|0)==0){h0=h$;b7=219}}else{h0=0;b7=219}if((b7|0)==219){b7=0;gC=a[b0+h0|0]|0;if(!((gC<<24>>24|0)==36|(gC<<24>>24|0)==0)){break}}c[17367]=c[17367]|1;c[17386]=0;c[13898]=gH+1;break L44}}while(0);be(b3|0,125432,(v=i,i=i+8|0,c[v>>2]=57e3,v)|0);gH=c[13898]|0;gG=c[1054]|0;hS=c[gG+(gH*40&-1)+36>>2]|0;gy=c[gG+(gH*40&-1)+32>>2]|0;L317:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((hS|0)>0){gC=c[10036]|0;gE=0;hF=0;cd=gy;while(1){gz=a[b1+gE|0]|0;if(gz<<24>>24==(a[gC+(gE+cd|0)|0]|0)){h1=cd;h2=hF}else{if(gz<<24>>24!=36){break L317}h1=cd-1|0;h2=1}h3=gE+1|0;if((h3|0)<(h2+hS|0)){gE=h3;hF=h2;cd=h1}else{break}}if((h2|0)==0){h4=h3;b7=229}}else{h4=0;b7=229}if((b7|0)==229){b7=0;cd=a[b1+h4|0]|0;if(!((cd<<24>>24|0)==36|(cd<<24>>24|0)==0)){break}}c[17367]=c[17367]|2;c[17387]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125376,(v=i,i=i+8|0,c[v>>2]=57e3,v)|0);gH=c[13898]|0;L332:do{if((c[8272]|0)>(gH|0)){hS=c[1054]|0;if((a[hS+(gH*40&-1)|0]&1)==0){break}gy=c[hS+(gH*40&-1)+36>>2]|0;gG=hS+(gH*40&-1)+32|0;hS=c[10036]|0;cd=0;while(1){if((cd|0)>=(gy|0)){break}if((a[hS+((c[gG>>2]|0)+cd|0)|0]|0)==(a[b0+cd|0]|0)){cd=cd+1|0}else{break L332}}if((a[b0+cd|0]|0)!=0){break}c[17367]=c[17367]|12;c[13898]=gH+1;break L44}}while(0);be(b5|0,125128,(v=i,i=i+8|0,c[v>>2]=57e3,v)|0);gH=c[13898]|0;gG=c[1054]|0;hS=c[gG+(gH*40&-1)+36>>2]|0;gy=c[gG+(gH*40&-1)+32>>2]|0;L341:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((hS|0)>0){hF=c[10036]|0;gE=0;gC=0;gz=gy;while(1){gA=a[b0+gE|0]|0;if(gA<<24>>24==(a[hF+(gE+gz|0)|0]|0)){h5=gz;h6=gC}else{if(gA<<24>>24!=36){break L341}h5=gz-1|0;h6=1}h7=gE+1|0;if((h7|0)<(h6+hS|0)){gE=h7;gC=h6;gz=h5}else{break}}if((h6|0)==0){h8=h7;b7=246}}else{h8=0;b7=246}if((b7|0)==246){b7=0;gz=a[b0+h8|0]|0;if(!((gz<<24>>24|0)==36|(gz<<24>>24|0)==0)){break}}c[17367]=c[17367]|4;c[13898]=gH+1;break L44}}while(0);be(b3|0,124936,(v=i,i=i+8|0,c[v>>2]=57e3,v)|0);gH=c[13898]|0;hS=c[1054]|0;gy=c[hS+(gH*40&-1)+36>>2]|0;gG=c[hS+(gH*40&-1)+32>>2]|0;gz=(a[hS+(gH*40&-1)|0]&1)==0;L356:do{if(!gz){if((gy|0)>0){hS=c[10036]|0;gC=0;gE=0;hF=gG;while(1){cd=a[b1+gC|0]|0;if(cd<<24>>24==(a[hS+(gC+hF|0)|0]|0)){h9=hF;ia=gE}else{if(cd<<24>>24!=36){break L356}h9=hF-1|0;ia=1}ib=gC+1|0;if((ib|0)<(ia+gy|0)){gC=ib;gE=ia;hF=h9}else{break}}if((ia|0)==0){ic=ib;b7=256}}else{ic=0;b7=256}if((b7|0)==256){b7=0;hF=a[b1+ic|0]|0;if(!((hF<<24>>24|0)==36|(hF<<24>>24|0)==0)){break}}c[17367]=c[17367]|8;c[13898]=gH+1;break L44}}while(0);L371:do{if(!((c[8272]|0)<=(gH|0)|gz)){hF=c[10036]|0;gE=0;while(1){if((gE|0)>=(gy|0)){break}if((a[hF+(gG+gE|0)|0]|0)==(a[gE+57024|0]|0)){gE=gE+1|0}else{break L371}}if((a[gE+57024|0]|0)!=0){break}c[17539]=3;c[17558]=0;c[17559]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125560,(v=i,i=i+8|0,c[v>>2]=57024,v)|0);gH=c[13898]|0;gG=c[1054]|0;gy=c[gG+(gH*40&-1)+36>>2]|0;gz=c[gG+(gH*40&-1)+32>>2]|0;L379:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gy|0)>0){hF=c[10036]|0;gC=0;hS=0;cd=gz;while(1){gA=a[b0+gC|0]|0;if(gA<<24>>24==(a[hF+(gC+cd|0)|0]|0)){id=cd;ie=hS}else{if(gA<<24>>24!=36){break L379}id=cd-1|0;ie=1}ig=gC+1|0;if((ig|0)<(ie+gy|0)){gC=ig;hS=ie;cd=id}else{break}}if((ie|0)==0){ih=ig;b7=272}}else{ih=0;b7=272}if((b7|0)==272){b7=0;cd=a[b0+ih|0]|0;if(!((cd<<24>>24|0)==36|(cd<<24>>24|0)==0)){break}}c[17539]=c[17539]|1;c[17558]=0;c[13898]=gH+1;break L44}}while(0);be(b3|0,125432,(v=i,i=i+8|0,c[v>>2]=57024,v)|0);gH=c[13898]|0;gy=c[1054]|0;gz=c[gy+(gH*40&-1)+36>>2]|0;gG=c[gy+(gH*40&-1)+32>>2]|0;L394:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){cd=c[10036]|0;hS=0;gC=0;hF=gG;while(1){gE=a[b1+hS|0]|0;if(gE<<24>>24==(a[cd+(hS+hF|0)|0]|0)){ii=hF;ij=gC}else{if(gE<<24>>24!=36){break L394}ii=hF-1|0;ij=1}ik=hS+1|0;if((ik|0)<(ij+gz|0)){hS=ik;gC=ij;hF=ii}else{break}}if((ij|0)==0){il=ik;b7=282}}else{il=0;b7=282}if((b7|0)==282){b7=0;hF=a[b1+il|0]|0;if(!((hF<<24>>24|0)==36|(hF<<24>>24|0)==0)){break}}c[17539]=c[17539]|2;c[17559]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125376,(v=i,i=i+8|0,c[v>>2]=57024,v)|0);gH=c[13898]|0;L409:do{if((c[8272]|0)>(gH|0)){gz=c[1054]|0;if((a[gz+(gH*40&-1)|0]&1)==0){break}gG=c[gz+(gH*40&-1)+36>>2]|0;gy=gz+(gH*40&-1)+32|0;gz=c[10036]|0;hF=0;while(1){if((hF|0)>=(gG|0)){break}if((a[gz+((c[gy>>2]|0)+hF|0)|0]|0)==(a[b0+hF|0]|0)){hF=hF+1|0}else{break L409}}if((a[b0+hF|0]|0)!=0){break}c[17539]=c[17539]|12;c[13898]=gH+1;break L44}}while(0);be(b5|0,125128,(v=i,i=i+8|0,c[v>>2]=57024,v)|0);gH=c[13898]|0;gy=c[1054]|0;gz=c[gy+(gH*40&-1)+36>>2]|0;gG=c[gy+(gH*40&-1)+32>>2]|0;L418:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){gC=c[10036]|0;hS=0;cd=0;gE=gG;while(1){gA=a[b0+hS|0]|0;if(gA<<24>>24==(a[gC+(hS+gE|0)|0]|0)){im=gE;io=cd}else{if(gA<<24>>24!=36){break L418}im=gE-1|0;io=1}ip=hS+1|0;if((ip|0)<(io+gz|0)){hS=ip;cd=io;gE=im}else{break}}if((io|0)==0){iq=ip;b7=299}}else{iq=0;b7=299}if((b7|0)==299){b7=0;gE=a[b0+iq|0]|0;if(!((gE<<24>>24|0)==36|(gE<<24>>24|0)==0)){break}}c[17539]=c[17539]|4;c[13898]=gH+1;break L44}}while(0);be(b3|0,124936,(v=i,i=i+8|0,c[v>>2]=57024,v)|0);gH=c[13898]|0;gz=c[1054]|0;gG=c[gz+(gH*40&-1)+36>>2]|0;gy=c[gz+(gH*40&-1)+32>>2]|0;L433:do{if((a[gz+(gH*40&-1)|0]&1)!=0){L435:do{if((gG|0)>0){gE=c[10036]|0;cd=0;hS=0;gC=gy;while(1){hF=a[b1+cd|0]|0;if(hF<<24>>24==(a[gE+(cd+gC|0)|0]|0)){ir=gC;iu=hS}else{if(hF<<24>>24!=36){break L435}ir=gC-1|0;iu=1}iv=cd+1|0;if((iv|0)<(iu+gG|0)){cd=iv;hS=iu;gC=ir}else{break}}if((iu|0)==0){iy=iv;b7=309}else{b7=310}}else{iy=0;b7=309}}while(0);if((b7|0)==309){b7=0;gC=a[b1+iy|0]|0;if((gC<<24>>24|0)==36|(gC<<24>>24|0)==0){b7=310}}if((b7|0)==310){b7=0;c[17539]=c[17539]|8;c[13898]=gH+1;break L44}if((c[8272]|0)<=(gH|0)){break}gC=c[10036]|0;hS=0;while(1){if((hS|0)>=(gG|0)){break}if((a[gC+(hS+gy|0)|0]|0)==(a[hS+57048|0]|0)){hS=hS+1|0}else{break L433}}if((a[hS+57048|0]|0)!=0){break}c[17711]=3;c[17730]=0;c[17731]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125560,(v=i,i=i+8|0,c[v>>2]=57048,v)|0);gH=c[13898]|0;gy=c[1054]|0;gG=c[gy+(gH*40&-1)+36>>2]|0;gz=c[gy+(gH*40&-1)+32>>2]|0;L456:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gG|0)>0){gC=c[10036]|0;cd=0;gE=0;hF=gz;while(1){gA=a[b0+cd|0]|0;if(gA<<24>>24==(a[gC+(cd+hF|0)|0]|0)){iz=hF;iA=gE}else{if(gA<<24>>24!=36){break L456}iz=hF-1|0;iA=1}iB=cd+1|0;if((iB|0)<(iA+gG|0)){cd=iB;gE=iA;hF=iz}else{break}}if((iA|0)==0){iC=iB;b7=325}}else{iC=0;b7=325}if((b7|0)==325){b7=0;hF=a[b0+iC|0]|0;if(!((hF<<24>>24|0)==36|(hF<<24>>24|0)==0)){break}}c[17711]=c[17711]|1;c[17730]=0;c[13898]=gH+1;break L44}}while(0);be(b3|0,125432,(v=i,i=i+8|0,c[v>>2]=57048,v)|0);gH=c[13898]|0;gG=c[1054]|0;gz=c[gG+(gH*40&-1)+36>>2]|0;gy=c[gG+(gH*40&-1)+32>>2]|0;L471:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){hF=c[10036]|0;gE=0;cd=0;gC=gy;while(1){hS=a[b1+gE|0]|0;if(hS<<24>>24==(a[hF+(gE+gC|0)|0]|0)){iD=gC;iE=cd}else{if(hS<<24>>24!=36){break L471}iD=gC-1|0;iE=1}iF=gE+1|0;if((iF|0)<(iE+gz|0)){gE=iF;cd=iE;gC=iD}else{break}}if((iE|0)==0){iG=iF;b7=335}}else{iG=0;b7=335}if((b7|0)==335){b7=0;gC=a[b1+iG|0]|0;if(!((gC<<24>>24|0)==36|(gC<<24>>24|0)==0)){break}}c[17711]=c[17711]|2;c[17731]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125376,(v=i,i=i+8|0,c[v>>2]=57048,v)|0);gH=c[13898]|0;L486:do{if((c[8272]|0)>(gH|0)){gz=c[1054]|0;if((a[gz+(gH*40&-1)|0]&1)==0){break}gy=c[gz+(gH*40&-1)+36>>2]|0;gG=gz+(gH*40&-1)+32|0;gz=c[10036]|0;gC=0;while(1){if((gC|0)>=(gy|0)){break}if((a[gz+((c[gG>>2]|0)+gC|0)|0]|0)==(a[b0+gC|0]|0)){gC=gC+1|0}else{break L486}}if((a[b0+gC|0]|0)!=0){break}c[17711]=c[17711]|12;c[13898]=gH+1;break L44}}while(0);be(b5|0,125128,(v=i,i=i+8|0,c[v>>2]=57048,v)|0);gH=c[13898]|0;gG=c[1054]|0;gz=c[gG+(gH*40&-1)+36>>2]|0;gy=c[gG+(gH*40&-1)+32>>2]|0;L495:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){cd=c[10036]|0;gE=0;hF=0;hS=gy;while(1){gA=a[b0+gE|0]|0;if(gA<<24>>24==(a[cd+(gE+hS|0)|0]|0)){iH=hS;iI=hF}else{if(gA<<24>>24!=36){break L495}iH=hS-1|0;iI=1}iJ=gE+1|0;if((iJ|0)<(iI+gz|0)){gE=iJ;hF=iI;hS=iH}else{break}}if((iI|0)==0){iK=iJ;b7=352}}else{iK=0;b7=352}if((b7|0)==352){b7=0;hS=a[b0+iK|0]|0;if(!((hS<<24>>24|0)==36|(hS<<24>>24|0)==0)){break}}c[17711]=c[17711]|4;c[13898]=gH+1;break L44}}while(0);be(b3|0,124936,(v=i,i=i+8|0,c[v>>2]=57048,v)|0);gH=c[13898]|0;gz=c[1054]|0;gy=c[gz+(gH*40&-1)+36>>2]|0;gG=c[gz+(gH*40&-1)+32>>2]|0;L510:do{if((a[gz+(gH*40&-1)|0]&1)!=0){L512:do{if((gy|0)>0){hS=c[10036]|0;hF=0;gE=0;cd=gG;while(1){gC=a[b1+hF|0]|0;if(gC<<24>>24==(a[hS+(hF+cd|0)|0]|0)){iL=cd;iM=gE}else{if(gC<<24>>24!=36){break L512}iL=cd-1|0;iM=1}iN=hF+1|0;if((iN|0)<(iM+gy|0)){hF=iN;gE=iM;cd=iL}else{break}}if((iM|0)==0){iP=iN;b7=362}else{b7=363}}else{iP=0;b7=362}}while(0);if((b7|0)==362){b7=0;cd=a[b1+iP|0]|0;if((cd<<24>>24|0)==36|(cd<<24>>24|0)==0){b7=363}}if((b7|0)==363){b7=0;c[17711]=c[17711]|8;c[13898]=gH+1;break L44}if((c[8272]|0)<=(gH|0)){break}cd=c[10036]|0;gE=0;while(1){if((gE|0)>=(gy|0)){break}if((a[cd+(gE+gG|0)|0]|0)==(a[gE+57072|0]|0)){gE=gE+1|0}else{break L510}}if((a[gE+57072|0]|0)!=0){break}c[17883]=3;c[17902]=0;c[17903]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125560,(v=i,i=i+8|0,c[v>>2]=57072,v)|0);gH=c[13898]|0;gG=c[1054]|0;gy=c[gG+(gH*40&-1)+36>>2]|0;gz=c[gG+(gH*40&-1)+32>>2]|0;L533:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gy|0)>0){cd=c[10036]|0;hF=0;hS=0;gC=gz;while(1){gA=a[b0+hF|0]|0;if(gA<<24>>24==(a[cd+(hF+gC|0)|0]|0)){iR=gC;iS=hS}else{if(gA<<24>>24!=36){break L533}iR=gC-1|0;iS=1}iT=hF+1|0;if((iT|0)<(iS+gy|0)){hF=iT;hS=iS;gC=iR}else{break}}if((iS|0)==0){iU=iT;b7=378}}else{iU=0;b7=378}if((b7|0)==378){b7=0;gC=a[b0+iU|0]|0;if(!((gC<<24>>24|0)==36|(gC<<24>>24|0)==0)){break}}c[17883]=c[17883]|1;c[17902]=0;c[13898]=gH+1;break L44}}while(0);be(b3|0,125432,(v=i,i=i+8|0,c[v>>2]=57072,v)|0);gH=c[13898]|0;gy=c[1054]|0;gz=c[gy+(gH*40&-1)+36>>2]|0;gG=c[gy+(gH*40&-1)+32>>2]|0;L548:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){gC=c[10036]|0;hS=0;hF=0;cd=gG;while(1){gE=a[b1+hS|0]|0;if(gE<<24>>24==(a[gC+(hS+cd|0)|0]|0)){iV=cd;iW=hF}else{if(gE<<24>>24!=36){break L548}iV=cd-1|0;iW=1}iX=hS+1|0;if((iX|0)<(iW+gz|0)){hS=iX;hF=iW;cd=iV}else{break}}if((iW|0)==0){iZ=iX;b7=388}}else{iZ=0;b7=388}if((b7|0)==388){b7=0;cd=a[b1+iZ|0]|0;if(!((cd<<24>>24|0)==36|(cd<<24>>24|0)==0)){break}}c[17883]=c[17883]|2;c[17903]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125376,(v=i,i=i+8|0,c[v>>2]=57072,v)|0);gH=c[13898]|0;L563:do{if((c[8272]|0)>(gH|0)){gz=c[1054]|0;if((a[gz+(gH*40&-1)|0]&1)==0){break}gG=c[gz+(gH*40&-1)+36>>2]|0;gy=gz+(gH*40&-1)+32|0;gz=c[10036]|0;cd=0;while(1){if((cd|0)>=(gG|0)){break}if((a[gz+((c[gy>>2]|0)+cd|0)|0]|0)==(a[b0+cd|0]|0)){cd=cd+1|0}else{break L563}}if((a[b0+cd|0]|0)!=0){break}c[17883]=c[17883]|12;c[13898]=gH+1;break L44}}while(0);be(b5|0,125128,(v=i,i=i+8|0,c[v>>2]=57072,v)|0);gH=c[13898]|0;gy=c[1054]|0;gz=c[gy+(gH*40&-1)+36>>2]|0;gG=c[gy+(gH*40&-1)+32>>2]|0;L572:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){hF=c[10036]|0;hS=0;gC=0;gE=gG;while(1){gA=a[b0+hS|0]|0;if(gA<<24>>24==(a[hF+(hS+gE|0)|0]|0)){i_=gE;i$=gC}else{if(gA<<24>>24!=36){break L572}i_=gE-1|0;i$=1}i0=hS+1|0;if((i0|0)<(i$+gz|0)){hS=i0;gC=i$;gE=i_}else{break}}if((i$|0)==0){i1=i0;b7=405}}else{i1=0;b7=405}if((b7|0)==405){b7=0;gE=a[b0+i1|0]|0;if(!((gE<<24>>24|0)==36|(gE<<24>>24|0)==0)){break}}c[17883]=c[17883]|4;c[13898]=gH+1;break L44}}while(0);be(b3|0,124936,(v=i,i=i+8|0,c[v>>2]=57072,v)|0);gH=c[13898]|0;gz=c[1054]|0;gG=c[gz+(gH*40&-1)+36>>2]|0;gy=c[gz+(gH*40&-1)+32>>2]|0;L587:do{if((a[gz+(gH*40&-1)|0]&1)!=0){L589:do{if((gG|0)>0){gE=c[10036]|0;gC=0;hS=0;hF=gy;while(1){cd=a[b1+gC|0]|0;if(cd<<24>>24==(a[gE+(gC+hF|0)|0]|0)){i2=hF;i3=hS}else{if(cd<<24>>24!=36){break L589}i2=hF-1|0;i3=1}i4=gC+1|0;if((i4|0)<(i3+gG|0)){gC=i4;hS=i3;hF=i2}else{break}}if((i3|0)==0){i5=i4;b7=415}else{b7=416}}else{i5=0;b7=415}}while(0);if((b7|0)==415){b7=0;hF=a[b1+i5|0]|0;if((hF<<24>>24|0)==36|(hF<<24>>24|0)==0){b7=416}}if((b7|0)==416){b7=0;c[17883]=c[17883]|8;c[13898]=gH+1;break L44}if((c[8272]|0)<=(gH|0)){break}hF=c[10036]|0;hS=0;while(1){if((hS|0)>=(gG|0)){break}if((a[hF+(hS+gy|0)|0]|0)==(a[hS+56880|0]|0)){hS=hS+1|0}else{break L587}}if((a[hS+56880|0]|0)!=0){break}c[16507]=3;c[16526]=0;c[16527]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125560,(v=i,i=i+8|0,c[v>>2]=56880,v)|0);gH=c[13898]|0;gy=c[1054]|0;gG=c[gy+(gH*40&-1)+36>>2]|0;gz=c[gy+(gH*40&-1)+32>>2]|0;L610:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gG|0)>0){hF=c[10036]|0;gC=0;gE=0;cd=gz;while(1){gA=a[b0+gC|0]|0;if(gA<<24>>24==(a[hF+(gC+cd|0)|0]|0)){i6=cd;i7=gE}else{if(gA<<24>>24!=36){break L610}i6=cd-1|0;i7=1}i8=gC+1|0;if((i8|0)<(i7+gG|0)){gC=i8;gE=i7;cd=i6}else{break}}if((i7|0)==0){ja=i8;b7=431}}else{ja=0;b7=431}if((b7|0)==431){b7=0;cd=a[b0+ja|0]|0;if(!((cd<<24>>24|0)==36|(cd<<24>>24|0)==0)){break}}c[16507]=c[16507]|1;c[16526]=0;c[13898]=gH+1;break L44}}while(0);be(b3|0,125432,(v=i,i=i+8|0,c[v>>2]=56880,v)|0);gH=c[13898]|0;gG=c[1054]|0;gz=c[gG+(gH*40&-1)+36>>2]|0;gy=c[gG+(gH*40&-1)+32>>2]|0;L625:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){cd=c[10036]|0;gE=0;gC=0;hF=gy;while(1){hS=a[b1+gE|0]|0;if(hS<<24>>24==(a[cd+(gE+hF|0)|0]|0)){jb=hF;jc=gC}else{if(hS<<24>>24!=36){break L625}jb=hF-1|0;jc=1}jd=gE+1|0;if((jd|0)<(jc+gz|0)){gE=jd;gC=jc;hF=jb}else{break}}if((jc|0)==0){je=jd;b7=441}}else{je=0;b7=441}if((b7|0)==441){b7=0;hF=a[b1+je|0]|0;if(!((hF<<24>>24|0)==36|(hF<<24>>24|0)==0)){break}}c[16507]=c[16507]|2;c[16527]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125376,(v=i,i=i+8|0,c[v>>2]=56880,v)|0);gH=c[13898]|0;L640:do{if((c[8272]|0)>(gH|0)){gz=c[1054]|0;if((a[gz+(gH*40&-1)|0]&1)==0){break}gy=c[gz+(gH*40&-1)+36>>2]|0;gG=gz+(gH*40&-1)+32|0;gz=c[10036]|0;hF=0;while(1){if((hF|0)>=(gy|0)){break}if((a[gz+((c[gG>>2]|0)+hF|0)|0]|0)==(a[b0+hF|0]|0)){hF=hF+1|0}else{break L640}}if((a[b0+hF|0]|0)!=0){break}c[16507]=c[16507]|12;c[13898]=gH+1;break L44}}while(0);be(b5|0,125128,(v=i,i=i+8|0,c[v>>2]=56880,v)|0);gH=c[13898]|0;gG=c[1054]|0;gz=c[gG+(gH*40&-1)+36>>2]|0;gy=c[gG+(gH*40&-1)+32>>2]|0;L649:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){gC=c[10036]|0;gE=0;cd=0;hS=gy;while(1){gA=a[b0+gE|0]|0;if(gA<<24>>24==(a[gC+(gE+hS|0)|0]|0)){jf=hS;jg=cd}else{if(gA<<24>>24!=36){break L649}jf=hS-1|0;jg=1}jh=gE+1|0;if((jh|0)<(jg+gz|0)){gE=jh;cd=jg;hS=jf}else{break}}if((jg|0)==0){ji=jh;b7=458}}else{ji=0;b7=458}if((b7|0)==458){b7=0;hS=a[b0+ji|0]|0;if(!((hS<<24>>24|0)==36|(hS<<24>>24|0)==0)){break}}c[16507]=c[16507]|4;c[13898]=gH+1;break L44}}while(0);be(b3|0,124936,(v=i,i=i+8|0,c[v>>2]=56880,v)|0);gH=c[13898]|0;gz=c[1054]|0;gy=c[gz+(gH*40&-1)+36>>2]|0;gG=c[gz+(gH*40&-1)+32>>2]|0;L664:do{if((a[gz+(gH*40&-1)|0]&1)!=0){L666:do{if((gy|0)>0){hS=c[10036]|0;cd=0;gE=0;gC=gG;while(1){hF=a[b1+cd|0]|0;if(hF<<24>>24==(a[hS+(cd+gC|0)|0]|0)){jj=gC;jk=gE}else{if(hF<<24>>24!=36){break L666}jj=gC-1|0;jk=1}jl=cd+1|0;if((jl|0)<(jk+gy|0)){cd=jl;gE=jk;gC=jj}else{break}}if((jk|0)==0){jm=jl;b7=468}else{b7=469}}else{jm=0;b7=468}}while(0);if((b7|0)==468){b7=0;gC=a[b1+jm|0]|0;if((gC<<24>>24|0)==36|(gC<<24>>24|0)==0){b7=469}}if((b7|0)==469){b7=0;c[16507]=c[16507]|8;c[13898]=gH+1;break L44}if((c[8272]|0)<=(gH|0)){break}gC=c[10036]|0;gE=0;while(1){if((gE|0)>=(gy|0)){break}if((a[gC+(gE+gG|0)|0]|0)==(a[gE+56856|0]|0)){gE=gE+1|0}else{break L664}}if((a[gE+56856|0]|0)!=0){break}c[16335]=3;c[16354]=0;c[16355]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125560,(v=i,i=i+8|0,c[v>>2]=56856,v)|0);gH=c[13898]|0;gG=c[1054]|0;gy=c[gG+(gH*40&-1)+36>>2]|0;gz=c[gG+(gH*40&-1)+32>>2]|0;L687:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gy|0)>0){gC=c[10036]|0;cd=0;hS=0;hF=gz;while(1){gA=a[b0+cd|0]|0;if(gA<<24>>24==(a[gC+(cd+hF|0)|0]|0)){jn=hF;jo=hS}else{if(gA<<24>>24!=36){break L687}jn=hF-1|0;jo=1}jy=cd+1|0;if((jy|0)<(jo+gy|0)){cd=jy;hS=jo;hF=jn}else{break}}if((jo|0)==0){jz=jy;b7=484}}else{jz=0;b7=484}if((b7|0)==484){b7=0;hF=a[b0+jz|0]|0;if(!((hF<<24>>24|0)==36|(hF<<24>>24|0)==0)){break}}c[16335]=c[16335]|1;c[16354]=0;c[13898]=gH+1;break L44}}while(0);be(b3|0,125432,(v=i,i=i+8|0,c[v>>2]=56856,v)|0);gH=c[13898]|0;gy=c[1054]|0;gz=c[gy+(gH*40&-1)+36>>2]|0;gG=c[gy+(gH*40&-1)+32>>2]|0;L702:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){hF=c[10036]|0;hS=0;cd=0;gC=gG;while(1){gE=a[b1+hS|0]|0;if(gE<<24>>24==(a[hF+(hS+gC|0)|0]|0)){jA=gC;jB=cd}else{if(gE<<24>>24!=36){break L702}jA=gC-1|0;jB=1}jC=hS+1|0;if((jC|0)<(jB+gz|0)){hS=jC;cd=jB;gC=jA}else{break}}if((jB|0)==0){jD=jC;b7=494}}else{jD=0;b7=494}if((b7|0)==494){b7=0;gC=a[b1+jD|0]|0;if(!((gC<<24>>24|0)==36|(gC<<24>>24|0)==0)){break}}c[16335]=c[16335]|2;c[16355]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125376,(v=i,i=i+8|0,c[v>>2]=56856,v)|0);gH=c[13898]|0;L717:do{if((c[8272]|0)>(gH|0)){gz=c[1054]|0;if((a[gz+(gH*40&-1)|0]&1)==0){break}gG=c[gz+(gH*40&-1)+36>>2]|0;gy=gz+(gH*40&-1)+32|0;gz=c[10036]|0;gC=0;while(1){if((gC|0)>=(gG|0)){break}if((a[gz+((c[gy>>2]|0)+gC|0)|0]|0)==(a[b0+gC|0]|0)){gC=gC+1|0}else{break L717}}if((a[b0+gC|0]|0)!=0){break}c[16335]=c[16335]|12;c[13898]=gH+1;break L44}}while(0);be(b5|0,125128,(v=i,i=i+8|0,c[v>>2]=56856,v)|0);gH=c[13898]|0;gy=c[1054]|0;gz=c[gy+(gH*40&-1)+36>>2]|0;gG=c[gy+(gH*40&-1)+32>>2]|0;L726:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){cd=c[10036]|0;hS=0;hF=0;gE=gG;while(1){gA=a[b0+hS|0]|0;if(gA<<24>>24==(a[cd+(hS+gE|0)|0]|0)){jE=gE;jF=hF}else{if(gA<<24>>24!=36){break L726}jE=gE-1|0;jF=1}jG=hS+1|0;if((jG|0)<(jF+gz|0)){hS=jG;hF=jF;gE=jE}else{break}}if((jF|0)==0){jH=jG;b7=511}}else{jH=0;b7=511}if((b7|0)==511){b7=0;gE=a[b0+jH|0]|0;if(!((gE<<24>>24|0)==36|(gE<<24>>24|0)==0)){break}}c[16335]=c[16335]|4;c[13898]=gH+1;break L44}}while(0);be(b3|0,124936,(v=i,i=i+8|0,c[v>>2]=56856,v)|0);gH=c[13898]|0;gz=c[1054]|0;gG=c[gz+(gH*40&-1)+36>>2]|0;gy=c[gz+(gH*40&-1)+32>>2]|0;L741:do{if((a[gz+(gH*40&-1)|0]&1)!=0){L743:do{if((gG|0)>0){gE=c[10036]|0;hF=0;hS=0;cd=gy;while(1){gC=a[b1+hF|0]|0;if(gC<<24>>24==(a[gE+(hF+cd|0)|0]|0)){jI=cd;jJ=hS}else{if(gC<<24>>24!=36){break L743}jI=cd-1|0;jJ=1}jK=hF+1|0;if((jK|0)<(jJ+gG|0)){hF=jK;hS=jJ;cd=jI}else{break}}if((jJ|0)==0){jL=jK;b7=521}else{b7=522}}else{jL=0;b7=521}}while(0);if((b7|0)==521){b7=0;cd=a[b1+jL|0]|0;if((cd<<24>>24|0)==36|(cd<<24>>24|0)==0){b7=522}}if((b7|0)==522){b7=0;c[16335]=c[16335]|8;c[13898]=gH+1;break L44}if((c[8272]|0)<=(gH|0)){break}cd=c[10036]|0;hS=0;while(1){if((hS|0)>=(gG|0)){break}if((a[cd+(hS+gy|0)|0]|0)==(a[hS+56832|0]|0)){hS=hS+1|0}else{break L741}}if((a[hS+56832|0]|0)!=0){break}c[16163]=3;c[16182]=0;c[16183]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125560,(v=i,i=i+8|0,c[v>>2]=56832,v)|0);gH=c[13898]|0;gy=c[1054]|0;gG=c[gy+(gH*40&-1)+36>>2]|0;gz=c[gy+(gH*40&-1)+32>>2]|0;L764:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gG|0)>0){cd=c[10036]|0;hF=0;gE=0;gC=gz;while(1){gA=a[b0+hF|0]|0;if(gA<<24>>24==(a[cd+(hF+gC|0)|0]|0)){jM=gC;jN=gE}else{if(gA<<24>>24!=36){break L764}jM=gC-1|0;jN=1}jO=hF+1|0;if((jO|0)<(jN+gG|0)){hF=jO;gE=jN;gC=jM}else{break}}if((jN|0)==0){jP=jO;b7=537}}else{jP=0;b7=537}if((b7|0)==537){b7=0;gC=a[b0+jP|0]|0;if(!((gC<<24>>24|0)==36|(gC<<24>>24|0)==0)){break}}c[16163]=c[16163]|1;c[16182]=0;c[13898]=gH+1;break L44}}while(0);be(b3|0,125432,(v=i,i=i+8|0,c[v>>2]=56832,v)|0);gH=c[13898]|0;gG=c[1054]|0;gz=c[gG+(gH*40&-1)+36>>2]|0;gy=c[gG+(gH*40&-1)+32>>2]|0;L779:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){gC=c[10036]|0;gE=0;hF=0;cd=gy;while(1){hS=a[b1+gE|0]|0;if(hS<<24>>24==(a[gC+(gE+cd|0)|0]|0)){jQ=cd;jR=hF}else{if(hS<<24>>24!=36){break L779}jQ=cd-1|0;jR=1}jS=gE+1|0;if((jS|0)<(jR+gz|0)){gE=jS;hF=jR;cd=jQ}else{break}}if((jR|0)==0){jT=jS;b7=547}}else{jT=0;b7=547}if((b7|0)==547){b7=0;cd=a[b1+jT|0]|0;if(!((cd<<24>>24|0)==36|(cd<<24>>24|0)==0)){break}}c[16163]=c[16163]|2;c[16183]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125376,(v=i,i=i+8|0,c[v>>2]=56832,v)|0);gH=c[13898]|0;L794:do{if((c[8272]|0)>(gH|0)){gz=c[1054]|0;if((a[gz+(gH*40&-1)|0]&1)==0){break}gy=c[gz+(gH*40&-1)+36>>2]|0;gG=gz+(gH*40&-1)+32|0;gz=c[10036]|0;cd=0;while(1){if((cd|0)>=(gy|0)){break}if((a[gz+((c[gG>>2]|0)+cd|0)|0]|0)==(a[b0+cd|0]|0)){cd=cd+1|0}else{break L794}}if((a[b0+cd|0]|0)!=0){break}c[16163]=c[16163]|12;c[13898]=gH+1;break L44}}while(0);be(b5|0,125128,(v=i,i=i+8|0,c[v>>2]=56832,v)|0);gH=c[13898]|0;gG=c[1054]|0;gz=c[gG+(gH*40&-1)+36>>2]|0;gy=c[gG+(gH*40&-1)+32>>2]|0;L803:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){hF=c[10036]|0;gE=0;gC=0;hS=gy;while(1){gA=a[b0+gE|0]|0;if(gA<<24>>24==(a[hF+(gE+hS|0)|0]|0)){jU=hS;jV=gC}else{if(gA<<24>>24!=36){break L803}jU=hS-1|0;jV=1}jW=gE+1|0;if((jW|0)<(jV+gz|0)){gE=jW;gC=jV;hS=jU}else{break}}if((jV|0)==0){jX=jW;b7=564}}else{jX=0;b7=564}if((b7|0)==564){b7=0;hS=a[b0+jX|0]|0;if(!((hS<<24>>24|0)==36|(hS<<24>>24|0)==0)){break}}c[16163]=c[16163]|4;c[13898]=gH+1;break L44}}while(0);be(b3|0,124936,(v=i,i=i+8|0,c[v>>2]=56832,v)|0);gH=c[13898]|0;gz=c[1054]|0;gy=c[gz+(gH*40&-1)+36>>2]|0;gG=c[gz+(gH*40&-1)+32>>2]|0;L818:do{if((a[gz+(gH*40&-1)|0]&1)!=0){L820:do{if((gy|0)>0){hS=c[10036]|0;gC=0;gE=0;hF=gG;while(1){cd=a[b1+gC|0]|0;if(cd<<24>>24==(a[hS+(gC+hF|0)|0]|0)){jY=hF;jZ=gE}else{if(cd<<24>>24!=36){break L820}jY=hF-1|0;jZ=1}j_=gC+1|0;if((j_|0)<(jZ+gy|0)){gC=j_;gE=jZ;hF=jY}else{break}}if((jZ|0)==0){j$=j_;b7=574}else{b7=575}}else{j$=0;b7=574}}while(0);if((b7|0)==574){b7=0;hF=a[b1+j$|0]|0;if((hF<<24>>24|0)==36|(hF<<24>>24|0)==0){b7=575}}if((b7|0)==575){b7=0;c[16163]=c[16163]|8;c[13898]=gH+1;break L44}if((c[8272]|0)<=(gH|0)){break}hF=c[10036]|0;gE=0;while(1){if((gE|0)>=(gy|0)){break}if((a[hF+(gE+gG|0)|0]|0)==(a[gE+56976|0]|0)){gE=gE+1|0}else{break L818}}if((a[gE+56976|0]|0)!=0){break}c[17195]=3;c[17214]=0;c[17215]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125560,(v=i,i=i+8|0,c[v>>2]=56976,v)|0);gH=c[13898]|0;gG=c[1054]|0;gy=c[gG+(gH*40&-1)+36>>2]|0;gz=c[gG+(gH*40&-1)+32>>2]|0;L841:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gy|0)>0){hF=c[10036]|0;gC=0;hS=0;cd=gz;while(1){gA=a[b0+gC|0]|0;if(gA<<24>>24==(a[hF+(gC+cd|0)|0]|0)){j0=cd;j1=hS}else{if(gA<<24>>24!=36){break L841}j0=cd-1|0;j1=1}j2=gC+1|0;if((j2|0)<(j1+gy|0)){gC=j2;hS=j1;cd=j0}else{break}}if((j1|0)==0){j3=j2;b7=590}}else{j3=0;b7=590}if((b7|0)==590){b7=0;cd=a[b0+j3|0]|0;if(!((cd<<24>>24|0)==36|(cd<<24>>24|0)==0)){break}}c[17195]=c[17195]|1;c[17214]=0;c[13898]=gH+1;break L44}}while(0);be(b3|0,125432,(v=i,i=i+8|0,c[v>>2]=56976,v)|0);gH=c[13898]|0;gy=c[1054]|0;gz=c[gy+(gH*40&-1)+36>>2]|0;gG=c[gy+(gH*40&-1)+32>>2]|0;L856:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){cd=c[10036]|0;hS=0;gC=0;hF=gG;while(1){gE=a[b1+hS|0]|0;if(gE<<24>>24==(a[cd+(hS+hF|0)|0]|0)){j4=hF;j5=gC}else{if(gE<<24>>24!=36){break L856}j4=hF-1|0;j5=1}j6=hS+1|0;if((j6|0)<(j5+gz|0)){hS=j6;gC=j5;hF=j4}else{break}}if((j5|0)==0){j7=j6;b7=600}}else{j7=0;b7=600}if((b7|0)==600){b7=0;hF=a[b1+j7|0]|0;if(!((hF<<24>>24|0)==36|(hF<<24>>24|0)==0)){break}}c[17195]=c[17195]|2;c[17215]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125376,(v=i,i=i+8|0,c[v>>2]=56976,v)|0);gH=c[13898]|0;L871:do{if((c[8272]|0)>(gH|0)){gz=c[1054]|0;if((a[gz+(gH*40&-1)|0]&1)==0){break}gG=c[gz+(gH*40&-1)+36>>2]|0;gy=gz+(gH*40&-1)+32|0;gz=c[10036]|0;hF=0;while(1){if((hF|0)>=(gG|0)){break}if((a[gz+((c[gy>>2]|0)+hF|0)|0]|0)==(a[b0+hF|0]|0)){hF=hF+1|0}else{break L871}}if((a[b0+hF|0]|0)!=0){break}c[17195]=c[17195]|12;c[13898]=gH+1;break L44}}while(0);be(b5|0,125128,(v=i,i=i+8|0,c[v>>2]=56976,v)|0);gH=c[13898]|0;gy=c[1054]|0;gz=c[gy+(gH*40&-1)+36>>2]|0;gG=c[gy+(gH*40&-1)+32>>2]|0;L880:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){gC=c[10036]|0;hS=0;cd=0;gE=gG;while(1){gA=a[b0+hS|0]|0;if(gA<<24>>24==(a[gC+(hS+gE|0)|0]|0)){j8=gE;j9=cd}else{if(gA<<24>>24!=36){break L880}j8=gE-1|0;j9=1}ka=hS+1|0;if((ka|0)<(j9+gz|0)){hS=ka;cd=j9;gE=j8}else{break}}if((j9|0)==0){kb=ka;b7=617}}else{kb=0;b7=617}if((b7|0)==617){b7=0;gE=a[b0+kb|0]|0;if(!((gE<<24>>24|0)==36|(gE<<24>>24|0)==0)){break}}c[17195]=c[17195]|4;c[13898]=gH+1;break L44}}while(0);be(b3|0,124936,(v=i,i=i+8|0,c[v>>2]=56976,v)|0);gH=c[13898]|0;gz=c[1054]|0;gG=c[gz+(gH*40&-1)+36>>2]|0;gy=c[gz+(gH*40&-1)+32>>2]|0;L895:do{if((a[gz+(gH*40&-1)|0]&1)!=0){L897:do{if((gG|0)>0){gE=c[10036]|0;cd=0;hS=0;gC=gy;while(1){hF=a[b1+cd|0]|0;if(hF<<24>>24==(a[gE+(cd+gC|0)|0]|0)){kc=gC;kd=hS}else{if(hF<<24>>24!=36){break L897}kc=gC-1|0;kd=1}ke=cd+1|0;if((ke|0)<(kd+gG|0)){cd=ke;hS=kd;gC=kc}else{break}}if((kd|0)==0){kf=ke;b7=627}else{b7=628}}else{kf=0;b7=627}}while(0);if((b7|0)==627){b7=0;gC=a[b1+kf|0]|0;if((gC<<24>>24|0)==36|(gC<<24>>24|0)==0){b7=628}}if((b7|0)==628){b7=0;c[17195]=c[17195]|8;c[13898]=gH+1;break L44}if((c[8272]|0)<=(gH|0)){break}gC=c[10036]|0;hS=0;while(1){if((hS|0)>=(gG|0)){break}if((a[gC+(hS+gy|0)|0]|0)==(a[hS+56952|0]|0)){hS=hS+1|0}else{break L895}}if((a[hS+56952|0]|0)!=0){break}c[17023]=3;c[17042]=0;c[17043]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125560,(v=i,i=i+8|0,c[v>>2]=56952,v)|0);gH=c[13898]|0;gy=c[1054]|0;gG=c[gy+(gH*40&-1)+36>>2]|0;gz=c[gy+(gH*40&-1)+32>>2]|0;L918:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gG|0)>0){gC=c[10036]|0;cd=0;gE=0;hF=gz;while(1){gA=a[b0+cd|0]|0;if(gA<<24>>24==(a[gC+(cd+hF|0)|0]|0)){kg=hF;kh=gE}else{if(gA<<24>>24!=36){break L918}kg=hF-1|0;kh=1}ki=cd+1|0;if((ki|0)<(kh+gG|0)){cd=ki;gE=kh;hF=kg}else{break}}if((kh|0)==0){kj=ki;b7=643}}else{kj=0;b7=643}if((b7|0)==643){b7=0;hF=a[b0+kj|0]|0;if(!((hF<<24>>24|0)==36|(hF<<24>>24|0)==0)){break}}c[17023]=c[17023]|1;c[17042]=0;c[13898]=gH+1;break L44}}while(0);be(b3|0,125432,(v=i,i=i+8|0,c[v>>2]=56952,v)|0);gH=c[13898]|0;gG=c[1054]|0;gz=c[gG+(gH*40&-1)+36>>2]|0;gy=c[gG+(gH*40&-1)+32>>2]|0;L933:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){hF=c[10036]|0;gE=0;cd=0;gC=gy;while(1){hS=a[b1+gE|0]|0;if(hS<<24>>24==(a[hF+(gE+gC|0)|0]|0)){kk=gC;kl=cd}else{if(hS<<24>>24!=36){break L933}kk=gC-1|0;kl=1}km=gE+1|0;if((km|0)<(kl+gz|0)){gE=km;cd=kl;gC=kk}else{break}}if((kl|0)==0){kn=km;b7=653}}else{kn=0;b7=653}if((b7|0)==653){b7=0;gC=a[b1+kn|0]|0;if(!((gC<<24>>24|0)==36|(gC<<24>>24|0)==0)){break}}c[17023]=c[17023]|2;c[17043]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125376,(v=i,i=i+8|0,c[v>>2]=56952,v)|0);gH=c[13898]|0;L948:do{if((c[8272]|0)>(gH|0)){gz=c[1054]|0;if((a[gz+(gH*40&-1)|0]&1)==0){break}gy=c[gz+(gH*40&-1)+36>>2]|0;gG=gz+(gH*40&-1)+32|0;gz=c[10036]|0;gC=0;while(1){if((gC|0)>=(gy|0)){break}if((a[gz+((c[gG>>2]|0)+gC|0)|0]|0)==(a[b0+gC|0]|0)){gC=gC+1|0}else{break L948}}if((a[b0+gC|0]|0)!=0){break}c[17023]=c[17023]|12;c[13898]=gH+1;break L44}}while(0);be(b5|0,125128,(v=i,i=i+8|0,c[v>>2]=56952,v)|0);gH=c[13898]|0;gG=c[1054]|0;gz=c[gG+(gH*40&-1)+36>>2]|0;gy=c[gG+(gH*40&-1)+32>>2]|0;L957:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){cd=c[10036]|0;gE=0;hF=0;hS=gy;while(1){gA=a[b0+gE|0]|0;if(gA<<24>>24==(a[cd+(gE+hS|0)|0]|0)){ko=hS;kp=hF}else{if(gA<<24>>24!=36){break L957}ko=hS-1|0;kp=1}kq=gE+1|0;if((kq|0)<(kp+gz|0)){gE=kq;hF=kp;hS=ko}else{break}}if((kp|0)==0){kr=kq;b7=670}}else{kr=0;b7=670}if((b7|0)==670){b7=0;hS=a[b0+kr|0]|0;if(!((hS<<24>>24|0)==36|(hS<<24>>24|0)==0)){break}}c[17023]=c[17023]|4;c[13898]=gH+1;break L44}}while(0);be(b3|0,124936,(v=i,i=i+8|0,c[v>>2]=56952,v)|0);gH=c[13898]|0;gz=c[1054]|0;gy=c[gz+(gH*40&-1)+36>>2]|0;gG=c[gz+(gH*40&-1)+32>>2]|0;L972:do{if((a[gz+(gH*40&-1)|0]&1)!=0){L974:do{if((gy|0)>0){hS=c[10036]|0;hF=0;gE=0;cd=gG;while(1){gC=a[b1+hF|0]|0;if(gC<<24>>24==(a[hS+(hF+cd|0)|0]|0)){ks=cd;kt=gE}else{if(gC<<24>>24!=36){break L974}ks=cd-1|0;kt=1}ku=hF+1|0;if((ku|0)<(kt+gy|0)){hF=ku;gE=kt;cd=ks}else{break}}if((kt|0)==0){kv=ku;b7=680}else{b7=681}}else{kv=0;b7=680}}while(0);if((b7|0)==680){b7=0;cd=a[b1+kv|0]|0;if((cd<<24>>24|0)==36|(cd<<24>>24|0)==0){b7=681}}if((b7|0)==681){b7=0;c[17023]=c[17023]|8;c[13898]=gH+1;break L44}if((c[8272]|0)<=(gH|0)){break}cd=c[10036]|0;gE=0;while(1){if((gE|0)>=(gy|0)){break}if((a[cd+(gE+gG|0)|0]|0)==(a[gE+56904|0]|0)){gE=gE+1|0}else{break L972}}if((a[gE+56904|0]|0)!=0){break}c[16679]=3;c[16698]=0;c[16699]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125560,(v=i,i=i+8|0,c[v>>2]=56904,v)|0);gH=c[13898]|0;gG=c[1054]|0;gy=c[gG+(gH*40&-1)+36>>2]|0;gz=c[gG+(gH*40&-1)+32>>2]|0;L995:do{if((a[gG+(gH*40&-1)|0]&1)!=0){if((gy|0)>0){cd=c[10036]|0;hF=0;hS=0;gC=gz;while(1){gA=a[b0+hF|0]|0;if(gA<<24>>24==(a[cd+(hF+gC|0)|0]|0)){kw=gC;kx=hS}else{if(gA<<24>>24!=36){break L995}kw=gC-1|0;kx=1}ky=hF+1|0;if((ky|0)<(kx+gy|0)){hF=ky;hS=kx;gC=kw}else{break}}if((kx|0)==0){kz=ky;b7=696}}else{kz=0;b7=696}if((b7|0)==696){b7=0;gC=a[b0+kz|0]|0;if(!((gC<<24>>24|0)==36|(gC<<24>>24|0)==0)){break}}c[16679]=c[16679]|1;c[16698]=0;c[13898]=gH+1;break L44}}while(0);be(b3|0,125432,(v=i,i=i+8|0,c[v>>2]=56904,v)|0);gH=c[13898]|0;gy=c[1054]|0;gz=c[gy+(gH*40&-1)+36>>2]|0;gG=c[gy+(gH*40&-1)+32>>2]|0;L1010:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){gC=c[10036]|0;hS=0;hF=0;cd=gG;while(1){gE=a[b1+hS|0]|0;if(gE<<24>>24==(a[gC+(hS+cd|0)|0]|0)){kA=cd;kB=hF}else{if(gE<<24>>24!=36){break L1010}kA=cd-1|0;kB=1}kC=hS+1|0;if((kC|0)<(kB+gz|0)){hS=kC;hF=kB;cd=kA}else{break}}if((kB|0)==0){kD=kC;b7=706}}else{kD=0;b7=706}if((b7|0)==706){b7=0;cd=a[b1+kD|0]|0;if(!((cd<<24>>24|0)==36|(cd<<24>>24|0)==0)){break}}c[16679]=c[16679]|2;c[16699]=0;c[13898]=gH+1;break L44}}while(0);be(b5|0,125376,(v=i,i=i+8|0,c[v>>2]=56904,v)|0);gH=c[13898]|0;L1025:do{if((c[8272]|0)>(gH|0)){gz=c[1054]|0;if((a[gz+(gH*40&-1)|0]&1)==0){break}gG=c[gz+(gH*40&-1)+36>>2]|0;gy=gz+(gH*40&-1)+32|0;gz=c[10036]|0;cd=0;while(1){if((cd|0)>=(gG|0)){break}if((a[gz+((c[gy>>2]|0)+cd|0)|0]|0)==(a[b0+cd|0]|0)){cd=cd+1|0}else{break L1025}}if((a[b0+cd|0]|0)!=0){break}c[16679]=c[16679]|12;c[13898]=gH+1;break L44}}while(0);be(b5|0,125128,(v=i,i=i+8|0,c[v>>2]=56904,v)|0);gH=c[13898]|0;gy=c[1054]|0;gz=c[gy+(gH*40&-1)+36>>2]|0;gG=c[gy+(gH*40&-1)+32>>2]|0;L1034:do{if((a[gy+(gH*40&-1)|0]&1)!=0){if((gz|0)>0){hF=c[10036]|0;hS=0;gC=0;gE=gG;while(1){gA=a[b0+hS|0]|0;if(gA<<24>>24==(a[hF+(hS+gE|0)|0]|0)){kE=gE;kF=gC}else{if(gA<<24>>24!=36){break L1034}kE=gE-1|0;kF=1}kG=hS+1|0;if((kG|0)<(kF+gz|0)){hS=kG;gC=kF;gE=kE}else{break}}if((kF|0)==0){kH=kG;b7=723}}else{kH=0;b7=723}if((b7|0)==723){b7=0;gE=a[b0+kH|0]|0;if(!((gE<<24>>24|0)==36|(gE<<24>>24|0)==0)){break}}c[16679]=c[16679]|4;c[13898]=gH+1;break L44}}while(0);be(b3|0,124936,(v=i,i=i+8|0,c[v>>2]=56904,v)|0);kI=c[13898]|0;gH=c[1054]|0;gz=c[gH+(kI*40&-1)+36>>2]|0;if((a[gH+(kI*40&-1)|0]&1)==0){b7=5120;break L27}if((gz|0)>0){gG=c[10036]|0;gy=0;gE=0;gC=c[gH+(kI*40&-1)+32>>2]|0;while(1){gH=a[b1+gy|0]|0;if(gH<<24>>24==(a[gG+(gy+gC|0)|0]|0)){kJ=gC;kK=gE}else{if(gH<<24>>24!=36){b7=5121;break L27}kJ=gC-1|0;kK=1}kL=gy+1|0;if((kL|0)<(kK+gz|0)){gy=kL;gE=kK;gC=kJ}else{break}}if((kK|0)==0){kM=kL;b7=733}}else{kM=0;b7=733}if((b7|0)==733){b7=0;gC=a[b1+kM|0]|0;if(!((gC<<24>>24|0)==36|(gC<<24>>24|0)==0)){b7=5122;break L27}}c[16679]=c[16679]|8;c[13898]=kI+1;break L44}}while(0);c[16163]=3;c[16335]=3;c[16507]=3;c[16679]=3;c[16851]=3;c[17023]=3;c[17195]=3;c[17367]=3;c[17539]=3;c[17711]=3;c[17883]=3}else if((gD|0)==6){gx=gv+1|0;c[13898]=gx;gC=c[8272]|0;L1064:do{if((gx|0)<(gC|0)){gE=gx;gy=gC;gz=gw;while(1){gG=c[gz+(gE*40&-1)+36>>2]|0;gH=gz+(gE*40&-1)+32|0;L1067:do{if((a[gz+(gE*40&-1)|0]&1)==0){b7=776}else{hS=c[10036]|0;hF=0;while(1){if((hF|0)>=(gG|0)){b7=741;break}cd=c[gH>>2]|0;if((a[hS+(cd+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{kN=cd;break}}if((b7|0)==741){b7=0;if((hF|0)==1){kO=gE;break L1064}kN=c[gH>>2]|0}L1076:do{if((gG|0)>0){cd=0;gA=0;hp=kN;while(1){if((a[cd+95520|0]|0)==(a[hS+(cd+hp|0)|0]|0)){kP=hp;kQ=gA}else{if((cd|0)!=1){kR=0;kS=0;kT=kN;break}kP=hp-1|0;kQ=1}ho=cd+1|0;if((ho|0)<(kQ+gG|0)){cd=ho;gA=kQ;hp=kP}else{b7=748;break}}do{if((b7|0)==748){b7=0;if((kQ|0)==0){if(!((cd|0)==0|(cd|0)==5)){kR=0;kS=0;kT=kN;break}}h[7077]=0.0;hp=gE+1|0;c[13898]=hp;kU=hp;kV=gy;break L1067}}while(0);while(1){if((a[kR+126016|0]|0)==(a[hS+(kR+kT|0)|0]|0)){kW=kT;kX=kS}else{if((kR|0)!=1){kY=0;kZ=0;k_=kN;break}kW=kT-1|0;kX=1}cd=kR+1|0;if((cd|0)<(kX+gG|0)){kR=cd;kS=kX;kT=kW}else{b7=755;break}}do{if((b7|0)==755){b7=0;if((kX|0)==0){if(!((kR|0)==0|(kR|0)==5)){kY=0;kZ=0;k_=kN;break}}h[7077]=1.0;cd=gE+1|0;c[13898]=cd;kU=cd;kV=gy;break L1067}}while(0);while(1){if((a[kY+125960|0]|0)==(a[hS+(kY+k_|0)|0]|0)){k$=k_;k0=kZ}else{if((kY|0)!=4){break L1076}k$=k_-1|0;k0=1}cd=kY+1|0;if((cd|0)<(k0+gG|0)){kY=cd;kZ=k0;k_=k$}else{break}}if((k0|0)==0){if(!((kY|0)==3|(kY|0)==9)){break}}h[7077]=-1.0;cd=gE+1|0;c[13898]=cd;kU=cd;kV=gy;break L1067}}while(0);if((gy|0)>(gE|0)){k1=0}else{b7=776;break}while(1){if((k1|0)>=(gG|0)){b7=770;break}if((a[hS+(k1+kN|0)|0]|0)==(a[k1+150856|0]|0)){k1=k1+1|0}else{k2=0;break}}do{if((b7|0)==770){b7=0;if((k1|0)!=5){k2=0;break}c[14156]=1;hF=gE+1|0;c[13898]=hF;kU=hF;kV=gy;break L1067}}while(0);while(1){if((k2|0)>=(gG|0)){break}if((a[hS+(k2+kN|0)|0]|0)==(a[k2+150704|0]|0)){k2=k2+1|0}else{b7=776;break L1067}}if((k2|0)!=4){b7=776;break}c[14156]=0;hS=gE+1|0;c[13898]=hS;kU=hS;kV=gy}}while(0);if((b7|0)==776){b7=0;gG=is(b_)|0;gH=c[gG>>2]|0;if((gH|0)==1){k3=+(c[gG+8>>2]|0)}else if((gH|0)==2){k3=+h[gG+8>>3]}else if((gH|0)==3){k3=+uz(c[gG+8>>2]|0,0)}else{b7=780;break L27}if((c[b6>>2]|0)==3){uu(c[cc>>2]|0);c[b6>>2]=1}h[7077]=k3;kU=c[13898]|0;kV=c[8272]|0}if((kU|0)>=(kV|0)){kO=kU;break L1064}gE=kU;gy=kV;gz=c[1054]|0}}else{kO=gx}}while(0);if((gx|0)!=(kO|0)){break}h[7077]=1.0}else if((gD|0)==8){gC=gv+1|0;c[13898]=gC;gz=c[8272]|0;gy=(gC|0)<(gz|0);L1136:do{if(gy){if((a[gw+(gC*40&-1)|0]&1)==0){k4=gC;k5=gz;k6=gw;b7=794;break}gE=c[gw+(gC*40&-1)+36>>2]|0;gG=gw+(gC*40&-1)+32|0;gH=0;while(1){if((gH|0)>=(gE|0)){break}if((a[gB+((c[gG>>2]|0)+gH|0)|0]|0)==(a[gH+103664|0]|0)){gH=gH+1|0}else{b7=793;break L1136}}if((gH|0)==1){b7=792}else{b7=793}}else{b7=792}}while(0);if((b7|0)==792){b7=0;c[11692]=31;c[14088]=1;c[14074]=c[12768];c[14075]=c[12769];c[14076]=c[12770];c[14077]=c[12771];c[14078]=c[12772];c[14079]=c[12773];c[14080]=c[12774];c[14081]=c[12775];c[14082]=c[12776];c[14083]=c[12777];c[14084]=c[12778];c[14085]=c[12779];c[14086]=c[12780];c[14087]=c[12781];b7=793}if((b7|0)==793){b7=0;if(gy){k4=gC;k5=gz;k6=gw;b7=794}}L1147:do{if((b7|0)==794){while(1){b7=0;L1150:do{if((a[k6+(k4*40&-1)|0]&1)==0){b7=810}else{gx=c[k6+(k4*40&-1)+36>>2]|0;gG=k6+(k4*40&-1)+32|0;gE=c[10036]|0;hS=0;while(1){if((hS|0)>=(gx|0)){b7=798;break}if((a[gE+((c[gG>>2]|0)+hS|0)|0]|0)==(a[hS+103664|0]|0)){hS=hS+1|0}else{break}}if((b7|0)==798){b7=0;if((hS|0)==1){break L1147}}if((k5|0)>(k4|0)){k7=0}else{b7=810;break}while(1){if((k7|0)>=(gx|0)){b7=802;break}if((a[gE+((c[gG>>2]|0)+k7|0)|0]|0)==(a[k7+150856|0]|0)){k7=k7+1|0}else{k8=0;break}}do{if((b7|0)==802){b7=0;if((k7|0)!=5){k8=0;break}c[14088]=1;hS=k4+1|0;c[13898]=hS;k9=hS;break L1150}}while(0);while(1){if((k8|0)>=(gx|0)){break}if((a[gE+((c[gG>>2]|0)+k8|0)|0]|0)==(a[k8+150704|0]|0)){k8=k8+1|0}else{b7=810;break L1150}}if((k8|0)!=4){b7=810;break}c[14088]=0;gG=k4+1|0;c[13898]=gG;k9=gG}}while(0);do{if((b7|0)==810){b7=0;hH(56296,1,0);gG=c[13898]|0;if((k4|0)!=(gG|0)){k9=gG;break}gG=is(bZ)|0;gE=c[gG>>2]|0;if((gE|0)==1){la=+(c[gG+8>>2]|0)}else if((gE|0)==2){la=+h[gG+8>>3]}else if((gE|0)==3){la=+uz(c[gG+8>>2]|0,0)}else{b7=815;break L27}if((c[b4>>2]|0)==3){uu(c[cg>>2]|0);c[b4>>2]=1}c[11692]=~~la;k9=c[13898]|0}}while(0);gG=c[8272]|0;if((k9|0)>=(gG|0)){break L1147}k4=k9;k5=gG;k6=c[1054]|0;b7=794}}}while(0);c[260]=c[11692]}else if((gD|0)==9){gz=gv+1|0;c[13898]=gz;gC=c[8272]|0;L1184:do{if((gz|0)<(gC|0)){L1186:do{if((a[gw+(gz*40&-1)|0]&1)!=0){gy=c[gw+(gz*40&-1)+36>>2]|0;gH=gw+(gz*40&-1)+32|0;gG=0;while(1){if((gG|0)>=(gy|0)){break}if((a[gB+((c[gH>>2]|0)+gG|0)|0]|0)==(a[gG+103664|0]|0)){gG=gG+1|0}else{break L1186}}if((gG|0)==1){b7=826;break L1184}}}while(0);gH=is(bY)|0;gy=c[gH>>2]|0;if((gy|0)==1){lb=+(c[gH+8>>2]|0)}else if((gy|0)==2){lb=+h[gH+8>>3]}else if((gy|0)==3){lb=+uz(c[gH+8>>2]|0,0)}else{b7=831;break L27}if((c[ch>>2]|0)==3){uu(c[ci>>2]|0);c[ch>>2]=1}h[7030]=lb;lc=c[13898]|0;ld=c[8272]|0}else{b7=826}}while(0);if((b7|0)==826){b7=0;h[7030]=-1.0;a[56232]=1;lc=gz;ld=gC}if((lc|0)>=(ld|0)){break}gH=c[1054]|0;if((a[gH+(lc*40&-1)|0]&1)==0){b7=5123;break L27}gy=c[gH+(lc*40&-1)+36>>2]|0;gE=gH+(lc*40&-1)+32|0;gH=c[10036]|0;gx=0;while(1){if((gx|0)>=(gy|0)){b7=840;break}hS=c[gE>>2]|0;if((a[gH+(hS+gx|0)|0]|0)==(a[gx+103664|0]|0)){gx=gx+1|0}else{le=hS;break}}if((b7|0)==840){b7=0;if((gx|0)==1){break}le=c[gE>>2]|0}if((gy|0)>0){lf=0;lg=0;lh=le}else{b7=5124;break L27}while(1){if((a[lf+126368|0]|0)==(a[gH+(lf+lh|0)|0]|0)){li=lh;lk=lg}else{if((lf|0)!=1){lm=0;ln=0;lo=le;b7=849;break}li=lh-1|0;lk=1}gC=lf+1|0;if((gC|0)<(lk+gy|0)){lf=gC;lg=lk;lh=li}else{b7=847;break}}do{if((b7|0)==847){b7=0;if((lk|0)!=0){lp=1;break}if((lf|0)==0|(lf|0)==8){lp=1}else{lm=0;ln=0;lo=le;b7=849}}}while(0);do{if((b7|0)==849){while(1){b7=0;if((a[lm+126280|0]|0)==(a[gH+(lm+lo|0)|0]|0)){lq=lo;lr=ln}else{if((lm|0)!=1){b7=5125;break L27}lq=lo-1|0;lr=1}gE=lm+1|0;if((gE|0)<(lr+gy|0)){lm=gE;ln=lr;lo=lq;b7=849}else{break}}if((lr|0)!=0){lp=0;break}if((lm|0)==0|(lm|0)==8){lp=0}else{b7=5126;break L27}}}while(0);a[56232]=lp;c[13898]=lc+1}else if((gD|0)==10){gy=gv+1|0;c[13898]=gy;a[35888]=1;if((gy|0)>=(c[8272]|0)){break}L1234:do{if((a[gw+(gy*40&-1)|0]&1)!=0){gH=c[gw+(gy*40&-1)+36>>2]|0;gE=gw+(gy*40&-1)+32|0;gx=0;while(1){if((gx|0)>=(gH|0)){break}if((a[gB+((c[gE>>2]|0)+gx|0)|0]|0)==(a[gx+103664|0]|0)){gx=gx+1|0}else{break L1234}}if((gx|0)==1){break L44}}}while(0);a[14176]=1;is(bX);a[14176]=0;if((c[cj>>2]|0)!=3){c[13898]=gy;break}gE=c[ck>>2]|0;if((gE|0)==0){break}uF(53520,gE|0,32);uu(gE)}else if((gD|0)==11){lt=gv+1|0;c[13898]=lt;L1246:do{if((lt|0)<(c[8272]|0)){if((a[gw+(lt*40&-1)|0]&1)==0){b7=5127;break L27}gE=c[gw+(lt*40&-1)+36>>2]|0;gH=gw+(lt*40&-1)+32|0;gC=0;while(1){if((gC|0)>=(gE|0)){b7=872;break}gz=c[gH>>2]|0;if((a[gB+(gz+gC|0)|0]|0)==(a[gC+103664|0]|0)){gC=gC+1|0}else{lu=gz;break}}if((b7|0)==872){b7=0;if((gC|0)==1){b7=874;break}lu=c[gH>>2]|0}if((gE|0)>0){lv=0;lw=0;lx=lu}else{b7=5128;break L27}while(1){if((a[lv+144616|0]|0)==(a[gB+(lv+lx|0)|0]|0)){ly=lx;lA=lw}else{if((lv|0)!=1){lB=0;lC=0;lD=lu;break}ly=lx-1|0;lA=1}gx=lv+1|0;if((gx|0)<(lA+gE|0)){lv=gx;lw=lA;lx=ly}else{b7=880;break}}do{if((b7|0)==880){b7=0;if((lA|0)==0){if(!((lv|0)==0|(lv|0)==6)){lB=0;lC=0;lD=lu;break}}a[54144]=1;break L1246}}while(0);while(1){if((a[lB+143008|0]|0)==(a[gB+(lB+lD|0)|0]|0)){lE=lD;lF=lC}else{if((lB|0)!=1){lG=0;lH=0;lI=lu;break}lE=lD-1|0;lF=1}gH=lB+1|0;if((gH|0)<(lF+gE|0)){lB=gH;lC=lF;lD=lE}else{b7=887;break}}do{if((b7|0)==887){b7=0;if((lF|0)==0){if(!((lB|0)==0|(lB|0)==3)){lG=0;lH=0;lI=lu;break}}a[54160]=1;break L1246}}while(0);while(1){if((a[lG+141464|0]|0)==(a[gB+(lG+lI|0)|0]|0)){lJ=lI;lK=lH}else{if((lG|0)!=1){b7=5129;break L27}lJ=lI-1|0;lK=1}gH=lG+1|0;if((gH|0)<(lK+gE|0)){lG=gH;lH=lK;lI=lJ}else{break}}if((lK|0)==0){if(!((lG|0)==0|(lG|0)==3)){b7=5130;break L27}}a[54152]=1}else{b7=874}}while(0);if((b7|0)==874){b7=0;a[54144]=1}c[13898]=gv+2}else if((gD|0)==12){lL=gv+1|0;c[13898]=lL;do{if((lL|0)<(c[8272]|0)){if((a[gw+(lL*40&-1)|0]&1)==0){b7=5144;break L27}gy=c[gw+(lL*40&-1)+36>>2]|0;gE=gw+(lL*40&-1)+32|0;gH=0;while(1){if((gH|0)>=(gy|0)){b7=904;break}gC=c[gE>>2]|0;if((a[gB+(gC+gH|0)|0]|0)==(a[gH+103664|0]|0)){gH=gH+1|0}else{lM=gC;break}}if((b7|0)==904){b7=0;if((gH|0)==1){break}lM=c[gE>>2]|0}if((gy|0)>0){lN=0;lO=0;lP=lM}else{b7=5145;break L27}while(1){if((a[lN+144616|0]|0)==(a[gB+(lN+lP|0)|0]|0)){lQ=lP;lR=lO}else{if((lN|0)!=1){lS=0;lT=0;lU=lM;break}lQ=lP-1|0;lR=1}gC=lN+1|0;if((gC|0)<(lR+gy|0)){lN=gC;lO=lR;lP=lQ}else{b7=912;break}}do{if((b7|0)==912){b7=0;if((lR|0)==0){if(!((lN|0)==6|(lN|0)==0)){lS=0;lT=0;lU=lM;break}}c[13898]=gv+2;gE=is(bW)|0;gH=c[gE>>2]|0;if((gH|0)==1){lV=+(c[gE+8>>2]|0)}else if((gH|0)==2){lV=+h[gE+8>>3]}else if((gH|0)==3){lV=+uz(c[gE+8>>2]|0,0)}else{b7=918;break L27}if((c[cl>>2]|0)==3){uu(c[cm>>2]|0);c[cl>>2]=1}c[13366]=~~lV;break L44}}while(0);while(1){if((a[lS+128720|0]|0)==(a[gB+(lS+lU|0)|0]|0)){lW=lU;lX=lT}else{if((lS|0)!=2){lY=0;lZ=0;l_=lM;break}lW=lU-1|0;lX=1}gE=lS+1|0;if((gE|0)<(lX+gy|0)){lS=gE;lT=lX;lU=lW}else{b7=926;break}}do{if((b7|0)==926){b7=0;if((lX|0)==0){if(!((lS|0)==6|(lS|0)==1)){lY=0;lZ=0;l_=lM;break}}c[13898]=gv+2;c[13378]=0;break L44}}while(0);while(1){if((a[lY+128624|0]|0)==(a[gB+(lY+l_|0)|0]|0)){l$=l_;l0=lZ}else{if((lY|0)!=1){l1=0;l2=0;l3=lM;break}l$=l_-1|0;l0=1}gE=lY+1|0;if((gE|0)<(l0+gy|0)){lY=gE;lZ=l0;l_=l$}else{b7=933;break}}do{if((b7|0)==933){b7=0;if((l0|0)==0){if(!((lY|0)==11|(lY|0)==0)){l1=0;l2=0;l3=lM;break}}c[13898]=gv+2;c[13378]=1;break L44}}while(0);while(1){if((a[l1+128536|0]|0)==(a[gB+(l1+l3|0)|0]|0)){l4=l3;l5=l2}else{if((l1|0)!=1){l6=0;l7=0;l8=lM;break}l4=l3-1|0;l5=1}gE=l1+1|0;if((gE|0)<(l5+gy|0)){l1=gE;l2=l5;l3=l4}else{b7=940;break}}do{if((b7|0)==940){b7=0;if((l5|0)==0){if(!((l1|0)==7|(l1|0)==0)){l6=0;l7=0;l8=lM;break}}c[13898]=gv+2;c[13378]=2;break L44}}while(0);while(1){if((a[l6+128464|0]|0)==(a[gB+(l6+l8|0)|0]|0)){l9=l8;ma=l7}else{if((l6|0)!=2){mb=0;mc=0;md=lM;break}l9=l8-1|0;ma=1}gE=l6+1|0;if((gE|0)<(ma+gy|0)){l6=gE;l7=ma;l8=l9}else{b7=947;break}}do{if((b7|0)==947){b7=0;if((ma|0)==0){if(!((l6|0)==6|(l6|0)==1)){mb=0;mc=0;md=lM;break}}gE=gv+2|0;c[13898]=gE;gH=c[6074]|0;if((gH|0)==0){b7=951}else{if((c[gH+32>>2]|0)==0){b7=951}else{me=gE;mf=gw}}if((b7|0)==951){b7=0;uu(c[11662]|0);c[11658]=0;c[11659]=0;c[11662]=0;gE=ut(40)|0;if((gE|0)==0){gk();gH=ut(40)|0;if((gH|0)==0){b7=953;break L27}else{mg=gH}}else{mg=gE}c[11662]=mg;c[11658]=5;c[11659]=0;c[11660]=10;c[11661]=8;me=c[13898]|0;mf=c[1054]|0}gE=c[mf+(me*40&-1)+36>>2]|0;gH=c[mf+(me*40&-1)+32>>2]|0;gC=(a[mf+(me*40&-1)|0]&1)==0;L1373:do{if((gE|0)>0&(gC^1)){gx=c[10036]|0;gz=0;hS=0;hF=gH;while(1){if((a[gz+128352|0]|0)==(a[gx+(gz+hF|0)|0]|0)){mh=hF;mi=hS}else{if((gz|0)!=2){break}mh=hF-1|0;mi=1}cd=gz+1|0;if((cd|0)<(mi+gE|0)){gz=cd;hS=mi;hF=mh}else{b7=961;break}}do{if((b7|0)==961){b7=0;if((mi|0)==0){if(!((gz|0)==1|(gz|0)==8)){break}}c[13372]=2;mj=me+1|0;c[13898]=mj;if((mj|0)>=(c[8272]|0)){b7=5131;break L27}L1387:do{if((a[mf+(mj*40&-1)|0]&1)!=0){hF=c[mf+(mj*40&-1)+36>>2]|0;hS=mf+(mj*40&-1)+32|0;cd=0;while(1){if((cd|0)>=(hF|0)){break}if((a[gx+((c[hS>>2]|0)+cd|0)|0]|0)==(a[cd+103664|0]|0)){cd=cd+1|0}else{break L1387}}if((cd|0)==1){b7=5132;break L27}}}while(0);hS=is(bT)|0;hF=c[hS>>2]|0;if((hF|0)==1){mk=+(c[hS+8>>2]|0)}else if((hF|0)==2){mk=+h[hS+8>>3]}else if((hF|0)==3){mk=+uz(c[hS+8>>2]|0,0)}else{b7=974;break L27}if((c[cn>>2]|0)==3){uu(c[co>>2]|0);c[cn>>2]=1}hS=c[11662]|0;if((hS|0)==0){b7=978;break L27}hF=c[11659]|0;hp=c[11658]|0;do{if((hF|0)<(hp|0)){ml=hS;mm=hF}else{gA=(c[11660]|0)+hp|0;if((gA|0)==0){uu(hS);c[11662]=0;c[11658]=0;c[11659]=0;ml=0;mm=0;break}else{ho=db(hS,aa(c[11661]|0,gA),150384)|0;c[11662]=ho;c[11658]=gA;ml=ho;mm=c[11659]|0;break}}}while(0);hS=c[11661]|0;c[11659]=mm+1;h[ml+aa(hS,mm)>>3]=mk;hS=c[13898]|0;hp=c[8272]|0;L1409:do{if((hS|0)<(hp|0)){mn=hS;hF=hp;while(1){ho=c[1054]|0;if((a[ho+(mn*40&-1)|0]&1)==0){b7=5133;break L27}gA=c[ho+(mn*40&-1)+36>>2]|0;hG=ho+(mn*40&-1)+32|0;ho=c[10036]|0;hR=0;while(1){if((hR|0)>=(gA|0)){b7=988;break}if((a[ho+((c[hG>>2]|0)+hR|0)|0]|0)==(a[hR+103664|0]|0)){hR=hR+1|0}else{break}}if((b7|0)==988){b7=0;if((hR|0)==1){break L1409}}if((hF|0)>(mn|0)){mo=0}else{b7=5134;break L27}while(1){if((mo|0)>=(gA|0)){break}if((a[ho+((c[hG>>2]|0)+mo|0)|0]|0)==(a[mo+148464|0]|0)){mo=mo+1|0}else{b7=5135;break L27}}if((mo|0)!=1){b7=5136;break L27}c[13898]=mn+1;hG=is(bS)|0;ho=c[hG>>2]|0;if((ho|0)==1){mp=+(c[hG+8>>2]|0)}else if((ho|0)==2){mp=+h[hG+8>>3]}else if((ho|0)==3){mp=+uz(c[hG+8>>2]|0,0)}else{b7=998;break L27}if((c[cp>>2]|0)==3){uu(c[cq>>2]|0);c[cp>>2]=1}hG=c[11662]|0;if((hG|0)==0){b7=1002;break L27}ho=c[11659]|0;gA=c[11658]|0;do{if((ho|0)<(gA|0)){mq=hG;mr=ho}else{hR=(c[11660]|0)+gA|0;if((hR|0)==0){uu(hG);c[11662]=0;c[11658]=0;c[11659]=0;mq=0;mr=0;break}else{hC=db(hG,aa(c[11661]|0,hR),150384)|0;c[11662]=hC;c[11658]=hR;mq=hC;mr=c[11659]|0;break}}}while(0);hG=c[11661]|0;c[11659]=mr+1;h[mq+aa(hG,mr)>>3]=mp;hG=c[13898]|0;gA=c[8272]|0;if((hG|0)<(gA|0)){mn=hG;hF=gA}else{break}}}}while(0);c[13374]=c[11659];break L44}}while(0);if(gC){break}else{ms=0;mt=0;mu=gH}while(1){if((a[ms+127912|0]|0)==(a[gx+(ms+mu|0)|0]|0)){mv=mu;mw=mt}else{if((ms|0)!=2){mx=0;my=0;mz=gH;break}mv=mu-1|0;mw=1}gz=ms+1|0;if((gz|0)<(mw+gE|0)){ms=gz;mt=mw;mu=mv}else{b7=1014;break}}do{if((b7|0)==1014){b7=0;if((mw|0)==0){if(!((ms|0)==1|(ms|0)==11)){mx=0;my=0;mz=gH;break}}c[13372]=1;c[13898]=me+1;gz=is(bR)|0;hp=c[gz>>2]|0;if((hp|0)==1){mA=+(c[gz+8>>2]|0)}else if((hp|0)==2){mA=+h[gz+8>>3]}else if((hp|0)==3){mA=+uz(c[gz+8>>2]|0,0)}else{b7=1020;break L27}if((c[cr>>2]|0)==3){uu(c[cs>>2]|0);c[cr>>2]=1}h[c[11662]>>3]=mA;mB=c[13898]|0;if((c[8272]|0)<=(mB|0)){b7=5137;break L27}gz=c[1054]|0;if((a[gz+(mB*40&-1)|0]&1)==0){b7=5138;break L27}hp=c[gz+(mB*40&-1)+36>>2]|0;hS=gz+(mB*40&-1)+32|0;gz=c[10036]|0;hF=0;while(1){if((hF|0)>=(hp|0)){break}if((a[gz+((c[hS>>2]|0)+hF|0)|0]|0)==(a[hF+148464|0]|0)){hF=hF+1|0}else{b7=5139;break L27}}if((hF|0)!=1){b7=5140;break L27}c[13898]=mB+1;hS=is(bQ)|0;gz=c[hS>>2]|0;if((gz|0)==1){mC=+(c[hS+8>>2]|0)}else if((gz|0)==2){mC=+h[hS+8>>3]}else if((gz|0)==3){mC=+uz(c[hS+8>>2]|0,0)}else{b7=1034;break L27}if((c[ct>>2]|0)==3){uu(c[cu>>2]|0);c[ct>>2]=1}h[(c[11662]|0)+8>>3]=mC;mD=c[13898]|0;if(mC==0.0){b7=1038;break L27}if((mD|0)>=(c[8272]|0)){break L44}hS=c[1054]|0;if((a[hS+(mD*40&-1)|0]&1)==0){b7=5141;break L27}gz=c[hS+(mD*40&-1)+36>>2]|0;hp=hS+(mD*40&-1)+32|0;hS=c[10036]|0;cd=0;while(1){if((cd|0)>=(gz|0)){b7=1044;break}if((a[hS+((c[hp>>2]|0)+cd|0)|0]|0)==(a[cd+103664|0]|0)){cd=cd+1|0}else{mE=0;break}}if((b7|0)==1044){b7=0;if((cd|0)==1){break L44}else{mE=0}}while(1){if((mE|0)>=(gz|0)){break}if((a[hS+((c[hp>>2]|0)+mE|0)|0]|0)==(a[mE+148464|0]|0)){mE=mE+1|0}else{b7=5142;break L27}}if((mE|0)!=1){b7=5143;break L27}c[13898]=mD+1;c[11659]=2;hp=is(bO)|0;hS=c[hp>>2]|0;if((hS|0)==1){mF=+(c[hp+8>>2]|0)}else if((hS|0)==2){mF=+h[hp+8>>3]}else if((hS|0)==3){mF=+uz(c[hp+8>>2]|0,0)}else{b7=1053;break L27}if((c[cv>>2]|0)==3){uu(c[cw>>2]|0);c[cv>>2]=1}hp=c[11662]|0;c[13374]=~~((mF- +h[hp>>3])/+h[hp+8>>3]+1.0);break L44}}while(0);while(1){if((a[mx+127456|0]|0)==(a[gx+(mx+mz|0)|0]|0)){mG=mz;mH=my}else{if((mx|0)!=2){break L1373}mG=mz-1|0;mH=1}hp=mx+1|0;if((hp|0)<(mH+gE|0)){mx=hp;my=mH;mz=mG}else{break}}if((mH|0)==0){if(!((mx|0)==1|(mx|0)==4)){break}}c[13372]=0;hp=me+1|0;c[13898]=hp;if((hp|0)>=(c[8272]|0)){break L44}L1507:do{if((a[mf+(hp*40&-1)|0]&1)!=0){hS=c[mf+(hp*40&-1)+36>>2]|0;gz=mf+(hp*40&-1)+32|0;cd=0;while(1){if((cd|0)>=(hS|0)){break}if((a[gx+((c[gz>>2]|0)+cd|0)|0]|0)==(a[cd+103664|0]|0)){cd=cd+1|0}else{break L1507}}if((cd|0)==1){break L44}}}while(0);gx=is(bN)|0;hp=c[gx>>2]|0;if((hp|0)==1){mI=+(c[gx+8>>2]|0)}else if((hp|0)==2){mI=+h[gx+8>>3]}else if((hp|0)==3){mI=+uz(c[gx+8>>2]|0,0)}else{b7=1073;break L27}if((c[cx>>2]|0)==3){uu(c[cy>>2]|0);c[cx>>2]=1}c[13374]=~~mI;break L44}}while(0);if((c[13372]|0)==2){b7=1078;break L27}gE=is(bM)|0;gH=c[gE>>2]|0;if((gH|0)==1){mJ=+(c[gE+8>>2]|0)}else if((gH|0)==2){mJ=+h[gE+8>>3]}else if((gH|0)==3){mJ=+uz(c[gE+8>>2]|0,0)}else{b7=1083;break L27}if((c[cA>>2]|0)==3){uu(c[cC>>2]|0);c[cA>>2]=1}c[13374]=~~mJ;break L44}}while(0);while(1){if((a[mb+127152|0]|0)==(a[gB+(mb+md|0)|0]|0)){mK=md;mL=mc}else{if((mb|0)!=1){b7=5146;break L27}mK=md-1|0;mL=1}gE=mb+1|0;if((gE|0)<(mL+gy|0)){mb=gE;mc=mL;md=mK}else{break}}if((mL|0)==0){if(!((mb|0)==5|(mb|0)==0)){b7=5147;break L27}}c[13898]=gv+2;gy=is(bV)|0;gE=c[gy>>2]|0;if((gE|0)==1){mM=+(c[gy+8>>2]|0)}else if((gE|0)==2){mM=+h[gy+8>>3]}else if((gE|0)==3){mM=+uz(c[gy+8>>2]|0,0)}else{b7=1097;break L27}if((c[cD>>2]|0)==3){uu(c[cE>>2]|0);c[cD>>2]=1}gy=~~mM;if((gy-2|0)>>>0>8){b7=1101;break L27}c[13368]=gy;break L44}}while(0);c[13366]=5;c[13378]=0;c[13368]=4;c[13374]=5;c[13372]=0}else if((gD|0)==13){mN=gv+1|0;c[13898]=mN;do{if((mN|0)<(c[8272]|0)){if((a[gw+(mN*40&-1)|0]&1)==0){b7=5148;break L27}gy=c[gw+(mN*40&-1)+36>>2]|0;gE=gw+(mN*40&-1)+32|0;gH=0;while(1){if((gH|0)>=(gy|0)){b7=1109;break}gC=c[gE>>2]|0;if((a[gB+(gC+gH|0)|0]|0)==(a[gH+103664|0]|0)){gH=gH+1|0}else{mO=gC;break}}if((b7|0)==1109){b7=0;if((gH|0)==1){break}mO=c[gE>>2]|0}if((gy|0)>0){mP=0;mQ=0;mR=mO}else{b7=5149;break L27}while(1){if((a[mP+129472|0]|0)==(a[gB+(mP+mR|0)|0]|0)){mS=mR;mT=mQ}else{if((mP|0)!=2){mU=0;mV=0;mW=mO;b7=1120;break}mS=mR-1|0;mT=1}gC=mP+1|0;if((gC|0)<(mT+gy|0)){mP=gC;mQ=mT;mR=mS}else{b7=1117;break}}do{if((b7|0)==1117){b7=0;if((mT|0)==0){if(!((mP|0)==1|(mP|0)==4)){mU=0;mV=0;mW=mO;b7=1120;break}}c[11690]=1}}while(0);L1574:do{if((b7|0)==1120){while(1){b7=0;if((a[mU+129312|0]|0)==(a[gB+(mU+mW|0)|0]|0)){mX=mW;mY=mV}else{if((mU|0)!=1){mZ=0;m_=0;m$=mO;break}mX=mW-1|0;mY=1}gE=mU+1|0;if((gE|0)<(mY+gy|0)){mU=gE;mV=mY;mW=mX;b7=1120}else{b7=1124;break}}do{if((b7|0)==1124){b7=0;if((mY|0)==0){if(!((mU|0)==0|(mU|0)==7)){mZ=0;m_=0;m$=mO;break}}c[11690]=2;break L1574}}while(0);while(1){if((a[mZ+129032|0]|0)==(a[gB+(mZ+m$|0)|0]|0)){m0=m$;m1=m_}else{if((mZ|0)!=2){b7=5150;break L27}m0=m$-1|0;m1=1}gE=mZ+1|0;if((gE|0)<(m1+gy|0)){mZ=gE;m_=m1;m$=m0}else{break}}if((m1|0)==0){if(!((mZ|0)==1|(mZ|0)==4)){b7=5151;break L27}}c[11690]=3}}while(0);c[13898]=gv+2;break L44}}while(0);c[11690]=1}else if((gD|0)==17){gy=c[11732]|0;gE=c[11756]|0;gH=c[11734]|0;m2=+h[5865];m3=+h[5864];c[11752]=0;a[47016]=0;gC=gv+1|0;c[13898]=gC;gG=c[8272]|0;L1599:do{if((gC|0)<(gG|0)){gx=gy;hp=gE;gz=gH;m4=m2;m5=m3;hS=0;hF=gC;gA=gG;hG=gw;while(1){ho=(a[hG+(hF*40&-1)|0]&1)==0;hC=c[hG+(hF*40&-1)+36>>2]|0;L1602:do{if(ho){m6=c[10036]|0;m7=hG+(hF*40&-1)+32|0}else{hR=hG+(hF*40&-1)+32|0;hw=c[10036]|0;gF=0;while(1){if((gF|0)>=(hC|0)){break}if((a[hw+((c[hR>>2]|0)+gF|0)|0]|0)==(a[gF+103664|0]|0)){gF=gF+1|0}else{m6=hw;m7=hR;break L1602}}if((gF|0)==1){m8=gx;m9=hp;na=gz;nb=m4;nc=m5;break L1599}else{m6=hw;m7=hR}}}while(0);hB=c[m7>>2]|0;hK=(hC|0)>0;nd=46944;ne=103784;L1610:while(1){L1612:do{if(!ho){if(hK){nf=0;ng=0;nh=hB;while(1){ni=a[ne+nf|0]|0;if(ni<<24>>24==(a[m6+(nf+nh|0)|0]|0)){nj=nh;nk=ng}else{if(ni<<24>>24!=36){break L1612}nj=nh-1|0;nk=1}nl=nf+1|0;if((nl|0)<(nk+hC|0)){nf=nl;ng=nk;nh=nj}else{break}}if((nk|0)==0){nm=nl}else{nn=nd;break L1610}}else{nm=0}nh=a[ne+nm|0]|0;if((nh<<24>>24|0)==36|(nh<<24>>24|0)==0){nn=nd;break L1610}}}while(0);hR=nd+8|0;hw=c[hR>>2]|0;if((hw|0)==0){nn=hR;break}else{nd=hR;ne=hw}}ne=c[nn+4>>2]|0;L1625:do{if((ne|0)==8){no=hF;b7=1210}else{c[11752]=ne;nd=hF+1|0;c[13898]=nd;if((ne|0)==1){if((nd|0)>=(gA|0)){np=hS;nq=m5;nr=m4;ns=gz;nt=hp;nu=gx;break}L1630:do{if((a[hG+(nd*40&-1)|0]&1)!=0){hC=c[hG+(nd*40&-1)+36>>2]|0;hB=hG+(nd*40&-1)+32|0;hK=0;while(1){if((hK|0)>=(hC|0)){break}if((a[m6+((c[hB>>2]|0)+hK|0)|0]|0)==(a[hK+103664|0]|0)){hK=hK+1|0}else{break L1630}}if((hK|0)==1){np=hS;nq=m5;nr=m4;ns=gz;nt=hp;nu=gx;break L1625}}}while(0);hB=is(bL)|0;hC=c[hB>>2]|0;if((hC|0)==1){nv=+(c[hB+8>>2]|0)}else if((hC|0)==2){nv=+h[hB+8>>3]}else if((hC|0)==3){nv=+uz(c[hB+8>>2]|0,0)}else{b7=1165;break L27}if((c[cL>>2]|0)==3){uu(c[cM>>2]|0);c[cL>>2]=1}np=hS;nq=m5;nr=m4;ns=~~nv;nt=hp;nu=gx;break}else if((ne|0)==2){np=hS;nq=m5;nr=m4;ns=gz;nt=hp;nu=gx;break}else if(!((ne|0)==3|(ne|0)==5|(ne|0)==4|(ne|0)==6|(ne|0)==7)){no=nd;b7=1210;break}L1646:do{if((nd|0)<(gA|0)){if((a[hG+(nd*40&-1)|0]&1)==0){nw=nd;break}hB=c[hG+(nd*40&-1)+36>>2]|0;hC=hG+(nd*40&-1)+32|0;ho=0;while(1){if((ho|0)>=(hB|0)){b7=1174;break}if((a[m6+((c[hC>>2]|0)+ho|0)|0]|0)==(a[ho+103664|0]|0)){ho=ho+1|0}else{b7=1175;break}}if((b7|0)==1174){b7=0;if(!((ho|0)!=1&(hB|0)>0)){nw=nd;break}}else if((b7|0)==1175){b7=0;if((hB|0)<=0){nw=nd;break}}hK=0;hw=0;hR=c[hC>>2]|0;while(1){if((a[hK+130016|0]|0)==(a[m6+(hK+hR|0)|0]|0)){nx=hR;ny=hw}else{if((hK|0)!=5){nw=nd;break L1646}nx=hR-1|0;ny=1}gF=hK+1|0;if((gF|0)<(ny+hB|0)){hK=gF;hw=ny;hR=nx}else{break}}if((ny|0)==0){if(!((hK|0)==4|(hK|0)==10)){nw=nd;break}}a[47016]=1;hR=hF+2|0;c[13898]=hR;nw=hR}else{nw=nd}}while(0);if((nw|0)>=(gA|0)){np=hS;nq=m5;nr=m4;ns=gz;nt=hp;nu=gx;break}L1668:do{if((a[hG+(nw*40&-1)|0]&1)!=0){nd=c[hG+(nw*40&-1)+36>>2]|0;hR=hG+(nw*40&-1)+32|0;hw=0;while(1){if((hw|0)>=(nd|0)){break}if((a[m6+((c[hR>>2]|0)+hw|0)|0]|0)==(a[hw+103664|0]|0)){hw=hw+1|0}else{break L1668}}if((hw|0)==1){np=hS;nq=m5;nr=m4;ns=gz;nt=hp;nu=gx;break L1625}}}while(0);hR=is(bK)|0;nd=c[hR>>2]|0;if((nd|0)==1){nz=+(c[hR+8>>2]|0)}else if((nd|0)==2){nz=+h[hR+8>>3]}else if((nd|0)==3){nz=+uz(c[hR+8>>2]|0,0)}else{b7=1194;break L27}if((c[cN>>2]|0)==3){uu(c[cO>>2]|0);c[cN>>2]=1}hR=c[13898]|0;if((c[8272]|0)<=(hR|0)){np=hS;nq=nz;nr=nz;ns=gz;nt=hp;nu=gx;break}nd=c[1054]|0;if((a[nd+(hR*40&-1)|0]&1)==0){np=hS;nq=nz;nr=nz;ns=gz;nt=hp;nu=gx;break}hK=c[nd+(hR*40&-1)+36>>2]|0;hB=nd+(hR*40&-1)+32|0;nd=c[10036]|0;hC=0;while(1){if((hC|0)>=(hK|0)){break}if((a[nd+((c[hB>>2]|0)+hC|0)|0]|0)==(a[hC+148464|0]|0)){hC=hC+1|0}else{np=hS;nq=nz;nr=nz;ns=gz;nt=hp;nu=gx;break L1625}}if((hC|0)!=1){np=hS;nq=nz;nr=nz;ns=gz;nt=hp;nu=gx;break}c[13898]=hR+1;hB=is(bJ)|0;nd=c[hB>>2]|0;if((nd|0)==1){nA=+(c[hB+8>>2]|0)}else if((nd|0)==2){nA=+h[hB+8>>3]}else if((nd|0)==3){nA=+uz(c[hB+8>>2]|0,0)}else{b7=1207;break L27}if((c[cP>>2]|0)!=3){np=hS;nq=nA;nr=nz;ns=gz;nt=hp;nu=gx;break}uu(c[cQ>>2]|0);c[cP>>2]=1;np=hS;nq=nA;nr=nz;ns=gz;nt=hp;nu=gx}}while(0);L1696:do{if((b7|0)==1210){b7=0;L1698:do{if((gA|0)>(no|0)){if((a[hG+(no*40&-1)|0]&1)==0){break}ne=c[hG+(no*40&-1)+36>>2]|0;hB=hG+(no*40&-1)+32|0;nd=0;while(1){if((nd|0)>=(ne|0)){break}if((a[m6+((c[hB>>2]|0)+nd|0)|0]|0)==(a[nd+148464|0]|0)){nd=nd+1|0}else{break L1698}}if((nd|0)!=1){break}c[13898]=no+1;np=hS+1|0;nq=m5;nr=m4;ns=gz;nt=hp;nu=gx;break L1696}}while(0);if((hS|0)==0){hR=is(bI)|0;hC=c[hR>>2]|0;if((hC|0)==1){nB=+(c[hR+8>>2]|0)}else if((hC|0)==2){nB=+h[hR+8>>3]}else if((hC|0)==3){nB=+uz(c[hR+8>>2]|0,0)}else{b7=1224;break L27}if((c[cF>>2]|0)==3){uu(c[cG>>2]|0);c[cF>>2]=1}hR=~~nB;np=0;nq=m5;nr=m4;ns=gz;nt=hR;nu=hR;break}else if((hS|0)==1){hR=is(bH)|0;hC=c[hR>>2]|0;if((hC|0)==1){nC=+(c[hR+8>>2]|0)}else if((hC|0)==2){nC=+h[hR+8>>3]}else if((hC|0)==3){nC=+uz(c[hR+8>>2]|0,0)}else{b7=1232;break L27}if((c[cH>>2]|0)==3){uu(c[cI>>2]|0);c[cH>>2]=1}np=1;nq=m5;nr=m4;ns=gz;nt=~~nC;nu=gx;break}else if((hS|0)==2){hR=is(bG)|0;hC=c[hR>>2]|0;if((hC|0)==1){nD=+(c[hR+8>>2]|0)}else if((hC|0)==2){nD=+h[hR+8>>3]}else if((hC|0)==3){nD=+uz(c[hR+8>>2]|0,0)}else{b7=1240;break L27}if((c[cJ>>2]|0)==3){uu(c[cK>>2]|0);c[cJ>>2]=1}np=2;nq=m5;nr=m4;ns=~~nD;nt=hp;nu=gx;break}else{b7=1244;break L27}}}while(0);hR=c[13898]|0;hC=c[8272]|0;if((hR|0)>=(hC|0)){m8=nu;m9=nt;na=ns;nb=nr;nc=nq;break L1599}gx=nu;hp=nt;gz=ns;m4=nr;m5=nq;hS=np;hF=hR;gA=hC;hG=c[1054]|0}}else{m8=gy;m9=gE;na=gH;nb=m2;nc=m3}}while(0);if((m8-2|0)>>>0>998){b7=5152;break L27}if((m9-2|0)>>>0>998){b7=5153;break L27}if((c[11752]|0)==0){c[11752]=1}if(nb<0.0|nc<0.0){b7=1251;break L27}c[11732]=m8;c[11756]=m9;c[11734]=na;h[5865]=nb;h[5864]=nc;a[47032]=1}else if((gD|0)==20){c[13898]=gv+1;uu(c[12886]|0);c[12886]=0;nE=c[13898]|0;gH=c[8272]|0;L1745:do{if((nE|0)<(gH|0)){gE=c[1054]|0;L1747:do{if((a[gE+(nE*40&-1)|0]&1)!=0){gy=c[gE+(nE*40&-1)+36>>2]|0;gG=gE+(nE*40&-1)+32|0;gC=c[10036]|0;hG=0;while(1){if((hG|0)>=(gy|0)){b7=1258;break}if((a[gC+((c[gG>>2]|0)+hG|0)|0]|0)==(a[hG+103664|0]|0)){hG=hG+1|0}else{nF=0;break}}if((b7|0)==1258){b7=0;if((hG|0)==1){break L1745}else{nF=0}}while(1){if((nF|0)>=(gy|0)){b7=1265;break}if((a[gC+((c[gG>>2]|0)+nF|0)|0]|0)==(a[nF+132080|0]|0)){nF=nF+1|0}else{nG=0;break}}do{if((b7|0)==1265){b7=0;if((nF|0)!=6){nG=0;break}hG=nE+1|0;c[13898]=hG;L1760:do{if((hG|0)<(gH|0)){L1762:do{if((a[gE+(hG*40&-1)|0]&1)!=0){gA=c[gE+(hG*40&-1)+36>>2]|0;hF=gE+(hG*40&-1)+32|0;hS=0;while(1){if((hS|0)>=(gA|0)){break}if((a[gC+((c[hF>>2]|0)+hS|0)|0]|0)==(a[hS+103664|0]|0)){hS=hS+1|0}else{break L1762}}if((hS|0)==1){b7=1275;break L1760}}}while(0);a[14176]=1;is(bD);a[14176]=0;if((c[cU>>2]|0)==3){nd=c[cV>>2]|0;if((nd|0)==0){b7=1275;break}else{nH=nd;break}}else{c[13898]=hG;b7=1275;break}}else{b7=1275}}while(0);do{if((b7|0)==1275){b7=0;hG=bA(4,179864)|0;if((hG|0)!=0){nd=bP(hG|0)|0;if((nd|0)!=0){nH=nd;break}}nd=bU(130448)|0;if((nd|0)!=0){hG=bP(nd|0)|0;if((hG|0)!=0){nH=hG;break}}hG=bU(130352)|0;if((hG|0)!=0){nd=bP(hG|0)|0;if((nd|0)!=0){nH=nd;break}}nd=bU(130304)|0;if((nd|0)==0){nH=0;break}nH=bP(nd|0)|0}}while(0);if((bA(4,((nH|0)!=0?nH:179864)|0)|0)==0){b7=1284;break L27}nd=c[b$()>>2]|0;if((nd|0)==0){nI=0}else{nI=bP(nd|0)|0}c[12886]=nI;nd=c[m>>2]|0;cf(nd|0,130136,(v=i,i=i+8|0,c[v>>2]=nI,v)|0);uu(c[8270]|0);c[8270]=nH;bA(4,139696);break L44}}while(0);while(1){if((nG|0)>=(gy|0)){break}if((a[gC+((c[gG>>2]|0)+nG|0)|0]|0)==(a[nG+103664|0]|0)){nG=nG+1|0}else{break L1747}}if((nG|0)==1){b7=1293;break L27}}}while(0);a[14176]=1;is(bE);a[14176]=0;if((c[cR>>2]|0)!=3){b7=1292;break L27}gE=c[cT>>2]|0;c[12886]=gE;if((gE|0)==0){b7=1295;break L27}else{break L44}}}while(0);gH=c[8270]|0;do{if((gH|0)==0){nJ=0}else{if((aY(gH|0,139696)|0)==0){nJ=gH;break}bA(4,139696);nJ=c[8270]|0}}while(0);uu(nJ);c[8270]=0}else if((gD|0)==18){nK=gv+1|0;c[13898]=nK;gH=c[8272]|0;if((nK|0)>=(gH|0)){b7=5156;break L27}L1802:do{if((a[gw+(nK*40&-1)|0]&1)==0){nL=gw+(nK*40&-1)+32|0;nM=gw+(nK*40&-1)+36|0;b7=1308}else{gE=gw+(nK*40&-1)+36|0;gG=c[gE>>2]|0;gC=gw+(nK*40&-1)+32|0;gy=0;while(1){if((gy|0)>=(gG|0)){b7=1303;break}if((a[gB+((c[gC>>2]|0)+gy|0)|0]|0)==(a[gy+103664|0]|0)){gy=gy+1|0}else{nN=0;break}}if((b7|0)==1303){b7=0;if((gy|0)==1){b7=5157;break L27}else{nN=0}}while(1){if((nN|0)>=(gG|0)){break}if((a[gB+((c[gC>>2]|0)+nN|0)|0]|0)==(a[nN+148464|0]|0)){nN=nN+1|0}else{nL=gC;nM=gE;b7=1308;break L1802}}if((nN|0)==1){nO=nK}else{nL=gC;nM=gE;b7=1308}}}while(0);if((b7|0)==1308){b7=0;gG=gv+2|0;c[13898]=gG;gy=c[nM>>2]|0;nd=(gy|0)>49?49:gy;gy=c[nL>>2]|0;hG=0;while(1){hF=hG+1|0;a[hG+24544|0]=a[gB+gy|0]|0;if((hF|0)==(nd|0)){break}else{gy=gy+1|0;hG=hF}}a[nd+24544|0]=0;nO=gG}if((nO|0)>=(gH|0)){break}if((a[gw+(nO*40&-1)|0]&1)==0){break}hG=c[gw+(nO*40&-1)+36>>2]|0;gy=gw+(nO*40&-1)+32|0;hF=0;while(1){if((hF|0)>=(hG|0)){b7=1316;break}if((a[gB+((c[gy>>2]|0)+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{nP=0;break}}if((b7|0)==1316){b7=0;if((hF|0)==1){break}else{nP=0}}while(1){if((nP|0)>=(hG|0)){break}if((a[gB+((c[gy>>2]|0)+nP|0)|0]|0)==(a[nP+148464|0]|0)){nP=nP+1|0}else{break L44}}if((nP|0)!=1){break}nQ=nO+1|0;c[13898]=nQ;if((nQ|0)>=(gH|0)){b7=5158;break L27}L1833:do{if((a[gw+(nQ*40&-1)|0]&1)==0){nR=gw+(nQ*40&-1)+32|0;nS=gw+(nQ*40&-1)+36|0}else{gy=gw+(nQ*40&-1)+36|0;hG=c[gy>>2]|0;hF=gw+(nQ*40&-1)+32|0;gG=0;while(1){if((gG|0)>=(hG|0)){break}if((a[gB+((c[hF>>2]|0)+gG|0)|0]|0)==(a[gG+103664|0]|0)){gG=gG+1|0}else{nR=hF;nS=gy;break L1833}}if((gG|0)==1){b7=5159;break L27}else{nR=hF;nS=gy}}}while(0);c[13898]=nO+2;gH=c[nS>>2]|0;hG=(gH|0)>49?49:gH;gH=c[nR>>2]|0;gE=0;while(1){gC=gE+1|0;a[gE+24595|0]=a[gB+gH|0]|0;if((gC|0)==(hG|0)){break}else{gH=gH+1|0;gE=gC}}a[hG+24595|0]=0}else if((gD|0)==19){nT=gv+1|0;c[13898]=nT;L1845:do{if((nT|0)<(c[8272]|0)){gE=(a[gw+(nT*40&-1)|0]&1)==0;gH=c[gw+(nT*40&-1)+36>>2]|0;gC=gw+(nT*40&-1)+32|0;L1847:do{if(!gE){nd=0;while(1){if((nd|0)>=(gH|0)){b7=1335;break}if((a[gB+((c[gC>>2]|0)+nd|0)|0]|0)==(a[nd+103664|0]|0)){nd=nd+1|0}else{nU=0;break}}if((b7|0)==1335){b7=0;if((nd|0)==1){b7=1336;break L1845}else{nU=0}}while(1){if((nU|0)>=(gH|0)){break}if((a[gB+((c[gC>>2]|0)+nU|0)|0]|0)==(a[nU+132080|0]|0)){nU=nU+1|0}else{break L1847}}if((nU|0)!=6){break}nd=bA(2,179864)|0;gA=(nd|0)==0;L1858:do{if(!gA){if((aQ(nd|0,131976)|0)==0){if((aQ(nd|0,131752)|0)!=0){b7=1343}}else{b7=1343}if((b7|0)==1343){b7=0;c[11252]=15}do{if((aQ(nd|0,200432)|0)==0){if((aQ(nd|0,131528)|0)!=0){break}if((aQ(nd|0,131448)|0)==0){break L1858}}}while(0);c[11252]=14}}while(0);c[13898]=(c[13898]|0)+1;a[cW]=a[25160]|0;a[cW+1|0]=a[25161|0]|0;a[cW+2|0]=a[25162|0]|0;c[by>>2]=3;c[bz>>2]=8;c[bB>>2]=cW;c[bC>>2]=48904;if(gA){break L1845}nd=cB(0)|0;if((nd|0)==0){break L44}if((aY(nd|0,171384)|0)==0){uB(48904,cW|0);break L44}gz=bi(nd|0,171384)|0;if((gz|0)==-1){uh(-1,131096,(v=i,i=i+8|0,c[v>>2]=nd,v)|0);break L44}if((aG(gz|0,bB|0,by|0,bC|0,bz|0)|0)==-1){uh(-1,130952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}cz(gz|0);break L44}}while(0);gy=c[gC>>2]|0;hF=(gH|0)>0;gG=24408;gz=184456;L1882:while(1){L1884:do{if(!gE){if(hF){nd=0;hp=0;gx=gy;while(1){hC=a[gz+nd|0]|0;if(hC<<24>>24==(a[gB+(nd+gx|0)|0]|0)){nV=gx;nW=hp}else{if(hC<<24>>24!=36){break L1884}nV=gx-1|0;nW=1}nX=nd+1|0;if((nX|0)<(nW+gH|0)){nd=nX;hp=nW;gx=nV}else{break}}if((nW|0)==0){nY=nX}else{nZ=gG;break L1882}}else{nY=0}gx=a[gz+nY|0]|0;if((gx<<24>>24|0)==36|(gx<<24>>24|0)==0){nZ=gG;break L1882}}}while(0);gA=gG+8|0;gx=c[gA>>2]|0;if((gx|0)==0){nZ=gA;break}else{gG=gA;gz=gx}}gz=c[nZ+4>>2]|0;if((gz|0)==16){b7=1360;break L27}c[11252]=gz;c[13898]=gv+2;a[cW]=a[25160]|0;a[cW+1|0]=a[25161|0]|0;a[cW+2|0]=a[25162|0]|0;c[by>>2]=3;c[bz>>2]=8;c[bB>>2]=cW;c[bC>>2]=48904}else{b7=1336}}while(0);if((b7|0)==1336){b7=0;c[11252]=0;a[cW]=a[25160]|0;a[cW+1|0]=a[25161|0]|0;a[cW+2|0]=a[25162|0]|0;c[by>>2]=3;c[bz>>2]=8;c[bB>>2]=cW;c[bC>>2]=48904}hG=48904;c[hG>>2]=0;c[hG+4>>2]=0;hG=c[11252]|0;if((hG|0)==15){a[48904]=-62;a[48905]=-80;break}else if((hG|0)==12|(hG|0)==13){a[48904]=-100;break}else if((hG|0)==5|(hG|0)==6|(hG|0)==7){a[48904]=-8;break}else if((hG|0)==14|(hG|0)==8){break}else{a[48904]=-80;break}}else if((gD|0)==21){hG=gv+1|0;c[13898]=hG;gz=c[8272]|0;if((hG|0)<(gz|0)){n_=hG;n$=gz;n0=gw}else{break}while(1){gz=c[n0+(n_*40&-1)+36>>2]|0;hG=n0+(n_*40&-1)+32|0;if((a[n0+(n_*40&-1)|0]&1)==0){b7=5162;break L27}gG=c[10036]|0;gH=0;while(1){if((gH|0)>=(gz|0)){b7=1380;break}gy=c[hG>>2]|0;if((a[gG+(gy+gH|0)|0]|0)==(a[gH+103664|0]|0)){gH=gH+1|0}else{n1=gy;break}}if((b7|0)==1380){b7=0;if((gH|0)==1){break L44}n1=c[hG>>2]|0}L1917:do{if((gz|0)>0){gy=0;hF=0;gE=n1;while(1){if((a[gy+132904|0]|0)==(a[gG+(gy+gE|0)|0]|0)){n2=gE;n3=hF}else{if((gy|0)!=3){n4=0;n5=0;n6=n1;break}n2=gE-1|0;n3=1}gC=gy+1|0;if((gC|0)<(n3+gz|0)){gy=gC;hF=n3;gE=n2}else{b7=1387;break}}do{if((b7|0)==1387){b7=0;if((n3|0)==0){if(!((gy|0)==7|(gy|0)==2)){n4=0;n5=0;n6=n1;break}}n7=n_+1|0;c[13898]=n7;L1929:do{if((n7|0)<(n$|0)){L1931:do{if((a[n0+(n7*40&-1)|0]&1)!=0){gE=c[n0+(n7*40&-1)+36>>2]|0;hF=n0+(n7*40&-1)+32|0;gC=0;while(1){if((gC|0)>=(gE|0)){b7=1394;break}if((a[gG+((c[hF>>2]|0)+gC|0)|0]|0)==(a[gC+103664|0]|0)){gC=gC+1|0}else{n8=0;break}}if((b7|0)==1394){b7=0;if((gC|0)==1){break L1929}else{n8=0}}while(1){if((n8|0)>=(gE|0)){break}if((a[gG+((c[hF>>2]|0)+n8|0)|0]|0)==(a[n8+103664|0]|0)){n8=n8+1|0}else{break L1931}}if((n8|0)==1){b7=1403;break L27}}}while(0);a[14176]=1;is(bw);a[14176]=0;if((c[cX>>2]|0)!=3){b7=1402;break L27}hF=c[cY>>2]|0;c[10568]=hF;if((hF|0)==0){b7=1405;break L27}else{break L1917}}}while(0);hF=c[10568]|0;if((hF|0)!=0){uu(hF)}c[10568]=0;break L1917}}while(0);while(1){if((a[n4+132632|0]|0)==(a[gG+(n4+n6|0)|0]|0)){n9=n6;oa=n5}else{if((n4|0)!=3){ob=0;oc=0;od=n1;break}n9=n6-1|0;oa=1}gy=n4+1|0;if((gy|0)<(oa+gz|0)){n4=gy;n5=oa;n6=n9}else{b7=1411;break}}do{if((b7|0)==1411){b7=0;if((oa|0)==0){if(!((n4|0)==2|(n4|0)==14)){ob=0;oc=0;od=n1;break}}a[42568]=1;c[13898]=n_+1;break L1917}}while(0);while(1){if((a[ob+132544|0]|0)==(a[gG+(ob+od|0)|0]|0)){oe=od;of=oc}else{if((ob|0)!=5){b7=1423;break L1917}oe=od-1|0;of=1}gy=ob+1|0;if((gy|0)<(of+gz|0)){ob=gy;oc=of;od=oe}else{break}}if((of|0)==0){if(!((ob|0)==4|(ob|0)==16)){b7=1423;break}}a[42568]=0;c[13898]=n_+1}else{b7=1423}}while(0);L1969:do{if((b7|0)==1423){b7=0;if((n$|0)>(n_|0)){og=0}else{b7=5163;break L27}while(1){if((og|0)>=(gz|0)){b7=1426;break}if((a[gG+(og+n1|0)|0]|0)==(a[og+132432|0]|0)){og=og+1|0}else{oh=0;break}}do{if((b7|0)==1426){b7=0;if((og|0)!=5){oh=0;break}a[42560]=1;c[13898]=n_+1;break L1969}}while(0);while(1){if((oh|0)>=(gz|0)){break}if((a[gG+(oh+n1|0)|0]|0)==(a[oh+132304|0]|0)){oh=oh+1|0}else{b7=5164;break L27}}if((oh|0)!=7){b7=5165;break L27}a[42560]=0;c[13898]=n_+1}}while(0);gG=c[13898]|0;gz=c[8272]|0;if((gG|0)>=(gz|0)){break L44}n_=gG;n$=gz;n0=c[1054]|0}}else if((gD|0)==22){gz=gv+1|0;c[13898]=gz;gG=c[8272]|0;L1985:do{if((gz|0)<(gG|0)){hG=a[gw+(gz*40&-1)|0]|0;L1987:do{if((hG&1)==0){oi=0;oj=gz;ok=gG;ol=gw;om=hG}else{gH=c[gw+(gz*40&-1)+36>>2]|0;gy=gw+(gz*40&-1)+32|0;hF=0;while(1){if((hF|0)>=(gH|0)){break}if((a[gB+((c[gy>>2]|0)+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{oi=0;oj=gz;ok=gG;ol=gw;om=hG;break L1987}}if((hF|0)==1){break L1985}else{oi=0;oj=gz;ok=gG;ol=gw;om=hG}}}while(0);L1993:while(1){hG=(om&1)==0;L1995:do{if(!hG){gy=c[ol+(oj*40&-1)+36>>2]|0;gH=ol+(oj*40&-1)+32|0;gE=c[10036]|0;gC=0;while(1){if((gC|0)>=(gy|0)){break}if((a[gE+((c[gH>>2]|0)+gC|0)|0]|0)==(a[gC+103664|0]|0)){gC=gC+1|0}else{break L1995}}if((gC|0)==1){on=oi;break L1993}}}while(0);if((oj|0)>=(ok|0)){b7=1453;break L27}L2003:do{if(!hG){hF=c[ol+(oj*40&-1)+36>>2]|0;gH=ol+(oj*40&-1)+32|0;gE=c[10036]|0;gy=0;while(1){if((gy|0)>=(hF|0)){break}if((a[gE+((c[gH>>2]|0)+gy|0)|0]|0)==(a[gy+103664|0]|0)){gy=gy+1|0}else{break L2003}}if((gy|0)==1){b7=1453;break L27}}}while(0);a[14176]=1;is(bu);a[14176]=0;if((c[cZ>>2]|0)!=3){b7=1452;break L27}hG=c[c_>>2]|0;c[bv>>2]=hG;if((hG|0)==0){b7=1462;break L27}if((oi|0)==0){oo=0}else{oo=uA(oi|0)|0}iQ(bv);hG=c[bv>>2]|0;gH=db(oi,(oo+2|0)+(uA(hG|0)|0)|0,140552)|0;if((oo|0)==0){uB(gH|0,hG|0)}else{gE=gH+oo|0;hF=gH+(oo+1|0)|0;uB(hF|0,hG|0);a[gE]=58}uu(hG);hG=c[13898]|0;gE=c[8272]|0;if((hG|0)>=(gE|0)){on=gH;break}hF=c[1054]|0;oi=gH;oj=hG;ok=gE;ol=hF;om=a[hF+(hG*40&-1)|0]|0}if((on|0)==0){break L44}ur(4,on);uu(on);break L44}}while(0);ur(32,0)}else if((gD|0)==23){jp()}else if((gD|0)==24){gG=gv+1|0;c[13898]=gG;gz=c[8272]|0;if((gG|0)<(gz|0)){hG=0;hF=gG;gG=gz;gz=gw;L2026:while(1){gE=(a[gz+(hF*40&-1)|0]&1)==0;gH=c[gz+(hF*40&-1)+36>>2]|0;gC=gz+(hF*40&-1)+32|0;L2028:do{if(gE){op=c[gC>>2]|0;b7=1704}else{hS=c[10036]|0;gx=0;while(1){if((gx|0)>=(gH|0)){b7=1473;break}gA=c[gC>>2]|0;if((a[hS+(gA+gx|0)|0]|0)==(a[gx+103664|0]|0)){gx=gx+1|0}else{oq=gA;break}}if((b7|0)==1473){b7=0;if((gx|0)==1){or=hG;break L2026}oq=c[gC>>2]|0}if((gH|0)>0){os=0;ot=0;ou=oq}else{op=oq;b7=1704;break}while(1){gA=os+2|0;if((a[gA+136104|0]|0)==(a[hS+(os+ou|0)|0]|0)){ov=ou;ow=ot}else{if((gA|0)!=3){ox=0;oy=0;oz=oq;break}ov=ou-1|0;ow=1}gA=os+1|0;if((gA|0)<(ow+gH|0)){os=gA;ot=ow;ou=ov}else{b7=1480;break}}do{if((b7|0)==1480){b7=0;if((ow|0)==0){if(!((os|0)==0|(os|0)==5)){ox=0;oy=0;oz=oq;break}}a[66412]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[ox+136104|0]|0)==(a[hS+(ox+oz|0)|0]|0)){oC=oz;oD=oy}else{if((ox|0)!=3){oE=0;oF=0;oG=oq;break}oC=oz-1|0;oD=1}gx=ox+1|0;if((gx|0)<(oD+gH|0)){ox=gx;oy=oD;oz=oC}else{b7=1487;break}}do{if((b7|0)==1487){b7=0;if((oD|0)==0){if(!((ox|0)==2|(ox|0)==7)){oE=0;oF=0;oG=oq;break}}a[66412]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=oE+2|0;if((a[gx+135864|0]|0)==(a[hS+(oE+oG|0)|0]|0)){oH=oG;oI=oF}else{if((gx|0)!=3){oJ=0;oK=0;oL=oq;break}oH=oG-1|0;oI=1}gx=oE+1|0;if((gx|0)<(oI+gH|0)){oE=gx;oF=oI;oG=oH}else{b7=1496;break}}do{if((b7|0)==1496){b7=0;if((oI|0)==0){if(!((oE|0)==0|(oE|0)==5)){oJ=0;oK=0;oL=oq;break}}a[65724]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[oJ+135864|0]|0)==(a[hS+(oJ+oL|0)|0]|0)){oM=oL;oN=oK}else{if((oJ|0)!=3){oO=0;oP=0;oQ=oq;break}oM=oL-1|0;oN=1}gx=oJ+1|0;if((gx|0)<(oN+gH|0)){oJ=gx;oK=oN;oL=oM}else{b7=1503;break}}do{if((b7|0)==1503){b7=0;if((oN|0)==0){if(!((oJ|0)==2|(oJ|0)==7)){oO=0;oP=0;oQ=oq;break}}a[65724]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=oO+2|0;if((a[gx+135680|0]|0)==(a[hS+(oO+oQ|0)|0]|0)){oR=oQ;oS=oP}else{if((gx|0)!=3){oT=0;oU=0;oV=oq;break}oR=oQ-1|0;oS=1}gx=oO+1|0;if((gx|0)<(oS+gH|0)){oO=gx;oP=oS;oQ=oR}else{b7=1510;break}}do{if((b7|0)==1510){b7=0;if((oS|0)==0){if(!((oO|0)==0|(oO|0)==5)){oT=0;oU=0;oV=oq;break}}a[65036]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[oT+135680|0]|0)==(a[hS+(oT+oV|0)|0]|0)){oW=oV;oX=oU}else{if((oT|0)!=3){oY=0;oZ=0;o_=oq;break}oW=oV-1|0;oX=1}gx=oT+1|0;if((gx|0)<(oX+gH|0)){oT=gx;oU=oX;oV=oW}else{b7=1517;break}}do{if((b7|0)==1517){b7=0;if((oX|0)==0){if(!((oT|0)==2|(oT|0)==7)){oY=0;oZ=0;o_=oq;break}}a[65036]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=oY+2|0;if((a[gx+135568|0]|0)==(a[hS+(oY+o_|0)|0]|0)){o$=o_;o0=oZ}else{if((gx|0)!=4){o1=0;o2=0;o3=oq;break}o$=o_-1|0;o0=1}gx=oY+1|0;if((gx|0)<(o0+gH|0)){oY=gx;oZ=o0;o_=o$}else{b7=1524;break}}do{if((b7|0)==1524){b7=0;if((o0|0)==0){if(!((oY|0)==1|(oY|0)==6)){o1=0;o2=0;o3=oq;break}}a[69164]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[o1+135568|0]|0)==(a[hS+(o1+o3|0)|0]|0)){o4=o3;o5=o2}else{if((o1|0)!=4){o6=0;o7=0;o8=oq;break}o4=o3-1|0;o5=1}gx=o1+1|0;if((gx|0)<(o5+gH|0)){o1=gx;o2=o5;o3=o4}else{b7=1531;break}}do{if((b7|0)==1531){b7=0;if((o5|0)==0){if(!((o1|0)==3|(o1|0)==8)){o6=0;o7=0;o8=oq;break}}a[69164]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=o6+2|0;if((a[gx+135376|0]|0)==(a[hS+(o6+o8|0)|0]|0)){o9=o8;pa=o7}else{if((gx|0)!=4){pb=0;pc=0;pd=oq;break}o9=o8-1|0;pa=1}gx=o6+1|0;if((gx|0)<(pa+gH|0)){o6=gx;o7=pa;o8=o9}else{b7=1538;break}}do{if((b7|0)==1538){b7=0;if((pa|0)==0){if(!((o6|0)==1|(o6|0)==6)){pb=0;pc=0;pd=oq;break}}a[68476]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[pb+135376|0]|0)==(a[hS+(pb+pd|0)|0]|0)){pe=pd;pf=pc}else{if((pb|0)!=4){pg=0;ph=0;pi=oq;break}pe=pd-1|0;pf=1}gx=pb+1|0;if((gx|0)<(pf+gH|0)){pb=gx;pc=pf;pd=pe}else{b7=1545;break}}do{if((b7|0)==1545){b7=0;if((pf|0)==0){if(!((pb|0)==3|(pb|0)==8)){pg=0;ph=0;pi=oq;break}}a[68476]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=pg+2|0;if((a[gx+135216|0]|0)==(a[hS+(pg+pi|0)|0]|0)){pj=pi;pk=ph}else{if((gx|0)!=4){pl=0;pm=0;pn=oq;break}pj=pi-1|0;pk=1}gx=pg+1|0;if((gx|0)<(pk+gH|0)){pg=gx;ph=pk;pi=pj}else{b7=1552;break}}do{if((b7|0)==1552){b7=0;if((pk|0)==0){if(!((pg|0)==1|(pg|0)==6)){pl=0;pm=0;pn=oq;break}}a[66413]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[pl+135216|0]|0)==(a[hS+(pl+pn|0)|0]|0)){po=pn;pp=pm}else{if((pl|0)!=4){pq=0;pr=0;ps=oq;break}po=pn-1|0;pp=1}gx=pl+1|0;if((gx|0)<(pp+gH|0)){pl=gx;pm=pp;pn=po}else{b7=1559;break}}do{if((b7|0)==1559){b7=0;if((pp|0)==0){if(!((pl|0)==3|(pl|0)==8)){pq=0;pr=0;ps=oq;break}}a[66413]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=pq+2|0;if((a[gx+135104|0]|0)==(a[hS+(pq+ps|0)|0]|0)){pt=ps;pu=pr}else{if((gx|0)!=4){pv=0;pw=0;px=oq;break}pt=ps-1|0;pu=1}gx=pq+1|0;if((gx|0)<(pu+gH|0)){pq=gx;pr=pu;ps=pt}else{b7=1566;break}}do{if((b7|0)==1566){b7=0;if((pu|0)==0){if(!((pq|0)==1|(pq|0)==6)){pv=0;pw=0;px=oq;break}}a[65725]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[pv+135104|0]|0)==(a[hS+(pv+px|0)|0]|0)){py=px;pz=pw}else{if((pv|0)!=4){pA=0;pB=0;pC=oq;break}py=px-1|0;pz=1}gx=pv+1|0;if((gx|0)<(pz+gH|0)){pv=gx;pw=pz;px=py}else{b7=1573;break}}do{if((b7|0)==1573){b7=0;if((pz|0)==0){if(!((pv|0)==3|(pv|0)==8)){pA=0;pB=0;pC=oq;break}}a[65725]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=pA+2|0;if((a[gx+134880|0]|0)==(a[hS+(pA+pC|0)|0]|0)){pD=pC;pE=pB}else{if((gx|0)!=4){pF=0;pG=0;pH=oq;break}pD=pC-1|0;pE=1}gx=pA+1|0;if((gx|0)<(pE+gH|0)){pA=gx;pB=pE;pC=pD}else{b7=1580;break}}do{if((b7|0)==1580){b7=0;if((pE|0)==0){if(!((pA|0)==1|(pA|0)==6)){pF=0;pG=0;pH=oq;break}}a[65037]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[pF+134880|0]|0)==(a[hS+(pF+pH|0)|0]|0)){pI=pH;pJ=pG}else{if((pF|0)!=4){pK=0;pL=0;pM=oq;break}pI=pH-1|0;pJ=1}gx=pF+1|0;if((gx|0)<(pJ+gH|0)){pF=gx;pG=pJ;pH=pI}else{b7=1587;break}}do{if((b7|0)==1587){b7=0;if((pJ|0)==0){if(!((pF|0)==3|(pF|0)==8)){pK=0;pL=0;pM=oq;break}}a[65037]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=pK+2|0;if((a[gx+134728|0]|0)==(a[hS+(pK+pM|0)|0]|0)){pN=pM;pO=pL}else{if((gx|0)!=5){pP=0;pQ=0;pR=oq;break}pN=pM-1|0;pO=1}gx=pK+1|0;if((gx|0)<(pO+gH|0)){pK=gx;pL=pO;pM=pN}else{b7=1594;break}}do{if((b7|0)==1594){b7=0;if((pO|0)==0){if(!((pK|0)==2|(pK|0)==7)){pP=0;pQ=0;pR=oq;break}}a[69165]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[pP+134728|0]|0)==(a[hS+(pP+pR|0)|0]|0)){pS=pR;pT=pQ}else{if((pP|0)!=5){pU=0;pV=0;pW=oq;break}pS=pR-1|0;pT=1}gx=pP+1|0;if((gx|0)<(pT+gH|0)){pP=gx;pQ=pT;pR=pS}else{b7=1601;break}}do{if((b7|0)==1601){b7=0;if((pT|0)==0){if(!((pP|0)==4|(pP|0)==9)){pU=0;pV=0;pW=oq;break}}a[69165]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=pU+2|0;if((a[gx+134600|0]|0)==(a[hS+(pU+pW|0)|0]|0)){pX=pW;pY=pV}else{if((gx|0)!=5){pZ=0;p_=0;p$=oq;break}pX=pW-1|0;pY=1}gx=pU+1|0;if((gx|0)<(pY+gH|0)){pU=gx;pV=pY;pW=pX}else{b7=1608;break}}do{if((b7|0)==1608){b7=0;if((pY|0)==0){if(!((pU|0)==2|(pU|0)==7)){pZ=0;p_=0;p$=oq;break}}a[68477]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[pZ+134600|0]|0)==(a[hS+(pZ+p$|0)|0]|0)){p0=p$;p1=p_}else{if((pZ|0)!=5){p2=0;p3=0;p4=oq;break}p0=p$-1|0;p1=1}gx=pZ+1|0;if((gx|0)<(p1+gH|0)){pZ=gx;p_=p1;p$=p0}else{b7=1615;break}}do{if((b7|0)==1615){b7=0;if((p1|0)==0){if(!((pZ|0)==4|(pZ|0)==9)){p2=0;p3=0;p4=oq;break}}a[68477]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=p2+2|0;if((a[gx+134488|0]|0)==(a[hS+(p2+p4|0)|0]|0)){p5=p4;p6=p3}else{if((gx|0)!=4){p7=0;p8=0;p9=oq;break}p5=p4-1|0;p6=1}gx=p2+1|0;if((gx|0)<(p6+gH|0)){p2=gx;p3=p6;p4=p5}else{b7=1622;break}}do{if((b7|0)==1622){b7=0;if((p6|0)==0){if(!((p2|0)==1|(p2|0)==6)){p7=0;p8=0;p9=oq;break}}a[67100]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[p7+134488|0]|0)==(a[hS+(p7+p9|0)|0]|0)){qa=p9;qb=p8}else{if((p7|0)!=4){qc=0;qd=0;qe=oq;break}qa=p9-1|0;qb=1}gx=p7+1|0;if((gx|0)<(qb+gH|0)){p7=gx;p8=qb;p9=qa}else{b7=1629;break}}do{if((b7|0)==1629){b7=0;if((qb|0)==0){if(!((p7|0)==3|(p7|0)==8)){qc=0;qd=0;qe=oq;break}}a[67100]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=qc+2|0;if((a[gx+134320|0]|0)==(a[hS+(qc+qe|0)|0]|0)){qf=qe;qg=qd}else{if((gx|0)!=5){qh=0;qi=0;qj=oq;break}qf=qe-1|0;qg=1}gx=qc+1|0;if((gx|0)<(qg+gH|0)){qc=gx;qd=qg;qe=qf}else{b7=1636;break}}do{if((b7|0)==1636){b7=0;if((qg|0)==0){if(!((qc|0)==2|(qc|0)==7)){qh=0;qi=0;qj=oq;break}}a[67101]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[qh+134320|0]|0)==(a[hS+(qh+qj|0)|0]|0)){qk=qj;ql=qi}else{if((qh|0)!=5){qm=0;qn=0;qo=oq;break}qk=qj-1|0;ql=1}gx=qh+1|0;if((gx|0)<(ql+gH|0)){qh=gx;qi=ql;qj=qk}else{b7=1643;break}}do{if((b7|0)==1643){b7=0;if((ql|0)==0){if(!((qh|0)==4|(qh|0)==9)){qm=0;qn=0;qo=oq;break}}a[67101]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){gx=qm+2|0;if((a[gx+134136|0]|0)==(a[hS+(qm+qo|0)|0]|0)){qp=qo;qq=qn}else{if((gx|0)!=3){qr=0;qs=0;qt=oq;break}qp=qo-1|0;qq=1}gx=qm+1|0;if((gx|0)<(qq+gH|0)){qm=gx;qn=qq;qo=qp}else{b7=1650;break}}do{if((b7|0)==1650){b7=0;if((qq|0)==0){if(!((qm|0)==0|(qm|0)==5)){qr=0;qs=0;qt=oq;break}}a[69852]=1;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[qr+134136|0]|0)==(a[hS+(qr+qt|0)|0]|0)){qu=qt;qv=qs}else{if((qr|0)!=3){qw=0;qx=0;qy=oq;break}qu=qt-1|0;qv=1}gx=qr+1|0;if((gx|0)<(qv+gH|0)){qr=gx;qs=qv;qt=qu}else{b7=1657;break}}do{if((b7|0)==1657){b7=0;if((qv|0)==0){if(!((qr|0)==2|(qr|0)==7)){qw=0;qx=0;qy=oq;break}}a[69852]=0;gx=hF+1|0;c[13898]=gx;oA=1;oB=gx;break L2028}}while(0);while(1){if((a[qw+133984|0]|0)==(a[hS+(qw+qy|0)|0]|0)){qz=qy;qA=qx}else{if((qw|0)!=2){qB=0;qC=0;qD=oq;break}qz=qy-1|0;qA=1}gx=qw+1|0;if((gx|0)<(qA+gH|0)){qw=gx;qx=qA;qy=qz}else{b7=1664;break}}do{if((b7|0)==1664){b7=0;if((qA|0)==0){if((qw|0)==1|(qw|0)==5){qE=0}else{qB=0;qC=0;qD=oq;break}}else{qE=0}while(1){if(qE>>>0>=8){b7=1669;break}if((a[65036+(qE*688&-1)|0]&1)!=0){break}if((a[65037+(qE*688&-1)|0]&1)==0){qE=qE+1|0}else{break}}if((b7|0)==1669){b7=0;a[69852]=1}h[3815]=.5235987755982988;gy=hF+1|0;c[13898]=gy;L2341:do{if((a[gz+(gy*40&-1)|0]&1)!=0){gx=c[10810]|0;if((gx|0)==0){oA=hG;oB=gy;break L2028}gA=(gG|0)>(gy|0);hp=gz+(gy*40&-1)+36|0;nd=gz+(gy*40&-1)+32|0;hC=gx;L2344:while(1){hR=c[hC+4>>2]|0;L2346:do{if(gA){hB=c[hp>>2]|0;ne=0;while(1){if((ne|0)>=(hB|0)){break}if((a[hS+((c[nd>>2]|0)+ne|0)|0]|0)==(a[hR+ne|0]|0)){ne=ne+1|0}else{break L2346}}if((a[hR+ne|0]|0)==0){b7=1678;break L2344}}}while(0);hR=c[hC>>2]|0;if((hR|0)==0){qF=gx;break}else{hC=hR}}do{if((b7|0)==1678){b7=0;if((a[hC+8|0]&1)!=0){qF=gx;break}if((c[hC+16>>2]|0)==1){break L2341}else{qF=gx}}}while(0);L2356:while(1){gx=c[qF+4>>2]|0;L2358:do{if(gA){hC=c[hp>>2]|0;hR=0;while(1){if((hR|0)>=(hC|0)){break}if((a[hS+((c[nd>>2]|0)+hR|0)|0]|0)==(a[gx+hR|0]|0)){hR=hR+1|0}else{break L2358}}if((a[gx+hR|0]|0)==0){break L2356}}}while(0);gx=c[qF>>2]|0;if((gx|0)==0){oA=hG;oB=gy;break L2028}else{qF=gx}}if((a[qF+8|0]&1)!=0){oA=hG;oB=gy;break L2028}if((c[qF+16>>2]|0)!=2){oA=hG;oB=gy;break L2028}}}while(0);m3=+h[9040];gy=is(bt)|0;nd=c[gy>>2]|0;if((nd|0)==1){qG=+(c[gy+8>>2]|0)}else if((nd|0)==2){qG=+h[gy+8>>3]}else if((nd|0)==3){qG=+uz(c[gy+8>>2]|0,0)}else{b7=1693;break L27}if((c[c$>>2]|0)==3){uu(c[c0>>2]|0);c[c$>>2]=1}h[3815]=m3*qG;oA=hG;oB=c[13898]|0;break L2028}}while(0);while(1){if((a[qB+133840|0]|0)==(a[hS+(qB+qD|0)|0]|0)){qH=qD;qI=qC}else{if((qB|0)!=4){op=oq;b7=1704;break L2028}qH=qD-1|0;qI=1}gy=qB+1|0;if((gy|0)<(qI+gH|0)){qB=gy;qC=qI;qD=qH}else{break}}if((qI|0)==0){if(!((qB|0)==3|(qB|0)==7)){op=oq;b7=1704;break}}h[3815]=0.0;hS=hF+1|0;c[13898]=hS;oA=hG;oB=hS}}while(0);L2386:do{if((b7|0)==1704){b7=0;L2388:do{if((gG|0)>(hF|0)){if(gE){break}gC=c[10036]|0;hS=0;while(1){if((hS|0)>=(gH|0)){b7=1709;break}if((a[gC+(hS+op|0)|0]|0)==(a[hS+150704|0]|0)){hS=hS+1|0}else{qJ=0;break}}do{if((b7|0)==1709){b7=0;if((hS|0)!=4){qJ=0;break}c[10026]=0;gy=hF+1|0;c[13898]=gy;oA=hG;oB=gy;break L2386}}while(0);while(1){if((qJ|0)>=(gH|0)){break}if((a[gC+(qJ+op|0)|0]|0)==(a[qJ+150856|0]|0)){qJ=qJ+1|0}else{b7=1715;break L2388}}if((qJ|0)!=5){b7=1715;break}c[10026]=1;gC=hF+1|0;c[13898]=gC;oA=hG;oB=gC;break L2386}else{b7=1715}}while(0);L2402:do{if((b7|0)==1715){b7=0;if(!((gH|0)>0&(gE^1))){break}gC=c[10036]|0;hS=0;gy=0;nd=op;while(1){if((a[hS+133704|0]|0)==(a[gC+(hS+nd|0)|0]|0)){qK=nd;qL=gy}else{if((hS|0)!=6){break L2402}qK=nd-1|0;qL=1}hp=hS+1|0;if((hp|0)<(qL+gH|0)){hS=hp;gy=qL;nd=qK}else{break}}if((qL|0)==0){if(!((hS|0)==5|(hS|0)==12)){break}}c[10026]=-1;nd=hF+1|0;c[13898]=nd;oA=hG;oB=nd;break L2386}}while(0);hH(40048,1,0);nd=c[13898]|0;L2416:do{if((c[8272]|0)>(nd|0)){gy=c[1054]|0;if((a[gy+(nd*40&-1)|0]&1)==0){b7=1731;break}gC=c[gy+(nd*40&-1)+36>>2]|0;hp=gy+(nd*40&-1)+32|0;gy=c[10036]|0;gA=0;while(1){if((gA|0)>=(gC|0)){break}if((a[gy+((c[hp>>2]|0)+gA|0)|0]|0)==(a[gA+148464|0]|0)){gA=gA+1|0}else{b7=1731;break L2416}}if((gA|0)!=1){b7=1731;break}c[13898]=nd+1;hH(34776,1,0);qM=c[13898]|0}else{b7=1731}}while(0);do{if((b7|0)==1731){b7=0;if((hF|0)==(nd|0)){qM=hF;break}c[8694]=c[10012];c[8695]=c[10013];c[8696]=c[10014];c[8697]=c[10015];c[8698]=c[10016];c[8699]=c[10017];c[8700]=c[10018];c[8701]=c[10019];c[8702]=c[10020];c[8703]=c[10021];c[8704]=c[10022];c[8705]=c[10023];c[8706]=c[10024];c[8707]=c[10025];qM=nd}}while(0);if((hF|0)==(qM|0)){or=hG;break L2026}else{oA=hG;oB=qM}}}while(0);gH=c[8272]|0;if((oB|0)>=(gH|0)){or=oA;break}hG=oA;hF=oB;gG=gH;gz=c[1054]|0}if(or){break}else{qN=0}}else{qN=0}while(1){if(qN>>>0>=8){break}if((a[65036+(qN*688&-1)|0]&1)!=0){break L44}if((a[65037+(qN*688&-1)|0]&1)==0){qN=qN+1|0}else{break L44}}if((a[30528]&1)==0){a[66412]=1;a[65724]=1;break}else{a[69852]=1;break}}else if((gD|0)==25){c[13898]=gv+1;gr();a[38984]=1}else if((gD|0)==26){b7=1742;break L27}else if((gD|0)==27){c[13898]=gv+1;gz=is(bs)|0;gG=c[gz>>2]|0;if((gG|0)==1){qO=+(c[gz+8>>2]|0)}else if((gG|0)==2){qO=+h[gz+8>>3]}else if((gG|0)==3){qO=+uz(c[gz+8>>2]|0,0)}else{b7=1747;break L27}if((c[c1>>2]|0)==3){uu(c[c2>>2]|0);c[c1>>2]=1}gz=~~qO;gG=(gz|0)>-1?gz:-gz|0;qP=c[13898]|0;do{if((qP|0)<(c[8272]|0)){gz=c[1054]|0;if((a[gz+(qP*40&-1)|0]&1)==0){b7=5168;break L27}hF=c[gz+(qP*40&-1)+36>>2]|0;hG=gz+(qP*40&-1)+32|0;gz=c[10036]|0;gH=0;while(1){if((gH|0)>=(hF|0)){b7=1755;break}if((a[gz+((c[hG>>2]|0)+gH|0)|0]|0)==(a[gH+103664|0]|0)){gH=gH+1|0}else{qQ=0;break}}if((b7|0)==1755){b7=0;if((gH|0)==1){qR=gG;break}else{qQ=0}}while(1){if((qQ|0)>=(hF|0)){break}if((a[gz+((c[hG>>2]|0)+qQ|0)|0]|0)==(a[qQ+148464|0]|0)){qQ=qQ+1|0}else{b7=5169;break L27}}if((qQ|0)!=1){b7=5170;break L27}c[13898]=qP+1;hG=is(br)|0;gz=c[hG>>2]|0;if((gz|0)==1){qS=+(c[hG+8>>2]|0)}else if((gz|0)==2){qS=+h[hG+8>>3]}else if((gz|0)==3){qS=+uz(c[hG+8>>2]|0,0)}else{b7=1764;break L27}if((c[c3>>2]|0)==3){uu(c[c4>>2]|0);c[c3>>2]=1}hG=~~qS;qR=(hG|0)>-1?hG:-hG|0}else{qR=gG}}while(0);if((gG|0)<2|(qR|0)<2){b7=1769;break L27}hG=c[10814]|0;gz=c[10828]|0;c[10814]=0;c[10828]=0;iO(hG);iY(gz);c[9344]=gG;c[9342]=qR}else if((gD|0)==28){gz=gv+1|0;c[13898]=gz;a[36120]=1;hG=c[8272]|0;L2473:do{if((gz|0)<(hG|0)){hF=0;gH=0;gE=0;nd=0;qT=gz;hp=hG;gy=gw;while(1){gC=(a[gy+(qT*40&-1)|0]&1)==0;hS=c[gy+(qT*40&-1)+36>>2]|0;L2476:do{if(gC){qU=c[10036]|0;qV=gy+(qT*40&-1)+32|0}else{gx=gy+(qT*40&-1)+32|0;hC=c[10036]|0;ne=0;while(1){if((ne|0)>=(hS|0)){break}if((a[hC+((c[gx>>2]|0)+ne|0)|0]|0)==(a[ne+103664|0]|0)){ne=ne+1|0}else{qU=hC;qV=gx;break L2476}}if((ne|0)==1){qW=gE;qX=nd;break L2473}else{qU=hC;qV=gx}}}while(0);gA=c[qV>>2]|0;hB=(hS|0)>0;hw=23912;hK=184456;L2484:while(1){L2486:do{if(!gC){if(hB){ho=0;gF=0;nh=gA;while(1){ng=a[hK+ho|0]|0;if(ng<<24>>24==(a[qU+(ho+nh|0)|0]|0)){qY=nh;qZ=gF}else{if(ng<<24>>24!=36){break L2486}qY=nh-1|0;qZ=1}q_=ho+1|0;if((q_|0)<(qZ+hS|0)){ho=q_;gF=qZ;nh=qY}else{break}}if((qZ|0)==0){q$=q_}else{q0=hw;break L2484}}else{q$=0}nh=a[hK+q$|0]|0;if((nh<<24>>24|0)==36|(nh<<24>>24|0)==0){q0=hw;break L2484}}}while(0);gx=hw+8|0;hC=c[gx>>2]|0;if((hC|0)==0){q0=gx;break}else{hw=gx;hK=hC}}hK=c[q0+4>>2]|0;L2499:do{if((hK|0)==40){a[36120]=1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==41){a[36120]=0;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==39){uu(c[9329]|0);uD(36120,26456,1240);q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==1){if(nd){uh(qT,137664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9044]=0;q1=1;q2=gE;q3=gH;q4=hF}else if((hK|0)==2){if(nd){uh(qT,137664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9044]=2;q1=1;q2=gE;q3=gH;q4=hF}else if((hK|0)==3){if(gE){uh(qT,137552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9045]=0;q1=nd;q2=1;q3=gH;q4=hF}else if((hK|0)==4){if(gE){uh(qT,137552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9045]=2;q1=nd;q2=1;q3=gH;q4=hF}else if((hK|0)==5){if(!nd){c[9044]=1}if(!gE){c[9045]=1}hw=nd|gE;q1=hw;q2=hw;q3=gH;q4=hF}else if((hK|0)==6){if(hF){uh(qT,137256,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9047]=0;q1=nd;q2=gE;q3=gH;q4=1}else if((hK|0)==7){if(hF){uh(qT,137256,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9047]=1;q1=nd;q2=gE;q3=gH;q4=1}else if((hK|0)==8){if(!gH){b7=1817;break}uh(qT,137376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);b7=1817}else if((hK|0)==13){b7=1817}else if((hK|0)==9){if(!gH){b7=1824;break}uh(qT,137376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);b7=1824}else if((hK|0)==14){b7=1824}else if((hK|0)==11){if(gH){uh(qT,137376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9031]=0;q1=nd;q2=gE;q3=1;q4=hF}else if((hK|0)==12){if(gH){uh(qT,137376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9031]=1;q1=nd;q2=gE;q3=1;q4=hF}else if((hK|0)==15){if(gH){uh(qT,137376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9031]=2;c[9032]=0;q1=nd;q2=gE;q3=1;q4=hF}else if((hK|0)==16){if(gH){uh(qT,137376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9031]=2;c[9032]=1;q1=nd;q2=gE;q3=1;q4=hF}else if((hK|0)==17){if(gH){uh(qT,137376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9031]=2;c[9032]=2;q1=nd;q2=gE;q3=1;q4=hF}else if((hK|0)==18){if(gH){uh(qT,137376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[9031]=2;c[9032]=3;q1=nd;q2=gE;q3=1;q4=hF}else if((hK|0)==19){c[9046]=0;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==20){c[9046]=1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==21){a[36229]=1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==22){a[36229]=0;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==23){a[36230]=1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==24){a[36230]=0;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==25){a[36231]=1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==26){a[36231]=0;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==27){hw=qT+1|0;c[13898]=hw;c[9059]=-2;L2571:do{if((hw|0)<(hp|0)){L2573:do{if((a[gy+(hw*40&-1)|0]&1)!=0){hS=c[gy+(hw*40&-1)+36>>2]|0;gA=gy+(hw*40&-1)+32|0;hB=0;while(1){if((hB|0)>=(hS|0)){break}if((a[qU+((c[gA>>2]|0)+hB|0)|0]|0)==(a[hB+103664|0]|0)){hB=hB+1|0}else{break L2573}}if((hB|0)==1){q5=hw;break L2571}}}while(0);hH(36232,1,0);gA=c[13898]|0;if((hw|0)!=(gA|0)){q5=gA;break}if((a[(c[1054]|0)+(hw*40&-1)|0]&1)!=0){q5=hw;break}gA=is(bp)|0;hS=c[gA>>2]|0;if((hS|0)==1){q6=+(c[gA+8>>2]|0)}else if((hS|0)==2){q6=+h[gA+8>>3]}else if((hS|0)==3){q6=+uz(c[gA+8>>2]|0,0)}else{b7=1867;break L27}if((c[c6>>2]|0)==3){uu(c[c7>>2]|0);c[c6>>2]=1}c[9059]=~~q6-1;gA=(c[13898]|0)+1|0;c[13898]=gA;q5=gA}else{q5=hw}}while(0);c[13898]=q5-1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==28){c[9059]=-3;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==29){c[13898]=qT+1;hw=is(bo)|0;gA=c[hw>>2]|0;if((gA|0)==1){q7=+(c[hw+8>>2]|0)}else if((gA|0)==2){q7=+h[hw+8>>3]}else if((gA|0)==3){q7=+uz(c[hw+8>>2]|0,0)}else{b7=1877;break L27}if((c[c8>>2]|0)==3){uu(c[c9>>2]|0);c[c8>>2]=1}h[4524]=q7;c[13898]=(c[13898]|0)-1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==30){c[13898]=qT+1;hw=is(bn)|0;gA=c[hw>>2]|0;if((gA|0)==1){q8=+(c[hw+8>>2]|0)}else if((gA|0)==2){q8=+h[hw+8>>3]}else if((gA|0)==3){q8=+uz(c[hw+8>>2]|0,0)}else{b7=1885;break L27}if((c[da>>2]|0)==3){uu(c[dc>>2]|0);c[da>>2]=1}h[4525]=q8<0.0?0.0:q8;c[13898]=(c[13898]|0)-1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==31){c[13898]=qT+1;hw=is(bm)|0;gA=c[hw>>2]|0;if((gA|0)==1){q9=+(c[hw+8>>2]|0)}else if((gA|0)==2){q9=+h[hw+8>>3]}else if((gA|0)==3){q9=+uz(c[hw+8>>2]|0,0)}else{b7=1893;break L27}if((c[dd>>2]|0)==3){uu(c[de>>2]|0);c[dd>>2]=1}h[4526]=q9;c[13898]=(c[13898]|0)-1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==32){c[13898]=qT+1;hw=is(bl)|0;gA=c[hw>>2]|0;if((gA|0)==1){ra=+(c[hw+8>>2]|0)}else if((gA|0)==2){ra=+h[hw+8>>3]}else if((gA|0)==3){ra=+uz(c[hw+8>>2]|0,0)}else{b7=1901;break L27}if((c[df>>2]|0)==3){uu(c[dg>>2]|0);c[df>>2]=1}h[4527]=ra;c[13898]=(c[13898]|0)-1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==37){hw=qT+1|0;c[13898]=hw;gA=c[gy+(hw*40&-1)+36>>2]|0;L2629:do{if((a[gy+(hw*40&-1)|0]&1)!=0&(gA|0)>0){hS=0;gC=0;hC=c[gy+(hw*40&-1)+32>>2]|0;while(1){if((a[hS+137208|0]|0)==(a[qU+(hS+hC|0)|0]|0)){rb=hC;rc=gC}else{if((hS|0)!=3){break L2629}rb=hC-1|0;rc=1}gx=hS+1|0;if((gx|0)<(rc+gA|0)){hS=gx;gC=rc;hC=rb}else{break}}if((rc|0)==0){if(!((hS|0)==2|(hS|0)==12)){break}}c[9056]=2;q1=nd;q2=gE;q3=gH;q4=hF;break L2499}}while(0);c[9056]=1;c[13898]=qT;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==38){c[9056]=0;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==33){gA=qT+1|0;c[13898]=gA;L2644:do{if((gA|0)<(hp|0)){L2646:do{if((a[gy+(gA*40&-1)|0]&1)!=0){hw=c[gy+(gA*40&-1)+36>>2]|0;hC=gy+(gA*40&-1)+32|0;gC=0;while(1){if((gC|0)>=(hw|0)){break}if((a[qU+((c[hC>>2]|0)+gC|0)|0]|0)==(a[gC+103664|0]|0)){gC=gC+1|0}else{break L2646}}if((gC|0)==1){b7=1926;break L2644}}}while(0);a[14176]=1;is(bk);a[14176]=0;if((c[dh>>2]|0)!=3){c[13898]=gA;b7=1926;break}hS=c[di>>2]|0;if((hS|0)==0){b7=1926;break}uF(36288,hS|0,1025);uu(hS)}else{b7=1926}}while(0);if((b7|0)==1926){b7=0;a[36288]=0}c[13898]=(c[13898]|0)-1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==34){a[36288]=0;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==35){rd=qT+1|0;c[13898]=rd;gA=(a[gy+(rd*40&-1)|0]&1)==0;if(gA){b7=1931}else{hS=a[qU+(c[gy+(rd*40&-1)+32>>2]|0)|0]|0;if(!((hS<<24>>24|0)==39|(hS<<24>>24|0)==34)){b7=1931}}if((b7|0)==1931){b7=0;hS=c[10810]|0;if((hS|0)==0){b7=5171;break L27}hC=gy+(rd*40&-1)+36|0;hw=gy+(rd*40&-1)+32|0;hB=(hp|0)<=(rd|0)|gA;gA=hS;L2667:while(1){hS=c[gA+4>>2]|0;L2669:do{if(!hB){gx=c[hC>>2]|0;ne=0;while(1){if((ne|0)>=(gx|0)){break}if((a[qU+((c[hw>>2]|0)+ne|0)|0]|0)==(a[hS+ne|0]|0)){ne=ne+1|0}else{break L2669}}if((a[hS+ne|0]|0)==0){break L2667}}}while(0);hS=c[gA>>2]|0;if((hS|0)==0){b7=5173;break L27}else{gA=hS}}if((a[gA+8|0]&1)!=0){b7=5172;break L27}if((c[gA+16>>2]|0)!=3){b7=5174;break L27}}uu(c[9329]|0);hw=c[13898]|0;L2679:do{if((hw|0)<(c[8272]|0)){hC=c[1054]|0;L2681:do{if((a[hC+(hw*40&-1)|0]&1)!=0){hB=c[hC+(hw*40&-1)+36>>2]|0;hS=hC+(hw*40&-1)+32|0;gx=c[10036]|0;gC=0;while(1){if((gC|0)>=(hB|0)){break}if((a[gx+((c[hS>>2]|0)+gC|0)|0]|0)==(a[gC+103664|0]|0)){gC=gC+1|0}else{break L2681}}if((gC|0)==1){re=0;rf=hw;break L2679}}}while(0);a[14176]=1;is(bj);a[14176]=0;if((c[dj>>2]|0)==3){re=c[dk>>2]|0;rf=c[13898]|0;break}else{c[13898]=hw;re=0;rf=hw;break}}else{re=0;rf=hw}}while(0);c[9329]=re;c[13898]=rf-1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==36){uE(c5|0,0,16);hI(bq,7);do{if((c[dm>>2]|0)==3){if(+h[dn>>3]!=-1.0){break}c[dm>>2]=7}}while(0);c[9330]=c[c5>>2];c[37324>>2]=c[c5+4>>2];c[37328>>2]=c[c5+8>>2];c[37332>>2]=c[c5+12>>2];c[13898]=(c[13898]|0)-1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==42){hw=qT+1|0;c[13898]=hw;L2698:do{if((hw|0)<(hp|0)){L2700:do{if((a[gy+(hw*40&-1)|0]&1)!=0){gA=c[gy+(hw*40&-1)+36>>2]|0;hC=gy+(hw*40&-1)+32|0;hS=0;while(1){if((hS|0)>=(gA|0)){b7=1961;break}if((a[qU+((c[hC>>2]|0)+hS|0)|0]|0)==(a[hS+103664|0]|0)){hS=hS+1|0}else{break}}if((b7|0)==1961){b7=0;if((hS|0)==1){rg=0;rh=hw;break L2698}}if((gA|0)<=0){break}gC=0;gx=0;hB=c[hC>>2]|0;while(1){if((a[gC+137072|0]|0)==(a[qU+(gC+hB|0)|0]|0)){ri=hB;rj=gx}else{if((gC|0)!=1){break L2700}ri=hB-1|0;rj=1}ne=gC+1|0;if((ne|0)<(rj+gA|0)){gC=ne;gx=rj;hB=ri}else{break}}if((rj|0)!=0){rg=0;rh=hw;break L2698}if((gC|0)==0|(gC|0)==9){rg=0;rh=hw;break L2698}}}while(0);hB=is(bh)|0;gx=c[hB>>2]|0;if((gx|0)==1){rk=+(c[hB+8>>2]|0)}else if((gx|0)==2){rk=+h[hB+8>>3]}else if((gx|0)==3){rk=+uz(c[hB+8>>2]|0,0)}else{b7=1974;break L27}if((c[dp>>2]|0)==3){uu(c[dq>>2]|0);c[dp>>2]=1}rg=~~rk;rh=c[13898]|0}else{rg=0;rh=hw}}while(0);c[9338]=(rg|0)<0?0:rg;c[13898]=rh-1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==43){hw=qT+1|0;c[13898]=hw;L2728:do{if((hw|0)<(hp|0)){L2730:do{if((a[gy+(hw*40&-1)|0]&1)!=0){hB=c[gy+(hw*40&-1)+36>>2]|0;gx=gy+(hw*40&-1)+32|0;gA=0;while(1){if((gA|0)>=(hB|0)){b7=1984;break}if((a[qU+((c[gx>>2]|0)+gA|0)|0]|0)==(a[gA+103664|0]|0)){gA=gA+1|0}else{break}}if((b7|0)==1984){b7=0;if((gA|0)==1){rl=0;rm=hw;break L2728}}if((hB|0)<=0){break}gC=0;hC=0;hS=c[gx>>2]|0;while(1){if((a[gC+137072|0]|0)==(a[qU+(gC+hS|0)|0]|0)){rn=hS;ro=hC}else{if((gC|0)!=1){break L2730}rn=hS-1|0;ro=1}ne=gC+1|0;if((ne|0)<(ro+hB|0)){gC=ne;hC=ro;hS=rn}else{break}}if((ro|0)!=0){rl=0;rm=hw;break L2728}if((gC|0)==0|(gC|0)==9){rl=0;rm=hw;break L2728}}}while(0);hS=is(bg)|0;hC=c[hS>>2]|0;if((hC|0)==1){rp=+(c[hS+8>>2]|0)}else if((hC|0)==2){rp=+h[hS+8>>3]}else if((hC|0)==3){rp=+uz(c[hS+8>>2]|0,0)}else{b7=1997;break L27}if((c[dr>>2]|0)==3){uu(c[ds>>2]|0);c[dr>>2]=1}rl=~~rp;rm=c[13898]|0}else{rl=0;rm=hw}}while(0);c[9339]=(rl|0)<0?0:rl;c[13898]=rm-1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==44){a[36228]=1;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==45){a[36228]=0;q1=nd;q2=gE;q3=gH;q4=hF}else if((hK|0)==10){hw=qT+1|0;c[13898]=hw;if(gH){uh(hw,137376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}dl(36136,0);c[9031]=3;c[13898]=(c[13898]|0)-1;q1=nd;q2=gE;q3=1;q4=hF}else{b7=2007;break L27}}while(0);if((b7|0)==1817){b7=0;if(!gE){c[9045]=1}if(!hF){c[9047]=1}c[9031]=2;c[9032]=0;q1=nd;q2=gE;q3=1;q4=hF}else if((b7|0)==1824){b7=0;if(!gE){c[9045]=1}if(!hF){c[9047]=1}c[9031]=2;c[9032]=1;q1=nd;q2=gE;q3=1;q4=hF}hK=(c[13898]|0)+1|0;c[13898]=hK;hw=c[8272]|0;if((hK|0)>=(hw|0)){qW=q2;qX=q1;break L2473}hF=q4;gH=q3;gE=q2;nd=q1;qT=hK;hp=hw;gy=c[1054]|0}}else{qW=0;qX=0}}while(0);hG=c[9031]|0;if((hG|0)==2){gz=c[9032]|0;if(qX&gz>>>0<2){uh(-1,136464,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);break}if(!qW){break}if((gz-2|0)>>>0>=2){break}uh(-1,136272,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);break}else if((hG|0)!=1){break}if((c[9047]|0)==0){hG=c[9045]|0;if((hG|0)==0){c[9032]=2;break}else if((hG|0)==1){if((c[9044]|0)==0){c[9032]=0;break}else{c[9032]=1;break}}else if((hG|0)==2){c[9032]=3;break}else{break}}else{hG=c[9044]|0;if((hG|0)==0){c[9032]=0;break}else if((hG|0)==1){if((c[9045]|0)==0){c[9032]=2;break}else{c[9032]=3;break}}else if((hG|0)==2){c[9032]=1;break}else{break}}}else if((gD|0)==29){hG=gv+1|0;c[13898]=hG;L2807:do{if((hG|0)<(c[8272]|0)){L2809:do{if((a[gw+(hG*40&-1)|0]&1)!=0){gz=c[gw+(hG*40&-1)+36>>2]|0;gG=gw+(hG*40&-1)+32|0;gy=0;while(1){if((gy|0)>=(gz|0)){b7=2034;break}if((a[gB+((c[gG>>2]|0)+gy|0)|0]|0)==(a[gy+103664|0]|0)){gy=gy+1|0}else{rq=0;break}}if((b7|0)==2034){b7=0;if((gy|0)==1){break L2807}else{rq=0}}while(1){if((rq|0)>=(gz|0)){break}if((a[gB+((c[gG>>2]|0)+rq|0)|0]|0)==(a[rq+103664|0]|0)){rq=rq+1|0}else{break L2809}}if((rq|0)==1){break L44}}}while(0);a[14176]=1;is(bf);a[14176]=0;if((c[dt>>2]|0)!=3){c[13898]=hG;break L44}gG=c[du>>2]|0;if((gG|0)==0){break L44}uF(36288,gG|0,1025);uu(gG);break L44}}while(0);a[36288]=0}else if((gD|0)==31){jr(43280)}else if((gD|0)==32){hG=gv+1|0;L2828:do{if((c[8272]|0)>(hG|0)){if((a[gw+(hG*40&-1)|0]&1)==0){break}gG=c[gw+(hG*40&-1)+36>>2]|0;gz=gw+(hG*40&-1)+32|0;gy=0;while(1){if((gy|0)>=(gG|0)){break}if((a[gB+((c[gz>>2]|0)+gy|0)|0]|0)==(a[gy+166752|0]|0)){gy=gy+1|0}else{break L2828}}if((gy|0)!=5){break}c[13898]=gv+2;gz=is(bd)|0;gG=c[gz>>2]|0;if((gG|0)==1){rr=+(c[gz+8>>2]|0)}else if((gG|0)==2){rr=+h[gz+8>>3]}else if((gG|0)==3){rr=+uz(c[gz+8>>2]|0,0)}else{b7=2054;break L27}if((c[dv>>2]|0)==3){uu(c[dw>>2]|0);c[dv>>2]=1}c[8798]=~~rr;break L44}}while(0);jr(43264)}else if((gD|0)==30){hG=gv+1|0;c[13898]=hG;L2846:do{if((hG|0)<(c[8272]|0)){gz=(a[gw+(hG*40&-1)|0]&1)==0;if(!gz){gG=c[gw+(hG*40&-1)+36>>2]|0;hp=gw+(hG*40&-1)+32|0;nd=0;while(1){if((nd|0)>=(gG|0)){b7=2064;break}if((a[gB+((c[hp>>2]|0)+nd|0)|0]|0)==(a[nd+103664|0]|0)){nd=nd+1|0}else{break}}if((b7|0)==2064){b7=0;if((nd|0)==1){b7=2154;break}}gG=a[gB+(c[hp>>2]|0)|0]|0;if((gG<<24>>24|0)==39|(gG<<24>>24|0)==34){b7=2154;break}}gG=c[10810]|0;L2857:do{if((gG|0)!=0){gy=gw+(hG*40&-1)+36|0;gE=gw+(hG*40&-1)+32|0;gH=gG;L2859:while(1){hF=c[gH+4>>2]|0;L2861:do{if(!gz){hw=c[gy>>2]|0;hK=0;while(1){if((hK|0)>=(hw|0)){break}if((a[gB+((c[gE>>2]|0)+hK|0)|0]|0)==(a[hF+hK|0]|0)){hK=hK+1|0}else{break L2861}}if((a[hF+hK|0]|0)==0){break L2859}}}while(0);hF=c[gH>>2]|0;if((hF|0)==0){break L2857}else{gH=hF}}if((a[gH+8|0]&1)!=0){break}if((c[gH+16>>2]|0)==3){b7=2154;break L2846}}}while(0);L2871:do{if(!gz){gG=c[gw+(hG*40&-1)+36>>2]|0;hp=gw+(hG*40&-1)+32|0;nd=0;while(1){if((nd|0)>=(gG|0)){b7=2080;break}if((a[gB+((c[hp>>2]|0)+nd|0)|0]|0)==(a[nd+95280|0]|0)){nd=nd+1|0}else{rs=0;break}}if((b7|0)==2080){b7=0;if((nd|0)==2){b7=2154;break L2846}else{rs=0}}while(1){if((rs|0)>=(gG|0)){b7=2083;break}if((a[gB+((c[hp>>2]|0)+rs|0)|0]|0)==(a[rs+130008|0]|0)){rs=rs+1|0}else{rt=0;break}}if((b7|0)==2083){b7=0;if((rs|0)==4){b7=2154;break L2846}else{rt=0}}while(1){if((rt|0)>=(gG|0)){b7=2086;break}if((a[gB+((c[hp>>2]|0)+rt|0)|0]|0)==(a[rt+89896|0]|0)){rt=rt+1|0}else{ru=0;break}}if((b7|0)==2086){b7=0;if((rt|0)==6){b7=2154;break L2846}else{ru=0}}while(1){if((ru|0)>=(gG|0)){b7=2089;break}if((a[gB+((c[hp>>2]|0)+ru|0)|0]|0)==(a[ru+139840|0]|0)){ru=ru+1|0}else{rv=0;break}}if((b7|0)==2089){b7=0;if((ru|0)==6){b7=2154;break L2846}else{rv=0}}while(1){if((rv|0)>=(gG|0)){b7=2092;break}if((a[gB+((c[hp>>2]|0)+rv|0)|0]|0)==(a[rv+129888|0]|0)){rv=rv+1|0}else{rw=0;break}}if((b7|0)==2092){b7=0;if((rv|0)==5){b7=2154;break L2846}else{rw=0}}while(1){if((rw|0)>=(gG|0)){b7=2095;break}if((a[gB+((c[hp>>2]|0)+rw|0)|0]|0)==(a[rw+150856|0]|0)){rw=rw+1|0}else{rx=0;break}}if((b7|0)==2095){b7=0;if((rw|0)==5){b7=2154;break L2846}else{rx=0}}while(1){if((rx|0)>=(gG|0)){b7=2098;break}if((a[gB+((c[hp>>2]|0)+rx|0)|0]|0)==(a[rx+150704|0]|0)){rx=rx+1|0}else{break}}if((b7|0)==2098){b7=0;if((rx|0)==4){b7=2154;break L2846}}nd=c[hp>>2]|0;gH=(gG|0)>0;L2909:do{if(gH){gE=0;gy=0;hF=nd;while(1){if((a[gE+90456|0]|0)==(a[gB+(gE+hF|0)|0]|0)){ry=hF;rz=gy}else{if((gE|0)!=3){rA=0;rB=0;rC=nd;break}ry=hF-1|0;rz=1}hw=gE+1|0;if((hw|0)<(rz+gG|0)){gE=hw;gy=rz;hF=ry}else{b7=2104;break}}if((b7|0)==2104){b7=0;if((rz|0)!=0){b7=2154;break L2846}if((gE|0)==2|(gE|0)==6){b7=2154;break L2846}else{rA=0;rB=0;rC=nd}}while(1){if((a[rA+149328|0]|0)==(a[gB+(rA+rC|0)|0]|0)){rD=rC;rE=rB}else{if((rA|0)!=5){rF=0;break L2909}rD=rC-1|0;rE=1}hF=rA+1|0;if((hF|0)<(rE+gG|0)){rA=hF;rB=rE;rC=rD}else{break}}if((rE|0)!=0){b7=2154;break L2846}if((rA|0)==4|(rA|0)==8){b7=2154;break L2846}else{rF=0}}else{rF=0}}while(0);while(1){if((rF|0)>=(gG|0)){b7=2114;break}if((a[gB+(rF+nd|0)|0]|0)==(a[rF+225056|0]|0)){rF=rF+1|0}else{break}}if((b7|0)==2114){b7=0;if((rF|0)==2){b7=2154;break L2846}}L2933:do{if(gH){hp=0;gE=0;hF=nd;while(1){if((a[hp+139232|0]|0)==(a[gB+(hp+hF|0)|0]|0)){rG=hF;rH=gE}else{if((hp|0)!=5){rI=0;break L2933}rG=hF-1|0;rH=1}gy=hp+1|0;if((gy|0)<(rH+gG|0)){hp=gy;gE=rH;hF=rG}else{break}}if((rH|0)!=0){b7=2154;break L2846}if((hp|0)==4|(hp|0)==8){b7=2154;break L2846}else{rI=0}}else{rI=0}}while(0);while(1){if((rI|0)>=(gG|0)){b7=2124;break}if((a[gB+(rI+nd|0)|0]|0)==(a[rI+205624|0]|0)){rI=rI+1|0}else{break}}if((b7|0)==2124){b7=0;if((rI|0)==2){b7=2154;break L2846}}L2948:do{if(gH){hF=0;gE=0;gy=nd;while(1){if((a[hF+139064|0]|0)==(a[gB+(hF+gy|0)|0]|0)){rJ=gy;rK=gE}else{if((hF|0)!=6){rL=0;break L2948}rJ=gy-1|0;rK=1}hw=hF+1|0;if((hw|0)<(rK+gG|0)){hF=hw;gE=rK;gy=rJ}else{break}}if((rK|0)!=0){b7=2154;break L2846}if((hF|0)==5|(hF|0)==9){b7=2154;break L2846}else{rL=0}}else{rL=0}}while(0);while(1){if((rL|0)>=(gG|0)){b7=2134;break}if((a[gB+(rL+nd|0)|0]|0)==(a[rL+143040|0]|0)){rL=rL+1|0}else{break}}if((b7|0)==2134){b7=0;if((rL|0)==2){b7=2154;break L2846}}L2963:do{if(gH){gy=0;gE=0;hp=nd;while(1){if((a[gy+142856|0]|0)==(a[gB+(gy+hp|0)|0]|0)){rM=hp;rN=gE}else{if((gy|0)!=4){rO=0;break L2963}rM=hp-1|0;rN=1}hw=gy+1|0;if((hw|0)<(rN+gG|0)){gy=hw;gE=rN;hp=rM}else{break}}if((rN|0)!=0){b7=2154;break L2846}if((gy|0)==3|(gy|0)==9){b7=2154;break L2846}else{rO=0}}else{rO=0}}while(0);while(1){if((rO|0)>=(gG|0)){break}if((a[gB+(rO+nd|0)|0]|0)==(a[rO+124352|0]|0)){rO=rO+1|0}else{break L2871}}if((rO|0)==4){b7=2154;break L2846}}}while(0);is(bb);gz=c[dy>>2]|0;if((gz|0)==3){c[13898]=hG;nd=c[10822]|0;L2979:do{if((nd|0)==0){rP=1}else{gG=1;gH=nd;while(1){if((c[gH+4>>2]|0)!=(gG|0)){rP=gG;break L2979}hp=gG+1|0;gE=c[gH>>2]|0;if((gE|0)==0){rP=hp;break}else{gG=hp;gH=gE}}}}while(0);uu(c[dA>>2]|0);c[dy>>2]=1;rQ=rP;b7=2157;break}else if((gz|0)==1){rR=+(c[dB>>2]|0)}else if((gz|0)==2){rR=+h[dz>>3]}else{b7=2152;break L27}rQ=~~rR;b7=2157}else{b7=2154}}while(0);L2987:do{if((b7|0)==2154){b7=0;hG=c[10822]|0;if((hG|0)==0){rS=1;rT=0;rU=0;b7=2163;break}else{rV=1;rW=hG}while(1){if((c[rW+4>>2]|0)!=(rV|0)){rQ=rV;b7=2157;break L2987}hG=rV+1|0;nd=c[rW>>2]|0;if((nd|0)==0){rQ=hG;b7=2157;break}else{rV=hG;rW=nd}}}}while(0);L2992:do{if((b7|0)==2157){b7=0;if((rQ|0)<1){b7=2158;break L27}gz=c[10822]|0;if((gz|0)==0){rS=rQ;rT=0;rU=0;b7=2163;break}else{rX=0;rY=gz}while(1){rZ=c[rY+4>>2]|0;if((rQ|0)<=(rZ|0)){break}gz=c[rY>>2]|0;if((gz|0)==0){rS=rQ;rT=rY;rU=0;b7=2163;break L2992}else{rX=rY;rY=gz}}if((rQ|0)==(rZ|0)){r_=rY}else{rS=rQ;rT=rX;rU=rY;b7=2163}}}while(0);if((b7|0)==2163){b7=0;uE(dx|0,0,28);gz=ut(192)|0;if((gz|0)==0){gk();nd=ut(192)|0;if((nd|0)==0){b7=2165;break L27}else{r$=nd}}else{r$=gz}gz=r$;nd=r$;c[nd>>2]=0;c[r$+4>>2]=rS;c[r$+72>>2]=0;c[r$+88>>2]=0;uE(r$+8|0,0,60);c[r$+96>>2]=1;hG=r$+156|0;a[r$+184|0]=0;c[r$+144>>2]=4;c[r$+148>>2]=4;c[r$+152>>2]=4;c[hG>>2]=c[dx>>2];c[hG+4>>2]=c[dx+4>>2];c[hG+8>>2]=c[dx+8>>2];c[hG+12>>2]=c[dx+12>>2];c[hG+16>>2]=c[dx+16>>2];c[hG+20>>2]=c[dx+20>>2];c[hG+24>>2]=c[dx+24>>2];if((rT|0)==0){c[10822]=gz}else{c[rT>>2]=gz}c[nd>>2]=rU;r_=gz}gz=c[13898]|0;L3009:do{if((gz|0)<(c[8272]|0)){nd=c[1054]|0;L3011:do{if((a[nd+(gz*40&-1)|0]&1)!=0){hG=c[nd+(gz*40&-1)+36>>2]|0;gH=nd+(gz*40&-1)+32|0;gG=c[10036]|0;gE=0;while(1){if((gE|0)>=(hG|0)){break}if((a[gG+((c[gH>>2]|0)+gE|0)|0]|0)==(a[gE+103664|0]|0)){gE=gE+1|0}else{break L3011}}if((gE|0)==1){break L3009}}}while(0);jw(r_);nd=c[13898]|0;L3018:do{if((nd|0)<(c[8272]|0)){gH=c[1054]|0;L3020:do{if((a[gH+(nd*40&-1)|0]&1)!=0){gG=c[gH+(nd*40&-1)+36>>2]|0;hG=gH+(nd*40&-1)+32|0;hp=c[10036]|0;hF=0;while(1){if((hF|0)>=(gG|0)){break}if((a[hp+((c[hG>>2]|0)+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{break L3020}}if((hF|0)==1){break L3018}}}while(0);a[14176]=1;is(a9);a[14176]=0;if((c[dC>>2]|0)!=3){c[13898]=nd;break}gH=c[dD>>2]|0;if((gH|0)==0){break}gE=r_+60|0;uu(c[gE>>2]|0);c[gE>>2]=gH}}while(0);nd=c[13898]|0;if((nd|0)>=(c[8272]|0)){break}gH=c[1054]|0;if((a[gH+(nd*40&-1)|0]&1)==0){break}gE=c[gH+(nd*40&-1)+36>>2]|0;hG=gH+(nd*40&-1)+32|0;nd=c[10036]|0;gH=0;while(1){if((gH|0)>=(gE|0)){b7=2191;break}if((a[nd+((c[hG>>2]|0)+gH|0)|0]|0)==(a[gH+103664|0]|0)){gH=gH+1|0}else{r0=0;break}}if((b7|0)==2191){b7=0;if((gH|0)==1){break}else{r0=0}}while(1){if((r0|0)>=(gE|0)){break}if((a[nd+((c[hG>>2]|0)+r0|0)|0]|0)==(a[r0+148464|0]|0)){r0=r0+1|0}else{break L3009}}if((r0|0)!=1){break}hG=r_+60|0;nd=c[hG>>2]|0;gE=(uA(nd|0)|0)+1|0;gH=ut(gE)|0;if((gH|0)==0){gk();hp=ut(gE)|0;if((hp|0)==0){b7=2198;break L27}else{r1=hp}}else{r1=gH}r2=nd;nd=0;r3=r1;gH=gE;hp=gE;gE=c[13898]|0;gG=c[1054]|0;L3047:while(1){gy=gE+1|0;c[13898]=gy;if((a[gG+(gy*40&-1)|0]&1)!=0){hw=a[(c[10036]|0)+(c[gG+(gy*40&-1)+32>>2]|0)|0]|0;if((hw<<24>>24|0)==39|(hw<<24>>24|0)==34){b7=2201;break L27}}hw=is(ba)|0;gy=c[hw>>2]|0;if((gy|0)==1){r4=+(c[hw+8>>2]|0)}else if((gy|0)==2){r4=+h[hw+8>>3]}else if((gy|0)==3){r4=+uz(c[hw+8>>2]|0,0)}else{b7=2206;break L27}if((c[dE>>2]|0)==3){uu(c[dF>>2]|0);c[dE>>2]=1}r5=(hp+30|0)+gH|0;r6=db(r3,r5,138416)|0;hw=r6+nd|0;ud(hw,r5-nd|0,r2,1.0,r4);r7=(uA(hw|0)|0)+nd|0;hw=c[13898]|0;gy=c[8272]|0;if((hw|0)>=(gy|0)){b7=2218;break}hS=c[1054]|0;if((a[hS+(hw*40&-1)|0]&1)==0){b7=2218;break}hC=c[hS+(hw*40&-1)+36>>2]|0;hB=hS+(hw*40&-1)+32|0;gx=c[10036]|0;gA=0;while(1){if((gA|0)>=(hC|0)){b7=2214;break}if((a[gx+((c[hB>>2]|0)+gA|0)|0]|0)==(a[gA+103664|0]|0)){gA=gA+1|0}else{r8=0;break}}if((b7|0)==2214){b7=0;if((gA|0)==1){b7=2218;break}else{r8=0}}while(1){if((r8|0)>=(hC|0)){break}if((a[gx+((c[hB>>2]|0)+r8|0)|0]|0)==(a[r8+148464|0]|0)){r8=r8+1|0}else{b7=2218;break L3047}}if((r8|0)!=1){b7=2218;break}hB=hw+1|0;c[13898]=hB;if((hB|0)>=(gy|0)){b7=5175;break L27}if((a[hS+(hB*40&-1)|0]&1)==0){b7=5176;break L27}hC=c[hS+(hB*40&-1)+36>>2]|0;gA=hS+(hB*40&-1)+32|0;ne=0;while(1){if((ne|0)>=(hC|0)){b7=2224;break}nh=c[gA>>2]|0;if((a[gx+(nh+ne|0)|0]|0)==(a[ne+103664|0]|0)){ne=ne+1|0}else{r9=nh;break}}if((b7|0)==2224){b7=0;if((ne|0)==1){b7=5177;break L27}r9=c[gA>>2]|0}gy=a[gx+r9|0]|0;if(!((gy<<24>>24|0)==39|(gy<<24>>24|0)==34)){b7=5178;break L27}if(hC>>>0>>0){sa=r2;sb=hp;sc=hB;sd=hS;se=hC}else{gy=db(r2,hC,138128)|0;hw=c[13898]|0;nh=c[1054]|0;sa=gy;sb=hC;sc=hw;sd=nh;se=c[nh+(hw*40&-1)+36>>2]|0}hw=se-2|0;nh=(hw|0)<(hC|0)?hw:hC-1|0;if((nh|0)>0){hw=c[sd+(sc*40&-1)+32>>2]|0;gy=0;while(1){gF=hw+1|0;ho=gy+1|0;a[sa+gy|0]=a[(c[10036]|0)+gF|0]|0;if((ho|0)==(nh|0)){sf=nh;break}else{hw=gF;gy=ho}}}else{sf=0}a[sa+sf|0]=0;if((a[(c[10036]|0)+(c[(c[1054]|0)+(sc*40&-1)+32>>2]|0)|0]|0)==34){ua(sa)}else{gy=sa;hw=sa;while(1){nh=a[hw]|0;if((nh<<24>>24|0)==39){hC=hw+1|0;hS=(a[hC]|0)==39?hC:hw;sg=hS;sh=a[hS]|0}else if((nh<<24>>24|0)==0){break}else{sg=hw;sh=nh}a[gy]=sh;gy=gy+1|0;hw=sg+1|0}a[gy]=0}hw=(c[13898]|0)+1|0;c[13898]=hw;if((hw|0)>=(c[8272]|0)){b7=2248;break}nh=c[1054]|0;if((a[nh+(hw*40&-1)|0]&1)==0){b7=2248;break}hS=c[nh+(hw*40&-1)+36>>2]|0;hC=nh+(hw*40&-1)+32|0;hB=c[10036]|0;gx=0;while(1){if((gx|0)>=(hS|0)){b7=2244;break}if((a[hB+((c[hC>>2]|0)+gx|0)|0]|0)==(a[gx+103664|0]|0)){gx=gx+1|0}else{si=0;break}}if((b7|0)==2244){b7=0;if((gx|0)==1){b7=2248;break}else{si=0}}while(1){if((si|0)>=(hS|0)){break}if((a[hB+((c[hC>>2]|0)+si|0)|0]|0)==(a[si+148464|0]|0)){si=si+1|0}else{b7=2248;break L3047}}if((si|0)==1){r2=sa;nd=r7;r3=r6;gH=r5;hp=sb;gE=hw;gG=nh}else{b7=2248;break}}if((b7|0)==2218){b7=0;uu(r2);sj=r6}else if((b7|0)==2248){b7=0;gG=db(r6,sb+r5|0,137840)|0;uB(gG+r7|0,sa|0);uu(sa);sj=gG}c[hG>>2]=sj}}while(0);jw(r_);}else if((gD|0)==33){gz=gv+1|0;c[13898]=gz;gG=c[8272]|0;L3116:do{if((gz|0)<(gG|0)){gE=a[gw+(gz*40&-1)|0]|0;L3118:do{if((gE&1)==0){sk=0;sl=gz;sm=gG;sn=gw;so=gE}else{hp=c[gw+(gz*40&-1)+36>>2]|0;gH=gw+(gz*40&-1)+32|0;nd=0;while(1){if((nd|0)>=(hp|0)){break}if((a[gB+((c[gH>>2]|0)+nd|0)|0]|0)==(a[nd+103664|0]|0)){nd=nd+1|0}else{sk=0;sl=gz;sm=gG;sn=gw;so=gE;break L3118}}if((nd|0)==1){break L3116}else{sk=0;sl=gz;sm=gG;sn=gw;so=gE}}}while(0);L3124:while(1){gE=(so&1)==0;L3126:do{if(!gE){hG=c[sn+(sl*40&-1)+36>>2]|0;gH=sn+(sl*40&-1)+32|0;hp=c[10036]|0;nh=0;while(1){if((nh|0)>=(hG|0)){break}if((a[hp+((c[gH>>2]|0)+nh|0)|0]|0)==(a[nh+103664|0]|0)){nh=nh+1|0}else{break L3126}}if((nh|0)==1){sp=sk;break L3124}}}while(0);if((sl|0)>=(sm|0)){b7=2271;break L27}L3134:do{if(!gE){nd=c[sn+(sl*40&-1)+36>>2]|0;gH=sn+(sl*40&-1)+32|0;hp=c[10036]|0;hG=0;while(1){if((hG|0)>=(nd|0)){break}if((a[hp+((c[gH>>2]|0)+hG|0)|0]|0)==(a[hG+103664|0]|0)){hG=hG+1|0}else{break L3134}}if((hG|0)==1){b7=2271;break L27}}}while(0);a[14176]=1;is(a7);a[14176]=0;if((c[dG>>2]|0)!=3){b7=2270;break L27}gE=c[dH>>2]|0;c[a8>>2]=gE;if((gE|0)==0){b7=2280;break L27}if((sk|0)==0){sq=0}else{sq=uA(sk|0)|0}iQ(a8);gE=c[a8>>2]|0;gH=db(sk,(sq+2|0)+(uA(gE|0)|0)|0,140360)|0;if((sq|0)==0){uB(gH|0,gE|0)}else{hp=gH+sq|0;nd=gH+(sq+1|0)|0;uB(nd|0,gE|0);a[hp]=58}uu(gE);gE=c[13898]|0;hp=c[8272]|0;if((gE|0)>=(hp|0)){sp=gH;break}nd=c[1054]|0;sk=gH;sl=gE;sm=hp;sn=nd;so=a[nd+(gE*40&-1)|0]|0}if((sp|0)==0){break L44}uq(4,sp);uu(sp);break L44}}while(0);uq(32,0)}else if((gD|0)==34){sr=gv+1|0;c[13898]=sr;L3155:do{if((sr|0)<(c[8272]|0)){L3157:do{if((a[gw+(sr*40&-1)|0]&1)!=0){gG=c[gw+(sr*40&-1)+36>>2]|0;gz=gw+(sr*40&-1)+32|0;gE=0;while(1){if((gE|0)>=(gG|0)){b7=2289;break}if((a[gB+((c[gz>>2]|0)+gE|0)|0]|0)==(a[gE+103664|0]|0)){gE=gE+1|0}else{ss=0;break}}if((b7|0)==2289){b7=0;if((gE|0)==1){break L3155}else{ss=0}}while(1){if((ss|0)>=(gG|0)){break}if((a[gB+((c[gz>>2]|0)+ss|0)|0]|0)==(a[ss+103664|0]|0)){ss=ss+1|0}else{break L3157}}if((ss|0)==1){st=sr;b7=5181;break L27}}}while(0);a[14176]=1;is(a6);a[14176]=0;if((c[dI>>2]|0)!=3){b7=2297;break L27}gz=c[dJ>>2]|0;if((gz|0)==0){b7=2299;break L27}us(4,gz);uu(gz);break L44}}while(0);uu(c[12908]|0);bA(5,179864);bA(2,179864);gz=bA(5,0)|0;if((gz|0)==0){su=0}else{su=bP(gz|0)|0}c[12908]=su}else if((gD|0)==35){uE(dK|0,0,11);gz=gv+1|0;c[13898]=gz;gG=c[8272]|0;L3176:do{if((gz|0)<(gG|0)){gE=c[gw+(gz*40&-1)+36>>2]|0;L3178:do{if((a[gw+(gz*40&-1)|0]&1)!=0){nd=gw+(gz*40&-1)+32|0;hp=0;while(1){if((hp|0)>=(gE|0)){break}if((a[gB+((c[nd>>2]|0)+hp|0)|0]|0)==(a[hp+103664|0]|0)){hp=hp+1|0}else{break L3178}}if((hp|0)==1){b7=2308;break L3176}}}while(0);if((gE|0)>0){sv=gw+(gz*40&-1)+32|0;nd=c[sv>>2]|0;gH=0;do{sw=gH+nd|0;nh=gB+sw|0;hF=a[nh]|0;do{if(hF<<24>>24==114){sx=7}else{if((a_(nh|0,108208,2)|0)==0){sx=6;break}if((a_(nh|0,108120,2)|0)==0){sx=5;break}if((a_(nh|0,124768,2)|0)==0){sx=4;break}if((a_(nh|0,88416,2)|0)==0){sx=3;break}if(hF<<24>>24==120){sx=2;break}if(hF<<24>>24==121){sx=1;break}if(hF<<24>>24==122){sx=0}else{b7=2312;break L27}}}while(0);a[a5+(c[56724+(sx<<3)>>2]|0)|0]=1;gH=(uA(c[56720+(sx<<3)>>2]|0)|0)+gH|0;}while((gH|0)<(gE|0))}gE=gv+2|0;c[13898]=gE;if((gE|0)>=(gG|0)){sy=10.0;break}L3200:do{if((a[gw+(gE*40&-1)|0]&1)!=0){gH=c[gw+(gE*40&-1)+36>>2]|0;nd=gw+(gE*40&-1)+32|0;hF=0;while(1){if((hF|0)>=(gH|0)){break}if((a[gB+((c[nd>>2]|0)+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{break L3200}}if((hF|0)==1){sy=10.0;break L3176}}}while(0);gE=is(a4)|0;nd=c[gE>>2]|0;if((nd|0)==1){sz=+(c[gE+8>>2]|0)}else if((nd|0)==2){sz=+h[gE+8>>3]}else if((nd|0)==3){sz=+uz(c[gE+8>>2]|0,0)}else{b7=2324;break L27}if((c[dL>>2]|0)==3){uu(c[dM>>2]|0);c[dL>>2]=1}m3=+P(+sz);if(m3>1.0){sy=m3}else{b7=2328;break L27}}else{b7=2308}}while(0);if((b7|0)==2308){b7=0;uE(dK|0,1,7);sy=10.0}gG=0;L3218:do{do{if((a[a5+gG|0]&1)!=0){a[64788+(gG*688&-1)|0]=1;h[64792+(gG*688&-1)>>3]=sy;h[64800+(gG*688&-1)>>3]=+_(+sy);if((gG|0)!=7){break}if((a[30528]&1)==0){break L3218}ju()}}while(0);gG=gG+1|0;}while((gG|0)<8);c[6928]=0}else if((gD|0)==36){c[13898]=gv+1;a[43472]=1}else if((gD|0)==37){sA=gv+1|0;c[13898]=sA;L3228:do{if((sA|0)<(c[8272]|0)){if((a[gw+(sA*40&-1)|0]&1)==0){b7=5184;break L27}gG=c[gw+(sA*40&-1)+36>>2]|0;gz=gw+(sA*40&-1)+32|0;gE=0;while(1){if((gE|0)>=(gG|0)){b7=2349;break}nd=c[gz>>2]|0;if((a[gB+(nd+gE|0)|0]|0)==(a[gE+103664|0]|0)){gE=gE+1|0}else{sB=nd;break}}if((b7|0)==2349){b7=0;if((gE|0)==1){b7=2351;break}sB=c[gz>>2]|0}if((gG|0)>0){sC=0;sD=0;sE=sB}else{b7=5185;break L27}while(1){if((a[sC+141752|0]|0)==(a[gB+(sC+sE|0)|0]|0)){sF=sE;sG=sD}else{if((sC|0)!=2){sH=0;sI=0;sJ=sB;break}sF=sE-1|0;sG=1}nd=sC+1|0;if((nd|0)<(sG+gG|0)){sC=nd;sD=sG;sE=sF}else{b7=2357;break}}do{if((b7|0)==2357){b7=0;if((sG|0)==0){if(!((sC|0)==1|(sC|0)==9)){sH=0;sI=0;sJ=sB;break}}c[8732]=0;break L3228}}while(0);while(1){if((a[sH+141560|0]|0)==(a[gB+(sH+sJ|0)|0]|0)){sK=sJ;sL=sI}else{if((sH|0)!=1){sM=0;sN=0;sO=sB;break}sK=sJ-1|0;sL=1}gz=sH+1|0;if((gz|0)<(sL+gG|0)){sH=gz;sI=sL;sJ=sK}else{b7=2364;break}}do{if((b7|0)==2364){b7=0;if((sL|0)==0){if(!((sH|0)==0|(sH|0)==9)){sM=0;sN=0;sO=sB;break}}c[8732]=1;break L3228}}while(0);while(1){if((a[sM+141376|0]|0)==(a[gB+(sM+sO|0)|0]|0)){sP=sO;sQ=sN}else{if((sM|0)!=2){b7=5186;break L27}sP=sO-1|0;sQ=1}gz=sM+1|0;if((gz|0)<(sQ+gG|0)){sM=gz;sN=sQ;sO=sP}else{break}}if((sQ|0)==0){if(!((sM|0)==1|(sM|0)==11)){b7=5187;break L27}}c[8732]=2}else{b7=2351}}while(0);if((b7|0)==2351){b7=0;c[8732]=0}c[13898]=gv+2}else if((gD|0)==42){js(56400)}else if((gD|0)==39){js(35144)}else if((gD|0)==40){js(26392)}else if((gD|0)==41){js(4264)}else if((gD|0)==15){sR=gv+1|0;c[13898]=sR;gG=c[gw+(sR*40&-1)+36>>2]|0;gz=c[gw+(sR*40&-1)+32>>2]|0;gE=(a[gw+(sR*40&-1)|0]&1)==0;if((gG|0)>0&(gE^1)){sS=0;sT=0;sU=gz}else{b7=5195;break L27}while(1){if((a[sS+210832|0]|0)==(a[gB+(sS+sU|0)|0]|0)){sV=sU;sW=sT}else{if((sS|0)!=4){break}sV=sU-1|0;sW=1}nd=sS+1|0;if((nd|0)<(sW+gG|0)){sS=nd;sT=sW;sU=sV}else{b7=2385;break}}do{if((b7|0)==2385){b7=0;if((sW|0)==0){if(!((sS|0)==3|(sS|0)==7)){break}}sX=gv+2|0;c[13898]=sX;L3289:do{if((sX|0)<(c[8272]|0)){L3291:do{if((a[gw+(sX*40&-1)|0]&1)!=0){nd=c[gw+(sX*40&-1)+36>>2]|0;gH=gw+(sX*40&-1)+32|0;nh=0;while(1){if((nh|0)>=(nd|0)){b7=2392;break}if((a[gB+((c[gH>>2]|0)+nh|0)|0]|0)==(a[nh+103664|0]|0)){nh=nh+1|0}else{sY=0;break}}if((b7|0)==2392){b7=0;if((nh|0)==1){break L3289}else{sY=0}}while(1){if((sY|0)>=(nd|0)){break}if((a[gB+((c[gH>>2]|0)+sY|0)|0]|0)==(a[sY+103664|0]|0)){sY=sY+1|0}else{break L3291}}if((sY|0)==1){b7=2399;break L27}}}while(0);a[14176]=1;is(a3);a[14176]=0;if((c[dP>>2]|0)!=3){b7=2398;break L27}hF=c[dQ>>2]|0;c[8528]=hF;if((hF|0)==0){b7=2401;break L27}else{break L44}}}while(0);uu(c[8528]|0);c[8528]=0;break L44}}while(0);if(gE){b7=5196;break L27}L3307:do{if((gG|0)>0){hF=0;gH=0;nd=gz;while(1){if((a[hF+209008|0]|0)==(a[gB+(hF+nd|0)|0]|0)){sZ=nd;s_=gH}else{if((hF|0)!=3){break L3307}sZ=nd-1|0;s_=1}nh=hF+1|0;if((nh|0)<(s_+gG|0)){hF=nh;gH=s_;nd=sZ}else{break}}if((s_|0)==0){if(!((hF|0)==2|(hF|0)==9)){break}}s$=gv+2|0;c[13898]=s$;do{if((s$|0)<(c[8272]|0)){if((a[gw+(s$*40&-1)|0]&1)==0){b7=5190;break L27}nd=c[gw+(s$*40&-1)+36>>2]|0;gH=gw+(s$*40&-1)+32|0;nh=0;while(1){if((nh|0)>=(nd|0)){b7=2416;break}hG=c[gH>>2]|0;if((a[gB+(hG+nh|0)|0]|0)==(a[nh+103664|0]|0)){nh=nh+1|0}else{s0=hG;break}}if((b7|0)==2416){b7=0;if((nh|0)==1){break}s0=c[gH>>2]|0}L3328:do{if((nd|0)>0){hG=0;hp=0;hw=s0;while(1){if((a[hG+142688|0]|0)==(a[gB+(hG+hw|0)|0]|0)){s1=hw;s2=hp}else{if((hG|0)!=5){b7=2427;break L3328}s1=hw-1|0;s2=1}hC=hG+1|0;if((hC|0)<(s2+nd|0)){hG=hC;hp=s2;hw=s1}else{break}}if((s2|0)==0){if(!((hG|0)==4|(hG|0)==10)){b7=2427;break}}a[47120]=0}else{b7=2427}}while(0);L3339:do{if((b7|0)==2427){b7=0;gH=a[gB+s0|0]|0;if((gH<<24>>24|0)==39|(gH<<24>>24|0)==34){s3=0}else{b7=5191;break L27}while(1){if((s3|0)>=(nd|0)){b7=2431;break}if((a[gB+(s3+s0|0)|0]|0)==(a[s3+142432|0]|0)){s3=s3+1|0}else{s4=0;b7=2432;break}}if((b7|0)==2431){b7=0;if((s3|0)!=4){s4=0;b7=2432}}do{if((b7|0)==2432){while(1){b7=0;if((s4|0)>=(nd|0)){b7=2434;break}if((a[gB+(s4+s0|0)|0]|0)==(a[s4+142280|0]|0)){s4=s4+1|0;b7=2432}else{break}}if((b7|0)==2434){b7=0;if((s4|0)==4){break}}if(gH<<24>>24!=(a[gB+(s0+2|0)|0]|0)){b7=2437;break L27}a[47120]=a[gB+(s0+1|0)|0]|0;break L3339}}while(0);a[47120]=9}}while(0);c[13898]=gv+3;break L44}}while(0);a[47120]=0;break L44}}while(0);if((gG|0)>0&(gE^1)){s5=0;s6=0;s7=gz}else{b7=5197;break L27}while(1){if((a[s5+97920|0]|0)==(a[gB+(s5+s7|0)|0]|0)){s8=s7;s9=s6}else{if((s5|0)!=3){break}s8=s7-1|0;s9=1}hF=s5+1|0;if((hF|0)<(s9+gG|0)){s5=hF;s6=s9;s7=s8}else{b7=2445;break}}do{if((b7|0)==2445){b7=0;if((s9|0)==0){if(!((s5|0)==2|(s5|0)==13)){break}}ta=gv+2|0;c[13898]=ta;L3369:do{if((ta|0)<(c[8272]|0)){L3371:do{if((a[gw+(ta*40&-1)|0]&1)!=0){hF=c[gw+(ta*40&-1)+36>>2]|0;nd=gw+(ta*40&-1)+32|0;gH=0;while(1){if((gH|0)>=(hF|0)){b7=2452;break}if((a[gB+((c[nd>>2]|0)+gH|0)|0]|0)==(a[gH+103664|0]|0)){gH=gH+1|0}else{tb=0;break}}if((b7|0)==2452){b7=0;if((gH|0)==1){b7=2453;break L3369}else{tb=0}}while(1){if((tb|0)>=(hF|0)){break}if((a[gB+((c[nd>>2]|0)+tb|0)|0]|0)==(a[tb+103664|0]|0)){tb=tb+1|0}else{break L3371}}if((tb|0)==1){tc=ta;b7=5192;break L27}}}while(0);a[14176]=1;is(a2);a[14176]=0;if((c[dN>>2]|0)!=3){b7=2458;break L27}nd=c[dO>>2]|0;if((nd|0)==0){b7=2460;break L27}uu(c[11948]|0);td=nd}else{b7=2453}}while(0);if((b7|0)==2453){b7=0;uu(c[11948]|0);td=bP(199184)|0}c[11948]=td;break L44}}while(0);if(gE){b7=5198;break L27}L3390:do{if((gG|0)>0){nd=0;hF=0;gH=gz;while(1){if((a[nd+204608|0]|0)==(a[gB+(nd+gH|0)|0]|0)){te=gH;tf=hF}else{if((nd|0)!=3){break L3390}te=gH-1|0;tf=1}hK=nd+1|0;if((hK|0)<(tf+gG|0)){nd=hK;hF=tf;gH=te}else{break}}if((tf|0)==0){if(!((nd|0)==2|(nd|0)==6)){break}}eP();break L44}}while(0);if((gG|0)>0&(gE^1)){tg=0;th=0;ti=gz}else{b7=5199;break L27}while(1){if((a[tg+115448|0]|0)==(a[gB+(tg+ti|0)|0]|0)){tj=ti;tk=th}else{if((tg|0)!=4){break}tj=ti-1|0;tk=1}gH=tg+1|0;if((gH|0)<(tk+gG|0)){tg=gH;th=tk;ti=tj}else{b7=2478;break}}do{if((b7|0)==2478){b7=0;if((tk|0)==0){if(!((tg|0)==3|(tg|0)==7)){break}}a[47712]=1;c[13898]=gv+2;break L44}}while(0);if(gE){b7=5200;break L27}L3415:do{if((gG|0)>0){gH=0;hF=0;hK=gz;while(1){if((a[gH+76296|0]|0)==(a[gB+(gH+hK|0)|0]|0)){tl=hK;tm=hF}else{if((gH|0)!=6){break L3415}tl=hK-1|0;tm=1}hG=gH+1|0;if((hG|0)<(tm+gG|0)){gH=hG;hF=tm;hK=tl}else{break}}if((tm|0)==0){if(!((gH|0)==5|(gH|0)==9)){break}}a[47712]=0;c[13898]=gv+2;break L44}}while(0);if((gG|0)>0&(gE^1)){tn=0}else{b7=5201;break L27}while(1){if((a[tn+223696|0]|0)!=(a[gB+(tn+gz|0)|0]|0)){break}to=tn+1|0;if((to|0)<(gG|0)){tn=to}else{b7=2493;break}}do{if((b7|0)==2493){b7=0;if((to|0)!=8){break}a[47472]=0;c[13898]=gv+2;break L44}}while(0);if((gG|0)>0&(gE^1)){tp=0}else{b7=5202;break L27}do{if((a[tp+216640|0]|0)!=(a[gB+(tp+gz|0)|0]|0)){b7=5203;break L27}tp=tp+1|0;}while((tp|0)<(gG|0));if((tp|0)!=10){b7=5204;break L27}a[47472]=1;c[13898]=gv+2}else if((gD|0)==44){gG=gv+1|0;c[13898]=gG;c[8496]=1;gz=c[8272]|0;if((gG|0)<(gz|0)){tq=gG;tr=gz;ts=gw}else{break}L3440:while(1){tt=c[ts+(tq*40&-1)+36>>2]|0;tu=ts+(tq*40&-1)+32|0;if((a[ts+(tq*40&-1)|0]&1)==0){b7=2503;break}gz=c[10036]|0;gG=0;while(1){if((gG|0)>=(tt|0)){b7=2507;break}gE=c[tu>>2]|0;if((a[gz+(gE+gG|0)|0]|0)==(a[gG+103664|0]|0)){gG=gG+1|0}else{tv=gE;break}}if((b7|0)==2507){b7=0;if((gG|0)==1){break L44}tv=c[tu>>2]|0}if((tt|0)>0){tw=0;tx=0;ty=tv}else{tz=tv;tA=0;break}while(1){if((a[tw+148208|0]|0)==(a[gz+(tw+ty|0)|0]|0)){tB=ty;tC=tx}else{if((tw|0)!=2){tD=0;tE=0;tF=tv;b7=2525;break}tB=ty-1|0;tC=1}gH=tw+1|0;if((gH|0)<(tC+tt|0)){tw=gH;tx=tC;ty=tB}else{b7=2514;break}}do{if((b7|0)==2514){b7=0;if((tC|0)==0){if(!((tw|0)==11|(tw|0)==1)){tD=0;tE=0;tF=tv;b7=2525;break}}c[13898]=tq+1;gG=is(a$)|0;gH=c[gG>>2]|0;if((gH|0)==1){tG=+(c[gG+8>>2]|0)}else if((gH|0)==2){tG=+h[gG+8>>3]}else if((gH|0)==3){tG=+uz(c[gG+8>>2]|0,0)}else{b7=2520;break L27}if((c[d5>>2]|0)==3){uu(c[d6>>2]|0);c[d5>>2]=1}gG=~~tG;c[8497]=gG;if((gG|0)>=0){break}c[8497]=0}}while(0);L3470:do{if((b7|0)==2525){while(1){b7=0;if((a[tD+148024|0]|0)==(a[gz+(tD+tF|0)|0]|0)){tH=tF;tI=tE}else{if((tD|0)!=4){tJ=0;tK=0;tL=tv;break}tH=tF-1|0;tI=1}gG=tD+1|0;if((gG|0)<(tI+tt|0)){tD=gG;tE=tI;tF=tH;b7=2525}else{b7=2529;break}}do{if((b7|0)==2529){b7=0;if((tI|0)==0){if(!((tD|0)==3|(tD|0)==13)){tJ=0;tK=0;tL=tv;break}}c[8497]=0;c[13898]=tq+1;break L3470}}while(0);while(1){if((a[tJ+147832|0]|0)==(a[gz+(tJ+tL|0)|0]|0)){tM=tL;tN=tK}else{if((tJ|0)!=6){tO=0;tP=0;tQ=tv;break}tM=tL-1|0;tN=1}gG=tJ+1|0;if((gG|0)<(tN+tt|0)){tJ=gG;tK=tN;tL=tM}else{b7=2538;break}}do{if((b7|0)==2538){b7=0;if((tN|0)==0){if(!((tJ|0)==5|(tJ|0)==15)){tO=0;tP=0;tQ=tv;break}}c[8498]=1;c[13898]=tq+1;break L3470}}while(0);while(1){if((a[tO+147576|0]|0)==(a[gz+(tO+tQ|0)|0]|0)){tR=tQ;tS=tP}else{if((tO|0)!=8){tT=0;tU=0;tV=tv;break}tR=tQ-1|0;tS=1}gG=tO+1|0;if((gG|0)<(tS+tt|0)){tO=gG;tP=tS;tQ=tR}else{b7=2545;break}}do{if((b7|0)==2545){b7=0;if((tS|0)==0){if(!((tO|0)==7|(tO|0)==17)){tT=0;tU=0;tV=tv;break}}c[8498]=0;c[13898]=tq+1;break L3470}}while(0);while(1){if((a[tT+147296|0]|0)==(a[gz+(tT+tV|0)|0]|0)){tW=tV;tX=tU}else{if((tT|0)!=2){tY=0;tZ=0;t_=tv;break}tW=tV-1|0;tX=1}gG=tT+1|0;if((gG|0)<(tX+tt|0)){tT=gG;tU=tX;tV=tW}else{b7=2552;break}}do{if((b7|0)==2552){b7=0;if((tX|0)==0){if(!((tT|0)==1|(tT|0)==16)){tY=0;tZ=0;t_=tv;break}}c[8500]=1;hM();c[13898]=(c[13898]|0)+1;break L3470}}while(0);while(1){if((a[tY+147040|0]|0)==(a[gz+(tY+t_|0)|0]|0)){t$=t_;t0=tZ}else{if((tY|0)!=14){t1=0;t2=0;t3=tv;break}t$=t_-1|0;t0=1}gG=tY+1|0;if((gG|0)<(t0+tt|0)){tY=gG;tZ=t0;t_=t$}else{b7=2559;break}}do{if((b7|0)==2559){b7=0;if((t0|0)==0){if(!((tY|0)==13|(tY|0)==16)){t1=0;t2=0;t3=tv;break}}c[8500]=2;hM();c[13898]=(c[13898]|0)+1;break L3470}}while(0);while(1){if((a[t1+146800|0]|0)==(a[gz+(t1+t3|0)|0]|0)){t4=t3;t6=t2}else{if((t1|0)!=4){t7=0;t8=0;t9=tv;break}t4=t3-1|0;t6=1}gG=t1+1|0;if((gG|0)<(t6+tt|0)){t1=gG;t2=t6;t3=t4}else{b7=2566;break}}do{if((b7|0)==2566){b7=0;if((t6|0)==0){if(!((t1|0)==3|(t1|0)==15)){t7=0;t8=0;t9=tv;break}}c[8500]=0;hM();c[13898]=(c[13898]|0)+1;break L3470}}while(0);while(1){if((a[t7+146616|0]|0)==(a[gz+(t7+t9|0)|0]|0)){ub=t9;uc=t8}else{if((t7|0)!=5){ue=0;ug=0;ui=tv;break}ub=t9-1|0;uc=1}gG=t7+1|0;if((gG|0)<(uc+tt|0)){t7=gG;t8=uc;t9=ub}else{b7=2573;break}}do{if((b7|0)==2573){b7=0;if((uc|0)==0){if(!((t7|0)==4|(t7|0)==6)){ue=0;ug=0;ui=tv;break}}c[8499]=1;gG=tq+1|0;c[13898]=gG;gH=(a[ts+(gG*40&-1)|0]&1)==0;if(gH){b7=2577}else{gE=a[gz+(c[ts+(gG*40&-1)+32>>2]|0)|0]|0;if(!((gE<<24>>24|0)==39|(gE<<24>>24|0)==34)){b7=2577}}if((b7|0)==2577){b7=0;gE=c[10810]|0;if((gE|0)==0){break L3470}hK=ts+(gG*40&-1)+36|0;hF=ts+(gG*40&-1)+32|0;nd=(tr|0)<=(gG|0)|gH;gH=gE;L3553:while(1){gE=c[gH+4>>2]|0;L3555:do{if(!nd){gG=c[hK>>2]|0;hG=0;while(1){if((hG|0)>=(gG|0)){break}if((a[gz+((c[hF>>2]|0)+hG|0)|0]|0)==(a[gE+hG|0]|0)){hG=hG+1|0}else{break L3555}}if((a[gE+hG|0]|0)==0){break L3553}}}while(0);gE=c[gH>>2]|0;if((gE|0)==0){break L3470}else{gH=gE}}if((a[gH+8|0]&1)!=0){break L3470}if((c[gH+16>>2]|0)!=3){break L3470}}uu(c[8504]|0);hF=c[13898]|0;L3565:do{if((hF|0)<(c[8272]|0)){hK=c[1054]|0;L3567:do{if((a[hK+(hF*40&-1)|0]&1)!=0){nd=c[hK+(hF*40&-1)+36>>2]|0;gE=hK+(hF*40&-1)+32|0;gG=c[10036]|0;gC=0;while(1){if((gC|0)>=(nd|0)){break}if((a[gG+((c[gE>>2]|0)+gC|0)|0]|0)==(a[gC+103664|0]|0)){gC=gC+1|0}else{break L3567}}if((gC|0)==1){ul=0;break L3565}}}while(0);a[14176]=1;is(aV);a[14176]=0;if((c[d3>>2]|0)==3){ul=c[d4>>2]|0;break}else{c[13898]=hF;ul=0;break}}else{ul=0}}while(0);c[8504]=ul;break L3470}}while(0);while(1){if((a[ue+146440|0]|0)==(a[gz+(ue+ui|0)|0]|0)){um=ui;un=ug}else{if((ue|0)!=4){uo=0;up=0;uv=tv;break}um=ui-1|0;un=1}hF=ue+1|0;if((hF|0)<(un+tt|0)){ue=hF;ug=un;ui=um}else{b7=2601;break}}do{if((b7|0)==2601){b7=0;if((un|0)==0){if(!((ue|0)==3|(ue|0)==8)){uo=0;up=0;uv=tv;break}}c[8499]=0;c[13898]=tq+1;break L3470}}while(0);while(1){if((a[uo+146248|0]|0)==(a[gz+(uo+uv|0)|0]|0)){uw=uv;ux=up}else{if((uo|0)!=2){uy=0;uC=0;uG=tv;break}uw=uv-1|0;ux=1}hF=uo+1|0;if((hF|0)<(ux+tt|0)){uo=hF;up=ux;uv=uw}else{b7=2608;break}}do{if((b7|0)==2608){b7=0;if((ux|0)==0){if(!((uo|0)==1|(uo|0)==7)){uy=0;uC=0;uG=tv;break}}c[8501]=1;c[13898]=tq+1;break L3470}}while(0);while(1){if((a[uy+146080|0]|0)==(a[gz+(uy+uG|0)|0]|0)){uH=uG;uI=uC}else{if((uy|0)!=4){uJ=0;uK=0;uL=tv;break}uH=uG-1|0;uI=1}hF=uy+1|0;if((hF|0)<(uI+tt|0)){uy=hF;uC=uI;uG=uH}else{b7=2615;break}}do{if((b7|0)==2615){b7=0;if((uI|0)==0){if(!((uy|0)==3|(uy|0)==9)){uJ=0;uK=0;uL=tv;break}}c[8501]=0;c[13898]=tq+1;break L3470}}while(0);while(1){if((a[uJ+145928|0]|0)==(a[gz+(uJ+uL|0)|0]|0)){uM=uL;uN=uK}else{if((uJ|0)!=6){uO=0;uP=0;uQ=tv;break}uM=uL-1|0;uN=1}hF=uJ+1|0;if((hF|0)<(uN+tt|0)){uJ=hF;uK=uN;uL=uM}else{b7=2622;break}}do{if((b7|0)==2622){b7=0;if((uN|0)==0){if(!((uJ|0)==5|(uJ|0)==8)){uO=0;uP=0;uQ=tv;break}}c[8502]=1;c[13898]=tq+1;break L3470}}while(0);while(1){if((a[uO+145688|0]|0)==(a[gz+(uO+uQ|0)|0]|0)){uR=uQ;uS=uP}else{if((uO|0)!=8){uT=0;uU=0;uV=tv;break}uR=uQ-1|0;uS=1}hF=uO+1|0;if((hF|0)<(uS+tt|0)){uO=hF;uP=uS;uQ=uR}else{b7=2629;break}}do{if((b7|0)==2629){b7=0;if((uS|0)==0){if(!((uO|0)==7|(uO|0)==10)){uT=0;uU=0;uV=tv;break}}c[8502]=0;c[13898]=tq+1;break L3470}}while(0);while(1){if((a[uT+78872|0]|0)==(a[gz+(uT+uV|0)|0]|0)){uW=uV;uX=uU}else{if((uT|0)!=2){uY=0;uZ=0;u_=tv;break}uW=uV-1|0;uX=1}hF=uT+1|0;if((hF|0)<(uX+tt|0)){uT=hF;uU=uX;uV=uW}else{b7=2636;break}}do{if((b7|0)==2636){b7=0;if((uX|0)==0){if(!((uT|0)==6|(uT|0)==1)){uY=0;uZ=0;u_=tv;break}}hF=tq+1|0;c[13898]=hF;gH=(a[ts+(hF*40&-1)|0]&1)==0;if(gH){b7=2640}else{hK=a[gz+(c[ts+(hF*40&-1)+32>>2]|0)|0]|0;if(!((hK<<24>>24|0)==39|(hK<<24>>24|0)==34)){b7=2640}}L3646:do{if((b7|0)==2640){b7=0;hK=c[10810]|0;L3648:do{if((hK|0)!=0){gE=ts+(hF*40&-1)+36|0;gG=ts+(hF*40&-1)+32|0;nd=(tr|0)<=(hF|0)|gH;hG=hK;L3650:while(1){nh=c[hG+4>>2]|0;L3652:do{if(!nd){hw=c[gE>>2]|0;hp=0;while(1){if((hp|0)>=(hw|0)){break}if((a[gz+((c[gG>>2]|0)+hp|0)|0]|0)==(a[nh+hp|0]|0)){hp=hp+1|0}else{break L3652}}if((a[nh+hp|0]|0)==0){break L3650}}}while(0);nh=c[hG>>2]|0;if((nh|0)==0){break L3648}else{hG=nh}}if((a[hG+8|0]&1)!=0){break}if((c[hG+16>>2]|0)==3){break L3646}}}while(0);c[8503]=34032;break L3470}}while(0);gH=c[8503]|0;if((gH|0)==34032){u$=hF;u0=tr}else{uu(gH);u$=c[13898]|0;u0=c[8272]|0}L3666:do{if((u$|0)<(u0|0)){gH=c[1054]|0;L3668:do{if((a[gH+(u$*40&-1)|0]&1)!=0){hK=c[gH+(u$*40&-1)+36>>2]|0;gG=gH+(u$*40&-1)+32|0;gE=c[10036]|0;nd=0;while(1){if((nd|0)>=(hK|0)){break}if((a[gE+((c[gG>>2]|0)+nd|0)|0]|0)==(a[nd+103664|0]|0)){nd=nd+1|0}else{break L3668}}if((nd|0)==1){u1=0;break L3666}}}while(0);a[14176]=1;is(aR);a[14176]=0;if((c[d1>>2]|0)==3){u1=c[d2>>2]|0;break}else{c[13898]=u$;u1=0;break}}else{u1=0}}while(0);c[8503]=u1;break L3470}}while(0);while(1){if((a[uY+145232|0]|0)==(a[gz+(uY+u_|0)|0]|0)){u2=u_;u3=uZ}else{if((uY|0)!=2){u4=0;u5=0;u6=tv;break}u2=u_-1|0;u3=1}hF=uY+1|0;if((hF|0)<(u3+tt|0)){uY=hF;uZ=u3;u_=u2}else{b7=2667;break}}do{if((b7|0)==2667){b7=0;if((u3|0)==0){if(!((uY|0)==15|(uY|0)==1)){u4=0;u5=0;u6=tv;break}}hF=tq+1|0;c[13898]=hF;gH=(a[ts+(hF*40&-1)|0]&1)==0;if(gH){b7=2671}else{gG=a[gz+(c[ts+(hF*40&-1)+32>>2]|0)|0]|0;if(!((gG<<24>>24|0)==39|(gG<<24>>24|0)==34)){b7=2671}}L3692:do{if((b7|0)==2671){b7=0;gG=c[10810]|0;L3694:do{if((gG|0)!=0){gE=ts+(hF*40&-1)+36|0;hK=ts+(hF*40&-1)+32|0;hG=(tr|0)<=(hF|0)|gH;gC=gG;L3696:while(1){nh=c[gC+4>>2]|0;L3698:do{if(!hG){hR=c[gE>>2]|0;hw=0;while(1){if((hw|0)>=(hR|0)){break}if((a[gz+((c[hK>>2]|0)+hw|0)|0]|0)==(a[nh+hw|0]|0)){hw=hw+1|0}else{break L3698}}if((a[nh+hw|0]|0)==0){break L3696}}}while(0);nh=c[gC>>2]|0;if((nh|0)==0){break L3694}else{gC=nh}}if((a[gC+8|0]&1)!=0){break}if((c[gC+16>>2]|0)==3){break L3692}}}while(0);gG=is(aP)|0;hK=c[gG>>2]|0;if((hK|0)==1){u7=+(c[gG+8>>2]|0)}else if((hK|0)==2){u7=+h[gG+8>>3]}else if((hK|0)==3){u7=+uz(c[gG+8>>2]|0,0)}else{b7=2698;break L27}if((c[dZ>>2]|0)==3){uu(c[d_>>2]|0);c[dZ>>2]=1}gG=~~u7;if(gG>>>0<7){c[13532]=gG;break L3470}else{gG=c[m>>2]|0;cf(gG|0,144712,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=6,v)|0);break L3470}}}while(0);uu(c[13534]|0);gH=c[13898]|0;L3720:do{if((gH|0)<(c[8272]|0)){hF=c[1054]|0;L3722:do{if((a[hF+(gH*40&-1)|0]&1)!=0){gG=c[hF+(gH*40&-1)+36>>2]|0;hK=hF+(gH*40&-1)+32|0;gE=c[10036]|0;hG=0;while(1){if((hG|0)>=(gG|0)){break}if((a[gE+((c[hK>>2]|0)+hG|0)|0]|0)==(a[hG+103664|0]|0)){hG=hG+1|0}else{break L3722}}if((hG|0)==1){u8=0;break L3720}}}while(0);a[14176]=1;is(aO);a[14176]=0;if((c[d$>>2]|0)==3){u8=c[d0>>2]|0;break}else{c[13898]=gH;u8=0;break}}else{u8=0}}while(0);c[13534]=u8;if((a[u8]|0)!=0){c[13532]=7;break L3470}uu(u8);c[13534]=0;if((c[8506]|0)!=7){break L3470}c[8506]=0;break L3470}}while(0);while(1){if((a[u4+144456|0]|0)==(a[gz+(u4+u6|0)|0]|0)){u9=u6;va=u5}else{if((u4|0)!=2){vb=0;vc=0;vd=tv;break}u9=u6-1|0;va=1}gH=u4+1|0;if((gH|0)<(va+tt|0)){u4=gH;u5=va;u6=u9}else{b7=2708;break}}do{if((b7|0)==2708){b7=0;if((va|0)==0){if(!((u4|0)==11|(u4|0)==1)){vb=0;vc=0;vd=tv;break}}gH=tq+1|0;c[13898]=gH;hF=(a[ts+(gH*40&-1)|0]&1)==0;if(hF){b7=2712}else{hK=a[gz+(c[ts+(gH*40&-1)+32>>2]|0)|0]|0;if(!((hK<<24>>24|0)==39|(hK<<24>>24|0)==34)){b7=2712}}L3750:do{if((b7|0)==2712){b7=0;hK=c[10810]|0;L3752:do{if((hK|0)!=0){gE=ts+(gH*40&-1)+36|0;gG=ts+(gH*40&-1)+32|0;gC=(tr|0)<=(gH|0)|hF;nd=hK;L3754:while(1){nh=c[nd+4>>2]|0;L3756:do{if(!gC){hR=c[gE>>2]|0;hp=0;while(1){if((hp|0)>=(hR|0)){break}if((a[gz+((c[gG>>2]|0)+hp|0)|0]|0)==(a[nh+hp|0]|0)){hp=hp+1|0}else{break L3756}}if((a[nh+hp|0]|0)==0){break L3754}}}while(0);nh=c[nd>>2]|0;if((nh|0)==0){break L3752}else{nd=nh}}if((a[nd+8|0]&1)!=0){break}if((c[nd+16>>2]|0)==3){break L3750}}}while(0);hK=is(aT)|0;gG=c[hK>>2]|0;if((gG|0)==1){ve=+(c[hK+8>>2]|0)}else if((gG|0)==2){ve=+h[hK+8>>3]}else if((gG|0)==3){ve=+uz(c[hK+8>>2]|0,0)}else{b7=2740;break L27}if((c[dV>>2]|0)==3){uu(c[dW>>2]|0);c[dV>>2]=1}hK=~~ve;if(hK>>>0>=8){gG=c[m>>2]|0;cf(gG|0,144072,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=7,v)|0);break L3470}if((hK|0)!=7|(c[8510]|0)!=0){c[8506]=hK;break L3470}else{hK=c[m>>2]|0;aI(144280,44,1,hK|0);break L3470}}}while(0);uu(c[8510]|0);hF=c[13898]|0;L3781:do{if((hF|0)<(c[8272]|0)){gH=c[1054]|0;L3783:do{if((a[gH+(hF*40&-1)|0]&1)!=0){hK=c[gH+(hF*40&-1)+36>>2]|0;gG=gH+(hF*40&-1)+32|0;gE=c[10036]|0;gC=0;while(1){if((gC|0)>=(hK|0)){break}if((a[gE+((c[gG>>2]|0)+gC|0)|0]|0)==(a[gC+103664|0]|0)){gC=gC+1|0}else{break L3783}}if((gC|0)==1){vf=0;break L3781}}}while(0);a[14176]=1;is(aS);a[14176]=0;if((c[dX>>2]|0)==3){vf=c[dY>>2]|0;break}else{c[13898]=hF;vf=0;break}}else{vf=0}}while(0);c[8510]=vf;do{if((a[vf]|0)==0){uu(vf);c[8510]=0;if((c[8506]|0)!=7){break}c[8506]=0}else{c[8506]=7}}while(0);c[13898]=(c[13898]|0)+1;break L3470}}while(0);while(1){if((a[vb+143960|0]|0)==(a[gz+(vb+vd|0)|0]|0)){vg=vd;vh=vc}else{if((vb|0)!=4){vi=0;vj=0;vk=tv;break}vg=vd-1|0;vh=1}hF=vb+1|0;if((hF|0)<(vh+tt|0)){vb=hF;vc=vh;vd=vg}else{b7=2752;break}}do{if((b7|0)==2752){b7=0;if((vh|0)==0){if(!((vb|0)==7|(vb|0)==3)){vi=0;vj=0;vk=tv;break}}c[13898]=tq+1;if((a[26192]&1)==0){break L3470}hX(aU);break L3470}}while(0);while(1){if((a[vi+143888|0]|0)==(a[gz+(vi+vk|0)|0]|0)){vl=vk;vm=vj}else{if((vi|0)!=2){tz=tv;tA=0;break L3440}vl=vk-1|0;vm=1}hF=vi+1|0;if((hF|0)<(vm+tt|0)){vi=hF;vj=vm;vk=vl}else{break}}if((vm|0)==0){if(!((vi|0)==5|(vi|0)==1)){tz=tv;tA=0;break L3440}}hF=tq+1|0;c[13898]=hF;L3821:do{if((hF|0)<(tr|0)){if((a[ts+(hF*40&-1)|0]&1)==0){break}gH=c[ts+(hF*40&-1)+36>>2]|0;gG=ts+(hF*40&-1)+32|0;gE=0;while(1){if((gE|0)>=(gH|0)){b7=2767;break}if((a[gz+((c[gG>>2]|0)+gE|0)|0]|0)==(a[gE+103664|0]|0)){gE=gE+1|0}else{vn=0;break}}if((b7|0)==2767){b7=0;if((gE|0)==1){break}else{vn=0}}while(1){if((vn|0)>=(gH|0)){break}if((a[gz+((c[gG>>2]|0)+vn|0)|0]|0)==(a[vn+95280|0]|0)){vn=vn+1|0}else{break L3821}}if((vn|0)!=2){break}vo=tq+2|0;c[13898]=vo;if((vo|0)>=(tr|0)){b7=5205;break L27}L3835:do{if((a[ts+(vo*40&-1)|0]&1)!=0){gG=c[ts+(vo*40&-1)+36>>2]|0;gH=ts+(vo*40&-1)+32|0;gE=0;while(1){if((gE|0)>=(gG|0)){break}if((a[gz+((c[gH>>2]|0)+gE|0)|0]|0)==(a[gE+103664|0]|0)){gE=gE+1|0}else{break L3835}}if((gE|0)==1){b7=5206;break L27}}}while(0);dl(a1,0);fR(a1,aX,aZ,143600);gH=~~+h[aX>>3];gG=~~+h[aZ>>3];hK=gG|gH;if((a[26192]&1)!=0){if((hK|0)<0){break L3470}hX(a0)}if((hK|0)>-1){c[dR>>2]=gH;vp=gG}else{c[dR>>2]=c[6558];vp=c[6559]|0}c[dS>>2]=vp;hX(a0);break L3470}}while(0);if((a[26192]&1)!=0){break}c[dT>>2]=c[6558];c[dU>>2]=c[6559];hX(aW)}}while(0);gz=c[13898]|0;hF=c[8272]|0;if((gz|0)>=(hF|0)){break L44}tq=gz;tr=hF;ts=c[1054]|0}if((b7|0)==2503){b7=0;tz=c[tu>>2]|0;tA=1}if((tq|0)>=(tr|0)){break}if(tA){b7=5207;break L27}hF=c[10036]|0;gz=0;while(1){if((gz|0)>=(tt|0)){break}if((a[hF+(gz+tz|0)|0]|0)==(a[gz+103664|0]|0)){gz=gz+1|0}else{b7=5208;break L27}}if((gz|0)!=1){b7=5209;break L27}}else if((gD|0)==45){ll()}else if((gD|0)==56){hF=gv+1|0;c[13898]=hF;L3865:do{if((hF|0)<(c[8272]|0)){gG=gw+(hF*40&-1)|0;gH=gw+(hF*40&-1)+36|0;L3867:do{if((a[gG]&1)==0){vq=gw+(hF*40&-1)+32|0}else{hK=c[gH>>2]|0;nd=gw+(hF*40&-1)+32|0;hG=0;while(1){if((hG|0)>=(hK|0)){break}if((a[gB+((c[nd>>2]|0)+hG|0)|0]|0)==(a[hG+103664|0]|0)){hG=hG+1|0}else{vq=nd;break L3867}}if((hG|0)==1){break L3865}else{vq=nd}}}while(0);c[8764]=0;hK=c[gH>>2]|0;L3875:do{if((a[gG]&1)!=0&(hK|0)>0){nh=0;hR=0;hw=c[vq>>2]|0;while(1){if((a[nh+148408|0]|0)==(a[gB+(nh+hw|0)|0]|0)){vr=hw;vs=hR}else{if((nh|0)!=2){break L3875}vr=hw-1|0;vs=1}hC=nh+1|0;if((hC|0)<(vs+hK|0)){nh=hC;hR=vs;hw=vr}else{break}}if((vs|0)==0){if(!((nh|0)==1|(nh|0)==5)){break}}c[8764]=2;c[13898]=gv+2}}while(0);hK=is(aM)|0;gG=c[hK>>2]|0;if((gG|0)==1){vt=+(c[hK+8>>2]|0)}else if((gG|0)==2){vt=+h[hK+8>>3]}else if((gG|0)==3){vt=+uz(c[hK+8>>2]|0,0)}else{b7=2816;break L27}if((c[d7>>2]|0)==3){uu(c[d8>>2]|0);c[d7>>2]=1}h[4384]=vt;hK=c[13898]|0;if((c[8272]|0)<=(hK|0)){break L44}gG=c[1054]|0;if((a[gG+(hK*40&-1)|0]&1)==0){break L44}gH=c[gG+(hK*40&-1)+36>>2]|0;hw=gG+(hK*40&-1)+32|0;hR=c[10036]|0;nd=0;while(1){if((nd|0)>=(gH|0)){break}if((a[hR+((c[hw>>2]|0)+nd|0)|0]|0)==(a[nd+148464|0]|0)){nd=nd+1|0}else{break L44}}if((nd|0)!=1){break L44}c[6588]=0;hw=hK+1|0;c[13898]=hw;gH=c[gG+(hw*40&-1)+36>>2]|0;L3903:do{if((a[gG+(hw*40&-1)|0]&1)!=0&(gH|0)>0){hG=0;hC=0;hB=c[gG+(hw*40&-1)+32>>2]|0;while(1){if((a[hG+148408|0]|0)==(a[hR+(hG+hB|0)|0]|0)){vu=hB;vv=hC}else{if((hG|0)!=2){break L3903}vu=hB-1|0;vv=1}hS=hG+1|0;if((hS|0)<(vv+gH|0)){hG=hS;hC=vv;hB=vu}else{break}}if((vv|0)==0){if(!((hG|0)==1|(hG|0)==5)){break}}c[6588]=2;c[13898]=hK+2}}while(0);hK=is(aL)|0;gH=c[hK>>2]|0;if((gH|0)==1){vw=+(c[hK+8>>2]|0)}else if((gH|0)==2){vw=+h[hK+8>>3]}else if((gH|0)==3){vw=+uz(c[hK+8>>2]|0,0)}else{b7=2838;break L27}if((c[d9>>2]|0)==3){uu(c[eb>>2]|0);c[d9>>2]=1}h[3296]=vw;hK=c[13898]|0;if((c[8272]|0)<=(hK|0)){break L44}gH=c[1054]|0;if((a[gH+(hK*40&-1)|0]&1)==0){break L44}hR=c[gH+(hK*40&-1)+36>>2]|0;hw=gH+(hK*40&-1)+32|0;gG=c[10036]|0;nd=0;while(1){if((nd|0)>=(hR|0)){break}if((a[gG+((c[hw>>2]|0)+nd|0)|0]|0)==(a[nd+148464|0]|0)){nd=nd+1|0}else{break L44}}if((nd|0)!=1){break L44}c[1057]=0;hw=hK+1|0;c[13898]=hw;hR=c[gH+(hw*40&-1)+36>>2]|0;L3931:do{if((a[gH+(hw*40&-1)|0]&1)!=0&(hR|0)>0){hB=0;hC=0;nh=c[gH+(hw*40&-1)+32>>2]|0;while(1){if((a[hB+148408|0]|0)==(a[gG+(hB+nh|0)|0]|0)){vx=nh;vy=hC}else{if((hB|0)!=2){break L3931}vx=nh-1|0;vy=1}hS=hB+1|0;if((hS|0)<(vy+hR|0)){hB=hS;hC=vy;nh=vx}else{break}}if((vy|0)==0){if(!((hB|0)==1|(hB|0)==5)){break}}c[1057]=2;c[13898]=hK+2}}while(0);hK=is(aK)|0;hR=c[hK>>2]|0;if((hR|0)==1){vz=+(c[hK+8>>2]|0)}else if((hR|0)==2){vz=+h[hK+8>>3]}else if((hR|0)==3){vz=+uz(c[hK+8>>2]|0,0)}else{b7=2860;break L27}if((c[ec>>2]|0)==3){uu(c[ed>>2]|0);c[ec>>2]=1}h[531]=vz;hK=c[13898]|0;if((c[8272]|0)<=(hK|0)){break L44}hR=c[1054]|0;if((a[hR+(hK*40&-1)|0]&1)==0){break L44}gG=c[hR+(hK*40&-1)+36>>2]|0;hw=hR+(hK*40&-1)+32|0;gH=c[10036]|0;nd=0;while(1){if((nd|0)>=(gG|0)){break}if((a[gH+((c[hw>>2]|0)+nd|0)|0]|0)==(a[nd+148464|0]|0)){nd=nd+1|0}else{break L44}}if((nd|0)!=1){break L44}c[14091]=0;hw=hK+1|0;c[13898]=hw;gG=c[hR+(hw*40&-1)+36>>2]|0;L3959:do{if((a[hR+(hw*40&-1)|0]&1)!=0&(gG|0)>0){nh=0;hC=0;hG=c[hR+(hw*40&-1)+32>>2]|0;while(1){if((a[nh+148408|0]|0)==(a[gH+(nh+hG|0)|0]|0)){vA=hG;vB=hC}else{if((nh|0)!=2){break L3959}vA=hG-1|0;vB=1}hS=nh+1|0;if((hS|0)<(vB+gG|0)){nh=hS;hC=vB;hG=vA}else{break}}if((vB|0)==0){if(!((nh|0)==1|(nh|0)==5)){break}}c[14091]=2;c[13898]=hK+2}}while(0);hK=is(aN)|0;gG=c[hK>>2]|0;if((gG|0)==1){vC=+(c[hK+8>>2]|0)}else if((gG|0)==2){vC=+h[hK+8>>3]}else if((gG|0)==3){vC=+uz(c[hK+8>>2]|0,0)}else{b7=2882;break L27}if((c[ee>>2]|0)==3){uu(c[ef>>2]|0);c[ee>>2]=1}h[7048]=vC;break L44}}while(0);h[7048]=0.0;h[531]=0.0;h[3296]=0.0;h[4384]=0.0}else if((gD|0)==57){hF=gv+1|0;c[13898]=hF;L3982:do{if((hF|0)<(c[8272]|0)){L3984:do{if((a[gw+(hF*40&-1)|0]&1)!=0){gz=c[gw+(hF*40&-1)+36>>2]|0;hK=gw+(hF*40&-1)+32|0;gG=0;while(1){if((gG|0)>=(gz|0)){break}if((a[gB+((c[hK>>2]|0)+gG|0)|0]|0)==(a[gG+103664|0]|0)){gG=gG+1|0}else{break L3984}}if((gG|0)==1){b7=2892;break L3982}}}while(0);hK=is(aH)|0;gz=c[hK>>2]|0;if((gz|0)==1){vD=+(c[hK+8>>2]|0)}else if((gz|0)==2){vD=+h[hK+8>>3]}else if((gz|0)==3){vD=+uz(c[hK+8>>2]|0,0)}else{b7=2897;break L27}if((c[eg>>2]|0)==3){uu(c[eh>>2]|0);c[eg>>2]=1}g[184]=vD;vE=c[13898]|0;if((c[8272]|0)<=(vE|0)){b7=5210;break L27}hK=c[1054]|0;if((a[hK+(vE*40&-1)|0]&1)==0){b7=5211;break L27}gz=c[hK+(vE*40&-1)+36>>2]|0;nh=hK+(vE*40&-1)+32|0;hK=c[10036]|0;gH=0;while(1){if((gH|0)>=(gz|0)){break}if((a[hK+((c[nh>>2]|0)+gH|0)|0]|0)==(a[gH+148464|0]|0)){gH=gH+1|0}else{b7=5212;break L27}}if((gH|0)!=1){b7=5213;break L27}c[13898]=vE+1;nh=is(aJ)|0;hK=c[nh>>2]|0;if((hK|0)==1){vF=+(c[nh+8>>2]|0)}else if((hK|0)==2){vF=+h[nh+8>>3]}else if((hK|0)==3){vF=+uz(c[nh+8>>2]|0,0)}else{b7=2911;break L27}if((c[ei>>2]|0)==3){uu(c[ej>>2]|0);c[ei>>2]=1}vG=vF}else{b7=2892}}while(0);if((b7|0)==2892){b7=0;g[184]=0.0;vG=0.0}g[44]=vG}else if((gD|0)==58){vH=gv+1|0;c[13898]=vH;if((a[33512]&1)!=0){b7=2917;break L27}L4019:do{if((vH|0)<(c[8272]|0)){L4021:do{if((a[gw+(vH*40&-1)|0]&1)!=0){hF=c[gw+(vH*40&-1)+36>>2]|0;nh=gw+(vH*40&-1)+32|0;hK=0;while(1){if((hK|0)>=(hF|0)){b7=2923;break}if((a[gB+((c[nh>>2]|0)+hK|0)|0]|0)==(a[hK+103664|0]|0)){hK=hK+1|0}else{vI=0;break}}if((b7|0)==2923){b7=0;if((hK|0)==1){b7=2924;break L4019}else{vI=0}}while(1){if((vI|0)>=(hF|0)){break}if((a[gB+((c[nh>>2]|0)+vI|0)|0]|0)==(a[vI+103664|0]|0)){vI=vI+1|0}else{break L4021}}if((vI|0)==1){b7=2931;break L27}}}while(0);a[14176]=1;is(aE);a[14176]=0;if((c[ek>>2]|0)!=3){b7=2930;break L27}gH=c[el>>2]|0;c[aF>>2]=gH;if((gH|0)==0){b7=2933;break L27}iQ(aF);gH=c[aF>>2]|0;lj(gH);nh=c[8244]|0;if((gH|0)==(nh|0)){break}if((gH|0)==0){vJ=nh}else{uu(gH);vJ=c[8244]|0}c[aF>>2]=vJ}else{b7=2924}}while(0);do{if((b7|0)==2924){b7=0;lj(0);gH=c[8244]|0;if((gH|0)==0){break}uu(gH);c[8244]=0}}while(0);c[7271]=-1}else if((gD|0)==59){c[13898]=gv+1;if((a[32936]&1)!=0){break}a[32936]=1;if((a[30528]&1)!=0){break}b[12272]=116;w=121;a[24595]=w&255;w=w>>8;a[24596|0]=w&255;if((a[37400]&1)==0){break}aI(149344,51,1,c[m>>2]|0)}else if((gD|0)==61){gH=gv+1|0;c[13898]=gH;nh=c[8272]|0;L4048:do{if((gH|0)<(nh|0)){hF=a[gw+(gH*40&-1)|0]|0;L4050:do{if((hF&1)!=0){hK=c[gw+(gH*40&-1)+36>>2]|0;gG=gw+(gH*40&-1)+32|0;gz=0;while(1){if((gz|0)>=(hK|0)){break}if((a[gB+((c[gG>>2]|0)+gz|0)|0]|0)==(a[gz+103664|0]|0)){gz=gz+1|0}else{break L4050}}if((gz|0)==1){break L4048}}}while(0);gG=gv+2|0;vK=gH;hK=nh;hw=gw;hR=hF;L4057:while(1){nd=(hR&1)==0;hG=c[hw+(vK*40&-1)+36>>2]|0;L4059:do{if(nd){vL=c[10036]|0;vM=hw+(vK*40&-1)+32|0}else{hC=hw+(vK*40&-1)+32|0;hB=c[10036]|0;hS=0;while(1){if((hS|0)>=(hG|0)){break}if((a[hB+((c[hC>>2]|0)+hS|0)|0]|0)==(a[hS+103664|0]|0)){hS=hS+1|0}else{vL=hB;vM=hC;break L4059}}if((hS|0)==1){break L4057}else{vL=hB;vM=hC}}}while(0);gz=c[vM>>2]|0;gx=(hG|0)>0;gy=23264;gA=95280;L4067:while(1){L4069:do{if(!nd){if(gx){ne=0;ho=0;gF=gz;while(1){ng=a[gA+ne|0]|0;if(ng<<24>>24==(a[vL+(ne+gF|0)|0]|0)){vN=gF;vO=ho}else{if(ng<<24>>24!=36){break L4069}vN=gF-1|0;vO=1}vP=ne+1|0;if((vP|0)<(vO+hG|0)){ne=vP;ho=vO;gF=vN}else{break}}if((vO|0)==0){vQ=vP}else{vR=gy;break L4067}}else{vQ=0}gF=a[gA+vQ|0]|0;if((gF<<24>>24|0)==36|(gF<<24>>24|0)==0){vR=gy;break L4067}}}while(0);hC=gy+8|0;hB=c[hC>>2]|0;if((hB|0)==0){vR=hC;break}else{gy=hC;gA=hB}}gA=c[vR+4>>2]|0;L4082:do{if((gA|0)==1){c[13898]=vK+1;if((i9(30632)|0)!=0){break L44}gy=(c[13898]|0)-1|0;c[13898]=gy;if((gy|0)!=(gG|0)){vS=gy;break}c[7662]=1;vS=gG}else if((gA|0)==2){vT=vK+1|0;c[13898]=vT;if((vT|0)>=(hK|0)){b7=5216;break L27}L4088:do{if((a[hw+(vT*40&-1)|0]&1)!=0){gy=c[hw+(vT*40&-1)+36>>2]|0;hG=hw+(vT*40&-1)+32|0;gz=0;while(1){if((gz|0)>=(gy|0)){break}if((a[vL+((c[hG>>2]|0)+gz|0)|0]|0)==(a[gz+103664|0]|0)){gz=gz+1|0}else{break L4088}}if((gz|0)==1){b7=5217;break L27}}}while(0);hG=is(aC)|0;gy=c[hG>>2]|0;if((gy|0)==1){vU=+(c[hG+8>>2]|0)}else if((gy|0)==2){vU=+h[hG+8>>3]}else if((gy|0)==3){vU=+uz(c[hG+8>>2]|0,0)}else{b7=2983;break L27}if((c[em>>2]|0)==3){uu(c[en>>2]|0);c[em>>2]=1}c[7664]=~~vU;vV=c[13898]|0;if((c[8272]|0)<=(vV|0)){b7=5218;break L27}hG=c[1054]|0;if((a[hG+(vV*40&-1)|0]&1)==0){b7=5219;break L27}gy=c[hG+(vV*40&-1)+36>>2]|0;gx=hG+(vV*40&-1)+32|0;hG=c[10036]|0;nd=0;while(1){if((nd|0)>=(gy|0)){break}if((a[hG+((c[gx>>2]|0)+nd|0)|0]|0)==(a[nd+148464|0]|0)){nd=nd+1|0}else{b7=5220;break L27}}if((nd|0)!=1){b7=5221;break L27}c[13898]=vV+1;gx=is(aB)|0;hG=c[gx>>2]|0;if((hG|0)==1){vW=+(c[gx+8>>2]|0)}else if((hG|0)==2){vW=+h[gx+8>>3]}else if((hG|0)==3){vW=+uz(c[gx+8>>2]|0,0)}else{b7=2997;break L27}if((c[eo>>2]|0)==3){uu(c[ep>>2]|0);c[eo>>2]=1}c[7665]=~~vW;gx=(c[13898]|0)-1|0;c[13898]=gx;vS=gx}else if((gA|0)==3){a[30641]=102;vS=vK}else if((gA|0)==4){a[30641]=98;vS=vK}else if((gA|0)==5){a[30641]=97;vS=vK}else if((gA|0)==6){a[30641]=100;vS=vK}else if((gA|0)==7){vX=vK+1|0;c[13898]=vX;gx=c[hw+(vX*40&-1)+36>>2]|0;hG=c[hw+(vX*40&-1)+32>>2]|0;gy=(a[hw+(vX*40&-1)|0]&1)==0;if((gx|0)>0&(gy^1)){vY=0;vZ=0;v_=hG}else{b7=5222;break L27}while(1){if((a[vY+170048|0]|0)==(a[vL+(vY+v_|0)|0]|0)){v$=v_;v0=vZ}else{if((vY|0)!=1){break}v$=v_-1|0;v0=1}hB=vY+1|0;if((hB|0)<(v0+gx|0)){vY=hB;vZ=v0;v_=v$}else{b7=3010;break}}do{if((b7|0)==3010){b7=0;if((v0|0)==0){if(!((vY|0)==0|(vY|0)==5)){break}}a[30639]=98;vS=vX;break L4082}}while(0);if(gy){b7=5223;break L27}else{v1=0;v2=0;v3=hG}while(1){if((a[v1+149304|0]|0)==(a[vL+(v1+v3|0)|0]|0)){v4=v3;v5=v2}else{if((v1|0)!=1){v6=0;v7=0;v8=hG;break}v4=v3-1|0;v5=1}nd=v1+1|0;if((nd|0)<(v5+gx|0)){v1=nd;v2=v5;v3=v4}else{b7=3018;break}}do{if((b7|0)==3018){b7=0;if((v5|0)==0){if(!((v1|0)==0|(v1|0)==6)){v6=0;v7=0;v8=hG;break}}a[30639]=99;vS=vX;break L4082}}while(0);while(1){if((a[v6+169576|0]|0)==(a[vL+(v6+v8|0)|0]|0)){v9=v8;wa=v7}else{if((v6|0)!=1){b7=5224;break L27}v9=v8-1|0;wa=1}hG=v6+1|0;if((hG|0)<(wa+gx|0)){v6=hG;v7=wa;v8=v9}else{break}}if((wa|0)==0){if(!((v6|0)==0|(v6|0)==3)){b7=5225;break L27}}a[30639]=114;vS=vX}else if((gA|0)==10){a[30642]=49;vS=vK}else if((gA|0)==11){a[30642]=52;vS=vK}else if((gA|0)==12){a[30632]=98;a[30633]=0;c[12890]=352;c[10058]=352;c[5094]=1;vS=vK}else if((gA|0)==8){a[30640]=1;vS=vK}else if((gA|0)==9){a[30640]=0;vS=vK}else if((gA|0)==13){gx=vK+1|0;c[13898]=gx;c[7661]=-1;L4162:do{if((a[hw+(gx*40&-1)|0]&1)==0){b7=3045}else{hG=c[10810]|0;if((hG|0)==0){break}gy=(hK|0)>(gx|0);nd=hw+(gx*40&-1)+36|0;hB=hw+(gx*40&-1)+32|0;hC=hG;L4165:while(1){hG=c[hC+4>>2]|0;L4167:do{if(gy){hS=c[nd>>2]|0;gF=0;while(1){if((gF|0)>=(hS|0)){break}if((a[vL+((c[hB>>2]|0)+gF|0)|0]|0)==(a[hG+gF|0]|0)){gF=gF+1|0}else{break L4167}}if((a[hG+gF|0]|0)==0){break L4165}}}while(0);hG=c[hC>>2]|0;if((hG|0)==0){break L4162}else{hC=hG}}if((a[hC+8|0]&1)!=0){break}if((c[hC+16>>2]|0)==1){b7=3045}}}while(0);do{if((b7|0)==3045){b7=0;gx=is(aD)|0;hB=c[gx>>2]|0;if((hB|0)==1){wb=+(c[gx+8>>2]|0)}else if((hB|0)==2){wb=+h[gx+8>>3]}else if((hB|0)==3){wb=+uz(c[gx+8>>2]|0,0)}else{b7=3049;break L27}if((c[eq>>2]|0)==3){uu(c[er>>2]|0);c[eq>>2]=1}gx=~~wb;c[7661]=gx;if((gx|0)>=-1){break}c[7661]=-1}}while(0);gx=(c[13898]|0)-1|0;c[13898]=gx;vS=gx}else if((gA|0)==14){c[7661]=0;vS=vK}else if((gA|0)==15|(gA|0)==16|(gA|0)==17|(gA|0)==18){if((a[37400]&1)==0){wc=vK;b7=3058;break}uh(vK,168664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);wc=c[13898]|0;b7=3058}else if((gA|0)==19|(gA|0)==20){wc=vK;b7=3058}else if((gA|0)==21|(gA|0)==22){c[7662]=0;vS=vK}else if((gA|0)==23){wd=vK+1|0;c[13898]=wd;if((hK|0)<=(wd|0)){b7=5226;break L27}gx=(a[hw+(wd*40&-1)|0]&1)==0;if(gx){b7=5227;break L27}hB=c[hw+(wd*40&-1)+36>>2]|0;nd=hw+(wd*40&-1)+32|0;gy=0;while(1){if((gy|0)>=(hB|0)){b7=3065;break}if((a[vL+((c[nd>>2]|0)+gy|0)|0]|0)==(a[gy+105792|0]|0)){gy=gy+1|0}else{break}}do{if((b7|0)==3065){b7=0;if((gy|0)!=4){break}c[7663]=4;vS=wd;break L4082}}while(0);if(gx){b7=5228;break L27}gy=c[hw+(wd*40&-1)+36>>2]|0;nd=hw+(wd*40&-1)+32|0;hB=0;while(1){if((hB|0)>=(gy|0)){b7=3071;break}if((a[vL+((c[nd>>2]|0)+hB|0)|0]|0)==(a[hB+167728|0]|0)){hB=hB+1|0}else{break}}do{if((b7|0)==3071){b7=0;if((hB|0)!=7){break}c[7663]=5;vS=wd;break L4082}}while(0);if(gx){b7=5229;break L27}hB=c[hw+(wd*40&-1)+36>>2]|0;nd=hw+(wd*40&-1)+32|0;gy=0;while(1){if((gy|0)>=(hB|0)){b7=3077;break}if((a[vL+((c[nd>>2]|0)+gy|0)|0]|0)==(a[gy+100616|0]|0)){gy=gy+1|0}else{break}}do{if((b7|0)==3077){b7=0;if((gy|0)!=6){break}c[7663]=6;vS=wd;break L4082}}while(0);if(gx){b7=5230;break L27}gy=c[hw+(wd*40&-1)+36>>2]|0;nd=hw+(wd*40&-1)+32|0;hB=0;while(1){if((hB|0)>=(gy|0)){b7=3083;break}if((a[vL+((c[nd>>2]|0)+hB|0)|0]|0)==(a[hB+103256|0]|0)){hB=hB+1|0}else{break}}do{if((b7|0)==3083){b7=0;if((hB|0)!=3){break}c[7663]=7;vS=wd;break L4082}}while(0);if(gx){b7=5231;break L27}hB=c[hw+(wd*40&-1)+36>>2]|0;nd=hw+(wd*40&-1)+32|0;gy=0;while(1){if((gy|0)>=(hB|0)){b7=3089;break}if((a[vL+((c[nd>>2]|0)+gy|0)|0]|0)==(a[gy+99528|0]|0)){gy=gy+1|0}else{break}}do{if((b7|0)==3089){b7=0;if((gy|0)!=3){break}c[7663]=8;vS=wd;break L4082}}while(0);if(gx){b7=5232;break L27}gy=c[hw+(wd*40&-1)+36>>2]|0;nd=hw+(wd*40&-1)+32|0;hB=0;while(1){if((hB|0)>=(gy|0)){b7=3095;break}if((a[vL+((c[nd>>2]|0)+hB|0)|0]|0)==(a[hB+166192|0]|0)){hB=hB+1|0}else{break}}do{if((b7|0)==3095){b7=0;if((hB|0)!=2){break}c[7663]=0;vS=wd;break L4082}}while(0);if(gx){b7=5233;break L27}hB=c[hw+(wd*40&-1)+36>>2]|0;nd=hw+(wd*40&-1)+32|0;gy=0;while(1){if((gy|0)>=(hB|0)){b7=3101;break}if((a[vL+((c[nd>>2]|0)+gy|0)|0]|0)==(a[gy+165720|0]|0)){gy=gy+1|0}else{break}}do{if((b7|0)==3101){b7=0;if((gy|0)!=2){break}c[7663]=1;vS=wd;break L4082}}while(0);if(gx){b7=5234;break L27}gy=c[hw+(wd*40&-1)+36>>2]|0;nd=hw+(wd*40&-1)+32|0;hB=0;while(1){if((hB|0)>=(gy|0)){b7=3107;break}if((a[vL+((c[nd>>2]|0)+hB|0)|0]|0)==(a[hB+165344|0]|0)){hB=hB+1|0}else{break}}do{if((b7|0)==3107){b7=0;if((hB|0)!=2){break}c[7663]=2;vS=wd;break L4082}}while(0);if(gx){b7=5235;break L27}hB=c[hw+(wd*40&-1)+36>>2]|0;nd=hw+(wd*40&-1)+32|0;gy=0;while(1){if((gy|0)>=(hB|0)){break}if((a[vL+((c[nd>>2]|0)+gy|0)|0]|0)==(a[gy+164912|0]|0)){gy=gy+1|0}else{b7=5236;break L27}}if((gy|0)!=2){b7=5237;break L27}c[7663]=3;vS=wd}else{b7=3116;break L27}}while(0);if((b7|0)==3058){b7=0;c[7662]=1;vS=wc}gA=vS+1|0;c[13898]=gA;nd=c[8272]|0;if((gA|0)>=(nd|0)){break}hB=c[1054]|0;vK=gA;hK=nd;hw=hB;hR=a[hB+(gA*40&-1)|0]|0}if((a[30641]|0)!=97|(a[30639]|0)==98){break L44}a[30641]=102;break L44}}while(0);b[15316]=115;a[30639]=98;a[30640]=0;a[30641]=97;a[30642]=52;c[7661]=0;c[7663]=4;c[7664]=1;c[7665]=1;c[7662]=1}else if((gD|0)==60){nh=gv+1|0;c[13898]=nh;gH=c[8272]|0;L4272:do{if((nh|0)<(gH|0)){hR=a[gw+(nh*40&-1)|0]|0;L4274:do{if((hR&1)==0){we=0;wf=0;wg=nh;wh=gH;wi=gw;wj=hR}else{hw=c[gw+(nh*40&-1)+36>>2]|0;hK=gw+(nh*40&-1)+32|0;gG=0;while(1){if((gG|0)>=(hw|0)){break}if((a[gB+((c[hK>>2]|0)+gG|0)|0]|0)==(a[gG+103664|0]|0)){gG=gG+1|0}else{we=0;wf=0;wg=nh;wh=gH;wi=gw;wj=hR;break L4274}}if((gG|0)==1){b7=3127;break L4272}else{we=0;wf=0;wg=nh;wh=gH;wi=gw;wj=hR}}}while(0);L4280:while(1){hR=(wj&1)==0;hK=c[wi+(wg*40&-1)+36>>2]|0;L4282:do{if(hR){wk=c[10036]|0;wl=wi+(wg*40&-1)+32|0}else{hw=wi+(wg*40&-1)+32|0;hF=c[10036]|0;gA=0;while(1){if((gA|0)>=(hK|0)){break}if((a[hF+((c[hw>>2]|0)+gA|0)|0]|0)==(a[gA+103664|0]|0)){gA=gA+1|0}else{wk=hF;wl=hw;break L4282}}if((gA|0)==1){wm=we;break L4280}else{wk=hF;wl=hw}}}while(0);gG=c[wl>>2]|0;gy=(hK|0)>0;hB=23456;nd=140016;L4290:while(1){L4292:do{if(!hR){if(gy){gx=0;gz=0;hG=gG;while(1){gC=a[nd+gx|0]|0;if(gC<<24>>24==(a[wk+(gx+hG|0)|0]|0)){wn=hG;wo=gz}else{if(gC<<24>>24!=36){break L4292}wn=hG-1|0;wo=1}wp=gx+1|0;if((wp|0)<(wo+hK|0)){gx=wp;gz=wo;hG=wn}else{break}}if((wo|0)==0){wq=wp}else{wr=hB;break L4290}}else{wq=0}hG=a[nd+wq|0]|0;if((hG<<24>>24|0)==36|(hG<<24>>24|0)==0){wr=hB;break L4290}}}while(0);hw=hB+8|0;hF=c[hw>>2]|0;if((hF|0)==0){wr=hw;break}else{hB=hw;nd=hF}}nd=c[wr+4>>2]|0;L4305:do{if((nd|0)==1){a[20668]=112;ws=wf;wt=we;wu=wg}else if((nd|0)==2){a[20668]=110;ws=wf;wt=we;wu=wg}else if((nd|0)==3){c[5163]=103;ws=wf;wt=we;wu=wg}else if((nd|0)==13){c[13898]=wg+1;hB=is(aA)|0;hK=c[hB>>2]|0;if((hK|0)==1){wv=+(c[hB+8>>2]|0)}else if((hK|0)==2){wv=+h[hB+8>>3]}else if((hK|0)==3){wv=+uz(c[hB+8>>2]|0,0)}else{b7=3153;break L27}if((c[es>>2]|0)==3){uu(c[et>>2]|0);c[es>>2]=1}h[2705]=wv;hB=(c[13898]|0)-1|0;c[13898]=hB;ws=wf;wt=we;wu=hB}else if((nd|0)==4){hB=c[7640]|0;if((hB|0)==48){c[5163]=114;ws=wf;wt=we;wu=wg;break}else{c[5163]=hB;ws=wf;wt=we;wu=wg;break}}else if((nd|0)==5){if((wf|0)!=0){b7=3161;break L27}c[13898]=wg+1;hB=is(ay)|0;hK=c[hB>>2]|0;if((hK|0)==1){ww=+(c[hB+8>>2]|0)}else if((hK|0)==2){ww=+h[hB+8>>3]}else if((hK|0)==3){ww=+uz(c[hB+8>>2]|0,0)}else{b7=3166;break L27}if((c[eu>>2]|0)==3){uu(c[ev>>2]|0);c[eu>>2]=1}hB=~~ww;if((((hB|0)>-1?hB:-hB|0)|0)>=(c[5162]|0)){b7=3170;break L27}c[5164]=hB;hB=c[13898]|0;L4333:do{if((c[8272]|0)>(hB|0)){hK=c[1054]|0;if((a[hK+(hB*40&-1)|0]&1)==0){break}gG=c[hK+(hB*40&-1)+36>>2]|0;gy=hK+(hB*40&-1)+32|0;hK=c[10036]|0;hR=0;while(1){if((hR|0)>=(gG|0)){break}if((a[hK+((c[gy>>2]|0)+hR|0)|0]|0)==(a[hR+148464|0]|0)){hR=hR+1|0}else{break L4333}}if((hR|0)!=1){break}c[13898]=hB+1;gy=is(ax)|0;hK=c[gy>>2]|0;if((hK|0)==1){wx=+(c[gy+8>>2]|0)}else if((hK|0)==2){wx=+h[gy+8>>3]}else if((hK|0)==3){wx=+uz(c[gy+8>>2]|0,0)}else{b7=3182;break L27}if((c[ew>>2]|0)==3){uu(c[ex>>2]|0);c[ew>>2]=1}gy=~~wx;if((((gy|0)>-1?gy:-gy|0)|0)>=(c[5162]|0)){b7=3186;break L27}c[5165]=gy;gy=c[13898]|0;L4350:do{if((c[8272]|0)>(gy|0)){hK=c[1054]|0;if((a[hK+(gy*40&-1)|0]&1)==0){break}gG=c[hK+(gy*40&-1)+36>>2]|0;hF=hK+(gy*40&-1)+32|0;hK=c[10036]|0;hw=0;while(1){if((hw|0)>=(gG|0)){break}if((a[hK+((c[hF>>2]|0)+hw|0)|0]|0)==(a[hw+148464|0]|0)){hw=hw+1|0}else{break L4350}}if((hw|0)!=1){break}c[13898]=gy+1;hF=is(aw)|0;hK=c[hF>>2]|0;if((hK|0)==1){wy=+(c[hF+8>>2]|0)}else if((hK|0)==2){wy=+h[hF+8>>3]}else if((hK|0)==3){wy=+uz(c[hF+8>>2]|0,0)}else{b7=3198;break L27}if((c[eA>>2]|0)==3){uu(c[eB>>2]|0);c[eA>>2]=1}hF=~~wy;if((((hF|0)>-1?hF:-hF|0)|0)>=(c[5162]|0)){b7=3202;break L27}c[5166]=hF;hF=(c[13898]|0)-1|0;c[13898]=hF;c[5163]=114;c[7640]=114;ws=1;wt=we;wu=hF;break L4305}}while(0);hR=gy-1|0;c[13898]=hR;ws=1;wt=we;wu=hR;break L4305}}while(0);hR=hB-1|0;c[13898]=hR;ws=1;wt=we;wu=hR}else if((nd|0)==14){if((wf|0)!=0){b7=3205;break L27}c[5163]=99;h[2706]=.5;h[2707]=-1.5;h[2708]=1.0;hR=wg+1|0;c[13898]=hR;hF=hR;hR=wh;hK=wi;L4371:while(1){gG=a[hK+(hF*40&-1)|0]&1;L4373:do{if((hR|0)>(hF|0)){if(gG<<24>>24==0){wz=0;b7=3212;break}gA=c[hK+(hF*40&-1)+36>>2]|0;hG=hK+(hF*40&-1)+32|0;gz=c[10036]|0;gx=0;while(1){if((gx|0)>=(gA|0)){break}if((a[gz+((c[hG>>2]|0)+gx|0)|0]|0)==(a[gx+74592|0]|0)){gx=gx+1|0}else{wz=gG;b7=3212;break L4373}}if((gx|0)!=5){wA=gA;wB=hG;wC=gG;b7=3222;break}c[13898]=hF+1;gz=is(av)|0;hw=c[gz>>2]|0;if((hw|0)==1){wD=+(c[gz+8>>2]|0)}else if((hw|0)==2){wD=+h[gz+8>>3]}else if((hw|0)==3){wD=+uz(c[gz+8>>2]|0,0)}else{b7=3218;break L27}if((c[eD>>2]|0)==3){uu(c[eE>>2]|0);c[eD>>2]=1}h[2706]=wD}else{wz=gG;b7=3212}}while(0);if((b7|0)==3212){b7=0;wA=c[hK+(hF*40&-1)+36>>2]|0;wB=hK+(hF*40&-1)+32|0;wC=wz;b7=3222}L4391:do{if((b7|0)==3222){b7=0;gG=c[wB>>2]|0;if(!((wA|0)>0&wC<<24>>24!=0)){break L4371}gy=c[10036]|0;gz=0;hw=0;hC=gG;while(1){if((a[gz+158032|0]|0)==(a[gy+(gz+hC|0)|0]|0)){wE=hC;wF=hw}else{if((gz|0)!=3){wG=0;wH=0;wI=gG;break}wE=hC-1|0;wF=1}gC=gz+1|0;if((gC|0)<(wF+wA|0)){gz=gC;hw=wF;hC=wE}else{b7=3228;break}}do{if((b7|0)==3228){b7=0;if((wF|0)==0){if(!((gz|0)==6|(gz|0)==2)){wG=0;wH=0;wI=gG;break}}c[13898]=hF+1;hC=is(au)|0;hw=c[hC>>2]|0;if((hw|0)==1){wJ=+(c[hC+8>>2]|0)}else if((hw|0)==2){wJ=+h[hC+8>>3]}else if((hw|0)==3){wJ=+uz(c[hC+8>>2]|0,0)}else{b7=3234;break L27}if((c[eH>>2]|0)==3){uu(c[eI>>2]|0);c[eH>>2]=1}h[2707]=wJ;break L4391}}while(0);while(1){if((a[wG+156112|0]|0)==(a[gy+(wG+wI|0)|0]|0)){wK=wI;wL=wH}else{if((wG|0)!=3){break L4371}wK=wI-1|0;wL=1}gG=wG+1|0;if((gG|0)<(wL+wA|0)){wG=gG;wH=wL;wI=wK}else{break}}if((wL|0)==0){if(!((wG|0)==2|(wG|0)==10)){break L4371}}c[13898]=hF+1;gy=is(at)|0;gG=c[gy>>2]|0;if((gG|0)==1){wM=+(c[gy+8>>2]|0)}else if((gG|0)==2){wM=+h[gy+8>>3]}else if((gG|0)==3){wM=+uz(c[gy+8>>2]|0,0)}else{b7=3249;break L27}if((c[eF>>2]|0)==3){uu(c[eG>>2]|0);c[eF>>2]=1}h[2708]=wM}}while(0);hF=c[13898]|0;hR=c[8272]|0;hK=c[1054]|0}hK=hF-1|0;c[13898]=hK;ws=1;wt=we;wu=hK}else if((nd|0)==9){if((wf|0)!=0){b7=3255;break L27}c[13898]=wg+1;c[7271]=-1;uu(c[5173]|0);hK=ut(256)|0;if((hK|0)==0){gk();hR=ut(256)|0;if((hR|0)==0){b7=3258;break L27}else{wN=hR}}else{wN=hK}hK=wN;c[5173]=hK;wO=c[13898]|0;hR=c[8272]|0;do{if((wO|0)<(hR|0)){hB=c[1054]|0;if((a[hB+(wO*40&-1)|0]&1)==0){b7=5238;break L27}gy=c[hB+(wO*40&-1)+36>>2]|0;gG=hB+(wO*40&-1)+32|0;gz=c[10036]|0;hC=0;while(1){if((hC|0)>=(gy|0)){b7=3264;break}if((a[gz+((c[gG>>2]|0)+hC|0)|0]|0)==(a[hC+103664|0]|0)){hC=hC+1|0}else{wP=0;break}}if((b7|0)==3264){b7=0;if((hC|0)==1){wQ=0;wR=hK;b7=3265;break}else{wP=0}}while(1){if((wP|0)>=(gy|0)){break}if((a[gz+((c[gG>>2]|0)+wP|0)|0]|0)==(a[wP+199040|0]|0)){wP=wP+1|0}else{b7=5239;break L27}}if((wP|0)==1){wS=8;wT=0;wU=-1;wV=wO;wW=hR;wX=hB;wY=gz}else{b7=5240;break L27}L4450:while(1){gG=wV+1|0;c[13898]=gG;if((gG|0)>=(wW|0)){wZ=wT;w_=wU;w$=gG;break}L4453:do{if((a[wX+(gG*40&-1)|0]&1)!=0){gy=c[wX+(gG*40&-1)+36>>2]|0;hC=wX+(gG*40&-1)+32|0;hw=0;while(1){if((hw|0)>=(gy|0)){break}if((a[wY+((c[hC>>2]|0)+hw|0)|0]|0)==(a[hw+103664|0]|0)){hw=hw+1|0}else{break L4453}}if((hw|0)==1){wZ=wT;w_=wU;w$=gG;break L4450}}}while(0);gG=is(ap)|0;hC=c[gG>>2]|0;if((hC|0)==1){w0=+(c[gG+8>>2]|0)}else if((hC|0)==2){w0=+h[gG+8>>3]}else if((hC|0)==3){w0=+uz(c[gG+8>>2]|0,0)}else{b7=3282;break L27}if((c[eJ>>2]|0)==3){uu(c[eK>>2]|0);c[eJ>>2]=1}gG=c[13898]|0;L4468:do{if((gG|0)<(c[8272]|0)){hC=c[1054]|0;L4470:do{if((a[hC+(gG*40&-1)|0]&1)!=0){gy=c[hC+(gG*40&-1)+36>>2]|0;gF=hC+(gG*40&-1)+32|0;hG=c[10036]|0;gA=0;while(1){if((gA|0)>=(gy|0)){break}if((a[hG+((c[gF>>2]|0)+gA|0)|0]|0)==(a[gA+103664|0]|0)){gA=gA+1|0}else{break L4470}}if((gA|0)==1){b7=3304;break L4468}}}while(0);a[14176]=1;is(ao);a[14176]=0;if((c[eL>>2]|0)!=3){c[13898]=gG;b7=3304;break}hC=c[eM>>2]|0;if((hC|0)==0){b7=3304;break}if((a[hC]|0)==35){if((ca(hC|0,150416,(v=i,i=i+24|0,c[v>>2]=aq,c[v+8>>2]=ar,c[v+16>>2]=as,v)|0)|0)!=3){b7=3296;break L27}w1=wT;w2=c[as>>2]|0;w3=c[ar>>2]|0;w4=c[aq>>2]|0}else{hw=c[7642]|0;while(1){gF=c[hw>>2]|0;if((gF|0)==0){b7=3302;break L27}if((aY(hC|0,gF|0)|0)==0){break}else{hw=hw+8|0}}gF=c[hw+4>>2]|0;w1=1;w2=gF&255;w3=gF>>>8&255;w4=gF>>>16&255}uu(hC);w5=w1;w6=+(w2|0)/255.0;w7=+(w3|0)/255.0;w8=+(w4|0)/255.0}else{b7=3304}}while(0);if((b7|0)==3304){b7=0;gG=is(an)|0;gF=c[gG>>2]|0;if((gF|0)==1){w9=+(c[gG+8>>2]|0)}else if((gF|0)==2){w9=+h[gG+8>>3]}else if((gF|0)==3){w9=+uz(c[gG+8>>2]|0,0)}else{b7=3308;break L27}if((c[eN>>2]|0)==3){uu(c[eO>>2]|0);c[eN>>2]=1}if(w9<0.0|w9>1.0){b7=3312;break L27}gG=is(am)|0;gF=c[gG>>2]|0;if((gF|0)==1){xa=+(c[gG+8>>2]|0)}else if((gF|0)==2){xa=+h[gG+8>>3]}else if((gF|0)==3){xa=+uz(c[gG+8>>2]|0,0)}else{b7=3317;break L27}if((c[eQ>>2]|0)==3){uu(c[eR>>2]|0);c[eQ>>2]=1}if(xa<0.0|xa>1.0){b7=3321;break L27}gG=is(al)|0;gF=c[gG>>2]|0;if((gF|0)==1){xb=+(c[gG+8>>2]|0)}else if((gF|0)==2){xb=+h[gG+8>>3]}else if((gF|0)==3){xb=+uz(c[gG+8>>2]|0,0)}else{b7=3326;break L27}if((c[eS>>2]|0)==3){uu(c[eT>>2]|0);c[eS>>2]=1}if(xb<0.0|xb>1.0){b7=3330;break L27}else{w5=wT;w6=xb;w7=xa;w8=w9}}gG=wU+1|0;if((gG|0)<(wS|0)){xc=wS;xd=c[5173]|0}else{gF=wS+10|0;hG=db(c[5173]|0,gF<<5,151392)|0;c[5173]=hG;xc=gF;xd=hG}h[xd+(gG<<5)>>3]=w0;h[(c[5173]|0)+(gG<<5)+8>>3]=w8;h[(c[5173]|0)+(gG<<5)+16>>3]=w7;h[(c[5173]|0)+(gG<<5)+24>>3]=w6;xe=c[13898]|0;hG=c[8272]|0;if((hG|0)<=(xe|0)){b7=5241;break L27}gF=c[1054]|0;if((a[gF+(xe*40&-1)|0]&1)==0){b7=5242;break L27}gy=c[gF+(xe*40&-1)+36>>2]|0;hp=gF+(xe*40&-1)+32|0;gx=c[10036]|0;gC=0;while(1){if((gC|0)>=(gy|0)){b7=3339;break}if((a[gx+((c[hp>>2]|0)+gC|0)|0]|0)==(a[gC+131272|0]|0)){gC=gC+1|0}else{xf=0;break}}if((b7|0)==3339){b7=0;if((gC|0)==1){wZ=w5;w_=gG;w$=xe;break}else{xf=0}}while(1){if((xf|0)>=(gy|0)){break}if((a[gx+((c[hp>>2]|0)+xf|0)|0]|0)==(a[xf+148464|0]|0)){xf=xf+1|0}else{b7=5243;break L27}}if((xf|0)==1){wS=xc;wT=w5;wU=gG;wV=xe;wW=hG;wX=gF;wY=gx}else{b7=5244;break L27}}c[5172]=w_+1;gz=c[5173]|0;hB=0;while(1){if((hB|0)>=(w_|0)){break}hp=hB+1|0;if(+h[gz+(hB<<5)>>3]>+h[gz+(hp<<5)>>3]){b7=3347;break L27}else{hB=hp}}m3=+h[gz>>3];m2=1.0/(+h[gz+(w_<<5)>>3]-m3);if((w_|0)>1){hB=1;hp=gz;while(1){gy=hp+(hB<<5)|0;h[gy>>3]=m2*(+h[gy>>3]-m3);gy=hB+1|0;gC=c[5173]|0;if((gy|0)<((c[5172]|0)-1|0)){hB=gy;hp=gC}else{xg=gC;break}}}else{xg=gz}h[xg>>3]=0.0;h[(c[5173]|0)+((c[5172]|0)-1<<5)>>3]=1.0;xh=wZ}else{wQ=0;wR=hK;b7=3265}}while(0);if((b7|0)==3265){while(1){b7=0;h[wR+(wQ<<5)>>3]=+h[23584+(wQ<<5)>>3];h[(c[5173]|0)+(wQ<<5)+8>>3]=+h[23592+(wQ<<5)>>3];h[(c[5173]|0)+(wQ<<5)+16>>3]=+h[23600+(wQ<<5)>>3];h[(c[5173]|0)+(wQ<<5)+24>>3]=+h[23608+(wQ<<5)>>3];hK=wQ+1|0;if((hK|0)>=8){break}wQ=hK;wR=c[5173]|0;b7=3265}c[5172]=8;c[5174]=114;xh=0}c[5163]=100;c[7640]=100;ws=1;wt=xh;wu=c[13898]|0}else if((nd|0)==10){if((wf|0)!=0){b7=3353;break L27}xi=wg+1|0;c[13898]=xi;if((xi|0)>=(wh|0)){xj=xi;b7=5245;break L27}L4552:do{if((a[wi+(xi*40&-1)|0]&1)!=0){hK=c[wi+(xi*40&-1)+36>>2]|0;hR=wi+(xi*40&-1)+32|0;hF=0;while(1){if((hF|0)>=(hK|0)){break}if((a[wk+((c[hR>>2]|0)+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{break L4552}}if((hF|0)==1){xj=xi;b7=5246;break L27}}}while(0);a[14176]=1;is(aj);a[14176]=0;if((c[eU>>2]|0)!=3){b7=3361;break L27}hR=c[eV>>2]|0;if((hR|0)==0){b7=3363;break L27}c[11856]=0;hK=ey(hR,4,0)|0;uu(hR);if((hK-1|0)>>>0<2){b7=3366;break L27}hK=c[5173]|0;if((hK|0)!=0){uu(hK);c[5173]=0}hK=ut(320)|0;if((hK|0)==0){gk();hR=ut(320)|0;if((hR|0)==0){b7=3371;break L27}else{xk=hR}}else{xk=hK}c[5173]=xk;hK=eC(eW,4)|0;if((hK|0)==-1){b7=3373;break L27}else{xl=10;xm=0;xn=hK}while(1){if((xm|0)<(xl|0)){xo=xl}else{hK=xl+10|0;c[5173]=db(c[5173]|0,hK<<5,151392)|0;xo=hK}if((xn|0)==3){m3=+h[eW>>3];do{if(m3<0.0){xp=0.0}else{if(m3>1.0){xp=1.0;break}xp=m3}}while(0);h[(c[5173]|0)+(xm<<5)+8>>3]=xp;m3=+h[eX>>3];do{if(m3<0.0){xq=0.0}else{if(m3>1.0){xq=1.0;break}xq=m3}}while(0);h[(c[5173]|0)+(xm<<5)+16>>3]=xq;m3=+h[eY>>3];do{if(m3<0.0){xr=0.0}else{if(m3>1.0){xr=1.0;break}xr=m3}}while(0);h[(c[5173]|0)+(xm<<5)+24>>3]=xr;h[(c[5173]|0)+(xm<<5)>>3]=+(xm|0)}else if((xn|0)==4){m3=+h[eX>>3];do{if(m3<0.0){xs=0.0}else{if(m3>1.0){xs=1.0;break}xs=m3}}while(0);h[(c[5173]|0)+(xm<<5)+8>>3]=xs;m3=+h[eY>>3];do{if(m3<0.0){xt=0.0}else{if(m3>1.0){xt=1.0;break}xt=m3}}while(0);h[(c[5173]|0)+(xm<<5)+16>>3]=xt;m3=+h[eZ>>3];do{if(m3<0.0){xu=0.0}else{if(m3>1.0){xu=1.0;break}xu=m3}}while(0);h[(c[5173]|0)+(xm<<5)+24>>3]=xu;h[(c[5173]|0)+(xm<<5)>>3]=+h[eW>>3]}else{b7=3397;break L27}xv=xm+1|0;hF=eC(eW,4)|0;if((hF|0)==-1){break}else{xl=xo;xm=xv;xn=hF}}ez();if((xv|0)==0){b7=5250;break L27}c[5172]=xv;hF=c[5173]|0;hK=0;while(1){if((hK|0)>=(xm|0)){break}hR=hK+1|0;if(+h[hF+(hK<<5)>>3]>+h[hF+(hR<<5)>>3]){b7=3404;break L27}else{hK=hR}}m3=+h[hF>>3];m2=1.0/(+h[hF+(xm<<5)>>3]-m3);if((xm|0)>1){hK=1;hR=hF;while(1){gz=hR+(hK<<5)|0;h[gz>>3]=m2*(+h[gz>>3]-m3);gz=hK+1|0;hp=c[5173]|0;if((gz|0)<((c[5172]|0)-1|0)){hK=gz;hR=hp}else{xw=hp;break}}}else{xw=hF}h[xw>>3]=0.0;h[(c[5173]|0)+((c[5172]|0)-1<<5)>>3]=1.0;c[5163]=100;c[7640]=100;hR=(c[13898]|0)-1|0;c[13898]=hR;ws=1;wt=we;wu=hR}else if((nd|0)==11){if((wf|0)!=0){b7=3409;break L27}c[13898]=wg+1;uF(e_|0,55600,50);uF(55600,89352,50);xx=c[13898]|0;hR=c[5178]|0;if((hR|0)!=0){e1(hR);c[5178]=0}c[11670]=20704;it();hR=c[18070]|0;hK=db(hR,c[hR>>2]<<5|8,105624)|0;c[18070]=0;c[5178]=hK;if((hK|0)==0){b7=3413;break L27}hK=(c[13898]|0)-1|0;hR=c[1054]|0;hp=(c[hR+(hK*40&-1)+36>>2]|0)+(c[hR+(hK*40&-1)+32>>2]|0)|0;hK=db(c[5179]|0,(hp+1|0)-(c[hR+(xx*40&-1)+32>>2]|0)|0,116456)|0;c[5179]=hK;hR=c[(c[1054]|0)+(xx*40&-1)+32>>2]|0;L4617:do{if((hR|0)<(hp|0)){gz=hR;hB=hK;while(1){gC=a[(c[10036]|0)+gz|0]|0;if(gC<<24>>24==0){xy=hB;break L4617}gy=hB+1|0;a[hB]=gC;gC=gz+1|0;if((gC|0)<(hp|0)){gz=gC;hB=gy}else{xy=gy;break}}}else{xy=hK}}while(0);a[xy]=0;c[11670]=0;xz=c[13898]|0;if((c[8272]|0)<=(xz|0)){b7=5251;break L27}hK=c[1054]|0;if((a[hK+(xz*40&-1)|0]&1)==0){b7=5252;break L27}hp=c[hK+(xz*40&-1)+36>>2]|0;hR=hK+(xz*40&-1)+32|0;hK=c[10036]|0;hF=0;while(1){if((hF|0)>=(hp|0)){break}if((a[hK+((c[hR>>2]|0)+hF|0)|0]|0)==(a[hF+148464|0]|0)){hF=hF+1|0}else{b7=5253;break L27}}if((hF|0)!=1){b7=5254;break L27}xA=xz+1|0;c[13898]=xA;hR=c[5256]|0;if((hR|0)!=0){e1(hR);c[5256]=0}c[11670]=21016;it();hR=c[18070]|0;hK=db(hR,c[hR>>2]<<5|8,105624)|0;c[18070]=0;c[5256]=hK;if((hK|0)==0){b7=3427;break L27}hK=(c[13898]|0)-1|0;hR=c[1054]|0;hp=(c[hR+(hK*40&-1)+36>>2]|0)+(c[hR+(hK*40&-1)+32>>2]|0)|0;hK=db(c[5257]|0,(hp+1|0)-(c[hR+(xA*40&-1)+32>>2]|0)|0,116456)|0;c[5257]=hK;hR=c[(c[1054]|0)+(xA*40&-1)+32>>2]|0;L4633:do{if((hR|0)<(hp|0)){hB=hR;gz=hK;while(1){gy=a[(c[10036]|0)+hB|0]|0;if(gy<<24>>24==0){xB=gz;break L4633}gC=gz+1|0;a[gz]=gy;gy=hB+1|0;if((gy|0)<(hp|0)){hB=gy;gz=gC}else{xB=gC;break}}}else{xB=hK}}while(0);a[xB]=0;c[11670]=0;xC=c[13898]|0;if((c[8272]|0)<=(xC|0)){b7=5255;break L27}hK=c[1054]|0;if((a[hK+(xC*40&-1)|0]&1)==0){b7=5256;break L27}hp=c[hK+(xC*40&-1)+36>>2]|0;hR=hK+(xC*40&-1)+32|0;hK=c[10036]|0;hF=0;while(1){if((hF|0)>=(hp|0)){break}if((a[hK+((c[hR>>2]|0)+hF|0)|0]|0)==(a[hF+148464|0]|0)){hF=hF+1|0}else{b7=5257;break L27}}if((hF|0)!=1){b7=5258;break L27}xD=xC+1|0;c[13898]=xD;hR=c[5334]|0;if((hR|0)!=0){e1(hR);c[5334]=0}c[11670]=21328;it();hR=c[18070]|0;hK=db(hR,c[hR>>2]<<5|8,105624)|0;c[18070]=0;c[5334]=hK;if((hK|0)==0){b7=3441;break L27}hK=(c[13898]|0)-1|0;hR=c[1054]|0;hp=(c[hR+(hK*40&-1)+36>>2]|0)+(c[hR+(hK*40&-1)+32>>2]|0)|0;hK=db(c[5335]|0,(hp+1|0)-(c[hR+(xD*40&-1)+32>>2]|0)|0,116456)|0;c[5335]=hK;hR=c[(c[1054]|0)+(xD*40&-1)+32>>2]|0;L4649:do{if((hR|0)<(hp|0)){gz=hR;hB=hK;while(1){gC=a[(c[10036]|0)+gz|0]|0;if(gC<<24>>24==0){xE=hB;break L4649}gy=hB+1|0;a[hB]=gC;gC=gz+1|0;if((gC|0)<(hp|0)){gz=gC;hB=gy}else{xE=gy;break}}}else{xE=hK}}while(0);a[xE]=0;c[11670]=0;uF(55600,e_|0,50);c[5163]=102;c[7640]=102;hK=(c[13898]|0)-1|0;c[13898]=hK;ws=1;wt=we;wu=hK}else if((nd|0)==12){xF=wg+1|0;c[13898]=xF;if((xF|0)>=(wh|0)){b7=5259;break L27}L4656:do{if((a[wi+(xF*40&-1)|0]&1)==0){b7=3495}else{hK=c[wi+(xF*40&-1)+36>>2]|0;hp=wi+(xF*40&-1)+32|0;hR=0;while(1){if((hR|0)>=(hK|0)){b7=3451;break}hF=c[hp>>2]|0;if((a[wk+(hF+hR|0)|0]|0)==(a[hR+103664|0]|0)){hR=hR+1|0}else{xG=hF;break}}if((b7|0)==3451){b7=0;if((hR|0)==1){b7=5260;break L27}xG=c[hp>>2]|0}hF=(hK|0)>0;L4665:do{if(hF){hB=0;while(1){if((a[hB+137240|0]|0)!=(a[wk+(hB+xG|0)|0]|0)){break L4665}gz=hB+1|0;if((gz|0)<(hK|0)){hB=gz}else{xH=gz;b7=3457;break}}}else{xH=0;b7=3457}}while(0);if((b7|0)==3457){b7=0;hp=a[xH+137240|0]|0;if((hp<<24>>24|0)==36|(hp<<24>>24|0)==0){xI=53960;break}}L4672:do{if(hF){hp=0;while(1){if((a[hp+137176|0]|0)!=(a[wk+(hp+xG|0)|0]|0)){break L4672}hR=hp+1|0;if((hR|0)<(hK|0)){hp=hR}else{xJ=hR;b7=3482;break}}}else{xJ=0;b7=3482}}while(0);if((b7|0)==3482){b7=0;hp=a[xJ+137176|0]|0;if((hp<<24>>24|0)==36|(hp<<24>>24|0)==0){xI=53968;break}}L4679:do{if(hF){hp=0;while(1){if((a[hp+137048|0]|0)!=(a[wk+(hp+xG|0)|0]|0)){break L4679}hR=hp+1|0;if((hR|0)<(hK|0)){hp=hR}else{xK=hR;b7=3486;break}}}else{xK=0;b7=3486}}while(0);if((b7|0)==3486){b7=0;hp=a[xK+137048|0]|0;if((hp<<24>>24|0)==36|(hp<<24>>24|0)==0){xI=53976;break}}L4686:do{if(hF){hp=0;while(1){if((a[hp+136776|0]|0)!=(a[wk+(hp+xG|0)|0]|0)){break L4686}hR=hp+1|0;if((hR|0)<(hK|0)){hp=hR}else{xL=hR;b7=3490;break}}}else{xL=0;b7=3490}}while(0);if((b7|0)==3490){b7=0;hp=a[xL+136776|0]|0;if((hp<<24>>24|0)==36|(hp<<24>>24|0)==0){xI=53984;break}}if(hF){hp=0;while(1){if((a[hp+136432|0]|0)!=(a[wk+(hp+xG|0)|0]|0)){b7=3495;break L4656}hR=hp+1|0;if((hR|0)<(hK|0)){hp=hR}else{xM=hR;break}}}else{xM=0}hp=a[xM+136432|0]|0;if((hp<<24>>24|0)==36|(hp<<24>>24|0)==0){xI=53992}else{b7=3495}}}while(0);if((b7|0)==3495){b7=0;xI=54e3}hp=c[xI+4>>2]|0;if((hp|0)==-1){b7=3459;break L27}c[5174]=hp;ws=wf;wt=we;wu=xF}else if((nd|0)==6){a[20684]=0;ws=wf;wt=we;wu=wg}else if((nd|0)==7){a[20684]=1;ws=wf;wt=we;wu=wg}else if((nd|0)==8){c[13898]=wg+1;hp=is(ah)|0;hK=c[hp>>2]|0;if((hK|0)==1){xN=+(c[hp+8>>2]|0)}else if((hK|0)==2){xN=+h[hp+8>>3]}else if((hK|0)==3){xN=+uz(c[hp+8>>2]|0,0)}else{b7=3467;break L27}if((c[e$>>2]|0)==3){uu(c[e0>>2]|0);c[e$>>2]=1}hp=~~xN;if((hp|0)<0){b7=3471;break L27}c[5168]=hp;hp=(c[13898]|0)-1|0;c[13898]=hp;ws=wf;wt=we;wu=hp}else{b7=3473;break L27}}while(0);nd=wu+1|0;c[13898]=nd;hp=c[8272]|0;if((nd|0)>=(hp|0)){wm=wt;break}hK=c[1054]|0;we=wt;wf=ws;wg=nd;wh=hp;wi=hK;wj=a[hK+(nd*40&-1)|0]|0}if(!((wm|0)!=0&(c[5174]|0)!=114)){break}if((a[37400]&1)==0){break}uh(-1,153616,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{b7=3127}}while(0);do{if((b7|0)==3127){b7=0;if((c[11254]|0)==0){break}c[5163]=114;c[5164]=7;c[5165]=5;c[5166]=15;a[20668]=112;a[20684]=0;c[5168]=0;c[5172]=0;uu(c[5173]|0);c[5173]=0;uu(c[5170]|0);c[5170]=0;c[5174]=114;h[2705]=1.5;c[7640]=48}}while(0);c[7271]=-1}else if((gD|0)==62){gH=gv+1|0;c[13898]=gH;nh=c[8272]|0;L4724:do{if((gH|0)<(nh|0)){nd=a[gw+(gH*40&-1)|0]|0;L4726:do{if((nd&1)==0){xO=gH;xP=nh;xQ=gw;xR=nd}else{hK=c[gw+(gH*40&-1)+36>>2]|0;hp=gw+(gH*40&-1)+32|0;hF=0;while(1){if((hF|0)>=(hK|0)){break}if((a[gB+((c[hp>>2]|0)+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{xO=gH;xP=nh;xQ=gw;xR=nd;break L4726}}if((hF|0)==1){break L4724}else{xO=gH;xP=nh;xQ=gw;xR=nd}}}while(0);L4732:while(1){nd=(xR&1)==0;hp=c[xQ+(xO*40&-1)+36>>2]|0;L4734:do{if(nd){xS=c[10036]|0;xT=xQ+(xO*40&-1)+32|0}else{hK=xQ+(xO*40&-1)+32|0;hR=c[10036]|0;hB=0;while(1){if((hB|0)>=(hp|0)){break}if((a[hR+((c[hK>>2]|0)+hB|0)|0]|0)==(a[hB+103664|0]|0)){hB=hB+1|0}else{xS=hR;xT=hK;break L4734}}if((hB|0)==1){break L4732}else{xS=hR;xT=hK}}}while(0);hF=c[xT>>2]|0;gx=(hp|0)>0;gF=25168;hG=141728;L4742:while(1){L4744:do{if(!nd){if(gx){gG=0;gz=0;gy=hF;while(1){gC=a[hG+gG|0]|0;if(gC<<24>>24==(a[xS+(gG+gy|0)|0]|0)){xU=gy;xV=gz}else{if(gC<<24>>24!=36){break L4744}xU=gy-1|0;xV=1}xW=gG+1|0;if((xW|0)<(xV+hp|0)){gG=xW;gz=xV;gy=xU}else{break}}if((xV|0)==0){xX=xW}else{xY=gF;break L4742}}else{xX=0}gy=a[hG+xX|0]|0;if((gy<<24>>24|0)==36|(gy<<24>>24|0)==0){xY=gF;break L4742}}}while(0);hK=gF+8|0;hR=c[hK>>2]|0;if((hR|0)==0){xY=hK;break}else{gF=hK;hG=hR}}hG=c[xY+4>>2]|0;L4757:do{if((hG|0)==1){a[54017]=118;xZ=xO}else if((hG|0)==2){a[54017]=104;xZ=xO}else if((hG|0)==3){a[54016]=100;xZ=xO}else if((hG|0)==4){a[54016]=117;xZ=xO}else if((hG|0)==10){c[13506]=1;xZ=xO}else if((hG|0)==11){c[13506]=0;xZ=xO}else if((hG|0)==5){a[54018]=1;gF=xO+1|0;c[13898]=gF;if((gF|0)>=(xP|0)){xZ=gF;break}L4766:do{if((a[xQ+(gF*40&-1)|0]&1)!=0){hp=c[xQ+(gF*40&-1)+36>>2]|0;hF=xQ+(gF*40&-1)+32|0;gx=0;while(1){if((gx|0)>=(hp|0)){break}if((a[xS+((c[hF>>2]|0)+gx|0)|0]|0)==(a[gx+103664|0]|0)){gx=gx+1|0}else{break L4766}}if((gx|0)==1){xZ=gF;break L4757}}}while(0);gF=is(ag)|0;hF=c[gF>>2]|0;if((hF|0)==1){x_=+(c[gF+8>>2]|0)}else if((hF|0)==2){x_=+h[gF+8>>3]}else if((hF|0)==3){x_=+uz(c[gF+8>>2]|0,0)}else{b7=3537;break L27}if((c[e2>>2]|0)==3){uu(c[e3>>2]|0);c[e2>>2]=1}gF=~~x_;c[13505]=gF;if((gF|0)<1){b7=3541;break L27}gF=(c[13898]|0)-1|0;c[13898]=gF;xZ=gF}else if((hG|0)==6){c[13505]=-1;xZ=xO}else if((hG|0)==7){a[54018]=0;xZ=xO}else if((hG|0)==8){x$=xO+1|0;c[13898]=x$;if((x$|0)>=(xP|0)){b7=5261;break L27}L4786:do{if((a[xQ+(x$*40&-1)|0]&1)!=0){gF=c[xQ+(x$*40&-1)+36>>2]|0;hF=xQ+(x$*40&-1)+32|0;hp=0;while(1){if((hp|0)>=(gF|0)){break}if((a[xS+((c[hF>>2]|0)+hp|0)|0]|0)==(a[hp+103664|0]|0)){hp=hp+1|0}else{break L4786}}if((hp|0)==1){b7=5262;break L27}}}while(0);dl(54032,3);hF=(c[13898]|0)-1|0;c[13898]=hF;xZ=hF}else if((hG|0)==9){x0=xO+1|0;c[13898]=x0;if((x0|0)>=(xP|0)){b7=5263;break L27}L4795:do{if((a[xQ+(x0*40&-1)|0]&1)!=0){hF=c[xQ+(x0*40&-1)+36>>2]|0;gF=xQ+(x0*40&-1)+32|0;gx=0;while(1){if((gx|0)>=(hF|0)){break}if((a[xS+((c[gF>>2]|0)+gx|0)|0]|0)==(a[gx+103664|0]|0)){gx=gx+1|0}else{break L4795}}if((gx|0)==1){b7=5264;break L27}}}while(0);dl(54072,3);gF=(c[13898]|0)-1|0;c[13898]=gF;xZ=gF}else{b7=3561;break L27}}while(0);hG=xZ+1|0;c[13898]=hG;gF=c[8272]|0;if((hG|0)>=(gF|0)){break}hF=c[1054]|0;xO=hG;xP=gF;xQ=hF;xR=a[hF+(hG*40&-1)|0]|0}if((a[54016]|0)!=110){break L44}a[54016]=100;break L44}}while(0);a[54016]=100}else if((gD|0)==77){nh=gv+1|0;c[13898]=nh;L4808:do{if((nh|0)<(c[8272]|0)){L4810:do{if((a[gw+(nh*40&-1)|0]&1)!=0){gH=c[gw+(nh*40&-1)+36>>2]|0;hG=gw+(nh*40&-1)+32|0;hF=0;while(1){if((hF|0)>=(gH|0)){break}if((a[gB+((c[hG>>2]|0)+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{break L4810}}if((hF|0)==1){x1=1.0;break L4808}}}while(0);hG=is(af)|0;gH=c[hG>>2]|0;if((gH|0)==1){x2=+(c[hG+8>>2]|0)}else if((gH|0)==2){x2=+h[hG+8>>3]}else if((gH|0)==3){x2=+uz(c[hG+8>>2]|0,0)}else{b7=3576;break L27}if((c[e4>>2]|0)!=3){x1=x2;break}uu(c[e5>>2]|0);c[e4>>2]=1;x1=x2}else{x1=1.0}}while(0);h[3818]=x1>0.0?x1:1.0}else if((gD|0)==78){nh=gv+1|0;c[13898]=nh;L4825:do{if((nh|0)<(c[8272]|0)){L4827:do{if((a[gw+(nh*40&-1)|0]&1)!=0){hG=c[gw+(nh*40&-1)+36>>2]|0;gH=gw+(nh*40&-1)+32|0;gF=0;while(1){if((gF|0)>=(hG|0)){break}if((a[gB+((c[gH>>2]|0)+gF|0)|0]|0)==(a[gF+103664|0]|0)){gF=gF+1|0}else{break L4827}}if((gF|0)==1){x3=1.0;break L4825}}}while(0);gH=is(ae)|0;hG=c[gH>>2]|0;if((hG|0)==1){x4=+(c[gH+8>>2]|0)}else if((hG|0)==2){x4=+h[gH+8>>3]}else if((hG|0)==3){x4=+uz(c[gH+8>>2]|0,0)}else{b7=3590;break L27}if((c[e6>>2]|0)!=3){x3=x4;break}uu(c[e8>>2]|0);c[e6>>2]=1;x3=x4}else{x3=1.0}}while(0);h[3817]=x3>0.0?x3:1.0}else if((gD|0)==79){c[13898]=gv+1;if((a[30528]&1)!=0){break}a[30528]=1;if((a[32936]&1)==0){if((a[37400]&1)!=0){nh=c[m>>2]|0;aI(171240,33,1,nh|0)}b[12272]=116}if((c[17539]|0)!=0){h[8773]=0.0;h[8774]=6.283185307179586/+h[9040]}if((c[17367]|0)==3){break}ju()}else if((gD|0)==80){c[ad>>2]=0;x5=gv+1|0;c[13898]=x5;L4854:do{if((x5|0)<(c[8272]|0)){L4856:do{if((a[gw+(x5*40&-1)|0]&1)!=0){nh=c[gw+(x5*40&-1)+36>>2]|0;gH=gw+(x5*40&-1)+32|0;hG=0;while(1){if((hG|0)>=(nh|0)){b7=3608;break}if((a[gB+((c[gH>>2]|0)+hG|0)|0]|0)==(a[hG+103664|0]|0)){hG=hG+1|0}else{x6=0;break}}if((b7|0)==3608){b7=0;if((hG|0)==1){break L4854}else{x6=0}}while(1){if((x6|0)>=(nh|0)){break}if((a[gB+((c[gH>>2]|0)+x6|0)|0]|0)==(a[x6+103664|0]|0)){x6=x6+1|0}else{break L4856}}if((x6|0)==1){b7=3615;break L27}}}while(0);a[14176]=1;is(ac);a[14176]=0;if((c[e9>>2]|0)!=3){b7=3614;break L27}gH=c[fa>>2]|0;c[ad>>2]=gH;if((gH|0)==0){b7=3617;break L27}iQ(ad);x7=c[13898]|0;do{if((x7|0)<(c[8272]|0)){gH=c[1054]|0;if((a[gH+(x7*40&-1)|0]&1)==0){b7=5265;break L27}nh=c[gH+(x7*40&-1)+36>>2]|0;hG=gH+(x7*40&-1)+32|0;gH=c[10036]|0;gF=0;while(1){if((gF|0)>=(nh|0)){b7=3623;break}if((a[gH+((c[hG>>2]|0)+gF|0)|0]|0)==(a[gF+103664|0]|0)){gF=gF+1|0}else{x8=0;break}}if((b7|0)==3623){b7=0;if((gF|0)==1){x9=0;break}else{x8=0}}while(1){if((x8|0)>=(nh|0)){break}if((a[gH+((c[hG>>2]|0)+x8|0)|0]|0)==(a[x8+148880|0]|0)){x8=x8+1|0}else{b7=5266;break L27}}if((x8|0)!=6){b7=5267;break L27}c[13898]=x7+1;x9=1}else{x9=0}}while(0);ea(c[ad>>2]|0,x9);break L44}}while(0);ea(0,0)}else if((gD|0)==81){ya=gv+1|0;c[13898]=ya;L4886:do{if((ya|0)<(c[8272]|0)){L4888:do{if((a[gw+(ya*40&-1)|0]&1)!=0){hG=c[gw+(ya*40&-1)+36>>2]|0;gH=gw+(ya*40&-1)+32|0;nh=0;while(1){if((nh|0)>=(hG|0)){b7=3636;break}if((a[gB+((c[gH>>2]|0)+nh|0)|0]|0)==(a[nh+103664|0]|0)){nh=nh+1|0}else{yb=0;break}}if((b7|0)==3636){b7=0;if((nh|0)==1){break L4886}else{yb=0}}while(1){if((yb|0)>=(hG|0)){break}if((a[gB+((c[gH>>2]|0)+yb|0)|0]|0)==(a[yb+103664|0]|0)){yb=yb+1|0}else{break L4888}}if((yb|0)==1){b7=3643;break L27}}}while(0);a[14176]=1;is(ab);a[14176]=0;if((c[fb>>2]|0)!=3){b7=3642;break L27}gH=c[fc>>2]|0;c[57238]=gH;if((gH|0)==0){b7=3645;break L27}iQ(228952);break L44}}while(0);uu(c[57238]|0);c[57238]=0}else if((gD|0)==75){gH=gv+1|0;c[13898]=gH;hG=c[gw+(gH*40&-1)+36>>2]|0;nh=c[gw+(gH*40&-1)+32>>2]|0;gF=a[gw+(gH*40&-1)|0]|0;hF=(gF&1)==0;L4904:do{if((hG|0)>0&(hF^1)){hp=0;nd=0;hR=nh;while(1){if((a[hp+115824|0]|0)==(a[gB+(hp+hR|0)|0]|0)){yc=hR;yd=nd}else{if((hp|0)!=4){break}yc=hR-1|0;yd=1}hK=hp+1|0;if((hK|0)<(yd+hG|0)){hp=hK;nd=yd;hR=yc}else{b7=3653;break}}if((b7|0)==3653){b7=0;if((yd|0)!=0){ye=-1;yf=gH;yg=hG;yh=nh;yi=gF;break}if((hp|0)==3|(hp|0)==9){ye=-1;yf=gH;yg=hG;yh=nh;yi=gF;break}}if(hF){b7=3674;break}else{yj=0;yk=0;yl=nh}while(1){if((a[yj+115976|0]|0)==(a[gB+(yj+yl|0)|0]|0)){ym=yl;yn=yk}else{if((yj|0)!=3){yo=0;yp=0;yq=nh;break}ym=yl-1|0;yn=1}hR=yj+1|0;if((hR|0)<(yn+hG|0)){yj=hR;yk=yn;yl=ym}else{b7=3660;break}}if((b7|0)==3660){b7=0;if((yn|0)!=0){ye=-1;yf=gH;yg=hG;yh=nh;yi=gF;break}if((yj|0)==2|(yj|0)==7){ye=-1;yf=gH;yg=hG;yh=nh;yi=gF;break}else{yo=0;yp=0;yq=nh}}while(1){if((a[yo+116120|0]|0)==(a[gB+(yo+yq|0)|0]|0)){yr=yq;ys=yp}else{if((yo|0)!=4){yt=0;yu=0;yv=nh;break}yr=yq-1|0;ys=1}hp=yo+1|0;if((hp|0)<(ys+hG|0)){yo=hp;yp=ys;yq=yr}else{b7=3666;break}}if((b7|0)==3666){b7=0;if((ys|0)!=0){ye=-1;yf=gH;yg=hG;yh=nh;yi=gF;break}if((yo|0)==3|(yo|0)==6){ye=-1;yf=gH;yg=hG;yh=nh;yi=gF;break}else{yt=0;yu=0;yv=nh}}while(1){if((a[yt+172184|0]|0)==(a[gB+(yt+yv|0)|0]|0)){yw=yv;yx=yu}else{if((yt|0)!=4){b7=3674;break L4904}yw=yv-1|0;yx=1}hp=yt+1|0;if((hp|0)<(yx+hG|0)){yt=hp;yu=yx;yv=yw}else{break}}if((yx|0)!=0){ye=-1;yf=gH;yg=hG;yh=nh;yi=gF;break}if((yt|0)==3|(yt|0)==7){ye=-1;yf=gH;yg=hG;yh=nh;yi=gF}else{b7=3674}}else{b7=3674}}while(0);if((b7|0)==3674){b7=0;gF=is($)|0;nh=c[gF>>2]|0;if((nh|0)==1){yy=+(c[gF+8>>2]|0)}else if((nh|0)==2){yy=+h[gF+8>>3]}else if((nh|0)==3){yy=+uz(c[gF+8>>2]|0,0)}else{b7=3678;break L27}if((c[fd>>2]|0)==3){uu(c[fe>>2]|0);c[fd>>2]=1}gF=~~yy;yz=c[13898]|0;if((gF|0)<1){b7=3683;break L27}nh=c[1054]|0;ye=gF;yf=yz;yg=c[nh+(yz*40&-1)+36>>2]|0;yh=c[nh+(yz*40&-1)+32>>2]|0;yi=a[nh+(yz*40&-1)|0]|0}nh=(yi&1)==0;L4953:do{if((yg|0)>0&(nh^1)){gF=c[10036]|0;hG=0;gH=0;hF=yh;while(1){if((a[hG+115824|0]|0)==(a[gF+(hG+hF|0)|0]|0)){yA=hF;yB=gH}else{if((hG|0)!=4){break}yA=hF-1|0;yB=1}hp=hG+1|0;if((hp|0)<(yB+yg|0)){hG=hp;gH=yB;hF=yA}else{b7=3690;break}}do{if((b7|0)==3690){b7=0;if((yB|0)==0){if(!((hG|0)==3|(hG|0)==9)){break}}jx(ye,1);break L44}}while(0);if(nh){break}else{yC=0;yD=0;yE=yh}while(1){if((a[yC+115976|0]|0)==(a[gF+(yC+yE|0)|0]|0)){yF=yE;yG=yD}else{if((yC|0)!=3){yH=0;yI=0;yJ=yh;break}yF=yE-1|0;yG=1}hG=yC+1|0;if((hG|0)<(yG+yg|0)){yC=hG;yD=yG;yE=yF}else{b7=3698;break}}do{if((b7|0)==3698){b7=0;if((yG|0)==0){if(!((yC|0)==2|(yC|0)==7)){yH=0;yI=0;yJ=yh;break}}jx(ye,3);break L44}}while(0);while(1){if((a[yH+116120|0]|0)==(a[gF+(yH+yJ|0)|0]|0)){yK=yJ;yL=yI}else{if((yH|0)!=4){yM=0;yN=0;yO=yh;break}yK=yJ-1|0;yL=1}hG=yH+1|0;if((hG|0)<(yL+yg|0)){yH=hG;yI=yL;yJ=yK}else{b7=3705;break}}do{if((b7|0)==3705){b7=0;if((yL|0)==0){if(!((yH|0)==3|(yH|0)==6)){yM=0;yN=0;yO=yh;break}}jx(ye,2);break L44}}while(0);while(1){if((a[yM+172184|0]|0)==(a[gF+(yM+yO|0)|0]|0)){yP=yO;yQ=yN}else{if((yM|0)!=4){break L4953}yP=yO-1|0;yQ=1}hG=yM+1|0;if((hG|0)<(yQ+yg|0)){yM=hG;yN=yQ;yO=yP}else{break}}if((yQ|0)==0){if(!((yM|0)==3|(yM|0)==7)){break}}jx(ye,4);break L44}}while(0);if((ye|0)>0){yR=43272}else{b7=3720;break L27}while(1){yS=c[yR>>2]|0;if((yS|0)==0){b7=3719;break L27}if((ye|0)==(c[yS+4>>2]|0)){break}else{yR=yS|0}}c[13898]=yf-1;jx(ye,c[yS+12>>2]|0)}else if((gD|0)==82){c[13898]=gv+1;nh=is(Z)|0;gF=c[nh>>2]|0;if((gF|0)==1){yT=+(c[nh+8>>2]|0)}else if((gF|0)==2){yT=+h[nh+8>>3]}else if((gF|0)==3){yT=+uz(c[nh+8>>2]|0,0)}else{b7=3725;break L27}if((c[ff>>2]|0)==3){uu(c[fg>>2]|0);c[ff>>2]=1}nh=~~yT;gF=(nh|0)>-1?nh:-nh|0;yU=c[13898]|0;do{if((yU|0)<(c[8272]|0)){nh=c[1054]|0;if((a[nh+(yU*40&-1)|0]&1)==0){b7=5272;break L27}hG=c[nh+(yU*40&-1)+36>>2]|0;hF=nh+(yU*40&-1)+32|0;nh=c[10036]|0;gH=0;while(1){if((gH|0)>=(hG|0)){b7=3733;break}if((a[nh+((c[hF>>2]|0)+gH|0)|0]|0)==(a[gH+103664|0]|0)){gH=gH+1|0}else{yV=0;break}}if((b7|0)==3733){b7=0;if((gH|0)==1){yW=gF;break}else{yV=0}}while(1){if((yV|0)>=(hG|0)){break}if((a[nh+((c[hF>>2]|0)+yV|0)|0]|0)==(a[yV+148464|0]|0)){yV=yV+1|0}else{b7=5273;break L27}}if((yV|0)!=1){b7=5274;break L27}c[13898]=yU+1;hF=is(Y)|0;nh=c[hF>>2]|0;if((nh|0)==1){yX=+(c[hF+8>>2]|0)}else if((nh|0)==2){yX=+h[hF+8>>3]}else if((nh|0)==3){yX=+uz(c[hF+8>>2]|0,0)}else{b7=3742;break L27}if((c[fh>>2]|0)==3){uu(c[fi>>2]|0);c[fh>>2]=1}hF=~~yX;yW=(hF|0)>-1?hF:-hF|0}else{yW=gF}}while(0);if((gF|0)<2|(yW|0)<2){b7=3747;break L27}hF=c[10828]|0;c[10828]=0;iY(hF);c[6352]=gF;c[6350]=yW}else if((gD|0)==83){hF=gv+1|0;c[13898]=hF;nh=c[8272]|0;L5037:do{if((hF|0)<(nh|0)){L5039:do{if((a[gw+(hF*40&-1)|0]&1)==0){yY=hF;yZ=nh}else{hG=c[gw+(hF*40&-1)+36>>2]|0;gH=gw+(hF*40&-1)+32|0;hp=0;while(1){if((hp|0)>=(hG|0)){b7=3754;break}hR=c[gH>>2]|0;if((a[gB+(hR+hp|0)|0]|0)==(a[hp+103664|0]|0)){hp=hp+1|0}else{y_=hR;break}}if((b7|0)==3754){b7=0;if((hp|0)==1){b7=3756;break L5037}y_=c[gH>>2]|0}if((hG|0)>0){y$=0;y0=0;y1=y_}else{yY=hF;yZ=nh;break}while(1){if((a[y$+175752|0]|0)==(a[gB+(y$+y1|0)|0]|0)){y2=y1;y3=y0}else{if((y$|0)!=2){y4=0;y5=0;y6=y_;break}y2=y1-1|0;y3=1}hR=y$+1|0;if((hR|0)<(y3+hG|0)){y$=hR;y0=y3;y1=y2}else{b7=3762;break}}do{if((b7|0)==3762){b7=0;if((y3|0)==0){if(!((y$|0)==1|(y$|0)==6)){y4=0;y5=0;y6=y_;break}}g[18074]=1.0;gH=gv+2|0;c[13898]=gH;yY=gH;yZ=nh;break L5039}}while(0);while(1){if((a[y4+175400|0]|0)==(a[gB+(y4+y6|0)|0]|0)){y7=y6;y8=y5}else{if((y4|0)!=2){y9=0;za=0;zb=y_;break}y7=y6-1|0;y8=1}gH=y4+1|0;if((gH|0)<(y8+hG|0)){y4=gH;y5=y8;y6=y7}else{b7=3769;break}}do{if((b7|0)==3769){b7=0;if((y8|0)==0){if(!((y4|0)==5|(y4|0)==1)){y9=0;za=0;zb=y_;break}}c[13898]=gv+2;gH=is(W)|0;hp=c[gH>>2]|0;if((hp|0)==1){zc=+(c[gH+8>>2]|0)}else if((hp|0)==2){zc=+h[gH+8>>3]}else if((hp|0)==3){zc=+uz(c[gH+8>>2]|0,0)}else{b7=3775;break L27}if((c[fn>>2]|0)==3){uu(c[fo>>2]|0);c[fn>>2]=1}g[18074]=zc;yY=c[13898]|0;yZ=c[8272]|0;break L5039}}while(0);while(1){if((a[y9+174920|0]|0)==(a[gB+(y9+zb|0)|0]|0)){zd=zb;ze=za}else{if((y9|0)!=4){zf=0;zg=0;zh=y_;b7=3785;break}zd=zb-1|0;ze=1}gH=y9+1|0;if((gH|0)<(ze+hG|0)){y9=gH;za=ze;zb=zd}else{b7=3783;break}}do{if((b7|0)==3783){b7=0;if((ze|0)!=0){break}if(!((y9|0)==3|(y9|0)==7)){zf=0;zg=0;zh=y_;b7=3785}}}while(0);do{if((b7|0)==3785){while(1){b7=0;if((a[zf+174640|0]|0)==(a[gB+(zf+zh|0)|0]|0)){zi=zh;zj=zg}else{if((zf|0)!=4){yY=hF;yZ=nh;break L5039}zi=zh-1|0;zj=1}gH=zf+1|0;if((gH|0)<(zj+hG|0)){zf=gH;zg=zj;zh=zi;b7=3785}else{break}}if((zj|0)!=0){break}if(!((zf|0)==3|(zf|0)==8)){yY=hF;yZ=nh;break L5039}}}while(0);g[18074]=0.0;hG=gv+2|0;c[13898]=hG;yY=hG;yZ=nh}}while(0);if((yY|0)>=(yZ|0)){break}hG=c[1054]|0;L5099:do{if((a[hG+(yY*40&-1)|0]&1)!=0){gH=c[hG+(yY*40&-1)+36>>2]|0;hp=hG+(yY*40&-1)+32|0;hR=c[10036]|0;nd=0;while(1){if((nd|0)>=(gH|0)){break}if((a[hR+((c[hp>>2]|0)+nd|0)|0]|0)==(a[nd+103664|0]|0)){nd=nd+1|0}else{break L5099}}if((nd|0)==1){break L5037}}}while(0);hG=is(V)|0;hp=c[hG>>2]|0;if((hp|0)==1){zk=+(c[hG+8>>2]|0)}else if((hp|0)==2){zk=+h[hG+8>>3]}else if((hp|0)==3){zk=+uz(c[hG+8>>2]|0,0)}else{b7=3802;break L27}if((c[fj>>2]|0)==3){uu(c[fk>>2]|0);c[fj>>2]=1}m3=zk;g[178]=m3;hG=c[13898]|0;L5114:do{if((c[8272]|0)>(hG|0)){hp=c[1054]|0;if((a[hp+(hG*40&-1)|0]&1)==0){break}hR=c[hp+(hG*40&-1)+36>>2]|0;gH=hp+(hG*40&-1)+32|0;hp=c[10036]|0;hK=0;while(1){if((hK|0)>=(hR|0)){break}if((a[hp+((c[gH>>2]|0)+hK|0)|0]|0)==(a[hK+148464|0]|0)){hK=hK+1|0}else{break L5114}}if((hK|0)!=1){break}c[13898]=hG+1;gH=is(X)|0;hp=c[gH>>2]|0;if((hp|0)==1){zl=+(c[gH+8>>2]|0)}else if((hp|0)==2){zl=+h[gH+8>>3]}else if((hp|0)==3){zl=+uz(c[gH+8>>2]|0,0)}else{b7=3815;break L27}if((c[fl>>2]|0)==3){uu(c[fm>>2]|0);c[fl>>2]=1}g[38]=zl;break L5037}}while(0);g[38]=m3}else{b7=3756}}while(0);if((b7|0)==3756){b7=0;g[178]=1.0;g[38]=1.0}if(+g[178]<=0.0|+g[38]<=0.0){b7=3821;break L27}}else if((gD|0)==85){zm=gv+1|0;c[13898]=zm;nh=gw+(zm*40&-1)+36|0;hF=c[nh>>2]|0;gF=gw+(zm*40&-1)+32|0;hG=c[gF>>2]|0;gH=gw+(zm*40&-1)|0;hp=(a[gH]&1)==0;hR=(hF|0)>0;nd=21680;hB=116616;L5135:while(1){L5137:do{if(!hp){if(hR){gy=0;gz=0;gG=hG;while(1){gC=a[hB+gy|0]|0;if(gC<<24>>24==(a[gB+(gy+gG|0)|0]|0)){zn=gG;zo=gz}else{if(gC<<24>>24!=36){break L5137}zn=gG-1|0;zo=1}zp=gy+1|0;if((zp|0)<(zo+hF|0)){gy=zp;gz=zo;gG=zn}else{break}}if((zo|0)==0){zq=zp}else{zr=nd;break L5135}}else{zq=0}gG=a[hB+zq|0]|0;if((gG<<24>>24|0)==36|(gG<<24>>24|0)==0){zr=nd;break L5135}}}while(0);gG=nd+8|0;gz=c[gG>>2]|0;if((gz|0)==0){zr=gG;break}else{nd=gG;hB=gz}}hB=c[zr+4>>2]|0;if((hB|0)==7){nd=gv+2|0;c[13898]=nd;hF=c[8272]|0;if((nd|0)<(hF|0)){zs=nd;zt=hF;zu=gw}else{break}while(1){hF=(a[zu+(zs*40&-1)|0]&1)==0;if(hF){b7=5284;break L27}nd=c[zu+(zs*40&-1)+36>>2]|0;hG=zu+(zs*40&-1)+32|0;hR=c[10036]|0;hp=0;while(1){if((hp|0)>=(nd|0)){b7=3937;break}if((a[hR+((c[hG>>2]|0)+hp|0)|0]|0)==(a[hp+103664|0]|0)){hp=hp+1|0}else{break}}if((b7|0)==3937){b7=0;if((hp|0)==1){break L44}}L5161:do{if((zt|0)>(zs|0)){gz=0;while(1){if((gz|0)>=(nd|0)){break}if((a[hR+((c[hG>>2]|0)+gz|0)|0]|0)==(a[gz+130496|0]|0)){gz=gz+1|0}else{b7=3943;break L5161}}if((gz|0)!=4){b7=3943;break}c[13898]=zs+1;dl(49672,0);gG=(c[13898]|0)-1|0;c[13898]=gG;zv=gG}else{b7=3943}}while(0);L5167:do{if((b7|0)==3943){b7=0;hR=c[hG>>2]|0;if(!((nd|0)>0&(hF^1))){b7=5285;break L27}hp=c[10036]|0;gG=0;gy=0;hK=hR;while(1){if((a[gG+212296|0]|0)==(a[hp+(gG+hK|0)|0]|0)){zw=hK;zx=gy}else{if((gG|0)!=3){zy=0;zz=0;zA=hR;break}zw=hK-1|0;zx=1}gC=gG+1|0;if((gC|0)<(zx+nd|0)){gG=gC;gy=zx;hK=zw}else{b7=3949;break}}do{if((b7|0)==3949){b7=0;if((zx|0)==0){if(!((gG|0)==5|(gG|0)==2)){zy=0;zz=0;zA=hR;break}}hK=zs+1|0;c[13898]=hK;L5181:do{if((a[zu+(hK*40&-1)|0]&1)!=0){gy=c[10810]|0;if((gy|0)==0){zv=hK;break L5167}gz=(zt|0)>(hK|0);gC=zu+(hK*40&-1)+36|0;hS=zu+(hK*40&-1)+32|0;ho=gy;L5184:while(1){ne=c[ho+4>>2]|0;L5186:do{if(gz){gE=c[gC>>2]|0;ng=0;while(1){if((ng|0)>=(gE|0)){break}if((a[hp+((c[hS>>2]|0)+ng|0)|0]|0)==(a[ne+ng|0]|0)){ng=ng+1|0}else{break L5186}}if((a[ne+ng|0]|0)==0){b7=3959;break L5184}}}while(0);ne=c[ho>>2]|0;if((ne|0)==0){zB=gy;break}else{ho=ne}}do{if((b7|0)==3959){b7=0;if((a[ho+8|0]&1)!=0){zB=gy;break}if((c[ho+16>>2]|0)==1){break L5181}else{zB=gy}}}while(0);L5196:while(1){gy=c[zB+4>>2]|0;L5198:do{if(gz){ho=c[gC>>2]|0;gx=0;while(1){if((gx|0)>=(ho|0)){break}if((a[hp+((c[hS>>2]|0)+gx|0)|0]|0)==(a[gy+gx|0]|0)){gx=gx+1|0}else{break L5198}}if((a[gy+gx|0]|0)==0){break L5196}}}while(0);gy=c[zB>>2]|0;if((gy|0)==0){zv=hK;break L5167}else{zB=gy}}if((a[zB+8|0]&1)!=0){zv=hK;break L5167}if((c[zB+16>>2]|0)!=2){zv=hK;break L5167}}}while(0);hK=is(T)|0;hS=c[hK>>2]|0;if((hS|0)==1){zC=+(c[hK+8>>2]|0)}else if((hS|0)==2){zC=+h[hK+8>>3]}else if((hS|0)==3){zC=+uz(c[hK+8>>2]|0,0)}else{b7=3974;break L27}if((c[fr>>2]|0)==3){uu(c[fs>>2]|0);c[fr>>2]=1}h[6214]=zC;hK=(c[13898]|0)-1|0;c[13898]=hK;zv=hK;break L5167}}while(0);while(1){if((a[zy+211736|0]|0)==(a[hp+(zy+zA|0)|0]|0)){zD=zA;zE=zz}else{if((zy|0)!=4){b7=5286;break L27}zD=zA-1|0;zE=1}hR=zy+1|0;if((hR|0)<(zE+nd|0)){zy=hR;zz=zE;zA=zD}else{break}}if((zE|0)==0){if(!((zy|0)==5|(zy|0)==3)){b7=5287;break L27}}zF=zs+1|0;c[13898]=zF;do{if((zt|0)>(zF|0)){hR=(a[zu+(zF*40&-1)|0]&1)==0;if(hR){b7=5280;break L27}gG=c[zu+(zF*40&-1)+36>>2]|0;hK=zu+(zF*40&-1)+32|0;hS=0;while(1){if((hS|0)>=(gG|0)){b7=3991;break}if((a[hp+((c[hK>>2]|0)+hS|0)|0]|0)==(a[hS+150688|0]|0)){hS=hS+1|0}else{break}}if((b7|0)==3991){b7=0;if((hS|0)==2){break}}if(hR){b7=5281;break L27}hK=c[zu+(zF*40&-1)+36>>2]|0;gG=zu+(zF*40&-1)+32|0;gC=0;while(1){if((gC|0)>=(hK|0)){b7=3996;break}if((a[hp+((c[gG>>2]|0)+gC|0)|0]|0)==(a[gC+103664|0]|0)){gC=gC+1|0}else{zG=0;break}}if((b7|0)==3996){b7=0;if((gC|0)==1){break}else{zG=0}}while(1){if((zG|0)>=(hK|0)){b7=4e3;break}if((a[hp+((c[gG>>2]|0)+zG|0)|0]|0)==(a[zG+211336|0]|0)){zG=zG+1|0}else{zH=0;break}}do{if((b7|0)==4e3){b7=0;if((zG|0)!=2){zH=0;break}c[12406]=1;zv=zF;break L5167}}while(0);while(1){if((zH|0)>=(hK|0)){break}if((a[hp+((c[gG>>2]|0)+zH|0)|0]|0)==(a[zH+210848|0]|0)){zH=zH+1|0}else{b7=5282;break L27}}if((zH|0)!=2){b7=5283;break L27}c[12406]=2;zv=zF;break L5167}}while(0);c[12406]=0;zv=zF}}while(0);nd=zv+1|0;c[13898]=nd;hF=c[8272]|0;if((nd|0)>=(hF|0)){break L44}zs=nd;zt=hF;zu=c[1054]|0}}else if((hB|0)==1){hF=gv+2|0;c[13898]=hF;nd=c[gw+(hF*40&-1)+36>>2]|0;hG=c[gw+(hF*40&-1)+32>>2]|0;hp=(a[gw+(hF*40&-1)|0]&1)==0;hF=(nd|0)>0;gG=30672;hK=116448;L5256:while(1){L5258:do{if(!hp){if(hF){gC=0;hR=0;hS=hG;while(1){gz=a[hK+gC|0]|0;if(gz<<24>>24==(a[gB+(gC+hS|0)|0]|0)){zI=hS;zJ=hR}else{if(gz<<24>>24!=36){break L5258}zI=hS-1|0;zJ=1}zK=gC+1|0;if((zK|0)<(zJ+nd|0)){gC=zK;hR=zJ;hS=zI}else{break}}if((zJ|0)==0){zL=zK}else{zM=gG;break L5256}}else{zL=0}hS=a[hK+zL|0]|0;if((hS<<24>>24|0)==36|(hS<<24>>24|0)==0){zM=gG;break L5256}}}while(0);hS=gG+8|0;hR=c[hS>>2]|0;if((hR|0)==0){zM=hS;break}else{gG=hS;hK=hR}}hK=c[zM+4>>2]|0;zN=gv+3|0;c[13898]=zN;if((hK|0)==-1){b7=3845;break L27}c[12890]=hK;if((hK|0)!=345){break}hE(43432);if((c[10858]|0)!=0){break}c[10859]=0;break}else if((hB|0)==2){hK=gv+2|0;c[13898]=hK;gG=c[gw+(hK*40&-1)+36>>2]|0;nd=c[gw+(hK*40&-1)+32>>2]|0;hG=(a[gw+(hK*40&-1)|0]&1)==0;hK=(gG|0)>0;hF=30672;hp=116448;L5275:while(1){L5277:do{if(!hG){if(hK){hR=0;hS=0;gC=nd;while(1){gz=a[hp+hR|0]|0;if(gz<<24>>24==(a[gB+(hR+gC|0)|0]|0)){zO=gC;zP=hS}else{if(gz<<24>>24!=36){break L5277}zO=gC-1|0;zP=1}zQ=hR+1|0;if((zQ|0)<(zP+gG|0)){hR=zQ;hS=zP;gC=zO}else{break}}if((zP|0)==0){zR=zQ}else{zS=hF;break L5275}}else{zR=0}gC=a[hp+zR|0]|0;if((gC<<24>>24|0)==36|(gC<<24>>24|0)==0){zS=hF;break L5275}}}while(0);gC=hF+8|0;hS=c[gC>>2]|0;if((hS|0)==0){zS=gC;break}else{hF=gC;hp=hS}}hp=c[zS+4>>2]|0;zT=gv+3|0;c[13898]=zT;if((hp|0)==-1){b7=3860;break L27}if((hp&4|0)!=0){b7=5275;break L27}if((hp|0)==392|(hp|0)==368){b7=5276;break L27}c[10058]=hp;if((hp|0)!=345){break}hE(43400);if((c[10850]|0)!=0){break}c[10851]=0;break}else if((hB|0)==3){jr(43280);break}else if((hB|0)==4){hJ(49488,c[12372]|0,c[12373]|0,c[12374]|0,49504);break}else if((hB|0)==5){hp=gv+2|0;c[13898]=hp;L5298:do{if((hp|0)<(c[8272]|0)){L5300:do{if((a[gw+(hp*40&-1)|0]&1)!=0){hF=c[gw+(hp*40&-1)+36>>2]|0;gG=gw+(hp*40&-1)+32|0;nd=0;while(1){if((nd|0)>=(hF|0)){break}if((a[gB+((c[gG>>2]|0)+nd|0)|0]|0)==(a[nd+103664|0]|0)){nd=nd+1|0}else{break L5300}}if((nd|0)==1){b7=3885;break L5298}}}while(0);gG=is(U)|0;hF=c[gG>>2]|0;if((hF|0)==1){zU=+(c[gG+8>>2]|0)}else if((hF|0)==2){zU=+h[gG+8>>3]}else if((hF|0)==3){zU=+uz(c[gG+8>>2]|0,0)}else{b7=3879;break L27}if((c[fp>>2]|0)==3){uu(c[fq>>2]|0);c[fp>>2]=1}gG=~~zU;if((gG|0)<1){b7=3884;break L27}zV=gG;zW=c[10824]|0;b7=3888}else{b7=3885}}while(0);L5316:do{if((b7|0)==3885){b7=0;hp=c[10824]|0;if((hp|0)==0){zX=1;zY=0;zZ=0;b7=3892;break}else{z_=1;z$=hp}while(1){if((c[z$+4>>2]|0)!=(z_|0)){zV=z_;zW=hp;b7=3888;break L5316}gG=z_+1|0;hF=c[z$>>2]|0;if((hF|0)==0){zV=gG;zW=hp;b7=3888;break}else{z_=gG;z$=hF}}}}while(0);L5321:do{if((b7|0)==3888){b7=0;if((zW|0)==0){zX=zV;zY=0;zZ=0;b7=3892;break}else{z0=zW;z1=0}while(1){z2=c[z0+4>>2]|0;if((zV|0)<=(z2|0)){break}hp=c[z0>>2]|0;if((hp|0)==0){zX=zV;zY=0;zZ=z0;b7=3892;break L5321}else{z1=z0;z0=hp}}if((zV|0)==(z2|0)){z3=z0}else{zX=zV;zY=z0;zZ=z1;b7=3892}}}while(0);if((b7|0)==3892){b7=0;hp=ut(120)|0;if((hp|0)==0){gk();hF=ut(120)|0;if((hF|0)==0){b7=3894;break L27}else{z4=hF}}else{z4=hp}hp=z4;hF=z4+8|0;c[hF>>2]=-1;c[z4+12>>2]=0;gG=z4+16|0;c[gG>>2]=c[12872];c[gG+4>>2]=c[12873];c[gG+8>>2]=c[12874];c[gG+12>>2]=c[12875];c[gG+16>>2]=c[12876];c[gG+20>>2]=c[12877];c[gG+24>>2]=c[12878];c[gG+28>>2]=c[12879];c[gG+32>>2]=c[12880];c[gG+36>>2]=c[12881];c[gG+40>>2]=c[12882];c[gG+44>>2]=c[12883];c[gG+48>>2]=c[12884];c[gG+52>>2]=c[12885];c[z4+72>>2]=1;h[z4+80>>3]=0.0;c[z4+88>>2]=0;h[z4+96>>3]=15.0;h[z4+104>>3]=90.0;c[z4+112>>2]=0;if((zZ|0)==0){c[10824]=hp}else{c[zZ>>2]=hp}c[hF>>2]=zX;c[z4+4>>2]=zX;c[z4>>2]=zY;z3=hp}hp=c[13898]|0;L5337:do{if((hp|0)<(c[8272]|0)){hF=c[1054]|0;L5339:do{if((a[hF+(hp*40&-1)|0]&1)!=0){gG=c[hF+(hp*40&-1)+36>>2]|0;hK=hF+(hp*40&-1)+32|0;hG=c[10036]|0;hS=0;while(1){if((hS|0)>=(gG|0)){b7=3904;break}if((a[hG+((c[hK>>2]|0)+hS|0)|0]|0)==(a[hS+103664|0]|0)){hS=hS+1|0}else{break}}if((b7|0)==3904){b7=0;if((hS|0)==1){b7=3905;break L5337}}if((gG|0)<=0){break}nd=0;gC=0;hR=c[hK>>2]|0;while(1){if((a[nd+184456|0]|0)==(a[hG+(nd+hR|0)|0]|0)){z5=hR;z6=gC}else{if((nd|0)!=3){break L5339}z5=hR-1|0;z6=1}gz=nd+1|0;if((gz|0)<(z6+gG|0)){nd=gz;gC=z6;hR=z5}else{break}}if((z6|0)==0){if(!((nd|0)==2|(nd|0)==7)){break}}c[z3+8>>2]=-1;c[z3+12>>2]=0;hR=z3+16|0;c[hR>>2]=c[12872];c[hR+4>>2]=c[12873];c[hR+8>>2]=c[12874];c[hR+12>>2]=c[12875];c[hR+16>>2]=c[12876];c[hR+20>>2]=c[12877];c[hR+24>>2]=c[12878];c[hR+28>>2]=c[12879];c[hR+32>>2]=c[12880];c[hR+36>>2]=c[12881];c[hR+40>>2]=c[12882];c[hR+44>>2]=c[12883];c[hR+48>>2]=c[12884];c[hR+52>>2]=c[12885];c[z3+72>>2]=1;h[z3+80>>3]=0.0;c[z3+88>>2]=0;h[z3+96>>3]=15.0;h[z3+104>>3]=90.0;c[z3+112>>2]=0;c[13898]=(c[13898]|0)+1;break L5337}}while(0);hL(z3+8|0,0)}else{b7=3905}}while(0);if((b7|0)==3905){b7=0;c[z3+8>>2]=-1;c[z3+12>>2]=0;hp=z3+16|0;c[hp>>2]=c[12872];c[hp+4>>2]=c[12873];c[hp+8>>2]=c[12874];c[hp+12>>2]=c[12875];c[hp+16>>2]=c[12876];c[hp+20>>2]=c[12877];c[hp+24>>2]=c[12878];c[hp+28>>2]=c[12879];c[hp+32>>2]=c[12880];c[hp+36>>2]=c[12881];c[hp+40>>2]=c[12882];c[hp+44>>2]=c[12883];c[hp+48>>2]=c[12884];c[hp+52>>2]=c[12885];c[z3+72>>2]=1;h[z3+80>>3]=0.0;c[z3+88>>2]=0;h[z3+96>>3]=15.0;h[z3+104>>3]=90.0;c[z3+112>>2]=0}z7=c[13898]|0;if((z7|0)>=(c[8272]|0)){break}hp=c[1054]|0;if((a[hp+(z7*40&-1)|0]&1)==0){b7=5277;break L27}hF=c[hp+(z7*40&-1)+36>>2]|0;hR=hp+(z7*40&-1)+32|0;hp=c[10036]|0;gC=0;while(1){if((gC|0)>=(hF|0)){break}if((a[hp+((c[hR>>2]|0)+gC|0)|0]|0)==(a[gC+103664|0]|0)){gC=gC+1|0}else{b7=5278;break L27}}if((gC|0)==1){break}else{b7=5279;break L27}}else if((hB|0)==8){c[13898]=gv+2;jx(-2,1);break}else if((hB|0)==6){hR=gv+2|0;c[13898]=gv+3;hp=c[gw+(hR*40&-1)+36>>2]|0;if(!((a[gw+(hR*40&-1)|0]&1)!=0&(hp|0)>0)){break}hF=0;gG=0;hG=c[gw+(hR*40&-1)+32>>2]|0;while(1){if((a[hF+213440|0]|0)==(a[gB+(hF+hG|0)|0]|0)){z8=hG;z9=gG}else{if((hF|0)!=1){break L44}z8=hG-1|0;z9=1}hR=hF+1|0;if((hR|0)<(z9+hp|0)){hF=hR;gG=z9;hG=z8}else{break}}if((z9|0)==0){if(!((hF|0)==0|(hF|0)==6)){break}}dl(50952,0);break}else if((hB|0)==10){uD(ft|0,51296,192);c[9670]=3;hG=c[8272]|0;if((zm|0)>=(hG|0)){break}if((a[gH]&1)==0){break}gG=c[nh>>2]|0;hp=0;while(1){if((hp|0)>=(gG|0)){b7=4013;break}if((a[gB+((c[gF>>2]|0)+hp|0)|0]|0)==(a[hp+103664|0]|0)){hp=hp+1|0}else{Aa=0;break}}if((b7|0)==4013){b7=0;if((hp|0)==1){break}else{Aa=0}}while(1){if((Aa|0)>=(gG|0)){b7=4016;break}if((a[gB+((c[gF>>2]|0)+Aa|0)|0]|0)==(a[Aa+198768|0]|0)){Aa=Aa+1|0}else{b7=4017;break}}if((b7|0)==4016){b7=0;if((Aa|0)!=2){b7=4017}}do{if((b7|0)==4017){b7=0;if((gG|0)<=0){break L44}hp=0;nh=0;gH=c[gF>>2]|0;while(1){if((a[hp+116200|0]|0)==(a[gB+(hp+gH|0)|0]|0)){Ab=gH;Ac=nh}else{if((hp|0)!=4){break L44}Ab=gH-1|0;Ac=1}hF=hp+1|0;if((hF|0)<(Ac+gG|0)){hp=hF;nh=Ac;gH=Ab}else{break}}if((Ac|0)!=0){break}if(!((hp|0)==3|(hp|0)==9)){break L44}}}while(0);gG=gv+2|0;c[13898]=gG;if((gG|0)<(hG|0)){Ad=gG;Ae=hG;Af=gw}else{break}while(1){gG=(a[Af+(Ad*40&-1)|0]&1)==0;gF=c[Af+(Ad*40&-1)+36>>2]|0;gH=Af+(Ad*40&-1)+32|0;L5408:do{if(gG){Ag=c[gH>>2]|0;b7=4064}else{nh=c[10036]|0;hF=0;while(1){if((hF|0)>=(gF|0)){b7=4031;break}gC=c[gH>>2]|0;if((a[nh+(gC+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{Ah=gC;break}}if((b7|0)==4031){b7=0;if((hF|0)==1){break L44}Ah=c[gH>>2]|0}if((gF|0)>0){Ai=0;Aj=0;Ak=Ah}else{Ag=Ah;b7=4064;break}while(1){if((a[Ai+197904|0]|0)==(a[nh+(Ai+Ak|0)|0]|0)){Al=Ak;Am=Aj}else{if((Ai|0)!=5){An=0;Ao=0;Ap=Ah;break}Al=Ak-1|0;Am=1}nd=Ai+1|0;if((nd|0)<(Am+gF|0)){Ai=nd;Aj=Am;Ak=Al}else{b7=4038;break}}do{if((b7|0)==4038){b7=0;if((Am|0)==0){if(!((Ai|0)==4|(Ai|0)==9)){An=0;Ao=0;Ap=Ah;break}}c[9670]=3;c[13898]=Ad+1;break L5408}}while(0);while(1){if((a[An+197448|0]|0)==(a[nh+(An+Ap|0)|0]|0)){Aq=Ap;Ar=Ao}else{if((An|0)!=5){As=0;At=0;Au=Ah;break}Aq=Ap-1|0;Ar=1}hF=An+1|0;if((hF|0)<(Ar+gF|0)){An=hF;Ao=Ar;Ap=Aq}else{b7=4045;break}}do{if((b7|0)==4045){b7=0;if((Ar|0)==0){if(!((An|0)==4|(An|0)==9)){As=0;At=0;Au=Ah;break}}c[9670]=4;c[13898]=Ad+1;break L5408}}while(0);while(1){if((a[As+196808|0]|0)==(a[nh+(As+Au|0)|0]|0)){Av=Au;Aw=At}else{if((As|0)!=4){Ax=0;Ay=0;Az=Ah;break}Av=Au-1|0;Aw=1}hF=As+1|0;if((hF|0)<(Aw+gF|0)){As=hF;At=Aw;Au=Av}else{b7=4054;break}}do{if((b7|0)==4054){b7=0;if((Aw|0)==0){if(!((As|0)==3|(As|0)==10)){Ax=0;Ay=0;Az=Ah;break}}c[9670]=1;c[13898]=Ad+1;break L5408}}while(0);while(1){if((a[Ax+196176|0]|0)==(a[nh+(Ax+Az|0)|0]|0)){AA=Az;AB=Ay}else{if((Ax|0)!=7){Ag=Ah;b7=4064;break L5408}AA=Az-1|0;AB=1}hF=Ax+1|0;if((hF|0)<(AB+gF|0)){Ax=hF;Ay=AB;Az=AA}else{break}}if((AB|0)==0){if(!((Ax|0)==6|(Ax|0)==13)){Ag=Ah;b7=4064;break}}c[9670]=2;c[13898]=Ad+1}}while(0);L5461:do{if((b7|0)==4064){b7=0;gH=(Ae|0)>(Ad|0);L5463:do{if(gH){if(gG){break L44}hp=c[10036]|0;nh=0;while(1){if((nh|0)>=(gF|0)){break}if((a[hp+(nh+Ag|0)|0]|0)==(a[nh+195688|0]|0)){nh=nh+1|0}else{break L5463}}if((nh|0)!=3){break}AC=Ad+1|0;c[13898]=AC;if((a[Af+(AC*40&-1)|0]&1)!=0){b7=4079;break L27}hp=is(O)|0;hF=c[hp>>2]|0;if((hF|0)==1){AD=+(c[hp+8>>2]|0)}else if((hF|0)==2){AD=+h[hp+8>>3]}else if((hF|0)==3){AD=+uz(c[hp+8>>2]|0,0)}else{b7=4075;break L27}if((c[fu>>2]|0)==3){uu(c[fv>>2]|0);c[fu>>2]=1}c[9671]=~~AD;break L5461}}while(0);hp=(gF|0)>0;L5481:do{if(hp&(gG^1)){hF=c[10036]|0;nd=0;gC=0;hR=Ag;while(1){if((a[nd+125568|0]|0)==(a[hF+(nd+hR|0)|0]|0)){AE=hR;AF=gC}else{if((nd|0)!=2){break L5481}AE=hR-1|0;AF=1}hK=nd+1|0;if((hK|0)<(AF+gF|0)){nd=hK;gC=AF;hR=AE}else{break}}if((AF|0)==0){if(!((nd|0)==1|(nd|0)==5)){break}}c[fy>>2]=c[9720];c[fy+4>>2]=c[38884>>2];c[fy+8>>2]=c[38888>>2];c[fy+12>>2]=c[38892>>2];c[fy+16>>2]=c[38896>>2];c[fy+20>>2]=c[38900>>2];c[fy+24>>2]=c[38904>>2];c[fy+28>>2]=c[38908>>2];c[fy+32>>2]=c[38912>>2];c[fy+36>>2]=c[38916>>2];jq(S);c[9702]=c[fz>>2];c[38812>>2]=c[fz+4>>2];c[38816>>2]=c[fz+8>>2];c[38820>>2]=c[fz+12>>2];c[9720]=c[fy>>2];c[38884>>2]=c[fy+4>>2];c[38888>>2]=c[fy+8>>2];c[38892>>2]=c[fy+12>>2];c[38896>>2]=c[fy+16>>2];c[38900>>2]=c[fy+20>>2];c[38904>>2]=c[fy+24>>2];c[38908>>2]=c[fy+28>>2];c[38912>>2]=c[fy+32>>2];c[38916>>2]=c[fy+36>>2];c[9700]=c[16630];break L5461}}while(0);L5494:do{if(gH){if(gG){break L44}hR=c[10036]|0;gC=0;while(1){if((gC|0)>=(gF|0)){break}if((a[hR+(gC+Ag|0)|0]|0)==(a[gC+128296|0]|0)){gC=gC+1|0}else{b7=4095;break L5494}}if((gC|0)!=2){b7=4095;break}if((c[9670]|0)!=4){break L44}}else{b7=4095}}while(0);if((b7|0)==4095){b7=0;if(gG){break L44}if(hp){gH=c[10036]|0;hR=0;nd=0;hF=Ag;while(1){if((a[hR+128400|0]|0)==(a[gH+(hR+hF|0)|0]|0)){AG=hF;AH=nd}else{if((hR|0)!=5){break L44}AG=hF-1|0;AH=1}AI=hR+1|0;if((AI|0)<(AH+gF|0)){hR=AI;nd=AH;hF=AG}else{break}}if((AH|0)==0){AJ=AI;b7=4103}else{AK=1}}else{AJ=0;b7=4103}if((b7|0)==4103){b7=0;AK=(AJ|0)==5|(AJ|0)==10}if(!(AK&(c[9670]|0)==4)){break L44}}c[13898]=Ad+1;hF=is(R)|0;nd=c[hF>>2]|0;if((nd|0)==1){AL=+(c[hF+8>>2]|0)}else if((nd|0)==2){AL=+h[hF+8>>3]}else if((nd|0)==3){AL=+uz(c[hF+8>>2]|0,0)}else{b7=4110;break L27}if((c[fw>>2]|0)==3){uu(c[fx>>2]|0);c[fw>>2]=1}h[4840]=AL;if(AL>0.0){break}h[4840]=1.0}}while(0);gF=c[13898]|0;gG=c[8272]|0;if((gF|0)>=(gG|0)){break L44}Ad=gF;Ae=gG;Af=c[1054]|0}}else if((hB|0)==9){hG=gv+2|0;c[13898]=hG;L5530:do{if((hG|0)<(c[8272]|0)){if((a[gw+(hG*40&-1)|0]&1)==0){break}gG=c[gw+(hG*40&-1)+36>>2]|0;gF=gw+(hG*40&-1)+32|0;hF=0;while(1){if((hF|0)>=(gG|0)){b7=4120;break}nd=c[gF>>2]|0;if((a[gB+(nd+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{AM=nd;break}}if((b7|0)==4120){b7=0;if((hF|0)==1){b7=4129;break}AM=c[gF>>2]|0}if((gG|0)>0){AN=0;AO=0;AP=AM}else{break}while(1){if((a[AN+184456|0]|0)==(a[gB+(AN+AP|0)|0]|0)){AQ=AP;AR=AO}else{if((AN|0)!=3){AS=0;AT=0;AU=AM;break}AQ=AP-1|0;AR=1}nd=AN+1|0;if((nd|0)<(AR+gG|0)){AN=nd;AO=AR;AP=AQ}else{b7=4127;break}}if((b7|0)==4127){b7=0;if((AR|0)!=0){b7=4129;break}if((AN|0)==2|(AN|0)==7){b7=4129;break}else{AS=0;AT=0;AU=AM}}while(1){if((a[AS+209024|0]|0)==(a[gB+(AS+AU|0)|0]|0)){AV=AU;AW=AT}else{if((AS|0)!=1){break L5530}AV=AU-1|0;AW=1}gF=AS+1|0;if((gF|0)<(AW+gG|0)){AS=gF;AT=AW;AU=AV}else{break}}if((AW|0)==0){if(!((AS|0)==0|(AS|0)==10)){break}}a[30080]=1}else{b7=4129}}while(0);if((b7|0)==4129){b7=0;a[30080]=0}c[13898]=gv+3;break}else if((hB|0)==11){hG=gv+2|0;c[13898]=hG;gG=c[8272]|0;gF=(hG|0)<(gG|0);L5563:do{if(gF){if((a[gw+(hG*40&-1)|0]&1)==0){AX=hG;AY=gG;AZ=gw;break}hF=c[gw+(hG*40&-1)+36>>2]|0;nd=gw+(hG*40&-1)+32|0;hR=0;while(1){if((hR|0)>=(hF|0)){break}if((a[gB+((c[nd>>2]|0)+hR|0)|0]|0)==(a[hR+103664|0]|0)){hR=hR+1|0}else{b7=4145;break L5563}}if((hR|0)==1){b7=4144}else{b7=4145}}else{b7=4144}}while(0);if((b7|0)==4144){b7=0;uE(cW|0,0,3);hB=56248;c[hB>>2]=0;c[hB+4>>2]=0;h[7032]=1.5;a[56264]=1;a[56265]=a[cW]|0;a[56266|0]=a[cW+1|0]|0;a[56267|0]=a[cW+2|0]|0;c[14067]=6;c[14068]=252;c[14069]=0;h[7035]=1.0;c[14072]=1;c[14073]=0;b7=4145}if((b7|0)==4145){b7=0;if(gF){AX=hG;AY=gG;AZ=gw}else{break}}while(1){hB=(a[AZ+(AX*40&-1)|0]&1)==0;nd=c[AZ+(AX*40&-1)+36>>2]|0;hF=AZ+(AX*40&-1)+32|0;L5576:do{if(hB){A_=c[hF>>2]|0;b7=4176}else{gH=c[10036]|0;hp=0;while(1){if((hp|0)>=(nd|0)){b7=4151;break}nh=c[hF>>2]|0;if((a[gH+(nh+hp|0)|0]|0)==(a[hp+103664|0]|0)){hp=hp+1|0}else{A$=nh;break}}if((b7|0)==4151){b7=0;if((hp|0)==1){break L44}A$=c[hF>>2]|0}if((nd|0)>0){A0=0;A1=0;A2=A$}else{A_=A$;b7=4176;break}while(1){if((a[A0+207888|0]|0)==(a[gH+(A0+A2|0)|0]|0)){A3=A2;A4=A1}else{if((A0|0)!=5){A5=0;A6=0;A7=A$;break}A3=A2-1|0;A4=1}nh=A0+1|0;if((nh|0)<(A4+nd|0)){A0=nh;A1=A4;A2=A3}else{b7=4158;break}}do{if((b7|0)==4158){b7=0;if((A4|0)==0){if(!((A0|0)==4|(A0|0)==10)){A5=0;A6=0;A7=A$;break}}a[56264]=0;c[13898]=AX+1;break L5576}}while(0);while(1){if((a[A5+207040|0]|0)==(a[gH+(A5+A7|0)|0]|0)){A8=A7;A9=A6}else{if((A5|0)!=3){Ba=0;Bb=0;Bc=A$;break}A8=A7-1|0;A9=1}hp=A5+1|0;if((hp|0)<(A9+nd|0)){A5=hp;A6=A9;A7=A8}else{b7=4165;break}}do{if((b7|0)==4165){b7=0;if((A9|0)==0){if(!((A5|0)==2|(A5|0)==8)){Ba=0;Bb=0;Bc=A$;break}}a[56264]=1;c[13898]=AX+1;break L5576}}while(0);while(1){if((a[Ba+206448|0]|0)==(a[gH+(Ba+Bc|0)|0]|0)){Bd=Bc;Be=Bb}else{if((Ba|0)!=5){A_=A$;b7=4176;break L5576}Bd=Bc-1|0;Be=1}hp=Ba+1|0;if((hp|0)<(Be+nd|0)){Ba=hp;Bb=Be;Bc=Bd}else{break}}if((Be|0)!=0){b7=4182;break}if((Ba|0)==4|(Ba|0)==9){b7=4182}else{A_=A$;b7=4176}}}while(0);L5616:do{if((b7|0)==4176){b7=0;L5618:do{if((AY|0)>(AX|0)){if(hB){b7=5292;break L27}hF=c[10036]|0;hR=0;while(1){if((hR|0)>=(nd|0)){b7=4181;break}if((a[hF+(hR+A_|0)|0]|0)==(a[hR+205624|0]|0)){hR=hR+1|0}else{Bf=0;break}}if((b7|0)==4181){b7=0;if((hR|0)==2){b7=4182;break L5616}else{Bf=0}}while(1){if((Bf|0)>=(nd|0)){break}if((a[hF+(Bf+A_|0)|0]|0)==(a[Bf+205008|0]|0)){Bf=Bf+1|0}else{break L5618}}if((Bf|0)!=5){break}c[13898]=AX+1;c[14062]=0;hF=is(L)|0;hR=c[hF>>2]|0;if((hR|0)==1){Bg=+(c[hF+8>>2]|0)}else if((hR|0)==2){Bg=+h[hF+8>>3]}else if((hR|0)==3){Bg=+uz(c[hF+8>>2]|0,0)}else{b7=4197;break L27}if((c[fA>>2]|0)==3){uu(c[fB>>2]|0);c[fA>>2]=1}h[7032]=Bg;break L5616}}while(0);if(!((nd|0)>0&(hB^1))){b7=5293;break L27}hF=c[10036]|0;hR=0;gC=0;gH=A_;while(1){if((a[hR+204616|0]|0)==(a[hF+(hR+gH|0)|0]|0)){Bh=gH;Bi=gC}else{if((hR|0)!=4){Bj=0;Bk=0;Bl=A_;break}Bh=gH-1|0;Bi=1}hp=hR+1|0;if((hp|0)<(Bi+nd|0)){hR=hp;gC=Bi;gH=Bh}else{b7=4207;break}}do{if((b7|0)==4207){b7=0;if((Bi|0)==0){if(!((hR|0)==8|(hR|0)==3)){Bj=0;Bk=0;Bl=A_;break}}c[13898]=AX+1;gH=is(K)|0;gC=c[gH>>2]|0;if((gC|0)==1){Bm=+(c[gH+8>>2]|0)}else if((gC|0)==2){Bm=+h[gH+8>>3]}else if((gC|0)==3){Bm=+uz(c[gH+8>>2]|0,0)}else{b7=4213;break L27}if((c[fE>>2]|0)==3){uu(c[fF>>2]|0);c[fE>>2]=1}h[7032]=Bm;if(Bm<0.0|Bm>1.0){b7=4217;break L27}c[14062]=1;break L5616}}while(0);while(1){if((a[Bj+204096|0]|0)==(a[hF+(Bj+Bl|0)|0]|0)){Bn=Bl;Bo=Bk}else{if((Bj|0)!=6){Bp=0;Bq=0;Br=A_;break}Bn=Bl-1|0;Bo=1}hR=Bj+1|0;if((hR|0)<(Bo+nd|0)){Bj=hR;Bk=Bo;Bl=Bn}else{b7=4223;break}}do{if((b7|0)==4223){b7=0;if((Bo|0)==0){if(!((Bj|0)==12|(Bj|0)==5)){Bp=0;Bq=0;Br=A_;break}}c[13898]=AX+1;c[14068]=252;break L5616}}while(0);while(1){if((a[Bp+203848|0]|0)==(a[hF+(Bp+Br|0)|0]|0)){Bs=Br;Bt=Bq}else{if((Bp|0)!=7){Bu=0;Bv=0;Bw=A_;break}Bs=Br-1|0;Bt=1}hR=Bp+1|0;if((hR|0)<(Bt+nd|0)){Bp=hR;Bq=Bt;Br=Bs}else{b7=4230;break}}do{if((b7|0)==4230){b7=0;if((Bt|0)==0){if(!((Bp|0)==11|(Bp|0)==6)){Bu=0;Bv=0;Bw=A_;break}}c[13898]=AX+1;c[14068]=257;break L5616}}while(0);while(1){if((a[Bu+203640|0]|0)==(a[hF+(Bu+Bw|0)|0]|0)){Bx=Bw;By=Bv}else{if((Bu|0)!=3){Bz=0;BA=0;BB=A_;break}Bx=Bw-1|0;By=1}hR=Bu+1|0;if((hR|0)<(By+nd|0)){Bu=hR;Bv=By;Bw=Bx}else{b7=4237;break}}do{if((b7|0)==4237){b7=0;if((By|0)==0){if(!((Bu|0)==10|(Bu|0)==2)){Bz=0;BA=0;BB=A_;break}}c[13898]=AX+1;hR=is(N)|0;gH=c[hR>>2]|0;if((gH|0)==1){BC=+(c[hR+8>>2]|0)}else if((gH|0)==2){BC=+h[hR+8>>3]}else if((gH|0)==3){BC=+uz(c[hR+8>>2]|0,0)}else{b7=4243;break L27}if((c[fC>>2]|0)==3){uu(c[fD>>2]|0);c[fC>>2]=1}h[7035]=BC;if(BC<0.0){b7=4247;break L27}else{break L5616}}}while(0);while(1){if((a[Bz+203048|0]|0)==(a[hF+(Bz+BB|0)|0]|0)){BD=BB;BE=BA}else{if((Bz|0)!=3){BF=0;BG=0;BH=A_;break}BD=BB-1|0;BE=1}hR=Bz+1|0;if((hR|0)<(BE+nd|0)){Bz=hR;BA=BE;BB=BD}else{b7=4252;break}}do{if((b7|0)==4252){b7=0;if((BE|0)==0){if(!((Bz|0)==6|(Bz|0)==2)){BF=0;BG=0;BH=A_;break}}hR=AX+1|0;c[13898]=hR;if((AY|0)<=(hR|0)){b7=5288;break L27}if((a[AZ+(hR*40&-1)|0]&1)==0){b7=5289;break L27}gH=c[AZ+(hR*40&-1)+36>>2]|0;gC=AZ+(hR*40&-1)+32|0;hR=0;while(1){if((hR|0)>=(gH|0)){b7=4259;break}if((a[hF+((c[gC>>2]|0)+hR|0)|0]|0)==(a[hR+150208|0]|0)){hR=hR+1|0}else{BI=0;b7=4261;break}}do{if((b7|0)==4259){b7=0;if((hR|0)!=3){BI=0;b7=4261;break}c[14072]=0}}while(0);L5721:do{if((b7|0)==4261){while(1){b7=0;if((BI|0)>=(gH|0)){b7=4263;break}if((a[hF+((c[gC>>2]|0)+BI|0)|0]|0)==(a[BI+202352|0]|0)){BI=BI+1|0;b7=4261}else{BJ=0;break}}do{if((b7|0)==4263){b7=0;if((BI|0)!=1){BJ=0;break}c[14072]=2;break L5721}}while(0);while(1){if((BJ|0)>=(gH|0)){b7=4267;break}if((a[hF+((c[gC>>2]|0)+BJ|0)|0]|0)==(a[BJ+108208|0]|0)){BJ=BJ+1|0}else{BK=0;break}}do{if((b7|0)==4267){b7=0;if((BJ|0)!=2){BK=0;break}c[14072]=3;break L5721}}while(0);while(1){if((BK|0)>=(gH|0)){break}if((a[hF+((c[gC>>2]|0)+BK|0)|0]|0)==(a[BK+201e3|0]|0)){BK=BK+1|0}else{b7=5290;break L27}}if((BK|0)!=4){b7=5291;break L27}c[14072]=1}}while(0);c[13898]=AX+2;break L5616}}while(0);while(1){if((a[BF+199432|0]|0)==(a[hF+(BF+BH|0)|0]|0)){BL=BH;BM=BG}else{if((BF|0)!=2){BN=0;BO=0;BP=A_;break}BL=BH-1|0;BM=1}gC=BF+1|0;if((gC|0)<(BM+nd|0)){BF=gC;BG=BM;BH=BL}else{b7=4279;break}}do{if((b7|0)==4279){b7=0;if((BM|0)==0){if(!((BF|0)==1|(BF|0)==6)){BN=0;BO=0;BP=A_;break}}a[56292]=1;c[13898]=AX+1;break L5616}}while(0);while(1){if((a[BN+199064|0]|0)==(a[hF+(BN+BP|0)|0]|0)){BQ=BP;BR=BO}else{if((BN|0)!=2){b7=5294;break L27}BQ=BP-1|0;BR=1}gC=BN+1|0;if((gC|0)<(BR+nd|0)){BN=gC;BO=BR;BP=BQ}else{break}}if((BR|0)==0){if(!((BN|0)==1|(BN|0)==8)){b7=5295;break L27}}a[56292]=0;c[13898]=AX+1}}while(0);if((b7|0)==4182){b7=0;c[13898]=AX+1;nd=is(M)|0;hB=c[nd>>2]|0;if((hB|0)==1){BS=+(c[nd+8>>2]|0)}else if((hB|0)==2){BS=+h[nd+8>>3]}else if((hB|0)==3){BS=+uz(c[nd+8>>2]|0,0)}else{b7=4186;break L27}if((c[fG>>2]|0)==3){uu(c[fH>>2]|0);c[fG>>2]=1}c[14067]=~~BS-1}nd=c[13898]|0;hB=c[8272]|0;if((nd|0)>=(hB|0)){break L44}AX=nd;AY=hB;AZ=c[1054]|0}}else{b7=4290;break L27}}else if((gD|0)==84){c[13898]=gv+1;a[46752]=1}else if((gD|0)==86){gG=gv+1|0;c[13898]=gG;hG=c[3526]|0;if((hG|0)==0){BT=gG}else{az(hG|0);c[3526]=0;BT=c[13898]|0}L5778:do{if((BT|0)<(c[8272]|0)){hG=c[1054]|0;L5780:do{if((a[hG+(BT*40&-1)|0]&1)!=0){gG=c[hG+(BT*40&-1)+36>>2]|0;gF=hG+(BT*40&-1)+32|0;hB=c[10036]|0;nd=0;while(1){if((nd|0)>=(gG|0)){break}if((a[hB+((c[gF>>2]|0)+nd|0)|0]|0)==(a[nd+103664|0]|0)){nd=nd+1|0}else{break L5780}}if((nd|0)==1){break L5778}}}while(0);a[14176]=1;is(J);a[14176]=0;if((c[fI>>2]|0)!=3){c[13898]=BT;break}hG=c[fJ>>2]|0;if((hG|0)==0){break}gF=bF(hG|0,137896)|0;c[3526]=gF;if((gF|0)==0){b7=4304;break L27}uu(hG)}}while(0);a[14112]=1}else if((gD|0)==87){BU=gv+1|0;c[13898]=BU;if((a[33512]&1)!=0){b7=4308;break L27}L5795:do{if((BU|0)<(c[8272]|0)){L5797:do{if((a[gw+(BU*40&-1)|0]&1)!=0){hG=c[gw+(BU*40&-1)+36>>2]|0;gF=gw+(BU*40&-1)+32|0;hB=0;while(1){if((hB|0)>=(hG|0)){b7=4314;break}if((a[gB+((c[gF>>2]|0)+hB|0)|0]|0)==(a[hB+103664|0]|0)){hB=hB+1|0}else{BV=0;break}}if((b7|0)==4314){b7=0;if((hB|0)==1){break L5795}else{BV=0}}while(1){if((BV|0)>=(hG|0)){break}if((a[gB+((c[gF>>2]|0)+BV|0)|0]|0)==(a[BV+216664|0]|0)){BV=BV+1|0}else{break L5797}}if((BV|0)!=4){break}hz(a[37400]&1);c[13898]=(c[13898]|0)+1;break L44}}while(0);hO(1);c[8026]=0;do{if((a[14080]&1)!=0){if(a[13032]|0){gF=c[(c[3524]|0)+104>>2]|0;if((gF|0)!=0){cS[gF&511]()}a[13032]=0}if(a[14088]|0){cS[c[(c[3524]|0)+44>>2]&511]();a[14088]=0}if((a[14080]&1)==0){break}cS[c[(c[3524]|0)+40>>2]&511]();a[14080]=0;c[10028]=0}}while(0);gF=c[13898]|0;L5823:do{if((c[8272]|0)>(gF|0)){hG=c[1054]|0;if((a[hG+(gF*40&-1)|0]&1)==0){break}hB=c[hG+(gF*40&-1)+36>>2]|0;nd=hG+(gF*40&-1)+32|0;hG=c[10036]|0;gG=0;while(1){if((gG|0)>=(hB|0)){break}if((a[hG+((c[nd>>2]|0)+gG|0)|0]|0)==(a[gG+216216|0]|0)){gG=gG+1|0}else{break L5823}}if((gG|0)!=3){break}hD();c[13898]=(c[13898]|0)+1;break L44}}while(0);c[3524]=0;gF=lz()|0;c[3524]=gF;a[13048]=0;if((gF|0)==0){break L44}cS[c[gF+32>>2]&511]();if((a[37400]&1)==0|(a[13048]|0)==0){break L44}gF=c[m>>2]|0;cf(gF|0,215680,(v=i,i=i+8|0,c[v>>2]=13048,v)|0);break L44}}while(0);ls();a[25280]=0}else if((gD|0)==88){gF=c[8272]|0;BW=gv+1|0;c[13898]=BW;if((BW|0)>=(gF|0)){break}nd=(a[gw+(BW*40&-1)|0]&1)==0;L5837:do{if(nd){BX=1}else{hG=c[gw+(BW*40&-1)+36>>2]|0;hB=gw+(BW*40&-1)+32|0;hF=0;while(1){if((hF|0)>=(hG|0)){break}if((a[gB+((c[hB>>2]|0)+hF|0)|0]|0)==(a[hF+103664|0]|0)){hF=hF+1|0}else{BX=1;break L5837}}BX=(hF|0)!=1}}while(0);hB=c[3524]|0;if(!(BX&(hB|0)!=0)){break}hG=c[gw+(BW*40&-1)+36>>2]|0;gC=c[gw+(BW*40&-1)+32>>2]|0;L5845:do{if(nd){b7=4406}else{gH=(hG|0)>0;L5847:do{if(gH){hR=0;hp=0;nh=gC;while(1){if((a[hR+122880|0]|0)==(a[gB+(hR+nh|0)|0]|0)){BY=nh;BZ=hp}else{if((hR|0)!=3){B_=0;B$=0;B0=gC;b7=4354;break}BY=nh-1|0;BZ=1}hK=hR+1|0;if((hK|0)<(BZ+hG|0)){hR=hK;hp=BZ;nh=BY}else{b7=4352;break}}do{if((b7|0)==4352){b7=0;if((BZ|0)!=0){break}if(!((hR|0)==2|(hR|0)==8)){B_=0;B$=0;B0=gC;b7=4354}}}while(0);do{if((b7|0)==4354){while(1){b7=0;if((a[B_+121536|0]|0)==(a[gB+(B_+B0|0)|0]|0)){B1=B0;B2=B$}else{if((B_|0)!=5){B3=0;break L5847}B1=B0-1|0;B2=1}hR=B_+1|0;if((hR|0)<(B2+hG|0)){B_=hR;B$=B2;B0=B1;b7=4354}else{break}}if((B2|0)!=0){break}if(!((B_|0)==4|(B_|0)==10)){B3=0;break L5847}}}while(0);hR=gv+2|0;c[8272]=(gF|0)<(hR|0)?gF:hR;if((c[hB+156>>2]|0)!=0){b7=4411;break L5845}c[13898]=hR;break L5845}else{B3=0}}while(0);while(1){if((B3|0)>=(hG|0)){b7=4364;break}if((a[gB+(B3+gC|0)|0]|0)==(a[B3+124352|0]|0)){B3=B3+1|0}else{B4=0;b7=4365;break}}if((b7|0)==4364){b7=0;if((B3|0)!=4){B4=0;b7=4365}}do{if((b7|0)==4365){while(1){b7=0;if((B4|0)>=(hG|0)){b7=4367;break}if((a[gB+(B4+gC|0)|0]|0)==(a[B4+223712|0]|0)){B4=B4+1|0;b7=4365}else{B5=0;break}}if((b7|0)==4367){b7=0;if((B4|0)==5){break}else{B5=0}}while(1){if((B5|0)>=(hG|0)){b7=4372;break}if((a[gB+(B5+gC|0)|0]|0)==(a[B5+128096|0]|0)){B5=B5+1|0}else{B6=0;break}}do{if((b7|0)==4372){b7=0;if((B5|0)!=9){B6=0;break}if((c[hB+96>>2]&4096|0)!=0){b7=4411;break L5845}c[13898]=gv+2;hF=is(H)|0;hR=c[hF>>2]|0;if((hR|0)==3){nh=c[hF+8>>2]|0;uz(nh,0)}else if(!((hR|0)==1|(hR|0)==2)){b7=4376;break L27}if((c[fM>>2]|0)!=3){break L5845}uu(c[fN>>2]|0);c[fM>>2]=1;break L5845}}while(0);while(1){if((B6|0)>=(hG|0)){b7=4381;break}if((a[gB+(B6+gC|0)|0]|0)==(a[B6+128296|0]|0)){B6=B6+1|0}else{b7=4382;break}}if((b7|0)==4381){b7=0;if((B6|0)!=2){b7=4382}}L5895:do{if((b7|0)==4382){b7=0;L5897:do{if(gH){hR=0;nh=0;hF=gC;while(1){if((a[hR+128400|0]|0)==(a[gB+(hR+hF|0)|0]|0)){B7=hF;B8=nh}else{if((hR|0)!=5){B9=0;Ca=0;Cb=gC;break}B7=hF-1|0;B8=1}hp=hR+1|0;if((hp|0)<(B8+hG|0)){hR=hp;nh=B8;hF=B7}else{b7=4387;break}}if((b7|0)==4387){b7=0;if((B8|0)!=0){break L5895}if((hR|0)==4|(hR|0)==9){break L5895}else{B9=0;Ca=0;Cb=gC}}while(1){if((a[B9+217752|0]|0)==(a[gB+(B9+Cb|0)|0]|0)){Cc=Cb;Cd=Ca}else{if((B9|0)!=4){Ce=0;b7=4401;break L5897}Cc=Cb-1|0;Cd=1}hF=B9+1|0;if((hF|0)<(Cd+hG|0)){B9=hF;Ca=Cd;Cb=Cc}else{break}}if((Cd|0)!=0){break}if(!((B9|0)==3|(B9|0)==6)){Ce=0;b7=4401}}else{Ce=0;b7=4401}}while(0);if((b7|0)==4401){while(1){b7=0;if((Ce|0)>=(hG|0)){break}if((a[gB+(Ce+gC|0)|0]|0)==(a[Ce+131504|0]|0)){Ce=Ce+1|0;b7=4401}else{b7=4406;break L5845}}if((Ce|0)!=5){b7=4406;break L5845}}if((c[hB+96>>2]&256|0)!=0){b7=4411;break L5845}c[13898]=gv+2;break L5845}}while(0);if((c[hB+96>>2]&2048|0)!=0){b7=4411;break L5845}c[13898]=gv+2;hR=is(I)|0;hF=c[hR>>2]|0;if((hF|0)==3){nh=c[hR+8>>2]|0;uz(nh,0)}else if(!((hF|0)==1|(hF|0)==2)){b7=4392;break L27}if((c[fK>>2]|0)!=3){break L5845}uu(c[fL>>2]|0);c[fK>>2]=1;break L5845}}while(0);gH=gv+3|0;c[8272]=(gF|0)<(gH|0)?gF:gH;if((c[hB+88>>2]|0)!=0){b7=4411;break}c[13898]=gH}}while(0);if((b7|0)==4406){b7=0;if((aY(c[hB>>2]|0,218960)|0)!=0|nd){b7=5296;break L27}else{Cf=0}while(1){if((Cf|0)>=(hG|0)){break}if((a[gB+(Cf+gC|0)|0]|0)==(a[Cf+218488|0]|0)){Cf=Cf+1|0}else{b7=5297;break L27}}if((Cf|0)==5&(gF|0)==4){b7=4411}else{b7=5298;break L27}}if((b7|0)==4411){b7=0;a[13048]=0;cS[c[hB+32>>2]&511]()}c[8272]=gF}else if((gD|0)==89){gC=gv+1|0;c[13898]=gC;hG=c[8272]|0;nd=(gC|0)<(hG|0);L5940:do{if(nd){if((a[gw+(gC*40&-1)|0]&1)==0){Cg=0;Ch=0;Ci=gC;Cj=hG;Ck=gw;b7=4421;break}gH=c[gw+(gC*40&-1)+36>>2]|0;hF=gw+(gC*40&-1)+32|0;nh=0;while(1){if((nh|0)>=(gH|0)){break}if((a[gB+((c[hF>>2]|0)+nh|0)|0]|0)==(a[nh+103664|0]|0)){nh=nh+1|0}else{b7=4420;break L5940}}if((nh|0)==1){b7=4419}else{b7=4420}}else{b7=4419}}while(0);if((b7|0)==4419){b7=0;a[65072]=1;a[65760]=1;a[66448]=1;a[67136]=1;a[67824]=1;a[68512]=1;a[69200]=1;a[69888]=1;a[70576]=1;a[71264]=1;a[71952]=1;b7=4420}if((b7|0)==4420){b7=0;if(nd){Cg=0;Ch=0;Ci=gC;Cj=hG;Ck=gw;b7=4421}else{Cl=0;Cm=0}}L5951:do{if((b7|0)==4421){while(1){b7=0;gF=(a[Ck+(Ci*40&-1)|0]&1)==0;hB=c[Ck+(Ci*40&-1)+36>>2]|0;hF=Ck+(Ci*40&-1)+32|0;L5954:do{if(gF){Cn=c[hF>>2]|0;b7=4620}else{gH=c[10036]|0;hR=0;while(1){if((hR|0)>=(hB|0)){b7=4426;break}hp=c[hF>>2]|0;if((a[gH+(hp+hR|0)|0]|0)==(a[hR+103664|0]|0)){hR=hR+1|0}else{Co=hp;break}}if((b7|0)==4426){b7=0;if((hR|0)==1){Cl=Cg;Cm=Ch;break L5951}Co=c[hF>>2]|0}if((hB|0)>0){Cp=0;Cq=0;Cr=Co}else{Cn=Co;b7=4620;break}while(1){if((a[Cp+116896|0]|0)==(a[gH+(Cp+Cr|0)|0]|0)){Cs=Cr;Ct=Cq}else{if((Cp|0)!=2){Cu=0;Cv=0;Cw=Co;break}Cs=Cr-1|0;Ct=1}hp=Cp+1|0;if((hp|0)<(Ct+hB|0)){Cp=hp;Cq=Ct;Cr=Cs}else{b7=4434;break}}do{if((b7|0)==4434){b7=0;if((Ct|0)==0){if(!((Cp|0)==1|(Cp|0)==4)){Cu=0;Cv=0;Cw=Co;break}}c[16229]=c[16229]&-4|2;c[16401]=c[16401]&-4|2;c[16573]=c[16573]&-4|2;c[16745]=c[16745]&-4|2;c[16917]=c[16917]&-4|2;c[17089]=c[17089]&-4|2;c[17261]=c[17261]&-4|2;c[17433]=c[17433]&-4|2;c[17605]=c[17605]&-4|2;c[17777]=c[17777]&-4|2;c[17949]=c[17949]&-4|2;c[13898]=Ci+1;Cx=1;Cy=Cg;break L5954}}while(0);while(1){if((a[Cu+141136|0]|0)==(a[gH+(Cu+Cw|0)|0]|0)){Cz=Cw;CA=Cv}else{if((Cu|0)!=2){CB=0;CC=0;CD=Co;break}Cz=Cw-1|0;CA=1}hR=Cu+1|0;if((hR|0)<(CA+hB|0)){Cu=hR;Cv=CA;Cw=Cz}else{b7=4441;break}}do{if((b7|0)==4441){b7=0;if((CA|0)==0){if(!((Cu|0)==1|(Cu|0)==6)){CB=0;CC=0;CD=Co;break}}c[16229]=c[16229]&-4|1;c[16401]=c[16401]&-4|1;c[16573]=c[16573]&-4|1;c[16745]=c[16745]&-4|1;c[16917]=c[16917]&-4|1;c[17089]=c[17089]&-4|1;c[17261]=c[17261]&-4|1;c[17433]=c[17433]&-4|1;c[17605]=c[17605]&-4|1;c[17777]=c[17777]&-4|1;c[17949]=c[17949]&-4|1;c[13898]=Ci+1;Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[CB+115048|0]|0)==(a[gH+(CB+CD|0)|0]|0)){CE=CD;CF=CC}else{if((CB|0)!=2){CG=0;CH=0;CI=Co;break}CE=CD-1|0;CF=1}hR=CB+1|0;if((hR|0)<(CF+hB|0)){CB=hR;CC=CF;CD=CE}else{b7=4450;break}}do{if((b7|0)==4450){b7=0;if((CF|0)==0){if(!((CB|0)==1|(CB|0)==6)){CG=0;CH=0;CI=Co;break}}c[16229]=c[16229]|4;c[16401]=c[16401]|4;c[16573]=c[16573]|4;c[16745]=c[16745]|4;c[16917]=c[16917]|4;c[17089]=c[17089]|4;c[17261]=c[17261]|4;c[17433]=c[17433]|4;c[17605]=c[17605]|4;c[17777]=c[17777]|4;c[17949]=c[17949]|4;c[13898]=Ci+1;Cx=Ch;Cy=1;break L5954}}while(0);while(1){if((a[CG+114024|0]|0)==(a[gH+(CG+CI|0)|0]|0)){CJ=CI;CK=CH}else{if((CG|0)!=4){CL=0;CM=0;CN=Co;break}CJ=CI-1|0;CK=1}hR=CG+1|0;if((hR|0)<(CK+hB|0)){CG=hR;CH=CK;CI=CJ}else{b7=4457;break}}do{if((b7|0)==4457){b7=0;if((CK|0)==0){if(!((CG|0)==3|(CG|0)==8)){CL=0;CM=0;CN=Co;break}}c[16229]=c[16229]&-5;c[16401]=c[16401]&-5;c[16573]=c[16573]&-5;c[16745]=c[16745]&-5;c[16917]=c[16917]&-5;c[17089]=c[17089]&-5;c[17261]=c[17261]&-5;c[17433]=c[17433]&-5;c[17605]=c[17605]&-5;c[17777]=c[17777]&-5;c[17949]=c[17949]&-5;c[13898]=Ci+1;Cx=Ch;Cy=1;break L5954}}while(0);while(1){if((a[CL+110600|0]|0)==(a[gH+(CL+CN|0)|0]|0)){CO=CN;CP=CM}else{if((CL|0)!=2){CQ=0;CR=0;CS=Co;break}CO=CN-1|0;CP=1}hR=CL+1|0;if((hR|0)<(CP+hB|0)){CL=hR;CM=CP;CN=CO}else{b7=4464;break}}do{if((b7|0)==4464){b7=0;if((CP|0)==0){if(!((CL|0)==1|(CL|0)==7)){CQ=0;CR=0;CS=Co;break}}a[65072]=1;a[65760]=1;a[66448]=1;a[67136]=1;a[67824]=1;a[68512]=1;a[69200]=1;a[69888]=1;a[70576]=1;a[71264]=1;a[71952]=1;c[13898]=Ci+1;Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[CQ+107800|0]|0)==(a[gH+(CQ+CS|0)|0]|0)){CT=CS;CU=CR}else{if((CQ|0)!=3){CV=0;CW=0;CX=Co;break}CT=CS-1|0;CU=1}hR=CQ+1|0;if((hR|0)<(CU+hB|0)){CQ=hR;CR=CU;CS=CT}else{b7=4471;break}}do{if((b7|0)==4471){b7=0;if((CU|0)==0){if(!((CQ|0)==2|(CQ|0)==8)){CV=0;CW=0;CX=Co;break}}a[65072]=0;a[65760]=0;a[66448]=0;a[67136]=0;a[67824]=0;a[68512]=0;a[69200]=0;a[69888]=0;a[70576]=0;a[71264]=0;a[71952]=0;c[13898]=Ci+1;Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[CV+106864|0]|0)==(a[gH+(CV+CX|0)|0]|0)){CY=CX;CZ=CW}else{if((CV|0)!=2){C_=0;C$=0;C0=Co;break}CY=CX-1|0;CZ=1}hR=CV+1|0;if((hR|0)<(CZ+hB|0)){CV=hR;CW=CZ;CX=CY}else{b7=4478;break}}do{if((b7|0)==4478){b7=0;if((CZ|0)==0){if(!((CV|0)==5|(CV|0)==1)){C_=0;C$=0;C0=Co;break}}hR=Ci+1|0;c[13898]=hR;hp=c[Ck+(hR*40&-1)+36>>2]|0;L6041:do{if((a[Ck+(hR*40&-1)|0]&1)!=0&(hp|0)>0){gG=0;hK=0;hS=c[Ck+(hR*40&-1)+32>>2]|0;while(1){if((a[gG+184456|0]|0)==(a[gH+(gG+hS|0)|0]|0)){C1=hS;C2=hK}else{if((gG|0)!=3){break L6041}C1=hS-1|0;C2=1}gz=gG+1|0;if((gz|0)<(C2+hp|0)){gG=gz;hK=C2;hS=C1}else{break}}if((C2|0)==0){if(!((gG|0)==2|(gG|0)==7)){break}}h[8132]=1.0;h[8133]=.5;h[8218]=1.0;h[8219]=.5;h[8304]=1.0;h[8305]=.5;h[8390]=1.0;h[8391]=.5;h[8476]=1.0;h[8477]=.5;h[8562]=1.0;h[8563]=.5;h[8648]=1.0;h[8649]=.5;h[8734]=1.0;h[8735]=.5;h[8820]=1.0;h[8821]=.5;h[8906]=1.0;h[8907]=.5;h[8992]=1.0;h[8993]=.5;c[13898]=Ci+2;Cx=Ch;Cy=Cg;break L5954}}while(0);hp=is(C)|0;hR=c[hp>>2]|0;if((hR|0)==1){C3=+(c[hp+8>>2]|0)}else if((hR|0)==2){C3=+h[hp+8>>3]}else if((hR|0)==3){C3=+uz(c[hp+8>>2]|0,0)}else{b7=4493;break L27}if((c[fV>>2]|0)==3){uu(c[fW>>2]|0);c[fV>>2]=1}hp=c[13898]|0;L6062:do{if((c[8272]|0)>(hp|0)){hR=c[1054]|0;if((a[hR+(hp*40&-1)|0]&1)==0){b7=4509;break}hS=c[hR+(hp*40&-1)+36>>2]|0;hK=hR+(hp*40&-1)+32|0;hR=c[10036]|0;gz=0;while(1){if((gz|0)>=(hS|0)){break}if((a[hR+((c[hK>>2]|0)+gz|0)|0]|0)==(a[gz+148464|0]|0)){gz=gz+1|0}else{b7=4509;break L6062}}if((gz|0)!=1){b7=4509;break}c[13898]=hp+1;hK=is(B)|0;hR=c[hK>>2]|0;if((hR|0)==1){C4=+(c[hK+8>>2]|0)}else if((hR|0)==2){C4=+h[hK+8>>3]}else if((hR|0)==3){C4=+uz(c[hK+8>>2]|0,0)}else{b7=4506;break L27}if((c[fX>>2]|0)!=3){C5=C4;break}uu(c[fY>>2]|0);c[fX>>2]=1;C5=C4}else{b7=4509}}while(0);if((b7|0)==4509){b7=0;C5=C3*.5}h[8132]=C3;h[8133]=C5;h[8218]=C3;h[8219]=C5;h[8304]=C3;h[8305]=C5;h[8390]=C3;h[8391]=C5;h[8476]=C3;h[8477]=C5;h[8562]=C3;h[8563]=C5;h[8648]=C3;h[8649]=C5;h[8734]=C3;h[8735]=C5;h[8820]=C3;h[8821]=C5;h[8906]=C3;h[8907]=C5;h[8992]=C3;h[8993]=C5;Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[C_+104840|0]|0)==(a[gH+(C_+C0|0)|0]|0)){C6=C0;C7=C$}else{if((C_|0)!=2){C8=0;C9=0;Da=Co;break}C6=C0-1|0;C7=1}hp=C_+1|0;if((hp|0)<(C7+hB|0)){C_=hp;C$=C7;C0=C6}else{b7=4515;break}}do{if((b7|0)==4515){b7=0;if((C7|0)==0){if(!((C_|0)==1|(C_|0)==6)){C8=0;C9=0;Da=Co;break}}c[16258]=-270;c[16430]=-270;c[16602]=-270;c[16774]=-270;c[16946]=-270;c[17118]=-270;c[17290]=-270;c[17462]=-270;c[17634]=-270;c[17806]=-270;c[17978]=-270;hp=Ci+1|0;c[13898]=hp;if((Cj|0)<=(hp|0)){Cx=Ch;Cy=Cg;break L5954}if((a[Ck+(hp*40&-1)|0]&1)==0){Cx=Ch;Cy=Cg;break L5954}hK=c[Ck+(hp*40&-1)+36>>2]|0;hR=Ck+(hp*40&-1)+32|0;hp=0;while(1){if((hp|0)>=(hK|0)){break}if((a[gH+((c[hR>>2]|0)+hp|0)|0]|0)==(a[hp+163312|0]|0)){hp=hp+1|0}else{Cx=Ch;Cy=Cg;break L5954}}if((hp|0)!=2){Cx=Ch;Cy=Cg;break L5954}c[13898]=Ci+2;hR=is(D)|0;hK=c[hR>>2]|0;if((hK|0)==1){Db=+(c[hR+8>>2]|0)}else if((hK|0)==2){Db=+h[hR+8>>3]}else if((hK|0)==3){Db=+uz(c[hR+8>>2]|0,0)}else{b7=4527;break L27}if((c[fT>>2]|0)==3){uu(c[fU>>2]|0);c[fT>>2]=1}hR=~~Db;c[16258]=hR;c[16430]=hR;c[16602]=hR;c[16774]=hR;c[16946]=hR;c[17118]=hR;c[17290]=hR;c[17462]=hR;c[17634]=hR;c[17806]=hR;c[17978]=hR;Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[C8+104240|0]|0)==(a[gH+(C8+Da|0)|0]|0)){Dc=Da;Dd=C9}else{if((C8|0)!=4){De=0;Df=0;Dg=Co;break}Dc=Da-1|0;Dd=1}hR=C8+1|0;if((hR|0)<(Dd+hB|0)){C8=hR;C9=Dd;Da=Dc}else{b7=4535;break}}do{if((b7|0)==4535){b7=0;if((Dd|0)==0){if(!((C8|0)==3|(C8|0)==8)){De=0;Df=0;Dg=Co;break}}c[16258]=0;c[16430]=0;c[16602]=0;c[16774]=0;c[16946]=0;c[17118]=0;c[17290]=0;c[17462]=0;c[17634]=0;c[17806]=0;c[17978]=0;c[13898]=Ci+1;Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[De+149696|0]|0)==(a[gH+(De+Dg|0)|0]|0)){Dh=Dg;Di=Df}else{if((De|0)!=1){Dj=0;Dk=0;Dl=Co;break}Dh=Dg-1|0;Di=1}hR=De+1|0;if((hR|0)<(Di+hB|0)){De=hR;Df=Di;Dg=Dh}else{b7=4542;break}}do{if((b7|0)==4542){b7=0;if((Di|0)==0){if(!((De|0)==0|(De|0)==4)){Dj=0;Dk=0;Dl=Co;break}}c[16282]=0;a[65272]=1;c[16454]=0;a[65960]=1;c[16626]=0;a[66648]=1;c[16798]=0;a[67336]=1;c[16970]=0;a[68024]=1;c[17142]=0;a[68712]=1;c[17314]=0;a[69400]=1;c[17486]=0;a[70088]=1;c[17658]=0;a[70776]=1;c[17830]=0;a[71464]=1;c[18002]=0;a[72152]=1;c[13898]=Ci+1;Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[Dj+179896|0]|0)==(a[gH+(Dj+Dl|0)|0]|0)){Dm=Dl;Dn=Dk}else{if((Dj|0)!=1){Do=0;Dp=0;Dq=Co;b7=4551;break}Dm=Dl-1|0;Dn=1}hR=Dj+1|0;if((hR|0)<(Dn+hB|0)){Dj=hR;Dk=Dn;Dl=Dm}else{b7=4549;break}}do{if((b7|0)==4549){b7=0;if((Dn|0)!=0){break}if(!((Dj|0)==0|(Dj|0)==6)){Do=0;Dp=0;Dq=Co;b7=4551}}}while(0);do{if((b7|0)==4551){while(1){b7=0;if((a[Do+149304|0]|0)==(a[gH+(Do+Dq|0)|0]|0)){Dr=Dq;Ds=Dp}else{if((Do|0)!=1){Dt=0;Du=0;Dv=Co;break}Dr=Dq-1|0;Ds=1}hR=Do+1|0;if((hR|0)<(Ds+hB|0)){Do=hR;Dp=Ds;Dq=Dr;b7=4551}else{b7=4555;break}}if((b7|0)==4555){b7=0;if((Ds|0)!=0){break}if((Do|0)==0|(Do|0)==6){break}else{Dt=0;Du=0;Dv=Co}}while(1){if((a[Dt+101272|0]|0)==(a[gH+(Dt+Dv|0)|0]|0)){Dw=Dv;Dx=Du}else{if((Dt|0)!=2){Dy=0;Dz=0;DA=Co;break}Dw=Dv-1|0;Dx=1}hp=Dt+1|0;if((hp|0)<(Dx+hB|0)){Dt=hp;Du=Dx;Dv=Dw}else{b7=4562;break}}do{if((b7|0)==4562){b7=0;if((Dx|0)==0){if(!((Dt|0)==1|(Dt|0)==5)){Dy=0;Dz=0;DA=Co;break}}c[16282]=2;a[65272]=1;c[16454]=2;a[65960]=1;c[16626]=2;a[66648]=1;c[16798]=2;a[67336]=1;c[16970]=2;a[68024]=1;c[17142]=2;a[68712]=1;c[17314]=2;a[69400]=1;c[17486]=2;a[70088]=1;c[17658]=2;a[70776]=1;c[17830]=2;a[71464]=1;c[18002]=2;a[72152]=1;c[13898]=Ci+1;Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[Dy+100712|0]|0)==(a[gH+(Dy+DA|0)|0]|0)){DB=DA;DC=Dz}else{if((Dy|0)!=5){DD=0;DE=0;DF=Co;break}DB=DA-1|0;DC=1}hp=Dy+1|0;if((hp|0)<(DC+hB|0)){Dy=hp;Dz=DC;DA=DB}else{b7=4569;break}}do{if((b7|0)==4569){b7=0;if((DC|0)==0){if(!((Dy|0)==4|(Dy|0)==11)){DD=0;DE=0;DF=Co;break}}a[65272]=0;a[65960]=0;a[66648]=0;a[67336]=0;a[68024]=0;a[68712]=0;a[69400]=0;a[70088]=0;a[70776]=0;a[71464]=0;a[72152]=0;c[13898]=Ci+1;Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[DD+152064|0]|0)==(a[gH+(DD+DF|0)|0]|0)){DG=DF;DH=DE}else{if((DD|0)!=3){DI=0;DJ=0;DK=Co;break}DG=DF-1|0;DH=1}hp=DD+1|0;if((hp|0)<(DH+hB|0)){DD=hp;DE=DH;DF=DG}else{b7=4576;break}}do{if((b7|0)==4576){b7=0;if((DH|0)==0){if(!((DD|0)==6|(DD|0)==2)){DI=0;DJ=0;DK=Co;break}}c[13898]=Ci+1;dl(F,4);c[16246]=c[fO>>2];c[64988>>2]=c[fO+4>>2];c[64992>>2]=c[fO+8>>2];c[64996>>2]=c[fO+12>>2];c[65e3>>2]=c[fO+16>>2];c[65004>>2]=c[fO+20>>2];c[65008>>2]=c[fO+24>>2];c[65012>>2]=c[fO+28>>2];c[65016>>2]=c[fO+32>>2];c[65020>>2]=c[fO+36>>2];c[16418]=c[fO>>2];c[65676>>2]=c[fO+4>>2];c[65680>>2]=c[fO+8>>2];c[65684>>2]=c[fO+12>>2];c[65688>>2]=c[fO+16>>2];c[65692>>2]=c[fO+20>>2];c[65696>>2]=c[fO+24>>2];c[65700>>2]=c[fO+28>>2];c[65704>>2]=c[fO+32>>2];c[65708>>2]=c[fO+36>>2];c[16590]=c[fO>>2];c[66364>>2]=c[fO+4>>2];c[66368>>2]=c[fO+8>>2];c[66372>>2]=c[fO+12>>2];c[66376>>2]=c[fO+16>>2];c[66380>>2]=c[fO+20>>2];c[66384>>2]=c[fO+24>>2];c[66388>>2]=c[fO+28>>2];c[66392>>2]=c[fO+32>>2];c[66396>>2]=c[fO+36>>2];c[16762]=c[fO>>2];c[67052>>2]=c[fO+4>>2];c[67056>>2]=c[fO+8>>2];c[67060>>2]=c[fO+12>>2];c[67064>>2]=c[fO+16>>2];c[67068>>2]=c[fO+20>>2];c[67072>>2]=c[fO+24>>2];c[67076>>2]=c[fO+28>>2];c[67080>>2]=c[fO+32>>2];c[67084>>2]=c[fO+36>>2];c[16934]=c[fO>>2];c[67740>>2]=c[fO+4>>2];c[67744>>2]=c[fO+8>>2];c[67748>>2]=c[fO+12>>2];c[67752>>2]=c[fO+16>>2];c[67756>>2]=c[fO+20>>2];c[67760>>2]=c[fO+24>>2];c[67764>>2]=c[fO+28>>2];c[67768>>2]=c[fO+32>>2];c[67772>>2]=c[fO+36>>2];c[17106]=c[fO>>2];c[68428>>2]=c[fO+4>>2];c[68432>>2]=c[fO+8>>2];c[68436>>2]=c[fO+12>>2];c[68440>>2]=c[fO+16>>2];c[68444>>2]=c[fO+20>>2];c[68448>>2]=c[fO+24>>2];c[68452>>2]=c[fO+28>>2];c[68456>>2]=c[fO+32>>2];c[68460>>2]=c[fO+36>>2];c[17278]=c[fO>>2];c[69116>>2]=c[fO+4>>2];c[69120>>2]=c[fO+8>>2];c[69124>>2]=c[fO+12>>2];c[69128>>2]=c[fO+16>>2];c[69132>>2]=c[fO+20>>2];c[69136>>2]=c[fO+24>>2];c[69140>>2]=c[fO+28>>2];c[69144>>2]=c[fO+32>>2];c[69148>>2]=c[fO+36>>2];c[17450]=c[fO>>2];c[69804>>2]=c[fO+4>>2];c[69808>>2]=c[fO+8>>2];c[69812>>2]=c[fO+12>>2];c[69816>>2]=c[fO+16>>2];c[69820>>2]=c[fO+20>>2];c[69824>>2]=c[fO+24>>2];c[69828>>2]=c[fO+28>>2];c[69832>>2]=c[fO+32>>2];c[69836>>2]=c[fO+36>>2];c[17622]=c[fO>>2];c[70492>>2]=c[fO+4>>2];c[70496>>2]=c[fO+8>>2];c[70500>>2]=c[fO+12>>2];c[70504>>2]=c[fO+16>>2];c[70508>>2]=c[fO+20>>2];c[70512>>2]=c[fO+24>>2];c[70516>>2]=c[fO+28>>2];c[70520>>2]=c[fO+32>>2];c[70524>>2]=c[fO+36>>2];c[17794]=c[fO>>2];c[71180>>2]=c[fO+4>>2];c[71184>>2]=c[fO+8>>2];c[71188>>2]=c[fO+12>>2];c[71192>>2]=c[fO+16>>2];c[71196>>2]=c[fO+20>>2];c[71200>>2]=c[fO+24>>2];c[71204>>2]=c[fO+28>>2];c[71208>>2]=c[fO+32>>2];c[71212>>2]=c[fO+36>>2];c[17966]=c[fO>>2];c[71868>>2]=c[fO+4>>2];c[71872>>2]=c[fO+8>>2];c[71876>>2]=c[fO+12>>2];c[71880>>2]=c[fO+16>>2];c[71884>>2]=c[fO+20>>2];c[71888>>2]=c[fO+24>>2];c[71892>>2]=c[fO+28>>2];c[71896>>2]=c[fO+32>>2];c[71900>>2]=c[fO+36>>2];Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[DI+153128|0]|0)==(a[gH+(DI+DK|0)|0]|0)){DL=DK;DM=DJ}else{if((DI|0)!=5){DN=0;break}DL=DK-1|0;DM=1}hp=DI+1|0;if((hp|0)<(DM+hB|0)){DI=hp;DJ=DM;DK=DL}else{b7=4583;break}}do{if((b7|0)==4583){b7=0;if((DM|0)==0){if(!((DI|0)==4|(DI|0)==8)){DN=0;break}}uE(dx|0,0,28);c[13898]=Ci+1;c[16246]=4;c[16247]=4;c[16248]=4;c[16249]=c[dx>>2];c[65e3>>2]=c[dx+4>>2];c[65004>>2]=c[dx+8>>2];c[65008>>2]=c[dx+12>>2];c[65012>>2]=c[dx+16>>2];c[65016>>2]=c[dx+20>>2];c[65020>>2]=c[dx+24>>2];c[16418]=4;c[16419]=4;c[16420]=4;c[65684>>2]=c[dx>>2];c[(65684|0)+4>>2]=c[dx+4>>2];c[(65684|0)+8>>2]=c[dx+8>>2];c[(65684|0)+12>>2]=c[dx+12>>2];c[(65684|0)+16>>2]=c[dx+16>>2];c[(65684|0)+20>>2]=c[dx+20>>2];c[(65684|0)+24>>2]=c[dx+24>>2];c[16590]=4;c[16591]=4;c[16592]=4;c[66372>>2]=c[dx>>2];c[(66372|0)+4>>2]=c[dx+4>>2];c[(66372|0)+8>>2]=c[dx+8>>2];c[(66372|0)+12>>2]=c[dx+12>>2];c[(66372|0)+16>>2]=c[dx+16>>2];c[(66372|0)+20>>2]=c[dx+20>>2];c[(66372|0)+24>>2]=c[dx+24>>2];c[16762]=4;c[16763]=4;c[16764]=4;c[67060>>2]=c[dx>>2];c[(67060|0)+4>>2]=c[dx+4>>2];c[(67060|0)+8>>2]=c[dx+8>>2];c[(67060|0)+12>>2]=c[dx+12>>2];c[(67060|0)+16>>2]=c[dx+16>>2];c[(67060|0)+20>>2]=c[dx+20>>2];c[(67060|0)+24>>2]=c[dx+24>>2];c[16934]=4;c[16935]=4;c[16936]=4;c[67748>>2]=c[dx>>2];c[(67748|0)+4>>2]=c[dx+4>>2];c[(67748|0)+8>>2]=c[dx+8>>2];c[(67748|0)+12>>2]=c[dx+12>>2];c[(67748|0)+16>>2]=c[dx+16>>2];c[(67748|0)+20>>2]=c[dx+20>>2];c[(67748|0)+24>>2]=c[dx+24>>2];c[17106]=4;c[17107]=4;c[17108]=4;c[68436>>2]=c[dx>>2];c[(68436|0)+4>>2]=c[dx+4>>2];c[(68436|0)+8>>2]=c[dx+8>>2];c[(68436|0)+12>>2]=c[dx+12>>2];c[(68436|0)+16>>2]=c[dx+16>>2];c[(68436|0)+20>>2]=c[dx+20>>2];c[(68436|0)+24>>2]=c[dx+24>>2];c[17278]=4;c[17279]=4;c[17280]=4;c[69124>>2]=c[dx>>2];c[(69124|0)+4>>2]=c[dx+4>>2];c[(69124|0)+8>>2]=c[dx+8>>2];c[(69124|0)+12>>2]=c[dx+12>>2];c[(69124|0)+16>>2]=c[dx+16>>2];c[(69124|0)+20>>2]=c[dx+20>>2];c[(69124|0)+24>>2]=c[dx+24>>2];c[17450]=4;c[17451]=4;c[17452]=4;c[69812>>2]=c[dx>>2];c[(69812|0)+4>>2]=c[dx+4>>2];c[(69812|0)+8>>2]=c[dx+8>>2];c[(69812|0)+12>>2]=c[dx+12>>2];c[(69812|0)+16>>2]=c[dx+16>>2];c[(69812|0)+20>>2]=c[dx+20>>2];c[(69812|0)+24>>2]=c[dx+24>>2];c[17622]=4;c[17623]=4;c[17624]=4;c[70500>>2]=c[dx>>2];c[(70500|0)+4>>2]=c[dx+4>>2];c[(70500|0)+8>>2]=c[dx+8>>2];c[(70500|0)+12>>2]=c[dx+12>>2];c[(70500|0)+16>>2]=c[dx+16>>2];c[(70500|0)+20>>2]=c[dx+20>>2];c[(70500|0)+24>>2]=c[dx+24>>2];c[17794]=4;c[17795]=4;c[17796]=4;c[71188>>2]=c[dx>>2];c[(71188|0)+4>>2]=c[dx+4>>2];c[(71188|0)+8>>2]=c[dx+8>>2];c[(71188|0)+12>>2]=c[dx+12>>2];c[(71188|0)+16>>2]=c[dx+16>>2];c[(71188|0)+20>>2]=c[dx+20>>2];c[(71188|0)+24>>2]=c[dx+24>>2];c[17966]=4;c[17967]=4;c[17968]=4;c[71876>>2]=c[dx>>2];c[(71876|0)+4>>2]=c[dx+4>>2];c[(71876|0)+8>>2]=c[dx+8>>2];c[(71876|0)+12>>2]=c[dx+12>>2];c[(71876|0)+16>>2]=c[dx+16>>2];c[(71876|0)+20>>2]=c[dx+20>>2];c[(71876|0)+24>>2]=c[dx+24>>2];Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[DN+97960|0]|0)!=(a[gH+(DN+Co|0)|0]|0)){DO=0;DP=0;DQ=Co;break}DR=DN+1|0;if((DR|0)<(hB|0)){DN=DR}else{b7=4588;break}}do{if((b7|0)==4588){b7=0;if((DR|0)!=6){DO=0;DP=0;DQ=Co;break}jp();Cx=Ch;Cy=Cg;break L5954}}while(0);while(1){if((a[DO+175984|0]|0)==(a[gH+(DO+DQ|0)|0]|0)){DS=DQ;DT=DP}else{if((DO|0)!=1){Cn=Co;b7=4620;break L5954}DS=DQ-1|0;DT=1}hp=DO+1|0;if((hp|0)<(DT+hB|0)){DO=hp;DP=DT;DQ=DS}else{break}}if((DT|0)==0){if(!((DO|0)==4|(DO|0)==0)){Cn=Co;b7=4620;break L5954}}DU=Ci+1|0;c[13898]=DU;hp=(a[Ck+(DU*40&-1)|0]&1)==0;if(hp){b7=4598}else{hR=a[gH+(c[Ck+(DU*40&-1)+32>>2]|0)|0]|0;if(!((hR<<24>>24|0)==39|(hR<<24>>24|0)==34)){b7=4598}}if((b7|0)==4598){b7=0;hR=c[10810]|0;if((hR|0)==0){b7=5299;break L27}hK=Ck+(DU*40&-1)+36|0;hS=Ck+(DU*40&-1)+32|0;gG=(Cj|0)<=(DU|0)|hp;gy=hR;L6211:while(1){hR=c[gy+4>>2]|0;L6213:do{if(!gG){ho=c[hK>>2]|0;ng=0;while(1){if((ng|0)>=(ho|0)){break}if((a[gH+((c[hS>>2]|0)+ng|0)|0]|0)==(a[hR+ng|0]|0)){ng=ng+1|0}else{break L6213}}if((a[hR+ng|0]|0)==0){break L6211}}}while(0);hR=c[gy>>2]|0;if((hR|0)==0){b7=5301;break L27}else{gy=hR}}if((a[gy+8|0]&1)!=0){b7=5300;break L27}if((c[gy+16>>2]|0)!=3){b7=5302;break L27}}L6223:do{if((DU|0)<(Cj|0)){L6225:do{if(!hp){hS=c[Ck+(DU*40&-1)+36>>2]|0;hK=Ck+(DU*40&-1)+32|0;gG=0;while(1){if((gG|0)>=(hS|0)){break}if((a[gH+((c[hK>>2]|0)+gG|0)|0]|0)==(a[gG+103664|0]|0)){gG=gG+1|0}else{break L6225}}if((gG|0)==1){DV=0;break L6223}}}while(0);a[14176]=1;is(E);a[14176]=0;if((c[fQ>>2]|0)==3){DV=c[fS>>2]|0;break}else{c[13898]=DU;DV=0;break}}else{DV=0}}while(0);uu(c[16231]|0);if((DV|0)==0){c[16231]=0;uu(c[16403]|0);c[16403]=0;uu(c[16575]|0);c[16575]=0;uu(c[16747]|0);c[16747]=0;uu(c[16919]|0);c[16919]=0;uu(c[17091]|0);c[17091]=0;uu(c[17263]|0);c[17263]=0;uu(c[17435]|0);c[17435]=0;uu(c[17607]|0);c[17607]=0;uu(c[17779]|0);c[17779]=0;uu(c[17951]|0);DW=0}else{c[16231]=bP(DV|0)|0;uu(c[16403]|0);c[16403]=bP(DV|0)|0;uu(c[16575]|0);c[16575]=bP(DV|0)|0;uu(c[16747]|0);c[16747]=bP(DV|0)|0;uu(c[16919]|0);c[16919]=bP(DV|0)|0;uu(c[17091]|0);c[17091]=bP(DV|0)|0;uu(c[17263]|0);c[17263]=bP(DV|0)|0;uu(c[17435]|0);c[17435]=bP(DV|0)|0;uu(c[17607]|0);c[17607]=bP(DV|0)|0;uu(c[17779]|0);c[17779]=bP(DV|0)|0;uu(c[17951]|0);DW=bP(DV|0)|0}c[17951]=DW;uu(DV);Cx=Ch;Cy=Cg;break L5954}}while(0);c[16282]=1;a[65272]=1;c[16454]=1;a[65960]=1;c[16626]=1;a[66648]=1;c[16798]=1;a[67336]=1;c[16970]=1;a[68024]=1;c[17142]=1;a[68712]=1;c[17314]=1;a[69400]=1;c[17486]=1;a[70088]=1;c[17658]=1;a[70776]=1;c[17830]=1;a[71464]=1;c[18002]=1;a[72152]=1;c[13898]=Ci+1;Cx=Ch;Cy=Cg}}while(0);L6241:do{if((b7|0)==4620){b7=0;hF=(Cj|0)>(Ci|0);L6243:do{if(hF){if(gF){b7=5303;break L27}gH=c[10036]|0;hp=0;while(1){if((hp|0)>=(hB|0)){break}if((a[gH+(hp+Cn|0)|0]|0)==(a[hp+143040|0]|0)){hp=hp+1|0}else{b7=4626;break L6243}}if((hp|0)!=2){b7=4626}}else{b7=4626}}while(0);L6250:do{if((b7|0)==4626){b7=0;L6252:do{if((hB|0)>0&(gF^1)){gH=c[10036]|0;gy=0;hK=0;hS=Cn;while(1){if((a[gy+142856|0]|0)==(a[gH+(gy+hS|0)|0]|0)){DX=hS;DY=hK}else{if((gy|0)!=4){break L6252}DX=hS-1|0;DY=1}ng=gy+1|0;if((ng|0)<(DY+hB|0)){gy=ng;hK=DY;hS=DX}else{break}}if((DY|0)!=0){break L6250}if((gy|0)==3|(gy|0)==9){break L6250}}}while(0);if(!hF){Cx=Ch;Cy=Cg;break L6241}if(gF){b7=5304;break L27}hp=c[10036]|0;hS=0;while(1){if((hS|0)>=(hB|0)){b7=4640;break}if((a[hp+(hS+Cn|0)|0]|0)==(a[hS+150856|0]|0)){hS=hS+1|0}else{DZ=0;break}}do{if((b7|0)==4640){b7=0;if((hS|0)!=5){DZ=0;break}c[10026]=1;c[13898]=Ci+1;Cx=Ch;Cy=Cg;break L6241}}while(0);while(1){if((DZ|0)>=(hB|0)){b7=4644;break}if((a[hp+(DZ+Cn|0)|0]|0)==(a[DZ+150704|0]|0)){DZ=DZ+1|0}else{D_=0;break}}do{if((b7|0)==4644){b7=0;if((DZ|0)!=4){D_=0;break}c[10026]=0;c[13898]=Ci+1;Cx=Ch;Cy=Cg;break L6241}}while(0);while(1){if((D_|0)>=(hB|0)){break}if((a[hp+(D_+Cn|0)|0]|0)==(a[D_+103664|0]|0)){D_=D_+1|0}else{b7=5305;break L27}}if((D_|0)==1){Cx=Ch;Cy=Cg;break L6241}else{b7=5306;break L27}}}while(0);hI(G,5);c[16232]=c[fP>>2];c[64932>>2]=c[fP+4>>2];c[64936>>2]=c[fP+8>>2];c[64940>>2]=c[fP+12>>2];c[16404]=c[fP>>2];c[65620>>2]=c[fP+4>>2];c[65624>>2]=c[fP+8>>2];c[65628>>2]=c[fP+12>>2];c[16576]=c[fP>>2];c[66308>>2]=c[fP+4>>2];c[66312>>2]=c[fP+8>>2];c[66316>>2]=c[fP+12>>2];c[16748]=c[fP>>2];c[66996>>2]=c[fP+4>>2];c[67e3>>2]=c[fP+8>>2];c[67004>>2]=c[fP+12>>2];c[16920]=c[fP>>2];c[67684>>2]=c[fP+4>>2];c[67688>>2]=c[fP+8>>2];c[67692>>2]=c[fP+12>>2];c[17092]=c[fP>>2];c[68372>>2]=c[fP+4>>2];c[68376>>2]=c[fP+8>>2];c[68380>>2]=c[fP+12>>2];c[17264]=c[fP>>2];c[69060>>2]=c[fP+4>>2];c[69064>>2]=c[fP+8>>2];c[69068>>2]=c[fP+12>>2];c[17436]=c[fP>>2];c[69748>>2]=c[fP+4>>2];c[69752>>2]=c[fP+8>>2];c[69756>>2]=c[fP+12>>2];c[17608]=c[fP>>2];c[70436>>2]=c[fP+4>>2];c[70440>>2]=c[fP+8>>2];c[70444>>2]=c[fP+12>>2];c[17780]=c[fP>>2];c[71124>>2]=c[fP+4>>2];c[71128>>2]=c[fP+8>>2];c[71132>>2]=c[fP+12>>2];c[17952]=c[fP>>2];c[71812>>2]=c[fP+4>>2];c[71816>>2]=c[fP+8>>2];c[71820>>2]=c[fP+12>>2];Cx=Ch;Cy=Cg}}while(0);hB=c[13898]|0;gF=c[8272]|0;if((hB|0)>=(gF|0)){Cl=Cy;Cm=Cx;break L5951}Cg=Cy;Ch=Cx;Ci=hB;Cj=gF;Ck=c[1054]|0;b7=4421}}}while(0);hG=0;do{gC=64916+(hG*688&-1)|0;do{if(!((c[gC>>2]&3|0)!=0|Cm)){if((hG-5|0)>>>0<2){break}c[gC>>2]=1;if(Cl){break}if((hG-1|0)>>>0>=3){break}c[gC>>2]=5}}while(0);hG=hG+1|0;}while(hG>>>0<11)}else if((gD|0)==90){uh(gv,225144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);hG=(c[13898]|0)+1|0;c[13898]=hG;L6294:do{if((hG|0)<(c[8272]|0)){gC=c[1054]|0;L6296:do{if((a[gC+(hG*40&-1)|0]&1)!=0){nd=c[gC+(hG*40&-1)+36>>2]|0;nh=gC+(hG*40&-1)+32|0;gF=c[10036]|0;hB=0;while(1){if((hB|0)>=(nd|0)){break}if((a[gF+((c[nh>>2]|0)+hB|0)|0]|0)==(a[hB+103664|0]|0)){hB=hB+1|0}else{break L6296}}if((hB|0)==1){D$=.5;D0=1.0;break L6294}}}while(0);gC=is(z)|0;nh=c[gC>>2]|0;if((nh|0)==1){D1=+(c[gC+8>>2]|0)}else if((nh|0)==2){D1=+h[gC+8>>3]}else if((nh|0)==3){D1=+uz(c[gC+8>>2]|0,0)}else{b7=4668;break L27}if((c[fZ>>2]|0)==3){uu(c[f_>>2]|0);c[fZ>>2]=1}gC=c[13898]|0;L6311:do{if((gC|0)<(c[8272]|0)){nh=c[1054]|0;L6313:do{if((a[nh+(gC*40&-1)|0]&1)!=0){gF=c[nh+(gC*40&-1)+36>>2]|0;nd=nh+(gC*40&-1)+32|0;hF=c[10036]|0;hp=0;while(1){if((hp|0)>=(gF|0)){b7=4676;break}if((a[hF+((c[nd>>2]|0)+hp|0)|0]|0)==(a[hp+103664|0]|0)){hp=hp+1|0}else{D2=0;break}}if((b7|0)==4676){b7=0;if((hp|0)==1){break L6311}else{D2=0}}while(1){if((D2|0)>=(gF|0)){break}if((a[hF+((c[nd>>2]|0)+D2|0)|0]|0)==(a[D2+148464|0]|0)){D2=D2+1|0}else{break L6313}}if((D2|0)!=1){break}c[13898]=gC+1}}while(0);nh=is(A)|0;hB=c[nh>>2]|0;if((hB|0)==1){D3=+(c[nh+8>>2]|0)}else if((hB|0)==2){D3=+h[nh+8>>3]}else if((hB|0)==3){D3=+uz(c[nh+8>>2]|0,0)}else{b7=4686;break L27}if((c[f$>>2]|0)!=3){D$=D3;D0=D1;break L6294}uu(c[f0>>2]|0);c[f$>>2]=1;D$=D3;D0=D1;break L6294}}while(0);D$=D1*.5;D0=D1}else{D$=.5;D0=1.0}}while(0);h[8132]=D0;h[8133]=D$;h[8218]=D0;h[8219]=D$;h[8304]=D0;h[8305]=D$;h[8390]=D0;h[8391]=D$;h[8476]=D0;h[8477]=D$;h[8562]=D0;h[8563]=D$;h[8648]=D0;h[8649]=D$;h[8734]=D0;h[8735]=D$;h[8820]=D0;h[8821]=D$;h[8906]=D0;h[8907]=D$;h[8992]=D0;h[8993]=D$}else if((gD|0)==92){D4=gv+1|0;c[13898]=D4;hG=c[8272]|0;L6335:do{if((D4|0)<(hG|0)){gC=(a[gw+(D4*40&-1)|0]&1)==0;nh=c[gw+(D4*40&-1)+36>>2]|0;hB=gw+(D4*40&-1)+32|0;L6337:do{if(!gC){nd=0;while(1){if((nd|0)>=(nh|0)){break}if((a[gB+((c[hB>>2]|0)+nd|0)|0]|0)==(a[nd+103664|0]|0)){nd=nd+1|0}else{break L6337}}if((nd|0)==1){break L6335}}}while(0);hF=c[hB>>2]|0;gF=(nh|0)>0;hp=56720;hS=77416;L6343:while(1){L6345:do{if(!gC){if(gF){hK=0;gH=0;ng=hF;while(1){hR=a[hS+hK|0]|0;if(hR<<24>>24==(a[gB+(hK+ng|0)|0]|0)){D5=ng;D6=gH}else{if(hR<<24>>24!=36){break L6345}D5=ng-1|0;D6=1}D7=hK+1|0;if((D7|0)<(D6+nh|0)){hK=D7;gH=D6;ng=D5}else{break}}if((D6|0)==0){D8=D7}else{D9=hp;break L6343}}else{D8=0}ng=a[hS+D8|0]|0;if((ng<<24>>24|0)==36|(ng<<24>>24|0)==0){D9=hp;break L6343}}}while(0);nd=hp+8|0;ng=c[nd>>2]|0;if((ng|0)==0){D9=nd;break}else{hp=nd;hS=ng}}hS=c[D9+4>>2]|0;if((hS|0)>-1){Ea=gv+2|0;c[13898]=Ea;if((Ea|0)>=(hG|0)){b7=4725;break L27}L6361:do{if((a[gw+(Ea*40&-1)|0]&1)!=0){hp=c[gw+(Ea*40&-1)+36>>2]|0;gF=gw+(Ea*40&-1)+32|0;hB=0;while(1){if((hB|0)>=(hp|0)){break}if((a[gB+((c[gF>>2]|0)+hB|0)|0]|0)==(a[hB+103664|0]|0)){hB=hB+1|0}else{break L6361}}if((hB|0)==1){b7=4725;break L27}}}while(0);a[14176]=1;is(y);a[14176]=0;if((c[f1>>2]|0)!=3){b7=4714;break L27}gF=c[f2>>2]|0;if((gF|0)==0){b7=4725;break L27}hp=64813+(hS*688&-1)|0;uF(hp|0,gF|0,50);Eb=gF}else{L6371:do{if(!gC){gF=0;while(1){if((gF|0)>=(nh|0)){break}if((a[gB+(gF+hF|0)|0]|0)==(a[gF+103664|0]|0)){gF=gF+1|0}else{break L6371}}if((gF|0)==1){b7=4725;break L27}}}while(0);a[14176]=1;is(x);a[14176]=0;if((c[f3>>2]|0)!=3){b7=4722;break L27}hF=c[f4>>2]|0;if((hF|0)==0){b7=4725;break L27}uF(64813,hF|0,50);uF(65501,hF|0,50);uF(66189,hF|0,50);uF(66877,hF|0,50);uF(67565,hF|0,50);uF(68253,hF|0,50);uF(68941,hF|0,50);uF(69629,hF|0,50);uF(70317,hF|0,50);uF(71005,hF|0,50);uF(71693,hF|0,50);Eb=hF}uu(Eb);break L44}}while(0);uD(64813,82192,15);uD(65501,82192,15);uD(66189,82192,15);uD(66877,82192,15);uD(67565,82192,15);uD(68253,82192,15);uD(68941,82192,15);uD(69629,82192,15);uD(70317,82192,15);uD(71005,82192,15);uD(71693,82192,15)}else if((gD|0)==93){hG=gv+1|0;c[13898]=hG;hF=c[8272]|0;L6382:do{if((hG|0)<(hF|0)){nh=0;gC=hG;hS=hF;while(1){Ec=gC;hB=hS;L6385:while(1){hp=c[1054]|0;Ed=c[hp+(Ec*40&-1)+36>>2]|0;Ee=hp+(Ec*40&-1)+32|0;if((a[hp+(Ec*40&-1)|0]&1)==0){b7=4773;break}ng=c[10036]|0;nd=0;while(1){if((nd|0)>=(Ed|0)){b7=4734;break}gH=c[Ee>>2]|0;if((a[ng+(gH+nd|0)|0]|0)==(a[nd+103664|0]|0)){nd=nd+1|0}else{Ef=gH;break}}if((b7|0)==4734){b7=0;if((nd|0)==1){break L6382}Ef=c[Ee>>2]|0}L6395:do{if((Ed|0)>0){gH=0;hK=0;hR=Ef;while(1){if((a[gH+150048|0]|0)==(a[ng+(gH+hR|0)|0]|0)){Eg=hR;Eh=hK}else{if((gH|0)!=1){Ei=0;Ej=0;Ek=Ef;break}Eg=hR-1|0;Eh=1}gz=gH+1|0;if((gz|0)<(Eh+Ed|0)){gH=gz;hK=Eh;hR=Eg}else{b7=4741;break}}do{if((b7|0)==4741){b7=0;if((Eh|0)==0){if(!((gH|0)==0|(gH|0)==3)){Ei=0;Ej=0;Ek=Ef;break}}c[1166]=0;c[13898]=Ec+1;break L6395}}while(0);while(1){if((a[Ei+149848|0]|0)==(a[ng+(Ei+Ek|0)|0]|0)){El=Ek;Em=Ej}else{if((Ei|0)!=1){En=0;Eo=0;Ep=Ef;break}El=Ek-1|0;Em=1}gH=Ei+1|0;if((gH|0)<(Em+Ed|0)){Ei=gH;Ej=Em;Ek=El}else{b7=4749;break}}do{if((b7|0)==4749){b7=0;if((Em|0)==0){if(!((Ei|0)==0|(Ei|0)==6)){En=0;Eo=0;Ep=Ef;break}}c[1166]=1;c[13898]=Ec+1;break L6395}}while(0);while(1){if((a[En+95544|0]|0)==(a[ng+(En+Ep|0)|0]|0)){Eq=Ep;Er=Eo}else{if((En|0)!=1){Es=0;Et=0;Eu=Ef;break}Eq=Ep-1|0;Er=1}gH=En+1|0;if((gH|0)<(Er+Ed|0)){En=gH;Eo=Er;Ep=Eq}else{b7=4756;break}}do{if((b7|0)==4756){b7=0;if((Er|0)==0){if(!((En|0)==0|(En|0)==6)){Es=0;Et=0;Eu=Ef;break}}c[1164]=1;c[13898]=Ec+1;break L6395}}while(0);while(1){if((a[Es+184048|0]|0)==(a[ng+(Es+Eu|0)|0]|0)){Ev=Eu;Ew=Et}else{if((Es|0)!=1){Ex=0;Ey=0;Ez=Ef;break}Ev=Eu-1|0;Ew=1}gH=Es+1|0;if((gH|0)<(Ew+Ed|0)){Es=gH;Et=Ew;Eu=Ev}else{b7=4763;break}}do{if((b7|0)==4763){b7=0;if((Ew|0)==0){if(!((Es|0)==0|(Es|0)==8)){Ex=0;Ey=0;Ez=Ef;break}}c[1164]=0;c[13898]=Ec+1;break L6395}}while(0);while(1){if((a[Ex+152064|0]|0)==(a[ng+(Ex+Ez|0)|0]|0)){EA=Ez;EB=Ey}else{if((Ex|0)!=3){b7=4774;break L6395}EA=Ez-1|0;EB=1}gH=Ex+1|0;if((gH|0)<(EB+Ed|0)){Ex=gH;Ey=EB;Ez=EA}else{break}}if((EB|0)==0){if(!((Ex|0)==6|(Ex|0)==2)){b7=4774;break}}c[13898]=Ec+1;dl(4816,4)}else{b7=4774}}while(0);if((b7|0)==4774){b7=0;nd=(hB|0)>(Ec|0);if(nd){EC=0}else{ED=Ef;EE=0;EF=0;break}while(1){if((EC|0)>=(Ed|0)){break}if((a[ng+(EC+Ef|0)|0]|0)==(a[EC+124352|0]|0)){EC=EC+1|0}else{ED=Ef;EE=nd;EF=0;break L6385}}if((EC|0)!=4){ED=Ef;EE=nd;EF=0;break}gH=Ec+1|0;c[13898]=gH;L6457:do{if((gH|0)<(hB|0)){L6459:do{if((a[hp+(gH*40&-1)|0]&1)!=0){hR=c[hp+(gH*40&-1)+36>>2]|0;hK=hp+(gH*40&-1)+32|0;gz=0;while(1){if((gz|0)>=(hR|0)){break}if((a[ng+((c[hK>>2]|0)+gz|0)|0]|0)==(a[gz+103664|0]|0)){gz=gz+1|0}else{break L6459}}if((gz|0)==1){EG=0;break L6457}}}while(0);a[14176]=1;is(t);a[14176]=0;if((c[f5>>2]|0)==3){EG=c[f6>>2]|0;break}else{c[13898]=gH;EG=0;break}}else{EG=0}}while(0);uu(c[1184]|0);c[1184]=EG}gH=c[13898]|0;ng=c[8272]|0;if((gH|0)<(ng|0)){Ec=gH;hB=ng}else{break L6382}}if((b7|0)==4773){b7=0;ED=c[Ee>>2]|0;EE=(hB|0)>(Ec|0);EF=1}if(nh){EH=Ec;b7=5310;break L27}if(!EE){EH=Ec;b7=5311;break L27}L6476:do{if(!EF){gF=c[10036]|0;ng=0;while(1){if((ng|0)>=(Ed|0)){break}if((a[gF+(ng+ED|0)|0]|0)==(a[ng+103664|0]|0)){ng=ng+1|0}else{break L6476}}if((ng|0)==1){EH=Ec;b7=5312;break L27}}}while(0);a[14176]=1;is(u);a[14176]=0;if((c[f7>>2]|0)!=3){b7=4796;break L27}hB=c[f8>>2]|0;if((hB|0)==0){b7=4798;break L27}uu(c[1183]|0);c[1183]=hB;hB=c[13898]|0;gF=c[8272]|0;if((hB|0)<(gF|0)){nh=1;gC=hB;hS=gF}else{break L44}}}}while(0);if((c[1183]|0)!=0){break}c[1183]=bP(74304)|0}else if((gD|0)==94){jq(4416)}else if((gD|0)==99){hF=gv+1|0;c[13898]=hF;hG=c[8272]|0;hS=(hG|0)>(hF|0);L6489:do{if(hS){if((a[gw+(hF*40&-1)|0]&1)==0){break}gC=c[gw+(hF*40&-1)+36>>2]|0;nh=gw+(hF*40&-1)+32|0;gF=0;while(1){if((gF|0)>=(gC|0)){break}if((a[gB+((c[nh>>2]|0)+gF|0)|0]|0)==(a[gF+134552|0]|0)){gF=gF+1|0}else{break L6489}}if((gF|0)!=3){break}c[5094]=1;c[13898]=gv+2;break L44}}while(0);if((c[5094]|0)==1){if(a[20368]|0){a[20368]=0;g[3538]=+g[5090];g[3536]=+g[5088];g[3534]=+g[5086];c[16336]=c[16336]^2;c[17024]=c[17024]^2}c[5094]=0}nh=c[gw+(hF*40&-1)+36>>2]|0;gC=c[gw+(hF*40&-1)+32>>2]|0;L6504:do{if((nh|0)>0&(a[gw+(hF*40&-1)|0]&1)!=0){hB=0;gH=0;hp=gC;while(1){if((a[hB+82576|0]|0)==(a[gB+(hB+hp|0)|0]|0)){EI=hp;EJ=gH}else{if((hB|0)!=5){EK=0;EL=0;EM=gC;break}EI=hp-1|0;EJ=1}nd=hB+1|0;if((nd|0)<(EJ+nh|0)){hB=nd;gH=EJ;hp=EI}else{b7=4820;break}}do{if((b7|0)==4820){b7=0;if((EJ|0)==0){if(!((hB|0)==10|(hB|0)==4)){EK=0;EL=0;EM=gC;break}}hp=gv+2|0;c[13898]=hp;do{if((hp|0)<(hG|0)){if((a[gw+(hp*40&-1)|0]&1)==0){break L44}gH=c[gw+(hp*40&-1)+36>>2]|0;gF=gw+(hp*40&-1)+32|0;nd=0;while(1){if((nd|0)>=(gH|0)){b7=4827;break}if((a[gB+((c[gF>>2]|0)+nd|0)|0]|0)==(a[nd+103664|0]|0)){nd=nd+1|0}else{EN=0;break}}if((b7|0)==4827){b7=0;if((nd|0)==1){break}else{EN=0}}while(1){if((EN|0)>=(gH|0)){b7=4830;break}if((a[gB+((c[gF>>2]|0)+EN|0)|0]|0)==(a[EN+150688|0]|0)){EN=EN+1|0}else{EO=0;break}}if((b7|0)==4830){b7=0;if((EN|0)==2){break}else{EO=0}}while(1){if((EO|0)>=(gH|0)){break}if((a[gB+((c[gF>>2]|0)+EO|0)|0]|0)==(a[EO+79688|0]|0)){EO=EO+1|0}else{break L44}}if((EO|0)!=3){break L44}c[18072]=3;c[13898]=gv+3;break L44}}while(0);c[18072]=2;c[13898]=gv+3;break L44}}while(0);while(1){if((a[EK+78952|0]|0)==(a[gB+(EK+EM|0)|0]|0)){EP=EM;EQ=EL}else{if((EK|0)!=7){break L6504}EP=EM-1|0;EQ=1}hB=EK+1|0;if((hB|0)<(EQ+nh|0)){EK=hB;EL=EQ;EM=EP}else{break}}if((EQ|0)==0){if(!((EK|0)==6|(EK|0)==12)){break}}c[18072]=0;c[13898]=gv+2;break L44}}while(0);h[eW>>3]=+g[3538];h[eX>>3]=+g[3536];h[eY>>3]=+g[3534];h[eZ>>3]=+g[3532];L6546:do{if(hS){ER=hF;nh=1;hG=0;gC=gw;while(1){L6549:do{if((a[gC+(ER*40&-1)|0]&1)==0){b7=4853}else{hB=c[gC+(ER*40&-1)+36>>2]|0;hp=gC+(ER*40&-1)+32|0;gF=c[10036]|0;gH=0;while(1){if((gH|0)>=(hB|0)){b7=4848;break}if((a[gF+((c[hp>>2]|0)+gH|0)|0]|0)==(a[gH+103664|0]|0)){gH=gH+1|0}else{ES=0;break}}if((b7|0)==4848){b7=0;if((gH|0)==1){break L6546}else{ES=0}}while(1){if((ES|0)>=(hB|0)){break}if((a[gF+((c[hp>>2]|0)+ES|0)|0]|0)==(a[ES+148464|0]|0)){ES=ES+1|0}else{b7=4853;break L6549}}if((ES|0)!=1){b7=4853;break}c[13898]=ER+1;ET=1;EU=(nh&1)+hG|0}}while(0);if((b7|0)==4853){b7=0;if(!nh){b7=4854;break L27}hp=is(s)|0;gF=c[hp>>2]|0;if((gF|0)==1){EV=+(c[hp+8>>2]|0)}else if((gF|0)==2){EV=+h[hp+8>>3]}else if((gF|0)==3){EV=+uz(c[hp+8>>2]|0,0)}else{b7=4859;break L27}if((c[f9>>2]|0)==3){uu(c[ga>>2]|0);c[f9>>2]=1}h[ak+(hG<<3)>>3]=EV;ET=0;EU=hG+1|0}if((EU|0)>=4){break L6546}hp=c[13898]|0;if((hp|0)>=(c[8272]|0)){break L6546}ER=hp;nh=ET;hG=EU;gC=c[1054]|0}}}while(0);m3=+h[eW>>3];if(m3<0.0|m3>360.0){b7=4867;break L27}m2=+h[eX>>3];if(m2<0.0|m2>360.0){b7=4869;break L27}m5=+h[eY>>3];if(m5<1.0e-6){b7=4871;break L27}m4=+h[eZ>>3];if(m4<1.0e-6){b7=4873;break L27}g[3538]=m3;g[3536]=m2;m2=m5;g[3534]=m2;g[3532]=m4;g[3540]=+_(+m2)}else if((gD|0)==151){c[13898]=gv+1;hF=is(r)|0;hS=c[hF>>2]|0;do{if((hS|0)==1){gC=c[hF+8>>2]|0;EW=+(((gC|0)>-1?gC:-gC|0)|0)}else if((hS|0)==2){m2=+P(+(+h[hF+8>>3]));m4=+h[hF+16>>3];m5=+P(+m4);if(m4==0.0){EW=m2;break}if(m2>m5){m4=m5/m2;EW=m2*+Q(+(m4*m4+1.0));break}else{m4=m2/m5;EW=m5*+Q(+(m4*m4+1.0));break}}else{b7=4881;break L27}}while(0);h[11]=EW}else if((gD|0)==48|(gD|0)==49|(gD|0)==117|(gD|0)==118|(gD|0)==111|(gD|0)==112|(gD|0)==114|(gD|0)==115){jt(2)}else if((gD|0)==52|(gD|0)==53|(gD|0)==136|(gD|0)==137|(gD|0)==130|(gD|0)==131|(gD|0)==133|(gD|0)==134){jt(1)}else if((gD|0)==46|(gD|0)==47|(gD|0)==108|(gD|0)==109|(gD|0)==102|(gD|0)==103|(gD|0)==105|(gD|0)==106){jt(6)}else if((gD|0)==50|(gD|0)==51|(gD|0)==127|(gD|0)==128|(gD|0)==121|(gD|0)==122|(gD|0)==124|(gD|0)==125){jt(5)}else if((gD|0)==54|(gD|0)==55|(gD|0)==145|(gD|0)==146|(gD|0)==139|(gD|0)==140|(gD|0)==142|(gD|0)==143){jt(0)}else if((gD|0)==68|(gD|0)==69|(gD|0)==66|(gD|0)==67|(gD|0)==71|(gD|0)==72|(gD|0)==73|(gD|0)==74){jt(3)}else if((gD|0)==147|(gD|0)==148){jt(7)}else if((gD|0)==110){hF=gv+1|0;c[13898]=hF;c[16546]=0;hS=c[gw+(hF*40&-1)+36>>2]|0;L6597:do{if((a[gw+(hF*40&-1)|0]&1)!=0&(hS|0)>0){gC=0;hG=0;nh=c[gw+(hF*40&-1)+32>>2]|0;while(1){if((a[gC+84264|0]|0)==(a[gB+(gC+nh|0)|0]|0)){EX=nh;EY=hG}else{if((gC|0)!=1){EZ=0;break L6597}EX=nh-1|0;EY=1}hp=gC+1|0;if((hp|0)<(EY+hS|0)){gC=hp;hG=EY;nh=EX}else{break}}if((EY|0)==0){if(!((gC|0)==0|(gC|0)==4)){EZ=0;break}}c[16546]=1;c[13898]=gv+2;EZ=1}else{EZ=0}}while(0);c[17750]=EZ;c[17578]=EZ}else if((gD|0)==129){hS=gv+1|0;c[13898]=hS;c[16374]=0;hF=c[gw+(hS*40&-1)+36>>2]|0;L6611:do{if((a[gw+(hS*40&-1)|0]&1)!=0&(hF|0)>0){nh=0;hG=0;hp=c[gw+(hS*40&-1)+32>>2]|0;while(1){if((a[nh+84264|0]|0)==(a[gB+(nh+hp|0)|0]|0)){E_=hp;E$=hG}else{if((nh|0)!=1){break L6611}E_=hp-1|0;E$=1}gF=nh+1|0;if((gF|0)<(E$+hF|0)){nh=gF;hG=E$;hp=E_}else{break}}if((E$|0)==0){if(!((nh|0)==0|(nh|0)==4)){break}}c[16374]=1;c[13898]=gv+2}}while(0);c[17922]=c[16546]}else if((gD|0)==138){hF=gv+1|0;c[13898]=hF;c[16202]=0;hS=c[gw+(hF*40&-1)+36>>2]|0;if(!((a[gw+(hF*40&-1)|0]&1)!=0&(hS|0)>0)){break}hp=0;hG=0;gC=c[gw+(hF*40&-1)+32>>2]|0;while(1){if((a[hp+84264|0]|0)==(a[gB+(hp+gC|0)|0]|0)){E0=gC;E1=hG}else{if((hp|0)!=1){break L44}E0=gC-1|0;E1=1}hF=hp+1|0;if((hF|0)<(E1+hS|0)){hp=hF;hG=E1;gC=E0}else{break}}if((E1|0)==0){if(!((hp|0)==0|(hp|0)==4)){break}}c[16202]=1;c[13898]=gv+2}else if((gD|0)==70){gC=gv+1|0;c[13898]=gC;c[16718]=0;hG=c[gw+(gC*40&-1)+36>>2]|0;if(!((a[gw+(gC*40&-1)|0]&1)!=0&(hG|0)>0)){break}hS=0;hF=0;gF=c[gw+(gC*40&-1)+32>>2]|0;while(1){if((a[hS+84264|0]|0)==(a[gB+(hS+gF|0)|0]|0)){E2=gF;E3=hF}else{if((hS|0)!=1){break L44}E2=gF-1|0;E3=1}gC=hS+1|0;if((gC|0)<(E3+hG|0)){hS=gC;hF=E3;gF=E2}else{break}}if((E3|0)==0){if(!((hS|0)==0|(hS|0)==4)){break}}c[16718]=1;c[13898]=gv+2}else if((gD|0)==101){gF=gv+1|0;c[13898]=gF;c[17234]=0;hF=c[gw+(gF*40&-1)+36>>2]|0;if(!((a[gw+(gF*40&-1)|0]&1)!=0&(hF|0)>0)){break}hG=0;hp=0;gC=c[gw+(gF*40&-1)+32>>2]|0;while(1){if((a[hG+84264|0]|0)==(a[gB+(hG+gC|0)|0]|0)){E4=gC;E5=hp}else{if((hG|0)!=1){break L44}E4=gC-1|0;E5=1}gF=hG+1|0;if((gF|0)<(E5+hF|0)){hG=gF;hp=E5;gC=E4}else{break}}if((E5|0)==0){if(!((hG|0)==0|(hG|0)==4)){break}}c[17234]=1;c[13898]=gv+2}else if((gD|0)==120){gC=gv+1|0;c[13898]=gC;c[17062]=0;hp=c[gw+(gC*40&-1)+36>>2]|0;if(!((a[gw+(gC*40&-1)|0]&1)!=0&(hp|0)>0)){break}hF=0;hS=0;gF=c[gw+(gC*40&-1)+32>>2]|0;while(1){if((a[hF+84264|0]|0)==(a[gB+(hF+gF|0)|0]|0)){E6=gF;E7=hS}else{if((hF|0)!=1){break L44}E6=gF-1|0;E7=1}gC=hF+1|0;if((gC|0)<(E7+hp|0)){hF=gC;hS=E7;gF=E6}else{break}}if((E7|0)==0){if(!((hF|0)==0|(hF|0)==4)){break}}c[17062]=1;c[13898]=gv+2}else if((gD|0)==113){jq(66456)}else if((gD|0)==132){jq(65768)}else if((gD|0)==141){jq(65080)}else if((gD|0)==64){jq(67144)}else if((gD|0)==104){jq(69208)}else if((gD|0)==123){jq(68520)}else if((gD|0)==116){jv(2)}else if((gD|0)==107){jv(6)}else if((gD|0)==135){jv(1)}else if((gD|0)==126){jv(5)}else if((gD|0)==144){jv(0)}else if((gD|0)==65){jv(3)}else if((gD|0)==149){jv(7);if((a[30528]&1)==0){break}ju()}else if((gD|0)==95){jv(8)}else if((gD|0)==96){jv(9)}else if((gD|0)==100){jv(10)}else if((gD|0)==150){a[27776]=1;c[13898]=gv+1}else if((gD|0)==153){gF=gv+1|0;c[13898]=gF;L6691:do{if((gF|0)<(c[8272]|0)){L6693:do{if((a[gw+(gF*40&-1)|0]&1)!=0){hS=c[gw+(gF*40&-1)+36>>2]|0;hp=gw+(gF*40&-1)+32|0;hG=0;while(1){if((hG|0)>=(hS|0)){break}if((a[gB+((c[hp>>2]|0)+hG|0)|0]|0)==(a[hG+103664|0]|0)){hG=hG+1|0}else{break L6693}}if((hG|0)==1){break L6691}}}while(0);c[16665]=-1;hH(66656,1,0);if((gF|0)!=(c[13898]|0)){break L44}nh=is(q)|0;hp=c[nh>>2]|0;if((hp|0)==1){E8=+(c[nh+8>>2]|0)}else if((hp|0)==2){E8=+h[nh+8>>3]}else if((hp|0)==3){E8=+uz(c[nh+8>>2]|0,0)}else{b7=4976;break L27}if((c[gb>>2]|0)==3){uu(c[gc>>2]|0);c[gb>>2]=1}c[16665]=~~E8-1;break L44}}while(0);c[16665]=-1}else if((gD|0)==155){gF=gv+1|0;c[13898]=gF;L6711:do{if((gF|0)<(c[8272]|0)){L6713:do{if((a[gw+(gF*40&-1)|0]&1)!=0){hF=c[gw+(gF*40&-1)+36>>2]|0;nh=gw+(gF*40&-1)+32|0;hp=0;while(1){if((hp|0)>=(hF|0)){break}if((a[gB+((c[nh>>2]|0)+hp|0)|0]|0)==(a[hp+103664|0]|0)){hp=hp+1|0}else{break L6713}}if((hp|0)==1){break L6711}}}while(0);c[16493]=-1;hH(65968,1,0);if((gF|0)!=(c[13898]|0)){break L44}nh=is(p)|0;hF=c[nh>>2]|0;if((hF|0)==1){E9=+(c[nh+8>>2]|0)}else if((hF|0)==2){E9=+h[nh+8>>3]}else if((hF|0)==3){E9=+uz(c[nh+8>>2]|0,0)}else{b7=4992;break L27}if((c[gd>>2]|0)==3){uu(c[ge>>2]|0);c[gd>>2]=1}c[16493]=~~E9-1;break L44}}while(0);c[16493]=-1}else if((gD|0)==157){gF=gv+1|0;c[13898]=gF;L6731:do{if((gF|0)<(c[8272]|0)){L6733:do{if((a[gw+(gF*40&-1)|0]&1)!=0){nh=c[gw+(gF*40&-1)+36>>2]|0;hF=gw+(gF*40&-1)+32|0;hG=0;while(1){if((hG|0)>=(nh|0)){break}if((a[gB+((c[hF>>2]|0)+hG|0)|0]|0)==(a[hG+103664|0]|0)){hG=hG+1|0}else{break L6733}}if((hG|0)==1){break L6731}}}while(0);c[16321]=-1;hH(65280,1,0);if((gF|0)!=(c[13898]|0)){break L44}hF=is(o)|0;nh=c[hF>>2]|0;if((nh|0)==1){Fa=+(c[hF+8>>2]|0)}else if((nh|0)==2){Fa=+h[hF+8>>3]}else if((nh|0)==3){Fa=+uz(c[hF+8>>2]|0,0)}else{b7=5008;break L27}if((c[gf>>2]|0)==3){uu(c[gg>>2]|0);c[gf>>2]=1}c[16321]=~~Fa-1;break L44}}while(0);c[16321]=-1}else if((gD|0)==154){gF=gv+1|0;c[13898]=gF;L6751:do{if((gF|0)<(c[8272]|0)){L6753:do{if((a[gw+(gF*40&-1)|0]&1)!=0){hF=c[gw+(gF*40&-1)+36>>2]|0;nh=gw+(gF*40&-1)+32|0;hp=0;while(1){if((hp|0)>=(hF|0)){break}if((a[gB+((c[nh>>2]|0)+hp|0)|0]|0)==(a[hp+103664|0]|0)){hp=hp+1|0}else{break L6753}}if((hp|0)==1){break L6751}}}while(0);c[17353]=-1;hH(69408,1,0);if((gF|0)!=(c[13898]|0)){break L44}nh=is(n)|0;hF=c[nh>>2]|0;if((hF|0)==1){Fb=+(c[nh+8>>2]|0)}else if((hF|0)==2){Fb=+h[nh+8>>3]}else if((hF|0)==3){Fb=+uz(c[nh+8>>2]|0,0)}else{b7=5024;break L27}if((c[gh>>2]|0)==3){uu(c[gi>>2]|0);c[gh>>2]=1}c[17353]=~~Fb-1;break L44}}while(0);c[17353]=-1}else if((gD|0)==156){gF=gv+1|0;c[13898]=gF;L6771:do{if((gF|0)<(c[8272]|0)){L6773:do{if((a[gw+(gF*40&-1)|0]&1)!=0){nh=c[gw+(gF*40&-1)+36>>2]|0;hF=gw+(gF*40&-1)+32|0;hG=0;while(1){if((hG|0)>=(nh|0)){break}if((a[gB+((c[hF>>2]|0)+hG|0)|0]|0)==(a[hG+103664|0]|0)){hG=hG+1|0}else{break L6773}}if((hG|0)==1){break L6771}}}while(0);c[17181]=-1;hH(68720,1,0);if((gF|0)!=(c[13898]|0)){break L44}hF=is(l)|0;nh=c[hF>>2]|0;if((nh|0)==1){Fc=+(c[hF+8>>2]|0)}else if((nh|0)==2){Fc=+h[hF+8>>3]}else if((nh|0)==3){Fc=+uz(c[hF+8>>2]|0,0)}else{b7=5040;break L27}if((c[gj>>2]|0)==3){uu(c[gl>>2]|0);c[gj>>2]=1}c[17181]=~~Fc-1;break L44}}while(0);c[17181]=-1}else if((gD|0)==152){gF=gv+1|0;c[13898]=gF;L6791:do{if((gF|0)<(c[8272]|0)){L6793:do{if((a[gw+(gF*40&-1)|0]&1)!=0){hF=c[gw+(gF*40&-1)+36>>2]|0;nh=gw+(gF*40&-1)+32|0;hp=0;while(1){if((hp|0)>=(hF|0)){break}if((a[gB+((c[nh>>2]|0)+hp|0)|0]|0)==(a[hp+103664|0]|0)){hp=hp+1|0}else{break L6793}}if((hp|0)==1){b7=5050;break L6791}}}while(0);c[16665]=-1;hH(66656,1,0);if((gF|0)!=(c[13898]|0)){break}nh=is(k)|0;hF=c[nh>>2]|0;if((hF|0)==1){Fd=+(c[nh+8>>2]|0)}else if((hF|0)==2){Fd=+h[nh+8>>3]}else if((hF|0)==3){Fd=+uz(c[nh+8>>2]|0,0)}else{b7=5056;break L27}if((c[gm>>2]|0)==3){uu(c[gn>>2]|0);c[gm>>2]=1}c[16665]=~~Fd-1}else{b7=5050}}while(0);if((b7|0)==5050){b7=0;c[16665]=-1}c[16492]=c[16664];c[65972>>2]=c[66660>>2];c[65976>>2]=c[66664>>2];c[65980>>2]=c[66668>>2];c[65984>>2]=c[66672>>2];c[65988>>2]=c[66676>>2];c[65992>>2]=c[66680>>2];c[65996>>2]=c[66684>>2];c[66e3>>2]=c[66688>>2];c[66004>>2]=c[66692>>2];c[66008>>2]=c[66696>>2];c[66012>>2]=c[66700>>2];c[66016>>2]=c[66704>>2];c[66020>>2]=c[66708>>2];c[16320]=c[16664];c[65284>>2]=c[66660>>2];c[65288>>2]=c[66664>>2];c[65292>>2]=c[66668>>2];c[65296>>2]=c[66672>>2];c[65300>>2]=c[66676>>2];c[65304>>2]=c[66680>>2];c[65308>>2]=c[66684>>2];c[65312>>2]=c[66688>>2];c[65316>>2]=c[66692>>2];c[65320>>2]=c[66696>>2];c[65324>>2]=c[66700>>2];c[65328>>2]=c[66704>>2];c[65332>>2]=c[66708>>2]}else if((gD|0)==119){gF=gv+1|0;c[13898]=gF;nh=a[gw+(gF*40&-1)|0]&1;L6813:do{if((c[8272]|0)>(gF|0)){if(nh<<24>>24==0){Fe=0;b7=5066;break}hF=c[gw+(gF*40&-1)+36>>2]|0;hG=gw+(gF*40&-1)+32|0;hS=0;while(1){if((hS|0)>=(hF|0)){break}if((a[gB+((c[hG>>2]|0)+hS|0)|0]|0)==(a[hS+95280|0]|0)){hS=hS+1|0}else{Fe=nh;b7=5066;break L6813}}if((hS|0)!=2){Ff=hF;Fg=nh;b7=5075;break}c[13898]=gv+2;hG=is(f)|0;gC=c[hG>>2]|0;if((gC|0)==1){Fh=+(c[hG+8>>2]|0)}else if((gC|0)==2){Fh=+h[hG+8>>3]}else if((gC|0)==3){Fh=+uz(c[hG+8>>2]|0,0)}else{b7=5072;break L27}if((c[go>>2]|0)!=3){Fi=1;Fj=Fh;break}uu(c[gp>>2]|0);c[go>>2]=1;Fi=1;Fj=Fh}else{Fe=nh;b7=5066}}while(0);if((b7|0)==5066){b7=0;Ff=c[gw+(gF*40&-1)+36>>2]|0;Fg=Fe;b7=5075}do{if((b7|0)==5075){b7=0;L6831:do{if(Fg<<24>>24!=0&(Ff|0)>0){nh=0;hG=0;gC=c[gw+(gF*40&-1)+32>>2]|0;while(1){if((a[nh+72944|0]|0)==(a[gB+(nh+gC|0)|0]|0)){Fk=gC;Fl=hG}else{if((nh|0)!=3){b7=5083;break L6831}Fk=gC-1|0;Fl=1}hB=nh+1|0;if((hB|0)<(Fl+Ff|0)){nh=hB;hG=Fl;gC=Fk}else{break}}if((Fl|0)!=0){Fm=gF;break}if((nh|0)==2|(nh|0)==8){Fm=gF}else{b7=5083}}else{b7=5083}}while(0);if((b7|0)==5083){b7=0;c[13898]=gv;Fm=gv}c[13898]=Fm+1;hF=is(j)|0;hS=c[hF>>2]|0;if((hS|0)==1){Fn=+(c[hF+8>>2]|0)}else if((hS|0)==2){Fn=+h[hF+8>>3]}else if((hS|0)==3){Fn=+uz(c[hF+8>>2]|0,0)}else{b7=5088;break L27}if((c[gq>>2]|0)!=3){Fi=0;Fj=Fn;break}uu(c[gs>>2]|0);c[gq>>2]=1;Fi=0;Fj=Fn}}while(0);h[77]=Fj;a[624]=Fi}else if((gD|0)==91){c[13898]=gv+1;gF=is(e)|0;hF=c[gF>>2]|0;if((hF|0)==1){Fo=+(c[gF+8>>2]|0)}else if((hF|0)==2){Fo=+h[gF+8>>3]}else if((hF|0)==3){Fo=+uz(c[gF+8>>2]|0,0)}else{b7=5096;break L27}if((c[gt>>2]|0)==3){uu(c[gu>>2]|0);c[gt>>2]=1}h[77]=Fo;a[624]=0}else{b7=5100;break L27}}while(0);if(!(ix(c[6074]|0)|0)){break L7}c[13898]=cb;gv=cb}if((b7|0)==109){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==114){uf(c[13898]|0,124136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==121){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=123984,v)|0)}else if((b7|0)==780){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==815){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==831){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==918){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==953){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=129728,v)|0)}else if((b7|0)==974){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==978){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==998){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1002){uk(132480,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1020){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1034){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1038){uf(mD,127632,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1053){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1073){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1078){uf(me,127264,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1083){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1097){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1101){uf(c[13898]|0,127040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1165){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1194){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1207){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1224){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1232){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1240){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1244){uf(no,129896,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1251){uf(-1,129624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1284){uf((c[13898]|0)-1|0,130240,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1292){c[13898]=nE;b7=1293}else if((b7|0)==1295){Fp=c[13898]|0;uf(Fp,132744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1360){uf(nT,131288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1402){c[13898]=n7;b7=1403}else if((b7|0)==1405){Fq=c[13898]|0;uf(Fq,132744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1452){c[13898]=oj;b7=1453}else if((b7|0)==1462){Fr=c[13898]|0;uf(Fr,140752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1693){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1742){uf(gv,154168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1747){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1764){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1769){uf(c[13898]|0,173664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1867){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1877){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1885){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1893){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1901){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1974){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1997){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2007){uf(qT,136864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2054){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2152){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2158){uf(c[13898]|0,208936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2165){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=201712,v)|0)}else if((b7|0)==2198){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=138936,v)|0)}else if((b7|0)==2201){uu(r3);uu(r2);uf(c[13898]|0,138632,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2206){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2270){c[13898]=sl;b7=2271}else if((b7|0)==2280){Fs=c[13898]|0;uf(Fs,140752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2297){c[13898]=sr;st=sr;uf(st,140752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2299){st=c[13898]|0;uf(st,140752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2312){c[sv>>2]=sw;uf(c[13898]|0,174808,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2324){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2328){uf(c[13898]|0,140880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2398){c[13898]=sX;b7=2399}else if((b7|0)==2401){Ft=c[13898]|0;uf(Ft,143264,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2437){uf(s$,142184,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2458){c[13898]=ta;tc=ta;uf(tc,142920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2460){tc=c[13898]|0;uf(tc,142920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2520){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2698){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2740){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2816){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2838){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2860){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2882){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2897){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2911){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2917){uf(vH,179040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2930){c[13898]=vH;b7=2931}else if((b7|0)==2933){Fu=c[13898]|0;uf(Fu,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2983){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2997){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3049){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3116){uf(vK,164e3,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3153){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3161){uf(wg,159752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3166){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3170){uf(c[13898]|0,159064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3182){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3186){uf(c[13898]|0,159064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3198){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3202){uf(c[13898]|0,159064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3205){uf(wg,159752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3218){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3234){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3249){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3255){uf(wg,159752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3258){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=151392,v)|0)}else if((b7|0)==3282){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3296){uf((c[13898]|0)-1|0,150248,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3302){uf((c[13898]|0)-1|0,150080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3308){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3312){uf((c[13898]|0)-1|0,149880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3317){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3321){uf((c[13898]|0)-1|0,149880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3326){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3330){uf((c[13898]|0)-1|0,149880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3347){uf(w$,150736,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3353){uf(wg,159752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3361){c[13898]=xi;xj=xi;uf(xj,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3363){xj=c[13898]|0;uf(xj,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3366){uf(c[13898]|0,151816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3371){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=151632,v)|0)}else if((b7|0)==3373){ez();Fv=c[13898]|0;uf(Fv,150896,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3397){ez();uf(c[13898]|0,151112,(v=i,i=i+8|0,c[v>>2]=c[11900],v)|0)}else if((b7|0)==3404){uf(c[13898]|0,150736,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3409){uf(wg,159752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3413){uf(xx,152776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3427){uf(xA,152776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3441){uf(xD,152776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3459){uf(xF,154672,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3467){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3471){uf(c[13898]|0,154376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3473){uf(wg,154e3,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3537){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3541){c[13505]=0;uf(c[13898]|0,163320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3561){uf(xO,162224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3576){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3590){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3614){c[13898]=x5;b7=3615}else if((b7|0)==3617){Fw=c[13898]|0;uf(Fw,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3642){c[13898]=ya;b7=3643}else if((b7|0)==3645){Fx=c[13898]|0;uf(Fx,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3678){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3683){uf(yz,208936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3719){uf(yf,171872,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3720){uf(yf,171504,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3725){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3742){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3747){uf(c[13898]|0,173664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3775){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3802){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3815){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3821){g[38]=1.0;g[178]=1.0;uf(-1,174280,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3845){uf(zN,143640,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3860){uf(zT,143640,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3879){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3884){uf(c[13898]|0,208936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3894){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=176728,v)|0)}else if((b7|0)==3974){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4075){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4079){uf(AC,193912,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4110){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4186){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4197){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4213){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4217){uf((c[13898]|0)-1|0,204376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4243){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4247){uf((c[13898]|0)-1|0,203376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4290){uf(zm,208496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4304){uj(c[13898]|0,214704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4308){uf(BU,217328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4376){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4392){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4493){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4506){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4527){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4668){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4686){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4714){c[13898]=Ea;Fy=Ea;uf(Fy,73560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4722){c[13898]=D4;Fy=D4;uf(Fy,73560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4725){Fy=c[13898]|0;uf(Fy,73560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4796){c[13898]=Ec;EH=Ec;uf(EH,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4798){EH=c[13898]|0;uf(EH,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4854){uf(ER,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4859){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4867){uf(c[13898]|0,21904,(v=i,i=i+16|0,c[v>>2]=120,c[v+8>>2]=360,v)|0)}else if((b7|0)==4869){uf(c[13898]|0,21904,(v=i,i=i+16|0,c[v>>2]=122,c[v+8>>2]=360,v)|0)}else if((b7|0)==4871){uf(c[13898]|0,21864,(v=i,i=i+8|0,c[v>>2]=179864,v)|0)}else if((b7|0)==4873){uf(c[13898]|0,21864,(v=i,i=i+8|0,c[v>>2]=77416,v)|0)}else if((b7|0)==4881){uf(-1,211136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4976){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==4992){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5008){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5024){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5040){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5056){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5072){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5088){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5096){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5100){uf(gv,204968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5107){uf(gN,122840,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5108){uf(gN,122840,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5109){uf(gN,122840,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5110){uf(gN,122840,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5111){uf(hT,123864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5112){uf(hT,123864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5113){uf(hQ,123776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5114){uf(hQ,123776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5115){uf(hq,123648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5116){uf(hq,123648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5117){uf(hq,123648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5118){uf(hq,123512,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5119){uf(hq,123512,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5120){uf(kI,124880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5121){uf(kI,124880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5122){uf(kI,124880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5123){uf(lc,126168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5124){uf(lc,126168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5125){uf(lc,126168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5126){uf(lc,126168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5127){uf(lt,139712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5128){uf(lt,139712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5129){uf(lt,139712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5130){uf(lt,139712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5131){uf(mj,128168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5132){uf(mj,128168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5133){uf(mn,128008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5134){uf(mn,128008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5135){uf(mn,128008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5136){uf(mn,128008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5137){uf(mB,127784,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5138){uf(mB,127784,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5139){uf(mB,127784,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5140){uf(mB,127784,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5141){uf(mD,127528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5142){uf(mD,127528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5143){uf(mD,127528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5144){uf(lL,126816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5145){uf(lL,126816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5146){uf(lL,126816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5147){uf(lL,126816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5148){uf(mN,128944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5149){uf(mN,128944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5150){uf(mN,128944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5151){uf(mN,128944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5152){uf(-1,129776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5153){uf(-1,129776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5156){uf(nK,130792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5157){uf(nK,130792,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5158){uf(nQ,130664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5159){uf(nQ,130664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5162){uf(n_,132152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5163){uf(n_,132152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5164){uf(n_,132152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5165){uf(n_,132152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5168){uf(qP,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5169){uf(qP,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5170){uf(qP,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5171){uf(rd,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5172){uf(rd,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5173){uf(rd,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5174){uf(rd,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5175){uu(r2);uu(r6);Fz=c[13898]|0;uf(Fz,137984,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5176){uu(r2);uu(r6);Fz=c[13898]|0;uf(Fz,137984,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5177){uu(r2);uu(r6);Fz=c[13898]|0;uf(Fz,137984,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5178){uu(r2);uu(r6);Fz=c[13898]|0;uf(Fz,137984,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5181){uf(st,140752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5184){uf(sA,141216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5185){uf(sA,141216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5186){uf(sA,141216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5187){uf(sA,141216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5190){uf(s$,142560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5191){uf(s$,142560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5192){uf(tc,142920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5195){uf(sR,211296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5196){uf(sR,211296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5197){uf(sR,211296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5198){uf(sR,211296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5199){uf(sR,211296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5200){uf(sR,211296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5201){uf(sR,211296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5202){uf(sR,211296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5203){uf(sR,211296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5204){uf(sR,211296,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5205){uf(vo,143744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5206){uf(vo,143744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5207){uf(tq,143392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5208){uf(tq,143392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5209){uf(tq,143392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5210){uf(vE,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5211){uf(vE,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5212){uf(vE,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5213){uf(vE,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5216){uf(vT,170376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5217){uf(vT,170376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5218){uf(vV,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5219){uf(vV,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5220){uf(vV,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5221){uf(vV,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5222){uf(vX,169096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5223){uf(vX,169096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5224){uf(vX,169096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5225){uf(vX,169096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5226){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5227){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5228){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5229){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5230){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5231){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5232){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5233){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5234){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5235){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5236){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5237){uf(wd,164440,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5238){uf(wO,150560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5239){uf(wO,150560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5240){uf(wO,150560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5241){uf(xe,149736,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5242){uf(xe,149736,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5243){uf(xe,149736,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5244){uf(xe,149736,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5245){uf(xj,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5246){uf(xj,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5250){Fv=c[13898]|0;uf(Fv,150896,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5251){uf(xz,152392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5252){uf(xz,152392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5253){uf(xz,152392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5254){uf(xz,152392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5255){uf(xC,152392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5256){uf(xC,152392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5257){uf(xC,152392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5258){uf(xC,152392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5259){uf(xF,155040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5260){uf(xF,155040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5261){uf(x$,162848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5262){uf(x$,162848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5263){uf(x0,162848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5264){uf(x0,162848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5265){uf(x7,148728,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5266){uf(x7,148728,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5267){uf(x7,148728,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5272){uf(yU,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5273){uf(yU,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5274){uf(yU,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5275){uf(zT,214008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5276){uf(zT,214008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5277){uf(z7,176128,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5278){uf(z7,176128,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5279){uf(z7,176128,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5280){uf(zF,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5281){uf(zF,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5282){uf(zF,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5283){uf(zF,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5284){uf(zs,209456,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5285){uf(zs,209456,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5286){uf(zs,209456,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5287){uf(zs,209456,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5288){uf(AX,200192,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5289){uf(AX,200192,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5290){uf(AX,200192,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5291){uf(AX,200192,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5292){uf(AX,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5293){uf(AX,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5294){uf(AX,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5295){uf(AX,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5296){uf(BW,217888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5297){uf(BW,217888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5298){uf(BW,217888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5299){uf(DU,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5300){uf(DU,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5301){uf(DU,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5302){uf(DU,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5303){uf(Ci,224656,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5304){uf(Ci,224656,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5305){uf(Ci,224656,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5306){uf(Ci,224656,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5310){uf(EH,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5311){uf(EH,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==5312){uf(EH,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((b7|0)==1293){c[12886]=0;Fp=nE;uf(Fp,132744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1403){c[10568]=0;Fq=n7;uf(Fq,132744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==1453){c[bv>>2]=0;Fr=oj;uf(Fr,140752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2271){c[a8>>2]=0;Fs=sl;uf(Fs,140752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2399){c[8528]=0;Ft=sX;uf(Ft,143264,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==2931){c[aF>>2]=0;Fu=vH;uf(Fu,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3615){c[ad>>2]=0;Fw=x5;uf(Fw,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b7|0)==3643){c[57238]=0;Fx=ya;uf(Fx,149040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);e7(0);Fx=c[6074]|0;if((Fx|0)!=0){ya=Fx;while(1){Fx=c[ya>>2]|0;uu(c[ya+12>>2]|0);uu(ya);if((Fx|0)==0){break}else{ya=Fx}}}c[6074]=0;i=d;return}function jp(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0;b=i;i=i+40|0;d=b|0;e=b+24|0;f=e|0;g=e|0;uE(g|0,0,11);h=c[13898]|0;j=h+1|0;c[13898]=j;k=c[1054]|0;l=c[k+(j*40&-1)+36>>2]|0;m=c[k+(j*40&-1)+32>>2]|0;n=(a[k+(j*40&-1)|0]&1)==0;o=(l|0)>0;p=c[10036]|0;q=56720;r=77416;L7279:while(1){L7281:do{if(!n){if(o){s=0;t=0;u=m;while(1){w=a[r+s|0]|0;if(w<<24>>24==(a[p+(s+u|0)|0]|0)){x=u;y=t}else{if(w<<24>>24!=36){break L7281}x=u-1|0;y=1}z=s+1|0;if((z|0)<(y+l|0)){s=z;t=y;u=x}else{break}}if((y|0)==0){A=z}else{B=q;break L7279}}else{A=0}u=a[r+A|0]|0;if((u<<24>>24|0)==36|(u<<24>>24|0)==0){B=q;break L7279}}}while(0);u=q+8|0;t=c[u>>2]|0;if((t|0)==0){B=u;break}else{q=u;r=t}}r=c[B+4>>2]|0;L7294:do{if((r|0)>-1){a[e+r|0]=1;B=h+2|0;c[13898]=B;C=B;D=c[8272]|0}else{B=c[8272]|0;q=(B|0)>(j|0);L7296:do{if(!(n|q^1)){A=0;while(1){if((A|0)>=(l|0)){E=5332;break}if((a[p+(m+A|0)|0]|0)==(a[A+150688|0]|0)){A=A+1|0}else{E=5333;break}}if((E|0)==5332){if((A|0)!=2){E=5333}}if((E|0)==5333){if(n|q^1){break}else{F=0}while(1){if((F|0)>=(l|0)){break}if((a[p+(m+F|0)|0]|0)==(a[F+148800|0]|0)){F=F+1|0}else{break L7296}}if((F|0)!=2){break}}a[e+1|0]=1;a[e+2|0]=1;A=h+2|0;c[13898]=A;C=A;D=B;break L7294}}while(0);uE(f|0,1,11);C=j;D=B}}while(0);L7312:do{if((C|0)<(D|0)){j=(a[k+(C*40&-1)|0]&1)==0;L7314:do{if(j){G=d}else{f=c[k+(C*40&-1)+36>>2]|0;h=k+(C*40&-1)+32|0;F=0;while(1){if((F|0)>=(f|0)){E=5345;break}if((a[p+((c[h>>2]|0)+F|0)|0]|0)==(a[F+103664|0]|0)){F=F+1|0}else{break}}if((E|0)==5345){if((F|0)==1){break L7312}}h=d;if(j){G=h;break}f=c[k+(C*40&-1)+36>>2]|0;m=k+(C*40&-1)+32|0;l=0;while(1){if((l|0)>=(f|0)){break}if((a[p+((c[m>>2]|0)+l|0)|0]|0)==(a[l+103664|0]|0)){l=l+1|0}else{G=h;break L7314}}if((l|0)==1){H=C}else{G=h;break}uf(H,133088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[d>>2]|0)!=3){c[13898]=C;H=C;uf(H,133088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=c[d+8>>2]|0;if((j|0)==0){H=c[13898]|0;uf(H,133088,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[e+2|0]&1)!=0){uF(66240,j|0,50);B=a8(j|0,37)|0;do{if((B|0)==0){I=0}else{m=B+1|0;L7342:do{if((m|0)==0){J=0}else{f=m;while(1){F=a[f]|0;if(!((F<<24>>24|0)==32|(F<<24>>24|0)==45|(F<<24>>24|0)==43|(F<<24>>24|0)==35)){J=f;break L7342}F=f+1|0;if((F|0)==0){J=0;break}else{f=F}}}}while(0);while(1){K=a[J]|0;if(!(((K&255)-48|0)>>>0<10|K<<24>>24==46)){break}J=J+1|0}if((K-102&255)<2){I=1;break}I=K<<24>>24==101&1}}while(0);a[66188]=I}if((a[e+1|0]&1)!=0){uF(65552,j|0,50);B=a8(j|0,37)|0;do{if((B|0)==0){L=0}else{m=B+1|0;L7357:do{if((m|0)==0){M=0}else{h=m;while(1){l=a[h]|0;if(!((l<<24>>24|0)==32|(l<<24>>24|0)==45|(l<<24>>24|0)==43|(l<<24>>24|0)==35)){M=h;break L7357}l=h+1|0;if((l|0)==0){M=0;break}else{h=l}}}}while(0);while(1){N=a[M]|0;if(!(((N&255)-48|0)>>>0<10|N<<24>>24==46)){break}M=M+1|0}if((N-102&255)<2){L=1;break}L=N<<24>>24==101&1}}while(0);a[65500]=L}if((a[g]&1)!=0){uF(64864,j|0,50);B=a8(j|0,37)|0;do{if((B|0)==0){O=0}else{m=B+1|0;L7372:do{if((m|0)==0){P=0}else{h=m;while(1){l=a[h]|0;if(!((l<<24>>24|0)==32|(l<<24>>24|0)==45|(l<<24>>24|0)==43|(l<<24>>24|0)==35)){P=h;break L7372}l=h+1|0;if((l|0)==0){P=0;break}else{h=l}}}}while(0);while(1){Q=a[P]|0;if(!(((Q&255)-48|0)>>>0<10|Q<<24>>24==46)){break}P=P+1|0}if((Q-102&255)<2){O=1;break}O=Q<<24>>24==101&1}}while(0);a[64812]=O}if((a[e+6|0]&1)!=0){uF(68992,j|0,50);B=a8(j|0,37)|0;do{if((B|0)==0){R=0}else{m=B+1|0;L7387:do{if((m|0)==0){S=0}else{h=m;while(1){l=a[h]|0;if(!((l<<24>>24|0)==32|(l<<24>>24|0)==45|(l<<24>>24|0)==43|(l<<24>>24|0)==35)){S=h;break L7387}l=h+1|0;if((l|0)==0){S=0;break}else{h=l}}}}while(0);while(1){T=a[S]|0;if(!(((T&255)-48|0)>>>0<10|T<<24>>24==46)){break}S=S+1|0}if((T-102&255)<2){R=1;break}R=T<<24>>24==101&1}}while(0);a[68940]=R}if((a[e+5|0]&1)!=0){uF(68304,j|0,50);B=a8(j|0,37)|0;do{if((B|0)==0){U=0}else{m=B+1|0;L7402:do{if((m|0)==0){V=0}else{h=m;while(1){l=a[h]|0;if(!((l<<24>>24|0)==32|(l<<24>>24|0)==45|(l<<24>>24|0)==43|(l<<24>>24|0)==35)){V=h;break L7402}l=h+1|0;if((l|0)==0){V=0;break}else{h=l}}}}while(0);while(1){W=a[V]|0;if(!(((W&255)-48|0)>>>0<10|W<<24>>24==46)){break}V=V+1|0}if((W-102&255)<2){U=1;break}U=W<<24>>24==101&1}}while(0);a[68252]=U}if((a[e+3|0]&1)!=0){uF(66928,j|0,50);B=a8(j|0,37)|0;do{if((B|0)==0){X=0}else{m=B+1|0;L7417:do{if((m|0)==0){Y=0}else{h=m;while(1){l=a[h]|0;if(!((l<<24>>24|0)==32|(l<<24>>24|0)==45|(l<<24>>24|0)==43|(l<<24>>24|0)==35)){Y=h;break L7417}l=h+1|0;if((l|0)==0){Y=0;break}else{h=l}}}}while(0);while(1){Z=a[Y]|0;if(!(((Z&255)-48|0)>>>0<10|Z<<24>>24==46)){break}Y=Y+1|0}if((Z-102&255)<2){X=1;break}X=Z<<24>>24==101&1}}while(0);a[66876]=X}if((a[e+7|0]&1)!=0){uF(69680,j|0,50);B=a8(j|0,37)|0;do{if((B|0)==0){_=0}else{m=B+1|0;L7432:do{if((m|0)==0){$=0}else{h=m;while(1){l=a[h]|0;if(!((l<<24>>24|0)==32|(l<<24>>24|0)==45|(l<<24>>24|0)==43|(l<<24>>24|0)==35)){$=h;break L7432}l=h+1|0;if((l|0)==0){$=0;break}else{h=l}}}}while(0);while(1){aa=a[$]|0;if(!(((aa&255)-48|0)>>>0<10|aa<<24>>24==46)){break}$=$+1|0}if((aa-102&255)<2){_=1;break}_=aa<<24>>24==101&1}}while(0);a[69628]=_}uu(j);i=b;return}}while(0);if((a[e+2|0]&1)!=0){c[16560]=6758437;a[66188]=1}if((a[e+1|0]&1)!=0){c[16388]=6758437;a[65500]=1}if((a[g]&1)!=0){c[16216]=6758437;a[64812]=1}if((a[e+6|0]&1)!=0){c[17248]=6758437;a[68940]=1}if((a[e+5|0]&1)!=0){c[17076]=6758437;a[68252]=1}if((a[e+3|0]&1)!=0){c[16732]=6758437;a[66876]=1}if((a[e+7|0]&1)==0){i=b;return}c[17420]=6758437;a[69628]=1;i=b;return}function jq(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=i;i=i+24|0;e=d|0;f=(c[13898]|0)+1|0;c[13898]=f;L7468:do{if((f|0)<(c[8272]|0)){g=c[1054]|0;L7470:do{if((a[g+(f*40&-1)|0]&1)!=0){h=c[g+(f*40&-1)+36>>2]|0;j=g+(f*40&-1)+32|0;k=c[10036]|0;l=0;while(1){if((l|0)>=(h|0)){break}if((a[k+((c[j>>2]|0)+l|0)|0]|0)==(a[l+103664|0]|0)){l=l+1|0}else{break L7470}}if((l|0)==1){break L7468}}}while(0);jw(b);g=c[13898]|0;L7477:do{if((g|0)<(c[8272]|0)){j=c[1054]|0;k=(a[j+(g*40&-1)|0]&1)==0;L7479:do{if(k){m=e}else{h=c[j+(g*40&-1)+36>>2]|0;n=j+(g*40&-1)+32|0;o=c[10036]|0;p=0;while(1){if((p|0)>=(h|0)){q=5461;break}if((a[o+((c[n>>2]|0)+p|0)|0]|0)==(a[p+103664|0]|0)){p=p+1|0}else{break}}if((q|0)==5461){if((p|0)==1){break L7477}}n=e;if(k){m=n;break}o=c[j+(g*40&-1)+36>>2]|0;h=j+(g*40&-1)+32|0;r=c[10036]|0;s=0;while(1){if((s|0)>=(o|0)){break}if((a[r+((c[h>>2]|0)+s|0)|0]|0)==(a[s+103664|0]|0)){s=s+1|0}else{m=n;break L7479}}if((s|0)==1){break L7477}else{m=n}}}while(0);a[14176]=1;is(e);a[14176]=0;if((c[e>>2]|0)!=3){c[13898]=g;break}j=c[e+8>>2]|0;if((j|0)==0){break}k=b+60|0;uu(c[k>>2]|0);c[k>>2]=j}}while(0);jw(b);i=d;return}}while(0);e=b+60|0;uu(c[e>>2]|0);c[e>>2]=0;i=d;return}function jr(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=i;i=i+48|0;e=d|0;f=d+24|0;g=(c[13898]|0)+1|0;c[13898]=g;if((g|0)>=(c[8272]|0)){j=g;uf(j,208936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=c[1054]|0;L7506:do{if((a[k+(g*40&-1)|0]&1)!=0){l=c[k+(g*40&-1)+36>>2]|0;m=k+(g*40&-1)+32|0;n=c[10036]|0;o=0;while(1){if((o|0)>=(l|0)){break}if((a[n+((c[m>>2]|0)+o|0)|0]|0)==(a[o+103664|0]|0)){o=o+1|0}else{break L7506}}if((o|0)==1){j=g}else{break}uf(j,208936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);g=is(e)|0;k=c[g>>2]|0;if((k|0)==3){p=+uz(c[g+8>>2]|0,0)}else if((k|0)==2){p=+h[g+8>>3]}else if((k|0)==1){p=+(c[g+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=e|0;if((c[g>>2]|0)==3){uu(c[e+8>>2]|0);c[g>>2]=1}g=~~p;if((g|0)<1){j=c[13898]|0;uf(j,208936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{q=b;r=0}while(1){s=c[q>>2]|0;if((s|0)==0){t=0;u=5494;break}w=c[s+4>>2]|0;if((g|0)>(w|0)){q=s|0;r=s}else{u=5493;break}}if((u|0)==5493){if((g|0)==(w|0)){x=s}else{t=s;u=5494}}if((u|0)==5494){s=f|0;uE(s|0,0,24);f=g-1|0;w=ut(64)|0;do{if((w|0)==0){gk();q=ut(64)|0;if((q|0)!=0){y=q;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=128152,v)|0)}else{y=w}}while(0);w=y;if((r|0)==0){c[b>>2]=w}else{c[r>>2]=w}c[y+4>>2]=g;c[y>>2]=t;c[y+8>>2]=0;c[y+12>>2]=f;c[y+16>>2]=f;c[y+20>>2]=0;h[y+24>>3]=1.0;h[y+32>>3]=-2.0;f=y+40|0;c[f>>2]=c[s>>2];c[f+4>>2]=c[s+4>>2];c[f+8>>2]=c[s+8>>2];c[f+12>>2]=c[s+12>>2];c[f+16>>2]=c[s+16>>2];c[f+20>>2]=c[s+20>>2];x=w}w=c[13898]|0;s=c[1054]|0;f=c[s+(w*40&-1)+36>>2]|0;L7542:do{if((a[s+(w*40&-1)|0]&1)!=0&(f|0)>0){y=c[10036]|0;t=0;g=0;q=c[s+(w*40&-1)+32>>2]|0;while(1){if((a[t+184456|0]|0)==(a[y+(t+q|0)|0]|0)){z=q;A=g}else{if((t|0)!=3){u=5515;break L7542}z=q-1|0;A=1}j=t+1|0;if((j|0)<(A+f|0)){t=j;g=A;q=z}else{break}}if((A|0)==0){if(!((t|0)==2|(t|0)==7)){u=5515;break}}if((x|0)==0){B=w}else{q=c[x>>2]|0;if((c[b>>2]|0)==(x|0)){c[b>>2]=q}else{c[r>>2]=q}uu(x);B=c[13898]|0}q=B+1|0;c[13898]=q;C=q}else{u=5515}}while(0);if((u|0)==5515){B=x+8|0;hH(B,0,1);C=c[13898]|0}if((C|0)>=(c[8272]|0)){i=d;return}B=c[1054]|0;if((a[B+(C*40&-1)|0]&1)==0){D=(b|0)==43264;E=D?124560:123144;uf(C,125776,(v=i,i=i+8|0,c[v>>2]=E,v)|0)}x=c[B+(C*40&-1)+36>>2]|0;r=B+(C*40&-1)+32|0;B=c[10036]|0;w=0;while(1){if((w|0)>=(x|0)){break}if((a[B+((c[r>>2]|0)+w|0)|0]|0)==(a[w+103664|0]|0)){w=w+1|0}else{u=5530;break}}if((u|0)==5530){D=(b|0)==43264;E=D?124560:123144;uf(C,125776,(v=i,i=i+8|0,c[v>>2]=E,v)|0)}if((w|0)==1){i=d;return}else{D=(b|0)==43264;E=D?124560:123144;uf(C,125776,(v=i,i=i+8|0,c[v>>2]=E,v)|0)}}function js(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0;d=i;i=i+24|0;e=d|0;f=b|0;c[f>>2]=4;g=b+16|0;h[g>>3]=-1.0;b=c[13898]|0;j=b+1|0;c[13898]=j;if((j|0)>=(c[8272]|0)){i=d;return}k=c[1054]|0;l=a[k+(j*40&-1)|0]|0;m=(l&1)==0;L7583:do{if(m){n=j;o=l}else{p=c[k+(j*40&-1)+36>>2]|0;q=k+(j*40&-1)+32|0;r=c[10036]|0;s=0;while(1){if((s|0)>=(p|0)){t=5537;break}if((a[r+((c[q>>2]|0)+s|0)|0]|0)==(a[s+103664|0]|0)){s=s+1|0}else{break}}do{if((t|0)==5537){if((s|0)!=1){break}i=d;return}}while(0);if(m){n=j;o=l;break}s=c[k+(j*40&-1)+36>>2]|0;q=k+(j*40&-1)+32|0;r=c[10036]|0;p=0;while(1){if((p|0)>=(s|0)){break}if((a[r+((c[q>>2]|0)+p|0)|0]|0)==(a[p+95280|0]|0)){p=p+1|0}else{n=j;o=l;break L7583}}if((p|0)!=2){n=j;o=l;break}q=b+2|0;c[13898]=q;s=c[k+(q*40&-1)+36>>2]|0;u=a[k+(q*40&-1)|0]|0;if((u&1)!=0&(s|0)>0){w=0;x=0;y=c[k+(q*40&-1)+32>>2]|0}else{uf(q,141880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}while(1){if((a[w+142056|0]|0)==(a[r+(w+y|0)|0]|0)){z=y;A=x}else{if((w|0)!=2){t=5575;break}z=y-1|0;A=1}B=w+1|0;if((B|0)<(A+s|0)){w=B;x=A;y=z}else{break}}if((t|0)==5575){uf(q,141880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((A|0)!=0){n=q;o=u;break}if((w|0)==1|(w|0)==6){n=q;o=u;break}uf(q,141880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);w=c[k+(n*40&-1)+36>>2]|0;L7612:do{if((o&1)!=0&(w|0)>0){A=c[10036]|0;t=0;z=0;y=c[k+(n*40&-1)+32>>2]|0;while(1){if((a[t+142056|0]|0)==(a[A+(t+y|0)|0]|0)){C=y;D=z}else{if((t|0)!=2){break L7612}C=y-1|0;D=1}x=t+1|0;if((x|0)<(D+w|0)){t=x;z=D;y=C}else{break}}if((D|0)==0){if(!((t|0)==1|(t|0)==6)){break}}c[f>>2]=3;c[13898]=(c[13898]|0)+1}}while(0);D=is(e)|0;C=c[D>>2]|0;if((C|0)==1){E=+(c[D+8>>2]|0)}else if((C|0)==2){E=+h[D+8>>3]}else if((C|0)==3){E=+uz(c[D+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}D=e|0;if((c[D>>2]|0)==3){uu(c[e+8>>2]|0);c[D>>2]=1}D=E<0.0;F=D?-1.0:E;h[g>>3]=F;if((c[f>>2]|0)!=3){i=d;return}if(D){h[g>>3]=0.0;i=d;return}if(F<=1.0){i=d;return}h[g>>3]=1.0;i=d;return}function jt(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0,bx=0.0,by=0.0,bz=0,bA=0,bB=0.0,bC=0,bD=0,bE=0,bF=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bL=0,bM=0,bN=0,bO=0,bP=0,bQ=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0,b3=0,b4=0,b5=0,b6=0,b7=0,b8=0,b9=0,ca=0,cb=0,cc=0,cd=0,ce=0,cf=0,cg=0,ch=0,ci=0,cj=0,ck=0,cl=0,cm=0,cn=0,co=0,cp=0,cq=0,cr=0.0,cs=0.0,ct=0.0,cu=0,cv=0.0,cw=0,cx=0,cy=0,cz=0.0,cA=0,cB=0,cC=0,cD=0,cE=0.0,cF=0.0,cG=0.0,cH=0.0,cI=0.0,cJ=0.0,cK=0,cL=0,cM=0.0,cN=0.0,cO=0.0,cP=0.0,cQ=0,cR=0.0,cS=0.0,cT=0,cU=0,cV=0,cW=0,cX=0,cY=0,cZ=0,c_=0,c$=0,c0=0,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9=0,da=0,db=0,dc=0,dd=0,de=0,df=0,dg=0,dh=0,di=0,dj=0,dk=0,dm=0,dn=0,dq=0,dr=0,ds=0,dt=0,du=0,dv=0,dw=0,dx=0,dy=0,dz=0,dA=0,dB=0,dC=0,dD=0,dE=0,dF=0,dG=0,dH=0,dI=0.0,dJ=0,dK=0,dL=0,dM=0;d=i;i=i+656|0;e=d|0;f=d+24|0;g=d+48|0;j=d+72|0;k=d+96|0;l=d+120|0;m=d+144|0;n=d+168|0;o=d+192|0;p=d+216|0;q=d+264|0;r=d+272|0;s=d+296|0;t=d+320|0;u=d+344|0;w=d+368|0;x=d+392|0;y=d+416|0;z=d+464|0;A=d+472|0;B=d+520|0;C=d+528|0;D=d+576|0;E=d+584|0;F=d+608|0;G=d+624|0;H=F|0;a[H]=a[136208]|0;a[H+1|0]=a[136209|0]|0;a[H+2|0]=a[136210|0]|0;I=F+2|0;J=56832+(b*24&-1)|0;uB(I|0,J|0);K=F+(uA(H|0)|0)|0;a[K]=a[120232]|0;a[K+1|0]=a[120233|0]|0;a[K+2|0]=a[120234|0]|0;a[K+3|0]=a[120235|0]|0;a[K+4|0]=a[120236|0]|0;a[K+5|0]=a[120237|0]|0;H=c[13898]|0;L=c[1054]|0;M=c[L+(H*40&-1)+36>>2]|0;N=c[L+(H*40&-1)+32>>2]|0;L7646:do{if((a[L+(H*40&-1)|0]&1)==0){P=H}else{if((M|0)>0){Q=c[10036]|0;R=0;S=0;T=N;while(1){U=a[F+(R+2|0)|0]|0;if(U<<24>>24==(a[Q+(R+T|0)|0]|0)){V=T;W=S}else{if(U<<24>>24!=36){P=H;break L7646}V=T-1|0;W=1}X=R+1|0;if((X|0)<(W+M|0)){R=X;S=W;T=V}else{break}}if((W|0)==0){Y=X;Z=5590}}else{Y=0;Z=5590}if((Z|0)==5590){T=a[F+(Y+2|0)|0]|0;if(!((T<<24>>24|0)==36|(T<<24>>24|0)==0)){P=H;break}}T=64976+(b*688&-1)|0;a[T]=0;S=H+1|0;c[13898]=S;R=e|0;Q=e+8|0;U=64864+(b*688&-1)|0;_=64812+(b*688&-1)|0;$=64944+(b*688&-1)|0;aa=o|0;ab=o+8|0;ac=64808+(b*688&-1)|0;ad=n|0;ae=n+8|0;af=64813+(b*688&-1)|0;ag=m|0;ah=m+8|0;ai=l|0;aj=l+8|0;ak=x|0;al=x+8|0;am=w|0;an=w+8|0;ao=u|0;ap=u+8|0;aq=t|0;ar=t+8|0;as=s|0;at=s+8|0;au=r|0;av=r+8|0;aw=64944+(b*688&-1)|0;ax=64920+(b*688&-1)|0;ay=64952+(b*688&-1)|0;az=64960+(b*688&-1)|0;aA=64968+(b*688&-1)|0;aB=64928+(b*688&-1)|0;aC=(b|0)==0?6:5;aD=64924+(b*688&-1)|0;aE=f|0;aF=f+8|0;aG=65024+(b*688&-1)|0;aH=65272+(b*688&-1)|0;aI=65128+(b*688&-1)|0;aJ=G|0;aK=64984+(b*688&-1)|0;aL=64988+(b*688&-1)|0;aM=64992+(b*688&-1)|0;aN=(64648+(b*688&-1)|0)+348|0;aO=64984+(b*688&-1)|0;aP=65032+(b*688&-1)|0;aQ=g|0;aR=g+8|0;aS=k|0;aT=k+8|0;aU=65056+(b*688&-1)|0;aV=j|0;aW=j+8|0;aX=65064+(b*688&-1)|0;aY=65072+(b*688&-1)|0;aZ=64916+(b*688&-1)|0;a_=0;a$=0;a0=S;a1=L;a2=a[L+(S*40&-1)|0]|0;L7660:while(1){S=c[a1+(a0*40&-1)+36>>2]|0;a3=c[a1+(a0*40&-1)+32>>2]|0;a4=(a2&1)==0;L7662:do{if((S|0)>0&(a4^1)){a5=c[10036]|0;a6=0;a7=0;a9=a3;while(1){if((a[a6+116896|0]|0)==(a[a5+(a6+a9|0)|0]|0)){ba=a9;bb=a7}else{if((a6|0)!=2){break}ba=a9-1|0;bb=1}bc=a6+1|0;if((bc|0)<(bb+S|0)){a6=bc;a7=bb;a9=ba}else{Z=5598;break}}do{if((Z|0)==5598){Z=0;if((bb|0)==0){if(!((a6|0)==1|(a6|0)==4)){break}}c[aZ>>2]=c[aZ>>2]&-4|2;c[13898]=a0+1;bd=1;be=a$;break L7662}}while(0);if(a4){Z=5835;break}L7677:do{if((S|0)>0){a6=c[10036]|0;a9=0;a7=0;a5=a3;while(1){if((a[a9+141136|0]|0)==(a[a6+(a9+a5|0)|0]|0)){bf=a5;bg=a7}else{if((a9|0)!=2){break L7677}bf=a5-1|0;bg=1}bc=a9+1|0;if((bc|0)<(bg+S|0)){a9=bc;a7=bg;a5=bf}else{break}}if((bg|0)==0){if(!((a9|0)==1|(a9|0)==6)){break}}c[aZ>>2]=c[aZ>>2]&-4|1;c[13898]=a0+1;bd=a_;be=a$;break L7662}}while(0);if(!((S|0)>0&(a4^1))){Z=5835;break}a5=c[10036]|0;a7=0;a6=0;bc=a3;while(1){if((a[a7+115048|0]|0)==(a[a5+(a7+bc|0)|0]|0)){bh=bc;bi=a6}else{if((a7|0)!=2){break}bh=bc-1|0;bi=1}bj=a7+1|0;if((bj|0)<(bi+S|0)){a7=bj;a6=bi;bc=bh}else{Z=5617;break}}do{if((Z|0)==5617){Z=0;if((bi|0)==0){if(!((a7|0)==1|(a7|0)==6)){break}}c[aZ>>2]=c[aZ>>2]|4;c[13898]=a0+1;bd=a_;be=1;break L7662}}while(0);if(a4){Z=5835;break}L7704:do{if((S|0)>0){a7=c[10036]|0;bc=0;a6=0;a5=a3;while(1){if((a[bc+114024|0]|0)==(a[a7+(bc+a5|0)|0]|0)){bk=a5;bl=a6}else{if((bc|0)!=4){break L7704}bk=a5-1|0;bl=1}bj=bc+1|0;if((bj|0)<(bl+S|0)){bc=bj;a6=bl;a5=bk}else{break}}if((bl|0)==0){if(!((bc|0)==3|(bc|0)==8)){break}}c[aZ>>2]=c[aZ>>2]&-5;c[13898]=a0+1;bd=a_;be=1;break L7662}}while(0);if(!((S|0)>0&(a4^1))){Z=5835;break}a5=c[10036]|0;a6=0;a7=0;a9=a3;while(1){if((a[a6+110600|0]|0)==(a[a5+(a6+a9|0)|0]|0)){bm=a9;bn=a7}else{if((a6|0)!=2){break}bm=a9-1|0;bn=1}bj=a6+1|0;if((bj|0)<(bn+S|0)){a6=bj;a7=bn;a9=bm}else{Z=5636;break}}do{if((Z|0)==5636){Z=0;if((bn|0)==0){if(!((a6|0)==1|(a6|0)==7)){break}}a[aY]=1;c[13898]=a0+1;bd=a_;be=a$;break L7662}}while(0);if(a4){Z=5835;break}L7731:do{if((S|0)>0){a6=c[10036]|0;a9=0;a7=0;a5=a3;while(1){if((a[a9+107800|0]|0)==(a[a6+(a9+a5|0)|0]|0)){bo=a5;bp=a7}else{if((a9|0)!=3){break L7731}bo=a5-1|0;bp=1}bj=a9+1|0;if((bj|0)<(bp+S|0)){a9=bj;a7=bp;a5=bo}else{break}}if((bp|0)==0){if(!((a9|0)==2|(a9|0)==8)){break}}a[aY]=0;c[13898]=a0+1;bd=a_;be=a$;break L7662}}while(0);if(!((S|0)>0&(a4^1))){Z=5835;break}a5=c[10036]|0;a7=0;a6=0;bc=a3;while(1){if((a[a7+106864|0]|0)==(a[a5+(a7+bc|0)|0]|0)){bq=bc;br=a6}else{if((a7|0)!=2){break}bq=bc-1|0;br=1}bj=a7+1|0;if((bj|0)<(br+S|0)){a7=bj;a6=br;bc=bq}else{Z=5655;break}}do{if((Z|0)==5655){Z=0;if((br|0)==0){if(!((a7|0)==5|(a7|0)==1)){break}}bc=a0+1|0;c[13898]=bc;a6=c[a1+(bc*40&-1)+36>>2]|0;L7756:do{if((a[a1+(bc*40&-1)|0]&1)!=0&(a6|0)>0){a5=c[10036]|0;bj=0;bs=0;bt=c[a1+(bc*40&-1)+32>>2]|0;while(1){if((a[bj+184456|0]|0)==(a[a5+(bj+bt|0)|0]|0)){bu=bt;bv=bs}else{if((bj|0)!=3){break L7756}bu=bt-1|0;bv=1}bw=bj+1|0;if((bw|0)<(bv+a6|0)){bj=bw;bs=bv;bt=bu}else{break}}if((bv|0)==0){if(!((bj|0)==2|(bj|0)==7)){break}}h[aU>>3]=1.0;h[aX>>3]=.5;c[13898]=a0+2;bd=a_;be=a$;break L7662}}while(0);a6=is(k)|0;bc=c[a6>>2]|0;if((bc|0)==1){bx=+(c[a6+8>>2]|0)}else if((bc|0)==2){bx=+h[a6+8>>3]}else if((bc|0)==3){bx=+uz(c[a6+8>>2]|0,0)}else{Z=5670;break L7660}if((c[aS>>2]|0)==3){uu(c[aT>>2]|0);c[aS>>2]=1}h[aU>>3]=bx;a6=c[13898]|0;L7777:do{if((c[8272]|0)>(a6|0)){bc=c[1054]|0;if((a[bc+(a6*40&-1)|0]&1)==0){break}a9=c[bc+(a6*40&-1)+36>>2]|0;bt=bc+(a6*40&-1)+32|0;bc=c[10036]|0;bs=0;while(1){if((bs|0)>=(a9|0)){break}if((a[bc+((c[bt>>2]|0)+bs|0)|0]|0)==(a[bs+148464|0]|0)){bs=bs+1|0}else{break L7777}}if((bs|0)!=1){break}c[13898]=a6+1;bt=is(j)|0;bc=c[bt>>2]|0;if((bc|0)==1){by=+(c[bt+8>>2]|0)}else if((bc|0)==2){by=+h[bt+8>>3]}else if((bc|0)==3){by=+uz(c[bt+8>>2]|0,0)}else{Z=5683;break L7660}if((c[aV>>2]|0)==3){uu(c[aW>>2]|0);c[aV>>2]=1}h[aX>>3]=by;bd=a_;be=a$;break L7662}}while(0);h[aX>>3]=bx*.5;bd=a_;be=a$;break L7662}}while(0);if(!((S|0)>0&(a4^1))){Z=5835;break}a7=c[10036]|0;a6=0;bt=0;bc=a3;while(1){if((a[a6+104840|0]|0)==(a[a7+(a6+bc|0)|0]|0)){bz=bc;bA=bt}else{if((a6|0)!=2){break}bz=bc-1|0;bA=1}a9=a6+1|0;if((a9|0)<(bA+S|0)){a6=a9;bt=bA;bc=bz}else{Z=5694;break}}do{if((Z|0)==5694){Z=0;if((bA|0)==0){if(!((a6|0)==1|(a6|0)==6)){break}}c[aP>>2]=-270;bc=a0+1|0;c[13898]=bc;if((c[8272]|0)<=(bc|0)){bd=a_;be=a$;break L7662}if((a[a1+(bc*40&-1)|0]&1)==0){bd=a_;be=a$;break L7662}bt=c[a1+(bc*40&-1)+36>>2]|0;a7=a1+(bc*40&-1)+32|0;bc=c[10036]|0;a9=0;while(1){if((a9|0)>=(bt|0)){break}if((a[bc+((c[a7>>2]|0)+a9|0)|0]|0)==(a[a9+163312|0]|0)){a9=a9+1|0}else{bd=a_;be=a$;break L7662}}if((a9|0)!=2){bd=a_;be=a$;break L7662}c[13898]=a0+2;a7=is(g)|0;bc=c[a7>>2]|0;if((bc|0)==2){bB=+h[a7+8>>3]}else if((bc|0)==3){bB=+uz(c[a7+8>>2]|0,0)}else if((bc|0)==1){bB=+(c[a7+8>>2]|0)}else{Z=5706;break L7660}if((c[aQ>>2]|0)==3){uu(c[aR>>2]|0);c[aQ>>2]=1}c[aP>>2]=~~bB;bd=a_;be=a$;break L7662}}while(0);if(a4){Z=5835;break}L7824:do{if((S|0)>0){a6=c[10036]|0;a7=0;bc=0;bt=a3;while(1){if((a[a7+104240|0]|0)==(a[a6+(a7+bt|0)|0]|0)){bC=bt;bD=bc}else{if((a7|0)!=4){break L7824}bC=bt-1|0;bD=1}bj=a7+1|0;if((bj|0)<(bD+S|0)){a7=bj;bc=bD;bt=bC}else{break}}if((bD|0)==0){if(!((a7|0)==3|(a7|0)==8)){break}}c[aP>>2]=0;c[13898]=a0+1;bd=a_;be=a$;break L7662}}while(0);if(!((S|0)>0&(a4^1))){Z=5835;break}bt=c[10036]|0;bc=0;a6=0;a9=a3;while(1){if((a[bc+152064|0]|0)==(a[bt+(bc+a9|0)|0]|0)){bE=a9;bF=a6}else{if((bc|0)!=3){break}bE=a9-1|0;bF=1}bj=bc+1|0;if((bj|0)<(bF+S|0)){bc=bj;a6=bF;a9=bE}else{Z=5726;break}}do{if((Z|0)==5726){Z=0;if((bF|0)==0){if(!((bc|0)==6|(bc|0)==2)){break}}c[13898]=a0+1;dl(aO,4);bd=a_;be=a$;break L7662}}while(0);if(!((S|0)>0&(a4^1))){Z=5835;break}bc=c[10036]|0;a9=0;a6=0;bt=a3;while(1){if((a[a9+153128|0]|0)==(a[bc+(a9+bt|0)|0]|0)){bG=bt;bH=a6}else{if((a9|0)!=5){break}bG=bt-1|0;bH=1}bj=a9+1|0;if((bj|0)<(bH+S|0)){a9=bj;a6=bH;bt=bG}else{Z=5735;break}}do{if((Z|0)==5735){Z=0;if((bH|0)==0){if(!((a9|0)==4|(a9|0)==8)){break}}uE(aJ|0,0,28);c[13898]=a0+1;c[aK>>2]=4;c[aL>>2]=4;c[aM>>2]=4;c[aN>>2]=c[aJ>>2];c[aN+4>>2]=c[aJ+4>>2];c[aN+8>>2]=c[aJ+8>>2];c[aN+12>>2]=c[aJ+12>>2];c[aN+16>>2]=c[aJ+16>>2];c[aN+20>>2]=c[aJ+20>>2];c[aN+24>>2]=c[aJ+24>>2];bd=a_;be=a$;break L7662}}while(0);if(a4){Z=5835;break}L7864:do{if((S|0)>0){a9=c[10036]|0;bt=0;a6=0;bc=a3;while(1){if((a[bt+149696|0]|0)==(a[a9+(bt+bc|0)|0]|0)){bI=bc;bJ=a6}else{if((bt|0)!=1){break L7864}bI=bc-1|0;bJ=1}bj=bt+1|0;if((bj|0)<(bJ+S|0)){bt=bj;a6=bJ;bc=bI}else{break}}if((bJ|0)==0){if(!((bt|0)==0|(bt|0)==4)){break}}c[aI>>2]=0;a[aH]=1;c[13898]=a0+1;bd=a_;be=a$;break L7662}}while(0);if(!((S|0)>0&(a4^1))){Z=5835;break}bc=c[10036]|0;a6=0;a9=0;a7=a3;while(1){if((a[a6+179896|0]|0)==(a[bc+(a6+a7|0)|0]|0)){bK=a7;bL=a9}else{if((a6|0)!=1){Z=5756;break}bK=a7-1|0;bL=1}bj=a6+1|0;if((bj|0)<(bL+S|0)){a6=bj;a9=bL;a7=bK}else{Z=5754;break}}do{if((Z|0)==5754){Z=0;if((bL|0)!=0){break}if(!((a6|0)==0|(a6|0)==6)){Z=5756}}}while(0);L7887:do{if((Z|0)==5756){Z=0;if(a4){Z=5835;break L7662}L7890:do{if((S|0)>0){a6=c[10036]|0;a7=0;a9=0;bc=a3;while(1){if((a[a7+149304|0]|0)==(a[a6+(a7+bc|0)|0]|0)){bM=bc;bN=a9}else{if((a7|0)!=1){break L7890}bM=bc-1|0;bN=1}bj=a7+1|0;if((bj|0)<(bN+S|0)){a7=bj;a9=bN;bc=bM}else{break}}if((bN|0)!=0){break L7887}if((a7|0)==0|(a7|0)==6){break L7887}}}while(0);if(!((S|0)>0&(a4^1))){Z=5835;break L7662}bt=c[10036]|0;bc=0;a9=0;a6=a3;while(1){if((a[bc+101272|0]|0)==(a[bt+(bc+a6|0)|0]|0)){bO=a6;bP=a9}else{if((bc|0)!=2){break}bO=a6-1|0;bP=1}bs=bc+1|0;if((bs|0)<(bP+S|0)){bc=bs;a9=bP;a6=bO}else{Z=5772;break}}do{if((Z|0)==5772){Z=0;if((bP|0)==0){if(!((bc|0)==1|(bc|0)==5)){break}}c[aI>>2]=2;a[aH]=1;c[13898]=a0+1;bd=a_;be=a$;break L7662}}while(0);if(a4){Z=5835;break L7662}L7915:do{if((S|0)>0){bc=c[10036]|0;a6=0;a9=0;bt=a3;while(1){if((a[a6+100712|0]|0)==(a[bc+(a6+bt|0)|0]|0)){bQ=bt;bR=a9}else{if((a6|0)!=5){break L7915}bQ=bt-1|0;bR=1}bs=a6+1|0;if((bs|0)<(bR+S|0)){a6=bs;a9=bR;bt=bQ}else{break}}if((bR|0)==0){if(!((a6|0)==4|(a6|0)==11)){break}}a[aH]=0;c[13898]=a0+1;bd=a_;be=a$;break L7662}}while(0);if(!((S|0)>0&(a4^1))){Z=5835;break L7662}bt=c[10036]|0;a9=0;bc=0;a7=a3;while(1){if((a[a9+100040|0]|0)==(a[bt+(a9+a7|0)|0]|0)){bS=a7;bT=bc}else{if((a9|0)!=5){break}bS=a7-1|0;bT=1}bs=a9+1|0;if((bs|0)<(bT+S|0)){a9=bs;bc=bT;a7=bS}else{Z=5791;break}}do{if((Z|0)==5791){Z=0;if((bT|0)==0){if(!((a9|0)==4|(a9|0)==12)){break}}a[aG]=1;c[13898]=a0+1;bd=a_;be=a$;break L7662}}while(0);if(a4){Z=5835;break L7662}L7942:do{if((S|0)>0){a9=c[10036]|0;a7=0;bc=0;bt=a3;while(1){if((a[a7+99600|0]|0)==(a[a9+(a7+bt|0)|0]|0)){bU=bt;bV=bc}else{if((a7|0)!=7){break L7942}bU=bt-1|0;bV=1}bs=a7+1|0;if((bs|0)<(bV+S|0)){a7=bs;bc=bV;bt=bU}else{break}}if((bV|0)==0){if(!((a7|0)==6|(a7|0)==14)){break}}a[aG]=0;c[13898]=a0+1;bd=a_;be=a$;break L7662}}while(0);if(!((S|0)>0&(a4^1))){Z=5835;break L7662}bt=c[10036]|0;bc=0;a9=0;a6=a3;while(1){if((a[bc+175984|0]|0)==(a[bt+(bc+a6|0)|0]|0)){bW=a6;bX=a9}else{if((bc|0)!=1){Z=5835;break L7662}bW=a6-1|0;bX=1}bs=bc+1|0;if((bs|0)<(bX+S|0)){bc=bs;a9=bX;a6=bW}else{break}}if((bX|0)==0){if(!((bc|0)==4|(bc|0)==0)){Z=5835;break L7662}}bY=a0+1|0;c[13898]=bY;a6=(a[a1+(bY*40&-1)|0]&1)==0;if(a6){Z=5814}else{a9=a[(c[10036]|0)+(c[a1+(bY*40&-1)+32>>2]|0)|0]|0;if(!((a9<<24>>24|0)==39|(a9<<24>>24|0)==34)){Z=5814}}if((Z|0)==5814){Z=0;a9=c[10810]|0;if((a9|0)==0){Z=6274;break L7660}bt=c[8272]|0;bs=a1+(bY*40&-1)+36|0;bj=a1+(bY*40&-1)+32|0;a5=c[10036]|0;bw=a9;L7971:while(1){a9=c[bw+4>>2]|0;L7973:do{if(!((bt|0)<=(bY|0)|a6)){bZ=c[bs>>2]|0;b_=0;while(1){if((b_|0)>=(bZ|0)){break}if((a[a5+((c[bj>>2]|0)+b_|0)|0]|0)==(a[a9+b_|0]|0)){b_=b_+1|0}else{break L7973}}if((a[a9+b_|0]|0)==0){break L7971}}}while(0);a9=c[bw>>2]|0;if((a9|0)==0){Z=6272;break L7660}else{bw=a9}}if((a[bw+8|0]&1)!=0){Z=6271;break L7660}if((c[bw+16>>2]|0)!=3){Z=6273;break L7660}}uu(c[aD>>2]|0);c[aD>>2]=0;bj=c[13898]|0;L7983:do{if((bj|0)<(c[8272]|0)){a5=c[1054]|0;L7985:do{if((a[a5+(bj*40&-1)|0]&1)!=0){bs=c[a5+(bj*40&-1)+36>>2]|0;a6=a5+(bj*40&-1)+32|0;bt=c[10036]|0;bc=0;while(1){if((bc|0)>=(bs|0)){break}if((a[bt+((c[a6>>2]|0)+bc|0)|0]|0)==(a[bc+103664|0]|0)){bc=bc+1|0}else{break L7985}}if((bc|0)==1){b$=0;break L7983}}}while(0);a[14176]=1;is(f);a[14176]=0;if((c[aE>>2]|0)==3){b$=c[aF>>2]|0;break}else{c[13898]=bj;b$=0;break}}else{b$=0}}while(0);c[aD>>2]=b$;bd=a_;be=a$;break L7662}}while(0);c[aI>>2]=1;a[aH]=1;c[13898]=a0+1;bd=a_;be=a$}else{Z=5835}}while(0);L7997:do{if((Z|0)==5835){Z=0;bj=c[8272]|0;bw=(bj|0)>(a0|0);L7999:do{if(bw){if(a4){break}a5=c[10036]|0;a6=0;while(1){if((a6|0)>=(S|0)){Z=5840;break}if((a[a5+(a3+a6|0)|0]|0)==(a[a6+97960|0]|0)){a6=a6+1|0}else{break}}do{if((Z|0)==5840){Z=0;if((a6|0)!=6){break}b0=a0+1|0;c[13898]=b0;if((b0|0)>=(bj|0)){b1=b0;Z=6280;break L7660}L8009:do{if((a[a1+(b0*40&-1)|0]&1)!=0){bt=c[a1+(b0*40&-1)+36>>2]|0;bs=a1+(b0*40&-1)+32|0;b_=0;while(1){if((b_|0)>=(bt|0)){break}if((a[a5+((c[bs>>2]|0)+b_|0)|0]|0)==(a[b_+103664|0]|0)){b_=b_+1|0}else{break L8009}}if((b_|0)==1){b1=b0;Z=6277;break L7660}}}while(0);a[14176]=1;is(e);a[14176]=0;if((c[R>>2]|0)!=3){Z=5848;break L7660}bs=c[Q>>2]|0;if((bs|0)==0){Z=5850;break L7660}uF(U|0,bs|0,51);uu(bs);bs=a8(U|0,37)|0;do{if((bs|0)==0){b2=0}else{bt=bs+1|0;L8020:do{if((bt|0)==0){b3=0}else{bc=bt;while(1){a9=a[bc]|0;if(!((a9<<24>>24|0)==32|(a9<<24>>24|0)==45|(a9<<24>>24|0)==43|(a9<<24>>24|0)==35)){b3=bc;break L8020}a9=bc+1|0;if((a9|0)==0){b3=0;break}else{bc=a9}}}}while(0);while(1){b4=a[b3]|0;if(!(((b4&255)-48|0)>>>0<10|b4<<24>>24==46)){break}b3=b3+1|0}if((b4-102&255)<2){b2=1;break}b2=b4<<24>>24==101&1}}while(0);a[_]=b2;bd=a_;be=a$;break L7997}}while(0);if(!bw){Z=5867;break}if(a4){break}a5=c[10036]|0;a6=0;while(1){if((a6|0)>=(S|0)){break}if((a[a5+(a3+a6|0)|0]|0)==(a[a6+143040|0]|0)){a6=a6+1|0}else{Z=5867;break L7999}}if((a6|0)==2){Z=5875}else{Z=5867}}else{Z=5867}}while(0);L8037:do{if((Z|0)==5867){Z=0;L8039:do{if((S|0)>0&(a4^1)){a5=c[10036]|0;bs=0;bt=0;b_=a3;while(1){if((a[bs+142856|0]|0)==(a[a5+(bs+b_|0)|0]|0)){b5=b_;b6=bt}else{if((bs|0)!=4){break}b5=b_-1|0;b6=1}bc=bs+1|0;if((bc|0)<(b6+S|0)){bs=bc;bt=b6;b_=b5}else{Z=5873;break}}if((Z|0)==5873){Z=0;if((b6|0)!=0){Z=5875;break L8037}if((bs|0)==3|(bs|0)==9){Z=5875;break L8037}}if(!((S|0)>0&(a4^1))){break}b_=c[10036]|0;bt=0;a5=0;bc=a3;while(1){if((a[bt+96704|0]|0)==(a[b_+(bt+bc|0)|0]|0)){b7=bc;b8=a5}else{if((bt|0)!=2){break L8039}b7=bc-1|0;b8=1}a9=bt+1|0;if((a9|0)<(b8+S|0)){bt=a9;a5=b8;bc=b7}else{break}}if((b8|0)==0){if(!((bt|0)==8|(bt|0)==1)){break}}c[13898]=a0+1;if((a[T]&1)==0){bc=c[aw>>2]|0;if((bc|0)!=0){a5=bc;while(1){bc=c[a5+16>>2]|0;b_=c[a5+8>>2]|0;if((b_|0)!=0){uu(b_)}uu(a5);if((bc|0)==0){break}else{a5=bc}}}c[aw>>2]=0}c[ax>>2]=1;bd=a_;be=a$;break L7997}}while(0);if(!bw){bd=a_;be=a$;break L7997}if(a4){break}a6=c[10036]|0;a5=0;while(1){if((a5|0)>=(S|0)){Z=5896;break}if((a[a6+(a3+a5|0)|0]|0)==(a[a5+186440|0]|0)){a5=a5+1|0}else{break}}do{if((Z|0)==5896){Z=0;if((a5|0)!=3){break}c[13898]=a0+1;a[T]=1;bd=a_;be=a$;break L7997}}while(0);if(!bw){bd=a_;be=a$;break L7997}if(a4){break}a5=c[10036]|0;a6=0;while(1){if((a6|0)>=(S|0)){Z=5903;break}if((a[a5+(a3+a6|0)|0]|0)==(a[a6+103664|0]|0)){a6=a6+1|0}else{break}}if((Z|0)==5903){Z=0;if((a6|0)==1){bd=a_;be=a$;break L7997}}if(a4){break}a5=c[10036]|0;bt=0;while(1){if((bt|0)>=(S|0)){break}if((a[a5+(a3+bt|0)|0]|0)==(a[bt+199040|0]|0)){bt=bt+1|0}else{break L8037}}if((bt|0)!=1){break}a6=a0+1|0;c[13898]=a6;L8096:do{if((bj|0)>(a6|0)){if((a[a1+(a6*40&-1)|0]&1)==0){break}bc=c[a1+(a6*40&-1)+36>>2]|0;b_=a1+(a6*40&-1)+32|0;bs=0;while(1){if((bs|0)>=(bc|0)){break}if((a[a5+((c[b_>>2]|0)+bs|0)|0]|0)==(a[bs+131272|0]|0)){bs=bs+1|0}else{break L8096}}if((bs|0)!=1){break}c[13898]=a0+2;bd=a_;be=a$;break L7997}}while(0);do{if((a[T]&1)==0){a5=c[6074]|0;if((a5|0)!=0){if((c[a5+32>>2]|0)!=0){b9=a6;ca=bj;break}}a5=c[$>>2]|0;if((a5|0)==0){cb=a6;cc=bj}else{bt=a5;while(1){a5=c[bt+16>>2]|0;b_=c[bt+8>>2]|0;if((b_|0)!=0){uu(b_)}uu(bt);if((a5|0)==0){break}else{bt=a5}}cb=c[13898]|0;cc=c[8272]|0}c[$>>2]=0;b9=cb;ca=cc}else{b9=a6;ca=bj}}while(0);L8119:do{if((b9|0)<(ca|0)){a6=b9;bt=ca;bs=c[1054]|0;while(1){a5=(a[bs+(a6*40&-1)|0]&1)==0;L8123:do{if(!a5){b_=c[bs+(a6*40&-1)+36>>2]|0;bc=bs+(a6*40&-1)+32|0;a9=c[10036]|0;a7=0;while(1){if((a7|0)>=(b_|0)){break}if((a[a9+((c[bc>>2]|0)+a7|0)|0]|0)==(a[a7+103664|0]|0)){a7=a7+1|0}else{break L8123}}if((a7|0)==1){cd=a6;ce=bt;break L8119}}}while(0);L8130:do{if((a6|0)<(bt|0)){L8132:do{if(!a5){bc=c[bs+(a6*40&-1)+36>>2]|0;a9=bs+(a6*40&-1)+32|0;b_=c[10036]|0;bZ=0;while(1){if((bZ|0)>=(bc|0)){break}if((a[b_+((c[a9>>2]|0)+bZ|0)|0]|0)==(a[bZ+103664|0]|0)){bZ=bZ+1|0}else{break L8132}}if((bZ|0)==1){cf=0;Z=5952;break L8130}}}while(0);a[14176]=1;is(o);a[14176]=0;if((c[aa>>2]|0)!=3){c[13898]=a6;cf=0;Z=5952;break}a7=c[ab>>2]|0;if((a7|0)==0){cf=0;Z=5952;break}if((c[ac>>2]|0)!=1){cg=a7;Z=5977;break}a9=c[13898]|0;if((c[8272]|0)<=(a9|0)){cf=a7;Z=5952;break}b_=c[1054]|0;if((a[b_+(a9*40&-1)|0]&1)==0){cf=a7;Z=5952;break}bc=c[b_+(a9*40&-1)+36>>2]|0;ch=b_+(a9*40&-1)+32|0;a9=c[10036]|0;b_=0;while(1){if((b_|0)>=(bc|0)){Z=5947;break}if((a[a9+((c[ch>>2]|0)+b_|0)|0]|0)==(a[b_+148464|0]|0)){b_=b_+1|0}else{ci=0;Z=5948;break}}if((Z|0)==5947){Z=0;if((b_|0)!=1){ci=0;Z=5948}}if((Z|0)==5948){while(1){Z=0;if((ci|0)>=(bc|0)){break}if((a[a9+((c[ch>>2]|0)+ci|0)|0]|0)==(a[ci+131272|0]|0)){ci=ci+1|0;Z=5948}else{cf=a7;Z=5952;break L8130}}if((ci|0)!=1){cf=a7;Z=5952;break}}c[13898]=a6;uu(a7);cf=0;Z=5952}else{cf=0;Z=5952}}while(0);L8157:do{if((Z|0)==5952){Z=0;if((c[ac>>2]|0)!=1){cg=cf;Z=5977;break}a5=c[13898]|0;ch=c[1054]|0;a9=(a[ch+(a5*40&-1)|0]&1)==0;if(a9){Z=5955}else{bc=c[10036]|0;b_=a[bc+(c[ch+(a5*40&-1)+32>>2]|0)|0]|0;if((b_<<24>>24|0)==39|(b_<<24>>24|0)==34){cj=bc}else{Z=5955}}if((Z|0)==5955){Z=0;bc=c[10810]|0;if((bc|0)==0){cg=cf;Z=5977;break}b_=ch+(a5*40&-1)+36|0;ck=ch+(a5*40&-1)+32|0;cl=c[10036]|0;cm=(c[8272]|0)<=(a5|0)|a9;cn=bc;L8165:while(1){bc=c[cn+4>>2]|0;L8167:do{if(!cm){co=c[b_>>2]|0;cp=0;while(1){if((cp|0)>=(co|0)){break}if((a[cl+((c[ck>>2]|0)+cp|0)|0]|0)==(a[bc+cp|0]|0)){cp=cp+1|0}else{break L8167}}if((a[bc+cp|0]|0)==0){break L8165}}}while(0);bc=c[cn>>2]|0;if((bc|0)==0){cg=cf;Z=5977;break L8157}else{cn=bc}}if((a[cn+8|0]&1)!=0){cg=cf;Z=5977;break}if((c[cn+16>>2]|0)==3){cj=cl}else{cg=cf;Z=5977;break}}L8177:do{if((a5|0)<(c[8272]|0)){L8179:do{if(!a9){ck=c[ch+(a5*40&-1)+36>>2]|0;b_=ch+(a5*40&-1)+32|0;cm=0;while(1){if((cm|0)>=(ck|0)){break}if((a[cj+((c[b_>>2]|0)+cm|0)|0]|0)==(a[cm+103664|0]|0)){cm=cm+1|0}else{break L8179}}if((cm|0)==1){cq=0;break L8177}}}while(0);a[14176]=1;is(n);a[14176]=0;if((c[ad>>2]|0)==3){cq=c[ae>>2]|0;break}else{c[13898]=a5;cq=0;break}}else{cq=0}}while(0);if((t1(cq,af,p,q)|0)==0){cr=0.0}else{cs=+t2(p);cr=cs+ +h[q>>3]}uu(cq);ct=cr;cu=cf}}while(0);do{if((Z|0)==5977){Z=0;a5=is(m)|0;ch=c[a5>>2]|0;if((ch|0)==1){cv=+(c[a5+8>>2]|0)}else if((ch|0)==2){cv=+h[a5+8>>3]}else if((ch|0)==3){cv=+uz(c[a5+8>>2]|0,0)}else{Z=5981;break L7660}if((c[ag>>2]|0)!=3){ct=cv;cu=cg;break}uu(c[ah>>2]|0);c[ag>>2]=1;ct=cv;cu=cg}}while(0);a5=c[13898]|0;L8202:do{if((a5|0)<(c[8272]|0)){ch=c[1054]|0;L8204:do{if((a[ch+(a5*40&-1)|0]&1)!=0){a9=c[ch+(a5*40&-1)+36>>2]|0;cl=ch+(a5*40&-1)+32|0;cn=c[10036]|0;b_=0;while(1){if((b_|0)>=(a9|0)){Z=5989;break}if((a[cn+((c[cl>>2]|0)+b_|0)|0]|0)==(a[b_+103664|0]|0)){b_=b_+1|0}else{cw=0;break}}if((Z|0)==5989){Z=0;if((b_|0)==1){cx=0;break L8202}else{cw=0}}while(1){if((cw|0)>=(a9|0)){Z=5992;break}if((a[cn+((c[cl>>2]|0)+cw|0)|0]|0)==(a[cw+148464|0]|0)){cw=cw+1|0}else{cy=0;break}}if((Z|0)==5992){Z=0;if((cw|0)==1){cx=0;break L8202}else{cy=0}}while(1){if((cy|0)>=(a9|0)){break}if((a[cn+((c[cl>>2]|0)+cy|0)|0]|0)==(a[cy+131272|0]|0)){cy=cy+1|0}else{break L8204}}if((cy|0)==1){cx=0;break L8202}}}while(0);ch=is(l)|0;cl=c[ch>>2]|0;if((cl|0)==1){cz=+(c[ch+8>>2]|0)}else if((cl|0)==2){cz=+h[ch+8>>3]}else if((cl|0)==3){cz=+uz(c[ch+8>>2]|0,0)}else{Z=6e3;break L7660}if((c[ai>>2]|0)==3){uu(c[aj>>2]|0);c[ai>>2]=1}cx=~~cz}else{cx=0}}while(0);dp(b,cu,ct,cx);uu(cu);a5=c[13898]|0;ch=c[8272]|0;if((a5|0)>=(ch|0)){cd=a5;ce=ch;break L8119}cl=c[1054]|0;if((a[cl+(a5*40&-1)|0]&1)==0){cd=a5;ce=ch;break L8119}cn=c[cl+(a5*40&-1)+36>>2]|0;a9=cl+(a5*40&-1)+32|0;b_=c[10036]|0;ck=0;while(1){if((ck|0)>=(cn|0)){Z=6009;break}if((a[b_+((c[a9>>2]|0)+ck|0)|0]|0)==(a[ck+103664|0]|0)){ck=ck+1|0}else{cA=0;break}}if((Z|0)==6009){Z=0;if((ck|0)==1){cd=a5;ce=ch;break L8119}else{cA=0}}while(1){if((cA|0)>=(cn|0)){break}if((a[b_+((c[a9>>2]|0)+cA|0)|0]|0)==(a[cA+148464|0]|0)){cA=cA+1|0}else{cd=a5;ce=ch;break L8119}}if((cA|0)!=1){cd=a5;ce=ch;break L8119}a9=a5+1|0;c[13898]=a9;if((a9|0)<(ch|0)){a6=a9;bt=ch;bs=cl}else{cd=a9;ce=ch;break}}}else{cd=b9;ce=ca}}while(0);if((cd|0)>=(ce|0)){Z=6023;break L7660}bs=c[1054]|0;if((a[bs+(cd*40&-1)|0]&1)==0){Z=6023;break L7660}bt=c[bs+(cd*40&-1)+36>>2]|0;a6=bs+(cd*40&-1)+32|0;bs=c[10036]|0;a9=0;while(1){if((a9|0)>=(bt|0)){Z=6019;break}if((a[bs+((c[a6>>2]|0)+a9|0)|0]|0)==(a[a9+103664|0]|0)){a9=a9+1|0}else{cB=0;break}}if((Z|0)==6019){Z=0;if((a9|0)==1){Z=6023;break L7660}else{cB=0}}while(1){if((cB|0)>=(bt|0)){break}if((a[bs+((c[a6>>2]|0)+cB|0)|0]|0)==(a[cB+131272|0]|0)){cB=cB+1|0}else{Z=6023;break L7660}}if((cB|0)!=1){Z=6023;break L7660}c[13898]=cd+1;bd=a_;be=a$;break L7997}}while(0);if((Z|0)==5875){Z=0;hI(aB,aC);bd=a_;be=a$;break}L8258:do{if((c[ac>>2]|0)==1){if(a4){Z=6033}else{bj=c[10036]|0;bw=a[bj+a3|0]|0;if((bw<<24>>24|0)==39|(bw<<24>>24|0)==34){cC=bj;Z=6043}else{Z=6033}}if((Z|0)==6033){Z=0;bj=c[10810]|0;if((bj|0)==0){Z=6053;break}bw=c[10036]|0;a6=bj;L8265:while(1){bj=c[a6+4>>2]|0;L8267:do{if(!a4){bs=0;while(1){if((bs|0)>=(S|0)){break}if((a[bw+(a3+bs|0)|0]|0)==(a[bj+bs|0]|0)){bs=bs+1|0}else{break L8267}}if((a[bj+bs|0]|0)==0){break L8265}}}while(0);bj=c[a6>>2]|0;if((bj|0)==0){Z=6053;break L8258}else{a6=bj}}if((a[a6+8|0]&1)!=0){Z=6053;break}if((c[a6+16>>2]|0)!=3){Z=6053;break}if(a4){Z=6047}else{cC=bw;Z=6043}}L8276:do{if((Z|0)==6043){Z=0;bj=0;while(1){if((bj|0)>=(S|0)){break}if((a[cC+(a3+bj|0)|0]|0)==(a[bj+103664|0]|0)){bj=bj+1|0}else{Z=6047;break L8276}}if((bj|0)==1){cD=0}else{Z=6047}}}while(0);do{if((Z|0)==6047){Z=0;a[14176]=1;is(x);a[14176]=0;if((c[ak>>2]|0)==3){cD=c[al>>2]|0;break}else{c[13898]=a0;cD=0;break}}}while(0);if((t1(cD,af,y,z)|0)==0){cE=0.0}else{cs=+t2(y);cE=cs+ +h[z>>3]}uu(cD);cF=cE}else{Z=6053}}while(0);do{if((Z|0)==6053){Z=0;bw=is(w)|0;a6=c[bw>>2]|0;if((a6|0)==1){cG=+(c[bw+8>>2]|0)}else if((a6|0)==2){cG=+h[bw+8>>3]}else if((a6|0)==3){cG=+uz(c[bw+8>>2]|0,0)}else{Z=6057;break L7660}if((c[am>>2]|0)!=3){cF=cG;break}uu(c[an>>2]|0);c[am>>2]=1;cF=cG}}while(0);bw=c[13898]|0;a6=c[8272]|0;L8300:do{if((a6|0)>(bw|0)){ch=c[1054]|0;if((a[ch+(bw*40&-1)|0]&1)==0){cH=-8.988465674311579e+307;cI=cF;cJ=8.988465674311579e+307;break}cl=c[ch+(bw*40&-1)+36>>2]|0;a5=ch+(bw*40&-1)+32|0;bt=c[10036]|0;a9=0;while(1){if((a9|0)>=(cl|0)){break}if((a[bt+((c[a5>>2]|0)+a9|0)|0]|0)==(a[a9+148464|0]|0)){a9=a9+1|0}else{cH=-8.988465674311579e+307;cI=cF;cJ=8.988465674311579e+307;break L8300}}if((a9|0)!=1){cH=-8.988465674311579e+307;cI=cF;cJ=8.988465674311579e+307;break}cK=bw+1|0;c[13898]=cK;L8308:do{if((c[ac>>2]|0)==1){a5=(a[ch+(cK*40&-1)|0]&1)==0;if(a5){Z=6069}else{cl=a[bt+(c[ch+(cK*40&-1)+32>>2]|0)|0]|0;if(!((cl<<24>>24|0)==39|(cl<<24>>24|0)==34)){Z=6069}}if((Z|0)==6069){Z=0;cl=c[10810]|0;if((cl|0)==0){Z=6091;break}b_=ch+(cK*40&-1)+36|0;cn=ch+(cK*40&-1)+32|0;ck=(a6|0)<=(cK|0)|a5;cp=cl;L8315:while(1){cl=c[cp+4>>2]|0;L8317:do{if(!ck){a7=c[b_>>2]|0;bc=0;while(1){if((bc|0)>=(a7|0)){break}if((a[bt+((c[cn>>2]|0)+bc|0)|0]|0)==(a[cl+bc|0]|0)){bc=bc+1|0}else{break L8317}}if((a[cl+bc|0]|0)==0){break L8315}}}while(0);cl=c[cp>>2]|0;if((cl|0)==0){Z=6091;break L8308}else{cp=cl}}if((a[cp+8|0]&1)!=0){Z=6091;break}if((c[cp+16>>2]|0)!=3){Z=6091;break}}L8327:do{if((cK|0)<(a6|0)){L8329:do{if(!a5){cn=c[ch+(cK*40&-1)+36>>2]|0;b_=ch+(cK*40&-1)+32|0;ck=0;while(1){if((ck|0)>=(cn|0)){break}if((a[bt+((c[b_>>2]|0)+ck|0)|0]|0)==(a[ck+103664|0]|0)){ck=ck+1|0}else{break L8329}}if((ck|0)==1){cL=0;break L8327}}}while(0);a[14176]=1;is(u);a[14176]=0;if((c[ao>>2]|0)==3){cL=c[ap>>2]|0;break}else{c[13898]=cK;cL=0;break}}else{cL=0}}while(0);if((t1(cL,af,A,B)|0)==0){cM=0.0}else{cs=+t2(A);cM=cs+ +h[B>>3]}uu(cL);cN=cM}else{Z=6091}}while(0);do{if((Z|0)==6091){Z=0;bt=is(t)|0;ch=c[bt>>2]|0;if((ch|0)==1){cO=+(c[bt+8>>2]|0)}else if((ch|0)==2){cO=+h[bt+8>>3]}else if((ch|0)==3){cO=+uz(c[bt+8>>2]|0,0)}else{Z=6095;break L7660}if((c[aq>>2]|0)!=3){cN=cO;break}uu(c[ar>>2]|0);c[aq>>2]=1;cN=cO}}while(0);bt=c[13898]|0;ch=c[8272]|0;L8352:do{if((ch|0)>(bt|0)){a9=c[1054]|0;if((a[a9+(bt*40&-1)|0]&1)==0){cP=8.988465674311579e+307;break}a5=c[a9+(bt*40&-1)+36>>2]|0;cp=a9+(bt*40&-1)+32|0;b_=c[10036]|0;cn=0;while(1){if((cn|0)>=(a5|0)){break}if((a[b_+((c[cp>>2]|0)+cn|0)|0]|0)==(a[cn+148464|0]|0)){cn=cn+1|0}else{cP=8.988465674311579e+307;break L8352}}if((cn|0)!=1){cP=8.988465674311579e+307;break}cp=bt+1|0;c[13898]=cp;L8360:do{if((c[ac>>2]|0)==1){a5=(a[a9+(cp*40&-1)|0]&1)==0;if(a5){Z=6107}else{bc=a[b_+(c[a9+(cp*40&-1)+32>>2]|0)|0]|0;if(!((bc<<24>>24|0)==39|(bc<<24>>24|0)==34)){Z=6107}}if((Z|0)==6107){Z=0;bc=c[10810]|0;if((bc|0)==0){break}bj=a9+(cp*40&-1)+36|0;cl=a9+(cp*40&-1)+32|0;bs=(ch|0)<=(cp|0)|a5;a7=bc;L8367:while(1){bc=c[a7+4>>2]|0;L8369:do{if(!bs){bZ=c[bj>>2]|0;co=0;while(1){if((co|0)>=(bZ|0)){break}if((a[b_+((c[cl>>2]|0)+co|0)|0]|0)==(a[bc+co|0]|0)){co=co+1|0}else{break L8369}}if((a[bc+co|0]|0)==0){break L8367}}}while(0);bc=c[a7>>2]|0;if((bc|0)==0){break L8360}else{a7=bc}}if((a[a7+8|0]&1)!=0){break}if((c[a7+16>>2]|0)!=3){break}}L8379:do{if((cp|0)<(ch|0)){L8381:do{if(!a5){cl=c[a9+(cp*40&-1)+36>>2]|0;bj=a9+(cp*40&-1)+32|0;bs=0;while(1){if((bs|0)>=(cl|0)){break}if((a[b_+((c[bj>>2]|0)+bs|0)|0]|0)==(a[bs+103664|0]|0)){bs=bs+1|0}else{break L8381}}if((bs|0)==1){cQ=0;break L8379}}}while(0);a[14176]=1;is(s);a[14176]=0;if((c[as>>2]|0)==3){cQ=c[at>>2]|0;break}else{c[13898]=cp;cQ=0;break}}else{cQ=0}}while(0);if((t1(cQ,af,C,D)|0)==0){cR=0.0}else{cs=+t2(C);cR=cs+ +h[D>>3]}uu(cQ);cP=cR;break L8352}}while(0);cp=is(r)|0;b_=c[cp>>2]|0;if((b_|0)==1){cS=+(c[cp+8>>2]|0)}else if((b_|0)==2){cS=+h[cp+8>>3]}else if((b_|0)==3){cS=+uz(c[cp+8>>2]|0,0)}else{Z=6133;break L7660}if((c[au>>2]|0)!=3){cP=cS;break}uu(c[av>>2]|0);c[au>>2]=1;cP=cS}else{cP=8.988465674311579e+307}}while(0);if(!(cF>=cP|cN>0.0)){Z=6137;break L7660}ch=cF>cP;if(!(cN<0.0|ch^1)){Z=6139;break L7660}if(!ch){cH=cF;cI=cN;cJ=cP;break}cH=cF+cN*+O(+((cP*1.01-cF)/cN));cI=-0.0-cN;cJ=cF}else{cH=-8.988465674311579e+307;cI=cF;cJ=8.988465674311579e+307}}while(0);if((a[T]&1)==0){a6=c[aw>>2]|0;if((a6|0)!=0){bw=a6;while(1){a6=c[bw+16>>2]|0;ch=c[bw+8>>2]|0;if((ch|0)!=0){uu(ch)}uu(bw);if((a6|0)==0){break}else{bw=a6}}}c[aw>>2]=0}c[ax>>2]=2;h[ay>>3]=cH;h[az>>3]=cI;h[aA>>3]=cJ;bd=a_;be=a$}}while(0);cT=c[13898]|0;if((cT|0)>=(c[8272]|0)){Z=6155;break}a3=c[1054]|0;S=a[a3+(cT*40&-1)|0]|0;if((S&1)==0){a_=bd;a$=be;a0=cT;a1=a3;a2=S;continue}a4=c[a3+(cT*40&-1)+36>>2]|0;bw=a3+(cT*40&-1)+32|0;a6=c[10036]|0;ch=0;while(1){if((ch|0)>=(a4|0)){break}if((a[a6+((c[bw>>2]|0)+ch|0)|0]|0)==(a[ch+103664|0]|0)){ch=ch+1|0}else{a_=bd;a$=be;a0=cT;a1=a3;a2=S;continue L7660}}if((ch|0)==1){Z=6155;break}else{a_=bd;a$=be;a0=cT;a1=a3;a2=S}}if((Z|0)==5670){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==5706){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6271){uf(bY,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6272){uf(bY,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6273){uf(bY,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6274){uf(bY,98544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6277){uf(b1,97288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6280){uf(b1,97288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6e3){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6155){a2=c[aZ>>2]|0;if((a2&3|0)!=0|bd){P=cT;break}c[aZ>>2]=a2|1;if(be){P=cT;break}if((b-1|0)>>>0>=3){P=cT;break}c[aZ>>2]=a2|5;P=cT;break}else if((Z|0)==6023){a2=c[$>>2]|0;if((a2|0)==0){cU=cd;c[$>>2]=0;uf(cU,91952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{cV=a2}while(1){a2=c[cV+16>>2]|0;a1=c[cV+8>>2]|0;if((a1|0)!=0){uu(a1)}uu(cV);if((a2|0)==0){break}else{cV=a2}}cU=c[13898]|0;c[$>>2]=0;uf(cU,91952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==5848){c[13898]=b0;b1=b0;uf(b1,97288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==5850){b1=c[13898]|0;uf(b1,97288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==5981){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==5683){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6095){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6057){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6133){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6137){uf(cK,93560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Z|0)==6139){uf(cK,92744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);cK=c[1054]|0;b1=c[cK+(P*40&-1)+36>>2]|0;b0=c[cK+(P*40&-1)+32>>2]|0;L8460:do{if((a[cK+(P*40&-1)|0]&1)==0){cW=P}else{if((b1|0)>0){cU=c[10036]|0;cV=0;cd=0;cT=b0;while(1){be=a[F+cV|0]|0;if(be<<24>>24==(a[cU+(cV+cT|0)|0]|0)){cX=cT;cY=cd}else{if(be<<24>>24!=36){cW=P;break L8460}cX=cT-1|0;cY=1}cZ=cV+1|0;if((cZ|0)<(cY+b1|0)){cV=cZ;cd=cY;cT=cX}else{break}}if((cY|0)==0){c_=cZ;Z=6167}}else{c_=0;Z=6167}if((Z|0)==6167){cT=a[F+c_|0]|0;if(!((cT<<24>>24|0)==36|(cT<<24>>24|0)==0)){cW=P;break}}cT=64916+(b*688&-1)|0;c[cT>>2]=c[cT>>2]&-4;cT=P+1|0;c[13898]=cT;cW=cT}}while(0);a[K]=a[95856]|0;a[K+1|0]=a[95857|0]|0;a[K+2|0]=a[95858|0]|0;a[K+3|0]=a[95859|0]|0;a[K+4|0]=a[95860|0]|0;a[K+5|0]=a[95861|0]|0;a[K+6|0]=a[95862|0]|0;P=c[cK+(cW*40&-1)+36>>2]|0;c_=c[cK+(cW*40&-1)+32>>2]|0;cZ=a[cK+(cW*40&-1)|0]|0;L8475:do{if((cZ&1)==0){c$=cW;c0=cK;c1=P;c2=c_;c3=cZ}else{if((P|0)>0){cY=c[10036]|0;cX=0;b1=0;b0=c_;while(1){cT=a[F+(cX+2|0)|0]|0;if(cT<<24>>24==(a[cY+(cX+b0|0)|0]|0)){c4=b0;c5=b1}else{if(cT<<24>>24!=36){c$=cW;c0=cK;c1=P;c2=c_;c3=cZ;break L8475}c4=b0-1|0;c5=1}c6=cX+1|0;if((c6|0)<(c5+P|0)){cX=c6;b1=c5;b0=c4}else{break}}if((c5|0)==0){c7=c6;Z=6177}}else{c7=0;Z=6177}if((Z|0)==6177){b0=a[F+(c7+2|0)|0]|0;if(!((b0<<24>>24|0)==36|(b0<<24>>24|0)==0)){c$=cW;c0=cK;c1=P;c2=c_;c3=cZ;break}}if((a[64976+(b*688&-1)|0]&1)==0){b0=64944+(b*688&-1)|0;b1=c[b0>>2]|0;if((b1|0)==0){c8=cW;c9=cK}else{cX=b1;while(1){b1=c[cX+16>>2]|0;cY=c[cX+8>>2]|0;if((cY|0)!=0){uu(cY)}uu(cX);if((b1|0)==0){break}else{cX=b1}}c8=c[13898]|0;c9=c[1054]|0}c[b0>>2]=0;da=c8;db=c9}else{da=cW;db=cK}c[64920+(b*688&-1)>>2]=4;cX=da+1|0;c[13898]=cX;c$=cX;c0=db;c1=c[db+(cX*40&-1)+36>>2]|0;c2=c[db+(cX*40&-1)+32>>2]|0;c3=a[db+(cX*40&-1)|0]|0}}while(0);L8501:do{if((c3&1)==0){dc=c$}else{if((c1|0)>0){db=c[10036]|0;da=0;cK=0;cW=c2;while(1){c9=a[F+da|0]|0;if(c9<<24>>24==(a[db+(da+cW|0)|0]|0)){dd=cW;de=cK}else{if(c9<<24>>24!=36){dc=c$;break L8501}dd=cW-1|0;de=1}df=da+1|0;if((df|0)<(de+c1|0)){da=df;cK=de;cW=dd}else{break}}if((de|0)==0){dg=df;Z=6194}}else{dg=0;Z=6194}if((Z|0)==6194){cW=a[F+dg|0]|0;if(!((cW<<24>>24|0)==36|(cW<<24>>24|0)==0)){dc=c$;break}}c[64920+(b*688&-1)>>2]=1;cW=c$+1|0;c[13898]=cW;dc=cW}}while(0);a[K]=a[95384]|0;a[K+1|0]=a[95385|0]|0;a[K+2|0]=a[95386|0]|0;a[K+3|0]=a[95387|0]|0;a[K+4|0]=a[95388|0]|0;a[K+5|0]=a[95389|0]|0;a[K+6|0]=a[95390|0]|0;K=c[c0+(dc*40&-1)+36>>2]|0;c$=c[c0+(dc*40&-1)+32>>2]|0;dg=a[c0+(dc*40&-1)|0]|0;L8516:do{if((dg&1)==0){dh=dc;di=K;dj=c$;dk=dg}else{if((K|0)>0){df=c[10036]|0;de=0;dd=0;c1=c$;while(1){c2=a[F+(de+2|0)|0]|0;if(c2<<24>>24==(a[df+(de+c1|0)|0]|0)){dm=c1;dn=dd}else{if(c2<<24>>24!=36){dh=dc;di=K;dj=c$;dk=dg;break L8516}dm=c1-1|0;dn=1}dq=de+1|0;if((dq|0)<(dn+K|0)){de=dq;dd=dn;c1=dm}else{break}}if((dn|0)==0){dr=dq;Z=6204}}else{dr=0;Z=6204}if((Z|0)==6204){c1=a[F+(dr+2|0)|0]|0;if(!((c1<<24>>24|0)==36|(c1<<24>>24|0)==0)){dh=dc;di=K;dj=c$;dk=dg;break}}if((a[64976+(b*688&-1)|0]&1)==0){c1=64944+(b*688&-1)|0;dd=c[c1>>2]|0;if((dd|0)==0){ds=dc;dt=c0}else{de=dd;while(1){dd=c[de+16>>2]|0;df=c[de+8>>2]|0;if((df|0)!=0){uu(df)}uu(de);if((dd|0)==0){break}else{de=dd}}ds=c[13898]|0;dt=c[1054]|0}c[c1>>2]=0;du=ds;dv=dt}else{du=dc;dv=c0}c[64920+(b*688&-1)>>2]=5;de=du+1|0;c[13898]=de;dh=de;di=c[dv+(de*40&-1)+36>>2]|0;dj=c[dv+(de*40&-1)+32>>2]|0;dk=a[dv+(de*40&-1)|0]|0}}while(0);L8542:do{if((dk&1)!=0){if((di|0)>0){dv=c[10036]|0;du=0;c0=0;dc=dj;while(1){dt=a[F+du|0]|0;if(dt<<24>>24==(a[dv+(du+dc|0)|0]|0)){dw=dc;dx=c0}else{if(dt<<24>>24!=36){break L8542}dw=dc-1|0;dx=1}dy=du+1|0;if((dy|0)<(dx+di|0)){du=dy;c0=dx;dc=dw}else{break}}if((dx|0)==0){dz=dy;Z=6221}}else{dz=0;Z=6221}if((Z|0)==6221){dc=a[F+dz|0]|0;if(!((dc<<24>>24|0)==36|(dc<<24>>24|0)==0)){break}}c[64920+(b*688&-1)>>2]=1;c[13898]=dh+1}}while(0);a[I]=109;uB(F+3|0,J|0);J=F+((uA(I|0)|0)+2|0)|0;a[J]=a[120232]|0;a[J+1|0]=a[120233|0]|0;a[J+2|0]=a[120234|0]|0;a[J+3|0]=a[120235|0]|0;a[J+4|0]=a[120236|0]|0;a[J+5|0]=a[120237|0]|0;J=c[13898]|0;I=c[1054]|0;dh=c[I+(J*40&-1)+36>>2]|0;dz=c[I+(J*40&-1)+32>>2]|0;L8557:do{if((a[I+(J*40&-1)|0]&1)==0){dA=J;dB=I}else{if((dh|0)>0){dy=c[10036]|0;dx=0;dw=0;di=dz;while(1){dj=a[F+(dx+2|0)|0]|0;if(dj<<24>>24==(a[dy+(dx+di|0)|0]|0)){dC=di;dD=dw}else{if(dj<<24>>24!=36){dA=J;dB=I;break L8557}dC=di-1|0;dD=1}dE=dx+1|0;if((dE|0)<(dD+dh|0)){dx=dE;dw=dD;di=dC}else{break}}if((dD|0)==0){dF=dE;Z=6231}}else{dF=0;Z=6231}if((Z|0)==6231){di=a[F+(dF+2|0)|0]|0;if(!((di<<24>>24|0)==36|(di<<24>>24|0)==0)){dA=J;dB=I;break}}di=J+1|0;c[13898]=di;L8571:do{if((di|0)<(c[8272]|0)){dw=(a[I+(di*40&-1)|0]&1)==0;L8573:do{if(!dw){dx=c[I+(di*40&-1)+36>>2]|0;dy=I+(di*40&-1)+32|0;dj=c[10036]|0;dk=0;while(1){if((dk|0)>=(dx|0)){Z=6237;break}if((a[dj+((c[dy>>2]|0)+dk|0)|0]|0)==(a[dk+103664|0]|0)){dk=dk+1|0}else{break}}if((Z|0)==6237){if((dk|0)==1){break L8571}}if(!((dx|0)>0&(dw^1))){break}dj=c[10036]|0;dc=0;c0=0;du=c[dy>>2]|0;while(1){if((a[dc+184456|0]|0)==(a[dj+(dc+du|0)|0]|0)){dG=du;dH=c0}else{if((dc|0)!=3){break L8573}dG=du-1|0;dH=1}dv=dc+1|0;if((dv|0)<(dH+dx|0)){dc=dv;c0=dH;du=dG}else{break}}if((dH|0)==0){if(!((dc|0)==2|(dc|0)==7)){break}}c[65040+(b*688&-1)>>2]=1;du=J+2|0;c[13898]=du;dA=du;dB=I;break L8557}}while(0);dw=is(E)|0;S=c[dw>>2]|0;if((S|0)==1){dI=+(c[dw+8>>2]|0)}else if((S|0)==2){dI=+h[dw+8>>3]}else if((S|0)==3){dI=+uz(c[dw+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}dw=E|0;if((c[dw>>2]|0)==3){uu(c[E+8>>2]|0);c[dw>>2]=1}h[65048+(b*688&-1)>>3]=+O(+dI);c[65040+(b*688&-1)>>2]=2;dA=c[13898]|0;dB=c[1054]|0;break L8557}}while(0);c[65040+(b*688&-1)>>2]=3;dA=di;dB=I}}while(0);I=c[dB+(dA*40&-1)+36>>2]|0;if((a[dB+(dA*40&-1)|0]&1)==0){i=d;return}do{if((I|0)>0){E=c[10036]|0;J=0;dH=0;dG=c[dB+(dA*40&-1)+32>>2]|0;while(1){dF=a[F+J|0]|0;if(dF<<24>>24==(a[E+(J+dG|0)|0]|0)){dJ=dG;dK=dH}else{if(dF<<24>>24!=36){Z=6267;break}dJ=dG-1|0;dK=1}dL=J+1|0;if((dL|0)<(dK+I|0)){J=dL;dH=dK;dG=dJ}else{Z=6263;break}}if((Z|0)==6267){i=d;return}else if((Z|0)==6263){if((dK|0)==0){dM=dL;Z=6264;break}else{break}}}else{dM=0;Z=6264}}while(0);do{if((Z|0)==6264){dL=a[F+dM|0]|0;if((dL<<24>>24|0)==36|(dL<<24>>24|0)==0){break}i=d;return}}while(0);c[65040+(b*688&-1)>>2]=0;c[13898]=dA+1;i=d;return}function ju(){var b=0,d=0.0,e=0,f=0,g=0.0,i=0.0,j=0.0,k=0.0;b=c[17367]|0;d=(b&1|0)==0?+h[8687]:0.0;e=c[200]|0;f=64652+(e*688&-1)|0;if((b&2|0)!=0){c[f>>2]=3;c[64652+((c[144]|0)*688&-1)>>2]=3;return}c[f>>2]=0;f=c[144]|0;c[64652+(f*688&-1)>>2]=0;g=+h[8688];if((a[69604]&1)==0){i=g-d;h[64688+(e*688&-1)>>3]=i;j=i}else{i=+_(+g);g=+h[8702];k=i/g- +_(+d)/g;h[64688+(e*688&-1)>>3]=k;j=k}h[64688+(f*688&-1)>>3]=j;j=-0.0- +h[64688+(e*688&-1)>>3];h[64680+(e*688&-1)>>3]=j;h[64680+(f*688&-1)>>3]=j;return}function jv(b){b=b|0;var d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;d=i;e=c[13898]|0;f=e+1|0;c[13898]=f;do{if((c[5094]|0)!=0){if(!(a[20368]|0)){break}a[20368]=0;g[3538]=+g[5090];g[3536]=+g[5088];g[3534]=+g[5086];c[16336]=c[16336]^2;c[17024]=c[17024]^2}}while(0);j=c[1054]|0;k=c[j+(f*40&-1)+36>>2]|0;l=c[j+(f*40&-1)+32>>2]|0;m=(a[j+(f*40&-1)|0]&1)==0;L8638:do{if((k|0)>0&(m^1)){j=c[10036]|0;n=0;o=0;p=l;while(1){if((a[n+91248|0]|0)==(a[j+(n+p|0)|0]|0)){q=p;r=o}else{if((n|0)!=2){s=6302;break L8638}q=p-1|0;r=1}t=n+1|0;if((t|0)<(r+k|0)){n=t;o=r;p=q}else{break}}if((r|0)==0){if(!((n|0)==7|(n|0)==1)){s=6302;break}}c[13898]=e+2;h[64680+(b*688&-1)>>3]=+h[64696+(b*688&-1)>>3];h[64688+(b*688&-1)>>3]=+h[64704+(b*688&-1)>>3];c[64652+(b*688&-1)>>2]=0}else{s=6302}}while(0);L8650:do{if((s|0)==6302){if((c[8272]|0)<=(f|0)|m){uf(f,90200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}r=c[10036]|0;q=0;while(1){if((q|0)>=(k|0)){break}if((a[r+(l+q|0)|0]|0)==(a[q+78280|0]|0)){q=q+1|0}else{s=6352;break}}if((s|0)==6352){uf(f,90200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((q|0)!=1){uf(f,90200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13898]=e+2;r=64652+(b*688&-1)|0;c[r>>2]=dj(b,64680+(b*688&-1)|0,64688+(b*688&-1)|0,c[r>>2]|0)|0;r=c[13898]|0;if((c[8272]|0)<=(r|0)){uf(r,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}n=c[1054]|0;if((a[n+(r*40&-1)|0]&1)==0){uf(r,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=c[n+(r*40&-1)+36>>2]|0;o=n+(r*40&-1)+32|0;j=c[10036]|0;t=0;while(1){if((t|0)>=(p|0)){break}if((a[j+((c[o>>2]|0)+t|0)|0]|0)==(a[t+78864|0]|0)){t=t+1|0}else{s=6356;break}}if((s|0)==6356){uf(r,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((t|0)!=1){uf(r,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=r+1|0;c[13898]=o;p=c[n+(o*40&-1)+36>>2]|0;q=c[n+(o*40&-1)+32>>2]|0;u=(a[n+(o*40&-1)|0]&1)==0;L8679:do{if((p|0)>0&(u^1)){w=0;x=0;y=q;while(1){if((a[w+146208|0]|0)==(a[j+(w+y|0)|0]|0)){z=y;A=x}else{if((w|0)!=3){break}z=y-1|0;A=1}B=w+1|0;if((B|0)<(A+p|0)){w=B;x=A;y=z}else{s=6320;break}}do{if((s|0)==6320){if((A|0)==0){if(!((w|0)==7|(w|0)==2)){break}}y=r+2|0;c[13898]=y;x=64656+(b*688&-1)|0;c[x>>2]=c[x>>2]|2;C=y;break L8679}}while(0);if((p|0)>0&(u^1)){D=0;E=0;F=q}else{C=o;break}while(1){if((a[D+146040|0]|0)==(a[j+(D+F|0)|0]|0)){G=F;H=E}else{if((D|0)!=5){C=o;break L8679}G=F-1|0;H=1}w=D+1|0;if((w|0)<(H+p|0)){D=w;E=H;F=G}else{break}}if((H|0)==0){if(!((D|0)==4|(D|0)==9)){C=o;break}}w=r+2|0;c[13898]=w;y=64656+(b*688&-1)|0;c[y>>2]=c[y>>2]&-3;C=w}else{C=o}}while(0);o=c[n+(C*40&-1)+36>>2]|0;r=c[n+(C*40&-1)+32>>2]|0;p=(a[n+(C*40&-1)|0]&1)==0;if((o|0)>0&(p^1)){I=0;J=0;K=r}else{break}while(1){if((a[I+86128|0]|0)==(a[j+(I+K|0)|0]|0)){L=K;M=J}else{if((I|0)!=2){break}L=K-1|0;M=1}q=I+1|0;if((q|0)<(M+o|0)){I=q;J=M;K=L}else{s=6336;break}}do{if((s|0)==6336){if((M|0)==0){if(!((I|0)==9|(I|0)==1)){break}}c[13898]=C+1;n=64656+(b*688&-1)|0;c[n>>2]=c[n>>2]|1;break L8650}}while(0);if((o|0)>0&(p^1)){N=0;O=0;P=r}else{break}while(1){if((a[N+84952|0]|0)==(a[j+(N+P|0)|0]|0)){Q=P;R=O}else{if((N|0)!=5){break L8650}Q=P-1|0;R=1}n=N+1|0;if((n|0)<(R+o|0)){N=n;O=R;P=Q}else{break}}if((R|0)==0){if(!((N|0)==4|(N|0)==11)){break}}c[13898]=C+1;o=64656+(b*688&-1)|0;c[o>>2]=c[o>>2]&-2}}while(0);if((c[5094]|0)==0){i=d;return}if(a[20368]|0){i=d;return}a[20368]=1;g[5090]=+g[3538];g[5088]=+g[3536];g[5086]=+g[3534];g[3538]=180.0;g[3536]=0.0;g[3534]=1.2999999523162842;c[16336]=c[16336]^2;c[17024]=c[17024]^2;i=d;return}function jw(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0.0,T=0.0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0.0,aq=0.0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0.0,aA=0.0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0.0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0.0,bf=0.0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0.0,bx=0.0,by=0,bz=0,bA=0,bB=0,bC=0,bD=0,bE=0,bF=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bL=0,bM=0.0,bN=0.0,bO=0,bP=0,bQ=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0,b3=0,b4=0,b5=0,b6=0,b7=0.0,b8=0.0,b9=0,ca=0,cb=0,cc=0,cd=0,ce=0,cf=0,cg=0,ch=0,ci=0,cj=0,ck=0,cl=0.0,cm=0.0,cn=0,co=0,cp=0,cq=0,cr=0,cs=0,ct=0.0,cu=0.0,cv=0,cw=0,cx=0,cy=0,cz=0,cA=0,cB=0,cC=0,cD=0,cE=0,cF=0,cG=0.0,cH=0.0,cI=0,cJ=0,cK=0,cL=0,cM=0,cN=0,cO=0,cP=0,cQ=0,cR=0,cS=0,cT=0,cU=0,cV=0.0,cW=0.0,cX=0,cY=0,cZ=0,c_=0,c$=0,c0=0,c1=0,c2=0,c3=0.0,c4=0.0,c5=0,c6=0,c7=0,c8=0,c9=0,da=0,db=0.0,dc=0.0,dd=0,de=0,df=0,dg=0,dh=0,di=0,dj=0.0,dk=0.0,dm=0,dn=0,dp=0,dq=0,dr=0,ds=0,dt=0,du=0.0,dv=0.0,dw=0,dx=0,dy=0,dz=0,dA=0,dB=0.0,dC=0.0,dD=0,dE=0;d=i;i=i+224|0;e=d|0;f=d+24|0;g=d+48|0;j=d+88|0;k=d+128|0;l=d+168|0;m=b+4|0;n=(c[m>>2]|0)==-2;o=j;uE(o|0,0,40);c[j>>2]=4;c[j+4>>2]=4;c[j+8>>2]=4;p=k;uE(p|0,0,16);q=d+144|0;uE(q|0,0,24);r=c[13898]|0;s=c[8272]|0;do{if((r|0)<(s|0)){t=b+184|0;u=l|0;w=l+4|0;x=l+8|0;y=l+16|0;z=l+24|0;A=l+32|0;B=f|0;C=f+8|0;D=b+52|0;E=e|0;F=e+8|0;G=0;H=0;I=0;J=0;K=0;L=0;M=0;N=0;O=0;P=0;Q=0;R=0;S=-2.0;T=1.0;U=-2;V=-2;W=0;X=r;Y=s;L8736:while(1){Z=c[1054]|0;_=(a[Z+(X*40&-1)|0]&1)==0;L8738:do{if(!_){$=c[Z+(X*40&-1)+36>>2]|0;aa=Z+(X*40&-1)+32|0;ab=c[10036]|0;ac=0;while(1){if((ac|0)>=($|0)){break}if((a[ab+((c[aa>>2]|0)+ac|0)|0]|0)==(a[ac+103664|0]|0)){ac=ac+1|0}else{break L8738}}if((ac|0)==1){ad=G;ae=H;af=I;ag=J;ah=K;ai=L;aj=M;ak=N;al=O;am=P;an=Q;ao=R;ap=S;aq=T;ar=U;as=V;at=W;au=6556;break L8736}}}while(0);L8745:do{if(J|(Y|0)<=(X|0)|_){au=6376}else{aa=c[Z+(X*40&-1)+36>>2]|0;ab=Z+(X*40&-1)+32|0;$=c[10036]|0;av=0;while(1){if((av|0)>=(aa|0)){break}if((a[$+((c[ab>>2]|0)+av|0)|0]|0)==(a[av+95280|0]|0)){av=av+1|0}else{au=6376;break L8745}}if(n|(av|0)!=2){au=6376;break}c[13898]=X+1;dl(g,0);aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=L;aI=K;aJ=1;aK=I;aL=G;aM=H}}while(0);L8752:do{if((au|0)==6376){au=0;ab=c[Z+(X*40&-1)+36>>2]|0;$=c[Z+(X*40&-1)+32>>2]|0;L8754:do{if(K){au=6413}else{if(!((ab|0)>0&(_^1))){break}aa=c[10036]|0;ac=0;aN=0;aO=$;while(1){if((a[ac+149696|0]|0)==(a[aa+(ac+aO|0)|0]|0)){aP=aO;aQ=aN}else{if((ac|0)!=1){break}aP=aO-1|0;aQ=1}aR=ac+1|0;if((aR|0)<(aQ+ab|0)){ac=aR;aN=aQ;aO=aP}else{au=6383;break}}do{if((au|0)==6383){au=0;if((aQ|0)==0){if(!((ac|0)==4|(ac|0)==0)){break}}c[13898]=X+1;aw=W;ax=V;ay=U;az=T;aA=S;aB=0;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=L;aI=1;aJ=J;aK=I;aL=G;aM=H;break L8752}}while(0);if(!((ab|0)>0&(_^1))){break}ac=c[10036]|0;aO=0;aN=0;aa=$;while(1){if((a[aO+179896|0]|0)==(a[ac+(aO+aa|0)|0]|0)){aS=aa;aT=aN}else{if((aO|0)!=1){au=6394;break}aS=aa-1|0;aT=1}aR=aO+1|0;if((aR|0)<(aT+ab|0)){aO=aR;aN=aT;aa=aS}else{au=6392;break}}do{if((au|0)==6392){au=0;if((aT|0)!=0){break}if(!((aO|0)==0|(aO|0)==6)){au=6394}}}while(0);L8779:do{if((au|0)==6394){au=0;if(_){break L8754}L8782:do{if((ab|0)>0){aO=c[10036]|0;aa=0;aN=0;ac=$;while(1){if((a[aa+149304|0]|0)==(a[aO+(aa+ac|0)|0]|0)){aU=ac;aV=aN}else{if((aa|0)!=1){break L8782}aU=ac-1|0;aV=1}aR=aa+1|0;if((aR|0)<(aV+ab|0)){aa=aR;aN=aV;ac=aU}else{break}}if((aV|0)!=0){break L8779}if((aa|0)==0|(aa|0)==6){break L8779}}}while(0);if(!((ab|0)>0&(_^1))){break L8754}ac=c[10036]|0;aN=0;aO=0;aR=$;while(1){if((a[aN+149568|0]|0)==(a[ac+(aN+aR|0)|0]|0)){aW=aR;aX=aO}else{if((aN|0)!=1){au=6413;break L8754}aW=aR-1|0;aX=1}aY=aN+1|0;if((aY|0)<(aX+ab|0)){aN=aY;aO=aX;aR=aW}else{break}}if((aX|0)==0){if(!((aN|0)==0|(aN|0)==5)){au=6413;break L8754}}c[13898]=X+1;aw=W;ax=V;ay=U;az=T;aA=S;aB=2;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=L;aI=1;aJ=J;aK=I;aL=G;aM=H;break L8752}}while(0);c[13898]=X+1;aw=W;ax=V;ay=U;az=T;aA=S;aB=1;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=L;aI=1;aJ=J;aK=I;aL=G;aM=H;break L8752}}while(0);L8805:do{if((au|0)==6413){au=0;if(_){break}L8808:do{if((ab|0)>0){av=c[10036]|0;aR=0;aO=0;ac=$;while(1){if((a[aR+90456|0]|0)==(a[av+(aR+ac|0)|0]|0)){aZ=ac;a_=aO}else{if((aR|0)!=3){break L8808}aZ=ac-1|0;a_=1}aY=aR+1|0;if((aY|0)<(a_+ab|0)){aR=aY;aO=a_;ac=aZ}else{break}}if((a_|0)==0){if(!((aR|0)==6|(aR|0)==2)){break}}a$=X+1|0;c[13898]=a$;ac=c[D>>2]|0;aO=a[Z+(a$*40&-1)|0]|0;L8820:do{if((Y|0)>(a$|0)){if((aO&1)==0){au=6427;break}av=c[Z+(a$*40&-1)+36>>2]|0;aN=Z+(a$*40&-1)+32|0;aY=c[10036]|0;a0=0;while(1){if((a0|0)>=(av|0)){break}if((a[aY+((c[aN>>2]|0)+a0|0)|0]|0)==(a[a0+163312|0]|0)){a0=a0+1|0}else{au=6427;break L8820}}if((a0|0)!=2){a1=av;a2=aN;break}c[13898]=X+2;aY=is(e)|0;aa=c[aY>>2]|0;if((aa|0)==1){a3=+(c[aY+8>>2]|0)}else if((aa|0)==2){a3=+h[aY+8>>3]}else if((aa|0)==3){a3=+uz(c[aY+8>>2]|0,0)}else{au=6433;break L8736}if((c[E>>2]|0)==3){uu(c[F>>2]|0);c[E>>2]=1}aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=1;aI=K;aJ=J;aK=~~a3;aL=G;aM=H;break L8752}else{au=6427}}while(0);if((au|0)==6427){au=0;a1=c[Z+(a$*40&-1)+36>>2]|0;a2=Z+(a$*40&-1)+32|0}if(!((aO&1)!=0&(a1|0)>0)){aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=1;aI=K;aJ=J;aK=-270;aL=G;aM=H;break L8752}aR=c[10036]|0;aY=0;aa=0;a4=c[a2>>2]|0;while(1){if((a[aY+154360|0]|0)==(a[aR+(aY+a4|0)|0]|0)){a5=a4;a6=aa}else{if((aY|0)!=4){aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=1;aI=K;aJ=J;aK=-270;aL=G;aM=H;break L8752}a5=a4-1|0;a6=1}a7=aY+1|0;if((a7|0)<(a6+a1|0)){aY=a7;aa=a6;a4=a5}else{break}}if((a6|0)==0){if(!((aY|0)==3|(aY|0)==8)){aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=1;aI=K;aJ=J;aK=-270;aL=G;aM=H;break L8752}}if((c[m>>2]|0)>-1){au=6446;break L8736}c[13898]=X+2;c[m>>2]=-3;aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=1;aI=K;aJ=J;aK=ac;aL=G;aM=H;break L8752}}while(0);if(!((ab|0)>0&(_^1))){break}a4=c[10036]|0;aa=0;aR=0;aO=$;while(1){if((a[aa+149328|0]|0)==(a[a4+(aa+aO|0)|0]|0)){a8=aO;a9=aR}else{if((aa|0)!=5){break L8805}a8=aO-1|0;a9=1}a7=aa+1|0;if((a7|0)<(a9+ab|0)){aa=a7;aR=a9;aO=a8}else{break}}if((a9|0)==0){if(!((aa|0)==4|(aa|0)==8)){break}}c[13898]=X+1;if((c[m>>2]|0)!=-3){aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=1;aI=K;aJ=J;aK=0;aL=G;aM=H;break L8752}c[m>>2]=-2;aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=1;aI=K;aJ=J;aK=0;aL=G;aM=H;break L8752}}while(0);L8865:do{if(!(M|(Y|0)<=(X|0)|_)){aO=c[10036]|0;aR=0;while(1){if((aR|0)>=(ab|0)){break}if((a[aO+($+aR|0)|0]|0)==(a[aR+124352|0]|0)){aR=aR+1|0}else{break L8865}}if((aR|0)!=4){break}ba=X+1|0;c[13898]=ba;if((ba|0)>=(Y|0)){bb=ba;au=6577;break L8736}L8873:do{if((a[Z+(ba*40&-1)|0]&1)!=0){aa=c[Z+(ba*40&-1)+36>>2]|0;a4=Z+(ba*40&-1)+32|0;a7=0;while(1){if((a7|0)>=(aa|0)){break}if((a[aO+((c[a4>>2]|0)+a7|0)|0]|0)==(a[a7+103664|0]|0)){a7=a7+1|0}else{break L8873}}if((a7|0)==1){bb=ba;au=6578;break L8736}}}while(0);a[14176]=1;is(f);a[14176]=0;if((c[B>>2]|0)!=3){au=6470;break L8736}aO=c[C>>2]|0;if((aO|0)==0){au=6472;break L8736}else{aw=aO;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=1;aH=L;aI=K;aJ=J;aK=I;aL=G;aM=H;break L8752}}}while(0);L8882:do{if(!(O|n)){aO=(Y|0)>(X|0);if(_|aO^1){break}aR=c[10036]|0;a4=0;while(1){if((a4|0)>=(ab|0)){au=6479;break}if((a[aR+($+a4|0)|0]|0)==(a[a4+150704|0]|0)){a4=a4+1|0}else{break}}do{if((au|0)==6479){au=0;if((a4|0)!=4){break}c[13898]=X+1;aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=0;aD=P;aE=1;aF=N;aG=M;aH=L;aI=K;aJ=J;aK=I;aL=G;aM=H;break L8752}}while(0);if(_|aO^1){break}a4=c[10036]|0;aR=0;while(1){if((aR|0)>=(ab|0)){break}if((a[a4+($+aR|0)|0]|0)==(a[aR+150856|0]|0)){aR=aR+1|0}else{break L8882}}if((aR|0)!=5){break}c[13898]=X+1;aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=1;aD=P;aE=1;aF=N;aG=M;aH=L;aI=K;aJ=J;aK=I;aL=G;aM=H;break L8752}}while(0);L8899:do{if((ab|0)>0&(((V|0)!=-2|n|_)^1)){a4=c[10036]|0;aO=0;aa=0;ac=$;while(1){if((a[aO+140256|0]|0)==(a[a4+(aO+ac|0)|0]|0)){bc=ac;bd=aa}else{if((aO|0)!=2){break}bc=ac-1|0;bd=1}aY=aO+1|0;if((aY|0)<(bd+ab|0)){aO=aY;aa=bd;ac=bc}else{au=6493;break}}do{if((au|0)==6493){au=0;if((bd|0)==0){if(!((aO|0)==5|(aO|0)==1)){break}}ac=X+1|0;c[13898]=ac;c[u>>2]=1;c[w>>2]=U;c[x>>2]=H;c[x+4>>2]=G;h[y>>3]=T;h[z>>3]=S;c[A>>2]=c[q>>2];c[A+4>>2]=c[q+4>>2];c[A+8>>2]=c[q+8>>2];c[A+12>>2]=c[q+12>>2];c[A+16>>2]=c[q+16>>2];c[A+20>>2]=c[q+20>>2];hH(l,1,1);if((ac|0)==(c[13898]|0)){aw=W;ax=1;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=L;aI=K;aJ=J;aK=I;aL=G;aM=H;break L8752}ac=c[u>>2]|0;aa=c[w>>2]|0;a4=c[x>>2]|0;aR=c[x+4>>2]|0;be=+h[y>>3];bf=+h[z>>3];c[q>>2]=c[A>>2];c[q+4>>2]=c[A+4>>2];c[q+8>>2]=c[A+8>>2];c[q+12>>2]=c[A+12>>2];c[q+16>>2]=c[A+16>>2];c[q+20>>2]=c[A+20>>2];aw=W;ax=ac;ay=aa;az=be;aA=bf;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=L;aI=K;aJ=J;aK=I;aL=aR;aM=a4;break L8752}}while(0);if(!((ab|0)>0&(_^1))){break}aO=c[10036]|0;a4=0;aR=0;aa=$;while(1){if((a[a4+138112|0]|0)==(a[aO+(a4+aa|0)|0]|0)){bg=aa;bh=aR}else{if((a4|0)!=4){break L8899}bg=aa-1|0;bh=1}ac=a4+1|0;if((ac|0)<(bh+ab|0)){a4=ac;aR=bh;aa=bg}else{break}}if((bh|0)==0){if(!((a4|0)==3|(a4|0)==7)){break}}c[13898]=X+1;aw=W;ax=0;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=L;aI=K;aJ=J;aK=I;aL=G;aM=H;break L8752}}while(0);L8926:do{if((ab|0)>0&((N|_)^1)){aa=c[10036]|0;aR=0;aO=0;ac=$;while(1){if((a[aR+136456|0]|0)==(a[aa+(aR+ac|0)|0]|0)){bi=ac;bj=aO}else{if((aR|0)!=2){break L8926}bi=ac-1|0;bj=1}aY=aR+1|0;if((aY|0)<(bj+ab|0)){aR=aY;aO=bj;ac=bi}else{break}}if((bj|0)==0){if(!((aR|0)==1|(aR|0)==6)){break}}c[13898]=X+1;dl(j,4);aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=1;aG=M;aH=L;aI=K;aJ=J;aK=I;aL=G;aM=H;break L8752}}while(0);L8939:do{if((Y|0)>(X|0)){if(_){au=6544;break L8736}ac=c[10036]|0;aO=0;while(1){if((aO|0)>=(ab|0)){break}if((a[ac+($+aO|0)|0]|0)==(a[aO+143040|0]|0)){aO=aO+1|0}else{au=6521;break L8939}}if((aO|0)!=2){au=6521;break}if(!P){au=6532}}else{au=6521}}while(0);L8947:do{if((au|0)==6521){au=0;if(_){au=6544;break L8736}if((ab|0)>0){ac=c[10036]|0;aR=0;aa=0;a4=$;while(1){if((a[aR+142856|0]|0)==(a[ac+(aR+a4|0)|0]|0)){bk=a4;bl=aa}else{if((aR|0)!=4){break L8947}bk=a4-1|0;bl=1}bm=aR+1|0;if((bm|0)<(bl+ab|0)){aR=bm;aa=bl;a4=bk}else{break}}if((bl|0)==0){bn=bm;au=6529}else{bo=0}}else{bn=0;au=6529}if((au|0)==6529){au=0;bo=(bn|0)!=10&(bn|0)!=4}if(!(bo|P)){au=6532}}}while(0);if((au|0)==6532){au=0;hI(k,7);aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=1;aE=O;aF=N;aG=M;aH=L;aI=K;aJ=J;aK=I;aL=G;aM=H;break}if(_){au=6534;break L8736}if((ab|0)<=0){au=6547;break L8736}a4=c[10036]|0;aa=0;aR=0;ac=$;while(1){if((a[aa+121536|0]|0)==(a[a4+(aa+ac|0)|0]|0)){bp=ac;bq=aR}else{if((aa|0)!=5){break}bp=ac-1|0;bq=1}aO=aa+1|0;if((aO|0)<(bq+ab|0)){aa=aO;aR=bq;ac=bp}else{au=6541;break}}do{if((au|0)==6541){au=0;if((bq|0)==0){if(!((aa|0)==4|(aa|0)==10)){break}}a[t]=1;c[13898]=(c[13898]|0)+1;aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=L;aI=K;aJ=J;aK=I;aL=G;aM=H;break L8752}}while(0);if(_){ad=G;ae=H;af=I;ag=J;ah=K;ai=L;aj=M;ak=N;al=O;am=P;an=Q;ao=R;ap=S;aq=T;ar=U;as=V;at=W;au=6556;break L8736}if((ab|0)<=0){au=6547;break L8736}aa=c[10036]|0;ac=0;aR=0;a4=$;while(1){if((a[ac+122880|0]|0)==(a[aa+(ac+a4|0)|0]|0)){br=a4;bs=aR}else{if((ac|0)!=3){ad=G;ae=H;af=I;ag=J;ah=K;ai=L;aj=M;ak=N;al=O;am=P;an=Q;ao=R;ap=S;aq=T;ar=U;as=V;at=W;au=6556;break L8736}br=a4-1|0;bs=1}aO=ac+1|0;if((aO|0)<(bs+ab|0)){ac=aO;aR=bs;a4=br}else{break}}if((bs|0)==0){if(!((ac|0)==2|(ac|0)==8)){ad=G;ae=H;af=I;ag=J;ah=K;ai=L;aj=M;ak=N;al=O;am=P;an=Q;ao=R;ap=S;aq=T;ar=U;as=V;at=W;au=6556;break L8736}}a[t]=0;c[13898]=(c[13898]|0)+1;aw=W;ax=V;ay=U;az=T;aA=S;aB=R;aC=Q;aD=P;aE=O;aF=N;aG=M;aH=L;aI=K;aJ=J;aK=I;aL=G;aM=H}}while(0);_=c[13898]|0;Z=c[8272]|0;if((_|0)<(Z|0)){G=aL;H=aM;I=aK;J=aJ;K=aI;L=aH;M=aG;N=aF;O=aE;P=aD;Q=aC;R=aB;S=aA;T=az;U=ay;V=ax;W=aw;X=_;Y=Z}else{ad=aL;ae=aM;af=aK;ag=aJ;ah=aI;ai=aH;aj=aG;ak=aF;al=aE;am=aD;an=aC;ao=aB;ap=aA;aq=az;ar=ay;as=ax;at=aw;au=6556;break}}if((au|0)==6577){uf(bb,145200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==6578){uf(bb,145200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==6534){if(J){bt=W;bu=V;bv=U;bw=T;bx=S;by=R;bz=Q;bA=P;bB=O;bC=N;bD=M;bE=L;bF=K;bG=I;bH=G;bI=H;au=6558}else{bJ=W;bK=V;bL=U;bM=T;bN=S;bO=R;bP=Q;bQ=P;bR=O;bS=N;bT=M;bU=L;bV=K;bW=I;bX=G;bY=H;au=6557}}else if((au|0)==6544){if(J){bt=W;bu=V;bv=U;bw=T;bx=S;by=R;bz=Q;bA=P;bB=O;bC=N;bD=M;bE=L;bF=K;bG=I;bH=G;bI=H;au=6558}else{bJ=W;bK=V;bL=U;bM=T;bN=S;bO=R;bP=Q;bQ=P;bR=O;bS=N;bT=M;bU=L;bV=K;bW=I;bX=G;bY=H;au=6557}}else if((au|0)==6547){if(J){bt=W;bu=V;bv=U;bw=T;bx=S;by=R;bz=Q;bA=P;bB=O;bC=N;bD=M;bE=L;bF=K;bG=I;bH=G;bI=H;au=6558}else{bJ=W;bK=V;bL=U;bM=T;bN=S;bO=R;bP=Q;bQ=P;bR=O;bS=N;bT=M;bU=L;bV=K;bW=I;bX=G;bY=H;au=6557}}else if((au|0)==6556){if(ag){bt=at;bu=as;bv=ar;bw=aq;bx=ap;by=ao;bz=an;bA=am;bB=al;bC=ak;bD=aj;bE=ai;bF=ah;bG=af;bH=ad;bI=ae;au=6558}else{bJ=at;bK=as;bL=ar;bM=aq;bN=ap;bO=ao;bP=an;bQ=am;bR=al;bS=ak;bT=aj;bU=ai;bV=ah;bW=af;bX=ad;bY=ae;au=6557}}else if((au|0)==6470){c[13898]=ba;bb=ba;uf(bb,145200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==6472){bb=c[13898]|0;uf(bb,145200,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==6446){uf(a$,151096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((au|0)==6433){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((au|0)==6558){Y=b+8|0;X=g;c[Y>>2]=c[X>>2];c[Y+4>>2]=c[X+4>>2];c[Y+8>>2]=c[X+8>>2];c[Y+12>>2]=c[X+12>>2];c[Y+16>>2]=c[X+16>>2];c[Y+20>>2]=c[X+20>>2];c[Y+24>>2]=c[X+24>>2];c[Y+28>>2]=c[X+28>>2];c[Y+32>>2]=c[X+32>>2];c[Y+36>>2]=c[X+36>>2];if(bF){bZ=bH;b_=bI;b$=bG;b0=bE;b1=bD;b2=bC;b3=bB;b4=bA;b5=bz;b6=by;b7=bx;b8=bw;b9=bv;ca=bu;cb=bt;au=6559}else{cc=bH;cd=bI;ce=bG;cf=bE;cg=bD;ch=bC;ci=bB;cj=bA;ck=bz;cl=bx;cm=bw;cn=bv;co=bu;cp=bt;au=6560}}else if((au|0)==6557){uE(g|0,0,40);if(bV){bZ=bX;b_=bY;b$=bW;b0=bU;b1=bT;b2=bS;b3=bR;b4=bQ;b5=bP;b6=bO;b7=bN;b8=bM;b9=bL;ca=bK;cb=bJ;au=6559}else{cc=bX;cd=bY;ce=bW;cf=bU;cg=bT;ch=bS;ci=bR;cj=bQ;ck=bP;cl=bN;cm=bM;cn=bL;co=bK;cp=bJ;au=6560}}if((au|0)==6559){c[b+48>>2]=b6;if(b0){cq=cb;cr=ca;cs=b9;ct=b8;cu=b7;cv=b5;cw=b4;cx=b3;cy=b2;cz=b1;cA=b$;cB=bZ;cC=b_;au=6561}else{cD=cb;cE=ca;cF=b9;cG=b8;cH=b7;cI=b5;cJ=b4;cK=b3;cL=b2;cM=b1;cN=bZ;cO=b_;au=6562}}else if((au|0)==6560){if(cf){cq=cp;cr=co;cs=cn;ct=cm;cu=cl;cv=ck;cw=cj;cx=ci;cy=ch;cz=cg;cA=ce;cB=cc;cC=cd;au=6561}else{cD=cp;cE=co;cF=cn;cG=cm;cH=cl;cI=ck;cJ=cj;cK=ci;cL=ch;cM=cg;cN=cc;cO=cd;au=6562}}if((au|0)==6561){c[b+52>>2]=cA;if(cx){cP=cB;cQ=cC;cR=cz;cS=cy;cT=cw;cU=cv;cV=cu;cW=ct;cX=cs;cY=cr;cZ=cq;au=6563}else{c_=cB;c$=cC;c0=cz;c1=cy;c2=cw;c3=cu;c4=ct;c5=cs;c6=cr;c7=cq;au=6564}}else if((au|0)==6562){if(cK){cP=cN;cQ=cO;cR=cM;cS=cL;cT=cJ;cU=cI;cV=cH;cW=cG;cX=cF;cY=cE;cZ=cD;au=6563}else{c_=cN;c$=cO;c0=cM;c1=cL;c2=cJ;c3=cH;c4=cG;c5=cF;c6=cE;c7=cD;au=6564}}if((au|0)==6563){c[b+56>>2]=cU;if(cR){c8=cZ;c9=cY;da=cX;db=cW;dc=cV;dd=cT;de=cS;df=cP;dg=cQ;au=6565}else{dh=cY;di=cX;dj=cW;dk=cV;dm=cT;dn=cS;dp=cP;dq=cQ;au=6566}}else if((au|0)==6564){if(c0){c8=c7;c9=c6;da=c5;db=c4;dc=c3;dd=c2;de=c1;df=c_;dg=c$;au=6565}else{dh=c6;di=c5;dj=c4;dk=c3;dm=c2;dn=c1;dp=c_;dq=c$;au=6566}}if((au|0)==6565){c[b+64>>2]=c8;if(dd){dr=df;ds=dg;dt=de;du=dc;dv=db;dw=da;dx=c9;au=6567}else{dy=df;dz=dg;dA=de;dB=dc;dC=db;dD=da;dE=c9}}else if((au|0)==6566){if(dm){dr=dp;ds=dq;dt=dn;du=dk;dv=dj;dw=di;dx=dh;au=6567}else{dy=dp;dz=dq;dA=dn;dB=dk;dC=dj;dD=di;dE=dh}}if((au|0)==6567){X=b+72|0;c[X>>2]=c[p>>2];c[X+4>>2]=c[p+4>>2];c[X+8>>2]=c[p+8>>2];c[X+12>>2]=c[p+12>>2];dy=dr;dz=ds;dA=dt;dB=du;dC=dv;dD=dw;dE=dx}if((dE|0)>-1){c[b+88>>2]=dE;c[b+92>>2]=dD;X=b+96|0;c[X>>2]=dz;c[X+4>>2]=dy;h[b+104>>3]=dC;h[b+112>>3]=dB;X=b+120|0;c[X>>2]=c[q>>2];c[X+4>>2]=c[q+4>>2];c[X+8>>2]=c[q+8>>2];c[X+12>>2]=c[q+12>>2];c[X+16>>2]=c[q+16>>2];c[X+20>>2]=c[q+20>>2];if(!dA){break}}else{if(!dA){break}}X=b+144|0;c[X>>2]=c[o>>2];c[X+4>>2]=c[o+4>>2];c[X+8>>2]=c[o+8>>2];c[X+12>>2]=c[o+12>>2];c[X+16>>2]=c[o+16>>2];c[X+20>>2]=c[o+20>>2];c[X+24>>2]=c[o+24>>2];c[X+28>>2]=c[o+28>>2];c[X+32>>2]=c[o+32>>2];c[X+36>>2]=c[o+36>>2]}else{uE(g|0,0,40)}}while(0);if((c[b+72>>2]|0)!=6){i=d;return}h[b+80>>3]=+h[b+40>>3];i=d;return} -function jx(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0.0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0.0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aJ=0,aK=0,aL=0.0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0.0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0.0,a7=0.0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0.0,bu=0,bv=0,bw=0.0,bx=0,by=0,bz=0;e=i;i=i+96|0;f=e|0;g=e+24|0;j=e+48|0;k=e+72|0;l=c[13898]|0;c[13898]=l+1;do{if((b|0)<-1){c[13898]=l;if((d|0)==1){n=b;o=49264;p=0;q=0;r=49160;s=0;t=0;u=l;break}uf(l,191504,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{w=c[10818]|0;L9036:do{if((w|0)==0){x=0;y=0;z=6591}else{A=(b|0)>0;B=0;C=w;while(1){if(A){D=c[C+4>>2]|0;if((D|0)>=(b|0)){break}}E=c[C>>2]|0;if((E|0)==0){x=C;y=0;z=6591;break L9036}else{B=C;C=E}}if((C|0)==0){F=b;G=B;H=0;z=6594;break}if((D|0)!=(b|0)){x=B;y=C;z=6591;break}A=c[C+12>>2]|0;if((A|0)==(d|0)){I=b;J=0;K=C;break}E=C|0;L=c[E>>2]|0;if((A|0)==4){uu(c[(C+104|0)+4>>2]|0)}if((d|0)==4){uD(C|0,33240,272)}else if((d|0)==1){uD(C|0,1144,272);c[C+52>>2]=-7;c[C+16>>2]=3}else if((d|0)==3){uD(C|0,1416,272)}else if((d|0)==2){uD(C|0,1688,272)}else{uf(-1,177064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[C+4>>2]=b;c[C+12>>2]=d;c[E>>2]=L;I=b;J=C;K=C}}while(0);do{if((z|0)==6591){if((b|0)!=-1){F=b;G=x;H=y;z=6594;break}if((x|0)==0){F=1;G=0;H=y;z=6594;break}F=(c[x+4>>2]|0)+1|0;G=x;H=y;z=6594}}while(0);if((z|0)==6594){w=ut(272)|0;do{if((w|0)==0){gk();L=ut(272)|0;if((L|0)!=0){M=L;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=177576,v)|0)}else{M=w}}while(0);w=M;if((d|0)==1){uD(M|0,1144,272);c[M+52>>2]=-7;c[M+16>>2]=3}else if((d|0)==3){uD(M|0,1416,272)}else if((d|0)==2){uD(M|0,1688,272)}else if((d|0)==4){uD(M|0,33240,272)}else{uf(-1,177064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[M+4>>2]=F;c[M+12>>2]=d;if((G|0)==0){c[10818]=w}else{c[G>>2]=w}c[M>>2]=H;I=F;J=w;K=w}w=K+104|0;n=I;o=w|0;p=w;q=J;r=K;s=w;t=w;u=c[13898]|0}}while(0);K=c[8272]|0;if((u|0)>=(K|0)){i=e;return}J=o+88|0;I=o+128|0;F=J|0;H=I|0;M=o+92|0;G=o+132|0;y=o+104|0;x=o+144|0;b=o+112|0;D=o+152|0;l=o|0;w=o+48|0;L=o+8|0;o=r+8|0;E=k|0;A=k+8|0;N=r+80|0;O=r+52|0;Q=r+88|0;R=Q|0;S=r+12|0;T=(q|0)==0;q=r+16|0;U=q|0;V=r+20|0;W=r+24|0;X=r+32|0;Y=(n|0)<0;n=r+16|0;Z=j|0;_=j+8|0;$=t+88|0;aa=g|0;ab=g+8|0;ac=t+96|0;ad=t+48|0;ae=t+8|0;t=p+48|0;af=p|0;ag=f|0;ah=f+8|0;ai=p+88|0;aj=p+8|0;p=s+4|0;ak=s|0;s=0;al=0;am=0;an=0;ao=0;ap=0;aq=1.0;ar=u;u=K;L9085:while(1){K=c[1054]|0;as=(a[K+(ar*40&-1)|0]&1)==0;L9087:do{if(!as){at=c[K+(ar*40&-1)+36>>2]|0;au=K+(ar*40&-1)+32|0;av=c[10036]|0;aw=0;while(1){if((aw|0)>=(at|0)){break}if((a[av+((c[au>>2]|0)+aw|0)|0]|0)==(a[aw+103664|0]|0)){aw=aw+1|0}else{break L9087}}if((aw|0)==1){ax=am;ay=an;az=ao;aA=aq;z=6939;break L9085}}}while(0);L9094:do{if((d|0)==3){au=(u|0)>(ar|0);L9096:do{if(au){av=c[K+(ar*40&-1)+36>>2]|0;at=K+(ar*40&-1)+32|0;if(as){aB=c[at>>2]|0;aC=av;z=6764;break}C=c[10036]|0;B=0;while(1){if((B|0)>=(av|0)){break}if((a[C+((c[at>>2]|0)+B|0)|0]|0)==(a[B+95280|0]|0)){B=B+1|0}else{z=6754;break L9096}}if((B|0)==2){z=6762}else{z=6754}}else{z=6754}}while(0);L9105:do{if((z|0)==6754){z=0;aw=c[K+(ar*40&-1)+36>>2]|0;at=c[K+(ar*40&-1)+32>>2]|0;L9107:do{if((aw|0)>0&(as^1)){C=c[10036]|0;av=0;aD=0;aE=at;while(1){if((a[av+185064|0]|0)==(a[C+(av+aE|0)|0]|0)){aF=aE;aG=aD}else{if((av|0)!=3){break L9107}aF=aE-1|0;aG=1}aH=av+1|0;if((aH|0)<(aG+aw|0)){av=aH;aD=aG;aE=aF}else{break}}if((aG|0)!=0){z=6762;break L9105}if((av|0)==2|(av|0)==6){z=6762;break L9105}}}while(0);if(au){aB=at;aC=aw;z=6764}else{aJ=aw;aK=at}}}while(0);if((z|0)==6762){z=0;c[13898]=ar+1;dl(aj,0);aL=aq;aM=ap;aN=ao;aO=an;aP=am;aQ=al;aR=s;break}L9120:do{if((z|0)==6764){z=0;if(as){aS=ap;aT=an;aU=ar;aV=u;z=6859;break L9094}au=c[10036]|0;B=0;while(1){if((B|0)>=(aC|0)){break}if((a[au+(aB+B|0)|0]|0)==(a[B+130496|0]|0)){B=B+1|0}else{aJ=aC;aK=aB;break L9120}}if((B|0)!=4){aJ=aC;aK=aB;break}c[13898]=ar+1;dl(t,0);aL=aq;aM=ap;aN=ao;aO=an;aP=am;aQ=al;aR=s;break L9094}}while(0);if(!((aJ|0)>0&(as^1))){aS=ap;aT=an;aU=ar;aV=u;z=6859;break}au=c[10036]|0;at=0;aw=0;aE=aK;while(1){if((a[at+212296|0]|0)==(a[au+(at+aE|0)|0]|0)){aW=aE;aX=aw}else{if((at|0)!=3){break}aW=aE-1|0;aX=1}aD=at+1|0;if((aD|0)<(aX+aJ|0)){at=aD;aw=aX;aE=aW}else{z=6776;break}}do{if((z|0)==6776){z=0;if((aX|0)==0){if(!((at|0)==5|(at|0)==2)){break}}c[13898]=ar+1;aE=is(f)|0;aw=c[aE>>2]|0;if((aw|0)==1){aY=+(c[aE+8>>2]|0)}else if((aw|0)==2){aY=+h[aE+8>>3]}else if((aw|0)==3){aY=+uz(c[aE+8>>2]|0,0)}else{z=6782;break L9085}if((c[ag>>2]|0)==3){uu(c[ah>>2]|0);c[ag>>2]=1}h[ai>>3]=aY;aL=aq;aM=ap;aN=ao;aO=an;aP=am;aQ=al;aR=s;break L9094}}while(0);if(!((aJ|0)>0&(as^1))){aS=ap;aT=an;aU=ar;aV=u;z=6859;break}at=c[10036]|0;aE=0;aw=0;au=aK;while(1){if((a[aE+211736|0]|0)==(a[at+(aE+au|0)|0]|0)){aZ=au;a_=aw}else{if((aE|0)!=4){aS=ap;aT=an;aU=ar;aV=u;z=6859;break L9094}aZ=au-1|0;a_=1}aD=aE+1|0;if((aD|0)<(a_+aJ|0)){aE=aD;aw=a_;au=aZ}else{break}}if((a_|0)==0){if(!((aE|0)==3|(aE|0)==5)){aS=ap;aT=an;aU=ar;aV=u;z=6859;break}}a$=ar+1|0;c[13898]=a$;au=(u|0)>(a$|0);L9161:do{if(au){do{if((a[K+(a$*40&-1)|0]&1)!=0){aw=c[K+(a$*40&-1)+36>>2]|0;at=K+(a$*40&-1)+32|0;aD=c[10036]|0;C=0;while(1){if((C|0)>=(aw|0)){z=6799;break}if((a[aD+((c[at>>2]|0)+C|0)|0]|0)==(a[C+150688|0]|0)){C=C+1|0}else{z=6800;break}}if((z|0)==6799){z=0;if((C|0)==2|au^1){z=6806;break L9161}else{break}}else if((z|0)==6800){z=0;if(au){break}else{z=6806;break L9161}}}}while(0);B=(a[K+(a$*40&-1)|0]&1)==0;if(B){z=6963;break L9085}at=c[K+(a$*40&-1)+36>>2]|0;aD=K+(a$*40&-1)+32|0;aw=c[10036]|0;av=0;while(1){if((av|0)>=(at|0)){z=6805;break}if((a[aw+((c[aD>>2]|0)+av|0)|0]|0)==(a[av+103664|0]|0)){av=av+1|0}else{break}}if((z|0)==6805){z=0;if((av|0)==1){z=6806;break}}if(B){z=6962;break L9085}aD=c[K+(a$*40&-1)+36>>2]|0;aw=K+(a$*40&-1)+32|0;at=c[10036]|0;aH=0;while(1){if((aH|0)>=(aD|0)){z=6811;break}if((a[at+((c[aw>>2]|0)+aH|0)|0]|0)==(a[aH+211336|0]|0)){aH=aH+1|0}else{break}}do{if((z|0)==6811){z=0;if((aH|0)!=2){break}c[af>>2]=1;break L9161}}while(0);if(B){z=6964;break L9085}aH=c[K+(a$*40&-1)+36>>2]|0;aw=K+(a$*40&-1)+32|0;at=c[10036]|0;aD=0;while(1){if((aD|0)>=(aH|0)){break}if((a[at+((c[aw>>2]|0)+aD|0)|0]|0)==(a[aD+210848|0]|0)){aD=aD+1|0}else{z=6965;break L9085}}if((aD|0)!=2){z=6966;break L9085}c[af>>2]=2}else{z=6806}}while(0);if((z|0)==6806){z=0;c[af>>2]=0}c[13898]=(c[13898]|0)+1;aL=aq;aM=ap;aN=ao;aO=an;aP=am;aQ=al;aR=s}else if((d|0)==2){au=(u|0)>(ar|0);L9197:do{if(au){aE=c[K+(ar*40&-1)+36>>2]|0;aw=K+(ar*40&-1)+32|0;if(as){a0=c[aw>>2]|0;a1=aE;break}at=c[10036]|0;aH=0;while(1){if((aH|0)>=(aE|0)){break}if((a[at+((c[aw>>2]|0)+aH|0)|0]|0)==(a[aH+95280|0]|0)){aH=aH+1|0}else{z=6682;break L9197}}if((aH|0)==2){z=6690}else{z=6682}}else{z=6682}}while(0);L9206:do{if((z|0)==6682){z=0;aw=c[K+(ar*40&-1)+36>>2]|0;at=c[K+(ar*40&-1)+32>>2]|0;L9208:do{if((aw|0)>0&(as^1)){aE=c[10036]|0;aD=0;B=0;av=at;while(1){if((a[aD+185064|0]|0)==(a[aE+(aD+av|0)|0]|0)){a2=av;a3=B}else{if((aD|0)!=3){break L9208}a2=av-1|0;a3=1}a4=aD+1|0;if((a4|0)<(a3+aw|0)){aD=a4;B=a3;av=a2}else{break}}if((a3|0)!=0){z=6690;break L9206}if((aD|0)==2|(aD|0)==6){z=6690;break L9206}}}while(0);if(au){a0=at;a1=aw}else{aS=ap;aT=an;aU=ar;aV=u;z=6859;break L9094}}}while(0);if((z|0)==6690){z=0;c[13898]=ar+1;dl(ae,0);aL=aq;aM=ap;aN=ao;aO=an;aP=am;aQ=al;aR=s;break}L9222:do{if(as){z=6697}else{aH=c[10036]|0;av=0;while(1){if((av|0)>=(a1|0)){break}if((a[aH+(a0+av|0)|0]|0)==(a[av+130496|0]|0)){av=av+1|0}else{z=6697;break L9222}}if((av|0)!=4){z=6697}}}while(0);do{if((z|0)==6697){z=0;if(!au){aS=ap;aT=an;aU=ar;aV=u;z=6859;break L9094}if(as){aS=ap;aT=an;aU=ar;aV=u;z=6859;break L9094}aH=c[10036]|0;aw=0;while(1){if((aw|0)>=(a1|0)){z=6702;break}if((a[aH+(a0+aw|0)|0]|0)==(a[aw+184696|0]|0)){aw=aw+1|0}else{break}}if((z|0)==6702){z=0;if((aw|0)==6){break}}if(!au){aS=ap;aT=an;aU=ar;aV=u;z=6859;break L9094}if(as){aS=ap;aT=an;aU=ar;aV=u;z=6859;break L9094}aH=c[10036]|0;av=0;while(1){if((av|0)>=(a1|0)){break}if((a[aH+(a0+av|0)|0]|0)==(a[av+184328|0]|0)){av=av+1|0}else{aS=ap;aT=an;aU=ar;aV=u;z=6859;break L9094}}if((av|0)!=3){aS=ap;aT=an;aU=ar;aV=u;z=6859;break L9094}aw=ar+1|0;c[13898]=aw;if((u|0)<=(aw|0)){a5=aw;z=6948;break L9085}if((a[K+(aw*40&-1)|0]&1)==0){a5=aw;z=6946;break L9085}at=c[K+(aw*40&-1)+36>>2]|0;B=K+(aw*40&-1)+32|0;aE=0;while(1){if((aE|0)>=(at|0)){break}if((a[aH+((c[B>>2]|0)+aE|0)|0]|0)==(a[aE+78280|0]|0)){aE=aE+1|0}else{a5=aw;z=6952;break L9085}}if((aE|0)!=1){a5=aw;z=6953;break L9085}c[13898]=ar+2;B=is(j)|0;aH=c[B>>2]|0;if((aH|0)==1){a6=+(c[B+8>>2]|0)}else if((aH|0)==2){a6=+h[B+8>>3]}else if((aH|0)==3){a6=+uz(c[B+8>>2]|0,0)}else{z=6720;break L9085}if((c[Z>>2]|0)==3){uu(c[_>>2]|0);c[Z>>2]=1}if(+P(+a6)>1.0e3){z=6724;break L9085}h[$>>3]=a6;B=c[13898]|0;aH=B+1|0;c[13898]=aH;if((c[8272]|0)<=(B|0)){a5=aH;z=6956;break L9085}at=c[1054]|0;if((a[at+(B*40&-1)|0]&1)==0){a5=aH;z=6957;break L9085}av=c[at+(B*40&-1)+36>>2]|0;C=at+(B*40&-1)+32|0;B=c[10036]|0;at=0;while(1){if((at|0)>=(av|0)){break}if((a[B+((c[C>>2]|0)+at|0)|0]|0)==(a[at+183584|0]|0)){at=at+1|0}else{a5=aH;z=6954;break L9085}}if((at|0)!=1){a5=aH;z=6955;break L9085}C=is(g)|0;B=c[C>>2]|0;if((B|0)==1){a7=+(c[C+8>>2]|0)}else if((B|0)==2){a7=+h[C+8>>3]}else if((B|0)==3){a7=+uz(c[C+8>>2]|0,0)}else{z=6735;break L9085}if((c[aa>>2]|0)==3){uu(c[ab>>2]|0);c[aa>>2]=1}if(+P(+a7)>1.0e3){z=6739;break L9085}h[ac>>3]=a7;C=c[13898]|0;B=C+1|0;c[13898]=B;if((c[8272]|0)<=(C|0)){a5=B;z=6947;break L9085}av=c[1054]|0;if((a[av+(C*40&-1)|0]&1)==0){a5=B;z=6951;break L9085}aw=c[av+(C*40&-1)+36>>2]|0;aE=av+(C*40&-1)+32|0;C=c[10036]|0;av=0;while(1){if((av|0)>=(aw|0)){break}if((a[C+((c[aE>>2]|0)+av|0)|0]|0)==(a[av+78864|0]|0)){av=av+1|0}else{a5=B;z=6949;break L9085}}if((av|0)==1){aL=aq;aM=ap;aN=ao;aO=an;aP=am;aQ=al;aR=s;break L9094}else{a5=B;z=6950;break L9085}}}while(0);c[13898]=ar+1;dl(ad,0);aL=aq;aM=ap;aN=ao;aO=an;aP=am;aQ=al;aR=s}else if((d|0)==1){au=(u|0)>(ar|0);L9285:do{if(au){do{if(!as){aE=c[K+(ar*40&-1)+36>>2]|0;C=K+(ar*40&-1)+32|0;aw=c[10036]|0;aH=0;while(1){if((aH|0)>=(aE|0)){z=6631;break}if((a[aw+((c[C>>2]|0)+aH|0)|0]|0)==(a[aH+188576|0]|0)){aH=aH+1|0}else{break}}do{if((z|0)==6631){z=0;if((aH|0)!=4){break}c[13898]=ar+1;dl(J,0);a8=c[13898]|0;C=(c[8272]|0)>(a8|0);if(!C){z=6967;break L9085}aw=c[1054]|0;L9296:do{if((a[aw+(a8*40&-1)|0]&1)==0){z=6640}else{aE=c[aw+(a8*40&-1)+36>>2]|0;aD=aw+(a8*40&-1)+32|0;at=c[10036]|0;a4=0;while(1){if((a4|0)>=(aE|0)){z=6637;break}if((a[at+((c[aD>>2]|0)+a4|0)|0]|0)==(a[a4+187176|0]|0)){a4=a4+1|0}else{break}}do{if((z|0)==6637){z=0;if((a4|0)!=2){break}c[13898]=a8+1;dl(I,0);break L9296}}while(0);if(C){z=6640}else{z=6970;break L9085}}}while(0);if((z|0)==6640){z=0;C=c[1054]|0;if((a[C+(a8*40&-1)|0]&1)==0){z=6971;break L9085}aw=c[C+(a8*40&-1)+36>>2]|0;a4=C+(a8*40&-1)+32|0;C=c[10036]|0;aD=0;while(1){if((aD|0)>=(aw|0)){break}if((a[C+((c[a4>>2]|0)+aD|0)|0]|0)==(a[aD+186688|0]|0)){aD=aD+1|0}else{z=6968;break L9085}}if((aD|0)!=3){z=6969;break L9085}c[13898]=a8+1;dl(I,c[F>>2]|0);if((c[F>>2]|0)!=(c[H>>2]|0)){z=6958;break L9085}if((c[M>>2]|0)!=(c[G>>2]|0)){z=6959;break L9085}h[x>>3]=+h[y>>3]+ +h[x>>3];h[D>>3]=+h[b>>3]+ +h[D>>3]}c[l>>2]=0;aL=aq;aM=ap;aN=ao;aO=1;aP=am;aQ=al;aR=s;break L9094}}while(0);if(!au){z=6659;break L9285}if(as){break}aH=c[K+(ar*40&-1)+36>>2]|0;a4=K+(ar*40&-1)+32|0;C=c[10036]|0;aw=0;while(1){if((aw|0)>=(aH|0)){break}if((a[C+((c[a4>>2]|0)+aw|0)|0]|0)==(a[aw+95280|0]|0)){aw=aw+1|0}else{z=6659;break L9285}}if((aw|0)==2){z=6667;break L9285}else{z=6659;break L9285}}}while(0);a9=c[K+(ar*40&-1)+36>>2]|0;ba=c[K+(ar*40&-1)+32>>2]|0}else{z=6659}}while(0);L9324:do{if((z|0)==6659){z=0;B=c[K+(ar*40&-1)+36>>2]|0;av=c[K+(ar*40&-1)+32>>2]|0;if(!((B|0)>0&(as^1))){a9=B;ba=av;break}a4=c[10036]|0;C=0;aH=0;at=av;while(1){if((a[C+185064|0]|0)==(a[a4+(C+at|0)|0]|0)){bb=at;bc=aH}else{if((C|0)!=3){a9=B;ba=av;break L9324}bb=at-1|0;bc=1}aE=C+1|0;if((aE|0)<(bc+B|0)){C=aE;aH=bc;at=bb}else{break}}if((bc|0)!=0){z=6667;break}if((C|0)==2|(C|0)==6){z=6667}else{a9=B;ba=av}}}while(0);if((z|0)==6667){z=0;c[13898]=ar+1;dl(L,0);c[l>>2]=1;aL=aq;aM=ap;aN=1;aO=an;aP=am;aQ=al;aR=s;break}if(!au){aS=ap;aT=an;aU=ar;aV=u;z=6859;break}if(as){aS=ap;aT=an;aU=ar;aV=u;z=6859;break}at=c[10036]|0;aH=0;while(1){if((aH|0)>=(a9|0)){break}if((a[at+(ba+aH|0)|0]|0)==(a[aH+130496|0]|0)){aH=aH+1|0}else{aS=ap;aT=an;aU=ar;aV=u;z=6859;break L9094}}if((aH|0)!=4){aS=ap;aT=an;aU=ar;aV=u;z=6859;break}c[13898]=ar+1;dl(w,0);c[l>>2]=1;aL=aq;aM=ap;aN=1;aO=an;aP=am;aQ=al;aR=s}else if((d|0)==4){L9346:do{if((u|0)<=(ar|0)|as){bd=ap}else{at=c[K+(ar*40&-1)+36>>2]|0;au=K+(ar*40&-1)+32|0;a4=c[10036]|0;aE=0;while(1){if((aE|0)>=(at|0)){break}if((a[a4+((c[au>>2]|0)+aE|0)|0]|0)==(a[aE+188576|0]|0)){aE=aE+1|0}else{bd=ap;break L9346}}if((aE|0)!=4){bd=ap;break}c[13898]=ar+1;au=db(c[p>>2]|0,40,182592)|0;c[p>>2]=au;dl(au,0);c[ak>>2]=1;bd=1}}while(0);aH=an;L9354:while(1){be=c[13898]|0;bf=c[8272]|0;au=(bf|0)>(be|0);if(!au){break}a4=c[1054]|0;do{if((a[a4+(be*40&-1)|0]&1)==0){z=6835}else{at=c[a4+(be*40&-1)+36>>2]|0;av=a4+(be*40&-1)+32|0;B=c[10036]|0;C=0;while(1){if((C|0)>=(at|0)){z=6833;break}if((a[B+((c[av>>2]|0)+C|0)|0]|0)==(a[C+187176|0]|0)){C=C+1|0}else{break}}if((z|0)==6833){z=0;if((C|0)==2){break}}if(au){z=6835}else{break L9354}}}while(0);if((z|0)==6835){z=0;au=c[1054]|0;if((a[au+(be*40&-1)|0]&1)==0){break}a4=c[au+(be*40&-1)+36>>2]|0;aE=au+(be*40&-1)+32|0;au=c[10036]|0;av=0;while(1){if((av|0)>=(a4|0)){break}if((a[au+((c[aE>>2]|0)+av|0)|0]|0)==(a[av+186688|0]|0)){av=av+1|0}else{break L9354}}if((av|0)!=3){break}}bg=c[p>>2]|0;if(!bd){z=6857;break L9085}c[p>>2]=db(bg,((c[ak>>2]|0)*40&-1)+40|0,182592)|0;aE=c[13898]|0;c[13898]=aE+1;L9374:do{if((c[8272]|0)>(aE|0)){au=c[1054]|0;if((a[au+(aE*40&-1)|0]&1)==0){z=6846;break}a4=c[au+(aE*40&-1)+36>>2]|0;B=au+(aE*40&-1)+32|0;au=c[10036]|0;at=0;while(1){if((at|0)>=(a4|0)){break}if((a[au+((c[B>>2]|0)+at|0)|0]|0)==(a[at+187176|0]|0)){at=at+1|0}else{z=6846;break L9374}}B=c[ak>>2]|0;au=c[p>>2]|0;a4=au+(B*40&-1)|0;if((at|0)!=2){bh=B;bi=au;bj=a4;z=6849;break}dl(a4,0)}else{z=6846}}while(0);if((z|0)==6846){z=0;aE=c[ak>>2]|0;av=c[p>>2]|0;bh=aE;bi=av;bj=av+(aE*40&-1)|0;z=6849}if((z|0)==6849){z=0;dl(bj,c[bi>>2]|0);aE=c[p>>2]|0;av=bh-1|0;if((c[aE+(bh*40&-1)>>2]|0)!=(c[aE+(av*40&-1)>>2]|0)){z=6972;break L9085}if((c[aE+(bh*40&-1)+4>>2]|0)!=(c[aE+(av*40&-1)+4>>2]|0)){z=6973;break L9085}a4=aE+(bh*40&-1)+16|0;h[a4>>3]=+h[aE+(av*40&-1)+16>>3]+ +h[a4>>3];a4=c[p>>2]|0;aE=a4+(bh*40&-1)+24|0;h[aE>>3]=+h[a4+(av*40&-1)+24>>3]+ +h[aE>>3]}c[ak>>2]=(c[ak>>2]|0)+1;aH=1}if(!aH){aS=bd;aT=0;aU=be;aV=bf;z=6859;break}aE=c[p>>2]|0;if((uG(aE+(((c[ak>>2]|0)-1|0)*40&-1)|0,aE|0,40)|0)==0){aS=bd;aT=1;aU=be;aV=bf;z=6859;break}aI(181096,44,1,c[m>>2]|0);aE=db(c[p>>2]|0,((c[ak>>2]|0)*40&-1)+40|0,182592)|0;av=aE;c[p>>2]=av;a4=av+((c[ak>>2]|0)*40&-1)|0;c[a4>>2]=c[aE>>2];c[a4+4>>2]=c[aE+4>>2];c[a4+8>>2]=c[aE+8>>2];c[a4+12>>2]=c[aE+12>>2];c[a4+16>>2]=c[aE+16>>2];c[a4+20>>2]=c[aE+20>>2];c[a4+24>>2]=c[aE+24>>2];c[a4+28>>2]=c[aE+28>>2];c[a4+32>>2]=c[aE+32>>2];c[a4+36>>2]=c[aE+36>>2];c[ak>>2]=(c[ak>>2]|0)+1;aS=bd;aT=1;aU=c[13898]|0;aV=c[8272]|0;z=6859}else{z=6858;break L9085}}while(0);L9392:do{if((z|0)==6859){z=0;K=(aV|0)>(aU|0);L9394:do{if(K){as=c[1054]|0;if((a[as+(aU*40&-1)|0]&1)!=0){aE=c[as+(aU*40&-1)+36>>2]|0;a4=as+(aU*40&-1)+32|0;as=c[10036]|0;av=0;while(1){if((av|0)>=(aE|0)){z=6864;break}if((a[as+((c[a4>>2]|0)+av|0)|0]|0)==(a[av+150856|0]|0)){av=av+1|0}else{break}}do{if((z|0)==6864){z=0;if((av|0)!=5){break}c[o>>2]=1;c[13898]=(c[13898]|0)+1;aL=aq;aM=aS;aN=ao;aO=aT;aP=am;aQ=al;aR=s;break L9392}}while(0);if(!K){z=6874;break}}av=c[1054]|0;L9406:do{if((a[av+(aU*40&-1)|0]&1)!=0){a4=c[av+(aU*40&-1)+36>>2]|0;as=av+(aU*40&-1)+32|0;aE=c[10036]|0;au=0;while(1){if((au|0)>=(a4|0)){break}if((a[aE+((c[as>>2]|0)+au|0)|0]|0)==(a[au+150704|0]|0)){au=au+1|0}else{break L9406}}if((au|0)!=4){break}c[o>>2]=0;c[13898]=(c[13898]|0)+1;aL=aq;aM=aS;aN=ao;aO=aT;aP=am;aQ=al;aR=s;break L9392}}while(0);if(!K){z=6874;break}av=c[1054]|0;as=a[av+(aU*40&-1)|0]|0;if((as&1)==0){bk=av;bl=as;break}aE=c[av+(aU*40&-1)+36>>2]|0;a4=av+(aU*40&-1)+32|0;at=c[10036]|0;B=0;while(1){if((B|0)>=(aE|0)){break}if((a[at+((c[a4>>2]|0)+B|0)|0]|0)==(a[B+121920|0]|0)){B=B+1|0}else{bk=av;bl=as;break L9394}}if((B|0)!=6){bk=av;bl=as;break}c[o>>2]=-1;c[13898]=(c[13898]|0)+1;aL=aq;aM=aS;aN=ao;aO=aT;aP=am;aQ=al;aR=s;break L9392}else{z=6874}}while(0);if((z|0)==6874){z=0;K=c[1054]|0;bk=K;bl=a[K+(aU*40&-1)|0]|0}K=c[bk+(aU*40&-1)+36>>2]|0;L9424:do{if((bl&1)!=0&(K|0)>0){aH=c[10036]|0;a4=0;at=0;aE=c[bk+(aU*40&-1)+32>>2]|0;while(1){if((a[a4+184456|0]|0)==(a[aH+(a4+aE|0)|0]|0)){bm=aE;bn=at}else{if((a4|0)!=3){break L9424}bm=aE-1|0;bn=1}C=a4+1|0;if((C|0)<(bn+K|0)){a4=C;at=bn;aE=bm}else{break}}if((bn|0)==0){if(!((a4|0)==2|(a4|0)==7)){break}}if(Y){z=6890;break L9085}c[O>>2]=-7;c[n>>2]=3;c[13898]=(c[13898]|0)+1;aL=aq;aM=aS;aN=ao;aO=aT;aP=am;aQ=1;aR=1;break L9392}}while(0);if(s){bo=aU}else{K=(c[S>>2]|0)==1?49176:49488;if(T){hJ(q,c[U>>2]|0,c[V>>2]|0,c[W>>2]|0,X)}else{hJ(q,c[K>>2]|0,c[K+4>>2]|0,c[K+8>>2]|0,K+16|0)}if((c[13898]|0)==(ar|0)){bo=ar}else{aL=aq;aM=aS;aN=ao;aO=aT;aP=am;aQ=al;aR=1;break}}if(al){bp=bo}else{K=c[1054]|0;aE=a[K+(bo*40&-1)|0]|0;L9447:do{if((c[8272]|0)>(bo|0)){if((aE&1)==0){z=6904;break}at=c[K+(bo*40&-1)+36>>2]|0;aH=K+(bo*40&-1)+32|0;as=c[10036]|0;av=0;while(1){if((av|0)>=(at|0)){break}if((a[as+((c[aH>>2]|0)+av|0)|0]|0)==(a[av+179168|0]|0)){av=av+1|0}else{z=6904;break L9447}}if((av|0)==2){z=6912}else{z=6904}}else{z=6904}}while(0);L9454:do{if((z|0)==6904){z=0;aH=c[K+(bo*40&-1)+36>>2]|0;if(!((aE&1)!=0&(aH|0)>0)){break}as=c[10036]|0;at=0;a4=0;B=c[K+(bo*40&-1)+32>>2]|0;while(1){if((a[at+178592|0]|0)==(a[as+(at+B|0)|0]|0)){bq=B;br=a4}else{if((at|0)!=5){break L9454}bq=B-1|0;br=1}C=at+1|0;if((C|0)<(br+aH|0)){at=C;a4=br;B=bq}else{break}}if((br|0)!=0){z=6912;break}if((at|0)==4|(at|0)==9){z=6912}}}while(0);do{if((z|0)==6912){z=0;a[N]=1;c[O>>2]=-2;hI(Q,5);if((c[R>>2]|0)!=0){break}c[O>>2]=-7}}while(0);if((c[13898]|0)==(ar|0)){bp=ar}else{aL=aq;aM=aS;aN=ao;aO=aT;aP=am;aQ=1;aR=s;break}}if(am){bs=bp;z=6960;break L9085}K=c[1054]|0;aE=a[K+(bp*40&-1)|0]|0;L9471:do{if((c[8272]|0)>(bp|0)){if((aE&1)==0){z=6922;break}B=c[K+(bp*40&-1)+36>>2]|0;a4=K+(bp*40&-1)+32|0;aH=c[10036]|0;as=0;while(1){if((as|0)>=(B|0)){break}if((a[aH+((c[a4>>2]|0)+as|0)|0]|0)==(a[as+128296|0]|0)){as=as+1|0}else{z=6922;break L9471}}if((as|0)==2){z=6930}else{z=6922}}else{z=6922}}while(0);L9478:do{if((z|0)==6922){z=0;a4=c[K+(bp*40&-1)+36>>2]|0;if(!((aE&1)!=0&(a4|0)>0)){bt=aq;break}aH=c[10036]|0;B=0;at=0;av=c[K+(bp*40&-1)+32>>2]|0;while(1){if((a[B+128400|0]|0)==(a[aH+(B+av|0)|0]|0)){bu=av;bv=at}else{if((B|0)!=5){bt=aq;break L9478}bu=av-1|0;bv=1}C=B+1|0;if((C|0)<(bv+a4|0)){B=C;at=bv;av=bu}else{break}}if((bv|0)!=0){z=6930;break}if((B|0)==4|(B|0)==9){z=6930}else{bt=aq}}}while(0);do{if((z|0)==6930){z=0;c[13898]=bp+1;K=is(k)|0;aE=c[K>>2]|0;if((aE|0)==2){bw=+h[K+8>>3]}else if((aE|0)==3){bw=+uz(c[K+8>>2]|0,0)}else if((aE|0)==1){bw=+(c[K+8>>2]|0)}else{z=6934;break L9085}if((c[E>>2]|0)!=3){bt=bw;break}uu(c[A>>2]|0);c[E>>2]=1;bt=bw}}while(0);if((c[13898]|0)==(ar|0)){bs=ar;z=6961;break L9085}else{aL=bt;aM=aS;aN=ao;aO=aT;aP=1;aQ=al;aR=s}}}while(0);K=c[13898]|0;aE=c[8272]|0;if((K|0)<(aE|0)){s=aR;al=aQ;am=aP;an=aO;ao=aN;ap=aM;aq=aL;ar=K;u=aE}else{ax=aP;ay=aO;az=aN;aA=aL;z=6939;break}}if((z|0)==6739){uf((c[13898]|0)-1|0,183928,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6962){uf(a$,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6963){uf(a$,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6964){uf(a$,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6965){uf(a$,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6966){uf(a$,210136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6967){uf(a8,185568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6968){uf(a8,185568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6969){uf(a8,185568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6970){uf(a8,185568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6971){uf(a8,185568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6972){bx=c[13898]|0;uf(bx,186064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6973){bx=c[13898]|0;uf(bx,186064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6857){uu(bg);c[p>>2]=0;c[ak>>2]=0;uf(c[13898]|0,180752,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6858){uf(ar,180328,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6952){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6953){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6954){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6955){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6956){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6957){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6958){bz=c[13898]|0;uf(bz,186064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6959){bz=c[13898]|0;uf(bz,186064,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6960){uf(bs,178144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6961){uf(bs,178144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6934){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6939){if(ax){h[r+64>>3]=aA}if(az&ay){uf(-1,177888,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{i=e;return}}else if((z|0)==6720){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6946){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6947){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6948){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6949){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6950){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6951){by=a5-1|0;c[13898]=by;uf(by,183096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6782){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6724){uf((c[13898]|0)-1|0,183928,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6735){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==6890){uf(aU,179496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function jy(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0.0,L=0,M=0.0,N=0,O=0,P=0,Q=0,R=0,S=0.0,T=0,U=0,V=0.0,W=0,X=0,Y=0,Z=0,_=0,$=0.0,aa=0,ab=0.0,ac=0.0,ad=0.0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0.0;b=i;i=i+120|0;d=b|0;e=b+24|0;f=b+48|0;j=b+72|0;k=b+96|0;l=c[13898]|0;o=l+1|0;c[13898]=o;p=c[1054]|0;q=c[p+(o*40&-1)+36>>2]|0;r=c[p+(o*40&-1)+32>>2]|0;s=(a[p+(o*40&-1)|0]&1)==0;t=(q|0)>0;u=c[10036]|0;w=21960;x=96232;L9545:while(1){L9547:do{if(!s){if(t){y=0;z=0;A=r;while(1){B=a[x+y|0]|0;if(B<<24>>24==(a[u+(y+A|0)|0]|0)){C=A;D=z}else{if(B<<24>>24!=36){break L9547}C=A-1|0;D=1}E=y+1|0;if((E|0)<(D+q|0)){y=E;z=D;A=C}else{break}}if((D|0)==0){F=E}else{G=w;break L9545}}else{F=0}A=a[x+F|0]|0;if((A<<24>>24|0)==36|(A<<24>>24|0)==0){G=w;break L9545}}}while(0);A=w+8|0;z=c[A>>2]|0;if((z|0)==0){G=A;break}else{w=A;x=z}}x=c[G+4>>2]|0;if((x|0)==0){H=75960;I=c[13898]|0;uf(I,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}G=l+2|0;c[13898]=G;do{if((x|0)==95){if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}if((c[17578]|0)==1){w=c[m>>2]|0;cf(w|0,198344,(v=i,i=i+8|0,c[v>>2]=57024,v)|0)}w=c[m>>2]|0;aF(9,w|0);je(c[m>>2]|0,8)}else if((x|0)==30){L9572:do{if((G|0)<(c[8272]|0)){L9574:do{if((a[p+(G*40&-1)|0]&1)!=0){w=c[p+(G*40&-1)+36>>2]|0;F=p+(G*40&-1)+32|0;E=0;while(1){if((E|0)>=(w|0)){break}if((a[u+((c[F>>2]|0)+E|0)|0]|0)==(a[E+103664|0]|0)){E=E+1|0}else{break L9574}}if((E|0)==1){J=0;break L9572}}}while(0);F=is(k)|0;w=c[F>>2]|0;if((w|0)==2){K=+h[F+8>>3]}else if((w|0)==3){K=+uz(c[F+8>>2]|0,0)}else if((w|0)==1){K=+(c[F+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}F=k|0;if((c[F>>2]|0)==3){uu(c[k+8>>2]|0);c[F>>2]=1}F=~~K;if((F|0)<1){H=208936}else{J=F;break}I=c[13898]|0;uf(I,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{J=0}}while(0);aF(10,c[m>>2]|0);jM(J)}else if((x|0)==65){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}if((c[16718]|0)==1){F=c[m>>2]|0;cf(F|0,198344,(v=i,i=i+8|0,c[v>>2]=56904,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,3)}else if((x|0)==18){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}cf(c[m>>2]|0,114368,(v=i,i=i+16|0,c[v>>2]=24544,c[v+8>>2]=24595,v)|0)}else if((x|0)==32){L9604:do{if((G|0)<(c[8272]|0)){L9606:do{if((a[p+(G*40&-1)|0]&1)!=0){F=c[p+(G*40&-1)+36>>2]|0;w=p+(G*40&-1)+32|0;D=0;while(1){if((D|0)>=(F|0)){break}if((a[u+((c[w>>2]|0)+D|0)|0]|0)==(a[D+103664|0]|0)){D=D+1|0}else{break L9606}}if((D|0)==1){L=7233;break L9604}}}while(0);w=is(e)|0;F=c[w>>2]|0;if((F|0)==2){M=+h[w+8>>3]}else if((F|0)==3){M=+uz(c[w+8>>2]|0,0)}else if((F|0)==1){M=+(c[w+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}w=e|0;if((c[w>>2]|0)==3){uu(c[e+8>>2]|0);c[w>>2]=1}w=~~M;if((w|0)<1){H=208936;I=c[13898]|0;uf(I,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{F=c[m>>2]|0;aF(10,F|0);N=w;O=0;break}}else{L=7233}}while(0);if((L|0)==7233){w=c[m>>2]|0;aF(10,w|0);w=c[m>>2]|0;F=c[8798]|0;cf(w|0,76832,(v=i,i=i+8|0,c[v>>2]=F,v)|0);N=0;O=1}F=c[10816]|0;if((F|0)==0){P=0}else{w=0;E=F;while(1){F=c[E+4>>2]|0;if(O){Q=F;L=7237}else{if((F|0)==(N|0)){Q=N;L=7237}else{R=w}}if((L|0)==7237){L=0;F=c[m>>2]|0;cf(F|0,76280,(v=i,i=i+8|0,c[v>>2]=Q,v)|0);ji(c[m>>2]|0,E+8|0,1);F=c[m>>2]|0;aF(10,F|0);R=1}F=c[E>>2]|0;if((F|0)==0){P=R;break}else{w=R;E=F}}}if((N|0)<1|P){break}uf(c[13898]|0,75640,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((x|0)==39|(x|0)==40|(x|0)==41|(x|0)==42|(x|0)==38){jO()}else if((x|0)==58){if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}E=c[8244]|0;w=c[m>>2]|0;if((E|0)==0){aI(134568,26,1,w|0);break}else{cf(w|0,134696,(v=i,i=i+8|0,c[v>>2]=E,v)|0);break}}else if((x|0)==60){jQ()}else if((x|0)==62){jW()}else if((x|0)==79){if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}cf(c[m>>2]|0,172840,(v=i,i=i+8|0,c[v>>2]=(a[30528]&1)!=0?172456:172176,v)|0)}else if((x|0)==63){c[13898]=o;jR()}else if((x|0)==77){if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}cf(c[m>>2]|0,167288,(v=i,i=i+8|0,h[v>>3]=+h[3818],v)|0)}else if((x|0)==59){if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}cf(c[m>>2]|0,136080,(v=i,i=i+8|0,c[v>>2]=(a[32936]&1)!=0?172456:172176,v)|0)}else if((x|0)==61){jP()}else if((x|0)==110){if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}E=(c[16546]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56880,c[v+8>>2]=E,v)|0)}else if((x|0)==129){if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}E=(c[16374]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56856,c[v+8>>2]=E,v)|0)}else if((x|0)==101){if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}E=(c[17234]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56976,c[v+8>>2]=E,v)|0)}else if((x|0)==149){if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}if((c[17406]|0)==1){E=c[m>>2]|0;cf(E|0,198344,(v=i,i=i+8|0,c[v>>2]=57e3,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,7)}else if((x|0)==19){if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}cf(c[m>>2]|0,168248,(v=i,i=i+8|0,c[v>>2]=c[44936+(c[11252]<<2)>>2],v)|0);E=c[m>>2]|0;w=bA(2,0)|0;cf(E|0,167680,(v=i,i=i+8|0,c[v>>2]=w,v)|0)}else if((x|0)==21){jT()}else if((x|0)==22){if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}ur(2,0)}else if((x|0)==144){if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}if((c[16202]|0)==1){w=c[m>>2]|0;cf(w|0,198344,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,0)}else if((x|0)==57){if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}S=+g[44];cf(c[m>>2]|0,183064,(v=i,i=i+16|0,h[v>>3]=+g[184],h[v+8>>3]=S,v)|0)}else if((x|0)==87){if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=c[3524]|0;E=c[m>>2]|0;if((w|0)==0){aI(183552,26,1,E|0);break}else{F=c[w>>2]|0;cf(E|0,183896,(v=i,i=i+16|0,c[v>>2]=F,c[v+8>>2]=13048,v)|0);break}}else if((x|0)==29){jJ()}else if((x|0)==153){jH(2)}else if((x|0)==14){H=134e3;I=c[13898]|0;uf(I,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((x|0)==107){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}if((c[17234]|0)==1){F=c[m>>2]|0;cf(F|0,198344,(v=i,i=i+8|0,c[v>>2]=56976,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,6)}else if((x|0)==3){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}aI(174264,15,1,c[m>>2]|0);F=c[m>>2]|0;if(+h[9040]==1.0){aI(173624,8,1,F|0);break}else{aI(173192,8,1,F|0);break}}else if((x|0)==78){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}cf(c[m>>2]|0,166928,(v=i,i=i+8|0,h[v>>3]=+h[3817],v)|0)}else if((x|0)==20){jS()}else if((x|0)==126){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}if((c[17062]|0)==1){F=c[m>>2]|0;cf(F|0,198344,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,5)}else if((x|0)==89|(x|0)==91|(x|0)==90|(x|0)==119){jZ(1,1,1,1,1,1)}else if((x|0)==48){j$(2)}else if((x|0)==52){j$(1)}else if((x|0)==54){j$(0)}else if((x|0)==68){j$(3)}else if((x|0)==46){j$(6)}else if((x|0)==50){j$(5)}else if((x|0)==93){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}j6(179864,141856,4672);cf(c[m>>2]|0,197424,(v=i,i=i+8|0,c[v>>2]=(c[1166]|0)!=0?196800:196168,v)|0);F=c[m>>2]|0;if((c[1164]|0)==0){aI(193896,14,1,F|0);break}else{aI(195648,36,1,F|0);break}}else if((x|0)==88){cf(c[m>>2]|0,91616,(v=i,i=i+8|0,c[v>>2]=(a[13048]|0)!=0?13048:84080,v)|0)}else if((x|0)==96){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}if((c[17750]|0)==1){F=c[m>>2]|0;cf(F|0,198344,(v=i,i=i+8|0,c[v>>2]=57048,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,9)}else if((x|0)==15){j0()}else if((x|0)==70){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}F=(c[16718]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56904,c[v+8>>2]=F,v)|0)}else if((x|0)==92){j_()}else if((x|0)==116){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}if((c[16546]|0)==1){F=c[m>>2]|0;cf(F|0,198344,(v=i,i=i+8|0,c[v>>2]=56880,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,2)}else if((x|0)==44){j1()}else if((x|0)==76){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}cf(c[m>>2]|0,222616,(v=i,i=i+8|0,c[v>>2]=c[6924],v)|0)}else if((x|0)==97){j2()}else if((x|0)==117|(x|0)==111|(x|0)==114){jZ(1,0,0,1,0,0)}else if((x|0)==136|(x|0)==130|(x|0)==133){jZ(0,1,0,0,1,0)}else if((x|0)==145|(x|0)==139|(x|0)==142){jZ(0,0,1,0,0,0)}else if((x|0)==66|(x|0)==71|(x|0)==73){jZ(0,0,0,0,0,1)}else if((x|0)==147){j4(7)}else if((x|0)==108|(x|0)==102|(x|0)==105){jZ(0,0,0,1,0,0)}else if((x|0)==127|(x|0)==121|(x|0)==124){jZ(0,0,0,0,1,0)}else if((x|0)==45){cf(c[m>>2]|0,121216,(v=i,i=i+8|0,c[v>>2]=(a[33512]&1)!=0?150376:150208,v)|0)}else if((x|0)==23){jF()}else if((x|0)==16){F=c[10812]|0;aI(123576,26,1,c[m>>2]|0);if((F|0)==0){break}else{T=F}do{F=c[T+12>>2]|0;E=c[m>>2]|0;if((F|0)==0){w=c[T+4>>2]|0;cf(E|0,123120,(v=i,i=i+8|0,c[v>>2]=w,v)|0)}else{cf(E|0,123448,(v=i,i=i+8|0,c[v>>2]=F,v)|0)}T=c[T>>2]|0;}while((T|0)!=0)}else if((x|0)==82){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}F=c[6350]|0;cf(c[m>>2]|0,174608,(v=i,i=i+16|0,c[v>>2]=c[6352],c[v+8>>2]=F,v)|0)}else if((x|0)==27){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}F=c[9342]|0;cf(c[m>>2]|0,174888,(v=i,i=i+16|0,c[v>>2]=c[9344],c[v+8>>2]=F,v)|0)}else if((x|0)==135){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}if((c[16374]|0)==1){F=c[m>>2]|0;cf(F|0,198344,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,1)}else if((x|0)==34){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}F=c[m>>2]|0;E=bA(2,0)|0;cf(F|0,146672,(v=i,i=i+8|0,c[v>>2]=E,v)|0);cf(c[m>>2]|0,144576,(v=i,i=i+8|0,c[v>>2]=c[44936+(c[11252]<<2)>>2],v)|0);E=c[m>>2]|0;F=bA(5,0)|0;cf(E|0,142976,(v=i,i=i+8|0,c[v>>2]=F,v)|0);F=c[8270]|0;cf(c[m>>2]|0,141432,(v=i,i=i+8|0,c[v>>2]=(F|0)!=0?F:139696,v)|0)}else if((x|0)==33){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}uq(2,0)}else if((x|0)==151){if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}cf(c[m>>2]|0,203824,(v=i,i=i+8|0,h[v>>3]=+h[11],v)|0)}else if((x|0)==31){L9824:do{if((G|0)<(c[8272]|0)){L9826:do{if((a[p+(G*40&-1)|0]&1)!=0){F=c[p+(G*40&-1)+36>>2]|0;E=p+(G*40&-1)+32|0;w=0;while(1){if((w|0)>=(F|0)){break}if((a[u+((c[E>>2]|0)+w|0)|0]|0)==(a[w+103664|0]|0)){w=w+1|0}else{break L9826}}if((w|0)==1){U=0;break L9824}}}while(0);E=is(f)|0;F=c[E>>2]|0;if((F|0)==1){V=+(c[E+8>>2]|0)}else if((F|0)==3){V=+uz(c[E+8>>2]|0,0)}else if((F|0)==2){V=+h[E+8>>3]}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}E=f|0;if((c[E>>2]|0)==3){uu(c[f+8>>2]|0);c[E>>2]=1}E=~~V;if((E|0)<1){H=208936}else{U=E;break}I=c[13898]|0;uf(I,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{U=0}}while(0);aF(10,c[m>>2]|0);E=c[10820]|0;if((E|0)==0){W=0}else{F=(U|0)==0;D=0;C=E;while(1){E=c[C+4>>2]|0;if(F){X=E;L=7214}else{if((E|0)==(U|0)){X=U;L=7214}else{Y=D}}if((L|0)==7214){L=0;E=c[m>>2]|0;cf(E|0,75168,(v=i,i=i+8|0,c[v>>2]=X,v)|0);ji(c[m>>2]|0,C+8|0,1);E=c[m>>2]|0;aF(10,E|0);Y=1}E=c[C>>2]|0;if((E|0)==0){W=Y;break}else{D=Y;C=E}}}if((U|0)<1|W){break}uf(c[13898]|0,74736,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((x|0)==94){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}j6(179864,154440,4416)}else if((x|0)==113){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}j6(56880,202256,66456)}else if((x|0)==132){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}j6(56856,202256,65768)}else if((x|0)==80){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}C=c[m>>2]|0;D=c[7262]|0;do{if((D|0)==(c[n>>2]|0)){Z=89880}else{if((D|0)==0){Z=89256;break}F=c[7260]|0;Z=(D|0)!=(C|0)&(F|0)!=0?F:89256}}while(0);cf(C|0,134848,(v=i,i=i+8|0,c[v>>2]=Z,v)|0)}else if((x|0)==11){jB()}else if((x|0)==10|(x|0)==13|(x|0)==12){jC()}else if((x|0)==17){jD()}else if((x|0)==36){if(!(a[928]|0)){D=c[m>>2]|0;aF(10,D|0)}cf(c[m>>2]|0,113600,(v=i,i=i+8|0,c[v>>2]=(a[43472]&1)!=0?179864:211688,v)|0)}else if((x|0)==37){jE()}else if((x|0)==4){L9884:do{if((G|0)<(c[8272]|0)){L9886:do{if((a[p+(G*40&-1)|0]&1)!=0){D=c[p+(G*40&-1)+36>>2]|0;F=p+(G*40&-1)+32|0;E=0;while(1){if((E|0)>=(D|0)){break}if((a[u+((c[F>>2]|0)+E|0)|0]|0)==(a[E+103664|0]|0)){E=E+1|0}else{break L9886}}if((E|0)==1){_=0;break L9884}}}while(0);F=is(j)|0;D=c[F>>2]|0;if((D|0)==2){$=+h[F+8>>3]}else if((D|0)==3){$=+uz(c[F+8>>2]|0,0)}else if((D|0)==1){$=+(c[F+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}F=j|0;if((c[F>>2]|0)==3){uu(c[j+8>>2]|0);c[F>>2]=1}F=~~$;if((F|0)<1){H=208936}else{_=F;break}I=c[13898]|0;uf(I,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{_=0}}while(0);aF(10,c[m>>2]|0);jN(_)}else if((x|0)==5){jz()}else if((x|0)==6){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}S=+h[7077];C=c[m>>2]|0;if(S>0.0){F=(c[14156]|0)==0?150704:150856;cf(C|0,106368,(v=i,i=i+16|0,c[v>>2]=F,h[v+8>>3]=S,v)|0);break}else{aI(106320,33,1,C|0);break}}else if((x|0)==8){jA()}else if((x|0)==9){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}S=+h[7030];C=c[m>>2]|0;if(S<0.0){aI(106792,18,1,C|0);break}else{F=(a[56232]&1)!=0?106640:106608;cf(C|0,106688,(v=i,i=i+16|0,h[v>>3]=S,c[v+8>>2]=F,v)|0);break}}else if((x|0)==98){jI(c[m>>2]|0)}else if((x|0)==7){F=c[8272]|0;L9922:do{if((G|0)<(F|0)){C=G;while(1){L9925:do{if((a[p+(C*40&-1)|0]&1)!=0){D=c[p+(C*40&-1)+36>>2]|0;w=p+(C*40&-1)+32|0;q=0;while(1){if((q|0)>=(D|0)){break}if((a[u+((c[w>>2]|0)+q|0)|0]|0)==(a[q+103664|0]|0)){q=q+1|0}else{break L9925}}if((q|0)==1){aa=C;break L9922}}}while(0);E=C+1|0;c[13898]=E;if((E|0)<(F|0)){C=E}else{aa=E;break}}}else{aa=G}}while(0);c[13898]=aa-1;dV()}else if((x|0)==1){aF(10,c[m>>2]|0);kc(it()|0,0);c[13898]=(c[13898]|0)+1}else if((x|0)==2){a[928]=1;jI(c[m>>2]|0);jz();if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}S=+h[7077];F=c[m>>2]|0;if(S>0.0){C=(c[14156]|0)==0?150704:150856;cf(F|0,106368,(v=i,i=i+16|0,c[v>>2]=C,h[v+8>>3]=S,v)|0)}else{aI(106320,33,1,F|0)}jA();if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}S=+h[7030];F=c[m>>2]|0;if(S<0.0){aI(106792,18,1,F|0)}else{C=(a[56232]&1)!=0?106640:106608;cf(F|0,106688,(v=i,i=i+16|0,h[v>>3]=S,c[v+8>>2]=C,v)|0)}jB();C=c[m>>2]|0;if((a[35888]&1)==0){aI(107400,37,1,C|0)}else{cf(C|0,107464,(v=i,i=i+8|0,c[v>>2]=53520,v)|0)}jC();jD();if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}cf(c[m>>2]|0,113600,(v=i,i=i+8|0,c[v>>2]=(a[43472]&1)!=0?179864:211688,v)|0);jE();if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}cf(c[m>>2]|0,114368,(v=i,i=i+16|0,c[v>>2]=24544,c[v+8>>2]=24595,v)|0);jF();jX();jG();cf(c[m>>2]|0,125408,(v=i,i=i+8|0,c[v>>2]=(a[27776]&1)!=0?179864:211688,v)|0);jH(2);jH(1);jH(0);jM(0);jN(0);jK();jL();if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}C=(c[8764]|0)==2?88392:179864;S=+h[4384];F=(c[6588]|0)==2?88392:179864;ab=+h[3296];E=(c[1057]|0)==2?88392:179864;ac=+h[531];w=(c[14091]|0)==2?88392:179864;ad=+h[7048];cf(c[m>>2]|0,89120,(v=i,i=i+72|0,c[v>>2]=132528,c[v+8>>2]=C,h[v+16>>3]=S,c[v+24>>2]=F,h[v+32>>3]=ab,c[v+40>>2]=E,h[v+48>>3]=ac,c[v+56>>2]=w,h[v+64>>3]=ad,v)|0);jO();if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=c[8244]|0;E=c[m>>2]|0;if((w|0)==0){aI(134568,26,1,E|0)}else{cf(E|0,134696,(v=i,i=i+8|0,c[v>>2]=w,v)|0)}if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=c[m>>2]|0;E=c[7262]|0;do{if((E|0)==(c[n>>2]|0)){ae=89880}else{if((E|0)==0){ae=89256;break}F=c[7260]|0;ae=(E|0)!=(w|0)&(F|0)!=0?F:89256}}while(0);cf(w|0,134848,(v=i,i=i+8|0,c[v>>2]=ae,v)|0);if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}cf(c[m>>2]|0,136080,(v=i,i=i+8|0,c[v>>2]=(a[32936]&1)!=0?172456:172176,v)|0);jQ();jW();jP();if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}cf(c[m>>2]|0,166928,(v=i,i=i+8|0,h[v>>3]=+h[3817],v)|0);if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}cf(c[m>>2]|0,167288,(v=i,i=i+8|0,h[v>>3]=+h[3818],v)|0);if(!(a[928]|0)){E=c[m>>2]|0;aF(10,E|0)}cf(c[m>>2]|0,168248,(v=i,i=i+8|0,c[v>>2]=c[44936+(c[11252]<<2)>>2],v)|0);E=c[m>>2]|0;F=bA(2,0)|0;cf(E|0,167680,(v=i,i=i+8|0,c[v>>2]=F,v)|0);jS();jT();if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}cf(c[m>>2]|0,172840,(v=i,i=i+8|0,c[v>>2]=(a[30528]&1)!=0?172456:172176,v)|0);if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}aI(174264,15,1,c[m>>2]|0);F=c[m>>2]|0;if(+h[9040]==1.0){aI(173624,8,1,F|0)}else{aI(173192,8,1,F|0)}jj(c[m>>2]|0,0);if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}F=c[6350]|0;cf(c[m>>2]|0,174608,(v=i,i=i+16|0,c[v>>2]=c[6352],c[v+8>>2]=F,v)|0);if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}F=c[9342]|0;cf(c[m>>2]|0,174888,(v=i,i=i+16|0,c[v>>2]=c[9344],c[v+8>>2]=F,v)|0);jV();if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}cf(c[m>>2]|0,178568,(v=i,i=i+8|0,c[v>>2]=(a[46752]&1)!=0?179864:211688,v)|0);if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}cf(c[m>>2]|0,179872,(v=i,i=i+8|0,c[v>>2]=(a[38984]&1)!=0?179488:179160,v)|0);gp();jY();if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}ad=+g[44];cf(c[m>>2]|0,183064,(v=i,i=i+16|0,h[v>>3]=+g[184],h[v+8>>3]=ad,v)|0);if(!(a[928]|0)){F=c[m>>2]|0;aF(10,F|0)}F=c[3524]|0;E=c[m>>2]|0;if((F|0)==0){aI(183552,26,1,E|0)}else{C=c[F>>2]|0;cf(E|0,183896,(v=i,i=i+16|0,c[v>>2]=C,c[v+8>>2]=13048,v)|0)}jZ(1,1,1,1,1,1);j$(2);j$(1);j$(0);j$(6);j$(5);j6(179864,141856,4672);if((a[32936]&1)==0){if((a[30528]&1)!=0){L=7049}}else{L=7049}do{if((L|0)==7049){C=a[928]|0;if((a[37384]&1)==0){if(!C){E=c[m>>2]|0;aF(10,E|0)}if((c[17578]|0)==1){E=c[m>>2]|0;cf(E|0,198344,(v=i,i=i+8|0,c[v>>2]=57024,v)|0)}E=c[m>>2]|0;aF(9,E|0);je(c[m>>2]|0,8);break}if(!C){C=c[m>>2]|0;aF(10,C|0)}if((c[17750]|0)==1){C=c[m>>2]|0;cf(C|0,198344,(v=i,i=i+8|0,c[v>>2]=57048,v)|0)}C=c[m>>2]|0;aF(9,C|0);je(c[m>>2]|0,9);if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}if((c[17922]|0)==1){C=c[m>>2]|0;cf(C|0,198344,(v=i,i=i+8|0,c[v>>2]=57072,v)|0)}C=c[m>>2]|0;aF(9,C|0);je(c[m>>2]|0,10)}}while(0);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}if((c[16546]|0)==1){w=c[m>>2]|0;cf(w|0,198344,(v=i,i=i+8|0,c[v>>2]=56880,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,2);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}if((c[16374]|0)==1){w=c[m>>2]|0;cf(w|0,198344,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,1);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}if((c[17234]|0)==1){w=c[m>>2]|0;cf(w|0,198344,(v=i,i=i+8|0,c[v>>2]=56976,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,6);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}if((c[17062]|0)==1){w=c[m>>2]|0;cf(w|0,198344,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,5);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}if((c[16202]|0)==1){w=c[m>>2]|0;cf(w|0,198344,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,0);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}j6(179864,154440,4416);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}j6(56880,202256,66456);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}j6(56856,202256,65768);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}j6(56832,202256,65080);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}j6(56976,202256,69208);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}j6(56952,202256,68520);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=(c[16546]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56880,c[v+8>>2]=w,v)|0);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=(c[16374]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56856,c[v+8>>2]=w,v)|0);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=(c[17234]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56976,c[v+8>>2]=w,v)|0);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=(c[17062]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56952,c[v+8>>2]=w,v)|0);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=(c[16202]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56832,c[v+8>>2]=w,v)|0);j_();if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}uq(2,0);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}ur(2,0);jU();if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=c[m>>2]|0;C=bA(2,0)|0;cf(w|0,146672,(v=i,i=i+8|0,c[v>>2]=C,v)|0);cf(c[m>>2]|0,144576,(v=i,i=i+8|0,c[v>>2]=c[44936+(c[11252]<<2)>>2],v)|0);C=c[m>>2]|0;w=bA(5,0)|0;cf(C|0,142976,(v=i,i=i+8|0,c[v>>2]=w,v)|0);w=c[8270]|0;cf(c[m>>2]|0,141432,(v=i,i=i+8|0,c[v>>2]=(w|0)!=0?w:139696,v)|0);if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}cf(c[m>>2]|0,203824,(v=i,i=i+8|0,h[v>>3]=+h[11],v)|0);j0();j1();if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}cf(c[m>>2]|0,222616,(v=i,i=i+8|0,c[v>>2]=c[6924],v)|0);j2();w=c[10812]|0;aI(123576,26,1,c[m>>2]|0);if((w|0)!=0){C=w;do{w=c[C+12>>2]|0;E=c[m>>2]|0;if((w|0)==0){F=c[C+4>>2]|0;cf(E|0,123120,(v=i,i=i+8|0,c[v>>2]=F,v)|0)}else{cf(E|0,123448,(v=i,i=i+8|0,c[v>>2]=w,v)|0)}C=c[C>>2]|0;}while((C|0)!=0)}a[928]=0}else if((x|0)==99){jV()}else if((x|0)==85){jX()}else if((x|0)==84){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}cf(c[m>>2]|0,178568,(v=i,i=i+8|0,c[v>>2]=(a[46752]&1)!=0?179864:211688,v)|0)}else if((x|0)==25){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}cf(c[m>>2]|0,179872,(v=i,i=i+8|0,c[v>>2]=(a[38984]&1)!=0?179488:179160,v)|0);gp()}else if((x|0)==83){jY()}else if((x|0)==141){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}j6(56832,202256,65080)}else if((x|0)==64){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}j6(56904,202256,67144)}else if((x|0)==104){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}j6(56976,202256,69208)}else if((x|0)==123){if(!(a[928]|0)){C=c[m>>2]|0;aF(10,C|0)}j6(56952,202256,68520)}else if((x|0)==81){jU()}else if((x|0)==75){C=c[p+(G*40&-1)+36>>2]|0;L10161:do{if((a[p+(G*40&-1)|0]&1)!=0&(C|0)>0){w=0;E=0;F=c[p+(G*40&-1)+32>>2]|0;while(1){if((a[w+115824|0]|0)==(a[u+(w+F|0)|0]|0)){af=F;ag=E}else{if((w|0)!=4){ah=G;break L10161}af=F-1|0;ag=1}D=w+1|0;if((D|0)<(ag+C|0)){w=D;E=ag;F=af}else{break}}if((ag|0)==0){if(!((w|0)==3|(w|0)==9)){ah=G;break}}F=l+3|0;c[13898]=F;ah=F}else{ah=G}}while(0);L10173:do{if((ah|0)<(c[8272]|0)){L10175:do{if((a[p+(ah*40&-1)|0]&1)!=0){C=c[p+(ah*40&-1)+36>>2]|0;F=p+(ah*40&-1)+32|0;E=0;while(1){if((E|0)>=(C|0)){break}if((a[u+((c[F>>2]|0)+E|0)|0]|0)==(a[E+103664|0]|0)){E=E+1|0}else{break L10175}}if((E|0)==1){ai=0;break L10173}}}while(0);w=is(d)|0;F=c[w>>2]|0;if((F|0)==1){aj=+(c[w+8>>2]|0)}else if((F|0)==2){aj=+h[w+8>>3]}else if((F|0)==3){aj=+uz(c[w+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}w=d|0;if((c[w>>2]|0)==3){uu(c[d+8>>2]|0);c[w>>2]=1}w=~~aj;if((w|0)<1){H=208936}else{ai=w;break}I=c[13898]|0;uf(I,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{ai=0}}while(0);aF(10,c[m>>2]|0);jj(c[m>>2]|0,ai)}else if((x|0)==120){if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=(c[17062]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56952,c[v+8>>2]=w,v)|0)}else if((x|0)==138){if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=(c[16202]|0)==1?141856:202784;cf(c[m>>2]|0,203352,(v=i,i=i+16|0,c[v>>2]=56832,c[v+8>>2]=w,v)|0)}else if((x|0)==24){jG()}else if((x|0)==150){cf(c[m>>2]|0,125408,(v=i,i=i+8|0,c[v>>2]=(a[27776]&1)!=0?179864:211688,v)|0)}else if((x|0)==152){jH(2);jH(1);jH(0)}else if((x|0)==155){jH(1)}else if((x|0)==154){jH(6)}else if((x|0)==156){jH(5)}else if((x|0)==157){jH(0)}else if((x|0)==28){jK()}else if((x|0)==35){jL()}else if((x|0)==56){if(!(a[928]|0)){w=c[m>>2]|0;aF(10,w|0)}w=(c[8764]|0)==2?88392:179864;ad=+h[4384];F=(c[6588]|0)==2?88392:179864;ac=+h[3296];C=(c[1057]|0)==2?88392:179864;ab=+h[531];D=(c[14091]|0)==2?88392:179864;S=+h[7048];cf(c[m>>2]|0,89120,(v=i,i=i+72|0,c[v>>2]=132528,c[v+8>>2]=w,h[v+16>>3]=ad,c[v+24>>2]=F,h[v+32>>3]=ac,c[v+40>>2]=C,h[v+48>>3]=ab,c[v+56>>2]=D,h[v+64>>3]=S,v)|0)}else if((x|0)==100){if(!(a[928]|0)){D=c[m>>2]|0;aF(10,D|0)}if((c[17922]|0)==1){D=c[m>>2]|0;cf(D|0,198344,(v=i,i=i+8|0,c[v>>2]=57072,v)|0)}aF(9,c[m>>2]|0);je(c[m>>2]|0,10)}else{H=223488;I=c[13898]|0;uf(I,H,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);a[25280]=0;aF(10,c[m>>2]|0);i=b;return}function jz(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}aI(106224,16,1,c[m>>2]|0);do{if((a[32936]&1)!=0){if((a[37384]&1)==0){d=c[17711]|0;e=c[m>>2]|0;f=d&3;g=(f|0)!=0?172456:172176;h=(f|0)==1?105824:179864;j=(f|0)==2?105728:179864;f=(d&4|0)!=0?105664:179864;k=(d&8|0)!=0?105608:179864;cf(e|0,105872,(v=i,i=i+48|0,c[v>>2]=57048,c[v+8>>2]=g,c[v+16>>2]=h,c[v+24>>2]=j,c[v+32>>2]=f,c[v+40>>2]=k,v)|0);k=c[17883]|0;f=c[m>>2]|0;j=k&3;h=(j|0)!=0?172456:172176;g=(j|0)==1?105824:179864;e=(j|0)==2?105728:179864;j=(k&4|0)!=0?105664:179864;d=(k&8|0)!=0?105608:179864;cf(f|0,105872,(v=i,i=i+48|0,c[v>>2]=57072,c[v+8>>2]=h,c[v+16>>2]=g,c[v+24>>2]=e,c[v+32>>2]=j,c[v+40>>2]=d,v)|0);break}else{d=c[17539]|0;j=c[m>>2]|0;e=d&3;g=(e|0)!=0?172456:172176;h=(e|0)==1?105824:179864;f=(e|0)==2?105728:179864;e=(d&4|0)!=0?105664:179864;k=(d&8|0)!=0?105608:179864;cf(j|0,105872,(v=i,i=i+48|0,c[v>>2]=57024,c[v+8>>2]=g,c[v+16>>2]=h,c[v+24>>2]=f,c[v+32>>2]=e,c[v+40>>2]=k,v)|0);break}}}while(0);if((a[30528]&1)!=0){k=c[17367]|0;e=c[m>>2]|0;f=k&3;h=(f|0)!=0?172456:172176;g=(f|0)==1?105824:179864;j=(f|0)==2?105728:179864;f=(k&4|0)!=0?105664:179864;d=(k&8|0)!=0?105608:179864;cf(e|0,105872,(v=i,i=i+48|0,c[v>>2]=57e3,c[v+8>>2]=h,c[v+16>>2]=g,c[v+24>>2]=j,c[v+32>>2]=f,c[v+40>>2]=d,v)|0)}d=c[16507]|0;f=d&3;cf(c[m>>2]|0,105872,(v=i,i=i+48|0,c[v>>2]=56880,c[v+8>>2]=(f|0)!=0?172456:172176,c[v+16>>2]=(f|0)==1?105824:179864,c[v+24>>2]=(f|0)==2?105728:179864,c[v+32>>2]=(d&4|0)!=0?105664:179864,c[v+40>>2]=(d&8|0)!=0?105608:179864,v)|0);d=c[16335]|0;f=d&3;cf(c[m>>2]|0,105872,(v=i,i=i+48|0,c[v>>2]=56856,c[v+8>>2]=(f|0)!=0?172456:172176,c[v+16>>2]=(f|0)==1?105824:179864,c[v+24>>2]=(f|0)==2?105728:179864,c[v+32>>2]=(d&4|0)!=0?105664:179864,c[v+40>>2]=(d&8|0)!=0?105608:179864,v)|0);aI(105360,17,1,c[m>>2]|0);d=c[17195]|0;f=d&3;cf(c[m>>2]|0,105872,(v=i,i=i+48|0,c[v>>2]=56976,c[v+8>>2]=(f|0)!=0?172456:172176,c[v+16>>2]=(f|0)==1?105824:179864,c[v+24>>2]=(f|0)==2?105728:179864,c[v+32>>2]=(d&4|0)!=0?105664:179864,c[v+40>>2]=(d&8|0)!=0?105608:179864,v)|0);d=c[17023]|0;f=d&3;cf(c[m>>2]|0,105872,(v=i,i=i+48|0,c[v>>2]=56952,c[v+8>>2]=(f|0)!=0?172456:172176,c[v+16>>2]=(f|0)==1?105824:179864,c[v+24>>2]=(f|0)==2?105728:179864,c[v+32>>2]=(d&4|0)!=0?105664:179864,c[v+40>>2]=(d&8|0)!=0?105608:179864,v)|0);aI(105360,17,1,c[m>>2]|0);d=c[16163]|0;f=d&3;cf(c[m>>2]|0,105872,(v=i,i=i+48|0,c[v>>2]=56832,c[v+8>>2]=(f|0)!=0?172456:172176,c[v+16>>2]=(f|0)==1?105824:179864,c[v+24>>2]=(f|0)==2?105728:179864,c[v+32>>2]=(d&4|0)!=0?105664:179864,c[v+40>>2]=(d&8|0)!=0?105608:179864,v)|0);d=c[16679]|0;f=d&3;cf(c[m>>2]|0,105872,(v=i,i=i+48|0,c[v>>2]=56904,c[v+8>>2]=(f|0)!=0?172456:172176,c[v+16>>2]=(f|0)==1?105824:179864,c[v+24>>2]=(f|0)==2?105728:179864,c[v+32>>2]=(d&4|0)!=0?105664:179864,c[v+40>>2]=(d&8|0)!=0?105608:179864,v)|0);i=b;return}function jA(){var b=0,d=0,e=0,f=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}d=c[11692]|0;e=c[m>>2]|0;if((d|0)==0){aI(106520,21,1,e|0);i=b;return}else{f=(c[14088]|0)==0?150704:150856;cf(e|0,106440,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=f,v)|0);ji(c[m>>2]|0,56296,0);f=c[m>>2]|0;aF(10,f|0);i=b;return}}function jB(){var b=0,d=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}cf(c[m>>2]|0,107344,(v=i,i=i+8|0,c[v>>2]=(a[54144]&1)!=0?172456:172176,v)|0);d=c[m>>2]|0;if((a[54160]&1)==0){aI(107184,55,1,d|0)}else{aI(107256,64,1,d|0)}d=c[m>>2]|0;if((a[54152]&1)==0){aI(106872,47,1,d|0);i=b;return}else{aI(107096,56,1,d|0);i=b;return}}function jC(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0.0,o=0.0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}cf(c[m>>2]|0,110616,(v=i,i=i+8|0,c[v>>2]=(c[11690]|0)!=0?179160:109736,v)|0);if((c[11690]|0)==0){i=b;return}cf(c[m>>2]|0,109312,(v=i,i=i+8|0,c[v>>2]=c[13374],v)|0);d=c[11690]|0;if((d|0)==1){e=c[m>>2]|0;aI(108736,10,1,e|0)}else if((d|0)==2){aI(108488,8,1,c[m>>2]|0)}else if((d|0)==3){aI(108392,22,1,c[m>>2]|0)}d=c[13378]|0;if((d|0)==0){e=c[m>>2]|0;aI(108304,21,1,e|0)}else if((d|0)==1){cf(c[m>>2]|0,108216,(v=i,i=i+8|0,c[v>>2]=c[13366],v)|0)}else if((d|0)==2){d=c[13366]|0;cf(c[m>>2]|0,108128,(v=i,i=i+16|0,c[v>>2]=c[13368],c[v+8>>2]=d,v)|0)}d=c[13372]|0;if((d|0)==0){e=c[m>>2]|0;f=c[13374]|0;cf(e|0,108056,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}else if((d|0)==2){cf(c[m>>2]|0,107816,(v=i,i=i+8|0,c[v>>2]=c[13374],v)|0);cf(c[m>>2]|0,170912,(v=i,i=i+8|0,h[v>>3]=+h[c[11662]>>3],v)|0);f=c[m>>2]|0;if((c[13374]|0)>1){e=1;g=f;while(1){cf(g|0,107648,(v=i,i=i+8|0,h[v>>3]=+h[(c[11662]|0)+(e<<3)>>3],v)|0);j=e+1|0;k=c[m>>2]|0;if((j|0)<(c[13374]|0)){e=j;g=k}else{l=k;break}}}else{l=f}aF(10,l|0)}else if((d|0)==1){d=c[13374]|0;l=c[11662]|0;n=+h[l>>3];o=+h[l+8>>3];cf(c[m>>2]|0,107544,(v=i,i=i+32|0,c[v>>2]=d,h[v+8>>3]=n,h[v+16>>3]=o,h[v+24>>3]=n+ +(d-1|0)*o,v)|0)}d=c[m>>2]|0;if((a[35888]&1)==0){aI(107400,37,1,d|0);i=b;return}else{cf(d|0,107464,(v=i,i=i+8|0,c[v>>2]=53520,v)|0);i=b;return}}function jD(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0.0,o=0.0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}if((a[47032]&1)==0){d=c[m>>2]|0;aI(111136,25,1,d|0);i=b;return}d=c[11752]|0;if((d|0)==1){e=c[m>>2]|0;f=c[11732]|0;g=c[11756]|0;j=c[11734]|0;cf(e|0,113384,(v=i,i=i+24|0,c[v>>2]=f,c[v+8>>2]=g,c[v+16>>2]=j,v)|0);i=b;return}j=c[m>>2]|0;g=c[11732]|0;f=c[11756]|0;if((d|0)==2){cf(j|0,113272,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=f,v)|0);i=b;return}else{k=-1}while(1){e=k+1|0;if((e|0)==7){l=0;break}if((c[46948+(e<<3)>>2]|0)==(d|0)){l=c[46944+(e<<3)>>2]|0;break}else{k=e}}n=+h[5865];o=+h[5864];k=(a[47016]&1)!=0?112728:179864;cf(j|0,113e3,(v=i,i=i+48|0,c[v>>2]=g,c[v+8>>2]=f,c[v+16>>2]=l,h[v+24>>3]=n,h[v+32>>3]=o,c[v+40>>2]=k,v)|0);i=b;return}function jE(){var b=0,d=0;if(!(a[928]|0)){b=c[m>>2]|0;aF(10,b|0)}aI(114040,25,1,c[m>>2]|0);b=c[8732]|0;if((b|0)==1){d=c[m>>2]|0;aI(113784,10,1,d|0);return}else if((b|0)==0){aI(113904,10,1,c[m>>2]|0);return}else if((b|0)==2){aI(113712,12,1,c[m>>2]|0);return}else{return}}function jF(){var b=0,d=0,e=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}aI(114560,16,1,c[m>>2]|0);d=c[m>>2]|0;e=j3(66240)|0;cf(d|0,114480,(v=i,i=i+16|0,c[v>>2]=56880,c[v+8>>2]=e,v)|0);e=c[m>>2]|0;d=j3(65552)|0;cf(e|0,114480,(v=i,i=i+16|0,c[v>>2]=56856,c[v+8>>2]=d,v)|0);d=c[m>>2]|0;e=j3(68992)|0;cf(d|0,114480,(v=i,i=i+16|0,c[v>>2]=56976,c[v+8>>2]=e,v)|0);e=c[m>>2]|0;d=j3(68304)|0;cf(e|0,114480,(v=i,i=i+16|0,c[v>>2]=56952,c[v+8>>2]=d,v)|0);d=c[m>>2]|0;e=j3(64864)|0;cf(d|0,114480,(v=i,i=i+16|0,c[v>>2]=56832,c[v+8>>2]=e,v)|0);e=c[m>>2]|0;d=j3(66928)|0;cf(e|0,114480,(v=i,i=i+16|0,c[v>>2]=56904,c[v+8>>2]=d,v)|0);d=c[m>>2]|0;e=j3(69680)|0;cf(d|0,114480,(v=i,i=i+16|0,c[v>>2]=57e3,c[v+8>>2]=e,v)|0);i=b;return}function jG(){var b=0,d=0,e=0,f=0,g=0.0,j=0.0,k=0.0,l=0;b=i;if(a[928]|0){d=0}else{e=c[m>>2]|0;aF(10,e|0);d=0}while(1){if(d>>>0>=8){f=7559;break}if((a[65036+(d*688&-1)|0]&1)!=0){break}if((a[65037+(d*688&-1)|0]&1)==0){d=d+1|0}else{break}}if((f|0)==7559){f=c[m>>2]|0;aI(125328,13,1,f|0);i=b;return}cf(c[m>>2]|0,125104,(v=i,i=i+8|0,c[v>>2]=+h[3815]!=0.0?124928:124832,v)|0);if((a[66412]&1)!=0){f=c[m>>2]|0;cf(f|0,124744,(v=i,i=i+8|0,c[v>>2]=56880,v)|0)}if((a[66413]&1)!=0){f=c[m>>2]|0;cf(f|0,124664,(v=i,i=i+8|0,c[v>>2]=56880,v)|0)}if((a[65724]&1)!=0){f=c[m>>2]|0;cf(f|0,124744,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}if((a[65725]&1)!=0){f=c[m>>2]|0;cf(f|0,124664,(v=i,i=i+8|0,c[v>>2]=56856,v)|0)}if((a[69164]&1)!=0){f=c[m>>2]|0;cf(f|0,124744,(v=i,i=i+8|0,c[v>>2]=56976,v)|0)}if((a[69165]&1)!=0){f=c[m>>2]|0;cf(f|0,124664,(v=i,i=i+8|0,c[v>>2]=56976,v)|0)}if((a[68476]&1)!=0){f=c[m>>2]|0;cf(f|0,124744,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}if((a[68477]&1)!=0){f=c[m>>2]|0;cf(f|0,124664,(v=i,i=i+8|0,c[v>>2]=56952,v)|0)}if((a[65036]&1)!=0){f=c[m>>2]|0;cf(f|0,124744,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}if((a[65037]&1)!=0){f=c[m>>2]|0;cf(f|0,124664,(v=i,i=i+8|0,c[v>>2]=56832,v)|0)}if((a[67100]&1)!=0){f=c[m>>2]|0;cf(f|0,124744,(v=i,i=i+8|0,c[v>>2]=56904,v)|0)}if((a[67101]&1)!=0){f=c[m>>2]|0;cf(f|0,124664,(v=i,i=i+8|0,c[v>>2]=56904,v)|0)}if((a[69852]&1)!=0){f=c[m>>2]|0;cf(f|0,124744,(v=i,i=i+8|0,c[v>>2]=57e3,v)|0)}if((a[69853]&1)!=0){f=c[m>>2]|0;cf(f|0,124664,(v=i,i=i+8|0,c[v>>2]=57e3,v)|0)}aI(124552,6,1,c[m>>2]|0);aI(124400,22,1,c[m>>2]|0);ji(c[m>>2]|0,40048,0);aI(124312,23,1,c[m>>2]|0);ji(c[m>>2]|0,34776,0);aF(10,c[m>>2]|0);g=+h[3815];if(g!=0.0){f=c[m>>2]|0;j=+h[9040];k=g/j;d=j==1.0?124080:123976;cf(f|0,124200,(v=i,i=i+16|0,h[v>>3]=k,c[v+8>>2]=d,v)|0)}d=c[10026]|0;if((d|0)==-1){l=123760}else{l=(d|0)==0?150704:150856}cf(c[m>>2]|0,123840,(v=i,i=i+8|0,c[v>>2]=l,v)|0);i=b;return}function jH(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;e=b;while(1){if(!(a[928]|0)){b=c[m>>2]|0;aF(10,b|0)}b=c[m>>2]|0;f=56832+(e*24&-1)|0;if((c[65284+(e*688&-1)>>2]|0)>-3){g=65280+(e*688&-1)|0;cf(b|0,125624,(v=i,i=i+8|0,c[v>>2]=f,v)|0);ji(c[m>>2]|0,g,0);g=c[m>>2]|0;aF(10,g|0)}else{cf(b|0,125528,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}if(e>>>0<4){e=e+4|0}else{break}}i=d;return}function jI(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0;d=i;i=i+2056|0;e=d|0;f=d+8|0;g=e|0;a[g]=35;h=e+5|0;j=e+1|0;w=538976288;a[j]=w&255;w=w>>8;a[j+1|0]=w&255;w=w>>8;a[j+2|0]=w&255;w=w>>8;a[j+3|0]=w&255;a[h]=0;if((c[13388]|0)==0){j=ut(1024)|0;do{if((j|0)==0){gk();e=ut(1024)|0;if((e|0)!=0){k=e;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=216448,v)|0)}else{k=j}}while(0);c[13388]=k;be(k|0,163128,(v=i,i=i+88|0,c[v>>2]=211088,c[v+8>>2]=204752,c[v+16>>2]=184880,c[v+24>>2]=179760,c[v+32>>2]=201520,c[v+40>>2]=179864,c[v+48>>2]=175632,c[v+56>>2]=179864,c[v+64>>2]=171680,c[v+72>>2]=179864,c[v+80>>2]=167488,v)|0);k=c[13388]|0;c[13388]=db(k,(uA(k|0)|0)+1|0,216448)|0}if((b|0)==0){i=d;return}if((c[m>>2]|0)==(b|0)){l=h}else{cf(b|0,154128,(v=i,i=i+8|0,c[v>>2]=151008,v)|0);l=g}g=f|0;uD(g|0,149072,187);uD(f+(uA(g|0)|0)|0,147160,95);cf(b|0,g|0,(v=i,i=i+144|0,c[v>>2]=l,c[v+8>>2]=l,c[v+16>>2]=145064,c[v+24>>2]=l,c[v+32>>2]=40152,c[v+40>>2]=40160,c[v+48>>2]=40168,c[v+56>>2]=l,c[v+64>>2]=33040,c[v+72>>2]=33008,c[v+80>>2]=l,c[v+88>>2]=l,c[v+96>>2]=40184,c[v+104>>2]=l,c[v+112>>2]=l,c[v+120>>2]=l,c[v+128>>2]=l,c[v+136>>2]=l,v)|0);l=c[13898]|0;g=c[1054]|0;b=c[g+(l*40&-1)+36>>2]|0;if(!((a[g+(l*40&-1)|0]&1)!=0&(b|0)>0)){i=d;return}f=c[10036]|0;h=0;k=0;j=c[g+(l*40&-1)+32>>2]|0;while(1){if((a[h+143320|0]|0)==(a[f+(h+j|0)|0]|0)){n=j;o=k}else{if((h|0)!=1){p=7623;break}n=j-1|0;o=1}g=h+1|0;if((g|0)<(o+b|0)){h=g;k=o;j=n}else{break}}if((p|0)==7623){i=d;return}do{if((o|0)==0){if((h|0)==0|(h|0)==4){break}i=d;return}}while(0);c[13898]=l+1;cf(c[m>>2]|0,141816,(v=i,i=i+8|0,c[v>>2]=c[13388],v)|0);l=bU(140128)|0;cf(c[m>>2]|0,136384,(v=i,i=i+8|0,c[v>>2]=195896,v)|0);cf(c[m>>2]|0,132976,(v=i,i=i+8|0,c[v>>2]=(l|0)==0?138024:l,v)|0);i=d;return}function jJ(){var b=0,d=0,e=0,f=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}d=c[m>>2]|0;e=j3(36288)|0;cf(d|0,128328,(v=i,i=i+8|0,c[v>>2]=e,v)|0);e=c[9329]|0;do{if((e|0)!=0){if((a[e]|0)==0){break}d=c[m>>2]|0;cf(d|0,82560,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}}while(0);if((c[9330]|0)==1&(c[9331]|0)==-2){i=b;return}aI(84256,2,1,c[m>>2]|0);e=c[m>>2]|0;if((c[9330]|0)==0){f=e}else{aI(145280,10,1,e|0);jg(e,37320);f=c[m>>2]|0}aF(10,f|0);i=b;return}function jK(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0.0,l=0,n=0.0,o=0,p=0.0,q=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}if((a[36120]&1)==0){d=c[m>>2]|0;aI(131736,12,1,d|0);i=b;return}d=c[9031]|0;if((d|0)==0|(d|0)==1|(d|0)==2){e=c[m>>2]|0;aI(131624,22,1,e|0);if((c[9031]|0)==2&(c[9032]|0)>>>0<2){f=7651}else{e=c[9044]|0;do{if((e|0)==0){g=c[m>>2]|0;aI(196168,3,1,g|0)}else{g=c[m>>2]|0;if((e|0)==2){aI(196800,6,1,g|0);break}else{aI(89896,6,1,g|0);break}}}while(0);if((c[9031]|0)==2){f=7651}else{f=7652}}if((f|0)==7651){if(((c[9032]|0)-2|0)>>>0>=2){f=7652}}do{if((f|0)==7652){e=c[9045]|0;if((e|0)==0){g=c[m>>2]|0;aI(131440,5,1,g|0);break}else if((e|0)==2){aI(131280,6,1,c[m>>2]|0);break}else{if((c[9044]|0)==1){break}aI(131216,7,1,c[m>>2]|0);break}}}while(0);f=c[m>>2]|0;if((c[9047]|0)==0){aI(131080,9,1,f|0)}else{aI(130936,11,1,f|0)}f=c[9031]|0;do{if((f|0)==0){e=c[m>>2]|0;aI(130784,7,1,e|0)}else if((f|0)==1){aI(130648,8,1,c[m>>2]|0)}else{e=c[9032]|0;if((e|0)==1){g=c[m>>2]|0;aI(130432,8,1,g|0);break}else if((e|0)==2){aI(130336,8,1,c[m>>2]|0);break}else if((e|0)==0){aI(130512,8,1,c[m>>2]|0);break}else if((e|0)==3){aI(130288,8,1,c[m>>2]|0);break}else{break}}}while(0);f=c[m>>2]|0;aF(10,f|0)}else if((d|0)==3){aI(130224,11,1,c[m>>2]|0);d=c[9034]|0;if((d|0)==0){j=179864}else{j=c[21784+(d<<2)>>2]|0}k=+h[4519];f=c[9035]|0;if((f|0)==(d|0)){l=179864}else{l=c[21784+(f<<2)>>2]|0}n=+h[4520];d=c[9036]|0;if((d|0)==(f|0)){o=179864}else{o=c[21784+(d<<2)>>2]|0}p=+h[4521];cf(c[m>>2]|0,77392,(v=i,i=i+48|0,c[v>>2]=j,h[v+8>>3]=k,c[v+16>>2]=l,h[v+24>>3]=n,c[v+32>>2]=o,h[v+40>>3]=p,v)|0);aF(10,c[m>>2]|0)}o=(a[36229]&1)!=0?179864:211688;l=(a[36230]&1)!=0?179864:211688;j=(a[36231]&1)!=0?179864:211688;cf(c[m>>2]|0,130072,(v=i,i=i+32|0,c[v>>2]=(c[9046]|0)==0?130008:129888,c[v+8>>2]=o,c[v+16>>2]=l,c[v+24>>2]=j,v)|0);j=c[m>>2]|0;if((c[9059]|0)>-3){aI(129760,12,1,j|0);ji(c[m>>2]|0,36232,0);l=c[m>>2]|0;aF(10,l|0)}else{aI(129608,10,1,j|0)}if((a[36228]&1)!=0){j=c[m>>2]|0;aI(129416,51,1,j|0)}p=+h[4525];n=+h[4526];k=+h[4527];j=c[9056]|0;if((j|0)==1){q=129016}else{q=(j|0)==2?128920:179864}cf(c[m>>2]|0,129128,(v=i,i=i+48|0,h[v>>3]=+h[4524],h[v+8>>3]=p,h[v+16>>3]=n,h[v+24>>3]=k,c[v+32>>2]=(j|0)!=0?179864:171496,c[v+40>>2]=q,v)|0);aI(128800,30,1,c[m>>2]|0);q=c[9338]|0;j=c[m>>2]|0;if((q|0)>0){cf(j|0,128688,(v=i,i=i+8|0,c[v>>2]=q,v)|0)}else{aI(128592,25,1,j|0)}aI(128504,27,1,c[m>>2]|0);j=c[9339]|0;q=c[m>>2]|0;if((j|0)>0){cf(q|0,128432,(v=i,i=i+8|0,c[v>>2]=j,v)|0)}else{aI(128592,25,1,q|0)}jJ();i=b;return}function jL(){var b=0,d=0,e=0,f=0.0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}if((a[66164]&1)==0){e=0}else{d=c[m>>2]|0;f=+h[8271];cf(d|0,132416,(v=i,i=i+24|0,c[v>>2]=132288,c[v+8>>2]=56880,h[v+16>>3]=f,v)|0);e=1}if((a[65476]&1)==0){g=e}else{d=c[m>>2]|0;j=e+1|0;k=(e|0)==0?132288:132144;f=+h[8185];cf(d|0,132416,(v=i,i=i+24|0,c[v>>2]=k,c[v+8>>2]=56856,h[v+16>>3]=f,v)|0);g=j}if((a[64788]&1)==0){l=g}else{j=c[m>>2]|0;k=g+1|0;d=(g|0)==0?132288:132144;f=+h[8099];cf(j|0,132416,(v=i,i=i+24|0,c[v>>2]=d,c[v+8>>2]=56832,h[v+16>>3]=f,v)|0);l=k}if((a[68916]&1)==0){n=l}else{k=c[m>>2]|0;d=l+1|0;j=(l|0)==0?132288:132144;f=+h[8615];cf(k|0,132416,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=56976,h[v+16>>3]=f,v)|0);n=d}if((a[68228]&1)==0){o=n}else{d=c[m>>2]|0;j=n+1|0;k=(n|0)==0?132288:132144;f=+h[8529];cf(d|0,132416,(v=i,i=i+24|0,c[v>>2]=k,c[v+8>>2]=56952,h[v+16>>3]=f,v)|0);o=j}if((a[66852]&1)==0){p=o}else{j=c[m>>2]|0;k=o+1|0;d=(o|0)==0?132288:132144;f=+h[8357];cf(j|0,132416,(v=i,i=i+24|0,c[v>>2]=d,c[v+8>>2]=56904,h[v+16>>3]=f,v)|0);p=k}if((a[69604]&1)==0){q=p}else{k=c[m>>2]|0;d=p+1|0;j=(p|0)==0?132288:132144;f=+h[8701];cf(k|0,132416,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=57e3,h[v+16>>3]=f,v)|0);q=d}if((q|0)==0){d=c[m>>2]|0;aI(132064,15,1,d|0);i=b;return}d=c[m>>2]|0;if((q|0)==1){aI(131968,6,1,d|0);i=b;return}else{aF(10,d|0);i=b;return}}function jM(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0,w=0.0,x=0,y=0.0,z=0,A=0,B=0;d=i;e=c[10822]|0;if((e|0)==0){f=0}else{g=(b|0)==0;j=0;k=e;while(1){e=c[k+4>>2]|0;if(g){l=e;n=7722}else{if((e|0)==(b|0)){l=b;n=7722}else{o=j}}if((n|0)==7722){n=0;e=c[m>>2]|0;p=c[k+60>>2]|0;if((p|0)==0){q=179864}else{q=j3(p)|0}cf(e|0,126584,(v=i,i=i+16|0,c[v>>2]=l,c[v+8>>2]=q,v)|0);e=c[m>>2]|0;p=c[k+8>>2]|0;if((p|0)==0){r=179864}else{r=c[21784+(p<<2)>>2]|0}s=+h[k+24>>3];t=c[k+12>>2]|0;if((t|0)==(p|0)){u=179864}else{u=c[21784+(t<<2)>>2]|0}w=+h[k+32>>3];p=c[k+16>>2]|0;if((p|0)==(t|0)){x=179864}else{x=c[21784+(p<<2)>>2]|0}y=+h[k+40>>3];cf(e|0,77392,(v=i,i=i+48|0,c[v>>2]=r,h[v+8>>3]=s,c[v+16>>2]=u,h[v+24>>3]=w,c[v+32>>2]=x,h[v+40>>3]=y,v)|0);e=c[k+48>>2]|0;if((e|0)==1){p=c[m>>2]|0;aI(126448,7,1,p|0)}else if((e|0)==2){aI(131280,6,1,c[m>>2]|0)}else if((e|0)==0){aI(131440,5,1,c[m>>2]|0)}e=c[k+52>>2]|0;p=c[m>>2]|0;if((e|0)==0){aI(126264,12,1,p|0)}else{cf(p|0,126328,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}e=c[m>>2]|0;p=(c[k+56>>2]|0)!=0?150856:150704;cf(e|0,126160,(v=i,i=i+8|0,c[v>>2]=p,v)|0);p=c[k+64>>2]|0;if((p|0)!=0){e=c[m>>2]|0;cf(e|0,126104,(v=i,i=i+8|0,c[v>>2]=p,v)|0)}p=k+72|0;if((c[p>>2]|0)!=0){e=c[m>>2]|0;aI(145280,10,1,e|0);jg(e,p)}if((a[k+184|0]&1)!=0){p=c[m>>2]|0;aI(199048,11,1,p|0)}p=k+88|0;e=c[m>>2]|0;if((c[p>>2]|0)==0){aI(126e3,8,1,e|0)}else{aI(125912,20,1,e|0);ji(c[m>>2]|0,p,1);p=c[m>>2]|0;e=c[k+144>>2]|0;if((e|0)==0){z=179864}else{z=c[21784+(e<<2)>>2]|0}y=+h[k+160>>3];t=c[k+148>>2]|0;if((t|0)==(e|0)){A=179864}else{A=c[21784+(t<<2)>>2]|0}w=+h[k+168>>3];e=c[k+152>>2]|0;if((e|0)==(t|0)){B=179864}else{B=c[21784+(e<<2)>>2]|0}s=+h[k+176>>3];cf(p|0,77392,(v=i,i=i+48|0,c[v>>2]=z,h[v+8>>3]=y,c[v+16>>2]=A,h[v+24>>3]=w,c[v+32>>2]=B,h[v+40>>3]=s,v)|0)}p=c[m>>2]|0;aF(10,p|0);o=1}p=c[k>>2]|0;if((p|0)==0){f=o;break}else{j=o;k=p}}}if((b|0)<1|f){i=d;return}else{uf(c[13898]|0,125760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function jN(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0,w=0,x=0.0,y=0,z=0.0,A=0,B=0,C=0,D=0;d=i;e=c[10826]|0;if((e|0)==0){f=0}else{g=(b|0)==0;j=0;k=e;while(1){e=c[k+4>>2]|0;if(g){l=e;n=7761}else{if((e|0)==(b|0)){l=b;n=7761}else{o=j}}if((n|0)==7761){n=0;e=c[m>>2]|0;p=c[72304+(c[k+160>>2]<<2)>>2]|0;q=k+200|0;r=c[q>>2]|0;if((r|0)==2){s=128e3}else{s=(r|0)==1?127904:127768}r=(c[k+100>>2]|0)!=0?150856:150704;cf(e|0,128128,(v=i,i=i+32|0,c[v>>2]=l,c[v+8>>2]=p,c[v+16>>2]=s,c[v+24>>2]=r,v)|0);ji(c[m>>2]|0,k+104|0,0);r=c[m>>2]|0;aI(127616,9,1,r|0);r=c[m>>2]|0;p=c[k+8>>2]|0;if((p|0)==0){t=179864}else{t=c[21784+(p<<2)>>2]|0}u=+h[k+24>>3];e=c[k+12>>2]|0;if((e|0)==(p|0)){w=179864}else{w=c[21784+(e<<2)>>2]|0}x=+h[k+32>>3];p=c[k+16>>2]|0;if((p|0)==(e|0)){y=179864}else{y=c[21784+(p<<2)>>2]|0}z=+h[k+40>>3];cf(r|0,77392,(v=i,i=i+48|0,c[v>>2]=t,h[v+8>>3]=u,c[v+16>>2]=w,h[v+24>>3]=x,c[v+32>>2]=y,h[v+40>>3]=z,v)|0);r=(a[k+88|0]&1)!=0?127520:127448;p=c[m>>2]|0;aK(r|0,p|0);p=c[m>>2]|0;r=c[k+48>>2]|0;if((r|0)==0){A=179864}else{A=c[21784+(r<<2)>>2]|0}z=+h[k+64>>3];e=c[k+52>>2]|0;if((e|0)==(r|0)){B=179864}else{B=c[21784+(e<<2)>>2]|0}x=+h[k+72>>3];r=c[k+56>>2]|0;if((r|0)==(e|0)){C=179864}else{C=c[21784+(r<<2)>>2]|0}u=+h[k+80>>3];cf(p|0,77392,(v=i,i=i+48|0,c[v>>2]=A,h[v+8>>3]=z,c[v+16>>2]=B,h[v+24>>3]=x,c[v+32>>2]=C,h[v+40>>3]=u,v)|0);u=+h[k+168>>3];do{if(u>0.0){p=c[m>>2]|0;r=c[k+176>>2]|0;if((r|0)==0){D=179864}else{D=c[21832+(r<<2)>>2]|0}x=+h[k+184>>3];cf(p|0,126992,(v=i,i=i+24|0,c[v>>2]=D,h[v+8>>3]=u,h[v+16>>3]=x,v)|0);if((c[q>>2]|0)==0){break}p=c[m>>2]|0;x=+h[k+192>>3];cf(p|0,126792,(v=i,i=i+8|0,h[v>>3]=x,v)|0)}}while(0);q=c[m>>2]|0;aF(10,q|0);o=1}q=c[k>>2]|0;if((q|0)==0){f=o;break}else{j=o;k=q}}}if((b|0)<1|f){i=d;return}else{uf(c[13898]|0,134376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function jO(){var b=0,d=0,e=0.0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}do{if((c[8786]|0)==3){d=c[m>>2]|0;e=+h[4395];cf(d|0,134456,(v=i,i=i+8|0,h[v>>3]=e,v)|0)}else{e=+h[4395];d=c[m>>2]|0;if(e<0.0){aI(134096,35,1,d|0);break}else{cf(d|0,134296,(v=i,i=i+8|0,h[v>>3]=e,v)|0);break}}}while(0);do{if((c[14100]|0)==3){d=c[m>>2]|0;e=+h[7052];cf(d|0,133952,(v=i,i=i+8|0,h[v>>3]=e,v)|0)}else{e=+h[7052];d=c[m>>2]|0;if(e<0.0){aI(133664,35,1,d|0);break}else{cf(d|0,133816,(v=i,i=i+8|0,h[v>>3]=e,v)|0);break}}}while(0);do{if((c[6598]|0)==3){d=c[m>>2]|0;e=+h[3301];cf(d|0,133536,(v=i,i=i+8|0,h[v>>3]=e,v)|0)}else{e=+h[3301];d=c[m>>2]|0;if(e<0.0){aI(133048,35,1,d|0);break}else{cf(d|0,133360,(v=i,i=i+8|0,h[v>>3]=e,v)|0);break}}}while(0);if((c[1066]|0)==3){d=c[m>>2]|0;e=+h[535];cf(d|0,132872,(v=i,i=i+8|0,h[v>>3]=e,v)|0);i=b;return}e=+h[535];d=c[m>>2]|0;if(e<0.0){aI(132592,35,1,d|0);i=b;return}else{cf(d|0,132720,(v=i,i=i+8|0,h[v>>3]=e,v)|0);i=b;return}}function jP(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;c[13898]=(c[13898]|0)+1;cf(c[m>>2]|0,166536,(v=i,i=i+8|0,c[v>>2]=(c[7662]|0)==1?166152:165672,v)|0);aI(165320,17,1,c[m>>2]|0);d=a[30632]|0;if(d<<24>>24!=0){e=0;f=30632;g=d;do{if((e|0)>0){d=c[m>>2]|0;aI(164904,7,1,d|0);h=a[f]|0}else{h=g}d=h<<24>>24;if((d|0)==98){j=c[m>>2]|0;aI(164432,6,1,j|0)}else if((d|0)==115){aI(163992,7,1,c[m>>2]|0)}else if((d|0)==116){aI(163304,3,1,c[m>>2]|0)}e=e+1|0;f=e+30632|0;g=a[f]|0;}while(g<<24>>24!=0)}aF(10,c[m>>2]|0);g=a[30641]|0;do{if(g<<24>>24==100){f=c[m>>2]|0;aI(162824,21,1,f|0)}else{f=c[m>>2]|0;if(g<<24>>24==97){aI(158600,38,1,f|0);break}else{e=g<<24>>24==102?159744:159048;cf(f|0,162192,(v=i,i=i+8|0,c[v>>2]=e,v)|0);break}}}while(0);aI(157984,47,1,c[m>>2]|0);g=a[30639]|0;e=c[m>>2]|0;if(g<<24>>24==99){aI(156096,9,1,e|0)}else{f=g<<24>>24==98?154664:154352;cf(e|0,155016,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}cf(c[m>>2]|0,153960,(v=i,i=i+8|0,c[v>>2]=(a[30640]|0)!=0?179864:211688,v)|0);aI(153600,11,1,c[m>>2]|0);f=c[m>>2]|0;if((a[30642]|0)==49){aI(153160,49,1,f|0)}else{aI(152728,45,1,f|0)}f=c[7661]|0;e=c[m>>2]|0;if((f|0)>0){cf(e|0,152344,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}else{g=(f|0)!=0?150376:150208;cf(e|0,152016,(v=i,i=i+8|0,c[v>>2]=g,v)|0)}g=c[7665]|0;cf(c[m>>2]|0,151768,(v=i,i=i+16|0,c[v>>2]=c[7664],c[v+8>>2]=g,v)|0);aI(151600,31,1,c[m>>2]|0);g=c[7663]|0;if((g|0)==8){e=c[m>>2]|0;aI(150536,21,1,e|0);i=b;return}else if((g|0)==7){aI(150712,21,1,c[m>>2]|0);i=b;return}else if((g|0)==4){aI(151368,19,1,c[m>>2]|0);i=b;return}else if((g|0)==5){aI(151064,30,1,c[m>>2]|0);i=b;return}else if((g|0)==6){aI(150872,20,1,c[m>>2]|0);i=b;return}else{cf(c[m>>2]|0,150400,(v=i,i=i+8|0,c[v>>2]=g+1,v)|0);i=b;return}}function jQ(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0.0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0.0,ax=0.0,ay=0.0,az=0,aA=0,aB=0;b=i;i=i+48|0;d=b|0;e=b+24|0;f=c[13898]|0;g=c[8272]|0;do{if((f|0)<(g|0)){j=c[1054]|0;k=(a[j+(f*40&-1)|0]&1)==0;if(k){uf(f,141144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=c[j+(f*40&-1)+36>>2]|0;o=j+(f*40&-1)+32|0;p=c[10036]|0;q=0;while(1){if((q|0)>=(l|0)){r=7852;break}if((a[p+((c[o>>2]|0)+q|0)|0]|0)==(a[q+103664|0]|0)){q=q+1|0}else{break}}if((r|0)==7852){if((q|0)==1){break}}p=c[o>>2]|0;if(k){uf(f,141144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if((l|0)>0){s=c[10036]|0;t=0;u=0;w=p;while(1){if((a[t+205488|0]|0)==(a[s+(t+w|0)|0]|0)){x=w;y=u}else{if((t|0)!=3){break}x=w-1|0;y=1}z=t+1|0;if((z|0)<(y+l|0)){t=z;u=y;w=x}else{r=7882;break}}do{if((r|0)==7882){if((y|0)==0){if(!((t|0)==2|(t|0)==7)){break}}w=f+1|0;c[13898]=w;if((w|0)>=(g|0)){uf(w,138608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}L10757:do{if((a[j+(w*40&-1)|0]&1)!=0){u=c[j+(w*40&-1)+36>>2]|0;s=j+(w*40&-1)+32|0;z=c[10036]|0;A=0;while(1){if((A|0)>=(u|0)){break}if((a[z+((c[s>>2]|0)+A|0)|0]|0)==(a[A+103664|0]|0)){A=A+1|0}else{break L10757}}if((A|0)!=1){break}uf(w,138608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);w=is(d)|0;s=c[w>>2]|0;if((s|0)==1){B=+(c[w+8>>2]|0)}else if((s|0)==2){B=+h[w+8>>3]}else if((s|0)==3){B=+uz(c[w+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}w=d|0;if((c[w>>2]|0)==3){uu(c[d+8>>2]|0);c[w>>2]=1}w=~~B;s=(w|0)<2?128:w;w=c[13898]|0;do{if((w|0)<(c[8272]|0)){z=c[1054]|0;if((a[z+(w*40&-1)|0]&1)==0){uf(w,137944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}u=c[z+(w*40&-1)+36>>2]|0;C=z+(w*40&-1)+32|0;z=c[10036]|0;D=0;while(1){if((D|0)>=(u|0)){r=7903;break}E=c[C>>2]|0;if((a[z+(E+D|0)|0]|0)==(a[D+103664|0]|0)){D=D+1|0}else{F=E;break}}if((r|0)==7903){if((D|0)==1){G=0;break}F=c[C>>2]|0}if((u|0)>0){H=0;I=0;J=F}else{uf(w,137944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}while(1){if((a[H+138408|0]|0)==(a[z+(H+J|0)|0]|0)){K=J;L=I}else{if((H|0)!=1){M=0;N=0;O=F;r=7912;break}K=J-1|0;L=1}A=H+1|0;if((A|0)<(L+u|0)){H=A;I=L;J=K}else{r=7910;break}}do{if((r|0)==7910){if((L|0)!=0){P=1;break}if((H|0)==0|(H|0)==5){P=1}else{M=0;N=0;O=F;r=7912}}}while(0);do{if((r|0)==7912){while(1){r=0;if((a[M+138104|0]|0)==(a[z+(M+O|0)|0]|0)){Q=O;R=N}else{if((M|0)!=1){r=8045;break}Q=O-1|0;R=1}C=M+1|0;if((C|0)<(R+u|0)){M=C;N=R;O=Q;r=7912}else{break}}if((r|0)==8045){uf(w,137944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((R|0)!=0){P=2;break}if((M|0)==0|(M|0)==3){P=2;break}uf(w,137944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[13898]=w+1;G=P}else{G=0}}while(0);w=c[7262]|0;u=c[m>>2]|0;if((w|0)==0|(w|0)==(u|0)){S=1}else{S=(w|0)==(c[n>>2]|0)}z=(w|0)!=0?w:u;w=(c[5163]|0)==103?137656:137544;cf(u|0,137800,(v=i,i=i+16|0,c[v>>2]=w,c[v+8>>2]=s,v)|0);w=c[m>>2]|0;if(S){aI(137248,2,1,w|0)}else{u=c[7260]|0;cf(w|0,137360,(v=i,i=i+8|0,c[v>>2]=u,v)|0)}if((s|0)<=0){i=b;return}T=+(s-1|0);u=e|0;w=e+8|0;C=e+16|0;D=0;do{U=+(D|0)/T;if((a[20668]|0)==110){V=1.0-U}else{V=U}fq(V,e);U=+h[u>>3];W=+h[w>>3];X=+h[C>>3];A=~~(U*255.0+.5);E=~~(W*255.0+.5);Y=~~(X*255.0+.5);if((G|0)==1){cf(z|0,137184,(v=i,i=i+24|0,h[v>>3]=U,h[v+8>>3]=W,h[v+16>>3]=X,v)|0)}else if((G|0)==2){cf(z|0,137056,(v=i,i=i+24|0,c[v>>2]=A&255,c[v+8>>2]=E&255,c[v+16>>2]=Y&255,v)|0)}else{Z=A&255;A=E&255;E=Y&255;cf(z|0,138856,(v=i,i=i+88|0,c[v>>2]=D,h[v+8>>3]=V,h[v+16>>3]=U,h[v+24>>3]=W,h[v+32>>3]=X,c[v+40>>2]=Z,c[v+48>>2]=A,c[v+56>>2]=E,c[v+64>>2]=Z,c[v+72>>2]=A,c[v+80>>2]=E,v)|0)}D=D+1|0;}while((D|0)<(s|0));i=b;return}}while(0);if(k){uf(f,141144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}L10836:do{if((l|0)>0){t=c[10036]|0;s=0;D=0;z=p;while(1){if((a[s+142040|0]|0)==(a[t+(s+z|0)|0]|0)){_=z;$=D}else{if((s|0)!=3){break L10836}_=z-1|0;$=1}C=s+1|0;if((C|0)<($+l|0)){s=C;D=$;z=_}else{break}}if(($|0)==0){if(!((s|0)==2|(s|0)==8)){break}}c[13898]=f+1;if((c[5163]|0)!=100){z=c[m>>2]|0;aI(139016,47,1,z|0);i=b;return}if((c[5172]|0)>0){aa=0}else{i=b;return}do{z=c[5173]|0;T=+h[z+(aa<<5)>>3];X=+h[z+(aa<<5)+8>>3];W=+h[z+(aa<<5)+16>>3];U=+h[z+(aa<<5)+24>>3];z=~~(X*255.0+.5);D=~~(W*255.0+.5);t=~~(U*255.0+.5);cf(c[m>>2]|0,138856,(v=i,i=i+88|0,c[v>>2]=aa,h[v+8>>3]=T,h[v+16>>3]=X,h[v+24>>3]=W,h[v+32>>3]=U,c[v+40>>2]=z,c[v+48>>2]=D,c[v+56>>2]=t,c[v+64>>2]=z,c[v+72>>2]=D,c[v+80>>2]=t,v)|0);aa=aa+1|0;}while((aa|0)<(c[5172]|0));i=b;return}}while(0);if(k){uf(f,141144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((l|0)<=0){break}s=c[10036]|0;t=0;D=0;z=p;while(1){if((a[t+141864|0]|0)==(a[s+(t+z|0)|0]|0)){ab=z;ac=D}else{if((t|0)!=6){break}ab=z-1|0;ac=1}C=t+1|0;if((C|0)<(ac+l|0)){t=C;D=ac;z=ab}else{r=7954;break}}do{if((r|0)==7954){if((ac|0)==0){if(!((t|0)==5|(t|0)==11)){break}}z=c[m>>2]|0;D=c[5162]|0;cf(z|0,140040,(v=i,i=i+8|0,c[v>>2]=D,v)|0);if((a[c[7122]|0]|0)!=0){D=0;z=0;do{if(((D|0)%3&-1|0)==0){s=c[m>>2]|0;aI(139832,6,1,s|0)}s=c[28488+((z|1)<<2)>>2]|0;cf(c[m>>2]|0,139592,(v=i,i=i+16|0,c[v>>2]=D,c[v+8>>2]=s,v)|0);D=D+1|0;z=D<<1;}while((a[c[28488+(z<<2)>>2]|0]|0)!=0)}z=c[m>>2]|0;aF(10,z|0);z=c[m>>2]|0;aI(139400,62,1,z|0);z=c[m>>2]|0;D=(c[5162]|0)-1|0;cf(z|0,139168,(v=i,i=i+16|0,c[v>>2]=D,c[v+8>>2]=D,v)|0);c[13898]=(c[13898]|0)+1;i=b;return}}while(0);if(!k){break}uf(f,141144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);j=c[10036]|0;o=0;while(1){if((o|0)>=(l|0)){r=7965;break}if((a[j+(p+o|0)|0]|0)==(a[o+204344|0]|0)){o=o+1|0}else{r=7966;break}}if((r|0)==7965){if((o|0)!=6){r=7966}}do{if((r|0)==7966){if(!((l|0)>0&(k^1))){uf(f,141144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=c[10036]|0;q=0;t=0;D=p;while(1){if((a[q+141544|0]|0)==(a[j+(q+D|0)|0]|0)){ad=D;ae=t}else{if((q|0)!=5){break}ad=D-1|0;ae=1}z=q+1|0;if((z|0)<(ae+l|0)){q=z;t=ae;D=ad}else{r=7972;break}}if((r|0)==7972){if((ae|0)!=0){break}if((q|0)==4|(q|0)==10){break}}if(!((l|0)>0&(k^1))){uf(f,141144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}D=c[10036]|0;t=0;j=0;z=p;while(1){if((a[t+141352|0]|0)==(a[D+(t+z|0)|0]|0)){af=z;ag=j}else{if((t|0)!=7){r=8027;break}af=z-1|0;ag=1}s=t+1|0;if((s|0)<(ag+l|0)){t=s;j=ag;z=af}else{break}}if((r|0)==8027){uf(f,141144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if((ag|0)==0){if((t|0)==6|(t|0)==15){break}uf(f,141144,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);t=(c[5162]|0)-1|0;c[13898]=f+1;if((c[5163]|0)==114&(c[5174]|0)==114){z=c[m>>2]|0;j=c[5164]|0;D=c[5165]|0;q=c[5166]|0;cf(z|0,141008,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=D,c[v+16>>2]=q,v)|0);i=b;return}q=ut(768)|0;do{if((q|0)==0){gk();D=ut(768)|0;if((D|0)!=0){ah=D;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=140872,v)|0)}else{ah=q}}while(0);q=ah;D=0;do{fq(+(D|0)/31.0,q+(D*24&-1)|0);D=D+1|0;}while((D|0)<32);D=t<<1|1;j=D<<2;z=ut(j)|0;do{if((z|0)==0){gk();s=ut(j)|0;if((s|0)!=0){ai=s;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=140736,v)|0)}else{ai=z}}while(0);z=ai;do{if((t|0)>=0){s=0;do{c[z+(s<<2)>>2]=s;s=s+1|0;}while((s|0)<=(t|0));if((t|0)<1){break}else{aj=1}do{c[z+(aj+t<<2)>>2]=-aj;aj=aj+1|0;}while((aj|0)<=(t|0))}}while(0);t=ut(j)|0;do{if((t|0)==0){gk();s=ut(j)|0;if((s|0)!=0){ak=s;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=140536,v)|0)}else{ak=t}}while(0);t=ak;if((D|0)>0){j=0;while(1){s=ut(256)|0;if((s|0)==0){gk();C=ut(256)|0;if((C|0)==0){r=8003;break}else{al=C}}else{al=s}s=t+(j<<2)|0;c[s>>2]=al;C=z+(j<<2)|0;w=0;do{U=+fu(c[C>>2]|0,+(w|0)/31.0);h[(c[s>>2]|0)+(w<<3)>>3]=U;w=w+1|0;}while((w|0)<32);w=j+1|0;if((w|0)<(D|0)){j=w}else{am=0;an=0;ao=0;ap=8.988465674311579e+307;aq=0;break}}if((r|0)==8003){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=140344,v)|0)}while(1){j=z+(aq<<2)|0;w=c[t+(aq<<2)>>2]|0;s=am;C=an;u=ao;U=ap;E=0;while(1){A=c[t+(E<<2)>>2]|0;Z=z+(E<<2)|0;Y=s;ar=C;as=u;W=U;at=0;while(1){au=c[t+(at<<2)>>2]|0;X=0.0;av=0;do{T=+h[q+(av*24&-1)>>3]- +h[w+(av<<3)>>3];aw=+h[q+(av*24&-1)+8>>3]- +h[A+(av<<3)>>3];ax=+h[q+(av*24&-1)+16>>3]- +h[au+(av<<3)>>3];X=X+(T*T+aw*aw+ax*ax);av=av+1|0;}while((av|0)<32);if(X>2]|0;aA=c[Z>>2]|0;aB=c[z+(at<<2)>>2]|0}else{ay=W;az=as;aA=ar;aB=Y}av=at+1|0;if((av|0)<(D|0)){Y=aB;ar=aA;as=az;W=ay;at=av}else{break}}at=E+1|0;if((at|0)<(D|0)){s=aB;C=aA;u=az;U=ay;E=at}else{break}}E=aq+1|0;if((E|0)<(D|0)){am=aB;an=aA;ao=az;ap=ay;aq=E}else{break}}cf(c[m>>2]|0,140160,(v=i,i=i+24|0,c[v>>2]=az,c[v+8>>2]=aA,c[v+16>>2]=aB,v)|0);z=0;do{uu(c[t+(z<<2)>>2]|0);z=z+1|0;}while((z|0)<(D|0))}else{cf(c[m>>2]|0,140160,(v=i,i=i+24|0,c[v>>2]=0,c[v+8>>2]=0,c[v+16>>2]=0,v)|0)}uu(ak);uu(ai);uu(ah);i=b;return}}while(0);jR();i=b;return}}while(0);cf(c[m>>2]|0,147560,(v=i,i=i+8|0,c[v>>2]=(c[5163]|0)==103?147288:147032,v)|0);ah=c[5163]|0;do{if((ah|0)==100){ai=c[m>>2]|0;aI(146576,35,1,ai|0)}else if((ah|0)==114){ai=c[5165]|0;ak=c[5166]|0;cf(c[m>>2]|0,146752,(v=i,i=i+24|0,c[v>>2]=c[5164],c[v+8>>2]=ai,c[v+16>>2]=ak,v)|0)}else if((ah|0)==102){aI(146384,49,1,c[m>>2]|0);ak=c[5179]|0;if((c[5178]|0)!=0&(ak|0)!=0){ai=c[m>>2]|0;cf(ai|0,146224,(v=i,i=i+8|0,c[v>>2]=ak,v)|0)}ak=c[5257]|0;if((c[5256]|0)!=0&(ak|0)!=0){ai=c[m>>2]|0;cf(ai|0,146056,(v=i,i=i+8|0,c[v>>2]=ak,v)|0)}ak=c[5335]|0;if(!((c[5334]|0)!=0&(ak|0)!=0)){break}cf(c[m>>2]|0,145904,(v=i,i=i+8|0,c[v>>2]=ak,v)|0)}else if((ah|0)==99){ay=+h[2707];ap=+h[2708];cf(c[m>>2]|0,145624,(v=i,i=i+24|0,h[v>>3]=+h[2706],h[v+8>>3]=ay,h[v+16>>3]=ap,v)|0)}else if((ah|0)!=103){cf(c[m>>2]|0,145456,(v=i,i=i+24|0,c[v>>2]=145192,c[v+8>>2]=2321,c[v+16>>2]=ah<<24>>24,v)|0)}}while(0);cf(c[m>>2]|0,144904,(v=i,i=i+8|0,c[v>>2]=(a[20668]|0)==112?144696:144440,v)|0);cf(c[m>>2]|0,144216,(v=i,i=i+8|0,c[v>>2]=(a[20684]|0)==0?144064:179864,v)|0);aI(143944,12,1,c[m>>2]|0);ah=c[5168]|0;ak=c[m>>2]|0;if((ah|0)==0){aI(143728,13,1,ak|0)}else{cf(ak|0,143880,(v=i,i=i+8|0,c[v>>2]=ah,v)|0)}aI(143544,48,1,c[m>>2]|0);aI(143376,14,1,c[m>>2]|0);ah=c[5174]|0;if((ah|0)==114){ak=c[m>>2]|0;aI(143256,4,1,ak|0)}else if((ah|0)==120){aI(142552,4,1,c[m>>2]|0)}else if((ah|0)==99){aI(142912,4,1,c[m>>2]|0)}else if((ah|0)==104){aI(143048,4,1,c[m>>2]|0)}else if((ah|0)==121){aI(142680,4,1,c[m>>2]|0)}else{cf(c[m>>2]|0,142392,(v=i,i=i+24|0,c[v>>2]=145192,c[v+8>>2]=2343,c[v+16>>2]=ah<<24>>24,v)|0)}cf(c[m>>2]|0,142264,(v=i,i=i+8|0,h[v>>3]=+h[2705],v)|0);i=b;return}function jR(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0;a=i;cf(c[m>>2]|0,136824,(v=i,i=i+8|0,c[v>>2]=112,v)|0);b=c[7642]|0;d=c[b>>2]|0;if((d|0)==0){e=c[m>>2]|0;f=aF(10,e|0)|0;g=c[13898]|0;h=g+1|0;c[13898]=h;i=a;return}else{j=b;k=d}do{d=c[j+4>>2]|0;b=d>>>16&255;l=d>>>8&255;n=d&255;cf(c[m>>2]|0,136440,(v=i,i=i+8|0,c[v>>2]=k,v)|0);cf(c[m>>2]|0,136240,(v=i,i=i+48|0,c[v>>2]=b,c[v+8>>2]=l,c[v+16>>2]=n,c[v+24>>2]=b,c[v+32>>2]=l,c[v+40>>2]=n,v)|0);j=j+8|0;k=c[j>>2]|0;}while((k|0)!=0);e=c[m>>2]|0;f=aF(10,e|0)|0;g=c[13898]|0;h=g+1|0;c[13898]=h;i=a;return}function jS(){var b=0,d=0,e=0,f=0,g=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}d=c[8270]|0;do{if((d|0)!=0){if((aY(d|0,139696)|0)==0){break}bA(4,d|0)}}while(0);d=c[m>>2]|0;e=c[b$()>>2]|0;cf(d|0,170016,(v=i,i=i+8|0,c[v>>2]=e,v)|0);e=c[8270]|0;do{if((e|0)!=0){if((aY(e|0,139696)|0)==0){break}bA(4,139696)}}while(0);e=c[12886]|0;d=c[m>>2]|0;if((e|0)==0){aI(169e3,57,1,d|0);f=c[m>>2]|0;g=cf(f|0,168632,(v=i,i=i+8|0,c[v>>2]=48904,v)|0)|0;i=b;return}else{cf(d|0,169544,(v=i,i=i+8|0,c[v>>2]=e,v)|0);f=c[m>>2]|0;g=cf(f|0,168632,(v=i,i=i+8|0,c[v>>2]=48904,v)|0)|0;i=b;return}}function jT(){var b=0,d=0,e=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}cf(c[m>>2]|0,171816,(v=i,i=i+8|0,c[v>>2]=(a[42568]&1)!=0?179864:171496,v)|0);d=c[10568]|0;if((d|0)!=0){e=c[m>>2]|0;cf(e|0,171184,(v=i,i=i+8|0,c[v>>2]=d,v)|0);i=b;return}d=fg()|0;if((d|0)==0){i=b;return}cf(c[m>>2]|0,170744,(v=i,i=i+8|0,c[v>>2]=d,v)|0);uu(d);i=b;return}function jU(){var b=0,d=0,e=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}aI(135832,29,1,c[m>>2]|0);d=c[57238]|0;cf(c[m>>2]|0,154696,(v=i,i=i+8|0,c[v>>2]=(d|0)!=0?d:135560,v)|0);aI(135336,38,1,c[m>>2]|0);d=c[m>>2]|0;e=bU(195768)|0;cf(d|0,154696,(v=i,i=i+8|0,c[v>>2]=(e|0)==0?135560:e,v)|0);cf(c[m>>2]|0,135072,(v=i,i=i+8|0,c[v>>2]=195896,v)|0);i=b;return}function jV(){var b=0,d=0,e=0.0,f=0.0,j=0.0,k=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}aI(178128,9,1,c[m>>2]|0);d=c[m>>2]|0;if((c[5094]|0)==1){aI(177880,4,1,d|0);i=b;return}e=+g[3536];f=+g[3534];j=+g[3532];cf(d|0,177528,(v=i,i=i+32|0,h[v>>3]=+g[3538],h[v+8>>3]=e,h[v+16>>3]=f,h[v+24>>3]=j,v)|0);d=c[18072]|0;if((d|0)==2){k=176720}else{k=(d|0)==3?176120:179864}cf(c[m>>2]|0,177040,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=(d|0)>1?175728:175376,v)|0);i=b;return}function jW(){var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0,n=0.0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0;b=i;c[13898]=(c[13898]|0)+1;d=c[m>>2]|0;do{if((a[54018]|0)==0){aI(149704,29,1,d|0)}else{aI(150216,24,1,d|0);e=c[13505]|0;f=c[m>>2]|0;if((e|0)>-1){cf(f|0,150056,(v=i,i=i+8|0,c[v>>2]=e,v)|0);break}else{aI(149856,21,1,f|0);break}}}while(0);do{if((a[54016]|0)!=110){d=c[m>>2]|0;if((c[13506]|0)==1){aI(149576,13,1,d|0);break}else{aI(149312,12,1,d|0);break}}}while(0);d=a[54016]|0;if((d|0)==117){f=c[m>>2]|0;aI(148704,16,1,f|0);f=c[m>>2]|0;e=c[13508]|0;if((e|0)==0){g=179864}else{g=c[21784+(e<<2)>>2]|0}j=+h[6756];k=c[13509]|0;if((k|0)==(e|0)){l=179864}else{l=c[21784+(k<<2)>>2]|0}n=+h[6757];e=c[13510]|0;if((e|0)==(k|0)){o=179864}else{o=c[21784+(e<<2)>>2]|0}p=+h[6758];cf(f|0,77392,(v=i,i=i+48|0,c[v>>2]=g,h[v+8>>3]=j,c[v+16>>2]=l,h[v+24>>3]=n,c[v+32>>2]=o,h[v+40>>3]=p,v)|0);o=c[m>>2]|0;aI(148472,18,1,o|0);o=c[m>>2]|0;l=c[13518]|0;if((l|0)==0){q=179864}else{q=c[21784+(l<<2)>>2]|0}p=+h[6761];g=c[13519]|0;if((g|0)==(l|0)){r=179864}else{r=c[21784+(g<<2)>>2]|0}n=+h[6762];l=c[13520]|0;if((l|0)==(g|0)){s=179864}else{s=c[21784+(l<<2)>>2]|0}j=+h[6763];cf(o|0,77392,(v=i,i=i+48|0,c[v>>2]=q,h[v+8>>3]=p,c[v+16>>2]=r,h[v+24>>3]=n,c[v+32>>2]=s,h[v+40>>3]=j,v)|0);s=c[m>>2]|0;aF(10,s|0);t=c[m>>2]|0;u=a[54017]|0;w=u<<24>>24==118;x=w?148008:147816;y=cf(t|0,148168,(v=i,i=i+8|0,c[v>>2]=x,v)|0)|0;i=b;return}else if((d|0)==100){aI(148856,20,1,c[m>>2]|0);t=c[m>>2]|0;u=a[54017]|0;w=u<<24>>24==118;x=w?148008:147816;y=cf(t|0,148168,(v=i,i=i+8|0,c[v>>2]=x,v)|0)|0;i=b;return}else if((d|0)==110){aI(149024,10,1,c[m>>2]|0);t=c[m>>2]|0;u=a[54017]|0;w=u<<24>>24==118;x=w?148008:147816;y=cf(t|0,148168,(v=i,i=i+8|0,c[v>>2]=x,v)|0)|0;i=b;return}else{uf(-1,148400,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function jX(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0.0,J=0,K=0,L=0,M=0.0,N=0,O=0,P=0;b=i;i=i+48|0;d=b|0;e=b+24|0;f=c[13898]|0;g=c[1054]|0;j=c[g+(f*40&-1)+36>>2]|0;k=c[g+(f*40&-1)+32>>2]|0;l=(a[g+(f*40&-1)|0]&1)==0;n=(j|0)>0;o=c[10036]|0;p=21680;q=116616;L11099:while(1){L11101:do{if(!l){if(n){r=0;s=0;t=k;while(1){u=a[q+r|0]|0;if(u<<24>>24==(a[o+(r+t|0)|0]|0)){w=t;x=s}else{if(u<<24>>24!=36){break L11101}w=t-1|0;x=1}y=r+1|0;if((y|0)<(x+j|0)){r=y;s=x;t=w}else{break}}if((x|0)==0){z=y}else{A=p;break L11099}}else{z=0}t=a[q+z|0]|0;if((t<<24>>24|0)==36|(t<<24>>24|0)==0){A=p;break L11099}}}while(0);t=p+8|0;s=c[t>>2]|0;if((s|0)==0){A=t;break}else{p=t;q=s}}q=c[A+4>>2]|0;if((q|0)==1){if(!(a[928]|0)){A=c[m>>2]|0;aF(10,A|0)}A=c[12890]|0;p=c[m>>2]|0;cf(p|0,114608,(v=i,i=i+8|0,c[v>>2]=122960,v)|0);jh(c[m>>2]|0,122960,A);c[13898]=(c[13898]|0)+1;i=b;return}else if((q|0)==2){if(!(a[928]|0)){A=c[m>>2]|0;aF(10,A|0)}A=c[10058]|0;cf(c[m>>2]|0,114608,(v=i,i=i+8|0,c[v>>2]=122816,v)|0);jh(c[m>>2]|0,122816,A);c[13898]=(c[13898]|0)+1;i=b;return}else if((q|0)==4){j7();c[13898]=(c[13898]|0)+1;i=b;return}else if((q|0)==9){aI(115400,27,1,c[m>>2]|0);A=c[m>>2]|0;if((a[30080]&1)==0){aI(115272,18,1,A|0)}else{aI(115320,56,1,A|0)}c[13898]=(c[13898]|0)+1;i=b;return}else if((q|0)==3){A=f+1|0;c[13898]=A;L11134:do{if((A|0)<(c[8272]|0)){L11136:do{if((a[g+(A*40&-1)|0]&1)!=0){p=c[g+(A*40&-1)+36>>2]|0;z=g+(A*40&-1)+32|0;y=0;while(1){if((y|0)>=(p|0)){break}if((a[o+((c[z>>2]|0)+y|0)|0]|0)==(a[y+103664|0]|0)){y=y+1|0}else{break L11136}}if((y|0)==1){B=0;break L11134}}}while(0);z=is(e)|0;p=c[z>>2]|0;if((p|0)==1){C=+(c[z+8>>2]|0)}else if((p|0)==3){C=+uz(c[z+8>>2]|0,0)}else if((p|0)==2){C=+h[z+8>>3]}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}z=e|0;if((c[z>>2]|0)==3){uu(c[e+8>>2]|0);c[z>>2]=1}z=~~C;if((z|0)>=1){B=z;break}uf(c[13898]|0,208936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{B=0}}while(0);e=c[10820]|0;if((e|0)==0){D=0}else{A=(B|0)==0;z=0;p=e;while(1){e=c[p+4>>2]|0;if(A){E=e;F=8155}else{if((e|0)==(B|0)){E=B;F=8155}else{G=z}}if((F|0)==8155){F=0;e=c[m>>2]|0;cf(e|0,75168,(v=i,i=i+8|0,c[v>>2]=E,v)|0);ji(c[m>>2]|0,p+8|0,1);e=c[m>>2]|0;aF(10,e|0);G=1}e=c[p>>2]|0;if((e|0)==0){D=G;break}else{z=G;p=e}}}if((B|0)<1|D){i=b;return}else{uf(c[13898]|0,74736,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else if((q|0)==8){ka();c[13898]=(c[13898]|0)+1;i=b;return}else if((q|0)==7){kb();c[13898]=(c[13898]|0)+1;i=b;return}else if((q|0)==11){j9();c[13898]=(c[13898]|0)+1;i=b;return}else if((q|0)==10){j8();c[13898]=(c[13898]|0)+1;i=b;return}else if((q|0)==5){D=f+1|0;c[13898]=D;L11198:do{if((D|0)<(c[8272]|0)){L11200:do{if((a[g+(D*40&-1)|0]&1)!=0){f=c[g+(D*40&-1)+36>>2]|0;B=g+(D*40&-1)+32|0;p=0;while(1){if((p|0)>=(f|0)){break}if((a[o+((c[B>>2]|0)+p|0)|0]|0)==(a[p+103664|0]|0)){p=p+1|0}else{break L11200}}if((p|0)==1){H=0;break L11198}}}while(0);B=is(d)|0;f=c[B>>2]|0;if((f|0)==2){I=+h[B+8>>3]}else if((f|0)==3){I=+uz(c[B+8>>2]|0,0)}else if((f|0)==1){I=+(c[B+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}B=d|0;if((c[B>>2]|0)==3){uu(c[d+8>>2]|0);c[B>>2]=1}B=~~I;if((B|0)>=1){H=B;break}uf(c[13898]|0,208936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{H=0}}while(0);kd(H);i=b;return}else if((q|0)==6){if(!(a[928]|0)){q=c[m>>2]|0;aF(10,q|0)}aI(122192,33,1,c[m>>2]|0);q=c[12738]|0;if((q|0)==0){J=179864}else{J=c[21784+(q<<2)>>2]|0}I=+h[6371];H=c[12739]|0;if((H|0)==(q|0)){K=179864}else{K=c[21784+(H<<2)>>2]|0}C=+h[6372];q=c[12740]|0;if((q|0)==(H|0)){L=179864}else{L=c[21784+(q<<2)>>2]|0}M=+h[6373];cf(c[m>>2]|0,77392,(v=i,i=i+48|0,c[v>>2]=J,h[v+8>>3]=I,c[v+16>>2]=K,h[v+24>>3]=C,c[v+32>>2]=L,h[v+40>>3]=M,v)|0);aF(10,c[m>>2]|0);c[13898]=(c[13898]|0)+1;i=b;return}else{L=c[12890]|0;cf(c[m>>2]|0,114608,(v=i,i=i+8|0,c[v>>2]=122960,v)|0);jh(c[m>>2]|0,122960,L);L=c[10058]|0;cf(c[m>>2]|0,114608,(v=i,i=i+8|0,c[v>>2]=122816,v)|0);jh(c[m>>2]|0,122816,L);L=c[10820]|0;if((L|0)!=0){K=L;do{cf(c[m>>2]|0,75168,(v=i,i=i+8|0,c[v>>2]=c[K+4>>2],v)|0);ji(c[m>>2]|0,K+8|0,1);aF(10,c[m>>2]|0);K=c[K>>2]|0;}while((K|0)!=0)}j7();aI(115400,27,1,c[m>>2]|0);K=c[m>>2]|0;if((a[30080]&1)==0){aI(115272,18,1,K|0)}else{aI(115320,56,1,K|0)}j8();kd(0);j9();ka();if(!(a[928]|0)){K=c[m>>2]|0;aF(10,K|0)}aI(122192,33,1,c[m>>2]|0);K=c[12738]|0;if((K|0)==0){N=179864}else{N=c[21784+(K<<2)>>2]|0}M=+h[6371];L=c[12739]|0;if((L|0)==(K|0)){O=179864}else{O=c[21784+(L<<2)>>2]|0}C=+h[6372];K=c[12740]|0;if((K|0)==(L|0)){P=179864}else{P=c[21784+(K<<2)>>2]|0}I=+h[6373];cf(c[m>>2]|0,77392,(v=i,i=i+48|0,c[v>>2]=N,h[v+8>>3]=M,c[v+16>>2]=O,h[v+24>>3]=C,c[v+32>>2]=P,h[v+40>>3]=I,v)|0);aF(10,c[m>>2]|0);kb();i=b;return}}function jY(){var b=0,d=0,e=0.0,f=0.0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}e=+g[38];cf(c[m>>2]|0,182560,(v=i,i=i+16|0,h[v>>3]=+g[178],h[v+8>>3]=e,v)|0);e=+g[18074];if(e>0.0){d=c[m>>2]|0;f=e;cf(d|0,181056,(v=i,i=i+8|0,h[v>>3]=f,v)|0);i=b;return}d=c[m>>2]|0;if(e==0.0){aI(180712,36,1,d|0);i=b;return}else{f=-0.0-e;cf(d|0,180280,(v=i,i=i+8|0,h[v>>3]=f,v)|0);i=b;return}}function jZ(b,d,e,f,g,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;var k=0,l=0,n=0.0,o=0,p=0;k=i;if(!(a[928]|0)){l=c[m>>2]|0;aF(10,l|0)}l=c[m>>2]|0;n=+h[77];if((a[624]&1)==0){cf(l|0,185536,(v=i,i=i+8|0,h[v>>3]=n,v)|0)}else{cf(l|0,186024,(v=i,i=i+8|0,h[v>>3]=n,v)|0)}l=c[10026]|0;if((l|0)>-1){o=c[m>>2]|0;p=(l|0)==0?150704:150856;cf(o|0,185040,(v=i,i=i+8|0,c[v>>2]=p,v)|0)}if(b){j4(2)}if(f){j4(6)}if(d){j4(1)}if(g){j4(5)}if(e){j4(0)}if(!j){a[25280]=0;i=k;return}j4(3);a[25280]=0;i=k;return}function j_(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}d=c[13898]|0;e=c[1054]|0;f=c[e+(d*40&-1)+36>>2]|0;g=c[e+(d*40&-1)+32>>2]|0;h=(a[e+(d*40&-1)|0]&1)==0;e=(f|0)>0;j=c[10036]|0;k=56720;l=77416;L11280:while(1){L11282:do{if(!h){if(e){n=0;o=0;p=g;while(1){q=a[l+n|0]|0;if(q<<24>>24==(a[j+(n+p|0)|0]|0)){r=p;s=o}else{if(q<<24>>24!=36){break L11282}r=p-1|0;s=1}t=n+1|0;if((t|0)<(s+f|0)){n=t;o=s;p=r}else{break}}if((s|0)==0){u=t}else{w=k;break L11280}}else{u=0}p=a[l+u|0]|0;if((p<<24>>24|0)==36|(p<<24>>24|0)==0){w=k;break L11280}}}while(0);p=k+8|0;o=c[p>>2]|0;if((o|0)==0){w=p;break}else{k=p;l=o}}l=c[w+4>>2]|0;if((l|0)>-1){c[13898]=d+1;d=c[m>>2]|0;w=56832+(l*24&-1)|0;k=j3(64813+(l*688&-1)|0)|0;cf(d|0,203592,(v=i,i=i+16|0,c[v>>2]=w,c[v+8>>2]=k,v)|0);i=b;return}else{x=0}do{if((c[64808+(x*688&-1)>>2]|0)==1){k=c[m>>2]|0;w=56832+(x*24&-1)|0;d=j3(64813+(x*688&-1)|0)|0;cf(k|0,203592,(v=i,i=i+16|0,c[v>>2]=w,c[v+8>>2]=d,v)|0)}x=x+1|0;}while((x|0)<11);i=b;return}function j$(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=c[65040+(a*688&-1)>>2]|0;if((d|0)==2){e=c[m>>2]|0;f=56832+(a*24&-1)|0;g=~~+h[65048+(a*688&-1)>>3];cf(e|0,187104,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=g,v)|0);i=b;return}else if((d|0)==1){g=56832+(a*24&-1)|0;cf(c[m>>2]|0,191400,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=b;return}else if((d|0)==0){cf(c[m>>2]|0,193440,(v=i,i=i+8|0,c[v>>2]=56832+(a*24&-1),v)|0);i=b;return}else if((d|0)==3){cf(c[m>>2]|0,188528,(v=i,i=i+8|0,c[v>>2]=56832+(a*24&-1),v)|0);i=b;return}else{uf(-1,186648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function j0(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}d=c[13898]|0;L11319:do{if((d|0)<(c[8272]|0)){e=c[1054]|0;f=(a[e+(d*40&-1)|0]&1)==0;if(f){break}g=c[e+(d*40&-1)+36>>2]|0;h=e+(d*40&-1)+32|0;e=c[10036]|0;j=0;while(1){if((j|0)>=(g|0)){k=8291;break}if((a[e+((c[h>>2]|0)+j|0)|0]|0)==(a[j+103664|0]|0)){j=j+1|0}else{break}}if((k|0)==8291){if((j|0)==1){k=8300;break}}if(!((g|0)>0&(f^1))){break}e=c[10036]|0;l=0;n=0;o=c[h>>2]|0;while(1){if((a[l+210832|0]|0)==(a[e+(l+o|0)|0]|0)){p=o;q=n}else{if((l|0)!=4){break L11319}p=o-1|0;q=1}r=l+1|0;if((r|0)<(q+g|0)){l=r;n=q;o=p}else{break}}if((q|0)!=0){k=8300;break}if((l|0)==3|(l|0)==7){k=8300}}else{k=8300}}while(0);do{if((k|0)==8300){q=c[8528]|0;p=c[m>>2]|0;if((q|0)==0){aI(210088,41,1,p|0);break}else{cf(p|0,209400,(v=i,i=i+8|0,c[v>>2]=q,v)|0);break}}}while(0);q=c[13898]|0;L11343:do{if((q|0)<(c[8272]|0)){p=c[1054]|0;d=(a[p+(q*40&-1)|0]&1)==0;if(d){break}o=c[p+(q*40&-1)+36>>2]|0;n=p+(q*40&-1)+32|0;p=c[10036]|0;g=0;while(1){if((g|0)>=(o|0)){k=8308;break}if((a[p+((c[n>>2]|0)+g|0)|0]|0)==(a[g+103664|0]|0)){g=g+1|0}else{break}}if((k|0)==8308){if((g|0)==1){k=8317;break}}if(!((o|0)>0&(d^1))){break}p=c[10036]|0;l=0;e=0;h=c[n>>2]|0;while(1){if((a[l+209008|0]|0)==(a[p+(l+h|0)|0]|0)){s=h;t=e}else{if((l|0)!=3){break L11343}s=h-1|0;t=1}f=l+1|0;if((f|0)<(t+o|0)){l=f;e=t;h=s}else{break}}if((t|0)!=0){k=8317;break}if((l|0)==2|(l|0)==9){k=8317}}else{k=8317}}while(0);do{if((k|0)==8317){t=a[47120]|0;s=c[m>>2]|0;if(t<<24>>24==0){aI(207840,41,1,s|0);break}else{q=t<<24>>24;cf(s|0,208456,(v=i,i=i+8|0,c[v>>2]=q,v)|0);break}}}while(0);q=c[13898]|0;L11367:do{if((q|0)<(c[8272]|0)){s=c[1054]|0;t=(a[s+(q*40&-1)|0]&1)==0;if(t){break}h=c[s+(q*40&-1)+36>>2]|0;e=s+(q*40&-1)+32|0;s=c[10036]|0;o=0;while(1){if((o|0)>=(h|0)){k=8325;break}if((a[s+((c[e>>2]|0)+o|0)|0]|0)==(a[o+103664|0]|0)){o=o+1|0}else{break}}if((k|0)==8325){if((o|0)==1){k=8334;break}}if(!((h|0)>0&(t^1))){break}s=c[10036]|0;l=0;p=0;n=c[e>>2]|0;while(1){if((a[l+207024|0]|0)==(a[s+(l+n|0)|0]|0)){u=n;w=p}else{if((l|0)!=3){break L11367}u=n-1|0;w=1}d=l+1|0;if((d|0)<(w+h|0)){l=d;p=w;n=u}else{break}}if((w|0)!=0){k=8334;break}if((l|0)==2|(l|0)==8){k=8334}}else{k=8334}}while(0);if((k|0)==8334){w=c[m>>2]|0;u=c[11948]|0;cf(w|0,206416,(v=i,i=i+8|0,c[v>>2]=u,v)|0)}if((a[47712]&1)!=0){u=c[m>>2]|0;aI(205568,55,1,u|0)}if((a[47472]&1)!=0){u=c[m>>2]|0;aI(204904,55,1,u|0)}u=c[13898]|0;w=c[1054]|0;q=c[w+(u*40&-1)+36>>2]|0;n=c[w+(u*40&-1)+32>>2]|0;L11394:do{if((a[w+(u*40&-1)|0]&1)!=0&(q|0)>0){p=c[10036]|0;h=0;s=0;e=n;while(1){if((a[h+204608|0]|0)==(a[p+(h+e|0)|0]|0)){x=e;y=s}else{if((h|0)!=3){z=u;break L11394}x=e-1|0;y=1}t=h+1|0;if((t|0)<(y+q|0)){h=t;s=y;e=x}else{break}}if((y|0)==0){if(!((h|0)==2|(h|0)==6)){z=u;break}}e=c[8272]|0;do{if((u|0)<(e|0)){s=c[10036]|0;p=0;while(1){if((p|0)>=(q|0)){k=8351;break}if((a[s+(n+p|0)|0]|0)==(a[p+103664|0]|0)){p=p+1|0}else{break}}if((k|0)==8351){if((p|0)==1){A=u;break}}s=u+1|0;c[13898]=s;A=s}else{A=u}}while(0);L11415:do{if((A|0)<(e|0)){if((a[w+(A*40&-1)|0]&1)==0){B=A;C=e;break}h=c[w+(A*40&-1)+36>>2]|0;s=w+(A*40&-1)+32|0;l=c[10036]|0;t=0;while(1){if((t|0)>=(h|0)){break}if((a[l+((c[s>>2]|0)+t|0)|0]|0)==(a[t+103664|0]|0)){t=t+1|0}else{B=A;C=e;break L11415}}if((t|0)==1){k=8359}else{B=A;C=e}}else{k=8359}}while(0);if((k|0)==8359){eN(c[m>>2]|0);e=c[m>>2]|0;aF(10,e|0);B=c[13898]|0;C=c[8272]|0}L11425:do{if((B|0)<(C|0)){e=c[1054]|0;s=(a[e+(B*40&-1)|0]&1)==0;if(s){D=B;E=C;break}l=c[e+(B*40&-1)+36>>2]|0;h=e+(B*40&-1)+32|0;e=c[10036]|0;p=0;while(1){if((p|0)>=(l|0)){k=8365;break}if((a[e+((c[h>>2]|0)+p|0)|0]|0)==(a[p+103664|0]|0)){p=p+1|0}else{break}}if((k|0)==8365){if((p|0)==1){k=8374;break}}if(!((l|0)>0&(s^1))){D=B;E=C;break}e=c[10036]|0;t=0;o=0;d=c[h>>2]|0;while(1){if((a[t+204360|0]|0)==(a[e+(t+d|0)|0]|0)){F=d;G=o}else{if((t|0)!=5){D=B;E=C;break L11425}F=d-1|0;G=1}g=t+1|0;if((g|0)<(G+l|0)){t=g;o=G;d=F}else{break}}if((G|0)!=0){k=8374;break}if((t|0)==4|(t|0)==9){k=8374}else{D=B;E=C}}else{k=8374}}while(0);if((k|0)==8374){eO(c[m>>2]|0);D=c[13898]|0;E=c[8272]|0}L11446:do{if((D|0)<(E|0)){d=c[1054]|0;if((a[d+(D*40&-1)|0]&1)==0){H=D;I=E;break}o=c[d+(D*40&-1)+36>>2]|0;l=d+(D*40&-1)+32|0;d=c[10036]|0;e=0;while(1){if((e|0)>=(o|0)){break}if((a[d+((c[l>>2]|0)+e|0)|0]|0)==(a[e+103664|0]|0)){e=e+1|0}else{H=D;I=E;break L11446}}if((e|0)==1){k=8381}else{H=D;I=E}}else{k=8381}}while(0);if((k|0)==8381){l=c[m>>2]|0;aF(10,l|0);H=c[13898]|0;I=c[8272]|0}do{if((H|0)<(I|0)){l=c[1054]|0;d=(a[l+(H*40&-1)|0]&1)==0;if(d){z=H;break L11394}o=c[l+(H*40&-1)+36>>2]|0;t=l+(H*40&-1)+32|0;l=c[10036]|0;h=0;while(1){if((h|0)>=(o|0)){k=8387;break}if((a[l+((c[t>>2]|0)+h|0)|0]|0)==(a[h+103664|0]|0)){h=h+1|0}else{break}}if((k|0)==8387){if((h|0)==1){break}}if(!((o|0)>0&(d^1))){z=H;break L11394}l=c[10036]|0;e=0;s=0;p=c[t>>2]|0;while(1){if((a[e+204080|0]|0)==(a[l+(e+p|0)|0]|0)){J=p;K=s}else{if((e|0)!=5){z=H;break L11394}J=p-1|0;K=1}g=e+1|0;if((g|0)<(K+o|0)){e=g;s=K;p=J}else{break}}if((K|0)!=0){break}if(!((e|0)==4|(e|0)==9)){z=H;break L11394}}}while(0);p=c[m>>2]|0;aI(192576,70,1,p|0);s=c[12174]|0;if((s|0)!=0){o=0;l=s;do{o=o+1|0;cf(p|0,189936,(v=i,i=i+8|0,c[v>>2]=l,v)|0);l=c[48696+(o<<3)>>2]|0;}while((l|0)!=0)}aF(10,p|0);z=c[13898]|0}else{z=u}}while(0);if((z|0)>=(c[8272]|0)){i=b;return}u=c[1054]|0;L11483:do{if((a[u+(z*40&-1)|0]&1)!=0){H=c[u+(z*40&-1)+36>>2]|0;K=u+(z*40&-1)+32|0;J=c[10036]|0;k=0;while(1){if((k|0)>=(H|0)){break}if((a[J+((c[K>>2]|0)+k|0)|0]|0)==(a[k+103664|0]|0)){k=k+1|0}else{break L11483}}if((k|0)!=1){break}i=b;return}}while(0);c[13898]=z+1;i=b;return}function j1(){var b=0,d=0,e=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}d=c[m>>2]|0;if((c[8496]|0)==0){aI(211280,14,1,d|0);i=b;return}aI(221800,13,1,d|0);d=c[m>>2]|0;if((c[8498]|0)==0){aI(220672,35,1,d|0)}else{aI(221272,32,1,d|0)}d=c[m>>2]|0;if((c[8500]|0)==0){aI(218440,42,1,d|0)}else{aI(218904,53,1,d|0)}d=c[8497]|0;e=c[m>>2]|0;if((d|0)>0){cf(e|0,217848,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}else{aI(217288,32,1,e|0)}cf(c[m>>2]|0,216608,(v=i,i=i+8|0,c[v>>2]=c[8503],v)|0);cf(c[m>>2]|0,216184,(v=i,i=i+8|0,c[v>>2]=c[13532],v)|0);e=c[13534]|0;if((e|0)!=0){d=c[m>>2]|0;cf(d|0,215632,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}cf(c[m>>2]|0,215176,(v=i,i=i+8|0,c[v>>2]=c[8506],v)|0);e=c[8510]|0;if((e|0)!=0){d=c[m>>2]|0;cf(d|0,214656,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}e=c[m>>2]|0;if((c[8499]|0)==0){aI(213400,33,1,e|0)}else{d=c[8504]|0;cf(e|0,213952,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}cf(c[m>>2]|0,212848,(v=i,i=i+8|0,c[v>>2]=(c[8502]|0)!=0?150376:150208,v)|0);cf(c[m>>2]|0,212248,(v=i,i=i+8|0,c[v>>2]=(c[8501]|0)!=0?179864:211688,v)|0);i=b;return}function j2(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;b=i;i=i+56|0;d=b|0;e=c[10810]|0;f=d|0;uE(f|0,0,51);if(!(a[928]|0)){g=c[m>>2]|0;aF(10,g|0)}g=c[13898]|0;L11527:do{if((g|0)<(c[8272]|0)){h=c[1054]|0;j=(a[h+(g*40&-1)|0]&1)==0;k=c[h+(g*40&-1)+36>>2]|0;l=h+(g*40&-1)+32|0;L11529:do{if(j){n=c[l>>2]|0}else{h=c[10036]|0;o=0;while(1){if((o|0)>=(k|0)){p=8442;break}if((a[h+((c[l>>2]|0)+o|0)|0]|0)==(a[o+103664|0]|0)){o=o+1|0}else{break}}if((p|0)==8442){if((o|0)==1){p=8452;break L11527}}h=c[l>>2]|0;if(!((k|0)>0&(j^1))){n=h;break}q=c[10036]|0;r=0;do{if((a[r+74272|0]|0)!=(a[q+(r+h|0)|0]|0)){n=h;break L11529}r=r+1|0;}while((r|0)<(k|0));if((r|0)!=3){n=h;break}c[13898]=g+1;aI(73856,27,1,c[m>>2]|0);s=1;break L11527}}while(0);j=(k|0)>49?49:k;l=c[10036]|0;q=n;o=0;while(1){t=o+1|0;a[d+o|0]=a[l+q|0]|0;if((t|0)==(j|0)){break}else{q=q+1|0;o=t}}a[d+j|0]=0;c[13898]=g+1;p=8452}else{p=8452}}while(0);do{if((p|0)==8452){g=c[m>>2]|0;if((a[f]|0)==0){aI(72912,30,1,g|0);s=0;break}else{cf(g|0,73512,(v=i,i=i+8|0,c[v>>2]=f,v)|0);s=0;break}}}while(0);if((e|0)==0){i=b;return}else{u=e}do{e=c[u+4>>2]|0;g=bk(e|0,73808)|0;d=(a[f]|0)==0;if(d){p=8459}else{if((a_(e|0,f|0,uA(f|0)|0)|0)==0){p=8459}}do{if((p|0)==8459){p=0;if(!s){if(!((a_(e|0,167320,6)|0)!=0|d^1)){break}}if((a[u+8|0]&1)!=0){break}n=c[m>>2]|0;cf(n|0,223688,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=e,v)|0);n=c[m>>2]|0;aI(223040,2,1,n|0);j5(c[m>>2]|0,u+16|0,1);n=c[m>>2]|0;aF(10,n|0)}}while(0);u=c[u>>2]|0;}while((u|0)!=0);i=b;return}function j3(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;if((b|0)==0){f=0;i=e;return f|0}g=c[13364]|0;h=db(g,(uA(b|0)<<2)+4|0,124472)|0;c[13364]=h;c[13362]=h;g=a[b]|0;if(g<<24>>24==0){j=h}else{h=b;b=g;do{g=b<<24>>24;do{if((g|0)==13){k=c[13362]|0;c[13362]=k+1;a[k]=92;k=c[13362]|0;c[13362]=k+1;a[k]=114}else if((g|0)==10){k=c[13362]|0;c[13362]=k+1;a[k]=92;k=c[13362]|0;c[13362]=k+1;a[k]=110}else if((g|0)==34|(g|0)==92){k=c[13362]|0;c[13362]=k+1;a[k]=92;k=a[h]|0;l=c[13362]|0;c[13362]=l+1;a[l]=k}else if((g|0)==9){k=c[13362]|0;c[13362]=k+1;a[k]=92;k=c[13362]|0;c[13362]=k+1;a[k]=116}else{if((c[11252]|0)==15){k=c[13362]|0;c[13362]=k+1;a[k]=b;break}if((bB(b&255|0)|0)!=0){k=a[h]|0;l=c[13362]|0;c[13362]=l+1;a[l]=k;break}k=c[13362]|0;c[13362]=k+1;a[k]=92;be(c[13362]|0,123064,(v=i,i=i+8|0,c[v>>2]=d[h]|0,v)|0);k=c[13362]|0;if((a[k]|0)==0){break}else{m=k}do{m=m+1|0;c[13362]=m;}while((a[m]|0)!=0)}}while(0);h=h+1|0;b=a[h]|0;}while(b<<24>>24!=0);j=c[13362]|0}a[j]=0;f=c[13364]|0;i=e;return f|0}function j4(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0,w=0,x=0,y=0,z=0.0,A=0,B=0;d=i;i=i+384|0;e=d|0;f=d+48|0;g=d+96|0;j=d+144|0;k=d+224|0;l=d+304|0;n=j3(64864+(b*688&-1)|0)|0;o=56832+(b*24&-1)|0;p=65072+(b*688&-1)|0;q=(a[p]&1)!=0?115944:115008;r=+h[65056+(b*688&-1)>>3];s=+h[65064+(b*688&-1)>>3];cf(c[m>>2]|0,116800,(v=i,i=i+32|0,c[v>>2]=o,c[v+8>>2]=q,h[v+16>>3]=r,h[v+24>>3]=s,v)|0);cf(c[m>>2]|0,113920,(v=i,i=i+8|0,c[v>>2]=o,v)|0);o=64916+(b*688&-1)|0;q=c[o>>2]&3;do{if((q|0)==2){t=c[m>>2]|0;aI(107752,7,1,t|0);if((c[o>>2]&4|0)==0){break}t=c[m>>2]|0;u=(a[p]&1)!=0?115008:115944;cf(t|0,106816,(v=i,i=i+8|0,c[v>>2]=u,v)|0)}else if((q|0)==0){aI(109752,4,1,c[m>>2]|0);i=d;return}else if((q|0)==1){aI(105832,9,1,c[m>>2]|0);if((c[o>>2]&4|0)==0){break}aI(104760,32,1,c[m>>2]|0)}}while(0);if((a[65024+(b*688&-1)|0]&1)!=0){o=c[m>>2]|0;aI(104192,34,1,o|0)}aI(103824,15,1,c[m>>2]|0);do{if((a[65272+(b*688&-1)|0]&1)==0){o=c[m>>2]|0;aI(100008,25,1,o|0)}else{o=c[65128+(b*688&-1)>>2]|0;if((o|0)==0){q=c[m>>2]|0;aI(103432,16,1,q|0);break}else if((o|0)==2){aI(101240,17,1,c[m>>2]|0);break}else if((o|0)==1){aI(100688,18,1,c[m>>2]|0);break}else{break}}}while(0);cf(c[m>>2]|0,99584,(v=i,i=i+8|0,c[v>>2]=n,v)|0);n=65032+(b*688&-1)|0;o=c[m>>2]|0;if((c[n>>2]|0)==0){aI(97264,23,1,o|0)}else{aI(99160,8,1,o|0);o=c[m>>2]|0;q=c[n>>2]|0;cf(o|0,98536,(v=i,i=i+8|0,c[v>>2]=q,v)|0);q=c[m>>2]|0;aI(97880,35,1,q|0)}aI(96688,11,1,c[m>>2]|0);q=c[64984+(b*688&-1)>>2]|0;if((q|0)==0){w=179864}else{w=c[21784+(q<<2)>>2]|0}s=+h[65e3+(b*688&-1)>>3];o=c[64988+(b*688&-1)>>2]|0;if((o|0)==(q|0)){x=179864}else{x=c[21784+(o<<2)>>2]|0}r=+h[65008+(b*688&-1)>>3];q=c[64992+(b*688&-1)>>2]|0;if((q|0)==(o|0)){y=179864}else{y=c[21784+(q<<2)>>2]|0}z=+h[65016+(b*688&-1)>>3];cf(c[m>>2]|0,77392,(v=i,i=i+48|0,c[v>>2]=w,h[v+8>>3]=s,c[v+16>>2]=x,h[v+24>>3]=r,c[v+32>>2]=y,h[v+40>>3]=z,v)|0);aI(84248,2,1,c[m>>2]|0);y=c[64920+(b*688&-1)>>2]|0;if((y|0)==5){x=c[m>>2]|0;aI(94856,30,1,x|0)}else if((y|0)==4){aI(95344,32,1,c[m>>2]|0)}else if((y|0)==2){aI(94192,8,1,c[m>>2]|0);x=64952+(b*688&-1)|0;do{if(+h[x>>3]!=-8.988465674311579e+307){w=c[m>>2]|0;aI(93552,6,1,w|0);w=64808+(b*688&-1)|0;q=c[m>>2]|0;if((c[w>>2]|0)==1){aF(34,q|0);o=j|0;n=64813+(b*688&-1)|0;z=+h[x>>3];t3(g,z);r=z- +O(+z);t4(o,80,n,g,r);n=j3(o)|0;o=c[m>>2]|0;aK(n|0,o|0);o=c[m>>2]|0;aF(34,o|0);A=w;break}else{r=+h[x>>3];cf(q|0,92736,(v=i,i=i+8|0,h[v>>3]=r,v)|0);A=w;break}}else{A=64808+(b*688&-1)|0}}while(0);x=(c[A>>2]|0)==1?91240:179864;cf(c[m>>2]|0,91888,(v=i,i=i+16|0,h[v>>3]=+h[64960+(b*688&-1)>>3],c[v+8>>2]=x,v)|0);x=64968+(b*688&-1)|0;do{if(+h[x>>3]!=8.988465674311579e+307){g=c[m>>2]|0;aI(90664,7,1,g|0);g=c[m>>2]|0;if((c[A>>2]|0)==1){aF(34,g|0);j=k|0;w=64813+(b*688&-1)|0;r=+h[x>>3];t3(f,r);z=r- +O(+r);t4(j,80,w,f,z);w=j3(j)|0;j=c[m>>2]|0;aK(w|0,j|0);j=c[m>>2]|0;aF(34,j|0);break}else{z=+h[x>>3];cf(g|0,92736,(v=i,i=i+8|0,h[v>>3]=z,v)|0);break}}}while(0);aF(10,c[m>>2]|0)}else if((y|0)==1){aI(95816,35,1,c[m>>2]|0)}else if((y|0)==3){aI(90168,25,1,c[m>>2]|0)}else{uf(-1,89432,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}y=64944+(b*688&-1)|0;if((c[y>>2]|0)!=0){x=c[m>>2]|0;aI(89080,18,1,x|0);x=c[y>>2]|0;L11649:do{if((x|0)!=0){y=64808+(b*688&-1)|0;f=l|0;k=64813+(b*688&-1)|0;A=x;do{g=c[A+8>>2]|0;if((g|0)!=0){j=c[m>>2]|0;w=j3(g)|0;cf(j|0,103640,(v=i,i=i+8|0,c[v>>2]=w,v)|0)}w=c[m>>2]|0;if((c[y>>2]|0)==1){aF(34,w|0);z=+h[A>>3];t3(e,z);r=z- +O(+z);t4(f,80,k,e,r);j=j3(f)|0;g=c[m>>2]|0;aK(j|0,g|0);g=c[m>>2]|0;aF(34,g|0)}else{r=+h[A>>3];cf(w|0,92736,(v=i,i=i+8|0,h[v>>3]=r,v)|0)}w=c[A+12>>2]|0;if((w|0)!=0){g=c[m>>2]|0;cf(g|0,95144,(v=i,i=i+8|0,c[v>>2]=w,v)|0)}w=A+16|0;if((c[w>>2]|0)==0){break L11649}aI(86120,2,1,c[m>>2]|0);A=c[w>>2]|0;}while((A|0)!=0)}}while(0);e=c[m>>2]|0;aI(84944,2,1,e|0)}e=64928+(b*688&-1)|0;x=e|0;if((c[x>>2]|0)!=0){l=c[m>>2]|0;aI(84256,2,1,l|0);l=c[m>>2]|0;if((c[x>>2]|0)==0){B=l}else{aI(145280,10,1,l|0);jg(l,e);B=c[m>>2]|0}aF(10,B|0)}B=c[64924+(b*688&-1)>>2]|0;if((B|0)==0){i=d;return}if((a[B]|0)==0){i=d;return}cf(c[m>>2]|0,82560,(v=i,i=i+8|0,c[v>>2]=B,v)|0);i=d;return}function j5(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0;f=i;g=c[d>>2]|0;if((g|0)==2){j=d+8|0;if((cg(+(+h[j>>3]))|0)==0){aI(133568,3,1,b|0);i=f;return}k=d+16|0;l=+h[k>>3]!=0.0;m=+h[j>>3];j=c[8300]|0;n=j+1|0;c[8300]=(n|0)>3?0:n;n=33096+(j*25&-1)|0;be(n|0,121864,(v=i,i=i+8|0,h[v>>3]=m,v)|0);do{if((a8(n|0,46)|0)==0){if((a8(n|0,101)|0)!=0){break}if((a8(n|0,69)|0)!=0){break}o=(uA(n|0)|0)+(33096+(j*25&-1))|0;a[o]=a[119960]|0;a[o+1|0]=a[119961|0]|0;a[o+2|0]=a[119962|0]|0}}while(0);if(!l){aK(n|0,b|0);i=f;return}m=+h[k>>3];k=c[8300]|0;l=k+1|0;c[8300]=(l|0)>3?0:l;l=33096+(k*25&-1)|0;be(l|0,121864,(v=i,i=i+8|0,h[v>>3]=m,v)|0);do{if((a8(l|0,46)|0)==0){if((a8(l|0,101)|0)!=0){break}if((a8(l|0,69)|0)!=0){break}j=(uA(l|0)|0)+(33096+(k*25&-1))|0;a[j]=a[119960]|0;a[j+1|0]=a[119961|0]|0;a[j+2|0]=a[119962|0]|0}}while(0);cf(b|0,129368,(v=i,i=i+16|0,c[v>>2]=n,c[v+8>>2]=l,v)|0);i=f;return}else if((g|0)==1){cf(b|0,21e4,(v=i,i=i+8|0,c[v>>2]=c[d+8>>2],v)|0);i=f;return}else if((g|0)==3){g=c[d+8>>2]|0;if((g|0)==0){i=f;return}if(e){e=j3(g)|0;cf(b|0,126760,(v=i,i=i+8|0,c[v>>2]=e,v)|0);i=f;return}else{aK(g|0,b|0);i=f;return}}else{uf(-1,125696,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function j6(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,n=0.0,o=0,p=0.0,q=0,r=0.0;f=i;if((e|0)==0){i=f;return}g=c[m>>2]|0;j=c[e+60>>2]|0;if((j|0)==0){k=179864}else{k=j3(j)|0}cf(g|0,201680,(v=i,i=i+24|0,c[v>>2]=b,c[v+8>>2]=d,c[v+16>>2]=k,v)|0);k=c[e+144>>2]|0;if((k|0)==0){l=179864}else{l=c[21784+(k<<2)>>2]|0}n=+h[e+160>>3];d=c[e+148>>2]|0;if((d|0)==(k|0)){o=179864}else{o=c[21784+(d<<2)>>2]|0}p=+h[e+168>>3];k=c[e+152>>2]|0;if((k|0)==(d|0)){q=179864}else{q=c[21784+(k<<2)>>2]|0}r=+h[e+176>>3];cf(c[m>>2]|0,77392,(v=i,i=i+48|0,c[v>>2]=l,h[v+8>>3]=n,c[v+16>>2]=o,h[v+24>>3]=p,c[v+32>>2]=q,h[v+40>>3]=r,v)|0);q=c[e+64>>2]|0;if((q|0)!=0){o=c[m>>2]|0;l=j3(q)|0;cf(o|0,200976,(v=i,i=i+8|0,c[v>>2]=l,v)|0)}do{if((c[e+4>>2]|0)==-3){l=c[m>>2]|0;aI(200160,30,1,l|0)}else{l=c[e+52>>2]|0;if((l|0)==0){break}o=c[m>>2]|0;cf(o|0,199392,(v=i,i=i+8|0,c[v>>2]=l,v)|0)}}while(0);l=e+72|0;if((c[l>>2]|0)!=0){o=c[m>>2]|0;aI(145280,10,1,o|0);jg(o,l)}if((a[e+184|0]&1)!=0){e=c[m>>2]|0;aI(199048,11,1,e|0)}aF(10,c[m>>2]|0);i=f;return}function j7(){var b=0,d=0,e=0,f=0,g=0.0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}d=c[12372]|0;if((d|0)==1|(d|0)==4){e=c[m>>2]|0;f=(d|0)==1?179864:114984;g=+(c[12373]|0)/100.0;cf(e|0,115056,(v=i,i=i+16|0,c[v>>2]=f,h[v+8>>3]=g,v)|0)}else if((d|0)==2|(d|0)==5){f=c[12374]|0;cf(c[m>>2]|0,114872,(v=i,i=i+16|0,c[v>>2]=(d|0)==2?179864:114984,c[v+8>>2]=f,v)|0)}else{aI(114808,20,1,c[m>>2]|0)}f=c[m>>2]|0;if((c[12376]|0)==1&(c[12377]|0)==-3){aI(114720,16,1,f|0);i=b;return}else{aI(114672,13,1,f|0);jg(c[m>>2]|0,49504);f=c[m>>2]|0;aF(10,f|0);i=b;return}}function j8(){var a=0,b=0,d=0,e=0,f=0.0,g=0,j=0,k=0.0,l=0,n=0.0,o=0,p=0;a=i;b=c[9670]|0;if((b|0)==4){d=c[m>>2]|0;e=c[9671]|0;f=+h[4840];cf(d|0,115720,(v=i,i=i+16|0,c[v>>2]=e,h[v+8>>3]=f,v)|0)}else if((b|0)==3){cf(c[m>>2]|0,115896,(v=i,i=i+8|0,c[v>>2]=c[9671],v)|0)}else if((b|0)==1){aI(115656,31,1,c[m>>2]|0)}else if((b|0)==2){aI(115560,34,1,c[m>>2]|0)}aI(115520,14,1,c[m>>2]|0);b=c[9720]|0;if((b|0)==0){g=179864}else{g=c[21784+(b<<2)>>2]|0}f=+h[4862];e=c[9721]|0;if((e|0)==(b|0)){j=179864}else{j=c[21784+(e<<2)>>2]|0}k=+h[4863];b=c[9722]|0;if((b|0)==(e|0)){l=179864}else{l=c[21784+(b<<2)>>2]|0}n=+h[4864];cf(c[m>>2]|0,77392,(v=i,i=i+48|0,c[v>>2]=g,h[v+8>>3]=f,c[v+16>>2]=j,h[v+24>>3]=k,c[v+32>>2]=l,h[v+40>>3]=n,v)|0);if((c[9702]|0)!=1){o=c[m>>2]|0;p=aF(10,o|0)|0;i=a;return}cf(c[m>>2]|0,115464,(v=i,i=i+8|0,c[v>>2]=(c[9703]|0)+1,v)|0);o=c[m>>2]|0;p=aF(10,o|0)|0;i=a;return}function j9(){var b=0,d=0,e=0.0,f=0,g=0;b=i;cf(c[m>>2]|0,121184,(v=i,i=i+8|0,c[v>>2]=(c[14068]|0)==257?120960:120872,v)|0);aI(120712,32,1,c[m>>2]|0);d=c[m>>2]|0;e=+h[7032];if((c[14062]|0)==1){cf(d|0,120416,(v=i,i=i+8|0,h[v>>3]=e,v)|0)}else{cf(d|0,120264,(v=i,i=i+8|0,h[v>>3]=e,v)|0)}d=c[m>>2]|0;if((a[56264]&1)==0){aI(119752,28,1,d|0)}else{f=(c[14067]|0)+1|0;cf(d|0,119912,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}cf(c[m>>2]|0,119616,(v=i,i=i+8|0,h[v>>3]=+h[7035],v)|0);f=c[m>>2]|0;d=c[14072]|0;do{if((d|0)==2){g=119368}else{if((d|0)==3){g=119280;break}g=(d|0)==1?119216:119160}}while(0);cf(f|0,119552,(v=i,i=i+8|0,c[v>>2]=g,v)|0);cf(c[m>>2]|0,119104,(v=i,i=i+8|0,c[v>>2]=(a[56292]&1)!=0?116904:116760,v)|0);i=b;return}function ka(){var b=0,d=0,e=0,f=0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}d=c[12292]|0;if((d|0)>0){e=150856}else{e=(d|0)<0?121920:150704}cf(c[m>>2]|0,122136,(v=i,i=i+8|0,c[v>>2]=e,v)|0);do{if((a[49240]&1)==0){e=c[12303]|0;d=c[m>>2]|0;if((e|0)==-4){aI(121848,10,1,d|0);break}else{f=e+1|0;cf(d|0,121528,(v=i,i=i+8|0,c[v>>2]=f,v)|0);break}}else{jg(c[m>>2]|0,49248)}}while(0);cf(c[m>>2]|0,121456,(v=i,i=i+8|0,h[v>>3]=+h[6153],v)|0);aI(121392,11,1,c[m>>2]|0);jf(c[m>>2]|0,49176);i=b;return}function kb(){var b=0,d=0,e=0,f=0.0,g=0,j=0,k=0.0,l=0,n=0.0;b=i;if(!(a[928]|0)){d=c[m>>2]|0;aF(10,d|0)}aI(122752,32,1,c[m>>2]|0);d=c[12418]|0;if((d|0)==0){e=179864}else{e=c[21784+(d<<2)>>2]|0}f=+h[6211];g=c[12419]|0;if((g|0)==(d|0)){j=179864}else{j=c[21784+(g<<2)>>2]|0}k=+h[6212];d=c[12420]|0;if((d|0)==(g|0)){l=179864}else{l=c[21784+(d<<2)>>2]|0}n=+h[6213];cf(c[m>>2]|0,77392,(v=i,i=i+48|0,c[v>>2]=e,h[v+8>>3]=f,c[v+16>>2]=j,h[v+24>>3]=k,c[v+32>>2]=l,h[v+40>>3]=n,v)|0);cf(c[m>>2]|0,122680,(v=i,i=i+8|0,h[v>>3]=+h[6214],v)|0);l=c[12406]|0;if((l|0)==1){j=c[m>>2]|0;aI(122448,53,1,j|0);i=b;return}else if((l|0)==0){aI(122568,66,1,c[m>>2]|0);i=b;return}else if((l|0)==2){aI(122360,53,1,c[m>>2]|0);i=b;return}else{i=b;return}}function kc(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0;e=i;f=b|0;if((c[f>>2]|0)<=0){i=e;return}g=(d|0)>0;h=(d|0)<6;j=d+2|0;k=0;do{aF(9,c[m>>2]|0);if(g){l=0;do{aF(32,c[m>>2]|0);l=l+1|0;}while((l|0)<(d|0))}l=b+8+(k<<5)|0;aK(c[41160+(c[l>>2]<<3)>>2]|0,c[m>>2]|0);n=b+8+(k<<5)+8|0;o=c[l>>2]|0;do{if((o|0)==37|(o|0)==38|(o|0)==39|(o|0)==40){l=c[m>>2]|0;p=c[n>>2]|0;cf(l|0,105024,(v=i,i=i+8|0,c[v>>2]=p,v)|0)}else if((o|0)==6){p=n;cf(c[m>>2]|0,124744,(v=i,i=i+8|0,c[v>>2]=c[(c[p>>2]|0)+4>>2],v)|0);if(!h){l=c[m>>2]|0;aF(10,l|0);break}l=c[m>>2]|0;if((c[(c[p>>2]|0)+8>>2]|0)==0){aI(105080,13,1,l|0);break}else{aF(10,l|0);kc(c[(c[p>>2]|0)+8>>2]|0,j);break}}else if((o|0)==2){cf(c[m>>2]|0,105160,(v=i,i=i+8|0,c[v>>2]=a[c[(c[n>>2]|0)+4>>2]|0]|0,v)|0)}else if((o|0)==0){cf(c[m>>2]|0,105248,(v=i,i=i+8|0,c[v>>2]=c[(c[n>>2]|0)+4>>2],v)|0)}else if((o|0)==3){cf(c[m>>2]|0,105160,(v=i,i=i+8|0,c[v>>2]=a[(c[(c[n>>2]|0)+4>>2]|0)+1|0]|0,v)|0)}else if((o|0)==1){aF(32,c[m>>2]|0);j5(c[m>>2]|0,n|0,1);aF(10,c[m>>2]|0)}else if((o|0)==31){cf(c[m>>2]|0,104848,(v=i,i=i+8|0,c[v>>2]=c[b+8+(k<<5)+16>>2],v)|0)}else if((o|0)==7|(o|0)==8){p=n;cf(c[m>>2]|0,124744,(v=i,i=i+8|0,c[v>>2]=c[(c[p>>2]|0)+4>>2],v)|0);if(!h){l=c[m>>2]|0;aF(10,l|0);break}l=c[m>>2]|0;if((c[(c[p>>2]|0)+8>>2]|0)==0){aI(105080,13,1,l|0);break}else{aF(10,l|0);kc(c[(c[p>>2]|0)+8>>2]|0,j);break}}else{aF(10,c[m>>2]|0)}}while(0);k=k+1|0;}while((k|0)<(c[f>>2]|0));i=e;return}function kd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0.0;b=i;d=c[10824]|0;if((d|0)==0){e=0}else{f=(a|0)==0;g=0;j=d;while(1){d=c[j+4>>2]|0;if(f){k=d;l=8695}else{if((d|0)==(a|0)){k=a;l=8695}else{n=g}}do{if((l|0)==8695){l=0;d=c[m>>2]|0;cf(d|0,116640,(v=i,i=i+8|0,c[v>>2]=k,v)|0);d=c[m>>2]|0;aD(d|0);d=c[m>>2]|0;o=j+72|0;p=c[o>>2]|0;if((p|0)==0){q=116368}else{q=(p|0)==2?116472:116424}p=(c[j+12>>2]|0)!=0?150856:150704;cf(d|0,116584,(v=i,i=i+16|0,c[v>>2]=q,c[v+8>>2]=p,v)|0);ji(c[m>>2]|0,j+16|0,0);p=c[m>>2]|0;aF(10,p|0);if((c[o>>2]|0)==0){n=1;break}o=c[m>>2]|0;p=j+112|0;d=c[p>>2]|0;if((d|0)==2){r=128e3}else{r=(d|0)==1?127904:127768}cf(o|0,116328,(v=i,i=i+8|0,c[v>>2]=r,v)|0);s=+h[j+80>>3];o=c[m>>2]|0;if(s<=0.0){aI(116160,29,1,o|0);n=1;break}d=c[j+88>>2]|0;if((d|0)==0){t=179864}else{t=c[21808+(d<<2)>>2]|0}u=+h[j+96>>3];cf(o|0,116216,(v=i,i=i+24|0,c[v>>2]=t,h[v+8>>3]=s,h[v+16>>3]=u,v)|0);if((c[p>>2]|0)!=0){p=c[m>>2]|0;u=+h[j+104>>3];cf(p|0,126792,(v=i,i=i+8|0,h[v>>3]=u,v)|0)}p=c[m>>2]|0;aF(10,p|0);n=1}}while(0);p=c[j>>2]|0;if((p|0)==0){e=n;break}else{g=n;j=p}}}if((a|0)<1|e){i=b;return}else{uf(c[13898]|0,115992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function ke(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];d=c[e>>2]|0;e=d;do{if((f|0)==3){k=+uz(e,b);l=(e|0)==(c[b>>2]|0);uu(e);if(!l){m=k;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==2){m=j;break}else if((f|0)==1){m=+(d|0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);j=+b3(+m);d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{f=d+1|0;c[6354]=f;d=14296+(f*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(f*24&-1)>>3]=j;h[14312+(f*24&-1)>>3]=0.0;i=a;return}}function kf(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];d=c[e>>2]|0;e=d;do{if((f|0)==3){k=+uz(e,b);l=(e|0)==(c[b>>2]|0);uu(e);if(!l){m=k;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==1){m=+(d|0);break}else if((f|0)==2){m=j;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);j=+bu(+m);f=c[6354]|0;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{d=f+1|0;c[6354]=d;f=14296+(d*24&-1)|0;c[f>>2]=2;c[f+4>>2]=g;h[14304+(d*24&-1)>>3]=j;h[14312+(d*24&-1)>>3]=0.0;i=a;return}}function kg(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0,s=0.0,t=0,u=0.0,w=0.0,x=0.0,y=0.0;b=i;i=i+32|0;d=b|0;e=b+8|0;f=b+16|0;g=b+24|0;j=c[6354]|0;if((j|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=j-1|0;c[6354]=k;l=c[14296+(j*24&-1)>>2]|0;m=14304+(j*24&-1)|0;n=+h[m>>3];j=c[m>>2]|0;h[g>>3]=n;m=j;j=m;do{if((l|0)==3){o=+uz(j,f);p=(j|0)==(c[f>>2]|0);uu(j);if(p){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[g>>3]=o;q=o;r=c[6354]|0;break}}else{if((l|0)==1){q=+(m|0);r=k;break}else if((l|0)==2){q=n;r=k;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((r|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=r-1|0;c[6354]=k;l=c[14296+(r*24&-1)>>2]|0;m=14304+(r*24&-1)|0;n=+h[m>>3];r=c[m>>2]|0;h[g>>3]=n;m=r;r=m;do{if((l|0)==3){o=+uz(r,e);j=(r|0)==(c[e>>2]|0);uu(r);if(j){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[g>>3]=o;s=o;t=c[6354]|0;break}}else{if((l|0)==2){s=n;t=k;break}else if((l|0)==1){s=+(m|0);t=k;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((t|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=t-1;k=14296+(t*24&-1)|0;m=c[k>>2]|0;l=c[k+4>>2]|0;k=14304+(t*24&-1)|0;n=+h[k>>3];r=c[k>>2]|0;h[g>>3]=n;o=+h[14312+(t*24&-1)>>3];t=r;r=t;do{if((m|0)==3){u=+uz(r,d);k=(r|0)==(c[d>>2]|0);uu(r);if(k){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[g>>3]=u;w=u;x=0.0;break}}else{if((m|0)==2){w=n;x=o;break}else if((m|0)==1){w=+(t|0);x=o;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if(w>0.0&s>0.0){if(q<0.0|q>1.0){break}do{if(q==0.0|q==1.0){y=q}else{if(q*(s+w)<=w){y=+kr(w,s,q);break}o=+kr(s,w,1.0-q);if(o<0.0){y=o;break}y=1.0-o}}while(0);if(y==-1.0){break}h[g>>3]=y;t=c[6354]|0;if((t|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=t+1|0;c[6354]=m;t=14296+(m*24&-1)|0;c[t>>2]=2;c[t+4>>2]=l;h[14304+(m*24&-1)>>3]=y;h[14312+(m*24&-1)>>3]=0.0;i=b;return}}while(0);a[1960]=1;c[g>>2]=0;m=c[6354]|0;if((m|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t=m+1|0;c[6354]=t;m=14296+(t*24&-1)|0;c[m>>2]=1;c[m+4>>2]=l;h[14304+(t*24&-1)>>3]=+h[g>>3];h[14312+(t*24&-1)>>3]=x;i=b;return}function kh(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0.0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0,z=0.0,A=0.0,B=0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,Q=0.0,R=0.0,S=0.0,T=0.0;b=i;i=i+24|0;d=b|0;e=b+8|0;f=b+16|0;g=c[6354]|0;if((g|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=g-1|0;c[6354]=j;k=c[14296+(g*24&-1)>>2]|0;l=14304+(g*24&-1)|0;m=+h[l>>3];g=c[l>>2]|0;h[f>>3]=m;l=g;g=l;do{if((k|0)==3){n=+uz(g,e);o=(g|0)==(c[e>>2]|0);uu(g);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[f>>3]=n;p=n;q=c[6354]|0;break}}else{if((k|0)==1){p=+(l|0);q=j;break}else if((k|0)==2){p=m;q=j;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((q|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=q-1;j=14296+(q*24&-1)|0;k=c[j>>2]|0;l=c[j+4>>2]|0;j=14304+(q*24&-1)|0;m=+h[j>>3];g=c[j>>2]|0;h[f>>3]=m;n=+h[14312+(q*24&-1)>>3];q=g;g=q;do{if((k|0)==3){r=+uz(g,d);j=(g|0)==(c[d>>2]|0);uu(g);if(j){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[f>>3]=r;s=r;t=0.0;break}}else{if((k|0)==1){s=+(q|0);t=n;break}else if((k|0)==2){s=m;t=n;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);L12007:do{if(p>=0.0&s>0.0){do{if(p==0.0){u=0.0}else{if(p>1.0e8){u=1.0;break}n=s*+_(+p)-p;m=n- +b2(+(s+1.0));if(m<-706.893623549172){w=0.0}else{w=+Z(+m)}do{if(p>1.0){if(s+2.0>p){x=s;y=0;z=1.0;A=1.0;B=8809;break}m=1.0-s;n=p+m+1.0;r=p+1.0;C=p*n;D=n;k=1;n=1.0;E=p;F=r;G=C;H=m;m=r/C;while(1){C=H+1.0;r=D+2.0;I=C*+(k|0);J=F*r-n*I;K=G*r-E*I;if(K!=0.0){L=J/K;I=L*1.1920928955078125e-7;if(+P(+(m-L))>(I>1.1920928955078125e-7?1.1920928955078125e-7:I)){M=L}else{break}}else{M=m}if(+P(+J)<3.4028234663852886e+38){N=K;O=J;Q=G;R=F}else{N=K/3.4028234663852886e+38;O=J/3.4028234663852886e+38;Q=G/3.4028234663852886e+38;R=F/3.4028234663852886e+38}q=k+1|0;if((q|0)<201){D=r;k=q;n=R;E=Q;F=O;G=N;H=C;m=M}else{break L12007}}S=1.0-s*w*L}else{x=s;y=0;z=1.0;A=1.0;B=8809}}while(0);if((B|0)==8809){while(1){B=0;if((y|0)>=201){break L12007}m=x+1.0;H=A*(p/m);T=z+H;if(H>3]=u;k=c[6354]|0;if((k|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}q=k+1|0;c[6354]=q;k=14296+(q*24&-1)|0;c[k>>2]=2;c[k+4>>2]=l;h[14304+(q*24&-1)>>3]=u;h[14312+(q*24&-1)>>3]=0.0;i=b;return}}while(0);a[1960]=1;c[f>>2]=0;B=c[6354]|0;if((B|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}y=B+1|0;c[6354]=y;B=14296+(y*24&-1)|0;c[B>>2]=1;c[B+4>>2]=l;h[14304+(y*24&-1)>>3]=+h[f>>3];h[14312+(y*24&-1)>>3]=t;i=b;return}function ki(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0;b=i;i=i+16|0;d=b|0;e=b+8|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=f-1;g=14296+(f*24&-1)|0;j=c[g>>2]|0;k=c[g+4>>2]|0;g=14304+(f*24&-1)|0;l=+h[g>>3];m=c[g>>2]|0;h[e>>3]=l;n=+h[14312+(f*24&-1)>>3];f=m;m=f;do{if((j|0)==3){o=+uz(m,d);g=(m|0)==(c[d>>2]|0);uu(m);if(g){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[e>>3]=o;p=o;q=0.0;break}}else{if((j|0)==1){p=+(f|0);q=n;break}else if((j|0)==2){p=l;q=n;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);n=+b2(+p);if(n>709.1962086421661){a[1960]=1;c[e>>2]=0;j=c[6354]|0;if((j|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=j+1|0;c[6354]=f;j=14296+(f*24&-1)|0;c[j>>2]=1;c[j+4>>2]=k;h[14304+(f*24&-1)>>3]=+h[e>>3];h[14312+(f*24&-1)>>3]=q;i=b;return}q=+(c[aH()>>2]|0);if(n<-706.893623549172){r=0.0}else{r=+Z(+n)}n=q*r;h[e>>3]=n;e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e+1|0;c[6354]=f;e=14296+(f*24&-1)|0;c[e>>2]=2;c[e+4>>2]=k;h[14304+(f*24&-1)>>3]=n;h[14312+(f*24&-1)>>3]=0.0;i=b;return}function kj(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];d=c[e>>2]|0;e=d;do{if((f|0)==3){k=+uz(e,b);l=(e|0)==(c[b>>2]|0);uu(e);if(!l){m=k;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==2){m=j;break}else if((f|0)==1){m=+(d|0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);j=+b2(+m);d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{f=d+1|0;c[6354]=f;d=14296+(f*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(f*24&-1)>>3]=j;h[14312+(f*24&-1)>>3]=0.0;i=a;return}}function kk(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0,s=0,t=0.0,u=0,w=0.0,x=0,y=0,z=0,A=0,B=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;l=+h[f>>3];m=+h[14312+(e*24&-1)>>3];e=c[f>>2]|0;f=e;do{if((g|0)==3){n=+uz(f,d);o=(f|0)==(c[d>>2]|0);uu(f);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=n;p=n;q=0.0;r=2;s=c[k>>2]|0;t=n;break}}else{if((g|0)==2){p=l;q=m;r=2;s=e;t=l;break}else if((g|0)==1){p=+(e|0);q=m;r=1;s=e;t=l;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if(p!=0.0){if((r|0)==2){u=8870;break}else if((r|0)==1){w=+(s|0);x=0;y=s;u=8871;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{if((r|0)==2){if(q!=0.0){u=8870;break}}else if((r|0)!=1){uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(!(a[27800]|0)){u=8886;break}z=c[6948]|0;A=c[6946]|0}}while(0);if((u|0)==8870){w=t;x=~~q;y=~~t;u=8871}L12113:do{if((u|0)==8871){if(w!=+(y|0)){uf(-1,216320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((r|0)==3){uh(-1,212704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uf(-1,212032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((r|0)==1){B=0.0}else if((r|0)==2){B=q}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(B!=+(x|0)){uf(-1,216320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if((y|0)<1){if((x|0)!=0){uf(-1,216320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((y|0)>=0){break}a[27800]=0;u=8886;break L12113}else{if((x|0)>=0){break}uf(-1,216320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[6948]=y;s=(x|0)!=0?x:y;c[6946]=s;a[27800]=1;z=y;A=s}}while(0);if((u|0)==8886){a[27800]=1;c[6948]=1234567890;c[6946]=1234567890;z=1234567890;A=1234567890}u=(z|0)/53668&-1;y=(((u*-53668&-1)+z|0)*40014&-1)+(u*-12211&-1)|0;u=(y|0)<0?y+2147483563|0:y;c[6948]=u;y=(A|0)/52774&-1;z=(((y*-52774&-1)+A|0)*40692&-1)+(y*-3791&-1)|0;y=(z|0)<0?z+2147483399|0:z;c[6946]=y;z=u-y|0;y=c[6354]|0;if((y|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{u=y+1|0;c[6354]=u;y=14296+(u*24&-1)|0;c[y>>2]=2;c[y+4>>2]=j;h[14304+(u*24&-1)>>3]=+(((z|0)<1?z+2147483562|0:z)|0)*4.656613057e-10;h[14312+(u*24&-1)>>3]=0.0;i=b;return}}function kl(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0,w=0.0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0;a=i;i=i+400|0;b=a|0;d=a+48|0;e=a+96|0;f=a+144|0;g=a+192|0;j=a+240|0;k=a+288|0;l=a+336|0;m=a+384|0;n=a+392|0;o=c[6354]|0;if((o|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=o-1|0;c[6354]=p;q=c[14296+(o*24&-1)>>2]|0;r=14304+(o*24&-1)|0;s=+h[r>>3];o=c[r>>2]|0;r=o;do{if((q|0)==3){t=+uz(r,n);u=(r|0)==(c[n>>2]|0);uu(r);if(u){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{w=t;x=c[6354]|0;break}}else{if((q|0)==2){w=s;x=p;break}else if((q|0)==1){w=+(o|0);x=p;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((x|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=x-1;p=14296+(x*24&-1)|0;o=c[p>>2]|0;q=c[p+4>>2]|0;p=14304+(x*24&-1)|0;s=+h[p>>3];x=c[p>>2]|0;p=x;do{if((o|0)==3){t=+uz(p,m);r=(p|0)==(c[m>>2]|0);uu(p);if(!r){y=t;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((o|0)==1){y=+(x|0);break}else if((o|0)==2){y=s;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);s=w*w;t=w*.56418958;z=+P(+y);A=z*z;do{if(w<70.55){B=+Q(+(w*(40.0-w*3.6)+15100.0));if(w<8.425){C=+Q(+(164.0-w*(w*1.8+4.3)))}else{C=0.0}D=w*18.1+1.65;o=w>1.0e-6;if(z>=B){E=t/(s+A);break}if(z>=(o?C:B)){F=s+.5;E=(F+A)*w*(.56418958/(F*F+A*(s+s+-1.0+A)));break}if(z>(o?6.8-w:B)){B=s*4.0;F=B+-6.0;E=(s*(s*(s+5.5)+8.25)+1.875+A*(s*(s*3.0+1.0)+5.25+A*(F*.75+A)))*w*(.56418958/(s*(s*(s*(s+6.0)+10.5)+4.5)+.5625+A*(s*(s*(B+6.0)+9.0)-4.5+A*(10.5-s*(6.0-s*6.0)+A*(F+A)))));break}if(z>3];H=y-G;I=H*H;h[e+(o<<3)>>3]=I;J=1.0/(B+I);h[b+(o<<3)>>3]=J;h[g+(o<<3)>>3]=J*H;h[j+(o<<3)>>3]=F*J;J=y+G;G=J*J;h[f+(o<<3)>>3]=G;H=1.0/(B+G);h[d+(o<<3)>>3]=H;h[k+(o<<3)>>3]=J*H;h[l+(o<<3)>>3]=F*H;o=o+1|0;}while((o|0)<6);if(z<=D){E=(+h[j>>3]+ +h[l>>3])*1.0117281-(+h[g>>3]- +h[k>>3])*1.393237+0.0+((+h[j+8>>3]+ +h[l+8>>3])*-.75197147-(+h[g+8>>3]- +h[k+8>>3])*.23115241)+((+h[j+16>>3]+ +h[l+16>>3])*.012557727-(+h[g+16>>3]- +h[k+16>>3])*-.15535147)+((+h[j+24>>3]+ +h[l+24>>3])*.010022008-(+h[g+24>>3]- +h[k+24>>3])*.0062183662)+((+h[j+32>>3]+ +h[l+32>>3])*-.00024206814-(+h[g+32>>3]- +h[k+32>>3])*91908299.0e-12)+((+h[j+40>>3]+ +h[l+40>>3])*5.0084806e-7-(+h[g+40>>3]- +h[k+40>>3])*-6.2752596e-7);break}F=w+3.0;B=0.0;o=0;do{H=+h[37592+(o<<3)>>3];J=+h[e+(o<<3)>>3];G=F*+h[37544+(o<<3)>>3];I=+h[f+(o<<3)>>3];B=B+((H*(J*+h[b+(o<<3)>>3]- +h[j+(o<<3)>>3]*1.5)+G*+h[g+(o<<3)>>3])/(J+2.25)+(H*(I*+h[d+(o<<3)>>3]- +h[l+(o<<3)>>3]*1.5)-G*+h[k+(o<<3)>>3])/(I+2.25));o=o+1|0;}while((o|0)<6);E=w*B+ +Z(+(-0.0-A))}else{E=t/(s+A)}}while(0);k=c[6354]|0;if((k|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{l=k+1|0;c[6354]=l;k=14296+(l*24&-1)|0;c[k>>2]=2;c[k+4>>2]=q;h[14304+(l*24&-1)>>3]=E;h[14312+(l*24&-1)>>3]=0.0;i=a;return}}function km(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];d=c[e>>2]|0;e=d;do{if((f|0)==3){k=+uz(e,b);l=(e|0)==(c[b>>2]|0);uu(e);if(!l){m=k;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==2){m=j;break}else if((f|0)==1){m=+(d|0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);j=+bu(+(-0.0-m*.7071067811865476));d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{f=d+1|0;c[6354]=f;d=14296+(f*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(f*24&-1)>>3]=j*.5;h[14312+(f*24&-1)>>3]=0.0;i=a;return}}function kn(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0.0,s=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;k=+h[f>>3];e=c[f>>2]|0;f=e;do{if((g|0)==3){l=+uz(f,d);m=(f|0)==(c[d>>2]|0);uu(f);if(!m){n=l;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((g|0)==2){n=k;break}else if((g|0)==1){n=+(e|0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if(n<=0.0|n>=1.0){a[1960]=1;e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=e+1|0;c[6354]=g;e=14296+(g*24&-1)|0;c[e>>2]=2;c[e+4>>2]=j;uE(14304+(g*24&-1)|0,0,16);i=b;return}do{if(n>0.0){if(n>=1.0){bD(75808,(v=i,i=i+8|0,c[v>>2]=205976,v)|0);bD(223272,(v=i,i=i+8|0,c[v>>2]=133496,v)|0);o=1.7976931348623157e+308;break}if(n>.8646647167633873){p=0;q=1.0-n}else{p=1;q=n}if(q>.1353352832366127){k=q+-.5;l=k*k;o=(k+k*(l*(l*(l*(l*(l*-59.96335010141079+98.00107541859997)-56.67628574690703)+13.931260938727968)-1.2391658386738125)/(l*(l*(l*(l*(l*(l*(l*(l+1.9544885833814176)+4.676279128988815)+86.36024213908905)-225.46268785411937)+200.26021238006066)-82.03722561683334)+15.90562251262117)-1.1833162112133)))*2.5066282746310007;break}l=+Q(+(+_(+q)*-2.0));k=l- +_(+l)/l;r=1.0/l;if(l<8.0){s=r*(r*(r*(r*(r*(r*(r*(r*(r*4.0554489230596245+31.525109459989388)+57.16281922464213)+44.08050738932008)+14.684956192885803)+2.1866330685079025)+-.1402560791713545)+-.03504246268278482)+-.0008574567851546854)/(r*(r*(r*(r*(r*(r*(r*(r+15.779988325646675)+45.39076351288792)+41.3172038254672)+15.04253856929075)+2.504649462083094)+-.14218292285478779)+-.03808064076915783)+-.0009332594808954574)}else{s=r*(r*(r*(r*(r*(r*(r*(r*(r*3.2377489177694603+6.915228890689842)+3.9388102529247444)+1.3330346081580755)+.20148538954917908)+.012371663481782003)+.00030158155350823543)+26580697468673755.0e-22)+6.239745391849833e-9)/(r*(r*(r*(r*(r*(r*(r*(r+6.02427039364742)+3.6798356385616087)+1.3770209948908132)+.21623699359449663)+.013420400608854318)+.00032801446468212774)+28924786474538068.0e-22)+6.790194080099813e-9)}r=k-s;if((p|0)==0){o=r;break}o=-0.0-r}else{bD(75808,(v=i,i=i+8|0,c[v>>2]=205976,v)|0);bD(223272,(v=i,i=i+8|0,c[v>>2]=133496,v)|0);o=-1.7976931348623157e+308}}while(0);p=c[6354]|0;if((p|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=p+1|0;c[6354]=g;p=14296+(g*24&-1)|0;c[p>>2]=2;c[p+4>>2]=j;h[14304+(g*24&-1)>>3]=o;h[14312+(g*24&-1)>>3]=0.0;i=b;return}function ko(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;k=+h[f>>3];e=c[f>>2]|0;f=e;do{if((g|0)==3){l=+uz(f,d);m=(f|0)==(c[d>>2]|0);uu(f);if(!m){n=l;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((g|0)==2){n=k;break}else if((g|0)==1){n=+(e|0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if(+P(+n)>=1.0){a[1960]=1;e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=e+1|0;c[6354]=g;e=14296+(g*24&-1)|0;c[e>>2]=2;c[e+4>>2]=j;uE(14304+(g*24&-1)|0,0,16);i=b;return}do{if(n<-1.0|n>1.0){bD(137432,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);o=+_(-1.0)}else{if(n==-1.0|n==1.0){o=+_(0.0)*(-0.0-n);break}do{if(n>-1.0&n<-.7){k=+Q(+(-0.0- +_(+((n+1.0)*.5))));p=(-0.0-(k*(k*(k*1.641345311+3.429567803)-1.624906493)-1.970840454))/(k*(k*1.6370678+3.5438892)+1.0)}else{if(!(n<-.7|n>.7)){k=n*n;p=n*(k*(k*(k*-.140543331+.914624893)-1.645349621)+.886226899)/(k*(k*(k*(k*.012229801+.012229801)+1.442710462)-2.118377725)+1.0);break}if(!(n>.7&n<1.0)){p=0.0;break}k=+Q(+(-0.0- +_(+((1.0-n)*.5))));p=(k*(k*(k*1.641345311+3.429567803)-1.624906493)-1.970840454)/(k*(k*1.6370678+3.5438892)+1.0)}}while(0);k=+b3(+p)-n;l=p*(-0.0-p);if(l<-706.893623549172){q=0.0}else{q=+Z(+l)*1.1283791670955126}l=p-k/q;k=+b3(+l)-n;r=l*(-0.0-l);if(r<-706.893623549172){s=0.0}else{s=+Z(+r)*1.1283791670955126}r=l-k/s;k=+b3(+r)-n;l=r*(-0.0-r);if(l<-706.893623549172){t=0.0}else{t=+Z(+l)*1.1283791670955126}l=r-k/t;k=+b3(+l)-n;r=l*(-0.0-l);if(r<-706.893623549172){u=0.0}else{u=+Z(+r)*1.1283791670955126}o=l-k/u}}while(0);g=c[6354]|0;if((g|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=g+1|0;c[6354]=e;g=14296+(e*24&-1)|0;c[g>>2]=2;c[g+4>>2]=j;h[14304+(e*24&-1)>>3]=o;h[14312+(e*24&-1)>>3]=0.0;i=b;return}function kp(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;k=+h[f>>3];e=c[f>>2]|0;f=e;do{if((g|0)==3){l=+uz(f,d);m=(f|0)==(c[d>>2]|0);uu(f);if(!m){n=l;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((g|0)==2){n=k;break}else if((g|0)==1){n=+(e|0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);L12315:do{if(n<-.36787944117144233){o=-1.0;p=9032}else{if(+P(+n)>1.1920928955078125e-7){if(n<1.0){k=+Q(+((n*2.718281828459045+1.0)*2.0));q=k+-1.0-k*k/3.0+k*k*k*.1527777777777778}else{q=+_(+n)}if(n>3.0){r=0;s=q- +_(+q)}else{r=0;s=q}while(1){if((r|0)>=20){o=-1.0;p=9032;break L12315}if(s<-706.893623549172){t=0.0}else{t=+Z(+s)}k=s*t-n;l=s+1.0;u=k/(l*t-(s+2.0)*.5*k/l);l=s-u;k=+P(+u);if(k<(+P(+l)+1.0)*1.1920928955078125e-7){w=l;break}else{r=r+1|0;s=l}}}else{w=n}if(w>-1.0){x=w}else{o=w;p=9032}}}while(0);if((p|0)==9032){a[1960]=1;x=o}p=c[6354]|0;if((p|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{r=p+1|0;c[6354]=r;p=14296+(r*24&-1)|0;c[p>>2]=2;c[p+4>>2]=j;h[14304+(r*24&-1)>>3]=x;h[14312+(r*24&-1)>>3]=0.0;i=b;return}}function kq(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];d=c[e>>2]|0;e=d;do{if((f|0)==3){k=+uz(e,b);l=(e|0)==(c[b>>2]|0);uu(e);if(!l){m=k;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==2){m=j;break}else if((f|0)==1){m=+(d|0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);j=+P(+m);k=+R(+j,3.0);if(m<0.0){n=+Q(+(k+.37));o=+R(+j,1.5)*.6666666666666666;j=n*.3989422;p=(j+-.043883564)*+S(+o);q=p/+R(+n,1.1666666666666667)+0.0;p=m*(-.013883003-j)*+T(+o);r=q+p/(o*+R(+n,.8333333333333334)*1.5)}else{n=+Q(+(k+.0425));k=(n*.326662423+-.002800908)/+R(+n,1.1666666666666667)+0.0;o=k+m*(-.007232251-n*.044567423)/+R(+n,1.8333333333333333);r=o*+Z(+(n*-.6666666666666666))}d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{f=d+1|0;c[6354]=f;d=14296+(f*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(f*24&-1)>>3]=r;h[14312+(f*24&-1)>>3]=0.0;i=a;return}}function kr(a,b,c){a=+a;b=+b;c=+c;var d=0.0,e=0.0,f=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0.0,u=0;d=a+b;e=+b2(+d);f=e+ +_(+c)*a;e=f+ +_(+(1.0-c))*b;f=e- +b2(+(a+1.0));e=f- +b2(+b);if(e<-706.893623549172){g=1.0;h=1.0;i=0.0;j=0.0;k=0.0;l=0;m=1}else{f=+Z(+e);g=1.0;h=1.0;i=f;j=f;k=0.0;l=0;m=1}while(1){f=+(m|0);e=+(l|0);n=e+(f+a);o=(d+e)*(-0.0-(e+a))*c/n/(n+-1.0);e=f*(b-f)*c/n/(n+1.0);n=j+k*o;f=g+h*o;o=n+j*e;p=f+g*e;e=+P(+p)<1.1920928955078125e-7?0.0:p;if(e!=0.0){p=o/e;q=+P(+(p-i));if(q<+P(+p)*1.1920928955078125e-7){r=p;s=9057;break}else{t=p}}else{t=i}u=l+1|0;if((u|0)<201){g=e;h=f;i=t;j=o;k=n;l=u;m=m+1|0}else{r=-1.0;s=9056;break}}if((s|0)==9056){return+r}else if((s|0)==9057){return+r}return 0.0}function ks(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0.0,q=0,r=0.0,s=0.0,t=0,u=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0;b=i;i=i+24|0;d=b|0;e=b+8|0;f=b+16|0;g=c[6354]|0;if((g|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=g-1|0;c[6354]=j;k=c[14296+(g*24&-1)>>2]|0;l=14304+(g*24&-1)|0;m=+h[l>>3];g=c[l>>2]|0;l=g;do{if((k|0)==3){n=+uz(l,f);o=(l|0)==(c[f>>2]|0);uu(l);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{p=n;q=c[6354]|0;break}}else{if((k|0)==1){p=+(g|0);q=j;break}else if((k|0)==2){p=m;q=j;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((q|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=q-1;j=14296+(q*24&-1)|0;k=c[j>>2]|0;g=c[j+4>>2]|0;j=14304+(q*24&-1)|0;m=+h[j>>3];q=c[j>>2]|0;j=q;do{if((k|0)==3){n=+uz(j,e);l=(j|0)==(c[e>>2]|0);uu(j);if(!l){r=n;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((k|0)==2){r=m;break}else if((k|0)==1){r=+(q|0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if(r<0.0|p<0.0){s=-1.0;t=9095}else{if(+bj(+r,d|0)!=0.0){s=-1.0;t=9095;break}q=p==0.0;if(q&r<2.0){s=-1.0;t=9095;break}do{if(r==0.0){u=+Z(+(-0.0-p))/p}else{if(q){u=1.0/(r+-1.0);break}if(p>3.0){m=1.0;n=1.0;w=p;x=0.0;y=1.0;k=0;while(1){z=r+ +(k|0);A=x*z+m;B=w+z*n;j=k+1|0;z=+(j|0);C=z*m+p*A;D=z*w+p*B;E=C/D;if(E==y){break}if(D<3.4028234663852886e+38){F=A;G=D;H=B;I=C}else{F=A/3.4028234663852886e+38;G=D/3.4028234663852886e+38;H=B/3.4028234663852886e+38;I=C/3.4028234663852886e+38}if((j|0)<333){m=I;n=H;w=G;x=F;y=E;k=j}else{break}}u=E*+Z(+(-0.0-p));break}y=-.5772156649015329- +_(+p);x=0.0;w=1.0;k=1;while(1){n=+(k|0);m=p*(-0.0-w)/n;J=y-m/n;if(J==x){break}j=k+1|0;if((j|0)<333){y=J;x=J;w=m;k=j}else{break}}if(r<=1.0){u=J;break}w=+Z(+(-0.0-p));x=J;y=1.0;while(1){m=(w-p*x)/y;n=y+1.0;if(n-1.0){K=u}else{s=u;t=9095}}}while(0);if((t|0)==9095){a[1960]=1;K=s}t=c[6354]|0;if((t|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{d=t+1|0;c[6354]=d;t=14296+(d*24&-1)|0;c[t>>2]=2;c[t+4>>2]=g;h[14304+(d*24&-1)>>3]=K;h[14312+(d*24&-1)>>3]=0.0;i=b;return}}function kt(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0,n=0.0,o=0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=14296+(d*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(d*24&-1)|0;k=+h[f>>3];d=c[f>>2]|0;f=d;do{if((g|0)==3){l=+uz(f,b);m=(f|0)==(c[b>>2]|0);uu(f);if(m){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{n=l;o=c[6354]|0;break}}else{if((g|0)==1){n=+(d|0);o=e;break}else if((g|0)==2){n=k;o=e;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((o|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{e=o+1|0;c[6354]=e;o=14296+(e*24&-1)|0;c[o>>2]=2;c[o+4>>2]=j;h[14304+(e*24&-1)>>3]=n;h[14312+(e*24&-1)>>3]=0.0;i=a;return}}function ku(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0.0,m=0,n=0,o=0.0,p=0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=14296+(d*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=c[14304+(d*24&-1)>>2]|0;do{if((g|0)==3){uz(f,b);k=(f|0)==(c[b>>2]|0);uu(f);if(k){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{l=0.0;m=c[6354]|0;n=9118;break}}else{if((g|0)==2){l=+h[14312+(d*24&-1)>>3];m=e;n=9118;break}else if((g|0)==1){o=0.0;p=e;break}uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if((n|0)==9118){o=l;p=m}if((p|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{m=p+1|0;c[6354]=m;p=14296+(m*24&-1)|0;c[p>>2]=2;c[p+4>>2]=j;h[14304+(m*24&-1)>>3]=o;h[14312+(m*24&-1)>>3]=0.0;i=a;return}}function kv(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0.0,n=0,o=0.0,p=0,q=0,r=0.0,s=0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=14296+(d*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(d*24&-1)|0;k=+h[f>>3];l=+h[14312+(d*24&-1)>>3];d=c[f>>2]|0;f=d;do{if((g|0)==3){m=+uz(f,b);n=(f|0)==(c[b>>2]|0);uu(f);if(n){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{o=m;p=c[6354]|0;q=9132;break}}else{if((g|0)==1){r=(d|0)>-1?0.0:3.141592653589793;s=e;break}else if((g|0)==2){if(l==0.0){o=k;p=e;q=9132;break}r=+Y(+l,+k);s=e;break}else{uf(-1,210664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((q|0)==9132){r=o<0.0?3.141592653589793:0.0;s=p}if((s|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{o=r/+h[9040];p=s+1|0;c[6354]=p;s=14296+(p*24&-1)|0;c[s>>2]=2;c[s+4>>2]=j;h[14304+(p*24&-1)>>3]=o;h[14312+(p*24&-1)>>3]=0.0;i=a;return}}function kw(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0.0,l=0,m=0.0,n=0,o=0.0,p=0.0,q=0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=14296+(d*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(d*24&-1)|0;k=+h[f>>3];l=c[f>>2]|0;f=l;do{if((g|0)==3){m=+uz(f,b);n=(f|0)==(c[b>>2]|0);uu(f);if(n){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{o=0.0;p=m;q=c[6354]|0;break}}else{if((g|0)==2){o=+h[14312+(d*24&-1)>>3];p=k;q=e;break}else if((g|0)==1){o=0.0;p=+(l|0);q=e;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((q|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{e=q+1|0;c[6354]=e;q=14296+(e*24&-1)|0;c[q>>2]=2;c[q+4>>2]=j;h[14304+(e*24&-1)>>3]=p;h[14312+(e*24&-1)>>3]=-0.0-o;i=a;return}}function kx(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=c[e>>2]|0;e=k;do{if((f|0)==3){l=+uz(e,b);m=(e|0)==(c[b>>2]|0);uu(e);if(m){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{n=0.0;o=+h[9040];p=l;q=9159;break}}else{l=+h[9040];if((f|0)==2){n=+h[14312+(d*24&-1)>>3];o=l;p=j;q=9159;break}else if((f|0)==1){r=+(k|0);s=+T(+(l*r));t=s*+a4(+(l*0.0));l=+h[9040];u=0.0;w=t;x=l;y=l*r;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((q|0)==9159){j=+T(+(o*p));r=j*+a4(+(n*o));o=+h[9040];u=n;w=r;x=o;y=o*p}p=+bz(+(x*u));q=c[6354]|0;if((q|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{u=+S(+y)*p;k=q+1|0;c[6354]=k;q=14296+(k*24&-1)|0;c[q>>2]=2;c[q+4>>2]=g;h[14304+(k*24&-1)>>3]=w;h[14312+(k*24&-1)>>3]=u;i=a;return}}function ky(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=c[e>>2]|0;e=k;do{if((f|0)==3){l=+uz(e,b);m=(e|0)==(c[b>>2]|0);uu(e);if(m){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{n=0.0;o=+h[9040];p=l;q=9172;break}}else{l=+h[9040];if((f|0)==2){n=+h[14312+(d*24&-1)>>3];o=l;p=j;q=9172;break}else if((f|0)==1){r=+(k|0);s=+S(+(l*r));t=s*+a4(+(l*0.0));l=+h[9040];u=0.0;w=t;x=l;y=l*r;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((q|0)==9172){j=+S(+(o*p));r=j*+a4(+(n*o));o=+h[9040];u=n;w=r;x=o;y=o*p}p=+bz(+(x*u));q=c[6354]|0;if((q|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{u=p*(-0.0- +T(+y));k=q+1|0;c[6354]=k;q=14296+(k*24&-1)|0;c[q>>2]=2;c[q+4>>2]=g;h[14304+(k*24&-1)>>3]=w;h[14312+(k*24&-1)>>3]=u;i=a;return}}function kz(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0,s=0.0,t=0.0,u=0,w=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=14296+(e*24&-1)|0;j=c[g>>2]|0;k=c[g+4>>2]|0;g=14304+(e*24&-1)|0;l=+h[g>>3];m=+h[14312+(e*24&-1)>>3];e=c[g>>2]|0;g=e;do{if((j|0)==3){n=+uz(g,d);o=(g|0)==(c[d>>2]|0);uu(g);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{p=n;q=+h[9040];r=c[6354]|0;break}}else{if((j|0)==1){p=+(e|0);q=+h[9040];r=f;break}else if((j|0)==2){n=+h[9040];if(m==0.0){p=l;q=n;r=f;break}s=n*2.0;n=+S(+(s*l));t=n+ +a4(+(m*s));if(t==0.0){a[1960]=1;o=c[6354]|0;if((o|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}u=o+1|0;c[6354]=u;o=14296+(u*24&-1)|0;c[o>>2]=2;c[o+4>>2]=k;h[14304+(u*24&-1)>>3]=l;h[14312+(u*24&-1)>>3]=m;i=b;return}else{s=+h[9040]*2.0;n=+bz(+(m*s));u=c[6354]|0;if((u|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}w=+T(+(s*l))/t;o=u+1|0;c[6354]=o;u=14296+(o*24&-1)|0;c[u>>2]=2;c[u+4>>2]=k;h[14304+(o*24&-1)>>3]=w;h[14312+(o*24&-1)>>3]=n/t;i=b;return}}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((r|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=+U(+(q*p));f=r+1|0;c[6354]=f;r=14296+(f*24&-1)|0;c[r>>2]=2;c[r+4>>2]=k;h[14304+(f*24&-1)>>3]=l;h[14312+(f*24&-1)>>3]=0.0;i=b;return}function kA(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0.0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=+h[14312+(d*24&-1)>>3];d=c[e>>2]|0;e=d;do{if((f|0)==3){l=+uz(e,b);m=(e|0)==(c[b>>2]|0);uu(e);if(!m){n=l;o=0.0;p=9209;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==1){n=+(d|0);o=0.0;p=9209;break}else if((f|0)==2){if(k==0.0){n=j;o=k;p=9209;break}else{q=j;r=k;break}}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((p|0)==9209){if(+P(+n)>1.0){q=n;r=o;break}f=c[6354]|0;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=+h[9040];j=+W(+n)/k;d=f+1|0;c[6354]=d;f=14296+(d*24&-1)|0;c[f>>2]=2;c[f+4>>2]=g;h[14304+(d*24&-1)>>3]=j;h[14312+(d*24&-1)>>3]=0.0;i=a;return}}while(0);if(q==0.0){p=c[6354]|0;if((p|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}n=+h[9040];o=(-0.0- +_(+(+Q(+(r*r+1.0))-r)))/n;d=p+1|0;c[6354]=d;p=14296+(d*24&-1)|0;c[p>>2]=2;c[p+4>>2]=g;h[14304+(d*24&-1)>>3]=0.0;h[14312+(d*24&-1)>>3]=o;i=a;return}else{o=q+1.0;n=r*r;j=+Q(+(n+o*o))*.5;o=q+-1.0;q=+Q(+(n+o*o))*.5;o=j-q;n=j+q;q=+h[9040];d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=+W(+(o>1.0?1.0:o))/q;o=(r>=0.0?1.0:-1.0)*+_(+(n+ +Q(+(n*n+-1.0))))/q;p=d+1|0;c[6354]=p;d=14296+(p*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(p*24&-1)>>3]=j;h[14312+(p*24&-1)>>3]=o;i=a;return}}function kB(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0.0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0.0,s=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=+h[14312+(d*24&-1)>>3];d=c[e>>2]|0;e=d;do{if((f|0)==3){l=+uz(e,b);m=(e|0)==(c[b>>2]|0);uu(e);if(!m){n=l;o=0.0;p=9233;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==2){if(k==0.0){n=j;o=k;p=9233;break}else{q=j;r=k;break}}else if((f|0)==1){n=+(d|0);o=0.0;p=9233;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((p|0)==9233){if(+P(+n)>1.0){q=n;r=o;break}d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=+h[9040];j=+V(+n)/k;f=d+1|0;c[6354]=f;d=14296+(f*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(f*24&-1)>>3]=j;h[14312+(f*24&-1)>>3]=0.0;i=a;return}}while(0);n=q+1.0;o=r*r;j=+Q(+(o+n*n))*.5;n=q+-1.0;q=+Q(+(o+n*n))*.5;n=j+q;o=j-q;do{if(o>1.0){s=1.0}else{if(o>=-1.0){s=o;break}s=-1.0}}while(0);o=+h[9040];p=c[6354]|0;if((p|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}q=+V(+s)/o;s=+_(+(n+ +Q(+(n*n+-1.0))))*(-0.0-(r>=0.0?1.0:-1.0))/o;f=p+1|0;c[6354]=f;p=14296+(f*24&-1)|0;c[p>>2]=2;c[p+4>>2]=g;h[14304+(f*24&-1)>>3]=q;h[14312+(f*24&-1)>>3]=s;i=a;return}function kC(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0.0,q=0,r=0,s=0.0,t=0,u=0.0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=14296+(e*24&-1)|0;j=g|0;k=c[j>>2]|0;l=g+4|0;g=c[l>>2]|0;m=14304+(e*24&-1)|0;n=+h[m>>3];o=14312+(e*24&-1)|0;p=+h[o>>3];q=c[m>>2]|0;r=q;do{if((k|0)==3){s=+uz(r,d);t=(r|0)==(c[d>>2]|0);uu(r);if(t){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{u=s;w=c[6354]|0;break}}else{if((k|0)==2){if(p==0.0){u=n;w=f;break}do{if(n==0.0){if(+P(+p)<1.0){break}a[1960]=1;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e;c[j>>2]=2;c[l>>2]=g;uE(m|0,0,16);i=b;return}}while(0);if(n<0.0){x=-0.0-p;y=-0.0-n}else{x=p;y=n}s=y*y;z=+X(+(y*2.0/(1.0-s-x*x)));A=x+1.0;B=x+-1.0;C=+_(+((s+A*A)/(s+B*B)))*.25;if(z<0.0){D=z+3.141592653589793}else{D=z}if(n<0.0){E=-0.0-D;F=-0.0-C}else{E=D;F=C}if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}C=E*.5/+h[9040];c[6354]=e;c[j>>2]=2;c[l>>2]=g;h[m>>3]=C;h[o>>3]=F;i=b;return}else if((k|0)==1){u=+(q|0);w=f;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((w|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}F=+h[9040];E=+X(+u)/F;f=w+1|0;c[6354]=f;w=14296+(f*24&-1)|0;c[w>>2]=2;c[w+4>>2]=g;h[14304+(f*24&-1)>>3]=E;h[14312+(f*24&-1)>>3]=0.0;i=b;return}function kD(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0.0,q=0,r=0.0,s=0.0,t=0.0,u=0;b=i;i=i+24|0;d=b|0;e=b+8|0;f=b+16|0;g=c[6354]|0;if((g|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=g-1|0;c[6354]=j;k=c[14296+(g*24&-1)>>2]|0;l=14304+(g*24&-1)|0;m=+h[l>>3];g=c[l>>2]|0;h[f>>3]=m;l=g;g=l;do{if((k|0)==3){n=+uz(g,e);o=(g|0)==(c[e>>2]|0);uu(g);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[f>>3]=n;p=n;q=c[6354]|0;break}}else{if((k|0)==2){p=m;q=j;break}else if((k|0)==1){p=+(l|0);q=j;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((q|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=q-1;j=14296+(q*24&-1)|0;l=c[j>>2]|0;k=c[j+4>>2]|0;j=14304+(q*24&-1)|0;m=+h[j>>3];g=c[j>>2]|0;h[f>>3]=m;n=+h[14312+(q*24&-1)>>3];q=g;g=q;do{if((l|0)==3){r=+uz(g,d);j=(g|0)==(c[d>>2]|0);uu(g);if(j){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[f>>3]=r;s=r;t=0.0;break}}else{if((l|0)==2){s=m;t=n;break}else if((l|0)==1){s=+(q|0);t=n;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if(p==0.0&s==0.0){a[1960]=1;c[f>>2]=0;q=c[6354]|0;if((q|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{l=q+1|0;c[6354]=l;q=14296+(l*24&-1)|0;c[q>>2]=1;c[q+4>>2]=k;h[14304+(l*24&-1)>>3]=+h[f>>3];h[14312+(l*24&-1)>>3]=t;u=l;break}}else{u=c[6354]|0}}while(0);t=+Y(+s,+p);p=t/+h[9040];h[f>>3]=p;if((u|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{f=u+1|0;c[6354]=f;u=14296+(f*24&-1)|0;c[u>>2]=2;c[u+4>>2]=k;h[14304+(f*24&-1)>>3]=p;h[14312+(f*24&-1)>>3]=0.0;i=b;return}}function kE(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=c[e>>2]|0;e=k;do{if((f|0)==3){l=+uz(e,b);m=(e|0)==(c[b>>2]|0);uu(e);if(!m){n=0.0;o=l;p=9311;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{l=+h[14312+(d*24&-1)>>3];if((f|0)==1){q=+(k|0);r=+bz(+q);s=0.0;t=r;u=+a4(+q);break}else if((f|0)==2){n=l;o=j;p=9311;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((p|0)==9311){j=+bz(+o);l=j*+S(+n);s=n;t=l;u=+a4(+o)}p=c[6354]|0;if((p|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{o=u*+T(+s);f=p+1|0;c[6354]=f;p=14296+(f*24&-1)|0;c[p>>2]=2;c[p+4>>2]=g;h[14304+(f*24&-1)>>3]=t;h[14312+(f*24&-1)>>3]=o;i=a;return}}function kF(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=c[e>>2]|0;e=k;do{if((f|0)==3){l=+uz(e,b);m=(e|0)==(c[b>>2]|0);uu(e);if(!m){n=0.0;o=l;p=9323;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{l=+h[14312+(d*24&-1)>>3];if((f|0)==1){q=+(k|0);r=+a4(+q);s=0.0;t=r;u=+bz(+q);break}else if((f|0)==2){n=l;o=j;p=9323;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((p|0)==9323){j=+a4(+o);l=j*+S(+n);s=n;t=l;u=+bz(+o)}p=c[6354]|0;if((p|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{o=u*+T(+s);f=p+1|0;c[6354]=f;p=14296+(f*24&-1)|0;c[p>>2]=2;c[p+4>>2]=g;h[14304+(f*24&-1)>>3]=t;h[14312+(f*24&-1)>>3]=o;i=a;return}}function kG(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=c[e>>2]|0;e=k;do{if((f|0)==3){l=+uz(e,b);m=(e|0)==(c[b>>2]|0);uu(e);if(!m){n=0.0;o=l;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==2){n=+h[14312+(d*24&-1)>>3];o=j;break}else if((f|0)==1){n=0.0;o=+(k|0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);j=o*2.0;o=n*2.0;if(+P(+j)>706.893623549172){k=c[6354]|0;if((k|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=k+1|0;c[6354]=f;k=14296+(f*24&-1)|0;c[k>>2]=2;c[k+4>>2]=g;h[14304+(f*24&-1)>>3]=j<0.0?-1.0:1.0;h[14312+(f*24&-1)>>3]=0.0;i=a;return}else{n=+a4(+j);l=n+ +S(+o);n=+bz(+j);f=c[6354]|0;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}j=+T(+o)/l;k=f+1|0;c[6354]=k;f=14296+(k*24&-1)|0;c[f>>2]=2;c[f+4>>2]=g;h[14304+(k*24&-1)>>3]=n/l;h[14312+(k*24&-1)>>3]=j;i=a;return}}function kH(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0,m=0.0,n=0,o=0.0,p=0.0,q=0,r=0.0,s=0.0,t=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;k=+h[f>>3];l=c[f>>2]|0;f=l;do{if((g|0)==3){m=+uz(f,d);n=(f|0)==(c[d>>2]|0);uu(f);if(!n){o=0.0;p=m;q=9353;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((g|0)==2){o=+h[14312+(e*24&-1)>>3];p=k;q=9353;break}else if((g|0)==1){r=+(l|0);s=0.0;t=-0.0;break}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((q|0)==9353){r=p;s=o;t=-0.0-o}if(r==0.0){q=+P(+t)>1.0;l=c[6354]|0;g=(l|0)==249;if(q){if(g){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}q=l+1|0;c[6354]=q;e=14296+(q*24&-1)|0;c[e>>2]=2;c[e+4>>2]=j;uE(14304+(q*24&-1)|0,0,16);a[1960]=1;i=b;return}else{if(g){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=+h[9040];p=(-0.0- +W(+t))/o;g=l+1|0;c[6354]=g;l=14296+(g*24&-1)|0;c[l>>2]=2;c[l+4>>2]=j;h[14304+(g*24&-1)>>3]=0.0;h[14312+(g*24&-1)>>3]=p;i=b;return}}else{if(s==-0.0){g=c[6354]|0;if((g|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=r+ +Q(+(r*r+1.0));o=+h[9040];t=+_(+p)/o;l=g+1|0;c[6354]=l;g=14296+(l*24&-1)|0;c[g>>2]=2;c[g+4>>2]=j;h[14304+(l*24&-1)>>3]=t;h[14312+(l*24&-1)>>3]=0.0;i=b;return}else{t=1.0-s;o=r*r;p=+Q(+(t*t+o))*.5;t=-1.0-s;s=+Q(+(t*t+o))*.5;o=p+s;t=+h[9040];l=c[6354]|0;if((l|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=(r>=0.0?1.0:-1.0)*+_(+(+Q(+(o*o+-1.0))+o))/t;o=(-0.0- +W(+(p-s)))/t;g=l+1|0;c[6354]=g;l=14296+(g*24&-1)|0;c[l>>2]=2;c[l+4>>2]=j;h[14304+(g*24&-1)>>3]=k;h[14312+(g*24&-1)>>3]=o;i=b;return}}}function kI(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0.0,p=0,q=0,r=0.0,s=0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=14296+(d*24&-1)|0;g=f|0;j=c[g>>2]|0;k=f+4|0;f=c[k>>2]|0;l=14304+(d*24&-1)|0;m=+h[l>>3];n=14312+(d*24&-1)|0;o=+h[n>>3];p=c[l>>2]|0;q=p;do{if((j|0)==3){r=+uz(q,b);s=(q|0)==(c[b>>2]|0);uu(q);if(!s){t=r;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((j|0)==2){if(o==0.0){t=m;break}r=m+1.0;u=o*o;w=+Q(+(u+r*r))*.5;r=m+-1.0;x=+Q(+(u+r*r))*.5;r=w+x;u=+h[9040];if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}y=+_(+(+Q(+(r*r+-1.0))+r))/u;r=(o<0.0?-1.0:1.0)*+V(+(w-x))/u;c[6354]=d;c[g>>2]=2;c[k>>2]=f;h[l>>3]=y;h[n>>3]=r;i=a;return}else if((j|0)==1){t=+(p|0);break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);p=+P(+t)>1.0;j=c[6354]|0;n=(j|0)==249;if(p){if(n){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=t+ +Q(+(t*t+-1.0));m=+h[9040];r=+_(+o)/m;p=j+1|0;c[6354]=p;l=14296+(p*24&-1)|0;c[l>>2]=2;c[l+4>>2]=f;h[14304+(p*24&-1)>>3]=r;h[14312+(p*24&-1)>>3]=0.0;i=a;return}else{if(n){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}r=+h[9040];m=+V(+t)/r;n=j+1|0;c[6354]=n;j=14296+(n*24&-1)|0;c[j>>2]=2;c[j+4>>2]=f;h[14304+(n*24&-1)>>3]=0.0;h[14312+(n*24&-1)>>3]=m;i=a;return}}function kJ(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0,m=0.0,n=0,o=0.0,p=0.0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0,z=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;k=+h[f>>3];l=c[f>>2]|0;f=l;do{if((g|0)==3){m=+uz(f,d);n=(f|0)==(c[d>>2]|0);uu(f);if(!n){o=0.0;p=m;q=9405;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((g|0)==2){o=+h[14312+(e*24&-1)>>3];p=k;q=9405;break}else if((g|0)==1){r=+(l|0);s=0.0;t=-0.0;break}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if((q|0)==9405){r=p;s=o;t=-0.0-o}if(r==0.0){q=c[6354]|0;if((q|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=+h[9040];p=(-0.0- +X(+t))/o;l=q+1|0;c[6354]=l;q=14296+(l*24&-1)|0;c[q>>2]=2;c[q+4>>2]=j;h[14304+(l*24&-1)>>3]=0.0;h[14312+(l*24&-1)>>3]=p;i=b;return}do{if(s==-0.0){if(+P(+r)<1.0){break}a[1960]=1;l=c[6354]|0;if((l|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}q=l+1|0;c[6354]=q;l=14296+(q*24&-1)|0;c[l>>2]=2;c[l+4>>2]=j;uE(14304+(q*24&-1)|0,0,16);i=b;return}}while(0);if(s>-0.0){u=-0.0-r;w=s}else{u=r;w=t}t=w*w;r=+X(+(w*2.0/(1.0-t-u*u)));w=u+1.0;p=u+-1.0;u=+_(+((t+w*w)/(t+p*p)))*.25;if(r<0.0){x=r+3.141592653589793}else{x=r}if(s>-0.0){y=-0.0-x;z=-0.0-u}else{y=x;z=u}q=c[6354]|0;if((q|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}u=y*-.5/+h[9040];l=q+1|0;c[6354]=l;q=14296+(l*24&-1)|0;c[q>>2]=2;c[q+4>>2]=j;h[14304+(l*24&-1)>>3]=z;h[14312+(l*24&-1)>>3]=u;i=b;return}function kK(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0,r=0.0,s=0,t=0.0,u=0.0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;l=+h[f>>3];m=+h[14312+(e*24&-1)>>3];e=c[f>>2]|0;f=e;do{if((g|0)==3){n=+uz(f,d);o=(f|0)==(c[d>>2]|0);uu(f);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=n;p=0.0;q=c[k>>2]|0;r=n;s=9435;break}}else{if((g|0)==2){p=m;q=e;r=l;s=9435;break}else if((g|0)==1){t=0.0;u=m;w=1;x=e;y=l;break}uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if((s|0)==9435){t=p;u=p;w=2;x=q;y=r}r=+P(+t);if(r>+h[11]){uf(-1,136968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((w|0)==1){z=+(x|0)}else if((w|0)==2){z=y}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}r=(1.0-z)*(z+1.0);if(r>0.0){A=1.0;B=r;C=0.0}else{x=c[6354]|0;if((x|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}q=x+1|0;c[6354]=q;x=14296+(q*24&-1)|0;c[x>>2]=w;c[x+4>>2]=j;h[14304+(q*24&-1)>>3]=y;h[14312+(q*24&-1)>>3]=u;a[1960]=1;i=b;return}while(1){u=+Q(+C);y=+Q(+B);r=+Q(+A);z=y*r+u*(y+r);r=(C+z)*.25;y=(B+z)*.25;u=(A+z)*.25;D=(u+(r+y))*.3333333333333333;E=(D-r)/D;F=(D-y)/D;G=(D-u)/D;if(+P(+E)>.0025){A=u;B=y;C=r;continue}if(+P(+F)>.0025){A=u;B=y;C=r;continue}if(+P(+G)>.0025){A=u;B=y;C=r}else{break}}C=E*F;F=C-G*G;E=C*G;q=c[6354]|0;if((q|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}G=(E*.07142857142857142+(F*(F*.041666666666666664+-.1-E*.06818181818181818)+1.0))/+Q(+D);x=q+1|0;c[6354]=x;q=14296+(x*24&-1)|0;c[q>>2]=2;c[q+4>>2]=j;h[14304+(x*24&-1)>>3]=G;h[14312+(x*24&-1)>>3]=0.0;i=b;return}function kL(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0,r=0.0,s=0,t=0.0,u=0.0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;l=+h[f>>3];m=+h[14312+(e*24&-1)>>3];e=c[f>>2]|0;f=e;do{if((g|0)==3){n=+uz(f,d);o=(f|0)==(c[d>>2]|0);uu(f);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=n;p=0.0;q=c[k>>2]|0;r=n;s=9462;break}}else{if((g|0)==1){t=0.0;u=m;w=1;x=e;y=l;break}else if((g|0)==2){p=m;q=e;r=l;s=9462;break}uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);if((s|0)==9462){t=p;u=p;w=2;x=q;y=r}r=+P(+t);if(r>+h[11]){uf(-1,136968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((w|0)==1){z=+(x|0)}else if((w|0)==2){z=y}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}r=(1.0-z)*(z+1.0);if(r>0.0){A=1.0;B=r;C=0.0}else{if(r<0.0){a[1960]=1;x=c[6354]|0;if((x|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}q=x+1|0;c[6354]=q;x=14296+(q*24&-1)|0;c[x>>2]=w;c[x+4>>2]=j;h[14304+(q*24&-1)>>3]=y;h[14312+(q*24&-1)>>3]=u;i=b;return}else{q=c[6354]|0;if((q|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}x=q+1|0;c[6354]=x;q=14296+(x*24&-1)|0;c[q>>2]=2;c[q+4>>2]=j;h[14304+(x*24&-1)>>3]=1.0;h[14312+(x*24&-1)>>3]=0.0;i=b;return}}while(1){u=+Q(+C);y=+Q(+B);t=+Q(+A);p=y*t+u*(y+t);t=(C+p)*.25;y=(B+p)*.25;u=(A+p)*.25;D=(u+(t+y))*.3333333333333333;E=(D-t)/D;F=(D-y)/D;G=(D-u)/D;if(+P(+E)>.0025){A=u;B=y;C=t;continue}if(+P(+F)>.0025){A=u;B=y;C=t;continue}if(+P(+G)>.0025){A=u;B=y;C=t}else{break}}C=E*F;F=C-G*G;E=C*G;G=(E*.07142857142857142+(F*(F*.041666666666666664+-.1-E*.06818181818181818)+1.0))/+Q(+D);D=1.0;E=1.0;F=r;r=0.0;C=0.0;while(1){B=+Q(+r);A=+Q(+F);t=+Q(+E);y=A*t+B*(A+t);A=E+y;H=C+D/(t*A);I=D*.25;t=(r+y)*.25;B=(F+y)*.25;y=A*.25;J=(t+B+y*3.0)*.2;K=(J-t)/J;L=(J-B)/J;M=(J-y)/J;if(+P(+K)>.0015){D=I;E=y;F=B;r=t;C=H;continue}if(+P(+L)>.0015){D=I;E=y;F=B;r=t;C=H;continue}if(+P(+M)>.0015){D=I;E=y;F=B;r=t;C=H}else{break}}C=K*L;L=M*M;K=C-L;r=C-L*6.0;L=K+(K+r);x=c[6354]|0;if((x|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}F=G-z*z*(H*3.0+I*(M*(M*(C*M*.11538461538461539+K*-.4090909090909091)+L*.16666666666666666)+(r*(r*.10227272727272728+-.21428571428571427-M*.17307692307692307*L)+1.0))/(J*+Q(+J)))/3.0;q=x+1|0;c[6354]=q;x=14296+(q*24&-1)|0;c[x>>2]=2;c[x+4>>2]=j;h[14304+(q*24&-1)>>3]=F;h[14312+(q*24&-1)>>3]=0.0;i=b;return}function kM(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0.0,t=0,u=0,w=0.0,x=0,y=0,z=0.0,A=0,B=0.0,C=0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ab=0.0,ac=0.0,ad=0.0,ae=0.0,af=0.0,ag=0.0,ah=0.0,ai=0.0,aj=0.0,ak=0.0,al=0.0,am=0.0,an=0.0,ao=0.0,ap=0.0,aq=0.0,ar=0.0,as=0.0;b=i;i=i+16|0;d=b|0;e=b+8|0;f=c[6354]|0;if((f|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=f-1|0;c[6354]=g;j=14296+(f*24&-1)|0;l=c[j>>2]|0;m=c[j+4>>2]|0;j=14304+(f*24&-1)|0;n=+h[j>>3];o=+h[14312+(f*24&-1)>>3];f=c[j>>2]|0;j=f;do{if((l|0)==3){p=+uz(j,e);q=(j|0)==(c[e>>2]|0);uu(j);if(q){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=p;q=c[k>>2]|0;r=2;s=0.0;t=c[6354]|0;u=q;w=p;x=q;break}}else{r=l;s=o;t=g;u=f;w=n;x=j}}while(0);if((t|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=t-1;j=14296+(t*24&-1)|0;f=c[j>>2]|0;g=c[j+4>>2]|0;j=14304+(t*24&-1)|0;n=+h[j>>3];o=+h[14312+(t*24&-1)>>3];t=c[j>>2]|0;j=t;do{if((f|0)==3){p=+uz(j,d);l=(j|0)==(c[d>>2]|0);uu(j);if(l){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=p;l=c[k>>2]|0;y=2;z=0.0;A=l;B=p;C=l;break}}else{y=f;z=o;A=t;B=n;C=j}}while(0);if((r|0)==2){D=s}else if((r|0)==1){D=0.0}else if((r|0)==3){uh(-1,212704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uf(-1,212032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}n=+P(+D);D=+h[11];if(n>D){uf(-1,136968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((y|0)==1){E=0.0}else if((y|0)==3){uh(-1,212704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uf(-1,212032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((y|0)==2){E=z}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(+P(+E)>D){uf(-1,136968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((r|0)==1){F=+(u|0)}else if((r|0)==2){F=w}else if((r|0)==3){F=+uz(x,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((y|0)==3){G=+uz(C,0)}else if((y|0)==2){G=B}else if((y|0)==1){G=+(A|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}B=(1.0-F)*(F+1.0);if(B>0.0&G<1.0){H=1.0;I=B;J=0.0}else{a[1960]=1;A=c[6354]|0;if((A|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}y=A+1|0;c[6354]=y;A=14296+(y*24&-1)|0;c[A>>2]=r;c[A+4>>2]=m;h[14304+(y*24&-1)>>3]=w;h[14312+(y*24&-1)>>3]=s;h[k>>3]=w;y=c[k>>2]|0;if((r|0)!=3|(y|0)==0){i=b;return}r=bP(y|0)|0;c[14304+((c[6354]|0)*24&-1)>>2]=r;i=b;return}while(1){w=+Q(+J);s=+Q(+I);F=+Q(+H);D=s*F+w*(s+F);F=(J+D)*.25;s=(I+D)*.25;w=(H+D)*.25;K=(w+(F+s))*.3333333333333333;L=(K-F)/K;M=(K-s)/K;N=(K-w)/K;if(+P(+L)>.0025){H=w;I=s;J=F;continue}if(+P(+M)>.0025){H=w;I=s;J=F;continue}if(+P(+N)>.0025){H=w;I=s;J=F}else{break}}J=L*M;M=J-N*N;L=J*N;N=(L*.07142857142857142+(M*(M*.041666666666666664+-.1-L*.06818181818181818)+1.0))/+Q(+K);K=1.0-G;if(K>0.0){O=1.0;R=B;S=0.0;T=0.0;U=K;V=0.0}else{L=B<0.0?0.0:B;M=L>1.0?L:1.0;L=B+0.0+1.0-M;B=1.0/(L-K);J=L*(M-L)*B;I=L+J;H=M*0.0/L;F=K*I/L;if(F>0.0){W=1.0;X=F;Y=H}else{s=H-F;w=+Q(+H);W=w/+Q(+s);X=-0.0-F;Y=s}s=X;X=Y;do{Y=+Q(+X)*2.0;F=s+Y*+Q(+s);X=(X+F)*.25;s=(s+F)*.25;Z=(s+(X+s))*.3333333333333333;_=(s-Z)/Z;}while(+P(+_)>.0012);O=M;R=L;S=B;T=J;U=I;V=W*(_*_*(_*(_*(_*.4090909090909091+.375)+.14285714285714285)+.3)+1.0)/+Q(+Z)}Z=O;O=R;R=0.0;_=0.0;W=1.0;I=U;while(1){U=+Q(+R);J=+Q(+O);B=+Q(+Z);L=J*B+U*(J+B);M=U*J*B+I*(U+J+B);B=M*M;M=I+L;J=I*M*M;if(J>0.0){$=1.0;aa=J;ab=B}else{U=B-J;s=+Q(+B);$=s/+Q(+U);aa=-0.0-J;ab=U}U=aa;J=ab;do{s=+Q(+J)*2.0;B=U+s*+Q(+U);J=(J+B)*.25;U=(U+B)*.25;ac=(U+(J+U))*.3333333333333333;ad=(U-ac)/ac;}while(+P(+ad)>.0012);ae=_+W*($*(ad*ad*(ad*(ad*(ad*.4090909090909091+.375)+.14285714285714285)+.3)+1.0)/+Q(+ac));af=W*.25;ag=(R+L)*.25;ah=(O+L)*.25;ai=(Z+L)*.25;U=M*.25;aj=(U+(U+(ai+(ag+ah))))*.2;ak=(aj-ag)/aj;al=(aj-ah)/aj;am=(aj-ai)/aj;an=(aj-U)/aj;if(+P(+ak)>.0015){Z=ai;O=ah;R=ag;_=ae;W=af;I=U;continue}if(+P(+al)>.0015){Z=ai;O=ah;R=ag;_=ae;W=af;I=U;continue}if(+P(+am)>.0015){Z=ai;O=ah;R=ag;_=ae;W=af;I=U;continue}if(+P(+an)>.0015){Z=ai;O=ah;R=ag;_=ae;W=af;I=U}else{break}}I=al*am+ak*(al+am);W=ak*al*am;am=an*an;al=I-am*3.0;ak=ae*3.0+af*((.3333333333333333-an*.13636363636363635)*an*I+(W*(an*(an*.11538461538461539+-.2727272727272727)+.16666666666666666)+(al*(al*.10227272727272727+-.21428571428571427-(W+an*2.0*(I-am))*.17307692307692307)+1.0))-an*.3333333333333333*am)/(aj*+Q(+aj));if(K>0.0){ao=ak}else{K=ai;ai=ah;ah=ag;while(1){ag=+Q(+ah);aj=+Q(+ai);am=+Q(+K);an=aj*am+ag*(aj+am);am=(ah+an)*.25;aj=(ai+an)*.25;ag=(K+an)*.25;ap=(ag+(am+aj))*.3333333333333333;aq=(ap-am)/ap;ar=(ap-aj)/ap;as=(ap-ag)/ap;if(+P(+aq)>.0025){K=ag;ai=aj;ah=am;continue}if(+P(+ar)>.0025){K=ag;ai=aj;ah=am;continue}if(+P(+as)>.0025){K=ag;ai=aj;ah=am}else{break}}ah=aq*ar;ar=ah-as*as;aq=ah*as;ao=S*(T*ak+(V-(aq*.07142857142857142+(ar*(ar*.041666666666666664+-.1-aq*.06818181818181818)+1.0))/+Q(+ap))*3.0)}r=c[6354]|0;if((r|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}y=r+1|0;c[6354]=y;r=14296+(y*24&-1)|0;c[r>>2]=2;c[r+4>>2]=g;h[14304+(y*24&-1)>>3]=N+G*ao/3.0;h[14312+(y*24&-1)>>3]=0.0;i=b;return}function kN(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0;a=i;i=i+16|0;b=a|0;d=a+8|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=14296+(e*24&-1)|0;j=c[g>>2]|0;k=c[g+4>>2]|0;g=14304+(e*24&-1)|0;l=+h[g>>3];m=c[g>>2]|0;h[d>>3]=l;n=+h[14312+(e*24&-1)>>3];e=m;m=e;do{if((j|0)==3){o=+uz(m,b);g=(m|0)==(c[b>>2]|0);uu(m);if(g){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[d>>3]=o;p=o;q=0.0;r=c[6354]|0;break}}else{if((j|0)==2){p=l;q=n;r=f;break}else if((j|0)==1){p=+(e|0);q=n;r=f;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);c[d>>2]=~~p;if((r|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{f=r+1|0;c[6354]=f;r=14296+(f*24&-1)|0;c[r>>2]=1;c[r+4>>2]=k;h[14304+(f*24&-1)>>3]=+h[d>>3];h[14312+(f*24&-1)>>3]=q;i=a;return}}function kO(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0.0,r=0,s=0.0,t=0,u=0.0,w=0.0,x=0.0;a=i;i=i+16|0;b=a|0;d=a+8|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=14296+(e*24&-1)|0;j=g|0;k=c[j>>2]|0;l=g+4|0;g=c[l>>2]|0;m=14304+(e*24&-1)|0;n=+h[m>>3];o=c[m>>2]|0;h[d>>3]=n;p=14312+(e*24&-1)|0;q=+h[p>>3];r=o;o=r;do{if((k|0)==3){s=+uz(o,b);t=(o|0)==(c[b>>2]|0);uu(o);if(t){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[d>>3]=s;u=0.0;w=s;break}}else{if((k|0)==2){u=q;w=n;break}else if((k|0)!=1){uf(-1,205760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[d>>2]=(r|0)>-1?r:-r|0;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e;c[j>>2]=1;c[l>>2]=g;h[m>>3]=+h[d>>3];h[p>>3]=q;i=a;return}}while(0);q=+P(+w);w=+P(+u);do{if(u==0.0){x=q}else{if(q>w){n=w/q;x=q*+Q(+(n*n+1.0));break}else{n=q/w;x=w*+Q(+(n*n+1.0));break}}}while(0);h[d>>3]=x;d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=d+1|0;c[6354]=p;d=14296+(p*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(p*24&-1)>>3]=x;h[14312+(p*24&-1)>>3]=0.0;i=a;return}function kP(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0.0,r=0,s=0.0,t=0,u=0.0,w=0.0,x=0;a=i;i=i+16|0;b=a|0;d=a+8|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=14296+(e*24&-1)|0;j=g|0;k=c[j>>2]|0;l=g+4|0;g=c[l>>2]|0;m=14304+(e*24&-1)|0;n=+h[m>>3];o=c[m>>2]|0;h[d>>3]=n;p=14312+(e*24&-1)|0;q=+h[p>>3];r=o;o=r;do{if((k|0)==3){s=+uz(o,b);t=(o|0)==(c[b>>2]|0);uu(o);if(t){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[d>>3]=s;u=0.0;w=s;break}}else{if((k|0)==2){u=q;w=n;break}else if((k|0)!=1){uf(-1,205760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[d>>2]=(r|0)>0?1:r>>31;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e;c[j>>2]=1;c[l>>2]=g;h[m>>3]=+h[d>>3];h[p>>3]=q;i=a;return}}while(0);if(w>0.0){x=1}else{x=(w<0.0)<<31>>31}c[d>>2]=x;x=c[6354]|0;if((x|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=x+1|0;c[6354]=p;x=14296+(p*24&-1)|0;c[x>>2]=1;c[x+4>>2]=g;h[14304+(p*24&-1)>>3]=+h[d>>3];h[14312+(p*24&-1)>>3]=u;i=a;return}function kQ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=c[e>>2]|0;e=k;do{if((f|0)==3){l=+uz(e,b);m=(e|0)==(c[b>>2]|0);uu(e);if(!m){n=0.0;o=l;p=9618;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==2){n=+h[14312+(d*24&-1)>>3];o=j;p=9618;break}else if((f|0)==1){q=+(k|0);r=+Q(+(+(((k|0)>-1?k:-k|0)|0)));break}else{uf(-1,211136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((p|0)==9618){j=+P(+o);l=+P(+n);k=n==0.0;if(k){q=o;r=+Q(+j);break}if(j>l){s=l/j;t=+Q(+(j*+Q(+(s*s+1.0))))}else{s=j/l;j=+Q(+(l*+Q(+(s*s+1.0))));if(k){q=o;r=j;break}else{t=j}}j=+Y(+n,+o)*.5;k=c[6354]|0;if((k|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}s=t*+S(+j);l=t*+T(+j);f=k+1|0;c[6354]=f;k=14296+(f*24&-1)|0;c[k>>2]=2;c[k+4>>2]=g;h[14304+(f*24&-1)>>3]=s;h[14312+(f*24&-1)>>3]=l;i=a;return}}while(0);p=c[6354]|0;f=(p|0)==249;if(q<0.0){if(f){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=p+1|0;c[6354]=k;d=14296+(k*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(k*24&-1)>>3]=0.0;h[14312+(k*24&-1)>>3]=r;i=a;return}else{if(f){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=p+1|0;c[6354]=f;p=14296+(f*24&-1)|0;c[p>>2]=2;c[p+4>>2]=g;h[14304+(f*24&-1)>>3]=r;h[14312+(f*24&-1)>>3]=0.0;i=a;return}}function kR(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0.0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0.0;a=i;i=i+8|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=+h[14312+(d*24&-1)>>3];d=c[e>>2]|0;e=d;do{if((f|0)==3){l=+uz(e,b);m=(e|0)==(c[b>>2]|0);uu(e);if(!m){n=l;o=0.0;p=2;break}uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{if((f|0)==1){n=+(d|0);o=k;p=1;break}else if((f|0)==2){n=j;o=k;p=2;break}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);if(n<-706.893623549172){q=0.0}else{q=+Z(+n)}if((p|0)==2){r=o}else if((p|0)==1){r=0.0}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=c[6354]|0;if((p|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{o=q*+S(+r);n=q*+T(+r);f=p+1|0;c[6354]=f;p=14296+(f*24&-1)|0;c[p>>2]=2;c[p+4>>2]=g;h[14304+(f*24&-1)>>3]=o;h[14312+(f*24&-1)>>3]=n;i=a;return}}function kS(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0,s=0,t=0.0,u=0.0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;l=+h[f>>3];m=+h[14312+(e*24&-1)>>3];e=c[f>>2]|0;f=e;do{if((g|0)==3){n=+uz(f,d);o=(f|0)==(c[d>>2]|0);uu(f);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=n;p=0.0;q=n;r=c[k>>2]|0;s=9662;break}}else{if((g|0)==1){t=+(((e|0)>-1?e:-e|0)|0);u=m;w=1;x=e;y=l;break}else if((g|0)==2){p=m;q=l;r=e;s=9662;break}else{uf(-1,211136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((s|0)==9662){l=+P(+q);m=+P(+p);if(p==0.0){t=l;u=p;w=2;x=r;y=q;break}if(l>m){n=m/l;t=l*+Q(+(n*n+1.0));u=p;w=2;x=r;y=q;break}else{n=l/m;t=m*+Q(+(n*n+1.0));u=p;w=2;x=r;y=q;break}}}while(0);if(t==0.0){a[1960]=1;r=c[6354]|0;if((r|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}s=r+1|0;c[6354]=s;r=14296+(s*24&-1)|0;c[r>>2]=w;c[r+4>>2]=j;h[14304+(s*24&-1)>>3]=y;h[14312+(s*24&-1)>>3]=u;i=b;return}L13201:do{if((w|0)==1){z=(x|0)>-1?0.0:3.141592653589793;A=+_(+(+(((x|0)>-1?x:-x|0)|0)))/2.302585092994046}else if((w|0)==2){t=+P(+y);q=+P(+u);s=u==0.0;do{if(s){B=+_(+t)/2.302585092994046}else{if(t>q){p=q/t;C=+_(+(t*+Q(+(p*p+1.0))))/2.302585092994046}else{p=t/q;n=+_(+(q*+Q(+(p*p+1.0))))/2.302585092994046;if(s){B=n;break}else{C=n}}z=+Y(+u,+y);A=C;break L13201}}while(0);z=y<0.0?3.141592653589793:0.0;A=B}else{uf(-1,211136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);w=c[6354]|0;if((w|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}x=w+1|0;c[6354]=x;w=14296+(x*24&-1)|0;c[w>>2]=2;c[w+4>>2]=j;h[14304+(x*24&-1)>>3]=A;h[14312+(x*24&-1)>>3]=z/2.302585092994046;i=b;return}function kT(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0,s=0,t=0.0,u=0.0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0;b=i;i=i+8|0;d=b|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e-1;f=14296+(e*24&-1)|0;g=c[f>>2]|0;j=c[f+4>>2]|0;f=14304+(e*24&-1)|0;l=+h[f>>3];m=+h[14312+(e*24&-1)>>3];e=c[f>>2]|0;f=e;do{if((g|0)==3){n=+uz(f,d);o=(f|0)==(c[d>>2]|0);uu(f);if(o){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[k>>3]=n;p=0.0;q=n;r=c[k>>2]|0;s=9695;break}}else{if((g|0)==2){p=m;q=l;r=e;s=9695;break}else if((g|0)==1){t=+(((e|0)>-1?e:-e|0)|0);u=m;w=1;x=e;y=l;break}else{uf(-1,211136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);do{if((s|0)==9695){l=+P(+q);m=+P(+p);if(p==0.0){t=l;u=p;w=2;x=r;y=q;break}if(l>m){n=m/l;t=l*+Q(+(n*n+1.0));u=p;w=2;x=r;y=q;break}else{n=l/m;t=m*+Q(+(n*n+1.0));u=p;w=2;x=r;y=q;break}}}while(0);if(t==0.0){a[1960]=1;r=c[6354]|0;if((r|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}s=r+1|0;c[6354]=s;r=14296+(s*24&-1)|0;c[r>>2]=w;c[r+4>>2]=j;h[14304+(s*24&-1)>>3]=y;h[14312+(s*24&-1)>>3]=u;i=b;return}L13245:do{if((w|0)==1){z=(x|0)>-1?0.0:3.141592653589793;A=+_(+(+(((x|0)>-1?x:-x|0)|0)))}else if((w|0)==2){t=+P(+y);q=+P(+u);s=u==0.0;do{if(s){B=+_(+t)}else{if(t>q){p=q/t;C=+_(+(t*+Q(+(p*p+1.0))))}else{p=t/q;n=+_(+(q*+Q(+(p*p+1.0))));if(s){B=n;break}else{C=n}}z=+Y(+u,+y);A=C;break L13245}}while(0);z=y<0.0?3.141592653589793:0.0;A=B}else{uf(-1,211136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);w=c[6354]|0;if((w|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}x=w+1|0;c[6354]=x;w=14296+(x*24&-1)|0;c[w>>2]=2;c[w+4>>2]=j;h[14304+(x*24&-1)>>3]=A;h[14312+(x*24&-1)>>3]=z;i=b;return}function kU(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0.0,r=0,s=0.0,t=0,u=0.0,w=0.0,x=0;a=i;i=i+16|0;b=a|0;d=a+8|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=14296+(e*24&-1)|0;j=g|0;k=c[j>>2]|0;l=g+4|0;g=c[l>>2]|0;m=14304+(e*24&-1)|0;n=+h[m>>3];o=c[m>>2]|0;h[d>>3]=n;p=14312+(e*24&-1)|0;q=+h[p>>3];r=o;o=r;do{if((k|0)==3){s=+uz(o,b);t=(o|0)==(c[b>>2]|0);uu(o);if(t){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[d>>3]=s;u=0.0;w=s;x=c[6354]|0;break}}else{if((k|0)==2){u=q;w=n;x=f;break}else if((k|0)!=1){uf(-1,205760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[d>>2]=~~+O(+(+(r|0)));if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e;c[j>>2]=1;c[l>>2]=g;h[m>>3]=+h[d>>3];h[p>>3]=q;i=a;return}}while(0);c[d>>2]=~~+O(+w);if((x|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=x+1|0;c[6354]=p;x=14296+(p*24&-1)|0;c[x>>2]=1;c[x+4>>2]=g;h[14304+(p*24&-1)>>3]=+h[d>>3];h[14312+(p*24&-1)>>3]=u;i=a;return}function kV(a){a=+a;var b=0.0,c=0.0,d=0.0,e=0.0,f=0.0;if(a>0.0){b=a}else{b=-0.0-a}if(b<8.0){a=b*b;c=(a*(a*(a*(a*(a*(a*(a*(a*26857.86856980015-40504123.71833133)+25071582855.36882)-8085222034853.794)+DOT$ZERO(0x51889c8a118fa))+-136762035308817140.0)+6382059341072356000.0)+-117915762910761060000.0)+49337872517941336.0e4)/(a*(a*(a*(a*(a*(a*(a*(a+1363.0636523289706)+1114636.0984629854)+669998767.298224)+312304311494.12134)+112775673967979.84)+30246356167094628.0)+5428918384092285000.0)+49337872517941336.0e4);return+c}else{a=+Q(+(.6366197723675814/b));d=8.0/b;e=d*d;f=b+-.7853981633974483;b=(e*(e*(e*(e*(e*.8896154842421046+153.76201909008356)+3480.648644324927)+21170.523380864943)+41345.38663958076)+22779.090197304686)/(e*(e*(e*(e*(e+157.11159858080893)+3502.8735138235606)+21215.350561880117)+41370.41249551042)+22779.090197304686)*+S(+f);c=a*(b-d*((e*(e*(e*(e*(e*-.008803330304868075-1.244102674583564)-22.300261666214197)-111.83429920482737)-185.91953644342993)-89.22660020080009)/(e*(e*(e*(e*(e+90.59376959499312)+1488.7231232283757)+7264.278016921102)+11951.131543434614)+5710.502412851206))*+T(+f));return+c}return 0.0}function kW(a){a=+a;var b=0,c=0.0,d=0.0,e=0.0,f=0.0,g=0.0,h=0.0;b=a<0.0;if(b){c=-0.0-a}else{c=a}if(c<8.0){d=c*c;e=(d*(d*(d*(d*(d*(d*(d*(d*2701.1227108923235-4695753.530642996)+3413234182.3017006)-1322983480332.1265)+290879526383477.56)+-35888175699101060.0)+2316433580634002400.0)+-6672106568924916.0e4)+5811993540016061.0e5)/(d*(d*(d*(d*(d*(d*(d*(d+1606.9315734814877)+1501793.5949985855)+1013863514.358674)+524371026216.76495)+208166122130760.75)+60920613989175220.0)+11857707121903210000.0)+0x3f0385ca46d07a0000)*a;return+e}a=+Q(+(.6366197723675814/c));d=8.0/c;f=d*d;g=c-2.356194490192345;c=(f*(f*(f*(f*(f*1.2571716929145342+211.15291828539623)+4985.4832060594335)+31353.963110915956)+62758.84524716128)+35224.66491336798)/(f*(f*(f*(f*(f+203.07751891347593)+4930.396490181089)+31240.406381904104)+62694.34695935605)+35224.66491336798)*+S(+g);h=a*(c-d*((f*(f*(f*(f*(f*.03532840052740124+4.568171629551227)+83.18989576738508)+425.98730116544425)+721.0391804904475)+351.17519143035526)/(f*(f*(f*(f*(f+103.81875854621337)+1811.1867005523513)+9152.231701516992)+15414.177339265098)+7491.737417180912))*+T(+g));if(!b){e=h;return+e}e=-0.0-h;return+e}function kX(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0.0,r=0,s=0.0,t=0,u=0.0,w=0.0,x=0;a=i;i=i+16|0;b=a|0;d=a+8|0;e=c[6354]|0;if((e|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e-1|0;c[6354]=f;g=14296+(e*24&-1)|0;j=g|0;k=c[j>>2]|0;l=g+4|0;g=c[l>>2]|0;m=14304+(e*24&-1)|0;n=+h[m>>3];o=c[m>>2]|0;h[d>>3]=n;p=14312+(e*24&-1)|0;q=+h[p>>3];r=o;o=r;do{if((k|0)==3){s=+uz(o,b);t=(o|0)==(c[b>>2]|0);uu(o);if(t){uf(-1,208864,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{h[d>>3]=s;u=0.0;w=s;x=c[6354]|0;break}}else{if((k|0)==2){u=q;w=n;x=f;break}else if((k|0)!=1){uf(-1,205760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[d>>2]=~~+$(+(+(r|0)));if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=e;c[j>>2]=1;c[l>>2]=g;h[m>>3]=+h[d>>3];h[p>>3]=q;i=a;return}}while(0);c[d>>2]=~~+$(+w);if((x|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}p=x+1|0;c[6354]=p;x=14296+(p*24&-1)|0;c[x>>2]=1;c[x+4>>2]=g;h[14304+(p*24&-1)>>3]=+h[d>>3];h[14312+(p*24&-1)>>3]=u;i=a;return}function kY(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=i;i=i+16|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=d-1|0;c[6354]=e;f=14296+(d*24&-1)|0;g=f;h=f|0;f=c[h>>2]|0;j=g+4|0;k=c[j>>2]|0;l=14304+(d*24&-1)|0;m=c[l>>2]|0;n=g+12|0;g=b|0;c[g>>2]=c[n>>2];c[g+4>>2]=c[n+4>>2];c[g+8>>2]=c[n+8>>2];if((f|0)==3){f=m;m=e6(f)|0;uu(f);f=c[6354]|0;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=(a[m+8|0]&1^1)&255;m=f+1|0;c[6354]=m;f=14296+(m*24&-1)|0;p=f;c[f>>2]=1;c[p+4>>2]=k;c[14304+(m*24&-1)>>2]=o;o=p+12|0;c[o>>2]=c[g>>2];c[o+4>>2]=c[g+4>>2];c[o+8>>2]=c[g+8>>2];i=b;return}else{if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d;c[h>>2]=1;c[j>>2]=k;c[l>>2]=0;c[n>>2]=c[g>>2];c[n+4>>2]=c[g+4>>2];c[n+8>>2]=c[g+8>>2];i=b;return}}function kZ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0;a=i;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=14296+(b*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(b*24&-1)|0;j=+h[e>>3];k=c[e>>2]|0;e=k;if((f|0)==2){l=+h[14312+(b*24&-1)>>3]}else if((f|0)==3){uh(-1,212704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uf(-1,212032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((f|0)==1){l=0.0}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=+P(+l);if(m>+h[11]){uf(-1,151424,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((f|0)==1){n=+(k|0);o=d}else if((f|0)==2){n=j;o=d}else if((f|0)==3){j=+uz(e,0);n=j;o=c[6354]|0}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((o|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{j=+kV(n);e=o+1|0;c[6354]=e;o=14296+(e*24&-1)|0;c[o>>2]=2;c[o+4>>2]=g;h[14304+(e*24&-1)>>3]=j;h[14312+(e*24&-1)>>3]=0.0;i=a;return}}function k_(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0;a=i;b=c[6354]|0;if((b|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=b-1|0;c[6354]=d;e=14296+(b*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(b*24&-1)|0;j=+h[e>>3];k=c[e>>2]|0;e=k;if((f|0)==1){l=0.0}else if((f|0)==3){uh(-1,212704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uf(-1,212032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((f|0)==2){l=+h[14312+(b*24&-1)>>3]}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=+P(+l);if(m>+h[11]){uf(-1,151424,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((f|0)==3){m=+uz(e,0);n=m;o=c[6354]|0}else if((f|0)==1){n=+(k|0);o=d}else if((f|0)==2){n=j;o=d}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((o|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{j=+kW(n);d=o+1|0;c[6354]=d;o=14296+(d*24&-1)|0;c[o>>2]=2;c[o+4>>2]=g;h[14304+(d*24&-1)>>3]=j;h[14312+(d*24&-1)>>3]=0.0;i=a;return}}function k$(b){b=b|0;var d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0,q=0.0,r=0.0,s=0.0;b=i;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=c[e>>2]|0;e=k;if((f|0)==2){l=+h[14312+(d*24&-1)>>3]}else if((f|0)==3){uh(-1,212704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uf(-1,212032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((f|0)==1){l=0.0}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=+P(+l);if(m>+h[11]){uf(-1,151424,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((f|0)==1){n=+(k|0)}else if((f|0)==2){n=j}else if((f|0)==3){n=+uz(e,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(n<=0.0){d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=d+1|0;c[6354]=o;d=14296+(o*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;uE(14304+(o*24&-1)|0,0,16);a[1960]=1;i=b;return}if((f|0)==2){q=j}else if((f|0)==1){q=+(k|0)}else if((f|0)==3){q=+uz(e,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if(q<0.0){r=p}else{if(q<8.0){j=q*q;n=+kV(q)*.6366197723675814;r=(j*(j*(j*(j*(j*(j*(j*(j*-41370.35497933149+59152134.6568689)-34363712229.790405)+10255208596863.943)-1648605817185729.5)+137562431639934400.0)+-5247065581112765000.0)+6587473275719555.0e4)+-27502866786291098000.0)/(j*(j*(j*(j*(j*(j*(j*(j+1282.452772478994)+1001702.6412889062)+579512264.070073)+261306575504.10812)+91620380340751.86)+DOT$ZERO(0x550324fdf7f63c))+419241704341084.0e4)+3726458838986166.0e5)+n*+_(+q);break}else{n=+Q(+(.6366197723675814/q));j=8.0/q;m=j*j;l=q+-.7853981633974483;s=(m*(m*(m*(m*(m*.8896154842421046+153.76201909008356)+3480.648644324927)+21170.523380864943)+41345.38663958076)+22779.090197304686)/(m*(m*(m*(m*(m+157.11159858080893)+3502.8735138235606)+21215.350561880117)+41370.41249551042)+22779.090197304686)*+T(+l);r=n*(s+j*((m*(m*(m*(m*(m*-.008803330304868075-1.244102674583564)-22.300261666214197)-111.83429920482737)-185.91953644342993)-89.22660020080009)/(m*(m*(m*(m*(m+90.59376959499312)+1488.7231232283757)+7264.278016921102)+11951.131543434614)+5710.502412851206))*+S(+l));break}}}while(0);e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e+1|0;c[6354]=f;e=14296+(f*24&-1)|0;c[e>>2]=2;c[e+4>>2]=g;h[14304+(f*24&-1)>>3]=r;h[14312+(f*24&-1)>>3]=0.0;i=b;return}function k0(b){b=b|0;var d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0,q=0.0,r=0.0,s=0.0;b=i;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];k=c[e>>2]|0;e=k;if((f|0)==3){uh(-1,212704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uf(-1,212032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((f|0)==1){l=0.0}else if((f|0)==2){l=+h[14312+(d*24&-1)>>3]}else{uf(-1,211552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=+P(+l);if(m>+h[11]){uf(-1,151424,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((f|0)==2){n=j}else if((f|0)==3){n=+uz(e,0)}else if((f|0)==1){n=+(k|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(n<=0.0){d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=d+1|0;c[6354]=o;d=14296+(o*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;uE(14304+(o*24&-1)|0,0,16);a[1960]=1;i=b;return}if((f|0)==1){q=+(k|0)}else if((f|0)==2){q=j}else if((f|0)==3){q=+uz(e,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if(q>0.0){if(q<8.0){j=q*q;n=+kW(q);r=q*((j*(j*(j*(j*(j*(j*(j*(j*0.0+355692.4009830526)-428947196.88552487)+204969667374.56622)-48633169425671.75)+5915160760490071.0)+-344104806308411460.0)+774852068218684.0e4)+-29238219615329624000.0)/(j*(j*(j*(j*(j*(j*(j*(j+1072.6961437789255)+726914.7307198885)+371666079.86219305)+150022169915.6709)+47551735888881.375)+DOT$ZERO(0x2834334232332e))+1818662841706135000.0)+149131151130292030000.0))+(n*+_(+q)-1.0/q)*.6366197723675814;break}else{n=+Q(+(.6366197723675814/q));j=8.0/q;m=j*j;l=q-2.356194490192345;s=(m*(m*(m*(m*(m*1.2571716929145342+211.15291828539623)+4985.4832060594335)+31353.963110915956)+62758.84524716128)+35224.66491336798)/(m*(m*(m*(m*(m+203.07751891347593)+4930.396490181089)+31240.406381904104)+62694.34695935605)+35224.66491336798)*+T(+l);r=n*(s+j*((m*(m*(m*(m*(m*.03532840052740124+4.568171629551227)+83.18989576738508)+425.98730116544425)+721.0391804904475)+351.17519143035526)/(m*(m*(m*(m*(m+103.81875854621337)+1811.1867005523513)+9152.231701516992)+15414.177339265098)+7491.737417180912))*+S(+l));break}}else{r=p}}while(0);e=c[6354]|0;if((e|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=e+1|0;c[6354]=f;e=14296+(f*24&-1)|0;c[e>>2]=2;c[e+4>>2]=g;h[14304+(f*24&-1)>>3]=r;h[14312+(f*24&-1)>>3]=0.0;i=b;return}function k1(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0;a=i;i=i+48|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];d=c[e>>2]|0;if((f|0)==1){k=+(d|0)}else if((f|0)==3){k=+uz(d,0)}else if((f|0)==2){k=j}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t3(b,k);f=c[6354]|0;if((f|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{k=+(c[b>>2]|0);b=f+1|0;c[6354]=b;f=14296+(b*24&-1)|0;c[f>>2]=2;c[f+4>>2]=g;h[14304+(b*24&-1)>>3]=k;h[14312+(b*24&-1)>>3]=0.0;i=a;return}}function k2(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0;a=i;i=i+48|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;d=c[e>>2]|0;if((f|0)==2){j=+h[e>>3]}else if((f|0)==3){j=+uz(d,0)}else if((f|0)==1){j=+(d|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t3(b,j);d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{j=+(c[b+4>>2]|0);b=d+1|0;c[6354]=b;d=14296+(b*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(b*24&-1)>>3]=j;h[14312+(b*24&-1)>>3]=0.0;i=a;return}}function k3(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0;a=i;i=i+48|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;d=c[e>>2]|0;if((f|0)==2){j=+h[e>>3]}else if((f|0)==3){j=+uz(d,0)}else if((f|0)==1){j=+(d|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t3(b,j);d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{j=+(c[b+8>>2]|0);b=d+1|0;c[6354]=b;d=14296+(b*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(b*24&-1)>>3]=j;h[14312+(b*24&-1)>>3]=0.0;i=a;return}}function k4(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0;a=i;i=i+48|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;d=c[e>>2]|0;if((f|0)==2){j=+h[e>>3]}else if((f|0)==1){j=+(d|0)}else if((f|0)==3){j=+uz(d,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t3(b,j);d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{j=+(c[b+12>>2]|0);b=d+1|0;c[6354]=b;d=14296+(b*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(b*24&-1)>>3]=j;h[14312+(b*24&-1)>>3]=0.0;i=a;return}}function k5(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0;a=i;i=i+48|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;d=c[e>>2]|0;if((f|0)==2){j=+h[e>>3]}else if((f|0)==1){j=+(d|0)}else if((f|0)==3){j=+uz(d,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t3(b,j);d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{j=+(c[b+16>>2]|0);b=d+1|0;c[6354]=b;d=14296+(b*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(b*24&-1)>>3]=j;h[14312+(b*24&-1)>>3]=0.0;i=a;return}}function k6(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0.0;a=i;i=i+48|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;j=+h[e>>3];d=c[e>>2]|0;if((f|0)==1){k=+(d|0)}else if((f|0)==2){k=j}else if((f|0)==3){k=+uz(d,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t3(b,k);d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{k=+(c[b+20>>2]|0);b=d+1|0;c[6354]=b;d=14296+(b*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(b*24&-1)>>3]=k;h[14312+(b*24&-1)>>3]=0.0;i=a;return}}function k7(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0;a=i;i=i+48|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;d=c[e>>2]|0;if((f|0)==2){j=+h[e>>3]}else if((f|0)==1){j=+(d|0)}else if((f|0)==3){j=+uz(d,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t3(b,j);d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{j=+(c[b+24>>2]|0);b=d+1|0;c[6354]=b;d=14296+(b*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(b*24&-1)>>3]=j;h[14312+(b*24&-1)>>3]=0.0;i=a;return}}function k8(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0;a=i;i=i+48|0;b=a|0;d=c[6354]|0;if((d|0)<0){uf(-1,209224,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[6354]=d-1;e=14296+(d*24&-1)|0;f=c[e>>2]|0;g=c[e+4>>2]|0;e=14304+(d*24&-1)|0;d=c[e>>2]|0;if((f|0)==2){j=+h[e>>3]}else if((f|0)==1){j=+(d|0)}else if((f|0)==3){j=+uz(d,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}t3(b,j);d=c[6354]|0;if((d|0)==249){uf(-1,208304,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{j=+(c[b+28>>2]|0);b=d+1|0;c[6354]=b;d=14296+(b*24&-1)|0;c[d>>2]=2;c[d+4>>2]=g;h[14304+(b*24&-1)>>3]=j;h[14312+(b*24&-1)>>3]=0.0;i=a;return}}function k9(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0.0,am=0.0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aG=0,aH=0.0,aJ=0.0,aK=0.0,aL=0.0,aM=0.0,aN=0.0,aO=0,aP=0.0,aQ=0.0,aR=0.0,aS=0.0,aT=0.0,aU=0.0,aV=0.0,aW=0.0,aX=0,aZ=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0;b=i;i=i+720|0;d=b|0;e=b+112|0;f=b+144|0;j=b+176|0;k=b+208|0;l=b+320|0;o=b+432|0;p=b+456|0;q=b+480|0;r=b+496|0;s=b+608|0;c[13898]=(c[13898]|0)+1;c[16506]=c[16507];h[8255]=+h[8257];h[8256]=+h[8258];h[8261]=8.988465674311579e+307;h[8262]=-8.988465674311579e+307;c[16334]=c[16335];h[8169]=+h[8171];h[8170]=+h[8172];h[8175]=8.988465674311579e+307;h[8176]=-8.988465674311579e+307;dq(2);dq(1);uu(c[3562]|0);uu(c[3560]|0);t=ut(32768)|0;do{if((t|0)==0){gk();u=ut(32768)|0;if((u|0)!=0){x=u;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0)}else{x=t}}while(0);c[3562]=x;x=ut(32768)|0;do{if((x|0)==0){gk();t=ut(32768)|0;if((t|0)!=0){y=t;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215008,v)|0)}else{y=x}}while(0);c[3560]=y;if(!((c[3562]|0)!=0&(y|0)!=0)){uf(-1,135152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}uu(c[3558]|0);y=c[13898]|0;L13568:do{if((y|0)<(c[8272]|0)){x=c[1054]|0;L13570:do{if((a[x+(y*40&-1)|0]&1)!=0){t=c[x+(y*40&-1)+36>>2]|0;u=x+(y*40&-1)+32|0;z=c[10036]|0;A=0;while(1){if((A|0)>=(t|0)){break}if((a[z+((c[u>>2]|0)+A|0)|0]|0)==(a[A+103664|0]|0)){A=A+1|0}else{break L13570}}if((A|0)==1){break L13568}}}while(0);a[14176]=1;is(p);a[14176]=0;if((c[p>>2]|0)!=3){c[13898]=y;break}x=c[p+8>>2]|0;c[3558]=x;u=c[13898]|0;if((x|0)==0){B=u;uf(B,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}z=c[1054]|0;t=c[z+(u*40&-1)+36>>2]|0;L13583:do{if((a[z+(u*40&-1)|0]&1)!=0&(t|0)>0){C=c[10036]|0;D=0;E=0;F=c[z+(u*40&-1)+32>>2]|0;while(1){if((a[D+151232|0]|0)==(a[C+(D+F|0)|0]|0)){G=F;H=E}else{if((D|0)!=3){I=9981;break L13583}G=F-1|0;H=1}J=D+1|0;if((J|0)<(H+t|0)){D=J;E=H;F=G}else{break}}if((H|0)==0){if(!((D|0)==6|(D|0)==2)){I=9981;break}}ey(x,3,0);F=(c[11864]|0)-1|0;E=c[12172]|0;C=c[E+(F*232&-1)+144>>2]|0;A=aa(C,c[E+(F*232&-1)+140>>2]|0);J=c[E+(F*232&-1)+224>>2]|0;if((A|0)<1){c[3562]=0;uf(-1,133128,(v=i,i=i+8|0,c[v>>2]=A,v)|0)}F=A<<3;E=db(c[3562]|0,F,215008)|0;c[3562]=E;if((E|0)==0){uf(-1,133128,(v=i,i=i+8|0,c[v>>2]=A,v)|0)}E=db(c[3560]|0,F,215008)|0;F=E;c[3560]=F;if((E|0)==0){uf(-1,133128,(v=i,i=i+8|0,c[v>>2]=A,v)|0)}if((A|0)>0){E=0;do{h[F+(E<<3)>>3]=+g[J+(E<<2)>>2];E=E+1|0;}while((E|0)<(A|0))}ez();K=1;L=C;M=A;N=0;O=0;Q=0;R=0}else{I=9981}}while(0);if((I|0)==9981){t=ey(x,2,0)|0;if((t|0)<0){uf(-1,120240,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((t|0)>2){uf(c[13898]|0,104256,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}u=c[8270]|0;do{if((u|0)!=0){if((aY(u|0,139696)|0)==0){break}bA(4,u|0)}}while(0);if((a[66164]&1)!=0){uf(-1,91264,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[65476]&1)!=0){uf(-1,91264,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((c[16546]|0)==1|(c[16374]|0)==1){uf(-1,83576,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[30528]&1)!=0){uf(-1,75664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((a[32936]&1)!=0){uf(-1,223048,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}u=q|0;x=eC(u,2)|0;do{if((x|0)==-1){ez();S=2;T=0;U=0;V=0;W=0;X=0;I=10029}else{z=q+8|0;E=4096;J=0;F=0;D=0;Y=0;Z=0;_=2;$=x;L13639:while(1){ab=($|0)>(_|0)?$:_;if((Z|0)<(E|0)){ac=E}else{ad=E*3&-1;ae=(ad|0)/2&-1;if((ad|0)<2){I=10002;break}ad=ae<<3;af=db(c[3562]|0,ad,215008)|0;c[3562]=af;if((af|0)==0){I=10358;break}af=db(c[3560]|0,ad,215008)|0;c[3560]=af;if((af|0)==0){I=10356;break}else{ac=ae}}L13646:do{if(($|0)==(-5|0)|($|0)==(-2|0)){ag=Z;ah=Y;ai=D;aj=F;ak=J+1|0}else if(($|0)==(-3|0)){ag=Z;ah=Y;ai=D;aj=F+1|0;ak=J}else if(($|0)==(-4|0)){ag=Z;ah=Y;ai=D+1|0;aj=F+1|0;ak=J}else if(($|0)==0){I=10011;break L13639}else if(($|0)==1){al=+h[u>>3];af=c[16334]&3;if((af|0)==3){I=10016}else if((af|0)==1){if(+h[8170]al){I=10017}else{I=10016}}else if((af|0)==0){if(+h[8170]al){I=10017}else{I=10016}}else{I=10017}if((I|0)==10016){I=0;h[(c[3560]|0)+(Z<<3)>>3]=al;ag=Z+1|0;ah=Y;ai=D;aj=F;ak=J;break}else if((I|0)==10017){I=0;ag=Z;ah=Y+1|0;ai=D;aj=F;ak=J;break}}else if(($|0)==2){al=+h[u>>3];af=c[16506]&3;if((af|0)==0){if(!(+h[8256]al)){I=10022}}else if((af|0)==3){I=10022}else if((af|0)==1){if(+h[8256]>=al){I=10022}}else if((af|0)==2){if(+h[8255]<=al){I=10022}}do{if((I|0)==10022){I=0;am=+h[z>>3];af=c[16334]&3;if((af|0)==1){if(+h[8170]am){break}}else if((af|0)==0){if(+h[8170]am){break}}else if((af|0)!=3){break}h[(c[3562]|0)+(Z<<3)>>3]=al;h[(c[3560]|0)+(Z<<3)>>3]=+h[z>>3];ag=Z+1|0;ah=Y;ai=D;aj=F;ak=J;break L13646}}while(0);ag=Z;ah=Y+1|0;ai=D;aj=F;ak=J}else{ag=Z;ah=Y;ai=D;aj=F;ak=J}}while(0);af=eC(u,2)|0;if((af|0)==-1){I=10028;break}else{E=ac;J=ak;F=aj;D=ai;Y=ah;Z=ag;_=ab;$=af}}if((I|0)==10356){ez();uf(-1,133128,(v=i,i=i+8|0,c[v>>2]=ae,v)|0)}else if((I|0)==10358){ez();uf(-1,133128,(v=i,i=i+8|0,c[v>>2]=ae,v)|0)}else if((I|0)==10011){$=c[11932]|0;uf(-1,216224,(v=i,i=i+16|0,c[v>>2]=c[11900],c[v+8>>2]=($|0)!=0?$:179864,v)|0)}else if((I|0)==10002){c[3562]=0;ez();uf(-1,133128,(v=i,i=i+8|0,c[v>>2]=ae,v)|0)}else if((I|0)==10028){ez();if((ag|0)<1){S=ab;T=ag;U=ah;V=ai;W=aj;X=ak;I=10029;break}$=ag<<3;c[3562]=db(c[3562]|0,$,215008)|0;an=db(c[3560]|0,$,215008)|0;ao=ab;ap=ag;aq=ah;ar=ai;as=aj;at=ak;break}}}while(0);if((I|0)==10029){c[3562]=0;an=0;ao=S;ap=T;aq=U;ar=V;as=W;at=X}c[3560]=an;K=(t|0)==0?ao:t;L=0;M=ap;N=aq;O=ar;Q=as;R=at}u=c[8270]|0;do{if((u|0)!=0){if((aY(u|0,139696)|0)==0){break}bA(4,139696)}}while(0);if((M|0)==0){if((N|0)>0){uf(-1,204632,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{uf(-1,201008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}u=o|0;t=o+8|0;x=1;L13694:while(1){L13696:while(1){au=c[13898]|0;if((au|0)>=(c[8272]|0)){I=10098;break L13694}$=c[1054]|0;_=(a[$+(au*40&-1)|0]&1)==0;if(_){I=10351;break L13694}Z=c[$+(au*40&-1)+36>>2]|0;Y=$+(au*40&-1)+32|0;$=c[10036]|0;D=0;while(1){if((D|0)>=(Z|0)){I=10045;break}if((a[$+((c[Y>>2]|0)+D|0)|0]|0)==(a[D+103664|0]|0)){D=D+1|0}else{break}}if((I|0)==10045){I=0;if((D|0)==1){I=10098;break L13694}}$=c[Y>>2]|0;if(_){I=10345;break L13694}do{if((Z|0)>0){F=c[10036]|0;J=0;E=0;z=$;while(1){if((a[J+184704|0]|0)==(a[F+(J+z|0)|0]|0)){av=z;aw=E}else{if((J|0)!=3){break}av=z-1|0;aw=1}A=J+1|0;if((A|0)<(aw+Z|0)){J=A;E=aw;z=av}else{I=10053;break}}if((I|0)==10053){I=0;if((aw|0)!=0){ax=1;break L13696}if((J|0)==6|(J|0)==2){ax=1;break L13696}}if(_){I=10346;break L13694}if((Z|0)<=0){I=10076;break}z=c[10036]|0;E=0;F=0;A=$;while(1){if((a[E+179552|0]|0)==(a[z+(E+A|0)|0]|0)){ay=A;az=F}else{if((E|0)!=5){break}ay=A-1|0;az=1}C=E+1|0;if((C|0)<(az+Z|0)){E=C;F=az;A=ay}else{I=10064;break}}if((I|0)==10064){I=0;if((az|0)!=0){ax=0;break L13696}if((E|0)==8|(E|0)==4){ax=0;break L13696}}if(_){I=10350;break L13694}if((Z|0)<=0){I=10076;break}A=c[10036]|0;F=0;z=0;J=$;while(1){if((a[F+175408|0]|0)==(a[A+(F+J|0)|0]|0)){aA=J;aB=z}else{if((F|0)!=3){break}aA=J-1|0;aB=1}C=F+1|0;if((C|0)<(aB+Z|0)){F=C;z=aB;J=aA}else{I=10073;break}}if((I|0)==10073){I=0;if((aB|0)!=0){break}if((F|0)==2|(F|0)==6){break}}if(_){I=10348;break L13694}else{I=10076}}else{I=10076}}while(0);if((I|0)==10076){I=0;_=c[10036]|0;Y=0;while(1){if((Y|0)>=(Z|0)){break}if((a[_+($+Y|0)|0]|0)==(a[Y+218432|0]|0)){Y=Y+1|0}else{I=10349;break L13694}}if((Y|0)!=4){I=10347;break L13694}}c[13898]=au+1;uu(c[3556]|0);aC=c[13898]|0;if((aC|0)>=(c[8272]|0)){break L13694}$=c[1054]|0;L13751:do{if((a[$+(aC*40&-1)|0]&1)!=0){_=c[$+(aC*40&-1)+36>>2]|0;Z=$+(aC*40&-1)+32|0;D=c[10036]|0;J=0;while(1){if((J|0)>=(_|0)){break}if((a[D+((c[Z>>2]|0)+J|0)|0]|0)==(a[J+103664|0]|0)){J=J+1|0}else{break L13751}}if((J|0)==1){break L13694}}}while(0);a[14176]=1;is(o);a[14176]=0;if((c[u>>2]|0)!=3){I=10087;break L13694}$=c[t>>2]|0;c[3556]=$;if(($|0)==0){I=10341;break L13694}Y=a[$]|0;if(Y<<24>>24==0){I=10342;break L13694}if(((Y<<24>>24)-48|0)>>>0<10){I=10343;break L13694}else{aD=$;aE=Y}do{if((bs(aE&255|0)|0)==0){if((a[aD]|0)!=95){I=10339;break L13694}}aD=aD+1|0;aE=a[aD]|0;}while(aE<<24>>24!=0);if((aY(167320,c[3556]|0)|0)==0){I=10340;break L13694}}c[13898]=au+1;x=ax}if((I|0)==10098){t=c[3556]|0;if((t|0)==0){u=bP(150920)|0;c[3556]=u;aG=u}else{aG=t}t=uA(aG|0)|0;if((a[aG+(t-1|0)|0]|0)!=95){u=db(aG,t+2|0,149064)|0;c[3556]=u;t=u+(uA(u|0)|0)|0;w=95;a[t]=w&255;w=w>>8;a[t+1|0]=w&255}t=O+1|0;u=(K|0)==1;do{if(u){lc(s,c[3560]|0,M,L);aH=0.0;aJ=0.0;aK=0.0;aL=0.0;aM=0.0;aN=0.0;aO=0}else{if((K|0)!=2){aH=0.0;aJ=0.0;aK=0.0;aL=0.0;aM=0.0;aN=0.0;aO=0;break}lc(r,c[3562]|0,M,0);lc(s,c[3560]|0,M,0);Y=c[3562]|0;$=c[3560]|0;al=+h[r+8>>3];am=+h[r+16>>3];aP=+h[r+24>>3];aQ=+h[r+32>>3];aR=+h[s+8>>3];aS=+h[s+16>>3];aT=+h[s+24>>3];Z=c[s+48>>2]|0;D=c[s+64>>2]|0;if((M|0)>0){_=0;aU=0.0;while(1){aV=aU+ +h[Y+(_<<3)>>3]*+h[$+(_<<3)>>3];F=_+1|0;if((F|0)<(M|0)){_=F;aU=aV}else{aW=aV;break}}}else{aW=0.0}aU=+(M|0);aV=(aW-aP*aT/aU)/(aQ-aP*aP/aU);aH=aW;aJ=aV;aK=aR-al*aV;aL=am*aV/aS;aM=+h[Y+(Z<<3)>>3];aN=+h[Y+(D<<3)>>3];aO=1}}while(0);_=c[3556]|0;$=c[10810]|0;if(($|0)==0){aX=_}else{F=$;do{$=c[F+4>>2]|0;do{if((a_(_|0,$|0,uA(_|0)|0)|0)==0){a[F+8|0]=1;z=F+16|0;if((c[z>>2]|0)!=3){break}uu(c[F+24>>2]|0);c[z>>2]=1}}while(0);F=c[F>>2]|0;}while((F|0)!=0);aX=c[3556]|0}aS=+(M|0);F=(aX|0)!=0?aX:179864;_=(uA(F|0)|0)+8|0;$=ut(_)|0;do{if(($|0)==0){gk();D=ut(_)|0;if((D|0)!=0){aZ=D;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{aZ=$}}while(0);be(aZ|0,172512,(v=i,i=i+24|0,c[v>>2]=F,c[v+8>>2]=83376,c[v+16>>2]=179864,v)|0);$=e6(aZ)|0;c[$+16>>2]=2;h[$+24>>3]=aS;h[$+32>>3]=0.0;a[$+8|0]=0;uu(aZ);am=+(R|0);$=(uA(F|0)|0)+8|0;_=ut($)|0;do{if((_|0)==0){gk();D=ut($)|0;if((D|0)!=0){a$=D;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{a$=_}}while(0);be(a$|0,172512,(v=i,i=i+24|0,c[v>>2]=F,c[v+8>>2]=82464,c[v+16>>2]=179864,v)|0);_=e6(a$)|0;c[_+16>>2]=2;h[_+24>>3]=am;h[_+32>>3]=0.0;a[_+8|0]=0;uu(a$);al=+(Q|0);_=(uA(F|0)|0)+6|0;$=ut(_)|0;do{if(($|0)==0){gk();D=ut(_)|0;if((D|0)!=0){a0=D;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{a0=$}}while(0);be(a0|0,172512,(v=i,i=i+24|0,c[v>>2]=F,c[v+8>>2]=224608,c[v+16>>2]=179864,v)|0);$=e6(a0)|0;c[$+16>>2]=2;h[$+24>>3]=al;h[$+32>>3]=0.0;a[$+8|0]=0;uu(a0);am=+(t|0);$=(uA(F|0)|0)+7|0;_=ut($)|0;do{if((_|0)==0){gk();D=ut($)|0;if((D|0)!=0){a1=D;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{a1=_}}while(0);be(a1|0,172512,(v=i,i=i+24|0,c[v>>2]=F,c[v+8>>2]=79624,c[v+16>>2]=179864,v)|0);_=e6(a1)|0;c[_+16>>2]=2;h[_+24>>3]=am;h[_+32>>3]=0.0;a[_+8|0]=0;uu(a1);al=+(N|0);_=(uA(F|0)|0)+11|0;$=ut(_)|0;do{if(($|0)==0){gk();D=ut(_)|0;if((D|0)!=0){a2=D;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{a2=$}}while(0);be(a2|0,172512,(v=i,i=i+24|0,c[v>>2]=F,c[v+8>>2]=78880,c[v+16>>2]=179864,v)|0);$=e6(a2)|0;c[$+16>>2]=2;h[$+24>>3]=al;h[$+32>>3]=0.0;a[$+8|0]=0;uu(a2);if(u){ld(s,c[3556]|0,179864)}if(aO){ld(r,c[3556]|0,144920);ld(s,c[3556]|0,143296);$=c[3556]|0;_=($|0)!=0?$:179864;$=(uA(_|0)|0)+6|0;D=ut($)|0;do{if((D|0)==0){gk();Y=ut($)|0;if((Y|0)!=0){a3=Y;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{a3=D}}while(0);be(a3|0,172512,(v=i,i=i+24|0,c[v>>2]=_,c[v+8>>2]=140096,c[v+16>>2]=179864,v)|0);D=e6(a3)|0;c[D+16>>2]=2;h[D+24>>3]=aJ;h[D+32>>3]=0.0;a[D+8|0]=0;uu(a3);D=(uA(_|0)|0)+10|0;$=ut(D)|0;do{if(($|0)==0){gk();F=ut(D)|0;if((F|0)!=0){a4=F;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{a4=$}}while(0);be(a4|0,172512,(v=i,i=i+24|0,c[v>>2]=_,c[v+8>>2]=138e3,c[v+16>>2]=179864,v)|0);$=e6(a4)|0;c[$+16>>2]=2;h[$+24>>3]=aK;h[$+32>>3]=0.0;a[$+8|0]=0;uu(a4);$=(uA(_|0)|0)+12|0;D=ut($)|0;do{if((D|0)==0){gk();F=ut($)|0;if((F|0)!=0){a5=F;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{a5=D}}while(0);be(a5|0,172512,(v=i,i=i+24|0,c[v>>2]=_,c[v+8>>2]=136336,c[v+16>>2]=179864,v)|0);D=e6(a5)|0;c[D+16>>2]=2;h[D+24>>3]=aL;h[D+32>>3]=0.0;a[D+8|0]=0;uu(a5);D=(uA(_|0)|0)+6|0;$=ut(D)|0;do{if(($|0)==0){gk();F=ut(D)|0;if((F|0)!=0){a6=F;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{a6=$}}while(0);be(a6|0,172512,(v=i,i=i+24|0,c[v>>2]=_,c[v+8>>2]=134616,c[v+16>>2]=179864,v)|0);$=e6(a6)|0;c[$+16>>2]=2;h[$+24>>3]=aH;h[$+32>>3]=0.0;a[$+8|0]=0;uu(a6);$=(uA(_|0)|0)+10|0;D=ut($)|0;do{if((D|0)==0){gk();F=ut($)|0;if((F|0)!=0){a7=F;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{a7=D}}while(0);be(a7|0,172512,(v=i,i=i+24|0,c[v>>2]=_,c[v+8>>2]=75120,c[v+16>>2]=179864,v)|0);D=e6(a7)|0;c[D+16>>2]=2;h[D+24>>3]=aM;h[D+32>>3]=0.0;a[D+8|0]=0;uu(a7);D=(uA(_|0)|0)+10|0;$=ut(D)|0;do{if(($|0)==0){gk();F=ut(D)|0;if((F|0)!=0){a8=F;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{a8=$}}while(0);be(a8|0,172512,(v=i,i=i+24|0,c[v>>2]=_,c[v+8>>2]=74616,c[v+16>>2]=179864,v)|0);$=e6(a8)|0;c[$+16>>2]=2;h[$+24>>3]=aN;h[$+32>>3]=0.0;a[$+8|0]=0;uu(a8)}if(!x){a9=c[3562]|0;ba=a9;uu(ba);bb=c[3560]|0;bc=bb;uu(bc);c[3562]=0;c[3560]=0;bd=c[3558]|0;uu(bd);c[3558]=0;bf=c[3556]|0;uu(bf);c[3556]=0;i=b;return}$=(M|0)>0;if($){bg=~~+bQ(+aS)+1|0}else{bg=3}D=c[7262]|0;F=c[m>>2]|0;do{if((D|0)==0){c[7262]=F;bh=F;I=10158}else{if((D|0)==(c[n>>2]|0)|(D|0)==(F|0)){bh=D;I=10158;break}cf(D|0,84208,(v=i,i=i+16|0,c[v>>2]=83376,c[v+8>>2]=M,v)|0);Y=c[7262]|0;cf(Y|0,84208,(v=i,i=i+16|0,c[v>>2]=82464,c[v+8>>2]=R,v)|0);Y=c[7262]|0;cf(Y|0,84208,(v=i,i=i+16|0,c[v>>2]=80984,c[v+8>>2]=Q,v)|0);Y=c[7262]|0;cf(Y|0,84208,(v=i,i=i+16|0,c[v>>2]=79624,c[v+8>>2]=t,v)|0);Y=c[7262]|0;cf(Y|0,84208,(v=i,i=i+16|0,c[v>>2]=78880,c[v+8>>2]=N,v)|0)}}while(0);if((I|0)==10158){aF(10,bh|0);D=c[7262]|0;aI(78344,9,1,D|0);D=c[7262]|0;cf(D|0,77936,(v=i,i=i+16|0,c[v>>2]=bg,c[v+8>>2]=M,v)|0);D=c[7262]|0;cf(D|0,77320,(v=i,i=i+16|0,c[v>>2]=bg,c[v+8>>2]=N,v)|0);D=c[7262]|0;cf(D|0,76744,(v=i,i=i+16|0,c[v>>2]=bg,c[v+8>>2]=R,v)|0);D=c[7262]|0;cf(D|0,76144,(v=i,i=i+16|0,c[v>>2]=bg,c[v+8>>2]=Q,v)|0);D=c[7262]|0;cf(D|0,75560,(v=i,i=i+16|0,c[v>>2]=bg,c[v+8>>2]=t,v)|0)}if(u){uD(d|0,s|0,112);D=e|0;F=f|0;if($){bi=~~+bQ(+aS)+1|0}else{bi=1}x=c[7262]|0;_=c[m>>2]|0;do{if((x|0)==0){c[7262]=_;bj=_}else{if((x|0)==(c[n>>2]|0)|(x|0)==(_|0)){bj=x;break}lb(d,143296);a9=c[3562]|0;ba=a9;uu(ba);bb=c[3560]|0;bc=bb;uu(bc);c[3562]=0;c[3560]=0;bd=c[3558]|0;uu(bd);c[3558]=0;bf=c[3556]|0;uu(bf);c[3556]=0;i=b;return}}while(0);aF(10,bj|0);x=c[d>>2]|0;_=(x|0)>0;u=c[7262]|0;if(_){t=c[d+4>>2]|0;cf(u|0,94136,(v=i,i=i+16|0,c[v>>2]=x,c[v+8>>2]=t,v)|0)}else{aI(93512,11,1,u|0)}u=c[7262]|0;al=+h[d+8>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(u|0,92672,(v=i,i=i+8|0,c[v>>2]=D,v)|0);t=c[7262]|0;al=+h[d+16>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(t|0,91840,(v=i,i=i+8|0,c[v>>2]=D,v)|0);u=c[7262]|0;al=+h[d+24>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(u|0,91184,(v=i,i=i+8|0,c[v>>2]=D,v)|0);t=c[7262]|0;al=+h[d+32>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(t|0,90616,(v=i,i=i+8|0,c[v>>2]=D,v)|0);u=c[7262]|0;aF(10,u|0);u=c[7262]|0;al=+h[d+40>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);t=c[d+48>>2]|0;if(_){Y=(t|0)/(x|0)&-1;Z=(t|0)%(x|0)&-1;cf(u|0,90112,(v=i,i=i+32|0,c[v>>2]=D,c[v+8>>2]=bi,c[v+16>>2]=Y,c[v+24>>2]=Z,v)|0);Z=c[7262]|0;al=+h[d+56>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);_=c[d+64>>2]|0;Y=(_|0)/(x|0)&-1;z=(_|0)%(x|0)&-1;cf(Z|0,89384,(v=i,i=i+32|0,c[v>>2]=D,c[v+8>>2]=bi,c[v+16>>2]=Y,c[v+24>>2]=z,v)|0);z=c[7262]|0;al=+h[d+96>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);al=+h[d+104>>3];am=+P(+al);do{if(am<1.0e-14){be(F|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(F|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(F|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(z|0,88904,(v=i,i=i+16|0,c[v>>2]=D,c[v+8>>2]=F,v)|0);a9=c[3562]|0;ba=a9;uu(ba);bb=c[3560]|0;bc=bb;uu(bc);c[3562]=0;c[3560]=0;bd=c[3558]|0;uu(bd);c[3558]=0;bf=c[3556]|0;uu(bf);c[3556]=0;i=b;return}cf(u|0,88336,(v=i,i=i+24|0,c[v>>2]=D,c[v+8>>2]=bi,c[v+16>>2]=t,v)|0);Z=c[7262]|0;al=+h[d+56>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);t=c[d+64>>2]|0;cf(Z|0,87048,(v=i,i=i+24|0,c[v>>2]=D,c[v+8>>2]=bi,c[v+16>>2]=t,v)|0);t=c[7262]|0;al=+h[d+80>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(t|0,86e3,(v=i,i=i+8|0,c[v>>2]=D,v)|0);Z=c[7262]|0;al=+h[d+72>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(Z|0,84768,(v=i,i=i+8|0,c[v>>2]=D,v)|0);t=c[7262]|0;al=+h[d+88>>3];am=+P(+al);do{if(am<1.0e-14){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(D|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(D|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(t|0,86e3,(v=i,i=i+8|0,c[v>>2]=D,v)|0);Z=c[7262]|0;aF(10,Z|0);a9=c[3562]|0;ba=a9;uu(ba);bb=c[3560]|0;bc=bb;uu(bc);c[3562]=0;c[3560]=0;bd=c[3558]|0;uu(bd);c[3558]=0;bf=c[3556]|0;uu(bf);c[3556]=0;i=b;return}uD(l|0,r|0,112);uD(k|0,s|0,112);Z=e|0;u=f|0;F=j|0;if($){bk=~~+bQ(+aS)+1|0}else{bk=1}z=c[7262]|0;if(!((z|0)==(c[n>>2]|0)|(z|0)==(c[m>>2]|0))){lb(l,144920);lb(k,143296);z=c[7262]|0;cf(z|0,141768,(v=i,i=i+16|0,c[v>>2]=140096,h[v+8>>3]=aJ,v)|0);z=c[7262]|0;cf(z|0,141768,(v=i,i=i+16|0,c[v>>2]=138e3,h[v+8>>3]=aK,v)|0);z=c[7262]|0;cf(z|0,141768,(v=i,i=i+16|0,c[v>>2]=136336,h[v+8>>3]=aL,v)|0);z=c[7262]|0;cf(z|0,141768,(v=i,i=i+16|0,c[v>>2]=134616,h[v+8>>3]=aH,v)|0);a9=c[3562]|0;ba=a9;uu(ba);bb=c[3560]|0;bc=bb;uu(bc);c[3562]=0;c[3560]=0;bd=c[3558]|0;uu(bd);c[3558]=0;bf=c[3556]|0;uu(bf);c[3556]=0;i=b;return}z=bk+4|0;uF(F|0,132920,z|0);a[j+z|0]=0;z=c[7262]|0;if((z|0)==0){x=c[m>>2]|0;c[7262]=x;bl=x}else{bl=z}aF(10,bl|0);z=c[7262]|0;aI(130456,11,1,z|0);z=c[7262]|0;al=+h[l+8>>3];am=+P(+al);do{if(am<1.0e-14){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(Z|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);al=+h[k+8>>3];am=+P(+al);do{if(am<1.0e-14){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(u|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(z|0,129328,(v=i,i=i+24|0,c[v>>2]=Z,c[v+8>>2]=F,c[v+16>>2]=u,v)|0);$=c[7262]|0;al=+h[l+16>>3];am=+P(+al);do{if(am<1.0e-14){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(Z|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);al=+h[k+16>>3];am=+P(+al);do{if(am<1.0e-14){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(u|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf($|0,128056,(v=i,i=i+24|0,c[v>>2]=Z,c[v+8>>2]=F,c[v+16>>2]=u,v)|0);z=c[7262]|0;al=+h[l+24>>3];am=+P(+al);do{if(am<1.0e-14){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(Z|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);al=+h[k+24>>3];am=+P(+al);do{if(am<1.0e-14){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(u|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(z|0,126736,(v=i,i=i+24|0,c[v>>2]=Z,c[v+8>>2]=F,c[v+16>>2]=u,v)|0);$=c[7262]|0;al=+h[l+32>>3];am=+P(+al);do{if(am<1.0e-14){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(Z|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);al=+h[k+32>>3];am=+P(+al);do{if(am<1.0e-14){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(u|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf($|0,125656,(v=i,i=i+24|0,c[v>>2]=Z,c[v+8>>2]=F,c[v+16>>2]=u,v)|0);z=c[7262]|0;aF(10,z|0);z=c[7262]|0;al=+h[l+40>>3];am=+P(+al);do{if(am<1.0e-14){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(Z|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);$=c[l+48>>2]|0;al=+h[k+40>>3];am=+P(+al);do{if(am<1.0e-14){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(u|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);D=c[k+48>>2]|0;cf(z|0,124424,(v=i,i=i+48|0,c[v>>2]=Z,c[v+8>>2]=bk,c[v+16>>2]=$,c[v+24>>2]=u,c[v+32>>2]=bk,c[v+40>>2]=D,v)|0);D=c[7262]|0;al=+h[l+56>>3];am=+P(+al);do{if(am<1.0e-14){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(Z|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);$=c[l+64>>2]|0;al=+h[k+56>>3];am=+P(+al);do{if(am<1.0e-14){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(u|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);z=c[k+64>>2]|0;cf(D|0,122968,(v=i,i=i+48|0,c[v>>2]=Z,c[v+8>>2]=bk,c[v+16>>2]=$,c[v+24>>2]=u,c[v+32>>2]=bk,c[v+40>>2]=z,v)|0);z=c[7262]|0;al=+h[l+80>>3];am=+P(+al);do{if(am<1.0e-14){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(Z|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);al=+h[k+80>>3];am=+P(+al);do{if(am<1.0e-14){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(u|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(z|0,121824,(v=i,i=i+24|0,c[v>>2]=Z,c[v+8>>2]=F,c[v+16>>2]=u,v)|0);$=c[7262]|0;al=+h[l+72>>3];am=+P(+al);do{if(am<1.0e-14){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(Z|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);al=+h[k+72>>3];am=+P(+al);do{if(am<1.0e-14){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(u|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf($|0,119880,(v=i,i=i+24|0,c[v>>2]=Z,c[v+8>>2]=F,c[v+16>>2]=u,v)|0);z=c[7262]|0;al=+h[l+88>>3];am=+P(+al);do{if(am<1.0e-14){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(Z|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(Z|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);al=+h[k+88>>3];am=+P(+al);do{if(am<1.0e-14){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else{if(+P(+(+bQ(+am)))<6.0){be(u|0,109728,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}else{be(u|0,107744,(v=i,i=i+8|0,h[v>>3]=al,v)|0);break}}}while(0);cf(z|0,121824,(v=i,i=i+24|0,c[v>>2]=Z,c[v+8>>2]=F,c[v+16>>2]=u,v)|0);$=c[7262]|0;aF(10,$|0);$=c[7262]|0;if(aK<0.0){al=-0.0-aK;cf($|0,116720,(v=i,i=i+16|0,h[v>>3]=aJ,h[v+8>>3]=al,v)|0)}else{cf($|0,115856,(v=i,i=i+16|0,h[v>>3]=aJ,h[v+8>>3]=aK,v)|0)}$=c[7262]|0;cf($|0,114952,(v=i,i=i+8|0,h[v>>3]=aL,v)|0);$=c[7262]|0;cf($|0,113880,(v=i,i=i+8|0,h[v>>3]=aH,v)|0);$=c[7262]|0;aF(10,$|0);a9=c[3562]|0;ba=a9;uu(ba);bb=c[3560]|0;bc=bb;uu(bc);c[3562]=0;c[3560]=0;bd=c[3558]|0;uu(bd);c[3558]=0;bf=c[3556]|0;uu(bf);c[3556]=0;i=b;return}else if((I|0)==10339){bm=c[13898]|0;bn=bm-1|0;c[13898]=bn;uf(bn,162880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10340){bm=c[13898]|0;bn=bm-1|0;c[13898]=bn;uf(bn,162880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10341){bm=c[13898]|0;bn=bm-1|0;c[13898]=bn;uf(bn,162880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10342){bm=c[13898]|0;bn=bm-1|0;c[13898]=bn;uf(bn,162880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10343){bm=c[13898]|0;bn=bm-1|0;c[13898]=bn;uf(bn,162880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10345){uf(au,154024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10346){uf(au,154024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10347){uf(au,154024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10348){uf(au,154024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10349){uf(au,154024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10350){uf(au,154024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10351){uf(au,154024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((I|0)==10087){c[13898]=aC}c[3556]=0;bm=c[13898]|0;bn=bm-1|0;c[13898]=bn;uf(bn,162880,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[3558]=0;B=y;uf(B,205112,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}function la(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0;c=+h[a>>3];d=+h[b>>3];if(cd&1;return e|0}function lb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0,j=0,k=0,l=0,m=0;d=i;e=a;a=i;i=i+112|0;uD(a,e,112);f=+h[a+8>>3];cf(c[7262]|0,106776,(v=i,i=i+24|0,c[v>>2]=105792,c[v+8>>2]=b,h[v+16>>3]=f,v)|0);f=+h[a+16>>3];cf(c[7262]|0,106776,(v=i,i=i+24|0,c[v>>2]=104736,c[v+8>>2]=b,h[v+16>>3]=f,v)|0);f=+h[a+24>>3];cf(c[7262]|0,106776,(v=i,i=i+24|0,c[v>>2]=104152,c[v+8>>2]=b,h[v+16>>3]=f,v)|0);f=+h[a+32>>3];cf(c[7262]|0,106776,(v=i,i=i+24|0,c[v>>2]=103792,c[v+8>>2]=b,h[v+16>>3]=f,v)|0);f=+h[a+40>>3];cf(c[7262]|0,106776,(v=i,i=i+24|0,c[v>>2]=103256,c[v+8>>2]=b,h[v+16>>3]=f,v)|0);e=c[a>>2]|0;if((e|0)==0){g=c[7262]|0;f=+h[a+80>>3];cf(g|0,106776,(v=i,i=i+24|0,c[v>>2]=101216,c[v+8>>2]=b,h[v+16>>3]=f,v)|0);g=c[7262]|0;f=+h[a+72>>3];cf(g|0,106776,(v=i,i=i+24|0,c[v>>2]=100616,c[v+8>>2]=b,h[v+16>>3]=f,v)|0);g=c[7262]|0;f=+h[a+88>>3];cf(g|0,106776,(v=i,i=i+24|0,c[v>>2]=99968,c[v+8>>2]=b,h[v+16>>3]=f,v)|0)}f=+h[a+56>>3];cf(c[7262]|0,106776,(v=i,i=i+24|0,c[v>>2]=99528,c[v+8>>2]=b,h[v+16>>3]=f,v)|0);g=c[7262]|0;j=c[a+48>>2]|0;if((e|0)>0){k=(j|0)/(e|0)&-1;cf(g|0,99104,(v=i,i=i+24|0,c[v>>2]=98432,c[v+8>>2]=b,c[v+16>>2]=k,v)|0);k=c[7262]|0;l=(j|0)%(e|0)&-1;cf(k|0,99104,(v=i,i=i+24|0,c[v>>2]=97816,c[v+8>>2]=b,c[v+16>>2]=l,v)|0);l=c[7262]|0;k=c[a+64>>2]|0;m=(k|0)/(e|0)&-1;cf(l|0,99104,(v=i,i=i+24|0,c[v>>2]=97216,c[v+8>>2]=b,c[v+16>>2]=m,v)|0);m=c[7262]|0;l=(k|0)%(e|0)&-1;cf(m|0,99104,(v=i,i=i+24|0,c[v>>2]=96656,c[v+8>>2]=b,c[v+16>>2]=l,v)|0);l=c[7262]|0;f=+h[a+96>>3];cf(l|0,106776,(v=i,i=i+24|0,c[v>>2]=96240,c[v+8>>2]=b,h[v+16>>3]=f,v)|0);l=c[7262]|0;f=+h[a+104>>3];cf(l|0,106776,(v=i,i=i+24|0,c[v>>2]=95776,c[v+8>>2]=b,h[v+16>>3]=f,v)|0);i=d;return}else{cf(g|0,99104,(v=i,i=i+24|0,c[v>>2]=95288,c[v+8>>2]=b,c[v+16>>2]=j,v)|0);j=c[7262]|0;g=c[a+64>>2]|0;cf(j|0,99104,(v=i,i=i+24|0,c[v>>2]=94824,c[v+8>>2]=b,c[v+16>>2]=g,v)|0);i=d;return}}function lc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0;f=i;i=i+32|0;g=f|0;j=d<<4;k=ut(j)|0;do{if((k|0)==0){gk();l=ut(j)|0;if((l|0)!=0){m=l;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=223576,v)|0)}else{m=k}}while(0);k=m;j=(e|0)>0;if(j){n=e;o=(d|0)/(e|0)&-1}else{n=0;o=d}e=(d|0)>0;if(e){l=0;p=0.0;q=0.0;r=0.0;s=0.0;while(1){t=+h[b+(l<<3)>>3];u=p+t;w=q+t*t;if(j){x=s+t*+((l|0)/(n|0)&-1|0);y=r+t*+((l|0)%(n|0)&-1|0)}else{x=s;y=r}z=l+1|0;if((z|0)<(d|0)){l=z;p=u;q=w;r=y;s=x}else{A=u;B=w;C=y;D=x;break}}}else{A=0.0;B=0.0;C=0.0;D=0.0}x=+(d|0);y=A/x;s=+Q(+(B/x-y*y));if(e){e=0;do{h[k+(e<<4)>>3]=+h[b+(e<<3)>>3];c[k+(e<<4)+8>>2]=e;e=e+1|0;}while((e|0)<(d|0))}bM(m|0,d|0,16,4);e=g;c[e>>2]=c[m>>2];c[e+4>>2]=c[m+4>>2];c[e+8>>2]=c[m+8>>2];c[e+12>>2]=c[m+12>>2];b=d-1|0;l=k+(b<<4)|0;j=g+16|0;c[j>>2]=c[l>>2];c[j+4>>2]=c[l+4>>2];c[j+8>>2]=c[l+8>>2];c[j+12>>2]=c[l+12>>2];if((d&1|0)==0){l=(d|0)/2&-1;E=(+h[k+(l-1<<4)>>3]+ +h[k+(l<<4)>>3])*.5}else{E=+h[k+(((b|0)/2&-1)<<4)>>3]}if((d&3|0)==0){b=(d|0)/4&-1;l=d-b|0;F=(+h[k+(l<<4)>>3]+ +h[k+(l-1<<4)>>3])*.5;G=(+h[k+(b-1<<4)>>3]+ +h[k+(b<<4)>>3])*.5}else{b=(d+3|0)/4&-1;F=+h[k+(d-b<<4)>>3];G=+h[k+(b-1<<4)>>3]}if(C==0.0&D==0.0){H=0.0;I=0.0}else{H=D/A;I=C/A}uu(m);c[a>>2]=n;c[a+4>>2]=o;h[a+8>>3]=y;h[a+16>>3]=s;h[a+24>>3]=A;h[a+32>>3]=B;o=a+40|0;c[o>>2]=c[e>>2];c[o+4>>2]=c[e+4>>2];c[o+8>>2]=c[e+8>>2];c[o+12>>2]=c[e+12>>2];c[o+16>>2]=c[e+16>>2];c[o+20>>2]=c[e+20>>2];c[o+24>>2]=c[e+24>>2];c[o+28>>2]=c[e+28>>2];h[a+72>>3]=E;h[a+80>>3]=G;h[a+88>>3]=F;h[a+96>>3]=I;h[a+104>>3]=H;i=f;return}function ld(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0;f=i;g=b;b=i;i=i+112|0;uD(b,g,112);j=+h[b+8>>3];g=(d|0)!=0?d:179864;d=(e|0)!=0?e:179864;e=uA(g|0)|0;k=(e+5|0)+(uA(d|0)|0)|0;e=ut(k)|0;do{if((e|0)==0){gk();l=ut(k)|0;if((l|0)!=0){m=l;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{m=e}}while(0);be(m|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=105792,c[v+16>>2]=d,v)|0);e=e6(m)|0;c[e+16>>2]=2;h[e+24>>3]=j;h[e+32>>3]=0.0;a[e+8|0]=0;uu(m);j=+h[b+16>>3];m=uA(g|0)|0;e=(m+7|0)+(uA(d|0)|0)|0;m=ut(e)|0;do{if((m|0)==0){gk();k=ut(e)|0;if((k|0)!=0){n=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{n=m}}while(0);be(n|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=104736,c[v+16>>2]=d,v)|0);m=e6(n)|0;c[m+16>>2]=2;h[m+24>>3]=j;h[m+32>>3]=0.0;a[m+8|0]=0;uu(n);j=+h[b+24>>3];n=uA(g|0)|0;m=(n+4|0)+(uA(d|0)|0)|0;n=ut(m)|0;do{if((n|0)==0){gk();e=ut(m)|0;if((e|0)!=0){o=e;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{o=n}}while(0);be(o|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=104152,c[v+16>>2]=d,v)|0);n=e6(o)|0;c[n+16>>2]=2;h[n+24>>3]=j;h[n+32>>3]=0.0;a[n+8|0]=0;uu(o);j=+h[b+32>>3];o=uA(g|0)|0;n=(o+6|0)+(uA(d|0)|0)|0;o=ut(n)|0;do{if((o|0)==0){gk();m=ut(n)|0;if((m|0)!=0){p=m;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{p=o}}while(0);be(p|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=73440,c[v+16>>2]=d,v)|0);o=e6(p)|0;c[o+16>>2]=2;h[o+24>>3]=j;h[o+32>>3]=0.0;a[o+8|0]=0;uu(p);j=+h[b+40>>3];p=uA(g|0)|0;o=(p+4|0)+(uA(d|0)|0)|0;p=ut(o)|0;do{if((p|0)==0){gk();n=ut(o)|0;if((n|0)!=0){q=n;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{q=p}}while(0);be(q|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=103256,c[v+16>>2]=d,v)|0);p=e6(q)|0;c[p+16>>2]=2;h[p+24>>3]=j;h[p+32>>3]=0.0;a[p+8|0]=0;uu(q);j=+h[b+56>>3];q=uA(g|0)|0;p=(q+4|0)+(uA(d|0)|0)|0;q=ut(p)|0;do{if((q|0)==0){gk();o=ut(p)|0;if((o|0)!=0){r=o;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{r=q}}while(0);be(r|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=99528,c[v+16>>2]=d,v)|0);q=e6(r)|0;c[q+16>>2]=2;h[q+24>>3]=j;h[q+32>>3]=0.0;a[q+8|0]=0;uu(r);r=c[b>>2]|0;if((r|0)>0){q=c[b+48>>2]|0;j=+((q|0)/(r|0)&-1|0);p=uA(g|0)|0;o=(p+12|0)+(uA(d|0)|0)|0;p=ut(o)|0;do{if((p|0)==0){gk();n=ut(o)|0;if((n|0)!=0){s=n;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{s=p}}while(0);be(s|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=98432,c[v+16>>2]=d,v)|0);p=e6(s)|0;c[p+16>>2]=2;h[p+24>>3]=j;h[p+32>>3]=0.0;a[p+8|0]=0;uu(s);j=+((q|0)%(r|0)&-1|0);q=uA(g|0)|0;s=(q+12|0)+(uA(d|0)|0)|0;q=ut(s)|0;do{if((q|0)==0){gk();p=ut(s)|0;if((p|0)!=0){t=p;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{t=q}}while(0);be(t|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=97816,c[v+16>>2]=d,v)|0);q=e6(t)|0;c[q+16>>2]=2;h[q+24>>3]=j;h[q+32>>3]=0.0;a[q+8|0]=0;uu(t);t=c[b+64>>2]|0;j=+((t|0)/(r|0)&-1|0);q=uA(g|0)|0;s=(q+12|0)+(uA(d|0)|0)|0;q=ut(s)|0;do{if((q|0)==0){gk();p=ut(s)|0;if((p|0)!=0){u=p;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{u=q}}while(0);be(u|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=97216,c[v+16>>2]=d,v)|0);q=e6(u)|0;c[q+16>>2]=2;h[q+24>>3]=j;h[q+32>>3]=0.0;a[q+8|0]=0;uu(u);j=+((t|0)%(r|0)&-1|0);r=uA(g|0)|0;t=(r+12|0)+(uA(d|0)|0)|0;r=ut(t)|0;do{if((r|0)==0){gk();u=ut(t)|0;if((u|0)!=0){w=u;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{w=r}}while(0);be(w|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=96656,c[v+16>>2]=d,v)|0);r=e6(w)|0;c[r+16>>2]=2;h[r+24>>3]=j;h[r+32>>3]=0.0;a[r+8|0]=0;uu(w);i=f;return}j=+h[b+72>>3];w=uA(g|0)|0;r=(w+7|0)+(uA(d|0)|0)|0;w=ut(r)|0;do{if((w|0)==0){gk();t=ut(r)|0;if((t|0)!=0){x=t;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{x=w}}while(0);be(x|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=100616,c[v+16>>2]=d,v)|0);w=e6(x)|0;c[w+16>>2]=2;h[w+24>>3]=j;h[w+32>>3]=0.0;a[w+8|0]=0;uu(x);j=+h[b+80>>3];x=uA(g|0)|0;w=(x+12|0)+(uA(d|0)|0)|0;x=ut(w)|0;do{if((x|0)==0){gk();r=ut(w)|0;if((r|0)!=0){y=r;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{y=x}}while(0);be(y|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=101216,c[v+16>>2]=d,v)|0);x=e6(y)|0;c[x+16>>2]=2;h[x+24>>3]=j;h[x+32>>3]=0.0;a[x+8|0]=0;uu(y);j=+h[b+88>>3];y=uA(g|0)|0;x=(y+12|0)+(uA(d|0)|0)|0;y=ut(x)|0;do{if((y|0)==0){gk();w=ut(x)|0;if((w|0)!=0){z=w;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{z=y}}while(0);be(z|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=99968,c[v+16>>2]=d,v)|0);y=e6(z)|0;c[y+16>>2]=2;h[y+24>>3]=j;h[y+32>>3]=0.0;a[y+8|0]=0;uu(z);j=+(c[b+48>>2]|0);z=uA(g|0)|0;y=(z+10|0)+(uA(d|0)|0)|0;z=ut(y)|0;do{if((z|0)==0){gk();x=ut(y)|0;if((x|0)!=0){A=x;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{A=z}}while(0);be(A|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=72824,c[v+16>>2]=d,v)|0);z=e6(A)|0;c[z+16>>2]=2;h[z+24>>3]=j;h[z+32>>3]=0.0;a[z+8|0]=0;uu(A);j=+(c[b+64>>2]|0);b=uA(g|0)|0;A=(b+10|0)+(uA(d|0)|0)|0;b=ut(A)|0;do{if((b|0)==0){gk();z=ut(A)|0;if((z|0)!=0){B=z;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74192,v)|0)}else{B=b}}while(0);be(B|0,172512,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=225064,c[v+16>>2]=d,v)|0);d=e6(B)|0;c[d+16>>2]=2;h[d+24>>3]=j;h[d+32>>3]=0.0;a[d+8|0]=0;uu(B);i=f;return}function le(b,d,e){b=+b;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0.0;f=i;i=i+48|0;g=f|0;do{if((c[64808+(d*688&-1)>>2]|0)==1){j=64864+(d*688&-1)|0;if((aY(j|0,132824)|0)==0){ud(e,150,74984,1.0,b);break}a[e]=34;k=e+1|0;t3(g,b);l=b- +O(+b);t4(k,149,j,g,l);j=a8(e|0,10)|0;if((j|0)!=0){k=j;do{a[k]=32;k=a8(e|0,10)|0;}while((k|0)!=0)}k=e+(uA(e|0)|0)|0;w=34;a[k]=w&255;w=w>>8;a[k+1|0]=w&255}else{if((a[64788+(d*688&-1)|0]&1)==0){ud(e,150,64864+(d*688&-1)|0,1.0,b);break}else{ud(e,150,64864+(d*688&-1)|0,1.0,+R(+(+h[64792+(d*688&-1)>>3]),+b));break}}}while(0);aK(e|0,c[8248]|0);aF(32,c[8248]|0);i=f;return}function lf(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0.0,H=0,I=0,J=0;e=i;f=ut(150)|0;do{if((f|0)==0){gk();g=ut(150)|0;if((g|0)!=0){j=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=126456,v)|0)}else{j=f}}while(0);f=c[3526]|0;g=(f|0)!=0?f:c[10030]|0;c[8248]=g;if((d|0)>0){k=0;l=b;n=g}else{o=g;p=aD(o|0)|0;uu(j);i=e;return}L14252:while(1){g=l+300|0;b=c[g>>2]|0;cf(n|0,203280,(v=i,i=i+24|0,c[v>>2]=k,c[v+8>>2]=d,c[v+16>>2]=b,v)|0);b=c[l+16>>2]|0;do{if((b|0)!=0){if((a[b]|0)==0){break}f=uA(b|0)<<1;q=ut(f)|0;if((q|0)==0){gk();r=ut(f)|0;if((r|0)==0){s=10464;break L14252}else{t=r}}else{t=q}q=t;r=b;while(1){f=a[r]|0;if(f<<24>>24==10){u=q+1|0;a[q]=92;a[u]=110;w=u}else{a[q]=f;w=q}if((a[r]|0)==0){break}else{q=w+1|0;r=r+1|0}}cf(c[8248]|0,15e4,(v=i,i=i+8|0,c[v>>2]=t,v)|0);uu(t)}}while(0);aI(132264,6,1,c[8248]|0);b=l+12|0;r=c[b>>2]|0;do{if((r|0)==137|(r|0)==118){q=c[8248]|0;aI(96928,22,1,q|0)}else if((r|0)==252){aI(75296,29,1,c[8248]|0)}else if((r|0)==416|(r|0)==432){aI(204480,22,1,c[8248]|0)}else if((r|0)==400){aI(210472,7,1,c[8248]|0)}else if((r|0)==257){aI(82936,23,1,c[8248]|0)}else if((r|0)==153|(r|0)==86){aI(119232,11,1,c[8248]|0)}else if((r|0)==345){aI(90824,4,1,c[8248]|0)}else if((r|0)==169|(r|0)==102){aI(103984,11,1,c[8248]|0)}else if((r|0)==225){aI(215896,16,1,c[8248]|0)}else if((r|0)==368){aI(222792,6,1,c[8248]|0)}else if(!((r|0)==1|(r|0)==18|(r|0)==51|(r|0)==64|(r|0)==33|(r|0)==177|(r|0)==193|(r|0)==209)){if((a[37400]&1)==0){break}cf(c[m>>2]|0,200512,(v=i,i=i+8|0,c[v>>2]=(r|0)==392?195192:184488,v)|0)}}while(0);r=l+316|0;if((c[r>>2]|0)!=0){q=c[8248]|0;aI(179312,7,1,q|0)}aI(175152,6,1,c[8248]|0);q=c[b>>2]|0;do{if((q|0)==392){x=(c[c[l+276>>2]>>2]|0)==4?102:392;s=10499}else if((q|0)==368){f=c[c[l+224>>2]>>2]|0;if((f|0)==0){break}u=l+304|0;y=l+308|0;z=f;do{f=c[z+60>>2]|0;A=uA(f|0)<<1;B=ut(A)|0;if((B|0)==0){gk();C=ut(A)|0;if((C|0)==0){s=10491;break L14252}else{D=C}}else{D=B}B=D;C=f;while(1){f=a[C]|0;if(f<<24>>24==10){A=B+1|0;a[B]=92;a[A]=110;E=A}else{a[B]=f;E=B}if((a[C]|0)==0){break}else{B=E+1|0;C=C+1|0}}le(+h[z+24>>3],c[u>>2]|0,j);le(+h[z+32>>3],c[y>>2]|0,j);cf(c[8248]|0,171376,(v=i,i=i+8|0,c[v>>2]=D,v)|0);uu(D);z=c[z>>2]|0;}while((z|0)!=0)}else{x=q;s=10499}}while(0);do{if((s|0)==10499){s=0;q=l+320|0;if((c[g>>2]|0)<=0){break}b=l+304|0;z=l+308|0;y=l+72|0;u=l+64|0;C=l+28|0;B=c[q>>2]|0;f=0;while(1){if((uG(B|0,56440,64)|0)==0){A=c[8248]|0;aF(10,A|0)}else{A=B+8|0;le(+h[A>>3],c[b>>2]|0,j);F=B+16|0;le(+h[F>>3],c[z>>2]|0,j);if((x|0)==345){le(+h[B+40>>3],c[z>>2]|0,j)}else if((x|0)==169|(x|0)==102){s=10506}else if((x|0)==400){cf(c[8248]|0,184536,(v=i,i=i+8|0,h[v>>3]=+h[B+24>>3],v)|0)}else if((x|0)==416|(x|0)==432){cf(c[8248]|0,153776,(v=i,i=i+8|0,c[v>>2]=~~+h[B+40>>3],v)|0);cf(c[8248]|0,153776,(v=i,i=i+8|0,c[v>>2]=~~+h[B+48>>3],v)|0);cf(c[8248]|0,153776,(v=i,i=i+8|0,c[v>>2]=~~+h[B+56>>3],v)|0);cf(c[8248]|0,153776,(v=i,i=i+8|0,c[v>>2]=~~+h[B+32>>3],v)|0)}else if((x|0)==153|(x|0)==86){le(+h[B+48>>3],c[b>>2]|0,j);le(+h[B+56>>3],c[b>>2]|0,j)}else if((x|0)==137|(x|0)==118){le(+h[B+48>>3],c[b>>2]|0,j);le(+h[B+56>>3],c[b>>2]|0,j);s=10506}else if((x|0)==257){le(+h[B+32>>3],c[z>>2]|0,j);le(+h[B+40>>3],c[z>>2]|0,j);le(+h[B+24>>3],c[z>>2]|0,j)}else if((x|0)==252){le(+h[B+32>>3],c[z>>2]|0,j);le(+h[B+40>>3],c[z>>2]|0,j);le(+h[B+24>>3],c[z>>2]|0,j);le((+h[A>>3]- +h[B+48>>3])*2.0,c[b>>2]|0,j)}else if((x|0)==225){le(+h[B+56>>3]- +h[A>>3],c[b>>2]|0,j);le(+h[B+40>>3]- +h[F>>3],c[z>>2]|0,j)}if((s|0)==10506){s=0;le(+h[B+32>>3],c[z>>2]|0,j);le(+h[B+40>>3],c[z>>2]|0,j)}F=c[r>>2]|0;do{if((F|0)!=0){G=+h[F+(f<<3)>>3];A=c[u>>2]|0;if(+h[y>>3]<0.0&(A|0)==3){H=c[8248]|0;I=~~G;cf(H|0,150832,(v=i,i=i+8|0,c[v>>2]=I,v)|0);break}if((A|0)==6){le(G,3,j);break}if((c[C>>2]|0)!=-6){break}le(G,3,j)}}while(0);F=c[8248]|0;A=c[(c[q>>2]|0)+(f<<6)>>2]|0;if((A|0)==0){J=105}else{J=(A|0)==1?111:117}cf(F|0,148928,(v=i,i=i+8|0,c[v>>2]=J,v)|0)}F=f+1|0;if((F|0)<(c[g>>2]|0)){B=B+64|0;f=F}else{break}}}}while(0);aF(10,c[8248]|0);g=k+1|0;r=c[8248]|0;if((g|0)<(d|0)){k=g;l=c[l>>2]|0;n=r}else{o=r;s=10527;break}}if((s|0)==10527){p=aD(o|0)|0;uu(j);i=e;return}else if((s|0)==10464){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=134528,v)|0)}else if((s|0)==10491){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=134528,v)|0)}}function lg(){var b=0.0,d=0,e=0.0,f=0.0,i=0,j=0.0,k=0.0,l=0.0,m=0,n=0.0,o=0.0;if((a[33656]&1)==0){return}b=+h[4211];d=c[8417]|0;e=+(d|0);g[178]=b/e;f=+h[4212];i=c[8416]|0;j=+(i|0);k=f/j;g[38]=k;l=+(c[8420]|0)/e;g[184]=l;m=c[8419]|0;if((a[33673]&1)==0){n=+(m|0)/j}else{n=1.0- +(m+1|0)/j}j=n;g[44]=j;if((c[8453]|0)==0){o=j}else{n=1.0- +h[4243];g[38]=n*k;k=n*j;g[44]=k;o=k}g[184]=+h[4213]+(l-(b+-1.0)/+(d<<1|0));g[44]=+h[4214]+(o-(f+-1.0)/+(i<<1|0));return}function lh(){var b=0;if((a[14080]&1)==0){return}cM[c[(c[3524]|0)+168>>2]&511](5);do{if((a[33512]&1)==0){cS[c[(c[3524]|0)+44>>2]&511]();a[14088]=0}else{c[8415]=(c[8415]|0)+1;if((a[33656]&1)==0){break}do{if((a[33672]&1)==0){b=(c[8420]|0)+1|0;c[8420]=b;if((b|0)!=(c[8417]|0)){break}c[8420]=0;b=(c[8419]|0)+1|0;c[8419]=b;if((b|0)!=(c[8416]|0)){break}c[8420]=0}else{b=(c[8419]|0)+1|0;c[8419]=b;if((b|0)!=(c[8416]|0)){break}c[8419]=0;b=(c[8420]|0)+1|0;c[8420]=b;if((b|0)!=(c[8417]|0)){break}c[8420]=0}}while(0);lg()}}while(0);aD(c[10030]|0);hN(c[8494]|0,c[8492]|0,27760,27744,27752,27736);hM();hW();return}function li(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0;d=i;e=ut(150)|0;do{if((e|0)==0){gk();f=ut(150)|0;if((f|0)!=0){g=f;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=146952,v)|0)}else{g=e}}while(0);e=c[3526]|0;f=(e|0)!=0?e:c[10030]|0;c[8248]=f;if((b|0)>0){j=0;k=43312;l=f}else{n=f;o=aD(n|0)|0;uu(g);i=d;return}L14377:while(1){f=c[k>>2]|0;cf(l|0,144784,(v=i,i=i+16|0,c[v>>2]=j,c[v+8>>2]=b,v)|0);e=c[f+16>>2]|0;do{if((e|0)!=0){if((a[e]|0)==0){break}p=uA(e|0)<<1;q=ut(p)|0;if((q|0)==0){gk();r=ut(p)|0;if((r|0)==0){s=10562;break L14377}else{t=r}}else{t=q}q=t;r=e;while(1){p=a[r]|0;if(p<<24>>24==10){u=q+1|0;a[q]=92;a[u]=110;w=u}else{a[q]=p;w=q}if((a[r]|0)==0){break}else{q=w+1|0;r=r+1|0}}cf(c[8248]|0,15e4,(v=i,i=i+8|0,c[v>>2]=t,v)|0);uu(t)}}while(0);e=f+12|0;r=c[e>>2]|0;do{if((r|0)==368){q=c[c[f+224>>2]>>2]|0;if((q|0)==0){break}else{x=q}do{q=c[x+60>>2]|0;p=uA(q|0)<<1;u=ut(p)|0;if((u|0)==0){gk();y=ut(p)|0;if((y|0)==0){s=10573;break L14377}else{z=y}}else{z=u}u=z;y=q;while(1){q=a[y]|0;if(q<<24>>24==10){p=u+1|0;a[u]=92;a[p]=110;A=p}else{a[u]=q;A=u}if((a[y]|0)==0){break}else{u=A+1|0;y=y+1|0}}le(+h[x+24>>3],2,g);le(+h[x+32>>3],1,g);le(+h[x+40>>3],0,g);cf(c[8248]|0,171376,(v=i,i=i+8|0,c[v>>2]=z,v)|0);uu(z);x=c[x>>2]|0;}while((x|0)!=0)}else if((r|0)==1|(r|0)==18|(r|0)==33|(r|0)==64|(r|0)==225|(r|0)==400){if((a[46752]&1)!=0){y=c[f+260>>2]|0;L14410:do{if((y|0)==0){s=10584}else{u=f+252|0;q=0;p=y;while(1){B=c[8248]|0;if((q|0)>=(c[u>>2]|0)){C=B;break L14410}D=p+8|0;E=c[D>>2]|0;cf(B|0,141688,(v=i,i=i+16|0,c[v>>2]=q,c[v+8>>2]=E,v)|0);if((c[e>>2]|0)==225){E=c[(c[p>>2]|0)+12>>2]|0;B=c[8248]|0;aI(139920,24,1,B|0);F=E}else{F=0}aI(175152,6,1,c[8248]|0);if((c[D>>2]|0)>0){E=c[p+12>>2]|0;B=F;G=0;while(1){H=E+8|0;le(+h[H>>3],2,g);I=E+16|0;le(+h[I>>3],1,g);J=E+24|0;le(+h[J>>3],0,g);K=c[e>>2]|0;if((K|0)==225){le(+h[B+8>>3]- +h[H>>3],2,g);le(+h[B+16>>3]- +h[I>>3],1,g);le(+h[B+24>>3]- +h[J>>3],0,g);L=B+64|0}else if((K|0)==400){cf(c[8248]|0,184536,(v=i,i=i+8|0,h[v>>3]=+h[E+32>>3],v)|0);L=B}else{L=B}K=c[E>>2]|0;if((K|0)==0){M=105}else{M=(K|0)==1?111:117}cf(c[8248]|0,137904,(v=i,i=i+8|0,c[v>>2]=M,v)|0);K=G+1|0;if((K|0)<(c[D>>2]|0)){E=E+64|0;B=L;G=K}else{break}}}G=c[p>>2]|0;if((G|0)==0){s=10584;break}else{q=q+1|0;p=G}}}}while(0);if((s|0)==10584){s=0;C=c[8248]|0}aF(10,C|0)}if((c[11690]|0)==0){break}y=c[f+256>>2]|0;if((y|0)==0){break}else{N=0;O=y}while(1){y=c[O+44>>2]|0;p=c[O+4>>2]|0;if((a[O+8|0]|0)==0){P=N}else{q=c[8248]|0;u=N+1|0;G=O+9|0;cf(q|0,136176,(v=i,i=i+16|0,c[v>>2]=N,c[v+8>>2]=G,v)|0);P=u}if((y|0)>0){u=y;y=p;while(1){p=u-1|0;le(+h[y+8>>3],2,g);le(+h[y+16>>3],1,g);le(+h[y+24>>3],0,g);aF(10,c[8248]|0);if((p|0)>0){u=p;y=y+64|0}else{break}}}aF(10,c[8248]|0);y=c[O>>2]|0;if((y|0)==0){break}else{N=P;O=y}}}else{aI(143080,53,1,c[m>>2]|0)}}while(0);e=j+1|0;r=c[8248]|0;if((e|0)<(b|0)){j=e;k=f|0;l=r}else{n=r;s=10608;break}}if((s|0)==10562){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=134528,v)|0)}else if((s|0)==10608){o=aD(n|0)|0;uu(g);i=d;return}else if((s|0)==10573){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=134528,v)|0)}}function lj(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;e=(b|0)==0;if((c[8244]|0)==(b|0)&(e^1)){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=141656,v)|0)}if((a[33512]&1)!=0){f=c[m>>2]|0;aI(139872,46,1,f|0);i=d;return}f=c[3524]|0;do{if((f|0)!=0){if((a[14080]&1)==0){break}cS[c[f+40>>2]&511]();a[14080]=0;c[10028]=0}}while(0);if(e){a[33072]=0;if((c[8244]|0)==0){i=d;return}e=c[10030]|0;do{if(a[32984]|0){a2(e|0);a[32984]=0}else{if((e|0)==(c[10028]|0)){break}az(e|0)}}while(0);c[10030]=c[n>>2];uu(c[8244]|0);c[8244]=0;e=c[10028]|0;if((e|0)!=0){az(e|0)}c[10028]=0;i=d;return}do{if((a[b]|0)==124){if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=bt(b+1|0,137896)|0;if((e|0)==0){uj(c[13898]|0,136136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{a[32984]=1;g=e;break}}else{e=c[3524]|0;do{if((e|0)==0){h=10634}else{if((c[e+96>>2]&4|0)==0){h=10634;break}j=bF(b|0,134520)|0}}while(0);if((h|0)==10634){j=bF(b|0,137896)|0}if((j|0)!=0){g=j;break}uj(c[13898]|0,132784,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);a[33072]=0;if((c[8244]|0)!=0){j=c[10030]|0;do{if(a[32984]|0){a2(j|0);a[32984]=0}else{if((j|0)==(c[10028]|0)){break}az(j|0)}}while(0);c[10030]=c[n>>2];uu(c[8244]|0);c[8244]=0;j=c[10028]|0;if((j|0)!=0){az(j|0)}c[10028]=0}c[10030]=g;c[8244]=b;b=c[3524]|0;if((b|0)==0){k=0}else{k=(c[b+96>>2]|0)>>>2&1}a[33072]=k;i=d;return}function lk(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;d=c[3524]|0;if((d|0)==0){uf(-1,131560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=c[8244]|0;L14513:do{if((e|0)!=0){do{if((c[d+96>>2]&64|0)==0){f=e}else{if((a[37400]&1)==0){g=e}else{h=c[m>>2]|0;cf(h|0,130376,(v=i,i=i+8|0,c[v>>2]=e,v)|0);g=c[8244]|0}a[33072]=0;if((g|0)==0){break L14513}h=c[10030]|0;do{if(a[32984]|0){a2(h|0);a[32984]=0}else{if((h|0)==(c[10028]|0)){break}az(h|0)}}while(0);c[10030]=c[n>>2];uu(c[8244]|0);c[8244]=0;h=c[10028]|0;if((h|0)==0){c[10028]=0;break L14513}else{az(h|0);h=c[8244]|0;c[10028]=0;if((h|0)==0){break L14513}else{f=h;break}}}}while(0);h=(a[33072]&1)==0;if((c[(c[3524]|0)+96>>2]&4|0)==0){if(h){break}}else{if(!h){break}}h=(uA(f|0)|0)+1|0;j=ut(h)|0;do{if((j|0)==0){gk();k=ut(h)|0;if((k|0)!=0){l=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=129080,v)|0)}else{l=j}}while(0);j=c[8244]|0;uB(l|0,j|0);lj(l);if((l|0)==(c[8244]|0)|(l|0)==0){break}uu(l)}}while(0);if((a[14080]&1)!=0){i=b;return}cS[c[(c[3524]|0)+36>>2]&511]();a[14080]=1;i=b;return}function ll(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0.0,ai=0,aj=0,ak=0,al=0,am=0.0,an=0,ao=0,ap=0,aq=0,ar=0,as=0.0,at=0,au=0,av=0.0,aw=0.0,ax=0,ay=0.0,az=0,aA=0,aB=0,aC=0.0;b=i;i=i+208|0;d=b|0;e=b+24|0;f=b+48|0;j=b+72|0;k=b+96|0;l=b+120|0;m=b+144|0;n=b+168|0;o=b+192|0;p=b+200|0;c[13898]=(c[13898]|0)+1;if((a[33512]&1)!=0){lm()}if((a[14080]&1)==0){lk()}do{if(a[14088]|0){if((a[33512]&1)==0){break}if(!(a[13032]|0)){break}q=c[(c[3524]|0)+104>>2]|0;if((q|0)!=0){cS[q&511]()}a[13032]=0}else{cS[c[(c[3524]|0)+52>>2]&511]();a[14088]=1}}while(0);cM[c[(c[3524]|0)+168>>2]&511](0);q=c[3524]|0;if((c[q+96>>2]&16|0)!=0){c[7271]=-1}c[13880]=0;c[13881]=(c[q+8>>2]|0)-1;c[13882]=0;c[13883]=(c[q+12>>2]|0)-1;a[33656]=0;c[8415]=0;a[33936]=0;q=c[13898]|0;r=c[8272]|0;L14563:do{if((q|0)<(r|0)){s=m|0;t=m+8|0;u=j|0;w=j+8|0;x=f|0;y=f+8|0;z=e|0;A=e+8|0;B=d|0;C=d+8|0;D=l|0;E=l+8|0;F=k|0;G=k+8|0;H=n|0;I=n+8|0;J=q;K=r;L14565:while(1){L=c[1054]|0;M=(a[L+(J*40&-1)|0]&1)==0;N=c[L+(J*40&-1)+36>>2]|0;O=L+(J*40&-1)+32|0;L14567:do{if(M){P=c[O>>2]|0;Q=10719}else{R=c[10036]|0;S=0;while(1){if((S|0)>=(N|0)){Q=10700;break}if((a[R+((c[O>>2]|0)+S|0)|0]|0)==(a[S+103664|0]|0)){S=S+1|0}else{break}}if((Q|0)==10700){Q=0;if((S|0)==1){break L14563}}R=c[O>>2]|0;if(!((N|0)>0&(M^1))){P=R;Q=10719;break}T=c[10036]|0;U=0;V=0;W=R;while(1){if((a[U+125568|0]|0)==(a[T+(U+W|0)|0]|0)){X=W;Y=V}else{if((U|0)!=2){P=R;Q=10719;break L14567}X=W-1|0;Y=1}Z=U+1|0;if((Z|0)<(Y+N|0)){U=Z;V=Y;W=X}else{break}}if((Y|0)==0){if(!((U|0)==5|(U|0)==1)){P=R;Q=10719;break}}W=J+1|0;c[13898]=W;if((W|0)>=(K|0)){break}L14588:do{if((a[L+(W*40&-1)|0]&1)!=0){V=c[L+(W*40&-1)+36>>2]|0;T=L+(W*40&-1)+32|0;S=c[10036]|0;Z=0;while(1){if((Z|0)>=(V|0)){break}if((a[S+((c[T>>2]|0)+Z|0)|0]|0)==(a[Z+103664|0]|0)){Z=Z+1|0}else{break L14588}}if((Z|0)==1){break L14567}}}while(0);a[14176]=1;is(n);a[14176]=0;if((c[H>>2]|0)!=3){c[13898]=W;break}R=c[I>>2]|0;if((R|0)==0){break}uu(c[8453]|0);c[8453]=R}}while(0);L14599:do{if((Q|0)==10719){Q=0;L14601:do{if((K|0)>(J|0)){if(M){Q=10765;break}O=c[10036]|0;R=0;while(1){if((R|0)>=(N|0)){break}if((a[O+(P+R|0)|0]|0)==(a[R+124352|0]|0)){R=R+1|0}else{Q=10735;break L14601}}if((R|0)!=4){Q=10735;break}Z=J+1|0;c[13898]=Z;if((Z|0)>=(K|0)){break L14599}L14610:do{if((a[L+(Z*40&-1)|0]&1)!=0){U=c[L+(Z*40&-1)+36>>2]|0;T=L+(Z*40&-1)+32|0;S=0;while(1){if((S|0)>=(U|0)){break}if((a[O+((c[T>>2]|0)+S|0)|0]|0)==(a[S+103664|0]|0)){S=S+1|0}else{break L14610}}if((S|0)==1){break L14599}}}while(0);a[14176]=1;is(m);a[14176]=0;if((c[s>>2]|0)!=3){c[13898]=Z;break L14599}O=c[t>>2]|0;if((O|0)==0){break L14599}uu(c[8454]|0);c[8454]=O;break L14599}else{Q=10735}}while(0);L14621:do{if((Q|0)==10735){Q=0;if(M){Q=10765;break}do{if((N|0)>0){W=c[10036]|0;O=0;R=0;T=P;while(1){if((a[O+122880|0]|0)==(a[W+(O+T|0)|0]|0)){_=T;$=R}else{if((O|0)!=3){break}_=T-1|0;$=1}U=O+1|0;if((U|0)<($+N|0)){O=U;R=$;T=_}else{Q=10742;break}}do{if((Q|0)==10742){Q=0;if(($|0)==0){if(!((O|0)==2|(O|0)==8)){break}}a[33936]=0;c[13898]=J+1;break L14599}}while(0);if(M){Q=10765;break L14621}L14639:do{if((N|0)>0){O=c[10036]|0;T=0;R=0;W=P;while(1){if((a[T+121536|0]|0)==(a[O+(T+W|0)|0]|0)){ab=W;ac=R}else{if((T|0)!=5){break L14639}ab=W-1|0;ac=1}S=T+1|0;if((S|0)<(ac+N|0)){T=S;R=ac;W=ab}else{break}}if((ac|0)==0){if(!((T|0)==4|(T|0)==10)){break}}a[33936]=1;c[13898]=J+1;break L14599}}while(0);if(M){Q=10765;break L14621}if((N|0)<=0){break}W=c[10036]|0;R=0;O=0;S=P;while(1){if((a[R+119784|0]|0)==(a[W+(R+S|0)|0]|0)){ad=S;ae=O}else{if((R|0)!=3){Q=10765;break L14621}ad=S-1|0;ae=1}af=R+1|0;if((af|0)<(ae+N|0)){R=af;O=ae;S=ad}else{break}}do{if((ae|0)!=0|(af|0)==3){if((a[33656]&1)!=0){Q=10925;break L14565}}else{S=(a[33656]&1)!=0;if((af|0)==7){if(S){Q=10926;break L14565}else{break}}else{if(S){break L14621}else{Q=10920;break L14565}}}}while(0);a[33656]=1;ag=J+1|0;c[13898]=ag;if((ag|0)>=(K|0)){Q=10923;break L14565}L14669:do{if((a[L+(ag*40&-1)|0]&1)!=0){S=c[L+(ag*40&-1)+36>>2]|0;O=L+(ag*40&-1)+32|0;R=c[10036]|0;W=0;while(1){if((W|0)>=(S|0)){break}if((a[R+((c[O>>2]|0)+W|0)|0]|0)==(a[W+103664|0]|0)){W=W+1|0}else{break L14669}}if((W|0)==1){Q=10924;break L14565}}}while(0);O=is(l)|0;R=c[O>>2]|0;if((R|0)==1){ah=+(c[O+8>>2]|0)}else if((R|0)==2){ah=+h[O+8>>3]}else if((R|0)==3){ah=+uz(c[O+8>>2]|0,0)}else{Q=10781;break L14565}if((c[D>>2]|0)==3){uu(c[E>>2]|0);c[D>>2]=1}c[8416]=~~ah;ai=c[13898]|0;O=c[8272]|0;if((ai|0)>=(O|0)){Q=10939;break L14565}R=c[1054]|0;S=(a[R+(ai*40&-1)|0]&1)==0;if(S){Q=10934;break L14565}T=c[R+(ai*40&-1)+36>>2]|0;U=R+(ai*40&-1)+32|0;V=c[10036]|0;aj=0;while(1){if((aj|0)>=(T|0)){Q=10789;break}if((a[V+((c[U>>2]|0)+aj|0)|0]|0)==(a[aj+103664|0]|0)){aj=aj+1|0}else{Q=10790;break}}if((Q|0)==10790){Q=0;if(S){Q=10935;break L14565}}else if((Q|0)==10789){Q=0;if((aj|0)==1|S){Q=10936;break L14565}}U=c[R+(ai*40&-1)+36>>2]|0;V=R+(ai*40&-1)+32|0;T=c[10036]|0;ak=0;while(1){if((ak|0)>=(U|0)){break}if((a[T+((c[V>>2]|0)+ak|0)|0]|0)==(a[ak+148464|0]|0)){ak=ak+1|0}else{Q=10937;break L14565}}if((ak|0)!=1){Q=10938;break L14565}al=ai+1|0;c[13898]=al;if((al|0)>=(O|0)){Q=10929;break L14565}L14699:do{if((a[R+(al*40&-1)|0]&1)!=0){V=c[R+(al*40&-1)+36>>2]|0;U=R+(al*40&-1)+32|0;S=0;while(1){if((S|0)>=(V|0)){break}if((a[T+((c[U>>2]|0)+S|0)|0]|0)==(a[S+103664|0]|0)){S=S+1|0}else{break L14699}}if((S|0)==1){Q=10930;break L14565}}}while(0);T=is(k)|0;R=c[T>>2]|0;if((R|0)==2){am=+h[T+8>>3]}else if((R|0)==3){am=+uz(c[T+8>>2]|0,0)}else if((R|0)==1){am=+(c[T+8>>2]|0)}else{Q=10807;break L14565}if((c[F>>2]|0)==3){uu(c[G>>2]|0);c[F>>2]=1}c[8417]=~~am;h[4215]=+g[178];h[4216]=+g[38];h[4217]=+g[184];h[4218]=+g[44];c[8419]=0;c[8420]=0;break L14599}}while(0);if((a[33656]&1)==0){Q=10922;break L14565}}}while(0);if((Q|0)==10765){Q=0;if((a[33656]&1)==0){Q=10921;break L14565}}Z=(N|0)>0;T=c[10036]|0;R=23840;O=119784;L14718:while(1){L14720:do{if(!M){if(Z){ak=0;U=0;V=P;while(1){W=a[O+ak|0]|0;if(W<<24>>24==(a[T+(ak+V|0)|0]|0)){an=V;ao=U}else{if(W<<24>>24!=36){break L14720}an=V-1|0;ao=1}ap=ak+1|0;if((ap|0)<(ao+N|0)){ak=ap;U=ao;V=an}else{break}}if((ao|0)==0){aq=ap}else{ar=R;break L14718}}else{aq=0}V=a[O+aq|0]|0;if((V<<24>>24|0)==36|(V<<24>>24|0)==0){ar=R;break L14718}}}while(0);V=R+8|0;U=c[V>>2]|0;if((U|0)==0){ar=V;break}else{R=V;O=U}}O=c[ar+4>>2]|0;if((O|0)==1){a[33672]=1;c[13898]=J+1;break}else if((O|0)==6){c[13898]=J+1;R=is(e)|0;T=c[R>>2]|0;if((T|0)==1){as=+(c[R+8>>2]|0)}else if((T|0)==2){as=+h[R+8>>3]}else if((T|0)==3){as=+uz(c[R+8>>2]|0,0)}else{Q=10865;break L14565}if((c[z>>2]|0)==3){uu(c[A>>2]|0);c[z>>2]=1}h[4213]=as;h[4214]=as;R=c[13898]|0;T=c[8272]|0;if((R|0)>=(T|0)){break}Z=c[1054]|0;U=(a[Z+(R*40&-1)|0]&1)==0;if(U){break}V=c[Z+(R*40&-1)+36>>2]|0;ak=Z+(R*40&-1)+32|0;W=c[10036]|0;aj=0;while(1){if((aj|0)>=(V|0)){Q=10873;break}if((a[W+((c[ak>>2]|0)+aj|0)|0]|0)==(a[aj+103664|0]|0)){aj=aj+1|0}else{Q=10874;break}}if((Q|0)==10873){Q=0;if((aj|0)==1|U){break}}else if((Q|0)==10874){Q=0;if(U){break}}ak=c[Z+(R*40&-1)+36>>2]|0;W=Z+(R*40&-1)+32|0;V=c[10036]|0;at=0;while(1){if((at|0)>=(ak|0)){break}if((a[V+((c[W>>2]|0)+at|0)|0]|0)==(a[at+148464|0]|0)){at=at+1|0}else{break L14599}}if((at|0)!=1){break}au=R+1|0;c[13898]=au;if((au|0)>=(T|0)){Q=10927;break L14565}L14759:do{if((a[Z+(au*40&-1)|0]&1)!=0){W=c[Z+(au*40&-1)+36>>2]|0;ak=Z+(au*40&-1)+32|0;U=0;while(1){if((U|0)>=(W|0)){break}if((a[V+((c[ak>>2]|0)+U|0)|0]|0)==(a[U+103664|0]|0)){U=U+1|0}else{break L14759}}if((U|0)==1){Q=10928;break L14565}}}while(0);V=is(d)|0;Z=c[V>>2]|0;if((Z|0)==1){av=+(c[V+8>>2]|0)}else if((Z|0)==2){av=+h[V+8>>3]}else if((Z|0)==3){av=+uz(c[V+8>>2]|0,0)}else{Q=10890;break L14565}if((c[B>>2]|0)==3){uu(c[C>>2]|0);c[B>>2]=1}h[4214]=av;break}else if((O|0)==2){a[33672]=0;c[13898]=J+1;break}else if((O|0)==4){a[33673]=1;c[13898]=J+1;break}else if((O|0)==5){a[33673]=0;c[13898]=J+1;break}else if((O|0)==3){c[13898]=J+1;V=is(j)|0;Z=c[V>>2]|0;if((Z|0)==1){aw=+(c[V+8>>2]|0)}else if((Z|0)==2){aw=+h[V+8>>3]}else if((Z|0)==3){aw=+uz(c[V+8>>2]|0,0)}else{Q=10832;break L14565}if((c[u>>2]|0)==3){uu(c[w>>2]|0);c[u>>2]=1}h[4211]=aw;h[4212]=aw;V=c[13898]|0;Z=c[8272]|0;if((V|0)>=(Z|0)){break}T=c[1054]|0;R=(a[T+(V*40&-1)|0]&1)==0;if(R){break}at=c[T+(V*40&-1)+36>>2]|0;ak=T+(V*40&-1)+32|0;W=c[10036]|0;aj=0;while(1){if((aj|0)>=(at|0)){Q=10840;break}if((a[W+((c[ak>>2]|0)+aj|0)|0]|0)==(a[aj+103664|0]|0)){aj=aj+1|0}else{Q=10841;break}}if((Q|0)==10840){Q=0;if((aj|0)==1|R){break}}else if((Q|0)==10841){Q=0;if(R){break}}ak=c[T+(V*40&-1)+36>>2]|0;W=T+(V*40&-1)+32|0;at=c[10036]|0;O=0;while(1){if((O|0)>=(ak|0)){break}if((a[at+((c[W>>2]|0)+O|0)|0]|0)==(a[O+148464|0]|0)){O=O+1|0}else{break L14599}}if((O|0)!=1){break}ax=V+1|0;c[13898]=ax;if((ax|0)>=(Z|0)){Q=10940;break L14565}L14801:do{if((a[T+(ax*40&-1)|0]&1)!=0){W=c[T+(ax*40&-1)+36>>2]|0;ak=T+(ax*40&-1)+32|0;R=0;while(1){if((R|0)>=(W|0)){break}if((a[at+((c[ak>>2]|0)+R|0)|0]|0)==(a[R+103664|0]|0)){R=R+1|0}else{break L14801}}if((R|0)==1){Q=10941;break L14565}}}while(0);at=is(f)|0;T=c[at>>2]|0;if((T|0)==2){ay=+h[at+8>>3]}else if((T|0)==3){ay=+uz(c[at+8>>2]|0,0)}else if((T|0)==1){ay=+(c[at+8>>2]|0)}else{Q=10857;break L14565}if((c[x>>2]|0)==3){uu(c[y>>2]|0);c[x>>2]=1}h[4212]=ay;break}else{Q=10894;break L14565}}}while(0);N=c[13898]|0;M=c[8272]|0;if((N|0)<(M|0)){J=N;K=M}else{break L14563}}if((Q|0)==10926){uf(J,116664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10927){uf(au,105736,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10928){uf(au,105736,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10894){uf(J,104688,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10920){uf(J,107656,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10921){uf(J,107656,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10922){uf(J,107656,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10923){uf(ag,115776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10924){uf(ag,115776,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10925){uf(J,116664,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10929){uf(al,109336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10930){uf(al,109336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10934){uf(ai,113800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10935){uf(ai,113800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10936){uf(ai,113800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10937){uf(ai,113800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10941){uf(ax,106712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10938){uf(ai,113800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10939){uf(ai,113800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10940){uf(ax,106712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10890){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10832){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10781){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10857){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10865){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==10807){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);a[33512]=1;Q=e6(104120)|0;if((Q|0)!=0){a[Q+8|0]=0;c[Q+16>>2]=1;c[Q+24>>2]=1}Q=c[8453]|0;if((Q|0)==0){h[4243]=0.0;lg();hM();i=b;return}fN(33896,o,p,103768);ax=c[3524]|0;ai=~~(+h[o>>3]+ +((c[ax+8>>2]|0)>>>1>>>0>>>0));o=~~(+h[p>>3]+ +(((c[ax+12>>2]|0)-(c[ax+16>>2]|0)|0)>>>0>>>0));p=a[33936]&1;do{if(p<<24>>24==0){az=ax}else{if((a[37456]&1)!=0){az=ax;break}a[37456]=1;al=c[ax+88>>2]|0;if((al|0)==0){az=ax;break}cO[al&255](179864);az=c[3524]|0}}while(0);a[37456]=p;fn(33824,az);ln(ai,o,c[8453]|0,1,0,0,c[8454]|0);if((c[8456]|0)!=0){cM[c[(c[3524]|0)+64>>2]&511](-2)}a[37456]=0;o=Q;Q=1;while(1){ai=a[o]|0;if((ai<<24>>24|0)==0){break}else if((ai<<24>>24|0)==10){aA=Q+1|0}else{aA=Q}o=o+1|0;Q=aA}aA=c[8454]|0;do{if((aA|0)==0){aB=0}else{if((a[aA]|0)==0){aB=aA;break}o=c[(c[3524]|0)+88>>2]|0;if((o|0)==0){aB=aA;break}cO[o&255](aA);aB=c[8454]|0}}while(0);aA=c[3524]|0;ay=+(aa(c[aA+16>>2]|0,Q)>>>0>>>0);aw=ay/+((c[aA+12>>2]|0)>>>0>>>0);h[4243]=aw;do{if((aB|0)==0){aC=aw}else{if((a[aB]|0)==0){aC=aw;break}Q=c[aA+88>>2]|0;if((Q|0)==0){aC=aw;break}cO[Q&255](179864);aC=+h[4243]}}while(0);if(aC<=.9){lg();hM();i=b;return}h[4243]=.05;lg();hM();i=b;return}function lm(){var b=0;if((a[33512]&1)==0){return}if(a[13032]|0){b=c[(c[3524]|0)+104>>2]|0;if((b|0)!=0){cS[b&511]()}a[13032]=0}a[33512]=0;b=e6(104120)|0;if((b|0)!=0){a[b+8|0]=0;c[b+16>>2]=1;c[b+24>>2]=0}if((a[33656]&1)!=0){g[178]=+h[4215];g[38]=+h[4216];g[184]=+h[4217];g[44]=+h[4218]}a[33656]=0;h[4212]=1.0;h[4211]=1.0;uE(33704,0,16);b=c[8453]|0;if((b|0)!=0){uu(b);c[8453]=0}lh();hM();return}function ln(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;j=c[3524]|0;if((e|0)==0){return}k=(i|0)!=0;do{if(k){if((a[i]|0)==0){break}l=c[j+88>>2]|0;if((l|0)==0){break}cO[l&255](i)}}while(0);do{if((g|0)==0){m=b;n=e;o=d;p=j+16|0}else{l=a[e]|0;if(l<<24>>24==0){q=e;r=0}else{s=e;t=0;u=l;while(1){l=s+1|0;v=(u<<24>>24==10&1)+t|0;w=a[l]|0;if(w<<24>>24==0){q=l;r=v;break}else{s=l;t=v;u=w}}}u=aa(r,g);t=j+16|0;s=aa(u,c[t>>2]|0)>>>1;if((h|0)==0){m=b;n=q;o=s+d|0;p=t;break}else{m=b-s|0;n=q;o=d;p=t;break}}}while(0);d=j+76|0;q=j+20|0;b=(h|0)==0;g=j+68|0;r=m;m=n;n=o;o=e;while(1){do{if((o|0)==0){x=m}else{e=a8(o|0,10)|0;if((e|0)==0){x=0;break}a[e]=0;x=e}}while(0);do{if((cO[c[d>>2]&255](f)|0)==0){e=aa(c[q>>2]|0,f);t=aa(e,lp(o)|0)>>>1;if(b){e=r-t|0;s=c[3524]|0;if((c[s+96>>2]&128|0)==0){if((e|0)<=0){break}if(!((c[s+8>>2]|0)>>>0>e>>>0&(n|0)>0)){break}if((c[s+12>>2]|0)>>>0<=n>>>0){break}}cR[c[g>>2]&127](e,n,o);break}else{e=n-t|0;t=c[3524]|0;if((c[t+96>>2]&128|0)==0){if((r|0)<=0){break}if(!((c[t+8>>2]|0)>>>0>r>>>0&(e|0)>0)){break}if((c[t+12>>2]|0)>>>0<=e>>>0){break}}cR[c[g>>2]&127](r,e,o);break}}else{e=c[3524]|0;if((c[e+96>>2]&128|0)==0){if((r|0)<=0){break}if(!((c[e+8>>2]|0)>>>0>r>>>0&(n|0)>0)){break}if((c[e+12>>2]|0)>>>0<=n>>>0){break}}cR[c[g>>2]&127](r,n,o)}}while(0);do{if((h|0)==(-270|0)|(h|0)==90){y=(c[p>>2]|0)+r|0;z=n}else{e=c[p>>2]|0;if((h|0)==(-90|0)|(h|0)==270){y=r-e|0;z=n;break}else{y=r;z=n-e|0;break}}}while(0);if((x|0)==0){break}a[x]=10;r=y;m=x;n=z;o=x+1|0}if(!k){return}if((a[i]|0)==0){return}i=c[j+88>>2]|0;if((i|0)==0){return}cO[i&255](179864);return}function lo(){var b=0;c[8026]=0;if((a[14080]&1)==0){return}if(a[13032]|0){b=c[(c[3524]|0)+104>>2]|0;if((b|0)!=0){cS[b&511]()}a[13032]=0}if(a[14088]|0){cS[c[(c[3524]|0)+44>>2]&511]();a[14088]=0}if((a[14080]&1)==0){return}cS[c[(c[3524]|0)+40>>2]&511]();a[14080]=0;c[10028]=0;return}function lp(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=c[3524]|0;e=c[d+96>>2]|0;if((e&8192|0)==0){do{if((a8(b|0,10)|0)==0){if((e&32|0)!=0){break}if((c[11252]|0)!=15){f=uA(b|0)|0;return f|0}g=a[b]|0;if(g<<24>>24==0){f=0;return f|0}else{h=0;i=0;j=g}while(1){if((j&-64)<<24>>24==-128){k=i}else{k=((j&255)>226?2:1)+i|0}g=h+1|0;l=a[b+g|0]|0;if(l<<24>>24==0){f=k;break}else{h=g;i=k;j=l}}return f|0}}while(0);c[3524]=238024;cR[c[59523]&127](0,0,b);j=c[(c[3524]|0)+8>>2]|0;c[3524]=d;f=j;return f|0}if((cy(b|0,203320)|0)==0){f=uA(b|0)|0;return f|0}j=a[b]|0;if(j<<24>>24==0){f=0;return f|0}else{m=b;n=0;o=j}L15011:while(1){j=m;b=o;L15013:while(1){d=b<<24>>24;L15015:do{if((d|0)==91){if(b<<24>>24==0){p=j}else{k=b;i=j;while(1){h=i+1|0;if(k<<24>>24==93){q=h;break L15015}e=a[h]|0;if(e<<24>>24==0){p=h;break}else{k=e;i=h}}}q=p+1|0}else if((d|0)==92){r=j;s=11030;break L15013}else if((d|0)==123|(d|0)==125|(d|0)==36|(d|0)==95|(d|0)==94){q=j+1|0}else{s=11034;break L15013}}while(0);d=a[q]|0;if(d<<24>>24==0){f=n;s=11046;break L15011}else{j=q;b=d}}L15024:do{if((s|0)==11030){while(1){s=0;b=r+1|0;d=a[b]|0;if(d<<24>>24==0){t=b;break L15024}if((bO(d<<24>>24|0)|0)==0){t=b;break}else{r=b;s=11030}}}else if((s|0)==11034){s=0;t=j+1|0}}while(0);j=n+1|0;b=a[t]|0;if(b<<24>>24==0){f=j;s=11049;break}else{m=t;n=j;o=b}}if((s|0)==11049){return f|0}else if((s|0)==11046){return f|0}return 0}function lq(a,b,d,e,f,g){a=a|0;b=b|0;d=+d;e=+e;f=+f;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;h=i;i=i+3048|0;j=h|0;k=h+8|0;l=h+16|0;m=h+24|0;n=h+32|0;o=h+3032|0;p=h+3040|0;if(e<0.0){q=e;while(1){r=q+360.0;if(r<0.0){q=r}else{s=r;break}}}else{s=e}if(f>360.0){e=f;while(1){q=e+-360.0;if(q>360.0){e=q}else{t=q;break}}}else{t=f}if(t>2]|0)>>>0>>>0)/+((c[v+28>>2]|0)>>>0>>>0);v=n|0;c[n+8>>2]=g;e=+(a>>>0>>>0);q=+(b>>>0>>>0);if((w|0)>0){x=0;y=0;while(1){r=(s+ +(x|0)*3.0)*.017453292519943295;z=n+(y*12&-1)|0;c[z>>2]=~~(e+ +S(+r)*d);A=n+(y*12&-1)+4|0;c[A>>2]=~~(q+f*+T(+r)*d);c[o>>2]=a;c[p>>2]=b;B=((fl(o,p,z,A)|0)!=0&1)+y|0;A=x+1|0;if((A|0)<(w|0)){x=A;y=B}else{C=B;break}}}else{C=0}s=u*.017453292519943295;y=n+(C*12&-1)|0;c[y>>2]=~~(e+ +S(+s)*d);x=n+(C*12&-1)+4|0;c[x>>2]=~~(q+f*+T(+s)*d);w=(((fl(o,p,y,x)|0)==0)<<31>>31)+C|0;d=+P(+t);if(d>.1&d<359.9){C=w+1|0;c[n+(C*12&-1)>>2]=a;c[n+(C*12&-1)+4>>2]=b;b=w+2|0;c[n+(b*12&-1)>>2]=c[n>>2];c[n+(b*12&-1)+4>>2]=c[n+4>>2];D=b}else{D=w}if((g|0)!=0){g=c[(c[3524]|0)+148>>2]|0;if((g|0)==0){i=h;return}cN[g&255](D+1|0,v);i=h;return}if((D|0)<=0){i=h;return}v=0;while(1){g=c[n+(v*12&-1)+4>>2]|0;w=v+1|0;b=c[n+(w*12&-1)>>2]|0;C=c[n+(w*12&-1)+4>>2]|0;c[j>>2]=c[n+(v*12&-1)>>2];c[k>>2]=g;c[l>>2]=b;c[m>>2]=C;C=c[3524]|0;if((fl(j,k,l,m)|0)!=0){cN[c[C+56>>2]&255](c[j>>2]|0,c[k>>2]|0);cN[c[C+60>>2]&255](c[l>>2]|0,c[m>>2]|0)}if((w|0)<(D|0)){v=w}else{break}}i=h;return}function lr(a,b){a=a|0;b=b|0;return uK(c[6224+((c[a>>2]|0)*184&-1)>>2]|0,c[6224+((c[b>>2]|0)*184&-1)>>2]|0)|0}function ls(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0;a=i;i=i+152|0;b=a|0;d=ut(1024)|0;do{if((d|0)==0){gk();e=ut(1024)|0;if((e|0)!=0){f=e;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=75488,v)|0)}else{f=d}}while(0);d=0;do{c[b+(d<<2)>>2]=d;d=d+1|0;}while(d>>>0<37);bM(b|0,37,4,2);gq();uD(f|0,75064,28);d=c[8250]|0;if((d|0)==(c[m>>2]|0)){if((c[8238]|0)<((c[6318]|0)-2|0)){g=d}else{aI(125440,23,1,d|0);do{e=a1(c[o>>2]|0)|0}while(!((e|0)==(-1|0)|(e|0)==10));c[8238]=0;g=c[m>>2]|0}aK(f|0,g|0);c[8238]=(c[8238]|0)+1;h=0}else{aK(f|0,d|0);h=0}do{d=c[b+(h<<2)>>2]|0;g=c[6228+(d*184&-1)>>2]|0;be(f|0,74576,(v=i,i=i+16|0,c[v>>2]=c[6224+(d*184&-1)>>2],c[v+8>>2]=g,v)|0);g=c[8250]|0;if((g|0)==(c[m>>2]|0)){if((c[8238]|0)<((c[6318]|0)-2|0)){j=g}else{aI(125440,23,1,g|0);do{d=a1(c[o>>2]|0)|0}while(!((d|0)==(-1|0)|(d|0)==10));c[8238]=0;j=c[m>>2]|0}aK(f|0,j|0);c[8238]=(c[8238]|0)+1}else{aK(f|0,g|0)}h=h+1|0;}while(h>>>0<37);h=c[8250]|0;if((h|0)==(c[m>>2]|0)){uu(f);i=a;return}a2(h|0);uu(f);i=a;return}function lt(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+152|0;d=b|0;e=ut(555)|0;do{if((e|0)==0){gk();f=ut(555)|0;if((f|0)!=0){g=f;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=74144,v)|0);return 0}else{g=e}}while(0);e=0;do{c[d+(e<<2)>>2]=e;e=e+1|0;}while(e>>>0<37);bM(d|0,37,4,2);e=g;w=32;a[e]=w&255;w=w>>8;a[e+1|0]=w&255;e=0;f=uA(g|0)|0;do{be(g+f|0,73368,(v=i,i=i+8|0,c[v>>2]=c[6224+((c[d+(e<<2)>>2]|0)*184&-1)>>2],v)|0);e=e+1|0;f=uA(g|0)|0}while(e>>>0<37);e=f+1|0;f=ut(e)|0;if((f|0)!=0){h=f;j=uB(h|0,g|0)|0;uu(g);i=b;return h|0}gk();f=ut(e)|0;if((f|0)==0){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=72784,v)|0);return 0}else{h=f;j=uB(h|0,g|0)|0;uu(g);i=b;return h|0}return 0}function lu(a,b){a=+a;b=+b;return 0}function lv(a){a=a|0;return(a|0)==0&1|0}function lw(a){a=a|0;return(a|0)==0&1|0}function lx(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0;e=i;f=(a_(b|0,223552,d|0)|0)==0;g=f?3:d;d=f?222936:b;b=0;f=0;j=0;while(1){k=c[6224+(b*184&-1)>>2]|0;if((a_(d|0,k|0,g|0)|0)==0){l=6224+(b*184&-1)|0;if((g|0)==(uA(k|0)|0)){n=0;o=l;break}else{p=j|(f|0)!=0;q=l}}else{p=j;q=f}l=b+1|0;if(l>>>0<37){b=l;f=q;j=p}else{n=p;o=q;break}}if((o|0)==0|n){r=0;i=e;return r|0}c[3524]=o;a[14080]=0;if((c[o+48>>2]|0)==2){s=o}else{n=c[m>>2]|0;aI(222416,73,1,n|0);s=c[3524]|0}n=s+72|0;if((c[n>>2]|0)==0){c[n>>2]=12;t=c[3524]|0}else{t=s}s=t+76|0;if((c[s>>2]|0)==0){c[s>>2]=124;u=c[3524]|0}else{u=t}t=u+80|0;if((c[t>>2]|0)==0){c[t>>2]=60;w=c[3524]|0}else{w=u}u=w+84|0;if((c[u>>2]|0)==0){c[u>>2]=48;x=c[3524]|0}else{x=w}w=x+92|0;if((c[w>>2]|0)==0){c[w>>2]=10;y=c[3524]|0}else{y=x}x=y+112|0;if((c[x>>2]|0)==0){c[x>>2]=34;z=c[3524]|0}else{z=y}y=z+168|0;if((c[y>>2]|0)==0){c[y>>2]=144;A=c[3524]|0}else{A=z}z=A+176|0;if(+h[z>>3]<=0.0){h[z>>3]=1.0}if((a[37400]&1)!=0){z=c[m>>2]|0;y=c[A>>2]|0;cf(z|0,221648,(v=i,i=i+8|0,c[v>>2]=y,v)|0)}c[7271]=-1;r=o;i=e;return r|0}function ly(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=c[3524]|0;if((d|0)<0){cN[c[e+56>>2]&255](a,b);cN[c[e+60>>2]&255](a,b);return}f=(d|0)%6&-1;g=+h[1630];d=~~(g*+((c[e+28>>2]|0)>>>0>>>0)*.5);i=~~(g*+((c[e+24>>2]|0)>>>0>>>0)*.5);if((f|0)==0){j=e+56|0;k=a-d|0;cN[c[j>>2]&255](k,b);l=e+60|0;cN[c[l>>2]&255](k,b);cN[c[l>>2]&255](d+a|0,b);k=b-i|0;cN[c[j>>2]&255](a,k);cN[c[l>>2]&255](a,k);cN[c[l>>2]&255](a,i+b|0);return}else if((f|0)==3){l=e+56|0;k=a-d|0;j=b-i|0;cN[c[l>>2]&255](k,j);m=e+60|0;cN[c[m>>2]&255](k,j);n=d+a|0;cN[c[m>>2]&255](n,j);o=i+b|0;cN[c[m>>2]&255](n,o);cN[c[m>>2]&255](k,o);cN[c[m>>2]&255](k,j);cN[c[l>>2]&255](a,b);cN[c[m>>2]&255](a,b);return}else if((f|0)==2){m=e+56|0;l=a-d|0;cN[c[m>>2]&255](l,b);j=e+60|0;cN[c[j>>2]&255](l,b);k=d+a|0;cN[c[j>>2]&255](k,b);o=b-i|0;cN[c[m>>2]&255](a,o);cN[c[j>>2]&255](a,o);n=i+b|0;cN[c[j>>2]&255](a,n);cN[c[m>>2]&255](l,o);cN[c[j>>2]&255](l,o);cN[c[j>>2]&255](k,n);cN[c[m>>2]&255](l,n);cN[c[j>>2]&255](l,n);cN[c[j>>2]&255](k,o);return}else if((f|0)==4){o=e+56|0;k=a-d|0;cN[c[o>>2]&255](k,b);j=e+60|0;cN[c[j>>2]&255](a,b-i|0);cN[c[j>>2]&255](d+a|0,b);cN[c[j>>2]&255](a,i+b|0);cN[c[j>>2]&255](k,b);cN[c[o>>2]&255](a,b);cN[c[j>>2]&255](a,b);return}else if((f|0)==5){j=e+56|0;o=((i<<2|0)/3&-1)+b|0;cN[c[j>>2]&255](a,o);k=e+60|0;n=(d<<2|0)/3&-1;l=b-((i<<1|0)/3&-1)|0;cN[c[k>>2]&255](a-n|0,l);cN[c[k>>2]&255](n+a|0,l);cN[c[k>>2]&255](a,o);cN[c[j>>2]&255](a,b);cN[c[k>>2]&255](a,b);return}else if((f|0)==1){f=e+56|0;k=a-d|0;j=b-i|0;cN[c[f>>2]&255](k,j);o=e+60|0;cN[c[o>>2]&255](k,j);e=d+a|0;a=i+b|0;cN[c[o>>2]&255](e,a);cN[c[f>>2]&255](k,a);cN[c[o>>2]&255](k,a);cN[c[o>>2]&255](e,j);return}else{return}}function lz(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;b=i;i=i+24|0;d=b|0;e=c[13898]|0;if((e|0)>=(c[8272]|0)){f=lx(225016,7)|0;g=c[13898]|0;h=g-1|0;uf(h,224456,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}j=c[1054]|0;L15188:do{if((a[j+(e*40&-1)|0]&1)==0){k=c[10036]|0;l=c[j+(e*40&-1)+36>>2]|0;m=j+(e*40&-1)+32|0}else{n=c[j+(e*40&-1)+36>>2]|0;o=j+(e*40&-1)+32|0;p=c[10036]|0;q=0;while(1){if((q|0)>=(n|0)){break}if((a[p+((c[o>>2]|0)+q|0)|0]|0)==(a[q+103664|0]|0)){q=q+1|0}else{k=p;l=n;m=o;break L15188}}if((q|0)!=1){k=p;l=n;m=o;break}f=lx(225016,7)|0;g=c[13898]|0;h=g-1|0;uf(h,224456,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);e=lx(k+(c[m>>2]|0)|0,l)|0;l=c[13898]|0;L15197:do{if((e|0)==0){m=c[1054]|0;k=(a[m+(l*40&-1)|0]&1)==0;if(k){r=11176}else{j=c[10036]|0;s=a[j+(c[m+(l*40&-1)+32>>2]|0)|0]|0;if((s<<24>>24|0)==39|(s<<24>>24|0)==34){t=j}else{r=11176}}if((r|0)==11176){j=c[10810]|0;if((j|0)==0){r=11196;break}s=c[8272]|0;u=m+(l*40&-1)+36|0;w=m+(l*40&-1)+32|0;x=c[10036]|0;y=j;L15204:while(1){j=c[y+4>>2]|0;L15206:do{if(!((s|0)<=(l|0)|k)){z=c[u>>2]|0;A=0;while(1){if((A|0)>=(z|0)){break}if((a[x+((c[w>>2]|0)+A|0)|0]|0)==(a[j+A|0]|0)){A=A+1|0}else{break L15206}}if((a[j+A|0]|0)==0){break L15204}}}while(0);j=c[y>>2]|0;if((j|0)==0){r=11196;break L15197}else{y=j}}if((a[y+8|0]&1)!=0){r=11196;break}if((c[y+16>>2]|0)==3){t=x}else{r=11196;break}}L15216:do{if((l|0)<(c[8272]|0)){L15218:do{if(!k){w=c[m+(l*40&-1)+36>>2]|0;u=m+(l*40&-1)+32|0;s=0;while(1){if((s|0)>=(w|0)){break}if((a[t+((c[u>>2]|0)+s|0)|0]|0)==(a[s+103664|0]|0)){s=s+1|0}else{break L15218}}if((s|0)==1){B=0;break L15216}}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[d>>2]|0)==3){B=c[d+8>>2]|0;break}else{c[13898]=l;B=0;break}}else{B=0}}while(0);m=lx(B,uA(B|0)|0)|0;uu(B);C=m}else{r=11196}}while(0);if((r|0)==11196){c[13898]=l+1;C=e}if((C|0)==0){f=lx(225016,7)|0;g=c[13898]|0;h=g-1|0;uf(h,224456,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{i=b;return C|0}return 0}function lA(a){a=+a;return}function lB(a){a=a|0;return}function lC(a){a=+a;h[1630]=a>=0.0?a:1.0;return}function lD(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,R=0,V=0,W=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0.0,ar=0.0,as=0.0,at=0.0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0.0,aE=0.0,aF=0.0,aG=0,aH=0.0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0.0,aS=0.0,aT=0.0,aU=0.0,aV=0.0,aW=0.0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0;g=i;i=i+480|0;j=g|0;k=g+8|0;l=g+16|0;m=g+24|0;n=g+32|0;o=g+40|0;p=g+48|0;q=g+56|0;r=g+64|0;s=g+72|0;t=g+80|0;u=g+88|0;v=g+96|0;w=g+104|0;x=g+112|0;y=g+120|0;z=g+128|0;A=g+136|0;B=g+144|0;C=g+152|0;D=g+160|0;E=g+168|0;F=g+176|0;G=g+184|0;H=g+192|0;I=g+200|0;J=g+208|0;K=g+216|0;L=g+224|0;M=g+232|0;N=g+240|0;O=g+248|0;R=g+256|0;V=g+264|0;W=g+272|0;Z=g+280|0;_=g+288|0;$=g+296|0;aa=g+304|0;ab=g+312|0;ac=g+320|0;ad=g+328|0;ae=g+336|0;af=g+344|0;ag=g+352|0;ah=g+360|0;ai=g+368|0;aj=g+376|0;ak=g+384|0;al=g+392|0;am=g+400|0;an=g+408|0;ao=g+416|0;ap=c[3524]|0;aq=+(((c[ap+24>>2]|0)+(c[ap+28>>2]|0)|0)>>>0>>>0)*.5;ar=+(a-d|0);as=+(b-e|0);at=+Q(+(ar*ar+as*as));au=(f|0)<0?-f|0:f;av=c[13542]|0;aw=(c[ap+96>>2]&128|0)==0;ax=aw?55520:0;c[13542]=ax;do{if((f|0)==0){ay=0;az=0}else{L15241:do{if(+P(+at)<2.220446049250313e-16){aA=0;aB=0}else{aC=c[12910]|0;if((aC|0)<1){aD=aq;aE=aD*.3/at;aF=aD*2.0/at;aD=aF>.3?.3:aF;aF=aE>aD?aE:aD;aD=ar*.96593;aE=as*.25882;aG=~~((aD-aE)*aF);aH=as*.96593;aI=~~((ar*.25882+aH)*aF);aJ=~~((aD+aE)*aF);aK=~~((ar*-.25882+aH)*aF);aL=(aG+aJ|0)/2&-1;aM=(aI+aK|0)/2&-1;aN=aG;aO=aK;aP=aJ;aQ=aI}else{aF=+h[6458]*.017453292519943295;aH=+h[6457]*.017453292519943295;aE=+Y(+(-0.0-as),+(-0.0-ar));aD=+(aC|0);aR=at*.5;if(aD>aR){aS=aD/aR;aT=+X(+(+U(+aF)*aS));aU=aR;aV=+X(+(aS*+U(+aH)));aW=aT}else{aU=aD;aV=aH;aW=aF}aF=+T(+aW);aH=aF/+T(+aV);aF=aW-aE;aC=-~~(aU*+S(+aF))|0;aI=~~(aU*+T(+aF));aF=-0.0-aU;aD=aE+aW;aT=+S(+aD)*aF;aS=+T(+aD)*aF;aF=aU*aH;aH=aE+aV;aJ=~~(aT+aF*+S(+aH));aL=aJ;aM=~~(aS+aF*+T(+aH));aN=aC;aO=~~aS;aP=~~aT;aQ=aI}do{if((au&1|0)!=0){do{if((c[12912]|0)==2){if(aw){aI=(c[ax>>2]|0)>(d|0)&1;aC=(c[ax+4>>2]|0)<(d|0)?aI|2:aI;aI=(c[ax+8>>2]|0)>(e|0)?aC|4:aC;if((((c[ax+12>>2]|0)<(e|0)?aI|8:aI)|0)!=0){aX=ax;break}}aI=aL+d|0;c[ao>>2]=aI;aC=aM+e|0;c[ao+4>>2]=aC;c[ao+12>>2]=aN+d;c[ao+16>>2]=aQ+e;c[ao+24>>2]=d;c[ao+28>>2]=e;c[ao+36>>2]=aP+d;c[ao+40>>2]=aO+e;c[ao+48>>2]=aI;c[ao+52>>2]=aC;c[ao+8>>2]=1601;aC=c[ap+148>>2]|0;if((aC|0)==0){aX=ax;break}cN[aC&255](5,ao|0);aX=c[13542]|0}else{aX=ax}}while(0);if((aX|0)!=0){aC=(c[aX>>2]|0)>(d|0)&1;aI=(c[aX+4>>2]|0)<(d|0)?aC|2:aC;aC=(c[aX+8>>2]|0)>(e|0)?aI|4:aI;if((((c[aX+12>>2]|0)<(e|0)?aC|8:aC)|0)!=0){break}}if((c[12912]|0)==0){c[L>>2]=aN+d;c[M>>2]=aQ+e;c[N>>2]=d;c[O>>2]=e;aC=c[3524]|0;if((fl(L,M,N,O)|0)!=0){cN[c[aC+56>>2]&255](c[L>>2]|0,c[M>>2]|0);cN[c[aC+60>>2]&255](c[N>>2]|0,c[O>>2]|0)}c[H>>2]=d;c[I>>2]=e;c[J>>2]=aP+d;c[K>>2]=aO+e;aC=c[3524]|0;if((fl(H,I,J,K)|0)==0){break}cN[c[aC+56>>2]&255](c[H>>2]|0,c[I>>2]|0);cN[c[aC+60>>2]&255](c[J>>2]|0,c[K>>2]|0);break}aC=aL+d|0;aI=aM+e|0;aJ=aN+d|0;aK=aQ+e|0;c[ag>>2]=aC;c[ah>>2]=aI;c[ai>>2]=aJ;c[aj>>2]=aK;aG=c[3524]|0;if((fl(ag,ah,ai,aj)|0)!=0){cN[c[aG+56>>2]&255](c[ag>>2]|0,c[ah>>2]|0);cN[c[aG+60>>2]&255](c[ai>>2]|0,c[aj>>2]|0)}c[ac>>2]=aJ;c[ad>>2]=aK;c[ae>>2]=d;c[af>>2]=e;aK=c[3524]|0;if((fl(ac,ad,ae,af)|0)!=0){cN[c[aK+56>>2]&255](c[ac>>2]|0,c[ad>>2]|0);cN[c[aK+60>>2]&255](c[ae>>2]|0,c[af>>2]|0)}aK=aP+d|0;aJ=aO+e|0;c[_>>2]=d;c[$>>2]=e;c[aa>>2]=aK;c[ab>>2]=aJ;aG=c[3524]|0;if((fl(_,$,aa,ab)|0)!=0){cN[c[aG+56>>2]&255](c[_>>2]|0,c[$>>2]|0);cN[c[aG+60>>2]&255](c[aa>>2]|0,c[ab>>2]|0)}c[R>>2]=aK;c[V>>2]=aJ;c[W>>2]=aC;c[Z>>2]=aI;aI=c[3524]|0;if((fl(R,V,W,Z)|0)==0){break}cN[c[aI+56>>2]&255](c[R>>2]|0,c[V>>2]|0);cN[c[aI+60>>2]&255](c[W>>2]|0,c[Z>>2]|0)}}while(0);if((au&2|0)==0){aA=aL;aB=aM;break}aI=c[13542]|0;if((aI|0)!=0){aC=(c[aI>>2]|0)>(a|0)&1;aJ=(c[aI+4>>2]|0)<(a|0)?aC|2:aC;aC=(c[aI+8>>2]|0)>(b|0)?aJ|4:aJ;if((((c[aI+12>>2]|0)<(b|0)?aC|8:aC)|0)!=0){aA=aL;aB=aM;break}}aC=c[12912]|0;do{if((aC|0)==2){aI=a-aL|0;c[ao>>2]=aI;aJ=b-aM|0;c[ao+4>>2]=aJ;c[ao+12>>2]=a-aN;c[ao+16>>2]=b-aQ;c[ao+24>>2]=a;c[ao+28>>2]=b;c[ao+36>>2]=a-aP;c[ao+40>>2]=b-aO;c[ao+48>>2]=aI;c[ao+52>>2]=aJ;c[ao+8>>2]=1601;aJ=c[ap+148>>2]|0;if((aJ|0)==0){break}cN[aJ&255](5,ao|0);aY=c[12912]|0;aZ=11240}else{aY=aC;aZ=11240}}while(0);do{if((aZ|0)==11240){if((aY|0)!=0){break}c[n>>2]=a-aP;c[o>>2]=b-aO;c[p>>2]=a;c[q>>2]=b;aC=c[3524]|0;if((fl(n,o,p,q)|0)!=0){cN[c[aC+56>>2]&255](c[n>>2]|0,c[o>>2]|0);cN[c[aC+60>>2]&255](c[p>>2]|0,c[q>>2]|0)}c[j>>2]=a;c[k>>2]=b;c[l>>2]=a-aN;c[m>>2]=b-aQ;aC=c[3524]|0;if((fl(j,k,l,m)|0)==0){aA=aL;aB=aM;break L15241}cN[c[aC+56>>2]&255](c[j>>2]|0,c[k>>2]|0);cN[c[aC+60>>2]&255](c[l>>2]|0,c[m>>2]|0);aA=aL;aB=aM;break L15241}}while(0);aC=a-aL|0;aJ=b-aM|0;aI=a-aP|0;aK=b-aO|0;c[D>>2]=aC;c[E>>2]=aJ;c[F>>2]=aI;c[G>>2]=aK;aG=c[3524]|0;if((fl(D,E,F,G)|0)!=0){cN[c[aG+56>>2]&255](c[D>>2]|0,c[E>>2]|0);cN[c[aG+60>>2]&255](c[F>>2]|0,c[G>>2]|0)}c[z>>2]=aI;c[A>>2]=aK;c[B>>2]=a;c[C>>2]=b;aK=c[3524]|0;if((fl(z,A,B,C)|0)!=0){cN[c[aK+56>>2]&255](c[z>>2]|0,c[A>>2]|0);cN[c[aK+60>>2]&255](c[B>>2]|0,c[C>>2]|0)}aK=a-aN|0;aI=b-aQ|0;c[v>>2]=a;c[w>>2]=b;c[x>>2]=aK;c[y>>2]=aI;aG=c[3524]|0;if((fl(v,w,x,y)|0)!=0){cN[c[aG+56>>2]&255](c[v>>2]|0,c[w>>2]|0);cN[c[aG+60>>2]&255](c[x>>2]|0,c[y>>2]|0)}c[r>>2]=aK;c[s>>2]=aI;c[t>>2]=aC;c[u>>2]=aJ;aJ=c[3524]|0;if((fl(r,s,t,u)|0)==0){aA=aL;aB=aM;break}cN[c[aJ+56>>2]&255](c[r>>2]|0,c[s>>2]|0);cN[c[aJ+60>>2]&255](c[t>>2]|0,c[u>>2]|0);aA=aL;aB=aM}}while(0);if((f|0)>-1){ay=aB;az=aA;break}c[13542]=av;i=g;return}}while(0);do{if((au&2|0)==0){a_=a;a$=b}else{aA=+P(+at)>=2.220446049250313e-16;if(!(aA&(c[12912]|0)!=0)){a_=a;a$=b;break}a_=a-az|0;a$=b-ay|0}}while(0);do{if((au&1|0)==0){a0=d;a1=e}else{b=+P(+at)>=2.220446049250313e-16;if(!(b&(c[12912]|0)!=0)){a0=d;a1=e;break}a0=az+d|0;a1=ay+e|0}}while(0);c[ak>>2]=a_;c[al>>2]=a$;c[am>>2]=a0;c[an>>2]=a1;a1=c[3524]|0;if((fl(ak,al,am,an)|0)==0){c[13542]=av;i=g;return}cN[c[a1+56>>2]&255](c[ak>>2]|0,c[al>>2]|0);cN[c[a1+60>>2]&255](c[am>>2]|0,c[an>>2]|0);c[13542]=av;i=g;return}function lE(){var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=bU(215528)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}e=uA(d|0)|0;f=e6(215528)|0;g=bP(d|0)|0;c[f+16>>2]=3;c[f+24>>2]=g;a[f+8|0]=0;f=a8(d|0,32)|0;if((f|0)==0){h=e}else{h=f-d|0}if((lx(d,h)|0)==0){f=c[m>>2]|0;cf(f|0,220472,(v=i,i=i+8|0,c[v>>2]=d,v)|0);break}f=c[3524]|0;if((aY(c[f>>2]|0,222936)|0)==0){i=b;return}cS[c[f+32>>2]&511]();i=b;return}}while(0);lx(225016,7);i=b;return}function lF(b){b=b|0;var d=0;d=c[11232]|0;c[11232]=d+1;a[d]=b&255;return}function lG(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0.0,I=0.0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0.0,T=0,U=0,V=0,W=0.0,X=0,Y=0,Z=0,_=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0.0,ag=0,ah=0.0,ai=0.0,aj=0.0,ak=0;b=i;i=i+224|0;d=b|0;e=b+16|0;f=b+72|0;j=b+136|0;k=c[3524]|0;l=k+96|0;m=(c[l>>2]&32|0)!=0;if(!m){dL(bP(218776)|0)}if((a[14080]&1)==0){lk()}do{if(a[14088]|0){if((a[33512]&1)==0){break}if(!(a[13032]|0)){break}n=c[(c[3524]|0)+104>>2]|0;if((n|0)!=0){cS[n&511]()}a[13032]=0}else{cS[c[(c[3524]|0)+52>>2]&511]();a[14088]=1}}while(0);cM[c[(c[3524]|0)+168>>2]&511](0);n=c[3524]|0;if((c[n+96>>2]&16|0)!=0){c[7271]=-1}c[13880]=0;c[13881]=(c[n+8>>2]|0)-1;c[13882]=0;c[13883]=(c[n+12>>2]|0)-1;a[25280]=0;n=~~(+((c[k+8>>2]|0)>>>0>>>0)*+g[178]);o=~~(+((c[k+12>>2]|0)>>>0>>>0)*+g[38]);p=+h[3817];q=k+28|0;r=~~(p*+((c[q>>2]|0)>>>0>>>0));s=k+24|0;t=~~(p*+((c[s>>2]|0)>>>0>>>0)*1.25);u=k+16|0;w=c[u>>2]|0;x=t>>>0>>0?w:t;cM[c[k+168>>2]&511](2);t=k+112|0;cK[c[t>>2]&63](1.0);w=k+64|0;cM[c[w>>2]&511](-2);y=k+56|0;cN[c[y>>2]&255](0,0);z=k+60|0;A=n-1|0;cN[c[z>>2]&255](A,0);B=o-1|0;cN[c[z>>2]&255](A,B);cN[c[z>>2]&255](0,B);cN[c[z>>2]&255](0,0);cM[c[w>>2]&511](0);C=c[c[3524]>>2]|0;if((aY(C|0,225016)|0)==0){uf(-1,218360,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}D=f|0;uB(D|0,C|0);uD(f+(uA(D|0)|0)|0,217760,16);f=k+76|0;cO[c[f>>2]&255](0);C=k+68|0;E=k+20|0;p=+(o>>>0>>>0);cR[c[C>>2]&127](c[E>>2]<<1,~~(p- +((c[u>>2]|0)>>>0>>>0)*.5),D);if((c[k+124>>2]|0)!=0){cR[c[C>>2]&127]((c[E>>2]|0)*5&-1,((c[u>>2]|0)*-3&-1)+o|0,217152)}cM[c[w>>2]&511](-2);cM[c[w>>2]&511](-1);D=n>>>1;cN[c[y>>2]&255](D,0);cN[c[z>>2]&255](D,B);F=o>>>1;cN[c[y>>2]&255](0,F);cN[c[z>>2]&255](A,F);cM[c[w>>2]&511](3);cN[c[y>>2]&255](((c[E>>2]|0)*-10&-1)+D|0,((c[u>>2]|0)>>>1)+F|0);cN[c[z>>2]&255](((c[E>>2]|0)*10&-1)+D|0,((c[u>>2]|0)>>>1)+F|0);cN[c[z>>2]&255](((c[E>>2]|0)*10&-1)+D|0,F-((c[u>>2]|0)>>>1)|0);cN[c[z>>2]&255](((c[E>>2]|0)*-10&-1)+D|0,F-((c[u>>2]|0)>>>1)|0);cN[c[z>>2]&255](((c[E>>2]|0)*-10&-1)+D|0,((c[u>>2]|0)>>>1)+F|0);cR[c[C>>2]&127](((c[E>>2]|0)*-10&-1)+D|0,F,216528);cR[c[C>>2]&127](((c[E>>2]|0)*-10&-1)+D|0,~~(+(F>>>0>>>0)+ +((c[u>>2]|0)>>>0>>>0)*1.4),216048);cM[c[w>>2]&511](-2);do{if((c[l>>2]&32|0)!=0){A=bP(215568)|0;cR[c[C>>2]&127](~~(+(n>>>0>>>0)*.5),~~(p*.4),A);uu(A);if(m){break}dL(bP(215048)|0)}}while(0);cO[c[f>>2]&255](0);cR[c[C>>2]&127](D,((c[u>>2]|0)*6&-1)+F|0,214488);m=(cO[c[f>>2]&255](1)|0)==0;l=c[C>>2]|0;if(m){cR[l&127](D-(((c[E>>2]|0)*13&-1)>>>1)|0,((c[u>>2]|0)*5&-1)+F|0,213832)}else{cR[l&127](D,((c[u>>2]|0)*5&-1)+F|0,213832)}l=(cO[c[f>>2]&255](2)|0)==0;m=c[C>>2]|0;if(l){cR[m&127](((c[E>>2]|0)*-15&-1)+D|0,(c[u>>2]<<2)+F|0,213336)}else{cR[m&127](D,(c[u>>2]<<2)+F|0,213336)}cM[c[w>>2]&511](1);m=k+72|0;l=(cO[c[m>>2]&255](-270)|0)==0;A=c[f>>2]|0;if(l){cO[A&255](0);cR[c[C>>2]&127](c[E>>2]<<1,F-(c[u>>2]<<1)|0,211168)}else{l=(cO[A&255](1)|0)==0;A=c[C>>2]|0;G=c[u>>2]|0;if(l){cR[A&127](G,F-(((c[E>>2]|0)*21&-1)>>>1)|0,212752)}else{cR[A&127](G,F,212752)}G=c[f>>2]|0;cO[G&255](0);G=c[m>>2]|0;cO[G&255](45);cR[c[C>>2]&127]((c[u>>2]|0)*3&-1,F,212104);G=c[f>>2]|0;cO[G&255](0);G=c[m>>2]|0;cO[G&255](-45);cR[c[C>>2]&127](c[u>>2]<<1,F,211576)}cO[c[f>>2]&255](0);cO[c[m>>2]&255](0);cM[c[w>>2]&511](-2);cM[c[w>>2]&511](4);H=+(D>>>0>>>0);cN[c[y>>2]&255](~~(H+ +((c[q>>2]|0)>>>0>>>0)*(+h[8304]+1.0)),B);I=+h[8304];cN[c[z>>2]&255](~~(H+ +((c[q>>2]|0)>>>0>>>0)*(I+1.0)),~~(p-I*+((c[s>>2]|0)>>>0>>>0)));cN[c[y>>2]&255](D,~~(p- +((c[s>>2]|0)>>>0>>>0)*(+h[8304]+1.0)));I=+h[8304];cN[c[z>>2]&255](~~(H+I*+((c[q>>2]|0)>>>0>>>0)),~~(p-(I+1.0)*+((c[s>>2]|0)>>>0>>>0)));B=(cO[c[f>>2]&255](2)|0)==0;m=c[C>>2]|0;F=c[E>>2]|0;if(B){cR[m&127]((F*-14&-1)+D|0,(o-(c[s>>2]<<1)|0)-((c[u>>2]|0)>>>1)|0,210688)}else{cR[m&127](D-F|0,(o-(c[s>>2]<<1)|0)-((c[u>>2]|0)>>>1)|0,210688)}cO[c[f>>2]&255](0);cM[c[w>>2]&511](-2);F=(n-r|0)+((c[E>>2]|0)*-6&-1)|0;cK[c[k+92>>2]&63](+h[3817]);D=o-x|0;if((D|0)>(x|0)){m=d|0;B=d+4|0;G=d+8|0;A=e|0;l=k+80|0;J=(r|0)/2&-1;r=-2;K=D;while(1){D=r+1|0;L=c[8798]|0;M=(L|0)>0;N=D;L15390:while(1){O=43264;while(1){P=c[O>>2]|0;if((P|0)==0){break}if((c[P+4>>2]|0)==(N|0)){Q=11322;break L15390}else{O=P|0}}O=N-1|0;if(!((N|0)>(L|0)&M)){R=O;S=1.0;T=0;U=1;V=O;W=0.0;break}N=((O|0)%(L|0)&-1)+1|0}do{if((Q|0)==11322){Q=0;L=c[P+12>>2]|0;I=+h[P+24>>3];M=c[P+48>>2]|0;O=c[P+52>>2]|0;H=+h[P+56>>3];if((c[(c[3524]|0)+96>>2]&1024|0)!=0){R=N;S=I;T=0;U=M;V=O;W=H;break}X=a[P+40|0]&1;Y=X<<24>>24==0;R=L;S=I;T=X;U=Y?1:M;V=Y?L:O;W=H}}while(0);c[m>>2]=U;c[B>>2]=V;h[G>>3]=W;cK[c[(c[3524]|0)+112>>2]&63](S);N=c[(c[3524]|0)+64>>2]|0;if((R|0)<-5){cM[N&511](-2)}else{cM[N&511](R)}N=c[3524]|0;do{if(T<<24>>24==0){if((c[N+96>>2]&1024|0)!=0){break}c[m>>2]=1;c[B>>2]=R;Q=11332}else{Q=11332}}while(0);if((Q|0)==11332){Q=0;fn(d,N)}be(A|0,21e4,(v=i,i=i+8|0,c[v>>2]=D,v)|0);O=(cO[c[f>>2]&255](2)|0)==0;L=c[C>>2]|0;if(O){O=uA(A|0)|0;Y=F-aa(c[E>>2]|0,O)|0;cR[L&127](Y,K,A)}else{cR[L&127](F,K,A)}cN[c[y>>2]&255]((c[E>>2]|0)+F|0,K);cN[c[z>>2]&255]((c[E>>2]<<2)+F|0,K);if((r|0)>-2){cR[c[l>>2]&127]((((c[E>>2]|0)*5&-1)+F|0)+J|0,K,r)}L=K-x|0;if((L|0)>(x|0)){r=D;K=L}else{Z=A;break}}}else{Z=e|0}cK[c[t>>2]&63](1.0);cM[c[w>>2]&511](0);S=+(n>>>0>>>0);e=~~(S*.375);A=~~(p*.25);K=(c[q>>2]|0)*7&-1;r=(c[s>>2]|0)*7&-1;x=c[12912]|0;c[12912]=0;J=k+84|0;cI[c[J>>2]&63](e,A,K+e|0,A,1);c[12912]=1;cI[c[J>>2]&63](e,A,e-K|0,A,1);c[12912]=2;cI[c[J>>2]&63](e,A,e,r+A|0,1);c[12912]=1;cI[c[J>>2]&63](e,A,e,A-r|0,1);c[12912]=x;x=(c[q>>2]|0)*5&-1;q=(c[s>>2]|0)*5&-1;s=e-x|0;r=A-q|0;K=x+e|0;x=q+A|0;cI[c[J>>2]&63](s,r,K,x,3);cI[c[J>>2]&63](s,x,e,A,0);c[12912]=1;cI[c[J>>2]&63](e,A,K,r,2);cO[c[f>>2]&255](0);r=(o>>>0)/25>>>0;K=~~(S*.075);A=((n>>>0)/10>>>0)+K|0;e=1;J=r;while(1){cK[c[t>>2]&63](+(e|0));cM[c[w>>2]&511](-2);cN[c[y>>2]&255](K,J);cN[c[z>>2]&255](A,J);be(Z|0,209288,(v=i,i=i+16|0,c[v>>2]=e,c[v+8>>2]=0,v)|0);cR[c[C>>2]&127](A,J,Z);x=e+1|0;if((x|0)<7){e=x;J=J+r|0}else{break}}cR[c[C>>2]&127](K,r*7&-1,208960);r=~~(S*.5);K=(n>>>0)/40>>>0;J=o>>>3;cK[c[t>>2]&63](1.0);cM[c[w>>2]&511](-2);cO[c[f>>2]&255](1);W=+(J|0);cR[c[C>>2]&127]((K*7&-1)+r|0,~~(W+ +((c[u>>2]|0)>>>0>>>0)*1.5),208328);t=k+108|0;o=(n>>>0)/80>>>0;H=+(K|0)*1.5;e=0;A=r;while(1){r=c[t>>2]|0;if((r|0)!=0){cI[r&63](e<<4|2,A,0,K,J)}cN[c[y>>2]&255](A,0);cN[c[z>>2]&255](A,J);r=A+K|0;cN[c[z>>2]&255](r,J);cN[c[z>>2]&255](r,0);cN[c[z>>2]&255](A,0);be(Z|0,207744,(v=i,i=i+8|0,c[v>>2]=e,v)|0);cR[c[C>>2]&127](o+A|0,~~(W+ +((c[u>>2]|0)>>>0>>>0)*.5),Z);r=e+1|0;if((r|0)<10){e=r;A=~~(H+ +(A|0))}else{break}}A=~~(S*.7);e=~~(p*.83);Z=(n>>>0)/20>>>0;if((c[k+148>>2]|0)==0){_=206240}else{p=+(Z|0);k=j|0;n=j|0;o=j+72|0;z=j+4|0;J=j+76|0;K=j+8|0;y=0;while(1){t=aa(y,Z);S=+(t+A|0);H=+(e-((t|0)/2&-1)|0);t=~~(S+p);c[n>>2]=t;r=~~(H+p*0.0);c[z>>2]=r;c[j+12>>2]=~~(S+p*.5000000000000001);c[j+16>>2]=~~(H+p*.8660254037844386);c[j+24>>2]=~~(S+p*-.4999999999999998);c[j+28>>2]=~~(H+p*.8660254037844387);c[j+36>>2]=~~(S+p*-1.0);c[j+40>>2]=~~(H+p*1.2246467991473532e-16);c[j+48>>2]=~~(S+p*-.5000000000000004);c[j+52>>2]=~~(H+p*-.8660254037844384);c[j+60>>2]=~~(S+p*.5000000000000001);c[j+64>>2]=~~(H+p*-.8660254037844386);c[o>>2]=t;c[J>>2]=r;r=c[w>>2]|0;if((y|0)==0){cM[r&511](2);$=1601}else{cM[r&511](1);$=804}c[K>>2]=$;cN[c[(c[3524]|0)+148>>2]&255](7,k);r=y+1|0;if((r|0)<2){y=r}else{_=206944;break}}}cM[c[w>>2]&511](-2);if((cO[c[f>>2]&255](1)|0)!=0){ab=0;ac=c[C>>2]|0;ad=ab+A|0;ae=Z+e|0;af=+(ae|0);ag=c[u>>2]|0;ah=+(ag>>>0>>>0);ai=ah*.5;aj=af+ai;ak=~~aj;cR[ac&127](ad,ak,_);lh();i=b;return}f=c[E>>2]|0;ab=aa(uA(_|0)|0,f)>>>1;ac=c[C>>2]|0;ad=ab+A|0;ae=Z+e|0;af=+(ae|0);ag=c[u>>2]|0;ah=+(ag>>>0>>>0);ai=ah*.5;aj=af+ai;ak=~~aj;cR[ac&127](ad,ak,_);lh();i=b;return}function lH(b,d,e,f,g,i){b=b|0;d=+d;e=+e;f=f|0;g=g|0;i=i|0;var j=0.0;if((i|0)==4){h[29743]=+h[29742];h[29741]=+h[29740];return}else if((i|0)==3){h[29742]=+h[29743];h[29740]=+h[29741];return}else{if(a[237976]|0){return}a[237976]=1;h[29750]=0.0;h[29751]=d>2.0?1.0:d;h[29752]=e;j=d+e;if(+h[29749]e){h[29748]=e}c[59492]=i;a[237952]=f&1;return}}function lI(){var b=0.0,d=0.0,e=0.0;b=+h[29750];if(!(a[237976]|0)){return}h[29750]=0.0;do{if((a[237952]&1)==0){d=+h[29743]}else{if((c[59492]|0)==1){e=b*.5+ +h[29743];h[29743]=e;d=e;break}else{e=b+ +h[29743];h[29743]=e;d=e;break}}}while(0);b=+h[29745];h[29745]=b>d?b:d;a[237976]=0;return}function lJ(b,d,e,f,g,j,k,l){b=b|0;d=d|0;e=e|0;f=+f;g=+g;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0.0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0,D=0,E=0,F=0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0.0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0.0,_=0,$=0.0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0;m=i;i=i+48|0;n=m|0;o=m+8|0;p=m+16|0;q=m+40|0;r=q;c[n>>2]=b;cS[c[(c[3524]|0)+160>>2]&511]();s=f+g;if(s>+h[5612]){h[5612]=s}if(+h[5611]>g){h[5611]=g}b=c[n>>2]|0;t=a[b]|0;L15478:do{if(t<<24>>24!=0){s=f*.8;u=f;w=q;x=r+1|0;y=r+2|0;z=m+24|0;A=l;B=g;C=b;D=t;L15480:while(1){E=c[11252]|0;do{if(D<<24>>24<0){if(!((E|0)==15|(E|0)==0)){F=11393;break}c[p>>2]=C;cJ[c[(c[3524]|0)+156>>2]&15](e,f,B,j,k,A);if(!(ug(o,p)|0)){cM[c[(c[3524]|0)+164>>2]&511](a[c[n>>2]|0]|0);G=B;H=A;break}I=c[n>>2]|0;J=c[p>>2]|0;if(I>>>0>>0){K=I;while(1){L=c[(c[3524]|0)+164>>2]|0;c[n>>2]=K+1;cM[L&511](a[K]|0);L=c[n>>2]|0;if(L>>>0>>0){K=L}else{M=L;break}}}else{M=I}c[n>>2]=M-1;G=B;H=A}else{F=11393}}while(0);L15492:do{if((F|0)==11393){F=0;K=D<<24>>24;if((K&128|0)!=0&(E|0)==14){cJ[c[(c[3524]|0)+156>>2]&15](e,f,B,j,k,A);J=c[(c[3524]|0)+164>>2]|0;L=c[n>>2]|0;c[n>>2]=L+1;cM[J&511](a[L]|0);cM[c[(c[3524]|0)+164>>2]&511](a[c[n>>2]|0]|0);G=B;H=A;break}do{if((K|0)==125){F=11396;break L15480}else if((K|0)==64){cS[c[(c[3524]|0)+160>>2]&511]();cJ[c[(c[3524]|0)+156>>2]&15](e,f,B,j,k,3);L=(c[n>>2]|0)+1|0;c[n>>2]=L;c[n>>2]=lJ(L,0,e,f,B,j,k,A)|0;cJ[c[(c[3524]|0)+156>>2]&15](e,f,B,j,k,4);G=B;H=A;break L15492}else if((K|0)==38){cS[c[(c[3524]|0)+160>>2]&511]();L=(c[n>>2]|0)+1|0;c[n>>2]=L;c[n>>2]=lJ(L,0,e,f,B,j,0,A)|0;G=B;H=A;break L15492}else if((K|0)==40|(K|0)==41){cJ[c[(c[3524]|0)+156>>2]&15](e,f,B,j,k,A);L=c[3524]|0;if((c[L+96>>2]&16|0)==0){N=L}else{cM[c[L+164>>2]&511](92);N=c[3524]|0}cM[c[N+164>>2]&511](a[c[n>>2]|0]|0);G=B;H=A;break L15492}else if((K|0)==123){L=C;do{L=L+1|0;c[n>>2]=L;}while((a[L]|0)==32);do{if((A|0)==2){O=+uz(L,n);P=u*O;if((c[(c[3524]|0)+96>>2]&16|0)!=0){Q=P;break}Q=B+P}else{Q=B}}while(0);L=c[n>>2]|0;if((a[L]|0)==47){J=L;while(1){R=J+1|0;c[n>>2]=R;S=a[R]|0;if((S<<24>>24|0)==45){T=R;F=11405;break}else if((S<<24>>24|0)==32){J=R}else{U=R;V=S;break}}if((F|0)==11405){while(1){F=0;J=T+1|0;c[n>>2]=J;S=a[J]|0;if(S<<24>>24==32){T=J;F=11405}else{U=J;V=S;break}}}L15518:do{if(V<<24>>24<33){W=U;X=V}else{S=V;J=U;while(1){if((S<<24>>24|0)==61|(S<<24>>24|0)==42|(S<<24>>24|0)==125){W=J;X=S;break L15518}R=J+1|0;c[n>>2]=R;Y=a[R]|0;if(Y<<24>>24<33){W=R;X=Y;break}else{S=Y;J=R}}}}while(0);do{if((X<<24>>24|0)==61){c[n>>2]=W+1;a[W]=0;P=+uz(c[n>>2]|0,n);if(P==0.0){Z=u;break}Z=P*+h[5613]}else if((X<<24>>24|0)==125){uh(-1,204816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);J=c[n>>2]|0;c[n>>2]=J+1;a[J]=0;Z=u}else if((X<<24>>24|0)==42){c[n>>2]=W+1;a[W]=0;P=+uz(c[n>>2]|0,n);if(P==0.0){Z=u;break}Z=P*f}else{c[n>>2]=W+1;a[W]=0;Z=u}}while(0);J=c[n>>2]|0;if((a[J]|0)==32){S=J;while(1){R=S+1|0;c[n>>2]=R;if((a[R]|0)==32){S=R}else{_=R;break}}}else{_=J}$=Z;aa=(a[U]|0)==0?e:U;ab=X;ac=W;ad=_}else{$=u;aa=e;ab=0;ac=0;ad=L}c[n>>2]=lJ(ad,1,aa,$,Q,j,k,A)|0;cS[c[(c[3524]|0)+160>>2]&511]();if((ac|0)==0){G=Q;H=A;break L15492}a[ac]=ab;G=Q;H=A;break L15492}else if((K|0)==95|(K|0)==94){cS[c[(c[3524]|0)+160>>2]&511]();c[n>>2]=lJ((c[n>>2]|0)+1|0,0,e,s,B+(D<<24>>24==94?.5:-.30000001192092896)*f,j,k,A)|0;G=B;H=A;break L15492}else if((K|0)==126){cS[c[(c[3524]|0)+160>>2]&511]();S=(c[n>>2]|0)+1|0;c[n>>2]=S;c[n>>2]=lJ(S,0,e,f,B,j,k,1)|0;cS[c[(c[3524]|0)+160>>2]&511]();S=c[n>>2]|0;if((a[S]|0)==0){G=B;H=A;break L15492}R=S+1|0;c[n>>2]=R;c[n>>2]=lJ(R,0,e,f,B,0,k,2)|0;G=B;H=0;break L15492}else if((K|0)==92){R=a[C+1|0]|0;if((R-48&255)<8){c[q>>2]=0;cJ[c[(c[3524]|0)+156>>2]&15](e,f,B,j,k,A);S=c[n>>2]|0;Y=S+1|0;c[n>>2]=Y;a[w]=a[Y]|0;Y=S+2|0;do{if(((a[Y]|0)-48&255)<8){c[n>>2]=Y;a[x]=a[Y]|0;ae=S+3|0;if(((a[ae]|0)-48&255)>=8){break}c[n>>2]=ae;a[y]=a[ae]|0}}while(0);S=aE(w|0,0,8)|0;be(z|0,44912,(v=i,i=i+8|0,c[v>>2]=S,v)|0);S=a[z]|0;if(S<<24>>24==0){G=B;H=A;break L15492}else{af=z;ag=S}while(1){cM[c[(c[3524]|0)+164>>2]&511](ag<<24>>24);S=af+1|0;Y=a[S]|0;if(Y<<24>>24==0){G=B;H=A;break L15492}else{af=S;ag=Y}}}Y=c[3524]|0;do{if((c[Y+96>>2]&16|0)==0){ah=C}else{if((R<<24>>24|0)==92|(R<<24>>24|0)==40|(R<<24>>24|0)==41){cJ[c[Y+156>>2]&15](e,f,B,j,k,A);cM[c[(c[3524]|0)+164>>2]&511](92);ah=c[n>>2]|0;break}if((aZ(204560,R<<24>>24|0,8)|0)!=0){ah=C;break}cJ[c[Y+156>>2]&15](e,f,B,j,k,A);cM[c[(c[3524]|0)+164>>2]&511](92);cM[c[(c[3524]|0)+164>>2]&511](92);G=B;H=A;break L15492}}while(0);Y=ah+1|0;c[n>>2]=Y;R=a[Y]|0;if(R<<24>>24==0){uh(-1,204288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);G=B;H=A;break L15492}if(!(R<<24>>24==38&(c[11252]|0)==0)){break}R=c[3524]|0;if((aY(c[R>>2]|0,204032)|0)!=0){break}cJ[c[R+156>>2]&15](e,f,B,j,k,A);cM[c[(c[3524]|0)+164>>2]&511](-2);G=B;H=A;break L15492}}while(0);cJ[c[(c[3524]|0)+156>>2]&15](e,f,B,j,k,A);cM[c[(c[3524]|0)+164>>2]&511](a[c[n>>2]|0]|0);G=B;H=A}}while(0);if(!d){break}E=c[n>>2]|0;if((a[E]|0)==0){break L15478}K=E+1|0;c[n>>2]=K;E=a[K]|0;if(E<<24>>24==0){break L15478}else{A=H;B=G;C=K;D=E}}do{if((F|0)==11396){if(d){ai=C;i=m;return ai|0}else{uh(-1,205424,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);break}}}while(0);cS[c[(c[3524]|0)+160>>2]&511]();ai=c[n>>2]|0;i=m;return ai|0}}while(0);cS[c[(c[3524]|0)+160>>2]&511]();ai=c[n>>2]|0;i=m;return ai|0}function lK(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=b|0;f=c[e>>2]|0;g=43280;while(1){h=c[g>>2]|0;if((h|0)==0){break}if((c[h+4>>2]|0)==(d|0)){i=11457;break}else{g=h|0}}if((i|0)==11457){g=b;j=h+8|0;c[g>>2]=c[j>>2];c[g+4>>2]=c[j+4>>2];c[g+8>>2]=c[j+8>>2];c[g+12>>2]=c[j+12>>2];c[g+16>>2]=c[j+16>>2];c[g+20>>2]=c[j+20>>2];c[g+24>>2]=c[j+24>>2];c[g+28>>2]=c[j+28>>2];c[g+32>>2]=c[j+32>>2];c[g+36>>2]=c[j+36>>2];c[g+40>>2]=c[j+40>>2];c[g+44>>2]=c[j+44>>2];c[g+48>>2]=c[j+48>>2];c[g+52>>2]=c[j+52>>2];c[e>>2]=f;if((a[b+32|0]&1)!=0){return}c[b+40>>2]=1;c[b+44>>2]=c[b+4>>2];return}j=c[8798]|0;g=(j|0)>0;h=d;L15586:while(1){d=43264;while(1){k=c[d>>2]|0;if((k|0)==0){break}if((c[k+4>>2]|0)==(h|0)){break L15586}else{d=k|0}}l=h-1|0;if(!((h|0)>(j|0)&g)){i=11469;break}h=((l|0)%(j|0)&-1)+1|0}if((i|0)==11469){c[b+4>>2]=l;c[b+40>>2]=1;c[b+44>>2]=l;c[b+8>>2]=l;return}l=b;i=k+8|0;c[l>>2]=c[i>>2];c[l+4>>2]=c[i+4>>2];c[l+8>>2]=c[i+8>>2];c[l+12>>2]=c[i+12>>2];c[l+16>>2]=c[i+16>>2];c[l+20>>2]=c[i+20>>2];c[l+24>>2]=c[i+24>>2];c[l+28>>2]=c[i+28>>2];c[l+32>>2]=c[i+32>>2];c[l+36>>2]=c[i+36>>2];c[l+40>>2]=c[i+40>>2];c[l+44>>2]=c[i+44>>2];c[l+48>>2]=c[i+48>>2];c[l+52>>2]=c[i+52>>2];c[e>>2]=f;if((c[(c[3524]|0)+96>>2]&1024|0)!=0){c[b+4>>2]=h;a[b+32|0]=0;return}if((a[b+32|0]&1)!=0){return}c[b+40>>2]=1;c[b+44>>2]=c[b+4>>2];return}function lL(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0.0,l=0,m=0,n=0;f=i;h[29751]=1.0;a[237976]=0;h[29749]=1.0;h[29748]=0.0;h[29745]=0.0;uF(44912,202200,16);do{if((a[37456]&1)==0){if((cy(e|0,201600)|0)==0){break}h[29743]=+(b>>>0>>>0);h[29741]=+(d>>>0>>>0);g=e;do{j=lJ(g,1,179864,+h[29751],0.0,1,1,0)|0;if((a[j]|0)==0){break}cS[c[(c[3524]|0)+160>>2]&511]();if((a[j]|0)==125){uh(-1,203744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{uh(-1,203528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=j+1|0;}while((a[g]|0)!=0);k=+h[29743];if(k>0.0&k<1.0){h[29743]=1.0}c[(c[3524]|0)+8>>2]=~~+h[29745];c[(c[3524]|0)+12>>2]=~~((+h[29749]- +h[29748])*10.0+.5);i=f;return}}while(0);if((c[11252]|0)==15){d=a[e]|0;if(d<<24>>24==0){l=0}else{b=0;g=0;j=d;while(1){if((j&-64)<<24>>24==-128){m=g}else{m=((j&255)>226?2:1)+g|0}d=b+1|0;n=a[e+d|0]|0;if(n<<24>>24==0){l=m;break}else{b=d;g=m;j=n}}}c[(c[3524]|0)+8>>2]=l}else{l=uA(e|0)|0;c[(c[3524]|0)+8>>2]=l}c[(c[3524]|0)+12>>2]=10;i=f;return}function lM(){a[13048|0]=0;return}function lN(){return}function lO(a,b){a=a|0;b=b|0;return}function lP(a){a=a|0;return}function lQ(a,b,c){a=a|0;b=b|0;c=c|0;return}function lR(a){a=a|0;c[59236]=a;return 1}function lS(a){a=a|0;c[56732]=a;return 1}function lT(b){b=b|0;var d=0.0,e=0.0,f=0.0;if((b|0)==10){d=+h[29750];if(a[237976]|0){h[29750]=0.0;do{if((a[237952]&1)==0){e=+h[29743]}else{if((c[59492]|0)==1){f=d*.5+ +h[29743];h[29743]=f;e=f;break}else{f=d+ +h[29743];h[29743]=f;e=f;break}}}while(0);d=+h[29745];h[29745]=d>e?d:e;a[237976]=0}a[237976]=1;e=+h[29751];h[29748]=+h[29748]-e;h[29752]=+h[29752]-e;h[29743]=0.0}if((c[11252]|0)!=15){h[29750]=+h[29751]+ +h[29750];return}if((b&192|0)==128){return}e=+h[29751];d=e+ +h[29750];h[29750]=d;if(b>>>0<=235){return}h[29750]=d+e;return}function lU(a){a=a|0;var b=0;b=(a|0)<-2?-2:a;c[59226]=b>>>0>3?b&3:b;return}function lV(){c[59226]=3;aI(152264,54,1,c[10030]|0);return}function lW(){aD(c[10030]|0);return}function lX(){var a=0;if((c[59234]|0)>0){a=c[10030]|0;aI(152912,16,1,a|0);c[59234]=0}aI(152336,4,1,c[10030]|0);return}function lY(){var a=0,b=0,d=0.0;a=i;b=c[3524]|0;d=+((c[b+12>>2]|0)>>>0>>>0)/300.0;cf(c[10030]|0,152464,(v=i,i=i+16|0,h[v>>3]=+((c[b+8>>2]|0)>>>0>>>0)/300.0,h[v+8>>3]=d,v)|0);d=+g[59222];cf(c[10030]|0,152432,(v=i,i=i+16|0,h[v>>3]=+g[59224],h[v+8>>3]=d,v)|0);i=a;return}function lZ(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;if((c[59234]|0)>0){e=c[10030]|0;aI(152912,16,1,e|0);c[59234]=0}cf(c[10030]|0,152480,(v=i,i=i+16|0,h[v>>3]=+(a>>>0>>>0)/300.0,h[v+8>>3]=+(b>>>0>>>0)/300.0,v)|0);c[59234]=1;i=d;return}function l_(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0.0,j=0.0,k=0,l=0;d=i;e=c[10030]|0;if((c[59234]|0)==1){f=c[236912+((c[59226]|0)+2<<2)>>2]|0;g=+(a>>>0>>>0)/300.0;j=+(b>>>0>>>0)/300.0;cf(e|0,152664,(v=i,i=i+24|0,c[v>>2]=f,h[v+8>>3]=g,h[v+16>>3]=j,v)|0);k=c[59234]|0;l=k+1|0;c[59234]=l;i=d;return}else{j=+(a>>>0>>>0)/300.0;g=+(b>>>0>>>0)/300.0;cf(e|0,152624,(v=i,i=i+16|0,h[v>>3]=j,h[v+8>>3]=g,v)|0);k=c[59234]|0;l=k+1|0;c[59234]=l;i=d;return}}function l$(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;if((c[59234]|0)>0){f=c[10030]|0;aI(152912,16,1,f|0);c[59234]=0}cf(c[10030]|0,103640,(v=i,i=i+8|0,c[v>>2]=d,v)|0);d=c[59236]|0;if((d|0)==1){f=c[10030]|0;aF(32,f|0)}else if((d|0)==0){aI(152848,6,1,c[10030]|0)}else if((d|0)==2){aI(152840,6,1,c[10030]|0)}cf(c[10030]|0,152712,(v=i,i=i+16|0,h[v>>3]=+(a>>>0>>>0)/300.0,h[v+8>>3]=+(b>>>0>>>0)/300.0,v)|0);i=e;return}function l0(a){a=a|0;if((c[59234]|0)<=0){return 0}aI(152912,16,1,c[10030]|0);c[59234]=0;return 0}function l1(a,b,d){a=a|0;b=b|0;d=d|0;cM[c[(c[3524]|0)+64>>2]&511](0);ly(a,b,d);return}function l2(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0;g=i;if((c[59234]|0)>0){j=c[10030]|0;aI(152912,16,1,j|0);c[59234]=0}j=c[10030]|0;k=+(a>>>0>>>0)/300.0;l=+(b>>>0>>>0)/300.0;m=+(d>>>0>>>0)/300.0;n=+(e>>>0>>>0)/300.0;if((f|0)==0){cf(j|0,152984,(v=i,i=i+32|0,h[v>>3]=k,h[v+8>>3]=l,h[v+16>>3]=m,h[v+24>>3]=n,v)|0);i=g;return}else{cf(j|0,153024,(v=i,i=i+32|0,h[v>>3]=k,h[v+8>>3]=l,h[v+16>>3]=m,h[v+24>>3]=n,v)|0);i=g;return}}function l3(){aI(153080,10,1,c[10030]|0);return}function l4(){aI(153112,11,1,c[10030]|0);return}function l5(){aI(153144,9,1,c[10030]|0);return}function l6(){aI(153304,23,1,c[10030]|0);c[57146]=0;aI(153392,9,1,c[10030]|0);return}function l7(a,b){a=a|0;b=b|0;var d=0;d=i;cf(c[10030]|0,153328,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=439-b,v)|0);i=d;return}function l8(a,b){a=a|0;b=b|0;var d=0;d=i;cf(c[10030]|0,153344,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=439-b,v)|0);i=d;return}function l9(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=(a|0)<-2?-2:a;if((c[57208]|0)==0){if((d|0)>8){e=(d|0)%9&-1}else{e=d}a=c[10030]|0;f=e+2|0;e=c[228712+(f<<2)>>2]|0;cf(a|0,153376,(v=i,i=i+8|0,c[v>>2]=e,v)|0);e=c[10030]|0;a=c[228592+(f<<2)>>2]|0;cf(e|0,153368,(v=i,i=i+8|0,c[v>>2]=a,v)|0);i=b;return}else{if((d|0)>14){g=(d|0)%15&-1}else{g=d}d=c[10030]|0;a=g+2|0;g=c[228760+(a<<2)>>2]|0;cf(d|0,153376,(v=i,i=i+8|0,c[v>>2]=g,v)|0);g=c[10030]|0;d=c[228640+(a<<2)>>2]|0;cf(g|0,153368,(v=i,i=i+8|0,c[v>>2]=d,v)|0);i=b;return}}function ma(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;if((c[57146]|0)==1){g=b-11|0;h=c[10030]|0;j=439-d|0;cf(h|0,153328,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=j,v)|0)}else{j=c[10030]|0;g=430-d|0;cf(j|0,153328,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=g,v)|0)}aF(84,c[10030]|0);aF(39,c[10030]|0);g=a[e]|0;if(g<<24>>24==0){k=c[10030]|0;l=aF(39,k|0)|0;m=c[10030]|0;n=aF(10,m|0)|0;i=f;return}else{o=e;p=g}do{aF(p<<24>>24|0,c[10030]|0);if((a[o]|0)==39){g=c[10030]|0;aF(39,g|0)}o=o+1|0;p=a[o]|0;}while(p<<24>>24!=0);k=c[10030]|0;l=aF(39,k|0)|0;m=c[10030]|0;n=aF(10,m|0)|0;i=f;return}function mb(a){a=a|0;var b=0;b=(a|0)!=0;c[57146]=b&1;a=c[10030]|0;if(b){aI(153416|0,10,1,a|0);return 1}else{aI(153392|0,9,1,a|0);return 1}return 0}function mc(){aI(153552,24,1,c[10030]|0);aI(153520,20,1,c[10030]|0);aD(c[10030]|0);return}function md(){aI(153584,13,1,c[10030]|0);aD(c[10030]|0);return}function me(){aI(153704,9,1,c[10030]|0);aD(c[10030]|0);return}function mf(){aI(153720,11,1,c[10030]|0);aD(c[10030]|0);return}function mg(a,b){a=a|0;b=b|0;aI(153736,3,1,c[10030]|0);t0(a,b);aD(c[10030]|0);return}function mh(a,b){a=a|0;b=b|0;aI(153760,3,1,c[10030]|0);t0(a,b);aD(c[10030]|0);return}function mi(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;b=(a|0)<-2?-2:a;if((b|0)==(-1|0)){a=c[10030]|0;aI(153824,4,1,a|0)}else if((b|0)==(-2|0)){aI(153800,4,1,c[10030]|0)}else{aI(153792,3,1,c[10030]|0);a=(b|0)%14&-1;d=a+2|0;e=(d|0)>-1?d:-2-a|0;a=e>>>10;f=e>>>4&63|64;g=e&15|(d>>31)+48&-16;if((a|0)==0){if((f|0)!=64){h=11606}}else{d=a+64|0;a=c[10030]|0;aF(d|0,a|0);h=11606}if((h|0)==11606){h=c[10030]|0;aF(f|0,h|0)}aF(g|0,c[10030]|0)}aI(153784,3,1,c[10030]|0);g=(b|0)>0?(b|0)%8&-1:0;b=(g|0)>-1?g:-g|0;h=b>>>10;f=b>>>4&63|64;a=b&15|(g>>31)+48&-16;do{if((h|0)==0){if((f|0)!=64){break}i=c[10030]|0;j=aF(a|0,i|0)|0;k=c[10030]|0;l=aD(k|0)|0;return}else{g=h+64|0;b=c[10030]|0;aF(g|0,b|0)}}while(0);aF(f|0,c[10030]|0);i=c[10030]|0;j=aF(a|0,i|0)|0;k=c[10030]|0;l=aD(k|0)|0;return}function mj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((c[56732]|0)==0){e=b-29|0;f=c[10030]|0;aI(153736,3,1,f|0);t0(a,e);e=c[10030]|0;aD(e|0);e=c[10030]|0;aI(154080,5,1,e|0)}else{e=a+19|0;a=c[10030]|0;aI(153736,3,1,a|0);t0(e,b);b=c[10030]|0;aD(b|0);b=c[10030]|0;aI(153952,6,1,b|0)}aI(153920,3,1,c[10030]|0);b=uA(d|0)|0;e=(b|0)>-1?b:-b|0;a=e>>>10;f=e>>>4&63|64;g=e&15|(b>>31)+48&-16;do{if((a|0)==0){if((f|0)!=64){break}h=c[10030]|0;i=aF(g|0,h|0)|0;j=c[10030]|0;k=aK(d|0,j|0)|0;l=c[10030]|0;m=aD(l|0)|0;return}else{b=a+64|0;e=c[10030]|0;aF(b|0,e|0)}}while(0);aF(f|0,c[10030]|0);h=c[10030]|0;i=aF(g|0,h|0)|0;j=c[10030]|0;k=aK(d|0,j|0)|0;l=c[10030]|0;m=aD(l|0)|0;return}function mk(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0,q=0,r=0.0;b=i;i=i+24|0;d=b|0;g[59224]=0.0;g[59222]=0.0;e=c[13898]|0;L15781:do{if((e|0)<(c[8272]|0)){f=c[1054]|0;L15783:do{if((a[f+(e*40&-1)|0]&1)!=0){j=c[f+(e*40&-1)+36>>2]|0;k=f+(e*40&-1)+32|0;l=c[10036]|0;m=0;while(1){if((m|0)>=(j|0)){break}if((a[l+((c[k>>2]|0)+m|0)|0]|0)==(a[m+103664|0]|0)){m=m+1|0}else{break L15783}}if((m|0)==1){break L15781}}}while(0);f=is(d)|0;k=c[f>>2]|0;if((k|0)==2){n=+h[f+8>>3]}else if((k|0)==1){n=+(c[f+8>>2]|0)}else if((k|0)==3){n=+uz(c[f+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}o=n;f=c[13898]|0;if((f|0)>=(c[8272]|0)){break}k=c[1054]|0;L15797:do{if((a[k+(f*40&-1)|0]&1)!=0){l=c[k+(f*40&-1)+36>>2]|0;j=k+(f*40&-1)+32|0;p=c[10036]|0;q=0;while(1){if((q|0)>=(l|0)){break}if((a[p+((c[j>>2]|0)+q|0)|0]|0)==(a[q+103664|0]|0)){q=q+1|0}else{break L15797}}if((q|0)==1){break L15781}}}while(0);f=is(d)|0;k=c[f>>2]|0;if((k|0)==3){r=+uz(c[f+8>>2]|0,0)}else if((k|0)==2){r=+h[f+8>>3]}else if((k|0)==1){r=+(c[f+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g[59224]=o;g[59222]=r}}while(0);r=+g[59222];be(13048,152224,(v=i,i=i+16|0,h[v>>3]=+g[59224],h[v+8>>3]=r,v)|0);i=b;return}function ml(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0;b=i;i=i+24|0;d=b|0;e=c[13898]|0;L15812:do{if((e|0)<(c[8272]|0)){f=c[1054]|0;L15814:do{if((a[f+(e*40&-1)|0]&1)!=0){g=c[f+(e*40&-1)+36>>2]|0;j=f+(e*40&-1)+32|0;k=c[10036]|0;l=0;while(1){if((l|0)>=(g|0)){break}if((a[k+((c[j>>2]|0)+l|0)|0]|0)==(a[l+103664|0]|0)){l=l+1|0}else{break L15814}}if((l|0)==1){m=0;break L15812}}}while(0);f=is(d)|0;j=c[f>>2]|0;if((j|0)==2){n=+h[f+8>>3]}else if((j|0)==1){n=+(c[f+8>>2]|0)}else if((j|0)==3){n=+uz(c[f+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=(~~n|0)==16}else{m=0}}while(0);c[57208]=m&1;d=m?153072:170216;uD(13048,d|0,(uA(d|0)|0)+1|0);i=b;return}function mm(){return}function mn(){return}function mo(a){a=a|0;var b=0;b=(a|0)<0?0:a&7;c[60208]=240840+(b<<2);c[60222]=b;return}function mp(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;aI(154096,3,1,c[10030]|0);e=(d|0)>0?(d|0)%11&-1:0;d=(e|0)>-1?e:-e|0;f=d>>>10;g=d>>>4&63|64;h=d&15|(e>>31)+48&-16;if((f|0)==0){if((g|0)!=64){i=11668}}else{e=f+64|0;f=c[10030]|0;aF(e|0,f|0);i=11668}if((i|0)==11668){i=c[10030]|0;aF(g|0,i|0)}aF(h|0,c[10030]|0);aI(154088,3,1,c[10030]|0);t0(a,b);aD(c[10030]|0);return}function mq(){aF(29,c[10030]|0);aF(32,c[10030]|0);aF(108,c[10030]|0);aF(32,c[10030]|0);aF(64,c[10030]|0);aF(31,c[10030]|0);return}function mr(){aI(154304,2,1,c[10030]|0);aD(c[10030]|0);aB(1);return}function ms(a,b){a=a|0;b=b|0;aF(29,c[10030]|0);aF(b>>>5&31|32|0,c[10030]|0);aF(b&31|96|0,c[10030]|0);aF(a>>>5&31|32|0,c[10030]|0);aF(a&31|64|0,c[10030]|0);c[60220]=a;c[60218]=b;return}function mt(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;if((c[60222]|0)<1){d=b>>>5&31|32;e=c[10030]|0;aF(d|0,e|0);e=b&31|96;d=c[10030]|0;aF(e|0,d|0);d=a>>>5&31|32;e=c[10030]|0;aF(d|0,e|0);e=a&31|64;d=c[10030]|0;aF(e|0,d|0);c[60220]=a;c[60218]=b;return}d=c[60220]|0;e=c[60218]|0;f=a-d|0;g=b-e|0;h=(f|0)>-1;i=(h?f:-f|0)<<1;j=(g|0)>-1;k=(j?g:-g|0)<<1;l=f>>31|1;f=g>>31|1;do{if((i|0)<(k|0)){if((e|0)==(b|0)){m=d;n=b;break}g=j^1;o=e;p=d;q=i-(k>>1)|0;while(1){t$(p,o,0);if((q|0)<1&((q|0)!=0|g)){r=q;s=p}else{r=q-k|0;s=p+l|0}t=o+f|0;if((t|0)==(b|0)){m=s;n=b;break}else{o=t;p=s;q=r+i|0}}}else{if((d|0)==(a|0)){m=a;n=e;break}q=h^1;p=e;o=d;g=k-(i>>1)|0;while(1){t$(o,p,0);if((g|0)<1&((g|0)!=0|q)){u=g;v=p}else{u=g-i|0;v=p+f|0}t=o+l|0;if((t|0)==(a|0)){m=a;n=v;break}else{p=v;o=t;g=u+k|0}}}}while(0);t$(m,n,1);c[60220]=a;c[60218]=b;return}function mu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;f=b-11|0;aF(29,c[10030]|0);aF(f>>>5&31|32|0,c[10030]|0);aF(f&31|96|0,c[10030]|0);aF(a>>>5&31|32|0,c[10030]|0);aF(a&31|64|0,c[10030]|0);cf(c[10030]|0,154112,(v=i,i=i+8|0,c[v>>2]=d,v)|0);i=e;return}function mv(){aI(154432,6,1,c[10030]|0);aD(c[10030]|0);aB(1);return}function mw(){aI(154120,6,1,c[10030]|0);aD(c[10030]|0);aB(1);return}function mx(a,b){a=a|0;b=b|0;aF(29,c[10030]|0);aF(b>>>5&31|32|0,c[10030]|0);aF(b&31|96|0,c[10030]|0);aF(a>>>5&31|32|0,c[10030]|0);aF(a&31|64|0,c[10030]|0);return}function my(a,b){a=a|0;b=b|0;aF(b>>>5&31|32|0,c[10030]|0);aF(b&31|96|0,c[10030]|0);aF(a>>>5&31|32|0,c[10030]|0);aF(a&31|64|0,c[10030]|0);return}function mz(b){b=b|0;var d=0,e=0,f=0;d=i;e=(b|0)<-2?-2:b;if((e|0)>9){f=(e|0)%10&-1}else{f=e}cf(c[10030]|0,154424,(v=i,i=i+8|0,c[v>>2]=a[154144+(f+2|0)|0]|0,v)|0);c[8836]=f;i=d;return}function mA(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;g=c[8836]|0;cf(c[10030]|0,154424,(v=i,i=i+8|0,c[v>>2]=96,v)|0);c[8836]=0;h=d-11|0;aF(29,c[10030]|0);aF(h>>>5&31|32|0,c[10030]|0);aF(h&31|96|0,c[10030]|0);aF(b>>>5&31|32|0,c[10030]|0);aF(b&31|64|0,c[10030]|0);cf(c[10030]|0,154112,(v=i,i=i+8|0,c[v>>2]=e,v)|0);e=(g|0)<-2?-2:g;if((e|0)>9){j=(e|0)%10&-1}else{j=e}cf(c[10030]|0,154424,(v=i,i=i+8|0,c[v>>2]=a[154144+(j+2|0)|0]|0,v)|0);c[8836]=j;i=f;return}function mB(){aI(154160,3,1,c[10030]|0);return}function mC(){aI(154432,6,1,c[10030]|0);aI(154304,2,1,c[10030]|0);return}function mD(b){b=b|0;var e=0,f=0,g=0;e=i;do{if((b|0)==0){f=0}else{g=uA(b|0)|0;if((g|0)==0){f=0;break}f=((d[b+(g-1|0)|0]|0)<<24)-822083584>>24}}while(0);cf(c[10030]|0,154424,(v=i,i=i+8|0,c[v>>2]=a[154344+((f-1|0)>>>0<3?f:0)|0]|0,v)|0);i=e;return 1}function mE(){aI(154432,6,1,c[10030]|0);return}function mF(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0.0,an=0.0,ao=0,ap=0.0,aq=0,ar=0,as=0,at=0.0,au=0.0,av=0.0,aw=0.0,ax=0.0,ay=0,az=0,aA=0;b=i;i=i+240|0;d=b|0;e=b+24|0;f=b+48|0;g=b+72|0;j=b+96|0;k=b+120|0;l=b+144|0;m=b+168|0;n=b+192|0;o=b+216|0;if((c[13898]|0)==2){p=2}else{h[30427]=10.0;h[6936]=10.0;h[6935]=1.0;a[243104]=0;a[243312]=0;uu(c[60826]|0);c[60826]=0;uu(c[60774]|0);c[60774]=0;uu(c[60778]|0);c[60778]=0;h[6931]=1.0;a[55512]=0;h[6938]=1.0;a[243424]=0;p=c[13898]|0}q=c[8272]|0;L15888:do{if((p|0)<(q|0)){r=n|0;s=n+8|0;t=m|0;u=m+8|0;w=l|0;x=l+8|0;y=k|0;z=k+8|0;A=j|0;B=j+8|0;C=g|0;D=g+8|0;E=f|0;F=f+8|0;G=e|0;H=e+8|0;I=d|0;J=d+8|0;K=o|0;L=o+8|0;M=0;N=p;O=q;L15890:while(1){P=c[1054]|0;Q=P+(N*40&-1)|0;L15892:do{if((a[Q]&1)!=0){R=c[P+(N*40&-1)+36>>2]|0;S=P+(N*40&-1)+32|0;T=c[10036]|0;U=0;while(1){if((U|0)>=(R|0)){break}if((a[T+((c[S>>2]|0)+U|0)|0]|0)==(a[U+103664|0]|0)){U=U+1|0}else{break L15892}}if((U|0)==1){V=M;break L15888}}}while(0);W=N+1|0;c[13898]=W;S=c[60782]|0;L15899:do{if((S|0)==0){X=243128}else{T=c[P+(N*40&-1)+36>>2]|0;R=c[P+(N*40&-1)+32>>2]|0;Y=(a[Q]&1)==0;Z=(T|0)>0;_=c[10036]|0;$=243128;aa=S;while(1){L15903:do{if(!Y){if(Z){ab=0;ac=0;ad=R;while(1){ae=a[aa+ab|0]|0;if(ae<<24>>24==(a[_+(ab+ad|0)|0]|0)){af=ad;ag=ac}else{if(ae<<24>>24!=36){break L15903}af=ad-1|0;ag=1}ah=ab+1|0;if((ah|0)<(ag+T|0)){ab=ah;ac=ag;ad=af}else{break}}if((ag|0)==0){ai=ah}else{X=$;break L15899}}else{ai=0}ad=a[aa+ai|0]|0;if((ad<<24>>24|0)==36|(ad<<24>>24|0)==0){X=$;break L15899}}}while(0);ad=$+8|0;ac=c[ad>>2]|0;if((ac|0)==0){X=ad;break}else{$=ad;aa=ac}}}}while(0);S=c[X+4>>2]|0;do{if((S|0)==3){if((W|0)>=(O|0)){aj=11782;break L15890}L15919:do{if((a[P+(W*40&-1)|0]&1)!=0){Q=c[P+(W*40&-1)+36>>2]|0;aa=P+(W*40&-1)+32|0;$=c[10036]|0;T=0;while(1){if((T|0)>=(Q|0)){break}if((a[$+((c[aa>>2]|0)+T|0)|0]|0)==(a[T+103664|0]|0)){T=T+1|0}else{break L15919}}if((T|0)==1){aj=11782;break L15890}}}while(0);a[14176]=1;is(k);a[14176]=0;if((c[y>>2]|0)!=3){aj=11781;break L15890}aa=c[z>>2]|0;c[60826]=aa;if((aa|0)==0){aj=11784;break L15890}if((a[aa+(b4(aa|0,218288)|0)|0]|0)!=0){aj=11787;break L15890}a[243104]=1;ak=M}else if((S|0)==7){a[243312]=1;ak=M}else if((S|0)==8){L15932:do{if((W|0)<(O|0)){L15934:do{if((a[P+(W*40&-1)|0]&1)!=0){aa=c[P+(W*40&-1)+36>>2]|0;$=P+(W*40&-1)+32|0;Q=c[10036]|0;_=0;while(1){if((_|0)>=(aa|0)){break}if((a[Q+((c[$>>2]|0)+_|0)|0]|0)==(a[_+103664|0]|0)){_=_+1|0}else{break L15934}}if((_|0)==1){al=0;break L15932}}}while(0);a[14176]=1;is(f);a[14176]=0;if((c[E>>2]|0)==3){al=c[F>>2]|0;break}else{c[13898]=W;al=0;break}}else{al=0}}while(0);c[60778]=al;ak=M}else if((S|0)==9){c[(c[3524]|0)+68>>2]=46;T=(c[3524]|0)+96|0;c[T>>2]=c[T>>2]|32;ak=M}else if((S|0)==5){if((W|0)>=(O|0)){aj=11770;break L15890}L15948:do{if((a[P+(W*40&-1)|0]&1)!=0){T=c[P+(W*40&-1)+36>>2]|0;$=P+(W*40&-1)+32|0;Q=c[10036]|0;aa=0;while(1){if((aa|0)>=(T|0)){break}if((a[Q+((c[$>>2]|0)+aa|0)|0]|0)==(a[aa+103664|0]|0)){aa=aa+1|0}else{break L15948}}if((aa|0)==1){aj=11770;break L15890}}}while(0);a[14176]=1;is(l);a[14176]=0;if((c[w>>2]|0)!=3){aj=11769;break L15890}$=c[x>>2]|0;c[60774]=$;if(($|0)==0){aj=11772;break L15890}else{ak=M}}else if((S|0)==13){a[55512]=1;ak=M}else if((S|0)==14){$=is(o)|0;Q=c[$>>2]|0;if((Q|0)==2){am=+h[$+8>>3]}else if((Q|0)==3){am=+uz(c[$+8>>2]|0,0)}else if((Q|0)==1){am=+(c[$+8>>2]|0)}else{aj=11854;break L15890}if((c[K>>2]|0)==3){uu(c[L>>2]|0);c[K>>2]=1}h[6938]=am;if(am>.2){ak=M;break}h[6938]=1.0;ak=M}else if((S|0)==0){L15968:do{if((W|0)<(O|0)){L15970:do{if((a[P+(W*40&-1)|0]&1)!=0){$=c[P+(W*40&-1)+36>>2]|0;Q=P+(W*40&-1)+32|0;T=c[10036]|0;R=0;while(1){if((R|0)>=($|0)){break}if((a[T+((c[Q>>2]|0)+R|0)|0]|0)==(a[R+103664|0]|0)){R=R+1|0}else{break L15970}}if((R|0)==1){aj=11735;break L15968}}}while(0);aa=is(n)|0;Q=c[aa>>2]|0;if((Q|0)==3){an=+uz(c[aa+8>>2]|0,0)}else if((Q|0)==1){an=+(c[aa+8>>2]|0)}else if((Q|0)==2){an=+h[aa+8>>3]}else{aj=11740;break L15890}if((c[r>>2]|0)==3){uu(c[s>>2]|0);c[r>>2]=1}aa=~~(+(~~an|0)*10.0);c[13836]=aa;Q=c[13898]|0;L15985:do{if((c[8272]|0)>(Q|0)){T=c[1054]|0;if((a[T+(Q*40&-1)|0]&1)==0){ao=aa;break}$=c[T+(Q*40&-1)+36>>2]|0;_=T+(Q*40&-1)+32|0;T=c[10036]|0;Z=0;while(1){if((Z|0)>=($|0)){break}if((a[T+((c[_>>2]|0)+Z|0)|0]|0)==(a[Z+148464|0]|0)){Z=Z+1|0}else{ao=aa;break L15985}}if((Z|0)!=1){ao=aa;break}c[13898]=Q+1;_=is(m)|0;T=c[_>>2]|0;if((T|0)==2){ap=+h[_+8>>3]}else if((T|0)==3){ap=+uz(c[_+8>>2]|0,0)}else if((T|0)==1){ap=+(c[_+8>>2]|0)}else{aj=11753;break L15890}if((c[t>>2]|0)==3){uu(c[u>>2]|0);c[t>>2]=1}c[13832]=~~(+(~~ap|0)*10.0);ao=c[13836]|0}else{ao=aa}}while(0);if((ao|0)<1){c[13836]=6e3;aq=6e3}else{aq=ao}if((c[13832]|0)>=1){ar=aq;break}c[13832]=4e3;ar=aq}else{aj=11735}}while(0);if((aj|0)==11735){aj=0;c[13836]=6e3;c[13832]=4e3;ar=6e3}c[(c[3524]|0)+8>>2]=ar;c[(c[3524]|0)+12>>2]=c[13832];ak=M}else if((S|0)==10){c[(c[3524]|0)+68>>2]=118;aa=(c[3524]|0)+96|0;c[aa>>2]=c[aa>>2]&-33;ak=M}else if((S|0)==4){a[243104]=0;ak=M}else if((S|0)==1){uu(c[13874]|0);as=c[13898]|0;if((as|0)>=(c[8272]|0)){aj=11798;break L15890}aa=c[1054]|0;L16013:do{if((a[aa+(as*40&-1)|0]&1)!=0){Q=c[aa+(as*40&-1)+36>>2]|0;_=aa+(as*40&-1)+32|0;T=c[10036]|0;$=0;while(1){if(($|0)>=(Q|0)){break}if((a[T+((c[_>>2]|0)+$|0)|0]|0)==(a[$+103664|0]|0)){$=$+1|0}else{break L16013}}if(($|0)==1){aj=11798;break L15890}}}while(0);a[14176]=1;is(j);a[14176]=0;if((c[A>>2]|0)!=3){aj=11797;break L15890}aa=c[B>>2]|0;c[13874]=aa;if((aa|0)==0){aj=11800;break L15890}do{if((a[aa]|0)==0){at=+h[30427];h[6936]=at;au=at}else{_=bk(aa|0,148464)|0;if((a[aa+_|0]|0)!=44){au=+h[6936];break}T=aa+(_+1|0)|0;ca(T|0,148448,(v=i,i=i+8|0,c[v>>2]=55488,v)|0);at=+h[6936];if(at>0.0){au=at;break}at=+h[30427];h[6936]=at;au=at}}while(0);c[(c[3524]|0)+16>>2]=~~(au*+h[6935]*10.0);c[(c[3524]|0)+20>>2]=~~(+h[6936]*+h[6935]*.8*10.0);ak=M}else if((S|0)==15){a[55440]=1;ak=M}else if((S|0)==16){a[55440]=0;ak=M}else if((S|0)==12){a[55512]=0;ak=M}else if((S|0)==2){aa=is(g)|0;T=c[aa>>2]|0;if((T|0)==2){av=+h[aa+8>>3]}else if((T|0)==3){av=+uz(c[aa+8>>2]|0,0)}else if((T|0)==1){av=+(c[aa+8>>2]|0)}else{aj=11813;break L15890}if((c[C>>2]|0)==3){uu(c[D>>2]|0);c[C>>2]=1}at=av>0.0?av:10.0;h[30427]=at;h[6936]=at;ak=M}else if((S|0)==17){aa=hK()|0;be(243424,164384,(v=i,i=i+24|0,c[v>>2]=aa>>>16&255,c[v+8>>2]=aa>>>8&255,c[v+16>>2]=aa&255,v)|0);ak=aa}else if((S|0)==11){aa=is(d)|0;T=c[aa>>2]|0;if((T|0)==1){aw=+(c[aa+8>>2]|0)}else if((T|0)==2){aw=+h[aa+8>>3]}else if((T|0)==3){aw=+uz(c[aa+8>>2]|0,0)}else{aj=11843;break L15890}if((c[I>>2]|0)==3){uu(c[J>>2]|0);c[I>>2]=1}h[6935]=aw;if(aw>0.0){ak=M;break}h[6935]=1.0;ak=M}else if((S|0)==6){aa=is(e)|0;T=c[aa>>2]|0;if((T|0)==2){ax=+h[aa+8>>3]}else if((T|0)==3){ax=+uz(c[aa+8>>2]|0,0)}else if((T|0)==1){ax=+(c[aa+8>>2]|0)}else{aj=11834;break L15890}if((c[G>>2]|0)==3){uu(c[H>>2]|0);c[G>>2]=1}h[6931]=ax;if(ax>0.0){ak=M;break}h[6931]=1.0;ak=M}else{uh(N,217704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);ak=M}}while(0);S=c[13898]|0;P=c[8272]|0;if((S|0)<(P|0)){M=ak;N=S;O=P}else{V=ak;break L15888}}if((aj|0)==11843){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11800){ay=c[13898]|0;uf(ay,154936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11781){c[13898]=W;aj=11782}else if((aj|0)==11769){c[13898]=W;aj=11770}else if((aj|0)==11813){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11854){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11787){uf((c[13898]|0)-1|0,154976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11797){c[13898]=as;aj=11798}else if((aj|0)==11834){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11784){az=c[13898]|0;uf(az,155080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11740){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11772){aA=c[13898]|0;uf(aA,155136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11753){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((aj|0)==11798){c[13874]=0;ay=as;uf(ay,154936,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11782){c[60826]=0;az=W;uf(az,155080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((aj|0)==11770){c[60774]=0;aA=W;uf(aA,155136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{V=0}}while(0);c[(c[3524]|0)+16>>2]=~~(+h[6936]*+h[6935]*10.0);c[(c[3524]|0)+20>>2]=~~(+h[6936]*+h[6935]*.8*10.0);be(13048,(a[55512]|0?95248:154912)|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);ax=+h[6938];if(a[55512]&ax!=1.0){aA=13048+(uA(13048)|0)|0;be(aA|0,154888,(v=i,i=i+8|0,h[v>>3]=ax,v)|0)}aA=13048+(uA(13048)|0)|0;be(aA|0,(a[55440]|0?154872:154864)|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);aA=13048+(uA(13048)|0)|0;W=c[3524]|0;aj=~~(+((c[W+12>>2]|0)>>>0>>>0)/10.0);be(aA|0,154848,(v=i,i=i+16|0,c[v>>2]=~~(+((c[W+8>>2]|0)>>>0>>>0)/10.0),c[v+8>>2]=aj,v)|0);aj=13048+(uA(13048)|0)|0;ax=+h[6936];aw=+h[6931];be(aj|0,154816,(v=i,i=i+24|0,c[v>>2]=(c[(c[3524]|0)+68>>2]|0)==46?154784:179864,h[v+8>>3]=ax,h[v+16>>3]=aw,v)|0);aj=13048+(uA(13048)|0)|0;be(aj|0,154712,(v=i,i=i+8|0,h[v>>3]=+h[6935],v)|0);if((a[243424]|0)!=0){aj=13048+(uA(13048)|0)|0;be(aj|0,170616,(v=i,i=i+8|0,c[v>>2]=V,v)|0)}V=c[60826]|0;aj=13048+(uA(13048)|0)|0;do{if((V|0)==0){uD(aj|0,154600,12);if(a[243312]|0){uD(13048+(uA(13048)|0)|0,154568,9)}W=c[60774]|0;if((W|0)==0){break}aA=13048+(uA(13048)|0)|0;be(aA|0,154544,(v=i,i=i+8|0,c[v>>2]=W,v)|0)}else{be(aj|0,154624,(v=i,i=i+8|0,c[v>>2]=V,v)|0)}}while(0);V=c[60778]|0;if((V|0)==0){i=b;return}be(13048+(uA(13048)|0)|0,154512,(v=i,i=i+8|0,c[v>>2]=V,v)|0);i=b;return}function mG(){return}function mH(){return}function mI(a){a=a|0;c[13840]=-a;return 1}function mJ(){var b=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0,m=0,n=0;b=i;if(a[55472]|0){d=c[10030]|0;aI(165112,14,1,d|0);if(!(a[72328]|0)){d=c[10030]|0;aI(165528,17,1,d|0)}a[55472]=0;a[72328]=1}aI(159504,62,1,c[10030]|0);cf(c[10030]|0,159472,(v=i,i=i+8|0,c[v>>2]=~~(+((c[(c[3524]|0)+8>>2]|0)>>>0>>>0)/10.0),v)|0);cf(c[10030]|0,159440,(v=i,i=i+8|0,c[v>>2]=~~(+((c[(c[3524]|0)+12>>2]|0)>>>0>>>0)/10.0),v)|0);cf(c[10030]|0,159408,(v=i,i=i+8|0,h[v>>3]=+(c[7938]|0)/10.0,v)|0);cf(c[10030]|0,159320,(v=i,i=i+8|0,h[v>>3]=+(c[7939]|0)/10.0,v)|0);cf(c[10030]|0,159248,(v=i,i=i+8|0,h[v>>3]=+(((c[(c[3524]|0)+12>>2]|0)-(c[7940]|0)|0)>>>0>>>0)/10.0,v)|0);cf(c[10030]|0,159216,(v=i,i=i+8|0,h[v>>3]=+(((c[(c[3524]|0)+12>>2]|0)-(c[7941]|0)|0)>>>0>>>0)/10.0,v)|0);cf(c[10030]|0,159176,(v=i,i=i+8|0,h[v>>3]=+((c[7939]|0)-(c[7938]|0)|0)/10.0,v)|0);cf(c[10030]|0,159016,(v=i,i=i+8|0,h[v>>3]=+((c[7941]|0)-(c[7940]|0)|0)/10.0,v)|0);e7(1);do{if((c[16546]|0)!=1){d=e6(72800)|0;do{if((d|0)!=0){e=c[d+16>>2]|0;if((e|0)==1){f=c[10030]|0;g=c[d+24>>2]|0;cf(f|0,158984,(v=i,i=i+16|0,c[v>>2]=158952,c[v+8>>2]=g,v)|0);break}else if((e|0)==2){j=+h[d+24>>3];cf(c[10030]|0,158936,(v=i,i=i+16|0,c[v>>2]=158952,h[v+8>>3]=j,v)|0);break}else{break}}}while(0);d=e6(72544)|0;if((d|0)==0){break}e=c[d+16>>2]|0;if((e|0)==1){g=c[10030]|0;f=c[d+24>>2]|0;cf(g|0,158984,(v=i,i=i+16|0,c[v>>2]=158912,c[v+8>>2]=f,v)|0);break}else if((e|0)==2){j=+h[d+24>>3];cf(c[10030]|0,158936,(v=i,i=i+16|0,c[v>>2]=158912,h[v+8>>3]=j,v)|0);break}else{break}}}while(0);d=e6(225256)|0;do{if((d|0)!=0){e=c[d+16>>2]|0;if((e|0)==1){f=c[10030]|0;g=c[d+24>>2]|0;cf(f|0,158984,(v=i,i=i+16|0,c[v>>2]=158856,c[v+8>>2]=g,v)|0);break}else if((e|0)==2){j=+h[d+24>>3];cf(c[10030]|0,158936,(v=i,i=i+16|0,c[v>>2]=158856,h[v+8>>3]=j,v)|0);break}else{break}}}while(0);d=e6(225200)|0;do{if((d|0)!=0){e=c[d+16>>2]|0;if((e|0)==1){g=c[10030]|0;f=c[d+24>>2]|0;cf(g|0,158984,(v=i,i=i+16|0,c[v>>2]=158832,c[v+8>>2]=f,v)|0);break}else if((e|0)==2){j=+h[d+24>>3];cf(c[10030]|0,158936,(v=i,i=i+16|0,c[v>>2]=158832,h[v+8>>3]=j,v)|0);break}else{break}}}while(0);if((a[30528]&1)!=0){d=c[10030]|0;j=(c[17366]&1|0)==0?+h[8687]:0.0;cf(d|0,158760,(v=i,i=i+8|0,h[v>>3]=j,v)|0)}do{if((c[17261]&3|0)==0){d=c[10030]|0;aI(158560,33,1,d|0)}else{d=e6(224936)|0;do{if((d|0)!=0){e=c[d+16>>2]|0;if((e|0)==1){f=c[10030]|0;g=c[d+24>>2]|0;cf(f|0,158984,(v=i,i=i+16|0,c[v>>2]=158736,c[v+8>>2]=g,v)|0);break}else if((e|0)==2){j=+h[d+24>>3];cf(c[10030]|0,158936,(v=i,i=i+16|0,c[v>>2]=158736,h[v+8>>3]=j,v)|0);break}else{break}}}while(0);d=e6(224872)|0;if((d|0)==0){break}e=c[d+16>>2]|0;if((e|0)==1){g=c[10030]|0;f=c[d+24>>2]|0;cf(g|0,158984,(v=i,i=i+16|0,c[v>>2]=158664,c[v+8>>2]=f,v)|0);break}else if((e|0)==2){j=+h[d+24>>3];cf(c[10030]|0,158936,(v=i,i=i+16|0,c[v>>2]=158664,h[v+8>>3]=j,v)|0);break}else{break}}}while(0);do{if((c[17089]&3|0)==0){d=c[10030]|0;aI(158424,33,1,d|0)}else{d=e6(224640)|0;do{if((d|0)!=0){e=c[d+16>>2]|0;if((e|0)==1){f=c[10030]|0;g=c[d+24>>2]|0;cf(f|0,158984,(v=i,i=i+16|0,c[v>>2]=158520,c[v+8>>2]=g,v)|0);break}else if((e|0)==2){j=+h[d+24>>3];cf(c[10030]|0,158936,(v=i,i=i+16|0,c[v>>2]=158520,h[v+8>>3]=j,v)|0);break}else{break}}}while(0);d=e6(224432)|0;if((d|0)==0){break}e=c[d+16>>2]|0;if((e|0)==2){g=c[10030]|0;j=+h[d+24>>3];cf(g|0,158936,(v=i,i=i+16|0,c[v>>2]=158480,h[v+8>>3]=j,v)|0);break}else if((e|0)==1){e=c[d+24>>2]|0;cf(c[10030]|0,158984,(v=i,i=i+16|0,c[v>>2]=158480,c[v+8>>2]=e,v)|0);break}else{break}}}while(0);cf(c[10030]|0,158392,(v=i,i=i+8|0,c[v>>2]=a[66164]&1,v)|0);cf(c[10030]|0,158360,(v=i,i=i+8|0,c[v>>2]=a[65476]&1,v)|0);if((a[30528]&1)!=0){e=c[10030]|0;d=a[69604]&1;cf(e|0,158328,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}aI(158192,75,1,c[10030]|0);aI(158112,76,1,c[10030]|0);d=c[10030]|0;if((c[16546]|0)==1){j=+h[8255];cf(d|0,158064,(v=i,i=i+8|0,h[v>>3]=j,v)|0);e=c[10030]|0;j=+h[8256];cf(e|0,157952,(v=i,i=i+8|0,h[v>>3]=j,v)|0);e=c[10030]|0;g=c[8510]|0;do{if((g|0)==0){f=c[8506]|0;if((f|0)==4){k=223560;break}k=(f|0)==5?223536:223520}else{k=g}}while(0);cf(e|0,157896,(v=i,i=i+8|0,c[v>>2]=k,v)|0)}else{aI(157856,30,1,d|0)}aI(86144,2,1,c[10030]|0);if(a[243104]|0){l=c[10030]|0;m=aD(l|0)|0;i=b;return}d=c[60778]|0;cf(c[10030]|0,157664,(v=i,i=i+8|0,c[v>>2]=(d|0)!=0?d:179864,v)|0);if(a[243312]|0){d=c[10030]|0;k=c[60778]|0;e=(k|0)!=0?k:179864;cf(d|0,156600,(v=i,i=i+40|0,c[v>>2]=e,c[v+8>>2]=e,c[v+16>>2]=e,c[v+24>>2]=e,c[v+32>>2]=e,v)|0);e=c[13858]|0;d=e+5|0;if((d-((d|0)%6&-1)|0)>=1){d=1;k=e;do{e=(d|0)%6&-1;if((e|0)==1){g=c[10030]|0;aI(156592,6,1,g|0);n=c[13858]|0}else{n=k}g=c[10030]|0;if((d|0)>(n|0)){aI(156256,28,1,g|0)}else{cf(g|0,156408,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=d,v)|0)}if((e|0)==0){e=c[10030]|0;aI(156248,7,1,e|0)}d=d+1|0;k=c[13858]|0;e=k+5|0;}while((d|0)<=(e-((e|0)%6&-1)|0))}d=c[10030]|0;aI(156152,72,1,d|0);d=c[10030]|0;aI(155832,262,1,d|0);if((c[17261]&3|0)!=0){d=c[10030]|0;aI(155680,105,1,d|0)}if((c[17089]&3|0)!=0){d=c[10030]|0;aI(155568,105,1,d|0)}d=c[10030]|0;aI(155536,28,1,d|0);d=c[10030]|0;aI(155504,10,1,d|0)}d=c[3524]|0;k=~~(+((c[d+12>>2]|0)>>>0>>>0)/10.0);cf(c[10030]|0,155296,(v=i,i=i+16|0,c[v>>2]=~~(+((c[d+8>>2]|0)>>>0>>>0)/10.0),c[v+8>>2]=k,v)|0);if(a[243312]|0){k=c[10030]|0;aI(155248,19,1,k|0)}aI(155168,24,1,c[10030]|0);l=c[10030]|0;m=aD(l|0)|0;i=b;return}function mK(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0;b=i;c[13864]=-5;c[13840]=0;a[55472]=0;c[13842]=-1;a[55390]=0;a[55408]=0;uD(55372,163848,17);c[13858]=0;d=c[60778]|0;if((d|0)==0){e=bP(221464)|0;c[60778]=e;f=e}else{f=d}d=uA(f|0)|0;do{if((a[f]|0)!=0){if((a[f+(d-1|0)|0]|0)==47){break}e=db(f,d+2|0,221440)|0;c[60778]=e;g=e+(uA(e|0)|0)|0;w=47;a[g]=w&255;w=w>>8;a[g+1|0]=w&255}}while(0);d=c[10030]|0;if(a[243104]|0){f=c[60826]|0;cf(d|0,161488,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=f,v)|0);f=c[10030]|0;g=c[60826]|0;e=(a[30528]&1)!=0?225e3:224992;j=c[3524]|0;k=~~(+((c[j+8>>2]|0)>>>0>>>0)/10.0);l=~~(+((c[j+12>>2]|0)>>>0>>>0)/10.0);cf(f|0,160752,(v=i,i=i+64|0,c[v>>2]=g,c[v+8>>2]=g,c[v+16>>2]=g,c[v+24>>2]=g,c[v+32>>2]=g,c[v+40>>2]=e,c[v+48>>2]=k,c[v+56>>2]=l,v)|0)}else{l=c[60774]|0;k=(l|0)!=0?l:162656;cf(d|0,162680,(v=i,i=i+8|0,c[v>>2]=k,v)|0);k=c[11252]|0;if((k|0)==15|(k|0)==0){d=c[10030]|0;aI(162584,68,1,d|0);m=c[11252]|0}else{m=k}k=c[10030]|0;d=c[60778]|0;l=(m|0)==15?162360:162344;cf(k|0,162424,(v=i,i=i+24|0,c[v>>2]=d,c[v+8>>2]=l,c[v+16>>2]=d,v)|0);if(a[55512]|0){d=c[10030]|0;l=c[60778]|0;cf(d|0,162272,(v=i,i=i+8|0,c[v>>2]=l,v)|0)}l=c[10030]|0;if(a[243312]|0){d=c[60778]|0;cf(l|0,162144,(v=i,i=i+8|0,c[v>>2]=d,v)|0);d=c[10030]|0;k=c[60778]|0;cf(d|0,162048,(v=i,i=i+8|0,c[v>>2]=k,v)|0)}else{aI(161928,70,1,l|0)}l=c[10030]|0;aI(161664,257,1,l|0)}cf(c[10030]|0,160720,(v=i,i=i+16|0,c[v>>2]=40152,c[v+8>>2]=40160,v)|0);aI(159864,807,1,c[10030]|0);if(a[55512]|0){l=c[10030]|0;k=~~(+h[6938]*200.0);cf(l|0,159832,(v=i,i=i+8|0,c[v>>2]=k,v)|0)}k=a[55440]|0;cf(c[10030]|0,159776,(v=i,i=i+16|0,c[v>>2]=k?131936:137232,c[v+8>>2]=k?131936:75184,v)|0);if((a[243424]|0)==0){n=c[10030]|0;o=+h[6931];p=cf(n|0,159584,(v=i,i=i+8|0,h[v>>3]=o,v)|0)|0;i=b;return}k=c[3524]|0;l=~~(+((c[k+8>>2]|0)>>>0>>>0)/10.0);d=~~(+((c[k+12>>2]|0)>>>0>>>0)/10.0);cf(c[10030]|0,159696,(v=i,i=i+24|0,c[v>>2]=243424,c[v+8>>2]=l,c[v+16>>2]=d,v)|0);n=c[10030]|0;o=+h[6931];p=cf(n|0,159584,(v=i,i=i+8|0,h[v>>3]=o,v)|0)|0;i=b;return}function mL(b,d){b=b|0;d=d|0;var e=0,f=0;e=i;f=a[55472]|0;if(f&(c[13838]|0)==(b|0)&(c[13834]|0)==(d|0)){i=e;return}if(!f){f=c[10030]|0;aI(162736,17,1,f|0);a[55472]=1;a[72328]=0}f=(c[13832]|0)-d|0;cf(c[10030]|0,162768,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=f,v)|0);c[13838]=b;c[13834]=d;i=e;return}function mM(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;f=c[13838]|0;g=c[13834]|0;if((f|0)==(b|0)&(g|0)==(d|0)){i=e;return}if(!(a[55472]|0)){h=c[10030]|0;aI(162736,17,1,h|0);a[55472]=1;a[72328]=0;h=c[10030]|0;j=(c[13832]|0)-g|0;cf(h|0,162768,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=j,v)|0);c[13838]=f;c[13834]=g}g=(c[13832]|0)-d|0;cf(c[10030]|0,162808,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=g,v)|0);c[13838]=b;c[13834]=d;i=e;return}function mN(b){b=b|0;var d=0,e=0,f=0;d=i;if((c[13864]|0)==(b|0)){i=d;return}c[13864]=b;if(a[55472]|0){e=c[10030]|0;aI(165112,14,1,e|0);if(!(a[72328]|0)){e=c[10030]|0;aI(165528,17,1,e|0)}a[55472]=0;a[72328]=1}if((b|0)>13){f=(b|0)%14&-1}else{f=b}b=(f|0)>-3;e=b?f:-3;if(b|(a[243424]|0)==0){b=c[243320+(e+3<<2)>>2]|0;uB(55372,b|0)}else{uB(55372,243424)}if((aY(55372,55390)|0)!=0){b=c[10030]|0;cf(b|0,164320,(v=i,i=i+8|0,c[v>>2]=55372,v)|0);uB(55390,55372)}if(!(a[55512]|0)){i=d;return}if((e-1|0)>>>0<4){b=c[10030]|0;f=e+1|0;cf(b|0,162968,(v=i,i=i+8|0,c[v>>2]=f,v)|0);i=d;return}f=c[10030]|0;if((e|0)==-1){aI(162920,26,1,f|0);i=d;return}else{aI(164808,19,1,f|0);i=d;return}}function mO(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0.0,m=0;f=i;if((e|0)==0){i=f;return}if((a[e]|0)==0){i=f;return}if(a[55472]|0){g=c[10030]|0;aI(165112,14,1,g|0);if(!(a[72328]|0)){g=c[10030]|0;aI(165528,17,1,g|0)}a[55472]=0;a[72328]=1}g=c[13840]|0;j=c[10030]|0;k=~~(+(c[13832]|0)+50.0- +(d>>>0>>>0));l=+h[6936]*+h[6935];d=c[13866]|0;if((g|0)==0){cf(j|0,164024,(v=i,i=i+32|0,c[v>>2]=b,c[v+8>>2]=k,h[v+16>>3]=l,c[v+24>>2]=d,v)|0)}else{cf(j|0,164152,(v=i,i=i+40|0,c[v>>2]=b,c[v+8>>2]=k,c[v+16>>2]=g,h[v+24>>3]=l,c[v+32>>2]=d,v)|0)}d=e;g=a[e]|0;do{if((g<<24>>24|0)==34|(g<<24>>24|0)==92){e=c[10030]|0;aF(92,e|0);m=a[d]|0}else{m=g}d=d+1|0;aF(m<<24>>24|0,c[10030]|0);g=a[d]|0;}while(g<<24>>24!=0);aI(163984,4,1,c[10030]|0);i=f;return}function mP(a){a=a|0;if((a|0)==2){c[13866]=164216}else if((a|0)==1){c[13866]=173184}else{c[13866]=179864}return 1}function mQ(a){a=a|0;return 0}function mR(a){a=+a;h[30390]=a<0.0?1.0:a;return}function mS(b,d,e,f,g,i){b=b|0;d=+d;e=+e;f=f|0;g=g|0;i=i|0;if((i|0)==3){c[59636]=c[13838];c[59634]=c[13834];return}else if((i|0)==4){c[13838]=c[59636];c[13834]=c[59634];return}else{if(a[238512]|0){return}a[238512]=1;c[11232]=43856;h[29815]=d;h[29816]=e*10.0;a[238496]=g&1;a[238480]=f&1;a[238504]=(i|0)!=0&1;return}}function mT(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0.0,j=0;f=i;g=+h[30390]*.6*100.0;j=(e|0)%9&-1;if(g<=0.0&(j|0)>-1){i=f;return}if(a[55472]|0){e=c[10030]|0;aI(165112,14,1,e|0);if(!(a[72328]|0)){e=c[10030]|0;aI(165528,17,1,e|0)}a[55472]=0;a[72328]=1}do{if((j|0)==4|(j|0)==6|(j|0)==8){if((aY(55408,55372)|0)==0){break}e=c[10030]|0;cf(e|0,164776,(v=i,i=i+8|0,c[v>>2]=55372,v)|0);uB(55408,55372)}else if(!((j|0)==0|(j|0)==1|(j|0)==2|(j|0)==3|(j|0)==5|(j|0)==7)){e=(c[13832]|0)-d|0;cf(c[10030]|0,164256,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=e,v)|0);i=f;return}}while(0);e=(c[13832]|0)-d|0;cf(c[10030]|0,164232,(v=i,i=i+32|0,c[v>>2]=j,c[v+8>>2]=b,c[v+16>>2]=e,h[v+24>>3]=g,v)|0);i=f;return}function mU(b){b=b|0;var d=0,e=0,f=0,g=0.0,j=0,k=0.0;d=i;do{if((b|0)==0){e=12072}else{if((a[b]|0)==0){e=12072;break}f=bk(b|0,148464)|0;if((a[b+f|0]|0)!=44){g=+h[6936];break}j=b+(f+1|0)|0;ca(j|0,148448,(v=i,i=i+8|0,c[v>>2]=55488,v)|0);k=+h[6936];if(k>0.0){g=k;break}k=+h[30427];h[6936]=k;g=k}}while(0);if((e|0)==12072){k=+h[30427];h[6936]=k;g=k}c[(c[3524]|0)+16>>2]=~~(g*+h[6935]*10.0);c[(c[3524]|0)+20>>2]=~~(+h[6936]*+h[6935]*.8*10.0);i=d;return 1}function mV(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0;h=i;tW(b);if(a[55512]|0){b=c[10030]|0;aI(164808,19,1,b|0);c[13864]=-5}if((aY(55408,243392)|0)!=0){b=c[10030]|0;cf(b|0,164776,(v=i,i=i+8|0,c[v>>2]=243392,v)|0);uB(55408,243392)}b=(c[13832]|0)-(g+e|0)|0;cf(c[10030]|0,164272,(v=i,i=i+32|0,c[v>>2]=d,c[v+8>>2]=b,c[v+16>>2]=f,c[v+24>>2]=g,v)|0);i=h;return}function mW(b){b=+b;var d=0,e=0;d=i;if(a[55472]|0){e=c[10030]|0;aI(165112,14,1,e|0);if(!(a[72328]|0)){e=c[10030]|0;aI(165528,17,1,e|0)}a[55472]=0;a[72328]=1}if(+(c[13842]|0)==b){i=d;return}cf(c[10030]|0,164296,(v=i,i=i+8|0,h[v>>3]=+h[6931]*b,v)|0);c[13842]=~~b;i=d;return}function mX(b){b=b|0;var e=0,f=0,g=0;e=i;i=i+8|0;f=e|0;g=c[b>>2]|0;if((g|0)==5){fr(+h[b+8>>3],f)}else if((g|0)==1){mN(c[b+4>>2]|0);i=e;return}else if((g|0)==3){g=c[b+4>>2]|0;a[f|0]=g>>>16&255;a[f+1|0]=g>>>8&255;a[f+2|0]=g&255}else{i=e;return}if(a[55472]|0){g=c[10030]|0;aI(165112,14,1,g|0);if(!(a[72328]|0)){g=c[10030]|0;aI(165528,17,1,g|0)}a[55472]=0;a[72328]=1}g=d[f+1|0]|0;b=d[f+2|0]|0;be(55372,164384,(v=i,i=i+24|0,c[v>>2]=d[f|0]|0,c[v+8>>2]=g,c[v+16>>2]=b,v)|0);if((aY(55372,55390)|0)!=0){b=c[10030]|0;cf(b|0,164320,(v=i,i=i+8|0,c[v>>2]=55372,v)|0);uB(55390,55372)}c[13864]=-5;i=e;return}function mY(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;if(a[55472]|0){f=c[10030]|0;aI(165112,14,1,f|0);if(!(a[72328]|0)){f=c[10030]|0;aI(165528,17,1,f|0)}a[55472]=0;a[72328]=1}if(a[55512]|0){f=c[10030]|0;aI(164808,19,1,f|0);c[13864]=-5}f=d+8|0;g=c[f>>2]|0;do{if(!((g|0)==1601|(g|0)==3)){tW(g);if((aY(55408,243392)|0)==0){break}h=c[10030]|0;cf(h|0,164776,(v=i,i=i+8|0,c[v>>2]=243392,v)|0);uB(55408,243392)}}while(0);g=(c[13832]|0)-(c[d+4>>2]|0)|0;cf(c[10030]|0,164760,(v=i,i=i+16|0,c[v>>2]=c[d>>2],c[v+8>>2]=g,v)|0);if((b|0)>1){g=1;do{h=(c[13832]|0)-(c[d+(g*12&-1)+4>>2]|0)|0;cf(c[10030]|0,164744,(v=i,i=i+16|0,c[v>>2]=c[d+(g*12&-1)>>2],c[v+8>>2]=h,v)|0);g=g+1|0;}while((g|0)<(b|0))}b=c[f>>2]|0;if((b|0)==1601|(b|0)==3){b=c[10030]|0;aI(164680,8,1,b|0);i=e;return}else{b=c[10030]|0;aI(164736,7,1,b|0);i=e;return}}function mZ(){var b=0.0,d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0.0;if(!(a[238512]|0)){return}a[238512]=0;a[c[11232]|0]=0;b=+h[6936];d=c[13838]|0;e=c[13834]|0;f=43856+(uA(43856)|0)|0;g=a[43856]|0;L16425:do{if(g<<24>>24==0){i=0}else{j=(c[11252]|0)==15;k=0;l=43856;m=g;while(1){n=m<<24>>24;if((n&128|0)==0){do{if((aZ(165104,n|0,5)|0)==0){if((aZ(165088,n|0,9)|0)!=0){o=k+10|0;break}if((aZ(165080,n|0,4)|0)!=0){o=k+12|0;break}if((aZ(165072,n|0,8)|0)!=0){o=k+14|0;break}if((aZ(165032,n|0,15)|0)!=0){o=k+16|0;break}if((aZ(165008,n|0,18)|0)!=0){o=k+18|0;break}if((aZ(164944,n|0,10)|0)!=0){o=k+24|0;break}if((aZ(164840,n|0,2)|0)==0){o=k+20|0;break}else{o=k+30|0;break}}else{o=k+8|0}}while(0);p=l+1|0;q=o}else{do{if(j){if((n&224|0)==192){r=l+2|0;break}if((n&240|0)==224){r=l+3|0;break}else{r=l+4|0;break}}else{r=l+1|0}}while(0);n=k+18|0;if(r>>>0>f>>>0){i=n;break L16425}else{p=r;q=n}}n=a[p]|0;if(n<<24>>24==0){i=q;break}else{k=q;l=p;m=n}}}}while(0);s=+h[29815];t=s*+(i|0)*10.0/25.0;h[6936]=s;s=+(c[13840]|0)*1.5707963267948966/90.0;u=+T(+s);v=+h[29816];i=~~(+(d|0)+u*v);d=~~(+(e|0)+v*+S(+s));do{if((a[238496]&1)!=0){if(a[238488]|0){break}mO(i,d,43856)}}while(0);do{if((a[238504]&1)==0){if((a[238480]&1)==0){break}s=+(c[13840]|0)*1.5707963267948966/90.0;v=t*+S(+s);c[13838]=~~(v+ +(c[13838]|0));v=t*+T(+s);c[13834]=~~(+(c[13834]|0)-v)}else{v=+(c[13840]|0)*1.5707963267948966/90.0;s=t*+S(+v)*.5;c[13838]=~~(+(c[13838]|0)+s);s=t*+T(+v)*.5;c[13834]=~~(+(c[13834]|0)-s)}}while(0);h[6936]=b;return}function m_(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=c[60826]|0;f=(e|0)!=0?e:165512;if((b|0)==0|(b|0)==10){c[13858]=0;i=d;return}else if((b|0)==6){e=(c[13858]|0)+1|0;c[13858]=e;if(a[55472]|0){g=c[10030]|0;aI(165112,14,1,g|0);if(!(a[72328]|0)){g=c[10030]|0;aI(165528,17,1,g|0)}a[55472]=0;a[72328]=1;h=c[13858]|0}else{h=e}cf(c[10030]|0,165424,(v=i,i=i+32|0,c[v>>2]=f,c[v+8>>2]=h,c[v+16>>2]=f,c[v+24>>2]=h,v)|0);i=d;return}else if((b|0)==7){if(a[55472]|0){h=c[10030]|0;aI(165112,14,1,h|0);if(!(a[72328]|0)){h=c[10030]|0;aI(165528,17,1,h|0)}a[55472]=0;a[72328]=1}h=c[13858]|0;cf(c[10030]|0,165376,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=h,v)|0);c[13864]=-5;c[13842]=-1;a[55390]=0;a[55408]=0;i=d;return}else if((b|0)==3){aI(165224,94,1,c[10030]|0);i=d;return}else if((b|0)==4){aI(165160,43,1,c[10030]|0);i=d;return}else{i=d;return}}function m$(b){b=b|0;if((b|0)!=1){return}aI(165528,17,1,c[10030]|0);a[72328]=1;return}function m0(){var b=0,d=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0.0,Y=0.0,Z=0,_=0,$=0,ab=0.0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0.0,ao=0;b=i;i=i+120|0;d=b|0;f=b+24|0;g=b+48|0;j=b+72|0;k=b+96|0;l=b+104|0;m=b+112|0;if((c[13898]|0)==2){n=2}else{tV();n=c[13898]|0}o=c[8272]|0;L16513:do{if((n|0)<(o|0)){p=d|0;q=d+8|0;r=f|0;s=f+8|0;t=j|0;u=j+8|0;w=g|0;x=g+8|0;y=n;z=o;L16515:while(1){A=c[1054]|0;B=a[A+(y*40&-1)|0]|0;C=(B&1)==0;L16517:do{if(!C){D=c[A+(y*40&-1)+36>>2]|0;E=A+(y*40&-1)+32|0;F=c[10036]|0;G=0;while(1){if((G|0)>=(D|0)){break}if((a[F+((c[E>>2]|0)+G|0)|0]|0)==(a[G+103664|0]|0)){G=G+1|0}else{break L16517}}if((G|0)==1){break L16513}}}while(0);E=c[60494]|0;L16524:do{if((E|0)==0){H=241976}else{F=c[A+(y*40&-1)+36>>2]|0;D=c[A+(y*40&-1)+32>>2]|0;I=(F|0)>0;J=c[10036]|0;K=241976;L=E;while(1){L16528:do{if(!C){if(I){M=0;N=0;O=D;while(1){P=a[L+M|0]|0;if(P<<24>>24==(a[J+(M+O|0)|0]|0)){Q=O;R=N}else{if(P<<24>>24!=36){break L16528}Q=O-1|0;R=1}S=M+1|0;if((S|0)<(R+F|0)){M=S;N=R;O=Q}else{break}}if((R|0)==0){T=S}else{H=K;break L16524}}else{T=0}O=a[L+T|0]|0;if((O<<24>>24|0)==36|(O<<24>>24|0)==0){H=K;break L16524}}}while(0);O=K+8|0;N=c[O>>2]|0;if((N|0)==0){H=O;break}else{K=O;L=N}}}}while(0);E=c[H+4>>2]|0;L16541:do{if((E|0)==12){c[13898]=y+1;L=hK()|0;c[13828]=L;if((c[13554]|0)==0){c[13554]=1;K=ut(16)|0;if((K|0)==0){gk();F=ut(16)|0;if((F|0)==0){U=12256;break L16515}else{V=F}}else{V=K}K=V;c[13550]=K;c[K>>2]=0;W=c[13828]|0}else{W=L}c[(c[13550]|0)+4>>2]=W>>>16&255;c[(c[13550]|0)+8>>2]=(c[13828]|0)>>>8&255;c[(c[13550]|0)+12>>2]=c[13828]&255}else if((E|0)==7){a[54576]=0;c[13898]=y+1}else if((E|0)==8){a[54576]=1;c[13898]=y+1}else if((E|0)==1){a[54400]=0;c[13898]=y+1}else if((E|0)==4){a[54472]=0;L=(c[3524]|0)+96|0;c[L>>2]=c[L>>2]&-1025;c[13898]=(c[13898]|0)+1}else if((E|0)==0){a[54400]=1;c[13898]=y+1}else if((E|0)==5){a[54336]=0;c[13898]=y+1}else if((E|0)==9){L=y+1|0;c[13898]=L;if((L|0)>=(z|0)){break}L16557:do{if((a[A+(L*40&-1)|0]&1)!=0){K=c[A+(L*40&-1)+36>>2]|0;F=A+(L*40&-1)+32|0;J=c[10036]|0;D=0;while(1){if((D|0)>=(K|0)){break}if((a[J+((c[F>>2]|0)+D|0)|0]|0)==(a[D+103664|0]|0)){D=D+1|0}else{break L16557}}if((D|0)==1){break L16541}}}while(0);L=is(j)|0;F=c[L>>2]|0;if((F|0)==2){X=+h[L+8>>3]}else if((F|0)==3){X=+uz(c[L+8>>2]|0,0)}else if((F|0)==1){X=+(c[L+8>>2]|0)}else{U=12233;break L16515}if((c[t>>2]|0)==3){uu(c[u>>2]|0);c[t>>2]=1}L=~~X;c[13622]=L;if(!((L|0)==0|L>>>0>1e4)){break}uh(c[13898]|0,166032,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[13622]=1}else if((E|0)==2){tV();c[13898]=(c[13898]|0)+1}else if((E|0)==10){L=y+1|0;c[13898]=L;if((L|0)>=(z|0)){break}L16666:do{if((a[A+(L*40&-1)|0]&1)!=0){F=c[A+(L*40&-1)+36>>2]|0;J=A+(L*40&-1)+32|0;K=c[10036]|0;I=0;while(1){if((I|0)>=(F|0)){break}if((a[K+((c[J>>2]|0)+I|0)|0]|0)==(a[I+103664|0]|0)){I=I+1|0}else{break L16666}}if((I|0)==1){break L16541}}}while(0);L=is(g)|0;J=c[L>>2]|0;if((J|0)==2){Y=+h[L+8>>3]}else if((J|0)==1){Y=+(c[L+8>>2]|0)}else if((J|0)==3){Y=+uz(c[L+8>>2]|0,0)}else{U=12248;break L16515}if((c[w>>2]|0)==3){uu(c[x>>2]|0);c[w>>2]=1}L=~~Y;c[13604]=L;if(L>>>0<=1e4){break}uh(c[13898]|0,166008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);c[13604]=432}else if((E|0)==6){a[54336]=1;c[13898]=y+1}else if((E|0)==11){a[54424]=1;c[13898]=y+1}else if((E|0)==3){a[54472]=1;L=(c[3524]|0)+96|0;c[L>>2]=c[L>>2]|1024;c[13898]=(c[13898]|0)+1}else{L=c[10036]|0;J=c[A+(y*40&-1)+32>>2]|0;K=L+J|0;if((a[K]|0)==120){if((ca(K|0,165992,(v=i,i=i+24|0,c[v>>2]=k,c[v+8>>2]=l,c[v+16>>2]=m,v)|0)|0)!=3){U=12261;break L16515}K=c[13554]|0;F=c[13552]|0;if((K|0)<(F|0)){Z=K}else{K=(F<<1)+4|0;c[13552]=K;F=db(c[13550]|0,K*12&-1|4,167368)|0;c[13550]=F;c[F>>2]=0;Z=c[13554]|0}c[(c[13550]|0)+((Z*3&-1)+1<<2)>>2]=e[k>>1]|0;c[(c[13550]|0)+(((c[13554]|0)*3&-1)+2<<2)>>2]=e[l>>1]|0;c[(c[13550]|0)+(((c[13554]|0)*3&-1)+3<<2)>>2]=e[m>>1]|0;c[13554]=(c[13554]|0)+1;c[13898]=(c[13898]|0)+1;break}L16582:do{if((z|0)<=(y|0)|C){_=y;$=B}else{F=c[A+(y*40&-1)+36>>2]|0;K=0;while(1){if((K|0)>=(F|0)){break}if((a[L+(J+K|0)|0]|0)==(a[K+124352|0]|0)){K=K+1|0}else{_=y;$=B;break L16582}}if((K|0)!=4){_=y;$=B;break}F=y+1|0;c[13898]=F;_=F;$=a[A+(F*40&-1)|0]|0}}while(0);J=($&1)==0;if(J){U=12273}else{F=a[L+(c[A+(_*40&-1)+32>>2]|0)|0]|0;if(!((F<<24>>24|0)==39|(F<<24>>24|0)==34)){U=12273}}L16592:do{if((U|0)==12273){U=0;F=c[10810]|0;L16594:do{if((F|0)!=0){I=A+(_*40&-1)+36|0;D=A+(_*40&-1)+32|0;G=F;L16596:while(1){N=c[G+4>>2]|0;L16598:do{if(!((z|0)<=(_|0)|J)){O=c[I>>2]|0;M=0;while(1){if((M|0)>=(O|0)){break}if((a[L+((c[D>>2]|0)+M|0)|0]|0)==(a[N+M|0]|0)){M=M+1|0}else{break L16598}}if((a[N+M|0]|0)==0){break L16596}}}while(0);N=c[G>>2]|0;if((N|0)==0){break L16594}else{G=N}}if((a[G+8|0]&1)!=0){break}if((c[G+16>>2]|0)==3){break L16592}}}while(0);F=is(d)|0;K=c[F>>2]|0;if((K|0)==2){ab=+h[F+8>>3]}else if((K|0)==3){ab=+uz(c[F+8>>2]|0,0)}else if((K|0)==1){ab=+(c[F+8>>2]|0)}else{U=12321;break L16515}if((c[p>>2]|0)==3){uu(c[q>>2]|0);c[p>>2]=1}c[13628]=~~ab;break L16541}}while(0);L16617:do{if((_|0)<(z|0)){L16619:do{if(!J){F=c[A+(_*40&-1)+36>>2]|0;K=A+(_*40&-1)+32|0;D=0;while(1){if((D|0)>=(F|0)){break}if((a[L+((c[K>>2]|0)+D|0)|0]|0)==(a[D+103664|0]|0)){D=D+1|0}else{break L16619}}if((D|0)==1){ac=0;break L16617}}}while(0);a[14176]=1;is(f);a[14176]=0;if((c[r>>2]|0)==3){ac=c[s>>2]|0;break}else{c[13898]=_;ac=0;break}}else{ac=0}}while(0);L=a8(ac|0,44)|0;do{if((L|0)!=0){if((ca(L+1|0,21e4,(v=i,i=i+8|0,c[v>>2]=54512,v)|0)|0)!=1){break}a[L]=0}}while(0);L16634:do{if((a[ac]|0)==0){L=uA(54528)|0;J=c[13630]|0;K=c[J>>2]|0;if((K|0)==0){ad=J;U=12305;break}else{ae=0;af=K}while(1){if((uA(af|0)|0)==(L|0)){if((uJ(54528,af|0,L|0)|0)==0){ag=ae;ah=J;U=12304;break L16634}}K=ae+1|0;F=c[J+(K<<4)>>2]|0;if((F|0)==0){ad=J;U=12305;break}else{ae=K;af=F}}}else{J=uA(ac|0)|0;L=c[13630]|0;F=c[L>>2]|0;if((F|0)==0){ad=L;U=12305;break}else{ai=0;aj=F}while(1){if((uA(aj|0)|0)==(J|0)){if((uJ(ac|0,aj|0,J|0)|0)==0){ag=ai;ah=L;U=12304;break L16634}}F=ai+1|0;K=c[L+(F<<4)>>2]|0;if((K|0)==0){ad=L;U=12305;break}else{ai=F;aj=K}}}}while(0);do{if((U|0)==12304){U=0;if((ag|0)==-1){ad=ah;U=12305;break}uu(ac);ak=ag;al=c[13630]|0}}while(0);if((U|0)==12305){U=0;L=0;while(1){if((c[ad+(L<<4)>>2]|0)==0){break}else{L=L+1|0}}J=(L<<4)+32|0;K=ut(J)|0;if((K|0)==0){gk();F=ut(J)|0;if((F|0)==0){U=12309;break L16515}else{am=F}}else{am=K}K=am;c[am>>2]=ac;h[am+8>>3]=1.0;if((L|0)>=0){F=c[13630]|0;J=0;while(1){G=J+1|0;I=K+(G<<4)|0;N=F+(J<<4)|0;c[I>>2]=c[N>>2];c[I+4>>2]=c[N+4>>2];c[I+8>>2]=c[N+8>>2];c[I+12>>2]=c[N+12>>2];if((G|0)>(L|0)){break}else{J=G}}}c[13630]=K;ak=0;al=K}uF(54528,c[al+(ak<<4)>>2]|0,32)}}while(0);y=c[13898]|0;z=c[8272]|0;if((y|0)>=(z|0)){break L16513}}if((U|0)==12321){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((U|0)==12233){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((U|0)==12256){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=167368,v)|0)}else if((U|0)==12248){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((U|0)==12261){uf(c[13898]|0,165952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((U|0)==12309){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=166248,v)|0)}}}while(0);U=(c[3524]|0)+8|0;if(a[54400]|0){c[U>>2]=23478;c[(c[3524]|0)+12>>2]=32585}else{c[U>>2]=32585;c[(c[3524]|0)+12>>2]=23478}U=uA(54528)|0;ak=c[13630]|0;al=c[ak>>2]|0;L16698:do{if((al|0)==0){an=1.0}else{am=0;ac=al;while(1){if((uA(ac|0)|0)==(U|0)){if((uJ(54528,ac|0,U|0)|0)==0){break}}ad=am+1|0;ag=c[ak+(ad<<4)>>2]|0;if((ag|0)==0){an=1.0;break L16698}else{am=ad;ac=ag}}an=+h[ak+(am<<4)+8>>3]}}while(0);ak=c[3524]|0;c[ak+16>>2]=aa((((c[ak+8>>2]|0)+182|0)>>>0)/((c[13604]|0)>>>0)>>>0,c[13628]|0);ak=c[3524]|0;c[ak+20>>2]=~~(an*+(aa((((c[ak+8>>2]|0)+182|0)>>>0)/((c[13604]|0)>>>0)>>>0,c[13628]|0)>>>0>>>0)*.527);ak=c[13628]|0;be(242752,165944,(v=i,i=i+16|0,c[v>>2]=54528,c[v+8>>2]=ak,v)|0);ak=a[54472]|0?116408:116440;U=a[54336]|0?185368:185408;al=a[54576]|0?131504:131584;ac=a[54424]|0?165816:179864;ag=c[13604]|0;ad=c[13622]|0;ah=c[13628]|0;be(13048,165832,(v=i,i=i+72|0,c[v>>2]=a[54400]|0?78720:78704,c[v+8>>2]=ak,c[v+16>>2]=U,c[v+24>>2]=al,c[v+32>>2]=ac,c[v+40>>2]=ag,c[v+48>>2]=ad,c[v+56>>2]=54528,c[v+64>>2]=ah,v)|0);ah=c[13554]|0;do{if((ah|0)>0){ad=0;ag=ah;while(1){ac=uA(13048)|0;if((ac+9|0)>>>0>=1024){ao=ag;break}al=ad*3&-1;U=c[13550]|0;ak=c[U+(al+2<<2)>>2]|0;aj=c[U+(al+3<<2)>>2]|0;be(ac+13048|0,165744,(v=i,i=i+24|0,c[v>>2]=c[U+(al+1<<2)>>2],c[v+8>>2]=ak,c[v+16>>2]=aj,v)|0);aj=ad+1|0;ak=c[13554]|0;if((aj|0)<(ak|0)){ad=aj;ag=ak}else{ao=ak;break}}if((ao|0)<96){break}i=b;return}}while(0);ao=db(c[13550]|0,1156,167368)|0;c[13550]=ao;c[ao>>2]=0;ao=c[13554]|0;if((ao|0)<96){ah=ao;ag=ao*3&-1;do{c[(c[13550]|0)+(ag+1<<2)>>2]=(c[(c[7642]|0)+(ah<<3)+4>>2]|0)>>>16&255;c[(c[13550]|0)+(ag+2<<2)>>2]=(c[(c[7642]|0)+(ah<<3)+4>>2]|0)>>>8&255;ag=ag+3|0;c[(c[13550]|0)+(ag<<2)>>2]=c[(c[7642]|0)+(ah<<3)+4>>2]&255;ah=ah+1|0;}while((ah|0)<96)}c[13554]=96;i=b;return}function m1(){c[13596]=0;c[13598]=0;uu(c[13602]|0);return}function m2(){var a=0,b=0,d=0,e=0;a=i;c[13596]=0;c[13598]=0;c[13626]=0;h[6804]=0.0;c[13616]=1;c[13617]=1;b=ut(65528)|0;if((b|0)!=0){d=b;e=d;c[13602]=e;i=a;return}gk();b=ut(65528)|0;if((b|0)==0){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=166104,v)|0)}else{d=b;e=d;c[13602]=e;i=a;return}}function m3(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;b=i;i=i+24|0;d=b|0;e=b+8|0;f=b+16|0;g=c[13656]|0;if((g|0)!=0){h=c[13602]|0;tY(4,1,g<<1);L16730:do{if((g|0)>0){j=d;k=d+1|0;l=0;while(1){m=c[h+(l<<2)>>2]|0;if((m|0)<=-32769){n=12355;break}if((m|0)>=32768){n=12357;break}a[j]=m>>>8&255;a[k]=m&255;aI(j|0,1,2,c[10030]|0);l=l+1|0;if((l|0)>=(g|0)){break L16730}}if((n|0)==12357){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((n|0)==12355){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);c[13656]=0}n=f;a[n]=0;a[f+1|0]=-96;aI(n|0,1,2,c[10030]|0);n=e;a[n]=0;a[e+1|0]=64;aI(n|0,1,2,c[10030]|0);i=b;return}function m4(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0.0;b=i;i=i+832|0;d=b|0;e=b+8|0;f=b+16|0;g=b+24|0;j=b+32|0;k=b+40|0;l=b+48|0;m=b+56|0;n=b+64|0;o=b+72|0;p=b+80|0;q=b+88|0;r=b+96|0;s=b+104|0;t=b+112|0;u=b+120|0;w=b+128|0;x=b+136|0;y=b+144|0;z=b+152|0;A=b+160|0;B=b+168|0;C=b+176|0;D=b+184|0;E=b+192|0;F=b+200|0;G=b+208|0;H=b+216|0;I=b+224|0;J=b+232|0;K=b+240|0;L=b+248|0;M=b+256|0;N=b+320|0;O=b+328|0;P=b+336|0;Q=b+344|0;R=b+352|0;S=b+360|0;T=b+368|0;U=b+376|0;V=b+384|0;W=b+392|0;X=b+400|0;Y=b+408|0;Z=b+416|0;_=b+424|0;$=b+432|0;ab=b+440|0;ac=b+448|0;ad=b+456|0;ae=b+464|0;af=b+472|0;ag=b+480|0;ah=b+488|0;ai=b+496|0;aj=b+504|0;ak=b+512|0;al=b+520|0;am=b+784|0;an=c[3524]|0;ao=c[8244]|0;if((ao|0)==0){t_(0,1,1,0)}else{t_(0,1,(uA(ao|0)|0)+1|0,ao)}ao=L;a[ao]=16;a[L+1|0]=34;aI(ao|0,1,2,c[10030]|0);ao=al;L=c[60528]|0;if((L|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((L|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[ao]=L>>>8&255;a[al+1|0]=L&255;aI(ao|0,1,2,c[10030]|0);ao=b+528|0;L=a[54472]|0?0:2;be(ao|0,166264,(v=i,i=i+24|0,c[v>>2]=40152,c[v+8>>2]=40160,c[v+16>>2]=L,v)|0);t_(1,2,uA(ao|0)|0,ao);c[60558]=54;ao=K;a[ao]=17;a[K+1|0]=127;aI(ao|0,1,2,c[10030]|0);ao=J;a[ao]=0;a[J+1|0]=-38;aI(ao|0,1,2,c[10030]|0);ao=ak;J=ak+1|0;ak=0;while(1){K=c[242232+(ak<<2)>>2]|0;if((K|0)<=-32769){ap=12370;break}if((K|0)>=32768){ap=12372;break}a[ao]=K>>>8&255;a[J]=K&255;aI(ao|0,1,2,c[10030]|0);K=ak+1|0;if((K|0)<109){ak=K}else{ap=12374;break}}if((ap|0)==12374){ak=I;a[ak]=16;a[I+1|0]=98;I=c[10030]|0;aI(ak|0,1,2,I|0);I=aj;ak=c[60530]|0;if((ak|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ak|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[I]=ak>>>8&255;a[aj+1|0]=ak&255;ak=c[10030]|0;aI(I|0,1,2,ak|0);ak=H;a[ak]=16;a[H+1|0]=-126;H=c[10030]|0;aI(ak|0,1,2,H|0);H=ai;ak=c[60552]|0;if((ak|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ak|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[H]=ak>>>8&255;a[ai+1|0]=ak&255;ak=c[10030]|0;aI(H|0,1,2,ak|0);ak=G;a[ak]=16;a[G+1|0]=-90;G=c[10030]|0;aI(ak|0,1,2,G|0);G=ah;ak=ah+1|0;ah=c[60540]|0;if((ah|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ah|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[G]=ah>>>8&255;a[ak]=ah&255;ah=c[10030]|0;aI(G|0,1,2,ah|0);ah=c[60541]|0;if((ah|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ah|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[G]=ah>>>8&255;a[ak]=ah&255;ah=c[10030]|0;aI(G|0,1,2,ah|0);ah=c[60542]|0;if((ah|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ah|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[G]=ah>>>8&255;a[ak]=ah&255;ah=c[10030]|0;aI(G|0,1,2,ah|0);ah=F;a[ah]=16;a[F+1|0]=-62;F=c[10030]|0;aI(ah|0,1,2,F|0);F=ag;ah=c[60554]|0;if((ah|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ah|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[F]=ah>>>8&255;a[ag+1|0]=ah&255;ah=c[10030]|0;aI(F|0,1,2,ah|0);ah=E;a[ah]=16;a[E+1|0]=-30;E=c[10030]|0;aI(ah|0,1,2,E|0);E=af;ah=c[60678]|0;if((ah|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ah|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[E]=ah>>>8&255;a[af+1|0]=ah&255;ah=c[10030]|0;aI(E|0,1,2,ah|0);ah=D;a[ah]=17;a[D+1|0]=2;D=c[10030]|0;aI(ah|0,1,2,D|0);D=ae;ah=c[60680]|0;if((ah|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ah|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[D]=ah>>>8&255;a[ae+1|0]=ah&255;ah=c[10030]|0;aI(D|0,1,2,ah|0);ah=C;a[ah]=17;a[C+1|0]=34;C=c[10030]|0;aI(ah|0,1,2,C|0);C=ad;ah=c[13620]|0;if((ah|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ah|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[C]=ah>>>8&255;a[ad+1|0]=ah&255;ah=c[10030]|0;aI(C|0,1,2,ah|0);ah=B;a[ah]=17;a[B+1|0]=76;B=c[10030]|0;aI(ah|0,1,2,B|0);B=ac;ah=ac+1|0;ac=c[60670]|0;if((ac|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ac|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[B]=ac>>>8&255;a[ah]=ac&255;ac=c[10030]|0;aI(B|0,1,2,ac|0);ac=c[60671]|0;if((ac|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ac|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[B]=ac>>>8&255;a[ah]=ac&255;ac=c[10030]|0;aI(B|0,1,2,ac|0);ac=c[60672]|0;if((ac|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ac|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[B]=ac>>>8&255;a[ah]=ac&255;ac=c[10030]|0;aI(B|0,1,2,ac|0);ac=c[60673]|0;if((ac|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ac|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[B]=ac>>>8&255;a[ah]=ac&255;ac=c[10030]|0;aI(B|0,1,2,ac|0);ac=c[60674]|0;if((ac|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ac|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[B]=ac>>>8&255;a[ah]=ac&255;ac=c[10030]|0;aI(B|0,1,2,ac|0);ac=c[60675]|0;if((ac|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ac|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[B]=ac>>>8&255;a[ah]=ac&255;ac=c[10030]|0;aI(B|0,1,2,ac|0);if(!(a[54424]|0)){ac=c[13630]|0;B=c[ac>>2]|0;if((B|0)==0){aq=0}else{ah=0;C=0;ad=B;while(1){B=(C+1|0)+(uA(ad|0)|0)|0;D=ah+1|0;ae=c[ac+(D<<4)>>2]|0;if((ae|0)==0){aq=B;break}else{ah=D;C=B;ad=ae}}}ad=aq+1|0;C=ut(ad)|0;do{if((C|0)==0){gk();ah=ut(ad)|0;if((ah|0)!=0){ar=ah;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=166248,v)|0)}else{ar=C}}while(0);C=c[c[13630]>>2]|0;if((C|0)!=0){ad=0;ah=ar;ac=C;while(1){C=uA(ac|0)|0;a[ah]=C&255;uB(ah+1|0,c[(c[13630]|0)+(ad<<4)>>2]|0);ae=ad+1|0;B=c[(c[13630]|0)+(ae<<4)>>2]|0;if((B|0)==0){break}else{ad=ae;ah=ah+(C+1|0)|0;ac=B}}}ac=aq&1;tY(1,13,aq);ah=c[10030]|0;aI(ar|0,1,aq|0,ah|0);if((ac|0)!=0){ac=c[10030]|0;ah=a[241912]|0;aF(ah|0,ac|0)}uu(ar)}ar=A;a[ar]=0;a[A+1|0]=105;A=c[10030]|0;aI(ar|0,1,2,A|0);A=c[10030]|0;aF(8,A|0);A=c[10030]|0;aI(166208,1,8,A|0);A=c[10030]|0;ar=a[241896]|0;aF(ar|0,A|0);A=z;a[A]=32;a[z+1|0]=38;z=c[10030]|0;aI(A|0,1,2,z|0);z=ab;A=ab+1|0;ab=c[60536]|0;if((ab|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ab|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[z]=ab>>>8&255;a[A]=ab&255;ab=c[10030]|0;aI(z|0,1,2,ab|0);ab=c[60537]|0;if((ab|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ab|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[z]=ab>>>8&255;a[A]=ab&255;ab=c[10030]|0;aI(z|0,1,2,ab|0);ab=c[60538]|0;if((ab|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ab|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[z]=ab>>>8&255;a[A]=ab&255;ab=c[10030]|0;aI(z|0,1,2,ab|0);ab=y;a[ab]=32;a[y+1|0]=66;y=c[10030]|0;aI(ab|0,1,2,y|0);y=$;ab=c[60676]|0;if((ab|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ab|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[y]=ab>>>8&255;a[$+1|0]=ab&255;ab=c[10030]|0;aI(y|0,1,2,ab|0);ab=x;a[ab]=32;a[x+1|0]=98;x=c[10030]|0;aI(ab|0,1,2,x|0);x=_;ab=c[60546]|0;if((ab|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ab|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[x]=ab>>>8&255;a[_+1|0]=ab&255;ab=c[10030]|0;aI(x|0,1,2,ab|0);ab=w;a[ab]=32;a[w+1|0]=-126;w=c[10030]|0;aI(ab|0,1,2,w|0);w=Z;ab=c[60544]|0;if((ab|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ab|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[w]=ab>>>8&255;a[Z+1|0]=ab&255;ab=c[10030]|0;aI(w|0,1,2,ab|0);ab=u;a[ab]=32;a[u+1|0]=-94;u=c[10030]|0;aI(ab|0,1,2,u|0);u=Y;ab=c[60668]|0;if((ab|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((ab|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[u]=ab>>>8&255;a[Y+1|0]=ab&255;ab=c[10030]|0;aI(u|0,1,2,ab|0);ab=an+8|0;c[60534]=(c[ab>>2]|0)+182;u=an+12|0;c[60535]=(c[u>>2]|0)+182;Y=t;a[Y]=32;a[t+1|0]=-56;t=c[10030]|0;aI(Y|0,1,2,t|0);t=X;Y=X+1|0;X=c[60532]|0;if((X|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((X|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[t]=X>>>8&255;a[Y]=X&255;X=c[10030]|0;aI(t|0,1,2,X|0);X=c[60533]|0;if((X|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((X|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[t]=X>>>8&255;a[Y]=X&255;X=c[10030]|0;aI(t|0,1,2,X|0);X=c[60534]|0;if((X|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((X|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[t]=X>>>8&255;a[Y]=X&255;X=c[10030]|0;aI(t|0,1,2,X|0);X=c[60535]|0;if((X|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((X|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[t]=X>>>8&255;a[Y]=X&255;X=c[10030]|0;aI(t|0,1,2,X|0);X=W;a[X]=0;a[W+1|0]=-128;W=c[10030]|0;aI(X|0,1,2,W|0);L16932:do{if(!(a[54472]|0)){W=((c[13554]|0)*12&-1)+4|0;X=c[13550]|0;tY(5,34,W>>>1);t=W>>>2;if((t|0)==0){break}W=V;Y=V+1|0;w=0;while(1){Z=c[X+(w<<2)>>2]|0;if((Z|0)<=-32769){ap=12445;break}if((Z|0)>=32768){ap=12447;break}a[W]=Z>>>8&255;a[Y]=Z&255;aI(W|0,1,2,c[10030]|0);w=w+1|0;if((w|0)>=(t|0)){break L16932}}if((ap|0)==12447){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((ap|0)==12445){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);V=s;a[V]=80;a[s+1|0]=66;s=c[10030]|0;aI(V|0,1,2,s|0);s=U;V=c[60548]|0;if((V|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((V|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[s]=V>>>8&255;a[U+1|0]=V&255;V=c[10030]|0;aI(s|0,1,2,V|0);c[13624]=aa((((c[(c[3524]|0)+8>>2]|0)+182|0)>>>0)/((c[13604]|0)>>>0)>>>0,c[13622]|0);V=r;a[V]=80;a[r+1|0]=98;r=c[10030]|0;aI(V|0,1,2,r|0);r=T;V=c[13624]|0;if((V|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((V|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[r]=V>>>8&255;a[T+1|0]=V&255;V=c[10030]|0;aI(r|0,1,2,V|0);V=q;a[V]=83;a[q+1|0]=-126;q=c[10030]|0;aI(V|0,1,2,q|0);q=S;V=c[13624]|0;if((V|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((V|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[q]=V>>>8&255;a[S+1|0]=V&255;V=c[10030]|0;aI(q|0,1,2,V|0);V=p;a[V]=83;a[p+1|0]=98;p=c[10030]|0;aI(V|0,1,2,p|0);p=R;V=c[60548]|0;if((V|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((V|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[p]=V>>>8&255;a[R+1|0]=V&255;V=c[10030]|0;aI(p|0,1,2,V|0);do{if(a[54472]|0){c[13658]=1}else{if((c[13658]|0)==3){break}c[13658]=3;c[13615]=3;V=c[13656]|0;if((V|0)!=0){p=c[13602]|0;tY(4,1,V<<1);L16972:do{if((V|0)>0){R=g;q=g+1|0;S=0;while(1){r=c[p+(S<<2)>>2]|0;if((r|0)<=-32769){ap=12472;break}if((r|0)>=32768){ap=12474;break}a[R]=r>>>8&255;a[q]=r&255;aI(R|0,1,2,c[10030]|0);S=S+1|0;if((S|0)>=(V|0)){break L16972}}if((ap|0)==12472){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}else if((ap|0)==12474){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[13656]=0}V=f;a[V]=80;a[f+1|0]=-126;p=c[10030]|0;aI(V|0,1,2,p|0);p=o;V=c[13658]|0;if((V|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((V|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[p]=V>>>8&255;a[o+1|0]=V&255;V=c[10030]|0;aI(p|0,1,2,V|0);V=n;a[V]=81;a[n+1|0]=-62;p=c[10030]|0;aI(V|0,1,2,p|0);p=Q;V=c[13658]|0;if((V|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((V|0)<32768){a[p]=V>>>8&255;a[Q+1|0]=V&255;V=c[10030]|0;aI(p|0,1,2,V|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[13646]=c[13586];c[13647]=c[13587];c[13648]=c[13588];c[13649]=c[13589];c[13650]=c[13590];c[13651]=c[13591];c[13652]=c[13592];c[13653]=c[13593];c[13654]=c[13594];c[13655]=c[13595];c[13611]=c[an+16>>2];an=m;a[an]=82;a[m+1|0]=-62;m=c[10030]|0;aI(an|0,1,2,m|0);m=P;an=c[60550]|0;if((an|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((an|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[m]=an>>>8&255;a[P+1|0]=an&255;an=c[10030]|0;aI(m|0,1,2,an|0);an=l;a[an]=83;a[l+1|0]=2;l=c[10030]|0;aI(an|0,1,2,l|0);l=O;an=c[60556]|0;if((an|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((an|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[l]=an>>>8&255;a[O+1|0]=an&255;an=c[10030]|0;aI(l|0,1,2,an|0);an=am|0;am=c[13628]|0;be(an|0,166136,(v=i,i=i+16|0,c[v>>2]=54528,c[v+8>>2]=am,v)|0);nc(an);as=+h[3817];an=~~((as<0.0?1.0:as)*+((c[(c[3524]|0)+28>>2]|0)>>>0>>>0)*.5);c[13568]=an;c[13558]=(an*12&-1|0)/17&-1;c[13556]=(an*13&-1|0)/15&-1;c[13562]=(an|0)/2&-1;c[13564]=(an*36&-1|0)/29&-1;c[13566]=(an*14&-1|0)/13&-1;c[13560]=(an*18&-1|0)/29&-1;an=a[54472]|0;if(!((c[13554]|0)>0&(an^1))){i=b;return}do{if(!(an|(c[13658]|0)==0)){c[13658]=0;c[13615]=0;am=c[13656]|0;if((am|0)!=0){l=c[13602]|0;tY(4,1,am<<1);L17016:do{if((am|0)>0){O=e;m=e+1|0;P=0;while(1){Q=c[l+(P<<2)>>2]|0;if((Q|0)<=-32769){ap=12500;break}if((Q|0)>=32768){ap=12502;break}a[O]=Q>>>8&255;a[m]=Q&255;aI(O|0,1,2,c[10030]|0);P=P+1|0;if((P|0)>=(am|0)){break L17016}}if((ap|0)==12500){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}else if((ap|0)==12502){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[13656]=0}am=d;a[am]=80;a[d+1|0]=-126;l=c[10030]|0;aI(am|0,1,2,l|0);l=k;am=c[13658]|0;if((am|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((am|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[l]=am>>>8&255;a[k+1|0]=am&255;am=c[10030]|0;aI(l|0,1,2,am|0);am=j;a[am]=81;a[j+1|0]=-62;l=c[10030]|0;aI(am|0,1,2,l|0);l=N;am=c[13658]|0;if((am|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((am|0)<32768){a[l]=am>>>8&255;a[N+1|0]=am&255;am=c[10030]|0;aI(l|0,1,2,am|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);N=c[ab>>2]|0;ab=c[u>>2]|0;c[M>>2]=0;c[M+4>>2]=0;c[M+12>>2]=N;c[M+16>>2]=0;c[M+24>>2]=N;c[M+28>>2]=ab;c[M+36>>2]=0;c[M+40>>2]=ab;c[M+48>>2]=0;c[M+52>>2]=0;c[M+8>>2]=1;no(5,M|0);i=b;return}else if((ap|0)==12370){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}else if((ap|0)==12372){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}function m5(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;e=i;i=i+8|0;f=e|0;g=c[3524]|0;h=c[g+8>>2]|0;j=h>>>0>b>>>0?b:h;h=c[g+12>>2]|0;g=h>>>0>d>>>0?d:h;if((j|0)==(c[13598]|0)&(g|0)==(c[13596]|0)){i=e;return}h=c[13656]|0;if((h|0)!=0){d=c[13602]|0;tY(4,1,h<<1);L17049:do{if((h|0)>0){b=f;k=f+1|0;l=0;while(1){m=c[d+(l<<2)>>2]|0;if((m|0)<=-32769){n=12579;break}if((m|0)>=32768){n=12581;break}a[b]=m>>>8&255;a[k]=m&255;aI(b|0,1,2,c[10030]|0);l=l+1|0;if((l|0)>=(h|0)){break L17049}}if((n|0)==12579){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}else if((n|0)==12581){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[13656]=0}c[13598]=j;c[13596]=g;i=e;return}function m6(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=i;i=i+16|0;f=e|0;g=e+8|0;h=c[3524]|0;j=c[h+8>>2]|0;k=j>>>0>b>>>0?b:j;j=c[h+12>>2]|0;h=j>>>0>d>>>0?d:j;j=c[13598]|0;if((k|0)==(j|0)&(h|0)==(c[13596]|0)){i=e;return}d=c[13656]|0;do{if((d|0)>16380){b=c[13602]|0;l=d<<1;L17067:do{if(a[54560]|0){tY(4,7,l);m=g;n=g+1|0;o=0;while(1){p=c[b+(o<<2)>>2]|0;if((p|0)<=-32769){q=12593;break}if((p|0)>=32768){q=12595;break}a[m]=p>>>8&255;a[n]=p&255;aI(m|0,1,2,c[10030]|0);o=o+1|0;if((o|0)>=(d|0)){break L17067}}if((q|0)==12595){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((q|0)==12593){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}else{tY(4,1,l);o=f;m=f+1|0;n=0;while(1){p=c[b+(n<<2)>>2]|0;if((p|0)<=-32769){q=12599;break}if((p|0)>=32768){q=12601;break}a[o]=p>>>8&255;a[m]=p&255;aI(o|0,1,2,c[10030]|0);n=n+1|0;if((n|0)>=(d|0)){break L17067}}if((q|0)==12601){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((q|0)==12599){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);b=c[13598]|0;c[13656]=1;c[c[13602]>>2]=b;b=(c[13596]|0)+182|0;l=c[13656]|0;c[13656]=l+1;c[(c[13602]|0)+(l<<2)>>2]=b}else{if((d|0)!=0){break}c[13656]=1;c[c[13602]>>2]=j;b=(c[13596]|0)+182|0;l=c[13656]|0;c[13656]=l+1;c[(c[13602]|0)+(l<<2)>>2]=b}}while(0);j=c[13656]|0;c[13656]=j+1;c[(c[13602]|0)+(j<<2)>>2]=k;j=c[13656]|0;c[13656]=j+1;c[(c[13602]|0)+(j<<2)>>2]=h+182;c[13598]=k;c[13596]=h;i=e;return}function m7(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=i;i=i+40|0;e=d|0;f=d+8|0;g=d+16|0;h=d+24|0;j=d+32|0;k=(b|0)<-3?-3:b;if((k|0)==(c[13626]|0)){i=d;return}c[13626]=k;do{if((k|0)>-1){l=(k>>>0)%9>>>0;m=12616}else{if((k|0)==-4){if(a[54472]|0){break}else{n=0;m=12619;break}}else{if((k|0)<-2){break}else{l=k;m=12616;break}}}}while(0);do{if((m|0)==12616){if(a[54472]|0){c[13658]=1;n=1;m=12619;break}else{n=l+3|0;m=12619;break}}}while(0);do{if((m|0)==12619){if((n|0)==(c[13658]|0)){break}c[13658]=n;c[13615]=n;l=c[13656]|0;if((l|0)!=0){b=c[13602]|0;tY(4,1,l<<1);L17109:do{if((l|0)>0){o=f;p=f+1|0;q=0;while(1){r=c[b+(q<<2)>>2]|0;if((r|0)<=-32769){m=12624;break}if((r|0)>=32768){m=12626;break}a[o]=r>>>8&255;a[p]=r&255;aI(o|0,1,2,c[10030]|0);q=q+1|0;if((q|0)>=(l|0)){break L17109}}if((m|0)==12626){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((m|0)==12624){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);c[13656]=0}l=e;a[l]=80;a[e+1|0]=-126;b=c[10030]|0;aI(l|0,1,2,b|0);b=h;l=c[13658]|0;if((l|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((l|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[b]=l>>>8&255;a[h+1|0]=l&255;l=c[10030]|0;aI(b|0,1,2,l|0);l=g;a[l]=81;a[g+1|0]=-62;b=c[10030]|0;aI(l|0,1,2,b|0);b=j;l=c[13658]|0;if((l|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((l|0)<32768){a[b]=l>>>8&255;a[j+1|0]=l&255;l=c[10030]|0;aI(b|0,1,2,l|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);if(a[54576]|0){tT((k|0)==-1?2:0);i=d;return}else{tT(k);i=d;return}}function m8(a){a=a|0;c[13612]=a;return 1}function m9(b){b=b|0;var c=0;if(a[54336]|0){c=(b|0)==0&1;return c|0}else{h[6804]=+(b|0)*1.5707963267948966/90.0;c=1;return c|0}return 0}function na(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0.0,D=0.0;f=i;i=i+88|0;g=f|0;j=f+8|0;k=f+16|0;l=f+24|0;m=f+32|0;n=f+40|0;o=f+48|0;p=f+56|0;q=f+64|0;r=f+72|0;s=f+80|0;if(b>>>0>32767|d>>>0>32767){i=f;return}else{t=e}while(1){u=a[t]|0;if(u<<24>>24==0){w=12726;break}if((aM(u&255|0)|0)==0){break}else{t=t+1|0}}if((w|0)==12726){i=f;return}t=c[13656]|0;if((t|0)!=0){u=c[13602]|0;tY(4,1,t<<1);L17156:do{if((t|0)>0){x=m;y=m+1|0;z=0;while(1){A=c[u+(z<<2)>>2]|0;if((A|0)<=-32769){w=12659;break}if((A|0)>=32768){w=12661;break}a[x]=A>>>8&255;a[y]=A&255;aI(x|0,1,2,c[10030]|0);z=z+1|0;if((z|0)>=(t|0)){break L17156}}if((w|0)==12661){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((w|0)==12659){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);c[13656]=0}w=c[13610]|0;do{if((c[13648]|0)!=(w|0)){c[13648]=w;t=l;a[t]=81;a[l+1|0]=66;u=c[10030]|0;aI(t|0,1,2,u|0);u=s;t=c[13610]|0;if((t|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((t|0)<32768){a[u]=t>>>8&255;a[s+1|0]=t&255;t=c[10030]|0;aI(u|0,1,2,t|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);s=c[13612]|0;do{if((c[13650]|0)!=(s|0)){c[13650]=s;if((s|0)==2){c[60488]=3}else if((s|0)==1){c[60488]=2}else if((s|0)==0){c[60488]=1}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=103960,v)|0)}l=k;a[l]=82;a[k+1|0]=76;w=c[10030]|0;aI(l|0,1,2,w|0);w=r;l=r+1|0;t=c[60488]|0;if((t|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((t|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[w]=t>>>8&255;a[l]=t&255;t=c[10030]|0;aI(w|0,1,2,t|0);t=c[60489]|0;if((t|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((t|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[w]=t>>>8&255;a[l]=t&255;t=c[10030]|0;aI(w|0,1,2,t|0);t=c[60490]|0;if((t|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((t|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[w]=t>>>8&255;a[l]=t&255;t=c[10030]|0;aI(w|0,1,2,t|0);t=c[60491]|0;if((t|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((t|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[w]=t>>>8&255;a[l]=t&255;t=c[10030]|0;aI(w|0,1,2,t|0);t=c[60492]|0;if((t|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((t|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[w]=t>>>8&255;a[l]=t&255;t=c[10030]|0;aI(w|0,1,2,t|0);t=c[60493]|0;if((t|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((t|0)<32768){a[w]=t>>>8&255;a[l]=t&255;t=c[10030]|0;aI(w|0,1,2,t|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);r=c[13611]|0;do{if((c[13649]|0)!=(r|0)){c[13649]=r;k=r<<1;s=(k|0)/3&-1;t=j;a[t]=81;a[j+1|0]=-30;w=c[10030]|0;aI(t|0,1,2,w|0);w=q;if((k|0)<=-98307){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((k|0)<98304){a[w]=s>>>8&255;a[q+1|0]=s&255;s=c[10030]|0;aI(w|0,1,2,s|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);B=+h[6804];do{if(+h[6823]!=B){h[6823]=B;C=+(c[13611]|0);D=B+1.5707963267948966;c[60484]=~~(C*+S(+D));c[60485]=~~(C*+T(+D));c[60486]=~~(C*+S(+B));c[60487]=~~(C*+T(+B));q=g;a[q]=82;a[g+1|0]=8;j=c[10030]|0;aI(q|0,1,2,j|0);j=p;q=p+1|0;r=c[60484]|0;if((r|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((r|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[j]=r>>>8&255;a[q]=r&255;r=c[10030]|0;aI(j|0,1,2,r|0);r=c[60485]|0;if((r|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((r|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[j]=r>>>8&255;a[q]=r&255;r=c[10030]|0;aI(j|0,1,2,r|0);r=c[60486]|0;if((r|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((r|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[j]=r>>>8&255;a[q]=r&255;r=c[10030]|0;aI(j|0,1,2,r|0);r=c[60487]|0;if((r|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((r|0)<32768){a[j]=r>>>8&255;a[q]=r&255;r=c[10030]|0;aI(j|0,1,2,r|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[60480]=b;c[60481]=d+182;d=uA(e|0)|0;b=((d|0)>254?3:1)+d|0;p=(b&1|0)==0;tY(4,4,b+6|0);b=o;g=o+1|0;o=c[60480]|0;if((o|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((o|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[b]=o>>>8&255;a[g]=o&255;aI(b|0,1,2,c[10030]|0);o=c[60481]|0;if((o|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((o|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[b]=o>>>8&255;a[g]=o&255;aI(b|0,1,2,c[10030]|0);o=c[60482]|0;if((o|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((o|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[b]=o>>>8&255;a[g]=o&255;aI(b|0,1,2,c[10030]|0);b=c[10030]|0;do{if((d|0)<255){o=d<<24>>24;aF(o|0,b|0)}else{o=a[241888]|0;aF(o|0,b|0);o=n;if((d|0)<32768){a[o]=d>>>8&255;a[n+1|0]=d&255;g=c[10030]|0;aI(o|0,1,2,g|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);aI(e|0,1,d|0,c[10030]|0);if(!p){p=c[10030]|0;d=a[241880]|0;aF(d|0,p|0)}c[13596]=-2e3;c[13598]=-2e3;i=f;return}function nb(a){a=+a;var b=0;b=~~((a<0.0?1.0:a)*+((c[(c[3524]|0)+28>>2]|0)>>>0>>>0)*.5);c[13568]=b;c[13558]=(b*12&-1|0)/17&-1;c[13556]=(b*13&-1|0)/15&-1;c[13562]=(b|0)/2&-1;c[13564]=(b*36&-1|0)/29&-1;c[13566]=(b*14&-1|0)/13&-1;c[13560]=(b*18&-1|0)/29&-1;return}function nc(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0,r=0,s=0,t=0;d=i;i=i+8|0;e=d|0;f=c[3524]|0;g=a8(b|0,44)|0;if((b|0)==0){j=12758}else{if((a[b]|0)==0){j=12758}else{k=b}}if((j|0)==12758){k=242752}j=(g|0)!=0;if(j){l=g-k|0}else{l=uA(k|0)|0}b=c[13630]|0;m=c[b>>2]|0;L17297:do{if((m|0)==0){n=0;o=1.0}else{p=0;q=m;while(1){if((uA(q|0)|0)==(l|0)){if((uJ(k|0,q|0,l|0)|0)==0){break}}r=p+1|0;s=c[b+(r<<4)>>2]|0;if((s|0)==0){n=0;o=1.0;break L17297}else{p=r;q=s}}n=p+1|0;o=+h[b+(p<<4)+8>>3]}}while(0);l=(n|0)==0?1:n;c[13610]=l;n=c[b+(l-1<<4)>>2]|0;l=uA(n|0)|0;b=(l|0)>31?31:l;uF(54528,n|0,b|0);a[b+54528|0]=0;b=c[13628]|0;c[e>>2]=b;if(j){j=g+1|0;ca(j|0,21e4,(v=i,i=i+8|0,c[v>>2]=e,v)|0);t=c[e>>2]|0}else{t=b}b=aa((((c[(c[3524]|0)+8>>2]|0)+182|0)>>>0)/((c[13604]|0)>>>0)>>>0,t);c[f+16>>2]=b;c[f+20>>2]=~~(o*+(aa((((c[(c[3524]|0)+8>>2]|0)+182|0)>>>0)/((c[13604]|0)>>>0)>>>0,c[e>>2]|0)>>>0>>>0)*.527);c[13611]=b;i=d;return 1}function nd(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0;g=i;i=i+64|0;h=g|0;c[h>>2]=b;c[h+4>>2]=d;j=e+b|0;c[h+12>>2]=j;c[h+16>>2]=d;c[h+24>>2]=j;j=f+d|0;c[h+28>>2]=j;c[h+36>>2]=b;c[h+40>>2]=j;c[h+48>>2]=b;c[h+52>>2]=d;c[h+8>>2]=a;no(5,h|0);i=g;return}function ne(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;f=i;i=i+112|0;g=f|0;h=f+8|0;j=f+16|0;k=f+24|0;l=f+32|0;m=f+40|0;n=f+48|0;o=f+56|0;p=f+64|0;q=f+72|0;r=f+80|0;s=f+88|0;t=f+96|0;u=f+104|0;if((e|0)<0){m5(b,d);m6(b+1|0,d);i=f;return}w=(e|0)%13&-1;e=c[13656]|0;if((e|0)!=0){x=c[13602]|0;tY(4,1,e<<1);L17316:do{if((e|0)>0){y=q;z=q+1|0;A=0;while(1){B=c[x+(A<<2)>>2]|0;if((B|0)<=-32769){C=12777;break}if((B|0)>=32768){C=12779;break}a[y]=B>>>8&255;a[z]=B&255;aI(y|0,1,2,c[10030]|0);A=A+1|0;if((A|0)>=(e|0)){break L17316}}if((C|0)==12777){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}else if((C|0)==12779){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[13656]=0}e=c[13642]|0;tT(0);if((w|0)>2){c[13616]=1}if((w|0)==12|(w|0)==10|(w|0)==8|(w|0)==6|(w|0)==4){c[13613]=0;c[13615]=c[13658];D=c[13616]|0}else{c[13613]=1;c[13616]=0;c[13614]=c[13658];D=0}do{if((c[13654]|0)!=(D|0)){c[13654]=D;x=p;a[x]=82;a[p+1|0]=-62;q=c[10030]|0;aI(x|0,1,2,q|0);q=u;x=c[13616]|0;if((x|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((x|0)<32768){a[q]=x>>>8&255;a[u+1|0]=x&255;x=c[10030]|0;aI(q|0,1,2,x|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);u=c[13615]|0;do{if((c[13653]|0)!=(u|0)){c[13653]=u;p=o;a[p]=82;a[o+1|0]=-30;D=c[10030]|0;aI(p|0,1,2,D|0);D=t;p=c[13615]|0;if((p|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((p|0)<32768){a[D]=p>>>8&255;a[t+1|0]=p&255;p=c[10030]|0;aI(D|0,1,2,p|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);t=c[13651]|0;o=c[13613]|0;do{if((t|0)==(o|0)){E=t}else{c[13651]=o;u=n;a[u]=83;a[n+1|0]=-62;p=c[10030]|0;aI(u|0,1,2,p|0);p=s;u=c[13651]|0;if((u|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((u|0)<32768){a[p]=u>>>8&255;a[s+1|0]=u&255;u=c[10030]|0;aI(p|0,1,2,u|0);E=c[13651]|0;break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);do{if((E|0)!=0){s=c[13614]|0;if((c[13652]|0)==(s|0)){break}c[13652]=s;s=m;a[s]=83;a[m+1|0]=-94;n=c[10030]|0;aI(s|0,1,2,n|0);n=r;s=c[13652]|0;if((s|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((s|0)<32768){a[n]=s>>>8&255;a[r+1|0]=s&255;s=c[10030]|0;aI(n|0,1,2,s|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);do{if((w|0)==0){m5(b-(c[13568]|0)|0,d);m6((c[13568]|0)+b|0,d);m5(b,d-(c[13568]|0)|0);m6(b,(c[13568]|0)+d|0)}else if((w|0)==2){m5(b,d-(c[13568]|0)|0);m6(b,(c[13568]|0)+d|0);m5((c[13556]|0)+b|0,d-(c[13562]|0)|0);m6(b-(c[13556]|0)|0,(c[13562]|0)+d|0);m5((c[13556]|0)+b|0,(c[13562]|0)+d|0);m6(b-(c[13556]|0)|0,d-(c[13562]|0)|0)}else if((w|0)==1){r=c[13558]|0;m5(b-r|0,d-r|0);r=c[13558]|0;m6(r+b|0,r+d|0);r=c[13558]|0;m5(b-r|0,r+d|0);r=c[13558]|0;m6(r+b|0,d-r|0)}else if((w|0)==3|(w|0)==4){r=c[13558]|0;m5(b-r|0,d-r|0);r=c[13558]|0;m6(r+b|0,d-r|0);r=c[13558]|0;m6(r+b|0,r+d|0);r=c[13558]|0;m6(b-r|0,r+d|0);r=c[13656]|0;if((r|0)==0){break}m=c[13602]|0;tY(4,7,r<<1);L17377:do{if((r|0)>0){E=l;s=l+1|0;n=0;while(1){o=c[m+(n<<2)>>2]|0;if((o|0)<=-32769){C=12820;break}if((o|0)>=32768){C=12822;break}a[E]=o>>>8&255;a[s]=o&255;aI(E|0,1,2,c[10030]|0);n=n+1|0;if((n|0)>=(r|0)){break L17377}}if((C|0)==12822){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((C|0)==12820){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);c[13656]=0}else if((w|0)==5|(w|0)==6){m5(b,d-(c[13568]|0)|0);m6((c[13562]|0)+b|0,d-(c[13556]|0)|0);m6((c[13556]|0)+b|0,d-(c[13562]|0)|0);m6((c[13568]|0)+b|0,d);m6((c[13556]|0)+b|0,(c[13562]|0)+d|0);m6((c[13562]|0)+b|0,(c[13556]|0)+d|0);m6(b,(c[13568]|0)+d|0);m6(b-(c[13562]|0)|0,(c[13556]|0)+d|0);m6(b-(c[13556]|0)|0,(c[13562]|0)+d|0);m6(b-(c[13568]|0)|0,d);m6(b-(c[13556]|0)|0,d-(c[13562]|0)|0);m6(b-(c[13562]|0)|0,d-(c[13556]|0)|0);r=c[13656]|0;if((r|0)==0){break}m=c[13602]|0;tY(4,7,r<<1);L17389:do{if((r|0)>0){n=k;E=k+1|0;s=0;while(1){o=c[m+(s<<2)>>2]|0;if((o|0)<=-32769){C=12829;break}if((o|0)>=32768){C=12831;break}a[n]=o>>>8&255;a[E]=o&255;aI(n|0,1,2,c[10030]|0);s=s+1|0;if((s|0)>=(r|0)){break L17389}}if((C|0)==12829){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}else if((C|0)==12831){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[13656]=0}else if((w|0)==7|(w|0)==8){m5(b,(c[13564]|0)+d|0);m6(b-(c[13566]|0)|0,d-(c[13560]|0)|0);m6((c[13566]|0)+b|0,d-(c[13560]|0)|0);r=c[13656]|0;if((r|0)==0){break}m=c[13602]|0;tY(4,7,r<<1);L17401:do{if((r|0)>0){s=j;n=j+1|0;E=0;while(1){o=c[m+(E<<2)>>2]|0;if((o|0)<=-32769){C=12838;break}if((o|0)>=32768){C=12840;break}a[s]=o>>>8&255;a[n]=o&255;aI(s|0,1,2,c[10030]|0);E=E+1|0;if((E|0)>=(r|0)){break L17401}}if((C|0)==12840){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((C|0)==12838){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);c[13656]=0}else if((w|0)==11|(w|0)==12){m5(b-(c[13568]|0)|0,d);m6(b,d-(c[13568]|0)|0);m6((c[13568]|0)+b|0,d);m6(b,(c[13568]|0)+d|0);r=c[13656]|0;if((r|0)==0){break}m=c[13602]|0;tY(4,7,r<<1);L17413:do{if((r|0)>0){E=g;s=g+1|0;n=0;while(1){o=c[m+(n<<2)>>2]|0;if((o|0)<=-32769){C=12856;break}if((o|0)>=32768){C=12858;break}a[E]=o>>>8&255;a[s]=o&255;aI(E|0,1,2,c[10030]|0);n=n+1|0;if((n|0)>=(r|0)){break L17413}}if((C|0)==12858){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((C|0)==12856){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);c[13656]=0}else if((w|0)==9|(w|0)==10){m5(b,d-(c[13564]|0)|0);m6(b-(c[13566]|0)|0,(c[13560]|0)+d|0);m6((c[13566]|0)+b|0,(c[13560]|0)+d|0);r=c[13656]|0;if((r|0)==0){break}m=c[13602]|0;tY(4,7,r<<1);L17425:do{if((r|0)>0){n=h;E=h+1|0;s=0;while(1){o=c[m+(s<<2)>>2]|0;if((o|0)<=-32769){C=12847;break}if((o|0)>=32768){C=12849;break}a[n]=o>>>8&255;a[E]=o&255;aI(n|0,1,2,c[10030]|0);s=s+1|0;if((s|0)>=(r|0)){break L17425}}if((C|0)==12849){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((C|0)==12847){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);c[13656]=0}}while(0);tT(e);i=f;return}function nf(b){b=+b;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;i=i+24|0;e=d|0;f=d+8|0;g=d+16|0;h=~~((b>0.0?b:.5)*+((c[13622]|0)>>>0>>>0)*+((((c[(c[3524]|0)+8>>2]|0)+182|0)>>>0)/((c[13604]|0)>>>0)>>>0>>>0>>>0));if((h|0)==(c[13624]|0)){i=d;return}j=c[13656]|0;if((j|0)!=0){k=c[13602]|0;tY(4,1,j<<1);L17443:do{if((j|0)>0){l=f;m=f+1|0;n=0;while(1){o=c[k+(n<<2)>>2]|0;if((o|0)<=-32769){p=12870;break}if((o|0)>=32768){p=12872;break}a[l]=o>>>8&255;a[m]=o&255;aI(l|0,1,2,c[10030]|0);n=n+1|0;if((n|0)>=(j|0)){break L17443}}if((p|0)==12872){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((p|0)==12870){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);c[13656]=0}c[13624]=h;h=e;a[h]=80;a[e+1|0]=98;aI(h|0,1,2,c[10030]|0);h=g;e=c[13624]|0;if((e|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((e|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[h]=e>>>8&255;a[g+1|0]=e&255;aI(h|0,1,2,c[10030]|0);tT(c[13642]|0);i=d;return}function ng(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;i=i+8|0;e=d|0;if((b|0)==0){f=(c[13620]|0)-96|0;i=d;return f|0}g=c[b+28>>2]|0;c[13582]=g;j=g+96|0;if((j|0)>(c[13552]|0)){c[13552]=j;c[13550]=db(c[13550]|0,(j*12&-1)+4|0,167368)|0;k=c[13582]|0}else{k=g}L17469:do{if((k|0)>0){g=b+32|0;j=0;l=289;while(1){c[(c[13550]|0)+(l<<2)>>2]=~~(+h[(c[g>>2]|0)+(j*24&-1)>>3]*255.9);c[(c[13550]|0)+(l+1<<2)>>2]=~~(+h[(c[g>>2]|0)+(j*24&-1)+8>>3]*255.9);c[(c[13550]|0)+(l+2<<2)>>2]=~~(+h[(c[g>>2]|0)+(j*24&-1)+16>>3]*255.9);m=j+1|0;n=c[13582]|0;if((m|0)>=(n|0)){o=n;break L17469}j=m;l=l+3|0}}else{o=k}}while(0);k=o+96|0;c[13554]=k;o=(k*12&-1)+4|0;k=c[13550]|0;tY(5,34,o>>>1);b=o>>>2;if((b|0)==0){f=0;i=d;return f|0}o=e;l=e+1|0;e=0;while(1){j=c[k+(e<<2)>>2]|0;if((j|0)<=-32769){p=12893;break}if((j|0)>=32768){p=12895;break}a[o]=j>>>8&255;a[l]=j&255;aI(o|0,1,2,c[10030]|0);j=e+1|0;if((j|0)<(b|0)){e=j}else{f=0;p=12901;break}}if((p|0)==12893){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0);return 0}else if((p|0)==12895){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0);return 0}else if((p|0)==12901){i=d;return f|0}return 0}function nh(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0.0,L=0;d=i;i=i+80|0;e=d|0;f=d+8|0;g=d+16|0;j=d+24|0;k=d+32|0;l=d+40|0;m=d+48|0;n=d+56|0;o=d+64|0;p=d+72|0;q=c[b>>2]|0;L17487:do{if((q|0)==1){r=b+4|0;s=c[r>>2]|0;do{if((s|0)>-1){t=(s>>>0)%9>>>0;u=12908}else{if((s|0)==-4){if(a[54472]|0){break}else{w=0;u=12911;break}}else{if((s|0)<-2){break}else{t=s;u=12908;break}}}}while(0);do{if((u|0)==12908){if(a[54472]|0){c[13658]=1;w=1;u=12911;break}else{w=t+3|0;u=12911;break}}}while(0);do{if((u|0)==12911){if((w|0)==(c[13658]|0)){break}c[13658]=w;c[13615]=w;s=c[13656]|0;if((s|0)!=0){x=c[13602]|0;tY(4,1,s<<1);L17506:do{if((s|0)>0){y=f;z=f+1|0;A=0;while(1){B=c[x+(A<<2)>>2]|0;if((B|0)<=-32769){u=12916;break}if((B|0)>=32768){u=12918;break}a[y]=B>>>8&255;a[z]=B&255;aI(y|0,1,2,c[10030]|0);A=A+1|0;if((A|0)>=(s|0)){break L17506}}if((u|0)==12916){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}else if((u|0)==12918){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[13656]=0}s=e;a[s]=80;a[e+1|0]=-126;x=c[10030]|0;aI(s|0,1,2,x|0);x=m;s=c[13658]|0;if((s|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((s|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[x]=s>>>8&255;a[m+1|0]=s&255;s=c[10030]|0;aI(x|0,1,2,s|0);s=l;a[s]=81;a[l+1|0]=-62;x=c[10030]|0;aI(s|0,1,2,x|0);x=p;s=c[13658]|0;if((s|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((s|0)<32768){a[x]=s>>>8&255;a[p+1|0]=s&255;s=c[10030]|0;aI(x|0,1,2,s|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[13626]=c[r>>2];i=d;return}else if((q|0)==3){s=c[b+4>>2]|0;x=s>>>16&255;A=s>>>8&255;y=s&255;s=c[13554]|0;if((s|0)<=0){C=0;break}z=c[13550]|0;B=0;D=1;E=65536;F=0;while(1){G=(c[z+(D<<2)>>2]|0)-x|0;H=(c[z+(D+1<<2)>>2]|0)-A|0;I=(c[z+(D+2<<2)>>2]|0)-y|0;J=aa(G,G);G=aa(H,H)+J|0;J=G+aa(I,I)|0;I=(J|0)<(E|0);G=I?B:F;if((J|0)<32){C=G;break L17487}H=B+1|0;if((H|0)<(s|0)){B=H;D=D+3|0;E=I?J:E;F=G}else{C=G;break}}}else if((q|0)==5){K=+h[b+8>>3];F=c[13582]|0;if(K>0.0){L=~~(K*+(F|0))}else{L=0}E=(L|0)<(F|0)?L:F-1|0;c[13615]=E;C=E+96|0}else{i=d;return}}while(0);c[13615]=C;if((c[13658]|0)==(C|0)){i=d;return}c[13658]=C;c[13626]=C;C=c[13656]|0;if((C|0)!=0){L=c[13602]|0;tY(4,1,C<<1);L17546:do{if((C|0)>0){b=k;q=k+1|0;p=0;while(1){l=c[L+(p<<2)>>2]|0;if((l|0)<=-32769){u=12943;break}if((l|0)>=32768){u=12945;break}a[b]=l>>>8&255;a[q]=l&255;aI(b|0,1,2,c[10030]|0);p=p+1|0;if((p|0)>=(C|0)){break L17546}}if((u|0)==12945){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}else if((u|0)==12943){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}}}while(0);c[13656]=0}u=j;a[u]=80;a[j+1|0]=-126;aI(u|0,1,2,c[10030]|0);u=o;j=c[13658]|0;if((j|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((j|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[u]=j>>>8&255;a[o+1|0]=j&255;aI(u|0,1,2,c[10030]|0);u=g;a[u]=81;a[g+1|0]=-62;aI(u|0,1,2,c[10030]|0);u=n;g=c[13658]|0;if((g|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((g|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[u]=g>>>8&255;a[n+1|0]=g&255;aI(u|0,1,2,c[10030]|0);i=d;return}function ni(){c[13330]=0;a[53312]=0;return}function nj(){var a=0,b=0,d=0;a=i;b=~~(+((c[13326]|0)>>>0>>>0)/10.0+.5+0.0);d=~~(+((c[13324]|0)>>>0>>>0)/10.0+.5+0.0);cf(c[10030]|0,167816,(v=i,i=i+64|0,c[v>>2]=0,c[v+8>>2]=0,c[v+16>>2]=b,c[v+24>>2]=d,c[v+32>>2]=0,c[v+40>>2]=0,c[v+48>>2]=b,c[v+56>>2]=d,v)|0);i=a;return}function nk(){aI(199192,10,1,c[10030]|0);return}function nl(){if(!(a[53312]|0)){c[13330]=0;return}aI(169392,2,1,c[10030]|0);a[53312]=0;c[13330]=0;return}function nm(b,d){b=b|0;d=d|0;var e=0,f=0;e=i;if(a[53312]|0){f=c[10030]|0;aI(169392,2,1,f|0)}cf(c[10030]|0,167984,(v=i,i=i+16|0,h[v>>3]=+(b>>>0>>>0)/10.0,h[v+8>>3]=+(d>>>0>>>0)/10.0,v)|0);c[13330]=(c[13330]|0)+1;a[53312]=1;i=e;return}function nn(b,d){b=b|0;d=d|0;var e=0,f=0.0,g=0.0;e=i;f=+(b>>>0>>>0)/10.0;g=+(d>>>0>>>0)/10.0;cf(c[10030]|0,168040,(v=i,i=i+16|0,h[v>>3]=f,h[v+8>>3]=g,v)|0);d=(c[13330]|0)+1|0;c[13330]=d;a[53312]=1;if((d|0)<=399){i=e;return}cf(c[10030]|0,168016,(v=i,i=i+16|0,h[v>>3]=f,h[v+8>>3]=g,v)|0);c[13330]=0;i=e;return}function no(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=i;i=i+72|0;f=e|0;g=e+8|0;h=e+16|0;j=e+24|0;k=e+32|0;l=e+40|0;m=e+48|0;n=e+56|0;o=e+64|0;p=c[d+8>>2]|0;q=(p>>4|0)%6&-1;r=p&15;do{if((r|0)==1|(r|0)==4){c[13616]=1;s=1}else if((r|0)==2|(r|0)==5){if((q|0)==0){c[13616]=0;s=0;break}else if((q|0)==3){c[13616]=1;s=1;break}else{c[13616]=3;c[13617]=c[242728+(q<<2)>>2];s=3;break}}else{c[13615]=0;c[13616]=1;s=1}}while(0);do{if((c[13654]|0)!=(s|0)){c[13654]=s;q=k;a[q]=82;a[k+1|0]=-62;r=c[10030]|0;aI(q|0,1,2,r|0);r=o;q=c[13616]|0;if((q|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((q|0)<32768){a[r]=q>>>8&255;a[o+1|0]=q&255;q=c[10030]|0;aI(r|0,1,2,q|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);o=c[13615]|0;do{if((c[13653]|0)!=(o|0)){c[13653]=o;k=j;a[k]=82;a[j+1|0]=-30;s=c[10030]|0;aI(k|0,1,2,s|0);s=n;k=c[13615]|0;if((k|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((k|0)<32768){a[s]=k>>>8&255;a[n+1|0]=k&255;k=c[10030]|0;aI(s|0,1,2,k|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);n=c[13617]|0;do{if((c[13655]|0)!=(n|0)&(c[13616]|0)==3){c[13655]=n;j=h;a[j]=83;a[h+1|0]=2;o=c[10030]|0;aI(j|0,1,2,o|0);o=m;j=c[13617]|0;if((j|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((j|0)<32768){a[o]=j>>>8&255;a[m+1|0]=j&255;j=c[10030]|0;aI(o|0,1,2,j|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[13613]=0;do{if((c[13651]|0)!=0){c[13651]=0;m=g;a[m]=83;a[g+1|0]=-62;h=c[10030]|0;aI(m|0,1,2,h|0);h=l;m=c[13651]|0;if((m|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((m|0)<32768){a[h]=m>>>8&255;a[l+1|0]=m&255;m=c[10030]|0;aI(h|0,1,2,m|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);m5(c[d>>2]|0,c[d+4>>2]|0);a[54560]=1;if((b|0)>1){l=1;do{m6(c[d+(l*12&-1)>>2]|0,c[d+(l*12&-1)+4>>2]|0);l=l+1|0;}while((l|0)<(b|0))}b=c[13656]|0;if((b|0)==0){a[54560]=0;i=e;return}l=c[13602]|0;tY(4,7,b<<1);L17640:do{if((b|0)>0){d=f;g=f+1|0;m=0;while(1){h=c[l+(m<<2)>>2]|0;if((h|0)<=-32769){t=13015;break}if((h|0)>=32768){t=13017;break}a[d]=h>>>8&255;a[g]=h&255;aI(d|0,1,2,c[10030]|0);m=m+1|0;if((m|0)>=(b|0)){break L17640}}if((t|0)==13015){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}else if((t|0)==13017){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);c[13656]=0;a[54560]=0;i=e;return}function np(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0.0,M=0,N=0,O=0.0,P=0,Q=0.0,R=0,S=0,T=0,U=0,V=0.0,W=0.0,X=0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ab=0,ac=0.0;b=i;i=i+24|0;d=b|0;e=c[13898]|0;f=c[8272]|0;L17652:do{if((e|0)<(f|0)){j=e;k=f;L17653:while(1){l=c[1054]|0;m=(a[l+(j*40&-1)|0]&1)==0;L17655:do{if(!m){n=c[l+(j*40&-1)+36>>2]|0;o=l+(j*40&-1)+32|0;p=c[10036]|0;q=0;while(1){if((q|0)>=(n|0)){break}if((a[p+((c[o>>2]|0)+q|0)|0]|0)==(a[q+103664|0]|0)){q=q+1|0}else{break L17655}}if((q|0)==1){r=k;s=j;break L17652}}}while(0);o=c[60232]|0;L17662:do{if((o|0)==0){t=240928}else{p=c[l+(j*40&-1)+36>>2]|0;n=c[l+(j*40&-1)+32>>2]|0;u=(p|0)>0;w=c[10036]|0;x=240928;y=o;while(1){L17666:do{if(!m){if(u){z=0;A=0;B=n;while(1){C=a[y+z|0]|0;if(C<<24>>24==(a[w+(z+B|0)|0]|0)){D=B;E=A}else{if(C<<24>>24!=36){break L17666}D=B-1|0;E=1}F=z+1|0;if((F|0)<(E+p|0)){z=F;A=E;B=D}else{break}}if((E|0)==0){G=F}else{t=x;break L17662}}else{G=0}B=a[y+G|0]|0;if((B<<24>>24|0)==36|(B<<24>>24|0)==0){t=x;break L17662}}}while(0);B=x+8|0;A=c[B>>2]|0;if((A|0)==0){t=B;break}else{x=B;y=A}}}}while(0);o=c[t+4>>2]|0;L17679:do{if((o|0)==0){a[53408]=0;uD(53352,167792,17);c[13336]=22;g[13332]=12.0;c[13326]=5960;c[13324]=7200;y=j+1|0;c[13898]=y;H=y}else if((o|0)==2){a[53408]=1;y=j+1|0;c[13898]=y;H=y}else if((o|0)==1){a[53408]=0;y=j+1|0;c[13898]=y;H=y}else{do{if(!m){y=l+(j*40&-1)+32|0;x=c[y>>2]|0;p=c[10036]|0;w=a[p+x|0]|0;if(!((w<<24>>24|0)==39|(w<<24>>24|0)==34)){break}w=(c[l+(j*40&-1)+36>>2]|0)-2|0;n=(w|0)>49?49:w;if((n|0)>0){w=x;x=0;while(1){u=w+1|0;q=x+1|0;a[x+53352|0]=a[p+u|0]|0;if((q|0)==(n|0)){I=n;break}else{w=u;x=q}}}else{I=0}a[I+53352|0]=0;if((a[p+(c[y>>2]|0)|0]|0)==34){ua(53352)}else{x=53352;w=53352;while(1){n=a[w]|0;if((n<<24>>24|0)==0){break}else if((n<<24>>24|0)==39){q=w+1|0;u=(a[q]|0)==39?q:w;J=u;K=a[u]|0}else{J=w;K=n}a[x]=K;x=x+1|0;w=J+1|0}a[x]=0}w=(c[13898]|0)+1|0;c[13898]=w;H=w;break L17679}}while(0);w=is(d)|0;y=c[w>>2]|0;if((y|0)==2){L=+h[w+8>>3]}else if((y|0)==3){L=+uz(c[w+8>>2]|0,0)}else if((y|0)==1){L=+(c[w+8>>2]|0)}else{break L17653}w=~~L;c[13336]=w;c[13898]=(c[13898]|0)+1;c[(c[3524]|0)+16>>2]=~~(+(w|0)*10.0);c[(c[3524]|0)+20>>2]=~~(+(c[13336]|0)*10.0*6.0/10.0);H=c[13898]|0}}while(0);l=c[8272]|0;if((H|0)<(l|0)){j=H;k=l}else{r=l;s=H;break L17652}}uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{r=f;s=e}}while(0);L17709:do{if((s|0)<(r|0)){e=c[1054]|0;L17711:do{if((a[e+(s*40&-1)|0]&1)!=0){f=c[e+(s*40&-1)+36>>2]|0;H=e+(s*40&-1)+32|0;J=c[10036]|0;K=0;while(1){if((K|0)>=(f|0)){break}if((a[J+((c[H>>2]|0)+K|0)|0]|0)==(a[K+103664|0]|0)){K=K+1|0}else{break L17711}}if((K|0)==1){M=s;N=r;break L17709}}}while(0);e=is(d)|0;H=c[e>>2]|0;if((H|0)==3){O=+uz(c[e+8>>2]|0,0)}else if((H|0)==2){O=+h[e+8>>3]}else if((H|0)==1){O=+(c[e+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}e=~~(O*720.0);c[13326]=e;H=(c[13898]|0)+1|0;c[13898]=H;L17724:do{if((H|0)<(c[8272]|0)){J=c[1054]|0;L17726:do{if((a[J+(H*40&-1)|0]&1)!=0){f=c[J+(H*40&-1)+36>>2]|0;I=J+(H*40&-1)+32|0;t=c[10036]|0;G=0;while(1){if((G|0)>=(f|0)){break}if((a[t+((c[I>>2]|0)+G|0)|0]|0)==(a[G+103664|0]|0)){G=G+1|0}else{break L17726}}if((G|0)==1){P=e;break L17724}}}while(0);J=is(d)|0;K=c[J>>2]|0;if((K|0)==3){Q=+uz(c[J+8>>2]|0,0)}else if((K|0)==1){Q=+(c[J+8>>2]|0)}else if((K|0)==2){Q=+h[J+8>>3]}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}c[13324]=~~(Q*720.0);c[13898]=(c[13898]|0)+1;P=c[13326]|0}else{P=e}}while(0);c[(c[3524]|0)+8>>2]=P;c[(c[3524]|0)+12>>2]=c[13324];c[(c[3524]|0)+24>>2]=((c[13324]|0)>>>0)/80>>>0;c[(c[3524]|0)+28>>2]=((c[13324]|0)>>>0)/80>>>0;M=c[13898]|0;N=c[8272]|0}else{M=s;N=r}}while(0);if((M|0)>=(N|0)){R=a[53408]|0;S=R?116440:116408;T=c[13336]|0;U=c[13326]|0;V=+(U>>>0>>>0);W=V/720.0;X=c[13324]|0;Y=+(X>>>0>>>0);Z=Y/720.0;_=+g[13332];$=_;aa=$/10.0;ab=be(13048,167736,(v=i,i=i+48|0,c[v>>2]=S,c[v+8>>2]=53352,c[v+16>>2]=T,h[v+24>>3]=W,h[v+32>>3]=Z,h[v+40>>3]=aa,v)|0)|0;i=b;return}N=c[1054]|0;L17744:do{if((a[N+(M*40&-1)|0]&1)!=0){r=c[N+(M*40&-1)+36>>2]|0;s=N+(M*40&-1)+32|0;P=c[10036]|0;e=0;while(1){if((e|0)>=(r|0)){break}if((a[P+((c[s>>2]|0)+e|0)|0]|0)==(a[e+103664|0]|0)){e=e+1|0}else{break L17744}}if((e|0)!=1){break}R=a[53408]|0;S=R?116440:116408;T=c[13336]|0;U=c[13326]|0;V=+(U>>>0>>>0);W=V/720.0;X=c[13324]|0;Y=+(X>>>0>>>0);Z=Y/720.0;_=+g[13332];$=_;aa=$/10.0;ab=be(13048,167736,(v=i,i=i+48|0,c[v>>2]=S,c[v+8>>2]=53352,c[v+16>>2]=T,h[v+24>>3]=W,h[v+32>>3]=Z,h[v+40>>3]=aa,v)|0)|0;i=b;return}}while(0);M=is(d)|0;d=c[M>>2]|0;if((d|0)==1){ac=+(c[M+8>>2]|0)}else if((d|0)==2){ac=+h[M+8>>3]}else if((d|0)==3){ac=+uz(c[M+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g[13332]=ac*10.0;c[13898]=(c[13898]|0)+1;R=a[53408]|0;S=R?116440:116408;T=c[13336]|0;U=c[13326]|0;V=+(U>>>0>>>0);W=V/720.0;X=c[13324]|0;Y=+(X>>>0>>>0);Z=Y/720.0;_=+g[13332];$=_;aa=$/10.0;ab=be(13048,167736,(v=i,i=i+48|0,c[v>>2]=S,c[v+8>>2]=53352,c[v+16>>2]=T,h[v+24>>3]=W,h[v+32>>3]=Z,h[v+40>>3]=aa,v)|0)|0;i=b;return}function nq(a){a=a|0;c[13354]=a;return 1}function nr(a){a=a|0;c[13334]=a;return 1}function ns(a,b){a=a|0;b=b|0;c[11678]=a;c[11674]=b;return}function nt(){var b=0,d=0,e=0,f=0;b=aa(c[11672]|0,c[11676]|0);if((b|0)<=0){return}d=b;b=c[11684]|0;e=c[11680]|0;while(1){a[b]=32;a[e]=0;f=d-1|0;if((f|0)>0){d=f;b=b+1|0;e=e+1|0}else{break}}return}function nu(b){b=b|0;var d=0,e=0,f=0.0;d=i;if(a[53312]|0){e=c[10030]|0;aI(169392,2,1,e|0);a[53312]=0}do{if((b|0)==3){e=c[10030]|0;f=+g[13332]/10.0;cf(e|0,168928,(v=i,i=i+8|0,h[v>>3]=f,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168520,10,1,e|0);break}else{aI(168496,20,1,e|0);break}}else if((b|0)==8){cf(c[10030]|0,168928,(v=i,i=i+8|0,h[v>>3]=+g[13332]/10.0,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168120,16,1,e|0);break}else{aI(168088,30,1,e|0);break}}else if((b|0)==6){cf(c[10030]|0,168928,(v=i,i=i+8|0,h[v>>3]=+g[13332]/10.0,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168912,10,1,e|0);break}else{aI(168288,22,1,e|0);break}}else if((b|0)==5){cf(c[10030]|0,168928,(v=i,i=i+8|0,h[v>>3]=+g[13332]/10.0,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168432,10,1,e|0);break}else{aI(168368,22,1,e|0);break}}else if((b|0)==1){cf(c[10030]|0,168928,(v=i,i=i+8|0,h[v>>3]=+g[13332]/10.0,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168768,10,1,e|0);break}else{aI(168696,18,1,e|0);break}}else if((b|0)==(-2|0)){cf(c[10030]|0,168928,(v=i,i=i+8|0,h[v>>3]=+g[13332]/10.0,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168912,10,1,e|0);break}else{aI(168896,15,1,e|0);break}}else if((b|0)==4){cf(c[10030]|0,168488,(v=i,i=i+8|0,h[v>>3]=+g[13332]/10.0,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168472,10,1,e|0);break}else{aI(168448,22,1,e|0);break}}else if((b|0)==(-1|0)){cf(c[10030]|0,168928,(v=i,i=i+8|0,h[v>>3]=+g[13332]/10.0,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168912,10,1,e|0);break}else{aI(168824,18,1,e|0);break}}else if((b|0)==0){cf(c[10030]|0,168928,(v=i,i=i+8|0,h[v>>3]=+g[13332]/10.0,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168808,10,1,e|0);break}else{aI(168784,15,1,e|0);break}}else if((b|0)==2){cf(c[10030]|0,168928,(v=i,i=i+8|0,h[v>>3]=+g[13332]/10.0,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168616,10,1,e|0);break}else{aI(168576,18,1,e|0);break}}else if((b|0)==7){cf(c[10030]|0,168928,(v=i,i=i+8|0,h[v>>3]=+g[13332]/10.0,v)|0);e=c[10030]|0;if(a[53408]|0){aI(168232,12,1,e|0);break}else{aI(168184,26,1,e|0);break}}}while(0);c[13330]=0;i=d;return}function nv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0.0,m=0.0;f=i;if(a[53312]|0){g=c[10030]|0;aI(169392,2,1,g|0);a[53312]=0}g=c[13334]|0;if((g|0)==2){j=c[10030]|0;k=c[13336]|0;cf(j|0,169240,(v=i,i=i+24|0,c[v>>2]=53352,c[v+8>>2]=k,c[v+16>>2]=k,v)|0)}else if((g|0)==0){k=c[13336]|0;cf(c[10030]|0,169368,(v=i,i=i+24|0,c[v>>2]=53352,c[v+8>>2]=k,c[v+16>>2]=k,v)|0)}else if((g|0)==1){g=c[13336]|0;cf(c[10030]|0,169264,(v=i,i=i+24|0,c[v>>2]=53352,c[v+8>>2]=g,c[v+16>>2]=g,v)|0)}g=c[10030]|0;l=+(b>>>0>>>0)/10.0;if((c[13354]|0)==0){m=+(d>>>0>>>0)/10.0- +(c[13336]|0)/3.0;cf(g|0,169064,(v=i,i=i+16|0,h[v>>3]=l,h[v+8>>3]=m,v)|0)}else{m=l- +(c[13336]|0)/3.0;l=+(d>>>0>>>0)/10.0;cf(g|0,168968,(v=i,i=i+16|0,h[v>>3]=m,h[v+8>>3]=l,v)|0)}aF(40,c[10030]|0);g=e;while(1){e=a[g]|0;d=g+1|0;b=e<<24>>24;if((e<<24>>24|0)==40|(e<<24>>24|0)==41|(e<<24>>24|0)==92){k=c[10030]|0;aF(92,k|0)}else if((e<<24>>24|0)==0){break}aF(b|0,c[10030]|0);g=d}aI(168944,5,1,c[10030]|0);c[13330]=0;i=f;return}function nw(){var a=0;a=c[11684]|0;if((a|0)!=0){uu(a)}c[11684]=0;return}function nx(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;aF(12,c[10030]|0);b=c[11672]|0;if((b|0)>0){d=b}else{e=c[10030]|0;f=aD(e|0)|0;return}do{d=d-1|0;b=c[11676]|0;g=aa(b,d);h=c[11684]|0;i=b;while(1){if((i|0)<=0){break}j=i-1|0;if((a[h+(g+j|0)|0]|0)==32){i=j}else{k=0;l=b;m=h;n=13169;break}}L17850:do{if((n|0)==13169){while(1){n=0;h=a[m+(aa(l,d)+k|0)|0]|0;aF(h|0,c[10030]|0);h=k+1|0;if((h|0)>=(i|0)){break L17850}k=h;l=c[11676]|0;m=c[11684]|0;n=13169}}}while(0);i=(d|0)>0;if(i|a[46744]^1){h=c[10030]|0;aF(10,h|0)}}while(i);e=c[10030]|0;f=aD(e|0)|0;return}function ny(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0.0,J=0.0;b=i;i=i+48|0;d=b|0;e=b+24|0;f=c[13898]|0;L17860:do{if((f|0)<(c[8272]|0)){g=d|0;j=d+8|0;k=e|0;l=e+8|0;m=f;L17862:while(1){n=c[1054]|0;o=(a[n+(m*40&-1)|0]&1)==0;L17864:do{if(!o){p=c[n+(m*40&-1)+36>>2]|0;q=n+(m*40&-1)+32|0;r=c[10036]|0;s=0;while(1){if((s|0)>=(p|0)){break}if((a[r+((c[q>>2]|0)+s|0)|0]|0)==(a[s+103664|0]|0)){s=s+1|0}else{break L17864}}if((s|0)==1){break L17860}}}while(0);q=c[60192]|0;L17871:do{if((q|0)==0){t=240768}else{r=c[n+(m*40&-1)+36>>2]|0;p=c[n+(m*40&-1)+32>>2]|0;u=(r|0)>0;w=c[10036]|0;x=240768;y=q;while(1){L17875:do{if(!o){if(u){z=0;A=0;B=p;while(1){C=a[y+z|0]|0;if(C<<24>>24==(a[w+(z+B|0)|0]|0)){D=B;E=A}else{if(C<<24>>24!=36){break L17875}D=B-1|0;E=1}F=z+1|0;if((F|0)<(E+r|0)){z=F;A=E;B=D}else{break}}if((E|0)==0){G=F}else{t=x;break L17871}}else{G=0}B=a[y+G|0]|0;if((B<<24>>24|0)==36|(B<<24>>24|0)==0){t=x;break L17871}}}while(0);B=x+8|0;A=c[B>>2]|0;if((A|0)==0){t=B;break}else{x=B;y=A}}}}while(0);o=c[t+4>>2]|0;if((o|0)==4){c[13898]=m+1;H=13201}else if((o|0)==0){c[13898]=m+1;a[46744]=0}else if((o|0)==3){c[13898]=m+1;c[(c[3524]|0)+68>>2]=104;q=(c[3524]|0)+96|0;c[q>>2]=c[q>>2]&-33}else if((o|0)==1){c[13898]=m+1;a[46744]=1}else if((o|0)==2){c[13898]=m+1;c[(c[3524]|0)+68>>2]=74;o=(c[3524]|0)+96|0;c[o>>2]=c[o>>2]|32}else{H=13201}L17894:do{if((H|0)==13201){H=0;o=is(d)|0;q=c[o>>2]|0;if((q|0)==2){I=+h[o+8>>3]}else if((q|0)==3){I=+uz(c[o+8>>2]|0,0)}else if((q|0)==1){I=+(c[o+8>>2]|0)}else{H=13205;break L17862}if((c[g>>2]|0)==3){uu(c[j>>2]|0);c[g>>2]=1}o=~~I;q=c[13898]|0;if((q|0)>=(c[8272]|0)){break}n=c[1054]|0;y=(a[n+(q*40&-1)|0]&1)==0;L17905:do{if(!y){x=c[n+(q*40&-1)+36>>2]|0;r=n+(q*40&-1)+32|0;w=c[10036]|0;p=0;while(1){if((p|0)>=(x|0)){H=13213;break}if((a[w+((c[r>>2]|0)+p|0)|0]|0)==(a[p+103664|0]|0)){p=p+1|0}else{break}}if((H|0)==13213){H=0;if((p|0)==1){break L17894}}if(y){break}r=c[n+(q*40&-1)+36>>2]|0;w=n+(q*40&-1)+32|0;x=c[10036]|0;u=0;while(1){if((u|0)>=(r|0)){break}if((a[x+((c[w>>2]|0)+u|0)|0]|0)==(a[u+148464|0]|0)){u=u+1|0}else{break L17905}}if((u|0)!=1){break}c[13898]=q+1}}while(0);q=is(e)|0;n=c[q>>2]|0;if((n|0)==1){J=+(c[q+8>>2]|0)}else if((n|0)==2){J=+h[q+8>>3]}else if((n|0)==3){J=+uz(c[q+8>>2]|0,0)}else{H=13224;break L17862}if((c[k>>2]|0)==3){uu(c[l>>2]|0);c[k>>2]=1}q=~~J;c[(c[3524]|0)+8>>2]=o;c[11676]=o;c[(c[3524]|0)+12>>2]=q;c[11672]=q}}while(0);m=c[13898]|0;if((m|0)>=(c[8272]|0)){break L17860}}if((H|0)==13224){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((H|0)==13205){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);H=(c[(c[3524]|0)+68>>2]|0)==74?217456:179864;e=c[11676]|0;d=c[11672]|0;be(13048,169488,(v=i,i=i+32|0,c[v>>2]=a[46744]|0?136208:179864,c[v+8>>2]=H,c[v+16>>2]=e,c[v+24>>2]=d,v)|0);i=b;return}function nz(){var a=0,b=0,d=0,e=0,f=0;a=i;b=c[11684]|0;if((b|0)!=0){uu(b)}b=aa((c[11676]<<1)+2|0,(c[11672]|0)+1|0);d=ut(b)|0;do{if((d|0)==0){gk();e=ut(b)|0;if((e|0)!=0){f=e;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=169528,v)|0)}else{f=d}}while(0);c[11684]=f;c[11680]=f+aa(c[11672]|0,c[11676]|0);i=a;return}function nA(){c[59832]=0;c[59834]=0;c[11664]=0;g[11668]=0.0;a[920]=0;return}function nB(){c[59832]=0;c[59834]=0;return}function nC(a){a=a|0;c[11666]=a;return 1}function nD(b,d,e,f,g,i){b=b|0;d=+d;e=+e;f=f|0;g=g|0;i=i|0;if((i|0)==3){c[59572]=c[11678];c[59570]=c[11674];return}else if((i|0)==4){b=c[59570]|0;c[11678]=c[59572];c[11674]=b;return}else{if(a[238320]|0){return}a[238320]=1;c[11232]=43856;h[29791]=e*2.0;a[238304]=g&1;c[59578]=i;a[238296]=f&1;return}}function nE(a){a=a|0;c[11664]=(((a|0)>-1?a:-a|0)|0)%7&-1;return}function nF(a){a=a|0;g[11668]=(a|0)!=0?90.0:0.0;return 1}function nG(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;e=c[11674]|0;f=d-e|0;g=(f|0)>-1?f:-f|0;f=c[11678]|0;h=b-f|0;i=(h|0)>-1?h:-h|0;if((g|0)>(i|0)){j=a[46728]|0;k=j<<24>>24;if((k|0)==1){l=1;m=43;n=58}else if((k|0)==2){l=2;m=43;n=124}else{l=3;m=j;n=j}j=c[11676]|0;do{if(j>>>0>>0|(c[11672]|0)>>>0>>0){o=e}else{k=aa(j,e)+f|0;if((a[(c[11680]|0)+k|0]|0|0)>=(l|0)){o=e;break}a[(c[11684]|0)+k|0]=m;k=aa(c[11676]|0,e)+f|0;a[(c[11680]|0)+k|0]=l&255;o=c[11674]|0}}while(0);j=d-o|0;k=(j|0)>-1?j:-j|0;if((k|0)>1){p=l&255;q=1;r=o;o=j;j=k;while(1){k=c[11678]|0;s=~~(+(q|0)*+(b-k|0)/+(j|0)+.5)+k|0;k=aa(o>>31|1,q)+r|0;t=c[11676]|0;do{if(t>>>0>>0|(c[11672]|0)>>>0>>0){u=r}else{v=s+aa(t,k)|0;if((a[(c[11680]|0)+v|0]|0|0)>=(l|0)){u=r;break}a[(c[11684]|0)+v|0]=n;v=aa(c[11676]|0,k)+s|0;a[(c[11680]|0)+v|0]=p;u=c[11674]|0}}while(0);s=q+1|0;k=d-u|0;t=(k|0)>-1?k:-k|0;if((s|0)<(t|0)){q=s;r=u;o=k;j=t}else{break}}}j=c[11676]|0;if(j>>>0>>0|(c[11672]|0)>>>0>>0){c[11678]=b;c[11674]=d;return}o=aa(j,d)+b|0;if((a[(c[11680]|0)+o|0]|0|0)>=(l|0)){c[11678]=b;c[11674]=d;return}a[(c[11684]|0)+o|0]=m;m=aa(c[11676]|0,d)+b|0;a[(c[11680]|0)+m|0]=l&255;c[11678]=b;c[11674]=d;return}l=a[46728]|0;m=l<<24>>24;if((i|0)<=(g|0)){g=(m-1|0)>>>0<2;o=g?m:3;if((i|0)<0){c[11678]=b;c[11674]=d;return}i=g?43:l;g=o&255;j=0;u=f;r=h;h=e;while(1){q=aa(r>>31|1,j)+u|0;p=aa(d-h>>31|1,j)+h|0;n=c[11676]|0;do{if(n>>>0>>0|(c[11672]|0)>>>0

>>0){w=u}else{t=aa(p,n)+q|0;if((a[(c[11680]|0)+t|0]|0|0)>=(o|0)){w=u;break}a[(c[11684]|0)+t|0]=i;t=aa(c[11676]|0,p)+q|0;a[(c[11680]|0)+t|0]=g;w=c[11678]|0}}while(0);q=j+1|0;p=b-w|0;if((q|0)>(((p|0)>-1?p:-p|0)|0)){break}j=q;u=w;r=p;h=c[11674]|0}c[11678]=b;c[11674]=d;return}if((m|0)==2){x=2;y=43;z=45}else if((m|0)==1){x=1;y=43;z=46}else{x=3;y=l;z=l}l=c[11676]|0;do{if(l>>>0>>0|(c[11672]|0)>>>0>>0){A=f}else{m=aa(l,e)+f|0;if((a[(c[11680]|0)+m|0]|0|0)>=(x|0)){A=f;break}a[(c[11684]|0)+m|0]=y;m=aa(c[11676]|0,e)+f|0;a[(c[11680]|0)+m|0]=x&255;A=c[11678]|0}}while(0);f=b-A|0;e=(f|0)>-1?f:-f|0;if((e|0)>1){l=x&255;m=1;h=A;A=f;f=e;while(1){e=aa(A>>31|1,m)+h|0;r=c[11674]|0;w=~~(+(m|0)*+(d-r|0)/+(f|0)+.5)+r|0;r=c[11676]|0;do{if(r>>>0>>0|(c[11672]|0)>>>0>>0){B=h}else{u=aa(w,r)+e|0;if((a[(c[11680]|0)+u|0]|0|0)>=(x|0)){B=h;break}a[(c[11684]|0)+u|0]=z;u=aa(c[11676]|0,w)+e|0;a[(c[11680]|0)+u|0]=l;B=c[11678]|0}}while(0);e=m+1|0;w=b-B|0;r=(w|0)>-1?w:-w|0;if((e|0)<(r|0)){m=e;h=B;A=w;f=r}else{break}}}f=c[11676]|0;if(f>>>0>>0|(c[11672]|0)>>>0>>0){c[11678]=b;c[11674]=d;return}A=aa(f,d)+b|0;if((a[(c[11680]|0)+A|0]|0|0)>=(x|0)){c[11678]=b;c[11674]=d;return}a[(c[11684]|0)+A|0]=y;y=aa(c[11676]|0,d)+b|0;a[(c[11680]|0)+y|0]=x&255;c[11678]=b;c[11674]=d;return}function nH(b){b=b|0;if((b|0)==(-1|0)){a[46728]=1;return}else if((b|0)==(-2|0)){a[46728]=2;return}else{if((b|0)<-2){a[46728]=32;return}else{a[46728]=a[240816+((b|0)%7&-1)|0]|0;return}}}function nI(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;if((e|0)==-1){f=46}else{f=((e|0)%26&-1)+65&255}e=c[11676]|0;if(e>>>0>>0|(c[11672]|0)>>>0>>0){return}g=aa(e,d)+b|0;if((a[(c[11680]|0)+g|0]|0)>=4){return}a[(c[11684]|0)+g|0]=f;f=aa(c[11676]|0,d)+b|0;a[(c[11680]|0)+f|0]=4;return}function nJ(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=uA(e|0)|0;g=c[11676]|0;if((f+b|0)>>>0>g>>>0){h=g-f|0;i=(h|0)<0?0:h}else{i=b}if(i>>>0>>0){j=e;k=i;l=g}else{return}while(1){g=a[j]|0;if(g<<24>>24==0){m=13328;break}do{if(l>>>0>>0|(c[11672]|0)>>>0>>0){n=l}else{i=aa(l,d)+k|0;if((a[(c[11680]|0)+i|0]|0)>=5){n=l;break}a[(c[11684]|0)+i|0]=g;i=aa(c[11676]|0,d)+k|0;a[(c[11680]|0)+i|0]=5;n=c[11676]|0}}while(0);g=k+1|0;if(g>>>0>>0){j=j+1|0;k=g;l=n}else{m=13329;break}}if((m|0)==13329){return}else if((m|0)==13328){return}}function nK(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0;g=a[46728]|0;h=c[11678]|0;i=c[11674]|0;a[46728]=62;c[11678]=b;c[11674]=d;nG(e,f);a[46728]=g;c[11678]=h<<24>>24;c[11674]=i<<24>>24;return}function nL(){var b=0,d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0;if(!(a[238320]|0)){return}b=c[11678]|0;a[c[11232]|0]=0;d=uA(43856)|0;e=c[11676]|0;L18067:do{if((b|0)<(e|0)){f=b;g=43856;i=e;while(1){j=a[g]|0;if(j<<24>>24==0){break L18067}do{if((a[238304]&1)==0){k=i}else{l=~~(+(c[11674]|0)+ +h[29791]);if(i>>>0>>0|(c[11672]|0)>>>0>>0){k=i;break}m=aa(l,i)+f|0;if((a[(c[11680]|0)+m|0]|0)>=5){k=i;break}a[(c[11684]|0)+m|0]=j;m=aa(c[11676]|0,l)+f|0;a[(c[11680]|0)+m|0]=5;k=c[11676]|0}}while(0);j=f+1|0;if((j|0)<(k|0)){f=j;g=g+1|0;i=k}else{break}}}}while(0);do{if((a[238296]&1)!=0){if((c[59578]|0)==1){c[11678]=(c[11678]|0)+((d|0)/2&-1);break}else{c[11678]=(c[11678]|0)+d;break}}}while(0);a[238320]=0;return}function nM(){var b=0;if(a[920]|0){b=c[10030]|0;aI(170576,11,1,b|0)}aI(169584,19,1,c[10030]|0);return}function nN(){var a=0,b=0,d=0.0,e=0.0;a=i;b=c[3524]|0;d=+((c[b+8>>2]|0)>>>0>>>0)/60.0;e=+((c[b+12>>2]|0)>>>0>>>0)/60.0;cf(c[10030]|0,240336,(v=i,i=i+72|0,h[v>>3]=d,h[v+8>>3]=e,h[v+16>>3]=d,h[v+24>>3]=e,c[v+32>>2]=170312,h[v+40>>3]=1.456,h[v+48>>3]=.0351,h[v+56>>3]=1.0,c[v+64>>2]=169624,v)|0);cf(c[10030]|0,239344,(v=i,i=i+8|0,c[v>>2]=7,v)|0);cf(c[10030]|0,169824,(v=i,i=i+8|0,c[v>>2]=7,v)|0);cf(c[10030]|0,169776,(v=i,i=i+24|0,c[v>>2]=103960,c[v+8>>2]=169624,c[v+16>>2]=170112,v)|0);cf(c[10030]|0,169776,(v=i,i=i+24|0,c[v>>2]=170288,c[v+8>>2]=170288,c[v+16>>2]=170104,v)|0);cf(c[10030]|0,169776,(v=i,i=i+24|0,c[v>>2]=170224,c[v+8>>2]=170224,c[v+16>>2]=170080,v)|0);cf(c[10030]|0,169776,(v=i,i=i+24|0,c[v>>2]=40160,c[v+8>>2]=40160,c[v+16>>2]=170008,v)|0);cf(c[10030]|0,169776,(v=i,i=i+24|0,c[v>>2]=170216,c[v+8>>2]=170216,c[v+16>>2]=169992,v)|0);cf(c[10030]|0,169776,(v=i,i=i+24|0,c[v>>2]=170208,c[v+8>>2]=170208,c[v+16>>2]=169976,v)|0);cf(c[10030]|0,169776,(v=i,i=i+24|0,c[v>>2]=174448,c[v+8>>2]=174448,c[v+16>>2]=169952,v)|0);aI(169632,79,1,c[10030]|0);i=a;return}function nO(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0;e=i;c[59834]=b;c[59832]=d;if(a[920]|0){f=c[10030]|0;aI(170576,11,1,f|0);g=c[59834]|0;j=c[59832]|0}else{g=b;j=d}a[920]=0;d=c[11664]|0;b=c[35224+(d<<2)>>2]|0;f=c[35256+(d<<2)>>2]|0;cf(c[10030]|0,169856,(v=i,i=i+48|0,c[v>>2]=b,c[v+8>>2]=f,c[v+16>>2]=b,c[v+24>>2]=f,h[v+32>>3]=+(g>>>0>>>0)/60.0,h[v+40>>3]=+(j>>>0>>>0)/60.0,v)|0);i=e;return}function nP(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=i;c[59834]=b;c[59832]=d;a[920]=1;f=c[11664]|0;g=c[35256+(f<<2)>>2]|0;cf(c[10030]|0,170144,(v=i,i=i+32|0,c[v>>2]=c[35224+(f<<2)>>2],c[v+8>>2]=g,h[v+16>>3]=+(b>>>0>>>0)/60.0,h[v+24>>3]=+(d>>>0>>>0)/60.0,v)|0);i=e;return}function nQ(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0;f=i;j=a[e]|0;if(j<<24>>24==0){i=f;return}else{k=0;l=j}while(1){j=k+1|0;if(l<<24>>24==0){break}k=j;l=a[e+j|0]|0}if(a[920]|0){l=c[10030]|0;aI(170576,11,1,l|0)}a[920]=0;cf(c[10030]|0,170552,(v=i,i=i+8|0,c[v>>2]=103960,v)|0);m=+g[11668];l=c[11666]|0;do{if(m!=90.0){if((l|0)==0){n=+(d>>>0>>>0)-31.2;o=n;p=+(b>>>0>>>0)+ +(k|0)*70.55999999999999;q=n;r=+(b>>>0>>>0);break}else if((l|0)==2){n=+(d>>>0>>>0)-31.2;o=n;p=+(b>>>0>>>0);q=n;r=+(b>>>0>>>0)- +(k|0)*70.55999999999999;break}else if((l|0)==1){n=+(d>>>0>>>0)-31.2;o=n;p=+(b>>>0>>>0);q=n;r=+(b>>>0>>>0)- +(k|0)*70.55999999999999*.5;break}else{o=1.0;p=1.0;q=1.0;r=1.0;break}}else{if((l|0)==2){n=+(b>>>0>>>0)+31.2;o=+(d>>>0>>>0);p=n;q=+(d>>>0>>>0)- +(k|0)*100.8;r=n;break}else if((l|0)==0){n=+(b>>>0>>>0)+31.2;o=+(d>>>0>>>0)+ +(k|0)*70.55999999999999;p=n;q=+(d>>>0>>>0);r=n;break}else if((l|0)==1){n=+(b>>>0>>>0)+31.2;o=+(d>>>0>>>0);p=n;q=+(d>>>0>>>0)- +(k|0)*70.55999999999999*.5;r=n;break}else{o=1.0;p=1.0;q=1.0;r=1.0;break}}}while(0);cf(c[10030]|0,170480,(v=i,i=i+48|0,h[v>>3]=r/60.0,h[v+8>>3]=q/60.0,h[v+16>>3]=1.456,c[v+24>>2]=e,h[v+32>>3]=m,c[v+40>>2]=170312,v)|0);e=c[11666]|0;if((e|0)==0){i=f;return}cf(c[10030]|0,170424,(v=i,i=i+24|0,c[v>>2]=e,h[v+8>>3]=p/60.0,h[v+16>>3]=o/60.0,v)|0);i=f;return}function nR(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0.0,aA=0.0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0.0,aV=0,aW=0,aX=0.0,aY=0,aZ=0,a_=0,a$=0.0,a0=0.0,a1=0.0,a2=0;b=i;i=i+192|0;d=b|0;e=b+24|0;f=b+48|0;j=b+72|0;k=b+96|0;l=b+120|0;m=b+144|0;n=b+168|0;o=c[13898]|0;p=o-1|0;q=c[1054]|0;r=c[q+(p*40&-1)+36>>2]|0;L18121:do{if((a[q+(p*40&-1)|0]&1)!=0&(r|0)>0){s=c[10036]|0;t=0;u=0;w=c[q+(p*40&-1)+32>>2]|0;while(1){if((a[t+171032|0]|0)==(a[s+(t+w|0)|0]|0)){x=w;y=u}else{if((t|0)!=7){z=13384;break L18121}x=w-1|0;y=1}A=t+1|0;if((A|0)<(y+r|0)){t=A;u=y;w=x}else{break}}if((y|0)!=0){B=o;break}if((t|0)==6|(t|0)==10){B=o}else{z=13384}}else{z=13384}}while(0);if((z|0)==13384){c[(c[3524]|0)+8>>2]=27002;c[(c[3524]|0)+12>>2]=20252;a[46232]=0;a[45624]=0;c[11564]=16777215;a[45056]=0;B=c[13898]|0}o=c[8272]|0;L18134:do{if((B|0)<(o|0)){y=f|0;x=f+8|0;r=l|0;p=l+8|0;q=m|0;w=m+8|0;u=e|0;s=e+8|0;A=d|0;C=d+8|0;D=j|0;E=j+8|0;F=k|0;G=k+8|0;H=0;I=B;J=o;L18136:while(1){K=c[1054]|0;L=a[K+(I*40&-1)|0]|0;M=(L&1)==0;N=c[K+(I*40&-1)+36>>2]|0;O=K+(I*40&-1)+32|0;L18138:do{if(M){P=c[O>>2]|0;z=13456}else{Q=c[10036]|0;R=0;while(1){if((R|0)>=(N|0)){z=13392;break}if((a[Q+((c[O>>2]|0)+R|0)|0]|0)==(a[R+103664|0]|0)){R=R+1|0}else{break}}if((z|0)==13392){z=0;if((R|0)==1){S=H;T=I;break L18134}}Q=c[O>>2]|0;if(!((N|0)>0&(M^1))){P=Q;z=13456;break}U=c[10036]|0;V=0;W=0;X=Q;while(1){if((a[V+170976|0]|0)==(a[U+(V+X|0)|0]|0)){Y=X;Z=W}else{if((V|0)!=2){break}Y=X-1|0;Z=1}_=V+1|0;if((_|0)<(Z+N|0)){V=_;W=Z;X=Y}else{z=13399;break}}do{if((z|0)==13399){z=0;if((Z|0)==0){if(!((V|0)==1|(V|0)==7)){break}}a[45952]=a[216600]|0;a[45953|0]=a[216601|0]|0;a[45954|0]=a[216602|0]|0;a[45955|0]=a[216603|0]|0;a[45956|0]=a[216604|0]|0;a[45957|0]=a[216605|0]|0;g[11486]=12.0;a[45624]=0;a[46232]=0;X=(c[3524]|0)+96|0;c[X>>2]=c[X>>2]&-1025;c[13898]=(c[13898]|0)+1;$=H;break L18138}}while(0);if(M){P=Q;z=13456;break}L18160:do{if((N|0)>0){V=c[10036]|0;X=0;W=0;U=Q;while(1){if((a[X+184472|0]|0)==(a[V+(X+U|0)|0]|0)){aa=U;ab=W}else{if((X|0)!=1){break L18160}aa=U-1|0;ab=1}R=X+1|0;if((R|0)<(ab+N|0)){X=R;W=ab;U=aa}else{break}}if((ab|0)==0){if(!((X|0)==0|(X|0)==10)){break}}a[45624]=1;U=(c[3524]|0)+96|0;c[U>>2]=c[U>>2]|1024;c[13898]=(c[13898]|0)+1;$=H;break L18138}}while(0);if(!((N|0)>0&(M^1))){P=Q;z=13456;break}U=c[10036]|0;W=0;V=0;R=Q;while(1){if((a[W+115600|0]|0)==(a[U+(W+R|0)|0]|0)){ac=R;ad=V}else{if((W|0)!=1){z=13421;break}ac=R-1|0;ad=1}_=W+1|0;if((_|0)<(ad+N|0)){W=_;V=ad;R=ac}else{z=13419;break}}do{if((z|0)==13419){z=0;if((ad|0)!=0){break}if(!((W|0)==0|(W|0)==5)){z=13421}}}while(0);L18183:do{if((z|0)==13421){z=0;if(M){P=Q;z=13456;break L18138}L18186:do{if((N|0)>0){W=c[10036]|0;R=0;V=0;U=Q;while(1){if((a[R+115536|0]|0)==(a[W+(R+U|0)|0]|0)){ae=U;af=V}else{if((R|0)!=1){break L18186}ae=U-1|0;af=1}_=R+1|0;if((_|0)<(af+N|0)){R=_;V=af;U=ae}else{break}}if((af|0)!=0){break L18183}if((R|0)==0|(R|0)==6){break L18183}}}while(0);if(!((N|0)>0&(M^1))){P=Q;z=13456;break L18138}X=c[10036]|0;U=0;V=0;W=Q;while(1){if((a[U+129104|0]|0)==(a[X+(U+W|0)|0]|0)){ag=W;ah=V}else{if((U|0)!=2){break}ag=W-1|0;ah=1}_=U+1|0;if((_|0)<(ah+N|0)){U=_;V=ah;W=ag}else{z=13437;break}}do{if((z|0)==13437){z=0;if((ah|0)==0){if(!((U|0)==1|(U|0)==6)){break}}a[46232]=1;c[13898]=I+1;$=H;break L18138}}while(0);if(M){P=Q;z=13456;break L18138}L18211:do{if((N|0)>0){U=c[10036]|0;W=0;V=0;X=Q;while(1){if((a[W+217776|0]|0)==(a[U+(W+X|0)|0]|0)){ai=X;aj=V}else{if((W|0)!=5){break L18211}ai=X-1|0;aj=1}_=W+1|0;if((_|0)<(aj+N|0)){W=_;V=aj;X=ai}else{break}}if((aj|0)==0){if(!((W|0)==4|(W|0)==7)){break}}a[45616]=1;c[13898]=I+1;$=H;break L18138}}while(0);if(!((N|0)>0&(M^1))){P=Q;z=13456;break L18138}X=c[10036]|0;V=0;do{if((a[V+137232|0]|0)!=(a[X+(V+Q|0)|0]|0)){P=Q;z=13456;break L18138}V=V+1|0;}while((V|0)<(N|0));if((V|0)!=4){P=Q;z=13456;break L18138}a[45616]=0;c[13898]=I+1;$=H;break L18138}}while(0);a[45624]=0;Q=(c[3524]|0)+96|0;c[Q>>2]=c[Q>>2]&-1025;c[13898]=(c[13898]|0)+1;$=H}}while(0);L18232:do{if((z|0)==13456){z=0;O=(J|0)>(I|0);L18234:do{if(O){if(M){ak=I;al=K;am=N;an=P;ao=L;break}Q=c[10036]|0;X=0;while(1){if((X|0)>=(N|0)){break}if((a[Q+(P+X|0)|0]|0)==(a[X+128480|0]|0)){X=X+1|0}else{z=13462;break L18234}}if((X|0)==2){z=13470}else{z=13462}}else{z=13462}}while(0);L18241:do{if((z|0)==13462){z=0;L18243:do{if((N|0)>0&(M^1)){Q=c[10036]|0;V=0;U=0;R=P;while(1){if((a[V+128560|0]|0)==(a[Q+(V+R|0)|0]|0)){ap=R;aq=U}else{if((V|0)!=5){break}ap=R-1|0;aq=1}_=V+1|0;if((_|0)<(aq+N|0)){V=_;U=aq;R=ap}else{z=13468;break}}if((z|0)==13468){z=0;if((aq|0)!=0){z=13470;break L18241}if((V|0)==4|(V|0)==10){z=13470;break L18241}}if(!((N|0)>0&(M^1))){break}R=c[10036]|0;U=0;Q=0;W=P;while(1){if((a[U+115496|0]|0)==(a[R+(U+W|0)|0]|0)){ar=W;as=Q}else{if((U|0)!=1){break L18243}ar=W-1|0;as=1}_=U+1|0;if((_|0)<(as+N|0)){U=_;Q=as;W=ar}else{break}}if((as|0)==0){if(!((U|0)==0|(U|0)==5)){break}}a[46232]=0;c[13898]=I+1;$=H;break L18232}}while(0);L18267:do{if(O){if(M){ak=I;al=K;am=N;an=P;ao=L;break L18241}X=c[10036]|0;W=0;while(1){if((W|0)>=(N|0)){break}if((a[X+(P+W|0)|0]|0)==(a[W+128296|0]|0)){W=W+1|0}else{z=13494;break L18267}}if((W|0)!=2){z=13494}}else{z=13494}}while(0);do{if((z|0)==13494){z=0;if(!((N|0)>0&(M^1))){ak=I;al=K;am=N;an=P;ao=L;break L18241}X=c[10036]|0;U=0;Q=0;R=P;while(1){if((a[U+128400|0]|0)==(a[X+(U+R|0)|0]|0)){at=R;au=Q}else{if((U|0)!=5){break}at=R-1|0;au=1}V=U+1|0;if((V|0)<(au+N|0)){U=V;Q=au;R=at}else{z=13500;break}}if((z|0)==13500){z=0;if((au|0)!=0){break}if((U|0)==4|(U|0)==9){break}}if(M){ak=I;al=K;am=N;an=P;ao=L;break L18241}L18288:do{if((N|0)>0){R=c[10036]|0;Q=0;X=0;W=P;while(1){if((a[Q+122880|0]|0)==(a[R+(Q+W|0)|0]|0)){av=W;aw=X}else{if((Q|0)!=3){break L18288}av=W-1|0;aw=1}V=Q+1|0;if((V|0)<(aw+N|0)){Q=V;X=aw;W=av}else{break}}if((aw|0)==0){if(!((Q|0)==8|(Q|0)==2)){break}}c[13898]=I+1;c[(c[3524]|0)+68>>2]=124;W=(c[3524]|0)+96|0;c[W>>2]=c[W>>2]|32;$=H;break L18232}}while(0);if(!((N|0)>0&(M^1))){ak=I;al=K;am=N;an=P;ao=L;break L18241}U=c[10036]|0;W=0;X=0;R=P;while(1){if((a[W+121536|0]|0)==(a[U+(W+R|0)|0]|0)){ax=R;ay=X}else{if((W|0)!=5){ak=I;al=K;am=N;an=P;ao=L;break L18241}ax=R-1|0;ay=1}V=W+1|0;if((V|0)<(ay+N|0)){W=V;X=ay;R=ax}else{break}}if((ay|0)==0){if(!((W|0)==4|(W|0)==10)){ak=I;al=K;am=N;an=P;ao=L;break L18241}}c[13898]=I+1;c[(c[3524]|0)+68>>2]=102;R=(c[3524]|0)+96|0;c[R>>2]=c[R>>2]&-33;R=c[13898]|0;X=c[1054]|0;ak=R;al=X;am=c[X+(R*40&-1)+36>>2]|0;an=c[X+(R*40&-1)+32>>2]|0;ao=a[X+(R*40&-1)|0]|0;break L18241}}while(0);c[13898]=I+1;R=is(j)|0;X=c[R>>2]|0;if((X|0)==1){az=+(c[R+8>>2]|0)}else if((X|0)==2){az=+h[R+8>>3]}else if((X|0)==3){az=+uz(c[R+8>>2]|0,0)}else{z=13506;break L18136}if((c[D>>2]|0)==3){uu(c[E>>2]|0);c[D>>2]=1}h[5704]=az;if(az>=.1){$=H;break L18232}h[5704]=1.0;$=H;break L18232}}while(0);if((z|0)==13470){z=0;c[13898]=I+1;O=is(k)|0;R=c[O>>2]|0;if((R|0)==2){aA=+h[O+8>>3]}else if((R|0)==1){aA=+(c[O+8>>2]|0)}else if((R|0)==3){aA=+uz(c[O+8>>2]|0,0)}else{z=13474;break L18136}if((c[F>>2]|0)==3){uu(c[G>>2]|0);c[F>>2]=1}h[5778]=aA;if(aA>=.5){$=H;break}h[5778]=1.0;$=H;break}L18334:do{if((ao&1)!=0&(am|0)>0){O=c[10036]|0;R=0;X=0;U=an;while(1){if((a[R+170936|0]|0)==(a[O+(R+U|0)|0]|0)){aB=U;aC=X}else{if((R|0)!=4){aD=H;aE=ak;aF=al;aG=am;aH=an;aI=ao;break L18334}aB=U-1|0;aC=1}V=R+1|0;if((V|0)<(aC+am|0)){R=V;X=aC;U=aB}else{break}}if((aC|0)==0){if(!((R|0)==3|(R|0)==10)){aD=H;aE=ak;aF=al;aG=am;aH=an;aI=ao;break}}c[13898]=ak+1;U=hK()|0;c[11564]=U>>>16&255|U&65280|U<<16&16711680;X=c[13898]|0;O=c[1054]|0;aD=U;aE=X;aF=O;aG=c[O+(X*40&-1)+36>>2]|0;aH=c[O+(X*40&-1)+32>>2]|0;aI=a[O+(X*40&-1)|0]|0}else{aD=H;aE=ak;aF=al;aG=am;aH=an;aI=ao}}while(0);L18347:do{if((aI&1)!=0&(aG|0)>0){X=c[10036]|0;O=0;U=0;V=aH;while(1){if((a[O+170920|0]|0)==(a[X+(O+V|0)|0]|0)){aJ=V;aK=U}else{if((O|0)!=5){aL=aE;aM=aG;aN=aH;aO=aI;break L18347}aJ=V-1|0;aK=1}_=O+1|0;if((_|0)<(aK+aG|0)){O=_;U=aK;V=aJ}else{break}}if((aK|0)==0){if(!((O|0)==4|(O|0)==14)){aL=aE;aM=aG;aN=aH;aO=aI;break}}V=aE+1|0;c[13898]=V;a[45056]=1;aL=V;aM=c[aF+(V*40&-1)+36>>2]|0;aN=c[aF+(V*40&-1)+32>>2]|0;aO=a[aF+(V*40&-1)|0]|0}else{aL=aE;aM=aG;aN=aH;aO=aI}}while(0);V=(aO&1)==0;L18360:do{if((aM|0)>0&(V^1)){U=c[10036]|0;X=0;R=0;_=aN;while(1){if((a[X+90488|0]|0)==(a[U+(X+_|0)|0]|0)){aP=_;aQ=R}else{if((X|0)!=2){break L18360}aP=_-1|0;aQ=1}aR=X+1|0;if((aR|0)<(aQ+aM|0)){X=aR;R=aQ;_=aP}else{break}}if((aQ|0)==0){if(!((X|0)==4|(X|0)==1)){break}}_=aL+1|0;c[13898]=_;L18372:do{if((_|0)<(c[8272]|0)){L18374:do{if((a[aF+(_*40&-1)|0]&1)!=0){R=c[aF+(_*40&-1)+36>>2]|0;U=aF+(_*40&-1)+32|0;O=c[10036]|0;aR=0;while(1){if((aR|0)>=(R|0)){break}if((a[O+((c[U>>2]|0)+aR|0)|0]|0)==(a[aR+103664|0]|0)){aR=aR+1|0}else{break L18374}}if((aR|0)==1){aS=1024;aT=768;z=13584;break L18372}}}while(0);W=is(e)|0;U=c[W>>2]|0;if((U|0)==1){aU=+(c[W+8>>2]|0)}else if((U|0)==2){aU=+h[W+8>>3]}else if((U|0)==3){aU=+uz(c[W+8>>2]|0,0)}else{z=13566;break L18136}if((c[u>>2]|0)==3){uu(c[s>>2]|0);c[u>>2]=1}W=~~aU;U=c[13898]|0;L18389:do{if((c[8272]|0)>(U|0)){O=c[1054]|0;if((a[O+(U*40&-1)|0]&1)==0){aV=768;break}R=c[O+(U*40&-1)+36>>2]|0;Q=O+(U*40&-1)+32|0;O=c[10036]|0;aW=0;while(1){if((aW|0)>=(R|0)){break}if((a[O+((c[Q>>2]|0)+aW|0)|0]|0)==(a[aW+148464|0]|0)){aW=aW+1|0}else{aV=768;break L18389}}if((aW|0)!=1){aV=768;break}c[13898]=U+1;Q=is(d)|0;O=c[Q>>2]|0;if((O|0)==3){aX=+uz(c[Q+8>>2]|0,0)}else if((O|0)==1){aX=+(c[Q+8>>2]|0)}else if((O|0)==2){aX=+h[Q+8>>3]}else{z=13579;break L18136}if((c[A>>2]|0)==3){uu(c[C>>2]|0);c[A>>2]=1}aV=~~aX}else{aV=768}}while(0);if((W|0)>0){aS=W;aT=aV;z=13584}else{aY=aV}}else{aS=1024;aT=768;z=13584}}while(0);if((z|0)==13584){z=0;c[(c[3524]|0)+8>>2]=~~(+(aS|0)*26.37);aY=aT}if((aY|0)>0){c[(c[3524]|0)+12>>2]=~~(+(aY|0)*26.37)}_=c[3524]|0;c[_+28>>2]=((c[_+8>>2]|0)>>>0)/160>>>0;_=c[3524]|0;c[_+24>>2]=c[_+28>>2];$=aD;break L18232}}while(0);_=c[8272]|0;X=(_|0)>(aL|0);L18413:do{if(V|X^1){aZ=aL}else{U=c[10036]|0;Q=0;while(1){if((Q|0)>=(aM|0)){z=13592;break}if((a[U+(aN+Q|0)|0]|0)==(a[Q+128096|0]|0)){Q=Q+1|0}else{break}}do{if((z|0)==13592){z=0;if((Q|0)!=9){break}O=aL+1|0;c[13898]=O;L18421:do{if((O|0)<(_|0)){L18423:do{if((a[aF+(O*40&-1)|0]&1)!=0){R=c[aF+(O*40&-1)+36>>2]|0;aR=aF+(O*40&-1)+32|0;a_=0;while(1){if((a_|0)>=(R|0)){break}if((a[U+((c[aR>>2]|0)+a_|0)|0]|0)==(a[a_+103664|0]|0)){a_=a_+1|0}else{break L18423}}if((a_|0)==1){z=13606;break L18421}}}while(0);aW=is(f)|0;aR=c[aW>>2]|0;if((aR|0)==1){a$=+(c[aW+8>>2]|0)}else if((aR|0)==2){a$=+h[aW+8>>3]}else if((aR|0)==3){a$=+uz(c[aW+8>>2]|0,0)}else{z=13603;break L18136}if((c[y>>2]|0)==3){uu(c[x>>2]|0);c[y>>2]=1}h[5710]=a$;if(a$>0.0){$=aD;break L18232}}else{z=13606}}while(0);if((z|0)==13606){z=0;h[5710]=-1.0}h[5710]=1.0;$=aD;break L18232}}while(0);if(V|X^1){aZ=aL;break}U=c[10036]|0;Q=0;while(1){if((Q|0)>=(aM|0)){break}if((a[U+(aN+Q|0)|0]|0)==(a[Q+124352|0]|0)){Q=Q+1|0}else{aZ=aL;break L18413}}if((Q|0)!=4){aZ=aL;break}U=aL+1|0;c[13898]=U;aZ=U}}while(0);if((aZ|0)>=(_|0)){S=aD;T=aZ;break L18134}L18450:do{if((a[aF+(aZ*40&-1)|0]&1)!=0){X=c[aF+(aZ*40&-1)+36>>2]|0;V=aF+(aZ*40&-1)+32|0;U=c[10036]|0;O=0;while(1){if((O|0)>=(X|0)){break}if((a[U+((c[V>>2]|0)+O|0)|0]|0)==(a[O+103664|0]|0)){O=O+1|0}else{break L18450}}if((O|0)==1){S=aD;T=aZ;break L18134}}}while(0);a[14176]=1;is(l);a[14176]=0;if((c[r>>2]|0)!=3){z=13622;break L18136}_=c[p>>2]|0;if((_|0)==0){z=13624;break L18136}V=bh(_|0,44)|0;do{if((V|0)!=0){if((ca(V+1|0,170912,(v=i,i=i+8|0,c[v>>2]=45944,v)|0)|0)!=1){break}a[V]=0}}while(0);if((a[_]|0)!=0){uF(45952,_|0,255)}uu(_);if((a[(c[1054]|0)+((c[13898]|0)*40&-1)|0]&1)!=0){$=aD;break}V=is(m)|0;U=c[V>>2]|0;if((U|0)==2){a0=+h[V+8>>3]}else if((U|0)==3){a0=+uz(c[V+8>>2]|0,0)}else if((U|0)==1){a0=+(c[V+8>>2]|0)}else{z=13635;break L18136}if((c[q>>2]|0)==3){uu(c[w>>2]|0);c[q>>2]=1}g[11486]=+(~~a0|0);$=aD}}while(0);L=c[13898]|0;N=c[8272]|0;if((L|0)<(N|0)){H=$;I=L;J=N}else{S=$;T=L;break L18134}}if((z|0)==13603){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==13622){c[13898]=aZ;S=aD;T=aZ;break}else if((z|0)==13579){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==13624){S=aD;T=c[13898]|0;break}else if((z|0)==13474){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==13566){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==13506){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((z|0)==13635){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{S=0;T=B}}while(0);L18486:do{if((T|0)<(c[8272]|0)){B=c[1054]|0;L18488:do{if((a[B+(T*40&-1)|0]&1)!=0){z=c[B+(T*40&-1)+36>>2]|0;aD=B+(T*40&-1)+32|0;aZ=c[10036]|0;$=0;while(1){if(($|0)>=(z|0)){break}if((a[aZ+((c[aD>>2]|0)+$|0)|0]|0)==(a[$+103664|0]|0)){$=$+1|0}else{break L18488}}if(($|0)==1){break L18486}}}while(0);B=is(n)|0;aD=c[B>>2]|0;if((aD|0)==1){a1=+(c[B+8>>2]|0)}else if((aD|0)==2){a1=+h[B+8>>3]}else if((aD|0)==3){a1=+uz(c[B+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}B=n|0;if((c[B>>2]|0)==3){uu(c[n+8>>2]|0);c[B>>2]=1}g[11486]=+(~~a1|0)}}while(0);n4(0);n=a[46232]|0?131584:131504;T=a[45616]|0?137776:137232;a1=+g[11486];be(13048,170872,(v=i,i=i+40|0,c[v>>2]=a[45624]|0?116408:116440,c[v+8>>2]=n,c[v+16>>2]=T,c[v+24>>2]=45952,h[v+32>>3]=a1,v)|0);T=c[3524]|0;if((c[T+96>>2]&32|0)!=0){uD(13048+(uA(13048)|0)|0,170856,11)}a1=+h[5710];if(a1!=1.0){n=13048+(uA(13048)|0)|0;be(n|0,170824,(v=i,i=i+8|0,h[v>>3]=a1,v)|0);a2=c[3524]|0}else{a2=T}T=c[a2+8>>2]|0;n=c[a2+12>>2]|0;if(!((T|0)==27002&(n|0)==20252)){a2=13048+(uA(13048)|0)|0;B=~~(+(T>>>0>>>0)/26.37+.5);T=~~(+(n>>>0>>>0)/26.37+.5);be(a2|0,170728,(v=i,i=i+16|0,c[v>>2]=B,c[v+8>>2]=T,v)|0)}a1=+h[5704];if(a1!=1.0){T=13048+(uA(13048)|0)|0;be(T|0,170680,(v=i,i=i+8|0,h[v>>3]=a1,v)|0)}a1=+h[5778];if(a1!=1.0){T=13048+(uA(13048)|0)|0;be(T|0,170640,(v=i,i=i+8|0,h[v>>3]=a1,v)|0)}if((S|0)==0){i=b;return}be(13048+(uA(13048)|0)|0,170616,(v=i,i=i+8|0,c[v>>2]=S,v)|0);i=b;return}function nS(){c[11296]=0;c[11298]=0;c[11412]=0;c[11262]=0;a[45664]=0;return}function nT(){c[11296]=0;c[11298]=0;a[45664]=0;return}function nU(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+8|0;d=b|0;e=d;tN();a[45664]=0;f=d;g=e+3|0;a[g]=0;h=e+2|0;a[h]=0;j=e+1|0;a[j]=0;a[f]=27;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=16;aI(f|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;e=c[11300]|0;a[g]=e>>>24&255;a[h]=e>>>16&255;a[j]=e>>>8&255;a[f]=e&255;aI(f|0,1,4,c[10030]|0);e=(c[(c[3524]|0)+12>>2]|0)-(c[11301]|0)|0;a[g]=e>>>24&255;a[h]=e>>>16&255;a[j]=e>>>8&255;a[f]=e&255;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=37;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=12;aI(f|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[g]=-128;a[h]=0;a[j]=0;a[f]=10;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=40;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=12;aI(f|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[g]=0;a[h]=0;a[j]=0;a[f]=2;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=37;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=12;aI(f|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[g]=-128;a[h]=0;a[j]=0;a[f]=7;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=40;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=12;aI(f|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[g]=0;a[h]=0;a[j]=0;a[f]=1;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=37;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=12;aI(f|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[g]=-128;a[h]=0;a[j]=0;a[f]=0;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=40;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=12;aI(f|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[g]=0;a[h]=0;a[j]=0;a[f]=3;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=14;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=20;aI(f|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;c[d>>2]=0;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=16;aI(f|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[f]=20;aI(f|0,1,4,c[10030]|0);d=bc(c[10030]|0)|0;cp(c[10030]|0,48,0);a[g]=d>>>24&255;a[h]=d>>>16&255;a[j]=d>>>8&255;a[f]=d&255;aI(f|0,1,4,c[10030]|0);d=c[11294]|0;a[g]=d>>>24&255;a[h]=d>>>16&255;a[j]=d>>>8&255;a[f]=d&255;aI(f|0,1,4,c[10030]|0);cp(c[10030]|0,0,0);i=b;return}function nV(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0.0,k=0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;b=i;i=i+64|0;d=b|0;e=b+48|0;f=b+56|0;g=f;h=c[3524]|0;j=+((c[h+8>>2]|0)>>>0>>>0)/26.37;k=~~(j+.5);l=+((c[h+12>>2]|0)>>>0>>>0)/26.37;h=~~(l+.5);m=~~(j*.263671875+.5);n=~~(l*.2604166666666667+.5);c[11294]=0;o=f;p=g+3|0;a[p]=0;q=g+2|0;a[q]=0;r=g+1|0;a[r]=0;a[o]=1;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=100;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);g=~~(+((c[(c[3524]|0)+8>>2]|0)>>>0>>>0)/26.37);a[p]=g>>>24&255;a[q]=g>>>16&255;a[r]=g>>>8&255;a[o]=g&255;aI(o|0,1,4,c[10030]|0);g=~~(+((c[(c[3524]|0)+12>>2]|0)>>>0>>>0)/26.37);a[p]=g>>>24&255;a[q]=g>>>16&255;a[r]=g>>>8&255;a[o]=g&255;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);g=c[(c[3524]|0)+8>>2]|0;a[p]=g>>>24&255;a[q]=g>>>16&255;a[r]=g>>>8&255;a[o]=g&255;aI(o|0,1,4,c[10030]|0);g=c[(c[3524]|0)+12>>2]|0;a[p]=g>>>24&255;a[q]=g>>>16&255;a[r]=g>>>8&255;a[o]=g&255;aI(o|0,1,4,c[10030]|0);a[p]=70;a[q]=77;a[r]=69;a[o]=32;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=1;a[r]=0;a[o]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);g=e|0;s=e+1|0;a[s]=0;a[g]=4;aI(g|0,1,2,c[10030]|0);a[s]=0;a[g]=0;aI(g|0,1,2,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);a[p]=k>>>24&255;a[q]=k>>>16&255;a[r]=k>>>8&255;a[o]=k&255;aI(o|0,1,4,c[10030]|0);a[p]=h>>>24&255;a[q]=h>>>16&255;a[r]=h>>>8&255;a[o]=h&255;aI(o|0,1,4,c[10030]|0);a[p]=m>>>24&255;a[q]=m>>>16&255;a[r]=m>>>8&255;a[o]=m&255;aI(o|0,1,4,c[10030]|0);a[p]=n>>>24&255;a[q]=n>>>16&255;a[r]=n>>>8&255;a[o]=n&255;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);a[45664]=1;a[p]=0;a[q]=0;a[r]=0;a[o]=17;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=12;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[p]=0;a[q]=0;a[r]=0;a[o]=8;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=9;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=16;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;n=c[(c[3524]|0)+8>>2]|0;a[p]=n>>>24&255;a[q]=n>>>16&255;a[r]=n>>>8&255;a[o]=n&255;aI(o|0,1,4,c[10030]|0);n=c[(c[3524]|0)+12>>2]|0;a[p]=n>>>24&255;a[q]=n>>>16&255;a[r]=n>>>8&255;a[o]=n&255;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=11;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=16;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;n=~~(+((c[(c[3524]|0)+8>>2]|0)>>>0>>>0)/26.37);a[p]=n>>>24&255;a[q]=n>>>16&255;a[r]=n>>>8&255;a[o]=n&255;aI(o|0,1,4,c[10030]|0);n=~~(+((c[(c[3524]|0)+12>>2]|0)>>>0>>>0)/26.37);a[p]=n>>>24&255;a[q]=n>>>16&255;a[r]=n>>>8&255;a[o]=n&255;aI(o|0,1,4,c[10030]|0);if((c[11564]|0)!=16777215){n=c[3524]|0;m=c[n+8>>2]|0;h=c[n+12>>2]|0;c[d>>2]=0;c[d+4>>2]=0;c[d+12>>2]=m;c[d+16>>2]=0;c[d+24>>2]=m;c[d+28>>2]=h;c[d+36>>2]=0;c[d+40>>2]=h;c[d+8>>2]=0;n9(4,d|0)}a[p]=0;a[q]=0;a[r]=0;a[o]=38;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=28;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[p]=0;a[q]=0;a[r]=0;a[o]=1;aI(o|0,1,4,c[10030]|0);d=a[45616]|0;a[p]=0;a[q]=0;a[r]=d?0:34;a[o]=0;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=1;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=37;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=12;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[p]=0;a[q]=0;a[r]=0;a[o]=1;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=18;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=12;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[p]=0;a[q]=0;a[r]=0;a[o]=1;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=39;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=24;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[p]=0;a[q]=0;a[r]=0;a[o]=3;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=1;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=37;aI(o|0,1,4,c[10030]|0);a[p]=0;a[q]=0;a[r]=0;a[o]=12;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[p]=0;a[q]=0;a[r]=0;a[o]=3;aI(o|0,1,4,c[10030]|0);n4(0);c[11280]=-5;c[11562]=-5;i=b;return}function nW(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;e=c[3524]|0;if((c[e+8>>2]|0)>>>0>a>>>0){if((c[e+12>>2]|0)>>>0>b>>>0){f=b;g=a}else{h=13676}}else{h=13676}if((h|0)==13676){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);h=c[3524]|0;e=c[h+8>>2]|0;j=c[h+12>>2]|0;f=j>>>0>b>>>0?b:j;g=e>>>0>a>>>0?a:e}if((g|0)==(c[11298]|0)&(f|0)==(c[11296]|0)){i=d;return}tN();c[11298]=g;c[11296]=f;i=d;return}function nX(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=c[3524]|0;if((c[e+8>>2]|0)>>>0>a>>>0){if((c[e+12>>2]|0)>>>0<=b>>>0){f=13684}}else{f=13684}if((f|0)==13684){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0)}if((c[11298]|0)==(a|0)&(c[11296]|0)==(b|0)){i=d;return}f=c[11560]|0;if((f<<1|0)>102){tN();g=c[11560]|0}else{g=f}if((g|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;h=1}else{h=g}g=h<<1;c[45200+(g<<2)>>2]=a;c[11298]=a;c[45200+((g|1)<<2)>>2]=b;c[11296]=b;c[11560]=h+1;i=d;return}function nY(b){b=b|0;var d=0,e=0,f=0;tN();d=(b|0)==-3?-4:b;c[11412]=d;if((d|0)==-4){e=46256}else{if((d|0)<0|a[45624]){f=7}else{f=(d|0)%15&-1}e=238816+(f<<2)|0}c[11562]=c[e>>2];tN();tL(d);return}function nZ(a){a=a|0;do{if((a|0)==0){if((c[11262]|0)==0){break}c[11262]=0;tO()}else if((a|0)==(-270|0)){if((c[11262]|0)==900){break}c[11262]=900;tO()}else{c[11262]=a*10&-1;tO()}}while(0);return 1}function n_(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+8|0;e=d|0;c[11414]=b;if((b|0)==2){f=10}else if((b|0)==1){f=14}else{f=8}b=e|0;g=e+3|0;a[g]=0;h=e+2|0;a[h]=0;j=e+1|0;a[j]=0;a[b]=22;aI(b|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[b]=12;aI(b|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[g]=0;a[h]=0;a[j]=0;a[b]=f;aI(b|0,1,4,c[10030]|0);i=d;return 1}function n$(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0.0,z=0,A=0,B=0;f=i;i=i+8|0;g=f|0;h=g;j=i;i=i+4|0;i=i+7>>3<<3;k=i;i=i+4|0;i=i+7>>3<<3;l=i;i=i+4|0;i=i+7>>3<<3;m=i;i=i+4|0;i=i+7>>3<<3;n=uA(e|0)|0;do{if(((c[11252]|0)-14|0)>>>0<2){c[l>>2]=e;o=uA(e|0)|0;c[k>>2]=o;p=(o<<1)+2|0;c[j>>2]=p;q=ut(p)|0;do{if((q|0)==0){gk();r=ut(p)|0;if((r|0)!=0){s=r;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=171392,v)|0)}else{s=q}}while(0);c[m>>2]=s;q=bi(171336,((c[11252]|0)==15?171384:171360)|0)|0;if((q|0)==-1){uh(-1,171312,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);t=s;u=o;w=n;break}if((aG(q|0,l|0,k|0,m|0,j|0)|0)==-1){uh(-1,171280,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}cz(q|0);q=p-(c[j>>2]|0)|0;t=s;u=(q|0)/2&-1;w=q}else{t=0;u=n;w=n}}while(0);if((w|0)<1){i=f;return}tN();if((c[11280]|0)!=(c[11562]|0)){n=g;s=h+3|0;a[s]=0;j=h+2|0;a[j]=0;m=h+1|0;a[m]=0;a[n]=24;k=c[10030]|0;aI(n|0,1,4,k|0);a[s]=0;a[j]=0;a[m]=0;a[n]=12;k=c[10030]|0;aI(n|0,1,4,k|0);c[11294]=(c[11294]|0)+1;k=c[11562]|0;a[s]=k>>>24&255;a[j]=k>>>16&255;a[m]=k>>>8&255;a[n]=k&255;k=c[10030]|0;aI(n|0,1,4,k|0);c[11280]=c[11562]}k=(w|0)%4&-1;if((k|0)==0){x=w}else{x=(w+4|0)-k|0}k=((c[11252]|0)-14|0)>>>0<2;n=g;m=h+3|0;a[m]=0;j=h+2|0;a[j]=0;s=h+1|0;a[s]=0;if(k){a[n]=84;k=c[10030]|0;aI(n|0,1,4,k|0);k=((u<<2)+76|0)+x|0;a[m]=k>>>24&255;a[j]=k>>>16&255;a[s]=k>>>8&255;a[n]=k&255;k=c[10030]|0;aI(n|0,1,4,k|0)}else{a[n]=83;k=c[10030]|0;aI(n|0,1,4,k|0);k=((u<<2)+76|0)+x|0;a[m]=k>>>24&255;a[j]=k>>>16&255;a[s]=k>>>8&255;a[n]=k&255;k=c[10030]|0;aI(n|0,1,4,k|0)}c[11294]=(c[11294]|0)+1;c[g>>2]=0;aI(n|0,1,4,c[10030]|0);c[g>>2]=0;aI(n|0,1,4,c[10030]|0);c[g>>2]=0;aI(n|0,1,4,c[10030]|0);c[g>>2]=0;aI(n|0,1,4,c[10030]|0);a[m]=0;a[j]=0;a[s]=0;a[n]=1;aI(n|0,1,4,c[10030]|0);a[m]=65;a[j]=-46;a[s]=-11;a[n]=-61;aI(n|0,1,4,c[10030]|0);a[m]=65;a[j]=-46;a[s]=-11;a[n]=-61;aI(n|0,1,4,c[10030]|0);y=+((c[(c[3524]|0)+16>>2]|0)>>>1>>>0>>>0);k=~~(y*+T(+(+(c[11262]|0)*.0017453292519944445)))+b|0;a[m]=k>>>24&255;a[j]=k>>>16&255;a[s]=k>>>8&255;a[n]=k&255;aI(n|0,1,4,c[10030]|0);k=c[3524]|0;b=(c[k+12>>2]|0)-d|0;y=+((c[k+16>>2]|0)>>>1>>>0>>>0);k=~~(y*+S(+(+(c[11262]|0)*.0017453292519944445)))+b|0;a[m]=k>>>24&255;a[j]=k>>>16&255;a[s]=k>>>8&255;a[n]=k&255;aI(n|0,1,4,c[10030]|0);a[m]=u>>>24&255;a[j]=u>>>16&255;a[s]=u>>>8&255;a[n]=u&255;aI(n|0,1,4,c[10030]|0);a[m]=0;a[j]=0;a[s]=0;a[n]=76;aI(n|0,1,4,c[10030]|0);c[g>>2]=0;aI(n|0,1,4,c[10030]|0);c[g>>2]=0;aI(n|0,1,4,c[10030]|0);c[g>>2]=0;aI(n|0,1,4,c[10030]|0);c[g>>2]=0;aI(n|0,1,4,c[10030]|0);c[g>>2]=0;aI(n|0,1,4,c[10030]|0);c[g>>2]=0;aI(n|0,1,4,c[10030]|0);g=(x|0)>0;do{if(((c[11252]|0)-14|0)>>>0<2){if(g){k=0;do{if((k|0)<(w|0)){z=a[t+k|0]|0}else{z=0}aF(z|0,c[10030]|0);k=k+1|0;}while((k|0)<(x|0))}uu(t)}else{if(g){A=0}else{break}do{if((A|0)<(w|0)){B=a[e+A|0]|0}else{B=0}aF(B|0,c[10030]|0);A=A+1|0;}while((A|0)<(x|0))}}while(0);if((u|0)>0){x=0;do{a[m]=0;a[j]=0;a[s]=1;a[n]=44;aI(n|0,1,4,c[10030]|0);x=x+1|0;}while((x|0)<(u|0))}c[11296]=-2e3;c[11298]=-2e3;i=f;return}function n0(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0,bz=0,bA=0,bB=0,bC=0,bD=0,bE=0,bF=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bL=0,bM=0,bN=0,bO=0,bP=0,bQ=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0;f=i;i=i+8|0;g=f|0;h=g;j=i;i=i+144|0;k=j|0;c[j+8>>2]=1601;tN();l=c[11554]|0;c[11554]=0;c[11552]=(c[11552]|0)+1;if((e-69|0)>>>0<5){m=c[11562]|0;c[11562]=c[11564];if((e|0)==71){n0(b,d,8);c[11562]=m;n0(b,d,7);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((e|0)==73){n0(b,d,12);c[11562]=m;n0(b,d,11);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((e|0)==69){n0(b,d,4);c[11562]=m;n0(b,d,3);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((e|0)==70){n0(b,d,6);c[11562]=m;n0(b,d,5);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((e|0)==72){n0(b,d,10);c[11562]=m;n0(b,d,9);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else{c[11562]=m;c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}}m=c[3524]|0;if((c[m+8>>2]|0)>>>0>b>>>0){if((c[m+12>>2]|0)>>>0>d>>>0){p=d;q=b;r=m}else{s=13753}}else{s=13753}if((s|0)==13753){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);m=c[3524]|0;t=c[m+8>>2]|0;u=c[m+12>>2]|0;p=u>>>0>d>>>0?d:u;q=t>>>0>b>>>0?b:t;r=m}if((q|0)==(c[11298]|0)&(p|0)==(c[11296]|0)){w=r}else{tN();c[11298]=q;c[11296]=p;w=c[3524]|0}r=b+1|0;if((c[w+8>>2]|0)>>>0>r>>>0){if((c[w+12>>2]|0)>>>0>d>>>0){x=q;y=p}else{s=13758}}else{s=13758}if((s|0)==13758){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=r,c[v+8>>2]=d,v)|0);x=c[11298]|0;y=c[11296]|0}if(!((x|0)==(r|0)&(y|0)==(d|0))){y=c[11560]|0;if((y<<1|0)>102){tN();z=c[11560]|0}else{z=y}if((z|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;A=1}else{A=z}z=A<<1;c[45200+(z<<2)>>2]=r;c[11298]=r;c[45200+((z|1)<<2)>>2]=d;c[11296]=d;c[11560]=A+1}A=(e|0)%13&-1;if((A|0)==10){c[j>>2]=b;c[j+4>>2]=d-(c[11274]|0);e=c[11276]|0;c[j+12>>2]=b-e;z=(c[11270]|0)+d|0;c[j+16>>2]=z;c[j+24>>2]=e+b;c[j+28>>2]=z;n9(3,k);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==11){z=b-(c[11278]|0)|0;e=c[3524]|0;if((c[e+8>>2]|0)>>>0>z>>>0){if((c[e+12>>2]|0)>>>0>d>>>0){B=d;C=z;D=r;E=d;F=e}else{s=13949}}else{s=13949}if((s|0)==13949){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=z,c[v+8>>2]=d,v)|0);e=c[3524]|0;y=c[e+8>>2]|0;x=c[e+12>>2]|0;B=x>>>0>d>>>0?d:x;C=y>>>0>z>>>0?z:y;D=c[11298]|0;E=c[11296]|0;F=e}if((C|0)==(D|0)&(B|0)==(E|0)){G=F;H=D;I=E}else{tN();c[11298]=C;c[11296]=B;G=c[3524]|0;H=C;I=B}B=d-(c[11278]|0)|0;if((c[G+8>>2]|0)>>>0>b>>>0){if((c[G+12>>2]|0)>>>0>B>>>0){J=H;K=I}else{s=13954}}else{s=13954}if((s|0)==13954){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=B,v)|0);J=c[11298]|0;K=c[11296]|0}if(!((J|0)==(b|0)&(K|0)==(B|0))){K=c[11560]|0;if((K<<1|0)>102){tN();L=c[11560]|0}else{L=K}if((L|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;M=1}else{M=L}L=M<<1;c[45200+(L<<2)>>2]=b;c[11298]=b;c[45200+((L|1)<<2)>>2]=B;c[11296]=B;c[11560]=M+1}M=(c[11278]|0)+b|0;L=c[3524]|0;if((c[L+8>>2]|0)>>>0>M>>>0){if((c[L+12>>2]|0)>>>0>d>>>0){N=b;O=B}else{s=13963}}else{s=13963}if((s|0)==13963){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=M,c[v+8>>2]=d,v)|0);N=c[11298]|0;O=c[11296]|0}if(!((N|0)==(M|0)&(O|0)==(d|0))){O=c[11560]|0;if((O<<1|0)>102){tN();P=c[11560]|0}else{P=O}if((P|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;Q=1}else{Q=P}P=Q<<1;c[45200+(P<<2)>>2]=M;c[11298]=M;c[45200+((P|1)<<2)>>2]=d;c[11296]=d;c[11560]=Q+1}Q=(c[11278]|0)+d|0;P=c[3524]|0;if((c[P+8>>2]|0)>>>0>b>>>0){if((c[P+12>>2]|0)>>>0>Q>>>0){R=M;S=d}else{s=13972}}else{s=13972}if((s|0)==13972){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=Q,v)|0);R=c[11298]|0;S=c[11296]|0}if(!((R|0)==(b|0)&(S|0)==(Q|0))){S=c[11560]|0;if((S<<1|0)>102){tN();T=c[11560]|0}else{T=S}if((T|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;U=1}else{U=T}T=U<<1;c[45200+(T<<2)>>2]=b;c[11298]=b;c[45200+((T|1)<<2)>>2]=Q;c[11296]=Q;c[11560]=U+1}tP();c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==12){U=c[11278]|0;c[j>>2]=b-U;c[j+4>>2]=d;c[j+12>>2]=b;c[j+16>>2]=d-U;c[j+24>>2]=U+b;c[j+28>>2]=d;c[j+36>>2]=b;c[j+40>>2]=U+d;n9(4,k);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==4){U=c[11268]|0;Q=b-U|0;c[j>>2]=Q;T=d-U|0;c[j+4>>2]=T;S=U+b|0;c[j+12>>2]=S;c[j+16>>2]=T;c[j+24>>2]=S;S=U+d|0;c[j+28>>2]=S;c[j+36>>2]=Q;c[j+40>>2]=S;n9(4,k);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==5){S=(c[(c[3524]|0)+12>>2]|0)-d|0;Q=g;U=h+3|0;a[U]=0;T=h+2|0;a[T]=0;R=h+1|0;a[R]=0;a[Q]=37;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=12;aI(Q|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[U]=-128;a[T]=0;a[R]=0;a[Q]=7;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=37;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=12;aI(Q|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[U]=-128;a[T]=0;a[R]=0;a[Q]=0;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=40;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=12;aI(Q|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[U]=0;a[T]=0;a[R]=0;a[Q]=3;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=39;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=24;aI(Q|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[U]=0;a[T]=0;a[R]=0;a[Q]=3;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=1;aI(Q|0,1,4,c[10030]|0);c[g>>2]=0;aI(Q|0,1,4,c[10030]|0);c[g>>2]=0;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=37;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=12;aI(Q|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[U]=0;a[T]=0;a[R]=0;a[Q]=3;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=40;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=12;aI(Q|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[U]=0;a[T]=0;a[R]=0;a[Q]=1;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=38;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=28;aI(Q|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[U]=0;a[T]=0;a[R]=0;a[Q]=1;aI(Q|0,1,4,c[10030]|0);M=a[45616]|0;a[U]=0;a[T]=0;a[R]=M?0:34;a[Q]=0;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=1;aI(Q|0,1,4,c[10030]|0);c[g>>2]=0;aI(Q|0,1,4,c[10030]|0);M=c[11562]|0;a[U]=M>>>24&255;a[T]=M>>>16&255;a[R]=M>>>8&255;a[Q]=M&255;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=37;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=12;aI(Q|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[U]=0;a[T]=0;a[R]=0;a[Q]=1;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=42;aI(Q|0,1,4,c[10030]|0);a[U]=0;a[T]=0;a[R]=0;a[Q]=24;aI(Q|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;M=b-(c[11278]|0)|0;a[U]=M>>>24&255;a[T]=M>>>16&255;a[R]=M>>>8&255;a[Q]=M&255;aI(Q|0,1,4,c[10030]|0);M=S-(c[11278]|0)|0;a[U]=M>>>24&255;a[T]=M>>>16&255;a[R]=M>>>8&255;a[Q]=M&255;aI(Q|0,1,4,c[10030]|0);M=(c[11278]|0)+b|0;a[U]=M>>>24&255;a[T]=M>>>16&255;a[R]=M>>>8&255;a[Q]=M&255;aI(Q|0,1,4,c[10030]|0);M=(c[11278]|0)+S|0;a[U]=M>>>24&255;a[T]=M>>>16&255;a[R]=M>>>8&255;a[Q]=M&255;aI(Q|0,1,4,c[10030]|0);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==6){Q=(c[(c[3524]|0)+12>>2]|0)-d|0;M=g;R=h+3|0;a[R]=0;T=h+2|0;a[T]=0;U=h+1|0;a[U]=0;a[M]=37;aI(M|0,1,4,c[10030]|0);a[R]=0;a[T]=0;a[U]=0;a[M]=12;aI(M|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[R]=-128;a[T]=0;a[U]=0;a[M]=0;aI(M|0,1,4,c[10030]|0);a[R]=0;a[T]=0;a[U]=0;a[M]=40;aI(M|0,1,4,c[10030]|0);a[R]=0;a[T]=0;a[U]=0;a[M]=12;aI(M|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[R]=0;a[T]=0;a[U]=0;a[M]=3;aI(M|0,1,4,c[10030]|0);a[R]=0;a[T]=0;a[U]=0;a[M]=39;aI(M|0,1,4,c[10030]|0);a[R]=0;a[T]=0;a[U]=0;a[M]=24;aI(M|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[R]=0;a[T]=0;a[U]=0;a[M]=3;aI(M|0,1,4,c[10030]|0);c[g>>2]=0;aI(M|0,1,4,c[10030]|0);h=c[11562]|0;a[R]=h>>>24&255;a[T]=h>>>16&255;a[U]=h>>>8&255;a[M]=h&255;aI(M|0,1,4,c[10030]|0);c[g>>2]=0;aI(M|0,1,4,c[10030]|0);a[R]=0;a[T]=0;a[U]=0;a[M]=37;aI(M|0,1,4,c[10030]|0);a[R]=0;a[T]=0;a[U]=0;a[M]=12;aI(M|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[R]=0;a[T]=0;a[U]=0;a[M]=3;aI(M|0,1,4,c[10030]|0);a[R]=0;a[T]=0;a[U]=0;a[M]=42;aI(M|0,1,4,c[10030]|0);a[R]=0;a[T]=0;a[U]=0;a[M]=24;aI(M|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;g=b-(c[11278]|0)|0;a[R]=g>>>24&255;a[T]=g>>>16&255;a[U]=g>>>8&255;a[M]=g&255;aI(M|0,1,4,c[10030]|0);g=Q-(c[11278]|0)|0;a[R]=g>>>24&255;a[T]=g>>>16&255;a[U]=g>>>8&255;a[M]=g&255;aI(M|0,1,4,c[10030]|0);g=(c[11278]|0)+b|0;a[R]=g>>>24&255;a[T]=g>>>16&255;a[U]=g>>>8&255;a[M]=g&255;aI(M|0,1,4,c[10030]|0);g=(c[11278]|0)+Q|0;a[R]=g>>>24&255;a[T]=g>>>16&255;a[U]=g>>>8&255;a[M]=g&255;aI(M|0,1,4,c[10030]|0);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==7){M=(c[11274]|0)+d|0;g=c[3524]|0;if((c[g+8>>2]|0)>>>0>b>>>0){if((c[g+12>>2]|0)>>>0>M>>>0){V=b;W=M;s=13902}else{s=13901}}else{s=13901}if((s|0)==13901){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=M,v)|0);g=c[3524]|0;U=c[g+8>>2]|0;T=U>>>0>b>>>0?b:U;U=c[g+12>>2]|0;R=U>>>0>M>>>0?M:U;U=c[11298]|0;M=c[11296]|0;if((T|0)==(U|0)&(R|0)==(M|0)){X=g;Y=U;Z=M}else{V=T;W=R;s=13902}}if((s|0)==13902){tN();c[11298]=V;c[11296]=W;X=c[3524]|0;Y=V;Z=W}W=b-(c[11276]|0)|0;V=d-(c[11270]|0)|0;if((c[X+8>>2]|0)>>>0>W>>>0){if((c[X+12>>2]|0)>>>0>V>>>0){_=Y;$=Z}else{s=13905}}else{s=13905}if((s|0)==13905){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=W,c[v+8>>2]=V,v)|0);_=c[11298]|0;$=c[11296]|0}if(!((_|0)==(W|0)&($|0)==(V|0))){$=c[11560]|0;if(($<<1|0)>102){tN();aa=c[11560]|0}else{aa=$}if((aa|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;ab=1}else{ab=aa}aa=ab<<1;c[45200+(aa<<2)>>2]=W;c[11298]=W;c[45200+((aa|1)<<2)>>2]=V;c[11296]=V;c[11560]=ab+1}ab=(c[11276]|0)+b|0;aa=d-(c[11270]|0)|0;$=c[3524]|0;if((c[$+8>>2]|0)>>>0>ab>>>0){if((c[$+12>>2]|0)>>>0>aa>>>0){ac=W;ad=V}else{s=13914}}else{s=13914}if((s|0)==13914){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=ab,c[v+8>>2]=aa,v)|0);ac=c[11298]|0;ad=c[11296]|0}if(!((ac|0)==(ab|0)&(ad|0)==(aa|0))){ad=c[11560]|0;if((ad<<1|0)>102){tN();ae=c[11560]|0}else{ae=ad}if((ae|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;af=1}else{af=ae}ae=af<<1;c[45200+(ae<<2)>>2]=ab;c[11298]=ab;c[45200+((ae|1)<<2)>>2]=aa;c[11296]=aa;c[11560]=af+1}tP();c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==1){af=c[11268]|0;aa=b-af|0;ae=d-af|0;af=c[3524]|0;if((c[af+8>>2]|0)>>>0>aa>>>0){if((c[af+12>>2]|0)>>>0>ae>>>0){ag=ae;ah=aa;ai=r;aj=d;ak=af}else{s=13796}}else{s=13796}if((s|0)==13796){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=aa,c[v+8>>2]=ae,v)|0);af=c[3524]|0;ab=c[af+8>>2]|0;ad=c[af+12>>2]|0;ag=ad>>>0>ae>>>0?ae:ad;ah=ab>>>0>aa>>>0?aa:ab;ai=c[11298]|0;aj=c[11296]|0;ak=af}if((ah|0)==(ai|0)&(ag|0)==(aj|0)){al=ak;am=ai;an=aj}else{tN();c[11298]=ah;c[11296]=ag;al=c[3524]|0;am=ah;an=ag}ag=c[11268]|0;ah=ag+b|0;aj=ag+d|0;if((c[al+8>>2]|0)>>>0>ah>>>0){if((c[al+12>>2]|0)>>>0>aj>>>0){ao=am;ap=an}else{s=13801}}else{s=13801}if((s|0)==13801){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=ah,c[v+8>>2]=aj,v)|0);ao=c[11298]|0;ap=c[11296]|0}if(!((ao|0)==(ah|0)&(ap|0)==(aj|0))){ap=c[11560]|0;if((ap<<1|0)>102){tN();aq=c[11560]|0}else{aq=ap}if((aq|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;ar=1}else{ar=aq}aq=ar<<1;c[45200+(aq<<2)>>2]=ah;c[11298]=ah;c[45200+((aq|1)<<2)>>2]=aj;c[11296]=aj;c[11560]=ar+1}ar=c[11268]|0;aq=b-ar|0;ap=ar+d|0;ar=c[3524]|0;if((c[ar+8>>2]|0)>>>0>aq>>>0){if((c[ar+12>>2]|0)>>>0>ap>>>0){as=ap;at=aq;au=ah;av=aj;aw=ar}else{s=13810}}else{s=13810}if((s|0)==13810){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=aq,c[v+8>>2]=ap,v)|0);ar=c[3524]|0;aj=c[ar+8>>2]|0;ah=c[ar+12>>2]|0;as=ah>>>0>ap>>>0?ap:ah;at=aj>>>0>aq>>>0?aq:aj;au=c[11298]|0;av=c[11296]|0;aw=ar}if((at|0)==(au|0)&(as|0)==(av|0)){ax=aw;ay=au;az=av}else{tN();c[11298]=at;c[11296]=as;ax=c[3524]|0;ay=at;az=as}as=c[11268]|0;at=as+b|0;av=d-as|0;if((c[ax+8>>2]|0)>>>0>at>>>0){if((c[ax+12>>2]|0)>>>0>av>>>0){aA=ay;aB=az}else{s=13815}}else{s=13815}if((s|0)==13815){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=at,c[v+8>>2]=av,v)|0);aA=c[11298]|0;aB=c[11296]|0}if((aA|0)==(at|0)&(aB|0)==(av|0)){c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}aB=c[11560]|0;if((aB<<1|0)>102){tN();aC=c[11560]|0}else{aC=aB}if((aC|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;aD=1}else{aD=aC}aC=aD<<1;c[45200+(aC<<2)>>2]=at;c[11298]=at;c[45200+((aC|1)<<2)>>2]=av;c[11296]=av;c[11560]=aD+1;c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==8){c[j>>2]=b;c[j+4>>2]=(c[11274]|0)+d;aD=c[11276]|0;c[j+12>>2]=b-aD;av=d-(c[11270]|0)|0;c[j+16>>2]=av;c[j+24>>2]=aD+b;c[j+28>>2]=av;n9(3,k);c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==9){k=d-(c[11274]|0)|0;av=c[3524]|0;if((c[av+8>>2]|0)>>>0>b>>>0){if((c[av+12>>2]|0)>>>0>k>>>0){aE=b;aF=k;s=13926}else{s=13925}}else{s=13925}if((s|0)==13925){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=k,v)|0);av=c[3524]|0;j=c[av+8>>2]|0;aD=j>>>0>b>>>0?b:j;j=c[av+12>>2]|0;aC=j>>>0>k>>>0?k:j;j=c[11298]|0;k=c[11296]|0;if((aD|0)==(j|0)&(aC|0)==(k|0)){aG=av;aH=j;aJ=k}else{aE=aD;aF=aC;s=13926}}if((s|0)==13926){tN();c[11298]=aE;c[11296]=aF;aG=c[3524]|0;aH=aE;aJ=aF}aF=b-(c[11276]|0)|0;aE=(c[11270]|0)+d|0;if((c[aG+8>>2]|0)>>>0>aF>>>0){if((c[aG+12>>2]|0)>>>0>aE>>>0){aK=aH;aL=aJ}else{s=13929}}else{s=13929}if((s|0)==13929){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=aF,c[v+8>>2]=aE,v)|0);aK=c[11298]|0;aL=c[11296]|0}if(!((aK|0)==(aF|0)&(aL|0)==(aE|0))){aL=c[11560]|0;if((aL<<1|0)>102){tN();aM=c[11560]|0}else{aM=aL}if((aM|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;aN=1}else{aN=aM}aM=aN<<1;c[45200+(aM<<2)>>2]=aF;c[11298]=aF;c[45200+((aM|1)<<2)>>2]=aE;c[11296]=aE;c[11560]=aN+1}aN=(c[11276]|0)+b|0;aM=(c[11270]|0)+d|0;aL=c[3524]|0;if((c[aL+8>>2]|0)>>>0>aN>>>0){if((c[aL+12>>2]|0)>>>0>aM>>>0){aO=aF;aP=aE}else{s=13938}}else{s=13938}if((s|0)==13938){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=aN,c[v+8>>2]=aM,v)|0);aO=c[11298]|0;aP=c[11296]|0}if(!((aO|0)==(aN|0)&(aP|0)==(aM|0))){aP=c[11560]|0;if((aP<<1|0)>102){tN();aQ=c[11560]|0}else{aQ=aP}if((aQ|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;aR=1}else{aR=aQ}aQ=aR<<1;c[45200+(aQ<<2)>>2]=aN;c[11298]=aN;c[45200+((aQ|1)<<2)>>2]=aM;c[11296]=aM;c[11560]=aR+1}tP();c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==2){aR=d-(c[11278]|0)|0;aM=c[3524]|0;if((c[aM+8>>2]|0)>>>0>b>>>0){if((c[aM+12>>2]|0)>>>0>aR>>>0){aS=b;aT=aR;s=13825}else{s=13824}}else{s=13824}if((s|0)==13824){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=aR,v)|0);aM=c[3524]|0;aQ=c[aM+8>>2]|0;aN=aQ>>>0>b>>>0?b:aQ;aQ=c[aM+12>>2]|0;aP=aQ>>>0>aR>>>0?aR:aQ;aQ=c[11298]|0;aR=c[11296]|0;if((aN|0)==(aQ|0)&(aP|0)==(aR|0)){aU=aM;aV=aQ;aW=aR}else{aS=aN;aT=aP;s=13825}}if((s|0)==13825){tN();c[11298]=aS;c[11296]=aT;aU=c[3524]|0;aV=aS;aW=aT}aT=(c[11278]|0)+d|0;if((c[aU+8>>2]|0)>>>0>b>>>0){if((c[aU+12>>2]|0)>>>0>aT>>>0){aX=aV;aY=aW}else{s=13828}}else{s=13828}if((s|0)==13828){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=aT,v)|0);aX=c[11298]|0;aY=c[11296]|0}if(!((aX|0)==(b|0)&(aY|0)==(aT|0))){aY=c[11560]|0;if((aY<<1|0)>102){tN();aZ=c[11560]|0}else{aZ=aY}if((aZ|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;a_=1}else{a_=aZ}aZ=a_<<1;c[45200+(aZ<<2)>>2]=b;c[11298]=b;c[45200+((aZ|1)<<2)>>2]=aT;c[11296]=aT;c[11560]=a_+1}a_=(c[11266]|0)+b|0;aZ=d-(c[11272]|0)|0;aY=c[3524]|0;if((c[aY+8>>2]|0)>>>0>a_>>>0){if((c[aY+12>>2]|0)>>>0>aZ>>>0){a$=aZ;a0=a_;a1=b;a2=aT;a3=aY}else{s=13837}}else{s=13837}if((s|0)==13837){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=a_,c[v+8>>2]=aZ,v)|0);aY=c[3524]|0;aT=c[aY+8>>2]|0;aX=c[aY+12>>2]|0;a$=aX>>>0>aZ>>>0?aZ:aX;a0=aT>>>0>a_>>>0?a_:aT;a1=c[11298]|0;a2=c[11296]|0;a3=aY}if((a0|0)==(a1|0)&(a$|0)==(a2|0)){a4=a3;a5=a1;a6=a2}else{tN();c[11298]=a0;c[11296]=a$;a4=c[3524]|0;a5=a0;a6=a$}a$=b-(c[11266]|0)|0;a0=(c[11272]|0)+d|0;if((c[a4+8>>2]|0)>>>0>a$>>>0){if((c[a4+12>>2]|0)>>>0>a0>>>0){a7=a5;a8=a6}else{s=13842}}else{s=13842}if((s|0)==13842){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=a$,c[v+8>>2]=a0,v)|0);a7=c[11298]|0;a8=c[11296]|0}if(!((a7|0)==(a$|0)&(a8|0)==(a0|0))){a8=c[11560]|0;if((a8<<1|0)>102){tN();a9=c[11560]|0}else{a9=a8}if((a9|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;ba=1}else{ba=a9}a9=ba<<1;c[45200+(a9<<2)>>2]=a$;c[11298]=a$;c[45200+((a9|1)<<2)>>2]=a0;c[11296]=a0;c[11560]=ba+1}ba=(c[11266]|0)+b|0;a9=(c[11272]|0)+d|0;a8=c[3524]|0;if((c[a8+8>>2]|0)>>>0>ba>>>0){if((c[a8+12>>2]|0)>>>0>a9>>>0){bb=a9;bc=ba;bd=a$;be=a0;bf=a8}else{s=13851}}else{s=13851}if((s|0)==13851){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=ba,c[v+8>>2]=a9,v)|0);a8=c[3524]|0;a0=c[a8+8>>2]|0;a$=c[a8+12>>2]|0;bb=a$>>>0>a9>>>0?a9:a$;bc=a0>>>0>ba>>>0?ba:a0;bd=c[11298]|0;be=c[11296]|0;bf=a8}if((bc|0)==(bd|0)&(bb|0)==(be|0)){bg=bf;bh=bd;bi=be}else{tN();c[11298]=bc;c[11296]=bb;bg=c[3524]|0;bh=bc;bi=bb}bb=b-(c[11266]|0)|0;bc=d-(c[11272]|0)|0;if((c[bg+8>>2]|0)>>>0>bb>>>0){if((c[bg+12>>2]|0)>>>0>bc>>>0){bj=bh;bk=bi}else{s=13856}}else{s=13856}if((s|0)==13856){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=bb,c[v+8>>2]=bc,v)|0);bj=c[11298]|0;bk=c[11296]|0}if((bj|0)==(bb|0)&(bk|0)==(bc|0)){c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}bk=c[11560]|0;if((bk<<1|0)>102){tN();bl=c[11560]|0}else{bl=bk}if((bl|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;bm=1}else{bm=bl}bl=bm<<1;c[45200+(bl<<2)>>2]=bb;c[11298]=bb;c[45200+((bl|1)<<2)>>2]=bc;c[11296]=bc;c[11560]=bm+1;c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==0){bm=b-(c[11278]|0)|0;bc=c[3524]|0;if((c[bc+8>>2]|0)>>>0>bm>>>0){if((c[bc+12>>2]|0)>>>0>d>>>0){bn=d;bo=bm;bp=r;bq=d;br=bc}else{s=13768}}else{s=13768}if((s|0)==13768){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=bm,c[v+8>>2]=d,v)|0);bc=c[3524]|0;bl=c[bc+8>>2]|0;bb=c[bc+12>>2]|0;bn=bb>>>0>d>>>0?d:bb;bo=bl>>>0>bm>>>0?bm:bl;bp=c[11298]|0;bq=c[11296]|0;br=bc}if((bo|0)==(bp|0)&(bn|0)==(bq|0)){bs=br;bt=bp;bu=bq}else{tN();c[11298]=bo;c[11296]=bn;bs=c[3524]|0;bt=bo;bu=bn}bn=(c[11278]|0)+b|0;if((c[bs+8>>2]|0)>>>0>bn>>>0){if((c[bs+12>>2]|0)>>>0>d>>>0){bv=bt;bw=bu}else{s=13773}}else{s=13773}if((s|0)==13773){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=bn,c[v+8>>2]=d,v)|0);bv=c[11298]|0;bw=c[11296]|0}if(!((bv|0)==(bn|0)&(bw|0)==(d|0))){bw=c[11560]|0;if((bw<<1|0)>102){tN();bx=c[11560]|0}else{bx=bw}if((bx|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;by=1}else{by=bx}bx=by<<1;c[45200+(bx<<2)>>2]=bn;c[11298]=bn;c[45200+((bx|1)<<2)>>2]=d;c[11296]=d;c[11560]=by+1}by=d-(c[11278]|0)|0;bx=c[3524]|0;if((c[bx+8>>2]|0)>>>0>b>>>0){if((c[bx+12>>2]|0)>>>0>by>>>0){bz=by;bA=b;bB=bn;bC=d;bD=bx}else{s=13782}}else{s=13782}if((s|0)==13782){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=by,v)|0);bx=c[3524]|0;bn=c[bx+8>>2]|0;bw=c[bx+12>>2]|0;bz=bw>>>0>by>>>0?by:bw;bA=bn>>>0>b>>>0?b:bn;bB=c[11298]|0;bC=c[11296]|0;bD=bx}if((bA|0)==(bB|0)&(bz|0)==(bC|0)){bE=bD;bF=bB;bG=bC}else{tN();c[11298]=bA;c[11296]=bz;bE=c[3524]|0;bF=bA;bG=bz}bz=(c[11278]|0)+d|0;if((c[bE+8>>2]|0)>>>0>b>>>0){if((c[bE+12>>2]|0)>>>0>bz>>>0){bH=bF;bI=bG}else{s=13787}}else{s=13787}if((s|0)==13787){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=bz,v)|0);bH=c[11298]|0;bI=c[11296]|0}if((bH|0)==(b|0)&(bI|0)==(bz|0)){c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}bI=c[11560]|0;if((bI<<1|0)>102){tN();bJ=c[11560]|0}else{bJ=bI}if((bJ|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;bK=1}else{bK=bJ}bJ=bK<<1;c[45200+(bJ<<2)>>2]=b;c[11298]=b;c[45200+((bJ|1)<<2)>>2]=bz;c[11296]=bz;c[11560]=bK+1;c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else if((A|0)==3){A=c[11268]|0;bK=b-A|0;bz=d-A|0;A=c[3524]|0;if((c[A+8>>2]|0)>>>0>bK>>>0){if((c[A+12>>2]|0)>>>0>bz>>>0){bL=bz;bM=bK;bN=r;bO=d;bP=A}else{s=13865}}else{s=13865}if((s|0)==13865){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=bK,c[v+8>>2]=bz,v)|0);A=c[3524]|0;r=c[A+8>>2]|0;bJ=c[A+12>>2]|0;bL=bJ>>>0>bz>>>0?bz:bJ;bM=r>>>0>bK>>>0?bK:r;bN=c[11298]|0;bO=c[11296]|0;bP=A}if((bM|0)==(bN|0)&(bL|0)==(bO|0)){bQ=bP;bR=bN;bS=bO}else{tN();c[11298]=bM;c[11296]=bL;bQ=c[3524]|0;bR=bM;bS=bL}bL=c[11268]|0;bM=bL+b|0;bO=d-bL|0;if((c[bQ+8>>2]|0)>>>0>bM>>>0){if((c[bQ+12>>2]|0)>>>0>bO>>>0){bT=bR;bU=bS}else{s=13870}}else{s=13870}if((s|0)==13870){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=bM,c[v+8>>2]=bO,v)|0);bT=c[11298]|0;bU=c[11296]|0}if(!((bT|0)==(bM|0)&(bU|0)==(bO|0))){bU=c[11560]|0;if((bU<<1|0)>102){tN();bV=c[11560]|0}else{bV=bU}if((bV|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;bW=1}else{bW=bV}bV=bW<<1;c[45200+(bV<<2)>>2]=bM;c[11298]=bM;c[45200+((bV|1)<<2)>>2]=bO;c[11296]=bO;c[11560]=bW+1}bW=c[11268]|0;bV=bW+b|0;bU=bW+d|0;bW=c[3524]|0;if((c[bW+8>>2]|0)>>>0>bV>>>0){if((c[bW+12>>2]|0)>>>0>bU>>>0){bX=bM;bY=bO}else{s=13879}}else{s=13879}if((s|0)==13879){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=bV,c[v+8>>2]=bU,v)|0);bX=c[11298]|0;bY=c[11296]|0}if(!((bX|0)==(bV|0)&(bY|0)==(bU|0))){bY=c[11560]|0;if((bY<<1|0)>102){tN();bZ=c[11560]|0}else{bZ=bY}if((bZ|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;b_=1}else{b_=bZ}bZ=b_<<1;c[45200+(bZ<<2)>>2]=bV;c[11298]=bV;c[45200+((bZ|1)<<2)>>2]=bU;c[11296]=bU;c[11560]=b_+1}b_=c[11268]|0;bZ=b-b_|0;b=b_+d|0;d=c[3524]|0;if((c[d+8>>2]|0)>>>0>bZ>>>0){if((c[d+12>>2]|0)>>>0>b>>>0){b$=bV;b0=bU}else{s=13888}}else{s=13888}if((s|0)==13888){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=bZ,c[v+8>>2]=b,v)|0);b$=c[11298]|0;b0=c[11296]|0}if(!((b$|0)==(bZ|0)&(b0|0)==(b|0))){b0=c[11560]|0;if((b0<<1|0)>102){tN();b1=c[11560]|0}else{b1=b0}if((b1|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;b2=1}else{b2=b1}b1=b2<<1;c[45200+(b1<<2)>>2]=bZ;c[11298]=bZ;c[45200+((b1|1)<<2)>>2]=b;c[11296]=b;c[11560]=b2+1}tP();c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}else{c[11554]=l;n=c[11552]|0;o=n+1|0;c[11552]=o;i=f;return}}function n1(a){a=a|0;return 0}function n2(){return}function n3(b,d,e,f,i,j){b=b|0;d=+d;e=+e;f=f|0;i=i|0;j=j|0;if((j|0)==3){c[59568]=c[11298];c[59566]=c[11296];return}else if((j|0)==4){c[11298]=c[59568];c[11296]=c[59566];return}else{if(a[238232]|0){return}a[238232]=1;c[11232]=43856;c[59562]=b;g[59560]=d;g[59564]=+h[5710]*e;a[238216]=i&1;c[59556]=j;return}}function n4(b){b=b|0;var d=0,e=0,f=0,j=0,k=0,l=0.0;d=i;i=i+8|0;e=d|0;L19029:do{if((b|0)!=45688){do{if((b|0)!=0){if((a[b]|0)==0){break}f=bk(b|0,148464)|0;do{if((f|0)>0){j=f+1|0;k=(j|0)<32?j:32;uF(45688,b|0,k|0);if((uA(b|0)|0)>>>0>>0){break}a[45688+((k|0)==0?0:k-1|0)|0]=0}}while(0);if(f>>>0>=(uA(b|0)|0)>>>0){break L19029}if((ca(b+(f+1|0)|0,205104,(v=i,i=i+8|0,c[v>>2]=e,v)|0)|0)==0){break L19029}g[11418]=+g[e>>2];break L19029}}while(0);uB(45688,45952);g[11418]=+g[11486]}}while(0);do{if((aY(238560,45688)|0)==0){if(+g[59638]!=+g[11418]){break}i=d;return 1}}while(0);uF(238560,45688,256);if((uA(45688)|0)>>>0>=256){a[238815]=0}l=+g[11418];g[59638]=l;c[(c[3524]|0)+20>>2]=~~(+h[5710]*l*35.28*.6);c[(c[3524]|0)+16>>2]=~~(+h[5710]*+g[11418]*35.28*1.3);tO();i=d;return 1}function n5(a){a=+a;var b=0;b=~~((a<0.0?1.0:a)*+((c[(c[3524]|0)+28>>2]|0)>>>0>>>0));c[11278]=b;c[11268]=~~+O(+(+(b|0)*.707+.5));c[11266]=(b*13&-1|0)/15&-1;c[11272]=(b|0)/2&-1;c[11274]=(b*36&-1|0)/29&-1;c[11276]=(b*14&-1|0)/13&-1;c[11270]=(b*18&-1|0)/29&-1;return}function n6(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0;g=i;i=i+48|0;h=g|0;c[h>>2]=b;c[h+4>>2]=d;j=e+b|0;c[h+12>>2]=j;c[h+16>>2]=d;c[h+24>>2]=j;j=f+d|0;c[h+28>>2]=j;c[h+36>>2]=b;c[h+40>>2]=j;c[h+8>>2]=a;n9(4,h|0);i=g;return}function n7(a){a=+a;var b=0.0;tN();b=+h[5704]*a;if(b==+h[5705]){return}h[5705]=b;c[11552]=(c[11552]|0)+1;return}function n8(b){b=b|0;var e=0,f=0,g=0,j=0,k=0;e=i;i=i+8|0;f=e|0;tN();g=c[b>>2]|0;if((g|0)==5){fr(+h[b+8>>3],f);c[11562]=(d[f+1|0]|0)<<8|(d[f|0]|0)|(d[f+2|0]|0)<<16}else if((g|0)==3){f=c[b+4>>2]|0;c[11562]=f>>>16&255|f&65280|f<<16&16711680}else if((g|0)==1){g=c[b+4>>2]|0;if((g|0)==-4){j=46256}else{if((g|0)<0|a[45624]){k=7}else{k=(g|0)%15&-1}j=238816+(k<<2)|0}c[11562]=c[j>>2];tN()}c[11554]=c[11412];c[11552]=(c[11552]|0)+1;i=e;return}function n9(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0;e=i;i=i+8|0;f=e|0;g=f;h=c[11562]|0;j=c[d+8>>2]|0;k=j>>4;l=j&15;j=h&255;m=h>>>8;n=m&255;o=h>>>16;p=o&255;q=h>>>24&255;if((l|0)==0){r=c[11564]|0;s=r>>>24&255;t=r>>>16&255;u=r>>>8&255;v=r&255}else if((l|0)==2){w=k*12&-1;x=14054}else if((l|0)==1){w=k;x=14054}else{s=q;t=p;u=n;v=j}do{if((x|0)==14054){if(w>>>0>=100){s=q;t=p;u=n;v=j;break}y=+(w|0)/100.0;k=((~~(y*+(h&255|0))+(~~((1.0-y)*255.0)*65793&-1)|0)+(~~(y*+(m&255|0))<<8)|0)+(~~(y*+(o&255|0))<<16)|0;s=k>>>24&255;t=k>>>16&255;u=k>>>8&255;v=k&255}}while(0);if((c[11552]|0)>0){tL(c[11554]|0);c[11552]=0}o=f;m=g+3|0;a[m]=0;h=g+2|0;a[h]=0;w=g+1|0;a[w]=0;a[o]=37;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=12;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[m]=-128;a[h]=0;a[w]=0;a[o]=7;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=37;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=12;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[m]=-128;a[h]=0;a[w]=0;a[o]=0;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=40;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=12;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[m]=0;a[h]=0;a[w]=0;a[o]=3;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=39;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=24;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[m]=0;a[h]=0;a[w]=0;a[o]=3;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);a[m]=s;a[h]=t;a[w]=u;a[o]=v;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=37;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=12;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[m]=0;a[h]=0;a[w]=0;a[o]=3;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=40;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=12;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[m]=0;a[h]=0;a[w]=0;a[o]=1;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=38;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=28;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[m]=0;a[h]=0;a[w]=0;a[o]=1;aI(o|0,1,4,c[10030]|0);g=a[45616]|0;a[m]=0;a[h]=0;a[w]=g?0:34;a[o]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);a[m]=s;a[h]=t;a[w]=u;a[o]=v;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=37;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=12;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[m]=0;a[h]=0;a[w]=0;a[o]=1;aI(o|0,1,4,c[10030]|0);a[m]=0;a[h]=0;a[w]=0;a[o]=3;aI(o|0,1,4,c[10030]|0);v=(b<<3)+28|0;a[m]=v>>>24&255;a[h]=v>>>16&255;a[w]=v>>>8&255;a[o]=v&255;aI(o|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);c[f>>2]=0;aI(o|0,1,4,c[10030]|0);a[m]=b>>>24&255;a[h]=b>>>16&255;a[w]=b>>>8&255;a[o]=b&255;aI(o|0,1,4,c[10030]|0);if((b|0)>0){z=0}else{c[11412]=-5;c[11554]=-5;i=e;return}do{f=c[d+(z*12&-1)>>2]|0;a[m]=f>>>24&255;a[h]=f>>>16&255;a[w]=f>>>8&255;a[o]=f&255;aI(o|0,1,4,c[10030]|0);f=(c[(c[3524]|0)+12>>2]|0)-(c[d+(z*12&-1)+4>>2]|0)|0;a[m]=f>>>24&255;a[h]=f>>>16&255;a[w]=f>>>8&255;a[o]=f&255;aI(o|0,1,4,c[10030]|0);z=z+1|0;}while((z|0)<(b|0));c[11412]=-5;c[11554]=-5;i=e;return}function oa(){var b=0,d=0,e=0,f=0.0,h=0,j=0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0,v=0,w=0,x=0,y=0;b=i;i=i+256|0;if(!(a[238232]|0)){i=b;return}a[c[11232]|0]=0;a[238232]=0;d=c[11298]|0;e=c[11296]|0;f=+g[11418];h=b|0;uB(h|0,45688);g[11418]=+g[59560];n4(c[59562]|0);g[11418]=f;uB(45688,h|0);h=b4(43856,73808)|0;if((h|0)>0){f=+(aa(c[(c[3524]|0)+20>>2]|0,h)>>>0>>>0)*.8;j=c[11262]|0;k=+(j|0)*.0017453292519944445;l=~~(+(d>>>0>>>0)+ +S(+k)*f);m=~~(+(e>>>0>>>0)+ +T(+k)*f);c[11298]=l;c[11296]=m;n=l;o=m;p=h+43856|0;q=j}else{n=d;o=e;p=43856;q=c[11262]|0}f=+(q|0)*.0017453292519944445;k=+T(+f);r=+g[59564];q=~~(k*r*26.37);e=~~(+S(+f)*r*26.37);do{if((a[238216]&1)!=0){if(a[238208]|0){break}n$(n-q|0,e+o|0,p)}}while(0);r=+((uA(p|0)|0)>>>0>>>0);if(a[45056]|0){s=r*.8*+((c[(c[3524]|0)+20>>2]|0)>>>0>>>0)}else{e=a[p]|0;L19099:do{if(e<<24>>24==0){t=0;u=0}else{q=uA(p|0)|0;d=1;j=0;h=0;m=e;while(1){l=m<<24>>24;v=((aZ(171640,l|0,18)|0)!=0&1)+j|0;if((m-65&255)<26){w=14075}else{if((aZ(171632,l|0,5)|0)==0){x=h}else{w=14075}}if((w|0)==14075){w=0;x=h+1|0}y=v+((aZ(171608,l|0,10)|0)!=0&1)|0;if(d>>>0>=q>>>0){t=y;u=x;break L19099}l=a[p+d|0]|0;d=d+1|0;j=y;h=x;m=l}}}while(0);s=(+(-t|0)*.2+(r*.8+ +(u|0)*.3))*+((c[(c[3524]|0)+20>>2]|0)>>>0>>>0)}r=+(~~s|0);s=+(c[11262]|0)*.0017453292519944445;f=+S(+s);u=~~(+(n>>>0>>>0)+r*f);c[11298]=u;k=+T(+s);n=~~(+(o>>>0>>>0)+r*k);c[11296]=n;if((c[59556]|0)!=1){i=b;return}s=r*.5;c[11298]=~~(+(u|0)-s*f);c[11296]=~~(+(n|0)-s*k);i=b;return}function ob(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0.0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0.0,ac=0.0,ad=0,ae=0,af=0.0,ag=0,ah=0.0,ai=0,aj=0.0,ak=0,al=0,am=0,an=0,ao=0,ap=0.0,aq=0.0,ar=0,as=0.0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0.0,aA=0.0,aB=0.0,aC=0.0,aD=0.0,aE=0.0,aF=0.0,aG=0,aH=0,aI=0,aJ=0;b=i;i=i+424|0;d=b|0;e=b+24|0;f=b+48|0;g=b+72|0;j=b+96|0;k=b+120|0;l=b+144|0;m=b+168|0;n=c[13898]|0;o=c[8272]|0;L19117:do{if((n|0)<(o|0)){p=l|0;q=l+8|0;r=k|0;s=k+8|0;t=j|0;u=j+8|0;w=g|0;x=g+8|0;y=f|0;z=f+8|0;A=e|0;B=e+8|0;C=d|0;D=d+8|0;E=0.0;F=0.0;G=n;H=o;L19119:while(1){I=c[1054]|0;J=(a[I+(G*40&-1)|0]&1)==0;L19121:do{if(!J){K=c[I+(G*40&-1)+36>>2]|0;L=I+(G*40&-1)+32|0;M=c[10036]|0;N=0;while(1){if((N|0)>=(K|0)){break}if((a[M+((c[L>>2]|0)+N|0)|0]|0)==(a[N+103664|0]|0)){N=N+1|0}else{break L19121}}if((N|0)==1){O=E;P=F;break L19117}}}while(0);L=c[59286]|0;L19128:do{if((L|0)==0){Q=237144}else{M=c[I+(G*40&-1)+36>>2]|0;K=c[I+(G*40&-1)+32>>2]|0;R=(M|0)>0;S=c[10036]|0;T=237144;U=L;while(1){L19132:do{if(!J){if(R){V=0;W=0;X=K;while(1){Y=a[U+V|0]|0;if(Y<<24>>24==(a[S+(V+X|0)|0]|0)){Z=X;_=W}else{if(Y<<24>>24!=36){break L19132}Z=X-1|0;_=1}$=V+1|0;if(($|0)<(_+M|0)){V=$;W=_;X=Z}else{break}}if((_|0)==0){aa=$}else{Q=T;break L19128}}else{aa=0}X=a[U+aa|0]|0;if((X<<24>>24|0)==36|(X<<24>>24|0)==0){Q=T;break L19128}}}while(0);X=T+8|0;W=c[X>>2]|0;if((W|0)==0){Q=X;break}else{T=X;U=W}}}}while(0);J=c[Q+4>>2]|0;do{if((J|0)==0){a[237032]=0;c[13898]=G+1;ab=F;ac=E}else if((J|0)==1){a[237032]=1;c[13898]=G+1;ab=F;ac=E}else if((J|0)==17){c[59264]=c[59264]&-7|2;c[59444]=0;c[13898]=G+1;ab=F;ac=E}else if((J|0)==16){c[59264]=4;c[13898]=G+1;ab=F;ac=E}else if((J|0)==19){c[59264]=c[59264]|1;c[13898]=G+1;ab=F;ac=E}else if((J|0)==3){a[237464]=1;c[13898]=G+1;ab=F;ac=E}else if((J|0)==7){a[237096]=0;c[13898]=G+1;ab=F;ac=E}else if((J|0)==8){ad=G+1|0;c[13898]=ad;if((ad|0)>=(H|0)){ae=14288;break L19119}L19155:do{if((a[I+(ad*40&-1)|0]&1)!=0){L=c[I+(ad*40&-1)+36>>2]|0;U=I+(ad*40&-1)+32|0;T=c[10036]|0;M=0;while(1){if((M|0)>=(L|0)){break}if((a[T+((c[U>>2]|0)+M|0)|0]|0)==(a[M+103664|0]|0)){M=M+1|0}else{break L19155}}if((M|0)==1){ae=14289;break L19119}}}while(0);U=is(l)|0;T=c[U>>2]|0;if((T|0)==1){af=+(c[U+8>>2]|0)}else if((T|0)==2){af=+h[U+8>>3]}else if((T|0)==3){af=+uz(c[U+8>>2]|0,0)}else{ae=14130;break L19119}if((c[p>>2]|0)==3){uu(c[q>>2]|0);c[p>>2]=1}U=c[13898]|0;T=c[8272]|0;L19170:do{if((T|0)>(U|0)){L=c[1054]|0;if((a[L+(U*40&-1)|0]&1)==0){ag=U;break}S=c[L+(U*40&-1)+36>>2]|0;K=L+(U*40&-1)+32|0;L=c[10036]|0;R=0;while(1){if((R|0)>=(S|0)){break}if((a[L+((c[K>>2]|0)+R|0)|0]|0)==(a[R+148464|0]|0)){R=R+1|0}else{ag=U;break L19170}}if((R|0)!=1){ag=U;break}K=U+1|0;c[13898]=K;ag=K}else{ag=U}}while(0);if((ag|0)>=(T|0)){ae=14286;break L19119}U=c[1054]|0;L19180:do{if((a[U+(ag*40&-1)|0]&1)!=0){K=c[U+(ag*40&-1)+36>>2]|0;L=U+(ag*40&-1)+32|0;S=c[10036]|0;M=0;while(1){if((M|0)>=(K|0)){break}if((a[S+((c[L>>2]|0)+M|0)|0]|0)==(a[M+103664|0]|0)){M=M+1|0}else{break L19180}}if((M|0)==1){ae=14287;break L19119}}}while(0);U=is(k)|0;T=c[U>>2]|0;if((T|0)==1){ah=+(c[U+8>>2]|0)}else if((T|0)==2){ah=+h[U+8>>3]}else if((T|0)==3){ah=+uz(c[U+8>>2]|0,0)}else{ae=14151;break L19119}if((c[r>>2]|0)==3){uu(c[s>>2]|0);c[r>>2]=1}if(!(af<2.0|ah<2.0|af>99.0|ah>99.0)){ab=af;ac=ah;break}if(af!=0.0|ah!=0.0){ae=14156;break L19119}else{ab=0.0;ac=0.0}}else if((J|0)==18){c[59264]=c[59264]|8;c[13898]=G+1;ab=F;ac=E}else if((J|0)==12){ai=G+1|0;c[13898]=ai;if((ai|0)>=(H|0)){ae=14290;break L19119}L19199:do{if((a[I+(ai*40&-1)|0]&1)!=0){U=c[I+(ai*40&-1)+36>>2]|0;T=I+(ai*40&-1)+32|0;L=c[10036]|0;S=0;while(1){if((S|0)>=(U|0)){break}if((a[L+((c[T>>2]|0)+S|0)|0]|0)==(a[S+103664|0]|0)){S=S+1|0}else{break L19199}}if((S|0)==1){ae=14291;break L19119}}}while(0);T=is(e)|0;L=c[T>>2]|0;if((L|0)==1){aj=+(c[T+8>>2]|0)}else if((L|0)==2){aj=+h[T+8>>3]}else if((L|0)==3){aj=+uz(c[T+8>>2]|0,0)}else{ae=14214;break L19119}if((c[A>>2]|0)==3){uu(c[B>>2]|0);c[A>>2]=1}T=~~aj;c[59446]=T;if(T>>>0>99){ae=14218;break L19119}c[59344]=T;ab=F;ac=E}else if((J|0)==2){a[237464]=0;c[13898]=G+1;ab=F;ac=E}else if((J|0)==15){a[237072]=0;c[13898]=G+1;ab=F;ac=E}else if((J|0)==20){ak=G+1|0;c[13898]=ak;if((ak|0)>=(H|0)){ae=14284;break L19119}T=c[I+(ak*40&-1)+36>>2]|0;L19219:do{if((a[I+(ak*40&-1)|0]&1)==0){al=c[10036]|0;am=I+(ak*40&-1)+32|0}else{L=I+(ak*40&-1)+32|0;U=c[10036]|0;M=0;while(1){if((M|0)>=(T|0)){break}if((a[U+((c[L>>2]|0)+M|0)|0]|0)==(a[M+103664|0]|0)){M=M+1|0}else{al=U;am=L;break L19219}}if((M|0)==1){ae=14285;break L19119}else{al=U;am=L}}}while(0);S=(T|0)>49?49:T;K=c[am>>2]|0;R=0;while(1){N=R+1|0;a[R+236976|0]=a[al+K|0]|0;if((N|0)==(S|0)){break}else{K=K+1|0;R=N}}a[S+236976|0]=0;an=G+2|0;c[13898]=an;if((aY(236976,173280)|0)==0){ab=F;ac=E;break}if((aY(236976,173088)|0)==0){ab=F;ac=E}else{ae=14249;break L19119}}else if((J|0)==14){a[237072]=1;c[13898]=G+1;ab=F;ac=E}else if((J|0)==13){ao=G+1|0;c[13898]=ao;if((ao|0)>=(H|0)){ae=14297;break L19119}L19234:do{if((a[I+(ao*40&-1)|0]&1)!=0){R=c[I+(ao*40&-1)+36>>2]|0;K=I+(ao*40&-1)+32|0;T=c[10036]|0;N=0;while(1){if((N|0)>=(R|0)){break}if((a[T+((c[K>>2]|0)+N|0)|0]|0)==(a[N+103664|0]|0)){N=N+1|0}else{break L19234}}if((N|0)==1){ae=14296;break L19119}}}while(0);S=is(d)|0;K=c[S>>2]|0;if((K|0)==2){ap=+h[S+8>>3]}else if((K|0)==3){ap=+uz(c[S+8>>2]|0,0)}else if((K|0)==1){ap=+(c[S+8>>2]|0)}else{ae=14231;break L19119}if((c[C>>2]|0)==3){uu(c[D>>2]|0);c[C>>2]=1}S=~~ap;if((S-2|0)>>>0>=99999){ae=14236;break L19119}c[59278]=S-1;ab=F;ac=E}else if((J|0)==10){c[13898]=G+1;S=is(g)|0;K=c[S>>2]|0;if((K|0)==1){aq=+(c[S+8>>2]|0)}else if((K|0)==2){aq=+h[S+8>>3]}else if((K|0)==3){aq=+uz(c[S+8>>2]|0,0)}else{ae=14182;break L19119}if((c[w>>2]|0)==3){uu(c[x>>2]|0);c[w>>2]=1}c[59442]=~~aq;ab=F;ac=E}else if((J|0)==11){ar=G+1|0;c[13898]=ar;if((ar|0)>=(H|0)){ae=14295;break L19119}L19261:do{if((a[I+(ar*40&-1)|0]&1)!=0){S=c[I+(ar*40&-1)+36>>2]|0;K=I+(ar*40&-1)+32|0;T=c[10036]|0;R=0;while(1){if((R|0)>=(S|0)){break}if((a[T+((c[K>>2]|0)+R|0)|0]|0)==(a[R+103664|0]|0)){R=R+1|0}else{break L19261}}if((R|0)==1){ae=14294;break L19119}}}while(0);K=is(f)|0;T=c[K>>2]|0;if((T|0)==1){as=+(c[K+8>>2]|0)}else if((T|0)==2){as=+h[K+8>>3]}else if((T|0)==3){as=+uz(c[K+8>>2]|0,0)}else{ae=14197;break L19119}if((c[y>>2]|0)==3){uu(c[z>>2]|0);c[y>>2]=1}K=~~as;c[59448]=K;if((K-1|0)>>>0>9){ae=14202;break L19119}else{ab=F;ac=E}}else if((J|0)==9){at=G+1|0;c[13898]=at;if((at|0)>=(H|0)){au=at;ae=14282;break L19119}K=(a[I+(at*40&-1)|0]&1)==0;L19278:do{if(!K){T=c[I+(at*40&-1)+36>>2]|0;S=I+(at*40&-1)+32|0;N=c[10036]|0;L=0;while(1){if((L|0)>=(T|0)){ae=14162;break}if((a[N+((c[S>>2]|0)+L|0)|0]|0)==(a[L+103664|0]|0)){L=L+1|0}else{break}}if((ae|0)==14162){ae=0;if((L|0)==1){au=at;ae=14281;break L19119}}if(K){break}S=c[I+(at*40&-1)+36>>2]|0;N=I+(at*40&-1)+32|0;T=c[10036]|0;R=0;while(1){if((R|0)>=(S|0)){break}if((a[T+((c[N>>2]|0)+R|0)|0]|0)==(a[R+103664|0]|0)){R=R+1|0}else{break L19278}}if((R|0)==1){au=at;ae=14279;break L19119}}}while(0);a[14176]=1;is(j);a[14176]=0;if((c[t>>2]|0)!=3){ae=14169;break L19119}K=c[u>>2]|0;if((K|0)==0){ae=14171;break L19119}N=bk(K|0,148464)|0;ca(K+(N+1|0)|0,21e4,(v=i,i=i+8|0,c[v>>2]=237768,v)|0);a[K+N|0]=0;N=237480;while(1){T=c[N>>2]|0;if((T|0)==0){av=-1;break}if((a_(K|0,T|0,uA(K|0)|0)|0)==0){ae=14176;break}else{N=N+8|0}}if((ae|0)==14176){ae=0;av=c[N+4>>2]|0}c[59444]=(av|0)<0?0:av;uu(K);ab=F;ac=E}else if((J|0)==5){a[237472]=1;c[13898]=G+1;ab=F;ac=E}else if((J|0)==6){a[237096]=1;c[13898]=G+1;ab=F;ac=E}else if((J|0)==4){a[237472]=0;c[13898]=G+1;ab=F;ac=E}else{ae=14250;break L19119}}while(0);J=c[13898]|0;I=c[8272]|0;if((J|0)<(I|0)){E=ac;F=ab;G=J;H=I}else{O=ac;P=ab;break L19117}}if((ae|0)==14171){au=c[13898]|0;uf(au,116592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14294){uf(ar,172856,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14295){uf(ar,172856,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14296){uf(ao,172696,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14291){uf(ai,172784,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14297){uf(ao,172696,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14130){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14202){uf((c[13898]|0)-1|0,172816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14285){uf(ak,172624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14286){uf(ag,172904,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14287){uf(ag,172904,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14279){uf(au,116592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14281){uf(au,116592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14249){uf(an,172552,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14250){uf(G,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14214){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14288){uf(ad,172904,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14289){uf(ad,172904,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14290){uf(ai,172784,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14197){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14236){uf(c[13898]|0,172656,(v=i,i=i+8|0,c[v>>2]=1e5,v)|0)}else if((ae|0)==14282){uf(au,116592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14284){uf(ak,172624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14182){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14151){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14156){uf(c[13898]|0,130744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14231){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14169){c[13898]=at;au=at;uf(au,116592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((ae|0)==14218){uf((c[13898]|0)-1|0,172744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{O=0.0;P=0.0}}while(0);ae=c[59264]|0;au=m|0;if((ae|0)==4){uD(au|0,172520,12)}else{m=(ae&2|0)!=0?172480:179864;at=(ae&8|0)!=0?172440:179864;ak=(ae&1|0)!=0?172408:179864;be(au|0,172512,(v=i,i=i+24|0,c[v>>2]=m,c[v+8>>2]=at,c[v+16>>2]=ak,v)|0)}ak=a[237464]|0;at=(c[59278]|0)+1|0;m=a[237096]|0?78720:78704;ae=a[237472]|0?172248:172264;ai=a[237072]|0?131504:131584;ad=c[237480+(c[59444]<<3)>>2]|0;an=c[59442]|0;if((an|0)>0){aw=an}else{aw=ak?16:10}an=c[59448]|0;ag=c[59446]|0;be(13048,172304,(v=i,i=i+136|0,c[v>>2]=a[237032]|0?116440:116408,c[v+8>>2]=ak?172296:172288,c[v+16>>2]=172272,c[v+24>>2]=at,c[v+32>>2]=m,c[v+40>>2]=ae,c[v+48>>2]=ai,c[v+56>>2]=au,c[v+64>>2]=124352,c[v+72>>2]=ad,c[v+80>>2]=aw,c[v+88>>2]=208960,c[v+96>>2]=an,c[v+104>>2]=172240,c[v+112>>2]=ag,c[v+120>>2]=172200,c[v+128>>2]=236976,v)|0);ag=P>0.0&O>0.0;L19344:do{if(ag){an=~~P;do{if(P- +(an|0)==0.0){aw=~~O;if(O- +(aw|0)!=0.0){break}ad=13048+(uA(13048)|0)|0;be(ad|0,172160,(v=i,i=i+16|0,c[v>>2]=an,c[v+8>>2]=aw,v)|0);break L19344}}while(0);an=13048+(uA(13048)|0)|0;be(an|0,172120,(v=i,i=i+16|0,h[v>>3]=P,h[v+8>>3]=O,v)|0)}}while(0);an=(c[59442]|0)<1;if(a[237464]|0){if(an){c[59442]=16}G=a[237472]|0;c[(c[3524]|0)+8>>2]=G?9e3:9600;c[(c[3524]|0)+12>>2]=G?6750:6e3;aw=G?90:105;c[(c[3524]|0)+24>>2]=aw;c[(c[3524]|0)+28>>2]=aw;ax=G;ay=G?900:1200}else{if(an){c[59442]=10}an=a[237472]|0;c[(c[3524]|0)+8>>2]=an?5400:6e3;c[(c[3524]|0)+12>>2]=3600;G=an?67:75;c[(c[3524]|0)+24>>2]=G;c[(c[3524]|0)+28>>2]=G;ax=an;ay=an?900:1200}c[59242]=ay;c[59240]=ax?900:1200;if(a[237096]|0){ay=c[3524]|0;an=ay+8|0;G=c[an>>2]|0;c[an>>2]=c[ay+12>>2];c[(c[3524]|0)+12>>2]=G}if(ag){ab=ax?450.0:1200.0;c[(c[3524]|0)+8>>2]=~~(P*ab);c[(c[3524]|0)+12>>2]=~~(O*ab)}ag=c[59442]|0;if(ax){az=+(ag*450&-1|0)*2.54}else{az=+(ag*1200&-1|0)}c[(c[3524]|0)+16>>2]=~~(az/72.0*3.0*.25);ag=c[59442]|0;if(ax){aA=+(ag*450&-1|0)*2.54;aB=aA/72.0;aC=aB*3.0;aD=aC*.25;aE=aD*6.0;aF=aE/10.0;aG=~~aF;aH=c[3524]|0;aI=aH+20|0;c[aI>>2]=aG;aJ=c[59448]|0;c[59262]=aJ;i=b;return}else{aA=+(ag*1200&-1|0);aB=aA/72.0;aC=aB*3.0;aD=aC*.25;aE=aD*6.0;aF=aE/10.0;aG=~~aF;aH=c[3524]|0;aI=aH+20|0;c[aI>>2]=aG;aJ=c[59448]|0;c[59262]=aJ;i=b;return}}function oc(){c[59270]=0;c[59272]=0;a[237104]=0;return}function od(a){a=a|0;var b=0;if((a|0)==1){c[59364]=1;b=1}else if((a|0)==0){c[59364]=0;b=1}else if((a|0)==2){c[59364]=2;b=1}else{c[59364]=0;b=0}return b|0}function oe(a){a=a|0;g[59456]=+(a|0)*1.5707963267948966/90.0;return 1}function of(a){a=+a;var b=0.0;h[29725]=a<0.0?1.0:a;b=+(c[59442]|0)*a/10.0;h[1630]=b>=0.0?b:1.0;return}function og(){var b=0,d=0,e=0,f=0;b=i;c[59270]=0;c[59272]=0;a[237104]=0;ol(-1);c[59364]=0;g[59456]=0.0;a[237136]=0;a[237432]=1;c[59356]=0;c[59354]=c[59262];a[237392]=1;c[59346]=c[59344];g[59360]=0.0;if((aY(236976,173280)|0)==0){d=c[10030]|0;e=a[237096]|0?198816:198832;f=a[237472]|0?173096:173160;cf(d|0,173232,(v=i,i=i+40|0,c[v>>2]=e,c[v+8>>2]=173184,c[v+16>>2]=f,c[v+24>>2]=1200,c[v+32>>2]=2,v)|0);i=b;return}if((aY(236976,173088)|0)!=0){i=b;return}f=a[237472]|0;cf(c[10030]|0,173048,(v=i,i=i+72|0,c[v>>2]=a[237096]|0?198816:198832,c[v+8>>2]=173184,c[v+16>>2]=f?173096:173160,c[v+24>>2]=f?173032:173040,h[v+32>>3]=100.0,c[v+40>>2]=172944,c[v+48>>2]=-2,c[v+56>>2]=1200,c[v+64>>2]=2,v)|0);i=b;return}function oh(){tK(a[237104]&1);c[59270]=0;c[59272]=0;aD(c[10030]|0);return}function oi(){tK(a[237104]&1);c[59270]=0;c[59272]=0;aD(c[10030]|0);return}function oj(b,d){b=b|0;d=d|0;var e=0,f=0;e=c[59272]|0;f=c[59270]|0;c[59272]=b;c[59270]=d;if((e|0)==(b|0)&(f|0)==(d|0)){return}tK(a[237104]&1);return}function ok(b,d){b=b|0;d=d|0;var e=0,f=0;if(a[237104]|0){e=(c[59280]<<3)+8|0}else{f=c[59454]|0;c[59352]=f;c[59350]=f;c[59356]=c[59260];g[59360]=+g[59266];c[59346]=c[59344];c[59354]=c[59262];c[59280]=0;f=db(c[59282]|0,8,173288)|0;c[59282]=f;c[f+(c[59280]<<3)>>2]=(c[59272]|0)+(c[59242]|0);c[(c[59282]|0)+(c[59280]<<3)+4>>2]=((c[59240]|0)+(c[(c[3524]|0)+12>>2]|0)|0)-(c[59270]|0);c[59280]=1;a[237104]=1;e=16}f=db(c[59282]|0,e,173288)|0;c[59282]=f;c[f+(c[59280]<<3)>>2]=(c[59242]|0)+b;c[(c[59282]|0)+(c[59280]<<3)+4>>2]=((c[(c[3524]|0)+12>>2]|0)-d|0)+(c[59240]|0);f=(c[59280]|0)+1|0;c[59280]=f;if((f|0)<=(c[59278]|0)){c[59272]=b;c[59270]=d;return}tK(a[237104]&1);c[59272]=b;c[59270]=d;return}function ol(b){b=b|0;var d=0,e=0,f=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0;d=c[59260]|0;e=~~+g[59266];f=c[59454]|0;i=c[59344]|0;j=c[59262]|0;k=c[59446]|0;c[59344]=k;l=~~(+h[29726]*+(c[59448]|0));m=(l|0)<1?1:l;c[59262]=m;c[59454]=-1;n=(b|0)<-2?-2:b;do{if((n|0)==0|(n|0)==(-2|0)){c[59260]=0;g[59266]=0.0;if(!(a[237032]&(n|0)==0)){o=0;p=0.0;q=-1;r=k;s=m;break}c[59454]=4;o=0;p=0.0;q=4;r=k;s=m}else if((n|0)==(-1|0)){c[59260]=2;if(a[237072]|0){c[59260]=0;t=0}else{t=2}g[59266]=4.0;if(!(a[237032]|0)){o=t;p=4.0;q=-1;r=k;s=m;break}c[59454]=0;o=t;p=4.0;q=0;r=k;s=m}else{b=((n|0)/1e3&-1)+k|0;c[59344]=b;u=(n|0)%1e3&-1;v=(u+99|0)>>>0<199?l:(u|0)/100&-1;w=(v|0)<1?1:v;c[59262]=w;v=(u|0)%100&-1;if(a[237032]|0){u=(v|0)>8&1;c[59260]=u;x=c[237336+(((v|0)%9&-1)<<2)>>2]|0;c[59454]=x;y=(v|0)/9&-1;z=u;A=x}else{if((v|0)==0){B=0}else{B=((v|0)%2&-1)+1|0}c[59260]=B;y=(v+1|0)/2&-1;z=B;A=-1}C=+(y*3&-1|0);g[59266]=C;if(!(a[237072]|0)){o=z;p=C;q=A;r=b;s=w;break}c[59260]=0;o=0;p=C;q=A;r=b;s=w}}while(0);do{if((o|0)==(d|0)){if(!(p==+(e|0)&(q|0)==(f|0)&(r|0)==(i|0)&(s|0)==(j|0))){break}return}}while(0);tK(a[237104]&1);return}function om(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0,t=0,u=0,w=0;f=i;c[59260]=0;if((((e|0)%100&-1)-49|0)>>>0<50){j=e}else{k=(e|0)%13&-1;if((k|0)==12){l=78}else if((k|0)==8){l=88}else if((k|0)==4){l=68}else if((k|0)==10){l=98}else if((k|0)==6){c[59260]=0;tK(a[237104]&1);e=(c[59344]|0)-1|0;m=c[59454]|0;n=(c[59242]|0)+b|0;o=c[3524]|0;p=((c[o+12>>2]|0)-d|0)+(c[59240]|0)|0;q=~~(+h[29725]*+((c[o+16>>2]|0)>>>0>>>0)*.25+1.0);o=c[59262]|0;r=+g[59266];cf(c[10030]|0,173528,(v=i,i=i+128|0,c[v>>2]=c[59260],c[v+8>>2]=o,c[v+16>>2]=m,c[v+24>>2]=m,c[v+32>>2]=(e|0)<0?0:e,c[v+40>>2]=0,c[v+48>>2]=20,h[v+56>>3]=r,c[v+64>>2]=n,c[v+72>>2]=p,c[v+80>>2]=q,c[v+88>>2]=q,c[v+96>>2]=n,c[v+104>>2]=p,c[v+112>>2]=n,c[v+120>>2]=p-q,v)|0);i=f;return}else if((k|0)==7){l=84}else if((k|0)==11){l=74}else if((k|0)==3){c[59260]=0;tK(a[237104]&1);q=(c[59344]|0)-1|0;p=c[59454]|0;n=(c[59242]|0)+b|0;e=((c[(c[3524]|0)+12>>2]|0)-d|0)+(c[59240]|0)|0;m=c[59262]|0;r=+g[59266];cf(c[10030]|0,173472,(v=i,i=i+64|0,c[v>>2]=c[59260],c[v+8>>2]=m,c[v+16>>2]=p,c[v+24>>2]=p,c[v+32>>2]=(q|0)<0?0:q,c[v+40>>2]=0,c[v+48>>2]=-1,h[v+56>>3]=r,v)|0);q=~~(+h[29725]*+((c[(c[3524]|0)+16>>2]|0)>>>0>>>0)*.25+1.0);p=n-q|0;m=e-q|0;o=q+e|0;e=q+n|0;cf(c[10030]|0,173424,(v=i,i=i+80|0,c[v>>2]=p,c[v+8>>2]=m,c[v+16>>2]=p,c[v+24>>2]=o,c[v+32>>2]=e,c[v+40>>2]=o,c[v+48>>2]=e,c[v+56>>2]=m,c[v+64>>2]=p,c[v+72>>2]=m,v)|0);i=f;return}else if((k|0)==9){l=94}else if((k|0)==5){c[59260]=0;tK(a[237104]&1);m=(c[59344]|0)-1|0;p=c[59454]|0;e=(c[59242]|0)+b|0;o=c[3524]|0;n=((c[o+12>>2]|0)-d|0)+(c[59240]|0)|0;q=~~(+h[29725]*+((c[o+16>>2]|0)>>>0>>>0)*.25+1.0);o=c[59262]|0;r=+g[59266];cf(c[10030]|0,173528,(v=i,i=i+128|0,c[v>>2]=c[59260],c[v+8>>2]=o,c[v+16>>2]=p,c[v+24>>2]=p,c[v+32>>2]=(m|0)<0?0:m,c[v+40>>2]=0,c[v+48>>2]=-1,h[v+56>>3]=r,c[v+64>>2]=e,c[v+72>>2]=n,c[v+80>>2]=q,c[v+88>>2]=q,c[v+96>>2]=e,c[v+104>>2]=n,c[v+112>>2]=e,c[v+120>>2]=n-q,v)|0);i=f;return}else{ly(b,d,k);i=f;return}c[59260]=0;j=l}tK(a[237104]&1);if((j|0)>1e3){s=((j|0)/1e3&-1)+(c[59446]|0)|0}else{s=c[59344]|0}l=s-1|0;s=(j|0)%1e3&-1;j=(l|0)<0?0:l;do{if((s|0)<100){t=c[59454]|0}else{if(a[237032]|0){t=((s|0)/100&-1)-1|0;break}else{t=(s|0)>699?7:-1;break}}}while(0);l=(s|0)%100&-1;s=(l+1|0)%10&-1;if((s|0)<5){u=(a[237032]^1)<<31>>31}else{u=c[59454]|0}if((s|0)==5|(s|0)==0){w=-1}else{w=((s|0)%5&-1)*5&-1}s=(c[59242]|0)+b|0;b=c[3524]|0;k=((c[b+12>>2]|0)-d|0)+(c[59240]|0)|0;if((l-40|0)>>>0<19){d=~~(+h[29725]*+((c[b+16>>2]|0)>>>0>>>0)*.25+1.0);b=c[10030]|0;q=c[59260]|0;n=c[59262]|0;r=+g[59266];e=k-d|0;cf(b|0,173528,(v=i,i=i+128|0,c[v>>2]=q,c[v+8>>2]=n,c[v+16>>2]=u,c[v+24>>2]=t,c[v+32>>2]=j,c[v+40>>2]=0,c[v+48>>2]=w,h[v+56>>3]=r,c[v+64>>2]=s,c[v+72>>2]=k,c[v+80>>2]=d,c[v+88>>2]=d,c[v+96>>2]=s,c[v+104>>2]=k,c[v+112>>2]=s,c[v+120>>2]=e,v)|0);i=f;return}e=c[59262]|0;r=+g[59266];cf(c[10030]|0,173472,(v=i,i=i+64|0,c[v>>2]=c[59260],c[v+8>>2]=e,c[v+16>>2]=u,c[v+24>>2]=t,c[v+32>>2]=j,c[v+40>>2]=0,c[v+48>>2]=w,h[v+56>>3]=r,v)|0);if((l-59|0)>>>0<10){w=~~(+h[29725]*+((c[(c[3524]|0)+16>>2]|0)>>>0>>>0)*.25+1.0);j=c[10030]|0;t=s-w|0;u=k-w|0;e=w+k|0;d=w+s|0;cf(j|0,173424,(v=i,i=i+80|0,c[v>>2]=t,c[v+8>>2]=u,c[v+16>>2]=t,c[v+24>>2]=e,c[v+32>>2]=d,c[v+40>>2]=e,c[v+48>>2]=d,c[v+56>>2]=u,c[v+64>>2]=t,c[v+72>>2]=u,v)|0);i=f;return}if((l-69|0)>>>0<10){u=~~(+h[29725]*+((c[(c[3524]|0)+16>>2]|0)>>>0>>>0)/3.0+1.0);t=c[10030]|0;d=s-u|0;e=u+k|0;j=u+s|0;w=k-u|0;cf(t|0,173424,(v=i,i=i+80|0,c[v>>2]=d,c[v+8>>2]=k,c[v+16>>2]=s,c[v+24>>2]=e,c[v+32>>2]=j,c[v+40>>2]=k,c[v+48>>2]=s,c[v+56>>2]=w,c[v+64>>2]=d,c[v+72>>2]=k,v)|0);i=f;return}if((l-79|0)>>>0<10){d=~~(+h[29725]*+((c[(c[3524]|0)+16>>2]|0)>>>0>>>0)/3.0+1.0);w=(d<<2|0)/7&-1;j=c[10030]|0;e=s-d|0;t=w+k|0;u=k-(w<<1)|0;w=d+s|0;cf(j|0,173392,(v=i,i=i+64|0,c[v>>2]=e,c[v+8>>2]=t,c[v+16>>2]=s,c[v+24>>2]=u,c[v+32>>2]=w,c[v+40>>2]=t,c[v+48>>2]=e,c[v+56>>2]=t,v)|0);i=f;return}if((l-89|0)>>>0>=10){i=f;return}l=~~(+h[29725]*+((c[(c[3524]|0)+16>>2]|0)>>>0>>>0)/3.0+1.0);t=(l<<2|0)/7&-1;e=s-l|0;w=k-t|0;cf(c[10030]|0,173392,(v=i,i=i+64|0,c[v>>2]=e,c[v+8>>2]=w,c[v+16>>2]=s,c[v+24>>2]=(t<<1)+k,c[v+32>>2]=l+s,c[v+40>>2]=w,c[v+48>>2]=e,c[v+56>>2]=w,v)|0);i=f;return}function on(b,d,e,f,j){b=b|0;d=d|0;e=e|0;f=f|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0;k=i;tK(a[237104]&1);l=(c[59356]|0)==2&1;m=a[237432]&1;n=c[59260]|0;o=c[59262]|0;p=c[59454]|0;q=c[59344]|0;r=a[237392]<<31>>31;s=+g[59266];t=(j|0)!=0;u=(j|0)==2;cf(c[10030]|0,173752,(v=i,i=i+128|0,c[v>>2]=2,c[v+8>>2]=m,c[v+16>>2]=n,c[v+24>>2]=o,c[v+32>>2]=p,c[v+40>>2]=p,c[v+48>>2]=q,c[v+56>>2]=0,c[v+64>>2]=r,h[v+72>>3]=s,c[v+80>>2]=0,c[v+88>>2]=l,c[v+96>>2]=0,c[v+104>>2]=t&1,c[v+112>>2]=u&1,c[v+120>>2]=2,v)|0);do{if(t){l=c[12910]|0;if((l|0)==0){r=c[(c[3524]|0)+28>>2]|0;w=+(r>>>0>>>0);x=+(((r>>>1)+1|0)>>>0>>>0)}else{s=+(l|0);y=+h[6458]*3.141592653589793/180.0;z=s*2.0*+T(+y);w=s*+S(+y);x=z}z=+h[6457];if(z<70.0){A=2}else{A=z>110.0?3:1}l=(c[12912]|0)==2&1;r=c[10030]|0;cf(r|0,173640,(v=i,i=i+40|0,c[v>>2]=A,c[v+8>>2]=l,h[v+16>>3]=1.0,h[v+24>>3]=x,h[v+32>>3]=w,v)|0);if(!u){break}r=c[10030]|0;cf(r|0,173640,(v=i,i=i+40|0,c[v>>2]=A,c[v+8>>2]=l,h[v+16>>3]=1.0,h[v+24>>3]=x,h[v+32>>3]=w,v)|0)}}while(0);A=c[59240]|0;u=(c[(c[3524]|0)+12>>2]|0)+A|0;cf(c[10030]|0,173608,(v=i,i=i+32|0,c[v>>2]=(c[59242]|0)+b,c[v+8>>2]=u-d,c[v+16>>2]=A+e,c[v+24>>2]=u-f,v)|0);c[59272]=e;c[59270]=f;i=k;return}function oo(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0,s=0,t=0,u=0.0,w=0.0;f=i;if((a[e]|0)==0){i=f;return}j=uA(e|0)<<1|1;k=ut(j)|0;do{if((k|0)==0){gk();l=ut(j)|0;if((l|0)!=0){m=l;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=173376,v)|0)}else{m=k}}while(0);k=m;j=e;while(1){l=a[j]|0;if(l<<24>>24==92){a[k]=92;n=k+1|0;o=a[j]|0}else{n=k;o=l}a[n]=o;if((a[j]|0)==0){break}else{k=n+1|0;j=j+1|0}}tK(a[237104]&1);p=+g[59456];q=p;j=c[3524]|0;n=c[j+16>>2]|0;if(p==0.0){r=b;s=n>>>1}else{p=+(n>>>0>>>0);k=~~(p*+T(+q)*.25)+b|0;r=k;s=~~(p*+S(+q)*.25)}k=c[10030]|0;b=c[59364]|0;o=c[59454]|0;l=c[59444]|0;p=+(c[59442]|0);t=c[59264]|0;u=+((c[j+20>>2]|0)>>>0>>>0);w=u*+((uA(e|0)|0)>>>0>>>0);e=(c[59242]|0)+r|0;r=((s-d|0)+(c[j+12>>2]|0)|0)+(c[59240]|0)|0;cf(k|0,173312,(v=i,i=i+112|0,c[v>>2]=4,c[v+8>>2]=b,c[v+16>>2]=o,c[v+24>>2]=0,c[v+32>>2]=-1,c[v+40>>2]=l,h[v+48>>3]=p,h[v+56>>3]=q,c[v+64>>2]=t,h[v+72>>3]=+(n>>>0>>>0),h[v+80>>3]=w,c[v+88>>2]=e,c[v+96>>2]=r,c[v+104>>2]=m,v)|0);uu(m);i=f;return}function op(a){a=+a;h[29726]=a;return}function oq(b,d,e,f,j){b=b|0;d=d|0;e=e|0;f=f|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0;k=i;tK(a[237104]&1);l=c[59454]|0;c[59352]=l;m=b&15;do{if((m|0)==1|(m|0)==4){n=b>>4;o=(n|0)<0?0:n;n=(o|0)>100?20:(o|0)/5&-1;if((l|0)==(-1|0)|(l|0)==0){p=n;q=l;break}p=40-n|0;q=l}else if((m|0)==2|(m|0)==5){n=b>>4;p=(n|0)<0?41:n+41|0;q=7}else{p=20;q=7}}while(0);b=(c[59242]|0)+d|0;d=((c[(c[3524]|0)+12>>2]|0)-e|0)+(c[59240]|0)|0;e=a[237432]&1;m=c[59356]|0;n=c[59354]|0;o=c[59346]|0;r=+g[59360];s=b+f|0;f=d-j|0;cf(c[10030]|0,173808,(v=i,i=i+208|0,c[v>>2]=2,c[v+8>>2]=e,c[v+16>>2]=m,c[v+24>>2]=n,c[v+32>>2]=l,c[v+40>>2]=q,c[v+48>>2]=o,c[v+56>>2]=0,c[v+64>>2]=p,h[v+72>>3]=r,c[v+80>>2]=0,c[v+88>>2]=0,c[v+96>>2]=0,c[v+104>>2]=0,c[v+112>>2]=0,c[v+120>>2]=5,c[v+128>>2]=b,c[v+136>>2]=d,c[v+144>>2]=s,c[v+152>>2]=d,c[v+160>>2]=s,c[v+168>>2]=f,c[v+176>>2]=b,c[v+184>>2]=f,c[v+192>>2]=b,c[v+200>>2]=d,v)|0);i=k;return}function or(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0;d=i;if((b|0)==0){e=128;i=d;return e|0}tK(a[237104]&1);if(a[237136]|0){f=c[m>>2]|0;aI(173976,34,1,f|0);e=0;i=d;return e|0}a[237136]=1;f=a[237032]^1;g=c[5163]|0;if(!((g|0)==103|f)){if((c[5169]|0)<=0){e=0;i=d;return e|0}j=b+32|0;b=0;while(1){k=c[j>>2]|0;l=~~(+h[k+(b*24&-1)>>3]*255.0+.5);n=~~(+h[k+(b*24&-1)+8>>3]*255.0+.5);o=~~(+h[k+(b*24&-1)+16>>3]*255.0+.5);cf(c[10030]|0,174016,(v=i,i=i+40|0,c[v>>2]=0,c[v+8>>2]=b+32,c[v+16>>2]=l,c[v+24>>2]=n,c[v+32>>2]=o,v)|0);o=b+1|0;if((o|0)<(c[5169]|0)){b=o}else{e=0;break}}i=d;return e|0}if((g|0)==114&f){f=c[m>>2]|0;aI(174040,57,1,f|0)}f=c[5169]|0;if((f|0)>0){p=0;q=f}else{e=0;i=d;return e|0}while(1){f=~~(+(p|0)*255.0/+(q-1|0)+.5);cf(c[10030]|0,174016,(v=i,i=i+40|0,c[v>>2]=0,c[v+8>>2]=p+32,c[v+16>>2]=f,c[v+24>>2]=f,c[v+32>>2]=f,v)|0);f=p+1|0;g=c[5169]|0;if((f|0)<(g|0)){p=f;q=g}else{e=0;break}}i=d;return e|0}function os(b){b=b|0;var d=0.0,e=0,f=0,g=0;d=+h[b+8>>3];e=c[b>>2]|0;if((e|0)==5){if(d>0.0){f=~~(d*+(c[5169]|0))}else{f=0}if(!(a[237136]|0)){g=c[m>>2]|0;aI(174104,29,1,g|0)}g=(f|0)>127?159:f+32|0;if((c[59454]|0)==(g|0)){return}tK(a[237104]&1);c[59454]=g;return}else if((e|0)==1){ol(c[b+4>>2]|0);return}else{return}}function ot(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0;e=i;tK(a[237104]&1);f=c[59356]|0;j=c[59454]|0;k=c[59346]|0;l=+g[59360];cf(c[10030]|0,174184,(v=i,i=i+128|0,c[v>>2]=2,c[v+8>>2]=3,c[v+16>>2]=f,c[v+24>>2]=0,c[v+32>>2]=j,c[v+40>>2]=j,c[v+48>>2]=k,c[v+56>>2]=0,c[v+64>>2]=20,h[v+72>>3]=l,c[v+80>>2]=0,c[v+88>>2]=0,c[v+96>>2]=0,c[v+104>>2]=0,c[v+112>>2]=0,c[v+120>>2]=b+1,v)|0);k=c[10030]|0;j=c[59242]|0;if((b|0)>0){f=b-1|0;m=0;n=0;o=k;p=j;while(1){q=((c[59240]|0)+(c[(c[3524]|0)+12>>2]|0)|0)-(c[d+(m*12&-1)+4>>2]|0)|0;cf(o|0,174136,(v=i,i=i+16|0,c[v>>2]=(c[d+(m*12&-1)>>2]|0)+p,c[v+8>>2]=q,v)|0);if((n|0)<5|(m|0)==(f|0)){r=n+1|0}else{q=c[10030]|0;aI(84248,2,1,q|0);r=0}q=m+1|0;s=c[10030]|0;t=c[59242]|0;if((q|0)<(b|0)){m=q;n=r;o=s;p=t}else{u=r;w=s;x=t;break}}}else{u=0;w=k;x=j}j=((c[59240]|0)+(c[(c[3524]|0)+12>>2]|0)|0)-(c[d+4>>2]|0)|0;cf(w|0,174136,(v=i,i=i+16|0,c[v>>2]=(c[d>>2]|0)+x,c[v+8>>2]=j,v)|0);if((u|0)==-1){i=e;return}aF(10,c[10030]|0);i=e;return}function ou(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;if((b|0)==6){tK(a[237104]&1);e=c[10030]|0;aF(54,e|0);e=c[10030]|0;f=c[59242]|0;g=(c[7938]|0)+f|0;h=(c[59240]|0)+(c[(c[3524]|0)+12>>2]|0)|0;j=h-(c[7941]|0)|0;k=(c[7939]|0)+f|0;f=h-(c[7940]|0)|0;cf(e|0,174424,(v=i,i=i+32|0,c[v>>2]=g,c[v+8>>2]=j,c[v+16>>2]=k,c[v+24>>2]=f,v)|0);f=c[10030]|0;k=(c[59362]|0)+1|0;c[59362]=k;cf(f|0,174400,(v=i,i=i+8|0,c[v>>2]=k,v)|0);i=d;return}else if((b|0)==7){tK(a[237104]&1);cf(c[10030]|0,174320,(v=i,i=i+8|0,c[v>>2]=c[59362],v)|0);aI(174256,3,1,c[10030]|0);i=d;return}else if((b|0)==0){c[59362]=0;i=d;return}else{i=d;return}}function ov(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0;a=i;b=ut(28)|0;do{if((b|0)==0){gk();d=ut(28)|0;if((d|0)!=0){e=d;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{e=b}}while(0);b=e;c[e>>2]=0;c[e+12>>2]=7;c[e+4>>2]=2048;c[e+8>>2]=0;d=ut(8192)|0;do{if((d|0)==0){gk();f=ut(8192)|0;if((f|0)!=0){g=f;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{g=d}}while(0);d=e+16|0;c[d>>2]=g;g=ut(8192)|0;do{if((g|0)==0){gk();f=ut(8192)|0;if((f|0)!=0){h=f;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{h=g}}while(0);g=e+20|0;c[g>>2]=h;h=ut(2048)|0;do{if((h|0)==0){gk();f=ut(2048)|0;if((f|0)!=0){j=f;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{j=h}}while(0);c[e+24>>2]=j;do{if((c[d>>2]|0)==0){k=0}else{if((c[g>>2]|0)==0){k=0;break}uE(j|0,0,2048);k=b}}while(0);c[59112]=k;c[59113]=k;k=ut(28)|0;do{if((k|0)==0){gk();b=ut(28)|0;if((b|0)!=0){l=b;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{l=k}}while(0);k=l;c[l>>2]=2;c[l+12>>2]=1;c[l+4>>2]=3072;c[l+8>>2]=0;b=ut(12288)|0;do{if((b|0)==0){gk();j=ut(12288)|0;if((j|0)!=0){m=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{m=b}}while(0);b=l+16|0;c[b>>2]=m;m=ut(12288)|0;do{if((m|0)==0){gk();j=ut(12288)|0;if((j|0)!=0){n=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{n=m}}while(0);m=l+20|0;c[m>>2]=n;n=ut(3072)|0;do{if((n|0)==0){gk();j=ut(3072)|0;if((j|0)!=0){o=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{o=n}}while(0);c[l+24>>2]=o;do{if((c[b>>2]|0)==0){p=0}else{if((c[m>>2]|0)==0){p=0;break}uE(o|0,0,3072);p=k}}while(0);c[59114]=p;c[59115]=c[59112];p=ut(28)|0;do{if((p|0)==0){gk();k=ut(28)|0;if((k|0)!=0){q=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{q=p}}while(0);p=q;c[q>>2]=4;c[q+12>>2]=5;c[q+4>>2]=1024;c[q+8>>2]=0;k=ut(4096)|0;do{if((k|0)==0){gk();o=ut(4096)|0;if((o|0)!=0){r=o;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{r=k}}while(0);k=q+16|0;c[k>>2]=r;r=ut(4096)|0;do{if((r|0)==0){gk();o=ut(4096)|0;if((o|0)!=0){s=o;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{s=r}}while(0);r=q+20|0;c[r>>2]=s;s=ut(1024)|0;do{if((s|0)==0){gk();o=ut(1024)|0;if((o|0)!=0){t=o;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{t=s}}while(0);c[q+24>>2]=t;do{if((c[k>>2]|0)==0){u=0}else{if((c[r>>2]|0)==0){u=0;break}uE(t|0,0,1024);u=p}}while(0);c[59116]=u;u=ut(28)|0;do{if((u|0)==0){gk();p=ut(28)|0;if((p|0)!=0){w=p;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{w=u}}while(0);u=w;c[w>>2]=5;c[w+12>>2]=6;c[w+4>>2]=256;c[w+8>>2]=0;p=ut(1024)|0;do{if((p|0)==0){gk();t=ut(1024)|0;if((t|0)!=0){x=t;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{x=p}}while(0);p=w+16|0;c[p>>2]=x;x=ut(1024)|0;do{if((x|0)==0){gk();t=ut(1024)|0;if((t|0)!=0){y=t;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{y=x}}while(0);x=w+20|0;c[x>>2]=y;y=ut(256)|0;do{if((y|0)==0){gk();t=ut(256)|0;if((t|0)!=0){z=t;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{z=y}}while(0);c[w+24>>2]=z;do{if((c[p>>2]|0)==0){A=0}else{if((c[x>>2]|0)==0){A=0;break}uE(z|0,0,256);A=u}}while(0);c[59117]=A;A=ut(28)|0;do{if((A|0)==0){gk();u=ut(28)|0;if((u|0)!=0){B=u;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{B=A}}while(0);A=B;c[B>>2]=6;c[B+12>>2]=8;c[B+4>>2]=256;c[B+8>>2]=0;u=ut(1024)|0;do{if((u|0)==0){gk();z=ut(1024)|0;if((z|0)!=0){C=z;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{C=u}}while(0);u=B+16|0;c[u>>2]=C;C=ut(1024)|0;do{if((C|0)==0){gk();z=ut(1024)|0;if((z|0)!=0){D=z;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{D=C}}while(0);C=B+20|0;c[C>>2]=D;D=ut(256)|0;do{if((D|0)==0){gk();z=ut(256)|0;if((z|0)!=0){E=z;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{E=D}}while(0);c[B+24>>2]=E;do{if((c[u>>2]|0)==0){F=0}else{if((c[C>>2]|0)==0){F=0;break}uE(E|0,0,256);F=A}}while(0);c[59118]=F;F=ut(28)|0;do{if((F|0)==0){gk();A=ut(28)|0;if((A|0)!=0){G=A;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{G=F}}while(0);F=G;c[G>>2]=7;c[G+12>>2]=9;c[G+4>>2]=128;c[G+8>>2]=0;A=ut(512)|0;do{if((A|0)==0){gk();E=ut(512)|0;if((E|0)!=0){H=E;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{H=A}}while(0);A=G+16|0;c[A>>2]=H;H=ut(512)|0;do{if((H|0)==0){gk();E=ut(512)|0;if((E|0)!=0){I=E;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{I=H}}while(0);H=G+20|0;c[H>>2]=I;I=ut(128)|0;do{if((I|0)==0){gk();E=ut(128)|0;if((E|0)!=0){J=E;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{J=I}}while(0);c[G+24>>2]=J;do{if((c[A>>2]|0)==0){K=0}else{if((c[H>>2]|0)==0){K=0;break}uE(J|0,0,128);K=F}}while(0);c[59119]=K;K=ut(28)|0;do{if((K|0)==0){gk();F=ut(28)|0;if((F|0)!=0){L=F;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{L=K}}while(0);K=L;c[L>>2]=8;c[L+12>>2]=10;c[L+4>>2]=128;c[L+8>>2]=0;F=ut(512)|0;do{if((F|0)==0){gk();J=ut(512)|0;if((J|0)!=0){M=J;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{M=F}}while(0);F=L+16|0;c[F>>2]=M;M=ut(512)|0;do{if((M|0)==0){gk();J=ut(512)|0;if((J|0)!=0){N=J;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{N=M}}while(0);M=L+20|0;c[M>>2]=N;N=ut(128)|0;do{if((N|0)==0){gk();J=ut(128)|0;if((J|0)!=0){O=J;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{O=N}}while(0);c[L+24>>2]=O;do{if((c[F>>2]|0)==0){P=0}else{if((c[M>>2]|0)==0){P=0;break}uE(O|0,0,128);P=K}}while(0);c[59120]=P;P=ut(28)|0;do{if((P|0)==0){gk();K=ut(28)|0;if((K|0)!=0){Q=K;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{Q=P}}while(0);P=Q;c[Q>>2]=9;c[Q+12>>2]=6;c[Q+4>>2]=64;c[Q+8>>2]=0;K=ut(256)|0;do{if((K|0)==0){gk();O=ut(256)|0;if((O|0)!=0){R=O;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{R=K}}while(0);K=Q+16|0;c[K>>2]=R;R=ut(256)|0;do{if((R|0)==0){gk();O=ut(256)|0;if((O|0)!=0){S=O;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{S=R}}while(0);R=Q+20|0;c[R>>2]=S;S=ut(64)|0;do{if((S|0)==0){gk();O=ut(64)|0;if((O|0)!=0){T=O;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{T=S}}while(0);c[Q+24>>2]=T;do{if((c[K>>2]|0)==0){U=0}else{if((c[R>>2]|0)==0){U=0;break}uE(T|0,0,64);U=P}}while(0);c[59121]=U;U=ut(28)|0;do{if((U|0)==0){gk();P=ut(28)|0;if((P|0)!=0){V=P;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{V=U}}while(0);U=V;c[V>>2]=10;c[V+12>>2]=4;c[V+4>>2]=64;c[V+8>>2]=0;P=ut(256)|0;do{if((P|0)==0){gk();T=ut(256)|0;if((T|0)!=0){W=T;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{W=P}}while(0);P=V+16|0;c[P>>2]=W;W=ut(256)|0;do{if((W|0)==0){gk();T=ut(256)|0;if((T|0)!=0){X=T;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{X=W}}while(0);W=V+20|0;c[W>>2]=X;X=ut(64)|0;do{if((X|0)==0){gk();T=ut(64)|0;if((T|0)!=0){Y=T;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{Y=X}}while(0);c[V+24>>2]=Y;do{if((c[P>>2]|0)==0){Z=0}else{if((c[W>>2]|0)==0){Z=0;break}uE(Y|0,0,64);Z=U}}while(0);c[59122]=Z;Z=ut(28)|0;do{if((Z|0)==0){gk();U=ut(28)|0;if((U|0)!=0){_=U;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{_=Z}}while(0);Z=_;c[_>>2]=11;c[_+12>>2]=11;c[_+4>>2]=512;c[_+8>>2]=0;U=ut(2048)|0;do{if((U|0)==0){gk();Y=ut(2048)|0;if((Y|0)!=0){$=Y;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{$=U}}while(0);U=_+16|0;c[U>>2]=$;$=ut(2048)|0;do{if(($|0)==0){gk();Y=ut(2048)|0;if((Y|0)!=0){aa=Y;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{aa=$}}while(0);$=_+20|0;c[$>>2]=aa;aa=ut(512)|0;do{if((aa|0)==0){gk();Y=ut(512)|0;if((Y|0)!=0){ab=Y;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{ab=aa}}while(0);c[_+24>>2]=ab;if((c[U>>2]|0)==0){ac=0;c[59123]=ac;ad=c[59122]|0;c[59128]=ad;c[59108]=0;ae=c[10030]|0;af=aI(174480,10,1,ae|0)|0;ag=c[10030]|0;ah=aD(ag|0)|0;i=a;return}if((c[$>>2]|0)==0){ac=0;c[59123]=ac;ad=c[59122]|0;c[59128]=ad;c[59108]=0;ae=c[10030]|0;af=aI(174480,10,1,ae|0)|0;ag=c[10030]|0;ah=aD(ag|0)|0;i=a;return}uE(ab|0,0,512);ac=Z;c[59123]=ac;ad=c[59122]|0;c[59128]=ad;c[59108]=0;ae=c[10030]|0;af=aI(174480,10,1,ae|0)|0;ag=c[10030]|0;ah=aD(ag|0)|0;i=a;return}function ow(a){a=a|0;var b=0,d=0;b=(a|0)<-2?-2:a;if((b|0)>8){d=(b|0)%9&-1}else{d=b}b=c[236448+(d+2<<2)>>2]|0;if((b|0)==(c[59128]|0)){c[59106]=(c[59106]|0)+1;return}else{c[59128]=b;return}}function ox(){var a=0,b=0;a=2;do{b=c[236448+(a<<2)>>2]|0;uu(c[b+16>>2]|0);uu(c[b+20>>2]|0);uu(c[b+24>>2]|0);uu(b);a=a+1|0;}while((a|0)<12);return}function oy(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;a=c[59112]|0;b=c[59108]|0;if((c[a+12>>2]|0)==(b|0)){tJ(a);d=c[59108]|0}else{d=b}b=c[59113]|0;if((c[b+12>>2]|0)==(d|0)){tJ(b);e=c[59108]|0}else{e=d}d=c[59114]|0;if((c[d+12>>2]|0)==(e|0)){tJ(d);f=c[59108]|0}else{f=e}e=c[59115]|0;if((c[e+12>>2]|0)==(f|0)){tJ(e);g=c[59108]|0}else{g=f}f=c[59116]|0;if((c[f+12>>2]|0)==(g|0)){tJ(f);h=c[59108]|0}else{h=g}g=c[59117]|0;if((c[g+12>>2]|0)==(h|0)){tJ(g);i=c[59108]|0}else{i=h}h=c[59118]|0;if((c[h+12>>2]|0)==(i|0)){tJ(h);j=c[59108]|0}else{j=i}i=c[59119]|0;if((c[i+12>>2]|0)==(j|0)){tJ(i);k=c[59108]|0}else{k=j}j=c[59120]|0;if((c[j+12>>2]|0)==(k|0)){tJ(j);l=c[59108]|0}else{l=k}k=c[59121]|0;if((c[k+12>>2]|0)==(l|0)){tJ(k);m=c[59108]|0}else{m=l}l=c[59122]|0;if((c[l+12>>2]|0)==(m|0)){tJ(l);n=c[59108]|0}else{n=m}m=c[59123]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m);o=0}else{o=0}do{m=236448+(o<<2)|0;tJ(c[m>>2]|0);n=c[(c[m>>2]|0)+12>>2]|0;m=c[59112]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59113]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59114]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59115]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59116]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59117]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59118]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59119]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59120]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59121]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59122]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}m=c[59123]|0;if((c[m+12>>2]|0)==(n|0)){tJ(m)}o=o+1|0;}while((o|0)<12);aI(174496,5,1,c[10030]|0);aD(c[10030]|0);return}function oz(){aI(174504,8,1,c[10030]|0);c[59096]=-200;c[59098]=-200;c[59124]=800;c[59126]=800;a[236440]=1;c[59104]=0;c[59102]=0;c[59106]=0;c[59100]=0;return}function oA(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=c[59128]|0;f=c[e+8>>2]|0;do{if((f|0)>0){g=f-1|0;h=(c[e+16>>2]|0)+(g<<2)|0;do{if((c[h>>2]|0)==(b|0)){if((c[(c[e+20>>2]|0)+(g<<2)>>2]|0)!=(d|0)){break}c[59104]=(c[59104]|0)+1;return}}while(0);if((a[(c[e+24>>2]|0)+g|0]&1)==0){break}c[h>>2]=b;i=c[59128]|0;c[(c[i+20>>2]|0)+((c[i+8>>2]|0)-1<<2)>>2]=d;c[59104]=(c[59104]|0)+1;return}}while(0);if((f|0)==(c[e+4>>2]|0)){tI();i=c[59128]|0;j=i;k=c[i+8>>2]|0}else{j=e;k=f}c[(c[j+16>>2]|0)+(k<<2)>>2]=b;b=c[59128]|0;c[(c[b+20>>2]|0)+(c[b+8>>2]<<2)>>2]=d;d=c[59128]|0;a[(c[d+24>>2]|0)+(c[d+8>>2]|0)|0]=1;d=(c[59128]|0)+8|0;c[d>>2]=(c[d>>2]|0)+1;return}function oB(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=c[59128]|0;f=c[e+8>>2]|0;do{if((f|0)>2){g=f-1|0;if((c[(c[e+16>>2]|0)+(g<<2)>>2]|0)!=(b|0)){break}if((c[(c[e+20>>2]|0)+(g<<2)>>2]|0)!=(d|0)){break}if((a[(c[e+24>>2]|0)+g|0]&1)!=0){break}c[59102]=(c[59102]|0)+1;return}}while(0);if((f|0)==(c[e+4>>2]|0)){tI();g=c[59128]|0;h=g;i=c[g+8>>2]|0}else{h=e;i=f}c[(c[h+16>>2]|0)+(i<<2)>>2]=b;b=c[59128]|0;c[(c[b+20>>2]|0)+(c[b+8>>2]<<2)>>2]=d;d=c[59128]|0;a[(c[d+24>>2]|0)+(c[d+8>>2]|0)|0]=0;d=(c[59128]|0)+8|0;c[d>>2]=(c[d>>2]|0)+1;return}function oC(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+32|0;if((a[e]|0)==0){i=f;return}aI(174736,3,1,c[10030]|0);if(!(a[236440]|0)){g=c[10030]|0;aF(115,g|0);a[236440]=1}g=f+16|0;h=d-(c[59124]|0)|0;be(g|0,174720,(v=i,i=i+16|0,c[v>>2]=b-(c[59126]|0),c[v+8>>2]=h,v)|0);h=f|0;be(h|0,174712,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);j=uA(g|0)|0;k=j>>>0<(uA(h|0)|0)>>>0;j=c[10030]|0;if(k){aK(g|0,j|0)}else{aK(h|0,j|0)}aK(e|0,c[10030]|0);c[59126]=b;c[59098]=b;c[59124]=d;c[59096]=d;i=f;return}function oD(a){a=a|0;var b=0;b=i;cf(c[10030]|0,174744,(v=i,i=i+8|0,c[v>>2]=(a|0)!=0?2:1,v)|0);i=b;return 1}function oE(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0;f=c[59128]|0;g=c[f+12>>2]|0;h=(g|0)!=1;do{if(h){i=c[59114]|0;if((i|0)==(f|0)){c[59106]=(c[59106]|0)+1;j=g;k=f;break}else{c[59128]=i;j=g;k=i;break}}else{j=0;k=f}}while(0);if((e|0)<0){f=c[59123]|0;c[59128]=f;g=c[f+8>>2]|0;do{if((g|0)>2){i=g-1|0;if((c[(c[f+16>>2]|0)+(i<<2)>>2]|0)!=(b|0)){l=14737;break}if((c[(c[f+20>>2]|0)+(i<<2)>>2]|0)!=(d|0)){l=14737;break}if((a[(c[f+24>>2]|0)+i|0]&1)!=0){l=14737;break}c[59102]=(c[59102]|0)+1}else{l=14737}}while(0);if((l|0)==14737){if((g|0)==(c[f+4>>2]|0)){tI();i=c[59128]|0;m=i;n=c[i+8>>2]|0}else{m=f;n=g}c[(c[m+16>>2]|0)+(n<<2)>>2]=b;n=c[59128]|0;c[(c[n+20>>2]|0)+(c[n+8>>2]<<2)>>2]=d;n=c[59128]|0;a[(c[n+24>>2]|0)+(c[n+8>>2]|0)|0]=0;n=(c[59128]|0)+8|0;c[n>>2]=(c[n>>2]|0)+1}c[59128]=k}k=(e|0)%9&-1;L19947:do{if((k|0)==6){e=b+2|0;n=d+2|0;oA(e,n);m=b-2|0;g=d-2|0;f=c[59128]|0;i=c[f+8>>2]|0;do{if((i|0)>2){o=i-1|0;if((c[(c[f+16>>2]|0)+(o<<2)>>2]|0)!=(m|0)){l=14891;break}if((c[(c[f+20>>2]|0)+(o<<2)>>2]|0)!=(g|0)){l=14891;break}if((a[(c[f+24>>2]|0)+o|0]&1)!=0){l=14891;break}c[59102]=(c[59102]|0)+1}else{l=14891}}while(0);if((l|0)==14891){if((i|0)==(c[f+4>>2]|0)){tI();o=c[59128]|0;p=o;q=c[o+8>>2]|0}else{p=f;q=i}c[(c[p+16>>2]|0)+(q<<2)>>2]=m;o=c[59128]|0;c[(c[o+20>>2]|0)+(c[o+8>>2]<<2)>>2]=g;o=c[59128]|0;a[(c[o+24>>2]|0)+(c[o+8>>2]|0)|0]=0;o=(c[59128]|0)+8|0;c[o>>2]=(c[o>>2]|0)+1}oA(m,n);o=c[59128]|0;r=c[o+8>>2]|0;do{if((r|0)>2){s=r-1|0;if((c[(c[o+16>>2]|0)+(s<<2)>>2]|0)!=(e|0)){break}if((c[(c[o+20>>2]|0)+(s<<2)>>2]|0)!=(g|0)){break}if((a[(c[o+24>>2]|0)+s|0]&1)!=0){break}c[59102]=(c[59102]|0)+1;break L19947}}while(0);if((r|0)==(c[o+4>>2]|0)){tI();n=c[59128]|0;t=n;u=c[n+8>>2]|0}else{t=o;u=r}c[(c[t+16>>2]|0)+(u<<2)>>2]=e;n=c[59128]|0;c[(c[n+20>>2]|0)+(c[n+8>>2]<<2)>>2]=g;n=c[59128]|0;a[(c[n+24>>2]|0)+(c[n+8>>2]|0)|0]=0;n=(c[59128]|0)+8|0;c[n>>2]=(c[n>>2]|0)+1}else if((k|0)==2){n=b-2|0;oA(n,d);m=b+2|0;i=d+2|0;f=c[59128]|0;s=c[f+8>>2]|0;do{if((s|0)>2){v=s-1|0;if((c[(c[f+16>>2]|0)+(v<<2)>>2]|0)!=(m|0)){l=14795;break}if((c[(c[f+20>>2]|0)+(v<<2)>>2]|0)!=(i|0)){l=14795;break}if((a[(c[f+24>>2]|0)+v|0]&1)!=0){l=14795;break}c[59102]=(c[59102]|0)+1;w=f}else{l=14795}}while(0);if((l|0)==14795){if((s|0)==(c[f+4>>2]|0)){tI();g=c[59128]|0;x=g;y=c[g+8>>2]|0}else{x=f;y=s}c[(c[x+16>>2]|0)+(y<<2)>>2]=m;g=c[59128]|0;c[(c[g+20>>2]|0)+(c[g+8>>2]<<2)>>2]=i;g=c[59128]|0;a[(c[g+24>>2]|0)+(c[g+8>>2]|0)|0]=0;g=(c[59128]|0)+8|0;c[g>>2]=(c[g>>2]|0)+1;w=c[59128]|0}g=d-2|0;e=c[w+8>>2]|0;do{if((e|0)>2){r=e-1|0;if((c[(c[w+16>>2]|0)+(r<<2)>>2]|0)!=(m|0)){l=14803;break}if((c[(c[w+20>>2]|0)+(r<<2)>>2]|0)!=(g|0)){l=14803;break}if((a[(c[w+24>>2]|0)+r|0]&1)!=0){l=14803;break}c[59102]=(c[59102]|0)+1;z=w}else{l=14803}}while(0);if((l|0)==14803){if((e|0)==(c[w+4>>2]|0)){tI();i=c[59128]|0;A=i;B=c[i+8>>2]|0}else{A=w;B=e}c[(c[A+16>>2]|0)+(B<<2)>>2]=m;i=c[59128]|0;c[(c[i+20>>2]|0)+(c[i+8>>2]<<2)>>2]=g;i=c[59128]|0;a[(c[i+24>>2]|0)+(c[i+8>>2]|0)|0]=0;i=(c[59128]|0)+8|0;c[i>>2]=(c[i>>2]|0)+1;z=c[59128]|0}i=c[z+8>>2]|0;do{if((i|0)>2){s=i-1|0;if((c[(c[z+16>>2]|0)+(s<<2)>>2]|0)!=(n|0)){break}if((c[(c[z+20>>2]|0)+(s<<2)>>2]|0)!=(d|0)){break}if((a[(c[z+24>>2]|0)+s|0]&1)!=0){break}c[59102]=(c[59102]|0)+1;break L19947}}while(0);if((i|0)==(c[z+4>>2]|0)){tI();g=c[59128]|0;C=g;D=c[g+8>>2]|0}else{C=z;D=i}c[(c[C+16>>2]|0)+(D<<2)>>2]=n;g=c[59128]|0;c[(c[g+20>>2]|0)+(c[g+8>>2]<<2)>>2]=d;g=c[59128]|0;a[(c[g+24>>2]|0)+(c[g+8>>2]|0)|0]=0;g=(c[59128]|0)+8|0;c[g>>2]=(c[g>>2]|0)+1}else if((k|0)==3){g=b+2|0;oA(g,d);m=b-2|0;e=d+2|0;s=c[59128]|0;f=c[s+8>>2]|0;do{if((f|0)>2){r=f-1|0;if((c[(c[s+16>>2]|0)+(r<<2)>>2]|0)!=(m|0)){l=14819;break}if((c[(c[s+20>>2]|0)+(r<<2)>>2]|0)!=(e|0)){l=14819;break}if((a[(c[s+24>>2]|0)+r|0]&1)!=0){l=14819;break}c[59102]=(c[59102]|0)+1;E=s}else{l=14819}}while(0);if((l|0)==14819){if((f|0)==(c[s+4>>2]|0)){tI();n=c[59128]|0;F=n;G=c[n+8>>2]|0}else{F=s;G=f}c[(c[F+16>>2]|0)+(G<<2)>>2]=m;n=c[59128]|0;c[(c[n+20>>2]|0)+(c[n+8>>2]<<2)>>2]=e;n=c[59128]|0;a[(c[n+24>>2]|0)+(c[n+8>>2]|0)|0]=0;n=(c[59128]|0)+8|0;c[n>>2]=(c[n>>2]|0)+1;E=c[59128]|0}n=d-2|0;i=c[E+8>>2]|0;do{if((i|0)>2){r=i-1|0;if((c[(c[E+16>>2]|0)+(r<<2)>>2]|0)!=(m|0)){l=14827;break}if((c[(c[E+20>>2]|0)+(r<<2)>>2]|0)!=(n|0)){l=14827;break}if((a[(c[E+24>>2]|0)+r|0]&1)!=0){l=14827;break}c[59102]=(c[59102]|0)+1;H=E}else{l=14827}}while(0);if((l|0)==14827){if((i|0)==(c[E+4>>2]|0)){tI();e=c[59128]|0;I=e;J=c[e+8>>2]|0}else{I=E;J=i}c[(c[I+16>>2]|0)+(J<<2)>>2]=m;e=c[59128]|0;c[(c[e+20>>2]|0)+(c[e+8>>2]<<2)>>2]=n;e=c[59128]|0;a[(c[e+24>>2]|0)+(c[e+8>>2]|0)|0]=0;e=(c[59128]|0)+8|0;c[e>>2]=(c[e>>2]|0)+1;H=c[59128]|0}e=c[H+8>>2]|0;do{if((e|0)>2){f=e-1|0;if((c[(c[H+16>>2]|0)+(f<<2)>>2]|0)!=(g|0)){break}if((c[(c[H+20>>2]|0)+(f<<2)>>2]|0)!=(d|0)){break}if((a[(c[H+24>>2]|0)+f|0]&1)!=0){break}c[59102]=(c[59102]|0)+1;break L19947}}while(0);if((e|0)==(c[H+4>>2]|0)){tI();n=c[59128]|0;K=n;L=c[n+8>>2]|0}else{K=H;L=e}c[(c[K+16>>2]|0)+(L<<2)>>2]=g;n=c[59128]|0;c[(c[n+20>>2]|0)+(c[n+8>>2]<<2)>>2]=d;n=c[59128]|0;a[(c[n+24>>2]|0)+(c[n+8>>2]|0)|0]=0;n=(c[59128]|0)+8|0;c[n>>2]=(c[n>>2]|0)+1}else if((k|0)==0){n=b-2|0;m=d-2|0;oA(n,m);i=d+2|0;f=c[59128]|0;s=c[f+8>>2]|0;do{if((s|0)>2){r=s-1|0;if((c[(c[f+16>>2]|0)+(r<<2)>>2]|0)!=(b|0)){l=14747;break}if((c[(c[f+20>>2]|0)+(r<<2)>>2]|0)!=(i|0)){l=14747;break}if((a[(c[f+24>>2]|0)+r|0]&1)!=0){l=14747;break}c[59102]=(c[59102]|0)+1;M=f}else{l=14747}}while(0);if((l|0)==14747){if((s|0)==(c[f+4>>2]|0)){tI();g=c[59128]|0;N=g;O=c[g+8>>2]|0}else{N=f;O=s}c[(c[N+16>>2]|0)+(O<<2)>>2]=b;g=c[59128]|0;c[(c[g+20>>2]|0)+(c[g+8>>2]<<2)>>2]=i;g=c[59128]|0;a[(c[g+24>>2]|0)+(c[g+8>>2]|0)|0]=0;g=(c[59128]|0)+8|0;c[g>>2]=(c[g>>2]|0)+1;M=c[59128]|0}g=b+2|0;e=c[M+8>>2]|0;do{if((e|0)>2){r=e-1|0;if((c[(c[M+16>>2]|0)+(r<<2)>>2]|0)!=(g|0)){l=14755;break}if((c[(c[M+20>>2]|0)+(r<<2)>>2]|0)!=(m|0)){l=14755;break}if((a[(c[M+24>>2]|0)+r|0]&1)!=0){l=14755;break}c[59102]=(c[59102]|0)+1;P=M}else{l=14755}}while(0);if((l|0)==14755){if((e|0)==(c[M+4>>2]|0)){tI();i=c[59128]|0;Q=i;R=c[i+8>>2]|0}else{Q=M;R=e}c[(c[Q+16>>2]|0)+(R<<2)>>2]=g;i=c[59128]|0;c[(c[i+20>>2]|0)+(c[i+8>>2]<<2)>>2]=m;i=c[59128]|0;a[(c[i+24>>2]|0)+(c[i+8>>2]|0)|0]=0;i=(c[59128]|0)+8|0;c[i>>2]=(c[i>>2]|0)+1;P=c[59128]|0}i=c[P+8>>2]|0;do{if((i|0)>2){s=i-1|0;if((c[(c[P+16>>2]|0)+(s<<2)>>2]|0)!=(n|0)){break}if((c[(c[P+20>>2]|0)+(s<<2)>>2]|0)!=(m|0)){break}if((a[(c[P+24>>2]|0)+s|0]&1)!=0){break}c[59102]=(c[59102]|0)+1;break L19947}}while(0);if((i|0)==(c[P+4>>2]|0)){tI();g=c[59128]|0;S=g;T=c[g+8>>2]|0}else{S=P;T=i}c[(c[S+16>>2]|0)+(T<<2)>>2]=n;g=c[59128]|0;c[(c[g+20>>2]|0)+(c[g+8>>2]<<2)>>2]=m;g=c[59128]|0;a[(c[g+24>>2]|0)+(c[g+8>>2]|0)|0]=0;g=(c[59128]|0)+8|0;c[g>>2]=(c[g>>2]|0)+1}else if((k|0)==5){oA(b,d+2|0);g=d-2|0;e=c[59128]|0;s=c[e+8>>2]|0;do{if((s|0)>2){f=s-1|0;if((c[(c[e+16>>2]|0)+(f<<2)>>2]|0)!=(b|0)){l=14875;break}if((c[(c[e+20>>2]|0)+(f<<2)>>2]|0)!=(g|0)){l=14875;break}if((a[(c[e+24>>2]|0)+f|0]&1)!=0){l=14875;break}c[59102]=(c[59102]|0)+1}else{l=14875}}while(0);if((l|0)==14875){if((s|0)==(c[e+4>>2]|0)){tI();m=c[59128]|0;U=m;V=c[m+8>>2]|0}else{U=e;V=s}c[(c[U+16>>2]|0)+(V<<2)>>2]=b;m=c[59128]|0;c[(c[m+20>>2]|0)+(c[m+8>>2]<<2)>>2]=g;m=c[59128]|0;a[(c[m+24>>2]|0)+(c[m+8>>2]|0)|0]=0;m=(c[59128]|0)+8|0;c[m>>2]=(c[m>>2]|0)+1}oA(b-2|0,d);m=b+2|0;n=c[59128]|0;i=c[n+8>>2]|0;do{if((i|0)>2){f=i-1|0;if((c[(c[n+16>>2]|0)+(f<<2)>>2]|0)!=(m|0)){break}if((c[(c[n+20>>2]|0)+(f<<2)>>2]|0)!=(d|0)){break}if((a[(c[n+24>>2]|0)+f|0]&1)!=0){break}c[59102]=(c[59102]|0)+1;break L19947}}while(0);if((i|0)==(c[n+4>>2]|0)){tI();g=c[59128]|0;W=g;X=c[g+8>>2]|0}else{W=n;X=i}c[(c[W+16>>2]|0)+(X<<2)>>2]=m;g=c[59128]|0;c[(c[g+20>>2]|0)+(c[g+8>>2]<<2)>>2]=d;g=c[59128]|0;a[(c[g+24>>2]|0)+(c[g+8>>2]|0)|0]=0;g=(c[59128]|0)+8|0;c[g>>2]=(c[g>>2]|0)+1}else if((k|0)==1){g=b-2|0;s=d+2|0;oA(g,s);e=d-2|0;f=c[59128]|0;r=c[f+8>>2]|0;do{if((r|0)>2){o=r-1|0;if((c[(c[f+16>>2]|0)+(o<<2)>>2]|0)!=(b|0)){l=14771;break}if((c[(c[f+20>>2]|0)+(o<<2)>>2]|0)!=(e|0)){l=14771;break}if((a[(c[f+24>>2]|0)+o|0]&1)!=0){l=14771;break}c[59102]=(c[59102]|0)+1;Y=f}else{l=14771}}while(0);if((l|0)==14771){if((r|0)==(c[f+4>>2]|0)){tI();m=c[59128]|0;Z=m;_=c[m+8>>2]|0}else{Z=f;_=r}c[(c[Z+16>>2]|0)+(_<<2)>>2]=b;m=c[59128]|0;c[(c[m+20>>2]|0)+(c[m+8>>2]<<2)>>2]=e;m=c[59128]|0;a[(c[m+24>>2]|0)+(c[m+8>>2]|0)|0]=0;m=(c[59128]|0)+8|0;c[m>>2]=(c[m>>2]|0)+1;Y=c[59128]|0}m=b+2|0;i=c[Y+8>>2]|0;do{if((i|0)>2){n=i-1|0;if((c[(c[Y+16>>2]|0)+(n<<2)>>2]|0)!=(m|0)){l=14779;break}if((c[(c[Y+20>>2]|0)+(n<<2)>>2]|0)!=(s|0)){l=14779;break}if((a[(c[Y+24>>2]|0)+n|0]&1)!=0){l=14779;break}c[59102]=(c[59102]|0)+1;$=Y}else{l=14779}}while(0);if((l|0)==14779){if((i|0)==(c[Y+4>>2]|0)){tI();e=c[59128]|0;aa=e;ab=c[e+8>>2]|0}else{aa=Y;ab=i}c[(c[aa+16>>2]|0)+(ab<<2)>>2]=m;e=c[59128]|0;c[(c[e+20>>2]|0)+(c[e+8>>2]<<2)>>2]=s;e=c[59128]|0;a[(c[e+24>>2]|0)+(c[e+8>>2]|0)|0]=0;e=(c[59128]|0)+8|0;c[e>>2]=(c[e>>2]|0)+1;$=c[59128]|0}e=c[$+8>>2]|0;do{if((e|0)>2){r=e-1|0;if((c[(c[$+16>>2]|0)+(r<<2)>>2]|0)!=(g|0)){break}if((c[(c[$+20>>2]|0)+(r<<2)>>2]|0)!=(s|0)){break}if((a[(c[$+24>>2]|0)+r|0]&1)!=0){break}c[59102]=(c[59102]|0)+1;break L19947}}while(0);if((e|0)==(c[$+4>>2]|0)){tI();m=c[59128]|0;ac=m;ad=c[m+8>>2]|0}else{ac=$;ad=e}c[(c[ac+16>>2]|0)+(ad<<2)>>2]=g;m=c[59128]|0;c[(c[m+20>>2]|0)+(c[m+8>>2]<<2)>>2]=s;m=c[59128]|0;a[(c[m+24>>2]|0)+(c[m+8>>2]|0)|0]=0;m=(c[59128]|0)+8|0;c[m>>2]=(c[m>>2]|0)+1}else if((k|0)==4){m=b-2|0;i=d-2|0;oA(m,i);r=d+2|0;f=c[59128]|0;n=c[f+8>>2]|0;do{if((n|0)>2){o=n-1|0;if((c[(c[f+16>>2]|0)+(o<<2)>>2]|0)!=(m|0)){l=14843;break}if((c[(c[f+20>>2]|0)+(o<<2)>>2]|0)!=(r|0)){l=14843;break}if((a[(c[f+24>>2]|0)+o|0]&1)!=0){l=14843;break}c[59102]=(c[59102]|0)+1;ae=f}else{l=14843}}while(0);if((l|0)==14843){if((n|0)==(c[f+4>>2]|0)){tI();s=c[59128]|0;af=s;ag=c[s+8>>2]|0}else{af=f;ag=n}c[(c[af+16>>2]|0)+(ag<<2)>>2]=m;s=c[59128]|0;c[(c[s+20>>2]|0)+(c[s+8>>2]<<2)>>2]=r;s=c[59128]|0;a[(c[s+24>>2]|0)+(c[s+8>>2]|0)|0]=0;s=(c[59128]|0)+8|0;c[s>>2]=(c[s>>2]|0)+1;ae=c[59128]|0}s=b+2|0;g=c[ae+8>>2]|0;do{if((g|0)>2){e=g-1|0;if((c[(c[ae+16>>2]|0)+(e<<2)>>2]|0)!=(s|0)){l=14851;break}if((c[(c[ae+20>>2]|0)+(e<<2)>>2]|0)!=(r|0)){l=14851;break}if((a[(c[ae+24>>2]|0)+e|0]&1)!=0){l=14851;break}c[59102]=(c[59102]|0)+1;ah=ae}else{l=14851}}while(0);if((l|0)==14851){if((g|0)==(c[ae+4>>2]|0)){tI();n=c[59128]|0;ai=n;aj=c[n+8>>2]|0}else{ai=ae;aj=g}c[(c[ai+16>>2]|0)+(aj<<2)>>2]=s;n=c[59128]|0;c[(c[n+20>>2]|0)+(c[n+8>>2]<<2)>>2]=r;n=c[59128]|0;a[(c[n+24>>2]|0)+(c[n+8>>2]|0)|0]=0;n=(c[59128]|0)+8|0;c[n>>2]=(c[n>>2]|0)+1;ah=c[59128]|0}n=c[ah+8>>2]|0;do{if((n|0)>2){f=n-1|0;if((c[(c[ah+16>>2]|0)+(f<<2)>>2]|0)!=(s|0)){l=14859;break}if((c[(c[ah+20>>2]|0)+(f<<2)>>2]|0)!=(i|0)){l=14859;break}if((a[(c[ah+24>>2]|0)+f|0]&1)!=0){l=14859;break}c[59102]=(c[59102]|0)+1;ak=ah}else{l=14859}}while(0);if((l|0)==14859){if((n|0)==(c[ah+4>>2]|0)){tI();r=c[59128]|0;al=r;am=c[r+8>>2]|0}else{al=ah;am=n}c[(c[al+16>>2]|0)+(am<<2)>>2]=s;r=c[59128]|0;c[(c[r+20>>2]|0)+(c[r+8>>2]<<2)>>2]=i;r=c[59128]|0;a[(c[r+24>>2]|0)+(c[r+8>>2]|0)|0]=0;r=(c[59128]|0)+8|0;c[r>>2]=(c[r>>2]|0)+1;ak=c[59128]|0}r=c[ak+8>>2]|0;do{if((r|0)>2){g=r-1|0;if((c[(c[ak+16>>2]|0)+(g<<2)>>2]|0)!=(m|0)){break}if((c[(c[ak+20>>2]|0)+(g<<2)>>2]|0)!=(i|0)){break}if((a[(c[ak+24>>2]|0)+g|0]&1)!=0){break}c[59102]=(c[59102]|0)+1;break L19947}}while(0);if((r|0)==(c[ak+4>>2]|0)){tI();s=c[59128]|0;an=s;ao=c[s+8>>2]|0}else{an=ak;ao=r}c[(c[an+16>>2]|0)+(ao<<2)>>2]=m;s=c[59128]|0;c[(c[s+20>>2]|0)+(c[s+8>>2]<<2)>>2]=i;s=c[59128]|0;a[(c[s+24>>2]|0)+(c[s+8>>2]|0)|0]=0;s=(c[59128]|0)+8|0;c[s>>2]=(c[s>>2]|0)+1}else{s=d-2|0;oA(b,s);n=b-2|0;g=c[59128]|0;f=c[g+8>>2]|0;do{if((f|0)>2){e=f-1|0;if((c[(c[g+16>>2]|0)+(e<<2)>>2]|0)!=(n|0)){l=14907;break}if((c[(c[g+20>>2]|0)+(e<<2)>>2]|0)!=(d|0)){l=14907;break}if((a[(c[g+24>>2]|0)+e|0]&1)!=0){l=14907;break}c[59102]=(c[59102]|0)+1;ap=g}else{l=14907}}while(0);if((l|0)==14907){if((f|0)==(c[g+4>>2]|0)){tI();i=c[59128]|0;aq=i;ar=c[i+8>>2]|0}else{aq=g;ar=f}c[(c[aq+16>>2]|0)+(ar<<2)>>2]=n;i=c[59128]|0;c[(c[i+20>>2]|0)+(c[i+8>>2]<<2)>>2]=d;i=c[59128]|0;a[(c[i+24>>2]|0)+(c[i+8>>2]|0)|0]=0;i=(c[59128]|0)+8|0;c[i>>2]=(c[i>>2]|0)+1;ap=c[59128]|0}i=d+2|0;m=c[ap+8>>2]|0;do{if((m|0)>2){r=m-1|0;if((c[(c[ap+16>>2]|0)+(r<<2)>>2]|0)!=(b|0)){l=14915;break}if((c[(c[ap+20>>2]|0)+(r<<2)>>2]|0)!=(i|0)){l=14915;break}if((a[(c[ap+24>>2]|0)+r|0]&1)!=0){l=14915;break}c[59102]=(c[59102]|0)+1;as=ap}else{l=14915}}while(0);if((l|0)==14915){if((m|0)==(c[ap+4>>2]|0)){tI();n=c[59128]|0;at=n;au=c[n+8>>2]|0}else{at=ap;au=m}c[(c[at+16>>2]|0)+(au<<2)>>2]=b;n=c[59128]|0;c[(c[n+20>>2]|0)+(c[n+8>>2]<<2)>>2]=i;n=c[59128]|0;a[(c[n+24>>2]|0)+(c[n+8>>2]|0)|0]=0;n=(c[59128]|0)+8|0;c[n>>2]=(c[n>>2]|0)+1;as=c[59128]|0}n=b+2|0;f=c[as+8>>2]|0;do{if((f|0)>2){g=f-1|0;if((c[(c[as+16>>2]|0)+(g<<2)>>2]|0)!=(n|0)){l=14923;break}if((c[(c[as+20>>2]|0)+(g<<2)>>2]|0)!=(d|0)){l=14923;break}if((a[(c[as+24>>2]|0)+g|0]&1)!=0){l=14923;break}c[59102]=(c[59102]|0)+1;av=as}else{l=14923}}while(0);if((l|0)==14923){if((f|0)==(c[as+4>>2]|0)){tI();i=c[59128]|0;aw=i;ax=c[i+8>>2]|0}else{aw=as;ax=f}c[(c[aw+16>>2]|0)+(ax<<2)>>2]=n;i=c[59128]|0;c[(c[i+20>>2]|0)+(c[i+8>>2]<<2)>>2]=d;i=c[59128]|0;a[(c[i+24>>2]|0)+(c[i+8>>2]|0)|0]=0;i=(c[59128]|0)+8|0;c[i>>2]=(c[i>>2]|0)+1;av=c[59128]|0}i=c[av+8>>2]|0;do{if((i|0)>2){m=i-1|0;if((c[(c[av+16>>2]|0)+(m<<2)>>2]|0)!=(b|0)){break}if((c[(c[av+20>>2]|0)+(m<<2)>>2]|0)!=(s|0)){break}if((a[(c[av+24>>2]|0)+m|0]&1)!=0){break}c[59102]=(c[59102]|0)+1;break L19947}}while(0);if((i|0)==(c[av+4>>2]|0)){tI();n=c[59128]|0;ay=n;az=c[n+8>>2]|0}else{ay=av;az=i}c[(c[ay+16>>2]|0)+(az<<2)>>2]=b;n=c[59128]|0;c[(c[n+20>>2]|0)+(c[n+8>>2]<<2)>>2]=s;n=c[59128]|0;a[(c[n+24>>2]|0)+(c[n+8>>2]|0)|0]=0;n=(c[59128]|0)+8|0;c[n>>2]=(c[n>>2]|0)+1}}while(0);if(!h){return}h=(j|0)<-2?-2:j;if((h|0)>8){aA=(h|0)%9&-1}else{aA=h}h=c[236448+(aA+2<<2)>>2]|0;if((h|0)==(c[59128]|0)){c[59106]=(c[59106]|0)+1;return}else{c[59128]=h;return}}function oF(){return}function oG(){return}function oH(){return}function oI(){return}function oJ(){aI(174776,14,1,c[10030]|0);return}function oK(){aI(174800,6,1,c[10030]|0);return}function oL(a,b){a=a|0;b=b|0;var d=0;d=i;cf(c[10030]|0,174824,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);i=d;return}function oM(a,b){a=a|0;b=b|0;var d=0;d=i;cf(c[10030]|0,174848,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);i=d;return}function oN(a){a=a|0;var b=0;b=i;cf(c[10030]|0,174880,(v=i,i=i+8|0,c[v>>2]=c[236584+(((a+2|0)%11&-1)<<2)>>2],v)|0);i=b;return}function oO(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=i;cf(c[10030]|0,174824,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b-5,v)|0);cf(c[10030]|0,174976,(v=i,i=i+8|0,c[v>>2]=d,v)|0);i=e;return}function oP(a){a=a|0;var b=0;b=i;cf(c[10030]|0,175008,(v=i,i=i+8|0,c[v>>2]=(a|0)!=0?2:1,v)|0);i=b;return 1}function oQ(){var b=0;b=c[10030]|0;if(a[235320]|0){aI(175320|0,13,1,b|0);c[58826]=1;return}else{aI(175360|0,10,1,b|0);c[58826]=1;return}}function oR(){var a=0,b=0,d=0;a=i;aI(175544,29,1,c[10030]|0);b=c[11252]|0;if((b|0)==6){d=175480}else{d=(b|0)==1?175480:179864}cf(c[10030]|0,175512,(v=i,i=i+40|0,c[v>>2]=d,c[v+8>>2]=1e4,c[v+16>>2]=7500,h[v+24>>3]=.2,h[v+32>>3]=.4,v)|0);c[58832]=0;i=a;return}function oS(a,b){a=a|0;b=b|0;var d=0;d=i;if((c[58822]|0)==(a|0)&(c[58820]|0)==(b|0)){i=d;return}cf(c[10030]|0,175584,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);c[58826]=1;c[58822]=a;c[58820]=b;i=d;return}function oT(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;e=c[10030]|0;if((c[58826]|0)==0){cf(e|0,175600,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);c[58822]=a;c[58820]=b;i=d;return}else{cf(e|0,175616,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);c[58826]=0;c[58822]=a;c[58820]=b;i=d;return}}function oU(a){a=a|0;var b=0,d=0;b=i;d=((((a|0)<-2?0:a+2|0)|0)%(c[58828]|0)&-1)+1|0;if((c[58824]|0)==(d|0)){i=b;return}cf(c[10030]|0,175648,(v=i,i=i+8|0,c[v>>2]=d,v)|0);c[58824]=d;c[58826]=1;i=b;return}function oV(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;do{if((c[58832]|0)==1){g=b+15|0;if((c[58822]|0)==(g|0)&(c[58820]|0)==(d|0)){break}h=c[10030]|0;cf(h|0,175584,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=d,v)|0);c[58826]=1;c[58822]=g;c[58820]=d}else{g=d-15|0;if((c[58822]|0)==(b|0)&(c[58820]|0)==(g|0)){break}h=c[10030]|0;cf(h|0,175584,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=g,v)|0);c[58826]=1;c[58822]=b;c[58820]=g}}while(0);b=c[11252]|0;if((b|0)==6){d=c[10030]|0;aI(175688,2,1,d|0);d=a[e]|0;if(d<<24>>24!=0){g=e;h=d;do{d=h&255;do{if(h<<24>>24<0){j=38152+(d-128<<2)|0;if((a[j]|0)==0){k=14990;break}l=c[10030]|0;aK(j|0,l|0)}else{k=14990}}while(0);if((k|0)==14990){k=0;l=c[10030]|0;aF(d|0,l|0)}g=g+1|0;h=a[g]|0;}while(h<<24>>24!=0)}h=c[10030]|0;aI(175664,2,1,h|0);i=f;return}h=c[10030]|0;if((b|0)!=1){cf(h|0,177872,(v=i,i=i+8|0,c[v>>2]=e,v)|0);i=f;return}aI(175688,2,1,h|0);h=a[e]|0;if(h<<24>>24!=0){b=e;e=h;do{h=e&255;do{if(e<<24>>24<0){g=37640+(h-128<<2)|0;if((a[g]|0)==0){k=14998;break}l=c[10030]|0;aK(g|0,l|0)}else{k=14998}}while(0);if((k|0)==14998){k=0;d=c[10030]|0;aF(h|0,d|0)}b=b+1|0;e=a[b]|0;}while(e<<24>>24!=0)}aI(175664,2,1,c[10030]|0);i=f;return}function oW(a){a=a|0;var b=0;if((a|0)==(-90|0)|(a|0)==270){c[58832]=-1;b=c[10030]|0;aI(175768,8,1,b|0);return 1}b=(a|0)!=0;c[58832]=b&1;a=c[10030]|0;if(b){aI(175720,7,1,a|0);return 1}else{aI(175816,7,1,a|0);return 1}return 0}function oX(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0;b=i;c[58828]=6;a[235320]=0;d=c[13898]|0;e=c[8272]|0;L20300:do{if((d|0)<(e|0)){f=d;g=6;j=e;L20301:while(1){k=c[1054]|0;l=(a[k+(f*40&-1)|0]&1)==0;L20303:do{if(l){m=15032}else{n=c[k+(f*40&-1)+36>>2]|0;o=k+(f*40&-1)+32|0;p=c[10036]|0;q=0;while(1){if((q|0)>=(n|0)){m=15020;break}if((a[p+((c[o>>2]|0)+q|0)|0]|0)==(a[q+103664|0]|0)){q=q+1|0}else{break}}if((m|0)==15020){m=0;if((q|0)==1){r=g;break L20300}}if(l){m=15032;break}if((n|0)<=0){m=15044;break L20301}p=c[10036]|0;s=0;t=0;u=c[o>>2]|0;while(1){if((a[s+175248|0]|0)==(a[p+(s+u|0)|0]|0)){w=u;x=t}else{if((s|0)!=3){break}w=u-1|0;x=1}y=s+1|0;if((y|0)<(x+n|0)){s=y;t=x;u=w}else{m=15028;break}}do{if((m|0)==15028){m=0;if((x|0)==0){if(!((s|0)==2|(s|0)==5)){break}}a[235320]=1;z=g;A=f;B=j;break L20303}}while(0);if(l){m=15032}else{m=15043;break L20301}}}while(0);if((m|0)==15032){m=0;l=c[k+(f*40&-1)+8>>2]|0;if((l|0)==1){C=+(c[k+(f*40&-1)+16>>2]|0)}else if((l|0)==3){C=+uz(c[k+(f*40&-1)+16>>2]|0,0)}else if((l|0)==2){C=+h[k+(f*40&-1)+16>>3]}else{m=15036;break}l=~~C;c[58828]=l;if((l|0)<1){m=15039;break}z=l;A=c[13898]|0;B=c[8272]|0}l=A+1|0;c[13898]=l;if((l|0)<(B|0)){f=l;g=z;j=B}else{r=z;break L20300}}if((m|0)==15036){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((m|0)==15043){uf(f,175176,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((m|0)==15039){c[58828]=6;uf(c[13898]|0,175216,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((m|0)==15044){uf(f,175176,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{r=6}}while(0);m=a[235320]|0?175144:175024;be(13048,175160,(v=i,i=i+16|0,c[v>>2]=r,c[v+8>>2]=m,v)|0);i=b;return}function oY(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0.0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0.0,at=0.0,au=0.0,av=0,aw=0,ax=0,ay=0,az=0;b=i;d=c[13898]|0;e=c[8272]|0;L20341:do{if((d|0)<(e|0)){f=c[1054]|0;g=(a[f+(d*40&-1)|0]&1)==0;if(g){j=d;break}k=c[f+(d*40&-1)+36>>2]|0;l=f+(d*40&-1)+32|0;m=c[10036]|0;n=0;while(1){if((n|0)>=(k|0)){o=15050;break}if((a[m+((c[l>>2]|0)+n|0)|0]|0)==(a[n+103664|0]|0)){n=n+1|0}else{break}}if((o|0)==15050){if((n|0)==1){j=d;break}}if(!((k|0)>0&(g^1))){j=d;break}m=c[10036]|0;p=0;q=0;r=c[l>>2]|0;while(1){if((a[p+176888|0]|0)==(a[m+(p+r|0)|0]|0)){s=r;t=q}else{if((p|0)!=1){j=d;break L20341}s=r-1|0;t=1}u=p+1|0;if((u|0)<(t+k|0)){p=u;q=t;r=s}else{break}}if((t|0)==0){if(!((p|0)==0|(p|0)==4)){j=d;break}}r=d+1|0;c[13898]=r;if((r|0)>=(e|0)){uf(r,176848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}q=(a[f+(r*40&-1)|0]&1)==0;k=c[f+(r*40&-1)+36>>2]|0;L20364:do{if(q){w=c[10036]|0;x=f+(r*40&-1)+32|0}else{m=f+(r*40&-1)+32|0;l=c[10036]|0;g=0;while(1){if((g|0)>=(k|0)){break}if((a[l+((c[m>>2]|0)+g|0)|0]|0)==(a[g+103664|0]|0)){g=g+1|0}else{w=l;x=m;break L20364}}if((g|0)!=1){w=l;x=m;break}uf(r,176848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);f=(k|0)>0;p=c[58058]|0;L20373:do{if((p|0)==0){o=15075}else{if(q){o=15075;break}if(f){n=0;u=0;y=c[x>>2]|0;while(1){z=a[p+n|0]|0;if(z<<24>>24==(a[w+(n+y|0)|0]|0)){A=y;B=u}else{if(z<<24>>24!=36){o=15075;break L20373}A=y-1|0;B=1}C=n+1|0;if((C|0)<(B+k|0)){n=C;u=B;y=A}else{break}}if((B|0)==0){D=C}else{E=0;break}}else{D=0}y=a[p+D|0]|0;if((y<<24>>24|0)==36|(y<<24>>24|0)==0){E=0}else{o=15075}}}while(0);L20385:do{if((o|0)==15075){p=c[58063]|0;if((p|0)==0){uf(r,176848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(q){uf(r,176848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}do{if(f){y=0;u=0;n=c[x>>2]|0;while(1){m=a[p+y|0]|0;if(m<<24>>24==(a[w+(y+n|0)|0]|0)){F=n;G=u}else{if(m<<24>>24!=36){o=15225;break}F=n-1|0;G=1}H=y+1|0;if((H|0)<(G+k|0)){y=H;u=G;n=F}else{o=15223;break}}if((o|0)==15225){uf(r,176848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((o|0)==15223){if((G|0)==0){I=H;break}else{E=1;break L20385}}}else{I=0}}while(0);n=a[p+I|0]|0;if((n<<24>>24|0)==36|(n<<24>>24|0)==0){E=1;break}uf(r,176848,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[58068]=232232+(E*20&-1);r=d+2|0;c[13898]=r;j=r}else{j=d}}while(0);d=(j|0)<(e|0);L20407:do{if(d){e=c[1054]|0;E=(a[e+(j*40&-1)|0]&1)==0;L20409:do{if(!E){I=c[e+(j*40&-1)+36>>2]|0;H=e+(j*40&-1)+32|0;G=c[10036]|0;F=0;while(1){if((F|0)>=(I|0)){o=15084;break}if((a[G+((c[H>>2]|0)+F|0)|0]|0)==(a[F+103664|0]|0)){F=F+1|0}else{break}}if((o|0)==15084){if((F|0)==1){break}}if(!((I|0)>0&(E^1))){break}G=c[10036]|0;p=0;w=0;x=c[H>>2]|0;while(1){if((a[p+176824|0]|0)==(a[G+(p+x|0)|0]|0)){J=x;K=w}else{if((p|0)!=3){break L20409}J=x-1|0;K=1}D=p+1|0;if((D|0)<(K+I|0)){p=D;w=K;x=J}else{break}}if((K|0)==0){if(!((p|0)==2|(p|0)==8)){break}}c[(c[58068]|0)+12>>2]=52e3;c[(c[58068]|0)+16>>2]=33940;c[58070]=176808;c[13898]=(c[13898]|0)+1;break L20407}}while(0);if(!d){break}E=c[1054]|0;e=(a[E+(j*40&-1)|0]&1)==0;L20430:do{if(!e){x=c[E+(j*40&-1)+36>>2]|0;w=E+(j*40&-1)+32|0;I=c[10036]|0;G=0;while(1){if((G|0)>=(x|0)){o=15099;break}if((a[I+((c[w>>2]|0)+G|0)|0]|0)==(a[G+103664|0]|0)){G=G+1|0}else{break}}if((o|0)==15099){if((G|0)==1){break}}if(!((x|0)>0&(e^1))){break}I=c[10036]|0;p=0;H=0;F=c[w>>2]|0;while(1){if((a[p+176760|0]|0)==(a[I+(p+F|0)|0]|0)){L=F;M=H}else{if((p|0)!=5){break L20430}L=F-1|0;M=1}D=p+1|0;if((D|0)<(M+x|0)){p=D;H=M;F=L}else{break}}if((M|0)==0){if(!((p|0)==4|(p|0)==10)){break}}c[(c[58068]|0)+12>>2]=45333;c[(c[58068]|0)+16>>2]=33940;c[58070]=176704;c[13898]=(c[13898]|0)+1;break L20407}}while(0);if(!d){break}e=c[1054]|0;E=(a[e+(j*40&-1)|0]&1)==0;L20451:do{if(!E){F=c[e+(j*40&-1)+36>>2]|0;H=e+(j*40&-1)+32|0;x=c[10036]|0;I=0;while(1){if((I|0)>=(F|0)){o=15114;break}if((a[x+((c[H>>2]|0)+I|0)|0]|0)==(a[I+103664|0]|0)){I=I+1|0}else{break}}if((o|0)==15114){if((I|0)==1){break}}if(!((F|0)>0&(E^1))){break}x=c[10036]|0;p=0;w=0;G=c[H>>2]|0;while(1){if((a[p+176680|0]|0)==(a[x+(p+G|0)|0]|0)){N=G;O=w}else{if((p|0)!=3){break L20451}N=G-1|0;O=1}D=p+1|0;if((D|0)<(O+F|0)){p=D;w=O;G=N}else{break}}if((O|0)==0){if(!((p|0)==2|(p|0)==5)){break}}c[(c[58068]|0)+12>>2]=13e3;c[(c[58068]|0)+16>>2]=7440;c[58070]=176664;c[13898]=(c[13898]|0)+1;break L20407}}while(0);if(!d){break}E=c[1054]|0;e=(a[E+(j*40&-1)|0]&1)==0;if(e){break}G=c[E+(j*40&-1)+36>>2]|0;w=E+(j*40&-1)+32|0;E=c[10036]|0;F=0;while(1){if((F|0)>=(G|0)){o=15129;break}if((a[E+((c[w>>2]|0)+F|0)|0]|0)==(a[F+103664|0]|0)){F=F+1|0}else{break}}if((o|0)==15129){if((F|0)==1){break}}if(!((G|0)>0&(e^1))){break}E=c[10036]|0;x=0;H=0;I=c[w>>2]|0;while(1){if((a[x+176656|0]|0)==(a[E+(x+I|0)|0]|0)){P=I;Q=H}else{if((x|0)!=3){break L20407}P=I-1|0;Q=1}D=x+1|0;if((D|0)<(Q+G|0)){x=D;H=Q;I=P}else{break}}if((Q|0)==0){if(!((x|0)==2|(x|0)==6)){break}}c[(c[58068]|0)+12>>2]=1e4;c[(c[58068]|0)+16>>2]=7440;c[58070]=176648;c[13898]=(c[13898]|0)+1}}while(0);Q=c[58070]|0;be(13048,84616,(v=i,i=i+16|0,c[v>>2]=c[(c[58068]|0)+4>>2],c[v+8>>2]=Q,v)|0);Q=c[3524]|0;P=c[13898]|0;j=c[8272]|0;if((P|0)>=(j|0)){R=uA(13048)|0;S=R+13048|0;T=a[236376]|0;U=T?116408:116440;V=c[58868]|0;W=T?1:V;X=a[235336]|0;Y=X?131584:131504;Z=c[59090]|0;_=Z+4|0;$=c[_>>2]|0;aa=Z+12|0;ab=c[aa>>2]|0;ac=(ab|0)!=0;ad=ac?176184:176112;ae=Z+24|0;af=Z+16|0;ag=ac?ae:af;ah=+h[ag>>3];ai=a[28152]|0;aj=ai?176072:176024;ak=be(S|0,176232,(v=i,i=i+56|0,c[v>>2]=U,c[v+8>>2]=W,c[v+16>>2]=Y,c[v+24>>2]=$,c[v+32>>2]=ad,h[v+40>>3]=ah,c[v+48>>2]=aj,v)|0)|0;i=b;return}d=Q+16|0;O=Q+20|0;Q=P;P=j;L20494:while(1){j=c[1054]|0;N=(a[j+(Q*40&-1)|0]&1)==0;L20496:do{if(!N){M=c[j+(Q*40&-1)+36>>2]|0;L=j+(Q*40&-1)+32|0;K=c[10036]|0;J=0;while(1){if((J|0)>=(M|0)){break}if((a[K+((c[L>>2]|0)+J|0)|0]|0)==(a[J+103664|0]|0)){J=J+1|0}else{break L20496}}if((J|0)==1){o=15233;break L20494}}}while(0);x=c[58848]|0;L20503:do{if((x|0)==0){al=235392}else{L=c[j+(Q*40&-1)+36>>2]|0;K=c[j+(Q*40&-1)+32>>2]|0;M=(L|0)>0;p=c[10036]|0;I=235392;H=x;while(1){L20507:do{if(!N){if(M){G=0;E=0;w=K;while(1){e=a[H+G|0]|0;if(e<<24>>24==(a[p+(G+w|0)|0]|0)){am=w;an=E}else{if(e<<24>>24!=36){break L20507}am=w-1|0;an=1}ao=G+1|0;if((ao|0)<(an+L|0)){G=ao;E=an;w=am}else{break}}if((an|0)==0){ap=ao}else{al=I;break L20503}}else{ap=0}w=a[H+ap|0]|0;if((w<<24>>24|0)==36|(w<<24>>24|0)==0){al=I;break L20503}}}while(0);w=I+8|0;E=c[w>>2]|0;if((E|0)==0){al=w;break}else{I=w;H=E}}}}while(0);N=c[al+4>>2]|0;L20520:do{if((N|0)==2){a[235336]=0;x=Q+1|0;c[13898]=x;aq=x}else if((N|0)==5){ar=Q+1|0;c[13898]=ar;if((ar|0)>=(P|0)){o=15237;break L20494}L20524:do{if((a[j+(ar*40&-1)|0]&1)!=0){x=c[j+(ar*40&-1)+36>>2]|0;H=j+(ar*40&-1)+32|0;I=c[10036]|0;L=0;while(1){if((L|0)>=(x|0)){break}if((a[I+((c[H>>2]|0)+L|0)|0]|0)==(a[L+103664|0]|0)){L=L+1|0}else{break L20524}}if((L|0)==1){o=15236;break L20494}}}while(0);H=c[j+(ar*40&-1)+8>>2]|0;if((H|0)==2){as=+h[j+(ar*40&-1)+16>>3]}else if((H|0)==3){as=+uz(c[j+(ar*40&-1)+16>>2]|0,0)}else if((H|0)==1){as=+(c[j+(ar*40&-1)+16>>2]|0)}else{o=15205;break L20494}h[29422]=as;if(as<=0.0){o=15210;break L20494}h[29421]=as;H=~~(as*1016.0/72.0);c[d>>2]=H;c[O>>2]=(H<<1>>>0)/3>>>0;H=c[59090]|0;at=+h[29422];if((c[H+12>>2]|0)==0){h[H+16>>3]=216.0/(at*2.0)}else{h[H+24>>3]=at}H=(c[13898]|0)+1|0;c[13898]=H;aq=H}else if((N|0)==0){a[236376]=1;H=Q+1|0;c[13898]=H;aq=H}else if((N|0)==1){a[236376]=0;H=Q+1|0;c[13898]=H;if((H|0)>=(P|0)){aq=H;break}if((a[j+(H*40&-1)|0]&1)!=0){I=c[j+(H*40&-1)+36>>2]|0;x=j+(H*40&-1)+32|0;p=c[10036]|0;K=0;while(1){if((K|0)>=(I|0)){aq=H;break L20520}if((a[p+((c[x>>2]|0)+K|0)|0]|0)==(a[K+103664|0]|0)){K=K+1|0}else{aq=H;break L20520}}}K=c[j+(H*40&-1)+8>>2]|0;if((K|0)==2){au=+h[j+(H*40&-1)+16>>3]}else if((K|0)==1){au=+(c[j+(H*40&-1)+16>>2]|0)}else if((K|0)==3){au=+uz(c[j+(H*40&-1)+16>>2]|0,0)}else{o=15169;break L20494}K=~~au;c[58868]=K;if((K|0)<1){o=15171;break L20494}K=(c[13898]|0)+1|0;c[13898]=K;aq=K}else if((N|0)==7){K=Q+1|0;c[13898]=K;a[28152]=1;aq=K}else if((N|0)==8){K=Q+1|0;c[13898]=K;aq=K}else if((N|0)==3){a[235336]=1;K=Q+1|0;c[13898]=K;aq=K}else if((N|0)==4){av=Q+1|0;c[13898]=av;if((av|0)>=(P|0)){o=15232;break L20494}K=(a[j+(av*40&-1)|0]&1)==0;x=c[j+(av*40&-1)+36>>2]|0;p=j+(av*40&-1)+32|0;L20561:do{if(!K){I=c[10036]|0;M=0;while(1){if((M|0)>=(x|0)){break}if((a[I+((c[p>>2]|0)+M|0)|0]|0)==(a[M+103664|0]|0)){M=M+1|0}else{break L20561}}if((M|0)==1){o=15231;break L20494}}}while(0);H=(x|0)>0;I=c[10036]|0;L=0;L20568:while(1){J=c[235528+(L*48&-1)>>2]|0;L20570:do{if(!((J|0)==0|K)){if(H){E=0;w=0;G=c[p>>2]|0;while(1){e=a[J+E|0]|0;if(e<<24>>24==(a[I+(E+G|0)|0]|0)){aw=G;ax=w}else{if(e<<24>>24!=36){break L20570}aw=G-1|0;ax=1}ay=E+1|0;if((ay|0)<(ax+x|0)){E=ay;w=ax;G=aw}else{break}}if((ax|0)==0){az=ay}else{break L20568}}else{az=0}G=a[J+az|0]|0;if((G<<24>>24|0)==36|(G<<24>>24|0)==0){break L20568}}}while(0);J=L+1|0;if(J>>>0<17){L=J}else{o=15193;break L20494}}c[59090]=235528+(L*48&-1);c[59088]=L;c[59086]=L;x=Q+2|0;c[13898]=x;aq=x}else if((N|0)==6){x=Q+1|0;c[13898]=x;a[28152]=0;aq=x}else{aq=Q}}while(0);N=c[8272]|0;if((aq|0)<(N|0)){Q=aq;P=N}else{o=15235;break}}if((o|0)==15231){uf(av,176384,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((o|0)==15232){uf(av,176384,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((o|0)==15233){R=uA(13048)|0;S=R+13048|0;T=a[236376]|0;U=T?116408:116440;V=c[58868]|0;W=T?1:V;X=a[235336]|0;Y=X?131584:131504;Z=c[59090]|0;_=Z+4|0;$=c[_>>2]|0;aa=Z+12|0;ab=c[aa>>2]|0;ac=(ab|0)!=0;ad=ac?176184:176112;ae=Z+24|0;af=Z+16|0;ag=ac?ae:af;ah=+h[ag>>3];ai=a[28152]|0;aj=ai?176072:176024;ak=be(S|0,176232,(v=i,i=i+56|0,c[v>>2]=U,c[v+8>>2]=W,c[v+16>>2]=Y,c[v+24>>2]=$,c[v+32>>2]=ad,h[v+40>>3]=ah,c[v+48>>2]=aj,v)|0)|0;i=b;return}else if((o|0)==15193){uf(av,176384,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((o|0)==15235){R=uA(13048)|0;S=R+13048|0;T=a[236376]|0;U=T?116408:116440;V=c[58868]|0;W=T?1:V;X=a[235336]|0;Y=X?131584:131504;Z=c[59090]|0;_=Z+4|0;$=c[_>>2]|0;aa=Z+12|0;ab=c[aa>>2]|0;ac=(ab|0)!=0;ad=ac?176184:176112;ae=Z+24|0;af=Z+16|0;ag=ac?ae:af;ah=+h[ag>>3];ai=a[28152]|0;aj=ai?176072:176024;ak=be(S|0,176232,(v=i,i=i+56|0,c[v>>2]=U,c[v+8>>2]=W,c[v+16>>2]=Y,c[v+24>>2]=$,c[v+32>>2]=ad,h[v+40>>3]=ah,c[v+48>>2]=aj,v)|0)|0;i=b;return}else if((o|0)==15205){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((o|0)==15171){c[58868]=6;uf(c[13898]|0,176608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((o|0)==15210){uf(c[13898]|0,176336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((o|0)==15169){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((o|0)==15236){uf(ar,176336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((o|0)==15237){uf(ar,176336,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function oZ(){var a=0,b=0;a=i;b=c[3524]|0;cf(c[10030]|0,176968,(v=i,i=i+8|0,c[v>>2]=c[(c[58068]|0)+8>>2],v)|0);c[b+8>>2]=c[(c[58068]|0)+12>>2];c[b+12>>2]=c[(c[58068]|0)+16>>2];aI(177432,4,1,c[10030]|0);i=a;return}function o_(){aI(177008,7,1,c[10030]|0);return}function o$(){var b=0;if(a[235520]|0){b=c[10030]|0;aI(125976,2,1,b|0);a[235520]=0}aI(177024,10,1,c[10030]|0);return}function o0(){var b=0,d=0,e=0,f=0.0,g=0;b=i;aI(177432,4,1,c[10030]|0);d=c[59090]|0;e=c[d+12>>2]|0;cf(c[10030]|0,177408,(v=i,i=i+16|0,c[v>>2]=c[d+8>>2],c[v+8>>2]=e,v)|0);e=c[59090]|0;d=c[10030]|0;if((c[e+12>>2]|0)==0){f=+h[e+16>>3];cf(d|0,180656,(v=i,i=i+8|0,h[v>>3]=f,v)|0)}else{f=+h[e+24>>3];cf(d|0,180672,(v=i,i=i+8|0,h[v>>3]=f,v)|0)}d=c[59090]|0;e=c[d+36>>2]|0;g=c[d+40>>2]|0;cf(c[10030]|0,180632,(v=i,i=i+24|0,c[v>>2]=c[d+32>>2],c[v+8>>2]=e,c[v+16>>2]=g,v)|0);if(!(a[235336]|0)){c[58832]=0;a[235520]=0;a[235512]=1;c[58826]=1;i=b;return}aI(177112,255,1,c[10030]|0);c[58832]=0;a[235520]=0;a[235512]=1;c[58826]=1;i=b;return}function o1(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;if(a[235520]|0){e=b-(c[58822]|0)|0;f=d-(c[58820]|0)|0;g=c[10030]|0;aF(60,g|0);h=f;i=e}else{e=c[10030]|0;aI(177464,3,1,e|0);if(a[235512]|0){a[235512]=0;e=c[10030]|0;aF(61,e|0);j=d;k=b}else{j=d-(c[58820]|0)|0;k=b-(c[58822]|0)|0}a[235520]=1;h=j;i=k}k=i<<1;i=(k|0)<0?1-k|0:k;k=i&63;j=i>>6;if((j|0)>0){i=k;e=j;while(1){aF(i+63|0,c[10030]|0);j=e&63;f=e>>6;if((f|0)>0){i=j;e=f}else{l=j;break}}}else{l=k}aF((l<<24)-1090519040>>24|0,c[10030]|0);l=h<<1;h=(l|0)<0?1-l|0:l;l=h&63;k=h>>6;if((k|0)>0){m=l;n=k}else{o=l;p=o<<24;q=p-1090519040|0;r=q>>24;s=c[10030]|0;t=aF(r|0,s|0)|0;u=c[10030]|0;v=aF(10,u|0)|0;c[58822]=b;c[58820]=d;return}while(1){aF(m+63|0,c[10030]|0);l=n&63;k=n>>6;if((k|0)>0){m=l;n=k}else{o=l;break}}p=o<<24;q=p-1090519040|0;r=q>>24;s=c[10030]|0;t=aF(r|0,s|0)|0;u=c[10030]|0;v=aF(10,u|0)|0;c[58822]=b;c[58820]=d;return}function o2(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if(a[235520]|0){e=d-(c[58820]|0)|0;f=b-(c[58822]|0)|0}else{g=c[10030]|0;aI(177472,2,1,g|0);if(a[235512]|0){a[235512]=0;g=c[10030]|0;aF(61,g|0);h=d;i=b}else{h=d-(c[58820]|0)|0;i=b-(c[58822]|0)|0}a[235520]=1;e=h;f=i}i=f<<1;f=(i|0)<0?1-i|0:i;i=f&63;h=f>>6;if((h|0)>0){f=i;g=h;while(1){aF(f+63|0,c[10030]|0);h=g&63;j=g>>6;if((j|0)>0){f=h;g=j}else{k=h;break}}}else{k=i}aF((k<<24)-1090519040>>24|0,c[10030]|0);k=e<<1;e=(k|0)<0?1-k|0:k;k=e&63;i=e>>6;if((i|0)>0){l=k;m=i}else{n=k;o=n<<24;p=o-1090519040|0;q=p>>24;r=c[10030]|0;s=aF(q|0,r|0)|0;t=c[10030]|0;u=aF(10,t|0)|0;c[58822]=b;c[58820]=d;return}while(1){aF(l+63|0,c[10030]|0);k=m&63;i=m>>6;if((i|0)>0){l=k;m=i}else{n=k;break}}o=n<<24;p=o-1090519040|0;q=p>>24;r=c[10030]|0;s=aF(q|0,r|0)|0;t=c[10030]|0;u=aF(10,t|0)|0;c[58822]=b;c[58820]=d;return}function o3(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;if(a[235520]|0){e=c[10030]|0;aI(125976,2,1,e|0);a[235520]=0}e=(b|0)>-1;if(a[236376]|0){if(e){if(a[235336]|0){c[59092]=(b&7)+1}f=(b>>>0)%24>>>0}else{f=b}if((f|0)==(c[58846]|0)){i=d;return}do{if((f|0)>-1){g=c[10030]|0;h=c[235344+(f>>>3<<2)>>2]|0;if(a[235336]|0){j=c[59092]|0;k=c[235480+((f&7)<<2)>>2]|0;cf(g|0,177704,(v=i,i=i+24|0,c[v>>2]=h,c[v+8>>2]=j,c[v+16>>2]=k,v)|0);break}else{cf(g|0,177696,(v=i,i=i+8|0,c[v>>2]=h,v)|0);break}}else{if((f|0)==(-2|0)){h=c[10030]|0;aI(177680,6,1,h|0);break}else if((f|0)==(-1|0)){aI(177664,11,1,c[10030]|0);break}else{break}}}while(0);c[58846]=f;i=d;return}else{if(e){if(a[235336]|0){c[59092]=(b&7)+1}l=((b+2|0)%(c[58868]|0)&-1)+1|0}else{l=b}if((l|0)==(c[58846]|0)){i=d;return}do{if((l|0)>-1){b=c[10030]|0;if(a[235336]|0){e=c[59092]|0;cf(b|0,177848,(v=i,i=i+16|0,c[v>>2]=l,c[v+8>>2]=e,v)|0);break}else{cf(b|0,177768,(v=i,i=i+8|0,c[v>>2]=l,v)|0);break}}else{if((l|0)==(-2|0)){b=c[10030]|0;aI(177744,15,1,b|0);break}else if((l|0)==(-1|0)){aI(177720,20,1,c[10030]|0);break}else{break}}}while(0);c[58826]=1;c[58846]=l;i=d;return}}function o4(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;g=(c[(c[3524]|0)+16>>2]|0)>>>2;if((c[58832]|0)==1){o1(g+b|0,d)}else{o1(b,d-g|0)}if(a[235520]|0){g=c[10030]|0;aI(125976,2,1,g|0);a[235520]=0}cf(c[10030]|0,177872,(v=i,i=i+8|0,c[v>>2]=e,v)|0);a[235512]=1;i=f;return}function o5(b){b=b|0;var d=0,e=0;if((b|0)==(-90|0)|(b|0)==270){d=-1}else{d=(b|0)!=0&1}c[58832]=d;if(a[235520]|0){b=c[10030]|0;aF(59,b|0);a[235520]=0;e=c[58832]|0}else{e=d}if((e|0)==1){d=c[10030]|0;aI(177968,5,1,d|0);return 1}d=c[10030]|0;if((e|0)==-1){aI(177960,6,1,d|0);return 1}else{aI(177912,5,1,d|0);return 1}return 0}function o6(b){b=b|0;var d=0,e=0;if(a[235520]|0){d=c[10030]|0;aI(125976,2,1,d|0);a[235520]=0}if((b|0)==2){d=c[10030]|0;aI(177984,3,1,d|0);e=1;return e|0}else if((b|0)==1){aI(177992,3,1,c[10030]|0);e=1;return e|0}else if((b|0)==0){aI(178e3,3,1,c[10030]|0);e=1;return e|0}else{e=0;return e|0}return 0}function o7(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0;f=i;g=(e|0)<0;if(!(a[28152]|0)){if(g){tH(b,d,e);i=f;return}j=~~(+h[29420]*106.0*.5);k=(e|0)%6&-1;if((k|0)==4){l=(j<<2|0)/3&-1;m=l+d|0;o1(b,m);n=d-((j<<1|0)/3&-1)|0;o2(b-l|0,n);o2(l+b|0,n);o2(b,m);o1(b,d);o2(b,d);i=f;return}else if((k|0)==5){m=b-j|0;o1(m,d);o2(m,d);n=j+b|0;o2(n,d);l=d-j|0;o1(b,l);o2(b,l);o=j+d|0;o2(b,o);o1(m,l);o2(m,l);o2(n,o);o1(m,o);o2(m,o);o2(n,l);i=f;return}else if((k|0)==2){l=b-j|0;n=d-j|0;o1(l,n);o2(l,n);o=j+b|0;o2(o,n);m=j+d|0;o2(o,m);o2(l,m);o2(l,n);o1(b,d);o2(b,d);i=f;return}else if((k|0)==3){n=b-j|0;l=d-j|0;o1(n,l);o2(n,l);m=j+b|0;o=j+d|0;o2(m,o);o1(n,o);o2(n,o);o2(m,l);i=f;return}else if((k|0)==0){l=b-j|0;o1(l,d);o2(b,d-j|0);o2(j+b|0,d);o2(b,j+d|0);o2(l,d);o1(b,d);o2(b,d);i=f;return}else if((k|0)==1){k=b-j|0;o1(k,d);o2(k,d);o2(j+b|0,d);k=d-j|0;o1(b,k);o2(b,k);o2(b,j+d|0);i=f;return}else{i=f;return}}if(g){tH(b,d,e);i=f;return}g=~~(+h[29420]*106.0*.5);j=(e|0)%75&-1;if((j|0)==52){e=(g|0)/2&-1;k=b-e|0;l=e+d|0;o1(k,l);o2(b-g|0,d);m=d-e|0;o2(k,m);o=c[10030]|0;aI(125976,2,1,o|0);a[235520]=0;o=c[10030]|0;aI(179152,5,1,o|0);o2(b,d);o=e+b|0;o2(o,m);o2(b,d-g|0);o2(k,m);e=c[10030]|0;aI(125976,2,1,e|0);a[235520]=0;e=c[10030]|0;aI(179120,11,1,e|0);o1(o,m);o2(g+b|0,d);o2(o,l);m=c[10030]|0;aI(125976,2,1,m|0);a[235520]=0;m=c[10030]|0;aI(179152,5,1,m|0);o2(b,g+d|0);o2(k,l);o2(b,d);o2(o,l);l=c[10030]|0;aI(125976,2,1,l|0);a[235520]=0;l=c[10030]|0;aI(179120,11,1,l|0);i=f;return}else if((j|0)==13){l=((g*3&-1|0)/4&-1)+d|0;o1(b,l);p=+(b>>>0>>>0);q=+(g|0);r=q*2.8531695488854605*.25;s=+(d>>>0>>>0);o=~~(s+q*.9270509831248421*.25);o2(~~(p-r),o);t=q*1.7633557568774194*.25;k=~~(s-q*2.4270509831248424*.25);o2(~~(p-t),k);o2(~~(p+t),k);o2(~~(p+r),o);o2(b,l);o1(b,d);o2(b,d);i=f;return}else if((j|0)==38){l=d-g|0;o1(b,l);o=g+b|0;o2(o,l);o2(o,d);o1(b-g|0,l);aI(125976,2,1,c[10030]|0);a[235520]=0;l=g+d|0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=l,v)|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=o,c[v+8>>2]=l,v)|0);i=f;return}else if((j|0)==14){l=((g*3&-1|0)/4&-1)+d|0;o1(b,l);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);r=+(b>>>0>>>0);p=+(g|0);t=p*2.8531695488854605*.25;q=+(d>>>0>>>0);o=~~(q+p*.9270509831248421*.25);o2(~~(r-t),o);s=p*1.7633557568774194*.25;k=~~(q-p*2.4270509831248424*.25);o2(~~(r-s),k);o2(~~(r+s),k);o2(~~(r+t),o);o2(b,l);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==68){l=((g*3&-1|0)/4&-1)+d|0;o1(b,l);t=+(b>>>0>>>0);r=+(g|0);s=r*2.8531695488854605*.25;p=+(d>>>0>>>0);o=~~(p+r*.9270509831248421*.25);o2(~~(t-s),o);q=r*1.7633557568774194*.25;k=~~(p-r*2.4270509831248424*.25);o2(~~(t-q),k);o2(~~(t+q),k);o2(~~(t+s),o);o2(b,l);i=f;return}else if((j|0)==33){l=b-g|0;o1(l,d);o=d-g|0;o2(l,o);k=g+b|0;o2(k,o);o=g+d|0;o2(k,o);o2(b,o);o1(l,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=o,v)|0);i=f;return}else if((j|0)==46){o1(b-g|0,d-g|0);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=g+b,c[v+8>>2]=g+d,v)|0);i=f;return}else if((j|0)==22){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178624,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==34){o=b-g|0;o1(o,d);l=d-g|0;o2(o,l);k=g+b|0;o2(k,l);o2(k,d);o1(o,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=g+d,v)|0);i=f;return}else if((j|0)==37){k=d-g|0;o1(b,k);o=g+b|0;o2(o,k);l=g+d|0;o2(o,l);o2(b,l);o1(b-g|0,k);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=l,v)|0);i=f;return}else if((j|0)==3){l=(g*3&-1|0)/4&-1;k=b-l|0;o=d-l|0;o1(k,o);m=l+b|0;o2(m,o);e=l+d|0;o2(m,e);o2(k,e);o2(k,o);o1(b,d);o2(b,d);i=f;return}else if((j|0)==5){o1(b,d);o2(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179248,(v=i,i=i+8|0,h[v>>3]=+(g|0)*3.0*.25,v)|0);i=f;return}else if((j|0)==10){o=g*3&-1;k=d-((o|0)/4&-1)|0;o1(b,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);s=+(b>>>0>>>0);t=+(g|0)*5.196152422706632*.125;e=((o|0)/8&-1)+d|0;o2(~~(s-t),e);o2(~~(s+t),e);o2(b,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==58){k=(g|0)/2&-1;e=b-k|0;o=d-k|0;o1(e,o);o2(b,d-g|0);m=k+b|0;o2(m,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,d);o2(e,o);o2(b-g|0,d);o2(b,g+d|0);o2(g+b|0,d);o2(m,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==51){o=(g|0)/2&-1;m=o+b|0;e=d-o|0;o1(m,e);o2(g+b|0,d);o2(b,g+d|0);o2(b-g|0,d);k=b-o|0;o2(k,e);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,d);o2(m,e);o2(b,d-g|0);o2(k,e);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==36){e=d-g|0;o1(b,e);k=g+b|0;o2(k,e);o2(k,d);m=g+d|0;o1(b,m);o=b-g|0;o2(o,m);o2(o,d);o1(o,e);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=m,v)|0);i=f;return}else if((j|0)==42){m=b-g|0;o1(m,d);k=d-g|0;o2(m,k);o2(b,k);aI(125976,2,1,c[10030]|0);a[235520]=0;k=g+d|0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=g+b,c[v+8>>2]=k,v)|0);o1(m,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=k,v)|0);i=f;return}else if((j|0)==67){k=(g*3&-1|0)/4&-1;m=b-k|0;o1(m,d);o2(b,d-k|0);o2(k+b|0,d);o2(b,k+d|0);o2(m,d);i=f;return}else if((j|0)==71){m=g*3&-1;k=((m|0)/4&-1)+d|0;o1(b,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);t=+(b>>>0>>>0);s=+(g|0)*5.196152422706632*.125;e=d-((m|0)/8&-1)|0;o2(~~(t-s),e);o2(~~(t+s),e);o2(b,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(178056,22,1,c[10030]|0);i=f;return}else if((j|0)==63){k=(g*3&-1|0)/4&-1;e=b-k|0;m=d-k|0;o1(e,m);o=k+b|0;o2(o,m);l=k+d|0;o2(o,l);o2(e,l);o2(e,m);i=f;return}else if((j|0)==27){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178328,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==15){o1(b,g+d|0);o2(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179104,(v=i,i=i+8|0,c[v>>2]=g,v)|0);i=f;return}else if((j|0)==60){m=(g|0)/2&-1;e=b-m|0;l=m+d|0;o1(e,l);o2(b-g|0,d);o=d-m|0;o2(e,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,d-g|0);o2(g+b|0,d);o2(b,g+d|0);o2(e,l);o2(b,d);o2(e,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==29){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178264,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==69){o1(b-g|0,d-g|0);aI(125976,2,1,c[10030]|0);a[235520]=0;o=(g*3&-1|0)/4&-1;cf(c[10030]|0,178192,(v=i,i=i+16|0,c[v>>2]=o+b,c[v+8>>2]=o+d,v)|0);i=f;return}else if((j|0)==59){o=(g|0)/2&-1;e=o+b|0;l=o+d|0;o1(e,l);o2(b,g+d|0);o2(b-g|0,d);m=b-o|0;k=d-o|0;o2(m,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(e,l);o2(g+b|0,d);o2(b,d-g|0);o2(m,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==31){k=b-g|0;m=d-g|0;o1(k,m);l=g+b|0;o2(l,m);e=g+d|0;o2(l,e);o2(k,e);o2(k,m);o1(b,e);o2(b,d);i=f;return}else if((j|0)==0){e=b-g|0;o1(e,d);o2(e,d);o2(g+b|0,d);e=d-g|0;o1(b,e);o2(b,e);o2(b,g+d|0);i=f;return}else if((j|0)==9){e=g*3&-1;m=d-((e|0)/4&-1)|0;o1(b,m);s=+(b>>>0>>>0);t=+(g|0)*5.196152422706632*.125;k=((e|0)/8&-1)+d|0;o2(~~(s-t),k);o2(~~(s+t),k);o2(b,m);o1(b,d);o2(b,d);i=f;return}else if((j|0)==61){m=(g|0)/2&-1;k=m+b|0;e=m+d|0;o1(k,e);o2(b,g+d|0);l=b-m|0;o2(l,e);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b-g|0,d);o2(b,d-g|0);o2(g+b|0,d);o2(k,e);o2(b,d);o2(l,e);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==48){e=(g|0)/2&-1;l=b-e|0;k=e+d|0;o1(l,k);o2(b-g|0,d);o2(b,d-g|0);o2(g+b|0,d);m=e+b|0;o2(m,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,g+d|0);o2(l,k);o2(b,d);o2(m,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==16){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179008,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==1){k=b-g|0;m=d-g|0;o1(k,m);o2(k,m);l=g+b|0;e=g+d|0;o2(l,e);o1(k,e);o2(k,e);o2(l,m);i=f;return}else if((j|0)==55){m=(g|0)/2&-1;l=m+b|0;e=m+d|0;o1(l,e);o2(b,g+d|0);o2(b-g|0,d);o2(b,d-g|0);k=d-m|0;o2(l,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,d);o2(l,e);o2(g+b|0,d);o2(l,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==7){k=g*3&-1;l=((k|0)/4&-1)+d|0;o1(b,l);t=+(b>>>0>>>0);s=+(g|0)*5.196152422706632*.125;e=d-((k|0)/8&-1)|0;o2(~~(t-s),e);o2(~~(t+s),e);o2(b,l);o1(b,d);o2(b,d);i=f;return}else if((j|0)==39){l=g+b|0;o1(l,d);e=g+d|0;o2(l,e);k=b-g|0;o2(k,e);e=d-g|0;o2(k,e);o2(b,e);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=l,c[v+8>>2]=d,v)|0);i=f;return}else if((j|0)==28){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178296,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==20){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178752,(v=i,i=i+32|0,c[v>>2]=g,c[v+8>>2]=g,c[v+16>>2]=g,c[v+24>>2]=g,v)|0);i=f;return}else if((j|0)==64){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179248,(v=i,i=i+8|0,h[v>>3]=+(g|0)*3.0*.25,v)|0);i=f;return}else if((j|0)==65){l=g*3&-1;e=((l|0)/4&-1)+d|0;o1(b,e);s=+(b>>>0>>>0);t=+(g|0)*5.196152422706632*.125;k=d-((l|0)/8&-1)|0;o2(~~(s-t),k);o2(~~(s+t),k);o2(b,e);i=f;return}else if((j|0)==66){e=g*3&-1;k=d-((e|0)/4&-1)|0;o1(b,k);t=+(b>>>0>>>0);s=+(g|0)*5.196152422706632*.125;l=((e|0)/8&-1)+d|0;o2(~~(t-s),l);o2(~~(t+s),l);o2(b,k);i=f;return}else if((j|0)==62){k=b-g|0;o1(k,d);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,d-g|0);o2(g+b|0,d);o2(b,g+d|0);o2(k,d);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==8){k=g*3&-1;l=((k|0)/4&-1)+d|0;o1(b,l);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);s=+(b>>>0>>>0);t=+(g|0)*5.196152422706632*.125;e=d-((k|0)/8&-1)|0;o2(~~(s-t),e);o2(~~(s+t),e);o2(b,l);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==11){l=(g*3&-1|0)/4&-1;e=b-l|0;o1(e,d);o2(b,d-l|0);o2(l+b|0,d);o2(b,l+d|0);o2(e,d);o1(b,d);o2(b,d);i=f;return}else if((j|0)==70){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178096,(v=i,i=i+8|0,h[v>>3]=+(g|0)*3.0*.25,v)|0);i=f;return}else if((j|0)==21){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178720,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==44){e=g+d|0;o1(b,e);l=b-g|0;o2(l,e);o2(l,d);o1(l,d-g|0);aI(125976,2,1,c[10030]|0);a[235520]=0;l=g+b|0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=l,c[v+8>>2]=d,v)|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=l,c[v+8>>2]=e,v)|0);i=f;return}else if((j|0)==45){e=g+b|0;o1(e,d);l=g+d|0;o2(e,l);o2(b,l);k=b-g|0;o1(k,d-g|0);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=e,c[v+8>>2]=d,v)|0);o1(k,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=l,v)|0);i=f;return}else if((j|0)==43){l=g+b|0;o1(l,d);k=g+d|0;o2(l,k);e=b-g|0;o2(e,k);o2(e,d);o1(e,d-g|0);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=l,c[v+8>>2]=d,v)|0);i=f;return}else if((j|0)==53){l=(g|0)/2&-1;e=l+b|0;k=d-l|0;o1(e,k);o2(g+b|0,d);o2(b,g+d|0);m=b-l|0;o=l+d|0;o2(m,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b-g|0,d);o2(b,d-g|0);o2(e,k);o2(m,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==56){o=(g|0)/2&-1;m=b-o|0;k=o+d|0;o1(m,k);o2(b-g|0,d);o2(b,d-g|0);e=o+b|0;l=d-o|0;o2(e,l);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(m,k);o2(b,g+d|0);o2(g+b|0,d);o2(e,l);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==18){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178904,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==73){l=(g*3&-1|0)/4&-1;e=b-l|0;o1(e,d);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,d-l|0);o2(l+b|0,d);o2(b,l+d|0);o2(e,d);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(178056,22,1,c[10030]|0);i=f;return}else if((j|0)==50){e=(g|0)/2&-1;l=b-e|0;k=d-e|0;o1(l,k);o2(b,d-g|0);o2(g+b|0,d);m=e+b|0;o=e+d|0;o2(m,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(l,k);o2(b-g|0,d);o2(b,g+d|0);o2(m,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==2){o=b-g|0;o1(o,d);o2(o,d);m=g+b|0;o2(m,d);k=d-g|0;o1(b,k);o2(b,k);l=g+d|0;o2(b,l);o1(o,k);o2(o,k);o2(m,l);o1(o,l);o2(o,l);o2(m,k);i=f;return}else if((j|0)==12){k=(g*3&-1|0)/4&-1;m=b-k|0;o1(m,d);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,d-k|0);o2(k+b|0,d);o2(b,k+d|0);o2(m,d);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==17){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178960,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==4){m=(g*3&-1|0)/4&-1;o1(b-m|0,d-m|0);aI(125976,2,1,c[10030]|0);a[235520]=0;t=+(m|0);cf(c[10030]|0,179264,(v=i,i=i+16|0,h[v>>3]=+(b>>>0>>>0)+t,h[v+8>>3]=+(d>>>0>>>0)+t,v)|0);i=f;return}else if((j|0)==72){m=g*3&-1;k=d-((m|0)/4&-1)|0;o1(b,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);t=+(b>>>0>>>0);s=+(g|0)*5.196152422706632*.125;l=((m|0)/8&-1)+d|0;o2(~~(t-s),l);o2(~~(t+s),l);o2(b,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(178056,22,1,c[10030]|0);i=f;return}else if((j|0)==35){k=d-g|0;o1(b,k);l=g+b|0;o2(l,k);m=g+d|0;o2(l,m);l=b-g|0;o2(l,m);o2(l,d);o1(l,k);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);i=f;return}else if((j|0)==32){k=g+d|0;o1(b,k);l=b-g|0;o2(l,k);m=d-g|0;o2(l,m);l=g+b|0;o2(l,m);o2(l,d);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=l,c[v+8>>2]=k,v)|0);i=f;return}else if((j|0)==47){k=b-g|0;o1(k,d);o2(b,d-g|0);o2(g+b|0,d);o2(b,g+d|0);o2(k,d);k=(g|0)/2&-1;o1(b-k|0,k+d|0);o2(b,d);i=f;return}else if((j|0)==40){k=g+d|0;o1(b,k);l=b-g|0;o2(l,k);m=d-g|0;o2(l,m);o2(b,m);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=g+b,c[v+8>>2]=k,v)|0);i=f;return}else if((j|0)==24){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178496,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==6){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179192,(v=i,i=i+8|0,h[v>>3]=+(g|0)*3.0*.25,v)|0);i=f;return}else if((j|0)==41){k=b-g|0;o1(k,d);m=d-g|0;o2(k,m);o2(b,m);l=g+b|0;o1(l,d);o=g+d|0;o2(l,o);o2(b,o);o1(k,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=o,v)|0);o1(b,m);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178224,(v=i,i=i+16|0,c[v>>2]=l,c[v+8>>2]=d,v)|0);i=f;return}else if((j|0)==25){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178392,(v=i,i=i+32|0,c[v>>2]=g,c[v+8>>2]=g,c[v+16>>2]=g,c[v+24>>2]=g,v)|0);i=f;return}else if((j|0)==19){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178872,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==23){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178536,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==26){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178360,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=g,v)|0);i=f;return}else if((j|0)==30){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,178240,(v=i,i=i+8|0,c[v>>2]=g,v)|0);i=f;return}else if((j|0)==49){l=(g|0)/2&-1;m=b-l|0;o=d-l|0;o1(m,o);o2(b,d-g|0);o2(g+b|0,d);o2(b,g+d|0);k=l+d|0;o2(m,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b-g|0,d);o2(m,o);o2(b,d);o2(m,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==74){k=((g*3&-1|0)/4&-1)+d|0;o1(b,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);s=+(b>>>0>>>0);t=+(g|0);q=t*2.8531695488854605*.25;r=+(d>>>0>>>0);m=~~(r+t*.9270509831248421*.25);o2(~~(s-q),m);p=t*1.7633557568774194*.25;o=~~(r-t*2.4270509831248424*.25);o2(~~(s-p),o);o2(~~(s+p),o);o2(~~(s+q),m);o2(b,k);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(178056,22,1,c[10030]|0);i=f;return}else if((j|0)==57){k=(g|0)/2&-1;m=k+b|0;o=k+d|0;o1(m,o);o2(b,g+d|0);l=b-k|0;o2(l,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,d);e=d-k|0;o2(l,e);o2(b-g|0,d);o2(l,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);o1(l,e);o2(b,d-g|0);o2(m,e);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,d);o2(m,o);o2(g+b|0,d);o2(m,e);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else if((j|0)==54){j=(g|0)/2&-1;e=j+b|0;m=d-j|0;o1(e,m);o2(g+b|0,d);o=j+d|0;o2(e,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179152,5,1,c[10030]|0);o2(b,g+d|0);o2(b-g|0,d);o2(b,d-g|0);o2(e,m);o2(b,d);o2(e,o);aI(125976,2,1,c[10030]|0);a[235520]=0;aI(179120,11,1,c[10030]|0);i=f;return}else{i=f;return}}function o8(a){a=+a;h[29420]=a>=0.0?a:1.0;return}function o9(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0.0;d=i;i=i+64|0;e=d|0;f=d+56|0;g=c[3524]|0;if(a[235520]|0){j=c[10030]|0;aI(125976,2,1,j|0);a[235520]=0}j=bk(b|0,148464)|0;k=e|0;uF(k|0,b|0,j|0);a[e+j|0]=0;e=0;while(1){if(e>>>0>=17){break}l=c[235528+(e*48&-1)>>2]|0;if((a_(k|0,l|0,bk(l|0,180784)|0)|0)==0){break}else{e=e+1|0}}k=e>>>0>16?c[59088]|0:e;c[f>>2]=0;ca(b+(j+1|0)|0,21e4,(v=i,i=i+8|0,c[v>>2]=f,v)|0);j=c[f>>2]|0;if((j|0)>0){m=+(j|0)}else{m=+h[29422]}if(m==+h[29421]&(k|0)==(c[59086]|0)){n=0;i=d;return n|0}c[59090]=235528+(k*48&-1);c[59086]=k;h[29421]=m;k=~~(m*1016.0/72.0);c[g+16>>2]=k;c[g+20>>2]=(k<<1>>>0)/3>>>0;k=c[59090]|0;g=c[k+12>>2]|0;cf(c[10030]|0,180696,(v=i,i=i+16|0,c[v>>2]=c[k+8>>2],c[v+8>>2]=g,v)|0);g=c[59090]|0;m=+h[29421];if((c[g+12>>2]|0)==0){o=216.0/(m*2.0);h[g+16>>3]=o;k=c[10030]|0;cf(k|0,180656,(v=i,i=i+8|0,h[v>>3]=o,v)|0)}else{h[g+24>>3]=m;g=c[10030]|0;cf(g|0,180672,(v=i,i=i+8|0,h[v>>3]=m,v)|0)}g=c[59090]|0;k=c[g+36>>2]|0;j=c[g+40>>2]|0;cf(c[10030]|0,180632,(v=i,i=i+24|0,c[v>>2]=c[g+32>>2],c[v+8>>2]=k,c[v+16>>2]=j,v)|0);n=1;i=d;return n|0}function pa(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0.0,N=0,O=0,P=0.0,Q=0.0;b=i;i=i+24|0;d=b|0;e=c[13898]|0;f=c[8272]|0;if((e|0)<(f|0)){g=e;j=f}else{k=c[58772]|0;l=a[234984]|0;m=l?78720:78704;n=c[58574]|0;o=c[58572]|0;p=be(13048,180808,(v=i,i=i+32|0,c[v>>2]=k,c[v+8>>2]=m,c[v+16>>2]=n,c[v+24>>2]=o,v)|0)|0;i=b;return}L20934:while(1){f=c[1054]|0;e=(a[f+(g*40&-1)|0]&1)==0;L20936:do{if(!e){q=c[f+(g*40&-1)+36>>2]|0;r=f+(g*40&-1)+32|0;s=c[10036]|0;t=0;while(1){if((t|0)>=(q|0)){break}if((a[s+((c[r>>2]|0)+t|0)|0]|0)==(a[t+103664|0]|0)){t=t+1|0}else{break L20936}}if((t|0)==1){u=15625;break L20934}}}while(0);r=c[58760]|0;L20943:do{if((r|0)==0){w=235040}else{s=c[f+(g*40&-1)+36>>2]|0;q=c[f+(g*40&-1)+32>>2]|0;x=(s|0)>0;y=c[10036]|0;z=235040;A=r;while(1){L20947:do{if(!e){if(x){B=0;C=0;D=q;while(1){E=a[A+B|0]|0;if(E<<24>>24==(a[y+(B+D|0)|0]|0)){F=D;G=C}else{if(E<<24>>24!=36){break L20947}F=D-1|0;G=1}H=B+1|0;if((H|0)<(G+s|0)){B=H;C=G;D=F}else{break}}if((G|0)==0){I=H}else{w=z;break L20943}}else{I=0}D=a[A+I|0]|0;if((D<<24>>24|0)==36|(D<<24>>24|0)==0){w=z;break L20943}}}while(0);D=z+8|0;C=c[D>>2]|0;if((C|0)==0){w=D;break}else{z=D;A=C}}}}while(0);r=c[w+4>>2]|0;L20960:do{if((r|0)==0){a[234984]=1;a[235e3]=1;a[234992]=1;a[235272]=1;a[235264]=1;c[13898]=g+1}else if((r|0)==1){a[234984]=0;c[13898]=g+1}else{L20963:do{if(!((j|0)<=(g|0)|e)){A=c[f+(g*40&-1)+36>>2]|0;z=f+(g*40&-1)+32|0;s=c[10036]|0;y=0;while(1){if((y|0)>=(A|0)){break}if((a[s+((c[z>>2]|0)+y|0)|0]|0)==(a[y+78280|0]|0)){y=y+1|0}else{break L20963}}if((y|0)!=1){break}J=g+1|0;c[13898]=J;z=(j|0)>(J|0);if(!z){u=15629;break L20934}if((a[f+(J*40&-1)|0]&1)!=0){A=c[f+(J*40&-1)+36>>2]|0;q=f+(J*40&-1)+32|0;x=0;while(1){if((x|0)>=(A|0)){u=15562;break}if((a[s+((c[q>>2]|0)+x|0)|0]|0)==(a[x+78864|0]|0)){x=x+1|0}else{break}}do{if((u|0)==15562){u=0;if((x|0)!=1){break}if((c[58576]|0)!=0){tG()}q=c[10030]|0;aF(219,q|0);c[13898]=(c[13898]|0)+1;break L20960}}while(0);if(!z){u=15627;break L20934}}x=(a[f+(J*40&-1)|0]&1)==0;L20984:do{if(x){u=15578}else{q=c[f+(J*40&-1)+36>>2]|0;A=f+(J*40&-1)+32|0;y=0;while(1){if((y|0)>=(q|0)){u=15571;break}if((a[s+((c[A>>2]|0)+y|0)|0]|0)==(a[y+103664|0]|0)){y=y+1|0}else{break}}if((u|0)==15571){u=0;if((y|0)==1){u=15628;break L20934}}if(x){u=15578;break}A=c[f+(J*40&-1)+36>>2]|0;q=f+(J*40&-1)+32|0;t=0;while(1){if((t|0)>=(A|0)){break}if((a[s+((c[q>>2]|0)+t|0)|0]|0)==(a[t+148464|0]|0)){t=t+1|0}else{u=15578;break L20984}}if((t|0)==1){K=J;L=j}else{u=15578}}}while(0);if((u|0)==15578){u=0;s=is(d)|0;x=c[s>>2]|0;if((x|0)==2){M=+h[s+8>>3]}else if((x|0)==1){M=+(c[s+8>>2]|0)}else if((x|0)==3){M=+uz(c[s+8>>2]|0,0)}else{u=15582;break L20934}c[58574]=~~M;K=c[13898]|0;L=c[8272]|0}if((L|0)<=(K|0)){u=15631;break L20934}s=c[1054]|0;if((a[s+(K*40&-1)|0]&1)==0){u=15632;break L20934}x=c[s+(K*40&-1)+36>>2]|0;z=s+(K*40&-1)+32|0;q=c[10036]|0;A=0;while(1){if((A|0)>=(x|0)){break}if((a[q+((c[z>>2]|0)+A|0)|0]|0)==(a[A+148464|0]|0)){A=A+1|0}else{u=15633;break L20934}}if((A|0)!=1){u=15630;break L20934}z=K+1|0;c[13898]=z;L21012:do{if((L|0)>(z|0)){if((a[s+(z*40&-1)|0]&1)==0){u=15597;break}x=c[s+(z*40&-1)+36>>2]|0;y=s+(z*40&-1)+32|0;C=0;while(1){if((C|0)>=(x|0)){break}if((a[q+((c[y>>2]|0)+C|0)|0]|0)==(a[C+78864|0]|0)){C=C+1|0}else{u=15597;break L21012}}if((C|0)==1){N=z;O=L}else{u=15597}}else{u=15597}}while(0);if((u|0)==15597){u=0;z=is(d)|0;q=c[z>>2]|0;if((q|0)==3){P=+uz(c[z+8>>2]|0,0)}else if((q|0)==2){P=+h[z+8>>3]}else if((q|0)==1){P=+(c[z+8>>2]|0)}else{u=15601;break L20934}c[58572]=~~P;N=c[13898]|0;O=c[8272]|0}if((O|0)<=(N|0)){u=15621;break L20934}z=c[1054]|0;if((a[z+(N*40&-1)|0]&1)==0){u=15623;break L20934}q=c[z+(N*40&-1)+36>>2]|0;s=z+(N*40&-1)+32|0;z=c[10036]|0;A=0;while(1){if((A|0)>=(q|0)){break}if((a[z+((c[s>>2]|0)+A|0)|0]|0)==(a[A+78864|0]|0)){A=A+1|0}else{u=15622;break L20934}}if((A|0)!=1){u=15620;break L20934}c[13898]=N+1;break L20960}}while(0);s=is(d)|0;z=c[s>>2]|0;if((z|0)==2){Q=+h[s+8>>3]}else if((z|0)==3){Q=+uz(c[s+8>>2]|0,0)}else if((z|0)==1){Q=+(c[s+8>>2]|0)}else{u=15616;break L20934}s=~~Q;z=(s|0)<8?8:s;c[58772]=z;if((z|0)<=15){break}c[58772]=15}}while(0);f=c[13898]|0;e=c[8272]|0;if((f|0)<(e|0)){g=f;j=e}else{u=15624;break}}if((u|0)==15633){uf(K,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15632){uf(K,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15625){k=c[58772]|0;l=a[234984]|0;m=l?78720:78704;n=c[58574]|0;o=c[58572]|0;p=be(13048,180808,(v=i,i=i+32|0,c[v>>2]=k,c[v+8>>2]=m,c[v+16>>2]=n,c[v+24>>2]=o,v)|0)|0;i=b;return}else if((u|0)==15627){uf(J,78976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15628){uf(J,78976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15582){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15621){uf(N,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15622){uf(N,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15601){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15623){uf(N,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15624){k=c[58772]|0;l=a[234984]|0;m=l?78720:78704;n=c[58574]|0;o=c[58572]|0;p=be(13048,180808,(v=i,i=i+32|0,c[v>>2]=k,c[v+8>>2]=m,c[v+16>>2]=n,c[v+24>>2]=o,v)|0)|0;i=b;return}else if((u|0)==15629){uf(J,78976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15630){uf(K,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15616){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15631){uf(K,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((u|0)==15620){uf(N,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function pb(){return}function pc(){var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0;d=i;i=i+24|0;e=d|0;f=c[3524]|0;g=a[235272]|0?2340:3300;c[58758]=((a[234992]|0?2490:3480)-g|0)/2&-1;h=a[235264]|0?3300:2340;c[58756]=((a[235e3]|0?3480:2490)-h|0)/2&-1;j=(g|0)/(c[58574]|0)&-1;c[58742]=j;c[58738]=j;g=(h|0)/(c[58572]|0)&-1;c[58740]=g;c[58736]=g;c[f+8>>2]=j;c[f+12>>2]=c[58736];aI(180888,37,1,c[10030]|0);if(a[234984]|0){f=c[10030]|0;aF(137,f|0);f=c[10030]|0;aF(13,f|0);f=c[10030]|0;aF(3520,f|0)}aF(205,c[10030]|0);f=a[234984]|0;aF((f?120:24)|(f?0:5)|0,c[10030]|0);f=32;do{b[234432+(f<<1)>>1]=f&65535;f=f+1|0;}while((f|0)<127);b[117217]=225;b[117218]=233;b[117219]=-3800;b[117220]=241;b[117221]=249;b[117222]=-3672;b[117223]=162;b[117224]=163;b[117225]=164;b[117226]=165;b[117227]=167;b[117228]=171;b[117229]=182;b[117230]=-4190;b[117231]=191;b[117232]=187;b[117233]=188;b[117234]=189;b[117235]=190;b[117236]=210;b[117237]=211;b[117238]=251;b[117239]=-4304;b[117240]=212;b[117241]=137;b[117242]=176;b[117243]=161;b[117244]=139;b[117245]=133;b[117246]=140;b[117247]=-4287;b[117248]=8738;b[117250]=186;b[117252]=164;b[117255]=185;b[117343]=-4250;f=32;do{a[f+234688|0]=f&255;f=f+1|0;}while((f|0)<128);uE(234816,-128|0,126);a[234849]=27;a[234850]=7;a[234851]=8;a[234852]=120;a[234853]=10;a[234854]=124;a[234855]=11;a[234856]=25;a[234857]=21;a[234858]=45;a[234859]=12;a[234860]=83;a[234861]=45;a[234862]=20;a[234863]=126;a[234864]=26;a[234865]=12;a[234866]=1;a[234867]=2;a[234868]=29;a[234869]=52;a[234870]=13;a[234871]=5;a[234872]=28;a[234873]=3;a[234874]=45;a[234875]=16;a[234876]=17;a[234877]=18;a[234878]=19;a[234879]=15;uE(234880,65,5);a[234885]=3;a[234886]=1;a[234887]=67;w=1162167621;a[234888]=w&255;w=w>>8;a[234889|0]=w&255;w=w>>8;a[234890|0]=w&255;w=w>>8;a[234891|0]=w&255;w=1229539657;a[234892]=w&255;w=w>>8;a[234893|0]=w&255;w=w>>8;a[234894|0]=w&255;w=w>>8;a[234895|0]=w&255;a[234896]=68;a[234897]=78;uE(234898,79,5);a[234903]=13;a[234904]=2;w=1431655765;a[234905]=w&255;w=w>>8;a[234906|0]=w&255;w=w>>8;a[234907|0]=w&255;w=w>>8;a[234908|0]=w&255;a[234909]=89;a[234910]=32;a[234911]=22;uE(234912,97,5);a[234917]=6;a[234918]=4;a[234919]=99;w=1701143909;a[234920]=w&255;w=w>>8;a[234921|0]=w&255;w=w>>8;a[234922|0]=w&255;w=w>>8;a[234923|0]=w&255;w=1768515945;a[234924]=w&255;w=w>>8;a[234925|0]=w&255;w=w>>8;a[234926|0]=w&255;w=w>>8;a[234927|0]=w&255;a[234928]=100;a[234929]=110;uE(234930,111,5);a[234935]=10;a[234936]=5;w=1970632053;a[234937]=w&255;w=w>>8;a[234938|0]=w&255;w=w>>8;a[234939|0]=w&255;w=w>>8;a[234940|0]=w&255;a[234941]=121;a[234942]=32;a[234943]=121;f=0;j=0;do{j=((b[234432+(f<<1)>>1]|0)!=0&1)+j|0;f=f+1|0;}while((f|0)<127);aF(222,c[10030]|0);aF(1,c[10030]|0);aF(j&255|0,c[10030]|0);j=0;do{f=b[234432+(j<<1)>>1]|0;if(f<<16>>16!=0){g=(f&65535)>>>8;h=c[10030]|0;aF(j|0,h|0);h=g&65535;g=c[10030]|0;aF(h|0,g|0);g=f&255;f=c[10030]|0;aF(g|0,f|0);f=c[10030]|0;aF(1,f|0)}j=j+1|0;}while((j|0)<127);j=c[58772]|0;f=e|0;e=235096+(j<<2)|0;if((c[e>>2]|0)==0){be(f|0,180880,(v=i,i=i+16|0,c[v>>2]=180824,c[v+8>>2]=j,v)|0);g=c[10030]|0;aF(221,g|0);g=c[10030]|0;aF(j|0,g|0);g=c[10030]|0;aF(1,g|0);g=c[10030]|0;aF(1,g|0);g=c[10030]|0;aK(f|0,g|0);g=c[10030]|0;aF(0,g|0);c[e>>2]=j}e=j*5&-1;c[58770]=e;c[58744]=(e|0)/2&-1;c[58812]=(e|0)/3&-1;c[(c[3524]|0)+16>>2]=e;c[(c[3524]|0)+20>>2]=c[58744];aF(207,c[10030]|0);aF(j|0,c[10030]|0);aF(210,c[10030]|0);j=c[58744]|0;aF(j>>>8|0,c[10030]|0);aF(j|0,c[10030]|0);aF(208,c[10030]|0);j=c[58770]|0;aF(j>>>8|0,c[10030]|0);aF(j|0,c[10030]|0);if((c[58576]|0)!=0){tG()}if((c[58814]|0)==0){k=c[10030]|0;l=aF(135,k|0)|0;m=c[10030]|0;n=aF(0,m|0)|0;o=c[10030]|0;p=aF(0,o|0)|0;q=c[10030]|0;r=aF(137,q|0)|0;s=c[10030]|0;t=aF(0,s|0)|0;u=c[10030]|0;x=aF(0,u|0)|0;ph(-1);a[234312]=1;c[58576]=0;i=d;return}c[58814]=0;aF(206,c[10030]|0);aF(0,c[10030]|0);k=c[10030]|0;l=aF(135,k|0)|0;m=c[10030]|0;n=aF(0,m|0)|0;o=c[10030]|0;p=aF(0,o|0)|0;q=c[10030]|0;r=aF(137,q|0)|0;s=c[10030]|0;t=aF(0,s|0)|0;u=c[10030]|0;x=aF(0,u|0)|0;ph(-1);a[234312]=1;c[58576]=0;i=d;return}function pd(){if((c[58576]|0)!=0){tG()}aF(255,c[10030]|0);return}function pe(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,i=0;if((c[58576]|0)!=0){tG()}a=c[58580]|0;b=c[58574]|0;d=c[58572]|0;if((a|0)<(aa(d,b)|0)){e=a;f=b;g=d}else{if((c[58576]|0)!=0){tG()}d=c[10030]|0;aF(219,d|0);c[58580]=0;e=0;f=c[58574]|0;g=c[58572]|0}c[58580]=e+1;d=c[58758]|0;b=c[58742]|0;a=aa(b,(e|0)%(f|0)&-1)+d|0;d=c[58756]|0;h=c[58740]|0;i=aa((g-1|0)-((e|0)/(f|0)&-1)|0,h)+d|0;c[58754]=a+((b-(c[58738]|0)|0)/2&-1);c[58752]=i+((h-(c[58736]|0)|0)/2&-1);return}function pf(a,b){a=a|0;b=b|0;if((c[58576]|0)!=0){tG()}c[58472]=(c[58754]|0)+a;c[58372]=(c[58752]|0)+b;c[58576]=1;return}function pg(b,d){b=b|0;d=d|0;var e=0,f=0;e=c[58576]|0;c[233888+(e<<2)>>2]=(c[58754]|0)+b;c[233488+(e<<2)>>2]=(c[58752]|0)+d;f=e+1|0;c[58576]=f;if(f>>>0<(a[234312]|0?100:0)>>>0){return}tG();c[58472]=(c[58754]|0)+b;c[58372]=(c[58752]|0)+d;c[58576]=1;return}function ph(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;if((c[58576]|0)!=0){tG()}d=(b|0)<-2?-2:b;if((d|0)==-2){e=4}else{b=((d|0)/8&-1)<<1;e=(b|0)<1?1:b}b=((d|0)%8&-1)+2|0;if((c[58766]|0)==(b|0)){return}c[58766]=b;aF(232,c[10030]|0);aF(e|0,c[10030]|0);aF(237,c[10030]|0);aF(0,c[10030]|0);aF(237,c[10030]|0);d=234328+(b*10&-1)|0;f=uA(d|0)|0;aF(f|0,c[10030]|0);f=a[d]|0;if(f<<24>>24==0){return}g=aa(f<<24>>24,e);aF(g>>>8|0,c[10030]|0);aF(g|0,c[10030]|0);if((uA(d|0)|0)>>>0>1){h=1}else{return}while(1){g=h+1|0;f=aa(a[234328+(b*10&-1)+h|0]|0,e);aF(f>>>8|0,c[10030]|0);aF(f|0,c[10030]|0);if(g>>>0<(uA(d|0)|0)>>>0){h=g}else{break}}return}function pi(a){a=a|0;if((c[58576]|0)!=0){tG()}if((c[58814]|0)==(a|0)){return 1}c[58814]=a;aF(206,c[10030]|0);aF(((a|0)==0?0:7)|0,c[10030]|0);return 1}function pj(a){a=a|0;if((c[58576]|0)!=0){tG()}c[58768]=a;return 1}function pk(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;b=i;d=c[13898]|0;e=c[8272]|0;L21144:do{if((d|0)<(e|0)){f=d;g=e;while(1){h=c[1054]|0;j=(a[h+(f*40&-1)|0]&1)==0;L21147:do{if(!j){k=c[h+(f*40&-1)+36>>2]|0;l=h+(f*40&-1)+32|0;n=c[10036]|0;o=0;while(1){if((o|0)>=(k|0)){break}if((a[n+((c[l>>2]|0)+o|0)|0]|0)==(a[o+103664|0]|0)){o=o+1|0}else{break L21147}}if((o|0)==1){break L21144}}}while(0);l=c[58164]|0;L21154:do{if((l|0)==0){p=232656}else{n=c[h+(f*40&-1)+36>>2]|0;k=c[h+(f*40&-1)+32>>2]|0;q=(n|0)>0;r=c[10036]|0;s=232656;t=l;while(1){L21158:do{if(!j){if(q){u=0;w=0;x=k;while(1){y=a[t+u|0]|0;if(y<<24>>24==(a[r+(u+x|0)|0]|0)){z=x;A=w}else{if(y<<24>>24!=36){break L21158}z=x-1|0;A=1}B=u+1|0;if((B|0)<(A+n|0)){u=B;w=A;x=z}else{break}}if((A|0)==0){C=B}else{p=s;break L21154}}else{C=0}x=a[t+C|0]|0;if((x<<24>>24|0)==36|(x<<24>>24|0)==0){p=s;break L21154}}}while(0);x=s+8|0;w=c[x>>2]|0;if((w|0)==0){p=x;break}else{s=x;t=w}}}}while(0);j=c[p+4>>2]|0;if((j|0)==0){a[34768]=1;l=f+1|0;c[13898]=l;D=l;E=g}else if((j|0)==3){a[34256]=0;l=f+1|0;c[13898]=l;D=l;E=g}else if((j|0)==2){a[34256]=1;l=f+1|0;c[13898]=l;D=l;E=g}else if((j|0)==1){a[34768]=0;j=f+1|0;c[13898]=j;D=j;E=g}else{aI(181208,337,1,c[m>>2]|0);j=(c[13898]|0)+1|0;c[13898]=j;D=j;E=c[8272]|0}if((D|0)<(E|0)){f=D;g=E}else{break}}}}while(0);E=a[34256]|0?181144:181176;be(13048,84616,(v=i,i=i+16|0,c[v>>2]=a[34768]|0?116408:181192,c[v+8>>2]=E,v)|0);i=b;return}function pl(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0;f=i;if((c[58576]|0)!=0){tG()}g=c[58810]|0;if((g|0)!=0){uu(g)}g=(uA(e|0)|0)+2|0;h=ut(g)|0;do{if((h|0)==0){gk();j=ut(g)|0;if((j|0)!=0){k=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=180928,v)|0)}else{k=h}}while(0);c[58810]=k;h=a[e]|0;if(h<<24>>24==0){l=k;m=1}else{g=e;e=k;k=1;j=h;while(1){h=j&255;do{if((h|0)==92){n=g+1|0;o=a[n]|0;if(o<<24>>24!=92){p=n;q=o;r=15734;break}a[e]=10;s=k+1|0;t=n}else if((h|0)==32){a[e]=-128;s=k;t=g}else{p=g;q=j;r=15734}}while(0);if((r|0)==15734){r=0;a[e]=a[234688+(q&255)|0]|0;s=k;t=p}h=e+1|0;n=t+1|0;o=a[n]|0;if(o<<24>>24==0){l=h;m=s;break}else{g=n;e=h;k=s;j=o}}}a[l]=10;a[l+1|0]=0;l=(c[58814]|0)==0;j=aa(c[58770]|0,m);m=c[58810]|0;if(l){u=m;w=b;x=(((j|0)/2&-1)+d|0)-(c[58770]|0)|0}else{u=m;w=(((j|0)/-2&-1)+b|0)+(c[58770]|0)|0;x=d}L21204:while(1){d=u;b=w;while(1){j=a8(d|0,10)|0;if((j|0)==0){break L21204}a[j]=0;m=(c[58814]|0)==0;l=c[58812]|0;s=b-(m?0:l)|0;k=(m?l:0)+x|0;l=uA(d|0)|0;e=aa(c[58744]|0,l);l=c[58768]|0;do{if((l|0)==1){g=(e|0)/2&-1;if(m){y=k;z=b-g|0;break}else{y=x-g|0;z=s;break}}else if((l|0)==2){if(m){y=k;z=b-e|0;break}else{y=x-e|0;z=s;break}}else{y=k;z=s}}while(0);aF(135,c[10030]|0);s=(c[58754]|0)+z|0;aF(s>>>8|0,c[10030]|0);aF(s|0,c[10030]|0);aF(137,c[10030]|0);s=(c[58752]|0)+y|0;aF(s>>>8|0,c[10030]|0);aF(s|0,c[10030]|0);aF(209,c[10030]|0);s=c[58754]|0;if((c[58814]|0)==1){k=s+y|0;e=k>>>8;m=c[10030]|0;aF(e|0,m|0);m=c[10030]|0;aF(k|0,m|0)}else{m=s+z|0;s=m>>>8;k=c[10030]|0;aF(s|0,k|0);k=c[10030]|0;aF(m|0,k|0)}aK(d|0,c[10030]|0);A=j+1|0;B=c[58770]|0;if((c[58814]|0)==0){break}else{d=A;b=B+b|0}}u=A;w=b;x=x-B|0}i=f;return}function pm(a){a=a|0;c[8546]=a;return 1}function pn(){var b=0,d=0,e=0,f=0,h=0;b=i;if(a[34544]|a[34552]){i=b;return}a[34544]=1;a[34552]=0;d=c[8619]|0;if((d|0)==34464){e=1;f=0}else{h=d;do{d=c[h+12>>2]|0;c[8619]=d;c[d+8>>2]=34464;uu(h);h=c[8619]|0;}while((h|0)!=34464);e=a[34544]|0;f=a[34552]|0}c[8619]=34464;c[8618]=34464;g[8616]=0.0;g[8617]=9.99899959564209;a[34336]=0;a[34272]=0;a[34192]=0;if(e&f){uD(34480,183216,21)}uE(34560,0,160);cf(c[10030]|0,181648,(v=i,i=i+48|0,c[v>>2]=40152,c[v+8>>2]=40160,c[v+16>>2]=72,c[v+24>>2]=9,c[v+32>>2]=40,c[v+40>>2]=56,v)|0);i=b;return}function po(){if(!(a[34544]&(a[34552]^1))){return}aI(182144,19,1,c[10030]|0);a[34544]=0;c[8680]=-1;return}function pp(){var b=0,d=0,e=0,f=0;b=i;if(!(a[34544]&a[34552])){i=b;return}if(!(a[34256]|0)){tF()}aI(182248,117,1,c[10030]|0);d=0;do{e=c[34564+(d<<3)>>2]|0;do{if((e|0)!=0){if((c[34560+(d<<3)>>2]|0)!=1){break}f=c[10030]|0;cf(f|0,182216,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}}while(0);d=d+1|0;}while((d|0)<20);cf(c[10030]|0,182168,(v=i,i=i+8|0,c[v>>2]=c[8680],v)|0);a[34552]=0;i=b;return}function pq(){var b=0,d=0,e=0,f=0,j=0;b=i;if(!(a[34544]&(a[34552]^1))){i=b;return}a[34552]=1;c[8680]=(c[8680]|0)+1;d=c[8619]|0;if((d|0)==34464){e=1;f=1}else{j=d;do{d=c[j+12>>2]|0;c[8619]=d;c[d+8>>2]=34464;uu(j);j=c[8619]|0;}while((j|0)!=34464);e=a[34544]|0;f=a[34552]|0}c[8619]=34464;c[8618]=34464;g[8616]=0.0;g[8617]=9.99899959564209;a[34336]=0;a[34272]=0;a[34192]=0;if(e&f){uD(34480,183216,21)}uE(34560,0,160);f=c[8680]|0;cf(c[10030]|0,182384,(v=i,i=i+32|0,c[v>>2]=f,h[v+8>>3]=+(f|0)*10.1,h[v+16>>3]=15.0,h[v+24>>3]=10.0,v)|0);i=b;return}function pr(b,c){b=b|0;c=c|0;if(!(a[34544]&a[34552])){return}if(!(a[34256]|0)){tF()}g[8616]=+(b>>>0>>>0)/1.0e3;g[8617]=+(9999-c|0)/1.0e3;return}function ps(b){b=b|0;var d=0,e=0,f=0;d=i;if(!(a[34544]&a[34552])){i=d;return}if(!(a[34256]|0)){tF()}do{if((b|0)<0){do{if((b|0)==-1){c[8566]=24;if(a[34768]|0){break}uD(34192,182904,17)}else{c[8566]=16;if(a[34768]|0){break}uD(34192,182904,17)}}while(0);uD(34272,182856,20);uD(34120,182824,25)}else{e=(b|0)%16&-1;c[8566]=e;uD(34272,182800,20);if(a[34768]|0){break}f=((e|0)%6&-1)+2|0;be(34192,182776,(v=i,i=i+8|0,c[v>>2]=f,v)|0);if(a[34768]|0){break}f=((c[8566]|0)%6&-1)+2|0;be(34120,182664,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}}while(0);be(34336,182648,(v=i,i=i+8|0,c[v>>2]=c[34400+(((c[8566]|0)%16&-1)<<2)>>2],v)|0);i=d;return}function pt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0.0,m=0,n=0,o=0;f=i;if(!(a[34544]&a[34552])){i=f;return}if(a[34256]|0){j=1;k=1}else{tF();j=a[34544]|0;k=a[34552]|0}if(j&k){if(!(a[34256]|0)){tF()}g[8616]=+(b>>>0>>>0)/1.0e3;g[8617]=+(10063-d|0)/1.0e3}if((a[e]|0)==0){i=f;return}cf(c[10030]|0,183024,(v=i,i=i+40|0,c[v>>2]=(c[8566]|0)+1,c[v+8>>2]=34336,c[v+16>>2]=34272,c[v+24>>2]=34192,c[v+32>>2]=34120,v)|0);if((c[8682]|0)!=72){d=c[10030]|0;cf(d|0,183328,(v=i,i=i+8|0,c[v>>2]=72,v)|0);c[8682]=72}l=+g[8617];d=c[8546]|0;cf(c[10030]|0,182960,(v=i,i=i+40|0,h[v>>3]=+g[8616],h[v+8>>3]=l,c[v+16>>2]=34480,c[v+24>>2]=d,c[v+32>>2]=e,v)|0);e=(c[8566]|0)+1|0;L21319:do{if(a[34544]&a[34552]){d=0;while(1){if((d|0)>=20){break L21319}m=34564+(d<<3)|0;b=c[m>>2]|0;n=(b|0)==0;o=(b|0)==(e|0);if(n|o){break}else{d=d+1|0}}b=34560+(d<<3)|0;if(n){c[m>>2]=e;c[b>>2]=0;break}if(!o){break}c[b>>2]=1}}while(0);a[34336]=0;a[34272]=0;a[34192]=0;a[34480]=0;i=f;return}function pu(b){b=b|0;var c=0;do{if(a[34544]&a[34552]){if((b|0)==0){uD(34480,183216,21);c=1;break}else if((b|0)==2){uD(34480,183136,22);c=1;break}else if((b|0)==1){uD(34480,183184,23);c=1;break}else{c=0;break}}else{c=0}}while(0);return c|0}function pv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0;f=i;if((e|0)<0){j=-1}else{j=(e|0)%6&-1}if(!(a[34544]&a[34552])){i=f;return}if(a[34256]|0){k=1;l=1}else{tF();k=a[34544]|0;l=a[34552]|0}if(k&l){if(a[34256]|0){m=1;n=1}else{tF();m=a[34544]|0;n=a[34552]|0}g[8616]=+(b>>>0>>>0)/1.0e3;g[8617]=+(9999-d|0)/1.0e3;o=m;p=n}else{o=k;p=l}if(o&p){uD(34480,183184,23)}cf(c[10030]|0,183424,(v=i,i=i+16|0,c[v>>2]=(c[8566]|0)+1,c[v+8>>2]=34120,v)|0);p=c[33548+(j<<4)>>2]|0;if((c[8682]|0)!=(p|0)){o=c[10030]|0;cf(o|0,183328,(v=i,i=i+8|0,c[v>>2]=p,v)|0);c[8682]=p}q=+g[8617]+ +g[33544+(j<<4)>>2];p=c[33536+(j<<4)>>2]|0;cf(c[10030]|0,183368,(v=i,i=i+32|0,h[v>>3]=+g[8616]+ +g[33540+(j<<4)>>2],h[v+8>>3]=q,c[v+16>>2]=34480,c[v+24>>2]=p,v)|0);aI(183360,3,1,c[10030]|0);p=(c[8566]|0)+1|0;L21360:do{if(a[34544]&a[34552]){j=0;while(1){if((j|0)>=20){break L21360}r=34564+(j<<3)|0;o=c[r>>2]|0;s=(o|0)==0;t=(o|0)==(p|0);if(s|t){break}else{j=j+1|0}}o=34560+(j<<3)|0;if(s){c[r>>2]=p;c[o>>2]=0;break}if(!t){break}c[o>>2]=1}}while(0);a[34480]=0;i=f;return}function pw(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;j=i;k=b&15;if((k|0)==1){l=0}else if((k|0)==2){l=c[34736+(((b>>4|0)%8&-1)<<2)>>2]|0}else{l=7}cf(c[10030]|0,183520,(v=i,i=i+16|0,c[v>>2]=(c[8566]|0)+1,c[v+8>>2]=34192,v)|0);cf(c[10030]|0,183696,(v=i,i=i+8|0,c[v>>2]=l,v)|0);cf(c[10030]|0,183464,(v=i,i=i+32|0,h[v>>3]=+(d>>>0>>>0)/1.0e3,h[v+8>>3]=+(((9999-e|0)-g|0)>>>0>>>0)/1.0e3,h[v+16>>3]=+(f>>>0>>>0)/1.0e3,h[v+24>>3]=+(g>>>0>>>0)/1.0e3,v)|0);aI(183600,4,1,c[10030]|0);g=(c[8566]|0)+1|0;if(a[34544]&a[34552]){m=0}else{i=j;return}while(1){if((m|0)>=20){n=15879;break}o=34564+(m<<3)|0;f=c[o>>2]|0;p=(f|0)==0;q=(f|0)==(g|0);if(p|q){break}else{m=m+1|0}}if((n|0)==15879){i=j;return}n=34560+(m<<3)|0;if(p){c[o>>2]=g;c[n>>2]=0;i=j;return}if(!q){i=j;return}c[n>>2]=1;i=j;return}function px(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;cf(c[10030]|0,183712,(v=i,i=i+8|0,c[v>>2]=(c[8566]|0)+1,v)|0);cf(c[10030]|0,183696,(v=i,i=i+8|0,c[v>>2]=0,v)|0);cf(c[10030]|0,183648,(v=i,i=i+8|0,c[v>>2]=b,v)|0);f=c[10030]|0;if((b|0)>0){g=0;j=f;while(1){k=+(9999-(c[d+(g*12&-1)+4>>2]|0)|0)/1.0e3;cf(j|0,183624,(v=i,i=i+16|0,h[v>>3]=+(c[d+(g*12&-1)>>2]|0)/1.0e3,h[v+8>>3]=k,v)|0);l=g+1|0;m=c[10030]|0;if((l|0)<(b|0)){g=l;j=m}else{n=m;break}}}else{n=f}aI(183600,4,1,n|0);n=(c[8566]|0)+1|0;if(a[34544]&a[34552]){o=0}else{i=e;return}while(1){if((o|0)>=20){p=15896;break}q=34564+(o<<3)|0;f=c[q>>2]|0;r=(f|0)==0;s=(f|0)==(n|0);if(r|s){break}else{o=o+1|0}}if((p|0)==15896){i=e;return}p=34560+(o<<3)|0;if(r){c[q>>2]=n;c[p>>2]=0;i=e;return}if(!s){i=e;return}c[p>>2]=1;i=e;return}function py(b,d){b=b|0;d=d|0;var e=0,f=0.0,h=0.0,j=0;e=i;if(!(a[34544]&a[34552])){i=e;return}f=+(b>>>0>>>0)/1.0e3;h=+(9999-d|0)/1.0e3;d=ut(16)|0;do{if((d|0)==0){gk();b=ut(16)|0;if((b|0)!=0){j=b;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=182608,v)|0)}else{j=d}}while(0);c[(c[8619]|0)+8>>2]=j;c[(c[(c[8619]|0)+8>>2]|0)+8>>2]=34464;j=c[8619]|0;c[(c[j+8>>2]|0)+12>>2]=j;j=c[(c[8619]|0)+8>>2]|0;c[8619]=j;g[j>>2]=f;g[(c[8619]|0)+4>>2]=h;if(!(a[34256]|0)){i=e;return}tF();i=e;return}function pz(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0.0,bf=0.0,bg=0.0,bi=0.0,bj=0.0,bk=0.0,bl=0.0,bm=0,bn=0,bo=0,bp=0,bq=0.0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0,bz=0,bA=0,bB=0,bC=0,bD=0,bE=0,bF=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bL=0,bM=0,bN=0,bO=0,bP=0,bQ=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0,bY=0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0,b3=0,b4=0,b5=0,b6=0,b7=0,b8=0,b9=0,cb=0,cc=0,cd=0,ce=0,cf=0,cg=0,ch=0,ci=0,cj=0,ck=0,cl=0,cm=0,cn=0,co=0,cp=0,cq=0,cr=0,cs=0,ct=0,cu=0,cv=0,cw=0,cx=0,cz=0,cA=0,cB=0,cC=0,cD=0,cE=0,cF=0,cG=0,cH=0,cI=0.0,cJ=0.0,cK=0,cL=0;b=i;i=i+1272|0;d=b|0;e=b+24|0;f=b+48|0;j=b+72|0;k=b+96|0;l=b+120|0;m=b+144|0;n=b+168|0;o=b+192|0;p=b+1248|0;q=b+1256|0;r=b+1264|0;s=b+216|0;uE(s|0,0,1025);if((c[13898]|0)!=2){a[28824]=0}t=c[3524]|0;u=c[t>>2]|0;do{if((aY(u|0,168936)|0)==0){c[7118]=28e3;w=28e3}else{if((aY(u|0,169984)|0)==0){c[7118]=28304;w=28304;break}if((aY(u|0,170664)|0)==0){c[7118]=43680;w=43680;break}else{c[7118]=30304;w=30304;break}}}while(0);if((c[w>>2]|0)==3){w=c[7112]|0;if((w|0)!=0){uu(w)}c[7112]=0}else{c[t+88>>2]=90}t=c[13898]|0;w=c[8272]|0;L21446:do{if((t|0)<(w|0)){u=c[1054]|0;x=(a[u+(t*40&-1)|0]&1)==0;L21448:do{if(!x){y=c[u+(t*40&-1)+36>>2]|0;z=u+(t*40&-1)+32|0;A=c[10036]|0;B=0;while(1){if((B|0)>=(y|0)){break}if((a[A+((c[z>>2]|0)+B|0)|0]|0)==(a[B+103664|0]|0)){B=B+1|0}else{break L21448}}if((B|0)==1){C=t;D=w;break L21446}}}while(0);z=c[57330]|0;L21455:do{if((z|0)==0){E=229320}else{A=c[u+(t*40&-1)+36>>2]|0;y=c[u+(t*40&-1)+32>>2]|0;F=(A|0)>0;G=c[10036]|0;H=229320;I=z;while(1){L21459:do{if(!x){if(F){J=0;K=0;L=y;while(1){M=a[I+J|0]|0;if(M<<24>>24==(a[G+(J+L|0)|0]|0)){N=L;O=K}else{if(M<<24>>24!=36){break L21459}N=L-1|0;O=1}Q=J+1|0;if((Q|0)<(O+A|0)){J=Q;K=O;L=N}else{break}}if((O|0)==0){R=Q}else{E=H;break L21455}}else{R=0}L=a[I+R|0]|0;if((L<<24>>24|0)==36|(L<<24>>24|0)==0){E=H;break L21455}}}while(0);L=H+8|0;K=c[L>>2]|0;if((K|0)==0){E=L;break}else{H=L;I=K}}}}while(0);if((c[E+4>>2]|0)!=3){C=t;D=w;break}x=c[7118]|0;z=c[x>>2]|0;if((z|0)==2){uD(x|0,43536,144)}else if((z|0)==0){uD(x|0,27856,144)}else if((z|0)==3){u=x+32|0;I=c[u>>2]|0;if((I|0)==0){S=x}else{H=u;u=I;while(1){c[H>>2]=c[u>>2];uu(c[u+4>>2]|0);uu(c[u+8>>2]|0);uu(c[u+12>>2]|0);uu(u);I=c[7118]|0;A=I+32|0;G=c[A>>2]|0;if((G|0)==0){S=I;break}else{H=A;u=G}}}uD(S|0,30160,144)}else if((z|0)==1){uD(x|0,28160,144)}u=(c[3524]|0)+96|0;c[u>>2]=c[u>>2]&-33;u=(c[13898]|0)+1|0;c[13898]=u;H=c[8272]|0;if((u|0)>=(H|0)){C=u;D=H;break}G=c[1054]|0;if((a[G+(u*40&-1)|0]&1)==0){T=c[3524]|0;U=T|0;V=c[U>>2]|0;uf(u,134056,(v=i,i=i+8|0,c[v>>2]=V,v)|0)}A=c[G+(u*40&-1)+36>>2]|0;I=G+(u*40&-1)+32|0;G=c[10036]|0;y=0;while(1){if((y|0)>=(A|0)){break}if((a[G+((c[I>>2]|0)+y|0)|0]|0)==(a[y+103664|0]|0)){y=y+1|0}else{W=16364;break}}if((W|0)==16364){T=c[3524]|0;U=T|0;V=c[U>>2]|0;uf(u,134056,(v=i,i=i+8|0,c[v>>2]=V,v)|0)}if((y|0)==1){C=u;D=H;break}T=c[3524]|0;U=T|0;V=c[U>>2]|0;uf(u,134056,(v=i,i=i+8|0,c[v>>2]=V,v)|0)}else{C=t;D=w}}while(0);L21495:do{if((C|0)<(D|0)){w=e|0;t=e+8|0;V=d|0;U=d+8|0;T=o|0;S=o+8|0;E=n|0;R=n+8|0;Q=m|0;O=m+8|0;N=l|0;I=l+8|0;G=k|0;A=k+8|0;x=j|0;z=j+8|0;F=f|0;B=f+8|0;K=0;L=0;J=0;M=0;X=0;Y=0;Z=0;_=0;$=0;aa=0;ab=0;ac=0;ad=0;ae=0;af=0;ag=0;ah=0;ai=0;aj=0;ak=0;al=C;am=D;L21497:while(1){an=c[1054]|0;ao=(a[an+(al*40&-1)|0]&1)==0;L21499:do{if(!ao){ap=c[an+(al*40&-1)+36>>2]|0;aq=an+(al*40&-1)+32|0;ar=c[10036]|0;as=0;while(1){if((as|0)>=(ap|0)){break}if((a[ar+((c[aq>>2]|0)+as|0)|0]|0)==(a[as+103664|0]|0)){as=as+1|0}else{break L21499}}if((as|0)==1){break L21495}}}while(0);aq=c[57330]|0;L21506:do{if((aq|0)==0){at=229320}else{ar=c[an+(al*40&-1)+36>>2]|0;ap=c[an+(al*40&-1)+32>>2]|0;au=(ar|0)>0;av=c[10036]|0;aw=229320;ax=aq;while(1){L21510:do{if(!ao){if(au){ay=0;az=0;aA=ap;while(1){aB=a[ax+ay|0]|0;if(aB<<24>>24==(a[av+(ay+aA|0)|0]|0)){aC=aA;aD=az}else{if(aB<<24>>24!=36){break L21510}aC=aA-1|0;aD=1}aE=ay+1|0;if((aE|0)<(aD+ar|0)){ay=aE;az=aD;aA=aC}else{break}}if((aD|0)==0){aF=aE}else{at=aw;break L21506}}else{aF=0}aA=a[ax+aF|0]|0;if((aA<<24>>24|0)==36|(aA<<24>>24|0)==0){at=aw;break L21506}}}while(0);aA=aw+8|0;az=c[aA>>2]|0;if((az|0)==0){at=aA;break}else{aw=aA;ax=az}}}}while(0);ao=c[at+4>>2]|0;L21523:do{if((ao|0)==12){if(aa){W=16377;break L21497}aq=c[7118]|0;if(((c[aq>>2]|0)-2|0)>>>0>=2){W=16378;break L21497}a[aq+18|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=1;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==1){if(ak){W=16375;break L21497}aq=c[7118]|0;if((c[aq>>2]|0)!=3){W=16376;break L21497}c[aq+12>>2]=2;c[13898]=(c[13898]|0)+1;aG=1;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==10){if(J){W=16058;break L21497}a[(c[7118]|0)+17|0]=1;aq=(c[3524]|0)+96|0;c[aq>>2]=c[aq>>2]&-1025;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=1;aZ=L;a_=K}else if((ao|0)==24){c[p>>2]=0;a$=al+1|0;c[13898]=a$;if((c[c[7118]>>2]|0)!=3){W=16139;break L21497}aq=a[an+(a$*40&-1)|0]|0;L21534:do{if((am|0)>(a$|0)){if((aq&1)==0){W=16145;break}ax=c[an+(a$*40&-1)+36>>2]|0;aw=an+(a$*40&-1)+32|0;ar=c[10036]|0;av=0;while(1){if((av|0)>=(ax|0)){break}if((a[ar+((c[aw>>2]|0)+av|0)|0]|0)==(a[av+186440|0]|0)){av=av+1|0}else{W=16145;break L21534}}if((av|0)!=3){a0=ax;a1=aw;W=16148;break}ar=al+2|0;c[13898]=ar;a2=0;a3=ar}else{W=16145}}while(0);if((W|0)==16145){W=0;a0=c[an+(a$*40&-1)+36>>2]|0;a1=an+(a$*40&-1)+32|0;W=16148}L21544:do{if((W|0)==16148){W=0;if(!((aq&1)!=0&(a0|0)>0)){a2=0;a3=a$;break}ar=c[10036]|0;ap=0;au=0;as=c[a1>>2]|0;while(1){if((a[ap+186432|0]|0)==(a[ar+(ap+as|0)|0]|0)){a4=as;a5=au}else{if((ap|0)!=3){a2=0;a3=a$;break L21544}a4=as-1|0;a5=1}az=ap+1|0;if((az|0)<(a5+a0|0)){ap=az;au=a5;as=a4}else{break}}if((a5|0)==0){if(!((ap|0)==2|(ap|0)==6)){a2=0;a3=a$;break}}as=al+2|0;c[13898]=as;a2=1;a3=as}}while(0);if((a3|0)>=(am|0)){W=16165;break L21497}L21559:do{if((a[an+(a3*40&-1)|0]&1)!=0){aq=c[an+(a3*40&-1)+36>>2]|0;as=an+(a3*40&-1)+32|0;au=c[10036]|0;ar=0;while(1){if((ar|0)>=(aq|0)){break}if((a[au+((c[as>>2]|0)+ar|0)|0]|0)==(a[ar+103664|0]|0)){ar=ar+1|0}else{break L21559}}if((ar|0)==1){W=16165;break L21497}}}while(0);a[14176]=1;is(k);a[14176]=0;if((c[G>>2]|0)!=3){W=16164;break L21497}as=c[A>>2]|0;c[p>>2]=as;if((as|0)==0){W=16167;break L21497}as=c[(c[7118]|0)+32>>2]|0;au=ut(16)|0;if((au|0)==0){gk();aq=ut(16)|0;if((aq|0)==0){W=16171;break L21497}else{a6=aq}}else{a6=au}au=a6;aq=c[(c[1054]|0)+((c[13898]|0)*40&-1)+36>>2]|0;ap=ut(aq)|0;if((ap|0)==0){gk();aw=ut(aq)|0;if((aw|0)==0){W=16174;break L21497}else{a7=aw}}else{a7=ap}a8=a6+4|0;c[a8>>2]=a7;iQ(p);ap=c[p>>2]|0;c[a8>>2]=ap;c[a6+12>>2]=0;do{if(a2){c[a6>>2]=0}else{if((a[ap]|0)==60){c[a6+8>>2]=0;c[a6>>2]=0}else{aw=hB(ap)|0;c[a6+8>>2]=aw;if((aw|0)==0){W=16178;break L21497}c[a6>>2]=0}aw=c[8804]|0;if((aw|0)==0){W=16184}else{aq=aw;while(1){aw=c[aq+48>>2]|0;if((aw|0)==0){break}else{aq=aw}}if((a[aq+12|0]&1)==0){W=16184}}if((W|0)==16184){W=0;if((a[37400]&1)==0){break}}tD(au,0)}}while(0);ap=(c[7118]|0)+32|0;if((c[ap>>2]|0)==0){if(a2){uh((c[13898]|0)-1|0,186216,(v=i,i=i+8|0,c[v>>2]=c[a8>>2],v)|0);aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break}else{c[ap>>2]=au;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break}}do{if((as|0)==0){a9=0}else{ar=c[a8>>2]|0;aw=a2^1;ax=0;av=as;az=0;while(1){ba=av+4|0;aA=(aY(c[ba>>2]|0,ar|0)|0)!=0;if(!(aA|aw)){break}bb=ax|aA^1;aA=c[av>>2]|0;if((aA|0)==0){W=16196;break}else{ax=bb;az=av;av=aA}}if((W|0)==16196){W=0;if(bb){aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break L21523}else{a9=av;break}}ax=c[av>>2]|0;if((az|0)==0){c[ap>>2]=ax}else{c[az>>2]=ax}uu(c[ba>>2]|0);uu(c[av+8>>2]|0);uu(c[av+12>>2]|0);uu(av);aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break L21523}}while(0);if(a2){uh((c[13898]|0)-1|0,186216,(v=i,i=i+8|0,c[v>>2]=c[a8>>2],v)|0);aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break}else{c[a9>>2]=au;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break}}else if((ao|0)==13){if(M){W=16069;break L21497}a[(c[7118]|0)+19|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=1;aX=J;aZ=L;a_=K}else if((ao|0)==33){if(ae){W=16332;break L21497}ap=c[7118]|0;if(((c[ap>>2]|0)-2|0)>>>0<2){W=16333;break L21497}a[ap+96|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=1;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==34){if(ae){W=16373;break L21497}ap=c[7118]|0;if(((c[ap>>2]|0)-2|0)>>>0<2){W=16374;break L21497}a[ap+96|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=1;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==21){if(Z){W=16112;break L21497}a[(c[7118]|0)+30|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=1;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==23){if(_){W=16118;break L21497}a[(c[7118]|0)+31|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=1;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==22){if(_){W=16115;break L21497}a[(c[7118]|0)+31|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=1;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==25){ap=c[7118]|0;if((c[ap>>2]|0)!=3){W=16205;break L21497}as=ap+32|0;ap=c[as>>2]|0;if((ap|0)==0){bc=al}else{ax=as;as=ap;do{c[ax>>2]=c[as>>2];uu(c[as+4>>2]|0);uu(c[as+8>>2]|0);uu(c[as+12>>2]|0);uu(as);ax=(c[7118]|0)+32|0;as=c[ax>>2]|0;}while((as|0)!=0);bc=c[13898]|0}c[13898]=bc+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==41){a[(c[7118]|0)+114|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==42){c[13898]=al+1;as=hK()|0;ax=c[7118]|0;h[ax+120>>3]=+(as>>>16&255|0)/255.0;h[ax+128>>3]=+(as>>>8&255|0)/255.0;h[ax+136>>3]=+(as&255|0)/255.0;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==17){if(K){W=16338;break L21497}as=c[7118]|0;if((c[as>>2]|0)!=3){W=16339;break L21497}a[as+29|0]=0;a[(c[7118]|0)+28|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=1}else if((ao|0)==5){if(aj){W=16344;break L21497}if((c[c[7118]>>2]|0)!=3){W=16345;break L21497}c[(c[3524]|0)+68>>2]=116;c[(c[3524]|0)+88>>2]=90;as=(c[3524]|0)+96|0;c[as>>2]=c[as>>2]&-33;c[13898]=(c[13898]|0)+1;aG=ak;aH=1;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==2){if(ak){W=16334;break L21497}as=c[7118]|0;if((c[as>>2]|0)!=3){W=16335;break L21497}c[as+12>>2]=0;c[13898]=(c[13898]|0)+1;aG=1;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==19){if(K){W=16348;break L21497}as=c[7118]|0;if((c[as>>2]|0)!=3){W=16349;break L21497}a[as+28|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=1}else if((ao|0)==20){if(Z){W=16109;break L21497}a[(c[7118]|0)+30|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=1;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==28){if(L){W=15990;break L21497}a[(c[7118]|0)+16|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=1;a_=K}else if((ao|0)==3){W=15992;break L21497}else if((ao|0)==4){if(aj){W=16347;break L21497}if((c[c[7118]>>2]|0)!=3){W=16346;break L21497}c[(c[3524]|0)+68>>2]=86;c[(c[3524]|0)+88>>2]=126;as=(c[3524]|0)+96|0;c[as>>2]=c[as>>2]|32;c[13898]=(c[13898]|0)+1;aG=ak;aH=1;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==38){if(ac){W=16379;break L21497}if((c[c[7118]>>2]|0)!=2){W=16380;break L21497}uu(c[10956]|0);c[10956]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=1;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==16){if(Y){W=16086;break L21497}c[13898]=al+1;as=is(m)|0;ax=c[as>>2]|0;if((ax|0)==1){bd=+(c[as+8>>2]|0)}else if((ax|0)==2){bd=+h[as+8>>3]}else if((ax|0)==3){bd=+uz(c[as+8>>2]|0,0)}else{W=16091;break L21497}if((c[Q>>2]|0)==3){uu(c[O>>2]|0);c[Q>>2]=1}g[(c[7118]|0)+24>>2]=bd;as=(c[7118]|0)+24|0;if(+g[as>>2]>0.0){aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=1;aV=X;aW=M;aX=J;aZ=L;a_=K;break}g[as>>2]=1.0;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=1;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==30){if(ai){W=16121;break L21497}as=al+1|0;c[13898]=as;L21670:do{if((as|0)<(am|0)){L21672:do{if((a[an+(as*40&-1)|0]&1)!=0){ax=c[an+(as*40&-1)+36>>2]|0;au=an+(as*40&-1)+32|0;ap=c[10036]|0;aw=0;while(1){if((aw|0)>=(ax|0)){break}if((a[ap+((c[au>>2]|0)+aw|0)|0]|0)==(a[aw+103664|0]|0)){aw=aw+1|0}else{break L21672}}if((aw|0)==1){bf=-1.0;break L21670}}}while(0);av=is(l)|0;az=c[av>>2]|0;if((az|0)==3){bg=+uz(c[av+8>>2]|0,0)}else if((az|0)==1){bg=+(c[av+8>>2]|0)}else if((az|0)==2){bg=+h[av+8>>3]}else{W=16132;break L21497}if((c[N>>2]|0)==3){uu(c[I>>2]|0);c[N>>2]=1}bf=bg}else{bf=-1.0}}while(0);g[(c[7118]|0)+92>>2]=bf;as=(c[7118]|0)+92|0;if(+g[as>>2]>=0.0){aG=ak;aH=aj;aI=1;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break}g[as>>2]=1.0;aG=ak;aH=aj;aI=1;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==43){c[13898]=al+1;as=c[7118]|0;h[as+136>>3]=-1.0;h[as+128>>3]=-1.0;h[as+120>>3]=-1.0;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==26){if($){W=16214;break L21497}c[13898]=al+1;as=is(j)|0;av=c[as>>2]|0;if((av|0)==1){bi=+(c[as+8>>2]|0)}else if((av|0)==2){bi=+h[as+8>>3]}else if((av|0)==3){bi=+uz(c[as+8>>2]|0,0)}else{W=16219;break L21497}if((c[x>>2]|0)==3){uu(c[z>>2]|0);c[x>>2]=1}c[(c[7118]|0)+100>>2]=~~bi;as=(c[7118]|0)+100|0;if((c[as>>2]|0)<2){c[as>>2]=2}as=c[13898]|0;if((as|0)>=(c[8272]|0)){aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=1;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break}av=c[1054]|0;az=(a[av+(as*40&-1)|0]&1)==0;if(az){aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=1;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break}au=c[av+(as*40&-1)+36>>2]|0;ap=av+(as*40&-1)+32|0;ax=c[10036]|0;ar=0;while(1){if((ar|0)>=(au|0)){W=16229;break}if((a[ax+((c[ap>>2]|0)+ar|0)|0]|0)==(a[ar+103664|0]|0)){ar=ar+1|0}else{break}}if((W|0)==16229){W=0;if((ar|0)==1){aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=1;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break}}if(az){aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=1;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break}ap=c[av+(as*40&-1)+36>>2]|0;ax=av+(as*40&-1)+32|0;au=c[10036]|0;aq=0;while(1){if((aq|0)>=(ap|0)){break}if((a[au+((c[ax>>2]|0)+aq|0)|0]|0)==(a[aq+148464|0]|0)){aq=aq+1|0}else{aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=1;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break L21523}}if((aq|0)!=1){aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=1;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break}c[13898]=as+1;ax=is(f)|0;au=c[ax>>2]|0;if((au|0)==1){bj=+(c[ax+8>>2]|0)}else if((au|0)==2){bj=+h[ax+8>>3]}else if((au|0)==3){bj=+uz(c[ax+8>>2]|0,0)}else{W=16239;break L21497}if((c[F>>2]|0)==3){uu(c[B>>2]|0);c[F>>2]=1}bk=+P(+bj);h[(c[7118]|0)+104>>3]=bk;if(bk<1.0){aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=1;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else{W=16243;break L21497}}else if((ao|0)==14){if(M){W=16072;break L21497}a[(c[7118]|0)+19|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=1;aX=J;aZ=L;a_=K}else if((ao|0)==15){if(X){W=16075;break L21497}c[13898]=al+1;ax=is(n)|0;au=c[ax>>2]|0;if((au|0)==1){bl=+(c[ax+8>>2]|0)}else if((au|0)==2){bl=+h[ax+8>>3]}else if((au|0)==3){bl=+uz(c[ax+8>>2]|0,0)}else{W=16080;break L21497}if((c[E>>2]|0)==3){uu(c[R>>2]|0);c[E>>2]=1}g[(c[7118]|0)+20>>2]=bl;ax=(c[7118]|0)+20|0;if(+g[ax>>2]>0.0){aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=1;aW=M;aX=J;aZ=L;a_=K;break}g[ax>>2]=1.0;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=1;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==35){if(af){W=16352;break L21497}ax=c[7118]|0;if((c[ax>>2]|0)==3){W=16353;break L21497}a[ax+112|0]=1;ax=c[7118]|0;if((c[ax>>2]|0)==2){a[ax+30|0]=1}c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=1;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==18){if(K){W=16340;break L21497}ax=c[7118]|0;if((c[ax>>2]|0)!=3){W=16341;break L21497}a[ax+29|0]=1;a[(c[7118]|0)+28|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=1}else if((ao|0)==31){if(ad){W=16343;break L21497}ax=c[7118]|0;if((c[ax>>2]|0)>>>0>=2){W=16342;break L21497}a[ax+97|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=1;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==9){if(J){W=16055;break L21497}a[(c[7118]|0)+17|0]=0;ax=(c[3524]|0)+96|0;c[ax>>2]=c[ax>>2]|1024;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=1;aZ=L;a_=K}else if((ao|0)==27){if(L){W=15987;break L21497}a[(c[7118]|0)+16|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=1;a_=K}else if((ao|0)==8){if(ab){W=16358;break L21497}ax=c[7118]|0;if((c[ax>>2]|0)!=2){W=16359;break L21497}a[ax+113|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=1;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==39){c[13898]=al+1;a[28824]=1;c[7204]=s4(q,r,1)|0;c[(c[3524]|0)+8>>2]=~~(+g[q>>2]*10.0*72.0/+(c[10032]|0));c[(c[3524]|0)+12>>2]=~~(+g[r>>2]*10.0*72.0/+(c[10032]|0));ax=c[3524]|0;c[10962]=c[ax+8>>2]<<1;c[10960]=c[ax+12>>2]<<1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==29){ax=al+1|0;c[13898]=ax;bm=ax;W=16246}else if((ao|0)==7){if(ab){W=16355;break L21497}ax=c[7118]|0;if((c[ax>>2]|0)!=2){W=16354;break L21497}a[ax+113|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=1;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==37){if(ac){W=16369;break L21497}if((c[c[7118]>>2]|0)!=2){W=16370;break L21497}c[13898]=al+1;uu(c[10956]|0);c[10956]=0;bn=c[13898]|0;if((bn|0)>=(c[8272]|0)){W=16020;break L21497}ax=c[1054]|0;L21766:do{if((a[ax+(bn*40&-1)|0]&1)!=0){au=c[ax+(bn*40&-1)+36>>2]|0;ap=ax+(bn*40&-1)+32|0;av=c[10036]|0;az=0;while(1){if((az|0)>=(au|0)){break}if((a[av+((c[ap>>2]|0)+az|0)|0]|0)==(a[az+103664|0]|0)){az=az+1|0}else{break L21766}}if((az|0)==1){W=16020;break L21497}}}while(0);a[14176]=1;is(o);a[14176]=0;if((c[T>>2]|0)!=3){W=16019;break L21497}ax=c[S>>2]|0;c[10956]=ax;if((ax|0)==0){W=16022;break L21497}else{aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=1;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}}else if((ao|0)==0){if(ak){W=16337;break L21497}ax=c[7118]|0;if((c[ax>>2]|0)!=3){W=16336;break L21497}c[ax+12>>2]=1;c[13898]=(c[13898]|0)+1;aG=1;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==32){if(ad){W=16367;break L21497}ax=c[7118]|0;if((c[ax>>2]|0)>>>0>=2){W=16368;break L21497}a[ax+97|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=1;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==11){if(aa){W=16372;break L21497}ax=c[7118]|0;if(((c[ax>>2]|0)-2|0)>>>0>=2){W=16371;break L21497}a[ax+18|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=1;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==36){if(af){W=16357;break L21497}ax=c[7118]|0;if((c[ax>>2]|0)==3){W=16356;break L21497}a[ax+112|0]=0;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=1;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else if((ao|0)==40){a[(c[7118]|0)+114|0]=1;c[13898]=(c[13898]|0)+1;aG=ak;aH=aj;aI=ai;aJ=ah;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}else{bm=al;W=16246}}while(0);L21787:do{if((W|0)==16246){W=0;L21789:do{if((bm|0)<(am|0)){L21791:do{if((a[an+(bm*40&-1)|0]&1)!=0){ao=c[an+(bm*40&-1)+36>>2]|0;ax=an+(bm*40&-1)+32|0;as=c[10036]|0;aq=0;while(1){if((aq|0)>=(ao|0)){break}if((a[as+((c[ax>>2]|0)+aq|0)|0]|0)==(a[aq+103664|0]|0)){aq=aq+1|0}else{break L21791}}if((aq|0)==1){break L21789}}}while(0);a[14176]=1;is(e);a[14176]=0;if((c[w>>2]|0)!=3){c[13898]=bm;break}az=c[t>>2]|0;if((az|0)==0){break}if(ag){W=16256;break L21497}ax=c[7118]|0;if(((c[ax>>2]|0)-2|0)>>>0>=2){W=16268;break L21497}as=bh(az|0,44)|0;do{if((as|0)==0){bo=ah}else{if((ca(as+1|0,205104,(v=i,i=i+8|0,c[v>>2]=ax+88,v)|0)|0)!=1){bo=ah;break}a[as]=0;bo=1}}while(0);if((a[az]|0)!=0){do{if((cy(az|0,186120)|0)!=0){uh((c[13898]|0)-1|0,185976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);uh(-1,185920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);as=cy(az|0,186120)|0;if((as|0)==0){break}else{bp=as}do{a[bp]=45;bp=cy(az|0,186120)|0;}while((bp|0)!=0)}}while(0);a[(c[7118]|0)+86|0]=0;aq=(c[7118]|0)+36|0;uF(aq|0,az|0,50)}uu(az);aG=ak;aH=aj;aI=ai;aJ=bo;aK=1;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K;break L21787}}while(0);if(ah){W=16270;break L21497}aq=is(d)|0;as=c[aq>>2]|0;if((as|0)==1){bq=+(c[aq+8>>2]|0)}else if((as|0)==2){bq=+h[aq+8>>3]}else if((as|0)==3){bq=+uz(c[aq+8>>2]|0,0)}else{W=16275;break L21497}if((c[V>>2]|0)==3){uu(c[U>>2]|0);c[V>>2]=1}g[(c[7118]|0)+88>>2]=bq;aG=ak;aH=aj;aI=ai;aJ=1;aK=ag;aL=af;aM=ae;aN=ad;aO=ac;aP=ab;aQ=aa;aR=$;aS=_;aT=Z;aU=Y;aV=X;aW=M;aX=J;aZ=L;a_=K}}while(0);an=c[13898]|0;aq=c[8272]|0;if((an|0)<(aq|0)){K=a_;L=aZ;J=aX;M=aW;X=aV;Y=aU;Z=aT;_=aS;$=aR;aa=aQ;ab=aP;ac=aO;ad=aN;ae=aM;af=aL;ag=aK;ah=aJ;ai=aI;aj=aH;ak=aG;al=an;am=aq}else{break L21495}}if((W|0)==16352){br=c[3524]|0;bs=br|0;bt=c[bs>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bt,v)|0)}else if((W|0)==16353){br=c[3524]|0;bs=br|0;bt=c[bs>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bt,v)|0)}else if((W|0)==16354){bu=c[3524]|0;bv=bu|0;bw=c[bv>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bw,v)|0)}else if((W|0)==16355){bu=c[3524]|0;bv=bu|0;bw=c[bv>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bw,v)|0)}else if((W|0)==16356){bx=c[3524]|0;by=bx|0;bz=c[by>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bz,v)|0)}else if((W|0)==16357){bx=c[3524]|0;by=bx|0;bz=c[by>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bz,v)|0)}else if((W|0)==16358){bA=c[3524]|0;bB=bA|0;bC=c[bB>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bC,v)|0)}else if((W|0)==16359){bA=c[3524]|0;bB=bA|0;bC=c[bB>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bC,v)|0)}else if((W|0)==16367){bD=c[3524]|0;bE=bD|0;bF=c[bE>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bF,v)|0)}else if((W|0)==16368){bD=c[3524]|0;bE=bD|0;bF=c[bE>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bF,v)|0)}else if((W|0)==16369){bG=c[3524]|0;bH=bG|0;bI=c[bH>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bI,v)|0)}else if((W|0)==16370){bG=c[3524]|0;bH=bG|0;bI=c[bH>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bI,v)|0)}else if((W|0)==16371){bJ=c[3524]|0;bK=bJ|0;bL=c[bK>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bL,v)|0)}else if((W|0)==16372){bJ=c[3524]|0;bK=bJ|0;bL=c[bK>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bL,v)|0)}else if((W|0)==16373){bM=c[3524]|0;bN=bM|0;bO=c[bN>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bO,v)|0)}else if((W|0)==16374){bM=c[3524]|0;bN=bM|0;bO=c[bN>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bO,v)|0)}else if((W|0)==16375){bP=c[3524]|0;bQ=bP|0;bR=c[bQ>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bR,v)|0)}else if((W|0)==16376){bP=c[3524]|0;bQ=bP|0;bR=c[bQ>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bR,v)|0)}else if((W|0)==16377){bS=c[3524]|0;bT=bS|0;bU=c[bT>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bU,v)|0)}else if((W|0)==16378){bS=c[3524]|0;bT=bS|0;bU=c[bT>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bU,v)|0)}else if((W|0)==16379){bV=c[3524]|0;bW=bV|0;bX=c[bW>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bX,v)|0)}else if((W|0)==16380){bV=c[3524]|0;bW=bV|0;bX=c[bW>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=bX,v)|0)}else if((W|0)==16256){uf(c[13898]|0,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16332){bY=c[3524]|0;bZ=bY|0;b_=c[bZ>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=b_,v)|0)}else if((W|0)==16333){bY=c[3524]|0;bZ=bY|0;b_=c[bZ>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=b_,v)|0)}else if((W|0)==16334){b$=c[3524]|0;b0=b$|0;b1=c[b0>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=b1,v)|0)}else if((W|0)==16335){b$=c[3524]|0;b0=b$|0;b1=c[b0>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=b1,v)|0)}else if((W|0)==16336){b2=c[3524]|0;b3=b2|0;b4=c[b3>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=b4,v)|0)}else if((W|0)==16337){b2=c[3524]|0;b3=b2|0;b4=c[b3>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=b4,v)|0)}else if((W|0)==16338){b5=c[3524]|0;b6=b5|0;b7=c[b6>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=b7,v)|0)}else if((W|0)==16339){b5=c[3524]|0;b6=b5|0;b7=c[b6>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=b7,v)|0)}else if((W|0)==16340){b8=c[3524]|0;b9=b8|0;cb=c[b9>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=cb,v)|0)}else if((W|0)==16341){b8=c[3524]|0;b9=b8|0;cb=c[b9>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=cb,v)|0)}else if((W|0)==16342){cc=c[3524]|0;cd=cc|0;ce=c[cd>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=ce,v)|0)}else if((W|0)==16343){cc=c[3524]|0;cd=cc|0;ce=c[cd>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=ce,v)|0)}else if((W|0)==16344){cf=c[3524]|0;cg=cf|0;ch=c[cg>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=ch,v)|0)}else if((W|0)==16345){cf=c[3524]|0;cg=cf|0;ch=c[cg>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=ch,v)|0)}else if((W|0)==16346){ci=c[3524]|0;cj=ci|0;ck=c[cj>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=ck,v)|0)}else if((W|0)==16347){ci=c[3524]|0;cj=ci|0;ck=c[cj>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=ck,v)|0)}else if((W|0)==16348){cl=c[3524]|0;cm=cl|0;cn=c[cm>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=cn,v)|0)}else if((W|0)==16349){cl=c[3524]|0;cm=cl|0;cn=c[cm>>2]|0;uf(al,134056,(v=i,i=i+8|0,c[v>>2]=cn,v)|0)}else if((W|0)==16139){uf(a$,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16112){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16115){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16091){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((W|0)==16109){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16205){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16178){uf((c[13898]|0)-1|0,219072,(v=i,i=i+8|0,c[v>>2]=c[a8>>2],v)|0)}else if((W|0)==16275){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((W|0)==16219){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((W|0)==16080){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((W|0)==16019){c[13898]=bn;W=16020}else if((W|0)==16239){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((W|0)==16132){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((W|0)==15992){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16086){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16121){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16214){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16072){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16268){uf((c[13898]|0)-1|0,185864,(v=i,i=i+16|0,c[v>>2]=c[c[3524]>>2],c[v+8>>2]=185832,v)|0)}else if((W|0)==16270){uf(c[13898]|0,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16075){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16058){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16055){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16069){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==15987){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16243){uf((c[13898]|0)-1|0,186184,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((W|0)==16171){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=186328,v)|0)}else if((W|0)==16022){co=c[13898]|0;uf(co,134392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((W|0)==15990){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((W|0)==16174){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=186296,v)|0)}else if((W|0)==16164){c[13898]=a3;W=16165}else if((W|0)==16167){cp=c[13898]|0;uf(cp,217824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((W|0)==16118){uf(al,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}if((W|0)==16020){c[10956]=0;co=bn;uf(co,134392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((W|0)==16165){c[p>>2]=0;cp=a3;uf(cp,217824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);cp=c[7118]|0;a3=c[cp>>2]|0;do{if((a3|0)==3){g[7202]=+g[cp+88>>2]}else if((a3|0)==2){g[7202]=+g[cp+88>>2]*2.0}else if((a3|0)==1|(a3|0)==0){bq=+g[cp+88>>2];if(bq>0.0){g[7202]=bq*2.0;break}else{g[7202]=20.0;break}}}while(0);c[(c[3524]|0)+16>>2]=~~(+g[7202]*+g[cp+92>>2]*10.0);cp=c[7118]|0;bq=+g[7202]*+g[cp+92>>2]*10.0;if((a[cp+112|0]&1)==0){c[(c[3524]|0)+20>>2]=~~(bq*6.0/10.0)}else{c[(c[3524]|0)+20>>2]=~~(bq*5.0/10.0)}bq=+g[7202];be(229744,185824,(v=i,i=i+16|0,c[v>>2]=(c[7118]|0)+36,h[v+8>>3]=bq,v)|0);cp=c[7118]|0;a3=c[cp>>2]|0;do{if((a3|0)==3){p=c[cp+32>>2]|0;if((p|0)==0){cq=cp;cr=0;W=16298;break}else{cs=p;ct=0}do{ct=(ct+12|0)+(uA(c[cs+4>>2]|0)|0)|0;cs=c[cs>>2]|0;}while((cs|0)!=0);al=ct+1|0;co=ut(al)|0;do{if((co|0)==0){gk();bn=ut(al)|0;if((bn|0)!=0){cu=bn;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=185800,v)|0)}else{cu=co}}while(0);co=p;al=cu;do{be(al|0,185784,(v=i,i=i+8|0,c[v>>2]=c[co+4>>2],v)|0);al=al+(uA(al|0)|0)|0;co=c[co>>2]|0;}while((co|0)!=0);co=c[7118]|0;cv=cu;cw=co;cx=c[co>>2]|0;W=16297}else{cv=0;cw=cp;cx=a3;W=16297}}while(0);do{if((W|0)==16297){if((cx|0)==3){cq=cw;cr=cv;W=16298;break}else if((cx|0)==2){a[13048]=0;cz=cv;break}else{a3=(a[cw+96|0]&1)!=0?185320:179864;be(13048,199128,(v=i,i=i+16|0,c[v>>2]=(a[cw+97|0]&1)!=0?185408:185368,c[v+8>>2]=a3,v)|0);cz=cv;break}}}while(0);if((W|0)==16298){W=c[cq+12>>2]|0;if((W|0)==0){cA=199032}else{cA=(W|0)==1?78720:78704}W=(c[(c[3524]|0)+68>>2]|0)==86?217456:185688;if((a[cq+28|0]&1)==0){cB=185496}else{cB=(a[cq+29|0]&1)!=0?185600:185528}be(13048,185752,(v=i,i=i+24|0,c[v>>2]=cA,c[v+8>>2]=W,c[v+16>>2]=cB,v)|0);cz=cr}cr=c[7118]|0;cB=(a[cr+17|0]&1)!=0?116440:116408;W=(a[cr+18|0]&1)!=0?185096:185080;cA=(a[cr+19|0]&1)!=0?131504:131584;bq=+g[cr+20>>2];bl=+g[cr+24>>2];cq=(a[cr+30|0]&1)!=0?137776:137232;cv=(a[cr+31|0]&1)!=0?185032:185008;be(s|0,185256,(v=i,i=i+64|0,c[v>>2]=(a[cr+16|0]&1)!=0?185184:185112,c[v+8>>2]=cB,c[v+16>>2]=W,c[v+24>>2]=cA,h[v+32>>3]=bq,h[v+40>>3]=bl,c[v+48>>2]=cq,c[v+56>>2]=cv,v)|0);uC(13048,s|0);cv=c[7118]|0;bl=+h[cv+120>>3];if(bl<0.0){uD(13048+(uA(13048)|0)|0,184912,19);cC=cv}else{cq=~~(bl*255.0);cA=~~(+h[cv+128>>3]*255.0);W=~~(+h[cv+136>>3]*255.0);be(s|0,184960,(v=i,i=i+24|0,c[v>>2]=cq,c[v+8>>2]=cA,c[v+16>>2]=W,v)|0);uC(13048,s|0);cC=c[7118]|0}bl=+h[cC+104>>3];be(s|0,184848,(v=i,i=i+16|0,c[v>>2]=c[cC+100>>2],h[v+8>>3]=bl,v)|0);uC(13048,s|0);cC=c[7118]|0;W=c[cC>>2]|0;if(W>>>0<2){cA=(a[cC+97|0]&1)!=0?185408:185368;cq=(a[cC+96|0]&1)!=0?184832:184816;be(s|0,184840,(v=i,i=i+16|0,c[v>>2]=cA,c[v+8>>2]=cq,v)|0);uC(13048,s|0);cq=c[7118]|0;cD=cq;cE=c[cq>>2]|0}else{cD=cC;cE=W}if((cE|0)==2){cE=(a[cD+113|0]&1)!=0?133784:133640;be(s|0,73368,(v=i,i=i+8|0,c[v>>2]=cE,v)|0);cE=c[10956]|0;if((cE|0)==0){uD(s|0,184720,10)}else{be(s|0,184800,(v=i,i=i+8|0,c[v>>2]=cE,v)|0)}uC(13048,s|0)}do{if((c[11252]|0)==15){cE=c[7118]|0;if((c[cE>>2]|0)!=3){break}cD=(a[cE+114|0]&1)!=0?179864:136208;be(s|0,184664,(v=i,i=i+8|0,c[v>>2]=cD,v)|0);uC(13048,s|0)}}while(0);if(a[28824]|0){cD=c[3524]|0;bl=+((c[cD+8>>2]|0)>>>0>>>0);if((c[7204]|0)==2){bq=bl*2.54/720.0;bj=+((c[cD+12>>2]|0)>>>0>>>0)*2.54/720.0;be(s|0,90672,(v=i,i=i+16|0,h[v>>3]=bq,h[v+8>>3]=bj,v)|0)}else{bj=bl/720.0;bl=+((c[cD+12>>2]|0)>>>0>>>0)/720.0;be(s|0,90632,(v=i,i=i+16|0,h[v>>3]=bj,h[v+8>>3]=bl,v)|0)}uC(13048,s|0)}cD=c[7118]|0;cE=c[cD>>2]|0;do{if((cE|0)==3){W=cD+36|0;bl=+g[cD+88>>2];cC=(cz|0)!=0?cz:179864;be(s|0,184608,(v=i,i=i+24|0,c[v>>2]=W,h[v+8>>3]=bl,c[v+16>>2]=cC,v)|0)}else if((cE|0)==2){bl=+g[cD+88>>2];be(s|0,184552,(v=i,i=i+16|0,c[v>>2]=cD+36,h[v+8>>3]=bl,v)|0)}else{bl=+g[cD+88>>2];if(bl!=0.0){bj=bl;be(s|0,184536,(v=i,i=i+8|0,h[v>>3]=bj,v)|0);break}else{a[s]=0;break}}}while(0);if((cz|0)==0){cF=uC(13048,s|0)|0;cG=c[7118]|0;cH=cG+92|0;cI=+g[cH>>2];cJ=cI;cK=be(s|0,184512,(v=i,i=i+8|0,h[v>>3]=cJ,v)|0)|0;cL=uC(13048,s|0)|0;i=b;return}uu(cz);cF=uC(13048,s|0)|0;cG=c[7118]|0;cH=cG+92|0;cI=+g[cH>>2];cJ=cI;cK=be(s|0,184512,(v=i,i=i+8|0,h[v>>3]=cJ,v)|0)|0;cL=uC(13048,s|0)|0;i=b;return}function pA(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,aA=0;b=i;i=i+4400|0;d=b|0;e=b+8|0;f=b+40|0;j=b+296|0;k=b+304|0;l=c[(c[7118]|0)+12>>2]|0;if((l|0)==1){if(!(a[28824]|0)){c[(c[3524]|0)+8>>2]=5040;c[(c[3524]|0)+12>>2]=7200}n=c[3524]|0;o=+((c[n+8>>2]|0)>>>0>>>0);p=+g[184];q=o*(p+ +g[178])/10.0;r=+((c[n+12>>2]|0)>>>0>>>0);s=+g[44];t=r*(s+ +g[38])/10.0;h[n+176>>3]=10.0;u=t;x=q;y=r*s/10.0;z=o*p/10.0}else if((l|0)==0){do{if(a[28824]|0){c[(c[3524]|0)+8>>2]=c[10962];c[(c[3524]|0)+12>>2]=c[10960]}else{c[(c[3524]|0)+8>>2]=7200;n=(c[3524]|0)+12|0;if((a[(c[7118]|0)+112|0]&1)==0){c[n>>2]=5040;break}else{c[n>>2]=4320;break}}}while(0);n=c[3524]|0;p=+((c[n+8>>2]|0)>>>0>>>0);o=+g[184];s=p*(o+ +g[178])/20.0;r=+((c[n+12>>2]|0)>>>0>>>0);q=+g[44];t=r*(q+ +g[38])/20.0;h[n+176>>3]=20.0;u=t;x=s;y=r*q/20.0;z=p*o/20.0}else if((l|0)==2){if(!(a[28824]|0)){c[(c[3524]|0)+8>>2]=7200;c[(c[3524]|0)+12>>2]=5040}l=c[3524]|0;o=+((c[l+8>>2]|0)>>>0>>>0);p=+g[184];q=o*(p+ +g[178])/10.0;r=+((c[l+12>>2]|0)>>>0>>>0);s=+g[44];t=r*(1.0- +g[38]-s)/10.0;h[l+176>>3]=10.0;u=q;x=r*(1.0-s)/10.0;y=o*p/10.0;z=t}else{uf(-1,199080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=~~u;n=~~x;A=~~y;B=~~z;uB(28840,(c[7118]|0)+36|0);g[7208]=+g[7202];C=c[7118]|0;D=c[C>>2]|0;do{if((D|0)==2){E=k|0;F=c[8244]|0;if((F|0)==0){break}G=uA(F|0)|0;H=G-4|0;if((bh(F|0,46)|0)!=(F+H|0)){uf(-1,187368,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}F=G+5|0;G=ut(F)|0;do{if((G|0)==0){gk();I=ut(F)|0;if((I|0)!=0){J=I;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=187344,v)|0)}else{J=G}}while(0);G=c[8244]|0;uB(J|0,G|0);G=(c[8244]|0)+H|0;do{if((a_(G|0,187336,4)|0)==0){K=16417}else{if((a_(G|0,187312,4)|0)==0){K=16417;break}if((a[(c[7118]|0)+113|0]&1)==0){be(E|0,186952,(v=i,i=i+8|0,c[v>>2]=199032,v)|0)}else{be(E|0,186960,(v=i,i=i+8|0,c[v>>2]=199032,v)|0)}F=J+H|0;I=(uA(E|0)|0)+1|0;uF(F|0,E|0,I|0);I=bF(J|0,134520)|0;c[10028]=I;L=I}}while(0);do{if((K|0)==16417){if((a[(c[7118]|0)+113|0]&1)!=0){uf(-1,187264,(v=i,i=i+8|0,c[v>>2]=187208,v)|0)}E=G;w=2019914798;a[E]=w&255;w=w>>8;a[E+1|0]=w&255;w=w>>8;a[E+2|0]=w&255;w=w>>8;a[E+3|0]=w&255;c[10028]=c[10030];c[10030]=bF(c[8244]|0,137896)|0;uh(-1,187016,(v=i,i=i+16|0,c[v>>2]=c[8244],c[v+8>>2]=J,v)|0);if((c[10030]|0)==0){uf(-1,186984,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{L=c[10028]|0;break}}}while(0);if((L|0)==0){uf(-1,186896,(v=i,i=i+8|0,c[v>>2]=J,v)|0)}G=(uA(J|0)|0)-3|0;E=ut(G)|0;do{if((E|0)==0){gk();H=ut(G)|0;if((H|0)!=0){M=H;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=186872,v)|0)}else{M=E}}while(0);c[7112]=M;E=(uA(J|0)|0)-4|0;uF(M|0,J|0,E|0);E=(uA(J|0)|0)-4|0;a[(c[7112]|0)+E|0]=0;uu(J)}else if((D|0)==3){c[10028]=c[10030]}else{E=c[8244]|0;if((E|0)==0){if((a[C+96|0]&1)!=0){G=c[m>>2]|0;aI(186464,61,1,G|0);a[(c[7118]|0)+96|0]=0}c[10028]=c[10030];break}G=bh(E|0,46)|0;if((G|0)==0){N=a8(E|0,0)|0}else{N=G}if((a[C+96|0]&1)==0){c[10028]=c[10030];break}G=N;H=db(c[7112]|0,(5-E|0)+G|0,186784)|0;c[7112]=H;if((H|0)==0){E=c[m>>2]|0;I=c[8244]|0;cf(E|0,186600,(v=i,i=i+8|0,c[v>>2]=I,v)|0);I=c[m>>2]|0;aI(186560,27,1,I|0);a[(c[7118]|0)+96|0]=0;c[10028]=c[10030];break}I=c[8244]|0;uF(H|0,I|0,(G+1|0)-I|0);I=(c[7112]|0)+(G-(c[8244]|0)|0)|0;w=7565358;a[I]=w&255;w=w>>8;a[I+1|0]=w&255;w=w>>8;a[I+2|0]=w&255;w=w>>8;a[I+3|0]=w&255;I=bF(c[7112]|0,137896)|0;c[10028]=I;if((I|0)!=0){break}cf(c[m>>2]|0,186696,(v=i,i=i+8|0,c[v>>2]=c[7112],v)|0);uu(c[7112]|0);c[7112]=0;a[(c[7118]|0)+96|0]=0;c[10028]=c[10030]}}while(0);N=c[7118]|0;C=(c[N>>2]|0)==3;D=c[N+4>>2]|0;J=c[N+8>>2]|0;N=c[3524]|0;M=(c[N+68>>2]|0)==86;L=M?238344:0;a[28912]=C&1;c[7226]=D;c[7224]=J;c[7120]=0;cG(j|0);k=bg(aN(j|0)|0)|0;a[k+((uA(k|0)|0)-1|0)|0]=0;j=c[c[7118]>>2]|0;do{if((j|0)==2){do{if((c[10030]|0)==0){I=(uA(c[8244]|0)|0)+1|0;G=ut(I)|0;do{if((G|0)==0){gk();H=ut(I)|0;if((H|0)!=0){O=H;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=129080,v)|0)}else{O=G}}while(0);G=c[8244]|0;uB(O|0,G|0);lj(O);G=c[8244]|0;if((O|0)==(G|0)|(O|0)==0){P=G;break}uu(O);K=16439}else{K=16439}}while(0);if((K|0)==16439){P=c[8244]|0}if((P|0)==0){uj(c[13898]|0,193824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}G=c[10030]|0;if((G|0)==0){Q=0;R=0;S=0}else{cf(G|0,193768,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);G=c[11252]|0;if((G|0)==1){T=193704}else if((G|0)==2){T=193640}else if((G|0)==3){T=193624}else if((G|0)==4){T=193616}else if((G|0)==5){T=193560}else if((G|0)==6){T=96912}else if((G|0)==7){T=90808}else if((G|0)==9){T=75288}else if((G|0)==10){T=222760}else if((G|0)==12){T=193552}else if((G|0)==13){T=193480}else if((G|0)==16){uf(-1,193408,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{T=0}c[1402]=-1;c[10882]=0;G=(c[7118]|0)+36|0;do{if((a[G]|0)==0){U=0;V=0;W=0}else{if((aY(G|0,126024)|0)==0){U=0;V=0;W=0;break}I=(uA(G|0)|0)+1|0;H=ut(I)|0;do{if((H|0)==0){gk();E=ut(I)|0;if((E|0)!=0){X=E;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=193376,v)|0)}else{X=H}}while(0);H=(uA((c[7118]|0)+36|0)|0)+1|0;I=ut(H)|0;do{if((I|0)==0){gk();E=ut(H)|0;if((E|0)!=0){Y=E;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=193376,v)|0)}else{Y=I}}while(0);I=(uA((c[7118]|0)+36|0)|0)+1|0;H=ut(I)|0;do{if((H|0)==0){gk();E=ut(I)|0;if((E|0)!=0){Z=E;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=193376,v)|0)}else{Z=H}}while(0);H=(c[7118]|0)+36|0;uB(X|0,H|0);a[Y]=0;a[Z]=0;H=a8(X|0,44)|0;if((H|0)==0){U=Z;V=Y;W=X;break}a[H]=0;I=H+1|0;uB(Y|0,I|0);I=a8(Y|0,44)|0;if((I|0)==0){U=Z;V=Y;W=X;break}a[I]=0;H=I+1|0;uB(Z|0,H|0);U=Z;V=Y;W=X}}while(0);G=c[7118]|0;if((a[G+113|0]&1)!=0){H=c[10030]|0;z=+g[G+88>>2];G=~~(z+-10.0);I=~~z;cf(H|0,192864,(v=i,i=i+24|0,c[v>>2]=G,c[v+8>>2]=I,c[v+16>>2]=I,v)|0);do{if((W|0)!=0){if((a[W]|0)==0){break}I=c[10030]|0;cf(I|0,192816,(v=i,i=i+8|0,c[v>>2]=W,v)|0)}}while(0);do{if((V|0)!=0){if((a[V]|0)==0){break}I=c[10030]|0;cf(I|0,192784,(v=i,i=i+8|0,c[v>>2]=V,v)|0)}}while(0);do{if((U|0)!=0){if((a[U]|0)==0){break}I=c[10030]|0;cf(I|0,192752,(v=i,i=i+8|0,c[v>>2]=U,v)|0)}}while(0);I=c[10030]|0;aI(192648,57,1,I|0);if((T|0)!=0){I=c[10030]|0;cf(I|0,192544,(v=i,i=i+8|0,c[v>>2]=T,v)|0)}I=c[10030]|0;G=c[3524]|0;z=+((c[G+8>>2]|0)>>>0>>>0)*+g[178]/20.0;y=+((c[G+12>>2]|0)>>>0>>>0)*+g[38]/20.0;G=c[10956]|0;H=(G|0)!=0?G:191528;cf(I|0,191600,(v=i,i=i+40|0,h[v>>3]=z,h[v+8>>3]=y,h[v+16>>3]=z,h[v+24>>3]=y,c[v+32>>2]=H,v)|0)}H=c[10030]|0;aI(191384,12,1,H|0);if((T|0)!=0){H=c[10030]|0;cf(H|0,191184,(v=i,i=i+16|0,c[v>>2]=T,c[v+8>>2]=T,v)|0)}do{if((a[(c[7118]|0)+113|0]&1)==0){H=(W|0)!=0;do{if(H){if((a[W]|0)==0){break}I=c[10030]|0;cf(I|0,191152,(v=i,i=i+8|0,c[v>>2]=W,v)|0)}}while(0);I=(V|0)!=0;do{if(I){if((a[V]|0)==0){break}G=c[10030]|0;cf(G|0,191104,(v=i,i=i+8|0,c[v>>2]=V,v)|0)}}while(0);do{if((U|0)==0){if(H|I){K=16496}}else{if((a[U]|0)==0){K=16496;break}G=c[10030]|0;cf(G|0,191080,(v=i,i=i+8|0,c[v>>2]=U,v)|0);K=16496}}while(0);if((K|0)==16496){I=c[10030]|0;aI(191064,14,1,I|0)}I=c[10956]|0;if((I|0)==0){break}H=c[10030]|0;cf(H|0,154696,(v=i,i=i+8|0,c[v>>2]=I,v)|0)}}while(0);I=c[10030]|0;H=c[7118]|0;G=(a[H+17|0]&1)!=0?225e3:224992;E=(a[H+18|0]&1)!=0?225e3:224992;cf(I|0,189944,(v=i,i=i+16|0,c[v>>2]=G,c[v+8>>2]=E,v)|0);E=c[10030]|0;aI(189536,396,1,E|0);E=c[10030]|0;if((a[(c[7118]|0)+112|0]&1)==0){aI(188600,593,1,E|0)}else{aI(189272,260,1,E|0)}E=c[10030]|0;aI(187688,837,1,E|0);E=c[10030]|0;G=c[3524]|0;y=+((c[G+8>>2]|0)>>>0>>>0)*+g[178];z=+((c[G+12>>2]|0)>>>0>>>0)*+g[38];cf(E|0,187608,(v=i,i=i+24|0,h[v>>3]=.05,h[v+8>>3]=y,h[v+16>>3]=z,v)|0);Q=U;R=V;S=W}E=c[7118]|0;z=+h[E+120>>3];if(z>=0.0){G=c[10030]|0;y=+h[E+128>>3];x=+h[E+136>>3];cf(G|0,187528,(v=i,i=i+24|0,h[v>>3]=z,h[v+8>>3]=y,h[v+16>>3]=x,v)|0);G=c[10030]|0;E=c[3524]|0;x=+((c[E+8>>2]|0)>>>0>>>0)*+g[178];y=+((c[E+12>>2]|0)>>>0>>>0)*+g[38];cf(G|0,187432,(v=i,i=i+16|0,h[v>>3]=x,h[v+8>>3]=y,v)|0)}if((S|0)!=0){uu(S)}if((R|0)!=0){uu(R)}if((Q|0)==0){break}uu(Q)}else if((j|0)==1){cf(c[10030]|0,195248,(v=i,i=i+8|0,h[v>>3]=.05,v)|0);G=c[3524]|0;E=~~(+g[38]*+((c[G+12>>2]|0)>>>0>>>0));cf(c[10030]|0,195216,(v=i,i=i+16|0,c[v>>2]=~~(+g[178]*+((c[G+8>>2]|0)>>>0>>>0)),c[v+8>>2]=E,v)|0);K=16513}else if((j|0)==0){cf(c[10030]|0,194104,(v=i,i=i+8|0,h[v>>3]=.05,v)|0);E=c[3524]|0;G=~~(+g[38]*+((c[E+12>>2]|0)>>>0>>>0));cf(c[10030]|0,194064,(v=i,i=i+16|0,c[v>>2]=~~(+g[178]*+((c[E+8>>2]|0)>>>0>>>0)),c[v+8>>2]=G,v)|0);K=16513}}while(0);if((K|0)==16513){j=c[10028]|0;Q=c[10030]|0;if((j|0)==(Q|0)){aI(193952,21,1,j|0)}else{j=c[3524]|0;R=~~(+g[178]*+((c[j+8>>2]|0)>>>0>>>0)/20.0+.5);S=~~(+g[38]*+((c[j+12>>2]|0)>>>0>>>0)/20.0+.5);j=c[7112]|0;W=bh(j|0,47)|0;V=(W|0)==0?j:W+1|0;W=R*10&-1;cf(Q|0,194008,(v=i,i=i+32|0,c[v>>2]=V,c[v+8>>2]=R,c[v+16>>2]=S,c[v+24>>2]=W,v)|0)}c[7036]=0}W=c[10028]|0;if((c[(c[7118]|0)+12>>2]|0)==0){aI(198992,24,1,W|0)}else{aI(198968,15,1,W|0)}W=c[8244]|0;if((W|0)!=0){S=c[10028]|0;cf(S|0,198936,(v=i,i=i+8|0,c[v>>2]=W,v)|0)}cf(c[10028]|0,230952,(v=i,i=i+32|0,c[v>>2]=40152,c[v+8>>2]=40160,c[v+16>>2]=k,c[v+24>>2]=C?198928:179864,v)|0);W=D+B|0;B=J+A|0;A=D+n|0;n=J+l|0;cf(c[10028]|0,198896,(v=i,i=i+32|0,c[v>>2]=W,c[v+8>>2]=B,c[v+16>>2]=A,c[v+24>>2]=n,v)|0);l=c[7118]|0;do{if((c[l>>2]|0)==3){J=c[l+12>>2]|0;if((J|0)==0){_=l;break}D=c[10028]|0;S=(J|0)==2?198832:198816;cf(D|0,198872,(v=i,i=i+8|0,c[v>>2]=S,v)|0);_=c[7118]|0}else{_=l}}while(0);if((c[_+12>>2]|0)==0){$=_;aa=224992}else{_=c[10028]|0;aI(198792,17,1,_|0);_=c[7118]|0;$=_;aa=(c[_+12>>2]|0)==2?225e3:224992}_=(a[$+18|0]&1)!=0?225e3:224992;l=(a[$+19|0]&1)!=0?225e3:224992;y=+g[$+20>>2];S=(a[$+16|0]&1)!=0?225e3:224992;D=(a[$+30|0]&1)!=0?225e3:224992;J=(a[$+31|0]&1)!=0?225e3:224992;x=+g[$+24>>2]*5.0;z=+h[$+120>>3];u=+h[$+128>>3];t=+h[$+136>>3];R=(c[N+16>>2]|0)/-3&-1;cf(c[10028]|0,230144,(v=i,i=i+136|0,c[v>>2]=(a[$+17|0]&1)!=0?225e3:224992,c[v+8>>2]=_,c[v+16>>2]=l,h[v+24>>3]=y,c[v+32>>2]=aa,c[v+40>>2]=S,c[v+48>>2]=D,c[v+56>>2]=J,h[v+64>>3]=x,h[v+72>>3]=z,h[v+80>>3]=u,h[v+88>>3]=t,c[v+96>>2]=R,h[v+104>>3]=10.0,h[v+112>>3]=10.0,h[v+120>>3]=31.5,h[v+128>>3]=31.5,v)|0);cf(c[10028]|0,198632,(v=i,i=i+64|0,c[v>>2]=W,c[v+8>>2]=B,c[v+16>>2]=A,c[v+24>>2]=B,c[v+32>>2]=A,c[v+40>>2]=n,c[v+48>>2]=W,c[v+56>>2]=n,v)|0);n=f|0;f=tE(198600)|0;if((f|0)!=0){if((a6(n|0,256,f|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,f|0)|0)!=0)}az(f|0)}do{if(C){f=c[11252]|0;if((f|0)==12){W=tE(198296)|0;if((W|0)==0){break}if((a6(n|0,256,W|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,W|0)|0)!=0)}az(W|0);break}else if((f|0)==9){A=tE(198384)|0;if((A|0)==0){break}if((a6(n|0,256,A|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,A|0)|0)!=0)}az(A|0);break}else if((f|0)==15){W=tE(198232)|0;if((W|0)!=0){if((a6(n|0,256,W|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,W|0)|0)!=0)}az(W|0)}if((c[18090]|0)!=0){break}A=e|0;c[d>>2]=0;B=tE(195944)|0;if((B|0)==0){break}if((a6(n|0,256,B|0)|0)!=0){do{R=a[n]|0;do{if(!((R<<24>>24|0)==35|(R<<24>>24|0)==10)){J=aE(n|0,d|0,16)|0;if(J>>>0>255){if((a[(c[7118]|0)+114|0]&1)==0){break}}D=(c[d>>2]|0)+1|0;c[d>>2]=D;S=(a8(D|0,59)|0)-D|0;uF(A|0,D|0,S|0);a[e+S|0]=0;S=c[18088]|0;if(((c[18086]|0)+8|0)>>>0>S>>>0){D=S+2048|0;c[18088]=D;S=db(c[18090]|0,D,195936)|0;c[18090]=S;ab=S}else{ab=c[18090]|0}c[ab+(c[7114]<<3)>>2]=J;J=bP(A|0)|0;c[(c[18090]|0)+(c[7114]<<3)+4>>2]=J;c[18086]=(c[18086]|0)+8;c[7114]=(c[7114]|0)+1}}while(0);}while((a6(n|0,256,B|0)|0)!=0)}az(B|0);break}else if((f|0)==10){A=tE(198328)|0;if((A|0)==0){break}if((a6(n|0,256,A|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,A|0)|0)!=0)}az(A|0);break}else if((f|0)==1){B=tE(198552)|0;if((B|0)==0){break}if((a6(n|0,256,B|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,B|0)|0)!=0)}az(B|0);break}else if((f|0)==2){A=tE(198488)|0;if((A|0)==0){break}if((a6(n|0,256,A|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,A|0)|0)!=0)}az(A|0);break}else if((f|0)==11|(f|0)==3){B=tE(198472)|0;if((B|0)==0){break}if((a6(n|0,256,B|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,B|0)|0)!=0)}az(B|0);break}else if((f|0)==4){A=tE(198456)|0;if((A|0)==0){break}if((a6(n|0,256,A|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,A|0)|0)!=0)}az(A|0);break}else if((f|0)==5){B=tE(198440)|0;if((B|0)==0){break}if((a6(n|0,256,B|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,B|0)|0)!=0)}az(B|0);break}else if((f|0)==6){A=tE(198424)|0;if((A|0)==0){break}if((a6(n|0,256,A|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,A|0)|0)!=0)}az(A|0);break}else if((f|0)==7){B=tE(198408)|0;if((B|0)==0){break}if((a6(n|0,256,B|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,B|0)|0)!=0)}az(B|0);break}else if((f|0)==13){A=tE(198272)|0;if((A|0)==0){break}if((a6(n|0,256,A|0)|0)!=0){do{aK(n|0,c[10028]|0);}while((a6(n|0,256,A|0)|0)!=0)}az(A|0);break}else{break}}}while(0);n=c[7118]|0;do{if((c[n>>2]|0)==2){if((a[n+112|0]&1)==0){ac=n;break}ab=c[10028]|0;aI(196392,51,1,ab|0);ab=c[10028]|0;aI(196344,29,1,ab|0);ab=c[10028]|0;aI(196312,28,1,ab|0);ab=c[10028]|0;aI(196216,66,1,ab|0);ab=c[10028]|0;aI(196136,28,1,ab|0);ab=c[10028]|0;aI(196080,39,1,ab|0);ab=c[10028]|0;aI(196032,39,1,ab|0);ab=c[10028]|0;aI(195960,53,1,ab|0);ac=c[7118]|0}else{ac=n}}while(0);if((a[ac+28|0]&1)!=0){n=c[10028]|0;ab=(a[ac+29|0]&1)!=0?225e3:224992;cf(n|0,198176,(v=i,i=i+8|0,c[v>>2]=ab,v)|0)}do{if(M){ab=c[L>>2]|0;if((ab|0)==0){break}else{ad=L;ae=ab}do{ad=ad+4|0;aK(ae|0,c[10028]|0);ae=c[ad>>2]|0;}while((ae|0)!=0)}}while(0);if(C){C=c[7118]|0;ae=c[C+32>>2]|0;if((ae|0)==0){af=C}else{C=ae;do{tD(C,1);ae=c[C+12>>2]|0;if((ae|0)!=0){tz(ae)}C=c[C>>2]|0;}while((C|0)!=0);af=c[7118]|0}tz(af+36|0)}af=bU(131496)|0;if((af|0)==0){C=bU(130312)|0;if((C|0)==0){ag=0;ah=0;ai=1}else{aj=C;K=16610}}else{aj=af;K=16610}do{if((K|0)==16610){af=bP(aj|0)|0;if((af|0)==0){ag=0;ah=0;ai=1;break}if((a[af]|0)==0){ag=0;ah=af;ai=0;break}C=uA(af|0)<<1|1;ae=ut(C)|0;do{if((ae|0)==0){gk();ad=ut(C)|0;if((ad|0)!=0){ak=ad;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=197984,v)|0)}else{ak=ae}}while(0);ae=a[af]|0;if(ae<<24>>24==0){al=ak}else{C=af;ad=ak;L=ae;while(1){if((aZ(198168,L<<24>>24|0,4)|0)==0){am=ad;an=L}else{a[ad]=92;am=ad+1|0;an=a[C]|0}ae=C+1|0;M=am+1|0;a[am]=an;A=a[ae]|0;if(A<<24>>24==0){al=M;break}else{C=ae;ad=M;L=A}}}a[al]=0;ag=ak;ah=af;ai=0}}while(0);ak=c[8244]|0;do{if((ak|0)==0){ao=0}else{if((a[ak]|0)==0){ao=0;break}al=uA(ak|0)<<1|1;an=ut(al)|0;do{if((an|0)==0){gk();am=ut(al)|0;if((am|0)!=0){ap=am;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=197984,v)|0)}else{ap=an}}while(0);an=a[ak]|0;if(an<<24>>24==0){aq=ap}else{al=ak;af=ap;am=an;while(1){if((aZ(198168,am<<24>>24|0,4)|0)==0){ar=af;as=am}else{a[af]=92;ar=af+1|0;as=a[al]|0}an=al+1|0;aj=ar+1|0;a[ar]=as;K=a[an]|0;if(K<<24>>24==0){aq=aj;break}else{al=an;af=aj;am=K}}}a[aq]=0;ao=ap}}while(0);ap=(ao|0)!=0;aq=(ag|0)!=0;cf(c[10028]|0,229800,(v=i,i=i+40|0,c[v>>2]=ap?ao:179864,c[v+8>>2]=40152,c[v+16>>2]=40160,c[v+24>>2]=aq?ag:179864,c[v+32>>2]=k,v)|0);if(!ai){uu(ah)}if(aq){uu(ag)}if(!ap){at=c[10028]|0;au=aI(198144,16,1,at|0)|0;av=c[3524]|0;aw=av+68|0;ax=c[aw>>2]|0;ay=(ax|0)==86;aA=ay?2:1;c[59584]=aA;i=b;return}uu(ao);at=c[10028]|0;au=aI(198144,16,1,at|0)|0;av=c[3524]|0;aw=av+68|0;ax=c[aw>>2]|0;ay=(ax|0)==86;aA=ay?2:1;c[59584]=aA;i=b;return}function pB(a){a=a|0;c[7230]=a;return 1}function pC(a){a=a|0;c[7198]=a;return 1}function pD(){var b=0,d=0,e=0;b=i;aI(199192,10,1,c[10028]|0);do{if((a[28912]&1)!=0){d=c[10028]|0;aI(199160,17,1,d|0);d=c[57760]|0;if((d|0)==0){break}else{e=d}while(1){d=c[e+4>>2]|0;cf(c[10028]|0,199128,(v=i,i=i+16|0,c[v>>2]=c[e>>2],c[v+8>>2]=(d|0)!=0?73808:140136,v)|0);uu(c[c[57760]>>2]|0);uu(c[57760]|0);c[57760]=d;if((d|0)==0){break}else{e=d}}}}while(0);if((c[(c[7118]|0)+12>>2]|0)==0){i=b;return}cf(c[10028]|0,199112,(v=i,i=i+8|0,c[v>>2]=c[7120],v)|0);i=b;return}function pE(){c[7116]=0;aI(199208,29,1,c[10028]|0);return}function pF(){var b=0,d=0,e=0,f=0,j=0,k=0.0,l=0.0;b=i;d=c[3524]|0;e=(c[7120]|0)+1|0;c[7120]=e;cf(c[10028]|0,202176,(v=i,i=i+16|0,c[v>>2]=e,c[v+8>>2]=e,v)|0);if((c[(c[3524]|0)+68>>2]|0)==86&(c[59584]|0)==1){e=c[59586]|0;if((e|0)!=0){f=238344;j=e;do{f=f+4|0;aK(j|0,c[10028]|0);j=c[f>>2]|0;}while((j|0)!=0)}j=c[m>>2]|0;aI(202120,53,1,j|0);c[59584]=2}j=c[7224]|0;k=((c[(c[7118]|0)+12>>2]|0)==0?.5:1.0)/10.0;cf(c[10028]|0,202048,(v=i,i=i+32|0,c[v>>2]=c[7226],c[v+8>>2]=j,h[v+16>>3]=k,h[v+24>>3]=k,v)|0);if((c[(c[7118]|0)+12>>2]|0)==2){j=c[10028]|0;f=-(c[(c[3524]|0)+12>>2]|0)|0;cf(j|0,202016,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}aI(201976,18,1,c[10028]|0);if((a[28912]&1)!=0){f=c[10028]|0;j=(c[7118]|0)+36|0;e=c[d+16>>2]|0;cf(f|0,201872,(v=i,i=i+16|0,c[v>>2]=j,c[v+8>>2]=e,v)|0)}c[7116]=0;a[228944]=0;c[57326]=-4e3;c[57328]=-4e3;c[57234]=0;c[57432]=-5;h[28715]=-5.0;h[28714]=-5.0;g[7200]=-1.0;if((c[c[7118]>>2]|0)==2){i=b;return}aI(201808,56,1,c[10028]|0);e=c[10028]|0;if((c[(c[7118]|0)+12>>2]|0)==0){j=c[3524]|0;k=+((c[j+8>>2]|0)>>>0>>>0)*+g[178];l=+((c[j+12>>2]|0)>>>0>>>0)*+g[38];cf(e|0,201752,(v=i,i=i+16|0,h[v>>3]=k,h[v+8>>3]=l,v)|0)}else{aI(201632,46,1,e|0)}aI(201616,5,1,c[10028]|0);i=b;return}function pG(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+64|0;f=e|0;g=e+32|0;h=c[57328]|0;j=b-h|0;k=c[57326]|0;l=d-k|0;do{if((h|0)==(b|0)&(k|0)==(d|0)){if(!(a[228944]|0)){break}i=e;return}}while(0);k=f|0;be(k|0,202376|0,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);f=g|0;be(f|0,202240|0,(v=i,i=i+16|0,c[v>>2]=j,c[v+8>>2]=l,v)|0);L22391:do{if(a[229704]|0){l=c[10028]|0;cf(l|0,202208|0,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);a[229704]=0}else{l=uA(f|0)|0;do{if(l>>>0<(uA(k|0)|0)>>>0){if(!(a[228944]|0)){break}j=c[10028]|0;aK(f|0,j|0);c[57234]=(c[57234]|0)+1;break L22391}}while(0);l=c[10028]|0;aK(k|0,l|0)}}while(0);a[228944]=1;c[7116]=(c[7116]|0)+1;c[57328]=b;c[57326]=d;i=e;return}function pH(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+64|0;f=c[57328]|0;g=c[57326]|0;if((f|0)==(b|0)&(g|0)==(d|0)){i=e;return}h=e|0;be(h|0,202608,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);j=e+32|0;be(j|0,202560,(v=i,i=i+16|0,c[v>>2]=b-f,c[v+8>>2]=d-g,v)|0);if(!(a[228944]|0)){pG(c[57328]|0,c[57326]|0)}g=uA(j|0)|0;f=g>>>0<(uA(h|0)|0)>>>0;g=c[10028]|0;do{if(f){aK(j|0,g|0);c[57234]=(c[57234]|0)+1;k=(c[7116]|0)+1|0;c[7116]=k;if((k|0)<=104){break}k=c[10028]|0;cf(k|0,202480,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);c[7116]=1}else{aK(h|0,g|0);c[7116]=1}}while(0);a[228944]=1;c[57328]=b;c[57326]=d;i=e;return}function pI(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;e=c[7118]|0;do{if((c[e>>2]|0)==2){if((a[e+112|0]&1)==0){f=16692;break}g=(b|0)%4&-1}else{f=16692}}while(0);if((f|0)==16692){g=(b|0)%9&-1}b=g+3|0;g=(b|0)<0?0:b;if((c[57432]|0)==(g|0)){i=d;return}a[228944]=0;if((c[7116]|0)!=0){b=c[10028]|0;aI(215952,7,1,b|0);c[7116]=0;a[228944]=0}c[57432]=g;h[28714]=+h[28715];cf(c[10028]|0,202624,(v=i,i=i+8|0,c[v>>2]=a[g+93672|0]|0,v)|0);c[7116]=0;i=d;return}function pJ(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;g=c[7118]|0;do{if((c[g>>2]|0)==2){if((a[g+112|0]&1)==0){break}if((e|0)<0){h=0}else{h=(e&7)+1|0}j=c[10028]|0;k=c[228960+(h<<2)>>2]|0;cf(j|0,202896,(v=i,i=i+24|0,c[v>>2]=b,c[v+8>>2]=d,c[v+16>>2]=k,v)|0);a[228944]=0;c[7116]=0;c[57432]=-5;i=f;return}}while(0);if((e|0)<0){l=0}else{l=((e>>>0)%75>>>0)+1|0}e=c[229e3+(l<<2)>>2]|0;cf(c[10028]|0,202896,(v=i,i=i+24|0,c[v>>2]=b,c[v+8>>2]=d,c[v+16>>2]=e,v)|0);a[228944]=0;c[7116]=0;c[57432]=-5;i=f;return}function pK(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0;lD(b,d,e,f,g);if((a[(c[7118]|0)+19|0]&1)!=0|(g|0)==0){return}if((c[7116]|0)!=0){h=c[10028]|0;aI(215952,7,1,h|0);c[7116]=0;a[228944]=0}aI(204880,19,1,c[10028]|0);lD(b,d,e,f,-g|0);if((c[7116]|0)!=0){g=c[10028]|0;aI(215952,7,1,g|0);c[7116]=0;a[228944]=0}aI(212688,9,1,c[10028]|0);return}function pL(b){b=b|0;var d=0,e=0,f=0,j=0,k=0,l=0,m=0.0,n=0.0;d=i;i=i+8|0;e=d|0;if((b|0)==0){f=16722}else{if((a[b]|0)==0){f=16722}else{j=b}}if((f|0)==16722){j=229744}f=bk(j|0,148464)|0;g[e>>2]=+g[7202];if((a[j+f|0]|0)==44){b=j+(f+1|0)|0;ca(b|0,205104,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}do{if((f|0)==0){b=bP(229744)|0;k=bk(b|0,148464)|0;l=b}else{if((j|0)==0){k=f;l=0;break}k=f;l=bP(j|0)|0}}while(0);a[l+k|0]=0;if((k|0)!=0){j=0;do{f=l+j|0;if((a[f]|0)==32){a[f]=45}j=j+1|0;}while(j>>>0>>0)}if((c[c[7118]>>2]|0)==3){tz(l);k=c[10028]|0;m=+g[e>>2]*+g[(c[7118]|0)+92>>2]*10.0;cf(k|0,205064,(v=i,i=i+16|0,c[v>>2]=l,h[v+8>>3]=m,v)|0);m=+g[e>>2];if(m!=+g[7200]){k=c[10028]|0;j=-~~(m*+g[(c[7118]|0)+92>>2]*10.0/3.0)|0;cf(k|0,205040,(v=i,i=i+8|0,c[v>>2]=j,v)|0);n=+g[e>>2]}else{n=m}g[7200]=n}uu(l);c[(c[3524]|0)+16>>2]=~~(+g[e>>2]*+g[(c[7118]|0)+92>>2]*10.0);c[(c[3524]|0)+20>>2]=~~(+g[e>>2]*+g[(c[7118]|0)+92>>2]*10.0*6.0/10.0);i=d;return 1}function pM(a){a=+a;var b=0;b=i;cf(c[10028]|0,205136,(v=i,i=i+8|0,h[v>>3]=a,v)|0);i=b;return}function pN(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0.0,n=0.0;j=i;if((c[7116]|0)!=0){k=c[10028]|0;aI(215952,7,1,k|0);c[7116]=0;a[228944]=0}k=b&15;if((k|0)==3){l=c[10028]|0;cf(l|0,205808,(v=i,i=i+32|0,c[v>>2]=d,c[v+8>>2]=e,c[v+16>>2]=f,c[v+24>>2]=g,v)|0);a[228944]=0;c[57432]=-5;i=j;return}else if((k|0)==5){aI(205528,32,1,c[10028]|0)}else if((k|0)==1|(k|0)==4){m=+(b>>4|0)/100.0;n=m<0.0?0.0:m;cf(c[10028]|0,205672,(v=i,i=i+40|0,h[v>>3]=n>1.0?1.0:n,c[v+8>>2]=d,c[v+16>>2]=e,c[v+24>>2]=f,c[v+32>>2]=g,v)|0);a[228944]=0;c[57432]=-5;i=j;return}else if((k|0)!=2){cf(c[10028]|0,205464,(v=i,i=i+32|0,c[v>>2]=d,c[v+8>>2]=e,c[v+16>>2]=f,c[v+24>>2]=g,v)|0);a[228944]=0;c[57432]=-5;i=j;return}k=(b>>4|0)%8&-1;if((k|0)==7){b=c[10028]|0;cf(b|0,205184,(v=i,i=i+48|0,c[v>>2]=d,c[v+8>>2]=e,c[v+16>>2]=f,c[v+24>>2]=g,c[v+32>>2]=40,c[v+40>>2]=-30,v)|0);a[228944]=0;c[57432]=-5;i=j;return}else if((k|0)==3){cf(c[10028]|0,205240,(v=i,i=i+32|0,c[v>>2]=d,c[v+8>>2]=e,c[v+16>>2]=f,c[v+24>>2]=g,v)|0);a[228944]=0;c[57432]=-5;i=j;return}else if((k|0)==1){cf(c[10028]|0,205352,(v=i,i=i+48|0,c[v>>2]=d,c[v+8>>2]=e,c[v+16>>2]=f,c[v+24>>2]=g,c[v+32>>2]=80,c[v+40>>2]=-45,v)|0);a[228944]=0;c[57432]=-5;i=j;return}else if((k|0)==2){cf(c[10028]|0,205312,(v=i,i=i+48|0,c[v>>2]=d,c[v+8>>2]=e,c[v+16>>2]=f,c[v+24>>2]=g,c[v+32>>2]=40,c[v+40>>2]=45,v)|0);a[228944]=0;c[57432]=-5;i=j;return}else if((k|0)==5){cf(c[10028]|0,205184,(v=i,i=i+48|0,c[v>>2]=d,c[v+8>>2]=e,c[v+16>>2]=f,c[v+24>>2]=g,c[v+32>>2]=80,c[v+40>>2]=-45,v)|0);a[228944]=0;c[57432]=-5;i=j;return}else if((k|0)==6){cf(c[10028]|0,205184,(v=i,i=i+48|0,c[v>>2]=d,c[v+8>>2]=e,c[v+16>>2]=f,c[v+24>>2]=g,c[v+32>>2]=40,c[v+40>>2]=30,v)|0);a[228944]=0;c[57432]=-5;i=j;return}else if((k|0)==4){cf(c[10028]|0,205184,(v=i,i=i+48|0,c[v>>2]=d,c[v+8>>2]=e,c[v+16>>2]=f,c[v+24>>2]=g,c[v+32>>2]=80,c[v+40>>2]=45,v)|0);a[228944]=0;c[57432]=-5;i=j;return}else{cf(c[10028]|0,205464,(v=i,i=i+32|0,c[v>>2]=d,c[v+8>>2]=e,c[v+16>>2]=f,c[v+24>>2]=g,v)|0);a[228944]=0;c[57432]=-5;i=j;return}}function pO(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;f=i;i=i+16|0;g=f|0;h=f+8|0;c[g>>2]=e;if((e|0)==0){b7()}pG(b,d);d=c[7230]|0;if((d|0)!=0){b=c[10028]|0;cf(b|0,202848,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}L22516:do{if((c[11252]|0)==15){d=e;while(1){b=a[d]|0;if(b<<24>>24==0){j=16796;break L22516}if(b<<24>>24<0){break}else{d=d+1|0}}aF(91,c[10028]|0);ug(h,g);d=c[h>>2]|0;do{if((d|0)!=0){b=0;k=d;while(1){l=(b|0)==1;do{if(k>>>0<256){if(l){m=k}else{n=c[10028]|0;aF(40,n|0);m=c[h>>2]|0}if((m-40|0)>>>0<2|(m|0)==92){n=c[10028]|0;aF(92,n|0);o=c[h>>2]|0}else{o=m}n=o<<24>>24;p=c[10028]|0;aF(n|0,p|0);q=1}else{if(l){p=c[10028]|0;aF(41,p|0)}p=c[10028]|0;aF(47,p|0);p=c[7114]|0;n=c[18090]|0;r=c[h>>2]|0;s=0;while(1){if((s|0)>=(p|0)){t=p;break}if((c[n+(s<<3)>>2]|0)==(r|0)){j=16786;break}else{s=s+1|0}}if((j|0)==16786){j=0;r=c[n+(s<<3)+4>>2]|0;p=c[10028]|0;aK(r|0,p|0);t=c[7114]|0}if((s|0)<(t|0)){q=2;break}p=c[h>>2]|0;cf(c[10028]|0,(p>>>0>65535?215776:215728)|0,(v=i,i=i+8|0,c[v>>2]=p,v)|0);q=2}}while(0);ug(h,g);l=c[h>>2]|0;if((l|0)==0){break}else{b=q;k=l}}if((q|0)!=1){break}aF(41,c[10028]|0)}}while(0);d=c[7198]|0;if((d|0)==1){k=c[10028]|0;aI(202768,9,1,k|0);break}else if((d|0)==0){aI(202832,9,1,c[10028]|0);break}else if((d|0)==2){aI(202736,9,1,c[10028]|0);break}else{break}}else{j=16796}}while(0);do{if((j|0)==16796){q=c[10028]|0;aF(40,q|0);q=e+1|0;c[g>>2]=q;t=a[e]|0;o=t<<24>>24;c[h>>2]=o;if(t<<24>>24!=0){m=t;t=q;q=o;while(1){if((m-40&255)<2|m<<24>>24==92){o=c[10028]|0;aF(92,o|0);u=c[h>>2]|0}else{u=q}aF(u<<24>>24|0,c[10028]|0);w=t+1|0;o=a[t]|0;d=o<<24>>24;c[h>>2]=d;if(o<<24>>24==0){break}else{m=o;t=w;q=d}}c[g>>2]=w}q=c[7198]|0;if((q|0)==2){t=c[10028]|0;aI(202632,8,1,t|0);break}else if((q|0)==1){aI(202648,8,1,c[10028]|0);break}else if((q|0)==0){aI(202680,8,1,c[10028]|0);break}else{break}}}while(0);if((c[7230]|0)==0){c[7116]=0;a[228944]=0;i=f;return}aI(212688,9,1,c[10028]|0);c[7116]=0;a[228944]=0;i=f;return}function pP(b){b=+b;var d=0,e=0;d=i;e=c[7116]|0;if((e|0)!=0&+h[28714]==b){i=d;return}if((e|0)!=0){e=c[10028]|0;aI(215952,7,1,e|0);c[7116]=0;a[228944]=0}h[28715]=b;c[57432]=-5;cf(c[10028]|0,205832,(v=i,i=i+8|0,h[v>>3]=b,v)|0);i=d;return}function pQ(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;d=i;i=i+8|0;e=d|0;if((b|0)==0){i=d;return 0}aI(210952,29,1,c[10028]|0);cf(c[10028]|0,210928,(v=i,i=i+8|0,c[v>>2]=c[5168],v)|0);f=0;do{aK(c[34936+(f<<2)>>2]|0,c[10028]|0);f=f+1|0;}while((f|0)!=27);f=c[5163]|0;L22585:do{if((f|0)==100){g=c[10028]|0;aI(210800,28,1,g|0);ty();g=c[b+44>>2]|0;j=c[b+40>>2]|0;tA(209040,g,j,0);tA(209e3,g,j,8);tA(208976,g,j,16);tA(208856,g,j,24)}else if((f|0)==99|(f|0)==102){c[e>>2]=0;aI(210800,28,1,c[10028]|0);ty();j=c[7118]|0;g=fs(0,c[j+100>>2]|0,+h[j+104>>3],e)|0;j=c[e>>2]|0;tA(209040,g,j,0);tA(209e3,g,j,8);tA(208976,g,j,16);tA(208856,g,j,24);uu(g)}else if((f|0)==103){aI(210856,29,1,c[10028]|0)}else if((f|0)==114){aI(210856,29,1,c[10028]|0);if((a[20684]|0)!=0){g=c[7122]|0;if((a[g]|0)==0){break}else{k=0;l=0;n=g}while(1){g=c[28488+((l|1)<<2)>>2]|0;cf(c[10028]|0,207920,(v=i,i=i+24|0,c[v>>2]=k,c[v+8>>2]=n,c[v+16>>2]=g,v)|0);k=k+1|0;l=k<<1;n=c[28488+(l<<2)>>2]|0;if((a[n]|0)==0){break L22585}}}g=c[5164]|0;j=(g|0)>-1?g:-g|0;g=j<<1;o=c[28488+(g<<2)>>2]|0;p=c[28488+((g|1)<<2)>>2]|0;cf(c[10028]|0,207920,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=o,c[v+16>>2]=p,v)|0);p=c[5165]|0;o=(p|0)>-1?p:-p|0;p=c[5164]|0;if((o|0)==(((p|0)>-1?p:-p|0)|0)){q=p}else{p=c[10028]|0;j=o<<1;g=c[28488+(j<<2)>>2]|0;r=c[28488+((j|1)<<2)>>2]|0;cf(p|0,207920,(v=i,i=i+24|0,c[v>>2]=o,c[v+8>>2]=g,c[v+16>>2]=r,v)|0);q=c[5164]|0}r=c[5166]|0;g=(r|0)>-1?r:-r|0;if((g|0)==(((q|0)>-1?q:-q|0)|0)){break}r=c[5165]|0;if((g|0)==(((r|0)>-1?r:-r|0)|0)){break}r=g<<1;o=c[28488+(r<<2)>>2]|0;p=c[28488+((r|1)<<2)>>2]|0;cf(c[10028]|0,207920,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=o,c[v+16>>2]=p,v)|0)}else{cf(c[m>>2]|0,210704,(v=i,i=i+24|0,c[v>>2]=210640,c[v+8>>2]=2883,c[v+16>>2]=f<<24>>24,v)|0)}}while(0);aI(210600,37,1,c[10028]|0);aI(210528,67,1,c[10028]|0);cf(c[10028]|0,210480,(v=i,i=i+8|0,h[v>>3]=+h[2705],v)|0);aI(209304,12,1,c[10028]|0);f=c[b+48>>2]|0;if((f|0)==121){b=c[10028]|0;aI(209160,5,1,b|0)}else if((f|0)==114){aI(209216,5,1,c[10028]|0)}else if((f|0)==120){aI(209152,5,1,c[10028]|0)}else if((f|0)==99){aI(209200,5,1,c[10028]|0)}else if((f|0)==104){aI(209208,5,1,c[10028]|0)}else{cf(c[m>>2]|0,209064,(v=i,i=i+24|0,c[v>>2]=210640,c[v+8>>2]=2794,c[v+16>>2]=f<<24>>24,v)|0);aI(209216,5,1,c[10028]|0)}aI(209056,5,1,c[10028]|0);f=c[10028]|0;if((c[5163]|0)==103){aI(210440,30,1,f|0)}else{aI(210368,51,1,f|0)}aI(210312,55,1,c[10028]|0);aI(210184,53,1,c[10028]|0);aI(210040,42,1,c[10028]|0);aI(210008,5,1,c[10028]|0);aI(209864,27,1,c[10028]|0);f=c[5164]|0;if((f|0)<0){b=c[10028]|0;aI(209784,11,1,b|0);s=c[5164]|0}else{s=f}cf(c[10028]|0,209696,(v=i,i=i+8|0,c[v>>2]=(s|0)>-1?s:-s|0,v)|0);s=c[5165]|0;if((s|0)<0){f=c[10028]|0;aI(209784,11,1,f|0);t=c[5165]|0}else{t=s}cf(c[10028]|0,209664,(v=i,i=i+8|0,c[v>>2]=(t|0)>-1?t:-t|0,v)|0);t=c[5166]|0;if((c[5165]|c[5164]|t|0)<0){s=c[10028]|0;aI(84248,2,1,s|0);u=c[5166]|0}else{u=t}if((u|0)<0){t=c[10028]|0;aI(209784,11,1,t|0);w=c[5166]|0}else{w=u}cf(c[10028]|0,209648,(v=i,i=i+8|0,c[v>>2]=(w|0)>-1?w:-w|0,v)|0);aI(209584,42,1,c[10028]|0);aI(209568,11,1,c[10028]|0);aI(209552,3,1,c[10028]|0);aI(209344,55,1,c[10028]|0);aI(213784,9,1,c[10028]|0);i=d;return 0}function pR(){var b=0;if((c[7116]|0)!=0){b=c[10028]|0;aI(215952,7,1,b|0);c[7116]=0;a[228944]=0}aI(211040,30,1,c[10028]|0);return}function pS(b){b=b|0;var d=0,e=0.0,f=0,g=0,j=0,k=0.0,l=0.0,m=0,n=0,o=0,p=0;d=i;c[57432]=-5;e=+h[28715];if(+h[28714]!=e){h[28714]=e;f=c[10028]|0;aI(211272,3,1,f|0)}f=b|0;g=c[f>>2]|0;if((g|0)==3){j=c[b+4>>2]|0;e=+(j>>>16&255|0)/255.0;k=+(j>>>8&255|0)/255.0;l=+(j&255|0)/255.0;if((c[7116]|0)!=0){j=c[10028]|0;aI(215952,7,1,j|0);c[7116]=0;a[228944]=0}j=c[10028]|0;cf(j|0,211112,(v=i,i=i+24|0,h[v>>3]=e,h[v+8>>3]=k,h[v+16>>3]=l,v)|0);m=16871}else if((g|0)==1){j=c[b+4>>2]|0;if((c[7116]|0)!=0){n=c[10028]|0;aI(215952,7,1,n|0);c[7116]=0;a[228944]=0}n=c[7118]|0;do{if((c[n>>2]|0)==2){if((a[n+112|0]&1)==0){m=16866;break}o=(j|0)%4&-1}else{m=16866}}while(0);if((m|0)==16866){o=(j|0)%9&-1}j=o+3|0;cf(c[10028]|0,211192,(v=i,i=i+8|0,c[v>>2]=a[93672+((j|0)<0?0:j)|0]|0,v)|0);m=16871}else{p=g}if((m|0)==16871){p=c[f>>2]|0}if((p|0)!=5){i=d;return}l=+h[b+8>>3];do{if(l>0.0){b=c[10028]|0;if(l<1.0){k=+(~~(l*1.0e4+.5)|0)*1.0e-4;be(25336,141840,(v=i,i=i+8|0,h[v>>3]=k,v)|0);p=(a[25336]|0)==48&(a[25337]|0)==46?25337:25336;cf(b|0,211072,(v=i,i=i+8|0,c[v>>2]=p,v)|0);break}else{aI(211080,4,1,b|0);break}}else{b=c[10028]|0;aI(211104,4,1,b|0)}}while(0);a[228944]=0;i=d;return}function pT(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0;e=i;f=c[d+8>>2]|0;if(a[228944]&(c[7116]|0)!=0){g=c[10028]|0;aI(215952,7,1,g|0);c[7116]=0;a[228944]=0}if((b|0)==4&(f|0)==1601){g=c[10028]|0;j=d|0;k=c[j>>2]|0;l=d+4|0;m=c[l>>2]|0;cf(g|0,211680,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=m,v)|0);m=c[10028]|0;k=c[d+24>>2]|0;g=(c[d+36>>2]|0)-k|0;n=c[d+28>>2]|0;o=(c[d+40>>2]|0)-n|0;p=c[d+12>>2]|0;q=k-p|0;k=c[d+16>>2]|0;r=n-k|0;n=p-(c[j>>2]|0)|0;j=k-(c[l>>2]|0)|0;cf(m|0,211600,(v=i,i=i+48|0,c[v>>2]=g,c[v+8>>2]=o,c[v+16>>2]=q,c[v+24>>2]=r,c[v+32>>2]=n,c[v+40>>2]=j,v)|0);a[228944]=0;i=e;return}j=f>>4;n=f&15;aI(211544,6,1,c[10028]|0);f=c[d+4>>2]|0;cf(c[10028]|0,211680,(v=i,i=i+16|0,c[v>>2]=c[d>>2],c[v+8>>2]=f,v)|0);if((b|0)>1){f=1;do{r=c[10028]|0;q=c[d+(f*12&-1)>>2]|0;if(((f|0)%105&-1|0)==0){o=c[d+(f*12&-1)+4>>2]|0;cf(r|0,211480,(v=i,i=i+16|0,c[v>>2]=q,c[v+8>>2]=o,v)|0)}else{o=f-1|0;g=q-(c[d+(o*12&-1)>>2]|0)|0;q=(c[d+(f*12&-1)+4>>2]|0)-(c[d+(o*12&-1)+4>>2]|0)|0;cf(r|0,211528,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=q,v)|0)}f=f+1|0;}while((f|0)<(b|0))}if((n|0)==1|(n|0)==4){s=+(j|0)/100.0;t=s<0.0?0.0:s;b=c[10028]|0;if(t<1.0){s=t;cf(b|0,211448,(v=i,i=i+8|0,h[v>>3]=s,v)|0);a[228944]=0;i=e;return}else{aI(211464,12,1,b|0);a[228944]=0;i=e;return}}else if((n|0)==5){aI(211416,31,1,c[10028]|0)}else if((n|0)!=2){aI(211464,12,1,c[10028]|0);a[228944]=0;i=e;return}n=(j|0)%8&-1;j=c[10028]|0;if((n|0)==0){cf(j|0,211400,(v=i,i=i+8|0,h[v>>3]=.5,v)|0);a[228944]=0;i=e;return}else{cf(j|0,211360,(v=i,i=i+8|0,c[v>>2]=n,v)|0);a[228944]=0;i=e;return}}function pU(){if(!(a[237912]|0)){return}aI(215624,3,1,c[10028]|0);a[237912]=0;return}function pV(b,e,f,g,j){b=b|0;e=e|0;f=f|0;g=g|0;j=j|0;var k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aG=0,aH=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0;k=i;i=i+24|0;l=k|0;n=k+8|0;o=k+16|0;p=c[5168]|0;q=(p|0)>0?p:256;do{if((q|0)>1){p=1;r=0;do{r=r+1&65535;p=p<<1;}while((p|0)<(q|0));if(r<<16>>16==0|(r&65535)>12){s=r;break}do{if((r&65535)>8){t=12}else{if((r&65535)>4){t=8;break}t=(r&65535)>2?4:r}}while(0);r=(j|0)==1;do{if(r){u=16922}else{p=c[5163]|0;if((p|0)==103){u=16922;break}else if((p|0)!=114){w=1.0;x=0;break}if((a[(c[7118]|0)+17|0]&1)==0){u=16922}else{w=1.0;x=0}}}while(0);if((u|0)==16922){w=+((1<<(t&65535))-1|0)/+(q-1|0);x=1}p=t&65535;y=a[(c[7118]|0)+16|0]&1;z=l|0;A=aa(aa(aa(r?3:1,b),p)+7|0,e);if(y<<24>>24==0){y=((A>>>5)*5&-1)+7|0;B=((y|0)/78&-1)+y|0}else{y=(A>>>2)+1|0;B=((y|0)/78&-1)+y|0}y=ut(B)|0;do{if((y|0)==0){gk();A=ut(B)|0;if((A|0)!=0){C=A;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=211936,v)|0)}else{C=y}}while(0);y=aa(e,b);if(r){D=y*3&-1;E=b*3&-1}else{D=y;E=b}L22728:do{if((D|0)==0){F=C}else{G=+(q|0);A=q-1|0;H=A&65535;I=l+1|0;J=l+2|0;K=l+3|0;L=l+4|0;M=32;N=0;O=0;P=0;Q=C;R=78;S=f;T=D;while(1){U=S+8|0;V=~~(G*+h[S>>3]);W=~~(w*+((((V&65535|0)>(A|0)?H:V)&65535)>>>0));V=M&65535;if((M&65535)<(t&65535)){X=p-V|0;Y=(W&65535)>>>((X&65535)>>>0)|O<>16==0){do{if((a[(c[7118]|0)+16|0]&1)==0){if((ab|0)!=0){X=(ab>>>0)/52200625>>>0;V=X&255;a[z]=V;ad=aa(X,-52200625)+ab|0;X=(ad>>>0)/614125>>>0;a[I]=X&255;ae=((X&255)*-614125&-1)+ad|0;ad=(ae>>>0)/7225>>>0;a[J]=ad&255;X=ae+((ad&255)*-7225&-1)|0;ad=(X>>>0)/85>>>0;a[K]=ad&255;a[L]=X+((ad&255)*-85&-1)&255;ad=Q+1|0;a[Q]=V+33&255;V=R<<16>>16==1;X=V?Q+2|0:ad;a[ad]=V?10:0;ad=X+1|0;a[X]=(a[I]|0)+33&255;ae=V?77:R-2&65535;V=ae<<16>>16==0;af=V?X+2|0:ad;a[ad]=V?10:0;ad=af+1|0;a[af]=(a[J]|0)+33&255;X=V?77:ae-1&65535;ae=X<<16>>16==0;V=ae?af+2|0:ad;a[ad]=ae?10:0;ad=V+1|0;a[V]=(a[K]|0)+33&255;af=ae?77:X-1&65535;X=af<<16>>16==0;ae=X?V+2|0:ad;a[ad]=X?10:0;ad=ae+1|0;a[ae]=(a[L]|0)+33&255;V=X?77:af-1&65535;af=V<<16>>16==0;a[ad]=af?10:0;ag=af?78:V;ah=af?ae+2|0:ad;break}ad=Q+1|0;a[Q]=122;ae=R-1&65535;if(ae<<16>>16!=0){ag=ae;ah=ad;break}a[ad]=10;ag=78;ah=Q+2|0}else{ad=ab>>>4;ae=ab>>>8;af=ab>>>12;V=ab>>>16;X=ab>>>20;ai=ab>>>24;aj=ab>>>28;ak=Q+1|0;be(Q|0,211896,(v=i,i=i+8|0,c[v>>2]=aj,v)|0);aj=R-1&65535;if(aj<<16>>16==0){a[ak]=10;al=78;am=Q+2|0}else{al=aj;am=ak}ak=am+1|0;aj=ai&15;be(am|0,211896,(v=i,i=i+8|0,c[v>>2]=aj,v)|0);aj=al-1&65535;if(aj<<16>>16==0){a[ak]=10;an=78;ao=am+2|0}else{an=aj;ao=ak}ak=ao+1|0;aj=X&15;be(ao|0,211896,(v=i,i=i+8|0,c[v>>2]=aj,v)|0);aj=an-1&65535;if(aj<<16>>16==0){a[ak]=10;ap=78;aq=ao+2|0}else{ap=aj;aq=ak}ak=aq+1|0;aj=V&15;be(aq|0,211896,(v=i,i=i+8|0,c[v>>2]=aj,v)|0);aj=ap-1&65535;if(aj<<16>>16==0){a[ak]=10;ar=78;as=aq+2|0}else{ar=aj;as=ak}ak=as+1|0;aj=af&15;be(as|0,211896,(v=i,i=i+8|0,c[v>>2]=aj,v)|0);aj=ar-1&65535;if(aj<<16>>16==0){a[ak]=10;at=78;au=as+2|0}else{at=aj;au=ak}ak=au+1|0;aj=ae&15;be(au|0,211896,(v=i,i=i+8|0,c[v>>2]=aj,v)|0);aj=at-1&65535;if(aj<<16>>16==0){a[ak]=10;av=78;aw=au+2|0}else{av=aj;aw=ak}ak=aw+1|0;aj=ad&15;be(aw|0,211896,(v=i,i=i+8|0,c[v>>2]=aj,v)|0);aj=av-1&65535;if(aj<<16>>16==0){a[ak]=10;ax=78;ay=aw+2|0}else{ax=aj;ay=ak}ak=ay+1|0;aj=ab&15;be(ay|0,211896,(v=i,i=i+8|0,c[v>>2]=aj,v)|0);aj=ax-1&65535;if(aj<<16>>16!=0){ag=aj;ah=ak;break}a[ak]=10;ag=78;ah=ay+2|0}}while(0);if(Z<<16>>16==0){az=0}else{ak=W&65535;aj=Z&65535;az=ak-(ak>>>(aj>>>0)<=32){F=aB;break}S=4-(T>>>3)|0;if((a[(c[7118]|0)+16|0]&1)==0){R=aC<>>0)/52200625>>>0;Q=T&255;a[z]=Q;P=aa(T,-52200625)+R|0;R=(P>>>0)/614125>>>0;a[I]=R&255;T=((R&255)*-614125&-1)+P|0;P=(T>>>0)/7225>>>0;a[J]=P&255;R=T+((P&255)*-7225&-1)|0;P=(R>>>0)/85>>>0;a[K]=P&255;a[L]=R+((P&255)*-85&-1)&255;if((S|0)<0){F=aB;break}P=aB+1|0;a[aB]=Q+33&255;Q=aA-1&65535;R=Q<<16>>16==0;T=R?aB+2|0:P;a[P]=R?10:0;if((S|0)<1){F=T;break}else{aG=1;aH=Q;aJ=R;aK=T}while(1){T=aG+1|0;R=aK+1|0;a[aK]=(a[l+aG|0]|0)+33&255;Q=aJ?77:aH-1&65535;P=Q<<16>>16==0;O=P?aK+2|0:R;a[R]=P?10:0;if((T|0)>(S|0)){F=O;break L22728}else{aG=T;aH=Q;aJ=P;aK=O}}}L=S<<1;if((L|0)>0){aL=aC;aM=L}else{F=aB;break}while(1){K=aM-1|0;a[n+K|0]=aL&15;if((K|0)>0){aL=aL>>>4;aM=K}else{aN=aB;aO=aA;aP=0;break}}while(1){S=aN+1|0;be(aN|0,211896,(v=i,i=i+8|0,c[v>>2]=d[n+aP|0]|0,v)|0);K=aO-1&65535;if(K<<16>>16==0){a[S]=10;aQ=78;aR=aN+2|0}else{aQ=K;aR=S}S=aP+1|0;if((S|0)<(L|0)){aN=aR;aO=aQ;aP=S}else{F=aR;break}}}}while(0);if((a[(c[7118]|0)+16|0]&1)==0){a[F]=a[211872]|0;a[F+1|0]=a[211873|0]|0;a[F+2|0]=a[211874|0]|0;aS=F+2|0}else{aS=F}z=aS-C|0;if((z|0)>(B|0)){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=211696,v)|0)}aI(214464,15,1,c[10028]|0);r=c[g+24>>2]|0;L=c[g+28>>2]|0;S=c[g+40>>2]|0;K=c[g+36>>2]|0;cf(c[10028]|0,214416,(v=i,i=i+64|0,c[v>>2]=r,c[v+8>>2]=L,c[v+16>>2]=r,c[v+24>>2]=S,c[v+32>>2]=K,c[v+40>>2]=S,c[v+48>>2]=K,c[v+56>>2]=L,v)|0);do{if(x){if((a[(c[7118]|0)+16|0]&1)==0){L=c[10028]|0;aI(214344,62,1,L|0);L=c[10028]|0;K=g|0;S=c[K>>2]|0;r=g+4|0;J=c[r>>2]|0;cf(L|0,214312,(v=i,i=i+16|0,c[v>>2]=S,c[v+8>>2]=J,v)|0);J=c[10028]|0;S=g+12|0;L=(c[S>>2]|0)-(c[K>>2]|0)|0;cf(J|0,214296,(v=i,i=i+8|0,c[v>>2]=L,v)|0);L=c[10028]|0;J=(c[g+16>>2]|0)-(c[r>>2]|0)|0;cf(L|0,214272,(v=i,i=i+8|0,c[v>>2]=J,v)|0);J=c[10028]|0;L=(c[K>>2]|0)-(c[S>>2]|0)|0;cf(J|0,214296,(v=i,i=i+8|0,c[v>>2]=L,v)|0);L=c[10028]|0;J=c[K>>2]|0;K=c[r>>2]|0;cf(L|0,214256,(v=i,i=i+16|0,c[v>>2]=J,c[v+8>>2]=K,v)|0);K=c[10028]|0;aI(214128,67,1,K|0);K=c[10028]|0;cf(K|0,213920,(v=i,i=i+8|0,c[v>>2]=z,v)|0);K=c[10028]|0;aI(213848,38,1,K|0);tx(b,e,g,j,t);K=c[10028]|0;aI(213784,9,1,K|0);break}else{tx(b,e,g,j,t);break}}else{K=q-1|0;G=1.0/+(K|0);if((a[(c[7118]|0)+16|0]&1)==0){J=c[10028]|0;aI(214344,62,1,J|0);J=c[10028]|0;L=g|0;r=c[L>>2]|0;S=g+4|0;I=c[S>>2]|0;cf(J|0,214312,(v=i,i=i+16|0,c[v>>2]=r,c[v+8>>2]=I,v)|0);I=c[10028]|0;r=g+12|0;J=(c[r>>2]|0)-(c[L>>2]|0)|0;cf(I|0,214296,(v=i,i=i+8|0,c[v>>2]=J,v)|0);J=c[10028]|0;I=g+16|0;O=(c[I>>2]|0)-(c[S>>2]|0)|0;cf(J|0,214272,(v=i,i=i+8|0,c[v>>2]=O,v)|0);O=c[10028]|0;J=(c[L>>2]|0)-(c[r>>2]|0)|0;cf(O|0,214296,(v=i,i=i+8|0,c[v>>2]=J,v)|0);J=c[10028]|0;O=c[L>>2]|0;P=c[S>>2]|0;cf(J|0,214256,(v=i,i=i+16|0,c[v>>2]=O,c[v+8>>2]=P,v)|0);P=c[10028]|0;cf(P|0,213648,(v=i,i=i+8|0,c[v>>2]=z,v)|0);P=c[10028]|0;aI(213608,4,1,P|0);aT=L;aU=S;aV=r;aW=I}else{aT=g|0;aU=g+4|0;aV=g+12|0;aW=g+16|0}I=c[10028]|0;aI(213600,6,1,I|0);I=c[10028]|0;r=c[aT>>2]|0;S=c[aU>>2]|0;cf(I|0,213576,(v=i,i=i+16|0,c[v>>2]=r,c[v+8>>2]=S,v)|0);S=c[10028]|0;r=(c[aV>>2]|0)-(c[aT>>2]|0)|0;I=(c[aW>>2]|0)-(c[aU>>2]|0)|0;cf(S|0,213528,(v=i,i=i+16|0,c[v>>2]=r,c[v+8>>2]=I,v)|0);I=c[10028]|0;aI(213504,17,1,I|0);I=c[10028]|0;cf(I|0,213456,(v=i,i=i+8|0,c[v>>2]=K,v)|0);K=o|0;I=o+1|0;r=o+2|0;S=0;L=0;while(1){fr(G*+(S|0),o);if(L<<16>>16==0){P=c[10028]|0;aI(152656,3,1,P|0);aX=8}else{aX=L}P=d[I]|0;O=d[r]|0;cf(c[10028]|0,213376,(v=i,i=i+24|0,c[v>>2]=d[K]|0,c[v+8>>2]=P,c[v+16>>2]=O,v)|0);O=S+1|0;if((O|0)<(q|0)){S=O;L=aX-1&65535}else{break}}aI(213312,21,1,c[10028]|0);aI(213272,15,1,c[10028]|0);cf(c[10028]|0,213216,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=e,v)|0);cf(c[10028]|0,213144,(v=i,i=i+24|0,c[v>>2]=p,c[v+8>>2]=b,c[v+16>>2]=e,v)|0);cf(c[10028]|0,213120,(v=i,i=i+8|0,c[v>>2]=(1<>>3;cf(L|0,213920,(v=i,i=i+8|0,c[v>>2]=S,v)|0);S=c[10028]|0;aI(213056,55,1,S|0)}aI(212936,29,1,c[10028]|0);aI(212896,30,1,c[10028]|0);if((a[(c[7118]|0)+16|0]&1)!=0){break}aI(213784,9,1,c[10028]|0)}}while(0);if((z|0)>0){y=0;p=C;while(1){aF(a[p]|0|0,c[10028]|0);S=y+1|0;if((S|0)<(z|0)){y=S;p=p+1|0}else{break}}}p=c[10028]|0;if((a[(c[7118]|0)+16|0]&1)==0){aI(212776,39,1,p|0)}else{aI(212832,10,1,p|0)}aI(212688,9,1,c[10028]|0);aI(212656,13,1,c[10028]|0);uu(C);i=k;return}else{s=0}}while(0);cf(c[m>>2]|0,214504,(v=i,i=i+8|0,c[v>>2]=s&65535,v)|0);i=k;return}function pW(b,d,e,f,g,j){b=b|0;d=+d;e=+e;f=f|0;g=g|0;j=j|0;var k=0,l=0,m=0,n=0,o=0;k=i;if((j|0)==4){l=c[10028]|0;aI(215544,10,1,l|0);i=k;return}else if((j|0)==3){aI(215600,7,1,c[10028]|0);i=k;return}else{if(a[237912]|0){i=k;return}l=(uA(b|0)|0)+40|0;uu(c[59476]|0);m=ut(l)|0;do{if((m|0)==0){gk();n=ut(l)|0;if((n|0)!=0){o=n;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215504,v)|0)}else{o=m}}while(0);c[59476]=o;tz(b);a0(c[59476]|0,l|0,215400,(v=i,i=i+48|0,c[v>>2]=b,h[v+8>>3]=d,h[v+16>>3]=e,c[v+24>>2]=f?225e3:224992,c[v+32>>2]=g?225e3:224992,c[v+40>>2]=j,v)|0);cf(c[10028]|0,215368,(v=i,i=i+8|0,c[v>>2]=c[59476],v)|0);a[237912]=1;i=k;return}}function pX(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+16|0;e=d|0;f=d+8|0;g=c[11252]|0;if((g|0)!=15){h=(g|0)==14;g=c[10028]|0;aF(b|0,g|0);if(!h){i=d;return}if(a[238472]|0){a[238472]=0;if((b|0)!=92){i=d;return}h=c[10028]|0;aF(92,h|0);i=d;return}else{if((b&128|0)==0){i=d;return}a[238472]=1;i=d;return}}if((b&128|0)==0){h=c[10028]|0;aF(b|0,h|0);i=d;return}h=c[59616]|0;if((h|0)==0){do{if((b&224|0)==192){j=2;k=17022}else{if((b&240|0)==224){j=3;k=17022;break}g=(b&248|0)==240;c[59614]=g?4:0;if(g){break}g=c[10028]|0;aF(b|0,g|0);i=d;return}}while(0);if((k|0)==17022){c[59614]=j}c[59616]=1;a[238448]=b&255;i=d;return}j=h+1|0;c[59616]=j;a[h+238448|0]=b&255;b=c[59614]|0;if((j|0)<(b|0)){i=d;return}c[e>>2]=0;c[f>>2]=238448;a[b+238448|0]=0;c[59616]=0;ug(e,f);f=c[e>>2]|0;if(f>>>0<256){b=c[10028]|0;aF(f|0,b|0);i=d;return}if(a[237912]|0){b=c[10028]|0;aI(215624,3,1,b|0);a[237912]=0}cf(c[10028]|0,215784,(v=i,i=i+8|0,c[v>>2]=c[59476],v)|0);b=c[7114]|0;f=c[18090]|0;j=c[e>>2]|0;h=0;while(1){if((h|0)>=(b|0)){l=b;break}if((c[f+(h<<3)>>2]|0)==(j|0)){k=17034;break}else{h=h+1|0}}if((k|0)==17034){k=c[f+(h<<3)+4>>2]|0;f=c[10028]|0;aK(k|0,f|0);l=c[7114]|0}if((h|0)>=(l|0)){l=c[10028]|0;h=c[e>>2]|0;e=h>>>0>65535?215776:215728;cf(l|0,e|0,(v=i,i=i+8|0,c[v>>2]=h,v)|0)}aI(89968,2,1,c[10028]|0);a[237912]=0;i=d;return}function pY(a){a=a|0;var b=0,d=0,e=0;b=i;if((a|0)==13){d=c[10028]|0;cf(d|0,93784,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=b;return}else if((a|0)==7){cf(c[10028]|0,215840,(v=i,i=i+8|0,c[v>>2]=c[57434],v)|0);i=b;return}else if((a|0)==0){c[57434]=0;i=b;return}else if((a|0)==6){d=c[10028]|0;e=(c[57434]|0)+1|0;c[57434]=e;cf(d|0,215920,(v=i,i=i+8|0,c[v>>2]=e,v)|0);i=b;return}else if((a|0)==12){cf(c[10028]|0,93800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=b;return}else{i=b;return}}function pZ(b){b=b|0;var d=0;if((b|0)==0){if((c[7116]|0)!=0){d=c[10028]|0;aI(215952,7,1,d|0);c[7116]=0;a[228944]=0}a[229704]=1;return}else if((b|0)==1){aI(78256,2,1,c[10028]|0);if((c[7116]|0)==0){return}aI(215952,7,1,c[10028]|0);c[7116]=0;a[228944]=0;return}else{return}}function p_(){aI(215984,51,1,c[10030]|0);return}function p$(){aI(216040,6,1,c[10030]|0);return}function p0(){aI(216080,9,1,c[10030]|0);return}function p1(){aI(216176,5,1,c[10030]|0);return}function p2(a,b){a=a|0;b=b|0;var d=0;d=i;cf(c[10030]|0,216272,(v=i,i=i+16|0,c[v>>2]=a+1e3,c[v+8>>2]=6999-b,v)|0);i=d;return}function p3(a,b){a=a|0;b=b|0;var d=0;d=i;cf(c[10030]|0,216304,(v=i,i=i+16|0,c[v>>2]=a+1e3,c[v+8>>2]=6999-b,v)|0);i=d;return}function p4(a){a=a|0;var b=0,d=0;b=i;c[6954]=a;if((a|0)>8){d=(a|0)%9&-1}else{d=a}a=d+2|0;cf(c[10030]|0,216464,(v=i,i=i+8|0,c[v>>2]=c[228840+(a<<2)>>2],v)|0);d=c[228888+(a<<2)>>2]|0;if((d|0)==1){a=c[10030]|0;aI(216400,16,1,a|0);i=b;return}else if((d|0)==3){aI(216352,16,1,c[10030]|0);i=b;return}else if((d|0)==2){aI(216376,16,1,c[10030]|0);i=b;return}else{aI(216344,4,1,c[10030]|0);i=b;return}}function p5(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;cf(c[10030]|0,216272,(v=i,i=i+16|0,c[v>>2]=b+1e3,c[v+8>>2]=6959-d,v)|0);aI(216552,5,1,c[10030]|0);d=e;while(1){e=a[d]|0;b=d+1|0;g=e<<24>>24;if((e<<24>>24|0)==94){h=c[10030]|0;aF(94,h|0)}else if((e<<24>>24|0)==0){break}aF(g|0,c[10030]|0);d=b}aI(216504,6,1,c[10030]|0);p4(c[6954]|0);i=f;return}function p6(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0.0,_=0,$=0.0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0.0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0.0,aM=0,aN=0;b=i;i=i+200|0;d=b|0;e=b+24|0;f=b+48|0;g=b+72|0;j=b+96|0;k=b+120|0;l=b+144|0;m=b+168|0;n=b+192|0;if((c[13898]|0)==2){o=2}else{c[56738]=6e3;c[56734]=4800;a[228464]=0;uu(c[57106]|0);c[57106]=bP(216600)|0;h[28551]=12.0;p=c[57122]|0;if((p|0)!=0){uu(p)}c[57122]=0;a[228312]=0;a[226968]=0;uu(c[57076]|0);c[57076]=0;uu(c[56744]|0);c[56744]=0;a[228360]=0;a[228336]=0;o=c[13898]|0}p=c[8272]|0;L22958:do{if((o|0)<(p|0)){q=k|0;r=k+8|0;s=j|0;t=j+8|0;u=g|0;w=g+8|0;x=d|0;y=d+8|0;z=e|0;A=e+8|0;B=f|0;C=f+8|0;D=m|0;E=m+8|0;F=l|0;G=l+8|0;H=o;I=p;L22960:while(1){J=c[1054]|0;K=(a[J+(H*40&-1)|0]&1)==0;L=c[J+(H*40&-1)+36>>2]|0;M=J+(H*40&-1)+32|0;L22962:do{if(K){N=c[M>>2]|0;O=17164}else{P=c[10036]|0;Q=0;while(1){if((Q|0)>=(L|0)){O=17114;break}if((a[P+((c[M>>2]|0)+Q|0)|0]|0)==(a[Q+103664|0]|0)){Q=Q+1|0}else{break}}if((O|0)==17114){O=0;if((Q|0)==1){break L22958}}P=c[M>>2]|0;if(!((L|0)>0&(K^1))){N=P;O=17164;break}R=c[10036]|0;S=0;T=0;U=P;while(1){if((a[S+218680|0]|0)==(a[R+(S+U|0)|0]|0)){V=U;W=T}else{if((S|0)!=1){N=P;O=17164;break L22962}V=U-1|0;W=1}X=S+1|0;if((X|0)<(W+L|0)){S=X;T=W;U=V}else{break}}if((W|0)==0){if(!((S|0)==4|(S|0)==0)){N=P;O=17164;break}}Y=H+1|0;c[13898]=Y;if((Y|0)>=(I|0)){O=17424;break L22960}L22982:do{if((a[J+(Y*40&-1)|0]&1)!=0){U=c[J+(Y*40&-1)+36>>2]|0;T=J+(Y*40&-1)+32|0;R=c[10036]|0;Q=0;while(1){if((Q|0)>=(U|0)){break}if((a[R+((c[T>>2]|0)+Q|0)|0]|0)==(a[Q+103664|0]|0)){Q=Q+1|0}else{break L22982}}if((Q|0)==1){O=17425;break L22960}}}while(0);P=is(m)|0;S=c[P>>2]|0;if((S|0)==1){Z=+(c[P+8>>2]|0)}else if((S|0)==3){Z=+uz(c[P+8>>2]|0,0)}else if((S|0)==2){Z=+h[P+8>>3]}else{O=17134;break L22960}if((c[D>>2]|0)==3){uu(c[E>>2]|0);c[D>>2]=1}if(Z<2.0){O=17138;break L22960}c[56738]=~~(Z*10.0);P=c[13898]|0;S=c[8272]|0;L22998:do{if((S|0)>(P|0)){T=c[1054]|0;if((a[T+(P*40&-1)|0]&1)==0){_=P;break}R=c[T+(P*40&-1)+36>>2]|0;U=T+(P*40&-1)+32|0;T=c[10036]|0;X=0;while(1){if((X|0)>=(R|0)){break}if((a[T+((c[U>>2]|0)+X|0)|0]|0)==(a[X+148464|0]|0)){X=X+1|0}else{_=P;break L22998}}if((X|0)!=1){_=P;break}U=P+1|0;c[13898]=U;_=U}else{_=P}}while(0);if((_|0)>=(S|0)){O=17439;break L22960}P=c[1054]|0;L23008:do{if((a[P+(_*40&-1)|0]&1)!=0){U=c[P+(_*40&-1)+36>>2]|0;T=P+(_*40&-1)+32|0;R=c[10036]|0;Q=0;while(1){if((Q|0)>=(U|0)){break}if((a[R+((c[T>>2]|0)+Q|0)|0]|0)==(a[Q+103664|0]|0)){Q=Q+1|0}else{break L23008}}if((Q|0)==1){O=17440;break L22960}}}while(0);P=is(l)|0;S=c[P>>2]|0;if((S|0)==2){$=+h[P+8>>3]}else if((S|0)==1){$=+(c[P+8>>2]|0)}else if((S|0)==3){$=+uz(c[P+8>>2]|0,0)}else{O=17157;break L22960}if((c[F>>2]|0)==3){uu(c[G>>2]|0);c[F>>2]=1}if($<2.0){O=17161;break L22960}c[56734]=~~($*10.0)}}while(0);L23025:do{if((O|0)==17164){O=0;M=(I|0)>(H|0);L23027:do{if(M){if(K){O=17427;break L22960}P=c[10036]|0;S=0;while(1){if((S|0)>=(L|0)){break}if((a[P+(N+S|0)|0]|0)==(a[S+218536|0]|0)){S=S+1|0}else{O=17170;break L23027}}if((S|0)!=5){O=17170}}else{O=17170}}while(0);L23034:do{if((O|0)==17170){O=0;L23036:do{if((L|0)>0&(K^1)){P=c[10036]|0;Q=0;T=0;R=N;while(1){if((a[Q+218504|0]|0)==(a[P+(Q+R|0)|0]|0)){aa=R;ab=T}else{if((Q|0)!=4){break}aa=R-1|0;ab=1}U=Q+1|0;if((U|0)<(ab+L|0)){Q=U;T=ab;R=aa}else{O=17176;break}}if((O|0)==17176){O=0;if((ab|0)!=0){break L23034}if((Q|0)==3|(Q|0)==7){break L23034}}if(!((L|0)>0&(K^1))){break}R=c[10036]|0;T=0;P=0;U=N;while(1){if((a[T+130272|0]|0)==(a[R+(T+U|0)|0]|0)){ac=U;ad=P}else{if((T|0)!=5){break L23036}ac=U-1|0;ad=1}X=T+1|0;if((X|0)<(ad+L|0)){T=X;P=ad;U=ac}else{break}}if((ad|0)==0){if(!((T|0)==10|(T|0)==4)){break}}c[13898]=H+1;a[226968]=1;break L23025}}while(0);L23060:do{if(M){if(K){O=17431;break L22960}S=c[10036]|0;U=0;while(1){if((U|0)>=(L|0)){O=17193;break}if((a[S+(N+U|0)|0]|0)==(a[U+218432|0]|0)){U=U+1|0}else{break}}do{if((O|0)==17193){O=0;if((U|0)!=4){break}ae=H+1|0;c[13898]=ae;if((ae|0)>=(I|0)){O=17202;break L22960}L23070:do{if((a[J+(ae*40&-1)|0]&1)!=0){T=c[J+(ae*40&-1)+36>>2]|0;P=J+(ae*40&-1)+32|0;R=0;while(1){if((R|0)>=(T|0)){break}if((a[S+((c[P>>2]|0)+R|0)|0]|0)==(a[R+103664|0]|0)){R=R+1|0}else{break L23070}}if((R|0)==1){O=17202;break L22960}}}while(0);a[14176]=1;is(k);a[14176]=0;if((c[q>>2]|0)!=3){O=17201;break L22960}P=c[r>>2]|0;c[57076]=P;if((P|0)==0){O=17204;break L22960}if((a[P+(b4(P|0,218288)|0)|0]|0)==0){break L23025}else{O=17207;break L22960}}}while(0);if(!M){break}if(K){O=17430;break L22960}S=c[10036]|0;U=0;while(1){if((U|0)>=(L|0)){break}if((a[S+(N+U|0)|0]|0)==(a[U+221440|0]|0)){U=U+1|0}else{break L23060}}if((U|0)!=5){break}P=H+1|0;c[13898]=P;L23087:do{if((P|0)<(I|0)){L23089:do{if((a[J+(P*40&-1)|0]&1)!=0){T=c[J+(P*40&-1)+36>>2]|0;Q=J+(P*40&-1)+32|0;X=0;while(1){if((X|0)>=(T|0)){break}if((a[S+((c[Q>>2]|0)+X|0)|0]|0)==(a[X+103664|0]|0)){X=X+1|0}else{break L23089}}if((X|0)==1){af=0;break L23087}}}while(0);a[14176]=1;is(j);a[14176]=0;if((c[s>>2]|0)==3){af=c[t>>2]|0;break}else{c[13898]=P;af=0;break}}else{af=0}}while(0);c[56744]=af;break L23025}}while(0);L23101:do{if((L|0)>0&(K^1)){P=c[10036]|0;S=0;U=0;Q=N;while(1){if((a[S+218224|0]|0)==(a[P+(S+Q|0)|0]|0)){ag=Q;ah=U}else{if((S|0)!=1){break}ag=Q-1|0;ah=1}T=S+1|0;if((T|0)<(ah+L|0)){S=T;U=ah;Q=ag}else{O=17230;break}}do{if((O|0)==17230){O=0;if((ah|0)==0){if(!((S|0)==7|(S|0)==0)){break}}c[13898]=H+1;a[228464]=1;break L23025}}while(0);if(!((L|0)>0&(K^1))){O=17352;break}S=c[10036]|0;Q=0;U=0;P=N;while(1){if((a[Q+218152|0]|0)==(a[S+(Q+P|0)|0]|0)){ai=P;aj=U}else{if((Q|0)!=2){break}ai=P-1|0;aj=1}T=Q+1|0;if((T|0)<(aj+L|0)){Q=T;U=aj;P=ai}else{O=17239;break}}do{if((O|0)==17239){O=0;if((aj|0)==0){if(!((Q|0)==5|(Q|0)==1)){break}}c[13898]=H+1;a[228464]=0;break L23025}}while(0);if(!((L|0)>0&(K^1))){O=17352;break}Q=c[10036]|0;P=0;U=0;S=N;while(1){if((a[P+122880|0]|0)==(a[Q+(P+S|0)|0]|0)){ak=S;al=U}else{if((P|0)!=3){break}ak=S-1|0;al=1}T=P+1|0;if((T|0)<(al+L|0)){P=T;U=al;S=ak}else{O=17248;break}}do{if((O|0)==17248){O=0;if((al|0)==0){if(!((P|0)==8|(P|0)==2)){break}}c[13898]=H+1;c[(c[3524]|0)+68>>2]=2;S=(c[3524]|0)+96|0;c[S>>2]=c[S>>2]|32;break L23025}}while(0);if(!((L|0)>0&(K^1))){O=17352;break}P=c[10036]|0;S=0;U=0;Q=N;while(1){if((a[S+121536|0]|0)==(a[P+(S+Q|0)|0]|0)){am=Q;an=U}else{if((S|0)!=5){break}am=Q-1|0;an=1}T=S+1|0;if((T|0)<(an+L|0)){S=T;U=an;Q=am}else{O=17257;break}}do{if((O|0)==17257){O=0;if((an|0)==0){if(!((S|0)==10|(S|0)==4)){break}}c[13898]=H+1;c[(c[3524]|0)+68>>2]=68;Q=(c[3524]|0)+96|0;c[Q>>2]=c[Q>>2]&-33;break L23025}}while(0);if(!((L|0)>0&(K^1))){O=17352;break}S=c[10036]|0;Q=0;U=0;P=N;while(1){if((a[Q+218144|0]|0)==(a[S+(Q+P|0)|0]|0)){ao=P;ap=U}else{if((Q|0)!=2){O=17268;break}ao=P-1|0;ap=1}T=Q+1|0;if((T|0)<(ap+L|0)){Q=T;U=ap;P=ao}else{O=17266;break}}do{if((O|0)==17266){O=0;if((ap|0)!=0){break}if(!((Q|0)==1|(Q|0)==5)){O=17268}}}while(0);L23164:do{if((O|0)==17268){O=0;if(K){O=17352;break L23101}L23167:do{if((L|0)>0){Q=c[10036]|0;P=0;do{if((a[P+124352|0]|0)!=(a[Q+(P+N|0)|0]|0)){break L23167}P=P+1|0;}while((P|0)<(L|0));if((P|0)==4){break L23164}}}while(0);if(!((L|0)>0&(K^1))){O=17352;break L23101}Q=c[10036]|0;X=0;U=0;S=N;while(1){if((a[X+218024|0]|0)==(a[Q+(X+S|0)|0]|0)){aq=S;ar=U}else{if((X|0)!=2){break}aq=S-1|0;ar=1}T=X+1|0;if((T|0)<(ar+L|0)){X=T;U=ar;S=aq}else{O=17306;break}}do{if((O|0)==17306){O=0;if((ar|0)==0){if(!((X|0)==5|(X|0)==1)){break}}as=H+1|0;c[13898]=as;if((as|0)>=(I|0)){O=17438;break L22960}L23187:do{if((a[J+(as*40&-1)|0]&1)!=0){S=c[J+(as*40&-1)+36>>2]|0;U=J+(as*40&-1)+32|0;Q=c[10036]|0;T=0;while(1){if((T|0)>=(S|0)){break}if((a[Q+((c[U>>2]|0)+T|0)|0]|0)==(a[T+103664|0]|0)){T=T+1|0}else{break L23187}}if((T|0)==1){O=17437;break L22960}}}while(0);P=is(e)|0;U=c[P>>2]|0;if((U|0)==1){at=+(c[P+8>>2]|0)}else if((U|0)==2){at=+h[P+8>>3]}else if((U|0)==3){at=+uz(c[P+8>>2]|0,0)}else{O=17319;break L22960}if((c[z>>2]|0)==3){uu(c[A>>2]|0);c[z>>2]=1}h[28551]=at;break L23025}}while(0);if(!((L|0)>0&(K^1))){O=17352;break L23101}X=c[10036]|0;P=0;while(1){if((a[P+217952|0]|0)!=(a[X+(P+N|0)|0]|0)){break}au=P+1|0;if((au|0)<(L|0)){P=au}else{O=17327;break}}do{if((O|0)==17327){O=0;if((au|0)!=8){break}av=H+1|0;c[13898]=av;if((av|0)>=(I|0)){O=17336;break L22960}L23211:do{if((a[J+(av*40&-1)|0]&1)!=0){P=c[J+(av*40&-1)+36>>2]|0;X=J+(av*40&-1)+32|0;U=c[10036]|0;Q=0;while(1){if((Q|0)>=(P|0)){break}if((a[U+((c[X>>2]|0)+Q|0)|0]|0)==(a[Q+103664|0]|0)){Q=Q+1|0}else{break L23211}}if((Q|0)==1){O=17336;break L22960}}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[x>>2]|0)!=3){O=17335;break L22960}X=c[y>>2]|0;c[n>>2]=X;if((X|0)==0){O=17338;break L22960}iQ(n);aw=c[n>>2]|0;if((a[aw]|0)==60){ax=aw}else{ax=hB(aw)|0}c[57122]=ax;if((ax|0)==0){O=17343;break L22960}else{break L23025}}}while(0);if(!((L|0)>0&(K^1))){O=17352;break L23101}X=c[10036]|0;U=0;P=0;T=N;while(1){if((a[U+128400|0]|0)==(a[X+(U+T|0)|0]|0)){ay=T;az=P}else{if((U|0)!=5){O=17352;break L23101}ay=T-1|0;az=1}S=U+1|0;if((S|0)<(az+L|0)){U=S;P=az;T=ay}else{break}}if((az|0)!=0){break L23101}if((U|0)==4|(U|0)==9){break L23101}else{O=17352;break L23101}}}while(0);aA=H+1|0;c[13898]=aA;if((aA|0)>=(I|0)){aB=aA;O=17445;break L22960}L23235:do{if((a[J+(aA*40&-1)|0]&1)!=0){T=c[J+(aA*40&-1)+36>>2]|0;P=J+(aA*40&-1)+32|0;X=c[10036]|0;S=0;while(1){if((S|0)>=(T|0)){break}if((a[X+((c[P>>2]|0)+S|0)|0]|0)==(a[S+103664|0]|0)){S=S+1|0}else{break L23235}}if((S|0)==1){aB=aA;O=17446;break L22960}}}while(0);a[14176]=1;is(f);a[14176]=0;if((c[B>>2]|0)!=3){O=17281;break L22960}P=c[C>>2]|0;if((P|0)==0){O=17283;break L22960}X=bh(P|0,44)|0;do{if((X|0)!=0){if((ca(X+1|0,148448,(v=i,i=i+8|0,c[v>>2]=228408,v)|0)|0)!=1){break}a[X]=0}}while(0);if((a[P]|0)==0){uu(P);break L23025}X=aQ(P|0,75096)|0;if((X|0)==0){aC=aQ(P|0,75048)|0}else{aC=X}X=aQ(P|0,74992)|0;if((X|0)==0){aD=aQ(P|0,74976)|0}else{aD=X}uu(c[57106]|0);c[57106]=P;if((aD|0)==0){c[57098]=77432}else{c[57098]=74936;X=uA(P|0)|0;a[P+(X-(uA(aD|0)|0)|0)|0]=0}if((aC|0)==0){c[57094]=77432;break L23025}else{c[57094]=74928;X=uA(P|0)|0;T=X-(uA(aC|0)|0)|0;a[(c[57106]|0)+T|0]=0;break L23025}}else{O=17352}}while(0);L23264:do{if((O|0)==17352){O=0;L23266:do{if(M){if(K){O=17429;break L22960}T=c[10036]|0;X=0;while(1){if((X|0)>=(L|0)){break}if((a[T+(N+X|0)|0]|0)==(a[X+128296|0]|0)){X=X+1|0}else{break L23266}}if((X|0)==2){break L23264}}}while(0);L23274:do{if((L|0)>0&(K^1)){P=c[10036]|0;T=0;S=0;U=N;while(1){if((a[T+217776|0]|0)==(a[P+(T+U|0)|0]|0)){aE=U;aF=S}else{if((T|0)!=5){break L23274}aE=U-1|0;aF=1}R=T+1|0;if((R|0)<(aF+L|0)){T=R;S=aF;U=aE}else{break}}if((aF|0)==0){if(!((T|0)==7|(T|0)==4)){break}}c[13898]=H+1;a[226984]=1;break L23025}}while(0);L23287:do{if(M){L23289:do{if(!K){U=c[10036]|0;S=0;while(1){if((S|0)>=(L|0)){break}if((a[U+(N+S|0)|0]|0)==(a[S+137232|0]|0)){S=S+1|0}else{break L23289}}if((S|0)!=4){break}c[13898]=H+1;a[226984]=0;break L23025}}while(0);if(!M){break}if(K){O=17428;break L22960}T=c[10036]|0;U=0;while(1){if((U|0)>=(L|0)){break}if((a[T+(N+U|0)|0]|0)==(a[U+131504|0]|0)){U=U+1|0}else{break L23287}}if((U|0)!=5){break}c[13898]=H+1;a[228520]=0;break L23025}}while(0);if(!((L|0)>0&(K^1))){O=17434;break L22960}T=c[10036]|0;P=0;X=0;R=N;while(1){if((a[P+217752|0]|0)==(a[T+(P+R|0)|0]|0)){aG=R;aH=X}else{if((P|0)!=4){break}aG=R-1|0;aH=1}aI=P+1|0;if((aI|0)<(aH+L|0)){P=aI;X=aH;R=aG}else{O=17396;break}}do{if((O|0)==17396){O=0;if((aH|0)==0){if(!((P|0)==6|(P|0)==3)){break}}c[13898]=H+1;a[228520]=1;break L23025}}while(0);if(!((L|0)>0&(K^1))){O=17432;break L22960}P=c[10036]|0;R=0;X=0;T=N;while(1){if((a[R+217736|0]|0)==(a[P+(R+T|0)|0]|0)){aJ=T;aK=X}else{if((R|0)!=5){O=17426;break L22960}aJ=T-1|0;aK=1}aI=R+1|0;if((aI|0)<(aK+L|0)){R=aI;X=aK;T=aJ}else{break}}if((aK|0)==0){if(!((R|0)==10|(R|0)==4)){O=17433;break L22960}}c[13898]=H+1;c[57136]=hK()|0;break L23025}}while(0);c[13898]=H+1;T=is(g)|0;X=c[T>>2]|0;if((X|0)==3){aL=+uz(c[T+8>>2]|0,0)}else if((X|0)==1){aL=+(c[T+8>>2]|0)}else if((X|0)==2){aL=+h[T+8>>3]}else{O=17362;break L22960}if((c[u>>2]|0)==3){uu(c[w>>2]|0);c[u>>2]=1}h[28540]=aL;if(aL>0.0){break L23025}h[28540]=1.0;break L23025}}while(0);c[13898]=H+1;a[228312]=1}}while(0);L=c[13898]|0;K=c[8272]|0;if((L|0)<(K|0)){H=L;I=K}else{break L22958}}if((O|0)==17343){uf(c[13898]|0,219072,(v=i,i=i+8|0,c[v>>2]=aw,v)|0)}else if((O|0)==17134){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17434){uf(H,217704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17437){uf(as,217992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17438){uf(as,217992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17440){uf(_,218600,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17445){uf(aB,116592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17362){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17161){uf(c[13898]|0,218544,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17424){uf(Y,218656,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17425){uf(Y,218656,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17426){uf(H,217704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17427){uf(H,217704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17428){uf(H,217704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17439){uf(_,218600,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17335){c[13898]=av;O=17336}else if((O|0)==17446){uf(aB,116592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17281){c[13898]=aA;aB=aA;uf(aB,116592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17283){aB=c[13898]|0;uf(aB,116592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17338){aM=c[13898]|0;uf(aM,217824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17429){uf(H,217704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17430){uf(H,217704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17431){uf(H,217704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17432){uf(H,217704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17433){uf(H,217704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17319){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17157){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17207){uf((c[13898]|0)-1|0,218240,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17138){uf(c[13898]|0,218632,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17201){c[13898]=ae;O=17202}else if((O|0)==17204){aN=c[13898]|0;uf(aN,218392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((O|0)==17336){c[n>>2]=0;aM=av;uf(aM,217824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((O|0)==17202){c[57076]=0;aN=ae;uf(aN,218392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);qj(179864);aN=~~(+((c[56734]|0)>>>0>>>0)/10.0);ae=a[228464]|0?217584:217656;O=(c[(c[3524]|0)+68>>2]|0)==2?217456:179864;aM=c[57108]|0;aL=+h[28552];be(13048,217664,(v=i,i=i+48|0,c[v>>2]=~~(+((c[56738]|0)>>>0>>>0)/10.0),c[v+8>>2]=aN,c[v+16>>2]=ae,c[v+24>>2]=O,c[v+32>>2]=aM,h[v+40>>3]=aL,v)|0);if(a[228312]|0){uD(13048+(uA(13048)|0)|0,217392,9)}if(a[226968]|0){uD(13048+(uA(13048)|0)|0,217272,12)}aM=c[57076]|0;if((aM|0)!=0){O=13048+(uA(13048)|0)|0;be(O|0,217200,(v=i,i=i+8|0,c[v>>2]=aM,v)|0)}aM=c[57122]|0;if((aM|0)!=0){O=13048+(uA(13048)|0)|0;be(O|0,217096,(v=i,i=i+8|0,c[v>>2]=aM,v)|0)}aM=13048+(uA(13048)|0)|0;be(aM|0,(a[226984]|0?132112:217056)|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);aM=13048+(uA(13048)|0)|0;be(aM|0,(a[228520]|0?217032:217e3)|0,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);aL=+h[28540];if(aL!=1.0){aM=13048+(uA(13048)|0)|0;be(aM|0,216912,(v=i,i=i+8|0,h[v>>3]=aL,v)|0)}aM=c[57136]|0;if((aM|0)<=-1){i=b;return}be(13048+(uA(13048)|0)|0,216792,(v=i,i=i+8|0,c[v>>2]=aM,v)|0);i=b;return}function p7(){aI(222944,8,1,c[10030]|0);return}function p8(){var b=0,d=0,e=0,f=0.0,g=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0;b=i;i=i+512|0;d=b|0;e=b+256|0;f=+h[28571];h[28376]=f;a[227016]=a[84376]|0;a[227017|0]=a[84377|0]|0;a[227018|0]=a[84378|0]|0;a[227019|0]=a[84379|0]|0;a[227020|0]=a[84380|0]|0;a[227021|0]=a[84381|0]|0;h[28378]=f;a[227032]=a[89416]|0;a[227033|0]=a[89417|0]|0;a[227034|0]=a[89418|0]|0;a[227035|0]=a[89419|0]|0;a[227036|0]=a[89420|0]|0;a[227037|0]=a[89421|0]|0;h[28380]=f;a[227048]=a[89352]|0;a[227049|0]=a[89353|0]|0;a[227050|0]=a[89354|0]|0;a[227051|0]=a[89355|0]|0;a[227052|0]=a[89356|0]|0;h[28382]=f;c[56766]=6579570;h[28384]=f;a[227080]=a[89296]|0;a[227081|0]=a[89297|0]|0;a[227082|0]=a[89298|0]|0;a[227083|0]=a[89299|0]|0;a[227084|0]=a[89300|0]|0;a[227085|0]=a[89301|0]|0;h[28386]=f;a[227096]=a[89328]|0;a[227097|0]=a[89329|0]|0;a[227098|0]=a[89330|0]|0;a[227099|0]=a[89331|0]|0;a[227100|0]=a[89332|0]|0;h[28388]=f;a[227112]=a[89248]|0;a[227113|0]=a[89249|0]|0;a[227114|0]=a[89250|0]|0;a[227115|0]=a[89251|0]|0;a[227116|0]=a[89252|0]|0;h[28390]=f;be(227128,222904,(v=i,i=i+24|0,c[v>>2]=21,c[v+8>>2]=117,c[v+16>>2]=69,v)|0);h[28392]=+h[28571];be(227144,222904,(v=i,i=i+24|0,c[v>>2]=0,c[v+8>>2]=0,c[v+16>>2]=148,v)|0);h[28394]=+h[28571];be(227160,222904,(v=i,i=i+24|0,c[v>>2]=255,c[v+8>>2]=153,c[v+16>>2]=0,v)|0);h[28396]=+h[28571];be(227176,222904,(v=i,i=i+24|0,c[v>>2]=0,c[v+8>>2]=153,c[v+16>>2]=161,v)|0);h[28398]=+h[28571];be(227192,222904,(v=i,i=i+24|0,c[v>>2]=214,c[v+8>>2]=214,c[v+16>>2]=69,v)|0);h[28400]=+h[28571];be(227208,222904,(v=i,i=i+24|0,c[v>>2]=163,c[v+8>>2]=145,c[v+16>>2]=255,v)|0);h[28402]=+h[28571];be(227224,222904,(v=i,i=i+24|0,c[v>>2]=255,c[v+8>>2]=204,c[v+16>>2]=0,v)|0);h[28404]=+h[28571];be(227240,222904,(v=i,i=i+24|0,c[v>>2]=214,c[v+8>>2]=0,c[v+16>>2]=120,v)|0);h[28406]=+h[28571];be(227256,222904,(v=i,i=i+24|0,c[v>>2]=171,c[v+8>>2]=214,c[v+16>>2]=0,v)|0);g=c[57136]|0;if((g|0)>-1){j=g>>>16&255;k=g>>>8&255;l=g&255;be(227016,222904,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=k,c[v+16>>2]=l,v)|0)}c[57144]=-3;c[(c[3524]|0)+8>>2]=c[56738];c[(c[3524]|0)+12>>2]=c[56734];f=+h[28552];c[57114]=~~(f*10.0);l=~~(f*.25*10.0);c[57112]=l;c[57110]=l;c[(c[3524]|0)+20>>2]=~~(f*.7*10.0);c[(c[3524]|0)+16>>2]=((c[57112]|0)+(c[57114]|0)|0)+(c[57110]|0);l=c[3524]|0;c[l+28>>2]=(c[l+16>>2]|0)>>>1;l=c[3524]|0;c[l+24>>2]=(c[l+16>>2]|0)>>>1;l=c[11252]|0;if((l|0)==6){n=222720}else if((l|0)==14){n=222200}else if((l|0)==13){n=222296}else if((l|0)==1){n=222880}else if((l|0)==9){n=222584}else if((l|0)==12){n=222392}else if((l|0)==2){n=222832}else if((l|0)==4){n=222768}else if((l|0)==10){n=222496}else if((l|0)==8){n=222656}else if((l|0)==7){n=222696}else if((l|0)==3){n=222800}else if((l|0)==5){n=179864}else{n=222152}cf(c[10030]|0,222e3,(v=i,i=i+8|0,c[v>>2]=n,v)|0);if(a[228312]|0){n=c[10030]|0;aI(221896,69,1,n|0)}if(!(a[228464]|0)){n=c[10030]|0;l=c[3524]|0;k=~~(+((c[l+8>>2]|0)>>>0>>>0)/10.0);j=~~(+((c[l+12>>2]|0)>>>0>>>0)/10.0);cf(n|0,221864,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=j,v)|0)}j=c[3524]|0;k=~~(+((c[j+12>>2]|0)>>>0>>>0)/10.0);cf(c[10030]|0,221816,(v=i,i=i+16|0,c[v>>2]=~~(+((c[j+8>>2]|0)>>>0>>>0)/10.0),c[v+8>>2]=k,v)|0);aI(221760,36,1,c[10030]|0);aI(221680,44,1,c[10030]|0);aI(221632,3,1,c[10030]|0);k=c[57076]|0;cf(c[10030]|0,221608,(v=i,i=i+8|0,c[v>>2]=(k|0)!=0?k:221552,v)|0);cf(c[10030]|0,221496,(v=i,i=i+16|0,c[v>>2]=40152,c[v+8>>2]=40160,v)|0);k=c[56744]|0;if((k|0)==0){j=bP(221464)|0;c[56744]=j;o=j}else{o=k}k=uA(o|0)|0;do{if((a[o]|0)!=0){if((a[o+(k-1|0)|0]|0)==47){break}j=db(o,k+2|0,221440)|0;c[56744]=j;n=j+(uA(j|0)|0)|0;w=47;a[n]=w&255;w=w>>8;a[n+1|0]=w&255}}while(0);do{if(a[228312]|0){if(a[226968]|0){k=(uA(c[56744]|0)|0)+18|0;o=ut(k)|0;do{if((o|0)==0){gk();n=ut(k)|0;if((n|0)!=0){p=n;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=221224,v)|0)}else{p=o}}while(0);o=c[56744]|0;uB(p|0,o|0);o=uA(p|0)|0;k=(o|0)==0?0:o-1|0;o=a[p+k|0]|0;if(!((o<<24>>24|0)==47|(o<<24>>24|0)==0)){a[p+(k+1|0)|0]=47;a[p+(k+2|0)|0]=0}uD(p+(uA(p|0)|0)|0,221256,15);k=bF(p|0,193632)|0;if((k|0)==0){uh(-1,221176,(v=i,i=i+8|0,c[v>>2]=p,v)|0)}else{o=c[10030]|0;aI(221096,65,1,o|0);o=e|0;n=(a6(o|0,256,k|0)|0)==0;j=c[10030]|0;if(n){q=j}else{n=j;while(1){aK(o|0,n|0);j=(a6(o|0,256,k|0)|0)==0;l=c[10030]|0;if(j){q=l;break}else{n=l}}}aI(223416,14,1,q|0);az(k|0)}uu(p)}else{n=c[10030]|0;o=c[56744]|0;cf(n|0,221312,(v=i,i=i+8|0,c[v>>2]=o,v)|0)}o=c[10030]|0;if(!(a[228312]|0)){r=o;s=17490;break}aI(221032,57,1,o|0);o=c[10030]|0;n=c[3524]|0;l=~~(+((c[n+8>>2]|0)>>>0>>>0)/10.0);j=~~(+((c[n+12>>2]|0)>>>0>>>0)/10.0);cf(o|0,220984,(v=i,i=i+32|0,c[v>>2]=0,c[v+8>>2]=0,c[v+16>>2]=l,c[v+24>>2]=j,v)|0);j=c[10030]|0;l=c[57136]|0;o=(l|0)>0?l:16777215;cf(j|0,220920,(v=i,i=i+8|0,c[v>>2]=o,v)|0);o=c[10030]|0;aI(220824,89,1,o|0);o=c[10030]|0;aI(220712,56,1,o|0);o=c[10030]|0;aI(220560,111,1,o|0)}else{r=c[10030]|0;s=17490}}while(0);if((s|0)==17490){aI(220520,25,1,r|0);r=c[10030]|0;s=c[3524]|0;p=~~(+((c[s+8>>2]|0)>>>0>>>0)/10.0);q=~~(+((c[s+12>>2]|0)>>>0>>>0)/10.0);cf(r|0,220984,(v=i,i=i+32|0,c[v>>2]=0,c[v+8>>2]=0,c[v+16>>2]=p,c[v+24>>2]=q,v)|0);q=c[57136]|0;p=c[10030]|0;if((q|0)>-1){cf(p|0,220448,(v=i,i=i+8|0,c[v>>2]=q,v)|0)}else{aI(77208,12,1,p|0)}p=c[10030]|0;aI(220440,3,1,p|0)}aI(220400,7,1,c[10030]|0);p=c[57122]|0;if((p|0)==0){t=c[3524]|0;u=t+28|0;x=c[u>>2]|0;y=+(x>>>0>>>0);z=20.0/y;A=c[10030]|0;B=cf(A|0,219192,(v=i,i=i+56|0,h[v>>3]=z,h[v+8>>3]=z,h[v+16>>3]=z,h[v+24>>3]=z,h[v+32>>3]=z,h[v+40>>3]=z,h[v+48>>3]=z,v)|0)|0;i=b;return}q=d|0;do{if((a[p]|0)==60){if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=p+1|0;r=bt(d|0,193632)|0;if((r|0)!=0){C=1;D=r;break}uf(-1,219160,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}else{d=bF(p|0,193632)|0;if((d|0)!=0){C=0;D=d;break}uf(-1,219072,(v=i,i=i+8|0,c[v>>2]=p,v)|0)}}while(0);if((a6(q|0,255,D|0)|0)==0){E=0}else{d=0;while(1){r=aQ(q|0,219056)|0;if((r|0)!=0){s=c[m>>2]|0;cf(s|0,218992,(v=i,i=i+16|0,c[v>>2]=p,c[v+8>>2]=r,v)|0)}aK(q|0,c[10030]|0);r=d+1|0;if((a6(q|0,255,D|0)|0)==0){E=r;break}else{d=r}}}do{if(C){d=a2(D|0)|0;if((d|0)==0){break}uf(-1,218832,(v=i,i=i+16|0,c[v>>2]=p+1,c[v+8>>2]=d,v)|0)}else{az(D|0)}}while(0);if((E|0)!=0){t=c[3524]|0;u=t+28|0;x=c[u>>2]|0;y=+(x>>>0>>>0);z=20.0/y;A=c[10030]|0;B=cf(A|0,219192,(v=i,i=i+56|0,h[v>>3]=z,h[v+8>>3]=z,h[v+16>>3]=z,h[v+24>>3]=z,h[v+32>>3]=z,h[v+40>>3]=z,h[v+48>>3]=z,v)|0)|0;i=b;return}if(C){uf(-1,218792,(v=i,i=i+8|0,c[v>>2]=p+1,v)|0)}else{uf(-1,218744,(v=i,i=i+8|0,c[v>>2]=p,v)|0)}}function p9(a){a=a|0;c[57140]=a;return 1}function qa(a){a=a|0;c[57138]=a;return 1}function qb(){var b=0,d=0,e=0,f=0.0,g=0,j=0,k=0;b=i;if(a[227272]|0){if(a[228352]|0){d=c[10030]|0;aI(78232,6,1,d|0);a[228352]=0}d=c[10030]|0;aI(78240,9,1,d|0);c[56816]=0;a[227272]=0}if(a[228352]|0){d=c[10030]|0;aI(78232,6,1,d|0);a[228352]=0}if(a[228344]|0){d=c[10030]|0;aI(77776,5,1,d|0);a[228344]=0;c[57120]=-1}if(a[228312]|0){d=c[10030]|0;aI(73376,42,1,d|0);d=c[10030]|0;aI(73296,61,1,d|0);d=c[10030]|0;e=~~(+((c[(c[3524]|0)+8>>2]|0)>>>0>>>0)/10.0);cf(d|0,73248,(v=i,i=i+8|0,c[v>>2]=e,v)|0);e=c[10030]|0;d=~~(+((c[(c[3524]|0)+12>>2]|0)>>>0>>>0)/10.0);cf(e|0,73192,(v=i,i=i+8|0,c[v>>2]=d,v)|0);d=c[10030]|0;f=+(c[7938]|0)/10.0;cf(d|0,73160,(v=i,i=i+8|0,h[v>>3]=f,v)|0);d=c[10030]|0;f=+(c[7939]|0)/10.0;cf(d|0,73120,(v=i,i=i+8|0,h[v>>3]=f,v)|0);d=c[10030]|0;f=+(((c[(c[3524]|0)+12>>2]|0)-(c[7940]|0)|0)>>>0>>>0)/10.0;cf(d|0,73088,(v=i,i=i+8|0,h[v>>3]=f,v)|0);d=c[10030]|0;f=+(((c[(c[3524]|0)+12>>2]|0)-(c[7941]|0)|0)>>>0>>>0)/10.0;cf(d|0,73056,(v=i,i=i+8|0,h[v>>3]=f,v)|0);d=c[10030]|0;f=+((c[7939]|0)-(c[7938]|0)|0)/10.0;cf(d|0,72960,(v=i,i=i+8|0,h[v>>3]=f,v)|0);d=c[10030]|0;f=+((c[7941]|0)-(c[7940]|0)|0)/10.0;cf(d|0,72872,(v=i,i=i+8|0,h[v>>3]=f,v)|0);e7(1);do{if((c[16546]|0)!=1){d=e6(72800)|0;do{if((d|0)!=0){e=c[d+16>>2]|0;if((e|0)==2){g=c[10030]|0;f=+h[d+24>>3];cf(g|0,72560,(v=i,i=i+16|0,c[v>>2]=72688,h[v+8>>3]=f,v)|0);break}else if((e|0)==1){e=c[d+24>>2]|0;cf(c[10030]|0,72752,(v=i,i=i+16|0,c[v>>2]=72688,c[v+8>>2]=e,v)|0);break}else{break}}}while(0);d=e6(72544)|0;if((d|0)==0){break}e=c[d+16>>2]|0;if((e|0)==1){g=c[10030]|0;j=c[d+24>>2]|0;cf(g|0,72752,(v=i,i=i+16|0,c[v>>2]=72528,c[v+8>>2]=j,v)|0);break}else if((e|0)==2){f=+h[d+24>>3];cf(c[10030]|0,72560,(v=i,i=i+16|0,c[v>>2]=72528,h[v+8>>3]=f,v)|0);break}else{break}}}while(0);d=e6(225256)|0;do{if((d|0)!=0){e=c[d+16>>2]|0;if((e|0)==2){j=c[10030]|0;f=+h[d+24>>3];cf(j|0,72560,(v=i,i=i+16|0,c[v>>2]=225240,h[v+8>>3]=f,v)|0);break}else if((e|0)==1){e=c[d+24>>2]|0;cf(c[10030]|0,72752,(v=i,i=i+16|0,c[v>>2]=225240,c[v+8>>2]=e,v)|0);break}else{break}}}while(0);d=e6(225200)|0;do{if((d|0)!=0){e=c[d+16>>2]|0;if((e|0)==2){j=c[10030]|0;f=+h[d+24>>3];cf(j|0,72560,(v=i,i=i+16|0,c[v>>2]=225128,h[v+8>>3]=f,v)|0);break}else if((e|0)==1){e=c[d+24>>2]|0;cf(c[10030]|0,72752,(v=i,i=i+16|0,c[v>>2]=225128,c[v+8>>2]=e,v)|0);break}else{break}}}while(0);d=c[10030]|0;e=(a[30528]&1)!=0?225e3:224992;cf(d|0,225024,(v=i,i=i+8|0,c[v>>2]=e,v)|0);if((a[30528]&1)!=0){e=c[10030]|0;f=(c[17366]&1|0)==0?+h[8687]:0.0;cf(e|0,224952,(v=i,i=i+8|0,h[v>>3]=f,v)|0)}do{if((c[17261]&3|0)==0){e=c[10030]|0;aI(224720,37,1,e|0)}else{e=e6(224936)|0;do{if((e|0)!=0){d=c[e+16>>2]|0;if((d|0)==1){j=c[10030]|0;g=c[e+24>>2]|0;cf(j|0,72752,(v=i,i=i+16|0,c[v>>2]=224920,c[v+8>>2]=g,v)|0);break}else if((d|0)==2){f=+h[e+24>>3];cf(c[10030]|0,72560,(v=i,i=i+16|0,c[v>>2]=224920,h[v+8>>3]=f,v)|0);break}else{break}}}while(0);e=e6(224872)|0;if((e|0)==0){break}d=c[e+16>>2]|0;if((d|0)==2){g=c[10030]|0;f=+h[e+24>>3];cf(g|0,72560,(v=i,i=i+16|0,c[v>>2]=224832,h[v+8>>3]=f,v)|0);break}else if((d|0)==1){d=c[e+24>>2]|0;cf(c[10030]|0,72752,(v=i,i=i+16|0,c[v>>2]=224832,c[v+8>>2]=d,v)|0);break}else{break}}}while(0);do{if((c[17089]&3|0)==0){d=c[10030]|0;aI(224096,37,1,d|0)}else{d=e6(224640)|0;do{if((d|0)!=0){e=c[d+16>>2]|0;if((e|0)==1){g=c[10030]|0;j=c[d+24>>2]|0;cf(g|0,72752,(v=i,i=i+16|0,c[v>>2]=224528,c[v+8>>2]=j,v)|0);break}else if((e|0)==2){f=+h[d+24>>3];cf(c[10030]|0,72560,(v=i,i=i+16|0,c[v>>2]=224528,h[v+8>>3]=f,v)|0);break}else{break}}}while(0);d=e6(224432)|0;if((d|0)==0){break}e=c[d+16>>2]|0;if((e|0)==1){j=c[10030]|0;g=c[d+24>>2]|0;cf(j|0,72752,(v=i,i=i+16|0,c[v>>2]=224320,c[v+8>>2]=g,v)|0);break}else if((e|0)==2){f=+h[d+24>>3];cf(c[10030]|0,72560,(v=i,i=i+16|0,c[v>>2]=224320,h[v+8>>3]=f,v)|0);break}else{break}}}while(0);d=c[10030]|0;e=a[66164]&1;cf(d|0,224040,(v=i,i=i+8|0,c[v>>2]=e,v)|0);e=c[10030]|0;d=a[65476]&1;cf(e|0,223976,(v=i,i=i+8|0,c[v>>2]=d,v)|0);if((a[30528]&1)!=0){d=c[10030]|0;e=a[69604]&1;cf(d|0,223896,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}e=c[10030]|0;if((c[16546]|0)==1){f=+h[8255];cf(e|0,223808,(v=i,i=i+8|0,h[v>>3]=f,v)|0);d=c[10030]|0;f=+h[8256];cf(d|0,223728,(v=i,i=i+8|0,h[v>>3]=f,v)|0);d=c[10030]|0;g=c[8510]|0;do{if((g|0)==0){j=c[8506]|0;if((j|0)==4){k=223560;break}k=(j|0)==5?223536:223520}else{k=g}}while(0);cf(d|0,223648,(v=i,i=i+8|0,c[v>>2]=k,v)|0)}else{aI(223432,34,1,e|0)}e=c[10030]|0;aI(223416,14,1,e|0)}aI(77776,5,1,c[10030]|0);if(!(a[228312]|0)){i=b;return}aI(223344,67,1,c[10030]|0);aI(223288,37,1,c[10030]|0);aI(223240,31,1,c[10030]|0);if(!(a[228312]|0)){i=b;return}if(!(a[228336]|0)){i=b;return}cf(c[10030]|0,223112,(v=i,i=i+8|0,c[v>>2]=~~(+((c[(c[3524]|0)+12>>2]|0)>>>0>>>0)/10.0)-26,v)|0);aI(222992,42,1,c[10030]|0);i=b;return}function qc(){tu();c[57120]=-1;c[57118]=0;a[228352]=0;a[228528]=0;a[227272]=0;c[56736]=-1;c[56740]=-1;return}function qd(a,b){a=a|0;b=b|0;if((c[56740]|0)==(a|0)&(c[56736]|0)==(b|0)){return}tv(a,b);return}function qe(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0.0;e=i;f=c[56740]|0;g=c[56736]|0;if((f|0)==(b|0)&(g|0)==(d|0)){i=e;return}if(!(a[227272]|0)){tv(f,g)}j=+((c[(c[3524]|0)+12>>2]|0)-d|0)/10.0;cf(c[10030]|0,73912,(v=i,i=i+16|0,h[v>>3]=+(b>>>0>>>0)/10.0,h[v+8>>3]=j,v)|0);g=(c[56816]|0)+1|0;c[56816]=g;if((g&7|0)==0){g=c[10030]|0;aI(73904,3,1,g|0)}c[56740]=b;c[56736]=d;i=e;return}function qf(b){b=b|0;var d=0;a[228528]=0;if((c[57144]|0)==(b|0)){return}if(a[227272]|0){if(a[228352]|0){d=c[10030]|0;aI(78232,6,1,d|0);a[228352]=0}d=c[10030]|0;aI(78240,9,1,d|0);c[56816]=0;a[227272]=0}if(a[228352]|0){d=c[10030]|0;aI(78232,6,1,d|0);a[228352]=0}if(a[228344]|0){d=c[10030]|0;aI(77776,5,1,d|0);a[228344]=0;c[57120]=-1}c[57144]=b;tu();return}function qg(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0.0,n=0,o=0;g=i;if(a[227272]|0){if(a[228352]|0){j=c[10030]|0;aI(78232,6,1,j|0);a[228352]=0}j=c[10030]|0;aI(78240,9,1,j|0);c[56816]=0;a[227272]=0}j=c[57138]|0;if((j|0)==1){k=74560}else if((j|0)==0){k=74592}else{k=74552}j=((c[57140]|0)%180&-1|0)==0;l=((c[57114]|0)-(c[57112]|0)|0)/2&-1;m=+(((j?l:0)-e|0)+(c[(c[3524]|0)+12>>2]|0)|0)/10.0;cf(c[10030]|0,74504,(v=i,i=i+16|0,h[v>>3]=+((j?0:l)+b|0)/10.0,h[v+8>>3]=m,v)|0);b=c[57140]|0;if((b|0)!=0){l=c[10030]|0;j=-b|0;cf(l|0,74488,(v=i,i=i+8|0,c[v>>2]=j,v)|0)}aI(74456,27,1,c[10030]|0);j=a[228528]|0;do{if(j<<24>>24==3){l=c[10030]|0;b=d[226992]|0;e=d[228368]|0;n=d[228536]|0;cf(l|0,74424,(v=i,i=i+24|0,c[v>>2]=b,c[v+8>>2]=e,c[v+16>>2]=n,v)|0)}else{n=c[10030]|0;if(j<<24>>24==1){e=c[57082]|0;aK(e|0,n|0);break}e=c[57144]|0;if((e|0)>12){o=(e|0)%13&-1}else{o=e}e=o+3|0;b=227016+(((e|0)<0?0:e<<16>>16)<<4)|0;aK(b|0,n|0)}}while(0);m=+h[28552];cf(c[10030]|0,74384,(v=i,i=i+16|0,c[v>>2]=c[57108],h[v+8>>3]=m,v)|0);o=c[57096]|0;do{if((o|0)!=0){if((aY(o|0,77432)|0)==0){break}j=c[10030]|0;cf(j|0,74280,(v=i,i=i+8|0,c[v>>2]=o,v)|0)}}while(0);o=c[57100]|0;do{if((o|0)!=0){if((aY(o|0,77432)|0)==0){break}j=c[10030]|0;cf(j|0,74256,(v=i,i=i+8|0,c[v>>2]=o,v)|0)}}while(0);cf(c[10030]|0,74160,(v=i,i=i+8|0,c[v>>2]=k,v)|0);k=(aQ(f|0,74128)|0)==0;o=c[10030]|0;if(k){aI(74024,8,1,o|0)}else{aI(74096,29,1,o|0)}if(a[237856]|0){i=g;return}o=a[f]|0;if(o<<24>>24!=0){k=f;f=o;do{o=f<<24>>24;L23666:do{if((o|0)==60){j=c[10030]|0;aI(74016,4,1,j|0)}else if((o|0)==38){do{if((a[k+1|0]|0)==35){if((a[k+2|0]|0)!=120){break}j=c[10030]|0;aF(38,j|0);break L23666}}while(0);aI(74008,5,1,c[10030]|0)}else{aF(o|0,c[10030]|0)}}while(0);k=k+1|0;f=a[k]|0;}while(f<<24>>24!=0)}aI(73992,14,1,c[10030]|0);i=g;return}function qh(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0;g=i;i=i+64|0;j=g|0;k=a[228528]|0;do{if(k<<24>>24==3){l=j|0;m=d[226992]|0;n=d[228368]|0;o=d[228536]|0;be(l|0,74880,(v=i,i=i+24|0,c[v>>2]=m,c[v+8>>2]=n,c[v+16>>2]=o,v)|0)}else{o=j|0;if(k<<24>>24==1){n=c[57082]|0;be(o|0,74864,(v=i,i=i+8|0,c[v>>2]=n,v)|0);break}else{a[o]=0;break}}}while(0);if(a[227272]|0){if(a[228352]|0){k=c[10030]|0;aI(78232,6,1,k|0);a[228352]=0}k=c[10030]|0;aI(78240,9,1,k|0);c[56816]=0;a[227272]=0}k=c[10030]|0;if((f|0)<0){p=+(b>>>0>>>0)/10.0;q=+((c[(c[3524]|0)+12>>2]|0)-e|0)/10.0;o=j|0;cf(k|0,74760,(v=i,i=i+24|0,h[v>>3]=p,h[v+8>>3]=q,c[v+16>>2]=o,v)|0);c[56740]=b;c[56736]=e;i=g;return}else{o=(f|0)%13&-1;q=+(b>>>0>>>0)/10.0;f=c[3524]|0;p=+((c[f+12>>2]|0)-e|0)/10.0;r=+h[1630]*+((c[f+28>>2]|0)>>>0>>>0)/20.0;f=j|0;cf(k|0,74656,(v=i,i=i+40|0,c[v>>2]=o,h[v+8>>3]=q,h[v+16>>3]=p,h[v+24>>3]=r,c[v+32>>2]=f,v)|0);c[56740]=b;c[56736]=e;i=g;return}}function qi(b){b=b|0;var d=0;c[59472]=(c[59472]|0)+1;do{if((b|0)==38){d=c[11232]|0;c[11232]=d+1;a[d]=38;d=c[11232]|0;c[11232]=d+1;a[d]=97;d=c[11232]|0;c[11232]=d+1;a[d]=109;d=c[11232]|0;c[11232]=d+1;a[d]=112;d=c[11232]|0;c[11232]=d+1;a[d]=59;return}else if((b|0)==60){d=c[11232]|0;c[11232]=d+1;a[d]=38;d=c[11232]|0;c[11232]=d+1;a[d]=108;d=c[11232]|0;c[11232]=d+1;a[d]=116;d=c[11232]|0;c[11232]=d+1;a[d]=59;return}else if((b|0)==(-2|0)){if((c[11252]|0)!=0){break}d=c[11232]|0;c[11232]=d+1;a[d]=38;return}}while(0);d=c[11232]|0;c[11232]=d+1;a[d]=b&255;return}function qj(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0;d=i;do{if((b|0)==0){e=17680}else{if((a[b]|0)==0){e=17680;break}f=aQ(b|0,75096)|0;if((f|0)==0){g=aQ(b|0,75048)|0}else{g=f}f=aQ(b|0,74992)|0;if((f|0)==0){j=aQ(b|0,74976)|0}else{j=f}f=bk(b|0,148464)|0;if((f|0)>0){uu(c[57108]|0);k=bP(b|0)|0;c[57108]=k;if((j|0)==0){c[57100]=77432}else{c[57100]=74936;l=uA(b|0)|0;a[k+(l-(uA(j|0)|0)|0)|0]=0}if((g|0)==0){c[57096]=77432}else{c[57096]=74928;l=uA(b|0)|0;k=l-(uA(g|0)|0)|0;a[(c[57108]|0)+k|0]=0}a[(c[57108]|0)+f|0]=0}if((a[b+f|0]|0)!=44){break}k=b+(f+1|0)|0;ca(k|0,148448,(v=i,i=i+8|0,c[v>>2]=228416,v)|0)}}while(0);if((e|0)==17680){uu(c[57108]|0);e=c[57106]|0;if((e|0)==0){m=0}else{m=bP(e|0)|0}c[57108]=m;h[28552]=+h[28551];c[57100]=c[57098];c[57096]=c[57094]}n=+h[28552];c[57114]=~~(n*10.0);m=~~(n*.25*10.0);c[57112]=m;c[57110]=m;c[(c[3524]|0)+20>>2]=~~(n*.7*10.0);c[(c[3524]|0)+16>>2]=((c[57112]|0)+(c[57114]|0)|0)+(c[57110]|0);i=d;return 1}function qk(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0;g=i;i=i+48|0;h=g|0;c[h>>2]=b;c[h+4>>2]=d;j=e+b|0;c[h+12>>2]=j;c[h+16>>2]=d;c[h+24>>2]=j;j=f+d|0;c[h+28>>2]=j;c[h+36>>2]=b;c[h+40>>2]=j;c[h+8>>2]=a;qp(4,h|0);i=g;return}function ql(b){b=+b;var d=0;if(+h[28571]==b){return}h[28571]=b;h[28376]=b;h[28378]=b;h[28380]=b;h[28382]=b;h[28384]=b;h[28386]=b;h[28388]=b;h[28390]=b;h[28392]=b;h[28394]=b;h[28396]=b;h[28398]=b;h[28400]=b;h[28402]=b;h[28404]=b;h[28406]=b;if(a[227272]|0){if(a[228352]|0){d=c[10030]|0;aI(78232|0,6,1,d|0);a[228352]=0}d=c[10030]|0;aI(78240|0,9,1,d|0);c[56816]=0;a[227272]=0}if(a[228352]|0){d=c[10030]|0;aI(78232|0,6,1,d|0);a[228352]=0}if(a[228344]|0){d=c[10030]|0;aI(77776|0,5,1,d|0);a[228344]=0;c[57120]=-1}tu();return}function qm(b){b=b|0;var d=0;if(a[228352]|0){d=c[10030]|0;aI(78232,6,1,d|0);a[228352]=0}if((b|0)==0){return 0}c[56821]=c[b+4>>2];c[56822]=c[b+8>>2];c[56823]=c[b+12>>2];c[56824]=c[b+16>>2];a[227300]=a[b+20|0]|0;return 0}function qn(){if(!(a[228352]|0)){return}aI(78232,6,1,c[10030]|0);a[228352]=0;return}function qo(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0;d=i;i=i+8|0;e=d|0;f=c[b>>2]|0;if((f|0)==3){g=c[b+4>>2]|0;j=g>>>16&255;a[e|0]=j;a[e+1|0]=g>>>8&255;a[e+2|0]=g&255;k=j}else if((f|0)==1){j=c[b+4>>2]|0;if((j|0)>12){l=(j|0)%13&-1}else{l=j}j=l+3|0;c[57082]=227016+(((j|0)<0?0:j<<16>>16)<<4);a[228528]=1;i=d;return}else if((f|0)==5){fr(+h[b+8>>3],e);k=a[e|0]|0}else{i=d;return}a[228528]=3;b=e|0;do{if(k<<24>>24==(a[226992]|0)){if((a[e+1|0]|0)!=(a[228368]|0)){break}if((a[e+2|0]|0)!=(a[228536]|0)){break}i=d;return}}while(0);if(a[227272]|0){if(a[228352]|0){k=c[10030]|0;aI(78232,6,1,k|0);a[228352]=0}k=c[10030]|0;aI(78240,9,1,k|0);c[56816]=0;a[227272]=0}a[226992]=a[b]|0;a[228368]=a[e+1|0]|0;a[228536]=a[e+2|0]|0;i=d;return}function qp(b,e){b=b|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0.0;f=i;g=e+8|0;j=c[g>>2]|0;k=j>>4;l=j&15;c[g>>2]=l;do{if((l|0)==5|(l|0)==2){g=(k|0)%8&-1;if((g|0)==(c[57120]|0)){break}c[57120]=g;if(a[227272]|0){if(a[228352]|0){j=c[10030]|0;aI(78232,6,1,j|0);a[228352]=0}j=c[10030]|0;aI(78240,9,1,j|0);c[56816]=0;a[227272]=0}j=(c[57118]|0)+1|0;c[57118]=j;m=c[10030]|0;cf(m|0,76176,(v=i,i=i+8|0,c[v>>2]=j,v)|0);if((g|0)==7){n=76328;o=75816}else if((g|0)==5){n=76328;o=75896}else if((g|0)==3){n=76584;o=76e3}else if((g|0)==2){n=76328;o=76032}else if((g|0)==6){n=76328;o=75856}else if((g|0)==4){n=76328;o=75920}else if((g|0)==1){n=76328;o=76104}else{n=76328;o=179864}do{if((a[o]|0)!=0){g=(aY(n|0,76584)|0)==0?75712:75792;j=a[228528]|0;if(j<<24>>24==3){m=c[10030]|0;p=d[226992]|0;q=d[228368]|0;r=d[228536]|0;cf(m|0,75592,(v=i,i=i+48|0,c[v>>2]=g,c[v+8>>2]=n,c[v+16>>2]=p,c[v+24>>2]=q,c[v+32>>2]=r,c[v+40>>2]=o,v)|0);break}r=c[10030]|0;if(j<<24>>24==1){j=c[57082]|0;cf(r|0,75504,(v=i,i=i+32|0,c[v>>2]=g,c[v+8>>2]=n,c[v+16>>2]=j,c[v+24>>2]=o,v)|0);break}else{cf(r|0,75424,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=n,c[v+16>>2]=o,v)|0);break}}}while(0);g=c[10030]|0;aI(75400,22,1,g|0)}}while(0);if(!(a[228352]|0)){if(a[227272]|0){o=c[10030]|0;aI(78240,9,1,o|0);c[56816]=0;a[227272]=0}o=c[10030]|0;aI(76352,55,1,o|0);a[228352]=1}aI(77136,11,1,c[10030]|0);do{if((l|0)==0){o=c[10030]|0;cf(o|0,77072,(v=i,i=i+8|0,c[v>>2]=227016,v)|0)}else if((l|0)==2|(l|0)==5){cf(c[10030]|0,76808,(v=i,i=i+8|0,c[v>>2]=c[57118],v)|0)}else if((l|0)==1|(l|0)==4){o=a[228528]|0;do{if(o<<24>>24==3){n=c[10030]|0;g=d[226992]|0;r=d[228368]|0;j=d[228536]|0;cf(n|0,76552,(v=i,i=i+32|0,c[v>>2]=76584,c[v+8>>2]=g,c[v+16>>2]=r,c[v+24>>2]=j,v)|0)}else{j=c[10030]|0;if(o<<24>>24==1){r=c[57082]|0;cf(j|0,76480,(v=i,i=i+16|0,c[v>>2]=76584,c[v+8>>2]=r,v)|0);break}else{cf(j|0,76448,(v=i,i=i+8|0,c[v>>2]=76584,v)|0);break}}}while(0);if(k>>>0>=100){break}cf(c[10030]|0,76904,(v=i,i=i+8|0,h[v>>3]=+(k|0)*.01,v)|0)}else{o=a[228528]|0;if(o<<24>>24==3){j=c[10030]|0;r=d[226992]|0;g=d[228368]|0;n=d[228536]|0;cf(j|0,76552,(v=i,i=i+32|0,c[v>>2]=76584,c[v+8>>2]=r,c[v+16>>2]=g,c[v+24>>2]=n,v)|0);break}n=c[10030]|0;if(o<<24>>24==1){o=c[57082]|0;cf(n|0,76480,(v=i,i=i+16|0,c[v>>2]=76584,c[v+8>>2]=o,v)|0);break}else{cf(n|0,76448,(v=i,i=i+8|0,c[v>>2]=76584,v)|0);break}}}while(0);aI(76704,11,1,c[10030]|0);k=c[10030]|0;if((b|0)>0){s=0;t=k}else{u=k;w=aI(76624,4,1,u|0)|0;i=f;return}while(1){x=+((c[(c[3524]|0)+12>>2]|0)-(c[e+(s*12&-1)+4>>2]|0)|0)/10.0;cf(t|0,76648,(v=i,i=i+24|0,h[v>>3]=+(c[e+(s*12&-1)>>2]|0)/10.0,h[v+8>>3]=x,c[v+16>>2]=((s|0)%16&-1|0)==15?140136:73808,v)|0);k=s+1|0;l=c[10030]|0;if((k|0)<(b|0)){s=k;t=l}else{u=l;break}}w=aI(76624,4,1,u|0)|0;i=f;return}function qq(b,d,e,f,g,j){b=b|0;d=+d;e=+e;f=f|0;g=g|0;j=j|0;var k=0,l=0.0,m=0.0,n=0;f=i;if((j|0)==2){if(a[237880]|0){a[237880]=0;a[c[11232]|0]=0;k=c[10030]|0;cf(k|0,77712,(v=i,i=i+8|0,c[v>>2]=43856,v)|0)}k=c[10030]|0;l=+(c[59472]|0)*.5;m=+h[29737]-e;cf(k|0,77608,(v=i,i=i+16|0,h[v>>3]=l,h[v+8>>3]=m,v)|0);h[29737]=e;h[29731]=0.0;c[11232]=43856;c[59472]=0;a[237880]=1;i=f;return}else if((j|0)==4){h[29731]=+(c[59472]|0)*-.5;h[29737]=+h[29737]-e;c[59472]=0;i=f;return}else if((j|0)==3){c[59472]=0;i=f;return}else{if(a[237880]|0){i=f;return}a[237880]=1;c[11232]=43856;aI(77600,6,1,c[10030]|0);j=c[57108]|0;if((aY(j|0,b|0)|0)!=0){uu(j);if((b|0)==0){n=0}else{n=bP(b|0)|0}c[57108]=n;b=c[10030]|0;cf(b|0,77568,(v=i,i=i+8|0,c[v>>2]=n,v)|0)}if(+h[28552]!=d){h[28552]=d;n=c[10030]|0;cf(n|0,77544,(v=i,i=i+8|0,h[v>>3]=d,v)|0)}n=c[57096]|0;do{if((n|0)!=0){if((aY(n|0,77432)|0)==0){break}b=c[10030]|0;cf(b|0,77368,(v=i,i=i+8|0,c[v>>2]=n,v)|0)}}while(0);n=c[57100]|0;do{if((n|0)!=0){if((aY(n|0,77432)|0)==0){break}b=c[10030]|0;cf(b|0,77288,(v=i,i=i+8|0,c[v>>2]=n,v)|0)}}while(0);d=+h[29731];if(d!=0.0){n=c[10030]|0;cf(n|0,77256,(v=i,i=i+8|0,h[v>>3]=d,v)|0);h[29731]=0.0}d=+h[29737];if(d!=e){n=c[10030]|0;m=d-e;cf(n|0,77240,(v=i,i=i+8|0,h[v>>3]=m,v)|0);h[29737]=e}if(!g){g=c[10030]|0;aI(77208,12,1,g|0)}if(a[237872]|0){g=c[10030]|0;aI(77184,21,1,g|0)}aF(62,c[10030]|0);i=f;return}}function qr(){var b=0;b=i;if(!(a[237880]|0)){i=b;return}a[237880]=0;a[c[11232]|0]=0;cf(c[10030]|0,77712,(v=i,i=i+8|0,c[v>>2]=43856,v)|0);i=b;return}function qs(d){d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+8|0;f=e|0;b[f>>1]=0;if((d|0)==0|(d|0)==10){c[56750]=0;i=e;return}else if((d|0)==6){if(a[227272]|0){if(a[228352]|0){g=c[10030]|0;aI(78232,6,1,g|0);a[228352]=0}g=c[10030]|0;aI(78240,9,1,g|0);c[56816]=0;a[227272]=0}if(a[228352]|0){g=c[10030]|0;aI(78232,6,1,g|0);a[228352]=0}if(a[228344]|0){g=c[10030]|0;aI(77776,5,1,g|0);a[228344]=0;c[57120]=-1}g=(c[56750]|0)+1|0;c[56750]=g;h=c[57076]|0;j=(h|0)!=0?h:78208;do{if((a[33512]&1)!=0){h=c[8415]|0;if((h|0)>=26){break}a[f]=h+97&255}}while(0);cf(c[10030]|0,78184,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=g,c[v+16>>2]=f,v)|0);g=c[56750]|0;cf(c[10030]|0,78072,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=g,c[v+16>>2]=f,v)|0);c[57144]=-5;i=e;return}else if((d|0)==9){if(!(a[228312]|0)){i=e;return}if(a[227272]|0){if(a[228352]|0){g=c[10030]|0;aI(78232,6,1,g|0);a[228352]=0}g=c[10030]|0;aI(78240,9,1,g|0);c[56816]=0;a[227272]=0}if(a[228352]|0){g=c[10030]|0;aI(78232,6,1,g|0);a[228352]=0}aI(78232,6,1,c[10030]|0);c[57144]=-5;i=e;return}else if((d|0)==7){if(a[227272]|0){if(a[228352]|0){g=c[10030]|0;aI(78232,6,1,g|0);a[228352]=0}g=c[10030]|0;aI(78240,9,1,g|0);c[56816]=0;a[227272]=0}if(a[228352]|0){g=c[10030]|0;aI(78232,6,1,g|0);a[228352]=0}if(a[228344]|0){g=c[10030]|0;aI(77776,5,1,g|0);a[228344]=0;c[57120]=-1}aI(78232,6,1,c[10030]|0);c[57144]=-5;i=e;return}else if((d|0)==3){a[228360]=1;a[228336]=1;i=e;return}else if((d|0)==4){a[228360]=0;i=e;return}else if((d|0)==8){if(!(a[228312]|0)){i=e;return}if(a[227272]|0){if(a[228352]|0){d=c[10030]|0;aI(78232,6,1,d|0);a[228352]=0}d=c[10030]|0;aI(78240,9,1,d|0);c[56816]=0;a[227272]=0}if(a[228352]|0){d=c[10030]|0;aI(78232,6,1,d|0);a[228352]=0}d=c[57076]|0;g=(d|0)!=0?d:78208;do{if((a[33512]&1)!=0){d=c[8415]|0;if((d|0)>=26){break}a[f]=d+97&255}}while(0);aI(77992,25,1,c[10030]|0);d=c[56750]|0;cf(c[10030]|0,77856,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=d,c[v+16>>2]=f,v)|0);aI(77816,2,1,c[10030]|0);i=e;return}else{i=e;return}}function qt(b){b=b|0;if((b|0)!=1){return}aI(78256,2,1,c[10030]|0);if(!(a[227272]|0)){return}if(a[228352]|0){b=c[10030]|0;aI(78232,6,1,b|0);a[228352]=0}aI(78240,9,1,c[10030]|0);c[56816]=0;a[227272]=0;return}function qu(){var b=0,d=0,e=0,f=0;b=i;if((a[33512]&1)==0){d=c[766]|0}else{c[772]=100;if((c[520]|0)>>>0>1){e=c[m>>2]|0;aI(79400,34,1,e|0);c[520]=1}c[766]=1;d=1}e=c[772]|0;f=c[778]|0;cf(c[10030]|0,79224,(v=i,i=i+56|0,c[v>>2]=a[225808]&1,c[v+8>>2]=e,c[v+16>>2]=d,c[v+24>>2]=25680,c[v+32>>2]=f,c[v+40>>2]=40152,c[v+48>>2]=40160,v)|0);a[46624]=0;c[9372]=0;c[524]=0;i=b;return}function qv(){var a=0;tt();c[9372]=0;c[524]=0;c[522]=1;c[526]=1;a=c[10030]|0;if((a|0)==0){return}aD(a|0);return}function qw(){tt();return}function qx(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0,R=0.0,S=0,T=0,U=0.0,V=0.0,W=0;b=i;i=i+80|0;d=b|0;e=b+24|0;f=b+48|0;j=b+72|0;k=c[13898]|0;l=c[8272]|0;L23998:do{if((k|0)<(l|0)){m=d|0;n=d+8|0;o=k;p=l;L24000:while(1){q=c[1054]|0;r=(a[q+(o*40&-1)|0]&1)==0;L24002:do{if(!r){s=c[q+(o*40&-1)+36>>2]|0;t=q+(o*40&-1)+32|0;u=c[10036]|0;w=0;while(1){if((w|0)>=(s|0)){break}if((a[u+((c[t>>2]|0)+w|0)|0]|0)==(a[w+103664|0]|0)){w=w+1|0}else{break L24002}}if((w|0)==1){break L23998}}}while(0);t=c[56580]|0;L24009:do{if((t|0)==0){x=226320}else{u=c[q+(o*40&-1)+36>>2]|0;s=c[q+(o*40&-1)+32>>2]|0;y=(u|0)>0;z=c[10036]|0;A=226320;B=t;while(1){L24013:do{if(!r){if(y){C=0;D=0;E=s;while(1){F=a[B+C|0]|0;if(F<<24>>24==(a[z+(C+E|0)|0]|0)){G=E;H=D}else{if(F<<24>>24!=36){break L24013}G=E-1|0;H=1}I=C+1|0;if((I|0)<(H+u|0)){C=I;D=H;E=G}else{break}}if((H|0)==0){J=I}else{x=A;break L24009}}else{J=0}E=a[B+J|0]|0;if((E<<24>>24|0)==36|(E<<24>>24|0)==0){x=A;break L24009}}}while(0);E=A+8|0;D=c[E>>2]|0;if((D|0)==0){x=E;break}else{A=E;B=D}}}}while(0);r=c[x+4>>2]|0;if((r|0)==4){a[225808]=1;c[13898]=o+1}else if((r|0)==5){K=o+1|0;c[13898]=K;if((K|0)>=(p|0)){L=18029;break}t=(a[q+(K*40&-1)|0]&1)==0;L24030:do{if(t){L=17953}else{B=c[q+(K*40&-1)+36>>2]|0;A=q+(K*40&-1)+32|0;u=c[10036]|0;z=0;while(1){if((z|0)>=(B|0)){L=17946;break}if((a[u+((c[A>>2]|0)+z|0)|0]|0)==(a[z+103664|0]|0)){z=z+1|0}else{break}}if((L|0)==17946){L=0;if((z|0)==1){L=18030;break L24000}}if(t){L=17953;break}A=c[q+(K*40&-1)+36>>2]|0;u=q+(K*40&-1)+32|0;B=c[10036]|0;s=0;while(1){if((s|0)>=(A|0)){break}if((a[B+((c[u>>2]|0)+s|0)|0]|0)==(a[s+148464|0]|0)){s=s+1|0}else{L=17953;break L24030}}if((s|0)==1){M=K;N=p}else{L=17953}}}while(0);if((L|0)==17953){L=0;t=is(e)|0;u=c[t>>2]|0;if((u|0)==1){O=+(c[t+8>>2]|0)}else if((u|0)==3){O=+uz(c[t+8>>2]|0,0)}else if((u|0)==2){O=+h[t+8>>3]}else{L=17957;break}c[518]=~~O;M=c[13898]|0;N=c[8272]|0}if((N|0)<=(M|0)){L=18025;break}t=c[1054]|0;if((a[t+(M*40&-1)|0]&1)==0){L=18028;break}u=c[t+(M*40&-1)+36>>2]|0;B=t+(M*40&-1)+32|0;A=c[10036]|0;z=0;while(1){if((z|0)>=(u|0)){break}if((a[A+((c[B>>2]|0)+z|0)|0]|0)==(a[z+148464|0]|0)){z=z+1|0}else{L=18026;break L24000}}if((z|0)!=1){L=18027;break}B=M+1|0;c[13898]=B;L24058:do{if((N|0)>(B|0)){if((a[t+(B*40&-1)|0]&1)==0){L=17972;break}u=c[t+(B*40&-1)+36>>2]|0;y=t+(B*40&-1)+32|0;w=0;while(1){if((w|0)>=(u|0)){break}if((a[A+((c[y>>2]|0)+w|0)|0]|0)==(a[w+78864|0]|0)){w=w+1|0}else{L=17972;break L24058}}if((w|0)==1){P=B;Q=N}else{L=17972}}else{L=17972}}while(0);if((L|0)==17972){L=0;B=is(e)|0;A=c[B>>2]|0;if((A|0)==1){R=+(c[B+8>>2]|0)}else if((A|0)==2){R=+h[B+8>>3]}else if((A|0)==3){R=+uz(c[B+8>>2]|0,0)}else{L=17976;break}c[516]=~~R;P=c[13898]|0;Q=c[8272]|0}if((Q|0)<=(P|0)){L=18031;break}B=c[1054]|0;if((a[B+(P*40&-1)|0]&1)==0){L=18032;break}A=c[B+(P*40&-1)+36>>2]|0;t=B+(P*40&-1)+32|0;B=c[10036]|0;z=0;while(1){if((z|0)>=(A|0)){break}if((a[B+((c[t>>2]|0)+z|0)|0]|0)==(a[z+78864|0]|0)){z=z+1|0}else{L=18033;break L24000}}if((z|0)!=1){L=18034;break}c[13898]=P+1;c[520]=aa(c[518]|0,c[516]|0)}else if((r|0)==10){uD(25680,90584,10);uD(25424,90584,10);c[778]=18;c[(c[3524]|0)+16>>2]=18;c[(c[3524]|0)+20>>2]=(((c[778]|0)*6&-1)>>>0)/10>>>0;a[225808]=0;a[225792]=0;t=(c[3524]|0)+96|0;c[t>>2]=c[t>>2]&-1025;a[225800]=0;c[520]=1;c[522]=1;c[526]=1;c[518]=1;c[516]=1;c[772]=100;h[6448]=1.0;h[6449]=1.0;c[13898]=(c[13898]|0)+1}else if((r|0)==0){a[225792]=1;t=(c[3524]|0)+96|0;c[t>>2]=c[t>>2]|1024;c[13898]=(c[13898]|0)+1}else if((r|0)==1){a[225792]=0;t=(c[3524]|0)+96|0;c[t>>2]=c[t>>2]&-1025;c[13898]=(c[13898]|0)+1}else if((r|0)==8){t=o+1|0;c[13898]=t;S=t;L=17989}else if((r|0)==3){a[225808]=0;c[13898]=o+1}else if((r|0)==6){a[225800]=1;c[13898]=o+1}else if((r|0)==7){a[225800]=0;c[13898]=o+1}else if((r|0)==2){T=o+1|0;c[13898]=T;if((T|0)>=(p|0)){L=18024;break}L24089:do{if((a[q+(T*40&-1)|0]&1)!=0){t=c[q+(T*40&-1)+36>>2]|0;B=q+(T*40&-1)+32|0;A=c[10036]|0;y=0;while(1){if((y|0)>=(t|0)){break}if((a[A+((c[B>>2]|0)+y|0)|0]|0)==(a[y+103664|0]|0)){y=y+1|0}else{break L24089}}if((y|0)==1){L=18023;break L24000}}}while(0);z=is(e)|0;B=c[z>>2]|0;if((B|0)==1){U=+(c[z+8>>2]|0)}else if((B|0)==2){U=+h[z+8>>3]}else if((B|0)==3){U=+uz(c[z+8>>2]|0,0)}else{L=17936;break}h[6449]=U;if(U<=0.0){L=17938;break}}else{S=o;L=17989}L24101:do{if((L|0)==17989){L=0;L24103:do{if((S|0)<(p|0)){L24105:do{if((a[q+(S*40&-1)|0]&1)!=0){z=c[q+(S*40&-1)+36>>2]|0;B=q+(S*40&-1)+32|0;A=c[10036]|0;t=0;while(1){if((t|0)>=(z|0)){break}if((a[A+((c[B>>2]|0)+t|0)|0]|0)==(a[t+103664|0]|0)){t=t+1|0}else{break L24105}}if((t|0)==1){break L24103}}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[m>>2]|0)!=3){c[13898]=S;break}B=c[n>>2]|0;if((B|0)==0){break}A=bk(B|0,148464)|0;do{if((a[B+A|0]|0)==44){if((ca(B+(A+1|0)|0,148448,(v=i,i=i+8|0,c[v>>2]=j,v)|0)|0)!=1){break}c[778]=~~(+h[j>>3]+.5)}}while(0);if((A|0)>0){uF(25680,B|0,255);a[A+25680|0]=0}uB(25424,25680);uu(B);break L24101}}while(0);if((r|0)==8){L=18006;break L24000}y=is(f)|0;z=c[y>>2]|0;if((z|0)==2){V=+h[y+8>>3]}else if((z|0)==3){V=+uz(c[y+8>>2]|0,0)}else if((z|0)==1){V=+(c[y+8>>2]|0)}else{L=18011;break L24000}y=~~V;c[778]=y;c[(c[3524]|0)+16>>2]=y;c[(c[3524]|0)+20>>2]=(((c[778]|0)*6&-1)>>>0)/10>>>0}}while(0);o=c[13898]|0;p=c[8272]|0;if((o|0)>=(p|0)){break L23998}}if((L|0)==18023){uf(T,79152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18033){uf(P,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18024){uf(T,79152,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18025){uf(M,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18028){uf(M,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==17976){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18030){uf(K,78976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18034){uf(P,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18029){uf(K,78976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18031){uf(P,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18006){uf(c[13898]|0,78800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18027){uf(M,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==17938){uf((c[13898]|0)-1|0,79096,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18026){uf(M,78920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18032){uf(P,78824,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==17936){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==18011){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==17957){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);L=a[225808]|0;P=c[518]|0;V=+g[178]*+(((P*1030&-1)-80|0)>>>0>>>0);do{if(L){U=14.0e4/V;M=c[516]|0;R=95.0e3/(+g[38]*+(((M*714&-1)-80|0)>>>0>>>0));c[772]=~~(U>>0>>>0));c[772]=~~(R>2]=L?78704:78720,c[v+8>>2]=P,c[v+16>>2]=W,v)|0);uC(13048,(a[225792]|0?78656:95304)|0);W=13048+(uA(13048)|0)|0;be(W|0,78504,(v=i,i=i+8|0,h[v>>3]=+h[6449],v)|0);W=13048+(uA(13048)|0)|0;P=c[778]|0;be(W|0,78416,(v=i,i=i+24|0,c[v>>2]=a[225800]|0?131504:131584,c[v+8>>2]=25680,c[v+16>>2]=P,v)|0);i=b;return}function qy(a){a=a|0;if((a|0)==180|(a|0)==(-180|0)){c[780]=2}else if((a|0)==(-270|0)|(a|0)==90){c[780]=3}else if((a|0)==(-90|0)|(a|0)==270){c[780]=1}else{c[780]=0}return 1}function qz(a){a=a|0;c[776]=a;return 1}function qA(){var b=0,d=0,e=0.0,f=0,h=0,i=0;tt();if((a[33512]&1)==0){b=c[524]|0;if(b>>>0>=(c[520]|0)>>>0){d=c[m>>2]|0;aI(79440,40,1,d|0);return}d=b+1|0;c[524]=d;e=+(5e3/((c[772]|0)>>>0)>>>0>>>0>>>0);b=c[526]|0;f=~~(e+ +g[178]*+((b-1|0)>>>0>>>0)*1030.0);c[514]=f;h=c[522]|0;i=~~(e+ +g[38]*+(((h*714&-1)-80|0)>>>0>>>0));c[512]=i;if(((d>>>0)%((c[518]|0)>>>0)>>>0|0)==0){c[526]=1;c[522]=h+1}else{c[526]=b+1}c[554]=f;c[552]=i}else{i=a[225808]|0;c[(c[3524]|0)+8>>2]=i?1400:950;c[(c[3524]|0)+12>>2]=i?950:1400;c[554]=50;f=i?1e3:1450;c[552]=f;c[512]=f;c[514]=50}c[9372]=0;c[774]=0;c[780]=0;c[768]=1;c[770]=0;c[776]=0;a[25936]=a[89416]|0;a[25937|0]=a[89417|0]|0;a[25938|0]=a[89418|0]|0;a[25939|0]=a[89419|0]|0;a[25940|0]=a[89420|0]|0;a[25941|0]=a[89421|0]|0;a[26448]=a[28976]|0;a[26449|0]=a[28977|0]|0;a[26450|0]=a[28978|0]|0;return}function qB(b,d){b=b|0;d=d|0;c[554]=(c[514]|0)+b;c[552]=(c[512]|0)-d;if(!(a[46624]|0)){return}tt();return}function qC(b,d){b=b|0;d=d|0;var e=0,f=0;e=(c[514]|0)+b|0;b=(c[512]|0)-d|0;if(a[46624]|0){f=c[9372]|0}else{c[666]=c[554];c[566]=c[552];c[9372]=1;a[46624]=1;f=1}c[2664+(f<<2)>>2]=e;c[2264+(f<<2)>>2]=b;c[554]=e;c[552]=b;b=f+1|0;c[9372]=b;a[46624]=1;if((b|0)!=100){return}tt();return}function qD(b){b=b|0;var d=0;tt();if((b|0)>-1){d=((b|0)%10&-1)+2|0}else{d=(b|0)<-2?0:b+2|0}if(a[225792]|0){a[25936]=a[89416]|0;a[25937|0]=a[89417|0]|0;a[25938|0]=a[89418|0]|0;a[25939|0]=a[89419|0]|0;a[25940|0]=a[89420|0]|0;a[25941|0]=a[89421|0]|0;a[26448]=a[28976]|0;a[26449|0]=a[28977|0]|0;a[26450|0]=a[28978|0]|0}else{b=c[28928+(d<<2)>>2]|0;uB(25936,b|0);b=28976+(d*3&-1)|0;a[26448]=a[b]|0;a[26449|0]=a[b+1|0]|0;a[26450|0]=a[b+2|0]|0}c[768]=~~(+h[6448]*+h[6449]*+((c[2112+(d<<2)>>2]|0)>>>0>>>0)+.5);if(!(a[225800]|0)){c[770]=c[2160+(d<<2)>>2];return}if((d|0)==1){c[770]=5;return}else{c[770]=0;return}}function qE(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;g=c[3524]|0;tt();if((a[e]|0)==0){i=f;return}h=((c[512]|0)-d|0)-((c[g+16>>2]|0)>>>1)|0;g=(c[514]|0)+b|0;b=c[778]|0;d=c[780]|0;j=(d|0)!=0?1:c[776]|0;k=c[774]|0;cf(c[10030]|0,79720,(v=i,i=i+72|0,c[v>>2]=25936,c[v+8>>2]=g,c[v+16>>2]=h,c[v+24>>2]=25680,c[v+32>>2]=b,c[v+40>>2]=j,c[v+48>>2]=d,c[v+56>>2]=k,c[v+64>>2]=e,v)|0);c[774]=(c[774]|0)+2;i=f;return}function qF(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0.0,g=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0.0,r=0.0;e=i;f=+(((c[514]|0)+a|0)>>>0>>>0);g=+(((c[512]|0)-b|0)>>>0>>>0);j=+h[3817]*8.0;k=j==0.0?.1:j;tt();do{if((d|0)!=-1){b=(d|0)%63&-1;if((b|0)==27){a=c[10030]|0;aI(83312,8,1,a|0);a=c[10030]|0;j=f-k;l=g-k;m=f+k;n=g+k;o=c[774]|0;c[774]=o+1;cf(a|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=l,h[v+24>>3]=m,h[v+32>>3]=n,c[v+40>>2]=o,v)|0);o=c[10030]|0;n=k*2.0;a=c[774]|0;c[774]=a+1;cf(o|0,80304,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=l,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=j,h[v+48>>3]=g,h[v+56>>3]=m,h[v+64>>3]=g,h[v+72>>3]=n,h[v+80>>3]=n,c[v+88>>2]=a,v)|0);a=c[774]|0;o=a+2|0;p=c[10030]|0;c[774]=a+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o,v)|0);i=e;return}else if((b|0)==50){aI(83312,8,1,c[10030]|0);n=g+k;m=g-k;j=f-k;o=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=n,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=m,h[v+56>>3]=j,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=n,c[v+88>>2]=o,v)|0);n=k*.5;o=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=g,h[v+24>>3]=f,h[v+32>>3]=m,h[v+40>>3]=f+n,h[v+48>>3]=g-n,h[v+56>>3]=f-n,h[v+64>>3]=g+n,h[v+72>>3]=j,h[v+80>>3]=g,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==10){j=g+k;n=g-k*.75;o=c[774]|0;cf(c[10030]|0,82472,(v=i,i=i+80|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=j,h[v+24>>3]=f-k,h[v+32>>3]=n,h[v+40>>3]=f+k,h[v+48>>3]=n,h[v+56>>3]=f,h[v+64>>3]=j,c[v+72>>2]=o,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==39){aI(83312,8,1,c[10030]|0);o=c[10030]|0;j=f+k;n=g+k;p=c[774]|0;c[774]=p+1;cf(o|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-k,h[v+16>>3]=g-k,h[v+24>>3]=j,h[v+32>>3]=n,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=g,h[v+24>>3]=j,h[v+32>>3]=n,c[v+40>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==26){aI(83312,8,1,c[10030]|0);o=c[10030]|0;n=f-k;j=g-k;m=g+k;p=c[774]|0;c[774]=p+1;cf(o|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=j,h[v+24>>3]=f+k,h[v+32>>3]=m,c[v+40>>2]=p,v)|0);p=c[10030]|0;l=k*2.0;o=c[774]|0;c[774]=o+1;cf(p|0,80448,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=j,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=m,h[v+56>>3]=n,h[v+64>>3]=g,h[v+72>>3]=l,h[v+80>>3]=l,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==1){l=f-k;n=g-k;m=f+k;j=g+k;o=c[774]|0;cf(c[10030]|0,83432,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=l,h[v+16>>3]=n,h[v+24>>3]=m,h[v+32>>3]=j,c[v+40>>2]=o+1,c[v+48>>2]=25936,h[v+56>>3]=l,h[v+64>>3]=j,h[v+72>>3]=m,h[v+80>>3]=n,c[v+88>>2]=o+2,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+5;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+4,v)|0);i=e;return}else if((b|0)==41){aI(83312,8,1,c[10030]|0);o=c[10030]|0;n=f-k;m=g-k;j=f+k;l=g+k;p=c[774]|0;c[774]=p+1;cf(o|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=m,h[v+24>>3]=j,h[v+32>>3]=l,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=m,h[v+24>>3]=f,h[v+32>>3]=g,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=g,h[v+24>>3]=j,h[v+32>>3]=l,c[v+40>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+4;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+3,v)|0);i=e;return}else if((b|0)==31){aI(83312,8,1,c[10030]|0);p=c[10030]|0;l=g-k;o=c[774]|0;c[774]=o+1;cf(p|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-k,h[v+16>>3]=l,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=o,v)|0);o=c[10030]|0;j=k*.25;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-j,h[v+16>>3]=l,h[v+24>>3]=f+j,h[v+32>>3]=g,c[v+40>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==57){aI(83312,8,1,c[10030]|0);j=g+k;l=f+k;m=f-k;p=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=j,h[v+24>>3]=l,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=m,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=j,c[v+88>>2]=p,v)|0);j=k*.5;n=f-j;q=g-j;r=g+j;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=g,h[v+24>>3]=n,h[v+32>>3]=q,h[v+40>>3]=f,h[v+48>>3]=g,h[v+56>>3]=n,h[v+64>>3]=r,h[v+72>>3]=m,h[v+80>>3]=g,c[v+88>>2]=p,v)|0);m=f+j;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=g,h[v+24>>3]=m,h[v+32>>3]=q,h[v+40>>3]=l,h[v+48>>3]=g,h[v+56>>3]=m,h[v+64>>3]=r,h[v+72>>3]=f,h[v+80>>3]=g,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+4;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+3,v)|0);i=e;return}else if((b|0)==43){aI(83312,8,1,c[10030]|0);p=c[10030]|0;r=f-k;m=f+k;l=g+k;o=c[774]|0;c[774]=o+1;cf(p|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=r,h[v+16>>3]=g-k,h[v+24>>3]=m,h[v+32>>3]=l,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=r,h[v+16>>3]=g,h[v+24>>3]=m,h[v+32>>3]=l,c[v+40>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==12){l=g+k;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=l,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=l,c[v+88>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==52){aI(83312,8,1,c[10030]|0);l=g+k;m=g-k;p=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=l,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=m,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=l,c[v+88>>2]=p,v)|0);r=k*.5;q=f-r;j=g-r;n=f+r;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=j,h[v+24>>3]=f,h[v+32>>3]=m,h[v+40>>3]=n,h[v+48>>3]=j,h[v+56>>3]=f,h[v+64>>3]=g,h[v+72>>3]=q,h[v+80>>3]=j,c[v+88>>2]=p,v)|0);j=g+r;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=j,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=n,h[v+48>>3]=j,h[v+56>>3]=f,h[v+64>>3]=l,h[v+72>>3]=q,h[v+80>>3]=j,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+4;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+3,v)|0);i=e;return}else if((b|0)==8){j=g-k;q=g+k*.75;p=c[774]|0;cf(c[10030]|0,82472,(v=i,i=i+80|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=j,h[v+24>>3]=f+k,h[v+32>>3]=q,h[v+40>>3]=f-k,h[v+48>>3]=q,h[v+56>>3]=f,h[v+64>>3]=j,c[v+72>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==29){aI(83312,8,1,c[10030]|0);p=c[10030]|0;j=f-k;q=g-k;l=f+k;o=c[774]|0;c[774]=o+1;cf(p|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=q,h[v+24>>3]=l,h[v+32>>3]=g+k,c[v+40>>2]=o,v)|0);o=c[10030]|0;n=k*2.0;p=c[774]|0;c[774]=p+1;cf(o|0,80048,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=q,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=q,h[v+56>>3]=l,h[v+64>>3]=g,h[v+72>>3]=n,h[v+80>>3]=n,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==45){aI(83312,8,1,c[10030]|0);p=c[10030]|0;n=f-k;l=g-k;q=f+k;j=g+k;o=c[774]|0;c[774]=o+1;cf(p|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=l,h[v+24>>3]=q,h[v+32>>3]=j,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=l,h[v+24>>3]=f,h[v+32>>3]=g,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=g,h[v+24>>3]=q,h[v+32>>3]=j,c[v+40>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+4;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+3,v)|0);i=e;return}else if((b|0)==49){aI(83312,8,1,c[10030]|0);j=g+k;q=f-k;o=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=j,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=q,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=j,c[v+88>>2]=o,v)|0);j=k*.5;n=f-j;o=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=g,h[v+24>>3]=n,h[v+32>>3]=g-j,h[v+40>>3]=f,h[v+48>>3]=g,h[v+56>>3]=n,h[v+64>>3]=g+j,h[v+72>>3]=q,h[v+80>>3]=g,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==14){q=g-k;j=g-k*.25;n=k*.625;l=g+k;o=c[774]|0;cf(c[10030]|0,81840,(v=i,i=i+112|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=q,h[v+24>>3]=f+k,h[v+32>>3]=j,h[v+40>>3]=f+n,h[v+48>>3]=l,h[v+56>>3]=f-n,h[v+64>>3]=l,h[v+72>>3]=f-k,h[v+80>>3]=j,h[v+88>>3]=f,h[v+96>>3]=q,c[v+104>>2]=o,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==47){aI(83312,8,1,c[10030]|0);q=g+k;o=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=q,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=q,c[v+88>>2]=o,v)|0);q=k*.625;j=f-q;l=k*.375;n=g-l;r=k*.125;o=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=n,h[v+24>>3]=f-l,h[v+32>>3]=g-q,h[v+40>>3]=f+r,h[v+48>>3]=g-r,h[v+56>>3]=f-r,h[v+64>>3]=g+r,h[v+72>>3]=j,h[v+80>>3]=n,c[v+88>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p,v)|0);c[774]=(c[774]|0)+2;i=e;return}else if((b|0)==30){p=c[774]|0;cf(c[10030]|0,82736,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-k,h[v+16>>3]=g-k,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==4){p=c[774]|0;cf(c[10030]|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-k,h[v+16>>3]=g-k,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==23){aI(83312,8,1,c[10030]|0);p=c[10030]|0;n=f-k;j=g-k;r=f+k;q=g+k;o=c[774]|0;c[774]=o+1;cf(p|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=j,h[v+24>>3]=r,h[v+32>>3]=q,c[v+40>>2]=o,v)|0);o=c[10030]|0;l=k*2.0;p=c[774]|0;c[774]=p+1;cf(o|0,80720,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=j,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=q,h[v+56>>3]=r,h[v+64>>3]=g,h[v+72>>3]=l,h[v+80>>3]=l,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==11){l=g+k;p=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=l,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=l,c[v+88>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==56){aI(83312,8,1,c[10030]|0);l=g+k;r=f+k;q=g-k;p=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=l,h[v+24>>3]=r,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=q,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=l,c[v+88>>2]=p,v)|0);l=k*.5;j=f-l;n=g-l;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=n,h[v+24>>3]=f,h[v+32>>3]=q,h[v+40>>3]=r,h[v+48>>3]=g,h[v+56>>3]=f+l,h[v+64>>3]=g+l,h[v+72>>3]=j,h[v+80>>3]=n,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==20){aI(83312,8,1,c[10030]|0);p=c[10030]|0;n=f-k;j=g-k;l=f+k;r=g+k;o=c[774]|0;c[774]=o+1;cf(p|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=j,h[v+24>>3]=l,h[v+32>>3]=r,c[v+40>>2]=o,v)|0);o=c[10030]|0;q=k*2.0;p=c[774]|0;c[774]=p+1;cf(o|0,81608,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=j,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=l,h[v+48>>3]=g,h[v+56>>3]=f,h[v+64>>3]=j,h[v+72>>3]=q,h[v+80>>3]=q,c[v+88>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,81160,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=j,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=n,h[v+48>>3]=g,h[v+56>>3]=f,h[v+64>>3]=r,h[v+72>>3]=q,h[v+80>>3]=q,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+4;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+3,v)|0);i=e;return}else if((b|0)==28){aI(83312,8,1,c[10030]|0);o=c[10030]|0;q=f-k;r=g-k;p=c[774]|0;c[774]=p+1;cf(o|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=r,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);p=c[10030]|0;n=k*2.0;o=c[774]|0;c[774]=o+1;cf(p|0,80200,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=r,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=q,h[v+48>>3]=g,h[v+56>>3]=f,h[v+64>>3]=r,h[v+72>>3]=n,h[v+80>>3]=n,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==19){aI(83312,8,1,c[10030]|0);o=c[10030]|0;n=f-k;r=g-k;q=g+k;p=c[774]|0;c[774]=p+1;cf(o|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=r,h[v+24>>3]=f+k,h[v+32>>3]=q,c[v+40>>2]=p,v)|0);p=c[10030]|0;j=k*2.0;o=c[774]|0;c[774]=o+1;cf(p|0,81160,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=n,h[v+16>>3]=r,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=n,h[v+48>>3]=g,h[v+56>>3]=f,h[v+64>>3]=q,h[v+72>>3]=j,h[v+80>>3]=j,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==17){aI(83312,8,1,c[10030]|0);o=c[10030]|0;j=f-k;q=g-k;p=c[774]|0;c[774]=p+1;cf(o|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=q,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);p=c[10030]|0;n=k*2.0;o=c[774]|0;c[774]=o+1;cf(p|0,81472,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=q,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=q,h[v+56>>3]=j,h[v+64>>3]=g,h[v+72>>3]=n,h[v+80>>3]=n,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==59){aI(83312,8,1,c[10030]|0);n=g+k;j=f+k;o=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=n,h[v+24>>3]=j,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=n,c[v+88>>2]=o,v)|0);q=k*.5;r=f-q;l=g+q;o=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=r,h[v+16>>3]=l,h[v+24>>3]=f+q,h[v+32>>3]=g-q,h[v+40>>3]=j,h[v+48>>3]=g,h[v+56>>3]=f,h[v+64>>3]=n,h[v+72>>3]=r,h[v+80>>3]=l,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==7){l=g-k;r=g+k*.75;o=c[774]|0;cf(c[10030]|0,82600,(v=i,i=i+80|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=l,h[v+24>>3]=f+k,h[v+32>>3]=r,h[v+40>>3]=f-k,h[v+48>>3]=r,h[v+56>>3]=f,h[v+64>>3]=l,c[v+72>>2]=o,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==60){aI(83312,8,1,c[10030]|0);l=g+k;r=f+k;n=g-k;o=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=l,h[v+24>>3]=r,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=n,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=l,c[v+88>>2]=o,v)|0);j=k*.5;q=f-j;m=g-j;o=c[774]|0;cf(c[10030]|0,79928,(v=i,i=i+128|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=m,h[v+24>>3]=f,h[v+32>>3]=n,h[v+40>>3]=r,h[v+48>>3]=g,h[v+56>>3]=f,h[v+64>>3]=l,h[v+72>>3]=q,h[v+80>>3]=g+j,h[v+88>>3]=f,h[v+96>>3]=g,h[v+104>>3]=q,h[v+112>>3]=m,c[v+120>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==35){aI(83312,8,1,c[10030]|0);o=c[10030]|0;m=f-k;q=g+k;p=c[774]|0;c[774]=p+1;cf(o|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=g-k,h[v+24>>3]=f+k,h[v+32>>3]=q,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=g,h[v+24>>3]=f,h[v+32>>3]=q,c[v+40>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==61){aI(83312,8,1,c[10030]|0);q=g+k;m=f+k;j=f-k;o=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=q,h[v+24>>3]=m,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=j,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=q,c[v+88>>2]=o,v)|0);l=k*.5;r=g-l;o=c[774]|0;cf(c[10030]|0,79928,(v=i,i=i+128|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=g,h[v+24>>3]=f-l,h[v+32>>3]=r,h[v+40>>3]=f,h[v+48>>3]=g,h[v+56>>3]=f+l,h[v+64>>3]=r,h[v+72>>3]=m,h[v+80>>3]=g,h[v+88>>3]=f,h[v+96>>3]=q,h[v+104>>3]=j,h[v+112>>3]=g,c[v+120>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==54){aI(83312,8,1,c[10030]|0);j=g+k;q=g-k;m=f-k;o=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=j,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=q,h[v+56>>3]=m,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=j,c[v+88>>2]=o,v)|0);r=k*.5;l=f+r;o=c[774]|0;cf(c[10030]|0,79928,(v=i,i=i+128|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=g,h[v+24>>3]=f,h[v+32>>3]=q,h[v+40>>3]=l,h[v+48>>3]=g-r,h[v+56>>3]=f,h[v+64>>3]=g,h[v+72>>3]=l,h[v+80>>3]=g+r,h[v+88>>3]=f,h[v+96>>3]=j,h[v+104>>3]=m,h[v+112>>3]=g,c[v+120>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==6){o=c[774]|0;cf(c[10030]|0,82736,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-k,h[v+16>>3]=g-k,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=o,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==40){aI(83312,8,1,c[10030]|0);o=c[10030]|0;m=g-k;j=f+k;r=g+k;p=c[774]|0;c[774]=p+1;cf(o|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-k,h[v+16>>3]=m,h[v+24>>3]=j,h[v+32>>3]=r,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=m,h[v+24>>3]=j,h[v+32>>3]=r,c[v+40>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==15){aI(83312,8,1,c[10030]|0);o=c[10030]|0;r=f-k;j=g-k;p=c[774]|0;c[774]=p+1;cf(o|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=r,h[v+16>>3]=j,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);p=c[10030]|0;m=k*.342;l=g-k*.94;q=k*2.0;o=c[774]|0;c[774]=o+1;cf(p|0,81704,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=r,h[v+16>>3]=j,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=f+m,h[v+48>>3]=l,h[v+56>>3]=f-m,h[v+64>>3]=l,h[v+72>>3]=q,h[v+80>>3]=q,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==2){aI(83312,8,1,c[10030]|0);o=c[10030]|0;q=g-k;l=g+k;p=c[774]|0;c[774]=p+1;cf(o|0,83184,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=q+-1.0,h[v+24>>3]=f,h[v+32>>3]=l+1.0,c[v+40>>2]=p,v)|0);p=c[10030]|0;m=f-k;j=f+k;o=c[774]|0;c[774]=o+1;cf(p|0,83112,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m+-1.0,h[v+16>>3]=g,h[v+24>>3]=j+1.0,h[v+32>>3]=g,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,83024,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=q,h[v+24>>3]=j,h[v+32>>3]=l,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,83024,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=l,h[v+24>>3]=j,h[v+32>>3]=q,c[v+40>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+5;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+4,v)|0);i=e;return}else if((b|0)==18){aI(83312,8,1,c[10030]|0);o=c[10030]|0;q=f-k;j=g-k;l=f+k;p=c[774]|0;c[774]=p+1;cf(o|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=j,h[v+24>>3]=l,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);p=c[10030]|0;m=k*2.0;o=c[774]|0;c[774]=o+1;cf(p|0,81368,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=j,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=l,h[v+48>>3]=g,h[v+56>>3]=q,h[v+64>>3]=g,h[v+72>>3]=m,h[v+80>>3]=m,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==38){aI(83312,8,1,c[10030]|0);o=c[10030]|0;m=f-k;q=g-k;l=f+k;j=g+k;p=c[774]|0;c[774]=p+1;cf(o|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=q,h[v+24>>3]=l,h[v+32>>3]=j,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=q,h[v+24>>3]=l,h[v+32>>3]=g,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=g,h[v+24>>3]=f,h[v+32>>3]=j,c[v+40>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+4;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+3,v)|0);i=e;return}else if((b|0)==51){aI(83312,8,1,c[10030]|0);j=g+k;p=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=j,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=j,c[v+88>>2]=p,v)|0);m=k*.5;l=f-m;q=g+m;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=l,h[v+16>>3]=q,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=f+m,h[v+48>>3]=q,h[v+56>>3]=f,h[v+64>>3]=j,h[v+72>>3]=l,h[v+80>>3]=q,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==34){aI(83312,8,1,c[10030]|0);p=c[10030]|0;q=f-k;l=g-k;j=f+k;o=c[774]|0;c[774]=o+1;cf(p|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=l,h[v+24>>3]=j,h[v+32>>3]=g+k,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=l,h[v+24>>3]=j,h[v+32>>3]=g,c[v+40>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==0){p=c[774]|0;cf(c[10030]|0,83736,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=g-k+-1.0,h[v+24>>3]=f,h[v+32>>3]=g+k+1.0,c[v+40>>2]=p+1,c[v+48>>2]=25936,h[v+56>>3]=f-k+-1.0,h[v+64>>3]=g,h[v+72>>3]=f+k+1.0,h[v+80>>3]=g,c[v+88>>2]=p+2,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+5;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+4,v)|0);i=e;return}else if((b|0)==9){j=g+k;l=g-k*.75;p=c[774]|0;cf(c[10030]|0,82600,(v=i,i=i+80|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=j,h[v+24>>3]=f-k,h[v+32>>3]=l,h[v+40>>3]=f+k,h[v+48>>3]=l,h[v+56>>3]=f,h[v+64>>3]=j,c[v+72>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==3){p=c[774]|0;cf(c[10030]|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-k,h[v+16>>3]=g-k,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==46){p=c[774]|0;cf(c[10030]|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-k,h[v+16>>3]=g-k,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==55){aI(83312,8,1,c[10030]|0);j=g+k;l=f+k;p=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=j,h[v+24>>3]=l,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=j,c[v+88>>2]=p,v)|0);j=k*.5;q=f+j;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=g,h[v+24>>3]=q,h[v+32>>3]=g-j,h[v+40>>3]=l,h[v+48>>3]=g,h[v+56>>3]=q,h[v+64>>3]=g+j,h[v+72>>3]=f,h[v+80>>3]=g,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==37){aI(83312,8,1,c[10030]|0);p=c[10030]|0;j=f-k;q=g-k;l=g+k;o=c[774]|0;c[774]=o+1;cf(p|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=q,h[v+24>>3]=f+k,h[v+32>>3]=l,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=q,h[v+24>>3]=f,h[v+32>>3]=l,c[v+40>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==22){aI(83312,8,1,c[10030]|0);p=c[10030]|0;l=f-k;q=g-k;j=f+k;m=g+k;o=c[774]|0;c[774]=o+1;cf(p|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=l,h[v+16>>3]=q,h[v+24>>3]=j,h[v+32>>3]=m,c[v+40>>2]=o,v)|0);o=c[10030]|0;r=k*2.0;p=c[774]|0;c[774]=p+1;cf(o|0,80872,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=l,h[v+16>>3]=q,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=j,h[v+48>>3]=g,h[v+56>>3]=f,h[v+64>>3]=m,h[v+72>>3]=r,h[v+80>>3]=r,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==48){aI(83312,8,1,c[10030]|0);r=g+k;m=g-k;p=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=r,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=m,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=r,c[v+88>>2]=p,v)|0);r=k*.5;j=f-r;q=g-r;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=j,h[v+16>>3]=q,h[v+24>>3]=f,h[v+32>>3]=m,h[v+40>>3]=f+r,h[v+48>>3]=q,h[v+56>>3]=f,h[v+64>>3]=g,h[v+72>>3]=j,h[v+80>>3]=q,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==21){aI(83312,8,1,c[10030]|0);p=c[10030]|0;q=f-k;j=g-k;r=g+k;o=c[774]|0;c[774]=o+1;cf(p|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=j,h[v+24>>3]=f+k,h[v+32>>3]=r,c[v+40>>2]=o,v)|0);o=c[10030]|0;m=k*2.0;p=c[774]|0;c[774]=p+1;cf(o|0,81040,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=j,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=j,h[v+56>>3]=f,h[v+64>>3]=r,h[v+72>>3]=m,h[v+80>>3]=m,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==5){p=c[774]|0;cf(c[10030]|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-k,h[v+16>>3]=g-k,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==25){aI(83312,8,1,c[10030]|0);p=c[10030]|0;m=f-k;r=g-k;j=f+k;q=g+k;o=c[774]|0;c[774]=o+1;cf(p|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=r,h[v+24>>3]=j,h[v+32>>3]=q,c[v+40>>2]=o,v)|0);o=c[10030]|0;l=k*2.0;p=c[774]|0;c[774]=p+1;cf(o|0,81472,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=r,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=r,h[v+56>>3]=m,h[v+64>>3]=g,h[v+72>>3]=l,h[v+80>>3]=l,c[v+88>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,80720,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=r,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=q,h[v+56>>3]=j,h[v+64>>3]=g,h[v+72>>3]=l,h[v+80>>3]=l,c[v+88>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+4;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+3,v)|0);i=e;return}else if((b|0)==42){aI(83312,8,1,c[10030]|0);o=c[10030]|0;l=f-k;j=g-k;q=f+k;r=g+k;p=c[774]|0;c[774]=p+1;cf(o|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=l,h[v+16>>3]=j,h[v+24>>3]=q,h[v+32>>3]=r,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=l,h[v+16>>3]=j,h[v+24>>3]=q,h[v+32>>3]=g,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=g,h[v+24>>3]=q,h[v+32>>3]=r,c[v+40>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+4;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+3,v)|0);i=e;return}else if((b|0)==58){aI(83312,8,1,c[10030]|0);r=g+k;q=f+k;j=g-k;l=f-k;p=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=r,h[v+24>>3]=q,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=j,h[v+56>>3]=l,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=r,c[v+88>>2]=p,v)|0);r=k*.5;m=g+r;p=c[774]|0;cf(c[10030]|0,79928,(v=i,i=i+128|0,c[v>>2]=25936,h[v+8>>3]=l,h[v+16>>3]=g,h[v+24>>3]=f,h[v+32>>3]=j,h[v+40>>3]=q,h[v+48>>3]=g,h[v+56>>3]=f+r,h[v+64>>3]=m,h[v+72>>3]=f,h[v+80>>3]=g,h[v+88>>3]=f-r,h[v+96>>3]=m,h[v+104>>3]=l,h[v+112>>3]=g,c[v+120>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==32){aI(83312,8,1,c[10030]|0);p=c[10030]|0;l=g-k;m=f+k;o=c[774]|0;c[774]=o+1;cf(p|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f-k,h[v+16>>3]=l,h[v+24>>3]=m,h[v+32>>3]=g+k,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=l,h[v+24>>3]=m,h[v+32>>3]=g,c[v+40>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==(-1|0)){break}else if((b|0)==13){m=g-k;l=g-k*.25;r=k*.625;q=g+k;p=c[774]|0;cf(c[10030]|0,82080,(v=i,i=i+112|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=m,h[v+24>>3]=f+k,h[v+32>>3]=l,h[v+40>>3]=f+r,h[v+48>>3]=q,h[v+56>>3]=f-r,h[v+64>>3]=q,h[v+72>>3]=f-k,h[v+80>>3]=l,h[v+88>>3]=f,h[v+96>>3]=m,c[v+104>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==24){aI(83312,8,1,c[10030]|0);p=c[10030]|0;m=f-k;l=g-k;q=g+k;o=c[774]|0;c[774]=o+1;cf(p|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=l,h[v+24>>3]=f+k,h[v+32>>3]=q,c[v+40>>2]=o,v)|0);o=c[10030]|0;r=k*2.0;p=c[774]|0;c[774]=p+1;cf(o|0,80616,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=l,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=q,h[v+56>>3]=f,h[v+64>>3]=l,h[v+72>>3]=r,h[v+80>>3]=r,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==62){r=g+k;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=r,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=f-k,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=r,c[v+88>>2]=p,v)|0);c[774]=(c[774]|0)+1;i=e;return}else if((b|0)==53){aI(83312,8,1,c[10030]|0);r=g+k;l=f-k;p=c[774]|0;cf(c[10030]|0,82320,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=r,h[v+24>>3]=f+k,h[v+32>>3]=g,h[v+40>>3]=f,h[v+48>>3]=g-k,h[v+56>>3]=l,h[v+64>>3]=g,h[v+72>>3]=f,h[v+80>>3]=r,c[v+88>>2]=p,v)|0);q=k*.5;p=c[774]|0;cf(c[10030]|0,82216,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=l,h[v+16>>3]=g,h[v+24>>3]=f-q,h[v+32>>3]=g-q,h[v+40>>3]=f+q,h[v+48>>3]=g+q,h[v+56>>3]=f,h[v+64>>3]=r,h[v+72>>3]=l,h[v+80>>3]=g,c[v+88>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+3;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+2,v)|0);i=e;return}else if((b|0)==44){aI(83312,8,1,c[10030]|0);p=c[10030]|0;l=f-k;r=g-k;q=f+k;m=g+k;o=c[774]|0;c[774]=o+1;cf(p|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=l,h[v+16>>3]=r,h[v+24>>3]=q,h[v+32>>3]=m,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=r,h[v+24>>3]=q,h[v+32>>3]=g,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=l,h[v+16>>3]=g,h[v+24>>3]=q,h[v+32>>3]=m,c[v+40>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+4;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+3,v)|0);i=e;return}else if((b|0)==33){aI(83312,8,1,c[10030]|0);o=c[10030]|0;m=f-k;q=g-k;p=c[774]|0;c[774]=p+1;cf(o|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=q,h[v+24>>3]=f+k,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=m,h[v+16>>3]=q,h[v+24>>3]=f,h[v+32>>3]=g,c[v+40>>2]=o,v)|0);o=c[774]|0;p=c[10030]|0;c[774]=o+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=o+2,v)|0);i=e;return}else if((b|0)==36){aI(83312,8,1,c[10030]|0);o=c[10030]|0;q=f-k;m=g-k;l=f+k;r=g+k;p=c[774]|0;c[774]=p+1;cf(o|0,82960,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=m,h[v+24>>3]=l,h[v+32>>3]=r,c[v+40>>2]=p,v)|0);p=c[10030]|0;o=c[774]|0;c[774]=o+1;cf(p|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=m,h[v+24>>3]=l,h[v+32>>3]=g,c[v+40>>2]=o,v)|0);o=c[10030]|0;p=c[774]|0;c[774]=p+1;cf(o|0,82880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=q,h[v+16>>3]=g,h[v+24>>3]=f,h[v+32>>3]=r,c[v+40>>2]=p,v)|0);p=c[774]|0;o=c[10030]|0;c[774]=p+4;cf(o|0,83632,(v=i,i=i+8|0,c[v>>2]=p+3,v)|0);i=e;return}else if((b|0)==16){aI(83312,8,1,c[10030]|0);b=c[10030]|0;r=f-k;q=g-k;l=f+k;p=c[774]|0;c[774]=p+1;cf(b|0,82792,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=r,h[v+16>>3]=q,h[v+24>>3]=l,h[v+32>>3]=g+k,c[v+40>>2]=p,v)|0);p=c[10030]|0;m=k*2.0;b=c[774]|0;c[774]=b+1;cf(p|0,81608,(v=i,i=i+96|0,c[v>>2]=25936,h[v+8>>3]=r,h[v+16>>3]=q,h[v+24>>3]=f,h[v+32>>3]=g,h[v+40>>3]=l,h[v+48>>3]=g,h[v+56>>3]=f,h[v+64>>3]=q,h[v+72>>3]=m,h[v+80>>3]=m,c[v+88>>2]=b,v)|0);b=c[774]|0;p=c[10030]|0;c[774]=b+3;cf(p|0,83632,(v=i,i=i+8|0,c[v>>2]=b+2,v)|0);i=e;return}else{i=e;return}}}while(0);d=c[10030]|0;b=c[774]|0;c[774]=b+1;cf(d|0,83880,(v=i,i=i+48|0,c[v>>2]=25936,h[v+8>>3]=f,h[v+16>>3]=g,h[v+24>>3]=f+1.0,h[v+32>>3]=g+1.0,c[v+40>>2]=b,v)|0);i=e;return}function qG(a){a=+a;return}function qH(a){a=a|0;return 0}function qI(){return}function qJ(){return}function qK(){return}function qL(a){a=+a;h[6448]=a<0.0?1.0:a;return}function qM(a,b){a=a|0;b=b|0;c[1082]=a;c[1080]=1e3-b;return}function qN(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0;f=i;tt();g=c[514]|0;h=g+d|0;d=c[512]|0;j=d-e|0;e=c[768]|0;k=c[774]|0;l=c[770]|0;cf(c[10030]|0,83952,(v=i,i=i+72|0,c[v>>2]=25936,c[v+8>>2]=2,c[v+16>>2]=g+a,c[v+24>>2]=d-b,c[v+32>>2]=h,c[v+40>>2]=j,c[v+48>>2]=e,c[v+56>>2]=k,c[v+64>>2]=l,v)|0);c[774]=(c[774]|0)+1;c[554]=h;c[552]=j;i=f;return}function qO(b){b=b|0;var d=0,e=0,f=0;d=i;if((b|0)==0){e=18229}else{if((a[b]|0)==0){e=18229}else{f=b}}if((e|0)==18229){f=25424}e=bk(f|0,148464)|0;if((e|0)>0){uF(25680,f|0,e|0);a[e+25680|0]=0}ca(f+(e+1|0)|0,21e4,(v=i,i=i+8|0,c[v>>2]=3112,v)|0);i=d;return 1}function qP(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0;g=i;i=i+48|0;h=g|0;c[h>>2]=b;c[h+4>>2]=d;j=e+b|0;c[h+12>>2]=j;c[h+16>>2]=d;c[h+24>>2]=j;j=f+d|0;c[h+28>>2]=j;c[h+36>>2]=b;c[h+40>>2]=j;c[h+8>>2]=a;qR(4,h|0);i=g;return}function qQ(b){b=b|0;var e=0,f=0,g=0,j=0;e=i;f=c[b>>2]|0;if((f|0)==1){g=c[b+4>>2]|0;tt();if((g|0)>-1){j=((g|0)%10&-1)+2|0}else{j=(g|0)<-2?0:g+2|0}if(a[225792]|0){a[25936]=a[89416]|0;a[25937|0]=a[89417|0]|0;a[25938|0]=a[89418|0]|0;a[25939|0]=a[89419|0]|0;a[25940|0]=a[89420|0]|0;a[25941|0]=a[89421|0]|0;a[26448]=a[28976]|0;a[26449|0]=a[28977|0]|0;a[26450|0]=a[28978|0]|0}else{g=c[28928+(j<<2)>>2]|0;uB(25936,g|0);g=28976+(j*3&-1)|0;a[26448]=a[g]|0;a[26449|0]=a[g+1|0]|0;a[26450|0]=a[g+2|0]|0}c[768]=~~(+h[6448]*+h[6449]*+((c[2112+(j<<2)>>2]|0)>>>0>>>0)+.5);if(!(a[225800]|0)){c[770]=c[2160+(j<<2)>>2];i=e;return}if((j|0)==1){c[770]=5;i=e;return}else{c[770]=0;i=e;return}}else if((f|0)==5){fr(+h[b+8>>3],26448);j=d[26449]|0;g=d[26450]|0;be(25936,84104,(v=i,i=i+24|0,c[v>>2]=d[26448]|0,c[v+8>>2]=j,c[v+16>>2]=g,v)|0);i=e;return}else if((f|0)==3){f=c[b+4>>2]|0;b=f>>>16;a[26448]=b&255;g=f>>>8;a[26449]=g&255;a[26450]=f&255;be(25936,84104,(v=i,i=i+24|0,c[v>>2]=b&255,c[v+8>>2]=g&255,c[v+16>>2]=f&255,v)|0);i=e;return}else{i=e;return}}function qR(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0.0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;f=i;i=i+256|0;g=f|0;h=c[e+8>>2]|0;j=h>>4;k=h&15;if(a[46624]|0){tt()}if((k|0)==4|(k|0)==1){h=g|0;l=+(100-j|0)*.01;do{if(l<0.0){m=0.0}else{if(l<=1.0){m=l;break}m=1.0}}while(0);n=d[26448]|0;o=~~(+(n|0)+m*+(n^255|0));n=d[26449]|0;p=~~(+(n|0)+m*+(n^255|0));n=d[26450]|0;q=~~(+(n|0)+m*+(n^255|0));be(h|0,84104,(v=i,i=i+24|0,c[v>>2]=o,c[v+8>>2]=p,c[v+16>>2]=q,v)|0);r=1}else if((k|0)==0){q=g|0;a[q]=a[84376]|0;a[q+1|0]=a[84377|0]|0;a[q+2|0]=a[84378|0]|0;a[q+3|0]=a[84379|0]|0;a[q+4|0]=a[84380|0]|0;a[q+5|0]=a[84381|0]|0;r=2}else if((k|0)==5|(k|0)==2){k=c[2224+(((j|0)%10&-1)<<2)>>2]|0;uB(g|0,25936);r=k}else{uB(g|0,25936);r=1}cf(c[10030]|0,84328,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=b+1,v)|0);g=e|0;k=e+4|0;j=(c[512]|0)-(c[k>>2]|0)|0;cf(c[10030]|0,84280,(v=i,i=i+16|0,c[v>>2]=(c[514]|0)+(c[g>>2]|0),c[v+8>>2]=j,v)|0);j=c[10030]|0;if((b|0)>1){s=1;t=j}else{u=j;w=c[g>>2]|0;x=c[514]|0;y=x+w|0;z=c[512]|0;A=c[k>>2]|0;B=z-A|0;C=cf(u|0,84160,(v=i,i=i+16|0,c[v>>2]=y,c[v+8>>2]=B,v)|0)|0;D=c[10030]|0;E=c[774]|0;F=cf(D|0,84120,(v=i,i=i+16|0,c[v>>2]=r,c[v+8>>2]=E,v)|0)|0;G=c[774]|0;H=G+1|0;c[774]=H;i=f;return}while(1){j=(c[512]|0)-(c[e+(s*12&-1)+4>>2]|0)|0;cf(t|0,84280,(v=i,i=i+16|0,c[v>>2]=(c[514]|0)+(c[e+(s*12&-1)>>2]|0),c[v+8>>2]=j,v)|0);j=s+1|0;if((j&7|0)==0){q=c[10030]|0;aI(84248,2,1,q|0)}q=c[10030]|0;if((j|0)<(b|0)){s=j;t=q}else{u=q;break}}w=c[g>>2]|0;x=c[514]|0;y=x+w|0;z=c[512]|0;A=c[k>>2]|0;B=z-A|0;C=cf(u|0,84160,(v=i,i=i+16|0,c[v>>2]=y,c[v+8>>2]=B,v)|0)|0;D=c[10030]|0;E=c[774]|0;F=cf(D|0,84120,(v=i,i=i+16|0,c[v>>2]=r,c[v+8>>2]=E,v)|0)|0;G=c[774]|0;H=G+1|0;c[774]=H;i=f;return}function qS(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;b=i;a[4304]=0;a[4336]=0;d=c[13898]|0;e=c[8272]|0;L24421:do{if((d|0)<(e|0)){f=c[1054]|0;g=d;h=0;j=0;while(1){k=(a[f+(g*40&-1)|0]&1)==0;L24425:do{if(!k){l=c[f+(g*40&-1)+36>>2]|0;m=f+(g*40&-1)+32|0;n=c[10036]|0;o=0;while(1){if((o|0)>=(l|0)){break}if((a[n+((c[m>>2]|0)+o|0)|0]|0)==(a[o+103664|0]|0)){o=o+1|0}else{break L24425}}if((o|0)==1){p=h;q=j;break L24421}}}while(0);m=c[56574]|0;L24432:do{if((m|0)==0){r=226296}else{n=c[f+(g*40&-1)+36>>2]|0;l=c[f+(g*40&-1)+32>>2]|0;s=(n|0)>0;t=c[10036]|0;u=226296;w=m;while(1){L24436:do{if(!k){if(s){x=0;y=0;z=l;while(1){A=a[w+x|0]|0;if(A<<24>>24==(a[t+(x+z|0)|0]|0)){B=z;C=y}else{if(A<<24>>24!=36){break L24436}B=z-1|0;C=1}D=x+1|0;if((D|0)<(C+n|0)){x=D;y=C;z=B}else{break}}if((C|0)==0){E=D}else{r=u;break L24432}}else{E=0}z=a[w+E|0]|0;if((z<<24>>24|0)==36|(z<<24>>24|0)==0){r=u;break L24432}}}while(0);z=u+8|0;y=c[z>>2]|0;if((y|0)==0){r=z;break}else{u=z;w=y}}}}while(0);k=c[r+4>>2]|0;if((k|0)==0){a[4304]=1;m=g+1|0;c[13898]=m;F=1;G=j;H=m}else if((k|0)==1){a[4336]=1;k=g+1|0;c[13898]=k;F=h;G=1;H=k}else{k=g+1|0;c[13898]=k;F=h;G=j;H=k}if((H|0)<(e|0)){g=H;h=F;j=G}else{p=F;q=G;break}}}else{p=0;q=0}}while(0);be(13048,84616,(v=i,i=i+16|0,c[v>>2]=p?84608:179864,c[v+8>>2]=q?84576:179864,v)|0);i=b;return}function qT(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0;b=i;d=c[10030]|0;if(a[4304]|0){aI(87648,3,1,d|0);if((a[37384]&1)!=0){e=c[10030]|0;f=aD(e|0)|0;i=b;return}g=c[10030]|0;aI(87560,23,1,g|0);g=c[10030]|0;j=c[7938]|0;k=c[7939]|0;l=1e3-(c[7941]|0)|0;m=1e3-(c[7940]|0)|0;cf(g|0,87528,(v=i,i=i+32|0,c[v>>2]=j,c[v+8>>2]=k,c[v+16>>2]=l,c[v+24>>2]=m,v)|0);m=c[10030]|0;aI(87648,3,1,m|0);m=c[10030]|0;aI(87440,25,1,m|0);m=c[10030]|0;n=+h[8255];o=+h[8256];p=+h[8169];q=+h[8170];r=+h[8599];s=+h[8600];t=+h[8513];u=+h[8514];cf(m|0,87360,(v=i,i=i+64|0,h[v>>3]=n,h[v+8>>3]=o,h[v+16>>3]=p,h[v+24>>3]=q,h[v+32>>3]=r,h[v+40>>3]=s,h[v+48>>3]=t,h[v+56>>3]=u,v)|0);m=c[10030]|0;aI(87648,3,1,m|0);if(!(a[4336]|0)){e=c[10030]|0;f=aD(e|0)|0;i=b;return}m=c[10030]|0;aI(87336,17,1,m|0);m=c[10030]|0;aI(87136,88,1,m|0);m=c[10030]|0;aI(87072,41,1,m|0);m=c[10030]|0;aI(86960,43,1,m|0);m=c[10030]|0;aI(86840,107,1,m|0);m=c[10030]|0;aI(86816,9,1,m|0);m=c[10030]|0;aI(86600,72,1,m|0);m=c[10030]|0;aI(86520,72,1,m|0);m=c[10030]|0;aI(86384,72,1,m|0);m=c[10030]|0;aI(86248,72,1,m|0);m=c[10030]|0;aI(86232,11,1,m|0);m=c[10030]|0;aI(86144,2,1,m|0);m=c[10030]|0;aI(87648,3,1,m|0);e=c[10030]|0;f=aD(e|0)|0;i=b;return}else{aI(86144,2,1,d|0);if((a[37384]&1)!=0){e=c[10030]|0;f=aD(e|0)|0;i=b;return}d=c[10030]|0;aI(86024,27,1,d|0);d=c[10030]|0;m=c[7938]|0;l=c[7939]|0;k=1e3-(c[7941]|0)|0;j=1e3-(c[7940]|0)|0;cf(d|0,85936,(v=i,i=i+32|0,c[v>>2]=m,c[v+8>>2]=l,c[v+16>>2]=k,c[v+24>>2]=j,v)|0);j=c[10030]|0;aI(86144,2,1,j|0);j=c[10030]|0;aI(85896,29,1,j|0);j=c[10030]|0;u=+h[8255];t=+h[8256];s=+h[8169];r=+h[8170];q=+h[8599];p=+h[8600];o=+h[8513];n=+h[8514];cf(j|0,85856,(v=i,i=i+64|0,h[v>>3]=u,h[v+8>>3]=t,h[v+16>>3]=s,h[v+24>>3]=r,h[v+32>>3]=q,h[v+40>>3]=p,h[v+48>>3]=o,h[v+56>>3]=n,v)|0);j=c[10030]|0;aI(86144,2,1,j|0);if(!(a[4336]|0)){e=c[10030]|0;f=aD(e|0)|0;i=b;return}j=c[10030]|0;aI(85712,72,1,j|0);j=c[10030]|0;aI(85648,60,1,j|0);j=c[10030]|0;aI(85552,35,1,j|0);j=c[10030]|0;aI(85408,94,1,j|0);j=c[10030]|0;aI(86816,9,1,j|0);j=c[10030]|0;aI(85232,103,1,j|0);j=c[10030]|0;aI(84968,103,1,j|0);j=c[10030]|0;aI(84840,103,1,j|0);j=c[10030]|0;aI(84632,81,1,j|0);j=c[10030]|0;aI(86144,2,1,j|0);j=c[10030]|0;aI(86144,2,1,j|0);e=c[10030]|0;f=aD(e|0)|0;i=b;return}}function qU(){var b=0;b=c[10030]|0;if(a[4304]|0){aI(87976|0,314,1,b|0)}else{aI(87656|0,305,1,b|0)}c[1094]=0;c[1080]=0;c[1082]=0;return}function qV(a){a=a|0;c[1094]=(a|0)<-2?0:a+2&7;return}function qW(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0.0,q=0.0,r=0,s=0,t=0,u=0.0,w=0.0,x=0,y=0.0,z=0,A=0,B=0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0,Q=0,S=0,T=0.0,U=0.0,V=0.0,W=0,X=0,Y=0,Z=0.0,_=0.0,$=0.0,aa=0.0,ab=0.0,ac=0.0,ad=0.0,ae=0.0,af=0.0,ag=0.0,ah=0.0,ai=0.0;e=i;do{if(a[4336]|0){if((a[37384]&1)!=0){break}f=c[10030]|0;if(a[4304]|0){aI(89232,11,1,f|0);break}else{aI(89104,12,1,f|0);break}}}while(0);f=1e3-d|0;g=c[10030]|0;j=c[1082]|0;k=c[1080]|0;l=c[4344+(c[1094]<<2)>>2]|0;m=+h[539];if(a[4304]|0){cf(g|0,88928,(v=i,i=i+48|0,c[v>>2]=j,c[v+8>>2]=k,c[v+16>>2]=b,c[v+24>>2]=f,c[v+32>>2]=l,h[v+40>>3]=m,v)|0)}else{cf(g|0,88712,(v=i,i=i+48|0,c[v>>2]=j,c[v+8>>2]=k,c[v+16>>2]=b,c[v+24>>2]=f,c[v+32>>2]=l,h[v+40>>3]=m,v)|0)}do{if(a[4336]|0){if((a[37384]&1)!=0){break}l=c[10030]|0;k=a[66164]&1;j=k<<24>>24!=0;if(a[4304]|0){if(j){m=+h[8255];g=c[1082]|0;n=c[7938]|0;o=c[7939]|0;p=+h[8256];q=+R(+(+h[8271]),+(m+ +(g-n|0)/+(o-n|0)*(p-m)));r=g;s=n;t=o;u=m;w=p}else{p=+h[8255];o=c[1082]|0;n=c[7938]|0;g=c[7939]|0;m=+h[8256];q=p+ +(o-n|0)/+(g-n|0)*(m-p);r=o;s=n;t=g;u=p;w=m}g=(a[65476]&1)==0;if(g){m=+h[8169];n=c[1080]|0;o=c[7940]|0;x=c[7941]|0;p=+h[8170];y=m+ +((1e3-n|0)-o|0)/+(x-o|0)*(p-m);z=n;A=o;B=x;C=m;D=p}else{p=+h[8169];x=c[1080]|0;o=c[7940]|0;n=c[7941]|0;m=+h[8170];y=+R(+(+h[8185]),+(p+ +((1e3-x|0)-o|0)/+(n-o|0)*(m-p)));z=x;A=o;B=n;C=p;D=m}n=(a[68916]&1)==0;if(n){m=+h[8599];p=+h[8600];E=m+ +(r-s|0)/+(t-s|0)*(p-m);F=m;G=p}else{p=+h[8599];m=+h[8600];E=+R(+(+h[8615]),+(p+ +(r-s|0)/+(t-s|0)*(m-p)));F=p;G=m}o=(a[68228]&1)==0;if(o){m=+h[8513];p=+h[8514];H=m+ +((1e3-z|0)-A|0)/+(B-A|0)*(p-m);I=m;J=p}else{p=+h[8513];m=+h[8514];H=+R(+(+h[8529]),+(p+ +((1e3-z|0)-A|0)/+(B-A|0)*(m-p)));I=p;J=m}if(k<<24>>24==0){K=u+ +((b-s|0)>>>0>>>0)/+(t-s|0)*(w-u)}else{K=+R(+(+h[8271]),+(u+ +((b-s|0)>>>0>>>0)/+(t-s|0)*(w-u)))}if(g){L=C+ +((d-A|0)>>>0>>>0)/+(B-A|0)*(D-C)}else{L=+R(+(+h[8185]),+(C+ +((d-A|0)>>>0>>>0)/+(B-A|0)*(D-C)))}if(n){M=F+ +((b-s|0)>>>0>>>0)/+(t-s|0)*(G-F)}else{M=+R(+(+h[8615]),+(F+ +((b-s|0)>>>0>>>0)/+(t-s|0)*(G-F)))}if(o){N=I+ +((d-A|0)>>>0>>>0)/+(B-A|0)*(J-I)}else{N=+R(+(+h[8529]),+(I+ +((d-A|0)>>>0>>>0)/+(B-A|0)*(J-I)))}cf(l|0,88632,(v=i,i=i+64|0,h[v>>3]=q,h[v+8>>3]=y,h[v+16>>3]=E,h[v+24>>3]=H,h[v+32>>3]=K,h[v+40>>3]=L,h[v+48>>3]=M,h[v+56>>3]=N,v)|0);o=c[10030]|0;if((a[66164]&1)==0){aI(88544,4,1,o|0)}else{m=+h[8255];n=c[7938]|0;p=+R(+(+h[8271]),+(m+(+(((c[1082]|0)+b|0)>>>0>>>0)*.5- +(n|0))/+((c[7939]|0)-n|0)*(+h[8256]-m)));cf(o|0,88624,(v=i,i=i+8|0,h[v>>3]=p,v)|0)}o=c[10030]|0;if((a[65476]&1)==0){aI(88544,4,1,o|0)}else{p=+h[8169];n=c[7940]|0;m=+R(+(+h[8185]),+(p+(1.0e3- +(((c[1080]|0)+f|0)>>>0>>>0)*.5- +(n|0))/+((c[7941]|0)-n|0)*(+h[8170]-p)));cf(o|0,88624,(v=i,i=i+8|0,h[v>>3]=m,v)|0)}o=c[10030]|0;if((a[68916]&1)==0){aI(88544,4,1,o|0)}else{m=+h[8599];n=c[7938]|0;p=+R(+(+h[8615]),+(m+(+(((c[1082]|0)+b|0)>>>0>>>0)*.5- +(n|0))/+((c[7939]|0)-n|0)*(+h[8600]-m)));cf(o|0,88624,(v=i,i=i+8|0,h[v>>3]=p,v)|0)}o=c[10030]|0;if((a[68228]&1)==0){aI(88528,3,1,o|0)}else{p=+h[8513];n=c[7940]|0;m=+R(+(+h[8529]),+(p+(1.0e3- +(((c[1080]|0)+f|0)>>>0>>>0)*.5- +(n|0))/+((c[7941]|0)-n|0)*(+h[8514]-p)));cf(o|0,88536,(v=i,i=i+8|0,h[v>>3]=m,v)|0)}o=c[10030]|0;aI(88480,4,1,o|0);c[1082]=b;c[1080]=f;i=e;return}else{if(j){m=+h[8255];j=c[1082]|0;o=c[7938]|0;n=c[7939]|0;p=+h[8256];O=+R(+(+h[8271]),+(m+ +(j-o|0)/+(n-o|0)*(p-m)));P=j;Q=o;S=n;T=m;U=p}else{p=+h[8255];n=c[1082]|0;o=c[7938]|0;j=c[7939]|0;m=+h[8256];O=p+ +(n-o|0)/+(j-o|0)*(m-p);P=n;Q=o;S=j;T=p;U=m}j=(a[65476]&1)==0;if(j){m=+h[8169];o=c[1080]|0;n=c[7940]|0;g=c[7941]|0;p=+h[8170];V=m+ +((1e3-o|0)-n|0)/+(g-n|0)*(p-m);W=o;X=n;Y=g;Z=m;_=p}else{p=+h[8169];g=c[1080]|0;n=c[7940]|0;o=c[7941]|0;m=+h[8170];V=+R(+(+h[8185]),+(p+ +((1e3-g|0)-n|0)/+(o-n|0)*(m-p)));W=g;X=n;Y=o;Z=p;_=m}o=(a[68916]&1)==0;if(o){m=+h[8599];p=+h[8600];$=m+ +(P-Q|0)/+(S-Q|0)*(p-m);aa=m;ab=p}else{p=+h[8599];m=+h[8600];$=+R(+(+h[8615]),+(p+ +(P-Q|0)/+(S-Q|0)*(m-p)));aa=p;ab=m}n=(a[68228]&1)==0;if(n){m=+h[8513];p=+h[8514];ac=m+ +((1e3-W|0)-X|0)/+(Y-X|0)*(p-m);ad=m;ae=p}else{p=+h[8513];m=+h[8514];ac=+R(+(+h[8529]),+(p+ +((1e3-W|0)-X|0)/+(Y-X|0)*(m-p)));ad=p;ae=m}if(k<<24>>24==0){af=T+ +((b-Q|0)>>>0>>>0)/+(S-Q|0)*(U-T)}else{af=+R(+(+h[8271]),+(T+ +((b-Q|0)>>>0>>>0)/+(S-Q|0)*(U-T)))}if(j){ag=Z+ +((d-X|0)>>>0>>>0)/+(Y-X|0)*(_-Z)}else{ag=+R(+(+h[8185]),+(Z+ +((d-X|0)>>>0>>>0)/+(Y-X|0)*(_-Z)))}if(o){ah=aa+ +((b-Q|0)>>>0>>>0)/+(S-Q|0)*(ab-aa)}else{ah=+R(+(+h[8615]),+(aa+ +((b-Q|0)>>>0>>>0)/+(S-Q|0)*(ab-aa)))}if(n){ai=ad+ +((d-X|0)>>>0>>>0)/+(Y-X|0)*(ae-ad)}else{ai=+R(+(+h[8529]),+(ad+ +((d-X|0)>>>0>>>0)/+(Y-X|0)*(ae-ad)))}cf(l|0,88424,(v=i,i=i+64|0,h[v>>3]=O,h[v+8>>3]=V,h[v+16>>3]=$,h[v+24>>3]=ac,h[v+32>>3]=af,h[v+40>>3]=ag,h[v+48>>3]=ah,h[v+56>>3]=ai,v)|0);l=c[10030]|0;if((a[66164]&1)==0){aI(88384,3,1,l|0)}else{m=+h[8255];n=c[7938]|0;p=+R(+(+h[8271]),+(m+(+(((c[1082]|0)+b|0)>>>0>>>0)*.5- +(n|0))/+((c[7939]|0)-n|0)*(+h[8256]-m)));cf(l|0,88536,(v=i,i=i+8|0,h[v>>3]=p,v)|0)}l=c[10030]|0;if((a[65476]&1)==0){aI(88384,3,1,l|0)}else{p=+h[8169];n=c[7940]|0;m=+R(+(+h[8185]),+(p+(1.0e3- +(((c[1080]|0)+f|0)>>>0>>>0)*.5- +(n|0))/+((c[7941]|0)-n|0)*(+h[8170]-p)));cf(l|0,88536,(v=i,i=i+8|0,h[v>>3]=m,v)|0)}l=c[10030]|0;if((a[68916]&1)==0){aI(88384,3,1,l|0)}else{m=+h[8599];n=c[7938]|0;p=+R(+(+h[8615]),+(m+(+(((c[1082]|0)+b|0)>>>0>>>0)*.5- +(n|0))/+((c[7939]|0)-n|0)*(+h[8600]-m)));cf(l|0,88536,(v=i,i=i+8|0,h[v>>3]=p,v)|0)}l=c[10030]|0;if((a[68228]&1)==0){aI(88384,3,1,l|0)}else{p=+h[8513];n=c[7940]|0;m=+R(+(+h[8529]),+(p+(1.0e3- +(((c[1080]|0)+f|0)>>>0>>>0)*.5- +(n|0))/+((c[7941]|0)-n|0)*(+h[8514]-p)));cf(l|0,88536,(v=i,i=i+8|0,h[v>>3]=m,v)|0)}l=c[10030]|0;aI(88360,2,1,l|0);c[1082]=b;c[1080]=f;i=e;return}}}while(0);if(!(a[4304]|0)){c[1082]=b;c[1080]=f;i=e;return}aI(125976,2,1,c[10030]|0);c[1082]=b;c[1080]=f;i=e;return}function qX(a){a=+a;h[539]=a;return}function qY(){c[58300]=0;c[58302]=0;a[233344]=0;return}function qZ(c){c=c|0;var d=0;if((c|0)==1){a[4384]=a[89896]|0;a[4385|0]=a[89897|0]|0;a[4386|0]=a[89898|0]|0;a[4387|0]=a[89899|0]|0;a[4388|0]=a[89900|0]|0;a[4389|0]=a[89901|0]|0;a[4390|0]=a[89902|0]|0;d=1;return d|0}else if((c|0)==0){b[2192]=119;d=1;return d|0}else if((c|0)==2){b[2192]=101;d=1;return d|0}else{b[2192]=119;d=0;return d|0}return 0}function q_(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+8|0;e=d|0;do{if((b|0)!=0){if((a[b]|0)==0){break}c[e>>2]=0;f=bk(b|0,148464)|0;g=f+1|0;h=ut(g)|0;if((h|0)==0){j=0;i=d;return j|0}uF(h|0,b|0,f|0);a[h+f|0]=0;if(f>>>0<(uA(b|0)|0)>>>0){f=b+g|0;ca(f|0,21e4,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}f=c[10030]|0;if(a[4304]|0){cf(f|0,90232,(v=i,i=i+8|0,c[v>>2]=h,v)|0);g=c[e>>2]|0;if((g|0)!=0){k=c[10030]|0;cf(k|0,90144,(v=i,i=i+8|0,c[v>>2]=g,v)|0)}g=c[10030]|0;aI(90072,5,1,g|0)}else{cf(f|0,90024,(v=i,i=i+8|0,c[v>>2]=h,v)|0);f=c[e>>2]|0;if((f|0)!=0){g=c[10030]|0;cf(g|0,90008,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}f=c[10030]|0;aI(89968,2,1,f|0)}uu(h);j=1;i=d;return j|0}}while(0);e=c[10030]|0;if(a[4304]|0){aI(90408,13,1,e|0);j=1;i=d;return j|0}else{aI(90384,20,1,e|0);j=1;i=d;return j|0}return 0}function q$(){var b=0;b=i;a[45024]=0;c[58300]=0;c[58302]=0;cf(c[10030]|0,90952,(v=i,i=i+8|0,h[v>>3]=.24089999999999998,v)|0);q9(-1);g[58284]=0.0;i=b;return}function q0(){var b=0,d=0,e=0,f=0;b=i;s7(2,0.0,0.0,0.0,0.0);if((a[233336]&1)!=0){d=c[10030]|0;e=c[58302]|0;f=c[58300]|0;cf(d|0,99e3,(v=i,i=i+24|0,c[v>>2]=e,c[v+8>>2]=f,c[v+16>>2]=100896,v)|0)}a[233336]=0;aI(99040,14,1,c[10030]|0);c[58300]=0;c[58302]=0;a[233344]=0;i=b;return}function q1(){var b=0,d=0,e=0;b=i;if(!(a[35312]|0)){c[(c[3524]|0)+8>>2]=1500;c[(c[3524]|0)+12>>2]=900}d=c[3524]|0;e=~~(+g[38]*+((c[d+12>>2]|0)>>>0>>>0));cf(c[10030]|0,91320,(v=i,i=i+16|0,c[v>>2]=~~(+g[178]*+((c[d+8>>2]|0)>>>0>>>0)),c[v+8>>2]=e,v)|0);if((aY(233408,91216)|0)==0){i=b;return}e=c[58350]|0;cf(c[10030]|0,91112,(v=i,i=i+16|0,c[v>>2]=233408,c[v+8>>2]=e,v)|0);i=b;return}function q2(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;if((a[233336]&1)!=0){f=c[10030]|0;g=c[58302]|0;h=c[58300]|0;cf(f|0,99e3,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=h,c[v+16>>2]=100896,v)|0)}a[233336]=0;c[58302]=b;c[58300]=d;a[233344]=0;i=e;return}function q3(b,d){b=b|0;d=d|0;var e=0,f=0.0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0,E=0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0;e=i;f=+g[58366];if(f==0.0){j=c[58302]|0;k=c[58300]|0;if(!(a[45024]|0)){s6(j,b,k,d);c[58302]=b;c[58300]=d;i=e;return}if(!(a[233344]|0)){l=c[10030]|0;cf(l|0,100208,(v=i,i=i+16|0,c[v>>2]=j,c[v+8>>2]=k,v)|0)}if(!((j|0)==(b|0)&(k|0)==(d|0))){k=c[10030]|0;cf(k|0,100168,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0)}c[58302]=b;c[58300]=d;a[233344]=1;c[58302]=b;c[58300]=d;i=e;return}k=c[58302]|0;j=c[58300]|0;l=a[233344]|0;if(!l){g[58370]=1.0}m=(k|0)==(b|0);do{if(m&(j|0)==(d|0)){if(l){break}n=c[10030]|0;cf(n|0,100920,(v=i,i=i+24|0,c[v>>2]=b,c[v+8>>2]=d,c[v+16>>2]=100896,v)|0)}else{o=f/.24089999999999998;do{if(m){if((d-j|0)>0){p=o;q=0.0;break}p=-0.0-o;q=0.0}else{r=(+(d|0)- +(j|0))/(+(b|0)- +(k|0));s=+(b-k>>31|1|0)*(o/+Q(+(r*r+1.0)));p=r*s;q=s}}while(0);o=1.0- +g[58370];s=+(k|0)+q*o;r=+(d|0);t=+(b|0);do{if(q*(t-s)<0.0){u=-1.0;w=-1.0}else{x=+(j|0)+p*o;y=s;z=-1.0;A=-1.0;n=0;while(1){if(p*(r-x)<0.0){B=z;C=A;D=n;break}E=n+1|0;F=q+y;if(q*(t-F)<0.0){B=y;C=x;D=E;break}else{A=x;x=p+x;z=y;y=F;n=E}}if((D|0)==1){n=c[10030]|0;y=B;z=C;cf(n|0,91472,(v=i,i=i+24|0,h[v>>3]=y,h[v+8>>3]=z,c[v+16>>2]=100896,v)|0);u=C;w=B;break}if((D|0)<=0){u=C;w=B;break}cf(c[10030]|0,91432,(v=i,i=i+48|0,c[v>>2]=k,c[v+8>>2]=j,h[v+16>>3]=q,h[v+24>>3]=p,c[v+32>>2]=D,c[v+40>>2]=100896,v)|0);u=C;w=B}}while(0);if(q!=0.0){if(w<0.0){n=b-k|0;if(q<0.0){G=-0.0-q}else{G=q}g[58370]=+(((n|0)>-1?n:-n|0)|0)/G+ +g[58370];break}s=t-w;if(s<0.0){H=-0.0-s}else{H=s}if(q<0.0){I=-0.0-q}else{I=q}g[58370]=H/I;break}else{if(u<0.0){n=d-j|0;if(p<0.0){J=-0.0-p}else{J=p}g[58370]=+(((n|0)>-1?n:-n|0)|0)/J+ +g[58370];break}s=r-u;if(s<0.0){K=-0.0-s}else{K=s}if(p<0.0){L=-0.0-p}else{L=p}g[58370]=K/L;break}}}while(0);a[233336]=+g[58370]>0.0&1;a[233344]=1;c[58302]=b;c[58300]=d;i=e;return}function q4(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;g=1e3-d|0;if(a[4304]|0){d=c[10030]|0;h=c[4344+(c[1094]<<2)>>2]|0;cf(d|0,89728,(v=i,i=i+40|0,c[v>>2]=b,c[v+8>>2]=g,c[v+16>>2]=e,c[v+24>>2]=h,c[v+32>>2]=4384,v)|0);i=f;return}else{j=0;k=0}while(1){h=a[e+k|0]|0;if((h<<24>>24|0)==0){break}else if((h<<24>>24|0)==91|(h<<24>>24|0)==93){l=j+1|0}else{l=j}j=l+1|0;k=k+1|0}k=j+1|0;j=ut(k)|0;do{if((j|0)==0){gk();l=ut(k)|0;if((l|0)!=0){m=l;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=89696,v)|0)}else{m=j}}while(0);j=0;k=0;while(1){l=e+k|0;h=a[l]|0;if((h<<24>>24|0)==0){break}else if((h<<24>>24|0)==91|(h<<24>>24|0)==93){a[m+j|0]=92;n=j+1|0;o=a[l]|0}else{n=j;o=h}a[m+n|0]=o;j=n+1|0;k=k+1|0}a[m+j|0]=0;j=c[4344+(c[1094]<<2)>>2]|0;cf(c[10030]|0,89472,(v=i,i=i+40|0,c[v>>2]=b,c[v+8>>2]=g,c[v+16>>2]=m,c[v+24>>2]=j,c[v+32>>2]=4384,v)|0);uu(m);i=f;return}function q5(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0.0,J=0.0,K=0.0;b=i;i=i+40|0;d=b|0;e=b+24|0;f=b+32|0;a[35312]=0;j=c[13898]|0;L24745:do{if((j|0)<(c[8272]|0)){k=d|0;l=d+8|0;m=j;while(1){n=c[1054]|0;o=(a[n+(m*40&-1)|0]&1)==0;L24749:do{if(!o){p=c[n+(m*40&-1)+36>>2]|0;q=n+(m*40&-1)+32|0;r=c[10036]|0;s=0;while(1){if((s|0)>=(p|0)){break}if((a[r+((c[q>>2]|0)+s|0)|0]|0)==(a[s+103664|0]|0)){s=s+1|0}else{break L24749}}if((s|0)==1){break L24745}}}while(0);q=c[58320]|0;L24756:do{if((q|0)==0){t=233280}else{r=c[n+(m*40&-1)+36>>2]|0;p=c[n+(m*40&-1)+32>>2]|0;u=(r|0)>0;x=c[10036]|0;y=233280;z=q;while(1){L24760:do{if(!o){if(u){A=0;B=0;C=p;while(1){D=a[z+A|0]|0;if(D<<24>>24==(a[x+(A+C|0)|0]|0)){E=C;F=B}else{if(D<<24>>24!=36){break L24760}E=C-1|0;F=1}G=A+1|0;if((G|0)<(F+r|0)){A=G;B=F;C=E}else{break}}if((F|0)==0){H=G}else{t=y;break L24756}}else{H=0}C=a[z+H|0]|0;if((C<<24>>24|0)==36|(C<<24>>24|0)==0){t=y;break L24756}}}while(0);C=y+8|0;B=c[C>>2]|0;if((B|0)==0){t=C;break}else{y=C;z=B}}}}while(0);o=c[t+4>>2]|0;if((o|0)==5){a[35288]=0;c[13898]=m+1}else if((o|0)==2){c[58352]=6516580;c[13898]=m+1}else if((o|0)==4){a[35288]=1;c[13898]=m+1}else if((o|0)==1){c[58352]=7499107;c[13898]=m+1}else if((o|0)==0){a[233408]=a[90944]|0;a[233409|0]=a[90945|0]|0;a[233410|0]=a[90946|0]|0;a[233411|0]=a[90947|0]|0;a[233412|0]=a[90948|0]|0;c[13898]=m+1}else if((o|0)==3){g[e>>2]=5.0;g[f>>2]=3.0;c[13898]=m+1;a[35312]=1;c[8826]=s4(e,f,1)|0;c[(c[3524]|0)+8>>2]=~~(+g[e>>2]*300.0/72.0);c[(c[3524]|0)+12>>2]=~~(+g[f>>2]*300.0/72.0)}else{o=is(d)|0;q=c[o>>2]|0;if((q|0)==3){I=+uz(c[o+8>>2]|0,0)}else if((q|0)==1){I=+(c[o+8>>2]|0)}else if((q|0)==2){I=+h[o+8>>3]}else{break}if((c[k>>2]|0)==3){uu(c[l>>2]|0);c[k>>2]=1}c[58350]=~~I}m=c[13898]|0;if((m|0)>=(c[8272]|0)){break L24745}}uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);c[(c[3524]|0)+16>>2]=((c[58350]|0)*300&-1|0)/72&-1;c[(c[3524]|0)+20>>2]=((c[58350]|0)*300&-1|0)/144&-1;if((aY(233408,91216)|0)==0){uF(13048,90848,1024)}else{d=(a[233410]|0)==116?90800:90792;f=c[58350]|0;be(13048,90816,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=f,v)|0)}do{if(a[35312]|0){f=(c[8826]|0)==2;d=13048+(uA(13048)|0)|0;e=c[3524]|0;I=+((c[e+8>>2]|0)>>>0>>>0);if(f){J=I*2.54/300.0;K=+((c[e+12>>2]|0)>>>0>>>0)*2.54/300.0;be(d|0,90672,(v=i,i=i+16|0,h[v>>3]=J,h[v+8>>3]=K,v)|0);break}else{K=I/300.0;I=+((c[e+12>>2]|0)>>>0>>>0)/300.0;be(d|0,90632,(v=i,i=i+16|0,h[v>>3]=K,h[v+8>>3]=I,v)|0);break}}}while(0);d=a[35288]|0;e=13048+(uA(13048)|0)|0;if(d){d=e;f=d|0;w=1953460768;a[f]=w&255;w=w>>8;a[f+1|0]=w&255;w=w>>8;a[f+2|0]=w&255;w=w>>8;a[f+3|0]=w&255;f=d+4|0;w=6648929;a[f]=w&255;w=w>>8;a[f+1|0]=w&255;w=w>>8;a[f+2|0]=w&255;w=w>>8;a[f+3|0]=w&255;i=b;return}else{uD(e|0,90568,10);i=b;return}}function q6(a){a=a|0;c[8830]=a;return 1}function q7(a){a=a|0;c[8824]=a;return 1}function q8(){a[45024]=0;c[58300]=0;c[58302]=0;return}function q9(b){b=b|0;var d=0,e=0,f=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0;d=i;if((b|0)>5){e=(b|0)%6&-1}else{e=b}if(!(a[45024]|0)){s7(2,0.0,0.0,0.0,0.0)}if((a[233336]&1)!=0){b=c[10030]|0;f=c[58302]|0;j=c[58300]|0;cf(b|0,99e3,(v=i,i=i+24|0,c[v>>2]=f,c[v+8>>2]=j,c[v+16>>2]=100896,v)|0)}a[233336]=0;j=(e|0)>-1;if(j){k=+g[233352+(e<<3)>>2]}else{k=.4000000059604645}do{if(k!=+g[58284]){f=c[10030]|0;l=k*-.5;m=k;cf(f|0,91544,(v=i,i=i+24|0,h[v>>3]=l,h[v+8>>3]=m,h[v+16>>3]=m,v)|0);if(!(a[45024]|0)){n=m;break}f=c[10030]|0;cf(f|0,91496,(v=i,i=i+8|0,h[v>>3]=m,v)|0);n=m}else{n=k}}while(0);g[58284]=k;g[58368]=n/.24089999999999998;if(!j){o=0.0;g[58366]=o;a[233344]=0;i=d;return}o=+g[233356+(e<<3)>>2];g[58366]=o;a[233344]=0;i=d;return}function ra(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;g=a[e]|0;if(g<<24>>24==0){i=f;return}if(a[35288]|0){h=0}else{j=0;k=g;while(1){g=j+1|0;if(k<<24>>24==92){l=j+2|0;m=(a[e+g|0]|0)==92}else{l=g;m=0}g=a[e+l|0]|0;if(g<<24>>24==0|m){h=m;break}else{j=l;k=g}}}cf(c[10030]|0,99752,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);d=c[8830]|0;if(a[35288]&(d|0)!=0){b=c[10030]|0;cf(b|0,91600,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}d=a[e]|0;do{if((d<<24>>24|0)==123|(d<<24>>24|0)==91){b=c[10030]|0;cf(b|0,99720,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}else{b=c[10030]|0;k=c[233184+(c[8824]<<2)>>2]|0;if(h){cf(b|0,99536,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=e,v)|0);break}else{cf(b|0,99696,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=e,v)|0);break}}}while(0);if(!(a[35288]&(c[8830]|0)!=0)){i=f;return}aF(125,c[10030]|0);i=f;return}function rb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;if((a[233336]&1)!=0){g=c[10030]|0;h=c[58302]|0;j=c[58300]|0;cf(g|0,99e3,(v=i,i=i+24|0,c[v>>2]=h,c[v+8>>2]=j,c[v+16>>2]=100896,v)|0)}a[233336]=0;c[58302]=b;c[58300]=d;a[233344]=0;if((e|0)<0){k=92632}else{k=c[233216+(((e|0)%15&-1)<<2)>>2]|0}cf(c[10030]|0,99e3,(v=i,i=i+24|0,c[v>>2]=b,c[v+8>>2]=d,c[v+16>>2]=k,v)|0);i=f;return}function rc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;s5(a,b,d,e,1,f);c[58302]=d;c[58300]=e;return}function rd(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0;g=i;j=a&15;do{if((j|0)==1){if((a>>4|0)>=50){break}i=g;return}else if((j|0)==0){i=g;return}else if((j|0)==2){if((a&16|0)!=0){break}i=g;return}}while(0);cf(c[10030]|0,92704,(v=i,i=i+32|0,c[v>>2]=b,c[v+8>>2]=d,h[v+16>>3]=+(e>>>0>>>0)*.24089999999999998,h[v+24>>3]=+(f>>>0>>>0)*.24089999999999998,v)|0);i=g;return}function re(){var b=0;b=i;a[45024]=1;c[58300]=0;c[58302]=0;cf(c[10030]|0,92776,(v=i,i=i+8|0,h[v>>3]=.24089999999999998,v)|0);q9(-1);i=b;return}function rf(){aI(99040,14,1,c[10030]|0);return}function rg(){var b=0,d=0,e=0;b=i;d=c[c[7118]>>2]|0;do{if((d|0)==1){e=c[10030]|0;aI(93200,35,1,e|0)}else if((d|0)==0){aI(93096,39,1,c[10030]|0)}else if((d|0)==2){pD();e=c[10030]|0;if((e|0)==0){break}cf(e|0,93272,(v=i,i=i+8|0,c[v>>2]=c[7112],v)|0);if((a[(c[7118]|0)+113|0]&1)==0){break}aI(93240,15,1,c[10030]|0)}}while(0);d=c[7112]|0;if((d|0)!=0){uu(d);c[7112]=0}d=c[10028]|0;if((d|0)==0|(d|0)==(c[10030]|0)){i=b;return}az(d|0);c[10028]=0;i=b;return}function rh(b){b=b|0;var d=0,e=0,f=0,g=0,j=0;d=i;i=i+16|0;e=d|0;f=e;c[f>>2]=c[59458];c[f+4>>2]=c[59459];c[f+8>>2]=c[59460];c[f+12>>2]=c[59461];c[e+4>>2]=b;f=c[7118]|0;do{if((c[f>>2]|0)==2){if((a[f+112|0]&1)==0){g=18637;break}j=(b|0)%4&-1}else{g=18637}}while(0);if((g|0)==18637){j=(b|0)%9&-1}b=j+3|0;j=(b|0)<0?0:b;if((c[57432]|0)==(j|0)){rj(e);i=d;return}a[228944]=0;if((c[7116]|0)!=0){b=c[10028]|0;aI(215952,7,1,b|0);c[7116]=0;a[228944]=0}c[57432]=j;h[28714]=+h[28715];cf(c[10028]|0,202624,(v=i,i=i+8|0,c[v>>2]=a[j+93672|0]|0,v)|0);c[7116]=0;rj(e);i=d;return}function ri(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;g=c[10030]|0;if((g|0)==0){i=f;return}if(a[5688]|0){h=g}else{aK(5624,g|0);a[5688]=1;h=c[10030]|0}cf(h|0,93440,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);d=c[7230]|0;if((d|0)!=0){b=c[10030]|0;cf(b|0,93424,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}d=a[e]|0;do{if((d<<24>>24|0)==123|(d<<24>>24|0)==91){b=c[10030]|0;cf(b|0,94528,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}else{b=c[7198]|0;if((b|0)==2){h=c[10030]|0;cf(h|0,94296,(v=i,i=i+8|0,c[v>>2]=e,v)|0);break}else if((b|0)==0){cf(c[10030]|0,94496,(v=i,i=i+8|0,c[v>>2]=e,v)|0);break}else if((b|0)==1){cf(c[10030]|0,94392,(v=i,i=i+8|0,c[v>>2]=e,v)|0);break}else{break}}}while(0);if((c[7230]|0)!=0){e=c[10030]|0;aF(125,e|0)}aI(94160,3,1,c[10030]|0);i=f;return}function rj(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0,s=0,t=0,u=0.0;d=i;i=i+24|0;e=d|0;f=b;if((uG(5608,f|0,16)|0)==0){i=d;return}c[1402]=c[f>>2];c[1403]=c[f+4>>2];c[1404]=c[f+8>>2];c[1405]=c[f+12>>2];f=b|0;do{if((c[f>>2]|0)==1){g=c[7118]|0;if((a[g+17|0]&1)!=0){j=18673;break}k=c[b+4>>2]|0;do{if((c[g>>2]|0)==2){if((a[g+112|0]&1)==0){j=18668;break}l=(k|0)%4&-1}else{j=18668}}while(0);if((j|0)==18668){l=(k|0)%9&-1}g=l+3|0;m=(g|0)<0?0:g;if((c[57432]|0)==(m|0)){break}a[228944]=0;if((c[7116]|0)!=0){g=c[10028]|0;aI(215952,7,1,g|0);c[7116]=0;a[228944]=0}c[57432]=m;h[28714]=+h[28715];g=c[10028]|0;n=a[m+93672|0]|0;cf(g|0,202624,(v=i,i=i+8|0,c[v>>2]=n,v)|0);c[7116]=0}else{j=18673}}while(0);if((j|0)==18673){pS(b)}a[5688]=0;j=c[f>>2]|0;if((j|0)==3){l=c[b+4>>2]|0;o=+(l>>>16&255|0)/255.0;p=+(l>>>8&255|0)/255.0;q=+(l&255|0)/255.0;be(5624,93720,(v=i,i=i+24|0,h[v>>3]=o,h[v+8>>3]=p,h[v+16>>3]=q,v)|0);r=c[f>>2]|0}else{r=j}if((r|0)==1){j=c[b+4>>2]|0;if((a[(c[7118]|0)+112|0]&1)==0){s=(j|0)%9&-1}else{s=(j|0)%4&-1}j=a[93672+(s+3|0)|0]|0;be(5624,93688,(v=i,i=i+8|0,c[v>>2]=j,v)|0);t=c[f>>2]|0}else{t=r}if((t|0)!=5){i=d;return}q=+h[b+8>>3];if((a[(c[7118]|0)+18|0]&1)==0){fq(q,e);p=+h[e>>3];o=+h[e+8>>3];u=+h[e+16>>3];be(5624,93720,(v=i,i=i+24|0,h[v>>3]=p,h[v+8>>3]=o,h[v+16>>3]=u,v)|0);i=d;return}if(q<=0.0){be(5624,93592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=d;return}if(q<1.0){u=+(~~(q*1.0e4+.5)|0)*1.0e-4;be(25336,141840,(v=i,i=i+8|0,h[v>>3]=u,v)|0);e=(a[25336]|0)==48&(a[25337]|0)==46?25337:25336;be(5624,93464,(v=i,i=i+8|0,c[v>>2]=e,v)|0);i=d;return}else{be(5624,93528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);i=d;return}}function rk(b){b=b|0;var d=0,e=0;d=i;do{if((b|0)==0){c[10882]=0}else if((b|0)==2){e=c[10882]|0;if((e|0)==2){break}else if((e|0)==1){aI(94096,7,1,c[10030]|0)}c[10882]=2;aI(93984,35,1,c[10030]|0);a[5688]=0}else if((b|0)==12){e=c[10028]|0;if((e|0)==0|(e|0)==(c[10030]|0)){break}cf(e|0,93800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((b|0)==1){e=c[10882]|0;if((e|0)==1){break}else if((e|0)==2){aI(94096,7,1,c[10030]|0)}c[10882]=1;aI(94024,34,1,c[10030]|0);a[5688]=0}else if((b|0)==5){if(((c[10882]|0)-1|0)>>>0<2){e=c[10030]|0;aI(94096,7,1,e|0)}c[10882]=0}else if((b|0)==13){e=c[10028]|0;if((e|0)==0|(e|0)==(c[10030]|0)){break}cf(e|0,93784,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);i=d;return}function rl(){var b=0,d=0,e=0.0,f=0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=i;c[7116]=0;aI(199208,29,1,c[10028]|0);d=c[10028]|0;if((d|0)==(c[10030]|0)){aI(94992,6,1,d|0)}d=c[7118]|0;e=+g[d+88>>2];do{if(e!=0.0){if((c[d>>2]|0)!=1){break}f=c[10030]|0;j=e;cf(f|0,94888,(v=i,i=i+8|0,h[v>>3]=j,v)|0)}}while(0);d=c[7036]|0;if((d|0)==0){i=b;return}else{k=d}do{d=c[k+4>>2]|0;cf(c[10030]|0,94840,(v=i,i=i+16|0,c[v>>2]=c[k>>2],c[v+8>>2]=d,v)|0);d=c[7118]|0;do{if((a[d+97|0]&1)==0){l=d}else{f=c[k+8>>2]|0;if((f|0)==0){l=d;break}m=c[10030]|0;n=360-f|0;cf(m|0,94696,(v=i,i=i+8|0,c[v>>2]=n,v)|0);l=c[7118]|0}}while(0);d=(c[l>>2]|0)==1;do{if(d){n=c[k+16>>2]|0;m=a[n]|0;if(!((m<<24>>24|0)==123|(m<<24>>24|0)==91)){o=18724;break}m=c[10030]|0;cf(m|0,94528,(v=i,i=i+8|0,c[v>>2]=n,v)|0)}else{o=18724}}while(0);do{if((o|0)==18724){o=0;n=c[k+12>>2]|0;if((n|0)==0){m=c[10030]|0;f=d?94496:94424;p=c[k+16>>2]|0;cf(m|0,f|0,(v=i,i=i+8|0,c[v>>2]=p,v)|0);break}else if((n|0)==2){cf(c[10030]|0,(d?94296:94272)|0,(v=i,i=i+8|0,c[v>>2]=c[k+16>>2],v)|0);break}else if((n|0)==1){cf(c[10030]|0,(d?94392:94328)|0,(v=i,i=i+8|0,c[v>>2]=c[k+16>>2],v)|0);break}else{break}}}while(0);do{if((a[(c[7118]|0)+97|0]&1)!=0){if((c[k+8>>2]|0)==0){break}d=c[10030]|0;aI(94208,50,1,d|0)}}while(0);aI(94160,3,1,c[10030]|0);k=c[k+20>>2]|0;}while((k|0)!=0);k=c[7036]|0;if((k|0)==0){i=b;return}else{q=k}while(1){k=c[q+20>>2]|0;uu(c[q+16>>2]|0);uu(c[7036]|0);c[7036]=k;if((k|0)==0){break}else{q=k}}i=b;return}function rm(){var b=0;b=i;c[59762]=0;c[59764]=0;c[59760]=0;c[59828]=0;a[239320]=0;c[11600]=0;cf(c[10030]|0,95608,(v=i,i=i+8|0,h[v>>3]=.12,v)|0);i=b;return}function rn(){var b=0;if(a[239320]|0){b=c[10030]|0;aF(10,b|0);a[239320]=0}c[59762]=0;c[59764]=0;return}function ro(){var b=0;if(a[239320]|0){b=c[10030]|0;aF(10,b|0);a[239320]=0}aI(99040,14,1,c[10030]|0);return}function rp(){var b=0,d=0,e=0.0,f=0.0,j=0,k=0.0;b=i;d=c[3524]|0;e=+((c[d+8>>2]|0)>>>0>>>0);f=+((c[d+12>>2]|0)>>>0>>>0);j=~~(f*+g[38]);k=+g[184];cf(c[10030]|0,95784,(v=i,i=i+32|0,c[v>>2]=~~(e*+g[178]),c[v+8>>2]=j,c[v+16>>2]=~~(e*k),c[v+24>>2]=~~(f*k),v)|0);if(a[46352]|0){k=+((c[d+16>>2]|0)>>>0>>>0)*.12+.5;d=c[10030]|0;j=~~k;f=k*1.2;cf(d|0,95712,(v=i,i=i+16|0,c[v>>2]=j,h[v+8>>3]=f,v)|0);i=b;return}else{j=c[10030]|0;aI(95688,14,1,j|0);i=b;return}}function rq(b,d){b=b|0;d=d|0;var e=0;if(a[239320]|0){e=c[10030]|0;aF(10,e|0);a[239320]=0}c[59764]=b;c[59762]=d;return}function rr(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;do{if(a[239320]|0){f=c[59828]|0;c[59828]=f+1;if((f|0)<=49){break}f=c[10030]|0;g=c[239216+(c[11584]<<5)+((c[59760]|0)+2<<2)>>2]|0;h=c[59764]|0;j=c[59762]|0;cf(f|0,96248,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=h,c[v+16>>2]=j,v)|0);c[59828]=1}else{a[239320]=1;j=c[10030]|0;h=c[239216+(c[11584]<<5)+((c[59760]|0)+2<<2)>>2]|0;g=c[59764]|0;f=c[59762]|0;cf(j|0,96272,(v=i,i=i+24|0,c[v>>2]=h,c[v+8>>2]=g,c[v+16>>2]=f,v)|0);c[59828]=1}}while(0);cf(c[10030]|0,96200,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);c[59764]=b;c[59762]=d;i=e;return}function rs(b){b=b|0;var d=0,e=0;if(a[239320]|0){d=c[10030]|0;aF(10,d|0);a[239320]=0}c[59760]=(b|0)%((c[46304+(c[11584]<<2)>>2]|0)-2|0)&-1;if(!(a[46392]|0)){return}c[11600]=b;if((b|0)<0){e=0}else{e=((b|0)%6&-1)+1|0}c[11600]=e;aK(c[46360+(e<<2)>>2]|0,c[10030]|0);return}function rt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;if((a[e]|0)==0){i=f;return}g=c[c[3524]>>2]|0;h=ut(24)|0;do{if((h|0)==0){gk();j=ut(24)|0;if((j|0)!=0|(g|0)==0){k=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=g,v)|0)}else{k=h}}while(0);h=k;c[k>>2]=b;c[k+4>>2]=d;d=(uA(e|0)|0)+1|0;b=c[c[3524]>>2]|0;g=ut(d)|0;do{if((g|0)==0){gk();j=ut(d)|0;if((j|0)!=0|(b|0)==0){l=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=b,v)|0)}else{l=g}}while(0);c[k+16>>2]=l;uB(l|0,e|0);c[k+12>>2]=c[7198];c[k+8>>2]=c[7230];c[k+20>>2]=c[7036];c[7036]=h;i=f;return}function ru(){var b=0,e=0,f=0,j=0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0.0,U=0.0,V=0.0,W=0;b=i;i=i+24|0;e=b|0;a[46288]=0;a[46392]=0;c[11584]=0;c[11574]=0;f=c[13898]|0;j=c[8272]|0;L25079:do{if((f|0)<(j|0)){k=0.0;l=1;m=f;n=j;L25080:while(1){o=c[1054]|0;p=(a[o+(m*40&-1)|0]&1)==0;q=c[o+(m*40&-1)+36>>2]|0;r=o+(m*40&-1)+32|0;L25082:do{if(p){s=c[r>>2]|0;t=18835}else{o=c[10036]|0;u=0;while(1){if((u|0)>=(q|0)){t=18785;break}if((a[o+((c[r>>2]|0)+u|0)|0]|0)==(a[u+103664|0]|0)){u=u+1|0}else{break}}if((t|0)==18785){t=0;if((u|0)==1){w=k;x=l;break L25079}}o=c[r>>2]|0;if(!((q|0)>0&(p^1))){s=o;t=18835;break}y=c[10036]|0;z=0;A=0;B=o;while(1){if((a[z+184456|0]|0)==(a[y+(z+B|0)|0]|0)){C=B;D=A}else{if((z|0)!=3){break}C=B-1|0;D=1}E=z+1|0;if((E|0)<(D+q|0)){z=E;A=D;B=C}else{t=18792;break}}do{if((t|0)==18792){t=0;if((D|0)==0){if(!((z|0)==2|(z|0)==7)){break}}a[46352]=0;a[46392]=0;a[46288]=0;c[11584]=0;c[11574]=0;c[(c[3524]|0)+8>>2]=3e3;c[(c[3524]|0)+12>>2]=1800;a[239208]=0;c[13898]=(c[13898]|0)+1;F=1;G=k;break L25082}}while(0);if(p){s=o;t=18835;break}L25105:do{if((q|0)>0){z=c[10036]|0;B=0;A=0;y=o;while(1){if((a[B+115600|0]|0)==(a[z+(B+y|0)|0]|0)){H=y;I=A}else{if((B|0)!=1){t=18804;break L25105}H=y-1|0;I=1}u=B+1|0;if((u|0)<(I+q|0)){B=u;A=I;y=H}else{break}}if((I|0)!=0){break}if(!((B|0)==0|(B|0)==5)){t=18804}}else{t=18804}}while(0);do{if((t|0)==18804){t=0;if(!((q|0)>0&(p^1))){s=o;t=18835;break L25082}y=c[10036]|0;A=0;z=0;u=o;while(1){if((a[A+115536|0]|0)==(a[y+(A+u|0)|0]|0)){J=u;K=z}else{if((A|0)!=1){break}J=u-1|0;K=1}E=A+1|0;if((E|0)<(K+q|0)){A=E;z=K;u=J}else{t=18810;break}}if((t|0)==18810){t=0;if((K|0)!=0){break}if((A|0)==0|(A|0)==6){break}}if(p){s=o;t=18835;break L25082}L25129:do{if((q|0)>0){u=c[10036]|0;z=0;y=0;B=o;while(1){if((a[z+95544|0]|0)==(a[u+(z+B|0)|0]|0)){L=B;M=y}else{if((z|0)!=1){break L25129}L=B-1|0;M=1}E=z+1|0;if((E|0)<(M+q|0)){z=E;y=M;B=L}else{break}}if((M|0)==0){if(!((z|0)==0|(z|0)==6)){break}}a[46288]=1;c[13898]=m+1;F=l;G=k;break L25082}}while(0);if(!((q|0)>0&(p^1))){s=o;t=18835;break L25082}A=c[10036]|0;B=0;y=0;u=o;while(1){if((a[B+129104|0]|0)==(a[A+(B+u|0)|0]|0)){N=u;O=y}else{if((B|0)!=2){s=o;t=18835;break L25082}N=u-1|0;O=1}E=B+1|0;if((E|0)<(O+q|0)){B=E;y=O;u=N}else{break}}if((O|0)==0){if(!((B|0)==1|(B|0)==6)){s=o;t=18835;break L25082}}if(!(a[46392]|0)){c[11584]=1}c[13898]=m+1;F=l;G=k;break L25082}}while(0);a[46392]=1;c[11584]=2;c[13898]=m+1;F=l;G=k}}while(0);L25157:do{if((t|0)==18835){t=0;L25159:do{if((n|0)>(m|0)){if(p){break}r=c[10036]|0;o=0;while(1){if((o|0)>=(q|0)){break}if((a[r+(s+o|0)|0]|0)==(a[o+130496|0]|0)){o=o+1|0}else{t=18842;break L25159}}if((o|0)!=4){t=18842;break}c[13898]=m+1;r=s4(46280,46272,1)|0;c[(c[3524]|0)+8>>2]=~~(+g[11570]/.12);c[(c[3524]|0)+12>>2]=~~(+g[11568]/.12);a[239208]=1;F=r;G=k;break L25157}else{t=18842}}while(0);L25167:do{if((t|0)==18842){t=0;if(!((q|0)>0&(p^1))){break}r=c[10036]|0;B=0;u=0;y=s;while(1){if((a[B+95520|0]|0)==(a[r+(B+y|0)|0]|0)){P=y;Q=u}else{if((B|0)!=1){break}P=y-1|0;Q=1}A=B+1|0;if((A|0)<(Q+q|0)){B=A;u=Q;y=P}else{t=18848;break}}do{if((t|0)==18848){t=0;if((Q|0)==0){if(!((B|0)==0|(B|0)==5)){break}}c[11574]=1;c[13898]=m+1;F=l;G=k;break L25157}}while(0);if(!((q|0)>0&(p^1))){break}B=c[10036]|0;y=0;u=0;r=s;while(1){if((a[y+95512|0]|0)==(a[B+(y+r|0)|0]|0)){R=r;S=u}else{if((y|0)!=1){break L25167}R=r-1|0;S=1}o=y+1|0;if((o|0)<(S+q|0)){y=o;u=S;r=R}else{break}}if((S|0)==0){if(!((y|0)==0|(y|0)==4)){break}}c[11574]=2;c[13898]=m+1;F=l;G=k;break L25157}}while(0);if(((d[(c[10036]|0)+s|0]|0)-48|0)>>>0>=10){t=18869;break L25080}r=is(e)|0;u=c[r>>2]|0;if((u|0)==3){T=+uz(c[r+8>>2]|0,0)}else if((u|0)==1){T=+(c[r+8>>2]|0)}else if((u|0)==2){T=+h[r+8>>3]}else{t=18865;break L25080}U=T;if(U<1.0|U>100.0){t=18867;break L25080}a[46352]=1;V=U/.12;c[(c[3524]|0)+16>>2]=~~V;c[(c[3524]|0)+20>>2]=~~(V*.5);F=l;G=U}}while(0);q=c[13898]|0;p=c[8272]|0;if((q|0)<(p|0)){k=G;l=F;m=q;n=p}else{w=G;x=F;break L25079}}if((t|0)==18869){uf(m,95448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==18865){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((t|0)==18867){uf(c[13898]|0,95472,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}else{w=0.0;x=1}}while(0);t=(c[11584]|0)==1?95248:179864;F=a[46288]|0?95224:179864;e=c[11574]|0;if((e|0)==1){W=95216}else{W=(e|0)==2?95152:179864}be(13048,95392,(v=i,i=i+32|0,c[v>>2]=a[46392]|0?95304:179864,c[v+8>>2]=t,c[v+16>>2]=F,c[v+24>>2]=W,v)|0);if(a[46352]|0){W=13048+(uA(13048)|0)|0;F=~~w;be(W|0,95144,(v=i,i=i+8|0,c[v>>2]=F,v)|0)}if(!(a[239208]|0)){i=b;return}F=13048+(uA(13048)|0)|0;W=c[3524]|0;w=+((c[W+8>>2]|0)>>>0>>>0);if((x|0)==2){G=w*2.54/600.0;T=+((c[W+12>>2]|0)>>>0>>>0)*2.54/600.0;be(F|0,95024,(v=i,i=i+16|0,h[v>>3]=G,h[v+8>>3]=T,v)|0);i=b;return}else{T=w/600.0;w=+((c[W+12>>2]|0)>>>0>>>0)/600.0;be(F|0,95e3,(v=i,i=i+16|0,h[v>>3]=T,h[v+8>>3]=w,v)|0);i=b;return}}function rv(a){a=a|0;c[11586]=a;return 1}function rw(a){a=a|0;c[1044]=a;return 1}function rx(a){a=a|0;c[11602]=(a|0)!=0&1;return 1}function ry(a){a=a|0;c[1050]=(a|0)!=0&1;return 1}function rz(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=c[13898]|0;if((b|0)>=(c[8272]|0)){return}d=c[1054]|0;e=(a[d+(b*40&-1)|0]&1)==0;if(e){return}f=c[d+(b*40&-1)+36>>2]|0;g=d+(b*40&-1)+32|0;d=c[10036]|0;h=0;while(1){if((h|0)>=(f|0)){i=18891;break}if((a[d+((c[g>>2]|0)+h|0)|0]|0)==(a[h+103664|0]|0)){h=h+1|0}else{break}}do{if((i|0)==18891){if((h|0)!=1){break}return}}while(0);h=c[g>>2]|0;if(!((f|0)>0&(e^1))){return}g=c[10036]|0;d=0;j=0;k=h;while(1){if((a[d+101280|0]|0)==(a[g+(d+k|0)|0]|0)){l=k;m=j}else{if((d|0)!=2){break}l=k-1|0;m=1}n=d+1|0;if((n|0)<(m+f|0)){d=n;j=m;k=l}else{i=18898;break}}do{if((i|0)==18898){if((m|0)==0){if(!((d|0)==1|(d|0)==10)){break}}a[231056]=1;c[13898]=b+1;return}}while(0);if(!((f|0)>0&(e^1))){return}e=c[10036]|0;d=0;m=0;l=h;while(1){if((a[d+101232|0]|0)==(a[e+(d+l|0)|0]|0)){o=l;p=m}else{if((d|0)!=1){i=18918;break}o=l-1|0;p=1}h=d+1|0;if((h|0)<(p+f|0)){d=h;m=p;l=o}else{break}}if((i|0)==18918){return}do{if((p|0)==0){if((d|0)==0|(d|0)==4){break}return}}while(0);a[231048]=1;c[13898]=b+1;return}function rA(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;if(a[239320]|0){g=c[10030]|0;aF(10,g|0);a[239320]=0}cf(c[10030]|0,99752,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);d=a[e]|0;if((d<<24>>24|0)==123|(d<<24>>24|0)==91){d=c[10030]|0;cf(d|0,99720,(v=i,i=i+8|0,c[v>>2]=e,v)|0);i=f;return}d=c[11602]|0;if((d|0)==0){b=c[11586]|0;if((b|0)==0){g=c[10030]|0;aI(97304,18,1,g|0)}else if((b|0)==2){aI(97152,18,1,c[10030]|0)}else if((b|0)==1){aI(97240,15,1,c[10030]|0)}b=c[10030]|0;cf(b|0,97128,(v=i,i=i+8|0,c[v>>2]=e,v)|0);i=f;return}else if((d|0)==1){d=c[11586]|0;if(a[46288]|0){if((d|0)==1){b=c[10030]|0;aI(97024,43,1,b|0)}else if((d|0)==0){aI(97080,44,1,c[10030]|0)}else if((d|0)==2){aI(96952,44,1,c[10030]|0)}b=c[10030]|0;cf(b|0,96920,(v=i,i=i+8|0,c[v>>2]=e,v)|0);i=f;return}if((d|0)==1){b=c[10030]|0;aI(96824,30,1,b|0)}else if((d|0)==0){aI(96856,31,1,c[10030]|0)}else if((d|0)==2){aI(96720,31,1,c[10030]|0)}d=(uA(e|0)|0)-1|0;if((d|0)>0){b=0;do{cf(c[10030]|0,96672,(v=i,i=i+8|0,c[v>>2]=a[e+b|0]|0,v)|0);b=b+1|0;}while((b|0)<(d|0))}aF(a[e+d|0]|0|0,c[10030]|0);aI(96616,4,1,c[10030]|0);i=f;return}else{i=f;return}}function rB(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;if(a[239320]|0){g=c[10030]|0;aF(10,g|0);a[239320]=0}c[59764]=b;c[59762]=d;if((e|0)<0){h=100128}else{g=c[11574]|0;h=c[239064+(g*48&-1)+(((e|0)%(c[46320+(g<<2)>>2]|0)&-1)<<2)>>2]|0}cf(c[10030]|0,99e3,(v=i,i=i+24|0,c[v>>2]=b,c[v+8>>2]=d,c[v+16>>2]=h,v)|0);i=f;return}function rC(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;s5(a,b,d,e,2,f);c[59764]=d;c[59762]=e;return}function rD(){var b=0,d=0,e=0,f=0,g=0.0;b=i;a[3280]=1;a[3648]=1;c[814]=0;c[816]=0;ts();c[916]=-1;d=a[3648]|0?39:-2;e=c[818]|0;f=c[914]|0;g=+h[523];cf(c[10030]|0,225816,(v=i,i=i+48|0,c[v>>2]=a[3280]|0?30:0,c[v+8>>2]=d,c[v+16>>2]=e,c[v+24>>2]=f,h[v+32>>3]=g,h[v+40>>3]=.001,v)|0);i=b;return}function rE(){ts();c[814]=0;c[816]=0;return}function rF(){ts();aI(99040,14,1,c[10030]|0);return}function rG(){var a=0,b=0,d=0,e=0,f=0;a=i;b=c[3524]|0;d=b+8|0;e=c[d>>2]|0;f=b+12|0;b=c[f>>2]|0;cf(c[10030]|0,226256,(v=i,i=i+48|0,c[v>>2]=179864,c[v+8>>2]=e,c[v+16>>2]=b,c[v+24>>2]=0,c[v+32>>2]=0,c[v+40>>2]=179864,v)|0);b=(c[d>>2]|0)-876|0;e=c[f>>2]|0;cf(c[10030]|0,226256,(v=i,i=i+48|0,c[v>>2]=99408,c[v+8>>2]=b,c[v+16>>2]=e,c[v+24>>2]=876,c[v+32>>2]=0,c[v+40>>2]=99360,v)|0);e=(c[d>>2]|0)-215|0;b=c[f>>2]|0;cf(c[10030]|0,226256,(v=i,i=i+48|0,c[v>>2]=99408,c[v+8>>2]=e,c[v+16>>2]=b,c[v+24>>2]=0,c[v+32>>2]=0,c[v+40>>2]=99336,v)|0);b=(c[d>>2]|0)-1091|0;e=c[f>>2]|0;cf(c[10030]|0,226256,(v=i,i=i+48|0,c[v>>2]=99408,c[v+8>>2]=b,c[v+16>>2]=e,c[v+24>>2]=876,c[v+32>>2]=0,c[v+40>>2]=99288,v)|0);e=c[d>>2]|0;b=(c[f>>2]|0)-379|0;cf(c[10030]|0,226256,(v=i,i=i+48|0,c[v>>2]=99408,c[v+8>>2]=e,c[v+16>>2]=b,c[v+24>>2]=0,c[v+32>>2]=0,c[v+40>>2]=99272,v)|0);b=c[d>>2]|0;e=(c[f>>2]|0)-533|0;cf(c[10030]|0,226256,(v=i,i=i+48|0,c[v>>2]=99408,c[v+8>>2]=b,c[v+16>>2]=e,c[v+24>>2]=0,c[v+32>>2]=533,c[v+40>>2]=99176,v)|0);e=c[d>>2]|0;d=(c[f>>2]|0)-912|0;cf(c[10030]|0,226256,(v=i,i=i+48|0,c[v>>2]=99408,c[v+8>>2]=e,c[v+16>>2]=d,c[v+24>>2]=0,c[v+32>>2]=533,c[v+40>>2]=99120,v)|0);aI(99064,15,1,c[10030]|0);i=a;return}function rH(a,b){a=a|0;b=b|0;ts();c[816]=a;c[814]=b;return}function rI(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;do{if(a[4192]|0){f=c[918]|0;if((f|0)<=99){g=f;break}ts();a[4192]=1;f=c[3680+(((c[916]|0)+2|0)*12&-1)>>2]|0;if((f|0)==2){h=(c[914]|0)*3&-1}else if((f|0)==3){h=(c[914]|0)*5&-1}else if((f|0)==1){h=c[914]|0}else{h=1}f=c[10030]|0;cf(f|0,99928,(v=i,i=i+8|0,c[v>>2]=h,v)|0);f=c[814]|0;c[8030]=c[816];c[8031]=f;c[918]=1;g=1}else{a[4192]=1;f=c[3680+(((c[916]|0)+2|0)*12&-1)>>2]|0;if((f|0)==1){j=c[914]|0}else if((f|0)==3){j=(c[914]|0)*5&-1}else if((f|0)==2){j=(c[914]|0)*3&-1}else{j=1}f=c[10030]|0;cf(f|0,99928,(v=i,i=i+8|0,c[v>>2]=j,v)|0);f=c[814]|0;c[8030]=c[816];c[8031]=f;c[918]=1;g=1}}while(0);c[32120+(g<<3)>>2]=b;c[32124+(g<<3)>>2]=d;c[918]=g+1;c[816]=b;c[814]=d;i=e;return}function rJ(b){b=b|0;var d=0,e=0;ts();d=(b|0)<-2?-2:b;b=a[3648]|0?39:-2;if((d|0)<(b|0)){e=d;c[916]=e;return}e=(d|0)%(b|0)&-1;c[916]=e;return}function rK(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;ts();cf(c[10030]|0,99752,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);d=a[e]|0;if((d<<24>>24|0)==123|(d<<24>>24|0)==91){d=c[10030]|0;cf(d|0,99720,(v=i,i=i+8|0,c[v>>2]=e,v)|0);i=f;return}d=c[1050]|0;if((d|0)==1){b=c[1044]|0;if((b|0)==0){g=99688}else if((b|0)==2){g=99616}else if((b|0)==1){g=104096}else{g=0}b=c[10030]|0;cf(b|0,99536,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=e,v)|0);i=f;return}else if((d|0)==0){d=c[1044]|0;if((d|0)==0){h=104096}else if((d|0)==1){h=179864}else if((d|0)==2){h=104088}else{h=0}cf(c[10030]|0,99696,(v=i,i=i+16|0,c[v>>2]=h,c[v+8>>2]=e,v)|0);i=f;return}else{i=f;return}}function rL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0;e=i;ts();c[816]=a;c[814]=b;cf(c[10030]|0,100152,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);if((d|0)<0){b=c[10030]|0;aI(100128,17,1,b|0);f=c[10030]|0;g=aI(100056,4,1,f|0)|0;i=e;return}b=(d|0)%30&-1;d=c[3288+(b*12&-1)>>2]|0;if((d|0)==3){a=c[914]|0;j=c[10030]|0;cf(j|0,99928,(v=i,i=i+8|0,c[v>>2]=a,v)|0);a=c[10030]|0;cf(a|0,99984,(v=i,i=i+8|0,h[v>>3]=1.0,v)|0)}else if((d|0)==2){cf(c[10030]|0,99928,(v=i,i=i+8|0,c[v>>2]=c[914],v)|0);cf(c[10030]|0,99984,(v=i,i=i+8|0,h[v>>3]=.5,v)|0)}else if((d|0)==1){cf(c[10030]|0,99928,(v=i,i=i+8|0,c[v>>2]=c[914],v)|0);cf(c[10030]|0,99984,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0)}else if((d|0)==0){cf(c[10030]|0,99928,(v=i,i=i+8|0,c[v>>2]=(c[914]|0)*3&-1,v)|0)}d=c[3292+(b*12&-1)>>2]|0;if((d|0)==3){k=~~(+(c[818]|0)*2.0)}else if((d|0)==2){k=~~(+(c[818]|0)*1.4142)}else if((d|0)==1){k=c[818]|0}else{k=0}cM[c[3296+(b*12&-1)>>2]&511](k);f=c[10030]|0;g=aI(100056,4,1,f|0)|0;i=e;return}function rM(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;s5(a,b,d,e,1,f);c[816]=d;c[814]=e;return}function rN(){var b=0;g[57768]=0.0;g[57770]=0.0;if(a[231184]|0){b=c[10030]|0;aF(10,b|0);a[231184]=0}c[57766]=-1;cp(c[10030]|0,0,0);aI(101352,47,1,c[10030]|0);a[231136]=0;return}function rO(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0.0,p=0.0;b=i;i=i+24|0;d=b|0;e=c[13898]|0;L25387:do{if((e|0)<(c[8272]|0)){f=c[1054]|0;L25389:do{if((a[f+(e*40&-1)|0]&1)!=0){g=c[f+(e*40&-1)+36>>2]|0;j=f+(e*40&-1)+32|0;k=c[10036]|0;l=0;while(1){if((l|0)>=(g|0)){break}if((a[k+((c[j>>2]|0)+l|0)|0]|0)==(a[l+103664|0]|0)){l=l+1|0}else{break L25389}}if((l|0)==1){break L25387}}}while(0);f=is(d)|0;j=c[f>>2]|0;if((j|0)==1){m=+(c[f+8>>2]|0)}else if((j|0)==2){m=+h[f+8>>3]}else if((j|0)==3){m=+uz(c[f+8>>2]|0,0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=~~m;if((f|0)<=0){break}c[818]=f}}while(0);e=c[13898]|0;L25404:do{if((e|0)<(c[8272]|0)){f=c[1054]|0;L25406:do{if((a[f+(e*40&-1)|0]&1)!=0){j=c[f+(e*40&-1)+36>>2]|0;k=f+(e*40&-1)+32|0;g=c[10036]|0;n=0;while(1){if((n|0)>=(j|0)){break}if((a[g+((c[k>>2]|0)+n|0)|0]|0)==(a[n+103664|0]|0)){n=n+1|0}else{break L25406}}if((n|0)==1){break L25404}}}while(0);f=is(d)|0;k=c[f>>2]|0;if((k|0)==2){o=+h[f+8>>3]}else if((k|0)==3){o=+uz(c[f+8>>2]|0,0)}else if((k|0)==1){o=+(c[f+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}f=~~o;if((f|0)<=0){break}c[914]=f}}while(0);e=c[13898]|0;L25421:do{if((e|0)<(c[8272]|0)){f=c[1054]|0;L25423:do{if((a[f+(e*40&-1)|0]&1)!=0){k=c[f+(e*40&-1)+36>>2]|0;g=f+(e*40&-1)+32|0;j=c[10036]|0;l=0;while(1){if((l|0)>=(k|0)){break}if((a[j+((c[g>>2]|0)+l|0)|0]|0)==(a[l+103664|0]|0)){l=l+1|0}else{break L25423}}if((l|0)==1){break L25421}}}while(0);f=is(d)|0;g=c[f>>2]|0;if((g|0)==3){p=+uz(c[f+8>>2]|0,0)}else if((g|0)==1){p=+(c[f+8>>2]|0)}else if((g|0)==2){p=+h[f+8>>3]}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if(p<=0.0){break}h[523]=p}}while(0);d=c[914]|0;p=+h[523];be(13048,99024,(v=i,i=i+24|0,c[v>>2]=c[818],c[v+8>>2]=d,h[v+16>>3]=p,v)|0);i=b;return}function rP(a){a=a|0;c[57794]=a;return 1}function rQ(a){a=a|0;c[56722]=a;return 1}function rR(a){a=a|0;c[56636]=a;return 1}function rS(a){a=a|0;c[58056]=(a|0)!=0&1;return 1}function rT(a,b){a=a|0;b=b|0;c[58246]=a;c[58244]=b;c[58254]=0;h[29126]=+(c[232736+((c[58242]|0)*24&-1)>>2]|0);return}function rU(){var b=0;if(a[231184]|0){b=c[10030]|0;aF(10,b|0);a[231184]=0}g[57768]=0.0;g[57770]=0.0;return}function rV(){var b=0;if(a[231184]|0){b=c[10030]|0;aF(10,b|0);a[231184]=0}aI(101400,32,1,c[10030]|0);return}function rW(){var b=0,d=0,e=0.0,f=0.0,j=0.0,k=0.0;b=i;aI(103264,160,1,c[10030]|0);aI(102784,449,1,c[10030]|0);aI(102488,280,1,c[10030]|0);aI(101736,747,1,c[10030]|0);aI(101616,83,1,c[10030]|0);if(!(a[231048]|0)){d=c[10030]|0;aI(101512,43,1,d|0)}e=+g[184];f=+g[44];j=e+ +g[178];k=f+ +g[38];cf(c[10030]|0,101448,(v=i,i=i+32|0,h[v>>3]=e,h[v+8>>3]=f,h[v+16>>3]=j,h[v+24>>3]=k,v)|0);i=b;return}function rX(b,d){b=b|0;d=d|0;var e=0;if(a[231184]|0){e=c[10030]|0;aF(10,e|0);a[231184]=0}g[57770]=+(b>>>0>>>0)/1.0e4;g[57768]=+(d>>>0>>>0)/1.0e4;return}function rY(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0.0,l=0.0;e=i;do{if(a[231184]|0){f=c[57792]|0;c[57792]=f+1;if((f|0)<=99){break}f=c[10030]|0;j=c[231144+((c[57766]|0)+2<<2)>>2]|0;k=+g[57770];l=+g[57768];cf(f|0,104992,(v=i,i=i+24|0,c[v>>2]=j,h[v+8>>3]=k,h[v+16>>3]=l,v)|0);c[57792]=1}else{a[231184]=1;j=c[10030]|0;f=c[231144+((c[57766]|0)+2<<2)>>2]|0;l=+g[57770];k=+g[57768];cf(j|0,104992,(v=i,i=i+24|0,c[v>>2]=f,h[v+8>>3]=l,h[v+16>>3]=k,v)|0);c[57792]=1}}while(0);k=+(b>>>0>>>0)/1.0e4;g[57770]=k;l=+(d>>>0>>>0)/1.0e4;g[57768]=l;cf(c[10030]|0,103688,(v=i,i=i+16|0,h[v>>3]=k,h[v+8>>3]=l,v)|0);i=e;return}function rZ(b){b=b|0;var d=0,e=0;if(a[231184]|0){d=c[10030]|0;aF(10,d|0);a[231184]=0}if((b|0)>3){e=(b|0)%4&-1}else{e=b}c[57766]=(e|0)<-2?-2:e;return}function r_(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0.0;g=i;i=i+8|0;j=g|0;if(a[231184]|0){k=c[10030]|0;aF(10,k|0);a[231184]=0}if((a[f]|0)==0){i=g;return}aI(104112,5,1,c[10030]|0);k=c[57794]|0;if((k|0)==0){l=c[10030]|0;aI(104096,3,1,l|0)}else if((k|0)==2){aI(104088,3,1,c[10030]|0)}if((c[58056]|0)==1){k=c[10030]|0;aI(104040,3,1,k|0)}cf(c[10030]|0,104e3,(v=i,i=i+16|0,h[v>>3]=+(d>>>0>>>0)/1.0e4,h[v+8>>3]=+(e>>>0>>>0)/1.0e4,v)|0);if(a[231056]|0){e=c[10030]|0;cf(e|0,103976,(v=i,i=i+8|0,c[v>>2]=f,v)|0);i=g;return}uz(f,j);e=c[j>>2]|0;if((e|0)==(f|0)){uB(231192,f|0)}else{d=e-f|0;e=d+1|0;uF(231192,f|0,e|0);if((uA(f|0)|0)>>>0>=e>>>0){a[231192+((e|0)==0?0:d)|0]=0}d=a8(231192,101)|0;if((d|0)==0){e=a8(231192,69)|0;if((e|0)!=0){m=e;n=19097}}else{m=d;n=19097}do{if((n|0)==19097){a[m]=0;o=+uz(231192,0);d=bW(m+1|0)|0;if(o==0.0){b[115596]=48;break}if(o==1.0){be(231192,103944,(v=i,i=i+8|0,c[v>>2]=d,v)|0);break}e=~~o;f=(d|0)==1;if(o==+(e|0)){if(f){be(231192,103848,(v=i,i=i+8|0,c[v>>2]=e,v)|0);break}else{be(231192,103800,(v=i,i=i+16|0,c[v>>2]=e,c[v+8>>2]=d,v)|0);break}}else{if(f){be(231192,103760,(v=i,i=i+8|0,h[v>>3]=o,v)|0);break}else{be(231192,103728,(v=i,i=i+16|0,h[v>>3]=o,c[v+8>>2]=d,v)|0);break}}}}while(0);m=c[j>>2]|0;uC(231192,m|0)}cf(c[10030]|0,103976,(v=i,i=i+8|0,c[v>>2]=231192,v)|0);i=g;return}function r$(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0.0,l=0.0;f=i;if(a[231184]|0){j=c[10030]|0;aF(10,j|0);a[231184]=0}k=+(b>>>0>>>0)/1.0e4;g[57770]=k;l=+(d>>>0>>>0)/1.0e4;g[57768]=l;d=c[10030]|0;if((e|0)<0){cf(d|0,105032,(v=i,i=i+24|0,h[v>>3]=k,h[v+8>>3]=l,h[v+16>>3]=25.0e-5,v)|0);i=f;return}else{b=c[231088+(((e|0)%12&-1)<<2)>>2]|0;cf(d|0,104992,(v=i,i=i+24|0,c[v>>2]=b,h[v+8>>3]=k,h[v+16>>3]=l,v)|0);i=f;return}}function r0(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var j=0,k=0.0,l=0.0;j=i;k=+(d>>>0>>>0)/1.0e4;l=+(e>>>0>>>0)/1.0e4;cf(c[10030]|0,105176,(v=i,i=i+40|0,c[v>>2]=(f|0)!=0?105128:179864,h[v+8>>3]=+(a>>>0>>>0)/1.0e4,h[v+16>>3]=+(b>>>0>>>0)/1.0e4,h[v+24>>3]=k,h[v+32>>3]=l,v)|0);g[57770]=k;g[57768]=l;i=j;return}function r1(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0;d=i;if((b|0)==0){e=128;i=d;return e|0}L25532:do{if(!(a[231136]|0)){a[231136]=1;f=c[5163]|0;if((f|0)==103){g=c[5169]|0;if((g|0)>0){j=0;k=g}else{break}while(1){cf(c[10030]|0,105632,(v=i,i=i+16|0,c[v>>2]=j,h[v+8>>3]=+(~~(+(j|0)/+(k-1|0)*1.0e3)|0)*.001,v)|0);j=j+1|0;k=c[5169]|0;if((j|0)>=(k|0)){break L25532}}}else if((f|0)!=114){break}if((c[5169]|0)<=0){break}g=b+32|0;l=0;do{m=c[g>>2]|0;n=+(~~(+h[m+(l*24&-1)>>3]*1.0e3)|0)*.001;o=+(~~(+h[m+(l*24&-1)+8>>3]*1.0e3)|0)*.001;p=+(~~(+h[m+(l*24&-1)+16>>3]*1.0e3)|0)*.001;cf(c[10030]|0,105552,(v=i,i=i+32|0,c[v>>2]=l,h[v+8>>3]=n,h[v+16>>3]=o,h[v+24>>3]=p,v)|0);l=l+1|0;}while((l|0)<(c[5169]|0))}}while(0);aI(105272,85,1,c[10030]|0);e=0;i=d;return e|0}function r2(b){b=b|0;var d=0.0,e=0;d=+h[b+8>>3];if((c[b>>2]|0)!=5){return}if(d>0.0){e=~~(d*+(c[5169]|0))}else{e=0}if(!(a[231136]|0)){b=c[m>>2]|0;aI(105680,35,1,b|0)}c[58054]=(e|0)>127?127:e;return}function r3(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0;d=i;cf(c[10030]|0,105856,(v=i,i=i+8|0,c[v>>2]=c[58054],v)|0);if((a|0)>0){e=0}else{f=c[10030]|0;g=aF(10,f|0)|0;i=d;return}do{if(((e|0)%8&-1|0)==7){j=c[10030]|0;aF(10,j|0)}k=+(c[b+(e*12&-1)+4>>2]|0)/1.0e4;cf(c[10030]|0,105760,(v=i,i=i+16|0,h[v>>3]=+(c[b+(e*12&-1)>>2]|0)/1.0e4,h[v+8>>3]=k,v)|0);e=e+1|0;}while((e|0)<(a|0));f=c[10030]|0;g=aF(10,f|0)|0;i=d;return}function r4(){var b=0;c[56608]=0;c[56610]=0;if(a[226552]|0){b=c[10030]|0;aF(10,b|0);a[226552]=0}c[56606]=-1;aI(106128,39,1,c[10030]|0);return}function r5(){var b=0;if(a[226552]|0){b=c[10030]|0;aF(10,b|0);a[226552]=0}c[56608]=0;c[56610]=0;return}function r6(){var b=0;if(a[226552]|0){b=c[10030]|0;aF(10,b|0);a[226552]=0}aI(106248,14,1,c[10030]|0);return}function r7(){var a=0;a=i;cf(c[10030]|0,226560,(v=i,i=i+16|0,h[v>>3]=.24089999496936798,c[v+8>>2]=3,v)|0);c[56632]=0;c[56606]=0;i=a;return}function r8(b,d){b=b|0;d=d|0;var e=0;if(a[226552]|0){e=c[10030]|0;aF(10,e|0);a[226552]=0}c[56610]=b;c[56608]=d;return}function r9(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;do{if(a[226552]|0){f=c[56630]|0;c[56630]=f+1;if((f|0)<=4){break}f=c[10030]|0;aI(106424,8,1,f|0);c[56630]=1}else{a[226552]=1;f=c[56606]|0;g=c[56632]|0;if((f|0)!=(g|0)){h=c[226496+(f+2<<2)>>2]|0;if((h|0)==(c[226496+(g+2<<2)>>2]|0)){j=f}else{f=c[10030]|0;cf(f|0,106544,(v=i,i=i+8|0,c[v>>2]=h,v)|0);j=c[56606]|0}c[56632]=j}h=c[10030]|0;f=c[56610]|0;g=c[56608]|0;cf(h|0,106504,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=g,v)|0);c[56630]=1}}while(0);cf(c[10030]|0,106360,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);c[56610]=b;c[56608]=d;i=e;return}function sa(b){b=b|0;var d=0,e=0;if(a[226552]|0){d=c[10030]|0;aF(10,d|0);a[226552]=0}if((b|0)>2){e=(b|0)%3&-1}else{e=b}c[56606]=(e|0)>-2?e:-2;return}function sb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;if(a[226552]|0){g=c[10030]|0;aF(10,g|0);a[226552]=0}cf(c[10030]|0,106848,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);d=(c[56722]|0)==0?104:118;b=c[56636]|0;do{if((c[56634]|0)!=(b|0)){c[56634]=b;if((b|0)==1){g=c[10030]|0;aI(108272,17,1,g|0);break}else if((b|0)==2){aI(106656,17,1,c[10030]|0);break}else if((b|0)==0){aI(106736,17,1,c[10030]|0);break}else{break}}}while(0);cf(c[10030]|0,106624,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=e,v)|0);i=f;return}function sc(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;if(a[226552]|0){g=c[10030]|0;aF(10,g|0);a[226552]=0}c[56610]=b;c[56608]=d;cf(c[10030]|0,108368,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);if((c[56634]|0)!=1){d=c[10030]|0;aI(108272,17,1,d|0);c[56634]=1}if((e|0)<0){h=108192}else{h=c[226448+(((e|0)%12&-1)<<2)>>2]|0}cf(c[10030]|0,154696,(v=i,i=i+8|0,c[v>>2]=h,v)|0);i=f;return}function sd(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;g=i;cf(c[10030]|0,108416,(v=i,i=i+40|0,c[v>>2]=a,c[v+8>>2]=b,c[v+16>>2]=(f|0)==0?108:97,c[v+24>>2]=d,c[v+32>>2]=e,v)|0);c[56610]=d;c[56608]=e;i=g;return}function se(){c[58256]=0;a[233032]=0;aI(113088,165,1,c[10030]|0);aI(112768,208,1,c[10030]|0);aI(111168,1548,1,c[10030]|0);aI(110792,238,1,c[10030]|0);aI(109768,808,1,c[10030]|0);aI(109360,328,1,c[10030]|0);aI(108752,519,1,c[10030]|0);aI(108504,212,1,c[10030]|0);return}function sf(){aI(122176,5,1,c[10030]|0);return}function sg(){aI(113352,9,1,c[10030]|0);return}function sh(){var b=0,d=0,e=0;b=i;d=c[3524]|0;cf(c[10030]|0,113672,(v=i,i=i+24|0,c[v>>2]=c[58256],h[v+8>>3]=5.0,h[v+16>>3]=3.0,v)|0);c[58256]=(c[58256]|0)+1;e=c[d+12>>2]|0;cf(c[10030]|0,113504,(v=i,i=i+16|0,c[v>>2]=c[d+8>>2],c[v+8>>2]=e,v)|0);a[232720]=0;i=b;return}function si(a){a=a|0;c[58248]=a;return 1}function sj(b){b=b|0;a[233032]=(b|0)>0;return 1}function sk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,w=0,x=0,y=0.0,z=0.0,A=0,B=0,C=0,D=0.0,E=0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0,L=0,M=0;d=i;e=c[58246]|0;f=c[58244]|0;g=(e|0)==(a|0)&(f|0)==(b|0);if((c[58250]|0)!=0){j=c[10030]|0;if(g){cf(j|0,113832,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);c[58246]=a;c[58244]=b;i=d;return}else{cf(j|0,113728,(v=i,i=i+32|0,c[v>>2]=e,c[v+8>>2]=f,c[v+16>>2]=a,c[v+24>>2]=b,v)|0);c[58246]=a;c[58244]=b;i=d;return}}if(g){if((c[58254]&1|0)!=0){c[58246]=a;c[58244]=b;i=d;return}g=c[10030]|0;cf(g|0,113832,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);c[58246]=a;c[58244]=b;i=d;return}k=+(e>>>0>>>0);l=+(f>>>0>>>0);m=+(a>>>0>>>0);n=m-k;o=+(b>>>0>>>0);p=o-l;q=+Q(+(n*n+p*p));r=n/q;n=p/q;p=+h[29126];g=c[58254]|0;if(p>2]=w,c[v+8>>2]=x,c[v+16>>2]=A,c[v+24>>2]=B,v)|0);D=+h[29126];E=c[58254]|0}else{D=q;E=j}c[58246]=A;c[58244]=B;F=u-D;C=E+1&3;c[58254]=C;G=+(c[232736+((c[58242]|0)*24&-1)+(C<<2)>>2]|0);h[29126]=G;if(G>2]=a,c[v+8>>2]=b,v)|0);c[58246]=a;c[58244]=b;i=d;return}else{cf(M|0,113728,(v=i,i=i+32|0,c[v>>2]=K,c[v+8>>2]=L,c[v+16>>2]=a,c[v+24>>2]=b,v)|0);c[58246]=a;c[58244]=b;i=d;return}}function sl(b){b=b|0;var d=0,e=0,f=0.0,j=0.0;d=i;if((b|0)>7){e=(b|0)%8&-1}else{e=b}b=e+2|0;e=(b|0)<0?0:b;f=+g[232732+(e*24&-1)>>2];if(!(f==+g[232732+((c[58242]|0)*24&-1)>>2]&a[232720])){b=c[10030]|0;j=f;cf(b|0,113976,(v=i,i=i+8|0,h[v>>3]=j,v)|0);a[232720]=1}c[58242]=e;c[58254]=0;h[29126]=+(c[232736+(e*24&-1)>>2]|0);c[58250]=c[232728+(e*24&-1)>>2];i=d;return}function sm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;if((e|0)==0){i=f;return}if((a[e]|0)==0){i=f;return}g=bP(e|0)|0;e=a[g]|0;L25673:do{if(e<<24>>24!=0){h=0;j=e;while(1){if(j<<24>>24==34){a[g+h|0]=39}k=h+1|0;if(k>>>0>=(uA(g|0)|0)>>>0){break L25673}h=k;j=a[g+k|0]|0}}}while(0);e=c[58248]|0;if((e|0)==2){l=3}else if((e|0)==0){l=1}else if((e|0)==1){l=2}else{l=0}e=a[233032]|0?90:0;cf(c[10030]|0,114256,(v=i,i=i+40|0,c[v>>2]=g,c[v+8>>2]=b,c[v+16>>2]=d,c[v+24>>2]=e,c[v+32>>2]=l,v)|0);uu(g);i=f;return}function sn(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;g=i;c[58246]=a;c[58244]=b;c[58254]=0;h[29126]=+(c[232736+((c[58242]|0)*24&-1)>>2]|0);sk(d,e);if((f|0)==0){i=g;return}cf(c[10030]|0,114408,(v=i,i=i+32|0,c[v>>2]=d-a,c[v+8>>2]=e-b,c[v+16>>2]=d,c[v+24>>2]=e,v)|0);i=g;return}function so(){var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0.0,L=0,M=0,N=0,O=0.0,P=0.0,Q=0,R=0;b=i;i=i+56|0;d=b|0;e=b+24|0;f=b+48|0;g=c[13898]|0;if((g|0)!=2){a[232616]=0;a[232304]=0;c[58074]=1;a[232648]=0;a[232640]=0;c[58078]=0;h[29067]=10.0;h[29036]=1.0;c[58080]=-1;a[232544]=a[116880]|0;a[232545|0]=a[116881|0]|0;a[232546|0]=a[116882|0]|0;a[232547|0]=a[116883|0]|0;a[232548|0]=a[116884|0]|0;a[232549|0]=a[116885|0]|0}j=c[8272]|0;L25696:do{if((g|0)<(j|0)){k=d|0;l=d+8|0;m=g;n=j;L25698:while(1){o=c[1054]|0;p=(a[o+(m*40&-1)|0]&1)==0;L25700:do{if(!p){q=c[o+(m*40&-1)+36>>2]|0;r=o+(m*40&-1)+32|0;s=c[10036]|0;t=0;while(1){if((t|0)>=(q|0)){break}if((a[s+((c[r>>2]|0)+t|0)|0]|0)==(a[t+103664|0]|0)){t=t+1|0}else{break L25700}}if((t|0)==1){break L25696}}}while(0);r=c[58086]|0;L25707:do{if((r|0)==0){u=232344}else{s=c[o+(m*40&-1)+36>>2]|0;q=c[o+(m*40&-1)+32>>2]|0;w=(s|0)>0;x=c[10036]|0;y=232344;z=r;while(1){L25711:do{if(!p){if(w){A=0;B=0;C=q;while(1){D=a[z+A|0]|0;if(D<<24>>24==(a[x+(A+C|0)|0]|0)){E=C;F=B}else{if(D<<24>>24!=36){break L25711}E=C-1|0;F=1}G=A+1|0;if((G|0)<(F+s|0)){A=G;B=F;C=E}else{break}}if((F|0)==0){H=G}else{u=y;break L25707}}else{H=0}C=a[z+H|0]|0;if((C<<24>>24|0)==36|(C<<24>>24|0)==0){u=y;break L25707}}}while(0);C=y+8|0;B=c[C>>2]|0;if((B|0)==0){u=C;break}else{y=C;z=B}}}}while(0);p=c[u+4>>2]|0;L25724:do{if((p|0)==14){r=m+1|0;c[13898]=r;if((r|0)>=(n|0)){break}L25727:do{if((a[o+(r*40&-1)|0]&1)==0){I=c[10036]|0;J=o+(r*40&-1)+32|0}else{z=c[o+(r*40&-1)+36>>2]|0;y=o+(r*40&-1)+32|0;s=c[10036]|0;x=0;while(1){if((x|0)>=(z|0)){break}if((a[s+((c[y>>2]|0)+x|0)|0]|0)==(a[x+103664|0]|0)){x=x+1|0}else{I=s;J=y;break L25727}}if((x|0)==1){break L25724}else{I=s;J=y}}}while(0);if((ca(I+(c[J>>2]|0)|0,21e4,(v=i,i=i+8|0,c[v>>2]=f,v)|0)|0)==1){c[58080]=c[f>>2]}c[13898]=(c[13898]|0)+1}else if((p|0)==4){c[58074]=0;a[232544]=a[116696]|0;a[232545|0]=a[116697|0]|0;a[232546|0]=a[116698|0]|0;a[232547|0]=a[116699|0]|0;a[232548|0]=a[116700|0]|0;a[232549|0]=a[116701|0]|0;a[232550|0]=a[116702|0]|0;c[13898]=m+1}else if((p|0)==0){a[232616]=0;c[13898]=m+1}else if((p|0)==9){c[58074]=2;c[58078]=1;c[13898]=m+1}else if((p|0)==3){a[232304]=0;c[13898]=m+1}else if((p|0)==1){a[232616]=1;c[13898]=m+1}else if((p|0)==8){c[58074]=2;c[58078]=2;c[13898]=m+1}else if((p|0)==7){c[58074]=2;a[232648]=1;c[13898]=m+1}else if((p|0)==15){c[58080]=-1;c[13898]=m+1}else if((p|0)==2){a[232304]=1;c[13898]=m+1}else if((p|0)==5){c[58074]=1;c[13898]=m+1}else if((p|0)==6){c[58074]=2;c[13898]=m+1}else if((p|0)==16){r=m+1|0;c[13898]=r;if((r|0)>=(n|0)){break}L25751:do{if((a[o+(r*40&-1)|0]&1)!=0){z=c[o+(r*40&-1)+36>>2]|0;q=o+(r*40&-1)+32|0;w=c[10036]|0;t=0;while(1){if((t|0)>=(z|0)){break}if((a[w+((c[q>>2]|0)+t|0)|0]|0)==(a[t+103664|0]|0)){t=t+1|0}else{break L25751}}if((t|0)==1){break L25724}}}while(0);r=is(e)|0;q=c[r>>2]|0;if((q|0)==3){K=+uz(c[r+8>>2]|0,0)}else if((q|0)==1){K=+(c[r+8>>2]|0)}else if((q|0)==2){K=+h[r+8>>3]}else{L=19304;break L25698}h[29036]=K}else if((p|0)==10){c[58078]=0;c[13898]=m+1}else if((p|0)==11){c[58074]=2;a[232640]=1;c[13898]=m+1}else if((p|0)==12){r=m+1|0;c[13898]=r;M=r;L=19307}else{M=m;L=19307}}while(0);L25766:do{if((L|0)==19307){L=0;L25768:do{if((M|0)<(n|0)){L25770:do{if((a[o+(M*40&-1)|0]&1)!=0){r=c[o+(M*40&-1)+36>>2]|0;q=o+(M*40&-1)+32|0;w=c[10036]|0;z=0;while(1){if((z|0)>=(r|0)){break}if((a[w+((c[q>>2]|0)+z|0)|0]|0)==(a[z+103664|0]|0)){z=z+1|0}else{break L25770}}if((z|0)==1){N=M;break L25768}}}while(0);a[14176]=1;is(d);a[14176]=0;if((c[k>>2]|0)!=3){c[13898]=M;N=M;break}t=c[l>>2]|0;if((t|0)==0){N=c[13898]|0;break}q=bk(t|0,148464)|0;if((q|0)>0){uF(232544,t|0,51);a[q+232544|0]=0}if((a[t+q|0]|0)==44){w=t+(q+1|0)|0;ca(w|0,148448,(v=i,i=i+8|0,c[v>>2]=232536,v)|0)}uu(t);break L25766}else{N=M}}while(0);if((p|0)==12){L=19324;break L25698}if((N|0)>=(c[8272]|0)){break}t=c[1054]|0;L25792:do{if((a[t+(N*40&-1)|0]&1)!=0){w=c[t+(N*40&-1)+36>>2]|0;q=t+(N*40&-1)+32|0;r=c[10036]|0;y=0;while(1){if((y|0)>=(w|0)){break}if((a[r+((c[q>>2]|0)+y|0)|0]|0)==(a[y+103664|0]|0)){y=y+1|0}else{break L25792}}if((y|0)==1){break L25766}}}while(0);t=is(e)|0;q=c[t>>2]|0;if((q|0)==1){O=+(c[t+8>>2]|0)}else if((q|0)==2){O=+h[t+8>>3]}else if((q|0)==3){O=+uz(c[t+8>>2]|0,0)}else{L=19335;break L25698}h[29067]=O;c[13898]=(c[13898]|0)+1}}while(0);m=c[13898]|0;n=c[8272]|0;if((m|0)>=(n|0)){break L25696}}if((L|0)==19304){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==19324){uf(N,116592,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((L|0)==19335){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);O=+h[29067];do{if(O<5.0){h[29067]=5.0;P=12.0e3}else{if(O>99.99){h[29067]=99.99;P=239976.0;break}else{P=O*2400.0;break}}}while(0);c[(c[3524]|0)+16>>2]=~~(P*+h[29036]*11.0/720.0);P=+h[29067]*2400.0*+h[29036];if((c[58074]|0)==0){c[(c[3524]|0)+20>>2]=~~(P*6.0/720.0+.5)}else{c[(c[3524]|0)+20>>2]=~~(P*5.3/720.0+.5)}L=c[58078]|0;N=a[232616]|0?116440:116408;e=a[232304]|0?131504:131584;M=c[58074]|0;d=(M|0)==0;if((L|0)==0){if(d){Q=136208}else{Q=(M|0)==2?116352:179864}f=a[232648]|0?116296:179864;J=a[232640]|0?116192:179864;P=+h[29036];O=+h[29067];I=c[58080]|0;u=(I|0)>-1?179864:136208;be(13048,116512,(v=i,i=i+80|0,c[v>>2]=N,c[v+8>>2]=e,c[v+16>>2]=Q,c[v+24>>2]=f,c[v+32>>2]=J,h[v+40>>3]=P,c[v+48>>2]=232544,h[v+56>>3]=O,c[v+64>>2]=u,c[v+72>>2]=I,v)|0);i=b;return}else{if(d){R=136208}else{R=(M|0)==2?116352:179864}M=a[232648]|0?116296:179864;d=a[232640]|0?116192:179864;O=+h[29036];I=(L|0)==1?115960:115816;L=c[58080]|0;u=(L|0)>-1?179864:136208;be(13048,116072,(v=i,i=i+72|0,c[v>>2]=N,c[v+8>>2]=e,c[v+16>>2]=R,c[v+24>>2]=M,c[v+32>>2]=d,h[v+40>>3]=O,c[v+48>>2]=I,c[v+56>>2]=u,c[v+64>>2]=L,v)|0);i=b;return}}function sp(a){a=a|0;c[58158]=a;return 1}function sq(a){a=a|0;c[58130]=a;return 1}function sr(a){a=a|0;return 0}function ss(){return}function st(){var b=0,d=0,e=0,f=0,g=0.0,j=0,k=0;b=i;i=i+8|0;d=b|0;cG(d|0);c[58082]=0;c[58084]=0;e=c[10030]|0;f=bg(aN(d|0)|0)|0;cf(e|0,122032,(v=i,i=i+8|0,c[v>>2]=f,v)|0);f=c[58080]|0;if((f|0)>-1){e=c[10030]|0;cf(e|0,121880,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}if((c[58074]|0)==2){f=c[10030]|0;aI(121552,247,1,f|0);f=c[10030]|0;if(a[232648]|0){aI(121472,33,1,f|0)}else{aI(121408,24,1,f|0)}f=c[58078]|0;if((f|0)==2){e=c[10030]|0;aI(120992,174,1,e|0)}else if((f|0)==1){aI(121240,124,1,c[10030]|0)}if(a[232640]|0){f=c[10030]|0;aI(120888,54,1,f|0)}f=c[10030]|0;aI(120824,31,1,f|0)}aI(120464,227,1,c[10030]|0);cf(c[10030]|0,120328,(v=i,i=i+8|0,h[v>>3]=+h[29036],v)|0);aI(119968,246,1,c[10030]|0);f=c[58074]|0;if((f|0)==0){e=c[10030]|0;g=+h[29067];cf(e|0,119792,(v=i,i=i+16|0,c[v>>2]=232544,h[v+8>>3]=g,v)|0)}else if((f|0)!=2){aI(119656,82,1,c[10030]|0);g=+h[29067];cf(c[10030]|0,119576,(v=i,i=i+16|0,c[v>>2]=232544,h[v+8>>3]=g,v)|0)}aI(119448,91,1,c[10030]|0);f=c[10030]|0;if(a[232616]|0){aI(119328,18,1,f|0)}else{aI(119248,19,1,f|0)}f=c[10030]|0;if(a[232304]|0){aI(119168,20,1,f|0);j=c[10030]|0;k=aI(117096,1968,1,j|0)|0;i=b;return}else{aI(119128,19,1,f|0);j=c[10030]|0;k=aI(117096,1968,1,j|0)|0;i=b;return}}function su(){var a=0,b=0;if((c[58074]|0)!=2){a=c[10030]|0;b=aI(122176,5,1,a|0)|0;return}aI(122728,10,1,c[10030]|0);aI(122648,12,1,c[10030]|0);aI(122520,16,1,c[10030]|0);aI(122424,5,1,c[10030]|0);aI(122312,10,1,c[10030]|0);a=c[10030]|0;b=aI(122176,5,1,a|0)|0;return}function sv(){var b=0;if(a[232528]|0){a[232528]=0;b=c[10030]|0;aI(125976,2,1,b|0)}aI(122792,8,1,c[10030]|0);return}function sw(){var b=0,d=0,e=0.0;b=i;c[58126]=-2;h[29062]=1.0;h[29061]=+h[3817];cf(c[10030]|0,123376,(v=i,i=i+24|0,c[v>>2]=c[58156],h[v+8>>3]=5.0,h[v+16>>3]=3.0,v)|0);d=c[3524]|0;e=+((c[d+12>>2]|0)>>>0>>>0)/10.0;cf(c[10030]|0,123080,(v=i,i=i+16|0,h[v>>3]=+((c[d+8>>2]|0)>>>0>>>0)/10.0,h[v+8>>3]=e,v)|0);cf(c[10030]|0,122896,(v=i,i=i+8|0,h[v>>3]=+h[3817],v)|0);c[58156]=(c[58156]|0)+1;a[232608]=0;i=b;return}function sx(b,d){b=b|0;d=d|0;var e=0;if((c[58084]|0)==(b|0)&(c[58082]|0)==(d|0)){return}if(a[232528]|0){a[232528]=0;e=c[10030]|0;aI(125976,2,1,e|0)}c[58084]=b;c[58082]=d;return}function sy(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0.0,l=0.0;e=i;f=c[58084]|0;g=c[58082]|0;if((f|0)==(b|0)&(g|0)==(d|0)){i=e;return}do{if(a[232528]|0){j=c[58128]|0;c[58128]=j+1;if((j|0)<=4){break}j=c[10030]|0;aF(10,j|0);c[58128]=1}else{a[232528]=1;j=c[10030]|0;k=+(f|0)/10.0;l=+(g|0)/10.0;cf(j|0,123728,(v=i,i=i+16|0,h[v>>3]=k,h[v+8>>3]=l,v)|0);c[58128]=2}}while(0);c[58084]=b;c[58082]=d;cf(c[10030]|0,123552,(v=i,i=i+16|0,h[v>>3]=+(b|0)/10.0,h[v+8>>3]=+(d|0)/10.0,v)|0);i=e;return}function sz(b){b=b|0;var d=0,e=0;d=i;if((b|0)>7){e=(b|0)%8&-1}else{e=b}if(a[232528]|0){a[232528]=0;b=c[10030]|0;aI(125976,2,1,b|0)}do{if(a[232608]|0){c[58126]=e+1;a[232608]=0}else{if((c[58126]|0)!=(e|0)){break}i=d;return}}while(0);cf(c[10030]|0,123808,(v=i,i=i+8|0,c[v>>2]=e,v)|0);c[58126]=e;i=d;return}function sA(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0;f=i;if((e|0)==0){i=f;return}if((a[e]|0)==0){i=f;return}g=bP(e|0)|0;if(a[232528]|0){a[232528]=0;e=c[10030]|0;aI(125976,2,1,e|0)}e=c[58130]|0;if((e|0)==0){j=1}else if((e|0)==1){j=2}else if((e|0)==2){j=3}else{j=0}e=c[58074]|0;do{if((e|0)==0){k=a[g]|0;L25932:do{if(k<<24>>24!=0){l=0;m=k;while(1){if(m<<24>>24==34){a[g+l|0]=39}n=l+1|0;if(n>>>0>=(uA(g|0)|0)>>>0){break L25932}l=n;m=a[g+n|0]|0}}}while(0);k=c[10030]|0;if(a[232600]|0){o=+h[29067];p=+(b>>>0>>>0)/10.0;q=+(d>>>0>>>0)/10.0;m=c[58158]|0;cf(k|0,124232,(v=i,i=i+56|0,c[v>>2]=g,c[v+8>>2]=232544,h[v+16>>3]=o,h[v+24>>3]=p,h[v+32>>3]=q,c[v+40>>2]=m,c[v+48>>2]=j,v)|0);break}else{q=+(b>>>0>>>0)/10.0;p=+(d>>>0>>>0)/10.0;m=c[58158]|0;cf(k|0,124152,(v=i,i=i+40|0,c[v>>2]=g,h[v+8>>3]=q,h[v+16>>3]=p,c[v+24>>2]=m,c[v+32>>2]=j,v)|0);break}}else{if(!(a[232600]|0)){m=c[10030]|0;p=+(b>>>0>>>0)/10.0;q=+(d>>>0>>>0)/10.0;k=c[58158]|0;cf(m|0,123912,(v=i,i=i+40|0,c[v>>2]=g,h[v+8>>3]=p,h[v+16>>3]=q,c[v+24>>2]=k,c[v+32>>2]=j,v)|0);break}k=c[10030]|0;if((e|0)==2){q=+(b>>>0>>>0)/10.0;p=+(d>>>0>>>0)/10.0;m=c[58158]|0;cf(k|0,123912,(v=i,i=i+40|0,c[v>>2]=g,h[v+8>>3]=q,h[v+16>>3]=p,c[v+24>>2]=m,c[v+32>>2]=j,v)|0);break}else{p=+h[29067];q=+(b>>>0>>>0)/10.0;o=+(d>>>0>>>0)/10.0;m=c[58158]|0;cf(k|0,123992,(v=i,i=i+56|0,c[v>>2]=232544,h[v+8>>3]=p,c[v+16>>2]=g,h[v+24>>3]=q,h[v+32>>3]=o,c[v+40>>2]=m,c[v+48>>2]=j,v)|0);break}}}while(0);uu(g);i=f;return}function sB(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0;f=i;if(a[232528]|0){a[232528]=0;g=c[10030]|0;aI(125976,2,1,g|0)}if((e|0)>9){j=(e|0)%10&-1}else{j=e}cf(c[10030]|0,124360,(v=i,i=i+24|0,c[v>>2]=j,h[v+8>>3]=+(b>>>0>>>0)/10.0,h[v+16>>3]=+(d>>>0>>>0)/10.0,v)|0);i=f;return}function sC(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0;j=i;if(!((c[58084]|0)==(b|0)&(c[58082]|0)==(d|0))){if(a[232528]|0){a[232528]=0;k=c[10030]|0;aI(125976,2,1,k|0)}c[58084]=b;c[58082]=d}if((g|0)!=0){k=c[10030]|0;l=(g|0)==1?124720:124632;m=+(b>>>0>>>0)/10.0;n=+(d>>>0>>>0)/10.0;o=+(e>>>0>>>0)/10.0;p=+(f>>>0>>>0)/10.0;cf(k|0,124776,(v=i,i=i+40|0,c[v>>2]=l,h[v+8>>3]=m,h[v+16>>3]=n,h[v+24>>3]=o,h[v+32>>3]=p,v)|0);c[58084]=e;c[58082]=f;i=j;return}if((b|0)==(e|0)&(d|0)==(f|0)){c[58084]=e;c[58082]=f;i=j;return}cf(c[10030]|0,124504,(v=i,i=i+32|0,h[v>>3]=+(b>>>0>>>0)/10.0,h[v+8>>3]=+(d>>>0>>>0)/10.0,h[v+16>>3]=+(e>>>0>>>0)/10.0,h[v+24>>3]=+(f>>>0>>>0)/10.0,v)|0);c[58084]=e;c[58082]=f;i=j;return}function sD(b){b=b|0;var d=0,e=0,f=0,g=0,j=0.0;d=i;do{if((a[b]|0)==0){e=0}else{f=bk(b|0,148464)|0;if(f>>>0<51){uF(232544,b|0,51)}g=b+(f+1|0)|0;ca(g|0,148448,(v=i,i=i+8|0,c[v>>2]=232536,v)|0);j=+h[29067];if(j<5.0){h[29067]=5.0;e=1;break}if(j<100.0){e=1;break}h[29067]=99.99;e=1}}while(0);a[232600]=e;i=d;return 1}function sE(b){b=+b;var d=0,e=0.0,f=0;d=i;e=b<0.0?1.0:b;if(+h[29061]==e){i=d;return}if(a[232528]|0){a[232528]=0;f=c[10030]|0;aI(125976,2,1,f|0)}cf(c[10030]|0,124896,(v=i,i=i+8|0,h[v>>3]=e,v)|0);h[29061]=e;i=d;return}function sF(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0;j=i;k=b>>4;l=b&15;if(a[232528]|0){a[232528]=0;b=c[10030]|0;aI(125976,2,1,b|0)}if((l|0)==0){b=c[10030]|0;m=+(d>>>0>>>0)/10.0;n=+(e>>>0>>>0)/10.0;o=+((f+d|0)>>>0>>>0)/10.0;p=+((g+e|0)>>>0>>>0)/10.0;cf(b|0,125216,(v=i,i=i+64|0,h[v>>3]=m,h[v+8>>3]=n,h[v+16>>3]=o,h[v+24>>3]=n,h[v+32>>3]=o,h[v+40>>3]=p,h[v+48>>3]=m,h[v+56>>3]=p,v)|0);i=j;return}else if((l|0)==2|(l|0)==5){q=k*12&-1}else{q=k}if((q|0)<100){p=+(100-q|0)*.01;q=c[10030]|0;m=1.0-p;cf(q|0,126664,(v=i,i=i+16|0,h[v>>3]=m,h[v+8>>3]=p,v)|0);a[232608]=1}else{q=c[10030]|0;aI(126536,25,1,q|0)}p=+(d>>>0>>>0)/10.0;m=+(e>>>0>>>0)/10.0;o=+((f+d|0)>>>0>>>0)/10.0;n=+((g+e|0)>>>0>>>0)/10.0;cf(c[10030]|0,124968,(v=i,i=i+64|0,h[v>>3]=p,h[v+8>>3]=m,h[v+16>>3]=o,h[v+24>>3]=m,h[v+32>>3]=o,h[v+40>>3]=n,h[v+48>>3]=p,h[v+56>>3]=n,v)|0);i=j;return}function sG(b){b=+b;var d=0,e=0;d=i;if(+h[29062]==b){i=d;return}if(a[232528]|0){a[232528]=0;e=c[10030]|0;aI(125976,2,1,e|0)}cf(c[10030]|0,125384,(v=i,i=i+8|0,h[v>>3]=b,v)|0);h[29062]=b;i=d;return}function sH(b){b=b|0;var d=0,e=0,f=0.0,g=0,j=0.0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0;d=i;i=i+24|0;e=d|0;f=+h[b+8>>3];a[232608]=1;if(a[232528]|0){a[232528]=0;g=c[10030]|0;aI(125976,2,1,g|0)}if(!(a[232616]|0)){j=f<.001?0.0:f;g=c[10030]|0;cf(g|0,125848,(v=i,i=i+8|0,h[v>>3]=j,v)|0);i=d;return}g=b|0;k=c[g>>2]|0;if((k|0)==1){l=c[b+4>>2]|0;if((l|0)>7){m=(l|0)%8&-1}else{m=l}do{if((m|0)==-1){l=c[10030]|0;aI(125736,21,1,l|0)}else{if((m|0)<=-1){break}l=c[10030]|0;cf(l|0,125576,(v=i,i=i+8|0,c[v>>2]=m,v)|0)}}while(0);n=c[g>>2]|0}else{n=k}if((n|0)==5){k=c[5169]|0;do{if((k|0)==0){o=f}else{j=+(k|0);if(f>=+(k-1|0)/j){o=1.0;break}o=+O(+(f*j))/j}}while(0);fq(o,e);p=+h[e>>3]}else if((n|0)==3){n=c[b+4>>2]|0;o=+(n>>>16&255|0)/255.0;h[e>>3]=o;h[e+8>>3]=+(n>>>8&255|0)/255.0;h[e+16>>3]=+(n&255|0)/255.0;p=o}else{i=d;return}n=e|0;if(p<1.0e-4){h[n>>3]=0.0}b=e+8|0;p=+h[b>>3];if(p<1.0e-4){h[b>>3]=0.0;q=0.0}else{q=p}b=e+16|0;p=+h[b>>3];if(p<1.0e-4){h[b>>3]=0.0;r=0.0}else{r=p}cf(c[10030]|0,125464,(v=i,i=i+24|0,h[v>>3]=+h[n>>3],h[v+8>>3]=q,h[v+16>>3]=r,v)|0);i=d;return}function sI(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0,q=0;e=i;f=c[d+8>>2]|0;g=f>>4;j=f&15;if(a[232528]|0){a[232528]=0;f=c[10030]|0;aI(125976,2,1,f|0)}if((j|0)==0){f=c[10030]|0;aI(126768,23,1,f|0)}else if((j|0)==1|(j|0)==4){k=g;l=19531}else if((j|0)==2|(j|0)==5){k=g*12&-1;l=19531}do{if((l|0)==19531){if((k|0)<100){m=+(100-k|0)*.01;g=c[10030]|0;n=1.0-m;cf(g|0,126664,(v=i,i=i+16|0,h[v>>3]=n,h[v+8>>3]=m,v)|0);break}else{g=c[10030]|0;aI(126536,25,1,g|0);break}}}while(0);aI(126432,5,1,c[10030]|0);k=c[10030]|0;if((b|0)<=0){o=k;p=aI(126072,27,1,o|0)|0;i=e;return}l=b-1|0;g=0;j=k;while(1){m=+(c[d+(g*12&-1)+4>>2]|0)/10.0;k=g+1|0;if((g|0)<(l|0)){q=((k|0)%5&-1|0)==0?126232:126152}else{q=126152}cf(j|0,126296,(v=i,i=i+24|0,h[v>>3]=+(c[d+(g*12&-1)>>2]|0)/10.0,h[v+8>>3]=m,c[v+16>>2]=q,v)|0);f=c[10030]|0;if((k|0)<(b|0)){g=k;j=f}else{o=f;break}}p=aI(126072,27,1,o|0)|0;i=e;return}function sJ(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0.0,T=0,U=0,V=0,W=0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ab=0.0,ac=0,ad=0,ae=0,af=0;b=i;i=i+1184|0;d=b|0;e=b+8|0;f=b+32|0;j=b+56|0;k=b+1112|0;l=b+1120|0;m=b+1128|0;n=b+80|0;uE(n|0,0,1025);o=c[13898]|0;p=c[8272]|0;L26069:do{if((o|0)<(p|0)){q=f|0;r=f+8|0;s=m|0;t=e|0;u=e+8|0;w=m+50|0;x=o;y=p;L26071:while(1){z=c[1054]|0;A=(a[z+(x*40&-1)|0]&1)==0;L26073:do{if(!A){B=c[z+(x*40&-1)+36>>2]|0;C=z+(x*40&-1)+32|0;D=c[10036]|0;E=0;while(1){if((E|0)>=(B|0)){break}if((a[D+((c[C>>2]|0)+E|0)|0]|0)==(a[E+103664|0]|0)){E=E+1|0}else{break L26073}}if((E|0)==1){break L26069}}}while(0);C=c[60336]|0;L26080:do{if((C|0)==0){F=241344}else{D=c[z+(x*40&-1)+36>>2]|0;B=c[z+(x*40&-1)+32>>2]|0;G=(D|0)>0;H=c[10036]|0;I=241344;J=C;while(1){L26084:do{if(!A){if(G){K=0;L=0;M=B;while(1){N=a[J+K|0]|0;if(N<<24>>24==(a[H+(K+M|0)|0]|0)){O=M;P=L}else{if(N<<24>>24!=36){break L26084}O=M-1|0;P=1}Q=K+1|0;if((Q|0)<(P+D|0)){K=Q;L=P;M=O}else{break}}if((P|0)==0){R=Q}else{F=I;break L26080}}else{R=0}M=a[J+R|0]|0;if((M<<24>>24|0)==36|(M<<24>>24|0)==0){F=I;break L26080}}}while(0);M=I+8|0;L=c[M>>2]|0;if((L|0)==0){F=M;break}else{I=M;J=L}}}}while(0);A=c[F+4>>2]|0;L26097:do{if((A|0)==21){c[13898]=x+1;C=is(j)|0;J=c[C>>2]|0;if((J|0)==2){S=+h[C+8>>3]}else if((J|0)==3){S=+uz(c[C+8>>2]|0,0)}else if((J|0)==1){S=+(c[C+8>>2]|0)}else{T=19615;break L26071}h[30158]=S}else if((A|0)==7){U=x+1|0;c[13898]=U;if((U|0)>=(y|0)){V=U;T=19660;break L26071}L26106:do{if((a[z+(U*40&-1)|0]&1)!=0){C=c[z+(U*40&-1)+36>>2]|0;J=z+(U*40&-1)+32|0;I=c[10036]|0;D=0;while(1){if((D|0)>=(C|0)){break}if((a[I+((c[J>>2]|0)+D|0)|0]|0)==(a[D+103664|0]|0)){D=D+1|0}else{break L26106}}if((D|0)==1){V=U;T=19662;break L26071}}}while(0);a[14176]=1;is(f);a[14176]=0;if((c[q>>2]|0)!=3){T=19578;break L26071}J=c[r>>2]|0;if((J|0)==0){T=19580;break L26071}I=c[60308]|0;if((I|0)!=0){uu(I);c[60308]=0}if((a[J]|0)==0){uu(J);break}else{c[60308]=J;break}}else if((A|0)==4){c[13898]=x+1;a[241228]=1}else if((A|0)==27){uE(s|0,0,51);J=x+1|0;c[13898]=J;if((J|0)>=(y|0)){break}L26124:do{if((a[z+(J*40&-1)|0]&1)!=0){I=c[z+(J*40&-1)+36>>2]|0;C=z+(J*40&-1)+32|0;H=c[10036]|0;B=0;while(1){if((B|0)>=(I|0)){break}if((a[H+((c[C>>2]|0)+B|0)|0]|0)==(a[B+103664|0]|0)){B=B+1|0}else{break L26124}}if((B|0)==1){break L26097}}}while(0);a[14176]=1;is(e);a[14176]=0;if((c[t>>2]|0)!=3){c[13898]=J;break}C=c[u>>2]|0;if((C|0)==0){break}h[d>>3]=0.0;H=bh(C|0,44)|0;if((H|0)==0){W=uA(C|0)|0;X=0.0}else{I=H+1|0;ca(I|0,148448,(v=i,i=i+8|0,c[v>>2]=d,v)|0);W=H-C|0;X=+h[d>>3]}H=W>>>0>50?50:W;uD(s|0,C|0,H);a[m+H|0]=0;uF(241280,s|0,51);a[w]=0;uu(C);if(X>0.0){h[30167]=X;break}if(X>=0.0){break}h[30167]=12.0}else if((A|0)==11){c[13898]=x+1;a[241237]=1}else if((A|0)==16){c[13898]=x+1;c[60311]=0}else if((A|0)==18){c[13898]=x+1;c[60311]=2}else if((A|0)==1){c[13898]=x+1;C=s4(k,l,2)|0;Y=+(c[10032]|0);Z=+g[k>>2]/Y;h[30151]=Z;_=+g[l>>2]/Y;h[30152]=_;c[60306]=C;if((C|0)!=2){break}h[30151]=Z*2.54;h[30152]=_*2.54}else if((A|0)==19){c[13898]=x+1;C=is(j)|0;H=c[C>>2]|0;if((H|0)==3){$=+uz(c[C+8>>2]|0,0)}else if((H|0)==1){$=+(c[C+8>>2]|0)}else if((H|0)==2){$=+h[C+8>>3]}else{T=19603;break L26071}h[30156]=$}else if((A|0)==0){c[13898]=x+1;C=c[60308]|0;if((C|0)!=0){uu(C);c[60308]=0}uD(241208,241072,136)}else if((A|0)==25){uh(x,134168,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((A|0)==10){c[13898]=x+1;a[241236]=0;C=(c[3524]|0)+96|0;c[C>>2]=c[C>>2]|1024}else if((A|0)==22){c[13898]=x+1;c[60318]=0}else if((A|0)==17){c[13898]=x+1;c[60311]=1}else if((A|0)==2){c[13898]=x+1;h[30151]=5.0;h[30152]=3.0;c[60306]=1}else if((A|0)==3){c[13898]=x+1;a[241228]=0}else if((A|0)==26){c[13898]=x+1;a[241280]=0;h[30167]=12.0}else if((A|0)==8){c[13898]=x+1;C=c[60308]|0;if((C|0)==0){break}uu(C);c[60308]=0}else if((A|0)==14){c[13898]=x+1;c[60310]=1}else if((A|0)==13){c[13898]=x+1;c[60310]=0}else if((A|0)==6){c[13898]=x+1;a[241229]=0}else if((A|0)==20){c[13898]=x+1;C=is(j)|0;H=c[C>>2]|0;if((H|0)==1){aa=+(c[C+8>>2]|0)}else if((H|0)==3){aa=+uz(c[C+8>>2]|0,0)}else if((H|0)==2){aa=+h[C+8>>3]}else{T=19609;break L26071}h[30157]=aa}else if((A|0)==12){c[13898]=x+1;a[241237]=0}else if((A|0)==23){c[13898]=x+1;c[60318]=1}else if((A|0)==5){c[13898]=x+1;a[241229]=1}else if((A|0)==24){c[13898]=x+1;c[60319]=0}else if((A|0)==9){c[13898]=x+1;a[241236]=1;C=(c[3524]|0)+96|0;c[C>>2]=c[C>>2]&-1025}else if((A|0)==15){c[13898]=x+1;c[60310]=2}else{T=19639;break L26071}}while(0);A=c[13898]|0;z=c[8272]|0;if((A|0)<(z|0)){x=A;y=z}else{break L26069}}if((T|0)==19578){c[13898]=U;V=U;uf(V,134392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((T|0)==19639){uf(x,134056,(v=i,i=i+8|0,c[v>>2]=c[c[3524]>>2],v)|0)}else if((T|0)==19603){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((T|0)==19660){uf(V,134392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((T|0)==19662){uf(V,134392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((T|0)==19615){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((T|0)==19580){V=c[13898]|0;uf(V,134392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((T|0)==19609){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}}while(0);aa=+h[30167];h[30211]=aa;c[(c[3524]|0)+16>>2]=~~(aa*2540.0/72.27*+h[30158]+.5);T=c[3524]|0;c[T+20>>2]=~~(+((c[T+16>>2]|0)>>>0>>>0)*.4895+.5);aa=+h[30151];if((c[60306]|0)==1){c[(c[3524]|0)+8>>2]=~~(aa*2540.0+.5);c[(c[3524]|0)+12>>2]=~~(+h[30152]*2540.0+.5)}else{c[(c[3524]|0)+8>>2]=~~(aa*1.0e3+.5);c[(c[3524]|0)+12>>2]=~~(+h[30152]*1.0e3+.5)}T=(c[60306]|0)==1?145600:145440;aa=+h[30152];V=(a[241228]&1)!=0?133784:133640;U=(a[241229]&1)!=0?133504:133320;j=(c[60308]|0)==0?133016:132832;a0(13048,1025,133912,(v=i,i=i+56|0,h[v>>3]=+h[30151],c[v+8>>2]=T,h[v+16>>3]=aa,c[v+24>>2]=T,c[v+32>>2]=V,c[v+40>>2]=U,c[v+48>>2]=j,v)|0);if((c[60308]|0)!=0){j=1025-(uA(13048)|0)|0;ck(13048,132696,j|0);j=c[60308]|0;U=1025-(uA(13048)|0)|0;ck(13048,j|0,U|0);U=1025-(uA(13048)|0)|0;ck(13048,132584,U|0)}U=(a[241236]&1)!=0?132472:132384;ck(13048,U|0,1025-(uA(13048)|0)|0);U=c[60310]|0;if((U|0)==1){j=1025-(uA(13048)|0)|0;ck(13048,132112,j|0)}else if((U|0)==0){ck(13048,132272,1025-(uA(13048)|0)|0)}else if((U|0)==2){ck(13048,132032,1025-(uA(13048)|0)|0)}U=c[60311]|0;if((U|0)==0){j=1025-(uA(13048)|0)|0;ck(13048,137232,j|0)}else if((U|0)==2){ck(13048,137168,1025-(uA(13048)|0)|0)}else if((U|0)==1){ck(13048,131936,1025-(uA(13048)|0)|0)}aa=+h[30156];$=+h[30157];X=+h[30158];a0(n|0,1025,131664,(v=i,i=i+32|0,c[v>>2]=(a[241237]&1)!=0?131584:131504,h[v+8>>3]=aa,h[v+16>>3]=$,h[v+24>>3]=X,v)|0);ck(13048,n|0,1025-(uA(13048)|0)|0);U=c[60318]|0;if((U|0)==1){j=1025-(uA(13048)|0)|0;ck(13048,131408,j|0);ab=+h[30167];ac=a0(n|0,1025,131176,(v=i,i=i+16|0,c[v>>2]=241280,h[v+8>>3]=ab,v)|0)|0;ad=uA(13048)|0;ae=1025-ad|0;af=ck(13048,n|0,ae|0)|0;i=b;return}else if((U|0)==0){ck(13048,131240,1025-(uA(13048)|0)|0);ab=+h[30167];ac=a0(n|0,1025,131176,(v=i,i=i+16|0,c[v>>2]=241280,h[v+8>>3]=ab,v)|0)|0;ad=uA(13048)|0;ae=1025-ad|0;af=ck(13048,n|0,ae|0)|0;i=b;return}else{ab=+h[30167];ac=a0(n|0,1025,131176,(v=i,i=i+16|0,c[v>>2]=241280,h[v+8>>3]=ab,v)|0)|0;ad=uA(13048)|0;ae=1025-ad|0;af=ck(13048,n|0,ae|0)|0;i=b;return}}function sK(a){a=a|0;c[60468]=a;return 1}function sL(a){a=a|0;c[60416]=a;return 1}function sM(a){a=a|0;if((a|0)!=0){c[60410]=a}return 0}function sN(){var b=0,d=0,e=0,f=0,g=0.0,j=0.0;b=i;i=i+112|0;d=b|0;cG(d|0);c[60256]=0;c[60258]=0;c[60266]=0;a[241056]=0;c[60464]=0;c[60418]=0;cf(c[10030]|0,140680,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);do{if((a[241229]&1)!=0){e=b+8|0;if((bw(e|0,100,140512,aN(d|0)|0)|0)==0){break}f=c[10030]|0;cf(f|0,140320,(v=i,i=i+8|0,c[v>>2]=e,v)|0)}}while(0);aF(10,c[10030]|0);cf(c[10030]|0,139952,(v=i,i=i+40|0,c[v>>2]=40152,c[v+8>>2]=40160,c[v+16>>2]=240968,c[v+24>>2]=103960,c[v+32>>2]=240976,v)|0);cf(c[10030]|0,139760,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);if((a[241228]&1)==0){i=b;return}if((c[11252]|0)==15){d=c[10030]|0;aI(139560,25,1,d|0)}aI(139312,24,1,c[10030]|0);if((a[241236]&1)!=0){d=c[10030]|0;aI(139136,30,1,d|0)}d=c[60308]|0;if((d|0)!=0){e=c[10030]|0;cf(e|0,154696,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}g=+h[30167];if(g==12.0){j=g}else{d=c[10030]|0;cf(d|0,138800,(v=i,i=i+8|0,h[v>>3]=g,v)|0);j=+h[30167]}d=(a[241280]|0)!=0?148464:179864;cf(c[10030]|0,138568,(v=i,i=i+24|0,c[v>>2]=241280,c[v+8>>2]=d,h[v+16>>3]=j,v)|0);aI(138336,39,1,c[10030]|0);aI(138080,9,1,c[10030]|0);d=c[60310]|0;if((d|0)==1){e=c[10030]|0;aI(137776,7,1,e|0)}else if((d|0)==2){aI(137632,7,1,c[10030]|0)}else if((d|0)==0){aI(137912,7,1,c[10030]|0)}cf(c[10030]|0,137496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);aI(137328,12,1,c[10030]|0);d=c[60311]|0;if((d|0)==1){e=c[10030]|0;aI(137776,7,1,e|0)}else if((d|0)==2){aI(137168,7,1,c[10030]|0)}else if((d|0)==0){aI(137232,4,1,c[10030]|0)}cf(c[10030]|0,137008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cf(c[10030]|0,136744,(v=i,i=i+8|0,c[v>>2]=(a[241237]&1)!=0?136424:136208,v)|0);cf(c[10030]|0,136008,(v=i,i=i+8|0,h[v>>3]=+h[30156],v)|0);cf(c[10030]|0,135744,(v=i,i=i+8|0,h[v>>3]=+h[30157],v)|0);cf(c[10030]|0,135608,(v=i,i=i+8|0,h[v>>3]=+h[30158],v)|0);cf(c[10030]|0,135456,(v=i,i=i+8|0,c[v>>2]=(c[60318]|0)==0?135312:135192,v)|0);cf(c[10030]|0,134944,(v=i,i=i+8|0,c[v>>2]=(c[60418]|0)==0?134816:134640,v)|0);aI(134536,13,1,c[10030]|0);i=b;return}function sO(){var b=0;b=c[10030]|0;if((a[241228]&1)==0){aI(140840,10,1,b|0);return}else{aI(140968,10,1,b|0);return}}function sP(){var b=0;if((c[60266]|0)!=0){s2()}aI(141472,55,1,c[10030]|0);b=c[10030]|0;if((a[241228]&1)==0){aI(141112,20,1,b|0);return}else{aI(141320,17,1,b|0);return}}function sQ(){var b=0,d=0,e=0,f=0,g=0.0,j=0.0,k=0.0,l=0,m=0;b=i;d=(a[241228]&1)==0;e=c[10030]|0;f=(c[60464]|0)+1|0;c[60464]=f;if(d){cf(e|0,146344,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}else{cf(e|0,146528,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}cf(c[10030]|0,146160,(v=i,i=i+8|0,c[v>>2]=40152,v)|0);cf(c[10030]|0,145992,(v=i,i=i+8|0,c[v>>2]=240968,v)|0);g=+h[30151];f=(c[60306]|0)==1;j=f?2.54:1.0;k=+h[30152];e=f?145600:145440;cf(c[10030]|0,145792,(v=i,i=i+48|0,h[v>>3]=g*j,h[v+8>>3]=k*j,h[v+16>>3]=g,c[v+24>>2]=e,h[v+32>>3]=k,c[v+40>>2]=e,v)|0);e=c[10030]|0;if((c[60418]|0)==0){cf(e|0,145080,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{cf(e|0,144816,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}cf(c[10030]|0,144624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cf(c[10030]|0,144392,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cf(c[10030]|0,144624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cf(c[10030]|0,144136,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cf(c[10030]|0,144008,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cf(c[10030]|0,143912,(v=i,i=i+8|0,h[v>>3]=+h[30158],v)|0);cf(c[10030]|0,143832,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cf(c[10030]|0,143688,(v=i,i=i+8|0,h[v>>3]=+h[30204],v)|0);cf(c[10030]|0,143472,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cf(c[10030]|0,143328,(v=i,i=i+8|0,h[v>>3]=+h[30206],v)|0);cf(c[10030]|0,143184,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);cf(c[10030]|0,144624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);if(!(a[31104]|0)){c[60414]=-3;c[60256]=0;c[60258]=0;c[60266]=0;a[241056]=0;i=b;return}e=c[60410]|0;if((e|0)==0){c[60414]=-3;c[60256]=0;c[60258]=0;c[60266]=0;a[241056]=0;i=b;return}aI(143016,16,1,c[10030]|0);f=c[5163]|0;if((f|0)==103){d=c[10030]|0;aI(142832,16,1,d|0)}else if((f|0)==114){d=c[5165]|0;l=c[5166]|0;cf(c[10030]|0,142624,(v=i,i=i+24|0,c[v>>2]=c[5164],c[v+8>>2]=d,c[v+16>>2]=l,v)|0)}else if((f|0)==100){aI(142352,21,1,c[10030]|0);l=c[e+44>>2]|0;d=c[e+40>>2]|0;aI(142248,7,1,c[10030]|0);if((d|0)>0){e=0;do{if((e|0)>0){m=c[10030]|0;aF(44,m|0)}k=+h[l+(e<<5)+16>>3];g=+h[l+(e<<5)+24>>3];cf(c[10030]|0,142144,(v=i,i=i+24|0,h[v>>3]=+h[l+(e<<5)+8>>3],h[v+8>>3]=k,h[v+16>>3]=g,v)|0);e=e+1|0;}while((e|0)<(d|0));aI(142e3,12,1,c[10030]|0);e=0;do{if((e|0)>0){m=c[10030]|0;aF(44,m|0)}cf(c[10030]|0,141840,(v=i,i=i+8|0,h[v>>3]=+h[l+(e<<5)>>3],v)|0);e=e+1|0;}while((e|0)<(d|0))}else{aI(142e3,12,1,c[10030]|0)}aF(41,c[10030]|0)}else if((f|0)==102){aI(142512,21,1,c[10030]|0)}aI(150696,3,1,c[10030]|0);c[60414]=-3;c[60256]=0;c[60258]=0;c[60266]=0;a[241056]=0;i=b;return}function sR(a,b){a=a|0;b=b|0;if((c[60258]|0)==(a|0)&(c[60256]|0)==(b|0)){return}if((c[60266]|0)!=0){s2()}c[60258]=a;c[60256]=b;return}function sS(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0.0,m=0.0,n=0,o=0;e=i;f=c[60258]|0;g=c[60256]|0;j=c[60266]|0;k=(j|0)==0;if((f|0)==(b|0)&(g|0)==(d|0)){if(!k){i=e;return}a[241056]=1;i=e;return}if(k){a[241056]=0;c[60262]=f;c[60260]=g;c[60266]=2;k=c[10030]|0;l=+(f|0)*.001;m=+(g|0)*.001;cf(k|0,146712,(v=i,i=i+16|0,h[v>>3]=l,h[v+8>>3]=m,v)|0)}else{if((j&3|0)==2){j=c[10030]|0;aI(152656,3,1,j|0);c[60266]=2;n=c[60258]|0;o=c[60256]|0}else{n=f;o=g}g=c[10030]|0;m=+(n|0)*.001;l=+(o|0)*.001;cf(g|0,152248,(v=i,i=i+16|0,h[v>>3]=m,h[v+8>>3]=l,v)|0)}c[60258]=b;c[60256]=d;c[60266]=(c[60266]|0)+1;i=e;return}function sT(b){b=b|0;var d=0;d=i;do{if((c[60414]|0)==(b|0)){if(a[241864]|0){break}i=d;return}}while(0);if((c[60266]|0)!=0){s2()}cf(c[10030]|0,146984,(v=i,i=i+8|0,c[v>>2]=b,v)|0);c[60414]=b;a[241864]=0;i=d;return}function sU(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0;f=i;i=i+32|0;g=f|0;uD(g|0,240992,30);if((e|0)==0){i=f;return}if((a[e]|0)==0){i=f;return}if((c[60266]|0)!=0){s2()}j=c[60416]|0;if((j|0)==2){k=2}else if((j|0)==0){k=1}else{k=0}j=e;while(1){if((a[j]|0)!=32){break}j=j+1|0}cf(c[10030]|0,148128,(v=i,i=i+16|0,h[v>>3]=+(b>>>0>>>0)*.001,h[v+8>>3]=+(d>>>0>>>0)*.001,v)|0);d=c[60468]|0;if((d|0)!=0){b=c[10030]|0;cf(b|0,147984,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}cf(c[10030]|0,147776,(v=i,i=i+8|0,c[v>>2]=g+(k*10&-1),v)|0);if((a[241696]|0)!=0){k=c[10030]|0;cf(k|0,147528,(v=i,i=i+8|0,c[v>>2]=241696,v)|0)}cf(c[10030]|0,147256,(v=i,i=i+8|0,c[v>>2]=j,v)|0);i=f;return}function sV(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=i;if((c[60266]|0)!=0){s2()}cf(c[10030]|0,148360,(v=i,i=i+24|0,h[v>>3]=+(a>>>0>>>0)*.001,h[v+8>>3]=+(b>>>0>>>0)*.001,c[v+16>>2]=d,v)|0);i=e;return}function sW(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;lD(a,b,c,d,e);return}function sX(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0.0,m=0;d=i;i=i+64|0;e=d|0;f=d+8|0;g=f|0;uE(g|0,0,51);h[e>>3]=0.0;j=bh(b|0,44)|0;if((j|0)==0){k=uA(b|0)|0;l=0.0}else{m=j+1|0;ca(m|0,148448,(v=i,i=i+8|0,c[v>>2]=e,v)|0);k=j-b|0;l=+h[e>>3]}h[30210]=l;e=k>>>0>50?50:k;uD(241800,b|0,e);a[e+241800|0]=0;uF(241696,241800,101);l=+h[30210];do{if(l>0.0){h[30211]=l;a0(g|0,51,148688,(v=i,i=i+8|0,h[v>>3]=l,v)|0);e=101-(uA(241696)|0)|0;ck(241696,g|0,e|0);a[f+50|0]=0}else{if(l!=0.0){break}h[30211]=+h[30167]}}while(0);c[(c[3524]|0)+16>>2]=~~(+h[30211]*2540.0/72.27*+h[30158]+.5);f=c[3524]|0;c[f+20>>2]=~~(+((c[f+16>>2]|0)>>>0>>>0)*.4895+.5);l=+h[30151];if((c[60306]|0)==1){c[(c[3524]|0)+8>>2]=~~(l*2540.0+.5);c[(c[3524]|0)+12>>2]=~~(+h[30152]*2540.0+.5);i=d;return 1}else{c[(c[3524]|0)+8>>2]=~~(l*1.0e3+.5);c[(c[3524]|0)+12>>2]=~~(+h[30152]*1.0e3+.5);i=d;return 1}return 0}function sY(a){a=+a;var b=0;b=i;if(+h[30204]==a){i=b;return}if((c[60266]|0)!=0){s2()}cf(c[10030]|0,148808,(v=i,i=i+8|0,h[v>>3]=a,v)|0);h[30204]=a;i=b;return}function sZ(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;g=i;if((c[60266]|0)!=0){s2()}cf(c[10030]|0,148936,(v=i,i=i+32|0,h[v>>3]=+(e>>>0>>>0)*.001,h[v+8>>3]=+(f>>>0>>>0)*.001,h[v+16>>3]=+(b>>>0>>>0)*.001,h[v+24>>3]=+(d>>>0>>>0)*.001,v)|0);s3(a);i=g;return}function s_(a){a=+a;var b=0,d=0.0;b=i;d=a<0.0?1.0:a;if(+h[30206]==d){i=b;return}if((c[60266]|0)!=0){s2()}cf(c[10030]|0,149264,(v=i,i=i+8|0,h[v>>3]=d,v)|0);h[30206]=d;i=b;return}function s$(b){b=b|0;var d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0,p=0,q=0,r=0.0,s=0,t=0.0;d=i;i=i+24|0;e=d|0;if((c[60266]|0)!=0){s2()}f=c[b>>2]|0;if((f|0)==3){g=c[b+4>>2]|0;j=+(g>>>16&255|0)/255.0;k=+(g>>>8&255|0)/255.0;l=+(g&255|0)/255.0;g=c[10030]|0;cf(g|0,149808,(v=i,i=i+24|0,h[v>>3]=j,h[v+8>>3]=k,h[v+16>>3]=l,v)|0);a[241864]=1;i=d;return}else if((f|0)==5){l=+h[b+8>>3];k=l<0.0?0.0:l;l=k>1.0?1.0:k;cf(c[10030]|0,149664,(v=i,i=i+8|0,h[v>>3]=l,v)|0);g=c[5168]|0;L26414:do{if((g|0)==0){m=l}else{k=+O(+(+(g|0)*l))/+(g-1|0);if((c[5163]|0)!=100){m=k;break}n=c[5172]|0;if((n|0)<3&k==0.0){m=k;break}o=c[5173]|0;p=0;j=k;while(1){if((p|0)>=(n|0)){m=j;break L26414}k=+h[o+(p<<5)>>3];q=p+1|0;r=+h[o+(q<<5)>>3];s=r>l;do{if(k<=l&s){if(!(jr)){t=j;break}t=(k+r)*.5}else{t=j}}while(0);if(s){m=t;break}else{p=q;j=t}}}}while(0);fq(m,e);m=+h[e+8>>3];t=+h[e+16>>3];cf(c[10030]|0,149808,(v=i,i=i+24|0,h[v>>3]=+h[e>>3],h[v+8>>3]=m,h[v+16>>3]=t,v)|0);a[241864]=1;i=d;return}else if((f|0)==1){cf(c[10030]|0,150024,(v=i,i=i+8|0,c[v>>2]=c[b+4>>2],v)|0);a[241864]=1;i=d;return}else{uh(-1,149512,(v=i,i=i+8|0,c[v>>2]=f,v)|0);i=d;return}}function s0(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0;d=i;if((a|0)<3){i=d;return}if((c[60266]|0)!=0){s2()}e=b|0;f=a-1|0;g=b+4|0;if((c[e>>2]|0)==(c[b+(f*12&-1)>>2]|0)){j=(c[g>>2]|0)==(c[b+(f*12&-1)+4>>2]|0)?f:a}else{j=a}aI(153544,5,1,c[10030]|0);k=+(c[g>>2]|0)*.001;cf(c[10030]|0,153096,(v=i,i=i+16|0,h[v>>3]=+(c[e>>2]|0)*.001,h[v+8>>3]=k,v)|0);if((j|0)>1){e=1;do{if((e&3|0)==0){g=c[10030]|0;aI(152656,3,1,g|0)}k=+(c[b+(e*12&-1)+4>>2]|0)*.001;cf(c[10030]|0,152248,(v=i,i=i+16|0,h[v>>3]=+(c[b+(e*12&-1)>>2]|0)*.001,h[v+8>>3]=k,v)|0);e=e+1|0;}while((e|0)<(j|0))}aI(151984,9,1,c[10030]|0);s3(c[b+8>>2]|0);i=d;return}function s1(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0.0,x=0.0,y=0.0,z=0,A=0,B=0,C=0.0,D=0,E=0.0,F=0,G=0.0,H=0,I=0;g=i;i=i+24|0;j=g|0;k=e+24|0;l=e|0;do{if((c[k>>2]|0)>(c[l>>2]|0)){m=19853}else{if((c[e+4>>2]|0)>(c[e+28>>2]|0)){m=19853;break}if((c[e+12>>2]|0)>(c[e+36>>2]|0)){m=19853;break}if((c[e+40>>2]|0)>(c[e+16>>2]|0)){m=19853}else{n=0}}}while(0);if((m|0)==19853){n=1}if((c[60418]|0)==1){i=g;return}do{if((f|0)==0){m=c[10030]|0;cf(m|0,159568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);m=aa(b,a);if((m|0)!=0){o=j|0;p=j+8|0;q=j+16|0;r=0;s=0;while(1){if((s|0)>15){t=c[10030]|0;cf(t|0,158976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);u=1}else{u=s+1|0}w=+h[d+(r<<3)>>3];t=c[5168]|0;L26467:do{if((t|0)==0){x=w}else{y=+O(+(w*+(t|0)))/+(t-1|0);if((c[5163]|0)!=100){x=y;break}z=c[5172]|0;if((z|0)<3&y==0.0){x=y;break}A=c[5173]|0;B=0;C=y;while(1){if((B|0)>=(z|0)){x=C;break L26467}y=+h[A+(B<<5)>>3];D=B+1|0;E=+h[A+(D<<5)>>3];F=E>w;do{if(y<=w&F){if(!(CE)){G=C;break}G=(y+E)*.5}else{G=C}}while(0);if(F){x=G;break}else{B=D;C=G}}}}while(0);fq(x,j);t=~~(+h[p>>3]*255.0)&255;B=~~(+h[q>>3]*255.0)&255;cf(c[10030]|0,158504,(v=i,i=i+24|0,c[v>>2]=~~(+h[o>>3]*255.0)&255,c[v+8>>2]=t,c[v+16>>2]=B,v)|0);B=r+1|0;if(B>>>0>>0){r=B;s=u}else{break}}}s=c[10030]|0;aI(157888,3,1,s|0)}else{s=(f|0)==2;r=s?4:3;m=c[10030]|0;cf(m|0,159568,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);m=aa(b,a);o=(m|0)==0;if(!o){q=0;p=0;while(1){if((p|0)>15){B=c[10030]|0;cf(B|0,158976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);H=1}else{H=p+1|0}B=aa(q,r);cf(c[10030]|0,155792,(v=i,i=i+8|0,c[v>>2]=~~(+h[d+(B<<3)>>3]*255.0)&255,v)|0);cf(c[10030]|0,155792,(v=i,i=i+8|0,c[v>>2]=~~(+h[d+(B+1<<3)>>3]*255.0)&255,v)|0);cf(c[10030]|0,155792,(v=i,i=i+8|0,c[v>>2]=~~(+h[d+(B+2<<3)>>3]*255.0)&255,v)|0);B=q+1|0;if(B>>>0>>0){q=B;p=H}else{break}}}p=c[10030]|0;aI(157888,3,1,p|0);if(!s){break}p=c[10030]|0;cf(p|0,154920,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);if(!o){p=0;q=0;while(1){if((q|0)>47){B=c[10030]|0;cf(B|0,158976,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);I=1}else{I=q+1|0}B=c[10030]|0;t=~~(+h[d+(aa(p,r)+3<<3)>>3]*255.0)&255;cf(B|0,155792,(v=i,i=i+8|0,c[v>>2]=t,v)|0);t=p+1|0;if(t>>>0>>0){p=t;q=I}else{break}}}q=c[10030]|0;aI(157888,3,1,q|0)}}while(0);if(n){I=c[10030]|0;aI(154584,14,1,I|0)}I=c[l>>2]|0;x=+((c[e+12>>2]|0)-I|0)*.001;l=c[e+16>>2]|0;G=+((c[e+4>>2]|0)-l|0)*.001;cf(c[10030]|0,154224,(v=i,i=i+48|0,c[v>>2]=b,c[v+8>>2]=a,h[v+16>>3]=x,h[v+24>>3]=G,h[v+32>>3]=+(I|0)*.001,h[v+40>>3]=+(l|0)*.001,v)|0);if(!n){i=g;return}n=c[k>>2]|0;k=c[e+40>>2]|0;G=+((c[e+28>>2]|0)-k|0)*.001;cf(c[10030]|0,153832,(v=i,i=i+32|0,h[v>>3]=+((c[e+36>>2]|0)-n|0)*.001,h[v+8>>3]=G,h[v+16>>3]=+(n|0)*.001,h[v+24>>3]=+(k|0)*.001,v)|0);i=g;return}function s2(){var b=0,d=0,e=0.0,f=0.0,g=0,j=0;b=i;if(a[241056]|0){d=c[10030]|0;e=+(c[60258]|0)*.001;f=+(c[60256]|0)*.001;cf(d|0,150512,(v=i,i=i+16|0,h[v>>3]=e,h[v+8>>3]=f,v)|0);a[241056]=0;c[60266]=0;i=b;return}d=c[60258]|0;g=c[60256]|0;j=c[10030]|0;if((d|0)==(c[60262]|0)&(g|0)==(c[60260]|0)){aI(150352,21,1,j|0);c[60266]=0;i=b;return}else{f=+(d|0)*.001;e=+(g|0)*.001;cf(j|0,150176,(v=i,i=i+16|0,h[v>>3]=f,h[v+8>>3]=e,v)|0);c[60266]=0;i=b;return}}function s3(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0;b=i;d=a>>4;e=(d|0)<0?0:d;f=(e|0)>100?100:e;aI(151736,9,1,c[10030]|0);e=a&15;if((e|0)==1){g=19900}else if((e|0)==5){aI(151568,12,1,c[10030]|0);g=19903}else if((e|0)==2){g=19903}else if((e|0)==4){aI(151568,12,1,c[10030]|0);g=19900}else if((e|0)!=3){aI(150840,11,1,c[10030]|0)}do{if((g|0)==19900){if((f|0)>=100){break}e=c[10030]|0;j=+(f|0)*.01;cf(e|0,151328,(v=i,i=i+8|0,h[v>>3]=j,v)|0)}else if((g|0)==19903){cf(c[10030]|0,151024,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}}while(0);aI(150696,3,1,c[10030]|0);i=b;return}function s4(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0,D=0.0,E=0,F=0,G=0.0,H=0.0,I=0,J=0.0;f=i;i=i+48|0;j=f|0;k=f+24|0;l=c[13898]|0;if((l|0)>=(c[8272]|0)){uf(l,131024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}m=c[1054]|0;L26528:do{if((a[m+(l*40&-1)|0]&1)!=0){n=c[m+(l*40&-1)+36>>2]|0;o=m+(l*40&-1)+32|0;p=c[10036]|0;q=0;while(1){if((q|0)>=(n|0)){break}if((a[p+((c[o>>2]|0)+q|0)|0]|0)==(a[q+103664|0]|0)){q=q+1|0}else{break L26528}}if((q|0)!=1){break}uf(l,131024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}}while(0);l=is(k)|0;m=c[l>>2]|0;if((m|0)==1){r=+(c[l+8>>2]|0)}else if((m|0)==3){r=+uz(c[l+8>>2]|0,0)}else if((m|0)==2){r=+h[l+8>>3]}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}l=k|0;if((c[l>>2]|0)==3){uu(c[k+8>>2]|0);c[l>>2]=1}s=r;g[b>>2]=s;l=c[13898]|0;k=c[1054]|0;m=c[k+(l*40&-1)+36>>2]|0;o=c[k+(l*40&-1)+32>>2]|0;p=(a[k+(l*40&-1)|0]&1)==0;L26545:do{if((m|0)>0&(p^1)){k=c[10036]|0;n=0;t=0;u=o;while(1){if((a[n+130912|0]|0)==(a[k+(n+u|0)|0]|0)){w=u;x=t}else{if((n|0)!=2){y=19929;break L26545}w=u-1|0;x=1}z=n+1|0;if((z|0)<(x+m|0)){n=z;t=x;u=w}else{break}}if((x|0)==0){if(!((n|0)==6|(n|0)==1)){y=19929;break}}c[13898]=l+1;A=+g[b>>2];y=19936}else{y=19929}}while(0);do{if((y|0)==19929){L26559:do{if((c[8272]|0)<=(l|0)|p){y=19935}else{x=c[10036]|0;w=0;while(1){if((w|0)>=(m|0)){break}if((a[x+(o+w|0)|0]|0)==(a[w+145440|0]|0)){w=w+1|0}else{y=19935;break L26559}}if((w|0)!=2){y=19935;break}c[13898]=l+1;B=+g[b>>2]}}while(0);if((y|0)==19935){if((e|0)==1){A=s;y=19936;break}else if((e|0)==2){B=s}else{C=e;break}}g[b>>2]=+(c[10032]|0)/2.54*B;C=2}}while(0);if((y|0)==19936){g[b>>2]=A*+(c[10032]|0);C=1}e=c[13898]|0;l=e+1|0;c[13898]=l;if((c[8272]|0)<=(e|0)){uf(l,131024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}o=c[1054]|0;if((a[o+(e*40&-1)|0]&1)==0){uf(l,131024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}m=c[o+(e*40&-1)+36>>2]|0;p=o+(e*40&-1)+32|0;e=c[10036]|0;o=0;while(1){if((o|0)>=(m|0)){break}if((a[e+((c[p>>2]|0)+o|0)|0]|0)==(a[o+148464|0]|0)){o=o+1|0}else{y=19976;break}}if((y|0)==19976){uf(l,131024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((o|0)!=1){uf(l,131024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}l=is(j)|0;o=c[l>>2]|0;if((o|0)==2){D=+h[l+8>>3]}else if((o|0)==3){D=+uz(c[l+8>>2]|0,0)}else if((o|0)==1){D=+(c[l+8>>2]|0)}else{uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}l=j|0;if((c[l>>2]|0)==3){uu(c[j+8>>2]|0);c[l>>2]=1}A=D;g[d>>2]=A;l=c[13898]|0;j=c[1054]|0;o=c[j+(l*40&-1)+36>>2]|0;p=c[j+(l*40&-1)+32>>2]|0;e=(a[j+(l*40&-1)|0]&1)==0;L26596:do{if((o|0)>0&(e^1)){j=c[10036]|0;m=0;n=0;x=p;while(1){if((a[m+130912|0]|0)==(a[j+(m+x|0)|0]|0)){E=x;F=n}else{if((m|0)!=2){y=19961;break L26596}E=x-1|0;F=1}u=m+1|0;if((u|0)<(F+o|0)){m=u;n=F;x=E}else{break}}if((F|0)==0){if(!((m|0)==6|(m|0)==1)){y=19961;break}}c[13898]=l+1;G=+g[d>>2];y=19968}else{y=19961}}while(0);do{if((y|0)==19961){L26610:do{if((c[8272]|0)<=(l|0)|e){y=19967}else{F=c[10036]|0;E=0;while(1){if((E|0)>=(o|0)){break}if((a[F+(p+E|0)|0]|0)==(a[E+145440|0]|0)){E=E+1|0}else{y=19967;break L26610}}if((E|0)!=2){y=19967;break}c[13898]=l+1;H=+g[d>>2]}}while(0);if((y|0)==19967){if((C|0)==1){G=A;y=19968;break}else if((C|0)==2){H=A}else{I=C;J=A;break}}D=+(c[10032]|0)/2.54*H;g[d>>2]=D;I=2;J=D}}while(0);if((y|0)==19968){H=G*+(c[10032]|0);g[d>>2]=H;I=1;J=H}if(+g[b>>2]<1.0|J<1.0){uf(c[13898]|0,130744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{i=f;return I|0}return 0}function s5(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0,u=0.0,w=0,x=0.0,y=0;j=i;k=e-b|0;l=f-d|0;if((e|0)==(b|0)){m=c[10030]|0;n=(h|0)!=0?101096:101088;o=l>>31|1;p=(l|0)>-1?l:-l|0;cf(m|0,101128,(v=i,i=i+40|0,c[v>>2]=e,c[v+8>>2]=d,c[v+16>>2]=n,c[v+24>>2]=o,c[v+32>>2]=p,v)|0);i=j;return}if((f|0)==(d|0)){p=c[10030]|0;o=(h|0)!=0?101096:101088;n=k>>31|1;m=(k|0)>-1?k:-k|0;cf(p|0,101032,(v=i,i=i+40|0,c[v>>2]=b,c[v+8>>2]=f,c[v+16>>2]=o,c[v+24>>2]=n,c[v+32>>2]=m,v)|0);i=j;return}q=+(l|0)/+(k|0);if(q<0.0){r=-0.0-q}else{r=q}q=0.0;m=233040;n=0;o=1;while(1){s=r- +(c[m+4>>2]|0)/+(o|0);if((n|0)==0){t=19990}else{if(s<0.0){u=-0.0-s}else{u=s}if(u=0.0){w=m;x=s;break}w=m;x=-0.0-s}}while(0);p=m+8|0;y=c[p>>2]|0;if((y|0)==0){break}else{q=x;m=p;n=w;o=y}}if(x==0.0){o=c[10030]|0;n=(h|0)!=0?101096:101088;m=aa(c[w>>2]|0,k>>31|1);t=aa(c[w+4>>2]|0,l>>31|1);y=(k|0)>-1?k:-k|0;cf(o|0,100984,(v=i,i=i+48|0,c[v>>2]=b,c[v+8>>2]=d,c[v+16>>2]=n,c[v+24>>2]=m,c[v+32>>2]=t,c[v+40>>2]=y,v)|0);i=j;return}do{if(a[45024]|0){q9(0);if(!(a[233344]|0)){y=c[10030]|0;cf(y|0,100208,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0)}y=c[10030]|0;cf(y|0,100168,(v=i,i=i+16|0,c[v>>2]=e,c[v+8>>2]=f,v)|0);c[58302]=e;c[58300]=f;a[233344]=1}else{if((g|0)==1){q9(0);s6(b,e,d,f);break}if(a[239320]|0){y=c[10030]|0;aF(10,y|0);a[239320]=0}c[59764]=b;c[59762]=d;rr(e,f)}}while(0);if((h|0)==0){i=j;return}h=c[10030]|0;d=aa(c[w>>2]|0,k>>31|1);k=aa(c[w+4>>2]|0,l>>31|1);cf(h|0,100952,(v=i,i=i+32|0,c[v>>2]=e,c[v+8>>2]=f,c[v+16>>2]=d,c[v+24>>2]=k,v)|0);i=j;return}function s6(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ab=0.0,ac=0.0,ad=0.0;j=i;k=(b|0)==(d|0);l=(e|0)==(f|0);m=a[233344]|0;if(k&l){if(m){i=j;return}s7(2,0.0,0.0,0.0,0.0);n=c[10030]|0;cf(n|0,100920,(v=i,i=i+24|0,c[v>>2]=b,c[v+8>>2]=e,c[v+16>>2]=100896,v)|0);i=j;return}n=m&1;a[233344]=1;if(k){o=+(e|0);s7(n,+(b|0),o,+g[58368],+(f|0)-o);i=j;return}if(l){o=+(b|0);s7(n,o,+(e|0),+(d|0)-o,+g[58368]);i=j;return}o=+(d|0);p=+(b|0);q=o-p;r=+(f|0);s=+(e|0);t=r-s;u=t/q;n=u>=0.0;if(n){w=u}else{w=-0.0-u}if(w<=1.0){l=q>=0.0;if(l){x=q}else{x=-0.0-q}if(n){y=u}else{y=-0.0-u}w=+g[58368];z=w;if(x<(1.0/y+.25)*z){if(l){A=q}else{A=-0.0-q}B=A}else{if(n){C=u}else{C=-0.0-u}B=(1.0/C+.25)*z}C=B;k=t>=0.0;if(k){D=t}else{D=-0.0-t}m=w=0.0;if(k){H=E}else{H=-0.0-E}if(H*2.0+.5<1.0){G=20046;break}if(k){I=E}else{I=-0.0-E}k=~~(I*2.0+.5);if((k|0)==1){G=20046;break}A=E/+(k|0);y=(q-(l?1.0:-1.0)*C)/+(k-1|0);m=c[10030]|0;x=y;if(y<0.0){J=p-C}else{J=p}K=J;if(A<0.0){L=-0.0-A}else{L=A}M=s-(L-D)*.5;N=A;A=B;O=L*.24089999999999998;cf(m|0,100624,(v=i,i=i+56|0,h[v>>3]=K,h[v+8>>3]=M,h[v+16>>3]=x,h[v+24>>3]=N,c[v+32>>2]=k,h[v+40>>3]=A,h[v+48>>3]=O,v)|0);P=y}}while(0);if((G|0)==20046){l=c[10030]|0;k=(d|0)>=(b|0)?b:d;L=(s+r-w)*.5;w=B;B=z*.24089999999999998;cf(l|0,100728,(v=i,i=i+32|0,c[v>>2]=k,h[v+8>>3]=L,h[v+16>>3]=w,h[v+24>>3]=B,v)|0);P=q}B=C*.5;C=q-B*(P>=0.0?1.0:-1.0);k=c[10030]|0;P=C;if(C<0.0){Q=p-B}else{Q=p}C=Q;Q=+g[58368];w=s-Q*.5;L=t;z=B*.24089999999999998;B=Q*.24089999999999998;cf(k|0,100464,(v=i,i=i+48|0,h[v>>3]=C,h[v+8>>3]=w,h[v+16>>3]=P,h[v+24>>3]=L,h[v+32>>3]=z,h[v+40>>3]=B,v)|0);a[233344]=0;i=j;return}k=t>=0.0;if(k){R=t}else{R=-0.0-t}if(n){S=u}else{S=-0.0-u}B=+g[58368];z=B;if(R<(S+.25)*z){if(k){T=t}else{T=-0.0-t}U=T}else{if(n){V=u}else{V=-0.0-u}U=(V+.25)*z}V=U;n=q>=0.0;if(n){W=q}else{W=-0.0-q}l=B=0.0;if(n){Z=X}else{Z=-0.0-X}if(Z*2.0+.5<1.0){G=20079;break}if(n){_=X}else{_=-0.0-X}n=~~(_*2.0+.5);if((n|0)==1){G=20079;break}u=X/+(n|0);T=(t-(k?1.0:-1.0)*V)/+(n-1|0);l=c[10030]|0;d=u>=0.0;if(d){$=u}else{$=-0.0-u}S=p-($-W)*.5;if(T<0.0){aa=s-V}else{aa=s}R=aa;L=u;P=T;if(d){ab=u}else{ab=-0.0-u}u=ab*.24089999999999998;w=U;cf(l|0,100624,(v=i,i=i+56|0,h[v>>3]=S,h[v+8>>3]=R,h[v+16>>3]=L,h[v+24>>3]=P,c[v+32>>2]=n,h[v+40>>3]=u,h[v+48>>3]=w,v)|0);ac=T}}while(0);if((G|0)==20079){G=c[10030]|0;ab=(p+o-B)*.5;k=(f|0)>=(e|0)?e:f;B=z*.24089999999999998;z=U;cf(G|0,100408,(v=i,i=i+32|0,h[v>>3]=ab,c[v+8>>2]=k,h[v+16>>3]=B,h[v+24>>3]=z,v)|0);ac=t}z=V*.5;V=t-z*(ac>=0.0?1.0:-1.0);ac=+g[58368];if(V<0.0){ad=s-z}else{ad=s}cf(c[10030]|0,100464,(v=i,i=i+48|0,h[v>>3]=p-ac*.5,h[v+8>>3]=ad,h[v+16>>3]=q,h[v+24>>3]=V,h[v+32>>3]=ac*.24089999999999998,h[v+40>>3]=z*.24089999999999998,v)|0);a[233344]=0;i=j;return}function s7(b,d,e,f,j){b=b|0;d=+d;e=+e;f=+f;j=+j;var k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0;k=i;l=(b|0)==2;do{if(l){if(a[233176]|0){m=20111}}else{if(f==0.0|j==0.0){i=k;return}n=a[233176]|0;if((b|0)!=1|n^1){if(n){m=20111;break}else{m=20118;break}}do{if((~~+g[58288]|0)==(~~d|0)){if(+g[58290]!=f){m=20105;break}o=+g[58292];if(o*j<0.0){break}g[58292]=o+j;i=k;return}else{m=20105}}while(0);do{if((m|0)==20105){if((~~+g[58286]|0)!=(~~e|0)){break}if(+g[58292]!=j){break}o=+g[58290];if(o*f<0.0){break}g[58290]=o+f;i=k;return}}while(0);if(n){m=20111}else{m=20118}}}while(0);do{if((m|0)==20111){o=+g[58290];if(o<0.0){g[58288]=o+ +g[58288];p=-0.0-o;g[58290]=p;q=p}else{q=o}o=+g[58292];if(o<0.0){g[58286]=o+ +g[58286];p=-0.0-o;g[58292]=p;r=p}else{r=o}o=+g[58368];b=c[10030]|0;p=+g[58288];s=+g[58286];if(q>3]=p,h[v+8>>3]=s,c[v+16>>2]=100896,v)|0);m=20118;break}else{t=(-0.0-o)*.24089999999999998*.5;o=q*.24089999999999998;u=r*.24089999999999998;cf(b|0,100288|0,(v=i,i=i+40|0,h[v>>3]=p,h[v+8>>3]=s,h[v+16>>3]=t,h[v+24>>3]=o,h[v+32>>3]=u,v)|0);m=20118;break}}}while(0);do{if((m|0)==20118){if(l){break}g[58288]=d;g[58286]=e;g[58290]=f;g[58292]=j;a[233176]=1;i=k;return}}while(0);a[233176]=0;i=k;return}function s8(a){a=a|0;var b=0,d=0;b=i;d=~~(+(a|0)*1.4142);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=d,v)|0);a=-d|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=0,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=0,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=d,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function s9(a){a=a|0;var b=0,d=0;b=i;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=a,v)|0);d=-a|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=d,v)|0);aI(99872,14,1,c[10030]|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=0,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=0,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function ta(a){a=a|0;var b=0,d=0;b=i;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);d=-a|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=d,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=d,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function tb(a){a=a|0;var b=0,d=0;b=i;d=~~(+(a|0)/1.4142);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=d,v)|0);a=-d|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);aI(99872,14,1,c[10030]|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=d,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function tc(a){a=a|0;var b=0,d=0,e=0;b=i;d=~~(+(a|0)/1.6119);a=~~(+(d|0)*1.7321);e=-d<<1;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=e,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=-a,c[v+8>>2]=d,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=d,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=e,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function td(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;d=(a|0)/2&-1;a=~~(+(d|0)*1.7321);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=d<<1,v)|0);e=-d|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=e<<1,v)|0);aI(99872,14,1,c[10030]|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=d,v)|0);f=-a|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=e,v)|0);aI(99872,14,1,c[10030]|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=e,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=d,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function te(a){a=a|0;var b=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);i=b;return}function tf(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=(a|0)/2&-1;a=~~(+(d|0)*1.7321);e=d<<1;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=e,v)|0);f=-a|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=d,v)|0);g=-d|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=g,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=g<<1,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=g,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=d,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=e,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function tg(a){a=a|0;var b=0,d=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99984,(v=i,i=i+8|0,h[v>>3]=0.0,v)|0);d=(a|0)/2&-1;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=d,v)|0);i=b;return}function th(a){a=a|0;var b=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=-a,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function ti(a){a=a|0;var b=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=0,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=-a,c[v+8>>2]=0,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function tj(a){a=a|0;var b=0,d=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=a,v)|0);d=-a|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=d,v)|0);aI(99872,14,1,c[10030]|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=0,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=0,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function tk(a){a=a|0;var b=0,d=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);d=~~(+(a|0)/1.4142);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=d,v)|0);a=-d|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);aI(99872,14,1,c[10030]|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=d,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function tl(a){a=a|0;var b=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);td(a);i=b;return}function tm(a){a=a|0;var b=0,d=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99984,(v=i,i=i+8|0,h[v>>3]=1.0,v)|0);d=(a|0)/2&-1;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=d,v)|0);i=b;return}function tn(a){a=a|0;var b=0,d=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99984,(v=i,i=i+8|0,h[v>>3]=1.0,v)|0);d=~~(+(~~(+(a|0)/1.5)|0)*1.4142);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=d,v)|0);a=-d|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=0,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=0,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=d,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function to(a){a=a|0;var b=0,d=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99984,(v=i,i=i+8|0,h[v>>3]=1.0,v)|0);d=~~(+(a|0)/1.5);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=d,v)|0);a=-d|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=d,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=d,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function tp(a){a=a|0;var b=0,d=0,e=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99984,(v=i,i=i+8|0,h[v>>3]=1.0,v)|0);d=~~(+(~~(+(a|0)/1.5)|0)/1.6119);a=~~(+(d|0)*1.7321);e=-d<<1;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=e,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=-a,c[v+8>>2]=d,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=d,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=e,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function tq(a){a=a|0;var b=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99984,(v=i,i=i+8|0,h[v>>3]=1.0,v)|0);tf(~~(+(a|0)/1.2));i=b;return}function tr(a){a=a|0;var b=0,d=0;b=i;cf(c[10030]|0,99888,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=a,v)|0);d=-a|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=0,c[v+8>>2]=d,v)|0);aI(99872,14,1,c[10030]|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=0,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=0,v)|0);aI(99872,14,1,c[10030]|0);d=~~(+(a|0)/1.4142);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=d,v)|0);a=-d|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=a,v)|0);aI(99872,14,1,c[10030]|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=d,c[v+8>>2]=a,v)|0);cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=d,v)|0);aI(99872,14,1,c[10030]|0);i=b;return}function ts(){var b=0,d=0,e=0,f=0.0,g=0;b=i;if(!(a[4192]|0)){i=b;return}if((c[918]|0)>0){d=0;do{e=-(c[32124+(d<<3)>>2]|0)|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=c[32120+(d<<3)>>2],c[v+8>>2]=e,v)|0);aI(99440,2,1,c[10030]|0);d=d+1|0;}while((d|0)<(c[918]|0))}d=(c[916]|0)+2|0;e=c[3684+(d*12&-1)>>2]|0;if((e|0)==1){f=+h[523]}else if((e|0)==3){f=+h[523]*3.0}else if((e|0)==2){f=+h[523]*2.0}else{f=1.0}e=c[3688+(d*12&-1)>>2]|0;if((e|0)==1){d=c[10030]|0;cf(d|0,99448,(v=i,i=i+8|0,h[v>>3]=f,v)|0)}else if((e|0)==3){cf(c[10030]|0,99480,(v=i,i=i+8|0,h[v>>3]=f,v)|0);if((c[918]|0)>0){d=0;do{g=-(c[32124+(d<<3)>>2]|0)|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=c[32120+(d<<3)>>2],c[v+8>>2]=g,v)|0);aI(99440,2,1,c[10030]|0);d=d+1|0;}while((d|0)<(c[918]|0))}cf(c[10030]|0,99448,(v=i,i=i+8|0,h[v>>3]=f*.5,v)|0)}else if((e|0)==0){aI(99872,14,1,c[10030]|0)}else if((e|0)==4){cf(c[10030]|0,99480,(v=i,i=i+8|0,h[v>>3]=f,v)|0);if((c[918]|0)>0){d=0;do{g=-(c[32124+(d<<3)>>2]|0)|0;cf(c[10030]|0,99784,(v=i,i=i+16|0,c[v>>2]=c[32120+(d<<3)>>2],c[v+8>>2]=g,v)|0);aI(99440,2,1,c[10030]|0);d=d+1|0;}while((d|0)<(c[918]|0))}cf(c[10030]|0,99448,(v=i,i=i+8|0,h[v>>3]=f/3.0,v)|0)}else if((e|0)==2){cf(c[10030]|0,99480,(v=i,i=i+8|0,h[v>>3]=f,v)|0)}a[4192]=0;i=b;return}function tt(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;b=i;if(!(a[46624]|0)){i=b;return}d=c[9372]|0;cf(c[10030]|0,84056,(v=i,i=i+16|0,c[v>>2]=25936,c[v+8>>2]=d,v)|0);d=(c[9372]|0)-1|0;e=c[10030]|0;if((d|0)>0){f=0;g=e;while(1){h=c[2264+(f<<2)>>2]|0;cf(g|0,84280,(v=i,i=i+16|0,c[v>>2]=c[2664+(f<<2)>>2],c[v+8>>2]=h,v)|0);h=f+1|0;if((h&7|0)==0){j=c[10030]|0;aI(84248,2,1,j|0)}j=(c[9372]|0)-1|0;k=c[10030]|0;if((h|0)<(j|0)){f=h;g=k}else{l=j;m=k;break}}}else{l=d;m=e}e=c[2264+(l<<2)>>2]|0;d=c[768]|0;g=c[774]|0;f=c[770]|0;cf(m|0,84016,(v=i,i=i+40|0,c[v>>2]=c[2664+(l<<2)>>2],c[v+8>>2]=e,c[v+16>>2]=d,c[v+24>>2]=g,c[v+32>>2]=f,v)|0);c[774]=(c[774]|0)+1;a[46624]=0;c[9372]=0;f=c[10030]|0;if((f|0)==0){i=b;return}aD(f|0);i=b;return}function tu(){var b=0,e=0,f=0,g=0,j=0,k=0,l=0;b=i;if(a[228352]|0){e=c[10030]|0;aI(78232,6,1,e|0);a[228352]=0}if(a[228344]|0){i=b;return}e=c[57144]|0;if((e|0)>12){f=(e|0)%13&-1}else{f=e}e=f+3|0;cf(c[10030]|0,75352,(v=i,i=i+8|0,c[v>>2]=227016+(((e|0)<0?0:e<<16>>16)<<4),v)|0);e=a[228528]|0;do{if(e<<24>>24==3){f=c[10030]|0;g=d[226992]|0;j=d[228368]|0;k=d[228536]|0;cf(f|0,75328,(v=i,i=i+24|0,c[v>>2]=g,c[v+8>>2]=j,c[v+16>>2]=k,v)|0)}else{k=c[10030]|0;if(e<<24>>24==1){j=c[57082]|0;aK(j|0,k|0);break}else{aI(75272,12,1,k|0);break}}}while(0);e=c[57144]|0;if((e|0)>12){l=(e|0)%13&-1}else{l=e}e=l+3|0;l=a[226984]|0;cf(c[10030]|0,75208,(v=i,i=i+24|0,h[v>>3]=+h[227008+(((e|0)<0?0:e<<16>>16)<<4)>>3]*+h[28540],c[v+8>>2]=l?131936:137232,c[v+16>>2]=l?131936:75184,v)|0);aI(75104,3,1,c[10030]|0);a[228344]=1;i=b;return}function tv(b,e){b=b|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0;f=i;g=a[227272]|0;do{if((c[56816]|0)>>>0>512){if(!g){j=20201;break}if(a[228352]|0){k=c[10030]|0;aI(78232,6,1,k|0);a[228352]=0}k=c[10030]|0;aI(78240,9,1,k|0);c[56816]=0;a[227272]=0;j=20201}else{if(!g){j=20201}}}while(0);if((j|0)==20201){if(a[228352]|0){g=c[10030]|0;aI(78232,6,1,g|0);a[228352]=0}g=c[10030]|0;aI(73816,7,1,g|0);g=a[228528]|0;if((g<<24>>24|0)==3){k=c[10030]|0;l=d[226992]|0;m=d[228368]|0;n=d[228536]|0;cf(k|0,73768,(v=i,i=i+24|0,c[v>>2]=l,c[v+8>>2]=m,c[v+16>>2]=n,v)|0)}else if((g<<24>>24|0)==1){cf(c[10030]|0,73752,(v=i,i=i+8|0,c[v>>2]=c[57082],v)|0)}g=c[57144]|0;do{if(a[228520]|0){n=(g|0)%5&-1;if((n|0)<=0){j=20209;break}m=c[10030]|0;l=c[228496+(n<<2)>>2]|0;cf(m|0,73720,(v=i,i=i+8|0,c[v>>2]=l,v)|0)}else{j=20209}}while(0);do{if((j|0)==20209){if((g|0)!=-1){break}l=c[10030]|0;cf(l|0,73720,(v=i,i=i+8|0,c[v>>2]=73656,v)|0)}}while(0);if(a[228360]|0){g=c[10030]|0;aI(73696,17,1,g|0)}g=c[10030]|0;aI(73688,4,1,g|0);a[227272]=1}o=+((c[(c[3524]|0)+12>>2]|0)-e|0)/10.0;cf(c[10030]|0,73840,(v=i,i=i+16|0,h[v>>3]=+(b>>>0>>>0)/10.0,h[v+8>>3]=o,v)|0);g=(c[56816]|0)+1|0;c[56816]=g;if((g&7|0)!=0){c[56740]=b;c[56736]=e;i=f;return}aI(73904,3,1,c[10030]|0);c[56740]=b;c[56736]=e;i=f;return}function tw(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0.0,j=0,k=0,l=0.0;f=i;g=+h[28552];uu(c[59466]|0);j=c[57108]|0;if((j|0)==0){k=0}else{k=bP(j|0)|0}c[59466]=k;if((a[37456]&1)!=0){a[237856]=0;qg(b,d,e);i=f;return}a[237856]=1;qg(b,d,e);a[237856]=0;if((aQ(e|0,74128)|0)!=0){a[237872]=1}c[59472]=0;h[5613]=1.0;uF(44912,216760,16);d=e;do{e=lJ(d,1,c[59466]|0,g,0.0,1,1,0)|0;if((a[e]|0)==0){break}cS[c[(c[3524]|0)+160>>2]&511]();if((a[e]|0)==125){uh(-1,203744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{uh(-1,203528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=e+1|0;}while((a[d]|0)!=0);uu(c[57108]|0);c[57108]=c[59466];c[59466]=0;l=+h[29737];if(+h[28552]!=g|l!=0.0){d=c[10030]|0;cf(d|0,216688,(v=i,i=i+16|0,h[v>>3]=g,h[v+8>>3]=l,v)|0);h[28552]=g;h[29737]=0.0}a[237872]=0;aI(73992,14,1,c[10030]|0);i=f;return}function tx(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0;h=i;j=(a[(c[7118]|0)+16|0]&1)!=0?179864:74128;cf(c[10028]|0,212640,(v=i,i=i+8|0,c[v>>2]=j,v)|0);if((c[5163]|0)==103){k=c[10028]|0;cf(k|0,212480,(v=i,i=i+8|0,c[v>>2]=j,v)|0)}k=e|0;l=c[k>>2]|0;m=e+4|0;n=c[m>>2]|0;cf(c[10028]|0,212456,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=l,c[v+16>>2]=n,v)|0);n=(c[e+12>>2]|0)-(c[k>>2]|0)|0;k=(c[e+16>>2]|0)-(c[m>>2]|0)|0;cf(c[10028]|0,212400,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=n,c[v+16>>2]=k,v)|0);k=g&65535;cf(c[10028]|0,212384,(v=i,i=i+32|0,c[v>>2]=j,c[v+8>>2]=b,c[v+16>>2]=d,c[v+24>>2]=k,v)|0);cf(c[10028]|0,212328,(v=i,i=i+24|0,c[v>>2]=j,c[v+8>>2]=b,c[v+16>>2]=d,v)|0);g=c[10028]|0;if((a[(c[7118]|0)+16|0]&1)==0){aI(211992,36,1,g|0)}else{n=(aa(aa(aa(d,b),k),(f|0)==1?3:1)+7|0)>>>3;cf(g|0,212216,(v=i,i=i+8|0,c[v>>2]=n,v)|0);n=c[10028]|0;aI(212128,41,1,n|0)}n=c[10028]|0;if((f|0)==1){cf(n|0,211968,(v=i,i=i+16|0,c[v>>2]=j,c[v+8>>2]=j,v)|0);i=h;return}else{cf(n|0,211952,(v=i,i=i+8|0,c[v>>2]=j,v)|0);i=h;return}}function ty(){aK(208808,c[10028]|0);aK(208736,c[10028]|0);aK(208680,c[10028]|0);aK(208648,c[10028]|0);aK(208592,c[10028]|0);aK(208408,c[10028]|0);aK(208344,c[10028]|0);aK(208256,c[10028]|0);aK(208200,c[10028]|0);aK(208152,c[10028]|0);aK(208136,c[10028]|0);aK(208080,c[10028]|0);aK(208024,c[10028]|0);aK(207952,c[10028]|0);return}function tz(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;e=(aY(b|0,215352)|0)==0?77280:b;b=231040;while(1){f=c[b>>2]|0;if((f|0)==0){break}if((aY(c[f>>2]|0,e|0)|0)==0){g=20276;break}else{b=f+4|0}}if((g|0)==20276){i=d;return}if((cy(e|0,215312)|0)!=0){i=d;return}g=ut(8)|0;do{if((g|0)==0){gk();b=ut(8)|0;if((b|0)!=0){h=b;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=215288,v)|0)}else{h=g}}while(0);if((e|0)==0){j=0}else{j=bP(e|0)|0}e=h;c[e>>2]=j;c[h+4>>2]=c[57760];c[57760]=h;h=c[11252]|0;if((h|0)==5){k=214984}else if((h|0)==13){k=214760}else if((h|0)==9){k=214840}else if((h|0)==1|(h|0)==15){k=215232}else if((h|0)==10){k=214816}else if((h|0)==4){k=215016}else if((h|0)==2){k=215152}else if((h|0)==7){k=214920}else if((h|0)==6){k=214944}else if((h|0)==3|(h|0)==11){k=215072}else if((h|0)==12){k=214864}else{i=d;return}if(a[237912]|0){h=c[10028]|0;aI(215624,3,1,h|0);a[237912]=0}cf(c[10028]|0,214648,(v=i,i=i+16|0,c[v>>2]=c[e>>2],c[v+8>>2]=k,v)|0);i=d;return}function tA(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=i;cf(c[10028]|0,208848,(v=i,i=i+8|0,c[v>>2]=b,v)|0);if((e|0)<=0){j=c[10028]|0;k=aI(208840,6,1,j|0)|0;i=g;return}l=(uA(b|0)|0)+4|0;b=0;while(1){be(25336,141840,(v=i,i=i+8|0,h[v>>3]=+(~~(+h[(d+(b<<5)|0)+f>>3]*1.0e4+.5)|0)*1.0e-4,v)|0);m=(a[25336]|0)==48&(a[25337]|0)==46?25337:25336;n=(l+1|0)+(uA(m|0)|0)|0;if((n|0)>77){o=c[10028]|0;aI(152656,3,1,o|0);p=(uA(m|0)|0)+3|0}else{p=n}cf(c[10028]|0,73368,(v=i,i=i+8|0,c[v>>2]=m,v)|0);m=b+1|0;if((m|0)<(e|0)){l=p;b=m}else{break}}j=c[10028]|0;k=aI(208840,6,1,j|0)|0;i=g;return}function tB(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0.0;f=i;if((a[37456]&1)!=0){pO(b,d,e);i=f;return}if((a[e]|0)==0){i=f;return}if((c[7116]|0)!=0){j=c[10028]|0;aI(215952,7,1,j|0);c[7116]=0;a[228944]=0}pG(b,d);d=c[7230]|0;if((d|0)!=0){b=c[10028]|0;cf(b|0,199456,(v=i,i=i+8|0,c[v>>2]=d,v)|0)}aI(199448,2,1,c[10028]|0);h[5612]=-1.0e3;h[5611]=1.0e3;h[5613]=+g[(c[7118]|0)+92>>2]*10.0;uF(44912,199440,16);a[237912]=0;d=e;do{e=lJ(d,1,28840,+g[7208]*+g[(c[7118]|0)+92>>2]*10.0,0.0,1,1,0)|0;b=a[e]|0;if(b<<24>>24==0){break}if(a[237912]|0){j=c[10028]|0;aI(215624,3,1,j|0);a[237912]=0;k=a[e]|0}else{k=b}if(k<<24>>24==125){uh(-1,203744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{uh(-1,203528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}d=e+1|0;}while((a[d]|0)!=0);l=+h[5611]+ +h[5612];h[5612]=l;cf(c[10028]|0,199384,(v=i,i=i+8|0,h[v>>3]=(-0.0-l)/3.0,v)|0);d=c[7198]|0;if((d|0)==1){k=c[10028]|0;aI(199288,7,1,k|0)}else if((d|0)==0){aI(199360,7,1,c[10028]|0)}else if((d|0)==2){aI(199240,7,1,c[10028]|0)}if((c[7230]|0)!=0){d=c[10028]|0;aI(212688,9,1,d|0)}c[7116]=0;a[228944]=0;i=f;return}function tC(b){b=b|0;var d=0,e=0,f=0.0,h=0.0,j=0,k=0.0;d=i;if((a[37456]&1)!=0){pL(b);i=d;return 1}if((a[b]|0)==0){e=(c[7118]|0)+36|0;uB(28840,e|0);f=+g[7202];g[7208]=f;h=f}else{e=bk(b|0,148464)|0;if((e|0)!=0&e>>>0<51){uF(28840,b|0,e|0);a[e+28840|0]=0;tz(28840)}g[7208]=+g[7202];j=b+(e+1|0)|0;ca(j|0,205104,(v=i,i=i+8|0,c[v>>2]=28832,v)|0);h=+g[7208]}f=+g[(c[7118]|0)+92>>2];k=h*f;c[(c[3524]|0)+16>>2]=~~(k*f*10.0);c[(c[3524]|0)+20>>2]=~~(k*+g[(c[7118]|0)+92>>2]*10.0*6.0/10.0);i=d;return 1}function tD(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;e=i;i=i+520|0;f=e|0;g=e+256|0;if((b|0)==0){i=e;return}h=g|0;a[h]=0;j=e+264|0;a[j]=0;if(d){k=c[10028]|0;l=b+4|0;n=c[l>>2]|0;cf(k|0,197960,(v=i,i=i+8|0,c[v>>2]=n,v)|0);o=l}else{o=b+4|0}l=c[o>>2]|0;do{if((a[l]|0)!=60){n=uA(l|0)|0;if(n>>>0>3){k=l+(n-3|0)|0;uB(h|0,k|0)}else{uB(h|0,l|0)}a[h]=uI(a[h]|0|0)&255;k=g+1|0;a[k]=uI(a[k]|0|0)&255;k=g+2|0;a[k]=uI(a[k]|0|0)&255;if((c[b+8>>2]|0)!=0){break}uf(-1,219072,(v=i,i=i+8|0,c[v>>2]=c[o>>2],v)|0)}}while(0);L27092:do{if((a[h]|0)==0){if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=(c[o>>2]|0)+1|0;uB(j|0,g|0);g=bt(j|0,193632)|0;if((g|0)!=0){p=g;q=1;break}uf(-1,219160,(v=i,i=i+8|0,c[v>>2]=(c[o>>2]|0)+1,v)|0)}else{do{if((aY(h|0,197944)|0)!=0){if((aY(h|0,197896)|0)==0){break}if((aY(h|0,197648)|0)!=0){if((aY(h|0,197488)|0)!=0){uh(-1,197360,(v=i,i=i+8|0,c[v>>2]=c[o>>2],v)|0)}g=bF(c[b+8>>2]|0,193632)|0;if((g|0)!=0){p=g;q=0;break L27092}uf(-1,219072,(v=i,i=i+8|0,c[v>>2]=c[o>>2],v)|0)}if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=bU(197624)|0;l=c[b+8>>2]|0;if((g|0)==0){be(j|0,197560,(v=i,i=i+8|0,c[v>>2]=l,v)|0)}else{be(j|0,g|0,(v=i,i=i+8|0,c[v>>2]=l,v)|0)}if((a[j]|0)==0){uf(-1,197496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=bt(j|0,193632)|0;if((l|0)!=0){p=l;q=1;break L27092}uf(-1,197672,(v=i,i=i+8|0,c[v>>2]=j,v)|0)}}while(0);if(!(a[14168]|0)){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=bU(197856)|0;g=c[b+8>>2]|0;if((l|0)==0){be(j|0,197784,(v=i,i=i+8|0,c[v>>2]=g,v)|0)}else{be(j|0,l|0,(v=i,i=i+8|0,c[v>>2]=g,v)|0)}if((a[j]|0)==0){uf(-1,197704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}g=bt(j|0,193632)|0;if((g|0)!=0){p=g;q=1;break}uf(-1,197672,(v=i,i=i+8|0,c[v>>2]=j,v)|0)}}while(0);h=f|0;L27133:do{if((a6(h|0,255,p|0)|0)==0){r=0;s=0;t=20384}else{g=f+1|0;l=b+12|0;k=b+8|0;n=0;u=0;L27135:while(1){do{if((u|0)==0){if((a_(h|0,197328,14)|0)==0){break}if((a_(h|0,197304,11)|0)==0){break}if(q){uh(-1,197240,(v=i,i=i+8|0,c[v>>2]=j,v)|0);break}else{uh(-1,197192,(v=i,i=i+8|0,c[v>>2]=c[o>>2],v)|0);break}}}while(0);do{if((a_(h|0,197176,9)|0)==0){w=(uA(h|0)|0)-9|0;x=ut(w)|0;if((x|0)==0){gk();y=ut(w)|0;if((y|0)==0){break L27135}else{z=y}}else{z=x}x=(a8(g|0,47)|0)+1|0;uB(z|0,x|0);a[a8(z|0,32)|0]=0;if((z|0)==0){A=0}else{A=bP(z|0)|0}c[l>>2]=A;if(d){B=z;t=20382;break}x=c[k>>2]|0;y=c[m>>2]|0;w=c[o>>2]|0;if((x|0)==0){cf(y|0,197016,(v=i,i=i+16|0,c[v>>2]=w,c[v+8>>2]=z,v)|0)}else{cf(y|0,197104,(v=i,i=i+24|0,c[v>>2]=w,c[v+8>>2]=z,c[v+16>>2]=x,v)|0)}if(q){C=z;t=20381}else{D=z;E=u;t=20387;break L27133}}else{C=n;t=20381}}while(0);if((t|0)==20381){t=0;if(d){B=C;t=20382}else{F=C}}if((t|0)==20382){t=0;x=c[10028]|0;aK(h|0,x|0);F=B}x=u+1|0;if((a6(h|0,255,p|0)|0)==0){r=F;s=x;t=20384;break L27133}else{n=F;u=x}}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=197160,v)|0)}}while(0);do{if((t|0)==20384){if(!q){D=r;E=s;t=20387;break}F=a2(p|0)|0;if((F|0)==0){G=r;H=s;break}uf(-1,196840,(v=i,i=i+16|0,c[v>>2]=j,c[v+8>>2]=F,v)|0)}}while(0);if((t|0)==20387){az(p|0);G=D;H=E}if((H|0)==0){if(q){uf(-1,218792,(v=i,i=i+8|0,c[v>>2]=j,v)|0)}else{uf(-1,218744,(v=i,i=i+8|0,c[v>>2]=c[o>>2],v)|0)}}do{if(d){o=c[10028]|0;aI(196784,13,1,o|0);if((G|0)==0){i=e;return}if((aY(G|0,196752)|0)!=0){break}o=c[10028]|0;aI(196648,32,1,o|0);o=c[10028]|0;aI(196568,57,1,o|0);o=c[10028]|0;aI(196488,70,1,o|0);o=c[10028]|0;aI(196456,31,1,o|0);o=c[10028]|0;aI(196784,13,1,o|0);t=20396}else{t=20396}}while(0);do{if((t|0)==20396){if((G|0)!=0){break}i=e;return}}while(0);uu(G);i=e;return}function tE(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0;d=i;e=bP(195896|0)|0;f=c[57238]|0;if((f|0)==0){g=20410}else{h=uA(f|0)|0;f=(h+4|0)+(uA(b|0)|0)|0;h=ut(f)|0;do{if((h|0)==0){gk();j=ut(f)|0;if((j|0)!=0){k=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=195784,v)|0);return 0}else{k=h}}while(0);h=c[57238]|0;uB(k|0,h|0);h=uA(k|0)|0;f=(h|0)==0?0:h-1|0;h=a[k+f|0]|0;if(!((h<<24>>24|0)==47|(h<<24>>24|0)==0)){a[k+(f+1|0)|0]=47;a[k+(f+2|0)|0]=0}uC(k|0,b|0);f=bF(k|0,193632|0)|0;uu(k);if((f|0)==0){g=20410}else{l=f}}do{if((g|0)==20410){f=bU(195768|0)|0;if((f|0)!=0){k=uA(f|0)|0;h=(k+4|0)+(uA(b|0)|0)|0;k=ut(h)|0;do{if((k|0)==0){gk();j=ut(h)|0;if((j|0)!=0){n=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=195784,v)|0);return 0}else{n=k}}while(0);uB(n|0,f|0);k=uA(n|0)|0;h=(k|0)==0?0:k-1|0;k=a[n+h|0]|0;if(!((k<<24>>24|0)==47|(k<<24>>24|0)==0)){a[n+(h+1|0)|0]=47;a[n+(h+2|0)|0]=0}uC(n|0,b|0);h=bF(n|0,193632|0)|0;uu(n);if((h|0)!=0){l=h;break}}h=uA(e|0)|0;k=(h+4|0)+(uA(b|0)|0)|0;h=ut(k)|0;do{if((h|0)==0){gk();j=ut(k)|0;if((j|0)!=0){o=j;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=195784,v)|0);return 0}else{o=h}}while(0);uB(o|0,e|0);h=uA(o|0)|0;k=(h|0)==0?0:h-1|0;h=a[o+k|0]|0;if(!((h<<24>>24|0)==47|(h<<24>>24|0)==0)){a[o+(k+1|0)|0]=47;a[o+(k+2|0)|0]=0}uC(o|0,b|0);k=bF(o|0,193632|0)|0;uu(o);uu(e);if((k|0)!=0){p=k;i=d;return p|0}k=hA(b,193632)|0;if((k|0)==0){h=c[m>>2]|0;cf(h|0,195704|0,(v=i,i=i+8|0,c[v>>2]=b,v)|0);uq(2,0);h=c[m>>2]|0;cf(h|0,195600|0,(v=i,i=i+8|0,c[v>>2]=b,v)|0);h=c[m>>2]|0;aI(195528|0,49,1,h|0);h=c[m>>2]|0;aI(195448|0,34,1,h|0);uf(-1,195432,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{p=k;i=d;return p|0}}}while(0);uu(e);p=l;i=d;return p|0}function tF(){var b=0,d=0,e=0,f=0,j=0,k=0.0,l=0,m=0,n=0;b=i;if(!(a[34544]&a[34552])){i=b;return}d=c[8618]|0;if((d|0)==34464){i=b;return}else{e=1;f=d}while(1){j=e+1|0;d=c[f+8>>2]|0;if((d|0)==34464){break}else{e=j;f=d}}if((e|0)<=0){i=b;return}cf(c[10030]|0,183280,(v=i,i=i+32|0,c[v>>2]=(c[8566]|0)+1,c[v+8>>2]=34336,c[v+16>>2]=34272,c[v+24>>2]=34192,v)|0);cf(c[10030]|0,183648,(v=i,i=i+8|0,c[v>>2]=j,v)|0);e=0;f=34464;while(1){if((e&3|0)==0){d=c[10030]|0;aI(73904,3,1,d|0)}k=+g[f+4>>2];cf(c[10030]|0,183624,(v=i,i=i+16|0,h[v>>3]=+g[f>>2],h[v+8>>3]=k,v)|0);d=e+1|0;if((d|0)<(j|0)){e=d;f=c[f+8>>2]|0}else{break}}aI(183600,4,1,c[10030]|0);f=(c[8566]|0)+1|0;L27243:do{if(a[34544]&a[34552]){e=0;while(1){if((e|0)>=20){break L27243}l=34564+(e<<3)|0;j=c[l>>2]|0;m=(j|0)==0;n=(j|0)==(f|0);if(m|n){break}else{e=e+1|0}}j=34560+(e<<3)|0;if(m){c[l>>2]=f;c[j>>2]=0;break}if(!n){break}c[j>>2]=1}}while(0);a[34336]=0;a[34272]=0;a[34192]=0;n=c[8619]|0;g[8616]=+g[n>>2];g[8617]=+g[n+4>>2];if((n|0)!=34464){f=n;do{n=c[f+12>>2]|0;c[8619]=n;c[n+8>>2]=34464;uu(f);f=c[8619]|0;}while((f|0)!=34464)}c[8619]=34464;c[8618]=34464;i=b;return}function tG(){var a=0,b=0,d=0,e=0,f=0,g=0;aF(230,c[10030]|0);a=c[58576]|0;aF(a>>>8|0,c[10030]|0);aF(a|0,c[10030]|0);if((c[58576]|0)==0){c[58576]=0;b=c[10030]|0;d=aF(234,b|0)|0;e=c[10030]|0;f=aF(15,e|0)|0;return}else{g=0}do{a=c[233888+(g<<2)>>2]|0;aF(a>>>8|0,c[10030]|0);aF(a|0,c[10030]|0);a=c[233488+(g<<2)>>2]|0;aF(a>>>8|0,c[10030]|0);aF(a|0,c[10030]|0);g=g+1|0;}while(g>>>0<(c[58576]|0)>>>0);c[58576]=0;b=c[10030]|0;d=aF(234,b|0)|0;e=c[10030]|0;f=aF(15,e|0)|0;return}function tH(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0.0,l=0,m=0.0,n=0.0,o=0,p=0.0,q=0,r=0.0,s=0,t=0,u=0;f=i;g=~~(+h[29420]*106.0*.5);if((e|0)==(-3|0)){o1(b,d);j=c[10030]|0;aI(125976,2,1,j|0);a[235520]=0;j=c[10030]|0;k=+(g|0)*3.0*.25;cf(j|0,179248,(v=i,i=i+8|0,h[v>>3]=k,v)|0);i=f;return}else if((e|0)==(-15|0)){j=b-g|0;l=d-g|0;o1(j,l);k=+(b>>>0>>>0);m=+(g|0);n=m*4.242640687119286*.125;o=~~(k-n);p=+(d>>>0>>>0);q=~~(p-n);o2(o,q);r=m*1.4142135623730951*.5;o1(~~(k+r),~~(p-r));s=~~(k+n);o2(s,q);q=g+b|0;t=g+d|0;o1(q,t);u=~~(p+n);o2(s,u);o1(~~(k-r),~~(p+r));o2(o,u);o1(j,d);j=(g*3&-1|0)/4&-1;o2(b-j|0,d);o1(j+b|0,d);o2(q,d);o1(b,l);o2(b,d-j|0);o1(b,j+d|0);o2(b,t);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179192,(v=i,i=i+8|0,h[v>>3]=m*3.0*.25,v)|0);i=f;return}else if((e|0)==(-7|0)){m=+(b>>>0>>>0);r=+(g|0);p=r*1.4142135623730951*.5;t=~~(m-p);k=+(d>>>0>>>0);j=~~(k-p);o1(t,j);n=r*4.242640687119286*.125;l=~~(m-n);q=~~(k-n);o2(l,q);u=~~(m+p);o1(u,j);j=~~(m+n);o2(j,q);q=~~(k+p);o1(u,q);u=~~(k+n);o2(j,u);o1(t,q);o2(l,u);o1(b-g|0,d);u=(g*3&-1|0)/4&-1;o2(b-u|0,d);o1(u+b|0,d);o2(g+b|0,d);o1(b,d-g|0);o2(b,d-u|0);o1(b,u+d|0);o2(b,g+d|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179192,(v=i,i=i+8|0,h[v>>3]=r*3.0*.25,v)|0);i=f;return}else if((e|0)==(-12|0)){r=+(b>>>0>>>0);n=+(g|0);k=n*1.4142135623730951*.5;p=+(d>>>0>>>0);u=~~(p+k);o1(~~(r+k),u);m=n*4.242640687119286*.125;l=~~(p+m);o2(~~(r+m),l);o1(~~(r-k),u);o2(~~(r-m),l);o1(b-g|0,d);l=(g*3&-1|0)/4&-1;o2(b-l|0,d);o1(l+b|0,d);o2(g+b|0,d);o1(b,d-g|0);o2(b,d-l|0);o1(b,l+d|0);o2(b,g+d|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;m=n*3.0*.25;cf(c[10030]|0,178032,(v=i,i=i+8|0,h[v>>3]=m,v)|0);cf(c[10030]|0,178008,(v=i,i=i+8|0,h[v>>3]=m,v)|0);i=f;return}else if((e|0)==(-19|0)){l=d-g|0;o1(b,l);u=(g|0)/2&-1;o2(b,d-u|0);o1(b,u+d|0);o2(b,g+d|0);o1(b,l);u=(g|0)/4&-1;q=d-((g*3&-1|0)/4&-1)|0;o2(b-u|0,q);o1(b,l);o2(u+b|0,q);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179248,(v=i,i=i+8|0,h[v>>3]=+(g|0)*.5,v)|0);i=f;return}else if((e|0)==(-16|0)){q=b-g|0;o1(q,d-g|0);m=+(b>>>0>>>0);n=+(g|0);r=n*4.242640687119286*.125;u=~~(m-r);k=+(d>>>0>>>0);o2(u,~~(k-r));l=g+b|0;t=g+d|0;o1(l,t);j=~~(k+r);o2(~~(m+r),j);r=n*1.4142135623730951*.5;o1(~~(m-r),~~(k+r));o2(u,j);o1(q,d);q=(g*3&-1|0)/4&-1;o2(b-q|0,d);o1(q+b|0,d);o2(l,d);o1(b,q+d|0);o2(b,t);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179192,(v=i,i=i+8|0,h[v>>3]=n*3.0*.25,v)|0);i=f;return}else if((e|0)==(-10|0)){o1(b-g|0,d);t=(g*3&-1|0)/4&-1;o2(b-t|0,d);o1(t+b|0,d);o2(g+b|0,d);o1(b,d-g|0);o2(b,d-t|0);o1(b,t+d|0);o2(b,g+d|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;n=+(g|0)*3.0*.25;cf(c[10030]|0,178032,(v=i,i=i+8|0,h[v>>3]=n,v)|0);cf(c[10030]|0,178008,(v=i,i=i+8|0,h[v>>3]=n,v)|0);i=f;return}else if((e|0)==(-2|0)){o1(b-g|0,d);t=(g*3&-1|0)/4&-1;q=b-t|0;o2(q,d);l=t+b|0;o1(l,d);o2(g+b|0,d);o1(b,d-g|0);j=d-t|0;o2(b,j);u=t+d|0;o1(b,u);o2(b,g+d|0);o1(q,j);o2(l,j);o2(l,u);o2(q,u);o2(q,j);j=(g|0)/2&-1;q=j+d|0;o1(b-j|0,q);o2(b,d-j|0);o2(j+b|0,q);i=f;return}else if((e|0)==(-20|0)){o1(b-g|0,d-g|0);o2(g+b|0,g+d|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179248,(v=i,i=i+8|0,h[v>>3]=+(g|0)*3.0*.25,v)|0);i=f;return}else if((e|0)==(-13|0)){o1(b-g|0,d-g|0);n=+(b>>>0>>>0);r=+(g|0);k=r*4.242640687119286*.125;m=+(d>>>0>>>0);o2(~~(n-k),~~(m-k));o1(g+b|0,g+d|0);o2(~~(n+k),~~(m+k));o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179192,(v=i,i=i+8|0,h[v>>3]=r*3.0*.25,v)|0);i=f;return}else if((e|0)==(-14|0)){q=b-g|0;j=d-g|0;o1(q,j);r=+(b>>>0>>>0);k=+(g|0);m=k*4.242640687119286*.125;u=~~(r-m);n=+(d>>>0>>>0);l=~~(n-m);o2(u,l);p=k*1.4142135623730951*.5;o1(~~(r+p),~~(n-p));t=~~(r+m);o2(t,l);l=g+b|0;o=g+d|0;o1(l,o);s=~~(n+m);o2(t,s);o1(~~(r-p),~~(n+p));o2(u,s);o1(q,d);q=(g*3&-1|0)/4&-1;o2(b-q|0,d);o1(q+b|0,d);o2(l,d);o1(b,j);o2(b,d-q|0);o1(b,q+d|0);o2(b,o);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179248,(v=i,i=i+8|0,h[v>>3]=k*3.0*.25,v)|0);i=f;return}else if((e|0)==(-4|0)){o1(b-g|0,d);o=(g*3&-1|0)/4&-1;o2(b-o|0,d);o1(o+b|0,d);o2(g+b|0,d);o1(b,d-g|0);o2(b,d-o|0);o1(b,o+d|0);o2(b,g+d|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179248,(v=i,i=i+8|0,h[v>>3]=+(g|0)*3.0*.25,v)|0);i=f;return}else if((e|0)==(-6|0)){k=+(b>>>0>>>0);p=+(g|0);n=p*1.4142135623730951*.5;o=~~(k-n);r=+(d>>>0>>>0);q=~~(r-n);o1(o,q);m=p*4.242640687119286*.125;j=~~(k-m);l=~~(r-m);o2(j,l);s=~~(k+n);o1(s,q);q=~~(k+m);o2(q,l);l=~~(r+n);o1(s,l);s=~~(r+m);o2(q,s);o1(o,l);o2(j,s);o1(b-g|0,d);s=(g*3&-1|0)/4&-1;o2(b-s|0,d);o1(s+b|0,d);o2(g+b|0,d);o1(b,d-g|0);o2(b,d-s|0);o1(b,s+d|0);o2(b,g+d|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179248,(v=i,i=i+8|0,h[v>>3]=p*3.0*.25,v)|0);i=f;return}else if((e|0)==(-5|0)){o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179192,(v=i,i=i+8|0,h[v>>3]=+(g|0)*3.0*.25,v)|0);i=f;return}else if((e|0)==(-9|0)){p=+(b>>>0>>>0);m=+(g|0);r=m*1.4142135623730951*.5;s=~~(p-r);n=+(d>>>0>>>0);j=~~(n-r);o1(s,j);k=m*4.242640687119286*.125;l=~~(p-k);o=~~(n-k);o2(l,o);q=~~(p+r);o1(q,j);j=~~(p+k);o2(j,o);o=~~(n+r);o1(q,o);q=~~(n+k);o2(j,q);o1(s,o);o2(l,q);o1(b-g|0,d);q=(g*3&-1|0)/4&-1;o2(b-q|0,d);o1(q+b|0,d);o2(g+b|0,d);o1(b,d-g|0);o2(b,d-q|0);o1(b,q+d|0);o2(b,g+d|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;k=m*3.0*.25;cf(c[10030]|0,178032,(v=i,i=i+8|0,h[v>>3]=k,v)|0);cf(c[10030]|0,178008,(v=i,i=i+8|0,h[v>>3]=k,v)|0);i=f;return}else if((e|0)==(-18|0)){o1(b-g|0,d);o2(g+b|0,d);o1(b,d-g|0);o2(b,g+d|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179248,(v=i,i=i+8|0,h[v>>3]=+(g|0)*3.0*.25,v)|0);i=f;return}else if((e|0)==(-17|0)){q=b-g|0;l=d-g|0;o1(q,l);k=+(b>>>0>>>0);m=+(g|0);n=m*4.242640687119286*.125;o=~~(k-n);r=+(d>>>0>>>0);s=~~(r-n);o2(o,s);p=m*1.4142135623730951*.5;o1(~~(k+p),~~(r-p));j=~~(k+n);o2(j,s);s=g+b|0;u=g+d|0;o1(s,u);t=~~(r+n);o2(j,t);o1(~~(k-p),~~(r+p));o2(o,t);o1(q,d);q=(g*3&-1|0)/4&-1;o2(b-q|0,d);o1(q+b|0,d);o2(s,d);o1(b,l);o2(b,d-q|0);o1(b,q+d|0);o2(b,u);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;p=m*3.0*.25;cf(c[10030]|0,178032,(v=i,i=i+8|0,h[v>>3]=p,v)|0);cf(c[10030]|0,178008,(v=i,i=i+8|0,h[v>>3]=p,v)|0);i=f;return}else if((e|0)==(-8|0)){p=+(b>>>0>>>0);m=+(g|0);r=m*1.4142135623730951*.5;k=+(d>>>0>>>0);u=~~(k+r);o1(~~(p+r),u);n=m*4.242640687119286*.125;q=~~(k+n);o2(~~(p+n),q);o1(~~(p-r),u);o2(~~(p-n),q);o1(b-g|0,d);q=(g*3&-1|0)/4&-1;o2(b-q|0,d);o1(q+b|0,d);o2(g+b|0,d);o1(b,q+d|0);o2(b,g+d|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179192,(v=i,i=i+8|0,h[v>>3]=m*3.0*.25,v)|0);i=f;return}else if((e|0)==(-11|0)){m=+(b>>>0>>>0);n=+(g|0);p=n*1.4142135623730951*.5;r=+(d>>>0>>>0);e=~~(r+p);o1(~~(m+p),e);k=n*4.242640687119286*.125;q=~~(r+k);o2(~~(m+k),q);o1(~~(m-p),e);o2(~~(m-k),q);o1(b-g|0,d);q=(g*3&-1|0)/4&-1;o2(b-q|0,d);o1(q+b|0,d);o2(g+b|0,d);o1(b,d-g|0);o2(b,d-q|0);o1(b,q+d|0);o2(b,g+d|0);o1(b,d);aI(125976,2,1,c[10030]|0);a[235520]=0;cf(c[10030]|0,179248,(v=i,i=i+8|0,h[v>>3]=n*3.0*.25,v)|0);i=f;return}else{o1(b,d);o2(b,d);i=f;return}}function tI(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=i;d=c[59128]|0;e=(c[d+8>>2]|0)-1|0;f=c[(c[d+16>>2]|0)+(e<<2)>>2]|0;g=c[(c[d+20>>2]|0)+(e<<2)>>2]|0;tJ(d);d=c[59128]|0;e=c[d>>2]|0;h=c[d+4>>2]|0;j=h<<1;k=c[d+12>>2]|0;d=ut(28)|0;do{if((d|0)==0){gk();l=ut(28)|0;if((l|0)!=0){m=l;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{m=d}}while(0);d=m;l=m;c[l>>2]=e;c[m+12>>2]=k;c[m+4>>2]=j;c[m+8>>2]=0;k=h<<3;h=ut(k)|0;do{if((h|0)==0){gk();e=ut(k)|0;if((e|0)!=0){n=e;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{n=h}}while(0);h=m+16|0;c[h>>2]=n;n=ut(k)|0;do{if((n|0)==0){gk();e=ut(k)|0;if((e|0)!=0){o=e;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{o=n}}while(0);n=m+20|0;c[n>>2]=o;o=ut(j)|0;do{if((o|0)==0){gk();k=ut(j)|0;if((k|0)!=0){p=k;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=174680,v)|0)}else{p=o}}while(0);c[m+24>>2]=p;do{if((c[h>>2]|0)!=0){if((c[n>>2]|0)==0){break}uE(p|0,0,j|0);if((m|0)==0){break}o=c[59128]|0;c[236448+(c[l>>2]<<2)>>2]=d;if((c[l>>2]|0)==0){c[59113]=d;c[59115]=d}c[59128]=d;uu(c[o+16>>2]|0);uu(c[o+20>>2]|0);uu(c[o+24>>2]|0);uu(o)}}while(0);c[c[(c[59128]|0)+16>>2]>>2]=f;c[c[(c[59128]|0)+20>>2]>>2]=g;a[c[(c[59128]|0)+24>>2]|0]=1;c[(c[59128]|0)+8>>2]=1;c[59100]=(c[59100]|0)+1;i=b;return}function tJ(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;d=i;e=b+8|0;if((c[e>>2]|0)==0){i=d;return}f=c[b+16>>2]|0;g=c[b+20>>2]|0;h=c[b+24>>2]|0;if(a[236440]|0){j=c[10030]|0;aI(174600,4,1,j|0);a[236440]=0}j=b+12|0;b=c[j>>2]|0;do{if((c[59108]|0)!=(b|0)){if((c[e>>2]|0)<=1){if((a[h]&1)!=0){break}}k=c[10030]|0;cf(k|0,174584,(v=i,i=i+8|0,c[v>>2]=b,v)|0);c[59108]=c[j>>2]}}while(0);aI(174520,3,1,c[10030]|0);j=(c[f>>2]|0)-(c[59098]|0)|0;b=(c[g>>2]|0)-(c[59096]|0)|0;k=c[10030]|0;if((j|0)>-17&(b|0)>-17&(j|0)<16&(b|0)<16){aF(106,k|0);l=1}else{aF(105,k|0);l=0}k=c[e>>2]|0;if((k|0)>0){m=b;b=j;j=0;n=l;l=k;while(1){k=(j|0)>0;if(k){o=j-1|0;p=(c[f+(j<<2)>>2]|0)-(c[f+(o<<2)>>2]|0)|0;q=(c[g+(j<<2)>>2]|0)-(c[g+(o<<2)>>2]|0)|0}else{p=b;q=m}L27354:do{if((p|q|0)==0){do{if(k){if((a[h+(j-1|0)|0]&1)!=0){break}if((a[h+j|0]&1)!=0){break}c[59102]=(c[59102]|0)+1;r=n;s=p;t=q;break L27354}}while(0);if((a[h+j|0]&1)==0){u=p;w=q;x=20552;break}c[59104]=(c[59104]|0)+1;r=n;s=p;t=q}else{do{if(k){o=j+1|0;if((o|0)>=(l|0)){break}if((a[h+j|0]&1)==0){break}if((a[h+o|0]&1)==0){break}c[59104]=(c[59104]|0)+1;r=n;s=p;t=q;break L27354}}while(0);if((p|0)>-17&(q|0)>-17&(p|0)<16&(q|0)<16|k^1){u=p;w=q;x=20552;break}o=j+2|0;if((o|0)>=(l|0)){u=p;w=q;x=20552;break}if((a[h+j|0]&1)==0){u=p;w=q;x=20552;break}y=j+1|0;if((a[h+y|0]&1)!=0){u=p;w=q;x=20552;break}if((a[h+o|0]&1)==0){u=p;w=q;x=20552;break}o=f+(y<<2)|0;z=c[o>>2]|0;A=j-1|0;B=f+(A<<2)|0;C=z-(c[B>>2]|0)|0;if((C|0)<=-17){u=p;w=q;x=20552;break}D=g+(y<<2)|0;y=g+(A<<2)|0;A=(c[D>>2]|0)-(c[y>>2]|0)|0;if(!((A|0)>-17&(C|0)<16&(A|0)<16)){u=p;w=q;x=20552;break}A=f+(j<<2)|0;c[o>>2]=c[A>>2];c[A>>2]=z;z=c[D>>2]|0;o=g+(j<<2)|0;c[D>>2]=c[o>>2];c[o>>2]=z;u=(c[A>>2]|0)-(c[B>>2]|0)|0;w=z-(c[y>>2]|0)|0;x=20552}}while(0);do{if((x|0)==20552){x=0;if((u|0)>-17&(w|0)>-17&(u|0)<16&(w|0)<16){if(!n){k=c[10030]|0;aF(106,k|0)}if((a[h+j|0]&1)!=0){k=c[10030]|0;aF(97,k|0)}k=a[236552+(u+16|0)|0]|0;y=c[10030]|0;aF(k|0,y|0);y=a[236552+(w+16|0)|0]|0;k=c[10030]|0;aF(y|0,k|0);r=1;s=u;t=w;break}k=((u|0)>0?1:-1)+u|0;y=(k|0)/2&-1;z=((w|0)>0?1:-1)+w|0;B=(z|0)/2&-1;if(n&(k|0)>-34&(z|0)>-34&(k|0)<32&(z|0)<32){z=h+j|0;if((a[z]&1)!=0){k=c[10030]|0;aF(97,k|0)}k=a[236552+(y+16|0)|0]|0;A=c[10030]|0;aF(k|0,A|0);A=a[236552+(B+16|0)|0]|0;k=c[10030]|0;aF(A|0,k|0);if((a[z]&1)!=0){z=c[10030]|0;aF(97,z|0)}z=a[236552+((u+16|0)-y|0)|0]|0;y=c[10030]|0;aF(z|0,y|0);y=a[236552+((w+16|0)-B|0)|0]|0;B=c[10030]|0;aF(y|0,B|0);r=1;s=u;t=w;break}else{if(n){B=c[10030]|0;aF(105,B|0)}if((a[h+j|0]&1)!=0){B=c[10030]|0;aF(97,B|0)}B=f+(j<<2)|0;y=a[236520+(c[B>>2]>>5)|0]|0;z=c[10030]|0;aF(y|0,z|0);z=a[236520+(c[B>>2]&31)|0]|0;B=c[10030]|0;aF(z|0,B|0);B=g+(j<<2)|0;z=a[236520+(c[B>>2]>>5)|0]|0;y=c[10030]|0;aF(z|0,y|0);y=a[236520+(c[B>>2]&31)|0]|0;B=c[10030]|0;aF(y|0,B|0);r=0;s=u;t=w;break}}}while(0);B=j+1|0;y=c[e>>2]|0;if((B|0)<(y|0)){m=t;b=s;j=B;n=r;l=y}else{break}}}aF(90,c[10030]|0);c[59098]=c[f+((c[e>>2]|0)-1<<2)>>2];c[59096]=c[g+((c[e>>2]|0)-1<<2)>>2];c[e>>2]=0;i=d;return}function tK(b){b=b|0;var d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0;d=i;if((b|0)!=1){a[237104]=0;i=d;return}b=c[59356]|0;e=a[237432]&1;f=c[59354]|0;j=c[59352]|0;k=c[59350]|0;l=c[59346]|0;m=a[237392]<<31>>31;n=+g[59360];o=c[59280]|0;cf(c[10030]|0,174184,(v=i,i=i+128|0,c[v>>2]=2,c[v+8>>2]=e,c[v+16>>2]=b,c[v+24>>2]=f,c[v+32>>2]=j,c[v+40>>2]=k,c[v+48>>2]=l,c[v+56>>2]=0,c[v+64>>2]=m,h[v+72>>3]=n,c[v+80>>2]=0,c[v+88>>2]=(b|0)==2&1,c[v+96>>2]=0,c[v+104>>2]=0,c[v+112>>2]=0,c[v+120>>2]=o,v)|0);do{if((c[59280]|0)>0){o=0;b=0;while(1){m=c[59282]|0;l=c[m+(b<<3)+4>>2]|0;cf(c[10030]|0,174136,(v=i,i=i+16|0,c[v>>2]=c[m+(b<<3)>>2],c[v+8>>2]=l,v)|0);l=o+1|0;do{if((o|0)>4){if((b|0)==((c[59280]|0)-1|0)){p=l;break}m=c[10030]|0;aI(84248,2,1,m|0);p=0}else{p=l}}while(0);l=b+1|0;if((l|0)<(c[59280]|0)){o=p;b=l}else{break}}if((p|0)==0){break}aF(10,c[10030]|0)}}while(0);uu(c[59282]|0);c[59282]=0;a[237104]=0;i=d;return}function tL(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0;d=i;i=i+8|0;e=d|0;f=e;c[11554]=b;if((b|0)>-1){g=(b|0)%5&-1}else{g=b}b=(g|0)==-1?2:g;g=(b|0)>0&a[46232];j=e;k=f+3|0;a[k]=0;l=f+2|0;a[l]=0;m=f+1|0;a[m]=0;a[j]=37;aI(j|0,1,4,c[10030]|0);a[k]=0;a[l]=0;a[m]=0;a[j]=12;aI(j|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[k]=-128;a[l]=0;a[m]=0;a[j]=7;aI(j|0,1,4,c[10030]|0);a[k]=0;a[l]=0;a[m]=0;a[j]=40;aI(j|0,1,4,c[10030]|0);a[k]=0;a[l]=0;a[m]=0;a[j]=12;aI(j|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[k]=0;a[l]=0;a[m]=0;a[j]=1;aI(j|0,1,4,c[10030]|0);a[k]=0;a[l]=0;a[m]=0;a[j]=38;aI(j|0,1,4,c[10030]|0);a[k]=0;a[l]=0;a[m]=0;a[j]=28;aI(j|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[k]=0;a[l]=0;a[m]=0;a[j]=1;aI(j|0,1,4,c[10030]|0);f=a[45616]|0;a[k]=0;a[l]=0;a[m]=f?0:34;a[j]=0;aI(j|0,1,4,c[10030]|0);f=~~(+h[5705]*26.37);a[k]=f>>>24&255;a[l]=f>>>16&255;a[m]=f>>>8&255;a[j]=f&255;aI(j|0,1,4,c[10030]|0);c[e>>2]=0;aI(j|0,1,4,c[10030]|0);e=c[11562]|0;a[k]=e>>>24&255;a[l]=e>>>16&255;a[m]=e>>>8&255;a[j]=e&255;aI(j|0,1,4,c[10030]|0);a[k]=0;a[l]=0;a[m]=0;a[j]=37;aI(j|0,1,4,c[10030]|0);a[k]=0;a[l]=0;a[m]=0;a[j]=12;aI(j|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[k]=0;a[l]=0;a[m]=0;a[j]=1;aI(j|0,1,4,c[10030]|0);j=(c[3524]|0)+60|0;if(g){c[j>>2]=78;g=b<<3;n=+h[5778];c[11282]=~~(+(c[238880+(g-8<<2)>>2]|0)*n*26.37);b=~~(+(c[238880+(g-7<<2)>>2]|0)*n*26.37);c[11283]=b;c[11284]=~~(+(c[238880+(g-6<<2)>>2]|0)*n*26.37);c[11285]=~~(+(c[238880+(g-5<<2)>>2]|0)*n*26.37);c[11286]=~~(+(c[238880+(g-4<<2)>>2]|0)*n*26.37);c[11287]=~~(+(c[238880+(g-3<<2)>>2]|0)*n*26.37);c[11288]=~~(+(c[238880+(g-2<<2)>>2]|0)*n*26.37);c[11289]=~~(+(c[238880+(g-1<<2)>>2]|0)*n*26.37);c[11292]=b;c[11290]=1;c[11552]=0;i=d;return}else{c[j>>2]=48;c[11552]=0;i=d;return}}function tM(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ab=0;d=i;e=c[3524]|0;if((c[e+8>>2]|0)>>>0>a>>>0){if((c[e+12>>2]|0)>>>0<=b>>>0){f=20596}}else{f=20596}if((f|0)==20596){uh(-1,171568,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0)}e=c[11298]|0;g=a-e|0;h=c[11296]|0;j=b-h|0;k=(g|0)>-1?g:-g|0;l=j*10&-1;m=(l|0)>-1?l:-l|0;l=k*10&-1;do{if((l|0)<(m|0)){n=((((aa((k*25&-1|0)/(m|0)&-1,k)|0)/6&-1)*5&-1)+((m|0)/2&-1)|0)/5&-1}else{if((k|0)==0){i=d;return}else{n=(aa((m|0)/(k|0)&-1,(m|0)/24&-1)+l|0)/10&-1;break}}}while(0);l=c[11292]|0;m=c[11290]|0;if((n|0)>(l|0)){k=n;o=l;l=m;p=e;q=h;r=e;s=h;while(1){t=k-o|0;u=a-((aa(t,g)|0)/(n|0)&-1)|0;w=b-((aa(t,j)|0)/(n|0)&-1)|0;x=c[3524]|0;y=(c[x+8>>2]|0)>>>0>u>>>0;do{if((l&1|0)==0){if(y){if((c[x+12>>2]|0)>>>0>w>>>0){z=w;A=u;B=p;C=q;D=r;E=s}else{f=20614}}else{f=20614}if((f|0)==20614){f=0;uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=u,c[v+8>>2]=w,v)|0);F=c[3524]|0;G=c[F+8>>2]|0;H=c[F+12>>2]|0;F=c[11298]|0;I=c[11296]|0;z=H>>>0>w>>>0?w:H;A=G>>>0>u>>>0?u:G;B=F;C=I;D=F;E=I}if((A|0)==(B|0)&(z|0)==(C|0)){J=B;K=C;L=D;M=E;break}tN();c[11298]=A;c[11296]=z;J=A;K=z;L=A;M=z}else{if(y){if((c[x+12>>2]|0)>>>0>w>>>0){N=r;O=s}else{f=20605}}else{f=20605}if((f|0)==20605){f=0;uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=u,c[v+8>>2]=w,v)|0);N=c[11298]|0;O=c[11296]|0}if((N|0)==(u|0)&(O|0)==(w|0)){J=u;K=w;L=u;M=w;break}I=c[11560]|0;if((I<<1|0)>102){tN();P=c[11560]|0}else{P=I}if((P|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;Q=1}else{Q=P}I=Q<<1;c[45200+(I<<2)>>2]=u;c[11298]=u;c[45200+((I|1)<<2)>>2]=w;c[11296]=w;c[11560]=Q+1;J=u;K=w;L=u;M=w}}while(0);w=(c[11290]|0)+1|0;u=(w|0)>7?0:w;c[11290]=u;w=c[45128+(u<<2)>>2]|0;c[11292]=w;if((t|0)>(w|0)){k=t;o=w;l=u;p=J;q=K;r=L;s=M}else{R=t;S=J;T=K;U=u;break}}}else{R=n;S=e;T=h;U=m}m=c[3524]|0;h=(c[m+8>>2]|0)>>>0>a>>>0;do{if((U&1|0)==0){if(h){if((c[m+12>>2]|0)>>>0>b>>>0){V=b;W=a;X=S;Y=T}else{f=20630}}else{f=20630}if((f|0)==20630){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);e=c[3524]|0;n=c[e+8>>2]|0;K=c[e+12>>2]|0;V=K>>>0>b>>>0?b:K;W=n>>>0>a>>>0?a:n;X=c[11298]|0;Y=c[11296]|0}if((W|0)==(X|0)&(V|0)==(Y|0)){break}tN();c[11298]=W;c[11296]=V}else{if(h){if((c[m+12>>2]|0)>>>0>b>>>0){Z=S;_=T}else{f=20621}}else{f=20621}if((f|0)==20621){uh(-1,171144,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=b,v)|0);Z=c[11298]|0;_=c[11296]|0}if((Z|0)==(a|0)&(_|0)==(b|0)){break}n=c[11560]|0;if((n<<1|0)>102){tN();$=c[11560]|0}else{$=n}if(($|0)==0){c[11300]=c[11298];c[11301]=c[11296];c[11560]=1;ab=1}else{ab=$}n=ab<<1;c[45200+(n<<2)>>2]=a;c[11298]=a;c[45200+((n|1)<<2)>>2]=b;c[11296]=b;c[11560]=ab+1}}while(0);c[11292]=(c[11292]|0)-R;i=d;return}function tN(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+8|0;d=b|0;e=c[11560]|0;if((e|0)==0){i=b;return}if((c[11552]|0)>0){tL(c[11554]|0);c[11552]=0;f=c[11560]|0}else{f=e}e=d|0;g=d+3|0;a[g]=0;h=d+2|0;a[h]=0;j=d+1|0;a[j]=0;a[e]=27;aI(e|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[e]=16;aI(e|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;d=c[11300]|0;a[g]=d>>>24&255;a[h]=d>>>16&255;a[j]=d>>>8&255;a[e]=d&255;aI(e|0,1,4,c[10030]|0);d=(c[(c[3524]|0)+12>>2]|0)-(c[11301]|0)|0;a[g]=d>>>24&255;a[h]=d>>>16&255;a[j]=d>>>8&255;a[e]=d&255;aI(e|0,1,4,c[10030]|0);do{if((f|0)<3){a[g]=0;a[h]=0;a[j]=0;a[e]=54;d=c[10030]|0;aI(e|0,1,4,d|0);a[g]=0;a[h]=0;a[j]=0;a[e]=16;d=c[10030]|0;aI(e|0,1,4,d|0);c[11294]=(c[11294]|0)+1;d=c[11302]|0;a[g]=d>>>24&255;a[h]=d>>>16&255;a[j]=d>>>8&255;a[e]=d&255;d=c[10030]|0;aI(e|0,1,4,d|0);d=(c[(c[3524]|0)+12>>2]|0)-(c[11303]|0)|0;a[g]=d>>>24&255;a[h]=d>>>16&255;a[j]=d>>>8&255;a[e]=d&255;d=c[10030]|0;aI(e|0,1,4,d|0)}else{if((c[11560]<<1|0)>2){k=2}else{break}while(1){a[g]=0;a[h]=0;a[j]=0;a[e]=54;aI(e|0,1,4,c[10030]|0);a[g]=0;a[h]=0;a[j]=0;a[e]=16;aI(e|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;d=c[45200+(k<<2)>>2]|0;a[g]=d>>>24&255;a[h]=d>>>16&255;a[j]=d>>>8&255;a[e]=d&255;aI(e|0,1,4,c[10030]|0);d=k+2|0;l=(c[(c[3524]|0)+12>>2]|0)-(c[45200+((k|1)<<2)>>2]|0)|0;a[g]=l>>>24&255;a[h]=l>>>16&255;a[j]=l>>>8&255;a[e]=l&255;aI(e|0,1,4,c[10030]|0);if((d|0)<(c[11560]<<1|0)){k=d}else{break}}}}while(0);c[11560]=0;i=b;return}function tO(){var b=0,d=0,e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;b=i;i=i+8|0;d=b|0;e=d;f=i;i=i+32|0;if(!(a[45664]|0)){i=b;return}j=uA(45688)|0;k=j>>>0<31?j:31;j=aQ(45688,75096)|0;if((j|0)==0){l=aQ(45688,75048)|0;if((l|0)==0){m=1;n=-112;o=k}else{p=l;q=20651}}else{p=j;q=20651}if((q|0)==20651){j=p-45688|0;m=2;n=-68;o=(j|0)<(k|0)?j:k}k=aQ(45688,74992)|0;if((k|0)==0){j=aQ(45688,74976)|0;if((j|0)==0){r=0;s=o}else{t=j;q=20654}}else{t=k;q=20654}if((q|0)==20654){k=t-45688|0;r=1;s=(k|0)<(o|0)?k:o}o=aQ(45688,171536)|0;if((o|0)==0){k=aQ(45688,171480)|0;if((k|0)==0){u=0;v=s}else{w=k;q=20657}}else{w=o;q=20657}if((q|0)==20657){o=w-45688|0;u=1;v=(o|0)<(s|0)?o:s}s=aQ(45688,171448)|0;do{if((s|0)==0){o=aQ(45688,171424)|0;if((o|0)!=0){x=o;q=20661;break}o=aQ(45688,171408)|0;if((o|0)==0){y=0;z=v}else{x=o;q=20661}}else{x=s;q=20661}}while(0);if((q|0)==20661){q=x-45688|0;y=1;z=(q|0)<(v|0)?q:v}v=f|0;q=z+1|0;uF(v|0,45688,q|0);if((uA(45688)|0)>>>0>=q>>>0){a[f+((q|0)==0?0:z)|0]=0}z=d;q=e+3|0;a[q]=0;x=e+2|0;a[x]=0;s=e+1|0;a[s]=0;a[z]=37;aI(z|0,1,4,c[10030]|0);a[q]=0;a[x]=0;a[s]=0;a[z]=12;aI(z|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[q]=-128;a[x]=0;a[s]=0;a[z]=10;aI(z|0,1,4,c[10030]|0);a[q]=0;a[x]=0;a[s]=0;a[z]=40;aI(z|0,1,4,c[10030]|0);a[q]=0;a[x]=0;a[s]=0;a[z]=12;aI(z|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[q]=0;a[x]=0;a[s]=0;a[z]=2;aI(z|0,1,4,c[10030]|0);a[q]=0;a[x]=0;a[s]=0;a[z]=82;aI(z|0,1,4,c[10030]|0);a[q]=0;a[x]=0;a[s]=1;a[z]=76;aI(z|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[q]=0;a[x]=0;a[s]=0;a[z]=2;aI(z|0,1,4,c[10030]|0);e=~~(+h[5710]*(-0.0- +g[11418])*35.28);a[q]=e>>>24&255;a[x]=e>>>16&255;a[s]=e>>>8&255;a[z]=e&255;aI(z|0,1,4,c[10030]|0);c[d>>2]=0;aI(z|0,1,4,c[10030]|0);e=c[11262]|0;a[q]=e>>>24&255;a[x]=e>>>16&255;a[s]=e>>>8&255;a[z]=e&255;aI(z|0,1,4,c[10030]|0);e=c[11262]|0;a[q]=e>>>24&255;a[x]=e>>>16&255;a[s]=e>>>8&255;a[z]=e&255;aI(z|0,1,4,c[10030]|0);a[q]=0;a[x]=0;a[s]=m;a[z]=n;aI(z|0,1,4,c[10030]|0);aF(r|0,c[10030]|0);aF(u|0,c[10030]|0);aF(y|0,c[10030]|0);y=c[11252]|0;if((y|0)==9|(y|0)==2){u=c[10030]|0;aF(-18|0,u|0)}else if((y|0)==8){aF(-120|0,c[10030]|0)}else if((y|0)==11|(y|0)==3){aF(-94|0,c[10030]|0)}else if((y|0)==12|(y|0)==13){aF(-14|0,c[10030]|0)}else{aF(1,c[10030]|0)}aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);y=0;while(1){if(y>>>0<(uA(v|0)|0)>>>0){A=a[f+y|0]|0}else{A=0}aF(A|0,c[10030]|0);aF(0,c[10030]|0);u=y+1|0;if((u|0)<32){y=u}else{B=0;break}}while(1){if(B>>>0<(uA(v|0)|0)>>>0){C=a[f+B|0]|0}else{C=0}aF(C|0,c[10030]|0);aF(0,c[10030]|0);y=B+1|0;if((y|0)<64){B=y}else{D=0;break}}do{aF(0,c[10030]|0);aF(0,c[10030]|0);D=D+1|0;}while((D|0)<32);c[d>>2]=0;aI(z|0,1,4,c[10030]|0);c[d>>2]=0;aI(z|0,1,4,c[10030]|0);c[d>>2]=0;aI(z|0,1,4,c[10030]|0);c[d>>2]=0;aI(z|0,1,4,c[10030]|0);c[d>>2]=0;aI(z|0,1,4,c[10030]|0);c[d>>2]=0;aI(z|0,1,4,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);aF(0,c[10030]|0);a[q]=0;a[x]=0;a[s]=0;a[z]=37;aI(z|0,1,4,c[10030]|0);a[q]=0;a[x]=0;a[s]=0;a[z]=12;aI(z|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;a[q]=0;a[x]=0;a[s]=0;a[z]=2;aI(z|0,1,4,c[10030]|0);i=b;return}function tP(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+8|0;d=b|0;if((c[11560]|0)==0){i=b;return}if((c[11552]|0)>0){tL(c[11554]|0);c[11552]=0}e=d|0;f=d+3|0;a[f]=0;g=d+2|0;a[g]=0;h=d+1|0;a[h]=0;a[e]=27;aI(e|0,1,4,c[10030]|0);a[f]=0;a[g]=0;a[h]=0;a[e]=16;aI(e|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;d=c[11300]|0;a[f]=d>>>24&255;a[g]=d>>>16&255;a[h]=d>>>8&255;a[e]=d&255;aI(e|0,1,4,c[10030]|0);d=(c[(c[3524]|0)+12>>2]|0)-(c[11301]|0)|0;a[f]=d>>>24&255;a[g]=d>>>16&255;a[h]=d>>>8&255;a[e]=d&255;aI(e|0,1,4,c[10030]|0);d=2;while(1){j=(d|0)<(c[11560]<<1|0);a[f]=0;a[g]=0;a[h]=0;a[e]=54;aI(e|0,1,4,c[10030]|0);a[f]=0;a[g]=0;a[h]=0;a[e]=16;aI(e|0,1,4,c[10030]|0);c[11294]=(c[11294]|0)+1;if(!j){break}j=c[45200+(d<<2)>>2]|0;a[f]=j>>>24&255;a[g]=j>>>16&255;a[h]=j>>>8&255;a[e]=j&255;aI(e|0,1,4,c[10030]|0);j=(c[(c[3524]|0)+12>>2]|0)-(c[45200+((d|1)<<2)>>2]|0)|0;a[f]=j>>>24&255;a[g]=j>>>16&255;a[h]=j>>>8&255;a[e]=j&255;aI(e|0,1,4,c[10030]|0);d=d+2|0}d=c[11300]|0;a[f]=d>>>24&255;a[g]=d>>>16&255;a[h]=d>>>8&255;a[e]=d&255;aI(e|0,1,4,c[10030]|0);d=(c[(c[3524]|0)+12>>2]|0)-(c[11301]|0)|0;a[f]=d>>>24&255;a[g]=d>>>16&255;a[h]=d>>>8&255;a[e]=d&255;aI(e|0,1,4,c[10030]|0);c[11560]=0;i=b;return}function tQ(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;f=i;i=i+8|0;j=f|0;if((e|0)==0){i=f;return}if((a[e]|0)==0){i=f;return}do{if((a[37456]&1)==0){if((cy(e|0,170608)|0)==0){break}k=c[3524]|0;if((c[k+8>>2]|0)>>>0>b>>>0){if((c[k+12>>2]|0)>>>0>d>>>0){l=d;m=b}else{n=20699}}else{n=20699}if((n|0)==20699){uh(-1,171048,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=d,v)|0);k=c[3524]|0;o=c[k+8>>2]|0;p=c[k+12>>2]|0;l=p>>>0>d>>>0?d:p;m=o>>>0>b>>>0?b:o}if(!((m|0)==(c[11298]|0)&(l|0)==(c[11296]|0))){tN();c[11298]=m;c[11296]=l}if((c[11280]|0)!=(c[11562]|0)){o=j|0;p=j+3|0;a[p]=0;k=j+2|0;a[k]=0;q=j+1|0;a[q]=0;a[o]=24;r=c[10030]|0;aI(o|0,1,4,r|0);a[p]=0;a[k]=0;a[q]=0;a[o]=12;r=c[10030]|0;aI(o|0,1,4,r|0);c[11294]=(c[11294]|0)+1;r=c[11562]|0;a[p]=r>>>24&255;a[k]=r>>>16&255;a[q]=r>>>8&255;a[o]=r&255;r=c[10030]|0;aI(o|0,1,4,r|0);c[11280]=c[11562]}h[5613]=1.0;uF(44912,170592,16);a[238232]=0;c[59556]=0;c[59562]=45688;g[59560]=+g[11418];if(((c[11414]|0)-1|0)>>>0<2){a[238208]=1}r=j|0;o=j+3|0;a[o]=0;q=j+2|0;a[q]=0;k=j+1|0;a[k]=0;a[r]=22;p=c[10030]|0;aI(r|0,1,4,p|0);a[o]=0;a[q]=0;a[k]=0;a[r]=12;p=c[10030]|0;aI(r|0,1,4,p|0);c[11294]=(c[11294]|0)+1;a[o]=0;a[q]=0;a[k]=0;a[r]=24;k=c[10030]|0;aI(r|0,1,4,k|0);k=e;do{r=lJ(k,1,c[59562]|0,+g[59560],0.0,1,1,0)|0;if((a[r]|0)==0){break}cS[c[(c[3524]|0)+160>>2]&511]();if((a[r]|0)==125){uh(-1,203744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{uh(-1,203528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}k=r+1|0;}while((a[k]|0)!=0);k=c[11414]|0;if((k-1|0)>>>0<2){r=(c[11298]|0)-b|0;if((c[11262]|0)==0){s=0}else{s=(c[11296]|0)-d|0}c[11414]=0;a[238208]=0;if((k|0)==2){tQ(b-r|0,d-s|0,e)}else if((k|0)==1){tQ(b-((r|0)/2&-1)|0,d-((s|0)/2&-1)|0,e)}c[11414]=k}tO();g[59564]=0.0;i=f;return}}while(0);n$(b,d,e);i=f;return}function tR(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=i;do{if((a[37456]&1)==0){if((cy(e|0,170608)|0)==0){break}h[5613]=1.0;a[238320]=0;uF(44912,216760,16);c[11678]=b;c[11674]=d;g=e;while(1){j=lJ(g,1,179864,1.0,0.0,1,1,0)|0;if((a[j]|0)==0){k=20745;break}cS[c[(c[3524]|0)+160>>2]&511]();if((a[j]|0)==125){uh(-1,203744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{uh(-1,203528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}l=j+1|0;if((a[l]|0)==0){k=20743;break}else{g=l}}if((k|0)==20745){i=f;return}else if((k|0)==20743){i=f;return}}}while(0);g=uA(e|0)|0;l=c[11676]|0;if((g+b|0)>>>0>l>>>0){j=l-g|0;m=(j|0)<0?0:j}else{m=b}if(m>>>0>>0){n=e;o=m;p=l}else{i=f;return}while(1){l=a[n]|0;if(l<<24>>24==0){k=20742;break}do{if(p>>>0>>0|(c[11672]|0)>>>0>>0){q=p}else{m=aa(p,d)+o|0;if((a[(c[11680]|0)+m|0]|0)>=5){q=p;break}a[(c[11684]|0)+m|0]=l;m=aa(c[11676]|0,d)+o|0;a[(c[11680]|0)+m|0]=5;q=c[11676]|0}}while(0);l=o+1|0;if(l>>>0>>0){n=n+1|0;o=l;p=q}else{k=20744;break}}if((k|0)==20742){i=f;return}else if((k|0)==20744){i=f;return}}function tS(){var a=0,b=0,d=0;a=c[13656]|0;if((a|0)==0){return}b=c[13602]|0;tY(4,1,a<<1);if((a|0)>0){d=0;do{tZ(c[b+(d<<2)>>2]|0);d=d+1|0;}while((d|0)<(a|0))}c[13656]=0;return}function tT(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((c[13642]|0)==(a|0)){return}c[13642]=a;tS();if((a|0)>8){b=(a|0)%9&-1}else{b=a}a=(c[3524]|0)+60|0;if((b|0)<1){c[a>>2]=106;return}c[a>>2]=80;a=b<<3;b=c[13624]|0;d=c[242808+(a-8<<2)>>2]|0;if((d|0)==0){e=0}else{e=(aa(d<<1,b)>>>0)/3>>>0}c[13570]=e;e=c[242808+(a-7<<2)>>2]|0;if((e|0)==0){f=0}else{f=(aa(e<<1,b)>>>0)/3>>>0}c[13571]=f;e=c[242808+(a-6<<2)>>2]|0;if((e|0)==0){g=0}else{g=(aa(e<<1,b)>>>0)/3>>>0}c[13572]=g;g=c[242808+(a-5<<2)>>2]|0;if((g|0)==0){h=0}else{h=(aa(g<<1,b)>>>0)/3>>>0}c[13573]=h;h=c[242808+(a-4<<2)>>2]|0;if((h|0)==0){i=0}else{i=(aa(h<<1,b)>>>0)/3>>>0}c[13574]=i;i=c[242808+(a-3<<2)>>2]|0;if((i|0)==0){j=0}else{j=(aa(i<<1,b)>>>0)/3>>>0}c[13575]=j;j=c[242808+(a-2<<2)>>2]|0;if((j|0)==0){k=0}else{k=(aa(j<<1,b)>>>0)/3>>>0}c[13576]=k;k=c[242808+(a-1<<2)>>2]|0;if((k|0)==0){l=0}else{l=(aa(k<<1,b)>>>0)/3>>>0}c[13577]=l;c[13580]=f;c[13578]=1;return}function tU(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=c[3524]|0;e=c[d+8>>2]|0;f=e>>>0>a>>>0?a:e;e=c[d+12>>2]|0;d=e>>>0>b>>>0?b:e;e=f-(c[13598]|0)|0;b=d-(c[13596]|0)|0;a=(e|0)>-1?e:-e|0;g=b*10&-1;h=(g|0)>-1?g:-g|0;g=a*10&-1;do{if((g|0)<(h|0)){i=((((aa((a*25&-1|0)/(h|0)&-1,a)|0)/6&-1)*5&-1)+((h|0)/2&-1)|0)/5&-1}else{if((a|0)==0){return}else{i=(aa((h|0)/(a|0)&-1,(h|0)/24&-1)+g|0)/10&-1;break}}}while(0);g=c[13580]|0;h=c[13578]|0;if((i|0)>(g|0)){a=i;j=g;g=h;while(1){k=a-j|0;l=f-((aa(k,e)|0)/(i|0)&-1)|0;m=d-((aa(k,b)|0)/(i|0)&-1)|0;if((g&1|0)==0){m5(l,m)}else{m6(l,m)}m=(c[13578]|0)+1|0;l=(m|0)>7?0:m;c[13578]=l;m=c[54280+(l<<2)>>2]|0;c[13580]=m;if((k|0)>(m|0)){a=k;j=m;g=l}else{n=k;o=l;break}}}else{n=i;o=h}if((o&1|0)==0){m5(f,d)}else{m6(f,d)}c[13580]=(c[13580]|0)-n;return}function tV(){var b=0,d=0,e=0,f=0.0,g=0,i=0,j=0,k=0;uD(54528,89360,15);b=uA(54528)|0;d=c[13630]|0;e=c[d>>2]|0;L27708:do{if((e|0)==0){f=1.0}else{g=0;i=e;while(1){if((uA(i|0)|0)==(b|0)){if((uJ(54528,i|0,b|0)|0)==0){break}}j=g+1|0;k=c[d+(j<<4)>>2]|0;if((k|0)==0){f=1.0;break L27708}else{g=j;i=k}}f=+h[d+(g<<4)+8>>3]}}while(0);c[13628]=12;d=c[3524]|0;c[d+16>>2]=((((c[d+8>>2]|0)+182|0)>>>0)/((c[13604]|0)>>>0)>>>0)*12&-1;d=c[3524]|0;c[d+20>>2]=~~(f*+(aa((((c[d+8>>2]|0)+182|0)>>>0)/((c[13604]|0)>>>0)>>>0,c[13628]|0)>>>0>>>0)*.527);c[13622]=1;a[54472]=0;c[13604]=432;a[54400]=0;a[54336]=0;a[54576]=0;a[54424]=0;c[13646]=c[13586];c[13647]=c[13587];c[13648]=c[13588];c[13649]=c[13589];c[13650]=c[13590];c[13651]=c[13591];c[13652]=c[13592];c[13653]=c[13593];c[13654]=c[13594];c[13655]=c[13595];c[13554]=0;return}function tW(a){a=a|0;var b=0,d=0,e=0.0,f=0,g=0.0,j=0;b=i;d=a>>4;e=+(d|0)/100.0;f=a&15;do{if((f|0)==0){uD(243392,164560,23);i=b;return}else if((f|0)==2|(f|0)==5){a=(d|0)%5&-1;if((a|0)==4){g=.5;j=20811;break}else if((a|0)==2){g=.25;j=20811;break}else if((a|0)==1){j=20810;break}else if((a|0)==0){g=0.0;j=20811;break}else if((a|0)==3){g=.75;j=20811;break}else{j=20809;break}}else if((f|0)==4){be(243392,164584,(v=i,i=i+24|0,c[v>>2]=55376,h[v+8>>3]=e,c[v+16>>2]=0,v)|0);i=b;return}else if((f|0)==1){j=20809}else{be(243392,164424,(v=i,i=i+16|0,c[v>>2]=55372,c[v+8>>2]=0,v)|0);i=b;return}}while(0);if((j|0)==20809){if(e==1.0){j=20810}else{g=e;j=20811}}if((j|0)==20810){uB(243392,55372);i=b;return}else if((j|0)==20811){j=bW(55376)|0;f=bW(55380)|0;e=(1.0-g)*255.0;d=~~(e+g*+(bW(55384)|0));be(243392,164536,(v=i,i=i+32|0,c[v>>2]=~~(e+g*+(j|0)),c[v+8>>2]=~~(e+g*+(f|0)),c[v+16>>2]=d,c[v+24>>2]=0,v)|0);i=b;return}}function tX(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0.0,j=0,k=0,l=0,m=0,n=0;f=i;g=+h[6936];if((a[e]|0)==0){i=f;return}do{if((a[37456]&1)==0){if((cy(e|0,170608)|0)==0){break}j=a[55472]|0;if(!(j&(c[13838]|0)==(b|0)&(c[13834]|0)==(d|0))){if(!j){j=c[10030]|0;aI(162736,17,1,j|0);a[55472]=1;a[72328]=0}j=c[10030]|0;k=(c[13832]|0)-d|0;cf(j|0,162768,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=k,v)|0);c[13838]=b;c[13834]=d}h[5613]=1.0;uF(44912,216760,16);a[238512]=0;h[29815]=+h[6936];k=c[13866]|0;if((aY(k|0,164216)|0)==0){l=20829}else{if((aY(k|0,173184)|0)==0){l=20829}else{m=e}}if((l|0)==20829){a[238488]=1;m=e}do{k=lJ(m,1,179864,g,0.0,1,1,0)|0;if((a[k]|0)==0){break}cS[c[(c[3524]|0)+160>>2]&511]();if((a[k]|0)==125){uh(-1,203744,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else{uh(-1,203528,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}m=k+1|0;}while((a[m]|0)!=0);k=c[13866]|0;if((aY(k|0,164216)|0)==0){l=20837}else{if((aY(k|0,173184)|0)==0){l=20837}}if((l|0)==20837){j=(c[13838]|0)-b|0;if((c[13840]|0)==0){n=0}else{n=(c[13834]|0)-d|0}c[13866]=179864;a[238488]=0;do{if((aY(k|0,164216)|0)==0){tX(b-j|0,d-n|0,e)}else{if((aY(k|0,173184)|0)!=0){break}tX(b-((j|0)/2&-1)|0,d-((n|0)/2&-1)|0,e)}}while(0);c[13866]=k}h[6936]=g;h[29816]=0.0;i=f;return}}while(0);mO(b,d,e);i=f;return}function tY(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+24|0;g=f|0;h=f+8|0;j=f+16|0;if(b>>>0>=16){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167440,v)|0)}if(d>>>0>=128){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167408,v)|0)}if((e|0)<=-1){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167384,v)|0)}k=d<<5&4064|b<<12&61440;if((e|0)<31){b=k|e&31;d=j;if(b>>>0>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[d]=k>>>8&255;a[j+1|0]=b&255;b=c[10030]|0;aI(d|0,1,2,b|0);i=f;return}b=k|31;d=h;if(b>>>0>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[d]=k>>>8&255;a[h+1|0]=b&255;aI(d|0,1,2,c[10030]|0);d=g;if((e|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((e|0)>=32768){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}a[d]=e>>>8&255;a[g+1|0]=e&255;aI(d|0,1,2,c[10030]|0);i=f;return}function tZ(b){b=b|0;var d=0,e=0,f=0;d=i;i=i+8|0;e=d|0;if((b|0)<=-32769){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167584,v)|0)}if((b|0)<32768){f=e;a[f]=b>>>8&255;a[e+1|0]=b&255;b=c[10030]|0;aI(f|0,1,2,b|0);i=d;return}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}function t_(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+8|0;h=g|0;j=((e|0)>254?3:1)+e|0;k=j&1;l=(k|0)==0;tY(b,d,j);j=c[10030]|0;do{if((e|0)<255){d=e<<24>>24;aF(d|0,j|0)}else{d=a[241904]|0;aF(d|0,j|0);d=h;if((e|0)<32768){a[d]=e>>>8&255;a[h+1|0]=e&255;b=c[10030]|0;aI(d|0,1,2,b|0);break}else{uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=167472,v)|0)}}}while(0);do{if((f|0)==0){h=k+e|0;if((h|0)>0){m=0}else{break}do{aF(0,c[10030]|0);m=m+1|0;}while((m|0)<(h|0))}else{aI(f|0,1,e|0,c[10030]|0)}}while(0);if(l){i=g;return}aF(a[241896]|0|0,c[10030]|0);i=g;return}function t$(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=c[60208]|0;g=c[f>>2]|0;h=a[240824]|0;if((g&1|0)==0){if(h){i=c[60230]|0;j=c[60226]|0;k=c[10030]|0;aF(29,k|0);k=j>>>5&31|32;l=c[10030]|0;aF(k|0,l|0);l=j&31|96;j=c[10030]|0;aF(l|0,j|0);j=i>>>5&31|32;l=c[10030]|0;aF(j|0,l|0);l=i&31|64;i=c[10030]|0;aF(l|0,i|0);i=c[60228]|0;l=c[60224]|0;j=l>>>5&31|32;k=c[10030]|0;aF(j|0,k|0);k=l&31|96;l=c[10030]|0;aF(k|0,l|0);l=i>>>5&31|32;k=c[10030]|0;aF(l|0,k|0);k=i&31|64;i=c[10030]|0;aF(k|0,i|0);a[240824]=0;i=c[60208]|0;m=i;n=c[i>>2]|0}else{m=f;n=g}c[m>>2]=n>>>1;return}c[60228]=b;if(h){c[60224]=d}else{c[60230]=b;c[60224]=d;c[60226]=d;a[240824]=1}c[f>>2]=(c[f>>2]|0)>>>1|-2147483648;if((e|0)==0){return}e=c[60230]|0;f=c[60226]|0;aF(29,c[10030]|0);aF(f>>>5&31|32|0,c[10030]|0);aF(f&31|96|0,c[10030]|0);aF(e>>>5&31|32|0,c[10030]|0);aF(e&31|64|0,c[10030]|0);e=c[60228]|0;f=c[60224]|0;aF(f>>>5&31|32|0,c[10030]|0);aF(f&31|96|0,c[10030]|0);aF(e>>>5&31|32|0,c[10030]|0);aF(e&31|64|0,c[10030]|0);a[240824]=0;return}function t0(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=b>>>0>4095?4095:b;b=d>>>0>3131?3131:d;d=(e>>>7)+32|0;f=e>>>2&31|64;g=(b>>>7)+32|0;h=b>>>2&31|96;i=e&3|b<<2&12|96;if((a[226904]|0|0)!=(g|0)){b=c[10030]|0;aF(g|0,b|0)}if((a[226920]|0|0)!=(i|0)){b=c[10030]|0;aF(i|0,b|0)}do{if((a[226896]|0|0)==(h|0)){if((a[226920]|0|0)!=(i|0)){j=20908;break}b=a[226912]|0;if((b<<24>>24|0)==(d|0)){k=b}else{j=20908}}else{j=20908}}while(0);if((j|0)==20908){j=c[10030]|0;aF(h|0,j|0);k=a[226912]|0}if((k<<24>>24|0)==(d|0)){l=c[10030]|0;m=aF(f|0,l|0)|0;n=d&255;a[226912]=n;o=g&255;a[226904]=o;p=h&255;a[226896]=p;q=i&255;a[226920]=q;return}aF(d|0,c[10030]|0);l=c[10030]|0;m=aF(f|0,l|0)|0;n=d&255;a[226912]=n;o=g&255;a[226904]=o;p=h&255;a[226896]=p;q=i&255;a[226920]=q;return}function t1(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0;g=i;i=i+8|0;j=g|0;c[j>>2]=b;b=e+12|0;c[b>>2]=1;k=e|0;c[k>>2]=0;l=e+4|0;c[l>>2]=0;m=e+8|0;c[m>>2]=0;n=e+16|0;c[n>>2]=0;o=e+20|0;c[o>>2]=2e3;h[f>>3]=0.0;c[e+24>>2]=-1;p=e+28|0;c[p>>2]=-1;q=d;d=0;r=0;L27863:while(1){s=q;L27865:while(1){t=a[s]|0;do{if((t<<24>>24|0)==37){break L27865}else if((t<<24>>24|0)==0){break L27863}else if((t<<24>>24|0)==32){u=c[j>>2]|0;if((a[u]|0)==32){w=u}else{break}do{w=w+1|0;c[j>>2]=w;}while((a[w]|0)==32)}else{u=c[j>>2]|0;if(t<<24>>24!=(a[u]|0)){break L27863}c[j>>2]=u+1}}while(0);s=s+1|0}t=a[s+1|0]|0;do{if((t|0)==109){u=c[j>>2]|0;x=a[u]|0;do{if((x-48&255)<10){y=u+1|0;z=(x<<24>>24)-48|0;A=a[y]|0;if((A-48&255)>=10){B=y;C=z;break}B=u+2|0;C=((z*10&-1)-48|0)+(A<<24>>24)|0}else{B=u;C=0}}while(0);c[j>>2]=B;c[n>>2]=C-1;D=d;E=r+1|0}else if((t|0)==66){u=c[j>>2]|0;x=0;while(1){if((x|0)>=12){F=20933;break}A=40552+(x<<5)|0;G=uA(A|0)|0;if((uJ(u|0,A|0,G|0)|0)==0){F=20932;break}else{x=x+1|0}}if((F|0)==20932){F=0;c[j>>2]=u+G;H=x}else if((F|0)==20933){F=0;uh(-2,199248,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);H=0}c[n>>2]=H;D=d;E=r}else if((t|0)==106){A=c[j>>2]|0;z=a[A]|0;do{if((z-48&255)<10){y=A+1|0;I=(z<<24>>24)-48|0;J=a[y]|0;if((J-48&255)>=10){K=y;L=I;break}y=A+2|0;M=((I*10&-1)-48|0)+(J<<24>>24)|0;J=a[y]|0;if((J-48&255)>=10){K=y;L=M;break}K=A+3|0;L=((M*10&-1)-48|0)+(J<<24>>24)|0}else{K=A;L=0}}while(0);c[j>>2]=K;c[p>>2]=L-1;D=d+1|0;E=r+1|0}else if((t|0)==100){A=c[j>>2]|0;z=a[A]|0;do{if((z-48&255)<10){x=A+1|0;u=(z<<24>>24)-48|0;J=a[x]|0;if((J-48&255)>=10){N=x;O=u;break}N=A+2|0;O=((u*10&-1)-48|0)+(J<<24>>24)|0}else{N=A;O=0}}while(0);c[b>>2]=O;c[j>>2]=N;D=d;E=r+1|0}else if((t|0)==115){t3(e,+uz(c[j>>2]|0,j)+-946684800.0);D=d;E=r}else if((t|0)==98){A=c[j>>2]|0;z=0;while(1){if((z|0)>=12){F=20928;break}J=72368+(z<<3)|0;P=uA(J|0)|0;if((uJ(A|0,J|0,P|0)|0)==0){F=20927;break}else{z=z+1|0}}if((F|0)==20928){F=0;uh(-2,115608,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);Q=0}else if((F|0)==20927){F=0;c[j>>2]=A+P;Q=z}c[n>>2]=Q;D=d;E=r}else if((t|0)==77){J=c[j>>2]|0;u=a[J]|0;do{if((u-48&255)<10){x=J+1|0;M=(u<<24>>24)-48|0;y=a[x]|0;if((y-48&255)>=10){R=x;S=M;break}R=J+2|0;S=((M*10&-1)-48|0)+(y<<24>>24)|0}else{R=J;S=0}}while(0);c[l>>2]=S;c[j>>2]=R;D=d;E=r}else if((t|0)==89){J=c[j>>2]|0;u=a[J]|0;do{if((u-48&255)<10){z=J+1|0;A=(u<<24>>24)-48|0;y=a[z]|0;if((y-48&255)>=10){T=z;U=A;break}z=J+2|0;M=((A*10&-1)-48|0)+(y<<24>>24)|0;y=a[z]|0;if((y-48&255)>=10){T=z;U=M;break}z=J+3|0;A=((M*10&-1)-48|0)+(y<<24>>24)|0;y=a[z]|0;if((y-48&255)>=10){T=z;U=A;break}T=J+4|0;U=((A*10&-1)-48|0)+(y<<24>>24)|0}else{T=J;U=0}}while(0);c[o>>2]=U;c[j>>2]=T;D=d;E=r+1|0}else if((t|0)==83){J=c[j>>2]|0;u=a[J]|0;do{if((u-48&255)<10){y=J+1|0;A=(u<<24>>24)-48|0;z=a[y]|0;if((z-48&255)>=10){V=y;W=A;break}V=J+2|0;W=((A*10&-1)-48|0)+(z<<24>>24)|0}else{V=J;W=0}}while(0);c[k>>2]=W;c[j>>2]=V;J=a[V]|0;if(J<<24>>24!=46){u=c[12886]|0;if((u|0)==0){D=d;E=r;break}if(J<<24>>24!=(a[u]|0)){D=d;E=r;break}}h[f>>3]=+uz(V,0);D=d;E=r}else if((t|0)==72){u=c[j>>2]|0;J=a[u]|0;do{if((J-48&255)<10){z=u+1|0;A=(J<<24>>24)-48|0;y=a[z]|0;if((y-48&255)>=10){X=z;Y=A;break}X=u+2|0;Y=((A*10&-1)-48|0)+(y<<24>>24)|0}else{X=u;Y=0}}while(0);c[m>>2]=Y;c[j>>2]=X;D=d;E=r}else if((t|0)==121){u=c[j>>2]|0;J=a[u]|0;if((J-48&255)<10){y=u+1|0;A=(J<<24>>24)-48|0;J=a[y]|0;if((J-48&255)<10){Z=u+2|0;_=((A*10&-1)-48|0)+(J<<24>>24)|0}else{Z=y;_=A}c[o>>2]=_;c[j>>2]=Z;if((_|0)<69){$=_;F=20945}else{aa=_}}else{c[o>>2]=0;c[j>>2]=u;$=0;F=20945}if((F|0)==20945){F=0;u=$+100|0;c[o>>2]=u;aa=u}c[o>>2]=aa+1900;D=d;E=r+1|0}else{uh(-2,148656,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);D=d;E=r}}while(0);q=s+2|0;d=D;r=E}E=c[k>>2]|0;if((E|0)>59){c[l>>2]=(c[l>>2]|0)+((E|0)/60&-1);c[k>>2]=(E|0)%60&-1}E=c[l>>2]|0;if((E|0)>59){c[m>>2]=(c[m>>2]|0)+((E|0)/60&-1);c[l>>2]=(E|0)%60&-1}E=c[m>>2]|0;if((E|0)>23){l=(E|0)/24&-1;if((d|0)!=0){c[p>>2]=(c[p>>2]|0)+l}c[b>>2]=(c[b>>2]|0)+l;c[m>>2]=(E|0)%24&-1}if((r|0)==0){ab=c[j>>2]|0;i=g;return ab|0}do{if((d|0)==0){r=c[n>>2]|0;if((r|0)<0){uf(-2,116496,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{ac=r;ad=c[b>>2]|0;break}}else{r=c[p>>2]|0;if((r|0)<0){uf(-2,131384,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else{c[n>>2]=0;E=r+1|0;c[b>>2]=E;ac=0;ad=E;break}}}while(0);if((ad|0)<1){uf(-2,103704,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}if((ac|0)>11){c[o>>2]=(c[o>>2]|0)+((ac|0)/12&-1);p=(ac|0)%12&-1;c[n>>2]=p;ae=p;af=ad}else{ae=ac;af=ad}while(1){ad=c[34056+(ae<<2)>>2]|0;do{if((ae|0)==1){ac=c[o>>2]|0;if((ac&3|0)!=0){ag=0;break}ag=(((ac|0)%100&-1|0)!=0|((ac|0)%400&-1|0)==0)&1}else{ag=0}}while(0);s=ag+ad|0;if((af|0)<=(s|0)){break}ac=ae+1|0;c[n>>2]=ac;if((ac|0)==12){c[o>>2]=(c[o>>2]|0)+1;c[n>>2]=0;ah=0}else{ah=ac}ac=af-s|0;c[b>>2]=ac;ae=ah;af=ac}ab=c[j>>2]|0;i=g;return ab|0}function t2(a){a=a|0;var b=0,d=0,e=0.0,f=0.0,g=0.0,h=0,i=0.0,j=0,k=0.0,l=0.0,m=0.0,n=0,o=0.0,p=0.0;b=c[a+20>>2]|0;do{if((b|0)<2e3){d=b;e=0.0;while(1){if((d&3|0)==0){f=((d|0)%100&-1|0)!=0|((d|0)%400&-1|0)==0?366.0:365.0}else{f=365.0}g=e-f;h=d+1|0;if((h|0)<2e3){d=h;e=g}else{i=g;break}}}else{if((b|0)>2e3){j=2e3;k=0.0}else{i=0.0;break}while(1){if((j&3|0)==0){l=((j|0)%100&-1|0)!=0|((j|0)%400&-1|0)==0?366.0:365.0}else{l=365.0}e=k+l;d=j+1|0;if((d|0)<(b|0)){j=d;k=e}else{i=e;break}}}}while(0);j=c[a+12>>2]|0;if((j|0)>0){d=c[a+16>>2]|0;if((d|0)>0){h=0;k=i;while(1){l=+(c[34056+(h<<2)>>2]|0);do{if((h|0)==1){if((b&3|0)!=0){m=0.0;break}m=+((((b|0)%100&-1|0)!=0|((b|0)%400&-1|0)==0)&1|0)}else{m=0.0}}while(0);f=k+(l+m);n=h+1|0;if((n|0)<(d|0)){h=n;k=f}else{o=f;break}}}else{o=i}p=o+(+(j|0)+-1.0)}else{p=i+ +(c[a+28>>2]|0)}return+(+(c[a>>2]|0)+(+(c[a+4>>2]|0)+(p*24.0+ +(c[a+8>>2]|0))*60.0)*60.0)}function t3(a,b){a=a|0;b=+b;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0,r=0.0,s=0,t=0,u=0.0,w=0,x=0,y=0,z=0.0,A=0,B=0;d=i;if(+P(+b)>1.0e12){uh(-1,96560,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);e=-1;i=d;return e|0}f=a+20|0;c[f>>2]=2e3;g=a|0;h=a+4|0;j=a+8|0;k=a+16|0;l=a+28|0;c[l>>2]=0;m=a+12|0;uE(a|0,0,20);L28020:do{if(b<0.0){n=6;o=b;p=2e3;do{p=p-1|0;if((p&3|0)==0){q=((p|0)%100&-1|0)!=0|((p|0)%400&-1|0)==0?366:365}else{q=365}o=o+ +(q|0)*86400.0;n=(n+371|0)-q|0;}while(o<0.0);c[f>>2]=p;r=o;s=n;t=p}else{u=b;w=6;x=2e3;while(1){if((x&3|0)==0){y=((x|0)%100&-1|0)!=0|((x|0)%400&-1|0)==0?366:365}else{y=365}z=+(y|0)*86400.0;if(u>2]=A;u=u-z;w=(w-364|0)+y|0;x=A}}}while(0);y=~~(r/86400.0);c[l>>2]=y;b=r- +(y|0)*86400.0;l=(~~b|0)/3600&-1;c[j>>2]=l;r=b- +(l*3600&-1|0);l=(~~r|0)/60&-1;c[h>>2]=l;c[g>>2]=~~(r- +(l*60&-1|0));c[a+24>>2]=(y+s|0)%7&-1;s=y;y=0;while(1){a=c[34056+(y<<2)>>2]|0;do{if((y|0)==1){if((t&3|0)!=0){B=0;break}B=(((t|0)%100&-1|0)!=0|((t|0)%400&-1|0)==0)&1}else{B=0}}while(0);l=B+a|0;if((s|0)<(l|0)){break}g=y+1|0;c[k>>2]=g;s=s-l|0;y=g}c[m>>2]=s+1;e=0;i=d;return e|0}function t4(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=+g;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0.0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0;j=i;uE(b|0,0,d|0);k=f+16|0;l=f+24|0;m=f+12|0;n=f+8|0;o=f+28|0;p=f+4|0;q=f|0;r=f+20|0;s=e;e=0;t=b;L28044:while(1){b=a[s]|0;do{if((b<<24>>24|0)==0){u=e;w=21166;break L28044}else if((b<<24>>24|0)==37){x=s+1|0;y=(a[x]|0)==48;z=y&1;A=y?s+2|0:x;x=a[A]|0;if((x-48&255)<10){B=0;C=A;D=x;while(1){E=((B*10&-1)-48|0)+(D<<24>>24)|0;F=C+1|0;G=a[F]|0;if((G-48&255)<10){B=E;C=F;D=G}else{H=E;I=F;J=G;break}}}else{H=0;I=A;J=x}if(J<<24>>24==46){D=I+1|0;C=a[D]|0;if((C-48&255)<10){B=0;G=D;F=C;while(1){E=((B*10&-1)-48|0)+(F<<24>>24)|0;K=G+1|0;L=a[K]|0;if((L-48&255)<10){B=E;G=K;F=L}else{M=E;N=K;P=L;break}}}else{M=0;N=D;P=C}Q=N;S=(M|0)>6?6:M;T=P}else{Q=I;S=0;T=J}F=T<<24>>24;do{if((F|0)==77){if((H|0)==0){U=y?z:1;V=2}else{U=z;V=H}if((V+e|0)>>>0>d>>>0){u=0;w=21167;break L28044}G=(U|0)!=0?90536:82208;B=c[p>>2]|0;be(t|0,G|0,(v=i,i=i+16|0,c[v>>2]=V,c[v+8>>2]=B,v)|0);w=21140}else if((F|0)==84){if((t4(t,d-e|0,179088,f,0.0)|0)==0){u=0;w=21143;break L28044}else{w=21140}}else if((F|0)==72){if((H|0)==0){W=y?z:1;X=2}else{W=z;X=H}if((X+e|0)>>>0>d>>>0){u=0;w=21171;break L28044}B=c[n>>2]|0;be(t|0,((W|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=X,c[v+8>>2]=B,v)|0);w=21140}else if((F|0)==37){if((e+1|0)>>>0>d>>>0){u=0;w=21144;break L28044}a[t]=37;Y=t;Z=e}else if((F|0)==87){B=c[o>>2]|0;G=c[l>>2]|0;do{if((B|0)>(G|0)){x=B-G|0;A=(G|0)>0?x+7|0:x;x=(A|0)/7&-1;if(((A|0)%7&-1|0)<=2){_=x;break}_=x+1|0}else{_=(B|0)==(G|0)&(G|0)==0?52:((c[m>>2]|0)-B|0)>4?52:1}}while(0);if((H|0)==0){$=y?z:1;aa=2}else{$=z;aa=H}if((aa+e|0)>>>0>d>>>0){u=0;w=21154;break L28044}be(t|0,(($|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=aa,c[v+8>>2]=_,v)|0);w=21140}else if((F|0)==108){B=(H|0)==0?2:H;if((B+e|0)>>>0>d>>>0){u=0;w=21147;break L28044}G=(((c[n>>2]|0)+11|0)%12&-1)+1|0;be(t|0,(y?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=B,c[v+8>>2]=G,v)|0);w=21140}else if((F|0)==121){if((H|0)==0){ab=y?z:1;ac=2}else{ab=z;ac=H}if((ac+e|0)>>>0>d>>>0){u=0;w=21148;break L28044}G=(c[r>>2]|0)%100&-1;be(t|0,((ab|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=ac,c[v+8>>2]=G,v)|0);w=21140}else if((F|0)==98|(F|0)==104){G=72368+(c[k>>2]<<3)|0;if(((uA(G|0)|0)+e|0)>>>0>d>>>0){u=0;w=21149;break L28044}uB(t|0,G|0);w=21140}else if((F|0)==73){if((H|0)==0){ad=y?z:1;ae=2}else{ad=z;ae=H}if((ae+e|0)>>>0>d>>>0){u=0;w=21155;break L28044}G=(((c[n>>2]|0)+11|0)%12&-1)+1|0;be(t|0,((ad|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=ae,c[v+8>>2]=G,v)|0);w=21140}else if((F|0)==65){G=40936+(c[l>>2]<<5)|0;if(((uA(G|0)|0)+e|0)>>>0>d>>>0){u=0;w=21150;break L28044}uB(t|0,G|0);w=21140}else if((F|0)==112){if((e+2|0)>>>0>d>>>0){u=0;w=21151;break L28044}G=(c[n>>2]|0)<12?215536:209856;a[t]=a[G]|0;a[t+1|0]=a[G+1|0]|0;a[t+2|0]=a[G+2|0]|0;w=21140}else if((F|0)==100){if((H|0)==0){af=y?z:1;ag=2}else{af=z;ag=H}if((ag+e|0)>>>0>d>>>0){u=0;w=21168;break L28044}G=c[m>>2]|0;be(t|0,((af|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=ag,c[v+8>>2]=G,v)|0);w=21140}else if((F|0)==89){if((H|0)==0){ah=y?z:1;ai=4}else{ah=z;ai=H}if((ai+e|0)>>>0>d>>>0){u=0;w=21169;break L28044}G=c[r>>2]|0;be(t|0,((ah|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=ai,c[v+8>>2]=G,v)|0);w=21140}else if((F|0)==107){G=(H|0)==0?2:H;if((G+e|0)>>>0>d>>>0){u=0;w=21152;break L28044}B=c[n>>2]|0;be(t|0,(y?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=G,c[v+8>>2]=B,v)|0);w=21140}else if((F|0)==109){if((H|0)==0){aj=y?z:1;ak=2}else{aj=z;ak=H}if((ak+e|0)>>>0>d>>>0){u=0;w=21161;break L28044}B=(c[k>>2]|0)+1|0;be(t|0,((aj|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=ak,c[v+8>>2]=B,v)|0);w=21140}else if((F|0)==114){if((t4(t,d-e|0,204248,f,0.0)|0)==0){u=0;w=21156;break L28044}else{w=21140}}else if((F|0)==66){B=40552+(c[k>>2]<<5)|0;if(((uA(B|0)|0)+e|0)>>>0>d>>>0){u=0;w=21157;break L28044}uB(t|0,B|0);w=21140}else if((F|0)==68){if((t4(t,d-e|0,75032,f,0.0)|0)==0){u=0;w=21158;break L28044}else{w=21140}}else if((F|0)==82){if((t4(t,d-e|0,199880,f,0.0)|0)==0){u=0;w=21159;break L28044}else{w=21140}}else if((F|0)==115){if((e+12|0)>>>0>d>>>0){u=0;w=21160;break L28044}al=+t2(f);be(t|0,74984,(v=i,i=i+8|0,h[v>>3]=al,v)|0);w=21140}else if((F|0)==106){if((H|0)==0){am=y?z:1;an=3}else{am=z;an=H}if((an+e|0)>>>0>d>>>0){u=0;w=21146;break L28044}B=(c[o>>2]|0)+1|0;be(t|0,((am|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=an,c[v+8>>2]=B,v)|0);w=21140}else if((F|0)==119){if((H|0)==0){ao=y?z:1;ap=2}else{ao=z;ap=H}if((ap+e|0)>>>0>d>>>0){u=0;w=21165;break L28044}B=c[l>>2]|0;be(t|0,((ao|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=ap,c[v+8>>2]=B,v)|0);w=21140}else if((F|0)==97){B=72464+(c[l>>2]<<3)|0;if(((uA(B|0)|0)+e|0)>>>0>d>>>0){u=0;w=21164;break L28044}uB(t|0,B|0);w=21140}else if((F|0)==85){B=c[o>>2]|0;G=c[l>>2]|0;do{if((B|0)>(G|0)){x=(G>>31|6)+(B-G|0)|0;A=(x|0)/7&-1;if(((x|0)%7&-1|0)<=1){aq=A;break}aq=A+1|0}else{aq=((c[m>>2]|0)-B|0)>4?52:1}}while(0);if((H|0)==0){ar=y?z:1;as=2}else{ar=z;as=H}if((as+e|0)>>>0>d>>>0){u=0;w=21153;break L28044}be(t|0,((ar|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=as,c[v+8>>2]=aq,v)|0);w=21140}else if((F|0)==83){if((H|0)==0){at=y?z:1;au=2}else{at=z;au=H}if((au+e|0)>>>0>d>>>0){u=0;w=21163;break L28044}B=c[q>>2]|0;be(t|0,((at|0)!=0?90536:82208)|0,(v=i,i=i+16|0,c[v>>2]=au,c[v+8>>2]=B,v)|0);if((S|0)<=0){w=21140;break}al=+R(10.0,+(+(S|0)));B=~~+O(+(al*g+.5));if(((e+1|0)+S|0)>>>0>d>>>0){u=0;w=21162;break L28044}G=~~al;be(t+(uA(t|0)|0)|0,184248,(v=i,i=i+16|0,c[v>>2]=S,c[v+8>>2]=(B|0)<(G|0)?B:G-1|0,v)|0);w=21140}else if((F|0)==70){if((t4(t,d-e|0,222376,f,0.0)|0)==0){u=0;w=21170;break L28044}else{w=21140}}else{w=21140}}while(0);if((w|0)==21140){w=0;if((a[t]|0)==0){av=Q;aw=e;ax=t;break}else{Y=t;Z=e}}while(1){F=Y+1|0;z=Z+1|0;if((a[F]|0)==0){av=Q;aw=z;ax=F;break}else{Y=F;Z=z}}}else{if(e>>>0>=d>>>0){u=0;w=21145;break L28044}a[t]=b;av=s;aw=e+1|0;ax=t+1|0}}while(0);s=av+1|0;e=aw;t=ax}if((w|0)==21169){i=j;return u|0}else if((w|0)==21170){i=j;return u|0}else if((w|0)==21154){i=j;return u|0}else if((w|0)==21155){i=j;return u|0}else if((w|0)==21156){i=j;return u|0}else if((w|0)==21171){i=j;return u|0}else if((w|0)==21166){i=j;return u|0}else if((w|0)==21167){i=j;return u|0}else if((w|0)==21168){i=j;return u|0}else if((w|0)==21147){i=j;return u|0}else if((w|0)==21148){i=j;return u|0}else if((w|0)==21157){i=j;return u|0}else if((w|0)==21158){i=j;return u|0}else if((w|0)==21149){i=j;return u|0}else if((w|0)==21150){i=j;return u|0}else if((w|0)==21151){i=j;return u|0}else if((w|0)==21143){i=j;return u|0}else if((w|0)==21152){i=j;return u|0}else if((w|0)==21153){i=j;return u|0}else if((w|0)==21162){i=j;return u|0}else if((w|0)==21163){i=j;return u|0}else if((w|0)==21159){i=j;return u|0}else if((w|0)==21160){i=j;return u|0}else if((w|0)==21161){i=j;return u|0}else if((w|0)==21144){i=j;return u|0}else if((w|0)==21145){i=j;return u|0}else if((w|0)==21146){i=j;return u|0}else if((w|0)==21164){i=j;return u|0}else if((w|0)==21165){i=j;return u|0}return 0}function t5(){var d=0,e=0,f=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aJ=0,aK=0,aL=0,aM=0,aN=0,aO=0,aP=0,aQ=0.0,aR=0,aS=0,aT=0.0,aU=0,aV=0,aW=0,aX=0,aZ=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0.0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0.0,bl=0,bm=0,bn=0,bo=0,bp=0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0,bz=0,bB=0.0,bC=0,bD=0,bE=0,bF=0,bG=0;d=i;i=i+176|0;e=d|0;f=d+32|0;j=d+56|0;k=d+64|0;l=d+88|0;n=d+112|0;o=d+136|0;p=d+152|0;c[13898]=(c[13898]|0)+1;c[6074]=iw()|0;q=c[13898]|0;r=c[1054]|0;s=c[r+(q*40&-1)+36>>2]|0;t=c[r+(q*40&-1)+32>>2]|0;u=(a[r+(q*40&-1)|0]&1)==0;r=(s|0)>0;x=c[10036]|0;y=21960;z=96232;L28193:while(1){L28195:do{if(!u){if(r){A=0;B=0;C=t;while(1){D=a[z+A|0]|0;if(D<<24>>24==(a[x+(A+C|0)|0]|0)){E=C;F=B}else{if(D<<24>>24!=36){break L28195}E=C-1|0;F=1}G=A+1|0;if((G|0)<(F+s|0)){A=G;B=F;C=E}else{break}}if((F|0)==0){H=G}else{I=y;break L28193}}else{H=0}C=a[z+H|0]|0;if((C<<24>>24|0)==36|(C<<24>>24|0)==0){I=y;break L28193}}}while(0);C=y+8|0;B=c[C>>2]|0;if((B|0)==0){I=C;break}else{y=C;z=B}}z=c[I+4>>2]|0;if((z|0)==0){J=q}else{I=q+1|0;c[13898]=I;J=I}I=p|0;q=p+8|0;y=o|0;H=o+2|0;G=o+1|0;F=o+6|0;E=o+5|0;s=o+3|0;x=o+7|0;t=n|0;r=n+8|0;u=l|0;B=l+8|0;C=k|0;A=k+8|0;D=f|0;K=f+8|0;L=j|0;j=e|0;L28211:while(1){L28213:do{if((z|0)==11){L28215:do{if((J|0)<(c[8272]|0)){e=c[1054]|0;if((a[e+(J*40&-1)|0]&1)==0){M=21687;break L28211}N=c[e+(J*40&-1)+36>>2]|0;O=e+(J*40&-1)+32|0;e=c[10036]|0;P=0;while(1){if((P|0)>=(N|0)){M=21252;break}Q=c[O>>2]|0;if((a[e+(Q+P|0)|0]|0)==(a[P+103664|0]|0)){P=P+1|0}else{R=Q;break}}if((M|0)==21252){M=0;if((P|0)==1){M=21254;break}R=c[O>>2]|0}if((N|0)>0){S=0;T=0;U=R}else{M=21686;break L28211}while(1){if((a[S+144616|0]|0)==(a[e+(S+U|0)|0]|0)){V=U;W=T}else{if((S|0)!=1){X=0;Y=0;Z=R;break}V=U-1|0;W=1}Q=S+1|0;if((Q|0)<(W+N|0)){S=Q;T=W;U=V}else{M=21260;break}}do{if((M|0)==21260){M=0;if((W|0)==0){if(!((S|0)==0|(S|0)==6)){X=0;Y=0;Z=R;break}}a[54144]=0;break L28215}}while(0);while(1){if((a[X+143008|0]|0)==(a[e+(X+Z|0)|0]|0)){_=Z;$=Y}else{if((X|0)!=1){aa=0;ab=0;ac=R;break}_=Z-1|0;$=1}O=X+1|0;if((O|0)<($+N|0)){X=O;Y=$;Z=_}else{M=21267;break}}do{if((M|0)==21267){M=0;if(($|0)==0){if(!((X|0)==0|(X|0)==3)){aa=0;ab=0;ac=R;break}}a[54160]=0;break L28215}}while(0);while(1){if((a[aa+141464|0]|0)==(a[e+(aa+ac|0)|0]|0)){ad=ac;ae=ab}else{if((aa|0)!=1){M=21685;break L28211}ad=ac-1|0;ae=1}O=aa+1|0;if((O|0)<(ae+N|0)){aa=O;ab=ae;ac=ad}else{break}}if((ae|0)==0){if(!((aa|0)==0|(aa|0)==3)){M=21684;break L28211}}a[54152]=0}else{M=21254}}while(0);if((M|0)==21254){M=0;a[54144]=0;a[54160]=0;a[54152]=0}c[13898]=J+1}else if((z|0)==36){a[43472]=0}else if((z|0)==37){c[8732]=0}else if((z|0)==42){c[14100]=4;h[7052]=-1.0}else if((z|0)==39){c[8786]=4;h[4395]=-1.0}else if((z|0)==40){c[6598]=4;h[3301]=-1.0}else if((z|0)==59){if((a[32936]&1)==0){break}a[32936]=0;if((a[30528]&1)!=0){break}b[12272]=120;w=121;a[24595]=w&255;w=w>>8;a[24596|0]=w&255;if((a[37400]&1)==0){break}aI(184192,51,1,c[m>>2]|0)}else if((z|0)==89){t6(11)}else if((z|0)==90){uh(J,222320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);h[8132]=1.0;h[8133]=.5;h[8218]=1.0;h[8219]=.5;h[8304]=1.0;h[8305]=.5;h[8390]=1.0;h[8391]=.5;h[8476]=1.0;h[8477]=.5;h[8562]=1.0;h[8563]=.5;h[8648]=1.0;h[8649]=.5;h[8734]=1.0;h[8735]=.5;h[8820]=1.0;h[8821]=.5;h[8906]=1.0;h[8907]=.5;h[8992]=1.0;h[8993]=.5}else if((z|0)==91|(z|0)==119){h[77]=.5;a[624]=0}else if((z|0)==92){L28273:do{if((J|0)<(c[8272]|0)){N=c[1054]|0;e=(a[N+(J*40&-1)|0]&1)==0;O=c[N+(J*40&-1)+36>>2]|0;L28275:do{if(e){af=c[10036]|0;ag=N+(J*40&-1)+32|0}else{P=N+(J*40&-1)+32|0;Q=c[10036]|0;ah=0;while(1){if((ah|0)>=(O|0)){break}if((a[Q+((c[P>>2]|0)+ah|0)|0]|0)==(a[ah+103664|0]|0)){ah=ah+1|0}else{af=Q;ag=P;break L28275}}if((ah|0)==1){break L28273}else{af=Q;ag=P}}}while(0);N=c[ag>>2]|0;ai=(O|0)>0;aj=56720;ak=77416;L28283:while(1){L28285:do{if(!e){if(ai){al=0;am=0;an=N;while(1){ao=a[ak+al|0]|0;if(ao<<24>>24==(a[af+(al+an|0)|0]|0)){ap=an;aq=am}else{if(ao<<24>>24!=36){break L28285}ap=an-1|0;aq=1}ar=al+1|0;if((ar|0)<(aq+O|0)){al=ar;am=aq;an=ap}else{break}}if((aq|0)==0){as=ar}else{at=aj;break L28283}}else{as=0}an=a[ak+as|0]|0;if((an<<24>>24|0)==36|(an<<24>>24|0)==0){at=aj;break L28283}}}while(0);P=aj+8|0;Q=c[P>>2]|0;if((Q|0)==0){at=P;break}else{aj=P;ak=Q}}ak=c[at+4>>2]|0;if((ak|0)>-1){uD(64813+(ak*688&-1)|0,82192,15);c[13898]=J+1;break L28213}else{uh(J,75e3,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);break L28213}}}while(0);uD(64813,82192,15);uD(65501,82192,15);uD(66189,82192,15);uD(66877,82192,15);uD(67565,82192,15);uD(68253,82192,15);uD(68941,82192,15);uD(69629,82192,15);uD(70317,82192,15);uD(71005,82192,15);uD(71693,82192,15)}else if((z|0)==61){c[7662]=0;if((c[12890]|0)==352){c[12890]=18}if((c[10058]|0)!=352){break}c[10058]=1}else if((z|0)==21){ak=c[10568]|0;if((ak|0)!=0){uu(ak)}c[10568]=0;a[42568]=0}else if((z|0)==102|(z|0)==105){c[16574]=1}else if((z|0)==50){c[17120]=0;h[8561]=10.0}else if((z|0)==127){t6(5)}else if((z|0)==121|(z|0)==124){c[16574]=1}else if((z|0)==54){c[16260]=0;h[8131]=10.0}else if((z|0)==145){t6(0)}else if((z|0)==139|(z|0)==142){c[16574]=1}else if((z|0)==68){c[16776]=0;h[8389]=10.0}else if((z|0)==66){t6(3)}else if((z|0)==71|(z|0)==73){c[16574]=1}else if((z|0)==110){c[16546]=0}else if((z|0)==129){c[16374]=0}else if((z|0)==93){uE(j|0,0,28);uu(c[1183]|0);c[1183]=0;uu(c[1184]|0);c[1184]=0;c[1204]=4;c[1205]=4;c[1206]=4;c[1207]=c[j>>2];c[4832>>2]=c[j+4>>2];c[4836>>2]=c[j+8>>2];c[4840>>2]=c[j+12>>2];c[4844>>2]=c[j+16>>2];c[4848>>2]=c[j+20>>2];c[4852>>2]=c[j+24>>2];c[1186]=0;c[1164]=0;c[1166]=1}else if((z|0)==94){uE(j|0,0,28);uu(c[1119]|0);c[1119]=0;uu(c[1120]|0);c[1120]=0;c[1140]=4;c[1141]=4;c[1142]=4;c[1143]=c[j>>2];c[4576>>2]=c[j+4>>2];c[4580>>2]=c[j+8>>2];c[4584>>2]=c[j+12>>2];c[4588>>2]=c[j+16>>2];c[4592>>2]=c[j+20>>2];c[4596>>2]=c[j+24>>2];c[1122]=0;}else if((z|0)==99){if(a[20368]|0){a[20368]=0;g[3538]=+g[5090];g[3536]=+g[5088];g[3534]=+g[5086];c[16336]=c[16336]^2;c[17024]=c[17024]^2}c[5094]=0;c[18072]=0;g[3536]=30.0;g[3538]=60.0;g[3534]=1.0;g[3540]=0.0;g[3532]=1.0}else if((z|0)==151){h[11]=1.0e-8}else if((z|0)==138){c[16202]=0}else if((z|0)==70){c[16718]=0}else if((z|0)==101){c[17234]=0}else if((z|0)==120){c[17062]=0}else if((z|0)==113){uu(c[16629]|0);c[16629]=0;uu(c[16630]|0);uD(66456,51296,192)}else if((z|0)==132){uu(c[16457]|0);c[16457]=0;uu(c[16458]|0);uD(65768,51296,192);c[16455]=-270}else if((z|0)==141){uu(c[16285]|0);c[16285]=0;uu(c[16286]|0);uD(65080,51296,192)}else if((z|0)==147){t6(7)}else if((z|0)==65){c[16680]=0}else if((z|0)==149){c[17368]=0}else if((z|0)==95){c[17540]=0}else if((z|0)==96){c[17712]=0}else if((z|0)==100){c[17884]=0}else if((z|0)==150){a[27776]=0;c[13898]=J+1}else if((z|0)==153){c[16664]=c[12782];c[66660>>2]=c[12783];c[66664>>2]=c[12784];c[66668>>2]=c[12785];c[66672>>2]=c[12786];c[66676>>2]=c[12787];c[66680>>2]=c[12788];c[66684>>2]=c[12789];c[66688>>2]=c[12790];c[66692>>2]=c[12791];c[66696>>2]=c[12792];c[66700>>2]=c[12793];c[66704>>2]=c[12794];c[66708>>2]=c[12795]}else if((z|0)==155){c[16492]=c[12782];c[65972>>2]=c[12783];c[65976>>2]=c[12784];c[65980>>2]=c[12785];c[65984>>2]=c[12786];c[65988>>2]=c[12787];c[65992>>2]=c[12788];c[65996>>2]=c[12789];c[66e3>>2]=c[12790];c[66004>>2]=c[12791];c[66008>>2]=c[12792];c[66012>>2]=c[12793];c[66016>>2]=c[12794];c[66020>>2]=c[12795]}else if((z|0)==157){c[16320]=c[12782];c[65284>>2]=c[12783];c[65288>>2]=c[12784];c[65292>>2]=c[12785];c[65296>>2]=c[12786];c[65300>>2]=c[12787];c[65304>>2]=c[12788];c[65308>>2]=c[12789];c[65312>>2]=c[12790];c[65316>>2]=c[12791];c[65320>>2]=c[12792];c[65324>>2]=c[12793];c[65328>>2]=c[12794];c[65332>>2]=c[12795]}else if((z|0)==154){c[17352]=c[12782];c[69412>>2]=c[12783];c[69416>>2]=c[12784];c[69420>>2]=c[12785];c[69424>>2]=c[12786];c[69428>>2]=c[12787];c[69432>>2]=c[12788];c[69436>>2]=c[12789];c[69440>>2]=c[12790];c[69444>>2]=c[12791];c[69448>>2]=c[12792];c[69452>>2]=c[12793];c[69456>>2]=c[12794];c[69460>>2]=c[12795]}else if((z|0)==156){c[17180]=c[12782];c[68724>>2]=c[12783];c[68728>>2]=c[12784];c[68732>>2]=c[12785];c[68736>>2]=c[12786];c[68740>>2]=c[12787];c[68744>>2]=c[12788];c[68748>>2]=c[12789];c[68752>>2]=c[12790];c[68756>>2]=c[12791];c[68760>>2]=c[12792];c[68764>>2]=c[12793];c[68768>>2]=c[12794];c[68772>>2]=c[12795]}else if((z|0)==152){c[16320]=c[12782];c[65284>>2]=c[12783];c[65288>>2]=c[12784];c[65292>>2]=c[12785];c[65296>>2]=c[12786];c[65300>>2]=c[12787];c[65304>>2]=c[12788];c[65308>>2]=c[12789];c[65312>>2]=c[12790];c[65316>>2]=c[12791];c[65320>>2]=c[12792];c[65324>>2]=c[12793];c[65328>>2]=c[12794];c[65332>>2]=c[12795];c[16492]=c[12782];c[65972>>2]=c[12783];c[65976>>2]=c[12784];c[65980>>2]=c[12785];c[65984>>2]=c[12786];c[65988>>2]=c[12787];c[65992>>2]=c[12788];c[65996>>2]=c[12789];c[66e3>>2]=c[12790];c[66004>>2]=c[12791];c[66008>>2]=c[12792];c[66012>>2]=c[12793];c[66016>>2]=c[12794];c[66020>>2]=c[12795];c[16664]=c[12782];c[66660>>2]=c[12783];c[66664>>2]=c[12784];c[66668>>2]=c[12785];c[66672>>2]=c[12786];c[66676>>2]=c[12787];c[66680>>2]=c[12788];c[66684>>2]=c[12789];c[66688>>2]=c[12790];c[66692>>2]=c[12791];c[66696>>2]=c[12792];c[66700>>2]=c[12793];c[66704>>2]=c[12794];c[66708>>2]=c[12795];c[16836]=c[12782];c[67348>>2]=c[12783];c[67352>>2]=c[12784];c[67356>>2]=c[12785];c[67360>>2]=c[12786];c[67364>>2]=c[12787];c[67368>>2]=c[12788];c[67372>>2]=c[12789];c[67376>>2]=c[12790];c[67380>>2]=c[12791];c[67384>>2]=c[12792];c[67388>>2]=c[12793];c[67392>>2]=c[12794];c[67396>>2]=c[12795];c[17008]=c[12782];c[68036>>2]=c[12783];c[68040>>2]=c[12784];c[68044>>2]=c[12785];c[68048>>2]=c[12786];c[68052>>2]=c[12787];c[68056>>2]=c[12788];c[68060>>2]=c[12789];c[68064>>2]=c[12790];c[68068>>2]=c[12791];c[68072>>2]=c[12792];c[68076>>2]=c[12793];c[68080>>2]=c[12794];c[68084>>2]=c[12795];c[17180]=c[12782];c[68724>>2]=c[12783];c[68728>>2]=c[12784];c[68732>>2]=c[12785];c[68736>>2]=c[12786];c[68740>>2]=c[12787];c[68744>>2]=c[12788];c[68748>>2]=c[12789];c[68752>>2]=c[12790];c[68756>>2]=c[12791];c[68760>>2]=c[12792];c[68764>>2]=c[12793];c[68768>>2]=c[12794];c[68772>>2]=c[12795];c[17352]=c[12782];c[69412>>2]=c[12783];c[69416>>2]=c[12784];c[69420>>2]=c[12785];c[69424>>2]=c[12786];c[69428>>2]=c[12787];c[69432>>2]=c[12788];c[69436>>2]=c[12789];c[69440>>2]=c[12790];c[69444>>2]=c[12791];c[69448>>2]=c[12792];c[69452>>2]=c[12793];c[69456>>2]=c[12794];c[69460>>2]=c[12795];c[17524]=c[12782];c[70100>>2]=c[12783];c[70104>>2]=c[12784];c[70108>>2]=c[12785];c[70112>>2]=c[12786];c[70116>>2]=c[12787];c[70120>>2]=c[12788];c[70124>>2]=c[12789];c[70128>>2]=c[12790];c[70132>>2]=c[12791];c[70136>>2]=c[12792];c[70140>>2]=c[12793];c[70144>>2]=c[12794];c[70148>>2]=c[12795];c[17696]=c[12782];c[70788>>2]=c[12783];c[70792>>2]=c[12784];c[70796>>2]=c[12785];c[70800>>2]=c[12786];c[70804>>2]=c[12787];c[70808>>2]=c[12788];c[70812>>2]=c[12789];c[70816>>2]=c[12790];c[70820>>2]=c[12791];c[70824>>2]=c[12792];c[70828>>2]=c[12793];c[70832>>2]=c[12794];c[70836>>2]=c[12795];c[17868]=c[12782];c[71476>>2]=c[12783];c[71480>>2]=c[12784];c[71484>>2]=c[12785];c[71488>>2]=c[12786];c[71492>>2]=c[12787];c[71496>>2]=c[12788];c[71500>>2]=c[12789];c[71504>>2]=c[12790];c[71508>>2]=c[12791];c[71512>>2]=c[12792];c[71516>>2]=c[12793];c[71520>>2]=c[12794];c[71524>>2]=c[12795];c[18040]=c[12782];c[72164>>2]=c[12783];c[72168>>2]=c[12784];c[72172>>2]=c[12785];c[72176>>2]=c[12786];c[72180>>2]=c[12787];c[72184>>2]=c[12788];c[72188>>2]=c[12789];c[72192>>2]=c[12790];c[72196>>2]=c[12791];c[72200>>2]=c[12792];c[72204>>2]=c[12793];c[72208>>2]=c[12794];c[72212>>2]=c[12795]}else if((z|0)==5){L28351:do{if((J|0)<(c[8272]|0)){ak=c[1054]|0;aj=(a[ak+(J*40&-1)|0]&1)==0;O=c[ak+(J*40&-1)+36>>2]|0;L28353:do{if(aj){au=c[10036]|0;av=ak+(J*40&-1)+32|0}else{N=ak+(J*40&-1)+32|0;ai=c[10036]|0;e=0;while(1){if((e|0)>=(O|0)){M=21222;break}if((a[ai+((c[N>>2]|0)+e|0)|0]|0)==(a[e+103664|0]|0)){e=e+1|0}else{aw=0;break}}if((M|0)==21222){M=0;if((e|0)==1){break L28351}else{aw=0}}while(1){if((aw|0)>=(O|0)){M=21226;break}if((a[ai+((c[N>>2]|0)+aw|0)|0]|0)==(a[aw+150688|0]|0)){aw=aw+1|0}else{ax=0;M=21227;break}}if((M|0)==21226){M=0;if((aw|0)!=2){ax=0;M=21227}}if((M|0)==21227){while(1){M=0;if((ax|0)>=(O|0)){break}if((a[ai+((c[N>>2]|0)+ax|0)|0]|0)==(a[ax+137768|0]|0)){ax=ax+1|0;M=21227}else{au=ai;av=N;break L28353}}if((ax|0)!=3){au=ai;av=N;break}}c[16335]=0;c[16507]=0;c[13898]=J+1;break L28213}}while(0);ak=c[av>>2]|0;e=(O|0)>0;Q=56720;P=77416;L28373:while(1){L28375:do{if(!aj){if(e){ah=0;an=0;am=ak;while(1){al=a[P+ah|0]|0;if(al<<24>>24==(a[au+(ah+am|0)|0]|0)){ay=am;aA=an}else{if(al<<24>>24!=36){break L28375}ay=am-1|0;aA=1}aB=ah+1|0;if((aB|0)<(aA+O|0)){ah=aB;an=aA;am=ay}else{break}}if((aA|0)==0){aC=aB}else{aD=Q;break L28373}}else{aC=0}am=a[P+aC|0]|0;if((am<<24>>24|0)==36|(am<<24>>24|0)==0){aD=Q;break L28373}}}while(0);N=Q+8|0;ai=c[N>>2]|0;if((ai|0)==0){aD=N;break}else{Q=N;P=ai}}P=c[aD+4>>2]|0;if((P|0)<=-1){break L28213}c[64652+(P*688&-1)>>2]=0;c[13898]=J+1;break L28213}}while(0);c[16163]=0;c[16335]=0;c[16507]=0;c[16679]=0;c[16851]=0;c[17023]=0;c[17195]=0;c[17367]=0;c[17539]=0;c[17711]=0;c[17883]=0}else if((z|0)==62){uD(54016,50688,112);a[54016]=110}else if((z|0)==77){h[3818]=1.0}else if((z|0)==78){h[3817]=1.0}else if((z|0)==79){if((a[30528]&1)==0){break}a[30528]=0;P=(a[32936]&1)==0;if(!(P|(c[17539]|0)==0)){h[8773]=-5.0;h[8774]=-5.0}if(!P){break}b[12272]=120;if((a[37400]&1)==0){break}aI(199840,33,1,c[m>>2]|0)}else if((z|0)==87){P=43240;while(1){Q=c[P>>2]|0;if((Q|0)==0){aE=0;break}if((aY(215528,c[Q+4>>2]|0)|0)==0){aE=Q;break}else{P=Q|0}}if((a[33512]&1)!=0){lm()}c[8026]=0;do{if((a[14080]&1)!=0){if(a[13032]|0){P=c[(c[3524]|0)+104>>2]|0;if((P|0)!=0){cS[P&511]()}a[13032]=0}if(a[14088]|0){cS[c[(c[3524]|0)+44>>2]&511]();a[14088]=0}if((a[14080]&1)==0){break}cS[c[(c[3524]|0)+40>>2]&511]();a[14080]=0;c[10028]=0}}while(0);if((aE|0)!=0){P=c[aE+24>>2]|0;c[3524]=lx(P,uA(P|0)|0)|0}a[25280]=0}else if((z|0)==12){c[13366]=5;c[13378]=0;c[13368]=4;c[13374]=5;c[13372]=0}else if((z|0)==60){c[13898]=J+1;aI(193712,29,1,c[m>>2]|0)}else if((z|0)==23){uE(y|0,0,11);P=c[1054]|0;Q=c[P+(J*40&-1)+36>>2]|0;O=c[P+(J*40&-1)+32>>2]|0;ak=(a[P+(J*40&-1)|0]&1)==0;e=(Q|0)>0;aj=c[10036]|0;ai=56720;N=77416;L28426:while(1){L28428:do{if(!ak){if(e){am=0;an=0;ah=O;while(1){al=a[N+am|0]|0;if(al<<24>>24==(a[aj+(am+ah|0)|0]|0)){aF=ah;aG=an}else{if(al<<24>>24!=36){break L28428}aF=ah-1|0;aG=1}aH=am+1|0;if((aH|0)<(aG+Q|0)){am=aH;an=aG;ah=aF}else{break}}if((aG|0)==0){aJ=aH}else{aK=ai;break L28426}}else{aJ=0}ah=a[N+aJ|0]|0;if((ah<<24>>24|0)==36|(ah<<24>>24|0)==0){aK=ai;break L28426}}}while(0);ah=ai+8|0;an=c[ah>>2]|0;if((an|0)==0){aK=ah;break}else{ai=ah;N=an}}N=c[aK+4>>2]|0;L28441:do{if((N|0)>-1){a[o+N|0]=1;aL=J;aM=c[8272]|0}else{ai=c[8272]|0;e=(ai|0)>(J|0);L28443:do{if(e){if(ak){aL=J;aM=ai;break L28441}else{aN=0}while(1){if((aN|0)>=(Q|0)){M=21306;break}if((a[aj+(aN+O|0)|0]|0)==(a[aN+150688|0]|0)){aN=aN+1|0}else{aO=0;M=21307;break}}if((M|0)==21306){M=0;if((aN|0)!=2){aO=0;M=21307}}if((M|0)==21307){while(1){M=0;if((aO|0)>=(Q|0)){break}if((a[aj+(aO+O|0)|0]|0)==(a[aO+148800|0]|0)){aO=aO+1|0;M=21307}else{break L28443}}if((aO|0)!=2){break}}a[G]=1;a[H]=1;an=J+1|0;c[13898]=an;aL=an;aM=ai;break L28441}}while(0);if(ak){M=21313}else{an=a[aj+O|0]|0;if(!((an<<24>>24|0)==39|(an<<24>>24|0)==34)){M=21313}}do{if((M|0)==21313){M=0;if(!e){break}if(ak){aL=J;aM=ai;break L28441}else{aP=0}while(1){if((aP|0)>=(Q|0)){break}if((a[aj+(aP+O|0)|0]|0)==(a[aP+103664|0]|0)){aP=aP+1|0}else{aL=J;aM=ai;break L28441}}if((aP|0)!=1){aL=J;aM=ai;break L28441}}}while(0);uE(y|0,1,11);aL=J;aM=ai}}while(0);if((aL|0)<(aM|0)){if((a[P+(aL*40&-1)|0]&1)==0){break}O=c[P+(aL*40&-1)+36>>2]|0;Q=P+(aL*40&-1)+32|0;ak=0;while(1){if((ak|0)>=(O|0)){break}if((a[aj+((c[Q>>2]|0)+ak|0)|0]|0)==(a[ak+103664|0]|0)){ak=ak+1|0}else{break L28213}}if((ak|0)!=1){break}}if((a[H]&1)!=0){c[16560]=6758437;a[66188]=1}if((a[G]&1)!=0){c[16388]=6758437;a[65500]=1}if((a[y]&1)!=0){c[16216]=6758437;a[64812]=1}if((a[F]&1)!=0){c[17248]=6758437;a[68940]=1}if((a[E]&1)!=0){c[17076]=6758437;a[68252]=1}if((a[s]&1)!=0){c[16732]=6758437;a[66876]=1}if((a[x]&1)==0){break}c[17420]=6758437;a[69628]=1}else if((z|0)==3){h[9040]=1.0}else if((z|0)==48){c[16604]=0;h[8303]=10.0}else if((z|0)==6){h[7077]=0.0}else if((z|0)==8){c[11692]=0}else if((z|0)==32){if((c[8272]|0)<=(J|0)){break}Q=c[1054]|0;aj=(a[Q+(J*40&-1)|0]&1)==0;L28502:do{if(!aj){O=c[Q+(J*40&-1)+36>>2]|0;P=Q+(J*40&-1)+32|0;N=c[10036]|0;e=0;while(1){if((e|0)>=(O|0)){M=21386;break}if((a[N+((c[P>>2]|0)+e|0)|0]|0)==(a[e+166752|0]|0)){e=e+1|0}else{break}}do{if((M|0)==21386){M=0;if((e|0)!=5){break}c[8798]=0;c[13898]=J+1;break L28213}}while(0);if(aj){break}e=c[Q+(J*40&-1)+36>>2]|0;P=Q+(J*40&-1)+32|0;N=c[10036]|0;O=0;while(1){if((O|0)>=(e|0)){break}if((a[N+((c[P>>2]|0)+O|0)|0]|0)==(a[O+103664|0]|0)){O=O+1|0}else{break L28502}}if((O|0)==1){break L28213}}}while(0);Q=is(l)|0;aj=c[Q>>2]|0;if((aj|0)==1){aQ=+(c[Q+8>>2]|0)}else if((aj|0)==2){aQ=+h[Q+8>>3]}else if((aj|0)==3){aQ=+uz(c[Q+8>>2]|0,0)}else{M=21397;break L28211}if((c[u>>2]|0)==3){uu(c[B>>2]|0);c[u>>2]=1}Q=~~aQ;aj=0;ak=43264;while(1){aR=c[ak>>2]|0;if((aR|0)==0){break L28213}aS=aR|0;if((c[aR+4>>2]|0)==(Q|0)){break}else{aj=aR;ak=aS}}ak=c[aS>>2]|0;if((c[10816]|0)==(aR|0)){c[10816]=ak}else{c[aj>>2]=ak}uu(aR)}else if((z|0)==20){ak=c[12886]|0;if((ak|0)!=0){uu(ak)}c[12886]=0;uu(c[8270]|0);c[8270]=0}else if((z|0)==27){iY(c[10828]|0);c[10828]=0;c[9344]=10;c[9342]=10}else if((z|0)==30){L28539:do{if((J|0)<(c[8272]|0)){ak=c[1054]|0;L28541:do{if((a[ak+(J*40&-1)|0]&1)!=0){Q=c[ak+(J*40&-1)+36>>2]|0;P=ak+(J*40&-1)+32|0;N=c[10036]|0;e=0;while(1){if((e|0)>=(Q|0)){break}if((a[N+((c[P>>2]|0)+e|0)|0]|0)==(a[e+103664|0]|0)){e=e+1|0}else{break L28541}}if((e|0)==1){break L28539}}}while(0);ak=is(n)|0;O=c[ak>>2]|0;if((O|0)==1){aT=+(c[ak+8>>2]|0)}else if((O|0)==2){aT=+h[ak+8>>3]}else if((O|0)==3){aT=+uz(c[ak+8>>2]|0,0)}else{M=21361;break L28211}if((c[t>>2]|0)==3){uu(c[r>>2]|0);c[t>>2]=1}ak=~~aT;aU=c[13898]|0;if((aU|0)<(c[8272]|0)){O=c[1054]|0;if((a[O+(aU*40&-1)|0]&1)==0){M=21683;break L28211}P=c[O+(aU*40&-1)+36>>2]|0;N=O+(aU*40&-1)+32|0;O=c[10036]|0;Q=0;while(1){if((Q|0)>=(P|0)){break}if((a[O+((c[N>>2]|0)+Q|0)|0]|0)==(a[Q+103664|0]|0)){Q=Q+1|0}else{M=21681;break L28211}}if((Q|0)==1){aV=43288;aW=0}else{M=21682;break L28211}}else{aV=43288;aW=0}while(1){aX=c[aV>>2]|0;if((aX|0)==0){break L28213}aZ=aX|0;if((c[aX+4>>2]|0)==(ak|0)){break}else{aV=aZ;aW=aX}}ak=c[aZ>>2]|0;if((aW|0)==0){c[10822]=ak}else{c[aW>>2]=ak}ak=c[aX+60>>2]|0;if((ak|0)!=0){uu(ak)}ak=c[aX+64>>2]|0;if((ak|0)!=0){uu(ak)}uu(aX);break L28213}}while(0);aj=c[10822]|0;if((aj|0)==0){break}else{a$=aj}do{c[10822]=c[a$>>2];aj=c[a$+60>>2]|0;if((aj|0)!=0){uu(aj)}aj=c[a$+64>>2]|0;if((aj|0)!=0){uu(aj)}uu(a$);a$=c[10822]|0;}while((a$|0)!=0)}else if((z|0)==33){uq(32,0)}else if((z|0)==34){uu(c[12908]|0);bA(5,179864);bA(2,179864);aj=bA(5,0)|0;if((aj|0)==0){a0=0}else{a0=bP(aj|0)|0}c[12908]=a0}else if((z|0)==35){L28592:do{if((J|0)<(c[8272]|0)){aj=c[1054]|0;ak=c[aj+(J*40&-1)+36>>2]|0;L28594:do{if((a[aj+(J*40&-1)|0]&1)!=0){Q=aj+(J*40&-1)+32|0;N=c[10036]|0;O=0;while(1){if((O|0)>=(ak|0)){break}if((a[N+((c[Q>>2]|0)+O|0)|0]|0)==(a[O+103664|0]|0)){O=O+1|0}else{break L28594}}if((O|0)==1){a1=0;M=21418;break L28592}}}while(0);if((ak|0)>0){Q=0;N=J;e=aj;while(1){a2=e+(N*40&-1)+32|0;a3=(c[a2>>2]|0)+Q|0;P=(c[10036]|0)+a3|0;ai=a[P]|0;do{if(ai<<24>>24==114){an=(a[69604]&1)==0;a[69604]=0;h[8701]=0.0;if(an){a4=N;a5=e;a6=7;break}ju();a4=c[13898]|0;a5=c[1054]|0;a6=7}else{do{if((a_(P|0,108208,2)|0)==0){a7=6}else{if((a_(P|0,108120,2)|0)==0){a7=5;break}if((a_(P|0,124768,2)|0)==0){a7=4;break}if((a_(P|0,88416,2)|0)==0){a7=3;break}if(ai<<24>>24==120){a7=2;break}if(ai<<24>>24==121){a7=1;break}if(ai<<24>>24==122){a7=0}else{M=21423;break L28211}}}while(0);an=c[56724+(a7<<3)>>2]|0;a[64788+(an*688&-1)|0]=0;h[64792+(an*688&-1)>>3]=0.0;a4=N;a5=e;a6=a7}}while(0);ai=(uA(c[56720+(a6<<3)>>2]|0)|0)+Q|0;if((ai|0)<(c[a5+(a4*40&-1)+36>>2]|0)){Q=ai;N=a4;e=a5}else{a8=a4;break}}}else{a8=J}c[13898]=a8+1}else{a1=0;M=21418}}while(0);if((M|0)==21418){while(1){M=0;if((a1|0)!=7){a[64788+(a1*688&-1)|0]=0;h[64792+(a1*688&-1)>>3]=0.0;e=a1+1|0;if((e|0)<11){a1=e;M=21418;continue}else{break}}e=(a[69604]&1)==0;a[69604]=0;h[8701]=0.0;if(e){a1=8;M=21418;continue}ju();a1=8;M=21418}}c[6928]=0}else if((z|0)==17){c[11732]=10;c[11756]=10;c[11734]=1;c[11752]=1;h[5865]=1.0;h[5864]=1.0;a[47032]=0}else if((z|0)==18){b[12272]=120;w=121;a[24595]=w&255;w=w>>8;a[24596|0]=w&255}else if((z|0)==19){c[11252]=0}else if((z|0)==84){a[46752]=0}else if((z|0)==86){e=c[3526]|0;if((e|0)!=0){az(e|0)}c[3526]=0;a[14112]=0}else if((z|0)==24){a[65036]=0;a[65037]=0;a[65724]=0;a[65725]=0;a[66412]=0;a[66413]=0;a[67100]=0;a[67101]=0;a[67788]=0;a[67789]=0;a[68476]=0;a[68477]=0;a[69164]=0;a[69165]=0;a[69852]=0;a[69853]=0;a[70540]=0;a[70541]=0;a[71228]=0;a[71229]=0;a[71916]=0;a[71917]=0}else if((z|0)==25){a[38984]=0}else if((z|0)==26){M=21341;break L28211}else if((z|0)==13){c[11690]=0}else if((z|0)==28){a[36120]=0}else if((z|0)==29){a[36288]=0}else if((z|0)==44){c[8496]=0;hM()}else if((z|0)==45){lm()}else if((z|0)==41){c[1066]=4;h[535]=-1.0}else if((z|0)==15){e=c[1054]|0;N=c[e+(J*40&-1)+36>>2]|0;Q=c[e+(J*40&-1)+32>>2]|0;L28643:do{if((a[e+(J*40&-1)|0]&1)==0){M=21452}else{if((N|0)<=0){a[47712]=0;break}aj=c[10036]|0;ak=0;ai=0;P=Q;while(1){if((a[ak+115448|0]|0)==(a[aj+(ak+P|0)|0]|0)){a9=P;ba=ai}else{if((ak|0)!=4){M=21452;break L28643}a9=P-1|0;ba=1}bb=ak+1|0;if((bb|0)<(ba+N|0)){ak=bb;ai=ba;P=a9}else{break}}if((ba|0)!=0|(bb|0)==4){a[47712]=0}else{a[47712]=0;if((bb|0)!=8){break}}c[13898]=J+1;break L28213}}while(0);if((M|0)==21452){M=0;a[47712]=0}uu(c[8528]|0);c[8528]=0;a[47120]=0;uu(c[11948]|0);c[11948]=bP(199184)|0;N=c[12168]|0;Q=c[11862]|0;if((Q|0)>0){e=0;P=Q;while(1){Q=N+(e*232&-1)+224|0;ai=c[Q>>2]|0;if((ai|0)==0){bc=P}else{uu(ai);c[Q>>2]=0;bc=c[11862]|0}Q=e+1|0;if((Q|0)<(bc|0)){e=Q;P=bc}else{break}}}c[11862]=0;c[12202]=c[12200];c[12206]=0}else if((z|0)==9){h[7030]=-1.0;a[56232]=1}else if((z|0)==10){a[35888]=0}else if((z|0)==4){L28672:do{if((J|0)<(c[8272]|0)){P=c[1054]|0;L28674:do{if((a[P+(J*40&-1)|0]&1)!=0){e=c[P+(J*40&-1)+36>>2]|0;N=P+(J*40&-1)+32|0;Q=c[10036]|0;ai=0;while(1){if((ai|0)>=(e|0)){break}if((a[Q+((c[N>>2]|0)+ai|0)|0]|0)==(a[ai+103664|0]|0)){ai=ai+1|0}else{break L28674}}if((ai|0)==1){break L28672}}}while(0);P=is(p)|0;N=c[P>>2]|0;if((N|0)==2){bd=+h[P+8>>3]}else if((N|0)==3){bd=+uz(c[P+8>>2]|0,0)}else if((N|0)==1){bd=+(c[P+8>>2]|0)}else{M=21199;break L28211}if((c[I>>2]|0)==3){uu(c[q>>2]|0);c[I>>2]=1}P=~~bd;be=c[13898]|0;if((be|0)<(c[8272]|0)){N=c[1054]|0;if((a[N+(be*40&-1)|0]&1)==0){M=21690;break L28211}Q=c[N+(be*40&-1)+36>>2]|0;e=N+(be*40&-1)+32|0;N=c[10036]|0;ak=0;while(1){if((ak|0)>=(Q|0)){break}if((a[N+((c[e>>2]|0)+ak|0)|0]|0)==(a[ak+103664|0]|0)){ak=ak+1|0}else{M=21691;break L28211}}if((ak|0)==1){bf=43304;bg=0}else{M=21692;break L28211}}else{bf=43304;bg=0}while(1){bh=c[bf>>2]|0;if((bh|0)==0){M=21215;break L28211}bi=bh|0;if((c[bh+4>>2]|0)==(P|0)){break}else{bf=bi;bg=bh}}P=c[bi>>2]|0;if((bg|0)==0){c[10826]=P}else{c[bg>>2]=P}uu(bh);break L28213}}while(0);P=c[10826]|0;if((P|0)==0){break}else{bj=P}do{c[10826]=c[bj>>2];uu(bj);bj=c[10826]|0;}while((bj|0)!=0)}else if((z|0)==64){uu(c[16801]|0);c[16801]=0;uu(c[16802]|0);uD(67144,51296,192);c[16799]=-270}else if((z|0)==104){uu(c[17317]|0);c[17317]=0;uu(c[17318]|0);uD(69208,51296,192)}else if((z|0)==123){uu(c[17145]|0);c[17145]=0;uu(c[17146]|0);uD(68520,51296,192);c[17143]=-270}else if((z|0)==116){c[16508]=0}else if((z|0)==107){c[17196]=0}else if((z|0)==135){c[16336]=0}else if((z|0)==126){c[17024]=0}else if((z|0)==144){c[16164]=0}else if((z|0)==80){ea(0,0)}else if((z|0)==81){uu(c[57238]|0);c[57238]=0}else if((z|0)==75){L28718:do{if((J|0)<(c[8272]|0)){P=c[1054]|0;L28720:do{if((a[P+(J*40&-1)|0]&1)!=0){ak=c[P+(J*40&-1)+36>>2]|0;e=P+(J*40&-1)+32|0;N=c[10036]|0;Q=0;while(1){if((Q|0)>=(ak|0)){break}if((a[N+((c[e>>2]|0)+Q|0)|0]|0)==(a[Q+103664|0]|0)){Q=Q+1|0}else{break L28720}}if((Q|0)==1){break L28718}}}while(0);P=is(k)|0;e=c[P>>2]|0;if((e|0)==1){bk=+(c[P+8>>2]|0)}else if((e|0)==2){bk=+h[P+8>>3]}else if((e|0)==3){bk=+uz(c[P+8>>2]|0,0)}else{M=21503;break L28211}if((c[C>>2]|0)==3){uu(c[A>>2]|0);c[C>>2]=1}P=~~bk;bl=c[13898]|0;if((bl|0)<(c[8272]|0)){e=c[1054]|0;if((a[e+(bl*40&-1)|0]&1)==0){M=21694;break L28211}N=c[e+(bl*40&-1)+36>>2]|0;ak=e+(bl*40&-1)+32|0;e=c[10036]|0;ai=0;while(1){if((ai|0)>=(N|0)){break}if((a[e+((c[ak>>2]|0)+ai|0)|0]|0)==(a[ai+103664|0]|0)){ai=ai+1|0}else{M=21693;break L28211}}if((ai|0)==1){bm=43272;bn=0}else{M=21695;break L28211}}else{bm=43272;bn=0}while(1){bo=c[bm>>2]|0;if((bo|0)==0){break L28213}bp=bo|0;if((c[bo+4>>2]|0)==(P|0)){break}else{bm=bp;bn=bo}}P=c[bp>>2]|0;if((bn|0)==0){c[10818]=P}else{c[bn>>2]=P}if((c[bo+12>>2]|0)==4){uu(c[(bo+104|0)+4>>2]|0)}uu(bo);break L28213}}while(0);P=c[10818]|0;if((P|0)==0){break}else{bq=P}do{c[10818]=c[bq>>2];if((c[bq+12>>2]|0)==4){uu(c[(bq+104|0)+4>>2]|0)}uu(bq);bq=c[10818]|0;}while((bq|0)!=0)}else if((z|0)==117){t6(2)}else if((z|0)==111|(z|0)==114){c[16574]=1}else if((z|0)==52){c[16432]=0;h[8217]=10.0}else if((z|0)==136){t6(1)}else if((z|0)==130|(z|0)==133){c[16574]=1}else if((z|0)==46){c[17292]=0;h[8647]=10.0}else if((z|0)==108){t6(6)}else if((z|0)==56){h[3296]=0.0;h[4384]=0.0;h[7048]=0.0;h[531]=0.0}else if((z|0)==57){g[184]=0.0;g[44]=0.0}else if((z|0)==58){if((a[33512]&1)!=0){M=21466;break L28211}lj(0);P=c[8244]|0;if((P|0)==0){break}uu(P);c[8244]=0}else if((z|0)==82){iO(c[10814]|0);c[10814]=0;iY(c[10828]|0);c[10828]=0;c[6352]=100;c[6350]=100}else if((z|0)==83){g[178]=1.0;g[38]=1.0;g[2]=1.0}else if((z|0)==85){P=c[8272]|0;L28774:do{if((J|0)<(P|0)){ai=c[1054]|0;ak=(a[ai+(J*40&-1)|0]&1)==0;e=c[ai+(J*40&-1)+36>>2]|0;L28776:do{if(ak){br=c[10036]|0;bs=ai+(J*40&-1)+32|0}else{N=ai+(J*40&-1)+32|0;aj=c[10036]|0;O=0;while(1){if((O|0)>=(e|0)){break}if((a[aj+((c[N>>2]|0)+O|0)|0]|0)==(a[O+103664|0]|0)){O=O+1|0}else{br=aj;bs=N;break L28776}}if((O|0)==1){break L28774}else{br=aj;bs=N}}}while(0);Q=c[bs>>2]|0;an=(e|0)>0;ah=21680;am=116616;L28784:while(1){L28786:do{if(!ak){if(an){al=0;ao=0;bt=Q;while(1){bu=a[am+al|0]|0;if(bu<<24>>24==(a[br+(al+bt|0)|0]|0)){bv=bt;bw=ao}else{if(bu<<24>>24!=36){break L28786}bv=bt-1|0;bw=1}bx=al+1|0;if((bx|0)<(bw+e|0)){al=bx;ao=bw;bt=bv}else{break}}if((bw|0)==0){by=bx}else{bz=ah;break L28784}}else{by=0}bt=a[am+by|0]|0;if((bt<<24>>24|0)==36|(bt<<24>>24|0)==0){bz=ah;break L28784}}}while(0);N=ah+8|0;aj=c[N>>2]|0;if((aj|0)==0){bz=N;break}else{ah=N;am=aj}}am=c[bz+4>>2]|0;if((am|0)==4){c[12372]=0;c[12373]=100;c[12374]=0;c[12376]=0;c[13898]=J+1;break L28213}else if((am|0)==10){c[9670]=3;c[9671]=2;c[13898]=J+1;break L28213}else if((am|0)==5){t8(c[10824]|0);c[10824]=0;c[13898]=(c[13898]|0)+1;break L28213}else if((am|0)==8){uD(49160,1144,272);c[13898]=J+1;break L28213}else if((am|0)==1){c[12890]=18;c[13898]=J+1;break L28213}else if((am|0)==2){c[10058]=1;c[13898]=J+1;break L28213}else if((am|0)==3){ah=J+1|0;c[13898]=ah;L28807:do{if((ah|0)<(P|0)){L28809:do{if((a[ai+(ah*40&-1)|0]&1)!=0){e=c[ai+(ah*40&-1)+36>>2]|0;Q=ai+(ah*40&-1)+32|0;an=0;while(1){if((an|0)>=(e|0)){break}if((a[br+((c[Q>>2]|0)+an|0)|0]|0)==(a[an+103664|0]|0)){an=an+1|0}else{break L28809}}if((an|0)==1){break L28807}}}while(0);Q=is(f)|0;e=c[Q>>2]|0;if((e|0)==2){bB=+h[Q+8>>3]}else if((e|0)==3){bB=+uz(c[Q+8>>2]|0,0)}else if((e|0)==1){bB=+(c[Q+8>>2]|0)}else{M=21560;break L28211}if((c[D>>2]|0)==3){uu(c[K>>2]|0);c[D>>2]=1}Q=~~bB;e=0;ak=43280;while(1){bC=c[ak>>2]|0;if((bC|0)==0){break L28213}bD=bC|0;if((c[bC+4>>2]|0)==(Q|0)){break}else{e=bC;ak=bD}}ak=c[bD>>2]|0;if((c[10820]|0)==(bC|0)){c[10820]=ak}else{c[e>>2]=ak}uu(bC);break L28213}}while(0);ah=c[10820]|0;if((ah|0)==0){break L28213}else{bE=ah}while(1){c[10820]=c[bE>>2];uu(bE);bE=c[10820]|0;if((bE|0)==0){break L28213}}}else if((am|0)==6){uD(50800,1688,272);c[13898]=J+1;break L28213}else if((am|0)==7){uD(49520,1416,272);c[13898]=J+1;break L28213}else if((am|0)==11){uE(L|0,0,3);ah=56248;c[ah>>2]=0;c[ah+4>>2]=0;h[7032]=1.5;a[56264]=1;a[56265]=a[L]|0;a[56266|0]=a[L+1|0]|0;a[56267|0]=a[L+2|0]|0;c[14067]=6;c[14068]=252;c[14069]=0;h[7035]=1.0;c[14072]=1;c[14073]=0;c[13898]=J+1;break L28213}else{M=21577;break L28211}}}while(0);c[12890]=18;c[10058]=1;P=c[10820]|0;if((P|0)==0){bF=J}else{ah=P;do{c[10820]=c[ah>>2];uu(ah);ah=c[10820]|0;}while((ah|0)!=0);bF=c[13898]|0}c[12372]=0;c[12373]=100;c[12374]=0;c[12376]=0;uD(49160,1144,272);uD(50800,1688,272);uD(49520,1416,272);c[9670]=3;c[9671]=2;uE(L|0,0,3);ah=56248;c[ah>>2]=0;c[ah+4>>2]=0;h[7032]=1.5;a[56264]=1;a[56265]=a[L]|0;a[56266|0]=a[L+1|0]|0;a[56267|0]=a[L+2|0]|0;c[14067]=6;c[14068]=252;c[14069]=0;h[7035]=1.0;c[14072]=1;c[14073]=0;c[13898]=bF+1}else{M=21675;break L28211}}while(0);if(!(ix(c[6074]|0)|0)){M=21678;break}c[13898]=J}if((M|0)==21692){uf(be,135968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21693){uf(bl,170992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21694){uf(bl,170992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21695){uf(bl,170992,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21215){uf(be,134376,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21675){uf(J,148616,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21678){e7(0);bl=c[6074]|0;if((bl|0)==0){c[6074]=0;i=d;return}else{bG=bl}while(1){bl=c[bG>>2]|0;uu(c[bG+12>>2]|0);uu(bG);if((bl|0)==0){break}else{bG=bl}}c[6074]=0;i=d;return}else if((M|0)==21503){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21560){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21577){uf(J,209800,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21423){c[a2>>2]=a3;uf(c[13898]|0,174808,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21341){uf(J,153432,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21361){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21466){uf(J,179040,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21199){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21397){uf(-1,213288,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21681){uf(aU,161624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21682){uf(aU,161624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21683){uf(aU,161624,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21684){uf(J,139712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21685){uf(J,139712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21686){uf(J,139712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21687){uf(J,139712,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21690){uf(be,135968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((M|0)==21691){uf(be,135968,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function t6(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d|0;uE(e|0,0,28);f=b>>>0<11;g=f?b:0;j=f?b+1|0:11;if(g>>>0>>0){k=g}else{i=d;return}do{c[64916+(k*688&-1)>>2]=0;g=64924+(k*688&-1)|0;b=c[g>>2]|0;if((b|0)!=0){uu(b);c[g>>2]=0}uE(64928+(k*688&-1)|0,0,16);c[64984+(k*688&-1)>>2]=4;c[64988+(k*688&-1)>>2]=4;c[64992+(k*688&-1)>>2]=4;g=(64648+(k*688&-1)|0)+348|0;c[g>>2]=c[e>>2];c[g+4>>2]=c[e+4>>2];c[g+8>>2]=c[e+8>>2];c[g+12>>2]=c[e+12>>2];c[g+16>>2]=c[e+16>>2];c[g+20>>2]=c[e+20>>2];c[g+24>>2]=c[e+24>>2];a[65024+(k*688&-1)|0]=0;c[65032+(k*688&-1)>>2]=0;h[65056+(k*688&-1)>>3]=1.0;h[65064+(k*688&-1)>>3]=.5;a[65072+(k*688&-1)|0]=1;a[65272+(k*688&-1)|0]=0;g=64944+(k*688&-1)|0;b=c[g>>2]|0;if((b|0)!=0){f=b;while(1){b=c[f+16>>2]|0;l=c[f+8>>2]|0;if((l|0)!=0){uu(l)}uu(f);if((b|0)==0){break}else{f=b}}}c[g>>2]=0;k=k+1|0;}while(k>>>0>>0);i=d;return}function t7(){var d=0,e=0,f=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0.0,K=0;d=i;i=i+40|0;e=d|0;f=d+8|0;j=a[37400]&1;c[13898]=(c[13898]|0)+1;e7(4);k=c[13898]|0;l=c[1054]|0;n=c[l+(k*40&-1)+36>>2]|0;o=c[l+(k*40&-1)+32>>2]|0;p=(a[l+(k*40&-1)|0]&1)==0;L28894:do{if((n|0)>0&(p^1)){l=c[10036]|0;q=0;r=0;s=o;while(1){if((a[q+131368|0]|0)==(a[l+(q+s|0)|0]|0)){t=s;u=r}else{if((q|0)!=3){break L28894}t=s-1|0;u=1}x=q+1|0;if((x|0)<(u+n|0)){q=x;r=u;s=t}else{break}}if((u|0)==0){if(!((q|0)==10|(q|0)==2)){break}}c[13898]=k+1;i=d;return}}while(0);L28908:do{if(!((c[8272]|0)<=(k|0)|p)){u=c[10036]|0;t=0;while(1){if((t|0)>=(n|0)){break}if((a[u+(o+t|0)|0]|0)==(a[t+116488|0]|0)){t=t+1|0}else{break L28908}}if((t|0)!=4){break}u=c[14128]|0;if((u|0)==0){y=k}else{q=u;while(1){u=q+12|0;s=c[u>>2]|0;if((s|0)!=0){uu(s);c[u>>2]=0}u=c[q+24>>2]|0;uu(q);if((u|0)==0){break}else{q=u}}y=c[13898]|0}c[14128]=0;c[13898]=y+1;i=d;return}}while(0);a[37400]=0;iO(c[10814]|0);c[10814]=0;iY(c[10828]|0);c[10828]=0;c[6352]=100;c[6350]=100;iY(0);c[10828]=0;c[9344]=10;c[9342]=10;y=c[10826]|0;if((y|0)!=0){k=y;do{c[10826]=c[k>>2];uu(k);k=c[10826]|0;}while((k|0)!=0)}t8(c[10824]|0);c[10824]=0;k=c[10822]|0;if((k|0)!=0){y=k;do{c[10822]=c[y>>2];k=c[y+60>>2]|0;if((k|0)!=0){uu(k)}k=c[y+64>>2]|0;if((k|0)!=0){uu(k)}uu(y);y=c[10822]|0;}while((y|0)!=0)}y=c[10820]|0;if((y|0)!=0){k=y;do{c[10820]=c[k>>2];uu(k);k=c[10820]|0;}while((k|0)!=0)}k=c[10818]|0;if((k|0)!=0){y=k;do{c[10818]=c[y>>2];if((c[y+12>>2]|0)==4){uu(c[(y+104|0)+4>>2]|0)}uu(y);y=c[10818]|0;}while((y|0)!=0)}uD(49160,1144,272);uD(50800,1688,272);uD(49520,1416,272);do{if((a[30528]&1)!=0){a[30528]=0;y=(a[32936]&1)==0;if(!(y|(c[17539]|0)==0)){h[8773]=-5.0;h[8774]=-5.0}if(!y){break}b[12272]=120;if((a[37400]&1)==0){break}y=c[m>>2]|0;aI(199840,33,1,y|0)}}while(0);do{if((a[32936]&1)!=0){a[32936]=0;if((a[30528]&1)!=0){break}b[12272]=120;w=121;a[24595]=w&255;w=w>>8;a[24596|0]=w&255;if((a[37400]&1)==0){break}y=c[m>>2]|0;aI(184192,51,1,y|0)}}while(0);b[12272]=120;w=121;a[24595]=w&255;w=w>>8;a[24596|0]=w&255;y=f|0;uE(y|0,0,28);uu(c[1119]|0);c[1119]=0;uu(c[1120]|0);c[1120]=0;c[1140]=4;c[1141]=4;c[1142]=4;c[1143]=c[y>>2];c[4576>>2]=c[y+4>>2];c[4580>>2]=c[y+8>>2];c[4584>>2]=c[y+12>>2];c[4588>>2]=c[y+16>>2];c[4592>>2]=c[y+20>>2];c[4596>>2]=c[y+24>>2];c[1122]=0;uD(36120,26456,1240);a[36288]=0;f=c[13898]|0;L28963:do{if((f|0)<(c[8272]|0)){k=c[1054]|0;o=(a[k+(f*40&-1)|0]&1)==0;n=c[k+(f*40&-1)+36>>2]|0;L28965:do{if(o){z=c[10036]|0;A=k+(f*40&-1)+32|0}else{p=k+(f*40&-1)+32|0;q=c[10036]|0;t=0;while(1){if((t|0)>=(n|0)){break}if((a[q+((c[p>>2]|0)+t|0)|0]|0)==(a[t+103664|0]|0)){t=t+1|0}else{z=q;A=p;break L28965}}if((t|0)==1){B=21758;break L28963}else{z=q;A=p}}}while(0);k=c[A>>2]|0;u=(n|0)>0;s=56720;r=77416;L28973:while(1){L28975:do{if(!o){if(u){l=0;x=0;C=k;while(1){D=a[r+l|0]|0;if(D<<24>>24==(a[z+(l+C|0)|0]|0)){E=C;F=x}else{if(D<<24>>24!=36){break L28975}E=C-1|0;F=1}G=l+1|0;if((G|0)<(F+n|0)){l=G;x=F;C=E}else{break}}if((F|0)==0){H=G}else{I=s;break L28973}}else{H=0}C=a[r+H|0]|0;if((C<<24>>24|0)==36|(C<<24>>24|0)==0){I=s;break L28973}}}while(0);p=s+8|0;q=c[p>>2]|0;if((q|0)==0){I=p;break}else{s=p;r=q}}r=c[I+4>>2]|0;if((r|0)>-1){uD(64813+(r*688&-1)|0,82192,15);c[13898]=f+1;break}else{uh(f,75e3,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);break}}else{B=21758}}while(0);if((B|0)==21758){uD(64813,82192,15);uD(65501,82192,15);uD(66189,82192,15);uD(66877,82192,15);uD(67565,82192,15);uD(68253,82192,15);uD(68941,82192,15);uD(69629,82192,15);uD(70317,82192,15);uD(71005,82192,15);uD(71693,82192,15)}if(a[20368]|0){a[20368]=0;g[3538]=+g[5090];g[3536]=+g[5088];g[3534]=+g[5086];c[16336]=c[16336]^2;c[17024]=c[17024]^2}c[5094]=0;c[18072]=0;g[3536]=30.0;g[3538]=60.0;g[3534]=1.0;g[3540]=0.0;g[3532]=1.0;B=0;L28997:do{c[64864+(B*688&-1)>>2]=6758437;a[64812+(B*688&-1)|0]=1;c[64808+(B*688&-1)>>2]=0;f=65280+(B*688&-1)|0;c[f>>2]=c[12782];c[f+4>>2]=c[12783];c[f+8>>2]=c[12784];c[f+12>>2]=c[12785];c[f+16>>2]=c[12786];c[f+20>>2]=c[12787];c[f+24>>2]=c[12788];c[f+28>>2]=c[12789];c[f+32>>2]=c[12790];c[f+36>>2]=c[12791];c[f+40>>2]=c[12792];c[f+44>>2]=c[12793];c[f+48>>2]=c[12794];c[f+52>>2]=c[12795];c[64656+(B*688&-1)>>2]=0;f=65140+(B*688&-1)|0;uu(c[f>>2]|0);c[f>>2]=0;f=65144+(B*688&-1)|0;uu(c[f>>2]|0);c[f>>2]=0;c[65224+(B*688&-1)>>2]=4;c[65228+(B*688&-1)>>2]=4;c[65232+(B*688&-1)>>2]=4;c[65152+(B*688&-1)>>2]=0;uD(65080+(B*688&-1)|0,51296,192);if((B|0)==5|(B|0)==3|(B|0)==1){c[65132+(B*688&-1)>>2]=-270}c[64652+(B*688&-1)>>2]=3;J=+h[56816+(B*24&-1)>>3];h[64680+(B*688&-1)>>3]=J;h[64696+(B*688&-1)>>3]=J;J=+h[56824+(B*24&-1)>>3];h[64688+(B*688&-1)>>3]=J;h[64704+(B*688&-1)>>3]=J;c[64728+(B*688&-1)>>2]=0;c[64732+(B*688&-1)>>2]=0;t6(B);c[64916+(B*688&-1)>>2]=c[56836+(B*24&-1)>>2];h[65048+(B*688&-1)>>3]=10.0;uD(64920+(B*688&-1)|0,51184,112);c[65040+(B*688&-1)>>2]=1;do{if((B|0)==7){f=(a[69604]&1)==0;a[69604]=0;h[8701]=0.0;if(f){B=B+1|0;continue L28997}else{ju();break}}else{a[64788+(B*688&-1)|0]=0;h[64792+(B*688&-1)>>3]=0.0}}while(0);B=B+1|0;}while(B>>>0<11);a[27776]=1;B=e|0;uE(B|0,0,3);e=56248;c[e>>2]=0;c[e+4>>2]=0;h[7032]=1.5;a[56264]=1;a[56265]=a[B]|0;a[56266|0]=a[B+1|0]|0;a[56267|0]=a[B+2|0]|0;c[14067]=6;c[14068]=252;c[14069]=0;h[7035]=1.0;c[14072]=1;c[14073]=0;h[7030]=-1.0;a[56232]=1;a[54144]=0;a[54160]=1;a[54152]=0;c[14074]=c[12768];c[14075]=c[12769];c[14076]=c[12770];c[14077]=c[12771];c[14078]=c[12772];c[14079]=c[12773];c[14080]=c[12774];c[14081]=c[12775];c[14082]=c[12776];c[14083]=c[12777];c[14084]=c[12778];c[14085]=c[12779];c[14086]=c[12780];c[14087]=c[12781];c[11692]=31;a[46752]=1;c[12890]=18;c[10058]=1;c[10859]=0;c[10851]=0;h[7077]=1.0;c[14156]=1;a[65036]=0;a[65037]=0;a[65724]=0;a[65725]=0;a[66412]=0;a[66413]=0;a[67100]=0;a[67101]=0;a[67788]=0;a[67789]=0;a[68476]=0;a[68477]=0;a[69164]=0;a[69165]=0;a[69852]=0;a[69853]=0;a[70540]=0;a[70541]=0;a[71228]=0;a[71229]=0;a[71916]=0;a[71917]=0;c[10012]=c[12358];c[10013]=c[12359];c[10014]=c[12360];c[10015]=c[12361];c[10016]=c[12362];c[10017]=c[12363];c[10018]=c[12364];c[10019]=c[12365];c[10020]=c[12366];c[10021]=c[12367];c[10022]=c[12368];c[10023]=c[12369];c[10024]=c[12370];c[10025]=c[12371];c[8694]=c[12358];c[8695]=c[12359];c[8696]=c[12360];c[8697]=c[12361];c[8698]=c[12362];c[8699]=c[12363];c[8700]=c[12364];c[8701]=c[12365];c[8702]=c[12366];c[8703]=c[12367];c[8704]=c[12368];c[8705]=c[12369];c[8706]=c[12370];c[8707]=c[12371];h[3815]=0.0;c[10026]=-1;c[6928]=0;c[9742]=1;c[9734]=3;c[9738]=1;a[38944]=0;a[38960]=0;c[9744]=0;a[38984]=0;a[35888]=1;a[53520]=a[96552]|0;a[53521|0]=a[96553|0]|0;a[53522|0]=a[96554|0]|0;a[53523|0]=a[96555|0]|0;a[53524|0]=a[96556|0]|0;a[53525|0]=a[96557|0]|0;h[9040]=1.0;c[8732]=0;g[178]=1.0;g[38]=1.0;g[2]=1.0;g[18074]=0.0;g[184]=0.0;g[44]=0.0;uE(y|0,0,28);uu(c[1183]|0);c[1183]=0;uu(c[1184]|0);c[1184]=0;c[1204]=4;c[1205]=4;c[1206]=4;c[1207]=c[y>>2];c[4832>>2]=c[y+4>>2];c[4836>>2]=c[y+8>>2];c[4840>>2]=c[y+12>>2];c[4844>>2]=c[y+16>>2];c[4848>>2]=c[y+20>>2];c[4852>>2]=c[y+24>>2];c[1186]=0;c[1164]=0;c[1166]=1;h[3296]=0.0;h[4384]=0.0;h[7048]=0.0;h[531]=0.0;c[11690]=0;c[13366]=5;c[13378]=0;c[13368]=4;c[13374]=5;c[13372]=0;h[11]=1.0e-8;c[11732]=10;c[11756]=10;c[11734]=1;c[11752]=1;h[5865]=1.0;h[5864]=1.0;a[47032]=0;h[77]=.5;a[624]=0;c[14100]=4;h[7052]=-1.0;c[8786]=4;h[4395]=-1.0;c[6598]=4;h[3301]=-1.0;c[1066]=4;h[535]=-1.0;h[3817]=1.0;h[3818]=1.0;b[15316]=115;a[30639]=98;a[30640]=0;a[30641]=97;a[30642]=52;c[7661]=0;c[7662]=0;c[7663]=4;c[7664]=1;c[7665]=1;uD(54016,50688,112);if((c[11254]|0)!=0){c[5163]=114;c[5164]=7;c[5165]=5;c[5166]=15;a[20668]=112;a[20684]=0;c[5168]=0;c[5172]=0;uu(c[5173]|0);c[5173]=0;uu(c[5170]|0);c[5170]=0;c[5174]=114;h[2705]=1.5;c[7640]=48}y=c[12168]|0;B=c[11862]|0;if((B|0)>0){e=0;f=B;while(1){B=y+(e*232&-1)+224|0;I=c[B>>2]|0;if((I|0)==0){K=f}else{uu(I);c[B>>2]=0;K=c[11862]|0}B=e+1|0;if((B|0)<(K|0)){e=B;f=K}else{break}}}c[11862]=0;c[12202]=c[12200];c[12206]=0;c[12372]=0;c[12373]=100;c[12374]=0;c[12376]=0;c[9670]=3;c[9671]=2;uu(c[8528]|0);c[8528]=0;a[47120]=0;uu(c[11948]|0);c[11948]=bP(199184)|0;K=c[10568]|0;if((K|0)!=0){uu(K)}c[10568]=0;a[42568]=0;e7(0);a[37400]=j;i=d;return}function t8(a){a=a|0;if((a|0)==0){return}else{t8(c[a>>2]|0);uu(a);return}}function t9(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=c[1054]|0;L29029:do{if((a[e+(b*40&-1)|0]&1)==0){f=e}else{if((bO(d[(c[10036]|0)+(c[e+(b*40&-1)+32>>2]|0)|0]|0|0)|0)==0){g=c[1054]|0;if((a[(c[10036]|0)+(c[g+(b*40&-1)+32>>2]|0)|0]|0)!=95){f=g;break}}g=b+1|0;h=c[1054]|0;if((c[8272]|0)<=(g|0)){f=h;break}if((a[h+(g*40&-1)|0]&1)==0){f=h;break}i=c[h+(g*40&-1)+36>>2]|0;j=h+(g*40&-1)+32|0;g=c[10036]|0;k=0;while(1){if((k|0)>=(i|0)){break}if((a[g+((c[j>>2]|0)+k|0)|0]|0)==(a[k+115e3|0]|0)){k=k+1|0}else{f=h;break L29029}}if((k|0)==1){l=1}else{f=h;break}return l|0}}while(0);if((a[f+(b*40&-1)|0]&1)==0){l=0;return l|0}do{if((bO(d[(c[10036]|0)+(c[f+(b*40&-1)+32>>2]|0)|0]|0|0)|0)==0){if((a[(c[10036]|0)+(c[(c[1054]|0)+(b*40&-1)+32>>2]|0)|0]|0)==95){break}else{l=0}return l|0}}while(0);f=b+1|0;if((c[8272]|0)<=(f|0)){l=0;return l|0}e=c[1054]|0;if((a[e+(f*40&-1)|0]&1)==0){l=0;return l|0}j=c[e+(f*40&-1)+36>>2]|0;g=e+(f*40&-1)+32|0;f=c[10036]|0;i=0;while(1){if((i|0)>=(j|0)){break}if((a[f+((c[g>>2]|0)+i|0)|0]|0)==(a[i+199040|0]|0)){i=i+1|0}else{l=0;m=21849;break}}if((m|0)==21849){return l|0}if((i|0)!=1){l=0;return l|0}i=b+2|0;if((a[e+(i*40&-1)|0]&1)==0){l=0;return l|0}do{if((bO(d[f+(c[e+(i*40&-1)+32>>2]|0)|0]|0|0)|0)==0){if((a[(c[10036]|0)+(c[(c[1054]|0)+(i*40&-1)+32>>2]|0)|0]|0)==95){break}else{l=0}return l|0}}while(0);i=b+3|0;b=c[8272]|0;L29071:do{if((b|0)>(i|0)){e=i;f=b;while(1){g=c[1054]|0;if((a[g+(e*40&-1)|0]&1)==0){n=e;o=f;break L29071}j=c[g+(e*40&-1)+36>>2]|0;p=g+(e*40&-1)+32|0;q=c[10036]|0;r=0;while(1){if((r|0)>=(j|0)){break}if((a[q+((c[p>>2]|0)+r|0)|0]|0)==(a[r+148464|0]|0)){r=r+1|0}else{n=e;o=f;break L29071}}if((r|0)!=1){n=e;o=f;break L29071}p=e+1|0;if((a[g+(p*40&-1)|0]&1)==0){l=0;m=21856;break}if((bO(d[q+(c[g+(p*40&-1)+32>>2]|0)|0]|0|0)|0)==0){if((a[(c[10036]|0)+(c[(c[1054]|0)+(p*40&-1)+32>>2]|0)|0]|0)!=95){l=0;m=21859;break}}p=e+2|0;j=c[8272]|0;if((j|0)>(p|0)){e=p;f=j}else{n=p;o=j;break L29071}}if((m|0)==21859){return l|0}else if((m|0)==21856){return l|0}}else{n=i;o=b}}while(0);if((o|0)<=(n|0)){l=0;return l|0}b=c[1054]|0;if((a[b+(n*40&-1)|0]&1)==0){l=0;return l|0}i=c[b+(n*40&-1)+36>>2]|0;f=b+(n*40&-1)+32|0;e=c[10036]|0;h=0;while(1){if((h|0)>=(i|0)){break}if((a[e+((c[f>>2]|0)+h|0)|0]|0)==(a[h+131272|0]|0)){h=h+1|0}else{l=0;m=21858;break}}if((m|0)==21858){return l|0}if((h|0)!=1){l=0;return l|0}h=n+1|0;if((o|0)<=(h|0)){l=0;return l|0}if((a[b+(h*40&-1)|0]&1)==0){l=0;return l|0}o=c[b+(h*40&-1)+36>>2]|0;n=b+(h*40&-1)+32|0;h=0;while(1){if((h|0)>=(o|0)){break}if((a[e+((c[n>>2]|0)+h|0)|0]|0)==(a[h+115e3|0]|0)){h=h+1|0}else{l=0;m=21851;break}}if((m|0)==21851){return l|0}l=(h|0)==1&1;return l|0}function ua(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+16|0;e=d|0;f=d+8|0;g=b;h=b;L29117:while(1){b=a[g]|0;if((b<<24>>24|0)==0){break}else if((b<<24>>24|0)!=92){j=g+1|0;do{if((a[47120]|0)!=0&b<<24>>24==34){if((a[j]|0)!=34){break}a[h]=34;g=g+2|0;h=h+1|0;continue L29117}}while(0);a[h]=b;g=j;h=h+1|0;continue}k=g+1|0;l=a[k]|0;if((l<<24>>24|0)==34){a[h]=34;g=g+2|0;h=h+1|0;continue}else if((l<<24>>24|0)==114){a[h]=13;g=g+2|0;h=h+1|0;continue}else if((l<<24>>24|0)==92){a[h]=92;g=g+2|0;h=h+1|0;continue}else if((l<<24>>24|0)==116){a[h]=9;g=g+2|0;h=h+1|0;continue}else if((l<<24>>24|0)==110){a[h]=10;g=g+2|0;h=h+1|0;continue}else{if((l-48&255)>=8){g=k;h=h;continue}if((ca(k|0,(l<<24>>24==48?134368:132688)|0,(v=i,i=i+16|0,c[v>>2]=e,c[v+8>>2]=f,v)|0)|0)>0){a[h]=c[e>>2]&255;g=g+((c[f>>2]|0)+1|0)|0;h=h+1|0;continue}else{a[h]=92;a[h+1|0]=a[k]|0;g=g+2|0;h=h+2|0;continue}}}a[h]=0;i=d;return}function ub(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=c[1054]|0;g=c[f+(e*40&-1)+32>>2]|0;h=c[f+(e*40&-1)+36>>2]|0;e=(g-1|0)+h|0;i=db(c[b>>2]|0,(g+h|0)-(c[f+(d*40&-1)+32>>2]|0)|0,116456)|0;c[b>>2]=i;f=(c[(c[1054]|0)+(d*40&-1)+32>>2]|0)+1|0;L29139:do{if((f|0)<(e|0)){h=i;g=f;while(1){j=a[(c[10036]|0)+g|0]|0;if(j<<24>>24==0){k=h;break L29139}l=h+1|0;a[h]=j;j=g+1|0;if((j|0)<(e|0)){h=l;g=j}else{k=l;break}}}else{k=i}}while(0);a[k]=0;k=c[b>>2]|0;if((a[(c[10036]|0)+(c[(c[1054]|0)+(d*40&-1)+32>>2]|0)|0]|0)==34){ua(k);return}else{m=k;n=k}while(1){k=a[n]|0;if((k<<24>>24|0)==39){d=n+1|0;b=(a[d]|0)==39?d:n;o=b;p=a[b]|0}else if((k<<24>>24|0)==0){break}else{o=n;p=k}a[m]=p;m=m+1|0;n=o+1|0}a[m]=0;return}function uc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=uA(a|0)|0;f=(e+1|0)+(uA(b|0)|0)|0;e=ut(f)|0;do{if((e|0)==0){gk();g=ut(f)|0;if((g|0)!=0){h=g;break}uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=96488,v)|0);return 0}else{h=e}}while(0);uB(h|0,a|0);uC(h|0,b|0);i=d;return h|0}function ud(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=+f;g=+g;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0.0,Z=0,_=0.0,$=0,aa=0,ab=0.0,ac=0,ad=0,ae=0,af=0,ag=0,ai=0;j=i;i=i+2144|0;k=j|0;l=j+1032|0;m=j+2064|0;n=j+2072|0;o=j+2080|0;p=j+2088|0;q=j+2096|0;r=j+2104|0;s=j+2112|0;t=j+2120|0;u=j+2128|0;w=j+2136|0;c[m>>2]=0;x=k|0;y=k+1024|0;a[x]=0;k=c[8270]|0;do{if((k|0)!=0){if((aY(k|0,139696)|0)==0){break}bA(4,k|0)}}while(0);k=l|0;z=l+1|0;A=l+2|0;l=y;B=~~g;C=~~g>>>0;D=ah(O(g/4294967296.0),4294967295.0)>>>0;E=g/3.141592653589793;F=e;e=0;G=0.0;H=x;I=0;L29164:while(1){J=F;K=H;while(1){L=a[J]|0;M=J+1|0;if(L<<24>>24!=37){N=K+1|0;a[K]=L;if(L<<24>>24==0|(y|0)==(N|0)){Q=21902;break L29164}else{J=M;K=N;continue}}if((a[M]|0)!=37){break}a[K]=37;J=J+2|0;K=K+1|0}a[k]=37;if((a[M]|0)==35){a[z]=35;R=M;S=A;T=1}else{R=J;S=z;T=I}N=R;L=S;L29176:while(1){U=N+1|0;V=a[U]|0;do{if(V<<24>>24==46){W=46}else{if(((V&255)-48|0)>>>0<10){W=V;break}if((V<<24>>24|0)==45|(V<<24>>24|0)==43|(V<<24>>24|0)==32|(V<<24>>24|0)==39){W=V}else{break L29176}}}while(0);a[L]=W;N=U;L=L+1|0}J=V<<24>>24;do{if((J|0)==108){a[L]=102;a[L+1|0]=0;ue(f,g,0,n,m,k);X=l-K|0;Y=+h[n>>3];a0(K|0,X|0,k|0,(v=i,i=i+8|0,h[v>>3]=Y,v)|0);Z=1;_=f}else if((J|0)==115){a[L]=102;a[L+1|0]=0;ue(1.0,g,1,p,m,k);a0(K|0,l-K|0,k|0,(v=i,i=i+8|0,h[v>>3]=+h[p>>3],v)|0);Z=1;_=1.0}else if((J|0)==84){a[L]=100;a[L+1|0]=0;if(e){if(G!=1.0){Q=21934;break L29164}X=c[m>>2]|0;c[s>>2]=X;$=X}else{ue(1.0,g,0,0,s,74984);$=c[s>>2]|0}a0(K|0,l-K|0,k|0,(v=i,i=i+8|0,c[v>>2]=$,v)|0);Z=e;_=G}else if((J|0)==83){a[L]=100;a[L+1|0]=0;if(e){if(G!=1.0){Q=21940;break L29164}X=c[m>>2]|0;c[t>>2]=X;aa=X}else{ue(1.0,g,1,0,t,74984);aa=c[t>>2]|0}a0(K|0,l-K|0,k|0,(v=i,i=i+8|0,c[v>>2]=aa,v)|0);Z=e;_=G}else if((J|0)==98){a[L]=102;a[L+1|0]=0;ue(3.010299956639812,g,0,q,m,k);a0(K|0,l-K|0,k|0,(v=i,i=i+8|0,h[v>>3]=+h[q>>3],v)|0);Z=1;_=3.010299956639812}else if((J|0)==76){a[L]=100;a[L+1|0]=0;if(e){if(G!=f){Q=21929;break L29164}c[r>>2]=c[m>>2];ab=G}else{ab=f}ue(f,g,0,0,r,74984);a0(K|0,l-K|0,k|0,(v=i,i=i+8|0,c[v>>2]=c[r>>2],v)|0);Z=e;_=ab}else if((J|0)==101|(J|0)==69|(J|0)==102|(J|0)==70|(J|0)==103|(J|0)==71){a[L]=V;a[L+1|0]=0;a0(K|0,l-K|0,k|0,(v=i,i=i+8|0,h[v>>3]=g,v)|0);Z=e;_=G}else if((J|0)==99){a[L]=99;a[L+1|0]=0;if(e){if(G!=1.0){Q=21946;break L29164}X=c[m>>2]|0;c[u>>2]=X;ac=X}else{ue(1.0,g,1,0,u,74984);ac=c[u>>2]|0}X=ac+24|0;if(X>>>0<49){ad=(X|0)/3&-1;c[u>>2]=ad;X=l-K|0;ae=a[ad+204216|0]|0;a0(K|0,X|0,k|0,(v=i,i=i+8|0,c[v>>2]=ae,v)|0);Z=e;_=G;break}else{ae=l-K|0;a0(K|0,ae|0,199792,(v=i,i=i+8|0,c[v>>2]=ac,v)|0);Z=e;_=G;break}}else if((J|0)==116){a[L]=102;a[L+1|0]=0;ue(1.0,g,0,o,m,k);a0(K|0,l-K|0,k|0,(v=i,i=i+8|0,h[v>>3]=+h[o>>3],v)|0);Z=1;_=1.0}else if((J|0)==120|(J|0)==88|(J|0)==111|(J|0)==79){if(+P(+g)<2147483647.0){a[L]=V;a[L+1|0]=0;ae=l-K|0;a0(K|0,ae|0,k|0,(v=i,i=i+8|0,c[v>>2]=B,v)|0);Z=e;_=G;break}else{a[L]=108;a[L+1|0]=108;a[L+2|0]=a[U]|0;a[L+3|0]=0;ae=l-K|0;a0(K|0,ae|0,k|0,(v=i,i=i+16|0,c[v>>2]=C,c[v+8>>2]=D,v)|0);Z=e;_=G;break}}else if((J|0)==80){a[L]=102;a[L+1|0]=0;a0(K|0,l-K|0,k|0,(v=i,i=i+8|0,h[v>>3]=E,v)|0);Z=e;_=G}else if((J|0)==66){a[L]=99;a[L+1|0]=105;a[L+2|0]=0;if(e){if(G!=3.010299956639812){Q=21954;break L29164}ae=c[m>>2]|0;c[w>>2]=ae;af=ae}else{ue(3.010299956639812,g,0,0,w,74984);af=c[w>>2]|0}if((af-1|0)>>>0<8){ae=l-K|0;X=a[af+184160|0]|0;a0(K|0,ae|0,k|0,(v=i,i=i+8|0,c[v>>2]=X,v)|0);Z=e;_=G;break}if((af|0)>8){X=l-K|0;ae=af-8|0;a0(K|0,X|0,178992,(v=i,i=i+8|0,c[v>>2]=ae,v)|0);Z=e;_=G;break}if((af|0)>=0){Z=e;_=G;break}a0(K|0,l-K|0,174792,(v=i,i=i+8|0,c[v>>2]=af*10&-1,v)|0);Z=e;_=G}else{Q=21963;break L29164}}while(0);if(T){if((U|0)!=(cy(U|0,166744)|0)){Q=21969;break}}L=c[12886]|0;do{if((L|0)!=0){J=uA(L|0)|0;ae=a[c[b$()>>2]|0]|0;X=a8(K|0,ae|0)|0;if((X|0)==0){break}ad=K;ag=X;do{X=uA(ag|0)|0;ai=ag+J|0;if(((ai-ad|0)+X|0)>>>0>d>>>0){Q=21977;break L29164}uH(ai|0,ag+1|0,X|0);uD(ag|0,c[12886]|0,J);ag=a8(ai|0,ae|0)|0;}while((ag|0)!=0)}}while(0);F=N+2|0;e=Z;G=_;H=K+(uA(K|0)|0)|0;I=T}if((Q|0)==21902){uF(b|0,x|0,d|0);if((uA(x|0)|0)>>>0>=d>>>0){a[b+((d|0)==0?0:d-1|0)|0]=0}d=c[8270]|0;if((d|0)==0){i=j;return}if((aY(d|0,139696)|0)==0){i=j;return}bA(4,139696);i=j;return}else if((Q|0)==21940){uf(-1,215448,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==21946){uf(-1,209728,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==21929){uf(-1,82024,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==21954){uf(-1,193648,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==21969){j=c[8270]|0;if((j|0)==0){uf(-1,170952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((aY(j|0,139696)|0)==0){uf(-1,170952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}bA(4,139696);uf(-1,170952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==21977){uf(-1,161576,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==21963){j=c[8270]|0;if((j|0)==0){uf(-1,170952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((aY(j|0,139696)|0)==0){uf(-1,170952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}bA(4,139696);uf(-1,170952,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((Q|0)==21934){uf(-1,222240,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}function ue(a,b,d,e,f,g){a=+a;b=+b;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0.0,l=0.0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0.0,u=0,w=0.0,x=0,y=0.0,z=0;j=i;if(b==0.0){if((e|0)!=0){h[e>>3]=0.0}if((f|0)==0){i=j;return}c[f>>2]=0;i=j;return}if(b<0.0){k=-0.0-b;l=-1.0}else{k=b;l=1.0}b=+bQ(+k)/a;m=~~+O(+b);k=+R(10.0,+((b- +(m|0))*a));if(d){if(a!=1.0){uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=127848,v)|0)}n=(m|0)%3&-1;if((n|0)==2){o=m;p=22001}else if((n|0)==(-1|0)){o=m-3|0;p=22001}else if((n|0)==0){q=k;r=m}else if((n|0)==1){s=m;p=22003}else if((n|0)==(-2|0)){s=m-3|0;p=22003}else{uf(-1,126488,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}if((p|0)==22001){q=k*100.0;r=o}else if((p|0)==22003){q=k*10.0;r=s}t=q;u=r-((r|0)%3&-1)|0}else{t=k;u=m}do{if((g|0)==0){w=t;x=u}else{if(d){y=1.0e3}else{y=+R(10.0,+a)}m=a8(g|0,46)|0;if((m|0)==0){z=0}else{z=aE(m+1|0,0,10)|0}if(t+ +R(10.0,+(+(-z|0)))*.5>3]=l*w}if((f|0)==0){i=j;return}c[f>>2]=x;i=j;return}function uf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0;f=i;i=i+144|0;g=f|0;h=f+16|0;uE(h|0,0,128);do{if((b|0)==(-2|0)){f=c[11932]|0;j=c[8802]|0;if(!((c[12892]|0)!=0&(f|0)!=0&(j|0)!=0)){break}k=c[m>>2]|0;l=(uA(j|0)|0)>>>0>77?76168:179864;n=c[11900]|0;cf(k|0,76792,(v=i,i=i+32|0,c[v>>2]=j,c[v+8>>2]=l,c[v+16>>2]=f,c[v+24>>2]=n,v)|0)}else if((b|0)!=(-1|0)){if((a[25280]&1)==0){n=c[m>>2]|0;f=c[12906]|0;l=(f|0)!=0?f:179864;f=c[10036]|0;cf(n|0,153408,(v=i,i=i+16|0,c[v>>2]=l,c[v+8>>2]=f,v)|0)}f=c[12906]|0;do{if((f|0)!=0){if((a[f]|0)==0){break}else{o=f}do{aF(32,c[m>>2]|0);o=o+1|0;}while((a[o]|0)!=0)}}while(0);if((c[(c[1054]|0)+(b*40&-1)+32>>2]|0)>0){f=0;do{aF(((a[(c[10036]|0)+f|0]|0)==9?9:32)|0,c[m>>2]|0);f=f+1|0;}while((f|0)<(c[(c[1054]|0)+(b*40&-1)+32>>2]|0))}aI(148792,2,1,c[m>>2]|0)}}while(0);b=c[12906]|0;do{if((b|0)!=0){if((a[b]|0)==0){break}else{p=b}do{aF(32,c[m>>2]|0);p=p+1|0;}while((a[p]|0)!=0)}}while(0);L29346:do{if((a[37400]&1)==0){p=c[8804]|0;do{if((p|0)!=0){b=c[p+4>>2]|0;if((b|0)==0){break}o=c[m>>2]|0;f=c[9354]|0;cf(o|0,146696,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=f,v)|0);break L29346}}while(0);p=c[m>>2]|0;f=c[9354]|0;cf(p|0,144600,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}}while(0);f=g;c[f>>2]=e;c[f+4>>2]=0;b9(h|0,128,d|0,g|0);cf(c[m>>2]|0,141456,(v=i,i=i+8|0,c[v>>2]=h,v)|0);aI(139704,2,1,c[m>>2]|0);g=c[8270]|0;do{if((g|0)!=0){if((aY(g|0,139696)|0)==0){break}bA(4,139696)}}while(0);a[43504]=0;c[6932]=0;c[13544]=0;a[14176]=0;a[25288]=0;a[37408]=0;e7(2);g=e6(137752)|0;if((g|0)==0){iL()}d=g+8|0;do{if((a[d]&1)==0){if((aY(c[g+24>>2]|0,h|0)|0)==0){iL()}f=g+16|0;if((c[f>>2]|0)!=3){q=f;break}uu(c[g+24>>2]|0);c[f>>2]=1;q=f}else{a[d]=0;q=g+16|0}}while(0);d=bP(h|0)|0;c[q>>2]=3;c[g+24>>2]=d;iL()}function ug(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=c[b>>2]|0;c[b>>2]=e+1;f=d[e]|0;if((f&128|0)==0){c[a>>2]=f;g=1;return g|0}if((f&224|0)==192){e=f&31;c[a>>2]=e;h=d[c[b>>2]|0]|0;if((h&192|0)!=128){c[a>>2]=65535;g=0;return g|0}c[a>>2]=e<<6|h&63;c[b>>2]=(c[b>>2]|0)+1;if((c[a>>2]|0)>>>0>=128){g=1;return g|0}c[a>>2]=65535;g=0;return g|0}if((f&240|0)==224){h=f&15;c[a>>2]=h;e=d[c[b>>2]|0]|0;do{if((e&192|0)==128){c[a>>2]=h<<6|e&63;i=(c[b>>2]|0)+1|0;c[b>>2]=i;j=d[i]|0;if((j&192|0)!=128){break}c[a>>2]=c[a>>2]<<6|j&63;c[b>>2]=(c[b>>2]|0)+1;if((c[a>>2]|0)>>>0>=2048){g=1;return g|0}c[a>>2]=65535;g=0;return g|0}}while(0);c[a>>2]=65535;g=0;return g|0}if((f&248|0)==240){e=f&7;c[a>>2]=e;h=d[c[b>>2]|0]|0;do{if((h&192|0)==128){c[a>>2]=e<<6|h&63;j=(c[b>>2]|0)+1|0;c[b>>2]=j;i=d[j]|0;if((i&192|0)!=128){break}c[a>>2]=c[a>>2]<<6|i&63;i=(c[b>>2]|0)+1|0;c[b>>2]=i;j=d[i]|0;if((j&192|0)!=128){break}c[a>>2]=c[a>>2]<<6|j&63;c[b>>2]=(c[b>>2]|0)+1;if((c[a>>2]|0)>>>0>=65536){g=1;return g|0}c[a>>2]=65535;g=0;return g|0}}while(0);c[a>>2]=65535;g=0;return g|0}if((f&252|0)==248){h=f&3;c[a>>2]=h;e=d[c[b>>2]|0]|0;do{if((e&192|0)==128){c[a>>2]=h<<6|e&63;j=(c[b>>2]|0)+1|0;c[b>>2]=j;i=d[j]|0;if((i&192|0)!=128){break}c[a>>2]=c[a>>2]<<6|i&63;i=(c[b>>2]|0)+1|0;c[b>>2]=i;j=d[i]|0;if((j&192|0)!=128){break}c[a>>2]=c[a>>2]<<6|j&63;j=(c[b>>2]|0)+1|0;c[b>>2]=j;i=d[j]|0;if((i&192|0)!=128){break}c[a>>2]=c[a>>2]<<6|i&63;c[b>>2]=(c[b>>2]|0)+1;if((c[a>>2]|0)>>>0>=2097152){g=1;return g|0}c[a>>2]=65535;g=0;return g|0}}while(0);c[a>>2]=65535;g=0;return g|0}if((f&254|0)!=252){c[a>>2]=65535;g=0;return g|0}e=f&1;c[a>>2]=e;f=d[c[b>>2]|0]|0;do{if((f&192|0)==128){c[a>>2]=e<<6|f&63;h=(c[b>>2]|0)+1|0;c[b>>2]=h;i=d[h]|0;if((i&192|0)!=128){break}c[a>>2]=c[a>>2]<<6|i&63;i=(c[b>>2]|0)+1|0;c[b>>2]=i;h=d[i]|0;if((h&192|0)!=128){break}c[a>>2]=c[a>>2]<<6|h&63;h=(c[b>>2]|0)+1|0;c[b>>2]=h;i=d[h]|0;if((i&192|0)!=128){break}c[a>>2]=c[a>>2]<<6|i&63;i=(c[b>>2]|0)+1|0;c[b>>2]=i;h=d[i]|0;if((h&192|0)!=128){break}c[a>>2]=c[a>>2]<<6|h&63;c[b>>2]=(c[b>>2]|0)+1;if((c[a>>2]|0)>>>0>=67108864){g=1;return g|0}c[a>>2]=65535;g=0;return g|0}}while(0);c[a>>2]=65535;g=0;return g|0}function uh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0;f=i;i=i+16|0;g=f|0;do{if((b|0)==(-2|0)){h=c[11932]|0;j=c[8802]|0;if(!((c[12892]|0)!=0&(h|0)!=0&(j|0)!=0)){break}k=c[m>>2]|0;l=(uA(j|0)|0)>>>0>77?76168:179864;n=c[11900]|0;cf(k|0,76792,(v=i,i=i+32|0,c[v>>2]=j,c[v+8>>2]=l,c[v+16>>2]=h,c[v+24>>2]=n,v)|0)}else if((b|0)!=(-1|0)){if((a[25280]&1)==0){n=c[m>>2]|0;h=c[12906]|0;l=(h|0)!=0?h:179864;h=c[10036]|0;cf(n|0,153408,(v=i,i=i+16|0,c[v>>2]=l,c[v+8>>2]=h,v)|0)}h=c[12906]|0;do{if((h|0)!=0){if((a[h]|0)==0){break}else{o=h}do{aF(32,c[m>>2]|0);o=o+1|0;}while((a[o]|0)!=0)}}while(0);if((c[(c[1054]|0)+(b*40&-1)+32>>2]|0)>0){h=0;do{aF(((a[(c[10036]|0)+h|0]|0)==9?9:32)|0,c[m>>2]|0);h=h+1|0;}while((h|0)<(c[(c[1054]|0)+(b*40&-1)+32>>2]|0))}aI(148792,2,1,c[m>>2]|0)}}while(0);b=c[12906]|0;do{if((b|0)!=0){if((a[b]|0)==0){break}else{p=b}do{aF(32,c[m>>2]|0);p=p+1|0;}while((a[p]|0)!=0)}}while(0);L29463:do{if((a[37400]&1)==0){p=c[8804]|0;do{if((p|0)!=0){b=c[p+4>>2]|0;if((b|0)==0){break}o=c[m>>2]|0;h=c[9354]|0;cf(o|0,146696,(v=i,i=i+16|0,c[v>>2]=b,c[v+8>>2]=h,v)|0);break L29463}}while(0);p=c[m>>2]|0;h=c[9354]|0;cf(p|0,144600,(v=i,i=i+8|0,c[v>>2]=h,v)|0)}}while(0);aI(135952,9,1,c[m>>2]|0);h=g;c[h>>2]=e;c[h+4>>2]=0;bX(c[m>>2]|0,d|0,g|0);aF(10,c[m>>2]|0);i=f;return}function ui(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;d=b;while(1){if((aM(a[d]|0|0)|0)==0){e=c;break}else{d=d+1|0}}while(1){if((aM(a[e]|0|0)|0)==0){break}else{e=e+1|0}}c=uA(d|0)|0;b=uA(e|0)|0;f=c;while(1){g=f-1|0;if((aM(a[d+g|0]|0|0)|0)==0){h=b;break}else{f=g}}do{h=h-1|0;}while((aM(a[e+h|0]|0|0)|0)!=0);if((g|0)!=(h|0)){i=0;return i|0}i=(a_(d|0,e|0,f|0)|0)==0;return i|0}function uj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+16|0;g=f|0;do{if((b|0)==(-2|0)){f=c[11932]|0;h=c[8802]|0;if(!((c[12892]|0)!=0&(f|0)!=0&(h|0)!=0)){break}j=c[m>>2]|0;k=(uA(h|0)|0)>>>0>77?76168:179864;l=c[11900]|0;cf(j|0,76792,(v=i,i=i+32|0,c[v>>2]=h,c[v+8>>2]=k,c[v+16>>2]=f,c[v+24>>2]=l,v)|0)}else if((b|0)!=(-1|0)){if((a[25280]&1)==0){l=c[m>>2]|0;f=c[12906]|0;k=(f|0)!=0?f:179864;f=c[10036]|0;cf(l|0,153408,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=f,v)|0)}f=c[12906]|0;do{if((f|0)!=0){if((a[f]|0)==0){break}else{n=f}do{aF(32,c[m>>2]|0);n=n+1|0;}while((a[n]|0)!=0)}}while(0);if((c[(c[1054]|0)+(b*40&-1)+32>>2]|0)>0){f=0;do{aF(((a[(c[10036]|0)+f|0]|0)==9?9:32)|0,c[m>>2]|0);f=f+1|0;}while((f|0)<(c[(c[1054]|0)+(b*40&-1)+32>>2]|0))}aI(148792,2,1,c[m>>2]|0)}}while(0);b=c[12906]|0;do{if((b|0)!=0){if((a[b]|0)==0){break}else{o=b}do{aF(32,c[m>>2]|0);o=o+1|0;}while((a[o]|0)!=0)}}while(0);o=g;c[o>>2]=e;c[o+4>>2]=0;bX(c[m>>2]|0,d|0,g|0);aF(10,c[m>>2]|0);g=c[12906]|0;do{if((g|0)!=0){if((a[g]|0)==0){break}else{p=g}do{aF(32,c[m>>2]|0);p=p+1|0;}while((a[p]|0)!=0)}}while(0);if((a[37400]&1)!=0){aS(143e3);q=c[m>>2]|0;r=aF(10,q|0)|0;a[25288]=0;iL()}p=c[8804]|0;do{if((p|0)!=0){g=c[p+4>>2]|0;if((g|0)==0){break}d=c[m>>2]|0;o=c[9354]|0;cf(d|0,146696,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=o,v)|0);aS(143e3);q=c[m>>2]|0;r=aF(10,q|0)|0;a[25288]=0;iL()}}while(0);cf(c[m>>2]|0,144600,(v=i,i=i+8|0,c[v>>2]=c[9354],v)|0);aS(143e3);q=c[m>>2]|0;r=aF(10,q|0)|0;a[25288]=0;iL()}function uk(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e|0;a[33512]=0;lh();e=f|0;g=f;c[g>>2]=d;c[g+4>>2]=0;g=c[12906]|0;do{if((g|0)!=0){if((a[g]|0)==0){break}else{h=g}do{aF(32,c[m>>2]|0);h=h+1|0;}while((a[h]|0)!=0)}}while(0);L29528:do{if((a[37400]&1)==0){h=c[8804]|0;do{if((h|0)!=0){g=c[h+4>>2]|0;if((g|0)==0){break}d=c[m>>2]|0;f=c[9354]|0;cf(d|0,146696,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=f,v)|0);break L29528}}while(0);h=c[m>>2]|0;f=c[9354]|0;cf(h|0,144600,(v=i,i=i+8|0,c[v>>2]=f,v)|0)}}while(0);bX(c[m>>2]|0,b|0,e|0);aI(139704,2,1,c[m>>2]|0);iL()}function ul(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,w=0,x=0.0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0,I=0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0;j=i;k=+h[a+(b<<6)+8>>3];l=+h[a+(b<<6)+16>>3];m=+h[a+(b<<6)+24>>3];n=+h[a+(d<<6)+8>>3];o=+h[a+(d<<6)+16>>3];p=+h[a+(d<<6)+24>>3];d=(c[a+(b<<6)>>2]|0)==0;q=d?n:k;r=d?o:l;s=d?p:m;t=d?k:n;n=d?l:o;o=d?m:p;d=t==-8.988465674311579e+307;b=n==-8.988465674311579e+307;a=(b?d?2:1:d&1)+(o==-8.988465674311579e+307&1)|0;if((a|0)>1){h[e>>3]=q;h[f>>3]=r;h[g>>3]=s;i=j;return}if((a|0)==1){h[e>>3]=q;h[f>>3]=r;h[g>>3]=s;if(d){h[e>>3]=(c[16508]&2|0)==0?+h[8255]:+h[8256];i=j;return}if(b){h[f>>3]=(c[16336]&2|0)==0?+h[8169]:+h[8170];i=j;return}else{h[g>>3]=(c[16164]&2|0)==0?+h[8083]:+h[8084];i=j;return}}do{if(q==t){if(r==n){h[e>>3]=q;h[f>>3]=r;b=so){w=19;break}else{w=18;break}}}else{if(ls){w=19;break}else{w=18;break}}}}while(0);if((w|0)==18){h[g>>3]=(d|0)==0?m:p;i=j;return}else if((w|0)==19){l=a?m:p;if(b){u=l;w=20}else{x=l;w=22}}do{if((w|0)==20){if(u>3<<3,c[v>>2]=0,v)|0)}if(((d|0)==0?p:m)<=o){break}uk(113944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((w|0)==22){if(x>3<<3,c[v>>2]=0,v)|0)}if(((d|0)==0?p:m)<=s){break}uk(113944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);h[g>>3]=(d|0)==0?p:m;i=j;return}if(s==o){h[e>>3]=q;h[g>>3]=s;b=rn){w=35;break}else{w=34;break}}}else{if(zr){w=35;break}else{w=34;break}}}}while(0);if((w|0)==34){h[f>>3]=(a|0)==0?k:l;i=j;return}else if((w|0)==35){z=y?k:l;if(b){A=z;w=36}else{B=z;w=38}}do{if((w|0)==36){if(A>3<<3,c[v>>2]=0,v)|0)}if(((a|0)==0?l:k)<=n){break}uk(113944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((w|0)==38){if(B>3<<3,c[v>>2]=0,v)|0)}if(((a|0)==0?l:k)<=r){break}uk(113944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);h[f>>3]=(a|0)==0?l:k;i=j;return}b=rn){w=54;break}else{w=49;break}}}else{if(pr){w=54;break}else{w=49;break}}}}while(0);do{if((w|0)==49){p=(y|0)==0?m:z;if(!(p!=r&p!=n)){w=54;break}k=s+(p-r)*((o-s)/(n-r));p=+h[8083];l=+h[8084];if(pl){w=54;break}}else{if(kp){w=54;break}}h[e>>3]=q;h[f>>3]=(c[16336]&2|0)==0?+h[8169]:+h[8170];h[g>>3]=k;i=j;return}}while(0);if((w|0)==54){k=d?m:z;if(b){C=k;w=55}else{D=k;w=57}}do{if((w|0)==55){if(Cl){break}}else{if(pk){break}}h[e>>3]=q;h[f>>3]=(c[16336]&2|0)==0?+h[8170]:+h[8169];h[g>>3]=p;i=j;return}}while(0);y=so){w=76;break}else{w=71;break}}}else{if(ls){w=76;break}else{w=71;break}}}}while(0);do{if((w|0)==71){l=(b|0)==0?k:p;if(!(l!=s&l!=o)){w=76;break}G=r+(l-s)*((n-r)/(o-s));if(mz){w=76;break}}else{if(Gm){w=76;break}}h[e>>3]=q;h[f>>3]=G;h[g>>3]=(c[16164]&2|0)==0?+h[8083]:+h[8084];i=j;return}}while(0);if((w|0)==76){G=d?k:p;if(y){E=G;w=77}else{F=G;w=79}}if((w|0)==77){if(Eo){break}}else if((w|0)==79){if(Fs){break}}G=(b|0)==0?p:k;if(!(G!=s&G!=o)){break}l=r+(G-s)*((n-r)/(o-s));if(mz){break}}else{if(lm){break}}h[e>>3]=q;h[f>>3]=l;h[g>>3]=(c[16164]&2|0)==0?+h[8084]:+h[8083];i=j;return}}while(0);do{if(r==n){if(o==s){h[f>>3]=r;h[g>>3]=s;a=qt){w=96;break}else{w=95;break}}}else{if(Dq){w=96;break}else{w=95;break}}}}while(0);if((w|0)==95){h[e>>3]=(H|0)==0?E:F;i=j;return}else if((w|0)==96){D=I?E:F;if(a){J=D;w=97}else{K=D;w=99}}do{if((w|0)==97){if(J>3<<3,c[v>>2]=0,v)|0)}if(((H|0)==0?F:E)<=t){break}uk(113944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}else if((w|0)==99){if(K>3<<3,c[v>>2]=0,v)|0)}if(((H|0)==0?F:E)<=q){break}uk(113944,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0)}}while(0);h[e>>3]=(H|0)==0?F:E;i=j;return}a=qt){w=115;break}else{w=110;break}}}else{if(zq){w=115;break}else{w=110;break}}}}while(0);do{if((w|0)==110){z=(I|0)==0?m:D;if(!(z!=q&z!=t)){w=115;break}E=s+(z-q)*((o-s)/(t-q));F=+h[8083];k=+h[8084];if(Fk){w=115;break}}else{if(EF){w=115;break}}h[e>>3]=z;h[f>>3]=r;h[g>>3]=E;i=j;return}}while(0);if((w|0)==115){E=b?m:D;if(a){L=E;w=116}else{M=E;w=118}}do{if((w|0)==116){if(Lk){break}}else{if(zF){break}}h[e>>3]=E;h[f>>3]=r;h[g>>3]=z;i=j;return}}while(0);I=so){w=137;break}else{w=132;break}}}else{if(Fs){w=137;break}else{w=132;break}}}}while(0);do{if((w|0)==132){F=(a|0)==0?E:z;if(!(F!=s&F!=o)){w=137;break}k=q+(F-s)*((t-q)/(o-s));if(mD){w=137;break}}else{if(km){w=137;break}}h[e>>3]=k;h[f>>3]=r;h[g>>3]=(c[16164]&2|0)==0?+h[8083]:+h[8084];i=j;return}}while(0);if((w|0)==137){k=b?E:z;if(I){N=k;w=138}else{O=k;w=140}}if((w|0)==138){if(No){break}}else if((w|0)==140){if(Os){break}}k=(a|0)==0?z:E;if(!(k!=s&k!=o)){break}F=q+(k-s)*((t-q)/(o-s));if(mD){break}}else{if(Fm){break}}h[e>>3]=F;h[f>>3]=r;h[g>>3]=(c[16164]&2|0)==0?+h[8084]:+h[8083];i=j;return}}while(0);do{if(s==o){H=qt){w=161;break}else{w=156;break}}}else{if(Mq){w=161;break}else{w=156;break}}}}while(0);do{if((w|0)==156){M=(d|0)==0?N:O;if(!(M!=q&M!=t)){w=161;break}m=r+(M-q)*((n-r)/(t-q));D=+h[8169];E=+h[8170];if(DE){w=161;break}}else{if(mD){w=161;break}}h[e>>3]=M;h[f>>3]=m;h[g>>3]=s;i=j;return}}while(0);if((w|0)==161){m=P?N:O;if(H){Q=m;w=162}else{R=m;w=164}}do{if((w|0)==162){if(QE){break}}else{if(MD){break}}h[e>>3]=m;h[f>>3]=M;h[g>>3]=s;i=j;return}}while(0);d=rn){w=183;break}else{w=178;break}}}else{if(Dr){w=183;break}else{w=178;break}}}}while(0);do{if((w|0)==178){D=(H|0)==0?m:M;if(!(D!=r&D!=n)){w=183;break}E=q+(D-r)*((t-q)/(n-r));if(NO){w=183;break}}else{if(EN){w=183;break}}h[e>>3]=E;h[f>>3]=(c[16336]&2|0)==0?+h[8169]:+h[8170];h[g>>3]=s;i=j;return}}while(0);if((w|0)==183){E=P?m:M;if(d){S=E;w=184}else{T=E;w=186}}if((w|0)==184){if(Sn){U=y;V=O;W=N;break}}else if((w|0)==186){if(Tr){U=y;V=O;W=N;break}}E=(H|0)==0?M:m;if(!(E!=r&E!=n)){U=y;V=O;W=N;break}D=q+(E-r)*((t-q)/(n-r));if(NO){U=y;V=O;W=N;break}}else{if(DN){U=y;V=O;W=N;break}}h[e>>3]=D;h[f>>3]=(c[16336]&2|0)==0?+h[8170]:+h[8169];h[g>>3]=s;i=j;return}else{U=c[16508]|0;V=+h[8256];W=+h[8255]}}while(0);a=qt){w=208;break}else{w=200;break}}}else{if(Tq){w=208;break}else{w=200;break}}}}while(0);do{if((w|0)==200){T=(I|0)==0?W:V;if(!(T!=q&T!=t)){w=208;break}S=T-q;R=t-q;Q=r+S*((n-r)/R);D=s+S*((o-s)/R);R=+h[8169];S=+h[8170];if(RS){w=208;break}}else{if(QR){w=208;break}}R=+h[8083];S=+h[8084];if(RS){w=208;break}}else{if(DR){w=208;break}}h[e>>3]=T;h[f>>3]=Q;h[g>>3]=D;i=j;return}}while(0);if((w|0)==208){D=U?W:V;if(a){X=D;w=209}else{Y=D;w=211}}do{if((w|0)==209){if(XX){break}}else{if(QD){break}}D=+h[8083];X=+h[8084];if(DX){break}}else{if(TD){break}}h[e>>3]=Y;h[f>>3]=Q;h[g>>3]=T;i=j;return}}while(0);I=rn){w=236;break}else{w=228;break}}}else{if(Yr){w=236;break}else{w=228;break}}}}while(0);do{if((w|0)==228){Y=(a|0)==0?Q:T;if(!(Y!=r&Y!=n)){w=236;break}D=Y-r;Y=n-r;X=q+D*((t-q)/Y);R=s+D*((o-s)/Y);if(WV){w=236;break}}else{if(XW){w=236;break}}Y=+h[8083];D=+h[8084];if(YD){w=236;break}}else{if(RY){w=236;break}}h[e>>3]=X;h[f>>3]=(c[16336]&2|0)==0?+h[8169]:+h[8170];h[g>>3]=R;i=j;return}}while(0);if((w|0)==236){R=U?Q:T;if(I){Z=R;w=237}else{_=R;w=239}}do{if((w|0)==237){if(ZV){break}}else{if(RW){break}}_=+h[8083];Z=+h[8084];if(_Z){break}}else{if(X_){break}}h[e>>3]=R;h[f>>3]=(c[16336]&2|0)==0?+h[8170]:+h[8169];h[g>>3]=X;i=j;return}}while(0);a=so){w=264;break}else{w=256;break}}}else{if(_s){w=264;break}else{w=256;break}}}}while(0);do{if((w|0)==256){_=(I|0)==0?R:X;if(!(_!=s&_!=o)){w=264;break}Z=_-s;_=o-s;Y=q+Z*((t-q)/_);D=r+Z*((n-r)/_);if(WV){w=264;break}}else{if(YW){w=264;break}}if(QT){w=264;break}}else{if(DQ){w=264;break}}h[e>>3]=Y;h[f>>3]=D;h[g>>3]=(c[16164]&2|0)==0?+h[8083]:+h[8084];i=j;return}}while(0);if((w|0)==264){D=U?R:X;if(a){$=D;w=265}else{aa=D;w=267}}do{if((w|0)==265){if($V){break}}else{if(DW){break}}if(QT){break}}else{if(YQ){break}}h[e>>3]=D;h[f>>3]=Y;h[g>>3]=(c[16164]&2|0)==0?+h[8084]:+h[8083];i=j;return}}while(0);h[e>>3]=q;h[f>>3]=r;h[g>>3]=s;i=j;return}function um(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0.0,H=0.0,I=0.0;g=+h[a+(b<<6)+8>>3];i=+h[a+(b<<6)+16>>3];j=+h[a+(b<<6)+24>>3];k=+h[a+(c<<6)+8>>3];l=+h[a+(c<<6)+16>>3];m=+h[a+(c<<6)+24>>3];c=g==-8.988465674311579e+307;a=k==-8.988465674311579e+307;b=i==-8.988465674311579e+307;n=l==-8.988465674311579e+307;o=j==-8.988465674311579e+307;p=m==-8.988465674311579e+307;if((((((o&1)+(b&1)|0)+(a?c?2:1:c&1)|0)+(n&1)|0)+(p&1)|0)>1){q=0;return q|0}if(a|c){r=c?l:i;s=c?m:j;if((c?k:g)<=+h[8256]){q=0;return q|0}t=+h[8169];u=+h[8170];do{if(tu){q=0}else{break}return q|0}else{if(rt){q=0}else{break}return q|0}}while(0);t=+h[8083];u=+h[8084];do{if(tu){q=0}else{break}return q|0}else{if(st){q=0}else{break}return q|0}}while(0);h[d>>3]=+h[8255];h[e>>3]=r;h[f>>3]=s;h[d+8>>3]=+h[8256];h[e+8>>3]=r;h[f+8>>3]=s;q=1;return q|0}if(n|b){s=b?k:g;r=b?m:j;if((b?l:i)<=+h[8170]){q=0;return q|0}t=+h[8255];u=+h[8256];do{if(tu){q=0}else{break}return q|0}else{if(st){q=0}else{break}return q|0}}while(0);t=+h[8083];u=+h[8084];do{if(tu){q=0}else{break}return q|0}else{if(rt){q=0}else{break}return q|0}}while(0);h[d>>3]=s;h[e>>3]=+h[8169];h[f>>3]=r;h[d+8>>3]=s;h[e+8>>3]=+h[8170];h[f+8>>3]=r;q=1;return q|0}if(p|o){r=o?k:g;s=o?l:i;if((o?m:j)<=+h[8084]){q=0;return q|0}t=+h[8255];u=+h[8256];do{if(tu){q=0}else{break}return q|0}else{if(rt){q=0}else{break}return q|0}}while(0);t=+h[8169];u=+h[8170];do{if(tu){q=0}else{break}return q|0}else{if(st){q=0}else{break}return q|0}}while(0);h[d>>3]=r;h[e>>3]=s;h[f>>3]=+h[8083];h[d+8>>3]=r;h[e+8>>3]=s;h[f+8>>3]=+h[8084];q=1;return q|0}s=+h[8083];if((j>m?j:m)r){q=0;return q|0}t=+h[8255];if((g>k?g:k)u){q=0;return q|0}v=+h[8169];if((i>l?i:l)w){q=0;return q|0}n=g==k;c=i==l;a=j==m;if(n&c&a){q=0;return q|0}if(n){n=tu){q=0}else{break}return q|0}else{if(gt){q=0}else{break}return q|0}}while(0);do{if(vw){q=0}else{break}return q|0}else{if(iv){q=0}else{break}return q|0}}while(0);do{if(o){if(sm){q=0}else{break}return q|0}else{if(sj){q=0}else{break}return q|0}}while(0);h[d>>3]=g;h[e>>3]=i;h[f>>3]=+h[8083];h[d+8>>3]=g;h[e+8>>3]=i;h[f+8>>3]=+h[8084];q=1;return q|0}if(a){do{if(n){if(gu){q=0}else{break}return q|0}else{if(gt){q=0}else{break}return q|0}}while(0);do{if(sr){q=0}else{break}return q|0}else{if(js){q=0}else{break}return q|0}}while(0);do{if(b){if(vl){q=0}else{break}return q|0}else{if(vi){q=0}else{break}return q|0}}while(0);h[d>>3]=g;h[e>>3]=+h[8169];h[f>>3]=j;h[d+8>>3]=g;h[e+8>>3]=+h[8170];h[f+8>>3]=j;q=1;return q|0}else{do{if(n){if(ku){q=0}else{break}return q|0}else{if(kt){q=0}else{break}return q|0}}while(0);x=l-i;y=(v-i)/x;z=(w-i)/x;n=y>z;A=n?y:z;B=n?z:y;y=m-j;z=(s-j)/y;C=(r-j)/y;n=z>C;D=n?z:C;E=n?C:z;z=B>E?B:E;E=z>0.0?z:0.0;z=AD){q=0;return q|0}h[d>>3]=g;h[e>>3]=i+x*E;h[f>>3]=j+y*E;h[d+8>>3]=g;h[e+8>>3]=i+x*D;h[f+8>>3]=j+y*D;D=+h[8169];y=+h[8170];x=+h[e>>3];if(Dy)){F=385}}else{if(!(xD)){F=385}}do{if((F|0)==385){D=+h[8083];x=+h[8084];y=+h[f>>3];if(Dx){break}else{q=1}return q|0}else{if(yD){break}else{q=1}return q|0}}}while(0);q=0;return q|0}}if(!c){if(!a){D=k-g;y=(t-g)/D;x=(u-g)/D;c=y>x;E=c?y:x;z=c?x:y;y=l-i;x=(v-i)/y;A=(w-i)/y;c=x>A;B=c?x:A;C=c?A:x;x=m-j;A=(s-j)/x;G=(r-j)/x;c=A>G;H=c?A:G;I=c?G:A;A=z>C?z:C;c=I>0.0;n=A>(c?I:0.0);C=n|c^1?n?A:0.0:I;I=EB){q=0;return q|0}h[d>>3]=g+D*C;h[e>>3]=i+y*C;h[f>>3]=j+x*C;h[d+8>>3]=g+D*B;h[e+8>>3]=i+y*B;h[f+8>>3]=j+x*B;B=+h[8255];x=+h[8256];y=+h[d>>3];if(Bx)){F=428}}else{if(!(yB)){F=428}}do{if((F|0)==428){B=+h[8169];y=+h[8170];x=+h[e>>3];if(By){break}}else{if(xB){break}}B=+h[8083];x=+h[8084];y=+h[f>>3];if(Bx){break}else{q=1}return q|0}else{if(yB){break}else{q=1}return q|0}}}while(0);q=0;return q|0}do{if(sr){q=0}else{break}return q|0}else{if(ms){q=0}else{break}return q|0}}while(0);B=k-g;y=(t-g)/B;x=(u-g)/B;c=y>x;D=c?y:x;C=c?x:y;y=l-i;x=(v-i)/y;H=(w-i)/y;c=x>H;I=c?x:H;E=c?H:x;x=C>E?C:E;E=x>0.0?x:0.0;x=DI){q=0;return q|0}h[d>>3]=g+B*E;h[e>>3]=i+y*E;h[f>>3]=j;h[d+8>>3]=g+B*I;h[e+8>>3]=i+y*I;h[f+8>>3]=j;I=+h[8255];y=+h[8256];B=+h[d>>3];if(Iy)){F=420}}else{if(!(BI)){F=420}}do{if((F|0)==420){I=+h[8169];B=+h[8170];y=+h[e>>3];if(IB){break}else{q=1}return q|0}else{if(yI){break}else{q=1}return q|0}}}while(0);q=0;return q|0}c=vw){q=0}else{break}return q|0}else{if(iv){q=0}else{break}return q|0}}while(0);do{if(sr){q=0}else{break}return q|0}else{if(js){q=0}else{break}return q|0}}while(0);do{if(p){if(tk){q=0}else{break}return q|0}else{if(tg){q=0}else{break}return q|0}}while(0);h[d>>3]=t;h[e>>3]=i;h[f>>3]=j;h[d+8>>3]=+h[8256];h[e+8>>3]=i;h[f+8>>3]=j;q=1;return q|0}else{do{if(c){if(lw){q=0}else{break}return q|0}else{if(lv){q=0}else{break}return q|0}}while(0);v=k-g;k=(t-g)/v;t=(u-g)/v;c=k>t;u=c?k:t;l=c?t:k;k=m-j;m=(s-j)/k;s=(r-j)/k;c=m>s;r=c?m:s;t=c?s:m;m=l>t?l:t;t=m>0.0?m:0.0;m=ur){q=0;return q|0}h[d>>3]=g+v*t;h[e>>3]=i;h[f>>3]=j+k*t;h[d+8>>3]=g+v*r;h[e+8>>3]=i;h[f+8>>3]=j+k*r;r=+h[8255];k=+h[8256];j=+h[d>>3];if(rk)){F=408}}else{if(!(jr)){F=408}}do{if((F|0)==408){r=+h[8083];j=+h[8084];k=+h[f>>3];if(rj){break}else{q=1}return q|0}else{if(kr){break}else{q=1}return q|0}}}while(0);q=0;return q|0}return 0}function un(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0.0,E=0.0;g=i;i=i+64|0;j=f;f=i;i=i+16|0;c[f>>2]=c[j>>2];c[f+4>>2]=c[j+4>>2];c[f+8>>2]=c[j+8>>2];c[f+12>>2]=c[j+12>>2];j=g|0;k=g+16|0;l=g+24|0;m=g+32|0;n=g+40|0;o=g+48|0;p=c[e>>2]|0;q=c[e+4>>2]|0;r=e+8|0;s=e+16|0;t=+h[s>>3];u=+h[e+24>>3];v=e+32|0;w=a[v]|0;if((d|0)==0){x=~~(+h[b>>3]*+(c[180]|0))+(c[186]|0)|0;y=~~(+h[b+8>>3]*+(c[40]|0))+(c[46]|0)|0;h[e+48>>3]=+h[b+32>>3];z=j;A=e+40|0;c[z>>2]=c[A>>2];c[z+4>>2]=c[A+4>>2];c[z+8>>2]=c[A+8>>2];c[z+12>>2]=c[A+12>>2];do{if((p|0)!=0){A=c[(c[3524]|0)+92>>2]|0;if(u<0.0){cK[A&63](+h[3817]);break}else{cK[A&63](u);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[s>>3]);s=c[(c[3524]|0)+64>>2]|0;if((q|0)<-5){cM[s&511](-2)}else{cM[s&511](q)}s=c[3524]|0;do{if((a[v]&1)==0){if((c[s+96>>2]&1024|0)!=0){break}c[j>>2]=1;c[j+4>>2]=q;B=516}else{B=516}}while(0);if((B|0)==516){fn(j,s)}s=c[13542]|0;do{if((s|0)!=0){j=(c[s>>2]|0)>(x|0)&1;v=(c[s+4>>2]|0)<(x|0)?j|2:j;j=(c[s+8>>2]|0)>(y|0)?v|4:v;if((((c[s+12>>2]|0)<(y|0)?j|8:j)|0)==0){break}i=g;return}}while(0);cR[c[(c[3524]|0)+80>>2]&127](x,y,c[r>>2]|0);i=g;return}C=+(c[180]|0);y=c[186]|0;x=~~(+h[b>>3]*C)+y|0;D=+(c[40]|0);s=c[46]|0;j=~~(+h[b+8>>3]*D)+s|0;v=~~(C*+h[d>>3])+y|0;y=~~(D*+h[d+8>>3])+s|0;s=c[f>>2]|0;A=c[f+4>>2]|0;if((s|0)==6){E=(+h[b+32>>3]+ +h[d+32>>3])*.5}else{E=+h[f+8>>3]}f=o|0;c[f>>2]=s;s=o+4|0;c[s>>2]=A;h[o+8>>3]=E;do{if((p|0)!=0){A=c[(c[3524]|0)+92>>2]|0;if(u<0.0){cK[A&63](+h[3817]);break}else{cK[A&63](u);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](t);p=c[(c[3524]|0)+64>>2]|0;if((q|0)<-5){cM[p&511](-2)}else{cM[p&511](q)}p=c[3524]|0;do{if((w&1)==0){if((c[p+96>>2]&1024|0)!=0){break}c[f>>2]=1;c[s>>2]=q;B=532}else{B=532}}while(0);if((B|0)==532){fn(o,p)}p=c[r>>2]|0;if((p|0)==(-10|0)){fm(x,j,v,y,1);i=g;return}else if((p|0)==(-11|0)){fm(x,j,v,y,2);i=g;return}else{c[k>>2]=x;c[l>>2]=j;c[m>>2]=v;c[n>>2]=y;y=c[3524]|0;if((fl(k,l,m,n)|0)==0){i=g;return}cN[c[y+56>>2]&255](c[k>>2]|0,c[l>>2]|0);cN[c[y+60>>2]&255](c[m>>2]|0,c[n>>2]|0);i=g;return}}function uo(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0.0,m=0;e=i;i=i+16|0;f=e|0;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(b,0,d);i=e;return}}while(0);g=~~(+h[b>>3]*+(c[180]|0))+(c[186]|0)|0;j=~~(+h[b+8>>3]*+(c[40]|0))+(c[46]|0)|0;h[d+48>>3]=+h[b+32>>3];b=f;k=d+40|0;c[b>>2]=c[k>>2];c[b+4>>2]=c[k+4>>2];c[b+8>>2]=c[k+8>>2];c[b+12>>2]=c[k+12>>2];k=c[d+4>>2]|0;do{if((c[d>>2]|0)!=0){l=+h[d+24>>3];b=c[(c[3524]|0)+92>>2]|0;if(l<0.0){cK[b&63](+h[3817]);break}else{cK[b&63](l);break}}}while(0);cK[c[(c[3524]|0)+112>>2]&63](+h[d+16>>3]);b=c[(c[3524]|0)+64>>2]|0;if((k|0)<-5){cM[b&511](-2)}else{cM[b&511](k)}b=c[3524]|0;do{if((a[d+32|0]&1)==0){if((c[b+96>>2]&1024|0)!=0){break}c[f>>2]=1;c[f+4>>2]=k;m=558}else{m=558}}while(0);if((m|0)==558){fn(f,b)}b=c[13542]|0;do{if((b|0)!=0){f=(c[b>>2]|0)>(g|0)&1;m=(c[b+4>>2]|0)<(g|0)?f|2:f;f=(c[b+8>>2]|0)>(j|0)?m|4:m;if((((c[b+12>>2]|0)<(j|0)?f|8:f)|0)==0){break}i=e;return}}while(0);cR[c[(c[3524]|0)+80>>2]&127](g,j,c[d+8>>2]|0);i=e;return}function up(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0,q=0;e=i;i=i+32|0;f=e|0;g=e+8|0;j=e+16|0;k=e+24|0;do{if((a[38984]&1)!=0){if((a[46752]&1)==0){break}gt(30448,b,d);l=b;c[7612]=c[l>>2];c[7613]=c[l+4>>2];c[7614]=c[l+8>>2];c[7615]=c[l+12>>2];c[7616]=c[l+16>>2];c[7617]=c[l+20>>2];c[7618]=c[l+24>>2];c[7619]=c[l+28>>2];c[7620]=c[l+32>>2];c[7621]=c[l+36>>2];c[7622]=c[l+40>>2];c[7623]=c[l+44>>2];i=e;return}}while(0);if((a[d+32|0]&1)!=0){un(30448,b,d,d+40|0);d=b;c[7612]=c[d>>2];c[7613]=c[d+4>>2];c[7614]=c[d+8>>2];c[7615]=c[d+12>>2];c[7616]=c[d+16>>2];c[7617]=c[d+20>>2];c[7618]=c[d+24>>2];c[7619]=c[d+28>>2];c[7620]=c[d+32>>2];c[7621]=c[d+36>>2];c[7622]=c[d+40>>2];c[7623]=c[d+44>>2];i=e;return}m=+(c[180]|0);d=c[186]|0;n=+(c[40]|0);l=c[46]|0;o=~~(+h[3807]*n)+l|0;p=~~(m*+h[b>>3])+d|0;q=~~(n*+h[b+8>>3])+l|0;c[f>>2]=~~(+h[3806]*m)+d;c[g>>2]=o;c[j>>2]=p;c[k>>2]=q;q=c[3524]|0;if((fl(f,g,j,k)|0)!=0){cN[c[q+56>>2]&255](c[f>>2]|0,c[g>>2]|0);cN[c[q+60>>2]&255](c[j>>2]|0,c[k>>2]|0)}k=b;c[7612]=c[k>>2];c[7613]=c[k+4>>2];c[7614]=c[k+8>>2];c[7615]=c[k+12>>2];c[7616]=c[k+16>>2];c[7617]=c[k+20>>2];c[7618]=c[k+24>>2];c[7619]=c[k+28>>2];c[7620]=c[k+32>>2];c[7621]=c[k+36>>2];c[7622]=c[k+40>>2];c[7623]=c[k+44>>2];i=e;return}function uq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0;e=i;do{if((b|0)==32){uu(c[8776]|0);c[8780]=0;c[8774]=0;c[8776]=0;c[8778]=0;f=582}else if((b|0)==1){if((c[8776]|0)==0){f=582;break}uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=198504,v)|0);return 0}else if((b|0)==4){if((d|0)==0){break}if((a[d]|0)==0){break}g=c[8782]|0;h=(c[8780]|0)-g|0;j=uA(d|0)|0;k=c[8776]|0;l=h+1|0;if((k|0)!=0&(g|0)!=0){uH(k|0,g|0,l|0);n=c[8776]|0}else{n=k}k=j+1|0;g=db(n,k+l|0,131160)|0;c[8776]=g;uH(g+k|0,g|0,l|0);uB(c[8776]|0,d|0);a[(c[8776]|0)+j|0]=58;j=c[8776]|0;c[8782]=j+k;c[8780]=j+(k+h|0);h=a8(j|0,58)|0;if((h|0)==0){break}else{o=h}do{a[o]=0;o=a8(o+1|0,58)|0;}while((o|0)!=0)}else if((b|0)==2){h=c[m>>2]|0;do{if((c[8776]|0)==0){aI(90464,19,1,h|0)}else{aI(116392,13,1,h|0);j=c[8776]|0;k=c[m>>2]|0;if(j>>>0<(c[8782]|0)>>>0){l=j;j=k;while(1){cf(j|0,103640,(v=i,i=i+8|0,c[v>>2]=l,v)|0);g=l+((uA(l|0)|0)+1|0)|0;p=c[m>>2]|0;if(g>>>0<(c[8782]|0)>>>0){l=g;j=p}else{q=p;break}}}else{q=k}aF(10,q|0);if((c[8782]|0)==0){break}j=c[m>>2]|0;aI(96440,30,1,j|0);j=c[8782]|0;l=c[m>>2]|0;if(j>>>0<(c[8780]|0)>>>0){p=j;j=l;while(1){cf(j|0,103640,(v=i,i=i+8|0,c[v>>2]=p,v)|0);g=p+((uA(p|0)|0)+1|0)|0;r=c[m>>2]|0;if(g>>>0<(c[8780]|0)>>>0){p=g;j=r}else{s=r;break}}}else{s=l}aF(10,s|0)}}while(0);cf(c[m>>2]|0,81808,(v=i,i=i+8|0,c[v>>2]=74944,v)|0)}else if((b|0)==16){c[8778]=c[8782];f=603}else if((b|0)==8){f=603}}while(0);if((f|0)==582){b=bU(148328)|0;do{if((b|0)==0){t=0}else{s=uA(b|0)|0;q=bP(b|0)|0;c[8776]=q;c[8780]=q+s;s=a8(q|0,58)|0;if((s|0)==0){t=q;break}else{u=s}do{a[u]=0;u=a8(u+1|0,58)|0;}while((u|0)!=0);t=c[8776]|0}}while(0);c[8782]=t}else if((f|0)==603){f=c[8776]|0;if((f|0)==0){w=0;i=e;return w|0}t=c[8774]|0;do{if((t|0)==0){c[8774]=f;u=c[8778]|0;if((u|0)!=0){x=f;y=u;break}u=c[8780]|0;c[8778]=u;x=f;y=u}else{u=t+((uA(t|0)|0)+1|0)|0;c[8774]=u;x=u;y=c[8778]|0}}while(0);if(x>>>0>>0){w=x;i=e;return w|0}c[8774]=0;c[8778]=0;w=0;i=e;return w|0}w=c[8776]|0;i=e;return w|0}function ur(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;e=i;i=i+256|0;f=e|0;if(!(a[42184]|0)){a[42184]=1;ur(1,0)}do{if((b|0)==32){uu(c[10554]|0);c[10552]=0;c[10548]=0;c[10554]=0;c[10550]=0;g=622}else if((b|0)==1){if((c[10554]|0)==0){g=622;break}uf(-1,113648,(v=i,i=i+8|0,c[v>>2]=222176,v)|0);return 0}else if((b|0)==4){if((d|0)==0){break}if((a[d]|0)==0){break}h=c[10556]|0;j=(c[10552]|0)-h|0;k=uA(d|0)|0;l=c[10554]|0;n=j+1|0;if((l|0)!=0&(h|0)!=0){uH(l|0,h|0,n|0);o=c[10554]|0}else{o=l}l=k+1|0;h=db(o,l+n|0,199664)|0;c[10554]=h;uH(h+l|0,h|0,n|0);uB(c[10554]|0,d|0);a[(c[10554]|0)+k|0]=58;k=c[10554]|0;c[10556]=k+l;c[10552]=k+(l+j|0);j=a8(k|0,58)|0;if((j|0)==0){break}else{p=j}do{a[p]=0;p=a8(p+1|0,58)|0;}while((p|0)!=0)}else if((b|0)==2){j=c[m>>2]|0;if((c[10554]|0)==0){aI(174752,19,1,j|0);break}aI(184128,13,1,j|0);j=c[10554]|0;k=c[m>>2]|0;if(j>>>0<(c[10556]|0)>>>0){l=j;j=k;while(1){cf(j|0,103640,(v=i,i=i+8|0,c[v>>2]=l,v)|0);n=l+((uA(l|0)|0)+1|0)|0;h=c[m>>2]|0;if(n>>>0<(c[10556]|0)>>>0){l=n;j=h}else{q=h;break}}}else{q=k}aF(10,q|0);if((c[10556]|0)==0){break}aI(178936,20,1,c[m>>2]|0);j=c[10556]|0;l=c[m>>2]|0;if(j>>>0<(c[10552]|0)>>>0){h=j;j=l;while(1){cf(j|0,103640,(v=i,i=i+8|0,c[v>>2]=h,v)|0);n=h+((uA(h|0)|0)+1|0)|0;r=c[m>>2]|0;if(n>>>0<(c[10552]|0)>>>0){h=n;j=r}else{s=r;break}}}else{s=l}aF(10,s|0)}else if((b|0)==16){c[10550]=c[10556];g=683}else if((b|0)==8){g=683}}while(0);if((g|0)==683){b=c[10554]|0;if((b|0)==0){t=0;i=e;return t|0}s=c[10548]|0;do{if((s|0)==0){c[10548]=b;q=c[10550]|0;if((q|0)!=0){u=b;w=q;break}q=c[10552]|0;c[10550]=q;u=b;w=q}else{q=s+((uA(s|0)|0)+1|0)|0;c[10548]=q;u=q;w=c[10550]|0}}while(0);if(u>>>0>>0){t=u;i=e;return t|0}c[10548]=0;c[10550]=0;t=0;i=e;return t|0}if((g|0)==622){u=bU(215376)|0;do{if((u|0)==0){w=f|0;s=42160;b=137720;L863:while(1){q=bP(b|0)|0;while(1){p=aQ(q|0,209688)|0;if((p|0)!=0){d=p+2|0;o=a8(d|0,41)|0;a[o]=0;j=bU(d|0)|0;a[o]=41;d=(j|0)!=0;if(d){x=uA(j|0)|0}else{x=0}h=((p+((uA(q|0)|0)+x|0)|0)-o|0)+1|0;k=ut(h)|0;if((k|0)==0){gk();r=ut(h)|0;if((r|0)==0){g=633;break L863}else{y=r}}else{y=k}k=p-q|0;uF(y|0,q|0,k|0);if(d){d=y+k|0;uB(d|0,j|0)}j=y+(x+k|0)|0;k=o+1|0;uB(j|0,k|0);uu(q);q=y;continue}k=aQ(q|0,204200)|0;if((k|0)==0){break}j=k+2|0;o=a8(j|0,96)|0;a[o]=0;if(!(a[14168]|0)){g=638;break L863}d=bt(j|0,193632)|0;if((d|0)!=0){a6(w|0,255,d|0);j=f+((uA(w|0)|0)-1|0)|0;if((a[j]|0)==10){a[j]=0}a2(d|0)}a[o]=96;d=uA(w|0)|0;j=((k+((uA(q|0)|0)+d|0)|0)-o|0)+1|0;p=ut(j)|0;if((p|0)==0){gk();r=ut(j)|0;if((r|0)==0){g=645;break L863}else{z=r}}else{z=p}p=k-q|0;uF(z|0,q|0,p|0);if((a[w]|0)!=0){k=z+p|0;uB(k|0,w|0)}uB(z+(d+p|0)|0,o+1|0);uu(q);q=z}o=q+((uA(q|0)|0)-1|0)|0;if((a[o]|0)==33){a[o]=0;A=1}else{A=0}o=aW(q|0)|0;if((o|0)!=0){bR(o|0);if(A){a[q+(uA(q|0)|0)|0]=33}o=uA(q|0)|0;p=c[10554]|0;if((p|0)==0){d=o+1|0;k=ut(d)|0;if((k|0)==0){gk();r=ut(d)|0;if((r|0)==0){g=658;break}else{B=r}}else{B=k}c[10554]=B;c[10552]=B;C=B}else{k=uA(p|0)|0;r=db(p,(o+2|0)+k|0,199664)|0;c[10554]=r;p=r+k|0;c[10552]=p;a[p]=58;p=(c[10552]|0)+1|0;c[10552]=p;a[p]=0;C=c[10552]|0}uB(C|0,q|0);c[10552]=(c[10552]|0)+o}o=s+4|0;if((q|0)!=0){uu(q)}p=c[o>>2]|0;if((p|0)==0){g=664;break}else{s=o;b=p}}if((g|0)==633){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=199664,v)|0);return 0}else if((g|0)==638){uf(-1,145320,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}else if((g|0)==645){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=199664,v)|0);return 0}else if((g|0)==658){uf(-1,225296,(v=i,i=i+8|0,c[v>>2]=199664,v)|0);return 0}else if((g|0)==664){b=c[10554]|0;if((b|0)==0){break}s=a8(b|0,58)|0;if((s|0)==0){break}else{D=s}do{a[D]=0;D=a8(D+1|0,58)|0;}while((D|0)!=0)}}else{s=uA(u|0)|0;b=bP(u|0)|0;c[10554]=b;c[10552]=b+s;s=a8(b|0,58)|0;if((s|0)==0){break}else{E=s}do{a[E]=0;E=a8(E+1|0,58)|0;}while((E|0)!=0)}}while(0);c[10556]=c[10554]}t=c[10554]|0;i=e;return t|0}function us(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+48|0;e=d|0;if((a|0)==32|(a|0)==1){uu(c[12908]|0);bA(5,179864);bA(2,179864);f=bA(5,0)|0;if((f|0)==0){g=0}else{g=bP(f|0)|0}c[12908]=g;h=c[12908]|0;i=d;return h|0}else if((a|0)==4){if((bA(5,b|0)|0)==0){uf(c[13898]|0,166696,(v=i,i=i+1|0,i=i+7>>3<<3,c[v>>2]=0,v)|0);return 0}uu(c[12908]|0);b=bA(5,0)|0;if((b|0)==0){j=0}else{j=bP(b|0)|0}c[12908]=j;j=e+24|0;uE(e|0,0,44);bw(40936,32,161480,e|0);bw(72464,8,153384,e|0);c[j>>2]=1;bw(40968,32,161480,e|0);bw(72472,8,153384,e|0);c[j>>2]=2;bw(41e3,32,161480,e|0);bw(72480,8,153384,e|0);c[j>>2]=3;bw(41032,32,161480,e|0);bw(72488,8,153384,e|0);c[j>>2]=4;bw(41064,32,161480,e|0);bw(72496,8,153384,e|0);c[j>>2]=5;bw(41096,32,161480,e|0);bw(72504,8,153384,e|0);c[j>>2]=6;bw(41128,32,161480,e|0);bw(72512,8,153384,e|0);j=e+16|0;b=0;do{c[j>>2]=b;bw(40552+(b<<5)|0,32,150680,e|0);bw(72368+(b<<3)|0,8,148784,e|0);b=b+1|0;}while((b|0)<12);h=c[12908]|0;i=d;return h|0}else if((a|0)==2){a=c[m>>2]|0;b=bA(2,0)|0;cf(a|0,146672,(v=i,i=i+8|0,c[v>>2]=b,v)|0);cf(c[m>>2]|0,144576,(v=i,i=i+8|0,c[v>>2]=c[44936+(c[11252]<<2)>>2],v)|0);b=c[m>>2]|0;a=bA(5,0)|0;cf(b|0,142976,(v=i,i=i+8|0,c[v>>2]=a,v)|0);a=c[8270]|0;cf(c[m>>2]|0,141432,(v=i,i=i+8|0,c[v>>2]=(a|0)!=0?a:139696,v)|0);h=c[12908]|0;i=d;return h|0}else{h=c[12908]|0;i=d;return h|0}return 0} -function ut(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0;do{if(a>>>0<245){if(a>>>0<11){b=16}else{b=a+11&-8}d=b>>>3;e=c[56330]|0;f=e>>>(d>>>0);if((f&3|0)!=0){g=(f&1^1)+d|0;h=g<<1;i=225360+(h<<2)|0;j=225360+(h+2<<2)|0;h=c[j>>2]|0;k=h+8|0;l=c[k>>2]|0;do{if((i|0)==(l|0)){c[56330]=e&(1<>>0<(c[56334]|0)>>>0){ce();return 0;return 0}m=l+12|0;if((c[m>>2]|0)==(h|0)){c[m>>2]=i;c[j>>2]=l;break}else{ce();return 0;return 0}}}while(0);l=g<<3;c[h+4>>2]=l|3;j=h+(l|4)|0;c[j>>2]=c[j>>2]|1;n=k;return n|0}if(b>>>0<=(c[56332]|0)>>>0){o=b;break}if((f|0)!=0){j=2<>>12&16;i=j>>>(l>>>0);j=i>>>5&8;m=i>>>(j>>>0);i=m>>>2&4;p=m>>>(i>>>0);m=p>>>1&2;q=p>>>(m>>>0);p=q>>>1&1;r=(j|l|i|m|p)+(q>>>(p>>>0))|0;p=r<<1;q=225360+(p<<2)|0;m=225360+(p+2<<2)|0;p=c[m>>2]|0;i=p+8|0;l=c[i>>2]|0;do{if((q|0)==(l|0)){c[56330]=e&(1<>>0<(c[56334]|0)>>>0){ce();return 0;return 0}j=l+12|0;if((c[j>>2]|0)==(p|0)){c[j>>2]=q;c[m>>2]=l;break}else{ce();return 0;return 0}}}while(0);l=r<<3;m=l-b|0;c[p+4>>2]=b|3;q=p;e=q+b|0;c[q+(b|4)>>2]=m|1;c[q+l>>2]=m;l=c[56332]|0;if((l|0)!=0){q=c[56335]|0;d=l>>>3;l=d<<1;f=225360+(l<<2)|0;k=c[56330]|0;h=1<>2]|0;if(g>>>0>=(c[56334]|0)>>>0){s=g;t=d;break}ce();return 0;return 0}}while(0);c[t>>2]=q;c[s+12>>2]=q;c[q+8>>2]=s;c[q+12>>2]=f}c[56332]=m;c[56335]=e;n=i;return n|0}l=c[56331]|0;if((l|0)==0){o=b;break}h=(l&-l)-1|0;l=h>>>12&16;k=h>>>(l>>>0);h=k>>>5&8;p=k>>>(h>>>0);k=p>>>2&4;r=p>>>(k>>>0);p=r>>>1&2;d=r>>>(p>>>0);r=d>>>1&1;g=c[225624+((h|l|k|p|r)+(d>>>(r>>>0))<<2)>>2]|0;r=g;d=g;p=(c[g+4>>2]&-8)-b|0;while(1){g=c[r+16>>2]|0;if((g|0)==0){k=c[r+20>>2]|0;if((k|0)==0){break}else{u=k}}else{u=g}g=(c[u+4>>2]&-8)-b|0;k=g>>>0

- - - - -
- - - - - - - - -
- - - - - - - - - - - - - - -
- -
- - -
-

- - Instructions - -

-
-
    -
  1. - Run V8 with - --prof --log-timer-events, - or alternatively,
    - Chrome with - - --no-sandbox --js-flags="--prof --log-timer-events" - to produce v8.log. -
  2. -
  3. - Open - v8.log - on this page. Don't worry, it won't be uploaded anywhere. -
  4. -
  5. - Click "Start" to start number crunching. This will take a while. -
  6. -
  7. - Click "Show plot/profile" to switch between the statistical profile and - the timeline plot.
    - C++ items are missing in the statistical profile because symbol - information is not available.
    - Consider using the - - command-line utility - instead. -
  8. -
- If you expect multiple V8 instances to run concurrently, for example - with several tabs in Chrome,
- add the V8 flag --logfile=v8.%p.log - so that each instance writes to its own log file. -
-
- -
-

- - Credits - -

-
- -
-
- -
- - diff --git a/deps/v8/tools/profviz/profviz.js b/deps/v8/tools/profviz/profviz.js deleted file mode 100644 index a7593a6f65f31f..00000000000000 --- a/deps/v8/tools/profviz/profviz.js +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright 2013 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -var worker_scripts = [ - "../csvparser.js", - "../splaytree.js", - "../codemap.js", - "../consarray.js", - "../profile.js", - "../profile_view.js", - "../logreader.js", - "../arguments.js", - "../tickprocessor.js", - "composer.js", - "gnuplot-4.6.3-emscripten.js" -]; - - -function plotWorker() { - var worker = null; - - function initialize() { - ui.freeze(); - worker = new Worker("worker.js"); - running = false; - - worker.postMessage({ "call" : "load scripts", - "args" : worker_scripts }); - - worker.addEventListener("message", function(event) { - var call = delegateList[event.data["call"]]; - call(event.data["args"]); - }); - } - - function scriptLoaded() { - ui.thaw(); - } - - // Public methods. - this.run = function(filename, - resx, resy, - distortion, - range_start, range_end) { - var args = { - 'file' : filename, - 'resx' : resx, - 'resy' : resy, - 'distortion' : distortion, - 'range_start' : range_start, - 'range_end' : range_end - } - worker.postMessage({ 'call' : 'run', 'args' : args }); - } - - this.reset = function() { - if (worker) worker.terminate(); - initialize(); - } - - var delegateList = { - "log" : log, - "error" : logError, - "displayplot" : displayplot, - "displayprof" : displayprof, - "range" : setRange, - "script" : scriptLoaded, - "reset" : this.reset - } -} - - -function UIWrapper() { - var input_elements = ["range_start", - "range_end", - "distortion", - "start", - "file"]; - - var other_elements = ["log", - "plot", - "prof", - "instructions", - "credits", - "toggledisplay"]; - - for (var i in input_elements) { - var id = input_elements[i]; - this[id] = document.getElementById(id); - } - - for (var i in other_elements) { - var id = other_elements[i]; - this[id] = document.getElementById(id); - } - - this.freeze = function() { - this.plot.style.webkitFilter = "grayscale(1)"; - this.prof.style.color = "#bbb"; - for (var i in input_elements) { - this[input_elements[i]].disabled = true; - } - } - - this.thaw = function() { - this.plot.style.webkitFilter = ""; - this.prof.style.color = "#000"; - for (var i in input_elements) { - this[input_elements[i]].disabled = false; - } - } - - this.reset = function() { - this.thaw(); - this.log.value = ""; - this.range_start.value = "automatic"; - this.range_end.value = "automatic"; - this.toggle("plot"); - this.plot.src = ""; - this.prof.value = ""; - } - - this.toggle = function(mode) { - if (mode) this.toggledisplay.next_mode = mode; - if (this.toggledisplay.next_mode == "plot") { - this.toggledisplay.next_mode = "prof"; - this.plot.style.display = "block"; - this.prof.style.display = "none"; - this.toggledisplay.innerHTML = "Show profile"; - } else { - this.toggledisplay.next_mode = "plot"; - this.plot.style.display = "none"; - this.prof.style.display = "block"; - this.toggledisplay.innerHTML = "Show plot"; - } - } - - this.info = function(field) { - var down_arrow = "\u25bc"; - var right_arrow = "\u25b6"; - if (field && this[field].style.display != "none") field = null; // Toggle. - this.credits.style.display = "none"; - this.instructions.style.display = "none"; - if (!field) return; - this[field].style.display = "block"; - } -} - - -function log(text) { - ui.log.value += text; - ui.log.scrollTop = ui.log.scrollHeight; -} - - -function logError(text) { - if (ui.log.value.length > 0 && - ui.log.value[ui.log.value.length-1] != "\n") { - ui.log.value += "\n"; - } - ui.log.value += "ERROR: " + text + "\n"; - ui.log.scrollTop = ui.log.scrollHeight; - error_logged = true; -} - - -function displayplot(args) { - if (error_logged) { - log("Plot failed.\n\n"); - } else { - log("Displaying plot. Total time: " + - (Date.now() - timer) / 1000 + "ms.\n\n"); - var blob = new Blob([new Uint8Array(args.contents).buffer], - { "type" : "image\/svg+xml" }); - window.URL = window.URL || window.webkitURL; - ui.plot.src = window.URL.createObjectURL(blob); - } - - ui.thaw(); - ui.toggle("plot"); -} - - -function displayprof(args) { - if (error_logged) return; - ui.prof.value = args; - this.prof.style.color = ""; - ui.toggle("prof"); -} - - -function start(event) { - error_logged = false; - ui.freeze(); - - try { - var file = getSelectedFile(); - var distortion = getDistortion(); - var range = getRange(); - } catch (e) { - logError(e.message); - display(); - return; - } - - timer = Date.now(); - worker.run(file, kResX, kResY, distortion, range[0], range[1]); -} - - -function getSelectedFile() { - var file = ui.file.files[0]; - if (!file) throw Error("No valid file selected."); - return file; -} - - -function getDistortion() { - var input_distortion = - parseInt(ui.distortion.value, 10); - if (isNaN(input_distortion)) { - input_distortion = ui.distortion.value = 4500; - } - return input_distortion / 1000000; -} - - -function getRange() { - var input_start = - parseInt(ui.range_start.value, 10); - if (isNaN(input_start)) input_start = undefined; - var input_end = - parseInt(ui.range_end.value, 10); - if (isNaN(input_end)) input_end = undefined; - return [input_start, input_end]; -} - - -function setRange(args) { - ui.range_start.value = args.start.toFixed(1); - ui.range_end.value = args.end.toFixed(1); -} - - -function onload() { - kResX = 1200; - kResY = 600; - error_logged = false; - ui = new UIWrapper(); - ui.reset(); - ui.info(null); - worker = new plotWorker(); - worker.reset(); -} - - -var kResX; -var kResY; -var error_logged; -var ui; -var worker; -var timer; diff --git a/deps/v8/tools/profviz/stdio.js b/deps/v8/tools/profviz/stdio.js deleted file mode 100644 index 8ba12e3ce758a0..00000000000000 --- a/deps/v8/tools/profviz/stdio.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2013 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -var processor = new ArgumentsProcessor(arguments); -var distortion_per_entry = 0; -var range_start_override = undefined; -var range_end_override = undefined; - -if (!processor.parse()) processor.printUsageAndExit(); -var result = processor.result(); -var distortion = parseInt(result.distortion); -if (isNaN(distortion)) processor.printUsageAndExit(); -// Convert picoseconds to milliseconds. -distortion_per_entry = distortion / 1000000; -var rangelimits = result.range.split(","); -var range_start = parseInt(rangelimits[0]); -var range_end = parseInt(rangelimits[1]); -if (!isNaN(range_start)) range_start_override = range_start; -if (!isNaN(range_end)) range_end_override = range_end; - -var kResX = 1600; -var kResY = 600; -function log_error(text) { - print(text); - quit(1); -} -var psc = new PlotScriptComposer(kResX, kResY, log_error); -psc.collectData(readline, distortion_per_entry); -psc.findPlotRange(range_start_override, range_end_override); -print("set terminal pngcairo size " + kResX + "," + kResY + - " enhanced font 'Helvetica,10'"); -psc.assembleOutput(print); diff --git a/deps/v8/tools/profviz/worker.js b/deps/v8/tools/profviz/worker.js deleted file mode 100644 index 95ed40b89bab3b..00000000000000 --- a/deps/v8/tools/profviz/worker.js +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright 2013 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -var delegateList = { - "load scripts" : load_scripts, - "run" : run, -} - -self.addEventListener("message", function(event) { - var call = delegateList[event.data["call"]]; - var result = call(event.data["args"]); -}, false); - - -function log(text) { - self.postMessage({ "call" : "log", "args" : text }); -} - - -function displayplot(content) { - self.postMessage({ "call" : "displayplot", "args" : content}); -} - - -function displayprof(content) { - self.postMessage({ "call" : "displayprof", "args" : content}); -} - - -function setRange(start, end) { - self.postMessage({ "call" : "range", - "args" : { "start" : start, "end" : end } }); -} - - -function time(name, fun) { - log(name + "..."); - var start = Date.now(); - fun(); - log(" took " + (Date.now() - start) / 1000 + "s.\n"); -} - - -function load_scripts(scripts) { - time("Loading scripts", - function() { for (var i in scripts) importScripts(scripts[i]); }); - self.postMessage({ "call" : "script" }); -} - - -function log_error(text) { - self.postMessage({"call": "error", "args": text}); - self.postMessage({"call": "reset"}); -} - - -function run(args) { - var file = args["file"]; - var resx = args["resx"]; - var resy = args["resy"]; - var distortion = args["distortion"]; - var range_start_override = args["range_start"]; - var range_end_override = args["range_end"]; - - var reader = new FileReaderSync(); - var content_lines; - - time("Reading log file (" + (file.size / 1024).toFixed(1) + " kB)", - function() { - var content = reader.readAsText(file); - content_lines = content.split("\n"); - }); - - time("Producing statistical profile", - function() { - var profile = ""; - print = function(text) { profile += text + "\n"; }; - // Dummy entries provider, as we cannot call nm. - var entriesProvider = new UnixCppEntriesProvider("", "", ""); - var targetRootFS = ""; - var separateIc = false; - var callGraphSize = 5; - var ignoreUnknown = true; - var stateFilter = null; - var range = range_start_override + "," + range_end_override; - - var tickProcessor = new TickProcessor(entriesProvider, - separateIc, - callGraphSize, - ignoreUnknown, - stateFilter, - distortion, - range); - for (var i = 0; i < content_lines.length; i++) { - tickProcessor.processLogLine(content_lines[i]); - } - tickProcessor.printStatistics(); - displayprof(profile); - }); - - var input_file_name = "input_temp"; - var output_file_name = "output.svg"; - - var psc = new PlotScriptComposer(resx, resy, log_error); - var objects = 0; - - time("Collecting events (" + content_lines.length + " entries)", - function() { - var line_cursor = 0; - var input = function() { return content_lines[line_cursor++]; }; - psc.collectData(input, distortion); - psc.findPlotRange(range_start_override, - range_end_override, - setRange); - }); - - time("Assembling plot script", - function() { - var plot_script = ""; - var output = function(text) { plot_script += text + "\n"; }; - output("set terminal svg size " + resx + "," + resy + - " enhanced font \"Helvetica,10\""); - output("set output \""+ output_file_name + "\""); - objects = psc.assembleOutput(output); - if (FS.findObject(input_file_name)) { - FS.deleteFile(input_file_name); - } - var arrc = Module["intArrayFromString"](plot_script, true); - FS.createDataFile("/", input_file_name, arrc); - }); - - time("Running gnuplot (" + objects + " objects)", - function() { Module.run([input_file_name]); }); - - displayplot(FS.findObject(output_file_name)); -} - - -var Module = { - "noInitialRun": true, - print: function(text) { - self.postMessage({"call": "error", "args": text}); - }, - printErr: function(text) { - self.postMessage({"call": "error", "args": text}); - }, -}; diff --git a/deps/v8/tools/sourcemap.mjs b/deps/v8/tools/sourcemap.mjs new file mode 100644 index 00000000000000..77af4133cfeaa8 --- /dev/null +++ b/deps/v8/tools/sourcemap.mjs @@ -0,0 +1,382 @@ +// Copyright 2013 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// This is a copy from blink dev tools, see: +// http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/SourceMap.js +// revision: 153407 + +// Added to make the file work without dev tools +export const WebInspector = {}; +WebInspector.ParsedURL = {}; +WebInspector.ParsedURL.completeURL = function(){}; +// start of original file content + +/* + * Copyright (C) 2012 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * Implements Source Map V3 model. See http://code.google.com/p/closure-compiler/wiki/SourceMaps + * for format description. + * @constructor + * @param {string} sourceMappingURL + * @param {SourceMapV3} payload + */ +WebInspector.SourceMap = function(sourceMappingURL, payload) +{ + if (!WebInspector.SourceMap.prototype._base64Map) { + const base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + WebInspector.SourceMap.prototype._base64Map = {}; + for (var i = 0; i < base64Digits.length; ++i) + WebInspector.SourceMap.prototype._base64Map[base64Digits.charAt(i)] = i; + } + + this._sourceMappingURL = sourceMappingURL; + this._reverseMappingsBySourceURL = {}; + this._mappings = []; + this._sources = {}; + this._sourceContentByURL = {}; + this._parseMappingPayload(payload); +} + +/** + * @param {string} sourceMapURL + * @param {string} compiledURL + * @param {function(WebInspector.SourceMap)} callback + */ +WebInspector.SourceMap.load = function(sourceMapURL, compiledURL, callback) +{ + NetworkAgent.loadResourceForFrontend(WebInspector.resourceTreeModel.mainFrame.id, sourceMapURL, undefined, contentLoaded.bind(this)); + + /** + * @param {?Protocol.Error} error + * @param {number} statusCode + * @param {NetworkAgent.Headers} headers + * @param {string} content + */ + function contentLoaded(error, statusCode, headers, content) + { + if (error || !content || statusCode >= 400) { + console.error("Could not load content for " + sourceMapURL + " : " + (error || ("HTTP status code: " + statusCode))); + callback(null); + return; + } + + if (content.slice(0, 3) === ")]}") + content = content.substring(content.indexOf('\n')); + try { + var payload = /** @type {SourceMapV3} */ (JSON.parse(content)); + var baseURL = sourceMapURL.startsWith("data:") ? compiledURL : sourceMapURL; + callback(new WebInspector.SourceMap(baseURL, payload)); + } catch(e) { + console.error(e.message); + callback(null); + } + } +} + +WebInspector.SourceMap.prototype = { + /** + * @return {Array.} + */ + sources: function() + { + return Object.keys(this._sources); + }, + + /** + * @param {string} sourceURL + * @return {string|undefined} + */ + sourceContent: function(sourceURL) + { + return this._sourceContentByURL[sourceURL]; + }, + + /** + * @param {string} sourceURL + * @param {WebInspector.ResourceType} contentType + * @return {WebInspector.ContentProvider} + */ + sourceContentProvider: function(sourceURL, contentType) + { + var lastIndexOfDot = sourceURL.lastIndexOf("."); + var extension = lastIndexOfDot !== -1 ? sourceURL.substr(lastIndexOfDot + 1) : ""; + var mimeType = WebInspector.ResourceType.mimeTypesForExtensions[extension.toLowerCase()]; + var sourceContent = this.sourceContent(sourceURL); + if (sourceContent) + return new WebInspector.StaticContentProvider(contentType, sourceContent, mimeType); + return new WebInspector.CompilerSourceMappingContentProvider(sourceURL, contentType, mimeType); + }, + + /** + * @param {SourceMapV3} mappingPayload + */ + _parseMappingPayload: function(mappingPayload) + { + if (mappingPayload.sections) + this._parseSections(mappingPayload.sections); + else + this._parseMap(mappingPayload, 0, 0); + }, + + /** + * @param {Array.} sections + */ + _parseSections: function(sections) + { + for (var i = 0; i < sections.length; ++i) { + var section = sections[i]; + this._parseMap(section.map, section.offset.line, section.offset.column); + } + }, + + /** + * @param {number} lineNumber in compiled resource + * @param {number} columnNumber in compiled resource + * @return {?Array} + */ + findEntry: function(lineNumber, columnNumber) + { + var first = 0; + var count = this._mappings.length; + while (count > 1) { + var step = count >> 1; + var middle = first + step; + var mapping = this._mappings[middle]; + if (lineNumber < mapping[0] || (lineNumber === mapping[0] && columnNumber < mapping[1])) + count = step; + else { + first = middle; + count -= step; + } + } + var entry = this._mappings[first]; + if (!first && entry && (lineNumber < entry[0] || (lineNumber === entry[0] && columnNumber < entry[1]))) + return null; + return entry; + }, + + /** + * @param {string} sourceURL of the originating resource + * @param {number} lineNumber in the originating resource + * @return {Array} + */ + findEntryReversed: function(sourceURL, lineNumber) + { + var mappings = this._reverseMappingsBySourceURL[sourceURL]; + for ( ; lineNumber < mappings.length; ++lineNumber) { + var mapping = mappings[lineNumber]; + if (mapping) + return mapping; + } + return this._mappings[0]; + }, + + /** + * @override + */ + _parseMap: function(map, lineNumber, columnNumber) + { + var sourceIndex = 0; + var sourceLineNumber = 0; + var sourceColumnNumber = 0; + var nameIndex = 0; + + var sources = []; + var originalToCanonicalURLMap = {}; + for (var i = 0; i < map.sources.length; ++i) { + var originalSourceURL = map.sources[i]; + var sourceRoot = map.sourceRoot || ""; + if (sourceRoot && !sourceRoot.endsWith("/")) + sourceRoot += "/"; + var href = sourceRoot + originalSourceURL; + var url = WebInspector.ParsedURL.completeURL(this._sourceMappingURL, href) || href; + originalToCanonicalURLMap[originalSourceURL] = url; + sources.push(url); + this._sources[url] = true; + + if (map.sourcesContent && map.sourcesContent[i]) + this._sourceContentByURL[url] = map.sourcesContent[i]; + } + + var stringCharIterator = new WebInspector.SourceMap.StringCharIterator(map.mappings); + var sourceURL = sources[sourceIndex]; + + while (true) { + if (stringCharIterator.peek() === ",") + stringCharIterator.next(); + else { + while (stringCharIterator.peek() === ";") { + lineNumber += 1; + columnNumber = 0; + stringCharIterator.next(); + } + if (!stringCharIterator.hasNext()) + break; + } + + columnNumber += this._decodeVLQ(stringCharIterator); + if (this._isSeparator(stringCharIterator.peek())) { + this._mappings.push([lineNumber, columnNumber]); + continue; + } + + var sourceIndexDelta = this._decodeVLQ(stringCharIterator); + if (sourceIndexDelta) { + sourceIndex += sourceIndexDelta; + sourceURL = sources[sourceIndex]; + } + sourceLineNumber += this._decodeVLQ(stringCharIterator); + sourceColumnNumber += this._decodeVLQ(stringCharIterator); + if (!this._isSeparator(stringCharIterator.peek())) + nameIndex += this._decodeVLQ(stringCharIterator); + + this._mappings.push([lineNumber, columnNumber, sourceURL, sourceLineNumber, sourceColumnNumber]); + } + + for (var i = 0; i < this._mappings.length; ++i) { + var mapping = this._mappings[i]; + var url = mapping[2]; + if (!url) + continue; + if (!this._reverseMappingsBySourceURL[url]) + this._reverseMappingsBySourceURL[url] = []; + var reverseMappings = this._reverseMappingsBySourceURL[url]; + var sourceLine = mapping[3]; + if (!reverseMappings[sourceLine]) + reverseMappings[sourceLine] = [mapping[0], mapping[1]]; + } + }, + + /** + * @param {string} char + * @return {boolean} + */ + _isSeparator: function(char) + { + return char === "," || char === ";"; + }, + + /** + * @param {WebInspector.SourceMap.StringCharIterator} stringCharIterator + * @return {number} + */ + _decodeVLQ: function(stringCharIterator) + { + // Read unsigned value. + var result = 0; + var shift = 0; + do { + var digit = this._base64Map[stringCharIterator.next()]; + result += (digit & this._VLQ_BASE_MASK) << shift; + shift += this._VLQ_BASE_SHIFT; + } while (digit & this._VLQ_CONTINUATION_MASK); + + // Fix the sign. + var negative = result & 1; + // Use unsigned right shift, so that the 32nd bit is properly shifted + // to the 31st, and the 32nd becomes unset. + result >>>= 1; + if (negate) { + // We need to OR 0x80000000 here to ensure the 32nd bit (the sign bit + // in a 32bit int) is always set for negative numbers. If `result` + // were 1, (meaning `negate` is true and all other bits were zeros), + // `result` would now be 0. But -0 doesn't flip the 32nd bit as + // intended. All other numbers will successfully set the 32nd bit + // without issue, so doing this is a noop for them. + return -result | 0x80000000; + } + return result; + }, + + _VLQ_BASE_SHIFT: 5, + _VLQ_BASE_MASK: (1 << 5) - 1, + _VLQ_CONTINUATION_MASK: 1 << 5 +} + +/** + * @constructor + * @param {string} string + */ +WebInspector.SourceMap.StringCharIterator = function(string) +{ + this._string = string; + this._position = 0; +} + +WebInspector.SourceMap.StringCharIterator.prototype = { + /** + * @return {string} + */ + next: function() + { + return this._string.charAt(this._position++); + }, + + /** + * @return {string} + */ + peek: function() + { + return this._string.charAt(this._position); + }, + + /** + * @return {boolean} + */ + hasNext: function() + { + return this._position < this._string.length; + } +} diff --git a/deps/v8/tools/splaytree.mjs b/deps/v8/tools/splaytree.mjs new file mode 100644 index 00000000000000..867274a787eeb8 --- /dev/null +++ b/deps/v8/tools/splaytree.mjs @@ -0,0 +1,327 @@ +// Copyright 2009 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +/** + * Constructs a Splay tree. A splay tree is a self-balancing binary + * search tree with the additional property that recently accessed + * elements are quick to access again. It performs basic operations + * such as insertion, look-up and removal in O(log(n)) amortized time. + * + * @constructor + */ +export function SplayTree() { +}; + + +/** + * Pointer to the root node of the tree. + * + * @type {SplayTree.Node} + * @private + */ +SplayTree.prototype.root_ = null; + + +/** + * @return {boolean} Whether the tree is empty. + */ +SplayTree.prototype.isEmpty = function() { + return !this.root_; +}; + + + +/** + * Inserts a node into the tree with the specified key and value if + * the tree does not already contain a node with the specified key. If + * the value is inserted, it becomes the root of the tree. + * + * @param {number} key Key to insert into the tree. + * @param {*} value Value to insert into the tree. + */ +SplayTree.prototype.insert = function(key, value) { + if (this.isEmpty()) { + this.root_ = new SplayTree.Node(key, value); + return; + } + // Splay on the key to move the last node on the search path for + // the key to the root of the tree. + this.splay_(key); + if (this.root_.key == key) { + return; + } + var node = new SplayTree.Node(key, value); + if (key > this.root_.key) { + node.left = this.root_; + node.right = this.root_.right; + this.root_.right = null; + } else { + node.right = this.root_; + node.left = this.root_.left; + this.root_.left = null; + } + this.root_ = node; +}; + + +/** + * Removes a node with the specified key from the tree if the tree + * contains a node with this key. The removed node is returned. If the + * key is not found, an exception is thrown. + * + * @param {number} key Key to find and remove from the tree. + * @return {SplayTree.Node} The removed node. + */ +SplayTree.prototype.remove = function(key) { + if (this.isEmpty()) { + throw Error('Key not found: ' + key); + } + this.splay_(key); + if (this.root_.key != key) { + throw Error('Key not found: ' + key); + } + var removed = this.root_; + if (!this.root_.left) { + this.root_ = this.root_.right; + } else { + var right = this.root_.right; + this.root_ = this.root_.left; + // Splay to make sure that the new root has an empty right child. + this.splay_(key); + // Insert the original right child as the right child of the new + // root. + this.root_.right = right; + } + return removed; +}; + + +/** + * Returns the node having the specified key or null if the tree doesn't contain + * a node with the specified key. + * + * @param {number} key Key to find in the tree. + * @return {SplayTree.Node} Node having the specified key. + */ +SplayTree.prototype.find = function(key) { + if (this.isEmpty()) { + return null; + } + this.splay_(key); + return this.root_.key == key ? this.root_ : null; +}; + + +/** + * @return {SplayTree.Node} Node having the minimum key value. + */ +SplayTree.prototype.findMin = function() { + if (this.isEmpty()) { + return null; + } + var current = this.root_; + while (current.left) { + current = current.left; + } + return current; +}; + + +/** + * @return {SplayTree.Node} Node having the maximum key value. + */ +SplayTree.prototype.findMax = function(opt_startNode) { + if (this.isEmpty()) { + return null; + } + var current = opt_startNode || this.root_; + while (current.right) { + current = current.right; + } + return current; +}; + + +/** + * @return {SplayTree.Node} Node having the maximum key value that + * is less or equal to the specified key value. + */ +SplayTree.prototype.findGreatestLessThan = function(key) { + if (this.isEmpty()) { + return null; + } + // Splay on the key to move the node with the given key or the last + // node on the search path to the top of the tree. + this.splay_(key); + // Now the result is either the root node or the greatest node in + // the left subtree. + if (this.root_.key <= key) { + return this.root_; + } else if (this.root_.left) { + return this.findMax(this.root_.left); + } else { + return null; + } +}; + + +/** + * @return {Array<*>} An array containing all the values of tree's nodes paired + * with keys. + */ +SplayTree.prototype.exportKeysAndValues = function() { + var result = []; + this.traverse_(function(node) { result.push([node.key, node.value]); }); + return result; +}; + + +/** + * @return {Array<*>} An array containing all the values of tree's nodes. + */ +SplayTree.prototype.exportValues = function() { + var result = []; + this.traverse_(function(node) { result.push(node.value); }); + return result; +}; + + +/** + * Perform the splay operation for the given key. Moves the node with + * the given key to the top of the tree. If no node has the given + * key, the last node on the search path is moved to the top of the + * tree. This is the simplified top-down splaying algorithm from: + * "Self-adjusting Binary Search Trees" by Sleator and Tarjan + * + * @param {number} key Key to splay the tree on. + * @private + */ +SplayTree.prototype.splay_ = function(key) { + if (this.isEmpty()) { + return; + } + // Create a dummy node. The use of the dummy node is a bit + // counter-intuitive: The right child of the dummy node will hold + // the L tree of the algorithm. The left child of the dummy node + // will hold the R tree of the algorithm. Using a dummy node, left + // and right will always be nodes and we avoid special cases. + var dummy, left, right; + dummy = left = right = new SplayTree.Node(null, null); + var current = this.root_; + while (true) { + if (key < current.key) { + if (!current.left) { + break; + } + if (key < current.left.key) { + // Rotate right. + var tmp = current.left; + current.left = tmp.right; + tmp.right = current; + current = tmp; + if (!current.left) { + break; + } + } + // Link right. + right.left = current; + right = current; + current = current.left; + } else if (key > current.key) { + if (!current.right) { + break; + } + if (key > current.right.key) { + // Rotate left. + var tmp = current.right; + current.right = tmp.left; + tmp.left = current; + current = tmp; + if (!current.right) { + break; + } + } + // Link left. + left.right = current; + left = current; + current = current.right; + } else { + break; + } + } + // Assemble. + left.right = current.left; + right.left = current.right; + current.left = dummy.right; + current.right = dummy.left; + this.root_ = current; +}; + + +/** + * Performs a preorder traversal of the tree. + * + * @param {function(SplayTree.Node)} f Visitor function. + * @private + */ +SplayTree.prototype.traverse_ = function(f) { + var nodesToVisit = [this.root_]; + while (nodesToVisit.length > 0) { + var node = nodesToVisit.shift(); + if (node == null) { + continue; + } + f(node); + nodesToVisit.push(node.left); + nodesToVisit.push(node.right); + } +}; + + +/** + * Constructs a Splay tree node. + * + * @param {number} key Key. + * @param {*} value Value. + */ +SplayTree.Node = function(key, value) { + this.key = key; + this.value = value; +}; + + +/** + * @type {SplayTree.Node} + */ +SplayTree.Node.prototype.left = null; + + +/** + * @type {SplayTree.Node} + */ +SplayTree.Node.prototype.right = null; diff --git a/deps/v8/tools/system-analyzer/app-model.mjs b/deps/v8/tools/system-analyzer/app-model.mjs index 821d3a2c1739b7..37fa5ae2f3336a 100644 --- a/deps/v8/tools/system-analyzer/app-model.mjs +++ b/deps/v8/tools/system-analyzer/app-model.mjs @@ -8,6 +8,7 @@ class State { #ic; #selectedMapLogEvents; #selectedIcLogEvents; + #selectedSourcePositionLogEvents; #nofChunks; #chunks; #icTimeline; @@ -81,6 +82,12 @@ class State { if (!value) return; this.#selectedMapLogEvents = value; } + get selectedSourcePositionLogEvents() { + return this.#selectedSourcePositionLogEvents; + } + set selectedSourcePositionLogEvents(value) { + this.#selectedSourcePositionLogEvents = value; + } get selectedIcLogEvents() { return this.#selectedIcLogEvents; } diff --git a/deps/v8/tools/system-analyzer/event.mjs b/deps/v8/tools/system-analyzer/event.mjs deleted file mode 100644 index 4ab6f34b416d34..00000000000000 --- a/deps/v8/tools/system-analyzer/event.mjs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2020 the V8 project authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -class Event { - #time; - #type; - constructor(type, time) { - //TODO(zcankara) remove type and add empty getters to override - this.#time = time; - this.#type = type; - } - get time(){ - return this.#time; - } - get type(){ - return this.#type; - } -} - -export {Event}; diff --git a/deps/v8/tools/system-analyzer/events.mjs b/deps/v8/tools/system-analyzer/events.mjs index d868b57a848e99..8e9a5a0b446bb3 100644 --- a/deps/v8/tools/system-analyzer/events.mjs +++ b/deps/v8/tools/system-analyzer/events.mjs @@ -30,4 +30,17 @@ class SelectTimeEvent extends CustomEvent { } } -export { SelectionEvent, FocusEvent, SelectTimeEvent }; +class SynchronizeSelectionEvent extends CustomEvent { + static name = 'syncselection'; + constructor(start, end) { + super(SynchronizeSelectionEvent.name, { bubbles: true, composed: true }); + this.start = start; + this.end = end; + } +} + + +export { + SelectionEvent, FocusEvent, SelectTimeEvent, + SynchronizeSelectionEvent +}; diff --git a/deps/v8/tools/system-analyzer/helper.mjs b/deps/v8/tools/system-analyzer/helper.mjs index 4570074c6df1e6..782b3f34569668 100644 --- a/deps/v8/tools/system-analyzer/helper.mjs +++ b/deps/v8/tools/system-analyzer/helper.mjs @@ -26,9 +26,9 @@ function defineCustomElement(path, generator) { let name = path.substring(path.lastIndexOf("/") + 1, path.length); path = path + '-template.html'; fetch(path) - .then(stream => stream.text()) - .then( - templateText => customElements.define(name, generator(templateText))); + .then(stream => stream.text()) + .then( + templateText => customElements.define(name, generator(templateText))); } // DOM Helpers @@ -104,7 +104,7 @@ class CSSColor { } -function transitionTypeToColor(type) { +function typeToColor(type) { switch (type) { case 'new': return CSSColor.green; @@ -120,16 +120,20 @@ function transitionTypeToColor(type) { return CSSColor.red; case 'LoadGlobalIC': return CSSColor.green; + case 'LoadIC': + return CSSColor.primaryColor; case 'StoreInArrayLiteralIC': return CSSColor.violet; + case 'StoreGlobalIC': + return CSSColor.blue; case 'StoreIC': return CSSColor.orange; case 'KeyedLoadIC': return CSSColor.red; case 'KeyedStoreIC': - return CSSColor.primaryColor; + return CSSColor.yellow; } - return CSSColor.primaryColor; + return CSSColor.secondaryColor; } @@ -149,7 +153,7 @@ function div(classes) { class V8CustomElement extends HTMLElement { constructor(templateText) { super(); - const shadowRoot = this.attachShadow({mode: 'open'}); + const shadowRoot = this.attachShadow({ mode: 'open' }); shadowRoot.innerHTML = templateText; } $(id) { @@ -160,7 +164,7 @@ class V8CustomElement extends HTMLElement { return this.shadowRoot.querySelectorAll(query); } - div(classes) {return div(classes)} + div(classes) { return div(classes) } table(className) { let node = document.createElement('table') @@ -178,12 +182,14 @@ class V8CustomElement extends HTMLElement { return node; } - tr(){ + tr() { return document.createElement('tr'); } removeAllChildren(node) { return removeAllChildren(node); } } -export {defineCustomElement, V8CustomElement, removeAllChildren, - $, div, transitionTypeToColor, CSSColor}; +export { + defineCustomElement, V8CustomElement, removeAllChildren, + $, div, typeToColor, CSSColor +}; diff --git a/deps/v8/tools/system-analyzer/ic-model.mjs b/deps/v8/tools/system-analyzer/ic-model.mjs index 93a3d612627a08..8340e9b7566ff3 100644 --- a/deps/v8/tools/system-analyzer/ic-model.mjs +++ b/deps/v8/tools/system-analyzer/ic-model.mjs @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import CustomIcProcessor from "./ic-processor.mjs"; +import Processor from "./processor.mjs"; // For compatibility with console scripts: print = console.log; @@ -24,8 +24,8 @@ export class Group { createSubGroups() { this.groups = {}; - for (let i = 0; i < CustomIcProcessor.kProperties.length; i++) { - let subProperty = CustomIcProcessor.kProperties[i]; + for (let i = 0; i < Processor.kProperties.length; i++) { + let subProperty = Processor.kProperties[i]; if (this.property == subProperty) continue; this.groups[subProperty] = Group.groupBy(this.entries, subProperty); } @@ -51,7 +51,7 @@ export class Group { group.percentage = Math.round(group.count / length * 100 * 100) / 100; result.push(group); } - result.sort((a, b) => {return b.count - a.count}); + result.sort((a, b) => { return b.count - a.count }); return result; } diff --git a/deps/v8/tools/system-analyzer/ic-panel-template.html b/deps/v8/tools/system-analyzer/ic-panel-template.html index 187e5880902b19..53c5eb77fcaa48 100644 --- a/deps/v8/tools/system-analyzer/ic-panel-template.html +++ b/deps/v8/tools/system-analyzer/ic-panel-template.html @@ -1,61 +1,60 @@ -

IC Panel

-

IC Explorer

0
@@ -74,26 +73,22 @@

IC Explorer

generic
-

Data

-

Trace Count: 0

- -

Result

-

+

Result

+

Group-Key: -

-

+

+

Filter by Time -

: - + -

- - - -
-

+

+ + + +
+

diff --git a/deps/v8/tools/system-analyzer/ic-panel.mjs b/deps/v8/tools/system-analyzer/ic-panel.mjs index 14ea97a303b7e0..a8f68c31f5d5f7 100644 --- a/deps/v8/tools/system-analyzer/ic-panel.mjs +++ b/deps/v8/tools/system-analyzer/ic-panel.mjs @@ -3,27 +3,29 @@ // found in the LICENSE file. import { Group } from './ic-model.mjs'; -import CustomIcProcessor from "./ic-processor.mjs"; -import { FocusEvent, SelectTimeEvent } from './events.mjs'; +import Processor from "./processor.mjs"; +import { MapLogEvent } from "./log/map.mjs"; +import { FocusEvent, SelectTimeEvent, SelectionEvent } from './events.mjs'; import { defineCustomElement, V8CustomElement } from './helper.mjs'; defineCustomElement('ic-panel', (templateText) => class ICPanel extends V8CustomElement { - //TODO(zcankara) Entries never set - #entries; - #filteredEntries; + #selectedLogEvents; + #timeline; constructor() { super(templateText); + this.initGroupKeySelect(); this.groupKey.addEventListener( 'change', e => this.updateTable(e)); this.$('#filterICTimeBtn').addEventListener( 'click', e => this.handleICTimeFilter(e)); } - - get entries() { - return this.#entries; + set timeline(value) { + console.assert(value !== undefined, "timeline undefined!"); + this.#timeline = value; + this.selectedLogEvents = this.#timeline.all; + this.updateCount(); } - get groupKey() { return this.$('#group-key'); } @@ -44,13 +46,18 @@ defineCustomElement('ic-panel', (templateText) => return this.querySelectorAll("span"); } - set filteredEntries(value) { - this.#filteredEntries = value; + set selectedLogEvents(value) { + this.#selectedLogEvents = value; + this.updateCount(); this.updateTable(); } - get filteredEntries() { - return this.#filteredEntries; + updateCount() { + this.count.innerHTML = this.selectedLogEvents.length; + } + + get selectedLogEvents() { + return this.#selectedLogEvents; } updateTable(event) { @@ -58,7 +65,7 @@ defineCustomElement('ic-panel', (templateText) => let key = select.options[select.selectedIndex].text; let tableBody = this.tableBody; this.removeAllChildren(tableBody); - let groups = Group.groupBy(this.filteredEntries, key, true); + let groups = Group.groupBy(this.selectedLogEvents, key, true); this.render(groups, tableBody); } @@ -93,11 +100,28 @@ defineCustomElement('ic-panel', (templateText) => } handleMapClick(e) { - this.dispatchEvent(new FocusEvent(e.target.parentNode.entry)); + const entry = e.target.parentNode.entry; + const id = entry.key; + const selectedMapLogEvents = + this.searchIcLogEventToMapLogEvent(id, entry.entries); + this.dispatchEvent(new SelectionEvent(selectedMapLogEvents)); + } + + searchIcLogEventToMapLogEvent(id, icLogEvents) { + // searches for mapLogEvents using the id, time + const selectedMapLogEventsSet = new Set(); + for (const icLogEvent of icLogEvents) { + const time = icLogEvent.time; + const selectedMap = MapLogEvent.get(id, time); + selectedMapLogEventsSet.add(selectedMap); + } + return Array.from(selectedMapLogEventsSet); } + //TODO(zcankara) Handle in the processor for events with source positions. handleFilePositionClick(e) { - this.dispatchEvent(new FocusEvent(e.target.parentNode.entry.key)); + const entry = e.target.parentNode.entry; + this.dispatchEvent(new FocusEvent(entry.filePosition)); } render(entries, parent) { @@ -110,7 +134,9 @@ defineCustomElement('ic-panel', (templateText) => //TODO(zcankara) Create one bound method and use it everywhere if (entry.property === "map") { tr.addEventListener('click', e => this.handleMapClick(e)); + tr.classList.add('clickable'); } else if (entry.property == "filePosition") { + tr.classList.add('clickable'); tr.addEventListener('click', e => this.handleFilePositionClick(e)); } @@ -182,9 +208,9 @@ defineCustomElement('ic-panel', (templateText) => initGroupKeySelect() { let select = this.groupKey; select.options.length = 0; - for (let i in CustomIcProcessor.kProperties) { + for (let i in Processor.kProperties) { let option = document.createElement("option"); - option.text = CustomIcProcessor.kProperties[i]; + option.text = Processor.kProperties[i]; select.add(option); } } diff --git a/deps/v8/tools/system-analyzer/ic-processor.mjs b/deps/v8/tools/system-analyzer/ic-processor.mjs deleted file mode 100644 index 2d468fd2661405..00000000000000 --- a/deps/v8/tools/system-analyzer/ic-processor.mjs +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright 2020 the V8 project authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import {Event} from './event.mjs'; -import {Timeline} from './timeline.mjs'; - -/** - * Parser for dynamic code optimization state. - */ -function parseState(s) { - switch (s) { - case '': - return Profile.CodeState.COMPILED; - case '~': - return Profile.CodeState.OPTIMIZABLE; - case '*': - return Profile.CodeState.OPTIMIZED; - } - throw new Error('unknown code state: ' + s); -} - -class IcProcessor extends LogReader { - #profile; - MAJOR_VERSION = 8; - MINOR_VERSION = 5; - constructor() { - super(); - let propertyICParser = [ - parseInt, parseInt, parseInt, parseInt, parseString, parseString, - parseInt, parseString, parseString, parseString - ]; - LogReader.call(this, { - 'code-creation': { - parsers: [ - parseString, parseInt, parseInt, parseInt, parseInt, parseString, - parseVarArgs - ], - processor: this.processCodeCreation - }, - 'v8-version': { - parsers: [ - parseInt, parseInt, - ], - processor: this.processV8Version - }, - 'code-move': - {parsers: [parseInt, parseInt], processor: this.processCodeMove}, - 'code-delete': {parsers: [parseInt], processor: this.processCodeDelete}, - 'sfi-move': - {parsers: [parseInt, parseInt], processor: this.processFunctionMove}, - 'LoadGlobalIC': { - parsers: propertyICParser, - processor: this.processPropertyIC.bind(this, 'LoadGlobalIC') - }, - 'StoreGlobalIC': { - parsers: propertyICParser, - processor: this.processPropertyIC.bind(this, 'StoreGlobalIC') - }, - 'LoadIC': { - parsers: propertyICParser, - processor: this.processPropertyIC.bind(this, 'LoadIC') - }, - 'StoreIC': { - parsers: propertyICParser, - processor: this.processPropertyIC.bind(this, 'StoreIC') - }, - 'KeyedLoadIC': { - parsers: propertyICParser, - processor: this.processPropertyIC.bind(this, 'KeyedLoadIC') - }, - 'KeyedStoreIC': { - parsers: propertyICParser, - processor: this.processPropertyIC.bind(this, 'KeyedStoreIC') - }, - 'StoreInArrayLiteralIC': { - parsers: propertyICParser, - processor: this.processPropertyIC.bind(this, 'StoreInArrayLiteralIC') - }, - }); - this.#profile = new Profile(); - - this.LoadGlobalIC = 0; - this.StoreGlobalIC = 0; - this.LoadIC = 0; - this.StoreIC = 0; - this.KeyedLoadIC = 0; - this.KeyedStoreIC = 0; - this.StoreInArrayLiteralIC = 0; - } - get profile(){ - return this.#profile; - } - /** - * @override - */ - printError(str) { - print(str); - } - processString(string) { - let end = string.length; - let current = 0; - let next = 0; - let line; - let i = 0; - let entry; - while (current < end) { - next = string.indexOf('\n', current); - if (next === -1) break; - i++; - line = string.substring(current, next); - current = next + 1; - this.processLogLine(line); - } - } - processV8Version(majorVersion, minorVersion){ - if( - (majorVersion == this.MAJOR_VERSION && minorVersion <= this.MINOR_VERSION) - || (majorVersion < this.MAJOR_VERSION)){ - window.alert( - `Unsupported version ${majorVersion}.${minorVersion}. \n` + - `Please use the matching tool for given the V8 version.`); - } - } - processLogFile(fileName) { - this.collectEntries = true; - this.lastLogFileName_ = fileName; - let line; - while (line = readline()) { - this.processLogLine(line); - } - print(); - print('====================='); - print('LoadGlobal: ' + this.LoadGlobalIC); - print('StoreGlobal: ' + this.StoreGlobalIC); - print('Load: ' + this.LoadIC); - print('Store: ' + this.StoreIC); - print('KeyedLoad: ' + this.KeyedLoadIC); - print('KeyedStore: ' + this.KeyedStoreIC); - print('StoreInArrayLiteral: ' + this.StoreInArrayLiteralIC); - } - addEntry(entry) { - this.entries.push(entry); - } - processCodeCreation(type, kind, timestamp, start, size, name, maybe_func) { - if (maybe_func.length) { - let funcAddr = parseInt(maybe_func[0]); - let state = parseState(maybe_func[1]); - this.#profile.addFuncCode( - type, name, timestamp, start, size, funcAddr, state); - } else { - this.#profile.addCode(type, name, timestamp, start, size); - } - } - processCodeMove(from, to) { - this.#profile.moveCode(from, to); - } - processCodeDelete(start) { - this.#profile.deleteCode(start); - } - processFunctionMove(from, to) { - this.#profile.moveFunc(from, to); - } - formatName(entry) { - if (!entry) return ''; - let name = entry.func.getName(); - let re = /(.*):[0-9]+:[0-9]+$/; - let array = re.exec(name); - if (!array) return name; - return entry.getState() + array[1]; - } - - processPropertyIC( - type, pc, time, line, column, old_state, new_state, map, name, modifier, - slow_reason) { - this[type]++; - let entry = this.#profile.findEntry(pc); - print( - type + ' (' + old_state + '->' + new_state + modifier + ') at ' + - this.formatName(entry) + ':' + line + ':' + column + ' ' + name + - ' (map 0x' + map.toString(16) + ')' + - (slow_reason ? ' ' + slow_reason : '') + 'time: ' + time); - } -} - -// ================ - -IcProcessor.kProperties = [ - 'type', - 'category', - 'functionName', - 'filePosition', - 'state', - 'key', - 'map', - 'reason', - 'file' -]; - -class CustomIcProcessor extends IcProcessor { - #timeline = new Timeline(); - - functionName(pc) { - let entry = this.profile.findEntry(pc); - return this.formatName(entry); - } - - processPropertyIC( - type, pc, time, line, column, old_state, new_state, map, key, modifier, - slow_reason) { - let fnName = this.functionName(pc); - let entry = new IcLogEvent( - type, fnName, time, line, column, key, old_state, new_state, map, - slow_reason); - this.#timeline.push(entry); - } - - - get timeline(){ - return this.#timeline; - } - - processString(string) { - super.processString(string); - return this.timeline; - } -}; - -class IcLogEvent extends Event { - constructor( - type, fn_file, time, line, column, key, oldState, newState, map, reason, - additional) { - super(type, time); - this.category = 'other'; - if (this.type.indexOf('Store') !== -1) { - this.category = 'Store'; - } else if (this.type.indexOf('Load') !== -1) { - this.category = 'Load'; - } - let parts = fn_file.split(' '); - this.functionName = parts[0]; - this.file = parts[1]; - let position = line + ':' + column; - this.filePosition = this.file + ':' + position; - this.oldState = oldState; - this.newState = newState; - this.state = this.oldState + ' → ' + this.newState; - this.key = key; - this.map = map.toString(16); - this.reason = reason; - this.additional = additional; - } - - - parseMapProperties(parts, offset) { - let next = parts[++offset]; - if (!next.startsWith('dict')) return offset; - this.propertiesMode = next.substr(5) == '0' ? 'fast' : 'slow'; - this.numberOfOwnProperties = parts[++offset].substr(4); - next = parts[++offset]; - this.instanceType = next.substr(5, next.length - 6); - return offset; - } - - parsePositionAndFile(parts, start) { - // find the position of 'at' in the parts array. - let offset = start; - for (let i = start + 1; i < parts.length; i++) { - offset++; - if (parts[i] == 'at') break; - } - if (parts[offset] !== 'at') return -1; - this.position = parts.slice(start, offset).join(' '); - offset += 1; - this.isNative = parts[offset] == 'native' - offset += this.isNative ? 1 : 0; - this.file = parts[offset]; - return offset; - } -} - -export { CustomIcProcessor as default, IcLogEvent}; diff --git a/deps/v8/tools/system-analyzer/index.css b/deps/v8/tools/system-analyzer/index.css index 3eba296bacf713..c3defb5b8cd793 100644 --- a/deps/v8/tools/system-analyzer/index.css +++ b/deps/v8/tools/system-analyzer/index.css @@ -11,6 +11,7 @@ --error-color: #cf6679; --map-background-color: #5e5454; --timeline-background-color: #1f1f1f; + --file-reader-background-color: #ffffff80; --red: #dc6eae; --green: #aedc6e; --yellow: #eeff41; @@ -32,6 +33,7 @@ --error-color: #b00020; --map-background-color: #5e5454; --timeline-background-color: #fdfcfc; + --file-reader-background-color: #887e8b80; --red: #b71c1c; --green: #7db300; --yellow: #ffff00; @@ -132,6 +134,20 @@ button { .failure { background-color: var(--error-color); } + +.highlight { + background-color: var(--primary-color); + color: var(--on-primary-color); +} +.clickable:hover, +.mark:hover, +.clickable:active, +.mark:active { + background-color: var(--primary-color); + color: var(--on-primary-color); + cursor: pointer; +} + a:link { color: var(--secondary-color); background-color: transparent; diff --git a/deps/v8/tools/system-analyzer/index.html b/deps/v8/tools/system-analyzer/index.html index 56747406062ae5..c9104461147010 100644 --- a/deps/v8/tools/system-analyzer/index.html +++ b/deps/v8/tools/system-analyzer/index.html @@ -12,17 +12,6 @@ - - - - - - - - - - -
-

-

+
+ +
@@ -135,26 +136,42 @@ +
-
- -

Instructions

- Unified web interface for analyzing the trace information of the Maps/ICs + Unified web interface to analyse runtime information stored in the v8 log.

+ For generating log file from + d8: +

+ Log Options: +

+
+
--trace-maps:
+
Log + Maps
+
--trace_ic:
+
Log + + ICs
+
--log-source-code:
+
Log source code
+
+ Usage: +
    +
  • /path/do/d8 --trace-maps --trace_ic --log-source-code $FILE +
  • +
+ For generating a log file from Chrome:
    -
  • Visualize Map trees that have gathered
  • -
  • /path/to/d8 --trace-maps $FILE
  • -
  • Visualize IC events that have gathered
  • -
  • /path/to/d8 --trace_ic $FILE (your_script.js)
  • +
  • /path/to/chrome --user-data-dir=/var/tmp/chr1 --no-sandbox + --js-flags='--trace-ic --trace-maps --log-source-code’ + $WEBSITE_URL
-

Keyboard Shortcuts

+

Keyboard Shortcuts for Navigation

SHIFT + Arrow Up
Follow Map transition forward (first child)
diff --git a/deps/v8/tools/system-analyzer/index.mjs b/deps/v8/tools/system-analyzer/index.mjs index 5913d4ddc8889c..80e5b79948676d 100644 --- a/deps/v8/tools/system-analyzer/index.mjs +++ b/deps/v8/tools/system-analyzer/index.mjs @@ -2,23 +2,27 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import CustomIcProcessor from "./ic-processor.mjs"; -import { SelectionEvent, FocusEvent } from "./events.mjs"; -import { IcLogEvent } from "./ic-processor.mjs"; + +import { SelectionEvent, FocusEvent, SelectTimeEvent } from "./events.mjs"; import { State } from "./app-model.mjs"; -import { MapProcessor, MapLogEvent } from "./map-processor.mjs"; -import { SelectTimeEvent } from "./events.mjs"; +import { MapLogEvent } from "./log/map.mjs"; +import { IcLogEvent } from "./log/ic.mjs"; +import Processor from "./processor.mjs"; +import { SourcePosition } from "../profile.mjs"; import { $ } from "./helper.mjs"; import "./ic-panel.mjs"; import "./timeline-panel.mjs"; import "./map-panel.mjs"; import "./log-file-reader.mjs"; +import "./source-panel.mjs"; + + class App { #state; #view; #navigation; constructor(fileReaderId, mapPanelId, timelinePanelId, - icPanelId, mapTrackId, icTrackId) { + icPanelId, mapTrackId, icTrackId, sourcePanelId) { this.#view = { logFileReader: $(fileReaderId), icPanel: $(icPanelId), @@ -26,6 +30,7 @@ class App { timelinePanel: $(timelinePanelId), mapTrack: $(mapTrackId), icTrack: $(icTrackId), + sourcePanel: $(sourcePanelId) }; this.#state = new State(); this.#navigation = new Navigation(this.#state, this.#view); @@ -53,8 +58,10 @@ class App { this.showMapEntries(e.entries); } else if (e.entries[0] instanceof IcLogEvent) { this.showIcEntries(e.entries); + } else if (e.entries[0] instanceof SourcePosition) { + this.showSourcePositionEntries(e.entries); } else { - console.error("Undefined selection!"); + throw new Error("Unknown selection type!"); } } showMapEntries(entries) { @@ -63,8 +70,11 @@ class App { } showIcEntries(entries) { this.#state.selectedIcLogEvents = entries; - //TODO(zcankara) use selectedLogEvents - this.#view.icPanel.filteredEntries = this.#state.selectedIcLogEvents; + this.#view.icPanel.selectedLogEvents = this.#state.selectedIcLogEvents; + } + showSourcePositionEntries(entries) { + //TODO(zcankara) Handle multiple source position selection events + this.#view.sourcePanel.selectedSourcePositions = entries; } handleTimeRangeSelect(e) { @@ -75,16 +85,12 @@ class App { this.selectMapLogEvent(e.entry); } else if (e.entry instanceof IcLogEvent) { this.selectICLogEvent(e.entry); - } else if (typeof e.entry === 'string') { + } else if (e.entry instanceof SourcePosition) { this.selectSourcePositionEvent(e.entry); } else { - console.log("undefined"); + throw new Error("Unknown selection type!"); } } - handleClickSourcePositions(e) { - //TODO(zcankara) Handle source position - console.log("Entry containing source position: ", e.entries); - } selectTimeRange(start, end) { this.#state.timeSelection.start = start; this.#state.timeSelection.end = end; @@ -92,7 +98,7 @@ class App { this.#state.mapTimeline.selectTimeRange(start, end); this.#view.mapPanel.selectedMapLogEvents = this.#state.mapTimeline.selection; - this.#view.icPanel.filteredEntries = this.#state.icTimeline.selection; + this.#view.icPanel.selectedLogEvents = this.#state.icTimeline.selection; } selectMapLogEvent(entry) { this.#state.map = entry; @@ -101,34 +107,26 @@ class App { } selectICLogEvent(entry) { this.#state.ic = entry; - this.#view.icPanel.filteredEntries = [entry]; + this.#view.icPanel.selectedLogEvents = [entry]; } selectSourcePositionEvent(sourcePositions) { - console.log("source positions: ", sourcePositions); + if (!sourcePositions.script) return; + this.#view.sourcePanel.selectedSourcePositions = [sourcePositions]; } + handleFileUpload(e) { + this.restartApp(); $("#container").className = "initial"; } - // Map event log processing - handleLoadTextMapProcessor(text) { - let mapProcessor = new MapProcessor(); - return mapProcessor.processString(text); + restartApp() { + this.#state = new State(); + this.#navigation = new Navigation(this.#state, this.#view); } - // IC event file reading and log processing - loadICLogFile(fileData) { - let reader = new FileReader(); - reader.onload = (evt) => { - let icProcessor = new CustomIcProcessor(); - //TODO(zcankara) Assign timeline directly to the ic panel - //TODO(zcankara) Exe: this.#icPanel.timeline = document.state.icTimeline - //TODO(zcankara) Set the data of the State object first - this.#state.icTimeline = icProcessor.processString(fileData.chunk); - this.#view.icTrack.data = this.#state.icTimeline; - this.#view.icPanel.filteredEntries = this.#view.icTrack.data.all; - this.#view.icPanel.count.innerHTML = this.#view.icTrack.data.all.length; - }; - reader.readAsText(fileData.file); - this.#view.icPanel.initGroupKeySelect(); + // Event log processing + handleLoadTextProcessor(text) { + let logProcessor = new Processor(); + logProcessor.processString(text); + return logProcessor; } // call when a new file uploaded @@ -137,18 +135,22 @@ class App { $("#container").className = "loaded"; // instantiate the app logic let fileData = e.detail; - try { - const timeline = this.handleLoadTextMapProcessor(fileData.chunk); - // Transitions must be set before timeline for stats panel. - this.#state.mapTimeline = timeline; - this.#view.mapPanel.transitions = this.#state.mapTimeline.transitions; - this.#view.mapTrack.data = this.#state.mapTimeline; - this.#state.chunks = this.#view.mapTrack.chunks; - this.#view.mapPanel.timeline = this.#state.mapTimeline; - } catch (error) { - console.log(error); - } - this.loadICLogFile(fileData); + const processor = this.handleLoadTextProcessor(fileData.chunk); + const mapTimeline = processor.mapTimeline; + const icTimeline = processor.icTimeline; + //TODO(zcankara) Make sure only one instance of src event map ic id match + // Load map log events timeline. + this.#state.mapTimeline = mapTimeline; + // Transitions must be set before timeline for stats panel. + this.#view.mapPanel.transitions = this.#state.mapTimeline.transitions; + this.#view.mapTrack.data = mapTimeline; + this.#state.chunks = this.#view.mapTrack.chunks; + this.#view.mapPanel.timeline = mapTimeline; + // Load ic log events timeline. + this.#state.icTimeline = icTimeline; + this.#view.icPanel.timeline = icTimeline; + this.#view.icTrack.data = icTimeline; + this.#view.sourcePanel.data = processor.scripts this.fileLoaded = true; } diff --git a/deps/v8/tools/system-analyzer/log-file-reader-template.html b/deps/v8/tools/system-analyzer/log-file-reader-template.html index d4796d5994ee8e..e20ce1ea2070bc 100644 --- a/deps/v8/tools/system-analyzer/log-file-reader-template.html +++ b/deps/v8/tools/system-analyzer/log-file-reader-template.html @@ -2,9 +2,10 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> + + +
-
- - Drag and drop a v8.log file into this area, or click to choose from disk. - - -
-
-
-
+
+ + Drag and drop a v8.log file into this area, or click to choose from disk. + + +
+
+
+
diff --git a/deps/v8/tools/system-analyzer/log-file-reader.mjs b/deps/v8/tools/system-analyzer/log-file-reader.mjs index 85fce9adb217e4..4b5238d89d28a6 100644 --- a/deps/v8/tools/system-analyzer/log-file-reader.mjs +++ b/deps/v8/tools/system-analyzer/log-file-reader.mjs @@ -1,77 +1,80 @@ // Copyright 2020 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {defineCustomElement, V8CustomElement} from './helper.mjs'; +import { defineCustomElement, V8CustomElement } from './helper.mjs'; defineCustomElement('log-file-reader', (templateText) => - class LogFileReader extends V8CustomElement { - constructor() { - super(templateText); - this.addEventListener('click', e => this.handleClick(e)); - this.addEventListener('dragover', e => this.handleDragOver(e)); - this.addEventListener('drop', e => this.handleChange(e)); - this.$('#file').addEventListener('change', e => this.handleChange(e)); - this.$('#fileReader').addEventListener('keydown', - e => this.handleKeyEvent(e)); - } - - get section() { - return this.$('#fileReaderSection'); - } + class LogFileReader extends V8CustomElement { + constructor() { + super(templateText); + this.addEventListener('click', e => this.handleClick(e)); + this.addEventListener('dragover', e => this.handleDragOver(e)); + this.addEventListener('drop', e => this.handleChange(e)); + this.$('#file').addEventListener('change', e => this.handleChange(e)); + this.$('#fileReader').addEventListener('keydown', + e => this.handleKeyEvent(e)); + } - updateLabel(text) { - this.$('#label').innerText = text; - } + get section() { + return this.$('#fileReaderSection'); + } - handleKeyEvent(event) { - if (event.key == "Enter") this.handleClick(event); - } + updateLabel(text) { + this.$('#label').innerText = text; + } - handleClick(event) { - this.$('#file').click(); - } + handleKeyEvent(event) { + if (event.key == "Enter") this.handleClick(event); + } - handleChange(event) { - // Used for drop and file change. - event.preventDefault(); - this.dispatchEvent(new CustomEvent( - 'fileuploadstart', {bubbles: true, composed: true})); - var host = event.dataTransfer ? event.dataTransfer : event.target; - this.readFile(host.files[0]); - } + handleClick(event) { + this.$('#file').click(); + } - handleDragOver(event) { - event.preventDefault(); - } + handleChange(event) { + // Used for drop and file change. + event.preventDefault(); + this.dispatchEvent(new CustomEvent( + 'fileuploadstart', { bubbles: true, composed: true })); + var host = event.dataTransfer ? event.dataTransfer : event.target; + this.readFile(host.files[0]); + } - connectedCallback() { - this.$('#fileReader').focus(); - } + handleDragOver(event) { + event.preventDefault(); + } - readFile(file) { - if (!file) { - this.updateLabel('Failed to load file.'); - return; + connectedCallback() { + this.$('#fileReader').focus(); } - this.$('#fileReader').blur(); - this.section.className = 'loading'; - const reader = new FileReader(); - reader.onload = (e) => { - try { - let dataModel = Object.create(null); - dataModel.file = file; - dataModel.chunk = e.target.result; - this.updateLabel('Finished loading \'' + file.name + '\'.'); - this.dispatchEvent(new CustomEvent( - 'fileuploadend', {bubbles: true, composed: true, detail: dataModel})); - this.section.className = 'success'; - this.$('#fileReader').classList.add('done'); - } catch (err) { - console.error(err); - this.section.className = 'failure'; + + readFile(file) { + if (!file) { + this.updateLabel('Failed to load file.'); + return; } - }; - // Delay the loading a bit to allow for CSS animations to happen. - setTimeout(() => reader.readAsText(file), 0); + this.$('#fileReader').blur(); + this.section.className = 'loading'; + const reader = new FileReader(); + reader.onload = (e) => { + try { + let dataModel = Object.create(null); + dataModel.file = file; + dataModel.chunk = e.target.result; + this.updateLabel('Finished loading \'' + file.name + '\'.'); + this.dispatchEvent(new CustomEvent( + 'fileuploadend', { + bubbles: true, composed: true, + detail: dataModel + })); + this.section.className = 'success'; + this.$('#fileReader').classList.add('done'); + } catch (err) { + console.error(err); + this.section.className = 'failure'; + } + }; + // Delay the loading a bit to allow for CSS animations to happen. + setTimeout(() => reader.readAsText(file), 0); } -}); + }); diff --git a/deps/v8/tools/system-analyzer/log/ic.mjs b/deps/v8/tools/system-analyzer/log/ic.mjs new file mode 100644 index 00000000000000..5001e60c364979 --- /dev/null +++ b/deps/v8/tools/system-analyzer/log/ic.mjs @@ -0,0 +1,60 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +import { Event } from './log.mjs'; + +class IcLogEvent extends Event { + constructor( + type, fn_file, time, line, column, key, oldState, newState, map, reason, + script, additional) { + super(type, time); + this.category = 'other'; + if (this.type.indexOf('Store') !== -1) { + this.category = 'Store'; + } else if (this.type.indexOf('Load') !== -1) { + this.category = 'Load'; + } + let parts = fn_file.split(' '); + this.functionName = parts[0]; + this.file = parts[1]; + let position = line + ':' + column; + this.filePosition = this.file + ':' + position; + this.oldState = oldState; + this.newState = newState; + this.state = this.oldState + ' → ' + this.newState; + this.key = key; + this.map = map; + this.reason = reason; + this.additional = additional; + this.script = script; + } + + + parseMapProperties(parts, offset) { + let next = parts[++offset]; + if (!next.startsWith('dict')) return offset; + this.propertiesMode = next.substr(5) == '0' ? 'fast' : 'slow'; + this.numberOfOwnProperties = parts[++offset].substr(4); + next = parts[++offset]; + this.instanceType = next.substr(5, next.length - 6); + return offset; + } + + parsePositionAndFile(parts, start) { + // find the position of 'at' in the parts array. + let offset = start; + for (let i = start + 1; i < parts.length; i++) { + offset++; + if (parts[i] == 'at') break; + } + if (parts[offset] !== 'at') return -1; + this.position = parts.slice(start, offset).join(' '); + offset += 1; + this.isNative = parts[offset] == 'native' + offset += this.isNative ? 1 : 0; + this.file = parts[offset]; + return offset; + } +} + +export { IcLogEvent }; diff --git a/deps/v8/tools/system-analyzer/log/log.mjs b/deps/v8/tools/system-analyzer/log/log.mjs new file mode 100644 index 00000000000000..2945f0e76b8387 --- /dev/null +++ b/deps/v8/tools/system-analyzer/log/log.mjs @@ -0,0 +1,22 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + + +class Event { + #time; + #type; + constructor(type, time) { + //TODO(zcankara) remove type and add empty getters to override + this.#time = time; + this.#type = type; + } + get time() { + return this.#time; + } + get type() { + return this.#type; + } +} + +export { Event }; diff --git a/deps/v8/tools/system-analyzer/log/map.mjs b/deps/v8/tools/system-analyzer/log/map.mjs new file mode 100644 index 00000000000000..38c8a9a63a7f1a --- /dev/null +++ b/deps/v8/tools/system-analyzer/log/map.mjs @@ -0,0 +1,296 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import { typeToColor } from '../helper.mjs'; +import { Event } from './log.mjs'; + +// =========================================================================== +// Map Log Events + +const kChunkHeight = 250; +const kChunkWidth = 10; + +function define(prototype, name, fn) { + Object.defineProperty(prototype, name, { value: fn, enumerable: false }); +} + +define(Array.prototype, 'max', function (fn) { + if (this.length === 0) return undefined; + if (fn === undefined) fn = (each) => each; + let max = fn(this[0]); + for (let i = 1; i < this.length; i++) { + max = Math.max(max, fn(this[i])); + } + return max; +}) +define(Array.prototype, 'first', function () { + return this[0] +}); +define(Array.prototype, 'last', function () { + return this[this.length - 1] +}); + +// =========================================================================== +// Map Log Events + +class MapLogEvent extends Event { + edge = void 0; + children = []; + depth = 0; + // TODO(zcankara): Change this to private class field. + #isDeprecated = false; + deprecatedTargets = null; + leftId = 0; + rightId = 0; + filePosition = ''; + script = ''; + id = -1; + constructor(id, time) { + if (!time) throw new Error('Invalid time'); + super(id, time); + MapLogEvent.set(id, this); + this.id = id; + } + + finalizeRootMap(id) { + let stack = [this]; + while (stack.length > 0) { + let current = stack.pop(); + if (current.leftId !== 0) { + console.error('Skipping potential parent loop between maps:', current) + continue; + } + current.finalize(id) + id += 1; + current.children.forEach(edge => stack.push(edge.to)) + // TODO implement rightId + } + return id; + } + + finalize(id) { + // Initialize preorder tree traversal Ids for fast subtree inclusion checks + if (id <= 0) throw 'invalid id'; + let currentId = id; + this.leftId = currentId + } + + parent() { + if (this.edge === void 0) return void 0; + return this.edge.from; + } + + isDeprecated() { + return this.#isDeprecated; + } + + deprecate() { + this.#isDeprecated = true; + } + + isRoot() { + return this.edge === void 0 || this.edge.from === void 0; + } + + contains(map) { + return this.leftId < map.leftId && map.rightId < this.rightId; + } + + addEdge(edge) { + this.children.push(edge); + } + + chunkIndex(chunks) { + // Did anybody say O(n)? + for (let i = 0; i < chunks.length; i++) { + let chunk = chunks[i]; + if (chunk.isEmpty()) continue; + if (chunk.last().time < this.time) continue; + return i; + } + return -1; + } + + position(chunks) { + let index = this.chunkIndex(chunks); + let xFrom = (index + 1.5) * kChunkWidth; + let yFrom = kChunkHeight - chunks[index].yOffset(this); + return [xFrom, yFrom]; + } + + transitions() { + let transitions = Object.create(null); + let current = this; + while (current) { + let edge = current.edge; + if (edge && edge.isTransition()) { + transitions[edge.name] = edge; + } + current = current.parent() + } + return transitions; + } + + get type() { + return this.edge === void 0 ? 'new' : this.edge.type; + } + + isBootstrapped() { + return this.edge === void 0; + } + + getParents() { + let parents = []; + let current = this.parent(); + while (current) { + parents.push(current); + current = current.parent(); + } + return parents; + } + + static get(id, time = undefined) { + let maps = this.cache.get(id); + if (maps) { + for (let i = 1; i < maps.length; i++) { + if (maps[i].time > time) { + return maps[i - 1]; + } + } + // default return the latest + return (maps.length > 0) ? maps[maps.length - 1] : undefined; + } + } + + static set(id, map) { + if (this.cache.has(id)) { + this.cache.get(id).push(map); + } else { + this.cache.set(id, [map]); + } + } +} + +MapLogEvent.cache = new Map(); + +// =========================================================================== +class Edge { + constructor(type, name, reason, time, from, to) { + this.type = type; + this.name = name; + this.reason = reason; + this.time = time; + this.from = from; + this.to = to; + } + + getColor() { + return typeToColor(this.type); + } + + finishSetup() { + let from = this.from; + if (from) from.addEdge(this); + let to = this.to; + if (to === undefined) return; + to.edge = this; + if (from === undefined) return; + if (to === from) throw 'From and to must be distinct.'; + if (to.time < from.time) { + console.error('invalid time order'); + } + let newDepth = from.depth + 1; + if (to.depth > 0 && to.depth != newDepth) { + console.error('Depth has already been initialized'); + } + to.depth = newDepth; + } + + chunkIndex(chunks) { + // Did anybody say O(n)? + for (let i = 0; i < chunks.length; i++) { + let chunk = chunks[i]; + if (chunk.isEmpty()) continue; + if (chunk.last().time < this.time) continue; + return i; + } + return -1; + } + + parentEdge() { + if (!this.from) return undefined; + return this.from.edge; + } + + chainLength() { + let length = 0; + let prev = this; + while (prev) { + prev = this.parent; + length++; + } + return length; + } + + isTransition() { + return this.type === 'Transition' + } + + isFastToSlow() { + return this.type === 'Normalize' + } + + isSlowToFast() { + return this.type === 'SlowToFast' + } + + isInitial() { + return this.type === 'InitialMap' + } + + isBootstrapped() { + return this.type === 'new' + } + + isReplaceDescriptors() { + return this.type === 'ReplaceDescriptors' + } + + isCopyAsPrototype() { + return this.reason === 'CopyAsPrototype' + } + + isOptimizeAsPrototype() { + return this.reason === 'OptimizeAsPrototype' + } + + symbol() { + if (this.isTransition()) return '+'; + if (this.isFastToSlow()) return '⊡'; + if (this.isSlowToFast()) return '⊛'; + if (this.isReplaceDescriptors()) { + if (this.name) return '+'; + return '∥'; + } + return ''; + } + + toString() { + let s = this.symbol(); + if (this.isTransition()) return s + this.name; + if (this.isFastToSlow()) return s + this.reason; + if (this.isCopyAsPrototype()) return s + 'Copy as Prototype'; + if (this.isOptimizeAsPrototype()) { + return s + 'Optimize as Prototype'; + } + if (this.isReplaceDescriptors() && this.name) { + return this.type + ' ' + this.symbol() + this.name; + } + return this.type + ' ' + (this.reason ? this.reason : '') + ' ' + + (this.name ? this.name : '') + } +} + + +export { MapLogEvent, Edge, kChunkWidth, kChunkHeight }; diff --git a/deps/v8/tools/system-analyzer/map-panel-template.html b/deps/v8/tools/system-analyzer/map-panel-template.html index 94cae0e050c475..6363a6d7c3deee 100644 --- a/deps/v8/tools/system-analyzer/map-panel-template.html +++ b/deps/v8/tools/system-analyzer/map-panel-template.html @@ -1,9 +1,11 @@ -

Map Details

+
diff --git a/deps/v8/tools/system-analyzer/map-panel/map-details.mjs b/deps/v8/tools/system-analyzer/map-panel/map-details.mjs index dddccf7d8bc0bb..d471609dba814b 100644 --- a/deps/v8/tools/system-analyzer/map-panel/map-details.mjs +++ b/deps/v8/tools/system-analyzer/map-panel/map-details.mjs @@ -10,8 +10,8 @@ defineCustomElement( class MapDetails extends V8CustomElement { constructor() { super(templateText); - this.mapDetails.addEventListener("click", () => - this.handleClickSourcePositions() + this.#filePositionNode.addEventListener("click", e => + this.handleFilePositionClick(e) ); this.selectedMap = undefined; } @@ -19,23 +19,30 @@ defineCustomElement( return this.$("#mapDetails"); } + get #filePositionNode() { + return this.$("#filePositionNode"); + } + setSelectedMap(value) { this.selectedMap = value; } set mapDetails(map) { let details = ""; + let clickableDetails = ""; if (map) { - details += "ID: " + map.id; - details += "\nSource location: " + map.filePosition; + clickableDetails += "ID: " + map.id; + clickableDetails += "\nSource location: " + map.filePosition; details += "\n" + map.description; this.setSelectedMap(map); } + this.#filePositionNode.innerText = clickableDetails; + this.#filePositionNode.classList.add("clickable"); this.mapDetails.innerText = details; } - handleClickSourcePositions() { - this.dispatchEvent(new FocusEvent(this.selectedMap.filePosition)); + handleFilePositionClick() { + this.dispatchEvent(new FocusEvent(this.selectedMap.sourcePosition)); } } ); diff --git a/deps/v8/tools/system-analyzer/map-panel/map-transitions.mjs b/deps/v8/tools/system-analyzer/map-panel/map-transitions.mjs index 578e2bb358f470..d508b886949ee5 100644 --- a/deps/v8/tools/system-analyzer/map-panel/map-transitions.mjs +++ b/deps/v8/tools/system-analyzer/map-panel/map-transitions.mjs @@ -47,6 +47,7 @@ defineCustomElement( selectMap(map) { this.currentMap = map; + this.showMap(); this.dispatchEvent(new FocusEvent(map)); } @@ -66,7 +67,8 @@ defineCustomElement( // Timeline dbl click to show map transitions of selected maps this.transitionView.style.display = "none"; this.removeAllChildren(this.transitionView); - this.selectedMapLogEvents.forEach((map) => this.addMapAndParentTransitions(map)); + this.selectedMapLogEvents.forEach((map) => + this.addMapAndParentTransitions(map)); this.transitionView.style.display = ""; } diff --git a/deps/v8/tools/system-analyzer/map-processor.mjs b/deps/v8/tools/system-analyzer/map-processor.mjs deleted file mode 100644 index a1f056b4747e0c..00000000000000 --- a/deps/v8/tools/system-analyzer/map-processor.mjs +++ /dev/null @@ -1,538 +0,0 @@ -// Copyright 2020 the V8 project authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import {transitionTypeToColor} from './helper.mjs'; -import {Timeline} from './timeline.mjs'; - -// =========================================================================== -import {Event} from './event.mjs'; -const kChunkHeight = 250; -const kChunkWidth = 10; - -function define(prototype, name, fn) { - Object.defineProperty(prototype, name, {value: fn, enumerable: false}); -} - -define(Array.prototype, 'max', function(fn) { - if (this.length === 0) return undefined; - if (fn === undefined) fn = (each) => each; - let max = fn(this[0]); - for (let i = 1; i < this.length; i++) { - max = Math.max(max, fn(this[i])); - } - return max; -}) -define(Array.prototype, 'first', function() { - return this[0] -}); -define(Array.prototype, 'last', function() { - return this[this.length - 1] -}); -// =========================================================================== - -class MapProcessor extends LogReader { - #profile = new Profile(); - #timeline = new Timeline(); - #formatPCRegexp = /(.*):[0-9]+:[0-9]+$/; - MAJOR_VERSION = 7; - MINOR_VERSION = 6; - constructor() { - super(); - this.dispatchTable_ = { - __proto__: null, - 'code-creation': { - parsers: [ - parseString, parseInt, parseInt, parseInt, parseInt, parseString, - parseVarArgs - ], - processor: this.processCodeCreation - }, - 'v8-version': { - parsers: [ - parseInt, parseInt, - ], - processor: this.processV8Version - }, - 'code-move': { - parsers: [parseInt, parseInt], - 'sfi-move': - {parsers: [parseInt, parseInt], processor: this.processCodeMove}, - 'code-delete': {parsers: [parseInt], processor: this.processCodeDelete}, - processor: this.processFunctionMove - }, - 'map-create': - {parsers: [parseInt, parseString], processor: this.processMapCreate}, - 'map': { - parsers: [ - parseString, parseInt, parseString, parseString, parseInt, parseInt, - parseString, parseString, parseString - ], - processor: this.processMap - }, - 'map-details': { - parsers: [parseInt, parseString, parseString], - processor: this.processMapDetails - } - }; - } - - printError(str) { - console.error(str); - throw str - } - - processString(string) { - let end = string.length; - let current = 0; - let next = 0; - let line; - let i = 0; - let entry; - try { - while (current < end) { - next = string.indexOf('\n', current); - if (next === -1) break; - i++; - line = string.substring(current, next); - current = next + 1; - this.processLogLine(line); - } - } catch (e) { - console.error('Error occurred during parsing, trying to continue: ' + e); - } - return this.finalize(); - } - - processLogFile(fileName) { - this.collectEntries = true; - this.lastLogFileName_ = fileName; - let i = 1; - let line; - try { - while (line = readline()) { - this.processLogLine(line); - i++; - } - } catch (e) { - console.error( - 'Error occurred during parsing line ' + i + - ', trying to continue: ' + e); - } - return this.finalize(); - } - - finalize() { - // TODO(cbruni): print stats; - this.#timeline.transitions = new Map(); - let id = 0; - this.#timeline.forEach(map => { - if (map.isRoot()) id = map.finalizeRootMap(id + 1); - if (map.edge && map.edge.name) { - let edge = map.edge; - let list = this.#timeline.transitions.get(edge.name); - if (list === undefined) { - this.#timeline.transitions.set(edge.name, [edge]); - } else { - list.push(edge); - } - } - }); - return this.#timeline; - } - - addEntry(entry) { - this.entries.push(entry); - } - - /** - * Parser for dynamic code optimization state. - */ - parseState(s) { - switch (s) { - case '': - return Profile.CodeState.COMPILED; - case '~': - return Profile.CodeState.OPTIMIZABLE; - case '*': - return Profile.CodeState.OPTIMIZED; - } - throw new Error('unknown code state: ' + s); - } - - processCodeCreation(type, kind, timestamp, start, size, name, maybe_func) { - if (maybe_func.length) { - let funcAddr = parseInt(maybe_func[0]); - let state = this.parseState(maybe_func[1]); - this.#profile.addFuncCode( - type, name, timestamp, start, size, funcAddr, state); - } else { - this.#profile.addCode(type, name, timestamp, start, size); - } - } - - processV8Version(majorVersion, minorVersion){ - if( - (majorVersion == this.MAJOR_VERSION && minorVersion <= this.MINOR_VERSION) - || (majorVersion < this.MAJOR_VERSION)){ - window.alert( - `Unsupported version ${majorVersion}.${minorVersion}. \n` + - `Please use the matching tool for given the V8 version.`); - } - } - - processCodeMove(from, to) { - this.#profile.moveCode(from, to); - } - - processCodeDelete(start) { - this.#profile.deleteCode(start); - } - - processFunctionMove(from, to) { - this.#profile.moveFunc(from, to); - } - - formatPC(pc, line, column) { - let entry = this.#profile.findEntry(pc); - if (!entry) return '' - if (entry.type === 'Builtin') { - return entry.name; - } - let name = entry.func.getName(); - let array = this.#formatPCRegexp.exec(name); - if (array === null) { - entry = name; - } else { - entry = entry.getState() + array[1]; - } - return entry + ':' + line + ':' + column; - } - - processMap(type, time, from, to, pc, line, column, reason, name) { - let time_ = parseInt(time); - if (type === 'Deprecate') return this.deprecateMap(type, time_, from); - let from_ = this.getExistingMap(from, time_); - let to_ = this.getExistingMap(to, time_); - let edge = new Edge(type, name, reason, time, from_, to_); - to_.filePosition = this.formatPC(pc, line, column); - edge.finishSetup(); - } - - deprecateMap(type, time, id) { - this.getExistingMap(id, time).deprecate(); - } - - processMapCreate(time, id) { - // map-create events might override existing maps if the addresses get - // recycled. Hence we do not check for existing maps. - let map = this.createMap(id, time); - } - - processMapDetails(time, id, string) { - // TODO(cbruni): fix initial map logging. - let map = this.getExistingMap(id, time); - map.description = string; - } - - createMap(id, time) { - let map = new MapLogEvent(id, time); - this.#timeline.push(map); - return map; - } - - getExistingMap(id, time) { - if (id === '0x000000000000') return undefined; - let map = MapLogEvent.get(id, time); - if (map === undefined) { - console.error('No map details provided: id=' + id); - // Manually patch in a map to continue running. - return this.createMap(id, time); - }; - return map; - } -} - -// =========================================================================== - -class MapLogEvent extends Event { - edge = void 0; - children = []; - depth = 0; - // TODO(zcankara): Change this to private class field. - #isDeprecated = false; - deprecatedTargets = null; - leftId= 0; - rightId = 0; - filePosition = ''; - id = -1; - constructor(id, time) { - if (!time) throw new Error('Invalid time'); - super(id, time); - MapLogEvent.set(id, this); - this.id = id; - } - - finalizeRootMap(id) { - let stack = [this]; - while (stack.length > 0) { - let current = stack.pop(); - if (current.leftId !== 0) { - console.error('Skipping potential parent loop between maps:', current) - continue; - } - current.finalize(id) - id += 1; - current.children.forEach(edge => stack.push(edge.to)) - // TODO implement rightId - } - return id; - } - - finalize(id) { - // Initialize preorder tree traversal Ids for fast subtree inclusion checks - if (id <= 0) throw 'invalid id'; - let currentId = id; - this.leftId = currentId - } - - parent() { - if (this.edge === void 0) return void 0; - return this.edge.from; - } - - isDeprecated() { - return this.#isDeprecated; - } - - deprecate() { - this.#isDeprecated = true; - } - - isRoot() { - return this.edge === void 0 || this.edge.from === void 0; - } - - contains(map) { - return this.leftId < map.leftId && map.rightId < this.rightId; - } - - addEdge(edge) { - this.children.push(edge); - } - - chunkIndex(chunks) { - // Did anybody say O(n)? - for (let i = 0; i < chunks.length; i++) { - let chunk = chunks[i]; - if (chunk.isEmpty()) continue; - if (chunk.last().time < this.time) continue; - return i; - } - return -1; - } - - position(chunks) { - let index = this.chunkIndex(chunks); - let xFrom = (index + 0.5) * kChunkWidth; - let yFrom = kChunkHeight - chunks[index].yOffset(this); - return [xFrom, yFrom]; - } - - transitions() { - let transitions = Object.create(null); - let current = this; - while (current) { - let edge = current.edge; - if (edge && edge.isTransition()) { - transitions[edge.name] = edge; - } - current = current.parent() - } - return transitions; - } - - get type() { - return this.edge === void 0 ? 'new' : this.edge.type; - } - - isBootstrapped() { - return this.edge === void 0; - } - - getParents() { - let parents = []; - let current = this.parent(); - while (current) { - parents.push(current); - current = current.parent(); - } - return parents; - } - - static get(id, time = undefined) { - let maps = this.cache.get(id); - if (maps) { - for (let i = 0; i < maps.length; i++) { - // TODO: Implement time based map search - if (maps[i].time === time) { - return maps[i]; - } - } - // default return the latest - return maps[maps.length - 1]; - } - } - - static set(id, map) { - if (this.cache.has(id)) { - this.cache.get(id).push(map); - } else { - this.cache.set(id, [map]); - } - } -} - -MapLogEvent.cache = new Map(); - -// =========================================================================== -class Edge { - constructor(type, name, reason, time, from, to) { - this.type = type; - this.name = name; - this.reason = reason; - this.time = time; - this.from = from; - this.to = to; - } - - getColor() { - return transitionTypeToColor(this.type); - } - - finishSetup() { - let from = this.from; - if (from) from.addEdge(this); - let to = this.to; - if (to === undefined) return; - to.edge = this; - if (from === undefined) return; - if (to === from) throw 'From and to must be distinct.'; - if (to.time < from.time) { - console.error('invalid time order'); - } - let newDepth = from.depth + 1; - if (to.depth > 0 && to.depth != newDepth) { - console.error('Depth has already been initialized'); - } - to.depth = newDepth; - } - - chunkIndex(chunks) { - // Did anybody say O(n)? - for (let i = 0; i < chunks.length; i++) { - let chunk = chunks[i]; - if (chunk.isEmpty()) continue; - if (chunk.last().time < this.time) continue; - return i; - } - return -1; - } - - parentEdge() { - if (!this.from) return undefined; - return this.from.edge; - } - - chainLength() { - let length = 0; - let prev = this; - while (prev) { - prev = this.parent; - length++; - } - return length; - } - - isTransition() { - return this.type === 'Transition' - } - - isFastToSlow() { - return this.type === 'Normalize' - } - - isSlowToFast() { - return this.type === 'SlowToFast' - } - - isInitial() { - return this.type === 'InitialMap' - } - - isBootstrapped() { - return this.type === 'new' - } - - isReplaceDescriptors() { - return this.type === 'ReplaceDescriptors' - } - - isCopyAsPrototype() { - return this.reason === 'CopyAsPrototype' - } - - isOptimizeAsPrototype() { - return this.reason === 'OptimizeAsPrototype' - } - - symbol() { - if (this.isTransition()) return '+'; - if (this.isFastToSlow()) return '⊡'; - if (this.isSlowToFast()) return '⊛'; - if (this.isReplaceDescriptors()) { - if (this.name) return '+'; - return '∥'; - } - return ''; - } - - toString() { - let s = this.symbol(); - if (this.isTransition()) return s + this.name; - if (this.isFastToSlow()) return s + this.reason; - if (this.isCopyAsPrototype()) return s + 'Copy as Prototype'; - if (this.isOptimizeAsPrototype()) { - return s + 'Optimize as Prototype'; - } - if (this.isReplaceDescriptors() && this.name) { - return this.type + ' ' + this.symbol() + this.name; - } - return this.type + ' ' + (this.reason ? this.reason : '') + ' ' + - (this.name ? this.name : '') - } -} - - -// =========================================================================== -class ArgumentsProcessor extends BaseArgumentsProcessor { - getArgsDispatch() { - return { - '--range': - ['range', 'auto,auto', 'Specify the range limit as [start],[end]'], - '--source-map': [ - 'sourceMap', null, - 'Specify the source map that should be used for output' - ] - }; - } - - getDefaultResults() { - return { - logFileName: 'v8.log', - range: 'auto,auto', - }; - } -} - -export { MapProcessor, MapLogEvent, kChunkWidth, kChunkHeight}; diff --git a/deps/v8/tools/system-analyzer/processor.mjs b/deps/v8/tools/system-analyzer/processor.mjs new file mode 100644 index 00000000000000..0634174aefb646 --- /dev/null +++ b/deps/v8/tools/system-analyzer/processor.mjs @@ -0,0 +1,347 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import { MapLogEvent, Edge } from "./log/map.mjs"; +import { IcLogEvent } from "./log/ic.mjs"; +import { Timeline } from "./timeline.mjs"; +import { LogReader, parseString, parseVarArgs } from "../logreader.mjs"; +import { Profile } from "../profile.mjs"; + +// =========================================================================== + + +class Processor extends LogReader { + #profile = new Profile(); + #mapTimeline = new Timeline(); + #icTimeline = new Timeline(); + #formatPCRegexp = /(.*):[0-9]+:[0-9]+$/; + MAJOR_VERSION = 7; + MINOR_VERSION = 6; + constructor() { + super(); + this.propertyICParser = [ + parseInt, parseInt, parseInt, parseInt, parseString, parseString, + parseString, parseString, parseString, parseString + ]; + this.dispatchTable_ = { + __proto__: null, + 'code-creation': { + parsers: [ + parseString, parseInt, parseInt, parseInt, parseInt, parseString, + parseVarArgs + ], + processor: this.processCodeCreation + }, + 'v8-version': { + parsers: [ + parseInt, parseInt, + ], + processor: this.processV8Version + }, + 'script-source': { + parsers: [parseInt, parseString, parseString], + processor: this.processScriptSource + }, + 'code-move': + { parsers: [parseInt, parseInt], processor: this.processCodeMove }, + 'code-delete': { parsers: [parseInt], processor: this.processCodeDelete }, + 'sfi-move': + { parsers: [parseInt, parseInt], processor: this.processFunctionMove }, + 'map-create': + { parsers: [parseInt, parseString], processor: this.processMapCreate }, + 'map': { + parsers: [ + parseString, parseInt, parseString, parseString, parseInt, parseInt, + parseInt, parseString, parseString + ], + processor: this.processMap + }, + 'map-details': { + parsers: [parseInt, parseString, parseString], + processor: this.processMapDetails + }, + 'LoadGlobalIC': { + parsers: this.propertyICParser, + processor: this.processPropertyIC.bind(this, 'LoadGlobalIC') + }, + 'StoreGlobalIC': { + parsers: this.propertyICParser, + processor: this.processPropertyIC.bind(this, 'StoreGlobalIC') + }, + 'LoadIC': { + parsers: this.propertyICParser, + processor: this.processPropertyIC.bind(this, 'LoadIC') + }, + 'StoreIC': { + parsers: this.propertyICParser, + processor: this.processPropertyIC.bind(this, 'StoreIC') + }, + 'KeyedLoadIC': { + parsers: this.propertyICParser, + processor: this.processPropertyIC.bind(this, 'KeyedLoadIC') + }, + 'KeyedStoreIC': { + parsers: this.propertyICParser, + processor: this.processPropertyIC.bind(this, 'KeyedStoreIC') + }, + 'StoreInArrayLiteralIC': { + parsers: this.propertyICParser, + processor: this.processPropertyIC.bind(this, 'StoreInArrayLiteralIC') + }, + }; + } + + printError(str) { + console.error(str); + throw str + } + + processString(string) { + let end = string.length; + let current = 0; + let next = 0; + let line; + let i = 0; + let entry; + try { + while (current < end) { + next = string.indexOf('\n', current); + if (next === -1) break; + i++; + line = string.substring(current, next); + current = next + 1; + this.processLogLine(line); + } + } catch (e) { + console.error('Error occurred during parsing, trying to continue: ' + e); + } + this.finalize(); + } + + processLogFile(fileName) { + this.collectEntries = true; + this.lastLogFileName_ = fileName; + let i = 1; + let line; + try { + while (line = readline()) { + this.processLogLine(line); + i++; + } + } catch (e) { + console.error( + 'Error occurred during parsing line ' + i + + ', trying to continue: ' + e); + } + this.finalize(); + } + + finalize() { + // TODO(cbruni): print stats; + this.#mapTimeline.transitions = new Map(); + let id = 0; + this.#mapTimeline.forEach(map => { + if (map.isRoot()) id = map.finalizeRootMap(id + 1); + if (map.edge && map.edge.name) { + let edge = map.edge; + let list = this.#mapTimeline.transitions.get(edge.name); + if (list === undefined) { + this.#mapTimeline.transitions.set(edge.name, [edge]); + } else { + list.push(edge); + } + } + }); + } + + /** + * Parser for dynamic code optimization state. + */ + parseState(s) { + switch (s) { + case '': + return Profile.CodeState.COMPILED; + case '~': + return Profile.CodeState.OPTIMIZABLE; + case '*': + return Profile.CodeState.OPTIMIZED; + } + throw new Error('unknown code state: ' + s); + } + + processCodeCreation(type, kind, timestamp, start, size, name, maybe_func) { + if (maybe_func.length) { + let funcAddr = parseInt(maybe_func[0]); + let state = this.parseState(maybe_func[1]); + this.#profile.addFuncCode( + type, name, timestamp, start, size, funcAddr, state); + } else { + this.#profile.addCode(type, name, timestamp, start, size); + } + } + + + processV8Version(majorVersion, minorVersion) { + if ( + (majorVersion == this.MAJOR_VERSION && minorVersion <= this.MINOR_VERSION) + || (majorVersion < this.MAJOR_VERSION)) { + window.alert( + `Unsupported version ${majorVersion}.${minorVersion}. \n` + + `Please use the matching tool for given the V8 version.`); + } + } + + processScriptSource(scriptId, url, source) { + this.#profile.addScriptSource(scriptId, url, source); + } + + processCodeMove(from, to) { + this.#profile.moveCode(from, to); + } + + processCodeDelete(start) { + this.#profile.deleteCode(start); + } + + processFunctionMove(from, to) { + this.#profile.moveFunc(from, to); + } + + formatName(entry) { + if (!entry) return ''; + let name = entry.func.getName(); + let re = /(.*):[0-9]+:[0-9]+$/; + let array = re.exec(name); + if (!array) return name; + return entry.getState() + array[1]; + } + + processPropertyIC( + type, pc, time, line, column, old_state, new_state, map, key, modifier, + slow_reason) { + let fnName = this.functionName(pc); + let parts = fnName.split(' '); + let fileName = parts[1]; + let script = this.getScript(fileName); + // TODO: Use SourcePosition here directly + let entry = new IcLogEvent( + type, fnName, time, line, column, key, old_state, new_state, map, + slow_reason, script); + if (script) { + entry.sourcePosition = script.addSourcePosition(line, column, entry); + } + this.#icTimeline.push(entry); + } + + functionName(pc) { + let entry = this.#profile.findEntry(pc); + return this.formatName(entry); + } + formatPC(pc, line, column) { + let entry = this.#profile.findEntry(pc); + if (!entry) return '' + if (entry.type === 'Builtin') { + return entry.name; + } + let name = entry.func.getName(); + let array = this.#formatPCRegexp.exec(name); + if (array === null) { + entry = name; + } else { + entry = entry.getState() + array[1]; + } + return entry + ':' + line + ':' + column; + } + + processFileName(filePositionLine) { + if (!(/\s/.test(filePositionLine))) return; + filePositionLine = filePositionLine.split(' '); + let file = filePositionLine[1].split(':')[0]; + return file; + } + + processMap(type, time, from, to, pc, line, column, reason, name) { + let time_ = parseInt(time); + if (type === 'Deprecate') return this.deprecateMap(type, time_, from); + let from_ = this.getExistingMap(from, time_); + let to_ = this.getExistingMap(to, time_); + // TODO: use SourcePosition directly. + let edge = new Edge(type, name, reason, time, from_, to_); + to_.filePosition = this.formatPC(pc, line, column); + let fileName = this.processFileName(to_.filePosition); + to_.script = this.getScript(fileName); + if (to_.script) { + to_.sourcePosition = to_.script.addSourcePosition(line, column, to_) + } + edge.finishSetup(); + } + + deprecateMap(type, time, id) { + this.getExistingMap(id, time).deprecate(); + } + + processMapCreate(time, id) { + // map-create events might override existing maps if the addresses get + // recycled. Hence we do not check for existing maps. + let map = this.createMap(id, time); + } + + processMapDetails(time, id, string) { + // TODO(cbruni): fix initial map logging. + let map = this.getExistingMap(id, time); + map.description = string; + } + + createMap(id, time) { + let map = new MapLogEvent(id, time); + this.#mapTimeline.push(map); + return map; + } + + getExistingMap(id, time) { + if (id === '0x000000000000') return undefined; + let map = MapLogEvent.get(id, time); + if (map === undefined) { + console.error('No map details provided: id=' + id); + // Manually patch in a map to continue running. + return this.createMap(id, time); + }; + return map; + } + + getScript(url) { + const script = this.#profile.getScript(url); + // TODO create placeholder script for empty urls. + if (script === undefined) { + console.error(`Could not find script for url: '${url}'`) + } + return script; + } + + get icTimeline() { + return this.#icTimeline; + } + + get mapTimeline() { + return this.#mapTimeline; + } + + get scripts() { + return this.#profile.scripts_.filter(script => script !== undefined); + } +} + +Processor.kProperties = [ + 'type', + 'category', + 'functionName', + 'filePosition', + 'state', + 'key', + 'map', + 'reason', + 'file' +]; + +export { Processor as default }; diff --git a/deps/v8/tools/system-analyzer/source-panel-template.html b/deps/v8/tools/system-analyzer/source-panel-template.html new file mode 100644 index 00000000000000..102d30ea282d02 --- /dev/null +++ b/deps/v8/tools/system-analyzer/source-panel-template.html @@ -0,0 +1,52 @@ + + + + + + +
+

Source Panel

+
+ + +
+
+

+  
+
diff --git a/deps/v8/tools/system-analyzer/source-panel.mjs b/deps/v8/tools/system-analyzer/source-panel.mjs new file mode 100644 index 00000000000000..a10f2bccd27ab5 --- /dev/null +++ b/deps/v8/tools/system-analyzer/source-panel.mjs @@ -0,0 +1,189 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +import { V8CustomElement, defineCustomElement } from "./helper.mjs"; +import { SelectionEvent, FocusEvent } from "./events.mjs"; +import { MapLogEvent } from "./log/map.mjs"; +import { IcLogEvent } from "./log/ic.mjs"; + +defineCustomElement( + "source-panel", + (templateText) => + class SourcePanel extends V8CustomElement { + #selectedSourcePositions; + #scripts = []; + #script; + constructor() { + super(templateText); + this.scriptDropdown.addEventListener( + 'change', e => this.handleSelectScript(e)); + } + get script() { + return this.$('#script'); + } + get scriptNode() { + return this.$('.scriptNode'); + } + set script(script) { + this.#script = script; + this.renderSourcePanel(); + } + set selectedSourcePositions(sourcePositions) { + this.#selectedSourcePositions = sourcePositions; + } + get selectedSourcePositions() { + return this.#selectedSourcePositions; + } + set data(value) { + this.#scripts = value; + this.initializeScriptDropdown(); + this.script = this.#scripts[0]; + } + get scriptDropdown() { + return this.$("#script-dropdown"); + } + initializeScriptDropdown() { + this.#scripts.sort((a, b) => a.name.localeCompare(b.name)); + let select = this.scriptDropdown; + select.options.length = 0; + for (const script of this.#scripts) { + const option = document.createElement("option"); + option.text = `${script.name} (id=${script.id})`; + option.script = script; + select.add(option); + } + } + + renderSourcePanel() { + const builder = new LineBuilder(this, this.#script); + const scriptNode = builder.createScriptNode(); + const oldScriptNode = this.script.childNodes[1]; + this.script.replaceChild(scriptNode, oldScriptNode); + } + + handleSelectScript(e) { + const option = this.scriptDropdown.options[this.scriptDropdown.selectedIndex]; + this.script = option.script; + } + + handleSourcePositionClick(e) { + let icLogEvents = []; + let mapLogEvents = []; + for (const entry of e.target.sourcePosition.entries) { + if (entry instanceof MapLogEvent) { + mapLogEvents.push(entry); + } else if (entry instanceof IcLogEvent) { + icLogEvents.push(entry); + } + } + if (icLogEvents.length > 0 ) { + this.dispatchEvent(new SelectionEvent(icLogEvents)); + this.dispatchEvent(new FocusEvent(icLogEvents[0])); + } + if (mapLogEvents.length > 0) { + this.dispatchEvent(new SelectionEvent(mapLogEvents)); + this.dispatchEvent(new FocusEvent(mapLogEvents[0])); + } + } + + } +); + + +class SourcePositionIterator { + #entries; + #index = 0; + constructor(sourcePositions) { + this.#entries = sourcePositions; + } + + *forLine(lineIndex) { + while(!this.#done() && this.#current().line === lineIndex) { + yield this.#current(); + this.#next(); + } + } + + #current() { + return this.#entries[this.#index]; + } + + #done() { + return this.#index + 1 >= this.#entries.length; + } + + #next() { + this.#index++; + } +} + +function * lineIterator(source) { + let current = 0; + let line = 1; + while(current < source.length) { + const next = source.indexOf("\n", current); + if (next === -1) break; + yield [line, source.substring(current, next)]; + line++; + current = next + 1; + } + if (current < source.length) yield [line, source.substring(current)]; +} + +class LineBuilder { + #script + #clickHandler + #sourcePositions + + constructor(panel, script) { + this.#script = script; + this.#clickHandler = panel.handleSourcePositionClick.bind(panel); + // TODO: sort on script finalization. + script.sourcePositions.sort((a, b) => { + if (a.line === b.line) return a.column - b.column; + return a.line - b.line; + }) + this.#sourcePositions + = new SourcePositionIterator(script.sourcePositions); + + } + + createScriptNode() { + const scriptNode = document.createElement("pre"); + scriptNode.classList.add('scriptNode'); + for (let [lineIndex, line] of lineIterator(this.#script.source)) { + scriptNode.appendChild(this.#createLineNode(lineIndex, line)); + } + return scriptNode; + } + + #createLineNode(lineIndex, line) { + const lineNode = document.createElement("span"); + let columnIndex = 0; + for (const sourcePosition of this.#sourcePositions.forLine(lineIndex)) { + const nextColumnIndex = sourcePosition.column - 1; + lineNode.appendChild( + document.createTextNode( + line.substring(columnIndex, nextColumnIndex))); + columnIndex = nextColumnIndex; + + lineNode.appendChild( + this.#createMarkerNode(line[columnIndex], sourcePosition)); + columnIndex++; + } + lineNode.appendChild( + document.createTextNode(line.substring(columnIndex) + "\n")); + return lineNode; + } + + #createMarkerNode(text, sourcePosition) { + const marker = document.createElement("mark"); + marker.classList.add('marked'); + marker.textContent = text; + marker.sourcePosition = sourcePosition; + marker.onclick = this.#clickHandler; + return marker; + } + + +} \ No newline at end of file diff --git a/deps/v8/tools/system-analyzer/stats-panel-template.html b/deps/v8/tools/system-analyzer/stats-panel-template.html index 04094b5185aa63..7aa149a5881692 100644 --- a/deps/v8/tools/system-analyzer/stats-panel-template.html +++ b/deps/v8/tools/system-analyzer/stats-panel-template.html @@ -1,9 +1,11 @@ -

Timeline Panel

diff --git a/deps/v8/tools/system-analyzer/timeline-panel.mjs b/deps/v8/tools/system-analyzer/timeline-panel.mjs index 084dccca52c4b8..afe05c24bdd463 100644 --- a/deps/v8/tools/system-analyzer/timeline-panel.mjs +++ b/deps/v8/tools/system-analyzer/timeline-panel.mjs @@ -2,81 +2,92 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {defineCustomElement, V8CustomElement} from './helper.mjs'; +import { defineCustomElement, V8CustomElement } from './helper.mjs'; +import { SynchronizeSelectionEvent } from './events.mjs'; import './timeline/timeline-track.mjs'; defineCustomElement('timeline-panel', (templateText) => - class TimelinePanel extends V8CustomElement { - constructor() { - super(templateText); - this.timelineOverview.addEventListener( - 'mousemove', e => this.handleTimelineIndicatorMove(e)); - this.addEventListener( - 'overviewupdate', e => this.handleOverviewBackgroundUpdate(e)); - this.addEventListener( - 'scrolltrack', e => this.handleTrackScroll(e)); - this.backgroundCanvas = document.createElement('canvas'); - this.isLocked = false; - } + class TimelinePanel extends V8CustomElement { + #timeSelection = { start: 0, end: Infinity }; + constructor() { + super(templateText); + this.timelineOverview.addEventListener( + 'mousemove', e => this.handleTimelineIndicatorMove(e)); + this.addEventListener( + 'scrolltrack', e => this.handleTrackScroll(e)); + this.addEventListener( + SynchronizeSelectionEvent.name, e => this.handleMouseMoveSelection(e)); + this.backgroundCanvas = document.createElement('canvas'); + this.isLocked = false; + } - get timelineOverview() { - return this.$('#timelineOverview'); - } + get timelineOverview() { + return this.$('#timelineOverview'); + } - get timelineOverviewIndicator() { - return this.$('#timelineOverviewIndicator'); - } + get timelineOverviewIndicator() { + return this.$('#timelineOverviewIndicator'); + } - get timelineCanvas() { - return this.timelineTracks[0].timelineCanvas; - } + //TODO(zcankara) Remove dependency to timelineCanvas here + get timelineCanvas() { + return this.timelineTracks[0].timelineCanvas; + } + //TODO(zcankara) Remove dependency to timeline here + get timeline() { + return this.timelineTracks[0].timeline; + } + set nofChunks(count) { + for (const track of this.timelineTracks) { + track.nofChunks = count; + } + } + get nofChunks() { + return this.timelineTracks[0].nofChunks; + } + get timelineTracks() { + return this.$("slot").assignedNodes().filter( + track => track.nodeType === Node.ELEMENT_NODE); + } + handleTrackScroll(event) { + //TODO(zcankara) add forEachTrack helper method + for (const track of this.timelineTracks) { + track.scrollLeft = event.detail; + } + } - get timeline() { - return this.timelineTracks[0].timeline; - } - set nofChunks(count){ - for (const track of this.timelineTracks) { - track.nofChunks = count; + handleMouseMoveSelection(event) { + this.selectionMouseMove(event.start, event.end); } - } - get nofChunks(){ - return this.timelineTracks[0].nofChunks; - } - get timelineTracks(){ - return this.$("slot").assignedNodes().filter( - track => track.nodeType === Node.ELEMENT_NODE); - } - handleTrackScroll(event){ - //TODO(zcankara) add forEachTrack helper method - for (const track of this.timelineTracks) { - track.scrollLeft = event.detail; + + selectionMouseMove(start, end) { + for (const track of this.timelineTracks) { + track.startTime = start; + track.endTime = end; + } } - } - handleTimelineIndicatorMove(event) { - if (event.buttons == 0) return; - let timelineTotalWidth = this.timelineCanvas.offsetWidth; - let factor = this.timelineOverview.offsetWidth / timelineTotalWidth; - for (const track of this.timelineTracks) { - track.timelineIndicatorMove(event.movementX / factor); + + handleTimelineIndicatorMove(event) { + if (event.buttons == 0) return; + let timelineTotalWidth = this.timelineCanvas.offsetWidth; + let factor = this.timelineOverview.offsetWidth / timelineTotalWidth; + for (const track of this.timelineTracks) { + track.timelineIndicatorMove(event.movementX / factor); + } + this.updateOverviewWindow(); } - } - updateOverviewWindow() { - let indicator = this.timelineOverviewIndicator; - let totalIndicatorWidth = + updateOverviewWindow() { + let indicator = this.timelineOverviewIndicator; + let totalIndicatorWidth = this.timelineOverview.offsetWidth; - let div = this.timeline; - let timelineTotalWidth = this.timelineCanvas.offsetWidth; - let factor = totalIndicatorWidth / timelineTotalWidth; - let width = div.offsetWidth * factor; - let left = div.scrollLeft * factor; - indicator.style.width = width + 'px'; - indicator.style.left = left + 'px'; - } - - handleOverviewBackgroundUpdate(e){ - this.timelineOverview.style.backgroundImage = - 'url(' + e.detail + ')'; - } + let div = this.timeline; + let timelineTotalWidth = this.timelineCanvas.offsetWidth; + let factor = totalIndicatorWidth / timelineTotalWidth; + let width = div.offsetWidth * factor; + let left = div.scrollLeft * factor; + indicator.style.width = width + 'px'; + indicator.style.left = left + 'px'; + } -}); + }); diff --git a/deps/v8/tools/system-analyzer/timeline.mjs b/deps/v8/tools/system-analyzer/timeline.mjs index e1f3432f81d1bc..16e12cc4aa4886 100644 --- a/deps/v8/tools/system-analyzer/timeline.mjs +++ b/deps/v8/tools/system-analyzer/timeline.mjs @@ -5,29 +5,30 @@ class Timeline { #values; #selection; + #uniqueTypes; constructor() { this.#values = []; this.startTime = 0; this.endTime = 0; } - get all(){ + get all() { return this.#values; } - get selection(){ + get selection() { return this.#selection; } - set selection(value){ + set selection(value) { this.#selection = value; } - selectTimeRange(start, end){ - this.#selection = this.filter( + selectTimeRange(start, end) { + this.#selection = this.filter( e => e.time >= start && e.time <= end); } - getChunks(windowSizeMs){ + getChunks(windowSizeMs) { //TODO(zcankara) Fill this one return this.chunkSizes(windowSizeMs); } - get values(){ + get values() { //TODO(zcankara) Not to break something delete later return this.#values; } @@ -75,17 +76,35 @@ class Timeline { } first() { - return this.#values.first(); + return this.#values[0]; } last() { - return this.#values.last(); + return this.#values[this.#values.length - 1]; } duration() { return this.last().time - this.first().time; } + groupByTypes() { + this.#uniqueTypes = new Map(); + for (const entry of this.all) { + if (!this.#uniqueTypes.has(entry.type)) { + this.#uniqueTypes.set(entry.type, [entry]); + } else { + this.#uniqueTypes.get(entry.type).push(entry); + } + } + } + + get uniqueTypes() { + if (this.#uniqueTypes === undefined) { + this.groupByTypes(); + } + return this.#uniqueTypes; + } + forEachChunkSize(count, fn) { const increment = this.duration() / count; let currentTime = this.first().time + increment; @@ -216,11 +235,11 @@ class Chunk { return chunk; } - getBreakdown(event_fn){ + getBreakdown(event_fn) { if (event_fn === void 0) { event_fn = each => each; } - let breakdown = {__proto__: null}; + let breakdown = { __proto__: null }; this.items.forEach(each => { const type = event_fn(each); const v = breakdown[type]; @@ -229,10 +248,10 @@ class Chunk { return Object.entries(breakdown).sort((a, b) => a[1] - b[1]); } - filter(){ + filter() { return this.items.filter(map => !map.parent() || !this.has(map.parent())); } } -export {Timeline, Chunk}; +export { Timeline, Chunk }; diff --git a/deps/v8/tools/system-analyzer/timeline/timeline-track-template.html b/deps/v8/tools/system-analyzer/timeline/timeline-track-template.html index f4211750ef2d5e..93f30747be76c7 100644 --- a/deps/v8/tools/system-analyzer/timeline/timeline-track-template.html +++ b/deps/v8/tools/system-analyzer/timeline/timeline-track-template.html @@ -15,11 +15,6 @@ background-color: var(--timeline-background-color); } - #timeline::-webkit-scrollbar { - width: 0; - background-color: transparent; - } - #timelineLabel { transform: rotate(90deg); transform-origin: left bottom 0; @@ -65,29 +60,63 @@ opacity: 0.5; } - #timelineLegend { + #legend { position: relative; float: right; text-align: center; + width: 100%; + max-width: 280px; + padding-left: 20px; + padding-top: 10px; + } + + th, + td { + width: 200px; + text-align: center; + padding: 5px; } .timeline { background-color: var(--timeline-background-color); } - #timelineLegendContent { - float: right; - padding: 20px; - width: 200px; + #timeline .rightHandle, + #timeline .leftHandle { + background-color: rgba(200, 200, 200, 0.5); + height: 100%; + width: 5px; + position: absolute; + z-index: 3; + cursor: col-resize; + } + + #timeline .selection { + background-color: rgba(133, 68, 163, 0.5); + height: 100%; + position: absolute; + z-index: 2; }
-
-

Category

-
-
+
+ + + + + + + + + + + +
ColorTypeCountPercent
+
+
+
Frequency
diff --git a/deps/v8/tools/system-analyzer/timeline/timeline-track.mjs b/deps/v8/tools/system-analyzer/timeline/timeline-track.mjs index cfb0175bd670db..4905b782f22fb0 100644 --- a/deps/v8/tools/system-analyzer/timeline/timeline-track.mjs +++ b/deps/v8/tools/system-analyzer/timeline/timeline-track.mjs @@ -4,31 +4,138 @@ import { defineCustomElement, V8CustomElement, - transitionTypeToColor, CSSColor + typeToColor, CSSColor } from '../helper.mjs'; -import { kChunkWidth, kChunkHeight } from '../map-processor.mjs'; -import { SelectionEvent, FocusEvent, SelectTimeEvent } from '../events.mjs'; +import { kChunkWidth, kChunkHeight } from "../log/map.mjs"; +import { + SelectionEvent, FocusEvent, SelectTimeEvent, + SynchronizeSelectionEvent +} from '../events.mjs'; defineCustomElement('./timeline/timeline-track', (templateText) => class TimelineTrack extends V8CustomElement { + static SELECTION_OFFSET = 20; #timeline; #nofChunks = 400; #chunks; #selectedEntry; #timeToPixel; #timeSelection = { start: 0, end: Infinity }; + #isSelected = false; + #timeStartOffset; + #mouseDownTime; constructor() { super(templateText); - this.timeline.addEventListener("mousedown", - e => this.handleTimeRangeSelectionStart(e)); - this.timeline.addEventListener("mouseup", - e => this.handleTimeRangeSelectionEnd(e)); this.timeline.addEventListener("scroll", e => this.handleTimelineScroll(e)); + this.timeline.addEventListener("mousedown", + e => this.handleTimeSelectionMouseDown(e)); + this.timeline.addEventListener("mouseup", + e => this.handleTimeSelectionMouseUp(e)); + this.timeline.addEventListener("mousemove", + e => this.handleTimeSelectionMouseMove(e)); this.backgroundCanvas = document.createElement('canvas'); this.isLocked = false; } + handleTimeSelectionMouseDown(e) { + if (e.target.className === "chunk") return; + this.#isSelected = true; + this.#mouseDownTime = this.positionToTime(e.clientX); + } + handleTimeSelectionMouseMove(e) { + if (!this.#isSelected) return; + let mouseMoveTime = this.positionToTime(e.clientX); + let startTime = this.#mouseDownTime; + let endTime = mouseMoveTime; + if (this.isOnLeftHandle(e.clientX)) { + startTime = mouseMoveTime; + endTime = this.positionToTime(this.rightHandlePosX); + } else if (this.isOnRightHandle(e.clientX)) { + startTime = this.positionToTime(this.leftHandlePosX); + endTime = mouseMoveTime; + } + this.dispatchEvent(new SynchronizeSelectionEvent( + Math.min(startTime, endTime), + Math.max(startTime, endTime))); + } + handleTimeSelectionMouseUp(e) { + this.#isSelected = false; + this.dispatchEvent(new SelectTimeEvent(this.#timeSelection.start, + this.#timeSelection.end)); + } + isOnLeftHandle(posX) { + return (Math.abs(this.leftHandlePosX - posX) + <= TimelineTrack.SELECTION_OFFSET); + } + isOnRightHandle(posX) { + return (Math.abs(this.rightHandlePosX - posX) + <= TimelineTrack.SELECTION_OFFSET); + } + + + set startTime(value) { + console.assert( + value <= this.#timeSelection.end, + "Selection start time greater than end time!"); + this.#timeSelection.start = value; + this.updateSelection(); + } + set endTime(value) { + console.assert( + value > this.#timeSelection.start, + "Selection end time smaller than start time!"); + this.#timeSelection.end = value; + this.updateSelection(); + } + + updateSelection() { + let startTimePos = this.timeToPosition(this.#timeSelection.start); + let endTimePos = this.timeToPosition(this.#timeSelection.end); + this.leftHandle.style.left = startTimePos + "px"; + this.selection.style.left = startTimePos + "px"; + this.rightHandle.style.left = endTimePos + "px"; + this.selection.style.width = + Math.abs(this.rightHandlePosX - this.leftHandlePosX) + "px"; + } + + get leftHandlePosX() { + let leftHandlePosX = this.leftHandle.getBoundingClientRect().x; + return leftHandlePosX; + } + get rightHandlePosX() { + let rightHandlePosX = this.rightHandle.getBoundingClientRect().x; + return rightHandlePosX; + } + + // Maps the clicked x position to the x position on timeline canvas + positionOnTimeline(posX) { + let rect = this.timeline.getBoundingClientRect(); + let posClickedX = posX - rect.left + this.timeline.scrollLeft; + return posClickedX; + } + + positionToTime(posX) { + let posTimelineX = this.positionOnTimeline(posX) + this.#timeStartOffset; + return posTimelineX / this.#timeToPixel; + } + + timeToPosition(time) { + let posX = time * this.#timeToPixel; + posX -= this.#timeStartOffset + return posX; + } + + get leftHandle() { + return this.$('.leftHandle'); + } + get rightHandle() { + return this.$('.rightHandle'); + } + get selection() { + return this.$('.selection'); + } + get timelineCanvas() { return this.$('#timelineCanvas'); } @@ -41,15 +148,18 @@ defineCustomElement('./timeline/timeline-track', (templateText) => return this.$('#timeline'); } - get timelineLegendContent() { - return this.$('#timelineLegendContent'); + get timelineLegend() { + return this.$('#legend'); } + get timelineLegendContent() { + return this.$('#legendContent'); + } set data(value) { this.#timeline = value; this.updateChunks(); this.updateTimeline(); - this.updateStats(); + this.renderLegend(); } get data() { @@ -82,65 +192,53 @@ defineCustomElement('./timeline/timeline-track', (templateText) => this.timeline.scrollLeft = offset; } - updateStats() { - let unique = new Map(); - for (const entry of this.data.all) { - if (!unique.has(entry.type)) { - unique.set(entry.type, [entry]); - } else { - unique.get(entry.type).push(entry); - } - } - this.renderStatsWindow(unique); - } - - renderStatsWindow(unique) { + renderLegend() { + let timelineLegend = this.timelineLegend; let timelineLegendContent = this.timelineLegendContent; this.removeAllChildren(timelineLegendContent); - let fragment = document.createDocumentFragment(); + let row = this.tr(); + row.entries = this.data.all; + row.classList.add('clickable'); + row.addEventListener('dblclick', e => this.handleEntryTypeDblClick(e)); + row.appendChild(this.td("")); + let td = this.td("All"); + row.appendChild(td); + row.appendChild(this.td(this.data.all.length)); + row.appendChild(this.td("100%")); + timelineLegendContent.appendChild(row); let colorIterator = 0; - unique.forEach((entries, type) => { - let dt = document.createElement("dt"); - dt.innerHTML = entries.length; - dt.style.backgroundColor = transitionTypeToColor(type); - dt.style.color = CSSColor.surfaceColor; - fragment.appendChild(dt); - let dd = document.createElement("dd"); - dd.innerHTML = type; - dd.entries = entries; - dd.addEventListener('dblclick', e => this.handleEntryTypeDblClick(e)); - fragment.appendChild(dd); + this.#timeline.uniqueTypes.forEach((entries, type) => { + let row = this.tr(); + row.entries = entries; + row.classList.add('clickable'); + row.addEventListener('dblclick', e => this.handleEntryTypeDblClick(e)); + let color = typeToColor(type); + if (color !== null) { + let div = this.div(["colorbox"]); + div.style.backgroundColor = color; + row.appendChild(this.td(div)); + } else { + row.appendChild(this.td("")); + } + let td = this.td(type); + row.appendChild(td); + row.appendChild(this.td(entries.length)); + let percent = (entries.length / this.data.all.length) * 100; + row.appendChild(this.td(percent.toFixed(1) + "%")); + timelineLegendContent.appendChild(row); colorIterator += 1; }); - timelineLegendContent.appendChild(fragment); + timelineLegend.appendChild(timelineLegendContent); } handleEntryTypeDblClick(e) { - this.dispatchEvent(new SelectionEvent(e.target.entries)); + this.dispatchEvent(new SelectionEvent(e.target.parentNode.entries)); } timelineIndicatorMove(offset) { this.timeline.scrollLeft += offset; } - handleTimeRangeSelectionStart(e) { - this.#timeSelection.start = this.positionToTime(e.clientX); - } - - handleTimeRangeSelectionEnd(e) { - this.#timeSelection.end = this.positionToTime(e.clientX); - this.dispatchEvent(new SelectTimeEvent( - Math.min(this.#timeSelection.start, this.#timeSelection.end), - Math.max(this.#timeSelection.start, this.#timeSelection.end))); - } - - positionToTime(posX) { - let rect = this.timeline.getBoundingClientRect(); - let posClickedX = posX - rect.left + this.timeline.scrollLeft; - let selectedTime = posClickedX / this.#timeToPixel; - return selectedTime; - } - handleTimelineScroll(e) { let horizontal = e.currentTarget.scrollLeft; this.dispatchEvent(new CustomEvent( @@ -179,14 +277,14 @@ defineCustomElement('./timeline/timeline-track', (templateText) => let type, count; if (true) { chunk.getBreakdown(map => map.type).forEach(([type, count]) => { - ctx.fillStyle = transitionTypeToColor(type); + ctx.fillStyle = typeToColor(type); let height = count / total * kHeight; ctx.fillRect(0, y, kWidth, y + height); y += height; }); } else { chunk.items.forEach(map => { - ctx.fillStyle = transitionTypeToColor(map.type); + ctx.fillStyle = typeToColor(map.type); let y = chunk.yOffset(map); ctx.fillRect(0, y, kWidth, y + 1); }); @@ -205,6 +303,7 @@ defineCustomElement('./timeline/timeline-track', (templateText) => let end = this.data.endTime; let duration = end - start; this.#timeToPixel = chunks.length * kChunkWidth / duration; + this.#timeStartOffset = start * this.#timeToPixel; let addTimestamp = (time, name) => { let timeNode = this.div('timestamp'); timeNode.innerText = name; @@ -219,7 +318,8 @@ defineCustomElement('./timeline/timeline-track', (templateText) => if (chunk.isEmpty()) continue; let node = this.div(); node.className = 'chunk'; - node.style.left = (chunks[i].start * this.#timeToPixel) + 'px'; + node.style.left = + ((chunks[i].start - start) * this.#timeToPixel) + 'px'; node.style.height = height + 'px'; node.chunk = chunk; node.addEventListener('mousemove', e => this.handleChunkMouseMove(e)); @@ -242,7 +342,6 @@ defineCustomElement('./timeline/timeline-track', (templateText) => addTimestamp(time, ((time - start) / 1000) + ' ms'); time += interval; } - this.drawOverview(); this.redraw(); } @@ -269,35 +368,6 @@ defineCustomElement('./timeline/timeline-track', (templateText) => this.dispatchEvent(new SelectionEvent(maps)); } - drawOverview() { - const height = 50; - const kFactor = 2; - let canvas = this.backgroundCanvas; - canvas.height = height; - canvas.width = window.innerWidth; - let ctx = canvas.getContext('2d'); - let chunks = this.data.chunkSizes(canvas.width * kFactor); - let max = chunks.max(); - ctx.clearRect(0, 0, canvas.width, height); - ctx.fillStyle = CSSColor.onBackgroundColor; - ctx.beginPath(); - ctx.moveTo(0, height); - for (let i = 0; i < chunks.length; i++) { - ctx.lineTo(i / kFactor, height - chunks[i] / max * height); - } - ctx.lineTo(chunks.length, height); - ctx.strokeStyle = CSSColor.onBackgroundColor; - ctx.stroke(); - ctx.closePath(); - ctx.fill(); - let imageData = canvas.toDataURL('image/webp', 0.2); - this.dispatchEvent(new CustomEvent( - 'overviewupdate', { - bubbles: true, composed: true, - detail: imageData - })); - } - redraw() { let canvas = this.timelineCanvas; canvas.width = (this.chunks.length + 1) * kChunkWidth; @@ -313,7 +383,7 @@ defineCustomElement('./timeline/timeline-track', (templateText) => } setEdgeStyle(edge, ctx) { - let color = transitionTypeToColor(edge.type); + let color = typeToColor(edge.type); ctx.strokeStyle = color; ctx.fillStyle = color; } @@ -397,7 +467,6 @@ defineCustomElement('./timeline/timeline-track', (templateText) => ctx.lineTo(xTo, yTo); } if (!showLabel) { - ctx.strokeStyle = CSSColor.onBackgroundColor; ctx.stroke(); } else { let centerX, centerY; @@ -408,12 +477,11 @@ defineCustomElement('./timeline/timeline-track', (templateText) => centerX = xTo; centerY = yTo; } - ctx.strokeStyle = CSSColor.onBackgroundColor; ctx.moveTo(centerX, centerY); ctx.lineTo(centerX + offsetX, centerY - labelOffset); ctx.stroke(); ctx.textAlign = 'left'; - ctx.fillStyle = CSSColor.onBackgroundColor; + ctx.fillStyle = typeToColor(edge.type); ctx.fillText( edge.toString(), centerX + offsetX + 2, centerY - labelOffset); } @@ -425,7 +493,6 @@ defineCustomElement('./timeline/timeline-track', (templateText) => if (depth >= max) return; ctx.globalAlpha = 0.5 - depth * (0.3 / max); ctx.strokeStyle = CSSColor.timelineBackgroundColor; - const limit = Math.min(map.children.length, 100) for (let i = 0; i < limit; i++) { let edge = map.children[i]; diff --git a/deps/v8/tools/testrunner/base_runner.py b/deps/v8/tools/testrunner/base_runner.py index 4ca911cc580dd8..d3674a4f8b9ff8 100644 --- a/deps/v8/tools/testrunner/base_runner.py +++ b/deps/v8/tools/testrunner/base_runner.py @@ -169,6 +169,7 @@ def __init__(self, build_config): self.asan = build_config['is_asan'] self.cfi_vptr = build_config['is_cfi'] + self.concurrent_marking = build_config['v8_enable_concurrent_marking'] self.dcheck_always_on = build_config['dcheck_always_on'] self.gcov_coverage = build_config['is_gcov_coverage'] self.is_android = build_config['is_android'] @@ -178,6 +179,8 @@ def __init__(self, build_config): self.msan = build_config['is_msan'] self.no_i18n = not build_config['v8_enable_i18n_support'] self.predictable = build_config['v8_enable_verify_predictable'] + self.simulator_run = (build_config['target_cpu'] != + build_config['v8_target_cpu']) self.tsan = build_config['is_tsan'] # TODO(machenbach): We only have ubsan not ubsan_vptr. self.ubsan_vptr = build_config['is_ubsan_vptr'] @@ -369,6 +372,10 @@ def _add_parser_default_options(self, parser): # Test config parser.add_option("--command-prefix", default="", help="Prepended to each shell command used to run a test") + parser.add_option('--dont-skip-slow-simulator-tests', + help='Don\'t skip more slow tests when using a' + ' simulator.', default=False, action='store_true', + dest='dont_skip_simulator_slow_tests') parser.add_option("--extra-flags", action="append", default=[], help="Additional flags to pass to each test command") parser.add_option("--isolates", action="store_true", default=False, @@ -627,13 +634,12 @@ def _get_statusfile_variables(self, options): self.build_config.arch in ['mipsel', 'mips', 'mips64', 'mips64el'] and self.build_config.mips_arch_variant) - # TODO(machenbach): In GN we can derive simulator run from - # target_arch != v8_target_arch in the dumped build config. return { "arch": self.build_config.arch, "asan": self.build_config.asan, "byteorder": sys.byteorder, "cfi_vptr": self.build_config.cfi_vptr, + "concurrent_marking": self.build_config.concurrent_marking, "dcheck_always_on": self.build_config.dcheck_always_on, "deopt_fuzzer": False, "endurance_fuzzer": False, @@ -652,7 +658,8 @@ def _get_statusfile_variables(self, options): "optimize_for_size": "--optimize-for-size" in options.extra_flags, "predictable": self.build_config.predictable, "simd_mips": simd_mips, - "simulator_run": False, + "simulator_run": self.build_config.simulator_run and + not options.dont_skip_simulator_slow_tests, "system": self.target_os, "tsan": self.build_config.tsan, "ubsan_vptr": self.build_config.ubsan_vptr, diff --git a/deps/v8/tools/testrunner/local/statusfile.py b/deps/v8/tools/testrunner/local/statusfile.py index c8a1b307e41c2f..854abc66554b09 100644 --- a/deps/v8/tools/testrunner/local/statusfile.py +++ b/deps/v8/tools/testrunner/local/statusfile.py @@ -76,6 +76,7 @@ def __init__(self, path, variables): _rules: {variant: {test name: [rule]}} _prefix_rules: {variant: {test name prefix: [rule]}} """ + self.variables = variables with open(path) as f: self._rules, self._prefix_rules = ReadStatusFile(f.read(), variables) diff --git a/deps/v8/tools/testrunner/local/variants.py b/deps/v8/tools/testrunner/local/variants.py index e78571e14f483f..0f8e20536c20ac 100644 --- a/deps/v8/tools/testrunner/local/variants.py +++ b/deps/v8/tools/testrunner/local/variants.py @@ -16,8 +16,12 @@ "jitless": [["--jitless"]], "minor_mc": [["--minor-mc"]], "nci": [["--turbo-nci"]], - "nci_as_highest_tier": [["--turbo-nci-as-highest-tier"]], + "nci_as_midtier": [["--turbo-nci-as-midtier"]], "no_lfa": [["--no-lazy-feedback-allocation"]], + "no_local_heaps": [[ + "--no-local-heaps", + "--no-turbo-direct-heap-access", + "--no-finalize-streaming-on-background"]], # No optimization means disable all optimizations. OptimizeFunctionOnNextCall # would not force optimization too. It turns into a Nop. Please see # https://chromium-review.googlesource.com/c/452620/ for more discussion. @@ -26,8 +30,8 @@ # independent of JS optimizations, so we can combine those configs. "nooptimization": [["--no-opt", "--liftoff", "--no-wasm-tier-up"]], "slow_path": [["--force-slow-path"]], - "stress": [["--stress-opt", "--always-opt", "--no-liftoff", - "--stress-lazy-source-positions"]], + "stress": [["--stress-opt", "--no-liftoff", "--stress-lazy-source-positions"]], + "stress_concurrent_allocation": [["--stress-concurrent-allocation"]], "stress_js_bg_compile_wasm_code_gc": [["--stress-background-compile", "--stress-wasm-code-gc"]], "stress_incremental_marking": [["--stress-incremental-marking"]], @@ -42,6 +46,54 @@ "top_level_await": [["--harmony-top-level-await"]], } +# Flags that lead to a contradiction with the flags provided by the respective +# variant. This depends on the flags specified in ALL_VARIANT_FLAGS and on the +# implications defined in flag-definitions.h. +INCOMPATIBLE_FLAGS_PER_VARIANT = { + "assert_types": ["--no-assert-types"], + "jitless": ["--opt", "--liftoff", "--track-field-types", "--validate-asm"], + "no_wasm_traps": ["--wasm-trap-handler"], + "nooptimization": ["--opt", "--no-liftoff", "--predictable", "--wasm-tier-up"], + "slow_path": ["--no-force-slow-path"], + "stress_incremental_marking": ["--no-stress-incremental-marking"], + "stress_js_bg_compile_wasm_code_gc": ["--no-stress-background-compile"], + "stress": ["--no-stress-opt", "--always-opt", "--no-always-opt", "--liftoff", "--max-inlined-bytecode-size=*", + "--max-inlined-bytecode-size-cumulative=*", "--stress-inline"], + "turboprop": ["--turbo-inlining", "--interrupt-budget=*", "--no-turboprop"], + "code_serializer": ["--cache=after-execute", "--cache=full-code-cache", "--cache=none"], + "no_local_heaps": ["--concurrent-inlining", "--turboprop"], + "experimental_regexp": ["--no-enable-experimental-regexp-engine"], +} + +# Flags that lead to a contradiction under certain build variables. +# This corresponds to the build variables usable in status files as generated +# in _get_statusfile_variables in base_runner.py. +# The conflicts might be directly contradictory flags or be caused by the +# implications defined in flag-definitions.h. +INCOMPATIBLE_FLAGS_PER_BUILD_VARIABLE = { + "lite_mode": ["--no-lazy-feedback-allocation", "--max-semi-space-size=*"] + + INCOMPATIBLE_FLAGS_PER_VARIANT["jitless"], + "predictable": ["--liftoff", "--parallel-compile-tasks", + "--concurrent-recompilation", + "--wasm-num-compilation-tasks=*"], +} + +# Flags that lead to a contradiction when a certain extra-flag is present. +# Such extra-flags are defined for example in infra/testing/builders.pyl or in +# standard_runner.py. +# The conflicts might be directly contradictory flags or be caused by the +# implications defined in flag-definitions.h. +INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = { + "--concurrent-recompilation": ["--no-concurrent-recompilation", "--predictable"], + "--enable-armv8": ["--no-enable-armv8"], + "--gc-interval=*": ["--gc-interval=*"], + "--no-enable-sse3": ["--enable-sse3"], + "--no-enable-sse4-1": ["--enable-sse4-1"], + "--optimize-for-size": ["--max-semi-space-size=*"], + "--stress-flush-bytecode": ["--no-stress-flush-bytecode"], + "--stress-incremental-marking": INCOMPATIBLE_FLAGS_PER_VARIANT["stress_incremental_marking"], +} + SLOW_VARIANTS = set([ 'stress', 'stress_snapshot', diff --git a/deps/v8/tools/testrunner/num_fuzzer.py b/deps/v8/tools/testrunner/num_fuzzer.py index 7777f4c66d8e85..d5b243ba96d444 100755 --- a/deps/v8/tools/testrunner/num_fuzzer.py +++ b/deps/v8/tools/testrunner/num_fuzzer.py @@ -117,6 +117,10 @@ def _process_options(self, options): def _get_default_suite_names(self): return DEFAULT_SUITES + def _runner_flags(self): + """Extra default flags specific to the test runner implementation.""" + return ['--no-abort-on-contradictory-flags'] + def _get_statusfile_variables(self, options): variables = ( super(NumFuzzer, self)._get_statusfile_variables(options)) diff --git a/deps/v8/tools/testrunner/objects/testcase.py b/deps/v8/tools/testrunner/objects/testcase.py index ac4defd2d78d59..72ca01a4214182 100644 --- a/deps/v8/tools/testrunner/objects/testcase.py +++ b/deps/v8/tools/testrunner/objects/testcase.py @@ -34,6 +34,10 @@ from ..local import command from ..local import statusfile from ..local import utils +from ..local.variants import INCOMPATIBLE_FLAGS_PER_VARIANT +from ..local.variants import INCOMPATIBLE_FLAGS_PER_BUILD_VARIABLE +from ..local.variants import INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG + FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)") @@ -84,8 +88,10 @@ def __init__(self, suite, path, name, test_config): # Outcomes self._statusfile_outcomes = None - self.expected_outcomes = None + self._expected_outcomes = None + self._checked_flag_contradictions = False self._statusfile_flags = None + self.expected_failure_reason = None self._prepare_outcomes() @@ -116,7 +122,7 @@ def not_flag(outcome): outcomes = self.suite.statusfile.get_outcomes(self.name, self.variant) self._statusfile_outcomes = filter(not_flag, outcomes) self._statusfile_flags = filter(is_flag, outcomes) - self.expected_outcomes = ( + self._expected_outcomes = ( self._parse_status_file_outcomes(self._statusfile_outcomes)) def _parse_status_file_outcomes(self, outcomes): @@ -141,6 +147,60 @@ def _parse_status_file_outcomes(self, outcomes): return outproc.OUTCOMES_FAIL return expected_outcomes or outproc.OUTCOMES_PASS + def allow_timeouts(self): + if self.expected_outcomes == outproc.OUTCOMES_PASS: + self._expected_outcomes = outproc.OUTCOMES_PASS_OR_TIMEOUT + elif self.expected_outcomes == outproc.OUTCOMES_FAIL: + self._expected_outcomes = outproc.OUTCOMES_FAIL_OR_TIMEOUT + elif statusfile.TIMEOUT not in self.expected_outcomes: + self._expected_outcomes = ( + self.expected_outcomes + [statusfile.TIMEOUT]) + + @property + def expected_outcomes(self): + def normalize_flag(flag): + return flag.replace("_", "-").replace("--no-", "--no") + + def has_flag(conflicting_flag, flags): + conflicting_flag = normalize_flag(conflicting_flag) + if conflicting_flag in flags: + return True + if conflicting_flag.endswith("*"): + return any(flag.startswith(conflicting_flag[:-1]) for flag in flags) + return False + + def check_flags(incompatible_flags, actual_flags, rule): + for incompatible_flag in incompatible_flags: + if has_flag(incompatible_flag, actual_flags): + self._statusfile_outcomes = outproc.OUTCOMES_FAIL + self._expected_outcomes = outproc.OUTCOMES_FAIL + self.expected_failure_reason = ("Rule " + rule + " in " + + "tools/testrunner/local/variants.py expected a flag " + + "contradiction error with " + incompatible_flag + ".") + + if not self._checked_flag_contradictions: + self._checked_flag_contradictions = True + + file_specific_flags = (self._get_source_flags() + self._get_suite_flags() + + self._get_statusfile_flags()) + file_specific_flags = [normalize_flag(flag) for flag in file_specific_flags] + extra_flags = [normalize_flag(flag) for flag in self._get_extra_flags()] + + if self.variant in INCOMPATIBLE_FLAGS_PER_VARIANT: + check_flags(INCOMPATIBLE_FLAGS_PER_VARIANT[self.variant], file_specific_flags, + "INCOMPATIBLE_FLAGS_PER_VARIANT[\""+self.variant+"\"]") + + for variable, incompatible_flags in INCOMPATIBLE_FLAGS_PER_BUILD_VARIABLE.items(): + if self.suite.statusfile.variables[variable]: + check_flags(incompatible_flags, file_specific_flags, + "INCOMPATIBLE_FLAGS_PER_BUILD_VARIABLE[\""+variable+"\"]") + + for extra_flag, incompatible_flags in INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG.items(): + if has_flag(extra_flag, extra_flags): + check_flags(incompatible_flags, file_specific_flags, + "INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG[\""+extra_flag+"\"]") + return self._expected_outcomes + @property def do_skip(self): return (statusfile.SKIP in self._statusfile_outcomes and @@ -183,9 +243,9 @@ def _get_cmd_params(self): """Gets command parameters and combines them in the following order: - files [empty by default] - random seed + - mode flags (based on chosen mode) - extra flags (from command line) - user flags (variant/fuzzer flags) - - mode flags (based on chosen mode) - source flags (from source code) [empty by default] - test-suite flags - statusfile flags @@ -196,9 +256,9 @@ def _get_cmd_params(self): return ( self._get_files_params() + self._get_random_seed_flags() + + self._get_mode_flags() + self._get_extra_flags() + self._get_variant_flags() + - self._get_mode_flags() + self._get_source_flags() + self._get_suite_flags() + self._get_statusfile_flags() diff --git a/deps/v8/tools/testrunner/standard_runner.py b/deps/v8/tools/testrunner/standard_runner.py index 99d36bf2f85044..ff5839111068d5 100755 --- a/deps/v8/tools/testrunner/standard_runner.py +++ b/deps/v8/tools/testrunner/standard_runner.py @@ -28,8 +28,6 @@ from testrunner.testproc.variant import VariantProc -ARCH_GUESS = utils.DefaultArch() - VARIANTS = ['default'] MORE_VARIANTS = [ @@ -109,11 +107,6 @@ def _add_parser_options(self, parser): help='Regard pass|fail tests (run|skip|dontcare)') parser.add_option('--quickcheck', default=False, action='store_true', help=('Quick check mode (skip slow tests)')) - parser.add_option('--dont-skip-slow-simulator-tests', - help='Don\'t skip more slow tests when using a' - ' simulator.', - default=False, action='store_true', - dest='dont_skip_simulator_slow_tests') # Stress modes parser.add_option('--gc-stress', @@ -282,19 +275,10 @@ def _get_statusfile_variables(self, options): variables = ( super(StandardTestRunner, self)._get_statusfile_variables(options)) - simulator_run = ( - not options.dont_skip_simulator_slow_tests and - self.build_config.arch in [ - 'arm64', 'arm', 'mipsel', 'mips', 'mips64', 'mips64el', 'ppc', - 'ppc64', 's390', 's390x'] and - bool(ARCH_GUESS) and - self.build_config.arch != ARCH_GUESS) - variables.update({ 'gc_stress': options.gc_stress or options.random_gc_stress, 'gc_fuzzer': options.random_gc_stress, 'novfp3': options.novfp3, - 'simulator_run': simulator_run, }) return variables diff --git a/deps/v8/tools/testrunner/testproc/expectation.py b/deps/v8/tools/testrunner/testproc/expectation.py index fdc9e3e1b040aa..285a599a742cea 100644 --- a/deps/v8/tools/testrunner/testproc/expectation.py +++ b/deps/v8/tools/testrunner/testproc/expectation.py @@ -14,14 +14,7 @@ def __init__(self): def _next_test(self, test): subtest = self._create_subtest(test, 'no_timeout') - if subtest.expected_outcomes == outproc.OUTCOMES_PASS: - subtest.expected_outcomes = outproc.OUTCOMES_PASS_OR_TIMEOUT - elif subtest.expected_outcomes == outproc.OUTCOMES_FAIL: - subtest.expected_outcomes = outproc.OUTCOMES_FAIL_OR_TIMEOUT - elif statusfile.TIMEOUT not in subtest.expected_outcomes: - subtest.expected_outcomes = ( - subtest.expected_outcomes + [statusfile.TIMEOUT]) - + subtest.allow_timeouts() return self._send_test(subtest) def _result_for(self, test, subtest, result): diff --git a/deps/v8/tools/testrunner/testproc/progress.py b/deps/v8/tools/testrunner/testproc/progress.py index d0e62046f41533..634ef7c2f2e3c0 100644 --- a/deps/v8/tools/testrunner/testproc/progress.py +++ b/deps/v8/tools/testrunner/testproc/progress.py @@ -149,7 +149,7 @@ def _message(self, test, result): outcome = 'FAIL' else: outcome = 'pass' - return 'Done running %s %s: %s' % ( + return '%s %s: %s' % ( test, test.variant or 'default', outcome) def _on_result_for(self, test, result): @@ -269,6 +269,8 @@ def _on_result_for(self, test, result): else: if test.is_fail: self.printFormatted('failure', "--- UNEXPECTED PASS ---") + if test.expected_failure_reason != None: + self.printFormatted('failure', test.expected_failure_reason) else: self.printFormatted('failure', "--- FAILED ---") diff --git a/deps/v8/tools/tick-processor.html b/deps/v8/tools/tick-processor.html index 32f8d6608ef8ab..ecb794ec949c5b 100644 --- a/deps/v8/tools/tick-processor.html +++ b/deps/v8/tools/tick-processor.html @@ -42,24 +42,17 @@ margin-top: 0px; } - - - - - - - - - - - - + diff --git a/deps/v8/tools/tickprocessor-driver.mjs b/deps/v8/tools/tickprocessor-driver.mjs new file mode 100644 index 00000000000000..a8cce2f708f2cf --- /dev/null +++ b/deps/v8/tools/tickprocessor-driver.mjs @@ -0,0 +1,88 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import { WebInspector} from "./sourcemap.mjs"; +import { + ArgumentsProcessor, TickProcessor, UnixCppEntriesProvider, + WindowsCppEntriesProvider, MacCppEntriesProvider, readFile, + } from "./tickprocessor.mjs"; + +// Tick Processor's code flow. + +function processArguments(args) { + var processor = new ArgumentsProcessor(args); + if (processor.parse()) { + return processor.result(); + } else { + processor.printUsageAndExit(); + } +} + +function initSourceMapSupport() { + // Pull dev tools source maps into our name space. + SourceMap = WebInspector.SourceMap; + + // Overwrite the load function to load scripts synchronously. + SourceMap.load = function(sourceMapURL) { + var content = readFile(sourceMapURL); + var sourceMapObject = (JSON.parse(content)); + return new SourceMap(sourceMapURL, sourceMapObject); + }; +} + +var entriesProviders = { + 'unix': UnixCppEntriesProvider, + 'windows': WindowsCppEntriesProvider, + 'mac': MacCppEntriesProvider +}; + +var params = processArguments(arguments); +var sourceMap = null; +if (params.sourceMap) { + initSourceMapSupport(); + sourceMap = SourceMap.load(params.sourceMap); +} +var tickProcessor = new TickProcessor( + new (entriesProviders[params.platform])(params.nm, params.objdump, params.targetRootFS, + params.apkEmbeddedLibrary), + params.separateIc, + params.separateBytecodes, + params.separateBuiltins, + params.separateStubs, + params.callGraphSize, + params.ignoreUnknown, + params.stateFilter, + params.distortion, + params.range, + sourceMap, + params.timedRange, + params.pairwiseTimedRange, + params.onlySummary, + params.runtimeTimerFilter, + params.preprocessJson); +tickProcessor.processLogFile(params.logFileName); +tickProcessor.printStatistics(); diff --git a/deps/v8/tools/tickprocessor.mjs b/deps/v8/tools/tickprocessor.mjs new file mode 100644 index 00000000000000..b5aff3b23f57fd --- /dev/null +++ b/deps/v8/tools/tickprocessor.mjs @@ -0,0 +1,983 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import { LogReader, parseString, parseVarArgs } from "./logreader.mjs"; +import { BaseArgumentsProcessor, parseBool } from "./arguments.mjs"; +import { Profile, JsonProfile } from "./profile.mjs"; +import { ViewBuilder } from "./profile_view.mjs"; + + +export function inherits(childCtor, parentCtor) { + childCtor.prototype.__proto__ = parentCtor.prototype; +}; + + +function V8Profile(separateIc, separateBytecodes, separateBuiltins, + separateStubs) { + Profile.call(this); + var regexps = []; + if (!separateIc) regexps.push(V8Profile.IC_RE); + if (!separateBytecodes) regexps.push(V8Profile.BYTECODES_RE); + if (!separateBuiltins) regexps.push(V8Profile.BUILTINS_RE); + if (!separateStubs) regexps.push(V8Profile.STUBS_RE); + if (regexps.length > 0) { + this.skipThisFunction = function(name) { + for (var i=0; i this.range_end) { + return; + } + this.ticks_.total++; + if (vmState == TickProcessor.VmStates.GC) this.ticks_.gc++; + if (!this.includeTick(vmState)) { + this.ticks_.excluded++; + return; + } + if (is_external_callback) { + // Don't use PC when in external callback code, as it can point + // inside callback's code, and we will erroneously report + // that a callback calls itself. Instead we use tos_or_external_callback, + // as simply resetting PC will produce unaccounted ticks. + pc = tos_or_external_callback; + tos_or_external_callback = 0; + } else if (tos_or_external_callback) { + // Find out, if top of stack was pointing inside a JS function + // meaning that we have encountered a frameless invocation. + var funcEntry = this.profile_.findEntry(tos_or_external_callback); + if (!funcEntry || !funcEntry.isJSFunction || !funcEntry.isJSFunction()) { + tos_or_external_callback = 0; + } + } + + this.profile_.recordTick( + ns_since_start, vmState, + this.processStack(pc, tos_or_external_callback, stack)); +}; + + +TickProcessor.prototype.advanceDistortion = function() { + this.distortion += this.distortion_per_entry; +} + + +TickProcessor.prototype.processHeapSampleBegin = function(space, state, ticks) { + if (space != 'Heap') return; + this.currentProducerProfile_ = new CallTree(); +}; + + +TickProcessor.prototype.processHeapSampleEnd = function(space, state) { + if (space != 'Heap' || !this.currentProducerProfile_) return; + + print('Generation ' + this.generation_ + ':'); + var tree = this.currentProducerProfile_; + tree.computeTotalWeights(); + var producersView = this.viewBuilder_.buildView(tree); + // Sort by total time, desc, then by name, desc. + producersView.sort(function(rec1, rec2) { + return rec2.totalTime - rec1.totalTime || + (rec2.internalFuncName < rec1.internalFuncName ? -1 : 1); }); + this.printHeavyProfile(producersView.head.children); + + this.currentProducerProfile_ = null; + this.generation_++; +}; + + +TickProcessor.prototype.printStatistics = function() { + if (this.preprocessJson) { + this.profile_.writeJson(); + return; + } + + print('Statistical profiling result from ' + this.lastLogFileName_ + + ', (' + this.ticks_.total + + ' ticks, ' + this.ticks_.unaccounted + ' unaccounted, ' + + this.ticks_.excluded + ' excluded).'); + + if (this.ticks_.total == 0) return; + + var flatProfile = this.profile_.getFlatProfile(); + var flatView = this.viewBuilder_.buildView(flatProfile); + // Sort by self time, desc, then by name, desc. + flatView.sort(function(rec1, rec2) { + return rec2.selfTime - rec1.selfTime || + (rec2.internalFuncName < rec1.internalFuncName ? -1 : 1); }); + var totalTicks = this.ticks_.total; + if (this.ignoreUnknown_) { + totalTicks -= this.ticks_.unaccounted; + } + var printAllTicks = !this.onlySummary_; + + // Count library ticks + var flatViewNodes = flatView.head.children; + var self = this; + + var libraryTicks = 0; + if(printAllTicks) this.printHeader('Shared libraries'); + this.printEntries(flatViewNodes, totalTicks, null, + function(name) { return self.isSharedLibrary(name); }, + function(rec) { libraryTicks += rec.selfTime; }, printAllTicks); + var nonLibraryTicks = totalTicks - libraryTicks; + + var jsTicks = 0; + if(printAllTicks) this.printHeader('JavaScript'); + this.printEntries(flatViewNodes, totalTicks, nonLibraryTicks, + function(name) { return self.isJsCode(name); }, + function(rec) { jsTicks += rec.selfTime; }, printAllTicks); + + var cppTicks = 0; + if(printAllTicks) this.printHeader('C++'); + this.printEntries(flatViewNodes, totalTicks, nonLibraryTicks, + function(name) { return self.isCppCode(name); }, + function(rec) { cppTicks += rec.selfTime; }, printAllTicks); + + this.printHeader('Summary'); + this.printLine('JavaScript', jsTicks, totalTicks, nonLibraryTicks); + this.printLine('C++', cppTicks, totalTicks, nonLibraryTicks); + this.printLine('GC', this.ticks_.gc, totalTicks, nonLibraryTicks); + this.printLine('Shared libraries', libraryTicks, totalTicks, null); + if (!this.ignoreUnknown_ && this.ticks_.unaccounted > 0) { + this.printLine('Unaccounted', this.ticks_.unaccounted, + this.ticks_.total, null); + } + + if(printAllTicks) { + print('\n [C++ entry points]:'); + print(' ticks cpp total name'); + var c_entry_functions = this.profile_.getCEntryProfile(); + var total_c_entry = c_entry_functions[0].ticks; + for (var i = 1; i < c_entry_functions.length; i++) { + const c = c_entry_functions[i]; + this.printLine(c.name, c.ticks, total_c_entry, totalTicks); + } + + this.printHeavyProfHeader(); + var heavyProfile = this.profile_.getBottomUpProfile(); + var heavyView = this.viewBuilder_.buildView(heavyProfile); + // To show the same percentages as in the flat profile. + heavyView.head.totalTime = totalTicks; + // Sort by total time, desc, then by name, desc. + heavyView.sort(function(rec1, rec2) { + return rec2.totalTime - rec1.totalTime || + (rec2.internalFuncName < rec1.internalFuncName ? -1 : 1); }); + this.printHeavyProfile(heavyView.head.children); + } +}; + + +function padLeft(s, len) { + s = s.toString(); + if (s.length < len) { + var padLength = len - s.length; + if (!(padLength in padLeft)) { + padLeft[padLength] = new Array(padLength + 1).join(' '); + } + s = padLeft[padLength] + s; + } + return s; +}; + + +TickProcessor.prototype.printHeader = function(headerTitle) { + print('\n [' + headerTitle + ']:'); + print(' ticks total nonlib name'); +}; + + +TickProcessor.prototype.printLine = function( + entry, ticks, totalTicks, nonLibTicks) { + var pct = ticks * 100 / totalTicks; + var nonLibPct = nonLibTicks != null + ? padLeft((ticks * 100 / nonLibTicks).toFixed(1), 5) + '% ' + : ' '; + print(' ' + padLeft(ticks, 5) + ' ' + + padLeft(pct.toFixed(1), 5) + '% ' + + nonLibPct + + entry); +} + +TickProcessor.prototype.printHeavyProfHeader = function() { + print('\n [Bottom up (heavy) profile]:'); + print(' Note: percentage shows a share of a particular caller in the ' + + 'total\n' + + ' amount of its parent calls.'); + print(' Callers occupying less than ' + + TickProcessor.CALL_PROFILE_CUTOFF_PCT.toFixed(1) + + '% are not shown.\n'); + print(' ticks parent name'); +}; + + +TickProcessor.prototype.processProfile = function( + profile, filterP, func) { + for (var i = 0, n = profile.length; i < n; ++i) { + var rec = profile[i]; + if (!filterP(rec.internalFuncName)) { + continue; + } + func(rec); + } +}; + +TickProcessor.prototype.getLineAndColumn = function(name) { + var re = /:([0-9]+):([0-9]+)$/; + var array = re.exec(name); + if (!array) { + return null; + } + return {line: array[1], column: array[2]}; +} + +TickProcessor.prototype.hasSourceMap = function() { + return this.sourceMap != null; +}; + + +TickProcessor.prototype.formatFunctionName = function(funcName) { + if (!this.hasSourceMap()) { + return funcName; + } + var lc = this.getLineAndColumn(funcName); + if (lc == null) { + return funcName; + } + // in source maps lines and columns are zero based + var lineNumber = lc.line - 1; + var column = lc.column - 1; + var entry = this.sourceMap.findEntry(lineNumber, column); + var sourceFile = entry[2]; + var sourceLine = entry[3] + 1; + var sourceColumn = entry[4] + 1; + + return sourceFile + ':' + sourceLine + ':' + sourceColumn + ' -> ' + funcName; +}; + +TickProcessor.prototype.printEntries = function( + profile, totalTicks, nonLibTicks, filterP, callback, printAllTicks) { + var that = this; + this.processProfile(profile, filterP, function (rec) { + if (rec.selfTime == 0) return; + callback(rec); + var funcName = that.formatFunctionName(rec.internalFuncName); + if(printAllTicks) { + that.printLine(funcName, rec.selfTime, totalTicks, nonLibTicks); + } + }); +}; + + +TickProcessor.prototype.printHeavyProfile = function(profile, opt_indent) { + var self = this; + var indent = opt_indent || 0; + var indentStr = padLeft('', indent); + this.processProfile(profile, function() { return true; }, function (rec) { + // Cut off too infrequent callers. + if (rec.parentTotalPercent < TickProcessor.CALL_PROFILE_CUTOFF_PCT) return; + var funcName = self.formatFunctionName(rec.internalFuncName); + print(' ' + padLeft(rec.totalTime, 5) + ' ' + + padLeft(rec.parentTotalPercent.toFixed(1), 5) + '% ' + + indentStr + funcName); + // Limit backtrace depth. + if (indent < 2 * self.callGraphSize_) { + self.printHeavyProfile(rec.children, indent + 2); + } + // Delimit top-level functions. + if (indent == 0) { + print(''); + } + }); +}; + + +function CppEntriesProvider() { +}; + + +CppEntriesProvider.prototype.parseVmSymbols = function( + libName, libStart, libEnd, libASLRSlide, processorFunc) { + this.loadSymbols(libName); + + var lastUnknownSize; + var lastAdded; + + function inRange(funcInfo, start, end) { + return funcInfo.start >= start && funcInfo.end <= end; + } + + function addEntry(funcInfo) { + // Several functions can be mapped onto the same address. To avoid + // creating zero-sized entries, skip such duplicates. + // Also double-check that function belongs to the library address space. + + if (lastUnknownSize && + lastUnknownSize.start < funcInfo.start) { + // Try to update lastUnknownSize based on new entries start position. + lastUnknownSize.end = funcInfo.start; + if ((!lastAdded || !inRange(lastUnknownSize, lastAdded.start, + lastAdded.end)) && + inRange(lastUnknownSize, libStart, libEnd)) { + processorFunc(lastUnknownSize.name, lastUnknownSize.start, + lastUnknownSize.end); + lastAdded = lastUnknownSize; + } + } + lastUnknownSize = undefined; + + if (funcInfo.end) { + // Skip duplicates that have the same start address as the last added. + if ((!lastAdded || lastAdded.start != funcInfo.start) && + inRange(funcInfo, libStart, libEnd)) { + processorFunc(funcInfo.name, funcInfo.start, funcInfo.end); + lastAdded = funcInfo; + } + } else { + // If a funcInfo doesn't have an end, try to match it up with then next + // entry. + lastUnknownSize = funcInfo; + } + } + + while (true) { + var funcInfo = this.parseNextLine(); + if (funcInfo === null) { + continue; + } else if (funcInfo === false) { + break; + } + if (funcInfo.start < libStart - libASLRSlide && + funcInfo.start < libEnd - libStart) { + funcInfo.start += libStart; + } else { + funcInfo.start += libASLRSlide; + } + if (funcInfo.size) { + funcInfo.end = funcInfo.start + funcInfo.size; + } + addEntry(funcInfo); + } + addEntry({name: '', start: libEnd}); +}; + + +CppEntriesProvider.prototype.loadSymbols = function(libName) { +}; + + +CppEntriesProvider.prototype.parseNextLine = function() { + return false; +}; + + +export function UnixCppEntriesProvider(nmExec, objdumpExec, targetRootFS, apkEmbeddedLibrary) { + this.symbols = []; + // File offset of a symbol minus the virtual address of a symbol found in + // the symbol table. + this.fileOffsetMinusVma = 0; + this.parsePos = 0; + this.nmExec = nmExec; + this.objdumpExec = objdumpExec; + this.targetRootFS = targetRootFS; + this.apkEmbeddedLibrary = apkEmbeddedLibrary; + this.FUNC_RE = /^([0-9a-fA-F]{8,16}) ([0-9a-fA-F]{8,16} )?[tTwW] (.*)$/; +}; +inherits(UnixCppEntriesProvider, CppEntriesProvider); + + +UnixCppEntriesProvider.prototype.loadSymbols = function(libName) { + this.parsePos = 0; + if (this.apkEmbeddedLibrary && libName.endsWith('.apk')) { + libName = this.apkEmbeddedLibrary; + } + if (this.targetRootFS) { + libName = libName.substring(libName.lastIndexOf('/') + 1); + libName = this.targetRootFS + libName; + } + try { + this.symbols = [ + os.system(this.nmExec, ['-C', '-n', '-S', libName], -1, -1), + os.system(this.nmExec, ['-C', '-n', '-S', '-D', libName], -1, -1) + ]; + + const objdumpOutput = os.system(this.objdumpExec, ['-h', libName], -1, -1); + for (const line of objdumpOutput.split('\n')) { + const [,sectionName,,vma,,fileOffset] = line.trim().split(/\s+/); + if (sectionName === ".text") { + this.fileOffsetMinusVma = parseInt(fileOffset, 16) - parseInt(vma, 16); + } + } + } catch (e) { + // If the library cannot be found on this system let's not panic. + this.symbols = ['', '']; + } +}; + + +UnixCppEntriesProvider.prototype.parseNextLine = function() { + if (this.symbols.length == 0) { + return false; + } + var lineEndPos = this.symbols[0].indexOf('\n', this.parsePos); + if (lineEndPos == -1) { + this.symbols.shift(); + this.parsePos = 0; + return this.parseNextLine(); + } + + var line = this.symbols[0].substring(this.parsePos, lineEndPos); + this.parsePos = lineEndPos + 1; + var fields = line.match(this.FUNC_RE); + var funcInfo = null; + if (fields) { + funcInfo = { name: fields[3], start: parseInt(fields[1], 16) + this.fileOffsetMinusVma }; + if (fields[2]) { + funcInfo.size = parseInt(fields[2], 16); + } + } + return funcInfo; +}; + + +export function MacCppEntriesProvider(nmExec, objdumpExec, targetRootFS, apkEmbeddedLibrary) { + UnixCppEntriesProvider.call(this, nmExec, objdumpExec, targetRootFS, apkEmbeddedLibrary); + // Note an empty group. It is required, as UnixCppEntriesProvider expects 3 groups. + this.FUNC_RE = /^([0-9a-fA-F]{8,16})() (.*)$/; +}; +inherits(MacCppEntriesProvider, UnixCppEntriesProvider); + + +MacCppEntriesProvider.prototype.loadSymbols = function(libName) { + this.parsePos = 0; + libName = this.targetRootFS + libName; + + // It seems that in OS X `nm` thinks that `-f` is a format option, not a + // "flat" display option flag. + try { + this.symbols = [os.system(this.nmExec, ['-n', libName], -1, -1), '']; + } catch (e) { + // If the library cannot be found on this system let's not panic. + this.symbols = ''; + } +}; + + +export function WindowsCppEntriesProvider(_ignored_nmExec, _ignored_objdumpExec, targetRootFS, + _ignored_apkEmbeddedLibrary) { + this.targetRootFS = targetRootFS; + this.symbols = ''; + this.parsePos = 0; +}; +inherits(WindowsCppEntriesProvider, CppEntriesProvider); + + +WindowsCppEntriesProvider.FILENAME_RE = /^(.*)\.([^.]+)$/; + + +WindowsCppEntriesProvider.FUNC_RE = + /^\s+0001:[0-9a-fA-F]{8}\s+([_\?@$0-9a-zA-Z]+)\s+([0-9a-fA-F]{8}).*$/; + + +WindowsCppEntriesProvider.IMAGE_BASE_RE = + /^\s+0000:00000000\s+___ImageBase\s+([0-9a-fA-F]{8}).*$/; + + +// This is almost a constant on Windows. +WindowsCppEntriesProvider.EXE_IMAGE_BASE = 0x00400000; + + +WindowsCppEntriesProvider.prototype.loadSymbols = function(libName) { + libName = this.targetRootFS + libName; + var fileNameFields = libName.match(WindowsCppEntriesProvider.FILENAME_RE); + if (!fileNameFields) return; + var mapFileName = fileNameFields[1] + '.map'; + this.moduleType_ = fileNameFields[2].toLowerCase(); + try { + this.symbols = read(mapFileName); + } catch (e) { + // If .map file cannot be found let's not panic. + this.symbols = ''; + } +}; + + +WindowsCppEntriesProvider.prototype.parseNextLine = function() { + var lineEndPos = this.symbols.indexOf('\r\n', this.parsePos); + if (lineEndPos == -1) { + return false; + } + + var line = this.symbols.substring(this.parsePos, lineEndPos); + this.parsePos = lineEndPos + 2; + + // Image base entry is above all other symbols, so we can just + // terminate parsing. + var imageBaseFields = line.match(WindowsCppEntriesProvider.IMAGE_BASE_RE); + if (imageBaseFields) { + var imageBase = parseInt(imageBaseFields[1], 16); + if ((this.moduleType_ == 'exe') != + (imageBase == WindowsCppEntriesProvider.EXE_IMAGE_BASE)) { + return false; + } + } + + var fields = line.match(WindowsCppEntriesProvider.FUNC_RE); + return fields ? + { name: this.unmangleName(fields[1]), start: parseInt(fields[2], 16) } : + null; +}; + + +/** + * Performs very simple unmangling of C++ names. + * + * Does not handle arguments and template arguments. The mangled names have + * the form: + * + * ?LookupInDescriptor@JSObject@internal@v8@@...arguments info... + */ +WindowsCppEntriesProvider.prototype.unmangleName = function(name) { + // Empty or non-mangled name. + if (name.length < 1 || name.charAt(0) != '?') return name; + var nameEndPos = name.indexOf('@@'); + var components = name.substring(1, nameEndPos).split('@'); + components.reverse(); + return components.join('::'); +}; + + +export class ArgumentsProcessor extends BaseArgumentsProcessor { + getArgsDispatch() { + let dispatch = { + '-j': ['stateFilter', TickProcessor.VmStates.JS, + 'Show only ticks from JS VM state'], + '-g': ['stateFilter', TickProcessor.VmStates.GC, + 'Show only ticks from GC VM state'], + '-p': ['stateFilter', TickProcessor.VmStates.PARSER, + 'Show only ticks from PARSER VM state'], + '-b': ['stateFilter', TickProcessor.VmStates.BYTECODE_COMPILER, + 'Show only ticks from BYTECODE_COMPILER VM state'], + '-c': ['stateFilter', TickProcessor.VmStates.COMPILER, + 'Show only ticks from COMPILER VM state'], + '-o': ['stateFilter', TickProcessor.VmStates.OTHER, + 'Show only ticks from OTHER VM state'], + '-e': ['stateFilter', TickProcessor.VmStates.EXTERNAL, + 'Show only ticks from EXTERNAL VM state'], + '--filter-runtime-timer': ['runtimeTimerFilter', null, + 'Show only ticks matching the given runtime timer scope'], + '--call-graph-size': ['callGraphSize', TickProcessor.CALL_GRAPH_SIZE, + 'Set the call graph size'], + '--ignore-unknown': ['ignoreUnknown', true, + 'Exclude ticks of unknown code entries from processing'], + '--separate-ic': ['separateIc', parseBool, + 'Separate IC entries'], + '--separate-bytecodes': ['separateBytecodes', parseBool, + 'Separate Bytecode entries'], + '--separate-builtins': ['separateBuiltins', parseBool, + 'Separate Builtin entries'], + '--separate-stubs': ['separateStubs', parseBool, + 'Separate Stub entries'], + '--unix': ['platform', 'unix', + 'Specify that we are running on *nix platform'], + '--windows': ['platform', 'windows', + 'Specify that we are running on Windows platform'], + '--mac': ['platform', 'mac', + 'Specify that we are running on Mac OS X platform'], + '--nm': ['nm', 'nm', + 'Specify the \'nm\' executable to use (e.g. --nm=/my_dir/nm)'], + '--objdump': ['objdump', 'objdump', + 'Specify the \'objdump\' executable to use (e.g. --objdump=/my_dir/objdump)'], + '--target': ['targetRootFS', '', + 'Specify the target root directory for cross environment'], + '--apk-embedded-library': ['apkEmbeddedLibrary', '', + 'Specify the path of the embedded library for Android traces'], + '--range': ['range', 'auto,auto', + 'Specify the range limit as [start],[end]'], + '--distortion': ['distortion', 0, + 'Specify the logging overhead in picoseconds'], + '--source-map': ['sourceMap', null, + 'Specify the source map that should be used for output'], + '--timed-range': ['timedRange', true, + 'Ignore ticks before first and after last Date.now() call'], + '--pairwise-timed-range': ['pairwiseTimedRange', true, + 'Ignore ticks outside pairs of Date.now() calls'], + '--only-summary': ['onlySummary', true, + 'Print only tick summary, exclude other information'], + '--preprocess': ['preprocessJson', true, + 'Preprocess for consumption with web interface'] + }; + dispatch['--js'] = dispatch['-j']; + dispatch['--gc'] = dispatch['-g']; + dispatch['--compiler'] = dispatch['-c']; + dispatch['--other'] = dispatch['-o']; + dispatch['--external'] = dispatch['-e']; + dispatch['--ptr'] = dispatch['--pairwise-timed-range']; + return dispatch; + } + + getDefaultResults() { + return { + logFileName: 'v8.log', + platform: 'unix', + stateFilter: null, + callGraphSize: 5, + ignoreUnknown: false, + separateIc: true, + separateBytecodes: false, + separateBuiltins: true, + separateStubs: true, + preprocessJson: null, + targetRootFS: '', + nm: 'nm', + objdump: 'objdump', + range: 'auto,auto', + distortion: 0, + timedRange: false, + pairwiseTimedRange: false, + onlySummary: false, + runtimeTimerFilter: null, + }; + } +} diff --git a/deps/v8/tools/trace-maps-processor.py b/deps/v8/tools/trace-maps-processor.py deleted file mode 100755 index 4a29eab5dbed1b..00000000000000 --- a/deps/v8/tools/trace-maps-processor.py +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/env python -# Copyright 2014 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# for py2/py3 compatibility -from __future__ import print_function - -import sys - - -action = sys.argv[1] - -if action in ["help", "-h", "--help"] or len(sys.argv) != 3: - print("Usage: %s , where action can be: \n" - "help Print this message\n" - "plain Print ASCII tree to stdout\n" - "dot Print dot file to stdout\n" - "count Count most frequent transition reasons\n" % sys.argv[0]) - sys.exit(0) - - -filename = sys.argv[2] -maps = {} -root_maps = [] -transitions = {} -annotations = {} - - -class Map(object): - - def __init__(self, pointer, origin): - self.pointer = pointer - self.origin = origin - - def __str__(self): - return "%s (%s)" % (self.pointer, self.origin) - - -class Transition(object): - - def __init__(self, from_map, to_map, reason): - self.from_map = from_map - self.to_map = to_map - self.reason = reason - - -def RegisterNewMap(raw_map): - if raw_map in annotations: - annotations[raw_map] += 1 - else: - annotations[raw_map] = 0 - return AnnotateExistingMap(raw_map) - - -def AnnotateExistingMap(raw_map): - return "%s_%d" % (raw_map, annotations[raw_map]) - - -def AddMap(pointer, origin): - pointer = RegisterNewMap(pointer) - maps[pointer] = Map(pointer, origin) - return pointer - - -def AddTransition(from_map, to_map, reason): - from_map = AnnotateExistingMap(from_map) - to_map = AnnotateExistingMap(to_map) - if from_map not in transitions: - transitions[from_map] = {} - targets = transitions[from_map] - if to_map in targets: - # Some events get printed twice, that's OK. In some cases, ignore the - # second output... - old_reason = targets[to_map].reason - if old_reason.startswith("ReplaceDescriptors"): - return - # ...and in others use it for additional detail. - if reason in []: - targets[to_map].reason = reason - return - # Unexpected duplicate events? Warn. - print("// warning: already have a transition from %s to %s, reason: %s" % - (from_map, to_map, targets[to_map].reason)) - return - targets[to_map] = Transition(from_map, to_map, reason) - - -with open(filename, "r") as f: - last_to_map = "" - for line in f: - if not line.startswith("[TraceMaps: "): continue - words = line.split(" ") - event = words[1] - if event == "InitialMap": - assert words[2] == "map=" - assert words[4] == "SFI=" - new_map = AddMap(words[3], "SFI#%s" % words[5]) - root_maps.append(new_map) - continue - if words[2] == "from=" and words[4] == "to=": - from_map = words[3] - to_map = words[5] - if from_map not in annotations: - print("// warning: unknown from_map %s" % from_map) - new_map = AddMap(from_map, "") - root_maps.append(new_map) - if to_map != last_to_map: - AddMap(to_map, " (%s)" % event) - last_to_map = to_map - if event in ["Transition", "NoTransition"]: - assert words[6] == "name=", line - reason = "%s: %s" % (event, words[7]) - elif event in ["Normalize", "ReplaceDescriptors", "SlowToFast"]: - assert words[6] == "reason=", line - reason = "%s: %s" % (event, words[7]) - if words[8].strip() != "]": - reason = "%s_%s" % (reason, words[8]) - else: - reason = event - AddTransition(from_map, to_map, reason) - continue - - -def PlainPrint(m, indent, label): - print("%s%s (%s)" % (indent, m, label)) - if m in transitions: - for t in transitions[m]: - PlainPrint(t, indent + " ", transitions[m][t].reason) - - -def CountTransitions(m): - if m not in transitions: return 0 - return len(transitions[m]) - - -def DotPrint(m, label): - print("m%s [label=\"%s\"]" % (m[2:], label)) - if m in transitions: - for t in transitions[m]: - # GraphViz doesn't like node labels looking like numbers, so use - # "m..." instead of "0x...". - print("m%s -> m%s" % (m[2:], t[2:])) - reason = transitions[m][t].reason - reason = reason.replace("\\", "BACKSLASH") - reason = reason.replace("\"", "\\\"") - DotPrint(t, reason) - - -if action == "plain": - root_maps = sorted(root_maps, key=CountTransitions, reverse=True) - for m in root_maps: - PlainPrint(m, "", maps[m].origin) - -elif action == "dot": - print("digraph g {") - for m in root_maps: - DotPrint(m, maps[m].origin) - print("}") - -elif action == "count": - reasons = {} - for s in transitions: - for t in transitions[s]: - reason = transitions[s][t].reason - if reason not in reasons: - reasons[reason] = 1 - else: - reasons[reason] += 1 - reasons_list = [] - for r in reasons: - reasons_list.append("%8d %s" % (reasons[r], r)) - reasons_list.sort(reverse=True) - for r in reasons_list[:20]: - print(r) diff --git a/deps/v8/tools/unittests/run_tests_test.py b/deps/v8/tools/unittests/run_tests_test.py index 8b3275172d55a4..4cd2bdefd512f1 100755 --- a/deps/v8/tools/unittests/run_tests_test.py +++ b/deps/v8/tools/unittests/run_tests_test.py @@ -177,7 +177,7 @@ def testPass(self): 'sweet/bananas', 'sweet/raspberries', ) - self.assertIn('Done running sweet/bananas default: pass', result.stdout, result) + self.assertIn('sweet/bananas default: pass', result.stdout, result) # TODO(majeski): Implement for test processors # self.assertIn('Total time:', result.stderr, result) # self.assertIn('sweet/bananas', result.stderr, result) @@ -199,10 +199,8 @@ def testShardedProc(self): # One of the shards gets one variant of each test. self.assertIn('2 tests ran', result.stdout, result) if shard == 1: - self.assertIn( - 'Done running sweet/raspberries default', result.stdout, result) - self.assertIn( - 'Done running sweet/raspberries stress', result.stdout, result) + self.assertIn('sweet/raspberries default', result.stdout, result) + self.assertIn('sweet/raspberries stress', result.stdout, result) self.assertEqual(0, result.returncode, result) else: self.assertIn( @@ -227,8 +225,8 @@ def testSharded(self): ) # One of the shards gets one variant of each test. self.assertIn('Running 2 tests', result.stdout, result) - self.assertIn('Done running sweet/bananas', result.stdout, result) - self.assertIn('Done running sweet/raspberries', result.stdout, result) + self.assertIn('sweet/bananas', result.stdout, result) + self.assertIn('sweet/raspberries', result.stdout, result) self.assertEqual(0, result.returncode, result) def testFail(self): @@ -241,7 +239,7 @@ def testFail(self): 'sweet/strawberries', infra_staging=False, ) - self.assertIn('Done running sweet/strawberries default: FAIL', result.stdout, result) + self.assertIn('sweet/strawberries default: FAIL', result.stdout, result) self.assertEqual(1, result.returncode, result) def check_cleaned_json_output( @@ -289,7 +287,7 @@ def testFailWithRerunAndJSON(self): 'sweet/strawberries', infra_staging=False, ) - self.assertIn('Done running sweet/strawberries default: FAIL', result.stdout, result) + self.assertIn('sweet/strawberries default: FAIL', result.stdout, result) # With test processors we don't count reruns as separated failures. # TODO(majeski): fix it? self.assertIn('1 tests failed', result.stdout, result) @@ -317,8 +315,7 @@ def testFlakeWithRerunAndJSON(self): 'sweet', infra_staging=False, ) - self.assertIn( - 'Done running sweet/bananaflakes default: pass', result.stdout, result) + self.assertIn('sweet/bananaflakes default: pass', result.stdout, result) self.assertIn('All tests succeeded', result.stdout, result) self.assertEqual(0, result.returncode, result) self.maxDiff = None @@ -489,8 +486,7 @@ def testPredictable(self): infra_staging=False, ) self.assertIn('1 tests ran', result.stdout, result) - self.assertIn( - 'Done running sweet/bananas default: FAIL', result.stdout, result) + self.assertIn('sweet/bananas default: FAIL', result.stdout, result) self.assertIn('Test had no allocation output', result.stdout, result) self.assertIn('--predictable --verify-predictable', result.stdout, result) self.assertEqual(1, result.returncode, result) @@ -624,7 +620,7 @@ def testExitAfterNFailures(self): self.assertIn('sweet/strawberries default: FAIL', result.stdout, result) self.assertIn('Too many failures, exiting...', result.stdout, result) self.assertIn('sweet/blackberries default: FAIL', result.stdout, result) - self.assertNotIn('Done running sweet/raspberries', result.stdout, result) + self.assertNotIn('sweet/raspberries', result.stdout, result) self.assertIn('2 tests failed', result.stdout, result) self.assertIn('3 tests ran', result.stdout, result) self.assertEqual(1, result.returncode, result) diff --git a/deps/v8/tools/unittests/testdata/testroot1/v8_build_config.json b/deps/v8/tools/unittests/testdata/testroot1/v8_build_config.json index 8b294d9d520155..8f8efc4f58cf52 100644 --- a/deps/v8/tools/unittests/testdata/testroot1/v8_build_config.json +++ b/deps/v8/tools/unittests/testdata/testroot1/v8_build_config.json @@ -17,6 +17,7 @@ "v8_enable_i18n_support": true, "v8_enable_verify_predictable": false, "v8_target_cpu": "x64", + "v8_enable_concurrent_marking": true, "v8_enable_verify_csa": false, "v8_enable_lite_mode": false, "v8_enable_pointer_compression": true diff --git a/deps/v8/tools/unittests/testdata/testroot2/v8_build_config.json b/deps/v8/tools/unittests/testdata/testroot2/v8_build_config.json index c375b30f794e6a..7134998e1f245e 100644 --- a/deps/v8/tools/unittests/testdata/testroot2/v8_build_config.json +++ b/deps/v8/tools/unittests/testdata/testroot2/v8_build_config.json @@ -17,6 +17,7 @@ "v8_enable_i18n_support": true, "v8_enable_verify_predictable": false, "v8_target_cpu": "x64", + "v8_enable_concurrent_marking": true, "v8_enable_verify_csa": false, "v8_enable_lite_mode": false, "v8_enable_pointer_compression": false diff --git a/deps/v8/tools/v8heapconst.py b/deps/v8/tools/v8heapconst.py index 31cc9d2a9a23bb..d8e81c49096356 100644 --- a/deps/v8/tools/v8heapconst.py +++ b/deps/v8/tools/v8heapconst.py @@ -205,97 +205,97 @@ # List of known V8 maps. KNOWN_MAPS = { - ("read_only_space", 0x02115): (167, "FreeSpaceMap"), - ("read_only_space", 0x0213d): (170, "MetaMap"), - ("read_only_space", 0x02181): (67, "NullMap"), - ("read_only_space", 0x021b9): (162, "DescriptorArrayMap"), - ("read_only_space", 0x021e9): (156, "WeakFixedArrayMap"), - ("read_only_space", 0x02211): (166, "OnePointerFillerMap"), - ("read_only_space", 0x02239): (166, "TwoPointerFillerMap"), - ("read_only_space", 0x0227d): (67, "UninitializedMap"), - ("read_only_space", 0x022c1): (8, "OneByteInternalizedStringMap"), - ("read_only_space", 0x0231d): (67, "UndefinedMap"), - ("read_only_space", 0x02351): (66, "HeapNumberMap"), - ("read_only_space", 0x02395): (67, "TheHoleMap"), - ("read_only_space", 0x023f5): (67, "BooleanMap"), - ("read_only_space", 0x0247d): (131, "ByteArrayMap"), - ("read_only_space", 0x024a5): (117, "FixedArrayMap"), - ("read_only_space", 0x024cd): (117, "FixedCOWArrayMap"), - ("read_only_space", 0x024f5): (118, "HashTableMap"), - ("read_only_space", 0x0251d): (64, "SymbolMap"), - ("read_only_space", 0x02545): (40, "OneByteStringMap"), - ("read_only_space", 0x0256d): (129, "ScopeInfoMap"), - ("read_only_space", 0x02595): (175, "SharedFunctionInfoMap"), - ("read_only_space", 0x025bd): (159, "CodeMap"), - ("read_only_space", 0x025e5): (158, "CellMap"), - ("read_only_space", 0x0260d): (174, "GlobalPropertyCellMap"), - ("read_only_space", 0x02635): (70, "ForeignMap"), - ("read_only_space", 0x0265d): (157, "TransitionArrayMap"), - ("read_only_space", 0x02685): (45, "ThinOneByteStringMap"), - ("read_only_space", 0x026ad): (165, "FeedbackVectorMap"), - ("read_only_space", 0x02701): (67, "ArgumentsMarkerMap"), - ("read_only_space", 0x02761): (67, "ExceptionMap"), - ("read_only_space", 0x027bd): (67, "TerminationExceptionMap"), - ("read_only_space", 0x02825): (67, "OptimizedOutMap"), - ("read_only_space", 0x02885): (67, "StaleRegisterMap"), - ("read_only_space", 0x028c9): (130, "ScriptContextTableMap"), - ("read_only_space", 0x028f1): (127, "ClosureFeedbackCellArrayMap"), - ("read_only_space", 0x02919): (164, "FeedbackMetadataArrayMap"), - ("read_only_space", 0x02941): (117, "ArrayListMap"), - ("read_only_space", 0x02969): (65, "BigIntMap"), - ("read_only_space", 0x02991): (128, "ObjectBoilerplateDescriptionMap"), - ("read_only_space", 0x029b9): (132, "BytecodeArrayMap"), - ("read_only_space", 0x029e1): (160, "CodeDataContainerMap"), - ("read_only_space", 0x02a09): (161, "CoverageInfoMap"), - ("read_only_space", 0x02a31): (133, "FixedDoubleArrayMap"), - ("read_only_space", 0x02a59): (120, "GlobalDictionaryMap"), - ("read_only_space", 0x02a81): (97, "ManyClosuresCellMap"), - ("read_only_space", 0x02aa9): (117, "ModuleInfoMap"), - ("read_only_space", 0x02ad1): (121, "NameDictionaryMap"), - ("read_only_space", 0x02af9): (97, "NoClosuresCellMap"), - ("read_only_space", 0x02b21): (122, "NumberDictionaryMap"), - ("read_only_space", 0x02b49): (97, "OneClosureCellMap"), - ("read_only_space", 0x02b71): (123, "OrderedHashMapMap"), - ("read_only_space", 0x02b99): (124, "OrderedHashSetMap"), - ("read_only_space", 0x02bc1): (125, "OrderedNameDictionaryMap"), - ("read_only_space", 0x02be9): (172, "PreparseDataMap"), - ("read_only_space", 0x02c11): (173, "PropertyArrayMap"), - ("read_only_space", 0x02c39): (93, "SideEffectCallHandlerInfoMap"), - ("read_only_space", 0x02c61): (93, "SideEffectFreeCallHandlerInfoMap"), - ("read_only_space", 0x02c89): (93, "NextCallSideEffectFreeCallHandlerInfoMap"), - ("read_only_space", 0x02cb1): (126, "SimpleNumberDictionaryMap"), - ("read_only_space", 0x02cd9): (149, "SmallOrderedHashMapMap"), - ("read_only_space", 0x02d01): (150, "SmallOrderedHashSetMap"), - ("read_only_space", 0x02d29): (151, "SmallOrderedNameDictionaryMap"), - ("read_only_space", 0x02d51): (152, "SourceTextModuleMap"), - ("read_only_space", 0x02d79): (153, "SyntheticModuleMap"), - ("read_only_space", 0x02da1): (155, "UncompiledDataWithoutPreparseDataMap"), - ("read_only_space", 0x02dc9): (154, "UncompiledDataWithPreparseDataMap"), - ("read_only_space", 0x02df1): (71, "WasmTypeInfoMap"), - ("read_only_space", 0x02e19): (181, "WeakArrayListMap"), - ("read_only_space", 0x02e41): (119, "EphemeronHashTableMap"), - ("read_only_space", 0x02e69): (163, "EmbedderDataArrayMap"), - ("read_only_space", 0x02e91): (182, "WeakCellMap"), - ("read_only_space", 0x02eb9): (32, "StringMap"), - ("read_only_space", 0x02ee1): (41, "ConsOneByteStringMap"), - ("read_only_space", 0x02f09): (33, "ConsStringMap"), - ("read_only_space", 0x02f31): (37, "ThinStringMap"), - ("read_only_space", 0x02f59): (35, "SlicedStringMap"), - ("read_only_space", 0x02f81): (43, "SlicedOneByteStringMap"), - ("read_only_space", 0x02fa9): (34, "ExternalStringMap"), - ("read_only_space", 0x02fd1): (42, "ExternalOneByteStringMap"), - ("read_only_space", 0x02ff9): (50, "UncachedExternalStringMap"), - ("read_only_space", 0x03021): (0, "InternalizedStringMap"), - ("read_only_space", 0x03049): (2, "ExternalInternalizedStringMap"), - ("read_only_space", 0x03071): (10, "ExternalOneByteInternalizedStringMap"), - ("read_only_space", 0x03099): (18, "UncachedExternalInternalizedStringMap"), - ("read_only_space", 0x030c1): (26, "UncachedExternalOneByteInternalizedStringMap"), - ("read_only_space", 0x030e9): (58, "UncachedExternalOneByteStringMap"), - ("read_only_space", 0x03111): (67, "SelfReferenceMarkerMap"), - ("read_only_space", 0x03139): (67, "BasicBlockCountersMarkerMap"), - ("read_only_space", 0x0316d): (96, "EnumCacheMap"), - ("read_only_space", 0x031bd): (87, "ArrayBoilerplateDescriptionMap"), - ("read_only_space", 0x032a9): (99, "InterceptorInfoMap"), + ("read_only_space", 0x02115): (170, "MetaMap"), + ("read_only_space", 0x0213d): (67, "NullMap"), + ("read_only_space", 0x02165): (162, "DescriptorArrayMap"), + ("read_only_space", 0x0218d): (156, "WeakFixedArrayMap"), + ("read_only_space", 0x021cd): (96, "EnumCacheMap"), + ("read_only_space", 0x02201): (117, "FixedArrayMap"), + ("read_only_space", 0x0224d): (8, "OneByteInternalizedStringMap"), + ("read_only_space", 0x02299): (167, "FreeSpaceMap"), + ("read_only_space", 0x022c1): (166, "OnePointerFillerMap"), + ("read_only_space", 0x022e9): (166, "TwoPointerFillerMap"), + ("read_only_space", 0x02311): (67, "UninitializedMap"), + ("read_only_space", 0x02389): (67, "UndefinedMap"), + ("read_only_space", 0x023cd): (66, "HeapNumberMap"), + ("read_only_space", 0x02401): (67, "TheHoleMap"), + ("read_only_space", 0x02461): (67, "BooleanMap"), + ("read_only_space", 0x02505): (131, "ByteArrayMap"), + ("read_only_space", 0x0252d): (117, "FixedCOWArrayMap"), + ("read_only_space", 0x02555): (118, "HashTableMap"), + ("read_only_space", 0x0257d): (64, "SymbolMap"), + ("read_only_space", 0x025a5): (40, "OneByteStringMap"), + ("read_only_space", 0x025cd): (129, "ScopeInfoMap"), + ("read_only_space", 0x025f5): (175, "SharedFunctionInfoMap"), + ("read_only_space", 0x0261d): (159, "CodeMap"), + ("read_only_space", 0x02645): (158, "CellMap"), + ("read_only_space", 0x0266d): (174, "GlobalPropertyCellMap"), + ("read_only_space", 0x02695): (70, "ForeignMap"), + ("read_only_space", 0x026bd): (157, "TransitionArrayMap"), + ("read_only_space", 0x026e5): (45, "ThinOneByteStringMap"), + ("read_only_space", 0x0270d): (165, "FeedbackVectorMap"), + ("read_only_space", 0x0273d): (67, "ArgumentsMarkerMap"), + ("read_only_space", 0x0279d): (67, "ExceptionMap"), + ("read_only_space", 0x027f9): (67, "TerminationExceptionMap"), + ("read_only_space", 0x02861): (67, "OptimizedOutMap"), + ("read_only_space", 0x028c1): (67, "StaleRegisterMap"), + ("read_only_space", 0x02921): (130, "ScriptContextTableMap"), + ("read_only_space", 0x02949): (127, "ClosureFeedbackCellArrayMap"), + ("read_only_space", 0x02971): (164, "FeedbackMetadataArrayMap"), + ("read_only_space", 0x02999): (117, "ArrayListMap"), + ("read_only_space", 0x029c1): (65, "BigIntMap"), + ("read_only_space", 0x029e9): (128, "ObjectBoilerplateDescriptionMap"), + ("read_only_space", 0x02a11): (132, "BytecodeArrayMap"), + ("read_only_space", 0x02a39): (160, "CodeDataContainerMap"), + ("read_only_space", 0x02a61): (161, "CoverageInfoMap"), + ("read_only_space", 0x02a89): (133, "FixedDoubleArrayMap"), + ("read_only_space", 0x02ab1): (120, "GlobalDictionaryMap"), + ("read_only_space", 0x02ad9): (97, "ManyClosuresCellMap"), + ("read_only_space", 0x02b01): (117, "ModuleInfoMap"), + ("read_only_space", 0x02b29): (121, "NameDictionaryMap"), + ("read_only_space", 0x02b51): (97, "NoClosuresCellMap"), + ("read_only_space", 0x02b79): (122, "NumberDictionaryMap"), + ("read_only_space", 0x02ba1): (97, "OneClosureCellMap"), + ("read_only_space", 0x02bc9): (123, "OrderedHashMapMap"), + ("read_only_space", 0x02bf1): (124, "OrderedHashSetMap"), + ("read_only_space", 0x02c19): (125, "OrderedNameDictionaryMap"), + ("read_only_space", 0x02c41): (172, "PreparseDataMap"), + ("read_only_space", 0x02c69): (173, "PropertyArrayMap"), + ("read_only_space", 0x02c91): (93, "SideEffectCallHandlerInfoMap"), + ("read_only_space", 0x02cb9): (93, "SideEffectFreeCallHandlerInfoMap"), + ("read_only_space", 0x02ce1): (93, "NextCallSideEffectFreeCallHandlerInfoMap"), + ("read_only_space", 0x02d09): (126, "SimpleNumberDictionaryMap"), + ("read_only_space", 0x02d31): (149, "SmallOrderedHashMapMap"), + ("read_only_space", 0x02d59): (150, "SmallOrderedHashSetMap"), + ("read_only_space", 0x02d81): (151, "SmallOrderedNameDictionaryMap"), + ("read_only_space", 0x02da9): (152, "SourceTextModuleMap"), + ("read_only_space", 0x02dd1): (153, "SyntheticModuleMap"), + ("read_only_space", 0x02df9): (155, "UncompiledDataWithoutPreparseDataMap"), + ("read_only_space", 0x02e21): (154, "UncompiledDataWithPreparseDataMap"), + ("read_only_space", 0x02e49): (71, "WasmTypeInfoMap"), + ("read_only_space", 0x02e71): (181, "WeakArrayListMap"), + ("read_only_space", 0x02e99): (119, "EphemeronHashTableMap"), + ("read_only_space", 0x02ec1): (163, "EmbedderDataArrayMap"), + ("read_only_space", 0x02ee9): (182, "WeakCellMap"), + ("read_only_space", 0x02f11): (32, "StringMap"), + ("read_only_space", 0x02f39): (41, "ConsOneByteStringMap"), + ("read_only_space", 0x02f61): (33, "ConsStringMap"), + ("read_only_space", 0x02f89): (37, "ThinStringMap"), + ("read_only_space", 0x02fb1): (35, "SlicedStringMap"), + ("read_only_space", 0x02fd9): (43, "SlicedOneByteStringMap"), + ("read_only_space", 0x03001): (34, "ExternalStringMap"), + ("read_only_space", 0x03029): (42, "ExternalOneByteStringMap"), + ("read_only_space", 0x03051): (50, "UncachedExternalStringMap"), + ("read_only_space", 0x03079): (0, "InternalizedStringMap"), + ("read_only_space", 0x030a1): (2, "ExternalInternalizedStringMap"), + ("read_only_space", 0x030c9): (10, "ExternalOneByteInternalizedStringMap"), + ("read_only_space", 0x030f1): (18, "UncachedExternalInternalizedStringMap"), + ("read_only_space", 0x03119): (26, "UncachedExternalOneByteInternalizedStringMap"), + ("read_only_space", 0x03141): (58, "UncachedExternalOneByteStringMap"), + ("read_only_space", 0x03169): (67, "SelfReferenceMarkerMap"), + ("read_only_space", 0x03191): (67, "BasicBlockCountersMarkerMap"), + ("read_only_space", 0x031d5): (87, "ArrayBoilerplateDescriptionMap"), + ("read_only_space", 0x032a5): (99, "InterceptorInfoMap"), ("read_only_space", 0x05399): (72, "PromiseFulfillReactionJobTaskMap"), ("read_only_space", 0x053c1): (73, "PromiseRejectReactionJobTaskMap"), ("read_only_space", 0x053e9): (74, "CallableTaskMap"), @@ -365,50 +365,50 @@ # List of known V8 objects. KNOWN_OBJECTS = { - ("read_only_space", 0x02165): "NullValue", - ("read_only_space", 0x021a9): "EmptyDescriptorArray", - ("read_only_space", 0x021e1): "EmptyWeakFixedArray", - ("read_only_space", 0x02261): "UninitializedValue", - ("read_only_space", 0x02301): "UndefinedValue", - ("read_only_space", 0x02345): "NanValue", - ("read_only_space", 0x02379): "TheHoleValue", - ("read_only_space", 0x023cd): "HoleNanValue", - ("read_only_space", 0x023d9): "TrueValue", - ("read_only_space", 0x02441): "FalseValue", - ("read_only_space", 0x02471): "empty_string", - ("read_only_space", 0x026d5): "EmptyScopeInfo", - ("read_only_space", 0x026dd): "EmptyFixedArray", - ("read_only_space", 0x026e5): "ArgumentsMarker", - ("read_only_space", 0x02745): "Exception", - ("read_only_space", 0x027a1): "TerminationException", - ("read_only_space", 0x02809): "OptimizedOut", - ("read_only_space", 0x02869): "StaleRegister", - ("read_only_space", 0x03161): "EmptyEnumCache", - ("read_only_space", 0x03195): "EmptyPropertyArray", - ("read_only_space", 0x0319d): "EmptyByteArray", - ("read_only_space", 0x031a5): "EmptyObjectBoilerplateDescription", - ("read_only_space", 0x031b1): "EmptyArrayBoilerplateDescription", - ("read_only_space", 0x031e5): "EmptyClosureFeedbackCellArray", - ("read_only_space", 0x031ed): "EmptySlowElementDictionary", - ("read_only_space", 0x03211): "EmptyOrderedHashMap", - ("read_only_space", 0x03225): "EmptyOrderedHashSet", - ("read_only_space", 0x03239): "EmptyFeedbackMetadata", - ("read_only_space", 0x03245): "EmptyPropertyCell", - ("read_only_space", 0x03259): "EmptyPropertyDictionary", - ("read_only_space", 0x03281): "NoOpInterceptorInfo", - ("read_only_space", 0x032d1): "EmptyWeakArrayList", - ("read_only_space", 0x032dd): "InfinityValue", - ("read_only_space", 0x032e9): "MinusZeroValue", - ("read_only_space", 0x032f5): "MinusInfinityValue", - ("read_only_space", 0x03301): "SelfReferenceMarker", - ("read_only_space", 0x03341): "BasicBlockCountersMarker", - ("read_only_space", 0x03385): "OffHeapTrampolineRelocationInfo", - ("read_only_space", 0x03391): "TrampolineTrivialCodeDataContainer", - ("read_only_space", 0x0339d): "TrampolinePromiseRejectionCodeDataContainer", - ("read_only_space", 0x033a9): "GlobalThisBindingScopeInfo", - ("read_only_space", 0x033e1): "EmptyFunctionScopeInfo", - ("read_only_space", 0x03409): "NativeScopeInfo", - ("read_only_space", 0x03425): "HashSeed", + ("read_only_space", 0x021b5): "EmptyWeakFixedArray", + ("read_only_space", 0x021bd): "EmptyDescriptorArray", + ("read_only_space", 0x021f5): "EmptyEnumCache", + ("read_only_space", 0x02229): "EmptyFixedArray", + ("read_only_space", 0x02231): "NullValue", + ("read_only_space", 0x02339): "UninitializedValue", + ("read_only_space", 0x023b1): "UndefinedValue", + ("read_only_space", 0x023f5): "NanValue", + ("read_only_space", 0x02429): "TheHoleValue", + ("read_only_space", 0x02455): "HoleNanValue", + ("read_only_space", 0x02489): "TrueValue", + ("read_only_space", 0x024c9): "FalseValue", + ("read_only_space", 0x024f9): "empty_string", + ("read_only_space", 0x02735): "EmptyScopeInfo", + ("read_only_space", 0x02765): "ArgumentsMarker", + ("read_only_space", 0x027c5): "Exception", + ("read_only_space", 0x02821): "TerminationException", + ("read_only_space", 0x02889): "OptimizedOut", + ("read_only_space", 0x028e9): "StaleRegister", + ("read_only_space", 0x031b9): "EmptyPropertyArray", + ("read_only_space", 0x031c1): "EmptyByteArray", + ("read_only_space", 0x031c9): "EmptyObjectBoilerplateDescription", + ("read_only_space", 0x031fd): "EmptyArrayBoilerplateDescription", + ("read_only_space", 0x03209): "EmptyClosureFeedbackCellArray", + ("read_only_space", 0x03211): "EmptySlowElementDictionary", + ("read_only_space", 0x03235): "EmptyOrderedHashMap", + ("read_only_space", 0x03249): "EmptyOrderedHashSet", + ("read_only_space", 0x0325d): "EmptyFeedbackMetadata", + ("read_only_space", 0x03269): "EmptyPropertyCell", + ("read_only_space", 0x0327d): "EmptyPropertyDictionary", + ("read_only_space", 0x032cd): "NoOpInterceptorInfo", + ("read_only_space", 0x032f5): "EmptyWeakArrayList", + ("read_only_space", 0x03301): "InfinityValue", + ("read_only_space", 0x0330d): "MinusZeroValue", + ("read_only_space", 0x03319): "MinusInfinityValue", + ("read_only_space", 0x03325): "SelfReferenceMarker", + ("read_only_space", 0x03365): "BasicBlockCountersMarker", + ("read_only_space", 0x033a9): "OffHeapTrampolineRelocationInfo", + ("read_only_space", 0x033b5): "TrampolineTrivialCodeDataContainer", + ("read_only_space", 0x033c1): "TrampolinePromiseRejectionCodeDataContainer", + ("read_only_space", 0x033cd): "GlobalThisBindingScopeInfo", + ("read_only_space", 0x03405): "EmptyFunctionScopeInfo", + ("read_only_space", 0x0342d): "NativeScopeInfo", + ("read_only_space", 0x03449): "HashSeed", ("old_space", 0x02115): "ArgumentsIteratorAccessor", ("old_space", 0x02159): "ArrayLengthAccessor", ("old_space", 0x0219d): "BoundFunctionLengthAccessor", @@ -444,27 +444,27 @@ ("old_space", 0x02a61): "StringSplitCache", ("old_space", 0x02e69): "RegExpMultipleCache", ("old_space", 0x03271): "BuiltinsConstantsTable", - ("old_space", 0x03645): "AsyncFunctionAwaitRejectSharedFun", - ("old_space", 0x0366d): "AsyncFunctionAwaitResolveSharedFun", - ("old_space", 0x03695): "AsyncGeneratorAwaitRejectSharedFun", - ("old_space", 0x036bd): "AsyncGeneratorAwaitResolveSharedFun", - ("old_space", 0x036e5): "AsyncGeneratorYieldResolveSharedFun", - ("old_space", 0x0370d): "AsyncGeneratorReturnResolveSharedFun", - ("old_space", 0x03735): "AsyncGeneratorReturnClosedRejectSharedFun", - ("old_space", 0x0375d): "AsyncGeneratorReturnClosedResolveSharedFun", - ("old_space", 0x03785): "AsyncIteratorValueUnwrapSharedFun", - ("old_space", 0x037ad): "PromiseAllResolveElementSharedFun", - ("old_space", 0x037d5): "PromiseAllSettledResolveElementSharedFun", - ("old_space", 0x037fd): "PromiseAllSettledRejectElementSharedFun", - ("old_space", 0x03825): "PromiseAnyRejectElementSharedFun", - ("old_space", 0x0384d): "PromiseCapabilityDefaultRejectSharedFun", - ("old_space", 0x03875): "PromiseCapabilityDefaultResolveSharedFun", - ("old_space", 0x0389d): "PromiseCatchFinallySharedFun", - ("old_space", 0x038c5): "PromiseGetCapabilitiesExecutorSharedFun", - ("old_space", 0x038ed): "PromiseThenFinallySharedFun", - ("old_space", 0x03915): "PromiseThrowerFinallySharedFun", - ("old_space", 0x0393d): "PromiseValueThunkFinallySharedFun", - ("old_space", 0x03965): "ProxyRevokeSharedFun", + ("old_space", 0x0364d): "AsyncFunctionAwaitRejectSharedFun", + ("old_space", 0x03675): "AsyncFunctionAwaitResolveSharedFun", + ("old_space", 0x0369d): "AsyncGeneratorAwaitRejectSharedFun", + ("old_space", 0x036c5): "AsyncGeneratorAwaitResolveSharedFun", + ("old_space", 0x036ed): "AsyncGeneratorYieldResolveSharedFun", + ("old_space", 0x03715): "AsyncGeneratorReturnResolveSharedFun", + ("old_space", 0x0373d): "AsyncGeneratorReturnClosedRejectSharedFun", + ("old_space", 0x03765): "AsyncGeneratorReturnClosedResolveSharedFun", + ("old_space", 0x0378d): "AsyncIteratorValueUnwrapSharedFun", + ("old_space", 0x037b5): "PromiseAllResolveElementSharedFun", + ("old_space", 0x037dd): "PromiseAllSettledResolveElementSharedFun", + ("old_space", 0x03805): "PromiseAllSettledRejectElementSharedFun", + ("old_space", 0x0382d): "PromiseAnyRejectElementSharedFun", + ("old_space", 0x03855): "PromiseCapabilityDefaultRejectSharedFun", + ("old_space", 0x0387d): "PromiseCapabilityDefaultResolveSharedFun", + ("old_space", 0x038a5): "PromiseCatchFinallySharedFun", + ("old_space", 0x038cd): "PromiseGetCapabilitiesExecutorSharedFun", + ("old_space", 0x038f5): "PromiseThenFinallySharedFun", + ("old_space", 0x0391d): "PromiseThrowerFinallySharedFun", + ("old_space", 0x03945): "PromiseValueThunkFinallySharedFun", + ("old_space", 0x0396d): "ProxyRevokeSharedFun", } # Lower 32 bits of first page addresses for various heap spaces. diff --git a/deps/v8/tools/v8windbg/OWNERS b/deps/v8/tools/v8windbg/OWNERS new file mode 100644 index 00000000000000..01f6b8db3931e8 --- /dev/null +++ b/deps/v8/tools/v8windbg/OWNERS @@ -0,0 +1 @@ +seth.brenith@microsoft.com diff --git a/deps/v8/tools/v8windbg/src/local-variables.cc b/deps/v8/tools/v8windbg/src/local-variables.cc index 20814cf28a8306..e00d06b5955ea7 100644 --- a/deps/v8/tools/v8windbg/src/local-variables.cc +++ b/deps/v8/tools/v8windbg/src/local-variables.cc @@ -4,7 +4,11 @@ #include "tools/v8windbg/src/local-variables.h" +#include + #include "tools/v8windbg/base/utilities.h" +#include "tools/v8windbg/src/object-inspection.h" +#include "tools/v8windbg/src/v8-debug-helper-interop.h" #include "tools/v8windbg/src/v8windbg-extension.h" V8LocalVariables::V8LocalVariables(WRL::ComPtr original, @@ -110,6 +114,14 @@ IFACEMETHODIMP V8LocalVariables::GetValue(PCWSTR key, IModelObject* context, RETURN_IF_FAIL( result->SetKey(L"memory interpreted as Objects", array.Get(), nullptr)); + std::vector properties = GetStackFrame(host_context, frame_offset); + for (const auto& prop : properties) { + WRL::ComPtr property; + RETURN_IF_FAIL(GetModelForProperty(prop, host_context, &property)); + result->SetKey(reinterpret_cast(prop.name.c_str()), + property.Get(), nullptr); + } + *value = result.Detach(); return S_OK; } diff --git a/deps/v8/tools/v8windbg/src/object-inspection.cc b/deps/v8/tools/v8windbg/src/object-inspection.cc index 6f90614bd5c95e..b206dfa792f85d 100644 --- a/deps/v8/tools/v8windbg/src/object-inspection.cc +++ b/deps/v8/tools/v8windbg/src/object-inspection.cc @@ -330,31 +330,6 @@ HRESULT GetModelForCustomArray(const Property& prop, context_data.Get(), result); } -// Creates an IModelObject representing the data in the given property. -HRESULT GetModelForProperty(const Property& prop, - WRL::ComPtr& sp_ctx, - IModelObject** result) { - switch (prop.type) { - case PropertyType::kPointer: - return GetModelForBasicField(prop.addr_value, prop.type_name, - prop.uncompressed_type_name, sp_ctx, result); - case PropertyType::kStruct: - return GetModelForStruct(prop.addr_value, prop.fields, sp_ctx, result); - case PropertyType::kArray: - case PropertyType::kStructArray: - if (prop.type == PropertyType::kArray && - prop.type_name == ConvertToU16String(prop.uncompressed_type_name)) { - // An array of things that are not structs or compressed tagged values - // is most cleanly represented by a native array. - return GetModelForNativeArray(prop.addr_value, prop.type_name, - prop.length, sp_ctx, result); - } - // Otherwise, we must construct a custom iterable object. - return GetModelForCustomArray(prop, sp_ctx, result); - default: - return E_FAIL; - } -} // Creates an IModelObject representing the data in an array at the given index. // context_object is expected to be an object of the form created by @@ -693,3 +668,29 @@ IFACEMETHODIMP InspectV8ObjectMethod::Call(IModelObject* p_context_object, return CreateSyntheticObjectForV8Object(sp_ctx.Get(), cached_object.Get(), pp_result); } + +// Creates an IModelObject representing the data in the given property. +HRESULT GetModelForProperty(const Property& prop, + WRL::ComPtr& sp_ctx, + IModelObject** result) { + switch (prop.type) { + case PropertyType::kPointer: + return GetModelForBasicField(prop.addr_value, prop.type_name, + prop.uncompressed_type_name, sp_ctx, result); + case PropertyType::kStruct: + return GetModelForStruct(prop.addr_value, prop.fields, sp_ctx, result); + case PropertyType::kArray: + case PropertyType::kStructArray: + if (prop.type == PropertyType::kArray && + prop.type_name == ConvertToU16String(prop.uncompressed_type_name)) { + // An array of things that are not structs or compressed tagged values + // is most cleanly represented by a native array. + return GetModelForNativeArray(prop.addr_value, prop.type_name, + prop.length, sp_ctx, result); + } + // Otherwise, we must construct a custom iterable object. + return GetModelForCustomArray(prop, sp_ctx, result); + default: + return E_FAIL; + } +} diff --git a/deps/v8/tools/v8windbg/src/object-inspection.h b/deps/v8/tools/v8windbg/src/object-inspection.h index a280b05cadedfe..238d8610c7823f 100644 --- a/deps/v8/tools/v8windbg/src/object-inspection.h +++ b/deps/v8/tools/v8windbg/src/object-inspection.h @@ -290,4 +290,8 @@ class InspectV8ObjectMethod IKeyStore** pp_metadata); }; +HRESULT GetModelForProperty(const Property& prop, + WRL::ComPtr& sp_ctx, + IModelObject** result); + #endif // V8_TOOLS_V8WINDBG_SRC_OBJECT_INSPECTION_H_ diff --git a/deps/v8/tools/v8windbg/src/v8-debug-helper-interop.cc b/deps/v8/tools/v8windbg/src/v8-debug-helper-interop.cc index 0767ff5f09e974..74d0a9df2646ce 100644 --- a/deps/v8/tools/v8windbg/src/v8-debug-helper-interop.cc +++ b/deps/v8/tools/v8windbg/src/v8-debug-helper-interop.cc @@ -29,7 +29,7 @@ class MemReaderScope { private: MemReaderScope(const MemReaderScope&) = delete; MemReaderScope& operator=(const MemReaderScope&) = delete; - static d::MemoryAccessResult Read(uintptr_t address, uint8_t* destination, + static d::MemoryAccessResult Read(uintptr_t address, void* destination, size_t byte_count) { ULONG64 bytes_read; Location loc{address}; @@ -81,26 +81,12 @@ V8HeapObject::V8HeapObject(V8HeapObject&&) = default; V8HeapObject& V8HeapObject::operator=(const V8HeapObject&) = default; V8HeapObject& V8HeapObject::operator=(V8HeapObject&&) = default; -V8HeapObject GetHeapObject(WRL::ComPtr sp_context, - uint64_t tagged_ptr, uint64_t referring_pointer, - const char* type_name, bool is_compressed) { - // Read the value at the address, and see if it is a tagged pointer - - V8HeapObject obj; - MemReaderScope reader_scope(sp_context); - - d::HeapAddresses heap_addresses = {0, 0, 0, 0}; - // TODO ideally we'd provide real heap page pointers. For now, just testing - // decompression based on the pointer to wherever we found this value, - // which is likely (though not guaranteed) to be a heap pointer itself. - heap_addresses.any_heap_pointer = referring_pointer; - - auto props = d::GetObjectProperties(tagged_ptr, reader_scope.GetReader(), - heap_addresses, type_name); - obj.friendly_name = ConvertToU16String(props->brief); - for (size_t property_index = 0; property_index < props->num_properties; +std::vector GetPropertiesAsVector(size_t num_properties, + d::ObjectProperty** properties) { + std::vector result; + for (size_t property_index = 0; property_index < num_properties; ++property_index) { - const auto& source_prop = *props->properties[property_index]; + const auto& source_prop = *(properties)[property_index]; Property dest_prop(ConvertToU16String(source_prop.name), ConvertToU16String(source_prop.type), source_prop.decompressed_type, source_prop.address, @@ -126,8 +112,30 @@ V8HeapObject GetHeapObject(WRL::ComPtr sp_context, struct_field.shift_bits}); } } - obj.properties.push_back(dest_prop); + result.push_back(dest_prop); } + return result; +} + +V8HeapObject GetHeapObject(WRL::ComPtr sp_context, + uint64_t tagged_ptr, uint64_t referring_pointer, + const char* type_name, bool is_compressed) { + // Read the value at the address, and see if it is a tagged pointer + + V8HeapObject obj; + MemReaderScope reader_scope(sp_context); + + d::HeapAddresses heap_addresses = {0, 0, 0, 0}; + // TODO ideally we'd provide real heap page pointers. For now, just testing + // decompression based on the pointer to wherever we found this value, + // which is likely (though not guaranteed) to be a heap pointer itself. + heap_addresses.any_heap_pointer = referring_pointer; + + auto props = d::GetObjectProperties(tagged_ptr, reader_scope.GetReader(), + heap_addresses, type_name); + obj.friendly_name = ConvertToU16String(props->brief); + obj.properties = + GetPropertiesAsVector(props->num_properties, props->properties); // For each guessed type, create a synthetic property that will request data // about the same object again but with a more specific type hint. @@ -157,3 +165,12 @@ std::vector ListObjectClasses() { } const char* BitsetName(uint64_t payload) { return d::BitsetName(payload); } + +std::vector GetStackFrame(WRL::ComPtr sp_context, + + uint64_t frame_pointer) { + MemReaderScope reader_scope(sp_context); + auto props = d::GetStackFrame(static_cast(frame_pointer), + reader_scope.GetReader()); + return GetPropertiesAsVector(props->num_properties, props->properties); +} diff --git a/deps/v8/tools/v8windbg/src/v8-debug-helper-interop.h b/deps/v8/tools/v8windbg/src/v8-debug-helper-interop.h index 9208f0983270d7..f7d78c5dd3e374 100644 --- a/deps/v8/tools/v8windbg/src/v8-debug-helper-interop.h +++ b/deps/v8/tools/v8windbg/src/v8-debug-helper-interop.h @@ -137,4 +137,7 @@ std::vector ListObjectClasses(); const char* BitsetName(uint64_t payload); +std::vector GetStackFrame(WRL::ComPtr sp_context, + uint64_t frame_pointer); + #endif // V8_TOOLS_V8WINDBG_SRC_V8_DEBUG_HELPER_INTEROP_H_ diff --git a/deps/v8/tools/wasm/update-wasm-spec-tests.sh b/deps/v8/tools/wasm/update-wasm-spec-tests.sh index 2d26c2f5aeb96a..dc9621a83bfd26 100755 --- a/deps/v8/tools/wasm/update-wasm-spec-tests.sh +++ b/deps/v8/tools/wasm/update-wasm-spec-tests.sh @@ -71,7 +71,7 @@ log_and_run cp -r ${TMP_DIR}/spec/test/js-api/* ${JS_API_TEST_DIR}/tests # Generate the proposal tests. ############################################################################### -repos='bulk-memory-operations reference-types js-types tail-call' +repos='bulk-memory-operations reference-types js-types tail-call simd' for repo in ${repos}; do echo "Process ${repo}" @@ -86,9 +86,8 @@ for repo in ${repos}; do # Iterate over all proposal tests. Those which differ from the spec tests are # copied to the output directory and converted to .js tests. - for abs_filename in ${TMP_DIR}/${repo}/test/core/*.wast; do - rel_filename="$(basename -- $abs_filename)" - test_name=${rel_filename%.wast} + for rel_filename in $(find . -name '*.wast'); do + abs_filename=$(realpath $rel_filename) spec_filename=${TMP_DIR}/spec/test/core/${rel_filename} if [ ! -f "$spec_filename" ] || ! cmp -s $abs_filename $spec_filename ; then log_and_run cp ${rel_filename} ${SPEC_TEST_DIR}/tests/proposals/${repo}/ diff --git a/deps/v8/tools/whitespace.txt b/deps/v8/tools/whitespace.txt index 168b574f9ce033..6e2bc1cf764c8d 100644 --- a/deps/v8/tools/whitespace.txt +++ b/deps/v8/tools/whitespace.txt @@ -8,7 +8,7 @@ The doubles heard this and started to unbox. The Smi looked at them when a crazy v8-autoroll account showed up... The autoroller bought a round of Himbeerbrause. Suddenly..... The bartender starts to shake the bottles...................... -I can't add trailing whitespaces, so I'm adding this line..... +I can't add trailing whitespaces, so I'm adding this line...... I'm starting to think that just adding trailing whitespaces might not be bad. Because whitespaces are not that funny..... diff --git a/deps/v8/tools/windows-tick-processor.bat b/deps/v8/tools/windows-tick-processor.bat index 8f8ad0153bccd3..56637e051cb3b3 100755 --- a/deps/v8/tools/windows-tick-processor.bat +++ b/deps/v8/tools/windows-tick-processor.bat @@ -27,4 +27,4 @@ IF NOT %arg8:~0,2% == 8 (IF NOT %arg8:~0,2% == 8- SET log_file=%8) SET arg9=9%9 IF NOT %arg9:~0,2% == 9 (IF NOT %arg9:~0,2% == 9- SET log_file=%9) -type %log_file% | %D8_PATH%\d8 %tools_dir%splaytree.js %tools_dir%codemap.js %tools_dir%csvparser.js %tools_dir%consarray.js %tools_dir%profile.js %tools_dir%profile_view.js %tools_dir%logreader.js %tools_dir%SourceMap.js %tools_dir%arguments.js %tools_dir%tickprocessor.js %tools_dir%tickprocessor-driver.js -- --windows %* +type %log_file% | %D8_PATH%\d8 --module %tools_dir%tickprocessor-driver.js -- --windows %* diff --git a/deps/v8/tools/zone-stats/details-selection.js b/deps/v8/tools/zone-stats/details-selection.js index 039847b0cf2a15..1e57e0aa5a772f 100644 --- a/deps/v8/tools/zone-stats/details-selection.js +++ b/deps/v8/tools/zone-stats/details-selection.js @@ -262,14 +262,10 @@ defineCustomElement('details-selection', (templateText) => const zone_name = checkbox.value; const zone_data = zones_data.get(zone_name); const zone_allocated = zone_data === undefined ? 0 : zone_data.allocated; - if (zone_allocated == 0) { - checkbox.parentNode.style.display = 'none'; - } else { - const percents = zone_allocated / total_allocated; - const percent_div = checkbox.parentNode.querySelector('.percentBackground'); - percent_div.style.left = (percents * 100) + '%'; - checkbox.parentNode.style.display = 'block'; - } + const percents = zone_allocated / total_allocated; + const percent_div = checkbox.parentNode.querySelector('.percentBackground'); + percent_div.style.left = (percents * 100) + '%'; + checkbox.parentNode.style.display = 'block'; }); } diff --git a/deps/v8/tools/zone-stats/global-timeline.js b/deps/v8/tools/zone-stats/global-timeline.js index e9d7280508a02e..85b5d19d7d1750 100644 --- a/deps/v8/tools/zone-stats/global-timeline.js +++ b/deps/v8/tools/zone-stats/global-timeline.js @@ -120,8 +120,9 @@ defineCustomElement('global-timeline', (templateText) => getZoneData() { const isolate_data = this.data[this.selection.isolate]; - const zone_names = isolate_data.sorted_zone_names; const selected_zones = this.selection.zones; + const zone_names = isolate_data.sorted_zone_names.filter( + zone_name => selected_zones.has(zone_name)); const data_kind = this.selection.data_kind; const show_totals = this.selection.show_totals; const zones_labels = this.getZoneLabels(zone_names); diff --git a/deps/zlib/contrib/optimizations/chunkcopy.h b/deps/zlib/contrib/optimizations/chunkcopy.h index 38ba0ed8a27f45..8bcdadad05a817 100644 --- a/deps/zlib/contrib/optimizations/chunkcopy.h +++ b/deps/zlib/contrib/optimizations/chunkcopy.h @@ -29,6 +29,7 @@ #include typedef uint8x16_t z_vec128i_t; #elif defined(INFLATE_CHUNK_SIMD_SSE2) +#pragma GCC target ("sse2") #include typedef __m128i z_vec128i_t; #else diff --git a/deps/zlib/fill_window_sse.c b/deps/zlib/fill_window_sse.c index ed1e5d1d6735b1..e19154bc14d238 100644 --- a/deps/zlib/fill_window_sse.c +++ b/deps/zlib/fill_window_sse.c @@ -9,6 +9,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +#pragma GCC target ("sse2") #include #include "deflate.h" diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml index 49c4f4f64736c7..8e01bea6abd8a7 100644 --- a/doc/.eslintrc.yaml +++ b/doc/.eslintrc.yaml @@ -4,6 +4,7 @@ rules: # ease some restrictions in doc examples no-restricted-properties: off no-undef: off + no-unused-expressions: off no-unused-vars: off symbol-description: off diff --git a/doc/abi_version_registry.json b/doc/abi_version_registry.json index 96d83e608fb81f..c47359bfb14eb3 100644 --- a/doc/abi_version_registry.json +++ b/doc/abi_version_registry.json @@ -1,6 +1,8 @@ { "NODE_MODULE_VERSION": [ - { "modules": 88, "runtime": "node", "variant": "v8_8.6", "versions": "15.0.0-pre" }, + { "modules": 90, "runtime": "node", "variant": "v8_8.7", "versions": "16.0.0-pre" }, + { "modules": 89, "runtime": "electron", "variant": "electron", "versions": "13" }, + { "modules": 88, "runtime": "node", "variant": "v8_8.6", "versions": "15.0.0" }, { "modules": 87, "runtime": "electron", "variant": "electron", "versions": "12" }, { "modules": 86, "runtime": "node", "variant": "v8_8.4", "versions": "15.0.0-pre" }, { "modules": 85, "runtime": "electron", "variant": "electron", "versions": "11" }, diff --git a/doc/api/addons.md b/doc/api/addons.md index a2bee79cc3de3f..19799233cf7584 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -26,12 +26,12 @@ involving knowledge of several components and APIs: serves as a cross-platform abstraction library, giving easy, POSIX-like access across all major operating systems to many common system tasks, such as interacting with the filesystem, sockets, timers, and system events. libuv - also provides a pthreads-like threading abstraction that may be used to - power more sophisticated asynchronous addons that need to move beyond the - standard event loop. Addon authors are encouraged to think about how to + also provides a threading abstraction similar to POSIX threads for + more sophisticated asynchronous addons that need to move beyond the + standard event loop. Addon authors should avoid blocking the event loop with I/O or other time-intensive tasks by - off-loading work via libuv to non-blocking system operations, worker threads - or a custom use of libuv's threads. + offloading work via libuv to non-blocking system operations, worker threads, + or a custom use of libuv threads. * Internal Node.js libraries. Node.js itself exports C++ APIs that addons can use, the most important of which is the `node::ObjectWrap` class. @@ -111,8 +111,8 @@ There are environments in which Node.js addons may need to be loaded multiple times in multiple contexts. For example, the [Electron][] runtime runs multiple instances of Node.js in a single process. Each instance will have its own `require()` cache, and thus each instance will need a native addon to behave -correctly when loaded via `require()`. From the addon's perspective, this means -that it must support multiple initializations. +correctly when loaded via `require()`. This means that the addon +must support multiple initializations. A context-aware addon can be constructed by using the macro `NODE_MODULE_INITIALIZER`, which expands to the name of a function which Node.js @@ -154,25 +154,26 @@ they were created. The context-aware addon can be structured to avoid global static data by performing the following steps: + * Define a class which will hold per-addon-instance data and which has a static -member of the form + member of the form ```cpp static void DeleteInstance(void* data) { // Cast `data` to an instance of the class and delete it. } ``` * Heap-allocate an instance of this class in the addon initializer. This can be -accomplished using the `new` keyword. + accomplished using the `new` keyword. * Call `node::AddEnvironmentCleanupHook()`, passing it the above-created -instance and a pointer to `DeleteInstance()`. This will ensure the instance is -deleted when the environment is torn down. + instance and a pointer to `DeleteInstance()`. This will ensure the instance is + deleted when the environment is torn down. * Store the instance of the class in a `v8::External`, and * Pass the `v8::External` to all methods exposed to JavaScript by passing it -to `v8::FunctionTemplate::New()` or `v8::Function::New()` which creates the -native-backed JavaScript functions. The third parameter of -`v8::FunctionTemplate::New()` or `v8::Function::New()` accepts the -`v8::External` and makes it available in the native callback using the -`v8::FunctionCallbackInfo::Data()` method. + to `v8::FunctionTemplate::New()` or `v8::Function::New()` which creates the + native-backed JavaScript functions. The third parameter of + `v8::FunctionTemplate::New()` or `v8::Function::New()` accepts the + `v8::External` and makes it available in the native callback using the + `v8::FunctionCallbackInfo::Data()` method. This will ensure that the per-addon-instance data reaches each binding that can be called from JavaScript. The per-addon-instance data must also be passed into @@ -271,9 +272,9 @@ The following `addon.cc` uses `AddEnvironmentCleanupHook`: ```cpp // addon.cc +#include #include #include -#include using node::AddEnvironmentCleanupHook; using v8::HandleScope; @@ -397,14 +398,14 @@ the appropriate headers automatically. However, there are a few caveats to be aware of: * When `node-gyp` runs, it will detect the specific release version of Node.js -and download either the full source tarball or just the headers. If the full -source is downloaded, addons will have complete access to the full set of -Node.js dependencies. However, if only the Node.js headers are downloaded, then -only the symbols exported by Node.js will be available. + and download either the full source tarball or just the headers. If the full + source is downloaded, addons will have complete access to the full set of + Node.js dependencies. However, if only the Node.js headers are downloaded, + then only the symbols exported by Node.js will be available. * `node-gyp` can be run using the `--nodedir` flag pointing at a local Node.js -source image. Using this option, the addon will have access to the full set of -dependencies. + source image. Using this option, the addon will have access to the full set of + dependencies. ### Loading addons using `require()` diff --git a/doc/api/assert.md b/doc/api/assert.md index 1478515c811608..f32d11c6edad3b 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -13,7 +13,7 @@ invariants. * Returns: {Array} of objects containing information about the wrapper functions -returned by [`tracker.calls()`][]. + returned by [`tracker.calls()`][]. * Object {Object} * `message` {string} * `actual` {number} The actual number of times the function was called. diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index f54e82ee46b909..08111b67a8507e 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -699,14 +699,14 @@ asyncResource.triggerAsyncId(); * `type` {string} The type of async event. * `options` {Object} * `triggerAsyncId` {number} The ID of the execution context that created this - async event. **Default:** `executionAsyncId()`. + async event. **Default:** `executionAsyncId()`. * `requireManualDestroy` {boolean} If set to `true`, disables `emitDestroy` - when the object is garbage collected. This usually does not need to be set - (even if `emitDestroy` is called manually), unless the resource's `asyncId` - is retrieved and the sensitive API's `emitDestroy` is called with it. - When set to `false`, the `emitDestroy` call on garbage collection - will only take place if there is at least one active `destroy` hook. - **Default:** `false`. + when the object is garbage collected. This usually does not need to be set + (even if `emitDestroy` is called manually), unless the resource's `asyncId` + is retrieved and the sensitive API's `emitDestroy` is called with it. + When set to `false`, the `emitDestroy` call on garbage collection + will only take place if there is at least one active `destroy` hook. + **Default:** `false`. Example usage: @@ -791,7 +791,7 @@ never be called. #### `asyncResource.triggerAsyncId()` * Returns: {number} The same `triggerAsyncId` that is passed to the -`AsyncResource` constructor. + `AsyncResource` constructor. ### Using `AsyncResource` for a `Worker` thread pool diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 484d575e7cce91..e7f71079dc6798 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -288,7 +288,7 @@ It can be constructed in a variety of ways. + +The `'spawn'` event is emitted once the child process has spawned successfully. + +If emitted, the `'spawn'` event comes before all other events and before any +data is received via `stdout` or `stderr`. + +The `'spawn'` event will fire regardless of whether an error occurs **within** +the spawned process. For example, if `bash some-command` spawns successfully, +the `'spawn'` event will fire, though `bash` may fail to spawn `some-command`. +This caveat also applies when using `{ shell: true }`. + ### `subprocess.channel` -Experimental `AbortController` and `AbortSignal` support is enabled by default. +`AbortController` and `AbortSignal` support is enabled by default. Use of this command-line flag is no longer required. ### `--experimental-import-meta-resolve` @@ -234,7 +234,7 @@ Enable experimental JSON support for the ES Module loader. added: v9.0.0 --> -Specify the `module` of a custom [experimental ECMAScript Module loader][]. +Specify the `module` of a custom experimental [ECMAScript Module loader][]. `module` may be either a path to a file, or an ECMAScript Module name. ### `--experimental-modules` @@ -300,6 +300,8 @@ Enable experimental WebAssembly System Interface (WASI) support. added: v12.3.0 --> +Enable experimental WebAssembly module support. + ### `--force-context-aware` + +> Stability: 1 - Experimental + +Writes a V8 heap snapshot to disk when the V8 heap usage is approaching the +heap limit. `count` should be a non-negative integer (in which case +Node.js will write no more than `max_count` snapshots to disk). + +When generating snapshots, garbage collection may be triggered and bring +the heap usage down, therefore multiple snapshots may be written to disk +before the Node.js instance finally runs out of memory. These heap snapshots +can be compared to determine what objects are being allocated during the +time consecutive snapshots are taken. It's not guaranteed that Node.js will +write exactly `max_count` snapshots to disk, but it will try +its best to generate at least one and up to `max_count` snapshots before the +Node.js instance runs out of memory when `max_count` is greater than `0`. + +Generating V8 snapshots takes time and memory (both memory managed by the +V8 heap and native memory outside the V8 heap). The bigger the heap is, +the more resources it needs. Node.js will adjust the V8 heap to accommondate +the additional V8 heap memory overhead, and try its best to avoid using up +all the memory avialable to the process. When the process uses +more memory than the system deems appropriate, the process may be terminated +abruptly by the system, depending on the system configuration. + +```console +$ node --max-old-space-size=100 --heapsnapshot-near-heap-limit=3 index.js +Wrote snapshot to Heap.20200430.100036.49580.0.001.heapsnapshot +Wrote snapshot to Heap.20200430.100037.49580.0.002.heapsnapshot +Wrote snapshot to Heap.20200430.100038.49580.0.003.heapsnapshot + +<--- Last few GCs ---> + +[49580:0x110000000] 4826 ms: Mark-sweep 130.6 (147.8) -> 130.5 (147.8) MB, 27.4 / 0.0 ms (average mu = 0.126, current mu = 0.034) allocation failure scavenge might not succeed +[49580:0x110000000] 4845 ms: Mark-sweep 130.6 (147.8) -> 130.6 (147.8) MB, 18.8 / 0.0 ms (average mu = 0.088, current mu = 0.031) allocation failure scavenge might not succeed + + +<--- JS stacktrace ---> + +FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory +.... +``` + ### `--heapsnapshot-signal=signal` Enable extra debug checks for memory leaks in Node.js internals. This is @@ -1013,8 +1059,13 @@ Track heap object allocations for heap snapshots. ### `--unhandled-rejections=mode` Using this flag allows to change what should happen when an unhandled rejection @@ -1276,6 +1327,7 @@ Node.js options that are allowed are: * `--force-context-aware` * `--force-fips` * `--frozen-intrinsics` +* `--heapsnapshot-near-heap-limit` * `--heapsnapshot-signal` * `--http-parser` * `--icu-data-dir` @@ -1595,6 +1647,7 @@ $ node --max-old-space-size=1536 index.js ``` [Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/ +[ECMAScript Module loader]: esm.md#esm_loaders [REPL]: repl.md [ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage [Source Map]: https://sourcemaps.info/spec.html @@ -1615,7 +1668,6 @@ $ node --max-old-space-size=1536 index.js [debugger]: debugger.md [debugging security implications]: https://nodejs.org/en/docs/guides/debugging-getting-started/#security-implications [emit_warning]: process.md#process_process_emitwarning_warning_type_code_ctor -[experimental ECMAScript Module loader]: esm.md#esm_experimental_loaders [jitless]: https://v8.dev/blog/jitless [libuv threadpool documentation]: https://docs.libuv.org/en/latest/threadpool.html [remote code execution]: https://www.owasp.org/index.php/Code_Injection diff --git a/doc/api/console.md b/doc/api/console.md index e8bee883acc573..8ede89bcfc376c 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -30,7 +30,15 @@ console.log('hello world'); console.log('hello %s', 'world'); // Prints: hello world, to stdout console.error(new Error('Whoops, something bad happened')); -// Prints: [Error: Whoops, something bad happened], to stderr +// Prints error message and stack trace to stderr: +// Error: Whoops, something bad happened +// at [eval]:5:15 +// at Script.runInThisContext (node:vm:132:18) +// at Object.runInThisContext (node:vm:309:38) +// at node:internal/process/execution:77:19 +// at [eval]-wrapper:6:22 +// at evalScript (node:internal/process/execution:76:60) +// at node:internal/main/eval_string:23:3 const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`); diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 2e1744910b9f9f..2b762fa2eeef69 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -57,7 +57,7 @@ data. The most common usage is handling output generated by the HTML5 * `key` {string|ArrayBuffer|Buffer|TypedArray|DataView} @@ -2215,7 +2226,7 @@ Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'` ### `crypto.generateKey(type, options, callback)` * `type`: {string} The intended use of the generated secret key. Currently @@ -2245,7 +2256,7 @@ generateKey('hmac', { length: 64 }, (err, key) => { ### `crypto.generateKeySync(type, options)` * `type`: {string} The intended use of the generated secret key. Currently @@ -2426,7 +2437,7 @@ console.log(ciphers); // ['aes-128-cbc', 'aes-128-ccm', ...] ### `crypto.getCipherInfo(nameOrNid[, options])` * `nameOrNid`: {string|number} The name or nid of the cipher to query. @@ -2525,7 +2536,7 @@ console.log(hashes); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] ### `crypto.hkdf(digest, key, salt, info, keylen, callback)` * `digest` {string} The digest algorithm to use. @@ -2562,7 +2573,7 @@ crypto.hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { ### `crypto.hkdfSync(digest, key, salt, info, keylen)` * `digest` {string} The digest algorithm to use. @@ -2597,7 +2608,7 @@ console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' @@ -3350,7 +3367,7 @@ additional properties can be passed: @@ -3366,7 +3383,11 @@ comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they -must have the same length. +must have the same byte length. + +If at least one of `a` and `b` is a `TypedArray` with more than one byte per +entry, such as `Uint16Array`, the result will be computed using the platform +byte order. Use of `crypto.timingSafeEqual` does not guarantee that the *surrounding* code is timing-safe. Care should be taken to ensure that the surrounding code does @@ -3376,9 +3397,14 @@ not introduce timing vulnerabilities. @@ -3420,7 +3446,7 @@ key may be passed for `key`. ### `crypto.webcrypto` Type: {Crypto} An implementation of the Web Crypto API standard. diff --git a/doc/api/debugger.md b/doc/api/debugger.md index 08664ff9677ec6..f17750ac116302 100644 --- a/doc/api/debugger.md +++ b/doc/api/debugger.md @@ -115,11 +115,14 @@ To begin watching an expression, type `watch('my_expression')`. The command * `setBreakpoint()`, `sb()`: Set breakpoint on current line * `setBreakpoint(line)`, `sb(line)`: Set breakpoint on specific line * `setBreakpoint('fn()')`, `sb(...)`: Set breakpoint on a first statement in -functions body + function's body * `setBreakpoint('script.js', 1)`, `sb(...)`: Set breakpoint on first line of -`script.js` + `script.js` +* `setBreakpoint('script.js', 1, 'num < 4')`, `sb(...)`: Set conditional + breakpoint on first line of `script.js` that only breaks when `num < 4` + evaluates to `true` * `clearBreakpoint('script.js', 1)`, `cb(...)`: Clear breakpoint in `script.js` -on line 1 + on line 1 It is also possible to set a breakpoint in a file (module) that is not loaded yet: @@ -145,15 +148,51 @@ break in mod.js:22 debug> ``` +It is also possible to set a conditional breakpoint that only breaks when a +given expression evaluates to `true`: + +```console +$ node inspect main.js +< Debugger listening on ws://127.0.0.1:9229/ce24daa8-3816-44d4-b8ab-8273c8a66d35 +< For help, see: https://nodejs.org/en/docs/inspector +< Debugger attached. +Break on start in main.js:7 + 5 } + 6 +> 7 addOne(10); + 8 addOne(-1); + 9 +debug> setBreakpoint('main.js', 4, 'num < 0') + 1 'use strict'; + 2 + 3 function addOne(num) { +> 4 return num + 1; + 5 } + 6 + 7 addOne(10); + 8 addOne(-1); + 9 +debug> cont +break in main.js:4 + 2 + 3 function addOne(num) { +> 4 return num + 1; + 5 } + 6 +debug> exec('num') +-1 +debug> +``` + ### Information * `backtrace`, `bt`: Print backtrace of current execution frame * `list(5)`: List scripts source code with 5 line context (5 lines before and -after) + after) * `watch(expr)`: Add expression to watch list * `unwatch(expr)`: Remove expression from watch list * `watchers`: List all watchers and their values (automatically listed on each -breakpoint) + breakpoint) * `repl`: Open debugger's repl for evaluation in debugging script's context * `exec expr`: Execute an expression in debugging script's context diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 093bef796dab7c..47b2a5526dcf88 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -426,7 +426,7 @@ See [`Intl.Segmenter`](https://github.com/tc39/proposal-intl-segmenter). ### DEP0018: Unhandled promise rejections + +Type: Runtime (supports [`--pending-deprecation`][]) + +Prior to [subpath patterns][] support, it was possible to define +[subpath folder mappings][] in the [subpath exports][] or +[subpath imports][] fields using a trailing `"/"`. + +Without `--pending-deprecation`, runtime warnings occur only for exports +resolutions not in `node_modules`. This means there will not be deprecation +warnings for `"exports"` in dependencies. With `--pending-deprecation`, a +runtime warning results no matter where the `"exports"` usage occurs. + [Legacy URL API]: url.md#url_legacy_url_api [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 @@ -2690,7 +2712,6 @@ Use `fs.rm(path, { recursive: true, force: true })` instead. [`Buffer.isBuffer()`]: buffer.md#buffer_static_method_buffer_isbuffer_obj [`Cipher`]: crypto.md#crypto_class_cipher [`Decipher`]: crypto.md#crypto_class_decipher -[`EventEmitter.listenerCount(emitter, eventName)`]: events.md#events_eventemitter_listenercount_emitter_eventname [`REPLServer.clearBufferedCommand()`]: repl.md#repl_replserver_clearbufferedcommand [`ReadStream.open()`]: fs.md#fs_class_fs_readstream [`Server.getConnections()`]: net.md#net_server_getconnections_callback @@ -2719,6 +2740,7 @@ Use `fs.rm(path, { recursive: true, force: true })` instead. [`domain`]: domain.md [`ecdh.setPublicKey()`]: crypto.md#crypto_ecdh_setpublickey_publickey_encoding [`emitter.listenerCount(eventName)`]: events.md#events_emitter_listenercount_eventname +[`events.listenerCount(emitter, eventName)`]: events.md#events_events_listenercount_emitter_eventname [`fs.FileHandle`]: fs.md#fs_class_filehandle [`fs.access()`]: fs.md#fs_fs_access_path_mode_callback [`fs.createReadStream()`]: fs.md#fs_fs_createreadstream_path_options @@ -2801,3 +2823,7 @@ Use `fs.rm(path, { recursive: true, force: true })` instead. [from_string_encoding]: buffer.md#buffer_static_method_buffer_from_string_encoding [legacy `urlObject`]: url.md#url_legacy_urlobject [static methods of `crypto.Certificate()`]: crypto.md#crypto_class_certificate +[subpath exports]: #packages_subpath_exports +[subpath folder mappings]: #packages_subpath_folder_mappings +[subpath imports]: #packages_subpath_imports +[subpath patterns]: #packages_subpath_patterns diff --git a/doc/api/diagnostics_channel.md b/doc/api/diagnostics_channel.md new file mode 100644 index 00000000000000..fe4795ab356817 --- /dev/null +++ b/doc/api/diagnostics_channel.md @@ -0,0 +1,180 @@ +# Diagnostics Channel + + + +> Stability: 1 - Experimental + + + +The `diagnostics_channel` module provides an API to create named channels +to report arbitrary message data for diagnostics purposes. + +It can be accessed using: + +```js +const diagnostics_channel = require('diagnostics_channel'); +``` + +It is intended that a module writer wanting to report diagnostics messages +will create one or many top-level channels to report messages through. +Channels may also be acquired at runtime but it is not encouraged +due to the additional overhead of doing so. Channels may be exported for +convenience, but as long as the name is known it can be acquired anywhere. + +If you intend for your module to produce diagnostics data for others to +consume it is recommended that you include documentation of what named +channels are used along with the shape of the message data. Channel names +should generally include the module name to avoid collisions with data from +other modules. + +## Public API + +### Overview + +Following is a simple overview of the public API. + +```js +const diagnostics_channel = require('diagnostics_channel'); + +// Get a reusable channel object +const channel = diagnostics_channel.channel('my-channel'); + +// Subscribe to the channel +channel.subscribe((message, name) => { + // Received data +}); + +// Check if the channel has an active subscriber +if (channel.hasSubscribers) { + // Publish data to the channel + channel.publish({ + some: 'data' + }); +} +``` + +#### `diagnostics_channel.hasSubscribers(name)` + +* `name` {string|symbol} The channel name +* Returns: {boolean} If there are active subscribers + +Check if there are active subscribers to the named channel. This is helpful if +the message you want to send might be expensive to prepare. + +This API is optional but helpful when trying to publish messages from very +performance-senstive code. + +```js +const diagnostics_channel = require('diagnostics_channel'); + +if (diagnostics_channel.hasSubscribers('my-channel')) { + // There are subscribers, prepare and publish message +} +``` + +#### `diagnostics_channel.channel(name)` + +* `name` {string|symbol} The channel name +* Returns: {Channel} The named channel object + +This is the primary entry-point for anyone wanting to interact with a named +channel. It produces a channel object which is optimized to reduce overhead at +publish time as much as possible. + +```js +const diagnostics_channel = require('diagnostics_channel'); + +const channel = diagnostics_channel.channel('my-channel'); +``` + +### Class: `Channel` + +The class `Channel` represents an individual named channel within the data +pipeline. It is use to track subscribers and to publish messages when there +are subscribers present. It exists as a separate object to avoid channel +lookups at publish time, enabling very fast publish speeds and allowing +for heavy use while incurring very minimal cost. Channels are created with +[`diagnostics_channel.channel(name)`][], constructing a channel directly +with `new Channel(name)` is not supported. + +#### `channel.hasSubscribers` + +* Returns: {boolean} If there are active subscribers + +Check if there are active subscribers to this channel. This is helpful if +the message you want to send might be expensive to prepare. + +This API is optional but helpful when trying to publish messages from very +performance-senstive code. + +```js +const diagnostics_channel = require('diagnostics_channel'); + +const channel = diagnostics_channel.channel('my-channel'); + +if (channel.hasSubscribers) { + // There are subscribers, prepare and publish message +} +``` + +#### `channel.publish(message)` + +* `message` {any} The message to send to the channel subscribers + +Publish a message to any subscribers to the channel. This will trigger +message handlers synchronously so they will execute within the same context. + +```js +const diagnostics_channel = require('diagnostics_channel'); + +const channel = diagnostics_channel.channel('my-channel'); + +channel.publish({ + some: 'message' +}); +``` + +#### `channel.subscribe(onMessage)` + +* `onMessage` {Function} The handler to receive channel messages + * `message` {any} The message data + * `name` {string|symbol} The name of the channel + +Register a message handler to subscribe to this channel. This message handler +will be run synchronously whenever a message is published to the channel. Any +errors thrown in the message handler will trigger an [`'uncaughtException'`][]. + +```js +const diagnostics_channel = require('diagnostics_channel'); + +const channel = diagnostics_channel.channel('my-channel'); + +channel.subscribe((message, name) => { + // Received data +}); +``` + +#### `channel.unsubscribe(onMessage)` + +* `onMessage` {Function} The previous subscribed handler to remove + +Remove a message handler previously registered to this channel with +[`channel.subscribe(onMessage)`][]. + +```js +const diagnostics_channel = require('diagnostics_channel'); + +const channel = diagnostics_channel.channel('my-channel'); + +function onMessage(message, name) { + // Received data +} + +channel.subscribe(onMessage); + +channel.unsubscribe(onMessage); +``` + +[`diagnostics_channel.channel(name)`]: #diagnostics_channel_diagnostics_channel_channel_name +[`channel.subscribe(onMessage)`]: #diagnostics_channel_channel_subscribe_onmessage +[`'uncaughtException'`]: process.md#process_event_uncaughtexception diff --git a/doc/api/dns.md b/doc/api/dns.md index 875655fe629cfa..baa8b8bfde4eb3 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -117,6 +117,27 @@ added: v8.3.0 Cancel all outstanding DNS queries made by this resolver. The corresponding callbacks will be called with an error with code `ECANCELLED`. +### `resolver.setLocalAddress([ipv4][, ipv6])` + + +* `ipv4` {string} A string representation of an IPv4 address. + **Default:** `'0.0.0.0'` +* `ipv6` {string} A string representation of an IPv6 address. + **Default:** `'::0'` + +The resolver instance will send its requests from the specified IP address. +This allows programs to specify outbound interfaces when used on multi-homed +systems. + +If a v4 or v6 address is not specified, it is set to the default, and the +operating system will choose a local address automatically. + +The resolver will use the v4 local address when making requests to IPv4 DNS +servers, and the v6 local address when making requests to IPv6 DNS servers. +The `rrtype` of resolution requests has no impact on the local address used. + ## `dns.getServers()` * `hostname` {string} @@ -578,10 +599,12 @@ be an array of objects with the following properties: added: v0.1.27 --> + * `hostname` {string} * `callback` {Function} * `err` {Error} * `records` <string[][]> + Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a @@ -643,6 +666,18 @@ subsequent servers provided. Fallback DNS servers will only be used if the earlier ones time out or result in some other error. ## DNS promises API + The `dns.promises` API provides an alternative set of asynchronous DNS methods that return `Promise` objects rather than using callbacks. The API is accessible @@ -695,6 +730,14 @@ The following methods from the `dnsPromises` API are available: * [`resolver.reverse()`][`dnsPromises.reverse()`] * [`resolver.setServers()`][`dnsPromises.setServers()`] +### `resolver.cancel()` + + +Cancel all outstanding DNS queries made by this resolver. The corresponding +promises will be rejected with an error with code `ECANCELLED`. + ### `dnsPromises.getServers()` * `hostname` {string} diff --git a/doc/api/embedding.md b/doc/api/embedding.md index 82c87f5890f181..4bae63aae2a658 100644 --- a/doc/api/embedding.md +++ b/doc/api/embedding.md @@ -69,7 +69,7 @@ int main(int argc, char** argv) { ### Per-instance state +Used when an operation has been aborted (typically using an `AbortController`). + +APIs _not_ using `AbortSignal`s typically do not raise an error with this code. + +This code does not use the regular `ERR_*` convention Node.js errors use in +order to be compatible with the web platform's `AbortError`. + ### `ERR_AMBIGUOUS_ARGUMENT` @@ -790,7 +802,7 @@ The selected public or private key encoding is incompatible with other options. ### `ERR_CRYPTO_INITIALIZATION_FAILED` Initialization of the crypto subsystem failed. @@ -798,7 +810,7 @@ Initialization of the crypto subsystem failed. ### `ERR_CRYPTO_INVALID_AUTH_TAG` An invalid authentication tag was provided. @@ -806,7 +818,7 @@ An invalid authentication tag was provided. ### `ERR_CRYPTO_INVALID_COUNTER` An invalid counter was provided for a counter-mode cipher. @@ -814,7 +826,7 @@ An invalid counter was provided for a counter-mode cipher. ### `ERR_CRYPTO_INVALID_CURVE` An invalid elliptic-curve was provided. @@ -827,7 +839,7 @@ An invalid [crypto digest algorithm][] was specified. ### `ERR_CRYPTO_INVALID_IV` An invalid initialization vector was provided. @@ -835,7 +847,7 @@ An invalid initialization vector was provided. ### `ERR_CRYPTO_INVALID_JWK` An invalid JSON Web Key was provided. @@ -848,7 +860,7 @@ The given crypto key object's type is invalid for the attempted operation. ### `ERR_CRYPTO_INVALID_KEYLEN` An invalid key length was provided. @@ -856,7 +868,7 @@ An invalid key length was provided. ### `ERR_CRYPTO_INVALID_KEYPAIR` An invalid key pair was provided. @@ -864,7 +876,7 @@ An invalid key pair was provided. ### `ERR_CRYPTO_INVALID_KEYTYPE` An invalid key type was provided. @@ -872,7 +884,7 @@ An invalid key type was provided. ### `ERR_CRYPTO_INVALID_MESSAGELEN` An invalid message length was provided. @@ -880,7 +892,7 @@ An invalid message length was provided. ### `ERR_CRYPTO_INVALID_SCRYPT_PARAMS` Invalid scrypt algorithm parameters were provided. @@ -894,7 +906,7 @@ instance, calling [`cipher.getAuthTag()`][] before calling `cipher.final()`. ### `ERR_CRYPTO_INVALID_TAG_LENGTH` An invalid authentication tag length was provided. @@ -902,7 +914,7 @@ An invalid authentication tag length was provided. ### `ERR_CRYPTO_JOB_INIT_FAILED` Initialization of an asynchronous crypto operation failed. @@ -910,7 +922,7 @@ Initialization of an asynchronous crypto operation failed. ### `ERR_CRYPTO_OPERATION_FAILED` A crypto operation failed for an otherwise unspecified reason. @@ -958,7 +970,7 @@ An unknown Diffie-Hellman group name was given. See ### `ERR_DLOPEN_FAILED` A call to `process.dlopen()` failed. @@ -971,7 +983,7 @@ The [`fs.Dir`][] was previously closed. ### `ERR_CRYPTO_UNSUPPORTED_OPERATION` An attempt to invoke an unsupported crypto operation was made. @@ -1226,6 +1238,11 @@ reached. An attempt was made to initiate a new push stream from within a push stream. Nested push streams are not permitted. + +### `ERR_HTTP2_NO_MEM` + +Out of memory when using the `http2session.setLocalWindowSize(windowSize)` API. + ### `ERR_HTTP2_NO_SOCKET_MANIPULATION` @@ -1508,7 +1525,7 @@ An IP address is not valid. ### `ERR_INVALID_MODULE` An attempt was made to load a module that does not exist or was otherwise not @@ -1575,7 +1592,7 @@ type on execution, such as when a function is expected to return a promise. ### `ERR_INVALID_STATE` Indicates that an operation cannot be completed due to an invalid state. @@ -1763,14 +1780,14 @@ this error will not occur with standard builds of Node.js. ### `ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST` An object that needs to be explicitly listed in the `transferList` argument is in the object passed to a [`postMessage()`][] call, but is not provided in the `transferList` for that call. Usually, this is a `MessagePort`. -In Node.js versions prior to REPLACEME, the error code being used here was +In Node.js versions prior to v15.0.0, the error code being used here was [`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`][]. However, the set of transferable object types has been expanded to cover more types than `MessagePort`. @@ -2530,7 +2547,7 @@ A given index was out of the accepted range (e.g. negative offsets). ### `ERR_INVALID_OPT_VALUE` An invalid or unexpected value was passed in an options object. @@ -2539,7 +2556,7 @@ An invalid or unexpected value was passed in an options object. ### `ERR_INVALID_OPT_VALUE_ENCODING` An invalid or unknown file encoding was passed. @@ -2547,11 +2564,11 @@ An invalid or unknown file encoding was passed. ### `ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST` This error code was replaced by [`ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST`][] -in Node.js REPLACEME, because it is no longer accurate as other types of +in Node.js v15.0.0, because it is no longer accurate as other types of transferable objects also exist now. @@ -2572,7 +2589,7 @@ A Node.js API was called in an unsupported manner, such as ### `ERR_OPERATION_FAILED` An operation failed. This is typically used to signal the general failure @@ -2723,7 +2740,7 @@ closed. ### `ERR_CPU_USAGE` The native call from `process.cpuUsage` could not be processed. diff --git a/doc/api/esm.md b/doc/api/esm.md index b342349fec18cb..9117542825f092 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -5,13 +5,24 @@ -> Stability: 1 - Experimental +> Stability: 2 - Stable ## Introduction @@ -56,19 +67,13 @@ console.log(addTwo(4)); ``` Node.js fully supports ECMAScript modules as they are currently specified and -provides limited interoperability between them and the existing module format, +provides interoperability between them and its original module format, [CommonJS][]. -Node.js contains support for ES Modules based upon the -[Node.js EP for ES Modules][] and the [ECMAScript-modules implementation][]. - -Expect major changes in the implementation including interoperability support, -specifier resolution, and default behavior. - - - - + + + ## Enabling @@ -109,44 +114,65 @@ The _specifier_ of an `import` statement is the string after the `from` keyword, e.g. `'path'` in `import { sep } from 'path'`. Specifiers are also used in `export from` statements, and as the argument to an `import()` expression. -There are four types of specifiers: - -* _Bare specifiers_ like `'some-package'`. They refer to an entry point of a - package by the package name. - -* _Deep import specifiers_ like `'some-package/lib/shuffle.mjs'`. They refer to - a path within a package prefixed by the package name. +There are three types of specifiers: * _Relative specifiers_ like `'./startup.js'` or `'../config.mjs'`. They refer - to a path relative to the location of the importing file. + to a path relative to the location of the importing file. _The file extension + is always necessary for these._ + +* _Bare specifiers_ like `'some-package'` or `'some-package/shuffle'`. They can + refer to the main entry point of a package by the package name, or a + specific feature module within a package prefixed by the package name as per + the examples respectively. _Including the file extension is only necessary + for packages without an [`"exports"`][] field._ * _Absolute specifiers_ like `'file:///opt/nodejs/config.js'`. They refer directly and explicitly to a full path. -Bare specifiers, and the bare specifier portion of deep import specifiers, are -strings; but everything else in a specifier is a URL. +Bare specifier resolutions are handled by the [Node.js module resolution +algorithm][]. All other specifier resolutions are always only resolved with +the standard relative [URL][] resolution semantics. -`file:`, `node:`, and `data:` URLs are supported. A specifier like -`'https://example.com/app.js'` may be supported by browsers but it is not -supported in Node.js. +Like in CommonJS, module files within packages can be accessed by appending a +path to the package name unless the package’s [`package.json`][] contains an +[`"exports"`][] field, in which case files within packages can only be accessed +via the paths defined in [`"exports"`][]. -Specifiers may not begin with `/` or `//`. These are reserved for potential -future use. The root of the current volume may be referenced via `file:///`. +For details on these package resolution rules that apply to bare specifiers in +the Node.js module resolution, see the [packages documentation](packages.md). -#### `node:` Imports +### Mandatory file extensions - +A file extension must be provided when using the `import` keyword to resolve +relative or absolute specifiers. Directory indexes (e.g. `'./startup/index.js'`) +must also be fully specified. + +This behavior matches how `import` behaves in browser environments, assuming a +typically configured server. + +### URLs -`node:` URLs are supported as a means to load Node.js builtin modules. This -URL scheme allows for builtin modules to be referenced by valid absolute URL -strings. +ES modules are resolved and cached as URLs. This means that files containing +special characters such as `#` and `?` need to be escaped. + +`file:`, `node:`, and `data:` URL schemes are supported. A specifier like +`'https://example.com/app.js'` is not supported natively in Node.js unless using +a [custom HTTPS loader][]. + +#### `file:` URLs + +Modules are loaded multiple times if the `import` specifier used to resolve +them has a different query or fragment. ```js -import fs from 'node:fs/promises'; +import './foo.mjs?query=1'; // loads ./foo.mjs with query of "?query=1" +import './foo.mjs?query=2'; // loads ./foo.mjs with query of "?query=2" ``` +The volume root may be referenced via `/`, `//` or `file:///`. Given the +differences between [URL][] and path resolution (such as percent encoding +details), it is recommended to use [url.pathToFileURL][] when importing a path. + #### `data:` Imports -The `import.meta` metaproperty is an `Object` that contains the following -property: +`node:` URLs are supported as an alternative means to load Node.js builtin +modules. This URL scheme allows for builtin modules to be referenced by valid +absolute URL strings. -* `url` {string} The absolute `file:` URL of the module. +```js +import fs from 'node:fs/promises'; +``` -## Differences between ES modules and CommonJS +## Builtin modules -### Mandatory file extensions +[Core modules][] provide named exports of their public API. A +default export is also provided which is the value of the CommonJS exports. +The default export can be used for, among other things, modifying the named +exports. Named exports of builtin modules are updated only by calling +[`module.syncBuiltinESMExports()`][]. -A file extension must be provided when using the `import` keyword. Directory -indexes (e.g. `'./startup/index.js'`) must also be fully specified. +```js +import EventEmitter from 'events'; +const e = new EventEmitter(); +``` -This behavior matches how `import` behaves in browser environments, assuming a -typically configured server. +```js +import { readFile } from 'fs'; +readFile('./foo.txt', (err, source) => { + if (err) { + console.error(err); + } else { + console.log(source); + } +}); +``` -### No `NODE_PATH` +```js +import fs, { readFileSync } from 'fs'; +import { syncBuiltinESMExports } from 'module'; -`NODE_PATH` is not part of resolving `import` specifiers. Please use symlinks -if this behavior is desired. +fs.readFileSync = () => Buffer.from('Hello, ESM'); +syncBuiltinESMExports(); -### No `require`, `exports`, `module.exports`, `__filename`, `__dirname` +fs.readFileSync === readFileSync; +``` -These CommonJS variables are not available in ES modules. +## `import()` expressions -`require` can be imported into an ES module using [`module.createRequire()`][]. +[Dynamic `import()`][] is supported in both CommonJS and ES modules. In CommonJS +modules it can be used to load ES modules. -Equivalents of `__filename` and `__dirname` can be created inside of each file -via [`import.meta.url`][]. +## `import.meta` -```js -import { fileURLToPath } from 'url'; -import { dirname } from 'path'; +* {Object} -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -``` +The `import.meta` meta property is an `Object` that contains the following +properties. -### No `require.resolve` +### `import.meta.url` -Former use cases relying on `require.resolve` to determine the resolved path -of a module can be supported via `import.meta.resolve`, which is experimental -and supported via the `--experimental-import-meta-resolve` flag: +* {string} The absolute `file:` URL of the module. -```js -(async () => { - const dependencyAsset = await import.meta.resolve('component-lib/asset.css'); -})(); -``` +This is defined exactly the same as it is in browsers providing the URL of the +current module file. -`import.meta.resolve` also accepts a second argument which is the parent module -from which to resolve from: +This enables useful patterns such as relative file loading: ```js -(async () => { - // Equivalent to import.meta.resolve('./dep') - await import.meta.resolve('./dep', import.meta.url); -})(); +import { readFileSync } from 'fs'; +const buffer = readFileSync(new URL('./data.proto', import.meta.url)); ``` -This function is asynchronous because the ES module resolver in Node.js is -asynchronous. With the introduction of [Top-Level Await][], these use cases -will be easier as they won't require an async function wrapper. - -### No `require.extensions` - -`require.extensions` is not used by `import`. The expectation is that loader -hooks can provide this workflow in the future. +### `import.meta.resolve(specifier[, parent])` -### No `require.cache` +> Stability: 1 - Experimental -`require.cache` is not used by `import`. It has a separate cache. +* `specifier` {string} The module specifier to resolve relative to `parent`. +* `parent` {string|URL} The absolute parent module URL to resolve from. If none + is specified, the value of `import.meta.url` is used as the default. +* Returns: {Promise} -### URL-based paths +Provides a module-relative resolution function scoped to each module, returning +the URL string. -ES modules are resolved and cached based upon -[URL](https://url.spec.whatwg.org/) semantics. This means that files containing -special characters such as `#` and `?` need to be escaped. + +```js +const dependencyAsset = await import.meta.resolve('component-lib/asset.css'); +``` -Modules are loaded multiple times if the `import` specifier used to resolve -them has a different query or fragment. +`import.meta.resolve` also accepts a second argument which is the parent module +from which to resolve from: + ```js -import './foo.mjs?query=1'; // loads ./foo.mjs with query of "?query=1" -import './foo.mjs?query=2'; // loads ./foo.mjs with query of "?query=2" +await import.meta.resolve('./dep', import.meta.url); ``` -For now, only modules using the `file:` protocol can be loaded. +This function is asynchronous because the ES module resolver in Node.js is +allowed to be asynchronous. ## Interoperability with CommonJS -### `require` - -`require` always treats the files it references as CommonJS. This applies -whether `require` is used the traditional way within a CommonJS environment, or -in an ES module environment using [`module.createRequire()`][]. - -To include an ES module into CommonJS, use [`import()`][]. - ### `import` statements An `import` statement can reference an ES module or a CommonJS module. -`import` statements are permitted only in ES modules. For similar functionality -in CommonJS, see [`import()`][]. +`import` statements are permitted only in ES modules, but dynamic [`import()`][] +expressions are supported in CommonJS for loading ES modules. When importing [CommonJS modules](#esm_commonjs_namespaces), the `module.exports` object is provided as the default export. Named exports may be available, provided by static analysis as a convenience for better ecosystem compatibility. -Additional experimental flags are available for importing -[Wasm modules](#esm_experimental_wasm_modules) or -[JSON modules](#esm_experimental_json_modules). For importing native modules or -JSON modules unflagged, see [`module.createRequire()`][]. - -The _specifier_ of an `import` statement (the string after the `from` keyword) -can either be an URL-style relative path like `'./file.mjs'` or a package name -like `'fs'`. - -Like in CommonJS, files within packages can be accessed by appending a path to -the package name; unless the package’s [`package.json`][] contains an -[`"exports"`][] field, in which case files within packages need to be accessed -via the path defined in [`"exports"`][]. - -```js -import { sin, cos } from 'geometry/trigonometry-functions.mjs'; -``` +### `require` -### `import()` expressions +The CommonJS module `require` always treats the files it references as CommonJS. -[Dynamic `import()`][] is supported in both CommonJS and ES modules. It can be -used to include ES module files from CommonJS code. +Using `require` to load an ES module is not supported because ES modules have +asynchronous execution. Instead, use use [`import()`][] to load an ES module +from a CommonJS module. -## CommonJS Namespaces +### CommonJS Namespaces CommonJS modules consist of a `module.exports` object which can be of any type. @@ -391,59 +406,73 @@ Named exports detection covers many common export patterns, reexport patterns and build tool and transpiler outputs. See [cjs-module-lexer][] for the exact semantics implemented. -## Builtin modules +### Differences between ES modules and CommonJS -[Core modules][] provide named exports of their public API. A -default export is also provided which is the value of the CommonJS exports. -The default export can be used for, among other things, modifying the named -exports. Named exports of builtin modules are updated only by calling -[`module.syncBuiltinESMExports()`][]. +#### No `require`, `exports` or `module.exports` -```js -import EventEmitter from 'events'; -const e = new EventEmitter(); -``` +In most cases, the ES module `import` can be used to load CommonJS modules. + +If needed, a `require` function can be constructed within an ES module using +[`module.createRequire()`][]. + +#### No `__filename` or `__dirname` + +These CommonJS variables are not available in ES modules. + +`__filename` and `__dirname` use cases can be replicated via +[`import.meta.url`][]. +#### No JSON Module Loading + +JSON imports are still experimental and only supported via the +`--experimental-json-modules` flag. + +Local JSON files can be loaded relative to `import.meta.url` with `fs` directly: + + ```js -import { readFile } from 'fs'; -readFile('./foo.txt', (err, source) => { - if (err) { - console.error(err); - } else { - console.log(source); - } -}); +import { readFile } from 'fs/promises'; +const json = JSON.parse(await readFile(new URL('./dat.json', import.meta.url))); ``` -```js -import fs, { readFileSync } from 'fs'; -import { syncBuiltinESMExports } from 'module'; +Alterantively `module.createRequire()` can be used. -fs.readFileSync = () => Buffer.from('Hello, ESM'); -syncBuiltinESMExports(); +#### No Native Module Loading -fs.readFileSync === readFileSync; -``` +Native modules are not currently supported with ES module imports. -## CommonJS, JSON, and native modules +The can instead be loaded with [`module.createRequire()`][] or +[`process.dlopen`][]. -CommonJS, JSON, and native modules can be used with -[`module.createRequire()`][]. +#### No `require.resolve` -```js -// cjs.cjs -module.exports = 'cjs'; +Relative resolution can be handled via `new URL('./local', import.meta.url)`. -// esm.mjs -import { createRequire } from 'module'; +For a complete `require.resolve` replacement, there is a flagged experimental +[`import.meta.resolve`][] API. -const require = createRequire(import.meta.url); +Alternatively `module.createRequire()` can be used. -const cjs = require('./cjs.cjs'); -cjs === 'cjs'; // true -``` +#### No `NODE_PATH` + +`NODE_PATH` is not part of resolving `import` specifiers. Please use symlinks +if this behavior is desired. -## Experimental JSON modules +#### No `require.extensions` + +`require.extensions` is not used by `import`. The expectation is that loader +hooks can provide this workflow in the future. + +#### No `require.cache` + +`require.cache` is not used by `import` as the ES module loader has its own +separate cache. + + + +## JSON modules + +> Stability: 1 - Experimental Currently importing JSON modules are only supported in the `commonjs` mode and are loaded using the CJS loader. [WHATWG JSON modules specification][] are @@ -473,7 +502,11 @@ node index.mjs # fails node --experimental-json-modules index.mjs # works ``` -## Experimental Wasm modules + + +## Wasm modules + +> Stability: 1 - Experimental Importing Web Assembly modules is supported under the `--experimental-wasm-modules` flag, allowing any `.wasm` files to be @@ -497,7 +530,11 @@ node --experimental-wasm-modules index.mjs would provide the exports interface for the instantiation of `module.wasm`. -## Experimental top-level `await` + + +## Top-level `await` + +> Stability: 1 - Experimental The `await` keyword may be used in the top level (outside of async functions) within modules as per the [ECMAScript Top-Level `await` proposal][]. @@ -521,7 +558,11 @@ console.log(five); // Logs `5` node b.mjs # works ``` -## Experimental loaders + + +## Loaders + +> Stability: 1 - Experimental **Note: This API is currently being redesigned and will still change.** @@ -1232,6 +1273,8 @@ _internal_, _conditions_) ### Customizing ESM specifier resolution algorithm +> Stability: 1 - Experimental + The current specifier resolution does not support all default behavior of the CommonJS loader. One of the behavior differences is automatic resolution of file extensions and the ability to import directories that have an index @@ -1259,11 +1302,10 @@ success! [Core modules]: modules.md#modules_core_modules [Dynamic `import()`]: https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports [ECMAScript Top-Level `await` proposal]: https://github.com/tc39/proposal-top-level-await/ -[ECMAScript-modules implementation]: https://github.com/nodejs/modules/blob/master/doc/plan-for-new-modules-implementation.md [ES Module Integration Proposal for Web Assembly]: https://github.com/webassembly/esm-integration -[Node.js EP for ES Modules]: https://github.com/nodejs/node-eps/blob/master/002-es-modules.md +[Node.js Module Resolution Algorithm]: #esm_resolver_algorithm_specification [Terminology]: #esm_terminology -[Top-Level Await]: https://github.com/tc39/proposal-top-level-await +[URL]: https://url.spec.whatwg.org/ [WHATWG JSON modules specification]: https://html.spec.whatwg.org/#creating-a-json-module-script [`"exports"`]: packages.md#packages_exports [`"type"`]: packages.md#packages_type @@ -1274,15 +1316,19 @@ success! [`data:` URLs]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs [`export`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export [`import()`]: #esm_import_expressions -[`import.meta.url`]: #esm_import_meta +[`import.meta.url`]: #esm_import_meta_url +[`import.meta.resolve`]: #esm_import_meta_resolve_specifier_parent [`import`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import [`module.createRequire()`]: module.md#module_module_createrequire_filename [`module.syncBuiltinESMExports()`]: module.md#module_module_syncbuiltinesmexports [`package.json`]: packages.md#packages_node_js_package_json_field_definitions +[`process.dlopen`]: process.md#process_process_dlopen_module_filename_flags [`transformSource` hook]: #esm_transformsource_source_context_defaulttransformsource [`string`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String [`util.TextDecoder`]: util.md#util_class_util_textdecoder -[cjs-module-lexer]: https://github.com/guybedford/cjs-module-lexer/tree/0.4.2 +[cjs-module-lexer]: https://github.com/guybedford/cjs-module-lexer/tree/1.0.0 +[custom https loader]: #esm_https_loader [special scheme]: https://url.spec.whatwg.org/#special-scheme [the official standard format]: https://tc39.github.io/ecma262/#sec-modules [transpiler loader example]: #esm_transpiler_loader +[url.pathToFileURL]: url.md#url_url_pathtofileurl_path diff --git a/doc/api/events.md b/doc/api/events.md index 68e23231677fda..b66199e99647de 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -158,11 +158,13 @@ myEmitter.emit('error', new Error('whoops!')); ``` It is possible to monitor `'error'` events without consuming the emitted error -by installing a listener using the symbol `errorMonitor`. +by installing a listener using the symbol `events.errorMonitor`. ```js -const myEmitter = new MyEmitter(); -myEmitter.on(EventEmitter.errorMonitor, (err) => { +const { EventEmitter, errorMonitor } = require('events'); + +const myEmitter = new EventEmitter(); +myEmitter.on(errorMonitor, (err) => { MyMonitoringTool.log(err); }); myEmitter.emit('error', new Error('whoops!')); @@ -205,12 +207,13 @@ ee2.on('something', async (value) => { ee2[Symbol.for('nodejs.rejection')] = console.log; ``` -Setting `EventEmitter.captureRejections = true` will change the default for all +Setting `events.captureRejections = true` will change the default for all new instances of `EventEmitter`. ```js -EventEmitter.captureRejections = true; -const ee1 = new EventEmitter(); +const events = require('events'); +events.captureRejections = true; +const ee1 = new events.EventEmitter(); ee1.on('something', async (value) => { throw new Error('kaboom'); }); @@ -306,83 +309,6 @@ changes: The `'removeListener'` event is emitted *after* the `listener` is removed. -### `EventEmitter.listenerCount(emitter, eventName)` - - -> Stability: 0 - Deprecated: Use [`emitter.listenerCount()`][] instead. - -* `emitter` {EventEmitter} The emitter to query -* `eventName` {string|symbol} The event name - -A class method that returns the number of listeners for the given `eventName` -registered on the given `emitter`. - -```js -const myEmitter = new EventEmitter(); -myEmitter.on('event', () => {}); -myEmitter.on('event', () => {}); -console.log(EventEmitter.listenerCount(myEmitter, 'event')); -// Prints: 2 -``` - -### `EventEmitter.defaultMaxListeners` - - -By default, a maximum of `10` listeners can be registered for any single -event. This limit can be changed for individual `EventEmitter` instances -using the [`emitter.setMaxListeners(n)`][] method. To change the default -for *all* `EventEmitter` instances, the `EventEmitter.defaultMaxListeners` -property can be used. If this value is not a positive number, a `RangeError` -is thrown. - -Take caution when setting the `EventEmitter.defaultMaxListeners` because the -change affects *all* `EventEmitter` instances, including those created before -the change is made. However, calling [`emitter.setMaxListeners(n)`][] still has -precedence over `EventEmitter.defaultMaxListeners`. - -This is not a hard limit. The `EventEmitter` instance will allow -more listeners to be added but will output a trace warning to stderr indicating -that a "possible EventEmitter memory leak" has been detected. For any single -`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` -methods can be used to temporarily avoid this warning: - -```js -emitter.setMaxListeners(emitter.getMaxListeners() + 1); -emitter.once('event', () => { - // do stuff - emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); -}); -``` - -The [`--trace-warnings`][] command-line flag can be used to display the -stack trace for such warnings. - -The emitted warning can be inspected with [`process.on('warning')`][] and will -have the additional `emitter`, `type` and `count` properties, referring to -the event emitter instance, the event’s name and the number of attached -listeners, respectively. -Its `name` property is set to `'MaxListenersExceededWarning'`. - -### `EventEmitter.errorMonitor` - - -This symbol shall be used to install a listener for only monitoring `'error'` -events. Listeners installed using this symbol are called before the regular -`'error'` listeners are called. - -Installing a listener using this symbol does not change the behavior once an -`'error'` event is emitted, therefore the process will still crash if no -regular `'error'` listener is installed. - ### `emitter.addListener(eventName, listener)` + +By default, a maximum of `10` listeners can be registered for any single +event. This limit can be changed for individual `EventEmitter` instances +using the [`emitter.setMaxListeners(n)`][] method. To change the default +for *all* `EventEmitter` instances, the `events.defaultMaxListeners` +property can be used. If this value is not a positive number, a `RangeError` +is thrown. + +Take caution when setting the `events.defaultMaxListeners` because the +change affects *all* `EventEmitter` instances, including those created before +the change is made. However, calling [`emitter.setMaxListeners(n)`][] still has +precedence over `events.defaultMaxListeners`. + +This is not a hard limit. The `EventEmitter` instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any single +`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` +methods can be used to temporarily avoid this warning: + +```js +emitter.setMaxListeners(emitter.getMaxListeners() + 1); +emitter.once('event', () => { + // do stuff + emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); +}); +``` + +The [`--trace-warnings`][] command-line flag can be used to display the +stack trace for such warnings. + +The emitted warning can be inspected with [`process.on('warning')`][] and will +have the additional `emitter`, `type` and `count` properties, referring to +the event emitter instance, the event’s name and the number of attached +listeners, respectively. +Its `name` property is set to `'MaxListenersExceededWarning'`. + +## `events.errorMonitor` + + +This symbol shall be used to install a listener for only monitoring `'error'` +events. Listeners installed using this symbol are called before the regular +`'error'` listeners are called. + +Installing a listener using this symbol does not change the behavior once an +`'error'` event is emitted, therefore the process will still crash if no +regular `'error'` listener is installed. + +## `events.getEventListeners(emitterOrTarget, eventName)` + +* `emitterOrTarget` {EventEmitter|EventTarget} +* `eventName` {string|symbol} +* Returns: {Function[]} + +Returns a copy of the array of listeners for the event named `eventName`. + +For `EventEmitter`s this behaves exactly the same as calling `.listeners` on +the emitter. + +For `EventTarget`s this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes. + +```js +const { getEventListeners, EventEmitter } = require('events'); + +{ + const ee = new EventEmitter(); + const listener = () => console.log('Events are fun'); + ee.on('foo', listener); + getEventListeners(ee, 'foo'); // [listener] +} +{ + const et = new EventTarget(); + const listener = () => console.log('Events are fun'); + et.addEventListener('foo', listener); + getEventListeners(et, 'foo'); // [listener] +} +``` + ## `events.once(emitter, name[, options])` + +> Stability: 0 - Deprecated: Use [`emitter.listenerCount()`][] instead. + +* `emitter` {EventEmitter} The emitter to query +* `eventName` {string|symbol} The event name + +A class method that returns the number of listeners for the given `eventName` +registered on the given `emitter`. + +```js +const { EventEmitter, listenerCount } = require('events'); +const myEmitter = new EventEmitter(); +myEmitter.on('event', () => {}); +myEmitter.on('event', () => {}); +console.log(listenerCount(myEmitter, 'event')); +// Prints: 2 +``` + ## `events.on(emitter, eventName[, options])` + +* `n` {number} A non-negative number. The maximum number of listeners per + `EventTarget` event. +* `...eventsTargets` {EventTarget[]|EventEmitter[]} Zero or more {EventTarget} + or {EventEmitter} instances. If none are specified, `n` is set as the default + max for all newly created {EventTarget} and {EventEmitter} objects. + +```js +const { + setMaxListeners, + EventEmitter +} = require('events'); + +const target = new EventTarget(); +const emitter = new EventEmitter(); + +setMaxListeners(5, target, emitter); +``` + ## `EventTarget` and `Event` API -> Stability: 1 - Experimental - The `EventTarget` and `Event` objects are a Node.js-specific implementation of the [`EventTarget` Web API][] that are exposed by some Node.js core APIs. Neither the `EventTarget` nor `Event` classes are available for end @@ -1198,7 +1260,7 @@ The `EventTarget` does not implement any special default handling for @@ -1282,9 +1344,10 @@ This is not used in Node.js and is provided purely for completeness. added: v14.5.0 --> -* Type: {boolean} Always returns `false`. +* Type: {boolean} True for Node.js internal events, false otherwise. -This is not used in Node.js and is provided purely for completeness. +Currently only `AbortSignal`s' `"abort"` event is fired with `isTrusted` +set to `true`. #### `event.preventDefault()` * Returns: {fs.FSWatcher} @@ -615,7 +617,9 @@ called previously. ### `watcher.unref()` * Returns: {fs.FSWatcher} @@ -628,7 +632,9 @@ no effect. ## Class: `fs.StatWatcher` * Extends {EventEmitter} @@ -638,7 +644,9 @@ object. ### `watcher.ref()` * Returns: {fs.StatWatcher} @@ -653,7 +661,9 @@ called previously. ### `watcher.unref()` * Returns: {fs.StatWatcher} @@ -826,6 +836,10 @@ added: v0.1.10 Returns `true` if the `fs.Stats` object describes a file system directory. +If the `fs.Stats` object was obtained from [`fs.lstat()`][], this method will +always return `false`. This is because [`fs.lstat()`][] returns information +about a symbolic link itself and not the path it resolves to. + ### `stats.isFIFO()` The `fs.promises` API provides an alternative set of asynchronous file system methods that return `Promise` objects rather than using callbacks. The @@ -4624,6 +4715,14 @@ the promise-based API uses the `FileHandle` class in order to help avoid accidental leaking of unclosed file descriptors after a `Promise` is resolved or rejected. +#### Event: `'close'` + + +The `'close'` event is emitted when the `FileHandle` and any of its underlying +resources (a file descriptor, for example) have been closed. + #### `filehandle.appendFile(data, options)` * `path` {string|Buffer|URL|FileHandle} filename or `FileHandle` * `options` {Object|string} * `encoding` {string|null} **Default:** `null` * `flag` {string} See [support of file system `flags`][]. **Default:** `'r'`. + * `signal` {AbortSignal} allows aborting an in-progress readFile * Returns: {Promise} Asynchronously reads the entire contents of a file. @@ -5444,6 +5550,20 @@ platform-specific. On macOS, Linux, and Windows, the promise will be rejected with an error. On FreeBSD, a representation of the directory's contents will be returned. +It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a +request is aborted the promise returned is rejected with an `AbortError`: + +```js +const controller = new AbortController(); +const signal = controller.signal; +readFile(fileName, { signal }).then((file) => { /* ... */ }); +// Abort the request +controller.abort(); +``` + +Aborting an ongoing request does not abort individual operating +system requests but rather the internal buffering `fs.readFile` performs. + Any specified `FileHandle` has to support reading. ### `fsPromises.readlink(path[, options])` @@ -5520,8 +5640,6 @@ changes: now supported. --> -> Stability: 1 - Recursive removal is experimental. - * `path` {string|Buffer|URL} * `options` {Object} * `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or @@ -5550,7 +5668,7 @@ that represent files will be deleted. The permissive behavior of the `recursive` option is deprecated, `ENOTDIR` and `ENOENT` will be thrown in the future. -## `fsPromises.rm(path[, options])` +### `fsPromises.rm(path[, options])` @@ -5656,6 +5774,10 @@ The `atime` and `mtime` arguments follow these rules: -> Stability: 1 - Experimental - A utility class used to signal cancelation in selected `Promise`-based APIs. @@ -42,7 +44,7 @@ console.log(ac.signal.aborted); // Prints True ### `abortController.abort()` Triggers the abort signal, causing the `abortController.signal` to emit @@ -50,14 +52,14 @@ the `'abort'` event. ### `abortController.signal` * Type: {AbortSignal} ### Class: `AbortSignal` * Extends: {EventTarget} @@ -67,7 +69,7 @@ The `AbortSignal` is used to notify observers when the #### Event: `'abort'` The `'abort'` event is emitted when the `abortController.abort()` method @@ -97,14 +99,14 @@ Failure to do so may result in memory leaks. #### `abortSignal.aborted` * Type: {boolean} True after the `AbortController` has been aborted. #### `abortSignal.onabort` * Type: {Function} @@ -171,25 +173,29 @@ Used to print to stdout and stderr. See the [`console`][] section. ## `Event` -> Stability: 1 - Experimental - A browser-compatible implementation of the `Event` class. See [`EventTarget` and `Event` API][] for more details. ## `EventTarget` -> Stability: 1 - Experimental - A browser-compatible implementation of the `EventTarget` class. See [`EventTarget` and `Event` API][] for more details. @@ -213,7 +219,7 @@ Node.js this is different. The top-level scope is not the global scope; ## `MessageChannel` @@ -222,7 +228,7 @@ The `MessageChannel` class. See [`MessageChannel`][] for more details. ## `MessageEvent` @@ -231,7 +237,7 @@ The `MessageEvent` class. See [`MessageEvent`][] for more details. ## `MessagePort` diff --git a/doc/api/http.md b/doc/api/http.md index 4ce2c9251a2c16..ad34b6e1e7df40 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -118,7 +118,9 @@ changes: - v12.19.0 pr-url: https://github.com/nodejs/node/pull/33617 description: Add `maxTotalSockets` option to agent constructor. - - version: v14.5.0 + - version: + - v14.5.0 + - v12.20.0 pr-url: https://github.com/nodejs/node/pull/33278 description: Add `scheduling` option to specify the free socket scheduling strategy. @@ -253,13 +255,17 @@ Destroy any sockets that are currently in use by the agent. It is usually not necessary to do this. However, if using an agent with `keepAlive` enabled, then it is best to explicitly shut down -the agent when it will no longer be used. Otherwise, -sockets may hang open for quite a long time before the server +the agent when it is no longer needed. Otherwise, +sockets might stay open for quite a long time before the server terminates them. ### `agent.freeSockets` * {Object} @@ -326,6 +332,10 @@ can have open. Unlike `maxSockets`, this parameter applies across all origins. ### `agent.requests` * {Object} @@ -336,6 +346,10 @@ sockets. Do not modify. ### `agent.sockets` * {Object} @@ -1595,13 +1609,17 @@ added: v0.4.0 * `name` {string} * `value` {any} +* Returns: {http.ServerResponse} + +Returns the response object. Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings here to send multiple headers with the same name. Non-string values will be stored without modification. Therefore, [`response.getHeader()`][] may return non-string values. However, the non-string values will be converted to strings -for network transmission. +for network transmission. The same response object is returned to the caller, +to enable call chaining. ```js response.setHeader('Content-Type', 'text/html'); @@ -1976,6 +1994,12 @@ as an argument to any listeners on the event. ### `message.headers` * {Object} @@ -1997,9 +2021,9 @@ Duplicates in raw headers are handled in the following ways, depending on the header name: * Duplicates of `age`, `authorization`, `content-length`, `content-type`, -`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, -`last-modified`, `location`, `max-forwards`, `proxy-authorization`, `referer`, -`retry-after`, `server`, or `user-agent` are discarded. + `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, + `last-modified`, `location`, `max-forwards`, `proxy-authorization`, `referer`, + `retry-after`, `server`, or `user-agent` are discarded. * `set-cookie` is always an array. Duplicates are added to the array. * For duplicate `cookie` headers, the values are joined together with '; '. * For all other headers, the values are joined together with ', '. @@ -2336,6 +2360,9 @@ This can be overridden for servers and client requests by passing the + +* `windowSize` {number} + +Sets the local endpoint's window size. +The `windowSize` is the total window size to set, not +the delta. + +```js +const http2 = require('http2'); + +const server = http2.createServer(); +const expectedWindowSize = 2 ** 20; +server.on('connect', (session) => { + + // Set local window size to be 2 ** 20 + session.setLocalWindowSize(expectedWindowSize); +}); +``` + #### `http2session.setTimeout(msecs, callback)` + +* `settings` {HTTP/2 Settings Object} + +Used to update the server with the provided settings. + +Throws `ERR_HTTP2_INVALID_SETTING_VALUE` for invalid `settings` values. + +Throws `ERR_INVALID_ARG_TYPE` for invalid `settings` argument. + ### Class: `Http2SecureServer` + +* `settings` {HTTP/2 Settings Object} + +Used to update the server with the provided settings. + +Throws `ERR_HTTP2_INVALID_SETTING_VALUE` for invalid `settings` values. + +Throws `ERR_INVALID_ARG_TYPE` for invalid `settings` argument. + ### `http2.createServer(options[, onRequestHandler])` -* `buf` {Buffer|Uint8Array} The packed settings. +* `buf` {Buffer|TypedArray} The packed settings. * Returns: {HTTP/2 Settings Object} Returns a [HTTP/2 Settings Object][] containing the deserialized settings from @@ -2503,7 +2561,7 @@ the given `Buffer` as generated by `http2.getPackedSettings()`. ### `http2.sensitiveHeaders` * {symbol} @@ -3225,6 +3283,25 @@ deprecated: v13.0.0 See [`response.socket`][]. +#### `response.createPushResponse(headers, callback)` + + +* `headers` {HTTP/2 Headers Object} An object describing the headers +* `callback` {Function} Called once `http2stream.pushStream()` is finished, + or either when the attempt to create the pushed `Http2Stream` has failed or + has been rejected, or the state of `Http2ServerRequest` is closed prior to + calling the `http2stream.pushStream()` method + * `err` {Error} + * `res` {http2.Http2ServerResponse} The newly-created `Http2ServerResponse` + object + +Call [`http2stream.pushStream()`][] with the given headers, and wrap the +given [`Http2Stream`][] on a newly created `Http2ServerResponse` as the callback +parameter if successful. When `Http2ServerRequest` is closed, the callback is +called with an error `ERR_HTTP2_INVALID_STREAM`. + #### `response.end([data[, encoding]][, callback])` - -* `headers` {HTTP/2 Headers Object} An object describing the headers -* `callback` {Function} Called once `http2stream.pushStream()` is finished, - or either when the attempt to create the pushed `Http2Stream` has failed or - has been rejected, or the state of `Http2ServerRequest` is closed prior to - calling the `http2stream.pushStream()` method - * `err` {Error} - * `stream` {ServerHttp2Stream} The newly-created `ServerHttp2Stream` object - -Call [`http2stream.pushStream()`][] with the given headers, and wrap the -given [`Http2Stream`][] on a newly created `Http2ServerResponse` as the callback -parameter if successful. When `Http2ServerRequest` is closed, the callback is -called with an error `ERR_HTTP2_INVALID_STREAM`. - ## Collecting HTTP/2 performance metrics The [Performance Observer][] API can be used to collect basic performance diff --git a/doc/api/https.md b/doc/api/https.md index d8906868a34f43..f4c1f0487a779a 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -161,7 +161,7 @@ added: v0.3.4 --> * `options` {Object} Accepts `options` from [`tls.createServer()`][], - [`tls.createSecureContext()`][] and [`http.createServer()`][]. + [`tls.createSecureContext()`][] and [`http.createServer()`][]. * `requestListener` {Function} A listener to be added to the `'request'` event. * Returns: {https.Server} @@ -275,6 +275,7 @@ changes: * `port` **Default:** `443` * `agent` **Default:** `https.globalAgent` * `callback` {Function} +* Returns: {http.ClientRequest} Makes a request to a secure web server. @@ -288,6 +289,10 @@ The following additional `options` from [`tls.connect()`][] are also accepted: string, it is automatically parsed with [`new URL()`][]. If it is a [`URL`][] object, it will be automatically converted to an ordinary `options` object. +`https.request()` returns an instance of the [`http.ClientRequest`][] +class. The `ClientRequest` instance is a writable stream. If one needs to +upload a file with a POST request, then write to the `ClientRequest` object. + ```js const https = require('https'); @@ -458,6 +463,7 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p [`URL`]: url.md#url_the_whatwg_url_api [`http.Agent(options)`]: http.md#http_new_agent_options [`http.Agent`]: http.md#http_class_http_agent +[`http.ClientRequest`]: http.md#http_class_http_clientrequest [`http.Server#headersTimeout`]: http.md#http_server_headerstimeout [`http.Server#keepAliveTimeout`]: http.md#http_server_keepalivetimeout [`http.Server#maxHeadersCount`]: http.md#http_server_maxheaderscount diff --git a/doc/api/index.md b/doc/api/index.md index d10bd5988a9056..391873c16122c6 100644 --- a/doc/api/index.md +++ b/doc/api/index.md @@ -23,6 +23,7 @@ * [Crypto](crypto.md) * [Debugger](debugger.md) * [Deprecated APIs](deprecations.md) +* [Diagnostics Channel](diagnostics_channel.md) * [DNS](dns.md) * [Domain](domain.md) * [Errors](errors.md) diff --git a/doc/api/intl.md b/doc/api/intl.md index 3d6132f9dc5c9b..6cb2f8c506421e 100644 --- a/doc/api/intl.md +++ b/doc/api/intl.md @@ -42,7 +42,7 @@ in [BUILDING.md][]. An overview of available Node.js and JavaScript features for each `configure` option: -| | `none` | `system-icu` | `small-icu` | `full-icu` | +| Feature | `none` | `system-icu` | `small-icu` | `full-icu` | |-----------------------------------------|-----------------------------------|------------------------------|------------------------|------------| | [`String.prototype.normalize()`][] | none (function is no-op) | full | full | full | | `String.prototype.to*Case()` | full | full | full | full | diff --git a/doc/api/module.md b/doc/api/module.md index 2fb6ca884b4443..b78aa986da5778 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -76,6 +76,14 @@ const requireUtil = createRequireFromPath('../src/utils/'); requireUtil('./some-tool'); ``` +### `module.isPreloading` + + +* Type: {boolean} `true` if the module is running during the Node.js preload + phase. + ### `module.syncBuiltinESMExports()` + +### `module.findSourceMap(path)` + * `path` {string} -* `error` {Error} * Returns: {module.SourceMap} `path` is the resolved path for the file for which a corresponding source map should be fetched. -The `error` instance should be passed as the second parameter to `findSourceMap` -in exceptional flows, such as when an overridden -[`Error.prepareStackTrace(error, trace)`][] is invoked. Modules are not added to -the module cache until they are successfully loaded. In these cases, source maps -are associated with the `error` instance along with the `path`. - ### Class: `module.SourceMap` -* `module.findSourceMap(path[, error])` +* `module.findSourceMap(path)` * Class: `module.SourceMap` * `new SourceMap(payload)` * `sourceMap.payload` diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 287940d1d5485c..e40d2cc9ac2bc4 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -864,8 +864,8 @@ typedef void (*napi_async_cleanup_hook)(napi_async_cleanup_hook_handle handle, ``` * `[in] handle`: The handle that must be passed to -[`napi_remove_async_cleanup_hook`][] after completion of the asynchronous -cleanup. + [`napi_remove_async_cleanup_hook`][] after completion of the asynchronous + cleanup. * `[in] data`: The data that was passed to [`napi_add_async_cleanup_hook`][]. The body of the function should initiate the asynchronous cleanup actions at the @@ -945,7 +945,7 @@ napi_get_last_error_info(napi_env env, * `[in] env`: The environment that the API is invoked under. * `[out] result`: The `napi_extended_error_info` structure with more -information about the error. + information about the error. Returns `napi_ok` if the API succeeded. @@ -1725,7 +1725,7 @@ NAPI_EXTERN napi_status napi_add_async_cleanup_hook( * `[in] hook`: The function pointer to call at environment teardown. * `[in] arg`: The pointer to pass to `hook` when it gets called. * `[out] remove_handle`: Optional handle that refers to the asynchronous cleanup -hook. + hook. Registers `hook`, which is a function of type [`napi_async_cleanup_hook`][], as a function to be run with the `remove_handle` and `arg` parameters once the @@ -1762,7 +1762,7 @@ NAPI_EXTERN napi_status napi_remove_async_cleanup_hook( ``` * `[in] remove_handle`: The handle to an asynchronous cleanup hook that was -created with [`napi_add_async_cleanup_hook`][]. + created with [`napi_add_async_cleanup_hook`][]. Unregisters the cleanup hook corresponding to `remove_handle`. This will prevent the hook from being executed, unless it has already started executing. @@ -3372,7 +3372,7 @@ napi_status napi_typeof(napi_env env, napi_value value, napi_valuetype* result) Returns `napi_ok` if the API succeeded. * `napi_invalid_arg` if the type of `value` is not a known ECMAScript type and - `value` is not an External value. + `value` is not an External value. This API represents behavior similar to invoking the `typeof` Operator on the object as defined in [Section 12.5.5][] of the ECMAScript Language @@ -3902,11 +3902,11 @@ napi_get_all_property_names(napi_env env, * `[in] object`: The object from which to retrieve the properties. * `[in] key_mode`: Whether to retrieve prototype properties as well. * `[in] key_filter`: Which properties to retrieve -(enumerable/readable/writable). + (enumerable/readable/writable). * `[in] key_conversion`: Whether to convert numbered property keys to strings. * `[out] result`: A `napi_value` representing an array of JavaScript values -that represent the property names of the object. [`napi_get_array_length`][] and -[`napi_get_element`][] can be used to iterate over `result`. + that represent the property names of the object. [`napi_get_array_length`][] + and [`napi_get_element`][] can be used to iterate over `result`. Returns `napi_ok` if the API succeeded. @@ -4214,7 +4214,9 @@ specification). #### napi_object_freeze > Stability: 1 - Experimental @@ -4239,7 +4241,9 @@ ECMA-262 specification. #### napi_object_seal > Stability: 1 - Experimental @@ -4738,14 +4742,15 @@ napi_status napi_define_class(napi_env env, ``` * `[in] env`: The environment that the API is invoked under. -* `[in] utf8name`: Name of the JavaScript constructor function; this is - not required to be the same as the C++ class name, though it is recommended - for clarity. +* `[in] utf8name`: Name of the JavaScript constructor function; When wrapping a + C++ class, we recommend for clarity that this name be the same as that of + the C++ class. * `[in] length`: The length of the `utf8name` in bytes, or `NAPI_AUTO_LENGTH` if it is null-terminated. * `[in] constructor`: Callback function that handles constructing instances - of the class. This should be a static method on the class, not an actual - C++ constructor function. [`napi_callback`][] provides more details. + of the class. When wrapping a C++ class, this method must be a static member + with the [`napi_callback`][] signature. A C++ class constructor cannot be + used. [`napi_callback`][] provides more details. * `[in] data`: Optional data to be passed to the constructor callback as the `data` property of the callback info. * `[in] property_count`: Number of items in the `properties` array argument. @@ -4757,27 +4762,33 @@ napi_status napi_define_class(napi_env env, Returns `napi_ok` if the API succeeded. -Defines a JavaScript class that corresponds to a C++ class, including: - -* A JavaScript constructor function that has the class name and invokes the - provided C++ constructor callback. -* Properties on the constructor function corresponding to _static_ data - properties, accessors, and methods of the C++ class (defined by - property descriptors with the `napi_static` attribute). -* Properties on the constructor function's `prototype` object corresponding to - _non-static_ data properties, accessors, and methods of the C++ class - (defined by property descriptors without the `napi_static` attribute). - -The C++ constructor callback should be a static method on the class that calls -the actual class constructor, then wraps the new C++ instance in a JavaScript -object, and returns the wrapper object. See `napi_wrap()` for details. +Defines a JavaScript class, including: + +* A JavaScript constructor function that has the class name. When wrapping a + corresponding C++ class, the callback passed via `constructor` can be used to + instantiate a new C++ class instance, which can then be placed inside the + JavaScript object instance being constructed using [`napi_wrap`][]. +* Properties on the constructor function whose implementation can call + corresponding _static_ data properties, accessors, and methods of the C++ + class (defined by property descriptors with the `napi_static` attribute). +* Properties on the constructor function's `prototype` object. When wrapping a + C++ class, _non-static_ data properties, accessors, and methods of the C++ + class can be called from the static functions given in the property + descriptors without the `napi_static` attribute after retrieving the C++ class + instance placed inside the JavaScript object instance by using + [`napi_unwrap`][]. + +When wrapping a C++ class, the C++ constructor callback passed via `constructor` +should be a static method on the class that calls the actual class constructor, +then wraps the new C++ instance in a JavaScript object, and returns the wrapper +object. See [`napi_wrap`][] for details. The JavaScript constructor function returned from [`napi_define_class`][] is -often saved and used later, to construct new instances of the class from native -code, and/or check whether provided values are instances of the class. In that -case, to prevent the function value from being garbage-collected, create a -persistent reference to it using [`napi_create_reference`][] and ensure the -reference count is kept >= 1. +often saved and used later to construct new instances of the class from native +code, and/or to check whether provided values are instances of the class. In +that case, to prevent the function value from being garbage-collected, a +strong persistent reference to it can be created using +[`napi_create_reference`][], ensuring that the reference count is kept >= 1. Any non-`NULL` data which is passed to this API via the `data` parameter or via the `data` field of the `napi_property_descriptor` array items can be associated @@ -4942,7 +4953,7 @@ napi_status napi_check_object_type_tag(napi_env env, * `[in] js_object`: The JavaScript object whose type tag to examine. * `[in] type_tag`: The tag with which to compare any tag found on the object. * `[out] result`: Whether the type tag given matched the type tag on the -object. `false` is also returned if no type tag was found on the object. + object. `false` is also returned if no type tag was found on the object. Returns `napi_ok` if the API succeeded. @@ -5189,19 +5200,31 @@ napi_status napi_async_init(napi_env env, * `[in] env`: The environment that the API is invoked under. * `[in] async_resource`: Object associated with the async work - that will be passed to possible `async_hooks` [`init` hooks][]. - In order to retain ABI compatibility with previous versions, - passing `NULL` for `async_resource` does not result in an error. However, - this results in incorrect operation of async hooks for the - napi_async_context created. Potential issues include - loss of async context when using the AsyncLocalStorage API. -* `[in] async_resource_name`: Identifier for the kind of resource - that is being provided for diagnostic information exposed by the - `async_hooks` API. + that will be passed to possible `async_hooks` [`init` hooks][] and can be + accessed by [`async_hooks.executionAsyncResource()`][]. +* `[in] async_resource_name`: Identifier for the kind of resource that is being + provided for diagnostic information exposed by the `async_hooks` API. * `[out] result`: The initialized async context. Returns `napi_ok` if the API succeeded. +The `async_resource` object needs to be kept alive until +[`napi_async_destroy`][] to keep `async_hooks` related API acts correctly. In +order to retain ABI compatibility with previous versions, `napi_async_context`s +are not maintaining the strong reference to the `async_resource` objects to +avoid introducing causing memory leaks. However, if the `async_resource` is +garbage collected by JavaScript engine before the `napi_async_context` was +destroyed by `napi_async_destroy`, calling `napi_async_context` related APIs +like [`napi_open_callback_scope`][] and [`napi_make_callback`][] can cause +problems like loss of async context when using the `AsyncLocalStoage` API. + +In order to retain ABI compatibility with previous versions, passing `NULL` +for `async_resource` does not result in an error. However, this is not +recommended as this will result poor results with `async_hooks` +[`init` hooks][] and `async_hooks.executionAsyncResource()` as the resource is +now required by the underlying `async_hooks` implementation in order to provide +the linkage between async callbacks. + ### napi_async_destroy The `BlockList` object can be used with some network APIs to specify rules for @@ -66,7 +66,7 @@ IP subnets. ### `blockList.addAddress(address[, type])` * `address` {string} An IPv4 or IPv6 address. @@ -76,7 +76,7 @@ Adds a rule to block the given IP address. ### `blockList.addRange(start, end[, type])` * `start` {string} The starting IPv4 or IPv6 address in the range. @@ -88,7 +88,7 @@ Adds a rule to block a range of IP addresses from `start` (inclusive) to ### `blockList.addSubnet(net, prefix[, type])` * `net` {string} The network IPv4 or IPv6 address. @@ -101,7 +101,7 @@ Adds a rule to block a range of IP addresses specified as a subnet mask. ### `blockList.check(address[, type])` * `address` {string} The IP address to check @@ -128,7 +128,7 @@ console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true ### `blockList.rules` * Type: {string[]} @@ -258,6 +258,7 @@ an [IPC][] server depending on what it listens to. Possible signatures: + * [`server.listen(handle[, backlog][, callback])`][`server.listen(handle)`] * [`server.listen(options[, callback])`][`server.listen(options)`] * [`server.listen(path[, backlog][, callback])`][`server.listen(path)`] @@ -265,6 +266,7 @@ Possible signatures: * server.listen([port[, host[, backlog]]][, callback]) for TCP servers + This function is asynchronous. When the server starts listening, the [`'listening'`][] event will be emitted. The last parameter `callback` @@ -346,12 +348,14 @@ changes: functions. * Returns: {net.Server} + If `port` is specified, it behaves the same as server.listen([port[, host[, backlog]]][, callback]). Otherwise, if `path` is specified, it behaves the same as [`server.listen(path[, backlog][, callback])`][`server.listen(path)`]. If none of them is specified, an error will be thrown. + If `exclusive` is `false` (default), then cluster workers will use the same underlying handle, allowing connection handling duties to be shared. When @@ -994,6 +998,16 @@ If `timeout` is 0, then the existing idle timeout is disabled. The optional `callback` parameter will be added as a one-time listener for the [`'timeout'`][] event. +### `socket.timeout` + + +* {number|undefined} + +The socket timeout in milliseconds as set by [`socket.setTimeout()`][]. +It is `undefined` if a timeout has not been set. + ### `socket.unref()` Creates and returns a new `QuicSocket`. Please refer to the [QUIC documentation][] diff --git a/doc/api/os.md b/doc/api/os.md index 6f761877b23c5e..6c184a77854b1e 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -436,7 +436,7 @@ The following signal constants are exported by `os.constants.signals`.

>>0;r=u;d=k?u:d;p=k?g:p}r=d;i=c[56334]|0;if(r>>>0>>0){ce();return 0;return 0}e=r+b|0;m=e;if(r>>>0>=e>>>0){ce();return 0;return 0}e=c[d+24>>2]|0;f=c[d+12>>2]|0;do{if((f|0)==(d|0)){q=d+20|0;g=c[q>>2]|0;if((g|0)==0){k=d+16|0;l=c[k>>2]|0;if((l|0)==0){v=0;break}else{w=l;x=k}}else{w=g;x=q}while(1){q=w+20|0;g=c[q>>2]|0;if((g|0)!=0){w=g;x=q;continue}q=w+16|0;g=c[q>>2]|0;if((g|0)==0){break}else{w=g;x=q}}if(x>>>0>>0){ce();return 0;return 0}else{c[x>>2]=0;v=w;break}}else{q=c[d+8>>2]|0;if(q>>>0>>0){ce();return 0;return 0}g=q+12|0;if((c[g>>2]|0)!=(d|0)){ce();return 0;return 0}k=f+8|0;if((c[k>>2]|0)==(d|0)){c[g>>2]=f;c[k>>2]=q;v=f;break}else{ce();return 0;return 0}}}while(0);L1026:do{if((e|0)!=0){f=d+28|0;i=225624+(c[f>>2]<<2)|0;do{if((d|0)==(c[i>>2]|0)){c[i>>2]=v;if((v|0)!=0){break}c[56331]=c[56331]&(1<>2]^-1);break L1026}else{if(e>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}q=e+16|0;if((c[q>>2]|0)==(d|0)){c[q>>2]=v}else{c[e+20>>2]=v}if((v|0)==0){break L1026}}}while(0);if(v>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}c[v+24>>2]=e;f=c[d+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[v+16>>2]=f;c[f+24>>2]=v;break}}}while(0);f=c[d+20>>2]|0;if((f|0)==0){break}if(f>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[v+20>>2]=f;c[f+24>>2]=v;break}}}while(0);if(p>>>0<16){e=p+b|0;c[d+4>>2]=e|3;f=r+(e+4|0)|0;c[f>>2]=c[f>>2]|1}else{c[d+4>>2]=b|3;c[r+(b|4)>>2]=p|1;c[r+(p+b|0)>>2]=p;f=c[56332]|0;if((f|0)!=0){e=c[56335]|0;i=f>>>3;f=i<<1;q=225360+(f<<2)|0;k=c[56330]|0;g=1<>2]|0;if(l>>>0>=(c[56334]|0)>>>0){y=l;z=i;break}ce();return 0;return 0}}while(0);c[z>>2]=e;c[y+12>>2]=e;c[e+8>>2]=y;c[e+12>>2]=q}c[56332]=p;c[56335]=m}f=d+8|0;if((f|0)==0){o=b;break}else{n=f}return n|0}else{if(a>>>0>4294967231){o=-1;break}f=a+11|0;g=f&-8;k=c[56331]|0;if((k|0)==0){o=g;break}r=-g|0;i=f>>>8;do{if((i|0)==0){A=0}else{if(g>>>0>16777215){A=31;break}f=(i+1048320|0)>>>16&8;l=i<>>16&4;j=l<>>16&2;B=(14-(h|f|l)|0)+(j<>>15)|0;A=g>>>((B+7|0)>>>0)&1|B<<1}}while(0);i=c[225624+(A<<2)>>2]|0;L1074:do{if((i|0)==0){C=0;D=r;E=0}else{if((A|0)==31){F=0}else{F=25-(A>>>1)|0}d=0;m=r;p=i;q=g<>2]&-8;l=B-g|0;if(l>>>0>>0){if((B|0)==(g|0)){C=p;D=l;E=p;break L1074}else{G=p;H=l}}else{G=d;H=m}l=c[p+20>>2]|0;B=c[p+16+(q>>>31<<2)>>2]|0;j=(l|0)==0|(l|0)==(B|0)?e:l;if((B|0)==0){C=G;D=H;E=j;break}else{d=G;m=H;p=B;q=q<<1;e=j}}}}while(0);if((E|0)==0&(C|0)==0){i=2<>>12&16;e=i>>>(r>>>0);i=e>>>5&8;q=e>>>(i>>>0);e=q>>>2&4;p=q>>>(e>>>0);q=p>>>1&2;m=p>>>(q>>>0);p=m>>>1&1;I=c[225624+((i|r|e|q|p)+(m>>>(p>>>0))<<2)>>2]|0}else{I=E}if((I|0)==0){J=D;K=C}else{p=I;m=D;q=C;while(1){e=(c[p+4>>2]&-8)-g|0;r=e>>>0>>0;i=r?e:m;e=r?p:q;r=c[p+16>>2]|0;if((r|0)!=0){p=r;m=i;q=e;continue}r=c[p+20>>2]|0;if((r|0)==0){J=i;K=e;break}else{p=r;m=i;q=e}}}if((K|0)==0){o=g;break}if(J>>>0>=((c[56332]|0)-g|0)>>>0){o=g;break}q=K;m=c[56334]|0;if(q>>>0>>0){ce();return 0;return 0}p=q+g|0;k=p;if(q>>>0>=p>>>0){ce();return 0;return 0}e=c[K+24>>2]|0;i=c[K+12>>2]|0;do{if((i|0)==(K|0)){r=K+20|0;d=c[r>>2]|0;if((d|0)==0){j=K+16|0;B=c[j>>2]|0;if((B|0)==0){L=0;break}else{M=B;N=j}}else{M=d;N=r}while(1){r=M+20|0;d=c[r>>2]|0;if((d|0)!=0){M=d;N=r;continue}r=M+16|0;d=c[r>>2]|0;if((d|0)==0){break}else{M=d;N=r}}if(N>>>0>>0){ce();return 0;return 0}else{c[N>>2]=0;L=M;break}}else{r=c[K+8>>2]|0;if(r>>>0>>0){ce();return 0;return 0}d=r+12|0;if((c[d>>2]|0)!=(K|0)){ce();return 0;return 0}j=i+8|0;if((c[j>>2]|0)==(K|0)){c[d>>2]=i;c[j>>2]=r;L=i;break}else{ce();return 0;return 0}}}while(0);L1124:do{if((e|0)!=0){i=K+28|0;m=225624+(c[i>>2]<<2)|0;do{if((K|0)==(c[m>>2]|0)){c[m>>2]=L;if((L|0)!=0){break}c[56331]=c[56331]&(1<>2]^-1);break L1124}else{if(e>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}r=e+16|0;if((c[r>>2]|0)==(K|0)){c[r>>2]=L}else{c[e+20>>2]=L}if((L|0)==0){break L1124}}}while(0);if(L>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}c[L+24>>2]=e;i=c[K+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[L+16>>2]=i;c[i+24>>2]=L;break}}}while(0);i=c[K+20>>2]|0;if((i|0)==0){break}if(i>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[L+20>>2]=i;c[i+24>>2]=L;break}}}while(0);do{if(J>>>0<16){e=J+g|0;c[K+4>>2]=e|3;i=q+(e+4|0)|0;c[i>>2]=c[i>>2]|1}else{c[K+4>>2]=g|3;c[q+(g|4)>>2]=J|1;c[q+(J+g|0)>>2]=J;i=J>>>3;if(J>>>0<256){e=i<<1;m=225360+(e<<2)|0;r=c[56330]|0;j=1<>2]|0;if(d>>>0>=(c[56334]|0)>>>0){O=d;P=i;break}ce();return 0;return 0}}while(0);c[P>>2]=k;c[O+12>>2]=k;c[q+(g+8|0)>>2]=O;c[q+(g+12|0)>>2]=m;break}e=p;j=J>>>8;do{if((j|0)==0){Q=0}else{if(J>>>0>16777215){Q=31;break}r=(j+1048320|0)>>>16&8;i=j<>>16&4;B=i<>>16&2;l=(14-(d|r|i)|0)+(B<>>15)|0;Q=J>>>((l+7|0)>>>0)&1|l<<1}}while(0);j=225624+(Q<<2)|0;c[q+(g+28|0)>>2]=Q;c[q+(g+20|0)>>2]=0;c[q+(g+16|0)>>2]=0;m=c[56331]|0;l=1<>2]=e;c[q+(g+24|0)>>2]=j;c[q+(g+12|0)>>2]=e;c[q+(g+8|0)>>2]=e;break}if((Q|0)==31){R=0}else{R=25-(Q>>>1)|0}l=J<>2]|0;while(1){if((c[m+4>>2]&-8|0)==(J|0)){break}S=m+16+(l>>>31<<2)|0;j=c[S>>2]|0;if((j|0)==0){T=862;break}else{l=l<<1;m=j}}if((T|0)==862){if(S>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[S>>2]=e;c[q+(g+24|0)>>2]=m;c[q+(g+12|0)>>2]=e;c[q+(g+8|0)>>2]=e;break}}l=m+8|0;j=c[l>>2]|0;i=c[56334]|0;if(m>>>0>>0){ce();return 0;return 0}if(j>>>0>>0){ce();return 0;return 0}else{c[j+12>>2]=e;c[l>>2]=e;c[q+(g+8|0)>>2]=j;c[q+(g+12|0)>>2]=m;c[q+(g+24|0)>>2]=0;break}}}while(0);q=K+8|0;if((q|0)==0){o=g;break}else{n=q}return n|0}}while(0);K=c[56332]|0;if(o>>>0<=K>>>0){S=K-o|0;J=c[56335]|0;if(S>>>0>15){R=J;c[56335]=R+o;c[56332]=S;c[R+(o+4|0)>>2]=S|1;c[R+K>>2]=S;c[J+4>>2]=o|3}else{c[56332]=0;c[56335]=0;c[J+4>>2]=K|3;S=J+(K+4|0)|0;c[S>>2]=c[S>>2]|1}n=J+8|0;return n|0}J=c[56333]|0;if(o>>>0>>0){S=J-o|0;c[56333]=S;J=c[56336]|0;K=J;c[56336]=K+o;c[K+(o+4|0)>>2]=S|1;c[J+4>>2]=o|3;n=J+8|0;return n|0}do{if((c[8408]|0)==0){J=cb(8)|0;if((J-1&J|0)==0){c[8410]=J;c[8409]=J;c[8411]=-1;c[8412]=2097152;c[8413]=0;c[56441]=0;c[8408]=cG(0)&-16^1431655768;break}else{ce();return 0;return 0}}}while(0);J=o+48|0;S=c[8410]|0;K=o+47|0;R=S+K|0;Q=-S|0;S=R&Q;if(S>>>0<=o>>>0){n=0;return n|0}O=c[56440]|0;do{if((O|0)!=0){P=c[56438]|0;L=P+S|0;if(L>>>0<=P>>>0|L>>>0>O>>>0){n=0}else{break}return n|0}}while(0);L1216:do{if((c[56441]&4|0)==0){O=c[56336]|0;L1218:do{if((O|0)==0){T=892}else{L=O;P=225768;while(1){U=P|0;M=c[U>>2]|0;if(M>>>0<=L>>>0){V=P+4|0;if((M+(c[V>>2]|0)|0)>>>0>L>>>0){break}}M=c[P+8>>2]|0;if((M|0)==0){T=892;break L1218}else{P=M}}if((P|0)==0){T=892;break}L=R-(c[56333]|0)&Q;if(L>>>0>=2147483647){W=0;break}m=b_(L|0)|0;e=(m|0)==((c[U>>2]|0)+(c[V>>2]|0)|0);X=e?m:-1;Y=e?L:0;Z=m;_=L;T=901}}while(0);do{if((T|0)==892){O=b_(0)|0;if((O|0)==-1){W=0;break}g=O;L=c[8409]|0;m=L-1|0;if((m&g|0)==0){$=S}else{$=(S-g|0)+(m+g&-L)|0}L=c[56438]|0;g=L+$|0;if(!($>>>0>o>>>0&$>>>0<2147483647)){W=0;break}m=c[56440]|0;if((m|0)!=0){if(g>>>0<=L>>>0|g>>>0>m>>>0){W=0;break}}m=b_($|0)|0;g=(m|0)==(O|0);X=g?O:-1;Y=g?$:0;Z=m;_=$;T=901}}while(0);L1238:do{if((T|0)==901){m=-_|0;if((X|0)!=-1){aa=Y;ab=X;T=912;break L1216}do{if((Z|0)!=-1&_>>>0<2147483647&_>>>0>>0){g=c[8410]|0;O=(K-_|0)+g&-g;if(O>>>0>=2147483647){ac=_;break}if((b_(O|0)|0)==-1){b_(m|0);W=Y;break L1238}else{ac=O+_|0;break}}else{ac=_}}while(0);if((Z|0)==-1){W=Y}else{aa=ac;ab=Z;T=912;break L1216}}}while(0);c[56441]=c[56441]|4;ad=W;T=909}else{ad=0;T=909}}while(0);do{if((T|0)==909){if(S>>>0>=2147483647){break}W=b_(S|0)|0;Z=b_(0)|0;if(!((Z|0)!=-1&(W|0)!=-1&W>>>0>>0)){break}ac=Z-W|0;Z=ac>>>0>(o+40|0)>>>0;Y=Z?W:-1;if((Y|0)!=-1){aa=Z?ac:ad;ab=Y;T=912}}}while(0);do{if((T|0)==912){ad=(c[56438]|0)+aa|0;c[56438]=ad;if(ad>>>0>(c[56439]|0)>>>0){c[56439]=ad}ad=c[56336]|0;L1258:do{if((ad|0)==0){S=c[56334]|0;if((S|0)==0|ab>>>0>>0){c[56334]=ab}c[56442]=ab;c[56443]=aa;c[56445]=0;c[56339]=c[8408];c[56338]=-1;S=0;do{Y=S<<1;ac=225360+(Y<<2)|0;c[225360+(Y+3<<2)>>2]=ac;c[225360+(Y+2<<2)>>2]=ac;S=S+1|0;}while(S>>>0<32);S=ab+8|0;if((S&7|0)==0){ae=0}else{ae=-S&7}S=(aa-40|0)-ae|0;c[56336]=ab+ae;c[56333]=S;c[ab+(ae+4|0)>>2]=S|1;c[ab+(aa-36|0)>>2]=40;c[56337]=c[8412]}else{S=225768;while(1){af=c[S>>2]|0;ag=S+4|0;ah=c[ag>>2]|0;if((ab|0)==(af+ah|0)){T=924;break}ac=c[S+8>>2]|0;if((ac|0)==0){break}else{S=ac}}do{if((T|0)==924){if((c[S+12>>2]&8|0)!=0){break}ac=ad;if(!(ac>>>0>=af>>>0&ac>>>0>>0)){break}c[ag>>2]=ah+aa;ac=c[56336]|0;Y=(c[56333]|0)+aa|0;Z=ac;W=ac+8|0;if((W&7|0)==0){ai=0}else{ai=-W&7}W=Y-ai|0;c[56336]=Z+ai;c[56333]=W;c[Z+(ai+4|0)>>2]=W|1;c[Z+(Y+4|0)>>2]=40;c[56337]=c[8412];break L1258}}while(0);if(ab>>>0<(c[56334]|0)>>>0){c[56334]=ab}S=ab+aa|0;Y=225768;while(1){aj=Y|0;if((c[aj>>2]|0)==(S|0)){T=934;break}Z=c[Y+8>>2]|0;if((Z|0)==0){break}else{Y=Z}}do{if((T|0)==934){if((c[Y+12>>2]&8|0)!=0){break}c[aj>>2]=ab;S=Y+4|0;c[S>>2]=(c[S>>2]|0)+aa;S=ab+8|0;if((S&7|0)==0){ak=0}else{ak=-S&7}S=ab+(aa+8|0)|0;if((S&7|0)==0){al=0}else{al=-S&7}S=ab+(al+aa|0)|0;Z=S;W=ak+o|0;ac=ab+W|0;_=ac;K=(S-(ab+ak|0)|0)-o|0;c[ab+(ak+4|0)>>2]=o|3;do{if((Z|0)==(c[56336]|0)){J=(c[56333]|0)+K|0;c[56333]=J;c[56336]=_;c[ab+(W+4|0)>>2]=J|1}else{if((Z|0)==(c[56335]|0)){J=(c[56332]|0)+K|0;c[56332]=J;c[56335]=_;c[ab+(W+4|0)>>2]=J|1;c[ab+(J+W|0)>>2]=J;break}J=aa+4|0;X=c[ab+(J+al|0)>>2]|0;if((X&3|0)==1){$=X&-8;V=X>>>3;L1293:do{if(X>>>0<256){U=c[ab+((al|8)+aa|0)>>2]|0;Q=c[ab+((aa+12|0)+al|0)>>2]|0;R=225360+(V<<1<<2)|0;do{if((U|0)!=(R|0)){if(U>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}if((c[U+12>>2]|0)==(Z|0)){break}ce();return 0;return 0}}while(0);if((Q|0)==(U|0)){c[56330]=c[56330]&(1<>>0<(c[56334]|0)>>>0){ce();return 0;return 0}m=Q+8|0;if((c[m>>2]|0)==(Z|0)){am=m;break}ce();return 0;return 0}}while(0);c[U+12>>2]=Q;c[am>>2]=U}else{R=S;m=c[ab+((al|24)+aa|0)>>2]|0;P=c[ab+((aa+12|0)+al|0)>>2]|0;do{if((P|0)==(R|0)){O=al|16;g=ab+(J+O|0)|0;L=c[g>>2]|0;if((L|0)==0){e=ab+(O+aa|0)|0;O=c[e>>2]|0;if((O|0)==0){an=0;break}else{ao=O;ap=e}}else{ao=L;ap=g}while(1){g=ao+20|0;L=c[g>>2]|0;if((L|0)!=0){ao=L;ap=g;continue}g=ao+16|0;L=c[g>>2]|0;if((L|0)==0){break}else{ao=L;ap=g}}if(ap>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[ap>>2]=0;an=ao;break}}else{g=c[ab+((al|8)+aa|0)>>2]|0;if(g>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}L=g+12|0;if((c[L>>2]|0)!=(R|0)){ce();return 0;return 0}e=P+8|0;if((c[e>>2]|0)==(R|0)){c[L>>2]=P;c[e>>2]=g;an=P;break}else{ce();return 0;return 0}}}while(0);if((m|0)==0){break}P=ab+((aa+28|0)+al|0)|0;U=225624+(c[P>>2]<<2)|0;do{if((R|0)==(c[U>>2]|0)){c[U>>2]=an;if((an|0)!=0){break}c[56331]=c[56331]&(1<>2]^-1);break L1293}else{if(m>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}Q=m+16|0;if((c[Q>>2]|0)==(R|0)){c[Q>>2]=an}else{c[m+20>>2]=an}if((an|0)==0){break L1293}}}while(0);if(an>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}c[an+24>>2]=m;R=al|16;P=c[ab+(R+aa|0)>>2]|0;do{if((P|0)!=0){if(P>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[an+16>>2]=P;c[P+24>>2]=an;break}}}while(0);P=c[ab+(J+R|0)>>2]|0;if((P|0)==0){break}if(P>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[an+20>>2]=P;c[P+24>>2]=an;break}}}while(0);aq=ab+(($|al)+aa|0)|0;ar=$+K|0}else{aq=Z;ar=K}J=aq+4|0;c[J>>2]=c[J>>2]&-2;c[ab+(W+4|0)>>2]=ar|1;c[ab+(ar+W|0)>>2]=ar;J=ar>>>3;if(ar>>>0<256){V=J<<1;X=225360+(V<<2)|0;P=c[56330]|0;m=1<>2]|0;if(U>>>0>=(c[56334]|0)>>>0){as=U;at=J;break}ce();return 0;return 0}}while(0);c[at>>2]=_;c[as+12>>2]=_;c[ab+(W+8|0)>>2]=as;c[ab+(W+12|0)>>2]=X;break}V=ac;m=ar>>>8;do{if((m|0)==0){au=0}else{if(ar>>>0>16777215){au=31;break}P=(m+1048320|0)>>>16&8;$=m<>>16&4;U=$<>>16&2;Q=(14-(J|P|$)|0)+(U<<$>>>15)|0;au=ar>>>((Q+7|0)>>>0)&1|Q<<1}}while(0);m=225624+(au<<2)|0;c[ab+(W+28|0)>>2]=au;c[ab+(W+20|0)>>2]=0;c[ab+(W+16|0)>>2]=0;X=c[56331]|0;Q=1<>2]=V;c[ab+(W+24|0)>>2]=m;c[ab+(W+12|0)>>2]=V;c[ab+(W+8|0)>>2]=V;break}if((au|0)==31){av=0}else{av=25-(au>>>1)|0}Q=ar<>2]|0;while(1){if((c[X+4>>2]&-8|0)==(ar|0)){break}aw=X+16+(Q>>>31<<2)|0;m=c[aw>>2]|0;if((m|0)==0){T=1007;break}else{Q=Q<<1;X=m}}if((T|0)==1007){if(aw>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[aw>>2]=V;c[ab+(W+24|0)>>2]=X;c[ab+(W+12|0)>>2]=V;c[ab+(W+8|0)>>2]=V;break}}Q=X+8|0;m=c[Q>>2]|0;$=c[56334]|0;if(X>>>0<$>>>0){ce();return 0;return 0}if(m>>>0<$>>>0){ce();return 0;return 0}else{c[m+12>>2]=V;c[Q>>2]=V;c[ab+(W+8|0)>>2]=m;c[ab+(W+12|0)>>2]=X;c[ab+(W+24|0)>>2]=0;break}}}while(0);n=ab+(ak|8)|0;return n|0}}while(0);Y=ad;W=225768;while(1){ax=c[W>>2]|0;if(ax>>>0<=Y>>>0){ay=c[W+4>>2]|0;az=ax+ay|0;if(az>>>0>Y>>>0){break}}W=c[W+8>>2]|0}W=ax+(ay-39|0)|0;if((W&7|0)==0){aA=0}else{aA=-W&7}W=ax+((ay-47|0)+aA|0)|0;ac=W>>>0<(ad+16|0)>>>0?Y:W;W=ac+8|0;_=ab+8|0;if((_&7|0)==0){aB=0}else{aB=-_&7}_=(aa-40|0)-aB|0;c[56336]=ab+aB;c[56333]=_;c[ab+(aB+4|0)>>2]=_|1;c[ab+(aa-36|0)>>2]=40;c[56337]=c[8412];c[ac+4>>2]=27;c[W>>2]=c[56442];c[W+4>>2]=c[225772>>2];c[W+8>>2]=c[225776>>2];c[W+12>>2]=c[225780>>2];c[56442]=ab;c[56443]=aa;c[56445]=0;c[56444]=W;W=ac+28|0;c[W>>2]=7;if((ac+32|0)>>>0>>0){_=W;while(1){W=_+4|0;c[W>>2]=7;if((_+8|0)>>>0>>0){_=W}else{break}}}if((ac|0)==(Y|0)){break}_=ac-ad|0;W=Y+(_+4|0)|0;c[W>>2]=c[W>>2]&-2;c[ad+4>>2]=_|1;c[Y+_>>2]=_;W=_>>>3;if(_>>>0<256){K=W<<1;Z=225360+(K<<2)|0;S=c[56330]|0;m=1<>2]|0;if(Q>>>0>=(c[56334]|0)>>>0){aC=Q;aD=W;break}ce();return 0;return 0}}while(0);c[aD>>2]=ad;c[aC+12>>2]=ad;c[ad+8>>2]=aC;c[ad+12>>2]=Z;break}K=ad;m=_>>>8;do{if((m|0)==0){aE=0}else{if(_>>>0>16777215){aE=31;break}S=(m+1048320|0)>>>16&8;Y=m<>>16&4;W=Y<>>16&2;Q=(14-(ac|S|Y)|0)+(W<>>15)|0;aE=_>>>((Q+7|0)>>>0)&1|Q<<1}}while(0);m=225624+(aE<<2)|0;c[ad+28>>2]=aE;c[ad+20>>2]=0;c[ad+16>>2]=0;Z=c[56331]|0;Q=1<>2]=K;c[ad+24>>2]=m;c[ad+12>>2]=ad;c[ad+8>>2]=ad;break}if((aE|0)==31){aF=0}else{aF=25-(aE>>>1)|0}Q=_<>2]|0;while(1){if((c[Z+4>>2]&-8|0)==(_|0)){break}aG=Z+16+(Q>>>31<<2)|0;m=c[aG>>2]|0;if((m|0)==0){T=1042;break}else{Q=Q<<1;Z=m}}if((T|0)==1042){if(aG>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[aG>>2]=K;c[ad+24>>2]=Z;c[ad+12>>2]=ad;c[ad+8>>2]=ad;break}}Q=Z+8|0;_=c[Q>>2]|0;m=c[56334]|0;if(Z>>>0>>0){ce();return 0;return 0}if(_>>>0>>0){ce();return 0;return 0}else{c[_+12>>2]=K;c[Q>>2]=K;c[ad+8>>2]=_;c[ad+12>>2]=Z;c[ad+24>>2]=0;break}}}while(0);ad=c[56333]|0;if(ad>>>0<=o>>>0){break}_=ad-o|0;c[56333]=_;ad=c[56336]|0;Q=ad;c[56336]=Q+o;c[Q+(o+4|0)>>2]=_|1;c[ad+4>>2]=o|3;n=ad+8|0;return n|0}}while(0);c[b0()>>2]=12;n=0;return n|0}function uu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;if((a|0)==0){return}b=a-8|0;d=b;e=c[56334]|0;if(b>>>0>>0){ce()}f=c[a-4>>2]|0;g=f&3;if((g|0)==1){ce()}h=f&-8;i=a+(h-8|0)|0;j=i;L1475:do{if((f&1|0)==0){k=c[b>>2]|0;if((g|0)==0){return}l=-8-k|0;m=a+l|0;n=m;o=k+h|0;if(m>>>0>>0){ce()}if((n|0)==(c[56335]|0)){p=a+(h-4|0)|0;if((c[p>>2]&3|0)!=3){q=n;r=o;break}c[56332]=o;c[p>>2]=c[p>>2]&-2;c[a+(l+4|0)>>2]=o|1;c[i>>2]=o;return}p=k>>>3;if(k>>>0<256){k=c[a+(l+8|0)>>2]|0;s=c[a+(l+12|0)>>2]|0;t=225360+(p<<1<<2)|0;do{if((k|0)!=(t|0)){if(k>>>0>>0){ce()}if((c[k+12>>2]|0)==(n|0)){break}ce()}}while(0);if((s|0)==(k|0)){c[56330]=c[56330]&(1<>>0>>0){ce()}v=s+8|0;if((c[v>>2]|0)==(n|0)){u=v;break}ce()}}while(0);c[k+12>>2]=s;c[u>>2]=k;q=n;r=o;break}t=m;p=c[a+(l+24|0)>>2]|0;v=c[a+(l+12|0)>>2]|0;do{if((v|0)==(t|0)){w=a+(l+20|0)|0;x=c[w>>2]|0;if((x|0)==0){y=a+(l+16|0)|0;z=c[y>>2]|0;if((z|0)==0){A=0;break}else{B=z;C=y}}else{B=x;C=w}while(1){w=B+20|0;x=c[w>>2]|0;if((x|0)!=0){B=x;C=w;continue}w=B+16|0;x=c[w>>2]|0;if((x|0)==0){break}else{B=x;C=w}}if(C>>>0>>0){ce()}else{c[C>>2]=0;A=B;break}}else{w=c[a+(l+8|0)>>2]|0;if(w>>>0>>0){ce()}x=w+12|0;if((c[x>>2]|0)!=(t|0)){ce()}y=v+8|0;if((c[y>>2]|0)==(t|0)){c[x>>2]=v;c[y>>2]=w;A=v;break}else{ce()}}}while(0);if((p|0)==0){q=n;r=o;break}v=a+(l+28|0)|0;m=225624+(c[v>>2]<<2)|0;do{if((t|0)==(c[m>>2]|0)){c[m>>2]=A;if((A|0)!=0){break}c[56331]=c[56331]&(1<>2]^-1);q=n;r=o;break L1475}else{if(p>>>0<(c[56334]|0)>>>0){ce()}k=p+16|0;if((c[k>>2]|0)==(t|0)){c[k>>2]=A}else{c[p+20>>2]=A}if((A|0)==0){q=n;r=o;break L1475}}}while(0);if(A>>>0<(c[56334]|0)>>>0){ce()}c[A+24>>2]=p;t=c[a+(l+16|0)>>2]|0;do{if((t|0)!=0){if(t>>>0<(c[56334]|0)>>>0){ce()}else{c[A+16>>2]=t;c[t+24>>2]=A;break}}}while(0);t=c[a+(l+20|0)>>2]|0;if((t|0)==0){q=n;r=o;break}if(t>>>0<(c[56334]|0)>>>0){ce()}else{c[A+20>>2]=t;c[t+24>>2]=A;q=n;r=o;break}}else{q=d;r=h}}while(0);d=q;if(d>>>0>=i>>>0){ce()}A=a+(h-4|0)|0;e=c[A>>2]|0;if((e&1|0)==0){ce()}do{if((e&2|0)==0){if((j|0)==(c[56336]|0)){B=(c[56333]|0)+r|0;c[56333]=B;c[56336]=q;c[q+4>>2]=B|1;if((q|0)==(c[56335]|0)){c[56335]=0;c[56332]=0}if(B>>>0<=(c[56337]|0)>>>0){return}uw(0);return}if((j|0)==(c[56335]|0)){B=(c[56332]|0)+r|0;c[56332]=B;c[56335]=q;c[q+4>>2]=B|1;c[d+B>>2]=B;return}B=(e&-8)+r|0;C=e>>>3;L1581:do{if(e>>>0<256){u=c[a+h>>2]|0;g=c[a+(h|4)>>2]|0;b=225360+(C<<1<<2)|0;do{if((u|0)!=(b|0)){if(u>>>0<(c[56334]|0)>>>0){ce()}if((c[u+12>>2]|0)==(j|0)){break}ce()}}while(0);if((g|0)==(u|0)){c[56330]=c[56330]&(1<>>0<(c[56334]|0)>>>0){ce()}f=g+8|0;if((c[f>>2]|0)==(j|0)){D=f;break}ce()}}while(0);c[u+12>>2]=g;c[D>>2]=u}else{b=i;f=c[a+(h+16|0)>>2]|0;t=c[a+(h|4)>>2]|0;do{if((t|0)==(b|0)){p=a+(h+12|0)|0;v=c[p>>2]|0;if((v|0)==0){m=a+(h+8|0)|0;k=c[m>>2]|0;if((k|0)==0){E=0;break}else{F=k;G=m}}else{F=v;G=p}while(1){p=F+20|0;v=c[p>>2]|0;if((v|0)!=0){F=v;G=p;continue}p=F+16|0;v=c[p>>2]|0;if((v|0)==0){break}else{F=v;G=p}}if(G>>>0<(c[56334]|0)>>>0){ce()}else{c[G>>2]=0;E=F;break}}else{p=c[a+h>>2]|0;if(p>>>0<(c[56334]|0)>>>0){ce()}v=p+12|0;if((c[v>>2]|0)!=(b|0)){ce()}m=t+8|0;if((c[m>>2]|0)==(b|0)){c[v>>2]=t;c[m>>2]=p;E=t;break}else{ce()}}}while(0);if((f|0)==0){break}t=a+(h+20|0)|0;u=225624+(c[t>>2]<<2)|0;do{if((b|0)==(c[u>>2]|0)){c[u>>2]=E;if((E|0)!=0){break}c[56331]=c[56331]&(1<>2]^-1);break L1581}else{if(f>>>0<(c[56334]|0)>>>0){ce()}g=f+16|0;if((c[g>>2]|0)==(b|0)){c[g>>2]=E}else{c[f+20>>2]=E}if((E|0)==0){break L1581}}}while(0);if(E>>>0<(c[56334]|0)>>>0){ce()}c[E+24>>2]=f;b=c[a+(h+8|0)>>2]|0;do{if((b|0)!=0){if(b>>>0<(c[56334]|0)>>>0){ce()}else{c[E+16>>2]=b;c[b+24>>2]=E;break}}}while(0);b=c[a+(h+12|0)>>2]|0;if((b|0)==0){break}if(b>>>0<(c[56334]|0)>>>0){ce()}else{c[E+20>>2]=b;c[b+24>>2]=E;break}}}while(0);c[q+4>>2]=B|1;c[d+B>>2]=B;if((q|0)!=(c[56335]|0)){H=B;break}c[56332]=B;return}else{c[A>>2]=e&-2;c[q+4>>2]=r|1;c[d+r>>2]=r;H=r}}while(0);r=H>>>3;if(H>>>0<256){d=r<<1;e=225360+(d<<2)|0;A=c[56330]|0;E=1<>2]|0;if(h>>>0>=(c[56334]|0)>>>0){I=h;J=r;break}ce()}}while(0);c[J>>2]=q;c[I+12>>2]=q;c[q+8>>2]=I;c[q+12>>2]=e;return}e=q;I=H>>>8;do{if((I|0)==0){K=0}else{if(H>>>0>16777215){K=31;break}J=(I+1048320|0)>>>16&8;d=I<>>16&4;A=d<>>16&2;r=(14-(E|J|d)|0)+(A<>>15)|0;K=H>>>((r+7|0)>>>0)&1|r<<1}}while(0);I=225624+(K<<2)|0;c[q+28>>2]=K;c[q+20>>2]=0;c[q+16>>2]=0;r=c[56331]|0;d=1<>2]=e;c[q+24>>2]=I;c[q+12>>2]=q;c[q+8>>2]=q}else{if((K|0)==31){L=0}else{L=25-(K>>>1)|0}A=H<>2]|0;while(1){if((c[J+4>>2]&-8|0)==(H|0)){break}M=J+16+(A>>>31<<2)|0;E=c[M>>2]|0;if((E|0)==0){N=1221;break}else{A=A<<1;J=E}}if((N|0)==1221){if(M>>>0<(c[56334]|0)>>>0){ce()}else{c[M>>2]=e;c[q+24>>2]=J;c[q+12>>2]=q;c[q+8>>2]=q;break}}A=J+8|0;B=c[A>>2]|0;E=c[56334]|0;if(J>>>0>>0){ce()}if(B>>>0>>0){ce()}else{c[B+12>>2]=e;c[A>>2]=e;c[q+8>>2]=B;c[q+12>>2]=J;c[q+24>>2]=0;break}}}while(0);q=(c[56338]|0)-1|0;c[56338]=q;if((q|0)==0){O=225776}else{return}while(1){q=c[O>>2]|0;if((q|0)==0){break}else{O=q+8|0}}c[56338]=-1;return}function uv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;if((a|0)==0){d=ut(b)|0;return d|0}if(b>>>0>4294967231){c[b0()>>2]=12;d=0;return d|0}if(b>>>0<11){e=16}else{e=b+11&-8}f=ux(a-8|0,e)|0;if((f|0)!=0){d=f+8|0;return d|0}f=ut(b)|0;if((f|0)==0){d=0;return d|0}e=c[a-4>>2]|0;g=(e&-8)-((e&3|0)==0?8:4)|0;uD(f|0,a|0,g>>>0>>0?g:b);uu(a);d=f;return d|0}function uw(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;do{if((c[8408]|0)==0){b=cb(8)|0;if((b-1&b|0)==0){c[8410]=b;c[8409]=b;c[8411]=-1;c[8412]=2097152;c[8413]=0;c[56441]=0;c[8408]=cG(0)&-16^1431655768;break}else{ce();return 0;return 0}}}while(0);if(a>>>0>=4294967232){d=0;return d|0}b=c[56336]|0;if((b|0)==0){d=0;return d|0}e=c[56333]|0;do{if(e>>>0>(a+40|0)>>>0){f=c[8410]|0;g=aa(((((((-40-a|0)-1|0)+e|0)+f|0)>>>0)/(f>>>0)>>>0)-1|0,f);h=b;i=225768;while(1){j=c[i>>2]|0;if(j>>>0<=h>>>0){if((j+(c[i+4>>2]|0)|0)>>>0>h>>>0){k=i;break}}j=c[i+8>>2]|0;if((j|0)==0){k=0;break}else{i=j}}if((c[k+12>>2]&8|0)!=0){break}i=b_(0)|0;h=k+4|0;if((i|0)!=((c[k>>2]|0)+(c[h>>2]|0)|0)){break}j=b_(-(g>>>0>2147483646?-2147483648-f|0:g)|0)|0;l=b_(0)|0;if(!((j|0)!=-1&l>>>0>>0)){break}j=i-l|0;if((i|0)==(l|0)){break}c[h>>2]=(c[h>>2]|0)-j;c[56438]=(c[56438]|0)-j;h=c[56336]|0;m=(c[56333]|0)-j|0;j=h;n=h+8|0;if((n&7|0)==0){o=0}else{o=-n&7}n=m-o|0;c[56336]=j+o;c[56333]=n;c[j+(o+4|0)>>2]=n|1;c[j+(m+4|0)>>2]=40;c[56337]=c[8412];d=(i|0)!=(l|0)&1;return d|0}}while(0);if((c[56333]|0)>>>0<=(c[56337]|0)>>>0){d=0;return d|0}c[56337]=-1;d=0;return d|0}function ux(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=a+4|0;e=c[d>>2]|0;f=e&-8;g=a;h=g+f|0;i=h;j=c[56334]|0;if(g>>>0>>0){ce();return 0;return 0}k=e&3;if(!((k|0)!=1&g>>>0>>0)){ce();return 0;return 0}l=g+(f|4)|0;m=c[l>>2]|0;if((m&1|0)==0){ce();return 0;return 0}if((k|0)==0){if(b>>>0<256){n=0;return n|0}do{if(f>>>0>=(b+4|0)>>>0){if((f-b|0)>>>0>c[8410]<<1>>>0){break}else{n=a}return n|0}}while(0);n=0;return n|0}if(f>>>0>=b>>>0){k=f-b|0;if(k>>>0<=15){n=a;return n|0}c[d>>2]=e&1|b|2;c[g+(b+4|0)>>2]=k|3;c[l>>2]=c[l>>2]|1;uy(g+b|0,k);n=a;return n|0}if((i|0)==(c[56336]|0)){k=(c[56333]|0)+f|0;if(k>>>0<=b>>>0){n=0;return n|0}l=k-b|0;c[d>>2]=e&1|b|2;c[g+(b+4|0)>>2]=l|1;c[56336]=g+b;c[56333]=l;n=a;return n|0}if((i|0)==(c[56335]|0)){l=(c[56332]|0)+f|0;if(l>>>0>>0){n=0;return n|0}k=l-b|0;if(k>>>0>15){c[d>>2]=e&1|b|2;c[g+(b+4|0)>>2]=k|1;c[g+l>>2]=k;o=g+(l+4|0)|0;c[o>>2]=c[o>>2]&-2;p=g+b|0;q=k}else{c[d>>2]=e&1|l|2;e=g+(l+4|0)|0;c[e>>2]=c[e>>2]|1;p=0;q=0}c[56332]=q;c[56335]=p;n=a;return n|0}if((m&2|0)!=0){n=0;return n|0}p=(m&-8)+f|0;if(p>>>0>>0){n=0;return n|0}q=p-b|0;e=m>>>3;L1801:do{if(m>>>0<256){l=c[g+(f+8|0)>>2]|0;k=c[g+(f+12|0)>>2]|0;o=225360+(e<<1<<2)|0;do{if((l|0)!=(o|0)){if(l>>>0>>0){ce();return 0;return 0}if((c[l+12>>2]|0)==(i|0)){break}ce();return 0;return 0}}while(0);if((k|0)==(l|0)){c[56330]=c[56330]&(1<>>0>>0){ce();return 0;return 0}s=k+8|0;if((c[s>>2]|0)==(i|0)){r=s;break}ce();return 0;return 0}}while(0);c[l+12>>2]=k;c[r>>2]=l}else{o=h;s=c[g+(f+24|0)>>2]|0;t=c[g+(f+12|0)>>2]|0;do{if((t|0)==(o|0)){u=g+(f+20|0)|0;v=c[u>>2]|0;if((v|0)==0){w=g+(f+16|0)|0;x=c[w>>2]|0;if((x|0)==0){y=0;break}else{z=x;A=w}}else{z=v;A=u}while(1){u=z+20|0;v=c[u>>2]|0;if((v|0)!=0){z=v;A=u;continue}u=z+16|0;v=c[u>>2]|0;if((v|0)==0){break}else{z=v;A=u}}if(A>>>0>>0){ce();return 0;return 0}else{c[A>>2]=0;y=z;break}}else{u=c[g+(f+8|0)>>2]|0;if(u>>>0>>0){ce();return 0;return 0}v=u+12|0;if((c[v>>2]|0)!=(o|0)){ce();return 0;return 0}w=t+8|0;if((c[w>>2]|0)==(o|0)){c[v>>2]=t;c[w>>2]=u;y=t;break}else{ce();return 0;return 0}}}while(0);if((s|0)==0){break}t=g+(f+28|0)|0;l=225624+(c[t>>2]<<2)|0;do{if((o|0)==(c[l>>2]|0)){c[l>>2]=y;if((y|0)!=0){break}c[56331]=c[56331]&(1<>2]^-1);break L1801}else{if(s>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}k=s+16|0;if((c[k>>2]|0)==(o|0)){c[k>>2]=y}else{c[s+20>>2]=y}if((y|0)==0){break L1801}}}while(0);if(y>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}c[y+24>>2]=s;o=c[g+(f+16|0)>>2]|0;do{if((o|0)!=0){if(o>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[y+16>>2]=o;c[o+24>>2]=y;break}}}while(0);o=c[g+(f+20|0)>>2]|0;if((o|0)==0){break}if(o>>>0<(c[56334]|0)>>>0){ce();return 0;return 0}else{c[y+20>>2]=o;c[o+24>>2]=y;break}}}while(0);if(q>>>0<16){c[d>>2]=p|c[d>>2]&1|2;y=g+(p|4)|0;c[y>>2]=c[y>>2]|1;n=a;return n|0}else{c[d>>2]=c[d>>2]&1|b|2;c[g+(b+4|0)>>2]=q|3;d=g+(p|4)|0;c[d>>2]=c[d>>2]|1;uy(g+b|0,q);n=a;return n|0}return 0}function uy(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;d=a;e=d+b|0;f=e;g=c[a+4>>2]|0;L1877:do{if((g&1|0)==0){h=c[a>>2]|0;if((g&3|0)==0){return}i=d+(-h|0)|0;j=i;k=h+b|0;l=c[56334]|0;if(i>>>0>>0){ce()}if((j|0)==(c[56335]|0)){m=d+(b+4|0)|0;if((c[m>>2]&3|0)!=3){n=j;o=k;break}c[56332]=k;c[m>>2]=c[m>>2]&-2;c[d+(4-h|0)>>2]=k|1;c[e>>2]=k;return}m=h>>>3;if(h>>>0<256){p=c[d+(8-h|0)>>2]|0;q=c[d+(12-h|0)>>2]|0;r=225360+(m<<1<<2)|0;do{if((p|0)!=(r|0)){if(p>>>0>>0){ce()}if((c[p+12>>2]|0)==(j|0)){break}ce()}}while(0);if((q|0)==(p|0)){c[56330]=c[56330]&(1<>>0>>0){ce()}t=q+8|0;if((c[t>>2]|0)==(j|0)){s=t;break}ce()}}while(0);c[p+12>>2]=q;c[s>>2]=p;n=j;o=k;break}r=i;m=c[d+(24-h|0)>>2]|0;t=c[d+(12-h|0)>>2]|0;do{if((t|0)==(r|0)){u=16-h|0;v=d+(u+4|0)|0;w=c[v>>2]|0;if((w|0)==0){x=d+u|0;u=c[x>>2]|0;if((u|0)==0){y=0;break}else{z=u;A=x}}else{z=w;A=v}while(1){v=z+20|0;w=c[v>>2]|0;if((w|0)!=0){z=w;A=v;continue}v=z+16|0;w=c[v>>2]|0;if((w|0)==0){break}else{z=w;A=v}}if(A>>>0>>0){ce()}else{c[A>>2]=0;y=z;break}}else{v=c[d+(8-h|0)>>2]|0;if(v>>>0>>0){ce()}w=v+12|0;if((c[w>>2]|0)!=(r|0)){ce()}x=t+8|0;if((c[x>>2]|0)==(r|0)){c[w>>2]=t;c[x>>2]=v;y=t;break}else{ce()}}}while(0);if((m|0)==0){n=j;o=k;break}t=d+(28-h|0)|0;l=225624+(c[t>>2]<<2)|0;do{if((r|0)==(c[l>>2]|0)){c[l>>2]=y;if((y|0)!=0){break}c[56331]=c[56331]&(1<>2]^-1);n=j;o=k;break L1877}else{if(m>>>0<(c[56334]|0)>>>0){ce()}i=m+16|0;if((c[i>>2]|0)==(r|0)){c[i>>2]=y}else{c[m+20>>2]=y}if((y|0)==0){n=j;o=k;break L1877}}}while(0);if(y>>>0<(c[56334]|0)>>>0){ce()}c[y+24>>2]=m;r=16-h|0;t=c[d+r>>2]|0;do{if((t|0)!=0){if(t>>>0<(c[56334]|0)>>>0){ce()}else{c[y+16>>2]=t;c[t+24>>2]=y;break}}}while(0);t=c[d+(r+4|0)>>2]|0;if((t|0)==0){n=j;o=k;break}if(t>>>0<(c[56334]|0)>>>0){ce()}else{c[y+20>>2]=t;c[t+24>>2]=y;n=j;o=k;break}}else{n=a;o=b}}while(0);a=c[56334]|0;if(e>>>0>>0){ce()}y=d+(b+4|0)|0;z=c[y>>2]|0;do{if((z&2|0)==0){if((f|0)==(c[56336]|0)){A=(c[56333]|0)+o|0;c[56333]=A;c[56336]=n;c[n+4>>2]=A|1;if((n|0)!=(c[56335]|0)){return}c[56335]=0;c[56332]=0;return}if((f|0)==(c[56335]|0)){A=(c[56332]|0)+o|0;c[56332]=A;c[56335]=n;c[n+4>>2]=A|1;c[n+A>>2]=A;return}A=(z&-8)+o|0;s=z>>>3;L1976:do{if(z>>>0<256){g=c[d+(b+8|0)>>2]|0;t=c[d+(b+12|0)>>2]|0;h=225360+(s<<1<<2)|0;do{if((g|0)!=(h|0)){if(g>>>0>>0){ce()}if((c[g+12>>2]|0)==(f|0)){break}ce()}}while(0);if((t|0)==(g|0)){c[56330]=c[56330]&(1<>>0>>0){ce()}m=t+8|0;if((c[m>>2]|0)==(f|0)){B=m;break}ce()}}while(0);c[g+12>>2]=t;c[B>>2]=g}else{h=e;m=c[d+(b+24|0)>>2]|0;l=c[d+(b+12|0)>>2]|0;do{if((l|0)==(h|0)){i=d+(b+20|0)|0;p=c[i>>2]|0;if((p|0)==0){q=d+(b+16|0)|0;v=c[q>>2]|0;if((v|0)==0){C=0;break}else{D=v;E=q}}else{D=p;E=i}while(1){i=D+20|0;p=c[i>>2]|0;if((p|0)!=0){D=p;E=i;continue}i=D+16|0;p=c[i>>2]|0;if((p|0)==0){break}else{D=p;E=i}}if(E>>>0>>0){ce()}else{c[E>>2]=0;C=D;break}}else{i=c[d+(b+8|0)>>2]|0;if(i>>>0>>0){ce()}p=i+12|0;if((c[p>>2]|0)!=(h|0)){ce()}q=l+8|0;if((c[q>>2]|0)==(h|0)){c[p>>2]=l;c[q>>2]=i;C=l;break}else{ce()}}}while(0);if((m|0)==0){break}l=d+(b+28|0)|0;g=225624+(c[l>>2]<<2)|0;do{if((h|0)==(c[g>>2]|0)){c[g>>2]=C;if((C|0)!=0){break}c[56331]=c[56331]&(1<>2]^-1);break L1976}else{if(m>>>0<(c[56334]|0)>>>0){ce()}t=m+16|0;if((c[t>>2]|0)==(h|0)){c[t>>2]=C}else{c[m+20>>2]=C}if((C|0)==0){break L1976}}}while(0);if(C>>>0<(c[56334]|0)>>>0){ce()}c[C+24>>2]=m;h=c[d+(b+16|0)>>2]|0;do{if((h|0)!=0){if(h>>>0<(c[56334]|0)>>>0){ce()}else{c[C+16>>2]=h;c[h+24>>2]=C;break}}}while(0);h=c[d+(b+20|0)>>2]|0;if((h|0)==0){break}if(h>>>0<(c[56334]|0)>>>0){ce()}else{c[C+20>>2]=h;c[h+24>>2]=C;break}}}while(0);c[n+4>>2]=A|1;c[n+A>>2]=A;if((n|0)!=(c[56335]|0)){F=A;break}c[56332]=A;return}else{c[y>>2]=z&-2;c[n+4>>2]=o|1;c[n+o>>2]=o;F=o}}while(0);o=F>>>3;if(F>>>0<256){z=o<<1;y=225360+(z<<2)|0;C=c[56330]|0;b=1<>2]|0;if(d>>>0>=(c[56334]|0)>>>0){G=d;H=o;break}ce()}}while(0);c[H>>2]=n;c[G+12>>2]=n;c[n+8>>2]=G;c[n+12>>2]=y;return}y=n;G=F>>>8;do{if((G|0)==0){I=0}else{if(F>>>0>16777215){I=31;break}H=(G+1048320|0)>>>16&8;z=G<>>16&4;C=z<>>16&2;o=(14-(b|H|z)|0)+(C<>>15)|0;I=F>>>((o+7|0)>>>0)&1|o<<1}}while(0);G=225624+(I<<2)|0;c[n+28>>2]=I;c[n+20>>2]=0;c[n+16>>2]=0;o=c[56331]|0;z=1<>2]=y;c[n+24>>2]=G;c[n+12>>2]=n;c[n+8>>2]=n;return}if((I|0)==31){J=0}else{J=25-(I>>>1)|0}I=F<>2]|0;while(1){if((c[J+4>>2]&-8|0)==(F|0)){break}K=J+16+(I>>>31<<2)|0;G=c[K>>2]|0;if((G|0)==0){L=1527;break}else{I=I<<1;J=G}}if((L|0)==1527){if(K>>>0<(c[56334]|0)>>>0){ce()}c[K>>2]=y;c[n+24>>2]=J;c[n+12>>2]=n;c[n+8>>2]=n;return}K=J+8|0;L=c[K>>2]|0;I=c[56334]|0;if(J>>>0>>0){ce()}if(L>>>0>>0){ce()}c[L+12>>2]=y;c[K>>2]=y;c[n+8>>2]=L;c[n+12>>2]=J;c[n+24>>2]=0;return}function uz(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0.0,A=0.0,B=0,C=0,D=0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0.0,O=0,P=0,Q=0.0,R=0.0,S=0.0;e=b;while(1){f=e+1|0;if((aM(a[e]|0|0)|0)==0){break}else{e=f}}g=a[e]|0;if((g<<24>>24|0)==45){i=f;j=1}else if((g<<24>>24|0)==43){i=f;j=0}else{i=e;j=0}e=-1;f=0;g=i;while(1){k=a[g]|0;if(((k<<24>>24)-48|0)>>>0<10){l=e}else{if(k<<24>>24!=46|(e|0)>-1){break}else{l=f}}e=l;f=f+1|0;g=g+1|0}l=g+(-f|0)|0;i=(e|0)<0;m=((i^1)<<31>>31)+f|0;n=(m|0)>18;o=(n?-18:-m|0)+(i?f:e)|0;e=n?18:m;do{if((e|0)==0){p=b;q=0.0}else{if((e|0)>9){m=l;n=e;f=0;while(1){i=a[m]|0;r=m+1|0;if(i<<24>>24==46){s=a[r]|0;t=m+2|0}else{s=i;t=r}u=((f*10&-1)-48|0)+(s<<24>>24)|0;r=n-1|0;if((r|0)>9){m=t;n=r;f=u}else{break}}v=+(u|0)*1.0e9;w=9;x=t;y=1575}else{if((e|0)>0){v=0.0;w=e;x=l;y=1575}else{z=0.0;A=0.0}}if((y|0)==1575){f=x;n=w;m=0;while(1){r=a[f]|0;i=f+1|0;if(r<<24>>24==46){B=a[i]|0;C=f+2|0}else{B=r;C=i}D=((m*10&-1)-48|0)+(B<<24>>24)|0;i=n-1|0;if((i|0)>0){f=C;n=i;m=D}else{break}}z=+(D|0);A=v}E=A+z;do{if((k<<24>>24|0)==69|(k<<24>>24|0)==101){m=g+1|0;n=a[m]|0;if((n<<24>>24|0)==45){F=g+2|0;G=1}else if((n<<24>>24|0)==43){F=g+2|0;G=0}else{F=m;G=0}m=a[F]|0;if(((m<<24>>24)-48|0)>>>0<10){H=F;I=0;J=m}else{K=0;L=F;M=G;break}while(1){m=((I*10&-1)-48|0)+(J<<24>>24)|0;n=H+1|0;f=a[n]|0;if(((f<<24>>24)-48|0)>>>0<10){H=n;I=m;J=f}else{K=m;L=n;M=G;break}}}else{K=0;L=g;M=0}}while(0);n=o+((M|0)==0?K:-K|0)|0;m=(n|0)<0?-n|0:n;if((m|0)>511){c[b0()>>2]=34;N=1.0;O=30088;P=511;y=1592}else{if((m|0)==0){Q=1.0}else{N=1.0;O=30088;P=m;y=1592}}if((y|0)==1592){while(1){y=0;if((P&1|0)==0){R=N}else{R=N*+h[O>>3]}m=P>>1;if((m|0)==0){Q=R;break}else{N=R;O=O+8|0;P=m;y=1592}}}if((n|0)>-1){p=L;q=E*Q;break}else{p=L;q=E/Q;break}}}while(0);if((d|0)!=0){c[d>>2]=p}if((j|0)==0){S=q;return+S}S=-0.0-q;return+S}function uA(b){b=b|0;var c=0;c=b;while(a[c]|0){c=c+1|0}return c-b|0}function uB(b,c){b=b|0;c=c|0;var d=0;do{a[b+d|0]=a[c+d|0];d=d+1|0}while(a[c+(d-1)|0]|0);return b|0}function uC(b,c){b=b|0;c=c|0;var d=0,e=0;d=b+(uA(b)|0)|0;do{a[d+e|0]=a[c+e|0];e=e+1|0}while(a[c+(e-1)|0]|0);return b|0}function uD(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b|0;if((b&3)==(d&3)){while(b&3){if((e|0)==0)return f|0;a[b]=a[d]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b]=a[d]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function uE(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=b+e|0;if((e|0)>=20){d=d&255;e=b&3;g=d|d<<8|d<<16|d<<24;h=f&~3;if(e){e=b+4-e|0;while((b|0)<(e|0)){a[b]=d;b=b+1|0}}while((b|0)<(h|0)){c[b>>2]=g;b=b+4|0}}while((b|0)<(f|0)){a[b]=d;b=b+1|0}}function uF(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;while((e|0)<(d|0)){a[b+e|0]=f?0:a[c+e|0]|0;f=f?1:(a[c+e|0]|0)==0;e=e+1|0}return b|0}function uG(a,b,c){a=a|0;b=b|0;c=c|0;var e=0,f=0,g=0;while((e|0)<(c|0)){f=d[a+e|0]|0;g=d[b+e|0]|0;if((f|0)!=(g|0))return((f|0)>(g|0)?1:-1)|0;e=e+1|0}return 0}function uH(b,c,d){b=b|0;c=c|0;d=d|0;if((c|0)<(b|0)&(b|0)<(c+d|0)){c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b]=a[c]|0}}else{uD(b,c,d)}}function uI(a){a=a|0;if((a|0)<65)return a|0;if((a|0)>90)return a|0;return a-65+97|0}function uJ(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;while(e>>>0>>0){f=uI(a[b+e|0]|0)|0;g=uI(a[c+e|0]|0)|0;if((f|0)==(g|0)&(f|0)==0)return 0;if((f|0)==0)return-1;if((g|0)==0)return 1;if((f|0)==(g|0)){e=e+1|0;continue}else{return(f>>>0>g>>>0?1:-1)|0}}return 0}function uK(a,b){a=a|0;b=b|0;return uJ(a,b,-1)|0}function uL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;t=t+1|0;c[a>>2]=t;while((e|0)<40){if((c[d+(e<<2)>>2]|0)==0){c[d+(e<<2)>>2]=t;c[d+((e<<2)+4)>>2]=b;c[d+((e<<2)+8)>>2]=0;return 0}e=e+2|0}br(116);br(111);br(111);br(32);br(109);br(97);br(110);br(121);br(32);br(115);br(101);br(116);br(106);br(109);br(112);br(115);br(32);br(105);br(110);br(32);br(97);br(32);br(102);br(117);br(110);br(99);br(116);br(105);br(111);br(110);br(32);br(99);br(97);br(108);br(108);br(44);br(32);br(98);br(117);br(105);br(108);br(100);br(32);br(119);br(105);br(116);br(104);br(32);br(97);br(32);br(104);br(105);br(103);br(104);br(101);br(114);br(32);br(118);br(97);br(108);br(117);br(101);br(32);br(102);br(111);br(114);br(32);br(77);br(65);br(88);br(95);br(83);br(69);br(84);br(74);br(77);br(80);br(83);br(10);ab(0);return 0}function uM(a,b){a=a|0;b=b|0;var d=0,e=0;while((d|0)<20){e=c[b+(d<<2)>>2]|0;if((e|0)==0)break;if((e|0)==(a|0)){return c[b+((d<<2)+4)>>2]|0}d=d+2|0}return 0}function uN(){return b0()|0}function uO(a){a=a|0;bd(a|0)}function uP(a,b){a=a|0;b=b|0;cA(a|0,b|0)}function uQ(a){a=a|0;return bS(a|0)|0}function uR(a){a=a|0;return aR(a|0)|0}function uS(a){a=a|0;return a5(a|0)|0}function uT(a){a=a|0;return aA(a|0)|0}function uU(a){a=a|0;return bP(a|0)|0}function uV(a,b){a=a|0;b=b|0;return aY(a|0,b|0)|0}function uW(a,b){a=a|0;b=b|0;return bA(a|0,b|0)|0}function uX(a,b){a=a|0;b=b|0;return bD(a|0,b|0)|0}function uY(a,b,c){a=a|0;b=b|0;c=c|0;return a_(a|0,b|0,c|0)|0}function uZ(a,b,c){a=a|0;b=b|0;c=c|0;return cf(a|0,b|0,c|0)|0}function u_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return cH(a|0,b|0,c|0,d|0)|0}function u$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return aI(a|0,b|0,c|0,d|0)|0}function u0(a,b){a=a|0;b=b|0;return+aV(a|0,b|0)}function u1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;cI[a&63](b|0,c|0,d|0,e|0,f|0)}function u2(a,b,c,d,e,f,g){a=a|0;b=b|0;c=+c;d=+d;e=e|0;f=f|0;g=g|0;cJ[a&15](b|0,+c,+d,e|0,f|0,g|0)}function u3(a,b){a=a|0;b=+b;cK[a&63](+b)}function u4(a){a=a|0;return cL[a&7]()|0}function u5(a,b){a=a|0;b=b|0;cM[a&511](b|0)}function u6(a,b,c){a=a|0;b=b|0;c=c|0;cN[a&255](b|0,c|0)}function u7(a,b){a=a|0;b=b|0;return cO[a&255](b|0)|0}function u8(a,b,c){a=a|0;b=+b;c=+c;return cP[a&3](+b,+c)|0}function u9(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return cQ[a&7](b|0,c|0,d|0)|0}function va(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;cR[a&127](b|0,c|0,d|0)}function vb(a){a=a|0;cS[a&511]()}function vc(a,b,c,d,e,f){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=f|0;cT[a&15](b|0,+c,d|0,e|0,f|0)}function vd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return cU[a&7](b|0,c|0,d|0,e|0)|0}function ve(a,b,c){a=a|0;b=b|0;c=c|0;return+cV[a&7](b|0,c|0)}function vf(a,b,c){a=a|0;b=b|0;c=c|0;return cW[a&63](b|0,c|0)|0}function vg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ab(0)}function vh(a,b,c,d,e,f){a=a|0;b=+b;c=+c;d=d|0;e=e|0;f=f|0;ab(1)}function vi(a){a=+a;ab(2)}function vj(){ab(3);return 0}function vk(a){a=a|0;ab(4)}function vl(a,b){a=a|0;b=b|0;ab(5)}function vm(a){a=a|0;ab(6);return 0}function vn(a,b){a=+a;b=+b;ab(7);return 0}function vo(a,b,c){a=a|0;b=b|0;c=c|0;ab(8);return 0}function vp(a,b,c){a=a|0;b=b|0;c=c|0;ab(9)}function vq(){ab(10)}function vr(a,b,c,d,e){a=a|0;b=+b;c=c|0;d=d|0;e=e|0;ab(11)}function vs(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ab(12);return 0}function vt(a,b){a=a|0;b=b|0;ab(13);return 0.0}function vu(a,b){a=a|0;b=b|0;ab(14);return 0} -// EMSCRIPTEN_END_FUNCS -var cI=[vg,vg,sZ,vg,rC,vg,pN,vg,rM,vg,qN,vg,s1,vg,l2,vg,rd,vg,sn,vg,rc,vg,sC,vg,qP,vg,sF,vg,qk,vg,sW,vg,n6,vg,pV,vg,sd,vg,oq,vg,r0,vg,nK,vg,pw,vg,on,vg,lD,vg,nd,vg,mV,vg,pK,vg,vg,vg,vg,vg,vg,vg,vg,vg];var cJ=[vh,vh,nD,vh,mS,vh,qq,vh,n3,vh,pW,vh,lH,vh,vh,vh];var cK=[vi,vi,qG,vi,s_,vi,pM,vi,n7,vi,lC,vi,sE,vi,ql,vi,o8,vi,sG,vi,n5,vi,qX,vi,of,vi,nf,vi,sY,vi,mR,vi,mW,vi,lA,vi,op,vi,pP,vi,nb,vi,qL,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi,vi];var cL=[vj,vj,hy,vj,uN,vj,dI,vj];var cM=[vk,vk,g5,vk,iP,vk,kT,vk,th,vk,hg,vk,ku,vk,tm,vk,tn,vk,p4,vk,qf,vk,rk,vk,m_,vk,tb,vk,nu,vk,e0,vk,rj,vk,rZ,vk,kP,vk,mi,vk,mz,vk,hd,vk,kh,vk,sT,vk,rJ,vk,k7,vk,ff,vk,n8,vk,mX,vk,tc,vk,kE,vk,rs,vk,ks,vk,kF,vk,gX,vk,kG,vk,g1,vk,gY,vk,kM,vk,kn,vk,ou,vk,ke,vk,g6,vk,pZ,vk,ta,vk,lP,vk,iN,vk,tk,vk,te,vk,uu,vk,gL,vk,lF,vk,eW,vk,kS,vk,tr,vk,kx,vk,kU,vk,hj,vk,eI,vk,kI,vk,o3,vk,kR,vk,gZ,vk,kB,vk,gK,vk,m$,vk,tp,vk,kC,vk,e5,vk,qQ,vk,mN,vk,sa,vk,lB,vk,nH,vk,r2,vk,dL,vk,kv,vk,ki,vk,oN,vk,l9,vk,q9,vk,kY,vk,kj,vk,g0,vk,ph,vk,gM,vk,gW,vk,lU,vk,eJ,vk,s$,vk,qD,vk,tl,vk,kz,vk,kg,vk,gJ,vk,k5,vk,g$,vk,qi,vk,kQ,vk,g9,vk,e7,vk,kf,vk,sz,vk,g_,vk,g7,vk,gN,vk,sH,vk,eZ,vk,g4,vk,kl,vk,nY,vk,gP,vk,kZ,vk,k_,vk,qs,vk,m7,vk,gS,vk,e_,vk,qV,vk,hb,vk,eG,vk,pI,vk,kq,vk,g2,vk,he,vk,ky,vk,gV,vk,k3,vk,pY,vk,eK,vk,qo,vk,e$,vk,kX,vk,gG,vk,kk,vk,k1,vk,jI,vk,ps,vk,kD,vk,hf,vk,to,vk,s8,vk,gR,vk,pS,vk,gE,vk,rh,vk,gI,vk,ti,vk,g8,vk,nh,vk,k0,vk,k$,vk,td,vk,k6,vk,kJ,vk,tj,vk,gU,vk,km,vk,hc,vk,gH,vk,gF,vk,kH,vk,kO,vk,nE,vk,gO,vk,eF,vk,kL,vk,gQ,vk,gT,vk,hi,vk,oU,vk,k8,vk,k2,vk,kK,vk,hh,vk,s9,vk,g3,vk,kt,vk,uO,vk,qt,vk,eH,vk,mo,vk,os,vk,kN,vk,kw,vk,ha,vk,gD,vk,tq,vk,sl,vk,ko,vk,k4,vk,kp,vk,ol,vk,kA,vk,ow,vk,tf,vk,pX,vk,lT,vk,tg,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk,vk];var cN=[vl,vl,sS,vl,oT,vl,rH,vl,pT,vl,ok,vl,pr,vl,qp,vl,oB,vl,nG,vl,pG,vl,oA,vl,px,vl,oS,vl,nW,vl,p2,vl,qM,vl,l_,vl,r3,vl,oL,vl,m5,vl,my,vl,rr,vl,oM,vl,nX,vl,l7,vl,pf,vl,nn,vl,p3,vl,sy,vl,mt,vl,qe,vl,n9,vl,rY,vl,pg,vl,sR,vl,rI,vl,qd,vl,qR,vl,tM,vl,tU,vl,lZ,vl,py,vl,mh,vl,uP,vl,rX,vl,o2,vl,qB,vl,l8,vl,mY,vl,mL,vl,mg,vl,nO,vl,m6,vl,ns,vl,r9,vl,sx,vl,s0,vl,rq,vl,pH,vl,sI,vl,oj,vl,nP,vl,lO,vl,ms,vl,mM,vl,q3,vl,q2,vl,mx,vl,rT,vl,sk,vl,qC,vl,nm,vl,r8,vl,ot,vl,no,vl,o1,vl,qW,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl,vl];var cO=[vm,vm,o5,vm,e6,vm,qZ,vm,nF,vm,pQ,vm,lv,vm,h2,vm,pm,vm,uQ,vm,mP,vm,oW,vm,im,vm,pB,vm,oP,vm,q7,vm,ia,vm,mI,vm,nZ,vm,sX,vm,h4,vm,qm,vm,id,vm,ij,vm,r1,vm,m8,vm,q_,vm,n1,vm,ut,vm,uR,vm,mU,vm,l0,vm,rx,vm,h8,vm,sD,vm,sj,vm,sp,vm,hP,vm,pi,vm,ie,vm,pu,vm,oe,vm,o6,vm,h5,vm,ry,vm,pL,vm,ic,vm,od,vm,m9,vm,or,vm,h9,vm,uS,vm,h6,vm,nc,vm,uT,vm,qa,vm,sL,vm,q6,vm,rS,vm,oD,vm,h3,vm,hX,vm,lw,vm,tC,vm,rv,vm,rQ,vm,p9,vm,ik,vm,mQ,vm,nq,vm,sM,vm,o9,vm,qj,vm,nr,vm,qz,vm,ii,vm,mD,vm,pC,vm,h7,vm,lR,vm,lS,vm,uU,vm,mb,vm,qH,vm,pj,vm,rR,vm,h1,vm,il,vm,qy,vm,sr,vm,n4,vm,h0,vm,n_,vm,rP,vm,sK,vm,rw,vm,ng,vm,nC,vm,ig,vm,si,vm,sq,vm,ib,vm,qO,vm,ih,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm,vm];var cP=[vn,vn,lu,vn];var cQ=[vo,vo,uY,vo,uZ,vo,vo,vo];var cR=[vp,vp,tw,vp,pt,vp,uf,vp,lL,vp,sA,vp,rt,vp,r$,vp,ri,vp,o4,vp,rA,vp,pl,vp,p5,vp,qF,vp,na,vp,qE,vp,o7,vp,sB,vp,rB,vp,nv,vp,l$,vp,ma,vp,oE,vp,tX,vp,sU,vp,n0,vp,oO,vp,l1,vp,rb,vp,ne,vp,ly,vp,mA,vp,nQ,vp,r_,vp,qg,vp,mT,vp,mp,vp,tR,vp,hw,vp,mu,vp,mj,vp,rL,vp,sc,vp,tB,vp,lQ,vp,ra,vp,sV,vp,oo,vp,q4,vp,oC,vp,rK,vp,n$,vp,nJ,vp,sm,vp,oV,vp,nI,vp,om,vp,pJ,vp,pO,vp,mO,vp,pv,vp,qh,vp,tQ,vp,sb,vp];var cS=[vq,vq,m3,vq,p7,vq,mC,vq,mc,vq,dR,vq,pb,vq,rl,vq,pR,vq,qv,vq,mk,vq,ee,vq,np,vq,ei,vq,nL,vq,dX,vq,nU,vq,p8,vq,d9,vq,jy,vq,nz,vq,pA,vq,dH,vq,ru,vq,l3,vq,mw,vq,mf,vq,sQ,vq,oc,vq,o_,vq,d3,vq,nk,vq,es,vq,mB,vq,pa,vq,pe,vq,ox,vq,sN,vq,qT,vq,ob,vq,mE,vq,qr,vq,rm,vq,nt,vq,pd,vq,nN,vq,lo,vq,sh,vq,dV,vq,l5,vq,me,vq,ml,vq,oX,vq,m0,vq,lE,vq,sP,vq,eb,vq,se,vq,sJ,vq,d1,vq,lY,vq,r6,vq,er,vq,su,vq,eh,vq,qU,vq,pU,vq,oK,vq,n2,vq,t7,vq,fd,vq,dv,vq,dt,vq,pE,vq,mG,vq,m2,vq,qA,vq,rG,vq,qb,vq,q8,vq,rE,vq,pF,vq,rn,vq,d0,vq,m1,vq,mq,vq,mr,vq,eq,vq,r7,vq,oR,vq,qn,vq,nM,vq,en,vq,rg,vq,q5,vq,lN,vq,ov,vq,t5,vq,ny,vq,pq,vq,qx,vq,ex,vq,oY,vq,mF,vq,eg,vq,pn,vq,qc,vq,d_,vq,oF,vq,l4,vq,oz,vq,mH,vq,rF,vq,r4,vq,p_,vq,qS,vq,dQ,vq,mv,vq,dZ,vq,oa,vq,d6,vq,nw,vq,qK,vq,nS,vq,qu,vq,oJ,vq,sw,vq,nB,vq,pp,vq,dw,vq,oI,vq,og,vq,oH,vq,rO,vq,l6,vq,re,vq,oQ,vq,lX,vq,mm,vq,ec,vq,pk,vq,q1,vq,nj,vq,o$,vq,ej,vq,nx,vq,dN,vq,jo,vq,mn,vq,pD,vq,rW,vq,ni,vq,lM,vq,nR,vq,ro,vq,r5,vq,nl,vq,sO,vq,st,vq,p1,vq,po,vq,oi,vq,rU,vq,p0,vq,dW,vq,nV,vq,dY,vq,lI,vq,pc,vq,qI,vq,ek,vq,oy,vq,oG,vq,sg,vq,rN,vq,d5,vq,dE,vq,em,vq,qJ,vq,rV,vq,md,vq,q$,vq,ef,vq,oZ,vq,el,vq,ed,vq,mJ,vq,p$,vq,mZ,vq,pz,vq,rp,vq,nA,vq,dG,vq,sf,vq,d2,vq,sv,vq,so,vq,rz,vq,qw,vq,lV,vq,d4,vq,rf,vq,nT,vq,d7,vq,rD,vq,o0,vq,ss,vq,lW,vq,dS,vq,iK,vq,ds,vq,d$,vq,gk,vq,d8,vq,p6,vq,q0,vq,m4,vq,oh,vq,mK,vq,qY,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq,vq];var cT=[vr,vr,f6,vr,f7,vr,fJ,vr,dC,vr,fH,vr,fI,vr,di,vr];var cU=[vs,vs,u_,vs,u$,vs,vs,vs];var cV=[vt,vt,u0,vt,uz,vt,vt,vt];var cW=[vu,vu,lr,vu,la,vu,gn,vu,uV,vu,uW,vu,f5,vu,go,vu,i2,vu,hm,vu,hA,vu,iV,vu,uq,vu,uX,vu,uB,vu,f4,vu,gl,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu,vu];return{_memcmp:uG,_saveSetjmp:uL,_strcat:uC,_free:uu,_main:iM,_testSetjmp:uM,_strncpy:uF,_memmove:uH,_tolower:uI,_memset:uE,_malloc:ut,_memcpy:uD,_strcasecmp:uK,_strlen:uA,_realloc:uv,_strncasecmp:uJ,_strcpy:uB,stackAlloc:cX,stackSave:cY,stackRestore:cZ,setThrew:c_,setTempRet0:c$,setTempRet1:c0,setTempRet2:c1,setTempRet3:c2,setTempRet4:c3,setTempRet5:c4,setTempRet6:c5,setTempRet7:c6,setTempRet8:c7,setTempRet9:c8,dynCall_viiiii:u1,dynCall_viffiii:u2,dynCall_vf:u3,dynCall_i:u4,dynCall_vi:u5,dynCall_vii:u6,dynCall_ii:u7,dynCall_iff:u8,dynCall_iiii:u9,dynCall_viii:va,dynCall_v:vb,dynCall_vifiii:vc,dynCall_iiiii:vd,dynCall_fii:ve,dynCall_iii:vf}}) -// EMSCRIPTEN_END_ASM -({ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "copyTempDouble": copyTempDouble, "copyTempFloat": copyTempFloat, "min": Math_min, "invoke_viiiii": invoke_viiiii, "invoke_viffiii": invoke_viffiii, "invoke_vf": invoke_vf, "invoke_i": invoke_i, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_iff": invoke_iff, "invoke_iiii": invoke_iiii, "invoke_viii": invoke_viii, "invoke_v": invoke_v, "invoke_vifiii": invoke_vifiii, "invoke_iiiii": invoke_iiiii, "invoke_fii": invoke_fii, "invoke_iii": invoke_iii, "_lseek": _lseek, "__scanString": __scanString, "_fclose": _fclose, "_uname": _uname, "_sleep": _sleep, "__isFloat": __isFloat, "_fflush": _fflush, "_strtol": _strtol, "_fputc": _fputc, "_iconv": _iconv, "___signgam": ___signgam, "_fwrite": _fwrite, "_send": _send, "_fputs": _fputs, "_tmpnam": _tmpnam, "_isspace": _isspace, "_localtime": _localtime, "_read": _read, "_ceil": _ceil, "_strstr": _strstr, "_fileno": _fileno, "_perror": _perror, "_ctime": _ctime, "_fsync": _fsync, "_signal": _signal, "_opendir": _opendir, "_fmod": _fmod, "_strcmp": _strcmp, "_memchr": _memchr, "_strncmp": _strncmp, "_tmpfile": _tmpfile, "_snprintf": _snprintf, "_fgetc": _fgetc, "_pclose": _pclose, "_readdir": _readdir, "_cosh": _cosh, "_atexit": _atexit, "_fgets": _fgets, "_close": _close, "_strchr": _strchr, "_asin": _asin, "_llvm_lifetime_start": _llvm_lifetime_start, "___setErrNo": ___setErrNo, "_ftell": _ftell, "_exit": _exit, "_sprintf": _sprintf, "_llvm_lifetime_end": _llvm_lifetime_end, "_asctime": _asctime, "_strrchr": _strrchr, "_iconv_open": _iconv_open, "_modf": _modf, "_strcspn": _strcspn, "_getcwd": _getcwd, "_gmtime": _gmtime, "_localtime_r": _localtime_r, "_asctime_r": _asctime_r, "_recv": _recv, "_cos": _cos, "_putchar": _putchar, "_isalnum": _isalnum, "_popen": _popen, "_erfc": _erfc, "__exit": __exit, "_strftime": _strftime, "_llvm_va_end": _llvm_va_end, "_tzset": _tzset, "_sinh": _sinh, "_setlocale": _setlocale, "_isprint": _isprint, "_toupper": _toupper, "_printf": _printf, "_pread": _pread, "_fopen": _fopen, "_open": _open, "_usleep": _usleep, "_log": _log, "_puts": _puts, "_mktime": _mktime, "_fdopen": _fdopen, "_qsort": _qsort, "_system": _system, "_isalpha": _isalpha, "_strdup": _strdup, "_log10": _log10, "_closedir": _closedir, "_isatty": _isatty, "__formatString": __formatString, "_getenv": _getenv, "_gettimeofday": _gettimeofday, "_atoi": _atoi, "_vfprintf": _vfprintf, "_chdir": _chdir, "_llvm_pow_f64": _llvm_pow_f64, "_sbrk": _sbrk, "_localeconv": _localeconv, "___errno_location": ___errno_location, "_strerror": _strerror, "_lgamma": _lgamma, "_erf": _erf, "_strspn": _strspn, "__parseInt": __parseInt, "_ungetc": _ungetc, "_llvm_trap": _llvm_trap, "_rename": _rename, "_vsnprintf": _vsnprintf, "_sscanf": _sscanf, "_sysconf": _sysconf, "_acos": _acos, "_fread": _fread, "_abort": _abort, "_fprintf": _fprintf, "___fpclassifyf": ___fpclassifyf, "_tan": _tan, "___buildEnvironment": ___buildEnvironment, "_feof": _feof, "_strncat": _strncat, "_gmtime_r": _gmtime_r, "_fabs": _fabs, "_floor": _floor, "__reallyNegative": __reallyNegative, "_fseek": _fseek, "_sqrt": _sqrt, "_write": _write, "_rewind": _rewind, "_sin": _sin, "_stat": _stat, "_longjmp": _longjmp, "_atan": _atan, "_readdir_r": _readdir_r, "_strpbrk": _strpbrk, "_iconv_close": _iconv_close, "_setbuf": _setbuf, "_nl_langinfo": _nl_langinfo, "_pwrite": _pwrite, "_strerror_r": _strerror_r, "_atan2": _atan2, "_exp": _exp, "_time": _time, "_setvbuf": _setvbuf, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity, "_stderr": _stderr, "_stdout": _stdout, "_stdin": _stdin }, buffer); -var _memcmp = Module["_memcmp"] = asm["_memcmp"]; -var _saveSetjmp = Module["_saveSetjmp"] = asm["_saveSetjmp"]; -var _strcat = Module["_strcat"] = asm["_strcat"]; -var _free = Module["_free"] = asm["_free"]; -var _main = Module["_main"] = asm["_main"]; -var _testSetjmp = Module["_testSetjmp"] = asm["_testSetjmp"]; -var _strncpy = Module["_strncpy"] = asm["_strncpy"]; -var _memmove = Module["_memmove"] = asm["_memmove"]; -var _tolower = Module["_tolower"] = asm["_tolower"]; -var _memset = Module["_memset"] = asm["_memset"]; -var _malloc = Module["_malloc"] = asm["_malloc"]; -var _memcpy = Module["_memcpy"] = asm["_memcpy"]; -var _strcasecmp = Module["_strcasecmp"] = asm["_strcasecmp"]; -var _strlen = Module["_strlen"] = asm["_strlen"]; -var _realloc = Module["_realloc"] = asm["_realloc"]; -var _strncasecmp = Module["_strncasecmp"] = asm["_strncasecmp"]; -var _strcpy = Module["_strcpy"] = asm["_strcpy"]; -var dynCall_viiiii = Module["dynCall_viiiii"] = asm["dynCall_viiiii"]; -var dynCall_viffiii = Module["dynCall_viffiii"] = asm["dynCall_viffiii"]; -var dynCall_vf = Module["dynCall_vf"] = asm["dynCall_vf"]; -var dynCall_i = Module["dynCall_i"] = asm["dynCall_i"]; -var dynCall_vi = Module["dynCall_vi"] = asm["dynCall_vi"]; -var dynCall_vii = Module["dynCall_vii"] = asm["dynCall_vii"]; -var dynCall_ii = Module["dynCall_ii"] = asm["dynCall_ii"]; -var dynCall_iff = Module["dynCall_iff"] = asm["dynCall_iff"]; -var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"]; -var dynCall_viii = Module["dynCall_viii"] = asm["dynCall_viii"]; -var dynCall_v = Module["dynCall_v"] = asm["dynCall_v"]; -var dynCall_vifiii = Module["dynCall_vifiii"] = asm["dynCall_vifiii"]; -var dynCall_iiiii = Module["dynCall_iiiii"] = asm["dynCall_iiiii"]; -var dynCall_fii = Module["dynCall_fii"] = asm["dynCall_fii"]; -var dynCall_iii = Module["dynCall_iii"] = asm["dynCall_iii"]; -Runtime.stackAlloc = function(size) { return asm['stackAlloc'](size) }; -Runtime.stackSave = function() { return asm['stackSave']() }; -Runtime.stackRestore = function(top) { asm['stackRestore'](top) }; -// Warning: printing of i64 values may be slightly rounded! No deep i64 math used, so precise i64 code not included -var i64Math = null; -// === Auto-generated postamble setup entry stuff === -Module['callMain'] = function callMain(args) { - assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on __ATMAIN__)'); - assert(!Module['preRun'] || Module['preRun'].length == 0, 'cannot call main when preRun functions remain to be called'); - args = args || []; - ensureInitRuntime(); - var argc = args.length+1; - function pad() { - for (var i = 0; i < 4-1; i++) { - argv.push(0); - } - } - var argv = [allocate(intArrayFromString("/bin/this.program"), 'i8', ALLOC_NORMAL) ]; - pad(); - for (var i = 0; i < argc-1; i = i + 1) { - argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL)); - pad(); - } - argv.push(0); - argv = allocate(argv, 'i32', ALLOC_NORMAL); - var ret; - var initialStackTop = STACKTOP; - try { - ret = Module['_main'](argc, argv, 0); - } - catch(e) { - if (e.name == 'ExitStatus') { - return e.status; - } else if (e == 'SimulateInfiniteLoop') { - Module['noExitRuntime'] = true; - } else { - throw e; - } - } finally { - STACKTOP = initialStackTop; - } - return ret; -} -function run(args) { - args = args || Module['arguments']; - if (runDependencies > 0) { - Module.printErr('run() called, but dependencies remain, so not running'); - return 0; - } - if (Module['preRun']) { - if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; - var toRun = Module['preRun']; - Module['preRun'] = []; - for (var i = toRun.length-1; i >= 0; i--) { - toRun[i](); - } - if (runDependencies > 0) { - // a preRun added a dependency, run will be called later - return 0; - } - } - function doRun() { - ensureInitRuntime(); - preMain(); - var ret = 0; - calledRun = true; - if (Module['_main'] && shouldRunNow) { - ret = Module['callMain'](args); - if (!Module['noExitRuntime']) { - exitRuntime(); - } - } - if (Module['postRun']) { - if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; - while (Module['postRun'].length > 0) { - Module['postRun'].pop()(); - } - } - return ret; - } - if (Module['setStatus']) { - Module['setStatus']('Running...'); - setTimeout(function() { - setTimeout(function() { - Module['setStatus'](''); - }, 1); - if (!ABORT) doRun(); - }, 1); - return 0; - } else { - return doRun(); - } -} -Module['run'] = Module.run = run; -// {{PRE_RUN_ADDITIONS}} -if (Module['preInit']) { - if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; - while (Module['preInit'].length > 0) { - Module['preInit'].pop()(); - } -} -// shouldRunNow refers to calling main(), not run(). -var shouldRunNow = false; -if (Module['noInitialRun']) { - shouldRunNow = false; -} -run(); -// {{POST_RUN_ADDITIONS}} - // {{MODULE_ADDITIONS}} - shouldRunNow = true; - self['Runtime'] = Runtime; - self['FS'] = FS; -}; -gnuplot_create(); -// This is to avoid name mangling from closure compilers. -self['FS'] = FS; -self['FS']['root'] = FS.root; -self['FS']['deleteFile'] = FS.deleteFile; -self['FS']['findObject'] = FS.findObject; -self['FS']['createDataFile'] = FS.createDataFile; -self['FS']['getFileContents'] = function(name) { - var file = FS.findObject(name); - if (!file) return null; - return file.contents; -}; diff --git a/deps/v8/tools/profviz/profviz.css b/deps/v8/tools/profviz/profviz.css deleted file mode 100644 index c583b8943c7635..00000000000000 --- a/deps/v8/tools/profviz/profviz.css +++ /dev/null @@ -1,138 +0,0 @@ -/* -Copyright 2013 the V8 project authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -body { - background-color: #ddd; -} - -#content { - background-color: #fff; - width: 1200px; - margin-left: auto; - margin-right: auto; - padding: 25px; -} - -textarea { - width: 1200px; - resize: none; - font-family: monospace; - font-size: 12px; - color: #000; - border: 1px dotted #aaa; - padding: 10px; - box-sizing: border-box; -} - -textarea.log { - background-color: #ffe; -} - -.display { - width: 1200px; - height: 600px; - background-color: #fff; - display: block; - box-sizing: border-box; -} - -table { - width: 1200px; -} - -button { - width: 100px; - height: 20px; - border: 1px solid #000; - border-color: #aaa; - font-family: Verdana; - font-size: 12px; - background-color: #ddd; -} - -button:hover { - background-color: #eee; -} - -#file { - width: 200px; - height: 20px; - border: none; - font-family: Verdana; - font-size: 12px; -} - -input.range { - width: 70px; - height: 16px; - text-align: right; - padding-right: 5px; - border: 0px; - background-color: #eee; - font-family: Verdana; - font-size: 12px; -} - -label { - height: 20px; - font-family: Verdana; - font-size: 12px; -} - -.tooltip { - border-bottom: 1px dotted #000; -} - -h1 { - font-family: Verdana; - font-size: 14px; - font-weight: bold; -} - -.text { - font-family: Verdana; - font-size: 12px; -} - -.tt { - font-family: monospace; - font-size: 12px; - color: #822; -} - -a { - font-family: Verdana; - font-size: 12px; - text-decoration: none; - color: #282; -} - -a.unroll { - border-bottom: 1px dotted #000; - color: #222; -} diff --git a/deps/v8/tools/profviz/profviz.html b/deps/v8/tools/profviz/profviz.html deleted file mode 100644 index d7dd9cb9508019..00000000000000 --- a/deps/v8/tools/profviz/profviz.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - V8 profile log plotter - - - - - -

SIGINT Sent to indicate when a user wishes to interrupt a process - ((Ctrl+C)).
SIGQUIT
* Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) diff --git a/doc/changelogs/CHANGELOG_V010.md b/doc/changelogs/CHANGELOG_V010.md index d4b579e6b5b88b..50ad492c21bd06 100644 --- a/doc/changelogs/CHANGELOG_V010.md +++ b/doc/changelogs/CHANGELOG_V010.md @@ -66,6 +66,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) diff --git a/doc/changelogs/CHANGELOG_V012.md b/doc/changelogs/CHANGELOG_V012.md index d0485ffc58f652..d518019b97db57 100644 --- a/doc/changelogs/CHANGELOG_V012.md +++ b/doc/changelogs/CHANGELOG_V012.md @@ -34,6 +34,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) diff --git a/doc/changelogs/CHANGELOG_V10.md b/doc/changelogs/CHANGELOG_V10.md index 7bd6ce7fe71949..84ead9d860f16b 100644 --- a/doc/changelogs/CHANGELOG_V10.md +++ b/doc/changelogs/CHANGELOG_V10.md @@ -11,6 +11,7 @@ +10.23.0
10.22.1
10.22.0
10.21.0
@@ -54,6 +55,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) @@ -69,6 +71,34 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + +## 2020-10-27, Version 10.23.0 'Dubnium' (LTS), @richardlau + +### Notable changes + +* **deps**: + * upgrade npm to 6.14.8 (Ruy Adorno) [#34834](https://github.com/nodejs/node/pull/34834) +* **n-api**: + * create N-API version 7 (Gabriel Schulhof) [#35199](https://github.com/nodejs/node/pull/35199) + * expose napi_build_version variable (NickNaso) [#27835](https://github.com/nodejs/node/pull/27835) +* **tools**: + * add debug entitlements for macOS 10.15+ (Gabriele Greco) [#34378](https://github.com/nodejs/node/pull/34378) + +### Commits + +* [[`b83f9a56fc`](https://github.com/nodejs/node/commit/b83f9a56fc)] - **build**: expose napi_build_version variable (NickNaso) [#27835](https://github.com/nodejs/node/pull/27835) +* [[`020ba1a2b8`](https://github.com/nodejs/node/commit/020ba1a2b8)] - **build**: enable backtrace when V8 is built for PPC and S390x (Michaël Zasso) [#32113](https://github.com/nodejs/node/pull/32113) +* [[`eee9412a8c`](https://github.com/nodejs/node/commit/eee9412a8c)] - **deps**: upgrade npm to 6.14.8 (Ruy Adorno) [#34834](https://github.com/nodejs/node/pull/34834) +* [[`038593d5ff`](https://github.com/nodejs/node/commit/038593d5ff)] - **deps**: upgrade npm to 6.14.7 (claudiahdz) [#34468](https://github.com/nodejs/node/pull/34468) +* [[`3564424625`](https://github.com/nodejs/node/commit/3564424625)] - **deps**: V8: cherry-pick eec10a2fd8fa (Stephen Belanger) [#33778](https://github.com/nodejs/node/pull/33778) +* [[`e9e86e1b60`](https://github.com/nodejs/node/commit/e9e86e1b60)] - **http2**: support non-empty DATA frame with END_STREAM flag (Carlos Lopez) [#33875](https://github.com/nodejs/node/pull/33875) +* [[`751820b6c2`](https://github.com/nodejs/node/commit/751820b6c2)] - **http2,doc**: minor fixes (Alba Mendez) [#28044](https://github.com/nodejs/node/pull/28044) +* [[`54c2bc2e62`](https://github.com/nodejs/node/commit/54c2bc2e62)] - **(SEMVER-MINOR)** **n-api**: create N-API version 7 (Gabriel Schulhof) [#35199](https://github.com/nodejs/node/pull/35199) +* [[`2eb627301c`](https://github.com/nodejs/node/commit/2eb627301c)] - **src**: allows escaping NODE_OPTIONS with backslashes (Maël Nison) [#24065](https://github.com/nodejs/node/pull/24065) +* [[`5170d14b36`](https://github.com/nodejs/node/commit/5170d14b36)] - **test**: fix test-linux-perf flakiness (Matheus Marchini) [#27615](https://github.com/nodejs/node/pull/27615) +* [[`21b86d7f19`](https://github.com/nodejs/node/commit/21b86d7f19)] - **test,v8**: skip less and stabilize test-linux-perf.js (Refael Ackermann) [#27364](https://github.com/nodejs/node/pull/27364) +* [[`ee11ab50a7`](https://github.com/nodejs/node/commit/ee11ab50a7)] - **tools**: add debug entitlements for macOS 10.15+ (Gabriele Greco) [#34378](https://github.com/nodejs/node/pull/34378) + ## 2020-09-15, Version 10.22.1 'Dubnium' (LTS), @BethGriggs diff --git a/doc/changelogs/CHANGELOG_V11.md b/doc/changelogs/CHANGELOG_V11.md index be1cd8102e74a5..8264af62cf2e0c 100644 --- a/doc/changelogs/CHANGELOG_V11.md +++ b/doc/changelogs/CHANGELOG_V11.md @@ -32,6 +32,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) diff --git a/doc/changelogs/CHANGELOG_V12.md b/doc/changelogs/CHANGELOG_V12.md index 51d3c4ab50e7de..102e499ac43cf2 100644 --- a/doc/changelogs/CHANGELOG_V12.md +++ b/doc/changelogs/CHANGELOG_V12.md @@ -11,6 +11,8 @@ +12.20.0
+12.19.1
12.19.0
12.18.4
12.18.3
@@ -51,6 +53,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [11.x](CHANGELOG_V11.md) @@ -66,6 +69,178 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + +## 2020-11-24, Version 12.20.0 'Erbium' (LTS), @mylesborins + +### Notable Changes + +* **crypto**: + * update certdata to NSS 3.56 (Shelley Vohr) + https://github.com/nodejs/node/pull/35546 +* **deps**: + * update llhttp to 2.1.3 (Fedor Indutny) + https://github.com/nodejs/node/pull/35435 + * (SEMVER-MINOR) upgrade to libuv 1.40.0 (Colin Ihrig) + https://github.com/nodejs/node/pull/35333 +* **doc**: + * add aduh95 to collaborators (Antoine du Hamel) + https://github.com/nodejs/node/pull/35542 +* **fs**: + * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) + https://github.com/nodejs/node/pull/33134 +* **http**: + * (SEMVER-MINOR) added scheduling option to http agent (delvedor) + https://github.com/nodejs/node/pull/33278 +* **module**: + * (SEMVER-MINOR) exports pattern support (Guy Bedford) + https://github.com/nodejs/node/pull/34718 + * (SEMVER-MINOR) named exports for CJS via static analysis (Guy Bedford) + https://github.com/nodejs/node/pull/35249 +* **n-api**: + * (SEMVER-MINOR) add more property defaults (Gerhard Stoebich) + https://github.com/nodejs/node/pull/35214 +* **src**: + * (SEMVER-MINOR) move node_contextify to modern THROW_ERR_* (James M Snell) + https://github.com/nodejs/node/pull/35470 + * (SEMVER-MINOR) move node_process to modern THROW_ERR* (James M Snell) + https://github.com/nodejs/node/pull/35472 + * (SEMVER-MINOR) expose v8::Isolate setup callbacks (Shelley Vohr) + https://github.com/nodejs/node/pull/35512 + +### Commits + +* [[`c6eb0b62d9`](https://github.com/nodejs/node/commit/c6eb0b62d9)] - **benchmark**: ignore build artifacts for napi addons (Richard Lau) [#35970](https://github.com/nodejs/node/pull/35970) +* [[`f3a045720c`](https://github.com/nodejs/node/commit/f3a045720c)] - **build**: fuzzer that targets node::LoadEnvironment() (davkor) [#34844](https://github.com/nodejs/node/pull/34844) +* [[`48bc3fcd4c`](https://github.com/nodejs/node/commit/48bc3fcd4c)] - **build**: improved release lint error message (Shelley Vohr) [#35523](https://github.com/nodejs/node/pull/35523) +* [[`2e766a6adf`](https://github.com/nodejs/node/commit/2e766a6adf)] - **console**: add Symbol.toStringTag property (Leko) [#35399](https://github.com/nodejs/node/pull/35399) +* [[`90244362cc`](https://github.com/nodejs/node/commit/90244362cc)] - **crypto**: fix KeyObject garbage collection (Anna Henningsen) [#35481](https://github.com/nodejs/node/pull/35481) +* [[`42f64eba89`](https://github.com/nodejs/node/commit/42f64eba89)] - **crypto**: update certdata to NSS 3.56 (Shelley Vohr) [#35546](https://github.com/nodejs/node/pull/35546) +* [[`a6f58c0888`](https://github.com/nodejs/node/commit/a6f58c0888)] - **crypto**: set env values in KeyObject Deserialize method (ThakurKarthik) [#35416](https://github.com/nodejs/node/pull/35416) +* [[`6539cf2725`](https://github.com/nodejs/node/commit/6539cf2725)] - **deps**: upgrade to cjs-module-lexer@1.0.0 (Guy Bedford) [#35928](https://github.com/nodejs/node/pull/35928) +* [[`bdcc77bdf4`](https://github.com/nodejs/node/commit/bdcc77bdf4)] - **deps**: update to cjs-module-lexer@0.5.2 (Guy Bedford) [#35901](https://github.com/nodejs/node/pull/35901) +* [[`5b8d3c74e8`](https://github.com/nodejs/node/commit/5b8d3c74e8)] - **deps**: upgrade to cjs-module-lexer@0.5.0 (Guy Bedford) [#35871](https://github.com/nodejs/node/pull/35871) +* [[`d7f0e3e5f0`](https://github.com/nodejs/node/commit/d7f0e3e5f0)] - **deps**: update to cjs-module-lexer@0.4.3 (Guy Bedford) [#35745](https://github.com/nodejs/node/pull/35745) +* [[`0a1474d9df`](https://github.com/nodejs/node/commit/0a1474d9df)] - **deps**: update llhttp to 2.1.3 (Fedor Indutny) [#35435](https://github.com/nodejs/node/pull/35435) +* [[`cf07a8695a`](https://github.com/nodejs/node/commit/cf07a8695a)] - **deps**: upgrade to libuv 1.40.0 (Colin Ihrig) [#35333](https://github.com/nodejs/node/pull/35333) +* [[`cc11464b4e`](https://github.com/nodejs/node/commit/cc11464b4e)] - **deps**: upgrade to c-ares v1.16.1 (Shelley Vohr) [#35324](https://github.com/nodejs/node/pull/35324) +* [[`5405e62eaf`](https://github.com/nodejs/node/commit/5405e62eaf)] - **deps**: update to uvwasi 0.0.11 (Colin Ihrig) [#35104](https://github.com/nodejs/node/pull/35104) +* [[`44c739cc49`](https://github.com/nodejs/node/commit/44c739cc49)] - **deps**: V8: cherry-pick 6be2f6e26e8d (Benjamin Coe) [#35055](https://github.com/nodejs/node/pull/35055) +* [[`b78a1a186f`](https://github.com/nodejs/node/commit/b78a1a186f)] - **doc**: update releaser in v12.18.4 changelog (Beth Griggs) [#35217](https://github.com/nodejs/node/pull/35217) +* [[`1cd1d0159d`](https://github.com/nodejs/node/commit/1cd1d0159d)] - **doc**: move package.import content higher (Myles Borins) [#35535](https://github.com/nodejs/node/pull/35535) +* [[`79f3c323f6`](https://github.com/nodejs/node/commit/79f3c323f6)] - **doc**: fix broken links in modules.md (Rich Trott) [#35182](https://github.com/nodejs/node/pull/35182) +* [[`b4941cfaec`](https://github.com/nodejs/node/commit/b4941cfaec)] - **doc**: make minor improvements to module.md (Rich Trott) [#35083](https://github.com/nodejs/node/pull/35083) +* [[`7dc3b74c34`](https://github.com/nodejs/node/commit/7dc3b74c34)] - **doc**: add ESM examples in `module` API doc page (Antoine du HAMEL) [#34875](https://github.com/nodejs/node/pull/34875) +* [[`f0b06b64ff`](https://github.com/nodejs/node/commit/f0b06b64ff)] - **doc**: move module core module doc to separate page (Antoine du HAMEL) [#34747](https://github.com/nodejs/node/pull/34747) +* [[`77555d8500`](https://github.com/nodejs/node/commit/77555d8500)] - **doc**: put landing specifics in details tag (Rich Trott) [#35296](https://github.com/nodejs/node/pull/35296) +* [[`b50b34b30e`](https://github.com/nodejs/node/commit/b50b34b30e)] - **doc**: put release script specifics in details (Myles Borins) [#35260](https://github.com/nodejs/node/pull/35260) +* [[`1a8f3a844e`](https://github.com/nodejs/node/commit/1a8f3a844e)] - **doc**: copyedit esm.md (Rich Trott) [#35414](https://github.com/nodejs/node/pull/35414) +* [[`d99120040c`](https://github.com/nodejs/node/commit/d99120040c)] - **doc**: error code fix in resolver spec (Guy Bedford) [#34998](https://github.com/nodejs/node/pull/34998) +* [[`df52814113`](https://github.com/nodejs/node/commit/df52814113)] - **doc**: document Buffer.concat may use internal pool (Andrey Pechkurov) [#35541](https://github.com/nodejs/node/pull/35541) +* [[`42a587f9ba`](https://github.com/nodejs/node/commit/42a587f9ba)] - **doc**: use test username instead of real (Pooja D.P) [#35611](https://github.com/nodejs/node/pull/35611) +* [[`bfff4fc3c9`](https://github.com/nodejs/node/commit/bfff4fc3c9)] - **doc**: revise description of process.ppid (Pooja D.P) [#35589](https://github.com/nodejs/node/pull/35589) +* [[`a9ac75480f`](https://github.com/nodejs/node/commit/a9ac75480f)] - **doc**: add symlink information for process.execpath (Pooja D.P) [#35590](https://github.com/nodejs/node/pull/35590) +* [[`5fea51b66c`](https://github.com/nodejs/node/commit/5fea51b66c)] - **doc**: add PoojaDurgad as a triager (Pooja D.P) [#35153](https://github.com/nodejs/node/pull/35153) +* [[`a0b541c3e0`](https://github.com/nodejs/node/commit/a0b541c3e0)] - **doc**: use kbd element in process doc (Rich Trott) [#35584](https://github.com/nodejs/node/pull/35584) +* [[`992355cdf9`](https://github.com/nodejs/node/commit/992355cdf9)] - **doc**: simplify wording in tracing APIs doc (Pooja D.P) [#35556](https://github.com/nodejs/node/pull/35556) +* [[`05db4b8343`](https://github.com/nodejs/node/commit/05db4b8343)] - **doc**: improve SIGINT error text (Rich Trott) [#35558](https://github.com/nodejs/node/pull/35558) +* [[`42c479572c`](https://github.com/nodejs/node/commit/42c479572c)] - **doc**: use sentence case for class property (Rich Trott) [#35540](https://github.com/nodejs/node/pull/35540) +* [[`fb9bb05ee2`](https://github.com/nodejs/node/commit/fb9bb05ee2)] - **doc**: fix util.inspect change history (Antoine du Hamel) [#35528](https://github.com/nodejs/node/pull/35528) +* [[`6952c45202`](https://github.com/nodejs/node/commit/6952c45202)] - **doc**: add aduh95 to collaborators (Antoine du Hamel) [#35542](https://github.com/nodejs/node/pull/35542) +* [[`b5f752528b`](https://github.com/nodejs/node/commit/b5f752528b)] - **doc**: update AUTHORS list (Anna Henningsen) [#35280](https://github.com/nodejs/node/pull/35280) +* [[`370f8e3afd`](https://github.com/nodejs/node/commit/370f8e3afd)] - **doc**: update sxa's email address to Red Hat from IBM (Stewart X Addison) [#35442](https://github.com/nodejs/node/pull/35442) +* [[`edf3fbbd14`](https://github.com/nodejs/node/commit/edf3fbbd14)] - **doc**: update contact information for @BethGriggs (Beth Griggs) [#35451](https://github.com/nodejs/node/pull/35451) +* [[`8be289e58c`](https://github.com/nodejs/node/commit/8be289e58c)] - **doc**: update contact information for richardlau (Richard Lau) [#35450](https://github.com/nodejs/node/pull/35450) +* [[`42c0dfcc23`](https://github.com/nodejs/node/commit/42c0dfcc23)] - **doc**: importable node protocol URLs (Bradley Meck) [#35434](https://github.com/nodejs/node/pull/35434) +* [[`c192af66e7`](https://github.com/nodejs/node/commit/c192af66e7)] - **doc**: unhide resolver spec (Guy Bedford) [#35358](https://github.com/nodejs/node/pull/35358) +* [[`b0e43c718c`](https://github.com/nodejs/node/commit/b0e43c718c)] - **doc**: add gpg key export directions to releases doc (Danielle Adams) [#35298](https://github.com/nodejs/node/pull/35298) +* [[`884755f1e5`](https://github.com/nodejs/node/commit/884755f1e5)] - **doc**: simplify circular dependencies text in modules.md (Rich Trott) [#35126](https://github.com/nodejs/node/pull/35126) +* [[`85c47d753c`](https://github.com/nodejs/node/commit/85c47d753c)] - **doc**: avoid double-while sentence in perf\_hooks.md (Rich Trott) [#35078](https://github.com/nodejs/node/pull/35078) +* [[`68c5ee45a2`](https://github.com/nodejs/node/commit/68c5ee45a2)] - **doc**: update fs promise-based examples (Richard Lau) [#35760](https://github.com/nodejs/node/pull/35760) +* [[`66f8730441`](https://github.com/nodejs/node/commit/66f8730441)] - **doc**: add history entry for exports patterns (Antoine du Hamel) [#35410](https://github.com/nodejs/node/pull/35410) +* [[`a7e66b635d`](https://github.com/nodejs/node/commit/a7e66b635d)] - **doc**: fix conditional exports flag removal version (Antoine du Hamel) [#35428](https://github.com/nodejs/node/pull/35428) +* [[`9197a6651d`](https://github.com/nodejs/node/commit/9197a6651d)] - **doc**: copyedit packages.md (Rich Trott) [#35427](https://github.com/nodejs/node/pull/35427) +* [[`f507ca9e21`](https://github.com/nodejs/node/commit/f507ca9e21)] - **doc**: packages docs feedback (Guy Bedford) [#35370](https://github.com/nodejs/node/pull/35370) +* [[`5330930128`](https://github.com/nodejs/node/commit/5330930128)] - **doc**: refine require/import conditions constraints (Guy Bedford) [#35311](https://github.com/nodejs/node/pull/35311) +* [[`5f0b1571a7`](https://github.com/nodejs/node/commit/5f0b1571a7)] - **doc**: edit subpath export patterns introduction (Rich Trott) [#35254](https://github.com/nodejs/node/pull/35254) +* [[`d6a13a947e`](https://github.com/nodejs/node/commit/d6a13a947e)] - **doc**: document support for package.json fields (Antoine du HAMEL) [#34970](https://github.com/nodejs/node/pull/34970) +* [[`7c1700e143`](https://github.com/nodejs/node/commit/7c1700e143)] - **doc**: move package config docs to separate page (Antoine du HAMEL) [#34748](https://github.com/nodejs/node/pull/34748) +* [[`7510667d87`](https://github.com/nodejs/node/commit/7510667d87)] - **doc**: rename module pages (Antoine du HAMEL) [#34663](https://github.com/nodejs/node/pull/34663) +* [[`b644ab6ae6`](https://github.com/nodejs/node/commit/b644ab6ae6)] - **doc**: fix line length in worker\_threads.md (Jucke) [#34419](https://github.com/nodejs/node/pull/34419) +* [[`fb9b66bdd7`](https://github.com/nodejs/node/commit/fb9b66bdd7)] - **doc**: fix typos in n-api, tls and worker\_threads (Jucke) [#34419](https://github.com/nodejs/node/pull/34419) +* [[`1f34230373`](https://github.com/nodejs/node/commit/1f34230373)] - **doc,esm**: document experimental warning removal (Antoine du Hamel) [#35750](https://github.com/nodejs/node/pull/35750) +* [[`985b96a7d5`](https://github.com/nodejs/node/commit/985b96a7d5)] - **doc,esm**: add history support info (Antoine du Hamel) [#35395](https://github.com/nodejs/node/pull/35395) +* [[`548137f4ec`](https://github.com/nodejs/node/commit/548137f4ec)] - **errors**: simplify ERR\_REQUIRE\_ESM message generation (Rich Trott) [#35123](https://github.com/nodejs/node/pull/35123) +* [[`f22672de18`](https://github.com/nodejs/node/commit/f22672de18)] - **errors**: improve ERR\_INVALID\_OPT\_VALUE error (Denys Otrishko) [#34671](https://github.com/nodejs/node/pull/34671) +* [[`7a98961a26`](https://github.com/nodejs/node/commit/7a98961a26)] - **esm**: fix hook mistypes and links to types (Derek Lewis) [#34240](https://github.com/nodejs/node/pull/34240) +* [[`0f757bc2df`](https://github.com/nodejs/node/commit/0f757bc2df)] - **esm**: use "node:" namespace for builtins (Guy Bedford) [#35387](https://github.com/nodejs/node/pull/35387) +* [[`b48473228c`](https://github.com/nodejs/node/commit/b48473228c)] - **events**: assume an EventEmitter if emitter.on is a function (Luigi Pinca) [#35818](https://github.com/nodejs/node/pull/35818) +* [[`19d711391e`](https://github.com/nodejs/node/commit/19d711391e)] - **fs**: simplify realpathSync (himself65) [#35413](https://github.com/nodejs/node/pull/35413) +* [[`decfc2ae5c`](https://github.com/nodejs/node/commit/decfc2ae5c)] - **fs**: add .ref() and .unref() methods to watcher classes (rickyes) [#33134](https://github.com/nodejs/node/pull/33134) +* [[`cce464513e`](https://github.com/nodejs/node/commit/cce464513e)] - **http**: added scheduling option to http agent (delvedor) [#33278](https://github.com/nodejs/node/pull/33278) +* [[`d477e2e147`](https://github.com/nodejs/node/commit/d477e2e147)] - **http**: only set keep-alive when not exists (atian25@qq.com) [#35138](https://github.com/nodejs/node/pull/35138) +* [[`f10d721737`](https://github.com/nodejs/node/commit/f10d721737)] - **http**: reset headers timeout on headers complete (Robert Nagy) [#34578](https://github.com/nodejs/node/pull/34578) +* [[`c8a778985b`](https://github.com/nodejs/node/commit/c8a778985b)] - **http2**: avoid unnecessary buffer resize (Denys Otrishko) [#34480](https://github.com/nodejs/node/pull/34480) +* [[`b732c92e3d`](https://github.com/nodejs/node/commit/b732c92e3d)] - **http2**: use and support non-empty DATA frame with END\_STREAM flag (Carlos Lopez) [#33875](https://github.com/nodejs/node/pull/33875) +* [[`bfce0eb13a`](https://github.com/nodejs/node/commit/bfce0eb13a)] - ***Revert*** "**http2**: streamline OnStreamRead streamline memory accounting" (Rich Trott) [#34315](https://github.com/nodejs/node/pull/34315) +* [[`e85ca7af43`](https://github.com/nodejs/node/commit/e85ca7af43)] - **http2**: wait for session socket writable end on close/destroy (Denys Otrishko) [#30854](https://github.com/nodejs/node/pull/30854) +* [[`2471197099`](https://github.com/nodejs/node/commit/2471197099)] - **http2**: wait for session to finish writing before destroy (Denys Otrishko) [#30854](https://github.com/nodejs/node/pull/30854) +* [[`82af8acc8e`](https://github.com/nodejs/node/commit/82af8acc8e)] - **http2,doc**: minor fixes (Alba Mendez) [#28044](https://github.com/nodejs/node/pull/28044) +* [[`a3e8829d4a`](https://github.com/nodejs/node/commit/a3e8829d4a)] - **inspector**: do not hardcode Debugger.CallFrameId in tests (Dmitry Gozman) [#35570](https://github.com/nodejs/node/pull/35570) +* [[`6efa140f8f`](https://github.com/nodejs/node/commit/6efa140f8f)] - **lib**: change http client path assignment (Yohanan Baruchel) [#35508](https://github.com/nodejs/node/pull/35508) +* [[`ad7281b081`](https://github.com/nodejs/node/commit/ad7281b081)] - **lib**: use remaining typed arrays from primordials (Michaël Zasso) [#35499](https://github.com/nodejs/node/pull/35499) +* [[`a9a606f06b`](https://github.com/nodejs/node/commit/a9a606f06b)] - **lib**: use full URL to GitHub issues in comments (Rich Trott) [#34686](https://github.com/nodejs/node/pull/34686) +* [[`ea239392c2`](https://github.com/nodejs/node/commit/ea239392c2)] - **module**: cjs-module-lexer@0.4.1 big endian fix (Guy Bedford) [#35634](https://github.com/nodejs/node/pull/35634) +* [[`354f358c1b`](https://github.com/nodejs/node/commit/354f358c1b)] - **module**: use Wasm CJS lexer when available (Guy Bedford) [#35583](https://github.com/nodejs/node/pull/35583) +* [[`76f76017bf`](https://github.com/nodejs/node/commit/76f76017bf)] - **module**: fix builtin reexport tracing (Guy Bedford) [#35500](https://github.com/nodejs/node/pull/35500) +* [[`992af4e112`](https://github.com/nodejs/node/commit/992af4e112)] - **module**: fix specifier resolution option value (himself65) [#35098](https://github.com/nodejs/node/pull/35098) +* [[`1ff956f49e`](https://github.com/nodejs/node/commit/1ff956f49e)] - **module**: remove experimental modules warning (Guy Bedford) [#31974](https://github.com/nodejs/node/pull/31974) +* [[`41af927efb`](https://github.com/nodejs/node/commit/41af927efb)] - **module**: exports pattern support (Guy Bedford) [#34718](https://github.com/nodejs/node/pull/34718) +* [[`a18d0df33a`](https://github.com/nodejs/node/commit/a18d0df33a)] - **module**: update to cjs-module-lexer@0.4.0 (Guy Bedford) [#35501](https://github.com/nodejs/node/pull/35501) +* [[`6ca8fb552d`](https://github.com/nodejs/node/commit/6ca8fb552d)] - **module**: refine module type mismatch error cases (Guy Bedford) [#35426](https://github.com/nodejs/node/pull/35426) +* [[`9eb1fa1924`](https://github.com/nodejs/node/commit/9eb1fa1924)] - **module**: named exports for CJS via static analysis (Guy Bedford) [#35249](https://github.com/nodejs/node/pull/35249) +* [[`a93ca2d494`](https://github.com/nodejs/node/commit/a93ca2d494)] - **n-api**: revert change to finalization (Michael Dawson) [#35777](https://github.com/nodejs/node/pull/35777) +* [[`5faaa603d8`](https://github.com/nodejs/node/commit/5faaa603d8)] - **n-api**: support for object freeze/seal (Shelley Vohr) [#35359](https://github.com/nodejs/node/pull/35359) +* [[`d938e8508b`](https://github.com/nodejs/node/commit/d938e8508b)] - **n-api**: add more property defaults (Gerhard Stoebich) [#35214](https://github.com/nodejs/node/pull/35214) +* [[`18f01ddcb5`](https://github.com/nodejs/node/commit/18f01ddcb5)] - **repl**: improve static import error message in repl (Myles Borins) [#33588](https://github.com/nodejs/node/pull/33588) +* [[`70768ce109`](https://github.com/nodejs/node/commit/70768ce109)] - **repl**: give repl entries unique names (Bradley Meck) [#34372](https://github.com/nodejs/node/pull/34372) +* [[`e9bee3950c`](https://github.com/nodejs/node/commit/e9bee3950c)] - **src**: move node\_contextify to modern THROW\_ERR\_\* (James M Snell) [#35470](https://github.com/nodejs/node/pull/35470) +* [[`b741f2ff84`](https://github.com/nodejs/node/commit/b741f2ff84)] - **src**: move node\_process to modern THROW\_ERR\* (James M Snell) [#35472](https://github.com/nodejs/node/pull/35472) +* [[`2d5393bb28`](https://github.com/nodejs/node/commit/2d5393bb28)] - **src**: fix freeing unintialized pointer bug in ParseSoaReply (Aastha Gupta) [#35502](https://github.com/nodejs/node/pull/35502) +* [[`dec004f742`](https://github.com/nodejs/node/commit/dec004f742)] - **src**: expose v8::Isolate setup callbacks (Shelley Vohr) [#35512](https://github.com/nodejs/node/pull/35512) +* [[`7f8834f76c`](https://github.com/nodejs/node/commit/7f8834f76c)] - **src**: more idiomatic error pattern in node\_wasi (James M Snell) [#35493](https://github.com/nodejs/node/pull/35493) +* [[`ade27b732b`](https://github.com/nodejs/node/commit/ade27b732b)] - **src**: use env-\>ThrowUVException in pipe\_wrap (James M Snell) [#35493](https://github.com/nodejs/node/pull/35493) +* [[`e70b05208f`](https://github.com/nodejs/node/commit/e70b05208f)] - **src**: remove invalid ToLocalChecked in EmitBeforeExit (Anna Henningsen) [#35484](https://github.com/nodejs/node/pull/35484) +* [[`cd80195524`](https://github.com/nodejs/node/commit/cd80195524)] - **src**: make MakeCallback() check can\_call\_into\_js before getting method (Anna Henningsen) [#35424](https://github.com/nodejs/node/pull/35424) +* [[`8a1091648c`](https://github.com/nodejs/node/commit/8a1091648c)] - **stream**: destroy wrapped streams on error (Robert Nagy) [#34102](https://github.com/nodejs/node/pull/34102) +* [[`fdc67ebf5f`](https://github.com/nodejs/node/commit/fdc67ebf5f)] - **test**: replace annonymous functions with arrow (Pooja D.P) [#34921](https://github.com/nodejs/node/pull/34921) +* [[`c3e1bf78c4`](https://github.com/nodejs/node/commit/c3e1bf78c4)] - **test**: add wasi readdir() test (Colin Ihrig) [#35202](https://github.com/nodejs/node/pull/35202) +* [[`607f3c5d84`](https://github.com/nodejs/node/commit/607f3c5d84)] - **test**: fix comment about DNS lookup test (Tobias Nießen) [#35080](https://github.com/nodejs/node/pull/35080) +* [[`02787ce5d1`](https://github.com/nodejs/node/commit/02787ce5d1)] - **test**: add ALPNProtocols option to clientOptions (Luigi Pinca) [#35482](https://github.com/nodejs/node/pull/35482) +* [[`12d76b8e8e`](https://github.com/nodejs/node/commit/12d76b8e8e)] - **tls**: reset secureConnecting on client socket (David Halls) [#33209](https://github.com/nodejs/node/pull/33209) +* [[`adf4f90bce`](https://github.com/nodejs/node/commit/adf4f90bce)] - **tools**: refloat 7 Node.js patches to cpplint.py (Rich Trott) [#35569](https://github.com/nodejs/node/pull/35569) +* [[`1173efca27`](https://github.com/nodejs/node/commit/1173efca27)] - **tools**: bump cpplint.py to 1.4.6 (Rich Trott) [#35569](https://github.com/nodejs/node/pull/35569) +* [[`09552670fe`](https://github.com/nodejs/node/commit/09552670fe)] - **tools**: add missing uv\_setup\_argv() calls (Anna Henningsen) [#35491](https://github.com/nodejs/node/pull/35491) +* [[`ae149232a1`](https://github.com/nodejs/node/commit/ae149232a1)] - **tools**: exclude gyp from markdown link checker (Michaël Zasso) [#35423](https://github.com/nodejs/node/pull/35423) +* [[`a9ce9b2614`](https://github.com/nodejs/node/commit/a9ce9b2614)] - **tools**: update ESLint to 7.10.0 (Colin Ihrig) [#35366](https://github.com/nodejs/node/pull/35366) +* [[`bc7da0c22c`](https://github.com/nodejs/node/commit/bc7da0c22c)] - **tools**: ignore build folder when checking links (Ash Cripps) [#35315](https://github.com/nodejs/node/pull/35315) +* [[`f29717437f`](https://github.com/nodejs/node/commit/f29717437f)] - **tools,doc**: enforce alphabetical order for md refs (Antoine du Hamel) [#35244](https://github.com/nodejs/node/pull/35244) +* [[`11b10d7d1f`](https://github.com/nodejs/node/commit/11b10d7d1f)] - **tools,doc**: upgrade dependencies (Antoine du Hamel) [#35244](https://github.com/nodejs/node/pull/35244) + + +## 2020-11-16, Version 12.19.1 'Erbium' (LTS), @BethGriggs + +### Notable changes + +This is a security release. + +Vulnerabilities fixed: + +* **CVE-2020-8277**: Denial of Service through DNS request (High). A Node.js application that allows an attacker to trigger a DNS request for a host of their choice could trigger a Denial of Service by getting the application to resolve a DNS record with a larger number of responses. + +### Commits + +* [[`022899e1d5`](https://github.com/nodejs/node/commit/022899e1d5)] - **deps**: cherry-pick 0d252eb from upstream c-ares (Michael Dawson) [nodejs-private/node-private#231](https://github.com/nodejs-private/node-private/pull/231) + ## 2020-10-06, Version 12.19.0 'Erbium' (LTS), @codebytere @@ -946,7 +1121,7 @@ occur in any future release.” Users should be cautious when using the feature in production environments. Unlike Node.js 14, using ESM will still emit a runtime experimental warning, -either when a module is used a the application's entrypoint or the first time +either when a module is used at the application's entrypoint or the first time dynamic `import()` is called. Please keep in mind that the implementation of ESM in Node.js differs from the diff --git a/doc/changelogs/CHANGELOG_V13.md b/doc/changelogs/CHANGELOG_V13.md index a20395c97300ac..c26fd235d48f68 100644 --- a/doc/changelogs/CHANGELOG_V13.md +++ b/doc/changelogs/CHANGELOG_V13.md @@ -32,6 +32,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [12.x](CHANGELOG_V12.md) * [11.x](CHANGELOG_V11.md) diff --git a/doc/changelogs/CHANGELOG_V14.md b/doc/changelogs/CHANGELOG_V14.md index b01680c3801114..8e9dc3ee5de3e7 100644 --- a/doc/changelogs/CHANGELOG_V14.md +++ b/doc/changelogs/CHANGELOG_V14.md @@ -6,11 +6,19 @@ + - +
LTS 'Fermium' Current
+ +14.15.3
+14.15.2
+14.15.1
+14.15.0
+
14.14.0
+14.13.1
14.13.0
14.12.0
14.11.0
@@ -31,6 +39,7 @@
* Other Versions + * [15.x](CHANGELOG_V15.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) * [11.x](CHANGELOG_V11.md) @@ -46,6 +55,248 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + +## 2020-12-17, Version 14.15.3 'Fermium' (LTS), @BethGriggs + +### Notable Changes + +Node.js v14.15.2 included a commit that has caused reported breakages when cloning request objects. This release reverts the commit that introduced the behaviour change. See https://github.com/nodejs/node/issues/36550 for more details. + +### Commits + +* [[`4264d9aa67`](https://github.com/nodejs/node/commit/4264d9aa67)] - ***Revert*** "**http**: lazy create IncomingMessage.headers" (Beth Griggs) [#36553](https://github.com/nodejs/node/pull/36553) + + +## 2020-12-15, Version 14.15.2 'Fermium' (LTS), @BethGriggs + +### Notable Changes + +* **deps**: + * upgrade npm to 6.14.9 (Myles Borins) [#36450](https://github.com/nodejs/node/pull/36450) + * update acorn to v8.0.4 (Michaël Zasso) [#35791](https://github.com/nodejs/node/pull/35791) +* **doc**: add release key for Danielle Adams (Danielle Adams) [#35545](https://github.com/nodejs/node/pull/35545) +* **http2**: check write not scheduled in scope destructor (David Halls) [#36241](https://github.com/nodejs/node/pull/36241) +* **stream**: fix regression on duplex end (Momtchil Momtchev) [#35941](https://github.com/nodejs/node/pull/35941) + +### Commits + +* [[`c508bfc66b`](https://github.com/nodejs/node/commit/c508bfc66b)] - **assert**: refactor to use more primordials (Antoine du Hamel) [#35998](https://github.com/nodejs/node/pull/35998) +* [[`a9d3a0df29`](https://github.com/nodejs/node/commit/a9d3a0df29)] - **assert,repl**: enable ecmaVersion 2021 in acorn parser (Michaël Zasso) [#35827](https://github.com/nodejs/node/pull/35827) +* [[`6d43c8dd69`](https://github.com/nodejs/node/commit/6d43c8dd69)] - **async_hooks**: refactor to use more primordials (Antoine du Hamel) [#36168](https://github.com/nodejs/node/pull/36168) +* [[`029ea16a24`](https://github.com/nodejs/node/commit/029ea16a24)] - **async_hooks**: fix leak in AsyncLocalStorage exit (Stephen Belanger) [#35779](https://github.com/nodejs/node/pull/35779) +* [[`d49e0ca73a`](https://github.com/nodejs/node/commit/d49e0ca73a)] - **benchmark**: fix build warnings (Gabriel Schulhof) [#36157](https://github.com/nodejs/node/pull/36157) +* [[`d027be0551`](https://github.com/nodejs/node/commit/d027be0551)] - **benchmark**: ignore build artifacts for napi addons (Richard Lau) [#35970](https://github.com/nodejs/node/pull/35970) +* [[`fdb1c0d31c`](https://github.com/nodejs/node/commit/fdb1c0d31c)] - **benchmark**: remove modules that require intl (Richard Lau) [#35968](https://github.com/nodejs/node/pull/35968) +* [[`f6487960b5`](https://github.com/nodejs/node/commit/f6487960b5)] - **benchmark**: make the benchmark tool work with Node 10 (Joyee Cheung) [#35817](https://github.com/nodejs/node/pull/35817) +* [[`21d3ccf5df`](https://github.com/nodejs/node/commit/21d3ccf5df)] - **benchmark**: add startup benchmark for loading public modules (Joyee Cheung) [#35816](https://github.com/nodejs/node/pull/35816) +* [[`0477e000bf`](https://github.com/nodejs/node/commit/0477e000bf)] - **bootstrap**: refactor to use more primordials (Antoine du Hamel) [#35999](https://github.com/nodejs/node/pull/35999) +* [[`699bb348d9`](https://github.com/nodejs/node/commit/699bb348d9)] - **build**: replace which with command -v (raisinten) [#36118](https://github.com/nodejs/node/pull/36118) +* [[`304e269001`](https://github.com/nodejs/node/commit/304e269001)] - **build**: try “python3” as a last resort for 3.x (Ole André Vadla Ravnås) [#35983](https://github.com/nodejs/node/pull/35983) +* [[`6bafe04911`](https://github.com/nodejs/node/commit/6bafe04911)] - **build**: conditionally clear vcinstalldir (Brian Ingenito) [#36009](https://github.com/nodejs/node/pull/36009) +* [[`f498127c41`](https://github.com/nodejs/node/commit/f498127c41)] - **build**: fix zlib inlining for IA-32 (raisinten) [#35679](https://github.com/nodejs/node/pull/35679) +* [[`f33fa264cc`](https://github.com/nodejs/node/commit/f33fa264cc)] - **build**: fix lint-js-fix target (Antoine du Hamel) [#35927](https://github.com/nodejs/node/pull/35927) +* [[`67d31827ac`](https://github.com/nodejs/node/commit/67d31827ac)] - **build**: add vcbuilt test-doc target (Antoine du Hamel) [#35708](https://github.com/nodejs/node/pull/35708) +* [[`2a8c2ddcb1`](https://github.com/nodejs/node/commit/2a8c2ddcb1)] - **build**: add license-builder GitHub Action (Tierney Cyren) [#35712](https://github.com/nodejs/node/pull/35712) +* [[`6c61b9372b`](https://github.com/nodejs/node/commit/6c61b9372b)] - **build**: use make functions instead of echo (Antoine du Hamel) [#35707](https://github.com/nodejs/node/pull/35707) +* [[`4813d913e3`](https://github.com/nodejs/node/commit/4813d913e3)] - **build**: use GITHUB\_ENV file to set env variables (Michaël Zasso) [#35638](https://github.com/nodejs/node/pull/35638) +* [[`71e0f33751`](https://github.com/nodejs/node/commit/71e0f33751)] - **build**: do not install jq in workflows (Michaël Zasso) [#35638](https://github.com/nodejs/node/pull/35638) +* [[`8ab7f258d4`](https://github.com/nodejs/node/commit/8ab7f258d4)] - **build, tools**: look for local installation of NASM (Richard Lau) [#36014](https://github.com/nodejs/node/pull/36014) +* [[`50552facb7`](https://github.com/nodejs/node/commit/50552facb7)] - **build,tools**: gitHub Actions: use Node.js Fermium (Antoine du Hamel) [#35840](https://github.com/nodejs/node/pull/35840) +* [[`77b7c985f6`](https://github.com/nodejs/node/commit/77b7c985f6)] - **build,tools**: add lint-js-doc target (Antoine du Hamel) [#35708](https://github.com/nodejs/node/pull/35708) +* [[`929e1272ee`](https://github.com/nodejs/node/commit/929e1272ee)] - **cluster**: refactor to use more primordials (Antoine du Hamel) [#36011](https://github.com/nodejs/node/pull/36011) +* [[`568e6177c9`](https://github.com/nodejs/node/commit/568e6177c9)] - **console**: use more primordials (Antoine du Hamel) [#35734](https://github.com/nodejs/node/pull/35734) +* [[`6cea3152fe`](https://github.com/nodejs/node/commit/6cea3152fe)] - **deps**: upgrade npm to 6.14.9 (Myles Borins) [#36450](https://github.com/nodejs/node/pull/36450) +* [[`d2ee676eb9`](https://github.com/nodejs/node/commit/d2ee676eb9)] - **deps**: cherry-pick 9a49b22 from V8 upstream (Daniel Bevenius) [#35939](https://github.com/nodejs/node/pull/35939) +* [[`7367e6c6be`](https://github.com/nodejs/node/commit/7367e6c6be)] - **deps**: update acorn to v8.0.4 (Michaël Zasso) [#35791](https://github.com/nodejs/node/pull/35791) +* [[`4937a34be6`](https://github.com/nodejs/node/commit/4937a34be6)] - **deps**: fix typo in zlib.gyp that break arm-fpu-neon build (lucasg) [#35659](https://github.com/nodejs/node/pull/35659) +* [[`1e8dfb9d2c`](https://github.com/nodejs/node/commit/1e8dfb9d2c)] - **deps**: upgrade to cjs-module-lexer@1.0.0 (Guy Bedford) [#35928](https://github.com/nodejs/node/pull/35928) +* [[`0356963f0e`](https://github.com/nodejs/node/commit/0356963f0e)] - **deps**: update to cjs-module-lexer@0.5.2 (Guy Bedford) [#35901](https://github.com/nodejs/node/pull/35901) +* [[`172be4ffe0`](https://github.com/nodejs/node/commit/172be4ffe0)] - **deps**: upgrade to cjs-module-lexer@0.5.0 (Guy Bedford) [#35871](https://github.com/nodejs/node/pull/35871) +* [[`1f7740691d`](https://github.com/nodejs/node/commit/1f7740691d)] - **deps**: update to cjs-module-lexer@0.4.3 (Guy Bedford) [#35745](https://github.com/nodejs/node/pull/35745) +* [[`47bd445e56`](https://github.com/nodejs/node/commit/47bd445e56)] - **doc**: remove stray comma in url.md (Rich Trott) [#36175](https://github.com/nodejs/node/pull/36175) +* [[`2f76a75fc6`](https://github.com/nodejs/node/commit/2f76a75fc6)] - **doc**: revise agent.destroy() text (Rich Trott) [#36163](https://github.com/nodejs/node/pull/36163) +* [[`72fb6f88ab`](https://github.com/nodejs/node/commit/72fb6f88ab)] - **doc**: add compatibility/interop technical value (Geoffrey Booth) [#35323](https://github.com/nodejs/node/pull/35323) +* [[`f5efd54727`](https://github.com/nodejs/node/commit/f5efd54727)] - **doc**: de-emphasize wrapping in napi\_define\_class (Gabriel Schulhof) [#36159](https://github.com/nodejs/node/pull/36159) +* [[`8a7c2b951d`](https://github.com/nodejs/node/commit/8a7c2b951d)] - **doc**: clarify text about process not responding (Rich Trott) [#36117](https://github.com/nodejs/node/pull/36117) +* [[`800e1db83d`](https://github.com/nodejs/node/commit/800e1db83d)] - **doc**: esm docs consolidation and reordering (Guy Bedford) [#36046](https://github.com/nodejs/node/pull/36046) +* [[`4fad888fe1`](https://github.com/nodejs/node/commit/4fad888fe1)] - **doc**: move shigeki to emeritus (Rich Trott) [#36093](https://github.com/nodejs/node/pull/36093) +* [[`c088434b4d`](https://github.com/nodejs/node/commit/c088434b4d)] - **doc**: document the error when cwd not exists in child\_process.spawn (FeelyChau) [#34505](https://github.com/nodejs/node/pull/34505) +* [[`4dbbbaa2e9`](https://github.com/nodejs/node/commit/4dbbbaa2e9)] - **doc**: fix typo in debugger.md (Rich Trott) [#36066](https://github.com/nodejs/node/pull/36066) +* [[`d796bc7348`](https://github.com/nodejs/node/commit/d796bc7348)] - **doc**: update list styles for remark-parse@9 rendering (Rich Trott) [#36049](https://github.com/nodejs/node/pull/36049) +* [[`6daf204f32`](https://github.com/nodejs/node/commit/6daf204f32)] - **doc**: escape asterisk in cctest gtest-filter (raisinten) [#36034](https://github.com/nodejs/node/pull/36034) +* [[`9470bf5872`](https://github.com/nodejs/node/commit/9470bf5872)] - **doc**: move v8.getHeapCodeStatistics() (Rich Trott) [#36027](https://github.com/nodejs/node/pull/36027) +* [[`30cd797c15`](https://github.com/nodejs/node/commit/30cd797c15)] - **doc**: add note regarding file structure in src/README.md (Denys Otrishko) [#35000](https://github.com/nodejs/node/pull/35000) +* [[`cddcfcde9f`](https://github.com/nodejs/node/commit/cddcfcde9f)] - **doc**: advise users to import the full set of trusted release keys (Reşat SABIQ) [#32655](https://github.com/nodejs/node/pull/32655) +* [[`1ca1f262a5`](https://github.com/nodejs/node/commit/1ca1f262a5)] - **doc**: fix crypto doc linter errors (Antoine du Hamel) [#36035](https://github.com/nodejs/node/pull/36035) +* [[`b11725eb9e`](https://github.com/nodejs/node/commit/b11725eb9e)] - **doc**: revise v8.getHeapSnapshot() (Rich Trott) [#35849](https://github.com/nodejs/node/pull/35849) +* [[`990facbc3e`](https://github.com/nodejs/node/commit/990facbc3e)] - **doc**: update core-validate-commit link in guide (Daijiro Wachi) [#35938](https://github.com/nodejs/node/pull/35938) +* [[`773685c2a4`](https://github.com/nodejs/node/commit/773685c2a4)] - **doc**: update benchmark CI test indicator in README (Rich Trott) [#35945](https://github.com/nodejs/node/pull/35945) +* [[`c90571ff2a`](https://github.com/nodejs/node/commit/c90571ff2a)] - **doc**: add new wordings to the API description (Pooja D.P) [#35588](https://github.com/nodejs/node/pull/35588) +* [[`6259c2d231`](https://github.com/nodejs/node/commit/6259c2d231)] - **doc**: option --prof documentation help added (krank2me) [#34991](https://github.com/nodejs/node/pull/34991) +* [[`98e4b77b89`](https://github.com/nodejs/node/commit/98e4b77b89)] - **doc**: fix release-schedule link in backport guide (Daijiro Wachi) [#35920](https://github.com/nodejs/node/pull/35920) +* [[`51ce1a2fa8`](https://github.com/nodejs/node/commit/51ce1a2fa8)] - **doc**: update tables in README files for linting changes (Rich Trott) [#35905](https://github.com/nodejs/node/pull/35905) +* [[`513bed2776`](https://github.com/nodejs/node/commit/513bed2776)] - **doc**: temporarily disable list-item-bullet-indent (Nick Schonning) [#35647](https://github.com/nodejs/node/pull/35647) +* [[`733c9da1e9`](https://github.com/nodejs/node/commit/733c9da1e9)] - **doc**: disable no-undefined-references workarounds (Nick Schonning) [#35647](https://github.com/nodejs/node/pull/35647) +* [[`6e1612fa15`](https://github.com/nodejs/node/commit/6e1612fa15)] - **doc**: adjust table alignment for remark v13 (Nick Schonning) [#35647](https://github.com/nodejs/node/pull/35647) +* [[`a15dede26d`](https://github.com/nodejs/node/commit/a15dede26d)] - **doc**: move bnoordhuis to emeritus (Ben Noordhuis) [#35865](https://github.com/nodejs/node/pull/35865) +* [[`26e42939f2`](https://github.com/nodejs/node/commit/26e42939f2)] - **doc**: add on statement in the APIs docs (Pooja D.P) [#35610](https://github.com/nodejs/node/pull/35610) +* [[`9486f5fc37`](https://github.com/nodejs/node/commit/9486f5fc37)] - **doc**: move ronkorving to emeritus (Rich Trott) [#35828](https://github.com/nodejs/node/pull/35828) +* [[`3f3d2d781b`](https://github.com/nodejs/node/commit/3f3d2d781b)] - **doc**: recommend test-doc instead of lint-md (Antoine du Hamel) [#35708](https://github.com/nodejs/node/pull/35708) +* [[`8131d954d9`](https://github.com/nodejs/node/commit/8131d954d9)] - **doc**: fix reference to googletest test fixture (Tobias Nießen) [#35813](https://github.com/nodejs/node/pull/35813) +* [[`34d6ca3bef`](https://github.com/nodejs/node/commit/34d6ca3bef)] - **doc**: add conditional example for setBreakpoint() (Chris Opperwall) [#35823](https://github.com/nodejs/node/pull/35823) +* [[`29849743b8`](https://github.com/nodejs/node/commit/29849743b8)] - **doc**: make small improvements to REPL doc (Rich Trott) [#35808](https://github.com/nodejs/node/pull/35808) +* [[`02f9a2a77a`](https://github.com/nodejs/node/commit/02f9a2a77a)] - **doc**: update MessagePort documentation for EventTarget inheritance (Anna Henningsen) [#35839](https://github.com/nodejs/node/pull/35839) +* [[`9c7d4bd0f3`](https://github.com/nodejs/node/commit/9c7d4bd0f3)] - **doc**: use case-sensitive in the example (Pooja D.P) [#35624](https://github.com/nodejs/node/pull/35624) +* [[`600cffae3c`](https://github.com/nodejs/node/commit/600cffae3c)] - **doc**: consolidate and clarify breakOnSigInt text (Rich Trott) [#35787](https://github.com/nodejs/node/pull/35787) +* [[`0de3f564b2`](https://github.com/nodejs/node/commit/0de3f564b2)] - **doc**: add a subsystems header in pull-requests.md (Pooja D.P) [#35718](https://github.com/nodejs/node/pull/35718) +* [[`47b4b2be29`](https://github.com/nodejs/node/commit/47b4b2be29)] - **doc**: add require statement in the example (Pooja D.P) [#35554](https://github.com/nodejs/node/pull/35554) +* [[`77cfcba7c8`](https://github.com/nodejs/node/commit/77cfcba7c8)] - **doc**: modified memory set statement set size (Pooja D.P) [#35517](https://github.com/nodejs/node/pull/35517) +* [[`41937f76f0`](https://github.com/nodejs/node/commit/41937f76f0)] - **doc**: use kbd element in readline doc prose (Rich Trott) [#35737](https://github.com/nodejs/node/pull/35737) +* [[`eee62b05f6`](https://github.com/nodejs/node/commit/eee62b05f6)] - **doc**: fix header level in fs.md (ax1) [#35771](https://github.com/nodejs/node/pull/35771) +* [[`63533d7d56`](https://github.com/nodejs/node/commit/63533d7d56)] - **doc**: remove stability warning in v8 module doc (Rich Trott) [#35774](https://github.com/nodejs/node/pull/35774) +* [[`62bf1a63d6`](https://github.com/nodejs/node/commit/62bf1a63d6)] - **doc**: mark optional parameters in timers.md (Vse Mozhe Buty) [#35764](https://github.com/nodejs/node/pull/35764) +* [[`4dc5e4a354`](https://github.com/nodejs/node/commit/4dc5e4a354)] - **doc**: add a example code to API doc property (Pooja D.P) [#35738](https://github.com/nodejs/node/pull/35738) +* [[`8ef0652566`](https://github.com/nodejs/node/commit/8ef0652566)] - **doc**: update console.error example (Lee, Bonggi) [#34964](https://github.com/nodejs/node/pull/34964) +* [[`47ba12265e`](https://github.com/nodejs/node/commit/47ba12265e)] - **doc**: improve text for breakOnSigint (Rich Trott) [#35692](https://github.com/nodejs/node/pull/35692) +* [[`c0d9756163`](https://github.com/nodejs/node/commit/c0d9756163)] - **doc**: this prints replaced with this is printed (Pooja D.P) [#35515](https://github.com/nodejs/node/pull/35515) +* [[`2feb86e635`](https://github.com/nodejs/node/commit/2feb86e635)] - **doc**: update package.json field definitions (Myles Borins) [#35741](https://github.com/nodejs/node/pull/35741) +* [[`d0d67c67c0`](https://github.com/nodejs/node/commit/d0d67c67c0)] - **doc**: add Installing Node.js header in BUILDING.md (Pooja D.P) [#35710](https://github.com/nodejs/node/pull/35710) +* [[`7c089ad04c`](https://github.com/nodejs/node/commit/7c089ad04c)] - **doc**: use kbd element in readline doc (Rich Trott) [#35698](https://github.com/nodejs/node/pull/35698) +* [[`ba623ef35a`](https://github.com/nodejs/node/commit/ba623ef35a)] - **doc**: add release key for Danielle Adams (Danielle Adams) [#35545](https://github.com/nodejs/node/pull/35545) +* [[`df4043bed3`](https://github.com/nodejs/node/commit/df4043bed3)] - **doc**: use kbd element in os doc (Rich Trott) [#35656](https://github.com/nodejs/node/pull/35656) +* [[`4d72e982de`](https://github.com/nodejs/node/commit/4d72e982de)] - **doc**: add a statement in the documentation. (Pooja D.P) [#35585](https://github.com/nodejs/node/pull/35585) +* [[`238885288d`](https://github.com/nodejs/node/commit/238885288d)] - **doc**: clarify experimental API elements in vm.md (Rich Trott) [#35594](https://github.com/nodejs/node/pull/35594) +* [[`806a269a83`](https://github.com/nodejs/node/commit/806a269a83)] - **doc**: importModuleDynamically gets Script, not Module (Simen Bekkhus) [#35593](https://github.com/nodejs/node/pull/35593) +* [[`6c4e697f56`](https://github.com/nodejs/node/commit/6c4e697f56)] - **doc**: fix EventEmitter examples (Sourav Shaw) [#33513](https://github.com/nodejs/node/pull/33513) +* [[`f6ebd81693`](https://github.com/nodejs/node/commit/f6ebd81693)] - **doc**: add example code for process.getgroups() (Pooja D.P) [#35625](https://github.com/nodejs/node/pull/35625) +* [[`2c342662e5`](https://github.com/nodejs/node/commit/2c342662e5)] - **doc**: use kbd element in tty doc (Rich Trott) [#35613](https://github.com/nodejs/node/pull/35613) +* [[`f723335f9e`](https://github.com/nodejs/node/commit/f723335f9e)] - **doc**: remove documentation for stream.\_construct() (Luigi Pinca) [#36119](https://github.com/nodejs/node/pull/36119) +* [[`e71b4baa88`](https://github.com/nodejs/node/commit/e71b4baa88)] - **doc**: Remove reference to io.js (Hussaina Begum Nandyala) [#35618](https://github.com/nodejs/node/pull/35618) +* [[`4faf71b474`](https://github.com/nodejs/node/commit/4faf71b474)] - **doc,crypto**: added sign/verify method changes about dsaEncoding (Filip Skokan) [#35480](https://github.com/nodejs/node/pull/35480) +* [[`e9d485f878`](https://github.com/nodejs/node/commit/e9d485f878)] - **doc,esm**: document experimental warning removal (Antoine du Hamel) [#35750](https://github.com/nodejs/node/pull/35750) +* [[`17c3fc67cf`](https://github.com/nodejs/node/commit/17c3fc67cf)] - **doc,fs**: document value of stats.isDirectory on symbolic links (coderaiser) [#27413](https://github.com/nodejs/node/pull/27413) +* [[`fc17ead531`](https://github.com/nodejs/node/commit/fc17ead531)] - **doc,net**: document socket.timeout (Brandon Kobel) [#34543](https://github.com/nodejs/node/pull/34543) +* [[`dc589b541f`](https://github.com/nodejs/node/commit/dc589b541f)] - **doc,src,test**: revise C++ code for linter update (Rich Trott) [#35719](https://github.com/nodejs/node/pull/35719) +* [[`0a944a42c0`](https://github.com/nodejs/node/commit/0a944a42c0)] - **doc,stream**: write(chunk, encoding, cb) encoding can be null (dev-script) [#35372](https://github.com/nodejs/node/pull/35372) +* [[`be79250aad`](https://github.com/nodejs/node/commit/be79250aad)] - **doc,test**: update v8 method doc and comment (Rich Trott) [#35795](https://github.com/nodejs/node/pull/35795) +* [[`8fdf077efc`](https://github.com/nodejs/node/commit/8fdf077efc)] - **doc,url**: fix url.hostname example (Rishabh Mehan) [#33735](https://github.com/nodejs/node/pull/33735) +* [[`3a08afc402`](https://github.com/nodejs/node/commit/3a08afc402)] - **domain**: refactor to use more primordials (Antoine du Hamel) [#35885](https://github.com/nodejs/node/pull/35885) +* [[`8d672b8e53`](https://github.com/nodejs/node/commit/8d672b8e53)] - **esm**: refactor to use more primordials (Antoine du Hamel) [#36019](https://github.com/nodejs/node/pull/36019) +* [[`570a8bfe12`](https://github.com/nodejs/node/commit/570a8bfe12)] - **events**: port some wpt tests (Benjamin Gruenbaum) [#33621](https://github.com/nodejs/node/pull/33621) +* [[`8ef4557c65`](https://github.com/nodejs/node/commit/8ef4557c65)] - **events**: make eventTarget.removeAllListeners() return this (Luigi Pinca) [#35805](https://github.com/nodejs/node/pull/35805) +* [[`d27e56356b`](https://github.com/nodejs/node/commit/d27e56356b)] - **fs**: remove experimental from promises.rmdir recursive (Anders Kaseorg) [#36131](https://github.com/nodejs/node/pull/36131) +* [[`8d84bdc46b`](https://github.com/nodejs/node/commit/8d84bdc46b)] - **fs**: filehandle read now accepts object as argument (Nikola Glavina) [#34180](https://github.com/nodejs/node/pull/34180) +* [[`7c3b6f17e3`](https://github.com/nodejs/node/commit/7c3b6f17e3)] - **fs**: replace finally with PromisePrototypeFinally (Baruch Odem (Rothkoff)) [#35995](https://github.com/nodejs/node/pull/35995) +* [[`2f692c4cc6`](https://github.com/nodejs/node/commit/2f692c4cc6)] - **fs**: remove unnecessary Function#bind() in fs/promises (Ben Noordhuis) [#35208](https://github.com/nodejs/node/pull/35208) +* [[`5f0c8142b7`](https://github.com/nodejs/node/commit/5f0c8142b7)] - **fs**: remove unused assignment (Rich Trott) [#35642](https://github.com/nodejs/node/pull/35642) +* [[`e2b8734d20`](https://github.com/nodejs/node/commit/e2b8734d20)] - **gyp,build**: consistent shared library location (Rod Vagg) [#35635](https://github.com/nodejs/node/pull/35635) +* [[`45aee0d25e`](https://github.com/nodejs/node/commit/45aee0d25e)] - **http**: fix typo in comment (Hollow Man) [#36193](https://github.com/nodejs/node/pull/36193) +* [[`b58725c4c0`](https://github.com/nodejs/node/commit/b58725c4c0)] - **http**: lazy create IncomingMessage.headers (Robert Nagy) [#35281](https://github.com/nodejs/node/pull/35281) +* [[`71c3efe278`](https://github.com/nodejs/node/commit/71c3efe278)] - **http2**: check write not scheduled in scope destructor (David Halls) [#36241](https://github.com/nodejs/node/pull/36241) +* [[`ab2b066fc1`](https://github.com/nodejs/node/commit/ab2b066fc1)] - **http2**: delay session.receive() by a tick (Szymon Marczak) [#35985](https://github.com/nodejs/node/pull/35985) +* [[`c4e17cfa25`](https://github.com/nodejs/node/commit/c4e17cfa25)] - **http2**: add has method to proxySocketHandler (masx200) [#35197](https://github.com/nodejs/node/pull/35197) +* [[`c455b848d9`](https://github.com/nodejs/node/commit/c455b848d9)] - **http2**: centralise socket event binding in Http2Session (Momtchil Momtchev) [#35772](https://github.com/nodejs/node/pull/35772) +* [[`dce01fd27f`](https://github.com/nodejs/node/commit/dce01fd27f)] - **http2**: move events to the JSStreamSocket (Momtchil Momtchev) [#35772](https://github.com/nodejs/node/pull/35772) +* [[`92bd7b522a`](https://github.com/nodejs/node/commit/92bd7b522a)] - **http2**: fix error stream write followed by destroy (David Halls) [#35951](https://github.com/nodejs/node/pull/35951) +* [[`ec9fae96bc`](https://github.com/nodejs/node/commit/ec9fae96bc)] - **http2**: fix reinjection check (Momtchil Momtchev) [#35678](https://github.com/nodejs/node/pull/35678) +* [[`57f2fe0609`](https://github.com/nodejs/node/commit/57f2fe0609)] - **http2**: reinject data received before http2 is attached (Momtchil Momtchev) [#35678](https://github.com/nodejs/node/pull/35678) +* [[`2dbaaf92e5`](https://github.com/nodejs/node/commit/2dbaaf92e5)] - **http2**: remove unsupported %.\* specifier (Momtchil Momtchev) [#35694](https://github.com/nodejs/node/pull/35694) +* [[`de3c8045ac`](https://github.com/nodejs/node/commit/de3c8045ac)] - **lib**: refactor to use more primordials (Antoine du Hamel) [#35875](https://github.com/nodejs/node/pull/35875) +* [[`41d997cc72`](https://github.com/nodejs/node/commit/41d997cc72)] - **lib**: use primordials when calling methods of Error (Antoine du Hamel) [#35837](https://github.com/nodejs/node/pull/35837) +* [[`d58a466da0`](https://github.com/nodejs/node/commit/d58a466da0)] - **lib**: honor setUncaughtExceptionCaptureCallback (Gireesh Punathil) [#35595](https://github.com/nodejs/node/pull/35595) +* [[`1fdf72765b`](https://github.com/nodejs/node/commit/1fdf72765b)] - **module**: only try to enrich CJS syntax errors (Michaël Zasso) [#35691](https://github.com/nodejs/node/pull/35691) +* [[`81b0562c62`](https://github.com/nodejs/node/commit/81b0562c62)] - **n-api**: clean up binding creation (Gabriel Schulhof) [#36170](https://github.com/nodejs/node/pull/36170) +* [[`7a01e241ee`](https://github.com/nodejs/node/commit/7a01e241ee)] - **n-api**: fix test\_async\_context warnings (Gabriel Schulhof) [#36171](https://github.com/nodejs/node/pull/36171) +* [[`dde727e72f`](https://github.com/nodejs/node/commit/dde727e72f)] - **n-api**: improve consistency of how we get context (Michael Dawson) [#36068](https://github.com/nodejs/node/pull/36068) +* [[`08657e7e11`](https://github.com/nodejs/node/commit/08657e7e11)] - **n-api**: factor out calling pattern (Gabriel Schulhof) [#36113](https://github.com/nodejs/node/pull/36113) +* [[`88aa4e0d25`](https://github.com/nodejs/node/commit/88aa4e0d25)] - **n-api**: unlink reference during its destructor (Gabriel Schulhof) [#35933](https://github.com/nodejs/node/pull/35933) +* [[`1cb50c17d3`](https://github.com/nodejs/node/commit/1cb50c17d3)] - **n-api**: napi\_make\_callback emit async init with resource of async\_context (legendecas) [#32930](https://github.com/nodejs/node/pull/32930) +* [[`f1e84f4dd8`](https://github.com/nodejs/node/commit/f1e84f4dd8)] - **n-api**: revert change to finalization (Michael Dawson) [#35777](https://github.com/nodejs/node/pull/35777) +* [[`e16124979d`](https://github.com/nodejs/node/commit/e16124979d)] - **querystring**: reduce memory usage by Int8Array (sapics) [#34179](https://github.com/nodejs/node/pull/34179) +* [[`5c81a1071e`](https://github.com/nodejs/node/commit/5c81a1071e)] - **src**: refactor using-declarations node\_env\_var.cc (raisinten) [#36128](https://github.com/nodejs/node/pull/36128) +* [[`2770cd941e`](https://github.com/nodejs/node/commit/2770cd941e)] - **src**: remove duplicate logic for getting buffer (Yash Ladha) [#34553](https://github.com/nodejs/node/pull/34553) +* [[`f2300390aa`](https://github.com/nodejs/node/commit/f2300390aa)] - **src**: create helper for reading Uint32BE (Juan José Arboleda) [#34944](https://github.com/nodejs/node/pull/34944) +* [[`34c870e9f0`](https://github.com/nodejs/node/commit/34c870e9f0)] - **src**: use MaybeLocal.ToLocal instead of IsEmpty (Daniel Bevenius) [#35716](https://github.com/nodejs/node/pull/35716) +* [[`00d9499b14`](https://github.com/nodejs/node/commit/00d9499b14)] - **src**: large pages support in illumos/solaris systems (David Carlier) [#34320](https://github.com/nodejs/node/pull/34320) +* [[`7c99885a9b`](https://github.com/nodejs/node/commit/7c99885a9b)] - **stream**: fix thrown object reference (Gil Pedersen) [#36065](https://github.com/nodejs/node/pull/36065) +* [[`1cefb7e710`](https://github.com/nodejs/node/commit/1cefb7e710)] - **stream**: fix regression on duplex end (Momtchil Momtchev) [#35941](https://github.com/nodejs/node/pull/35941) +* [[`d1fd3f27e4`](https://github.com/nodejs/node/commit/d1fd3f27e4)] - **stream**: remove redundant context from comments (Yash Ladha) [#35728](https://github.com/nodejs/node/pull/35728) +* [[`fb14acb22c`](https://github.com/nodejs/node/commit/fb14acb22c)] - **stream**: move to internal/streams (Matteo Collina) [#35239](https://github.com/nodejs/node/pull/35239) +* [[`40d59281f7`](https://github.com/nodejs/node/commit/40d59281f7)] - **test**: update comments in test-fs-read-offset-null (Rich Trott) [#36152](https://github.com/nodejs/node/pull/36152) +* [[`a563f79d80`](https://github.com/nodejs/node/commit/a563f79d80)] - **test**: fix typo in inspector-helper.js (Luigi Pinca) [#36127](https://github.com/nodejs/node/pull/36127) +* [[`3e77536c6b`](https://github.com/nodejs/node/commit/3e77536c6b)] - **test**: deflake test-http-destroyed-socket-write2 (Luigi Pinca) [#36120](https://github.com/nodejs/node/pull/36120) +* [[`402e29a87c`](https://github.com/nodejs/node/commit/402e29a87c)] - **test**: make test-http2-client-jsstream-destroy.js reliable (Rich Trott) [#36129](https://github.com/nodejs/node/pull/36129) +* [[`b6aa42c349`](https://github.com/nodejs/node/commit/b6aa42c349)] - **test**: add test for fs.read when offset key is null (mayank agarwal) [#35918](https://github.com/nodejs/node/pull/35918) +* [[`8516c2ef90`](https://github.com/nodejs/node/commit/8516c2ef90)] - **test**: improve test-stream-duplex-readable-end (Luigi Pinca) [#36056](https://github.com/nodejs/node/pull/36056) +* [[`b53068ec0d`](https://github.com/nodejs/node/commit/b53068ec0d)] - **test**: add util.inspect test for null maxStringLength (Rich Trott) [#36086](https://github.com/nodejs/node/pull/36086) +* [[`3029872631`](https://github.com/nodejs/node/commit/3029872631)] - **test**: replace var with const (Aleksandr Krutko) [#36069](https://github.com/nodejs/node/pull/36069) +* [[`b05cdfee64`](https://github.com/nodejs/node/commit/b05cdfee64)] - **test**: remove flaky designation for fixed test (Rich Trott) [#35961](https://github.com/nodejs/node/pull/35961) +* [[`002005f537`](https://github.com/nodejs/node/commit/002005f537)] - **test**: improve error message for policy failures (Bradley Meck) [#35633](https://github.com/nodejs/node/pull/35633) +* [[`1453de1381`](https://github.com/nodejs/node/commit/1453de1381)] - **test**: update old comment style test\_util.cc (raisinten) [#35884](https://github.com/nodejs/node/pull/35884) +* [[`de375e16f4`](https://github.com/nodejs/node/commit/de375e16f4)] - **test**: add missing ref comments to parallel.status (Rich Trott) [#35896](https://github.com/nodejs/node/pull/35896) +* [[`cab65fbe63`](https://github.com/nodejs/node/commit/cab65fbe63)] - **test**: mark test-worker-eventlooputil flaky (Myles Borins) [#35886](https://github.com/nodejs/node/pull/35886) +* [[`4ed4b64293`](https://github.com/nodejs/node/commit/4ed4b64293)] - **test**: mark test-http2-respond-file-error-pipe-offset flaky (Myles Borins) [#35883](https://github.com/nodejs/node/pull/35883) +* [[`a5b94180fe`](https://github.com/nodejs/node/commit/a5b94180fe)] - **test**: fix reference to WPT testharness.js (Tobias Nießen) [#35814](https://github.com/nodejs/node/pull/35814) +* [[`3bb7f3602b`](https://github.com/nodejs/node/commit/3bb7f3602b)] - **test**: add onerror test cases to policy (Daijiro Wachi) [#35797](https://github.com/nodejs/node/pull/35797) +* [[`0aba12218a`](https://github.com/nodejs/node/commit/0aba12218a)] - **test**: add upstream test cases to encoding (Daijiro Wachi) [#35794](https://github.com/nodejs/node/pull/35794) +* [[`f535d6252f`](https://github.com/nodejs/node/commit/f535d6252f)] - **test**: add test for listen callback runtime binding (H Adinarayana) [#35657](https://github.com/nodejs/node/pull/35657) +* [[`d62e72b341`](https://github.com/nodejs/node/commit/d62e72b341)] - **test**: refactor test-https-host-headers (himself65) [#32805](https://github.com/nodejs/node/pull/32805) +* [[`70cb70812d`](https://github.com/nodejs/node/commit/70cb70812d)] - **test**: add common.mustSucceed (Tobias Nießen) [#35086](https://github.com/nodejs/node/pull/35086) +* [[`226c1800a8`](https://github.com/nodejs/node/commit/226c1800a8)] - **test**: check for AbortController existence (James M Snell) [#35616](https://github.com/nodejs/node/pull/35616) +* [[`41aac465cc`](https://github.com/nodejs/node/commit/41aac465cc)] - **timers**: correct explanation in comment (Turner Jabbour) [#35437](https://github.com/nodejs/node/pull/35437) +* [[`713d1ebe75`](https://github.com/nodejs/node/commit/713d1ebe75)] - **tools**: bump unist-util-find@1.0.1 to unist-util-find@1.0.2 (Rich Trott) [#36106](https://github.com/nodejs/node/pull/36106) +* [[`127a4fb810`](https://github.com/nodejs/node/commit/127a4fb810)] - **tools**: only use 2 cores for macos action (Myles Borins) [#36169](https://github.com/nodejs/node/pull/36169) +* [[`75e49b833b`](https://github.com/nodejs/node/commit/75e49b833b)] - **tools**: remove bashisms from license builder script (Antoine du Hamel) [#36122](https://github.com/nodejs/node/pull/36122) +* [[`28d6283f96`](https://github.com/nodejs/node/commit/28d6283f96)] - **tools**: hide commit queue action link (Antoine du Hamel) [#36124](https://github.com/nodejs/node/pull/36124) +* [[`b7441ea4d2`](https://github.com/nodejs/node/commit/b7441ea4d2)] - **tools**: update doc tools to remark-parse@9.0.0 (Rich Trott) [#36049](https://github.com/nodejs/node/pull/36049) +* [[`5a41282ef5`](https://github.com/nodejs/node/commit/5a41282ef5)] - **tools**: enforce use of single quotes in editorconfig (Antoine du Hamel) [#36020](https://github.com/nodejs/node/pull/36020) +* [[`23dd2b00dd`](https://github.com/nodejs/node/commit/23dd2b00dd)] - **tools**: fix config serialization w/ long strings (Ole André Vadla Ravnås) [#35982](https://github.com/nodejs/node/pull/35982) +* [[`4664681220`](https://github.com/nodejs/node/commit/4664681220)] - **tools**: don't print gold linker warning w/o flag (Myles Borins) [#35955](https://github.com/nodejs/node/pull/35955) +* [[`dfd6ad9d99`](https://github.com/nodejs/node/commit/dfd6ad9d99)] - **tools**: refloat 7 Node.js patches to cpplint.py (Rich Trott) [#35866](https://github.com/nodejs/node/pull/35866) +* [[`d177cb3993`](https://github.com/nodejs/node/commit/d177cb3993)] - **tools**: bump cpplint to 1.5.1 (Rich Trott) [#35866](https://github.com/nodejs/node/pull/35866) +* [[`b19a85ed2a`](https://github.com/nodejs/node/commit/b19a85ed2a)] - **tools**: add update-npm script (Myles Borins) [#35822](https://github.com/nodejs/node/pull/35822) +* [[`07e5d35d14`](https://github.com/nodejs/node/commit/07e5d35d14)] - **tools**: refloat 7 Node.js patches to cpplint.py (Rich Trott) [#35719](https://github.com/nodejs/node/pull/35719) +* [[`c7301533de`](https://github.com/nodejs/node/commit/c7301533de)] - **tools**: bump cpplint to 1.5.0 (Rich Trott) [#35719](https://github.com/nodejs/node/pull/35719) +* [[`985efdfa09`](https://github.com/nodejs/node/commit/985efdfa09)] - **tools**: update gyp-next to v0.6.2 (Michaël Zasso) [#35690](https://github.com/nodejs/node/pull/35690) +* [[`baca8ee873`](https://github.com/nodejs/node/commit/baca8ee873)] - **tools**: update gyp-next to v0.6.0 (Ujjwal Sharma) [#35635](https://github.com/nodejs/node/pull/35635) +* [[`3e7598da9b`](https://github.com/nodejs/node/commit/3e7598da9b)] - **tools,doc**: enable ecmaVersion 2021 in acorn parser (Antoine du Hamel) [#35994](https://github.com/nodejs/node/pull/35994) +* [[`dfb353b882`](https://github.com/nodejs/node/commit/dfb353b882)] - **util**: fix to inspect getters that access this (raisinten) [#36052](https://github.com/nodejs/node/pull/36052) +* [[`1906f19e49`](https://github.com/nodejs/node/commit/1906f19e49)] - **vm**: refactor to use more primordials (Antoine du Hamel) [#36023](https://github.com/nodejs/node/pull/36023) +* [[`ffe517b40d`](https://github.com/nodejs/node/commit/ffe517b40d)] - **win, build**: fix build time on Windows (Bartosz Sosnowski) [#35932](https://github.com/nodejs/node/pull/35932) +* [[`c4c8541621`](https://github.com/nodejs/node/commit/c4c8541621)] - **win,build,tools**: support VS prerelease (Baruch Odem) [#36033](https://github.com/nodejs/node/pull/36033) +* [[`f59e225675`](https://github.com/nodejs/node/commit/f59e225675)] - **zlib**: test BrotliCompress throws invalid arg value (raisinten) [#35830](https://github.com/nodejs/node/pull/35830) + + +## 2020-11-16, Version 14.15.1 'Fermium' (LTS), @BethGriggs + +### Notable changes + +This is a security release. + +Vulnerabilities fixed: + +* **CVE-2020-8277**: Denial of Service through DNS request (High). A Node.js application that allows an attacker to trigger a DNS request for a host of their choice could trigger a Denial of Service by getting the application to resolve a DNS record with a larger number of responses. + +### Commits + +* [[`1fd2c8142b`](https://github.com/nodejs/node/commit/1fd2c8142b)] - **deps**: cherry-pick 0d252eb from upstream c-ares (Michael Dawson) [nodejs-private/node-private#231](https://github.com/nodejs-private/node-private/pull/231) + + +## 2020-10-27, Version 14.15.0 'Fermium' (LTS), @richardlau + +### Notable Changes + +This release marks the transition of Node.js 14.x into Long Term Support (LTS) +with the codename 'Fermium'. The 14.x release line now moves into "Active LTS" +and will remain so until October 2021. After that time, it will move into +"Maintenance" until end of life in April 2023. + +### Commits + +* [[`5b7a08c902`](https://github.com/nodejs/node/commit/5b7a08c902)] - **doc**: add missing link in Node.js 14 Changelog (Antoine du Hamel) [#35782](https://github.com/nodejs/node/pull/35782) +* [[`90a5d59824`](https://github.com/nodejs/node/commit/90a5d59824)] - **doc**: fix Node.js 14.x changelogs (Richard Lau) [#35756](https://github.com/nodejs/node/pull/35756) +* [[`7f788573b3`](https://github.com/nodejs/node/commit/7f788573b3)] - ***Revert*** "**test**: mark test-webcrypto-encrypt-decrypt-aes flaky" (Myles Borins) [#35666](https://github.com/nodejs/node/pull/35666) + ## 2020-10-15, Version 14.14.0 (Current), @MylesBorins diff --git a/doc/changelogs/CHANGELOG_V15.md b/doc/changelogs/CHANGELOG_V15.md new file mode 100644 index 00000000000000..d934ae70dc354b --- /dev/null +++ b/doc/changelogs/CHANGELOG_V15.md @@ -0,0 +1,1262 @@ +# Node.js 15 ChangeLog + + + + + + + + + + + + +
Current
+15.5.0
+15.4.0
+15.3.0
+15.2.1
+15.2.0
+15.1.0
+15.0.1
+15.0.0
+
+ +* Other Versions + * [14.x](CHANGELOG_V14.md) + * [13.x](CHANGELOG_V13.md) + * [12.x](CHANGELOG_V12.md) + * [11.x](CHANGELOG_V11.md) + * [10.x](CHANGELOG_V10.md) + * [9.x](CHANGELOG_V9.md) + * [8.x](CHANGELOG_V8.md) + * [7.x](CHANGELOG_V7.md) + * [6.x](CHANGELOG_V6.md) + * [5.x](CHANGELOG_V5.md) + * [4.x](CHANGELOG_V4.md) + * [0.12.x](CHANGELOG_V012.md) + * [0.10.x](CHANGELOG_V010.md) + * [io.js](CHANGELOG_IOJS.md) + * [Archive](CHANGELOG_ARCHIVE.md) + + +## 2020-12-22, Version 15.5.0 (Current), @targos + +### Notable Changes + +#### Extended support for `AbortSignal` in child_process and stream + +The following APIs now support an `AbortSignal` in their options object: + +* `child_process.spawn()` + +Calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except the error passed to the callback will be an `AbortError`: + +```js +const controller = new AbortController(); +const { signal } = controller; +const grep = spawn('grep', ['ssh'], { signal }); +grep.on('error', (err) => { + // This will be called with err being an AbortError if the controller aborts +}); +controller.abort(); // stops the process +``` + +* `new stream.Writable()` and `new stream.Readable()` + +Calling `.abort()` on the corresponding `AbortController` will behave the same way as calling `.destroy(new AbortError())` on the stream: + +```js +const { Readable } = require('stream'); +const controller = new AbortController(); +const read = new Readable({ + read(size) { + // ... + }, + signal: controller.signal +}); +// Later, abort the operation closing the stream +controller.abort(); +``` + +Contributed by Benjamin Gruenbaum [#36431](https://github.com/nodejs/node/pull/36431), [#36432](https://github.com/nodejs/node/pull/36432). + +#### BigInt support in `querystring.stringify()` + +If `querystring.stringify()` is called with an object that contains `BigInt` values, they will now be serialized to their decimal representation instead of the empty string: + +```js +const querystring = require('querystring'); +console.log(querystring.stringify({ bigint: 2n ** 64n })); +// Prints: bigint=18446744073709551616 +``` + +Contributed by Darshan Sen [#36499](https://github.com/nodejs/node/pull/36499). + +#### Additions to the C++ embedder APIs + +A new `IsolateSettingsFlag` is available for those calling `SetIsolateUpForNode()`: `SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK` can be used to prevent Node.js from setting a custom callback to prepare stack traces. + +Contributed by Shelley Vohr [#36447](https://github.com/nodejs/node/pull/36447). + +--- + +Added `node::GetEnvironmentIsolateData()` and `node::GetArrayBufferAllocator()` to respectively get the current `IsolateData*` and, from it, the current Node.js `ArrayBufferAllocator` if there is one. + +Contributed by Anna Henningsen [#36441](https://github.com/nodejs/node/pull/36441). + +#### New core collaborator + +With this release, we welcome a new Node.js core collaborator: + +* Pooja D P [@PoojaDurgad](https://github.com/PoojaDurgad) [#36511](https://github.com/nodejs/node/pull/36511) + +### Commits + +#### Semver-minor commits + +* [[`e449571230`](https://github.com/nodejs/node/commit/e449571230)] - **(SEMVER-MINOR)** **child_process**: add signal support to spawn (Benjamin Gruenbaum) [#36432](https://github.com/nodejs/node/pull/36432) +* [[`25d7e90386`](https://github.com/nodejs/node/commit/25d7e90386)] - **(SEMVER-MINOR)** **http**: use `autoDestroy: true` in incoming message (Daniele Belardi) [#33035](https://github.com/nodejs/node/pull/33035) +* [[`5481be8cbd`](https://github.com/nodejs/node/commit/5481be8cbd)] - **(SEMVER-MINOR)** **lib**: support BigInt in querystring.stringify (raisinten) [#36499](https://github.com/nodejs/node/pull/36499) +* [[`036ed1fafc`](https://github.com/nodejs/node/commit/036ed1fafc)] - **(SEMVER-MINOR)** **src**: add way to get IsolateData and allocator from Environment (Anna Henningsen) [#36441](https://github.com/nodejs/node/pull/36441) +* [[`e23309486b`](https://github.com/nodejs/node/commit/e23309486b)] - **(SEMVER-MINOR)** **src**: allow preventing SetPrepareStackTraceCallback (Shelley Vohr) [#36447](https://github.com/nodejs/node/pull/36447) +* [[`6ecbc1dcb3`](https://github.com/nodejs/node/commit/6ecbc1dcb3)] - **(SEMVER-MINOR)** **stream**: support abortsignal in constructor (Benjamin Gruenbaum) [#36431](https://github.com/nodejs/node/pull/36431) + +#### Semver-patch commits + +* [[`1330995b80`](https://github.com/nodejs/node/commit/1330995b80)] - **build,lib,test**: change whitelist to allowlist (Michaël Zasso) [#36406](https://github.com/nodejs/node/pull/36406) +* [[`dc8d1a74a6`](https://github.com/nodejs/node/commit/dc8d1a74a6)] - **deps**: upgrade npm to 7.3.0 (Ruy Adorno) [#36572](https://github.com/nodejs/node/pull/36572) +* [[`b6a31f0a70`](https://github.com/nodejs/node/commit/b6a31f0a70)] - **deps**: update archs files for OpenSSL-1.1.1i (Myles Borins) [#36520](https://github.com/nodejs/node/pull/36520) +* [[`5b49807c3f`](https://github.com/nodejs/node/commit/5b49807c3f)] - **deps**: re-enable OPENSSL\_NO\_QUIC guards (James M Snell) [#36520](https://github.com/nodejs/node/pull/36520) +* [[`309e2971a2`](https://github.com/nodejs/node/commit/309e2971a2)] - **deps**: various quic patches from akamai/openssl (Todd Short) [#36520](https://github.com/nodejs/node/pull/36520) +* [[`27fb651cbc`](https://github.com/nodejs/node/commit/27fb651cbc)] - **deps**: upgrade openssl sources to 1.1.1i (Myles Borins) [#36520](https://github.com/nodejs/node/pull/36520) +* [[`1f43aadf90`](https://github.com/nodejs/node/commit/1f43aadf90)] - **deps**: update patch and docs for openssl update (Myles Borins) [#36520](https://github.com/nodejs/node/pull/36520) +* [[`752c94d202`](https://github.com/nodejs/node/commit/752c94d202)] - **deps**: fix npm doctor tests for pre-release node (nlf) [#36543](https://github.com/nodejs/node/pull/36543) +* [[`b0393fa2ed`](https://github.com/nodejs/node/commit/b0393fa2ed)] - **deps**: upgrade npm to 7.2.0 (Myles Borins) [#36543](https://github.com/nodejs/node/pull/36543) +* [[`cb4652e91d`](https://github.com/nodejs/node/commit/cb4652e91d)] - **deps**: update to c-ares 1.17.1 (Danny Sonnenschein) [#36207](https://github.com/nodejs/node/pull/36207) +* [[`21fbcb6f81`](https://github.com/nodejs/node/commit/21fbcb6f81)] - **deps**: V8: backport 4bf051d536a1 (Anna Henningsen) [#36482](https://github.com/nodejs/node/pull/36482) +* [[`30fe0ff681`](https://github.com/nodejs/node/commit/30fe0ff681)] - **deps**: upgrade npm to 7.1.2 (Darcy Clarke) [#36487](https://github.com/nodejs/node/pull/36487) +* [[`0baa610c3e`](https://github.com/nodejs/node/commit/0baa610c3e)] - **deps**: upgrade npm to 7.1.1 (Ruy Adorno) [#36459](https://github.com/nodejs/node/pull/36459) +* [[`5929b08851`](https://github.com/nodejs/node/commit/5929b08851)] - **deps**: upgrade npm to 7.1.0 (Ruy Adorno) [#36395](https://github.com/nodejs/node/pull/36395) +* [[`deaafd5788`](https://github.com/nodejs/node/commit/deaafd5788)] - **dns**: refactor to use more primordials (Antoine du Hamel) [#36314](https://github.com/nodejs/node/pull/36314) +* [[`e30af7be33`](https://github.com/nodejs/node/commit/e30af7be33)] - **fs**: refactor to use optional chaining (ZiJian Liu) [#36524](https://github.com/nodejs/node/pull/36524) +* [[`213dcd7930`](https://github.com/nodejs/node/commit/213dcd7930)] - **http**: add test for incomingmessage destroy (Daniele Belardi) [#33035](https://github.com/nodejs/node/pull/33035) +* [[`36b4ddd382`](https://github.com/nodejs/node/commit/36b4ddd382)] - **http**: use standard args order in IncomingMEssage onError (Daniele Belardi) [#33035](https://github.com/nodejs/node/pull/33035) +* [[`60b5e696fc`](https://github.com/nodejs/node/commit/60b5e696fc)] - **http**: remove trailing space (Daniele Belardi) [#33035](https://github.com/nodejs/node/pull/33035) +* [[`f11a648d8e`](https://github.com/nodejs/node/commit/f11a648d8e)] - **http**: add comments in \_http\_incoming (Daniele Belardi) [#33035](https://github.com/nodejs/node/pull/33035) +* [[`4b81d79b58`](https://github.com/nodejs/node/commit/4b81d79b58)] - **http**: fix lint error in incoming message (Daniele Belardi) [#33035](https://github.com/nodejs/node/pull/33035) +* [[`397e31e25f`](https://github.com/nodejs/node/commit/397e31e25f)] - **http**: reafactor incoming message destroy (Daniele Belardi) [#33035](https://github.com/nodejs/node/pull/33035) +* [[`9852ebca8d`](https://github.com/nodejs/node/commit/9852ebca8d)] - **http**: do not loop over prototype in Agent (Michaël Zasso) [#36410](https://github.com/nodejs/node/pull/36410) +* [[`e46a46a4cd`](https://github.com/nodejs/node/commit/e46a46a4cd)] - **inspector**: refactor to use more primordials (Antoine du Hamel) [#36356](https://github.com/nodejs/node/pull/36356) +* [[`728f512c7d`](https://github.com/nodejs/node/commit/728f512c7d)] - **lib**: make safe primordials safe to iterate (Antoine du Hamel) [#36391](https://github.com/nodejs/node/pull/36391) +* [[`f368d697cf`](https://github.com/nodejs/node/commit/f368d697cf)] - ***Revert*** "**perf_hooks**: make PerformanceObserver an AsyncResource" (Nicolai Stange) [#36343](https://github.com/nodejs/node/pull/36343) +* [[`e2ced0d401`](https://github.com/nodejs/node/commit/e2ced0d401)] - **perf_hooks**: invoke performance\_entry\_callback via MakeSyncCallback() (Nicolai Stange) [#36343](https://github.com/nodejs/node/pull/36343) +* [[`7c903ec6c8`](https://github.com/nodejs/node/commit/7c903ec6c8)] - **repl**: disable blocking completions by default (Anna Henningsen) [#36564](https://github.com/nodejs/node/pull/36564) +* [[`d38a0ec93e`](https://github.com/nodejs/node/commit/d38a0ec93e)] - **src**: remove unnecessary ToLocalChecked node\_errors (Daniel Bevenius) [#36547](https://github.com/nodejs/node/pull/36547) +* [[`bbc0d14cd2`](https://github.com/nodejs/node/commit/bbc0d14cd2)] - **src**: use correct microtask queue for checkpoints (Anna Henningsen) [#36581](https://github.com/nodejs/node/pull/36581) +* [[`7efb3111e8`](https://github.com/nodejs/node/commit/7efb3111e8)] - **src**: remove unnecessary ToLocalChecked call (Daniel Bevenius) [#36523](https://github.com/nodejs/node/pull/36523) +* [[`68687d3419`](https://github.com/nodejs/node/commit/68687d3419)] - **src**: remove empty name check in node\_env\_var.cc (raisinten) [#36133](https://github.com/nodejs/node/pull/36133) +* [[`1b4984de98`](https://github.com/nodejs/node/commit/1b4984de98)] - **src**: remove duplicate V macros in node\_v8.cc (Daniel Bevenius) [#36454](https://github.com/nodejs/node/pull/36454) +* [[`5ff7f42e65`](https://github.com/nodejs/node/commit/5ff7f42e65)] - **src**: use correct outer Context’s microtask queue (Anna Henningsen) [#36482](https://github.com/nodejs/node/pull/36482) +* [[`96c095f237`](https://github.com/nodejs/node/commit/96c095f237)] - **src**: guard against env != null in node\_errors.cc (Anna Henningsen) [#36414](https://github.com/nodejs/node/pull/36414) +* [[`4f3d7bb417`](https://github.com/nodejs/node/commit/4f3d7bb417)] - **src**: introduce convenience node::MakeSyncCallback() (Nicolai Stange) [#36343](https://github.com/nodejs/node/pull/36343) +* [[`e59788262c`](https://github.com/nodejs/node/commit/e59788262c)] - **src**: add typedef for CleanupHookCallback callback (Daniel Bevenius) [#36442](https://github.com/nodejs/node/pull/36442) +* [[`2a60e3b9df`](https://github.com/nodejs/node/commit/2a60e3b9df)] - **src**: fix indentation in memory\_tracker-inl.h (Daniel Bevenius) [#36425](https://github.com/nodejs/node/pull/36425) +* [[`210390f6fd`](https://github.com/nodejs/node/commit/210390f6fd)] - **src**: remove identical V macro (Daniel Bevenius) [#36427](https://github.com/nodejs/node/pull/36427) +* [[`02afe586aa`](https://github.com/nodejs/node/commit/02afe586aa)] - **src**: use using declarations consistently (Daniel Bevenius) [#36365](https://github.com/nodejs/node/pull/36365) +* [[`169406b7d7`](https://github.com/nodejs/node/commit/169406b7d7)] - **src**: add missing context scopes (Anna Henningsen) [#36413](https://github.com/nodejs/node/pull/36413) +* [[`3f33d0bcda`](https://github.com/nodejs/node/commit/3f33d0bcda)] - **stream**: fix pipe deadlock when starting with needDrain (Robert Nagy) [#36563](https://github.com/nodejs/node/pull/36563) +* [[`d8b5b9499c`](https://github.com/nodejs/node/commit/d8b5b9499c)] - **stream**: accept iterable as a valid first argument (ZiJian Liu) [#36479](https://github.com/nodejs/node/pull/36479) +* [[`58319d5336`](https://github.com/nodejs/node/commit/58319d5336)] - **tls**: forward new SecureContext options (Alba Mendez) [#36416](https://github.com/nodejs/node/pull/36416) +* [[`fa40366276`](https://github.com/nodejs/node/commit/fa40366276)] - **util**: simplify constructor retrieval in inspect() (Rich Trott) [#36466](https://github.com/nodejs/node/pull/36466) +* [[`cc544dbfaa`](https://github.com/nodejs/node/commit/cc544dbfaa)] - **util**: fix instanceof checks with null prototypes during inspection (Ruben Bridgewater) [#36178](https://github.com/nodejs/node/pull/36178) +* [[`13d6597b4b`](https://github.com/nodejs/node/commit/13d6597b4b)] - **util**: fix module prefixes during inspection (Ruben Bridgewater) [#36178](https://github.com/nodejs/node/pull/36178) +* [[`20ecc82569`](https://github.com/nodejs/node/commit/20ecc82569)] - **worker**: fix broadcast channel SharedArrayBuffer passing (Anna Henningsen) [#36501](https://github.com/nodejs/node/pull/36501) +* [[`56fe9bae26`](https://github.com/nodejs/node/commit/56fe9bae26)] - **worker**: refactor MessagePort entanglement management (Anna Henningsen) [#36345](https://github.com/nodejs/node/pull/36345) + +#### Documentation commits + +* [[`19c233232f`](https://github.com/nodejs/node/commit/19c233232f)] - **doc**: fix AbortSignal example for stream.Readable (Michaël Zasso) [#36596](https://github.com/nodejs/node/pull/36596) +* [[`9fbab3e2f5`](https://github.com/nodejs/node/commit/9fbab3e2f5)] - **doc**: update and run license-builder for Babel (Michaël Zasso) [#36504](https://github.com/nodejs/node/pull/36504) +* [[`a1ba6686a0`](https://github.com/nodejs/node/commit/a1ba6686a0)] - **doc**: add remark about Collaborators discussion page (FrankQiu) [#36420](https://github.com/nodejs/node/pull/36420) +* [[`c5602fb166`](https://github.com/nodejs/node/commit/c5602fb166)] - **doc**: simplify worker\_threads.md text (Rich Trott) [#36545](https://github.com/nodejs/node/pull/36545) +* [[`149f2cfac1`](https://github.com/nodejs/node/commit/149f2cfac1)] - **doc**: add two tips for speeding the dev builds (Momtchil Momtchev) [#36452](https://github.com/nodejs/node/pull/36452) +* [[`ad75c78c32`](https://github.com/nodejs/node/commit/ad75c78c32)] - **doc**: add note about timingSafeEqual for TypedArray (Tobias Nießen) [#36323](https://github.com/nodejs/node/pull/36323) +* [[`9830fe5c9e`](https://github.com/nodejs/node/commit/9830fe5c9e)] - **doc**: move Derek Lewis to emeritus (Rich Trott) [#36514](https://github.com/nodejs/node/pull/36514) +* [[`eb29a16bae`](https://github.com/nodejs/node/commit/eb29a16bae)] - **doc**: add issue reference to github pr template (Chinmoy Chakraborty) [#36440](https://github.com/nodejs/node/pull/36440) +* [[`f09985d42a`](https://github.com/nodejs/node/commit/f09985d42a)] - **doc**: update url.md (Rock) [#36147](https://github.com/nodejs/node/pull/36147) +* [[`c3ec90d23c`](https://github.com/nodejs/node/commit/c3ec90d23c)] - **doc**: make explicit reverting node\_version.h changes (Richard Lau) [#36461](https://github.com/nodejs/node/pull/36461) +* [[`7a34452b1d`](https://github.com/nodejs/node/commit/7a34452b1d)] - **doc**: add license info to the README (FrankQiu) [#36278](https://github.com/nodejs/node/pull/36278) +* [[`22f039339f`](https://github.com/nodejs/node/commit/22f039339f)] - **doc**: revise addon mulitple initializations text (Rich Trott) [#36457](https://github.com/nodejs/node/pull/36457) +* [[`25a245443a`](https://github.com/nodejs/node/commit/25a245443a)] - **doc**: add v15.4.0 link to CHANGELOG.md (Danielle Adams) [#36456](https://github.com/nodejs/node/pull/36456) +* [[`1ec8516fd6`](https://github.com/nodejs/node/commit/1ec8516fd6)] - **doc**: add PoojaDurgad to collaborators (Pooja D P) [#36511](https://github.com/nodejs/node/pull/36511) +* [[`98918110a1`](https://github.com/nodejs/node/commit/98918110a1)] - **doc**: edit addon text about event loop blocking (Rich Trott) [#36448](https://github.com/nodejs/node/pull/36448) +* [[`62bfe3d313`](https://github.com/nodejs/node/commit/62bfe3d313)] - **doc**: note v15.0.0 changed default --unhandled-rejections=throw (kai zhu) [#36361](https://github.com/nodejs/node/pull/36361) +* [[`129053fe4c`](https://github.com/nodejs/node/commit/129053fe4c)] - **doc**: update terminology (Michael Dawson) [#36475](https://github.com/nodejs/node/pull/36475) +* [[`e331de2571`](https://github.com/nodejs/node/commit/e331de2571)] - **doc**: reword POSIX threads text in addons.md (Rich Trott) [#36436](https://github.com/nodejs/node/pull/36436) +* [[`04f166389b`](https://github.com/nodejs/node/commit/04f166389b)] - **doc**: add RaisinTen as a triager (raisinten) [#36404](https://github.com/nodejs/node/pull/36404) +* [[`3341b2cb9d`](https://github.com/nodejs/node/commit/3341b2cb9d)] - **doc**: document ABORT\_ERR code (Benjamin Gruenbaum) [#36319](https://github.com/nodejs/node/pull/36319) +* [[`6a6b3af736`](https://github.com/nodejs/node/commit/6a6b3af736)] - **doc**: provide more context on techinical values (Michael Dawson) [#36201](https://github.com/nodejs/node/pull/36201) + +#### Other commits + +* [[`e1f00fd996`](https://github.com/nodejs/node/commit/e1f00fd996)] - **benchmark**: reduce code duplication (Rich Trott) [#36568](https://github.com/nodejs/node/pull/36568) +* [[`82a26268d7`](https://github.com/nodejs/node/commit/82a26268d7)] - **build**: do not run GitHub actions for draft PRs (Michaël Zasso) [#35910](https://github.com/nodejs/node/pull/35910) +* [[`95c80f5fb0`](https://github.com/nodejs/node/commit/95c80f5fb0)] - **build**: run some workflows only on nodejs/node (Michaël Zasso) [#36507](https://github.com/nodejs/node/pull/36507) +* [[`584ea8b26c`](https://github.com/nodejs/node/commit/584ea8b26c)] - **build**: fix make test-npm (Ruy Adorno) [#36369](https://github.com/nodejs/node/pull/36369) +* [[`01576fbc19`](https://github.com/nodejs/node/commit/01576fbc19)] - **test**: increase abort logic coverage (Moshe vilner) [#36586](https://github.com/nodejs/node/pull/36586) +* [[`22ac2279ee`](https://github.com/nodejs/node/commit/22ac2279ee)] - **test**: increase coverage for stream (ZiJian Liu) [#36538](https://github.com/nodejs/node/pull/36538) +* [[`9fc2479707`](https://github.com/nodejs/node/commit/9fc2479707)] - **test**: increase coverage for worker (ZiJian Liu) [#36491](https://github.com/nodejs/node/pull/36491) +* [[`81e603b7cf`](https://github.com/nodejs/node/commit/81e603b7cf)] - **test**: specify global object for globals (Rich Trott) [#36498](https://github.com/nodejs/node/pull/36498) +* [[`109ab787fd`](https://github.com/nodejs/node/commit/109ab787fd)] - **test**: increase coverage for fs/dir read (Zijian Liu) [#36388](https://github.com/nodejs/node/pull/36388) +* [[`9f2d3c291b`](https://github.com/nodejs/node/commit/9f2d3c291b)] - **test**: remove test-http2-client-upload as flaky (Rich Trott) [#36496](https://github.com/nodejs/node/pull/36496) +* [[`d299ceeac7`](https://github.com/nodejs/node/commit/d299ceeac7)] - **test**: increase coverage for net/blocklist (Zijian Liu) [#36405](https://github.com/nodejs/node/pull/36405) +* [[`f7635fd86d`](https://github.com/nodejs/node/commit/f7635fd86d)] - **test**: make executable name more general (Shelley Vohr) [#36489](https://github.com/nodejs/node/pull/36489) +* [[`acd78d9d25`](https://github.com/nodejs/node/commit/acd78d9d25)] - **test**: increased externalized string length (Shelley Vohr) [#36451](https://github.com/nodejs/node/pull/36451) +* [[`0f749a35ec`](https://github.com/nodejs/node/commit/0f749a35ec)] - **test**: add test for async contexts in PerformanceObserver (ZauberNerd) [#36343](https://github.com/nodejs/node/pull/36343) +* [[`dd705ad1f0`](https://github.com/nodejs/node/commit/dd705ad1f0)] - **test**: increase execFile abort coverage (Moshe vilner) [#36429](https://github.com/nodejs/node/pull/36429) +* [[`31b062d591`](https://github.com/nodejs/node/commit/31b062d591)] - **test**: fix flaky test-repl (Rich Trott) [#36415](https://github.com/nodejs/node/pull/36415) +* [[`023291b43c`](https://github.com/nodejs/node/commit/023291b43c)] - **test**: check null proto-of-proto in util.inspect() (Rich Trott) [#36399](https://github.com/nodejs/node/pull/36399) +* [[`d3d1f338c7`](https://github.com/nodejs/node/commit/d3d1f338c7)] - **test**: add SIGTRAP to test-signal-handler (Ash Cripps) [#36368](https://github.com/nodejs/node/pull/36368) +* [[`166aa8a7b5`](https://github.com/nodejs/node/commit/166aa8a7b5)] - **test**: fix child-process-pipe-dataflow (Santiago Gimeno) [#36366](https://github.com/nodejs/node/pull/36366) +* [[`ecbb757ae0`](https://github.com/nodejs/node/commit/ecbb757ae0)] - **tools**: fix make-v8.sh (Richard Lau) [#36594](https://github.com/nodejs/node/pull/36594) +* [[`e3c5adc6d0`](https://github.com/nodejs/node/commit/e3c5adc6d0)] - **tools**: fix release script sign function (Antoine du Hamel) [#36556](https://github.com/nodejs/node/pull/36556) +* [[`0d4d34748d`](https://github.com/nodejs/node/commit/0d4d34748d)] - **tools**: update ESLint to 7.16.0 (Yongsheng Zhang) [#36579](https://github.com/nodejs/node/pull/36579) +* [[`f3828c9dcb`](https://github.com/nodejs/node/commit/f3828c9dcb)] - **tools**: fix update-eslint.sh (Yongsheng Zhang) [#36579](https://github.com/nodejs/node/pull/36579) +* [[`27260c70b4`](https://github.com/nodejs/node/commit/27260c70b4)] - **tools**: fix release script (Antoine du Hamel) [#36540](https://github.com/nodejs/node/pull/36540) +* [[`c6700ad041`](https://github.com/nodejs/node/commit/c6700ad041)] - **tools**: remove unused variable in configure.py (Rich Trott) [#36525](https://github.com/nodejs/node/pull/36525) +* [[`7b8d373d5e`](https://github.com/nodejs/node/commit/7b8d373d5e)] - **tools**: lint shell scripts (Antoine du Hamel) [#36099](https://github.com/nodejs/node/pull/36099) +* [[`c6e65d09ef`](https://github.com/nodejs/node/commit/c6e65d09ef)] - **tools**: update ini in tools/node-lint-md-cli-rollup (Myles Borins) [#36474](https://github.com/nodejs/node/pull/36474) +* [[`7542a3bd55`](https://github.com/nodejs/node/commit/7542a3bd55)] - **tools**: enable no-unsafe-optional-chaining lint rule (Colin Ihrig) [#36411](https://github.com/nodejs/node/pull/36411) +* [[`26f8ccfbe6`](https://github.com/nodejs/node/commit/26f8ccfbe6)] - **tools**: update ESLint to 7.15.0 (Colin Ihrig) [#36411](https://github.com/nodejs/node/pull/36411) +* [[`8ecf2f9976`](https://github.com/nodejs/node/commit/8ecf2f9976)] - **tools**: update doc tool dependencies (Michaël Zasso) [#36407](https://github.com/nodejs/node/pull/36407) +* [[`040b39f076`](https://github.com/nodejs/node/commit/040b39f076)] - **tools**: enable no-unused-expressions lint rule (Michaël Zasso) [#36248](https://github.com/nodejs/node/pull/36248) + + +## 2020-12-09, Version 15.4.0 (Current), @danielleadams + +### Notable Changes + +* **child_processes**: + * add AbortSignal support (Benjamin Gruenbaum) [#36308](https://github.com/nodejs/node/pull/36308) +* **deps**: + * update ICU to 68.1 (Michaël Zasso) [#36187](https://github.com/nodejs/node/pull/36187) +* **events**: + * support signal in EventTarget (Benjamin Gruenbaum) [#36258](https://github.com/nodejs/node/pull/36258) + * graduate Event, EventTarget, AbortController (James M Snell) [#35949](https://github.com/nodejs/node/pull/35949) +* **http**: + * enable call chaining with setHeader() (pooja d.p) [#35924](https://github.com/nodejs/node/pull/35924) +* **module**: + * add isPreloading indicator (James M Snell) [#36263](https://github.com/nodejs/node/pull/36263) +* **stream**: + * support abort signal (Benjamin Gruenbaum) [#36061](https://github.com/nodejs/node/pull/36061) + * add FileHandle support to Read/WriteStream (Momtchil Momtchev) [#35922](https://github.com/nodejs/node/pull/35922) +* **worker**: + * add experimental BroadcastChannel (James M Snell) [#36271](https://github.com/nodejs/node/pull/36271) + +### Commits + +* [[`e79bdc313a`](https://github.com/nodejs/node/commit/e79bdc313a)] - **assert**: refactor to use more primordials (Antoine du Hamel) [#36234](https://github.com/nodejs/node/pull/36234) +* [[`2344e3e360`](https://github.com/nodejs/node/commit/2344e3e360)] - **benchmark**: changed `fstat` to `fstatSync` (Narasimha Prasanna HN) [#36206](https://github.com/nodejs/node/pull/36206) +* [[`ca8db41151`](https://github.com/nodejs/node/commit/ca8db41151)] - **benchmark,child_process**: remove failing benchmark parameter (Antoine du Hamel) [#36295](https://github.com/nodejs/node/pull/36295) +* [[`9db9be774b`](https://github.com/nodejs/node/commit/9db9be774b)] - **buffer**: refactor to use primordials instead of Array#reduce (Antoine du Hamel) [#36392](https://github.com/nodejs/node/pull/36392) +* [[`8d8d2261a5`](https://github.com/nodejs/node/commit/8d8d2261a5)] - **buffer**: refactor to use more primordials (Antoine du Hamel) [#36166](https://github.com/nodejs/node/pull/36166) +* [[`74adc441c4`](https://github.com/nodejs/node/commit/74adc441c4)] - **build**: fix typo in Makefile (raisinten) [#36176](https://github.com/nodejs/node/pull/36176) +* [[`224a6471cc`](https://github.com/nodejs/node/commit/224a6471cc)] - **(SEMVER-MINOR)** **child_process**: add AbortSignal support (Benjamin Gruenbaum) [#36308](https://github.com/nodejs/node/pull/36308) +* [[`4ca1bd8806`](https://github.com/nodejs/node/commit/4ca1bd8806)] - **child_process**: refactor to use more primordials (Zijian Liu) [#36269](https://github.com/nodejs/node/pull/36269) +* [[`841e8f444e`](https://github.com/nodejs/node/commit/841e8f444e)] - **crypto**: fix "Invalid JWK" error messages (Filip Skokan) [#36200](https://github.com/nodejs/node/pull/36200) +* [[`278862aeb9`](https://github.com/nodejs/node/commit/278862aeb9)] - **deps**: upgrade npm to 7.0.15 (Ruy Adorno) [#36293](https://github.com/nodejs/node/pull/36293) +* [[`66bc2067ce`](https://github.com/nodejs/node/commit/66bc2067ce)] - **deps**: V8: cherry-pick 86991d0587a1 (Benjamin Coe) [#36254](https://github.com/nodejs/node/pull/36254) +* [[`095cef2c11`](https://github.com/nodejs/node/commit/095cef2c11)] - **deps**: update ICU to 68.1 (Michaël Zasso) [#36187](https://github.com/nodejs/node/pull/36187) +* [[`8d69d8387e`](https://github.com/nodejs/node/commit/8d69d8387e)] - **dgram**: refactor to use more primordials (Antoine du Hamel) [#36286](https://github.com/nodejs/node/pull/36286) +* [[`bef550a50c`](https://github.com/nodejs/node/commit/bef550a50c)] - **doc**: add Powershell oneliner to get Windows version (Michael Bashurov) [#30289](https://github.com/nodejs/node/pull/30289) +* [[`2649c384c6`](https://github.com/nodejs/node/commit/2649c384c6)] - **doc**: add version metadata to timers/promises (Colin Ihrig) [#36378](https://github.com/nodejs/node/pull/36378) +* [[`0401ffbfb6`](https://github.com/nodejs/node/commit/0401ffbfb6)] - **doc**: add process for handling premature disclosure (Michael Dawson) [#36155](https://github.com/nodejs/node/pull/36155) +* [[`3e5fcda13e`](https://github.com/nodejs/node/commit/3e5fcda13e)] - **doc**: add table header in intl.md (Rich Trott) [#36261](https://github.com/nodejs/node/pull/36261) +* [[`65d89fdd69`](https://github.com/nodejs/node/commit/65d89fdd69)] - **doc**: adding example to Buffer.isBuffer method (naortedgi) [#36233](https://github.com/nodejs/node/pull/36233) +* [[`03cf8dbc0e`](https://github.com/nodejs/node/commit/03cf8dbc0e)] - **doc**: fix typo in events.md (Luigi Pinca) [#36231](https://github.com/nodejs/node/pull/36231) +* [[`b176d61e8c`](https://github.com/nodejs/node/commit/b176d61e8c)] - **doc**: fix --experimental-wasm-modules text location (Colin Ihrig) [#36220](https://github.com/nodejs/node/pull/36220) +* [[`44c4aaddad`](https://github.com/nodejs/node/commit/44c4aaddad)] - **doc**: stabilize subpath patterns (Guy Bedford) [#36177](https://github.com/nodejs/node/pull/36177) +* [[`fdf5d851d0`](https://github.com/nodejs/node/commit/fdf5d851d0)] - **doc**: add missing version to update cmd (Ruy Adorno) [#36204](https://github.com/nodejs/node/pull/36204) +* [[`186ad24fdf`](https://github.com/nodejs/node/commit/186ad24fdf)] - **doc**: cleanup events.md structure (James M Snell) [#36100](https://github.com/nodejs/node/pull/36100) +* [[`c14512b9a5`](https://github.com/nodejs/node/commit/c14512b9a5)] - **errors**: display original symbol name (Benjamin Coe) [#36042](https://github.com/nodejs/node/pull/36042) +* [[`855a85c124`](https://github.com/nodejs/node/commit/855a85c124)] - **(SEMVER-MINOR)** **events**: support signal in EventTarget (Benjamin Gruenbaum) [#36258](https://github.com/nodejs/node/pull/36258) +* [[`dc1930923b`](https://github.com/nodejs/node/commit/dc1930923b)] - **(SEMVER-MINOR)** **events**: graduate Event, EventTarget, AbortController (James M Snell) [#35949](https://github.com/nodejs/node/pull/35949) +* [[`537e5cbf51`](https://github.com/nodejs/node/commit/537e5cbf51)] - **fs**: move method definition from header (Yash Ladha) [#36256](https://github.com/nodejs/node/pull/36256) +* [[`744b8aa807`](https://github.com/nodejs/node/commit/744b8aa807)] - **fs**: pass ERR\_DIR\_CLOSED asynchronously to dir.close (Zijian Liu) [#36243](https://github.com/nodejs/node/pull/36243) +* [[`c04a2df185`](https://github.com/nodejs/node/commit/c04a2df185)] - **fs**: refactor to use more primordials (Antoine du Hamel) [#36196](https://github.com/nodejs/node/pull/36196) +* [[`58abdcaceb`](https://github.com/nodejs/node/commit/58abdcaceb)] - **(SEMVER-MINOR)** **http**: enable call chaining with setHeader() (pooja d.p) [#35924](https://github.com/nodejs/node/pull/35924) +* [[`cedf51f3ce`](https://github.com/nodejs/node/commit/cedf51f3ce)] - **http2**: refactor to use more primordials (Antoine du Hamel) [#36357](https://github.com/nodejs/node/pull/36357) +* [[`5f41f1b19e`](https://github.com/nodejs/node/commit/5f41f1b19e)] - **http2**: check write not scheduled in scope destructor (David Halls) [#36241](https://github.com/nodejs/node/pull/36241) +* [[`4127eb2405`](https://github.com/nodejs/node/commit/4127eb2405)] - **https**: add abortcontroller test (Benjamin Gruenbaum) [#36307](https://github.com/nodejs/node/pull/36307) +* [[`c2938bde6c`](https://github.com/nodejs/node/commit/c2938bde6c)] - **lib**: add uncurried accessor properties to `primordials` (ExE Boss) [#36329](https://github.com/nodejs/node/pull/36329) +* [[`f73a0a8069`](https://github.com/nodejs/node/commit/f73a0a8069)] - **lib**: fix typo in internal/errors.js (raisinten) [#36426](https://github.com/nodejs/node/pull/36426) +* [[`617cb58cc8`](https://github.com/nodejs/node/commit/617cb58cc8)] - **lib**: refactor primordials.uncurryThis (Antoine du Hamel) [#36221](https://github.com/nodejs/node/pull/36221) +* [[`cc18907ec4`](https://github.com/nodejs/node/commit/cc18907ec4)] - **module**: refactor to use more primordials (Antoine du Hamel) [#36348](https://github.com/nodejs/node/pull/36348) +* [[`d4de7c7eb9`](https://github.com/nodejs/node/commit/d4de7c7eb9)] - **(SEMVER-MINOR)** **module**: add isPreloading indicator (James M Snell) [#36263](https://github.com/nodejs/node/pull/36263) +* [[`8611b8f98a`](https://github.com/nodejs/node/commit/8611b8f98a)] - **net**: refactor to use more primordials (Antoine du Hamel) [#36303](https://github.com/nodejs/node/pull/36303) +* [[`2a24096720`](https://github.com/nodejs/node/commit/2a24096720)] - **os**: refactor to use more primordials (Antoine du Hamel) [#36284](https://github.com/nodejs/node/pull/36284) +* [[`0e7f0c6d27`](https://github.com/nodejs/node/commit/0e7f0c6d27)] - **path**: refactor to use more primordials (Antoine du Hamel) [#36302](https://github.com/nodejs/node/pull/36302) +* [[`ea46ca8cbf`](https://github.com/nodejs/node/commit/ea46ca8cbf)] - **perf_hooks**: refactor to use more primordials (Antoine du Hamel) [#36297](https://github.com/nodejs/node/pull/36297) +* [[`a9ac86d1ee`](https://github.com/nodejs/node/commit/a9ac86d1ee)] - **policy**: refactor to use more primordials (Antoine du Hamel) [#36210](https://github.com/nodejs/node/pull/36210) +* [[`39d0ceda48`](https://github.com/nodejs/node/commit/39d0ceda48)] - **process**: refactor to use more primordials (Antoine du Hamel) [#36212](https://github.com/nodejs/node/pull/36212) +* [[`ab084c199e`](https://github.com/nodejs/node/commit/ab084c199e)] - **querystring**: refactor to use more primordials (Antoine du Hamel) [#36315](https://github.com/nodejs/node/pull/36315) +* [[`d29199ef82`](https://github.com/nodejs/node/commit/d29199ef82)] - **quic**: refactor to use more primordials (Antoine du Hamel) [#36211](https://github.com/nodejs/node/pull/36211) +* [[`b885409e48`](https://github.com/nodejs/node/commit/b885409e48)] - **readline**: refactor to use more primordials (Antoine du Hamel) [#36296](https://github.com/nodejs/node/pull/36296) +* [[`9cb53f635a`](https://github.com/nodejs/node/commit/9cb53f635a)] - **repl**: refactor to use more primordials (Antoine du Hamel) [#36264](https://github.com/nodejs/node/pull/36264) +* [[`8dadaa652e`](https://github.com/nodejs/node/commit/8dadaa652e)] - **src**: remove some duplication in DeserializeProps (Daniel Bevenius) [#36336](https://github.com/nodejs/node/pull/36336) +* [[`a03aa0a6b2`](https://github.com/nodejs/node/commit/a03aa0a6b2)] - **src**: rename AliasedBufferInfo-\>AliasedBufferIndex (Daniel Bevenius) [#36339](https://github.com/nodejs/node/pull/36339) +* [[`e7b2d91e04`](https://github.com/nodejs/node/commit/e7b2d91e04)] - **src**: use transferred consistently (Daniel Bevenius) [#36340](https://github.com/nodejs/node/pull/36340) +* [[`6ebb98af11`](https://github.com/nodejs/node/commit/6ebb98af11)] - **src**: use ToLocal in DeserializeProperties (Daniel Bevenius) [#36279](https://github.com/nodejs/node/pull/36279) +* [[`47397ffd56`](https://github.com/nodejs/node/commit/47397ffd56)] - **src**: update node.rc file description (devsnek) [#36197](https://github.com/nodejs/node/pull/36197) +* [[`cfc8ec18db`](https://github.com/nodejs/node/commit/cfc8ec18db)] - **src**: fix label indentation (Rich Trott) [#36213](https://github.com/nodejs/node/pull/36213) +* [[`197ba21279`](https://github.com/nodejs/node/commit/197ba21279)] - **(SEMVER-MINOR)** **stream**: support abort signal (Benjamin Gruenbaum) [#36061](https://github.com/nodejs/node/pull/36061) +* [[`6033d30361`](https://github.com/nodejs/node/commit/6033d30361)] - **(SEMVER-MINOR)** **stream**: add FileHandle support to Read/WriteStream (Momtchil Momtchev) [#35922](https://github.com/nodejs/node/pull/35922) +* [[`a15addc153`](https://github.com/nodejs/node/commit/a15addc153)] - **string_decoder**: refactor to use more primordials (Antoine du Hamel) [#36358](https://github.com/nodejs/node/pull/36358) +* [[`b39d150e60`](https://github.com/nodejs/node/commit/b39d150e60)] - **test**: fix comment misspellings of transferred (Rich Trott) [#36360](https://github.com/nodejs/node/pull/36360) +* [[`a7e794d1bf`](https://github.com/nodejs/node/commit/a7e794d1bf)] - **test**: fix flaky test-http2-respond-file-error-pipe-offset (Rich Trott) [#36305](https://github.com/nodejs/node/pull/36305) +* [[`1091a658e1`](https://github.com/nodejs/node/commit/1091a658e1)] - **test**: fix bootstrap test (Benjamin Gruenbaum) [#36418](https://github.com/nodejs/node/pull/36418) +* [[`fbcb72a665`](https://github.com/nodejs/node/commit/fbcb72a665)] - **test**: increase coverage for readline (Zijian Liu) [#36389](https://github.com/nodejs/node/pull/36389) +* [[`22028aae54`](https://github.com/nodejs/node/commit/22028aae54)] - **test**: skip flaky parts of broadcastchannel test on Windows (Rich Trott) [#36386](https://github.com/nodejs/node/pull/36386) +* [[`faca2b829e`](https://github.com/nodejs/node/commit/faca2b829e)] - **test**: fix test-worker-broadcastchannel-wpt (Rich Trott) [#36353](https://github.com/nodejs/node/pull/36353) +* [[`ea09da492c`](https://github.com/nodejs/node/commit/ea09da492c)] - **test**: fix typo in comment (inokawa) [#36312](https://github.com/nodejs/node/pull/36312) +* [[`b61ca1bfe6`](https://github.com/nodejs/node/commit/b61ca1bfe6)] - **test**: replace anonymous functions by arrows (Aleksandr Krutko) [#36125](https://github.com/nodejs/node/pull/36125) +* [[`2c7358ef43`](https://github.com/nodejs/node/commit/2c7358ef43)] - **test**: fix flaky sequential/test-fs-watch (Rich Trott) [#36249](https://github.com/nodejs/node/pull/36249) +* [[`b613950016`](https://github.com/nodejs/node/commit/b613950016)] - **test**: increase coverage for util.inspect() (Rich Trott) [#36228](https://github.com/nodejs/node/pull/36228) +* [[`69a8f05488`](https://github.com/nodejs/node/commit/69a8f05488)] - **test**: improve test coverage SourceMap API (Juan José Arboleda) [#36089](https://github.com/nodejs/node/pull/36089) +* [[`44d6d0bf0d`](https://github.com/nodejs/node/commit/44d6d0bf0d)] - **test**: fix missed warning for non-experimental AbortController (James M Snell) [#36240](https://github.com/nodejs/node/pull/36240) +* [[`29b5236256`](https://github.com/nodejs/node/commit/29b5236256)] - **timers**: reject with AbortError on cancellation (Benjamin Gruenbaum) [#36317](https://github.com/nodejs/node/pull/36317) +* [[`b20409e985`](https://github.com/nodejs/node/commit/b20409e985)] - **tls**: refactor to use more primordials (Antoine du Hamel) [#36266](https://github.com/nodejs/node/pull/36266) +* [[`f317bba034`](https://github.com/nodejs/node/commit/f317bba034)] - **tls**: permit null as a cipher value (Rich Trott) [#36318](https://github.com/nodejs/node/pull/36318) +* [[`9ae59c847a`](https://github.com/nodejs/node/commit/9ae59c847a)] - **tools**: upgrade to @babel/eslint-parser 7.12.1 (Antoine du Hamel) [#36321](https://github.com/nodejs/node/pull/36321) +* [[`e798770803`](https://github.com/nodejs/node/commit/e798770803)] - **tools**: refloat 7 Node.js patches to cpplint.py (Rich Trott) [#36324](https://github.com/nodejs/node/pull/36324) +* [[`a8b95cfcb2`](https://github.com/nodejs/node/commit/a8b95cfcb2)] - **tools**: bump cpplint to 1.5.4 (Rich Trott) [#36324](https://github.com/nodejs/node/pull/36324) +* [[`754b7a76b1`](https://github.com/nodejs/node/commit/754b7a76b1)] - **tools**: remove bashisms from macOS release scripts (Antoine du Hamel) [#36121](https://github.com/nodejs/node/pull/36121) +* [[`2868ffb331`](https://github.com/nodejs/node/commit/2868ffb331)] - **tools**: remove bashisms from release script (Antoine du Hamel) [#36123](https://github.com/nodejs/node/pull/36123) +* [[`8cf1addaa8`](https://github.com/nodejs/node/commit/8cf1addaa8)] - **tools**: update stability index linking logic (Rich Trott) [#36280](https://github.com/nodejs/node/pull/36280) +* [[`d95ae65986`](https://github.com/nodejs/node/commit/d95ae65986)] - **tools**: update highlight.js to 10.1.2 (Myles Borins) [#36309](https://github.com/nodejs/node/pull/36309) +* [[`5935ccc11c`](https://github.com/nodejs/node/commit/5935ccc11c)] - **tools**: fix undeclared identifier FALSE (Antoine du Hamel) [#36276](https://github.com/nodejs/node/pull/36276) +* [[`a2da7ba914`](https://github.com/nodejs/node/commit/a2da7ba914)] - **tools**: use using-declaration consistently (Daniel Bevenius) [#36245](https://github.com/nodejs/node/pull/36245) +* [[`82c1e39c4a`](https://github.com/nodejs/node/commit/82c1e39c4a)] - **tools**: refloat 7 Node.js patches to cpplint.py (Rich Trott) [#36235](https://github.com/nodejs/node/pull/36235) +* [[`bcf7393412`](https://github.com/nodejs/node/commit/bcf7393412)] - **tools**: bump cpplint to 1.5.3 (Rich Trott) [#36235](https://github.com/nodejs/node/pull/36235) +* [[`be11976407`](https://github.com/nodejs/node/commit/be11976407)] - **tools**: enable no-nonoctal-decimal-escape lint rule (Colin Ihrig) [#36217](https://github.com/nodejs/node/pull/36217) +* [[`c86c2399a2`](https://github.com/nodejs/node/commit/c86c2399a2)] - **tools**: update ESLint to 7.14.0 (Colin Ihrig) [#36217](https://github.com/nodejs/node/pull/36217) +* [[`cfadd82cf3`](https://github.com/nodejs/node/commit/cfadd82cf3)] - **tools**: refloat 7 Node.js patches to cpplint.py (Rich Trott) [#36213](https://github.com/nodejs/node/pull/36213) +* [[`03e8aaf613`](https://github.com/nodejs/node/commit/03e8aaf613)] - **tools**: bump cpplint.py to 1.5.2 (Rich Trott) [#36213](https://github.com/nodejs/node/pull/36213) +* [[`6bc007fc94`](https://github.com/nodejs/node/commit/6bc007fc94)] - **tty**: refactor to use more primordials (Zijian Liu) [#36272](https://github.com/nodejs/node/pull/36272) +* [[`fbd5652943`](https://github.com/nodejs/node/commit/fbd5652943)] - **v8**: refactor to use more primordials (Antoine du Hamel) [#36285](https://github.com/nodejs/node/pull/36285) +* [[`8731a80439`](https://github.com/nodejs/node/commit/8731a80439)] - **vm**: add `SafeForTerminationScope`s for SIGINT interruptions (Anna Henningsen) [#36344](https://github.com/nodejs/node/pull/36344) +* [[`47345a1f84`](https://github.com/nodejs/node/commit/47345a1f84)] - **worker**: refactor to use more primordials (Antoine du Hamel) [#36393](https://github.com/nodejs/node/pull/36393) +* [[`21c4704c7b`](https://github.com/nodejs/node/commit/21c4704c7b)] - **worker**: refactor to use more primordials (Antoine du Hamel) [#36267](https://github.com/nodejs/node/pull/36267) +* [[`802d44b1a9`](https://github.com/nodejs/node/commit/802d44b1a9)] - **(SEMVER-MINOR)** **worker**: add experimental BroadcastChannel (James M Snell) [#36271](https://github.com/nodejs/node/pull/36271) +* [[`4b4caada9f`](https://github.com/nodejs/node/commit/4b4caada9f)] - **zlib**: refactor to use more primordials (Antoine du Hamel) [#36347](https://github.com/nodejs/node/pull/36347) + + +## 2020-11-24, Version 15.3.0 (Current), @codebytere + +### Notable Changes + +* [[`6349b1d673`](https://github.com/nodejs/node/commit/6349b1d673)] - **(SEMVER-MINOR)** **dns**: add a cancel() method to the promise Resolver (Szymon Marczak) [#33099](https://github.com/nodejs/node/pull/33099) +* [[`9ce9b016e6`](https://github.com/nodejs/node/commit/9ce9b016e6)] - **(SEMVER-MINOR)** **events**: add max listener warning for EventTarget (James M Snell) [#36001](https://github.com/nodejs/node/pull/36001) +* [[`8390f8a86b`](https://github.com/nodejs/node/commit/8390f8a86b)] - **(SEMVER-MINOR)** **http**: add support for abortsignal to http.request (Benjamin Gruenbaum) [#36048](https://github.com/nodejs/node/pull/36048) +* [[`9c6be3cc90`](https://github.com/nodejs/node/commit/9c6be3cc90)] - **(SEMVER-MINOR)** **http2**: allow setting the local window size of a session (Yongsheng Zhang) [#35978](https://github.com/nodejs/node/pull/35978) +* [[`15ff155c12`](https://github.com/nodejs/node/commit/15ff155c12)] - **(SEMVER-MINOR)** **lib**: add throws option to fs.f/l/statSync (Andrew Casey) [#33716](https://github.com/nodejs/node/pull/33716) +* [[`85c85d368a`](https://github.com/nodejs/node/commit/85c85d368a)] - **(SEMVER-MINOR)** **path**: add `path/posix` and `path/win32` alias modules (ExE Boss) [#34962](https://github.com/nodejs/node/pull/34962) +* [[`d1baae3640`](https://github.com/nodejs/node/commit/d1baae3640)] - **(SEMVER-MINOR)** **readline**: add getPrompt to get the current prompt (Mattias Runge-Broberg) [#33675](https://github.com/nodejs/node/pull/33675) +* [[`5729478509`](https://github.com/nodejs/node/commit/5729478509)] - **(SEMVER-MINOR)** **src**: add loop idle time in diagnostic report (Gireesh Punathil) [#35940](https://github.com/nodejs/node/pull/35940) +* [[`baa87c1a7d`](https://github.com/nodejs/node/commit/baa87c1a7d)] - **(SEMVER-MINOR)** **util**: add `util/types` alias module (ExE Boss) [#34055](https://github.com/nodejs/node/pull/34055) + +### Commits + +* [[`34aa0c868e`](https://github.com/nodejs/node/commit/34aa0c868e)] - **assert**: refactor to use more primordials (Antoine du Hamel) [#35998](https://github.com/nodejs/node/pull/35998) +* [[`28d710164a`](https://github.com/nodejs/node/commit/28d710164a)] - **async_hooks**: refactor to use more primordials (Antoine du Hamel) [#36168](https://github.com/nodejs/node/pull/36168) +* [[`1924255fdb`](https://github.com/nodejs/node/commit/1924255fdb)] - **async_hooks**: fix leak in AsyncLocalStorage exit (Stephen Belanger) [#35779](https://github.com/nodejs/node/pull/35779) +* [[`3ee556a867`](https://github.com/nodejs/node/commit/3ee556a867)] - **benchmark**: fix build warnings (Gabriel Schulhof) [#36157](https://github.com/nodejs/node/pull/36157) +* [[`fcc38a1312`](https://github.com/nodejs/node/commit/fcc38a1312)] - **build**: replace which with command -v (raisinten) [#36118](https://github.com/nodejs/node/pull/36118) +* [[`60874ba941`](https://github.com/nodejs/node/commit/60874ba941)] - **build**: try “python3” as a last resort for 3.x (Ole André Vadla Ravnås) [#35983](https://github.com/nodejs/node/pull/35983) +* [[`fbe210b2a1`](https://github.com/nodejs/node/commit/fbe210b2a1)] - **build**: conditionally clear vcinstalldir (Brian Ingenito) [#36009](https://github.com/nodejs/node/pull/36009) +* [[`56f83e6876`](https://github.com/nodejs/node/commit/56f83e6876)] - **build**: refactor configure.py to use argparse (raisinten) [#35755](https://github.com/nodejs/node/pull/35755) +* [[`0b70822461`](https://github.com/nodejs/node/commit/0b70822461)] - **child_process**: refactor to use more primordials (Antoine du Hamel) [#36003](https://github.com/nodejs/node/pull/36003) +* [[`e54108f2e4`](https://github.com/nodejs/node/commit/e54108f2e4)] - **cluster**: refactor to use more primordials (Antoine du Hamel) [#36011](https://github.com/nodejs/node/pull/36011) +* [[`272fc794b2`](https://github.com/nodejs/node/commit/272fc794b2)] - **crypto**: fix format warning in AdditionalConfig (raisinten) [#36060](https://github.com/nodejs/node/pull/36060) +* [[`63a138e02f`](https://github.com/nodejs/node/commit/63a138e02f)] - **crypto**: fix passing TypedArray to webcrypto AES methods (Antoine du Hamel) [#36087](https://github.com/nodejs/node/pull/36087) +* [[`4a88c73fa5`](https://github.com/nodejs/node/commit/4a88c73fa5)] - **deps**: upgrade npm to 7.0.14 (nlf) [#36238](https://github.com/nodejs/node/pull/36238) +* [[`d16e8622a7`](https://github.com/nodejs/node/commit/d16e8622a7)] - **deps**: upgrade npm to 7.0.13 (Ruy Adorno) [#36202](https://github.com/nodejs/node/pull/36202) +* [[`c23ee3744f`](https://github.com/nodejs/node/commit/c23ee3744f)] - **deps**: upgrade npm to 7.0.12 (Ruy Adorno) [#36153](https://github.com/nodejs/node/pull/36153) +* [[`0fcbb1c0d5`](https://github.com/nodejs/node/commit/0fcbb1c0d5)] - **deps**: V8: cherry-pick 3176bfd447a9 (Anna Henningsen) [#35612](https://github.com/nodejs/node/pull/35612) +* [[`27f1bc05fd`](https://github.com/nodejs/node/commit/27f1bc05fd)] - **deps**: upgrade npm to 7.0.11 (Darcy Clarke) [#36112](https://github.com/nodejs/node/pull/36112) +* [[`8ae3ffe2be`](https://github.com/nodejs/node/commit/8ae3ffe2be)] - **deps**: V8: cherry-pick 1d0f426311d4 (Ole André Vadla Ravnås) [#35986](https://github.com/nodejs/node/pull/35986) +* [[`4b7ba11d67`](https://github.com/nodejs/node/commit/4b7ba11d67)] - **deps**: V8: cherry-pick 4e077ff0444a (Ole André Vadla Ravnås) [#35986](https://github.com/nodejs/node/pull/35986) +* [[`098a5b1298`](https://github.com/nodejs/node/commit/098a5b1298)] - **deps**: V8: cherry-pick 086eecbd96b6 (Ole André Vadla Ravnås) [#35986](https://github.com/nodejs/node/pull/35986) +* [[`d2c757ab19`](https://github.com/nodejs/node/commit/d2c757ab19)] - **deps**: V8: cherry-pick 27e1ac1a79ff (Ole André Vadla Ravnås) [#35986](https://github.com/nodejs/node/pull/35986) +* [[`6349b1d673`](https://github.com/nodejs/node/commit/6349b1d673)] - **(SEMVER-MINOR)** **dns**: add a cancel() method to the promise Resolver (Szymon Marczak) [#33099](https://github.com/nodejs/node/pull/33099) +* [[`0fbade38ef`](https://github.com/nodejs/node/commit/0fbade38ef)] - **doc**: add arm64 macOS as experimental (Richard Lau) [#36189](https://github.com/nodejs/node/pull/36189) +* [[`42dfda8f78`](https://github.com/nodejs/node/commit/42dfda8f78)] - **doc**: remove stray comma in url.md (Rich Trott) [#36175](https://github.com/nodejs/node/pull/36175) +* [[`8bbdbccbb6`](https://github.com/nodejs/node/commit/8bbdbccbb6)] - **doc**: revise agent.destroy() text (Rich Trott) [#36163](https://github.com/nodejs/node/pull/36163) +* [[`545ac1fec5`](https://github.com/nodejs/node/commit/545ac1fec5)] - **doc**: fix punctuation in v8.md (Rich Trott) [#36192](https://github.com/nodejs/node/pull/36192) +* [[`a6a90af8c0`](https://github.com/nodejs/node/commit/a6a90af8c0)] - **doc**: add compatibility/interop technical value (Geoffrey Booth) [#35323](https://github.com/nodejs/node/pull/35323) +* [[`4ab4a99900`](https://github.com/nodejs/node/commit/4ab4a99900)] - **doc**: de-emphasize wrapping in napi\_define\_class (Gabriel Schulhof) [#36159](https://github.com/nodejs/node/pull/36159) +* [[`bb29508e8f`](https://github.com/nodejs/node/commit/bb29508e8f)] - **doc**: add link for v8.takeCoverage() (Rich Trott) [#36135](https://github.com/nodejs/node/pull/36135) +* [[`24065b92f1`](https://github.com/nodejs/node/commit/24065b92f1)] - **doc**: mark modules implementation as stable (Guy Bedford) [#35781](https://github.com/nodejs/node/pull/35781) +* [[`142cacdc63`](https://github.com/nodejs/node/commit/142cacdc63)] - **doc**: clarify text about process not responding (Rich Trott) [#36117](https://github.com/nodejs/node/pull/36117) +* [[`0ff384b0be`](https://github.com/nodejs/node/commit/0ff384b0be)] - **doc**: esm docs consolidation and reordering (Guy Bedford) [#36046](https://github.com/nodejs/node/pull/36046) +* [[`b17a83a00d`](https://github.com/nodejs/node/commit/b17a83a00d)] - **doc**: claim ABI version for Electron v13 (Shelley Vohr) [#36101](https://github.com/nodejs/node/pull/36101) +* [[`e8a8513b2c`](https://github.com/nodejs/node/commit/e8a8513b2c)] - **doc**: fix invalid link in worker\_threads.md (Rich Trott) [#36109](https://github.com/nodejs/node/pull/36109) +* [[`cd33594a0d`](https://github.com/nodejs/node/commit/cd33594a0d)] - **doc**: move shigeki to emeritus (Rich Trott) [#36093](https://github.com/nodejs/node/pull/36093) +* [[`eefc6aa6c9`](https://github.com/nodejs/node/commit/eefc6aa6c9)] - **doc**: document the error when cwd not exists in child\_process.spawn (FeelyChau) [#34505](https://github.com/nodejs/node/pull/34505) +* [[`841a2812d0`](https://github.com/nodejs/node/commit/841a2812d0)] - **doc**: fix typo in debugger.md (Rich Trott) [#36066](https://github.com/nodejs/node/pull/36066) +* [[`500e709439`](https://github.com/nodejs/node/commit/500e709439)] - **doc**: update list styles for remark-parse@9 rendering (Rich Trott) [#36049](https://github.com/nodejs/node/pull/36049) +* [[`a8dab217eb`](https://github.com/nodejs/node/commit/a8dab217eb)] - **doc,url**: fix url.hostname example (Rishabh Mehan) [#33735](https://github.com/nodejs/node/pull/33735) +* [[`e48ec703ba`](https://github.com/nodejs/node/commit/e48ec703ba)] - **domain**: improve deprecation warning text for DEP0097 (Anna Henningsen) [#36136](https://github.com/nodejs/node/pull/36136) +* [[`bcbf176c22`](https://github.com/nodejs/node/commit/bcbf176c22)] - **errors**: refactor to use more primordials (Antoine du Hamel) [#36167](https://github.com/nodejs/node/pull/36167) +* [[`66788970ac`](https://github.com/nodejs/node/commit/66788970ac)] - **esm**: refactor to use more primordials (Antoine du Hamel) [#36019](https://github.com/nodejs/node/pull/36019) +* [[`9ce9b016e6`](https://github.com/nodejs/node/commit/9ce9b016e6)] - **(SEMVER-MINOR)** **events**: add max listener warning for EventTarget (James M Snell) [#36001](https://github.com/nodejs/node/pull/36001) +* [[`1550073dbc`](https://github.com/nodejs/node/commit/1550073dbc)] - **events**: disabled manual construction AbortSignal (raisinten) [#36094](https://github.com/nodejs/node/pull/36094) +* [[`8a6cabbb23`](https://github.com/nodejs/node/commit/8a6cabbb23)] - **events**: port some wpt tests (Ethan Arrowood) [#34169](https://github.com/nodejs/node/pull/34169) +* [[`3691eccf0a`](https://github.com/nodejs/node/commit/3691eccf0a)] - **fs**: remove experimental from promises.rmdir recursive (Anders Kaseorg) [#36131](https://github.com/nodejs/node/pull/36131) +* [[`76b1863240`](https://github.com/nodejs/node/commit/76b1863240)] - **fs**: filehandle read now accepts object as argument (Nikola Glavina) [#34180](https://github.com/nodejs/node/pull/34180) +* [[`2fdf509268`](https://github.com/nodejs/node/commit/2fdf509268)] - **http**: fix typo in comment (Hollow Man) [#36193](https://github.com/nodejs/node/pull/36193) +* [[`8390f8a86b`](https://github.com/nodejs/node/commit/8390f8a86b)] - **(SEMVER-MINOR)** **http**: add support for abortsignal to http.request (Benjamin Gruenbaum) [#36048](https://github.com/nodejs/node/pull/36048) +* [[`387d92fd0e`](https://github.com/nodejs/node/commit/387d92fd0e)] - **http**: onFinish will not be triggered again when finished (rickyes) [#35845](https://github.com/nodejs/node/pull/35845) +* [[`48bf59bb8b`](https://github.com/nodejs/node/commit/48bf59bb8b)] - **http2**: add support for AbortSignal to http2Session.request (Madara Uchiha) [#36070](https://github.com/nodejs/node/pull/36070) +* [[`8a0c3b9c76`](https://github.com/nodejs/node/commit/8a0c3b9c76)] - **http2**: refactor to use more primordials (Antoine du Hamel) [#36142](https://github.com/nodejs/node/pull/36142) +* [[`f0aed8c01c`](https://github.com/nodejs/node/commit/f0aed8c01c)] - **http2**: add support for TypedArray to getUnpackedSettings (Antoine du Hamel) [#36141](https://github.com/nodejs/node/pull/36141) +* [[`9c6be3cc90`](https://github.com/nodejs/node/commit/9c6be3cc90)] - **(SEMVER-MINOR)** **http2**: allow setting the local window size of a session (Yongsheng Zhang) [#35978](https://github.com/nodejs/node/pull/35978) +* [[`0b40568afe`](https://github.com/nodejs/node/commit/0b40568afe)] - **http2**: delay session.receive() by a tick (Szymon Marczak) [#35985](https://github.com/nodejs/node/pull/35985) +* [[`1a4d43f840`](https://github.com/nodejs/node/commit/1a4d43f840)] - **lib**: refactor to use more primordials (Antoine du Hamel) [#36140](https://github.com/nodejs/node/pull/36140) +* [[`d6ea12e003`](https://github.com/nodejs/node/commit/d6ea12e003)] - **lib**: set abort-controller toStringTag (Benjamin Gruenbaum) [#36115](https://github.com/nodejs/node/pull/36115) +* [[`82f1cde57e`](https://github.com/nodejs/node/commit/82f1cde57e)] - **lib**: remove primordials.SafePromise (Antoine du Hamel) [#36149](https://github.com/nodejs/node/pull/36149) +* [[`15ff155c12`](https://github.com/nodejs/node/commit/15ff155c12)] - **(SEMVER-MINOR)** **lib**: add throws option to fs.f/l/statSync (Andrew Casey) [#33716](https://github.com/nodejs/node/pull/33716) +* [[`75707f45eb`](https://github.com/nodejs/node/commit/75707f45eb)] - **lib,tools**: enforce access to prototype from primordials (Antoine du Hamel) [#36025](https://github.com/nodejs/node/pull/36025) +* [[`79b2ba6744`](https://github.com/nodejs/node/commit/79b2ba6744)] - **n-api**: clean up binding creation (Gabriel Schulhof) [#36170](https://github.com/nodejs/node/pull/36170) +* [[`5698cc08f0`](https://github.com/nodejs/node/commit/5698cc08f0)] - **n-api**: fix test\_async\_context warnings (Gabriel Schulhof) [#36171](https://github.com/nodejs/node/pull/36171) +* [[`3d623d850c`](https://github.com/nodejs/node/commit/3d623d850c)] - **n-api**: improve consistency of how we get context (Michael Dawson) [#36068](https://github.com/nodejs/node/pull/36068) +* [[`89da0c3353`](https://github.com/nodejs/node/commit/89da0c3353)] - **n-api**: factor out calling pattern (Gabriel Schulhof) [#36113](https://github.com/nodejs/node/pull/36113) +* [[`5c0ddbca01`](https://github.com/nodejs/node/commit/5c0ddbca01)] - **net**: fix invalid write after end error (Robert Nagy) [#36043](https://github.com/nodejs/node/pull/36043) +* [[`85c85d368a`](https://github.com/nodejs/node/commit/85c85d368a)] - **(SEMVER-MINOR)** **path**: add `path/posix` and `path/win32` alias modules (ExE Boss) [#34962](https://github.com/nodejs/node/pull/34962) +* [[`ed8af3a8b7`](https://github.com/nodejs/node/commit/ed8af3a8b7)] - **perf_hooks**: make nodeTiming a first-class object (Momtchil Momtchev) [#35977](https://github.com/nodejs/node/pull/35977) +* [[`eb9295b583`](https://github.com/nodejs/node/commit/eb9295b583)] - **promise**: emit error on domain unhandled rejections (Benjamin Gruenbaum) [#36082](https://github.com/nodejs/node/pull/36082) +* [[`59af919d6b`](https://github.com/nodejs/node/commit/59af919d6b)] - **querystring**: reduce memory usage by Int8Array (sapics) [#34179](https://github.com/nodejs/node/pull/34179) +* [[`d1baae3640`](https://github.com/nodejs/node/commit/d1baae3640)] - **(SEMVER-MINOR)** **readline**: add getPrompt to get the current prompt (Mattias Runge-Broberg) [#33675](https://github.com/nodejs/node/pull/33675) +* [[`6d1b1c7ad0`](https://github.com/nodejs/node/commit/6d1b1c7ad0)] - **src**: integrate URL::href() and use in inspector (Daijiro Wachi) [#35912](https://github.com/nodejs/node/pull/35912) +* [[`7086f2e653`](https://github.com/nodejs/node/commit/7086f2e653)] - **src**: refactor using-declarations node\_env\_var.cc (raisinten) [#36128](https://github.com/nodejs/node/pull/36128) +* [[`122797e87f`](https://github.com/nodejs/node/commit/122797e87f)] - **src**: remove duplicate logic for getting buffer (Yash Ladha) [#34553](https://github.com/nodejs/node/pull/34553) +* [[`5729478509`](https://github.com/nodejs/node/commit/5729478509)] - **(SEMVER-MINOR)** **src**: add loop idle time in diagnostic report (Gireesh Punathil) [#35940](https://github.com/nodejs/node/pull/35940) +* [[`a81dc9ae18`](https://github.com/nodejs/node/commit/a81dc9ae18)] - **src,crypto**: refactoring of crypto\_context, SecureContext (James M Snell) [#35665](https://github.com/nodejs/node/pull/35665) +* [[`5fa35f6934`](https://github.com/nodejs/node/commit/5fa35f6934)] - **test**: update comments in test-fs-read-offset-null (Rich Trott) [#36152](https://github.com/nodejs/node/pull/36152) +* [[`73bb54af77`](https://github.com/nodejs/node/commit/73bb54af77)] - **test**: update wpt url and resource (Daijiro Wachi) [#36032](https://github.com/nodejs/node/pull/36032) +* [[`77b47dfd08`](https://github.com/nodejs/node/commit/77b47dfd08)] - **test**: fix typo in inspector-helper.js (Luigi Pinca) [#36127](https://github.com/nodejs/node/pull/36127) +* [[`474664963c`](https://github.com/nodejs/node/commit/474664963c)] - **test**: deflake test-http-destroyed-socket-write2 (Luigi Pinca) [#36120](https://github.com/nodejs/node/pull/36120) +* [[`f9bbd35937`](https://github.com/nodejs/node/commit/f9bbd35937)] - **test**: make test-http2-client-jsstream-destroy.js reliable (Rich Trott) [#36129](https://github.com/nodejs/node/pull/36129) +* [[`c19df17acb`](https://github.com/nodejs/node/commit/c19df17acb)] - **test**: add test for fs.read when offset key is null (mayank agarwal) [#35918](https://github.com/nodejs/node/pull/35918) +* [[`9405cddbee`](https://github.com/nodejs/node/commit/9405cddbee)] - **test**: improve test-stream-duplex-readable-end (Luigi Pinca) [#36056](https://github.com/nodejs/node/pull/36056) +* [[`3be5e86c57`](https://github.com/nodejs/node/commit/3be5e86c57)] - **test**: add util.inspect test for null maxStringLength (Rich Trott) [#36086](https://github.com/nodejs/node/pull/36086) +* [[`6a4cc43028`](https://github.com/nodejs/node/commit/6a4cc43028)] - **test**: replace var with const (Aleksandr Krutko) [#36069](https://github.com/nodejs/node/pull/36069) +* [[`a367c0dfc2`](https://github.com/nodejs/node/commit/a367c0dfc2)] - **timers**: refactor to use more primordials (Antoine du Hamel) [#36132](https://github.com/nodejs/node/pull/36132) +* [[`a6ef92bc27`](https://github.com/nodejs/node/commit/a6ef92bc27)] - **tools**: bump unist-util-find@1.0.1 to unist-util-find@1.0.2 (Rich Trott) [#36106](https://github.com/nodejs/node/pull/36106) +* [[`2d2491284e`](https://github.com/nodejs/node/commit/2d2491284e)] - **tools**: only use 2 cores for macos action (Myles Borins) [#36169](https://github.com/nodejs/node/pull/36169) +* [[`d8fcf2c324`](https://github.com/nodejs/node/commit/d8fcf2c324)] - **tools**: remove bashisms from license builder script (Antoine du Hamel) [#36122](https://github.com/nodejs/node/pull/36122) +* [[`7e7ddb11c0`](https://github.com/nodejs/node/commit/7e7ddb11c0)] - **tools**: hide commit queue action link (Antoine du Hamel) [#36124](https://github.com/nodejs/node/pull/36124) +* [[`63494e434a`](https://github.com/nodejs/node/commit/63494e434a)] - **tools**: update doc tools to remark-parse@9.0.0 (Rich Trott) [#36049](https://github.com/nodejs/node/pull/36049) +* [[`bf0550ce4e`](https://github.com/nodejs/node/commit/bf0550ce4e)] - **tools**: enforce use of single quotes in editorconfig (Antoine du Hamel) [#36020](https://github.com/nodejs/node/pull/36020) +* [[`49649a499e`](https://github.com/nodejs/node/commit/49649a499e)] - **tools**: fix config serialization w/ long strings (Ole André Vadla Ravnås) [#35982](https://github.com/nodejs/node/pull/35982) +* [[`be220b213d`](https://github.com/nodejs/node/commit/be220b213d)] - **tools**: update ESLint to 7.13.0 (Luigi Pinca) [#36031](https://github.com/nodejs/node/pull/36031) +* [[`4140f491fd`](https://github.com/nodejs/node/commit/4140f491fd)] - **util**: fix to inspect getters that access this (raisinten) [#36052](https://github.com/nodejs/node/pull/36052) +* [[`baa87c1a7d`](https://github.com/nodejs/node/commit/baa87c1a7d)] - **(SEMVER-MINOR)** **util**: add `util/types` alias module (ExE Boss) [#34055](https://github.com/nodejs/node/pull/34055) +* [[`f7b2fce1c1`](https://github.com/nodejs/node/commit/f7b2fce1c1)] - **vm**: refactor to use more primordials (Antoine du Hamel) [#36023](https://github.com/nodejs/node/pull/36023) +* [[`4e3883ec2d`](https://github.com/nodejs/node/commit/4e3883ec2d)] - **win,build,tools**: support VS prerelease (Baruch Odem) [#36033](https://github.com/nodejs/node/pull/36033) + + +## 2020-11-16, Version 15.2.1 (Current), @targos + +### Notable changes + +This is a security release. + +Vulnerabilities fixed: + +* **CVE-2020-8277**: Denial of Service through DNS request (High). A Node.js application that allows an attacker to trigger a DNS request for a host of their choice could trigger a Denial of service by getting the application to resolve a DNS record with a larger number of responses. + +### Commits + +* [[`2a44836eeb`](https://github.com/nodejs/node/commit/2a44836eeb)] - **deps**: cherry-pick 0d252eb from upstream c-ares (Michael Dawson) [nodejs-private/node-private#231](https://github.com/nodejs-private/node-private/pull/231) +* [[`b1f5518a0a`](https://github.com/nodejs/node/commit/b1f5518a0a)] - **doc**: fix `events.getEventListeners` example (Dmitry Semigradsky) [#36085](https://github.com/nodejs/node/pull/36085) +* [[`b477447a55`](https://github.com/nodejs/node/commit/b477447a55)] - **doc**: fix `added:` info for `stream.\_construct()` (Luigi Pinca) [#36067](https://github.com/nodejs/node/pull/36067) +* [[`df211208c0`](https://github.com/nodejs/node/commit/df211208c0)] - **test**: add missing test coverage for setLocalAddress() (Rich Trott) [#36039](https://github.com/nodejs/node/pull/36039) +* [[`f5191f5bd2`](https://github.com/nodejs/node/commit/f5191f5bd2)] - **test**: remove flaky designation for fixed test (Rich Trott) [#35961](https://github.com/nodejs/node/pull/35961) +* [[`a2f652f7c5`](https://github.com/nodejs/node/commit/a2f652f7c5)] - **test**: move test-worker-eventlooputil to sequential (Rich Trott) [#35996](https://github.com/nodejs/node/pull/35996) +* [[`b0b43b27d6`](https://github.com/nodejs/node/commit/b0b43b27d6)] - **test**: fix unreliable test-fs-write-file.js (Rich Trott) [#36102](https://github.com/nodejs/node/pull/36102) + + +## 2020-11-10, Version 15.2.0 (Current), @danielleadams + +### Notable changes + +* **events**: + * getEventListeners static (Benjamin Gruenbaum) [#35991](https://github.com/nodejs/node/pull/35991) +* **fs**: + * support abortsignal in writeFile (Benjamin Gruenbaum) [#35993](https://github.com/nodejs/node/pull/35993) + * add support for AbortSignal in readFile (Benjamin Gruenbaum) [#35911](https://github.com/nodejs/node/pull/35911) +* **stream**: + * fix thrown object reference (Gil Pedersen) [#36065](https://github.com/nodejs/node/pull/36065) + +### Commits + +* [[`9d9a044c1b`](https://github.com/nodejs/node/commit/9d9a044c1b)] - **benchmark**: ignore build artifacts for napi addons (Richard Lau) [#35970](https://github.com/nodejs/node/pull/35970) +* [[`4c6de854be`](https://github.com/nodejs/node/commit/4c6de854be)] - **benchmark**: remove modules that require intl (Richard Lau) [#35968](https://github.com/nodejs/node/pull/35968) +* [[`292915a6a8`](https://github.com/nodejs/node/commit/292915a6a8)] - **bootstrap**: refactor to use more primordials (Antoine du Hamel) [#35999](https://github.com/nodejs/node/pull/35999) +* [[`10c9ea771d`](https://github.com/nodejs/node/commit/10c9ea771d)] - **build**: fix zlib inlining for IA-32 (raisinten) [#35679](https://github.com/nodejs/node/pull/35679) +* [[`6ac9c8f31b`](https://github.com/nodejs/node/commit/6ac9c8f31b)] - **build, tools**: look for local installation of NASM (Richard Lau) [#36014](https://github.com/nodejs/node/pull/36014) +* [[`9757b47c44`](https://github.com/nodejs/node/commit/9757b47c44)] - **console**: use more primordials (Antoine du Hamel) [#35734](https://github.com/nodejs/node/pull/35734) +* [[`0d7422651b`](https://github.com/nodejs/node/commit/0d7422651b)] - **crypto**: refactor to use more primordials (Antoine du Hamel) [#36012](https://github.com/nodejs/node/pull/36012) +* [[`dc4936ba50`](https://github.com/nodejs/node/commit/dc4936ba50)] - **crypto**: fix comment in ByteSource (Tobias Nießen) [#35972](https://github.com/nodejs/node/pull/35972) +* [[`7cb5c0911e`](https://github.com/nodejs/node/commit/7cb5c0911e)] - **deps**: cherry-pick 9a49b22 from V8 upstream (Daniel Bevenius) [#35939](https://github.com/nodejs/node/pull/35939) +* [[`4b03670877`](https://github.com/nodejs/node/commit/4b03670877)] - **dns**: fix trace\_events name for resolveCaa() (Rich Trott) [#35979](https://github.com/nodejs/node/pull/35979) +* [[`dcb27600da`](https://github.com/nodejs/node/commit/dcb27600da)] - **doc**: escape asterisk in cctest gtest-filter (raisinten) [#36034](https://github.com/nodejs/node/pull/36034) +* [[`923276ca53`](https://github.com/nodejs/node/commit/923276ca53)] - **doc**: move v8.getHeapCodeStatistics() (Rich Trott) [#36027](https://github.com/nodejs/node/pull/36027) +* [[`71fa9c6b24`](https://github.com/nodejs/node/commit/71fa9c6b24)] - **doc**: add note regarding file structure in src/README.md (Denys Otrishko) [#35000](https://github.com/nodejs/node/pull/35000) +* [[`99cb36238d`](https://github.com/nodejs/node/commit/99cb36238d)] - **doc**: advise users to import the full set of trusted release keys (Reşat SABIQ) [#32655](https://github.com/nodejs/node/pull/32655) +* [[`06cc400160`](https://github.com/nodejs/node/commit/06cc400160)] - **doc**: fix crypto doc linter errors (Antoine du Hamel) [#36035](https://github.com/nodejs/node/pull/36035) +* [[`01129a7b39`](https://github.com/nodejs/node/commit/01129a7b39)] - **doc**: revise v8.getHeapSnapshot() (Rich Trott) [#35849](https://github.com/nodejs/node/pull/35849) +* [[`77d33c9b2f`](https://github.com/nodejs/node/commit/77d33c9b2f)] - **doc**: update core-validate-commit link in guide (Daijiro Wachi) [#35938](https://github.com/nodejs/node/pull/35938) +* [[`6d56ba03e2`](https://github.com/nodejs/node/commit/6d56ba03e2)] - **doc**: update benchmark CI test indicator in README (Rich Trott) [#35945](https://github.com/nodejs/node/pull/35945) +* [[`8bd364a9b3`](https://github.com/nodejs/node/commit/8bd364a9b3)] - **doc**: add new wordings to the API description (Pooja D.P) [#35588](https://github.com/nodejs/node/pull/35588) +* [[`acd3617e1a`](https://github.com/nodejs/node/commit/acd3617e1a)] - **doc**: option --prof documentation help added (krank2me) [#34991](https://github.com/nodejs/node/pull/34991) +* [[`6968b0fd49`](https://github.com/nodejs/node/commit/6968b0fd49)] - **doc**: fix release-schedule link in backport guide (Daijiro Wachi) [#35920](https://github.com/nodejs/node/pull/35920) +* [[`efbfeff62b`](https://github.com/nodejs/node/commit/efbfeff62b)] - **doc**: fix incorrect heading level (Bryan Field) [#35965](https://github.com/nodejs/node/pull/35965) +* [[`9c4b360d08`](https://github.com/nodejs/node/commit/9c4b360d08)] - **doc,crypto**: added sign/verify method changes about dsaEncoding (Filip Skokan) [#35480](https://github.com/nodejs/node/pull/35480) +* [[`85cf30541d`](https://github.com/nodejs/node/commit/85cf30541d)] - **doc,fs**: document value of stats.isDirectory on symbolic links (coderaiser) [#27413](https://github.com/nodejs/node/pull/27413) +* [[`d6bd78ff82`](https://github.com/nodejs/node/commit/d6bd78ff82)] - **doc,net**: document socket.timeout (Brandon Kobel) [#34543](https://github.com/nodejs/node/pull/34543) +* [[`36c20d939a`](https://github.com/nodejs/node/commit/36c20d939a)] - **doc,stream**: write(chunk, encoding, cb) encoding can be null (dev-script) [#35372](https://github.com/nodejs/node/pull/35372) +* [[`9d26c4d496`](https://github.com/nodejs/node/commit/9d26c4d496)] - **domain**: refactor to use more primordials (Antoine du Hamel) [#35885](https://github.com/nodejs/node/pull/35885) +* [[`d83e253065`](https://github.com/nodejs/node/commit/d83e253065)] - **errors**: refactor to use more primordials (Antoine du Hamel) [#35944](https://github.com/nodejs/node/pull/35944) +* [[`567f8d8caf`](https://github.com/nodejs/node/commit/567f8d8caf)] - **(SEMVER-MINOR)** **events**: getEventListeners static (Benjamin Gruenbaum) [#35991](https://github.com/nodejs/node/pull/35991) +* [[`9e673723e3`](https://github.com/nodejs/node/commit/9e673723e3)] - **events**: fire handlers in correct oder (Benjamin Gruenbaum) [#35931](https://github.com/nodejs/node/pull/35931) +* [[`ff59fcdf7b`](https://github.com/nodejs/node/commit/ff59fcdf7b)] - **events**: define abort on prototype (Benjamin Gruenbaum) [#35931](https://github.com/nodejs/node/pull/35931) +* [[`ab0eb4f2c9`](https://github.com/nodejs/node/commit/ab0eb4f2c9)] - **events**: support event handlers on prototypes (Benjamin Gruenbaum) [#35931](https://github.com/nodejs/node/pull/35931) +* [[`33e2ee58a7`](https://github.com/nodejs/node/commit/33e2ee58a7)] - **events**: define event handler as enumerable (Benjamin Gruenbaum) [#35931](https://github.com/nodejs/node/pull/35931) +* [[`a7d0c76f86`](https://github.com/nodejs/node/commit/a7d0c76f86)] - **events**: support emit on nodeeventtarget (Benjamin Gruenbaum) [#35851](https://github.com/nodejs/node/pull/35851) +* [[`76332a0439`](https://github.com/nodejs/node/commit/76332a0439)] - **events**: port some wpt tests (Benjamin Gruenbaum) [#33621](https://github.com/nodejs/node/pull/33621) +* [[`ccf9f0e62e`](https://github.com/nodejs/node/commit/ccf9f0e62e)] - **(SEMVER-MINOR)** **fs**: support abortsignal in writeFile (Benjamin Gruenbaum) [#35993](https://github.com/nodejs/node/pull/35993) +* [[`7ef9c707e9`](https://github.com/nodejs/node/commit/7ef9c707e9)] - **fs**: replace finally with PromisePrototypeFinally (Baruch Odem (Rothkoff)) [#35995](https://github.com/nodejs/node/pull/35995) +* [[`ccbe267515`](https://github.com/nodejs/node/commit/ccbe267515)] - **fs**: remove unnecessary Function#bind() in fs/promises (Ben Noordhuis) [#35208](https://github.com/nodejs/node/pull/35208) +* [[`6011bfdec5`](https://github.com/nodejs/node/commit/6011bfdec5)] - **fs**: remove unused assignment (Rich Trott) [#35882](https://github.com/nodejs/node/pull/35882) +* [[`92bdfd141b`](https://github.com/nodejs/node/commit/92bdfd141b)] - **(SEMVER-MINOR)** **fs**: add support for AbortSignal in readFile (Benjamin Gruenbaum) [#35911](https://github.com/nodejs/node/pull/35911) +* [[`11f592450b`](https://github.com/nodejs/node/commit/11f592450b)] - **http2**: add has method to proxySocketHandler (masx200) [#35197](https://github.com/nodejs/node/pull/35197) +* [[`28ed7d062e`](https://github.com/nodejs/node/commit/28ed7d062e)] - **http2**: centralise socket event binding in Http2Session (Momtchil Momtchev) [#35772](https://github.com/nodejs/node/pull/35772) +* [[`429113ebfb`](https://github.com/nodejs/node/commit/429113ebfb)] - **http2**: move events to the JSStreamSocket (Momtchil Momtchev) [#35772](https://github.com/nodejs/node/pull/35772) +* [[`1dd744a420`](https://github.com/nodejs/node/commit/1dd744a420)] - **http2**: fix error stream write followed by destroy (David Halls) [#35951](https://github.com/nodejs/node/pull/35951) +* [[`af2a560c42`](https://github.com/nodejs/node/commit/af2a560c42)] - **lib**: add %TypedArray% abstract constructor to primordials (ExE Boss) [#36016](https://github.com/nodejs/node/pull/36016) +* [[`b700900d02`](https://github.com/nodejs/node/commit/b700900d02)] - **lib**: refactor to use more primordials (Antoine du Hamel) [#35875](https://github.com/nodejs/node/pull/35875) +* [[`7a375902ff`](https://github.com/nodejs/node/commit/7a375902ff)] - **module**: refactor to use more primordials (Antoine du Hamel) [#36024](https://github.com/nodejs/node/pull/36024) +* [[`8d76db86b5`](https://github.com/nodejs/node/commit/8d76db86b5)] - **module**: refactor to use iterable-weak-map (Benjamin Coe) [#35915](https://github.com/nodejs/node/pull/35915) +* [[`9b6512f7de`](https://github.com/nodejs/node/commit/9b6512f7de)] - **n-api**: unlink reference during its destructor (Gabriel Schulhof) [#35933](https://github.com/nodejs/node/pull/35933) +* [[`1b277d97f3`](https://github.com/nodejs/node/commit/1b277d97f3)] - **src**: remove ERR prefix in crypto status enums (Daniel Bevenius) [#35867](https://github.com/nodejs/node/pull/35867) +* [[`9774b4cc72`](https://github.com/nodejs/node/commit/9774b4cc72)] - **stream**: fix thrown object reference (Gil Pedersen) [#36065](https://github.com/nodejs/node/pull/36065) +* [[`359a6590b0`](https://github.com/nodejs/node/commit/359a6590b0)] - **stream**: writableNeedDrain (Robert Nagy) [#35348](https://github.com/nodejs/node/pull/35348) +* [[`b7aa5e2296`](https://github.com/nodejs/node/commit/b7aa5e2296)] - **stream**: remove isPromise utility function (Antoine du Hamel) [#35925](https://github.com/nodejs/node/pull/35925) +* [[`fdae9ad188`](https://github.com/nodejs/node/commit/fdae9ad188)] - **test**: fix races in test-performance-eventlooputil (Gerhard Stoebich) [#36028](https://github.com/nodejs/node/pull/36028) +* [[`0a4c96a7df`](https://github.com/nodejs/node/commit/0a4c96a7df)] - **test**: use global.EventTarget instead of internals (Antoine du Hamel) [#36002](https://github.com/nodejs/node/pull/36002) +* [[`f73b8d84db`](https://github.com/nodejs/node/commit/f73b8d84db)] - **test**: improve error message for policy failures (Bradley Meck) [#35633](https://github.com/nodejs/node/pull/35633) +* [[`cb6f0d3d89`](https://github.com/nodejs/node/commit/cb6f0d3d89)] - **test**: update old comment style test\_util.cc (raisinten) [#35884](https://github.com/nodejs/node/pull/35884) +* [[`23f0d0c45c`](https://github.com/nodejs/node/commit/23f0d0c45c)] - **test**: fix error in test/internet/test-dns.js (Rich Trott) [#35969](https://github.com/nodejs/node/pull/35969) +* [[`77e4f19701`](https://github.com/nodejs/node/commit/77e4f19701)] - **timers**: cleanup abort listener on awaitable timers (James M Snell) [#36006](https://github.com/nodejs/node/pull/36006) +* [[`a7350b3a8f`](https://github.com/nodejs/node/commit/a7350b3a8f)] - **tools**: don't print gold linker warning w/o flag (Myles Borins) [#35955](https://github.com/nodejs/node/pull/35955) +* [[`1f27214480`](https://github.com/nodejs/node/commit/1f27214480)] - **tools**: add new ESLint rule: prefer-primordials (Leko) [#35448](https://github.com/nodejs/node/pull/35448) +* [[`da3c2ab828`](https://github.com/nodejs/node/commit/da3c2ab828)] - **tools,doc**: enable ecmaVersion 2021 in acorn parser (Antoine du Hamel) [#35994](https://github.com/nodejs/node/pull/35994) +* [[`f8098c3e43`](https://github.com/nodejs/node/commit/f8098c3e43)] - **tools,lib**: recommend using safe primordials (Antoine du Hamel) [#36026](https://github.com/nodejs/node/pull/36026) +* [[`eea7e3b0d0`](https://github.com/nodejs/node/commit/eea7e3b0d0)] - **tools,lib**: tighten prefer-primordials rules for Error statics (Antoine du Hamel) [#36017](https://github.com/nodejs/node/pull/36017) +* [[`7a2edea7ed`](https://github.com/nodejs/node/commit/7a2edea7ed)] - **win, build**: fix build time on Windows (Bartosz Sosnowski) [#35932](https://github.com/nodejs/node/pull/35932) + + +## 2020-11-04, Version 15.1.0 (Current), @targos + +### Notable Changes + +#### Diagnostics channel (experimental module) + +`diagnostics_channel` is a new experimental module that provides an API to create named channels to report arbitrary message data for diagnostics purposes. + +With `diagnostics_channel`, Node.js core and module authors can publish contextual data about what they are doing at a given time. This could be the hostname and query string of a mysql query, for example. Just create a named channel with `dc.channel(name)` and call `channel.publish(data)` to send the data to any listeners to that channel. + +```js +const dc = require('diagnostics_channel'); +const channel = dc.channel('mysql.query'); + +MySQL.prototype.query = function query(queryString, values, callback) { + // Broadcast query information whenever a query is made + channel.publish({ + query: queryString, + host: this.hostname, + }); + + this.doQuery(queryString, values, callback); +}; +``` + +Channels are like one big global event emitter but are split into separate objects to ensure they get the best performance. If nothing is listening to the channel, the publishing overhead should be as close to zero as possible. Consuming channel data is as easy as using `channel.subscribe(listener)` to run a function whenever a message is published to that channel. + +```js +const dc = require('diagnostics_channel'); +const channel = dc.channel('mysql.query'); + +channel.subscribe(({ query, host }) => { + console.log(`mysql query to ${host}: ${query}`); +}); +``` + +The data captured can be used to provide context for what an app is doing at a given time. This can be used for things like augmenting tracing data, tracking network and filesystem activity, logging queries, and many other things. It's also a very useful data source for diagnostics tools to provide a clearer picture of exactly what the application is doing at a given point in the data they are presenting. + +Contributed by Stephen Belanger [#34895](https://github.com/nodejs/node/pull/34895). + +#### New child process `'spawn'` event + +Instances of `ChildProcess` now emit a new `'spawn'` event once the child process has spawned successfully. + +If emitted, the `'spawn'` event comes before all other events and before any data is received via `stdout` or `stderr`. + +The `'spawn'` event will fire regardless of whether an error occurs **within** the spawned process. +For example, if `bash some-command` spawns successfully, the `'spawn'` event will fire, though `bash` may fail to spawn `some-command`. +This caveat also applies when using `{ shell: true }`. + +Contributed by Matthew Francis Brunetti [#35369](https://github.com/nodejs/node/pull/35369). + +#### Set the local address for DNS resolution + +It is now possible to set the local IP address used by a `Resolver` instance to send its requests. +This allows programs to specify outbound interfaces when used on multi-homed +systems. + +The resolver will use the v4 local address when making requests to IPv4 DNS servers, and the v6 local address when making requests to IPv6 DNS servers. + +```js +const { Resolver } = require('dns'); + +const resolver = new Resolver(); + +resolver.setLocalAddress('10.1.2.3'); +// Equivalent to: resolver.setLocalAddress('10.1.2.3', '::0'); +``` + +Contributed by Josh Dague [#34824](https://github.com/nodejs/node/pull/34824). + +#### Control V8 coverage at runtime + +The `v8` module includes two new methods to control the V8 coverage started by the `NODE_V8_COVERAGE` environment variable. + +With `v8.takeCoverage()`, it is possible to write a coverage report to disk on demand. This can be done multiple times during the lifetime of the process, and the execution counter will be reset on each call. +When the process is about to exit, one last coverage will still be written to disk, unless `v8.stopCoverage()` was invoked before. + +The `v8.stopCoverage()` method allows to stop the coverage collection, so that V8 can release the execution counters and optimize code. + +Contributed by Joyee Cheung [#33807](https://github.com/nodejs/node/pull/33807). + +#### Analyze Worker's event loop utilization + +`Worker` instances now have a `performance` property, with a single `eventLoopUtilization` method that can be used to gather information about the worker's event loop utilization between the `'online'` and `'exit'` events. + +The method works the same way as `perf_hooks` `eventLoopUtilization()`. + +Contributed by Trevor Norris [#35664](https://github.com/nodejs/node/pull/35664). + +#### Take a V8 heap snapshot just before running out of memory (experimental) + +With the new `--heapsnapshot-near-heap-limit=max_count` experimental command line flag, it is now possible to automatically generate a heap snapshot when the V8 heap usage is approaching the heap limit. `count` should be a non-negative integer (in which case Node.js will write no more than `max_count` snapshots to disk). + +When generating snapshots, garbage collection may be triggered and bring the heap usage down, therefore multiple snapshots may be written to disk before the Node.js instance finally runs out of memory. These heap snapshots can be compared to determine what objects are being allocated during the time consecutive snapshots are taken. + +Generating V8 snapshots takes time and memory (both memory managed by the V8 heap and native memory outside the V8 heap). The bigger the heap is, the more resources it needs. Node.js will adjust the V8 heap to accommondate the additional V8 heap memory overhead, and try its best to avoid using up all the memory avialable to the process. + +```console +$ node --max-old-space-size=100 --heapsnapshot-near-heap-limit=3 index.js +Wrote snapshot to Heap.20200430.100036.49580.0.001.heapsnapshot +Wrote snapshot to Heap.20200430.100037.49580.0.002.heapsnapshot +Wrote snapshot to Heap.20200430.100038.49580.0.003.heapsnapshot + +<--- Last few GCs ---> + +[49580:0x110000000] 4826 ms: Mark-sweep 130.6 (147.8) -> 130.5 (147.8) MB, 27.4 / 0.0 ms (average mu = 0.126, current mu = 0.034) allocation failure scavenge might not succeed +[49580:0x110000000] 4845 ms: Mark-sweep 130.6 (147.8) -> 130.6 (147.8) MB, 18.8 / 0.0 ms (average mu = 0.088, current mu = 0.031) allocation failure scavenge might not succeed + + +<--- JS stacktrace ---> + +FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory +.... +``` + +Contributed by Joyee Cheung [#33010](https://github.com/nodejs/node/pull/33010). + +### Commits + +#### Semver-minor commits + +* [[`8169902b40`](https://github.com/nodejs/node/commit/8169902b40)] - **(SEMVER-MINOR)** **child_process**: add ChildProcess 'spawn' event (Matthew Francis Brunetti) [#35369](https://github.com/nodejs/node/pull/35369) +* [[`548f91af2c`](https://github.com/nodejs/node/commit/548f91af2c)] - **(SEMVER-MINOR)** **dns**: add setLocalAddress to Resolver (Josh Dague) [#34824](https://github.com/nodejs/node/pull/34824) +* [[`f861733bac`](https://github.com/nodejs/node/commit/f861733bac)] - **(SEMVER-MINOR)** **http**: report request start and end with diagnostics\_channel (Stephen Belanger) [#34895](https://github.com/nodejs/node/pull/34895) +* [[`883ed4b7f1`](https://github.com/nodejs/node/commit/883ed4b7f1)] - **(SEMVER-MINOR)** **http2**: add updateSettings to both http2 servers (Vincent Boivin) [#35383](https://github.com/nodejs/node/pull/35383) +* [[`b38a43d5d9`](https://github.com/nodejs/node/commit/b38a43d5d9)] - **(SEMVER-MINOR)** **lib**: create diagnostics\_channel module (Stephen Belanger) [#34895](https://github.com/nodejs/node/pull/34895) +* [[`a7f37bc725`](https://github.com/nodejs/node/commit/a7f37bc725)] - **(SEMVER-MINOR)** **src**: add --heapsnapshot-near-heap-limit option (Joyee Cheung) [#33010](https://github.com/nodejs/node/pull/33010) +* [[`7bfa872013`](https://github.com/nodejs/node/commit/7bfa872013)] - **(SEMVER-MINOR)** **v8**: implement v8.stopCoverage() (Joyee Cheung) [#33807](https://github.com/nodejs/node/pull/33807) +* [[`15ffed5319`](https://github.com/nodejs/node/commit/15ffed5319)] - **(SEMVER-MINOR)** **v8**: implement v8.takeCoverage() (Joyee Cheung) [#33807](https://github.com/nodejs/node/pull/33807) +* [[`221e28311f`](https://github.com/nodejs/node/commit/221e28311f)] - **(SEMVER-MINOR)** **worker**: add eventLoopUtilization() (Trevor Norris) [#35664](https://github.com/nodejs/node/pull/35664) + +#### Semver-patch commits + +* [[`d95013f399`](https://github.com/nodejs/node/commit/d95013f399)] - **assert,repl**: enable ecmaVersion 2021 in acorn parser (Michaël Zasso) [#35827](https://github.com/nodejs/node/pull/35827) +* [[`b11c7378e3`](https://github.com/nodejs/node/commit/b11c7378e3)] - **build**: fix lint-js-fix target (Antoine du Hamel) [#35927](https://github.com/nodejs/node/pull/35927) +* [[`a5fa849631`](https://github.com/nodejs/node/commit/a5fa849631)] - **build**: add vcbuilt test-doc target (Antoine du Hamel) [#35708](https://github.com/nodejs/node/pull/35708) +* [[`34281cdaba`](https://github.com/nodejs/node/commit/34281cdaba)] - **build**: turn off Codecov comments (bcoe) [#35800](https://github.com/nodejs/node/pull/35800) +* [[`a9c09246bb`](https://github.com/nodejs/node/commit/a9c09246bb)] - **build**: add license-builder GitHub Action (Tierney Cyren) [#35712](https://github.com/nodejs/node/pull/35712) +* [[`4447ff1162`](https://github.com/nodejs/node/commit/4447ff1162)] - **build,tools**: gitHub Actions: use Node.js Fermium (Antoine du Hamel) [#35840](https://github.com/nodejs/node/pull/35840) +* [[`273e147017`](https://github.com/nodejs/node/commit/273e147017)] - **build,tools**: add lint-js-doc target (Antoine du Hamel) [#35708](https://github.com/nodejs/node/pull/35708) +* [[`0ebf44b466`](https://github.com/nodejs/node/commit/0ebf44b466)] - **crypto**: pass empty passphrases to OpenSSL properly (Tobias Nießen) [#35914](https://github.com/nodejs/node/pull/35914) +* [[`644c416389`](https://github.com/nodejs/node/commit/644c416389)] - **crypto**: rename check to createJob (Daniel Bevenius) [#35858](https://github.com/nodejs/node/pull/35858) +* [[`79a8fb62e6`](https://github.com/nodejs/node/commit/79a8fb62e6)] - **crypto**: fixup scrypt regressions (James M Snell) [#35821](https://github.com/nodejs/node/pull/35821) +* [[`abd7c9447c`](https://github.com/nodejs/node/commit/abd7c9447c)] - **crypto**: fix webcrypto ECDH JWK import (Filip Skokan) [#35855](https://github.com/nodejs/node/pull/35855) +* [[`d3f1cde908`](https://github.com/nodejs/node/commit/d3f1cde908)] - **deps**: upgrade npm to 7.0.8 (Myles Borins) [#35953](https://github.com/nodejs/node/pull/35953) +* [[`55adee0947`](https://github.com/nodejs/node/commit/55adee0947)] - **deps**: upgrade npm to 7.0.7 (Luigi Pinca) [#35908](https://github.com/nodejs/node/pull/35908) +* [[`5cb77f2e79`](https://github.com/nodejs/node/commit/5cb77f2e79)] - **deps**: upgrade to cjs-module-lexer@1.0.0 (Guy Bedford) [#35928](https://github.com/nodejs/node/pull/35928) +* [[`1303a1fca8`](https://github.com/nodejs/node/commit/1303a1fca8)] - **deps**: update to cjs-module-lexer@0.5.2 (Guy Bedford) [#35901](https://github.com/nodejs/node/pull/35901) +* [[`20accb08fa`](https://github.com/nodejs/node/commit/20accb08fa)] - **deps**: upgrade to cjs-module-lexer@0.5.0 (Guy Bedford) [#35871](https://github.com/nodejs/node/pull/35871) +* [[`52a77db759`](https://github.com/nodejs/node/commit/52a77db759)] - **deps**: update acorn to v8.0.4 (Michaël Zasso) [#35791](https://github.com/nodejs/node/pull/35791) +* [[`e0a1541260`](https://github.com/nodejs/node/commit/e0a1541260)] - **deps**: update to cjs-module-lexer@0.4.3 (Guy Bedford) [#35745](https://github.com/nodejs/node/pull/35745) +* [[`894419c1f4`](https://github.com/nodejs/node/commit/894419c1f4)] - **deps**: V8: backport 4263f8a5e8e0 (Brian 'bdougie' Douglas) [#35650](https://github.com/nodejs/node/pull/35650) +* [[`564aadedac`](https://github.com/nodejs/node/commit/564aadedac)] - **doc,src,test**: revise C++ code for linter update (Rich Trott) [#35719](https://github.com/nodejs/node/pull/35719) +* [[`7c8b5e5e0e`](https://github.com/nodejs/node/commit/7c8b5e5e0e)] - **errors**: do not call resolve on URLs with schemes (bcoe) [#35903](https://github.com/nodejs/node/pull/35903) +* [[`1cdfaa80f8`](https://github.com/nodejs/node/commit/1cdfaa80f8)] - **events**: add a few tests (Benjamin Gruenbaum) [#35806](https://github.com/nodejs/node/pull/35806) +* [[`f08e2c0213`](https://github.com/nodejs/node/commit/f08e2c0213)] - **events**: make abort\_controller event trusted (Benjamin Gruenbaum) [#35811](https://github.com/nodejs/node/pull/35811) +* [[`438d9debfd`](https://github.com/nodejs/node/commit/438d9debfd)] - **events**: make eventTarget.removeAllListeners() return this (Luigi Pinca) [#35805](https://github.com/nodejs/node/pull/35805) +* [[`b6b7a3b86a`](https://github.com/nodejs/node/commit/b6b7a3b86a)] - **http**: lazy create IncomingMessage.headers (Robert Nagy) [#35281](https://github.com/nodejs/node/pull/35281) +* [[`86ed87b6b7`](https://github.com/nodejs/node/commit/86ed87b6b7)] - **http2**: fix reinjection check (Momtchil Momtchev) [#35678](https://github.com/nodejs/node/pull/35678) +* [[`5833007eb0`](https://github.com/nodejs/node/commit/5833007eb0)] - **http2**: reinject data received before http2 is attached (Momtchil Momtchev) [#35678](https://github.com/nodejs/node/pull/35678) +* [[`cfe61b8714`](https://github.com/nodejs/node/commit/cfe61b8714)] - **http2**: remove unsupported %.\* specifier (Momtchil Momtchev) [#35694](https://github.com/nodejs/node/pull/35694) +* [[`d2f574b5be`](https://github.com/nodejs/node/commit/d2f574b5be)] - **lib**: let abort\_controller target be EventTarget (Daijiro Wachi) [#35869](https://github.com/nodejs/node/pull/35869) +* [[`b1e531a70b`](https://github.com/nodejs/node/commit/b1e531a70b)] - **lib**: use primordials when calling methods of Error (Antoine du Hamel) [#35837](https://github.com/nodejs/node/pull/35837) +* [[`0f5a8c55c2`](https://github.com/nodejs/node/commit/0f5a8c55c2)] - **module**: runtime deprecate subpath folder mappings (Guy Bedford) [#35747](https://github.com/nodejs/node/pull/35747) +* [[`d16e2fa69a`](https://github.com/nodejs/node/commit/d16e2fa69a)] - **n-api**: napi\_make\_callback emit async init with resource of async\_context (legendecas) [#32930](https://github.com/nodejs/node/pull/32930) +* [[`0c17dbd201`](https://github.com/nodejs/node/commit/0c17dbd201)] - **n-api**: revert change to finalization (Michael Dawson) [#35777](https://github.com/nodejs/node/pull/35777) +* [[`fb7196434e`](https://github.com/nodejs/node/commit/fb7196434e)] - **src**: remove redundant OpenSSLBuffer (James M Snell) [#35663](https://github.com/nodejs/node/pull/35663) +* [[`c9225789d3`](https://github.com/nodejs/node/commit/c9225789d3)] - **src**: remove ERR prefix in WebCryptoKeyExportStatus (Daniel Bevenius) [#35639](https://github.com/nodejs/node/pull/35639) +* [[`4128eefcb3`](https://github.com/nodejs/node/commit/4128eefcb3)] - **src**: remove ignore GCC -Wcast-function-type for v8 (Daniel Bevenius) [#35768](https://github.com/nodejs/node/pull/35768) +* [[`4b8b5fee6a`](https://github.com/nodejs/node/commit/4b8b5fee6a)] - **src**: use MaybeLocal.ToLocal instead of IsEmpty (Daniel Bevenius) [#35716](https://github.com/nodejs/node/pull/35716) +* [[`01d7c46776`](https://github.com/nodejs/node/commit/01d7c46776)] - ***Revert*** "**src**: ignore GCC -Wcast-function-type for v8.h" (Daniel Bevenius) [#35758](https://github.com/nodejs/node/pull/35758) +* [[`2868f52a5c`](https://github.com/nodejs/node/commit/2868f52a5c)] - **stream**: fix regression on duplex end (Momtchil Momtchev) [#35941](https://github.com/nodejs/node/pull/35941) +* [[`70c41a830d`](https://github.com/nodejs/node/commit/70c41a830d)] - **stream**: remove redundant context from comments (Yash Ladha) [#35728](https://github.com/nodejs/node/pull/35728) +* [[`88eb6191e4`](https://github.com/nodejs/node/commit/88eb6191e4)] - **stream**: fix duplicate logic in stream destroy (Yash Ladha) [#35727](https://github.com/nodejs/node/pull/35727) +* [[`a41e3ebc3a`](https://github.com/nodejs/node/commit/a41e3ebc3a)] - **timers**: correct explanation in comment (Turner Jabbour) [#35437](https://github.com/nodejs/node/pull/35437) +* [[`ee15142fef`](https://github.com/nodejs/node/commit/ee15142fef)] - **tls**: allow reading data into a static buffer (Andrey Pechkurov) [#35753](https://github.com/nodejs/node/pull/35753) +* [[`102d7dfe02`](https://github.com/nodejs/node/commit/102d7dfe02)] - **zlib**: test BrotliCompress throws invalid arg value (raisinten) [#35830](https://github.com/nodejs/node/pull/35830) + +#### Documentation commits + +* [[`7937fbe3bc`](https://github.com/nodejs/node/commit/7937fbe3bc)] - **doc**: update tables in README files for linting changes (Rich Trott) [#35905](https://github.com/nodejs/node/pull/35905) +* [[`c5b94220c5`](https://github.com/nodejs/node/commit/c5b94220c5)] - **doc**: temporarily disable list-item-bullet-indent (Nick Schonning) [#35647](https://github.com/nodejs/node/pull/35647) +* [[`59b36af8d5`](https://github.com/nodejs/node/commit/59b36af8d5)] - **doc**: disable no-undefined-references workarounds (Nick Schonning) [#35647](https://github.com/nodejs/node/pull/35647) +* [[`eb55462a75`](https://github.com/nodejs/node/commit/eb55462a75)] - **doc**: adjust table alignment for remark v13 (Nick Schonning) [#35647](https://github.com/nodejs/node/pull/35647) +* [[`0ac4a6ab16`](https://github.com/nodejs/node/commit/0ac4a6ab16)] - **doc**: update crypto.createSecretKey history (Ben Turner) [#35874](https://github.com/nodejs/node/pull/35874) +* [[`4899998855`](https://github.com/nodejs/node/commit/4899998855)] - **doc**: move bnoordhuis to emeritus (Ben Noordhuis) [#35865](https://github.com/nodejs/node/pull/35865) +* [[`337bfcf614`](https://github.com/nodejs/node/commit/337bfcf614)] - **doc**: add on statement in the APIs docs (Pooja D.P) [#35610](https://github.com/nodejs/node/pull/35610) +* [[`9703219fdb`](https://github.com/nodejs/node/commit/9703219fdb)] - **doc**: fix a typo in CHANGELOG\_V15 (Takuya Noguchi) [#35804](https://github.com/nodejs/node/pull/35804) +* [[`c14889bcc1`](https://github.com/nodejs/node/commit/c14889bcc1)] - **doc**: move ronkorving to emeritus (Rich Trott) [#35828](https://github.com/nodejs/node/pull/35828) +* [[`8c2b17926c`](https://github.com/nodejs/node/commit/8c2b17926c)] - **doc**: recommend test-doc instead of lint-md (Antoine du Hamel) [#35708](https://github.com/nodejs/node/pull/35708) +* [[`0580258449`](https://github.com/nodejs/node/commit/0580258449)] - **doc**: fix reference to googletest test fixture (Tobias Nießen) [#35813](https://github.com/nodejs/node/pull/35813) +* [[`d291e3abd9`](https://github.com/nodejs/node/commit/d291e3abd9)] - **doc**: stabilize packages features (Myles Borins) [#35742](https://github.com/nodejs/node/pull/35742) +* [[`5e8d821b4c`](https://github.com/nodejs/node/commit/5e8d821b4c)] - **doc**: add conditional example for setBreakpoint() (Chris Opperwall) [#35823](https://github.com/nodejs/node/pull/35823) +* [[`8074f69f82`](https://github.com/nodejs/node/commit/8074f69f82)] - **doc**: make small improvements to REPL doc (Rich Trott) [#35808](https://github.com/nodejs/node/pull/35808) +* [[`4e76a3c106`](https://github.com/nodejs/node/commit/4e76a3c106)] - **doc**: update MessagePort documentation for EventTarget inheritance (Anna Henningsen) [#35839](https://github.com/nodejs/node/pull/35839) +* [[`3db4354cc8`](https://github.com/nodejs/node/commit/3db4354cc8)] - **doc**: use case-sensitive in the example (Pooja D.P) [#35624](https://github.com/nodejs/node/pull/35624) +* [[`b07f4a3f7a`](https://github.com/nodejs/node/commit/b07f4a3f7a)] - **doc**: consolidate and clarify breakOnSigInt text (Rich Trott) [#35787](https://github.com/nodejs/node/pull/35787) +* [[`c2e6a4b081`](https://github.com/nodejs/node/commit/c2e6a4b081)] - **doc**: fix \_construct example params order (Alejandro Oviedo) [#35790](https://github.com/nodejs/node/pull/35790) +* [[`6513a589fe`](https://github.com/nodejs/node/commit/6513a589fe)] - **doc**: add a subsystems header in pull-requests.md (Pooja D.P) [#35718](https://github.com/nodejs/node/pull/35718) +* [[`c365867c60`](https://github.com/nodejs/node/commit/c365867c60)] - **doc**: fix typo in BUILDING.md (raisinten) [#35807](https://github.com/nodejs/node/pull/35807) +* [[`6211ffd2f7`](https://github.com/nodejs/node/commit/6211ffd2f7)] - **doc**: add require statement in the example (Pooja D.P) [#35554](https://github.com/nodejs/node/pull/35554) +* [[`7b3743d8dd`](https://github.com/nodejs/node/commit/7b3743d8dd)] - **doc**: modified memory set statement set size (Pooja D.P) [#35517](https://github.com/nodejs/node/pull/35517) +* [[`afbe23d800`](https://github.com/nodejs/node/commit/afbe23d800)] - **doc**: use kbd element in readline doc prose (Rich Trott) [#35737](https://github.com/nodejs/node/pull/35737) +* [[`c0a4fac040`](https://github.com/nodejs/node/commit/c0a4fac040)] - **doc**: fix a typo in CHANGELOG\_V12 (Shubham Parihar) [#35786](https://github.com/nodejs/node/pull/35786) +* [[`0e9acf83f7`](https://github.com/nodejs/node/commit/0e9acf83f7)] - **doc**: fix header level in fs.md (ax1) [#35771](https://github.com/nodejs/node/pull/35771) +* [[`f49afb5e10`](https://github.com/nodejs/node/commit/f49afb5e10)] - **doc**: remove stability warning in v8 module doc (Rich Trott) [#35774](https://github.com/nodejs/node/pull/35774) +* [[`368ae952b2`](https://github.com/nodejs/node/commit/368ae952b2)] - **doc**: mark optional parameters in timers.md (Vse Mozhe Buty) [#35764](https://github.com/nodejs/node/pull/35764) +* [[`f6aa7c82c5`](https://github.com/nodejs/node/commit/f6aa7c82c5)] - **doc**: add a example code to API doc property (Pooja D.P) [#35738](https://github.com/nodejs/node/pull/35738) +* [[`55b7a6cea3`](https://github.com/nodejs/node/commit/55b7a6cea3)] - **doc**: document changes for `\*/promises` alias modules (ExE Boss) [#34002](https://github.com/nodejs/node/pull/34002) +* [[`4b7708a316`](https://github.com/nodejs/node/commit/4b7708a316)] - **doc**: update console.error example (Lee, Bonggi) [#34964](https://github.com/nodejs/node/pull/34964) +* [[`292b529dfa`](https://github.com/nodejs/node/commit/292b529dfa)] - **doc**: add missing link in Node.js 14 Changelog (Antoine du Hamel) [#35782](https://github.com/nodejs/node/pull/35782) +* [[`890b03ecd6`](https://github.com/nodejs/node/commit/890b03ecd6)] - **doc**: improve text for breakOnSigint (Rich Trott) [#35692](https://github.com/nodejs/node/pull/35692) +* [[`1892532ee8`](https://github.com/nodejs/node/commit/1892532ee8)] - **doc**: this prints replaced with this is printed (Pooja D.P) [#35515](https://github.com/nodejs/node/pull/35515) +* [[`6590f8cb4a`](https://github.com/nodejs/node/commit/6590f8cb4a)] - **doc**: update package.json field definitions (Myles Borins) [#35741](https://github.com/nodejs/node/pull/35741) +* [[`f269c6cbe2`](https://github.com/nodejs/node/commit/f269c6cbe2)] - **doc**: add Installing Node.js header in BUILDING.md (Pooja D.P) [#35710](https://github.com/nodejs/node/pull/35710) +* [[`05a888a8c3`](https://github.com/nodejs/node/commit/05a888a8c3)] - **doc,esm**: document experimental warning removal (Antoine du Hamel) [#35750](https://github.com/nodejs/node/pull/35750) +* [[`092c6c4f8f`](https://github.com/nodejs/node/commit/092c6c4f8f)] - **doc,test**: update v8 method doc and comment (Rich Trott) [#35795](https://github.com/nodejs/node/pull/35795) + +#### Other commits + +* [[`76ebae4c05`](https://github.com/nodejs/node/commit/76ebae4c05)] - **benchmark**: make the benchmark tool work with Node 10 (Joyee Cheung) [#35817](https://github.com/nodejs/node/pull/35817) +* [[`9b549c1691`](https://github.com/nodejs/node/commit/9b549c1691)] - **benchmark**: add startup benchmark for loading public modules (Joyee Cheung) [#35816](https://github.com/nodejs/node/pull/35816) +* [[`5d61e3db4b`](https://github.com/nodejs/node/commit/5d61e3db4b)] - **test**: add missing ref comments to parallel.status (Rich Trott) [#35896](https://github.com/nodejs/node/pull/35896) +* [[`231af88001`](https://github.com/nodejs/node/commit/231af88001)] - **test**: correct test-worker-eventlooputil (Gerhard Stoebich) [#35891](https://github.com/nodejs/node/pull/35891) +* [[`da612dfc20`](https://github.com/nodejs/node/commit/da612dfc20)] - **test**: integrate abort\_controller tests from wpt (Daijiro Wachi) [#35869](https://github.com/nodejs/node/pull/35869) +* [[`66ad4be2c1`](https://github.com/nodejs/node/commit/66ad4be2c1)] - **test**: add test to fs/promises setImmediate (tyankatsu) [#35852](https://github.com/nodejs/node/pull/35852) +* [[`830b789299`](https://github.com/nodejs/node/commit/830b789299)] - **test**: mark test-worker-eventlooputil flaky (Myles Borins) [#35886](https://github.com/nodejs/node/pull/35886) +* [[`7691b673dc`](https://github.com/nodejs/node/commit/7691b673dc)] - **test**: mark test-http2-respond-file-error-pipe-offset flaky (Myles Borins) [#35883](https://github.com/nodejs/node/pull/35883) +* [[`de3dcd7356`](https://github.com/nodejs/node/commit/de3dcd7356)] - **test**: fix reference to WPT testharness.js (Tobias Nießen) [#35814](https://github.com/nodejs/node/pull/35814) +* [[`8958af4aa0`](https://github.com/nodejs/node/commit/8958af4aa0)] - **test**: add onerror test cases to policy (Daijiro Wachi) [#35797](https://github.com/nodejs/node/pull/35797) +* [[`dd3cbb455a`](https://github.com/nodejs/node/commit/dd3cbb455a)] - **test**: add upstream test cases to encoding (Daijiro Wachi) [#35794](https://github.com/nodejs/node/pull/35794) +* [[`76991c039f`](https://github.com/nodejs/node/commit/76991c039f)] - **test**: add upstream test cases to urlsearchparam (Daijiro Wachi) [#35792](https://github.com/nodejs/node/pull/35792) +* [[`110ef8aa50`](https://github.com/nodejs/node/commit/110ef8aa50)] - **test**: refactor coverage logic (bcoe) [#35767](https://github.com/nodejs/node/pull/35767) +* [[`0c5e8ed651`](https://github.com/nodejs/node/commit/0c5e8ed651)] - **test**: add additional deprecation warning tests for rmdir recursive (Ian Sutherland) [#35683](https://github.com/nodejs/node/pull/35683) +* [[`11eca36e83`](https://github.com/nodejs/node/commit/11eca36e83)] - **test**: add windows and C++ coverage (Benjamin Coe) [#35670](https://github.com/nodejs/node/pull/35670) +* [[`fd027cd61a`](https://github.com/nodejs/node/commit/fd027cd61a)] - **tools**: bump remark-lint-preset-node to 2.0.0 (Rich Trott) [#35905](https://github.com/nodejs/node/pull/35905) +* [[`c09fdba786`](https://github.com/nodejs/node/commit/c09fdba786)] - **tools**: refloat 7 Node.js patches to cpplint.py (Rich Trott) [#35866](https://github.com/nodejs/node/pull/35866) +* [[`3955ccd305`](https://github.com/nodejs/node/commit/3955ccd305)] - **tools**: bump cpplint to 1.5.1 (Rich Trott) [#35866](https://github.com/nodejs/node/pull/35866) +* [[`a07d1af4ea`](https://github.com/nodejs/node/commit/a07d1af4ea)] - **tools**: update ESLint to 7.12.1 (cjihrig) [#35799](https://github.com/nodejs/node/pull/35799) +* [[`d20b318c58`](https://github.com/nodejs/node/commit/d20b318c58)] - **tools**: update ESLint to 7.12.0 (cjihrig) [#35799](https://github.com/nodejs/node/pull/35799) +* [[`31753ec8aa`](https://github.com/nodejs/node/commit/31753ec8aa)] - **tools**: add msvc /P output to .gitignore (Jiawen Geng) [#35735](https://github.com/nodejs/node/pull/35735) +* [[`afb3e24cb0`](https://github.com/nodejs/node/commit/afb3e24cb0)] - **tools**: add update-npm script (Myles Borins) [#35822](https://github.com/nodejs/node/pull/35822) +* [[`66da122d46`](https://github.com/nodejs/node/commit/66da122d46)] - **tools**: refloat 7 Node.js patches to cpplint.py (Rich Trott) [#35719](https://github.com/nodejs/node/pull/35719) +* [[`042d4dd71c`](https://github.com/nodejs/node/commit/042d4dd71c)] - **tools**: bump cpplint to 1.5.0 (Rich Trott) [#35719](https://github.com/nodejs/node/pull/35719) + + +## 2020-10-21, Version 15.0.1 (Current), @BethGriggs + +### Notable changes + +* **crypto**: fix regression on randomFillSync (James M Snell) [#35723](https://github.com/nodejs/node/pull/35723) + * This fixes issue https://github.com/nodejs/node/issues/35722. +* **deps**: upgrade npm to 7.0.3 (Ruy Adorno) [#35724](https://github.com/nodejs/node/pull/35724) +* **doc**: add release key for Danielle Adams (Danielle Adams) [#35545](https://github.com/nodejs/node/pull/35545) + +### Commits + +* [[`c509485c19`](https://github.com/nodejs/node/commit/c509485c19)] - **build**: use make functions instead of echo (Antoine du Hamel) [#35707](https://github.com/nodejs/node/pull/35707) +* [[`f5acc2d030`](https://github.com/nodejs/node/commit/f5acc2d030)] - **crypto**: fix regression on randomFillSync (James M Snell) [#35723](https://github.com/nodejs/node/pull/35723) +* [[`595c8df48d`](https://github.com/nodejs/node/commit/595c8df48d)] - **deps**: upgrade npm to 7.0.3 (Ruy Adorno) [#35724](https://github.com/nodejs/node/pull/35724) +* [[`69e7f20f2d`](https://github.com/nodejs/node/commit/69e7f20f2d)] - **deps**: V8: set correct V8 version patch number (Michaël Zasso) [#35732](https://github.com/nodejs/node/pull/35732) +* [[`b78294dc00`](https://github.com/nodejs/node/commit/b78294dc00)] - **doc**: use kbd element in readline doc (Rich Trott) [#35698](https://github.com/nodejs/node/pull/35698) +* [[`1efa87082b`](https://github.com/nodejs/node/commit/1efa87082b)] - **doc**: add release key for Danielle Adams (Danielle Adams) [#35545](https://github.com/nodejs/node/pull/35545) +* [[`6e91d644e3`](https://github.com/nodejs/node/commit/6e91d644e3)] - **doc**: use kbd element in os doc (Rich Trott) [#35656](https://github.com/nodejs/node/pull/35656) +* [[`5a48a7b6f8`](https://github.com/nodejs/node/commit/5a48a7b6f8)] - **doc**: add a statement in the documentation. (Pooja D.P) [#35585](https://github.com/nodejs/node/pull/35585) +* [[`6a7a61be7c`](https://github.com/nodejs/node/commit/6a7a61be7c)] - **src**: mark/pop OpenSSL errors in NewRootCertStore (Daniel Bevenius) [#35514](https://github.com/nodejs/node/pull/35514) +* [[`d54edece99`](https://github.com/nodejs/node/commit/d54edece99)] - **test**: refactor test-crypto-pbkdf2 (Tobias Nießen) [#35693](https://github.com/nodejs/node/pull/35693) + + +## 2020-10-20, Version 15.0.0 (Current), @BethGriggs + +### Notable Changes + +#### Deprecations and Removals + +* [[`a11788736a`](https://github.com/nodejs/node/commit/a11788736a)] - **(SEMVER-MAJOR)** **build**: remove --build-v8-with-gn configure option (Yang Guo) [#27576](https://github.com/nodejs/node/pull/27576) +* [[`89428c7a2d`](https://github.com/nodejs/node/commit/89428c7a2d)] - **(SEMVER-MAJOR)** **build**: drop support for VS2017 (Michaël Zasso) [#33694](https://github.com/nodejs/node/pull/33694) +* [[`c25cf34ac1`](https://github.com/nodejs/node/commit/c25cf34ac1)] - **(SEMVER-MAJOR)** **doc**: move DEP0018 to End-of-Life (Rich Trott) [#35316](https://github.com/nodejs/node/pull/35316) +* [[`2002d90abd`](https://github.com/nodejs/node/commit/2002d90abd)] - **(SEMVER-MAJOR)** **fs**: deprecation warning on recursive rmdir (Ian Sutherland) [#35562](https://github.com/nodejs/node/pull/35562) +* [[`eee522ac29`](https://github.com/nodejs/node/commit/eee522ac29)] - **(SEMVER-MAJOR)** **lib**: add EventTarget-related browser globals (Anna Henningsen) [#35496](https://github.com/nodejs/node/pull/35496) +* [[`41796ebd30`](https://github.com/nodejs/node/commit/41796ebd30)] - **(SEMVER-MAJOR)** **net**: remove long deprecated server.connections property (James M Snell) [#33647](https://github.com/nodejs/node/pull/33647) +* [[`a416692e93`](https://github.com/nodejs/node/commit/a416692e93)] - **(SEMVER-MAJOR)** **repl**: remove deprecated repl.memory function (Ruben Bridgewater) [#33286](https://github.com/nodejs/node/pull/33286) +* [[`f217b2dfb0`](https://github.com/nodejs/node/commit/f217b2dfb0)] - **(SEMVER-MAJOR)** **repl**: remove deprecated repl.turnOffEditorMode() function (Ruben Bridgewater) [#33286](https://github.com/nodejs/node/pull/33286) +* [[`a1bcad8dc0`](https://github.com/nodejs/node/commit/a1bcad8dc0)] - **(SEMVER-MAJOR)** **repl**: remove deprecated repl.parseREPLKeyword() function (Ruben Bridgewater) [#33286](https://github.com/nodejs/node/pull/33286) +* [[`4ace010b53`](https://github.com/nodejs/node/commit/4ace010b53)] - **(SEMVER-MAJOR)** **repl**: remove deprecated bufferedCommand property (Ruben Bridgewater) [#33286](https://github.com/nodejs/node/pull/33286) +* [[`37524307fe`](https://github.com/nodejs/node/commit/37524307fe)] - **(SEMVER-MAJOR)** **repl**: remove deprecated .rli (Ruben Bridgewater) [#33286](https://github.com/nodejs/node/pull/33286) +* [[`a85ce885bd`](https://github.com/nodejs/node/commit/a85ce885bd)] - **(SEMVER-MAJOR)** **src**: remove deprecated node debug command (James M Snell) [#33648](https://github.com/nodejs/node/pull/33648) +* [[`a8904e8eee`](https://github.com/nodejs/node/commit/a8904e8eee)] - **(SEMVER-MAJOR)** **timers**: introduce timers/promises (James M Snell) [#33950](https://github.com/nodejs/node/pull/33950) +* [[`1211b9a72f`](https://github.com/nodejs/node/commit/1211b9a72f)] - **(SEMVER-MAJOR)** **util**: change default value of `maxStringLength` to 10000 (unknown) [#32744](https://github.com/nodejs/node/pull/32744) +* [[`ca8f3ef2e5`](https://github.com/nodejs/node/commit/ca8f3ef2e5)] - **(SEMVER-MAJOR)** **wasi**: drop --experimental-wasm-bigint requirement (Colin Ihrig) [#35415](https://github.com/nodejs/node/pull/35415) + +#### npm 7 - [#35631](https://github.com/nodejs/node/pull/35631) + +Node.js 15 comes with a new major release of npm, npm 7. npm 7 comes with many new features - including npm workspaces and a new package-lock.json format. npm 7 also includes yarn.lock file support. One of the big changes in npm 7 is that peer dependencies are now installed by default. + +#### Throw On Unhandled Rejections - [#33021](https://github.com/nodejs/node/pull/33021) + +As of Node.js 15, the default mode for `unhandledRejection` is changed to `throw` (from `warn`). In `throw` mode, if an `unhandledRejection` hook is not set, the `unhandledRejection` is raised as an uncaught exception. Users that have an `unhandledRejection` hook should see no change in behavior, and it’s still possible to switch modes using the `--unhandled-rejections=mode` process flag. + +#### QUIC - [#32379](https://github.com/nodejs/node/pull/32379) + +Node.js 15 comes with experimental support QUIC, which can be enabled by compiling Node.js with the `--experimental-quic` configuration flag. The Node.js QUIC implementation is exposed by the core `net` module. + +#### V8 8.6 - [#35415](https://github.com/nodejs/node/pull/35415) + +The V8 JavaScript engine has been updated to V8 8.6 (V8 8.4 is the latest available in Node.js 14). Along with performance tweaks and improvements the V8 update also brings the following language features: +* `Promise.any()` (from V8 8.5) +* `AggregateError` (from V8 8.5) +* `String.prototype.replaceAll()` (from V8 8.5) +* Logical assignment operators `&&=`, `||=`, and `??=` (from V8 8.5) + +#### Other Notable Changes + +* [[`50228cf6ff`](https://github.com/nodejs/node/commit/50228cf6ff)] - **(SEMVER-MAJOR)** **assert**: add `assert/strict` alias module (ExE Boss) [#34001](https://github.com/nodejs/node/pull/34001) +* [[`039cd00a9a`](https://github.com/nodejs/node/commit/039cd00a9a)] - **(SEMVER-MAJOR)** **dns**: add dns/promises alias (shisama) [#32953](https://github.com/nodejs/node/pull/32953) +* [[`54b36e401d`](https://github.com/nodejs/node/commit/54b36e401d)] - **(SEMVER-MAJOR)** **fs**: reimplement read and write streams using stream.construct (Robert Nagy) [#29656](https://github.com/nodejs/node/pull/29656) +* [[`f5c0e282cc`](https://github.com/nodejs/node/commit/f5c0e282cc)] - **(SEMVER-MAJOR)** **http2**: allow Host in HTTP/2 requests (Alba Mendez) [#34664](https://github.com/nodejs/node/pull/34664) +* [[`eee522ac29`](https://github.com/nodejs/node/commit/eee522ac29)] - **(SEMVER-MAJOR)** **lib**: add EventTarget-related browser globals (Anna Henningsen) [#35496](https://github.com/nodejs/node/pull/35496) +* [[`a8b26d72c5`](https://github.com/nodejs/node/commit/a8b26d72c5)] - **(SEMVER-MAJOR)** **lib**: unflag AbortController (James M Snell) [#33527](https://github.com/nodejs/node/pull/33527) +* [[`74ca960aac`](https://github.com/nodejs/node/commit/74ca960aac)] - **(SEMVER-MAJOR)** **lib**: initial experimental AbortController implementation (James M Snell) [#33527](https://github.com/nodejs/node/pull/33527) +* [[`efefdd668d`](https://github.com/nodejs/node/commit/efefdd668d)] - **(SEMVER-MAJOR)** **net**: autoDestroy Socket (Robert Nagy) [#31806](https://github.com/nodejs/node/pull/31806) +* [[`0fb91acedf`](https://github.com/nodejs/node/commit/0fb91acedf)] - **(SEMVER-MAJOR)** **src**: disallow JS execution inside FreeEnvironment (Anna Henningsen) [#33874](https://github.com/nodejs/node/pull/33874) +* [[`21782277c2`](https://github.com/nodejs/node/commit/21782277c2)] - **(SEMVER-MAJOR)** **src**: use node:moduleName as builtin module filename (Michaël Zasso) [#35498](https://github.com/nodejs/node/pull/35498) +* [[`fb8cc72e73`](https://github.com/nodejs/node/commit/fb8cc72e73)] - **(SEMVER-MAJOR)** **stream**: construct (Robert Nagy) [#29656](https://github.com/nodejs/node/pull/29656) +* [[`705d888387`](https://github.com/nodejs/node/commit/705d888387)] - **(SEMVER-MAJOR)** **worker**: make MessageEvent class more Web-compatible (Anna Henningsen) [#35496](https://github.com/nodejs/node/pull/35496) + +### Semver-Major Commits + +* [[`50228cf6ff`](https://github.com/nodejs/node/commit/50228cf6ff)] - **(SEMVER-MAJOR)** **assert**: add `assert/strict` alias module (ExE Boss) [#34001](https://github.com/nodejs/node/pull/34001) +* [[`d701247165`](https://github.com/nodejs/node/commit/d701247165)] - **(SEMVER-MAJOR)** **build**: reset embedder string to "-node.0" (Michaël Zasso) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`a11788736a`](https://github.com/nodejs/node/commit/a11788736a)] - **(SEMVER-MAJOR)** **build**: remove --build-v8-with-gn configure option (Yang Guo) [#27576](https://github.com/nodejs/node/pull/27576) +* [[`89428c7a2d`](https://github.com/nodejs/node/commit/89428c7a2d)] - **(SEMVER-MAJOR)** **build**: drop support for VS2017 (Michaël Zasso) [#33694](https://github.com/nodejs/node/pull/33694) +* [[`dae283d96f`](https://github.com/nodejs/node/commit/dae283d96f)] - **(SEMVER-MAJOR)** **crypto**: refactoring internals, add WebCrypto (James M Snell) [#35093](https://github.com/nodejs/node/pull/35093) +* [[`ba77dc8597`](https://github.com/nodejs/node/commit/ba77dc8597)] - **(SEMVER-MAJOR)** **crypto**: move node\_crypto files to src/crypto (James M Snell) [#35093](https://github.com/nodejs/node/pull/35093) +* [[`9378070da0`](https://github.com/nodejs/node/commit/9378070da0)] - **(SEMVER-MAJOR)** **deps**: V8: cherry-pick d76abfed3512 (Michaël Zasso) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`efee8341ad`](https://github.com/nodejs/node/commit/efee8341ad)] - **(SEMVER-MAJOR)** **deps**: V8: cherry-pick 717543bbf0ef (Michaël Zasso) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`b006fa8730`](https://github.com/nodejs/node/commit/b006fa8730)] - **(SEMVER-MAJOR)** **deps**: V8: cherry-pick 6be2f6e26e8d (Michaël Zasso) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`3c23af4cb7`](https://github.com/nodejs/node/commit/3c23af4cb7)] - **(SEMVER-MAJOR)** **deps**: fix V8 build issue with inline methods (Jiawen Geng) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`b803b3f48b`](https://github.com/nodejs/node/commit/b803b3f48b)] - **(SEMVER-MAJOR)** **deps**: fix platform-embedded-file-writer-win for ARM64 (Michaël Zasso) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`47cb9f14e8`](https://github.com/nodejs/node/commit/47cb9f14e8)] - **(SEMVER-MAJOR)** **deps**: update V8 postmortem metadata script (Colin Ihrig) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`a1d639ba5d`](https://github.com/nodejs/node/commit/a1d639ba5d)] - **(SEMVER-MAJOR)** **deps**: update V8 to 8.6.395 (Michaël Zasso) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`3ddcad55fb`](https://github.com/nodejs/node/commit/3ddcad55fb)] - **(SEMVER-MAJOR)** **deps**: upgrade npm to 7.0.0 (Myles Borins) [#35631](https://github.com/nodejs/node/pull/35631) +* [[`2e54524955`](https://github.com/nodejs/node/commit/2e54524955)] - **(SEMVER-MAJOR)** **deps**: update npm to 7.0.0-rc.3 (Myles Borins) [#35474](https://github.com/nodejs/node/pull/35474) +* [[`e983b1cece`](https://github.com/nodejs/node/commit/e983b1cece)] - **(SEMVER-MAJOR)** **deps**: V8: cherry-pick 0d6debcc5f08 (Gus Caplan) [#33600](https://github.com/nodejs/node/pull/33600) +* [[`039cd00a9a`](https://github.com/nodejs/node/commit/039cd00a9a)] - **(SEMVER-MAJOR)** **dns**: add dns/promises alias (shisama) [#32953](https://github.com/nodejs/node/pull/32953) +* [[`c25cf34ac1`](https://github.com/nodejs/node/commit/c25cf34ac1)] - **(SEMVER-MAJOR)** **doc**: move DEP0018 to End-of-Life (Rich Trott) [#35316](https://github.com/nodejs/node/pull/35316) +* [[`8bf37ee496`](https://github.com/nodejs/node/commit/8bf37ee496)] - **(SEMVER-MAJOR)** **doc**: update support macos version for 15.x (Ash Cripps) [#35022](https://github.com/nodejs/node/pull/35022) +* [[`2002d90abd`](https://github.com/nodejs/node/commit/2002d90abd)] - **(SEMVER-MAJOR)** **fs**: deprecation warning on recursive rmdir (Ian Sutherland) [#35562](https://github.com/nodejs/node/pull/35562) +* [[`54b36e401d`](https://github.com/nodejs/node/commit/54b36e401d)] - **(SEMVER-MAJOR)** **fs**: reimplement read and write streams using stream.construct (Robert Nagy) [#29656](https://github.com/nodejs/node/pull/29656) +* [[`32b641e528`](https://github.com/nodejs/node/commit/32b641e528)] - **(SEMVER-MAJOR)** **http**: fixed socket.setEncoding fatal error (iskore) [#33405](https://github.com/nodejs/node/pull/33405) +* [[`8a6fab02ad`](https://github.com/nodejs/node/commit/8a6fab02ad)] - **(SEMVER-MAJOR)** **http**: emit 'error' on aborted server request (Robert Nagy) [#33172](https://github.com/nodejs/node/pull/33172) +* [[`d005f490a8`](https://github.com/nodejs/node/commit/d005f490a8)] - **(SEMVER-MAJOR)** **http**: cleanup end argument handling (Robert Nagy) [#31818](https://github.com/nodejs/node/pull/31818) +* [[`f5c0e282cc`](https://github.com/nodejs/node/commit/f5c0e282cc)] - **(SEMVER-MAJOR)** **http2**: allow Host in HTTP/2 requests (Alba Mendez) [#34664](https://github.com/nodejs/node/pull/34664) +* [[`1e4187fcf4`](https://github.com/nodejs/node/commit/1e4187fcf4)] - **(SEMVER-MAJOR)** **http2**: add `invalidheaders` test (Pranshu Srivastava) [#33161](https://github.com/nodejs/node/pull/33161) +* [[`d79c330186`](https://github.com/nodejs/node/commit/d79c330186)] - **(SEMVER-MAJOR)** **http2**: refactor state code validation for the http2Stream class (rickyes) [#33535](https://github.com/nodejs/node/pull/33535) +* [[`df31f71f1e`](https://github.com/nodejs/node/commit/df31f71f1e)] - **(SEMVER-MAJOR)** **http2**: header field valid checks (Pranshu Srivastava) [#33193](https://github.com/nodejs/node/pull/33193) +* [[`1428db8a1f`](https://github.com/nodejs/node/commit/1428db8a1f)] - **(SEMVER-MAJOR)** **lib**: refactor Socket.\_getpeername and Socket.\_getsockname (himself65) [#32969](https://github.com/nodejs/node/pull/32969) +* [[`eee522ac29`](https://github.com/nodejs/node/commit/eee522ac29)] - **(SEMVER-MAJOR)** **lib**: add EventTarget-related browser globals (Anna Henningsen) [#35496](https://github.com/nodejs/node/pull/35496) +* [[`c66e6471e7`](https://github.com/nodejs/node/commit/c66e6471e7)] - **(SEMVER-MAJOR)** **lib**: remove ERR\_INVALID\_OPT\_VALUE and ERR\_INVALID\_OPT\_VALUE\_ENCODING (Denys Otrishko) [#34682](https://github.com/nodejs/node/pull/34682) +* [[`b546a2b469`](https://github.com/nodejs/node/commit/b546a2b469)] - **(SEMVER-MAJOR)** **lib**: handle one of args case in ERR\_MISSING\_ARGS (Denys Otrishko) [#34022](https://github.com/nodejs/node/pull/34022) +* [[`a86a295fd7`](https://github.com/nodejs/node/commit/a86a295fd7)] - **(SEMVER-MAJOR)** **lib**: remove NodeError from the prototype of errors with code (Michaël Zasso) [#33857](https://github.com/nodejs/node/pull/33857) +* [[`a8b26d72c5`](https://github.com/nodejs/node/commit/a8b26d72c5)] - **(SEMVER-MAJOR)** **lib**: unflag AbortController (James M Snell) [#33527](https://github.com/nodejs/node/pull/33527) +* [[`74ca960aac`](https://github.com/nodejs/node/commit/74ca960aac)] - **(SEMVER-MAJOR)** **lib**: initial experimental AbortController implementation (James M Snell) [#33527](https://github.com/nodejs/node/pull/33527) +* [[`78ca61e2cf`](https://github.com/nodejs/node/commit/78ca61e2cf)] - **(SEMVER-MAJOR)** **net**: check args in net.connect() and socket.connect() calls (Denys Otrishko) [#34022](https://github.com/nodejs/node/pull/34022) +* [[`41796ebd30`](https://github.com/nodejs/node/commit/41796ebd30)] - **(SEMVER-MAJOR)** **net**: remove long deprecated server.connections property (James M Snell) [#33647](https://github.com/nodejs/node/pull/33647) +* [[`efefdd668d`](https://github.com/nodejs/node/commit/efefdd668d)] - **(SEMVER-MAJOR)** **net**: autoDestroy Socket (Robert Nagy) [#31806](https://github.com/nodejs/node/pull/31806) +* [[`6cfba9f7f6`](https://github.com/nodejs/node/commit/6cfba9f7f6)] - **(SEMVER-MAJOR)** **process**: update v8 fast api calls usage (Maya Lekova) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`3b10f7f933`](https://github.com/nodejs/node/commit/3b10f7f933)] - **(SEMVER-MAJOR)** **process**: change default --unhandled-rejections=throw (Dan Fabulich) [#33021](https://github.com/nodejs/node/pull/33021) +* [[`d8eef83757`](https://github.com/nodejs/node/commit/d8eef83757)] - **(SEMVER-MAJOR)** **process**: use v8 fast api calls for hrtime (Gus Caplan) [#33600](https://github.com/nodejs/node/pull/33600) +* [[`49745cdef0`](https://github.com/nodejs/node/commit/49745cdef0)] - **(SEMVER-MAJOR)** **process**: delay throwing an error using `throwDeprecation` (Ruben Bridgewater) [#32312](https://github.com/nodejs/node/pull/32312) +* [[`a416692e93`](https://github.com/nodejs/node/commit/a416692e93)] - **(SEMVER-MAJOR)** **repl**: remove deprecated repl.memory function (Ruben Bridgewater) [#33286](https://github.com/nodejs/node/pull/33286) +* [[`f217b2dfb0`](https://github.com/nodejs/node/commit/f217b2dfb0)] - **(SEMVER-MAJOR)** **repl**: remove deprecated repl.turnOffEditorMode() function (Ruben Bridgewater) [#33286](https://github.com/nodejs/node/pull/33286) +* [[`a1bcad8dc0`](https://github.com/nodejs/node/commit/a1bcad8dc0)] - **(SEMVER-MAJOR)** **repl**: remove deprecated repl.parseREPLKeyword() function (Ruben Bridgewater) [#33286](https://github.com/nodejs/node/pull/33286) +* [[`4ace010b53`](https://github.com/nodejs/node/commit/4ace010b53)] - **(SEMVER-MAJOR)** **repl**: remove deprecated bufferedCommand property (Ruben Bridgewater) [#33286](https://github.com/nodejs/node/pull/33286) +* [[`37524307fe`](https://github.com/nodejs/node/commit/37524307fe)] - **(SEMVER-MAJOR)** **repl**: remove deprecated .rli (Ruben Bridgewater) [#33286](https://github.com/nodejs/node/pull/33286) +* [[`b65e5aeaa7`](https://github.com/nodejs/node/commit/b65e5aeaa7)] - **(SEMVER-MAJOR)** **src**: implement NodePlatform::PostJob (Clemens Backes) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`b1e8e0e604`](https://github.com/nodejs/node/commit/b1e8e0e604)] - **(SEMVER-MAJOR)** **src**: update NODE\_MODULE\_VERSION to 88 (Michaël Zasso) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`eeb6b473fd`](https://github.com/nodejs/node/commit/eeb6b473fd)] - **(SEMVER-MAJOR)** **src**: error reporting on CPUUsage (Yash Ladha) [#34762](https://github.com/nodejs/node/pull/34762) +* [[`21782277c2`](https://github.com/nodejs/node/commit/21782277c2)] - **(SEMVER-MAJOR)** **src**: use node:moduleName as builtin module filename (Michaël Zasso) [#35498](https://github.com/nodejs/node/pull/35498) +* [[`05771279af`](https://github.com/nodejs/node/commit/05771279af)] - **(SEMVER-MAJOR)** **src**: enable wasm trap handler on windows (Gus Caplan) [#35033](https://github.com/nodejs/node/pull/35033) +* [[`b7cf823410`](https://github.com/nodejs/node/commit/b7cf823410)] - **(SEMVER-MAJOR)** **src**: update NODE\_MODULE\_VERSION to 86 (Michaël Zasso) [#33579](https://github.com/nodejs/node/pull/33579) +* [[`0fb91acedf`](https://github.com/nodejs/node/commit/0fb91acedf)] - **(SEMVER-MAJOR)** **src**: disallow JS execution inside FreeEnvironment (Anna Henningsen) [#33874](https://github.com/nodejs/node/pull/33874) +* [[`53fb2b6b41`](https://github.com/nodejs/node/commit/53fb2b6b41)] - **(SEMVER-MAJOR)** **src**: remove \_third\_party\_main support (Anna Henningsen) [#33971](https://github.com/nodejs/node/pull/33971) +* [[`a85ce885bd`](https://github.com/nodejs/node/commit/a85ce885bd)] - **(SEMVER-MAJOR)** **src**: remove deprecated node debug command (James M Snell) [#33648](https://github.com/nodejs/node/pull/33648) +* [[`ac3714637e`](https://github.com/nodejs/node/commit/ac3714637e)] - **(SEMVER-MAJOR)** **src**: remove unused CancelPendingDelayedTasks (Anna Henningsen) [#32859](https://github.com/nodejs/node/pull/32859) +* [[`a65218f5e8`](https://github.com/nodejs/node/commit/a65218f5e8)] - **(SEMVER-MAJOR)** **stream**: try to wait for flush to complete before 'finish' (Robert Nagy) [#34314](https://github.com/nodejs/node/pull/34314) +* [[`4e3f6f355b`](https://github.com/nodejs/node/commit/4e3f6f355b)] - **(SEMVER-MAJOR)** **stream**: cleanup and fix Readable.wrap (Robert Nagy) [#34204](https://github.com/nodejs/node/pull/34204) +* [[`527e2147af`](https://github.com/nodejs/node/commit/527e2147af)] - **(SEMVER-MAJOR)** **stream**: add promises version to utility functions (rickyes) [#33991](https://github.com/nodejs/node/pull/33991) +* [[`c7e55c6b72`](https://github.com/nodejs/node/commit/c7e55c6b72)] - **(SEMVER-MAJOR)** **stream**: fix writable.end callback behavior (Robert Nagy) [#34101](https://github.com/nodejs/node/pull/34101) +* [[`fb8cc72e73`](https://github.com/nodejs/node/commit/fb8cc72e73)] - **(SEMVER-MAJOR)** **stream**: construct (Robert Nagy) [#29656](https://github.com/nodejs/node/pull/29656) +* [[`4bc7025309`](https://github.com/nodejs/node/commit/4bc7025309)] - **(SEMVER-MAJOR)** **stream**: write should throw on unknown encoding (Robert Nagy) [#33075](https://github.com/nodejs/node/pull/33075) +* [[`ea87809bb6`](https://github.com/nodejs/node/commit/ea87809bb6)] - **(SEMVER-MAJOR)** **stream**: fix \_final and 'prefinish' timing (Robert Nagy) [#32780](https://github.com/nodejs/node/pull/32780) +* [[`0bd5595509`](https://github.com/nodejs/node/commit/0bd5595509)] - **(SEMVER-MAJOR)** **stream**: simplify Transform stream implementation (Robert Nagy) [#32763](https://github.com/nodejs/node/pull/32763) +* [[`8f86986985`](https://github.com/nodejs/node/commit/8f86986985)] - **(SEMVER-MAJOR)** **stream**: use callback to properly propagate error (Robert Nagy) [#29179](https://github.com/nodejs/node/pull/29179) +* [[`94dd7b9f94`](https://github.com/nodejs/node/commit/94dd7b9f94)] - **(SEMVER-MAJOR)** **test**: update tests after increasing typed array size to 4GB (Kim-Anh Tran) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`d9e98df01b`](https://github.com/nodejs/node/commit/d9e98df01b)] - **(SEMVER-MAJOR)** **test**: fix tests for npm 7.0.0 (Myles Borins) [#35631](https://github.com/nodejs/node/pull/35631) +* [[`c87641aa97`](https://github.com/nodejs/node/commit/c87641aa97)] - **(SEMVER-MAJOR)** **test**: fix test suite to work with npm 7 (Myles Borins) [#35474](https://github.com/nodejs/node/pull/35474) +* [[`eb9d7a437e`](https://github.com/nodejs/node/commit/eb9d7a437e)] - **(SEMVER-MAJOR)** **test**: update WPT harness and tests (Michaël Zasso) [#33770](https://github.com/nodejs/node/pull/33770) +* [[`a8904e8eee`](https://github.com/nodejs/node/commit/a8904e8eee)] - **(SEMVER-MAJOR)** **timers**: introduce timers/promises (James M Snell) [#33950](https://github.com/nodejs/node/pull/33950) +* [[`c55f661551`](https://github.com/nodejs/node/commit/c55f661551)] - **(SEMVER-MAJOR)** **tools**: disable x86 safe exception handlers in V8 (Michaël Zasso) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`80e8aec4a5`](https://github.com/nodejs/node/commit/80e8aec4a5)] - **(SEMVER-MAJOR)** **tools**: update V8 gypfiles for 8.6 (Ujjwal Sharma) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`faeb9607c6`](https://github.com/nodejs/node/commit/faeb9607c6)] - **(SEMVER-MAJOR)** **tools**: update V8 gypfiles for 8.5 (Ujjwal Sharma) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`bb62f4ad9e`](https://github.com/nodejs/node/commit/bb62f4ad9e)] - **(SEMVER-MAJOR)** **url**: file URL path normalization (Daijiro Wachi) [#35477](https://github.com/nodejs/node/pull/35477) +* [[`69ef4c2375`](https://github.com/nodejs/node/commit/69ef4c2375)] - **(SEMVER-MAJOR)** **url**: verify domain is not empty after "ToASCII" (Michaël Zasso) [#33770](https://github.com/nodejs/node/pull/33770) +* [[`4831278a16`](https://github.com/nodejs/node/commit/4831278a16)] - **(SEMVER-MAJOR)** **url**: remove U+0000 case in the fragment state (Michaël Zasso) [#33770](https://github.com/nodejs/node/pull/33770) +* [[`0d08d5ae7c`](https://github.com/nodejs/node/commit/0d08d5ae7c)] - **(SEMVER-MAJOR)** **url**: remove gopher from special schemes (Michaël Zasso) [#33325](https://github.com/nodejs/node/pull/33325) +* [[`9be51ee9a1`](https://github.com/nodejs/node/commit/9be51ee9a1)] - **(SEMVER-MAJOR)** **url**: forbid lt and gt in url host code point (Yash Ladha) [#33328](https://github.com/nodejs/node/pull/33328) +* [[`1211b9a72f`](https://github.com/nodejs/node/commit/1211b9a72f)] - **(SEMVER-MAJOR)** **util**: change default value of `maxStringLength` to 10000 (unknown) [#32744](https://github.com/nodejs/node/pull/32744) +* [[`ca8f3ef2e5`](https://github.com/nodejs/node/commit/ca8f3ef2e5)] - **(SEMVER-MAJOR)** **wasi**: drop --experimental-wasm-bigint requirement (Colin Ihrig) [#35415](https://github.com/nodejs/node/pull/35415) +* [[`abd8cdfc4e`](https://github.com/nodejs/node/commit/abd8cdfc4e)] - **(SEMVER-MAJOR)** **win, child_process**: sanitize env variables (Bartosz Sosnowski) [#35210](https://github.com/nodejs/node/pull/35210) +* [[`705d888387`](https://github.com/nodejs/node/commit/705d888387)] - **(SEMVER-MAJOR)** **worker**: make MessageEvent class more Web-compatible (Anna Henningsen) [#35496](https://github.com/nodejs/node/pull/35496) +* [[`7603c7e50c`](https://github.com/nodejs/node/commit/7603c7e50c)] - **(SEMVER-MAJOR)** **worker**: set trackUnmanagedFds to true by default (Anna Henningsen) [#34394](https://github.com/nodejs/node/pull/34394) +* [[`5ef5116311`](https://github.com/nodejs/node/commit/5ef5116311)] - **(SEMVER-MAJOR)** **worker**: rename error code to be more accurate (Anna Henningsen) [#33872](https://github.com/nodejs/node/pull/33872) + +### Semver-Minor Commits + +* [[`1d5fa88eb8`](https://github.com/nodejs/node/commit/1d5fa88eb8)] - **(SEMVER-MINOR)** **cli**: add --node-memory-debug option (Anna Henningsen) [#35537](https://github.com/nodejs/node/pull/35537) +* [[`095be6a01f`](https://github.com/nodejs/node/commit/095be6a01f)] - **(SEMVER-MINOR)** **crypto**: add getCipherInfo method (James M Snell) [#35368](https://github.com/nodejs/node/pull/35368) +* [[`df1023bb22`](https://github.com/nodejs/node/commit/df1023bb22)] - **(SEMVER-MINOR)** **events**: allow use of AbortController with on (James M Snell) [#34912](https://github.com/nodejs/node/pull/34912) +* [[`883fc779b6`](https://github.com/nodejs/node/commit/883fc779b6)] - **(SEMVER-MINOR)** **events**: allow use of AbortController with once (James M Snell) [#34911](https://github.com/nodejs/node/pull/34911) +* [[`e876c0c308`](https://github.com/nodejs/node/commit/e876c0c308)] - **(SEMVER-MINOR)** **http2**: add support for sensitive headers (Anna Henningsen) [#34145](https://github.com/nodejs/node/pull/34145) +* [[`6f34498148`](https://github.com/nodejs/node/commit/6f34498148)] - **(SEMVER-MINOR)** **net**: add support for resolving DNS CAA records (Danny Sonnenschein) [#35466](https://github.com/nodejs/node/pull/35466) +* [[`37a8179673`](https://github.com/nodejs/node/commit/37a8179673)] - **(SEMVER-MINOR)** **net**: make blocklist family case insensitive (James M Snell) [#34864](https://github.com/nodejs/node/pull/34864) +* [[`1f9b20b637`](https://github.com/nodejs/node/commit/1f9b20b637)] - **(SEMVER-MINOR)** **net**: introduce net.BlockList (James M Snell) [#34625](https://github.com/nodejs/node/pull/34625) +* [[`278d38f4cf`](https://github.com/nodejs/node/commit/278d38f4cf)] - **(SEMVER-MINOR)** **src**: add maybe versions of EmitExit and EmitBeforeExit (Anna Henningsen) [#35486](https://github.com/nodejs/node/pull/35486) +* [[`2310f679a1`](https://github.com/nodejs/node/commit/2310f679a1)] - **(SEMVER-MINOR)** **src**: move node\_binding to modern THROW\_ERR\* (James M Snell) [#35469](https://github.com/nodejs/node/pull/35469) +* [[`744a284ccc`](https://github.com/nodejs/node/commit/744a284ccc)] - **(SEMVER-MINOR)** **stream**: support async for stream impl functions (James M Snell) [#34416](https://github.com/nodejs/node/pull/34416) +* [[`bfbdc84738`](https://github.com/nodejs/node/commit/bfbdc84738)] - **(SEMVER-MINOR)** **timers**: allow promisified timeouts/immediates to be canceled (James M Snell) [#33833](https://github.com/nodejs/node/pull/33833) +* [[`a8971f87d3`](https://github.com/nodejs/node/commit/a8971f87d3)] - **(SEMVER-MINOR)** **url**: support non-special URLs (Daijiro Wachi) [#34925](https://github.com/nodejs/node/pull/34925) + +### Semver-Patch Commits + +* [[`d10c59fc60`](https://github.com/nodejs/node/commit/d10c59fc60)] - **benchmark,test**: remove output from readable-async-iterator benchmark (Rich Trott) [#34411](https://github.com/nodejs/node/pull/34411) +* [[`8a12e9994f`](https://github.com/nodejs/node/commit/8a12e9994f)] - **bootstrap**: use file URL instead of relative url (Daijiro Wachi) [#35622](https://github.com/nodejs/node/pull/35622) +* [[`f8bde7ce06`](https://github.com/nodejs/node/commit/f8bde7ce06)] - **bootstrap**: build fast APIs in pre-execution (Joyee Cheung) [#32984](https://github.com/nodejs/node/pull/32984) +* [[`b18651bcd2`](https://github.com/nodejs/node/commit/b18651bcd2)] - **build**: do not pass mode option to test-v8 command (Michaël Zasso) [#35705](https://github.com/nodejs/node/pull/35705) +* [[`bb2945ed6b`](https://github.com/nodejs/node/commit/bb2945ed6b)] - **build**: add GitHub Action for code coverage (Benjamin Coe) [#35653](https://github.com/nodejs/node/pull/35653) +* [[`cfbbeea4a1`](https://github.com/nodejs/node/commit/cfbbeea4a1)] - **build**: use GITHUB\_ENV file to set env variables (Michaël Zasso) [#35638](https://github.com/nodejs/node/pull/35638) +* [[`8a93b371a3`](https://github.com/nodejs/node/commit/8a93b371a3)] - **build**: do not install jq in workflows (Michaël Zasso) [#35638](https://github.com/nodejs/node/pull/35638) +* [[`ccbd1d5efa`](https://github.com/nodejs/node/commit/ccbd1d5efa)] - **build**: add quic to github action (gengjiawen) [#34336](https://github.com/nodejs/node/pull/34336) +* [[`f4f191bbc2`](https://github.com/nodejs/node/commit/f4f191bbc2)] - **build**: define NODE\_EXPERIMENTAL\_QUIC in mkcodecache and node\_mksnapshot (Joyee Cheung) [#34454](https://github.com/nodejs/node/pull/34454) +* [[`5b2c263ba8`](https://github.com/nodejs/node/commit/5b2c263ba8)] - **deps**: fix typo in zlib.gyp that break arm-fpu-neon build (lucasg) [#35659](https://github.com/nodejs/node/pull/35659) +* [[`5b9593f727`](https://github.com/nodejs/node/commit/5b9593f727)] - **deps**: upgrade npm to 7.0.2 (Myles Borins) [#35667](https://github.com/nodejs/node/pull/35667) +* [[`dabc6ddddc`](https://github.com/nodejs/node/commit/dabc6ddddc)] - **deps**: upgrade npm to 7.0.0-rc.4 (Myles Borins) [#35576](https://github.com/nodejs/node/pull/35576) +* [[`757bac6711`](https://github.com/nodejs/node/commit/757bac6711)] - **deps**: update nghttp3 (James M Snell) [#34752](https://github.com/nodejs/node/pull/34752) +* [[`c788be2e6e`](https://github.com/nodejs/node/commit/c788be2e6e)] - **deps**: update ngtcp2 (James M Snell) [#34752](https://github.com/nodejs/node/pull/34752) +* [[`7816e5f7b9`](https://github.com/nodejs/node/commit/7816e5f7b9)] - **deps**: fix indenting of sources in ngtcp2.gyp (James M Snell) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`f5343d1b40`](https://github.com/nodejs/node/commit/f5343d1b40)] - **deps**: re-enable OPENSSL\_NO\_QUIC guards (James M Snell) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`9de95f494e`](https://github.com/nodejs/node/commit/9de95f494e)] - **deps**: temporary fixup for ngtcp2 to build on windows (James M Snell) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`ec7ad1d0ec`](https://github.com/nodejs/node/commit/ec7ad1d0ec)] - **deps**: cherry-pick akamai/openssl/commit/bf4b08ecfbb7a26ca4b0b9ecaee3b31d18d7bda9 (Tatsuhiro Tsujikawa) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`c3d85b7637`](https://github.com/nodejs/node/commit/c3d85b7637)] - **deps**: cherry-pick akamai/openssl/commit/a5a08cb8050bb69120e833456e355f482e392456 (Benjamin Kaduk) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`bad1a150ea`](https://github.com/nodejs/node/commit/bad1a150ea)] - **deps**: cherry-pick akamai/openssl/commit/d5a13ca6e29f3ff85c731770ab0ee2f2487bf8b3 (Benjamin Kaduk) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`74cbfd3f36`](https://github.com/nodejs/node/commit/74cbfd3f36)] - **deps**: cherry-pick akamai/openssl/commit/a6282c566d88db11300c82abc3c84a4e2e9ea568 (Benjamin Kaduk) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`8a9763a8ea`](https://github.com/nodejs/node/commit/8a9763a8ea)] - **deps**: update nghttp3 (James M Snell) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`6b27d07779`](https://github.com/nodejs/node/commit/6b27d07779)] - **deps**: update ngtcp2 (James M Snell) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`a041723774`](https://github.com/nodejs/node/commit/a041723774)] - **deps**: fix indentation for sources in nghttp3.gyp (Daniel Bevenius) [#33942](https://github.com/nodejs/node/pull/33942) +* [[`a0cbd676e7`](https://github.com/nodejs/node/commit/a0cbd676e7)] - **deps**: add defines to nghttp3/ngtcp2 gyp configs (Daniel Bevenius) [#33942](https://github.com/nodejs/node/pull/33942) +* [[`bccb514936`](https://github.com/nodejs/node/commit/bccb514936)] - **deps**: maintaining ngtcp2 and nghttp3 (James M Snell) [#32379](https://github.com/nodejs/node/pull/32379) +* [[`834fa8f23f`](https://github.com/nodejs/node/commit/834fa8f23f)] - **deps**: add ngtcp2 and nghttp3 (James M Snell) [#32379](https://github.com/nodejs/node/pull/32379) +* [[`f96b981528`](https://github.com/nodejs/node/commit/f96b981528)] - **deps**: details for updating openssl quic support (James M Snell) [#32379](https://github.com/nodejs/node/pull/32379) +* [[`98c8498552`](https://github.com/nodejs/node/commit/98c8498552)] - **deps**: update archs files for OpenSSL-1.1.0 (James M Snell) [#32379](https://github.com/nodejs/node/pull/32379) +* [[`2c549e505e`](https://github.com/nodejs/node/commit/2c549e505e)] - **deps**: add support for BoringSSL QUIC APIs (Todd Short) [#32379](https://github.com/nodejs/node/pull/32379) +* [[`1103b15af6`](https://github.com/nodejs/node/commit/1103b15af6)] - **doc**: fix YAML lint error on master (Rich Trott) [#35709](https://github.com/nodejs/node/pull/35709) +* [[`7798e59e98`](https://github.com/nodejs/node/commit/7798e59e98)] - **doc**: upgrade stability status of report API (Gireesh Punathil) [#35654](https://github.com/nodejs/node/pull/35654) +* [[`ce03a182cf`](https://github.com/nodejs/node/commit/ce03a182cf)] - **doc**: clarify experimental API elements in vm.md (Rich Trott) [#35594](https://github.com/nodejs/node/pull/35594) +* [[`89defff3b9`](https://github.com/nodejs/node/commit/89defff3b9)] - **doc**: correct order of metadata for deprecation (Rich Trott) [#35668](https://github.com/nodejs/node/pull/35668) +* [[`ee85eb9f8a`](https://github.com/nodejs/node/commit/ee85eb9f8a)] - **doc**: importModuleDynamically gets Script, not Module (Simen Bekkhus) [#35593](https://github.com/nodejs/node/pull/35593) +* [[`9e5a27a9d3`](https://github.com/nodejs/node/commit/9e5a27a9d3)] - **doc**: fix EventEmitter examples (Sourav Shaw) [#33513](https://github.com/nodejs/node/pull/33513) +* [[`2c2c87e291`](https://github.com/nodejs/node/commit/2c2c87e291)] - **doc**: fix stability indicator in webcrypto doc (Rich Trott) [#35672](https://github.com/nodejs/node/pull/35672) +* [[`f59d4e05a2`](https://github.com/nodejs/node/commit/f59d4e05a2)] - **doc**: add example code for process.getgroups() (Pooja D.P) [#35625](https://github.com/nodejs/node/pull/35625) +* [[`8a3808dc37`](https://github.com/nodejs/node/commit/8a3808dc37)] - **doc**: use kbd element in tty doc (Rich Trott) [#35613](https://github.com/nodejs/node/pull/35613) +* [[`4079bfd462`](https://github.com/nodejs/node/commit/4079bfd462)] - **doc**: Remove reference to io.js (Hussaina Begum Nandyala) [#35618](https://github.com/nodejs/node/pull/35618) +* [[`e6d5af3c95`](https://github.com/nodejs/node/commit/e6d5af3c95)] - **doc**: fix typos in quic.md (Luigi Pinca) [#35444](https://github.com/nodejs/node/pull/35444) +* [[`524123fbf0`](https://github.com/nodejs/node/commit/524123fbf0)] - **doc**: update releaser in v12.18.4 changelog (Beth Griggs) [#35217](https://github.com/nodejs/node/pull/35217) +* [[`ccdd1bd82a`](https://github.com/nodejs/node/commit/ccdd1bd82a)] - **doc**: fix incorrectly marked Buffer in quic.md (Rich Trott) [#35075](https://github.com/nodejs/node/pull/35075) +* [[`cc754f2985`](https://github.com/nodejs/node/commit/cc754f2985)] - **doc**: make AbortSignal text consistent in events.md (Rich Trott) [#35005](https://github.com/nodejs/node/pull/35005) +* [[`f9c362ff6c`](https://github.com/nodejs/node/commit/f9c362ff6c)] - **doc**: revise AbortSignal text and example using events.once() (Rich Trott) [#35005](https://github.com/nodejs/node/pull/35005) +* [[`7aeff6b8c8`](https://github.com/nodejs/node/commit/7aeff6b8c8)] - **doc**: claim ABI version for Electron v12 (Shelley Vohr) [#34816](https://github.com/nodejs/node/pull/34816) +* [[`7a1220a1d7`](https://github.com/nodejs/node/commit/7a1220a1d7)] - **doc**: fix headings in quic.md (Anna Henningsen) [#34717](https://github.com/nodejs/node/pull/34717) +* [[`d5c7aec3cb`](https://github.com/nodejs/node/commit/d5c7aec3cb)] - **doc**: use \_can\_ to describe actions in quic.md (Rich Trott) [#34613](https://github.com/nodejs/node/pull/34613) +* [[`319c275b26`](https://github.com/nodejs/node/commit/319c275b26)] - **doc**: use \_can\_ to describe actions in quic.md (Rich Trott) [#34613](https://github.com/nodejs/node/pull/34613) +* [[`2c30920886`](https://github.com/nodejs/node/commit/2c30920886)] - **doc**: use sentence-case in quic.md headers (Rich Trott) [#34453](https://github.com/nodejs/node/pull/34453) +* [[`8ada27510d`](https://github.com/nodejs/node/commit/8ada27510d)] - **doc**: add missing backticks in timers.md (vsemozhetbyt) [#34030](https://github.com/nodejs/node/pull/34030) +* [[`862d005e60`](https://github.com/nodejs/node/commit/862d005e60)] - **doc**: make globals Extends usage consistent (Colin Ihrig) [#33777](https://github.com/nodejs/node/pull/33777) +* [[`85dbd17bde`](https://github.com/nodejs/node/commit/85dbd17bde)] - **doc**: make perf\_hooks Extends usage consistent (Colin Ihrig) [#33777](https://github.com/nodejs/node/pull/33777) +* [[`2e49010bc8`](https://github.com/nodejs/node/commit/2e49010bc8)] - **doc**: make events Extends usage consistent (Colin Ihrig) [#33777](https://github.com/nodejs/node/pull/33777) +* [[`680fb8fc62`](https://github.com/nodejs/node/commit/680fb8fc62)] - **doc**: fix deprecation "End-of-Life" capitalization (Colin Ihrig) [#33691](https://github.com/nodejs/node/pull/33691) +* [[`458677f5ef`](https://github.com/nodejs/node/commit/458677f5ef)] - **errors**: print original exception context (Benjamin Coe) [#33491](https://github.com/nodejs/node/pull/33491) +* [[`b1831fed3a`](https://github.com/nodejs/node/commit/b1831fed3a)] - **events**: simplify event target agnostic logic in on and once (Denys Otrishko) [#34997](https://github.com/nodejs/node/pull/34997) +* [[`7f25fe8b67`](https://github.com/nodejs/node/commit/7f25fe8b67)] - **fs**: remove unused assignment (Rich Trott) [#35642](https://github.com/nodejs/node/pull/35642) +* [[`2c4f30deea`](https://github.com/nodejs/node/commit/2c4f30deea)] - **fs**: fix when path is buffer on fs.symlinkSync (himself65) [#34540](https://github.com/nodejs/node/pull/34540) +* [[`db0e991d52`](https://github.com/nodejs/node/commit/db0e991d52)] - **fs**: remove custom Buffer pool for streams (Robert Nagy) [#33981](https://github.com/nodejs/node/pull/33981) +* [[`51a2df4439`](https://github.com/nodejs/node/commit/51a2df4439)] - **fs**: document why isPerformingIO is required (Robert Nagy) [#33982](https://github.com/nodejs/node/pull/33982) +* [[`999e7d7b44`](https://github.com/nodejs/node/commit/999e7d7b44)] - **gyp,build**: consistent shared library location (Rod Vagg) [#35635](https://github.com/nodejs/node/pull/35635) +* [[`30cc54275d`](https://github.com/nodejs/node/commit/30cc54275d)] - **http**: don't emit error after close (Robert Nagy) [#33654](https://github.com/nodejs/node/pull/33654) +* [[`ddff2b2b22`](https://github.com/nodejs/node/commit/ddff2b2b22)] - **lib**: honor setUncaughtExceptionCaptureCallback (Gireesh Punathil) [#35595](https://github.com/nodejs/node/pull/35595) +* [[`a8806535d9`](https://github.com/nodejs/node/commit/a8806535d9)] - **lib**: use Object static properties from primordials (Michaël Zasso) [#35380](https://github.com/nodejs/node/pull/35380) +* [[`11f1ad939f`](https://github.com/nodejs/node/commit/11f1ad939f)] - **module**: only try to enrich CJS syntax errors (Michaël Zasso) [#35691](https://github.com/nodejs/node/pull/35691) +* [[`aaf225a2a0`](https://github.com/nodejs/node/commit/aaf225a2a0)] - **module**: add setter for module.parent (Antoine du Hamel) [#35522](https://github.com/nodejs/node/pull/35522) +* [[`109a296e2a`](https://github.com/nodejs/node/commit/109a296e2a)] - **quic**: fix typo in code comment (Ikko Ashimine) [#35308](https://github.com/nodejs/node/pull/35308) +* [[`186230527b`](https://github.com/nodejs/node/commit/186230527b)] - **quic**: fix error message on invalid connection ID (Rich Trott) [#35026](https://github.com/nodejs/node/pull/35026) +* [[`e5116b304f`](https://github.com/nodejs/node/commit/e5116b304f)] - **quic**: remove unused function arguments (Rich Trott) [#35010](https://github.com/nodejs/node/pull/35010) +* [[`449f73e05f`](https://github.com/nodejs/node/commit/449f73e05f)] - **quic**: remove undefined variable (Rich Trott) [#35007](https://github.com/nodejs/node/pull/35007) +* [[`44e6a6af67`](https://github.com/nodejs/node/commit/44e6a6af67)] - **quic**: use qlog fin flag (James M Snell) [#34752](https://github.com/nodejs/node/pull/34752) +* [[`2a80737278`](https://github.com/nodejs/node/commit/2a80737278)] - **quic**: fixups after ngtcp2/nghttp3 update (James M Snell) [#34752](https://github.com/nodejs/node/pull/34752) +* [[`c855c3e8ca`](https://github.com/nodejs/node/commit/c855c3e8ca)] - **quic**: use net.BlockList for limiting access to a QuicSocket (James M Snell) [#34741](https://github.com/nodejs/node/pull/34741) +* [[`bfc35354c1`](https://github.com/nodejs/node/commit/bfc35354c1)] - **quic**: consolidate stats collecting in QuicSession (James M Snell) [#34741](https://github.com/nodejs/node/pull/34741) +* [[`94aa291348`](https://github.com/nodejs/node/commit/94aa291348)] - **quic**: clarify TODO statements (James M Snell) [#34741](https://github.com/nodejs/node/pull/34741) +* [[`19e712b9b2`](https://github.com/nodejs/node/commit/19e712b9b2)] - **quic**: resolve InitializeSecureContext TODO comment (James M Snell) [#34741](https://github.com/nodejs/node/pull/34741) +* [[`240592228b`](https://github.com/nodejs/node/commit/240592228b)] - **quic**: fixup session ticket app data todo comments (James M Snell) [#34741](https://github.com/nodejs/node/pull/34741) +* [[`c17eaa3f3f`](https://github.com/nodejs/node/commit/c17eaa3f3f)] - **quic**: add natRebinding argument to docs (James M Snell) [#34669](https://github.com/nodejs/node/pull/34669) +* [[`442968c92a`](https://github.com/nodejs/node/commit/442968c92a)] - **quic**: check setSocket natRebinding argument, extend test (James M Snell) [#34669](https://github.com/nodejs/node/pull/34669) +* [[`10d5047a4f`](https://github.com/nodejs/node/commit/10d5047a4f)] - **quic**: fixup set\_socket, fix skipped test (James M Snell) [#34669](https://github.com/nodejs/node/pull/34669) +* [[`344c5e4e50`](https://github.com/nodejs/node/commit/344c5e4e50)] - **quic**: limit push check to http/3 (James M Snell) [#34655](https://github.com/nodejs/node/pull/34655) +* [[`34165f03aa`](https://github.com/nodejs/node/commit/34165f03aa)] - **quic**: resolve some minor TODOs (James M Snell) [#34655](https://github.com/nodejs/node/pull/34655) +* [[`1e6e5c3ef3`](https://github.com/nodejs/node/commit/1e6e5c3ef3)] - **quic**: resolve minor TODO in QuicSocket (James M Snell) [#34655](https://github.com/nodejs/node/pull/34655) +* [[`ba5c64bf45`](https://github.com/nodejs/node/commit/ba5c64bf45)] - **quic**: use AbortController with correct name/message (Anna Henningsen) [#34763](https://github.com/nodejs/node/pull/34763) +* [[`a7477704c4`](https://github.com/nodejs/node/commit/a7477704c4)] - **quic**: prefer modernize-make-unique (gengjiawen) [#34692](https://github.com/nodejs/node/pull/34692) +* [[`5b6cd6fa1a`](https://github.com/nodejs/node/commit/5b6cd6fa1a)] - **quic**: use the SocketAddressLRU to track validation status (James M Snell) [#34618](https://github.com/nodejs/node/pull/34618) +* [[`f75e69a94b`](https://github.com/nodejs/node/commit/f75e69a94b)] - **quic**: use SocketAddressLRU to track known SocketAddress info (James M Snell) [#34618](https://github.com/nodejs/node/pull/34618) +* [[`6b0b33cd4c`](https://github.com/nodejs/node/commit/6b0b33cd4c)] - **quic**: cleanup some outstanding todo items (James M Snell) [#34618](https://github.com/nodejs/node/pull/34618) +* [[`6e65f26b73`](https://github.com/nodejs/node/commit/6e65f26b73)] - **quic**: use QuicCallbackScope consistently for QuicSession (James M Snell) [#34541](https://github.com/nodejs/node/pull/34541) +* [[`d96083bad5`](https://github.com/nodejs/node/commit/d96083bad5)] - **quic**: introduce QuicCallbackScope (James M Snell) [#34541](https://github.com/nodejs/node/pull/34541) +* [[`4b0275ab87`](https://github.com/nodejs/node/commit/4b0275ab87)] - **quic**: refactor clientHello (James M Snell) [#34541](https://github.com/nodejs/node/pull/34541) +* [[`a97b5f9c6a`](https://github.com/nodejs/node/commit/a97b5f9c6a)] - **quic**: use OpenSSL built-in cert and hostname validation (James M Snell) [#34533](https://github.com/nodejs/node/pull/34533) +* [[`7a5fbafe96`](https://github.com/nodejs/node/commit/7a5fbafe96)] - **quic**: fix build for macOS (gengjiawen) [#34336](https://github.com/nodejs/node/pull/34336) +* [[`1f94b89309`](https://github.com/nodejs/node/commit/1f94b89309)] - **quic**: refactor ocsp to use async function rather than event/callback (James M Snell) [#34498](https://github.com/nodejs/node/pull/34498) +* [[`06664298fa`](https://github.com/nodejs/node/commit/06664298fa)] - **quic**: remove no-longer relevant TODO statements (James M Snell) [#34498](https://github.com/nodejs/node/pull/34498) +* [[`2fb92f4cc6`](https://github.com/nodejs/node/commit/2fb92f4cc6)] - **quic**: remove extraneous unused debug property (James M Snell) [#34498](https://github.com/nodejs/node/pull/34498) +* [[`b06fe33de1`](https://github.com/nodejs/node/commit/b06fe33de1)] - **quic**: use async \_construct for QuicStream (James M Snell) [#34351](https://github.com/nodejs/node/pull/34351) +* [[`8bd61d4c38`](https://github.com/nodejs/node/commit/8bd61d4c38)] - **quic**: documentation updates (James M Snell) [#34351](https://github.com/nodejs/node/pull/34351) +* [[`086c916997`](https://github.com/nodejs/node/commit/086c916997)] - **quic**: extensive refactoring of QuicStream lifecycle (James M Snell) [#34351](https://github.com/nodejs/node/pull/34351) +* [[`cf28f8a7dd`](https://github.com/nodejs/node/commit/cf28f8a7dd)] - **quic**: gitignore qlog files (James M Snell) [#34351](https://github.com/nodejs/node/pull/34351) +* [[`83bf0d7e8c`](https://github.com/nodejs/node/commit/83bf0d7e8c)] - **quic**: remove unneeded quicstream.aborted and fixup docs (James M Snell) [#34351](https://github.com/nodejs/node/pull/34351) +* [[`a65296db2c`](https://github.com/nodejs/node/commit/a65296db2c)] - **quic**: remove stream pending code (James M Snell) [#34351](https://github.com/nodejs/node/pull/34351) +* [[`da20287e1a`](https://github.com/nodejs/node/commit/da20287e1a)] - **quic**: simplify QuicStream construction logic (James M Snell) [#34351](https://github.com/nodejs/node/pull/34351) +* [[`6e30fe7a7f`](https://github.com/nodejs/node/commit/6e30fe7a7f)] - **quic**: convert openStream to Promise (James M Snell) [#34351](https://github.com/nodejs/node/pull/34351) +* [[`89453cfc08`](https://github.com/nodejs/node/commit/89453cfc08)] - **quic**: fixup quic.md (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`4523d4a813`](https://github.com/nodejs/node/commit/4523d4a813)] - **quic**: fixup closing/draining period timing (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`ed4882241c`](https://github.com/nodejs/node/commit/ed4882241c)] - **quic**: properly pass readable/writable constructor options (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`57c1129508`](https://github.com/nodejs/node/commit/57c1129508)] - **quic**: implement QuicSession close as promise (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`8e5c5b16ab`](https://github.com/nodejs/node/commit/8e5c5b16ab)] - **quic**: cleanup QuicClientSession constructor (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`fe4e7e4598`](https://github.com/nodejs/node/commit/fe4e7e4598)] - **quic**: use promisified dns lookup (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`346aeaf874`](https://github.com/nodejs/node/commit/346aeaf874)] - **quic**: eliminate "ready"/"not ready" states for QuicSession (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`6665dda9f6`](https://github.com/nodejs/node/commit/6665dda9f6)] - **quic**: implement QuicSocket Promise API, part 2 (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`79c0e892dd`](https://github.com/nodejs/node/commit/79c0e892dd)] - **quic**: implement QuicSocket Promise API, part 1 (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`53b12f0c7b`](https://github.com/nodejs/node/commit/53b12f0c7b)] - **quic**: implement QuicEndpoint Promise API (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`16b32eae3e`](https://github.com/nodejs/node/commit/16b32eae3e)] - **quic**: handle unhandled rejections on QuicSession (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`e5d963e24d`](https://github.com/nodejs/node/commit/e5d963e24d)] - **quic**: fixup kEndpointClose (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`9f552df5b4`](https://github.com/nodejs/node/commit/9f552df5b4)] - **quic**: fix endpointClose error handling, document (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`b80108c033`](https://github.com/nodejs/node/commit/b80108c033)] - **quic**: restrict addEndpoint to before QuicSocket bind (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`81c01bbdba`](https://github.com/nodejs/node/commit/81c01bbdba)] - **quic**: use a getter for stream options (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`b8945ba2ab`](https://github.com/nodejs/node/commit/b8945ba2ab)] - **quic**: clarifying code comments (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`429ab1dce6`](https://github.com/nodejs/node/commit/429ab1dce6)] - **quic**: minor reduction in code duplication (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`aafdc2fcad`](https://github.com/nodejs/node/commit/aafdc2fcad)] - **quic**: replace ipv6Only option with `'udp6-only'` type (James M Snell) [#34283](https://github.com/nodejs/node/pull/34283) +* [[`fbc38ee134`](https://github.com/nodejs/node/commit/fbc38ee134)] - **quic**: clear clang warning (gengjiawen) [#34335](https://github.com/nodejs/node/pull/34335) +* [[`c176d5fac2`](https://github.com/nodejs/node/commit/c176d5fac2)] - **quic**: set destroyed at timestamps for duration calculation (James M Snell) [#34262](https://github.com/nodejs/node/pull/34262) +* [[`48a349efd9`](https://github.com/nodejs/node/commit/48a349efd9)] - **quic**: use Number instead of BigInt for more stats (James M Snell) [#34262](https://github.com/nodejs/node/pull/34262) +* [[`5e769b2eaf`](https://github.com/nodejs/node/commit/5e769b2eaf)] - **quic**: use less specific error codes (James M Snell) [#34262](https://github.com/nodejs/node/pull/34262) +* [[`26493c02a2`](https://github.com/nodejs/node/commit/26493c02a2)] - **quic**: remove no longer valid CHECK (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`458d243f20`](https://github.com/nodejs/node/commit/458d243f20)] - **quic**: proper custom inspect for QuicStream (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`0860b11655`](https://github.com/nodejs/node/commit/0860b11655)] - **quic**: proper custom inspect for QuicSession (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`b047930d76`](https://github.com/nodejs/node/commit/b047930d76)] - **quic**: proper custom inspect for QuicSocket (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`511f8c1138`](https://github.com/nodejs/node/commit/511f8c1138)] - **quic**: proper custom inspect for QuicEndpoint (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`fe11f6bf7c`](https://github.com/nodejs/node/commit/fe11f6bf7c)] - **quic**: cleanup QuicSocketFlags, used shared state struct (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`d08e99de24`](https://github.com/nodejs/node/commit/d08e99de24)] - **quic**: use getter/setter for stateless reset toggle (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`f2753c7695`](https://github.com/nodejs/node/commit/f2753c7695)] - **quic**: unref timers again (Anna Henningsen) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`71236097d0`](https://github.com/nodejs/node/commit/71236097d0)] - **quic**: use Number() instead of bigint for QuicSocket stats (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`94372b124a`](https://github.com/nodejs/node/commit/94372b124a)] - **quic**: refactor/improve/document QuicSocket listening event (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`afc9390ae5`](https://github.com/nodejs/node/commit/afc9390ae5)] - **quic**: refactor/improve QuicSocket ready event handling (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`e3813261b8`](https://github.com/nodejs/node/commit/e3813261b8)] - **quic**: add tests confirming error handling for QuicSocket close event (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`cc89aac5f7`](https://github.com/nodejs/node/commit/cc89aac5f7)] - **quic**: refactor/improve error handling for busy event (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`edc71ef008`](https://github.com/nodejs/node/commit/edc71ef008)] - **quic**: handle errors thrown / rejections in the session event (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`bcde849be9`](https://github.com/nodejs/node/commit/bcde849be9)] - **quic**: remove unnecessary bool conversion (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`c535131627`](https://github.com/nodejs/node/commit/c535131627)] - **quic**: additional minor cleanups in node\_quic\_session.h (James M Snell) [#34247](https://github.com/nodejs/node/pull/34247) +* [[`0f97d6066a`](https://github.com/nodejs/node/commit/0f97d6066a)] - **quic**: use TimerWrap for idle and retransmit timers (James M Snell) [#34186](https://github.com/nodejs/node/pull/34186) +* [[`1b1e985478`](https://github.com/nodejs/node/commit/1b1e985478)] - **quic**: add missing memory tracker fields (James M Snell) [#34160](https://github.com/nodejs/node/pull/34160) +* [[`5a87e9b0a5`](https://github.com/nodejs/node/commit/5a87e9b0a5)] - **quic**: cleanup timers if they haven't been already (James M Snell) [#34160](https://github.com/nodejs/node/pull/34160) +* [[`3837d9cf1f`](https://github.com/nodejs/node/commit/3837d9cf1f)] - **quic**: fixup lint issues (James M Snell) [#34160](https://github.com/nodejs/node/pull/34160) +* [[`7b062ca015`](https://github.com/nodejs/node/commit/7b062ca015)] - **quic**: refactor qlog handling (James M Snell) [#34160](https://github.com/nodejs/node/pull/34160) +* [[`e4d369e96e`](https://github.com/nodejs/node/commit/e4d369e96e)] - **quic**: remove onSessionDestroy callback (James M Snell) [#34160](https://github.com/nodejs/node/pull/34160) +* [[`3acdd6aac7`](https://github.com/nodejs/node/commit/3acdd6aac7)] - **quic**: refactor QuicSession shared state to use AliasedStruct (James M Snell) [#34160](https://github.com/nodejs/node/pull/34160) +* [[`f9c2245fb5`](https://github.com/nodejs/node/commit/f9c2245fb5)] - **quic**: refactor QuicSession close/destroy flow (James M Snell) [#34160](https://github.com/nodejs/node/pull/34160) +* [[`f7510ca439`](https://github.com/nodejs/node/commit/f7510ca439)] - **quic**: additional cleanups on the c++ side (James M Snell) [#34160](https://github.com/nodejs/node/pull/34160) +* [[`b5bf5bb20f`](https://github.com/nodejs/node/commit/b5bf5bb20f)] - **quic**: refactor native object flags for better readability (James M Snell) [#34160](https://github.com/nodejs/node/pull/34160) +* [[`b1750a4d53`](https://github.com/nodejs/node/commit/b1750a4d53)] - **quic**: continued refactoring for quic\_stream/quic\_session (James M Snell) [#34160](https://github.com/nodejs/node/pull/34160) +* [[`31d6d9d0f7`](https://github.com/nodejs/node/commit/31d6d9d0f7)] - **quic**: reduce duplication of code (James M Snell) [#34137](https://github.com/nodejs/node/pull/34137) +* [[`b5fe31ef19`](https://github.com/nodejs/node/commit/b5fe31ef19)] - **quic**: avoid using private JS fields for now (James M Snell) [#34137](https://github.com/nodejs/node/pull/34137) +* [[`2afc1abd05`](https://github.com/nodejs/node/commit/2afc1abd05)] - **quic**: fixup constant exports, export all protocol error codes (James M Snell) [#34137](https://github.com/nodejs/node/pull/34137) +* [[`b1fab88ff0`](https://github.com/nodejs/node/commit/b1fab88ff0)] - **quic**: remove unused callback function (James M Snell) [#34137](https://github.com/nodejs/node/pull/34137) +* [[`3bae2d5073`](https://github.com/nodejs/node/commit/3bae2d5073)] - **quic**: consolidate onSessionClose and onSessionSilentClose (James M Snell) [#34137](https://github.com/nodejs/node/pull/34137) +* [[`def8e76999`](https://github.com/nodejs/node/commit/def8e76999)] - **quic**: fixup set\_final\_size (James M Snell) [#34137](https://github.com/nodejs/node/pull/34137) +* [[`d6034186d6`](https://github.com/nodejs/node/commit/d6034186d6)] - **quic**: cleanups for QuicSocket (James M Snell) [#34137](https://github.com/nodejs/node/pull/34137) +* [[`73a51bb9dc`](https://github.com/nodejs/node/commit/73a51bb9dc)] - **quic**: cleanups in JS API (James M Snell) [#34137](https://github.com/nodejs/node/pull/34137) +* [[`204f20f2d1`](https://github.com/nodejs/node/commit/204f20f2d1)] - **quic**: minor cleanups in quic\_buffer (James M Snell) [#34087](https://github.com/nodejs/node/pull/34087) +* [[`68634d2592`](https://github.com/nodejs/node/commit/68634d2592)] - **quic**: remove redundant cast (gengjiawen) [#34086](https://github.com/nodejs/node/pull/34086) +* [[`213cac0b94`](https://github.com/nodejs/node/commit/213cac0b94)] - **quic**: temporarily skip quic-ipv6only test (James M Snell) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`99f7c4bb5e`](https://github.com/nodejs/node/commit/99f7c4bb5e)] - **quic**: possibly resolve flaky assertion failure in ipv6only test (James M Snell) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`2a5922e483`](https://github.com/nodejs/node/commit/2a5922e483)] - **quic**: temporarily disable packetloss tests (James M Snell) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`86e67aaa69`](https://github.com/nodejs/node/commit/86e67aaa69)] - **quic**: updates to implement for h3-29 (James M Snell) [#34033](https://github.com/nodejs/node/pull/34033) +* [[`adf14e2617`](https://github.com/nodejs/node/commit/adf14e2617)] - **quic**: fix lint error in node\_quic\_crypto (Daniel Bevenius) [#34019](https://github.com/nodejs/node/pull/34019) +* [[`9f2e00fb99`](https://github.com/nodejs/node/commit/9f2e00fb99)] - **quic**: temporarily disable preferred address tests (James M Snell) [#33934](https://github.com/nodejs/node/pull/33934) +* [[`0e7c8bdc0c`](https://github.com/nodejs/node/commit/0e7c8bdc0c)] - **quic**: return 0 from SSL\_CTX\_sess\_set\_new\_cb callback (Anna Henningsen) [#33931](https://github.com/nodejs/node/pull/33931) +* [[`c7d859e756`](https://github.com/nodejs/node/commit/c7d859e756)] - **quic**: refactor and improve ipv6Only (James M Snell) [#33935](https://github.com/nodejs/node/pull/33935) +* [[`1b7434dfc0`](https://github.com/nodejs/node/commit/1b7434dfc0)] - **quic**: set up FunctionTemplates more cleanly (Anna Henningsen) [#33968](https://github.com/nodejs/node/pull/33968) +* [[`8ef86a920c`](https://github.com/nodejs/node/commit/8ef86a920c)] - **quic**: fix clang warning (gengjiawen) [#33963](https://github.com/nodejs/node/pull/33963) +* [[`013cd1ac6f`](https://github.com/nodejs/node/commit/013cd1ac6f)] - **quic**: use Check instead of FromJust in node\_quic.cc (Daniel Bevenius) [#33937](https://github.com/nodejs/node/pull/33937) +* [[`09330fc155`](https://github.com/nodejs/node/commit/09330fc155)] - **quic**: fix clang-tidy performance-faster-string-find issue (gengjiawen) [#33975](https://github.com/nodejs/node/pull/33975) +* [[`9743624c0b`](https://github.com/nodejs/node/commit/9743624c0b)] - **quic**: fix typo in comments (gengjiawen) [#33975](https://github.com/nodejs/node/pull/33975) +* [[`88ef15812c`](https://github.com/nodejs/node/commit/88ef15812c)] - **quic**: remove unused string include http3\_application (Daniel Bevenius) [#33926](https://github.com/nodejs/node/pull/33926) +* [[`1bd88a3ac6`](https://github.com/nodejs/node/commit/1bd88a3ac6)] - **quic**: fix up node\_quic\_stream includes (Daniel Bevenius) [#33921](https://github.com/nodejs/node/pull/33921) +* [[`d7d79f2163`](https://github.com/nodejs/node/commit/d7d79f2163)] - **quic**: avoid memory fragmentation issue (James M Snell) [#33912](https://github.com/nodejs/node/pull/33912) +* [[`16116f5f5f`](https://github.com/nodejs/node/commit/16116f5f5f)] - **quic**: remove noop code (Robert Nagy) [#33914](https://github.com/nodejs/node/pull/33914) +* [[`272b46e04d`](https://github.com/nodejs/node/commit/272b46e04d)] - **quic**: skip test-quic-preferred-address-ipv6.js when no ipv6 (James M Snell) [#33919](https://github.com/nodejs/node/pull/33919) +* [[`4b70f95d64`](https://github.com/nodejs/node/commit/4b70f95d64)] - **quic**: use Check instead of FromJust in QuicStream (Daniel Bevenius) [#33909](https://github.com/nodejs/node/pull/33909) +* [[`133a97f60d`](https://github.com/nodejs/node/commit/133a97f60d)] - **quic**: always copy stateless reset token (Anna Henningsen) [#33917](https://github.com/nodejs/node/pull/33917) +* [[`14d012ef96`](https://github.com/nodejs/node/commit/14d012ef96)] - **quic**: fix minor linting issue (James M Snell) [#33913](https://github.com/nodejs/node/pull/33913) +* [[`55360443ce`](https://github.com/nodejs/node/commit/55360443ce)] - **quic**: initial QUIC implementation (James M Snell) [#32379](https://github.com/nodejs/node/pull/32379) +* [[`a12a2d892f`](https://github.com/nodejs/node/commit/a12a2d892f)] - **repl**: update deprecation codes (Antoine du HAMEL) [#33430](https://github.com/nodejs/node/pull/33430) +* [[`2b3acc44f0`](https://github.com/nodejs/node/commit/2b3acc44f0)] - **src**: large pages support in illumos/solaris systems (David Carlier) [#34320](https://github.com/nodejs/node/pull/34320) +* [[`84a7880749`](https://github.com/nodejs/node/commit/84a7880749)] - **src**: minor cleanup and simplification of crypto::Hash (James M Snell) [#35651](https://github.com/nodejs/node/pull/35651) +* [[`bfc906906f`](https://github.com/nodejs/node/commit/bfc906906f)] - **src**: combine TLSWrap/SSLWrap (James M Snell) [#35552](https://github.com/nodejs/node/pull/35552) +* [[`9fd6122659`](https://github.com/nodejs/node/commit/9fd6122659)] - **src**: add embedding helpers to reduce boilerplate code (Anna Henningsen) [#35597](https://github.com/nodejs/node/pull/35597) +* [[`f7ed5f4ae3`](https://github.com/nodejs/node/commit/f7ed5f4ae3)] - **src**: remove toLocalChecked in crypto\_context (James M Snell) [#35509](https://github.com/nodejs/node/pull/35509) +* [[`17d5d94921`](https://github.com/nodejs/node/commit/17d5d94921)] - **src**: replace more toLocalCheckeds in crypto\_\* (James M Snell) [#35509](https://github.com/nodejs/node/pull/35509) +* [[`83eaaf9731`](https://github.com/nodejs/node/commit/83eaaf9731)] - **src**: remove unused AsyncWrapObject (James M Snell) [#35511](https://github.com/nodejs/node/pull/35511) +* [[`ee5f849fda`](https://github.com/nodejs/node/commit/ee5f849fda)] - **src**: fix compiler warning in env.cc (Anna Henningsen) [#35547](https://github.com/nodejs/node/pull/35547) +* [[`40364b181d`](https://github.com/nodejs/node/commit/40364b181d)] - **src**: add check against non-weak BaseObjects at process exit (Anna Henningsen) [#35490](https://github.com/nodejs/node/pull/35490) +* [[`bc0c094b74`](https://github.com/nodejs/node/commit/bc0c094b74)] - **src**: unset NODE\_VERSION\_IS\_RELEASE from master (Antoine du Hamel) [#35531](https://github.com/nodejs/node/pull/35531) +* [[`fdf0a84e82`](https://github.com/nodejs/node/commit/fdf0a84e82)] - **src**: move all base64.h inline methods into -inl.h header file (Anna Henningsen) [#35432](https://github.com/nodejs/node/pull/35432) +* [[`ff4cf817a3`](https://github.com/nodejs/node/commit/ff4cf817a3)] - **src**: create helper for reading Uint32BE (Juan José Arboleda) [#34944](https://github.com/nodejs/node/pull/34944) +* [[`c6e1edcc28`](https://github.com/nodejs/node/commit/c6e1edcc28)] - **src**: add Update(const sockaddr\*) variant (James M Snell) [#34752](https://github.com/nodejs/node/pull/34752) +* [[`1c14810edc`](https://github.com/nodejs/node/commit/1c14810edc)] - **src**: allow instances of net.BlockList to be created internally (James M Snell) [#34741](https://github.com/nodejs/node/pull/34741) +* [[`6d1f0aed52`](https://github.com/nodejs/node/commit/6d1f0aed52)] - **src**: add SocketAddressLRU Utility (James M Snell) [#34618](https://github.com/nodejs/node/pull/34618) +* [[`feb93c4e84`](https://github.com/nodejs/node/commit/feb93c4e84)] - **src**: guard against nullptr deref in TimerWrapHandle::Stop (Anna Henningsen) [#34460](https://github.com/nodejs/node/pull/34460) +* [[`7a447bcd54`](https://github.com/nodejs/node/commit/7a447bcd54)] - **src**: snapshot node (Joyee Cheung) [#32984](https://github.com/nodejs/node/pull/32984) +* [[`c943cb4809`](https://github.com/nodejs/node/commit/c943cb4809)] - **src**: reset zero fill toggle at pre-execution (Joyee Cheung) [#32984](https://github.com/nodejs/node/pull/32984) +* [[`0b8ae5f2cd`](https://github.com/nodejs/node/commit/0b8ae5f2cd)] - **src**: snapshot loaders (Joyee Cheung) [#32984](https://github.com/nodejs/node/pull/32984) +* [[`7ecb285842`](https://github.com/nodejs/node/commit/7ecb285842)] - **src**: make code cache test work with snapshots (Joyee Cheung) [#32984](https://github.com/nodejs/node/pull/32984) +* [[`1faf6f459f`](https://github.com/nodejs/node/commit/1faf6f459f)] - **src**: snapshot Environment upon instantiation (Joyee Cheung) [#32984](https://github.com/nodejs/node/pull/32984) +* [[`ef9964f4c1`](https://github.com/nodejs/node/commit/ef9964f4c1)] - **src**: add an ExternalReferenceRegistry class (Joyee Cheung) [#32984](https://github.com/nodejs/node/pull/32984) +* [[`404302fff5`](https://github.com/nodejs/node/commit/404302fff5)] - **src**: split the main context initialization from Environment ctor (Joyee Cheung) [#32984](https://github.com/nodejs/node/pull/32984) +* [[`874460a1d1`](https://github.com/nodejs/node/commit/874460a1d1)] - **src**: refactor TimerWrap lifetime management (Anna Henningsen) [#34252](https://github.com/nodejs/node/pull/34252) +* [[`e2f9dc6e5a`](https://github.com/nodejs/node/commit/e2f9dc6e5a)] - **src**: remove user\_data from TimerWrap (Anna Henningsen) [#34252](https://github.com/nodejs/node/pull/34252) +* [[`e19a251824`](https://github.com/nodejs/node/commit/e19a251824)] - **src**: replace InspectorTimer with TimerWrap utility (James M Snell) [#34186](https://github.com/nodejs/node/pull/34186) +* [[`d4f69002b4`](https://github.com/nodejs/node/commit/d4f69002b4)] - **src**: add TimerWrap utility (James M Snell) [#34186](https://github.com/nodejs/node/pull/34186) +* [[`52de4cb107`](https://github.com/nodejs/node/commit/52de4cb107)] - **src**: minor updates to FastHrtime (Anna Henningsen) [#33851](https://github.com/nodejs/node/pull/33851) +* [[`4678e44bb2`](https://github.com/nodejs/node/commit/4678e44bb2)] - **src**: perform bounds checking on error source line (Anna Henningsen) [#33645](https://github.com/nodejs/node/pull/33645) +* [[`7232c2a160`](https://github.com/nodejs/node/commit/7232c2a160)] - **src**: use getauxval in node\_main.cc (Daniel Bevenius) [#33693](https://github.com/nodejs/node/pull/33693) +* [[`6be80e1893`](https://github.com/nodejs/node/commit/6be80e1893)] - **stream**: fix legacy pipe error handling (Robert Nagy) [#35257](https://github.com/nodejs/node/pull/35257) +* [[`2b9003b165`](https://github.com/nodejs/node/commit/2b9003b165)] - **stream**: don't destroy on async iterator success (Robert Nagy) [#35122](https://github.com/nodejs/node/pull/35122) +* [[`9c62e0e384`](https://github.com/nodejs/node/commit/9c62e0e384)] - **stream**: move to internal/streams (Matteo Collina) [#35239](https://github.com/nodejs/node/pull/35239) +* [[`e0d3b758a0`](https://github.com/nodejs/node/commit/e0d3b758a0)] - **stream**: improve Writable.destroy performance (Robert Nagy) [#35067](https://github.com/nodejs/node/pull/35067) +* [[`02c4869bee`](https://github.com/nodejs/node/commit/02c4869bee)] - **stream**: fix Duplex.\_construct race (Robert Nagy) [#34456](https://github.com/nodejs/node/pull/34456) +* [[`5aeaff6499`](https://github.com/nodejs/node/commit/5aeaff6499)] - **stream**: refactor lazyLoadPromises (rickyes) [#34354](https://github.com/nodejs/node/pull/34354) +* [[`a55b77d2d3`](https://github.com/nodejs/node/commit/a55b77d2d3)] - **stream**: finished on closed OutgoingMessage (Robert Nagy) [#34313](https://github.com/nodejs/node/pull/34313) +* [[`e10e292c5e`](https://github.com/nodejs/node/commit/e10e292c5e)] - **stream**: remove unused \_transformState (Robert Nagy) [#33105](https://github.com/nodejs/node/pull/33105) +* [[`f5c11a1a0a`](https://github.com/nodejs/node/commit/f5c11a1a0a)] - **stream**: don't emit finish after close (Robert Nagy) [#32933](https://github.com/nodejs/node/pull/32933) +* [[`089d654dd8`](https://github.com/nodejs/node/commit/089d654dd8)] - **test**: fix addons/dlopen-ping-pong for npm 7.0.1 (Myles Borins) [#35667](https://github.com/nodejs/node/pull/35667) +* [[`9ce5a03148`](https://github.com/nodejs/node/commit/9ce5a03148)] - **test**: add test for listen callback runtime binding (H Adinarayana) [#35657](https://github.com/nodejs/node/pull/35657) +* [[`a3731309cc`](https://github.com/nodejs/node/commit/a3731309cc)] - **test**: refactor test-https-host-headers (himself65) [#32805](https://github.com/nodejs/node/pull/32805) +* [[`30fb4a015d`](https://github.com/nodejs/node/commit/30fb4a015d)] - **test**: add common.mustSucceed (Tobias Nießen) [#35086](https://github.com/nodejs/node/pull/35086) +* [[`c143266b55`](https://github.com/nodejs/node/commit/c143266b55)] - **test**: add a few uncovered url tests from wpt (Daijiro Wachi) [#35636](https://github.com/nodejs/node/pull/35636) +* [[`6751b6dc3d`](https://github.com/nodejs/node/commit/6751b6dc3d)] - **test**: check for AbortController existence (James M Snell) [#35616](https://github.com/nodejs/node/pull/35616) +* [[`9f2e19fa30`](https://github.com/nodejs/node/commit/9f2e19fa30)] - **test**: update url test for win (Daijiro Wachi) [#35622](https://github.com/nodejs/node/pull/35622) +* [[`c88d845db3`](https://github.com/nodejs/node/commit/c88d845db3)] - **test**: update wpt status for url (Daijiro Wachi) [#35335](https://github.com/nodejs/node/pull/35335) +* [[`589dbf1392`](https://github.com/nodejs/node/commit/589dbf1392)] - **test**: update wpt tests for url (Daijiro Wachi) [#35329](https://github.com/nodejs/node/pull/35329) +* [[`46bef7b771`](https://github.com/nodejs/node/commit/46bef7b771)] - **test**: add Actions annotation output (Mary Marchini) [#34590](https://github.com/nodejs/node/pull/34590) +* [[`a9c5b873ca`](https://github.com/nodejs/node/commit/a9c5b873ca)] - **test**: move buffer-as-path symlink test to its own test file (Rich Trott) [#34569](https://github.com/nodejs/node/pull/34569) +* [[`31ba9a20bd`](https://github.com/nodejs/node/commit/31ba9a20bd)] - **test**: run test-benchmark-napi on arm (Rich Trott) [#34502](https://github.com/nodejs/node/pull/34502) +* [[`2c4ebe0426`](https://github.com/nodejs/node/commit/2c4ebe0426)] - **test**: use `.then(common.mustCall())` for all async IIFEs (Anna Henningsen) [#34363](https://github.com/nodejs/node/pull/34363) +* [[`772fdb0cd3`](https://github.com/nodejs/node/commit/772fdb0cd3)] - **test**: fix flaky test-fs-stream-construct (Rich Trott) [#34203](https://github.com/nodejs/node/pull/34203) +* [[`9b8d317d99`](https://github.com/nodejs/node/commit/9b8d317d99)] - **test**: fix flaky test-http2-invalidheaderfield (Rich Trott) [#34173](https://github.com/nodejs/node/pull/34173) +* [[`2ccf15b2bf`](https://github.com/nodejs/node/commit/2ccf15b2bf)] - **test**: ensure finish is emitted before destroy (Robert Nagy) [#33137](https://github.com/nodejs/node/pull/33137) +* [[`27f3530da3`](https://github.com/nodejs/node/commit/27f3530da3)] - **test**: remove unnecessary eslint-disable comment (Rich Trott) [#34000](https://github.com/nodejs/node/pull/34000) +* [[`326a79ebb9`](https://github.com/nodejs/node/commit/326a79ebb9)] - **test**: fix typo in test-quic-client-empty-preferred-address.js (gengjiawen) [#33976](https://github.com/nodejs/node/pull/33976) +* [[`b0b268f5a2`](https://github.com/nodejs/node/commit/b0b268f5a2)] - **test**: fix flaky fs-construct test (Robert Nagy) [#33625](https://github.com/nodejs/node/pull/33625) +* [[`cbe955c227`](https://github.com/nodejs/node/commit/cbe955c227)] - **test**: add net regression test (Robert Nagy) [#32794](https://github.com/nodejs/node/pull/32794) +* [[`5d179cb2ec`](https://github.com/nodejs/node/commit/5d179cb2ec)] - **timers**: use AbortController with correct name/message (Anna Henningsen) [#34763](https://github.com/nodejs/node/pull/34763) +* [[`64d22c320c`](https://github.com/nodejs/node/commit/64d22c320c)] - **timers**: fix multipleResolves in promisified timeouts/immediates (Denys Otrishko) [#33949](https://github.com/nodejs/node/pull/33949) +* [[`fbe33aa52e`](https://github.com/nodejs/node/commit/fbe33aa52e)] - **tools**: bump remark-lint-preset-node to 1.17.1 (Rich Trott) [#35668](https://github.com/nodejs/node/pull/35668) +* [[`35a6946193`](https://github.com/nodejs/node/commit/35a6946193)] - **tools**: update gyp-next to v0.6.2 (Michaël Zasso) [#35690](https://github.com/nodejs/node/pull/35690) +* [[`be80faa0c8`](https://github.com/nodejs/node/commit/be80faa0c8)] - **tools**: update gyp-next to v0.6.0 (Ujjwal Sharma) [#35635](https://github.com/nodejs/node/pull/35635) +* [[`2d83e743d9`](https://github.com/nodejs/node/commit/2d83e743d9)] - **tools**: update ESLint to 7.11.0 (Colin Ihrig) [#35578](https://github.com/nodejs/node/pull/35578) +* [[`0eca660948`](https://github.com/nodejs/node/commit/0eca660948)] - **tools**: update ESLint to 7.7.0 (Colin Ihrig) [#34783](https://github.com/nodejs/node/pull/34783) +* [[`77b68f9a29`](https://github.com/nodejs/node/commit/77b68f9a29)] - **tools**: add linting rule for async IIFEs (Anna Henningsen) [#34363](https://github.com/nodejs/node/pull/34363) +* [[`f04538761f`](https://github.com/nodejs/node/commit/f04538761f)] - **tools**: enable Node.js command line flags in node\_mksnapshot (Joyee Cheung) [#32984](https://github.com/nodejs/node/pull/32984) +* [[`b0d4eb37c7`](https://github.com/nodejs/node/commit/b0d4eb37c7)] - **tools**: update ESLint to 7.4.0 (Colin Ihrig) [#34205](https://github.com/nodejs/node/pull/34205) +* [[`076e4ed2d1`](https://github.com/nodejs/node/commit/076e4ed2d1)] - **tools**: update ESLint from 7.2.0 to 7.3.1 (Rich Trott) [#34000](https://github.com/nodejs/node/pull/34000) +* [[`7afe3af200`](https://github.com/nodejs/node/commit/7afe3af200)] - **url**: fix file url reparse (Daijiro Wachi) [#35671](https://github.com/nodejs/node/pull/35671) diff --git a/doc/changelogs/CHANGELOG_V4.md b/doc/changelogs/CHANGELOG_V4.md index 69f36cf2cea9d9..64a452f8b91231 100644 --- a/doc/changelogs/CHANGELOG_V4.md +++ b/doc/changelogs/CHANGELOG_V4.md @@ -58,6 +58,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) diff --git a/doc/changelogs/CHANGELOG_V5.md b/doc/changelogs/CHANGELOG_V5.md index c9cd28d692bfaf..00735a73982265 100644 --- a/doc/changelogs/CHANGELOG_V5.md +++ b/doc/changelogs/CHANGELOG_V5.md @@ -34,6 +34,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) diff --git a/doc/changelogs/CHANGELOG_V6.md b/doc/changelogs/CHANGELOG_V6.md index 20c9370ff0d5ab..6444d9c46b8b20 100644 --- a/doc/changelogs/CHANGELOG_V6.md +++ b/doc/changelogs/CHANGELOG_V6.md @@ -63,6 +63,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) diff --git a/doc/changelogs/CHANGELOG_V7.md b/doc/changelogs/CHANGELOG_V7.md index a64b973c8c2192..e094ddedc2fe98 100644 --- a/doc/changelogs/CHANGELOG_V7.md +++ b/doc/changelogs/CHANGELOG_V7.md @@ -32,6 +32,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) diff --git a/doc/changelogs/CHANGELOG_V8.md b/doc/changelogs/CHANGELOG_V8.md index 41e38efcf57206..536e1a58476918 100644 --- a/doc/changelogs/CHANGELOG_V8.md +++ b/doc/changelogs/CHANGELOG_V8.md @@ -54,6 +54,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) diff --git a/doc/changelogs/CHANGELOG_V9.md b/doc/changelogs/CHANGELOG_V9.md index e4cdf50a9381b6..dc5bfe086e81f9 100644 --- a/doc/changelogs/CHANGELOG_V9.md +++ b/doc/changelogs/CHANGELOG_V9.md @@ -33,6 +33,7 @@ * Other Versions + * [15.x](CHANGELOG_V15.md) * [14.x](CHANGELOG_V14.md) * [13.x](CHANGELOG_V13.md) * [12.x](CHANGELOG_V12.md) diff --git a/doc/guides/backporting-to-release-lines.md b/doc/guides/backporting-to-release-lines.md index 90b4a3dcaf328c..eba2a72e9a6040 100644 --- a/doc/guides/backporting-to-release-lines.md +++ b/doc/guides/backporting-to-release-lines.md @@ -90,5 +90,5 @@ After the pull request lands, replace the `backport-requested-v10.x` label on the original pull request with `backported-to-v10.x`. [Release Plan]: https://github.com/nodejs/Release#release-plan -[Release Schedule]: https://github.com/nodejs/Release#release-schedule1 +[Release Schedule]: https://github.com/nodejs/Release#release-schedule [`node-test-pull-request`]: https://ci.nodejs.org/job/node-test-pull-request/build diff --git a/doc/guides/collaborator-guide.md b/doc/guides/collaborator-guide.md index 8b40efaa5543d6..a9e03c92ec95cf 100644 --- a/doc/guides/collaborator-guide.md +++ b/doc/guides/collaborator-guide.md @@ -7,6 +7,7 @@ * [Closing issues and pull requests](#closing-issues-and-pull-requests) * [Author ready pull requests](#author-ready-pull-requests) * [Handling own pull requests](#handling-own-pull-requests) + * [Security issues](#managing-security-issues) * [Accepting modifications](#accepting-modifications) * [Code reviews](#code-reviews) * [Consensus seeking](#consensus-seeking) @@ -87,6 +88,34 @@ to land but is [author ready](#author-ready-pull-requests), add the `author ready` label. If you wish to land the pull request yourself, use the "assign yourself" link to self-assign it. +### Managing security issues + +Security issues should ideally be reported through the processes outlined in +[SECURITY.md][security reporting]. This allows the collaborators to +appropriately triage the report and address vulnerabilities in a planned +security release. If an issue is opened in the public repo +which describes a security issue, or if an issue is later identified to be +describing a security issue, take the following steps: + +* Ask the originator to submit a report through Hacker one as outlined in + [SECURITY.md][security reporting]. +* Move the issue to the private repo called + [premature-disclosures](https://github.com/nodejs/premature-disclosures). +* For any related pull requests create an associated issue in the + `premature-disclosures` repo and add a copy of the patch for the + pull request, and screenshots of discussion on the PR to the issue. +* Open a ticket with GitHub asking that the PRs be deleted through + [GitHub suppport](https://support.github.com/contact) + using Node.js(team) as the account organization. +* Open a new issue in the repository in which the issue was originally + reported with a brief FYI to the originator. `FYI @xxxx we asked github + to delete your PR while we work on releases in private.` with the title + `FYI - PR deleted #YYYY`. +* Email `tsc@iojs.org` with the link to the issues in the + `premature-disclosures` repo so that the TSC is aware that they + may need to expedite handling of the issue due to premature + disclosure. + ## Accepting modifications Contributors propose modifications to Node.js using GitHub pull requests. This @@ -611,7 +640,7 @@ Other changes might have landed on master since the successful CI run. As a precaution, run tests (`make -j4 test` or `vcbuild test`). Confirm that the commit message format is correct using -[core-validate-commit](https://github.com/evanlucas/core-validate-commit). +[core-validate-commit](https://github.com/nodejs/core-validate-commit). ```text $ git rev-list upstream/master...HEAD | xargs core-validate-commit @@ -791,4 +820,5 @@ If you cannot find who to cc for a file, `git shortlog -n -s ` can help. [git-username]: https://help.github.com/articles/setting-your-username-in-git/ [node-core-utils-credentials]: https://github.com/nodejs/node-core-utils#setting-up-credentials [node-core-utils-issues]: https://github.com/nodejs/node-core-utils/issues +[security reporting]: https://github.com/nodejs/node/blob/HEAD/SECURITY.md [unreliable tests]: https://github.com/nodejs/node/issues?q=is%3Aopen+is%3Aissue+label%3A%22CI+%2F+flaky+test%22 diff --git a/doc/guides/contributing/pull-requests.md b/doc/guides/contributing/pull-requests.md index 84039f89412b71..4ca1df219bb941 100644 --- a/doc/guides/contributing/pull-requests.md +++ b/doc/guides/contributing/pull-requests.md @@ -35,6 +35,7 @@ so that you can make the actual changes. This is where we will start. * [CI Testing](#ci-testing) * [Waiting Until the Pull Request Gets Landed](#waiting-until-the-pull-request-gets-landed) * [Check Out the Collaborator Guide](#check-out-the-collaborator-guide) + * [Appendix: Subsystems](#appendix-subsystems) ## Dependencies @@ -171,9 +172,9 @@ A good commit message should describe what changed and why. less, and no more than 72 characters) * be entirely in lowercase with the exception of proper nouns, acronyms, and the words that refer to code, like function/variable names - * be prefixed with the name of the changed subsystem and start with an - imperative verb. Check the output of `git log --oneline files/you/changed` to - find out what subsystems your changes touch. + * be prefixed with the name of the changed [subsystem](#appendix-subsystems) + and start with an imperative verb. Check the output of `git log --oneline + files/you/changed` to find out what subsystems your changes touch. Examples: * `net: add localAddress and localPort to Socket` @@ -267,30 +268,9 @@ $ git push origin my-branch ### Step 8: Opening the Pull Request -From within GitHub, opening a new Pull Request will present you with a template -that should be filled out: - -```markdown - - -#### Checklist - - -- [ ] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes -- [ ] tests and/or benchmarks are included -- [ ] documentation is changed or added -- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines) -``` - -Please try to do your best at filling out the details, but feel free to skip -parts if you're not sure what to put. +From within GitHub, opening a new Pull Request will present you with a +[pull request template][]. Please try to do your best at filling out the +details, but feel free to skip parts if you're not sure what to put. Once opened, Pull Requests are usually reviewed within a few days. @@ -603,6 +583,17 @@ widely used, so don't be discouraged! If you want to know more about the code review and the landing process, see the [Collaborator Guide][]. +### Appendix: Subsystems + +* `lib/*.js` (`assert`, `buffer`, etc.) +* `build` +* `doc` +* `lib / src` +* `test` +* `tools` + +More than one subsystem may be valid for any particular issue or pull request. + [Building guide]: ../../../BUILDING.md [CI (Continuous Integration) test run]: #ci-testing [Code of Conduct]: https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md @@ -614,4 +605,5 @@ If you want to know more about the code review and the landing process, see the [guide for writing tests in Node.js]: ../writing-tests.md [hiding-a-comment]: https://help.github.com/articles/managing-disruptive-comments/#hiding-a-comment [https://ci.nodejs.org/]: https://ci.nodejs.org/ +[pull request template]: https://raw.githubusercontent.com/nodejs/node/master/.github/PULL_REQUEST_TEMPLATE.md [running tests]: ../../../BUILDING.md#running-tests diff --git a/doc/guides/diagnostic-tooling-support-tiers.md b/doc/guides/diagnostic-tooling-support-tiers.md index 5d935a29369a88..1bff8774562f90 100644 --- a/doc/guides/diagnostic-tooling-support-tiers.md +++ b/doc/guides/diagnostic-tooling-support-tiers.md @@ -93,56 +93,56 @@ The tools are currently assigned to Tiers as follows: ## Tier 1 - | Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | - |-----------|---------------------------|-------------------------------|-------------------------|-------------| - | FFDC | diagnostic report | Yes | Yes | 1 | - | | | | | | +| Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | +|-----------|---------------------------|-------------------------------|-------------------------|-------------| +| FFDC | diagnostic report | Yes | Yes | 1 | +| | | | | | ## Tier 2 - | Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | - |-----------|---------------------------|-------------------------------|-------------------------|-------------| - | | | | | | +| Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | +|-----------|---------------|-------------------------------|-------------------------|-------------| +| | | | | | ## Tier 3 - | Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | - |-----------|--------------------------------------|-------------------------------|-------------------------|-------------| - | Profiling | V8 CPU profiler | Partial (V8 Tests) | Yes | 1 | - | Profiling | --prof/--prof-process flags | Yes | Yes | 1 | - | Profiling | V8 CodeEventHandler API | Partial (V8 Tests) | Yes | 2 | - | Profiling | V8 --interpreted-frames-native-stack | Yes | Yes | 2 | - | Profiling | Linux perf | Yes | Partial | 2 | +| Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | +|-----------|--------------------------------------|-------------------------------|-------------------------|-------------| +| Profiling | V8 CPU profiler | Partial (V8 Tests) | Yes | 1 | +| Profiling | --prof/--prof-process flags | Yes | Yes | 1 | +| Profiling | V8 CodeEventHandler API | Partial (V8 Tests) | Yes | 2 | +| Profiling | V8 --interpreted-frames-native-stack | Yes | Yes | 2 | +| Profiling | Linux perf | Yes | Partial | 2 | ## Tier 4 - | Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | - |-----------|---------------------------|-------------------------------|-------------------------|-------------| - | | | | | | +| Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | +|-----------|---------------|-------------------------------|-------------------------|-------------| +| | | | | | ## Not yet classified - | Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | - |-----------|---------------------------|-------------------------------|-------------------------|-------------| - | FFDC | node-report | No | No | 1 | - | Memory | mdb_V8 | No | No | 4 | - | Memory | node-heapdump | No | No | 2 | - | Memory | V8 heap profiler | No | Yes | 1 | - | Memory | V8 sampling heap profiler | No | Yes | 1 | - | AsyncFlow | Async Hooks (API) | ? | Yes | 1 | - | Debugger | V8 Debug protocol (API) | No | Yes | 1 | - | Debugger | Command line Debug Client | ? | Yes | 1 | - | Debugger | llnode | ? | No | 2 | - | Debugger | Chrome Dev tools | ? | No | 3 | - | Debugger | Chakracore - time-travel | No | Data source only | too early | - | Tracing | trace_events (API) | No | Yes | 1 | - | Tracing | DTrace | No | Partial | 3 | - | Tracing | LTTng | No | Removed? | N/A | - | Tracing | ETW | No | Partial | 3 | - | Tracing | Systemtap | No | Partial | ? | - | Profiling | DTrace | No | Partial | 3 | - | Profiling | Windows Xperf | No | ? | ? | - | Profiling | 0x | No | No | 4 | - | Profiling | node-clinic | No | No | too early | - | F/P/T | appmetrics | No | No | ? | - | M/T | eBPF tracing tool | No | No | ? | +| Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | +|-----------|---------------------------|-------------------------------|-------------------------|-------------| +| FFDC | node-report | No | No | 1 | +| Memory | mdb_V8 | No | No | 4 | +| Memory | node-heapdump | No | No | 2 | +| Memory | V8 heap profiler | No | Yes | 1 | +| Memory | V8 sampling heap profiler | No | Yes | 1 | +| AsyncFlow | Async Hooks (API) | ? | Yes | 1 | +| Debugger | V8 Debug protocol (API) | No | Yes | 1 | +| Debugger | Command line Debug Client | ? | Yes | 1 | +| Debugger | llnode | ? | No | 2 | +| Debugger | Chrome Dev tools | ? | No | 3 | +| Debugger | Chakracore - time-travel | No | Data source only | too early | +| Tracing | trace_events (API) | No | Yes | 1 | +| Tracing | DTrace | No | Partial | 3 | +| Tracing | LTTng | No | Removed? | N/A | +| Tracing | ETW | No | Partial | 3 | +| Tracing | Systemtap | No | Partial | ? | +| Profiling | DTrace | No | Partial | 3 | +| Profiling | Windows Xperf | No | ? | ? | +| Profiling | 0x | No | No | 4 | +| Profiling | node-clinic | No | No | too early | +| F/P/T | appmetrics | No | No | ? | +| M/T | eBPF tracing tool | No | No | ? | diff --git a/doc/guides/doc-style-guide.md b/doc/guides/doc-style-guide.md index b44206ff9e2791..c5b5b80f2ac8a3 100644 --- a/doc/guides/doc-style-guide.md +++ b/doc/guides/doc-style-guide.md @@ -16,7 +16,7 @@ this guide. * Documents should be word-wrapped at 80 characters. * `.editorconfig` describes the preferred formatting. * A [plugin][] is available for some editors to apply these rules. -* Check changes to documentation with `make lint-md`. +* Check changes to documentation with `make test-doc -j` or `vcbuild test-doc`. * [Use US spelling][]. * [Use serial commas][]. * Avoid first-person pronouns (_I_, _we_). @@ -39,21 +39,21 @@ this guide. * Use [language][]-aware fences. (```js) * For the [info string][], use one of the following. - | Meaning | Info string | - | ------------- | ----------------- | - | Bash | `bash` | - | C | `c` | - | C++ | `cpp` | - | CoffeeScript | `coffee` | - | Diff | `diff` | - | HTTP | `http` | - | JavaScript | `js` | - | JSON | `json` | - | Markdown | `markdown` | - | Plaintext | `text` | - | Powershell | `powershell` | - | R | `r` | - | Shell Session | `console` | + | Meaning | Info string | + | ------------- | ------------ | + | Bash | `bash` | + | C | `c` | + | C++ | `cpp` | + | CoffeeScript | `coffee` | + | Diff | `diff` | + | HTTP | `http` | + | JavaScript | `js` | + | JSON | `json` | + | Markdown | `markdown` | + | Plaintext | `text` | + | Powershell | `powershell` | + | R | `r` | + | Shell Session | `console` | If one of your language-aware fences needs an info string that is not already on this list, you may use `text` until the grammar gets added to diff --git a/doc/guides/maintaining-npm.md b/doc/guides/maintaining-npm.md index 986c202bb17a97..bf789af65b3c7f 100644 --- a/doc/guides/maintaining-npm.md +++ b/doc/guides/maintaining-npm.md @@ -10,52 +10,22 @@ are at the discretion of the release and LTS teams. This process only covers full updates to new versions of npm. Cherry-picked changes can be reviewed and landed via the normal consensus seeking process. -## Step 1: Clone npm +## Step 1: Run the update script -```console -$ git clone https://github.com/npm/cli.git npm -$ cd npm -``` - -or if you already have npm cloned make sure the repo is up to date - -```console -$ git remote update -p -$ git reset --hard origin/latest -``` - -## Step 2: Build release - -```console -$ git checkout vX.Y.Z -$ make -$ make release -``` - -Note: please run `npm dist-tag ls npm` and make sure this is the `latest` -**dist-tag**. `latest` on git is usually released as `next` when it's time to -downstream - -## Step 3: Remove old npm +In the following examples, `x.y.z` should match the npm version to update to. ```console -$ cd /path/to/node -$ git remote update -p -$ git checkout -b npm-x.y.z origin/master -$ cd deps -$ rm -rf npm +$ ./tools/update-npm.sh x.y.z ``` -## Step 4: Extract and commit new npm +## Step 2: Commit new npm ```console -$ tar zxf /path/to/npm/release/npm-x.y.z.tgz -$ git add -A npm +$ git add -A deps/npm $ git commit -m "deps: upgrade npm to x.y.z" -$ cd .. ``` -## Step 5: Update licenses +## Step 3: Update licenses ```console $ ./configure @@ -68,13 +38,13 @@ $ git commit -m "doc: update npm LICENSE using license-builder.sh" Note: please ensure you are only making the updates that are changed by npm. -## Step 6: Apply Whitespace fix +## Step 4: Apply Whitespace fix ```console $ git rebase --whitespace=fix master ``` -## Step 7: Test the build +## Step 5: Test the build ```console $ make test-npm diff --git a/doc/guides/maintaining-openssl.md b/doc/guides/maintaining-openssl.md index b1477e3c67780a..1e75831482a260 100644 --- a/doc/guides/maintaining-openssl.md +++ b/doc/guides/maintaining-openssl.md @@ -2,6 +2,21 @@ This document describes how to update `deps/openssl/`. +If you need to provide updates across all active release lines you will +currently need to generate three PRs as follows: + +* a PR for master which is generated following the instructions + below which include the QUIC patch. +* a PR for 14.x following the instruction below based on the + 14,x branch but skipping the step to apply the QUICK patch. + This PR should cherry pick back to the active release lines + except for the 10.x line. +* a PR which uses the same commit from the second PR to apply the + updates to the openssl source code, with a new commit generated + by following steps 2 onwards on the 10.x line. This is + necessary because differences in 10.x requires that the + configuration files be regenerated specifically for 10.x. + ## Requirements * Linux environment. * `perl` Only Perl version 5 is tested. @@ -27,7 +42,7 @@ NASM version 2.11.08 ## 1. Obtain and extract new OpenSSL sources -Get a new source from and extract +Get a new source from and extract all files into `deps/openssl/openssl`. Then add all files and commit them. ```console @@ -59,21 +74,25 @@ The APIs to support the QUIC implementation are a port of the BoringSSL implementation that has not yet landed in OpenSSL. They must be re-applied separately after updating the openssl source as described above. The current patch implementation can be found in the `deps/openssl/patches` -directory in the file `0001-deps-add-support-for-BoringSSL-QUIC-APIs.patch`. +directory in the file `0001-deps-add-support-for-BoringSSL-QUIC-APIs.patch` +and should be applied from the root of the repo. ```console -% git am deps/openssl/patches 0001-deps-add-support-for-BoringSSL-QUIC-APIs.patch +% git am --directory deps/openssl/openssl/ deps/openssl/patches/0001-deps-add-support-for-BoringSSL-QUIC-APIs.patch ``` The patch file itself is generated by squashing commits from the -`OpenSSL_1_1_1d-quic` fork of the Akamai OpenSSL fork located +`OpenSSL_1_1_1i-quic` fork of the Akamai OpenSSL fork located [here](https://github.com/akamai/openssl), starting with -[this commit](https://github.com/akamai/openssl/commit/f910151a5b60eb7b90d274332368226cc67479df), +[this commit](https://github.com/akamai/openssl/commit/3b0bdf80dabddfe37d8f8f07e82a2ba85f5a93ad), then applying additional edits to update the implementation to -openssl-1.1.1e. As OpenSSL updates are made, additional updates +openssl-1.1.1i. As OpenSSL updates are made, additional updates to the patch may be necessary to keep the patch in sync. -The patch is currently supported only for openssl-1.1.1e. +The patch is currently supported only for openssl-1.1.1i. + +You also need to apply +to re-enable OPENSSL\_NO\_QUIC guards. ## 2. Execute `make` in `deps/openssl/config` directory diff --git a/doc/guides/onboarding-extras.md b/doc/guides/onboarding-extras.md index 030074093eef36..79951a433926c6 100644 --- a/doc/guides/onboarding-extras.md +++ b/doc/guides/onboarding-extras.md @@ -2,17 +2,6 @@ ## Labels -### Subsystems - -* `lib/*.js` (`assert`, `buffer`, etc.) -* `build` -* `doc` -* `lib / src` -* `test` -* `tools` - -More than one subsystem may be valid for any particular issue or pull request. - ### General * `confirmed-bug`: Bugs you have verified diff --git a/doc/guides/releases.md b/doc/guides/releases.md index fbbb43b4e3e7a4..903b31c744abc2 100644 --- a/doc/guides/releases.md +++ b/doc/guides/releases.md @@ -497,7 +497,7 @@ $ git secure-tag -sm "YYYY-MM-DD Node.js vx.y.z ( CallExpression[callee.name=/Error$/]" + message: "Use new keyword when throwing an Error." + # Config specific to lib + - selector: "NewExpression[callee.name=/Error$/]:not([callee.name=/^(AssertionError|NghttpError|AbortError)$/])" + message: "Use an error exported by the internal/errors module." + - selector: "CallExpression[callee.object.name='Error'][callee.property.name='captureStackTrace']" + message: "Please use `require('internal/errors').hideStackFrames()` instead." + - selector: "AssignmentExpression:matches([left.name='prepareStackTrace'], [left.property.name='prepareStackTrace'])" + message: "Use 'overrideStackTrace' from 'lib/internal/errors.js' instead of 'Error.prepareStackTrace'." + # Custom rules in tools/eslint-rules + node-core/lowercase-name-for-primitive: error + node-core/non-ascii-character: error + node-core/prefer-primordials: - error - name: Array - message: "Use `const { Array } = primordials;` instead of the global." - name: ArrayBuffer - message: "Use `const { ArrayBuffer } = primordials;` instead of the global." - name: BigInt - message: "Use `const { BigInt } = primordials;` instead of the global." - name: BigInt64Array - message: "Use `const { BigInt64Array } = primordials;` instead of the global." - name: BigUint64Array - message: "Use `const { BigUint64Array } = primordials;` instead of the global." - name: Boolean - message: "Use `const { Boolean } = primordials;` instead of the global." + - name: DataView + - name: Date - name: Error - message: "Use `const { Error } = primordials;` instead of the global." + ignore: + - prepareStackTrace + - stackTraceLimit - name: EvalError - message: "Use `const { EvalError } = primordials;` instead of the global." - name: Float32Array - message: "Use `const { Float32Array } = primordials;` instead of the global." - name: Float64Array - message: "Use `const { Float64Array } = primordials;` instead of the global." + - name: Function - name: Int16Array - message: "Use `const { Int16Array } = primordials;` instead of the global." - name: Int32Array - message: "Use `const { Int32Array } = primordials;` instead of the global." - name: Int8Array - message: "Use `const { Int8Array } = primordials;` instead of the global." + - name: isFinite + into: Number + - name: isNaN + into: Number - name: JSON - message: "Use `const { JSON } = primordials;` instead of the global." - name: Map - message: "Use `const { Map } = primordials;` instead of the global." + into: Safe - name: Math - message: "Use `const { Math } = primordials;` instead of the global." - name: Number - message: "Use `const { Number } = primordials;` instead of the global." - name: Object - message: "Use `const { Object } = primordials;` instead of the global." + - name: parseFloat + into: Number + - name: parseInt + into: Number - name: Promise - message: "Use `const { Promise } = primordials;` instead of the global." - name: RangeError - message: "Use `const { RangeError } = primordials;` instead of the global." - name: ReferenceError - message: "Use `const { ReferenceError } = primordials;` instead of the global." - name: Reflect - message: "Use `const { Reflect } = primordials;` instead of the global." - name: RegExp - message: "Use `const { RegExp } = primordials;` instead of the global." - name: Set - message: "Use `const { Set } = primordials;` instead of the global." + into: Safe - name: String - message: "Use `const { String } = primordials;` instead of the global." - name: Symbol - message: "Use `const { Symbol } = primordials;` instead of the global." - name: SyntaxError - message: "Use `const { SyntaxError } = primordials;` instead of the global." - name: TypeError - message: "Use `const { TypeError } = primordials;` instead of the global." - - name: URIError - message: "Use `const { URIError } = primordials;` instead of the global." - name: Uint16Array - message: "Use `const { Uint16Array } = primordials;` instead of the global." - name: Uint32Array - message: "Use `const { Uint32Array } = primordials;` instead of the global." - name: Uint8Array - message: "Use `const { Uint8Array } = primordials;` instead of the global." - name: Uint8ClampedArray - message: "Use `const { Uint8ClampedArray } = primordials;` instead of the global." + - name: URIError - name: WeakMap - message: "Use `const { WeakMap } = primordials;` instead of the global." + into: Safe - name: WeakSet - message: "Use `const { WeakSet } = primordials;` instead of the global." - - name: parseFloat - message: "Use `const { NumberParseFloat } = primordials;` instead of the global." - - name: parseInt - message: "Use `const { NumberParseInt } = primordials;` instead of the global." - no-restricted-syntax: - # Config copied from .eslintrc.js - - error - - selector: "CallExpression[callee.object.name='assert']:not([callee.property.name='ok']):not([callee.property.name='fail']):not([callee.property.name='ifError'])" - message: "Please only use simple assertions in ./lib" - - selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]" - message: "setTimeout() must be invoked with at least two arguments." - - selector: "CallExpression[callee.name='setInterval'][arguments.length<2]" - message: "setInterval() must be invoked with at least 2 arguments." - - selector: "ThrowStatement > CallExpression[callee.name=/Error$/]" - message: "Use new keyword when throwing an Error." - # Config specific to lib - - selector: "NewExpression[callee.name=/Error$/]:not([callee.name=/^(AssertionError|NghttpError)$/])" - message: "Use an error exported by the internal/errors module." - - selector: "CallExpression[callee.object.name='Error'][callee.property.name='captureStackTrace']" - message: "Please use `require('internal/errors').hideStackFrames()` instead." - - selector: "AssignmentExpression:matches([left.name='prepareStackTrace'], [left.property.name='prepareStackTrace'])" - message: "Use 'overrideStackTrace' from 'lib/internal/errors.js' instead of 'Error.prepareStackTrace'." - - selector: "CallExpression[callee.name='isNaN']" - message: "Use NumberIsNaN() primordial instead of the global isNaN() function." - # Custom rules in tools/eslint-rules - node-core/lowercase-name-for-primitive: error - node-core/non-ascii-character: error + into: Safe globals: Intl: false # Parameters passed to internal modules diff --git a/lib/_http_agent.js b/lib/_http_agent.js index 6f6a0920fd8c04..10638fe69ed124 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -23,6 +23,7 @@ const { NumberIsNaN, + ObjectCreate, ObjectKeys, ObjectSetPrototypeOf, ObjectValues, @@ -83,13 +84,13 @@ function Agent(options) { this.defaultPort = 80; this.protocol = 'http:'; - this.options = { ...options }; + this.options = { __proto__: null, ...options }; // Don't confuse net and make it think that we're connecting to a pipe this.options.path = null; - this.requests = {}; - this.sockets = {}; - this.freeSockets = {}; + this.requests = ObjectCreate(null); + this.sockets = ObjectCreate(null); + this.freeSockets = ObjectCreate(null); this.keepAliveMsecs = this.options.keepAliveMsecs || 1000; this.keepAlive = this.options.keepAlive || false; this.maxSockets = this.options.maxSockets || Agent.defaultMaxSockets; @@ -227,13 +228,14 @@ Agent.prototype.addRequest = function addRequest(req, options, port/* legacy */, // Legacy API: addRequest(req, host, port, localAddress) if (typeof options === 'string') { options = { + __proto__: null, host: options, port, localAddress }; } - options = { ...options, ...this.options }; + options = { __proto__: null, ...options, ...this.options }; if (options.socketPath) options.path = options.socketPath; @@ -294,7 +296,7 @@ Agent.prototype.addRequest = function addRequest(req, options, port/* legacy */, }; Agent.prototype.createSocket = function createSocket(req, options, cb) { - options = { ...options, ...this.options }; + options = { __proto__: null, ...options, ...this.options }; if (options.socketPath) options.path = options.socketPath; @@ -435,7 +437,7 @@ Agent.prototype.removeSocket = function removeSocket(s, options) { // There might be older requests in a different origin, but // if the origin which releases the socket has pending requests // that will be prioritized. - for (const prop in this.requests) { + for (const prop of ObjectKeys(this.requests)) { // Check whether this specific origin is already at maxSockets if (this.sockets[prop] && this.sockets[prop].length) break; debug('removeSocket, have a request with different origin,' + diff --git a/lib/_http_client.js b/lib/_http_client.js index 885016bf4856db..6fb5dd65cb368c 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -59,13 +59,17 @@ const { ERR_INVALID_PROTOCOL, ERR_UNESCAPED_CHARACTERS } = codes; -const { validateInteger } = require('internal/validators'); +const { + validateInteger, +} = require('internal/validators'); const { getTimerDuration } = require('internal/timers'); const { DTRACE_HTTP_CLIENT_REQUEST, DTRACE_HTTP_CLIENT_RESPONSE } = require('internal/dtrace'); +const { addAbortSignal } = require('stream'); + const INVALID_PATH_REGEX = /[^\u0021-\u00ff]/; const kError = Symbol('kError'); @@ -169,6 +173,10 @@ function ClientRequest(input, options, cb) { if (options.timeout !== undefined) this.timeout = getTimerDuration(options.timeout, 'timeout'); + const signal = options.signal; + if (signal) { + addAbortSignal(signal, this); + } let method = options.method; const methodIsString = (typeof method === 'string'); if (method !== null && method !== undefined && !methodIsString) { diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index 59136833c6b340..7943c69f54d911 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -24,10 +24,16 @@ const { ObjectDefineProperty, ObjectSetPrototypeOf, + Symbol } = primordials; const Stream = require('stream'); +const kHeaders = Symbol('kHeaders'); +const kHeadersCount = Symbol('kHeadersCount'); +const kTrailers = Symbol('kTrailers'); +const kTrailersCount = Symbol('kTrailersCount'); + function readStart(socket) { if (socket && !socket._paused && socket.readable) socket.resume(); @@ -58,9 +64,11 @@ function IncomingMessage(socket) { this.httpVersionMinor = null; this.httpVersion = null; this.complete = false; - this.headers = {}; + this[kHeaders] = null; + this[kHeadersCount] = 0; this.rawHeaders = []; - this.trailers = {}; + this[kTrailers] = null; + this[kTrailersCount] = 0; this.rawTrailers = []; this.aborted = false; @@ -93,6 +101,44 @@ ObjectDefineProperty(IncomingMessage.prototype, 'connection', { } }); +ObjectDefineProperty(IncomingMessage.prototype, 'headers', { + get: function() { + if (!this[kHeaders]) { + this[kHeaders] = {}; + + const src = this.rawHeaders; + const dst = this[kHeaders]; + + for (let n = 0; n < this[kHeadersCount]; n += 2) { + this._addHeaderLine(src[n + 0], src[n + 1], dst); + } + } + return this[kHeaders]; + }, + set: function(val) { + this[kHeaders] = val; + } +}); + +ObjectDefineProperty(IncomingMessage.prototype, 'trailers', { + get: function() { + if (!this[kTrailers]) { + this[kTrailers] = {}; + + const src = this.rawTrailers; + const dst = this[kTrailers]; + + for (let n = 0; n < this[kTrailersCount]; n += 2) { + this._addHeaderLine(src[n + 0], src[n + 1], dst); + } + } + return this[kTrailers]; + }, + set: function(val) { + this[kTrailers] = val; + } +}); + IncomingMessage.prototype.setTimeout = function setTimeout(msecs, callback) { if (callback) this.on('timeout', callback); @@ -133,14 +179,18 @@ function _addHeaderLines(headers, n) { let dest; if (this.complete) { this.rawTrailers = headers; - dest = this.trailers; + this[kTrailersCount] = n; + dest = this[kTrailers]; } else { this.rawHeaders = headers; - dest = this.headers; + this[kHeadersCount] = n; + dest = this[kHeaders]; } - for (let i = 0; i < n; i += 2) { - this._addHeaderLine(headers[i], headers[i + 1], dest); + if (dest) { + for (let i = 0; i < n; i += 2) { + this._addHeaderLine(headers[i], headers[i + 1], dest); + } } } } diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 48d113bb5cf232..8fb64ab82efceb 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -570,6 +570,7 @@ OutgoingMessage.prototype.setHeader = function setHeader(name, value) { this[kOutHeaders] = headers = ObjectCreate(null); headers[name.toLowerCase()] = [name, value]; + return this; }; @@ -660,6 +661,11 @@ ObjectDefineProperty(OutgoingMessage.prototype, 'writableEnded', { get: function() { return this.finished; } }); +ObjectDefineProperty(OutgoingMessage.prototype, 'writableNeedDrain', { + get: function() { + return !this.destroyed && !this.finished && this[kNeedDrain]; + } +}); const crlf_buf = Buffer.from('\r\n'); OutgoingMessage.prototype.write = function write(chunk, encoding, callback) { @@ -809,6 +815,12 @@ OutgoingMessage.prototype.end = function end(chunk, encoding, callback) { } if (chunk) { + if (this.finished) { + onError(this, + new ERR_STREAM_WRITE_AFTER_END(), + typeof callback !== 'function' ? nop : callback); + return this; + } write_(this, chunk, encoding, null, true); } else if (this.finished) { if (typeof callback === 'function') { diff --git a/lib/_http_server.js b/lib/_http_server.js index ac6dd1c50f94fe..419b08a7a0986d 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -84,6 +84,10 @@ const { observerCounts, constants } = internalBinding('performance'); const { setTimeout, clearTimeout } = require('timers'); const { NODE_PERFORMANCE_ENTRY_TYPE_HTTP } = constants; +const dc = require('diagnostics_channel'); +const onRequestStartChannel = dc.channel('http.server.request.start'); +const onResponseFinishChannel = dc.channel('http.server.response.finish'); + const kServerResponse = Symbol('ServerResponse'); const kServerResponseStatistics = Symbol('ServerResponseStatistics'); @@ -775,6 +779,15 @@ function clearRequestTimeout(req) { } function resOnFinish(req, res, socket, state, server) { + if (onResponseFinishChannel.hasSubscribers) { + onResponseFinishChannel.publish({ + request: req, + response: res, + socket, + server + }); + } + // Usually the first incoming element should be our request. it may // be that in the case abortIncoming() was called that the incoming // array will be empty. @@ -790,7 +803,7 @@ function resOnFinish(req, res, socket, state, server) { // Make sure the requestTimeout is cleared before finishing. // This might occur if the application has sent a response - // without consuming the request body, which would have alredy + // without consuming the request body, which would have already // cleared the timer. // clearRequestTimeout can be executed even if the timer is not active, // so this is safe. @@ -862,6 +875,15 @@ function parserOnIncoming(server, socket, state, req, keepAlive) { res.shouldKeepAlive = keepAlive; DTRACE_HTTP_SERVER_REQUEST(req, socket); + if (onRequestStartChannel.hasSubscribers) { + onRequestStartChannel.publish({ + request: req, + response: res, + socket, + server + }); + } + if (socket._httpMessage) { // There are already pending outgoing res, append. state.outgoing.push(res); diff --git a/lib/_tls_common.js b/lib/_tls_common.js index e2af2786fa17f0..616b7b47f46dac 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -23,7 +23,13 @@ const { ArrayIsArray, + ArrayPrototypeFilter, + ArrayPrototypeJoin, + ArrayPrototypePush, ObjectCreate, + StringPrototypeReplace, + StringPrototypeSplit, + StringPrototypeStartsWith, } = primordials; const { parseCertString } = require('internal/tls'); @@ -44,8 +50,15 @@ const { TLS1_3_VERSION, } = internalBinding('constants').crypto; -// Lazily loaded from internal/crypto/util. -let toBuf = null; +const { + validateString, + validateInteger, + validateInt32, +} = require('internal/validators'); + +const { + toBuf +} = require('internal/crypto/util'); function toV(which, v, def) { if (v == null) v = def; @@ -75,7 +88,10 @@ function SecureContext(secureProtocol, secureOptions, minVersion, maxVersion) { toV('minimum', minVersion, tls.DEFAULT_MIN_VERSION), toV('maximum', maxVersion, tls.DEFAULT_MAX_VERSION)); - if (secureOptions) this.context.setOptions(secureOptions); + if (secureOptions) { + validateInteger(secureOptions, 'secureOptions'); + this.context.setOptions(secureOptions); + } } function validateKeyOrCertOption(name, value) { @@ -90,80 +106,136 @@ function validateKeyOrCertOption(name, value) { exports.SecureContext = SecureContext; +function setKey(context, key, passphrase) { + validateKeyOrCertOption('key', key); + if (passphrase != null) + validateString(passphrase, 'options.passphrase'); + context.setKey(key, passphrase); +} + +function processCiphers(ciphers) { + ciphers = StringPrototypeSplit(ciphers || tls.DEFAULT_CIPHERS, ':'); + + const cipherList = + ArrayPrototypeJoin( + ArrayPrototypeFilter( + ciphers, + (cipher) => { + return cipher.length > 0 && + !StringPrototypeStartsWith(cipher, 'TLS_'); + }), ':'); + + const cipherSuites = + ArrayPrototypeJoin( + ArrayPrototypeFilter( + ciphers, + (cipher) => { + return cipher.length > 0 && + StringPrototypeStartsWith(cipher, 'TLS_'); + }), ':'); + + // Specifying empty cipher suites for both TLS1.2 and TLS1.3 is invalid, its + // not possible to handshake with no suites. + if (cipherSuites === '' && cipherList === '') + throw new ERR_INVALID_ARG_VALUE('options.ciphers', ciphers); + + return { cipherList, cipherSuites }; +} + +function addCACerts(context, ...certs) { + for (const cert of certs) { + validateKeyOrCertOption('ca', cert); + context.addCACert(cert); + } +} + +function setCerts(context, ...certs) { + for (const cert of certs) { + validateKeyOrCertOption('cert', cert); + context.setCert(cert); + } +} exports.createSecureContext = function createSecureContext(options) { if (!options) options = {}; - let secureOptions = options.secureOptions; - if (options.honorCipherOrder) + const { + ca, + cert, + ciphers, + clientCertEngine, + crl, + dhparam, + ecdhCurve = tls.DEFAULT_ECDH_CURVE, + honorCipherOrder, + key, + minVersion, + maxVersion, + passphrase, + pfx, + privateKeyIdentifier, + privateKeyEngine, + secureProtocol, + sessionIdContext, + sessionTimeout, + sigalgs, + singleUse, + ticketKeys, + } = options; + + let { secureOptions } = options; + + if (honorCipherOrder) secureOptions |= SSL_OP_CIPHER_SERVER_PREFERENCE; - const c = new SecureContext(options.secureProtocol, secureOptions, - options.minVersion, options.maxVersion); + const c = new SecureContext(secureProtocol, secureOptions, + minVersion, maxVersion); // Add CA before the cert to be able to load cert's issuer in C++ code. - const { ca } = options; + // NOTE(@jasnell): ca, cert, and key are permitted to be falsy, so do not + // change the checks to !== undefined checks. if (ca) { - if (ArrayIsArray(ca)) { - for (const val of ca) { - validateKeyOrCertOption('ca', val); - c.context.addCACert(val); - } - } else { - validateKeyOrCertOption('ca', ca); - c.context.addCACert(ca); - } + if (ArrayIsArray(ca)) + addCACerts(c.context, ...ca); + else + addCACerts(c.context, ca); } else { c.context.addRootCerts(); } - const { cert } = options; if (cert) { - if (ArrayIsArray(cert)) { - for (const val of cert) { - validateKeyOrCertOption('cert', val); - c.context.setCert(val); - } - } else { - validateKeyOrCertOption('cert', cert); - c.context.setCert(cert); - } + if (ArrayIsArray(cert)) + setCerts(c.context, ...cert); + else + setCerts(c.context, cert); } // Set the key after the cert. // `ssl_set_pkey` returns `0` when the key does not match the cert, but // `ssl_set_cert` returns `1` and nullifies the key in the SSL structure // which leads to the crash later on. - const key = options.key; - const passphrase = options.passphrase; if (key) { if (ArrayIsArray(key)) { for (const val of key) { // eslint-disable-next-line eqeqeq const pem = (val != undefined && val.pem !== undefined ? val.pem : val); - validateKeyOrCertOption('key', pem); - c.context.setKey(pem, val.passphrase || passphrase); + setKey(c.context, pem, val.passphrase || passphrase); } } else { - validateKeyOrCertOption('key', key); - c.context.setKey(key, passphrase); + setKey(c.context, key, passphrase); } } - const sigalgs = options.sigalgs; if (sigalgs !== undefined) { - if (typeof sigalgs !== 'string') { + if (typeof sigalgs !== 'string') throw new ERR_INVALID_ARG_TYPE('options.sigalgs', 'string', sigalgs); - } - if (sigalgs === '') { + if (sigalgs === '') throw new ERR_INVALID_ARG_VALUE('options.sigalgs', sigalgs); - } c.context.setSigalgs(sigalgs); } - const { privateKeyIdentifier, privateKeyEngine } = options; if (privateKeyIdentifier !== undefined) { if (privateKeyEngine === undefined) { // Engine is required when privateKeyIdentifier is present @@ -193,113 +265,113 @@ exports.createSecureContext = function createSecureContext(options) { } } - if (options.ciphers && typeof options.ciphers !== 'string') { - throw new ERR_INVALID_ARG_TYPE( - 'options.ciphers', 'string', options.ciphers); - } + if (ciphers != null) + validateString(ciphers, 'options.ciphers'); // Work around an OpenSSL API quirk. cipherList is for TLSv1.2 and below, // cipherSuites is for TLSv1.3 (and presumably any later versions). TLSv1.3 // cipher suites all have a standard name format beginning with TLS_, so split // the ciphers and pass them to the appropriate API. - const ciphers = (options.ciphers || tls.DEFAULT_CIPHERS).split(':'); - const cipherList = ciphers.filter((_) => !_.match(/^TLS_/) && - _.length > 0).join(':'); - const cipherSuites = ciphers.filter((_) => _.match(/^TLS_/)).join(':'); - - if (cipherSuites === '' && cipherList === '') { - // Specifying empty cipher suites for both TLS1.2 and TLS1.3 is invalid, its - // not possible to handshake with no suites. - throw new ERR_INVALID_ARG_VALUE('options.ciphers', ciphers); - } + const { cipherList, cipherSuites } = processCiphers(ciphers); c.context.setCipherSuites(cipherSuites); c.context.setCiphers(cipherList); - if (cipherSuites === '' && c.context.getMaxProto() > TLS1_2_VERSION && - c.context.getMinProto() < TLS1_3_VERSION) + if (cipherSuites === '' && + c.context.getMaxProto() > TLS1_2_VERSION && + c.context.getMinProto() < TLS1_3_VERSION) { c.context.setMaxProto(TLS1_2_VERSION); + } - if (cipherList === '' && c.context.getMinProto() < TLS1_3_VERSION && - c.context.getMaxProto() > TLS1_2_VERSION) + if (cipherList === '' && + c.context.getMinProto() < TLS1_3_VERSION && + c.context.getMaxProto() > TLS1_2_VERSION) { c.context.setMinProto(TLS1_3_VERSION); + } - if (options.ecdhCurve === undefined) - c.context.setECDHCurve(tls.DEFAULT_ECDH_CURVE); - else if (options.ecdhCurve) - c.context.setECDHCurve(options.ecdhCurve); + validateString(ecdhCurve, 'options.ecdhCurve'); + c.context.setECDHCurve(ecdhCurve); - if (options.dhparam) { - const warning = c.context.setDHParam(options.dhparam); + if (dhparam !== undefined) { + validateKeyOrCertOption('dhparam', dhparam); + const warning = c.context.setDHParam(dhparam); if (warning) process.emitWarning(warning, 'SecurityWarning'); } - if (options.crl) { - if (ArrayIsArray(options.crl)) { - for (const crl of options.crl) { - c.context.addCRL(crl); + if (crl !== undefined) { + if (ArrayIsArray(crl)) { + for (const val of crl) { + validateKeyOrCertOption('crl', val); + c.context.addCRL(val); } } else { - c.context.addCRL(options.crl); + validateKeyOrCertOption('crl', crl); + c.context.addCRL(crl); } } - if (options.sessionIdContext) { - c.context.setSessionIdContext(options.sessionIdContext); + if (sessionIdContext !== undefined) { + validateString(sessionIdContext, 'options.sessionIdContext'); + c.context.setSessionIdContext(sessionIdContext); } - if (options.pfx) { - if (!toBuf) - toBuf = require('internal/crypto/util').toBuf; - - if (ArrayIsArray(options.pfx)) { - for (const pfx of options.pfx) { - const raw = pfx.buf ? pfx.buf : pfx; - const buf = toBuf(raw); - const passphrase = pfx.passphrase || options.passphrase; - if (passphrase) { - c.context.loadPKCS12(buf, toBuf(passphrase)); + if (pfx !== undefined) { + if (ArrayIsArray(pfx)) { + for (const val of pfx) { + const raw = val.buf ? val.buf : val; + const pass = val.passphrase || passphrase; + if (pass !== undefined) { + c.context.loadPKCS12(toBuf(raw), toBuf(pass)); } else { - c.context.loadPKCS12(buf); + c.context.loadPKCS12(toBuf(raw)); } } + } else if (passphrase) { + c.context.loadPKCS12(toBuf(pfx), toBuf(passphrase)); } else { - const buf = toBuf(options.pfx); - const passphrase = options.passphrase; - if (passphrase) { - c.context.loadPKCS12(buf, toBuf(passphrase)); - } else { - c.context.loadPKCS12(buf); - } + c.context.loadPKCS12(toBuf(pfx)); } } // Do not keep read/write buffers in free list for OpenSSL < 1.1.0. (For // OpenSSL 1.1.0, buffers are malloced and freed without the use of a // freelist.) - if (options.singleUse) { + if (singleUse) { c.singleUse = true; c.context.setFreeListLength(0); } - if (typeof options.clientCertEngine === 'string') { - if (c.context.setClientCertEngine) - c.context.setClientCertEngine(options.clientCertEngine); - else + if (clientCertEngine !== undefined) { + if (typeof c.context.setClientCertEngine !== 'function') throw new ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED(); - } else if (options.clientCertEngine != null) { - throw new ERR_INVALID_ARG_TYPE('options.clientCertEngine', - ['string', 'null', 'undefined'], - options.clientCertEngine); + if (typeof clientCertEngine !== 'string') { + throw new ERR_INVALID_ARG_TYPE('options.clientCertEngine', + ['string', 'null', 'undefined'], + clientCertEngine); + } + c.context.setClientCertEngine(clientCertEngine); } - if (options.ticketKeys) { - c.context.setTicketKeys(options.ticketKeys); + if (ticketKeys !== undefined) { + if (!isArrayBufferView(ticketKeys)) { + throw new ERR_INVALID_ARG_TYPE( + 'options.ticketKeys', + ['Buffer', 'TypedArray', 'DataView'], + ticketKeys); + } + if (ticketKeys.byteLength !== 48) { + throw new ERR_INVALID_ARG_VALUE( + 'options.ticketKeys', + ticketKeys.byteLenth, + 'must be exactly 48 bytes'); + } + c.context.setTicketKeys(ticketKeys); } - if (options.sessionTimeout) { - c.context.setSessionTimeout(options.sessionTimeout); + if (sessionTimeout !== undefined) { + validateInt32(sessionTimeout, 'options.sessionTimeout'); + c.context.setSessionTimeout(sessionTimeout); } return c; @@ -322,12 +394,13 @@ exports.translatePeerCertificate = function translatePeerCertificate(c) { c.infoAccess = ObjectCreate(null); // XXX: More key validation? - info.replace(/([^\n:]*):([^\n]*)(?:\n|$)/g, (all, key, val) => { - if (key in c.infoAccess) - c.infoAccess[key].push(val); - else - c.infoAccess[key] = [val]; - }); + StringPrototypeReplace(info, /([^\n:]*):([^\n]*)(?:\n|$)/g, + (all, key, val) => { + if (key in c.infoAccess) + ArrayPrototypePush(c.infoAccess[key], val); + else + c.infoAccess[key] = [val]; + }); } return c; }; diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index c5f30c01fa18e7..adbefa4839826d 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -22,10 +22,18 @@ 'use strict'; const { + ArrayPrototypeForEach, + ArrayPrototypeJoin, + ArrayPrototypePush, + FunctionPrototype, ObjectAssign, ObjectDefineProperty, ObjectSetPrototypeOf, + ReflectApply, RegExp, + RegExpPrototypeTest, + StringPrototypeReplace, + StringPrototypeSlice, Symbol, SymbolFor, } = primordials; @@ -96,7 +104,7 @@ const kPskIdentityHint = Symbol('pskidentityhint'); const kPendingSession = Symbol('pendingSession'); const kIsVerified = Symbol('verified'); -const noop = () => {}; +const noop = FunctionPrototype; let ipServernameWarned = false; let tlsTracingWarned = false; @@ -408,7 +416,8 @@ function onerror(err) { owner.destroy(err); } else if (owner._tlsOptions.isServer && owner._rejectUnauthorized && - /peer did not return a certificate/.test(err.message)) { + RegExpPrototypeTest(/peer did not return a certificate/, + err.message)) { // Ignore server's authorization errors owner.destroy(); } else { @@ -496,13 +505,14 @@ function TLSSocket(socket, opts) { // distinguishable from regular ones. this.encrypted = true; - net.Socket.call(this, { + ReflectApply(net.Socket, this, [{ handle: this._wrapHandle(wrap), allowHalfOpen: socket ? socket.allowHalfOpen : tlsOptions.allowHalfOpen, pauseOnCreate: tlsOptions.pauseOnConnect, manualStart: true, highWaterMark: tlsOptions.highWaterMark, - }); + onread: !socket ? tlsOptions.onread : null, + }]); // Proxy for API compatibility this.ssl = this._handle; // C++ TLSWrap object @@ -534,7 +544,7 @@ const proxiedMethods = [ function makeMethodProxy(name) { return function methodProxy(...args) { if (this._parent[name]) - return this._parent[name].apply(this._parent, args); + return ReflectApply(this._parent[name], this._parent, args); }; } for (const proxiedMethod of proxiedMethods) { @@ -992,12 +1002,12 @@ TLSSocket.prototype.getCertificate = function() { function makeSocketMethodProxy(name) { return function socketMethodProxy(...args) { if (this._handle) - return this._handle[name].apply(this._handle, args); + return ReflectApply(this._handle[name], this._handle, args); return null; }; } -[ +ArrayPrototypeForEach([ 'getCipher', 'getSharedSigalgs', 'getEphemeralKeyInfo', @@ -1008,7 +1018,7 @@ function makeSocketMethodProxy(name) { 'getTLSTicket', 'isSessionReused', 'enableTrace', -].forEach((method) => { +], (method) => { TLSSocket.prototype[method] = makeSocketMethodProxy(method); }); @@ -1208,7 +1218,7 @@ function Server(options, listener) { } // constructor call - net.Server.call(this, options, tlsConnectionListener); + ReflectApply(net.Server, this, [options, tlsConnectionListener]); if (listener) { this.on('secureConnection', listener); @@ -1308,10 +1318,10 @@ Server.prototype.setSecureContext = function(options) { if (options.sessionIdContext) { this.sessionIdContext = options.sessionIdContext; } else { - this.sessionIdContext = crypto.createHash('sha1') - .update(process.argv.join(' ')) - .digest('hex') - .slice(0, 32); + this.sessionIdContext = StringPrototypeSlice( + crypto.createHash('sha1') + .update(ArrayPrototypeJoin(process.argv, ' ')) + .digest('hex'), 0, 32); } if (options.sessionTimeout) @@ -1320,6 +1330,9 @@ Server.prototype.setSecureContext = function(options) { if (options.ticketKeys) this.ticketKeys = options.ticketKeys; + this.privateKeyIdentifier = options.privateKeyIdentifier; + this.privateKeyEngine = options.privateKeyEngine; + this._sharedCreds = tls.createSecureContext({ pfx: this.pfx, key: this.key, @@ -1339,7 +1352,9 @@ Server.prototype.setSecureContext = function(options) { crl: this.crl, sessionIdContext: this.sessionIdContext, ticketKeys: this.ticketKeys, - sessionTimeout: this.sessionTimeout + sessionTimeout: this.sessionTimeout, + privateKeyIdentifier: this.privateKeyIdentifier, + privateKeyEngine: this.privateKeyEngine, }); }; @@ -1398,13 +1413,18 @@ Server.prototype.setOptions = deprecate(function(options) { if (options.sessionIdContext) { this.sessionIdContext = options.sessionIdContext; } else { - this.sessionIdContext = crypto.createHash('sha1') - .update(process.argv.join(' ')) - .digest('hex') - .slice(0, 32); + this.sessionIdContext = StringPrototypeSlice( + crypto.createHash('sha1') + .update(ArrayPrototypeJoin(process.argv, ' ')) + .digest('hex'), 0, 32); } if (options.pskCallback) this[kPskCallback] = options.pskCallback; if (options.pskIdentityHint) this[kPskIdentityHint] = options.pskIdentityHint; + if (options.sigalgs) this.sigalgs = options.sigalgs; + if (options.privateKeyIdentifier !== undefined) + this.privateKeyIdentifier = options.privateKeyIdentifier; + if (options.privateKeyEngine !== undefined) + this.privateKeyEngine = options.privateKeyEngine; }, 'Server.prototype.setOptions() is deprecated', 'DEP0122'); // SNI Contexts High-Level API @@ -1413,11 +1433,12 @@ Server.prototype.addContext = function(servername, context) { throw new ERR_TLS_REQUIRED_SERVER_NAME(); } - const re = new RegExp('^' + - servername.replace(/([.^$+?\-\\[\]{}])/g, '\\$1') - .replace(/\*/g, '[^.]*') + - '$'); - this._contexts.push([re, tls.createSecureContext(context).context]); + const re = new RegExp('^' + StringPrototypeReplace( + StringPrototypeReplace(servername, /([.^$+?\-\\[\]{}])/g, '\\$1'), + /\*/g, '[^.]*' + ) + '$'); + ArrayPrototypePush(this._contexts, + [re, tls.createSecureContext(context).context]); }; Server.prototype[EE.captureRejectionSymbol] = function( @@ -1428,8 +1449,8 @@ Server.prototype[EE.captureRejectionSymbol] = function( sock.destroy(err); break; default: - net.Server.prototype[SymbolFor('nodejs.rejection')] - .call(this, err, event, sock); + ReflectApply(net.Server.prototype[SymbolFor('nodejs.rejection')], this, + [err, event, sock]); } }; @@ -1437,7 +1458,7 @@ function SNICallback(servername, callback) { const contexts = this.server._contexts; for (const elem of contexts) { - if (elem[0].test(servername)) { + if (RegExpPrototypeTest(elem[0], servername)) { callback(null, elem[1]); return; } @@ -1592,6 +1613,7 @@ exports.connect = function connect(...args) { enableTrace: options.enableTrace, pskCallback: options.pskCallback, highWaterMark: options.highWaterMark, + onread: options.onread, }); tlssock[kConnectOptions] = options; diff --git a/lib/assert.js b/lib/assert.js index 2b38c8fcade8c9..8ca9b211394ba8 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -21,16 +21,29 @@ 'use strict'; const { + ArrayPrototypeIndexOf, + ArrayPrototypeJoin, + ArrayPrototypePush, + ArrayPrototypeShift, + ArrayPrototypeSlice, Error, + ErrorCaptureStackTrace, + FunctionPrototypeBind, + NumberIsNaN, ObjectAssign, ObjectIs, ObjectKeys, ObjectPrototypeIsPrototypeOf, - Map, - NumberIsNaN, + ReflectApply, RegExpPrototypeTest, + SafeMap, String, + StringPrototypeCharCodeAt, + StringPrototypeIncludes, + StringPrototypeIndexOf, + StringPrototypeReplace, StringPrototypeSlice, + StringPrototypeSplit, StringPrototypeStartsWith, } = primordials; @@ -53,7 +66,7 @@ const { EOL } = require('internal/constants'); const { NativeModule } = require('internal/bootstrap/loaders'); const { isError } = require('internal/util'); -const errorCache = new Map(); +const errorCache = new SafeMap(); const CallTracker = require('internal/assert/calltracker'); let isDeepEqual; @@ -82,7 +95,7 @@ const meta = [ '\\u001e', '\\u001f' ]; -const escapeFn = (str) => meta[str.charCodeAt(0)]; +const escapeFn = (str) => meta[StringPrototypeCharCodeAt(str, 0)]; let warned = false; @@ -223,8 +236,6 @@ function parseCode(code, offset) { require('internal/deps/acorn-plugins/acorn-private-methods/index'); const classFields = require('internal/deps/acorn-plugins/acorn-class-fields/index'); - const numericSeparator = - require('internal/deps/acorn-plugins/acorn-numeric-separator/index'); const staticClassFeatures = require('internal/deps/acorn-plugins/acorn-static-class-features/index'); @@ -233,17 +244,16 @@ function parseCode(code, offset) { const Parser = acorn.Parser.extend( privateMethods, classFields, - numericSeparator, staticClassFeatures ); - parseExpressionAt = Parser.parseExpressionAt.bind(Parser); + parseExpressionAt = FunctionPrototypeBind(Parser.parseExpressionAt, Parser); } let node; let start = 0; // Parse the read code until the correct expression is found. do { try { - node = parseExpressionAt(code, start, { ecmaVersion: 11 }); + node = parseExpressionAt(code, start, { ecmaVersion: 'latest' }); start = node.end + 1 || start; // Find the CallExpression in the tree. node = findNodeAround(node, offset, 'CallExpression'); @@ -261,8 +271,9 @@ function parseCode(code, offset) { return [ node.node.start, - code.slice(node.node.start, node.node.end) - .replace(escapeSequencesRegExp, escapeFn) + StringPrototypeReplace(StringPrototypeSlice(code, + node.node.start, node.node.end), + escapeSequencesRegExp, escapeFn) ]; } @@ -274,8 +285,7 @@ function getErrMessage(message, fn) { // We only need the stack trace. To minimize the overhead use an object // instead of an error. const err = {}; - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(err, fn); + ErrorCaptureStackTrace(err, fn); Error.stackTraceLimit = tmpLimit; overrideStackTrace.set(err, (_, stack) => stack); @@ -327,23 +337,24 @@ function getErrMessage(message, fn) { decoder.end(); } else { for (let i = 0; i < line; i++) { - code = code.slice(code.indexOf('\n') + 1); + code = StringPrototypeSlice(code, + StringPrototypeIndexOf(code, '\n') + 1); } [column, message] = parseCode(code, column); } // Always normalize indentation, otherwise the message could look weird. - if (message.includes('\n')) { + if (StringPrototypeIncludes(message, '\n')) { if (EOL === '\r\n') { - message = message.replace(/\r\n/g, '\n'); + message = StringPrototypeReplace(message, /\r\n/g, '\n'); } - const frames = message.split('\n'); - message = frames.shift(); + const frames = StringPrototypeSplit(message, '\n'); + message = ArrayPrototypeShift(frames); for (const frame of frames) { let pos = 0; while (pos < column && (frame[pos] === ' ' || frame[pos] === '\t')) { pos++; } - message += `\n ${frame.slice(pos)}`; + message += `\n ${StringPrototypeSlice(frame, pos)}`; } } message = `The expression evaluated to a falsy value:\n\n ${message}\n`; @@ -609,7 +620,7 @@ function expectedException(actual, expected, message, fn) { // Special handle errors to make sure the name and the message are // compared as well. if (expected instanceof Error) { - keys.push('name', 'message'); + ArrayPrototypePush(keys, 'name', 'message'); } else if (keys.length === 0) { throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object'); @@ -652,7 +663,7 @@ function expectedException(actual, expected, message, fn) { throwError = true; } else { // Check validation functions return value. - const res = expected.call({}, actual); + const res = ReflectApply(expected, {}, [actual]); if (res !== true) { if (!message) { generatedMessage = true; @@ -794,10 +805,10 @@ function hasMatchingError(actual, expected) { if (expected.prototype !== undefined && actual instanceof expected) { return true; } - if (Error.isPrototypeOf(expected)) { + if (ObjectPrototypeIsPrototypeOf(Error, expected)) { return false; } - return expected.call({}, actual) === true; + return ReflectApply(expected, {}, [actual]) === true; } function expectsNoError(stackStartFn, actual, error, message) { @@ -869,20 +880,21 @@ assert.ifError = function ifError(err) { // This will remove any duplicated frames from the error frames taken // from within `ifError` and add the original error frames to the newly // created ones. - const tmp2 = origStack.split('\n'); - tmp2.shift(); + const tmp2 = StringPrototypeSplit(origStack, '\n'); + ArrayPrototypeShift(tmp2); // Filter all frames existing in err.stack. - let tmp1 = newErr.stack.split('\n'); + let tmp1 = StringPrototypeSplit(newErr.stack, '\n'); for (const errFrame of tmp2) { // Find the first occurrence of the frame. - const pos = tmp1.indexOf(errFrame); + const pos = ArrayPrototypeIndexOf(tmp1, errFrame); if (pos !== -1) { // Only keep new frames. - tmp1 = tmp1.slice(0, pos); + tmp1 = ArrayPrototypeSlice(tmp1, 0, pos); break; } } - newErr.stack = `${tmp1.join('\n')}\n${tmp2.join('\n')}`; + newErr.stack = + `${ArrayPrototypeJoin(tmp1, '\n')}\n${ArrayPrototypeJoin(tmp2, '\n')}`; } throw newErr; diff --git a/lib/async_hooks.js b/lib/async_hooks.js index 7dd888b61f79f9..90b48ebe4b2754 100644 --- a/lib/async_hooks.js +++ b/lib/async_hooks.js @@ -1,6 +1,11 @@ 'use strict'; const { + ArrayPrototypeIncludes, + ArrayPrototypeIndexOf, + ArrayPrototypePush, + ArrayPrototypeSplice, + FunctionPrototypeBind, NumberIsSafeInteger, ObjectDefineProperties, ObjectIs, @@ -85,7 +90,7 @@ class AsyncHook { const [hooks_array, hook_fields] = getHookArrays(); // Each hook is only allowed to be added once. - if (hooks_array.includes(this)) + if (ArrayPrototypeIncludes(hooks_array, this)) return this; const prev_kTotals = hook_fields[kTotals]; @@ -99,7 +104,7 @@ class AsyncHook { hook_fields[kTotals] += hook_fields[kDestroy] += +!!this[destroy_symbol]; hook_fields[kTotals] += hook_fields[kPromiseResolve] += +!!this[promise_resolve_symbol]; - hooks_array.push(this); + ArrayPrototypePush(hooks_array, this); if (prev_kTotals === 0 && hook_fields[kTotals] > 0) { enableHooks(); @@ -113,7 +118,7 @@ class AsyncHook { disable() { const [hooks_array, hook_fields] = getHookArrays(); - const index = hooks_array.indexOf(this); + const index = ArrayPrototypeIndexOf(hooks_array, this); if (index === -1) return this; @@ -125,7 +130,7 @@ class AsyncHook { hook_fields[kTotals] += hook_fields[kDestroy] -= +!!this[destroy_symbol]; hook_fields[kTotals] += hook_fields[kPromiseResolve] -= +!!this[promise_resolve_symbol]; - hooks_array.splice(index, 1); + ArrayPrototypeSplice(hooks_array, index, 1); if (prev_kTotals > 0 && hook_fields[kTotals] === 0) { disableHooks(); @@ -218,7 +223,7 @@ class AsyncResource { bind(fn) { if (typeof fn !== 'function') throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn); - const ret = this.runInAsyncScope.bind(this, fn); + const ret = FunctionPrototypeBind(this.runInAsyncScope, this, fn); ObjectDefineProperties(ret, { 'length': { configurable: true, @@ -264,13 +269,22 @@ class AsyncLocalStorage { if (this.enabled) { this.enabled = false; // If this.enabled, the instance must be in storageList - storageList.splice(storageList.indexOf(this), 1); + ArrayPrototypeSplice(storageList, + ArrayPrototypeIndexOf(storageList, this), 1); if (storageList.length === 0) { storageHook.disable(); } } } + _enable() { + if (!this.enabled) { + this.enabled = true; + ArrayPrototypePush(storageList, this); + storageHook.enable(); + } + } + // Propagate the context from a parent resource to a child one _propagate(resource, triggerResource) { const store = triggerResource[this.kResourceStore]; @@ -280,11 +294,7 @@ class AsyncLocalStorage { } enterWith(store) { - if (!this.enabled) { - this.enabled = true; - storageList.push(this); - storageHook.enable(); - } + this._enable(); const resource = executionAsyncResource(); resource[this.kResourceStore] = store; } @@ -308,11 +318,11 @@ class AsyncLocalStorage { if (!this.enabled) { return callback(...args); } - this.enabled = false; + this.disable(); try { return callback(...args); } finally { - this.enabled = true; + this._enable(); } } diff --git a/lib/buffer.js b/lib/buffer.js index 0daf5636edad46..d3034a46c60b29 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -24,6 +24,7 @@ const { Array, ArrayIsArray, + ArrayPrototypeForEach, Error, MathFloor, MathMin, @@ -34,11 +35,17 @@ const { ObjectCreate, ObjectDefineProperties, ObjectDefineProperty, - ObjectGetOwnPropertyDescriptor, - ObjectGetPrototypeOf, ObjectSetPrototypeOf, + StringPrototypeCharCodeAt, + StringPrototypeReplace, + StringPrototypeSlice, + StringPrototypeToLowerCase, + StringPrototypeTrim, SymbolSpecies, SymbolToPrimitive, + TypedArrayPrototypeGetByteLength, + TypedArrayPrototypeFill, + TypedArrayPrototypeSet, Uint8Array, Uint8ArrayPrototype, } = primordials; @@ -108,13 +115,6 @@ const { createUnsafeBuffer } = require('internal/buffer'); -const TypedArrayPrototype = ObjectGetPrototypeOf(Uint8ArrayPrototype); - -const TypedArrayProto_byteLength = - ObjectGetOwnPropertyDescriptor(TypedArrayPrototype, - 'byteLength').get; -const TypedArrayFill = TypedArrayPrototype.fill; - FastBuffer.prototype.constructor = Buffer; Buffer.prototype = FastBuffer.prototype; addBufferPrototypeMethods(Buffer.prototype); @@ -246,7 +246,7 @@ function _copyActual(source, target, targetStart, sourceStart, sourceEnd) { if (sourceStart !== 0 || sourceEnd < source.length) source = new Uint8Array(source.buffer, source.byteOffset + sourceStart, nb); - target.set(source, targetStart); + TypedArrayPrototypeSet(target, source, targetStart); return nb; } @@ -480,7 +480,7 @@ function fromArrayLike(obj) { if (obj.length > (poolSize - poolOffset)) createPool(); const b = new FastBuffer(allocPool, poolOffset, obj.length); - b.set(obj, 0); + TypedArrayPrototypeSet(b, obj, 0); poolOffset += obj.length; alignPool(); return b; @@ -566,7 +566,7 @@ Buffer.concat = function concat(list, length) { // Zero-fill the remaining bytes if the specified `length` was more than // the actual total length, i.e. if we have some remaining allocated bytes // there were not initialized. - TypedArrayFill.call(buffer, 0, pos, length); + TypedArrayPrototypeFill(buffer, 0, pos, length); } return buffer; @@ -574,9 +574,9 @@ Buffer.concat = function concat(list, length) { function base64ByteLength(str, bytes) { // Handle padding - if (str.charCodeAt(bytes - 1) === 0x3D) + if (StringPrototypeCharCodeAt(str, bytes - 1) === 0x3D) bytes--; - if (bytes > 1 && str.charCodeAt(bytes - 1) === 0x3D) + if (bytes > 1 && StringPrototypeCharCodeAt(str, bytes - 1) === 0x3D) bytes--; // Base64 ratio: 3/4 @@ -666,7 +666,7 @@ function getEncodingOps(encoding) { case 4: if (encoding === 'utf8') return encodingOps.utf8; if (encoding === 'ucs2') return encodingOps.ucs2; - encoding = encoding.toLowerCase(); + encoding = StringPrototypeToLowerCase(encoding); if (encoding === 'utf8') return encodingOps.utf8; if (encoding === 'ucs2') return encodingOps.ucs2; break; @@ -674,30 +674,32 @@ function getEncodingOps(encoding) { if (encoding === 'utf-8') return encodingOps.utf8; if (encoding === 'ascii') return encodingOps.ascii; if (encoding === 'ucs-2') return encodingOps.ucs2; - encoding = encoding.toLowerCase(); + encoding = StringPrototypeToLowerCase(encoding); if (encoding === 'utf-8') return encodingOps.utf8; if (encoding === 'ascii') return encodingOps.ascii; if (encoding === 'ucs-2') return encodingOps.ucs2; break; case 7: - if (encoding === 'utf16le' || encoding.toLowerCase() === 'utf16le') + if (encoding === 'utf16le' || + StringPrototypeToLowerCase(encoding) === 'utf16le') return encodingOps.utf16le; break; case 8: - if (encoding === 'utf-16le' || encoding.toLowerCase() === 'utf-16le') + if (encoding === 'utf-16le' || + StringPrototypeToLowerCase(encoding) === 'utf-16le') return encodingOps.utf16le; break; case 6: if (encoding === 'latin1' || encoding === 'binary') return encodingOps.latin1; if (encoding === 'base64') return encodingOps.base64; - encoding = encoding.toLowerCase(); + encoding = StringPrototypeToLowerCase(encoding); if (encoding === 'latin1' || encoding === 'binary') return encodingOps.latin1; if (encoding === 'base64') return encodingOps.base64; break; case 3: - if (encoding === 'hex' || encoding.toLowerCase() === 'hex') + if (encoding === 'hex' || StringPrototypeToLowerCase(encoding) === 'hex') return encodingOps.hex; break; } @@ -810,28 +812,30 @@ Buffer.prototype[customInspectSymbol] = function inspect(recurseTimes, ctx) { const max = INSPECT_MAX_BYTES; const actualMax = MathMin(max, this.length); const remaining = this.length - max; - let str = this.hexSlice(0, actualMax).replace(/(.{2})/g, '$1 ').trim(); + let str = StringPrototypeTrim(StringPrototypeReplace( + this.hexSlice(0, actualMax), /(.{2})/g, '$1 ')); if (remaining > 0) str += ` ... ${remaining} more byte${remaining > 1 ? 's' : ''}`; // Inspect special properties as well, if possible. if (ctx) { let extras = false; const filter = ctx.showHidden ? ALL_PROPERTIES : ONLY_ENUMERABLE; - const obj = getOwnNonIndexProperties(this, filter).reduce((obj, key) => { - extras = true; - obj[key] = this[key]; - return obj; - }, ObjectCreate(null)); + const obj = ObjectCreate(null); + ArrayPrototypeForEach(getOwnNonIndexProperties(this, filter), + (key) => { + extras = true; + obj[key] = this[key]; + }); if (extras) { if (this.length !== 0) str += ', '; // '[Object: null prototype] {'.length === 26 // This is guarded with a test. - str += utilInspect(obj, { + str += StringPrototypeSlice(utilInspect(obj, { ...ctx, breakLength: Infinity, compact: true - }).slice(27, -2); + }), 27, -2); } } return `<${this.constructor.name} ${str}>`; @@ -975,12 +979,12 @@ function _fill(buf, value, offset, end, encoding) { } else if (value.length === 1) { // Fast path: If `value` fits into a single byte, use that numeric value. if (normalizedEncoding === 'utf8') { - const code = value.charCodeAt(0); + const code = StringPrototypeCharCodeAt(value, 0); if (code < 128) { value = code; } } else if (normalizedEncoding === 'latin1') { - value = value.charCodeAt(0); + value = StringPrototypeCharCodeAt(value, 0); } } } else { @@ -1005,12 +1009,12 @@ function _fill(buf, value, offset, end, encoding) { if (typeof value === 'number') { // OOB check - const byteLen = TypedArrayProto_byteLength.call(buf); + const byteLen = TypedArrayPrototypeGetByteLength(buf); const fillLength = end - offset; if (offset > end || fillLength + offset > byteLen) throw new ERR_BUFFER_OUT_OF_BOUNDS(); - TypedArrayFill.call(buf, value, offset, end); + TypedArrayPrototypeFill(buf, value, offset, end); } else { const res = bindingFill(buf, value, offset, end, encoding); if (res < 0) { diff --git a/lib/child_process.js b/lib/child_process.js index 24c5e809ad62c1..b67ea1c7f05eca 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -23,13 +23,25 @@ const { ArrayIsArray, + ArrayPrototypeFilter, + ArrayPrototypeIncludes, + ArrayPrototypeJoin, + ArrayPrototypeLastIndexOf, + ArrayPrototypePush, + ArrayPrototypeSlice, + ArrayPrototypeSort, + ArrayPrototypeSplice, + ArrayPrototypeUnshift, Error, NumberIsInteger, ObjectAssign, ObjectDefineProperty, ObjectPrototypeHasOwnProperty, Promise, - Set, + RegExpPrototypeTest, + SafeSet, + StringPrototypeSlice, + StringPrototypeToUpperCase, } = primordials; const { @@ -46,15 +58,24 @@ let debug = require('internal/util/debuglog').debuglog( ); const { Buffer } = require('buffer'); const { Pipe, constants: PipeConstants } = internalBinding('pipe_wrap'); + +const { + AbortError, + codes: errorCodes, +} = require('internal/errors'); const { ERR_INVALID_ARG_VALUE, ERR_CHILD_PROCESS_IPC_REQUIRED, ERR_CHILD_PROCESS_STDIO_MAXBUFFER, ERR_INVALID_ARG_TYPE, - ERR_OUT_OF_RANGE -} = require('internal/errors').codes; + ERR_OUT_OF_RANGE, +} = errorCodes; const { clearTimeout, setTimeout } = require('timers'); -const { validateString, isInt32 } = require('internal/validators'); +const { + validateString, + isInt32, + validateAbortSignal, +} = require('internal/validators'); const child_process = require('internal/child_process'); const { getValidStdio, @@ -94,15 +115,15 @@ function fork(modulePath /* , args, options */) { execArgv = options.execArgv || process.execArgv; if (execArgv === process.execArgv && process._eval != null) { - const index = execArgv.lastIndexOf(process._eval); + const index = ArrayPrototypeLastIndexOf(execArgv, process._eval); if (index > 0) { // Remove the -e switch to avoid fork bombing ourselves. - execArgv = execArgv.slice(); - execArgv.splice(index - 1, 2); + execArgv = ArrayPrototypeSlice(execArgv); + ArrayPrototypeSplice(execArgv, index - 1, 2); } } - args = execArgv.concat([modulePath], args); + args = [...execArgv, modulePath, ...args]; if (typeof options.stdio === 'string') { options.stdio = stdioStringToArray(options.stdio, 'ipc'); @@ -112,14 +133,14 @@ function fork(modulePath /* , args, options */) { options.stdio = stdioStringToArray( options.silent ? 'pipe' : 'inherit', 'ipc'); - } else if (!options.stdio.includes('ipc')) { + } else if (!ArrayPrototypeIncludes(options.stdio, 'ipc')) { throw new ERR_CHILD_PROCESS_IPC_REQUIRED('options.stdio'); } options.execPath = options.execPath || process.execPath; options.shell = false; - return spawn(options.execPath, args, options); + return spawnWithSignal(options.execPath, args, options); } function _forkChild(fd, serializationMode) { @@ -233,6 +254,9 @@ function execFile(file /* , args, options, callback */) { // Validate maxBuffer, if present. validateMaxBuffer(options.maxBuffer); + // Validate signal, if present + validateAbortSignal(options.signal, 'options.signal'); + options.killSignal = sanitizeKillSignal(options.killSignal); const child = spawn(file, args, { @@ -282,7 +306,7 @@ function execFile(file /* , args, options, callback */) { child.stdout && child.stdout.readableEncoding )) { - stdout = _stdout.join(''); + stdout = ArrayPrototypeJoin(_stdout, ''); } else { stdout = Buffer.concat(_stdout); } @@ -291,7 +315,7 @@ function execFile(file /* , args, options, callback */) { child.stderr && child.stderr.readableEncoding )) { - stderr = _stderr.join(''); + stderr = ArrayPrototypeJoin(_stderr, ''); } else { stderr = Buffer.concat(_stderr); } @@ -302,7 +326,7 @@ function execFile(file /* , args, options, callback */) { } if (args.length !== 0) - cmd += ` ${args.join(' ')}`; + cmd += ` ${ArrayPrototypeJoin(args, ' ')}`; if (!ex) { // eslint-disable-next-line no-restricted-syntax @@ -350,6 +374,19 @@ function execFile(file /* , args, options, callback */) { timeoutId = null; }, options.timeout); } + if (options.signal) { + if (options.signal.aborted) { + process.nextTick(() => kill()); + } else { + const childController = new AbortController(); + options.signal.addEventListener('abort', () => { + if (!ex) + ex = new AbortError(); + kill(); + }, { signal: childController.signal }); + child.once('close', () => childController.abort()); + } + } if (child.stdout) { if (encoding) @@ -360,16 +397,18 @@ function execFile(file /* , args, options, callback */) { const length = encoding ? Buffer.byteLength(chunk, encoding) : chunk.length; + const slice = encoding ? StringPrototypeSlice : + (buf, ...args) => buf.slice(...args); stdoutLen += length; if (stdoutLen > options.maxBuffer) { const truncatedLen = options.maxBuffer - (stdoutLen - length); - _stdout.push(chunk.slice(0, truncatedLen)); + ArrayPrototypePush(_stdout, slice(chunk, 0, truncatedLen)); ex = new ERR_CHILD_PROCESS_STDIO_MAXBUFFER('stdout'); kill(); } else { - _stdout.push(chunk); + ArrayPrototypePush(_stdout, chunk); } }); } @@ -387,7 +426,8 @@ function execFile(file /* , args, options, callback */) { if (stderrLen > options.maxBuffer) { const truncatedLen = options.maxBuffer - (stderrLen - length); - _stderr.push(chunk.slice(0, truncatedLen)); + ArrayPrototypePush(_stderr, + chunk.slice(0, truncatedLen)); ex = new ERR_CHILD_PROCESS_STDIO_MAXBUFFER('stderr'); kill(); @@ -415,7 +455,7 @@ function normalizeSpawnArguments(file, args, options) { throw new ERR_INVALID_ARG_VALUE('file', file, 'cannot be empty'); if (ArrayIsArray(args)) { - args = args.slice(0); + args = ArrayPrototypeSlice(args); } else if (args == null) { args = []; } else if (typeof args !== 'object') { @@ -484,7 +524,7 @@ function normalizeSpawnArguments(file, args, options) { } if (options.shell) { - const command = [file].concat(args).join(' '); + const command = ArrayPrototypeJoin([file, ...args], ' '); // Set the shell, switches, and commands. if (process.platform === 'win32') { if (typeof options.shell === 'string') @@ -492,7 +532,7 @@ function normalizeSpawnArguments(file, args, options) { else file = process.env.comspec || 'cmd.exe'; // '/d /s /c' is used only for cmd.exe. - if (/^(?:.*\\)?cmd(?:\.exe)?$/i.test(file)) { + if (RegExpPrototypeTest(/^(?:.*\\)?cmd(?:\.exe)?$/i, file)) { args = ['/d', '/s', '/c', `"${command}"`]; windowsVerbatimArguments = true; } else { @@ -510,9 +550,9 @@ function normalizeSpawnArguments(file, args, options) { } if (typeof options.argv0 === 'string') { - args.unshift(options.argv0); + ArrayPrototypeUnshift(args, options.argv0); } else { - args.unshift(file); + ArrayPrototypeUnshift(args, file); } const env = options.env || process.env; @@ -528,27 +568,30 @@ function normalizeSpawnArguments(file, args, options) { let envKeys = []; // Prototype values are intentionally included. for (const key in env) { - envKeys.push(key); + ArrayPrototypePush(envKeys, key); } if (process.platform === 'win32') { // On Windows env keys are case insensitive. Filter out duplicates, // keeping only the first one (in lexicographic order) - const sawKey = new Set(); - envKeys = envKeys.sort().filter((key) => { - const uppercaseKey = key.toUpperCase(); - if (sawKey.has(uppercaseKey)) { - return false; + const sawKey = new SafeSet(); + envKeys = ArrayPrototypeFilter( + ArrayPrototypeSort(envKeys), + (key) => { + const uppercaseKey = StringPrototypeToUpperCase(key); + if (sawKey.has(uppercaseKey)) { + return false; + } + sawKey.add(uppercaseKey); + return true; } - sawKey.add(uppercaseKey); - return true; - }); + ); } for (const key of envKeys) { const value = env[key]; if (value !== undefined) { - envPairs.push(`${key}=${value}`); + ArrayPrototypePush(envPairs, `${key}=${value}`); } } @@ -629,7 +672,7 @@ function checkExecSyncError(ret, args, cmd) { err = ret.error; } else if (ret.status !== 0) { let msg = 'Command failed: '; - msg += cmd || args.join(' '); + msg += cmd || ArrayPrototypeJoin(args, ' '); if (ret.stderr && ret.stderr.length > 0) msg += `\n${ret.stderr.toString()}`; // eslint-disable-next-line no-restricted-syntax @@ -646,7 +689,8 @@ function execFileSync(command, args, options) { options = normalizeSpawnArguments(command, args, options); const inheritStderr = !options.stdio; - const ret = spawnSync(options.file, options.args.slice(1), options); + const ret = spawnSync(options.file, + ArrayPrototypeSlice(options.args, 1), options); if (inheritStderr && ret.stderr) process.stderr.write(ret.stderr); @@ -704,6 +748,30 @@ function sanitizeKillSignal(killSignal) { } } +// This level of indirection is here because the other child_process methods +// call spawn internally but should use different cancellation logic. +function spawnWithSignal(file, args, options) { + const child = spawn(file, args, options); + + if (options && options.signal) { + // Validate signal, if present + validateAbortSignal(options.signal, 'options.signal'); + function kill() { + if (child._handle) { + child.kill('SIGTERM'); + child.emit('error', new AbortError()); + } + } + if (options.signal.aborted) { + process.nextTick(kill); + } else { + options.signal.addEventListener('abort', kill); + const remove = () => options.signal.removeEventListener('abort', kill); + child.once('close', remove); + } + } + return child; +} module.exports = { _forkChild, ChildProcess, @@ -712,6 +780,6 @@ module.exports = { execFileSync, execSync, fork, - spawn, + spawn: spawnWithSignal, spawnSync }; diff --git a/lib/dgram.js b/lib/dgram.js index 1c1b4781617695..79501847784d1f 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -24,8 +24,12 @@ const { Array, ArrayIsArray, + ArrayPrototypePush, + FunctionPrototypeBind, + FunctionPrototypeCall, ObjectDefineProperty, ObjectSetPrototypeOf, + ReflectApply, } = primordials; const errors = require('internal/errors'); @@ -87,7 +91,7 @@ const exceptionWithHostPort = errors.exceptionWithHostPort; function Socket(type, listener) { - EventEmitter.call(this); + FunctionPrototypeCall(EventEmitter, this); let lookup; let recvBufferSize; let sendBufferSize; @@ -220,8 +224,8 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) { } function onListening() { - removeListeners.call(this); - cb.call(this); + FunctionPrototypeCall(removeListeners, this); + FunctionPrototypeCall(cb, this); } this.on('error', removeListeners); @@ -369,11 +373,12 @@ Socket.prototype.connect = function(port, address, callback) { this.bind({ port: 0, exclusive: true }, null); if (state.bindState !== BIND_STATE_BOUND) { - enqueue(this, _connect.bind(this, port, address, callback)); + enqueue(this, FunctionPrototypeBind(_connect, this, + port, address, callback)); return; } - _connect.call(this, port, address, callback); + ReflectApply(_connect, this, [port, address, callback]); }; @@ -498,13 +503,13 @@ function enqueue(self, toEnqueue) { self.once(EventEmitter.errorMonitor, onListenError); self.once('listening', onListenSuccess); } - state.queue.push(toEnqueue); + ArrayPrototypePush(state.queue, toEnqueue); } function onListenSuccess() { this.removeListener(EventEmitter.errorMonitor, onListenError); - clearQueue.call(this); + FunctionPrototypeCall(clearQueue, this); } @@ -625,12 +630,13 @@ Socket.prototype.send = function(buffer, this.bind({ port: 0, exclusive: true }, null); if (list.length === 0) - list.push(Buffer.alloc(0)); + ArrayPrototypePush(list, Buffer.alloc(0)); // If the socket hasn't been bound yet, push the outbound packet onto the // send queue and send after binding is complete. if (state.bindState !== BIND_STATE_BOUND) { - enqueue(this, this.send.bind(this, list, port, address, callback)); + enqueue(this, FunctionPrototypeBind(this.send, this, + list, port, address, callback)); return; } @@ -712,7 +718,7 @@ Socket.prototype.close = function(callback) { this.on('close', callback); if (queue !== undefined) { - queue.push(this.close.bind(this)); + ArrayPrototypePush(queue, FunctionPrototypeBind(this.close, this)); return this; } diff --git a/lib/diagnostics_channel.js b/lib/diagnostics_channel.js new file mode 100644 index 00000000000000..c29c9ff0052405 --- /dev/null +++ b/lib/diagnostics_channel.js @@ -0,0 +1,121 @@ +'use strict'; + +const { + ArrayPrototypeIndexOf, + ArrayPrototypePush, + ArrayPrototypeSplice, + ObjectCreate, + ObjectGetPrototypeOf, + ObjectSetPrototypeOf, + SymbolHasInstance, +} = primordials; + +const { + codes: { + ERR_INVALID_ARG_TYPE, + } +} = require('internal/errors'); + +const { triggerUncaughtException } = internalBinding('errors'); + +const { WeakReference } = internalBinding('util'); + +// TODO(qard): should there be a C++ channel interface? +class ActiveChannel { + subscribe(subscription) { + if (typeof subscription !== 'function') { + throw new ERR_INVALID_ARG_TYPE('subscription', ['function'], + subscription); + } + ArrayPrototypePush(this._subscribers, subscription); + } + + unsubscribe(subscription) { + const index = ArrayPrototypeIndexOf(this._subscribers, subscription); + if (index >= 0) { + ArrayPrototypeSplice(this._subscribers, index, 1); + + // When there are no more active subscribers, restore to fast prototype. + if (!this._subscribers.length) { + // eslint-disable-next-line no-use-before-define + ObjectSetPrototypeOf(this, Channel.prototype); + } + } + } + + get hasSubscribers() { + return true; + } + + publish(data) { + for (let i = 0; i < this._subscribers.length; i++) { + try { + const onMessage = this._subscribers[i]; + onMessage(data, this.name); + } catch (err) { + process.nextTick(() => { + triggerUncaughtException(err, false); + }); + } + } + } +} + +class Channel { + constructor(name) { + this._subscribers = undefined; + this.name = name; + } + + static [SymbolHasInstance](instance) { + const prototype = ObjectGetPrototypeOf(instance); + return prototype === Channel.prototype || + prototype === ActiveChannel.prototype; + } + + subscribe(subscription) { + ObjectSetPrototypeOf(this, ActiveChannel.prototype); + this._subscribers = []; + this.subscribe(subscription); + } + + get hasSubscribers() { + return false; + } + + publish() {} +} + +const channels = ObjectCreate(null); + +function channel(name) { + let channel; + const ref = channels[name]; + if (ref) channel = ref.get(); + if (channel) return channel; + + if (typeof name !== 'string' && typeof name !== 'symbol') { + throw new ERR_INVALID_ARG_TYPE('channel', ['string', 'symbol'], name); + } + + channel = new Channel(name); + channels[name] = new WeakReference(channel); + return channel; +} + +function hasSubscribers(name) { + let channel; + const ref = channels[name]; + if (ref) channel = ref.get(); + if (!channel) { + return false; + } + + return channel.hasSubscribers; +} + +module.exports = { + channel, + hasSubscribers, + Channel +}; diff --git a/lib/dns.js b/lib/dns.js index 8d45be73baf316..0c1b259d7341ee 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -22,9 +22,11 @@ 'use strict'; const { + ArrayPrototypeMap, ObjectCreate, ObjectDefineProperties, ObjectDefineProperty, + ReflectApply, } = primordials; const cares = internalBinding('cares_wrap'); @@ -197,7 +199,8 @@ ObjectDefineProperty(lookupService, customPromisifyArgs, function onresolve(err, result, ttls) { if (ttls && this.ttl) - result = result.map((address, index) => ({ address, ttl: ttls[index] })); + result = ArrayPrototypeMap( + result, (address, index) => ({ address, ttl: ttls[index] })); if (err) this.callback(dnsException(err, this.bindingName, this.hostname)); @@ -261,7 +264,7 @@ function resolve(hostname, rrtype, callback) { } if (typeof resolver === 'function') { - return resolver.call(this, hostname, callback); + return ReflectApply(resolver, this, [hostname, callback]); } throw new ERR_INVALID_ARG_VALUE('rrtype', rrtype); } diff --git a/lib/domain.js b/lib/domain.js index febd7620f21500..5c96cb43790760 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -27,11 +27,17 @@ // unless they address existing, critical bugs. const { - Array, + ArrayPrototypeEvery, + ArrayPrototypeIndexOf, + ArrayPrototypeLastIndexOf, + ArrayPrototypePush, + ArrayPrototypeSlice, + ArrayPrototypeSplice, Error, - Map, + FunctionPrototypeCall, ObjectDefineProperty, ReflectApply, + SafeMap, Symbol, } = primordials; @@ -61,7 +67,7 @@ ObjectDefineProperty(process, 'domain', { } }); -const pairing = new Map(); +const pairing = new SafeMap(); const asyncHook = createHook({ init(asyncId, type, triggerAsyncId, resource) { if (process.domain !== null && process.domain !== undefined) { @@ -118,12 +124,15 @@ process.setUncaughtExceptionCaptureCallback = function(fn) { let sendMakeCallbackDeprecation = false; -function emitMakeCallbackDeprecation() { +function emitMakeCallbackDeprecation({ target, method }) { if (!sendMakeCallbackDeprecation) { process.emitWarning( 'Using a domain property in MakeCallback is deprecated. Use the ' + 'async_context variant of MakeCallback or the AsyncResource class ' + - 'instead.', 'DeprecationWarning', 'DEP0097'); + 'instead. ' + + `(Triggered by calling ${method?.name ?? ''} ` + + `on ${target?.constructor?.name}.)`, + 'DeprecationWarning', 'DEP0097'); sendMakeCallbackDeprecation = true; } } @@ -131,7 +140,7 @@ function emitMakeCallbackDeprecation() { function topLevelDomainCallback(cb, ...args) { const domain = this.domain; if (exports.active && domain) - emitMakeCallbackDeprecation(); + emitMakeCallbackDeprecation({ target: this, method: cb }); if (domain) domain.enter(); @@ -149,7 +158,8 @@ exports._stack = stack; useDomainTrampoline(topLevelDomainCallback); function updateExceptionCapture() { - if (stack.every((domain) => domain.listenerCount('error') === 0)) { + if (ArrayPrototypeEvery(stack, + (domain) => domain.listenerCount('error') === 0)) { setUncaughtExceptionCaptureCallback(null); } else { setUncaughtExceptionCaptureCallback(null); @@ -296,18 +306,18 @@ Domain.prototype.enter = function() { // Note that this might be a no-op, but we still need // to push it onto the stack so that we can pop it later. exports.active = process.domain = this; - stack.push(this); + ArrayPrototypePush(stack, this); updateExceptionCapture(); }; Domain.prototype.exit = function() { // Don't do anything if this domain is not on the stack. - const index = stack.lastIndexOf(this); + const index = ArrayPrototypeLastIndexOf(stack, this); if (index === -1) return; // Exit all domains until this one. - stack.splice(index); + ArrayPrototypeSplice(stack, index); exports.active = stack[stack.length - 1]; process.domain = exports.active; @@ -346,33 +356,21 @@ Domain.prototype.add = function(ee) { value: this, writable: true }); - this.members.push(ee); + ArrayPrototypePush(this.members, ee); }; Domain.prototype.remove = function(ee) { ee.domain = null; - const index = this.members.indexOf(ee); + const index = ArrayPrototypeIndexOf(this.members, ee); if (index !== -1) - this.members.splice(index, 1); + ArrayPrototypeSplice(this.members, index, 1); }; Domain.prototype.run = function(fn) { - let ret; - this.enter(); - if (arguments.length >= 2) { - const len = arguments.length; - const args = new Array(len - 1); - - for (let i = 1; i < len; i++) - args[i - 1] = arguments[i]; - - ret = fn.apply(this, args); - } else { - ret = fn.call(this); - } + const ret = ReflectApply(fn, this, ArrayPrototypeSlice(arguments, 1)); this.exit(); return ret; @@ -394,17 +392,8 @@ function intercepted(_this, self, cb, fnargs) { return; } - const args = []; - let ret; - self.enter(); - if (fnargs.length > 1) { - for (let i = 1; i < fnargs.length; i++) - args.push(fnargs[i]); - ret = cb.apply(_this, args); - } else { - ret = cb.call(_this); - } + const ret = ReflectApply(cb, _this, ArrayPrototypeSlice(fnargs, 1)); self.exit(); return ret; @@ -423,13 +412,8 @@ Domain.prototype.intercept = function(cb) { function bound(_this, self, cb, fnargs) { - let ret; - self.enter(); - if (fnargs.length > 0) - ret = cb.apply(_this, fnargs); - else - ret = cb.call(_this); + const ret = ReflectApply(cb, _this, fnargs); self.exit(); return ret; @@ -468,7 +452,7 @@ EventEmitter.init = function() { this.domain = exports.active; } - return eventInit.call(this); + return FunctionPrototypeCall(eventInit, this); }; const eventEmit = EventEmitter.prototype.emit; @@ -506,7 +490,7 @@ EventEmitter.prototype.emit = function(...args) { // handler doesn't run in its own context. This prevents any event emitter // created or any exception thrown in that error handler from recursively // executing that error handler. - const origDomainsStack = stack.slice(); + const origDomainsStack = ArrayPrototypeSlice(stack); const origActiveDomain = process.domain; // Travel the domains stack from top to bottom to find the first domain @@ -521,7 +505,7 @@ EventEmitter.prototype.emit = function(...args) { if (idx < 0) { stack.length = 0; } else { - stack.splice(idx + 1); + ArrayPrototypeSplice(stack, idx + 1); } // Change the current active domain diff --git a/lib/events.js b/lib/events.js index 7d3ee54018d0cb..942e5e01eee044 100644 --- a/lib/events.js +++ b/lib/events.js @@ -22,12 +22,18 @@ 'use strict'; const { + ArrayPrototypeForEach, + ArrayPrototypePush, + ArrayPrototypeSlice, Boolean, Error, + ErrorCaptureStackTrace, + FunctionPrototypeCall, MathMin, NumberIsNaN, ObjectCreate, ObjectDefineProperty, + ObjectDefineProperties, ObjectGetPrototypeOf, ObjectSetPrototypeOf, Promise, @@ -65,6 +71,9 @@ const { const kCapture = Symbol('kCapture'); const kErrorMonitor = Symbol('events.errorMonitor'); +const kMaxEventTargetListeners = Symbol('events.maxEventTargetListeners'); +const kMaxEventTargetListenersWarned = + Symbol('events.maxEventTargetListenersWarned'); let DOMException; const lazyDOMException = hideStackFrames((message, name) => { @@ -73,13 +82,14 @@ const lazyDOMException = hideStackFrames((message, name) => { return new DOMException(message, name); }); + function EventEmitter(opts) { - EventEmitter.init.call(this, opts); + FunctionPrototypeCall(EventEmitter.init, this, opts); } module.exports = EventEmitter; module.exports.once = once; module.exports.on = on; - +module.exports.getEventListeners = getEventListeners; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; @@ -117,6 +127,7 @@ EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. let defaultMaxListeners = 10; +let isEventTarget; function checkListener(listener) { if (typeof listener !== 'function') { @@ -139,6 +150,48 @@ ObjectDefineProperty(EventEmitter, 'defaultMaxListeners', { } }); +ObjectDefineProperties(EventEmitter, { + kMaxEventTargetListeners: { + value: kMaxEventTargetListeners, + enumerable: false, + configurable: false, + writable: false, + }, + kMaxEventTargetListenersWarned: { + value: kMaxEventTargetListenersWarned, + enumerable: false, + configurable: false, + writable: false, + } +}); + +EventEmitter.setMaxListeners = + function(n = defaultMaxListeners, ...eventTargets) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) + throw new ERR_OUT_OF_RANGE('n', 'a non-negative number', n); + if (eventTargets.length === 0) { + defaultMaxListeners = n; + } else { + if (isEventTarget === undefined) + isEventTarget = require('internal/event_target').isEventTarget; + + // Performance for forEach is now comparable with regular for-loop + ArrayPrototypeForEach(eventTargets, (target) => { + if (isEventTarget(target)) { + target[kMaxEventTargetListeners] = n; + target[kMaxEventTargetListenersWarned] = false; + } else if (typeof target.setMaxListeners === 'function') { + target.setMaxListeners(n); + } else { + throw new ERR_INVALID_ARG_TYPE( + 'eventTargets', + ['EventEmitter', 'EventTarget'], + target); + } + }); + } + }; + EventEmitter.init = function(opts) { if (this._events === undefined || @@ -174,7 +227,7 @@ function addCatch(that, promise, type, args) { const then = promise.then; if (typeof then === 'function') { - then.call(promise, undefined, function(err) { + FunctionPrototypeCall(then, promise, undefined, function(err) { // The callback is called with nextTick to avoid a follow-up // rejection from this promise. process.nextTick(emitUnhandledRejectionOrErr, that, err, type, args); @@ -291,8 +344,7 @@ EventEmitter.prototype.emit = function emit(type, ...args) { if (er instanceof Error) { try { const capture = {}; - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(capture, EventEmitter.prototype.emit); + ErrorCaptureStackTrace(capture, EventEmitter.prototype.emit); ObjectDefineProperty(er, kEnhanceStackBeforeInspector, { value: enhanceStackTrace.bind(this, er, capture), configurable: true @@ -621,7 +673,7 @@ function arrayClone(arr) { case 5: return [arr[0], arr[1], arr[2], arr[3], arr[4]]; case 6: return [arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]]; } - return arr.slice(); + return ArrayPrototypeSlice(arr); } function unwrapListeners(arr) { @@ -634,6 +686,28 @@ function unwrapListeners(arr) { return ret; } +function getEventListeners(emitterOrTarget, type) { + // First check if EventEmitter + if (typeof emitterOrTarget.listeners === 'function') { + return emitterOrTarget.listeners(type); + } + // Require event target lazily to avoid always loading it + const { isEventTarget, kEvents } = require('internal/event_target'); + if (isEventTarget(emitterOrTarget)) { + const root = emitterOrTarget[kEvents].get(type); + const listeners = []; + let handler = root?.next; + while (handler?.listener !== undefined) { + ArrayPrototypePush(listeners, handler.listener); + handler = handler.next; + } + return listeners; + } + throw new ERR_INVALID_ARG_TYPE('emitter', + ['EventEmitter', 'EventTarget'], + emitterOrTarget); +} + async function once(emitter, name, options = {}) { const signal = options ? options.signal : undefined; validateAbortSignal(signal, 'options.signal'); @@ -742,7 +816,7 @@ function on(emitter, event, options) { // Wait until an event happens return new Promise(function(resolve, reject) { - unconsumedPromises.push({ resolve, reject }); + ArrayPrototypePush(unconsumedPromises, { resolve, reject }); }); }, @@ -806,7 +880,7 @@ function on(emitter, event, options) { if (promise) { promise.resolve(createIterResult(args, false)); } else { - unconsumedEvents.push(args); + ArrayPrototypePush(unconsumedEvents, args); } } diff --git a/lib/fs.js b/lib/fs.js index abd12e131904c8..93e875311e08a6 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -33,7 +33,8 @@ const kIoMaxLength = 2 ** 31 - 1; // in case they are created but never used due to an exception. const { - Map, + ArrayPrototypePush, + BigIntPrototypeToString, MathMax, Number, NumberIsSafeInteger, @@ -41,7 +42,13 @@ const { ObjectDefineProperties, ObjectDefineProperty, Promise, + ReflectApply, + RegExpPrototypeExec, + SafeMap, String, + StringPrototypeCharCodeAt, + StringPrototypeIndexOf, + StringPrototypeSlice, } = primordials; const { fs: constants } = internalBinding('constants'); @@ -71,6 +78,8 @@ const { ERR_INVALID_CALLBACK, ERR_FEATURE_UNAVAILABLE_ON_PLATFORM }, + hideStackFrames, + uvErrmapGet, uvException } = require('internal/errors'); @@ -133,6 +142,13 @@ let ReadStream; let WriteStream; let rimraf; let rimrafSync; +let DOMException; + +const lazyDOMException = hideStackFrames((message, name) => { + if (DOMException === undefined) + DOMException = internalBinding('messaging').DOMException; + return new DOMException(message, name); +}); // These have to be separate because of how graceful-fs happens to do it's // monkeypatching. @@ -315,9 +331,12 @@ function readFile(path, options, callback) { const context = new ReadFileContext(callback, options.encoding); context.isUserFd = isFd(path); // File descriptor ownership + if (options.signal) { + context.signal = options.signal; + } if (context.isUserFd) { process.nextTick(function tick(context) { - readFileAfterOpen.call({ context }, null, path); + ReflectApply(readFileAfterOpen, { context }, [null, path]); }, context); return; } @@ -402,7 +421,7 @@ function readFileSync(path, options) { buffer = Buffer.allocUnsafe(8192); bytesRead = tryReadSync(fd, isUserFd, buffer, 0, 8192); if (bytesRead !== 0) { - buffers.push(buffer.slice(0, bytesRead)); + ArrayPrototypePush(buffers, buffer.slice(0, bytesRead)); } pos += bytesRead; } while (bytesRead !== 0); @@ -858,8 +877,8 @@ function rmdir(path, options, callback) { callback = makeCallback(callback); path = pathModule.toNamespacedPath(getValidatedPath(path)); - if (options && options.recursive) { - options = validateRmOptions( + if (options?.recursive) { + validateRmOptions( path, { ...options, force: true }, true, @@ -882,7 +901,7 @@ function rmdir(path, options, callback) { function rmdirSync(path, options) { path = getValidatedPath(path); - if (options && options.recursive) { + if (options?.recursive) { options = validateRmOptionsSync(path, { ...options, force: true }, true); lazyLoadRimraf(); return rimrafSync(pathModule.toNamespacedPath(path), options); @@ -1065,7 +1084,20 @@ function stat(path, options = { bigint: false }, callback) { binding.stat(pathModule.toNamespacedPath(path), options.bigint, req); } -function fstatSync(fd, options = { bigint: false }) { +function hasNoEntryError(ctx) { + if (ctx.errno) { + const uvErr = uvErrmapGet(ctx.errno); + return uvErr?.[0] === 'ENOENT'; + } + + if (ctx.error) { + return ctx.error.code === 'ENOENT'; + } + + return false; +} + +function fstatSync(fd, options = { bigint: false, throwIfNoEntry: true }) { validateInt32(fd, 'fd', 0); const ctx = { fd }; const stats = binding.fstat(fd, options.bigint, undefined, ctx); @@ -1073,20 +1105,26 @@ function fstatSync(fd, options = { bigint: false }) { return getStatsFromBinding(stats); } -function lstatSync(path, options = { bigint: false }) { +function lstatSync(path, options = { bigint: false, throwIfNoEntry: true }) { path = getValidatedPath(path); const ctx = { path }; const stats = binding.lstat(pathModule.toNamespacedPath(path), options.bigint, undefined, ctx); + if (options.throwIfNoEntry === false && hasNoEntryError(ctx)) { + return undefined; + } handleErrorFromBinding(ctx); return getStatsFromBinding(stats); } -function statSync(path, options = { bigint: false }) { +function statSync(path, options = { bigint: false, throwIfNoEntry: true }) { path = getValidatedPath(path); const ctx = { path }; const stats = binding.stat(pathModule.toNamespacedPath(path), options.bigint, undefined, ctx); + if (options.throwIfNoEntry === false && hasNoEntryError(ctx)) { + return undefined; + } handleErrorFromBinding(ctx); return getStatsFromBinding(stats); } @@ -1406,7 +1444,11 @@ function lutimesSync(path, atime, mtime) { handleErrorFromBinding(ctx); } -function writeAll(fd, isUserFd, buffer, offset, length, callback) { +function writeAll(fd, isUserFd, buffer, offset, length, signal, callback) { + if (signal?.aborted) { + callback(lazyDOMException('The operation was aborted', 'AbortError')); + return; + } // write(fd, buffer, offset, length, position, callback) fs.write(fd, buffer, offset, length, null, (writeErr, written) => { if (writeErr) { @@ -1426,7 +1468,7 @@ function writeAll(fd, isUserFd, buffer, offset, length, callback) { } else { offset += written; length -= written; - writeAll(fd, isUserFd, buffer, offset, length, callback); + writeAll(fd, isUserFd, buffer, offset, length, signal, callback); } }); } @@ -1443,16 +1485,22 @@ function writeFile(path, data, options, callback) { if (isFd(path)) { const isUserFd = true; - writeAll(path, isUserFd, data, 0, data.byteLength, callback); + const signal = options.signal; + writeAll(path, isUserFd, data, 0, data.byteLength, signal, callback); return; } + if (options.signal?.aborted) { + callback(lazyDOMException('The operation was aborted', 'AbortError')); + return; + } fs.open(path, flag, options.mode, (openErr, fd) => { if (openErr) { callback(openErr); } else { const isUserFd = false; - writeAll(fd, isUserFd, data, 0, data.byteLength, callback); + const signal = options.signal; + writeAll(fd, isUserFd, data, 0, data.byteLength, signal, callback); } }); } @@ -1539,7 +1587,7 @@ function watch(filename, options, listener) { } -const statWatchers = new Map(); +const statWatchers = new SafeMap(); function watchFile(filename, options, listener) { filename = getValidatedPath(filename); @@ -1611,13 +1659,13 @@ if (isWindows) { // slash. const splitRootRe = /^(?:[a-zA-Z]:|[\\/]{2}[^\\/]+[\\/][^\\/]+)?[\\/]*/; splitRoot = function splitRoot(str) { - return splitRootRe.exec(str)[0]; + return RegExpPrototypeExec(splitRootRe, str)[0]; }; } else { splitRoot = function splitRoot(str) { for (let i = 0; i < str.length; ++i) { - if (str.charCodeAt(i) !== CHAR_FORWARD_SLASH) - return str.slice(0, i); + if (StringPrototypeCharCodeAt(str, i) !== CHAR_FORWARD_SLASH) + return StringPrototypeSlice(str, 0, i); } return str; }; @@ -1638,7 +1686,7 @@ let nextPart; if (isWindows) { nextPart = function nextPart(p, i) { for (; i < p.length; ++i) { - const ch = p.charCodeAt(i); + const ch = StringPrototypeCharCodeAt(p, i); // Check for a separator character if (ch === CHAR_BACKWARD_SLASH || ch === CHAR_FORWARD_SLASH) @@ -1647,7 +1695,9 @@ if (isWindows) { return -1; }; } else { - nextPart = function nextPart(p, i) { return p.indexOf('/', i); }; + nextPart = function nextPart(p, i) { + return StringPrototypeIndexOf(p, '/', i); + }; } const emptyObj = ObjectCreate(null); @@ -1661,7 +1711,7 @@ function realpathSync(p, options) { p = pathModule.resolve(p); const cache = options[realpathCacheKey]; - const maybeCachedResult = cache && cache.get(p); + const maybeCachedResult = cache?.get(p); if (maybeCachedResult) { return maybeCachedResult; } @@ -1699,18 +1749,18 @@ function realpathSync(p, options) { const result = nextPart(p, pos); previous = current; if (result === -1) { - const last = p.slice(pos); + const last = StringPrototypeSlice(p, pos); current += last; base = previous + last; pos = p.length; } else { - current += p.slice(pos, result + 1); - base = previous + p.slice(pos, result); + current += StringPrototypeSlice(p, pos, result + 1); + base = previous + StringPrototypeSlice(p, pos, result); pos = result + 1; } // Continue if not a symlink, break if a pipe/socket - if (knownHard[base] || (cache && cache.get(base) === base)) { + if (knownHard[base] || cache?.get(base) === base) { if (isFileType(statValues, S_IFIFO) || isFileType(statValues, S_IFSOCK)) { break; @@ -1719,7 +1769,7 @@ function realpathSync(p, options) { } let resolvedLink; - const maybeCachedResolved = cache && cache.get(base); + const maybeCachedResolved = cache?.get(base); if (maybeCachedResolved) { resolvedLink = maybeCachedResolved; } else { @@ -1733,7 +1783,7 @@ function realpathSync(p, options) { if (!isFileType(stats, S_IFLNK)) { knownHard[base] = true; - if (cache) cache.set(base, base); + cache?.set(base, base); continue; } @@ -1742,8 +1792,8 @@ function realpathSync(p, options) { let linkTarget = null; let id; if (!isWindows) { - const dev = stats[0].toString(32); - const ino = stats[7].toString(32); + const dev = BigIntPrototypeToString(stats[0], 32); + const ino = BigIntPrototypeToString(stats[7], 32); id = `${dev}:${ino}`; if (seenLinks[id]) { linkTarget = seenLinks[id]; @@ -1763,7 +1813,7 @@ function realpathSync(p, options) { } // Resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); + p = pathModule.resolve(resolvedLink, StringPrototypeSlice(p, pos)); // Skip over roots current = base = splitRoot(p); @@ -1778,7 +1828,7 @@ function realpathSync(p, options) { } } - if (cache) cache.set(original, p); + cache?.set(original, p); return encodeRealpathResult(p, options); } @@ -1842,13 +1892,13 @@ function realpath(p, options, callback) { const result = nextPart(p, pos); previous = current; if (result === -1) { - const last = p.slice(pos); + const last = StringPrototypeSlice(p, pos); current += last; base = previous + last; pos = p.length; } else { - current += p.slice(pos, result + 1); - base = previous + p.slice(pos, result); + current += StringPrototypeSlice(p, pos, result + 1); + base = previous + StringPrototypeSlice(p, pos, result); pos = result + 1; } @@ -1878,8 +1928,8 @@ function realpath(p, options, callback) { // `dev`/`ino` always return 0 on windows, so skip the check. let id; if (!isWindows) { - const dev = stats.dev.toString(32); - const ino = stats.ino.toString(32); + const dev = BigIntPrototypeToString(stats.dev, 32); + const ino = BigIntPrototypeToString(stats.ino, 32); id = `${dev}:${ino}`; if (seenLinks[id]) { return gotTarget(null, seenLinks[id]); @@ -1903,7 +1953,7 @@ function realpath(p, options, callback) { function gotResolvedLink(resolvedLink) { // Resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); + p = pathModule.resolve(resolvedLink, StringPrototypeSlice(p, pos)); current = base = splitRoot(p); pos = current.length; diff --git a/lib/https.js b/lib/https.js index 6aafef6cb639e1..a7fcf06a95f273 100644 --- a/lib/https.js +++ b/lib/https.js @@ -22,8 +22,16 @@ 'use strict'; const { + ArrayPrototypeIndexOf, + ArrayPrototypePush, + ArrayPrototypeShift, + ArrayPrototypeSplice, + ArrayPrototypeUnshift, + FunctionPrototypeCall, + JSONStringify, ObjectAssign, ObjectSetPrototypeOf, + ReflectConstruct, } = primordials; require('internal/util').assertCrypto(); @@ -63,7 +71,7 @@ function Server(opts, requestListener) { this[kIncomingMessage] = opts.IncomingMessage || IncomingMessage; this[kServerResponse] = opts.ServerResponse || ServerResponse; - tls.Server.call(this, opts, _connectionListener); + FunctionPrototypeCall(tls.Server, this, opts, _connectionListener); this.httpAllowHalfOpen = false; @@ -149,7 +157,7 @@ function Agent(options) { if (!(this instanceof Agent)) return new Agent(options); - HttpAgent.call(this, options); + FunctionPrototypeCall(HttpAgent, this, options); this.defaultPort = 443; this.protocol = 'https:'; this.maxCachedSessions = this.options.maxCachedSessions; @@ -166,7 +174,7 @@ ObjectSetPrototypeOf(Agent, HttpAgent); Agent.prototype.createConnection = createConnection; Agent.prototype.getName = function getName(options) { - let name = HttpAgent.prototype.getName.call(this, options); + let name = FunctionPrototypeCall(HttpAgent.prototype.getName, this, options); name += ':'; if (options.ca) @@ -236,6 +244,18 @@ Agent.prototype.getName = function getName(options) { if (options.sessionIdContext) name += options.sessionIdContext; + name += ':'; + if (options.sigalgs) + name += JSONStringify(options.sigalgs); + + name += ':'; + if (options.privateKeyIdentifier) + name += options.privateKeyIdentifier; + + name += ':'; + if (options.privateKeyEngine) + name += options.privateKeyEngine; + return name; }; @@ -256,21 +276,21 @@ Agent.prototype._cacheSession = function _cacheSession(key, session) { // Put new entry if (this._sessionCache.list.length >= this.maxCachedSessions) { - const oldKey = this._sessionCache.list.shift(); + const oldKey = ArrayPrototypeShift(this._sessionCache.list); debug('evicting %j', oldKey); delete this._sessionCache.map[oldKey]; } - this._sessionCache.list.push(key); + ArrayPrototypePush(this._sessionCache.list, key); this._sessionCache.map[key] = session; }; Agent.prototype._evictSession = function _evictSession(key) { - const index = this._sessionCache.list.indexOf(key); + const index = ArrayPrototypeIndexOf(this._sessionCache.list, key); if (index === -1) return; - this._sessionCache.list.splice(index, 1); + ArrayPrototypeSplice(this._sessionCache.list, index, 1); delete this._sessionCache.map[key]; }; @@ -281,7 +301,7 @@ function request(...args) { let options = {}; if (typeof args[0] === 'string') { - const urlStr = args.shift(); + const urlStr = ArrayPrototypeShift(args); try { options = urlToOptions(new URL(urlStr)); } catch (err) { @@ -300,17 +320,17 @@ function request(...args) { } else if (args[0] && args[0][searchParamsSymbol] && args[0][searchParamsSymbol][searchParamsSymbol]) { // url.URL instance - options = urlToOptions(args.shift()); + options = urlToOptions(ArrayPrototypeShift(args)); } if (args[0] && typeof args[0] !== 'function') { - ObjectAssign(options, args.shift()); + ObjectAssign(options, ArrayPrototypeShift(args)); } options._defaultAgent = module.exports.globalAgent; - args.unshift(options); + ArrayPrototypeUnshift(args, options); - return new ClientRequest(...args); + return ReflectConstruct(ClientRequest, args); } function get(input, options, cb) { diff --git a/lib/inspector.js b/lib/inspector.js index 60640bc1fb6456..007822ffa20f0d 100644 --- a/lib/inspector.js +++ b/lib/inspector.js @@ -3,7 +3,7 @@ const { JSONParse, JSONStringify, - Map, + SafeMap, Symbol, } = primordials; @@ -48,7 +48,7 @@ class Session extends EventEmitter { super(); this[connectionSymbol] = null; this[nextIdSymbol] = 1; - this[messageCallbacksSymbol] = new Map(); + this[messageCallbacksSymbol] = new SafeMap(); } connect() { diff --git a/lib/internal/abort_controller.js b/lib/internal/abort_controller.js index b3568ce2093889..21414cde0e309e 100644 --- a/lib/internal/abort_controller.js +++ b/lib/internal/abort_controller.js @@ -6,16 +6,21 @@ const { ObjectAssign, ObjectDefineProperties, + ObjectSetPrototypeOf, + ObjectDefineProperty, Symbol, + SymbolToStringTag, + TypeError, } = primordials; const { + defineEventHandler, EventTarget, - Event + Event, + kTrustEvent } = require('internal/event_target'); const { customInspectSymbol, - emitExperimentalWarning } = require('internal/util'); const { inspect } = require('internal/util/inspect'); @@ -33,6 +38,11 @@ function customInspect(self, obj, depth, options) { } class AbortSignal extends EventTarget { + constructor() { + // eslint-disable-next-line no-restricted-syntax + throw new TypeError('Illegal constructor'); + } + get aborted() { return !!this[kAborted]; } [customInspectSymbol](depth, options) { @@ -46,13 +56,28 @@ ObjectDefineProperties(AbortSignal.prototype, { aborted: { enumerable: true } }); +ObjectDefineProperty(AbortSignal.prototype, SymbolToStringTag, { + writable: false, + enumerable: false, + configurable: true, + value: 'AbortSignal', +}); + +defineEventHandler(AbortSignal.prototype, 'abort'); + +function createAbortSignal() { + const signal = new EventTarget(); + ObjectSetPrototypeOf(signal, AbortSignal.prototype); + signal[kAborted] = false; + return signal; +} + function abortSignal(signal) { if (signal[kAborted]) return; signal[kAborted] = true; - const event = new Event('abort'); - if (typeof signal.onabort === 'function') { - signal.onabort(event); - } + const event = new Event('abort', { + [kTrustEvent]: true + }); signal.dispatchEvent(event); } @@ -62,8 +87,7 @@ function abortSignal(signal) { const kSignal = Symbol('signal'); class AbortController { constructor() { - this[kSignal] = new AbortSignal(); - emitExperimentalWarning('AbortController'); + this[kSignal] = createAbortSignal(); } get signal() { return this[kSignal]; } @@ -81,6 +105,13 @@ ObjectDefineProperties(AbortController.prototype, { abort: { enumerable: true } }); +ObjectDefineProperty(AbortController.prototype, SymbolToStringTag, { + writable: false, + enumerable: false, + configurable: true, + value: 'AbortController', +}); + module.exports = { AbortController, AbortSignal, diff --git a/lib/internal/assert/assertion_error.js b/lib/internal/assert/assertion_error.js index c89219eef82224..e9e9a101970509 100644 --- a/lib/internal/assert/assertion_error.js +++ b/lib/internal/assert/assertion_error.js @@ -1,13 +1,20 @@ 'use strict'; const { + ArrayPrototypeJoin, + ArrayPrototypePop, Error, + ErrorCaptureStackTrace, MathMax, ObjectCreate, ObjectDefineProperty, ObjectGetPrototypeOf, ObjectKeys, String, + StringPrototypeEndsWith, + StringPrototypeRepeat, + StringPrototypeSlice, + StringPrototypeSplit, } = primordials; const { inspect } = require('internal/util/inspect'); @@ -78,8 +85,8 @@ function createErrDiff(actual, expected, operator) { let end = ''; let skipped = false; const actualInspected = inspectValue(actual); - const actualLines = actualInspected.split('\n'); - const expectedLines = inspectValue(expected).split('\n'); + const actualLines = StringPrototypeSplit(actualInspected, '\n'); + const expectedLines = StringPrototypeSplit(inspectValue(expected), '\n'); let i = 0; let indicator = ''; @@ -126,7 +133,7 @@ function createErrDiff(actual, expected, operator) { if (i > 2) { // Add position indicator for the first mismatch in case it is a // single line and the input length is less than the column length. - indicator = `\n ${' '.repeat(i)}^`; + indicator = `\n ${StringPrototypeRepeat(' ', i)}^`; i = 0; } } @@ -143,8 +150,8 @@ function createErrDiff(actual, expected, operator) { } else { other = a; } - actualLines.pop(); - expectedLines.pop(); + ArrayPrototypePop(actualLines); + ArrayPrototypePop(expectedLines); if (actualLines.length === 0 || expectedLines.length === 0) break; a = actualLines[actualLines.length - 1]; @@ -156,18 +163,19 @@ function createErrDiff(actual, expected, operator) { // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() }) if (maxLines === 0) { // We have to get the result again. The lines were all removed before. - const actualLines = actualInspected.split('\n'); + const actualLines = StringPrototypeSplit(actualInspected, '\n'); // Only remove lines in case it makes sense to collapse those. // TODO: Accept env to always show the full error. if (actualLines.length > 50) { actualLines[46] = `${blue}...${white}`; while (actualLines.length > 47) { - actualLines.pop(); + ArrayPrototypePop(actualLines); } } - return `${kReadableOperator.notIdentical}\n\n${actualLines.join('\n')}\n`; + return `${kReadableOperator.notIdentical}\n\n` + + `${ArrayPrototypeJoin(actualLines, '\n')}\n`; } // There were at least five identical lines at the end. Mark a couple of @@ -234,9 +242,10 @@ function createErrDiff(actual, expected, operator) { // If the lines diverge, specifically check for lines that only diverge by // a trailing comma. In that case it is actually identical and we should // mark it as such. - let divergingLines = actualLine !== expectedLine && - (!actualLine.endsWith(',') || - actualLine.slice(0, -1) !== expectedLine); + let divergingLines = + actualLine !== expectedLine && + (!StringPrototypeEndsWith(actualLine, ',') || + StringPrototypeSlice(actualLine, 0, -1) !== expectedLine); // If the expected line has a trailing comma but is otherwise identical, // add a comma at the end of the actual line. Otherwise the output could // look weird as in: @@ -247,8 +256,8 @@ function createErrDiff(actual, expected, operator) { // ] // if (divergingLines && - expectedLine.endsWith(',') && - expectedLine.slice(0, -1) === actualLine) { + StringPrototypeEndsWith(expectedLine, ',') && + StringPrototypeSlice(expectedLine, 0, -1) === actualLine) { divergingLines = false; actualLine += ','; } @@ -361,7 +370,7 @@ class AssertionError extends Error { // In case the objects are equal but the operator requires unequal, show // the first object and say A equals B let base = kReadableOperator[operator]; - const res = inspectValue(actual).split('\n'); + const res = StringPrototypeSplit(inspectValue(actual), '\n'); // In case "actual" is an object or a function, it should not be // reference equal. @@ -376,7 +385,7 @@ class AssertionError extends Error { if (res.length > 50) { res[46] = `${blue}...${white}`; while (res.length > 47) { - res.pop(); + ArrayPrototypePop(res); } } @@ -384,7 +393,7 @@ class AssertionError extends Error { if (res.length === 1) { super(`${base}${res[0].length > 5 ? '\n\n' : ' '}${res[0]}`); } else { - super(`${base}\n\n${res.join('\n')}\n`); + super(`${base}\n\n${ArrayPrototypeJoin(res, '\n')}\n`); } } else { let res = inspectValue(actual); @@ -393,15 +402,15 @@ class AssertionError extends Error { if (operator === 'notDeepEqual' && res === other) { res = `${knownOperator}\n\n${res}`; if (res.length > 1024) { - res = `${res.slice(0, 1021)}...`; + res = `${StringPrototypeSlice(res, 0, 1021)}...`; } super(res); } else { if (res.length > 512) { - res = `${res.slice(0, 509)}...`; + res = `${StringPrototypeSlice(res, 0, 509)}...`; } if (other.length > 512) { - other = `${other.slice(0, 509)}...`; + other = `${StringPrototypeSlice(other, 0, 509)}...`; } if (operator === 'deepEqual') { res = `${knownOperator}\n\n${res}\n\nshould loosely deep-equal\n\n`; @@ -444,10 +453,9 @@ class AssertionError extends Error { this.expected = expected; this.operator = operator; } - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(this, stackStartFn || stackStartFunction); + ErrorCaptureStackTrace(this, stackStartFn || stackStartFunction); // Create error message including the error code in the name. - this.stack; + this.stack; // eslint-disable-line no-unused-expressions // Reset the name. this.name = 'AssertionError'; } @@ -463,12 +471,12 @@ class AssertionError extends Error { for (const name of ['actual', 'expected']) { if (typeof this[name] === 'string') { - const lines = this[name].split('\n'); + const lines = StringPrototypeSplit(this[name], '\n'); if (lines.length > 10) { lines.length = 10; - this[name] = `${lines.join('\n')}\n...`; + this[name] = `${ArrayPrototypeJoin(lines, '\n')}\n...`; } else if (this[name].length > 512) { - this[name] = `${this[name].slice(512)}...`; + this[name] = `${StringPrototypeSlice(this[name], 512)}...`; } } } diff --git a/lib/internal/assert/calltracker.js b/lib/internal/assert/calltracker.js index 74f517f3f9e99b..d45fb67d611e8b 100644 --- a/lib/internal/assert/calltracker.js +++ b/lib/internal/assert/calltracker.js @@ -1,7 +1,10 @@ 'use strict'; const { + ArrayPrototypePush, Error, + FunctionPrototype, + ReflectApply, SafeSet, } = primordials; @@ -15,7 +18,7 @@ const { validateUint32, } = require('internal/validators'); -const noop = () => {}; +const noop = FunctionPrototype; class CallTracker { @@ -55,7 +58,7 @@ class CallTracker { if (context.actual === context.exact + 1) { callChecks.add(context); } - return fn.apply(this, arguments); + return ReflectApply(fn, this, arguments); }; } @@ -67,7 +70,7 @@ class CallTracker { const message = `Expected the ${context.name} function to be ` + `executed ${context.exact} time(s) but was ` + `executed ${context.actual} time(s).`; - errors.push({ + ArrayPrototypePush(errors, { message, actual: context.actual, expected: context.exact, diff --git a/lib/internal/async_hooks.js b/lib/internal/async_hooks.js index 9463d1d3348e67..84e73280ccec48 100644 --- a/lib/internal/async_hooks.js +++ b/lib/internal/async_hooks.js @@ -1,8 +1,10 @@ 'use strict'; const { + ArrayPrototypePop, + ArrayPrototypeSlice, ArrayPrototypeUnshift, - Error, + ErrorCaptureStackTrace, FunctionPrototypeBind, ObjectPrototypeHasOwnProperty, ObjectDefineProperty, @@ -132,7 +134,7 @@ function callbackTrampoline(asyncId, resource, cb, ...args) { if (asyncId !== 0 && hasHooks(kAfter)) emitAfterNative(asyncId); - execution_async_resources.pop(); + ArrayPrototypePop(execution_async_resources); return result; } @@ -159,8 +161,7 @@ function fatalError(e) { process._rawDebug(e.stack); } else { const o = { message: e }; - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(o, fatalError); + ErrorCaptureStackTrace(o, fatalError); process._rawDebug(o.stack); } @@ -271,7 +272,7 @@ function getHookArrays() { function storeActiveHooks() { - active_hooks.tmp_array = active_hooks.array.slice(); + active_hooks.tmp_array = ArrayPrototypeSlice(active_hooks.array); // Don't want to make the assumption that kInit to kDestroy are indexes 0 to // 4. So do this the long way. active_hooks.tmp_fields = []; @@ -523,7 +524,7 @@ function popAsyncContext(asyncId) { const offset = stackLength - 1; async_id_fields[kExecutionAsyncId] = async_wrap.async_ids_stack[2 * offset]; async_id_fields[kTriggerAsyncId] = async_wrap.async_ids_stack[2 * offset + 1]; - execution_async_resources.pop(); + ArrayPrototypePop(execution_async_resources); async_hook_fields[kStackLength] = offset; return offset > 0; } diff --git a/lib/internal/bootstrap/loaders.js b/lib/internal/bootstrap/loaders.js index d5715aa9f8c666..cae3200e677926 100644 --- a/lib/internal/bootstrap/loaders.js +++ b/lib/internal/bootstrap/loaders.js @@ -44,15 +44,18 @@ /* global process, getLinkedBinding, getInternalBinding, primordials */ const { + ArrayPrototypeMap, + ArrayPrototypePush, Error, - Map, ObjectCreate, ObjectDefineProperty, ObjectKeys, ObjectPrototypeHasOwnProperty, ReflectGet, + SafeMap, SafeSet, String, + StringPrototypeStartsWith, TypeError, } = primordials; @@ -66,11 +69,11 @@ ObjectDefineProperty(process, 'moduleLoadList', { }); -// internalBindingWhitelist contains the name of internalBinding modules -// that are whitelisted for access via process.binding()... This is used +// internalBindingAllowlist contains the name of internalBinding modules +// that are allowed for access via process.binding()... This is used // to provide a transition path for modules that are being moved over to // internalBinding. -const internalBindingWhitelist = new SafeSet([ +const internalBindingAllowlist = new SafeSet([ 'async_wrap', 'buffer', 'cares_wrap', @@ -110,7 +113,7 @@ const internalBindingWhitelist = new SafeSet([ module = String(module); // Deprecated specific process.binding() modules, but not all, allow // selective fallback to internalBinding for the deprecated ones. - if (internalBindingWhitelist.has(module)) { + if (internalBindingAllowlist.has(module)) { return internalBinding(module); } // eslint-disable-next-line no-restricted-syntax @@ -135,7 +138,7 @@ let internalBinding; let mod = bindingObj[module]; if (typeof mod !== 'object') { mod = bindingObj[module] = getInternalBinding(module); - moduleLoadList.push(`Internal Binding ${module}`); + ArrayPrototypePush(moduleLoadList, `Internal Binding ${module}`); } return mod; }; @@ -163,12 +166,14 @@ class NativeModule { * A map from the module IDs to the module instances. * @type {Map} */ - static map = new Map(moduleIds.map((id) => [id, new NativeModule(id)])); + static map = new SafeMap( + ArrayPrototypeMap(moduleIds, (id) => [id, new NativeModule(id)]) + ); constructor(id) { this.filename = `${id}.js`; this.id = id; - this.canBeRequiredByUsers = !id.startsWith('internal/'); + this.canBeRequiredByUsers = !StringPrototypeStartsWith(id, 'internal/'); // The CJS exports object of the module. this.exports = {}; @@ -221,7 +226,7 @@ class NativeModule { if (!this.exportKeys) { // When using --expose-internals, we do not want to reflect the named // exports from core modules as this can trigger unnecessary getters. - const internal = this.id.startsWith('internal/'); + const internal = StringPrototypeStartsWith(this.id, 'internal/'); this.exportKeys = internal ? [] : ObjectKeys(this.exports); } this.getESMFacade(); @@ -271,7 +276,7 @@ class NativeModule { this.loading = true; try { - const requireFn = this.id.startsWith('internal/deps/') ? + const requireFn = StringPrototypeStartsWith(this.id, 'internal/deps/') ? requireWithFallbackInDeps : nativeModuleRequire; const fn = compileFunction(id); @@ -282,7 +287,7 @@ class NativeModule { this.loading = false; } - moduleLoadList.push(`NativeModule ${id}`); + ArrayPrototypePush(moduleLoadList, `NativeModule ${id}`); return this.exports; } } diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index bb4689d0d342e8..8077c462983154 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -39,6 +39,7 @@ setupPrepareStackTrace(); const { + FunctionPrototypeCall, JSONParse, ObjectDefineProperty, ObjectGetPrototypeOf, @@ -299,7 +300,7 @@ function setupProcessObject() { const EventEmitter = require('events'); const origProcProto = ObjectGetPrototypeOf(process); ObjectSetPrototypeOf(origProcProto, EventEmitter.prototype); - EventEmitter.call(process); + FunctionPrototypeCall(EventEmitter, process); ObjectDefineProperty(process, SymbolToStringTag, { enumerable: false, writable: true, diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index 73aa3dfb3c559d..381a54d489fb0f 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -1,10 +1,11 @@ 'use strict'; const { - Map, NumberParseInt, ObjectDefineProperty, + SafeMap, SafeWeakMap, + StringPrototypeStartsWith, } = primordials; const { @@ -96,7 +97,8 @@ function patchProcessObject(expandArgv1) { }); process.argv[0] = process.execPath; - if (expandArgv1 && process.argv[1] && !process.argv[1].startsWith('-')) { + if (expandArgv1 && process.argv[1] && + !StringPrototypeStartsWith(process.argv[1], '-')) { // Expand process.argv[1] into a full path. const path = require('path'); try { @@ -357,7 +359,7 @@ function initializePolicy() { if (experimentalPolicy) { process.emitWarning('Policies are experimental.', 'ExperimentalWarning'); - const { pathToFileURL, URL } = require('url'); + const { pathToFileURL, URL } = require('internal/url'); // URL here as it is slightly different parsing // no bare specifiers for now let manifestURL; @@ -374,7 +376,7 @@ function initializePolicy() { if (experimentalPolicyIntegrity) { const SRI = require('internal/policy/sri'); const { createHash, timingSafeEqual } = require('crypto'); - const realIntegrities = new Map(); + const realIntegrities = new SafeMap(); const integrityEntries = SRI.parse(experimentalPolicyIntegrity); let foundMatch = false; for (let i = 0; i < integrityEntries.length; i++) { diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js index e23896eac93fba..3515626041bbad 100644 --- a/lib/internal/buffer.js +++ b/lib/internal/buffer.js @@ -949,21 +949,28 @@ function writeFloatBackwards(val, offset = 0) { return offset; } -class FastBuffer extends Uint8Array {} +class FastBuffer extends Uint8Array { + // Using an explicit constructor here is necessary to avoid relying on + // `Array.prototype[Symbol.iterator]`, which can be mutated by users. + // eslint-disable-next-line no-useless-constructor + constructor(bufferOrLength, byteOffset, length) { + super(bufferOrLength, byteOffset, length); + } +} function addBufferPrototypeMethods(proto) { - proto.readBigUInt64LE = readBigUInt64LE, - proto.readBigUInt64BE = readBigUInt64BE, - proto.readBigUint64LE = readBigUInt64LE, - proto.readBigUint64BE = readBigUInt64BE, - proto.readBigInt64LE = readBigInt64LE, - proto.readBigInt64BE = readBigInt64BE, - proto.writeBigUInt64LE = writeBigUInt64LE, - proto.writeBigUInt64BE = writeBigUInt64BE, - proto.writeBigUint64LE = writeBigUInt64LE, - proto.writeBigUint64BE = writeBigUInt64BE, - proto.writeBigInt64LE = writeBigInt64LE, - proto.writeBigInt64BE = writeBigInt64BE, + proto.readBigUInt64LE = readBigUInt64LE; + proto.readBigUInt64BE = readBigUInt64BE; + proto.readBigUint64LE = readBigUInt64LE; + proto.readBigUint64BE = readBigUInt64BE; + proto.readBigInt64LE = readBigInt64LE; + proto.readBigInt64BE = readBigInt64BE; + proto.writeBigUInt64LE = writeBigUInt64LE; + proto.writeBigUInt64BE = writeBigUInt64BE; + proto.writeBigUint64LE = writeBigUInt64LE; + proto.writeBigUint64BE = writeBigUInt64BE; + proto.writeBigInt64LE = writeBigInt64LE; + proto.writeBigInt64BE = writeBigInt64BE; proto.readUIntLE = readUIntLE; proto.readUInt32LE = readUInt32LE; @@ -1067,5 +1074,7 @@ module.exports = { addBufferPrototypeMethods, markAsUntransferable, createUnsafeBuffer, + readUInt16BE, + readUInt32BE, reconnectZeroFillToggle }; diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 092922f956a17c..8dd85d287fc950 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -2,8 +2,15 @@ const { ArrayIsArray, + ArrayPrototypePush, + ArrayPrototypeReduce, + ArrayPrototypeSlice, + FunctionPrototype, + FunctionPrototypeCall, ObjectDefineProperty, ObjectSetPrototypeOf, + ReflectApply, + StringPrototypeSlice, Symbol, Uint8Array, } = primordials; @@ -224,19 +231,19 @@ function stdioStringToArray(stdio, channel) { switch (stdio) { case 'ignore': - case 'pipe': options.push(stdio, stdio, stdio); break; - case 'inherit': options.push(0, 1, 2); break; + case 'pipe': ArrayPrototypePush(options, stdio, stdio, stdio); break; + case 'inherit': ArrayPrototypePush(options, 0, 1, 2); break; default: throw new ERR_INVALID_ARG_VALUE('stdio', stdio); } - if (channel) options.push(channel); + if (channel) ArrayPrototypePush(options, channel); return options; } function ChildProcess() { - EventEmitter.call(this); + FunctionPrototypeCall(EventEmitter, this); this._closesNeeded = 1; this._closesGot = 0; @@ -271,7 +278,7 @@ function ChildProcess() { if (this.spawnfile) err.path = this.spawnfile; - err.spawnargs = this.spawnargs.slice(1); + err.spawnargs = ArrayPrototypeSlice(this.spawnargs, 1); this.emit('error', err); } else { this.emit('exit', this.exitCode, this.signalCode); @@ -361,8 +368,9 @@ ChildProcess.prototype.spawn = function(options) { options.envPairs); } - options.envPairs.push(`NODE_CHANNEL_FD=${ipcFd}`); - options.envPairs.push(`NODE_CHANNEL_SERIALIZATION_MODE=${serialization}`); + ArrayPrototypePush(options.envPairs, `NODE_CHANNEL_FD=${ipcFd}`); + ArrayPrototypePush(options.envPairs, + `NODE_CHANNEL_SERIALIZATION_MODE=${serialization}`); } validateString(options.file, 'options.file'); @@ -401,6 +409,8 @@ ChildProcess.prototype.spawn = function(options) { this._handle.close(); this._handle = null; throw errnoException(err, 'spawn'); + } else { + process.nextTick(onSpawnNT, this); } this.pid = this._handle.pid; @@ -452,7 +462,8 @@ ChildProcess.prototype.spawn = function(options) { this.stdio = []; for (i = 0; i < stdio.length; i++) - this.stdio.push(stdio[i].socket === undefined ? null : stdio[i].socket); + ArrayPrototypePush(this.stdio, + stdio[i].socket === undefined ? null : stdio[i].socket); // Add .send() method and start listening for IPC data if (ipc !== undefined) setupChannel(this, ipc, serialization); @@ -466,6 +477,11 @@ function onErrorNT(self, err) { } +function onSpawnNT(self) { + self.emit('spawn'); +} + + ChildProcess.prototype.kill = function(sig) { const signal = sig === 0 ? sig : @@ -761,7 +777,7 @@ function setupChannel(target, channel, serializationMode) { // Queue-up message and handle if we haven't received ACK yet. if (this._handleQueue) { - this._handleQueue.push({ + ArrayPrototypePush(this._handleQueue, { callback: callback, handle: handle, options: options, @@ -773,10 +789,8 @@ function setupChannel(target, channel, serializationMode) { obj = handleConversion[message.type]; // convert TCP object to native handle object - handle = handleConversion[message.type].send.call(target, - message, - handle, - options); + handle = ReflectApply(handleConversion[message.type].send, + target, [message, handle, options]); // If handle was sent twice, or it is impossible to get native handle // out of it - just send a text without the handle. @@ -791,7 +805,7 @@ function setupChannel(target, channel, serializationMode) { !(message && (message.cmd === 'NODE_HANDLE_ACK' || message.cmd === 'NODE_HANDLE_NACK'))) { // Queue request anyway to avoid out-of-order messages. - this._handleQueue.push({ + ArrayPrototypePush(this._handleQueue, { callback: callback, handle: null, options: options, @@ -922,10 +936,11 @@ function isInternal(message) { typeof message === 'object' && typeof message.cmd === 'string' && message.cmd.length > INTERNAL_PREFIX.length && - message.cmd.slice(0, INTERNAL_PREFIX.length) === INTERNAL_PREFIX); + StringPrototypeSlice(message.cmd, 0, INTERNAL_PREFIX.length) === + INTERNAL_PREFIX); } -function nop() { } +const nop = FunctionPrototype; function getValidStdio(stdio, sync) { let ipc; @@ -942,11 +957,11 @@ function getValidStdio(stdio, sync) { // Don't concat() a new Array() because it would be sparse, and // stdio.reduce() would skip the sparse elements of stdio. // See https://stackoverflow.com/a/5501711/3561 - while (stdio.length < 3) stdio.push(undefined); + while (stdio.length < 3) ArrayPrototypePush(stdio, undefined); // Translate stdio into C++-readable form // (i.e. PipeWraps or fds) - stdio = stdio.reduce((acc, stdio, i) => { + stdio = ArrayPrototypeReduce(stdio, (acc, stdio, i) => { function cleanup() { for (let i = 0; i < acc.length; i++) { if ((acc[i].type === 'pipe' || acc[i].type === 'ipc') && acc[i].handle) @@ -960,7 +975,7 @@ function getValidStdio(stdio, sync) { } if (stdio === 'ignore') { - acc.push({ type: 'ignore' }); + ArrayPrototypePush(acc, { type: 'ignore' }); } else if (stdio === 'pipe' || (typeof stdio === 'number' && stdio < 0)) { const a = { type: 'pipe', @@ -971,7 +986,7 @@ function getValidStdio(stdio, sync) { if (!sync) a.handle = new Pipe(PipeConstants.SOCKET); - acc.push(a); + ArrayPrototypePush(acc, a); } else if (stdio === 'ipc') { if (sync || ipc !== undefined) { // Cleanup previously created pipes @@ -985,18 +1000,18 @@ function getValidStdio(stdio, sync) { ipc = new Pipe(PipeConstants.IPC); ipcFd = i; - acc.push({ + ArrayPrototypePush(acc, { type: 'pipe', handle: ipc, ipc: true }); } else if (stdio === 'inherit') { - acc.push({ + ArrayPrototypePush(acc, { type: 'inherit', fd: i }); } else if (typeof stdio === 'number' || typeof stdio.fd === 'number') { - acc.push({ + ArrayPrototypePush(acc, { type: 'fd', fd: typeof stdio === 'number' ? stdio : stdio.fd }); @@ -1006,7 +1021,7 @@ function getValidStdio(stdio, sync) { stdio : getHandleWrapType(stdio.handle) ? stdio.handle : stdio._handle; - acc.push({ + ArrayPrototypePush(acc, { type: 'wrap', wrapType: getHandleWrapType(handle), handle: handle, @@ -1066,7 +1081,7 @@ function spawnSync(options) { if (result.error) { result.error = errnoException(result.error, 'spawnSync ' + options.file); result.error.path = options.file; - result.error.spawnargs = options.args.slice(1); + result.error.spawnargs = ArrayPrototypeSlice(options.args, 1); } return result; diff --git a/lib/internal/child_process/serialization.js b/lib/internal/child_process/serialization.js index df8a6ca67236c5..51c8efc1f21f45 100644 --- a/lib/internal/child_process/serialization.js +++ b/lib/internal/child_process/serialization.js @@ -3,7 +3,9 @@ const { JSONParse, JSONStringify, + StringPrototypeSplit, Symbol, + TypedArrayPrototypeSubarray, } = primordials; const { Buffer } = require('buffer'); const { StringDecoder } = require('string_decoder'); @@ -63,8 +65,8 @@ const advanced = { } const deserializer = new ChildProcessDeserializer( - messageBuffer.subarray(4, 4 + size)); - messageBuffer = messageBuffer.subarray(4 + size); + TypedArrayPrototypeSubarray(messageBuffer, 4, 4 + size)); + messageBuffer = TypedArrayPrototypeSubarray(messageBuffer, 4 + size); deserializer.readHeader(); yield deserializer.readValue(); @@ -98,7 +100,8 @@ const json = { if (channel[kStringDecoder] === undefined) channel[kStringDecoder] = new StringDecoder('utf8'); - const chunks = channel[kStringDecoder].write(readData).split('\n'); + const chunks = + StringPrototypeSplit(channel[kStringDecoder].write(readData), '\n'); const numCompleteChunks = chunks.length - 1; // Last line does not have trailing linebreak const incompleteChunk = chunks[numCompleteChunks]; diff --git a/lib/internal/cluster/child.js b/lib/internal/cluster/child.js index 74f30c0d2ece90..90dce42fa6fa70 100644 --- a/lib/internal/cluster/child.js +++ b/lib/internal/cluster/child.js @@ -1,8 +1,11 @@ 'use strict'; const { - Map, + ArrayPrototypeJoin, + FunctionPrototype, ObjectAssign, + ReflectApply, + SafeMap, } = primordials; const assert = require('internal/assert'); @@ -12,9 +15,9 @@ const { owner_symbol } = require('internal/async_hooks').symbols; const Worker = require('internal/cluster/worker'); const { internal, sendHelper } = require('internal/cluster/utils'); const cluster = new EventEmitter(); -const handles = new Map(); -const indexes = new Map(); -const noop = () => {}; +const handles = new SafeMap(); +const indexes = new SafeMap(); +const noop = FunctionPrototype; module.exports = cluster; @@ -49,7 +52,7 @@ cluster._setupWorker = function() { if (message.act === 'newconn') onconnection(message, handle); else if (message.act === 'disconnect') - _disconnect.call(worker, true); + ReflectApply(_disconnect, worker, [true]); } }; @@ -62,10 +65,13 @@ cluster._getServer = function(obj, options, cb) { process.platform !== 'win32') address = path.resolve(address); - const indexesKey = [address, - options.port, - options.addressType, - options.fd ].join(':'); + const indexesKey = ArrayPrototypeJoin( + [ + address, + options.port, + options.addressType, + options.fd, + ], ':'); let index = indexes.get(indexesKey); @@ -119,7 +125,7 @@ function shared(message, handle, indexesKey, cb) { send({ act: 'close', key }); handles.delete(key); indexes.delete(indexesKey); - return close.apply(handle, arguments); + return ReflectApply(close, handle, arguments); }; assert(handles.has(key) === false); handles.set(key, handle); @@ -228,9 +234,9 @@ function _disconnect(masterInitiated) { // Extend generic Worker with methods specific to worker processes. Worker.prototype.disconnect = function() { - if (![ 'disconnecting', 'destroying' ].includes(this.state)) { + if (this.state !== 'disconnecting' && this.state !== 'destroying') { this.state = 'disconnecting'; - _disconnect.call(this); + ReflectApply(_disconnect, this, []); } return this; diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js index 9e2c7cbecb9963..2ae18165695be7 100644 --- a/lib/internal/cluster/master.js +++ b/lib/internal/cluster/master.js @@ -1,9 +1,14 @@ 'use strict'; const { - Map, + ArrayPrototypePush, + ArrayPrototypeSlice, + ArrayPrototypeSome, ObjectKeys, ObjectValues, + RegExpPrototypeTest, + SafeMap, + StringPrototypeStartsWith, } = primordials; const assert = require('internal/assert'); @@ -23,7 +28,7 @@ const { validatePort } = require('internal/validators'); module.exports = cluster; -const handles = new Map(); +const handles = new SafeMap(); cluster.isWorker = false; cluster.isMaster = true; cluster.Worker = Worker; @@ -53,7 +58,7 @@ cluster.schedulingPolicy = schedulingPolicy; cluster.setupMaster = function(options) { const settings = { - args: process.argv.slice(2), + args: ArrayPrototypeSlice(process.argv, 2), exec: process.argv[1], execArgv: process.execArgv, silent: false, @@ -65,8 +70,10 @@ cluster.setupMaster = function(options) { // Without --logfile=v8-%p.log, everything ends up in a single, unusable // file. (Unusable because what V8 logs are memory addresses and each // process has its own memory mappings.) - if (settings.execArgv.some((s) => s.startsWith('--prof')) && - !settings.execArgv.some((s) => s.startsWith('--logfile='))) { + if (ArrayPrototypeSome(settings.execArgv, + (s) => StringPrototypeStartsWith(s, '--prof')) && + !ArrayPrototypeSome(settings.execArgv, + (s) => StringPrototypeStartsWith(s, '--logfile='))) { settings.execArgv = [...settings.execArgv, '--logfile=v8-%p.log']; } @@ -109,8 +116,9 @@ function createWorkerProcess(id, env) { const nodeOptions = process.env.NODE_OPTIONS ? process.env.NODE_OPTIONS : ''; - if (execArgv.some((arg) => arg.match(debugArgRegex)) || - nodeOptions.match(debugArgRegex)) { + if (ArrayPrototypeSome(execArgv, + (arg) => RegExpPrototypeTest(debugArgRegex, arg)) || + RegExpPrototypeTest(debugArgRegex, nodeOptions)) { let inspectPort; if ('inspectPort' in cluster.settings) { if (typeof cluster.settings.inspectPort === 'function') @@ -126,7 +134,7 @@ function createWorkerProcess(id, env) { debugPortOffset++; } - execArgv.push(`--inspect-port=${inspectPort}`); + ArrayPrototypePush(execArgv, `--inspect-port=${inspectPort}`); } return fork(cluster.settings.exec, cluster.settings.args, { diff --git a/lib/internal/cluster/round_robin_handle.js b/lib/internal/cluster/round_robin_handle.js index 492fd725c82f1d..5dc53ef78b1a6e 100644 --- a/lib/internal/cluster/round_robin_handle.js +++ b/lib/internal/cluster/round_robin_handle.js @@ -2,8 +2,10 @@ const { ArrayIsArray, + ArrayPrototypePush, + ArrayPrototypeShift, Boolean, - Map, + SafeMap, } = primordials; const assert = require('internal/assert'); @@ -15,8 +17,8 @@ module.exports = RoundRobinHandle; function RoundRobinHandle(key, address, { port, fd, flags }) { this.key = key; - this.all = new Map(); - this.free = new Map(); + this.all = new SafeMap(); + this.free = new SafeMap(); this.handles = []; this.handle = null; this.server = net.createServer(assert.fail); @@ -90,7 +92,7 @@ RoundRobinHandle.prototype.remove = function(worker) { }; RoundRobinHandle.prototype.distribute = function(err, handle) { - this.handles.push(handle); + ArrayPrototypePush(this.handles, handle); const [ workerEntry ] = this.free; if (ArrayIsArray(workerEntry)) { @@ -105,7 +107,7 @@ RoundRobinHandle.prototype.handoff = function(worker) { return; // Worker is closing (or has closed) the server. } - const handle = this.handles.shift(); + const handle = ArrayPrototypeShift(this.handles); if (handle === undefined) { this.free.set(worker.id, worker); // Add to ready queue again. diff --git a/lib/internal/cluster/shared_handle.js b/lib/internal/cluster/shared_handle.js index 656b1292988948..87b83df20081b1 100644 --- a/lib/internal/cluster/shared_handle.js +++ b/lib/internal/cluster/shared_handle.js @@ -1,5 +1,5 @@ 'use strict'; -const { Map } = primordials; +const { SafeMap } = primordials; const assert = require('internal/assert'); const dgram = require('internal/dgram'); const net = require('net'); @@ -8,7 +8,7 @@ module.exports = SharedHandle; function SharedHandle(key, address, { port, addressType, fd, flags }) { this.key = key; - this.workers = new Map(); + this.workers = new SafeMap(); this.handle = null; this.errno = 0; diff --git a/lib/internal/cluster/utils.js b/lib/internal/cluster/utils.js index 9e7a1186ffc2bf..732d33e46936a8 100644 --- a/lib/internal/cluster/utils.js +++ b/lib/internal/cluster/utils.js @@ -1,7 +1,8 @@ 'use strict'; const { - Map, + ReflectApply, + SafeMap, } = primordials; module.exports = { @@ -9,7 +10,7 @@ module.exports = { internal }; -const callbacks = new Map(); +const callbacks = new SafeMap(); let seq = 0; function sendHelper(proc, message, handle, cb) { @@ -44,6 +45,6 @@ function internal(worker, cb) { } } - fn.apply(worker, arguments); + ReflectApply(fn, worker, arguments); }; } diff --git a/lib/internal/cluster/worker.js b/lib/internal/cluster/worker.js index 516b7a3b73d787..cdc1cd97ce06c8 100644 --- a/lib/internal/cluster/worker.js +++ b/lib/internal/cluster/worker.js @@ -2,6 +2,7 @@ const { ObjectSetPrototypeOf, + ReflectApply, } = primordials; const EventEmitter = require('events'); @@ -13,7 +14,7 @@ function Worker(options) { if (!(this instanceof Worker)) return new Worker(options); - EventEmitter.call(this); + ReflectApply(EventEmitter, this, []); if (options === null || typeof options !== 'object') options = {}; @@ -38,11 +39,11 @@ ObjectSetPrototypeOf(Worker.prototype, EventEmitter.prototype); ObjectSetPrototypeOf(Worker, EventEmitter); Worker.prototype.kill = function() { - this.destroy.apply(this, arguments); + ReflectApply(this.destroy, this, arguments); }; Worker.prototype.send = function() { - return this.process.send.apply(this.process, arguments); + return ReflectApply(this.process.send, this.process, arguments); }; Worker.prototype.isDead = function() { diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index aae511cb6c7ca0..dc2817ad2a54ec 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -6,21 +6,31 @@ const { ArrayFrom, ArrayIsArray, + ArrayPrototypePush, + ArrayPrototypeUnshift, Boolean, - Error, - Map, + ErrorCaptureStackTrace, + FunctionPrototypeBind, MathFloor, Number, + NumberPrototypeToFixed, ObjectDefineProperties, ObjectDefineProperty, ObjectKeys, ObjectPrototypeHasOwnProperty, ObjectValues, ReflectOwnKeys, + SafeMap, + SafeWeakMap, + StringPrototypeIncludes, + StringPrototypePadStart, + StringPrototypeRepeat, + StringPrototypeReplace, + StringPrototypeSlice, + StringPrototypeSplit, Symbol, SymbolHasInstance, SymbolToStringTag, - WeakMap, } = primordials; const { trace } = internalBinding('trace_events'); @@ -80,7 +90,7 @@ const kBindStreamsLazy = Symbol('kBindStreamsLazy'); const kUseStdout = Symbol('kUseStdout'); const kUseStderr = Symbol('kUseStderr'); -const optionsMap = new WeakMap(); +const optionsMap = new SafeWeakMap(); function Console(options /* or: stdout, stderr, ignoreErrors = true */) { // We have to test new.target here to see if this function is called @@ -142,7 +152,7 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) { // We have to bind the methods grabbed from the instance instead of from // the prototype so that users extending the Console can override them // from the prototype chain of the subclass. - this[key] = this[key].bind(this); + this[key] = FunctionPrototypeBind(this[key], this); ObjectDefineProperty(this[key], 'name', { value: key }); @@ -224,9 +234,9 @@ ObjectDefineProperties(Console.prototype, { ...consolePropAttributes, value: Boolean(ignoreErrors) }, - '_times': { ...consolePropAttributes, value: new Map() }, + '_times': { ...consolePropAttributes, value: new SafeMap() }, // Corresponds to https://console.spec.whatwg.org/#count-map - [kCounts]: { ...consolePropAttributes, value: new Map() }, + [kCounts]: { ...consolePropAttributes, value: new SafeMap() }, [kColorMode]: { ...consolePropAttributes, value: colorMode }, [kIsConsole]: { ...consolePropAttributes, value: true }, [kGroupIndent]: { ...consolePropAttributes, value: '' }, @@ -255,8 +265,8 @@ ObjectDefineProperties(Console.prototype, { this._stdoutErrorHandler : this._stderrErrorHandler; if (groupIndent.length !== 0) { - if (string.includes('\n')) { - string = string.replace(/\n/g, `\n${groupIndent}`); + if (StringPrototypeIncludes(string, '\n')) { + string = StringPrototypeReplace(string, /\n/g, `\n${groupIndent}`); } string = groupIndent + string; } @@ -395,8 +405,7 @@ const consoleMethods = { name: 'Trace', message: this[kFormatForStderr](args) }; - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(err, trace); + ErrorCaptureStackTrace(err, trace); this.error(err.stack); }, @@ -451,13 +460,16 @@ const consoleMethods = { if (data.length > 0) { this.log(...data); } - this[kGroupIndent] += ' '.repeat(this[kGroupIndentationWidth]); + this[kGroupIndent] += + StringPrototypeRepeat(' ', this[kGroupIndentationWidth]); }, groupEnd() { - this[kGroupIndent] = - this[kGroupIndent].slice(0, this[kGroupIndent].length - - this[kGroupIndentationWidth]); + this[kGroupIndent] = StringPrototypeSlice( + this[kGroupIndent], + 0, + this[kGroupIndent].length - this[kGroupIndentationWidth] + ); }, // https://console.spec.whatwg.org/#table @@ -502,14 +514,14 @@ const consoleMethods = { let length = 0; if (mapIter) { for (; i < tabularData.length / 2; ++i) { - keys.push(_inspect(tabularData[i * 2])); - values.push(_inspect(tabularData[i * 2 + 1])); + ArrayPrototypePush(keys, _inspect(tabularData[i * 2])); + ArrayPrototypePush(values, _inspect(tabularData[i * 2 + 1])); length++; } } else { for (const [k, v] of tabularData) { - keys.push(_inspect(k)); - values.push(_inspect(v)); + ArrayPrototypePush(keys, _inspect(k)); + ArrayPrototypePush(values, _inspect(v)); length++; } } @@ -531,7 +543,7 @@ const consoleMethods = { const values = []; let length = 0; for (const v of tabularData) { - values.push(_inspect(v)); + ArrayPrototypePush(values, _inspect(v)); length++; } return final([iterKey, valuesKey], [getIndexArray(length), values]); @@ -566,11 +578,11 @@ const consoleMethods = { const keys = ObjectKeys(map); const values = ObjectValues(map); if (hasPrimitives) { - keys.push(valuesKey); - values.push(valuesKeyArray); + ArrayPrototypePush(keys, valuesKey); + ArrayPrototypePush(values, valuesKeyArray); } - keys.unshift(indexKey); - values.unshift(indexKeyArray); + ArrayPrototypeUnshift(keys, indexKey); + ArrayPrototypeUnshift(values, indexKeyArray); return final(keys, values); }, @@ -597,7 +609,7 @@ function timeLogImpl(self, name, label, data) { } function pad(value) { - return `${value}`.padStart(2, '0'); + return StringPrototypePadStart(`${value}`, 2, '0'); } function formatTime(ms) { @@ -618,16 +630,19 @@ function formatTime(ms) { } if (hours !== 0 || minutes !== 0) { - [seconds, ms] = seconds.toFixed(3).split('.'); + [seconds, ms] = StringPrototypeSplit( + NumberPrototypeToFixed(seconds, 3), + '.' + ); const res = hours !== 0 ? `${hours}:${pad(minutes)}` : minutes; return `${res}:${pad(seconds)}.${ms} (${hours !== 0 ? 'h:m' : ''}m:ss.mmm)`; } if (seconds !== 0) { - return `${seconds.toFixed(3)}s`; + return `${NumberPrototypeToFixed(seconds, 3)}s`; } - return `${Number(ms.toFixed(3))}ms`; + return `${Number(NumberPrototypeToFixed(ms, 3))}ms`; } const keyKey = 'Key'; diff --git a/lib/internal/console/global.js b/lib/internal/console/global.js index 1c615c78451510..d6c0c24d529dcc 100644 --- a/lib/internal/console/global.js +++ b/lib/internal/console/global.js @@ -13,6 +13,7 @@ // in the global console prototype chain anymore. const { + FunctionPrototypeBind, ObjectCreate, ReflectDefineProperty, ReflectGetOwnPropertyDescriptor, @@ -37,7 +38,7 @@ for (const prop of ReflectOwnKeys(Console.prototype)) { const desc = ReflectGetOwnPropertyDescriptor(Console.prototype, prop); if (typeof desc.value === 'function') { // fix the receiver const name = desc.value.name; - desc.value = desc.value.bind(globalConsole); + desc.value = FunctionPrototypeBind(desc.value, globalConsole); ReflectDefineProperty(desc.value, 'name', { value: name }); } ReflectDefineProperty(globalConsole, prop, desc); diff --git a/lib/internal/crypto/aes.js b/lib/internal/crypto/aes.js index 3ae60057c30cf8..ab3ee099cd0d69 100644 --- a/lib/internal/crypto/aes.js +++ b/lib/internal/crypto/aes.js @@ -1,12 +1,15 @@ 'use strict'; const { + ArrayBufferIsView, + ArrayBufferPrototypeSlice, ArrayFrom, ArrayPrototypeIncludes, ArrayPrototypePush, MathFloor, Promise, SafeSet, + TypedArrayPrototypeSlice, } = primordials; const { @@ -182,8 +185,10 @@ function asyncAesGcmCipher( let tag; switch (mode) { case kWebCryptoCipherDecrypt: - tag = data.slice(-tagByteLength); - data = data.slice(0, -tagByteLength); + const slice = ArrayBufferIsView(data) ? + TypedArrayPrototypeSlice : ArrayBufferPrototypeSlice; + tag = slice(data, -tagByteLength); + data = slice(data, 0, -tagByteLength); break; case kWebCryptoCipherEncrypt: tag = tagByteLength; diff --git a/lib/internal/crypto/cipher.js b/lib/internal/crypto/cipher.js index 299d387d1c5e84..1b6ad0e7ea601c 100644 --- a/lib/internal/crypto/cipher.js +++ b/lib/internal/crypto/cipher.js @@ -2,6 +2,8 @@ const { ObjectSetPrototypeOf, + ReflectApply, + StringPrototypeToLowerCase, } = primordials; const { @@ -118,14 +120,14 @@ function createCipherBase(cipher, credential, options, decipher, iv) { } this._decoder = null; - LazyTransform.call(this, options); + ReflectApply(LazyTransform, this, [options]); } function createCipher(cipher, password, options, decipher) { validateString(cipher, 'cipher'); password = getArrayBufferOrView(password, 'password'); - createCipherBase.call(this, cipher, password, options, decipher); + ReflectApply(createCipherBase, this, [cipher, password, options, decipher]); } function createCipherWithIV(cipher, key, options, decipher, iv) { @@ -133,7 +135,7 @@ function createCipherWithIV(cipher, key, options, decipher, iv) { const encoding = getStringOption(options, 'encoding'); key = prepareSecretKey(key, encoding); iv = iv === null ? null : getArrayBufferOrView(iv, 'iv'); - createCipherBase.call(this, cipher, key, options, decipher, iv); + ReflectApply(createCipherBase, this, [cipher, key, options, decipher, iv]); } // The Cipher class is part of the legacy Node.js crypto API. It exposes @@ -145,7 +147,7 @@ function Cipher(cipher, password, options) { if (!(this instanceof Cipher)) return new Cipher(cipher, password, options); - createCipher.call(this, cipher, password, options, true); + ReflectApply(createCipher, this, [cipher, password, options, true]); } ObjectSetPrototypeOf(Cipher.prototype, LazyTransform.prototype); @@ -241,7 +243,7 @@ function Cipheriv(cipher, key, iv, options) { if (!(this instanceof Cipheriv)) return new Cipheriv(cipher, key, iv, options); - createCipherWithIV.call(this, cipher, key, options, true, iv); + ReflectApply(createCipherWithIV, this, [cipher, key, options, true, iv]); } function addCipherPrototypeFunctions(constructor) { @@ -271,7 +273,7 @@ function Decipher(cipher, password, options) { if (!(this instanceof Decipher)) return new Decipher(cipher, password, options); - createCipher.call(this, cipher, password, options, false); + ReflectApply(createCipher, this, [cipher, password, options, false]); } ObjectSetPrototypeOf(Decipher.prototype, LazyTransform.prototype); @@ -287,7 +289,7 @@ function Decipheriv(cipher, key, iv, options) { if (!(this instanceof Decipheriv)) return new Decipheriv(cipher, key, iv, options); - createCipherWithIV.call(this, cipher, key, options, false, iv); + ReflectApply(createCipherWithIV, this, [cipher, key, options, false, iv]); } ObjectSetPrototypeOf(Decipheriv.prototype, LazyTransform.prototype); @@ -315,8 +317,8 @@ function getCipherInfo(nameOrNid, options) { const ret = _getCipherInfo({}, nameOrNid, keyLength, ivLength); if (ret !== undefined) { - if (ret.name) ret.name = ret.name.toLowerCase(); - if (ret.type) ret.type = ret.type.toLowerCase(); + if (ret.name) ret.name = StringPrototypeToLowerCase(ret.name); + if (ret.type) ret.type = StringPrototypeToLowerCase(ret.type); } return ret; } diff --git a/lib/internal/crypto/diffiehellman.js b/lib/internal/crypto/diffiehellman.js index 8279f3058c449e..2a8795e378f3e0 100644 --- a/lib/internal/crypto/diffiehellman.js +++ b/lib/internal/crypto/diffiehellman.js @@ -1,6 +1,7 @@ 'use strict'; const { + ArrayBufferPrototypeSlice, FunctionPrototypeCall, MathFloor, ObjectDefineProperty, @@ -475,7 +476,9 @@ async function asyncDeriveBitsECDH(algorithm, baseKey, length) { if (byteLength < length) throw lazyDOMException('derived bit length is too small', 'OperationError'); - return length === byteLength ? bits : bits.slice(0, length); + return length === byteLength ? + bits : + ArrayBufferPrototypeSlice(bits, 0, length); } async function asyncDeriveBitsDH(algorithm, baseKey, length) { @@ -528,7 +531,9 @@ async function asyncDeriveBitsDH(algorithm, baseKey, length) { if (byteLength < length) throw lazyDOMException('derived bit length is too small', 'OperationError'); - return length === byteLength ? bits : bits.slice(0, length); + return length === byteLength ? + bits : + ArrayBufferPrototypeSlice(bits, 0, length); } function dhExportKey(key, format) { diff --git a/lib/internal/crypto/ec.js b/lib/internal/crypto/ec.js index c72eb4007bd49f..b14bddd4911876 100644 --- a/lib/internal/crypto/ec.js +++ b/lib/internal/crypto/ec.js @@ -230,7 +230,7 @@ async function ecImportKey( throw lazyDOMException('JWK is not extractable', 'DataError'); } - if (keyData.alg !== undefined) { + if (algorithm.name === 'ECDSA' && keyData.alg !== undefined) { if (typeof keyData.alg !== 'string') throw lazyDOMException('Invalid alg', 'DataError'); switch (keyData.alg) { diff --git a/lib/internal/crypto/hash.js b/lib/internal/crypto/hash.js index 4647e98c671ab8..6c502f52b66503 100644 --- a/lib/internal/crypto/hash.js +++ b/lib/internal/crypto/hash.js @@ -2,6 +2,7 @@ const { ObjectSetPrototypeOf, + ReflectApply, Symbol, } = primordials; @@ -67,7 +68,7 @@ function Hash(algorithm, options) { this[kState] = { [kFinalized]: false }; - LazyTransform.call(this, options); + ReflectApply(LazyTransform, this, [options]); } ObjectSetPrototypeOf(Hash.prototype, LazyTransform.prototype); @@ -134,7 +135,7 @@ function Hmac(hmac, key, options) { this[kState] = { [kFinalized]: false }; - LazyTransform.call(this, options); + ReflectApply(LazyTransform, this, [options]); } ObjectSetPrototypeOf(Hmac.prototype, LazyTransform.prototype); diff --git a/lib/internal/crypto/keygen.js b/lib/internal/crypto/keygen.js index 8260f59588c714..5f29a3153b94e0 100644 --- a/lib/internal/crypto/keygen.js +++ b/lib/internal/crypto/keygen.js @@ -71,7 +71,7 @@ function generateKeyPair(type, options, callback) { if (typeof callback !== 'function') throw new ERR_INVALID_CALLBACK(callback); - const job = check(kCryptoJobAsync, type, options); + const job = createJob(kCryptoJobAsync, type, options); job.ondone = (error, result) => { if (error) return FunctionPrototypeCall(callback, job, error); @@ -91,7 +91,7 @@ ObjectDefineProperty(generateKeyPair, customPromisifyArgs, { }); function generateKeyPairSync(type, options) { - return handleError(check(kCryptoJobSync, type, options).run()); + return handleError(createJob(kCryptoJobSync, type, options).run()); } function handleError(ret) { @@ -152,7 +152,7 @@ function parseKeyEncoding(keyType, options = {}) { ]; } -function check(mode, type, options) { +function createJob(mode, type, options) { validateString(type, 'type'); const encoding = parseKeyEncoding(type, options); diff --git a/lib/internal/crypto/random.js b/lib/internal/crypto/random.js index ae4111bbb07e8d..dca43647a6635a 100644 --- a/lib/internal/crypto/random.js +++ b/lib/internal/crypto/random.js @@ -113,7 +113,7 @@ function randomFillSync(buf, offset = 0, size) { const job = new RandomBytesJob( kCryptoJobSync, - buf.buffer || buf, + buf, offset, size); diff --git a/lib/internal/crypto/sig.js b/lib/internal/crypto/sig.js index 27b26a87f0d6f3..783cdb33202202 100644 --- a/lib/internal/crypto/sig.js +++ b/lib/internal/crypto/sig.js @@ -2,6 +2,7 @@ const { ObjectSetPrototypeOf, + ReflectApply, } = primordials; const { @@ -50,7 +51,7 @@ function Sign(algorithm, options) { this[kHandle] = new _Sign(); this[kHandle].init(algorithm); - Writable.call(this, options); + ReflectApply(Writable, this, [options]); } ObjectSetPrototypeOf(Sign.prototype, Writable.prototype); @@ -164,7 +165,7 @@ function Verify(algorithm, options) { this[kHandle] = new _Verify(); this[kHandle].init(algorithm); - Writable.call(this, options); + ReflectApply(Writable, this, [options]); } ObjectSetPrototypeOf(Verify.prototype, Writable.prototype); diff --git a/lib/internal/crypto/webcrypto.js b/lib/internal/crypto/webcrypto.js index 0a7101bfcc78c2..7bd487972eb08f 100644 --- a/lib/internal/crypto/webcrypto.js +++ b/lib/internal/crypto/webcrypto.js @@ -7,6 +7,7 @@ const { ObjectDefineProperties, SafeSet, SymbolToStringTag, + StringPrototypeRepeat, } = primordials; const { @@ -131,7 +132,7 @@ async function deriveBits(algorithm, baseKey, length) { .pbkdf2DeriveBits(algorithm, baseKey, length); case 'NODE-SCRYPT': return lazyRequire('internal/crypto/scrypt') - .asyncScryptDeriveBits(algorithm, baseKey, length); + .scryptDeriveBits(algorithm, baseKey, length); case 'NODE-DH': return lazyRequire('internal/crypto/diffiehellman') .asyncDeriveBitsDH(algorithm, baseKey, length); @@ -494,7 +495,7 @@ async function wrapKey(format, key, wrappingKey, algorithm) { throw lazyDOMException('Invalid exported JWK key', 'DataError'); const ec = new TextEncoder(); const raw = JSONStringify(keyData); - keyData = ec.encode(raw + ' '.repeat(8 - (raw.length % 8))); + keyData = ec.encode(raw + StringPrototypeRepeat(' ', 8 - (raw.length % 8))); } return cipherOrWrap( diff --git a/lib/internal/dgram.js b/lib/internal/dgram.js index 8a8d9ba8c0ddd4..950a82392c8e63 100644 --- a/lib/internal/dgram.js +++ b/lib/internal/dgram.js @@ -1,6 +1,7 @@ 'use strict'; const { + FunctionPrototypeBind, Symbol, } = primordials; @@ -37,14 +38,14 @@ function newHandle(type, lookup) { if (type === 'udp4') { const handle = new UDP(); - handle.lookup = lookup4.bind(handle, lookup); + handle.lookup = FunctionPrototypeBind(lookup4, handle, lookup); return handle; } if (type === 'udp6') { const handle = new UDP(); - handle.lookup = lookup6.bind(handle, lookup); + handle.lookup = FunctionPrototypeBind(lookup6, handle, lookup); handle.bind = handle.bind6; handle.connect = handle.connect6; handle.send = handle.send6; diff --git a/lib/internal/dns/promises.js b/lib/internal/dns/promises.js index 99693445e825a0..e0158eef81307e 100644 --- a/lib/internal/dns/promises.js +++ b/lib/internal/dns/promises.js @@ -1,9 +1,11 @@ 'use strict'; const { + ArrayPrototypeMap, ObjectCreate, ObjectDefineProperty, Promise, + ReflectApply, } = primordials; const { @@ -169,7 +171,8 @@ function onresolve(err, result, ttls) { } if (ttls && this.ttl) - result = result.map((address, index) => ({ address, ttl: ttls[index] })); + result = ArrayPrototypeMap( + result, (address, index) => ({ address, ttl: ttls[index] })); this.resolve(result); } @@ -217,6 +220,8 @@ class Resolver { Resolver.prototype.getServers = CallbackResolver.prototype.getServers; Resolver.prototype.setServers = CallbackResolver.prototype.setServers; +Resolver.prototype.cancel = CallbackResolver.prototype.cancel; +Resolver.prototype.setLocalAddress = CallbackResolver.prototype.setLocalAddress; Resolver.prototype.resolveAny = resolveMap.ANY = resolver('queryAny'); Resolver.prototype.resolve4 = resolveMap.A = resolver('queryA'); Resolver.prototype.resolve6 = resolveMap.AAAA = resolver('queryAaaa'); @@ -244,7 +249,7 @@ Resolver.prototype.resolve = function resolve(hostname, rrtype) { throw new ERR_INVALID_ARG_TYPE('rrtype', 'string', rrtype); } - return resolver.call(this, hostname); + return ReflectApply(resolver, this, [hostname]); }; diff --git a/lib/internal/dns/utils.js b/lib/internal/dns/utils.js index 459a67be3d8a78..27d25c92ad93aa 100644 --- a/lib/internal/dns/utils.js +++ b/lib/internal/dns/utils.js @@ -2,8 +2,13 @@ const { ArrayIsArray, + ArrayPrototypeForEach, + ArrayPrototypeJoin, + ArrayPrototypeMap, ArrayPrototypePush, + FunctionPrototypeBind, NumberParseInt, + StringPrototypeMatch, StringPrototypeReplace, } = primordials; @@ -45,7 +50,7 @@ class Resolver { } getServers() { - return this._handle.getServers().map((val) => { + return ArrayPrototypeMap(this._handle.getServers(), (val) => { if (!val[1] || val[1] === IANA_DNS_PORT) return val[0]; @@ -65,16 +70,16 @@ class Resolver { const orig = this._handle.getServers(); const newSet = []; - servers.forEach((serv, index) => { + ArrayPrototypeForEach(servers, (serv, index) => { if (typeof serv !== 'string') { throw new ERR_INVALID_ARG_TYPE(`servers[${index}]`, 'string', serv); } let ipVersion = isIP(serv); if (ipVersion !== 0) - return newSet.push([ipVersion, serv, IANA_DNS_PORT]); + return ArrayPrototypePush(newSet, [ipVersion, serv, IANA_DNS_PORT]); - const match = serv.match(IPv6RE); + const match = StringPrototypeMatch(serv, IPv6RE); // Check for an IPv6 in brackets. if (match) { @@ -88,7 +93,7 @@ class Resolver { } // addr::port - const addrSplitMatch = serv.match(addrSplitRE); + const addrSplitMatch = StringPrototypeMatch(serv, addrSplitRE); if (addrSplitMatch) { const hostIP = addrSplitMatch[1]; @@ -109,11 +114,23 @@ class Resolver { if (errorNumber !== 0) { // Reset the servers to the old servers, because ares probably unset them. - this._handle.setServers(orig.join(',')); + this._handle.setServers(ArrayPrototypeJoin(orig, ',')); const err = strerror(errorNumber); throw new ERR_DNS_SET_SERVERS_FAILED(err, servers); } } + + setLocalAddress(ipv4, ipv6) { + if (typeof ipv4 !== 'string') { + throw new ERR_INVALID_ARG_TYPE('ipv4', 'String', ipv4); + } + + if (typeof ipv6 !== 'string' && ipv6 !== undefined) { + throw new ERR_INVALID_ARG_TYPE('ipv6', ['String', 'undefined'], ipv6); + } + + this._handle.setLocalAddress(ipv4, ipv6); + } } let defaultResolver = new Resolver(); @@ -144,8 +161,8 @@ function setDefaultResolver(resolver) { } function bindDefaultResolver(target, source) { - resolverKeys.forEach((key) => { - target[key] = source[key].bind(defaultResolver); + ArrayPrototypeForEach(resolverKeys, (key) => { + target[key] = FunctionPrototypeBind(source[key], defaultResolver); }); } diff --git a/lib/internal/encoding.js b/lib/internal/encoding.js index 5226bf518dac38..78ec2ca1043cf6 100644 --- a/lib/internal/encoding.js +++ b/lib/internal/encoding.js @@ -4,10 +4,11 @@ // https://encoding.spec.whatwg.org const { - Map, ObjectCreate, ObjectDefineProperties, ObjectGetOwnPropertyDescriptors, + SafeMap, + StringPrototypeSlice, Symbol, SymbolToStringTag, Uint32Array, @@ -73,7 +74,7 @@ const CONVERTER_FLAGS_IGNORE_BOM = 0x4; const empty = new Uint8Array(0); -const encodings = new Map([ +const encodings = new SafeMap([ ['unicode-1-1-utf-8', 'utf-8'], ['utf8', 'utf-8'], ['utf-8', 'utf-8'], @@ -308,7 +309,7 @@ function trimAsciiWhitespace(label) { label[e - 1] === '\u0020')) { e--; } - return label.slice(s, e); + return StringPrototypeSlice(label, s, e); } function getEncodingFromLabel(label) { @@ -503,7 +504,7 @@ function makeTextDecoderJS() { // If the very first result in the stream is a BOM, and we are not // explicitly told to ignore it, then we discard it. if (result[0] === '\ufeff') { - result = result.slice(1); + result = StringPrototypeSlice(result, 1); } this[kBOMSeen] = true; } diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 2fbd5084a575d2..0b6a95d761ee75 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -11,30 +11,50 @@ // message may change, the code should not. const { + ArrayFrom, ArrayIsArray, + ArrayPrototypeIncludes, + ArrayPrototypeIndexOf, + ArrayPrototypeJoin, + ArrayPrototypeMap, + ArrayPrototypePop, + ArrayPrototypePush, + ArrayPrototypeSlice, + ArrayPrototypeSplice, + ArrayPrototypeUnshift, Error, + ErrorCaptureStackTrace, ErrorPrototypeToString, JSONStringify, - Map, MathAbs, MathMax, + Number, NumberIsInteger, ObjectDefineProperty, ObjectKeys, RangeError, + ReflectApply, + RegExpPrototypeTest, + SafeMap, + SafeWeakMap, String, + StringPrototypeEndsWith, + StringPrototypeIncludes, + StringPrototypeMatch, + StringPrototypeSlice, + StringPrototypeSplit, StringPrototypeStartsWith, + StringPrototypeToLowerCase, Symbol, SymbolFor, SyntaxError, TypeError, URIError, - WeakMap, } = primordials; const isWindows = process.platform === 'win32'; -const messages = new Map(); +const messages = new SafeMap(); const codes = {}; const classRegExp = /^([A-Z][a-z0-9]*)+$/; @@ -53,8 +73,10 @@ const kTypes = [ ]; const MainContextError = Error; -const overrideStackTrace = new WeakMap(); +const overrideStackTrace = new SafeWeakMap(); const kNoOverride = Symbol('kNoOverride'); +let userStackTraceLimit; +const nodeInternalPrefix = '__node_internal_'; const prepareStackTrace = (globalThis, error, trace) => { // API for node internals to override error stack formatting // without interfering with userland code. @@ -64,6 +86,21 @@ const prepareStackTrace = (globalThis, error, trace) => { return f(error, trace); } + const firstFrame = trace[0]?.getFunctionName(); + if (firstFrame && StringPrototypeStartsWith(firstFrame, nodeInternalPrefix)) { + for (let l = trace.length - 1; l >= 0; l--) { + const fn = trace[l]?.getFunctionName(); + if (fn && StringPrototypeStartsWith(fn, nodeInternalPrefix)) { + ArrayPrototypeSplice(trace, 0, l + 1); + break; + } + } + // `userStackTraceLimit` is the user value for `Error.stackTraceLimit`, + // it is updated at every new exception in `captureLargerStackTrace`. + if (trace.length > userStackTraceLimit) + ArrayPrototypeSplice(trace, userStackTraceLimit); + } + const globalOverride = maybeOverridePrepareStackTrace(globalThis, error, trace); if (globalOverride !== kNoOverride) return globalOverride; @@ -77,7 +114,7 @@ const prepareStackTrace = (globalThis, error, trace) => { if (trace.length === 0) { return errorString; } - return `${errorString}\n at ${trace.join('\n at ')}`; + return `${errorString}\n at ${ArrayPrototypeJoin(trace, '\n at ')}`; }; const maybeOverridePrepareStackTrace = (globalThis, error, trace) => { @@ -98,8 +135,6 @@ const maybeOverridePrepareStackTrace = (globalThis, error, trace) => { return kNoOverride; }; -let excludedStackFn; - // Lazily loaded let util; let assert; @@ -127,6 +162,27 @@ function lazyBuffer() { return buffer; } +const addCodeToName = hideStackFrames(function addCodeToName(err, name, code) { + // Set the stack + err = captureLargerStackTrace(err); + // Add the error code to the name to include it in the stack trace. + err.name = `${name} [${code}]`; + // Access the stack to generate the error message including the error code + // from the name. + err.stack; // eslint-disable-line no-unused-expressions + // Reset the name to the actual name. + if (name === 'SystemError') { + ObjectDefineProperty(err, 'name', { + value: name, + enumerable: false, + writable: true, + configurable: true + }); + } else { + delete err.name; + } +}); + // A specialized Error that includes an additional info property with // additional information about the error condition. // It has the properties present in a UVException but with a custom error @@ -137,15 +193,11 @@ function lazyBuffer() { // and may have .path and .dest. class SystemError extends Error { constructor(key, context) { - if (excludedStackFn === undefined) { - super(); - } else { - const limit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - super(); - // Reset the limit and setting the name property. - Error.stackTraceLimit = limit; - } + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + super(); + // Reset the limit and setting the name property. + Error.stackTraceLimit = limit; const prefix = getMessage(key, [], this); let message = `${prefix}: ${context.syscall} returned ` + `${context.code} (${context.message})`; @@ -253,16 +305,11 @@ function makeSystemErrorWithCode(key) { function makeNodeErrorWithCode(Base, key) { return function NodeError(...args) { - let error; - if (excludedStackFn === undefined) { - error = new Base(); - } else { - const limit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - error = new Base(); - // Reset the limit and setting the name property. - Error.stackTraceLimit = limit; - } + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + const error = new Base(); + // Reset the limit and setting the name property. + Error.stackTraceLimit = limit; const message = getMessage(key, args, error); ObjectDefineProperty(error, 'message', { value: message, @@ -286,45 +333,11 @@ function makeNodeErrorWithCode(Base, key) { // This function removes unnecessary frames from Node.js core errors. function hideStackFrames(fn) { - return function hidden(...args) { - // Make sure the most outer `hideStackFrames()` function is used. - let setStackFn = false; - if (excludedStackFn === undefined) { - excludedStackFn = hidden; - setStackFn = true; - } - try { - return fn(...args); - } finally { - if (setStackFn === true) { - excludedStackFn = undefined; - } - } - }; -} - -function addCodeToName(err, name, code) { - // Set the stack - if (excludedStackFn !== undefined) { - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(err, excludedStackFn); - } - // Add the error code to the name to include it in the stack trace. - err.name = `${name} [${code}]`; - // Access the stack to generate the error message including the error code - // from the name. - err.stack; - // Reset the name to the actual name. - if (name === 'SystemError') { - ObjectDefineProperty(err, 'name', { - value: name, - enumerable: false, - writable: true, - configurable: true - }); - } else { - delete err.name; - } + // We rename the functions that will be hidden to cut off the stacktrace + // at the outermost one + const hidden = nodeInternalPrefix + fn.name; + ObjectDefineProperty(fn, 'name', { value: hidden }); + return fn; } // Utility function for registering the error codes. Only used here. Exported @@ -358,10 +371,11 @@ function getMessage(key, args, self) { `Code: ${key}; The provided arguments length (${args.length}) does not ` + `match the required ones (${msg.length}).` ); - return msg.apply(self, args); + return ReflectApply(msg, self, args); } - const expectedLength = (msg.match(/%[dfijoOs]/g) || []).length; + const expectedLength = + (StringPrototypeMatch(msg, /%[dfijoOs]/g) || []).length; assert( expectedLength === args.length, `Code: ${key}; The provided arguments length (${args.length}) does not ` + @@ -370,8 +384,8 @@ function getMessage(key, args, self) { if (args.length === 0) return msg; - args.unshift(msg); - return lazyInternalUtilInspect().format.apply(null, args); + ArrayPrototypeUnshift(args, msg); + return ReflectApply(lazyInternalUtilInspect().format, null, args); } let uvBinding; @@ -393,6 +407,16 @@ function uvErrmapGet(name) { return uvBinding.errmap.get(name); } +const captureLargerStackTrace = hideStackFrames( + function captureLargerStackTrace(err) { + userStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Infinity; + ErrorCaptureStackTrace(err); + // Reset the limit + Error.stackTraceLimit = userStackTraceLimit; + + return err; + }); /** * This creates an error compatible with errors produced in the C++ @@ -403,8 +427,8 @@ function uvErrmapGet(name) { * @param {Object} ctx * @returns {Error} */ -function uvException(ctx) { - const [ code, uvmsg ] = uvErrmapGet(ctx.errno) || uvUnmappedError; +const uvException = hideStackFrames(function uvException(ctx) { + const [code, uvmsg] = uvErrmapGet(ctx.errno) || uvUnmappedError; let message = `${code}: ${ctx.message || uvmsg}, ${ctx.syscall}`; let path; @@ -418,7 +442,7 @@ function uvException(ctx) { message += ` -> '${dest}'`; } - // Reducing the limit improves the performance significantly. We do not loose + // Reducing the limit improves the performance significantly. We do not lose // the stack frames due to the `captureStackTrace()` function that is called // later. const tmpLimit = Error.stackTraceLimit; @@ -444,10 +468,8 @@ function uvException(ctx) { err.dest = dest; } - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(err, excludedStackFn || uvException); - return err; -} + return captureLargerStackTrace(err); +}); /** * This creates an error compatible with errors produced in the C++ @@ -460,37 +482,36 @@ function uvException(ctx) { * @param {number} [port] * @returns {Error} */ -function uvExceptionWithHostPort(err, syscall, address, port) { - const [ code, uvmsg ] = uvErrmapGet(err) || uvUnmappedError; - const message = `${syscall} ${code}: ${uvmsg}`; - let details = ''; - - if (port && port > 0) { - details = ` ${address}:${port}`; - } else if (address) { - details = ` ${address}`; - } +const uvExceptionWithHostPort = hideStackFrames( + function uvExceptionWithHostPort(err, syscall, address, port) { + const [code, uvmsg] = uvErrmapGet(err) || uvUnmappedError; + const message = `${syscall} ${code}: ${uvmsg}`; + let details = ''; + + if (port && port > 0) { + details = ` ${address}:${port}`; + } else if (address) { + details = ` ${address}`; + } - // Reducing the limit improves the performance significantly. We do not loose - // the stack frames due to the `captureStackTrace()` function that is called - // later. - const tmpLimit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - // eslint-disable-next-line no-restricted-syntax - const ex = new Error(`${message}${details}`); - Error.stackTraceLimit = tmpLimit; - ex.code = code; - ex.errno = err; - ex.syscall = syscall; - ex.address = address; - if (port) { - ex.port = port; - } + // Reducing the limit improves the performance significantly. We do not + // lose the stack frames due to the `captureStackTrace()` function that + // is called later. + const tmpLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + // eslint-disable-next-line no-restricted-syntax + const ex = new Error(`${message}${details}`); + Error.stackTraceLimit = tmpLimit; + ex.code = code; + ex.errno = err; + ex.syscall = syscall; + ex.address = address; + if (port) { + ex.port = port; + } - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(ex, excludedStackFn || uvExceptionWithHostPort); - return ex; -} + return captureLargerStackTrace(ex); + }); /** * This used to be util._errnoException(). @@ -500,26 +521,28 @@ function uvExceptionWithHostPort(err, syscall, address, port) { * @param {string} [original] * @returns {Error} */ -function errnoException(err, syscall, original) { - // TODO(joyeecheung): We have to use the type-checked - // getSystemErrorName(err) to guard against invalid arguments from users. - // This can be replaced with [ code ] = errmap.get(err) when this method - // is no longer exposed to user land. - if (util === undefined) util = require('util'); - const code = util.getSystemErrorName(err); - const message = original ? - `${syscall} ${code} ${original}` : `${syscall} ${code}`; - - // eslint-disable-next-line no-restricted-syntax - const ex = new Error(message); - ex.errno = err; - ex.code = code; - ex.syscall = syscall; +const errnoException = hideStackFrames( + function errnoException(err, syscall, original) { + // TODO(joyeecheung): We have to use the type-checked + // getSystemErrorName(err) to guard against invalid arguments from users. + // This can be replaced with [ code ] = errmap.get(err) when this method + // is no longer exposed to user land. + if (util === undefined) util = require('util'); + const code = util.getSystemErrorName(err); + const message = original ? + `${syscall} ${code} ${original}` : `${syscall} ${code}`; + + const tmpLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + // eslint-disable-next-line no-restricted-syntax + const ex = new Error(message); + Error.stackTraceLimit = tmpLimit; + ex.errno = err; + ex.code = code; + ex.syscall = syscall; - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(ex, excludedStackFn || errnoException); - return ex; -} + return captureLargerStackTrace(ex); + }); /** * Deprecated, new function is `uvExceptionWithHostPort()` @@ -532,43 +555,42 @@ function errnoException(err, syscall, original) { * @param {string} [additional] * @returns {Error} */ -function exceptionWithHostPort(err, syscall, address, port, additional) { - // TODO(joyeecheung): We have to use the type-checked - // getSystemErrorName(err) to guard against invalid arguments from users. - // This can be replaced with [ code ] = errmap.get(err) when this method - // is no longer exposed to user land. - if (util === undefined) util = require('util'); - const code = util.getSystemErrorName(err); - let details = ''; - if (port && port > 0) { - details = ` ${address}:${port}`; - } else if (address) { - details = ` ${address}`; - } - if (additional) { - details += ` - Local (${additional})`; - } +const exceptionWithHostPort = hideStackFrames( + function exceptionWithHostPort(err, syscall, address, port, additional) { + // TODO(joyeecheung): We have to use the type-checked + // getSystemErrorName(err) to guard against invalid arguments from users. + // This can be replaced with [ code ] = errmap.get(err) when this method + // is no longer exposed to user land. + if (util === undefined) util = require('util'); + const code = util.getSystemErrorName(err); + let details = ''; + if (port && port > 0) { + details = ` ${address}:${port}`; + } else if (address) { + details = ` ${address}`; + } + if (additional) { + details += ` - Local (${additional})`; + } - // Reducing the limit improves the performance significantly. We do not loose - // the stack frames due to the `captureStackTrace()` function that is called - // later. - const tmpLimit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - // eslint-disable-next-line no-restricted-syntax - const ex = new Error(`${syscall} ${code}${details}`); - Error.stackTraceLimit = tmpLimit; - ex.errno = err; - ex.code = code; - ex.syscall = syscall; - ex.address = address; - if (port) { - ex.port = port; - } + // Reducing the limit improves the performance significantly. We do not + // lose the stack frames due to the `captureStackTrace()` function that + // is called later. + const tmpLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + // eslint-disable-next-line no-restricted-syntax + const ex = new Error(`${syscall} ${code}${details}`); + Error.stackTraceLimit = tmpLimit; + ex.errno = err; + ex.code = code; + ex.syscall = syscall; + ex.address = address; + if (port) { + ex.port = port; + } - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(ex, excludedStackFn || exceptionWithHostPort); - return ex; -} + return captureLargerStackTrace(ex); + }); /** * @param {number|string} code - A libuv error number or a c-ares error code @@ -576,7 +598,7 @@ function exceptionWithHostPort(err, syscall, address, port, additional) { * @param {string} [hostname] * @returns {Error} */ -function dnsException(code, syscall, hostname) { +const dnsException = hideStackFrames(function(code, syscall, hostname) { let errno; // If `code` is of type number, it is a libuv error number, else it is a // c-ares error code. @@ -596,7 +618,7 @@ function dnsException(code, syscall, hostname) { } } const message = `${syscall} ${code}${hostname ? ` ${hostname}` : ''}`; - // Reducing the limit improves the performance significantly. We do not loose + // Reducing the limit improves the performance significantly. We do not lose // the stack frames due to the `captureStackTrace()` function that is called // later. const tmpLimit = Error.stackTraceLimit; @@ -611,10 +633,8 @@ function dnsException(code, syscall, hostname) { ex.hostname = hostname; } - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(ex, excludedStackFn || dnsException); - return ex; -} + return captureLargerStackTrace(ex); +}); function connResetException(msg) { // eslint-disable-next-line no-restricted-syntax @@ -654,9 +674,9 @@ function addNumericalSeparator(val) { let i = val.length; const start = val[0] === '-' ? 1 : 0; for (; i >= start + 4; i -= 3) { - res = `_${val.slice(i - 3, i)}${res}`; + res = `_${StringPrototypeSlice(val, i - 3, i)}${res}`; } - return `${val.slice(0, i)}${res}`; + return `${StringPrototypeSlice(val, 0, i)}${res}`; } // Used to enhance the stack that will be picked up by the inspector @@ -691,7 +711,8 @@ const fatalExceptionStackEnhancers = { // ANSI escape sequences is not reliable. if (process.platform === 'win32') { const info = internalBinding('os').getOSInformation(); - const ver = info[2].split('.').map((a) => +a); + const ver = ArrayPrototypeMap(StringPrototypeSplit(info[2], '.'), + Number); if (ver[0] !== 10 || ver[2] < 14393) { useColors = false; } @@ -718,6 +739,16 @@ const fatalExceptionStackEnhancers = { } }; +// Node uses an AbortError that isn't exactly the same as the DOMException +// to make usage of the error in userland and readable-stream easier. +// It is a regular error with `.code` and `.name`. +class AbortError extends Error { + constructor() { + super('The operation was aborted'); + this.code = 'ABORT_ERR'; + this.name = 'AbortError'; + } +} module.exports = { addCodeToName, // Exported for NghttpError codes, @@ -732,6 +763,7 @@ module.exports = { uvException, uvExceptionWithHostPort, SystemError, + AbortError, // This is exported only to facilitate testing. E, kNoOverride, @@ -895,6 +927,7 @@ E('ERR_HTTP2_MAX_PENDING_SETTINGS_ACK', 'Maximum number of pending settings acknowledgements', Error); E('ERR_HTTP2_NESTED_PUSH', 'A push stream cannot initiate another push stream.', Error); +E('ERR_HTTP2_NO_MEM', 'Out of memory', Error); E('ERR_HTTP2_NO_SOCKET_MANIPULATION', 'HTTP/2 sockets should not be directly manipulated (e.g. read and written)', Error); @@ -985,11 +1018,11 @@ E('ERR_INVALID_ARG_TYPE', } let msg = 'The '; - if (name.endsWith(' argument')) { + if (StringPrototypeEndsWith(name, ' argument')) { // For cases like 'first argument' msg += `${name} `; } else { - const type = name.includes('.') ? 'property' : 'argument'; + const type = StringPrototypeIncludes(name, '.') ? 'property' : 'argument'; msg += `"${name}" ${type} `; } msg += 'must be '; @@ -1001,31 +1034,31 @@ E('ERR_INVALID_ARG_TYPE', for (const value of expected) { assert(typeof value === 'string', 'All expected entries have to be of type string'); - if (kTypes.includes(value)) { - types.push(value.toLowerCase()); - } else if (classRegExp.test(value)) { - instances.push(value); + if (ArrayPrototypeIncludes(kTypes, value)) { + ArrayPrototypePush(types, StringPrototypeToLowerCase(value)); + } else if (RegExpPrototypeTest(classRegExp, value)) { + ArrayPrototypePush(instances, value); } else { assert(value !== 'object', 'The value "object" should be written as "Object"'); - other.push(value); + ArrayPrototypePush(other, value); } } // Special handle `object` in case other instances are allowed to outline // the differences between each other. if (instances.length > 0) { - const pos = types.indexOf('object'); + const pos = ArrayPrototypeIndexOf(types, 'object'); if (pos !== -1) { - types.splice(pos, 1); - instances.push('Object'); + ArrayPrototypeSplice(types, pos, 1); + ArrayPrototypePush(instances, 'Object'); } } if (types.length > 0) { if (types.length > 2) { - const last = types.pop(); - msg += `one of type ${types.join(', ')}, or ${last}`; + const last = ArrayPrototypePop(types); + msg += `one of type ${ArrayPrototypeJoin(types, ', ')}, or ${last}`; } else if (types.length === 2) { msg += `one of type ${types[0]} or ${types[1]}`; } else { @@ -1037,8 +1070,9 @@ E('ERR_INVALID_ARG_TYPE', if (instances.length > 0) { if (instances.length > 2) { - const last = instances.pop(); - msg += `an instance of ${instances.join(', ')}, or ${last}`; + const last = ArrayPrototypePop(instances); + msg += + `an instance of ${ArrayPrototypeJoin(instances, ', ')}, or ${last}`; } else { msg += `an instance of ${instances[0]}`; if (instances.length === 2) { @@ -1051,12 +1085,12 @@ E('ERR_INVALID_ARG_TYPE', if (other.length > 0) { if (other.length > 2) { - const last = other.pop(); - msg += `one of ${other.join(', ')}, or ${last}`; + const last = ArrayPrototypePop(other); + msg += `one of ${ArrayPrototypeJoin(other, ', ')}, or ${last}`; } else if (other.length === 2) { msg += `one of ${other[0]} or ${other[1]}`; } else { - if (other[0].toLowerCase() !== other[0]) + if (StringPrototypeToLowerCase(other[0]) !== other[0]) msg += 'an '; msg += `${other[0]}`; } @@ -1078,7 +1112,7 @@ E('ERR_INVALID_ARG_TYPE', let inspected = lazyInternalUtilInspect() .inspect(actual, { colors: false }); if (inspected.length > 25) - inspected = `${inspected.slice(0, 25)}...`; + inspected = `${StringPrototypeSlice(inspected, 0, 25)}...`; msg += `. Received type ${typeof actual} (${inspected})`; } return msg; @@ -1086,9 +1120,9 @@ E('ERR_INVALID_ARG_TYPE', E('ERR_INVALID_ARG_VALUE', (name, value, reason = 'is invalid') => { let inspected = lazyInternalUtilInspect().inspect(value); if (inspected.length > 128) { - inspected = `${inspected.slice(0, 128)}...`; + inspected = `${StringPrototypeSlice(inspected, 0, 128)}...`; } - const type = name.includes('.') ? 'property' : 'argument'; + const type = StringPrototypeIncludes(name, '.') ? 'property' : 'argument'; return `The ${type} '${name}' ${reason}. Received ${inspected}`; }, TypeError, RangeError); E('ERR_INVALID_ASYNC_ID', 'Invalid %s value: %s', RangeError); @@ -1205,9 +1239,10 @@ E('ERR_MANIFEST_ASSERT_INTEGRITY', moduleURL }" does not match the expected integrity.`; if (realIntegrities.size) { - const sri = [...realIntegrities.entries()].map(([alg, dgs]) => { - return `${alg}-${dgs}`; - }).join(' '); + const sri = ArrayPrototypeJoin( + ArrayFrom(realIntegrities.entries(), ([alg, dgs]) => `${alg}-${dgs}`), + ' ' + ); msg += ` Integrities found are: ${sri}`; } else { msg += ' The resource was not found in the policy.'; @@ -1235,8 +1270,11 @@ E('ERR_MISSING_ARGS', let msg = 'The '; const len = args.length; const wrap = (a) => `"${a}"`; - args = args.map( - (a) => (ArrayIsArray(a) ? a.map(wrap).join(' or ') : wrap(a)) + args = ArrayPrototypeMap( + args, + (a) => (ArrayIsArray(a) ? + ArrayPrototypeJoin(ArrayPrototypeMap(a, wrap), ' or ') : + wrap(a)) ); switch (len) { case 1: @@ -1246,7 +1284,7 @@ E('ERR_MISSING_ARGS', msg += `${args[0]} and ${args[1]} arguments`; break; default: - msg += args.slice(0, len - 1).join(', '); + msg += ArrayPrototypeJoin(ArrayPrototypeSlice(args, 0, len - 1), ', '); msg += `, and ${args[len - 1]} arguments`; break; } @@ -1309,9 +1347,10 @@ E('ERR_QUIC_INVALID_TLS_SESSION_TICKET', 'Invalid TLS session ticket', Error); E('ERR_QUIC_VERSION_NEGOTIATION', (version, requestedVersions, supportedVersions) => { + const requestedVersionsString = ArrayPrototypeJoin(requestedVersions, ', '); return 'QUIC session received version negotiation from server. ' + - `Version: ${version}. Requested: ${requestedVersions.join(', ')} ` + - `Supported: ${supportedVersions.join(', ')}`; + `Version: ${version}. Requested: ${requestedVersionsString} ` + + `Supported: ${ArrayPrototypeJoin(supportedVersions, ', ')}`; }, Error); E('ERR_REQUIRE_ESM', @@ -1382,11 +1421,11 @@ E('ERR_TLS_CERT_ALTNAME_INVALID', function(reason, host, cert) { }, Error); E('ERR_TLS_DH_PARAM_SIZE', 'DH parameter size %s is less than 2048', Error); E('ERR_TLS_HANDSHAKE_TIMEOUT', 'TLS handshake timeout', Error); -E('ERR_TLS_INVALID_CONTEXT', '%s must be a SecureContext', TypeError), -E('ERR_TLS_INVALID_STATE', 'TLS socket connection must be securely established', - Error), +E('ERR_TLS_INVALID_CONTEXT', '%s must be a SecureContext', TypeError); E('ERR_TLS_INVALID_PROTOCOL_VERSION', '%j is not a valid %s TLS protocol version', TypeError); +E('ERR_TLS_INVALID_STATE', 'TLS socket connection must be securely established', + Error); E('ERR_TLS_PROTOCOL_VERSION_CONFLICT', 'TLS protocol version %j conflicts with secureProtocol %j', TypeError); E('ERR_TLS_RENEGOTIATION_DISABLED', @@ -1457,7 +1496,7 @@ E('ERR_VM_MODULE_STATUS', 'Module status %s', Error); E('ERR_WASI_ALREADY_STARTED', 'WASI instance has already started', Error); E('ERR_WORKER_INIT_FAILED', 'Worker initialization failure: %s', Error); E('ERR_WORKER_INVALID_EXEC_ARGV', (errors, msg = 'invalid execArgv flags') => - `Initiated Worker with ${msg}: ${errors.join(', ')}`, + `Initiated Worker with ${msg}: ${ArrayPrototypeJoin(errors, ', ')}`, Error); E('ERR_WORKER_NOT_RUNNING', 'Worker instance not running', Error); E('ERR_WORKER_OUT_OF_MEMORY', @@ -1465,10 +1504,10 @@ E('ERR_WORKER_OUT_OF_MEMORY', E('ERR_WORKER_PATH', (filename) => 'The worker script or module filename must be an absolute path or a ' + 'relative path starting with \'./\' or \'../\'.' + - (filename.startsWith('file://') ? + (StringPrototypeStartsWith(filename, 'file://') ? ' Wrap file:// URLs with `new URL`.' : '' ) + - (filename.startsWith('data:text/javascript') ? + (StringPrototypeStartsWith(filename, 'data:text/javascript') ? ' Wrap data: URLs with `new URL`.' : '' ) + ` Received "${filename}"`, diff --git a/lib/internal/event_target.js b/lib/internal/event_target.js index 4db6af26e39a64..cfc138d6dbf7cf 100644 --- a/lib/internal/event_target.js +++ b/lib/internal/event_target.js @@ -4,15 +4,21 @@ const { ArrayFrom, Boolean, Error, - Map, + FunctionPrototypeBind, + FunctionPrototypeCall, NumberIsInteger, ObjectAssign, ObjectDefineProperties, ObjectDefineProperty, + ObjectGetOwnPropertyDescriptor, + ObjectGetOwnPropertyDescriptors, + ReflectApply, + SafeMap, String, Symbol, SymbolFor, SymbolToStringTag, + SafeWeakSet, } = primordials; const { @@ -23,24 +29,30 @@ const { ERR_INVALID_THIS, } } = require('internal/errors'); -const { validateInteger, validateObject } = require('internal/validators'); +const { validateObject } = require('internal/validators'); const { customInspectSymbol } = require('internal/util'); const { inspect } = require('util'); const kIsEventTarget = SymbolFor('nodejs.event_target'); +const EventEmitter = require('events'); +const { + kMaxEventTargetListeners, + kMaxEventTargetListenersWarned, +} = EventEmitter; + const kEvents = Symbol('kEvents'); const kStop = Symbol('kStop'); const kTarget = Symbol('kTarget'); +const kHandlers = Symbol('khandlers'); -const kHybridDispatch = Symbol.for('nodejs.internal.kHybridDispatch'); +const kHybridDispatch = SymbolFor('nodejs.internal.kHybridDispatch'); const kCreateEvent = Symbol('kCreateEvent'); const kNewListener = Symbol('kNewListener'); const kRemoveListener = Symbol('kRemoveListener'); const kIsNodeStyleListener = Symbol('kIsNodeStyleListener'); -const kMaxListeners = Symbol('kMaxListeners'); -const kMaxListenersWarned = Symbol('kMaxListenersWarned'); +const kTrustEvent = Symbol('kTrustEvent'); // Lazy load perf_hooks to avoid the additional overhead on startup let perf_hooks; @@ -61,13 +73,18 @@ const kBubbles = Symbol('bubbles'); const kComposed = Symbol('composed'); const kPropagationStopped = Symbol('propagationStopped'); -const isTrusted = () => false; +const isTrustedSet = new SafeWeakSet(); +const isTrusted = ObjectGetOwnPropertyDescriptor({ + get isTrusted() { + return isTrustedSet.has(this); + } +}, 'isTrusted').get; class Event { - constructor(type, options) { + constructor(type, options = null) { if (arguments.length === 0) throw new ERR_MISSING_ARGS('type'); - if (options != null) + if (options !== null) validateObject(options, 'options'); const { cancelable, bubbles, composed } = { ...options }; this[kCancelable] = !!cancelable; @@ -77,6 +94,10 @@ class Event { this[kDefaultPrevented] = false; this[kTimestamp] = lazyNow(); this[kPropagationStopped] = false; + if (options != null && options[kTrustEvent]) { + isTrustedSet.add(this); + } + // isTrusted is special (LegacyUnforgeable) ObjectDefineProperty(this, 'isTrusted', { get: isTrusted, @@ -160,6 +181,14 @@ ObjectDefineProperty(Event.prototype, SymbolToStringTag, { value: 'Event', }); +class NodeCustomEvent extends Event { + constructor(type, options) { + super(type, options); + if (options && options.detail) { + this.detail = options.detail; + } + } +} // The listeners for an EventTarget are maintained as a linked list. // Unfortunately, the way EventTarget is defined, listeners are accounted // using the tuple [handler,capture], and even if we don't actually make @@ -174,15 +203,17 @@ class Listener { previous.next = this; this.previous = previous; this.listener = listener; + // TODO(benjamingr) these 4 can be 'flags' to save 3 slots this.once = once; this.capture = capture; this.passive = passive; this.isNodeStyleListener = isNodeStyleListener; + this.removed = false; this.callback = typeof listener === 'function' ? listener : - listener.handleEvent.bind(listener); + FunctionPrototypeBind(listener.handleEvent, listener); } same(listener, capture) { @@ -194,11 +225,14 @@ class Listener { this.previous.next = this.next; if (this.next !== undefined) this.next.previous = this.previous; + this.removed = true; } } function initEventTarget(self) { - self[kEvents] = new Map(); + self[kEvents] = new SafeMap(); + self[kMaxEventTargetListeners] = EventEmitter.defaultMaxListeners; + self[kMaxEventTargetListenersWarned] = false; } class EventTarget { @@ -211,7 +245,24 @@ class EventTarget { initEventTarget(this); } - [kNewListener](size, type, listener, once, capture, passive) {} + [kNewListener](size, type, listener, once, capture, passive) { + if (this[kMaxEventTargetListeners] > 0 && + size > this[kMaxEventTargetListeners] && + !this[kMaxEventTargetListenersWarned]) { + this[kMaxEventTargetListenersWarned] = true; + // No error code for this since it is a Warning + // eslint-disable-next-line no-restricted-syntax + const w = new Error('Possible EventTarget memory leak detected. ' + + `${size} ${type} listeners ` + + `added to ${inspect(this, { depth: -1 })}. Use ` + + 'events.setMaxListeners() to increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.target = this; + w.type = type; + w.count = size; + process.emitWarning(w); + } + } [kRemoveListener](size, type, listener, capture) {} addEventListener(type, listener, options = {}) { @@ -224,6 +275,7 @@ class EventTarget { once, capture, passive, + signal, isNodeStyleListener } = validateEventListenerOptions(options); @@ -241,6 +293,17 @@ class EventTarget { } type = String(type); + if (signal) { + if (signal.aborted) { + return false; + } + // TODO(benjamingr) make this weak somehow? ideally the signal would + // not prevent the event target from GC. + signal.addEventListener('abort', () => { + this.removeEventListener(type, listener, options); + }, { once: true }); + } + let root = this[kEvents].get(type); if (root === undefined) { @@ -322,14 +385,13 @@ class EventTarget { } return event; }; + if (event !== undefined) + event[kTarget] = this; const root = this[kEvents].get(type); if (root === undefined || root.next === undefined) return true; - if (event !== undefined) - event[kTarget] = this; - let handler = root.next; let next; @@ -338,6 +400,12 @@ class EventTarget { // Cache the next item in case this iteration removes the current one next = handler.next; + if (handler.removed) { + // Deal with the case an event is removed while event handlers are + // Being processed (removeEventListener called from a listener) + handler = next; + continue; + } if (handler.once) { handler.remove(); root.size--; @@ -352,7 +420,7 @@ class EventTarget { } else { arg = createEvent(); } - const result = handler.callback.call(this, arg); + const result = FunctionPrototypeCall(handler.callback, this, arg); if (result !== undefined && result !== null) addCatch(this, result, createEvent()); } catch (err) { @@ -366,6 +434,9 @@ class EventTarget { event[kTarget] = undefined; } + [kCreateEvent](nodeValue, type) { + return new NodeCustomEvent(type, { detail: nodeValue }); + } [customInspectSymbol](depth, options) { const name = this.constructor.name; if (depth < 0) @@ -393,9 +464,6 @@ ObjectDefineProperty(EventTarget.prototype, SymbolToStringTag, { function initNodeEventTarget(self) { initEventTarget(self); - // eslint-disable-next-line no-use-before-define - self[kMaxListeners] = NodeEventTarget.defaultMaxListeners; - self[kMaxListenersWarned] = false; } class NodeEventTarget extends EventTarget { @@ -406,33 +474,12 @@ class NodeEventTarget extends EventTarget { initNodeEventTarget(this); } - [kNewListener](size, type, listener, once, capture, passive) { - if (this[kMaxListeners] > 0 && - size > this[kMaxListeners] && - !this[kMaxListenersWarned]) { - this[kMaxListenersWarned] = true; - // No error code for this since it is a Warning - // eslint-disable-next-line no-restricted-syntax - const w = new Error('Possible EventTarget memory leak detected. ' + - `${size} ${type} listeners ` + - `added to ${inspect(this, { depth: -1 })}. Use ` + - 'setMaxListeners() to increase limit'); - w.name = 'MaxListenersExceededWarning'; - w.target = this; - w.type = type; - w.count = size; - process.emitWarning(w); - } - } - setMaxListeners(n) { - validateInteger(n, 'n', 0); - this[kMaxListeners] = n; - return this; + EventEmitter.setMaxListeners(n, this); } getMaxListeners() { - return this[kMaxListeners]; + return this[kMaxEventTargetListeners]; } eventNames() { @@ -463,6 +510,14 @@ class NodeEventTarget extends EventTarget { this.addEventListener(type, listener, { [kIsNodeStyleListener]: true }); return this; } + emit(type, arg) { + if (typeof type !== 'string') { + throw new ERR_INVALID_ARG_TYPE('type', 'string', type); + } + const hadListeners = this.listenerCount(type) > 0; + this[kHybridDispatch](arg, type); + return hadListeners; + } once(type, listener) { this.addEventListener(type, listener, @@ -476,6 +531,8 @@ class NodeEventTarget extends EventTarget { } else { this[kEvents].clear(); } + + return this; } } @@ -489,6 +546,7 @@ ObjectDefineProperties(NodeEventTarget.prototype, { on: { enumerable: true }, addListener: { enumerable: true }, once: { enumerable: true }, + emit: { enumerable: true }, removeAllListeners: { enumerable: true }, }); @@ -516,6 +574,7 @@ function validateEventListenerOptions(options) { once: Boolean(options.once), capture: Boolean(options.capture), passive: Boolean(options.passive), + signal: options.signal, isNodeStyleListener: Boolean(options[kIsNodeStyleListener]) }; } @@ -532,7 +591,7 @@ function isEventTarget(obj) { function addCatch(that, promise, event) { const then = promise.then; if (typeof then === 'function') { - then.call(promise, undefined, function(err) { + FunctionPrototypeCall(then, promise, undefined, function(err) { // The callback is called with nextTick to avoid a follow-up // rejection from this promise. process.nextTick(emitUnhandledRejectionOrErr, that, err, event); @@ -544,26 +603,69 @@ function emitUnhandledRejectionOrErr(that, err, event) { process.emit('error', err, event); } +function makeEventHandler(handler) { + // Event handlers are dispatched in the order they were first set + // See https://github.com/nodejs/node/pull/35949#issuecomment-722496598 + function eventHandler(...args) { + if (typeof eventHandler.handler !== 'function') { + return; + } + return ReflectApply(eventHandler.handler, this, args); + } + eventHandler.handler = handler; + return eventHandler; +} + function defineEventHandler(emitter, name) { // 8.1.5.1 Event handlers - basically `on[eventName]` attributes - let eventHandlerValue; ObjectDefineProperty(emitter, `on${name}`, { get() { - return eventHandlerValue; + return this[kHandlers]?.get(name)?.handler; }, set(value) { - if (eventHandlerValue) { - emitter.removeEventListener(name, eventHandlerValue); + if (!this[kHandlers]) { + this[kHandlers] = new SafeMap(); } - if (typeof value === 'function') { - emitter.addEventListener(name, value); + let wrappedHandler = this[kHandlers]?.get(name); + if (wrappedHandler) { + if (typeof wrappedHandler.handler === 'function') { + this[kEvents].get(name).size--; + const size = this[kEvents].get(name).size; + this[kRemoveListener](size, name, wrappedHandler.handler, false); + } + wrappedHandler.handler = value; + if (typeof wrappedHandler.handler === 'function') { + this[kEvents].get(name).size++; + const size = this[kEvents].get(name).size; + this[kNewListener](size, name, value, false, false, false); + } + } else { + wrappedHandler = makeEventHandler(value); + this.addEventListener(name, wrappedHandler); } - eventHandlerValue = value; - } + this[kHandlers].set(name, wrappedHandler); + }, + configurable: true, + enumerable: true }); } + +const EventEmitterMixin = (Superclass) => { + class MixedEventEmitter extends Superclass { + constructor(...args) { + super(...args); + FunctionPrototypeCall(EventEmitter, this); + } + } + const protoProps = ObjectGetOwnPropertyDescriptors(EventEmitter.prototype); + delete protoProps.constructor; + ObjectDefineProperties(MixedEventEmitter.prototype, protoProps); + return MixedEventEmitter; +}; + module.exports = { Event, + EventEmitterMixin, EventTarget, NodeEventTarget, defineEventHandler, @@ -571,5 +673,8 @@ module.exports = { initNodeEventTarget, kCreateEvent, kNewListener, + kTrustEvent, kRemoveListener, + kEvents, + isEventTarget, }; diff --git a/lib/internal/freeze_intrinsics.js b/lib/internal/freeze_intrinsics.js index dc64c13409b2f1..50ae655206479a 100644 --- a/lib/internal/freeze_intrinsics.js +++ b/lib/internal/freeze_intrinsics.js @@ -20,21 +20,96 @@ // https://github.com/tc39/proposal-ses/blob/e5271cc42a257a05dcae2fd94713ed2f46c08620/shim/src/freeze.js /* global WebAssembly, SharedArrayBuffer, console */ -/* eslint-disable no-restricted-globals */ 'use strict'; +const { + Array, + ArrayBuffer, + ArrayBufferPrototype, + ArrayPrototype, + ArrayPrototypeForEach, + ArrayPrototypePush, + BigInt, + BigInt64Array, + BigInt64ArrayPrototype, + BigIntPrototype, + BigUint64Array, + BigUint64ArrayPrototype, + Boolean, + BooleanPrototype, + DataView, + DataViewPrototype, + Date, + DatePrototype, + Error, + ErrorPrototype, + EvalError, + EvalErrorPrototype, + Float32Array, + Float32ArrayPrototype, + Float64Array, + Float64ArrayPrototype, + Function, + FunctionPrototype, + Int16Array, + Int16ArrayPrototype, + Int32Array, + Int32ArrayPrototype, + Int8Array, + Int8ArrayPrototype, + Map, + MapPrototype, + Number, + NumberPrototype, + Object, + ObjectDefineProperty, + ObjectFreeze, + ObjectGetOwnPropertyDescriptor, + ObjectGetOwnPropertyDescriptors, + ObjectGetOwnPropertyNames, + ObjectGetOwnPropertySymbols, + ObjectGetPrototypeOf, + ObjectPrototype, + ObjectPrototypeHasOwnProperty, + Promise, + PromisePrototype, + RangeError, + RangeErrorPrototype, + ReferenceError, + ReferenceErrorPrototype, + ReflectOwnKeys, + RegExp, + RegExpPrototype, + SafeSet, + Set, + SetPrototype, + String, + StringPrototype, + Symbol, + SymbolIterator, + SyntaxError, + SyntaxErrorPrototype, + TypeError, + TypeErrorPrototype, + TypedArray, + TypedArrayPrototype, + Uint16Array, + Uint16ArrayPrototype, + Uint32Array, + Uint32ArrayPrototype, + Uint8Array, + Uint8ArrayPrototype, + Uint8ClampedArray, + Uint8ClampedArrayPrototype, + URIError, + URIErrorPrototype, + WeakMap, + WeakMapPrototype, + WeakSet, + WeakSetPrototype, +} = primordials; + module.exports = function() { - const { - defineProperty, - freeze, - getOwnPropertyDescriptor, - getOwnPropertyDescriptors, - getOwnPropertyNames, - getOwnPropertySymbols, - getPrototypeOf, - } = Object; - const objectHasOwnProperty = Object.prototype.hasOwnProperty; - const { ownKeys } = Reflect; const { clearImmediate, clearInterval, @@ -47,76 +122,76 @@ module.exports = function() { const intrinsicPrototypes = [ // Anonymous Intrinsics // IteratorPrototype - getPrototypeOf( - getPrototypeOf(new Array()[Symbol.iterator]()) + ObjectGetPrototypeOf( + ObjectGetPrototypeOf(new Array()[SymbolIterator]()) ), // ArrayIteratorPrototype - getPrototypeOf(new Array()[Symbol.iterator]()), + ObjectGetPrototypeOf(new Array()[SymbolIterator]()), // StringIteratorPrototype - getPrototypeOf(new String()[Symbol.iterator]()), + ObjectGetPrototypeOf(new String()[SymbolIterator]()), // MapIteratorPrototype - getPrototypeOf(new Map()[Symbol.iterator]()), + ObjectGetPrototypeOf(new Map()[SymbolIterator]()), // SetIteratorPrototype - getPrototypeOf(new Set()[Symbol.iterator]()), + ObjectGetPrototypeOf(new Set()[SymbolIterator]()), // GeneratorFunction - getPrototypeOf(function* () {}), + ObjectGetPrototypeOf(function* () {}), // AsyncFunction - getPrototypeOf(async function() {}), + ObjectGetPrototypeOf(async function() {}), // AsyncGeneratorFunction - getPrototypeOf(async function* () {}), + ObjectGetPrototypeOf(async function* () {}), // TypedArray - getPrototypeOf(Uint8Array), + TypedArrayPrototype, // 19 Fundamental Objects - Object.prototype, // 19.1 - Function.prototype, // 19.2 - Boolean.prototype, // 19.3 - - Error.prototype, // 19.5 - EvalError.prototype, - RangeError.prototype, - ReferenceError.prototype, - SyntaxError.prototype, - TypeError.prototype, - URIError.prototype, + ObjectPrototype, // 19.1 + FunctionPrototype, // 19.2 + BooleanPrototype, // 19.3 + + ErrorPrototype, // 19.5 + EvalErrorPrototype, + RangeErrorPrototype, + ReferenceErrorPrototype, + SyntaxErrorPrototype, + TypeErrorPrototype, + URIErrorPrototype, // 20 Numbers and Dates - Number.prototype, // 20.1 - Date.prototype, // 20.3 + NumberPrototype, // 20.1 + DatePrototype, // 20.3 // 21 Text Processing - String.prototype, // 21.1 - RegExp.prototype, // 21.2 + StringPrototype, // 21.1 + RegExpPrototype, // 21.2 // 22 Indexed Collections - Array.prototype, // 22.1 - - Int8Array.prototype, - Uint8Array.prototype, - Uint8ClampedArray.prototype, - Int16Array.prototype, - Uint16Array.prototype, - Int32Array.prototype, - Uint32Array.prototype, - Float32Array.prototype, - Float64Array.prototype, - BigInt64Array.prototype, - BigUint64Array.prototype, + ArrayPrototype, // 22.1 + + Int8ArrayPrototype, + Uint8ArrayPrototype, + Uint8ClampedArrayPrototype, + Int16ArrayPrototype, + Uint16ArrayPrototype, + Int32ArrayPrototype, + Uint32ArrayPrototype, + Float32ArrayPrototype, + Float64ArrayPrototype, + BigInt64ArrayPrototype, + BigUint64ArrayPrototype, // 23 Keyed Collections - Map.prototype, // 23.1 - Set.prototype, // 23.2 - WeakMap.prototype, // 23.3 - WeakSet.prototype, // 23.4 + MapPrototype, // 23.1 + SetPrototype, // 23.2 + WeakMapPrototype, // 23.3 + WeakSetPrototype, // 23.4 // 24 Structured Data - ArrayBuffer.prototype, // 24.1 - DataView.prototype, // 24.3 - Promise.prototype, // 25.4 + ArrayBufferPrototype, // 24.1 + DataViewPrototype, // 24.3 + PromisePrototype, // 25.4 // Other APIs / Web Compatibility console.Console.prototype, - BigInt.prototype, + BigIntPrototype, WebAssembly.Module.prototype, WebAssembly.Instance.prototype, WebAssembly.Table.prototype, @@ -129,33 +204,37 @@ module.exports = function() { const intrinsics = [ // Anonymous Intrinsics // ThrowTypeError - getOwnPropertyDescriptor(Function.prototype, 'caller').get, + ObjectGetOwnPropertyDescriptor(FunctionPrototype, 'caller').get, // IteratorPrototype - getPrototypeOf( - getPrototypeOf(new Array()[Symbol.iterator]()) + ObjectGetPrototypeOf( + ObjectGetPrototypeOf(new Array()[SymbolIterator]()) ), // ArrayIteratorPrototype - getPrototypeOf(new Array()[Symbol.iterator]()), + ObjectGetPrototypeOf(new Array()[SymbolIterator]()), // StringIteratorPrototype - getPrototypeOf(new String()[Symbol.iterator]()), + ObjectGetPrototypeOf(new String()[SymbolIterator]()), // MapIteratorPrototype - getPrototypeOf(new Map()[Symbol.iterator]()), + ObjectGetPrototypeOf(new Map()[SymbolIterator]()), // SetIteratorPrototype - getPrototypeOf(new Set()[Symbol.iterator]()), + ObjectGetPrototypeOf(new Set()[SymbolIterator]()), // GeneratorFunction - getPrototypeOf(function* () {}), + ObjectGetPrototypeOf(function* () {}), // AsyncFunction - getPrototypeOf(async function() {}), + ObjectGetPrototypeOf(async function() {}), // AsyncGeneratorFunction - getPrototypeOf(async function* () {}), + ObjectGetPrototypeOf(async function* () {}), // TypedArray - getPrototypeOf(Uint8Array), + TypedArray, // 18 The Global Object eval, + // eslint-disable-next-line node-core/prefer-primordials isFinite, + // eslint-disable-next-line node-core/prefer-primordials isNaN, + // eslint-disable-next-line node-core/prefer-primordials parseFloat, + // eslint-disable-next-line node-core/prefer-primordials parseInt, decodeURI, decodeURIComponent, @@ -178,6 +257,7 @@ module.exports = function() { // 20 Numbers and Dates Number, // 20.1 + // eslint-disable-next-line node-core/prefer-primordials Math, // 20.2 Date, // 20.3 @@ -209,10 +289,12 @@ module.exports = function() { // 24 Structured Data ArrayBuffer, // 24.1 DataView, // 24.3 + // eslint-disable-next-line node-core/prefer-primordials JSON, // 24.5 Promise, // 25.4 // 26 Reflection + // eslint-disable-next-line node-core/prefer-primordials Reflect, // 26.1 Proxy, // 26.2 @@ -235,19 +317,21 @@ module.exports = function() { ]; if (typeof Intl !== 'undefined') { - intrinsicPrototypes.push(Intl.Collator.prototype); - intrinsicPrototypes.push(Intl.DateTimeFormat.prototype); - intrinsicPrototypes.push(Intl.ListFormat.prototype); - intrinsicPrototypes.push(Intl.NumberFormat.prototype); - intrinsicPrototypes.push(Intl.PluralRules.prototype); - intrinsicPrototypes.push(Intl.RelativeTimeFormat.prototype); - intrinsics.push(Intl); + ArrayPrototypePush(intrinsicPrototypes, + Intl.Collator.prototype, + Intl.DateTimeFormat.prototype, + Intl.ListFormat.prototype, + Intl.NumberFormat.prototype, + Intl.PluralRules.prototype, + Intl.RelativeTimeFormat.prototype, + ); + ArrayPrototypePush(intrinsics, Intl); } - intrinsicPrototypes.forEach(enableDerivedOverrides); + ArrayPrototypeForEach(intrinsicPrototypes, enableDerivedOverrides); const frozenSet = new WeakSet(); - intrinsics.forEach(deepFreeze); + ArrayPrototypeForEach(intrinsics, deepFreeze); // Objects that are deeply frozen. function deepFreeze(root) { @@ -260,7 +344,7 @@ module.exports = function() { */ function innerDeepFreeze(node) { // Objects that we have frozen in this round. - const freezingSet = new Set(); + const freezingSet = new SafeSet(); // If val is something we should be freezing but aren't yet, // add it to freezingSet. @@ -289,16 +373,16 @@ module.exports = function() { // Object are verified before being enqueued, // therefore this is a valid candidate. // Throws if this fails (strict mode). - freeze(obj); + ObjectFreeze(obj); // We rely upon certain commitments of Object.freeze and proxies here // Get stable/immutable outbound links before a Proxy has a chance to do // something sneaky. - const proto = getPrototypeOf(obj); - const descs = getOwnPropertyDescriptors(obj); + const proto = ObjectGetPrototypeOf(obj); + const descs = ObjectGetOwnPropertyDescriptors(obj); enqueue(proto); - ownKeys(descs).forEach((name) => { + ArrayPrototypeForEach(ReflectOwnKeys(descs), (name) => { // TODO: Uncurried form // TODO: getOwnPropertyDescriptors is guaranteed to return well-formed // descriptors, but they still inherit from Object.prototype. If @@ -378,10 +462,10 @@ module.exports = function() { `Cannot assign to read only property '${prop}' of object '${obj}'` ); } - if (objectHasOwnProperty.call(this, prop)) { + if (ObjectPrototypeHasOwnProperty(this, prop)) { this[prop] = newValue; } else { - defineProperty(this, prop, { + ObjectDefineProperty(this, prop, { value: newValue, writable: true, enumerable: true, @@ -390,7 +474,7 @@ module.exports = function() { } } - defineProperty(obj, prop, { + ObjectDefineProperty(obj, prop, { get: getter, set: setter, enumerable: desc.enumerable, @@ -403,14 +487,14 @@ module.exports = function() { if (!obj) { return; } - const descs = getOwnPropertyDescriptors(obj); + const descs = ObjectGetOwnPropertyDescriptors(obj); if (!descs) { return; } - getOwnPropertyNames(obj).forEach((prop) => { + ArrayPrototypeForEach(ObjectGetOwnPropertyNames(obj), (prop) => { return enableDerivedOverride(obj, prop, descs[prop]); }); - getOwnPropertySymbols(obj).forEach((prop) => { + ArrayPrototypeForEach(ObjectGetOwnPropertySymbols(obj), (prop) => { return enableDerivedOverride(obj, prop, descs[prop]); }); } diff --git a/lib/internal/fs/dir.js b/lib/internal/fs/dir.js index b4cd72d3668e25..6eeeb84bda9d70 100644 --- a/lib/internal/fs/dir.js +++ b/lib/internal/fs/dir.js @@ -1,7 +1,12 @@ 'use strict'; const { + ArrayPrototypePush, + ArrayPrototypeSlice, + ArrayPrototypeSplice, + FunctionPrototypeBind, ObjectDefineProperty, + PromiseReject, Symbol, SymbolAsyncIterator, } = primordials; @@ -61,9 +66,10 @@ class Dir { validateUint32(this[kDirOptions].bufferSize, 'options.bufferSize', true); - this[kDirReadPromisified] = - internalUtil.promisify(this[kDirReadImpl]).bind(this, false); - this[kDirClosePromisified] = internalUtil.promisify(this.close).bind(this); + this[kDirReadPromisified] = FunctionPrototypeBind( + internalUtil.promisify(this[kDirReadImpl]), this, false); + this[kDirClosePromisified] = FunctionPrototypeBind( + internalUtil.promisify(this.close), this); } get path() { @@ -86,14 +92,15 @@ class Dir { } if (this[kDirOperationQueue] !== null) { - this[kDirOperationQueue].push(() => { + ArrayPrototypePush(this[kDirOperationQueue], () => { this[kDirReadImpl](maybeSync, callback); }); return; } if (this[kDirBufferedEntries].length > 0) { - const [ name, type ] = this[kDirBufferedEntries].splice(0, 2); + const [ name, type ] = + ArrayPrototypeSplice(this[kDirBufferedEntries], 0, 2); if (maybeSync) process.nextTick(getDirent, this[kDirPath], name, type, callback); else @@ -113,7 +120,7 @@ class Dir { return callback(err, result); } - this[kDirBufferedEntries] = result.slice(2); + this[kDirBufferedEntries] = ArrayPrototypeSlice(result, 2); getDirent(this[kDirPath], result[0], result[1], callback); }; @@ -135,7 +142,8 @@ class Dir { } if (this[kDirBufferedEntries].length > 0) { - const [ name, type ] = this[kDirBufferedEntries].splice(0, 2); + const [ name, type ] = + ArrayPrototypeSplice(this[kDirBufferedEntries], 0, 2); return getDirent(this[kDirPath], name, type); } @@ -152,21 +160,29 @@ class Dir { return result; } - this[kDirBufferedEntries] = result.slice(2); + this[kDirBufferedEntries] = ArrayPrototypeSlice(result, 2); return getDirent(this[kDirPath], result[0], result[1]); } close(callback) { - if (this[kDirClosed] === true) { - throw new ERR_DIR_CLOSED(); - } - + // Promise if (callback === undefined) { + if (this[kDirClosed] === true) { + return PromiseReject(new ERR_DIR_CLOSED()); + } return this[kDirClosePromisified](); - } else if (typeof callback !== 'function') { + } + + // callback + if (typeof callback !== 'function') { throw new ERR_INVALID_CALLBACK(callback); } + if (this[kDirClosed] === true) { + process.nextTick(callback, new ERR_DIR_CLOSED()); + return; + } + if (this[kDirOperationQueue] !== null) { this[kDirOperationQueue].push(() => { this.close(callback); diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index 497605aaefa72a..34aa897c331dc1 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -10,11 +10,14 @@ const kReadFileMaxChunkSize = 2 ** 14; const kWriteFileMaxChunkSize = 2 ** 14; const { + ArrayPrototypePush, Error, MathMax, MathMin, NumberIsSafeInteger, Promise, + PromisePrototypeFinally, + PromisePrototypeThen, PromiseResolve, Symbol, Uint8Array, @@ -29,12 +32,14 @@ const { } = internalBinding('constants').fs; const binding = internalBinding('fs'); const { Buffer } = require('buffer'); + +const { codes, hideStackFrames } = require('internal/errors'); const { ERR_FS_FILE_TOO_LARGE, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, - ERR_METHOD_NOT_IMPLEMENTED -} = require('internal/errors').codes; + ERR_METHOD_NOT_IMPLEMENTED, +} = codes; const { isArrayBufferView } = require('internal/util/types'); const { rimrafPromises } = require('internal/fs/rimraf'); const { @@ -66,6 +71,7 @@ const { } = require('internal/validators'); const pathModule = require('path'); const { promisify } = require('internal/util'); +const { EventEmitterMixin } = require('internal/event_target'); const kHandle = Symbol('kHandle'); const kFd = Symbol('kFd'); @@ -73,6 +79,8 @@ const kRefs = Symbol('kRefs'); const kClosePromise = Symbol('kClosePromise'); const kCloseResolve = Symbol('kCloseResolve'); const kCloseReject = Symbol('kCloseReject'); +const kRef = Symbol('kRef'); +const kUnref = Symbol('kUnref'); const { kUsePromises } = binding; const { @@ -82,7 +90,14 @@ const { const getDirectoryEntriesPromise = promisify(getDirents); const validateRmOptionsPromise = promisify(validateRmOptions); -class FileHandle extends JSTransferable { +let DOMException; +const lazyDOMException = hideStackFrames((message, name) => { + if (DOMException === undefined) + DOMException = internalBinding('messaging').DOMException; + return new DOMException(message, name); +}); + +class FileHandle extends EventEmitterMixin(JSTransferable) { constructor(filehandle) { super(); this[kHandle] = filehandle; @@ -168,20 +183,24 @@ class FileHandle extends JSTransferable { this[kRefs]--; if (this[kRefs] === 0) { this[kFd] = -1; - this[kClosePromise] = this[kHandle].close().finally(() => { - this[kClosePromise] = undefined; - }); + this[kClosePromise] = PromisePrototypeFinally( + this[kHandle].close(), + () => { this[kClosePromise] = undefined; } + ); } else { - this[kClosePromise] = new Promise((resolve, reject) => { - this[kCloseResolve] = resolve; - this[kCloseReject] = reject; - }).finally(() => { - this[kClosePromise] = undefined; - this[kCloseReject] = undefined; - this[kCloseResolve] = undefined; - }); + this[kClosePromise] = PromisePrototypeFinally( + new Promise((resolve, reject) => { + this[kCloseResolve] = resolve; + this[kCloseReject] = reject; + }), () => { + this[kClosePromise] = undefined; + this[kCloseReject] = undefined; + this[kCloseResolve] = undefined; + } + ); } + this.emit('close'); return this[kClosePromise]; } @@ -211,6 +230,22 @@ class FileHandle extends JSTransferable { this[kHandle] = handle; this[kFd] = handle.fd; } + + [kRef]() { + this[kRefs]++; + } + + [kUnref]() { + this[kRefs]--; + if (this[kRefs] === 0) { + this[kFd] = -1; + PromisePrototypeThen( + this[kHandle].close(), + this[kCloseResolve], + this[kCloseReject] + ); + } + } } async function fsCall(fn, handle, ...args) { @@ -227,25 +262,22 @@ async function fsCall(fn, handle, ...args) { } try { - handle[kRefs]++; + handle[kRef](); return await fn(handle, ...args); } finally { - handle[kRefs]--; - if (handle[kRefs] === 0) { - handle[kFd] = -1; - handle[kHandle] - .close() - .then(handle[kCloseResolve], handle[kCloseReject]); - } + handle[kUnref](); } } -async function writeFileHandle(filehandle, data) { +async function writeFileHandle(filehandle, data, signal) { // `data` could be any kind of typed array. data = new Uint8Array(data.buffer, data.byteOffset, data.byteLength); let remaining = data.length; if (remaining === 0) return; do { + if (signal?.aborted) { + throw lazyDOMException('The operation was aborted', 'AbortError'); + } const { bytesWritten } = await write(filehandle, data, 0, MathMin(kWriteFileMaxChunkSize, data.length)); @@ -259,8 +291,17 @@ async function writeFileHandle(filehandle, data) { } async function readFileHandle(filehandle, options) { + const signal = options?.signal; + + if (signal?.aborted) { + throw lazyDOMException('The operation was aborted', 'AbortError'); + } const statFields = await binding.fstat(filehandle.fd, false, kUsePromises); + if (signal?.aborted) { + throw lazyDOMException('The operation was aborted', 'AbortError'); + } + let size; if ((statFields[1/* mode */] & S_IFMT) === S_IFREG) { size = statFields[8/* size */]; @@ -277,12 +318,15 @@ async function readFileHandle(filehandle, options) { MathMin(size, kReadFileMaxChunkSize); let endOfFile = false; do { + if (signal?.aborted) { + throw lazyDOMException('The operation was aborted', 'AbortError'); + } const buf = Buffer.alloc(chunkSize); const { bytesRead, buffer } = await read(filehandle, buf, 0, chunkSize, -1); endOfFile = bytesRead === 0; if (bytesRead > 0) - chunks.push(buffer.slice(0, bytesRead)); + ArrayPrototypePush(chunks, buffer.slice(0, bytesRead)); } while (!endOfFile); const result = Buffer.concat(chunks); @@ -321,8 +365,19 @@ async function open(path, flags, mode) { flagsNumber, mode, kUsePromises)); } -async function read(handle, buffer, offset, length, position) { - validateBuffer(buffer); +async function read(handle, bufferOrOptions, offset, length, position) { + let buffer = bufferOrOptions; + if (!isArrayBufferView(buffer)) { + if (bufferOrOptions.buffer) { + buffer = bufferOrOptions.buffer; + validateBuffer(buffer); + } else { + buffer = Buffer.alloc(16384); + } + offset = bufferOrOptions.offset || 0; + length = buffer.length; + position = bufferOrOptions.position || null; + } if (offset == null) { offset = 0; @@ -410,7 +465,7 @@ async function rename(oldPath, newPath) { async function truncate(path, len = 0) { const fd = await open(path, 'r+'); - return ftruncate(fd, len).finally(fd.close.bind(fd)); + return PromisePrototypeFinally(ftruncate(fd, len), fd.close); } async function ftruncate(handle, len = 0) { @@ -538,7 +593,7 @@ async function lchmod(path, mode) { throw new ERR_METHOD_NOT_IMPLEMENTED('lchmod()'); const fd = await open(path, O_WRONLY | O_SYMLINK); - return fchmod(fd, mode).finally(fd.close); + return PromisePrototypeFinally(fchmod(fd, mode), fd.close); } async function lchown(path, uid, gid) { @@ -611,10 +666,13 @@ async function writeFile(path, data, options) { } if (path instanceof FileHandle) - return writeFileHandle(path, data); + return writeFileHandle(path, data, options.signal); const fd = await open(path, flag, options.mode); - return writeFileHandle(fd, data).finally(fd.close); + if (options.signal?.aborted) { + throw lazyDOMException('The operation was aborted', 'AbortError'); + } + return PromisePrototypeFinally(writeFileHandle(fd, data), fd.close); } async function appendFile(path, data, options) { @@ -632,7 +690,7 @@ async function readFile(path, options) { return readFileHandle(path, options); const fd = await open(path, flag, 0o666); - return readFileHandle(fd, options).finally(fd.close); + return PromisePrototypeFinally(readFileHandle(fd, options), fd.close); } module.exports = { @@ -666,5 +724,7 @@ module.exports = { readFile, }, - FileHandle + FileHandle, + kRef, + kUnref, }; diff --git a/lib/internal/fs/read_file_context.js b/lib/internal/fs/read_file_context.js index 5091a34231665b..61f25f75cb9af9 100644 --- a/lib/internal/fs/read_file_context.js +++ b/lib/internal/fs/read_file_context.js @@ -1,13 +1,25 @@ 'use strict'; const { + ArrayPrototypePush, MathMin, + ReflectApply, } = primordials; const { Buffer } = require('buffer'); const { FSReqCallback, close, read } = internalBinding('fs'); +const { hideStackFrames } = require('internal/errors'); + + +let DOMException; +const lazyDOMException = hideStackFrames((message, name) => { + if (DOMException === undefined) + DOMException = internalBinding('messaging').DOMException; + return new DOMException(message, name); +}); + // Use 64kb in case the file type is not a regular file and thus do not know the // actual file size. Increasing the value further results in more frequent over // allocation for small files and consumes CPU time and memory that should be @@ -32,7 +44,7 @@ function readFileAfterRead(err, bytesRead) { // Unknown size, just read until we don't get bytes. const buffer = bytesRead === kReadFileUnknownBufferLength ? context.buffer : context.buffer.slice(0, bytesRead); - context.buffers.push(buffer); + ArrayPrototypePush(context.buffers, buffer); } context.read(); } @@ -74,6 +86,7 @@ class ReadFileContext { this.pos = 0; this.encoding = encoding; this.err = null; + this.signal = undefined; } read() { @@ -81,6 +94,11 @@ class ReadFileContext { let offset; let length; + if (this.signal?.aborted) { + return this.close( + lazyDOMException('The operation was aborted', 'AbortError') + ); + } if (this.size === 0) { buffer = Buffer.allocUnsafeSlow(kReadFileUnknownBufferLength); offset = 0; @@ -102,7 +120,7 @@ class ReadFileContext { close(err) { if (this.isUserFd) { process.nextTick(function tick(context) { - readFileAfterClose.call({ context }, null); + ReflectApply(readFileAfterClose, { context }, [null]); }, this); return; } diff --git a/lib/internal/fs/rimraf.js b/lib/internal/fs/rimraf.js index e67b14a418c884..758cdcb1aa3548 100644 --- a/lib/internal/fs/rimraf.js +++ b/lib/internal/fs/rimraf.js @@ -7,8 +7,9 @@ 'use strict'; const { + ArrayPrototypeForEach, Promise, - Set, + SafeSet, } = primordials; const { Buffer } = require('buffer'); @@ -30,8 +31,8 @@ const { const { sep } = require('path'); const { setTimeout } = require('timers'); const { sleep } = require('internal/util'); -const notEmptyErrorCodes = new Set(['ENOTEMPTY', 'EEXIST', 'EPERM']); -const retryErrorCodes = new Set( +const notEmptyErrorCodes = new SafeSet(['ENOTEMPTY', 'EEXIST', 'EPERM']); +const retryErrorCodes = new SafeSet( ['EBUSY', 'EMFILE', 'ENFILE', 'ENOTEMPTY', 'EPERM']); const isWindows = process.platform === 'win32'; const epermHandler = isWindows ? fixWinEPERM : _rmdir; @@ -139,7 +140,7 @@ function _rmchildren(path, options, callback) { let done = false; - files.forEach((child) => { + ArrayPrototypeForEach(files, (child) => { const childPath = Buffer.concat([pathBuf, separator, child]); rimraf(childPath, options, (err) => { @@ -188,7 +189,7 @@ function rimrafSync(path, options) { try { // SunOS lets the root user unlink directories. - if (stats !== undefined && stats.isDirectory()) + if (stats?.isDirectory()) _rmdirSync(path, options, null); else _unlinkSync(path, options); @@ -240,7 +241,7 @@ function _rmdirSync(path, options, originalErr) { // around that issue by retrying on Windows. const pathBuf = Buffer.from(path); - readdirSync(pathBuf, readdirEncoding).forEach((child) => { + ArrayPrototypeForEach(readdirSync(pathBuf, readdirEncoding), (child) => { const childPath = Buffer.concat([pathBuf, separator, child]); rimrafSync(childPath, options); diff --git a/lib/internal/fs/streams.js b/lib/internal/fs/streams.js index 5944a3980088eb..9542516aa7c1a2 100644 --- a/lib/internal/fs/streams.js +++ b/lib/internal/fs/streams.js @@ -2,20 +2,25 @@ const { Array, + FunctionPrototypeBind, MathMin, ObjectDefineProperty, ObjectSetPrototypeOf, + PromisePrototypeThen, + ReflectApply, Symbol, } = primordials; const { ERR_INVALID_ARG_TYPE, - ERR_OUT_OF_RANGE + ERR_OUT_OF_RANGE, + ERR_METHOD_NOT_IMPLEMENTED, } = require('internal/errors').codes; const { deprecate } = require('internal/util'); const { validateInteger } = require('internal/validators'); const { errorOrDestroy } = require('internal/streams/destroy'); const fs = require('fs'); +const { kRef, kUnref, FileHandle } = require('internal/fs/promises'); const { Buffer } = require('buffer'); const { copyObject, @@ -27,6 +32,7 @@ const kIoDone = Symbol('kIoDone'); const kIsPerformingIO = Symbol('kIsPerformingIO'); const kFs = Symbol('kFs'); +const kHandle = Symbol('kHandle'); function _construct(callback) { const stream = this; @@ -42,12 +48,12 @@ function _construct(callback) { if (args[0] === 'open') { this.emit = orgEmit; callback(); - orgEmit.apply(this, args); + ReflectApply(orgEmit, this, args); } else if (args[0] === 'error') { this.emit = orgEmit; callback(args[1]); } else { - orgEmit.apply(this, args); + ReflectApply(orgEmit, this, args); } }; stream.open(); @@ -65,6 +71,35 @@ function _construct(callback) { } } +// This generates an fs operations structure for a FileHandle +const FileHandleOperations = (handle) => { + return { + open: (path, flags, mode, cb) => { + throw new ERR_METHOD_NOT_IMPLEMENTED('open()'); + }, + close: (fd, cb) => { + handle[kUnref](); + PromisePrototypeThen(handle.close(), + () => cb(), cb); + }, + read: (fd, buf, offset, length, pos, cb) => { + PromisePrototypeThen(handle.read(buf, offset, length, pos), + (r) => cb(null, r.bytesRead, r.buffer), + (err) => cb(err, 0, buf)); + }, + write: (fd, buf, offset, length, pos, cb) => { + PromisePrototypeThen(handle.write(buf, offset, length, pos), + (r) => cb(null, r.bytesWritten, r.buffer), + (err) => cb(err, 0, buf)); + }, + writev: (fd, buffers, pos, cb) => { + PromisePrototypeThen(handle.writev(buffers, pos), + (r) => cb(null, r.bytesWritten, r.buffers), + (err) => cb(err, 0, buffers)); + } + }; +}; + function close(stream, err, cb) { if (!stream.fd) { // TODO(ronag) @@ -79,6 +114,32 @@ function close(stream, err, cb) { } } +function importFd(stream, options) { + stream.fd = null; + if (options.fd) { + if (typeof options.fd === 'number') { + // When fd is a raw descriptor, we must keep our fingers crossed + // that the descriptor won't get closed, or worse, replaced with + // another one + // https://github.com/nodejs/node/issues/35862 + stream.fd = options.fd; + } else if (typeof options.fd === 'object' && + options.fd instanceof FileHandle) { + // When fd is a FileHandle we can listen for 'close' events + if (options.fs) + // FileHandle is not supported with custom fs operations + throw new ERR_METHOD_NOT_IMPLEMENTED('FileHandle with fs'); + stream[kHandle] = options.fd; + stream.fd = options.fd.fd; + stream[kFs] = FileHandleOperations(stream[kHandle]); + stream[kHandle][kRef](); + options.fd.on('close', FunctionPrototypeBind(stream.close, stream)); + } else + throw ERR_INVALID_ARG_TYPE('options.fd', + ['number', 'FileHandle'], options.fd); + } +} + function ReadStream(path, options) { if (!(this instanceof ReadStream)) return new ReadStream(path, options); @@ -114,10 +175,11 @@ function ReadStream(path, options) { // Path will be ignored when fd is specified, so it can be falsy this.path = toPathIfFileURL(path); - this.fd = options.fd === undefined ? null : options.fd; this.flags = options.flags === undefined ? 'r' : options.flags; this.mode = options.mode === undefined ? 0o666 : options.mode; + importFd(this, options); + this.start = options.start; this.end = options.end; this.pos = undefined; @@ -145,7 +207,7 @@ function ReadStream(path, options) { } } - Readable.call(this, options); + ReflectApply(Readable, this, [options]); } ObjectSetPrototypeOf(ReadStream.prototype, Readable.prototype); ObjectSetPrototypeOf(ReadStream, Readable); @@ -286,10 +348,11 @@ function WriteStream(path, options) { // Path will be ignored when fd is specified, so it can be falsy this.path = toPathIfFileURL(path); - this.fd = options.fd === undefined ? null : options.fd; this.flags = options.flags === undefined ? 'w' : options.flags; this.mode = options.mode === undefined ? 0o666 : options.mode; + importFd(this, options); + this.start = options.start; this.pos = undefined; this.bytesWritten = 0; @@ -302,7 +365,7 @@ function WriteStream(path, options) { this.pos = this.start; } - Writable.call(this, options); + ReflectApply(Writable, this, [options]); if (options.encoding) this.setDefaultEncoding(options.encoding); diff --git a/lib/internal/fs/sync_write_stream.js b/lib/internal/fs/sync_write_stream.js index 7d1209ba2decb4..df366edce4716b 100644 --- a/lib/internal/fs/sync_write_stream.js +++ b/lib/internal/fs/sync_write_stream.js @@ -2,13 +2,14 @@ const { ObjectSetPrototypeOf, + ReflectApply, } = primordials; const { Writable } = require('stream'); const { closeSync, writeSync } = require('fs'); function SyncWriteStream(fd, options) { - Writable.call(this, { autoDestroy: true }); + ReflectApply(Writable, this, [{ autoDestroy: true }]); options = options || {}; diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index dd2602a033f3c7..d5f3b4c78f16a2 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -3,15 +3,24 @@ const { ArrayIsArray, BigInt, + Date, DateNow, - Error, - ObjectPrototypeHasOwnProperty, + DatePrototypeGetTime, + ErrorCaptureStackTrace, + FunctionPrototypeCall, Number, NumberIsFinite, + NumberIsInteger, MathMin, + ObjectPrototypeHasOwnProperty, ObjectSetPrototypeOf, + ReflectApply, ReflectOwnKeys, + StringPrototypeEndsWith, + StringPrototypeIncludes, + StringPrototypeReplace, Symbol, + TypedArrayPrototypeIncludes, } = primordials; const { Buffer } = require('buffer'); @@ -35,6 +44,7 @@ const { const { once } = require('internal/util'); const { toPathIfFileURL } = require('internal/url'); const { + validateAbortSignal, validateBoolean, validateInt32, validateUint32 @@ -296,22 +306,24 @@ function getOptions(options, defaultOptions) { if (options.encoding !== 'buffer') assertEncoding(options.encoding); + + if (options.signal !== undefined) { + validateAbortSignal(options.signal, 'options.signal'); + } return options; } function handleErrorFromBinding(ctx) { if (ctx.errno !== undefined) { // libuv error numbers const err = uvException(ctx); - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(err, handleErrorFromBinding); + ErrorCaptureStackTrace(err, handleErrorFromBinding); throw err; } if (ctx.error !== undefined) { // Errors created in C++ land. // TODO(joyeecheung): currently, ctx.error are encoding errors // usually caused by memory problems. We need to figure out proper error // code(s) for this. - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(ctx.error, handleErrorFromBinding); + ErrorCaptureStackTrace(ctx.error, handleErrorFromBinding); throw ctx.error; } } @@ -324,8 +336,8 @@ const nullCheck = hideStackFrames((path, propName, throwError = true) => { // We can only perform meaningful checks on strings and Uint8Arrays. if ((!pathIsString && !pathIsUint8Array) || - (pathIsString && !path.includes('\u0000')) || - (pathIsUint8Array && !path.includes(0))) { + (pathIsString && !StringPrototypeIncludes(path, '\u0000')) || + (pathIsUint8Array && !TypedArrayPrototypeIncludes(path, 0))) { return; } @@ -357,7 +369,7 @@ function preprocessSymlinkDestination(path, type, linkPath) { return pathModule.toNamespacedPath(path); } // Windows symlinks don't tolerate forward slashes. - return path.replace(/\//g, '\\'); + return StringPrototypeReplace(path, /\//g, '\\'); } // Constructor for file stats. @@ -428,8 +440,8 @@ function dateFromMs(ms) { function BigIntStats(dev, mode, nlink, uid, gid, rdev, blksize, ino, size, blocks, atimeNs, mtimeNs, ctimeNs, birthtimeNs) { - StatsBase.call(this, dev, mode, nlink, uid, gid, rdev, blksize, - ino, size, blocks); + ReflectApply(StatsBase, this, [dev, mode, nlink, uid, gid, rdev, blksize, + ino, size, blocks]); this.atimeMs = atimeNs / kNsPerMsBigInt; this.mtimeMs = mtimeNs / kNsPerMsBigInt; @@ -459,8 +471,8 @@ BigIntStats.prototype._checkModeProperty = function(property) { function Stats(dev, mode, nlink, uid, gid, rdev, blksize, ino, size, blocks, atimeMs, mtimeMs, ctimeMs, birthtimeMs) { - StatsBase.call(this, dev, mode, nlink, uid, gid, rdev, blksize, - ino, size, blocks); + FunctionPrototypeCall(StatsBase, this, dev, mode, nlink, uid, gid, rdev, + blksize, ino, size, blocks); this.atimeMs = atimeMs; this.mtimeMs = mtimeMs; this.ctimeMs = ctimeMs; @@ -585,7 +597,7 @@ function toUnixTimestamp(time, name = 'time') { } if (isDate(time)) { // Convert to 123.456 UNIX timestamp - return time.getTime() / 1000; + return DatePrototypeGetTime(time) / 1000; } throw new ERR_INVALID_ARG_TYPE(name, ['Date', 'Time in seconds'], time); } @@ -652,7 +664,7 @@ let nonPortableTemplateWarn = true; function warnOnNonPortableTemplate(template) { // Template strings passed to the mkdtemp() family of functions should not // end with 'X' because they are handled inconsistently across platforms. - if (nonPortableTemplateWarn && template.endsWith('X')) { + if (nonPortableTemplateWarn && StringPrototypeEndsWith(template, 'X')) { process.emitWarning('mkdtemp() templates ending with X are not portable. ' + 'For details see: https://nodejs.org/api/fs.html'); nonPortableTemplateWarn = false; @@ -782,7 +794,7 @@ const getValidMode = hideStackFrames((mode, type) => { if (mode == null) { return def; } - if (Number.isInteger(mode) && mode >= min && mode <= max) { + if (NumberIsInteger(mode) && mode >= min && mode <= max) { return mode; } if (typeof mode !== 'number') { diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js index 01db66c551c9d3..6791fb12d838d9 100644 --- a/lib/internal/fs/watchers.js +++ b/lib/internal/fs/watchers.js @@ -1,6 +1,7 @@ 'use strict'; const { + FunctionPrototypeCall, ObjectDefineProperty, ObjectSetPrototypeOf, Symbol, @@ -40,7 +41,7 @@ function emitStop(self) { } function StatWatcher(bigint) { - EventEmitter.call(this); + FunctionPrototypeCall(EventEmitter, this); this._handle = null; this[kOldStatus] = -1; @@ -136,7 +137,7 @@ StatWatcher.prototype[kFSStatWatcherAddOrCleanRef] = function(operate) { // Clean up all this[KFSStatWatcherMaxRefCount] = 0; this[KFSStatWatcherRefCount] = 0; - this._handle && this._handle.unref(); + this._handle?.unref(); } }; @@ -159,7 +160,7 @@ StatWatcher.prototype.unref = function() { function FSWatcher() { - EventEmitter.call(this); + FunctionPrototypeCall(EventEmitter, this); this._handle = new FSEvent(); this._handle[owner_symbol] = this; diff --git a/lib/internal/histogram.js b/lib/internal/histogram.js index 6deb8314a41bbb..00149db50236da 100644 --- a/lib/internal/histogram.js +++ b/lib/internal/histogram.js @@ -5,7 +5,7 @@ const { } = require('internal/util'); const { format } = require('util'); -const { Map, Symbol } = primordials; +const { SafeMap, Symbol } = primordials; const { ERR_INVALID_ARG_TYPE, @@ -19,11 +19,10 @@ const kHandle = Symbol('kHandle'); // record various metrics. This Histogram class provides a // generally read-only view of the internal histogram. class Histogram { - #handle = undefined; - #map = new Map(); + #map = new SafeMap(); constructor(internal) { - this.#handle = internal; + this[kHandle] = internal; } [kInspect]() { @@ -39,23 +38,23 @@ class Histogram { } get min() { - return this.#handle ? this.#handle.min() : undefined; + return this[kHandle]?.min(); } get max() { - return this.#handle ? this.#handle.max() : undefined; + return this[kHandle]?.max(); } get mean() { - return this.#handle ? this.#handle.mean() : undefined; + return this[kHandle]?.mean(); } get exceeds() { - return this.#handle ? this.#handle.exceeds() : undefined; + return this[kHandle]?.exceeds(); } get stddev() { - return this.#handle ? this.#handle.stddev() : undefined; + return this[kHandle]?.stddev(); } percentile(percentile) { @@ -65,26 +64,22 @@ class Histogram { if (percentile <= 0 || percentile > 100) throw new ERR_INVALID_ARG_VALUE.RangeError('percentile', percentile); - return this.#handle ? this.#handle.percentile(percentile) : undefined; + return this[kHandle]?.percentile(percentile); } get percentiles() { this.#map.clear(); - if (this.#handle) - this.#handle.percentiles(this.#map); + this[kHandle]?.percentiles(this.#map); return this.#map; } reset() { - if (this.#handle) - this.#handle.reset(); + this[kHandle]?.reset(); } [kDestroy]() { - this.#handle = undefined; + this[kHandle] = undefined; } - - get [kHandle]() { return this.#handle; } } module.exports = { diff --git a/lib/internal/http.js b/lib/internal/http.js index aab4170a2f0e06..e2f083be6ebc06 100644 --- a/lib/internal/http.js +++ b/lib/internal/http.js @@ -2,19 +2,14 @@ const { Symbol, + Date, } = primordials; const { setUnrefTimeout } = require('internal/timers'); const { PerformanceEntry, notify } = internalBinding('performance'); -let nowCache; let utcCache; -function nowDate() { - if (!nowCache) cache(); - return nowCache; -} - function utcDate() { if (!utcCache) cache(); return utcCache; @@ -22,13 +17,11 @@ function utcDate() { function cache() { const d = new Date(); - nowCache = d.valueOf(); utcCache = d.toUTCString(); setUnrefTimeout(resetCache, 1000 - d.getMilliseconds()); } function resetCache() { - nowCache = undefined; utcCache = undefined; } @@ -51,7 +44,6 @@ function emitStatistics(statistics) { module.exports = { kOutHeaders: Symbol('kOutHeaders'), kNeedDrain: Symbol('kNeedDrain'), - nowDate, utcDate, emitStatistics }; diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js index ec86be1ceaab45..a0251ffbafecd2 100644 --- a/lib/internal/http2/compat.js +++ b/lib/internal/http2/compat.js @@ -2,12 +2,17 @@ const { ArrayIsArray, + ArrayPrototypePush, Boolean, + FunctionPrototypeBind, ObjectAssign, ObjectCreate, ObjectKeys, ObjectPrototypeHasOwnProperty, + ReflectApply, ReflectGetPrototypeOf, + StringPrototypeToLowerCase, + StringPrototypeTrim, Symbol, } = primordials; @@ -138,7 +143,7 @@ function onStreamTrailers(trailers, flags, rawTrailers) { const request = this[kRequest]; if (request !== undefined) { ObjectAssign(request[kTrailers], trailers); - request[kRawTrailers].push(...rawTrailers); + ArrayPrototypePush(request[kRawTrailers], ...rawTrailers); } } @@ -188,6 +193,11 @@ function resumeStream(stream) { } const proxySocketHandler = { + has(stream, prop) { + const ref = stream.session !== undefined ? stream.session[kSocket] : stream; + return (prop in stream) || (prop in ref); + }, + get(stream, prop) { switch (prop) { case 'on': @@ -195,7 +205,7 @@ const proxySocketHandler = { case 'end': case 'emit': case 'destroy': - return stream[prop].bind(stream); + return FunctionPrototypeBind(stream[prop], stream); case 'writable': case 'destroyed': return stream[prop]; @@ -207,8 +217,8 @@ const proxySocketHandler = { case 'setTimeout': const session = stream.session; if (session !== undefined) - return session.setTimeout.bind(session); - return stream.setTimeout.bind(stream); + return FunctionPrototypeBind(session.setTimeout, session); + return FunctionPrototypeBind(stream.setTimeout, stream); case 'write': case 'read': case 'pause': @@ -218,7 +228,9 @@ const proxySocketHandler = { const ref = stream.session !== undefined ? stream.session[kSocket] : stream; const value = ref[prop]; - return typeof value === 'function' ? value.bind(ref) : value; + return typeof value === 'function' ? + FunctionPrototypeBind(value, ref) : + value; } }, getPrototypeOf(stream) { @@ -389,7 +401,7 @@ class Http2ServerRequest extends Readable { set method(method) { validateString(method, 'method'); - if (method.trim() === '') + if (StringPrototypeTrim(method) === '') throw new ERR_INVALID_ARG_VALUE('method', method); this[kHeaders][HTTP2_HEADER_METHOD] = method; @@ -549,7 +561,7 @@ class Http2ServerResponse extends Stream { setTrailer(name, value) { validateString(name, 'name'); - name = name.trim().toLowerCase(); + name = StringPrototypeToLowerCase(StringPrototypeTrim(name)); assertValidHeader(name, value); this[kTrailers][name] = value; } @@ -565,7 +577,7 @@ class Http2ServerResponse extends Stream { getHeader(name) { validateString(name, 'name'); - name = name.trim().toLowerCase(); + name = StringPrototypeToLowerCase(StringPrototypeTrim(name)); return this[kHeaders][name]; } @@ -580,7 +592,7 @@ class Http2ServerResponse extends Stream { hasHeader(name) { validateString(name, 'name'); - name = name.trim().toLowerCase(); + name = StringPrototypeToLowerCase(StringPrototypeTrim(name)); return ObjectPrototypeHasOwnProperty(this[kHeaders], name); } @@ -589,7 +601,7 @@ class Http2ServerResponse extends Stream { if (this[kStream].headersSent) throw new ERR_HTTP2_HEADERS_SENT(); - name = name.trim().toLowerCase(); + name = StringPrototypeToLowerCase(StringPrototypeTrim(name)); if (name === 'date') { this[kState].sendDate = false; @@ -609,7 +621,7 @@ class Http2ServerResponse extends Stream { } [kSetHeader](name, value) { - name = name.trim().toLowerCase(); + name = StringPrototypeToLowerCase(StringPrototypeTrim(name)); assertValidHeader(name, value); if (!isConnectionHeaderAllowed(name, value)) { @@ -750,7 +762,7 @@ class Http2ServerResponse extends Stream { this.writeHead(this[kState].statusCode); if (this[kState].closed || stream.destroyed) - onStreamCloseResponse.call(stream); + ReflectApply(onStreamCloseResponse, stream, []); else stream.end(); diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index ab961c059187af..4fbee39c99ddf2 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -5,7 +5,10 @@ const { ArrayFrom, ArrayIsArray, - Map, + ArrayPrototypeForEach, + ArrayPrototypePush, + FunctionPrototypeBind, + FunctionPrototypeCall, MathMin, ObjectAssign, ObjectCreate, @@ -13,9 +16,15 @@ const { ObjectDefineProperty, ObjectPrototypeHasOwnProperty, Promise, + PromisePrototypeCatch, + ReflectApply, ReflectGetPrototypeOf, - Set, + RegExpPrototypeTest, + SafeMap, + SafeSet, + StringPrototypeSlice, Symbol, + TypedArrayPrototypeSet, Uint32Array, Uint8Array, } = primordials; @@ -32,10 +41,11 @@ const assert = require('assert'); const EventEmitter = require('events'); const fs = require('fs'); const http = require('http'); +const { readUInt16BE, readUInt32BE } = require('internal/buffer'); +const { URL } = require('internal/url'); const net = require('net'); const { Duplex } = require('stream'); const tls = require('tls'); -const { URL } = require('url'); const { setImmediate } = require('timers'); const { @@ -70,6 +80,7 @@ const { ERR_HTTP2_INVALID_STREAM, ERR_HTTP2_MAX_PENDING_SETTINGS_ACK, ERR_HTTP2_NESTED_PUSH, + ERR_HTTP2_NO_MEM, ERR_HTTP2_NO_SOCKET_MANIPULATION, ERR_HTTP2_ORIGIN_LENGTH, ERR_HTTP2_OUT_OF_STREAMS, @@ -99,13 +110,17 @@ const { ERR_OUT_OF_RANGE, ERR_SOCKET_CLOSED }, - hideStackFrames + hideStackFrames, + AbortError } = require('internal/errors'); -const { validateInteger, - validateNumber, - validateString, - validateUint32, - isUint32, +const { + isUint32, + validateInt32, + validateInteger, + validateNumber, + validateString, + validateUint32, + validateAbortSignal, } = require('internal/validators'); const fsPromisesInternal = require('internal/fs/promises'); const { utcDate } = require('internal/http'); @@ -176,7 +191,9 @@ function debugStream(id, sessionType, message, ...args) { } function debugStreamObj(stream, message, ...args) { - debugStream(stream[kID], stream[kSession][kType], message, ...args); + const session = stream[kSession]; + const type = session ? session[kType] : undefined; + debugStream(stream[kID], type, message, ...args); } function debugSession(sessionType, message, ...args) { @@ -250,6 +267,7 @@ const { NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE, NGHTTP2_ERR_INVALID_ARGUMENT, NGHTTP2_ERR_STREAM_CLOSED, + NGHTTP2_ERR_NOMEM, HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_DATE, @@ -385,7 +403,7 @@ function onSessionHeaders(handle, id, cat, flags, headers, sensitiveHeaders) { function tryClose(fd) { // Try to close the file descriptor. If closing fails, assert because // an error really should not happen at this point. - fs.close(fd, (err) => assert.ifError(err)); + fs.close(fd, assert.ifError); } // Called when the Http2Stream has finished sending data and is ready for @@ -593,7 +611,7 @@ function initOriginSet(session) { let originSet = session[kState].originSet; if (originSet === undefined) { const socket = session[kSocket]; - session[kState].originSet = originSet = new Set(); + session[kState].originSet = originSet = new SafeSet(); if (socket.servername != null) { let originString = `https://${socket.servername}`; if (socket.remotePort != null) @@ -781,7 +799,8 @@ function submitSettings(settings, callback) { debugSessionObj(this, 'submitting settings'); this[kUpdateTimer](); updateSettingsBuffer(settings); - if (!this[kHandle].settings(settingsCallback.bind(this, callback))) { + if (!this[kHandle].settings(FunctionPrototypeBind(settingsCallback, + this, callback))) { this.destroy(new ERR_HTTP2_MAX_PENDING_SETTINGS_ACK()); } } @@ -823,7 +842,7 @@ const proxySocketHandler = { case 'setTimeout': case 'ref': case 'unref': - return session[prop].bind(session); + return FunctionPrototypeBind(session[prop], session); case 'destroy': case 'emit': case 'end': @@ -840,7 +859,9 @@ const proxySocketHandler = { if (socket === undefined) throw new ERR_HTTP2_SOCKET_UNBOUND(); const value = socket[prop]; - return typeof value === 'function' ? value.bind(socket) : value; + return typeof value === 'function' ? + FunctionPrototypeBind(value, socket) : + value; } }, getPrototypeOf(session) { @@ -965,7 +986,7 @@ function setupHandle(socket, type, options) { this[kHandle] = handle; if (this[kNativeFields]) - handle.fields.set(this[kNativeFields]); + TypedArrayPrototypeSet(handle.fields, this[kNativeFields]); else this[kNativeFields] = handle.fields; @@ -1037,7 +1058,7 @@ function finishSessionClose(session, error) { if (socket && !socket.destroyed) { // Always wait for writable side to finish. socket.end((err) => { - debugSessionObj(session, 'finishSessionClose socket end', err); + debugSessionObj(session, 'finishSessionClose socket end', err, error); // Due to the way the underlying stream is handled in Http2Session we // won't get graceful Readable end from the other side even if it was sent // as the stream is already considered closed and will neither be read @@ -1055,7 +1076,7 @@ function finishSessionClose(session, error) { } function closeSession(session, code, error) { - debugSessionObj(session, 'start closing/destroying'); + debugSessionObj(session, 'start closing/destroying', error); const state = session[kState]; state.flags |= SESSION_FLAGS_DESTROYED; @@ -1078,7 +1099,8 @@ function closeSession(session, code, error) { // Destroy the handle if it exists at this point. if (handle !== undefined) { - handle.ondone = finishSessionClose.bind(null, session, error); + handle.ondone = FunctionPrototypeBind(finishSessionClose, + null, session, error); handle.destroy(code, socket.destroyed); } else { finishSessionClose(session, error); @@ -1127,6 +1149,8 @@ class Http2Session extends EventEmitter { if (!socket._handle || !socket._handle.isStreamBase) { socket = new JSStreamSocket(socket); } + socket.on('error', socketOnError); + socket.on('close', socketOnClose); // No validation is performed on the input parameters because this // constructor is not exported directly for users. @@ -1144,8 +1168,8 @@ class Http2Session extends EventEmitter { flags: SESSION_FLAGS_PENDING, goawayCode: null, goawayLastStreamID: null, - streams: new Map(), - pendingStreams: new Set(), + streams: new SafeMap(), + pendingStreams: new SafeSet(), pendingAck: 0, shutdownWritableCalled: false, writeQueueSize: 0, @@ -1168,7 +1192,8 @@ class Http2Session extends EventEmitter { if (typeof socket.disableRenegotiation === 'function') socket.disableRenegotiation(); - const setupFn = setupHandle.bind(this, socket, type, options); + const setupFn = FunctionPrototypeBind(setupHandle, this, + socket, type, options); if (socket.connecting || socket.secureConnecting) { const connectEvent = socket instanceof tls.TLSSocket ? 'secureConnect' : 'connect'; @@ -1250,6 +1275,21 @@ class Http2Session extends EventEmitter { this[kHandle].setNextStreamID(id); } + // Sets the local window size (local endpoints's window size) + // Returns 0 if sucess or throw an exception if NGHTTP2_ERR_NOMEM + // if the window allocation fails + setLocalWindowSize(windowSize) { + if (this.destroyed) + throw new ERR_HTTP2_INVALID_SESSION(); + + validateInt32(windowSize, 'windowSize', 0); + const ret = this[kHandle].setLocalWindowSize(windowSize); + + if (ret === NGHTTP2_ERR_NOMEM) { + this.destroy(new ERR_HTTP2_NO_MEM()); + } + } + // If ping is called while we are still connecting, or after close() has // been called, the ping callback will be invoked immediately will a ping // cancelled error and a duration of 0.0. @@ -1373,7 +1413,8 @@ class Http2Session extends EventEmitter { this[kState].pendingAck++; - const settingsFn = submitSettings.bind(this, { ...settings }, callback); + const settingsFn = FunctionPrototypeBind(submitSettings, this, + { ...settings }, callback); if (this.connecting) { this.once('connect', settingsFn); return; @@ -1397,7 +1438,9 @@ class Http2Session extends EventEmitter { validateNumber(code, 'code'); validateNumber(lastStreamID, 'lastStreamID'); - const goawayFn = submitGoaway.bind(this, code, lastStreamID, opaqueData); + const goawayFn = FunctionPrototypeBind(submitGoaway, + this, + code, lastStreamID, opaqueData); if (this.connecting) { this.once('connect', goawayFn); return; @@ -1552,7 +1595,7 @@ class ServerHttp2Session extends Http2Session { } validateString(alt, 'alt'); - if (!kQuotedString.test(alt)) + if (!RegExpPrototypeTest(kQuotedString, alt)) throw new ERR_INVALID_CHAR('alt'); // Max length permitted for ALTSVC @@ -1643,7 +1686,8 @@ class ClientHttp2Session extends Http2Session { if (getAuthority(headers) === undefined) headers[HTTP2_HEADER_AUTHORITY] = this[kAuthority]; if (headers[HTTP2_HEADER_SCHEME] === undefined) - headers[HTTP2_HEADER_SCHEME] = this[kProtocol].slice(0, -1); + headers[HTTP2_HEADER_SCHEME] = StringPrototypeSlice(this[kProtocol], + 0, -1); if (headers[HTTP2_HEADER_PATH] === undefined) headers[HTTP2_HEADER_PATH] = '/'; } else { @@ -1680,14 +1724,29 @@ class ClientHttp2Session extends Http2Session { if (options.waitForTrailers) stream[kState].flags |= STREAM_FLAGS_HAS_TRAILERS; - const onConnect = requestOnConnect.bind(stream, headersList, options); + const { signal } = options; + if (signal) { + validateAbortSignal(signal, 'options.signal'); + const aborter = () => stream.destroy(new AbortError()); + if (signal.aborted) { + aborter(); + } else { + signal.addEventListener('abort', aborter); + stream.once('close', () => { + signal.removeEventListener('abort', aborter); + }); + } + } + + const onConnect = FunctionPrototypeBind(requestOnConnect, + stream, headersList, options); if (this.connecting) { if (this[kPendingRequestCalls] !== null) { - this[kPendingRequestCalls].push(onConnect); + ArrayPrototypePush(this[kPendingRequestCalls], onConnect); } else { this[kPendingRequestCalls] = [onConnect]; this.once('connect', () => { - this[kPendingRequestCalls].forEach((f) => f()); + ArrayPrototypeForEach(this[kPendingRequestCalls], (f) => f()); this[kPendingRequestCalls] = null; }); } @@ -1742,7 +1801,7 @@ function shutdownWritable(callback) { req.handle = handle; const err = handle.shutdown(req); if (err === 1) // synchronous finish - return afterShutdown.call(req, 0); + return ReflectApply(afterShutdown, req, [0]); } function finishSendTrailers(stream, headersList) { @@ -1791,7 +1850,7 @@ function closeStream(stream, code, rstStreamStatus = kSubmitRstStream) { } if (rstStreamStatus !== kNoRstStream) { - const finishFn = finishCloseStream.bind(stream, code); + const finishFn = FunctionPrototypeBind(finishCloseStream, stream, code); if (!ending || stream.writableFinished || code !== NGHTTP2_NO_ERROR || rstStreamStatus === kForceRstStream) finishFn(); @@ -1801,7 +1860,7 @@ function closeStream(stream, code, rstStreamStatus = kSubmitRstStream) { } function finishCloseStream(code) { - const rstStreamFn = submitRstStream.bind(this, code); + const rstStreamFn = FunctionPrototypeBind(submitRstStream, this, code); // If the handle has not yet been assigned, queue up the request to // ensure that the RST_STREAM frame is sent after the stream ID has // been determined. @@ -1985,7 +2044,8 @@ class Http2Stream extends Duplex { if (this.pending) { this.once( 'ready', - this[kWriteGeneric].bind(this, writev, data, encoding, cb) + FunctionPrototypeBind(this[kWriteGeneric], + this, writev, data, encoding, cb) ); return; } @@ -2064,7 +2124,7 @@ class Http2Stream extends Duplex { return; } debugStreamObj(this, 'shutting down writable on _final'); - shutdownWritable.call(this, cb); + ReflectApply(shutdownWritable, this, [cb]); } _read(nread) { @@ -2077,7 +2137,7 @@ class Http2Stream extends Duplex { this[kState].didRead = true; } if (!this.pending) { - streamOnResume.call(this); + FunctionPrototypeCall(streamOnResume, this); } else { this.once('ready', streamOnResume); } @@ -2091,7 +2151,7 @@ class Http2Stream extends Duplex { options = { ...options }; setAndValidatePriorityOptions(options); - const priorityFn = submitPriority.bind(this, options); + const priorityFn = FunctionPrototypeBind(submitPriority, this, options); // If the handle has not yet been assigned, queue up the priority // frame to be sent as soon as the ready event is emitted. @@ -2321,7 +2381,8 @@ function processHeaders(oldHeaders, options) { function onFileUnpipe() { const stream = this.sink[kOwner]; if (stream.ownsFd) - this.source.close().catch(stream.destroy.bind(stream)); + PromisePrototypeCatch(this.source.close(), + FunctionPrototypeBind(stream.destroy, stream)); else this.source.releaseFD(); } @@ -2406,7 +2467,8 @@ function doSendFD(session, options, fd, headers, streamOptions, err, stat) { // response is canceled. The user code may also send a separate type // of response so check again for the HEADERS_SENT flag if ((typeof options.statCheck === 'function' && - options.statCheck.call(this, stat, headers, statOptions) === false) || + ReflectApply(options.statCheck, this, + [stat, headers, statOptions]) === false) || (this[kState].flags & STREAM_FLAGS_HEADERS_SENT)) { return; } @@ -2465,7 +2527,7 @@ function doSendFileFD(session, options, fd, headers, streamOptions, err, stat) { // response is canceled. The user code may also send a separate type // of response so check again for the HEADERS_SENT flag if ((typeof options.statCheck === 'function' && - options.statCheck.call(this, stat, headers) === false) || + ReflectApply(options.statCheck, this, [stat, headers]) === false) || (this[kState].flags & STREAM_FLAGS_HEADERS_SENT)) { tryClose(fd); return; @@ -2503,8 +2565,9 @@ function afterOpen(session, options, headers, streamOptions, err, fd) { state.fd = fd; fs.fstat(fd, - doSendFileFD.bind(this, session, options, fd, - headers, streamOptions)); + FunctionPrototypeBind(doSendFileFD, this, + session, options, fd, + headers, streamOptions)); } class ServerHttp2Stream extends Http2Stream { @@ -2707,8 +2770,9 @@ class ServerHttp2Stream extends Http2Stream { if (options.statCheck !== undefined) { fs.fstat(fd, - doSendFD.bind(this, session, options, fd, - headers, streamOptions)); + FunctionPrototypeBind(doSendFD, this, + session, options, fd, + headers, streamOptions)); return; } @@ -2767,7 +2831,8 @@ class ServerHttp2Stream extends Http2Stream { } fs.open(path, 'r', - afterOpen.bind(this, session, options, headers, streamOptions)); + FunctionPrototypeBind(afterOpen, this, + session, options, headers, streamOptions)); } // Sends a block of informational headers. In theory, the HTTP/2 spec @@ -2803,7 +2868,7 @@ class ServerHttp2Stream extends Http2Stream { if (!this[kInfoHeaders]) this[kInfoHeaders] = [headers]; else - this[kInfoHeaders].push(headers); + ArrayPrototypePush(this[kInfoHeaders], headers); const ret = this[kHandle].info(headersList); if (ret < 0) @@ -2889,7 +2954,7 @@ function connectionListener(socket) { if (options.allowHTTP1 === true) { socket.server[kIncomingMessage] = options.Http1IncomingMessage; socket.server[kServerResponse] = options.Http1ServerResponse; - return httpConnectionListener.call(this, socket); + return FunctionPrototypeCall(httpConnectionListener, this, socket); } // Let event handler deal with the socket debug('Unknown protocol from %s:%s', @@ -2907,9 +2972,6 @@ function connectionListener(socket) { return; } - socket.on('error', socketOnError); - socket.on('close', socketOnClose); - // Set up the Session const session = new ServerHttp2Session(options, socket, this); @@ -2960,7 +3022,7 @@ function initializeTLSOptions(options, servername) { options = initializeOptions(options); options.ALPNProtocols = ['h2']; if (options.allowHTTP1 === true) - options.ALPNProtocols.push('http/1.1'); + ArrayPrototypePush(options.ALPNProtocols, 'http/1.1'); if (servername !== undefined && options.servername === undefined) options.servername = servername; return options; @@ -2992,6 +3054,12 @@ class Http2SecureServer extends TLSServer { } return this; } + + updateSettings(settings) { + assertIsObject(settings, 'settings'); + validateSettings(settings); + this[kOptions].settings = { ...this[kOptions].settings, ...settings }; + } } class Http2Server extends NETServer { @@ -3014,6 +3082,12 @@ class Http2Server extends NETServer { } return this; } + + updateSettings(settings) { + assertIsObject(settings, 'settings'); + validateSettings(settings); + this[kOptions].settings = { ...this[kOptions].settings, ...settings }; + } } Http2Server.prototype[EventEmitter.captureRejectionSymbol] = function( @@ -3045,18 +3119,18 @@ Http2Server.prototype[EventEmitter.captureRejectionSymbol] = function( } break; default: - net.Server.prototype[EventEmitter.captureRejectionSymbol] - .call(this, err, event, ...args); + ReflectApply(net.Server.prototype[EventEmitter.captureRejectionSymbol], + this, [err, event, ...args]); } }; function setupCompat(ev) { if (ev === 'request') { this.removeListener('newListener', setupCompat); - this.on('stream', onServerStream.bind( - this, - this[kOptions].Http2ServerRequest, - this[kOptions].Http2ServerResponse) + this.on('stream', FunctionPrototypeBind(onServerStream, + this, + this[kOptions].Http2ServerRequest, + this[kOptions].Http2ServerResponse) ); } } @@ -3097,7 +3171,7 @@ function connect(authority, options, listener) { host = authority.hostname; if (host[0] === '[') - host = host.slice(1, -1); + host = StringPrototypeSlice(host, 1, -1); } else if (authority.host) { host = authority.host; } @@ -3118,9 +3192,6 @@ function connect(authority, options, listener) { } } - socket.on('error', socketOnError); - socket.on('close', socketOnClose); - const session = new ClientHttp2Session(options, socket); session[kAuthority] = `${options.servername || host}:${port}`; @@ -3128,6 +3199,22 @@ function connect(authority, options, listener) { if (typeof listener === 'function') session.once('connect', listener); + + // Process data on the next tick - a remoteSettings handler may be attached. + // https://github.com/nodejs/node/issues/35981 + process.nextTick(() => { + debug('Http2Session connect', options.createConnection); + // Socket already has some buffered data - emulate receiving it + // https://github.com/nodejs/node/issues/35475 + if (socket && socket.readableLength) { + let buf; + while ((buf = socket.read()) !== null) { + debug(`Http2Session connect: ${buf.length} bytes already in buffer`); + session[kHandle].receive(buf); + } + } + }); + return session; } @@ -3163,18 +3250,18 @@ function getPackedSettings(settings) { } function getUnpackedSettings(buf, options = {}) { - if (!isArrayBufferView(buf)) { + if (!isArrayBufferView(buf) || buf.length === undefined) { throw new ERR_INVALID_ARG_TYPE('buf', - ['Buffer', 'TypedArray', 'DataView'], buf); + ['Buffer', 'TypedArray'], buf); } if (buf.length % 6 !== 0) throw new ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH(); const settings = {}; let offset = 0; while (offset < buf.length) { - const id = buf.readUInt16BE(offset); + const id = ReflectApply(readUInt16BE, buf, [offset]); offset += 2; - const value = buf.readUInt32BE(offset); + const value = ReflectApply(readUInt32BE, buf, [offset]); switch (id) { case NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: settings.headerTableSize = value; diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js index b3fdf420c8c2b5..dadfb68e8b5289 100644 --- a/lib/internal/http2/util.js +++ b/lib/internal/http2/util.js @@ -2,14 +2,18 @@ const { ArrayIsArray, + ArrayPrototypeIncludes, + ArrayPrototypeMap, + ArrayPrototypePush, Error, MathMax, Number, ObjectCreate, ObjectKeys, - Set, + SafeSet, String, StringFromCharCode, + StringPrototypeIncludes, StringPrototypeToLowerCase, Symbol, } = primordials; @@ -98,7 +102,7 @@ const { // This set is defined strictly by the HTTP/2 specification. Only // :-prefixed headers defined by that specification may be added to // this set. -const kValidPseudoHeaders = new Set([ +const kValidPseudoHeaders = new SafeSet([ HTTP2_HEADER_STATUS, HTTP2_HEADER_METHOD, HTTP2_HEADER_AUTHORITY, @@ -109,7 +113,7 @@ const kValidPseudoHeaders = new Set([ // This set contains headers that are permitted to have only a single // value. Multiple instances must not be specified. -const kSingleValueHeaders = new Set([ +const kSingleValueHeaders = new SafeSet([ HTTP2_HEADER_STATUS, HTTP2_HEADER_METHOD, HTTP2_HEADER_AUTHORITY, @@ -156,7 +160,7 @@ const kSingleValueHeaders = new Set([ // meaning to the request payload. By default, unless the user explicitly // overrides the endStream option on the request method, the endStream // option will be defaulted to true when these methods are used. -const kNoPayloadMethods = new Set([ +const kNoPayloadMethods = new SafeSet([ HTTP2_METHOD_DELETE, HTTP2_METHOD_GET, HTTP2_METHOD_HEAD @@ -468,7 +472,7 @@ function mapToHeaders(map, let ret = ''; let count = 0; const keys = ObjectKeys(map); - const singles = new Set(); + const singles = new SafeSet(); let i, j; let isArray; let key; @@ -476,13 +480,14 @@ function mapToHeaders(map, let isSingleValueHeader; let err; const neverIndex = - (map[kSensitiveHeaders] || emptyArray).map(StringPrototypeToLowerCase); + ArrayPrototypeMap(map[kSensitiveHeaders] || emptyArray, + StringPrototypeToLowerCase); for (i = 0; i < keys.length; ++i) { key = keys[i]; value = map[key]; if (value === undefined || key === '') continue; - key = key.toLowerCase(); + key = StringPrototypeToLowerCase(key); isSingleValueHeader = kSingleValueHeaders.has(key); isArray = ArrayIsArray(value); if (isArray) { @@ -505,7 +510,9 @@ function mapToHeaders(map, throw new ERR_HTTP2_HEADER_SINGLE_VALUE(key); singles.add(key); } - const flags = neverIndex.includes(key) ? kNeverIndexFlag : kNoHeaderFlags; + const flags = ArrayPrototypeIncludes(neverIndex, key) ? + kNeverIndexFlag : + kNoHeaderFlags; if (key[0] === ':') { err = assertValuePseudoHeader(key); if (err !== undefined) @@ -514,7 +521,7 @@ function mapToHeaders(map, count++; continue; } - if (key.indexOf(' ') >= 0) { + if (StringPrototypeIncludes(key, ' ')) { throw new ERR_INVALID_HTTP_TOKEN('Header name', key); } if (isIllegalConnectionSpecificHeader(key, value)) { @@ -595,7 +602,7 @@ function toHeaderObject(headers, sensitiveHeaders) { // fields with the same name. Since it cannot be combined into a // single field-value, recipients ought to handle "Set-Cookie" as a // special case while processing header fields." - existing.push(value); + ArrayPrototypePush(existing, value); break; default: // https://tools.ietf.org/html/rfc7230#section-3.2.2 diff --git a/lib/internal/inspector_async_hook.js b/lib/internal/inspector_async_hook.js index a6112697cfdaa2..bd3aa635051c5b 100644 --- a/lib/internal/inspector_async_hook.js +++ b/lib/internal/inspector_async_hook.js @@ -4,7 +4,7 @@ let hook; let config; const { - Set, + SafeSet, } = primordials; function lazyHookCreation() { @@ -44,7 +44,7 @@ function lazyHookCreation() { }, }); - hook.promiseIds = new Set(); + hook.promiseIds = new SafeSet(); } function enable() { diff --git a/lib/internal/main/print_help.js b/lib/internal/main/print_help.js index 34a8e19f08ec31..94c81c484880b3 100644 --- a/lib/internal/main/print_help.js +++ b/lib/internal/main/print_help.js @@ -1,6 +1,18 @@ 'use strict'; -/* eslint-disable no-restricted-globals */ +const { + ArrayPrototypeConcat, + ArrayPrototypeSort, + Boolean, + MathFloor, + MathMax, + ObjectKeys, + RegExp, + StringPrototypeTrimLeft, + StringPrototypeRepeat, + StringPrototypeReplace, + SafeMap, +} = primordials; const { types } = internalBinding('options'); const hasCrypto = Boolean(process.versions.openssl); @@ -10,13 +22,13 @@ const { } = require('internal/bootstrap/pre_execution'); const typeLookup = []; -for (const key of Object.keys(types)) +for (const key of ObjectKeys(types)) typeLookup[types[key]] = key; // Environment variables are parsed ad-hoc throughout the code base, // so we gather the documentation here. const { hasIntl, hasSmallICU, hasNodeOptions } = internalBinding('config'); -const envVars = new Map([ +const envVars = new SafeMap(ArrayPrototypeConcat([ ['NODE_DEBUG', { helpText: "','-separated list of core modules that " + 'should print debug information' }], ['NODE_DEBUG_NATIVE', { helpText: "','-separated list of C++ core debug " + @@ -44,28 +56,30 @@ const envVars = new Map([ 'to' }], ['UV_THREADPOOL_SIZE', { helpText: 'sets the number of threads used in ' + 'libuv\'s threadpool' }] -].concat(hasIntl ? [ +], hasIntl ? [ ['NODE_ICU_DATA', { helpText: 'data path for ICU (Intl object) data' + hasSmallICU ? '' : ' (will extend linked-in data)' }] -] : []).concat(hasNodeOptions ? [ +] : []), (hasNodeOptions ? [ ['NODE_OPTIONS', { helpText: 'set CLI options in the environment via a ' + 'space-separated list' }] -] : []).concat(hasCrypto ? [ +] : []), hasCrypto ? [ ['OPENSSL_CONF', { helpText: 'load OpenSSL configuration from file' }], ['SSL_CERT_DIR', { helpText: 'sets OpenSSL\'s directory of trusted ' + 'certificates when used in conjunction with --use-openssl-ca' }], ['SSL_CERT_FILE', { helpText: 'sets OpenSSL\'s trusted certificate file ' + 'when used in conjunction with --use-openssl-ca' }], -] : [])); +] : []); function indent(text, depth) { - return text.replace(/^/gm, ' '.repeat(depth)); + return StringPrototypeReplace(text, /^/gm, StringPrototypeRepeat(' ', depth)); } function fold(text, width) { - return text.replace(new RegExp(`([^\n]{0,${width}})( |$)`, 'g'), - (_, newLine, end) => newLine + (end === ' ' ? '\n' : '')); + return StringPrototypeReplace(text, + new RegExp(`([^\n]{0,${width}})( |$)`, 'g'), + (_, newLine, end) => + newLine + (end === ' ' ? '\n' : '')); } function getArgDescription(type) { @@ -87,13 +101,15 @@ function getArgDescription(type) { } } -function format({ options, aliases = new Map(), firstColumn, secondColumn }) { +function format( + { options, aliases = new SafeMap(), firstColumn, secondColumn } +) { let text = ''; let maxFirstColumnUsed = 0; for (const [ name, { helpText, type, value } - ] of [...options.entries()].sort()) { + ] of ArrayPrototypeSort([...options.entries()])) { if (!helpText) continue; let displayName = name; @@ -127,14 +143,14 @@ function format({ options, aliases = new Map(), firstColumn, secondColumn }) { } text += displayName; - maxFirstColumnUsed = Math.max(maxFirstColumnUsed, displayName.length); + maxFirstColumnUsed = MathMax(maxFirstColumnUsed, displayName.length); if (displayName.length >= firstColumn) - text += '\n' + ' '.repeat(firstColumn); + text += '\n' + StringPrototypeRepeat(' ', firstColumn); else - text += ' '.repeat(firstColumn - displayName.length); + text += StringPrototypeRepeat(' ', firstColumn - displayName.length); - text += indent(fold(displayHelpText, secondColumn), - firstColumn).trimLeft() + '\n'; + text += indent(StringPrototypeTrimLeft(fold(displayHelpText, secondColumn), + firstColumn)) + '\n'; } if (maxFirstColumnUsed < firstColumn - 4) { @@ -154,9 +170,9 @@ function print(stream) { const { options, aliases } = require('internal/options'); // Use 75 % of the available width, and at least 70 characters. - const width = Math.max(70, (stream.columns || 0) * 0.75); - const firstColumn = Math.floor(width * 0.4); - const secondColumn = Math.floor(width * 0.57); + const width = MathMax(70, (stream.columns || 0) * 0.75); + const firstColumn = MathFloor(width * 0.4); + const secondColumn = MathFloor(width * 0.57); options.set('-', { helpText: 'script read from stdin ' + '(default if no file name is provided, ' + diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js index c2a4b67e6e0669..7734aaa2c2011c 100644 --- a/lib/internal/main/worker_thread.js +++ b/lib/internal/main/worker_thread.js @@ -4,7 +4,10 @@ // message port. const { + ArrayPrototypeConcat, + ArrayPrototypeSplice, ObjectDefineProperty, + PromisePrototypeCatch, } = primordials; const { @@ -122,7 +125,7 @@ port.on('message', (message) => { loadPreloadModules(); initializeFrozenIntrinsics(); if (argv !== undefined) { - process.argv = process.argv.concat(argv); + process.argv = ArrayPrototypeConcat(process.argv, argv); } publicWorker.parentPort = publicPort; publicWorker.workerData = workerData; @@ -159,18 +162,18 @@ port.on('message', (message) => { enumerable: true, value: filename, }); - process.argv.splice(1, 0, name); + ArrayPrototypeSplice(process.argv, 1, 0, name); evalScript(name, filename); } else if (doEval === 'module') { const { evalModule } = require('internal/process/execution'); - evalModule(filename).catch((e) => { + PromisePrototypeCatch(evalModule(filename), (e) => { workerOnGlobalUncaughtException(e, true); }); } else { // script filename // runMain here might be monkey-patched by users in --require. // XXX: the monkey-patchability here should probably be deprecated. - process.argv.splice(1, 0, filename); + ArrayPrototypeSplice(process.argv, 1, 0, filename); CJSLoader.Module.runMain(filename); } } else if (message.type === STDIO_PAYLOAD) { diff --git a/lib/internal/modules/cjs/helpers.js b/lib/internal/modules/cjs/helpers.js index 9b6944c59390fe..163c854ac26d48 100644 --- a/lib/internal/modules/cjs/helpers.js +++ b/lib/internal/modules/cjs/helpers.js @@ -1,11 +1,16 @@ 'use strict'; const { + ArrayPrototypeForEach, ArrayPrototypeJoin, ObjectDefineProperty, ObjectPrototypeHasOwnProperty, SafeMap, SafeSet, + StringPrototypeCharCodeAt, + StringPrototypeIncludes, + StringPrototypeSlice, + StringPrototypeStartsWith, } = primordials; const { ERR_MANIFEST_DEPENDENCY_MISSING, @@ -15,8 +20,7 @@ const { NativeModule } = require('internal/bootstrap/loaders'); const { validateString } = require('internal/validators'); const path = require('path'); -const { pathToFileURL, fileURLToPath } = require('internal/url'); -const { URL } = require('url'); +const { pathToFileURL, fileURLToPath, URL } = require('internal/url'); const { getOptionValue } = require('internal/options'); const userConditions = getOptionValue('--conditions'); @@ -119,8 +123,8 @@ function makeRequireFunction(mod, redirects) { * translates it to FEFF, the UTF-16 BOM. */ function stripBOM(content) { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); + if (StringPrototypeCharCodeAt(content) === 0xFEFF) { + content = StringPrototypeSlice(content, 1); } return content; } @@ -128,11 +132,11 @@ function stripBOM(content) { function addBuiltinLibsToObject(object) { // Make built-in modules available directly (loaded lazily). const { builtinModules } = require('internal/modules/cjs/loader').Module; - builtinModules.forEach((name) => { + ArrayPrototypeForEach(builtinModules, (name) => { // Neither add underscored modules, nor ones that contain slashes (e.g., // 'fs/promises') or ones that are already defined. - if (name.startsWith('_') || - name.includes('/') || + if (StringPrototypeStartsWith(name, '_') || + StringPrototypeIncludes(name, '/') || ObjectPrototypeHasOwnProperty(object, name)) { return; } diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js index 051cc23277865f..037d872e1d4fa1 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -23,10 +23,18 @@ const { ArrayIsArray, + ArrayPrototypeConcat, + ArrayPrototypeFilter, + ArrayPrototypeIncludes, + ArrayPrototypeIndexOf, ArrayPrototypeJoin, + ArrayPrototypePush, + ArrayPrototypeSlice, + ArrayPrototypeSplice, + ArrayPrototypeUnshift, + Boolean, Error, JSONParse, - Map, ObjectCreate, ObjectDefineProperty, ObjectFreeze, @@ -36,16 +44,20 @@ const { ObjectPrototype, ObjectPrototypeHasOwnProperty, ObjectSetPrototypeOf, + ReflectApply, ReflectSet, RegExpPrototypeTest, SafeMap, SafeWeakMap, String, + StringPrototypeCharAt, + StringPrototypeCharCodeAt, StringPrototypeEndsWith, StringPrototypeLastIndexOf, StringPrototypeIndexOf, StringPrototypeMatch, StringPrototypeSlice, + StringPrototypeSplit, StringPrototypeStartsWith, } = primordials; @@ -128,6 +140,7 @@ const relativeResolveCache = ObjectCreate(null); let requireDepth = 0; let statCache = null; +let isPreloading = false; function stat(filename) { filename = path.toNamespacedPath(filename); @@ -142,8 +155,8 @@ function stat(filename) { function updateChildren(parent, child, scan) { const children = parent && parent.children; - if (children && !(scan && children.includes(child))) - children.push(child); + if (children && !(scan && ArrayPrototypeIncludes(children, child))) + ArrayPrototypePush(children, child); } const moduleParentCache = new SafeWeakMap(); @@ -161,7 +174,7 @@ function Module(id = '', parent) { const builtinModules = []; for (const [id, mod] of NativeModule.map) { if (mod.canBeRequiredByUsers) { - builtinModules.push(id); + ArrayPrototypePush(builtinModules, id); } } @@ -220,6 +233,10 @@ ObjectDefineProperty(Module, 'wrapper', { } }); +ObjectDefineProperty(Module.prototype, 'isPreloading', { + get() { return isPreloading; } +}); + function getModuleParent() { return moduleParentCache.get(this); } @@ -349,7 +366,7 @@ function tryPackage(requestPath, exts, isMain, originalPath) { // In order to minimize unnecessary lstat() calls, // this cache is a list of known-real paths. // Set to an empty Map to reset. -const realpathCache = new Map(); +const realpathCache = new SafeMap(); // Check if the file exists and is not a directory // if using --preserve-symlinks and isMain is false, @@ -389,10 +406,10 @@ function findLongestRegisteredExtension(filename) { let currentExtension; let index; let startIndex = 0; - while ((index = name.indexOf('.', startIndex)) !== -1) { + while ((index = StringPrototypeIndexOf(name, '.', startIndex)) !== -1) { startIndex = index + 1; if (index === 0) continue; // Skip dotfiles like .gitignore - currentExtension = name.slice(index); + currentExtension = StringPrototypeSlice(name, index); if (Module._extensions[currentExtension]) return currentExtension; } return '.js'; @@ -473,15 +490,15 @@ Module._findPath = function(request, paths, isMain) { return false; } - const cacheKey = request + '\x00' + - (paths.length === 1 ? paths[0] : paths.join('\x00')); + const cacheKey = request + '\x00' + ArrayPrototypeJoin(paths, '\x00'); const entry = Module._pathCache[cacheKey]; if (entry) return entry; let exts; let trailingSlash = request.length > 0 && - request.charCodeAt(request.length - 1) === CHAR_FORWARD_SLASH; + StringPrototypeCharCodeAt(request, request.length - 1) === + CHAR_FORWARD_SLASH; if (!trailingSlash) { trailingSlash = RegExpPrototypeTest(trailingSlashRegex, request); } @@ -564,13 +581,14 @@ if (isWindows) { // return root node_modules when path is 'D:\\'. // path.resolve will make sure from.length >=3 in Windows. - if (from.charCodeAt(from.length - 1) === CHAR_BACKWARD_SLASH && - from.charCodeAt(from.length - 2) === CHAR_COLON) + if (StringPrototypeCharCodeAt(from, from.length - 1) === + CHAR_BACKWARD_SLASH && + StringPrototypeCharCodeAt(from, from.length - 2) === CHAR_COLON) return [from + 'node_modules']; const paths = []; for (let i = from.length - 1, p = 0, last = from.length; i >= 0; --i) { - const code = from.charCodeAt(i); + const code = StringPrototypeCharCodeAt(from, i); // The path segment separator check ('\' and '/') was used to get // node_modules path for every path segment. // Use colon as an extra condition since we can get node_modules @@ -580,7 +598,10 @@ if (isWindows) { code === CHAR_FORWARD_SLASH || code === CHAR_COLON) { if (p !== nmLen) - paths.push(from.slice(0, last) + '\\node_modules'); + ArrayPrototypePush( + paths, + StringPrototypeSlice(from, 0, last) + '\\node_modules' + ); last = i; p = 0; } else if (p !== -1) { @@ -609,10 +630,13 @@ if (isWindows) { // that works on both Windows and Posix is non-trivial. const paths = []; for (let i = from.length - 1, p = 0, last = from.length; i >= 0; --i) { - const code = from.charCodeAt(i); + const code = StringPrototypeCharCodeAt(from, i); if (code === CHAR_FORWARD_SLASH) { if (p !== nmLen) - paths.push(from.slice(0, last) + '/node_modules'); + ArrayPrototypePush( + paths, + StringPrototypeSlice(from, 0, last) + '/node_modules' + ); last = i; p = 0; } else if (p !== -1) { @@ -625,7 +649,7 @@ if (isWindows) { } // Append /node_modules to handle root paths. - paths.push('/node_modules'); + ArrayPrototypePush(paths, '/node_modules'); return paths; }; @@ -638,15 +662,15 @@ Module._resolveLookupPaths = function(request, parent) { } // Check for node modules paths. - if (request.charAt(0) !== '.' || + if (StringPrototypeCharAt(request, 0) !== '.' || (request.length > 1 && - request.charAt(1) !== '.' && - request.charAt(1) !== '/' && - (!isWindows || request.charAt(1) !== '\\'))) { + StringPrototypeCharAt(request, 1) !== '.' && + StringPrototypeCharAt(request, 1) !== '/' && + (!isWindows || StringPrototypeCharAt(request, 1) !== '\\'))) { let paths = modulePaths; if (parent != null && parent.paths && parent.paths.length) { - paths = parent.paths.concat(paths); + paths = ArrayPrototypeConcat(parent.paths, paths); } debug('looking for %j in %j', request, paths); @@ -796,9 +820,9 @@ Module._load = function(request, parent, isMain) { delete relativeResolveCache[relResolveCacheIdentifier]; const children = parent && parent.children; if (ArrayIsArray(children)) { - const index = children.indexOf(module); + const index = ArrayPrototypeIndexOf(children, module); if (index !== -1) { - children.splice(index, 1); + ArrayPrototypeSplice(children, index, 1); } } } @@ -822,10 +846,10 @@ Module._resolveFilename = function(request, parent, isMain, options) { if (typeof options === 'object' && options !== null) { if (ArrayIsArray(options.paths)) { - const isRelative = request.startsWith('./') || - request.startsWith('../') || - ((isWindows && request.startsWith('.\\')) || - request.startsWith('..\\')); + const isRelative = StringPrototypeStartsWith(request, './') || + StringPrototypeStartsWith(request, '../') || + ((isWindows && StringPrototypeStartsWith(request, '.\\')) || + StringPrototypeStartsWith(request, '..\\')); if (isRelative) { paths = options.paths; @@ -840,8 +864,8 @@ Module._resolveFilename = function(request, parent, isMain, options) { const lookupPaths = Module._resolveLookupPaths(request, fakeParent); for (let j = 0; j < lookupPaths.length; j++) { - if (!paths.includes(lookupPaths[j])) - paths.push(lookupPaths[j]); + if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) + ArrayPrototypePush(paths, lookupPaths[j]); } } } @@ -890,11 +914,12 @@ Module._resolveFilename = function(request, parent, isMain, options) { for (let cursor = parent; cursor; cursor = moduleParentCache.get(cursor)) { - requireStack.push(cursor.filename || cursor.id); + ArrayPrototypePush(requireStack, cursor.filename || cursor.id); } let message = `Cannot find module '${request}'`; if (requireStack.length > 0) { - message = message + '\nRequire stack:\n- ' + requireStack.join('\n- '); + message = message + '\nRequire stack:\n- ' + + ArrayPrototypeJoin(requireStack, '\n- '); } // eslint-disable-next-line no-restricted-syntax const err = new Error(message); @@ -905,7 +930,7 @@ Module._resolveFilename = function(request, parent, isMain, options) { function finalizeEsmResolution(match, request, parentPath, pkgPath) { const { resolved, exact } = match; - if (StringPrototypeMatch(resolved, encodedSepRegEx)) + if (RegExpPrototypeTest(encodedSepRegEx, resolved)) throw new ERR_INVALID_MODULE_SPECIFIER( resolved, 'must not include encoded "/" or "\\" characters', parentPath); const filename = fileURLToPath(resolved); @@ -942,9 +967,9 @@ Module.prototype.load = function(filename) { const extension = findLongestRegisteredExtension(filename); // allow .mjs to be overridden - if (filename.endsWith('.mjs') && !Module._extensions['.mjs']) { + if (StringPrototypeEndsWith(filename, '.mjs') && !Module._extensions['.mjs']) throw new ERR_REQUIRE_ESM(filename); - } + Module._extensions[extension](this, filename); this.loaded = true; @@ -1075,13 +1100,13 @@ Module.prototype._compile = function(content, filename) { const exports = this.exports; const thisValue = exports; const module = this; - if (requireDepth === 0) statCache = new Map(); + if (requireDepth === 0) statCache = new SafeMap(); if (inspectorWrapper) { result = inspectorWrapper(compiledWrapper, thisValue, exports, require, module, filename, dirname); } else { - result = compiledWrapper.call(thisValue, exports, require, module, - filename, dirname); + result = ReflectApply(compiledWrapper, thisValue, + [exports, require, module, filename, dirname]); } hasLoadedAnyUserCJSModule = true; if (requireDepth === 0) statCache = null; @@ -1090,7 +1115,7 @@ Module.prototype._compile = function(content, filename) { // Native extension for .js Module._extensions['.js'] = function(module, filename) { - if (filename.endsWith('.js')) { + if (StringPrototypeEndsWith(filename, '.js')) { const pkg = readPackageScope(filename); // Function require shouldn't be used in ES modules. if (pkg && pkg.data && pkg.data.type === 'module') { @@ -1145,7 +1170,8 @@ Module._extensions['.node'] = function(module, filename) { function createRequireFromPath(filename) { // Allow a directory to be passed as the filename const trailingSlash = - filename.endsWith('/') || (isWindows && filename.endsWith('\\')); + StringPrototypeEndsWith(filename, '/') || + (isWindows && StringPrototypeEndsWith(filename, '\\')); const proxyPath = trailingSlash ? path.join(filename, 'noop.js') : @@ -1202,26 +1228,29 @@ Module._initPaths = function() { let paths = [path.resolve(prefixDir, 'lib', 'node')]; if (homeDir) { - paths.unshift(path.resolve(homeDir, '.node_libraries')); - paths.unshift(path.resolve(homeDir, '.node_modules')); + ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries')); + ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_modules')); } if (nodePath) { - paths = nodePath.split(path.delimiter).filter(function pathsFilterCB(path) { - return !!path; - }).concat(paths); + paths = ArrayPrototypeConcat(ArrayPrototypeFilter( + StringPrototypeSplit(nodePath, path.delimiter), + Boolean + ), paths); } modulePaths = paths; // Clone as a shallow copy, for introspection. - Module.globalPaths = modulePaths.slice(0); + Module.globalPaths = ArrayPrototypeSlice(modulePaths); }; Module._preloadModules = function(requests) { if (!ArrayIsArray(requests)) return; + isPreloading = true; + // Preloaded modules have a dummy parent module which is deemed to exist // in the current working directory. This seeds the search path for // preloaded modules. @@ -1230,11 +1259,13 @@ Module._preloadModules = function(requests) { parent.paths = Module._nodeModulePaths(process.cwd()); } catch (e) { if (e.code !== 'ENOENT') { + isPreloading = false; throw e; } } for (let n = 0; n < requests.length; n++) parent.require(requests[n]); + isPreloading = false; }; Module.syncBuiltinESMExports = function syncBuiltinESMExports() { diff --git a/lib/internal/modules/esm/create_dynamic_module.js b/lib/internal/modules/esm/create_dynamic_module.js index e831db8daaf476..f7c20083b6c918 100644 --- a/lib/internal/modules/esm/create_dynamic_module.js +++ b/lib/internal/modules/esm/create_dynamic_module.js @@ -5,7 +5,7 @@ const { ArrayPrototypeMap, JSONStringify, ObjectCreate, - Set, + SafeSet, } = primordials; let debug = require('internal/util/debuglog').debuglog('esm', (fn) => { @@ -38,7 +38,7 @@ import.meta.done(); const { ModuleWrap, callbackMap } = internalBinding('module_wrap'); const m = new ModuleWrap(`${url}`, undefined, source, 0, 0); - const readyfns = new Set(); + const readyfns = new SafeSet(); const reflect = { exports: ObjectCreate(null), onReady: (cb) => { readyfns.add(cb); }, diff --git a/lib/internal/modules/esm/get_format.js b/lib/internal/modules/esm/get_format.js index 16e2ad5e2d5c3e..51b207ea75d131 100644 --- a/lib/internal/modules/esm/get_format.js +++ b/lib/internal/modules/esm/get_format.js @@ -1,5 +1,8 @@ 'use strict'; -const { StringPrototypeStartsWith } = primordials; +const { + RegExpPrototypeExec, + StringPrototypeStartsWith, +} = primordials; const { extname } = require('path'); const { getOptionValue } = require('internal/options'); @@ -39,7 +42,10 @@ function defaultGetFormat(url, context, defaultGetFormatUnused) { } const parsed = new URL(url); if (parsed.protocol === 'data:') { - const [ , mime ] = /^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/.exec(parsed.pathname) || [ null, null, null ]; + const [ , mime ] = RegExpPrototypeExec( + /^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/, + parsed.pathname, + ) || [ null, null, null ]; const format = ({ '__proto__': null, 'text/javascript': 'module', diff --git a/lib/internal/modules/esm/get_source.js b/lib/internal/modules/esm/get_source.js index 54dbd029fcfc22..b2cf0c3bd28aa2 100644 --- a/lib/internal/modules/esm/get_source.js +++ b/lib/internal/modules/esm/get_source.js @@ -1,5 +1,8 @@ 'use strict'; +const { + RegExpPrototypeExec, +} = primordials; const { getOptionValue } = require('internal/options'); // Do not eagerly grab .manifest, it may be in TDZ const policy = getOptionValue('--experimental-policy') ? @@ -8,14 +11,13 @@ const policy = getOptionValue('--experimental-policy') ? const { Buffer } = require('buffer'); -const fs = require('fs'); -const { URL } = require('url'); -const { promisify } = require('internal/util'); +const fs = require('internal/fs/promises').exports; +const { URL } = require('internal/url'); const { ERR_INVALID_URL, ERR_INVALID_URL_SCHEME, } = require('internal/errors').codes; -const readFileAsync = promisify(fs.readFile); +const readFileAsync = fs.readFile; const DATA_URL_PATTERN = /^[^/]+\/[^,;]+(?:[^,]*?)(;base64)?,([\s\S]*)$/; @@ -25,7 +27,7 @@ async function defaultGetSource(url, { format } = {}, defaultGetSource) { if (parsed.protocol === 'file:') { source = await readFileAsync(parsed); } else if (parsed.protocol === 'data:') { - const match = DATA_URL_PATTERN.exec(parsed.pathname); + const match = RegExpPrototypeExec(DATA_URL_PATTERN, parsed.pathname); if (!match) { throw new ERR_INVALID_URL(url); } diff --git a/lib/internal/modules/esm/loader.js b/lib/internal/modules/esm/loader.js index 110464cbdb1da3..232177698c73f6 100644 --- a/lib/internal/modules/esm/loader.js +++ b/lib/internal/modules/esm/loader.js @@ -7,6 +7,7 @@ const { FunctionPrototypeBind, ObjectSetPrototypeOf, SafeWeakMap, + StringPrototypeStartsWith, } = primordials; const { @@ -126,8 +127,8 @@ class Loader { } if (this._resolve === defaultResolve && - !url.startsWith('file:') && - !url.startsWith('data:') + !StringPrototypeStartsWith(url, 'file:') && + !StringPrototypeStartsWith(url, 'data:') ) { throw new ERR_INVALID_RETURN_PROPERTY( 'file: or data: url', 'loader resolve', 'url', url diff --git a/lib/internal/modules/esm/module_job.js b/lib/internal/modules/esm/module_job.js index 7b8f146771c530..549d43cc20e119 100644 --- a/lib/internal/modules/esm/module_job.js +++ b/lib/internal/modules/esm/module_job.js @@ -2,10 +2,15 @@ const { ArrayPrototypeJoin, + ArrayPrototypeMap, + ArrayPrototypePush, + FunctionPrototype, ObjectSetPrototypeOf, PromiseAll, + PromiseResolve, + PromisePrototypeCatch, + ReflectApply, SafeSet, - SafePromise, StringPrototypeIncludes, StringPrototypeMatch, StringPrototypeReplace, @@ -16,9 +21,9 @@ const { ModuleWrap } = internalBinding('module_wrap'); const { decorateErrorStack } = require('internal/util'); const assert = require('internal/assert'); -const resolvedPromise = SafePromise.resolve(); +const resolvedPromise = PromiseResolve(); -function noop() {} +const noop = FunctionPrototype; let hasPausedEntry = false; @@ -35,7 +40,7 @@ class ModuleJob { this.module = undefined; // Expose the promise to the ModuleWrap directly for linking below. // `this.module` is also filled in below. - this.modulePromise = moduleProvider.call(loader, url, isMain); + this.modulePromise = ReflectApply(moduleProvider, loader, [url, isMain]); // Wait for the ModuleWrap instance being linked with all dependencies. const link = async () => { @@ -49,21 +54,21 @@ class ModuleJob { const dependencyJobs = []; const promises = this.module.link(async (specifier) => { const jobPromise = this.loader.getModuleJob(specifier, url); - dependencyJobs.push(jobPromise); + ArrayPrototypePush(dependencyJobs, jobPromise); const job = await jobPromise; return job.modulePromise; }); if (promises !== undefined) - await SafePromise.all(promises); + await PromiseAll(promises); - return SafePromise.all(dependencyJobs); + return PromiseAll(dependencyJobs); }; // Promise for the list of all dependencyJobs. this.linked = link(); // This promise is awaited later anyway, so silence // 'unhandled rejection' warnings. - this.linked.catch(noop); + PromisePrototypeCatch(this.linked, noop); // instantiated == deep dependency jobs wrappers are instantiated, // and module wrapper is instantiated. @@ -85,7 +90,8 @@ class ModuleJob { } jobsInGraph.add(moduleJob); const dependencyJobs = await moduleJob.linked; - return PromiseAll(dependencyJobs.map(addJobsToDependencyGraph)); + return PromiseAll( + ArrayPrototypeMap(dependencyJobs, addJobsToDependencyGraph)); }; await addJobsToDependencyGraph(this); diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js index 21459cf3d1e753..8a5bc841ada22a 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -16,6 +16,7 @@ const { String, StringPrototypeEndsWith, StringPrototypeIndexOf, + StringPrototypeLastIndexOf, StringPrototypeReplace, StringPrototypeSlice, StringPrototypeSplit, @@ -59,6 +60,36 @@ const userConditions = getOptionValue('--conditions'); const DEFAULT_CONDITIONS = ObjectFreeze(['node', 'import', ...userConditions]); const DEFAULT_CONDITIONS_SET = new SafeSet(DEFAULT_CONDITIONS); +const pendingDeprecation = getOptionValue('--pending-deprecation'); +const emittedPackageWarnings = new SafeSet(); +function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) { + const pjsonPath = fileURLToPath(pjsonUrl); + if (!pendingDeprecation) { + const nodeModulesIndex = StringPrototypeLastIndexOf(pjsonPath, + '/node_modules/'); + if (nodeModulesIndex !== -1) { + const afterNodeModulesPath = StringPrototypeSlice(pjsonPath, + nodeModulesIndex + 14, + -13); + try { + const { packageSubpath } = parsePackageName(afterNodeModulesPath); + if (packageSubpath === '.') + return; + } catch {} + } + } + if (emittedPackageWarnings.has(pjsonPath + '|' + match)) + return; + emittedPackageWarnings.add(pjsonPath + '|' + match); + process.emitWarning( + `Use of deprecated folder mapping "${match}" in the ${isExports ? + '"exports"' : '"imports"'} field module resolution of the package at ${ + pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ''}.\n` + + `Update this package.json to use a subpath pattern like "${match}*".`, + 'DeprecationWarning', + 'DEP0148' + ); +} function getConditionsSet(conditions) { if (conditions !== undefined && conditions !== DEFAULT_CONDITIONS) { @@ -507,6 +538,8 @@ function packageExportsResolve( conditions); if (resolved === null || resolved === undefined) throwExportsNotFound(packageSubpath, packageJSONUrl, base); + if (!pattern) + emitFolderMapDeprecation(bestMatch, packageJSONUrl, true, base); return { resolved, exact: pattern }; } @@ -556,8 +589,11 @@ function packageImportsResolve(name, base, conditions) { const resolved = resolvePackageTarget( packageJSONUrl, target, subpath, bestMatch, base, pattern, true, conditions); - if (resolved !== null) + if (resolved !== null) { + if (!pattern) + emitFolderMapDeprecation(bestMatch, packageJSONUrl, false, base); return { resolved, exact: pattern }; + } } } } @@ -570,13 +606,7 @@ function getPackageType(url) { return packageConfig.type; } -/** - * @param {string} specifier - * @param {URL} base - * @param {Set} conditions - * @returns {URL} - */ -function packageResolve(specifier, base, conditions) { +function parsePackageName(specifier, base) { let separatorIndex = StringPrototypeIndexOf(specifier, '/'); let validPackageName = true; let isScoped = false; @@ -610,6 +640,19 @@ function packageResolve(specifier, base, conditions) { const packageSubpath = '.' + (separatorIndex === -1 ? '' : StringPrototypeSlice(specifier, separatorIndex)); + return { packageName, packageSubpath, isScoped }; +} + +/** + * @param {string} specifier + * @param {URL} base + * @param {Set} conditions + * @returns {URL} + */ +function packageResolve(specifier, base, conditions) { + const { packageName, packageSubpath, isScoped } = + parsePackageName(specifier, base); + // ResolveSelf const packageConfig = getPackageScopeConfig(base); if (packageConfig.exists) { @@ -837,7 +880,8 @@ function defaultResolve(specifier, context = {}, defaultResolveUnused) { [internalFS.realpathCacheKey]: realpathCache }); const old = url; - url = pathToFileURL(real + (urlPath.endsWith(sep) ? '/' : '')); + url = pathToFileURL( + real + (StringPrototypeEndsWith(urlPath, sep) ? '/' : '')); url.search = old.search; url.hash = old.hash; } diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js index 517380b8e38567..66636d9ce092b5 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -3,6 +3,7 @@ /* global WebAssembly */ const { + ArrayPrototypeMap, Boolean, JSONParse, ObjectGetPrototypeOf, @@ -14,6 +15,7 @@ const { SafeMap, SafeSet, StringPrototypeReplace, + StringPrototypeSlice, StringPrototypeSplit, StringPrototypeStartsWith, SyntaxErrorPrototype, @@ -63,7 +65,7 @@ const { emitWarningSync } = require('internal/process/warning'); let cjsParse; async function initCJSParse() { if (typeof WebAssembly === 'undefined') { - cjsParse = require('internal/deps/cjs-module-lexer/lexer'); + cjsParse = require('internal/deps/cjs-module-lexer/lexer').parse; } else { const { parse, init } = require('internal/deps/cjs-module-lexer/dist/lexer'); @@ -277,9 +279,9 @@ function cjsPreparseModuleExports(filename) { translators.set('builtin', async function builtinStrategy(url) { debug(`Translating BuiltinModule ${url}`); // Slice 'node:' scheme - const id = url.slice(5); + const id = StringPrototypeSlice(url, 5); const module = loadNativeModule(id, url, true); - if (!url.startsWith('node:') || !module) { + if (!StringPrototypeStartsWith(url, 'node:') || !module) { throw new ERR_UNKNOWN_BUILTIN_MODULE(url); } debug(`Loading BuiltinModule ${url}`); @@ -291,7 +293,8 @@ translators.set('json', async function jsonStrategy(url) { emitExperimentalWarning('Importing JSON modules'); debug(`Translating JSONModule ${url}`); debug(`Loading JSONModule ${url}`); - const pathname = url.startsWith('file:') ? fileURLToPath(url) : null; + const pathname = StringPrototypeStartsWith(url, 'file:') ? + fileURLToPath(url) : null; let modulePath; let module; if (pathname) { @@ -365,8 +368,11 @@ translators.set('wasm', async function(url) { } const imports = - WebAssembly.Module.imports(compiled).map(({ module }) => module); - const exports = WebAssembly.Module.exports(compiled).map(({ name }) => name); + ArrayPrototypeMap(WebAssembly.Module.imports(compiled), + ({ module }) => module); + const exports = + ArrayPrototypeMap(WebAssembly.Module.exports(compiled), + ({ name }) => name); return createDynamicModule(imports, exports, url, (reflect) => { const { exports } = new WebAssembly.Instance(compiled, reflect.imports); diff --git a/lib/internal/modules/run_main.js b/lib/internal/modules/run_main.js index 892f6921745989..bc6f90ce7d089a 100644 --- a/lib/internal/modules/run_main.js +++ b/lib/internal/modules/run_main.js @@ -1,5 +1,9 @@ 'use strict'; +const { + PromisePrototypeFinally, + StringPrototypeEndsWith, +} = primordials; const CJSLoader = require('internal/modules/cjs/loader'); const { Module, toRealPath, readPackageScope } = CJSLoader; const { getOptionValue } = require('internal/options'); @@ -29,9 +33,9 @@ function shouldUseESMLoader(mainPath) { if (esModuleSpecifierResolution === 'node') return true; // Determine the module format of the main - if (mainPath && mainPath.endsWith('.mjs')) + if (mainPath && StringPrototypeEndsWith(mainPath, '.mjs')) return true; - if (!mainPath || mainPath.endsWith('.cjs')) + if (!mainPath || StringPrototypeEndsWith(mainPath, '.cjs')) return false; const pkg = readPackageScope(mainPath); return pkg && pkg.data.type === 'module'; @@ -56,7 +60,7 @@ function handleMainPromise(promise) { process.exitCode = 13; } process.on('exit', handler); - return promise.finally(() => process.off('exit', handler)); + return PromisePrototypeFinally(promise, () => process.off('exit', handler)); } // For backwards compatibility, we have to run a bunch of diff --git a/lib/internal/net.js b/lib/internal/net.js index 2df1d5d5f613d2..8ae3170228dc32 100644 --- a/lib/internal/net.js +++ b/lib/internal/net.js @@ -2,6 +2,7 @@ const { RegExp, + RegExpPrototypeTest, Symbol, } = primordials; @@ -28,11 +29,11 @@ const IPv6Reg = new RegExp('^(' + ')(%[0-9a-zA-Z-.:]{1,})?$'); function isIPv4(s) { - return IPv4Reg.test(s); + return RegExpPrototypeTest(IPv4Reg, s); } function isIPv6(s) { - return IPv6Reg.test(s); + return RegExpPrototypeTest(IPv6Reg, s); } function isIP(s) { diff --git a/lib/internal/per_context/primordials.js b/lib/internal/per_context/primordials.js index 906985c82a3ebd..68c36229825f73 100644 --- a/lib/internal/per_context/primordials.js +++ b/lib/internal/per_context/primordials.js @@ -1,6 +1,6 @@ 'use strict'; -/* eslint-disable no-restricted-globals */ +/* eslint-disable node-core/prefer-primordials */ // This file subclasses and stores the JS builtins that come from the VM // so that Node.js's builtin modules do not need to later look these up from @@ -12,17 +12,11 @@ // `primordials.Object` where `primordials` is a lexical variable passed // by the native module compiler. -const ReflectApply = Reflect.apply; - -// This function is borrowed from the function with the same name on V8 Extras' -// `utils` object. V8 implements Reflect.apply very efficiently in conjunction -// with the spread syntax, such that no additional special case is needed for -// function calls w/o arguments. -// Refs: https://github.com/v8/v8/blob/d6ead37d265d7215cf9c5f768f279e21bd170212/src/js/prologue.js#L152-L156 -function uncurryThis(func) { - return (thisArg, ...args) => ReflectApply(func, thisArg, args); -} - +// `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`. +// It is using `call.bind(bind, call)` to avoid using `Function.prototype.bind` +// after it may have been mutated by users. +const { bind, call } = Function.prototype; +const uncurryThis = call.bind(bind, call); primordials.uncurryThis = uncurryThis; function copyProps(src, dest) { @@ -36,74 +30,147 @@ function copyProps(src, dest) { } } +function getNewKey(key) { + return typeof key === 'symbol' ? + `Symbol${key.description[7].toUpperCase()}${key.description.slice(8)}` : + `${key[0].toUpperCase()}${key.slice(1)}`; +} + +function copyAccessor(dest, prefix, key, { enumerable, get, set }) { + Reflect.defineProperty(dest, `${prefix}Get${key}`, { + value: uncurryThis(get), + enumerable + }); + if (set !== undefined) { + Reflect.defineProperty(dest, `${prefix}Set${key}`, { + value: uncurryThis(set), + enumerable + }); + } +} + function copyPropsRenamed(src, dest, prefix) { for (const key of Reflect.ownKeys(src)) { - if (typeof key === 'string') { - Reflect.defineProperty( - dest, - `${prefix}${key[0].toUpperCase()}${key.slice(1)}`, - Reflect.getOwnPropertyDescriptor(src, key)); + const newKey = getNewKey(key); + const desc = Reflect.getOwnPropertyDescriptor(src, key); + if ('get' in desc) { + copyAccessor(dest, prefix, newKey, desc); + } else { + Reflect.defineProperty(dest, `${prefix}${newKey}`, desc); } } } function copyPropsRenamedBound(src, dest, prefix) { for (const key of Reflect.ownKeys(src)) { - if (typeof key === 'string') { - const desc = Reflect.getOwnPropertyDescriptor(src, key); + const newKey = getNewKey(key); + const desc = Reflect.getOwnPropertyDescriptor(src, key); + if ('get' in desc) { + copyAccessor(dest, prefix, newKey, desc); + } else { if (typeof desc.value === 'function') { desc.value = desc.value.bind(src); } - Reflect.defineProperty( - dest, - `${prefix}${key[0].toUpperCase()}${key.slice(1)}`, - desc - ); + Reflect.defineProperty(dest, `${prefix}${newKey}`, desc); } } } function copyPrototype(src, dest, prefix) { for (const key of Reflect.ownKeys(src)) { - if (typeof key === 'string') { - const desc = Reflect.getOwnPropertyDescriptor(src, key); + const newKey = getNewKey(key); + const desc = Reflect.getOwnPropertyDescriptor(src, key); + if ('get' in desc) { + copyAccessor(dest, prefix, newKey, desc); + } else { if (typeof desc.value === 'function') { desc.value = uncurryThis(desc.value); } - Reflect.defineProperty( - dest, - `${prefix}${key[0].toUpperCase()}${key.slice(1)}`, - desc); + Reflect.defineProperty(dest, `${prefix}${newKey}`, desc); } } } +const createSafeIterator = (factory, next) => { + class SafeIterator { + constructor(iterable) { + this._iterator = factory(iterable); + } + next() { + return next(this._iterator); + } + [Symbol.iterator]() { + return this; + } + } + Object.setPrototypeOf(SafeIterator.prototype, null); + Object.freeze(SafeIterator.prototype); + Object.freeze(SafeIterator); + return SafeIterator; +}; + function makeSafe(unsafe, safe) { - copyProps(unsafe.prototype, safe.prototype); + if (Symbol.iterator in unsafe.prototype) { + const dummy = new unsafe(); + let next; // We can reuse the same `next` method. + + for (const key of Reflect.ownKeys(unsafe.prototype)) { + if (!Reflect.getOwnPropertyDescriptor(safe.prototype, key)) { + const desc = Reflect.getOwnPropertyDescriptor(unsafe.prototype, key); + if ( + typeof desc.value === 'function' && + desc.value.length === 0 && + Symbol.iterator in (desc.value.call(dummy) ?? {}) + ) { + const createIterator = uncurryThis(desc.value); + next ??= uncurryThis(createIterator(dummy).next); + const SafeIterator = createSafeIterator(createIterator, next); + desc.value = function() { + return new SafeIterator(this); + }; + } + Reflect.defineProperty(safe.prototype, key, desc); + } + } + } else { + copyProps(unsafe.prototype, safe.prototype); + } copyProps(unsafe, safe); + Object.setPrototypeOf(safe.prototype, null); Object.freeze(safe.prototype); Object.freeze(safe); return safe; } +primordials.makeSafe = makeSafe; // Subclass the constructors because we need to use their prototype // methods later. +// Defining the `constructor` is necessary here to avoid the default +// constructor which uses the user-mutable `%ArrayIteratorPrototype%.next`. primordials.SafeMap = makeSafe( Map, - class SafeMap extends Map {} + class SafeMap extends Map { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } ); primordials.SafeWeakMap = makeSafe( WeakMap, - class SafeWeakMap extends WeakMap {} + class SafeWeakMap extends WeakMap { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } ); primordials.SafeSet = makeSafe( Set, - class SafeSet extends Set {} + class SafeSet extends Set { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } ); -primordials.SafePromise = makeSafe( - Promise, - class SafePromise extends Promise {} +primordials.SafeWeakSet = makeSafe( + WeakSet, + class SafeWeakSet extends WeakSet { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } ); // Create copies of the namespace objects @@ -170,5 +237,26 @@ primordials.SafePromise = makeSafe( copyPrototype(original.prototype, primordials, `${name}Prototype`); }); +// Create copies of abstract intrinsic objects that are not directly exposed +// on the global object. +// Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object +[ + { name: 'TypedArray', original: Reflect.getPrototypeOf(Uint8Array) }, + { name: 'StringIterator', original: { + prototype: Reflect.getPrototypeOf(String.prototype[Symbol.iterator]()), + } }, +].forEach(({ name, original }) => { + primordials[name] = original; + // The static %TypedArray% methods require a valid `this`, but can't be bound, + // as they need a subclass constructor as the receiver: + copyPrototype(original, primordials, name); + copyPrototype(original.prototype, primordials, `${name}Prototype`); +}); + +primordials.SafeStringIterator = createSafeIterator( + primordials.StringPrototypeSymbolIterator, + primordials.StringIteratorPrototypeNext +); + Object.setPrototypeOf(primordials, null); Object.freeze(primordials); diff --git a/lib/internal/policy/manifest.js b/lib/internal/policy/manifest.js index 71dc3d78ab09e4..099fb630e0b176 100644 --- a/lib/internal/policy/manifest.js +++ b/lib/internal/policy/manifest.js @@ -2,8 +2,6 @@ const { ArrayIsArray, - Map, - MapPrototypeSet, ObjectCreate, ObjectEntries, ObjectFreeze, @@ -12,6 +10,8 @@ const { RegExpPrototypeTest, SafeMap, SafeSet, + StringPrototypeEndsWith, + StringPrototypeReplace, Symbol, uncurryThis, } = primordials; @@ -328,14 +328,15 @@ class Manifest { * @returns {string} */ const protocolOrResolve = (resourceHREF) => { - if (resourceHREF.endsWith(':')) { + if (StringPrototypeEndsWith(resourceHREF, ':')) { // URL parse will trim these anyway, save the compute - resourceHREF = resourceHREF.replace( + resourceHREF = StringPrototypeReplace( + resourceHREF, // eslint-disable-next-line /^[\x00-\x1F\x20]|\x09\x0A\x0D|[\x00-\x1F\x20]$/g, '' ); - if (/^[a-zA-Z][a-zA-Z+\-.]*:$/.test(resourceHREF)) { + if (RegExpPrototypeTest(/^[a-zA-Z][a-zA-Z+\-.]*:$/, resourceHREF)) { return resourceHREF; } } @@ -418,7 +419,7 @@ class Manifest { // Only a few schemes are hierarchical if (SPECIAL_SCHEMES.has(currentURL.protocol)) { // Make first '..' act like '.' - if (currentURL.pathname.slice(-1) !== '/') { + if (!StringPrototypeEndsWith(currentURL.pathname, '/')) { currentURL.pathname += '/'; } let lastHREF; @@ -470,7 +471,7 @@ class Manifest { assertIntegrity(url, content) { const href = `${url}`; debug('Checking integrity of %s', href); - const realIntegrities = new Map(); + const realIntegrities = new SafeMap(); const integrities = this.#resourceIntegrities; function processEntry(href) { let integrityEntries = integrities.get(href); @@ -499,8 +500,7 @@ class Manifest { timingSafeEqual(digest, expected)) { return true; } - MapPrototypeSet( - realIntegrities, + realIntegrities.set( algorithm, BufferToString(digest, 'base64') ); diff --git a/lib/internal/policy/sri.js b/lib/internal/policy/sri.js index ddb06a2e1a6051..6728ff4de22bd1 100644 --- a/lib/internal/policy/sri.js +++ b/lib/internal/policy/sri.js @@ -3,9 +3,9 @@ // https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute const { + ArrayPrototype, ObjectDefineProperty, ObjectFreeze, - ObjectGetPrototypeOf, ObjectSeal, ObjectSetPrototypeOf, RegExp, @@ -32,7 +32,6 @@ const kAllWSP = RegExp(`^${kWSP}*$`); ObjectSeal(kAllWSP); const BufferFrom = require('buffer').Buffer.from; -const RealArrayPrototype = ObjectGetPrototypeOf([]); // Returns {algorithm, value (in base64 string), options,}[] const parse = (str) => { @@ -41,10 +40,10 @@ const parse = (str) => { const entries = []; while (match = RegExpPrototypeExec(kSRIPattern, str)) { if (match.index !== prevIndex) { - throw new ERR_SRI_PARSE(str, str.charAt(prevIndex), prevIndex); + throw new ERR_SRI_PARSE(str, str[prevIndex], prevIndex); } if (entries.length > 0 && match[1] === '') { - throw new ERR_SRI_PARSE(str, str.charAt(prevIndex), prevIndex); + throw new ERR_SRI_PARSE(str, str[prevIndex], prevIndex); } // Avoid setters being fired @@ -63,10 +62,10 @@ const parse = (str) => { if (prevIndex !== str.length) { if (!RegExpPrototypeTest(kAllWSP, StringPrototypeSlice(str, prevIndex))) { - throw new ERR_SRI_PARSE(str, str.charAt(prevIndex), prevIndex); + throw new ERR_SRI_PARSE(str, str[prevIndex], prevIndex); } } - return ObjectSetPrototypeOf(entries, RealArrayPrototype); + return ObjectSetPrototypeOf(entries, ArrayPrototype); }; module.exports = { diff --git a/lib/internal/priority_queue.js b/lib/internal/priority_queue.js index c31c1eea385857..a0a18f7301e3b7 100644 --- a/lib/internal/priority_queue.js +++ b/lib/internal/priority_queue.js @@ -2,6 +2,7 @@ const { Array, + ArrayPrototypeIndexOf, Symbol, } = primordials; @@ -106,7 +107,7 @@ module.exports = class PriorityQueue { remove(value) { const heap = this[kHeap]; - const pos = heap.indexOf(value); + const pos = ArrayPrototypeIndexOf(heap, value); if (pos < 1) return false; diff --git a/lib/internal/process/per_thread.js b/lib/internal/process/per_thread.js index b061dd340c78cc..b16705f9fb95b0 100644 --- a/lib/internal/process/per_thread.js +++ b/lib/internal/process/per_thread.js @@ -6,18 +6,21 @@ const { ArrayIsArray, + ArrayPrototypeMap, + ArrayPrototypePush, + ArrayPrototypeSplice, BigUint64Array, Float64Array, NumberMAX_SAFE_INTEGER, - ObjectDefineProperties, ObjectDefineProperty, ObjectFreeze, - ObjectGetOwnPropertyDescriptors, + ReflectApply, RegExpPrototypeTest, - Set, - SetPrototype, - SetPrototypeHas, + SafeSet, + StringPrototypeEndsWith, StringPrototypeReplace, + StringPrototypeSlice, + StringPrototypeStartsWith, Uint32Array, } = primordials; @@ -94,7 +97,7 @@ function wrapProcessMethods(binding) { } = binding; function _rawDebug(...args) { - binding._rawDebug(format.apply(null, args)); + binding._rawDebug(ReflectApply(format, null, args)); } // Create the argument array that will be passed to the native function. @@ -256,19 +259,19 @@ function buildAllowedFlags() { const allowedNodeEnvironmentFlags = []; for (const [name, info] of options) { if (info.envVarSettings === kAllowedInEnvironment) { - allowedNodeEnvironmentFlags.push(name); + ArrayPrototypePush(allowedNodeEnvironmentFlags, name); } } for (const [ from, expansion ] of aliases) { let isAccepted = true; for (const to of expansion) { - if (!to.startsWith('-') || to === '--') continue; + if (!StringPrototypeStartsWith(to, '-') || to === '--') continue; const recursiveExpansion = aliases.get(to); if (recursiveExpansion) { if (recursiveExpansion[0] === to) - recursiveExpansion.splice(0, 1); - expansion.push(...recursiveExpansion); + ArrayPrototypeSplice(recursiveExpansion, 0, 1); + ArrayPrototypePush(expansion, ...recursiveExpansion); continue; } isAccepted = options.get(to).envVarSettings === kAllowedInEnvironment; @@ -276,11 +279,11 @@ function buildAllowedFlags() { } if (isAccepted) { let canonical = from; - if (canonical.endsWith('=')) - canonical = canonical.substr(0, canonical.length - 1); - if (canonical.endsWith(' ')) - canonical = canonical.substr(0, canonical.length - 4); - allowedNodeEnvironmentFlags.push(canonical); + if (StringPrototypeEndsWith(canonical, '=')) + canonical = StringPrototypeSlice(canonical, 0, canonical.length - 1); + if (StringPrototypeEndsWith(canonical, ' ')) + canonical = StringPrototypeSlice(canonical, 0, canonical.length - 4); + ArrayPrototypePush(allowedNodeEnvironmentFlags, canonical); } } @@ -289,14 +292,10 @@ function buildAllowedFlags() { // Save these for comparison against flags provided to // process.allowedNodeEnvironmentFlags.has() which lack leading dashes. - // Avoid interference w/ user code by flattening `Set.prototype` into - // each object. - const nodeFlags = ObjectDefineProperties( - new Set(allowedNodeEnvironmentFlags.map(trimLeadingDashes)), - ObjectGetOwnPropertyDescriptors(SetPrototype) - ); - - class NodeEnvironmentFlagsSet extends Set { + const nodeFlags = new SafeSet(ArrayPrototypeMap(allowedNodeEnvironmentFlags, + trimLeadingDashes)); + + class NodeEnvironmentFlagsSet extends SafeSet { constructor(...args) { super(...args); @@ -328,9 +327,9 @@ function buildAllowedFlags() { key = StringPrototypeReplace(key, replaceUnderscoresRegex, '-'); if (RegExpPrototypeTest(leadingDashesRegex, key)) { key = StringPrototypeReplace(key, trailingValuesRegex, ''); - return SetPrototypeHas(this, key); + return super.has(key); } - return SetPrototypeHas(nodeFlags, key); + return nodeFlags.has(key); } return false; } diff --git a/lib/internal/process/promises.js b/lib/internal/process/promises.js index 2b806e7e8e41b4..023f7df0360d02 100644 --- a/lib/internal/process/promises.js +++ b/lib/internal/process/promises.js @@ -1,9 +1,11 @@ 'use strict'; const { + ArrayPrototypePush, + ArrayPrototypeShift, Error, ObjectDefineProperty, - WeakMap, + SafeWeakMap, } = primordials; const { @@ -25,7 +27,7 @@ const { // *Must* match Environment::TickInfo::Fields in src/env.h. const kHasRejectionToWarn = 1; -const maybeUnhandledPromises = new WeakMap(); +const maybeUnhandledPromises = new SafeWeakMap(); const pendingUnhandledRejections = []; const asyncHandledRejections = []; let lastPromiseId = 0; @@ -117,10 +119,11 @@ function unhandledRejection(promise, reason) { maybeUnhandledPromises.set(promise, { reason, uid: ++lastPromiseId, - warned: false + warned: false, + domain: process.domain }); // This causes the promise to be referenced at least for one tick. - pendingUnhandledRejections.push(promise); + ArrayPrototypePush(pendingUnhandledRejections, promise); setHasRejectionToWarn(true); } @@ -136,7 +139,7 @@ function handledRejection(promise) { `asynchronously (rejection id: ${uid})`); warning.name = 'PromiseRejectionHandledWarning'; warning.id = uid; - asyncHandledRejections.push({ promise, warning }); + ArrayPrototypePush(asyncHandledRejections, { promise, warning }); setHasRejectionToWarn(true); return; } @@ -177,7 +180,7 @@ function processPromiseRejections() { let maybeScheduledTicksOrMicrotasks = asyncHandledRejections.length > 0; while (asyncHandledRejections.length > 0) { - const { promise, warning } = asyncHandledRejections.shift(); + const { promise, warning } = ArrayPrototypeShift(asyncHandledRejections); if (!process.emit('rejectionHandled', promise)) { process.emitWarning(warning); } @@ -185,33 +188,39 @@ function processPromiseRejections() { let len = pendingUnhandledRejections.length; while (len--) { - const promise = pendingUnhandledRejections.shift(); + const promise = ArrayPrototypeShift(pendingUnhandledRejections); const promiseInfo = maybeUnhandledPromises.get(promise); if (promiseInfo === undefined) { continue; } promiseInfo.warned = true; const { reason, uid } = promiseInfo; + function emit(reason, promise, promiseInfo) { + if (promiseInfo.domain) { + return promiseInfo.domain.emit('error', reason); + } + return process.emit('unhandledRejection', reason, promise); + } switch (unhandledRejectionsMode) { case kStrictUnhandledRejections: { const err = reason instanceof Error ? reason : generateUnhandledRejectionError(reason); triggerUncaughtException(err, true /* fromPromise */); - const handled = process.emit('unhandledRejection', reason, promise); + const handled = emit(reason, promise, promiseInfo); if (!handled) emitUnhandledRejectionWarning(uid, reason); break; } case kIgnoreUnhandledRejections: { - process.emit('unhandledRejection', reason, promise); + emit(reason, promise, promiseInfo); break; } case kAlwaysWarnUnhandledRejections: { - process.emit('unhandledRejection', reason, promise); + emit(reason, promise, promiseInfo); emitUnhandledRejectionWarning(uid, reason); break; } case kThrowUnhandledRejections: { - const handled = process.emit('unhandledRejection', reason, promise); + const handled = emit(reason, promise, promiseInfo); if (!handled) { const err = reason instanceof Error ? reason : generateUnhandledRejectionError(reason); @@ -220,7 +229,7 @@ function processPromiseRejections() { break; } case kWarnWithErrorCodeUnhandledRejections: { - const handled = process.emit('unhandledRejection', reason, promise); + const handled = emit(reason, promise, promiseInfo); if (!handled) { emitUnhandledRejectionWarning(uid, reason); process.exitCode = 1; @@ -266,10 +275,9 @@ function generateUnhandledRejectionError(reason) { function listenForRejections() { setPromiseRejectCallback(promiseRejectHandler); } - module.exports = { hasRejectionToWarn, setHasRejectionToWarn, listenForRejections, - processPromiseRejections + processPromiseRejections, }; diff --git a/lib/internal/process/signal.js b/lib/internal/process/signal.js index abc2b93dbfb7f3..0631fe2b29ab01 100644 --- a/lib/internal/process/signal.js +++ b/lib/internal/process/signal.js @@ -1,7 +1,8 @@ 'use strict'; const { - Map, + FunctionPrototypeBind, + SafeMap, } = primordials; const { @@ -11,7 +12,7 @@ const { const { signals } = internalBinding('constants').os; let Signal; -const signalWraps = new Map(); +const signalWraps = new SafeMap(); function isSignal(event) { return typeof event === 'string' && signals[event] !== undefined; @@ -26,7 +27,7 @@ function startListeningIfSignal(type) { wrap.unref(); - wrap.onsignal = process.emit.bind(process, type, type); + wrap.onsignal = FunctionPrototypeBind(process.emit, process, type, type); const signum = signals[type]; const err = wrap.start(signum); diff --git a/lib/internal/process/warning.js b/lib/internal/process/warning.js index 2822ef22f1f05a..eafe8d2203ee6f 100644 --- a/lib/internal/process/warning.js +++ b/lib/internal/process/warning.js @@ -3,6 +3,8 @@ const { ArrayIsArray, Error, + ErrorPrototypeToString, + ErrorCaptureStackTrace, String, } = primordials; @@ -80,10 +82,10 @@ function onWarning(warning) { if (trace && warning.stack) { msg += `${warning.stack}`; } else { - const toString = + msg += typeof warning.toString === 'function' ? - warning.toString : Error.prototype.toString; - msg += `${toString.apply(warning)}`; + `${warning.toString()}` : + ErrorPrototypeToString(warning); } if (typeof warning.detail === 'string') { msg += `\n${warning.detail}`; @@ -162,8 +164,7 @@ function createWarningObject(warning, type, code, ctor, detail) { warning.name = String(type || 'Warning'); if (code !== undefined) warning.code = code; if (detail !== undefined) warning.detail = detail; - // eslint-disable-next-line no-restricted-syntax - Error.captureStackTrace(warning, ctor || process.emitWarning); + ErrorCaptureStackTrace(warning, ctor || process.emitWarning); return warning; } diff --git a/lib/internal/querystring.js b/lib/internal/querystring.js index ee589e1984294d..658faa93b6ad4d 100644 --- a/lib/internal/querystring.js +++ b/lib/internal/querystring.js @@ -2,15 +2,22 @@ const { Array, + Int8Array, + NumberPrototypeToString, + StringPrototypeCharCodeAt, + StringPrototypeSlice, + StringPrototypeToUpperCase, } = primordials; const { ERR_INVALID_URI } = require('internal/errors').codes; const hexTable = new Array(256); for (let i = 0; i < 256; ++i) - hexTable[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); + hexTable[i] = '%' + + StringPrototypeToUpperCase((i < 16 ? '0' : '') + + NumberPrototypeToString(i, 16)); -const isHexTable = [ +const isHexTable = new Int8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 32 - 47 @@ -27,7 +34,7 @@ const isHexTable = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // ... 256 -]; +]); function encodeStr(str, noEscapeTable, hexTable) { const len = str.length; @@ -40,13 +47,13 @@ function encodeStr(str, noEscapeTable, hexTable) { outer: for (; i < len; i++) { - let c = str.charCodeAt(i); + let c = StringPrototypeCharCodeAt(str, i); // ASCII while (c < 0x80) { if (noEscapeTable[c] !== 1) { if (lastPos < i) - out += str.slice(lastPos, i); + out += StringPrototypeSlice(str, lastPos, i); lastPos = i + 1; out += hexTable[c]; } @@ -54,11 +61,11 @@ function encodeStr(str, noEscapeTable, hexTable) { if (++i === len) break outer; - c = str.charCodeAt(i); + c = StringPrototypeCharCodeAt(str, i); } if (lastPos < i) - out += str.slice(lastPos, i); + out += StringPrototypeSlice(str, lastPos, i); // Multi-byte characters ... if (c < 0x800) { @@ -83,7 +90,7 @@ function encodeStr(str, noEscapeTable, hexTable) { if (i >= len) throw new ERR_INVALID_URI(); - const c2 = str.charCodeAt(i) & 0x3FF; + const c2 = StringPrototypeCharCodeAt(str, i) & 0x3FF; lastPos = i + 1; c = 0x10000 + (((c & 0x3FF) << 10) | c2); @@ -95,7 +102,7 @@ function encodeStr(str, noEscapeTable, hexTable) { if (lastPos === 0) return str; if (lastPos < len) - return out + str.slice(lastPos); + return out + StringPrototypeSlice(str, lastPos); return out; } diff --git a/lib/internal/quic/core.js b/lib/internal/quic/core.js index 2df63c2be67cdf..0c326872a7a2ea 100644 --- a/lib/internal/quic/core.js +++ b/lib/internal/quic/core.js @@ -10,18 +10,26 @@ const { assertCrypto(); const { - Array, + ArrayFrom, + ArrayPrototypePush, BigInt64Array, Boolean, Error, + FunctionPrototypeBind, + FunctionPrototypeCall, Map, Number, Promise, PromiseAll, + PromisePrototypeThen, + PromisePrototypeCatch, + PromisePrototypeFinally, PromiseReject, PromiseResolve, - Set, + ReflectApply, + SafeSet, Symbol, + SymbolFor, } = primordials; const { Buffer } = require('buffer'); @@ -196,6 +204,7 @@ const { } = require('internal/histogram'); const { + validateAbortSignal, validateBoolean, validateInteger, validateObject, @@ -242,7 +251,7 @@ const kUsePreferredAddress = Symbol('kUsePreferredAddress'); const kVersionNegotiation = Symbol('kVersionNegotiation'); const kWriteGeneric = Symbol('kWriteGeneric'); -const kRejections = Symbol.for('nodejs.rejection'); +const kRejections = SymbolFor('nodejs.rejection'); const kSocketUnbound = 0; const kSocketPending = 1; @@ -301,13 +310,15 @@ function onSessionClose(code, family, silent, statelessReset) { // being requested. It is only called if the 'clientHelloHandler' option is // specified on listen(). function onSessionClientHello(alpn, servername, ciphers) { - this[owner_symbol][kClientHello](alpn, servername, ciphers) - .then((context) => { + PromisePrototypeThen( + this[owner_symbol][kClientHello](alpn, servername, ciphers), + (context) => { if (context !== undefined && !context?.context) throw new ERR_INVALID_ARG_TYPE('context', 'SecureContext', context); this.onClientHelloDone(context?.context); - }) - .catch((error) => this[owner_symbol].destroy(error)); + }, + (error) => this[owner_symbol].destroy(error) + ); } // This callback is only ever invoked for QuicServerSession instances, @@ -315,8 +326,9 @@ function onSessionClientHello(alpn, servername, ciphers) { // user callback must invoke .onCertDone() in order for the // TLS handshake to continue. function onSessionCert(servername) { - this[owner_symbol][kHandleOcsp](servername) - .then((data) => { + PromisePrototypeThen( + this[owner_symbol][kHandleOcsp](servername), + (data) => { if (data !== undefined) { if (typeof data === 'string') data = Buffer.from(data); @@ -328,8 +340,9 @@ function onSessionCert(servername) { } } this.onCertDone(data); - }) - .catch((error) => this[owner_symbol].destroy(error)); + }, + (error) => this[owner_symbol].destroy(error) + ); } // This callback is only ever invoked for QuicClientSession instances, @@ -337,8 +350,10 @@ function onSessionCert(servername) { // If the requestOCSP configuration option is false, this will never // be called. function onSessionStatus(data) { - this[owner_symbol][kHandleOcsp](data) - .catch((error) => this[owner_symbol].destroy(error)); + PromisePrototypeCatch( + this[owner_symbol][kHandleOcsp](data), + (error) => this[owner_symbol].destroy(error) + ); } // Called by the C++ internals when the TLS handshake is completed. @@ -368,12 +383,13 @@ function onSessionHandshake( // resumption and 0RTT. function onSessionTicket(sessionTicket, transportParams) { if (this[owner_symbol]) { - process.nextTick( - emit.bind( - this[owner_symbol], - 'sessionTicket', - sessionTicket, - transportParams)); + process.nextTick(FunctionPrototypeBind( + emit, + this[owner_symbol], + 'sessionTicket', + sessionTicket, + transportParams + )); } } @@ -383,13 +399,14 @@ function onSessionTicket(sessionTicket, transportParams) { function onSessionPathValidation(res, local, remote) { const session = this[owner_symbol]; if (session) { - process.nextTick( - emit.bind( - session, - 'pathValidation', - res === NGTCP2_PATH_VALIDATION_RESULT_FAILURE ? 'failure' : 'success', - local, - remote)); + process.nextTick(FunctionPrototypeBind( + emit, + session, + 'pathValidation', + res === NGTCP2_PATH_VALIDATION_RESULT_FAILURE ? 'failure' : 'success', + local, + remote + )); } } @@ -485,7 +502,7 @@ function onStreamHeaders(id, headers, kind, push_id) { // When a stream is flow control blocked, causes a blocked event // to be emitted. This is a purely informational event. function onStreamBlocked() { - process.nextTick(emit.bind(this[owner_symbol], 'blocked')); + process.nextTick(FunctionPrototypeBind(emit, this[owner_symbol], 'blocked')); } // Register the callbacks with the QUIC internal binding. @@ -542,14 +559,17 @@ function addressOrLocalhost(address, type) { } function deferredClosePromise(state) { - return state.closePromise = new Promise((resolve, reject) => { - state.closePromiseResolve = resolve; - state.closePromiseReject = reject; - }).finally(() => { - state.closePromise = undefined; - state.closePromiseResolve = undefined; - state.closePromiseReject = undefined; - }); + return state.closePromise = PromisePrototypeFinally( + new Promise((resolve, reject) => { + state.closePromiseResolve = resolve; + state.closePromiseReject = reject; + }), + () => { + state.closePromise = undefined; + state.closePromiseResolve = undefined; + state.closePromiseReject = undefined; + } + ); } async function resolvePreferredAddress(lookup, preferredAddress) { @@ -639,7 +659,7 @@ class QuicEndpoint { if (state.bindPromise !== undefined) return state.bindPromise; - return state.bindPromise = this[kBind]().finally(() => { + return state.bindPromise = PromisePrototypeFinally(this[kBind](), () => { state.bindPromise = undefined; }); } @@ -661,8 +681,7 @@ class QuicEndpoint { return this.address; const { signal } = { ...options }; - if (signal != null && !('aborted' in signal)) - throw new ERR_INVALID_ARG_TYPE('options.signal', 'AbortSignal', signal); + validateAbortSignal(signal, 'options.signal'); // If an AbortSignal was passed in, check to make sure it is not already // aborted before we continue on to do any work. @@ -898,7 +917,7 @@ class QuicSocket extends EventEmitter { closePromiseResolve: undefined, closePromiseReject: undefined, defaultEncoding: undefined, - endpoints: new Set(), + endpoints: new SafeSet(), highWaterMark: undefined, listenPending: false, listenPromise: undefined, @@ -907,7 +926,7 @@ class QuicSocket extends EventEmitter { clientHelloHandler: undefined, server: undefined, serverSecureContext: undefined, - sessions: new Set(), + sessions: new SafeSet(), state: kSocketUnbound, sharedState: undefined, stats: undefined, @@ -1020,7 +1039,7 @@ class QuicSocket extends EventEmitter { const state = this[kInternalState]; return customInspect(this, { endpoints: this.endpoints, - sessions: Array.from(state.sessions), + sessions: ArrayFrom(state.sessions), bound: this.bound, pending: this.pending, closing: this.closing, @@ -1047,9 +1066,12 @@ class QuicSocket extends EventEmitter { if (state.bindPromise !== undefined) return state.bindPromise; - return state.bindPromise = this[kBind](options).finally(() => { - state.bindPromise = undefined; - }); + return state.bindPromise = PromisePrototypeFinally( + this[kBind](options), + () => { + state.bindPromise = undefined; + } + ); } async [kBind](options) { @@ -1061,8 +1083,7 @@ class QuicSocket extends EventEmitter { return; const { signal } = { ...options }; - if (signal != null && !('aborted' in signal)) - throw new ERR_INVALID_ARG_TYPE('options.signal', 'AbortSignal', signal); + validateAbortSignal(signal, 'options.signal'); // If an AbotSignal was passed in, check to make sure it is not already // aborted before we continue on to do any work. @@ -1073,7 +1094,7 @@ class QuicSocket extends EventEmitter { const binds = []; for (const endpoint of state.endpoints) - binds.push(endpoint.bind({ signal })); + ArrayPrototypePush(binds, endpoint.bind({ signal })); await PromiseAll(binds); @@ -1168,9 +1189,12 @@ class QuicSocket extends EventEmitter { if (state.listenPromise !== undefined) return state.listenPromise; - return state.listenPromise = this[kListen](options).finally(() => { - state.listenPromise = undefined; - }); + return state.listenPromise = PromisePrototypeFinally( + this[kListen](options), + () => { + state.listenPromise = undefined; + } + ); } async [kListen](options) { @@ -1387,8 +1411,9 @@ class QuicSocket extends EventEmitter { // Otherwise, loop through each of the known sessions and close them. const reqs = [promise]; for (const session of state.sessions) { - reqs.push(session.close() - .catch((error) => this.destroy(error))); + ArrayPrototypePush(reqs, + PromisePrototypeCatch(session.close(), + (error) => this.destroy(error))); } return PromiseAll(reqs); } @@ -1440,11 +1465,11 @@ class QuicSocket extends EventEmitter { if (error) { if (typeof state.closePromiseReject === 'function') state.closePromiseReject(error); - process.nextTick(emit.bind(this, 'error', error)); + process.nextTick(FunctionPrototypeBind(emit, this, 'error', error)); } else if (typeof state.closePromiseResolve === 'function') { state.closePromiseResolve(); } - process.nextTick(emit.bind(this, 'close')); + process.nextTick(FunctionPrototypeBind(emit, this, 'close')); } ref() { @@ -1470,7 +1495,7 @@ class QuicSocket extends EventEmitter { } get endpoints() { - return Array.from(this[kInternalState].endpoints); + return ArrayFrom(this[kInternalState].endpoints); } get serverSecureContext() { @@ -1713,14 +1738,17 @@ class QuicSession extends EventEmitter { if (state.handshakeCompletePromise !== undefined) return state.handshakeCompletePromise; - state.handshakeCompletePromise = new Promise((resolve, reject) => { - state.handshakeCompletePromiseResolve = resolve; - state.handshakeCompletePromiseReject = reject; - }).finally(() => { - state.handshakeCompletePromise = undefined; - state.handshakeCompletePromiseReject = undefined; - state.handshakeCompletePromiseResolve = undefined; - }); + state.handshakeCompletePromise = PromisePrototypeFinally( + new Promise((resolve, reject) => { + state.handshakeCompletePromiseResolve = resolve; + state.handshakeCompletePromiseReject = reject; + }), + () => { + state.handshakeCompletePromise = undefined; + state.handshakeCompletePromiseReject = undefined; + state.handshakeCompletePromiseResolve = undefined; + } + ); return state.handshakeCompletePromise; } @@ -1984,7 +2012,7 @@ class QuicSession extends EventEmitter { if (error) { if (typeof state.closePromiseReject === 'function') state.closePromiseReject(error); - process.nextTick(emit.bind(this, 'error', error)); + process.nextTick(FunctionPrototypeBind(emit, this, 'error', error)); } else if (typeof state.closePromiseResolve === 'function') state.closePromiseResolve(); @@ -1993,7 +2021,7 @@ class QuicSession extends EventEmitter { new ERR_OPERATION_FAILED('Handshake failed')); } - process.nextTick(emit.bind(this, 'close')); + process.nextTick(FunctionPrototypeBind(emit, this, 'close')); } // For server QuicSession instances, true if earlyData is @@ -2697,7 +2725,7 @@ class QuicStream extends Duplex { default: assert.fail('Invalid headers kind'); } - process.nextTick(emit.bind(this, name, headers, push_id)); + process.nextTick(FunctionPrototypeBind(emit, this, name, headers, push_id)); } [kAfterAsyncWrite]({ bytes }) { @@ -2808,7 +2836,7 @@ class QuicStream extends Duplex { if (!this.destroyed) { if (!this.detached) this[kInternalState].sharedState.writeEnded = true; - super.end.apply(this, args); + ReflectApply(super.end, this, args); } return this; } @@ -2824,13 +2852,14 @@ class QuicStream extends Duplex { state.didRead = true; } - streamOnResume.call(this); + FunctionPrototypeCall(streamOnResume, this); } sendFile(path, options = {}) { if (this.detached) throw new ERR_INVALID_STATE('Unable to send file'); - fs.open(path, 'r', QuicStream[kOnFileOpened].bind(this, options)); + fs.open(path, 'r', + FunctionPrototypeBind(QuicStream[kOnFileOpened], this, options)); } static [kOnFileOpened](options, err, fd) { @@ -2846,7 +2875,7 @@ class QuicStream extends Duplex { } if (this.destroyed || this.closed) { - fs.close(fd, (err) => { if (err) throw err; }); + fs.close(fd, assert.ifError); return; } @@ -2894,7 +2923,8 @@ class QuicStream extends Duplex { static [kOnFileUnpipe]() { // Called on the StreamPipe instance. const stream = this.sink[owner_symbol]; if (stream.ownsFd) - this.source.close().catch(stream.destroy.bind(stream)); + PromisePrototypeCatch(this.source.close(), + FunctionPrototypeBind(stream.destroy, stream)); else this.source.releaseFD(); stream.end(); diff --git a/lib/internal/readline/utils.js b/lib/internal/readline/utils.js index 408d12d01e151d..55b3e07b4c1782 100644 --- a/lib/internal/readline/utils.js +++ b/lib/internal/readline/utils.js @@ -1,7 +1,15 @@ 'use strict'; const { - String, + ArrayPrototypeSlice, + ArrayPrototypeSort, + RegExpPrototypeTest, + StringFromCharCode, + StringPrototypeCharCodeAt, + StringPrototypeCodePointAt, + StringPrototypeMatch, + StringPrototypeSlice, + StringPrototypeToLowerCase, Symbol, } = primordials; @@ -32,8 +40,9 @@ CSI.kClearScreenDown = CSI`0J`; function charLengthLeft(str, i) { if (i <= 0) return 0; - if ((i > 1 && str.codePointAt(i - 2) >= kUTF16SurrogateThreshold) || - str.codePointAt(i - 1) >= kUTF16SurrogateThreshold) { + if ((i > 1 && + StringPrototypeCodePointAt(str, i - 2) >= kUTF16SurrogateThreshold) || + StringPrototypeCodePointAt(str, i - 1) >= kUTF16SurrogateThreshold) { return 2; } return 1; @@ -45,7 +54,7 @@ function charLengthAt(str, i) { // moving to the right. return 1; } - return str.codePointAt(i) >= kUTF16SurrogateThreshold ? 2 : 1; + return StringPrototypeCodePointAt(str, i) >= kUTF16SurrogateThreshold ? 2 : 1; } /* @@ -178,13 +187,15 @@ function* emitKeys(stream) { * We buffered enough data, now trying to extract code * and modifier from it */ - const cmd = s.slice(cmdStart); + const cmd = StringPrototypeSlice(s, cmdStart); let match; - if ((match = cmd.match(/^(\d\d?)(;(\d))?([~^$])$/))) { + if ((match = StringPrototypeMatch(cmd, /^(\d\d?)(;(\d))?([~^$])$/))) { code += match[1] + match[4]; modifier = (match[3] || 1) - 1; - } else if ((match = cmd.match(/^((\d;)?(\d))?([A-Za-z])$/))) { + } else if ( + (match = StringPrototypeMatch(cmd, /^((\d;)?(\d))?([A-Za-z])$/)) + ) { code += match[4]; modifier = (match[3] || 1) - 1; } else { @@ -325,12 +336,14 @@ function* emitKeys(stream) { key.meta = escaped; } else if (!escaped && ch <= '\x1a') { // ctrl+letter - key.name = String.fromCharCode(ch.charCodeAt(0) + 'a'.charCodeAt(0) - 1); + key.name = StringFromCharCode( + StringPrototypeCharCodeAt(ch) + StringPrototypeCharCodeAt('a') - 1 + ); key.ctrl = true; - } else if (/^[0-9A-Za-z]$/.test(ch)) { + } else if (RegExpPrototypeTest(/^[0-9A-Za-z]$/, ch)) { // Letter, number, shift+letter - key.name = ch.toLowerCase(); - key.shift = /^[A-Z]$/.test(ch); + key.name = StringPrototypeToLowerCase(ch); + key.shift = RegExpPrototypeTest(/^[A-Z]$/, ch); key.meta = escaped; } else if (escaped) { // Escape sequence timeout @@ -356,12 +369,12 @@ function commonPrefix(strings) { if (strings.length === 1) { return strings[0]; } - const sorted = strings.slice().sort(); + const sorted = ArrayPrototypeSort(ArrayPrototypeSlice(strings)); const min = sorted[0]; const max = sorted[sorted.length - 1]; for (let i = 0; i < min.length; i++) { if (min[i] !== max[i]) { - return min.slice(0, i); + return StringPrototypeSlice(min, 0, i); } } return min; diff --git a/lib/internal/repl/await.js b/lib/internal/repl/await.js index b437221ca22e77..8dc1f5de4c7ee6 100644 --- a/lib/internal/repl/await.js +++ b/lib/internal/repl/await.js @@ -1,6 +1,11 @@ 'use strict'; const { + ArrayFrom, + ArrayPrototypeJoin, + ArrayPrototypePop, + ArrayPrototypePush, + FunctionPrototype, ObjectKeys, } = primordials; @@ -10,19 +15,16 @@ const privateMethods = require('internal/deps/acorn-plugins/acorn-private-methods/index'); const classFields = require('internal/deps/acorn-plugins/acorn-class-fields/index'); -const numericSeparator = - require('internal/deps/acorn-plugins/acorn-numeric-separator/index'); const staticClassFeatures = require('internal/deps/acorn-plugins/acorn-static-class-features/index'); const parser = acorn.Parser.extend( privateMethods, classFields, - numericSeparator, staticClassFeatures ); -const noop = () => {}; +const noop = FunctionPrototype; const visitorsWithoutAncestors = { ClassDeclaration(node, state, c) { if (state.ancestors[state.ancestors.length - 2] === state.body) { @@ -79,21 +81,21 @@ for (const nodeType of ObjectKeys(walk.base)) { visitors[nodeType] = (node, state, c) => { const isNew = node !== state.ancestors[state.ancestors.length - 1]; if (isNew) { - state.ancestors.push(node); + ArrayPrototypePush(state.ancestors, node); } callback(node, state, c); if (isNew) { - state.ancestors.pop(); + ArrayPrototypePop(state.ancestors); } }; } function processTopLevelAwait(src) { const wrapped = `(async () => { ${src} })()`; - const wrappedArray = wrapped.split(''); + const wrappedArray = ArrayFrom(wrapped); let root; try { - root = parser.parse(wrapped, { ecmaVersion: 11 }); + root = parser.parse(wrapped, { ecmaVersion: 'latest' }); } catch { return null; } @@ -145,7 +147,7 @@ function processTopLevelAwait(src) { state.append(last.expression, ')'); } - return wrappedArray.join(''); + return ArrayPrototypeJoin(wrappedArray, ''); } module.exports = { diff --git a/lib/internal/repl/history.js b/lib/internal/repl/history.js index 5188af947581b4..74ef94e81070dc 100644 --- a/lib/internal/repl/history.js +++ b/lib/internal/repl/history.js @@ -1,7 +1,11 @@ 'use strict'; const { + ArrayPrototypeJoin, Boolean, + FunctionPrototype, + StringPrototypeSplit, + StringPrototypeTrim, } = primordials; const { Interface } = require('readline'); @@ -13,6 +17,8 @@ let debug = require('internal/util/debuglog').debuglog('repl', (fn) => { }); const { clearTimeout, setTimeout } = require('timers'); +const noop = FunctionPrototype; + // XXX(chrisdickinson): The 15ms debounce value is somewhat arbitrary. // The debounce is to guard against code pasted into the REPL. const kDebounceHistoryMS = 15; @@ -27,7 +33,7 @@ function _writeToOutput(repl, message) { function setupHistory(repl, historyPath, ready) { // Empty string disables persistent history if (typeof historyPath === 'string') - historyPath = historyPath.trim(); + historyPath = StringPrototypeTrim(historyPath); if (historyPath === '') { repl._historyPrev = _replHistoryMessage; @@ -84,7 +90,7 @@ function setupHistory(repl, historyPath, ready) { } if (data) { - repl.history = data.split(/[\n\r]+/, repl.historySize); + repl.history = StringPrototypeSplit(data, /[\n\r]+/, repl.historySize); } else { repl.history = []; } @@ -128,7 +134,7 @@ function setupHistory(repl, historyPath, ready) { return; } writing = true; - const historyData = repl.history.join(os.EOL); + const historyData = ArrayPrototypeJoin(repl.history, os.EOL); fs.write(repl._historyHandle, historyData, 0, 'utf8', onwritten); } @@ -151,7 +157,7 @@ function setupHistory(repl, historyPath, ready) { return; } repl.off('line', online); - fs.close(repl._historyHandle, () => {}); + fs.close(repl._historyHandle, noop); } } diff --git a/lib/internal/repl/utils.js b/lib/internal/repl/utils.js index 9ce243a0bca3a5..594b6a0c4485c7 100644 --- a/lib/internal/repl/utils.js +++ b/lib/internal/repl/utils.js @@ -1,8 +1,23 @@ 'use strict'; const { + ArrayPrototypeFilter, + ArrayPrototypeIncludes, + ArrayPrototypeMap, + Boolean, + FunctionPrototypeBind, MathMin, - Set, + RegExpPrototypeTest, + SafeSet, + SafeStringIterator, + StringPrototypeEndsWith, + StringPrototypeIndexOf, + StringPrototypeLastIndexOf, + StringPrototypeReplace, + StringPrototypeSlice, + StringPrototypeStartsWith, + StringPrototypeToLowerCase, + StringPrototypeTrim, Symbol, } = primordials; @@ -12,8 +27,6 @@ const privateMethods = require('internal/deps/acorn-plugins/acorn-private-methods/index'); const classFields = require('internal/deps/acorn-plugins/acorn-class-fields/index'); -const numericSeparator = - require('internal/deps/acorn-plugins/acorn-numeric-separator/index'); const staticClassFeatures = require('internal/deps/acorn-plugins/acorn-static-class-features/index'); @@ -61,7 +74,9 @@ function isRecoverableError(e, code) { // curly brace with parenthesis. Note: only the open parenthesis is added // here as the point is to test for potentially valid but incomplete // expressions. - if (/^\s*\{/.test(code) && isRecoverableError(e, `(${code}`)) return true; + if (RegExpPrototypeTest(/^\s*\{/, code) && + isRecoverableError(e, `(${code}`)) + return true; let recoverable = false; @@ -85,7 +100,6 @@ function isRecoverableError(e, code) { .extend( privateMethods, classFields, - numericSeparator, staticClassFeatures, (Parser) => { return class extends Parser { @@ -102,9 +116,11 @@ function isRecoverableError(e, code) { break; case 'Unterminated string constant': - const token = this.input.slice(this.lastTokStart, this.pos); + const token = StringPrototypeSlice(this.input, + this.lastTokStart, this.pos); // See https://www.ecma-international.org/ecma-262/#sec-line-terminators - if (/\\(?:\r\n?|\n|\u2028|\u2029)$/.test(token)) { + if (RegExpPrototypeTest(/\\(?:\r\n?|\n|\u2028|\u2029)$/, + token)) { recoverable = true; } } @@ -117,7 +133,7 @@ function isRecoverableError(e, code) { // Try to parse the code with acorn. If the parse fails, ignore the acorn // error and return the recoverable status. try { - RecoverableParser.parse(code, { ecmaVersion: 11 }); + RecoverableParser.parse(code, { ecmaVersion: 'latest' }); // Odd case: the underlying JS engine (V8, Chakra) rejected this input // but Acorn detected no issue. Presume that additional text won't @@ -147,7 +163,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { let escaped = null; function getPreviewPos() { - const displayPos = repl._getDisplayPos(`${repl._prompt}${repl.line}`); + const displayPos = repl._getDisplayPos(`${repl.getPrompt()}${repl.line}`); const cursorPos = repl.line.length !== repl.cursor ? repl.getCursorPos() : displayPos; @@ -180,7 +196,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { rows = pos.displayPos.rows - pos.cursorPos.rows; moveCursor(repl.output, 0, rows); } - const totalLine = `${repl._prompt}${repl.line}${completionPreview}`; + const totalLine = `${repl.getPrompt()}${repl.line}${completionPreview}`; const newPos = repl._getDisplayPos(totalLine); // Minimize work for the terminal. It is enough to clear the right part of // the current line in case the preview is visible on a single line. @@ -238,7 +254,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { hasCompletions = true; // If there is a common prefix to all matches, then apply that portion. - const completions = rawCompletions.filter((e) => e); + const completions = ArrayPrototypeFilter(rawCompletions, Boolean); const prefix = commonPrefix(completions); // No common prefix found. @@ -246,7 +262,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { return; } - const suffix = prefix.slice(completeOn.length); + const suffix = StringPrototypeSlice(prefix, completeOn.length); if (insertPreview) { repl._insertString(suffix); @@ -266,7 +282,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { } repl.output.write(result); cursorTo(repl.output, cursorPos.cols); - const totalLine = `${repl._prompt}${repl.line}${suffix}`; + const totalLine = `${repl.getPrompt()}${repl.line}${suffix}`; const newPos = repl._getDisplayPos(totalLine); const rows = newPos.rows - cursorPos.rows - (newPos.cols === 0 ? 1 : 0); moveCursor(repl.output, 0, -rows); @@ -274,16 +290,22 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { } function isInStrictMode(repl) { - return repl.replMode === REPL_MODE_STRICT || process.execArgv - .map((e) => e.toLowerCase().replace(/_/g, '-')) - .includes('--use-strict'); + return repl.replMode === REPL_MODE_STRICT || ArrayPrototypeIncludes( + ArrayPrototypeMap(process.execArgv, + (e) => StringPrototypeReplace( + StringPrototypeToLowerCase(e), + /_/g, + '-' + )), + '--use-strict'); } // This returns a code preview for arbitrary input code. function getInputPreview(input, callback) { // For similar reasons as `defaultEval`, wrap expressions starting with a // curly brace with parenthesis. - if (input.startsWith('{') && !input.endsWith(';') && !wrapped) { + if (StringPrototypeStartsWith(input, '{') && + !StringPrototypeEndsWith(input, ';') && !wrapped) { input = `(${input})`; wrapped = true; } @@ -349,7 +371,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { return; } - const line = repl.line.trim(); + const line = StringPrototypeTrim(repl.line); // Do not preview in case the line only contains whitespace. if (line === '') { @@ -404,7 +426,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { getStringWidth(inspected) > maxColumns) { maxColumns -= 4 + (repl.useColors ? 0 : 3); let res = ''; - for (const char of inspected) { + for (const char of new SafeStringIterator(inspected)) { maxColumns -= getStringWidth(char); if (maxColumns < 0) break; @@ -415,9 +437,9 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { // Line breaks are very rare and probably only occur in case of error // messages with line breaks. - const lineBreakPos = inspected.indexOf('\n'); + const lineBreakPos = StringPrototypeIndexOf(inspected, '\n'); if (lineBreakPos !== -1) { - inspected = `${inspected.slice(0, lineBreakPos)}`; + inspected = `${StringPrototypeSlice(inspected, 0, lineBreakPos)}`; } const result = repl.useColors ? @@ -455,7 +477,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { // Refresh prints the whole screen again and the preview will be removed // during that procedure. Print the preview again. This also makes sure // the preview is always correct after resizing the terminal window. - const originalRefresh = repl._refreshLine.bind(repl); + const originalRefresh = FunctionPrototypeBind(repl._refreshLine, repl); repl._refreshLine = () => { inputPreview = null; originalRefresh(); @@ -465,7 +487,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { let insertCompletionPreview = true; // Insert the longest common suffix of the current input in case the user // moves to the right while already being at the current input end. - const originalMoveCursor = repl._moveCursor.bind(repl); + const originalMoveCursor = FunctionPrototypeBind(repl._moveCursor, repl); repl._moveCursor = (dx) => { const currentCursor = repl.cursor; originalMoveCursor(dx); @@ -479,7 +501,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { // This is the only function that interferes with the completion insertion. // Monkey patch it to prevent inserting the completion when it shouldn't be. - const originalClearLine = repl.clearLine.bind(repl); + const originalClearLine = FunctionPrototypeBind(repl.clearLine, repl); repl.clearLine = () => { insertCompletionPreview = false; originalClearLine(); @@ -495,7 +517,7 @@ function setupReverseSearch(repl) { return { reverseSearch() { return false; } }; } - const alreadyMatched = new Set(); + const alreadyMatched = new SafeSet(); const labels = { r: 'bck-i-search: ', s: 'fwd-i-search: ' @@ -559,9 +581,9 @@ function setupReverseSearch(repl) { if (cursor === -1) { cursor = entry.length; } - cursor = entry.lastIndexOf(input, cursor - 1); + cursor = StringPrototypeLastIndexOf(entry, input, cursor - 1); } else { - cursor = entry.indexOf(input, cursor + 1); + cursor = StringPrototypeIndexOf(entry, input, cursor + 1); } // Match not found. if (cursor === -1) { @@ -569,8 +591,8 @@ function setupReverseSearch(repl) { // Match found. } else { if (repl.useColors) { - const start = entry.slice(0, cursor); - const end = entry.slice(cursor + input.length); + const start = StringPrototypeSlice(entry, 0, cursor); + const end = StringPrototypeSlice(entry, cursor + input.length); entry = `${start}\x1B[4m${input}\x1B[24m${end}`; } print(entry, `${labels[dir]}${input}_`, cursor); @@ -613,8 +635,8 @@ function setupReverseSearch(repl) { // tick end instead of after each operation. let rows = 0; if (lastMatch !== -1) { - const line = repl.history[lastMatch].slice(0, lastCursor); - rows = repl._getDisplayPos(`${repl._prompt}${line}`).rows; + const line = StringPrototypeSlice(repl.history[lastMatch], 0, lastCursor); + rows = repl._getDisplayPos(`${repl.getPrompt()}${line}`).rows; cursorTo(repl.output, promptPos.cols); } else if (isInReverseSearch && repl.line !== '') { rows = repl.getCursorPos().rows; @@ -634,8 +656,8 @@ function setupReverseSearch(repl) { // To know exactly how many rows we have to move the cursor back we need the // cursor rows, the output rows and the input rows. - const prompt = repl._prompt; - const cursorLine = `${prompt}${outputLine.slice(0, cursor)}`; + const prompt = repl.getPrompt(); + const cursorLine = prompt + StringPrototypeSlice(outputLine, 0, cursor); const cursorPos = repl._getDisplayPos(cursorLine); const outputPos = repl._getDisplayPos(`${prompt}${outputLine}`); const inputPos = repl._getDisplayPos(inputLine); @@ -685,7 +707,7 @@ function setupReverseSearch(repl) { if (!isInReverseSearch) { if (key.ctrl && checkAndSetDirectionKey(key.name)) { historyIndex = repl.historyIndex; - promptPos = repl._getDisplayPos(`${repl._prompt}`); + promptPos = repl._getDisplayPos(`${repl.getPrompt()}`); print(repl.line, `${labels[dir]}_`); isInReverseSearch = true; } @@ -693,7 +715,7 @@ function setupReverseSearch(repl) { search(); } else if (key.name === 'backspace' || (key.ctrl && (key.name === 'h' || key.name === 'w'))) { - reset(input.slice(0, input.length - 1)); + reset(StringPrototypeSlice(input, 0, input.length - 1)); search(); // Special handle + c and escape. Those should only cancel the // reverse search. The original line is visible afterwards again. diff --git a/lib/internal/source_map/prepare_stack_trace.js b/lib/internal/source_map/prepare_stack_trace.js index 23e117b677b74a..c32f9780c2fb3f 100644 --- a/lib/internal/source_map/prepare_stack_trace.js +++ b/lib/internal/source_map/prepare_stack_trace.js @@ -1,7 +1,15 @@ 'use strict'; const { - Error, + ArrayPrototypeIndexOf, + ArrayPrototypeJoin, + ArrayPrototypeMap, + ErrorPrototypeToString, + StringPrototypeRepeat, + StringPrototypeSlice, + StringPrototypeSplit, + StringPrototypeStartsWith, + SafeStringIterator, } = primordials; let debug = require('internal/util/debuglog').debuglog('source_map', (fn) => { @@ -15,10 +23,10 @@ const { overrideStackTrace, maybeOverridePrepareStackTrace } = require('internal/errors'); +const { fileURLToPath } = require('internal/url'); // Create a prettified stacktrace, inserting context from source maps // if possible. -const ErrorToString = Error.prototype.toString; // Capture original toString. const prepareStackTrace = (globalThis, error, trace) => { // API for node internals to override error stack formatting // without interfering with userland code. @@ -33,87 +41,146 @@ const prepareStackTrace = (globalThis, error, trace) => { maybeOverridePrepareStackTrace(globalThis, error, trace); if (globalOverride !== kNoOverride) return globalOverride; - const errorString = ErrorToString.call(error); + const errorString = ErrorPrototypeToString(error); if (trace.length === 0) { return errorString; } let errorSource = ''; - let firstSource; - let firstLine; - let firstColumn; - const preparedTrace = trace.map((t, i) => { - if (i === 0) { - firstLine = t.getLineNumber(); - firstColumn = t.getColumnNumber(); - firstSource = t.getFileName(); - } + let lastSourceMap; + let lastFileName; + const preparedTrace = ArrayPrototypeJoin(ArrayPrototypeMap(trace, (t, i) => { let str = i !== 0 ? '\n at ' : ''; str = `${str}${t}`; try { - const sm = findSourceMap(t.getFileName(), error); + // A stack trace will often have several call sites in a row within the + // same file, cache the source map and file content accordingly: + const fileName = t.getFileName(); + const sm = fileName === lastFileName ? + lastSourceMap : + findSourceMap(fileName); + lastSourceMap = sm; + lastFileName = fileName; if (sm) { - // Source Map V3 lines/columns use zero-based offsets whereas, in - // stack traces, they start at 1/1. + // Source Map V3 lines/columns start at 0/0 whereas stack traces + // start at 1/1: const { originalLine, originalColumn, - originalSource + originalSource, } = sm.findEntry(t.getLineNumber() - 1, t.getColumnNumber() - 1); if (originalSource && originalLine !== undefined && originalColumn !== undefined) { - const originalSourceNoScheme = originalSource - .replace(/^file:\/\//, ''); + const name = getOriginalSymbolName(sm, trace, i); if (i === 0) { - firstLine = originalLine + 1; - firstColumn = originalColumn + 1; - firstSource = originalSourceNoScheme; - // Show error in original source context to help user pinpoint it: - errorSource = getErrorSource(firstSource, firstLine, firstColumn); + errorSource = getErrorSource( + sm, + originalSource, + originalLine, + originalColumn + ); } // Show both original and transpiled stack trace information: - str += `\n -> ${originalSourceNoScheme}:${originalLine + 1}:` + - `${originalColumn + 1}`; + const prefix = (name && name !== t.getFunctionName()) ? + `\n -> at ${name}` : + '\n ->'; + const originalSourceNoScheme = + StringPrototypeStartsWith(originalSource, 'file://') ? + fileURLToPath(originalSource) : originalSource; + str += `${prefix} (${originalSourceNoScheme}:${originalLine + 1}:` + + `${originalColumn + 1})`; } } } catch (err) { debug(err.stack); } return str; - }); - return `${errorSource}${errorString}\n at ${preparedTrace.join('')}`; + }), ''); + return `${errorSource}${errorString}\n at ${preparedTrace}`; }; +// Transpilers may have removed the original symbol name used in the stack +// trace, if possible restore it from the names field of the source map: +function getOriginalSymbolName(sourceMap, trace, curIndex) { + // First check for a symbol name associated with the enclosing function: + const enclosingEntry = sourceMap.findEntry( + trace[curIndex].getEnclosingLineNumber() - 1, + trace[curIndex].getEnclosingColumnNumber() - 1 + ); + if (enclosingEntry.name) return enclosingEntry.name; + // Fallback to using the symbol name attached to the next stack frame: + const currentFileName = trace[curIndex].getFileName(); + const nextCallSite = trace[curIndex + 1]; + if (nextCallSite && currentFileName === nextCallSite.getFileName()) { + const { name } = sourceMap.findEntry( + nextCallSite.getLineNumber() - 1, + nextCallSite.getColumnNumber() - 1 + ); + return name; + } +} + // Places a snippet of code from where the exception was originally thrown // above the stack trace. This logic is modeled after GetErrorSource in // node_errors.cc. -function getErrorSource(firstSource, firstLine, firstColumn) { +function getErrorSource( + sourceMap, + originalSourcePath, + originalLine, + originalColumn +) { let exceptionLine = ''; - let source; - try { - source = readFileSync(firstSource, 'utf8'); - } catch (err) { - debug(err); - return exceptionLine; - } - const lines = source.split(/\r?\n/, firstLine); - const line = lines[firstLine - 1]; + const originalSourcePathNoScheme = + StringPrototypeStartsWith(originalSourcePath, 'file://') ? + fileURLToPath(originalSourcePath) : originalSourcePath; + const source = getOriginalSource( + sourceMap.payload, + originalSourcePathNoScheme + ); + const lines = StringPrototypeSplit(source, /\r?\n/, originalLine + 1); + const line = lines[originalLine]; if (!line) return exceptionLine; // Display ^ in appropriate position, regardless of whether tabs or // spaces are used: let prefix = ''; - for (const character of line.slice(0, firstColumn)) { + for (const character of new SafeStringIterator( + StringPrototypeSlice(line, 0, originalColumn + 1))) { prefix += (character === '\t') ? '\t' : - ' '.repeat(getStringWidth(character)); + StringPrototypeRepeat(' ', getStringWidth(character)); } - prefix = prefix.slice(0, -1); // The last character is the '^'. + prefix = StringPrototypeSlice(prefix, 0, -1); // The last character is '^'. - exceptionLine = `${firstSource}:${firstLine}\n${line}\n${prefix}^\n\n`; + exceptionLine = + `${originalSourcePathNoScheme}:${originalLine + 1}\n${line}\n${prefix}^\n\n`; return exceptionLine; } +function getOriginalSource(payload, originalSourcePath) { + let source; + const originalSourcePathNoScheme = + StringPrototypeStartsWith(originalSourcePath, 'file://') ? + fileURLToPath(originalSourcePath) : originalSourcePath; + const sourceContentIndex = + ArrayPrototypeIndexOf(payload.sources, originalSourcePath); + if (payload.sourcesContent?.[sourceContentIndex]) { + // First we check if the original source content was provided in the + // source map itself: + source = payload.sourcesContent[sourceContentIndex]; + } else { + // If no sourcesContent was found, attempt to load the original source + // from disk: + try { + source = readFileSync(originalSourcePathNoScheme, 'utf8'); + } catch (err) { + debug(err); + source = ''; + } + } + return source; +} + module.exports = { prepareStackTrace, }; diff --git a/lib/internal/source_map/source_map.js b/lib/internal/source_map/source_map.js index 7d21e02429a086..37912a2c9750bc 100644 --- a/lib/internal/source_map/source_map.js +++ b/lib/internal/source_map/source_map.js @@ -203,7 +203,8 @@ class SourceMap { generatedColumn: entry[1], originalSource: entry[2], originalLine: entry[3], - originalColumn: entry[4] + originalColumn: entry[4], + name: entry[5], }; } @@ -214,6 +215,7 @@ class SourceMap { let sourceIndex = 0; let sourceLineNumber = 0; let sourceColumnNumber = 0; + let nameIndex = 0; const sources = []; const originalToCanonicalURLMap = {}; @@ -229,7 +231,6 @@ class SourceMap { const stringCharIterator = new StringCharIterator(map.mappings); let sourceURL = sources[sourceIndex]; - while (true) { if (stringCharIterator.peek() === ',') stringCharIterator.next(); @@ -256,12 +257,15 @@ class SourceMap { } sourceLineNumber += decodeVLQ(stringCharIterator); sourceColumnNumber += decodeVLQ(stringCharIterator); - if (!isSeparator(stringCharIterator.peek())) - // Unused index into the names list. - decodeVLQ(stringCharIterator); + + let name; + if (!isSeparator(stringCharIterator.peek())) { + nameIndex += decodeVLQ(stringCharIterator); + name = map.names?.[nameIndex]; + } this.#mappings.push([lineNumber, columnNumber, sourceURL, - sourceLineNumber, sourceColumnNumber]); + sourceLineNumber, sourceColumnNumber, name]); } }; } diff --git a/lib/internal/source_map/source_map_cache.js b/lib/internal/source_map/source_map_cache.js index db7a19e275951c..b95653ebba84e9 100644 --- a/lib/internal/source_map/source_map_cache.js +++ b/lib/internal/source_map/source_map_cache.js @@ -1,20 +1,18 @@ 'use strict'; const { + ArrayPrototypeMap, JSONParse, ObjectCreate, ObjectKeys, ObjectGetOwnPropertyDescriptor, ObjectPrototypeHasOwnProperty, - Map, - MapPrototypeEntries, - WeakMap, - WeakMapPrototypeGet, - uncurryThis, + RegExpPrototypeTest, + SafeMap, + StringPrototypeMatch, + StringPrototypeSplit, } = primordials; -const MapIteratorNext = uncurryThis(MapPrototypeEntries(new Map()).next); - function ObjectGetValueSafe(obj, key) { const desc = ObjectGetOwnPropertyDescriptor(obj, key); return ObjectPrototypeHasOwnProperty(desc, 'value') ? desc.value : undefined; @@ -25,20 +23,19 @@ const { Buffer } = require('buffer'); let debug = require('internal/util/debuglog').debuglog('source_map', (fn) => { debug = fn; }); -const { dirname, resolve } = require('path'); const fs = require('fs'); const { getOptionValue } = require('internal/options'); +const { IterableWeakMap } = require('internal/util/iterable_weak_map'); const { normalizeReferrerURL, } = require('internal/modules/cjs/helpers'); -// For cjs, since Module._cache is exposed to users, we use a WeakMap -// keyed on module, facilitating garbage collection. -const cjsSourceMapCache = new WeakMap(); -// The esm cache is not exposed to users, so we can use a Map keyed -// on filenames. -const esmSourceMapCache = new Map(); -const { fileURLToPath, URL } = require('url'); -let Module; +// Since the CJS module cache is mutable, which leads to memory leaks when +// modules are deleted, we use a WeakMap so that the source map cache will +// be purged automatically: +const cjsSourceMapCache = new IterableWeakMap(); +// The esm cache is not mutable, so we can use a Map without memory concerns: +const esmSourceMapCache = new SafeMap(); +const { fileURLToPath, pathToFileURL, URL } = require('internal/url'); let SourceMap; let sourceMapsEnabled; @@ -63,23 +60,22 @@ function getSourceMapsEnabled() { function maybeCacheSourceMap(filename, content, cjsModuleInstance) { const sourceMapsEnabled = getSourceMapsEnabled(); if (!(process.env.NODE_V8_COVERAGE || sourceMapsEnabled)) return; - let basePath; try { filename = normalizeReferrerURL(filename); - basePath = dirname(fileURLToPath(filename)); } catch (err) { // This is most likely an [eval]-wrapper, which is currently not // supported. debug(err.stack); return; } - - const match = content.match(/\/[*/]#\s+sourceMappingURL=(?[^\s]+)/); + const match = StringPrototypeMatch( + content, + /\/[*/]#\s+sourceMappingURL=(?[^\s]+)/ + ); if (match) { - const data = dataFromUrl(basePath, match.groups.sourceMappingURL); + const data = dataFromUrl(filename, match.groups.sourceMappingURL); const url = data ? null : match.groups.sourceMappingURL; if (cjsModuleInstance) { - if (!Module) Module = require('internal/modules/cjs/loader').Module; cjsSourceMapCache.set(cjsModuleInstance, { filename, lineLengths: lineLengths(content), @@ -98,12 +94,12 @@ function maybeCacheSourceMap(filename, content, cjsModuleInstance) { } } -function dataFromUrl(basePath, sourceMappingURL) { +function dataFromUrl(sourceURL, sourceMappingURL) { try { const url = new URL(sourceMappingURL); switch (url.protocol) { case 'data:': - return sourceMapFromDataUrl(basePath, url.pathname); + return sourceMapFromDataUrl(sourceURL, url.pathname); default: debug(`unknown protocol ${url.protocol}`); return null; @@ -111,8 +107,8 @@ function dataFromUrl(basePath, sourceMappingURL) { } catch (err) { debug(err.stack); // If no scheme is present, we assume we are dealing with a file path. - const sourceMapFile = resolve(basePath, sourceMappingURL); - return sourceMapFromFile(sourceMapFile); + const mapURL = new URL(sourceMappingURL, sourceURL).href; + return sourceMapFromFile(mapURL); } } @@ -123,16 +119,16 @@ function lineLengths(content) { // We purposefully keep \r as part of the line-length calculation, in // cases where there is a \r\n separator, so that this can be taken into // account in coverage calculations. - return content.split(/\n|\u2028|\u2029/).map((line) => { + return ArrayPrototypeMap(StringPrototypeSplit(content, /\n|\u2028|\u2029/), (line) => { return line.length; }); } -function sourceMapFromFile(sourceMapFile) { +function sourceMapFromFile(mapURL) { try { - const content = fs.readFileSync(sourceMapFile, 'utf8'); + const content = fs.readFileSync(fileURLToPath(mapURL), 'utf8'); const data = JSONParse(content); - return sourcesToAbsolute(dirname(sourceMapFile), data); + return sourcesToAbsolute(mapURL, data); } catch (err) { debug(err.stack); return null; @@ -141,9 +137,9 @@ function sourceMapFromFile(sourceMapFile) { // data:[][;base64], see: // https://tools.ietf.org/html/rfc2397#section-2 -function sourceMapFromDataUrl(basePath, url) { - const [format, data] = url.split(','); - const splitFormat = format.split(';'); +function sourceMapFromDataUrl(sourceURL, url) { + const [format, data] = StringPrototypeSplit(url, ','); + const splitFormat = StringPrototypeSplit(format, ';'); const contentType = splitFormat[0]; const base64 = splitFormat[splitFormat.length - 1] === 'base64'; if (contentType === 'application/json') { @@ -151,7 +147,7 @@ function sourceMapFromDataUrl(basePath, url) { Buffer.from(data, 'base64').toString('utf8') : data; try { const parsedData = JSONParse(decodedData); - return sourcesToAbsolute(basePath, parsedData); + return sourcesToAbsolute(sourceURL, parsedData); } catch (err) { debug(err.stack); return null; @@ -165,14 +161,10 @@ function sourceMapFromDataUrl(basePath, url) { // If the sources are not absolute URLs after prepending of the "sourceRoot", // the sources are resolved relative to the SourceMap (like resolving script // src in a html document). -function sourcesToAbsolute(base, data) { +function sourcesToAbsolute(baseURL, data) { data.sources = data.sources.map((source) => { source = (data.sourceRoot || '') + source; - if (!/^[\\/]/.test(source[0])) { - source = resolve(base, source); - } - if (!source.startsWith('file://')) source = `file://${source}`; - return source; + return new URL(source, baseURL).href; }); // The sources array is now resolved to absolute URLs, sourceRoot should // be updated to noop. @@ -198,11 +190,7 @@ function rekeySourceMap(cjsModuleInstance, newInstance) { function sourceMapCacheToObject() { const obj = ObjectCreate(null); - const it = MapPrototypeEntries(esmSourceMapCache); - let entry; - while (!(entry = MapIteratorNext(it)).done) { - const k = entry.value[0]; - const v = entry.value[1]; + for (const { 0: k, 1: v } of esmSourceMapCache) { obj[k] = v; } @@ -214,48 +202,32 @@ function sourceMapCacheToObject() { return obj; } -// Since WeakMap can't be iterated over, we use Module._cache's -// keys to facilitate Source Map serialization. -// -// TODO(bcoe): this means we don't currently serialize source-maps attached -// to error instances, only module instances. function appendCJSCache(obj) { - if (!Module) return; - const cjsModuleCache = ObjectGetValueSafe(Module, '_cache'); - const cjsModules = ObjectKeys(cjsModuleCache); - for (let i = 0; i < cjsModules.length; i++) { - const key = cjsModules[i]; - const module = ObjectGetValueSafe(cjsModuleCache, key); - const value = WeakMapPrototypeGet(cjsSourceMapCache, module); - if (value) { - // This is okay because `obj` has a null prototype. - obj[`file://${key}`] = { - lineLengths: ObjectGetValueSafe(value, 'lineLengths'), - data: ObjectGetValueSafe(value, 'data'), - url: ObjectGetValueSafe(value, 'url') - }; - } + for (const value of cjsSourceMapCache) { + obj[ObjectGetValueSafe(value, 'filename')] = { + lineLengths: ObjectGetValueSafe(value, 'lineLengths'), + data: ObjectGetValueSafe(value, 'data'), + url: ObjectGetValueSafe(value, 'url') + }; } } -// Attempt to lookup a source map, which is either attached to a file URI, or -// keyed on an error instance. -// TODO(bcoe): once WeakRefs are available in Node.js, refactor to drop -// requirement of error parameter. -function findSourceMap(uri, error) { - if (!Module) Module = require('internal/modules/cjs/loader').Module; +function findSourceMap(sourceURL) { + if (!RegExpPrototypeTest(/^\w+:\/\//, sourceURL)) { + sourceURL = pathToFileURL(sourceURL).href; + } if (!SourceMap) { SourceMap = require('internal/source_map/source_map').SourceMap; } - let sourceMap = cjsSourceMapCache.get(Module._cache[uri]); - if (!uri.startsWith('file://')) uri = normalizeReferrerURL(uri); - if (sourceMap === undefined) { - sourceMap = esmSourceMapCache.get(uri); - } + let sourceMap = esmSourceMapCache.get(sourceURL); if (sourceMap === undefined) { - const candidateSourceMap = cjsSourceMapCache.get(error); - if (candidateSourceMap && uri === candidateSourceMap.filename) { - sourceMap = candidateSourceMap; + for (const value of cjsSourceMapCache) { + const filename = ObjectGetValueSafe(value, 'filename'); + if (sourceURL === filename) { + sourceMap = { + data: ObjectGetValueSafe(value, 'data') + }; + } } } if (sourceMap && sourceMap.data) { diff --git a/lib/internal/streams/add-abort-signal.js b/lib/internal/streams/add-abort-signal.js new file mode 100644 index 00000000000000..a13dbc03db6e6c --- /dev/null +++ b/lib/internal/streams/add-abort-signal.js @@ -0,0 +1,46 @@ +'use strict'; + +const { + AbortError, + codes, +} = require('internal/errors'); + +const eos = require('internal/streams/end-of-stream'); +const { ERR_INVALID_ARG_TYPE } = codes; + +// This method is inlined here for readable-stream +// It also does not allow for signal to not exist on the steam +// https://github.com/nodejs/node/pull/36061#discussion_r533718029 +const validateAbortSignal = (signal, name) => { + if (typeof signal !== 'object' || + !('aborted' in signal)) { + throw new ERR_INVALID_ARG_TYPE(name, 'AbortSignal', signal); + } +}; + +function isStream(obj) { + return !!(obj && typeof obj.pipe === 'function'); +} + +module.exports.addAbortSignal = function addAbortSignal(signal, stream) { + validateAbortSignal(signal, 'signal'); + if (!isStream(stream)) { + throw new ERR_INVALID_ARG_TYPE('stream', 'stream.Stream', stream); + } + return module.exports.addAbortSignalNoValidate(signal, stream); +}; +module.exports.addAbortSignalNoValidate = function(signal, stream) { + if (typeof signal !== 'object' || !('aborted' in signal)) { + return stream; + } + const onAbort = () => { + stream.destroy(new AbortError()); + }; + if (signal.aborted) { + onAbort(); + } else { + signal.addEventListener('abort', onAbort); + eos(stream, () => signal.removeEventListener('abort', onAbort)); + } + return stream; +}; diff --git a/lib/internal/streams/destroy.js b/lib/internal/streams/destroy.js index 510f7a40c8ddd6..ff1bea5a415577 100644 --- a/lib/internal/streams/destroy.js +++ b/lib/internal/streams/destroy.js @@ -8,6 +8,20 @@ const { Symbol } = primordials; const kDestroy = Symbol('kDestroy'); const kConstruct = Symbol('kConstruct'); +function checkError(err, w, r) { + if (err) { + // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 + err.stack; // eslint-disable-line no-unused-expressions + + if (w && !w.errored) { + w.errored = err; + } + if (r && !r.errored) { + r.errored = err; + } + } +} + // Backwards compat. cb() is undocumented and unused in core but // unfortunately might be used by modules. function destroy(err, cb) { @@ -24,20 +38,10 @@ function destroy(err, cb) { return this; } - if (err) { - // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 - err.stack; - - if (w && !w.errored) { - w.errored = err; - } - if (r && !r.errored) { - r.errored = err; - } - } // We set destroyed to true before firing error callbacks in order // to make it re-entrance safe in case destroy() is called within callbacks + checkError(err, w, r); if (w) { w.destroyed = true; @@ -66,17 +70,7 @@ function _destroy(self, err, cb) { called = true; - if (err) { - // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 - err.stack; - - if (w && !w.errored) { - w.errored = err; - } - if (r && !r.errored) { - r.errored = err; - } - } + checkError(err, w, r); if (w) { w.closed = true; @@ -124,7 +118,7 @@ function _destroy(self, err, cb) { function(err) { const r = self._readableState; const w = self._writableState; - err.stack; + err.stack; // eslint-disable-line no-unused-expressions called = true; @@ -243,7 +237,7 @@ function errorOrDestroy(stream, err, sync) { stream.destroy(err); else if (err) { // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 - err.stack; + err.stack; // eslint-disable-line no-unused-expressions if (w && !w.errored) { w.errored = err; diff --git a/lib/internal/streams/duplex.js b/lib/internal/streams/duplex.js index 3bab26d9cef934..596d30a90a0418 100644 --- a/lib/internal/streams/duplex.js +++ b/lib/internal/streams/duplex.js @@ -87,6 +87,8 @@ ObjectDefineProperties(Duplex.prototype, { ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableCorked'), writableEnded: ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableEnded'), + writableNeedDrain: + ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableNeedDrain'), destroyed: { get() { diff --git a/lib/internal/streams/from.js b/lib/internal/streams/from.js index 13e8a73980ddd1..949d0ceb6dae50 100644 --- a/lib/internal/streams/from.js +++ b/lib/internal/streams/from.js @@ -38,11 +38,11 @@ function from(Readable, iterable, opts) { ...opts }); - // Reading boolean to protect against _read + // Flag to protect against _read // being called before last iteration completion. let reading = false; - // needToClose boolean if iterator needs to be explicitly closed + // Flag for when iterator needs to be explicitly closed. let needToClose = false; readable._read = function() { diff --git a/lib/internal/streams/pipeline.js b/lib/internal/streams/pipeline.js index c662bce8db1ab3..89561433c8c132 100644 --- a/lib/internal/streams/pipeline.js +++ b/lib/internal/streams/pipeline.js @@ -5,8 +5,9 @@ const { ArrayIsArray, + ReflectApply, SymbolAsyncIterator, - SymbolIterator + SymbolIterator, } = primordials; let eos; @@ -77,10 +78,6 @@ function popCallback(streams) { return streams.pop(); } -function isPromise(obj) { - return !!(obj && typeof obj.then === 'function'); -} - function isReadable(obj) { return !!(obj && typeof obj.pipe === 'function'); } @@ -126,6 +123,10 @@ async function pump(iterable, writable, finish) { } let error; try { + if (writable.writableNeedDrain === true) { + await EE.once(writable, 'drain'); + } + for await (const chunk of iterable) { if (!writable.write(chunk)) { if (writable.destroyed) return; @@ -143,7 +144,10 @@ async function pump(iterable, writable, finish) { function pipeline(...streams) { const callback = once(popCallback(streams)); - if (ArrayIsArray(streams[0])) streams = streams[0]; + // stream.pipeline(streams, callback) + if (ArrayIsArray(streams[0]) && streams.length === 1) { + streams = streams[0]; + } if (streams.length < 2) { throw new ERR_MISSING_ARGS('streams'); @@ -222,14 +226,19 @@ function pipeline(...streams) { const pt = new PassThrough({ objectMode: true }); - if (isPromise(ret)) { - ret - .then((val) => { + + // Handle Promises/A+ spec, `then` could be a getter that throws on + // second use. + const then = ret?.then; + if (typeof then === 'function') { + ReflectApply(then, ret, [ + (val) => { value = val; pt.end(val); }, (err) => { pt.destroy(err); - }); + } + ]); } else if (isIterable(ret, true)) { finishCount++; pump(ret, pt, finish); @@ -263,7 +272,7 @@ function pipeline(...streams) { } else { const name = reading ? `transform[${i - 1}]` : 'destination'; throw new ERR_INVALID_ARG_TYPE( - name, ['Stream', 'Function'], ret); + name, ['Stream', 'Function'], stream); } } diff --git a/lib/internal/streams/readable.js b/lib/internal/streams/readable.js index 43b53447d8734e..6fff20c94ec7f3 100644 --- a/lib/internal/streams/readable.js +++ b/lib/internal/streams/readable.js @@ -41,6 +41,10 @@ const EE = require('events'); const { Stream, prependListener } = require('internal/streams/legacy'); const { Buffer } = require('buffer'); +const { + addAbortSignalNoValidate, +} = require('internal/streams/add-abort-signal'); + let debug = require('internal/util/debuglog').debuglog('stream', (fn) => { debug = fn; }); @@ -50,6 +54,7 @@ const { getHighWaterMark, getDefaultHighWaterMark } = require('internal/streams/state'); + const { ERR_INVALID_ARG_TYPE, ERR_STREAM_PUSH_AFTER_EOF, @@ -191,6 +196,8 @@ function Readable(options) { if (typeof options.construct === 'function') this._construct = options.construct; + if (options.signal && !isDuplex) + addAbortSignalNoValidate(options.signal, this); } Stream.call(this, options); @@ -709,35 +716,39 @@ Readable.prototype.pipe = function(dest, pipeOpts) { ondrain(); } + function pause() { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if (!cleanedUp) { + if (state.pipes.length === 1 && state.pipes[0] === dest) { + debug('false write response, pause', 0); + state.awaitDrainWriters = dest; + state.multiAwaitDrain = false; + } else if (state.pipes.length > 1 && state.pipes.includes(dest)) { + debug('false write response, pause', state.awaitDrainWriters.size); + state.awaitDrainWriters.add(dest); + } + src.pause(); + } + if (!ondrain) { + // When the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + ondrain = pipeOnDrain(src, dest); + dest.on('drain', ondrain); + } + } + src.on('data', ondata); function ondata(chunk) { debug('ondata'); const ret = dest.write(chunk); debug('dest.write', ret); if (ret === false) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if (!cleanedUp) { - if (state.pipes.length === 1 && state.pipes[0] === dest) { - debug('false write response, pause', 0); - state.awaitDrainWriters = dest; - state.multiAwaitDrain = false; - } else if (state.pipes.length > 1 && state.pipes.includes(dest)) { - debug('false write response, pause', state.awaitDrainWriters.size); - state.awaitDrainWriters.add(dest); - } - src.pause(); - } - if (!ondrain) { - // When the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - ondrain = pipeOnDrain(src, dest); - dest.on('drain', ondrain); - } + pause(); } } @@ -783,7 +794,12 @@ Readable.prototype.pipe = function(dest, pipeOpts) { dest.emit('pipe', src); // Start the flow if it hasn't been started already. - if (!state.flowing) { + + if (dest.writableNeedDrain === true) { + if (state.flowing) { + pause(); + } + } else if (!state.flowing) { debug('pipe resume'); src.resume(); } diff --git a/lib/internal/streams/writable.js b/lib/internal/streams/writable.js index cf99b97a94ef6f..97fe1d28ef1f3a 100644 --- a/lib/internal/streams/writable.js +++ b/lib/internal/streams/writable.js @@ -41,6 +41,11 @@ const EE = require('events'); const Stream = require('internal/streams/legacy').Stream; const { Buffer } = require('buffer'); const destroyImpl = require('internal/streams/destroy'); + +const { + addAbortSignalNoValidate, +} = require('internal/streams/add-abort-signal'); + const { getHighWaterMark, getDefaultHighWaterMark @@ -263,6 +268,8 @@ function Writable(options) { if (typeof options.construct === 'function') this._construct = options.construct; + if (options.signal) + addAbortSignalNoValidate(options.signal, this); } Stream.call(this, options); @@ -366,6 +373,12 @@ function writeOrBuffer(stream, state, chunk, encoding, callback) { state.length += len; + // stream._write resets state.length + const ret = state.length < state.highWaterMark; + // We must ensure that previous needDrain will not be reset to false. + if (!ret) + state.needDrain = true; + if (state.writing || state.corked || state.errored || !state.constructed) { state.buffered.push({ chunk, encoding, callback }); if (state.allBuffers && encoding !== 'buffer') { @@ -383,12 +396,6 @@ function writeOrBuffer(stream, state, chunk, encoding, callback) { state.sync = false; } - const ret = state.length < state.highWaterMark; - - // We must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - // Return false if errored or destroyed in order to break // any synchronous while(stream.write(data)) loops. return ret && !state.errored && !state.destroyed; @@ -438,7 +445,7 @@ function onwrite(stream, er) { if (er) { // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 - er.stack; + er.stack; // eslint-disable-line no-unused-expressions if (!state.errored) { state.errored = er; @@ -805,6 +812,14 @@ ObjectDefineProperties(Writable.prototype, { } }, + writableNeedDrain: { + get() { + const wState = this._writableState; + if (!wState) return false; + return !wState.destroyed && !wState.ending && wState.needDrain; + } + }, + writableHighWaterMark: { get() { return this._writableState && this._writableState.highWaterMark; diff --git a/lib/internal/timers.js b/lib/internal/timers.js index d48fd9a893389d..5009572f90f265 100644 --- a/lib/internal/timers.js +++ b/lib/internal/timers.js @@ -75,6 +75,7 @@ const { MathMax, MathTrunc, + NumberIsFinite, NumberMIN_SAFE_INTEGER, ObjectCreate, Symbol, @@ -261,7 +262,7 @@ function ImmediateList() { } // Appends an item to the end of the linked list, adjusting the current tail's -// previous and next pointers where applicable +// next pointer and the item's previous pointer where applicable ImmediateList.prototype.append = function(item) { if (this.tail !== null) { this.tail._idleNext = item; @@ -380,7 +381,7 @@ function setUnrefTimeout(callback, after) { // Type checking used by timers.enroll() and Socket#setTimeout() function getTimerDuration(msecs, name) { validateNumber(msecs, name); - if (msecs < 0 || !isFinite(msecs)) { + if (msecs < 0 || !NumberIsFinite(msecs)) { throw new ERR_OUT_OF_RANGE(name, 'a non-negative finite number', msecs); } diff --git a/lib/internal/tls.js b/lib/internal/tls.js index 8d538b27574402..da40f635286bfe 100644 --- a/lib/internal/tls.js +++ b/lib/internal/tls.js @@ -2,6 +2,10 @@ const { ArrayIsArray, + ArrayPrototypePush, + StringPrototypeIndexOf, + StringPrototypeSlice, + StringPrototypeSplit, ObjectCreate, } = primordials; @@ -9,16 +13,16 @@ const { // C=US\nST=CA\nL=SF\nO=Joyent\nOU=Node.js\nCN=ca1\nemailAddress=ry@clouds.org function parseCertString(s) { const out = ObjectCreate(null); - for (const part of s.split('\n')) { - const sepIndex = part.indexOf('='); + for (const part of StringPrototypeSplit(s, '\n')) { + const sepIndex = StringPrototypeIndexOf(part, '='); if (sepIndex > 0) { - const key = part.slice(0, sepIndex); - const value = part.slice(sepIndex + 1); + const key = StringPrototypeSlice(part, 0, sepIndex); + const value = StringPrototypeSlice(part, sepIndex + 1); if (key in out) { if (!ArrayIsArray(out[key])) { out[key] = [out[key]]; } - out[key].push(value); + ArrayPrototypePush(out[key], value); } else { out[key] = value; } diff --git a/lib/internal/tty.js b/lib/internal/tty.js index 1ebd09193ef57e..2852cfb1bbfe29 100644 --- a/lib/internal/tty.js +++ b/lib/internal/tty.js @@ -22,6 +22,12 @@ 'use strict'; +const { + RegExpPrototypeTest, + StringPrototypeSplit, + StringPrototypeToLowerCase, +} = primordials; + const { ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE @@ -134,7 +140,7 @@ function getColorDepth(env = process.env) { // Lazy load for startup performance. if (OSRelease === undefined) { const { release } = require('os'); - OSRelease = release().split('.'); + OSRelease = StringPrototypeSplit(release(), '.'); } // Windows 10 build 10586 is the first Windows release that supports 256 // colors. Windows 10 build 14931 is the first release that supports @@ -163,14 +169,15 @@ function getColorDepth(env = process.env) { } if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? + return RegExpPrototypeTest(/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/, env.TEAMCITY_VERSION) ? COLORS_16 : COLORS_2; } switch (env.TERM_PROGRAM) { case 'iTerm.app': if (!env.TERM_PROGRAM_VERSION || - /^[0-2]\./.test(env.TERM_PROGRAM_VERSION)) { + RegExpPrototypeTest(/^[0-2]\./, env.TERM_PROGRAM_VERSION) + ) { return COLORS_256; } return COLORS_16m; @@ -186,16 +193,17 @@ function getColorDepth(env = process.env) { } if (env.TERM) { - if (/^xterm-256/.test(env.TERM)) + if (RegExpPrototypeTest(/^xterm-256/, env.TERM)) { return COLORS_256; + } - const termEnv = env.TERM.toLowerCase(); + const termEnv = StringPrototypeToLowerCase(env.TERM); if (TERM_ENVS[termEnv]) { return TERM_ENVS[termEnv]; } for (const term of TERM_ENVS_REG_EXP) { - if (term.test(termEnv)) { + if (RegExpPrototypeTest(term, termEnv)) { return COLORS_16; } } diff --git a/lib/internal/url.js b/lib/internal/url.js index b82c36db92e0bb..a15f19889800c5 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -2,6 +2,13 @@ const { Array, + ArrayPrototypeJoin, + ArrayPrototypeMap, + ArrayPrototypePush, + ArrayPrototypeReduce, + ArrayPrototypeSlice, + FunctionPrototypeBind, + Int8Array, Number, ObjectCreate, ObjectDefineProperties, @@ -9,9 +16,17 @@ const { ObjectGetOwnPropertySymbols, ObjectGetPrototypeOf, ObjectKeys, + ReflectApply, ReflectGetOwnPropertyDescriptor, ReflectOwnKeys, + RegExpPrototypeExec, String, + StringPrototypeCharCodeAt, + StringPrototypeIncludes, + StringPrototypeReplace, + StringPrototypeSlice, + StringPrototypeSplit, + StringPrototypeStartsWith, Symbol, SymbolIterator, SymbolToStringTag, @@ -100,7 +115,7 @@ function toUSVString(val) { const str = `${val}`; // As of V8 5.5, `str.search()` (and `unpairedSurrogateRe[@@search]()`) are // slower than `unpairedSurrogateRe.exec()`. - const match = unpairedSurrogateRe.exec(str); + const match = RegExpPrototypeExec(unpairedSurrogateRe, str); if (!match) return str; return _toUSVString(str, match.index); @@ -165,8 +180,8 @@ class URLSearchParams { } const convertedPair = []; for (const element of pair) - convertedPair.push(toUSVString(element)); - pairs.push(convertedPair); + ArrayPrototypePush(convertedPair, toUSVString(element)); + ArrayPrototypePush(pairs, convertedPair); } this[searchParams] = []; @@ -174,7 +189,7 @@ class URLSearchParams { if (pair.length !== 2) { throw new ERR_INVALID_TUPLE('Each query pair', '[name, value]'); } - this[searchParams].push(pair[0], pair[1]); + ArrayPrototypePush(this[searchParams], pair[0], pair[1]); } } else { // Record @@ -220,16 +235,21 @@ class URLSearchParams { const list = this[searchParams]; const output = []; for (let i = 0; i < list.length; i += 2) - output.push(`${innerInspect(list[i])} => ${innerInspect(list[i + 1])}`); + ArrayPrototypePush( + output, + `${innerInspect(list[i])} => ${innerInspect(list[i + 1])}`); - const length = output.reduce( + const length = ArrayPrototypeReduce( + output, (prev, cur) => prev + removeColors(cur).length + separator.length, -separator.length ); if (length > ctx.breakLength) { - return `${this.constructor.name} {\n ${output.join(',\n ')} }`; + return `${this.constructor.name} {\n` + + ` ${ArrayPrototypeJoin(output, ',\n ')} }`; } else if (output.length) { - return `${this.constructor.name} { ${output.join(separator)} }`; + return `${this.constructor.name} { ` + + `${ArrayPrototypeJoin(output, separator)} }`; } return `${this.constructor.name} {}`; } @@ -289,9 +309,9 @@ function onParsePortComplete(flags, protocol, username, password, function onParseHostComplete(flags, protocol, username, password, host, port, path, query, fragment) { - onParseHostnameComplete.apply(this, arguments); + ReflectApply(onParseHostnameComplete, this, arguments); if (port !== null || ((flags & URL_FLAGS_IS_DEFAULT_SCHEME_PORT) !== 0)) - onParsePortComplete.apply(this, arguments); + ReflectApply(onParsePortComplete, this, arguments); } function onParsePathComplete(flags, protocol, username, password, @@ -331,8 +351,8 @@ class URL { base_context = new URL(base)[context]; } this[context] = new URLContext(); - parse(input, -1, base_context, undefined, onParseComplete.bind(this), - onParseError); + parse(input, -1, base_context, undefined, + FunctionPrototypeBind(onParseComplete, this), onParseError); } get [special]() { @@ -460,8 +480,8 @@ ObjectDefineProperties(URL.prototype, { set(input) { // toUSVString is not needed. input = `${input}`; - parse(input, -1, undefined, undefined, onParseComplete.bind(this), - onParseError); + parse(input, -1, undefined, undefined, + FunctionPrototypeBind(onParseComplete, this), onParseError); } }, origin: { // readonly @@ -503,7 +523,7 @@ ObjectDefineProperties(URL.prototype, { return; const ctx = this[context]; parse(scheme, kSchemeStart, null, ctx, - onParseProtocolComplete.bind(this)); + FunctionPrototypeBind(onParseProtocolComplete, this)); } }, username: { @@ -566,7 +586,8 @@ ObjectDefineProperties(URL.prototype, { // Cannot set the host if cannot-be-base is set return; } - parse(host, kHost, null, ctx, onParseHostComplete.bind(this)); + parse(host, kHost, null, ctx, + FunctionPrototypeBind(onParseHostComplete, this)); } }, hostname: { @@ -603,7 +624,8 @@ ObjectDefineProperties(URL.prototype, { ctx.port = null; return; } - parse(port, kPort, null, ctx, onParsePortComplete.bind(this)); + parse(port, kPort, null, ctx, + FunctionPrototypeBind(onParsePortComplete, this)); } }, pathname: { @@ -615,7 +637,7 @@ ObjectDefineProperties(URL.prototype, { return ctx.path[0]; if (ctx.path.length === 0) return ''; - return `/${ctx.path.join('/')}`; + return `/${ArrayPrototypeJoin(ctx.path, '/')}`; }, set(path) { // toUSVString is not needed. @@ -642,11 +664,12 @@ ObjectDefineProperties(URL.prototype, { ctx.query = null; ctx.flags &= ~URL_FLAGS_HAS_QUERY; } else { - if (search[0] === '?') search = search.slice(1); + if (search[0] === '?') search = StringPrototypeSlice(search, 1); ctx.query = ''; ctx.flags |= URL_FLAGS_HAS_QUERY; if (search) { - parse(search, kQuery, null, ctx, onParseSearchComplete.bind(this)); + parse(search, kQuery, null, ctx, + FunctionPrototypeBind(onParseSearchComplete, this)); } } initSearchParams(this[searchParams], search); @@ -677,10 +700,11 @@ ObjectDefineProperties(URL.prototype, { ctx.flags &= ~URL_FLAGS_HAS_FRAGMENT; return; } - if (hash[0] === '#') hash = hash.slice(1); + if (hash[0] === '#') hash = StringPrototypeSlice(hash, 1); ctx.fragment = ''; ctx.flags |= URL_FLAGS_HAS_FRAGMENT; - parse(hash, kFragment, null, ctx, onParseHashComplete.bind(this)); + parse(hash, kFragment, null, ctx, + FunctionPrototypeBind(onParseHashComplete, this)); } }, toJSON: { @@ -729,7 +753,7 @@ function parseParams(qs) { let encodeCheck = 0; let i; for (i = 0; i < qs.length; ++i) { - const code = qs.charCodeAt(i); + const code = StringPrototypeCharCodeAt(qs, i); // Try matching key/value pair separator if (code === CHAR_AMPERSAND) { @@ -777,7 +801,7 @@ function parseParams(qs) { // Handle + and percent decoding. if (code === CHAR_PLUS) { if (lastPos < i) - buf += qs.slice(lastPos, i); + buf += StringPrototypeSlice(qs, lastPos, i); buf += ' '; lastPos = i + 1; } else if (!encoded) { @@ -805,21 +829,21 @@ function parseParams(qs) { return out; if (lastPos < i) - buf += qs.slice(lastPos, i); + buf += StringPrototypeSlice(qs, lastPos, i); if (encoded) buf = querystring.unescape(buf); - out.push(buf); + ArrayPrototypePush(out, buf); // If `buf` is the key, add an empty value. if (!seenSep) - out.push(''); + ArrayPrototypePush(out, ''); return out; } // Adapted from querystring's implementation. // Ref: https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer -const noEscape = [ +const noEscape = new Int8Array([ /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F */ @@ -831,7 +855,7 @@ const noEscape = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 0x50 - 0x5F 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 - 0x6F 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 0x70 - 0x7F -]; +]); // Special version of hexTable that uses `+` for U+0020 SPACE. const paramHexTable = hexTable.slice(); @@ -926,7 +950,7 @@ defineIDLClass(URLSearchParams.prototype, 'URLSearchParams', { name = toUSVString(name); value = toUSVString(value); - this[searchParams].push(name, value); + ArrayPrototypePush(this[searchParams], name, value); update(this[context], this); }, @@ -1040,7 +1064,7 @@ defineIDLClass(URLSearchParams.prototype, 'URLSearchParams', { // Otherwise, append a new name-value pair whose name is `name` and value // is `value`, to `list`. if (!found) { - list.push(name, value); + ArrayPrototypePush(list, name, value); } update(this[context], this); @@ -1226,24 +1250,28 @@ defineIDLClass(URLSearchParamsIteratorPrototype, 'URLSearchParams Iterator', { kind, index } = this[context]; - const output = target[searchParams].slice(index).reduce((prev, cur, i) => { - const key = i % 2 === 0; - if (kind === 'key' && key) { - prev.push(cur); - } else if (kind === 'value' && !key) { - prev.push(cur); - } else if (kind === 'key+value' && !key) { - prev.push([target[searchParams][index + i - 1], cur]); - } - return prev; - }, []); + const output = ArrayPrototypeReduce( + ArrayPrototypeSlice(target[searchParams], index), + (prev, cur, i) => { + const key = i % 2 === 0; + if (kind === 'key' && key) { + ArrayPrototypePush(prev, cur); + } else if (kind === 'value' && !key) { + ArrayPrototypePush(prev, cur); + } else if (kind === 'key+value' && !key) { + ArrayPrototypePush(prev, [target[searchParams][index + i - 1], cur]); + } + return prev; + }, + [] + ); const breakLn = inspect(output, innerOpts).includes('\n'); - const outputStrs = output.map((p) => inspect(p, innerOpts)); + const outputStrs = ArrayPrototypeMap(output, (p) => inspect(p, innerOpts)); let outputStr; if (breakLn) { - outputStr = `\n ${outputStrs.join(',\n ')}`; + outputStr = `\n ${ArrayPrototypeJoin(outputStrs, ',\n ')}`; } else { - outputStr = ` ${outputStrs.join(', ')}`; + outputStr = ` ${ArrayPrototypeJoin(outputStrs, ', ')}`; } return `${this[SymbolToStringTag]} {${outputStr} }`; } @@ -1271,8 +1299,9 @@ function domainToUnicode(domain) { function urlToOptions(url) { const options = { protocol: url.protocol, - hostname: typeof url.hostname === 'string' && url.hostname.startsWith('[') ? - url.hostname.slice(1, -1) : + hostname: typeof url.hostname === 'string' && + StringPrototypeStartsWith(url.hostname, '[') ? + StringPrototypeSlice(url.hostname, 1, -1) : url.hostname, hash: url.hash, search: url.search, @@ -1372,25 +1401,25 @@ const carriageReturnRegEx = /\r/g; const tabRegEx = /\t/g; function encodePathChars(filepath) { - if (filepath.includes('%')) - filepath = filepath.replace(percentRegEx, '%25'); + if (StringPrototypeIncludes(filepath, '%')) + filepath = StringPrototypeReplace(filepath, percentRegEx, '%25'); // In posix, backslash is a valid character in paths: - if (!isWindows && filepath.includes('\\')) - filepath = filepath.replace(backslashRegEx, '%5C'); - if (filepath.includes('\n')) - filepath = filepath.replace(newlineRegEx, '%0A'); - if (filepath.includes('\r')) - filepath = filepath.replace(carriageReturnRegEx, '%0D'); - if (filepath.includes('\t')) - filepath = filepath.replace(tabRegEx, '%09'); + if (!isWindows && StringPrototypeIncludes(filepath, '\\')) + filepath = StringPrototypeReplace(filepath, backslashRegEx, '%5C'); + if (StringPrototypeIncludes(filepath, '\n')) + filepath = StringPrototypeReplace(filepath, newlineRegEx, '%0A'); + if (StringPrototypeIncludes(filepath, '\r')) + filepath = StringPrototypeReplace(filepath, carriageReturnRegEx, '%0D'); + if (StringPrototypeIncludes(filepath, '\t')) + filepath = StringPrototypeReplace(filepath, tabRegEx, '%09'); return filepath; } function pathToFileURL(filepath) { const outURL = new URL('file://'); - if (isWindows && filepath.startsWith('\\\\')) { + if (isWindows && StringPrototypeStartsWith(filepath, '\\\\')) { // UNC path format: \\server\share\resource - const paths = filepath.split('\\'); + const paths = StringPrototypeSplit(filepath, '\\'); if (paths.length <= 3) { throw new ERR_INVALID_ARG_VALUE( 'filepath', @@ -1407,11 +1436,13 @@ function pathToFileURL(filepath) { ); } outURL.hostname = domainToASCII(hostname); - outURL.pathname = encodePathChars(paths.slice(3).join('/')); + outURL.pathname = encodePathChars( + ArrayPrototypeJoin(ArrayPrototypeSlice(paths, 3), '/')); } else { let resolved = path.resolve(filepath); // path.resolve strips trailing slashes so we must add them back - const filePathLast = filepath.charCodeAt(filepath.length - 1); + const filePathLast = StringPrototypeCharCodeAt(filepath, + filepath.length - 1); if ((filePathLast === CHAR_FORWARD_SLASH || (isWindows && filePathLast === CHAR_BACKWARD_SLASH)) && resolved[resolved.length - 1] !== path.sep) diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js index e6787760fea392..04b7b68c5d41c6 100644 --- a/lib/internal/util/inspect.js +++ b/lib/internal/util/inspect.js @@ -3,24 +3,17 @@ const { Array, ArrayIsArray, - BigInt64Array, BigIntPrototypeValueOf, - BigUint64Array, BooleanPrototypeValueOf, DatePrototypeGetTime, DatePrototypeToISOString, DatePrototypeToString, ErrorPrototypeToString, - Float32Array, - Float64Array, FunctionPrototypeCall, FunctionPrototypeToString, - Int8Array, - Int16Array, - Int32Array, JSONStringify, Map, - MapPrototype, + MapPrototypeGetSize, MapPrototypeEntries, MathFloor, MathMax, @@ -46,10 +39,12 @@ const { ObjectPrototypePropertyIsEnumerable, ObjectSeal, ObjectSetPrototypeOf, + ReflectApply, RegExp, RegExpPrototypeToString, + SafeStringIterator, Set, - SetPrototype, + SetPrototypeGetSize, SetPrototypeValues, String, StringPrototypeValueOf, @@ -57,11 +52,9 @@ const { SymbolPrototypeValueOf, SymbolIterator, SymbolToStringTag, - Uint16Array, - Uint32Array, + TypedArrayPrototypeGetLength, + TypedArrayPrototypeGetSymbolToStringTag, Uint8Array, - Uint8ArrayPrototype, - Uint8ClampedArray, uncurryThis, } = primordials; @@ -119,31 +112,12 @@ const { isNumberObject, isBooleanObject, isBigIntObject, - isUint8Array, - isUint8ClampedArray, - isUint16Array, - isUint32Array, - isInt8Array, - isInt16Array, - isInt32Array, - isFloat32Array, - isFloat64Array, - isBigInt64Array, - isBigUint64Array } = require('internal/util/types'); const assert = require('internal/assert'); const { NativeModule } = require('internal/bootstrap/loaders'); -const setSizeGetter = uncurryThis( - ObjectGetOwnPropertyDescriptor(SetPrototype, 'size').get); -const mapSizeGetter = uncurryThis( - ObjectGetOwnPropertyDescriptor(MapPrototype, 'size').get); -const typedArraySizeGetter = uncurryThis( - ObjectGetOwnPropertyDescriptor( - ObjectGetPrototypeOf(Uint8ArrayPrototype), 'length').get); - let hexSlice; const builtInObjects = new Set( @@ -534,6 +508,14 @@ function getEmptyFormatArray() { return []; } +function isInstanceof(object, proto) { + try { + return object instanceof proto; + } catch { + return false; + } +} + function getConstructorName(obj, ctx, recurseTimes, protoProps) { let firstProto; const tmp = obj; @@ -542,7 +524,7 @@ function getConstructorName(obj, ctx, recurseTimes, protoProps) { if (descriptor !== undefined && typeof descriptor.value === 'function' && descriptor.value.name !== '' && - tmp instanceof descriptor.value) { + isInstanceof(tmp, descriptor.value)) { if (protoProps !== undefined && (firstProto !== obj || !builtInObjects.has(descriptor.value.name))) { @@ -628,7 +610,7 @@ function addPrototypeProperties(ctx, main, obj, recurseTimes, output) { continue; } const value = formatProperty( - ctx, obj, recurseTimes, key, kObjectType, desc); + ctx, obj, recurseTimes, key, kObjectType, desc, main); if (ctx.colors) { // Faint! output.push(`\u001b[2m${value}\u001b[22m`); @@ -644,7 +626,7 @@ function addPrototypeProperties(ctx, main, obj, recurseTimes, output) { function getPrefix(constructor, tag, fallback, size = '') { if (constructor === null) { - if (tag !== '') { + if (tag !== '' && fallback !== tag) { return `[${fallback}${size}: null prototype] [${tag}] `; } return `[${fallback}${size}: null prototype] `; @@ -711,26 +693,6 @@ function formatProxy(ctx, proxy, recurseTimes) { ctx, res, '', ['Proxy [', ']'], kArrayExtrasType, recurseTimes); } -function findTypedConstructor(value) { - for (const [check, clazz] of [ - [isUint8Array, Uint8Array], - [isUint8ClampedArray, Uint8ClampedArray], - [isUint16Array, Uint16Array], - [isUint32Array, Uint32Array], - [isInt8Array, Int8Array], - [isInt16Array, Int16Array], - [isInt32Array, Int32Array], - [isFloat32Array, Float32Array], - [isFloat64Array, Float64Array], - [isBigInt64Array, BigInt64Array], - [isBigUint64Array, BigUint64Array] - ]) { - if (check(value)) { - return clazz; - } - } -} - // Note: using `formatValue` directly requires the indentation level to be // corrected by setting `ctx.indentationLvL += diff` and then to decrease the // value afterwards again. @@ -854,7 +816,7 @@ function formatRaw(ctx, value, recurseTimes, typedArray) { extrasType = kArrayExtrasType; formatter = formatArray; } else if (isSet(value)) { - const size = setSizeGetter(value); + const size = SetPrototypeGetSize(value); const prefix = getPrefix(constructor, tag, 'Set', `(${size})`); keys = getKeys(value, ctx.showHidden); formatter = constructor !== null ? @@ -864,7 +826,7 @@ function formatRaw(ctx, value, recurseTimes, typedArray) { return `${prefix}{}`; braces = [`${prefix}{`, '}']; } else if (isMap(value)) { - const size = mapSizeGetter(value); + const size = MapPrototypeGetSize(value); const prefix = getPrefix(constructor, tag, 'Map', `(${size})`); keys = getKeys(value, ctx.showHidden); formatter = constructor !== null ? @@ -878,12 +840,11 @@ function formatRaw(ctx, value, recurseTimes, typedArray) { let bound = value; let fallback = ''; if (constructor === null) { - const constr = findTypedConstructor(value); - fallback = constr.name; + fallback = TypedArrayPrototypeGetSymbolToStringTag(value); // Reconstruct the array information. - bound = new constr(value); + bound = new primordials[fallback](value); } - const size = typedArraySizeGetter(value); + const size = TypedArrayPrototypeGetLength(value); const prefix = getPrefix(constructor, tag, fallback, `(${size})`); braces = [`${prefix}[`, ']']; if (value.length === 0 && keys.length === 0 && !ctx.showHidden) @@ -978,7 +939,7 @@ function formatRaw(ctx, value, recurseTimes, typedArray) { braces[0] = `${getPrefix(constructor, tag, 'WeakMap')}{`; formatter = ctx.showHidden ? formatWeakMap : formatWeakCollection; } else if (isModuleNamespaceObject(value)) { - braces[0] = `[${tag}] {`; + braces[0] = `${getPrefix(constructor, tag, 'Module')}{`; // Special handle keys for namespace objects. formatter = formatNamespaceObject.bind(null, keys); } else if (isBoxedPrimitive(value)) { @@ -1678,7 +1639,8 @@ function formatPromise(ctx, value, recurseTimes) { return output; } -function formatProperty(ctx, value, recurseTimes, key, type, desc) { +function formatProperty(ctx, value, recurseTimes, key, type, desc, + original = value) { let name, str; let extra = ' '; desc = desc || ObjectGetOwnPropertyDescriptor(value, key) || @@ -1699,7 +1661,7 @@ function formatProperty(ctx, value, recurseTimes, key, type, desc) { (ctx.getters === 'get' && desc.set === undefined) || (ctx.getters === 'set' && desc.set !== undefined))) { try { - const tmp = value[key]; + const tmp = ReflectApply(desc.get, original, []); ctx.indentationLvl += 2; if (tmp === null) { str = `${s(`[${label}:`, sp)} ${s('null', 'null')}${s(']', sp)}`; @@ -2044,7 +2006,7 @@ if (internalBinding('config').hasIntl) { if (removeControlChars) str = stripVTControlCharacters(str); str = str.normalize('NFC'); - for (const char of str) { + for (const char of new SafeStringIterator(str)) { const code = char.codePointAt(0); if (isFullWidthCodePoint(code)) { width += 2; diff --git a/lib/internal/util/iterable_weak_map.js b/lib/internal/util/iterable_weak_map.js new file mode 100644 index 00000000000000..c9715a7e313b20 --- /dev/null +++ b/lib/internal/util/iterable_weak_map.js @@ -0,0 +1,86 @@ +'use strict'; + +const { + makeSafe, + ObjectFreeze, + SafeSet, + SafeWeakMap, + SymbolIterator, +} = primordials; + +// TODO(aduh95): Add FinalizationRegistry to primordials +const SafeFinalizationRegistry = makeSafe( + globalThis.FinalizationRegistry, + class SafeFinalizationRegistry extends globalThis.FinalizationRegistry {} +); + +// TODO(aduh95): Add WeakRef to primordials +const SafeWeakRef = makeSafe( + globalThis.WeakRef, + class SafeWeakRef extends globalThis.WeakRef {} +); + +// This class is modified from the example code in the WeakRefs specification: +// https://github.com/tc39/proposal-weakrefs +// Licensed under ECMA's MIT-style license, see: +// https://github.com/tc39/ecma262/blob/master/LICENSE.md +class IterableWeakMap { + #weakMap = new SafeWeakMap(); + #refSet = new SafeSet(); + #finalizationGroup = new SafeFinalizationRegistry(cleanup); + + set(key, value) { + const entry = this.#weakMap.get(key); + if (entry) { + // If there's already an entry for the object represented by "key", + // the value can be updated without creating a new WeakRef: + this.#weakMap.set(key, { value, ref: entry.ref }); + } else { + const ref = new SafeWeakRef(key); + this.#weakMap.set(key, { value, ref }); + this.#refSet.add(ref); + this.#finalizationGroup.register(key, { + set: this.#refSet, + ref + }, ref); + } + } + + get(key) { + return this.#weakMap.get(key)?.value; + } + + has(key) { + return this.#weakMap.has(key); + } + + delete(key) { + const entry = this.#weakMap.get(key); + if (!entry) { + return false; + } + this.#weakMap.delete(key); + this.#refSet.delete(entry.ref); + this.#finalizationGroup.unregister(entry.ref); + return true; + } + + *[SymbolIterator]() { + for (const ref of this.#refSet) { + const key = ref.deref(); + if (!key) continue; + const { value } = this.#weakMap.get(key); + yield value; + } + } +} + +function cleanup({ set, ref }) { + set.delete(ref); +} + +ObjectFreeze(IterableWeakMap.prototype); + +module.exports = { + IterableWeakMap, +}; diff --git a/lib/internal/util/types.js b/lib/internal/util/types.js index 4b9eeb469b2d19..6f5309a41c3d79 100644 --- a/lib/internal/util/types.js +++ b/lib/internal/util/types.js @@ -2,66 +2,55 @@ const { ArrayBufferIsView, - ObjectGetOwnPropertyDescriptor, - ObjectGetPrototypeOf, - SymbolToStringTag, - Uint8ArrayPrototype, - uncurryThis, + TypedArrayPrototypeGetSymbolToStringTag, } = primordials; -const TypedArrayPrototype = ObjectGetPrototypeOf(Uint8ArrayPrototype); - -const TypedArrayProto_toStringTag = - uncurryThis( - ObjectGetOwnPropertyDescriptor(TypedArrayPrototype, - SymbolToStringTag).get); - function isTypedArray(value) { - return TypedArrayProto_toStringTag(value) !== undefined; + return TypedArrayPrototypeGetSymbolToStringTag(value) !== undefined; } function isUint8Array(value) { - return TypedArrayProto_toStringTag(value) === 'Uint8Array'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'Uint8Array'; } function isUint8ClampedArray(value) { - return TypedArrayProto_toStringTag(value) === 'Uint8ClampedArray'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'Uint8ClampedArray'; } function isUint16Array(value) { - return TypedArrayProto_toStringTag(value) === 'Uint16Array'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'Uint16Array'; } function isUint32Array(value) { - return TypedArrayProto_toStringTag(value) === 'Uint32Array'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'Uint32Array'; } function isInt8Array(value) { - return TypedArrayProto_toStringTag(value) === 'Int8Array'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'Int8Array'; } function isInt16Array(value) { - return TypedArrayProto_toStringTag(value) === 'Int16Array'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'Int16Array'; } function isInt32Array(value) { - return TypedArrayProto_toStringTag(value) === 'Int32Array'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'Int32Array'; } function isFloat32Array(value) { - return TypedArrayProto_toStringTag(value) === 'Float32Array'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'Float32Array'; } function isFloat64Array(value) { - return TypedArrayProto_toStringTag(value) === 'Float64Array'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'Float64Array'; } function isBigInt64Array(value) { - return TypedArrayProto_toStringTag(value) === 'BigInt64Array'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'BigInt64Array'; } function isBigUint64Array(value) { - return TypedArrayProto_toStringTag(value) === 'BigUint64Array'; + return TypedArrayPrototypeGetSymbolToStringTag(value) === 'BigUint64Array'; } module.exports = { diff --git a/lib/internal/v8_prof_processor.js b/lib/internal/v8_prof_processor.js index d647d4749f9adc..daae650b2ad8ef 100644 --- a/lib/internal/v8_prof_processor.js +++ b/lib/internal/v8_prof_processor.js @@ -1,6 +1,8 @@ 'use strict'; const { + ArrayPrototypePush, + ArrayPrototypeSlice, JSONStringify, } = primordials; @@ -22,17 +24,18 @@ const scriptFiles = [ ]; let script = ''; -scriptFiles.forEach((s) => { +for (const s of scriptFiles) { script += internalBinding('natives')[s] + '\n'; -}); +} const tickArguments = []; if (process.platform === 'darwin') { - tickArguments.push('--mac'); + ArrayPrototypePush(tickArguments, '--mac'); } else if (process.platform === 'win32') { - tickArguments.push('--windows'); + ArrayPrototypePush(tickArguments, '--windows'); } -tickArguments.push.apply(tickArguments, process.argv.slice(1)); +ArrayPrototypePush(tickArguments, + ...ArrayPrototypeSlice(process.argv, 1)); script = `(function(module, require) { arguments = ${JSONStringify(tickArguments)}; function write (s) { process.stdout.write(s) } diff --git a/lib/internal/vm/module.js b/lib/internal/vm/module.js index c10433a36f6dcb..30ce655bd0d8b9 100644 --- a/lib/internal/vm/module.js +++ b/lib/internal/vm/module.js @@ -3,14 +3,18 @@ const assert = require('internal/assert'); const { ArrayIsArray, + ArrayPrototypeForEach, + ArrayPrototypeIndexOf, + ArrayPrototypeSome, ObjectCreate, ObjectDefineProperty, ObjectGetPrototypeOf, ObjectSetPrototypeOf, - SafePromise, + PromiseAll, + SafeWeakMap, Symbol, + SymbolToStringTag, TypeError, - WeakMap, } = primordials; const { isContext } = internalBinding('contextify'); @@ -61,7 +65,7 @@ const STATUS_MAP = { let globalModuleId = 0; const defaultModuleName = 'vm:module'; -const wrapToModuleMap = new WeakMap(); +const wrapToModuleMap = new SafeWeakMap(); const kWrap = Symbol('kWrap'); const kContext = Symbol('kContext'); @@ -239,7 +243,7 @@ class Module { o.context = this.context; ObjectSetPrototypeOf(o, ObjectGetPrototypeOf(this)); - ObjectDefineProperty(o, Symbol.toStringTag, { + ObjectDefineProperty(o, SymbolToStringTag, { value: constructor.name, configurable: true }); @@ -331,7 +335,7 @@ class SourceTextModule extends Module { try { if (promises !== undefined) { - await SafePromise.all(promises); + await PromiseAll(promises); } } catch (e) { this.#error = e; @@ -391,13 +395,13 @@ class SourceTextModule extends Module { class SyntheticModule extends Module { constructor(exportNames, evaluateCallback, options = {}) { if (!ArrayIsArray(exportNames) || - exportNames.some((e) => typeof e !== 'string')) { + ArrayPrototypeSome(exportNames, (e) => typeof e !== 'string')) { throw new ERR_INVALID_ARG_TYPE('exportNames', 'Array of unique strings', exportNames); } else { - exportNames.forEach((name, i) => { - if (exportNames.indexOf(name, i + 1) !== -1) { + ArrayPrototypeForEach(exportNames, (name, i) => { + if (ArrayPrototypeIndexOf(exportNames, name, i + 1) !== -1) { throw new ERR_INVALID_ARG_VALUE(`exportNames.${name}`, name, 'is duplicated'); diff --git a/lib/internal/worker.js b/lib/internal/worker.js index e97cd7efea22df..cb51c0a1a5efd0 100644 --- a/lib/internal/worker.js +++ b/lib/internal/worker.js @@ -4,22 +4,28 @@ const { ArrayIsArray, + ArrayPrototypeMap, + ArrayPrototypePush, Float64Array, + FunctionPrototypeBind, JSONStringify, MathMax, ObjectCreate, ObjectEntries, Promise, PromiseResolve, + RegExpPrototypeTest, String, Symbol, SymbolFor, + TypedArrayPrototypeFill, Uint32Array, } = primordials; const EventEmitter = require('events'); const assert = require('internal/assert'); const path = require('path'); +const { timeOrigin } = internalBinding('performance'); const errorCodes = require('internal/errors').codes; const { @@ -70,6 +76,8 @@ const kOnMessage = Symbol('kOnMessage'); const kOnCouldNotSerializeErr = Symbol('kOnCouldNotSerializeErr'); const kOnErrorMessage = Symbol('kOnErrorMessage'); const kParentSideStdio = Symbol('kParentSideStdio'); +const kLoopStartTime = Symbol('kLoopStartTime'); +const kIsOnline = Symbol('kIsOnline'); const SHARE_ENV = SymbolFor('nodejs.worker_threads.SHARE_ENV'); let debug = require('internal/util/debuglog').debuglog('worker', (fn) => { @@ -101,7 +109,7 @@ class Worker extends EventEmitter { if (!ArrayIsArray(options.argv)) { throw new ERR_INVALID_ARG_TYPE('options.argv', 'Array', options.argv); } - argv = options.argv.map(String); + argv = ArrayPrototypeMap(options.argv, String); } let url, doEval; @@ -130,7 +138,8 @@ class Worker extends EventEmitter { ['string', 'URL'], filename ); - } else if (path.isAbsolute(filename) || /^\.\.?[\\/]/.test(filename)) { + } else if (path.isAbsolute(filename) || + RegExpPrototypeTest(/^\.\.?[\\/]/, filename)) { filename = path.resolve(filename); url = pathToFileURL(filename); } else { @@ -200,7 +209,7 @@ class Worker extends EventEmitter { const transferList = [port2]; // If transferList is provided. if (options.transferList) - transferList.push(...options.transferList); + ArrayPrototypePush(transferList, ...options.transferList); this[kPublicPort] = port1; for (const event of ['message', 'messageerror']) { @@ -223,6 +232,12 @@ class Worker extends EventEmitter { null, hasStdin: !!options.stdin }, transferList); + // Use this to cache the Worker's loopStart value once available. + this[kLoopStartTime] = -1; + this[kIsOnline] = false; + this.performance = { + eventLoopUtilization: FunctionPrototypeBind(eventLoopUtilization, this), + }; // Actually start the new thread now that everything is in place. this[kHandle].startThread(); } @@ -254,6 +269,7 @@ class Worker extends EventEmitter { [kOnMessage](message) { switch (message.type) { case messageTypes.UP_AND_RUNNING: + this[kIsOnline] = true; return this.emit('online'); case messageTypes.COULD_NOT_SERIALIZE_ERROR: return this[kOnCouldNotSerializeErr](); @@ -392,7 +408,7 @@ function pipeWithoutWarning(source, dest) { const resourceLimitsArray = new Float64Array(kTotalResourceLimitCount); function parseResourceLimits(obj) { const ret = resourceLimitsArray; - ret.fill(-1); + TypedArrayPrototypeFill(ret, -1); if (typeof obj !== 'object' || obj === null) return ret; if (typeof obj.maxOldGenerationSizeMb === 'number') @@ -415,6 +431,52 @@ function makeResourceLimits(float64arr) { }; } +function eventLoopUtilization(util1, util2) { + // TODO(trevnorris): Works to solve the thread-safe read/write issue of + // loopTime, but has the drawback that it can't be set until the event loop + // has had a chance to turn. So it will be impossible to read the ELU of + // a worker thread immediately after it's been created. + if (!this[kIsOnline] || !this[kHandle]) { + return { idle: 0, active: 0, utilization: 0 }; + } + + // Cache loopStart, since it's only written to once. + if (this[kLoopStartTime] === -1) { + this[kLoopStartTime] = this[kHandle].loopStartTime(); + if (this[kLoopStartTime] === -1) + return { idle: 0, active: 0, utilization: 0 }; + } + + if (util2) { + const idle = util1.idle - util2.idle; + const active = util1.active - util2.active; + return { idle, active, utilization: active / (idle + active) }; + } + + const idle = this[kHandle].loopIdleTime(); + + // Using performance.now() here is fine since it's always the time from + // the beginning of the process, and is why it needs to be offset by the + // loopStart time (which is also calculated from the beginning of the + // process). + const active = now() - this[kLoopStartTime] - idle; + + if (!util1) { + return { idle, active, utilization: active / (idle + active) }; + } + + const idle_delta = idle - util1.idle; + const active_delta = active - util1.active; + const utilization = active_delta / (idle_delta + active_delta); + return { idle: idle_delta, active: active_delta, utilization }; +} + +// Duplicate code from performance.now() so don't need to require perf_hooks. +function now() { + const hr = process.hrtime(); + return (hr[0] * 1000 + hr[1] / 1e6) - timeOrigin; +} + module.exports = { ownsProcessState, isMainThread, diff --git a/lib/internal/worker/io.js b/lib/internal/worker/io.js index e3ca6fe0cc10b5..aae2dc8a39e585 100644 --- a/lib/internal/worker/io.js +++ b/lib/internal/worker/io.js @@ -1,6 +1,11 @@ 'use strict'; const { + ArrayPrototypeForEach, + ArrayPrototypeMap, + ArrayPrototypePush, + FunctionPrototypeBind, + FunctionPrototypeCall, ObjectAssign, ObjectCreate, ObjectDefineProperty, @@ -8,6 +13,7 @@ const { ObjectGetOwnPropertyDescriptors, ObjectGetPrototypeOf, ObjectSetPrototypeOf, + ReflectApply, Symbol, } = primordials; @@ -19,11 +25,13 @@ const { const { MessagePort, MessageChannel, + broadcastChannel, drainMessagePort, moveMessagePortToContext, receiveMessageOnPort: receiveMessageOnPort_, stopMessagePort, - checkMessagePort + checkMessagePort, + DOMException, } = internalBinding('messaging'); const { getEnvMessagePort @@ -41,14 +49,20 @@ const { } = require('internal/event_target'); const { inspect } = require('internal/util/inspect'); const { - ERR_INVALID_ARG_TYPE -} = require('internal/errors').codes; + codes: { + ERR_INVALID_ARG_TYPE, + ERR_MISSING_ARGS, + } +} = require('internal/errors'); const kData = Symbol('kData'); +const kHandle = Symbol('kHandle'); const kIncrementsPortRef = Symbol('kIncrementsPortRef'); const kLastEventId = Symbol('kLastEventId'); const kName = Symbol('kName'); const kOrigin = Symbol('kOrigin'); +const kOnMessage = Symbol('kOnMessage'); +const kOnMessageError = Symbol('kOnMessageError'); const kPort = Symbol('kPort'); const kPorts = Symbol('kPorts'); const kWaitingStreams = Symbol('kWaitingStreams'); @@ -127,11 +141,15 @@ ObjectDefineProperties(MessageEvent.prototype, { }, }); +const originalCreateEvent = EventTarget.prototype[kCreateEvent]; ObjectDefineProperty( MessagePort.prototype, kCreateEvent, { value: function(data, type) { + if (type !== 'message' && type !== 'messageerror') { + return ReflectApply(originalCreateEvent, this, arguments); + } return new MessageEvent(type, { data }); }, configurable: false, @@ -142,13 +160,12 @@ ObjectDefineProperty( // This is called from inside the `MessagePort` constructor. function oninit() { initNodeEventTarget(this); - // TODO(addaleax): This should be on MessagePort.prototype, but - // defineEventHandler() does not support that. - defineEventHandler(this, 'message'); - defineEventHandler(this, 'messageerror'); setupPortReferencing(this, this, 'message'); } +defineEventHandler(MessagePort.prototype, 'message'); +defineEventHandler(MessagePort.prototype, 'messageerror'); + ObjectDefineProperty(MessagePort.prototype, onInitSymbol, { enumerable: true, writable: false, @@ -175,7 +192,7 @@ ObjectDefineProperty(MessagePort.prototype, handleOnCloseSymbol, { MessagePort.prototype.close = function(cb) { if (typeof cb === 'function') this.once('close', cb); - MessagePortPrototype.close.call(this); + FunctionPrototypeCall(MessagePortPrototype.close, this); }; ObjectDefineProperty(MessagePort.prototype, inspect.custom, { @@ -186,7 +203,7 @@ ObjectDefineProperty(MessagePort.prototype, inspect.custom, { try { // This may throw when `this` does not refer to a native object, // e.g. when accessing the prototype directly. - ref = MessagePortPrototype.hasRef.call(this); + ref = FunctionPrototypeCall(MessagePortPrototype.hasRef, this); } catch { return this; } return ObjectAssign(ObjectCreate(MessagePort.prototype), ref === undefined ? { @@ -214,18 +231,18 @@ function setupPortReferencing(port, eventEmitter, eventName) { const origNewListener = eventEmitter[kNewListener]; eventEmitter[kNewListener] = function(size, type, ...args) { if (type === eventName) newListener(size - 1); - return origNewListener.call(this, size, type, ...args); + return ReflectApply(origNewListener, this, arguments); }; const origRemoveListener = eventEmitter[kRemoveListener]; eventEmitter[kRemoveListener] = function(size, type, ...args) { if (type === eventName) removeListener(size); - return origRemoveListener.call(this, size, type, ...args); + return ReflectApply(origRemoveListener, this, arguments); }; function newListener(size) { if (size === 0) { port.ref(); - MessagePortPrototype.start.call(port); + FunctionPrototypeCall(MessagePortPrototype.start, port); } } @@ -279,9 +296,10 @@ class WritableWorkerStdio extends Writable { this[kPort].postMessage({ type: messageTypes.STDIO_PAYLOAD, stream: this[kName], - chunks: chunks.map(({ chunk, encoding }) => ({ chunk, encoding })) + chunks: ArrayPrototypeMap(chunks, + ({ chunk, encoding }) => ({ chunk, encoding })), }); - this[kWritableCallbacks].push(cb); + ArrayPrototypePush(this[kWritableCallbacks], cb); if (this[kPort][kWaitingStreams]++ === 0) this[kPort].ref(); } @@ -298,8 +316,7 @@ class WritableWorkerStdio extends Writable { [kStdioWantsMoreDataCallback]() { const cbs = this[kWritableCallbacks]; this[kWritableCallbacks] = []; - for (const cb of cbs) - cb(); + ArrayPrototypeForEach(cbs, (cb) => cb()); if ((this[kPort][kWaitingStreams] -= cbs.length) === 0) this[kPort].unref(); } @@ -321,6 +338,77 @@ function receiveMessageOnPort(port) { return { message }; } +function onMessageEvent(type, data) { + this.dispatchEvent(new MessageEvent(type, { data })); +} + +class BroadcastChannel extends EventTarget { + constructor(name) { + if (arguments.length === 0) + throw new ERR_MISSING_ARGS('name'); + super(); + this[kName] = `${name}`; + this[kHandle] = broadcastChannel(this[kName]); + this[kOnMessage] = FunctionPrototypeBind(onMessageEvent, this, 'message'); + this[kOnMessageError] = + FunctionPrototypeBind(onMessageEvent, this, 'messageerror'); + this[kHandle].on('message', this[kOnMessage]); + this[kHandle].on('messageerror', this[kOnMessageError]); + } + + [inspect.custom](depth, options) { + if (depth < 0) + return 'BroadcastChannel'; + + const opts = { + ...options, + depth: options.depth == null ? null : options.depth - 1 + }; + + return `BroadcastChannel ${inspect({ + name: this[kName], + active: this[kHandle] !== undefined, + }, opts)}`; + } + + get name() { return this[kName]; } + + close() { + if (this[kHandle] === undefined) + return; + this[kHandle].off('message', this[kOnMessage]); + this[kHandle].off('messageerror', this[kOnMessageError]); + this[kOnMessage] = undefined; + this[kOnMessageError] = undefined; + this[kHandle].close(); + this[kHandle] = undefined; + } + + postMessage(message) { + if (arguments.length === 0) + throw new ERR_MISSING_ARGS('message'); + if (this[kHandle] === undefined) + throw new DOMException('BroadcastChannel is closed.'); + if (this[kHandle].postMessage(message) === undefined) + throw new DOMException('Message could not be posted.'); + } + + ref() { + if (this[kHandle]) + this[kHandle].ref(); + return this; + } + + unref() { + if (this[kHandle]) + this[kHandle].unref(); + return this; + } +} + +defineEventHandler(BroadcastChannel.prototype, 'message'); +defineEventHandler(BroadcastChannel.prototype, 'messageerror'); + module.exports = { drainMessagePort, messageTypes, @@ -336,5 +424,6 @@ module.exports = { setupPortReferencing, ReadableWorkerStdio, WritableWorkerStdio, - createWorkerStdio + createWorkerStdio, + BroadcastChannel, }; diff --git a/lib/internal/worker/js_transferable.js b/lib/internal/worker/js_transferable.js index 707fd03f2f6d0e..5b822ef8a0bcb1 100644 --- a/lib/internal/worker/js_transferable.js +++ b/lib/internal/worker/js_transferable.js @@ -1,5 +1,8 @@ 'use strict'; -const { Error } = primordials; +const { + Error, + StringPrototypeSplit, +} = primordials; const { messaging_deserialize_symbol, messaging_transfer_symbol, @@ -16,7 +19,7 @@ function setup() { // from .postMessage() calls. The format of `deserializeInfo` is generally // 'module:Constructor', e.g. 'internal/fs/promises:FileHandle'. setDeserializerCreateObjectFunction((deserializeInfo) => { - const [ module, ctor ] = deserializeInfo.split(':'); + const [ module, ctor ] = StringPrototypeSplit(deserializeInfo, ':'); const Ctor = require(module)[ctor]; if (typeof Ctor !== 'function' || !(Ctor.prototype instanceof JSTransferable)) { diff --git a/lib/net.js b/lib/net.js index 667fbc60c2d171..149e4df20f2717 100644 --- a/lib/net.js +++ b/lib/net.js @@ -23,13 +23,19 @@ const { ArrayIsArray, + ArrayPrototypeIndexOf, + ArrayPrototypePush, + ArrayPrototypeSplice, Boolean, Error, + FunctionPrototype, + FunctionPrototypeCall, Number, NumberIsNaN, NumberParseInt, ObjectDefineProperty, ObjectSetPrototypeOf, + ReflectApply, Symbol, } = primordials; @@ -126,7 +132,7 @@ const DEFAULT_IPV6_ADDR = '::'; const isWindows = process.platform === 'win32'; -function noop() {} +const noop = FunctionPrototype; function getFlags(ipv6Only) { return ipv6Only === true ? TCPConstants.UV_TCP_IPV6ONLY : 0; @@ -299,60 +305,59 @@ function Socket(options) { options.autoDestroy = true; // Handle strings directly. options.decodeStrings = false; - stream.Duplex.call(this, options); + ReflectApply(stream.Duplex, this, [options]); if (options.handle) { this._handle = options.handle; // private this[async_id_symbol] = getNewAsyncId(this._handle); - } else { - const onread = options.onread; - if (onread !== null && typeof onread === 'object' && - (isUint8Array(onread.buffer) || typeof onread.buffer === 'function') && - typeof onread.callback === 'function') { - if (typeof onread.buffer === 'function') { - this[kBuffer] = true; - this[kBufferGen] = onread.buffer; - } else { - this[kBuffer] = onread.buffer; - } - this[kBufferCb] = onread.callback; - } - if (options.fd !== undefined) { - const { fd } = options; - let err; + } else if (options.fd !== undefined) { + const { fd } = options; + let err; - // createHandle will throw ERR_INVALID_FD_TYPE if `fd` is not - // a valid `PIPE` or `TCP` descriptor - this._handle = createHandle(fd, false); + // createHandle will throw ERR_INVALID_FD_TYPE if `fd` is not + // a valid `PIPE` or `TCP` descriptor + this._handle = createHandle(fd, false); - err = this._handle.open(fd); + err = this._handle.open(fd); + + // While difficult to fabricate, in some architectures + // `open` may return an error code for valid file descriptors + // which cannot be opened. This is difficult to test as most + // un-openable fds will throw on `createHandle` + if (err) + throw errnoException(err, 'open'); + + this[async_id_symbol] = this._handle.getAsyncId(); - // While difficult to fabricate, in some architectures - // `open` may return an error code for valid file descriptors - // which cannot be opened. This is difficult to test as most - // un-openable fds will throw on `createHandle` + if ((fd === 1 || fd === 2) && + (this._handle instanceof Pipe) && isWindows) { + // Make stdout and stderr blocking on Windows + err = this._handle.setBlocking(true); if (err) - throw errnoException(err, 'open'); - - this[async_id_symbol] = this._handle.getAsyncId(); - - if ((fd === 1 || fd === 2) && - (this._handle instanceof Pipe) && isWindows) { - // Make stdout and stderr blocking on Windows - err = this._handle.setBlocking(true); - if (err) - throw errnoException(err, 'setBlocking'); - - this._writev = null; - this._write = makeSyncWrite(fd); - // makeSyncWrite adjusts this value like the original handle would, so - // we need to let it do that by turning it into a writable, own - // property. - ObjectDefineProperty(this._handle, 'bytesWritten', { - value: 0, writable: true - }); - } + throw errnoException(err, 'setBlocking'); + + this._writev = null; + this._write = makeSyncWrite(fd); + // makeSyncWrite adjusts this value like the original handle would, so + // we need to let it do that by turning it into a writable, own + // property. + ObjectDefineProperty(this._handle, 'bytesWritten', { + value: 0, writable: true + }); + } + } + + const onread = options.onread; + if (onread !== null && typeof onread === 'object' && + (isUint8Array(onread.buffer) || typeof onread.buffer === 'function') && + typeof onread.callback === 'function') { + if (typeof onread.buffer === 'function') { + this[kBuffer] = true; + this[kBufferGen] = onread.buffer; + } else { + this[kBuffer] = onread.buffer; } + this[kBufferCb] = onread.callback; } // Shut down the socket when we're finished with it. @@ -435,6 +440,11 @@ function afterShutdown() { // of the other side sending a FIN. The standard 'write after end' // is overly vague, and makes it seem like the user's code is to blame. function writeAfterFIN(chunk, encoding, cb) { + if (!this.writableEnded) { + return ReflectApply( + stream.Duplex.prototype.write, this, [chunk, encoding, cb]); + } + if (typeof encoding === 'function') { cb = encoding; encoding = null; @@ -576,7 +586,7 @@ Socket.prototype._read = function(n) { Socket.prototype.end = function(data, encoding, callback) { - stream.Duplex.prototype.end.call(this, data, encoding, callback); + ReflectApply(stream.Duplex.prototype.end, this, [data, encoding, callback]); DTRACE_NET_STREAM_END(this); return this; }; @@ -592,7 +602,7 @@ Socket.prototype.pause = function() { this.destroy(errnoException(err, 'read')); } } - return stream.Duplex.prototype.pause.call(this); + return FunctionPrototypeCall(stream.Duplex.prototype.pause, this); }; @@ -601,7 +611,7 @@ Socket.prototype.resume = function() { !this._handle.reading) { tryReadStart(this); } - return stream.Duplex.prototype.resume.call(this); + return FunctionPrototypeCall(stream.Duplex.prototype.resume, this); }; @@ -610,7 +620,7 @@ Socket.prototype.read = function(n) { !this._handle.reading) { tryReadStart(this); } - return stream.Duplex.prototype.read.call(this, n); + return ReflectApply(stream.Duplex.prototype.read, this, [n]); }; @@ -948,7 +958,6 @@ Socket.prototype.connect = function(...args) { this._unrefTimer(); this.connecting = true; - this.writable = true; if (pipe) { validateString(path, 'options.path'); @@ -1144,7 +1153,7 @@ function Server(options, connectionListener) { if (!(this instanceof Server)) return new Server(options, connectionListener); - EventEmitter.call(this); + FunctionPrototypeCall(EventEmitter, this); if (typeof options === 'function') { connectionListener = options; @@ -1655,10 +1664,10 @@ ObjectDefineProperty(Socket.prototype, '_handle', { Server.prototype._setupWorker = function(socketList) { this._usingWorkers = true; - this._workers.push(socketList); + ArrayPrototypePush(this._workers, socketList); socketList.once('exit', (socketList) => { - const index = this._workers.indexOf(socketList); - this._workers.splice(index, 1); + const index = ArrayPrototypeIndexOf(this._workers, socketList); + ArrayPrototypeSplice(this._workers, index, 1); }); }; diff --git a/lib/os.js b/lib/os.js index d03be051d09144..b134fb93298473 100644 --- a/lib/os.js +++ b/lib/os.js @@ -22,9 +22,13 @@ 'use strict'; const { + ArrayPrototypePush, Float64Array, NumberParseInt, ObjectDefineProperties, + StringPrototypeEndsWith, + StringPrototypeSlice, + StringPrototypeSplit, SymbolToPrimitive, } = primordials; @@ -104,7 +108,7 @@ function cpus() { const result = []; let i = 0; while (i < data.length) { - result.push({ + ArrayPrototypePush(result, { model: data[i++], speed: data[i++], times: { @@ -135,15 +139,16 @@ function tmpdir() { path = process.env.TEMP || process.env.TMP || (process.env.SystemRoot || process.env.windir) + '\\temp'; - if (path.length > 1 && path.endsWith('\\') && !path.endsWith(':\\')) - path = path.slice(0, -1); + if (path.length > 1 && StringPrototypeEndsWith(path, '\\') && + !StringPrototypeEndsWith(path, ':\\')) + path = StringPrototypeSlice(path, 0, -1); } else { path = safeGetenv('TMPDIR') || safeGetenv('TMP') || safeGetenv('TEMP') || '/tmp'; - if (path.length > 1 && path.endsWith('/')) - path = path.slice(0, -1); + if (path.length > 1 && StringPrototypeEndsWith(path, '/')) + path = StringPrototypeSlice(path, 0, -1); } return path; @@ -177,7 +182,7 @@ function getCIDR(address, netmask, family) { groupLength = 16; } - const parts = netmask.split(split); + const parts = StringPrototypeSplit(netmask, split); for (var i = 0; i < parts.length; i++) { if (parts[i] !== '') { const binary = NumberParseInt(parts[i], range); @@ -221,7 +226,7 @@ function networkInterfaces() { const existing = result[name]; if (existing !== undefined) - existing.push(entry); + ArrayPrototypePush(existing, entry); else result[name] = [entry]; } diff --git a/lib/path.js b/lib/path.js index 7532b795bf63f7..246bace17873b6 100644 --- a/lib/path.js +++ b/lib/path.js @@ -21,6 +21,13 @@ 'use strict'; +const { + FunctionPrototypeBind, + StringPrototypeCharCodeAt, + StringPrototypeLastIndexOf, + StringPrototypeSlice, + StringPrototypeToLowerCase, +} = primordials; const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes; const { CHAR_UPPERCASE_A, @@ -57,7 +64,7 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { let code = 0; for (let i = 0; i <= path.length; ++i) { if (i < path.length) - code = path.charCodeAt(i); + code = StringPrototypeCharCodeAt(path, i); else if (isPathSeparator(code)) break; else @@ -68,16 +75,17 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { // NOOP } else if (dots === 2) { if (res.length < 2 || lastSegmentLength !== 2 || - res.charCodeAt(res.length - 1) !== CHAR_DOT || - res.charCodeAt(res.length - 2) !== CHAR_DOT) { + StringPrototypeCharCodeAt(res, res.length - 1) !== CHAR_DOT || + StringPrototypeCharCodeAt(res, res.length - 2) !== CHAR_DOT) { if (res.length > 2) { - const lastSlashIndex = res.lastIndexOf(separator); + const lastSlashIndex = StringPrototypeLastIndexOf(res, separator); if (lastSlashIndex === -1) { res = ''; lastSegmentLength = 0; } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); + res = StringPrototypeSlice(res, 0, lastSlashIndex); + lastSegmentLength = + res.length - 1 - StringPrototypeLastIndexOf(res, separator); } lastSlash = i; dots = 0; @@ -96,9 +104,9 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { } } else { if (res.length > 0) - res += `${separator}${path.slice(lastSlash + 1, i)}`; + res += `${separator}${StringPrototypeSlice(path, lastSlash + 1, i)}`; else - res = path.slice(lastSlash + 1, i); + res = StringPrototypeSlice(path, lastSlash + 1, i); lastSegmentLength = i - lastSlash - 1; } lastSlash = i; @@ -155,8 +163,9 @@ const win32 = { // Verify that a cwd was found and that it actually points // to our drive. If not, default to the drive's root. if (path === undefined || - (path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() && - path.charCodeAt(2) === CHAR_BACKWARD_SLASH)) { + (StringPrototypeSlice(path, 0, 2).toLowerCase() !== + StringPrototypeToLowerCase(resolvedDevice) && + StringPrototypeCharCodeAt(path, 2) === CHAR_BACKWARD_SLASH)) { path = `${resolvedDevice}\\`; } } @@ -165,7 +174,7 @@ const win32 = { let rootEnd = 0; let device = ''; let isAbsolute = false; - const code = path.charCodeAt(0); + const code = StringPrototypeCharCodeAt(path, 0); // Try to match a root if (len === 1) { @@ -181,32 +190,36 @@ const win32 = { // absolute path of some kind (UNC or otherwise) isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { + if (isPathSeparator(StringPrototypeCharCodeAt(path, 1))) { // Matched double path separator at beginning let j = 2; let last = j; // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { + while (j < len && + !isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j < len && j !== last) { - const firstPart = path.slice(last, j); + const firstPart = StringPrototypeSlice(path, last, j); // Matched! last = j; // Match 1 or more path separators - while (j < len && isPathSeparator(path.charCodeAt(j))) { + while (j < len && + isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { + while (j < len && + !isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j === len || j !== last) { // We matched a UNC root - device = `\\\\${firstPart}\\${path.slice(last, j)}`; + device = + `\\\\${firstPart}\\${StringPrototypeSlice(path, last, j)}`; rootEnd = j; } } @@ -215,11 +228,11 @@ const win32 = { rootEnd = 1; } } else if (isWindowsDeviceRoot(code) && - path.charCodeAt(1) === CHAR_COLON) { + StringPrototypeCharCodeAt(path, 1) === CHAR_COLON) { // Possible device root - device = path.slice(0, 2); + device = StringPrototypeSlice(path, 0, 2); rootEnd = 2; - if (len > 2 && isPathSeparator(path.charCodeAt(2))) { + if (len > 2 && isPathSeparator(StringPrototypeCharCodeAt(path, 2))) { // Treat separator following drive name as an absolute path // indicator isAbsolute = true; @@ -229,7 +242,8 @@ const win32 = { if (device.length > 0) { if (resolvedDevice.length > 0) { - if (device.toLowerCase() !== resolvedDevice.toLowerCase()) + if (StringPrototypeToLowerCase(device) !== + StringPrototypeToLowerCase(resolvedDevice)) // This path points to another device so it is not applicable continue; } else { @@ -241,7 +255,8 @@ const win32 = { if (resolvedDevice.length > 0) break; } else { - resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; + resolvedTail = + `${StringPrototypeSlice(path, rootEnd)}\\${resolvedTail}`; resolvedAbsolute = isAbsolute; if (isAbsolute && resolvedDevice.length > 0) { break; @@ -270,7 +285,7 @@ const win32 = { let rootEnd = 0; let device; let isAbsolute = false; - const code = path.charCodeAt(0); + const code = StringPrototypeCharCodeAt(path, 0); // Try to match a root if (len === 1) { @@ -285,38 +300,42 @@ const win32 = { // path of some kind (UNC or otherwise) isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { + if (isPathSeparator(StringPrototypeCharCodeAt(path, 1))) { // Matched double path separator at beginning let j = 2; let last = j; // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { + while (j < len && + !isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j < len && j !== last) { - const firstPart = path.slice(last, j); + const firstPart = StringPrototypeSlice(path, last, j); // Matched! last = j; // Match 1 or more path separators - while (j < len && isPathSeparator(path.charCodeAt(j))) { + while (j < len && + isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { + while (j < len && + !isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j === len) { // We matched a UNC root only // Return the normalized version of the UNC root since there // is nothing left to process - return `\\\\${firstPart}\\${path.slice(last)}\\`; + return `\\\\${firstPart}\\${StringPrototypeSlice(path, last)}\\`; } if (j !== last) { // We matched a UNC root with leftovers - device = `\\\\${firstPart}\\${path.slice(last, j)}`; + device = + `\\\\${firstPart}\\${StringPrototypeSlice(path, last, j)}`; rootEnd = j; } } @@ -324,11 +343,12 @@ const win32 = { } else { rootEnd = 1; } - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { + } else if (isWindowsDeviceRoot(code) && + StringPrototypeCharCodeAt(path, 1) === CHAR_COLON) { // Possible device root - device = path.slice(0, 2); + device = StringPrototypeSlice(path, 0, 2); rootEnd = 2; - if (len > 2 && isPathSeparator(path.charCodeAt(2))) { + if (len > 2 && isPathSeparator(StringPrototypeCharCodeAt(path, 2))) { // Treat separator following drive name as an absolute path // indicator isAbsolute = true; @@ -337,11 +357,13 @@ const win32 = { } let tail = rootEnd < len ? - normalizeString(path.slice(rootEnd), !isAbsolute, '\\', isPathSeparator) : + normalizeString(StringPrototypeSlice(path, rootEnd), + !isAbsolute, '\\', isPathSeparator) : ''; if (tail.length === 0 && !isAbsolute) tail = '.'; - if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) + if (tail.length > 0 && + isPathSeparator(StringPrototypeCharCodeAt(path, len - 1))) tail += '\\'; if (device === undefined) { return isAbsolute ? `\\${tail}` : tail; @@ -355,13 +377,13 @@ const win32 = { if (len === 0) return false; - const code = path.charCodeAt(0); + const code = StringPrototypeCharCodeAt(path, 0); return isPathSeparator(code) || // Possible device root (len > 2 && isWindowsDeviceRoot(code) && - path.charCodeAt(1) === CHAR_COLON && - isPathSeparator(path.charCodeAt(2))); + StringPrototypeCharCodeAt(path, 1) === CHAR_COLON && + isPathSeparator(StringPrototypeCharCodeAt(path, 2))); }, join(...args) { @@ -399,13 +421,14 @@ const win32 = { // path.join('//server', 'share') -> '\\\\server\\share\\') let needsReplace = true; let slashCount = 0; - if (isPathSeparator(firstPart.charCodeAt(0))) { + if (isPathSeparator(StringPrototypeCharCodeAt(firstPart, 0))) { ++slashCount; const firstLen = firstPart.length; - if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) { + if (firstLen > 1 && + isPathSeparator(StringPrototypeCharCodeAt(firstPart, 1))) { ++slashCount; if (firstLen > 2) { - if (isPathSeparator(firstPart.charCodeAt(2))) + if (isPathSeparator(StringPrototypeCharCodeAt(firstPart, 2))) ++slashCount; else { // We matched a UNC path in the first part @@ -417,13 +440,13 @@ const win32 = { if (needsReplace) { // Find any more consecutive slashes we need to replace while (slashCount < joined.length && - isPathSeparator(joined.charCodeAt(slashCount))) { + isPathSeparator(StringPrototypeCharCodeAt(joined, slashCount))) { slashCount++; } // Replace the slashes if needed if (slashCount >= 2) - joined = `\\${joined.slice(slashCount)}`; + joined = `\\${StringPrototypeSlice(joined, slashCount)}`; } return win32.normalize(joined); @@ -446,8 +469,8 @@ const win32 = { if (fromOrig === toOrig) return ''; - from = fromOrig.toLowerCase(); - to = toOrig.toLowerCase(); + from = StringPrototypeToLowerCase(fromOrig); + to = StringPrototypeToLowerCase(toOrig); if (from === to) return ''; @@ -455,13 +478,15 @@ const win32 = { // Trim any leading backslashes let fromStart = 0; while (fromStart < from.length && - from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) { + StringPrototypeCharCodeAt(from, fromStart) === CHAR_BACKWARD_SLASH) { fromStart++; } // Trim trailing backslashes (applicable to UNC paths only) let fromEnd = from.length; - while (fromEnd - 1 > fromStart && - from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) { + while ( + fromEnd - 1 > fromStart && + StringPrototypeCharCodeAt(from, fromEnd - 1) === CHAR_BACKWARD_SLASH + ) { fromEnd--; } const fromLen = fromEnd - fromStart; @@ -469,13 +494,13 @@ const win32 = { // Trim any leading backslashes let toStart = 0; while (toStart < to.length && - to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) { + StringPrototypeCharCodeAt(to, toStart) === CHAR_BACKWARD_SLASH) { toStart++; } // Trim trailing backslashes (applicable to UNC paths only) let toEnd = to.length; while (toEnd - 1 > toStart && - to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) { + StringPrototypeCharCodeAt(to, toEnd - 1) === CHAR_BACKWARD_SLASH) { toEnd--; } const toLen = toEnd - toStart; @@ -485,8 +510,8 @@ const win32 = { let lastCommonSep = -1; let i = 0; for (; i < length; i++) { - const fromCode = from.charCodeAt(fromStart + i); - if (fromCode !== to.charCodeAt(toStart + i)) + const fromCode = StringPrototypeCharCodeAt(from, fromStart + i); + if (fromCode !== StringPrototypeCharCodeAt(to, toStart + i)) break; else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i; @@ -499,19 +524,21 @@ const win32 = { return toOrig; } else { if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { + if (StringPrototypeCharCodeAt(to, toStart + i) === + CHAR_BACKWARD_SLASH) { // We get here if `from` is the exact base path for `to`. // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz' - return toOrig.slice(toStart + i + 1); + return StringPrototypeSlice(toOrig, toStart + i + 1); } if (i === 2) { // We get here if `from` is the device root. // For example: from='C:\\'; to='C:\\foo' - return toOrig.slice(toStart + i); + return StringPrototypeSlice(toOrig, toStart + i); } } if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { + if (StringPrototypeCharCodeAt(from, fromStart + i) === + CHAR_BACKWARD_SLASH) { // We get here if `to` is the exact base path for `from`. // For example: from='C:\\foo\\bar'; to='C:\\foo' lastCommonSep = i; @@ -529,7 +556,8 @@ const win32 = { // Generate the relative path based on the path difference between `to` and // `from` for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { + if (i === fromEnd || + StringPrototypeCharCodeAt(from, i) === CHAR_BACKWARD_SLASH) { out += out.length === 0 ? '..' : '\\..'; } } @@ -539,11 +567,11 @@ const win32 = { // Lastly, append the rest of the destination (`to`) path that comes after // the common path parts if (out.length > 0) - return `${out}${toOrig.slice(toStart, toEnd)}`; + return `${out}${StringPrototypeSlice(toOrig, toStart, toEnd)}`; - if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) + if (StringPrototypeCharCodeAt(toOrig, toStart) === CHAR_BACKWARD_SLASH) ++toStart; - return toOrig.slice(toStart, toEnd); + return StringPrototypeSlice(toOrig, toStart, toEnd); }, toNamespacedPath(path) { @@ -560,18 +588,20 @@ const win32 = { if (resolvedPath.length <= 2) return path; - if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { + if (StringPrototypeCharCodeAt(resolvedPath, 0) === CHAR_BACKWARD_SLASH) { // Possible UNC root - if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { - const code = resolvedPath.charCodeAt(2); + if (StringPrototypeCharCodeAt(resolvedPath, 1) === CHAR_BACKWARD_SLASH) { + const code = StringPrototypeCharCodeAt(resolvedPath, 2); if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { // Matched non-long UNC root, convert the path to a long UNC path - return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; + return `\\\\?\\UNC\\${StringPrototypeSlice(resolvedPath, 2)}`; } } - } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) && - resolvedPath.charCodeAt(1) === CHAR_COLON && - resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) { + } else if ( + isWindowsDeviceRoot(StringPrototypeCharCodeAt(resolvedPath, 0)) && + StringPrototypeCharCodeAt(resolvedPath, 1) === CHAR_COLON && + StringPrototypeCharCodeAt(resolvedPath, 2) === CHAR_BACKWARD_SLASH + ) { // Matched device root, convert the path to a long UNC path return `\\\\?\\${resolvedPath}`; } @@ -586,7 +616,7 @@ const win32 = { return '.'; let rootEnd = -1; let offset = 0; - const code = path.charCodeAt(0); + const code = StringPrototypeCharCodeAt(path, 0); if (len === 1) { // `path` contains just a path separator, exit early to avoid @@ -600,26 +630,29 @@ const win32 = { rootEnd = offset = 1; - if (isPathSeparator(path.charCodeAt(1))) { + if (isPathSeparator(StringPrototypeCharCodeAt(path, 1))) { // Matched double path separator at beginning let j = 2; let last = j; // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { + while (j < len && + !isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more path separators - while (j < len && isPathSeparator(path.charCodeAt(j))) { + while (j < len && + isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { + while (j < len && + !isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j === len) { @@ -637,15 +670,17 @@ const win32 = { } } // Possible device root - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2; + } else if (isWindowsDeviceRoot(code) && + StringPrototypeCharCodeAt(path, 1) === CHAR_COLON) { + rootEnd = + len > 2 && isPathSeparator(StringPrototypeCharCodeAt(path, 2)) ? 3 : 2; offset = rootEnd; } let end = -1; let matchedSlash = true; for (let i = len - 1; i >= offset; --i) { - if (isPathSeparator(path.charCodeAt(i))) { + if (isPathSeparator(StringPrototypeCharCodeAt(path, i))) { if (!matchedSlash) { end = i; break; @@ -662,7 +697,7 @@ const win32 = { end = rootEnd; } - return path.slice(0, end); + return StringPrototypeSlice(path, 0, end); }, basename(path, ext) { @@ -677,8 +712,8 @@ const win32 = { // path separator as an extra separator at the end of the path that can be // disregarded if (path.length >= 2 && - isWindowsDeviceRoot(path.charCodeAt(0)) && - path.charCodeAt(1) === CHAR_COLON) { + isWindowsDeviceRoot(StringPrototypeCharCodeAt(path, 0)) && + StringPrototypeCharCodeAt(path, 1) === CHAR_COLON) { start = 2; } @@ -688,7 +723,7 @@ const win32 = { let extIdx = ext.length - 1; let firstNonSlashEnd = -1; for (let i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); + const code = StringPrototypeCharCodeAt(path, i); if (isPathSeparator(code)) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now @@ -705,7 +740,7 @@ const win32 = { } if (extIdx >= 0) { // Try to match the explicit extension - if (code === ext.charCodeAt(extIdx)) { + if (code === StringPrototypeCharCodeAt(ext, extIdx)) { if (--extIdx === -1) { // We matched the extension, so mark this as the end of our path // component @@ -725,10 +760,10 @@ const win32 = { end = firstNonSlashEnd; else if (end === -1) end = path.length; - return path.slice(start, end); + return StringPrototypeSlice(path, start, end); } for (let i = path.length - 1; i >= start; --i) { - if (isPathSeparator(path.charCodeAt(i))) { + if (isPathSeparator(StringPrototypeCharCodeAt(path, i))) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { @@ -745,7 +780,7 @@ const win32 = { if (end === -1) return ''; - return path.slice(start, end); + return StringPrototypeSlice(path, start, end); }, extname(path) { @@ -764,13 +799,13 @@ const win32 = { // disregarded if (path.length >= 2 && - path.charCodeAt(1) === CHAR_COLON && - isWindowsDeviceRoot(path.charCodeAt(0))) { + StringPrototypeCharCodeAt(path, 1) === CHAR_COLON && + isWindowsDeviceRoot(StringPrototypeCharCodeAt(path, 0))) { start = startPart = 2; } for (let i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); + const code = StringPrototypeCharCodeAt(path, i); if (isPathSeparator(code)) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now @@ -809,10 +844,10 @@ const win32 = { startDot === startPart + 1)) { return ''; } - return path.slice(startDot, end); + return StringPrototypeSlice(path, startDot, end); }, - format: _format.bind(null, '\\'), + format: FunctionPrototypeBind(_format, null, '\\'), parse(path) { validateString(path, 'path'); @@ -823,7 +858,7 @@ const win32 = { const len = path.length; let rootEnd = 0; - let code = path.charCodeAt(0); + let code = StringPrototypeCharCodeAt(path, 0); if (len === 1) { if (isPathSeparator(code)) { @@ -840,26 +875,29 @@ const win32 = { // Possible UNC root rootEnd = 1; - if (isPathSeparator(path.charCodeAt(1))) { + if (isPathSeparator(StringPrototypeCharCodeAt(path, 1))) { // Matched double path separator at beginning let j = 2; let last = j; // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { + while (j < len && + !isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more path separators - while (j < len && isPathSeparator(path.charCodeAt(j))) { + while (j < len && + isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j < len && j !== last) { // Matched! last = j; // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { + while (j < len && + !isPathSeparator(StringPrototypeCharCodeAt(path, j))) { j++; } if (j === len) { @@ -872,7 +910,8 @@ const win32 = { } } } - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { + } else if (isWindowsDeviceRoot(code) && + StringPrototypeCharCodeAt(path, 1) === CHAR_COLON) { // Possible device root if (len <= 2) { // `path` contains just a drive root, exit early to avoid @@ -881,7 +920,7 @@ const win32 = { return ret; } rootEnd = 2; - if (isPathSeparator(path.charCodeAt(2))) { + if (isPathSeparator(StringPrototypeCharCodeAt(path, 2))) { if (len === 3) { // `path` contains just a drive root, exit early to avoid // unnecessary work @@ -892,7 +931,7 @@ const win32 = { } } if (rootEnd > 0) - ret.root = path.slice(0, rootEnd); + ret.root = StringPrototypeSlice(path, 0, rootEnd); let startDot = -1; let startPart = rootEnd; @@ -906,7 +945,7 @@ const win32 = { // Get non-dir info for (; i >= rootEnd; --i) { - code = path.charCodeAt(i); + code = StringPrototypeCharCodeAt(path, i); if (isPathSeparator(code)) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now @@ -943,11 +982,11 @@ const win32 = { (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) { - ret.base = ret.name = path.slice(startPart, end); + ret.base = ret.name = StringPrototypeSlice(path, startPart, end); } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - ret.ext = path.slice(startDot, end); + ret.name = StringPrototypeSlice(path, startPart, startDot); + ret.base = StringPrototypeSlice(path, startPart, end); + ret.ext = StringPrototypeSlice(path, startDot, end); } } @@ -955,7 +994,7 @@ const win32 = { // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the // trailing slash (`C:\abc\def` -> `C:\abc`). if (startPart > 0 && startPart !== rootEnd) - ret.dir = path.slice(0, startPart - 1); + ret.dir = StringPrototypeSlice(path, 0, startPart - 1); else ret.dir = ret.root; @@ -985,7 +1024,8 @@ const posix = { } resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; + resolvedAbsolute = + StringPrototypeCharCodeAt(path, 0) === CHAR_FORWARD_SLASH; } // At this point the path should be resolved to a full absolute path, but @@ -1007,9 +1047,10 @@ const posix = { if (path.length === 0) return '.'; - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; + const isAbsolute = + StringPrototypeCharCodeAt(path, 0) === CHAR_FORWARD_SLASH; const trailingSeparator = - path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH; + StringPrototypeCharCodeAt(path, path.length - 1) === CHAR_FORWARD_SLASH; // Normalize the path path = normalizeString(path, !isAbsolute, '/', isPosixPathSeparator); @@ -1027,7 +1068,8 @@ const posix = { isAbsolute(path) { validateString(path, 'path'); - return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH; + return path.length > 0 && + StringPrototypeCharCodeAt(path, 0) === CHAR_FORWARD_SLASH; }, join(...args) { @@ -1074,26 +1116,27 @@ const posix = { let lastCommonSep = -1; let i = 0; for (; i < length; i++) { - const fromCode = from.charCodeAt(fromStart + i); - if (fromCode !== to.charCodeAt(toStart + i)) + const fromCode = StringPrototypeCharCodeAt(from, fromStart + i); + if (fromCode !== StringPrototypeCharCodeAt(to, toStart + i)) break; else if (fromCode === CHAR_FORWARD_SLASH) lastCommonSep = i; } if (i === length) { if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) { + if (StringPrototypeCharCodeAt(to, toStart + i) === CHAR_FORWARD_SLASH) { // We get here if `from` is the exact base path for `to`. // For example: from='/foo/bar'; to='/foo/bar/baz' - return to.slice(toStart + i + 1); + return StringPrototypeSlice(to, toStart + i + 1); } if (i === 0) { // We get here if `from` is the root // For example: from='/'; to='/foo' - return to.slice(toStart + i); + return StringPrototypeSlice(to, toStart + i); } } else if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) { + if (StringPrototypeCharCodeAt(from, fromStart + i) === + CHAR_FORWARD_SLASH) { // We get here if `to` is the exact base path for `from`. // For example: from='/foo/bar/baz'; to='/foo/bar' lastCommonSep = i; @@ -1109,14 +1152,15 @@ const posix = { // Generate the relative path based on the path difference between `to` // and `from`. for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) { + if (i === fromEnd || + StringPrototypeCharCodeAt(from, i) === CHAR_FORWARD_SLASH) { out += out.length === 0 ? '..' : '/..'; } } // Lastly, append the rest of the destination (`to`) path that comes after // the common path parts. - return `${out}${to.slice(toStart + lastCommonSep)}`; + return `${out}${StringPrototypeSlice(to, toStart + lastCommonSep)}`; }, toNamespacedPath(path) { @@ -1128,11 +1172,11 @@ const posix = { validateString(path, 'path'); if (path.length === 0) return '.'; - const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH; + const hasRoot = StringPrototypeCharCodeAt(path, 0) === CHAR_FORWARD_SLASH; let end = -1; let matchedSlash = true; for (let i = path.length - 1; i >= 1; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { + if (StringPrototypeCharCodeAt(path, i) === CHAR_FORWARD_SLASH) { if (!matchedSlash) { end = i; break; @@ -1147,7 +1191,7 @@ const posix = { return hasRoot ? '/' : '.'; if (hasRoot && end === 1) return '//'; - return path.slice(0, end); + return StringPrototypeSlice(path, 0, end); }, basename(path, ext) { @@ -1165,7 +1209,7 @@ const posix = { let extIdx = ext.length - 1; let firstNonSlashEnd = -1; for (let i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); + const code = StringPrototypeCharCodeAt(path, i); if (code === CHAR_FORWARD_SLASH) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now @@ -1182,7 +1226,7 @@ const posix = { } if (extIdx >= 0) { // Try to match the explicit extension - if (code === ext.charCodeAt(extIdx)) { + if (code === StringPrototypeCharCodeAt(ext, extIdx)) { if (--extIdx === -1) { // We matched the extension, so mark this as the end of our path // component @@ -1202,10 +1246,10 @@ const posix = { end = firstNonSlashEnd; else if (end === -1) end = path.length; - return path.slice(start, end); + return StringPrototypeSlice(path, start, end); } for (let i = path.length - 1; i >= 0; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { + if (StringPrototypeCharCodeAt(path, i) === CHAR_FORWARD_SLASH) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { @@ -1222,7 +1266,7 @@ const posix = { if (end === -1) return ''; - return path.slice(start, end); + return StringPrototypeSlice(path, start, end); }, extname(path) { @@ -1235,7 +1279,7 @@ const posix = { // after any path separator we find let preDotState = 0; for (let i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); + const code = StringPrototypeCharCodeAt(path, i); if (code === CHAR_FORWARD_SLASH) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now @@ -1274,7 +1318,7 @@ const posix = { startDot === startPart + 1)) { return ''; } - return path.slice(startDot, end); + return StringPrototypeSlice(path, startDot, end); }, format: _format.bind(null, '/'), @@ -1285,7 +1329,8 @@ const posix = { const ret = { root: '', dir: '', base: '', ext: '', name: '' }; if (path.length === 0) return ret; - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; + const isAbsolute = + StringPrototypeCharCodeAt(path, 0) === CHAR_FORWARD_SLASH; let start; if (isAbsolute) { ret.root = '/'; @@ -1305,7 +1350,7 @@ const posix = { // Get non-dir info for (; i >= start; --i) { - const code = path.charCodeAt(i); + const code = StringPrototypeCharCodeAt(path, i); if (code === CHAR_FORWARD_SLASH) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now @@ -1343,16 +1388,16 @@ const posix = { (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) { - ret.base = ret.name = path.slice(start, end); + ret.base = ret.name = StringPrototypeSlice(path, start, end); } else { - ret.name = path.slice(start, startDot); - ret.base = path.slice(start, end); - ret.ext = path.slice(startDot, end); + ret.name = StringPrototypeSlice(path, start, startDot); + ret.base = StringPrototypeSlice(path, start, end); + ret.ext = StringPrototypeSlice(path, startDot, end); } } if (startPart > 0) - ret.dir = path.slice(0, startPart - 1); + ret.dir = StringPrototypeSlice(path, 0, startPart - 1); else if (isAbsolute) ret.dir = '/'; diff --git a/lib/path/posix.js b/lib/path/posix.js new file mode 100644 index 00000000000000..aa8988d38481b2 --- /dev/null +++ b/lib/path/posix.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('path').posix; diff --git a/lib/path/win32.js b/lib/path/win32.js new file mode 100644 index 00000000000000..acb113aaae51ac --- /dev/null +++ b/lib/path/win32.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('path').win32; diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js index 3fd7e7eded0352..7429db38fd77ef 100644 --- a/lib/perf_hooks.js +++ b/lib/perf_hooks.js @@ -2,12 +2,18 @@ const { ArrayIsArray, + ArrayPrototypeFilter, + ArrayPrototypeIncludes, + ArrayPrototypeMap, + ArrayPrototypePush, + ArrayPrototypeSplice, + ArrayPrototypeUnshift, Boolean, NumberIsSafeInteger, ObjectDefineProperties, ObjectDefineProperty, ObjectKeys, - Set, + SafeSet, Symbol, } = primordials; @@ -46,7 +52,6 @@ const { NODE_PERFORMANCE_MILESTONE_ENVIRONMENT } = constants; -const { AsyncResource } = require('async_hooks'); const L = require('internal/linkedlist'); const kInspect = require('internal/util').customInspectSymbol; @@ -166,50 +171,94 @@ function getMilestoneTimestamp(milestoneIdx) { } class PerformanceNodeTiming extends PerformanceEntry { - get name() { - return 'node'; - } + constructor() { + super(); - get entryType() { - return 'node'; - } + ObjectDefineProperties(this, { + name: { + enumerable: true, + configurable: true, + value: 'node' + }, - get startTime() { - return 0; - } + entryType: { + enumerable: true, + configurable: true, + value: 'node' + }, - get duration() { - return now() - timeOrigin; - } + startTime: { + enumerable: true, + configurable: true, + value: 0 + }, - get nodeStart() { - return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_NODE_START); - } + duration: { + enumerable: true, + configurable: true, + get() { + return now() - timeOrigin; + } + }, - get v8Start() { - return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_V8_START); - } + nodeStart: { + enumerable: true, + configurable: true, + get() { + return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_NODE_START); + } + }, - get environment() { - return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_ENVIRONMENT); - } + v8Start: { + enumerable: true, + configurable: true, + get() { + return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_V8_START); + } + }, - get loopStart() { - return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_START); - } + environment: { + enumerable: true, + configurable: true, + get() { + return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_ENVIRONMENT); + } + }, - get loopExit() { - return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_EXIT); - } + loopStart: { + enumerable: true, + configurable: true, + get() { + return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_START); + } + }, - get bootstrapComplete() { - return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE); - } + loopExit: { + enumerable: true, + configurable: true, + get() { + return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_EXIT); + } + }, - get idleTime() { - return loopIdleTime(); - } + bootstrapComplete: { + enumerable: true, + configurable: true, + get() { + return getMilestoneTimestamp( + NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE); + } + }, + idleTime: { + enumerable: true, + configurable: true, + get() { + return loopIdleTime(); + } + } + }); + } [kInspect]() { return { name: 'node', @@ -290,12 +339,11 @@ class PerformanceObserverEntryList { } } -class PerformanceObserver extends AsyncResource { +class PerformanceObserver { constructor(callback) { if (typeof callback !== 'function') { throw new ERR_INVALID_CALLBACK(callback); } - super('PerformanceObserver'); ObjectDefineProperties(this, { [kTypes]: { enumerable: false, @@ -350,7 +398,9 @@ class PerformanceObserver extends AsyncResource { if (!ArrayIsArray(entryTypes)) { throw new ERR_INVALID_ARG_VALUE('options.entryTypes', entryTypes); } - const filteredEntryTypes = entryTypes.filter(filterTypes).map(mapTypes); + const filteredEntryTypes = + ArrayPrototypeMap(ArrayPrototypeFilter(entryTypes, filterTypes), + mapTypes); if (filteredEntryTypes.length === 0) { throw new ERR_VALID_PERFORMANCE_ENTRY_TYPE(); } @@ -377,7 +427,7 @@ class PerformanceObserver extends AsyncResource { class Performance { constructor() { this[kIndex] = { - [kMarks]: new Set() + [kMarks]: new SafeSet() }; } @@ -501,10 +551,7 @@ function getObserversList(type) { function doNotify(observer) { observer[kQueued] = false; - observer.runInAsyncScope(observer[kCallback], - observer, - observer[kBuffer], - observer); + observer[kCallback](observer[kBuffer], observer); observer[kBuffer][kEntries] = []; L.init(observer[kBuffer][kEntries]); } @@ -544,7 +591,7 @@ function observersCallback(entry) { setupObservers(observersCallback); function filterTypes(i) { - return observerableTypes.indexOf(`${i}`) >= 0; + return ArrayPrototypeIncludes(observerableTypes, `${i}`); } function mapTypes(i) { @@ -582,15 +629,15 @@ function sortedInsert(list, entry) { const entryStartTime = entry.startTime; if (list.length === 0 || (list[list.length - 1].startTime < entryStartTime)) { - list.push(entry); + ArrayPrototypePush(list, entry); return; } if (list[0] && (list[0].startTime > entryStartTime)) { - list.unshift(entry); + ArrayPrototypeUnshift(list, entry); return; } const location = getInsertLocation(list, entryStartTime); - list.splice(location, 0, entry); + ArrayPrototypeSplice(list, location, 0, entry); } class ELDHistogram extends Histogram { diff --git a/lib/querystring.js b/lib/querystring.js index 04a21e8d07f24f..658c9c052fe9b6 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -26,10 +26,14 @@ const { Array, ArrayIsArray, + Int8Array, MathAbs, + NumberIsFinite, ObjectCreate, ObjectKeys, String, + StringPrototypeCharCodeAt, + StringPrototypeSlice, } = primordials; const { Buffer } = require('buffer'); @@ -53,7 +57,7 @@ const QueryString = module.exports = { decode: parse }; -const unhexTable = [ +const unhexTable = new Int8Array([ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0 - 15 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 16 - 31 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 32 - 47 @@ -70,7 +74,7 @@ const unhexTable = [ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // ... 255 -]; +]); // A safe fast alternative to decodeURIComponent function unescapeBuffer(s, decodeSpaces) { const out = Buffer.allocUnsafe(s.length); @@ -84,20 +88,20 @@ function unescapeBuffer(s, decodeSpaces) { // Flag to know if some hex chars have been decoded let hasHex = false; while (index < s.length) { - currentChar = s.charCodeAt(index); + currentChar = StringPrototypeCharCodeAt(s, index); if (currentChar === 43 /* '+' */ && decodeSpaces) { out[outIndex++] = 32; // ' ' index++; continue; } if (currentChar === 37 /* '%' */ && index < maxLength) { - currentChar = s.charCodeAt(++index); + currentChar = StringPrototypeCharCodeAt(s, ++index); hexHigh = unhexTable[currentChar]; if (!(hexHigh >= 0)) { out[outIndex++] = 37; // '%' continue; } else { - nextChar = s.charCodeAt(++index); + nextChar = StringPrototypeCharCodeAt(s, ++index); hexLow = unhexTable[nextChar]; if (!(hexLow >= 0)) { out[outIndex++] = 37; // '%' @@ -130,7 +134,7 @@ function qsUnescape(s, decodeSpaces) { // digits // alpha (uppercase) // alpha (lowercase) -const noEscape = [ +const noEscape = new Int8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, // 32 - 47 @@ -139,7 +143,7 @@ const noEscape = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 80 - 95 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0 // 112 - 127 -]; +]); // QueryString.escape() replaces encodeURIComponent() // https://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3.4 function qsEscape(str) { @@ -156,7 +160,9 @@ function qsEscape(str) { function stringifyPrimitive(v) { if (typeof v === 'string') return v; - if (typeof v === 'number' && isFinite(v)) + if (typeof v === 'number' && NumberIsFinite(v)) + return '' + v; + if (typeof v === 'bigint') return '' + v; if (typeof v === 'boolean') return v ? 'true' : 'false'; @@ -167,11 +173,13 @@ function stringifyPrimitive(v) { function encodeStringified(v, encode) { if (typeof v === 'string') return (v.length ? encode(v) : ''); - if (typeof v === 'number' && isFinite(v)) { + if (typeof v === 'number' && NumberIsFinite(v)) { // Values >= 1e21 automatically switch to scientific notation which requires // escaping due to the inclusion of a '+' in the output return (MathAbs(v) < 1e21 ? '' + v : encode('' + v)); } + if (typeof v === 'bigint') + return '' + v; if (typeof v === 'boolean') return v ? 'true' : 'false'; return ''; @@ -229,10 +237,10 @@ function stringify(obj, sep, eq, options) { function charCodes(str) { if (str.length === 0) return []; - if (str.length === 1) return [str.charCodeAt(0)]; + if (str.length === 1) return [StringPrototypeCharCodeAt(str, 0)]; const ret = new Array(str.length); for (let i = 0; i < str.length; ++i) - ret[i] = str.charCodeAt(i); + ret[i] = StringPrototypeCharCodeAt(str, i); return ret; } const defSepCodes = [38]; // & @@ -266,8 +274,8 @@ function parse(qs, sep, eq, options) { return obj; } - const sepCodes = (!sep ? defSepCodes : charCodes(sep + '')); - const eqCodes = (!eq ? defEqCodes : charCodes(eq + '')); + const sepCodes = (!sep ? defSepCodes : charCodes(String(sep))); + const eqCodes = (!eq ? defEqCodes : charCodes(String(eq))); const sepLen = sepCodes.length; const eqLen = eqCodes.length; @@ -298,7 +306,7 @@ function parse(qs, sep, eq, options) { const plusChar = (customDecode ? '%20' : ' '); let encodeCheck = 0; for (let i = 0; i < qs.length; ++i) { - const code = qs.charCodeAt(i); + const code = StringPrototypeCharCodeAt(qs, i); // Try matching key/value pair separator (e.g. '&') if (code === sepCodes[sepIdx]) { @@ -309,7 +317,7 @@ function parse(qs, sep, eq, options) { // We didn't find the (entire) key/value separator if (lastPos < end) { // Treat the substring as part of the key instead of the value - key += qs.slice(lastPos, end); + key += StringPrototypeSlice(qs, lastPos, end); } else if (key.length === 0) { // We saw an empty substring between separators if (--pairs === 0) @@ -319,7 +327,7 @@ function parse(qs, sep, eq, options) { continue; } } else if (lastPos < end) { - value += qs.slice(lastPos, end); + value += StringPrototypeSlice(qs, lastPos, end); } addKeyVal(obj, key, value, keyEncoded, valEncoded, decode); @@ -341,7 +349,7 @@ function parse(qs, sep, eq, options) { // Key/value separator match! const end = i - eqIdx + 1; if (lastPos < end) - key += qs.slice(lastPos, end); + key += StringPrototypeSlice(qs, lastPos, end); encodeCheck = 0; lastPos = i + 1; } @@ -367,7 +375,7 @@ function parse(qs, sep, eq, options) { } if (code === 43/* + */) { if (lastPos < i) - key += qs.slice(lastPos, i); + key += StringPrototypeSlice(qs, lastPos, i); key += plusChar; lastPos = i + 1; continue; @@ -375,7 +383,7 @@ function parse(qs, sep, eq, options) { } if (code === 43/* + */) { if (lastPos < i) - value += qs.slice(lastPos, i); + value += StringPrototypeSlice(qs, lastPos, i); value += plusChar; lastPos = i + 1; } else if (!valEncoded) { @@ -398,9 +406,9 @@ function parse(qs, sep, eq, options) { // Deal with any leftover key or value data if (lastPos < qs.length) { if (eqIdx < eqLen) - key += qs.slice(lastPos); + key += StringPrototypeSlice(qs, lastPos); else if (sepIdx < sepLen) - value += qs.slice(lastPos); + value += StringPrototypeSlice(qs, lastPos); } else if (eqIdx === 0 && key.length === 0) { // We ended on an empty substring return obj; diff --git a/lib/readline.js b/lib/readline.js index 109acc30819167..598f9349bb3c0b 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -28,7 +28,18 @@ 'use strict'; const { + ArrayFrom, + ArrayPrototypeFilter, + ArrayPrototypeIndexOf, + ArrayPrototypeJoin, + ArrayPrototypeMap, + ArrayPrototypePop, + ArrayPrototypeReverse, + ArrayPrototypeSplice, + ArrayPrototypeUnshift, DateNow, + FunctionPrototypeBind, + FunctionPrototypeCall, MathCeil, MathFloor, MathMax, @@ -36,8 +47,19 @@ const { NumberIsNaN, ObjectDefineProperty, ObjectSetPrototypeOf, + RegExpPrototypeTest, + StringPrototypeCodePointAt, + StringPrototypeEndsWith, + StringPrototypeMatch, + StringPrototypeRepeat, + StringPrototypeReplace, + StringPrototypeSlice, + StringPrototypeSplit, + StringPrototypeStartsWith, + StringPrototypeTrim, Symbol, SymbolAsyncIterator, + SafeStringIterator, } = primordials; const { @@ -110,7 +132,7 @@ function Interface(input, output, completer, terminal) { this.escapeCodeTimeout = ESCAPE_CODE_TIMEOUT; this.tabSize = 8; - EventEmitter.call(this); + FunctionPrototypeCall(EventEmitter, this,); let historySize; let removeHistoryDuplicates = false; let crlfDelay; @@ -187,7 +209,11 @@ function Interface(input, output, completer, terminal) { this.terminal = !!terminal; if (process.env.TERM === 'dumb') { - this._ttyWrite = _ttyWriteDumb.bind(this); + this._ttyWrite = FunctionPrototypeBind(_ttyWriteDumb, this); + } + + function onerror(err) { + self.emit('error', err); } function ondata(data) { @@ -215,7 +241,7 @@ function Interface(input, output, completer, terminal) { // If the key.sequence is half of a surrogate pair // (>= 0xd800 and <= 0xdfff), refresh the line so // the character is displayed appropriately. - const ch = key.sequence.codePointAt(0); + const ch = StringPrototypeCodePointAt(key.sequence, 0); if (ch >= 0xd800 && ch <= 0xdfff) self._refreshLine(); } @@ -227,9 +253,12 @@ function Interface(input, output, completer, terminal) { this[kLineObjectStream] = undefined; + input.on('error', onerror); + if (!this.terminal) { function onSelfCloseWithoutTerminal() { input.removeListener('data', ondata); + input.removeListener('error', onerror); input.removeListener('end', onend); } @@ -240,6 +269,7 @@ function Interface(input, output, completer, terminal) { } else { function onSelfCloseWithTerminal() { input.removeListener('keypress', onkeypress); + input.removeListener('error', onerror); input.removeListener('end', ontermend); if (output !== null && output !== undefined) { output.removeListener('resize', onresize); @@ -291,6 +321,11 @@ Interface.prototype.setPrompt = function(prompt) { }; +Interface.prototype.getPrompt = function() { + return this._prompt; +}; + + Interface.prototype._setRawMode = function(mode) { const wasInRawMode = this.input.isRaw; @@ -353,19 +388,19 @@ Interface.prototype._addHistory = function() { if (this.historySize === 0) return this.line; // If the trimmed line is empty then return the line - if (this.line.trim().length === 0) return this.line; + if (StringPrototypeTrim(this.line).length === 0) return this.line; if (this.history.length === 0 || this.history[0] !== this.line) { if (this.removeHistoryDuplicates) { // Remove older history line if identical to new one - const dupIndex = this.history.indexOf(this.line); - if (dupIndex !== -1) this.history.splice(dupIndex, 1); + const dupIndex = ArrayPrototypeIndexOf(this.history, this.line); + if (dupIndex !== -1) ArrayPrototypeSplice(this.history, dupIndex, 1); } - this.history.unshift(this.line); + ArrayPrototypeUnshift(this.history, this.line); // Only store so many - if (this.history.length > this.historySize) this.history.pop(); + if (this.history.length > this.historySize) ArrayPrototypePop(this.history); } this.historyIndex = -1; @@ -459,24 +494,24 @@ Interface.prototype._normalWrite = function(b) { let string = this._decoder.write(b); if (this._sawReturnAt && DateNow() - this._sawReturnAt <= this.crlfDelay) { - string = string.replace(/^\n/, ''); + string = StringPrototypeReplace(string, /^\n/, ''); this._sawReturnAt = 0; } // Run test() on the new string chunk, not on the entire line buffer. - const newPartContainsEnding = lineEnding.test(string); + const newPartContainsEnding = RegExpPrototypeTest(lineEnding, string); if (this._line_buffer) { string = this._line_buffer + string; this._line_buffer = null; } if (newPartContainsEnding) { - this._sawReturnAt = string.endsWith('\r') ? DateNow() : 0; + this._sawReturnAt = StringPrototypeEndsWith(string, '\r') ? DateNow() : 0; // Got one or more newlines; process into "line" events - const lines = string.split(lineEnding); + const lines = StringPrototypeSplit(string, lineEnding); // Either '' or (conceivably) the unfinished portion of the next line - string = lines.pop(); + string = ArrayPrototypePop(lines); this._line_buffer = string; for (let n = 0; n < lines.length; n++) this._onLine(lines[n]); @@ -488,8 +523,8 @@ Interface.prototype._normalWrite = function(b) { Interface.prototype._insertString = function(c) { if (this.cursor < this.line.length) { - const beg = this.line.slice(0, this.cursor); - const end = this.line.slice(this.cursor, this.line.length); + const beg = StringPrototypeSlice(this.line, 0, this.cursor); + const end = StringPrototypeSlice(this.line, this.cursor, this.line.length); this.line = beg + c + end; this.cursor += c.length; this._refreshLine(); @@ -507,7 +542,8 @@ Interface.prototype._insertString = function(c) { Interface.prototype._tabComplete = function(lastKeypressWasTab) { this.pause(); - this.completer(this.line.slice(0, this.cursor), (err, value) => { + const string = StringPrototypeSlice(this.line, 0, this.cursor); + this.completer(string, (err, value) => { this.resume(); if (err) { @@ -523,9 +559,10 @@ Interface.prototype._tabComplete = function(lastKeypressWasTab) { } // If there is a common prefix to all matches, then apply that portion. - const prefix = commonPrefix(completions.filter((e) => e !== '')); + const prefix = commonPrefix(ArrayPrototypeFilter(completions, + (e) => e !== '')); if (prefix.length > completeOn.length) { - this._insertString(prefix.slice(completeOn.length)); + this._insertString(StringPrototypeSlice(prefix, completeOn.length)); return; } @@ -534,7 +571,8 @@ Interface.prototype._tabComplete = function(lastKeypressWasTab) { } // Apply/show completions. - const completionsWidth = completions.map((e) => getStringWidth(e)); + const completionsWidth = ArrayPrototypeMap(completions, + (e) => getStringWidth(e)); const width = MathMax(...completionsWidth) + 2; // 2 space padding let maxColumns = MathFloor(this.columns / width) || 1; if (maxColumns === Infinity) { @@ -550,7 +588,7 @@ Interface.prototype._tabComplete = function(lastKeypressWasTab) { lineIndex = 0; whitespace = 0; } else { - output += ' '.repeat(whitespace); + output += StringPrototypeRepeat(' ', whitespace); } if (completion !== '') { output += completion; @@ -572,9 +610,10 @@ Interface.prototype._wordLeft = function() { if (this.cursor > 0) { // Reverse the string and match a word near beginning // to avoid quadratic time complexity - const leading = this.line.slice(0, this.cursor); - const reversed = leading.split('').reverse().join(''); - const match = reversed.match(/^\s*(?:[^\w\s]+|\w+)?/); + const leading = StringPrototypeSlice(this.line, 0, this.cursor); + const reversed = ArrayPrototypeJoin( + ArrayPrototypeReverse(ArrayFrom(leading)), ''); + const match = StringPrototypeMatch(reversed, /^\s*(?:[^\w\s]+|\w+)?/); this._moveCursor(-match[0].length); } }; @@ -582,8 +621,8 @@ Interface.prototype._wordLeft = function() { Interface.prototype._wordRight = function() { if (this.cursor < this.line.length) { - const trailing = this.line.slice(this.cursor); - const match = trailing.match(/^(?:\s+|[^\w\s]+|\w+)\s*/); + const trailing = StringPrototypeSlice(this.line, this.cursor); + const match = StringPrototypeMatch(trailing, /^(?:\s+|[^\w\s]+|\w+)\s*/); this._moveCursor(match[0].length); } }; @@ -592,8 +631,8 @@ Interface.prototype._deleteLeft = function() { if (this.cursor > 0 && this.line.length > 0) { // The number of UTF-16 units comprising the character to the left const charSize = charLengthLeft(this.line, this.cursor); - this.line = this.line.slice(0, this.cursor - charSize) + - this.line.slice(this.cursor, this.line.length); + this.line = StringPrototypeSlice(this.line, 0, this.cursor - charSize) + + StringPrototypeSlice(this.line, this.cursor, this.line.length); this.cursor -= charSize; this._refreshLine(); @@ -605,8 +644,8 @@ Interface.prototype._deleteRight = function() { if (this.cursor < this.line.length) { // The number of UTF-16 units comprising the character to the left const charSize = charLengthAt(this.line, this.cursor); - this.line = this.line.slice(0, this.cursor) + - this.line.slice(this.cursor + charSize, this.line.length); + this.line = StringPrototypeSlice(this.line, 0, this.cursor) + + StringPrototypeSlice(this.line, this.cursor + charSize, this.line.length); this._refreshLine(); } }; @@ -616,11 +655,14 @@ Interface.prototype._deleteWordLeft = function() { if (this.cursor > 0) { // Reverse the string and match a word near beginning // to avoid quadratic time complexity - let leading = this.line.slice(0, this.cursor); - const reversed = leading.split('').reverse().join(''); - const match = reversed.match(/^\s*(?:[^\w\s]+|\w+)?/); - leading = leading.slice(0, leading.length - match[0].length); - this.line = leading + this.line.slice(this.cursor, this.line.length); + let leading = StringPrototypeSlice(this.line, 0, this.cursor); + const reversed = ArrayPrototypeJoin( + ArrayPrototypeReverse(ArrayFrom(leading)), ''); + const match = StringPrototypeMatch(reversed, /^\s*(?:[^\w\s]+|\w+)?/); + leading = StringPrototypeSlice(leading, 0, + leading.length - match[0].length); + this.line = leading + StringPrototypeSlice(this.line, this.cursor, + this.line.length); this.cursor = leading.length; this._refreshLine(); } @@ -629,24 +671,24 @@ Interface.prototype._deleteWordLeft = function() { Interface.prototype._deleteWordRight = function() { if (this.cursor < this.line.length) { - const trailing = this.line.slice(this.cursor); - const match = trailing.match(/^(?:\s+|\W+|\w+)\s*/); - this.line = this.line.slice(0, this.cursor) + - trailing.slice(match[0].length); + const trailing = StringPrototypeSlice(this.line, this.cursor); + const match = StringPrototypeMatch(trailing, /^(?:\s+|\W+|\w+)\s*/); + this.line = StringPrototypeSlice(this.line, 0, this.cursor) + + StringPrototypeSlice(trailing, match[0].length); this._refreshLine(); } }; Interface.prototype._deleteLineLeft = function() { - this.line = this.line.slice(this.cursor); + this.line = StringPrototypeSlice(this.line, this.cursor); this.cursor = 0; this._refreshLine(); }; Interface.prototype._deleteLineRight = function() { - this.line = this.line.slice(0, this.cursor); + this.line = StringPrototypeSlice(this.line, 0, this.cursor); this._refreshLine(); }; @@ -678,7 +720,7 @@ Interface.prototype._historyNext = function() { const search = this[kSubstringSearch] || ''; let index = this.historyIndex - 1; while (index >= 0 && - (!this.history[index].startsWith(search) || + (!StringPrototypeStartsWith(this.history[index], search) || this.line === this.history[index])) { index--; } @@ -698,7 +740,7 @@ Interface.prototype._historyPrev = function() { const search = this[kSubstringSearch] || ''; let index = this.historyIndex + 1; while (index < this.history.length && - (!this.history[index].startsWith(search) || + (!StringPrototypeStartsWith(this.history[index], search) || this.line === this.history[index])) { index++; } @@ -719,7 +761,7 @@ Interface.prototype._getDisplayPos = function(str) { const col = this.columns; let rows = 0; str = stripVTControlCharacters(str); - for (const char of str) { + for (const char of new SafeStringIterator(str)) { if (char === '\n') { // Rows must be incremented by 1 even if offset = 0 or col = +Infinity. rows += MathCeil(offset / col) || 1; @@ -748,7 +790,8 @@ Interface.prototype._getDisplayPos = function(str) { // Returns current cursor's position and line Interface.prototype.getCursorPos = function() { - const strBeforeCursor = this._prompt + this.line.substring(0, this.cursor); + const strBeforeCursor = this._prompt + + StringPrototypeSlice(this.line, 0, this.cursor); return this._getDisplayPos(strBeforeCursor); }; Interface.prototype._getCursorPos = Interface.prototype.getCursorPos; @@ -838,7 +881,7 @@ Interface.prototype._ttyWrite = function(s, key) { if ((key.name === 'up' || key.name === 'down') && !key.ctrl && !key.meta && !key.shift) { if (this[kSubstringSearch] === null) { - this[kSubstringSearch] = this.line.slice(0, this.cursor); + this[kSubstringSearch] = StringPrototypeSlice(this.line, 0, this.cursor); } } else if (this[kSubstringSearch] !== null) { this[kSubstringSearch] = null; @@ -1062,7 +1105,7 @@ Interface.prototype._ttyWrite = function(s, key) { // falls through default: if (typeof s === 'string' && s) { - const lines = s.split(/\r\n|\n|\r/); + const lines = StringPrototypeSplit(s, /\r\n|\n|\r/); for (let i = 0, len = lines.length; i < len; i++) { if (i > 0) { this._line(); @@ -1093,12 +1136,17 @@ Interface.prototype[SymbolAsyncIterator] = function() { }); const lineListener = (input) => { if (!readable.push(input)) { + // TODO(rexagod): drain to resume flow this.pause(); } }; const closeListener = () => { readable.push(null); }; + const errorListener = (err) => { + readable.destroy(err); + }; + this.on('error', errorListener); this.on('line', lineListener); this.on('close', closeListener); this[kLineObjectStream] = readable; @@ -1134,7 +1182,7 @@ function emitKeypressEvents(stream, iface = {}) { iface.isCompletionEnabled = false; let length = 0; - for (const character of string) { + for (const character of new SafeStringIterator(string)) { length += character.length; if (length === string.length) { iface.isCompletionEnabled = true; @@ -1189,6 +1237,11 @@ function cursorTo(stream, x, y, callback) { y = undefined; } + if (NumberIsNaN(x)) + throw new ERR_INVALID_ARG_VALUE('x', x); + if (NumberIsNaN(y)) + throw new ERR_INVALID_ARG_VALUE('y', y); + if (stream == null || (typeof x !== 'number' && typeof y !== 'number')) { if (typeof callback === 'function') process.nextTick(callback, null); diff --git a/lib/repl.js b/lib/repl.js index 78c256d60b5559..3368b5997ae01d 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -43,7 +43,22 @@ 'use strict'; const { + ArrayPrototypeConcat, + ArrayPrototypeFilter, + ArrayPrototypeFindIndex, + ArrayPrototypeIncludes, + ArrayPrototypeJoin, + ArrayPrototypeMap, + ArrayPrototypePop, + ArrayPrototypePush, + ArrayPrototypeReverse, + ArrayPrototypeShift, + ArrayPrototypeSort, + ArrayPrototypeSplice, + ArrayPrototypeUnshift, + Boolean, Error, + FunctionPrototypeBind, MathMax, NumberIsNaN, NumberParseFloat, @@ -56,16 +71,30 @@ const { ObjectKeys, ObjectSetPrototypeOf, Promise, + PromisePrototypeFinally, + PromisePrototypeThen, PromiseRace, + ReflectApply, RegExp, - Set, + RegExpPrototypeExec, + RegExpPrototypeTest, + SafeSet, + SafeWeakSet, StringPrototypeCharAt, + StringPrototypeCodePointAt, + StringPrototypeEndsWith, StringPrototypeIncludes, StringPrototypeMatch, + StringPrototypeRepeat, + StringPrototypeReplace, + StringPrototypeSlice, + StringPrototypeSplit, + StringPrototypeStartsWith, + StringPrototypeTrim, + StringPrototypeTrimLeft, Symbol, SyntaxError, SyntaxErrorPrototype, - WeakSet, } = primordials; const { @@ -91,8 +120,10 @@ const { } = require('internal/readline/utils'); const { Console } = require('console'); const CJSModule = require('internal/modules/cjs/loader').Module; -let _builtinLibs = [...CJSModule.builtinModules] - .filter((e) => !e.startsWith('_') && !e.includes('/')); +let _builtinLibs = ArrayPrototypeFilter( + CJSModule.builtinModules, + (e) => !StringPrototypeStartsWith(e, '_') && !StringPrototypeIncludes(e, '/') +); const domain = require('domain'); let debug = require('internal/util/debuglog').debuglog('repl', (fn) => { debug = fn; @@ -145,10 +176,10 @@ function getREPLResourceName() { let processTopLevelAwait; const globalBuiltins = - new Set(vm.runInNewContext('Object.getOwnPropertyNames(globalThis)')); + new SafeSet(vm.runInNewContext('Object.getOwnPropertyNames(globalThis)')); const parentModule = module; -const domainSet = new WeakSet(); +const domainSet = new SafeWeakSet(); const kBufferedCommandSymbol = Symbol('bufferedCommand'); const kContextId = Symbol('contextId'); @@ -267,6 +298,7 @@ function REPLServer(prompt, configurable: true }); + this.allowBlockingCompletions = !!options.allowBlockingCompletions; this.useColors = !!options.useColors; this._domain = options.domain || domain.create(); this.useGlobal = !!useGlobal; @@ -335,7 +367,7 @@ function REPLServer(prompt, paused = false; let entry; const tmpCompletionEnabled = self.isCompletionEnabled; - while (entry = pausedBuffer.shift()) { + while (entry = ArrayPrototypeShift(pausedBuffer)) { const [type, payload, isCompletionEnabled] = entry; switch (type) { case 'key': { @@ -369,12 +401,13 @@ function REPLServer(prompt, // to wrap it in parentheses, so that it will be interpreted as // an expression. Note that if the above condition changes, // lib/internal/repl/utils.js needs to be changed to match. - if (/^\s*{/.test(code) && !/;\s*$/.test(code)) { - code = `(${code.trim()})\n`; + if (RegExpPrototypeTest(/^\s*{/, code) && + !RegExpPrototypeTest(/;\s*$/, code)) { + code = `(${StringPrototypeTrim(code)})\n`; wrappedCmd = true; } - if (experimentalREPLAwait && code.includes('await')) { + if (experimentalREPLAwait && StringPrototypeIncludes(code, 'await')) { if (processTopLevelAwait === undefined) { ({ processTopLevelAwait } = require('internal/repl/await')); } @@ -402,7 +435,7 @@ function REPLServer(prompt, while (true) { try { if (self.replMode === module.exports.REPL_MODE_STRICT && - !/^\s*$/.test(code)) { + !RegExpPrototypeTest(/^\s*$/, code)) { // "void 0" keeps the repl from returning "use strict" as the result // value for statements and declarations that don't return a value. code = `'use strict'; void 0;\n${code}`; @@ -436,7 +469,8 @@ function REPLServer(prompt, // This will set the values from `savedRegExMatches` to corresponding // predefined RegExp properties `RegExp.$1`, `RegExp.$2` ... `RegExp.$9` - regExMatcher.test(savedRegExMatches.join(sep)); + RegExpPrototypeTest(regExMatcher, + ArrayPrototypeJoin(savedRegExMatches, sep)); let finished = false; function finishExecution(err, result) { @@ -516,7 +550,7 @@ function REPLServer(prompt, promise = PromiseRace([promise, interrupt]); } - promise.then((result) => { + PromisePrototypeFinally(PromisePrototypeThen(promise, (result) => { finishExecution(null, result); }, (err) => { if (err && process.domain) { @@ -526,7 +560,7 @@ function REPLServer(prompt, return; } finishExecution(err); - }).finally(() => { + }), () => { // Remove prioritized SIGINT listener if it was not called. prioritizedSigintQueue.delete(sigintListener); unpause(); @@ -551,11 +585,12 @@ function REPLServer(prompt, if (typeof stackFrames === 'object') { // Search from the bottom of the call stack to // find the first frame with a null function name - const idx = stackFrames - .reverse() - .findIndex((frame) => frame.getFunctionName() === null); + const idx = ArrayPrototypeFindIndex( + ArrayPrototypeReverse(stackFrames), + (frame) => frame.getFunctionName() === null + ); // If found, get rid of it and everything below it - frames = stackFrames.splice(idx + 1); + frames = ArrayPrototypeSplice(stackFrames, idx + 1); } else { frames = stackFrames; } @@ -565,8 +600,8 @@ function REPLServer(prompt, if (typeof Error.prepareStackTrace === 'function') { return Error.prepareStackTrace(error, frames); } - frames.push(error); - return frames.reverse().join('\n at '); + ArrayPrototypePush(frames, error); + return ArrayPrototypeJoin(ArrayPrototypeReverse(frames), '\n at '); }); decorateErrorStack(e); @@ -579,27 +614,31 @@ function REPLServer(prompt, if (e.stack) { if (e.name === 'SyntaxError') { // Remove stack trace. - e.stack = e.stack - .replace(/^REPL\d+:\d+\r?\n/, '') - .replace(/^\s+at\s.*\n?/gm, ''); + e.stack = StringPrototypeReplace(StringPrototypeReplace(e.stack, + /^REPL\d+:\d+\r?\n/, ''), + /^\s+at\s.*\n?/gm, ''); const importErrorStr = 'Cannot use import statement outside a ' + 'module'; if (StringPrototypeIncludes(e.message, importErrorStr)) { e.message = 'Cannot use import statement inside the Node.js ' + 'REPL, alternatively use dynamic import'; - e.stack = e.stack.replace(/SyntaxError:.*\n/, - `SyntaxError: ${e.message}\n`); + e.stack = StringPrototypeReplace(e.stack, + /SyntaxError:.*\n/, + `SyntaxError: ${e.message}\n`); } } else if (self.replMode === module.exports.REPL_MODE_STRICT) { - e.stack = e.stack.replace(/(\s+at\s+REPL\d+:)(\d+)/, - (_, pre, line) => pre + (line - 1)); + e.stack = StringPrototypeReplace( + e.stack, + /(\s+at\s+REPL\d+:)(\d+)/, + (_, pre, line) => pre + (line - 1) + ); } } errStack = self.writer(e); // Remove one line error braces to keep the old style in place. if (errStack[errStack.length - 1] === ']') { - errStack = errStack.slice(1, -1); + errStack = StringPrototypeSlice(errStack, 1, -1); } } } @@ -620,12 +659,13 @@ function REPLServer(prompt, if (errStack === '') { errStack = self.writer(e); } - const lines = errStack.split(/(?<=\n)/); + const lines = StringPrototypeSplit(errStack, /(?<=\n)/); let matched = false; errStack = ''; for (const line of lines) { - if (!matched && /^\[?([A-Z][a-z0-9_]*)*Error/.test(line)) { + if (!matched && + RegExpPrototypeTest(/^\[?([A-Z][a-z0-9_]*)*Error/, line)) { errStack += writer.options.breakLength >= line.length ? `Uncaught ${line}` : `Uncaught:\n${line}`; @@ -639,7 +679,7 @@ function REPLServer(prompt, errStack = `Uncaught${ln}${errStack}`; } // Normalize line endings. - errStack += errStack.endsWith('\n') ? '' : '\n'; + errStack += StringPrototypeEndsWith(errStack, '\n') ? '' : '\n'; self.output.write(errStack); self.clearBufferedCommand(); self.lines.level = []; @@ -650,18 +690,18 @@ function REPLServer(prompt, self.clearBufferedCommand(); function completer(text, cb) { - complete.call(self, text, self.editorMode ? - self.completeOnEditorMode(cb) : cb); + ReflectApply(complete, self, + [text, self.editorMode ? self.completeOnEditorMode(cb) : cb]); } - Interface.call(this, { + ReflectApply(Interface, this, [{ input: options.input, output: options.output, completer: options.completer || completer, terminal: options.terminal, historySize: options.historySize, prompt - }); + }]); self.resetContext(); @@ -695,7 +735,7 @@ function REPLServer(prompt, function _parseREPLKeyword(keyword, rest) { const cmd = this.commands[keyword]; if (cmd) { - cmd.action.call(this, rest); + ReflectApply(cmd.action, this, [rest]); return true; } return false; @@ -703,7 +743,7 @@ function REPLServer(prompt, self.on('close', function emitExit() { if (paused) { - pausedBuffer.push(['close']); + ArrayPrototypePush(pausedBuffer, ['close']); return; } self.emit('exit'); @@ -711,7 +751,7 @@ function REPLServer(prompt, let sawSIGINT = false; let sawCtrlD = false; - const prioritizedSigintQueue = new Set(); + const prioritizedSigintQueue = new SafeSet(); self.on('SIGINT', function onSigInt() { if (prioritizedSigintQueue.size > 0) { for (const task of prioritizedSigintQueue) { @@ -753,19 +793,20 @@ function REPLServer(prompt, self[kBufferedCommandSymbol] += cmd + '\n'; // code alignment - const matches = self._sawKeyPress ? cmd.match(/^\s+/) : null; + const matches = self._sawKeyPress ? + StringPrototypeMatch(cmd, /^\s+/) : null; if (matches) { const prefix = matches[0]; self.write(prefix); self.line = prefix; self.cursor = prefix.length; } - _memory.call(self, cmd); + ReflectApply(_memory, self, [cmd]); return; } // Check REPL keywords and empty lines against a trimmed line input. - const trimmedCmd = cmd.trim(); + const trimmedCmd = StringPrototypeTrim(cmd); // Check to see if a REPL keyword was used. If it returns true, // display next prompt and return. @@ -776,7 +817,7 @@ function REPLServer(prompt, const matches = StringPrototypeMatch(trimmedCmd, /^\.([^\s]+)\s*(.*)$/); const keyword = matches && matches[1]; const rest = matches && matches[2]; - if (_parseREPLKeyword.call(self, keyword, rest) === true) { + if (ReflectApply(_parseREPLKeyword, self, [keyword, rest]) === true) { return; } if (!self[kBufferedCommandSymbol]) { @@ -794,9 +835,10 @@ function REPLServer(prompt, function finish(e, ret) { debug('finish', e, ret); - _memory.call(self, cmd); + ReflectApply(_memory, self, [cmd]); - if (e && !self[kBufferedCommandSymbol] && cmd.trim().startsWith('npm ')) { + if (e && !self[kBufferedCommandSymbol] && + StringPrototypeStartsWith(StringPrototypeTrim(cmd), 'npm ')) { self.output.write('npm should be run outside of the ' + 'Node.js REPL, in your normal shell.\n' + '(Press Ctrl+D to exit.)\n'); @@ -865,11 +907,12 @@ function REPLServer(prompt, ); // Wrap readline tty to enable editor mode and pausing. - const ttyWrite = self._ttyWrite.bind(self); + const ttyWrite = FunctionPrototypeBind(self._ttyWrite, self); self._ttyWrite = (d, key) => { key = key || {}; if (paused && !(self.breakEvalOnSigint && key.ctrl && key.name === 'c')) { - pausedBuffer.push(['key', [d, key], self.isCompletionEnabled]); + ArrayPrototypePush(pausedBuffer, + ['key', [d, key], self.isCompletionEnabled]); return; } if (!self.editorMode || !self.terminal) { @@ -942,13 +985,13 @@ REPLServer.prototype.close = function close() { if (this.terminal && this._flushing && !this._closingOnFlush) { this._closingOnFlush = true; this.once('flushHistory', () => - Interface.prototype.close.call(this) + ReflectApply(Interface.prototype.close, this, []) ); return; } process.nextTick(() => - Interface.prototype.close.call(this) + ReflectApply(Interface.prototype.close, this, []) ); }; @@ -1044,19 +1087,19 @@ REPLServer.prototype.displayPrompt = function(preserveCursor) { if (this[kBufferedCommandSymbol].length) { prompt = '...'; const len = this.lines.level.length ? this.lines.level.length - 1 : 0; - const levelInd = '..'.repeat(len); + const levelInd = StringPrototypeRepeat('..', len); prompt += levelInd + ' '; } // Do not overwrite `_initialPrompt` here - Interface.prototype.setPrompt.call(this, prompt); + ReflectApply(Interface.prototype.setPrompt, this, [prompt]); this.prompt(preserveCursor); }; // When invoked as an API method, overwrite _initialPrompt REPLServer.prototype.setPrompt = function setPrompt(prompt) { this._initialPrompt = prompt; - Interface.prototype.setPrompt.call(this, prompt); + ReflectApply(Interface.prototype.setPrompt, this, [prompt]); }; const requireRE = /\brequire\s*\(\s*['"`](([\w@./-]+\/)?(?:[\w@./-]*))(?![^'"`])$/; @@ -1068,13 +1111,13 @@ function isIdentifier(str) { if (str === '') { return false; } - const first = str.codePointAt(0); + const first = StringPrototypeCodePointAt(str, 0); if (!isIdentifierStart(first)) { return false; } const firstLen = first > 0xffff ? 2 : 1; for (let i = firstLen; i < str.length; i += 1) { - const cp = str.codePointAt(i); + const cp = StringPrototypeCodePointAt(str, i); if (!isIdentifierChar(cp)) { return false; } @@ -1088,7 +1131,8 @@ function isIdentifier(str) { function filteredOwnPropertyNames(obj) { if (!obj) return []; const filter = ALL_PROPERTIES | SKIP_SYMBOLS; - return getOwnNonIndexProperties(obj, filter).filter(isIdentifier); + return ArrayPrototypeFilter(getOwnNonIndexProperties(obj, filter), + isIdentifier); } function getGlobalLexicalScopeNames(contextId) { @@ -1104,7 +1148,7 @@ function getGlobalLexicalScopeNames(contextId) { } REPLServer.prototype.complete = function() { - this.completer.apply(this, arguments); + ReflectApply(this.completer, this, arguments); }; function gracefulReaddir(...args) { @@ -1115,7 +1159,7 @@ function gracefulReaddir(...args) { function completeFSFunctions(line) { let baseName = ''; - let filePath = line.match(fsAutoCompleteRE)[1]; + let filePath = StringPrototypeMatch(line, fsAutoCompleteRE)[1]; let fileList = gracefulReaddir(filePath, { withFileTypes: true }); if (!fileList) { @@ -1124,9 +1168,13 @@ function completeFSFunctions(line) { fileList = gracefulReaddir(filePath, { withFileTypes: true }) || []; } - const completions = fileList - .filter((dirent) => dirent.name.startsWith(baseName)) - .map((d) => d.name); + const completions = ArrayPrototypeMap( + ArrayPrototypeFilter( + fileList, + (dirent) => StringPrototypeStartsWith(dirent.name, baseName) + ), + (d) => d.name + ); return [[completions], baseName]; } @@ -1147,24 +1195,26 @@ function complete(line, callback) { let completeOn, group; // Ignore right whitespace. It could change the outcome. - line = line.trimLeft(); + line = StringPrototypeTrimLeft(line); // REPL commands (e.g. ".break"). let filter = ''; - if (/^\s*\.(\w*)$/.test(line)) { - completionGroups.push(ObjectKeys(this.commands)); - completeOn = line.match(/^\s*\.(\w*)$/)[1]; + if (RegExpPrototypeTest(/^\s*\.(\w*)$/, line)) { + ArrayPrototypePush(completionGroups, ObjectKeys(this.commands)); + completeOn = StringPrototypeMatch(line, /^\s*\.(\w*)$/)[1]; if (completeOn.length) { filter = completeOn; } - } else if (requireRE.test(line)) { + } else if (RegExpPrototypeTest(requireRE, line) && + this.allowBlockingCompletions) { // require('...') const extensions = ObjectKeys(this.context.require.extensions); - const indexes = extensions.map((extension) => `index${extension}`); - indexes.push('package.json', 'index'); + const indexes = ArrayPrototypeMap(extensions, + (extension) => `index${extension}`); + ArrayPrototypePush(indexes, 'package.json', 'index'); const versionedFileNamesRe = /-\d+\.\d+/; - const match = line.match(requireRE); + const match = StringPrototypeMatch(line, requireRE); completeOn = match[1]; const subdir = match[2] || ''; filter = completeOn; @@ -1175,47 +1225,50 @@ function complete(line, callback) { group = ['./', '../']; } else if (completeOn === '..') { group = ['../']; - } else if (/^\.\.?\//.test(completeOn)) { + } else if (RegExpPrototypeTest(/^\.\.?\//, completeOn)) { paths = [process.cwd()]; } else { - paths = module.paths.concat(CJSModule.globalPaths); + paths = ArrayPrototypeConcat(module.paths, CJSModule.globalPaths); } for (let dir of paths) { dir = path.resolve(dir, subdir); const dirents = gracefulReaddir(dir, { withFileTypes: true }) || []; for (const dirent of dirents) { - if (versionedFileNamesRe.test(dirent.name) || dirent.name === '.npm') { + if (RegExpPrototypeTest(versionedFileNamesRe, dirent.name) || + dirent.name === '.npm') { // Exclude versioned names that 'npm' installs. continue; } const extension = path.extname(dirent.name); - const base = dirent.name.slice(0, -extension.length); + const base = StringPrototypeSlice(dirent.name, 0, -extension.length); if (!dirent.isDirectory()) { - if (extensions.includes(extension) && (!subdir || base !== 'index')) { - group.push(`${subdir}${base}`); + if (StringPrototypeIncludes(extensions, extension) && + (!subdir || base !== 'index')) { + ArrayPrototypePush(group, `${subdir}${base}`); } continue; } - group.push(`${subdir}${dirent.name}/`); + ArrayPrototypePush(group, `${subdir}${dirent.name}/`); const absolute = path.resolve(dir, dirent.name); const subfiles = gracefulReaddir(absolute) || []; for (const subfile of subfiles) { - if (indexes.includes(subfile)) { - group.push(`${subdir}${dirent.name}`); + if (ArrayPrototypeIncludes(indexes, subfile)) { + ArrayPrototypePush(group, `${subdir}${dirent.name}`); break; } } } } if (group.length) { - completionGroups.push(group); + ArrayPrototypePush(completionGroups, group); } if (!subdir) { - completionGroups.push(_builtinLibs); + ArrayPrototypePush(completionGroups, _builtinLibs); } - } else if (fsAutoCompleteRE.test(line)) { + } else if (RegExpPrototypeTest(fsAutoCompleteRE, line) && + this.allowBlockingCompletions) { [completionGroups, completeOn] = completeFSFunctions(line); // Handle variable member lookup. // We support simple chained expressions like the following (no function @@ -1227,45 +1280,48 @@ function complete(line, callback) { // spam.eggs.<|> # completions for 'spam.eggs' with filter '' // foo<|> # all scope vars with filter 'foo' // foo.<|> # completions for 'foo' with filter '' - } else if (line.length === 0 || /\w|\.|\$/.test(line[line.length - 1])) { - const [match] = simpleExpressionRE.exec(line) || ['']; + } else if (line.length === 0 || + RegExpPrototypeTest(/\w|\.|\$/, line[line.length - 1])) { + const [match] = RegExpPrototypeExec(simpleExpressionRE, line) || ['']; if (line.length !== 0 && !match) { completionGroupsLoaded(); return; } let expr = ''; completeOn = match; - if (line.endsWith('.')) { - expr = match.slice(0, -1); + if (StringPrototypeEndsWith(line, '.')) { + expr = StringPrototypeSlice(match, 0, -1); } else if (line.length !== 0) { - const bits = match.split('.'); - filter = bits.pop(); - expr = bits.join('.'); + const bits = StringPrototypeSplit(match, '.'); + filter = ArrayPrototypePop(bits); + expr = ArrayPrototypeJoin(bits, '.'); } // Resolve expr and get its completions. if (!expr) { // Get global vars synchronously - completionGroups.push(getGlobalLexicalScopeNames(this[kContextId])); + ArrayPrototypePush(completionGroups, + getGlobalLexicalScopeNames(this[kContextId])); let contextProto = this.context; while (contextProto = ObjectGetPrototypeOf(contextProto)) { - completionGroups.push(filteredOwnPropertyNames(contextProto)); + ArrayPrototypePush(completionGroups, + filteredOwnPropertyNames(contextProto)); } const contextOwnNames = filteredOwnPropertyNames(this.context); if (!this.useGlobal) { // When the context is not `global`, builtins are not own // properties of it. - contextOwnNames.push(...globalBuiltins); + ArrayPrototypePush(contextOwnNames, ...globalBuiltins); } - completionGroups.push(contextOwnNames); + ArrayPrototypePush(completionGroups, contextOwnNames); if (filter !== '') addCommonWords(completionGroups); completionGroupsLoaded(); return; } let chaining = '.'; - if (expr.endsWith('?')) { - expr = expr.slice(0, -1); + if (StringPrototypeEndsWith(expr, '?')) { + expr = StringPrototypeSlice(expr, 0, -1); chaining = '?.'; } @@ -1297,7 +1353,9 @@ function complete(line, callback) { if (memberGroups.length) { expr += chaining; for (const group of memberGroups) { - completionGroups.push(group.map((member) => `${expr}${member}`)); + ArrayPrototypePush(completionGroups, + ArrayPrototypeMap(group, + (member) => `${expr}${member}`)); } if (filter) { filter = `${expr}${filter}`; @@ -1318,9 +1376,12 @@ function complete(line, callback) { if (completionGroups.length && filter) { const newCompletionGroups = []; for (const group of completionGroups) { - const filteredGroup = group.filter((str) => str.startsWith(filter)); + const filteredGroup = ArrayPrototypeFilter( + group, + (str) => StringPrototypeStartsWith(str, filter) + ); if (filteredGroup.length) { - newCompletionGroups.push(filteredGroup); + ArrayPrototypePush(newCompletionGroups, filteredGroup); } } completionGroups = newCompletionGroups; @@ -1328,27 +1389,27 @@ function complete(line, callback) { const completions = []; // Unique completions across all groups. - const uniqueSet = new Set(['']); + const uniqueSet = new SafeSet(['']); // Completion group 0 is the "closest" (least far up the inheritance // chain) so we put its completions last: to be closest in the REPL. for (const group of completionGroups) { - group.sort((a, b) => (b > a ? 1 : -1)); + ArrayPrototypeSort(group, (a, b) => (b > a ? 1 : -1)); const setSize = uniqueSet.size; for (const entry of group) { if (!uniqueSet.has(entry)) { - completions.unshift(entry); + ArrayPrototypeUnshift(completions, entry); uniqueSet.add(entry); } } // Add a separator between groups. if (uniqueSet.size !== setSize) { - completions.unshift(''); + ArrayPrototypeUnshift(completions, ''); } } // Remove obsolete group entry, if present. if (completions[0] === '') { - completions.shift(); + ArrayPrototypeShift(completions); } callback(null, [completions, completeOn]); @@ -1359,7 +1420,7 @@ REPLServer.prototype.completeOnEditorMode = (callback) => (err, results) => { if (err) return callback(err); const [completions, completeOn = ''] = results; - let result = completions.filter((v) => v); + let result = ArrayPrototypeFilter(completions, Boolean); if (completeOn && result.length !== 0) { result = [commonPrefix(result)]; @@ -1388,10 +1449,10 @@ function _memory(cmd) { // Save the line so I can do magic later if (cmd) { const len = self.lines.level.length ? self.lines.level.length - 1 : 0; - self.lines.push(' '.repeat(len) + cmd); + ArrayPrototypePush(self.lines, StringPrototypeRepeat(' ', len) + cmd); } else { // I don't want to not change the format too much... - self.lines.push(''); + ArrayPrototypePush(self.lines, ''); } if (!cmd) { @@ -1405,8 +1466,8 @@ function _memory(cmd) { // Going down is { and ( e.g. function() { // going up is } and ) - let dw = cmd.match(/[{(]/g); - let up = cmd.match(/[})]/g); + let dw = StringPrototypeMatch(cmd, /[{(]/g); + let up = StringPrototypeMatch(cmd, /[})]/g); up = up ? up.length : 0; dw = dw ? dw.length : 0; let depth = dw - up; @@ -1421,13 +1482,13 @@ function _memory(cmd) { // "function() // {" but nothing should break, only tab completion for local // scope will not work for this function. - self.lines.level.push({ + ArrayPrototypePush(self.lines.level, { line: self.lines.length - 1, depth: depth }); } else if (depth < 0) { // Going... up. - const curr = self.lines.level.pop(); + const curr = ArrayPrototypePop(self.lines.level); if (curr) { const tmp = curr.depth + depth; if (tmp < 0) { @@ -1437,7 +1498,7 @@ function _memory(cmd) { } else if (tmp > 0) { // Remove and push back curr.depth += depth; - self.lines.level.push(curr); + ArrayPrototypePush(self.lines.level, curr); } } } @@ -1448,7 +1509,7 @@ function _memory(cmd) { function addCommonWords(completionGroups) { // Only words which do not yet exist as global property should be added to // this list. - completionGroups.push([ + ArrayPrototypePush(completionGroups, [ 'async', 'await', 'break', 'case', 'catch', 'const', 'continue', 'debugger', 'default', 'delete', 'do', 'else', 'export', 'false', 'finally', 'for', 'function', 'if', 'import', 'in', 'instanceof', 'let', @@ -1459,7 +1520,7 @@ function addCommonWords(completionGroups) { function _turnOnEditorMode(repl) { repl.editorMode = true; - Interface.prototype.setPrompt.call(repl, ''); + ReflectApply(Interface.prototype.setPrompt, repl, ['']); } function _turnOffEditorMode(repl) { @@ -1504,15 +1565,15 @@ function defineDefaultCommands(repl) { repl.defineCommand('help', { help: 'Print this help message', action: function() { - const names = ObjectKeys(this.commands).sort(); - const longestNameLength = names.reduce( - (max, name) => MathMax(max, name.length), - 0 + const names = ArrayPrototypeSort(ObjectKeys(this.commands)); + const longestNameLength = MathMax( + ...ArrayPrototypeMap(names, (name) => name.length) ); for (let n = 0; n < names.length; n++) { const name = names[n]; const cmd = this.commands[name]; - const spaces = ' '.repeat(longestNameLength - name.length + 3); + const spaces = + StringPrototypeRepeat(' ', longestNameLength - name.length + 3); const line = `.${name}${cmd.help ? spaces + cmd.help : ''}\n`; this.output.write(line); } @@ -1526,7 +1587,7 @@ function defineDefaultCommands(repl) { help: 'Save all evaluated commands in this REPL session to a file', action: function(file) { try { - fs.writeFileSync(file, this.lines.join('\n')); + fs.writeFileSync(file, ArrayPrototypeJoin(this.lines, '\n')); this.output.write(`Session saved to: ${file}\n`); } catch { this.output.write(`Failed to save: ${file}\n`); diff --git a/lib/stream.js b/lib/stream.js index 11f5ca997fef34..1697a2f2729b82 100644 --- a/lib/stream.js +++ b/lib/stream.js @@ -43,6 +43,8 @@ Stream.Duplex = require('internal/streams/duplex'); Stream.Transform = require('internal/streams/transform'); Stream.PassThrough = require('internal/streams/passthrough'); Stream.pipeline = pipeline; +const { addAbortSignal } = require('internal/streams/add-abort-signal'); +Stream.addAbortSignal = addAbortSignal; Stream.finished = eos; function lazyLoadPromises() { diff --git a/lib/string_decoder.js b/lib/string_decoder.js index 3d2cc2fcb6ab51..2891e0a1d1a43a 100644 --- a/lib/string_decoder.js +++ b/lib/string_decoder.js @@ -25,6 +25,7 @@ const { ArrayBufferIsView, ObjectDefineProperties, Symbol, + TypedArrayPrototypeSubarray, } = primordials; const { Buffer } = require('buffer'); @@ -104,8 +105,9 @@ ObjectDefineProperties(StringDecoder.prototype, { configurable: true, enumerable: true, get() { - return this[kNativeDecoder].subarray(kIncompleteCharactersStart, - kIncompleteCharactersEnd); + return TypedArrayPrototypeSubarray(this[kNativeDecoder], + kIncompleteCharactersStart, + kIncompleteCharactersEnd); } }, lastNeed: { diff --git a/lib/timers/promises.js b/lib/timers/promises.js index ef1e6437d4f6ca..55d554bb838e95 100644 --- a/lib/timers/promises.js +++ b/lib/timers/promises.js @@ -1,7 +1,9 @@ 'use strict'; const { + FunctionPrototypeBind, Promise, + PromisePrototypeFinally, PromiseReject, } = primordials; @@ -12,17 +14,18 @@ const { } = require('internal/timers'); const { - hideStackFrames, + AbortError, codes: { ERR_INVALID_ARG_TYPE } } = require('internal/errors'); -let DOMException; +const { validateAbortSignal } = require('internal/validators'); -const lazyDOMException = hideStackFrames((message, name) => { - if (DOMException === undefined) - DOMException = internalBinding('messaging').DOMException; - return new DOMException(message, name); -}); +function cancelListenerHandler(clear, reject) { + if (!this._destroyed) { + clear(this); + reject(new AbortError()); + } +} function setTimeout(after, value, options = {}) { const args = value !== undefined ? [value] : value; @@ -34,15 +37,10 @@ function setTimeout(after, value, options = {}) { options)); } const { signal, ref = true } = options; - if (signal !== undefined && - (signal === null || - typeof signal !== 'object' || - !('aborted' in signal))) { - return PromiseReject( - new ERR_INVALID_ARG_TYPE( - 'options.signal', - 'AbortSignal', - signal)); + try { + validateAbortSignal(signal, 'options.signal'); + } catch (err) { + return PromiseReject(err); } if (typeof ref !== 'boolean') { return PromiseReject( @@ -55,23 +53,24 @@ function setTimeout(after, value, options = {}) { // to 12.x, then this can be converted to use optional chaining to // simplify the check. if (signal && signal.aborted) { - return PromiseReject( - lazyDOMException('The operation was aborted', 'AbortError')); + return PromiseReject(new AbortError()); } - return new Promise((resolve, reject) => { + let oncancel; + const ret = new Promise((resolve, reject) => { const timeout = new Timeout(resolve, after, args, false, true); if (!ref) timeout.unref(); insert(timeout, timeout._idleTimeout); if (signal) { - signal.addEventListener('abort', () => { - if (!timeout._destroyed) { - // eslint-disable-next-line no-undef - clearTimeout(timeout); - reject(lazyDOMException('The operation was aborted', 'AbortError')); - } - }, { once: true }); + oncancel = FunctionPrototypeBind(cancelListenerHandler, + // eslint-disable-next-line no-undef + timeout, clearTimeout, reject); + signal.addEventListener('abort', oncancel); } }); + return oncancel !== undefined ? + PromisePrototypeFinally( + ret, + () => signal.removeEventListener('abort', oncancel)) : ret; } function setImmediate(value, options = {}) { @@ -83,15 +82,10 @@ function setImmediate(value, options = {}) { options)); } const { signal, ref = true } = options; - if (signal !== undefined && - (signal === null || - typeof signal !== 'object' || - !('aborted' in signal))) { - return PromiseReject( - new ERR_INVALID_ARG_TYPE( - 'options.signal', - 'AbortSignal', - signal)); + try { + validateAbortSignal(signal, 'options.signal'); + } catch (err) { + return PromiseReject(err); } if (typeof ref !== 'boolean') { return PromiseReject( @@ -104,22 +98,23 @@ function setImmediate(value, options = {}) { // to 12.x, then this can be converted to use optional chaining to // simplify the check. if (signal && signal.aborted) { - return PromiseReject( - lazyDOMException('The operation was aborted', 'AbortError')); + return PromiseReject(new AbortError()); } - return new Promise((resolve, reject) => { + let oncancel; + const ret = new Promise((resolve, reject) => { const immediate = new Immediate(resolve, [value]); if (!ref) immediate.unref(); if (signal) { - signal.addEventListener('abort', () => { - if (!immediate._destroyed) { - // eslint-disable-next-line no-undef - clearImmediate(immediate); - reject(lazyDOMException('The operation was aborted', 'AbortError')); - } - }, { once: true }); + oncancel = FunctionPrototypeBind(cancelListenerHandler, + // eslint-disable-next-line no-undef + immediate, clearImmediate, reject); + signal.addEventListener('abort', oncancel); } }); + return oncancel !== undefined ? + PromisePrototypeFinally( + ret, + () => signal.removeEventListener('abort', oncancel)) : ret; } module.exports = { diff --git a/lib/tls.js b/lib/tls.js index a46031ad7da90e..7ee9ae49f03a68 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -24,12 +24,22 @@ const { Array, ArrayIsArray, + ArrayPrototypeIncludes, + ArrayPrototypeJoin, + ArrayPrototypePush, + ArrayPrototypeReduce, + ArrayPrototypeSome, ObjectDefineProperty, ObjectFreeze, + RegExpPrototypeTest, StringFromCharCode, StringPrototypeCharCodeAt, + StringPrototypeEndsWith, + StringPrototypeIncludes, StringPrototypeReplace, + StringPrototypeSlice, StringPrototypeSplit, + StringPrototypeStartsWith, } = primordials; const { @@ -107,7 +117,7 @@ ObjectDefineProperty(exports, 'rootCertificates', { // ("\x06spdy/2\x08http/1.1\x08http/1.0") function convertProtocols(protocols) { const lens = new Array(protocols.length); - const buff = Buffer.allocUnsafe(protocols.reduce((p, c, i) => { + const buff = Buffer.allocUnsafe(ArrayPrototypeReduce(protocols, (p, c, i) => { const len = Buffer.byteLength(c); if (len > 255) { throw new ERR_OUT_OF_RANGE('The byte length of the protocol at index ' + @@ -138,7 +148,7 @@ exports.convertALPNProtocols = function convertALPNProtocols(protocols, out) { }; function unfqdn(host) { - return host.replace(/[.]$/, ''); + return StringPrototypeReplace(host, /[.]$/, ''); } // String#toLowerCase() is locale-sensitive so we use @@ -165,15 +175,15 @@ function check(hostParts, pattern, wildcards) { return false; // Pattern has empty components, e.g. "bad..example.com". - if (patternParts.includes('')) + if (ArrayPrototypeIncludes(patternParts, '')) return false; // RFC 6125 allows IDNA U-labels (Unicode) in names but we have no // good way to detect their encoding or normalize them so we simply // reject them. Control characters and blanks are rejected as well // because nothing good can come from accepting them. - const isBad = (s) => /[^\u0021-\u007F]/u.test(s); - if (patternParts.some(isBad)) + const isBad = (s) => RegExpPrototypeTest(/[^\u0021-\u007F]/u, s); + if (ArrayPrototypeSome(patternParts, isBad)) return false; // Check host parts from right to left first. @@ -184,12 +194,13 @@ function check(hostParts, pattern, wildcards) { const hostSubdomain = hostParts[0]; const patternSubdomain = patternParts[0]; - const patternSubdomainParts = patternSubdomain.split('*'); + const patternSubdomainParts = StringPrototypeSplit(patternSubdomain, '*'); // Short-circuit when the subdomain does not contain a wildcard. // RFC 6125 does not allow wildcard substitution for components // containing IDNA A-labels (Punycode) so match those verbatim. - if (patternSubdomainParts.length === 1 || patternSubdomain.includes('xn--')) + if (patternSubdomainParts.length === 1 || + StringPrototypeIncludes(patternSubdomain, 'xn--')) return hostSubdomain === patternSubdomain; if (!wildcards) @@ -208,10 +219,10 @@ function check(hostParts, pattern, wildcards) { if (prefix.length + suffix.length > hostSubdomain.length) return false; - if (!hostSubdomain.startsWith(prefix)) + if (!StringPrototypeStartsWith(hostSubdomain, prefix)) return false; - if (!hostSubdomain.endsWith(suffix)) + if (!StringPrototypeEndsWith(hostSubdomain, suffix)) return false; return true; @@ -228,28 +239,30 @@ exports.checkServerIdentity = function checkServerIdentity(hostname, cert) { hostname = '' + hostname; if (altNames) { - for (const name of altNames.split(', ')) { - if (name.startsWith('DNS:')) { - dnsNames.push(name.slice(4)); - } else if (name.startsWith('URI:')) { + for (const name of StringPrototypeSplit(altNames, ', ')) { + if (StringPrototypeStartsWith(name, 'DNS:')) { + ArrayPrototypePush(dnsNames, StringPrototypeSlice(name, 4)); + } else if (StringPrototypeStartsWith(name, 'URI:')) { let uri; try { - uri = new URL(name.slice(4)); + uri = new URL(StringPrototypeSlice(name, 4)); } catch { - uri = url.parse(name.slice(4)); + const slicedName = StringPrototypeSlice(name, 4); + uri = url.parse(slicedName); if (!urlWarningEmitted && !process.noDeprecation) { urlWarningEmitted = true; process.emitWarning( - `The URI ${name.slice(4)} found in cert.subjectaltname ` + + `The URI ${slicedName} found in cert.subjectaltname ` + 'is not a valid URI, and is supported in the tls module ' + 'solely for compatibility.', 'DeprecationWarning', 'DEP0109'); } } - uriNames.push(uri.hostname); // TODO(bnoordhuis) Also use scheme. - } else if (name.startsWith('IP Address:')) { - ips.push(canonicalizeIP(name.slice(11))); + // TODO(bnoordhuis) Also use scheme. + ArrayPrototypePush(uriNames, uri.hostname); + } else if (StringPrototypeStartsWith(name, 'IP Address:')) { + ArrayPrototypePush(ips, canonicalizeIP(StringPrototypeSlice(name, 11))); } } } @@ -263,9 +276,10 @@ exports.checkServerIdentity = function checkServerIdentity(hostname, cert) { hostname = unfqdn(hostname); // Remove trailing dot for error messages. if (net.isIP(hostname)) { - valid = ips.includes(canonicalizeIP(hostname)); + valid = ArrayPrototypeIncludes(ips, canonicalizeIP(hostname)); if (!valid) - reason = `IP: ${hostname} is not in the cert's list: ${ips.join(', ')}`; + reason = `IP: ${hostname} is not in the cert's list: ` + + ArrayPrototypeJoin(ips, ', '); // TODO(bnoordhuis) Also check URI SANs that are IP addresses. } else if (hasAltNames || subject) { const hostParts = splitHost(hostname); @@ -273,7 +287,8 @@ exports.checkServerIdentity = function checkServerIdentity(hostname, cert) { if (hasAltNames) { const noWildcard = (pattern) => check(hostParts, pattern, false); - valid = dnsNames.some(wildcard) || uriNames.some(noWildcard); + valid = ArrayPrototypeSome(dnsNames, wildcard) || + ArrayPrototypeSome(uriNames, noWildcard); if (!valid) reason = `Host: ${hostname}. is not in the cert's altnames: ${altNames}`; @@ -282,7 +297,7 @@ exports.checkServerIdentity = function checkServerIdentity(hostname, cert) { const cn = subject.CN; if (ArrayIsArray(cn)) - valid = cn.some(wildcard); + valid = ArrayPrototypeSome(cn, wildcard); else if (cn) valid = wildcard(cn); diff --git a/lib/trace_events.js b/lib/trace_events.js index 35f776ad53c310..85101e7930d977 100644 --- a/lib/trace_events.js +++ b/lib/trace_events.js @@ -2,7 +2,8 @@ const { ArrayIsArray, - Set, + ArrayPrototypeJoin, + SafeSet, Symbol, } = primordials; @@ -27,7 +28,7 @@ const { CategorySet, getEnabledCategories } = internalBinding('trace_events'); const { customInspectSymbol } = require('internal/util'); const { format } = require('internal/util/inspect'); -const enabledTracingObjects = new Set(); +const enabledTracingObjects = new SafeSet(); class Tracing { constructor(categories) { @@ -63,7 +64,7 @@ class Tracing { } get categories() { - return this[kCategories].join(','); + return ArrayPrototypeJoin(this[kCategories], ','); } [customInspectSymbol](depth, opts) { diff --git a/lib/url.js b/lib/url.js index 735390dfd2e59b..cc36216f9eb916 100644 --- a/lib/url.js +++ b/lib/url.js @@ -22,6 +22,7 @@ 'use strict'; const { + Int8Array, ObjectCreate, ObjectKeys, SafeSet, @@ -561,7 +562,7 @@ function urlFormat(urlObject, options) { // digits // alpha (uppercase) // alpha (lowercase) -const noEscapeAuth = [ +const noEscapeAuth = new Int8Array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x00 - 0x0F 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x10 - 0x1F 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, // 0x20 - 0x2F @@ -570,7 +571,7 @@ const noEscapeAuth = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 0x50 - 0x5F 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 - 0x6F 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0 // 0x70 - 0x7F -]; +]); Url.prototype.format = function format() { let auth = this.auth || ''; diff --git a/lib/util.js b/lib/util.js index 1414c0d11d58a8..2d8687ac9c569a 100644 --- a/lib/util.js +++ b/lib/util.js @@ -23,6 +23,7 @@ const { ArrayIsArray, + Date, Error, NumberIsSafeInteger, ObjectDefineProperties, diff --git a/lib/util/types.js b/lib/util/types.js new file mode 100644 index 00000000000000..a48a552d6d37e7 --- /dev/null +++ b/lib/util/types.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('internal/util/types'); diff --git a/lib/v8.js b/lib/v8.js index 56e3e6056214ca..f1c624bc10add0 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -17,14 +17,17 @@ const { Array, ArrayBuffer, + ArrayPrototypeForEach, + ArrayPrototypePush, + DataView, Error, Float32Array, Float64Array, Int16Array, Int32Array, Int8Array, - Map, ObjectPrototypeToString, + SafeMap, Uint16Array, Uint32Array, Uint8Array, @@ -34,9 +37,15 @@ const { const { Buffer } = require('buffer'); const { validateString } = require('internal/validators'); const { - Serializer: _Serializer, - Deserializer: _Deserializer + Serializer, + Deserializer } = internalBinding('serdes'); + +let profiler = {}; +if (internalBinding('config').hasInspector) { + profiler = internalBinding('profiler'); +} + const assert = require('internal/assert'); const { copy } = internalBinding('buffer'); const { inspect } = require('internal/util/inspect'); @@ -63,13 +72,6 @@ function getHeapSnapshot() { return new HeapSnapshotStream(handle); } -// Calling exposed c++ functions directly throws exception as it expected to be -// called with new operator and caused an assert to fire. -// Creating JS wrapper so that it gets caught at JS layer. -class Serializer extends _Serializer { } - -class Deserializer extends _Deserializer { } - const { cachedDataVersionTag, setFlagsFromString: _setFlagsFromString, @@ -187,17 +189,18 @@ const arrayBufferViewTypes = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, DataView]; -const arrayBufferViewTypeToIndex = new Map(); +const arrayBufferViewTypeToIndex = new SafeMap(); { const dummy = new ArrayBuffer(); - for (const [i, ctor] of arrayBufferViewTypes.entries()) { + ArrayPrototypeForEach(arrayBufferViewTypes, (ctor, i) => { const tag = ObjectPrototypeToString(new ctor(dummy)); arrayBufferViewTypeToIndex.set(tag, i); - } + }); } -const bufferConstructorIndex = arrayBufferViewTypes.push(FastBuffer) - 1; +const bufferConstructorIndex = + ArrayPrototypePush(arrayBufferViewTypes, FastBuffer) - 1; class DefaultSerializer extends Serializer { constructor() { @@ -275,6 +278,8 @@ module.exports = { DefaultSerializer, DefaultDeserializer, deserialize, + takeCoverage: profiler.takeCoverage, + stopCoverage: profiler.stopCoverage, serialize, writeHeapSnapshot, }; diff --git a/lib/vm.js b/lib/vm.js index 45a2edf0bb20b3..33893845084141 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -24,7 +24,8 @@ const { ArrayPrototypeForEach, Symbol, - PromiseReject + PromiseReject, + ReflectApply, } = primordials; const { @@ -269,7 +270,7 @@ function sigintHandlersWrap(fn, thisArg, argsArray) { process.removeAllListeners('SIGINT'); try { - return fn.apply(thisArg, argsArray); + return ReflectApply(fn, thisArg, argsArray); } finally { // Add using the public methods so that the `newListener` handler of // process can re-attach the listeners. diff --git a/lib/worker_threads.js b/lib/worker_threads.js index 1b9c6ae945e530..efa1c51112aac0 100644 --- a/lib/worker_threads.js +++ b/lib/worker_threads.js @@ -13,6 +13,7 @@ const { MessageChannel, moveMessagePortToContext, receiveMessageOnPort, + BroadcastChannel, } = require('internal/worker/io'); const { @@ -32,4 +33,5 @@ module.exports = { Worker, parentPort: null, workerData: null, + BroadcastChannel, }; diff --git a/lib/zlib.js b/lib/zlib.js index faa84401e9a04b..91eabbefa3576e 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -23,7 +23,10 @@ const { ArrayBuffer, + ArrayPrototypeMap, + ArrayPrototypePush, Error, + FunctionPrototypeBind, MathMax, NumberIsFinite, NumberIsNaN, @@ -33,7 +36,9 @@ const { ObjectGetPrototypeOf, ObjectKeys, ObjectSetPrototypeOf, + ReflectApply, Symbol, + TypedArrayPrototypeFill, Uint32Array, } = primordials; @@ -124,7 +129,7 @@ function zlibBufferOnData(chunk) { if (!this.buffers) this.buffers = [chunk]; else - this.buffers.push(chunk); + ArrayPrototypePush(this.buffers, chunk); this.nread += chunk.length; if (this.nread > this._maxOutputLength) { this.close(); @@ -268,7 +273,7 @@ function ZlibBase(opts, mode, handle, { flush, finishFlush, fullFlush }) { } } - Transform.call(this, { autoDestroy: true, ...opts }); + ReflectApply(Transform, this, [{ autoDestroy: true, ...opts }]); this[kError] = null; this.bytesWritten = 0; this._handle = handle; @@ -458,7 +463,7 @@ function processChunkSync(self, chunk, flushFlag) { if (!buffers) buffers = [out]; else - buffers.push(out); + ArrayPrototypePush(buffers, out); nread += out.byteLength; if (nread > self._maxOutputLength) { @@ -671,7 +676,7 @@ function Zlib(opts, mode) { processCallback, dictionary); - ZlibBase.call(this, opts, mode, handle, zlibDefaultOpts); + ReflectApply(ZlibBase, this, [opts, mode, handle, zlibDefaultOpts]); this._level = level; this._strategy = strategy; @@ -699,7 +704,8 @@ Zlib.prototype.params = function params(level, strategy, callback) { if (this._level !== level || this._strategy !== strategy) { this.flush(Z_SYNC_FLUSH, - paramsAfterFlushCallback.bind(this, level, strategy, callback)); + FunctionPrototypeBind(paramsAfterFlushCallback, this, + level, strategy, callback)); } else { process.nextTick(callback); } @@ -710,7 +716,7 @@ Zlib.prototype.params = function params(level, strategy, callback) { function Deflate(opts) { if (!(this instanceof Deflate)) return new Deflate(opts); - Zlib.call(this, opts, DEFLATE); + ReflectApply(Zlib, this, [opts, DEFLATE]); } ObjectSetPrototypeOf(Deflate.prototype, Zlib.prototype); ObjectSetPrototypeOf(Deflate, Zlib); @@ -718,7 +724,7 @@ ObjectSetPrototypeOf(Deflate, Zlib); function Inflate(opts) { if (!(this instanceof Inflate)) return new Inflate(opts); - Zlib.call(this, opts, INFLATE); + ReflectApply(Zlib, this, [opts, INFLATE]); } ObjectSetPrototypeOf(Inflate.prototype, Zlib.prototype); ObjectSetPrototypeOf(Inflate, Zlib); @@ -726,7 +732,7 @@ ObjectSetPrototypeOf(Inflate, Zlib); function Gzip(opts) { if (!(this instanceof Gzip)) return new Gzip(opts); - Zlib.call(this, opts, GZIP); + ReflectApply(Zlib, this, [opts, GZIP]); } ObjectSetPrototypeOf(Gzip.prototype, Zlib.prototype); ObjectSetPrototypeOf(Gzip, Zlib); @@ -734,7 +740,7 @@ ObjectSetPrototypeOf(Gzip, Zlib); function Gunzip(opts) { if (!(this instanceof Gunzip)) return new Gunzip(opts); - Zlib.call(this, opts, GUNZIP); + ReflectApply(Zlib, this, [opts, GUNZIP]); } ObjectSetPrototypeOf(Gunzip.prototype, Zlib.prototype); ObjectSetPrototypeOf(Gunzip, Zlib); @@ -743,7 +749,7 @@ function DeflateRaw(opts) { if (opts && opts.windowBits === 8) opts.windowBits = 9; if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts); - Zlib.call(this, opts, DEFLATERAW); + ReflectApply(Zlib, this, [opts, DEFLATERAW]); } ObjectSetPrototypeOf(DeflateRaw.prototype, Zlib.prototype); ObjectSetPrototypeOf(DeflateRaw, Zlib); @@ -751,7 +757,7 @@ ObjectSetPrototypeOf(DeflateRaw, Zlib); function InflateRaw(opts) { if (!(this instanceof InflateRaw)) return new InflateRaw(opts); - Zlib.call(this, opts, INFLATERAW); + ReflectApply(Zlib, this, [opts, INFLATERAW]); } ObjectSetPrototypeOf(InflateRaw.prototype, Zlib.prototype); ObjectSetPrototypeOf(InflateRaw, Zlib); @@ -759,7 +765,7 @@ ObjectSetPrototypeOf(InflateRaw, Zlib); function Unzip(opts) { if (!(this instanceof Unzip)) return new Unzip(opts); - Zlib.call(this, opts, UNZIP); + ReflectApply(Zlib, this, [opts, UNZIP]); } ObjectSetPrototypeOf(Unzip.prototype, Zlib.prototype); ObjectSetPrototypeOf(Unzip, Zlib); @@ -779,9 +785,10 @@ function createConvenienceMethod(ctor, sync) { }; } -const kMaxBrotliParam = MathMax(...ObjectKeys(constants).map((key) => { - return key.startsWith('BROTLI_PARAM_') ? constants[key] : 0; -})); +const kMaxBrotliParam = MathMax(...ArrayPrototypeMap( + ObjectKeys(constants), + (key) => (key.startsWith('BROTLI_PARAM_') ? constants[key] : 0) +)); const brotliInitParamsArray = new Uint32Array(kMaxBrotliParam + 1); @@ -793,7 +800,7 @@ const brotliDefaultOpts = { function Brotli(opts, mode) { assert(mode === BROTLI_DECODE || mode === BROTLI_ENCODE); - brotliInitParamsArray.fill(-1); + TypedArrayPrototypeFill(brotliInitParamsArray, -1); if (opts && opts.params) { for (const origKey of ObjectKeys(opts.params)) { const key = +origKey; @@ -824,7 +831,7 @@ function Brotli(opts, mode) { throw new ERR_ZLIB_INITIALIZATION_FAILED(); } - ZlibBase.call(this, opts, mode, handle, brotliDefaultOpts); + ReflectApply(ZlibBase, this, [opts, mode, handle, brotliDefaultOpts]); } ObjectSetPrototypeOf(Brotli.prototype, Zlib.prototype); ObjectSetPrototypeOf(Brotli, Zlib); @@ -832,7 +839,7 @@ ObjectSetPrototypeOf(Brotli, Zlib); function BrotliCompress(opts) { if (!(this instanceof BrotliCompress)) return new BrotliCompress(opts); - Brotli.call(this, opts, BROTLI_ENCODE); + ReflectApply(Brotli, this, [opts, BROTLI_ENCODE]); } ObjectSetPrototypeOf(BrotliCompress.prototype, Brotli.prototype); ObjectSetPrototypeOf(BrotliCompress, Brotli); @@ -840,7 +847,7 @@ ObjectSetPrototypeOf(BrotliCompress, Brotli); function BrotliDecompress(opts) { if (!(this instanceof BrotliDecompress)) return new BrotliDecompress(opts); - Brotli.call(this, opts, BROTLI_DECODE); + ReflectApply(Brotli, this, [opts, BROTLI_DECODE]); } ObjectSetPrototypeOf(BrotliDecompress.prototype, Brotli.prototype); ObjectSetPrototypeOf(BrotliDecompress, Brotli); diff --git a/node.gyp b/node.gyp index dd9bddd08ba2da..865a7de93176e5 100644 --- a/node.gyp +++ b/node.gyp @@ -51,6 +51,7 @@ 'lib/constants.js', 'lib/crypto.js', 'lib/cluster.js', + 'lib/diagnostics_channel.js', 'lib/dgram.js', 'lib/dns.js', 'lib/dns/promises.js', @@ -72,6 +73,8 @@ 'lib/net.js', 'lib/os.js', 'lib/path.js', + 'lib/path/posix.js', + 'lib/path/win32.js', 'lib/perf_hooks.js', 'lib/process.js', 'lib/punycode.js', @@ -97,6 +100,7 @@ 'lib/tty.js', 'lib/url.js', 'lib/util.js', + 'lib/util/types.js', 'lib/v8.js', 'lib/vm.js', 'lib/wasi.js', @@ -226,6 +230,7 @@ 'lib/internal/util/debuglog.js', 'lib/internal/util/inspect.js', 'lib/internal/util/inspector.js', + 'lib/internal/util/iterable_weak_map.js', 'lib/internal/util/types.js', 'lib/internal/http2/core.js', 'lib/internal/http2/compat.js', @@ -240,6 +245,7 @@ 'lib/internal/worker/js_transferable.js', 'lib/internal/watchdog.js', 'lib/internal/streams/lazy_transform.js', + 'lib/internal/streams/add-abort-signal.js', 'lib/internal/streams/buffer_list.js', 'lib/internal/streams/duplexpair.js', 'lib/internal/streams/from.js', @@ -270,7 +276,6 @@ 'deps/acorn/acorn/dist/acorn.js', 'deps/acorn/acorn-walk/dist/walk.js', 'deps/acorn-plugins/acorn-class-fields/index.js', - 'deps/acorn-plugins/acorn-numeric-separator/index.js', 'deps/acorn-plugins/acorn-private-class-elements/index.js', 'deps/acorn-plugins/acorn-private-methods/index.js', 'deps/acorn-plugins/acorn-static-class-features/index.js', @@ -1360,6 +1365,9 @@ 'defines': [ 'HAVE_OPENSSL=1', ], + 'sources': [ + 'test/cctest/test_node_crypto.cc', + ] }], [ 'node_use_openssl=="true" and experimental_quic==1', { 'defines': [ diff --git a/src/README.md b/src/README.md index e81f1e1c70b781..2be97e28b8fbea 100644 --- a/src/README.md +++ b/src/README.md @@ -38,6 +38,30 @@ the [event loop][] and other operation system abstractions to Node.js. There is a [reference documentation for the libuv API][]. +## File structure + +The Node.js C++ files follow this structure: + +The `.h` header files contain declarations, and sometimes definitions that don’t +require including other headers (e.g. getters, setters, etc.). They should only +include other `.h` header files and nothing else. + +The `-inl.h` header files contain definitions of inline functions from the +corresponding `.h` header file (e.g. functions marked `inline` in the +declaration or `template` functions). They always include the corresponding +`.h` header file, and can include other `.h` and `-inl.h` header files as +needed. It is not mandatory to split out the definitions from the `.h` file +into an `-inl.h` file, but it becomes necessary when there are multiple +definitions and contents of other `-inl.h` files start being used. Therefore, it +is recommended to split a `-inl.h` file when inline functions become longer than +a few lines to keep the corresponding `.h` file readable and clean. All visible +definitions from the `-inl.h` file should be declared in the corresponding `.h` +header file. + +The `.cc` files contain definitions of non-inline functions from the +corresponding `.h` header file. They always include the corresponding `.h` +header file, and can include other `.h` and `-inl.h` header files as needed. + ## Helpful concepts A number of concepts are involved in putting together Node.js on top of V8 and @@ -495,16 +519,16 @@ The most common reasons for this are: holds a value of type `Local`. It has methods that perform the same operations as the methods of `v8::Maybe`, but with different names: -| `Maybe` | `MaybeLocal` | -| ---------------------- | ------------------------------- | -| `maybe.IsNothing()` | `maybe_local.IsEmpty()` | -| `maybe.IsJust()` | `!maybe_local.IsEmpty()` | -| `maybe.To(&value)` | `maybe_local.ToLocal(&local)` | -| `maybe.ToChecked()` | `maybe_local.ToLocalChecked()` | -| `maybe.FromJust()` | `maybe_local.ToLocalChecked()` | -| `maybe.Check()` | – | -| `v8::Nothing()` | `v8::MaybeLocal()` | -| `v8::Just(value)` | `v8::MaybeLocal(value)` | +| `Maybe` | `MaybeLocal` | +| -------------------- | ------------------------------ | +| `maybe.IsNothing()` | `maybe_local.IsEmpty()` | +| `maybe.IsJust()` | `!maybe_local.IsEmpty()` | +| `maybe.To(&value)` | `maybe_local.ToLocal(&local)` | +| `maybe.ToChecked()` | `maybe_local.ToLocalChecked()` | +| `maybe.FromJust()` | `maybe_local.ToLocalChecked()` | +| `maybe.Check()` | – | +| `v8::Nothing()` | `v8::MaybeLocal()` | +| `v8::Just(value)` | `v8::MaybeLocal(value)` | ##### Handling empty `Maybe`s diff --git a/src/aliased_buffer.h b/src/aliased_buffer.h index 408f158b7880ca..134685542d4a75 100644 --- a/src/aliased_buffer.h +++ b/src/aliased_buffer.h @@ -10,7 +10,7 @@ namespace node { -typedef size_t AliasedBufferInfo; +typedef size_t AliasedBufferIndex; /** * Do not use this class directly when creating instances of it - use the @@ -37,10 +37,10 @@ class AliasedBufferBase { public: AliasedBufferBase(v8::Isolate* isolate, const size_t count, - const AliasedBufferInfo* info = nullptr) - : isolate_(isolate), count_(count), byte_offset_(0), info_(info) { + const AliasedBufferIndex* index = nullptr) + : isolate_(isolate), count_(count), byte_offset_(0), index_(index) { CHECK_GT(count, 0); - if (info != nullptr) { + if (index != nullptr) { // Will be deserialized later. return; } @@ -72,12 +72,12 @@ class AliasedBufferBase { const size_t byte_offset, const size_t count, const AliasedBufferBase& backing_buffer, - const AliasedBufferInfo* info = nullptr) + const AliasedBufferIndex* index = nullptr) : isolate_(isolate), count_(count), byte_offset_(byte_offset), - info_(info) { - if (info != nullptr) { + index_(index) { + if (index != nullptr) { // Will be deserialized later. return; } @@ -102,20 +102,20 @@ class AliasedBufferBase { count_(that.count_), byte_offset_(that.byte_offset_), buffer_(that.buffer_) { - DCHECK_NULL(info_); + DCHECK_NULL(index_); js_array_ = v8::Global(that.isolate_, that.GetJSArray()); } - AliasedBufferInfo Serialize(v8::Local context, + AliasedBufferIndex Serialize(v8::Local context, v8::SnapshotCreator* creator) { - DCHECK_NULL(info_); + DCHECK_NULL(index_); return creator->AddData(context, GetJSArray()); } inline void Deserialize(v8::Local context) { - DCHECK_NOT_NULL(info_); + DCHECK_NOT_NULL(index_); v8::Local arr = - context->GetDataFromSnapshotOnce(*info_).ToLocalChecked(); + context->GetDataFromSnapshotOnce(*index_).ToLocalChecked(); // These may not hold true for AliasedBuffers that have grown, so should // be removed when we expand the snapshot support. DCHECK_EQ(count_, arr->Length()); @@ -124,11 +124,11 @@ class AliasedBufferBase { static_cast(arr->Buffer()->GetBackingStore()->Data()); buffer_ = reinterpret_cast(raw + byte_offset_); js_array_.Reset(isolate_, arr); - info_ = nullptr; + index_ = nullptr; } AliasedBufferBase& operator=(AliasedBufferBase&& that) noexcept { - DCHECK_NULL(info_); + DCHECK_NULL(index_); this->~AliasedBufferBase(); isolate_ = that.isolate_; count_ = that.count_; @@ -194,7 +194,7 @@ class AliasedBufferBase { * Get the underlying v8 TypedArray overlayed on top of the native buffer */ v8::Local GetJSArray() const { - DCHECK_NULL(info_); + DCHECK_NULL(index_); return js_array_.Get(isolate_); } @@ -211,7 +211,7 @@ class AliasedBufferBase { * through the GetValue/SetValue/operator[] methods */ inline const NativeT* GetNativeBuffer() const { - DCHECK_NULL(info_); + DCHECK_NULL(index_); return buffer_; } @@ -227,7 +227,7 @@ class AliasedBufferBase { */ inline void SetValue(const size_t index, NativeT value) { DCHECK_LT(index, count_); - DCHECK_NULL(info_); + DCHECK_NULL(index_); buffer_[index] = value; } @@ -235,7 +235,7 @@ class AliasedBufferBase { * Get value at position index */ inline const NativeT GetValue(const size_t index) const { - DCHECK_NULL(info_); + DCHECK_NULL(index_); DCHECK_LT(index, count_); return buffer_[index]; } @@ -244,7 +244,7 @@ class AliasedBufferBase { * Effectively, a synonym for GetValue/SetValue */ Reference operator[](size_t index) { - DCHECK_NULL(info_); + DCHECK_NULL(index_); return Reference(this, index); } @@ -260,7 +260,7 @@ class AliasedBufferBase { // Should only be used on an owning array, not one created as a sub array of // an owning `AliasedBufferBase`. void reserve(size_t new_capacity) { - DCHECK_NULL(info_); + DCHECK_NULL(index_); DCHECK_GE(new_capacity, count_); DCHECK_EQ(byte_offset_, 0); const v8::HandleScope handle_scope(isolate_); @@ -296,7 +296,7 @@ class AliasedBufferBase { v8::Global js_array_; // Deserialize data - const AliasedBufferInfo* info_ = nullptr; + const AliasedBufferIndex* index_ = nullptr; }; typedef AliasedBufferBase AliasedInt32Array; diff --git a/src/api/callback.cc b/src/api/callback.cc index 3d4f91a866ea39..a7b23dd4924baf 100644 --- a/src/api/callback.cc +++ b/src/api/callback.cc @@ -12,7 +12,6 @@ using v8::HandleScope; using v8::Isolate; using v8::Local; using v8::MaybeLocal; -using v8::MicrotasksScope; using v8::Object; using v8::String; using v8::Value; @@ -111,7 +110,7 @@ void InternalCallbackScope::Close() { auto weakref_cleanup = OnScopeLeave([&]() { env_->RunWeakRefCleanup(); }); if (!tick_info->has_tick_scheduled()) { - MicrotasksScope::PerformCheckpoint(env_->isolate()); + env_->context()->GetMicrotaskQueue()->PerformCheckpoint(env_->isolate()); perform_stopping_check(); } @@ -266,6 +265,34 @@ MaybeLocal MakeCallback(Isolate* isolate, return ret; } +// Use this if you just want to safely invoke some JS callback and +// would like to retain the currently active async_context, if any. +// In case none is available, a fixed default context will be +// installed otherwise. +MaybeLocal MakeSyncCallback(Isolate* isolate, + Local recv, + Local callback, + int argc, + Local argv[]) { + Environment* env = Environment::GetCurrent(callback->CreationContext()); + CHECK_NOT_NULL(env); + if (!env->can_call_into_js()) return Local(); + + Context::Scope context_scope(env->context()); + if (env->async_callback_scope_depth()) { + // There's another MakeCallback() on the stack, piggy back on it. + // In particular, retain the current async_context. + return callback->Call(env->context(), recv, argc, argv); + } + + // This is a toplevel invocation and the caller (intentionally) + // didn't provide any async_context to run in. Install a default context. + MaybeLocal ret = + InternalMakeCallback(env, env->process_object(), recv, callback, argc, argv, + async_context{0, 0}); + return ret; +} + // Legacy MakeCallback()s Local MakeCallback(Isolate* isolate, diff --git a/src/api/environment.cc b/src/api/environment.cc index fa994bc41ec9bc..46e3360ef9c023 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -231,9 +231,11 @@ void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s) { s.fatal_error_callback : OnFatalError; isolate->SetFatalErrorHandler(fatal_error_cb); - auto* prepare_stack_trace_cb = s.prepare_stack_trace_callback ? - s.prepare_stack_trace_callback : PrepareStackTraceCallback; - isolate->SetPrepareStackTraceCallback(prepare_stack_trace_cb); + if ((s.flags & SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK) == 0) { + auto* prepare_stack_trace_cb = s.prepare_stack_trace_callback ? + s.prepare_stack_trace_callback : PrepareStackTraceCallback; + isolate->SetPrepareStackTraceCallback(prepare_stack_trace_cb); + } } void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s) { @@ -264,10 +266,6 @@ void SetIsolateUpForNode(v8::Isolate* isolate) { SetIsolateUpForNode(isolate, settings); } -Isolate* NewIsolate(ArrayBufferAllocator* allocator, uv_loop_t* event_loop) { - return NewIsolate(allocator, event_loop, GetMainThreadMultiIsolatePlatform()); -} - // TODO(joyeecheung): we may want to expose this, but then we need to be // careful about what we override in the params. Isolate* NewIsolate(Isolate::CreateParams* params, @@ -327,18 +325,6 @@ struct InspectorParentHandleImpl : public InspectorParentHandle { }; #endif -Environment* CreateEnvironment(IsolateData* isolate_data, - Local context, - int argc, - const char* const* argv, - int exec_argc, - const char* const* exec_argv) { - return CreateEnvironment( - isolate_data, context, - std::vector(argv, argv + argc), - std::vector(exec_argv, exec_argv + exec_argc)); -} - Environment* CreateEnvironment( IsolateData* isolate_data, Local context, @@ -410,16 +396,9 @@ NODE_EXTERN std::unique_ptr GetInspectorParentHandle( #endif } -void LoadEnvironment(Environment* env) { - USE(LoadEnvironment(env, - StartExecutionCallback{}, - {})); -} - MaybeLocal LoadEnvironment( Environment* env, - StartExecutionCallback cb, - std::unique_ptr removeme) { + StartExecutionCallback cb) { env->InitializeLibuv(); env->InitializeDiagnostics(); @@ -428,8 +407,7 @@ MaybeLocal LoadEnvironment( MaybeLocal LoadEnvironment( Environment* env, - const char* main_script_source_utf8, - std::unique_ptr removeme) { + const char* main_script_source_utf8) { CHECK_NOT_NULL(main_script_source_utf8); return LoadEnvironment( env, @@ -460,8 +438,12 @@ Environment* GetCurrentEnvironment(Local context) { return Environment::GetCurrent(context); } -MultiIsolatePlatform* GetMainThreadMultiIsolatePlatform() { - return per_process::v8_platform.Platform(); +IsolateData* GetEnvironmentIsolateData(Environment* env) { + return env->isolate_data(); +} + +ArrayBufferAllocator* GetArrayBufferAllocator(IsolateData* isolate_data) { + return isolate_data->node_allocator(); } MultiIsolatePlatform* GetMultiIsolatePlatform(Environment* env) { diff --git a/src/api/hooks.cc b/src/api/hooks.cc index 84c91a2100b156..f3f685b167f3cd 100644 --- a/src/api/hooks.cc +++ b/src/api/hooks.cc @@ -22,11 +22,6 @@ void RunAtExit(Environment* env) { env->RunAtExitCallbacks(); } -void AtExit(void (*cb)(void* arg), void* arg) { - auto env = Environment::GetThreadLocalEnv(); - AtExit(env, cb, arg); -} - void AtExit(Environment* env, void (*cb)(void* arg), void* arg) { CHECK_NOT_NULL(env); env->AtExit(cb, arg); diff --git a/src/async_wrap.cc b/src/async_wrap.cc index bb15bf6adb1262..3748d542c95021 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -827,7 +827,8 @@ void AsyncWrap::EmitDestroy(Environment* env, double async_id) { // interrupt to get this Microtask scheduled as fast as possible. if (env->destroy_async_id_list()->size() == 16384) { env->RequestInterrupt([](Environment* env) { - env->isolate()->EnqueueMicrotask( + env->context()->GetMicrotaskQueue()->EnqueueMicrotask( + env->isolate(), [](void* arg) { DestroyAsyncIdsCallback(static_cast(arg)); }, env); diff --git a/src/base_object-inl.h b/src/base_object-inl.h index 0b620ab864f67b..b9f99a03ddfb3e 100644 --- a/src/base_object-inl.h +++ b/src/base_object-inl.h @@ -28,14 +28,7 @@ #include "env-inl.h" #include "util.h" -#if (__GNUC__ >= 8) && !defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-function-type" -#endif #include "v8.h" -#if (__GNUC__ >= 8) && !defined(__clang__) -#pragma GCC diagnostic pop -#endif namespace node { diff --git a/src/base_object.h b/src/base_object.h index 54ebeb52041738..3eac795e783e9d 100644 --- a/src/base_object.h +++ b/src/base_object.h @@ -116,13 +116,13 @@ class BaseObject : public MemoryRetainer { // the current object: // - kUntransferable: // No transfer is possible, either because this type of BaseObject does - // not know how to be transfered, or because it is not in a state in + // not know how to be transferred, or because it is not in a state in // which it is possible to do so (e.g. because it has already been - // transfered). + // transferred). // - kTransferable: - // This object can be transfered in a destructive fashion, i.e. will be + // This object can be transferred in a destructive fashion, i.e. will be // rendered unusable on the sending side of the channel in the process - // of being transfered. (In C++ this would be referred to as movable but + // of being transferred. (In C++ this would be referred to as movable but // not copyable.) Objects of this type need to be listed in the // `transferList` argument of the relevant postMessage() call in order to // make sure that they are not accidentally destroyed on the sending side. diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index fcffc2bec672a7..71766fa39171af 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -29,6 +29,7 @@ #include "req_wrap-inl.h" #include "util-inl.h" #include "uv.h" +#include "node_errors.h" #include #include @@ -1492,7 +1493,7 @@ class QueryAaaaWrap: public QueryWrap { class QueryCaaWrap: public QueryWrap { public: QueryCaaWrap(ChannelWrap* channel, Local req_wrap_obj) - : QueryWrap(channel, req_wrap_obj, "resolve6") { + : QueryWrap(channel, req_wrap_obj, "resolveCaa") { } int Send(const char* name) override { @@ -2227,6 +2228,70 @@ void SetServers(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(err); } +void SetLocalAddress(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + ChannelWrap* channel; + ASSIGN_OR_RETURN_UNWRAP(&channel, args.Holder()); + + CHECK_EQ(args.Length(), 2); + CHECK(args[0]->IsString()); + + Isolate* isolate = args.GetIsolate(); + node::Utf8Value ip0(isolate, args[0]); + + unsigned char addr0[sizeof(struct in6_addr)]; + unsigned char addr1[sizeof(struct in6_addr)]; + int type0 = 0; + + // This function accepts 2 arguments. The first may be either an IPv4 + // address or an IPv6 address. If present, the second argument must be the + // other type of address. Otherwise, the unspecified type of IP is set + // to 0 (any). + + if (uv_inet_pton(AF_INET, *ip0, &addr0) == 0) { + ares_set_local_ip4(channel->cares_channel(), ReadUint32BE(addr0)); + type0 = 4; + } else if (uv_inet_pton(AF_INET6, *ip0, &addr0) == 0) { + ares_set_local_ip6(channel->cares_channel(), addr0); + type0 = 6; + } else { + THROW_ERR_INVALID_ARG_VALUE(env, "Invalid IP address."); + return; + } + + if (!args[1]->IsUndefined()) { + CHECK(args[1]->IsString()); + node::Utf8Value ip1(isolate, args[1]); + + if (uv_inet_pton(AF_INET, *ip1, &addr1) == 0) { + if (type0 == 4) { + THROW_ERR_INVALID_ARG_VALUE(env, "Cannot specify two IPv4 addresses."); + return; + } else { + ares_set_local_ip4(channel->cares_channel(), ReadUint32BE(addr1)); + } + } else if (uv_inet_pton(AF_INET6, *ip1, &addr1) == 0) { + if (type0 == 6) { + THROW_ERR_INVALID_ARG_VALUE(env, "Cannot specify two IPv6 addresses."); + return; + } else { + ares_set_local_ip6(channel->cares_channel(), addr1); + } + } else { + THROW_ERR_INVALID_ARG_VALUE(env, "Invalid IP address."); + return; + } + } else { + // No second arg specifed + if (type0 == 4) { + memset(&addr1, 0, sizeof(addr1)); + ares_set_local_ip6(channel->cares_channel(), addr1); + } else { + ares_set_local_ip4(channel->cares_channel(), 0); + } + } +} + void Cancel(const FunctionCallbackInfo& args) { ChannelWrap* channel; ASSIGN_OR_RETURN_UNWRAP(&channel, args.Holder()); @@ -2329,6 +2394,7 @@ void Initialize(Local target, env->SetProtoMethodNoSideEffect(channel_wrap, "getServers", GetServers); env->SetProtoMethod(channel_wrap, "setServers", SetServers); + env->SetProtoMethod(channel_wrap, "setLocalAddress", SetLocalAddress); env->SetProtoMethod(channel_wrap, "cancel", Cancel); Local channelWrapString = diff --git a/src/crypto/crypto_aes.cc b/src/crypto/crypto_aes.cc index 889bb487fa04d5..584839e813e570 100644 --- a/src/crypto/crypto_aes.cc +++ b/src/crypto/crypto_aes.cc @@ -31,7 +31,7 @@ namespace { // Implements general AES encryption and decryption for CBC // The key_data must be a secret key. // On success, this function sets out to a new AllocatedBuffer -// instance containing the results and returns WebCryptoCipherStatus::ERR_OK. +// instance containing the results and returns WebCryptoCipherStatus::OK. WebCryptoCipherStatus AES_Cipher( Environment* env, KeyObjectData* key_data, @@ -59,7 +59,7 @@ WebCryptoCipherStatus AES_Cipher( nullptr, encrypt)) { // Cipher init failed - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } if (mode == EVP_CIPH_GCM_MODE && !EVP_CIPHER_CTX_ctrl( @@ -67,7 +67,7 @@ WebCryptoCipherStatus AES_Cipher( EVP_CTRL_AEAD_SET_IVLEN, params.iv.size(), nullptr)) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } if (!EVP_CIPHER_CTX_set_key_length( @@ -80,7 +80,7 @@ WebCryptoCipherStatus AES_Cipher( reinterpret_cast(key_data->GetSymmetricKey()), params.iv.data(), encrypt)) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } size_t tag_len = 0; @@ -95,7 +95,7 @@ WebCryptoCipherStatus AES_Cipher( EVP_CTRL_AEAD_SET_TAG, params.tag.size(), const_cast(params.tag.get()))) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } break; case kWebCryptoCipherEncrypt: @@ -123,7 +123,7 @@ WebCryptoCipherStatus AES_Cipher( &out_len, params.additional_data.data(), params.additional_data.size())) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } char* data = MallocOpenSSL(buf_len); @@ -136,7 +136,7 @@ WebCryptoCipherStatus AES_Cipher( &out_len, in.data(), in.size())) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } total += out_len; @@ -144,7 +144,7 @@ WebCryptoCipherStatus AES_Cipher( ptr += out_len; out_len = EVP_CIPHER_CTX_block_size(ctx.get()); if (!EVP_CipherFinal_ex(ctx.get(), ptr, &out_len)) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } total += out_len; @@ -153,7 +153,7 @@ WebCryptoCipherStatus AES_Cipher( if (cipher_mode == kWebCryptoCipherEncrypt && mode == EVP_CIPH_GCM_MODE) { data += out_len; if (!EVP_CIPHER_CTX_ctrl(ctx.get(), EVP_CTRL_AEAD_GET_TAG, tag_len, ptr)) - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; total += tag_len; } @@ -161,7 +161,7 @@ WebCryptoCipherStatus AES_Cipher( buf.Resize(total); *out = std::move(buf); - return WebCryptoCipherStatus::ERR_OK; + return WebCryptoCipherStatus::OK; } // The AES_CTR implementation here takes it's inspiration from the chromium @@ -232,7 +232,7 @@ WebCryptoCipherStatus AES_CTR_Cipher2( counter, encrypt)) { // Cipher init failed - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } int out_len = 0; @@ -243,17 +243,17 @@ WebCryptoCipherStatus AES_CTR_Cipher2( &out_len, in.data(), in.size())) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } if (!EVP_CipherFinal_ex(ctx.get(), out + out_len, &final_len)) - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; out_len += final_len; if (static_cast(out_len) != in.size()) - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; - return WebCryptoCipherStatus::ERR_OK; + return WebCryptoCipherStatus::OK; } WebCryptoCipherStatus AES_CTR_Cipher( @@ -265,25 +265,25 @@ WebCryptoCipherStatus AES_CTR_Cipher( ByteSource* out) { BignumPointer num_counters(BN_new()); if (!BN_lshift(num_counters.get(), BN_value_one(), params.length)) - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; BignumPointer current_counter = GetCounter(params); BignumPointer num_output(BN_new()); if (!BN_set_word(num_output.get(), CeilDiv(in.size(), kAesBlockSize))) - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; // Just like in chromium's implementation, if the counter will // be incremented more than there are counter values, we fail. if (BN_cmp(num_output.get(), num_counters.get()) > 0) - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; BignumPointer remaining_until_reset(BN_new()); if (!BN_sub(remaining_until_reset.get(), num_counters.get(), current_counter.get())) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } // Output size is identical to the input size @@ -302,7 +302,7 @@ WebCryptoCipherStatus AES_CTR_Cipher( in, params.iv.data(), ptr); - if (status == WebCryptoCipherStatus::ERR_OK) + if (status == WebCryptoCipherStatus::OK) *out = std::move(buf); return status; } @@ -319,7 +319,7 @@ WebCryptoCipherStatus AES_CTR_Cipher( params.iv.data(), ptr); - if (status != WebCryptoCipherStatus::ERR_OK) + if (status != WebCryptoCipherStatus::OK) return status; // Wrap the counter around to zero @@ -336,7 +336,7 @@ WebCryptoCipherStatus AES_CTR_Cipher( new_counter_block.data(), ptr + input_size_part1); - if (status == WebCryptoCipherStatus::ERR_OK) + if (status == WebCryptoCipherStatus::OK) *out = std::move(buf); return status; diff --git a/src/crypto/crypto_cipher.h b/src/crypto/crypto_cipher.h index 725807d509525d..bae187a6e139a3 100644 --- a/src/crypto/crypto_cipher.h +++ b/src/crypto/crypto_cipher.h @@ -128,9 +128,9 @@ enum WebCryptoCipherMode { }; enum class WebCryptoCipherStatus { - ERR_OK, - ERR_INVALID_KEY_TYPE, - ERR_FAILED + OK, + INVALID_KEY_TYPE, + FAILED }; // CipherJob is a base implementation class for implementations of @@ -222,13 +222,13 @@ class CipherJob final : public CryptoJob { *CryptoJob::params(), in_, &out_)) { - case WebCryptoCipherStatus::ERR_OK: + case WebCryptoCipherStatus::OK: // Success! break; - case WebCryptoCipherStatus::ERR_INVALID_KEY_TYPE: + case WebCryptoCipherStatus::INVALID_KEY_TYPE: // Fall through // TODO(@jasnell): Separate error for this - case WebCryptoCipherStatus::ERR_FAILED: { + case WebCryptoCipherStatus::FAILED: { CryptoErrorVector* errors = CryptoJob::errors(); errors->Capture(); if (errors->empty()) diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index ada0340a974261..84894cab0b7111 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -499,7 +499,8 @@ MaybeLocal GetSerialNumber(Environment* env, X509* cert) { if (ASN1_INTEGER* serial_number = X509_get_serialNumber(cert)) { BignumPointer bn(ASN1_INTEGER_to_BN(serial_number, nullptr)); if (bn) { - OpenSSLBuffer buf(BN_bn2hex(bn.get())); + char* data = BN_bn2hex(bn.get()); + ByteSource buf = ByteSource::Allocated(data, strlen(data)); if (buf) return OneByteString(env->isolate(), buf.get()); } diff --git a/src/crypto/crypto_common.h b/src/crypto/crypto_common.h index e738eac07eb885..afee38b5992d23 100644 --- a/src/crypto/crypto_common.h +++ b/src/crypto/crypto_common.h @@ -13,11 +13,6 @@ namespace node { namespace crypto { -// OPENSSL_free is a macro, so we need a wrapper function. -struct OpenSSLBufferDeleter { - void operator()(char* pointer) const { OPENSSL_free(pointer); } -}; -using OpenSSLBuffer = std::unique_ptr; struct StackOfX509Deleter { void operator()(STACK_OF(X509)* p) const { sk_X509_pop_free(p, X509_free); } diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc index d0210079166fb4..612d21948495d4 100644 --- a/src/crypto/crypto_context.cc +++ b/src/crypto/crypto_context.cc @@ -56,7 +56,7 @@ BIOPointer LoadBIO(Environment* env, Local v) { HandleScope scope(env->isolate()); if (v->IsString()) { - const node::Utf8Value s(env->isolate(), v); + Utf8Value s(env->isolate(), v); return NodeBIO::NewFixed(*s, s.length()); } @@ -186,12 +186,15 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx, issuer); } -static X509_STORE* NewRootCertStore() { +} // namespace + +X509_STORE* NewRootCertStore() { static std::vector root_certs_vector; static Mutex root_certs_vector_mutex; Mutex::ScopedLock lock(root_certs_vector_mutex); - if (root_certs_vector.empty()) { + if (root_certs_vector.empty() && + per_process::cli_options->ssl_openssl_cert_store == false) { for (size_t i = 0; i < arraysize(root_certs); i++) { X509* x509 = PEM_read_bio_X509(NodeBIO::NewFixed(root_certs[i], @@ -209,7 +212,9 @@ static X509_STORE* NewRootCertStore() { X509_STORE* store = X509_STORE_new(); if (*system_cert_path != '\0') { + ERR_set_mark(); X509_STORE_load_locations(store, system_cert_path, nullptr); + ERR_pop_to_mark(); } Mutex::ScopedLock cli_lock(node::per_process::cli_options_mutex); @@ -224,7 +229,6 @@ static X509_STORE* NewRootCertStore() { return store; } -} // namespace void GetRootCertificates(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); @@ -361,7 +365,7 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { max_version = kMaxSupportedVersion; if (args[0]->IsString()) { - const node::Utf8Value sslmethod(env->isolate(), args[0]); + Utf8Value sslmethod(env->isolate(), args[0]); // Note that SSLv2 and SSLv3 are disallowed but SSLv23_method and friends // are still accepted. They are OpenSSL's way of saying that all known @@ -467,7 +471,8 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { if (RAND_bytes(sc->ticket_key_name_, sizeof(sc->ticket_key_name_)) <= 0 || RAND_bytes(sc->ticket_key_hmac_, sizeof(sc->ticket_key_hmac_)) <= 0 || RAND_bytes(sc->ticket_key_aes_, sizeof(sc->ticket_key_aes_)) <= 0) { - return env->ThrowError("Error generating ticket keys"); + return THROW_ERR_CRYPTO_OPERATION_FAILED( + env, "Error generating ticket keys"); } SSL_CTX_set_tlsext_ticket_key_cb(sc->ctx_.get(), TicketCompatibilityCallback); } @@ -498,45 +503,31 @@ void SecureContext::SetKey(const FunctionCallbackInfo& args) { SecureContext* sc; ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder()); - unsigned int len = args.Length(); - if (len < 1) { - return THROW_ERR_MISSING_ARGS(env, "Private key argument is mandatory"); - } - - if (len > 2) { - return env->ThrowError("Only private key and pass phrase are expected"); - } - - if (len == 2) { - if (args[1]->IsUndefined() || args[1]->IsNull()) - len = 1; - else - THROW_AND_RETURN_IF_NOT_STRING(env, args[1], "Pass phrase"); - } + CHECK_GE(args.Length(), 1); // Private key argument is mandatory BIOPointer bio(LoadBIO(env, args[0])); if (!bio) return; - node::Utf8Value passphrase(env->isolate(), args[1]); + ByteSource passphrase; + if (args[1]->IsString()) + passphrase = ByteSource::FromString(env, args[1].As()); + // This redirection is necessary because the PasswordCallback expects a + // pointer to a pointer to the passphrase ByteSource to allow passing in + // const ByteSources. + const ByteSource* pass_ptr = &passphrase; EVPKeyPointer key( PEM_read_bio_PrivateKey(bio.get(), nullptr, PasswordCallback, - *passphrase)); - - if (!key) { - unsigned long err = ERR_get_error(); // NOLINT(runtime/int) - return ThrowCryptoError(env, err, "PEM_read_bio_PrivateKey"); - } + &pass_ptr)); - int rv = SSL_CTX_use_PrivateKey(sc->ctx_.get(), key.get()); + if (!key) + return ThrowCryptoError(env, ERR_get_error(), "PEM_read_bio_PrivateKey"); - if (!rv) { - unsigned long err = ERR_get_error(); // NOLINT(runtime/int) - return ThrowCryptoError(env, err, "SSL_CTX_use_PrivateKey"); - } + if (!SSL_CTX_use_PrivateKey(sc->ctx_.get(), key.get())) + return ThrowCryptoError(env, ERR_get_error(), "SSL_CTX_use_PrivateKey"); } void SecureContext::SetSigalgs(const FunctionCallbackInfo& args) { @@ -548,13 +539,10 @@ void SecureContext::SetSigalgs(const FunctionCallbackInfo& args) { CHECK_EQ(args.Length(), 1); CHECK(args[0]->IsString()); - const node::Utf8Value sigalgs(env->isolate(), args[0]); - - int rv = SSL_CTX_set1_sigalgs_list(sc->ctx_.get(), *sigalgs); + const Utf8Value sigalgs(env->isolate(), args[0]); - if (rv == 0) { + if (!SSL_CTX_set1_sigalgs_list(sc->ctx_.get(), *sigalgs)) return ThrowCryptoError(env, ERR_get_error()); - } } #ifndef OPENSSL_NO_ENGINE @@ -567,7 +555,7 @@ void SecureContext::SetEngineKey(const FunctionCallbackInfo& args) { CHECK_EQ(args.Length(), 2); CryptoErrorVector errors; - const Utf8Value engine_id(env->isolate(), args[1]); + Utf8Value engine_id(env->isolate(), args[1]); EnginePointer engine = LoadEngineById(*engine_id, &errors); if (!engine) { Local exception; @@ -577,24 +565,21 @@ void SecureContext::SetEngineKey(const FunctionCallbackInfo& args) { } if (!ENGINE_init(engine.get())) { - return env->ThrowError("ENGINE_init"); + return THROW_ERR_CRYPTO_OPERATION_FAILED( + env, "Failure to initialize engine"); } engine.finish_on_exit = true; - const Utf8Value key_name(env->isolate(), args[0]); + Utf8Value key_name(env->isolate(), args[0]); EVPKeyPointer key(ENGINE_load_private_key(engine.get(), *key_name, nullptr, nullptr)); - if (!key) { + if (!key) return ThrowCryptoError(env, ERR_get_error(), "ENGINE_load_private_key"); - } - - int rv = SSL_CTX_use_PrivateKey(sc->ctx_.get(), key.get()); - if (rv == 0) { + if (!SSL_CTX_use_PrivateKey(sc->ctx_.get(), key.get())) return ThrowCryptoError(env, ERR_get_error(), "SSL_CTX_use_PrivateKey"); - } sc->private_key_engine_ = std::move(engine); } @@ -606,9 +591,7 @@ void SecureContext::SetCert(const FunctionCallbackInfo& args) { SecureContext* sc; ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder()); - if (args.Length() != 1) { - return THROW_ERR_MISSING_ARGS(env, "Certificate argument is mandatory"); - } + CHECK_GE(args.Length(), 1); // Certificate argument is mandator BIOPointer bio(LoadBIO(env, args[0])); if (!bio) @@ -617,14 +600,15 @@ void SecureContext::SetCert(const FunctionCallbackInfo& args) { sc->cert_.reset(); sc->issuer_.reset(); - int rv = SSL_CTX_use_certificate_chain(sc->ctx_.get(), - std::move(bio), - &sc->cert_, - &sc->issuer_); - - if (!rv) { - unsigned long err = ERR_get_error(); // NOLINT(runtime/int) - return ThrowCryptoError(env, err, "SSL_CTX_use_certificate_chain"); + if (!SSL_CTX_use_certificate_chain( + sc->ctx_.get(), + std::move(bio), + &sc->cert_, + &sc->issuer_)) { + return ThrowCryptoError( + env, + ERR_get_error(), + "SSL_CTX_use_certificate_chain"); } } @@ -635,9 +619,7 @@ void SecureContext::AddCACert(const FunctionCallbackInfo& args) { ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder()); ClearErrorOnReturn clear_error_on_return; - if (args.Length() != 1) { - return THROW_ERR_MISSING_ARGS(env, "CA certificate argument is mandatory"); - } + CHECK_GE(args.Length(), 1); // CA certificate argument is mandatory BIOPointer bio(LoadBIO(env, args[0])); if (!bio) @@ -662,9 +644,7 @@ void SecureContext::AddCRL(const FunctionCallbackInfo& args) { SecureContext* sc; ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder()); - if (args.Length() != 1) { - return THROW_ERR_MISSING_ARGS(env, "CRL argument is mandatory"); - } + CHECK_GE(args.Length(), 1); // CRL argument is mandatory ClearErrorOnReturn clear_error_on_return; @@ -676,7 +656,7 @@ void SecureContext::AddCRL(const FunctionCallbackInfo& args) { PEM_read_bio_X509_CRL(bio.get(), nullptr, NoPasswordCallback, nullptr)); if (!crl) - return env->ThrowError("Failed to parse CRL"); + return THROW_ERR_CRYPTO_OPERATION_FAILED(env, "Failed to parse CRL"); X509_STORE* cert_store = SSL_CTX_get_cert_store(sc->ctx_.get()); if (cert_store == root_cert_store) { @@ -689,59 +669,6 @@ void SecureContext::AddCRL(const FunctionCallbackInfo& args) { X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL); } -static unsigned long AddCertsFromFile( // NOLINT(runtime/int) - X509_STORE* store, - const char* file) { - ERR_clear_error(); - MarkPopErrorOnReturn mark_pop_error_on_return; - - BIOPointer bio(BIO_new_file(file, "r")); - if (!bio) - return ERR_get_error(); - - while (X509* x509 = - PEM_read_bio_X509(bio.get(), nullptr, NoPasswordCallback, nullptr)) { - X509_STORE_add_cert(store, x509); - X509_free(x509); - } - - unsigned long err = ERR_peek_error(); // NOLINT(runtime/int) - // Ignore error if its EOF/no start line found. - if (ERR_GET_LIB(err) == ERR_LIB_PEM && - ERR_GET_REASON(err) == PEM_R_NO_START_LINE) { - return 0; - } - - return err; -} - -void UseExtraCaCerts(const std::string& file) { - ClearErrorOnReturn clear_error_on_return; - - if (root_cert_store == nullptr) { - root_cert_store = NewRootCertStore(); - - if (!file.empty()) { - unsigned long err = AddCertsFromFile( // NOLINT(runtime/int) - root_cert_store, - file.c_str()); - if (err) { - fprintf(stderr, - "Warning: Ignoring extra certs from `%s`, load failed: %s\n", - file.c_str(), - ERR_error_string(err, nullptr)); - } else { - extra_root_certs_loaded = true; - } - } - } -} - -void IsExtraRootCertsFileLoaded( - const FunctionCallbackInfo& args) { - return args.GetReturnValue().Set(extra_root_certs_loaded); -} - void SecureContext::AddRootCerts(const FunctionCallbackInfo& args) { SecureContext* sc; ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder()); @@ -767,11 +694,9 @@ void SecureContext::SetCipherSuites(const FunctionCallbackInfo& args) { CHECK_EQ(args.Length(), 1); CHECK(args[0]->IsString()); - const node::Utf8Value ciphers(args.GetIsolate(), args[0]); - if (!SSL_CTX_set_ciphersuites(sc->ctx_.get(), *ciphers)) { - unsigned long err = ERR_get_error(); // NOLINT(runtime/int) - return ThrowCryptoError(env, err, "Failed to set ciphers"); - } + const Utf8Value ciphers(env->isolate(), args[0]); + if (!SSL_CTX_set_ciphersuites(sc->ctx_.get(), *ciphers)) + return ThrowCryptoError(env, ERR_get_error(), "Failed to set ciphers"); #endif } @@ -784,7 +709,7 @@ void SecureContext::SetCiphers(const FunctionCallbackInfo& args) { CHECK_EQ(args.Length(), 1); CHECK(args[0]->IsString()); - const node::Utf8Value ciphers(args.GetIsolate(), args[0]); + Utf8Value ciphers(env->isolate(), args[0]); if (!SSL_CTX_set_cipher_list(sc->ctx_.get(), *ciphers)) { unsigned long err = ERR_get_error(); // NOLINT(runtime/int) @@ -804,18 +729,15 @@ void SecureContext::SetECDHCurve(const FunctionCallbackInfo& args) { ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder()); Environment* env = sc->env(); - if (args.Length() != 1) - return THROW_ERR_MISSING_ARGS(env, "ECDH curve name argument is mandatory"); - - THROW_AND_RETURN_IF_NOT_STRING(env, args[0], "ECDH curve name"); - - node::Utf8Value curve(env->isolate(), args[0]); + CHECK_GE(args.Length(), 1); // ECDH curve name argument is mandatory + CHECK(args[0]->IsString()); - if (strcmp(*curve, "auto") == 0) - return; + Utf8Value curve(env->isolate(), args[0]); - if (!SSL_CTX_set1_curves_list(sc->ctx_.get(), *curve)) - return env->ThrowError("Failed to set ECDH curve"); + if (strcmp(*curve, "auto") != 0 && + !SSL_CTX_set1_curves_list(sc->ctx_.get(), *curve)) { + return THROW_ERR_CRYPTO_OPERATION_FAILED(env, "Failed to set ECDH curve"); + } } void SecureContext::SetDHParam(const FunctionCallbackInfo& args) { @@ -824,10 +746,7 @@ void SecureContext::SetDHParam(const FunctionCallbackInfo& args) { Environment* env = sc->env(); ClearErrorOnReturn clear_error_on_return; - // Auto DH is not supported in openssl 1.0.1, so dhparam needs - // to be specified explicitly - if (args.Length() != 1) - return THROW_ERR_MISSING_ARGS(env, "DH argument is mandatory"); + CHECK_GE(args.Length(), 1); // DH argument is mandatory DHPointer dh; { @@ -854,10 +773,11 @@ void SecureContext::SetDHParam(const FunctionCallbackInfo& args) { } SSL_CTX_set_options(sc->ctx_.get(), SSL_OP_SINGLE_DH_USE); - int r = SSL_CTX_set_tmp_dh(sc->ctx_.get(), dh.get()); - if (!r) - return env->ThrowTypeError("Error setting temp DH parameter"); + if (!SSL_CTX_set_tmp_dh(sc->ctx_.get(), dh.get())) { + return THROW_ERR_CRYPTO_OPERATION_FAILED( + env, "Error setting temp DH parameter"); + } } void SecureContext::SetMinProto(const FunctionCallbackInfo& args) { @@ -907,15 +827,14 @@ void SecureContext::GetMaxProto(const FunctionCallbackInfo& args) { } void SecureContext::SetOptions(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); SecureContext* sc; ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder()); - int64_t val; - if (args.Length() != 1 || - !args[0]->IntegerValue(args.GetIsolate()->GetCurrentContext()).To(&val)) { - return THROW_ERR_INVALID_ARG_TYPE( - sc->env(), "Options must be an integer value"); - } + CHECK_GE(args.Length(), 1); + CHECK(args[0]->IsNumber()); + + int64_t val = args[0]->IntegerValue(env->context()).FromMaybe(0); SSL_CTX_set_options(sc->ctx_.get(), static_cast(val)); // NOLINT(runtime/int) @@ -927,20 +846,15 @@ void SecureContext::SetSessionIdContext( ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder()); Environment* env = sc->env(); - if (args.Length() != 1) { - return THROW_ERR_MISSING_ARGS( - env, "Session ID context argument is mandatory"); - } - - THROW_AND_RETURN_IF_NOT_STRING(env, args[0], "Session ID context"); + CHECK_GE(args.Length(), 1); + CHECK(args[0]->IsString()); - const node::Utf8Value sessionIdContext(args.GetIsolate(), args[0]); + const Utf8Value sessionIdContext(env->isolate(), args[0]); const unsigned char* sid_ctx = reinterpret_cast(*sessionIdContext); unsigned int sid_ctx_len = sessionIdContext.length(); - int r = SSL_CTX_set_session_id_context(sc->ctx_.get(), sid_ctx, sid_ctx_len); - if (r == 1) + if (SSL_CTX_set_session_id_context(sc->ctx_.get(), sid_ctx, sid_ctx_len) == 1) return; BUF_MEM* mem; @@ -948,25 +862,23 @@ void SecureContext::SetSessionIdContext( BIOPointer bio(BIO_new(BIO_s_mem())); if (!bio) { - message = FIXED_ONE_BYTE_STRING(args.GetIsolate(), + message = FIXED_ONE_BYTE_STRING(env->isolate(), "SSL_CTX_set_session_id_context error"); } else { ERR_print_errors(bio.get()); BIO_get_mem_ptr(bio.get(), &mem); - message = OneByteString(args.GetIsolate(), mem->data, mem->length); + message = OneByteString(env->isolate(), mem->data, mem->length); } - args.GetIsolate()->ThrowException(Exception::TypeError(message)); + env->isolate()->ThrowException(Exception::TypeError(message)); } void SecureContext::SetSessionTimeout(const FunctionCallbackInfo& args) { SecureContext* sc; ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder()); - if (args.Length() != 1 || !args[0]->IsInt32()) { - return THROW_ERR_INVALID_ARG_TYPE( - sc->env(), "Session timeout must be a 32-bit integer"); - } + CHECK_GE(args.Length(), 1); + CHECK(args[0]->IsInt32()); int32_t sessionTimeout = args[0].As()->Value(); SSL_CTX_set_timeout(sc->ctx_.get(), sessionTimeout); @@ -994,8 +906,10 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo& args) { } BIOPointer in(LoadBIO(env, args[0])); - if (!in) - return env->ThrowError("Unable to load BIO"); + if (!in) { + return THROW_ERR_CRYPTO_OPERATION_FAILED( + env, "Unable to load PFX certificate"); + } if (args.Length() >= 2) { THROW_AND_RETURN_IF_NOT_BUFFER(env, args[1], "Pass phrase"); @@ -1050,6 +964,7 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo& args) { } if (!ret) { + // TODO(@jasnell): Should this use ThrowCryptoError? unsigned long err = ERR_get_error(); // NOLINT(runtime/int) const char* str = ERR_reason_error_string(err); return env->ThrowError(str); @@ -1073,13 +988,10 @@ void SecureContext::SetClientCertEngine( // internal context variable. // Instead of trying to fix up this problem we in turn also do not // support multiple calls to SetClientCertEngine. - if (sc->client_cert_engine_provided_) { - return env->ThrowError( - "Multiple calls to SetClientCertEngine are not allowed"); - } + CHECK(!sc->client_cert_engine_provided_); CryptoErrorVector errors; - const node::Utf8Value engine_id(env->isolate(), args[0]); + const Utf8Value engine_id(env->isolate(), args[0]); EnginePointer engine = LoadEngineById(*engine_id, &errors); if (!engine) { Local exception; @@ -1089,8 +1001,7 @@ void SecureContext::SetClientCertEngine( } // Note that this takes another reference to `engine`. - int r = SSL_CTX_set_client_cert_engine(sc->ctx_.get(), engine.get()); - if (r == 0) + if (!SSL_CTX_set_client_cert_engine(sc->ctx_.get(), engine.get())) return ThrowCryptoError(env, ERR_get_error()); sc->client_cert_engine_provided_ = true; } @@ -1118,20 +1029,12 @@ void SecureContext::SetTicketKeys(const FunctionCallbackInfo& args) { #if !defined(OPENSSL_NO_TLSEXT) && defined(SSL_CTX_get_tlsext_ticket_keys) SecureContext* wrap; ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder()); - Environment* env = wrap->env(); - // TODO(@sam-github) Move type and len check to js, and CHECK() in C++. - if (args.Length() < 1) { - return THROW_ERR_MISSING_ARGS(env, "Ticket keys argument is mandatory"); - } - - THROW_AND_RETURN_IF_NOT_BUFFER(env, args[0], "Ticket keys"); + CHECK_GE(args.Length(), 1); // Ticket keys argument is mandatory + CHECK(args[0]->IsArrayBufferView()); ArrayBufferViewContents buf(args[0].As()); - if (buf.length() != 48) { - return THROW_ERR_INVALID_ARG_VALUE( - env, "Ticket keys length must be 48 bytes"); - } + CHECK_EQ(buf.length(), 48); memcpy(wrap->ticket_key_name_, buf.data(), 16); memcpy(wrap->ticket_key_hmac_, buf.data() + 16, 16); @@ -1322,5 +1225,62 @@ void SecureContext::GetCertificate(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(buff); } +namespace { +unsigned long AddCertsFromFile( // NOLINT(runtime/int) + X509_STORE* store, + const char* file) { + ERR_clear_error(); + MarkPopErrorOnReturn mark_pop_error_on_return; + + BIOPointer bio(BIO_new_file(file, "r")); + if (!bio) + return ERR_get_error(); + + while (X509* x509 = + PEM_read_bio_X509(bio.get(), nullptr, NoPasswordCallback, nullptr)) { + X509_STORE_add_cert(store, x509); + X509_free(x509); + } + + unsigned long err = ERR_peek_error(); // NOLINT(runtime/int) + // Ignore error if its EOF/no start line found. + if (ERR_GET_LIB(err) == ERR_LIB_PEM && + ERR_GET_REASON(err) == PEM_R_NO_START_LINE) { + return 0; + } + + return err; +} +} // namespace + +// UseExtraCaCerts is called only once at the start of the Node.js process. +void UseExtraCaCerts(const std::string& file) { + ClearErrorOnReturn clear_error_on_return; + + if (root_cert_store == nullptr) { + root_cert_store = NewRootCertStore(); + + if (!file.empty()) { + unsigned long err = AddCertsFromFile( // NOLINT(runtime/int) + root_cert_store, + file.c_str()); + if (err) { + fprintf(stderr, + "Warning: Ignoring extra certs from `%s`, load failed: %s\n", + file.c_str(), + ERR_error_string(err, nullptr)); + } else { + extra_root_certs_loaded = true; + } + } + } +} + +// Exposed to JavaScript strictly for testing purposes. +void IsExtraRootCertsFileLoaded( + const FunctionCallbackInfo& args) { + return args.GetReturnValue().Set(extra_root_certs_loaded); +} + } // namespace crypto } // namespace node diff --git a/src/crypto/crypto_context.h b/src/crypto/crypto_context.h index e36a76c5a8812a..5a2126c2ea3b1f 100644 --- a/src/crypto/crypto_context.h +++ b/src/crypto/crypto_context.h @@ -21,6 +21,8 @@ void GetRootCertificates( void IsExtraRootCertsFileLoaded( const v8::FunctionCallbackInfo& args); +X509_STORE* NewRootCertStore(); + class SecureContext final : public BaseObject { public: using GetSessionCb = SSL_SESSION* (*)(SSL*, const unsigned char*, int, int*); diff --git a/src/crypto/crypto_dh.cc b/src/crypto/crypto_dh.cc index 8a968200687dfb..a2720301cab356 100644 --- a/src/crypto/crypto_dh.cc +++ b/src/crypto/crypto_dh.cc @@ -524,11 +524,11 @@ WebCryptoKeyExportStatus DHKeyExportTraits::DoExport( switch (format) { case kWebCryptoKeyFormatPKCS8: if (key_data->GetKeyType() != kKeyTypePrivate) - return WebCryptoKeyExportStatus::ERR_INVALID_KEY_TYPE; + return WebCryptoKeyExportStatus::INVALID_KEY_TYPE; return PKEY_PKCS8_Export(key_data.get(), out); case kWebCryptoKeyFormatSPKI: if (key_data->GetKeyType() != kKeyTypePublic) - return WebCryptoKeyExportStatus::ERR_INVALID_KEY_TYPE; + return WebCryptoKeyExportStatus::INVALID_KEY_TYPE; return PKEY_SPKI_Export(key_data.get(), out); default: UNREACHABLE(); diff --git a/src/crypto/crypto_dsa.cc b/src/crypto/crypto_dsa.cc index 1dc0a86fb4b10c..8a80904d9c1afb 100644 --- a/src/crypto/crypto_dsa.cc +++ b/src/crypto/crypto_dsa.cc @@ -113,14 +113,14 @@ WebCryptoKeyExportStatus DSAKeyExportTraits::DoExport( switch (format) { case kWebCryptoKeyFormatRaw: // Not supported for RSA keys of either type - return WebCryptoKeyExportStatus::ERR_FAILED; + return WebCryptoKeyExportStatus::FAILED; case kWebCryptoKeyFormatPKCS8: if (key_data->GetKeyType() != kKeyTypePrivate) - return WebCryptoKeyExportStatus::ERR_INVALID_KEY_TYPE; + return WebCryptoKeyExportStatus::INVALID_KEY_TYPE; return PKEY_PKCS8_Export(key_data.get(), out); case kWebCryptoKeyFormatSPKI: if (key_data->GetKeyType() != kKeyTypePublic) - return WebCryptoKeyExportStatus::ERR_INVALID_KEY_TYPE; + return WebCryptoKeyExportStatus::INVALID_KEY_TYPE; return PKEY_SPKI_Export(key_data.get(), out); default: UNREACHABLE(); @@ -192,7 +192,7 @@ std::shared_ptr ImportJWKDsaKey( !q_value->IsString() || !q_value->IsString() || (!x_value->IsUndefined() && !x_value->IsString())) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK DSA key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK DSA key"); return std::shared_ptr(); } @@ -210,14 +210,14 @@ std::shared_ptr ImportJWKDsaKey( p.ToBN().release(), q.ToBN().release(), g.ToBN().release())) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK DSA key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK DSA key"); return std::shared_ptr(); } if (type == kKeyTypePrivate) { ByteSource x = ByteSource::FromEncodedString(env, x_value.As()); if (!DSA_set0_key(dsa.get(), nullptr, x.ToBN().release())) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK DSA key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK DSA key"); return std::shared_ptr(); } } diff --git a/src/crypto/crypto_ecdh.cc b/src/crypto/crypto_ecdh.cc index 9da31b0b5778c0..277a5a731d37ae 100644 --- a/src/crypto/crypto_ecdh.cc +++ b/src/crypto/crypto_ecdh.cc @@ -549,18 +549,18 @@ WebCryptoKeyExportStatus EC_Raw_Export( // Get the allocated data size... size_t len = EC_POINT_point2oct(group, point, form, nullptr, 0, nullptr); if (len == 0) - return WebCryptoKeyExportStatus::ERR_FAILED; + return WebCryptoKeyExportStatus::FAILED; unsigned char* data = MallocOpenSSL(len); size_t check_len = EC_POINT_point2oct(group, point, form, data, len, nullptr); if (check_len == 0) - return WebCryptoKeyExportStatus::ERR_FAILED; + return WebCryptoKeyExportStatus::FAILED; CHECK_EQ(len, check_len); *out = ByteSource::Allocated(reinterpret_cast(data), len); - return WebCryptoKeyExportStatus::ERR_OK; + return WebCryptoKeyExportStatus::OK; } } // namespace @@ -581,15 +581,15 @@ WebCryptoKeyExportStatus ECKeyExportTraits::DoExport( switch (format) { case kWebCryptoKeyFormatRaw: if (key_data->GetKeyType() != kKeyTypePublic) - return WebCryptoKeyExportStatus::ERR_INVALID_KEY_TYPE; + return WebCryptoKeyExportStatus::INVALID_KEY_TYPE; return EC_Raw_Export(key_data.get(), params, out); case kWebCryptoKeyFormatPKCS8: if (key_data->GetKeyType() != kKeyTypePrivate) - return WebCryptoKeyExportStatus::ERR_INVALID_KEY_TYPE; + return WebCryptoKeyExportStatus::INVALID_KEY_TYPE; return PKEY_PKCS8_Export(key_data.get(), out); case kWebCryptoKeyFormatSPKI: if (key_data->GetKeyType() != kKeyTypePublic) - return WebCryptoKeyExportStatus::ERR_INVALID_KEY_TYPE; + return WebCryptoKeyExportStatus::INVALID_KEY_TYPE; return PKEY_SPKI_Export(key_data.get(), out); default: UNREACHABLE(); @@ -680,7 +680,7 @@ std::shared_ptr ImportJWKEcKey( if (!x_value->IsString() || !y_value->IsString() || (!d_value->IsUndefined() && !d_value->IsString())) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK EC key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK EC key"); return std::shared_ptr(); } @@ -688,7 +688,7 @@ std::shared_ptr ImportJWKEcKey( ECKeyPointer ec(EC_KEY_new_by_curve_name(nid)); if (!ec) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK EC key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK EC key"); return std::shared_ptr(); } @@ -699,14 +699,14 @@ std::shared_ptr ImportJWKEcKey( ec.get(), x.ToBN().get(), y.ToBN().get())) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK EC key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK EC key"); return std::shared_ptr(); } if (type == kKeyTypePrivate) { ByteSource d = ByteSource::FromEncodedString(env, d_value.As()); if (!EC_KEY_set_private_key(ec.get(), d.ToBN().get())) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK EC key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK EC key"); return std::shared_ptr(); } } diff --git a/src/crypto/crypto_keygen.cc b/src/crypto/crypto_keygen.cc index c6ce46584f4104..b37cd87da944dd 100644 --- a/src/crypto/crypto_keygen.cc +++ b/src/crypto/crypto_keygen.cc @@ -2,6 +2,7 @@ #include "allocated_buffer-inl.h" #include "async_wrap-inl.h" #include "base_object-inl.h" +#include "debug_utils-inl.h" #include "env-inl.h" #include "memory_tracker-inl.h" #include "threadpoolwork-inl.h" @@ -67,11 +68,11 @@ Maybe SecretKeyGenTraits::AdditionalConfig( CHECK(args[*offset]->IsUint32()); params->length = std::trunc(args[*offset].As()->Value() / CHAR_BIT); if (params->length > INT_MAX) { - char msg[1024]; - snprintf(msg, sizeof(msg), - "length must be less than or equal to %lu bits", - static_cast(INT_MAX) * CHAR_BIT); - THROW_ERR_OUT_OF_RANGE(env, msg); + const std::string msg{ + SPrintF("length must be less than or equal to %s bits", + static_cast(INT_MAX) * CHAR_BIT) + }; + THROW_ERR_OUT_OF_RANGE(env, msg.c_str()); return Nothing(); } *offset += 1; @@ -84,7 +85,7 @@ KeyGenJobStatus SecretKeyGenTraits::DoKeyGen( CHECK_LE(params->length, INT_MAX); params->out = MallocOpenSSL(params->length); EntropySource(reinterpret_cast(params->out), params->length); - return KeyGenJobStatus::ERR_OK; + return KeyGenJobStatus::OK; } Maybe SecretKeyGenTraits::EncodeKey( diff --git a/src/crypto/crypto_keygen.h b/src/crypto/crypto_keygen.h index fde680baec1f88..c4197c6eaed8f9 100644 --- a/src/crypto/crypto_keygen.h +++ b/src/crypto/crypto_keygen.h @@ -19,8 +19,8 @@ void Initialize(Environment* env, v8::Local target); } // namespace Keygen enum class KeyGenJobStatus { - ERR_OK, - ERR_FAILED + OK, + FAILED }; // A Base CryptoJob for generating secret keys or key pairs. @@ -77,11 +77,11 @@ class KeyGenJob final : public CryptoJob { AdditionalParams* params = CryptoJob::params(); switch (KeyGenTraits::DoKeyGen(AsyncWrap::env(), params)) { - case KeyGenJobStatus::ERR_OK: - status_ = KeyGenJobStatus::ERR_OK; + case KeyGenJobStatus::OK: + status_ = KeyGenJobStatus::OK; // Success! break; - case KeyGenJobStatus::ERR_FAILED: { + case KeyGenJobStatus::FAILED: { CryptoErrorVector* errors = CryptoJob::errors(); errors->Capture(); if (errors->empty()) @@ -96,7 +96,7 @@ class KeyGenJob final : public CryptoJob { Environment* env = AsyncWrap::env(); CryptoErrorVector* errors = CryptoJob::errors(); AdditionalParams* params = CryptoJob::params(); - if (status_ == KeyGenJobStatus::ERR_OK && + if (status_ == KeyGenJobStatus::OK && LIKELY(!KeyGenTraits::EncodeKey(env, params, result).IsNothing())) { *err = Undefined(env->isolate()); return v8::Just(true); @@ -112,7 +112,7 @@ class KeyGenJob final : public CryptoJob { SET_SELF_SIZE(KeyGenJob); private: - KeyGenJobStatus status_ = KeyGenJobStatus::ERR_FAILED; + KeyGenJobStatus status_ = KeyGenJobStatus::FAILED; }; // A Base KeyGenTraits for Key Pair generation algorithms. @@ -162,15 +162,15 @@ struct KeyPairGenTraits final { AdditionalParameters* params) { EVPKeyCtxPointer ctx = KeyPairAlgorithmTraits::Setup(params); if (!ctx || EVP_PKEY_keygen_init(ctx.get()) <= 0) - return KeyGenJobStatus::ERR_FAILED; + return KeyGenJobStatus::FAILED; // Generate the key EVP_PKEY* pkey = nullptr; if (!EVP_PKEY_keygen(ctx.get(), &pkey)) - return KeyGenJobStatus::ERR_FAILED; + return KeyGenJobStatus::FAILED; params->key = ManagedEVPPKey(EVPKeyPointer(pkey)); - return KeyGenJobStatus::ERR_OK; + return KeyGenJobStatus::OK; } static v8::Maybe EncodeKey( @@ -251,8 +251,10 @@ struct KeyPairGenConfig final : public MemoryRetainer { void MemoryInfo(MemoryTracker* tracker) const override { tracker->TrackField("key", key); - tracker->TrackFieldWithSize("private_key_encoding.passphrase", - private_key_encoding.passphrase_.size()); + if (!private_key_encoding.passphrase_.IsEmpty()) { + tracker->TrackFieldWithSize("private_key_encoding.passphrase", + private_key_encoding.passphrase_->size()); + } tracker->TrackField("params", params); } diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc index f5538e54d7e11b..f80a39ce5de575 100644 --- a/src/crypto/crypto_keys.cc +++ b/src/crypto/crypto_keys.cc @@ -210,8 +210,7 @@ ParseKeyResult ParsePrivateKey(EVPKeyPointer* pkey, const PrivateKeyEncodingConfig& config, const char* key, size_t key_len) { - // OpenSSL needs a non-const pointer, that's why the const_cast is required. - char* const passphrase = const_cast(config.passphrase_.get()); + const ByteSource* passphrase = config.passphrase_.get(); if (config.format_ == kKeyFormatPEM) { BIOPointer bio(BIO_new_mem_buf(key, key_len)); @@ -221,7 +220,7 @@ ParseKeyResult ParsePrivateKey(EVPKeyPointer* pkey, pkey->reset(PEM_read_bio_PrivateKey(bio.get(), nullptr, PasswordCallback, - passphrase)); + &passphrase)); } else { CHECK_EQ(config.format_, kKeyFormatDER); @@ -238,7 +237,7 @@ ParseKeyResult ParsePrivateKey(EVPKeyPointer* pkey, pkey->reset(d2i_PKCS8PrivateKey_bio(bio.get(), nullptr, PasswordCallback, - passphrase)); + &passphrase)); } else { PKCS8Pointer p8inf(d2i_PKCS8_PRIV_KEY_INFO_bio(bio.get(), nullptr)); if (p8inf) @@ -260,7 +259,7 @@ ParseKeyResult ParsePrivateKey(EVPKeyPointer* pkey, return ParseKeyResult::kParseKeyOk; if (ERR_GET_LIB(err) == ERR_LIB_PEM && ERR_GET_REASON(err) == PEM_R_BAD_PASSWORD_READ) { - if (config.passphrase_.get() == nullptr) + if (config.passphrase_.IsEmpty()) return ParseKeyResult::kParseKeyNeedPassphrase; } return ParseKeyResult::kParseKeyFailed; @@ -293,6 +292,28 @@ MaybeLocal WritePrivateKey( BIOPointer bio(BIO_new(BIO_s_mem())); CHECK(bio); + // If an empty string was passed as the passphrase, the ByteSource might + // contain a null pointer, which OpenSSL will ignore, causing it to invoke its + // default passphrase callback, which would block the thread until the user + // manually enters a passphrase. We could supply our own passphrase callback + // to handle this special case, but it is easier to avoid passing a null + // pointer to OpenSSL. + char* pass = nullptr; + size_t pass_len = 0; + if (!config.passphrase_.IsEmpty()) { + pass = const_cast(config.passphrase_->get()); + pass_len = config.passphrase_->size(); + if (pass == nullptr) { + // OpenSSL will not actually dereference this pointer, so it can be any + // non-null pointer. We cannot assert that directly, which is why we + // intentionally use a pointer that will likely cause a segmentation fault + // when dereferenced. + CHECK_EQ(pass_len, 0); + pass = reinterpret_cast(-1); + CHECK_NE(pass, nullptr); + } + } + bool err; PKEncodingType encoding_type = config.type_.ToChecked(); @@ -303,12 +324,11 @@ MaybeLocal WritePrivateKey( RSAPointer rsa(EVP_PKEY_get1_RSA(pkey)); if (config.format_ == kKeyFormatPEM) { // Encode PKCS#1 as PEM. - const char* pass = config.passphrase_.get(); err = PEM_write_bio_RSAPrivateKey( bio.get(), rsa.get(), config.cipher_, - reinterpret_cast(const_cast(pass)), - config.passphrase_.size(), + reinterpret_cast(pass), + pass_len, nullptr, nullptr) != 1; } else { // Encode PKCS#1 as DER. This does not permit encryption. @@ -322,8 +342,8 @@ MaybeLocal WritePrivateKey( err = PEM_write_bio_PKCS8PrivateKey( bio.get(), pkey, config.cipher_, - const_cast(config.passphrase_.get()), - config.passphrase_.size(), + pass, + pass_len, nullptr, nullptr) != 1; } else { // Encode PKCS#8 as DER. @@ -331,8 +351,8 @@ MaybeLocal WritePrivateKey( err = i2d_PKCS8PrivateKey_bio( bio.get(), pkey, config.cipher_, - const_cast(config.passphrase_.get()), - config.passphrase_.size(), + pass, + pass_len, nullptr, nullptr) != 1; } } else { @@ -344,12 +364,11 @@ MaybeLocal WritePrivateKey( ECKeyPointer ec_key(EVP_PKEY_get1_EC_KEY(pkey)); if (config.format_ == kKeyFormatPEM) { // Encode SEC1 as PEM. - const char* pass = config.passphrase_.get(); err = PEM_write_bio_ECPrivateKey( bio.get(), ec_key.get(), config.cipher_, - reinterpret_cast(const_cast(pass)), - config.passphrase_.size(), + reinterpret_cast(pass), + pass_len, nullptr, nullptr) != 1; } else { // Encode SEC1 as DER. This does not permit encryption. @@ -640,7 +659,8 @@ ManagedEVPPKey::GetPrivateKeyEncodingFromJs( THROW_ERR_OUT_OF_RANGE(env, "passphrase is too big"); return NonCopyableMaybe(); } - result.passphrase_ = passphrase.ToNullTerminatedCopy(); + result.passphrase_ = NonCopyableMaybe( + passphrase.ToNullTerminatedCopy()); } else { CHECK(args[*offset]->IsNullOrUndefined() && !needs_passphrase); } @@ -1261,10 +1281,10 @@ WebCryptoKeyExportStatus PKEY_SPKI_Export( CHECK_EQ(key_data->GetKeyType(), kKeyTypePublic); BIOPointer bio(BIO_new(BIO_s_mem())); if (!i2d_PUBKEY_bio(bio.get(), key_data->GetAsymmetricKey().get())) - return WebCryptoKeyExportStatus::ERR_FAILED; + return WebCryptoKeyExportStatus::FAILED; *out = ByteSource::FromBIO(bio); - return WebCryptoKeyExportStatus::ERR_OK; + return WebCryptoKeyExportStatus::OK; } WebCryptoKeyExportStatus PKEY_PKCS8_Export( @@ -1274,10 +1294,10 @@ WebCryptoKeyExportStatus PKEY_PKCS8_Export( BIOPointer bio(BIO_new(BIO_s_mem())); PKCS8Pointer p8inf(EVP_PKEY2PKCS8(key_data->GetAsymmetricKey().get())); if (!i2d_PKCS8_PRIV_KEY_INFO_bio(bio.get(), p8inf.get())) - return WebCryptoKeyExportStatus::ERR_FAILED; + return WebCryptoKeyExportStatus::FAILED; *out = ByteSource::FromBIO(bio); - return WebCryptoKeyExportStatus::ERR_OK; + return WebCryptoKeyExportStatus::OK; } namespace Keys { diff --git a/src/crypto/crypto_keys.h b/src/crypto/crypto_keys.h index 1799ec01ed793e..8938a203eb1d08 100644 --- a/src/crypto/crypto_keys.h +++ b/src/crypto/crypto_keys.h @@ -63,7 +63,10 @@ using PublicKeyEncodingConfig = AsymmetricKeyEncodingConfig; struct PrivateKeyEncodingConfig : public AsymmetricKeyEncodingConfig { const EVP_CIPHER* cipher_; - ByteSource passphrase_; + // The ByteSource alone is not enough to distinguish between "no passphrase" + // and a zero-length passphrase (which can be a null pointer), therefore, we + // use a NonCopyableMaybe. + NonCopyableMaybe passphrase_; }; // This uses the built-in reference counter of OpenSSL to manage an EVP_PKEY @@ -262,9 +265,9 @@ enum WebCryptoKeyFormat { }; enum class WebCryptoKeyExportStatus { - ERR_OK, - ERR_INVALID_KEY_TYPE, - ERR_FAILED + OK, + INVALID_KEY_TYPE, + FAILED }; template @@ -336,13 +339,13 @@ class KeyExportJob final : public CryptoJob { format_, *CryptoJob::params(), &out_)) { - case WebCryptoKeyExportStatus::ERR_OK: + case WebCryptoKeyExportStatus::OK: // Success! break; - case WebCryptoKeyExportStatus::ERR_INVALID_KEY_TYPE: + case WebCryptoKeyExportStatus::INVALID_KEY_TYPE: // Fall through // TODO(@jasnell): Separate error for this - case WebCryptoKeyExportStatus::ERR_FAILED: { + case WebCryptoKeyExportStatus::FAILED: { CryptoErrorVector* errors = CryptoJob::errors(); errors->Capture(); if (errors->empty()) diff --git a/src/crypto/crypto_rsa.cc b/src/crypto/crypto_rsa.cc index 3576e6084c4a76..d859551392a382 100644 --- a/src/crypto/crypto_rsa.cc +++ b/src/crypto/crypto_rsa.cc @@ -179,7 +179,7 @@ WebCryptoKeyExportStatus RSA_JWK_Export( KeyObjectData* key_data, const RSAKeyExportConfig& params, ByteSource* out) { - return WebCryptoKeyExportStatus::ERR_FAILED; + return WebCryptoKeyExportStatus::FAILED; } template GetAsymmetricKey().get(), nullptr)); if (!ctx || init(ctx.get()) <= 0) - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; if (EVP_PKEY_CTX_set_rsa_padding(ctx.get(), params.padding) <= 0) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } if (params.digest != nullptr && (EVP_PKEY_CTX_set_rsa_oaep_md(ctx.get(), params.digest) <= 0 || EVP_PKEY_CTX_set_rsa_mgf1_md(ctx.get(), params.digest) <= 0)) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } size_t label_len = params.label.size(); @@ -214,7 +214,7 @@ WebCryptoCipherStatus RSA_Cipher( CHECK_NOT_NULL(label); if (EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(), label, label_len) <= 0) { OPENSSL_free(label); - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } } @@ -225,7 +225,7 @@ WebCryptoCipherStatus RSA_Cipher( &out_len, in.data(), in.size()) <= 0) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } char* data = MallocOpenSSL(out_len); @@ -238,13 +238,13 @@ WebCryptoCipherStatus RSA_Cipher( &out_len, in.data(), in.size()) <= 0) { - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } buf.Resize(out_len); *out = std::move(buf); - return WebCryptoCipherStatus::ERR_OK; + return WebCryptoCipherStatus::OK; } } // namespace @@ -268,16 +268,16 @@ WebCryptoKeyExportStatus RSAKeyExportTraits::DoExport( switch (format) { case kWebCryptoKeyFormatRaw: // Not supported for RSA keys of either type - return WebCryptoKeyExportStatus::ERR_FAILED; + return WebCryptoKeyExportStatus::FAILED; case kWebCryptoKeyFormatJWK: return RSA_JWK_Export(key_data.get(), params, out); case kWebCryptoKeyFormatPKCS8: if (key_data->GetKeyType() != kKeyTypePrivate) - return WebCryptoKeyExportStatus::ERR_INVALID_KEY_TYPE; + return WebCryptoKeyExportStatus::INVALID_KEY_TYPE; return PKEY_PKCS8_Export(key_data.get(), out); case kWebCryptoKeyFormatSPKI: if (key_data->GetKeyType() != kKeyTypePublic) - return WebCryptoKeyExportStatus::ERR_INVALID_KEY_TYPE; + return WebCryptoKeyExportStatus::INVALID_KEY_TYPE; return PKEY_SPKI_Export(key_data.get(), out); default: UNREACHABLE(); @@ -356,7 +356,7 @@ WebCryptoCipherStatus RSACipherTraits::DoCipher( return RSA_Cipher( env, key_data.get(), params, in, out); } - return WebCryptoCipherStatus::ERR_FAILED; + return WebCryptoCipherStatus::FAILED; } Maybe ExportJWKRsaKey( @@ -422,12 +422,12 @@ std::shared_ptr ImportJWKRsaKey( !jwk->Get(env->context(), env->jwk_d_string()).ToLocal(&d_value) || !n_value->IsString() || !e_value->IsString()) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK RSA key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK RSA key"); return std::shared_ptr(); } if (!d_value->IsUndefined() && !d_value->IsString()) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK RSA key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK RSA key"); return std::shared_ptr(); } @@ -443,7 +443,7 @@ std::shared_ptr ImportJWKRsaKey( n.ToBN().release(), e.ToBN().release(), nullptr)) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK RSA key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK RSA key"); return std::shared_ptr(); } @@ -459,7 +459,7 @@ std::shared_ptr ImportJWKRsaKey( !jwk->Get(env->context(), env->jwk_dp_string()).ToLocal(&dp_value) || !jwk->Get(env->context(), env->jwk_dq_string()).ToLocal(&dq_value) || !jwk->Get(env->context(), env->jwk_qi_string()).ToLocal(&qi_value)) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK RSA key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK RSA key"); return std::shared_ptr(); } @@ -468,7 +468,7 @@ std::shared_ptr ImportJWKRsaKey( !dp_value->IsString() || !dq_value->IsString() || !qi_value->IsString()) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK RSA key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK RSA key"); return std::shared_ptr(); } @@ -486,7 +486,7 @@ std::shared_ptr ImportJWKRsaKey( dp.ToBN().release(), dq.ToBN().release(), qi.ToBN().release())) { - THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JSK RSA key"); + THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK RSA key"); return std::shared_ptr(); } } @@ -547,4 +547,3 @@ void Initialize(Environment* env, Local target) { } // namespace RSAAlg } // namespace crypto } // namespace node - diff --git a/src/crypto/crypto_scrypt.cc b/src/crypto/crypto_scrypt.cc index 1af9853a6710e3..39d6b3fd0d8d6a 100644 --- a/src/crypto/crypto_scrypt.cc +++ b/src/crypto/crypto_scrypt.cc @@ -28,6 +28,7 @@ ScryptConfig::ScryptConfig(ScryptConfig&& other) noexcept N(other.N), r(other.r), p(other.p), + maxmem(other.maxmem), length(other.length) {} ScryptConfig& ScryptConfig::operator=(ScryptConfig&& other) noexcept { @@ -127,7 +128,7 @@ bool ScryptTraits::DeriveBits( ByteSource buf = ByteSource::Allocated(data, params.length); unsigned char* ptr = reinterpret_cast(data); - // Botht the pass and salt may be zero-length at this point + // Both the pass and salt may be zero-length at this point if (!EVP_PBE_scrypt( params.pass.get(), diff --git a/src/crypto/crypto_spkac.cc b/src/crypto/crypto_spkac.cc index 0f5698d8e80082..6950a0390377e8 100644 --- a/src/crypto/crypto_spkac.cc +++ b/src/crypto/crypto_spkac.cc @@ -85,16 +85,18 @@ void ExportPublicKey(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(pkey.ToBuffer().FromMaybe(Local())); } -OpenSSLBuffer ExportChallenge(const ArrayBufferOrViewContents& input) { +ByteSource ExportChallenge(const ArrayBufferOrViewContents& input) { NetscapeSPKIPointer sp( NETSCAPE_SPKI_b64_decode(input.data(), input.size())); if (!sp) - return nullptr; + return ByteSource(); - unsigned char* buf = nullptr; - ASN1_STRING_to_UTF8(&buf, sp->spkac->challenge); + char* buf = nullptr; + ASN1_STRING_to_UTF8( + reinterpret_cast(&buf), + sp->spkac->challenge); - return OpenSSLBuffer(reinterpret_cast(buf)); + return ByteSource::Allocated(buf, strlen(buf)); } void ExportChallenge(const FunctionCallbackInfo& args) { @@ -107,12 +109,12 @@ void ExportChallenge(const FunctionCallbackInfo& args) { if (UNLIKELY(!input.CheckSizeInt32())) return THROW_ERR_OUT_OF_RANGE(env, "spkac is too large"); - OpenSSLBuffer cert = ExportChallenge(input); + ByteSource cert = ExportChallenge(input); if (!cert) return args.GetReturnValue().SetEmptyString(); Local outString = - Encode(env->isolate(), cert.get(), strlen(cert.get()), BUFFER); + Encode(env->isolate(), cert.get(), cert.size(), BUFFER); args.GetReturnValue().Set(outString); } diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc index c8a02cc335b66a..30cafa62a51704 100644 --- a/src/crypto/crypto_util.cc +++ b/src/crypto/crypto_util.cc @@ -74,13 +74,13 @@ bool EntropySource(unsigned char* buffer, size_t length) { } int PasswordCallback(char* buf, int size, int rwflag, void* u) { - const char* passphrase = static_cast(u); + const ByteSource* passphrase = *static_cast(u); if (passphrase != nullptr) { size_t buflen = static_cast(size); - size_t len = strlen(passphrase); + size_t len = passphrase->size(); if (buflen < len) return -1; - memcpy(buf, passphrase, len); + memcpy(buf, passphrase->get(), len); return len; } @@ -236,7 +236,9 @@ ByteSource& ByteSource::operator=(ByteSource&& other) noexcept { } std::unique_ptr ByteSource::ReleaseToBackingStore() { - CHECK_NOT_NULL(allocated_data_); + // It's ok for allocated_data_ to be nullptr but + // only if size_ is zero. + CHECK_IMPLIES(size_ > 0, allocated_data_ != nullptr); std::unique_ptr ptr = ArrayBuffer::NewBackingStore( allocated_data_, size(), diff --git a/src/debug_utils.h b/src/debug_utils.h index 4915fbae325ecc..377493359e91e1 100644 --- a/src/debug_utils.h +++ b/src/debug_utils.h @@ -41,6 +41,7 @@ void FWrite(FILE* file, const std::string& str); // from a provider type to a debug category. #define DEBUG_CATEGORY_NAMES(V) \ NODE_ASYNC_PROVIDER_TYPES(V) \ + V(DIAGNOSTICS) \ V(HUGEPAGES) \ V(INSPECTOR_SERVER) \ V(INSPECTOR_PROFILER) \ diff --git a/src/env-inl.h b/src/env-inl.h index ec80faba4c49e2..cd9f6daaaff758 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -383,10 +383,6 @@ inline T* Environment::AddBindingData( return item.get(); } -inline Environment* Environment::GetThreadLocalEnv() { - return static_cast(uv_key_get(&thread_local_env)); -} - inline v8::Isolate* Environment::isolate() const { return isolate_; } @@ -614,6 +610,22 @@ inline const std::string& Environment::exec_path() const { return exec_path_; } +inline std::string Environment::GetCwd() { + char cwd[PATH_MAX_BYTES]; + size_t size = PATH_MAX_BYTES; + const int err = uv_cwd(cwd, &size); + + if (err == 0) { + CHECK_GT(size, 0); + return cwd; + } + + // This can fail if the cwd is deleted. In that case, fall back to + // exec_path. + const std::string& exec_path = exec_path_; + return exec_path.substr(0, exec_path.find_last_of(kPathSeparator)); +} + #if HAVE_INSPECTOR inline void Environment::set_coverage_directory(const char* dir) { coverage_directory_ = std::string(dir); @@ -1012,7 +1024,7 @@ inline void Environment::SetInstanceMethod(v8::Local that, t->SetClassName(name_string); } -void Environment::AddCleanupHook(void (*fn)(void*), void* arg) { +void Environment::AddCleanupHook(CleanupCallback fn, void* arg) { auto insertion_info = cleanup_hooks_.emplace(CleanupHookCallback { fn, arg, cleanup_hook_counter_++ }); @@ -1020,7 +1032,7 @@ void Environment::AddCleanupHook(void (*fn)(void*), void* arg) { CHECK_EQ(insertion_info.second, true); } -void Environment::RemoveCleanupHook(void (*fn)(void*), void* arg) { +void Environment::RemoveCleanupHook(CleanupCallback fn, void* arg) { CleanupHookCallback search { fn, arg, 0 }; cleanup_hooks_.erase(search); } diff --git a/src/env.cc b/src/env.cc index 4cdc4e3d1ba79e..7e89c2828f2003 100644 --- a/src/env.cc +++ b/src/env.cc @@ -3,6 +3,7 @@ #include "async_wrap.h" #include "base_object-inl.h" #include "debug_utils-inl.h" +#include "diagnosticfilename-inl.h" #include "memory_tracker-inl.h" #include "node_buffer.h" #include "node_context_data.h" @@ -24,6 +25,7 @@ #include #include #include +#include #include namespace node { @@ -94,12 +96,13 @@ void IsolateData::DeserializeProperties(const std::vector* indexes) { #define VS(PropertyName, StringValue) V(String, PropertyName) #define V(TypeName, PropertyName) \ do { \ - MaybeLocal field = \ + MaybeLocal maybe_field = \ isolate_->GetDataFromSnapshotOnce((*indexes)[i++]); \ - if (field.IsEmpty()) { \ + Local field; \ + if (!maybe_field.ToLocal(&field)) { \ fprintf(stderr, "Failed to deserialize " #PropertyName "\n"); \ } \ - PropertyName##_.Set(isolate_, field.ToLocalChecked()); \ + PropertyName##_.Set(isolate_, field); \ } while (0); PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES(VP) PER_ISOLATE_SYMBOL_PROPERTIES(VY) @@ -110,12 +113,13 @@ void IsolateData::DeserializeProperties(const std::vector* indexes) { #undef VP for (size_t j = 0; j < AsyncWrap::PROVIDERS_LENGTH; j++) { - MaybeLocal field = + MaybeLocal maybe_field = isolate_->GetDataFromSnapshotOnce((*indexes)[i++]); - if (field.IsEmpty()) { + Local field; + if (!maybe_field.ToLocal(&field)) { fprintf(stderr, "Failed to deserialize AsyncWrap provider %zu\n", j); } - async_wrap_providers_[j].Set(isolate_, field.ToLocalChecked()); + async_wrap_providers_[j].Set(isolate_, field); } } @@ -207,10 +211,7 @@ void IsolateData::MemoryInfo(MemoryTracker* tracker) const { #define V(PropertyName, StringValue) \ tracker->TrackField(#PropertyName, PropertyName()); PER_ISOLATE_SYMBOL_PROPERTIES(V) -#undef V -#define V(PropertyName, StringValue) \ - tracker->TrackField(#PropertyName, PropertyName()); PER_ISOLATE_STRING_PROPERTIES(V) #undef V @@ -225,10 +226,6 @@ void IsolateData::MemoryInfo(MemoryTracker* tracker) const { // TODO(joyeecheung): implement MemoryRetainer in the option classes. } -void InitThreadLocalOnce() { - CHECK_EQ(0, uv_key_create(&Environment::thread_local_env)); -} - void TrackingTraceStateObserver::UpdateTraceCategoryState() { if (!env_->owns_process_state() || !env_->can_call_into_js()) { // Ideally, we’d have a consistent story that treats all threads/Environment @@ -368,10 +365,6 @@ Environment::Environment(IsolateData* isolate_data, inspector_agent_ = std::make_unique(this); #endif - static uv_once_t init_once = UV_ONCE_INIT; - uv_once(&init_once, InitThreadLocalOnce); - uv_key_set(&thread_local_env, this); - if (tracing::AgentWriterHandle* writer = GetTracingAgentWriter()) { trace_state_observer_ = std::make_unique(this); if (TracingController* tracing_controller = writer->GetTracingController()) @@ -479,6 +472,11 @@ Environment::~Environment() { // FreeEnvironment() should have set this. CHECK(is_stopping()); + if (options_->heap_snapshot_near_heap_limit > heap_limit_snapshot_taken_) { + isolate_->RemoveNearHeapLimitCallback(Environment::NearHeapLimitCallback, + 0); + } + isolate()->GetHeapProfiler()->RemoveBuildEmbedderGraphCallback( BuildEmbedderGraph, this); @@ -538,6 +536,8 @@ void Environment::InitializeLibuv() { [](uv_async_t* async) { Environment* env = ContainerOf( &Environment::task_queues_async_, async); + HandleScope handle_scope(env->isolate()); + Context::Scope context_scope(env->context()); env->RunAndClearNativeImmediates(); }); uv_unref(reinterpret_cast(&task_queues_async_)); @@ -1136,8 +1136,6 @@ void AsyncHooks::grow_async_ids_stack() { async_ids_stack_.GetJSArray()).Check(); } -uv_key_t Environment::thread_local_env = {}; - void Environment::Exit(int exit_code) { if (options()->trace_exit) { HandleScope handle_scope(isolate()); @@ -1347,17 +1345,17 @@ void Environment::DeserializeProperties(const EnvSerializeInfo* info) { const std::vector& templates = info->persistent_templates; size_t i = 0; // index to the array size_t id = 0; -#define V(PropertyName, TypeName) \ +#define SetProperty(PropertyName, TypeName, vector, type, from) \ do { \ - if (templates.size() > i && id == templates[i].id) { \ - const PropInfo& d = templates[i]; \ + if (vector.size() > i && id == vector[i].id) { \ + const PropInfo& d = vector[i]; \ DCHECK_EQ(d.name, #PropertyName); \ MaybeLocal maybe_field = \ - isolate_->GetDataFromSnapshotOnce(d.index); \ + from->GetDataFromSnapshotOnce(d.index); \ Local field; \ if (!maybe_field.ToLocal(&field)) { \ fprintf(stderr, \ - "Failed to deserialize environment template " #PropertyName \ + "Failed to deserialize environment " #type " " #PropertyName \ "\n"); \ } \ set_##PropertyName(field); \ @@ -1365,32 +1363,19 @@ void Environment::DeserializeProperties(const EnvSerializeInfo* info) { } \ } while (0); \ id++; +#define V(PropertyName, TypeName) SetProperty(PropertyName, TypeName, \ + templates, template, isolate_) ENVIRONMENT_STRONG_PERSISTENT_TEMPLATES(V); #undef V i = 0; // index to the array id = 0; const std::vector& values = info->persistent_values; -#define V(PropertyName, TypeName) \ - do { \ - if (values.size() > i && id == values[i].id) { \ - const PropInfo& d = values[i]; \ - DCHECK_EQ(d.name, #PropertyName); \ - MaybeLocal maybe_field = \ - ctx->GetDataFromSnapshotOnce(d.index); \ - Local field; \ - if (!maybe_field.ToLocal(&field)) { \ - fprintf(stderr, \ - "Failed to deserialize environment value " #PropertyName \ - "\n"); \ - } \ - set_##PropertyName(field); \ - i++; \ - } \ - } while (0); \ - id++; +#define V(PropertyName, TypeName) SetProperty(PropertyName, TypeName, \ + values, value, ctx) ENVIRONMENT_STRONG_PERSISTENT_VALUES(V); #undef V +#undef SetProperty MaybeLocal maybe_ctx_from_snapshot = ctx->GetDataFromSnapshotOnce(info->context); @@ -1402,6 +1387,25 @@ void Environment::DeserializeProperties(const EnvSerializeInfo* info) { CHECK_EQ(ctx_from_snapshot, ctx); } +uint64_t GuessMemoryAvailableToTheProcess() { + uint64_t free_in_system = uv_get_free_memory(); + size_t allowed = uv_get_constrained_memory(); + if (allowed == 0) { + return free_in_system; + } + size_t rss; + int err = uv_resident_set_memory(&rss); + if (err) { + return free_in_system; + } + if (allowed < rss) { + // Something is probably wrong. Fallback to the free memory. + return free_in_system; + } + // There may still be room for swap, but we will just leave it here. + return allowed - rss; +} + void Environment::BuildEmbedderGraph(Isolate* isolate, EmbedderGraph* graph, void* data) { @@ -1414,6 +1418,126 @@ void Environment::BuildEmbedderGraph(Isolate* isolate, }); } +size_t Environment::NearHeapLimitCallback(void* data, + size_t current_heap_limit, + size_t initial_heap_limit) { + Environment* env = static_cast(data); + + Debug(env, + DebugCategory::DIAGNOSTICS, + "Invoked NearHeapLimitCallback, processing=%d, " + "current_limit=%" PRIu64 ", " + "initial_limit=%" PRIu64 "\n", + env->is_processing_heap_limit_callback_, + static_cast(current_heap_limit), + static_cast(initial_heap_limit)); + + size_t max_young_gen_size = env->isolate_data()->max_young_gen_size; + size_t young_gen_size = 0; + size_t old_gen_size = 0; + + v8::HeapSpaceStatistics stats; + size_t num_heap_spaces = env->isolate()->NumberOfHeapSpaces(); + for (size_t i = 0; i < num_heap_spaces; ++i) { + env->isolate()->GetHeapSpaceStatistics(&stats, i); + if (strcmp(stats.space_name(), "new_space") == 0 || + strcmp(stats.space_name(), "new_large_object_space") == 0) { + young_gen_size += stats.space_used_size(); + } else { + old_gen_size += stats.space_used_size(); + } + } + + Debug(env, + DebugCategory::DIAGNOSTICS, + "max_young_gen_size=%" PRIu64 ", " + "young_gen_size=%" PRIu64 ", " + "old_gen_size=%" PRIu64 ", " + "total_size=%" PRIu64 "\n", + static_cast(max_young_gen_size), + static_cast(young_gen_size), + static_cast(old_gen_size), + static_cast(young_gen_size + old_gen_size)); + + uint64_t available = GuessMemoryAvailableToTheProcess(); + // TODO(joyeecheung): get a better estimate about the native memory + // usage into the overhead, e.g. based on the count of objects. + uint64_t estimated_overhead = max_young_gen_size; + Debug(env, + DebugCategory::DIAGNOSTICS, + "Estimated available memory=%" PRIu64 ", " + "estimated overhead=%" PRIu64 "\n", + static_cast(available), + static_cast(estimated_overhead)); + + // This might be hit when the snapshot is being taken in another + // NearHeapLimitCallback invocation. + // When taking the snapshot, objects in the young generation may be + // promoted to the old generation, result in increased heap usage, + // but it should be no more than the young generation size. + // Ideally, this should be as small as possible - the heap limit + // can only be restored when the heap usage falls down below the + // new limit, so in a heap with unbounded growth the isolate + // may eventually crash with this new limit - effectively raising + // the heap limit to the new one. + if (env->is_processing_heap_limit_callback_) { + size_t new_limit = initial_heap_limit + max_young_gen_size; + Debug(env, + DebugCategory::DIAGNOSTICS, + "Not generating snapshots in nested callback. " + "new_limit=%" PRIu64 "\n", + static_cast(new_limit)); + return new_limit; + } + + // Estimate whether the snapshot is going to use up all the memory + // available to the process. If so, just give up to prevent the system + // from killing the process for a system OOM. + if (estimated_overhead > available) { + Debug(env, + DebugCategory::DIAGNOSTICS, + "Not generating snapshots because it's too risky.\n"); + env->isolate()->RemoveNearHeapLimitCallback(NearHeapLimitCallback, + initial_heap_limit); + return current_heap_limit; + } + + // Take the snapshot synchronously. + env->is_processing_heap_limit_callback_ = true; + + std::string dir = env->options()->diagnostic_dir; + if (dir.empty()) { + dir = env->GetCwd(); + } + DiagnosticFilename name(env, "Heap", "heapsnapshot"); + std::string filename = dir + kPathSeparator + (*name); + + Debug(env, DebugCategory::DIAGNOSTICS, "Start generating %s...\n", *name); + + // Remove the callback first in case it's triggered when generating + // the snapshot. + env->isolate()->RemoveNearHeapLimitCallback(NearHeapLimitCallback, + initial_heap_limit); + + heap::WriteSnapshot(env->isolate(), filename.c_str()); + env->heap_limit_snapshot_taken_ += 1; + + // Don't take more snapshots than the number specified by + // --heapsnapshot-near-heap-limit. + if (env->heap_limit_snapshot_taken_ < + env->options_->heap_snapshot_near_heap_limit) { + env->isolate()->AddNearHeapLimitCallback(NearHeapLimitCallback, env); + } + + FPrintF(stderr, "Wrote snapshot to %s\n", filename.c_str()); + // Tell V8 to reset the heap limit once the heap usage falls down to + // 95% of the initial limit. + env->isolate()->AutomaticallyRestoreInitialHeapLimit(0.95); + + env->is_processing_heap_limit_callback_ = false; + return initial_heap_limit; +} + inline size_t Environment::SelfSize() const { size_t size = sizeof(*this); // Remove non pointer fields that will be tracked in MemoryInfo() diff --git a/src/env.h b/src/env.h index 98110bdfd83d91..a0d59ff8728deb 100644 --- a/src/env.h +++ b/src/env.h @@ -597,6 +597,7 @@ class IsolateData : public MemoryRetainer { #undef VP inline v8::Local async_wrap_provider(int index) const; + size_t max_young_gen_size = 1; std::unordered_map> static_str_map; inline v8::Isolate* isolate() const; @@ -754,9 +755,9 @@ class AsyncHooks : public MemoryRetainer { }; struct SerializeInfo { - AliasedBufferInfo async_ids_stack; - AliasedBufferInfo fields; - AliasedBufferInfo async_id_fields; + AliasedBufferIndex async_ids_stack; + AliasedBufferIndex fields; + AliasedBufferIndex async_id_fields; SnapshotIndex js_execution_async_resources; std::vector native_execution_async_resources; }; @@ -806,7 +807,7 @@ class ImmediateInfo : public MemoryRetainer { void MemoryInfo(MemoryTracker* tracker) const override; struct SerializeInfo { - AliasedBufferInfo fields; + AliasedBufferIndex fields; }; SerializeInfo Serialize(v8::Local context, v8::SnapshotCreator* creator); @@ -838,7 +839,7 @@ class TickInfo : public MemoryRetainer { ~TickInfo() = default; struct SerializeInfo { - AliasedBufferInfo fields; + AliasedBufferIndex fields; }; SerializeInfo Serialize(v8::Local context, v8::SnapshotCreator* creator); @@ -890,7 +891,9 @@ class ShouldNotAbortOnUncaughtScope { class CleanupHookCallback { public: - CleanupHookCallback(void (*fn)(void*), + typedef void (*Callback)(void*); + + CleanupHookCallback(Callback fn, void* arg, uint64_t insertion_order_counter) : fn_(fn), arg_(arg), insertion_order_counter_(insertion_order_counter) {} @@ -910,7 +913,7 @@ class CleanupHookCallback { private: friend class Environment; - void (*fn_)(void*); + Callback fn_; void* arg_; // We keep track of the insertion order for these objects, so that we can @@ -930,8 +933,8 @@ struct EnvSerializeInfo { TickInfo::SerializeInfo tick_info; ImmediateInfo::SerializeInfo immediate_info; performance::PerformanceState::SerializeInfo performance_state; - AliasedBufferInfo stream_base_state; - AliasedBufferInfo should_abort_on_uncaught_toggle; + AliasedBufferIndex stream_base_state; + AliasedBufferIndex should_abort_on_uncaught_toggle; std::vector persistent_templates; std::vector persistent_values; @@ -961,6 +964,9 @@ class Environment : public MemoryRetainer { void VerifyNoStrongBaseObjects(); // Should be called before InitializeInspector() void InitializeDiagnostics(); + + std::string GetCwd(); + #if HAVE_INSPECTOR // If the environment is created for a worker, pass parent_handle and // the ownership if transferred into the Environment. @@ -1004,9 +1010,6 @@ class Environment : public MemoryRetainer { BaseObjectPtr, FastStringKey::Hash> BindingDataStore; - static uv_key_t thread_local_env; - static inline Environment* GetThreadLocalEnv(); - // Create an Environment without initializing a main Context. Use // InitializeMainContext() to initialize a main context for it. Environment(IsolateData* isolate_data, @@ -1315,10 +1318,14 @@ class Environment : public MemoryRetainer { void ScheduleTimer(int64_t duration); void ToggleTimerRef(bool ref); - inline void AddCleanupHook(void (*fn)(void*), void* arg); - inline void RemoveCleanupHook(void (*fn)(void*), void* arg); + using CleanupCallback = CleanupHookCallback::Callback; + inline void AddCleanupHook(CleanupCallback cb, void* arg); + inline void RemoveCleanupHook(CleanupCallback cb, void* arg); void RunCleanup(); + static size_t NearHeapLimitCallback(void* data, + size_t current_heap_limit, + size_t initial_heap_limit); static void BuildEmbedderGraph(v8::Isolate* isolate, v8::EmbedderGraph* graph, void* data); @@ -1437,6 +1444,9 @@ class Environment : public MemoryRetainer { std::vector argv_; std::string exec_path_; + bool is_processing_heap_limit_callback_ = false; + int64_t heap_limit_snapshot_taken_ = 0; + uint32_t module_id_counter_ = 0; uint32_t script_id_counter_ = 0; uint32_t function_id_counter_ = 0; diff --git a/src/heap_utils.cc b/src/heap_utils.cc index 449feb9e78d0e1..71bfd59ac3ea69 100644 --- a/src/heap_utils.cc +++ b/src/heap_utils.cc @@ -313,7 +313,9 @@ inline void TakeSnapshot(Isolate* isolate, v8::OutputStream* out) { snapshot->Serialize(out, HeapSnapshot::kJSON); } -inline bool WriteSnapshot(Isolate* isolate, const char* filename) { +} // namespace + +bool WriteSnapshot(Isolate* isolate, const char* filename) { FILE* fp = fopen(filename, "w"); if (fp == nullptr) return false; @@ -323,8 +325,6 @@ inline bool WriteSnapshot(Isolate* isolate, const char* filename) { return true; } -} // namespace - void DeleteHeapSnapshot(const HeapSnapshot* snapshot) { const_cast(snapshot)->Delete(); } diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index c54b2ab17fcb6e..c101bf80d2a6e9 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -638,9 +638,7 @@ class NodeInspectorClient : public V8InspectorClient { if (!IsFilePath(resource_name)) return nullptr; node::url::URL url = node::url::URL::FromFilePath(resource_name); - // TODO(ak239spb): replace this code with url.href(). - // Refs: https://github.com/nodejs/node/issues/22610 - return Utf8ToStringView(url.protocol() + "/" + url.path()); + return Utf8ToStringView(url.href()); } node::Environment* env_; diff --git a/src/inspector_profiler.cc b/src/inspector_profiler.cc index 03cf2f6e5ca76b..092b263ada2fdd 100644 --- a/src/inspector_profiler.cc +++ b/src/inspector_profiler.cc @@ -9,6 +9,7 @@ #include "util-inl.h" #include "v8-inspector.h" +#include #include namespace node { @@ -36,10 +37,11 @@ V8ProfilerConnection::V8ProfilerConnection(Environment* env) false)), env_(env) {} -size_t V8ProfilerConnection::DispatchMessage(const char* method, - const char* params) { +uint32_t V8ProfilerConnection::DispatchMessage(const char* method, + const char* params, + bool is_profile_request) { std::stringstream ss; - size_t id = next_id(); + uint32_t id = next_id(); ss << R"({ "id": )" << id; DCHECK(method != nullptr); ss << R"(, "method": ")" << method << '"'; @@ -50,12 +52,15 @@ size_t V8ProfilerConnection::DispatchMessage(const char* method, std::string message = ss.str(); const uint8_t* message_data = reinterpret_cast(message.c_str()); + // Save the id of the profile request to identify its response. + if (is_profile_request) { + profile_ids_.insert(id); + } Debug(env(), DebugCategory::INSPECTOR_PROFILER, "Dispatching message %s\n", message.c_str()); session_->Dispatch(StringView(message_data, message.length())); - // TODO(joyeecheung): use this to identify the ending message. return id; } @@ -77,21 +82,10 @@ void V8ProfilerConnection::V8ProfilerSessionDelegate::SendMessageToFrontend( Environment* env = connection_->env(); Isolate* isolate = env->isolate(); HandleScope handle_scope(isolate); - Context::Scope context_scope(env->context()); + Local context = env->context(); + Context::Scope context_scope(context); - // TODO(joyeecheung): always parse the message so that we can use the id to - // identify ending messages as well as printing the message in the debug - // output when there is an error. const char* type = connection_->type(); - Debug(env, - DebugCategory::INSPECTOR_PROFILER, - "Receive %s profile message, ending = %s\n", - type, - connection_->ending() ? "true" : "false"); - if (!connection_->ending()) { - return; - } - // Convert StringView to a Local. Local message_str; if (!String::NewFromTwoByte(isolate, @@ -99,11 +93,62 @@ void V8ProfilerConnection::V8ProfilerSessionDelegate::SendMessageToFrontend( NewStringType::kNormal, message.length()) .ToLocal(&message_str)) { - fprintf(stderr, "Failed to convert %s profile message\n", type); + fprintf( + stderr, "Failed to convert %s profile message to V8 string\n", type); + return; + } + + Debug(env, + DebugCategory::INSPECTOR_PROFILER, + "Receive %s profile message\n", + type); + + Local parsed; + if (!v8::JSON::Parse(context, message_str).ToLocal(&parsed) || + !parsed->IsObject()) { + fprintf(stderr, "Failed to parse %s profile result as JSON object\n", type); + return; + } + + Local response = parsed.As(); + Local id_v; + if (!response->Get(context, FIXED_ONE_BYTE_STRING(isolate, "id")) + .ToLocal(&id_v) || + !id_v->IsUint32()) { + Utf8Value str(isolate, message_str); + fprintf( + stderr, "Cannot retrieve id from the response message:\n%s\n", *str); + return; + } + uint32_t id = id_v.As()->Value(); + + if (!connection_->HasProfileId(id)) { + Utf8Value str(isolate, message_str); + Debug(env, DebugCategory::INSPECTOR_PROFILER, "%s\n", *str); + return; + } else { + Debug(env, + DebugCategory::INSPECTOR_PROFILER, + "Writing profile response (id = %" PRIu64 ")\n", + static_cast(id)); + } + + // Get message.result from the response. + Local result_v; + if (!response->Get(context, FIXED_ONE_BYTE_STRING(isolate, "result")) + .ToLocal(&result_v)) { + fprintf(stderr, "Failed to get 'result' from %s profile response\n", type); return; } - connection_->WriteProfile(message_str); + if (!result_v->IsObject()) { + fprintf( + stderr, "'result' from %s profile response is not an object\n", type); + return; + } + + connection_->WriteProfile(result_v.As()); + connection_->RemoveProfileId(id); } static bool EnsureDirectory(const std::string& directory, const char* type) { @@ -138,45 +183,9 @@ std::string V8CoverageConnection::GetFilename() const { return filename; } -static MaybeLocal ParseProfile(Environment* env, - Local message, - const char* type) { - Local context = env->context(); - Isolate* isolate = env->isolate(); - - // Get message.result from the response - Local parsed; - if (!v8::JSON::Parse(context, message).ToLocal(&parsed) || - !parsed->IsObject()) { - fprintf(stderr, "Failed to parse %s profile result as JSON object\n", type); - return MaybeLocal(); - } - - Local result_v; - if (!parsed.As() - ->Get(context, FIXED_ONE_BYTE_STRING(isolate, "result")) - .ToLocal(&result_v)) { - fprintf(stderr, "Failed to get 'result' from %s profile message\n", type); - return MaybeLocal(); - } - - if (!result_v->IsObject()) { - fprintf( - stderr, "'result' from %s profile message is not an object\n", type); - return MaybeLocal(); - } - - return result_v.As(); -} - -void V8ProfilerConnection::WriteProfile(Local message) { +void V8ProfilerConnection::WriteProfile(Local result) { Local context = env_->context(); - // Get message.result from the response. - Local result; - if (!ParseProfile(env_, message, type()).ToLocal(&result)) { - return; - } // Generate the profile output from the subclass. Local profile; if (!GetProfile(result).ToLocal(&profile)) { @@ -203,7 +212,7 @@ void V8ProfilerConnection::WriteProfile(Local message) { WriteResult(env_, path.c_str(), result_s); } -void V8CoverageConnection::WriteProfile(Local message) { +void V8CoverageConnection::WriteProfile(Local result) { Isolate* isolate = env_->isolate(); Local context = env_->context(); HandleScope handle_scope(isolate); @@ -219,11 +228,6 @@ void V8CoverageConnection::WriteProfile(Local message) { return; } - // Get message.result from the response. - Local result; - if (!ParseProfile(env_, message, type()).ToLocal(&result)) { - return; - } // Generate the profile output from the subclass. Local profile; if (!GetProfile(result).ToLocal(&profile)) { @@ -287,10 +291,23 @@ void V8CoverageConnection::Start() { R"({ "callCount": true, "detailed": true })"); } +void V8CoverageConnection::TakeCoverage() { + DispatchMessage("Profiler.takePreciseCoverage", nullptr, true); +} + +void V8CoverageConnection::StopCoverage() { + DispatchMessage("Profiler.stopPreciseCoverage"); +} + void V8CoverageConnection::End() { - CHECK_EQ(ending_, false); + Debug(env_, + DebugCategory::INSPECTOR_PROFILER, + "V8CoverageConnection::End(), ending = %d\n", ending_); + if (ending_) { + return; + } ending_ = true; - DispatchMessage("Profiler.takePreciseCoverage"); + TakeCoverage(); } std::string V8CpuProfilerConnection::GetDirectory() const { @@ -327,9 +344,14 @@ void V8CpuProfilerConnection::Start() { } void V8CpuProfilerConnection::End() { - CHECK_EQ(ending_, false); + Debug(env_, + DebugCategory::INSPECTOR_PROFILER, + "V8CpuProfilerConnection::End(), ending = %d\n", ending_); + if (ending_) { + return; + } ending_ = true; - DispatchMessage("Profiler.stop"); + DispatchMessage("Profiler.stop", nullptr, true); } std::string V8HeapProfilerConnection::GetDirectory() const { @@ -365,51 +387,37 @@ void V8HeapProfilerConnection::Start() { } void V8HeapProfilerConnection::End() { - CHECK_EQ(ending_, false); + Debug(env_, + DebugCategory::INSPECTOR_PROFILER, + "V8HeapProfilerConnection::End(), ending = %d\n", ending_); + if (ending_) { + return; + } ending_ = true; - DispatchMessage("HeapProfiler.stopSampling"); + DispatchMessage("HeapProfiler.stopSampling", nullptr, true); } // For now, we only support coverage profiling, but we may add more // in the future. static void EndStartedProfilers(Environment* env) { + // TODO(joyeechueng): merge these connections and use one session per env. Debug(env, DebugCategory::INSPECTOR_PROFILER, "EndStartedProfilers\n"); V8ProfilerConnection* connection = env->cpu_profiler_connection(); - if (connection != nullptr && !connection->ending()) { - Debug(env, DebugCategory::INSPECTOR_PROFILER, "Ending cpu profiling\n"); + if (connection != nullptr) { connection->End(); } connection = env->heap_profiler_connection(); - if (connection != nullptr && !connection->ending()) { - Debug(env, DebugCategory::INSPECTOR_PROFILER, "Ending heap profiling\n"); + if (connection != nullptr) { connection->End(); } connection = env->coverage_connection(); - if (connection != nullptr && !connection->ending()) { - Debug( - env, DebugCategory::INSPECTOR_PROFILER, "Ending coverage collection\n"); + if (connection != nullptr) { connection->End(); } } -std::string GetCwd(Environment* env) { - char cwd[PATH_MAX_BYTES]; - size_t size = PATH_MAX_BYTES; - const int err = uv_cwd(cwd, &size); - - if (err == 0) { - CHECK_GT(size, 0); - return cwd; - } - - // This can fail if the cwd is deleted. In that case, fall back to - // exec_path. - const std::string& exec_path = env->exec_path(); - return exec_path.substr(0, exec_path.find_last_of(kPathSeparator)); -} - void StartProfilers(Environment* env) { AtExit(env, [](void* env) { EndStartedProfilers(static_cast(env)); @@ -427,7 +435,7 @@ void StartProfilers(Environment* env) { if (env->options()->cpu_prof) { const std::string& dir = env->options()->cpu_prof_dir; env->set_cpu_prof_interval(env->options()->cpu_prof_interval); - env->set_cpu_prof_dir(dir.empty() ? GetCwd(env) : dir); + env->set_cpu_prof_dir(dir.empty() ? env->GetCwd() : dir); if (env->options()->cpu_prof_name.empty()) { DiagnosticFilename filename(env, "CPU", "cpuprofile"); env->set_cpu_prof_name(*filename); @@ -442,7 +450,7 @@ void StartProfilers(Environment* env) { if (env->options()->heap_prof) { const std::string& dir = env->options()->heap_prof_dir; env->set_heap_prof_interval(env->options()->heap_prof_interval); - env->set_heap_prof_dir(dir.empty() ? GetCwd(env) : dir); + env->set_heap_prof_dir(dir.empty() ? env->GetCwd() : dir); if (env->options()->heap_prof_name.empty()) { DiagnosticFilename filename(env, "Heap", "heapprofile"); env->set_heap_prof_name(*filename); @@ -469,6 +477,37 @@ static void SetSourceMapCacheGetter(const FunctionCallbackInfo& args) { env->set_source_map_cache_getter(args[0].As()); } +static void TakeCoverage(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + V8CoverageConnection* connection = env->coverage_connection(); + + Debug( + env, + DebugCategory::INSPECTOR_PROFILER, + "TakeCoverage, connection %s nullptr\n", + connection == nullptr ? "==" : "!="); + + if (connection != nullptr) { + Debug(env, DebugCategory::INSPECTOR_PROFILER, "taking coverage\n"); + connection->TakeCoverage(); + } +} + +static void StopCoverage(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + V8CoverageConnection* connection = env->coverage_connection(); + + Debug(env, + DebugCategory::INSPECTOR_PROFILER, + "StopCoverage, connection %s nullptr\n", + connection == nullptr ? "==" : "!="); + + if (connection != nullptr) { + Debug(env, DebugCategory::INSPECTOR_PROFILER, "Stopping coverage\n"); + connection->StopCoverage(); + } +} + static void Initialize(Local target, Local unused, Local context, @@ -476,6 +515,8 @@ static void Initialize(Local target, Environment* env = Environment::GetCurrent(context); env->SetMethod(target, "setCoverageDirectory", SetCoverageDirectory); env->SetMethod(target, "setSourceMapCacheGetter", SetSourceMapCacheGetter); + env->SetMethod(target, "takeCoverage", TakeCoverage); + env->SetMethod(target, "stopCoverage", StopCoverage); } } // namespace profiler diff --git a/src/inspector_profiler.h b/src/inspector_profiler.h index 187bc0d1c49a16..be74153b0c37ac 100644 --- a/src/inspector_profiler.h +++ b/src/inspector_profiler.h @@ -7,6 +7,7 @@ #error("This header can only be used when inspector is enabled") #endif +#include #include "inspector_agent.h" namespace node { @@ -39,7 +40,9 @@ class V8ProfilerConnection { // The optional `params` should be formatted in JSON. // The strings should be in one byte characters - which is enough for // the commands we use here. - size_t DispatchMessage(const char* method, const char* params = nullptr); + uint32_t DispatchMessage(const char* method, + const char* params = nullptr, + bool is_profile_request = false); // Use DispatchMessage() to dispatch necessary inspector messages // to start and end the profiling. @@ -58,12 +61,19 @@ class V8ProfilerConnection { // which will be then written as a JSON. virtual v8::MaybeLocal GetProfile( v8::Local result) = 0; - virtual void WriteProfile(v8::Local message); + virtual void WriteProfile(v8::Local result); + + bool HasProfileId(uint32_t id) const { + return profile_ids_.find(id) != profile_ids_.end(); + } + + void RemoveProfileId(uint32_t id) { profile_ids_.erase(id); } private: - size_t next_id() { return id_++; } + uint32_t next_id() { return id_++; } std::unique_ptr session_; - size_t id_ = 1; + uint32_t id_ = 1; + std::unordered_set profile_ids_; protected: Environment* env_ = nullptr; @@ -82,8 +92,10 @@ class V8CoverageConnection : public V8ProfilerConnection { std::string GetDirectory() const override; std::string GetFilename() const override; v8::MaybeLocal GetProfile(v8::Local result) override; - void WriteProfile(v8::Local message) override; + void WriteProfile(v8::Local result) override; void WriteSourceMapCache(); + void TakeCoverage(); + void StopCoverage(); private: std::unique_ptr session_; diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc index 1feabfd879476c..e037c4297de0c5 100644 --- a/src/js_native_api_v8.cc +++ b/src/js_native_api_v8.cc @@ -169,7 +169,7 @@ inline static napi_status ConcludeDeferred(napi_env env, NAPI_PREAMBLE(env); CHECK_ARG(env, result); - v8::Local context = env->isolate->GetCurrentContext(); + v8::Local context = env->context(); v8impl::Persistent* deferred_ref = NodePersistentFromJsDeferred(deferred); v8::Local v8_deferred = @@ -220,6 +220,8 @@ class RefBase : protected Finalizer, RefTracker { finalize_hint); } + virtual ~RefBase() { Unlink(); } + inline void* Data() { return _finalize_data; } @@ -228,10 +230,9 @@ class RefBase : protected Finalizer, RefTracker { // from one of Unwrap or napi_delete_reference. // // When it is called from Unwrap or napi_delete_reference we only - // want to do the delete if there is no finalizer or the finalizer has already - // run or cannot have been queued to run (i.e. the reference count is > 0), + // want to do the delete if the finalizer has already run or + // cannot have been queued to run (ie the reference count is > 0), // otherwise we may crash when the finalizer does run. - // // If the finalizer may have been queued and has not already run // delay the delete until the finalizer runs by not doing the delete // and setting _delete_self to true so that the finalizer will @@ -241,9 +242,7 @@ class RefBase : protected Finalizer, RefTracker { // the finalizer and _delete_self is set. In this case we // know we need to do the deletion so just do it. static inline void Delete(RefBase* reference) { - reference->Unlink(); if ((reference->RefCount() != 0) || - (reference->_finalize_callback == nullptr) || (reference->_delete_self) || (reference->_finalize_ran)) { delete reference; @@ -386,8 +385,7 @@ inline static napi_status Unwrap(napi_env env, CHECK_ARG(env, result); } - v8::Isolate* isolate = env->isolate; - v8::Local context = isolate->GetCurrentContext(); + v8::Local context = env->context(); v8::Local value = v8impl::V8LocalValueFromJsValue(js_object); RETURN_STATUS_IF_FALSE(env, value->IsObject(), napi_invalid_arg); @@ -420,18 +418,36 @@ inline static napi_status Unwrap(napi_env env, // calling through N-API. // Ref: benchmark/misc/function_call // Discussion (incl. perf. data): https://github.com/nodejs/node/pull/21072 -struct CallbackBundle { +class CallbackBundle { + public: + // Creates an object to be made available to the static function callback + // wrapper, used to retrieve the native callback function and data pointer. + static inline v8::Local + New(napi_env env, napi_callback cb, void* data) { + CallbackBundle* bundle = new CallbackBundle(); + bundle->cb = cb; + bundle->cb_data = data; + bundle->env = env; + + v8::Local cbdata = v8::External::New(env->isolate, bundle); + Reference::New(env, cbdata, 0, true, Delete, bundle, nullptr); + return cbdata; + } napi_env env; // Necessary to invoke C++ NAPI callback void* cb_data; // The user provided callback data - napi_callback function_or_getter; - napi_callback setter; + napi_callback cb; + private: + static void Delete(napi_env env, void* data, void* hint) { + CallbackBundle* bundle = static_cast(data); + delete bundle; + } }; // Base class extended by classes that wrap V8 function and property callback // info. class CallbackWrapper { public: - CallbackWrapper(napi_value this_arg, size_t args_length, void* data) + inline CallbackWrapper(napi_value this_arg, size_t args_length, void* data) : _this(this_arg), _args_length(args_length), _data(data) {} virtual napi_value GetNewTarget() = 0; @@ -450,10 +466,10 @@ class CallbackWrapper { void* _data; }; -template class CallbackWrapperBase : public CallbackWrapper { public: - CallbackWrapperBase(const Info& cbinfo, const size_t args_length) + inline CallbackWrapperBase(const v8::FunctionCallbackInfo& cbinfo, + const size_t args_length) : CallbackWrapper(JsValueFromV8LocalValue(cbinfo.This()), args_length, nullptr), @@ -463,16 +479,14 @@ class CallbackWrapperBase : public CallbackWrapper { _data = _bundle->cb_data; } - napi_value GetNewTarget() override { return nullptr; } - protected: - void InvokeCallback() { + inline void InvokeCallback() { napi_callback_info cbinfo_wrapper = reinterpret_cast( static_cast(this)); // All other pointers we need are stored in `_bundle` napi_env env = _bundle->env; - napi_callback cb = _bundle->*FunctionField; + napi_callback cb = _bundle->cb; napi_value result; env->CallIntoModule([&](napi_env env) { @@ -484,19 +498,45 @@ class CallbackWrapperBase : public CallbackWrapper { } } - const Info& _cbinfo; + const v8::FunctionCallbackInfo& _cbinfo; CallbackBundle* _bundle; }; class FunctionCallbackWrapper - : public CallbackWrapperBase, - &CallbackBundle::function_or_getter> { + : public CallbackWrapperBase { public: static void Invoke(const v8::FunctionCallbackInfo& info) { FunctionCallbackWrapper cbwrapper(info); cbwrapper.InvokeCallback(); } + static inline napi_status NewFunction(napi_env env, + napi_callback cb, + void* cb_data, + v8::Local* result) { + v8::Local cbdata = v8impl::CallbackBundle::New(env, cb, cb_data); + RETURN_STATUS_IF_FALSE(env, !cbdata.IsEmpty(), napi_generic_failure); + + v8::MaybeLocal maybe_function = + v8::Function::New(env->context(), Invoke, cbdata); + CHECK_MAYBE_EMPTY(env, maybe_function, napi_generic_failure); + + *result = maybe_function.ToLocalChecked(); + return napi_clear_last_error(env); + } + + static inline napi_status NewTemplate(napi_env env, + napi_callback cb, + void* cb_data, + v8::Local* result, + v8::Local sig = v8::Local()) { + v8::Local cbdata = v8impl::CallbackBundle::New(env, cb, cb_data); + RETURN_STATUS_IF_FALSE(env, !cbdata.IsEmpty(), napi_generic_failure); + + *result = v8::FunctionTemplate::New(env->isolate, Invoke, cbdata, sig); + return napi_clear_last_error(env); + } + explicit FunctionCallbackWrapper( const v8::FunctionCallbackInfo& cbinfo) : CallbackWrapperBase(cbinfo, cbinfo.Length()) {} @@ -534,98 +574,6 @@ class FunctionCallbackWrapper } }; -class GetterCallbackWrapper - : public CallbackWrapperBase, - &CallbackBundle::function_or_getter> { - public: - static void Invoke(v8::Local property, - const v8::PropertyCallbackInfo& info) { - GetterCallbackWrapper cbwrapper(info); - cbwrapper.InvokeCallback(); - } - - explicit GetterCallbackWrapper( - const v8::PropertyCallbackInfo& cbinfo) - : CallbackWrapperBase(cbinfo, 0) {} - - /*virtual*/ - void Args(napi_value* buffer, size_t buffer_length) override { - if (buffer_length > 0) { - napi_value undefined = - v8impl::JsValueFromV8LocalValue(v8::Undefined(_cbinfo.GetIsolate())); - for (size_t i = 0; i < buffer_length; i += 1) { - buffer[i] = undefined; - } - } - } - - /*virtual*/ - void SetReturnValue(napi_value value) override { - v8::Local val = v8impl::V8LocalValueFromJsValue(value); - _cbinfo.GetReturnValue().Set(val); - } -}; - -class SetterCallbackWrapper - : public CallbackWrapperBase, - &CallbackBundle::setter> { - public: - static void Invoke(v8::Local property, - v8::Local value, - const v8::PropertyCallbackInfo& info) { - SetterCallbackWrapper cbwrapper(info, value); - cbwrapper.InvokeCallback(); - } - - SetterCallbackWrapper(const v8::PropertyCallbackInfo& cbinfo, - const v8::Local& value) - : CallbackWrapperBase(cbinfo, 1), _value(value) {} - - /*virtual*/ - void Args(napi_value* buffer, size_t buffer_length) override { - if (buffer_length > 0) { - buffer[0] = v8impl::JsValueFromV8LocalValue(_value); - - if (buffer_length > 1) { - napi_value undefined = v8impl::JsValueFromV8LocalValue( - v8::Undefined(_cbinfo.GetIsolate())); - for (size_t i = 1; i < buffer_length; i += 1) { - buffer[i] = undefined; - } - } - } - } - - /*virtual*/ - void SetReturnValue(napi_value value) override { - // Ignore any value returned from a setter callback. - } - - private: - const v8::Local& _value; -}; - -static void DeleteCallbackBundle(napi_env env, void* data, void* hint) { - CallbackBundle* bundle = static_cast(data); - delete bundle; -} - -// Creates an object to be made available to the static function callback -// wrapper, used to retrieve the native callback function and data pointer. -static -v8::Local CreateFunctionCallbackData(napi_env env, - napi_callback cb, - void* data) { - CallbackBundle* bundle = new CallbackBundle(); - bundle->function_or_getter = cb; - bundle->cb_data = data; - bundle->env = env; - v8::Local cbdata = v8::External::New(env->isolate, bundle); - Reference::New(env, cbdata, 0, true, DeleteCallbackBundle, bundle, nullptr); - - return cbdata; -} - enum WrapType { retrievable, anonymous @@ -747,22 +695,12 @@ napi_status napi_create_function(napi_env env, CHECK_ARG(env, result); CHECK_ARG(env, cb); - v8::Isolate* isolate = env->isolate; v8::Local return_value; - v8::EscapableHandleScope scope(isolate); - v8::Local cbdata = - v8impl::CreateFunctionCallbackData(env, cb, callback_data); - - RETURN_STATUS_IF_FALSE(env, !cbdata.IsEmpty(), napi_generic_failure); - - v8::Local context = env->context(); - v8::MaybeLocal maybe_function = - v8::Function::New(context, - v8impl::FunctionCallbackWrapper::Invoke, - cbdata); - CHECK_MAYBE_EMPTY(env, maybe_function, napi_generic_failure); - - return_value = scope.Escape(maybe_function.ToLocalChecked()); + v8::EscapableHandleScope scope(env->isolate); + v8::Local fn; + STATUS_CALL(v8impl::FunctionCallbackWrapper::NewFunction( + env, cb, callback_data, &fn)); + return_value = scope.Escape(fn); if (utf8name != nullptr) { v8::Local name_string; @@ -794,13 +732,9 @@ napi_status napi_define_class(napi_env env, v8::Isolate* isolate = env->isolate; v8::EscapableHandleScope scope(isolate); - v8::Local cbdata = - v8impl::CreateFunctionCallbackData(env, constructor, callback_data); - - RETURN_STATUS_IF_FALSE(env, !cbdata.IsEmpty(), napi_generic_failure); - - v8::Local tpl = v8::FunctionTemplate::New( - isolate, v8impl::FunctionCallbackWrapper::Invoke, cbdata); + v8::Local tpl; + STATUS_CALL(v8impl::FunctionCallbackWrapper::NewTemplate( + env, constructor, callback_data, &tpl)); v8::Local name_string; CHECK_NEW_FROM_UTF8_LEN(env, name_string, utf8name, length); @@ -817,12 +751,7 @@ napi_status napi_define_class(napi_env env, } v8::Local property_name; - napi_status status = - v8impl::V8NameFromPropertyDescriptor(env, p, &property_name); - - if (status != napi_ok) { - return napi_set_last_error(env, status); - } + STATUS_CALL(v8impl::V8NameFromPropertyDescriptor(env, p, &property_name)); v8::PropertyAttribute attributes = v8impl::V8PropertyAttributesFromDescriptor(p); @@ -835,18 +764,12 @@ napi_status napi_define_class(napi_env env, v8::Local getter_tpl; v8::Local setter_tpl; if (p->getter != nullptr) { - v8::Local getter_data = - v8impl::CreateFunctionCallbackData(env, p->getter, p->data); - - getter_tpl = v8::FunctionTemplate::New( - isolate, v8impl::FunctionCallbackWrapper::Invoke, getter_data); + STATUS_CALL(v8impl::FunctionCallbackWrapper::NewTemplate( + env, p->getter, p->data, &getter_tpl)); } if (p->setter != nullptr) { - v8::Local setter_data = - v8impl::CreateFunctionCallbackData(env, p->setter, p->data); - - setter_tpl = v8::FunctionTemplate::New( - isolate, v8impl::FunctionCallbackWrapper::Invoke, setter_data); + STATUS_CALL(v8impl::FunctionCallbackWrapper::NewTemplate( + env, p->setter, p->data, &setter_tpl)); } tpl->PrototypeTemplate()->SetAccessorProperty( @@ -856,16 +779,9 @@ napi_status napi_define_class(napi_env env, attributes, v8::AccessControl::DEFAULT); } else if (p->method != nullptr) { - v8::Local cbdata = - v8impl::CreateFunctionCallbackData(env, p->method, p->data); - - RETURN_STATUS_IF_FALSE(env, !cbdata.IsEmpty(), napi_generic_failure); - - v8::Local t = - v8::FunctionTemplate::New(isolate, - v8impl::FunctionCallbackWrapper::Invoke, - cbdata, - v8::Signature::New(isolate, tpl)); + v8::Local t; + STATUS_CALL(v8impl::FunctionCallbackWrapper::NewTemplate( + env, p->method, p->data, &t, v8::Signature::New(isolate, tpl))); tpl->PrototypeTemplate()->Set(property_name, t, attributes); } else { @@ -889,12 +805,10 @@ napi_status napi_define_class(napi_env env, } } - napi_status status = - napi_define_properties(env, - *result, - static_descriptors.size(), - static_descriptors.data()); - if (status != napi_ok) return status; + STATUS_CALL(napi_define_properties(env, + *result, + static_descriptors.size(), + static_descriptors.data())); } return GET_RETURN_STATUS(env); @@ -1269,41 +1183,19 @@ napi_status napi_define_properties(napi_env env, const napi_property_descriptor* p = &properties[i]; v8::Local property_name; - napi_status status = - v8impl::V8NameFromPropertyDescriptor(env, p, &property_name); - - if (status != napi_ok) { - return napi_set_last_error(env, status); - } + STATUS_CALL(v8impl::V8NameFromPropertyDescriptor(env, p, &property_name)); if (p->getter != nullptr || p->setter != nullptr) { - v8::Local local_getter; - v8::Local local_setter; + v8::Local local_getter; + v8::Local local_setter; if (p->getter != nullptr) { - v8::Local getter_data = - v8impl::CreateFunctionCallbackData(env, p->getter, p->data); - CHECK_MAYBE_EMPTY(env, getter_data, napi_generic_failure); - - v8::MaybeLocal maybe_getter = - v8::Function::New(context, - v8impl::FunctionCallbackWrapper::Invoke, - getter_data); - CHECK_MAYBE_EMPTY(env, maybe_getter, napi_generic_failure); - - local_getter = maybe_getter.ToLocalChecked(); + STATUS_CALL(v8impl::FunctionCallbackWrapper::NewFunction( + env, p->getter, p->data, &local_getter)); } if (p->setter != nullptr) { - v8::Local setter_data = - v8impl::CreateFunctionCallbackData(env, p->setter, p->data); - CHECK_MAYBE_EMPTY(env, setter_data, napi_generic_failure); - - v8::MaybeLocal maybe_setter = - v8::Function::New(context, - v8impl::FunctionCallbackWrapper::Invoke, - setter_data); - CHECK_MAYBE_EMPTY(env, maybe_setter, napi_generic_failure); - local_setter = maybe_setter.ToLocalChecked(); + STATUS_CALL(v8impl::FunctionCallbackWrapper::NewFunction( + env, p->setter, p->data, &local_setter)); } v8::PropertyDescriptor descriptor(local_getter, local_setter); @@ -1318,19 +1210,10 @@ napi_status napi_define_properties(napi_env env, return napi_set_last_error(env, napi_invalid_arg); } } else if (p->method != nullptr) { - v8::Local cbdata = - v8impl::CreateFunctionCallbackData(env, p->method, p->data); - - CHECK_MAYBE_EMPTY(env, cbdata, napi_generic_failure); - - v8::MaybeLocal maybe_fn = - v8::Function::New(context, - v8impl::FunctionCallbackWrapper::Invoke, - cbdata); - - CHECK_MAYBE_EMPTY(env, maybe_fn, napi_generic_failure); - - v8::PropertyDescriptor descriptor(maybe_fn.ToLocalChecked(), + v8::Local method; + STATUS_CALL(v8impl::FunctionCallbackWrapper::NewFunction( + env, p->method, p->data, &method)); + v8::PropertyDescriptor descriptor(method, (p->attributes & napi_writable) != 0); descriptor.set_enumerable((p->attributes & napi_enumerable) != 0); descriptor.set_configurable((p->attributes & napi_configurable) != 0); @@ -1725,8 +1608,7 @@ napi_status napi_create_error(napi_env env, v8::Local error_obj = v8::Exception::Error(message_value.As()); - napi_status status = set_error_code(env, error_obj, code, nullptr); - if (status != napi_ok) return status; + STATUS_CALL(set_error_code(env, error_obj, code, nullptr)); *result = v8impl::JsValueFromV8LocalValue(error_obj); @@ -1746,8 +1628,7 @@ napi_status napi_create_type_error(napi_env env, v8::Local error_obj = v8::Exception::TypeError(message_value.As()); - napi_status status = set_error_code(env, error_obj, code, nullptr); - if (status != napi_ok) return status; + STATUS_CALL(set_error_code(env, error_obj, code, nullptr)); *result = v8impl::JsValueFromV8LocalValue(error_obj); @@ -1767,8 +1648,7 @@ napi_status napi_create_range_error(napi_env env, v8::Local error_obj = v8::Exception::RangeError(message_value.As()); - napi_status status = set_error_code(env, error_obj, code, nullptr); - if (status != napi_ok) return status; + STATUS_CALL(set_error_code(env, error_obj, code, nullptr)); *result = v8impl::JsValueFromV8LocalValue(error_obj); @@ -1948,8 +1828,7 @@ napi_status napi_throw_error(napi_env env, CHECK_NEW_FROM_UTF8(env, str, msg); v8::Local error_obj = v8::Exception::Error(str); - napi_status status = set_error_code(env, error_obj, nullptr, code); - if (status != napi_ok) return status; + STATUS_CALL(set_error_code(env, error_obj, nullptr, code)); isolate->ThrowException(error_obj); // any VM calls after this point and before returning @@ -1967,8 +1846,7 @@ napi_status napi_throw_type_error(napi_env env, CHECK_NEW_FROM_UTF8(env, str, msg); v8::Local error_obj = v8::Exception::TypeError(str); - napi_status status = set_error_code(env, error_obj, nullptr, code); - if (status != napi_ok) return status; + STATUS_CALL(set_error_code(env, error_obj, nullptr, code)); isolate->ThrowException(error_obj); // any VM calls after this point and before returning @@ -1986,8 +1864,7 @@ napi_status napi_throw_range_error(napi_env env, CHECK_NEW_FROM_UTF8(env, str, msg); v8::Local error_obj = v8::Exception::RangeError(str); - napi_status status = set_error_code(env, error_obj, nullptr, code); - if (status != napi_ok) return status; + STATUS_CALL(set_error_code(env, error_obj, nullptr, code)); isolate->ThrowException(error_obj); // any VM calls after this point and before returning @@ -2786,15 +2663,13 @@ napi_status napi_create_external_arraybuffer(napi_env env, // and is able to use napi_env. Implementing that properly is hard, so use the // `Buffer` variant for easier implementation. napi_value buffer; - napi_status status; - status = napi_create_external_buffer( + STATUS_CALL(napi_create_external_buffer( env, byte_length, external_data, finalize_cb, finalize_hint, - &buffer); - if (status != napi_ok) return status; + &buffer)); return napi_get_typedarray_info( env, buffer, diff --git a/src/js_native_api_v8.h b/src/js_native_api_v8.h index 06b8049ec46db0..1a62782c1ad24f 100644 --- a/src/js_native_api_v8.h +++ b/src/js_native_api_v8.h @@ -337,4 +337,10 @@ class TryCatch : public v8::TryCatch { } // end of namespace v8impl +#define STATUS_CALL(call) \ + do { \ + napi_status status = (call); \ + if (status != napi_ok) return status; \ + } while (0) + #endif // SRC_JS_NATIVE_API_V8_H_ diff --git a/src/memory_tracker-inl.h b/src/memory_tracker-inl.h index 4167064847253e..0ba44f1f16efbb 100644 --- a/src/memory_tracker-inl.h +++ b/src/memory_tracker-inl.h @@ -22,7 +22,7 @@ inline const char* GetNodeName(const char* node_name, const char* edge_name) { class MemoryRetainerNode : public v8::EmbedderGraph::Node { public: inline MemoryRetainerNode(MemoryTracker* tracker, - const MemoryRetainer* retainer) + const MemoryRetainer* retainer) : retainer_(retainer) { CHECK_NOT_NULL(retainer_); v8::HandleScope handle_scope(tracker->isolate()); @@ -34,9 +34,9 @@ class MemoryRetainerNode : public v8::EmbedderGraph::Node { } inline MemoryRetainerNode(MemoryTracker* tracker, - const char* name, - size_t size, - bool is_root_node = false) + const char* name, + size_t size, + bool is_root_node = false) : retainer_(nullptr) { name_ = name; size_ = size; diff --git a/src/module_wrap.cc b/src/module_wrap.cc index f778b089dc4009..9302fa6f68d837 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -350,6 +350,7 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo& args) { ShouldNotAbortOnUncaughtScope no_abort_scope(env); TryCatchScope try_catch(env); + Isolate::SafeForTerminationScope safe_for_termination(env->isolate()); bool timed_out = false; bool received_signal = false; diff --git a/src/node.cc b/src/node.cc index 521cae7757d477..c3f423cb579479 100644 --- a/src/node.cc +++ b/src/node.cc @@ -275,6 +275,10 @@ static void AtomicsWaitCallback(Isolate::AtomicsWaitEvent event, void Environment::InitializeDiagnostics() { isolate_->GetHeapProfiler()->AddBuildEmbedderGraphCallback( Environment::BuildEmbedderGraph, this); + if (options_->heap_snapshot_near_heap_limit > 0) { + isolate_->AddNearHeapLimitCallback(Environment::NearHeapLimitCallback, + this); + } if (options_->trace_uncaught) isolate_->SetCaptureStackTraceForUncaughtExceptions(true); if (options_->trace_atomics_wait) { @@ -943,51 +947,6 @@ int InitializeNodeWithArgs(std::vector* argv, return 0; } -// TODO(addaleax): Deprecate and eventually remove this. -void Init(int* argc, - const char** argv, - int* exec_argc, - const char*** exec_argv) { - std::vector argv_(argv, argv + *argc); // NOLINT - std::vector exec_argv_; - std::vector errors; - - // This (approximately) duplicates some logic that has been moved to - // node::Start(), with the difference that here we explicitly call `exit()`. - int exit_code = InitializeNodeWithArgs(&argv_, &exec_argv_, &errors); - - for (const std::string& error : errors) - fprintf(stderr, "%s: %s\n", argv_.at(0).c_str(), error.c_str()); - if (exit_code != 0) exit(exit_code); - - if (per_process::cli_options->print_version) { - printf("%s\n", NODE_VERSION); - exit(0); - } - - if (per_process::cli_options->print_bash_completion) { - std::string completion = options_parser::GetBashCompletion(); - printf("%s\n", completion.c_str()); - exit(0); - } - - if (per_process::cli_options->print_v8_help) { - V8::SetFlagsFromString("--help", static_cast(6)); - exit(0); - } - - *argc = argv_.size(); - *exec_argc = exec_argv_.size(); - // These leak memory, because, in the original code of this function, no - // extra allocations were visible. This should be okay because this function - // is only supposed to be called once per process, though. - *exec_argv = Malloc(*exec_argc); - for (int i = 0; i < *exec_argc; ++i) - (*exec_argv)[i] = strdup(exec_argv_[i].c_str()); - for (int i = 0; i < *argc; ++i) - argv[i] = strdup(argv_[i].c_str()); -} - InitializationResult InitializeOncePerProcess(int argc, char** argv) { // Initialized the enabled list for Debug() calls with system // environment variables. diff --git a/src/node.h b/src/node.h index 6f93fc89e1ff82..5313f49e0bc2c0 100644 --- a/src/node.h +++ b/src/node.h @@ -60,14 +60,7 @@ # define SIGKILL 9 #endif -#if (__GNUC__ >= 8) && !defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-function-type" -#endif #include "v8.h" // NOLINT(build/include_order) -#if (__GNUC__ >= 8) && !defined(__clang__) -#pragma GCC diagnostic pop -#endif #include "v8-platform.h" // NOLINT(build/include_order) #include "node_version.h" // NODE_MODULE_VERSION @@ -229,14 +222,6 @@ NODE_EXTERN int Start(int argc, char* argv[]); // in the loop and / or actively executing JavaScript code). NODE_EXTERN int Stop(Environment* env); -// It is recommended to use InitializeNodeWithArgs() instead as an embedder. -// Init() calls InitializeNodeWithArgs() and exits the process with the exit -// code returned from it. -NODE_DEPRECATED("Use InitializeNodeWithArgs() instead", - NODE_EXTERN void Init(int* argc, - const char** argv, - int* exec_argc, - const char*** exec_argv)); // Set up per-process state needed to run Node.js. This will consume arguments // from argv, fill exec_argv, and possibly add errors resulting from parsing // the arguments to `errors`. The return value is a suggested exit code for the @@ -331,7 +316,8 @@ class NODE_EXTERN MultiIsolatePlatform : public v8::Platform { enum IsolateSettingsFlags { MESSAGE_LISTENER_WITH_ERROR_LEVEL = 1 << 0, DETAILED_SOURCE_POSITIONS_FOR_PROFILING = 1 << 1, - SHOULD_NOT_SET_PROMISE_REJECTION_CALLBACK = 1 << 2 + SHOULD_NOT_SET_PROMISE_REJECTION_CALLBACK = 1 << 2, + SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK = 1 << 3 }; struct IsolateSettings { @@ -364,11 +350,9 @@ NODE_EXTERN void SetIsolateUpForNode(v8::Isolate* isolate); // This is a convenience method equivalent to using SetIsolateCreateParams(), // Isolate::Allocate(), MultiIsolatePlatform::RegisterIsolate(), // Isolate::Initialize(), and SetIsolateUpForNode(). -NODE_EXTERN v8::Isolate* NewIsolate(ArrayBufferAllocator* allocator, - struct uv_loop_s* event_loop); NODE_EXTERN v8::Isolate* NewIsolate(ArrayBufferAllocator* allocator, struct uv_loop_s* event_loop, - MultiIsolatePlatform* platform); + MultiIsolatePlatform* platform = nullptr); NODE_EXTERN v8::Isolate* NewIsolate( std::shared_ptr allocator, struct uv_loop_s* event_loop, @@ -429,14 +413,6 @@ struct InspectorParentHandle { // TODO(addaleax): Maybe move per-Environment options parsing here. // Returns nullptr when the Environment cannot be created e.g. there are // pending JavaScript exceptions. -// It is recommended to use the second variant taking a flags argument. -NODE_DEPRECATED("Use overload taking a flags argument", - NODE_EXTERN Environment* CreateEnvironment(IsolateData* isolate_data, - v8::Local context, - int argc, - const char* const* argv, - int exec_argc, - const char* const* exec_argv)); NODE_EXTERN Environment* CreateEnvironment( IsolateData* isolate_data, v8::Local context, @@ -466,18 +442,12 @@ struct StartExecutionCallbackInfo { using StartExecutionCallback = std::function(const StartExecutionCallbackInfo&)>; -NODE_DEPRECATED("Use variants returning MaybeLocal<> instead", - NODE_EXTERN void LoadEnvironment(Environment* env)); -// The `InspectorParentHandle` arguments here are ignored and not used. -// For passing `InspectorParentHandle`, use `CreateEnvironment()`. NODE_EXTERN v8::MaybeLocal LoadEnvironment( Environment* env, - StartExecutionCallback cb, - std::unique_ptr ignored_donotuse_removeme = {}); + StartExecutionCallback cb); NODE_EXTERN v8::MaybeLocal LoadEnvironment( Environment* env, - const char* main_script_source_utf8, - std::unique_ptr ignored_donotuse_removeme = {}); + const char* main_script_source_utf8); NODE_EXTERN void FreeEnvironment(Environment* env); // Set a callback that is called when process.exit() is called from JS, @@ -494,6 +464,8 @@ NODE_EXTERN void DefaultProcessExitHandler(Environment* env, int exit_code); // This may return nullptr if context is not associated with a Node instance. NODE_EXTERN Environment* GetCurrentEnvironment(v8::Local context); +NODE_EXTERN IsolateData* GetEnvironmentIsolateData(Environment* env); +NODE_EXTERN ArrayBufferAllocator* GetArrayBufferAllocator(IsolateData* data); NODE_EXTERN void OnFatalError(const char* location, const char* message); NODE_EXTERN void PromiseRejectCallback(v8::PromiseRejectMessage message); @@ -505,25 +477,17 @@ NODE_EXTERN v8::MaybeLocal PrepareStackTraceCallback( v8::Local exception, v8::Local trace); -// This returns the MultiIsolatePlatform used in the main thread of Node.js. -// If NODE_USE_V8_PLATFORM has not been defined when Node.js was built, -// it returns nullptr. -NODE_DEPRECATED("Use GetMultiIsolatePlatform(env) instead", - NODE_EXTERN MultiIsolatePlatform* GetMainThreadMultiIsolatePlatform()); // This returns the MultiIsolatePlatform used for an Environment or IsolateData // instance, if one exists. NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(Environment* env); NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env); -// Legacy variants of MultiIsolatePlatform::Create(). -NODE_DEPRECATED("Use variant taking a v8::TracingController* pointer instead", +NODE_DEPRECATED("Use MultiIsolatePlatform::Create() instead", NODE_EXTERN MultiIsolatePlatform* CreatePlatform( int thread_pool_size, - node::tracing::TracingController* tracing_controller)); -NODE_EXTERN MultiIsolatePlatform* CreatePlatform( - int thread_pool_size, - v8::TracingController* tracing_controller); -NODE_EXTERN void FreePlatform(MultiIsolatePlatform* platform); + v8::TracingController* tracing_controller)); +NODE_DEPRECATED("Use MultiIsolatePlatform::Create() instead", + NODE_EXTERN void FreePlatform(MultiIsolatePlatform* platform)); // Get/set the currently active tracing controller. Using CreatePlatform() // will implicitly set this by default. This is global and should be initialized @@ -927,16 +891,6 @@ NODE_EXTERN void AddLinkedBinding(Environment* env, addon_context_register_func fn, void* priv); -/* Called after the event loop exits but before the VM is disposed. - * Callbacks are run in reverse order of registration, i.e. newest first. - * - * You should always use the three-argument variant (or, for addons, - * AddEnvironmentCleanupHook) in order to avoid relying on global state. - */ -NODE_DEPRECATED( - "Use the three-argument variant of AtExit() or AddEnvironmentCleanupHook()", - NODE_EXTERN void AtExit(void (*cb)(void* arg), void* arg = nullptr)); - /* Registers a callback with the passed-in Environment instance. The callback * is called after the event loop exits, but before the VM is disposed. * Callbacks are run in reverse order of registration, i.e. newest first. @@ -944,12 +898,6 @@ NODE_DEPRECATED( NODE_EXTERN void AtExit(Environment* env, void (*cb)(void* arg), void* arg); -NODE_DEPRECATED( - "Use the three-argument variant of AtExit() or AddEnvironmentCleanupHook()", - inline void AtExit(Environment* env, - void (*cb)(void* arg)) { - AtExit(env, cb, nullptr); - }) typedef double async_id; struct async_context { diff --git a/src/node_api.cc b/src/node_api.cc index 12f369a809734f..f1a5265b6a7234 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -1,12 +1,15 @@ +#include "async_wrap-inl.h" #include "env-inl.h" #define NAPI_EXPERIMENTAL #include "js_native_api_v8.h" +#include "memory_tracker-inl.h" #include "node_api.h" #include "node_binding.h" #include "node_buffer.h" #include "node_errors.h" #include "node_internals.h" #include "threadpoolwork-inl.h" +#include "tracing/traced_value.h" #include "util-inl.h" #include @@ -104,16 +107,6 @@ static inline napi_env NewEnv(v8::Local context) { return result; } -static inline napi_callback_scope -JsCallbackScopeFromV8CallbackScope(node::CallbackScope* s) { - return reinterpret_cast(s); -} - -static inline node::CallbackScope* -V8CallbackScopeFromJsCallbackScope(napi_callback_scope s) { - return reinterpret_cast(s); -} - static inline void trigger_fatal_exception( napi_env env, v8::Local local_err) { v8::Local local_msg = @@ -435,6 +428,111 @@ class ThreadSafeFunction : public node::AsyncResource { bool handles_closing; }; +/** + * Compared to node::AsyncResource, the resource object in AsyncContext is + * gc-able. AsyncContext holds a weak reference to the resource object. + * AsyncContext::MakeCallback doesn't implicitly set the receiver of the + * callback to the resource object. + */ +class AsyncContext { + public: + AsyncContext(node_napi_env env, + v8::Local resource_object, + const v8::Local resource_name, + bool externally_managed_resource) + : env_(env) { + async_id_ = node_env()->new_async_id(); + trigger_async_id_ = node_env()->get_default_trigger_async_id(); + resource_.Reset(node_env()->isolate(), resource_object); + lost_reference_ = false; + if (externally_managed_resource) { + resource_.SetWeak( + this, AsyncContext::WeakCallback, v8::WeakCallbackType::kParameter); + } + + node::AsyncWrap::EmitAsyncInit(node_env(), + resource_object, + resource_name, + async_id_, + trigger_async_id_); + } + + ~AsyncContext() { + resource_.Reset(); + lost_reference_ = true; + node::AsyncWrap::EmitDestroy(node_env(), async_id_); + } + + inline v8::MaybeLocal MakeCallback( + v8::Local recv, + const v8::Local callback, + int argc, + v8::Local argv[]) { + EnsureReference(); + return node::InternalMakeCallback(node_env(), + resource(), + recv, + callback, + argc, + argv, + {async_id_, trigger_async_id_}); + } + + inline napi_callback_scope OpenCallbackScope() { + EnsureReference(); + napi_callback_scope it = + reinterpret_cast(new CallbackScope(this)); + env_->open_callback_scopes++; + return it; + } + + inline void EnsureReference() { + if (lost_reference_) { + const v8::HandleScope handle_scope(node_env()->isolate()); + resource_.Reset(node_env()->isolate(), + v8::Object::New(node_env()->isolate())); + lost_reference_ = false; + } + } + + inline node::Environment* node_env() { return env_->node_env(); } + inline v8::Local resource() { + return resource_.Get(node_env()->isolate()); + } + inline node::async_context async_context() { + return {async_id_, trigger_async_id_}; + } + + static inline void CloseCallbackScope(node_napi_env env, + napi_callback_scope s) { + CallbackScope* callback_scope = reinterpret_cast(s); + delete callback_scope; + env->open_callback_scopes--; + } + + static void WeakCallback(const v8::WeakCallbackInfo& data) { + AsyncContext* async_context = data.GetParameter(); + async_context->resource_.Reset(); + async_context->lost_reference_ = true; + } + + private: + class CallbackScope : public node::CallbackScope { + public: + explicit CallbackScope(AsyncContext* async_context) + : node::CallbackScope(async_context->node_env()->isolate(), + async_context->resource_.Get( + async_context->node_env()->isolate()), + async_context->async_context()) {} + }; + + node_napi_env env_; + double async_id_; + double trigger_async_id_; + v8::Global resource_; + bool lost_reference_; +}; + } // end of anonymous namespace } // end of namespace v8impl @@ -627,7 +725,7 @@ NAPI_NO_RETURN void napi_fatal_error(const char* location, } napi_status napi_open_callback_scope(napi_env env, - napi_value resource_object, + napi_value /** ignored */, napi_async_context async_context_handle, napi_callback_scope* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw @@ -635,20 +733,11 @@ napi_status napi_open_callback_scope(napi_env env, CHECK_ENV(env); CHECK_ARG(env, result); - v8::Local context = env->context(); - - node::async_context* node_async_context = - reinterpret_cast(async_context_handle); - - v8::Local resource; - CHECK_TO_OBJECT(env, context, resource, resource_object); + v8impl::AsyncContext* node_async_context = + reinterpret_cast(async_context_handle); - *result = v8impl::JsCallbackScopeFromV8CallbackScope( - new node::CallbackScope(env->isolate, - resource, - *node_async_context)); + *result = node_async_context->OpenCallbackScope(); - env->open_callback_scopes++; return napi_clear_last_error(env); } @@ -661,8 +750,9 @@ napi_status napi_close_callback_scope(napi_env env, napi_callback_scope scope) { return napi_callback_scope_mismatch; } - env->open_callback_scopes--; - delete v8impl::V8CallbackScopeFromJsCallbackScope(scope); + v8impl::AsyncContext::CloseCallbackScope(reinterpret_cast(env), + scope); + return napi_clear_last_error(env); } @@ -678,20 +768,24 @@ napi_status napi_async_init(napi_env env, v8::Local context = env->context(); v8::Local v8_resource; + bool externally_managed_resource; if (async_resource != nullptr) { CHECK_TO_OBJECT(env, context, v8_resource, async_resource); + externally_managed_resource = true; } else { v8_resource = v8::Object::New(isolate); + externally_managed_resource = false; } v8::Local v8_resource_name; CHECK_TO_STRING(env, context, v8_resource_name, async_resource_name); - // TODO(jasongin): Consider avoiding allocation here by using - // a tagged pointer with 2×31 bit fields instead. - node::async_context* async_context = new node::async_context(); + auto async_context = + new v8impl::AsyncContext(reinterpret_cast(env), + v8_resource, + v8_resource_name, + externally_managed_resource); - *async_context = node::EmitAsyncInit(isolate, v8_resource, v8_resource_name); *result = reinterpret_cast(async_context); return napi_clear_last_error(env); @@ -702,11 +796,8 @@ napi_status napi_async_destroy(napi_env env, CHECK_ENV(env); CHECK_ARG(env, async_context); - node::async_context* node_async_context = - reinterpret_cast(async_context); - node::EmitAsyncDestroy( - reinterpret_cast(env)->node_env(), - *node_async_context); + v8impl::AsyncContext* node_async_context = + reinterpret_cast(async_context); delete node_async_context; @@ -734,17 +825,25 @@ napi_status napi_make_callback(napi_env env, v8::Local v8func; CHECK_TO_FUNCTION(env, v8func, func); - node::async_context* node_async_context = - reinterpret_cast(async_context); - if (node_async_context == nullptr) { - static node::async_context empty_context = { 0, 0 }; - node_async_context = &empty_context; - } + v8::MaybeLocal callback_result; - v8::MaybeLocal callback_result = node::MakeCallback( - env->isolate, v8recv, v8func, argc, - reinterpret_cast*>(const_cast(argv)), - *node_async_context); + if (async_context == nullptr) { + callback_result = node::MakeCallback( + env->isolate, + v8recv, + v8func, + argc, + reinterpret_cast*>(const_cast(argv)), + {0, 0}); + } else { + auto node_async_context = + reinterpret_cast(async_context); + callback_result = node_async_context->MakeCallback( + v8recv, + v8func, + argc, + reinterpret_cast*>(const_cast(argv))); + } if (try_catch.HasCaught()) { return napi_set_last_error(env, napi_pending_exception); @@ -1031,11 +1130,8 @@ napi_status napi_queue_async_work(napi_env env, napi_async_work work) { CHECK_ENV(env); CHECK_ARG(env, work); - napi_status status; uv_loop_t* event_loop = nullptr; - status = napi_get_uv_event_loop(env, &event_loop); - if (status != napi_ok) - return napi_set_last_error(env, status); + STATUS_CALL(napi_get_uv_event_loop(env, &event_loop)); uvimpl::Work* w = reinterpret_cast(work); diff --git a/src/node_buffer.cc b/src/node_buffer.cc index b2fa0ef20174a9..77efa7bae2fea5 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -424,12 +424,13 @@ MaybeLocal New(Environment* env, True(env->isolate())).IsNothing()) { return Local(); } - MaybeLocal ui = Buffer::New(env, ab, 0, length); + MaybeLocal maybe_ui = Buffer::New(env, ab, 0, length); - if (ui.IsEmpty()) + Local ui; + if (!maybe_ui.ToLocal(&ui)) return MaybeLocal(); - return scope.Escape(ui.ToLocalChecked()); + return scope.Escape(ui); } // Warning: This function needs `data` to be allocated with malloc() and not @@ -495,18 +496,19 @@ void StringSlice(const FunctionCallbackInfo& args) { size_t length = end - start; Local error; - MaybeLocal ret = + MaybeLocal maybe_ret = StringBytes::Encode(isolate, buffer.data() + start, length, encoding, &error); - if (ret.IsEmpty()) { + Local ret; + if (!maybe_ret.ToLocal(&ret)) { CHECK(!error.IsEmpty()); isolate->ThrowException(error); return; } - args.GetReturnValue().Set(ret.ToLocalChecked()); + args.GetReturnValue().Set(ret); } @@ -618,7 +620,7 @@ void Fill(const FunctionCallbackInfo& args) { nullptr); } - start_fill: +start_fill: if (str_length >= fill_length) return; diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 848e883a829a97..0accd99c0c4c5e 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -199,7 +199,9 @@ MaybeLocal ContextifyContext::CreateV8Context( object_template, {}, // global object {}, // deserialization callback - microtask_queue() ? microtask_queue().get() : nullptr); + microtask_queue() ? + microtask_queue().get() : + env->isolate()->GetCurrentContext()->GetMicrotaskQueue()); if (ctx.IsEmpty()) return MaybeLocal(); // Only partially initialize the context - the primordials are left out // and only initialized when necessary. @@ -933,6 +935,7 @@ bool ContextifyScript::EvalMachine(Environment* env, return false; } TryCatchScope try_catch(env); + Isolate::SafeForTerminationScope safe_for_termination(env->isolate()); ContextifyScript* wrapped_script; ASSIGN_OR_RETURN_UNWRAP(&wrapped_script, args.Holder(), false); Local unbound_script = diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 0c1dbcc52d748c..d25387f1425daa 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -58,13 +58,16 @@ void Initialize(Local target, PBKDF2Job::Initialize(env, target); Random::Initialize(env, target); RSAAlg::Initialize(env, target); - ScryptJob::Initialize(env, target); SecureContext::Initialize(env, target); Sign::Initialize(env, target); SPKAC::Initialize(env, target); Timing::Initialize(env, target); Util::Initialize(env, target); Verify::Initialize(env, target); + +#ifndef OPENSSL_NO_SCRYPT + ScryptJob::Initialize(env, target); +#endif } } // namespace crypto diff --git a/src/node_env_var.cc b/src/node_env_var.cc index 1cf959a6095afd..e6d9573ca7ccef 100644 --- a/src/node_env_var.cc +++ b/src/node_env_var.cc @@ -10,6 +10,8 @@ namespace node { using v8::Array; using v8::Boolean; using v8::Context; +using v8::DontDelete; +using v8::DontEnum; using v8::EscapableHandleScope; using v8::HandleScope; using v8::Integer; @@ -26,6 +28,7 @@ using v8::Object; using v8::ObjectTemplate; using v8::PropertyCallbackInfo; using v8::PropertyHandlerFlags; +using v8::ReadOnly; using v8::String; using v8::Value; @@ -93,10 +96,10 @@ Maybe RealEnvStore::Get(const char* key) const { } if (ret >= 0) { // Env key value fetch success. - return v8::Just(std::string(*val, init_sz)); + return Just(std::string(*val, init_sz)); } - return v8::Nothing(); + return Nothing(); } MaybeLocal RealEnvStore::Get(Isolate* isolate, @@ -141,9 +144,9 @@ int32_t RealEnvStore::Query(const char* key) const { #ifdef _WIN32 if (key[0] == '=') { - return static_cast(v8::ReadOnly) | - static_cast(v8::DontDelete) | - static_cast(v8::DontEnum); + return static_cast(ReadOnly) | + static_cast(DontDelete) | + static_cast(DontEnum); } #endif @@ -176,9 +179,7 @@ Local RealEnvStore::Enumerate(Isolate* isolate) const { for (int i = 0; i < count; i++) { #ifdef _WIN32 // If the key starts with '=' it is a hidden environment variable. - // The '\0' check is a workaround for the bug behind - // https://github.com/libuv/libuv/pull/2473 and can be removed later. - if (items[i].name[0] == '=' || items[i].name[0] == '\0') continue; + if (items[i].name[0] == '=') continue; #endif MaybeLocal str = String::NewFromUtf8(isolate, items[i].name); if (str.IsEmpty()) { @@ -191,7 +192,7 @@ Local RealEnvStore::Enumerate(Isolate* isolate) const { return Array::New(isolate, env_v.out(), env_v_index); } -std::shared_ptr KVStore::Clone(v8::Isolate* isolate) const { +std::shared_ptr KVStore::Clone(Isolate* isolate) const { HandleScope handle_scope(isolate); Local context = isolate->GetCurrentContext(); @@ -211,7 +212,7 @@ std::shared_ptr KVStore::Clone(v8::Isolate* isolate) const { Maybe MapKVStore::Get(const char* key) const { Mutex::ScopedLock lock(mutex_); auto it = map_.find(key); - return it == map_.end() ? v8::Nothing() : v8::Just(it->second); + return it == map_.end() ? Nothing() : Just(it->second); } MaybeLocal MapKVStore::Get(Isolate* isolate, Local key) const { diff --git a/src/node_errors.cc b/src/node_errors.cc index dc6d20b500c655..3107f46b4dc652 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -63,7 +63,7 @@ static std::string GetErrorSource(Isolate* isolate, Environment* env = Environment::GetCurrent(isolate); const bool has_source_map_url = !message->GetScriptOrigin().SourceMapUrl().IsEmpty(); - if (has_source_map_url && env->source_maps_enabled()) { + if (has_source_map_url && env != nullptr && env->source_maps_enabled()) { return sourceline; } @@ -954,7 +954,7 @@ void TriggerUncaughtException(Isolate* isolate, return; } - MaybeLocal handled; + MaybeLocal maybe_handled; if (env->can_call_into_js()) { // We do not expect the global uncaught exception itself to throw any more // exceptions. If it does, exit the current Node.js instance. @@ -968,7 +968,7 @@ void TriggerUncaughtException(Isolate* isolate, Local argv[2] = { error, Boolean::New(env->isolate(), from_promise) }; - handled = fatal_exception_function.As()->Call( + maybe_handled = fatal_exception_function.As()->Call( env->context(), process_object, arraysize(argv), argv); } @@ -976,7 +976,8 @@ void TriggerUncaughtException(Isolate* isolate, // instance so return to continue the exit routine. // TODO(joyeecheung): return a Maybe here to prevent the caller from // stepping on the exit. - if (handled.IsEmpty()) { + Local handled; + if (!maybe_handled.ToLocal(&handled)) { return; } @@ -986,7 +987,7 @@ void TriggerUncaughtException(Isolate* isolate, // TODO(joyeecheung): This has been only checking that the return value is // exactly false. Investigate whether this can be turned to an "if true" // similar to how the worker global uncaught exception handler handles it. - if (!handled.ToLocalChecked()->IsFalse()) { + if (!handled->IsFalse()) { return; } diff --git a/src/node_file.cc b/src/node_file.cc index de5c455c7a2a85..6e32ec28b6a2ed 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -288,6 +288,7 @@ inline void FileHandle::Close() { void FileHandle::CloseReq::Resolve() { Isolate* isolate = env()->isolate(); HandleScope scope(isolate); + Context::Scope context_scope(env()->context()); InternalCallbackScope callback_scope(this); Local promise = promise_.Get(isolate); Local resolver = promise.As(); @@ -297,6 +298,7 @@ void FileHandle::CloseReq::Resolve() { void FileHandle::CloseReq::Reject(Local reason) { Isolate* isolate = env()->isolate(); HandleScope scope(isolate); + Context::Scope context_scope(env()->context()); InternalCallbackScope callback_scope(this); Local promise = promise_.Get(isolate); Local resolver = promise.As(); @@ -1944,7 +1946,7 @@ static void WriteString(const FunctionCallbackInfo& args) { auto ext = string->GetExternalOneByteStringResource(); buf = const_cast(ext->data()); len = ext->length(); - } else if (enc == UCS2 && IsLittleEndian() && string->IsExternal()) { + } else if (enc == UCS2 && IsLittleEndian() && string->IsExternalTwoByte()) { auto ext = string->GetExternalStringResource(); buf = reinterpret_cast(const_cast(ext->data())); len = ext->length() * sizeof(*ext->data()); @@ -2534,6 +2536,9 @@ void Initialize(Local target, use_promises_symbol).Check(); } +BindingData* FSReqBase::binding_data() { + return binding_data_.get(); +} } // namespace fs } // end namespace node diff --git a/src/node_file.h b/src/node_file.h index 2b157de5eb485d..95a68b5d89a704 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -109,7 +109,7 @@ class FSReqBase : public ReqWrap { void MemoryInfo(MemoryTracker* tracker) const override; - BindingData* binding_data() { return binding_data_.get(); } + BindingData* binding_data(); private: std::unique_ptr continuation_data_; diff --git a/src/node_http2.cc b/src/node_http2.cc index 5b860a61119d02..1e2da918bf5b69 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -88,7 +88,8 @@ Http2Scope::Http2Scope(Http2Session* session) : session_(session) { Http2Scope::~Http2Scope() { if (!session_) return; session_->set_in_scope(false); - session_->MaybeScheduleWrite(); + if (!session_->is_write_scheduled()) + session_->MaybeScheduleWrite(); } // The Http2Options object is used during the construction of Http2Session @@ -1136,7 +1137,7 @@ int Http2Session::OnNghttpError(nghttp2_session* handle, // Unfortunately, this is currently the only way for us to know if // the session errored because the peer is not an http2 peer. Http2Session* session = static_cast(user_data); - Debug(session, "Error '%.*s'", len, message); + Debug(session, "Error '%s'", message); if (strncmp(message, BAD_PEER_MESSAGE, len) == 0) { Environment* env = session->env(); Isolate* isolate = env->isolate(); @@ -1829,6 +1830,33 @@ void Http2Session::Consume(Local stream_obj) { Debug(this, "i/o stream consumed"); } +// Allow injecting of data from JS +// This is used when the socket has already some data received +// before our listener was attached +// https://github.com/nodejs/node/issues/35475 +void Http2Session::Receive(const FunctionCallbackInfo& args) { + Http2Session* session; + ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder()); + CHECK(args[0]->IsObject()); + + ArrayBufferViewContents buffer(args[0]); + const char* data = buffer.data(); + size_t len = buffer.length(); + Debug(session, "Receiving %zu bytes injected from JS", len); + + // Copy given buffer + while (len > 0) { + uv_buf_t buf = session->OnStreamAlloc(len); + size_t copy = buf.len > len ? len : buf.len; + memcpy(buf.base, data, copy); + buf.len = copy; + session->OnStreamRead(copy, buf); + + data += copy; + len -= copy; + } +} + Http2Stream* Http2Stream::New(Http2Session* session, int32_t id, nghttp2_headers_category category, @@ -2389,6 +2417,25 @@ void Http2Session::SetNextStreamID(const FunctionCallbackInfo& args) { Debug(session, "set next stream id to %d", id); } +// Set local window size (local endpoints's window size) to the given +// window_size for the stream denoted by 0. +// This function returns 0 if it succeeds, or one of a negative codes +void Http2Session::SetLocalWindowSize( + const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + Http2Session* session; + ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder()); + + int32_t window_size = args[0]->Int32Value(env->context()).ToChecked(); + + int result = nghttp2_session_set_local_window_size( + session->session(), NGHTTP2_FLAG_NONE, 0, window_size); + + args.GetReturnValue().Set(result); + + Debug(session, "set local window size to %d", window_size); +} + // A TypedArray instance is shared between C++ and JS land to contain the // SETTINGS (either remote or local). RefreshSettings updates the current // values established for each of the settings so those can be read in JS land. @@ -3054,12 +3101,15 @@ void Initialize(Local target, env->SetProtoMethod(session, "altsvc", Http2Session::AltSvc); env->SetProtoMethod(session, "ping", Http2Session::Ping); env->SetProtoMethod(session, "consume", Http2Session::Consume); + env->SetProtoMethod(session, "receive", Http2Session::Receive); env->SetProtoMethod(session, "destroy", Http2Session::Destroy); env->SetProtoMethod(session, "goaway", Http2Session::Goaway); env->SetProtoMethod(session, "settings", Http2Session::Settings); env->SetProtoMethod(session, "request", Http2Session::Request); env->SetProtoMethod(session, "setNextStreamID", Http2Session::SetNextStreamID); + env->SetProtoMethod(session, "setLocalWindowSize", + Http2Session::SetLocalWindowSize); env->SetProtoMethod(session, "updateChunksSent", Http2Session::UpdateChunksSent); env->SetProtoMethod(session, "refreshState", Http2Session::RefreshState); diff --git a/src/node_http2.h b/src/node_http2.h index 79cbe7613b5f6a..9c7ffce2c41955 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -694,10 +694,13 @@ class Http2Session : public AsyncWrap, // The JavaScript API static void New(const v8::FunctionCallbackInfo& args); static void Consume(const v8::FunctionCallbackInfo& args); + static void Receive(const v8::FunctionCallbackInfo& args); static void Destroy(const v8::FunctionCallbackInfo& args); static void Settings(const v8::FunctionCallbackInfo& args); static void Request(const v8::FunctionCallbackInfo& args); static void SetNextStreamID(const v8::FunctionCallbackInfo& args); + static void SetLocalWindowSize( + const v8::FunctionCallbackInfo& args); static void Goaway(const v8::FunctionCallbackInfo& args); static void UpdateChunksSent(const v8::FunctionCallbackInfo& args); static void RefreshState(const v8::FunctionCallbackInfo& args); @@ -1114,6 +1117,7 @@ class Origins { V(NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE) \ V(NGHTTP2_ERR_INVALID_ARGUMENT) \ V(NGHTTP2_ERR_STREAM_CLOSED) \ + V(NGHTTP2_ERR_NOMEM) \ V(STREAM_OPTION_EMPTY_PAYLOAD) \ V(STREAM_OPTION_GET_TRAILERS) diff --git a/src/node_internals.h b/src/node_internals.h index aa7180e18544ca..b75092d662dc97 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -200,6 +200,12 @@ v8::MaybeLocal InternalMakeCallback( v8::Local argv[], async_context asyncContext); +v8::MaybeLocal MakeSyncCallback(v8::Isolate* isolate, + v8::Local recv, + v8::Local callback, + int argc, + v8::Local argv[]); + class InternalCallbackScope { public: enum Flags { @@ -363,6 +369,10 @@ class DiagnosticFilename { std::string filename_; }; +namespace heap { +bool WriteSnapshot(v8::Isolate* isolate, const char* filename); +} + class TraceEventScope { public: TraceEventScope(const char* category, diff --git a/src/node_main_instance.cc b/src/node_main_instance.cc index d406bf15444bf8..07277ccfa5c167 100644 --- a/src/node_main_instance.cc +++ b/src/node_main_instance.cc @@ -108,6 +108,8 @@ NodeMainInstance::NodeMainInstance( // complete. SetIsolateErrorHandlers(isolate_, s); } + isolate_data_->max_young_gen_size = + params->constraints.max_young_generation_size_in_bytes(); } void NodeMainInstance::Dispose() { @@ -137,7 +139,7 @@ int NodeMainInstance::Run(const EnvSerializeInfo* env_info) { Context::Scope context_scope(env->context()); if (exit_code == 0) { - LoadEnvironment(env.get()); + LoadEnvironment(env.get(), StartExecutionCallback{}); exit_code = SpinEventLoop(env.get()).FromMaybe(1); } diff --git a/src/node_messaging.cc b/src/node_messaging.cc index db3c24c3f853e6..5f054c41c8eb04 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -157,11 +157,9 @@ MaybeLocal Message::Deserialize(Environment* env, // Attach all transferred SharedArrayBuffers to their new Isolate. for (uint32_t i = 0; i < shared_array_buffers_.size(); ++i) { Local sab = - SharedArrayBuffer::New(env->isolate(), - std::move(shared_array_buffers_[i])); + SharedArrayBuffer::New(env->isolate(), shared_array_buffers_[i]); shared_array_buffers.push_back(sab); } - shared_array_buffers_.clear(); DeserializerDelegate delegate( this, env, host_objects, shared_array_buffers, wasm_modules_); @@ -178,7 +176,6 @@ MaybeLocal Message::Deserialize(Environment* env, ArrayBuffer::New(env->isolate(), std::move(array_buffers_[i])); deserializer.TransferArrayBuffer(i, ab); } - array_buffers_.clear(); if (deserializer.ReadHeader(context).IsNothing()) return {}; @@ -517,7 +514,9 @@ void Message::MemoryInfo(MemoryTracker* tracker) const { tracker->TrackField("transferables", transferables_); } -MessagePortData::MessagePortData(MessagePort* owner) : owner_(owner) { } +MessagePortData::MessagePortData(MessagePort* owner) + : owner_(owner) { +} MessagePortData::~MessagePortData() { CHECK_NULL(owner_); @@ -529,7 +528,7 @@ void MessagePortData::MemoryInfo(MemoryTracker* tracker) const { tracker->TrackField("incoming_messages", incoming_messages_); } -void MessagePortData::AddToIncomingQueue(Message&& message) { +void MessagePortData::AddToIncomingQueue(std::shared_ptr message) { // This function will be called by other threads. Mutex::ScopedLock lock(mutex_); incoming_messages_.emplace_back(std::move(message)); @@ -541,32 +540,13 @@ void MessagePortData::AddToIncomingQueue(Message&& message) { } void MessagePortData::Entangle(MessagePortData* a, MessagePortData* b) { - CHECK_NULL(a->sibling_); - CHECK_NULL(b->sibling_); - a->sibling_ = b; - b->sibling_ = a; - a->sibling_mutex_ = b->sibling_mutex_; + auto group = std::make_shared(); + group->Entangle({a, b}); } void MessagePortData::Disentangle() { - // Grab a copy of the sibling mutex, then replace it so that each sibling - // has its own sibling_mutex_ now. - std::shared_ptr sibling_mutex = sibling_mutex_; - Mutex::ScopedLock sibling_lock(*sibling_mutex); - sibling_mutex_ = std::make_shared(); - - MessagePortData* sibling = sibling_; - if (sibling_ != nullptr) { - sibling_->sibling_ = nullptr; - sibling_ = nullptr; - } - - // We close MessagePorts after disentanglement, so we enqueue a corresponding - // message and trigger the corresponding uv_async_t to let them know that - // this happened. - AddToIncomingQueue(Message()); - if (sibling != nullptr) { - sibling->AddToIncomingQueue(Message()); + if (group_) { + group_->Disentangle(this); } } @@ -647,7 +627,8 @@ void MessagePort::New(const FunctionCallbackInfo& args) { MessagePort* MessagePort::New( Environment* env, Local context, - std::unique_ptr data) { + std::unique_ptr data, + std::shared_ptr sibling_group) { Context::Scope context_scope(context); Local ctor_templ = GetMessagePortConstructorTemplate(env); @@ -664,6 +645,7 @@ MessagePort* MessagePort::New( } if (data) { + CHECK(!sibling_group); port->Detach(); port->data_ = std::move(data); @@ -675,13 +657,15 @@ MessagePort* MessagePort::New( // If the existing MessagePortData object had pending messages, this is // the easiest way to run that queue. port->TriggerAsync(); + } else if (sibling_group) { + sibling_group->Entangle(port->data_.get()); } return port; } MaybeLocal MessagePort::ReceiveMessage(Local context, bool only_if_receiving) { - Message received; + std::shared_ptr received; { // Get the head of the message queue. Mutex::ScopedLock lock(data_->mutex_); @@ -695,22 +679,22 @@ MaybeLocal MessagePort::ReceiveMessage(Local context, // receive is not the final "close" message. if (data_->incoming_messages_.empty() || (!wants_message && - !data_->incoming_messages_.front().IsCloseMessage())) { + !data_->incoming_messages_.front()->IsCloseMessage())) { return env()->no_message_symbol(); } - received = std::move(data_->incoming_messages_.front()); + received = data_->incoming_messages_.front(); data_->incoming_messages_.pop_front(); } - if (received.IsCloseMessage()) { + if (received->IsCloseMessage()) { Close(); return env()->no_message_symbol(); } if (!env()->can_call_into_js()) return MaybeLocal(); - return received.Deserialize(env(), context); + return received->Deserialize(env(), context); } void MessagePort::OnMessage() { @@ -829,13 +813,13 @@ Maybe MessagePort::PostMessage(Environment* env, Local obj = object(isolate); Local context = obj->CreationContext(); - Message msg; + std::shared_ptr msg = std::make_shared(); // Per spec, we need to both check if transfer list has the source port, and // serialize the input message, even if the MessagePort is closed or detached. Maybe serialization_maybe = - msg.Serialize(env, context, message_v, transfer_v, obj); + msg->Serialize(env, context, message_v, transfer_v, obj); if (data_ == nullptr) { return serialization_maybe; } @@ -843,26 +827,26 @@ Maybe MessagePort::PostMessage(Environment* env, return Nothing(); } - Mutex::ScopedLock lock(*data_->sibling_mutex_); - bool doomed = false; + std::string error; + Maybe res = data_->Dispatch(msg, &error); + if (res.IsNothing()) + return res; - // Check if the target port is posted to itself. - if (data_->sibling_ != nullptr) { - for (const auto& transferable : msg.transferables()) { - if (data_->sibling_ == transferable.get()) { - doomed = true; - ProcessEmitWarning(env, "The target port was posted to itself, and " - "the communication channel was lost"); - break; - } - } - } + if (!error.empty()) + ProcessEmitWarning(env, error.c_str()); - if (data_->sibling_ == nullptr || doomed) - return Just(true); + return res; +} - data_->sibling_->AddToIncomingQueue(std::move(msg)); - return Just(true); +Maybe MessagePortData::Dispatch( + std::shared_ptr message, + std::string* error) { + if (!group_) { + if (error != nullptr) + *error = "MessagePortData is not entangled."; + return Nothing(); + } + return group_->Dispatch(this, message, error); } static Maybe ReadIterable(Environment* env, @@ -969,7 +953,9 @@ void MessagePort::PostMessage(const FunctionCallbackInfo& args) { return; } - port->PostMessage(env, args[0], transfer_list); + Maybe res = port->PostMessage(env, args[0], transfer_list); + if (res.IsJust()) + args.GetReturnValue().Set(res.FromJust()); } void MessagePort::Start() { @@ -1067,7 +1053,7 @@ void MessagePort::MoveToContext(const FunctionCallbackInfo& args) { } void MessagePort::Entangle(MessagePort* a, MessagePort* b) { - Entangle(a, b->data_.get()); + MessagePortData::Entangle(a->data_.get(), b->data_.get()); } void MessagePort::Entangle(MessagePort* a, MessagePortData* b) { @@ -1273,6 +1259,108 @@ Maybe JSTransferable::Data::FinalizeTransferWrite( return ret; } +std::shared_ptr SiblingGroup::Get(const std::string& name) { + Mutex::ScopedLock lock(SiblingGroup::groups_mutex_); + std::shared_ptr group; + auto i = groups_.find(name); + if (i == groups_.end() || i->second.expired()) { + group = std::make_shared(name); + groups_[name] = group; + } else { + group = i->second.lock(); + } + return group; +} + +void SiblingGroup::CheckSiblingGroup(const std::string& name) { + Mutex::ScopedLock lock(SiblingGroup::groups_mutex_); + auto i = groups_.find(name); + if (i != groups_.end() && i->second.expired()) + groups_.erase(name); +} + +SiblingGroup::SiblingGroup(const std::string& name) + : name_(name) { } + +SiblingGroup::~SiblingGroup() { + // If this is a named group, check to see if we can remove the group + if (!name_.empty()) + CheckSiblingGroup(name_); +} + +Maybe SiblingGroup::Dispatch( + MessagePortData* source, + std::shared_ptr message, + std::string* error) { + + Mutex::ScopedLock lock(group_mutex_); + + // The source MessagePortData is not part of this group. + if (ports_.find(source) == ports_.end()) { + if (error != nullptr) + *error = "Source MessagePort is not entangled with this group."; + return Nothing(); + } + + // There are no destination ports. + if (size() <= 1) + return Just(false); + + // Transferables cannot be used when there is more + // than a single destination. + if (size() > 2 && message->has_transferables()) { + if (error != nullptr) + *error = "Transferables cannot be used with multiple destinations."; + return Nothing(); + } + + for (MessagePortData* port : ports_) { + if (port == source) + continue; + // This loop should only be entered if there's only a single destination + for (const auto& transferable : message->transferables()) { + if (port == transferable.get()) { + if (error != nullptr) { + *error = "The target port was posted to itself, and the " + "communication channel was lost"; + } + return Just(true); + } + } + port->AddToIncomingQueue(message); + } + + return Just(true); +} + +void SiblingGroup::Entangle(MessagePortData* port) { + Entangle({ port }); +} + +void SiblingGroup::Entangle(std::initializer_list ports) { + Mutex::ScopedLock lock(group_mutex_); + for (MessagePortData* data : ports) { + ports_.insert(data); + CHECK(!data->group_); + data->group_ = shared_from_this(); + } +} + +void SiblingGroup::Disentangle(MessagePortData* data) { + auto self = shared_from_this(); // Keep alive until end of function. + Mutex::ScopedLock lock(group_mutex_); + ports_.erase(data); + data->group_.reset(); + + data->AddToIncomingQueue(std::make_shared()); + // If this is an anonymous group and there's another port, close it. + if (size() == 1 && name_.empty()) + (*(ports_.begin()))->AddToIncomingQueue(std::make_shared()); +} + +SiblingGroup::Map SiblingGroup::groups_; +Mutex SiblingGroup::groups_mutex_; + namespace { static void SetDeserializerCreateObjectFunction( @@ -1308,6 +1396,18 @@ static void MessageChannel(const FunctionCallbackInfo& args) { .Check(); } +static void BroadcastChannel(const FunctionCallbackInfo& args) { + CHECK(args[0]->IsString()); + Environment* env = Environment::GetCurrent(args); + Context::Scope context_scope(env->context()); + Utf8Value name(env->isolate(), args[0]); + MessagePort* port = + MessagePort::New(env, env->context(), {}, SiblingGroup::Get(*name)); + if (port != nullptr) { + args.GetReturnValue().Set(port->object()); + } +} + static void InitMessaging(Local target, Local unused, Local context, @@ -1352,6 +1452,7 @@ static void InitMessaging(Local target, MessagePort::MoveToContext); env->SetMethod(target, "setDeserializerCreateObjectFunction", SetDeserializerCreateObjectFunction); + env->SetMethod(target, "broadcastChannel", BroadcastChannel); { Local domexception = GetDOMException(context).ToLocalChecked(); @@ -1365,6 +1466,7 @@ static void InitMessaging(Local target, static void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(MessageChannel); + registry->Register(BroadcastChannel); registry->Register(JSTransferable::New); registry->Register(MessagePort::New); registry->Register(MessagePort::PostMessage); diff --git a/src/node_messaging.h b/src/node_messaging.h index 7ef02226480cb8..ad06565977215c 100644 --- a/src/node_messaging.h +++ b/src/node_messaging.h @@ -5,7 +5,11 @@ #include "env.h" #include "node_mutex.h" -#include +#include "v8.h" +#include +#include +#include +#include namespace node { namespace worker { @@ -16,7 +20,7 @@ class MessagePort; typedef MaybeStackBuffer, 8> TransferList; // Used to represent the in-flight structure of an object that is being -// transfered or cloned using postMessage(). +// transferred or cloned using postMessage(). class TransferData : public MemoryRetainer { public: // Deserialize this object on the receiving end after a .postMessage() call. @@ -45,6 +49,7 @@ class Message : public MemoryRetainer { // V8 ValueSerializer API. If `payload` is empty, this message indicates // that the receiving message port should close itself. explicit Message(MallocedBuffer&& payload = MallocedBuffer()); + ~Message() = default; Message(Message&& other) = default; Message& operator=(Message&& other) = default; @@ -89,6 +94,9 @@ class Message : public MemoryRetainer { const std::vector>& transferables() const { return transferables_; } + bool has_transferables() const { + return !transferables_.empty() || !array_buffers_.empty(); + } void MemoryInfo(MemoryTracker* tracker) const override; @@ -105,6 +113,51 @@ class Message : public MemoryRetainer { friend class MessagePort; }; +class SiblingGroup final : public std::enable_shared_from_this { + public: + // Named SiblingGroup, Used for one-to-many BroadcastChannels. + static std::shared_ptr Get(const std::string& name); + + // Anonymous SiblingGroup, Used for one-to-one MessagePort pairs. + SiblingGroup() = default; + explicit SiblingGroup(const std::string& name); + ~SiblingGroup(); + + // Dispatches the Message to the collection of associated + // ports. If there is more than one destination port and + // the Message contains transferables, Dispatch will fail. + // Returns Just(true) if successful and the message was + // dispatched to at least one destination. Returns Just(false) + // if there were no destinations. Returns Nothing() + // if there was an error. If error is not nullptr, it will + // be set to an error message or warning message as appropriate. + v8::Maybe Dispatch( + MessagePortData* source, + std::shared_ptr message, + std::string* error = nullptr); + + void Entangle(MessagePortData* data); + void Entangle(std::initializer_list data); + void Disentangle(MessagePortData* data); + + const std::string& name() const { return name_; } + + size_t size() const { return ports_.size(); } + + private: + std::string name_; + std::set ports_; + Mutex group_mutex_; + + static void CheckSiblingGroup(const std::string& name); + + using Map = + std::unordered_map>; + + static Mutex groups_mutex_; + static Map groups_; +}; + // This contains all data for a `MessagePort` instance that is not tied to // a specific Environment/Isolate/event loop, for easier transfer between those. class MessagePortData : public TransferData { @@ -119,7 +172,10 @@ class MessagePortData : public TransferData { // Add a message to the incoming queue and notify the receiver. // This may be called from any thread. - void AddToIncomingQueue(Message&& message); + void AddToIncomingQueue(std::shared_ptr message); + v8::Maybe Dispatch( + std::shared_ptr message, + std::string* error = nullptr); // Turns `a` and `b` into siblings, i.e. connects the sending side of one // to the receiving side of the other. This is not thread-safe. @@ -144,15 +200,11 @@ class MessagePortData : public TransferData { // This mutex protects all fields below it, with the exception of // sibling_. mutable Mutex mutex_; - std::list incoming_messages_; + std::deque> incoming_messages_; MessagePort* owner_ = nullptr; - // This mutex protects the sibling_ field and is shared between two entangled - // MessagePorts. If both mutexes are acquired, this one needs to be - // acquired first. - std::shared_ptr sibling_mutex_ = std::make_shared(); - MessagePortData* sibling_ = nullptr; - + std::shared_ptr group_; friend class MessagePort; + friend class SiblingGroup; }; // A message port that receives messages from other threads, including @@ -175,7 +227,8 @@ class MessagePort : public HandleWrap { // `MessagePortData` object. static MessagePort* New(Environment* env, v8::Local context, - std::unique_ptr data = nullptr); + std::unique_ptr data = {}, + std::shared_ptr sibling_group = {}); // Send a message, i.e. deliver it into the sibling's incoming queue. // If this port is closed, or if there is no sibling, this message is diff --git a/src/node_options.cc b/src/node_options.cc index 4fb4f455c47b00..e90dcd93231fca 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -118,6 +118,10 @@ void EnvironmentOptions::CheckOptions(std::vector* errors) { "used, not both"); } + if (heap_snapshot_near_heap_limit < 0) { + errors->push_back("--heap-snapshot-near-heap-limit must not be negative"); + } + #if HAVE_INSPECTOR if (!cpu_prof) { if (!cpu_prof_name.empty()) { @@ -341,6 +345,12 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "Generate heap snapshot on specified signal", &EnvironmentOptions::heap_snapshot_signal, kAllowedInEnvironment); + AddOption("--heapsnapshot-near-heap-limit", + "Generate heap snapshots whenever V8 is approaching " + "the heap limit. No more than the specified number of " + "heap snapshots will be generated.", + &EnvironmentOptions::heap_snapshot_near_heap_limit, + kAllowedInEnvironment); AddOption("--http-parser", "", NoOp{}, kAllowedInEnvironment); AddOption("--insecure-http-parser", "use an insecure HTTP parser that accepts invalid HTTP headers", @@ -385,6 +395,9 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "preserve symbolic links when resolving the main module", &EnvironmentOptions::preserve_symlinks_main, kAllowedInEnvironment); + AddOption("--prof", + "Generate V8 profiler output.", + V8Option{}); AddOption("--prof-process", "process V8 profiler output generated using --prof", &EnvironmentOptions::prof_process); diff --git a/src/node_options.h b/src/node_options.h index e8051f64bc3f38..84ee8e34bcafcf 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -115,6 +115,7 @@ class EnvironmentOptions : public Options { bool experimental_vm_modules = false; bool expose_internals = false; bool frozen_intrinsics = false; + int64_t heap_snapshot_near_heap_limit = 0; std::string heap_snapshot_signal; uint64_t max_http_header_size = 16 * 1024; bool no_deprecation = false; diff --git a/src/node_perf.cc b/src/node_perf.cc index 5fa4eabc9934de..1eddb00f48a6d2 100644 --- a/src/node_perf.cc +++ b/src/node_perf.cc @@ -159,11 +159,10 @@ void PerformanceEntry::Notify(Environment* env, AliasedUint32Array& observers = env->performance_state()->observers; if (!env->performance_entry_callback().IsEmpty() && type != NODE_PERFORMANCE_ENTRY_TYPE_INVALID && observers[type]) { - node::MakeCallback(env->isolate(), - object.As(), - env->performance_entry_callback(), - 1, &object, - node::async_context{0, 0}); + node::MakeSyncCallback(env->isolate(), + object.As(), + env->performance_entry_callback(), + 1, &object); } } diff --git a/src/node_perf_common.h b/src/node_perf_common.h index 5dc77c6fe91ef9..edc142d351268d 100644 --- a/src/node_perf_common.h +++ b/src/node_perf_common.h @@ -57,9 +57,9 @@ enum PerformanceEntryType { class PerformanceState { public: struct SerializeInfo { - AliasedBufferInfo root; - AliasedBufferInfo milestones; - AliasedBufferInfo observers; + AliasedBufferIndex root; + AliasedBufferIndex milestones; + AliasedBufferIndex observers; }; explicit PerformanceState(v8::Isolate* isolate, const SerializeInfo* info); diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index 6e7b1c929468c9..40164fc990ebfb 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -34,12 +34,17 @@ typedef int mode_t; namespace node { +using v8::ApiObject; using v8::Array; using v8::ArrayBuffer; using v8::BackingStore; +using v8::CFunction; +using v8::ConstructorBehavior; using v8::Context; using v8::Float64Array; using v8::FunctionCallbackInfo; +using v8::FunctionTemplate; +using v8::Global; using v8::HeapStatistics; using v8::Integer; using v8::Isolate; @@ -47,6 +52,9 @@ using v8::Local; using v8::NewStringType; using v8::Number; using v8::Object; +using v8::ObjectTemplate; +using v8::SideEffectType; +using v8::Signature; using v8::String; using v8::Uint32; using v8::Value; @@ -89,6 +97,16 @@ static void Chdir(const FunctionCallbackInfo& args) { } } +inline Local get_fields_array_buffer( + const FunctionCallbackInfo& args, + size_t index, + size_t array_length) { + CHECK(args[index]->IsFloat64Array()); + Local arr = args[index].As(); + CHECK_EQ(arr->Length(), array_length); + return arr->Buffer(); +} + // CPUUsage use libuv's uv_getrusage() this-process resource usage accessor, // to access ru_utime (user CPU time used) and ru_stime (system CPU time used), // which are uv_timeval_t structs (long tv_sec, long tv_usec). @@ -104,10 +122,7 @@ static void CPUUsage(const FunctionCallbackInfo& args) { return env->ThrowUVException(err, "uv_getrusage"); // Get the double array pointer from the Float64Array argument. - CHECK(args[0]->IsFloat64Array()); - Local array = args[0].As(); - CHECK_EQ(array->Length(), 2); - Local ab = array->Buffer(); + Local ab = get_fields_array_buffer(args, 0, 2); double* fields = static_cast(ab->GetBackingStore()->Data()); // Set the Float64Array elements to be user / system values in microseconds. @@ -174,10 +189,7 @@ static void MemoryUsage(const FunctionCallbackInfo& args) { env->isolate_data()->node_allocator(); // Get the double array pointer from the Float64Array argument. - CHECK(args[0]->IsFloat64Array()); - Local array = args[0].As(); - CHECK_EQ(array->Length(), 5); - Local ab = array->Buffer(); + Local ab = get_fields_array_buffer(args, 0, 5); double* fields = static_cast(ab->GetBackingStore()->Data()); fields[0] = rss; @@ -263,10 +275,7 @@ static void ResourceUsage(const FunctionCallbackInfo& args) { if (err) return env->ThrowUVException(err, "uv_getrusage"); - CHECK(args[0]->IsFloat64Array()); - Local array = args[0].As(); - CHECK_EQ(array->Length(), 16); - Local ab = array->Buffer(); + Local ab = get_fields_array_buffer(args, 0, 16); double* fields = static_cast(ab->GetBackingStore()->Data()); fields[0] = MICROS_PER_SEC * rusage.ru_utime.tv_sec + rusage.ru_utime.tv_usec; @@ -405,22 +414,21 @@ static void ReallyExit(const FunctionCallbackInfo& args) { class FastHrtime : public BaseObject { public: static Local New(Environment* env) { - Local ctor = - v8::FunctionTemplate::New(env->isolate()); + Local ctor = FunctionTemplate::New(env->isolate()); ctor->Inherit(BaseObject::GetConstructorTemplate(env)); - Local otmpl = ctor->InstanceTemplate(); + Local otmpl = ctor->InstanceTemplate(); otmpl->SetInternalFieldCount(FastHrtime::kInternalFieldCount); auto create_func = [env](auto fast_func, auto slow_func) { - auto cfunc = v8::CFunction::Make(fast_func); - return v8::FunctionTemplate::New(env->isolate(), - slow_func, - Local(), - Local(), - 0, - v8::ConstructorBehavior::kThrow, - v8::SideEffectType::kHasNoSideEffect, - &cfunc); + auto cfunc = CFunction::Make(fast_func); + return FunctionTemplate::New(env->isolate(), + slow_func, + Local(), + Local(), + 0, + ConstructorBehavior::kThrow, + SideEffectType::kHasNoSideEffect, + &cfunc); }; otmpl->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "hrtime"), @@ -457,8 +465,8 @@ class FastHrtime : public BaseObject { SET_MEMORY_INFO_NAME(FastHrtime) SET_SELF_SIZE(FastHrtime) - static FastHrtime* FromV8ApiObject(v8::ApiObject api_object) { - v8::Object* v8_object = reinterpret_cast(&api_object); + static FastHrtime* FromV8ApiObject(ApiObject api_object) { + Object* v8_object = reinterpret_cast(&api_object); return static_cast( v8_object->GetAlignedPointerFromInternalField(BaseObject::kSlot)); } @@ -480,7 +488,7 @@ class FastHrtime : public BaseObject { fields[2] = t % NANOS_PER_SEC; } - static void FastNumber(v8::ApiObject receiver) { + static void FastNumber(ApiObject receiver) { NumberImpl(FromV8ApiObject(receiver)); } @@ -494,7 +502,7 @@ class FastHrtime : public BaseObject { fields[0] = t; } - static void FastBigInt(v8::ApiObject receiver) { + static void FastBigInt(ApiObject receiver) { BigIntImpl(FromV8ApiObject(receiver)); } @@ -502,7 +510,7 @@ class FastHrtime : public BaseObject { BigIntImpl(FromJSObject(args.Holder())); } - v8::Global array_buffer_; + Global array_buffer_; std::shared_ptr backing_store_; }; diff --git a/src/node_report.cc b/src/node_report.cc index e7bfe7fef09d14..13f87b1e52e5d6 100644 --- a/src/node_report.cc +++ b/src/node_report.cc @@ -12,8 +12,8 @@ #ifdef _WIN32 #include #else // !_WIN32 -#include #include +#include #include #endif @@ -294,6 +294,10 @@ static void WriteNodeReport(Isolate* isolate, static_cast(uv_loop_alive(env->event_loop()))); writer.json_keyvalue("address", ValueToHexString(reinterpret_cast(env->event_loop()))); + + // Report Event loop idle time + uint64_t idle_time = uv_metrics_idle_time(env->event_loop()); + writer.json_keyvalue("loopIdleTimeSeconds", 1.0 * idle_time / 1e9); writer.json_end(); } diff --git a/src/node_serdes.cc b/src/node_serdes.cc index 28844f1858ff3d..b51d315989ce71 100644 --- a/src/node_serdes.cc +++ b/src/node_serdes.cc @@ -169,6 +169,10 @@ Maybe SerializerContext::WriteHostObject(Isolate* isolate, void SerializerContext::New(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); + if (!args.IsConstructCall()) { + return THROW_ERR_CONSTRUCT_CALL_REQUIRED( + env, "Class constructor Serializer cannot be invoked without 'new'"); + } new SerializerContext(env, args.This()); } @@ -319,6 +323,10 @@ MaybeLocal DeserializerContext::ReadHostObject(Isolate* isolate) { void DeserializerContext::New(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); + if (!args.IsConstructCall()) { + return THROW_ERR_CONSTRUCT_CALL_REQUIRED( + env, "Class constructor Deserializer cannot be invoked without 'new'"); + } if (!args[0]->IsArrayBufferView()) { return node::THROW_ERR_INVALID_ARG_TYPE( @@ -470,6 +478,7 @@ void Initialize(Local target, Local serializerString = FIXED_ONE_BYTE_STRING(env->isolate(), "Serializer"); ser->SetClassName(serializerString); + ser->ReadOnlyPrototype(); target->Set(env->context(), serializerString, ser->GetFunction(env->context()).ToLocalChecked()).Check(); @@ -496,6 +505,8 @@ void Initialize(Local target, Local deserializerString = FIXED_ONE_BYTE_STRING(env->isolate(), "Deserializer"); + des->SetLength(1); + des->ReadOnlyPrototype(); des->SetClassName(deserializerString); target->Set(env->context(), deserializerString, diff --git a/src/node_task_queue.cc b/src/node_task_queue.cc index 926b27fcf2a05a..0aa021fc5b27df 100644 --- a/src/node_task_queue.cc +++ b/src/node_task_queue.cc @@ -21,7 +21,6 @@ using v8::kPromiseRejectAfterResolved; using v8::kPromiseRejectWithNoHandler; using v8::kPromiseResolveAfterResolved; using v8::Local; -using v8::MicrotasksScope; using v8::Number; using v8::Object; using v8::Promise; @@ -96,11 +95,13 @@ static void EnqueueMicrotask(const FunctionCallbackInfo& args) { CHECK(args[0]->IsFunction()); - isolate->EnqueueMicrotask(args[0].As()); + isolate->GetCurrentContext()->GetMicrotaskQueue() + ->EnqueueMicrotask(isolate, args[0].As()); } static void RunMicrotasks(const FunctionCallbackInfo& args) { - MicrotasksScope::PerformCheckpoint(args.GetIsolate()); + Environment* env = Environment::GetCurrent(args); + env->context()->GetMicrotaskQueue()->PerformCheckpoint(env->isolate()); } static void SetTickCallback(const FunctionCallbackInfo& args) { diff --git a/src/node_url.cc b/src/node_url.cc index 226fa69693558e..e3f860ef311677 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -2081,6 +2081,48 @@ void URL::Parse(const char* input, } } // NOLINT(readability/fn_size) +// https://url.spec.whatwg.org/#url-serializing +std::string URL::SerializeURL(const struct url_data* url, + bool exclude = false) { + std::string output = url->scheme; + if (url->flags & URL_FLAGS_HAS_HOST) { + output += "//"; + if (url->flags & URL_FLAGS_HAS_USERNAME || + url->flags & URL_FLAGS_HAS_PASSWORD) { + if (url->flags & URL_FLAGS_HAS_USERNAME) { + output += url->username; + } + if (url->flags & URL_FLAGS_HAS_PASSWORD) { + output += ":" + url->password; + } + output += "@"; + } + output += url->host; + if (url->port != -1) { + output += ":" + std::to_string(url->port); + } + } + if (url->flags & URL_FLAGS_CANNOT_BE_BASE) { + output += url->path[0]; + } else { + if (!(url->flags & URL_FLAGS_HAS_HOST) && + url->path.size() > 1 && + url->path[0].empty()) { + output += "/."; + } + for (size_t i = 1; i < url->path.size(); i++) { + output += "/" + url->path[i]; + } + } + if (url->flags & URL_FLAGS_HAS_QUERY) { + output = "?" + url->query; + } + if (!exclude && url->flags & URL_FLAGS_HAS_FRAGMENT) { + output = "#" + url->fragment; + } + return output; +} + namespace { void SetArgs(Environment* env, Local argv[ARG_COUNT], diff --git a/src/node_url.h b/src/node_url.h index 6439a4a087be77..e42c2627179fcc 100644 --- a/src/node_url.h +++ b/src/node_url.h @@ -71,6 +71,7 @@ struct url_data { std::string query; std::string fragment; std::vector path; + std::string href; }; class URL { @@ -83,6 +84,8 @@ class URL { const struct url_data* base, bool has_base); + static std::string SerializeURL(const struct url_data* url, bool exclude); + URL(const char* input, const size_t len) { Parse(input, len, kUnknownState, &context_, false, nullptr, false); } @@ -160,6 +163,10 @@ class URL { return ret; } + std::string href() const { + return SerializeURL(&context_, false); + } + // Get the path of the file: URL in a format consumable by native file system // APIs. Returns an empty string if something went wrong. std::string ToFilePath() const; diff --git a/src/node_v8.cc b/src/node_v8.cc index f34125d5f49e16..4ab87dce326bb1 100644 --- a/src/node_v8.cc +++ b/src/node_v8.cc @@ -196,7 +196,6 @@ void Initialize(Local target, Uint32::NewFromUnsigned(env->isolate(), i)).Check(); HEAP_STATISTICS_PROPERTIES(V) -#undef V // Export symbols used by v8.getHeapCodeStatistics() env->SetMethod( @@ -208,13 +207,7 @@ void Initialize(Local target, binding_data->heap_code_statistics_buffer.GetJSArray()) .Check(); -#define V(i, _, name) \ - target->Set(env->context(), \ - FIXED_ONE_BYTE_STRING(env->isolate(), #name), \ - Uint32::NewFromUnsigned(env->isolate(), i)).Check(); - HEAP_CODE_STATISTICS_PROPERTIES(V) -#undef V size_t number_of_heap_spaces = env->isolate()->NumberOfHeapSpaces(); @@ -244,11 +237,6 @@ void Initialize(Local target, binding_data->heap_space_statistics_buffer.GetJSArray()) .Check(); -#define V(i, _, name) \ - target->Set(env->context(), \ - FIXED_ONE_BYTE_STRING(env->isolate(), #name), \ - Uint32::NewFromUnsigned(env->isolate(), i)).Check(); - HEAP_SPACE_STATISTICS_PROPERTIES(V) #undef V diff --git a/src/node_version.h b/src/node_version.h index ac060f1cb0bb35..bf318cfcf750a8 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -22,7 +22,7 @@ #ifndef SRC_NODE_VERSION_H_ #define SRC_NODE_VERSION_H_ -#define NODE_MAJOR_VERSION 15 +#define NODE_MAJOR_VERSION 16 #define NODE_MINOR_VERSION 0 #define NODE_PATCH_VERSION 0 @@ -89,7 +89,7 @@ * version matching should open a pull request to reserve a number in this * registry. */ -#define NODE_MODULE_VERSION 88 +#define NODE_MODULE_VERSION 89 // The NAPI_VERSION provided by this version of the runtime. This is the version // which the Node binary being built supports. diff --git a/src/node_worker.cc b/src/node_worker.cc index 2006380cd411dc..7369e13768e2d9 100644 --- a/src/node_worker.cc +++ b/src/node_worker.cc @@ -159,6 +159,9 @@ class WorkerThreadData { Isolate::Initialize(isolate, params); SetIsolateUpForNode(isolate); + // Be sure it's called before Environment::InitializeDiagnostics() + // so that this callback stays when the callback of + // --heapsnapshot-near-heap-limit gets is popped. isolate->AddNearHeapLimitCallback(Worker::NearHeapLimit, w); { @@ -177,6 +180,8 @@ class WorkerThreadData { if (w_->per_isolate_opts_) isolate_data_->set_options(std::move(w_->per_isolate_opts_)); isolate_data_->set_worker_context(w_); + isolate_data_->max_young_gen_size = + params.constraints.max_young_generation_size_in_bytes(); } Mutex::ScopedLock lock(w_->mutex_); @@ -741,6 +746,39 @@ void Worker::TakeHeapSnapshot(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(scheduled ? taker->object() : Local()); } +void Worker::LoopIdleTime(const FunctionCallbackInfo& args) { + Worker* w; + ASSIGN_OR_RETURN_UNWRAP(&w, args.This()); + + Mutex::ScopedLock lock(w->mutex_); + // Using w->is_stopped() here leads to a deadlock, and checking is_stopped() + // before locking the mutex is a race condition. So manually do the same + // check. + if (w->stopped_ || w->env_ == nullptr) + return args.GetReturnValue().Set(-1); + + uint64_t idle_time = uv_metrics_idle_time(w->env_->event_loop()); + args.GetReturnValue().Set(1.0 * idle_time / 1e6); +} + +void Worker::LoopStartTime(const FunctionCallbackInfo& args) { + Worker* w; + ASSIGN_OR_RETURN_UNWRAP(&w, args.This()); + + Mutex::ScopedLock lock(w->mutex_); + // Using w->is_stopped() here leads to a deadlock, and checking is_stopped() + // before locking the mutex is a race condition. So manually do the same + // check. + if (w->stopped_ || w->env_ == nullptr) + return args.GetReturnValue().Set(-1); + + double loop_start_time = w->env_->performance_state()->milestones[ + node::performance::NODE_PERFORMANCE_MILESTONE_LOOP_START]; + CHECK_GE(loop_start_time, 0); + args.GetReturnValue().Set( + (loop_start_time - node::performance::timeOrigin) / 1e6); +} + namespace { // Return the MessagePort that is global for this Environment and communicates @@ -774,6 +812,8 @@ void InitWorker(Local target, env->SetProtoMethod(w, "unref", Worker::Unref); env->SetProtoMethod(w, "getResourceLimits", Worker::GetResourceLimits); env->SetProtoMethod(w, "takeHeapSnapshot", Worker::TakeHeapSnapshot); + env->SetProtoMethod(w, "loopIdleTime", Worker::LoopIdleTime); + env->SetProtoMethod(w, "loopStartTime", Worker::LoopStartTime); Local workerString = FIXED_ONE_BYTE_STRING(env->isolate(), "Worker"); @@ -840,6 +880,8 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(Worker::Unref); registry->Register(Worker::GetResourceLimits); registry->Register(Worker::TakeHeapSnapshot); + registry->Register(Worker::LoopIdleTime); + registry->Register(Worker::LoopStartTime); } } // anonymous namespace diff --git a/src/node_worker.h b/src/node_worker.h index 50611fb3f2ea10..2c65f0e1a83bbe 100644 --- a/src/node_worker.h +++ b/src/node_worker.h @@ -66,6 +66,8 @@ class Worker : public AsyncWrap { const v8::FunctionCallbackInfo& args); v8::Local GetResourceLimits(v8::Isolate* isolate) const; static void TakeHeapSnapshot(const v8::FunctionCallbackInfo& args); + static void LoopIdleTime(const v8::FunctionCallbackInfo& args); + static void LoopStartTime(const v8::FunctionCallbackInfo& args); private: void CreateEnvMessagePort(Environment* env); diff --git a/src/quic/node_quic_session.cc b/src/quic/node_quic_session.cc index 371e3585dfeeed..fce6b658a43dec 100644 --- a/src/quic/node_quic_session.cc +++ b/src/quic/node_quic_session.cc @@ -1449,7 +1449,7 @@ bool QuicApplication::SendPendingData() { } return true; - congestion_limited: +congestion_limited: // We are either congestion limited or done. if (pos - packet->data()) { // Some data was serialized into the packet. We need to send it. diff --git a/src/quic/node_quic_session.h b/src/quic/node_quic_session.h index 7c9b3f9710f17b..10e16cc2689023 100644 --- a/src/quic/node_quic_session.h +++ b/src/quic/node_quic_session.h @@ -735,7 +735,7 @@ class QuicApplication : public MemoryRetainer, // QUIC sessions are logical connections that exchange data // back and forth between peer endpoints via UDP. Every QuicSession -// has an associated TLS context and all data transfered between +// has an associated TLS context and all data transferred between // the peers is always encrypted. Unlike TLS over TCP, however, // The QuicSession uses a session identifier that is independent // of both the local *and* peer IP address, allowing a QuicSession diff --git a/src/res/node.rc b/src/res/node.rc index 9403e68be70aca..7af45a03c229b2 100644 --- a/src/res/node.rc +++ b/src/res/node.rc @@ -52,7 +52,7 @@ BEGIN BEGIN VALUE "CompanyName", "Node.js" VALUE "ProductName", "Node.js" - VALUE "FileDescription", "Node.js: Server-side JavaScript" + VALUE "FileDescription", "Node.js JavaScript Runtime" VALUE "FileVersion", NODE_EXE_VERSION VALUE "ProductVersion", NODE_EXE_VERSION VALUE "OriginalFilename", "node.exe" diff --git a/src/string_bytes.h b/src/string_bytes.h index e11b73b69e10b7..69bb828e018cb0 100644 --- a/src/string_bytes.h +++ b/src/string_bytes.h @@ -26,14 +26,7 @@ // Decodes a v8::Local or Buffer to a raw char* -#if (__GNUC__ >= 8) && !defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-function-type" -#endif #include "v8.h" -#if (__GNUC__ >= 8) && !defined(__clang__) -#pragma GCC diagnostic pop -#endif #include "env-inl.h" #include diff --git a/src/util.h b/src/util.h index d3c5fdd74eddbd..1f7c7580a7e036 100644 --- a/src/util.h +++ b/src/util.h @@ -24,14 +24,7 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#if (__GNUC__ >= 8) && !defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-function-type" -#endif #include "v8.h" -#if (__GNUC__ >= 8) && !defined(__clang__) -#pragma GCC diagnostic pop -#endif #include #include @@ -609,6 +602,15 @@ class NonCopyableMaybe { return empty_; } + const T* get() const { + return empty_ ? nullptr : &value_; + } + + const T* operator->() const { + CHECK(!empty_); + return &value_; + } + T&& Release() { CHECK_EQ(empty_, false); empty_ = true; diff --git a/test/README.md b/test/README.md index ad9d87a7e93051..834af7dc5896a2 100644 --- a/test/README.md +++ b/test/README.md @@ -13,27 +13,27 @@ For the tests to run on Windows, be sure to clone Node.js source code with the ## Test Directories -| Directory | Runs on CI | Purpose | -| ------------------- | --------------- | --------------- | -| `abort` | Yes | Tests for when the `--abort-on-uncaught-exception` flag is used. | -| `addons` | Yes | Tests for [addon](https://nodejs.org/api/addons.html) functionality along with some tests that require an addon. | -| `async-hooks` | Yes | Tests for [async_hooks](https://nodejs.org/api/async_hooks.html) functionality. | -| `benchmark` | No | Test minimal functionality of benchmarks. | -| `cctest` | Yes | C++ tests that are run as part of the build process. | -| `code-cache` | No | Tests for a Node.js binary compiled with V8 code cache. | -| `common` | | Common modules shared among many tests. [Documentation](./common/README.md) | -| `doctool` | Yes | Tests for the documentation generator. | -| `es-module` | Yes | Test ESM module loading. | -| `fixtures` | | Test fixtures used in various tests throughout the test suite. | -| `internet` | No | Tests that make real outbound network connections. Tests for networking related modules may also be present in other directories, but those tests do not make outbound connections. | -| `js-native-api` | Yes | Tests for Node.js-agnostic [n-api](https://nodejs.org/api/n-api.html) functionality. | -| `known_issues` | Yes | Tests reproducing known issues within the system. All tests inside of this directory are expected to fail. If a test doesn't fail on certain platforms, those should be skipped via `known_issues.status`. | -| `message` | Yes | Tests for messages that are output for various conditions (`console.log`, error messages etc.) | -| `node-api` | Yes | Tests for Node.js-specific [n-api](https://nodejs.org/api/n-api.html) functionality. | -| `parallel` | Yes | Various tests that are able to be run in parallel. | -| `pseudo-tty` | Yes | Tests that require stdin/stdout/stderr to be a TTY. | -| `pummel` | No | Various tests for various modules / system functionality operating under load. | -| `sequential` | Yes | Various tests that must not run in parallel. | -| `testpy` | | Test configuration utility used by various test suites. | -| `tick-processor` | No | Tests for the V8 tick processor integration. The tests are for the logic in `lib/internal/v8_prof_processor.js` and `lib/internal/v8_prof_polyfill.js`. The tests confirm that the profile processor packages the correct set of scripts from V8 and introduces the correct platform specific logic. | -| `v8-updates` | No | Tests for V8 performance integration. | +| Directory | Runs on CI | Purpose | +| ---------------- | ---------- | --------------- | +| `abort` | Yes | Tests for when the `--abort-on-uncaught-exception` flag is used. | +| `addons` | Yes | Tests for [addon](https://nodejs.org/api/addons.html) functionality along with some tests that require an addon. | +| `async-hooks` | Yes | Tests for [async_hooks](https://nodejs.org/api/async_hooks.html) functionality. | +| `benchmark` | Yes | Test minimal functionality of benchmarks. | +| `cctest` | Yes | C++ tests that are run as part of the build process. | +| `code-cache` | No | Tests for a Node.js binary compiled with V8 code cache. | +| `common` | | Common modules shared among many tests. [Documentation](./common/README.md) | +| `doctool` | Yes | Tests for the documentation generator. | +| `es-module` | Yes | Test ESM module loading. | +| `fixtures` | | Test fixtures used in various tests throughout the test suite. | +| `internet` | No | Tests that make real outbound network connections. Tests for networking related modules may also be present in other directories, but those tests do not make outbound connections. | +| `js-native-api` | Yes | Tests for Node.js-agnostic [n-api](https://nodejs.org/api/n-api.html) functionality. | +| `known_issues` | Yes | Tests reproducing known issues within the system. All tests inside of this directory are expected to fail. If a test doesn't fail on certain platforms, those should be skipped via `known_issues.status`. | +| `message` | Yes | Tests for messages that are output for various conditions (`console.log`, error messages etc.) | +| `node-api` | Yes | Tests for Node.js-specific [n-api](https://nodejs.org/api/n-api.html) functionality. | +| `parallel` | Yes | Various tests that are able to be run in parallel. | +| `pseudo-tty` | Yes | Tests that require stdin/stdout/stderr to be a TTY. | +| `pummel` | No | Various tests for various modules / system functionality operating under load. | +| `sequential` | Yes | Various tests that must not run in parallel. | +| `testpy` | | Test configuration utility used by various test suites. | +| `tick-processor` | No | Tests for the V8 tick processor integration. The tests are for the logic in `lib/internal/v8_prof_processor.js` and `lib/internal/v8_prof_polyfill.js`. The tests confirm that the profile processor packages the correct set of scripts from V8 and introduces the correct platform specific logic. | +| `v8-updates` | No | Tests for V8 performance integration. | diff --git a/test/abort/test-signal-handler.js b/test/abort/test-signal-handler.js index f68e6881f6e5b6..69ac95f5261fb7 100644 --- a/test/abort/test-signal-handler.js +++ b/test/abort/test-signal-handler.js @@ -18,6 +18,6 @@ if (process.argv[2] === 'child') { ['--expose-internals', __filename, 'child'], { stdio: 'inherit' }); // FreeBSD and macOS use SIGILL for the kind of crash we're causing here. - assert(child.signal === 'SIGSEGV' || child.signal === 'SIGILL', - `child.signal = ${child.signal}`); + assert(child.signal === 'SIGSEGV' || child.signal === 'SIGILL' || + child.signal === 'SIGTRAP', `child.signal = ${child.signal}`); } diff --git a/test/addons/async-cleanup-hook/binding.cc b/test/addons/async-cleanup-hook/binding.cc index d18da7a094f71a..0a11220850fca2 100644 --- a/test/addons/async-cleanup-hook/binding.cc +++ b/test/addons/async-cleanup-hook/binding.cc @@ -1,6 +1,6 @@ -#include #include #include +#include void MustNotCall(void* arg, void(*cb)(void*), void* cbarg) { assert(0); diff --git a/test/addons/make-callback-domain-warning/test.js b/test/addons/make-callback-domain-warning/test.js index 0377415e1269aa..e6eaa9d337c179 100644 --- a/test/addons/make-callback-domain-warning/test.js +++ b/test/addons/make-callback-domain-warning/test.js @@ -6,7 +6,7 @@ const domain = require('domain'); const binding = require(`./build/${common.buildType}/binding`); function makeCallback(object, cb) { - binding.makeCallback(object, () => setImmediate(cb)); + binding.makeCallback(object, function someMethod() { setImmediate(cb); }); } let latestWarning = null; @@ -16,8 +16,14 @@ process.on('warning', (warning) => { const d = domain.create(); +class Resource { + constructor(domain) { + this.domain = domain; + } +} + // When domain is disabled, no warning will be emitted -makeCallback({ domain: d }, common.mustCall(() => { +makeCallback(new Resource(d), common.mustCall(() => { assert.strictEqual(latestWarning, null); d.run(common.mustCall(() => { @@ -26,7 +32,9 @@ makeCallback({ domain: d }, common.mustCall(() => { assert.strictEqual(latestWarning, null); // Warning is emitted when domain property is used and domain is enabled - makeCallback({ domain: d }, common.mustCall(() => { + makeCallback(new Resource(d), common.mustCall(() => { + assert.match(latestWarning.message, + /Triggered by calling someMethod on Resource\./); assert.strictEqual(latestWarning.name, 'DeprecationWarning'); assert.strictEqual(latestWarning.code, 'DEP0097'); })); diff --git a/test/addons/openssl-binding/binding.cc b/test/addons/openssl-binding/binding.cc index 05849b6c14fe31..79472dd7f25272 100644 --- a/test/addons/openssl-binding/binding.cc +++ b/test/addons/openssl-binding/binding.cc @@ -1,7 +1,7 @@ -#include -#include #include #include +#include +#include namespace { diff --git a/test/addons/openssl-client-cert-engine/testengine.cc b/test/addons/openssl-client-cert-engine/testengine.cc index 7ccb56e08015a7..95712901e69c8b 100644 --- a/test/addons/openssl-client-cert-engine/testengine.cc +++ b/test/addons/openssl-client-cert-engine/testengine.cc @@ -1,10 +1,10 @@ +#include +#include + #include #include #include -#include -#include - #include #include #include diff --git a/test/addons/openssl-key-engine/testkeyengine.cc b/test/addons/openssl-key-engine/testkeyengine.cc index e1dc22164ac4c1..704027ba5a43d2 100644 --- a/test/addons/openssl-key-engine/testkeyengine.cc +++ b/test/addons/openssl-key-engine/testkeyengine.cc @@ -1,10 +1,10 @@ +#include +#include + #include #include #include -#include -#include - #include #include #include diff --git a/test/addons/stringbytes-external-exceed-max/binding.cc b/test/addons/stringbytes-external-exceed-max/binding.cc index 0e3cd3f4d0a1a1..c452a093849213 100644 --- a/test/addons/stringbytes-external-exceed-max/binding.cc +++ b/test/addons/stringbytes-external-exceed-max/binding.cc @@ -1,6 +1,6 @@ -#include #include #include +#include #ifdef _AIX // AIX allows over-allocation, and will SIGKILL when the allocated pages are diff --git a/test/addons/worker-addon/binding.cc b/test/addons/worker-addon/binding.cc index 63728fa9a4b76d..a5f9d8b3f835d8 100644 --- a/test/addons/worker-addon/binding.cc +++ b/test/addons/worker-addon/binding.cc @@ -1,9 +1,9 @@ -#include #include -#include -#include #include #include +#include +#include +#include using v8::Context; using v8::Function; diff --git a/test/addons/worker-buffer-callback/test.js b/test/addons/worker-buffer-callback/test.js index b04984f1576432..08625b72384eb1 100644 --- a/test/addons/worker-buffer-callback/test.js +++ b/test/addons/worker-buffer-callback/test.js @@ -5,7 +5,7 @@ const { MessageChannel } = require('worker_threads'); const { buffer } = require(`./build/${common.buildType}/binding`); // Test that buffers allocated with a free callback through our APIs are not -// transfered. +// transferred. const { port1 } = new MessageChannel(); const origByteLength = buffer.byteLength; diff --git a/test/addons/zlib-binding/binding.cc b/test/addons/zlib-binding/binding.cc index 53d25642f0d563..3a958f26af1ac6 100644 --- a/test/addons/zlib-binding/binding.cc +++ b/test/addons/zlib-binding/binding.cc @@ -1,7 +1,7 @@ #include #include -#include #include +#include namespace { diff --git a/test/async-hooks/coverage.md b/test/async-hooks/coverage.md index 1ba18a938330a9..5470297d20625a 100644 --- a/test/async-hooks/coverage.md +++ b/test/async-hooks/coverage.md @@ -2,31 +2,31 @@ Showing which kind of async resource is covered by which test: -| Resource Type | Test | -|----------------------|--------------------------------------------| -| CONNECTION | test-connection.ssl.js | -| FSEVENTWRAP | test-fseventwrap.js | -| FSREQCALLBACK | test-fsreqcallback-{access,readFile}.js | -| GETADDRINFOREQWRAP | test-getaddrinforeqwrap.js | -| GETNAMEINFOREQWRAP | test-getnameinforeqwrap.js | -| HTTPINCOMINGMESSAGE | test-httpparser.request.js | -| HTTPCLIENTREQUEST | test-httpparser.response.js | -| Immediate | test-immediate.js | -| JSSTREAM | TODO (crashes when accessing directly) | -| PBKDF2REQUEST | test-crypto-pbkdf2.js | -| PIPECONNECTWRAP | test-pipeconnectwrap.js | -| PIPEWRAP | test-pipewrap.js | -| PROCESSWRAP | test-pipewrap.js | -| QUERYWRAP | test-querywrap.js | -| RANDOMBYTESREQUEST | test-crypto-randomBytes.js | -| SHUTDOWNWRAP | test-shutdownwrap.js | -| SIGNALWRAP | test-signalwrap.js | -| STATWATCHER | test-statwatcher.js | -| TCPCONNECTWRAP | test-tcpwrap.js | -| TCPWRAP | test-tcpwrap.js | -| TLSWRAP | test-tlswrap.js | -| TTYWRAP | test-ttywrap.{read,write}stream.js | -| UDPSENDWRAP | test-udpsendwrap.js | -| UDPWRAP | test-udpwrap.js | -| WRITEWRAP | test-writewrap.js | -| ZLIB | test-zlib.zlib-binding.deflate.js | +| Resource Type | Test | +|---------------------|-----------------------------------------| +| CONNECTION | test-connection.ssl.js | +| FSEVENTWRAP | test-fseventwrap.js | +| FSREQCALLBACK | test-fsreqcallback-{access,readFile}.js | +| GETADDRINFOREQWRAP | test-getaddrinforeqwrap.js | +| GETNAMEINFOREQWRAP | test-getnameinforeqwrap.js | +| HTTPINCOMINGMESSAGE | test-httpparser.request.js | +| HTTPCLIENTREQUEST | test-httpparser.response.js | +| Immediate | test-immediate.js | +| JSSTREAM | TODO (crashes when accessing directly) | +| PBKDF2REQUEST | test-crypto-pbkdf2.js | +| PIPECONNECTWRAP | test-pipeconnectwrap.js | +| PIPEWRAP | test-pipewrap.js | +| PROCESSWRAP | test-pipewrap.js | +| QUERYWRAP | test-querywrap.js | +| RANDOMBYTESREQUEST | test-crypto-randomBytes.js | +| SHUTDOWNWRAP | test-shutdownwrap.js | +| SIGNALWRAP | test-signalwrap.js | +| STATWATCHER | test-statwatcher.js | +| TCPCONNECTWRAP | test-tcpwrap.js | +| TCPWRAP | test-tcpwrap.js | +| TLSWRAP | test-tlswrap.js | +| TTYWRAP | test-ttywrap.{read,write}stream.js | +| UDPSENDWRAP | test-udpsendwrap.js | +| UDPWRAP | test-udpwrap.js | +| WRITEWRAP | test-writewrap.js | +| ZLIB | test-zlib.zlib-binding.deflate.js | diff --git a/test/cctest/test_aliased_buffer.cc b/test/cctest/test_aliased_buffer.cc index 4dab70d0b576cb..ba947700c1bf27 100644 --- a/test/cctest/test_aliased_buffer.cc +++ b/test/cctest/test_aliased_buffer.cc @@ -1,11 +1,4 @@ -#if (__GNUC__ >= 8) && !defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-function-type" -#endif #include "v8.h" -#if (__GNUC__ >= 8) && !defined(__clang__) -#pragma GCC diagnostic pop -#endif #include "aliased_buffer.h" #include "node_test_fixture.h" diff --git a/test/cctest/test_environment.cc b/test/cctest/test_environment.cc index 27706044b800f6..d24ff93cc74645 100644 --- a/test/cctest/test_environment.cc +++ b/test/cctest/test_environment.cc @@ -5,6 +5,8 @@ #include #include "gtest/gtest.h" #include "node_test_fixture.h" +#include +#include using node::AtExit; using node::RunAtExit; @@ -66,7 +68,34 @@ TEST_F(EnvironmentTest, EnvironmentWithESMLoader) { "})()"); } +class RedirectStdErr { + public: + explicit RedirectStdErr(const char* filename) : filename_(filename) { + fflush(stderr); + fgetpos(stderr, &pos_); + fd_ = dup(fileno(stderr)); + freopen(filename_, "w", stderr); + } + + ~RedirectStdErr() { + fflush(stderr); + dup2(fd_, fileno(stderr)); + close(fd_); + remove(filename_); + clearerr(stderr); + fsetpos(stderr, &pos_); + } + + private: + int fd_; + fpos_t pos_; + const char* filename_; +}; + TEST_F(EnvironmentTest, EnvironmentWithNoESMLoader) { + // The following line will cause stderr to get redirected to avoid the + // error that would otherwise be printed to the console by this test. + RedirectStdErr redirect_scope("environment_test.log"); const v8::HandleScope handle_scope(isolate_); Argv argv; Env env {handle_scope, argv, node::EnvironmentFlags::kNoRegisterESMLoader}; @@ -182,17 +211,7 @@ TEST_F(EnvironmentTest, AtExitWithEnvironment) { const Argv argv; Env env {handle_scope, argv}; - AtExit(*env, at_exit_callback1); - RunAtExit(*env); - EXPECT_TRUE(called_cb_1); -} - -TEST_F(EnvironmentTest, AtExitWithoutEnvironment) { - const v8::HandleScope handle_scope(isolate_); - const Argv argv; - Env env {handle_scope, argv}; - - AtExit(at_exit_callback1); // No Environment is passed to AtExit. + AtExit(*env, at_exit_callback1, nullptr); RunAtExit(*env); EXPECT_TRUE(called_cb_1); } @@ -203,8 +222,8 @@ TEST_F(EnvironmentTest, AtExitOrder) { Env env {handle_scope, argv}; // Test that callbacks are run in reverse order. - AtExit(*env, at_exit_callback_ordered1); - AtExit(*env, at_exit_callback_ordered2); + AtExit(*env, at_exit_callback_ordered1, nullptr); + AtExit(*env, at_exit_callback_ordered2, nullptr); RunAtExit(*env); EXPECT_TRUE(called_cb_ordered_1); EXPECT_TRUE(called_cb_ordered_2); @@ -239,8 +258,8 @@ TEST_F(EnvironmentTest, MultipleEnvironmentsPerIsolate) { Env env1 {handle_scope, argv}; Env env2 {handle_scope, argv, node::EnvironmentFlags::kNoFlags}; - AtExit(*env1, at_exit_callback1); - AtExit(*env2, at_exit_callback2); + AtExit(*env1, at_exit_callback1, nullptr); + AtExit(*env2, at_exit_callback2, nullptr); RunAtExit(*env1); EXPECT_TRUE(called_cb_1); EXPECT_FALSE(called_cb_2); @@ -559,3 +578,138 @@ TEST_F(EnvironmentTest, SetImmediateMicrotasks) { EXPECT_EQ(called, 1); } + +#ifndef _WIN32 // No SIGINT on Windows. +TEST_F(NodeZeroIsolateTestFixture, CtrlCWithOnlySafeTerminationTest) { + // We need to go through the whole setup dance here because we want to + // set only_terminate_in_safe_scope. + // Allocate and initialize Isolate. + v8::Isolate::CreateParams create_params; + create_params.array_buffer_allocator = allocator.get(); + create_params.only_terminate_in_safe_scope = true; + v8::Isolate* isolate = v8::Isolate::Allocate(); + CHECK_NOT_NULL(isolate); + platform->RegisterIsolate(isolate, ¤t_loop); + v8::Isolate::Initialize(isolate, create_params); + + // Try creating Context + IsolateData + Environment. + { + v8::Isolate::Scope isolate_scope(isolate); + v8::HandleScope handle_scope(isolate); + + auto context = node::NewContext(isolate); + CHECK(!context.IsEmpty()); + v8::Context::Scope context_scope(context); + + std::unique_ptr + isolate_data{node::CreateIsolateData(isolate, + ¤t_loop, + platform.get()), + node::FreeIsolateData}; + CHECK(isolate_data); + + std::unique_ptr + environment{node::CreateEnvironment(isolate_data.get(), + context, + {}, + {}), + node::FreeEnvironment}; + CHECK(environment); + EXPECT_EQ(node::GetEnvironmentIsolateData(environment.get()), + isolate_data.get()); + EXPECT_EQ(node::GetArrayBufferAllocator(isolate_data.get()), nullptr); + + v8::Local main_ret = + node::LoadEnvironment(environment.get(), + "'use strict';\n" + "const { runInThisContext } = require('vm');\n" + "try {\n" + " runInThisContext(" + " `process.kill(process.pid, 'SIGINT'); while(true){}`, " + " { breakOnSigint: true });\n" + " return 'unreachable';\n" + "} catch (err) {\n" + " return err.code;\n" + "}").ToLocalChecked(); + node::Utf8Value main_ret_str(isolate, main_ret); + EXPECT_EQ(std::string(*main_ret_str), "ERR_SCRIPT_EXECUTION_INTERRUPTED"); + } + + // Cleanup. + platform->UnregisterIsolate(isolate); + isolate->Dispose(); +} +#endif // _WIN32 + +TEST_F(EnvironmentTest, NestedMicrotaskQueue) { + const v8::HandleScope handle_scope(isolate_); + const Argv argv; + + std::unique_ptr queue = v8::MicrotaskQueue::New(isolate_); + v8::Local context = v8::Context::New( + isolate_, nullptr, {}, {}, {}, queue.get()); + node::InitializeContext(context); + v8::Context::Scope context_scope(context); + + using IntVec = std::vector; + IntVec callback_calls; + v8::Local must_call = v8::Function::New( + context, + [](const v8::FunctionCallbackInfo& info) { + IntVec* callback_calls = static_cast( + info.Data().As()->Value()); + callback_calls->push_back(info[0].As()->Value()); + }, + v8::External::New(isolate_, static_cast(&callback_calls))) + .ToLocalChecked(); + context->Global()->Set( + context, + v8::String::NewFromUtf8Literal(isolate_, "mustCall"), + must_call).Check(); + + node::IsolateData* isolate_data = node::CreateIsolateData( + isolate_, &NodeTestFixture::current_loop, platform.get()); + CHECK_NE(nullptr, isolate_data); + + node::Environment* env = node::CreateEnvironment( + isolate_data, context, {}, {}); + CHECK_NE(nullptr, env); + + v8::Local eval_in_env = node::LoadEnvironment( + env, + "mustCall(1);\n" + "Promise.resolve().then(() => mustCall(2));\n" + "require('vm').runInNewContext(" + " 'Promise.resolve().then(() => mustCall(3))'," + " { mustCall }," + " { microtaskMode: 'afterEvaluate' }" + ");\n" + "require('vm').runInNewContext(" + " 'Promise.resolve().then(() => mustCall(4))'," + " { mustCall }" + ");\n" + "setTimeout(() => {" + " Promise.resolve().then(() => mustCall(5));" + "}, 10);\n" + "mustCall(6);\n" + "return eval;\n").ToLocalChecked().As(); + EXPECT_EQ(callback_calls, (IntVec { 1, 3, 6, 2, 4 })); + v8::Local queue_microtask_code = v8::String::NewFromUtf8Literal( + isolate_, "queueMicrotask(() => mustCall(7));"); + eval_in_env->Call(context, + v8::Null(isolate_), + 1, + &queue_microtask_code).ToLocalChecked(); + EXPECT_EQ(callback_calls, (IntVec { 1, 3, 6, 2, 4 })); + isolate_->PerformMicrotaskCheckpoint(); + EXPECT_EQ(callback_calls, (IntVec { 1, 3, 6, 2, 4 })); + queue->PerformCheckpoint(isolate_); + EXPECT_EQ(callback_calls, (IntVec { 1, 3, 6, 2, 4, 7 })); + + int exit_code = SpinEventLoop(env).FromJust(); + EXPECT_EQ(exit_code, 0); + EXPECT_EQ(callback_calls, (IntVec { 1, 3, 6, 2, 4, 7, 5 })); + + node::FreeEnvironment(env); + node::FreeIsolateData(isolate_data); +} diff --git a/test/cctest/test_node_crypto.cc b/test/cctest/test_node_crypto.cc new file mode 100644 index 00000000000000..c0ce5f25496cd3 --- /dev/null +++ b/test/cctest/test_node_crypto.cc @@ -0,0 +1,23 @@ +// This simulates specifying the configuration option --openssl-system-ca-path +// and settting it to a file that does not exist. +#define NODE_OPENSSL_SYSTEM_CERT_PATH "/missing/ca.pem" + +#include "crypto/crypto_context.h" +#include "node_options.h" +#include "openssl/err.h" +#include "gtest/gtest.h" + +/* + * This test verifies that a call to NewRootCertDir with the build time + * configuration option --openssl-system-ca-path set to an missing file, will + * not leave any OpenSSL errors on the OpenSSL error stack. + * See https://github.com/nodejs/node/issues/35456 for details. + */ +TEST(NodeCrypto, NewRootCertStore) { + node::per_process::cli_options->ssl_openssl_cert_store = true; + X509_STORE* store = node::crypto::NewRootCertStore(); + ASSERT_TRUE(store); + ASSERT_EQ(ERR_peek_error(), 0UL) << "NewRootCertStore should not have left " + "any errors on the OpenSSL error stack\n"; + X509_STORE_free(store); +} diff --git a/test/cctest/test_platform.cc b/test/cctest/test_platform.cc index 07bea57b314bf0..c2d78938130006 100644 --- a/test/cctest/test_platform.cc +++ b/test/cctest/test_platform.cc @@ -93,8 +93,8 @@ TEST_F(NodeZeroIsolateTestFixture, IsolatePlatformDelegateTest) { std::unique_ptr environment{node::CreateEnvironment(isolate_data.get(), context, - 0, nullptr, - 0, nullptr), + {}, + {}), node::FreeEnvironment}; CHECK(environment); } diff --git a/test/cctest/test_url.cc b/test/cctest/test_url.cc index 99b4b4f39d5daf..686ebcd11b301e 100644 --- a/test/cctest/test_url.cc +++ b/test/cctest/test_url.cc @@ -137,25 +137,31 @@ TEST_F(URLTest, FromFilePath) { file_url = URL::FromFilePath("C:\\Program Files\\"); EXPECT_EQ("file:", file_url.protocol()); EXPECT_EQ("//C:/Program%20Files/", file_url.path()); + EXPECT_EQ("file:///C:/Program%20Files/", file_url.href()); file_url = URL::FromFilePath("C:\\a\\b\\c"); EXPECT_EQ("file:", file_url.protocol()); EXPECT_EQ("//C:/a/b/c", file_url.path()); + EXPECT_EQ("file:///C:/a/b/c", file_url.href()); file_url = URL::FromFilePath("b:\\a\\%%.js"); EXPECT_EQ("file:", file_url.protocol()); EXPECT_EQ("//b:/a/%25%25.js", file_url.path()); + EXPECT_EQ("file:///b:/a/%25%25.js", file_url.href()); #else file_url = URL::FromFilePath("/"); EXPECT_EQ("file:", file_url.protocol()); EXPECT_EQ("//", file_url.path()); + EXPECT_EQ("file:///", file_url.href()); file_url = URL::FromFilePath("/a/b/c"); EXPECT_EQ("file:", file_url.protocol()); EXPECT_EQ("//a/b/c", file_url.path()); + EXPECT_EQ("file:///a/b/c", file_url.href()); file_url = URL::FromFilePath("/a/%%.js"); EXPECT_EQ("file:", file_url.protocol()); EXPECT_EQ("//a/%25%25.js", file_url.path()); + EXPECT_EQ("file:///a/%25%25.js", file_url.href()); #endif } diff --git a/test/cctest/test_util.cc b/test/cctest/test_util.cc index 85c5a6a7fe43ae..a64942a8a35009 100644 --- a/test/cctest/test_util.cc +++ b/test/cctest/test_util.cc @@ -138,27 +138,27 @@ static void MaybeStackBufferBasic() { size_t old_length; size_t old_capacity; - /* Default constructor */ + // Default constructor. EXPECT_EQ(0U, buf.length()); EXPECT_FALSE(buf.IsAllocated()); EXPECT_GT(buf.capacity(), buf.length()); - /* SetLength() expansion */ + // SetLength() expansion. buf.SetLength(buf.capacity()); EXPECT_EQ(buf.capacity(), buf.length()); EXPECT_FALSE(buf.IsAllocated()); - /* Means of accessing raw buffer */ + // Means of accessing raw buffer. EXPECT_EQ(buf.out(), *buf); EXPECT_EQ(&buf[0], *buf); - /* Basic I/O */ + // Basic I/O. for (size_t i = 0; i < buf.length(); i++) buf[i] = static_cast(i); for (size_t i = 0; i < buf.length(); i++) EXPECT_EQ(static_cast(i), buf[i]); - /* SetLengthAndZeroTerminate() */ + // SetLengthAndZeroTerminate(). buf.SetLengthAndZeroTerminate(buf.capacity() - 1); EXPECT_EQ(buf.capacity() - 1, buf.length()); for (size_t i = 0; i < buf.length(); i++) @@ -166,7 +166,7 @@ static void MaybeStackBufferBasic() { buf.SetLength(buf.capacity()); EXPECT_EQ(0, buf[buf.length() - 1]); - /* Initial Realloc */ + // Initial Realloc. old_length = buf.length() - 1; old_capacity = buf.capacity(); buf.AllocateSufficientStorage(buf.capacity() * 2); @@ -176,7 +176,7 @@ static void MaybeStackBufferBasic() { EXPECT_EQ(static_cast(i), buf[i]); EXPECT_EQ(0, buf[old_length]); - /* SetLength() reduction and expansion */ + // SetLength() reduction and expansion. for (size_t i = 0; i < buf.length(); i++) buf[i] = static_cast(i); buf.SetLength(10); @@ -186,7 +186,7 @@ static void MaybeStackBufferBasic() { for (size_t i = 0; i < buf.length(); i++) EXPECT_EQ(static_cast(i), buf[i]); - /* Subsequent Realloc */ + // Subsequent Realloc. old_length = buf.length(); old_capacity = buf.capacity(); buf.AllocateSufficientStorage(old_capacity * 1.5); @@ -196,13 +196,13 @@ static void MaybeStackBufferBasic() { for (size_t i = 0; i < old_length; i++) EXPECT_EQ(static_cast(i), buf[i]); - /* Basic I/O on Realloc'd buffer */ + // Basic I/O on Realloc'd buffer. for (size_t i = 0; i < buf.length(); i++) buf[i] = static_cast(i); for (size_t i = 0; i < buf.length(); i++) EXPECT_EQ(static_cast(i), buf[i]); - /* Release() */ + // Release(). T* rawbuf = buf.out(); buf.Release(); EXPECT_EQ(0U, buf.length()); @@ -215,7 +215,7 @@ TEST(UtilTest, MaybeStackBuffer) { MaybeStackBufferBasic(); MaybeStackBufferBasic(); - // Constructor with size parameter + // Constructor with size parameter. { MaybeStackBuffer buf(100); EXPECT_EQ(100U, buf.length()); @@ -239,7 +239,7 @@ TEST(UtilTest, MaybeStackBuffer) { EXPECT_EQ(static_cast(i), bigbuf[i]); } - // Invalidated buffer + // Invalidated buffer. { MaybeStackBuffer buf; buf.Invalidate(); diff --git a/test/common/README.md b/test/common/README.md index 31d37d7abd2b4a..9bbc107dd853c5 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -40,12 +40,12 @@ The `benchmark` module is used by tests to run benchmarks. The `common` module is used by tests for consistency across repeated tasks. -### `allowGlobals(...whitelist)` +### `allowGlobals(...allowlist)` -* `whitelist` [<Array>][] Array of Globals +* `allowlist` [<Array>][] Array of Globals * return [<Array>][] -Takes `whitelist` and concats that with predefined `knownGlobals`. +Takes `allowlist` and concats that with predefined `knownGlobals`. ### `canCreateSymLink()` @@ -378,6 +378,11 @@ const { spawn } = require('child_process'); spawn(...common.pwdCommand, { stdio: ['pipe'] }); ``` +### `requireNoPackageJSONAbove()` + +Throws an `AssertionError` if a `package.json` file is in any ancestor +directory. Such files may interfere with proper test functionality. + ### `runWithInvalidFD(func)` * `func` [<Function>][] @@ -596,7 +601,7 @@ If set, crypto tests are skipped. ### `NODE_TEST_KNOWN_GLOBALS` A comma-separated list of variables names that are appended to the global -variable whitelist. Alternatively, if `NODE_TEST_KNOWN_GLOBALS` is set to `'0'`, +variable allowlist. Alternatively, if `NODE_TEST_KNOWN_GLOBALS` is set to `'0'`, global leak detection is disabled. ## Fixtures Module diff --git a/test/common/index.js b/test/common/index.js index b75c5441d2e3d5..39caa1b6b68bae 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -276,8 +276,8 @@ if (global.gc) { knownGlobals.push(global.gc); } -function allowGlobals(...whitelist) { - knownGlobals = knownGlobals.concat(whitelist); +function allowGlobals(...allowlist) { + knownGlobals = knownGlobals.concat(allowlist); } if (process.env.NODE_TEST_KNOWN_GLOBALS !== '0') { @@ -424,7 +424,7 @@ function getCallSite(top) { const err = new Error(); Error.captureStackTrace(err, top); // With the V8 Error API, the stack is not formatted until it is accessed - err.stack; + err.stack; // eslint-disable-line no-unused-expressions Error.prepareStackTrace = originalStackFormatter; return err.stack; } @@ -697,6 +697,20 @@ function gcUntil(name, condition) { }); } +function requireNoPackageJSONAbove() { + let possiblePackage = path.join(__dirname, '..', 'package.json'); + let lastPackage = null; + while (possiblePackage !== lastPackage) { + if (fs.existsSync(possiblePackage)) { + assert.fail( + 'This test shouldn\'t load properties from a package.json above ' + + `its file location. Found package.json at ${possiblePackage}.`); + } + lastPackage = possiblePackage; + possiblePackage = path.join(possiblePackage, '..', '..', 'package.json'); + } +} + const common = { allowGlobals, buildType, @@ -736,6 +750,7 @@ const common = { platformTimeout, printSkipMessage, pwdCommand, + requireNoPackageJSONAbove, runWithInvalidFD, skip, skipIf32Bits, diff --git a/test/common/inspector-helper.js b/test/common/inspector-helper.js index 5aea807b7c0b81..666624490e79a9 100644 --- a/test/common/inspector-helper.js +++ b/test/common/inspector-helper.js @@ -228,7 +228,7 @@ class InspectorSession { waitForNotification(methodOrPredicate, description) { const desc = description || methodOrPredicate; - const message = `Timed out waiting for matching notification (${desc}))`; + const message = `Timed out waiting for matching notification (${desc})`; return fires( this._asyncWaitForNotification(methodOrPredicate), message, TIMEOUT); } diff --git a/test/common/wpt.js b/test/common/wpt.js index 60891f1ca338fe..6e353e9ea66b89 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -9,7 +9,7 @@ const path = require('path'); const { inspect } = require('util'); const { Worker } = require('worker_threads'); -// https://github.com/w3c/testharness.js/blob/master/testharness.js +// https://github.com/web-platform-tests/wpt/blob/master/resources/testharness.js // TODO: get rid of this half-baked harness in favor of the one // pulled from WPT const harnessMock = { diff --git a/test/es-module/test-esm-exports-pending-deprecations.mjs b/test/es-module/test-esm-exports-pending-deprecations.mjs new file mode 100644 index 00000000000000..edc9ae814a59a8 --- /dev/null +++ b/test/es-module/test-esm-exports-pending-deprecations.mjs @@ -0,0 +1,19 @@ +// Flags: --pending-deprecation +import { mustCall } from '../common/index.mjs'; +import assert from 'assert'; + +let curWarning = 0; +const expectedWarnings = [ + '"./sub/"', + '"./fallbackdir/"', + '"./subpath/"' +]; + +process.addListener('warning', mustCall((warning) => { + assert(warning.stack.includes(expectedWarnings[curWarning++]), warning.stack); +}, expectedWarnings.length)); + +(async () => { + await import('./test-esm-exports.mjs'); +})() +.catch((err) => console.error(err)); diff --git a/test/es-module/test-esm-loader-custom-condition.mjs b/test/es-module/test-esm-loader-custom-condition.mjs index 26d1db4842f621..075e4fe2b66029 100644 --- a/test/es-module/test-esm-loader-custom-condition.mjs +++ b/test/es-module/test-esm-loader-custom-condition.mjs @@ -1,7 +1,21 @@ // Flags: --experimental-loader ./test/fixtures/es-module-loaders/loader-with-custom-condition.mjs import '../common/index.mjs'; import assert from 'assert'; +import util from 'util'; import * as ns from '../fixtures/es-modules/conditional-exports.mjs'; assert.deepStrictEqual({ ...ns }, { default: 'from custom condition' }); + +assert.strictEqual( + util.inspect(ns, { showHidden: false }), + "[Module: null prototype] { default: 'from custom condition' }" +); + +assert.strictEqual( + util.inspect(ns, { showHidden: true }), + '[Module: null prototype] {\n' + + " default: 'from custom condition',\n" + + " [Symbol(Symbol.toStringTag)]: 'Module'\n" + + '}' +); diff --git a/test/es-module/test-esm-local-deprecations.mjs b/test/es-module/test-esm-local-deprecations.mjs new file mode 100644 index 00000000000000..96d8cd1c8af735 --- /dev/null +++ b/test/es-module/test-esm-local-deprecations.mjs @@ -0,0 +1,22 @@ +import { mustCall } from '../common/index.mjs'; +import assert from 'assert'; +import fixtures from '../common/fixtures.js'; +import { pathToFileURL } from 'url'; + +const selfDeprecatedFolders = + fixtures.path('/es-modules/self-deprecated-folders/main.js'); + +let curWarning = 0; +const expectedWarnings = [ + '"./" in the "exports" field', + '"#self/" in the "imports" field' +]; + +process.addListener('warning', mustCall((warning) => { + assert(warning.stack.includes(expectedWarnings[curWarning++]), warning.stack); +}, expectedWarnings.length)); + +(async () => { + await import(pathToFileURL(selfDeprecatedFolders)); +})() +.catch((err) => console.error(err)); diff --git a/test/es-module/test-esm-path-posix.mjs b/test/es-module/test-esm-path-posix.mjs new file mode 100644 index 00000000000000..e58e0603180e8f --- /dev/null +++ b/test/es-module/test-esm-path-posix.mjs @@ -0,0 +1,6 @@ +import '../common/index.mjs'; +import assert from 'assert'; +import { posix } from 'path'; +import pathPosix from 'path/posix'; + +assert.strictEqual(pathPosix, posix); diff --git a/test/es-module/test-esm-path-win32.mjs b/test/es-module/test-esm-path-win32.mjs new file mode 100644 index 00000000000000..3b3304410774bd --- /dev/null +++ b/test/es-module/test-esm-path-win32.mjs @@ -0,0 +1,6 @@ +import '../common/index.mjs'; +import assert from 'assert'; +import { win32 } from 'path'; +import pathWin32 from 'path/win32'; + +assert.strictEqual(pathWin32, win32); diff --git a/test/es-module/test-esm-util-types.mjs b/test/es-module/test-esm-util-types.mjs new file mode 100644 index 00000000000000..c13e5ccc7abc73 --- /dev/null +++ b/test/es-module/test-esm-util-types.mjs @@ -0,0 +1,6 @@ +import '../common/index.mjs'; +import assert from 'assert'; +import { types } from 'util'; +import utilTypes from 'util/types'; + +assert.strictEqual(types, utilTypes); diff --git a/test/fixtures/child-process-stay-alive-forever.js b/test/fixtures/child-process-stay-alive-forever.js new file mode 100644 index 00000000000000..fda313eba074c1 --- /dev/null +++ b/test/fixtures/child-process-stay-alive-forever.js @@ -0,0 +1,3 @@ +setInterval(() => { + // Starting an interval to stay alive. +}, 1000); diff --git a/test/fixtures/es-modules/cjs-exports.mjs b/test/fixtures/es-modules/cjs-exports.mjs index 47bb4926af03aa..ac6f60e6aa9dc1 100644 --- a/test/fixtures/es-modules/cjs-exports.mjs +++ b/test/fixtures/es-modules/cjs-exports.mjs @@ -1,11 +1,10 @@ import { strictEqual, deepEqual } from 'assert'; -import m, { π, z } from './exports-cases.js'; +import m, { π } from './exports-cases.js'; import * as ns from './exports-cases.js'; deepEqual(Object.keys(ns), ['default', 'isObject', 'z', 'π']); strictEqual(π, 'yes'); -strictEqual(z, 'yes'); strictEqual(typeof m.isObject, 'undefined'); strictEqual(m.π, 'yes'); strictEqual(m.z, 'yes'); diff --git a/test/fixtures/es-modules/self-deprecated-folders/main.js b/test/fixtures/es-modules/self-deprecated-folders/main.js new file mode 100644 index 00000000000000..842623aa8438e4 --- /dev/null +++ b/test/fixtures/es-modules/self-deprecated-folders/main.js @@ -0,0 +1,2 @@ +import 'self/main.js'; +import '#self/main.js'; diff --git a/test/fixtures/es-modules/self-deprecated-folders/package.json b/test/fixtures/es-modules/self-deprecated-folders/package.json new file mode 100644 index 00000000000000..4e27e6ee79cf5e --- /dev/null +++ b/test/fixtures/es-modules/self-deprecated-folders/package.json @@ -0,0 +1,11 @@ +{ + "name": "self", + "type": "module", + "exports": { + ".": "./main.js", + "./": "./" + }, + "imports": { + "#self/": "./" + } +} diff --git a/test/fixtures/ispreloading.js b/test/fixtures/ispreloading.js new file mode 100644 index 00000000000000..a936bbb6761cc5 --- /dev/null +++ b/test/fixtures/ispreloading.js @@ -0,0 +1,2 @@ +const assert = require('assert'); +assert(module.isPreloading); diff --git a/test/fixtures/source-map/enclosing-call-site-min.js b/test/fixtures/source-map/enclosing-call-site-min.js new file mode 100644 index 00000000000000..45b7ed2b219b86 --- /dev/null +++ b/test/fixtures/source-map/enclosing-call-site-min.js @@ -0,0 +1,3 @@ +var functionA=function(){functionB()};function functionB(){functionC()}var functionC=function(){functionD()},functionD=function(){if(0 { + functionB() +} + +function functionB() { + functionC() +} + +const functionC = () => { + functionD() +} + +const functionD = () => { + (function functionE () { + if (Math.random() > 0) { + throw new Error('an error!') + } + })() +} + +const thrower = functionA + +try { + thrower() +} catch (err) { + throw err +} diff --git a/test/fixtures/source-map/enclosing-call-site.js.map b/test/fixtures/source-map/enclosing-call-site.js.map new file mode 100644 index 00000000000000..d0c785f26091cc --- /dev/null +++ b/test/fixtures/source-map/enclosing-call-site.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"enclosing-call-site-min.js", +"lineCount":1, +"mappings":"AAAA,IAAMA,UAAYA,QAAA,EAAM,CACtBC,SAAA,EADsB,CAIxBA,SAASA,UAAS,EAAG,CACnBC,SAAA,EADmB,CAIrB,IAAMA,UAAYA,QAAA,EAAM,CACtBC,SAAA,EADsB,CAAxB,CAIMA,UAAYA,QAAA,EAAM,CAEpB,GAAoB,CAApB,CAAIC,IAAA,CAAKC,MAAL,EAAJ,CACE,KAAUC,MAAJ,CAAU,WAAV,CAAN,CAHkB,CAJxB,CAYMC,QAAUP,SAEhB,IAAI,CACFO,SAAA,EADE,CAEF,MAAOC,CAAP,CAAY,CACZ,KAAMA,EAAN,CADY;", +"sources":["enclosing-call-site.js"], +"names":["functionA","functionB","functionC","functionD","Math","random","Error","thrower","err"] +} diff --git a/test/fixtures/source-map/throw-on-require-entry.js b/test/fixtures/source-map/throw-on-require-entry.js new file mode 100644 index 00000000000000..94b14810a52ef1 --- /dev/null +++ b/test/fixtures/source-map/throw-on-require-entry.js @@ -0,0 +1,4 @@ +"use strict"; +exports.__esModule = true; +require("./throw-on-require"); +//# sourceMappingURL=throw-on-require-entry.js.map diff --git a/test/fixtures/source-map/throw-on-require-entry.js.map b/test/fixtures/source-map/throw-on-require-entry.js.map new file mode 100644 index 00000000000000..a5f0ca2253fe82 --- /dev/null +++ b/test/fixtures/source-map/throw-on-require-entry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throw-on-require-entry.js","sourceRoot":"","sources":["throw-on-require-entry.ts"],"names":[],"mappings":";;AAAA,8BAA2B"} \ No newline at end of file diff --git a/test/fixtures/source-map/throw-on-require.js b/test/fixtures/source-map/throw-on-require.js new file mode 100644 index 00000000000000..5654f2bfb917ab --- /dev/null +++ b/test/fixtures/source-map/throw-on-require.js @@ -0,0 +1,15 @@ +var ATrue; +(function (ATrue) { + ATrue[ATrue["IsTrue"] = 1] = "IsTrue"; + ATrue[ATrue["IsFalse"] = 0] = "IsFalse"; +})(ATrue || (ATrue = {})); +if (false) { + console.info('unreachable'); +} +else if (true) { + throw Error('throw early'); +} +else { + console.info('unreachable'); +} +//# sourceMappingURL=throw-on-require.js.map \ No newline at end of file diff --git a/test/fixtures/source-map/throw-on-require.js.map b/test/fixtures/source-map/throw-on-require.js.map new file mode 100644 index 00000000000000..94d0df9c03abbd --- /dev/null +++ b/test/fixtures/source-map/throw-on-require.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throw-on-require.js","sourceRoot":"","sources":["throw-on-require.ts"],"names":[],"mappings":"AAAA,IAAK,KAGJ;AAHD,WAAK,KAAK;IACR,qCAAU,CAAA;IACV,uCAAW,CAAA;AACb,CAAC,EAHI,KAAK,KAAL,KAAK,QAGT;AAED,IAAI,KAAK,EAAE;IACT,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;CAC5B;KAAM,IAAI,IAAI,EAAE;IACf,MAAM,KAAK,CAAC,aAAa,CAAC,CAAA;CAC3B;KAAM;IACL,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;CAC5B"} \ No newline at end of file diff --git a/test/fixtures/source-map/throw-on-require.ts b/test/fixtures/source-map/throw-on-require.ts new file mode 100644 index 00000000000000..4aa570302778f4 --- /dev/null +++ b/test/fixtures/source-map/throw-on-require.ts @@ -0,0 +1,12 @@ +enum ATrue { + IsTrue = 1, + IsFalse = 0 +} + +if (false) { + console.info('unreachable') +} else if (true) { + throw Error('throw early') +} else { + console.info('unreachable') +} diff --git a/test/fixtures/source-map/webpack.js b/test/fixtures/source-map/webpack.js new file mode 100644 index 00000000000000..c8bf26ab6f6f59 --- /dev/null +++ b/test/fixtures/source-map/webpack.js @@ -0,0 +1,2 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t){const r=()=>{n()},n=()=>{o()},o=()=>{throw new Error("oh no!")};r()}]); +//# sourceMappingURL=webpack.js.map diff --git a/test/fixtures/source-map/webpack.js.map b/test/fixtures/source-map/webpack.js.map new file mode 100644 index 00000000000000..c0849ff6f0a3ba --- /dev/null +++ b/test/fixtures/source-map/webpack.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./webpack.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","functionB","functionC","functionD","Error"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OAAOrB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAH,EAAoBU,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRZ,EAAoBa,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,G,gBClFrD,MAIMC,EAAY,KAChBC,KAGIA,EAAY,KAChBC,KAGIA,EAAY,KAChB,MAAM,IAAIC,MAAM,WAZhBH","file":"webpack.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","const functionA = () => {\n functionB()\n}\n\nconst functionB = () => {\n functionC()\n}\n\nconst functionC = () => {\n functionD()\n}\n\nconst functionD = () => {\n throw new Error('oh no!')\n}\n\nfunctionA()\n"],"sourceRoot":""} \ No newline at end of file diff --git a/test/fixtures/v8-coverage/interval.js b/test/fixtures/v8-coverage/interval.js new file mode 100644 index 00000000000000..8fb10cef64ddb8 --- /dev/null +++ b/test/fixtures/v8-coverage/interval.js @@ -0,0 +1,14 @@ +'use strict'; +let counter = 0; +let result; +const TEST_INTERVALS = parseInt(process.env.TEST_INTERVALS) || 1; + +const i = setInterval(function interval() { + counter++; + if (counter < TEST_INTERVALS) { + result = 1; + } else { + result = process.hrtime(); + clearInterval(i); + } +}, 100); diff --git a/test/fixtures/v8-coverage/stop-coverage.js b/test/fixtures/v8-coverage/stop-coverage.js new file mode 100644 index 00000000000000..dadfd1900bdd78 --- /dev/null +++ b/test/fixtures/v8-coverage/stop-coverage.js @@ -0,0 +1,3 @@ +'use strict'; +const v8 = require('v8'); +v8.stopCoverage(); diff --git a/test/fixtures/v8-coverage/take-coverage.js b/test/fixtures/v8-coverage/take-coverage.js new file mode 100644 index 00000000000000..766c1f400747a8 --- /dev/null +++ b/test/fixtures/v8-coverage/take-coverage.js @@ -0,0 +1,10 @@ +'use strict'; +const v8 = require('v8'); + +setTimeout(() => { + v8.takeCoverage(); +}, 1000); + +setTimeout(() => { + v8.takeCoverage(); +}, 2000); diff --git a/test/fixtures/workload/bounded.js b/test/fixtures/workload/bounded.js new file mode 100644 index 00000000000000..ddf288d034bd1a --- /dev/null +++ b/test/fixtures/workload/bounded.js @@ -0,0 +1,22 @@ +'use strict'; + +const total = parseInt(process.env.TEST_ALLOCATION) || 5000; +const chunk = parseInt(process.env.TEST_CHUNK) || 1000; +const cleanInterval = parseInt(process.env.TEST_CLEAN_INTERVAL) || 100; +let count = 0; +let arr = []; +function runAllocation() { + count++; + if (count < total) { + if (count % cleanInterval === 0) { + arr.splice(0, arr.length); + setImmediate(runAllocation); + } else { + const str = JSON.stringify(process.config).slice(0, chunk); + arr.push(str); + setImmediate(runAllocation); + } + } +} + +setImmediate(runAllocation); diff --git a/test/fixtures/workload/grow-worker.js b/test/fixtures/workload/grow-worker.js new file mode 100644 index 00000000000000..092d8f27751fc2 --- /dev/null +++ b/test/fixtures/workload/grow-worker.js @@ -0,0 +1,14 @@ +'use strict'; + +const { Worker } = require('worker_threads'); +const path = require('path'); +const max_snapshots = parseInt(process.env.TEST_SNAPSHOTS) || 1; +new Worker(path.join(__dirname, 'grow.js'), { + execArgv: [ + `--heapsnapshot-near-heap-limit=${max_snapshots}`, + ], + resourceLimits: { + maxOldGenerationSizeMb: + parseInt(process.env.TEST_OLD_SPACE_SIZE) || 20 + } +}); diff --git a/test/fixtures/workload/grow.js b/test/fixtures/workload/grow.js new file mode 100644 index 00000000000000..9ac0139b332b52 --- /dev/null +++ b/test/fixtures/workload/grow.js @@ -0,0 +1,12 @@ +'use strict'; + +const chunk = parseInt(process.env.TEST_CHUNK) || 1000; + +let arr = []; +function runAllocation() { + const str = JSON.stringify(process.config).slice(0, chunk); + arr.push(str); + setImmediate(runAllocation); +} + +setImmediate(runAllocation); diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 1ae38fa52d8e90..855fca6d179ff6 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -11,14 +11,15 @@ See [test/wpt](../../wpt/README.md) for information on how these tests are run. Last update: - console: https://github.com/web-platform-tests/wpt/tree/3b1f72e99a/console -- encoding: https://github.com/web-platform-tests/wpt/tree/d7f9e16c9a/encoding -- url: https://github.com/web-platform-tests/wpt/tree/33e4ac0902/url -- resources: https://github.com/web-platform-tests/wpt/tree/1d14e821b9/resources -- interfaces: https://github.com/web-platform-tests/wpt/tree/15e47f779c/interfaces +- encoding: https://github.com/web-platform-tests/wpt/tree/1821fb5f77/encoding +- url: https://github.com/web-platform-tests/wpt/tree/09d8830be1/url +- resources: https://github.com/web-platform-tests/wpt/tree/001e50de41/resources +- interfaces: https://github.com/web-platform-tests/wpt/tree/8719553b2d/interfaces - html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing - html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/264f12bc7b/html/webappapis/timers - hr-time: https://github.com/web-platform-tests/wpt/tree/a5d1774ecf/hr-time - common: https://github.com/web-platform-tests/wpt/tree/4dacb6e2ff/common +- dom/abort: https://github.com/web-platform-tests/wpt/tree/7caa3de747/dom/abort [Web Platform Tests]: https://github.com/web-platform-tests/wpt [`git node wpt`]: https://github.com/nodejs/node-core-utils/blob/master/docs/git-node.md#git-node-wpt diff --git a/test/fixtures/wpt/dom/abort/event.any.js b/test/fixtures/wpt/dom/abort/event.any.js new file mode 100644 index 00000000000000..a67e6f400fcf1d --- /dev/null +++ b/test/fixtures/wpt/dom/abort/event.any.js @@ -0,0 +1,67 @@ +test(t => { + const c = new AbortController(), + s = c.signal; + let state = "begin"; + + assert_false(s.aborted); + + s.addEventListener("abort", + t.step_func(e => { + assert_equals(state, "begin"); + state = "aborted"; + }) + ); + c.abort(); + + assert_equals(state, "aborted"); + assert_true(s.aborted); + + c.abort(); +}, "AbortController abort() should fire event synchronously"); + +test(t => { + const controller = new AbortController(); + const signal = controller.signal; + assert_equals(controller.signal, signal, + "value of controller.signal should not have changed"); + controller.abort(); + assert_equals(controller.signal, signal, + "value of controller.signal should still not have changed"); +}, "controller.signal should always return the same object"); + +test(t => { + const controller = new AbortController(); + const signal = controller.signal; + let eventCount = 0; + signal.onabort = () => { + ++eventCount; + }; + controller.abort(); + assert_true(signal.aborted); + assert_equals(eventCount, 1, "event handler should have been called once"); + controller.abort(); + assert_true(signal.aborted); + assert_equals(eventCount, 1, + "event handler should not have been called again"); +}, "controller.abort() should do nothing the second time it is called"); + +test(t => { + const controller = new AbortController(); + controller.abort(); + controller.signal.onabort = + t.unreached_func("event handler should not be called"); +}, "event handler should not be called if added after controller.abort()"); + +test(t => { + const controller = new AbortController(); + const signal = controller.signal; + signal.onabort = t.step_func(e => { + assert_equals(e.type, "abort", "event type should be abort"); + assert_equals(e.target, signal, "event target should be signal"); + assert_false(e.bubbles, "event should not bubble"); + assert_true(e.isTrusted, "event should be trusted"); + }); + controller.abort(); +}, "the abort event should have the right properties"); + +done(); diff --git a/test/fixtures/wpt/encoding/iso-2022-jp-encoder.html b/test/fixtures/wpt/encoding/iso-2022-jp-encoder.html index 81bd18039b23d3..fa08375d9e0e38 100644 --- a/test/fixtures/wpt/encoding/iso-2022-jp-encoder.html +++ b/test/fixtures/wpt/encoding/iso-2022-jp-encoder.html @@ -12,8 +12,16 @@ }, "iso-2022-jp encoder: " + desc) } - encode("s", "s", "very basic") - encode("\u00A5\u203Es\\\uFF90\u4F69", "%1B(J\\~s%1B(B\\%1B$B%_PP%1B(B", "basics") - encode("\x0E\x0F\x1Bx", "%0E%0F%1Bx", "SO/SI ESC") + encode("s", "s", "very basic"); + encode("\u00A5\u203Es\\\uFF90\u4F69", "%1B(J\\~s%1B(B\\%1B$B%_PP%1B(B", "basics"); + encode("\uFF61", "%1B$B!%23%1B(B", "Katakana"); + encode("\u0393", "%1B$B&%23%1B(B", "jis0208"); + encode("\x0E\x0F\x1Bx", "%26%2365533%3B%26%2365533%3B%26%2365533%3Bx", "SO/SI ESC"); + encode("\u203E\x0E\x0F\x1Bx", "%1B(J~%26%2365533%3B%26%2365533%3B%26%2365533%3Bx%1B(B", "Roman SO/SI ESC"); + encode("\uFF61\x0E\x0F\x1Bx", "%1B$B!%23%1B(B%26%2365533%3B%26%2365533%3B%26%2365533%3Bx", "Katakana SO/SI ESC"); + encode("\u0393\x0E\x0F\x1Bx", "%1B$B&%23%1B(B%26%2365533%3B%26%2365533%3B%26%2365533%3Bx", "jis0208 SO/SI ESC"); encode("\uFFFD", "%26%2365533%3B", "U+FFFD"); + encode("\u203E\uFFFD", "%1B(J~%26%2365533%3B%1B(B", "Roman U+FFFD"); + encode("\uFF61\uFFFD", "%1B$B!%23%1B(B%26%2365533%3B", "Katakana U+FFFD"); + encode("\u0393\uFFFD", "%1B$B&%23%1B(B%26%2365533%3B", "jis0208 U+FFFD"); diff --git a/test/fixtures/wpt/encoding/streams/decode-non-utf8.any.js b/test/fixtures/wpt/encoding/streams/decode-non-utf8.any.js index a7f8ec11c96fc7..2950a9e58edcbd 100644 --- a/test/fixtures/wpt/encoding/streams/decode-non-utf8.any.js +++ b/test/fixtures/wpt/encoding/streams/decode-non-utf8.any.js @@ -25,6 +25,12 @@ const encodings = [ expected: "\u{6c34}", invalid: [255] }, + { + name: 'ISO-2022-JP', + value: [65, 66, 67, 0x1B, 65, 66, 67], + expected: "ABC\u{fffd}ABC", + invalid: [0x0E] + }, { name: 'ISO-8859-14', value: [100, 240, 114], diff --git a/test/fixtures/wpt/interfaces/html.idl b/test/fixtures/wpt/interfaces/html.idl index e92bb8690dddd3..bf8da3733ec26f 100644 --- a/test/fixtures/wpt/interfaces/html.idl +++ b/test/fixtures/wpt/interfaces/html.idl @@ -436,7 +436,6 @@ interface HTMLIFrameElement : HTMLElement { [SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox; [CEReactions] attribute DOMString allow; [CEReactions] attribute boolean allowFullscreen; - [CEReactions] attribute boolean allowPaymentRequest; [CEReactions] attribute DOMString width; [CEReactions] attribute DOMString height; [CEReactions] attribute DOMString referrerPolicy; @@ -1564,16 +1563,18 @@ dictionary ElementDefinitionOptions { [Exposed=Window] interface ElementInternals { - // Form-associated custom elements + // Shadow root access + readonly attribute ShadowRoot? shadowRoot; + // Form-associated custom elements undefined setFormValue((File or USVString or FormData)? value, - optional (File or USVString or FormData)? state); + optional (File or USVString or FormData)? state); readonly attribute HTMLFormElement? form; undefined setValidity(optional ValidityStateFlags flags = {}, - optional DOMString message, - optional HTMLElement anchor); + optional DOMString message, + optional HTMLElement anchor); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; @@ -1583,6 +1584,9 @@ interface ElementInternals { readonly attribute NodeList labels; }; +// Accessibility semantics +ElementInternals includes ARIAMixin; + dictionary ValidityStateFlags { boolean valueMissing = false; boolean typeMismatch = false; @@ -2353,6 +2357,18 @@ interface WorkerLocation { readonly attribute USVString hash; }; +[Exposed=Worklet, SecureContext] +interface WorkletGlobalScope {}; + +[Exposed=Window, SecureContext] +interface Worklet { + [NewObject] Promise addModule(USVString moduleURL, optional WorkletOptions options = {}); +}; + +dictionary WorkletOptions { + RequestCredentials credentials = "same-origin"; +}; + [Exposed=Window] interface Storage { readonly attribute unsigned long length; diff --git a/test/fixtures/wpt/resources/test-only-api.m.js b/test/fixtures/wpt/resources/test-only-api.m.js new file mode 100644 index 00000000000000..984f635abac002 --- /dev/null +++ b/test/fixtures/wpt/resources/test-only-api.m.js @@ -0,0 +1,5 @@ +/* Whether the browser is Chromium-based with MojoJS enabled */ +export const isChromiumBased = 'MojoInterfaceInterceptor' in self; + +/* Whether the browser is WebKit-based with internal test-only API enabled */ +export const isWebKitBased = !isChromiumBased && 'internals' in self; diff --git a/test/fixtures/wpt/resources/test-only-api.m.js.headers b/test/fixtures/wpt/resources/test-only-api.m.js.headers new file mode 100644 index 00000000000000..5e8f640c6659d1 --- /dev/null +++ b/test/fixtures/wpt/resources/test-only-api.m.js.headers @@ -0,0 +1,2 @@ +Content-Type: text/javascript; charset=utf-8 +Cache-Control: max-age=3600 diff --git a/test/fixtures/wpt/resources/testdriver-actions.js b/test/fixtures/wpt/resources/testdriver-actions.js index 870a2e8e266780..f3e6388e8acd19 100644 --- a/test/fixtures/wpt/resources/testdriver-actions.js +++ b/test/fixtures/wpt/resources/testdriver-actions.js @@ -9,6 +9,7 @@ function Actions(defaultTickDuration=16) { this.sourceTypes = new Map([["key", KeySource], ["pointer", PointerSource], + ["wheel", WheelSource], ["none", GeneralSource]]); this.sources = new Map(); this.sourceOrder = []; @@ -22,6 +23,7 @@ this.createSource("none"); this.tickIdx = 0; this.defaultTickDuration = defaultTickDuration; + this.context = null; } Actions.prototype = { @@ -65,7 +67,17 @@ } catch(e) { return Promise.reject(e); } - return test_driver.action_sequence(actions); + return test_driver.action_sequence(actions, this.context); + }, + + /** + * Set the context for the actions + * + * @param {WindowProxy} context - Context in which to run the action sequence + */ + setContext: function(context) { + this.context = context; + return this; }, /** @@ -73,7 +85,7 @@ * If no name is passed, a new source with the given type is * created. * - * @param {String} type - Source type ('none', 'key', or 'pointer') + * @param {String} type - Source type ('none', 'key', 'pointer', or 'wheel') * @param {String?} name - Name of the source * @returns {Source} Source object for that source. */ @@ -154,6 +166,32 @@ return this; }, + /** + * Add a new wheel input source with the given name + * + * @param {String} type - Name of the wheel source + * @param {Bool} set - Set source as the default wheel source + * @returns {Actions} + */ + addWheel: function(name, set=true) { + this.createSource("wheel", name); + if (set) { + this.setWheel(name); + } + return this; + }, + + /** + * Set the current default wheel source + * + * @param {String} name - Name of the wheel source + * @returns {Actions} + */ + setWheel: function(name) { + this.setSource("wheel", name); + return this; + }, + createSource: function(type, name, parameters={}) { if (!this.sources.has(type)) { throw new Error(`${type} is not a valid action type`); @@ -196,8 +234,9 @@ * * @param {Number?} duration - Minimum length of the tick in ms. * @param {String} sourceType - source type - * @param {String?} sourceName - Named key or pointer source to use or null for the default - * key or pointer source + * @param {String?} sourceName - Named key, pointer or wheel source to use + * or null for the default key, pointer or + * wheel source * @returns {Actions} */ pause: function(duration=0, sourceType="none", {sourceName=null}={}) { @@ -280,6 +319,27 @@ source.pointerMove(this, x, y, duration, origin); return this; }, + + /** + * Create a scroll event for the current default wheel source + * + * @param {Number} x - mouse cursor x coordinate + * @param {Number} y - mouse cursor y coordinate + * @param {Number} deltaX - scroll delta value along the x-axis in pixels + * @param {Number} deltaY - scroll delta value along the y-axis in pixels + * @param {String|Element} origin - Origin of the coordinate system. + * Either "viewport" or an Element + * @param {Number?} duration - Time in ms for the scroll + * @param {String?} sourceName - Named wheel source to use or null for the + * default wheel source + * @returns {Actions} + */ + scroll: function(x, y, deltaX, deltaY, + {origin="viewport", duration, sourceName=null}={}) { + let source = this.getSource("wheel", sourceName); + source.scroll(this, x, y, deltaX, deltaY, duration, origin); + return this; + }, }; function GeneralSource() { @@ -417,5 +477,46 @@ }, }; + function WheelSource() { + this.actions = new Map(); + } + + WheelSource.prototype = { + serialize: function(tickCount) { + if (!this.actions.size) { + return undefined; + } + let actions = []; + let data = {"type": "wheel", "actions": actions}; + for (let i=0; i button.addEventListener("click", resolve)); - test_driver.click(button).catch(reject); - }).then(function() { + return test_driver.click(button) + .then(wait_click) + .then(function() { button.remove(); if (typeof action === "function") { return action(); } + return null; }); }, @@ -95,14 +127,6 @@ * the cases the WebDriver command errors */ click: function(element) { - if (window.top !== window) { - return Promise.reject(new Error("can only click in top-level window")); - } - - if (!window.document.contains(element)) { - return Promise.reject(new Error("element in different document or shadow tree")); - } - if (!inView(element)) { element.scrollIntoView({behavior: "instant", block: "end", @@ -135,14 +159,6 @@ * the cases the WebDriver command errors */ send_keys: function(element, keys) { - if (window.top !== window) { - return Promise.reject(new Error("can only send keys in top-level window")); - } - - if (!window.document.contains(element)) { - return Promise.reject(new Error("element in different document or shadow tree")); - } - if (!inView(element)) { element.scrollIntoView({behavior: "instant", block: "end", @@ -166,34 +182,42 @@ * https://github.com/WICG/page-lifecycle/blob/master/README.md|Lifecycle API * for Web Pages} * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * * @returns {Promise} fulfilled after the freeze request is sent, or rejected * in case the WebDriver command errors */ - freeze: function() { + freeze: function(context=null) { return window.test_driver_internal.freeze(); }, /** * Send a sequence of actions * - * This function sends a sequence of actions to the top level window + * This function sends a sequence of actions * to perform. It is modeled after the behaviour of {@link * https://w3c.github.io/webdriver/#actions|WebDriver Actions Command} * * @param {Array} actions - an array of actions. The format is the same as the actions - property of the WebDriver command {@link - https://w3c.github.io/webdriver/#perform-actions|Perform - Actions} command. Each element is an object representing an - input source and each input source itself has an actions - property detailing the behaviour of that source at each timestep - (or tick). Authors are not expected to construct the actions - sequence by hand, but to use the builder api provided in - testdriver-actions.js + * property of the WebDriver command {@link + * https://w3c.github.io/webdriver/#perform-actions|Perform + * Actions} command. Each element is an object representing an + * input source and each input source itself has an actions + * property detailing the behaviour of that source at each timestep + * (or tick). Authors are not expected to construct the actions + * sequence by hand, but to use the builder api provided in + * testdriver-actions.js + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * * @returns {Promise} fufiled after the actions are performed, or rejected in * the cases the WebDriver command errors */ - action_sequence: function(actions) { - return window.test_driver_internal.action_sequence(actions); + action_sequence: function(actions, context=null) { + return window.test_driver_internal.action_sequence(actions, context); }, /** @@ -203,11 +227,15 @@ * by ReportingObserver) for testing purposes, as described in * {@link https://w3c.github.io/reporting/#generate-test-report-command} * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * * @returns {Promise} fulfilled after the report is generated, or * rejected if the report generation fails */ - generate_test_report: function(message) { - return window.test_driver_internal.generate_test_report(message); + generate_test_report: function(message, context=null) { + return window.test_driver_internal.generate_test_report(message, context); }, /** @@ -221,6 +249,9 @@ * object * @param {String} state - the state of the permission * @param {boolean} one_realm - Optional. Whether the permission applies to only one realm + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. * * The above params are used to create a [PermissionSetParameters]{@link * https://w3c.github.io/permissions/#dictdef-permissionsetparameters} object @@ -228,13 +259,13 @@ * @returns {Promise} fulfilled after the permission is set, or rejected if setting the * permission fails */ - set_permission: function(descriptor, state, one_realm) { + set_permission: function(descriptor, state, one_realm, context=null) { let permission_params = { descriptor, state, oneRealm: one_realm, }; - return window.test_driver_internal.set_permission(permission_params); + return window.test_driver_internal.set_permission(permission_params, context); }, /** @@ -247,12 +278,16 @@ * @param {Object} config - an [Authenticator Configuration]{@link * https://w3c.github.io/webauthn/#authenticator-configuration} * object + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * * @returns {Promise} fulfilled after the authenticator is added, or * rejected in the cases the WebDriver command * errors. Returns the ID of the authenticator */ - add_virtual_authenticator: function(config) { - return window.test_driver_internal.add_virtual_authenticator(config); + add_virtual_authenticator: function(config, context=null) { + return window.test_driver_internal.add_virtual_authenticator(config, context); }, /** @@ -264,13 +299,16 @@ * * @param {String} authenticator_id - the ID of the authenticator to be * removed. + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. * * @returns {Promise} fulfilled after the authenticator is removed, or * rejected in the cases the WebDriver command * errors */ - remove_virtual_authenticator: function(authenticator_id) { - return window.test_driver_internal.remove_virtual_authenticator(authenticator_id); + remove_virtual_authenticator: function(authenticator_id, context=null) { + return window.test_driver_internal.remove_virtual_authenticator(authenticator_id, context); }, /** @@ -282,13 +320,16 @@ * @param {Object} credential - A [Credential Parameters]{@link * https://w3c.github.io/webauthn/#credential-parameters} * object + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. * * @returns {Promise} fulfilled after the credential is added, or * rejected in the cases the WebDriver command * errors */ - add_credential: function(authenticator_id, credential) { - return window.test_driver_internal.add_credential(authenticator_id, credential); + add_credential: function(authenticator_id, credential, context=null) { + return window.test_driver_internal.add_credential(authenticator_id, credential, context); }, /** @@ -300,6 +341,9 @@ * https://w3c.github.io/webauthn/#sctn-automation-get-credentials * * @param {String} authenticator_id - the ID of the authenticator + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. * * @returns {Promise} fulfilled after the credentials are returned, or * rejected in the cases the WebDriver command @@ -307,8 +351,8 @@ * Parameters]{@link * https://w3c.github.io/webauthn/#credential-parameters} */ - get_credentials: function(authenticator_id) { - return window.test_driver_internal.get_credentials(authenticator_id); + get_credentials: function(authenticator_id, context=null) { + return window.test_driver_internal.get_credentials(authenticator_id, context=null); }, /** @@ -318,13 +362,16 @@ * * @param {String} authenticator_id - the ID of the authenticator * @param {String} credential_id - the ID of the credential + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. * * @returns {Promise} fulfilled after the credential is removed, or * rejected in the cases the WebDriver command * errors. */ - remove_credential: function(authenticator_id, credential_id) { - return window.test_driver_internal.remove_credential(authenticator_id, credential_id); + remove_credential: function(authenticator_id, credential_id, context=null) { + return window.test_driver_internal.remove_credential(authenticator_id, credential_id, context); }, /** @@ -333,13 +380,16 @@ * https://w3c.github.io/webauthn/#sctn-automation-remove-all-credentials * * @param {String} authenticator_id - the ID of the authenticator + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. * * @returns {Promise} fulfilled after the credentials are removed, or * rejected in the cases the WebDriver command * errors. */ - remove_all_credentials: function(authenticator_id) { - return window.test_driver_internal.remove_all_credentials(authenticator_id); + remove_all_credentials: function(authenticator_id, context=null) { + return window.test_driver_internal.remove_all_credentials(authenticator_id, context); }, /** @@ -351,9 +401,12 @@ * * @param {String} authenticator_id - the ID of the authenticator * @param {boolean} uv - the User Verified flag + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. */ - set_user_verified: function(authenticator_id, uv) { - return window.test_driver_internal.set_user_verified(authenticator_id, uv); + set_user_verified: function(authenticator_id, uv, context=null) { + return window.test_driver_internal.set_user_verified(authenticator_id, uv, context); }, /** @@ -370,16 +423,19 @@ * May be "*" to indicate all origins. * @param {String} state - The storage access setting. * Must be either "allowed" or "blocked". + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. * * @returns {Promise} Fulfilled after the storage access rule has been * set, or rejected if setting the rule fails. */ - set_storage_access: function(origin, embedding_origin, state) { + set_storage_access: function(origin, embedding_origin, state, context=null) { if (state !== "allowed" && state !== "blocked") { throw new Error("storage access status must be 'allowed' or 'blocked'"); } const blocked = state === "blocked"; - return window.test_driver_internal.set_storage_access(origin, embedding_origin, blocked); + return window.test_driver_internal.set_storage_access(origin, embedding_origin, blocked, context); }, }; @@ -392,13 +448,6 @@ */ in_automation: false, - /** - * Waits for a user-initiated click - * - * @param {Element} element - element to be clicked - * @param {{x: number, y: number} coords - viewport coordinates to click at - * @returns {Promise} fulfilled after click occurs - */ click: function(element, coords) { if (this.in_automation) { return Promise.reject(new Error('Not implemented')); @@ -409,14 +458,6 @@ }); }, - /** - * Waits for an element to receive a series of key presses - * - * @param {Element} element - element which should receve key presses - * @param {String} keys - keys to expect - * @returns {Promise} fulfilled after keys are received or rejected if - * an incorrect key sequence is received - */ send_keys: function(element, keys) { if (this.in_automation) { return Promise.reject(new Error('Not implemented')); @@ -449,158 +490,52 @@ }); }, - /** - * Freeze the current page - * - * @returns {Promise} fulfilled after freeze request is sent, otherwise - * it gets rejected - */ - freeze: function() { + freeze: function(context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Send a sequence of pointer actions - * - * @returns {Promise} fufilled after actions are sent, rejected if any actions - * fail - */ - action_sequence: function(actions) { + action_sequence: function(actions, context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Generates a test report on the current page - * - * @param {String} message - the message to be contained in the report - * @returns {Promise} fulfilled after the report is generated, or - * rejected if the report generation fails - */ - generate_test_report: function(message) { + generate_test_report: function(message, context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Sets the state of a permission - * - * This function simulates a user setting a permission into a particular state as described - * in {@link https://w3c.github.io/permissions/#set-permission-command} - * - * @param {Object} permission_params - a [PermissionSetParameters]{@lint - * https://w3c.github.io/permissions/#dictdef-permissionsetparameters} - * object - * @returns {Promise} fulfilled after the permission is set, or rejected if setting the - * permission fails - */ - set_permission: function(permission_params) { + set_permission: function(permission_params, context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Creates a virtual authenticator - * - * @param {Object} config - the authenticator configuration - * @returns {Promise} fulfilled after the authenticator is added, or - * rejected in the cases the WebDriver command - * errors. - */ - add_virtual_authenticator: function(config) { + add_virtual_authenticator: function(config, context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Removes a virtual authenticator - * - * @param {String} authenticator_id - the ID of the authenticator to be - * removed. - * - * @returns {Promise} fulfilled after the authenticator is removed, or - * rejected in the cases the WebDriver command - * errors - */ - remove_virtual_authenticator: function(authenticator_id) { + remove_virtual_authenticator: function(authenticator_id, context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Adds a credential to a virtual authenticator - * - * @param {String} authenticator_id - the ID of the authenticator - * @param {Object} credential - A [Credential Parameters]{@link - * https://w3c.github.io/webauthn/#credential-parameters} - * object - * - * @returns {Promise} fulfilled after the credential is added, or - * rejected in the cases the WebDriver command - * errors - * - */ - add_credential: function(authenticator_id, credential) { + add_credential: function(authenticator_id, credential, context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Gets all the credentials stored in an authenticator - * - * @param {String} authenticator_id - the ID of the authenticator - * - * @returns {Promise} fulfilled after the credentials are returned, or - * rejected in the cases the WebDriver command - * errors. Returns an array of [Credential - * Parameters]{@link - * https://w3c.github.io/webauthn/#credential-parameters} - * - */ - get_credentials: function(authenticator_id) { + get_credentials: function(authenticator_id, context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Remove a credential stored in an authenticator - * - * @param {String} authenticator_id - the ID of the authenticator - * @param {String} credential_id - the ID of the credential - * - * @returns {Promise} fulfilled after the credential is removed, or - * rejected in the cases the WebDriver command - * errors. - * - */ - remove_credential: function(authenticator_id, credential_id) { + remove_credential: function(authenticator_id, credential_id, context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Removes all the credentials stored in a virtual authenticator - * - * @param {String} authenticator_id - the ID of the authenticator - * - * @returns {Promise} fulfilled after the credentials are removed, or - * rejected in the cases the WebDriver command - * errors. - * - */ - remove_all_credentials: function(authenticator_id) { + remove_all_credentials: function(authenticator_id, context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Sets the User Verified flag on an authenticator - * - * @param {String} authenticator_id - the ID of the authenticator - * @param {boolean} uv - the User Verified flag - * - */ - set_user_verified: function(authenticator_id, uv) { + set_user_verified: function(authenticator_id, uv, context=null) { return Promise.reject(new Error("unimplemented")); }, - /** - * Sets the storage access policy for a third-party origin when loaded - * in the current first party context - */ - set_storage_access: function(origin, embedding_origin, blocked) { + set_storage_access: function(origin, embedding_origin, blocked, context=null) { return Promise.reject(new Error("unimplemented")); }, }; diff --git a/test/fixtures/wpt/resources/testharness.js b/test/fixtures/wpt/resources/testharness.js index 61eadfeb6541a9..d50e094117df56 100644 --- a/test/fixtures/wpt/resources/testharness.js +++ b/test/fixtures/wpt/resources/testharness.js @@ -520,6 +520,43 @@ policies and contribution forms [3]. Object.prototype.toString.call(worker) == '[object ServiceWorker]'; } + var seen_func_name = Object.create(null); + + function get_test_name(func, name) + { + if (name) { + return name; + } + + if (func) { + var func_code = func.toString(); + + // Try and match with brackets, but fallback to matching without + var arrow = func_code.match(/^\(\)\s*=>\s*(?:{(.*)}\s*|(.*))$/); + + // Check for JS line separators + if (arrow !== null && !/[\u000A\u000D\u2028\u2029]/.test(func_code)) { + var trimmed = (arrow[1] !== undefined ? arrow[1] : arrow[2]).trim(); + // drop trailing ; if there's no earlier ones + trimmed = trimmed.replace(/^([^;]*)(;\s*)+$/, "$1"); + + if (trimmed) { + let name = trimmed; + if (seen_func_name[trimmed]) { + // This subtest name already exists, so add a suffix. + name += " " + seen_func_name[trimmed]; + } else { + seen_func_name[trimmed] = 0; + } + seen_func_name[trimmed] += 1; + return name; + } + } + } + + return test_environment.next_default_test_name(); + } + /* * API functions */ @@ -530,17 +567,18 @@ policies and contribution forms [3]. tests.status.message = '`test` invoked after `promise_setup`'; tests.complete(); } - var test_name = name ? name : test_environment.next_default_test_name(); + var test_name = get_test_name(func, name); var test_obj = new Test(test_name, properties); var value = test_obj.step(func, test_obj, test_obj); if (value !== undefined) { - var msg = "Test named \"" + test_name + - "\" inappropriately returned a value"; + var msg = 'Test named "' + test_name + + '" passed a function to `test` that returned a value.'; try { - if (value && value.hasOwnProperty("then")) { - msg += ", consider using `promise_test` instead"; + if (value && typeof value.then === 'function') { + msg += ' Consider using `promise_test` instead when ' + + 'using Promises or async/await.'; } } catch (err) {} @@ -565,10 +603,33 @@ policies and contribution forms [3]. name = func; func = null; } - var test_name = name ? name : test_environment.next_default_test_name(); + var test_name = get_test_name(func, name); var test_obj = new Test(test_name, properties); if (func) { - test_obj.step(func, test_obj, test_obj); + var value = test_obj.step(func, test_obj, test_obj); + + // Test authors sometimes return values to async_test, expecting us + // to handle the value somehow. Make doing so a harness error to be + // clear this is invalid, and point authors to promise_test if it + // may be appropriate. + // + // Note that we only perform this check on the initial function + // passed to async_test, not on any later steps - we haven't seen a + // consistent problem with those (and it's harder to check). + if (value !== undefined) { + var msg = 'Test named "' + test_name + + '" passed a function to `async_test` that returned a value.'; + + try { + if (value && typeof value.then === 'function') { + msg += ' Consider using `promise_test` instead when ' + + 'using Promises or async/await.'; + } + } catch (err) {} + + tests.set_status(tests.status.ERROR, msg); + tests.complete(); + } } return test_obj; } @@ -579,7 +640,7 @@ policies and contribution forms [3]. name = func; func = null; } - var test_name = name ? name : test_environment.next_default_test_name(); + var test_name = get_test_name(func, name); var test = new Test(test_name, properties); test._is_promise_test = true; @@ -1323,10 +1384,16 @@ policies and contribution forms [3]. "expected a number but got a ${type_actual}", {type_actual:typeof actual}); - assert(Math.abs(actual - expected) <= epsilon, - "assert_approx_equals", description, - "expected ${expected} +/- ${epsilon} but got ${actual}", - {expected:expected, actual:actual, epsilon:epsilon}); + // The epsilon math below does not place nice with NaN and Infinity + // But in this case Infinity = Infinity and NaN = NaN + if (isFinite(actual) || isFinite(expected)) { + assert(Math.abs(actual - expected) <= epsilon, + "assert_approx_equals", description, + "expected ${expected} +/- ${epsilon} but got ${actual}", + {expected:expected, actual:actual, epsilon:epsilon}); + } else { + assert_equals(actual, expected); + } } expose(assert_approx_equals, "assert_approx_equals"); @@ -3773,7 +3840,7 @@ policies and contribution forms [3]. function get_title() { if ('document' in global_scope) { - //Don't use document.title to work around an Opera bug in XHTML documents + //Don't use document.title to work around an Opera/Presto bug in XHTML documents var title = document.getElementsByTagName("title")[0]; if (title && title.firstChild && title.firstChild.data) { return title.firstChild.data; diff --git a/test/fixtures/wpt/url/README.md b/test/fixtures/wpt/url/README.md index 823a8eec022282..50a71bb482df9e 100644 --- a/test/fixtures/wpt/url/README.md +++ b/test/fixtures/wpt/url/README.md @@ -44,6 +44,10 @@ expected to fail. Tests in `/encoding` and `/html/infrastructure/urls/resolving-urls/query-encoding/` cover the encoding argument to the URL parser. +There's also limited coverage in `resources/percent-encoding.json` for percent-encode after encoding +with _percentEncodeSet_ set to special-query percent-encode set and _spaceAsPlus_ set to false. +(Improvements to expand coverage here are welcome.) + ## Specification The tests in this directory assert conformance with [the URL Standard][URL]. diff --git a/test/fixtures/wpt/url/percent-encoding.window.js b/test/fixtures/wpt/url/percent-encoding.window.js new file mode 100644 index 00000000000000..dcb5c1e55b21b7 --- /dev/null +++ b/test/fixtures/wpt/url/percent-encoding.window.js @@ -0,0 +1,33 @@ +promise_test(() => fetch("resources/percent-encoding.json").then(res => res.json()).then(runTests), "Loading data…"); + +function runTests(testUnits) { + for (const testUnit of testUnits) { + // Ignore comments + if (typeof testUnit === "string") { + continue; + } + for (const encoding of Object.keys(testUnit.output)) { + async_test(t => { + const frame = document.body.appendChild(document.createElement("iframe")); + t.add_cleanup(() => frame.remove()); + frame.onload = t.step_func_done(() => { + const output = frame.contentDocument.querySelector("a"); + // Test that the fragment is always UTF-8 encoded + assert_equals(output.hash, `#${testUnit.output["utf-8"]}`, "fragment"); + assert_equals(output.search, `?${testUnit.output[encoding]}`, "query"); + }); + frame.src = `resources/percent-encoding.py?encoding=${encoding}&value=${toBase64(testUnit.input)}`; + }, `Input ${testUnit.input} with encoding ${encoding}`); + } + } +} + +// Use base64 to avoid relying on the URL parser to get UTF-8 percent-encoding correctly. This does +// not use btoa directly as that only works with code points in the range U+0000 to U+00FF, +// inclusive. +function toBase64(input) { + const bytes = new TextEncoder().encode(input); + const byteString = Array.from(bytes, byte => String.fromCharCode(byte)).join(""); + const encoded = self.btoa(byteString); + return encoded; +} diff --git a/test/fixtures/wpt/url/resources/percent-encoding.json b/test/fixtures/wpt/url/resources/percent-encoding.json new file mode 100644 index 00000000000000..eccd1db62fe601 --- /dev/null +++ b/test/fixtures/wpt/url/resources/percent-encoding.json @@ -0,0 +1,48 @@ +[ + "Tests for percent-encoding.", + { + "input": "\u2020", + "output": { + "big5": "%26%238224%3B", + "euc-kr": "%A2%D3", + "utf-8": "%E2%80%A0", + "windows-1252": "%86" + } + }, + "This uses a trailing A to prevent the URL parser from trimming the C0 control.", + { + "input": "\u000EA", + "output": { + "big5": "%0EA", + "iso-2022-jp": "%26%2365533%3BA", + "utf-8": "%0EA" + } + }, + { + "input": "\u203E\u005C", + "output": { + "iso-2022-jp": "%1B(J~%1B(B\\", + "utf-8": "%E2%80%BE\\" + } + }, + { + "input": "\uE5E5", + "output": { + "gb18030": "%26%2358853%3B", + "utf-8": "%EE%97%A5" + } + }, + { + "input": "\u2212", + "output": { + "shift_jis": "%81|", + "utf-8": "%E2%88%92" + } + }, + { + "input": "á|", + "output": { + "utf-8": "%C3%A1|" + } + } +] diff --git a/test/fixtures/wpt/url/urlsearchparams-constructor.any.js b/test/fixtures/wpt/url/urlsearchparams-constructor.any.js index 1135d5d3dbbfa3..f9878373e5e067 100644 --- a/test/fixtures/wpt/url/urlsearchparams-constructor.any.js +++ b/test/fixtures/wpt/url/urlsearchparams-constructor.any.js @@ -200,6 +200,8 @@ test(function() { { "input": {"+": "%C2"}, "output": [["+", "%C2"]], "name": "object with +" }, { "input": {c: "x", a: "?"}, "output": [["c", "x"], ["a", "?"]], "name": "object with two keys" }, { "input": [["c", "x"], ["a", "?"]], "output": [["c", "x"], ["a", "?"]], "name": "array with two keys" }, + { "input": {"\uD835x": "1", "xx": "2", "\uD83Dx": "3"}, "output": [["\uFFFDx", "3"], ["xx", "2"]], "name": "2 unpaired surrogates (no trailing)" }, + { "input": {"x\uDC53": "1", "x\uDC5C": "2", "x\uDC65": "3"}, "output": [["x\uFFFD", "3"]], "name": "3 unpaired surrogates (no leading)" }, { "input": {"a\0b": "42", "c\uD83D": "23", "d\u1234": "foo"}, "output": [["a\0b", "42"], ["c\uFFFD", "23"], ["d\u1234", "foo"]], "name": "object with NULL, non-ASCII, and surrogate keys" } ].forEach((val) => { test(() => { diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 74d7d39a10360a..f1e9b8304d5fda 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -4,19 +4,19 @@ "path": "console" }, "encoding": { - "commit": "d7f9e16c9a9d578a05b59787ba4de68b710de725", + "commit": "1821fb5f77723b5361058c6a8ed0b71f9d2d6b8d", "path": "encoding" }, "url": { - "commit": "33e4ac09029c463ea6ee57d6f33477a9043e98e8", + "commit": "09d8830be15da7e3a44f32a934609c25357d6ef3", "path": "url" }, "resources": { - "commit": "1d14e821b9586f250e6a31d550504e3d16a05ae7", + "commit": "001e50de41dc35820774b27e31f77a165f4c0b9b", "path": "resources" }, "interfaces": { - "commit": "15e47f779cf61555669b0f67e2c49b9c830b9019", + "commit": "8719553b2dd8f0f39d38253ccac2ee9ab4d6c87b", "path": "interfaces" }, "html/webappapis/microtask-queuing": { @@ -34,5 +34,9 @@ "common": { "commit": "4dacb6e2ff8dbabbe328fde2d8c75491598e4c10", "path": "common" + }, + "dom/abort": { + "commit": "7caa3de7471cf19b78ee9efa313c7341a462b5e3", + "path": "dom/abort" } } \ No newline at end of file diff --git a/test/internet/test-dns.js b/test/internet/test-dns.js index 2bf6c22dfc43e5..14a26c873f17fe 100644 --- a/test/internet/test-dns.js +++ b/test/internet/test-dns.js @@ -401,7 +401,8 @@ TEST(function test_resolveSoa_failure(done) { TEST(async function test_resolveCaa(done) { function validateResult(result) { - assert.ok(Array.isArray(result[0])); + assert.ok(Array.isArray(result), + `expected array, got ${util.inspect(result)}`); assert.strictEqual(result.length, 1); assert.strictEqual(typeof result[0].critical, 'number'); assert.strictEqual(result[0].critical, 0); diff --git a/test/js-native-api/test_general/testEnvCleanup.js b/test/js-native-api/test_general/testEnvCleanup.js index 8d567bef4518ce..99b47a3e62560f 100644 --- a/test/js-native-api/test_general/testEnvCleanup.js +++ b/test/js-native-api/test_general/testEnvCleanup.js @@ -30,7 +30,7 @@ if (process.argv[2] === 'child') { // Make sure that only the latest attached version of a re-wrapped item's // finalizer gets called at env cleanup. module.exports['first wrap'] = - test_general.envCleanupWrap({}, finalizerMessages['first wrap']), + test_general.envCleanupWrap({}, finalizerMessages['first wrap']); test_general.removeWrap(module.exports['first wrap']); test_general.envCleanupWrap(module.exports['first wrap'], finalizerMessages['second wrap']); diff --git a/test/message/nexttick_throw.js b/test/message/nexttick_throw.js index a3369e0d102924..d7e51b411eda64 100644 --- a/test/message/nexttick_throw.js +++ b/test/message/nexttick_throw.js @@ -26,7 +26,7 @@ process.nextTick(function() { process.nextTick(function() { process.nextTick(function() { process.nextTick(function() { - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef,no-unused-expressions undefined_reference_error_maker; }); }); diff --git a/test/message/source_map_enclosing_function.js b/test/message/source_map_enclosing_function.js new file mode 100644 index 00000000000000..43b6931bf1e19e --- /dev/null +++ b/test/message/source_map_enclosing_function.js @@ -0,0 +1,5 @@ +// Flags: --enable-source-maps + +'use strict'; +require('../common'); +require('../fixtures/source-map/enclosing-call-site-min.js'); diff --git a/test/message/source_map_enclosing_function.out b/test/message/source_map_enclosing_function.out new file mode 100644 index 00000000000000..4cb969dc38bf38 --- /dev/null +++ b/test/message/source_map_enclosing_function.out @@ -0,0 +1,20 @@ +*enclosing-call-site.js:16 + throw new Error('an error!') + ^ + +Error: an error! + at functionD (*enclosing-call-site-min.js:1:156) + -> (*enclosing-call-site.js:16:17) + at functionC (*enclosing-call-site-min.js:1:97) + -> (*enclosing-call-site.js:10:3) + at functionB (*enclosing-call-site-min.js:1:60) + -> (*enclosing-call-site.js:6:3) + at functionA (*enclosing-call-site-min.js:1:26) + -> (*enclosing-call-site.js:2:3) + at Object. (*enclosing-call-site-min.js:1:199) + -> (*enclosing-call-site.js:24:3) + at Module._compile (node:internal/modules/cjs/loader:*) + at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) + at Module.load (node:internal/modules/cjs/loader:*) + at Function.Module._load (node:internal/modules/cjs/loader:*) + at Module.require (node:internal/modules/cjs/loader:*) diff --git a/test/message/source_map_reference_error_tabs.out b/test/message/source_map_reference_error_tabs.out index 24ef2ee21b7182..e0adcbc442aeef 100644 --- a/test/message/source_map_reference_error_tabs.out +++ b/test/message/source_map_reference_error_tabs.out @@ -4,9 +4,9 @@ ReferenceError: alert is not defined at Object. (*tabs.coffee:39:5) - -> *tabs.coffee:26:2 + -> *tabs.coffee:26:2* at Object. (*tabs.coffee:53:4) - -> *tabs.coffee:1:14 + -> *tabs.coffee:1:14* at Module._compile (node:internal/modules/cjs/loader:* at Object.Module._extensions..js (node:internal/modules/cjs/loader:* at Module.load (node:internal/modules/cjs/loader:* diff --git a/test/message/source_map_throw_catch.out b/test/message/source_map_throw_catch.out index 5bc180c5c593e5..893e75f92bbf5c 100644 --- a/test/message/source_map_throw_catch.out +++ b/test/message/source_map_throw_catch.out @@ -4,9 +4,9 @@ reachable ^ Error: an exception at branch (*typescript-throw.js:20:15) - -> *typescript-throw.ts:18:11 + -> *typescript-throw.ts:18:11* at Object. (*typescript-throw.js:26:1) - -> *typescript-throw.ts:24:1 + -> *typescript-throw.ts:24:1* at Module._compile (node:internal/modules/cjs/loader:*) at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) at Module.load (node:internal/modules/cjs/loader:*) diff --git a/test/message/source_map_throw_first_tick.out b/test/message/source_map_throw_first_tick.out index 37666b74dc5b04..4fc5aae55bf169 100644 --- a/test/message/source_map_throw_first_tick.out +++ b/test/message/source_map_throw_first_tick.out @@ -4,9 +4,9 @@ reachable ^ Error: an exception at branch (*typescript-throw.js:20:15) - -> *typescript-throw.ts:18:11 + -> *typescript-throw.ts:18:11* at Object. (*typescript-throw.js:26:1) - -> *typescript-throw.ts:24:1 + -> *typescript-throw.ts:24:1* at Module._compile (node:internal/modules/cjs/loader:*) at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) at Module.load (node:internal/modules/cjs/loader:*) diff --git a/test/message/source_map_throw_icu.out b/test/message/source_map_throw_icu.out index c080bb94402353..ba5e94044cb2ed 100644 --- a/test/message/source_map_throw_icu.out +++ b/test/message/source_map_throw_icu.out @@ -4,9 +4,9 @@ Error: an error at Object.createElement (*icu.js:5:7) - -> *icu.jsx:3:23 + -> *icu.jsx:3:23* at Object. (*icu.js:8:82) - -> *icu.jsx:9:5 + -> *icu.jsx:9:5* at Module._compile (node:internal/modules/cjs/loader:* at Object.Module._extensions..js (node:internal/modules/cjs/loader:* at Module.load (node:internal/modules/cjs/loader:* diff --git a/test/message/source_map_throw_set_immediate.out b/test/message/source_map_throw_set_immediate.out index d3a795757f5e24..4893b856f0fe81 100644 --- a/test/message/source_map_throw_set_immediate.out +++ b/test/message/source_map_throw_set_immediate.out @@ -4,7 +4,7 @@ Error: goodbye at *uglify-throw.js:1:43 - -> *uglify-throw-original.js:5:9 + -> at Hello *uglify-throw-original.js:5:9* at Immediate. (*uglify-throw.js:1:60) - -> *uglify-throw-original.js:9:3 + -> *uglify-throw-original.js:9:3* at processImmediate (node:internal/timers:*) diff --git a/test/message/timeout_throw.js b/test/message/timeout_throw.js index 6ae705369786c4..9bcbd85b5036e2 100644 --- a/test/message/timeout_throw.js +++ b/test/message/timeout_throw.js @@ -23,6 +23,6 @@ require('../common'); setTimeout(function() { - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef,no-unused-expressions undefined_reference_error_maker; }, 1); diff --git a/test/message/v8_warning.out b/test/message/v8_warning.out index b006af0518f0f4..6c419c83cddf28 100644 --- a/test/message/v8_warning.out +++ b/test/message/v8_warning.out @@ -1,2 +1,2 @@ (node:*) V8: *v8_warning.js:* Invalid asm.js: Invalid return type -(Use `node --trace-warnings ...` to show where the warning was created) +(Use `* --trace-warnings ...` to show where the warning was created) diff --git a/test/node-api/test_async_context/binding.c b/test/node-api/test_async_context/binding.c new file mode 100644 index 00000000000000..3dab0fd0e818dd --- /dev/null +++ b/test/node-api/test_async_context/binding.c @@ -0,0 +1,129 @@ +#include +#include +#include "../../js-native-api/common.h" + +#define MAX_ARGUMENTS 10 +#define RESERVED_ARGS 3 + +static napi_value MakeCallback(napi_env env, napi_callback_info info) { + size_t argc = MAX_ARGUMENTS; + size_t n; + napi_value args[MAX_ARGUMENTS]; + // NOLINTNEXTLINE (readability/null_usage) + NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); + + NAPI_ASSERT(env, argc > 0, "Wrong number of arguments"); + + napi_value async_context_wrap = args[0]; + napi_value recv = args[1]; + napi_value func = args[2]; + + napi_value argv[MAX_ARGUMENTS - RESERVED_ARGS]; + for (n = RESERVED_ARGS; n < argc; n += 1) { + argv[n - RESERVED_ARGS] = args[n]; + } + + napi_valuetype func_type; + NAPI_CALL(env, napi_typeof(env, func, &func_type)); + + napi_async_context context; + NAPI_CALL(env, napi_unwrap(env, async_context_wrap, (void**)&context)); + + napi_value result; + if (func_type == napi_function) { + NAPI_CALL(env, napi_make_callback( + env, context, recv, func, argc - RESERVED_ARGS, argv, &result)); + } else { + NAPI_ASSERT(env, false, "Unexpected argument type"); + } + + return result; +} + +static void AsyncDestroyCb(napi_env env, void* data, void* hint) { + napi_status status = napi_async_destroy(env, (napi_async_context)data); + // We cannot use NAPI_ASSERT_RETURN_VOID because we need to have a JS stack + // below in order to use exceptions. + assert(status == napi_ok); +} + +#define CREATE_ASYNC_RESOURCE_ARGC 2 + +static napi_value CreateAsyncResource(napi_env env, napi_callback_info info) { + napi_value async_context_wrap; + NAPI_CALL(env, napi_create_object(env, &async_context_wrap)); + + size_t argc = CREATE_ASYNC_RESOURCE_ARGC; + napi_value args[CREATE_ASYNC_RESOURCE_ARGC]; + // NOLINTNEXTLINE (readability/null_usage) + NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); + + napi_value resource = args[0]; + napi_value js_destroy_on_finalizer = args[1]; + napi_valuetype resource_type; + NAPI_CALL(env, napi_typeof(env, resource, &resource_type)); + if (resource_type != napi_object) { + resource = NULL; + } + + napi_value resource_name; + NAPI_CALL(env, napi_create_string_utf8( + env, "test_async", NAPI_AUTO_LENGTH, &resource_name)); + + napi_async_context context; + NAPI_CALL(env, napi_async_init(env, resource, resource_name, &context)); + + bool destroy_on_finalizer = true; + if (argc == 2) { + NAPI_CALL(env, napi_get_value_bool(env, js_destroy_on_finalizer, &destroy_on_finalizer)); + } + if (resource_type == napi_object && destroy_on_finalizer) { + NAPI_CALL(env, napi_add_finalizer( + env, resource, (void*)context, AsyncDestroyCb, NULL, NULL)); + } + NAPI_CALL(env, napi_wrap(env, async_context_wrap, context, NULL, NULL, NULL)); + return async_context_wrap; +} + +#define DESTROY_ASYNC_RESOURCE_ARGC 1 + +static napi_value DestroyAsyncResource(napi_env env, napi_callback_info info) { + size_t argc = DESTROY_ASYNC_RESOURCE_ARGC; + napi_value args[DESTROY_ASYNC_RESOURCE_ARGC]; + // NOLINTNEXTLINE (readability/null_usage) + NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); + NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); + + napi_value async_context_wrap = args[0]; + + napi_async_context async_context; + NAPI_CALL(env, + napi_remove_wrap(env, async_context_wrap, (void**)&async_context)); + NAPI_CALL(env, napi_async_destroy(env, async_context)); + + return async_context_wrap; +} + +static +napi_value Init(napi_env env, napi_value exports) { + napi_value fn; + NAPI_CALL(env, napi_create_function( + // NOLINTNEXTLINE (readability/null_usage) + env, NULL, NAPI_AUTO_LENGTH, MakeCallback, NULL, &fn)); + NAPI_CALL(env, napi_set_named_property(env, exports, "makeCallback", fn)); + NAPI_CALL(env, napi_create_function( + // NOLINTNEXTLINE (readability/null_usage) + env, NULL, NAPI_AUTO_LENGTH, CreateAsyncResource, NULL, &fn)); + NAPI_CALL(env, napi_set_named_property( + env, exports, "createAsyncResource", fn)); + + NAPI_CALL(env, napi_create_function( + // NOLINTNEXTLINE (readability/null_usage) + env, NULL, NAPI_AUTO_LENGTH, DestroyAsyncResource, NULL, &fn)); + NAPI_CALL(env, napi_set_named_property( + env, exports, "destroyAsyncResource", fn)); + + return exports; +} + +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/node-api/test_async_context/binding.gyp b/test/node-api/test_async_context/binding.gyp new file mode 100644 index 00000000000000..23daf507916ff6 --- /dev/null +++ b/test/node-api/test_async_context/binding.gyp @@ -0,0 +1,9 @@ +{ + 'targets': [ + { + 'target_name': 'binding', + 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], + 'sources': [ 'binding.c' ] + } + ] +} diff --git a/test/node-api/test_async_context/test-gcable-callback.js b/test/node-api/test_async_context/test-gcable-callback.js new file mode 100644 index 00000000000000..e66080bb6a3a90 --- /dev/null +++ b/test/node-api/test_async_context/test-gcable-callback.js @@ -0,0 +1,65 @@ +'use strict'; +// Flags: --gc-interval=100 --gc-global + +const common = require('../../common'); +const assert = require('assert'); +const async_hooks = require('async_hooks'); +const { + createAsyncResource, + destroyAsyncResource, + makeCallback, +} = require(`./build/${common.buildType}/binding`); + +// Test for https://github.com/nodejs/node/issues/27218: +// napi_async_destroy() can be called during a regular garbage collection run. + +const hook_result = { + id: null, + init_called: false, + destroy_called: false, +}; + +const test_hook = async_hooks.createHook({ + init: (id, type) => { + if (type === 'test_async') { + hook_result.id = id; + hook_result.init_called = true; + } + }, + destroy: (id) => { + if (id === hook_result.id) hook_result.destroy_called = true; + }, +}); + +test_hook.enable(); +const asyncResource = createAsyncResource( + { foo: 'bar' }, + /* destroy_on_finalizer */false +); + +// Trigger GC. This does *not* use global.gc(), because what we want to verify +// is that `napi_async_destroy()` can be called when there is no JS context +// on the stack at the time of GC. +// Currently, using --gc-interval=100 + 1M elements seems to work fine for this. +const arr = new Array(1024 * 1024); +for (let i = 0; i < arr.length; i++) + arr[i] = {}; + +assert.strictEqual(hook_result.destroy_called, false); +setImmediate(() => { + assert.strictEqual(hook_result.destroy_called, false); + makeCallback(asyncResource, process, () => { + const executionAsyncResource = async_hooks.executionAsyncResource(); + // Assuming the executionAsyncResource was created for the absence of the + // initial `{ foo: 'bar' }`. + // This is the worst path of `napi_async_context` related API of + // recovering from the condition and not break the executionAsyncResource + // shape, although the executionAsyncResource might not be correct. + assert.strictEqual(typeof executionAsyncResource, 'object'); + assert.strictEqual(executionAsyncResource.foo, undefined); + destroyAsyncResource(asyncResource); + setImmediate(() => { + assert.strictEqual(hook_result.destroy_called, true); + }); + }); +}); diff --git a/test/node-api/test_async_context/test-gcable.js b/test/node-api/test_async_context/test-gcable.js new file mode 100644 index 00000000000000..288b7412267dcc --- /dev/null +++ b/test/node-api/test_async_context/test-gcable.js @@ -0,0 +1,44 @@ +'use strict'; +// Flags: --gc-interval=100 --gc-global + +const common = require('../../common'); +const assert = require('assert'); +const async_hooks = require('async_hooks'); +const { createAsyncResource } = require(`./build/${common.buildType}/binding`); + +// Test for https://github.com/nodejs/node/issues/27218: +// napi_async_destroy() can be called during a regular garbage collection run. + +const hook_result = { + id: null, + init_called: false, + destroy_called: false, +}; + +const test_hook = async_hooks.createHook({ + init: (id, type) => { + if (type === 'test_async') { + hook_result.id = id; + hook_result.init_called = true; + } + }, + destroy: (id) => { + if (id === hook_result.id) hook_result.destroy_called = true; + }, +}); + +test_hook.enable(); +createAsyncResource({}); + +// Trigger GC. This does *not* use global.gc(), because what we want to verify +// is that `napi_async_destroy()` can be called when there is no JS context +// on the stack at the time of GC. +// Currently, using --gc-interval=100 + 1M elements seems to work fine for this. +const arr = new Array(1024 * 1024); +for (let i = 0; i < arr.length; i++) + arr[i] = {}; + +assert.strictEqual(hook_result.destroy_called, false); +setImmediate(() => { + assert.strictEqual(hook_result.destroy_called, true); +}); diff --git a/test/node-api/test_async_context/test.js b/test/node-api/test_async_context/test.js new file mode 100644 index 00000000000000..2cf00b1ef7bb0e --- /dev/null +++ b/test/node-api/test_async_context/test.js @@ -0,0 +1,63 @@ +'use strict'; +// Flags: --gc-interval=100 --gc-global + +const common = require('../../common'); +const assert = require('assert'); +const async_hooks = require('async_hooks'); +const { + makeCallback, + createAsyncResource, + destroyAsyncResource, +} = require(`./build/${common.buildType}/binding`); + +const hook_result = { + id: null, + resource: null, + init_called: false, + destroy_called: false, +}; + +const test_hook = async_hooks.createHook({ + init: (id, type, triggerAsyncId, resource) => { + if (type === 'test_async') { + hook_result.id = id; + hook_result.init_called = true; + hook_result.resource = resource; + } + }, + destroy: (id) => { + if (id === hook_result.id) hook_result.destroy_called = true; + }, +}); + +test_hook.enable(); +const resourceWrap = createAsyncResource( + /** + * set resource to NULL to generate a managed resource object + */ + undefined +); + +assert.strictEqual(hook_result.destroy_called, false); +const recv = {}; +makeCallback(resourceWrap, recv, function callback() { + assert.strictEqual(hook_result.destroy_called, false); + assert.strictEqual( + hook_result.resource, + async_hooks.executionAsyncResource() + ); + assert.strictEqual(this, recv); + + setImmediate(() => { + assert.strictEqual(hook_result.destroy_called, false); + assert.notStrictEqual( + hook_result.resource, + async_hooks.executionAsyncResource() + ); + + destroyAsyncResource(resourceWrap); + setImmediate(() => { + assert.strictEqual(hook_result.destroy_called, true); + }); + }); +}); diff --git a/test/node-api/test_make_callback/binding.c b/test/node-api/test_make_callback/binding.c index 782cf0f6fb8f54..214e0a4e182385 100644 --- a/test/node-api/test_make_callback/binding.c +++ b/test/node-api/test_make_callback/binding.c @@ -3,6 +3,7 @@ #include "../../js-native-api/common.h" #define MAX_ARGUMENTS 10 +#define RESERVED_ARGS 3 static napi_value MakeCallback(napi_env env, napi_callback_info info) { size_t argc = MAX_ARGUMENTS; @@ -13,12 +14,13 @@ static napi_value MakeCallback(napi_env env, napi_callback_info info) { NAPI_ASSERT(env, argc > 0, "Wrong number of arguments"); - napi_value recv = args[0]; - napi_value func = args[1]; + napi_value resource = args[0]; + napi_value recv = args[1]; + napi_value func = args[2]; - napi_value argv[MAX_ARGUMENTS - 2]; - for (n = 2; n < argc; n += 1) { - argv[n - 2] = args[n]; + napi_value argv[MAX_ARGUMENTS - RESERVED_ARGS]; + for (n = RESERVED_ARGS; n < argc; n += 1) { + argv[n - RESERVED_ARGS] = args[n]; } napi_valuetype func_type; @@ -30,12 +32,12 @@ static napi_value MakeCallback(napi_env env, napi_callback_info info) { env, "test", NAPI_AUTO_LENGTH, &resource_name)); napi_async_context context; - NAPI_CALL(env, napi_async_init(env, func, resource_name, &context)); + NAPI_CALL(env, napi_async_init(env, resource, resource_name, &context)); napi_value result; if (func_type == napi_function) { NAPI_CALL(env, napi_make_callback( - env, context, recv, func, argc - 2, argv, &result)); + env, context, recv, func, argc - RESERVED_ARGS, argv, &result)); } else { NAPI_ASSERT(env, false, "Unexpected argument type"); } @@ -45,30 +47,6 @@ static napi_value MakeCallback(napi_env env, napi_callback_info info) { return result; } -static void AsyncDestroyCb(napi_env env, void* data, void* hint) { - napi_status status = napi_async_destroy(env, (napi_async_context)data); - // We cannot use NAPI_ASSERT_RETURN_VOID because we need to have a JS stack - // below in order to use exceptions. - assert(status == napi_ok); -} - -static napi_value CreateAsyncResource(napi_env env, napi_callback_info info) { - napi_value object; - NAPI_CALL(env, napi_create_object(env, &object)); - - napi_value resource_name; - NAPI_CALL(env, napi_create_string_utf8( - env, "test_gcable", NAPI_AUTO_LENGTH, &resource_name)); - - napi_async_context context; - NAPI_CALL(env, napi_async_init(env, object, resource_name, &context)); - - NAPI_CALL(env, napi_add_finalizer( - env, object, (void*)context, AsyncDestroyCb, NULL, NULL)); - - return object; -} - static napi_value Init(napi_env env, napi_value exports) { napi_value fn; @@ -76,11 +54,6 @@ napi_value Init(napi_env env, napi_value exports) { // NOLINTNEXTLINE (readability/null_usage) env, NULL, NAPI_AUTO_LENGTH, MakeCallback, NULL, &fn)); NAPI_CALL(env, napi_set_named_property(env, exports, "makeCallback", fn)); - NAPI_CALL(env, napi_create_function( - // NOLINTNEXTLINE (readability/null_usage) - env, NULL, NAPI_AUTO_LENGTH, CreateAsyncResource, NULL, &fn)); - NAPI_CALL(env, napi_set_named_property( - env, exports, "createAsyncResource", fn)); return exports; } diff --git a/test/node-api/test_make_callback/test-async-hooks-gcable.js b/test/node-api/test_make_callback/test-async-hooks-gcable.js deleted file mode 100644 index a9b4d3d75d6040..00000000000000 --- a/test/node-api/test_make_callback/test-async-hooks-gcable.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; -// Flags: --gc-interval=100 --gc-global - -const common = require('../../common'); -const assert = require('assert'); -const async_hooks = require('async_hooks'); -const { createAsyncResource } = require(`./build/${common.buildType}/binding`); - -// Test for https://github.com/nodejs/node/issues/27218: -// napi_async_destroy() can be called during a regular garbage collection run. - -const hook_result = { - id: null, - init_called: false, - destroy_called: false, -}; - -const test_hook = async_hooks.createHook({ - init: (id, type) => { - if (type === 'test_gcable') { - hook_result.id = id; - hook_result.init_called = true; - } - }, - destroy: (id) => { - if (id === hook_result.id) hook_result.destroy_called = true; - }, -}); - -test_hook.enable(); -createAsyncResource(); - -// Trigger GC. This does *not* use global.gc(), because what we want to verify -// is that `napi_async_destroy()` can be called when there is no JS context -// on the stack at the time of GC. -// Currently, using --gc-interval=100 + 1M elements seems to work fine for this. -const arr = new Array(1024 * 1024); -for (let i = 0; i < arr.length; i++) - arr[i] = {}; - -assert.strictEqual(hook_result.destroy_called, false); -setImmediate(() => { - assert.strictEqual(hook_result.destroy_called, true); -}); diff --git a/test/node-api/test_make_callback/test-async-hooks.js b/test/node-api/test_make_callback/test-async-hooks.js index 755a2389c68591..ca31ac4995ae5b 100644 --- a/test/node-api/test_make_callback/test-async-hooks.js +++ b/test/node-api/test_make_callback/test-async-hooks.js @@ -33,7 +33,16 @@ const test_hook = async_hooks.createHook({ }); test_hook.enable(); -makeCallback(process, function() {}); + +/** + * Resource should be able to be arbitrary objects without special internal + * slots. Testing with plain object here. + */ +const resource = {}; +makeCallback(resource, process, function cb() { + assert.strictEqual(this, process); + assert.strictEqual(async_hooks.executionAsyncResource(), resource); +}); assert.strictEqual(hook_result.init_called, true); assert.strictEqual(hook_result.before_called, true); diff --git a/test/node-api/test_make_callback/test.js b/test/node-api/test_make_callback/test.js index dba550a492f0a3..d0b4b22500c9f6 100644 --- a/test/node-api/test_make_callback/test.js +++ b/test/node-api/test_make_callback/test.js @@ -13,20 +13,25 @@ function myMultiArgFunc(arg1, arg2, arg3) { return 42; } -assert.strictEqual(makeCallback(process, common.mustCall(function() { +/** + * Resource should be able to be arbitrary objects without special internal + * slots. Testing with plain object here. + */ +const resource = {}; +assert.strictEqual(makeCallback(resource, process, common.mustCall(function() { assert.strictEqual(arguments.length, 0); assert.strictEqual(this, process); return 42; })), 42); -assert.strictEqual(makeCallback(process, common.mustCall(function(x) { +assert.strictEqual(makeCallback(resource, process, common.mustCall(function(x) { assert.strictEqual(arguments.length, 1); assert.strictEqual(this, process); assert.strictEqual(x, 1337); return 42; }), 1337), 42); -assert.strictEqual(makeCallback(this, +assert.strictEqual(makeCallback(resource, this, common.mustCall(myMultiArgFunc), 1, 2, 3), 42); // TODO(node-api): napi_make_callback needs to support @@ -62,7 +67,7 @@ const target = vm.runInNewContext(` return Object; }) `); -assert.notStrictEqual(makeCallback(process, target, Object), Object); +assert.notStrictEqual(makeCallback(resource, process, target, Object), Object); // Runs in inner context. const forward = vm.runInNewContext(` @@ -78,4 +83,4 @@ function endpoint($Object) { return Object; } -assert.strictEqual(makeCallback(process, forward, endpoint), Object); +assert.strictEqual(makeCallback(resource, process, forward, endpoint), Object); diff --git a/test/node-api/test_worker_terminate_finalization/test.js b/test/node-api/test_worker_terminate_finalization/test.js index 7240520080e66c..937079968f722a 100644 --- a/test/node-api/test_worker_terminate_finalization/test.js +++ b/test/node-api/test_worker_terminate_finalization/test.js @@ -1,6 +1,10 @@ 'use strict'; const common = require('../../common'); +// Refs: https://github.com/nodejs/node/issues/34731 +// Refs: https://github.com/nodejs/node/pull/35777 +// Refs: https://github.com/nodejs/node/issues/35778 + const { Worker, isMainThread } = require('worker_threads'); if (isMainThread) { diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 48d309971a9ad5..6639b5ca1a23d8 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -8,8 +8,6 @@ prefix parallel [$system==win32] # https://github.com/nodejs/node/issues/20750 -test-http2-client-upload: PASS,FLAKY -# https://github.com/nodejs/node/issues/20750 test-http2-client-upload-reject: PASS,FLAKY # https://github.com/nodejs/node/issues/30847 test-http2-compat-client-upload-reject: PASS,FLAKY @@ -27,6 +25,7 @@ test-worker-memory: PASS,FLAKY test-worker-message-port-transfer-terminate: PASS,FLAKY [$system==linux] +# https://github.com/nodejs/node/issues/35586 test-webcrypto-encrypt-decrypt-aes: PASS,FLAKY [$system==macos] diff --git a/test/parallel/test-abortcontroller.js b/test/parallel/test-abortcontroller.js index 19f4eb7b49fa24..283aaa93fc7fca 100644 --- a/test/parallel/test-abortcontroller.js +++ b/test/parallel/test-abortcontroller.js @@ -3,9 +3,10 @@ const common = require('../common'); -const { ok, strictEqual } = require('assert'); +const { ok, strictEqual, throws } = require('assert'); { + // Tests that abort is fired with the correct event type on AbortControllers const ac = new AbortController(); ok(ac.signal); ac.signal.onabort = common.mustCall((event) => { @@ -20,3 +21,49 @@ const { ok, strictEqual } = require('assert'); ac.abort(); ok(ac.signal.aborted); } + +{ + // Tests that abort events are trusted + const ac = new AbortController(); + ac.signal.addEventListener('abort', common.mustCall((event) => { + ok(event.isTrusted); + })); + ac.abort(); +} + +{ + // Tests that abort events have the same `isTrusted` reference + const first = new AbortController(); + const second = new AbortController(); + let ev1, ev2; + const ev3 = new Event('abort'); + first.signal.addEventListener('abort', common.mustCall((event) => { + ev1 = event; + })); + second.signal.addEventListener('abort', common.mustCall((event) => { + ev2 = event; + })); + first.abort(); + second.abort(); + const firstTrusted = Reflect.getOwnPropertyDescriptor(ev1, 'isTrusted').get; + const secondTrusted = Reflect.getOwnPropertyDescriptor(ev2, 'isTrusted').get; + const untrusted = Reflect.getOwnPropertyDescriptor(ev3, 'isTrusted').get; + strictEqual(firstTrusted, secondTrusted); + strictEqual(untrusted, firstTrusted); +} + +{ + // Tests that AbortSignal is impossible to construct manually + const ac = new AbortController(); + throws( + () => new ac.signal.constructor(), + /^TypeError: Illegal constructor$/ + ); +} +{ + // Symbol.toStringTag + const toString = (o) => Object.prototype.toString.call(o); + const ac = new AbortController(); + strictEqual(toString(ac), '[object AbortController]'); + strictEqual(toString(ac.signal), '[object AbortSignal]'); +} diff --git a/test/parallel/test-accessor-properties.js b/test/parallel/test-accessor-properties.js index a84889d617b4ad..ae7919ea318c09 100644 --- a/test/parallel/test-accessor-properties.js +++ b/test/parallel/test-accessor-properties.js @@ -17,7 +17,7 @@ const UDP = internalBinding('udp_wrap').UDP; { // Should throw instead of raise assertions assert.throws(() => { - UDP.prototype.fd; + UDP.prototype.fd; // eslint-disable-line no-unused-expressions }, TypeError); const StreamWrapProto = Object.getPrototypeOf(TTY.prototype); @@ -26,7 +26,7 @@ const UDP = internalBinding('udp_wrap').UDP; properties.forEach((property) => { // Should throw instead of raise assertions assert.throws(() => { - TTY.prototype[property]; + TTY.prototype[property]; // eslint-disable-line no-unused-expressions }, TypeError, `Missing expected TypeError for TTY.prototype.${property}`); // Should not throw for Object.getOwnPropertyDescriptor @@ -42,6 +42,7 @@ const UDP = internalBinding('udp_wrap').UDP; const crypto = internalBinding('crypto'); assert.throws(() => { + // eslint-disable-next-line no-unused-expressions crypto.SecureContext.prototype._external; }, TypeError); diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index cbbf091f04b8a7..7613449c92b477 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -1282,7 +1282,7 @@ assert.throws( ); assert.throws( - () => a.notStrictEqual(5n), + () => a.notStrictEqual(5n), // eslint-disable-line no-restricted-syntax { code: 'ERR_MISSING_ARGS' } ); diff --git a/test/parallel/test-async-hooks-run-in-async-scope-this-arg.js b/test/parallel/test-async-hooks-run-in-async-scope-this-arg.js new file mode 100644 index 00000000000000..a5016da9d5fcd3 --- /dev/null +++ b/test/parallel/test-async-hooks-run-in-async-scope-this-arg.js @@ -0,0 +1,17 @@ +'use strict'; + +// Test that passing thisArg to runInAsyncScope() works. + +const common = require('../common'); +const assert = require('assert'); +const { AsyncResource } = require('async_hooks'); + +const thisArg = {}; + +const res = new AsyncResource('fhqwhgads'); + +function callback() { + assert.strictEqual(this, thisArg); +} + +res.runInAsyncScope(common.mustCall(callback), thisArg); diff --git a/test/parallel/test-async-local-storage-exit-does-not-leak.js b/test/parallel/test-async-local-storage-exit-does-not-leak.js new file mode 100644 index 00000000000000..636d80f788b7fb --- /dev/null +++ b/test/parallel/test-async-local-storage-exit-does-not-leak.js @@ -0,0 +1,25 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const { AsyncLocalStorage } = require('async_hooks'); + +const als = new AsyncLocalStorage(); + +// Make sure _propagate function exists. +assert.ok(typeof als._propagate === 'function'); + +// The als instance should be getting removed from the storageList in +// lib/async_hooks.js when exit(...) is called, therefore when the nested runs +// are called there should be no copy of the als in the storageList to run the +// _propagate method on. +als._propagate = common.mustNotCall('_propagate() should not be called'); + +const done = common.mustCall(); + +function run(count) { + if (count === 0) return done(); + als.run({}, () => { + als.exit(run, --count); + }); +} +run(100); diff --git a/test/parallel/test-blocklist.js b/test/parallel/test-blocklist.js index 24f85e0f1b40f4..953b26eec46ade 100644 --- a/test/parallel/test-blocklist.js +++ b/test/parallel/test-blocklist.js @@ -4,6 +4,7 @@ require('../common'); const { BlockList } = require('net'); const assert = require('assert'); +const util = require('util'); { const blockList = new BlockList(); @@ -135,3 +136,45 @@ const assert = require('assert'); assert(blockList.check('8592:757c:efaf:1fff:ffff:ffff:ffff:ffff', 'ipv6')); assert(!blockList.check('8592:757c:efaf:2fff:ffff:ffff:ffff:ffff', 'ipv6')); } + +{ + assert.throws(() => new BlockList('NOT BLOCK LIST HANDLE'), /ERR_INVALID_ARG_TYPE/); +} + +{ + const blockList = new BlockList(); + assert.throws(() => blockList.addRange('1.1.1.2', '1.1.1.1'), /ERR_INVALID_ARG_VALUE/); +} + +{ + const blockList = new BlockList(); + assert.throws(() => blockList.addSubnet(1), /ERR_INVALID_ARG_TYPE/); + assert.throws(() => blockList.addSubnet('', ''), /ERR_INVALID_ARG_TYPE/); + assert.throws(() => blockList.addSubnet('', 1, 1), /ERR_INVALID_ARG_TYPE/); + assert.throws(() => blockList.addSubnet('', 1, ''), /ERR_INVALID_ARG_VALUE/); + + assert.throws(() => blockList.addSubnet('', -1, 'ipv4'), /ERR_OUT_OF_RANGE/); + assert.throws(() => blockList.addSubnet('', 33, 'ipv4'), /ERR_OUT_OF_RANGE/); + + assert.throws(() => blockList.addSubnet('', -1, 'ipv6'), /ERR_OUT_OF_RANGE/); + assert.throws(() => blockList.addSubnet('', 129, 'ipv6'), /ERR_OUT_OF_RANGE/); +} + +{ + const blockList = new BlockList(); + assert.throws(() => blockList.check(1), /ERR_INVALID_ARG_TYPE/); + assert.throws(() => blockList.check('', 1), /ERR_INVALID_ARG_TYPE/); + assert.throws(() => blockList.check('', ''), /ERR_INVALID_ARG_VALUE/); +} + +{ + const blockList = new BlockList(); + const ret = util.inspect(blockList, { depth: -1 }); + assert.strictEqual(ret, '[BlockList]'); +} + +{ + const blockList = new BlockList(); + const ret = util.inspect(blockList, { depth: null }); + assert(ret.includes('rules: []')); +} diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index 403d8e0993cf74..0887b8a48362f6 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -49,6 +49,8 @@ const expectedModules = new Set([ 'NativeModule internal/fixed_queue', 'NativeModule internal/fs/dir', 'NativeModule internal/fs/utils', + 'NativeModule internal/fs/promises', + 'NativeModule internal/fs/rimraf', 'NativeModule internal/idna', 'NativeModule internal/linkedlist', 'NativeModule internal/modules/run_main', @@ -76,6 +78,7 @@ const expectedModules = new Set([ 'NativeModule internal/process/warning', 'NativeModule internal/querystring', 'NativeModule internal/source_map/source_map_cache', + 'NativeModule internal/streams/add-abort-signal', 'NativeModule internal/streams/buffer_list', 'NativeModule internal/streams/destroy', 'NativeModule internal/streams/duplex', @@ -92,6 +95,7 @@ const expectedModules = new Set([ 'NativeModule internal/util', 'NativeModule internal/util/debuglog', 'NativeModule internal/util/inspect', + 'NativeModule internal/util/iterable_weak_map', 'NativeModule internal/util/types', 'NativeModule internal/validators', 'NativeModule internal/vm/module', @@ -108,6 +112,7 @@ const expectedModules = new Set([ if (!common.isMainThread) { [ 'Internal Binding messaging', + 'Internal Binding performance', 'Internal Binding symbols', 'Internal Binding worker', 'NativeModule internal/streams/duplex', diff --git a/test/parallel/test-buffer-backing-arraybuffer.js b/test/parallel/test-buffer-backing-arraybuffer.js index e7e15c079e6332..75dcd60068d5ab 100644 --- a/test/parallel/test-buffer-backing-arraybuffer.js +++ b/test/parallel/test-buffer-backing-arraybuffer.js @@ -31,7 +31,7 @@ for (const { length, expectOnHeap } of tests) { `for ${array.constructor.name}, length = ${length}`); // Consistency check: Accessing .buffer should create it. - array.buffer; + array.buffer; // eslint-disable-line no-unused-expressions assert(arrayBufferViewHasBuffer(array)); } } diff --git a/test/parallel/test-buffer-constructor-deprecation-error.js b/test/parallel/test-buffer-constructor-deprecation-error.js index 46535e103b33ee..6628bd490a2ff3 100644 --- a/test/parallel/test-buffer-constructor-deprecation-error.js +++ b/test/parallel/test-buffer-constructor-deprecation-error.js @@ -14,4 +14,4 @@ process.on('warning', common.mustCall()); Error.prepareStackTrace = (err, trace) => new Buffer(10); -new Error().stack; +new Error().stack; // eslint-disable-line no-unused-expressions diff --git a/test/parallel/test-buffer-fakes.js b/test/parallel/test-buffer-fakes.js index d126d39aa95263..da78fe0895e6bb 100644 --- a/test/parallel/test-buffer-fakes.js +++ b/test/parallel/test-buffer-fakes.js @@ -14,7 +14,7 @@ assert.throws(function() { }, TypeError); assert.throws(function() { - +Buffer.prototype; + +Buffer.prototype; // eslint-disable-line no-unused-expressions }, TypeError); assert.throws(function() { diff --git a/test/parallel/test-buffer-pool-untransferable.js b/test/parallel/test-buffer-pool-untransferable.js index 96e109c113fee8..d39b03435fa5b7 100644 --- a/test/parallel/test-buffer-pool-untransferable.js +++ b/test/parallel/test-buffer-pool-untransferable.js @@ -15,6 +15,6 @@ const length = a.length; const { port1 } = new MessageChannel(); port1.postMessage(a, [ a.buffer ]); -// Verify that the pool ArrayBuffer has not actually been transfered: +// Verify that the pool ArrayBuffer has not actually been transferred: assert.strictEqual(a.buffer, b.buffer); assert.strictEqual(a.length, length); diff --git a/test/parallel/test-child-process-execfile.js b/test/parallel/test-child-process-execfile.js index bc0495b3332384..aec80b4e2baf22 100644 --- a/test/parallel/test-child-process-execfile.js +++ b/test/parallel/test-child-process-execfile.js @@ -3,10 +3,12 @@ const common = require('../common'); const assert = require('assert'); const execFile = require('child_process').execFile; +const { getEventListeners } = require('events'); const { getSystemErrorName } = require('util'); const fixtures = require('../common/fixtures'); const fixture = fixtures.path('exit.js'); +const echoFixture = fixtures.path('echo.js'); const execOpts = { encoding: 'utf8', shell: true }; { @@ -45,3 +47,37 @@ const execOpts = { encoding: 'utf8', shell: true }; // Verify the shell option works properly execFile(process.execPath, [fixture, 0], execOpts, common.mustSucceed()); } + +{ + // Verify that the signal option works properly + const ac = new AbortController(); + const { signal } = ac; + + const callback = common.mustCall((err) => { + assert.strictEqual(err.code, 'ABORT_ERR'); + assert.strictEqual(err.name, 'AbortError'); + }); + execFile(process.execPath, [echoFixture, 0], { signal }, callback); + ac.abort(); +} + +{ + // Verify that if something different than Abortcontroller.signal + // is passed, ERR_INVALID_ARG_TYPE is thrown + assert.throws(() => { + const callback = common.mustNotCall(() => {}); + + execFile(process.execPath, [echoFixture, 0], { signal: 'hello' }, callback); + }, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' }); +} +{ + // Verify that the process completing removes the abort listener + const ac = new AbortController(); + const { signal } = ac; + + const callback = common.mustCall((err) => { + assert.strictEqual(getEventListeners(ac.signal).length, 0); + assert.strictEqual(err, null); + }); + execFile(process.execPath, [fixture, 0], { signal }, callback); +} diff --git a/test/parallel/test-child-process-fork-abort-signal.js b/test/parallel/test-child-process-fork-abort-signal.js new file mode 100644 index 00000000000000..63367479234d7f --- /dev/null +++ b/test/parallel/test-child-process-fork-abort-signal.js @@ -0,0 +1,33 @@ +'use strict'; + +const { mustCall } = require('../common'); +const { strictEqual } = require('assert'); +const fixtures = require('../common/fixtures'); +const { fork } = require('child_process'); + +{ + // Test aborting a forked child_process after calling fork + const ac = new AbortController(); + const { signal } = ac; + const cp = fork(fixtures.path('child-process-stay-alive-forever.js'), { + signal + }); + cp.on('exit', mustCall()); + cp.on('error', mustCall((err) => { + strictEqual(err.name, 'AbortError'); + })); + process.nextTick(() => ac.abort()); +} +{ + // Test passing an already aborted signal to a forked child_process + const ac = new AbortController(); + const { signal } = ac; + ac.abort(); + const cp = fork(fixtures.path('child-process-stay-alive-forever.js'), { + signal + }); + cp.on('exit', mustCall()); + cp.on('error', mustCall((err) => { + strictEqual(err.name, 'AbortError'); + })); +} diff --git a/test/parallel/test-child-process-pipe-dataflow.js b/test/parallel/test-child-process-pipe-dataflow.js index 5f425a6f3d087c..31846c8a715c4c 100644 --- a/test/parallel/test-child-process-pipe-dataflow.js +++ b/test/parallel/test-child-process-pipe-dataflow.js @@ -61,8 +61,13 @@ const MB = KB * KB; })); }); + let wcBuf = ''; wc.stdout.on('data', common.mustCall((data) => { + wcBuf += data; + })); + + wc.on('close', common.mustCall(() => { // Grep always adds one extra byte at the end. - assert.strictEqual(data.toString().trim(), (MB + 1).toString()); + assert.strictEqual(wcBuf.trim(), (MB + 1).toString()); })); } diff --git a/test/parallel/test-child-process-spawn-controller.js b/test/parallel/test-child-process-spawn-controller.js new file mode 100644 index 00000000000000..399558569cc1ec --- /dev/null +++ b/test/parallel/test-child-process-spawn-controller.js @@ -0,0 +1,21 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const cp = require('child_process'); + +// Verify that passing an AbortSignal works +const controller = new AbortController(); +const { signal } = controller; + +const echo = cp.spawn('echo', ['fun'], { + encoding: 'utf8', + shell: true, + signal +}); + +echo.on('error', common.mustCall((e) => { + assert.strictEqual(e.name, 'AbortError'); +})); + +controller.abort(); diff --git a/test/parallel/test-child-process-spawn-error.js b/test/parallel/test-child-process-spawn-error.js index d6560ee9cc5734..a3464a505d4f7c 100644 --- a/test/parallel/test-child-process-spawn-error.js +++ b/test/parallel/test-child-process-spawn-error.js @@ -41,6 +41,8 @@ assert.strictEqual(enoentChild.stdio[0], enoentChild.stdin); assert.strictEqual(enoentChild.stdio[1], enoentChild.stdout); assert.strictEqual(enoentChild.stdio[2], enoentChild.stderr); +enoentChild.on('spawn', common.mustNotCall()); + enoentChild.on('error', common.mustCall(function(err) { assert.strictEqual(err.code, 'ENOENT'); assert.strictEqual(getSystemErrorName(err.errno), 'ENOENT'); diff --git a/test/parallel/test-child-process-spawn-event.js b/test/parallel/test-child-process-spawn-event.js new file mode 100644 index 00000000000000..c025d8628681e8 --- /dev/null +++ b/test/parallel/test-child-process-spawn-event.js @@ -0,0 +1,27 @@ +'use strict'; +const common = require('../common'); +const spawn = require('child_process').spawn; +const assert = require('assert'); + +const subprocess = spawn('echo', ['ok']); + +let didSpawn = false; +subprocess.on('spawn', function() { + didSpawn = true; +}); +function mustCallAfterSpawn() { + return common.mustCall(function() { + assert.ok(didSpawn); + }); +} + +subprocess.on('error', common.mustNotCall()); +subprocess.on('spawn', common.mustCall()); +subprocess.stdout.on('data', mustCallAfterSpawn()); +subprocess.stdout.on('end', mustCallAfterSpawn()); +subprocess.stdout.on('close', mustCallAfterSpawn()); +subprocess.stderr.on('data', common.mustNotCall()); +subprocess.stderr.on('end', mustCallAfterSpawn()); +subprocess.stderr.on('close', mustCallAfterSpawn()); +subprocess.on('exit', mustCallAfterSpawn()); +subprocess.on('close', mustCallAfterSpawn()); diff --git a/test/parallel/test-child-process-stdin-ipc.js b/test/parallel/test-child-process-stdin-ipc.js index b162ced916096d..945960b99b72cc 100644 --- a/test/parallel/test-child-process-stdin-ipc.js +++ b/test/parallel/test-child-process-stdin-ipc.js @@ -27,7 +27,7 @@ const spawn = require('child_process').spawn; if (process.argv[2] === 'child') { // Just reference stdin, it should start it - process.stdin; + process.stdin; // eslint-disable-line no-unused-expressions return; } diff --git a/test/parallel/test-crypto-keygen.js b/test/parallel/test-crypto-keygen.js index 6a978c97fd171e..f59a26a422f96d 100644 --- a/test/parallel/test-crypto-keygen.js +++ b/test/parallel/test-crypto-keygen.js @@ -7,6 +7,7 @@ if (!common.hasCrypto) const assert = require('assert'); const { constants, + createPrivateKey, createSign, createVerify, generateKeyPair, @@ -1171,3 +1172,41 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher); ); } } + +{ + // Passing an empty passphrase string should not cause OpenSSL's default + // passphrase prompt in the terminal. + // See https://github.com/nodejs/node/issues/35898. + + for (const type of ['pkcs1', 'pkcs8']) { + generateKeyPair('rsa', { + modulusLength: 1024, + privateKeyEncoding: { + type, + format: 'pem', + cipher: 'aes-256-cbc', + passphrase: '' + } + }, common.mustSucceed((publicKey, privateKey) => { + assert.strictEqual(publicKey.type, 'public'); + + for (const passphrase of ['', Buffer.alloc(0)]) { + const privateKeyObject = createPrivateKey({ + passphrase, + key: privateKey + }); + assert.strictEqual(privateKeyObject.asymmetricKeyType, 'rsa'); + } + + // Encrypting with an empty passphrase is not the same as not encrypting + // the key, and not specifying a passphrase should fail when decoding it. + assert.throws(() => { + return testSignVerify(publicKey, privateKey); + }, { + name: 'TypeError', + code: 'ERR_MISSING_PASSPHRASE', + message: 'Passphrase required for encrypted key' + }); + })); + } +} diff --git a/test/parallel/test-crypto-pbkdf2.js b/test/parallel/test-crypto-pbkdf2.js index 721df71fe72d93..ea0fbab7744b1f 100644 --- a/test/parallel/test-crypto-pbkdf2.js +++ b/test/parallel/test-crypto-pbkdf2.js @@ -6,19 +6,26 @@ if (!common.hasCrypto) const assert = require('assert'); const crypto = require('crypto'); -// -// Test PBKDF2 with RFC 6070 test vectors (except #4) -// -function testPBKDF2(password, salt, iterations, keylen, expected) { - const actual = - crypto.pbkdf2Sync(password, salt, iterations, keylen, 'sha256'); - assert.strictEqual(actual.toString('latin1'), expected); +function runPBKDF2(password, salt, iterations, keylen, hash) { + const syncResult = + crypto.pbkdf2Sync(password, salt, iterations, keylen, hash); - crypto.pbkdf2(password, salt, iterations, keylen, 'sha256', (err, actual) => { - assert.strictEqual(actual.toString('latin1'), expected); - }); + crypto.pbkdf2(password, salt, iterations, keylen, hash, + common.mustSucceed((asyncResult) => { + assert.deepStrictEqual(asyncResult, syncResult); + })); + + return syncResult; +} + +function testPBKDF2(password, salt, iterations, keylen, expected, encoding) { + const actual = runPBKDF2(password, salt, iterations, keylen, 'sha256'); + assert.strictEqual(actual.toString(encoding || 'latin1'), expected); } +// +// Test PBKDF2 with RFC 6070 test vectors (except #4) +// testPBKDF2('password', 'salt', 1, 20, '\x12\x0f\xb6\xcf\xfc\xf8\xb3\x2c\x43\xe7\x22\x52' + @@ -43,15 +50,9 @@ testPBKDF2('pass\0word', 'sa\0lt', 4096, 16, '\x89\xb6\x9d\x05\x16\xf8\x29\x89\x3c\x69\x62\x26\x65' + '\x0a\x86\x87'); -const expected = - '64c486c55d30d4c5a079b8823b7d7cb37ff0556f537da8410233bcec330ed956'; -const key = crypto.pbkdf2Sync('password', 'salt', 32, 32, 'sha256'); -assert.strictEqual(key.toString('hex'), expected); - -crypto.pbkdf2('password', 'salt', 32, 32, 'sha256', common.mustSucceed(ondone)); -function ondone(key) { - assert.strictEqual(key.toString('hex'), expected); -} +testPBKDF2('password', 'salt', 32, 32, + '64c486c55d30d4c5a079b8823b7d7cb37ff0556f537da8410233bcec330ed956', + 'hex'); // Error path should not leak memory (check with valgrind). assert.throws( @@ -197,38 +198,12 @@ assert.throws( ); }); -// Any TypedArray should work for password and salt -crypto.pbkdf2(new Uint8Array(10), 'salt', 8, 8, 'sha256', common.mustSucceed()); -crypto.pbkdf2('pass', new Uint8Array(10), 8, 8, 'sha256', common.mustSucceed()); -crypto.pbkdf2(new Uint16Array(10), 'salt', 8, 8, 'sha1', common.mustSucceed()); -crypto.pbkdf2('pass', new Uint16Array(10), 8, 8, 'sha1', common.mustSucceed()); -crypto.pbkdf2(new Uint32Array(10), 'salt', 8, 8, 'sha1', common.mustSucceed()); -crypto.pbkdf2('pass', new Uint32Array(10), 8, 8, 'sha1', common.mustSucceed()); -crypto.pbkdf2(new Float32Array(10), 'salt', 8, 8, 'sha1', common.mustSucceed()); -crypto.pbkdf2('pass', new Float32Array(10), 8, 8, 'sha1', common.mustSucceed()); -crypto.pbkdf2(new Float64Array(10), 'salt', 8, 8, 'sha1', common.mustSucceed()); -crypto.pbkdf2('pass', new Float64Array(10), 8, 8, 'sha1', common.mustSucceed()); -crypto.pbkdf2(new ArrayBuffer(10), 'salt', 8, 8, 'sha1', common.mustSucceed()); -crypto.pbkdf2('pass', new ArrayBuffer(10), 8, 8, 'sha1', common.mustSucceed()); -crypto.pbkdf2(new SharedArrayBuffer(10), 'salt', 8, 8, 'sha256', - common.mustSucceed()); -crypto.pbkdf2('pass', new SharedArrayBuffer(10), 8, 8, 'sha256', - common.mustSucceed()); - -crypto.pbkdf2Sync(new Uint8Array(10), 'salt', 8, 8, 'sha256'); -crypto.pbkdf2Sync('pass', new Uint8Array(10), 8, 8, 'sha256'); -crypto.pbkdf2Sync(new Uint16Array(10), 'salt', 8, 8, 'sha256'); -crypto.pbkdf2Sync('pass', new Uint16Array(10), 8, 8, 'sha256'); -crypto.pbkdf2Sync(new Uint32Array(10), 'salt', 8, 8, 'sha256'); -crypto.pbkdf2Sync('pass', new Uint32Array(10), 8, 8, 'sha256'); -crypto.pbkdf2Sync(new Float32Array(10), 'salt', 8, 8, 'sha256'); -crypto.pbkdf2Sync('pass', new Float32Array(10), 8, 8, 'sha256'); -crypto.pbkdf2Sync(new Float64Array(10), 'salt', 8, 8, 'sha256'); -crypto.pbkdf2Sync('pass', new Float64Array(10), 8, 8, 'sha256'); -crypto.pbkdf2Sync(new ArrayBuffer(10), 'salt', 8, 8, 'sha256'); -crypto.pbkdf2Sync('pass', new ArrayBuffer(10), 8, 8, 'sha256'); -crypto.pbkdf2Sync(new SharedArrayBuffer(10), 'salt', 8, 8, 'sha256'); -crypto.pbkdf2Sync('pass', new SharedArrayBuffer(10), 8, 8, 'sha256'); +// Any TypedArray should work for password and salt. +for (const SomeArray of [Uint8Array, Uint16Array, Uint32Array, Float32Array, + Float64Array, ArrayBuffer, SharedArrayBuffer]) { + runPBKDF2(new SomeArray(10), 'salt', 8, 8, 'sha256'); + runPBKDF2('pass', new SomeArray(10), 8, 8, 'sha256'); +} assert.throws( () => crypto.pbkdf2('pass', 'salt', 8, 8, 'md55', common.mustNotCall()), @@ -252,6 +227,5 @@ const kNotPBKDF2Supported = ['shake128', 'shake256']; crypto.getHashes() .filter((hash) => !kNotPBKDF2Supported.includes(hash)) .forEach((hash) => { - crypto.pbkdf2Sync(new Uint8Array(10), 'salt', 8, 8, hash); - crypto.pbkdf2(new Uint8Array(10), 'salt', 8, 8, hash, common.mustCall()); + runPBKDF2(new Uint8Array(10), 'salt', 8, 8, hash); }); diff --git a/test/parallel/test-crypto-randomfillsync-regression.js b/test/parallel/test-crypto-randomfillsync-regression.js new file mode 100644 index 00000000000000..7a378642588d9e --- /dev/null +++ b/test/parallel/test-crypto-randomfillsync-regression.js @@ -0,0 +1,18 @@ +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const { randomFillSync } = require('crypto'); +const { notStrictEqual } = require('assert'); + +const ab = new ArrayBuffer(20); +const buf = Buffer.from(ab, 10); + +const before = buf.toString('hex'); + +randomFillSync(buf); + +const after = buf.toString('hex'); + +notStrictEqual(before, after); diff --git a/test/parallel/test-crypto-scrypt.js b/test/parallel/test-crypto-scrypt.js index 6c19dee23291bb..aec86d64891518 100644 --- a/test/parallel/test-crypto-scrypt.js +++ b/test/parallel/test-crypto-scrypt.js @@ -8,7 +8,7 @@ const assert = require('assert'); const crypto = require('crypto'); const { internalBinding } = require('internal/test/binding'); -if (typeof internalBinding('crypto').scrypt !== 'function') +if (typeof internalBinding('crypto').ScryptJob !== 'function') common.skip('no scrypt support'); const good = [ @@ -156,9 +156,7 @@ for (const options of good) { for (const options of bad) { const expected = { - code: 'ERR_CRYPTO_SCRYPT_INVALID_PARAMETER', - message: 'Invalid scrypt parameter', - name: 'Error', + message: /Invalid scrypt param/, }; assert.throws(() => crypto.scrypt('pass', 'salt', 1, options, () => {}), expected); @@ -168,9 +166,7 @@ for (const options of bad) { for (const options of toobig) { const expected = { - message: new RegExp('error:[^:]+:digital envelope routines:' + - '(?:EVP_PBE_scrypt|scrypt_alg):memory limit exceeded'), - name: 'Error', + message: /Invalid scrypt param/ }; assert.throws(() => crypto.scrypt('pass', 'salt', 1, options, () => {}), expected); diff --git a/test/parallel/test-dgram-deprecation-error.js b/test/parallel/test-dgram-deprecation-error.js index d244940b64d793..37664a5720c96f 100644 --- a/test/parallel/test-dgram-deprecation-error.js +++ b/test/parallel/test-dgram-deprecation-error.js @@ -31,7 +31,7 @@ const propertyCases = propertiesToTest.map((propName) => { `Socket.prototype.${propName} is deprecated`, 'DEP0112' ); - sock[propName]; + sock[propName]; // eslint-disable-line no-unused-expressions }, () => { // Test property setter diff --git a/test/parallel/test-diagnostics-channel-has-subscribers.js b/test/parallel/test-diagnostics-channel-has-subscribers.js new file mode 100644 index 00000000000000..de37267555089e --- /dev/null +++ b/test/parallel/test-diagnostics-channel-has-subscribers.js @@ -0,0 +1,10 @@ +'use strict'; +require('../common'); +const assert = require('assert'); +const { channel, hasSubscribers } = require('diagnostics_channel'); + +const dc = channel('test'); +assert.ok(!hasSubscribers('test')); + +dc.subscribe(() => {}); +assert.ok(hasSubscribers('test')); diff --git a/test/parallel/test-diagnostics-channel-http-server-start.js b/test/parallel/test-diagnostics-channel-http-server-start.js new file mode 100644 index 00000000000000..9a8136d4cc5839 --- /dev/null +++ b/test/parallel/test-diagnostics-channel-http-server-start.js @@ -0,0 +1,65 @@ +'use strict'; + +const common = require('../common'); +const { AsyncLocalStorage } = require('async_hooks'); +const dc = require('diagnostics_channel'); +const assert = require('assert'); +const http = require('http'); + +const incomingStartChannel = dc.channel('http.server.request.start'); +const outgoingFinishChannel = dc.channel('http.server.response.finish'); + +const als = new AsyncLocalStorage(); +let context; + +// Bind requests to an AsyncLocalStorage context +incomingStartChannel.subscribe(common.mustCall((message) => { + als.enterWith(message); + context = message; +})); + +// When the request ends, verify the context has been maintained +// and that the messages contain the expected data +outgoingFinishChannel.subscribe(common.mustCall((message) => { + const data = { + request, + response, + server, + socket: request.socket + }; + + // Context is maintained + compare(als.getStore(), context); + + compare(context, data); + compare(message, data); +})); + +let request; +let response; + +const server = http.createServer(common.mustCall((req, res) => { + request = req; + response = res; + + setTimeout(() => { + res.end('done'); + }, 1); +})); + +server.listen(() => { + const { port } = server.address(); + http.get(`http://localhost:${port}`, (res) => { + res.resume(); + res.on('end', () => { + server.close(); + }); + }); +}); + +function compare(a, b) { + assert.strictEqual(a.request, b.request); + assert.strictEqual(a.response, b.response); + assert.strictEqual(a.socket, b.socket); + assert.strictEqual(a.server, b.server); +} diff --git a/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js b/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js new file mode 100644 index 00000000000000..bae69b02415785 --- /dev/null +++ b/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js @@ -0,0 +1,39 @@ +'use strict'; + +const common = require('../common'); +const dc = require('diagnostics_channel'); +const assert = require('assert'); +const { Channel } = dc; + +const input = { + foo: 'bar' +}; + +// Should not have named channel +assert.ok(!dc.hasSubscribers('test')); + +// Individual channel objects can be created to avoid future lookups +const channel = dc.channel('test'); +assert.ok(channel instanceof Channel); + +// No subscribers yet, should not publish +assert.ok(!channel.hasSubscribers); + +const subscriber = common.mustCall((message, name) => { + assert.strictEqual(name, channel.name); + assert.deepStrictEqual(message, input); +}); + +// Now there's a subscriber, should publish +channel.subscribe(subscriber); +assert.ok(channel.hasSubscribers); + +// The ActiveChannel prototype swap should not fail instanceof +assert.ok(channel instanceof Channel); + +// Should trigger the subscriber once +channel.publish(input); + +// Should not publish after subscriber is unsubscribed +channel.unsubscribe(subscriber); +assert.ok(!channel.hasSubscribers); diff --git a/test/parallel/test-diagnostics-channel-safe-subscriber-errors.js b/test/parallel/test-diagnostics-channel-safe-subscriber-errors.js new file mode 100644 index 00000000000000..b0c5ab2480e374 --- /dev/null +++ b/test/parallel/test-diagnostics-channel-safe-subscriber-errors.js @@ -0,0 +1,29 @@ +'use strict'; + +const common = require('../common'); +const dc = require('diagnostics_channel'); +const assert = require('assert'); + +const input = { + foo: 'bar' +}; + +const channel = dc.channel('fail'); + +const error = new Error('nope'); + +process.on('uncaughtException', common.mustCall((err) => { + assert.strictEqual(err, error); +})); + +channel.subscribe(common.mustCall((message, name) => { + throw error; +})); + +// The failing subscriber should not stop subsequent subscribers from running +channel.subscribe(common.mustCall()); + +// Publish should continue without throwing +const fn = common.mustCall(); +channel.publish(input); +fn(); diff --git a/test/parallel/test-diagnostics-channel-symbol-named.js b/test/parallel/test-diagnostics-channel-symbol-named.js new file mode 100644 index 00000000000000..b98c2a1ef3ec6c --- /dev/null +++ b/test/parallel/test-diagnostics-channel-symbol-named.js @@ -0,0 +1,22 @@ +'use strict'; + +const common = require('../common'); +const dc = require('diagnostics_channel'); +const assert = require('assert'); + +const input = { + foo: 'bar' +}; + +const symbol = Symbol('test'); + +// Individual channel objects can be created to avoid future lookups +const channel = dc.channel(symbol); + +// Expect two successful publishes later +channel.subscribe(common.mustCall((message, name) => { + assert.strictEqual(name, symbol); + assert.deepStrictEqual(message, input); +})); + +channel.publish(input); diff --git a/test/parallel/test-disable-proto-throw.js b/test/parallel/test-disable-proto-throw.js index e7a1f679765235..a39cfef0d8bd43 100644 --- a/test/parallel/test-disable-proto-throw.js +++ b/test/parallel/test-disable-proto-throw.js @@ -10,7 +10,7 @@ const { Worker, isMainThread } = require('worker_threads'); assert(Object.prototype.hasOwnProperty('__proto__')); assert.throws(() => { - // eslint-disable-next-line no-proto + // eslint-disable-next-line no-proto,no-unused-expressions ({}).__proto__; }, { code: 'ERR_PROTO_ACCESS' diff --git a/test/parallel/test-dns-channel-cancel-promise.js b/test/parallel/test-dns-channel-cancel-promise.js new file mode 100644 index 00000000000000..382ac3dd508d68 --- /dev/null +++ b/test/parallel/test-dns-channel-cancel-promise.js @@ -0,0 +1,65 @@ +'use strict'; +const common = require('../common'); +const { promises: dnsPromises } = require('dns'); +const assert = require('assert'); +const dgram = require('dgram'); + +const server = dgram.createSocket('udp4'); +const resolver = new dnsPromises.Resolver(); + +const addMessageListener = () => { + server.removeAllListeners('message'); + + server.once('message', () => { + server.once('message', common.mustNotCall); + + resolver.cancel(); + }); +}; + +server.bind(0, common.mustCall(async () => { + resolver.setServers([`127.0.0.1:${server.address().port}`]); + + addMessageListener(); + + // Single promise + { + const hostname = 'example0.org'; + + await assert.rejects( + resolver.resolve4(hostname), + { + code: 'ECANCELLED', + syscall: 'queryA', + hostname + } + ); + } + + addMessageListener(); + + // Multiple promises + { + const assertions = []; + const assertionCount = 10; + + for (let i = 1; i <= assertionCount; i++) { + const hostname = `example${i}.org`; + + assertions.push( + assert.rejects( + resolver.resolve4(hostname), + { + code: 'ECANCELLED', + syscall: 'queryA', + hostname: hostname + } + ) + ); + } + + await Promise.all(assertions); + } + + server.close(); +})); diff --git a/test/parallel/test-dns-channel-cancel.js b/test/parallel/test-dns-channel-cancel.js index 0c59ee53161a5e..f92fb2e30a4d12 100644 --- a/test/parallel/test-dns-channel-cancel.js +++ b/test/parallel/test-dns-channel-cancel.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common'); -const dnstools = require('../common/dns'); const { Resolver } = require('dns'); const assert = require('assert'); const dgram = require('dgram'); @@ -8,21 +7,45 @@ const dgram = require('dgram'); const server = dgram.createSocket('udp4'); const resolver = new Resolver(); -server.bind(0, common.mustCall(() => { +const desiredQueries = 11; +let finishedQueries = 0; + +const addMessageListener = () => { + server.removeAllListeners('message'); + + server.once('message', () => { + server.once('message', common.mustNotCall); + + resolver.cancel(); + }); +}; + +server.bind(0, common.mustCall(async () => { resolver.setServers([`127.0.0.1:${server.address().port}`]); - resolver.resolve4('example.org', common.mustCall((err, res) => { + + const callback = common.mustCall((err, res) => { assert.strictEqual(err.code, 'ECANCELLED'); assert.strictEqual(err.syscall, 'queryA'); - assert.strictEqual(err.hostname, 'example.org'); - server.close(); - })); -})); + assert.strictEqual(err.hostname, `example${finishedQueries}.org`); + + finishedQueries++; + if (finishedQueries === desiredQueries) { + server.close(); + } + }, desiredQueries); + + const next = (...args) => { + callback(...args); + + addMessageListener(); -server.on('message', common.mustCall((msg, { address, port }) => { - const parsed = dnstools.parseDNSPacket(msg); - const domain = parsed.questions[0].domain; - assert.strictEqual(domain, 'example.org'); + // Multiple queries + for (let i = 1; i < desiredQueries; i++) { + resolver.resolve4(`example${i}.org`, callback); + } + }; - // Do not send a reply. - resolver.cancel(); + // Single query + addMessageListener(); + resolver.resolve4('example0.org', next); })); diff --git a/test/parallel/test-dns-setlocaladdress.js b/test/parallel/test-dns-setlocaladdress.js new file mode 100644 index 00000000000000..25bece328f4a74 --- /dev/null +++ b/test/parallel/test-dns-setlocaladdress.js @@ -0,0 +1,40 @@ +'use strict'; +require('../common'); +const assert = require('assert'); + +const dns = require('dns'); +const resolver = new dns.Resolver(); +const promiseResolver = new dns.promises.Resolver(); + +// Verifies that setLocalAddress succeeds with IPv4 and IPv6 addresses +{ + resolver.setLocalAddress('127.0.0.1'); + resolver.setLocalAddress('::1'); + resolver.setLocalAddress('127.0.0.1', '::1'); + promiseResolver.setLocalAddress('127.0.0.1', '::1'); +} + +// Verify that setLocalAddress throws if called with an invalid address +{ + assert.throws(() => { + resolver.setLocalAddress('127.0.0.1', '127.0.0.1'); + }, Error); + assert.throws(() => { + resolver.setLocalAddress('::1', '::1'); + }, Error); + assert.throws(() => { + resolver.setLocalAddress('bad'); + }, Error); + assert.throws(() => { + resolver.setLocalAddress(123); + }, { code: 'ERR_INVALID_ARG_TYPE' }); + assert.throws(() => { + resolver.setLocalAddress('127.0.0.1', 42); + }, { code: 'ERR_INVALID_ARG_TYPE' }); + assert.throws(() => { + resolver.setLocalAddress(); + }, Error); + assert.throws(() => { + promiseResolver.setLocalAddress(); + }, Error); +} diff --git a/test/parallel/test-domain-promise.js b/test/parallel/test-domain-promise.js index 2a127f3d40272b..d3b24eba9fb8ec 100644 --- a/test/parallel/test-domain-promise.js +++ b/test/parallel/test-domain-promise.js @@ -126,3 +126,13 @@ process.on('warning', common.mustNotCall()); })); })); } +{ + // Unhandled rejections become errors on the domain + const d = domain.create(); + d.on('error', common.mustCall((e) => { + assert.strictEqual(e.message, 'foo'); + })); + d.run(common.mustCall(() => { + Promise.reject(new Error('foo')); + })); +} diff --git a/test/parallel/test-error-prepare-stack-trace.js b/test/parallel/test-error-prepare-stack-trace.js index 2ace9c8d71491d..28ecdd25f50135 100644 --- a/test/parallel/test-error-prepare-stack-trace.js +++ b/test/parallel/test-error-prepare-stack-trace.js @@ -13,7 +13,7 @@ const assert = require('assert'); try { throw new Error('foo'); } catch (err) { - err.stack; + err.stack; // eslint-disable-line no-unused-expressions } assert(prepareCalled); } diff --git a/test/parallel/test-errors-systemerror.js b/test/parallel/test-errors-systemerror.js index e801871f40af2c..2a20588e75b386 100644 --- a/test/parallel/test-errors-systemerror.js +++ b/test/parallel/test-errors-systemerror.js @@ -9,7 +9,7 @@ assert.throws( () => { new SystemError(); }, { name: 'TypeError', - message: 'Cannot read property \'match\' of undefined' + message: 'String.prototype.match called on null or undefined' } ); diff --git a/test/parallel/test-eslint-prefer-primordials.js b/test/parallel/test-eslint-prefer-primordials.js new file mode 100644 index 00000000000000..2d04f9a1081c56 --- /dev/null +++ b/test/parallel/test-eslint-prefer-primordials.js @@ -0,0 +1,175 @@ +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +common.skipIfEslintMissing(); + +const RuleTester = require('../../tools/node_modules/eslint').RuleTester; +const rule = require('../../tools/eslint-rules/prefer-primordials'); + +new RuleTester({ + parserOptions: { ecmaVersion: 6 }, + env: { es6: true } +}) + .run('prefer-primordials', rule, { + valid: [ + 'new Array()', + 'JSON.stringify({})', + 'class A { *[Symbol.iterator] () { yield "a"; } }', + 'const a = { *[Symbol.iterator] () { yield "a"; } }', + 'Object.defineProperty(o, Symbol.toStringTag, { value: "o" })', + 'parseInt("10")', + ` + const { Reflect } = primordials; + module.exports = function() { + const { ownKeys } = Reflect; + } + `, + { + code: 'const { Array } = primordials; new Array()', + options: [{ name: 'Array' }] + }, + { + code: 'const { JSONStringify } = primordials; JSONStringify({})', + options: [{ name: 'JSON' }] + }, + { + code: 'const { SymbolFor } = primordials; SymbolFor("xxx")', + options: [{ name: 'Symbol' }] + }, + { + code: ` + const { SymbolIterator } = primordials; + class A { *[SymbolIterator] () { yield "a"; } } + `, + options: [{ name: 'Symbol' }] + }, + { + code: ` + const { Symbol } = primordials; + const a = { *[Symbol.iterator] () { yield "a"; } } + `, + options: [{ name: 'Symbol', ignore: ['iterator'] }] + }, + { + code: ` + const { ObjectDefineProperty, Symbol } = primordials; + ObjectDefineProperty(o, Symbol.toStringTag, { value: "o" }) + `, + options: [{ name: 'Symbol', ignore: ['toStringTag'] }] + }, + { + code: 'const { Symbol } = primordials; Symbol.for("xxx")', + options: [{ name: 'Symbol', ignore: ['for'] }] + }, + { + code: 'const { NumberParseInt } = primordials; NumberParseInt("xxx")', + options: [{ name: 'parseInt' }] + }, + { + code: ` + const { ReflectOwnKeys } = primordials; + module.exports = function() { + ReflectOwnKeys({}) + } + `, + options: [{ name: 'Reflect' }], + }, + { + code: 'const { Map } = primordials; new Map()', + options: [{ name: 'Map', into: 'Safe' }], + }, + ], + invalid: [ + { + code: 'new Array()', + options: [{ name: 'Array' }], + errors: [{ message: /const { Array } = primordials/ }] + }, + { + code: 'JSON.parse("{}")', + options: [{ name: 'JSON' }], + errors: [ + { message: /const { JSONParse } = primordials/ }, + ] + }, + { + code: 'const { JSON } = primordials; JSON.parse("{}")', + options: [{ name: 'JSON' }], + errors: [{ message: /const { JSONParse } = primordials/ }] + }, + { + code: 'Symbol.for("xxx")', + options: [{ name: 'Symbol' }], + errors: [ + { message: /const { SymbolFor } = primordials/ }, + ] + }, + { + code: 'const { Symbol } = primordials; Symbol.for("xxx")', + options: [{ name: 'Symbol' }], + errors: [{ message: /const { SymbolFor } = primordials/ }] + }, + { + code: ` + const { Symbol } = primordials; + class A { *[Symbol.iterator] () { yield "a"; } } + `, + options: [{ name: 'Symbol' }], + errors: [{ message: /const { SymbolIterator } = primordials/ }] + }, + { + code: ` + const { Symbol } = primordials; + const a = { *[Symbol.iterator] () { yield "a"; } } + `, + options: [{ name: 'Symbol' }], + errors: [{ message: /const { SymbolIterator } = primordials/ }] + }, + { + code: ` + const { ObjectDefineProperty, Symbol } = primordials; + ObjectDefineProperty(o, Symbol.toStringTag, { value: "o" }) + `, + options: [{ name: 'Symbol' }], + errors: [{ message: /const { SymbolToStringTag } = primordials/ }] + }, + { + code: ` + const { Number } = primordials; + Number.parseInt('10') + `, + options: [{ name: 'Number', into: Number }], + errors: [{ message: /const { NumberParseInt } = primordials/ }] + }, + { + code: 'parseInt("10")', + options: [{ name: 'parseInt', into: 'Number' }], + errors: [{ message: /const { NumberParseInt } = primordials/ }] + }, + { + code: ` + module.exports = function() { + const { ownKeys } = Reflect; + } + `, + options: [{ name: 'Reflect' }], + errors: [{ message: /const { ReflectOwnKeys } = primordials/ }] + }, + { + code: 'new Map()', + options: [{ name: 'Map', into: 'Safe' }], + errors: [{ message: /const { SafeMap } = primordials/ }] + }, + { + code: ` + const { Function } = primordials; + const noop = Function.prototype; + `, + options: [{ name: 'Function' }], + errors: [{ message: /const { FunctionPrototype } = primordials/ }] + }, + ] + }); diff --git a/test/parallel/test-events-static-geteventlisteners.js b/test/parallel/test-events-static-geteventlisteners.js new file mode 100644 index 00000000000000..d717ff74242f90 --- /dev/null +++ b/test/parallel/test-events-static-geteventlisteners.js @@ -0,0 +1,36 @@ +'use strict'; + +const common = require('../common'); + +const { + deepStrictEqual, +} = require('assert'); + +const { getEventListeners, EventEmitter } = require('events'); + +// Test getEventListeners on EventEmitter +{ + const fn1 = common.mustNotCall(); + const fn2 = common.mustNotCall(); + const emitter = new EventEmitter(); + emitter.on('foo', fn1); + emitter.on('foo', fn2); + emitter.on('baz', fn1); + emitter.on('baz', fn1); + deepStrictEqual(getEventListeners(emitter, 'foo'), [fn1, fn2]); + deepStrictEqual(getEventListeners(emitter, 'bar'), []); + deepStrictEqual(getEventListeners(emitter, 'baz'), [fn1, fn1]); +} +// Test getEventListeners on EventTarget +{ + const fn1 = common.mustNotCall(); + const fn2 = common.mustNotCall(); + const target = new EventTarget(); + target.addEventListener('foo', fn1); + target.addEventListener('foo', fn2); + target.addEventListener('baz', fn1); + target.addEventListener('baz', fn1); + deepStrictEqual(getEventListeners(target, 'foo'), [fn1, fn2]); + deepStrictEqual(getEventListeners(target, 'bar'), []); + deepStrictEqual(getEventListeners(target, 'baz'), [fn1]); +} diff --git a/test/parallel/test-eventtarget-memoryleakwarning.js b/test/parallel/test-eventtarget-memoryleakwarning.js new file mode 100644 index 00000000000000..d58a4edb37a299 --- /dev/null +++ b/test/parallel/test-eventtarget-memoryleakwarning.js @@ -0,0 +1,75 @@ +// Flags: --no-warnings +'use strict'; +const common = require('../common'); +const { + setMaxListeners, + EventEmitter +} = require('events'); +const assert = require('assert'); + +common.expectWarning({ + MaxListenersExceededWarning: [ + ['Possible EventTarget memory leak detected. 3 foo listeners added to ' + + 'EventTarget. Use events.setMaxListeners() ' + + 'to increase limit'], + ['Possible EventTarget memory leak detected. 3 foo listeners added to ' + + '[MessagePort [EventTarget]]. ' + + 'Use events.setMaxListeners() to increase ' + + 'limit'], + ['Possible EventTarget memory leak detected. 3 foo listeners added to ' + + '[MessagePort [EventTarget]]. ' + + 'Use events.setMaxListeners() to increase ' + + 'limit'], + ['Possible EventTarget memory leak detected. 3 foo listeners added to ' + + '[AbortSignal]. ' + + 'Use events.setMaxListeners() to increase ' + + 'limit'], + ], +}); + + +{ + const et = new EventTarget(); + setMaxListeners(2, et); + et.addEventListener('foo', () => {}); + et.addEventListener('foo', () => {}); + et.addEventListener('foo', () => {}); +} + +{ + // No warning emitted because prior limit was only for that + // one EventTarget. + const et = new EventTarget(); + et.addEventListener('foo', () => {}); + et.addEventListener('foo', () => {}); + et.addEventListener('foo', () => {}); +} + +{ + const mc = new MessageChannel(); + setMaxListeners(2, mc.port1); + mc.port1.addEventListener('foo', () => {}); + mc.port1.addEventListener('foo', () => {}); + mc.port1.addEventListener('foo', () => {}); +} + +{ + // Set the default for newly created EventTargets + setMaxListeners(2); + const mc = new MessageChannel(); + mc.port1.addEventListener('foo', () => {}); + mc.port1.addEventListener('foo', () => {}); + mc.port1.addEventListener('foo', () => {}); + + const ac = new AbortController(); + ac.signal.addEventListener('foo', () => {}); + ac.signal.addEventListener('foo', () => {}); + ac.signal.addEventListener('foo', () => {}); +} + +{ + // It works for EventEmitters also + const ee = new EventEmitter(); + setMaxListeners(2, ee); + assert.strictEqual(ee.getMaxListeners(), 2); +} diff --git a/test/parallel/test-eventtarget-once-twice.js b/test/parallel/test-eventtarget-once-twice.js index 6a38b80e2db75a..3358bab90e7569 100644 --- a/test/parallel/test-eventtarget-once-twice.js +++ b/test/parallel/test-eventtarget-once-twice.js @@ -1,10 +1,5 @@ -// Flags: --expose-internals --no-warnings 'use strict'; const common = require('../common'); -const { - Event, - EventTarget, -} = require('internal/event_target'); const { once } = require('events'); const et = new EventTarget(); diff --git a/test/parallel/test-eventtarget-whatwg-customevent.js b/test/parallel/test-eventtarget-whatwg-customevent.js new file mode 100644 index 00000000000000..e21ea1783f8998 --- /dev/null +++ b/test/parallel/test-eventtarget-whatwg-customevent.js @@ -0,0 +1,33 @@ +'use strict'; + +const common = require('../common'); + +const { strictEqual, throws, equal } = require('assert'); + +// Manually converted from https://github.com/web-platform-tests/wpt/blob/master/dom/events/CustomEvent.html +// in order to define the `document` ourselves + +{ + const type = 'foo'; + const target = new EventTarget(); + + target.addEventListener(type, common.mustCall((evt) => { + strictEqual(evt.type, type); + })); + + target.dispatchEvent(new Event(type)); +} + +{ + throws(() => { + new Event(); + }, TypeError); +} + +{ + const event = new Event('foo'); + equal(event.type, 'foo'); + equal(event.bubbles, false); + equal(event.cancelable, false); + equal(event.detail, null); +} diff --git a/test/parallel/test-eventtarget-whatwg-once.js b/test/parallel/test-eventtarget-whatwg-once.js new file mode 100644 index 00000000000000..9c74829d761306 --- /dev/null +++ b/test/parallel/test-eventtarget-whatwg-once.js @@ -0,0 +1,132 @@ +'use strict'; + +const common = require('../common'); + +const { + strictEqual, +} = require('assert'); + +// Manually ported from: wpt@dom/events/AddEventListenerOptions-once.html +{ + const document = new EventTarget(); + let invoked_once = false; + let invoked_normal = false; + function handler_once() { + invoked_once = true; + } + + function handler_normal() { + invoked_normal = true; + } + + document.addEventListener('test', handler_once, { once: true }); + document.addEventListener('test', handler_normal); + document.dispatchEvent(new Event('test')); + strictEqual(invoked_once, true, 'Once handler should be invoked'); + strictEqual(invoked_normal, true, 'Normal handler should be invoked'); + + invoked_once = false; + invoked_normal = false; + document.dispatchEvent(new Event('test')); + strictEqual(invoked_once, false, 'Once handler shouldn\'t be invoked again'); + strictEqual(invoked_normal, true, 'Normal handler should be invoked again'); + document.removeEventListener('test', handler_normal); +} + + +{ + // Manually ported from AddEventListenerOptions-once.html + const document = new EventTarget(); + let invoked_count = 0; + function handler() { + invoked_count++; + } + document.addEventListener('test', handler, { once: true }); + document.addEventListener('test', handler); + document.dispatchEvent(new Event('test')); + strictEqual(invoked_count, 1, 'The handler should only be added once'); + + invoked_count = 0; + document.dispatchEvent(new Event('test')); + strictEqual(invoked_count, 0, 'The handler was added as a once listener'); + + invoked_count = 0; + document.addEventListener('test', handler, { once: true }); + document.removeEventListener('test', handler); + document.dispatchEvent(new Event('test')); + strictEqual(invoked_count, 0, 'The handler should have been removed'); +} + +{ + // TODO(benjamingr) fix EventTarget recursion + common.skip('EventTarget recursion is currently broken'); + const document = new EventTarget(); + let invoked_count = 0; + function handler() { + invoked_count++; + if (invoked_count === 1) + document.dispatchEvent(new Event('test')); + } + document.addEventListener('test', handler, { once: true }); + document.dispatchEvent(new Event('test')); + strictEqual(invoked_count, 1, 'Once handler should only be invoked once'); + + invoked_count = 0; + function handler2() { + invoked_count++; + if (invoked_count === 1) + document.addEventListener('test', handler2, { once: true }); + if (invoked_count <= 2) + document.dispatchEvent(new Event('test')); + } + document.addEventListener('test', handler2, { once: true }); + document.dispatchEvent(new Event('test')); + strictEqual(invoked_count, 2, 'Once handler should only be invoked once'); +} + +// Manually converted from https://github.com/web-platform-tests/wpt/blob/master/dom/events/AddEventListenerOptions-once.html +// in order to define the `document` ourselves + +{ + const document = new EventTarget(); + + // Should only fire for first event + document.addEventListener('test', common.mustCall(1), { once: true }); + // Should fire for both events + document.addEventListener('test', common.mustCall(2)); + // Fire events + document.dispatchEvent(new Event('test')); + document.dispatchEvent(new Event('test')); +} +{ + const document = new EventTarget(); + + const handler = common.mustCall(2); + // Both should only fire on first event + document.addEventListener('test', handler.bind(), { once: true }); + document.addEventListener('test', handler.bind(), { once: true }); + // Fire events + document.dispatchEvent(new Event('test')); + document.dispatchEvent(new Event('test')); +} +{ + const document = new EventTarget(); + + const handler = common.mustCall(2); + + // Should only fire once on first event + document.addEventListener('test', common.mustCall(1), { once: true }); + // Should fire twice until removed + document.addEventListener('test', handler); + // Fire two events + document.dispatchEvent(new Event('test')); + document.dispatchEvent(new Event('test')); + + // Should only fire once on the next event + document.addEventListener('test', common.mustCall(1), { once: true }); + // The previous handler should no longer fire + document.removeEventListener('test', handler); + + // Fire final event triggering + document.dispatchEvent(new Event('test')); +} diff --git a/test/parallel/test-eventtarget-whatwg-passive.js b/test/parallel/test-eventtarget-whatwg-passive.js index 5399d19da45943..97984bd9aff828 100644 --- a/test/parallel/test-eventtarget-whatwg-passive.js +++ b/test/parallel/test-eventtarget-whatwg-passive.js @@ -2,13 +2,15 @@ const common = require('../common'); +// Manually converted from https://github.com/web-platform-tests/wpt/blob/master/dom/events/AddEventListenerOptions-passive.html +// in order to define the `document` ourselves + const { fail, ok, strictEqual } = require('assert'); -// Manually ported from WPT AddEventListenerOptions-passive.html { const document = new EventTarget(); let supportsPassive = false; diff --git a/test/parallel/test-eventtarget-whatwg-signal.js b/test/parallel/test-eventtarget-whatwg-signal.js new file mode 100644 index 00000000000000..8573d2b4aea5bb --- /dev/null +++ b/test/parallel/test-eventtarget-whatwg-signal.js @@ -0,0 +1,155 @@ +'use strict'; + +require('../common'); + +const { + strictEqual, +} = require('assert'); + +// Manually ported from: wpt@dom/events/AddEventListenerOptions-signal.any.js + +{ + // Passing an AbortSignal to addEventListener does not prevent + // removeEventListener + let count = 0; + function handler() { + count++; + } + const et = new EventTarget(); + const controller = new AbortController(); + et.addEventListener('test', handler, { signal: controller.signal }); + et.dispatchEvent(new Event('test')); + strictEqual(count, 1, 'Adding a signal still adds a listener'); + et.dispatchEvent(new Event('test')); + strictEqual(count, 2, 'The listener was not added with the once flag'); + controller.abort(); + et.dispatchEvent(new Event('test')); + strictEqual(count, 2, 'Aborting on the controller removes the listener'); + et.addEventListener('test', handler, { signal: controller.signal }); + et.dispatchEvent(new Event('test')); + strictEqual(count, 2, 'Passing an aborted signal never adds the handler'); +} + +{ + // Passing an AbortSignal to addEventListener works with the once flag + let count = 0; + function handler() { + count++; + } + const et = new EventTarget(); + const controller = new AbortController(); + et.addEventListener('test', handler, { signal: controller.signal }); + et.removeEventListener('test', handler); + et.dispatchEvent(new Event('test')); + strictEqual(count, 0, 'The listener was still removed'); +} + +{ + // Removing a once listener works with a passed signal + let count = 0; + function handler() { + count++; + } + const et = new EventTarget(); + const controller = new AbortController(); + const options = { signal: controller.signal, once: true }; + et.addEventListener('test', handler, options); + controller.abort(); + et.dispatchEvent(new Event('test')); + strictEqual(count, 0, 'The listener was still removed'); +} + +{ + let count = 0; + function handler() { + count++; + } + const et = new EventTarget(); + const controller = new AbortController(); + const options = { signal: controller.signal, once: true }; + et.addEventListener('test', handler, options); + et.removeEventListener('test', handler); + et.dispatchEvent(new Event('test')); + strictEqual(count, 0, 'The listener was still removed'); +} + +{ + // Passing an AbortSignal to multiple listeners + let count = 0; + function handler() { + count++; + } + const et = new EventTarget(); + const controller = new AbortController(); + const options = { signal: controller.signal, once: true }; + et.addEventListener('first', handler, options); + et.addEventListener('second', handler, options); + controller.abort(); + et.dispatchEvent(new Event('first')); + et.dispatchEvent(new Event('second')); + strictEqual(count, 0, 'The listener was still removed'); +} + +{ + // Passing an AbortSignal to addEventListener works with the capture flag + let count = 0; + function handler() { + count++; + } + const et = new EventTarget(); + const controller = new AbortController(); + const options = { signal: controller.signal, capture: true }; + et.addEventListener('test', handler, options); + controller.abort(); + et.dispatchEvent(new Event('test')); + strictEqual(count, 0, 'The listener was still removed'); +} + +{ + // Aborting from a listener does not call future listeners + let count = 0; + function handler() { + count++; + } + const et = new EventTarget(); + const controller = new AbortController(); + const options = { signal: controller.signal }; + et.addEventListener('test', () => { + controller.abort(); + }, options); + et.addEventListener('test', handler, options); + et.dispatchEvent(new Event('test')); + strictEqual(count, 0, 'The listener was still removed'); +} + +{ + // Adding then aborting a listener in another listener does not call it + let count = 0; + function handler() { + count++; + } + const et = new EventTarget(); + const controller = new AbortController(); + et.addEventListener('test', () => { + et.addEventListener('test', handler, { signal: controller.signal }); + controller.abort(); + }, { signal: controller.signal }); + et.dispatchEvent(new Event('test')); + strictEqual(count, 0, 'The listener was still removed'); +} + +{ + // Aborting from a nested listener should remove it + const et = new EventTarget(); + const ac = new AbortController(); + let count = 0; + et.addEventListener('foo', () => { + et.addEventListener('foo', () => { + count++; + if (count > 5) ac.abort(); + et.dispatchEvent(new Event('foo')); + }, { signal: ac.signal }); + et.dispatchEvent(new Event('foo')); + }, { once: true }); + et.dispatchEvent(new Event('foo')); +} diff --git a/test/parallel/test-eventtarget.js b/test/parallel/test-eventtarget.js index 9487c22e26d1af..45c63e0dd18be3 100644 --- a/test/parallel/test-eventtarget.js +++ b/test/parallel/test-eventtarget.js @@ -2,11 +2,7 @@ 'use strict'; const common = require('../common'); -const { - Event, - EventTarget, - defineEventHandler -} = require('internal/event_target'); +const { defineEventHandler } = require('internal/event_target'); const { ok, @@ -414,6 +410,7 @@ let asyncTest = Promise.resolve(); } { + // Event Statics strictEqual(Event.NONE, 0); strictEqual(Event.CAPTURING_PHASE, 1); strictEqual(Event.AT_TARGET, 2); @@ -424,6 +421,8 @@ let asyncTest = Promise.resolve(); strictEqual(e.eventPhase, Event.AT_TARGET); }), { once: true }); target.dispatchEvent(new Event('foo')); + // Event is a function + strictEqual(Event.length, 1); } { @@ -479,3 +478,66 @@ let asyncTest = Promise.resolve(); throws(() => eventTarget.addEventListener('foo', Symbol()), TypeError); }); } +{ + const eventTarget = new EventTarget(); + const event = new Event('foo'); + eventTarget.dispatchEvent(event); + strictEqual(event.target, eventTarget); +} +{ + // Event target exported keys + const eventTarget = new EventTarget(); + deepStrictEqual(Object.keys(eventTarget), []); + deepStrictEqual(Object.getOwnPropertyNames(eventTarget), []); + const parentKeys = Object.keys(Object.getPrototypeOf(eventTarget)).sort(); + const keys = ['addEventListener', 'dispatchEvent', 'removeEventListener']; + deepStrictEqual(parentKeys, keys); +} +{ + // Subclassing + class SubTarget extends EventTarget {} + const target = new SubTarget(); + target.addEventListener('foo', common.mustCall()); + target.dispatchEvent(new Event('foo')); +} +{ + // Test event order + const target = new EventTarget(); + let state = 0; + target.addEventListener('foo', common.mustCall(() => { + strictEqual(state, 0); + state++; + })); + target.addEventListener('foo', common.mustCall(() => { + strictEqual(state, 1); + })); + target.dispatchEvent(new Event('foo')); +} +{ + const target = new EventTarget(); + defineEventHandler(target, 'foo'); + const descriptor = Object.getOwnPropertyDescriptor(target, 'onfoo'); + strictEqual(descriptor.configurable, true); + strictEqual(descriptor.enumerable, true); +} +{ + const target = new EventTarget(); + defineEventHandler(target, 'foo'); + const output = []; + target.addEventListener('foo', () => output.push(1)); + target.onfoo = common.mustNotCall(); + target.addEventListener('foo', () => output.push(3)); + target.onfoo = () => output.push(2); + target.addEventListener('foo', () => output.push(4)); + target.dispatchEvent(new Event('foo')); + deepStrictEqual(output, [1, 2, 3, 4]); +} +{ + const et = new EventTarget(); + const listener = common.mustNotCall(); + et.addEventListener('foo', common.mustCall((e) => { + et.removeEventListener('foo', listener); + })); + et.addEventListener('foo', listener); + et.dispatchEvent(new Event('foo')); +} diff --git a/test/parallel/test-fs-opendir.js b/test/parallel/test-fs-opendir.js index ab7b24b63e76b2..4c4681ef48e2ff 100644 --- a/test/parallel/test-fs-opendir.js +++ b/test/parallel/test-fs-opendir.js @@ -223,12 +223,11 @@ async function doAsyncIterInvalidCallbackTest() { } doAsyncIterInvalidCallbackTest().then(common.mustCall()); -// Check if directory already closed - throw an exception +// Check first call to close() - should not report an error. async function doAsyncIterDirClosedTest() { const dir = await fs.promises.opendir(testDir); await dir.close(); - - assert.throws(() => dir.close(), dirclosedError); + await assert.rejects(() => dir.close(), dirclosedError); } doAsyncIterDirClosedTest().then(common.mustCall()); @@ -245,6 +244,12 @@ async function doConcurrentAsyncAndSyncOps() { } doConcurrentAsyncAndSyncOps().then(common.mustCall()); +// Check read throw exceptions on invalid callback +{ + const dir = fs.opendirSync(testDir); + assert.throws(() => dir.read('INVALID_CALLBACK'), /ERR_INVALID_CALLBACK/); +} + // Check that concurrent read() operations don't do weird things. async function doConcurrentAsyncOps() { const dir = await fs.promises.opendir(testDir); @@ -267,3 +272,19 @@ async function doConcurrentAsyncMixedOps() { await promise2; } doConcurrentAsyncMixedOps().then(common.mustCall()); + +// Check if directory already closed - the callback should pass an error. +{ + const dir = fs.opendirSync(testDir); + dir.closeSync(); + dir.close(common.mustCall((error) => { + assert.strictEqual(error.code, dirclosedError.code); + })); +} + +// Check if directory already closed - throw an promise exception. +{ + const dir = fs.opendirSync(testDir); + dir.closeSync(); + assert.rejects(dir.close(), dirclosedError).then(common.mustCall()); +} diff --git a/test/parallel/test-fs-options-immutable.js b/test/parallel/test-fs-options-immutable.js index 17fc1cbeebd1ad..b993d776e6e460 100644 --- a/test/parallel/test-fs-options-immutable.js +++ b/test/parallel/test-fs-options-immutable.js @@ -44,7 +44,7 @@ if (common.canCreateSymLink()) { fs.appendFile(fileName, 'ABCD', options, common.mustCall(errHandler)); } -if (!common.isIBMi) { // IBMi does not suppport fs.watch() +if (!common.isIBMi) { // IBMi does not support fs.watch() const watch = fs.watch(__filename, options, common.mustNotCall()); watch.close(); } diff --git a/test/parallel/test-fs-promises-file-handle-read-worker.js b/test/parallel/test-fs-promises-file-handle-read-worker.js new file mode 100644 index 00000000000000..ccf3338d14506a --- /dev/null +++ b/test/parallel/test-fs-promises-file-handle-read-worker.js @@ -0,0 +1,50 @@ +'use strict'; +const common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); +const path = require('path'); +const tmpdir = require('../common/tmpdir'); +const file = path.join(tmpdir.path, 'read_stream_filehandle_worker.txt'); +const input = 'hello world'; +const { Worker, isMainThread, workerData } = require('worker_threads'); + +if (isMainThread || !workerData) { + tmpdir.refresh(); + fs.writeFileSync(file, input); + + fs.promises.open(file, 'r').then((handle) => { + handle.on('close', common.mustNotCall()); + new Worker(__filename, { + workerData: { handle }, + transferList: [handle] + }); + }); + fs.promises.open(file, 'r').then((handle) => { + fs.createReadStream(null, { fd: handle }); + assert.throws(() => { + new Worker(__filename, { + workerData: { handle }, + transferList: [handle] + }); + }, { + code: 25, + }); + }); +} else { + let output = ''; + + const handle = workerData.handle; + handle.on('close', common.mustCall()); + const stream = fs.createReadStream(null, { fd: handle }); + + stream.on('data', common.mustCallAtLeast((data) => { + output += data; + })); + + stream.on('end', common.mustCall(() => { + handle.close(); + assert.strictEqual(output, input); + })); + + stream.on('close', common.mustCall()); +} diff --git a/test/parallel/test-fs-promises-file-handle-read.js b/test/parallel/test-fs-promises-file-handle-read.js index 5ba7fc63e3f44d..68ad5c50acf094 100644 --- a/test/parallel/test-fs-promises-file-handle-read.js +++ b/test/parallel/test-fs-promises-file-handle-read.js @@ -13,35 +13,38 @@ const tmpdir = require('../common/tmpdir'); const assert = require('assert'); const tmpDir = tmpdir.path; -tmpdir.refresh(); +async function read(fileHandle, buffer, offset, length, position) { + return useConf ? + fileHandle.read({ buffer, offset, length, position }) : + fileHandle.read(buffer, offset, length, position); +} -async function validateRead() { - const filePath = path.resolve(tmpDir, 'tmp-read-file.txt'); - const fileHandle = await open(filePath, 'w+'); - const buffer = Buffer.from('Hello world', 'utf8'); +async function validateRead(data, file) { + const filePath = path.resolve(tmpDir, file); + const buffer = Buffer.from(data, 'utf8'); const fd = fs.openSync(filePath, 'w+'); - fs.writeSync(fd, buffer, 0, buffer.length); - fs.closeSync(fd); - const readAsyncHandle = await fileHandle.read(Buffer.alloc(11), 0, 11, 0); - assert.deepStrictEqual(buffer.length, readAsyncHandle.bytesRead); - assert.deepStrictEqual(buffer, readAsyncHandle.buffer); - - await fileHandle.close(); -} - -async function validateEmptyRead() { - const filePath = path.resolve(tmpDir, 'tmp-read-empty-file.txt'); const fileHandle = await open(filePath, 'w+'); - const buffer = Buffer.from('', 'utf8'); + const streamFileHandle = await open(filePath, 'w+'); - const fd = fs.openSync(filePath, 'w+'); fs.writeSync(fd, buffer, 0, buffer.length); fs.closeSync(fd); - const readAsyncHandle = await fileHandle.read(Buffer.alloc(11), 0, 11, 0); - assert.deepStrictEqual(buffer.length, readAsyncHandle.bytesRead); + fileHandle.on('close', common.mustCall()); + const readAsyncHandle = await read(fileHandle, Buffer.alloc(11), 0, 11, 0); + assert.deepStrictEqual(data.length, readAsyncHandle.bytesRead); + if (data.length) + assert.deepStrictEqual(buffer, readAsyncHandle.buffer); await fileHandle.close(); + + const stream = fs.createReadStream(null, { fd: streamFileHandle }); + let streamData = Buffer.alloc(0); + for await (const chunk of stream) + streamData = Buffer.from(chunk); + assert.deepStrictEqual(buffer, streamData); + if (data.length) + assert.deepStrictEqual(streamData, readAsyncHandle.buffer); + await streamFileHandle.close(); } async function validateLargeRead() { @@ -51,12 +54,21 @@ async function validateLargeRead() { const filePath = fixtures.path('x.txt'); const fileHandle = await open(filePath, 'r'); const pos = 0xffffffff + 1; // max-uint32 + 1 - const readHandle = await fileHandle.read(Buffer.alloc(1), 0, 1, pos); + const readHandle = await read(fileHandle, Buffer.alloc(1), 0, 1, pos); assert.strictEqual(readHandle.bytesRead, 0); } -validateRead() - .then(validateEmptyRead) - .then(validateLargeRead) - .then(common.mustCall()); +let useConf = false; + +(async function() { + for (const value of [false, true]) { + tmpdir.refresh(); + useConf = value; + + await validateRead('Hello world', 'tmp-read-file.txt') + .then(validateRead('', 'tmp-read-empty-file.txt')) + .then(validateLargeRead) + .then(common.mustCall()); + } +})().then(common.mustCall()); diff --git a/test/parallel/test-fs-promises-readfile.js b/test/parallel/test-fs-promises-readfile.js index ff25be75b84ff0..d1c79580b835b6 100644 --- a/test/parallel/test-fs-promises-readfile.js +++ b/test/parallel/test-fs-promises-readfile.js @@ -10,18 +10,21 @@ tmpdir.refresh(); const fn = path.join(tmpdir.path, 'large-file'); -async function validateReadFile() { - // Creating large buffer with random content - const buffer = Buffer.from( - Array.apply(null, { length: 16834 * 2 }) - .map(Math.random) - .map((number) => (number * (1 << 8))) - ); +// Creating large buffer with random content +const largeBuffer = Buffer.from( + Array.apply(null, { length: 16834 * 2 }) + .map(Math.random) + .map((number) => (number * (1 << 8))) +); +async function createLargeFile() { // Writing buffer to a file then try to read it - await writeFile(fn, buffer); + await writeFile(fn, largeBuffer); +} + +async function validateReadFile() { const readBuffer = await readFile(fn); - assert.strictEqual(readBuffer.equals(buffer), true); + assert.strictEqual(readBuffer.equals(largeBuffer), true); } async function validateReadFileProc() { @@ -39,6 +42,40 @@ async function validateReadFileProc() { assert.ok(hostname.length > 0); } -validateReadFile() - .then(() => validateReadFileProc()) - .then(common.mustCall()); +function validateReadFileAbortLogicBefore() { + const controller = new AbortController(); + const signal = controller.signal; + controller.abort(); + assert.rejects(readFile(fn, { signal }), { + name: 'AbortError' + }); +} + +function validateReadFileAbortLogicDuring() { + const controller = new AbortController(); + const signal = controller.signal; + process.nextTick(() => controller.abort()); + assert.rejects(readFile(fn, { signal }), { + name: 'AbortError' + }); +} + +async function validateWrongSignalParam() { + // Verify that if something different than Abortcontroller.signal + // is passed, ERR_INVALID_ARG_TYPE is thrown + + await assert.rejects(async () => { + const callback = common.mustNotCall(() => {}); + await readFile(fn, { signal: 'hello' }, callback); + }, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' }); + +} + +(async () => { + await createLargeFile(); + await validateReadFile(); + await validateReadFileProc(); + await validateReadFileAbortLogicBefore(); + await validateReadFileAbortLogicDuring(); + await validateWrongSignalParam(); +})().then(common.mustCall()); diff --git a/test/parallel/test-fs-promises-writefile.js b/test/parallel/test-fs-promises-writefile.js index 858e90bc6291de..5c13c503295682 100644 --- a/test/parallel/test-fs-promises-writefile.js +++ b/test/parallel/test-fs-promises-writefile.js @@ -11,6 +11,7 @@ const tmpDir = tmpdir.path; tmpdir.refresh(); const dest = path.resolve(tmpDir, 'tmp.txt'); +const otherDest = path.resolve(tmpDir, 'tmp-2.txt'); const buffer = Buffer.from('abc'.repeat(1000)); const buffer2 = Buffer.from('xyz'.repeat(1000)); @@ -20,6 +21,15 @@ async function doWrite() { assert.deepStrictEqual(data, buffer); } +async function doWriteWithCancel() { + const controller = new AbortController(); + const { signal } = controller; + process.nextTick(() => controller.abort()); + assert.rejects(fsPromises.writeFile(otherDest, buffer, { signal }), { + name: 'AbortError' + }); +} + async function doAppend() { await fsPromises.appendFile(dest, buffer2); const data = fs.readFileSync(dest); @@ -41,6 +51,7 @@ async function doReadWithEncoding() { } doWrite() + .then(doWriteWithCancel) .then(doAppend) .then(doRead) .then(doReadWithEncoding) diff --git a/test/parallel/test-fs-read-offset-null.js b/test/parallel/test-fs-read-offset-null.js new file mode 100644 index 00000000000000..27e893f781b2ff --- /dev/null +++ b/test/parallel/test-fs-read-offset-null.js @@ -0,0 +1,42 @@ +'use strict'; + + +// Test to assert the desired functioning of fs.read +// when {offset:null} is passed as options parameter + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const fsPromises = fs.promises; +const fixtures = require('../common/fixtures'); +const filepath = fixtures.path('x.txt'); + +const buf = Buffer.alloc(1); +// Reading only one character, hence buffer of one byte is enough. + +// Test for callback API. +fs.open(filepath, 'r', common.mustSucceed((fd) => { + fs.read(fd, { offset: null, buffer: buf }, + common.mustSucceed((bytesRead, buffer) => { + // Test is done by making sure the first letter in buffer is + // same as first letter in file. + // 120 is the hex for ascii code of letter x. + assert.strictEqual(buffer[0], 120); + fs.close(fd, common.mustSucceed(() => {})); + })); +})); + +let filehandle = null; + +// Test for promise api +(async () => { + filehandle = await fsPromises.open(filepath, 'r'); + const readObject = await filehandle.read(buf, null, buf.length); + assert.strictEqual(readObject.buffer[0], 120); +})() +.then(common.mustCall()) +.finally(async () => { +// Close the file handle if it is opened + if (filehandle) + await filehandle.close(); +}); diff --git a/test/parallel/test-fs-read-stream-file-handle.js b/test/parallel/test-fs-read-stream-file-handle.js new file mode 100644 index 00000000000000..063075aa25f64e --- /dev/null +++ b/test/parallel/test-fs-read-stream-file-handle.js @@ -0,0 +1,65 @@ +'use strict'; +const common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); +const path = require('path'); +const tmpdir = require('../common/tmpdir'); +const file = path.join(tmpdir.path, 'read_stream_filehandle_test.txt'); +const input = 'hello world'; + +let output = ''; +tmpdir.refresh(); +fs.writeFileSync(file, input); + +fs.promises.open(file, 'r').then(common.mustCall((handle) => { + handle.on('close', common.mustCall()); + const stream = fs.createReadStream(null, { fd: handle }); + + stream.on('data', common.mustCallAtLeast((data) => { + output += data; + })); + + stream.on('end', common.mustCall(() => { + assert.strictEqual(output, input); + })); + + stream.on('close', common.mustCall()); +})); + +fs.promises.open(file, 'r').then(common.mustCall((handle) => { + handle.on('close', common.mustCall()); + const stream = fs.createReadStream(null, { fd: handle }); + stream.on('data', common.mustNotCall()); + stream.on('close', common.mustCall()); + + handle.close(); +})); + +fs.promises.open(file, 'r').then(common.mustCall((handle) => { + handle.on('close', common.mustCall()); + const stream = fs.createReadStream(null, { fd: handle }); + stream.on('close', common.mustCall()); + + stream.on('data', common.mustCall(() => { + handle.close(); + })); +})); + +fs.promises.open(file, 'r').then(common.mustCall((handle) => { + handle.on('close', common.mustCall()); + const stream = fs.createReadStream(null, { fd: handle }); + stream.on('close', common.mustCall()); + + stream.close(); +})); + +fs.promises.open(file, 'r').then(common.mustCall((handle) => { + assert.throws(() => { + fs.createReadStream(null, { fd: handle, fs }); + }, { + code: 'ERR_METHOD_NOT_IMPLEMENTED', + name: 'Error', + message: 'The FileHandle with fs method is not implemented' + }); + handle.close(); +})); diff --git a/test/parallel/test-fs-readfile.js b/test/parallel/test-fs-readfile.js index 648bf692d1dcc8..751043886f0d96 100644 --- a/test/parallel/test-fs-readfile.js +++ b/test/parallel/test-fs-readfile.js @@ -57,3 +57,21 @@ for (const e of fileInfo) { assert.deepStrictEqual(buf, e.contents); })); } +{ + // Test cancellation, before + const controller = new AbortController(); + const signal = controller.signal; + controller.abort(); + fs.readFile(fileInfo[0].name, { signal }, common.mustCall((err, buf) => { + assert.strictEqual(err.name, 'AbortError'); + })); +} +{ + // Test cancellation, during read + const controller = new AbortController(); + const signal = controller.signal; + fs.readFile(fileInfo[0].name, { signal }, common.mustCall((err, buf) => { + assert.strictEqual(err.name, 'AbortError'); + })); + process.nextTick(() => controller.abort()); +} diff --git a/test/parallel/test-fs-readv-promises.js b/test/parallel/test-fs-readv-promises.js index 1132417c9e27c4..1d12126e557683 100644 --- a/test/parallel/test-fs-readv-promises.js +++ b/test/parallel/test-fs-readv-promises.js @@ -18,7 +18,7 @@ function getFileName() { const allocateEmptyBuffers = (combinedLength) => { const bufferArr = []; // Allocate two buffers, each half the size of exptectedBuff - bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)), + bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)); bufferArr[1] = Buffer.alloc(combinedLength - bufferArr[0].length); return bufferArr; diff --git a/test/parallel/test-fs-readv-sync.js b/test/parallel/test-fs-readv-sync.js index 92aa2fb6816752..9da39824d7f583 100644 --- a/test/parallel/test-fs-readv-sync.js +++ b/test/parallel/test-fs-readv-sync.js @@ -19,7 +19,7 @@ fs.writeFileSync(filename, exptectedBuff); const allocateEmptyBuffers = (combinedLength) => { const bufferArr = []; // Allocate two buffers, each half the size of exptectedBuff - bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)), + bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)); bufferArr[1] = Buffer.alloc(combinedLength - bufferArr[0].length); return bufferArr; diff --git a/test/parallel/test-fs-readv.js b/test/parallel/test-fs-readv.js index 8cffdb29c02060..2ca79b302c636f 100644 --- a/test/parallel/test-fs-readv.js +++ b/test/parallel/test-fs-readv.js @@ -17,7 +17,7 @@ const exptectedBuff = Buffer.from(expected); const allocateEmptyBuffers = (combinedLength) => { const bufferArr = []; // Allocate two buffers, each half the size of exptectedBuff - bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)), + bufferArr[0] = Buffer.alloc(Math.floor(combinedLength / 2)); bufferArr[1] = Buffer.alloc(combinedLength - bufferArr[0].length); return bufferArr; diff --git a/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js b/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js new file mode 100644 index 00000000000000..449ae0b448b353 --- /dev/null +++ b/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js @@ -0,0 +1,19 @@ +'use strict'; +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const fs = require('fs'); +const path = require('path'); + +tmpdir.refresh(); + +{ + // Should warn when trying to delete a nonexistent path + common.expectWarning( + 'DeprecationWarning', + 'In future versions of Node.js, fs.rmdir(path, { recursive: true }) ' + + 'will throw if path does not exist or is a file. Use fs.rm(path, ' + + '{ recursive: true, force: true }) instead', + 'DEP0147' + ); + fs.rmdirSync(path.join(tmpdir.path, 'noexist.txt'), { recursive: true }); +} diff --git a/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js b/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js new file mode 100644 index 00000000000000..96b9875416f962 --- /dev/null +++ b/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js @@ -0,0 +1,21 @@ +'use strict'; +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const fs = require('fs'); +const path = require('path'); + +tmpdir.refresh(); + +{ + // Should warn when trying to delete a file + common.expectWarning( + 'DeprecationWarning', + 'In future versions of Node.js, fs.rmdir(path, { recursive: true }) ' + + 'will throw if path does not exist or is a file. Use fs.rm(path, ' + + '{ recursive: true, force: true }) instead', + 'DEP0147' + ); + const filePath = path.join(tmpdir.path, 'rmdir-recursive.txt'); + fs.writeFileSync(filePath, ''); + fs.rmdirSync(filePath, { recursive: true }); +} diff --git a/test/parallel/test-fs-rmdir-recursive-warns-not-found.js b/test/parallel/test-fs-rmdir-recursive-warns-not-found.js index c87a20956041ce..9f733b47d156ba 100644 --- a/test/parallel/test-fs-rmdir-recursive-warns-not-found.js +++ b/test/parallel/test-fs-rmdir-recursive-warns-not-found.js @@ -6,7 +6,6 @@ const path = require('path'); tmpdir.refresh(); - { // Should warn when trying to delete a nonexistent path common.expectWarning( diff --git a/test/parallel/test-fs-rmdir-recursive-warns-on-file.js b/test/parallel/test-fs-rmdir-recursive-warns-on-file.js index 96b9875416f962..0d8e2e61bcbe85 100644 --- a/test/parallel/test-fs-rmdir-recursive-warns-on-file.js +++ b/test/parallel/test-fs-rmdir-recursive-warns-on-file.js @@ -17,5 +17,5 @@ tmpdir.refresh(); ); const filePath = path.join(tmpdir.path, 'rmdir-recursive.txt'); fs.writeFileSync(filePath, ''); - fs.rmdirSync(filePath, { recursive: true }); + fs.rmdir(filePath, { recursive: true }, common.mustSucceed()); } diff --git a/test/parallel/test-fs-stat-bigint.js b/test/parallel/test-fs-stat-bigint.js index 6f1db6078eac6f..cffec39288de4a 100644 --- a/test/parallel/test-fs-stat-bigint.js +++ b/test/parallel/test-fs-stat-bigint.js @@ -122,6 +122,33 @@ if (!common.isWindows) { fs.closeSync(fd); } +{ + assert.throws( + () => fs.statSync('does_not_exist'), + { code: 'ENOENT' }); + assert.strictEqual( + fs.statSync('does_not_exist', { throwIfNoEntry: false }), + undefined); +} + +{ + assert.throws( + () => fs.lstatSync('does_not_exist'), + { code: 'ENOENT' }); + assert.strictEqual( + fs.lstatSync('does_not_exist', { throwIfNoEntry: false }), + undefined); +} + +{ + assert.throws( + () => fs.fstatSync(9999), + { code: 'EBADF' }); + assert.throws( + () => fs.fstatSync(9999, { throwIfNoEntry: false }), + { code: 'EBADF' }); +} + const runCallbackTest = (func, arg, done) => { const startTime = process.hrtime.bigint(); func(arg, { bigint: true }, common.mustCall((err, bigintStats) => { diff --git a/test/parallel/test-fs-write-file.js b/test/parallel/test-fs-write-file.js index e80861756ab2d8..3d0fd48f05f361 100644 --- a/test/parallel/test-fs-write-file.js +++ b/test/parallel/test-fs-write-file.js @@ -66,3 +66,32 @@ fs.open(filename4, 'w+', common.mustSucceed((fd) => { })); })); })); + + +{ + // Test that writeFile is cancellable with an AbortSignal. + // Before the operation has started + const controller = new AbortController(); + const signal = controller.signal; + const filename3 = join(tmpdir.path, 'test3.txt'); + + fs.writeFile(filename3, s, { signal }, common.mustCall((err) => { + assert.strictEqual(err.name, 'AbortError'); + })); + + controller.abort(); +} + +{ + // Test that writeFile is cancellable with an AbortSignal. + // After the operation has started + const controller = new AbortController(); + const signal = controller.signal; + const filename4 = join(tmpdir.path, 'test5.txt'); + + fs.writeFile(filename4, s, { signal }, common.mustCall((err) => { + assert.strictEqual(err.name, 'AbortError'); + })); + + process.nextTick(() => controller.abort()); +} diff --git a/test/parallel/test-fs-write-stream-file-handle.js b/test/parallel/test-fs-write-stream-file-handle.js new file mode 100644 index 00000000000000..37d9a81d7c12e4 --- /dev/null +++ b/test/parallel/test-fs-write-stream-file-handle.js @@ -0,0 +1,21 @@ +'use strict'; +const common = require('../common'); +const fs = require('fs'); +const path = require('path'); +const assert = require('assert'); +const tmpdir = require('../common/tmpdir'); +const file = path.join(tmpdir.path, 'write_stream_filehandle_test.txt'); +const input = 'hello world'; + +tmpdir.refresh(); + +fs.promises.open(file, 'w+').then(common.mustCall((handle) => { + handle.on('close', common.mustCall()); + const stream = fs.createWriteStream(null, { fd: handle }); + + stream.end(input); + stream.on('close', common.mustCall(() => { + const output = fs.readFileSync(file, 'utf-8'); + assert.strictEqual(output, input); + })); +})); diff --git a/test/parallel/test-fs-write.js b/test/parallel/test-fs-write.js index bdee397eb58dd2..63f0245663c435 100644 --- a/test/parallel/test-fs-write.js +++ b/test/parallel/test-fs-write.js @@ -36,11 +36,13 @@ const fn4 = path.join(tmpdir.path, 'write4.txt'); const expected = 'ümlaut.'; const constants = fs.constants; -/* eslint-disable no-undef */ -common.allowGlobals(externalizeString, isOneByteString, x); +const { externalizeString, isOneByteString } = global; + +// Account for extra globals exposed by --expose_externalize_string. +common.allowGlobals(externalizeString, isOneByteString, global.x); { - const expected = 'ümlaut eins'; // Must be a unique string. + const expected = 'ümlaut sechzig'; // Must be a unique string. externalizeString(expected); assert.strictEqual(isOneByteString(expected), true); const fd = fs.openSync(fn, 'w'); @@ -50,7 +52,7 @@ common.allowGlobals(externalizeString, isOneByteString, x); } { - const expected = 'ümlaut zwei'; // Must be a unique string. + const expected = 'ümlaut neunzig'; // Must be a unique string. externalizeString(expected); assert.strictEqual(isOneByteString(expected), true); const fd = fs.openSync(fn, 'w'); @@ -60,7 +62,7 @@ common.allowGlobals(externalizeString, isOneByteString, x); } { - const expected = '中文 1'; // Must be a unique string. + const expected = 'Zhōngwén 1'; // Must be a unique string. externalizeString(expected); assert.strictEqual(isOneByteString(expected), false); const fd = fs.openSync(fn, 'w'); @@ -70,7 +72,7 @@ common.allowGlobals(externalizeString, isOneByteString, x); } { - const expected = '中文 2'; // Must be a unique string. + const expected = 'Zhōngwén 2'; // Must be a unique string. externalizeString(expected); assert.strictEqual(isOneByteString(expected), false); const fd = fs.openSync(fn, 'w'); @@ -78,7 +80,6 @@ common.allowGlobals(externalizeString, isOneByteString, x); fs.closeSync(fd); assert.strictEqual(fs.readFileSync(fn, 'utf8'), expected); } -/* eslint-enable no-undef */ fs.open(fn, 'w', 0o644, common.mustSucceed((fd) => { const done = common.mustSucceed((written) => { diff --git a/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js b/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js new file mode 100644 index 00000000000000..16d1f915fee3c3 --- /dev/null +++ b/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js @@ -0,0 +1,36 @@ +'use strict'; + +require('../common'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const { spawnSync } = require('child_process'); +const fixtures = require('../common/fixtures'); +const fs = require('fs'); +const env = { + ...process.env, + TEST_ALLOCATION: 50000, + TEST_CHUNK: 1000, + TEST_CLEAN_INTERVAL: 500, + NODE_DEBUG_NATIVE: 'diagnostics' +}; + +{ + console.log('\nTesting limit = 1'); + tmpdir.refresh(); + const child = spawnSync(process.execPath, [ + '--trace-gc', + '--heapsnapshot-near-heap-limit=1', + '--max-old-space-size=50', + fixtures.path('workload', 'bounded.js') + ], { + cwd: tmpdir.path, + env, + }); + console.log(child.stdout.toString()); + console.log(child.stderr.toString()); + assert.strictEqual(child.signal, null); + assert.strictEqual(child.status, 0); + const list = fs.readdirSync(tmpdir.path) + .filter((file) => file.endsWith('.heapsnapshot')); + assert.strictEqual(list.length, 0); +} diff --git a/test/parallel/test-heapsnapshot-near-heap-limit.js b/test/parallel/test-heapsnapshot-near-heap-limit.js new file mode 100644 index 00000000000000..db75da221ab017 --- /dev/null +++ b/test/parallel/test-heapsnapshot-near-heap-limit.js @@ -0,0 +1,114 @@ +'use strict'; + +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const { spawnSync } = require('child_process'); +const fixtures = require('../common/fixtures'); +const fs = require('fs'); +const env = { + ...process.env, + NODE_DEBUG_NATIVE: 'diagnostics' +}; + +{ + tmpdir.refresh(); + const child = spawnSync(process.execPath, [ + '--heapsnapshot-near-heap-limit=-15', + '--max-old-space-size=50', + fixtures.path('workload', 'grow.js') + ], { + cwd: tmpdir.path, + env, + }); + assert.strictEqual(child.status, 9); +} + +{ + console.log('\nTesting limit = 0'); + tmpdir.refresh(); + const child = spawnSync(process.execPath, [ + '--trace-gc', + '--heapsnapshot-near-heap-limit=0', + '--max-old-space-size=50', + fixtures.path('workload', 'grow.js') + ], { + cwd: tmpdir.path, + env, + }); + console.log(child.stdout.toString()); + console.log(child.stderr.toString()); + assert(common.nodeProcessAborted(child.status, child.signal), + 'process should have aborted, but did not'); + const list = fs.readdirSync(tmpdir.path) + .filter((file) => file.endsWith('.heapsnapshot')); + assert.strictEqual(list.length, 0); +} + +{ + console.log('\nTesting limit = 1'); + tmpdir.refresh(); + const child = spawnSync(process.execPath, [ + '--trace-gc', + '--heapsnapshot-near-heap-limit=1', + '--max-old-space-size=50', + fixtures.path('workload', 'grow.js') + ], { + cwd: tmpdir.path, + env, + }); + console.log(child.stdout.toString()); + console.log(child.stderr.toString()); + assert(common.nodeProcessAborted(child.status, child.signal), + 'process should have aborted, but did not'); + const list = fs.readdirSync(tmpdir.path) + .filter((file) => file.endsWith('.heapsnapshot')); + assert.strictEqual(list.length, 1); +} + +{ + console.log('\nTesting limit = 3'); + tmpdir.refresh(); + const child = spawnSync(process.execPath, [ + '--trace-gc', + '--heapsnapshot-near-heap-limit=3', + '--max-old-space-size=50', + fixtures.path('workload', 'grow.js') + ], { + cwd: tmpdir.path, + env, + }); + console.log(child.stdout.toString()); + console.log(child.stderr.toString()); + assert(common.nodeProcessAborted(child.status, child.signal), + 'process should have aborted, but did not'); + const list = fs.readdirSync(tmpdir.path) + .filter((file) => file.endsWith('.heapsnapshot')); + assert(list.length > 0 && list.length <= 3); +} + + +{ + console.log('\nTesting worker'); + tmpdir.refresh(); + const child = spawnSync(process.execPath, [ + fixtures.path('workload', 'grow-worker.js') + ], { + cwd: tmpdir.path, + env: { + TEST_SNAPSHOTS: 1, + TEST_OLD_SPACE_SIZE: 50, + ...env + } + }); + console.log(child.stdout.toString()); + const stderr = child.stderr.toString(); + console.log(stderr); + // There should be one snapshot taken and then after the + // snapshot heap limit callback is popped, the OOM callback + // becomes effective. + assert(stderr.includes('ERR_WORKER_OUT_OF_MEMORY')); + const list = fs.readdirSync(tmpdir.path) + .filter((file) => file.endsWith('.heapsnapshot')); + assert.strictEqual(list.length, 1); +} diff --git a/test/parallel/test-http-client-abort-destroy.js b/test/parallel/test-http-client-abort-destroy.js index 6db2ea5682e922..7af63a1ef408c0 100644 --- a/test/parallel/test-http-client-abort-destroy.js +++ b/test/parallel/test-http-client-abort-destroy.js @@ -52,8 +52,7 @@ const assert = require('assert'); { // destroy - const server = http.createServer(common.mustNotCall((req, res) => { - })); + const server = http.createServer(common.mustNotCall()); server.listen(0, common.mustCall(() => { const options = { port: server.address().port }; @@ -69,3 +68,26 @@ const assert = require('assert'); assert.strictEqual(req.destroyed, true); })); } + + +{ + // Destroy with AbortSignal + + const server = http.createServer(common.mustNotCall()); + const controller = new AbortController(); + + server.listen(0, common.mustCall(() => { + const options = { port: server.address().port, signal: controller.signal }; + const req = http.get(options, common.mustNotCall()); + req.on('error', common.mustCall((err) => { + assert.strictEqual(err.code, 'ABORT_ERR'); + assert.strictEqual(err.name, 'AbortError'); + server.close(); + })); + assert.strictEqual(req.aborted, false); + assert.strictEqual(req.destroyed, false); + controller.abort(); + assert.strictEqual(req.aborted, false); + assert.strictEqual(req.destroyed, true); + })); +} diff --git a/test/parallel/test-http-client-agent.js b/test/parallel/test-http-client-agent.js index 3ae906f09c92ae..77616edd99d2fb 100644 --- a/test/parallel/test-http-client-agent.js +++ b/test/parallel/test-http-client-agent.js @@ -46,8 +46,8 @@ server.listen(0, common.mustCall(() => { })); const countdown = new Countdown(max, () => { - assert(!http.globalAgent.sockets.hasOwnProperty(name)); - assert(!http.globalAgent.requests.hasOwnProperty(name)); + assert(!(name in http.globalAgent.sockets)); + assert(!(name in http.globalAgent.requests)); server.close(); }); diff --git a/test/parallel/test-http-client-incomingmessage-destroy.js b/test/parallel/test-http-client-incomingmessage-destroy.js new file mode 100644 index 00000000000000..a0823d37786365 --- /dev/null +++ b/test/parallel/test-http-client-incomingmessage-destroy.js @@ -0,0 +1,25 @@ +'use strict'; + +const common = require('../common'); +const { createServer, get } = require('http'); +const assert = require('assert'); + +const server = createServer(common.mustCall((req, res) => { + res.writeHead(200); + res.write('Part of res.'); +})); + +function onUncaught(error) { + assert.strictEqual(error.message, 'Destroy test'); + server.close(); +} + +process.on('uncaughtException', common.mustCall(onUncaught)); + +server.listen(0, () => { + get({ + port: server.address().port + }, common.mustCall((res) => { + res.destroy(new Error('Destroy test')); + })); +}); diff --git a/test/parallel/test-http-client-override-global-agent.js b/test/parallel/test-http-client-override-global-agent.js index 0efaded5e419b0..f8b2928940e188 100644 --- a/test/parallel/test-http-client-override-global-agent.js +++ b/test/parallel/test-http-client-override-global-agent.js @@ -14,7 +14,7 @@ server.listen(0, common.mustCall(() => { http.globalAgent = agent; makeRequest(); - assert(agent.sockets.hasOwnProperty(name)); // Agent has indeed been used + assert(name in agent.sockets); // Agent has indeed been used })); function makeRequest() { diff --git a/test/parallel/test-http-connect-req-res.js b/test/parallel/test-http-connect-req-res.js index cd6e55e0898c66..dfb83a41aa6236 100644 --- a/test/parallel/test-http-connect-req-res.js +++ b/test/parallel/test-http-connect-req-res.js @@ -43,8 +43,8 @@ server.listen(0, common.mustCall(function() { // Make sure this request got removed from the pool. const name = `localhost:${server.address().port}`; - assert(!http.globalAgent.sockets.hasOwnProperty(name)); - assert(!http.globalAgent.requests.hasOwnProperty(name)); + assert(!(name in http.globalAgent.sockets)); + assert(!(name in http.globalAgent.requests)); // Make sure this socket has detached. assert(!socket.ondata); diff --git a/test/parallel/test-http-connect.js b/test/parallel/test-http-connect.js index 47fd7316d0cf1d..b6053ba9d45187 100644 --- a/test/parallel/test-http-connect.js +++ b/test/parallel/test-http-connect.js @@ -70,8 +70,8 @@ server.listen(0, common.mustCall(() => { req.on('connect', common.mustCall((res, socket, firstBodyChunk) => { // Make sure this request got removed from the pool. const name = `localhost:${server.address().port}`; - assert(!http.globalAgent.sockets.hasOwnProperty(name)); - assert(!http.globalAgent.requests.hasOwnProperty(name)); + assert(!(name in http.globalAgent.sockets)); + assert(!(name in http.globalAgent.requests)); // Make sure this socket has detached. assert(!socket.ondata); diff --git a/test/parallel/test-http-destroyed-socket-write2.js b/test/parallel/test-http-destroyed-socket-write2.js index 49594bde6daf1d..8511c43dddf155 100644 --- a/test/parallel/test-http-destroyed-socket-write2.js +++ b/test/parallel/test-http-destroyed-socket-write2.js @@ -21,16 +21,20 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); // Verify that ECONNRESET is raised when writing to a http request // where the server has ended the socket. +const assert = require('assert'); const http = require('http'); + +const kResponseDestroyed = Symbol('kResponseDestroyed'); + const server = http.createServer(function(req, res) { - setImmediate(function() { + req.on('data', common.mustCall(function() { res.destroy(); - }); + server.emit(kResponseDestroyed); + })); }); server.listen(0, function() { @@ -40,11 +44,9 @@ server.listen(0, function() { method: 'POST' }); - function write() { - req.write('hello', function() { - setImmediate(write); - }); - } + server.once(kResponseDestroyed, common.mustCall(function() { + req.write('hello'); + })); req.on('error', common.mustCall(function(er) { assert.strictEqual(req.res, null); @@ -73,6 +75,5 @@ server.listen(0, function() { })); req.on('response', common.mustNotCall()); - - write(); + req.write('hello', common.mustSucceed()); }); diff --git a/test/parallel/test-http-keep-alive.js b/test/parallel/test-http-keep-alive.js index 42d534e8e6b459..bd075230d16db1 100644 --- a/test/parallel/test-http-keep-alive.js +++ b/test/parallel/test-http-keep-alive.js @@ -59,7 +59,7 @@ server.listen(0, common.mustCall(function() { }, common.mustCall((response) => { response.on('end', common.mustCall(() => { assert.strictEqual(agent.sockets[name].length, 1); - assert(!agent.requests.hasOwnProperty(name)); + assert(!(name in agent.requests)); server.close(); })); response.resume(); @@ -67,6 +67,6 @@ server.listen(0, common.mustCall(function() { })); process.on('exit', () => { - assert(!agent.sockets.hasOwnProperty(name)); - assert(!agent.requests.hasOwnProperty(name)); + assert(!(name in agent.sockets)); + assert(!(name in agent.requests)); }); diff --git a/test/parallel/test-http-outgoing-end-multiple.js b/test/parallel/test-http-outgoing-end-multiple.js index 7c43e1f59d5849..ed42c913375e84 100644 --- a/test/parallel/test-http-outgoing-end-multiple.js +++ b/test/parallel/test-http-outgoing-end-multiple.js @@ -3,9 +3,17 @@ const common = require('../common'); const assert = require('assert'); const http = require('http'); +const onWriteAfterEndError = common.mustCall((err) => { + assert.strictEqual(err.code, 'ERR_STREAM_WRITE_AFTER_END'); +}, 2); + const server = http.createServer(common.mustCall(function(req, res) { res.end('testing ended state', common.mustCall()); - res.end(common.mustCall()); + res.end(common.mustCall((err) => { + assert.strictEqual(err.code, 'ERR_STREAM_ALREADY_FINISHED'); + })); + res.end('end', onWriteAfterEndError); + res.on('error', onWriteAfterEndError); res.on('finish', common.mustCall(() => { res.end(common.mustCall((err) => { assert.strictEqual(err.code, 'ERR_STREAM_ALREADY_FINISHED'); diff --git a/test/parallel/test-http-outgoing-internal-headernames-getter.js b/test/parallel/test-http-outgoing-internal-headernames-getter.js index c3caffff1f8a42..4a56a1301050b5 100644 --- a/test/parallel/test-http-outgoing-internal-headernames-getter.js +++ b/test/parallel/test-http-outgoing-internal-headernames-getter.js @@ -9,5 +9,5 @@ common.expectWarning('DeprecationWarning', warn, 'DEP0066'); { // Tests for _headerNames get method const outgoingMessage = new OutgoingMessage(); - outgoingMessage._headerNames; + outgoingMessage._headerNames; // eslint-disable-line no-unused-expressions } diff --git a/test/parallel/test-http-outgoing-internal-headers.js b/test/parallel/test-http-outgoing-internal-headers.js index b9e7aed165b68d..7bd97bcb530955 100644 --- a/test/parallel/test-http-outgoing-internal-headers.js +++ b/test/parallel/test-http-outgoing-internal-headers.js @@ -13,7 +13,7 @@ common.expectWarning('DeprecationWarning', warn, 'DEP0066'); // Tests for _headers get method const outgoingMessage = new OutgoingMessage(); outgoingMessage.getHeaders = common.mustCall(); - outgoingMessage._headers; + outgoingMessage._headers; // eslint-disable-line no-unused-expressions } { diff --git a/test/parallel/test-http-same-map.js b/test/parallel/test-http-same-map.js index 0adb73222de184..3d8d325ad7b0d1 100644 --- a/test/parallel/test-http-same-map.js +++ b/test/parallel/test-http-same-map.js @@ -39,9 +39,10 @@ onresponse.responses = []; function allSame(list) { assert(list.length >= 2); - // Use |elt| in no-op position to pacify eslint. - for (const elt of list) elt, eval('%DebugPrint(elt)'); - for (const elt of list) elt, assert(eval('%HaveSameMap(list[0], elt)')); + // eslint-disable-next-line no-unused-vars + for (const elt of list) eval('%DebugPrint(elt)'); + // eslint-disable-next-line no-unused-vars + for (const elt of list) assert(eval('%HaveSameMap(list[0], elt)')); } process.on('exit', () => { diff --git a/test/parallel/test-http-server-incomingmessage-destroy.js b/test/parallel/test-http-server-incomingmessage-destroy.js new file mode 100644 index 00000000000000..cfe7e4feecba45 --- /dev/null +++ b/test/parallel/test-http-server-incomingmessage-destroy.js @@ -0,0 +1,25 @@ +'use strict'; + +const common = require('../common'); +const { createServer, get } = require('http'); +const assert = require('assert'); + +const server = createServer(common.mustCall((req, res) => { + req.destroy(new Error('Destroy test')); +})); + +function onUncaught(error) {} + +process.on('uncaughtException', common.mustNotCall(onUncaught)); + +server.listen(0, common.mustCall(() => { + get({ + port: server.address().port + }, (res) => { + res.resume(); + }).on('error', (error) => { + assert.strictEqual(error.message, 'socket hang up'); + assert.strictEqual(error.code, 'ECONNRESET'); + server.close(); + }); +})); diff --git a/test/parallel/test-http-set-header-chain.js b/test/parallel/test-http-set-header-chain.js new file mode 100644 index 00000000000000..aa9519129a9123 --- /dev/null +++ b/test/parallel/test-http-set-header-chain.js @@ -0,0 +1,29 @@ +'use strict'; +const common = require('../common'); +const http = require('http'); +const assert = require('assert'); +const expected = { + '__proto__': null, + 'testheader1': 'foo', + 'testheader2': 'bar', + 'testheader3': 'xyz' +}; +const server = http.createServer(common.mustCall((req, res) => { + let retval = res.setHeader('testheader1', 'foo'); + + // Test that the setHeader returns the same response object. + assert.strictEqual(retval, res); + + retval = res.setHeader('testheader2', 'bar').setHeader('testheader3', 'xyz'); + // Test that chaining works for setHeader. + assert.deepStrictEqual(res.getHeaders(), expected); + res.end('ok'); +})); +server.listen(0, () => { + http.get({ port: server.address().port }, common.mustCall((res) => { + res.on('data', () => {}); + res.on('end', common.mustCall(() => { + server.close(); + })); + })); +}); diff --git a/test/parallel/test-http-upgrade-agent.js b/test/parallel/test-http-upgrade-agent.js index cb33edc32e0139..28498819490b4f 100644 --- a/test/parallel/test-http-upgrade-agent.js +++ b/test/parallel/test-http-upgrade-agent.js @@ -78,7 +78,7 @@ server.listen(0, '127.0.0.1', common.mustCall(function() { assert.deepStrictEqual(expectedHeaders, res.headers); // Make sure this request got removed from the pool. - assert(!http.globalAgent.sockets.hasOwnProperty(name)); + assert(!(name in http.globalAgent.sockets)); req.on('close', common.mustCall(function() { socket.end(); diff --git a/test/parallel/test-http2-client-destroy.js b/test/parallel/test-http2-client-destroy.js index 12da903c6535a0..f257cf6f0006fa 100644 --- a/test/parallel/test-http2-client-destroy.js +++ b/test/parallel/test-http2-client-destroy.js @@ -8,6 +8,7 @@ if (!common.hasCrypto) const assert = require('assert'); const h2 = require('http2'); const { kSocket } = require('internal/http2/util'); +const { kEvents } = require('internal/event_target'); const Countdown = require('../common/countdown'); { @@ -77,6 +78,7 @@ const Countdown = require('../common/countdown'); }; assert.throws(() => client.setNextStreamID(), sessionError); + assert.throws(() => client.setLocalWindowSize(), sessionError); assert.throws(() => client.ping(), sessionError); assert.throws(() => client.settings({}), sessionError); assert.throws(() => client.goaway(), sessionError); @@ -87,6 +89,7 @@ const Countdown = require('../common/countdown'); // so that state.destroyed is set to true setImmediate(() => { assert.throws(() => client.setNextStreamID(), sessionError); + assert.throws(() => client.setLocalWindowSize(), sessionError); assert.throws(() => client.ping(), sessionError); assert.throws(() => client.settings({}), sessionError); assert.throws(() => client.goaway(), sessionError); @@ -165,3 +168,76 @@ const Countdown = require('../common/countdown'); req.on('close', common.mustCall(() => server.close())); })); } + +// Destroy with AbortSignal +{ + const server = h2.createServer(); + const controller = new AbortController(); + + server.on('stream', common.mustNotCall()); + server.listen(0, common.mustCall(() => { + const client = h2.connect(`http://localhost:${server.address().port}`); + client.on('close', common.mustCall()); + + const { signal } = controller; + assert.strictEqual(signal[kEvents].get('abort'), undefined); + + client.on('error', common.mustCall(() => { + // After underlying stream dies, signal listener detached + assert.strictEqual(signal[kEvents].get('abort'), undefined); + })); + + const req = client.request({}, { signal }); + + req.on('error', common.mustCall((err) => { + assert.strictEqual(err.code, 'ABORT_ERR'); + assert.strictEqual(err.name, 'AbortError'); + })); + req.on('close', common.mustCall(() => server.close())); + + assert.strictEqual(req.aborted, false); + assert.strictEqual(req.destroyed, false); + // Signal listener attached + assert.strictEqual(signal[kEvents].get('abort').size, 1); + + controller.abort(); + + assert.strictEqual(req.aborted, false); + assert.strictEqual(req.destroyed, true); + })); +} +// Pass an already destroyed signal to abort immediately. +{ + const server = h2.createServer(); + const controller = new AbortController(); + + server.on('stream', common.mustNotCall()); + server.listen(0, common.mustCall(() => { + const client = h2.connect(`http://localhost:${server.address().port}`); + client.on('close', common.mustCall()); + + const { signal } = controller; + controller.abort(); + + assert.strictEqual(signal[kEvents].get('abort'), undefined); + + client.on('error', common.mustCall(() => { + // After underlying stream dies, signal listener detached + assert.strictEqual(signal[kEvents].get('abort'), undefined); + })); + + const req = client.request({}, { signal }); + // Signal already aborted, so no event listener attached. + assert.strictEqual(signal[kEvents].get('abort'), undefined); + + assert.strictEqual(req.aborted, false); + // Destroyed on same tick as request made + assert.strictEqual(req.destroyed, true); + + req.on('error', common.mustCall((err) => { + assert.strictEqual(err.code, 'ABORT_ERR'); + assert.strictEqual(err.name, 'AbortError'); + })); + req.on('close', common.mustCall(() => server.close())); + })); +} diff --git a/test/parallel/test-http2-client-jsstream-destroy.js b/test/parallel/test-http2-client-jsstream-destroy.js new file mode 100644 index 00000000000000..7e44241e985a64 --- /dev/null +++ b/test/parallel/test-http2-client-jsstream-destroy.js @@ -0,0 +1,58 @@ +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const h2 = require('http2'); +const tls = require('tls'); +const fixtures = require('../common/fixtures'); +const { Duplex } = require('stream'); + +const server = h2.createSecureServer({ + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem') +}); + +class JSSocket extends Duplex { + constructor(socket) { + super({ emitClose: true }); + socket.on('close', () => this.destroy()); + socket.on('data', (data) => this.push(data)); + this.socket = socket; + } + + _write(data, encoding, callback) { + this.socket.write(data, encoding, callback); + } + + _read(size) { + } + + _final(cb) { + cb(); + } +} + +server.listen(0, common.mustCall(function() { + const socket = tls.connect({ + rejectUnauthorized: false, + host: 'localhost', + port: this.address().port, + ALPNProtocols: ['h2'] + }, () => { + const proxy = new JSSocket(socket); + const client = h2.connect(`https://localhost:${this.address().port}`, { + createConnection: () => proxy + }); + const req = client.request(); + + server.on('request', () => { + socket.destroy(); + }); + + req.on('close', common.mustCall(() => { + client.close(); + server.close(); + })); + }); +})); diff --git a/test/parallel/test-http2-client-setLocalWindowSize.js b/test/parallel/test-http2-client-setLocalWindowSize.js new file mode 100644 index 00000000000000..8e3b57ed0c1a6b --- /dev/null +++ b/test/parallel/test-http2-client-setLocalWindowSize.js @@ -0,0 +1,121 @@ +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const http2 = require('http2'); + +{ + const server = http2.createServer(); + server.on('stream', common.mustNotCall((stream) => { + stream.respond(); + stream.end('ok'); + })); + + const types = { + boolean: true, + function: () => {}, + number: 1, + object: {}, + array: [], + null: null, + }; + + server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + + client.on('connect', common.mustCall(() => { + const outOfRangeNum = 2 ** 32; + assert.throws( + () => client.setLocalWindowSize(outOfRangeNum), + { + name: 'RangeError', + code: 'ERR_OUT_OF_RANGE', + message: 'The value of "windowSize" is out of range.' + + ' It must be >= 0 && <= 2147483647. Received ' + outOfRangeNum + } + ); + + // Throw if something other than number is passed to setLocalWindowSize + Object.entries(types).forEach(([type, value]) => { + if (type === 'number') { + return; + } + + assert.throws( + () => client.setLocalWindowSize(value), + { + name: 'TypeError', + code: 'ERR_INVALID_ARG_TYPE', + message: 'The "windowSize" argument must be of type number.' + + common.invalidArgTypeHelper(value) + } + ); + }); + + server.close(); + client.close(); + })); + })); +} + +{ + const server = http2.createServer(); + server.on('stream', common.mustNotCall((stream) => { + stream.respond(); + stream.end('ok'); + })); + + server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + + client.on('connect', common.mustCall(() => { + const windowSize = 2 ** 20; + const defaultSetting = http2.getDefaultSettings(); + client.setLocalWindowSize(windowSize); + + assert.strictEqual(client.state.effectiveLocalWindowSize, windowSize); + assert.strictEqual(client.state.localWindowSize, windowSize); + assert.strictEqual( + client.state.remoteWindowSize, + defaultSetting.initialWindowSize + ); + + server.close(); + client.close(); + })); + })); +} + +{ + const server = http2.createServer(); + server.on('stream', common.mustNotCall((stream) => { + stream.respond(); + stream.end('ok'); + })); + + server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + + client.on('connect', common.mustCall(() => { + const windowSize = 20; + const defaultSetting = http2.getDefaultSettings(); + client.setLocalWindowSize(windowSize); + + assert.strictEqual(client.state.effectiveLocalWindowSize, windowSize); + assert.strictEqual( + client.state.localWindowSize, + defaultSetting.initialWindowSize + ); + assert.strictEqual( + client.state.remoteWindowSize, + defaultSetting.initialWindowSize + ); + + server.close(); + client.close(); + })); + })); +} diff --git a/test/parallel/test-http2-close-while-writing.js b/test/parallel/test-http2-close-while-writing.js new file mode 100644 index 00000000000000..d8537c31b00eb6 --- /dev/null +++ b/test/parallel/test-http2-close-while-writing.js @@ -0,0 +1,46 @@ +'use strict'; +// https://github.com/nodejs/node/issues/33156 +const common = require('../common'); +const fixtures = require('../common/fixtures'); + +if (!common.hasCrypto) { + common.skip('missing crypto'); +} + +const http2 = require('http2'); + +const key = fixtures.readKey('agent8-key.pem', 'binary'); +const cert = fixtures.readKey('agent8-cert.pem', 'binary'); +const ca = fixtures.readKey('fake-startcom-root-cert.pem', 'binary'); + +const server = http2.createSecureServer({ + key, + cert, + maxSessionMemory: 1000 +}); + +let client_stream; + +server.on('session', common.mustCall(function(session) { + session.on('stream', common.mustCall(function(stream) { + stream.resume(); + stream.on('data', function() { + this.write(Buffer.alloc(1)); + process.nextTick(() => client_stream.destroy()); + }); + })); +})); + +server.listen(0, function() { + const client = http2.connect(`https://localhost:${server.address().port}`, { + ca, + maxSessionMemory: 1000 + }); + client_stream = client.request({ ':method': 'POST' }); + client_stream.on('close', common.mustCall(() => { + client.close(); + server.close(); + })); + client_stream.resume(); + client_stream.write(Buffer.alloc(64 * 1024)); +}); diff --git a/test/parallel/test-http2-connect-tls-with-delay.js b/test/parallel/test-http2-connect-tls-with-delay.js new file mode 100644 index 00000000000000..0b3753ae383642 --- /dev/null +++ b/test/parallel/test-http2-connect-tls-with-delay.js @@ -0,0 +1,50 @@ +// Flags: --expose-internals +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const http2 = require('http2'); +const tls = require('tls'); +const fixtures = require('../common/fixtures'); + +const serverOptions = { + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem') +}; + +const server = http2.createSecureServer(serverOptions, (req, res) => { + res.end(); +}); + +server.listen(0, '127.0.0.1', common.mustCall(() => { + const options = { + ALPNProtocols: ['h2'], + host: '127.0.0.1', + servername: 'localhost', + port: server.address().port, + rejectUnauthorized: false + }; + + const socket = tls.connect(options, async () => { + socket.once('readable', () => { + const client = http2.connect( + 'https://localhost:' + server.address().port, + { ...options, createConnection: () => socket } + ); + + client.once('remoteSettings', common.mustCall(() => { + const req = client.request({ + ':path': '/' + }); + req.on('data', () => req.resume()); + req.on('end', common.mustCall(() => { + client.close(); + req.close(); + server.close(); + })); + req.end(); + })); + }); + }); +})); diff --git a/test/parallel/test-http2-destroy-after-write.js b/test/parallel/test-http2-destroy-after-write.js new file mode 100644 index 00000000000000..399df015b8879e --- /dev/null +++ b/test/parallel/test-http2-destroy-after-write.js @@ -0,0 +1,37 @@ +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) { + common.skip('missing crypto'); +} + +const http2 = require('http2'); +const assert = require('assert'); + +const server = http2.createServer(); + +server.on('session', common.mustCall(function(session) { + session.on('stream', common.mustCall(function(stream) { + stream.on('end', common.mustCall(function() { + this.respond({ + ':status': 200 + }); + this.write('foo'); + this.destroy(); + })); + stream.resume(); + })); +})); + +server.listen(0, function() { + const client = http2.connect(`http://localhost:${server.address().port}`); + const stream = client.request({ ':method': 'POST' }); + stream.on('response', common.mustCall(function(headers) { + assert.strictEqual(headers[':status'], 200); + })); + stream.on('close', common.mustCall(() => { + client.close(); + server.close(); + })); + stream.resume(); + stream.end(); +}); diff --git a/test/parallel/test-http2-getpackedsettings.js b/test/parallel/test-http2-getpackedsettings.js index f33c0e916a5d13..374e537d5634aa 100644 --- a/test/parallel/test-http2-getpackedsettings.js +++ b/test/parallel/test-http2-getpackedsettings.js @@ -133,8 +133,8 @@ http2.getPackedSettings({ enablePush: false }); code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', message: - 'The "buf" argument must be an instance of Buffer, TypedArray, or ' + - `DataView.${common.invalidArgTypeHelper(input)}` + 'The "buf" argument must be an instance of Buffer or TypedArray.' + + common.invalidArgTypeHelper(input) }); }); @@ -159,6 +159,58 @@ http2.getPackedSettings({ enablePush: false }); assert.strictEqual(settings.enableConnectProtocol, false); } +{ + const packed = new Uint16Array([ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, + 0x00, 0x03, 0x00, 0x00, 0x00, 0xc8, + 0x00, 0x05, 0x00, 0x00, 0x4e, 0x20, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x64, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00]); + + assert.throws(() => { + http2.getUnpackedSettings(packed.slice(5)); + }, { + code: 'ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH', + name: 'RangeError', + message: 'Packed settings length must be a multiple of six' + }); + + const settings = http2.getUnpackedSettings(packed); + + assert(settings); + assert.strictEqual(settings.headerTableSize, 100); + assert.strictEqual(settings.initialWindowSize, 100); + assert.strictEqual(settings.maxFrameSize, 20000); + assert.strictEqual(settings.maxConcurrentStreams, 200); + assert.strictEqual(settings.maxHeaderListSize, 100); + assert.strictEqual(settings.maxHeaderSize, 100); + assert.strictEqual(settings.enablePush, true); + assert.strictEqual(settings.enableConnectProtocol, false); +} + +{ + const packed = new DataView(Buffer.from([ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, + 0x00, 0x03, 0x00, 0x00, 0x00, 0xc8, + 0x00, 0x05, 0x00, 0x00, 0x4e, 0x20, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x64, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00]).buffer); + + assert.throws(() => { + http2.getUnpackedSettings(packed); + }, { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: + 'The "buf" argument must be an instance of Buffer or TypedArray.' + + common.invalidArgTypeHelper(packed) + }); +} + { const packed = Buffer.from([ 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, diff --git a/test/parallel/test-http2-respond-file-error-pipe-offset.js b/test/parallel/test-http2-respond-file-error-pipe-offset.js index 21fccb905d7224..39876baaf51dab 100644 --- a/test/parallel/test-http2-respond-file-error-pipe-offset.js +++ b/test/parallel/test-http2-respond-file-error-pipe-offset.js @@ -56,4 +56,11 @@ server.listen(0, () => { req.end(); }); -fs.writeFile(pipeName, 'Hello, world!\n', common.mustSucceed()); +fs.writeFile(pipeName, 'Hello, world!\n', common.mustCall((err) => { + // It's possible for the reading end of the pipe to get the expected error + // and break everything down before we're finished, so allow `EPIPE` but + // no other errors. + if (err?.code !== 'EPIPE') { + assert.ifError(err); + } +})); diff --git a/test/parallel/test-http2-server-setLocalWindowSize.js b/test/parallel/test-http2-server-setLocalWindowSize.js new file mode 100644 index 00000000000000..8fcb9b9d0d81b0 --- /dev/null +++ b/test/parallel/test-http2-server-setLocalWindowSize.js @@ -0,0 +1,37 @@ +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const http2 = require('http2'); + +const server = http2.createServer(); +server.on('stream', common.mustCall((stream) => { + stream.respond(); + stream.end('ok'); +})); +server.on('session', common.mustCall((session) => { + const windowSize = 2 ** 20; + const defaultSetting = http2.getDefaultSettings(); + session.setLocalWindowSize(windowSize); + + assert.strictEqual(session.state.effectiveLocalWindowSize, windowSize); + assert.strictEqual(session.state.localWindowSize, windowSize); + assert.strictEqual( + session.state.remoteWindowSize, + defaultSetting.initialWindowSize + ); +})); + +server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + + const req = client.request(); + req.resume(); + req.on('close', common.mustCall(() => { + client.close(); + server.close(); + })); +})); diff --git a/test/parallel/test-http2-socket-proxy-handler-for-has.js b/test/parallel/test-http2-socket-proxy-handler-for-has.js new file mode 100644 index 00000000000000..ccc63149ff1b12 --- /dev/null +++ b/test/parallel/test-http2-socket-proxy-handler-for-has.js @@ -0,0 +1,39 @@ +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) { + common.skip('missing crypto'); +} + +const fixtures = require('../common/fixtures'); +const assert = require('assert'); +const http2 = require('http2'); + +const serverOptions = { + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem') +}; +const server = http2.createSecureServer(serverOptions, common.mustCall( + (req, res) => { + const request = req; + assert.strictEqual(request.socket.encrypted, true); + assert.ok('encrypted' in request.socket); + res.end(); + } +)); +server.listen(common.mustCall(() => { + const port = server.address().port; + const client = http2.connect('https://localhost:' + port, { + ca: fixtures.readKey('agent1-cert.pem'), + rejectUnauthorized: false + }); + const req = client.request({}); + req.on('response', common.mustCall((headers, flags) => { + console.log(headers); + server.close(common.mustCall(() => { + })); + })); + req.on('end', common.mustCall(() => { + client.close(); + })); + req.end(); +})); diff --git a/test/parallel/test-http2-unbound-socket-proxy.js b/test/parallel/test-http2-unbound-socket-proxy.js index a5505c8509dca3..74ca0169446afb 100644 --- a/test/parallel/test-http2-unbound-socket-proxy.js +++ b/test/parallel/test-http2-unbound-socket-proxy.js @@ -26,7 +26,7 @@ server.listen(0, common.mustCall(() => { // informative error. setImmediate(common.mustCall(() => { assert.throws(() => { - socket.example; + socket.example; // eslint-disable-line no-unused-expressions }, { code: 'ERR_HTTP2_SOCKET_UNBOUND' }); @@ -36,6 +36,7 @@ server.listen(0, common.mustCall(() => { code: 'ERR_HTTP2_SOCKET_UNBOUND' }); assert.throws(() => { + // eslint-disable-next-line no-unused-expressions socket instanceof net.Socket; }, { code: 'ERR_HTTP2_SOCKET_UNBOUND' diff --git a/test/parallel/test-http2-update-settings.js b/test/parallel/test-http2-update-settings.js new file mode 100644 index 00000000000000..e99ee2bcf150d8 --- /dev/null +++ b/test/parallel/test-http2-update-settings.js @@ -0,0 +1,59 @@ +'use strict'; + +// This test ensures that the Http2SecureServer and Http2Server +// settings are updated when the setting object is valid. +// When the setting object is invalid, this test ensures that +// updateSettings throws an exception. + +const common = require('../common'); +if (!common.hasCrypto) { common.skip('missing crypto'); } +const assert = require('assert'); +const http2 = require('http2'); + +testUpdateSettingsWith({ + server: http2.createSecureServer(), + newServerSettings: { + 'headerTableSize': 1, + 'initialWindowSize': 1, + 'maxConcurrentStreams': 1, + 'maxHeaderListSize': 1, + 'maxFrameSize': 16385, + 'enablePush': false, + 'enableConnectProtocol': true + } +}); +testUpdateSettingsWith({ + server: http2.createServer(), + newServerSettings: { + 'enablePush': false + } +}); + +function testUpdateSettingsWith({ server, newServerSettings }) { + const oldServerSettings = getServerSettings(server); + assert.notDeepStrictEqual(oldServerSettings, newServerSettings); + server.updateSettings(newServerSettings); + const updatedServerSettings = getServerSettings(server); + assert.deepStrictEqual(updatedServerSettings, { ...oldServerSettings, + ...newServerSettings }); + assert.throws(() => server.updateSettings(''), { + message: 'The "settings" argument must be of type object. ' + + 'Received type string (\'\')', + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }); + assert.throws(() => server.updateSettings({ + 'maxHeaderListSize': 'foo' + }), { + message: 'Invalid value for setting "maxHeaderListSize": foo', + code: 'ERR_HTTP2_INVALID_SETTING_VALUE', + name: 'RangeError' + }); +} + +function getServerSettings(server) { + const options = Object + .getOwnPropertySymbols(server) + .find((s) => s.toString() === 'Symbol(options)'); + return server[options].settings; +} diff --git a/test/parallel/test-https-abortcontroller.js b/test/parallel/test-https-abortcontroller.js new file mode 100644 index 00000000000000..80821285acf95e --- /dev/null +++ b/test/parallel/test-https-abortcontroller.js @@ -0,0 +1,39 @@ +'use strict'; +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +const fixtures = require('../common/fixtures'); +const https = require('https'); +const assert = require('assert'); +const { once } = require('events'); + +const options = { + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem') +}; + +(async () => { + const { port, server } = await new Promise((resolve) => { + const server = https.createServer(options, () => {}); + server.listen(0, () => resolve({ port: server.address().port, server })); + }); + try { + const ac = new AbortController(); + const req = https.request({ + host: 'localhost', + port, + path: '/', + method: 'GET', + rejectUnauthorized: false, + signal: ac.signal, + }); + process.nextTick(() => ac.abort()); + const [ err ] = await once(req, 'error'); + assert.strictEqual(err.name, 'AbortError'); + assert.strictEqual(err.code, 'ABORT_ERR'); + } finally { + server.close(); + } +})().then(common.mustCall()); diff --git a/test/parallel/test-https-agent-getname.js b/test/parallel/test-https-agent-getname.js index dabb08f074af9a..6f8c32b299a669 100644 --- a/test/parallel/test-https-agent-getname.js +++ b/test/parallel/test-https-agent-getname.js @@ -12,7 +12,7 @@ const agent = new https.Agent(); // empty options assert.strictEqual( agent.getName({}), - 'localhost:::::::::::::::::::' + 'localhost::::::::::::::::::::::' ); // Pass all options arguments @@ -34,11 +34,15 @@ const options = { secureOptions: 0, secureProtocol: 'secureProtocol', servername: 'localhost', - sessionIdContext: 'sessionIdContext' + sessionIdContext: 'sessionIdContext', + sigalgs: 'sigalgs', + privateKeyIdentifier: 'privateKeyIdentifier', + privateKeyEngine: 'privateKeyEngine', }; assert.strictEqual( agent.getName(options), '0.0.0.0:443:192.168.1.1:ca:cert:dynamic:ciphers:key:pfx:false:localhost:' + - '::secureProtocol:c,r,l:false:ecdhCurve:dhparam:0:sessionIdContext' + '::secureProtocol:c,r,l:false:ecdhCurve:dhparam:0:sessionIdContext:' + + '"sigalgs":privateKeyIdentifier:privateKeyEngine' ); diff --git a/test/parallel/test-https-agent.js b/test/parallel/test-https-agent.js index 4b2f9e73a1cd79..ce4bc6e5bdb86b 100644 --- a/test/parallel/test-https-agent.js +++ b/test/parallel/test-https-agent.js @@ -35,7 +35,7 @@ const options = { }; -const server = https.Server(options, function(req, res) { +const server = https.Server(options, (req, res) => { res.writeHead(200); res.end('hello world\n'); }); @@ -46,9 +46,9 @@ const N = 4; const M = 4; -server.listen(0, function() { +server.listen(0, () => { for (let i = 0; i < N; i++) { - setTimeout(function() { + setTimeout(() => { for (let j = 0; j < M; j++) { https.get({ path: '/', @@ -58,7 +58,7 @@ server.listen(0, function() { res.resume(); assert.strictEqual(res.statusCode, 200); if (++responses === N * M) server.close(); - }).on('error', function(e) { + }).on('error', (e) => { throw e; }); } @@ -67,6 +67,6 @@ server.listen(0, function() { }); -process.on('exit', function() { +process.on('exit', () => { assert.strictEqual(responses, N * M); }); diff --git a/test/parallel/test-https-client-override-global-agent.js b/test/parallel/test-https-client-override-global-agent.js index a4bb2732756b2b..8774e77bb95d37 100644 --- a/test/parallel/test-https-client-override-global-agent.js +++ b/test/parallel/test-https-client-override-global-agent.js @@ -25,7 +25,7 @@ server.listen(0, common.mustCall(() => { https.globalAgent = agent; makeRequest(); - assert(agent.sockets.hasOwnProperty(name)); // Agent has indeed been used + assert(name in agent.sockets); // Agent has indeed been used })); function makeRequest() { diff --git a/test/parallel/test-inspector-tracing-domain.js b/test/parallel/test-inspector-tracing-domain.js index 152df1491553f1..164fbe1cd86b67 100644 --- a/test/parallel/test-inspector-tracing-domain.js +++ b/test/parallel/test-inspector-tracing-domain.js @@ -30,7 +30,7 @@ function post(message, data) { function generateTrace() { return new Promise((resolve) => setTimeout(() => { for (let i = 0; i < 1000000; i++) { - 'test' + i; + 'test' + i; // eslint-disable-line no-unused-expressions } resolve(); }, 1)); diff --git a/test/parallel/test-inspector-vm-global-accessors-sideeffects.js b/test/parallel/test-inspector-vm-global-accessors-sideeffects.js index 33545e14c7ae2b..b07ce182232fba 100644 --- a/test/parallel/test-inspector-vm-global-accessors-sideeffects.js +++ b/test/parallel/test-inspector-vm-global-accessors-sideeffects.js @@ -19,8 +19,7 @@ session.post('Runtime.evaluate', { expression: 'a', throwOnSideEffect: true, contextId: 2 // context's id -}, common.mustCall((error, res) => { - assert.ifError(error), +}, common.mustSucceed((res) => { assert.deepStrictEqual(res, { result: { type: 'number', diff --git a/test/parallel/test-internal-iterable-weak-map.js b/test/parallel/test-internal-iterable-weak-map.js new file mode 100644 index 00000000000000..e0282c9081ee33 --- /dev/null +++ b/test/parallel/test-internal-iterable-weak-map.js @@ -0,0 +1,95 @@ +// Flags: --expose-gc --expose-internals +'use strict'; + +require('../common'); +const { deepStrictEqual, strictEqual } = require('assert'); +const { IterableWeakMap } = require('internal/util/iterable_weak_map'); + +// It drops entry if a reference is no longer held. +{ + const wm = new IterableWeakMap(); + const _cache = { + moduleA: {}, + moduleB: {}, + moduleC: {}, + }; + wm.set(_cache.moduleA, 'hello'); + wm.set(_cache.moduleB, 'discard'); + wm.set(_cache.moduleC, 'goodbye'); + delete _cache.moduleB; + setImmediate(() => { + _cache; // eslint-disable-line no-unused-expressions + globalThis.gc(); + const values = [...wm]; + deepStrictEqual(values, ['hello', 'goodbye']); + }); +} + +// It updates an existing entry, if the same key is provided twice. +{ + const wm = new IterableWeakMap(); + const _cache = { + moduleA: {}, + moduleB: {}, + }; + wm.set(_cache.moduleA, 'hello'); + wm.set(_cache.moduleB, 'goodbye'); + wm.set(_cache.moduleB, 'goodnight'); + const values = [...wm]; + deepStrictEqual(values, ['hello', 'goodnight']); +} + +// It allows entry to be deleted by key. +{ + const wm = new IterableWeakMap(); + const _cache = { + moduleA: {}, + moduleB: {}, + moduleC: {}, + }; + wm.set(_cache.moduleA, 'hello'); + wm.set(_cache.moduleB, 'discard'); + wm.set(_cache.moduleC, 'goodbye'); + wm.delete(_cache.moduleB); + const values = [...wm]; + deepStrictEqual(values, ['hello', 'goodbye']); +} + +// It handles delete for key that does not exist. +{ + const wm = new IterableWeakMap(); + const _cache = { + moduleA: {}, + moduleB: {}, + moduleC: {}, + }; + wm.set(_cache.moduleA, 'hello'); + wm.set(_cache.moduleC, 'goodbye'); + wm.delete(_cache.moduleB); + const values = [...wm]; + deepStrictEqual(values, ['hello', 'goodbye']); +} + +// It allows an entry to be fetched by key. +{ + const wm = new IterableWeakMap(); + const _cache = { + moduleA: {}, + moduleB: {}, + moduleC: {}, + }; + wm.set(_cache.moduleA, 'hello'); + wm.set(_cache.moduleB, 'discard'); + wm.set(_cache.moduleC, 'goodbye'); + strictEqual(wm.get(_cache.moduleB), 'discard'); +} + +// It returns true for has() if key exists. +{ + const wm = new IterableWeakMap(); + const _cache = { + moduleA: {}, + }; + wm.set(_cache.moduleA, 'hello'); + strictEqual(wm.has(_cache.moduleA), true); +} diff --git a/test/parallel/test-net-after-close.js b/test/parallel/test-net-after-close.js index 7d49780d001d6e..413e8f75992de9 100644 --- a/test/parallel/test-net-after-close.js +++ b/test/parallel/test-net-after-close.js @@ -32,6 +32,7 @@ const server = net.createServer(common.mustCall((s) => { server.listen(0, common.mustCall(() => { const c = net.createConnection(server.address().port); c.on('close', common.mustCall(() => { + /* eslint-disable no-unused-expressions */ console.error('connection closed'); assert.strictEqual(c._handle, null); // Calling functions / accessing properties of a closed socket should not @@ -45,5 +46,6 @@ server.listen(0, common.mustCall(() => { c.remoteAddress; c.remotePort; server.close(); + /* eslint-enable no-unused-expressions */ })); })); diff --git a/test/parallel/test-net-during-close.js b/test/parallel/test-net-during-close.js index 7bceb64041f2cc..3670ed9c273920 100644 --- a/test/parallel/test-net-during-close.js +++ b/test/parallel/test-net-during-close.js @@ -28,6 +28,7 @@ const server = net.createServer(function(socket) { }); server.listen(0, common.mustCall(function() { + /* eslint-disable no-unused-expressions */ const client = net.createConnection(this.address().port); server.close(); // Server connection event has not yet fired client is still attempting to @@ -37,4 +38,5 @@ server.listen(0, common.mustCall(function() { client.remotePort; // Exit now, do not wait for the client error event. process.exit(0); + /* eslint-enable no-unused-expressions */ })); diff --git a/test/parallel/test-net-writable.js b/test/parallel/test-net-writable.js new file mode 100644 index 00000000000000..dcbb64e272b830 --- /dev/null +++ b/test/parallel/test-net-writable.js @@ -0,0 +1,15 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server = net.createServer(common.mustCall(function(s) { + server.close(); + s.end(); +})).listen(0, 'localhost', common.mustCall(function() { + const socket = net.connect(this.address().port, 'localhost'); + socket.on('end', common.mustCall(() => { + assert.strictEqual(socket.writable, true); + socket.write('hello world'); + })); +})); diff --git a/test/parallel/test-nodeeventtarget.js b/test/parallel/test-nodeeventtarget.js index f4116f72a34d75..6643584a6fc1d0 100644 --- a/test/parallel/test-nodeeventtarget.js +++ b/test/parallel/test-nodeeventtarget.js @@ -2,15 +2,13 @@ 'use strict'; const common = require('../common'); -const { - Event, - NodeEventTarget, -} = require('internal/event_target'); +const { NodeEventTarget } = require('internal/event_target'); const { deepStrictEqual, ok, strictEqual, + throws, } = require('assert'); const { on } = require('events'); @@ -117,11 +115,11 @@ const { on } = require('events'); strictEqual(eventTarget.listenerCount('foo'), 2); strictEqual(eventTarget.listenerCount('bar'), 1); deepStrictEqual(eventTarget.eventNames(), ['foo', 'bar']); - eventTarget.removeAllListeners('foo'); + strictEqual(eventTarget.removeAllListeners('foo'), eventTarget); strictEqual(eventTarget.listenerCount('foo'), 0); strictEqual(eventTarget.listenerCount('bar'), 1); deepStrictEqual(eventTarget.eventNames(), ['bar']); - eventTarget.removeAllListeners(); + strictEqual(eventTarget.removeAllListeners(), eventTarget); strictEqual(eventTarget.listenerCount('foo'), 0); strictEqual(eventTarget.listenerCount('bar'), 0); deepStrictEqual(eventTarget.eventNames(), []); @@ -145,6 +143,27 @@ const { on } = require('events'); target.on('foo', () => {}); target.on('foo', () => {}); } +{ + // Test NodeEventTarget emit + const emitter = new NodeEventTarget(); + emitter.addEventListener('foo', common.mustCall((e) => { + strictEqual(e.type, 'foo'); + strictEqual(e.detail, 'bar'); + ok(e instanceof Event); + }), { once: true }); + emitter.once('foo', common.mustCall((e, droppedAdditionalArgument) => { + strictEqual(e, 'bar'); + strictEqual(droppedAdditionalArgument, undefined); + })); + emitter.emit('foo', 'bar', 'baz'); +} +{ + // Test NodeEventTarget emit unsupported usage + const emitter = new NodeEventTarget(); + throws(() => { + emitter.emit(); + }, /ERR_INVALID_ARG_TYPE/); +} (async () => { // test NodeEventTarget async-iterability diff --git a/test/parallel/test-path-posix-exists.js b/test/parallel/test-path-posix-exists.js new file mode 100644 index 00000000000000..dc12ed6daf027f --- /dev/null +++ b/test/parallel/test-path-posix-exists.js @@ -0,0 +1,6 @@ +'use strict'; + +require('../common'); +const assert = require('assert'); + +assert.strictEqual(require('path/posix'), require('path').posix); diff --git a/test/parallel/test-path-win32-exists.js b/test/parallel/test-path-win32-exists.js new file mode 100644 index 00000000000000..c9efa74dbd7d82 --- /dev/null +++ b/test/parallel/test-path-win32-exists.js @@ -0,0 +1,6 @@ +'use strict'; + +require('../common'); +const assert = require('assert'); + +assert.strictEqual(require('path/win32'), require('path').win32); diff --git a/test/parallel/test-performance-eventlooputil.js b/test/parallel/test-performance-eventlooputil.js index 1a5d86db750a94..9ce7212729d574 100644 --- a/test/parallel/test-performance-eventlooputil.js +++ b/test/parallel/test-performance-eventlooputil.js @@ -1,8 +1,9 @@ 'use strict'; -require('../common'); +const { mustCall } = require('../common'); -const TIMEOUT = 50; +const TIMEOUT = 10; +const SPIN_DUR = 50; const assert = require('assert'); const { performance } = require('perf_hooks'); @@ -21,29 +22,39 @@ if (nodeTiming.loopStart === -1) { { idle: 0, active: 0, utilization: 0 }); } -// Place in setTimeout() to make sure there is some idle time, but not going to -// assert this since it could make the test flaky. -setTimeout(() => { - const t = Date.now(); +const nodeTimingProps = ['name', 'entryType', 'startTime', 'duration', + 'nodeStart', 'v8Start', 'environment', 'loopStart', + 'loopExit', 'bootstrapComplete', 'idleTime']; +for (const p of nodeTimingProps) + assert.ok(typeof JSON.parse(JSON.stringify(nodeTiming))[p] === + typeof nodeTiming[p]); + +setTimeout(mustCall(function r() { const elu1 = eventLoopUtilization(); - while (Date.now() - t < 50) { } + // Force idle time to accumulate before allowing test to continue. + if (elu1.idle <= 0) + return setTimeout(mustCall(r), 5); - const elu2 = eventLoopUtilization(); - const elu3 = eventLoopUtilization(elu1); - const elu4 = eventLoopUtilization(elu2, elu1); + const t = Date.now(); + while (Date.now() - t < SPIN_DUR) { } + + const elu2 = eventLoopUtilization(elu1); + const elu3 = eventLoopUtilization(); + const elu4 = eventLoopUtilization(elu3, elu1); - assert.strictEqual(elu3.idle, 0); + assert.strictEqual(elu2.idle, 0); assert.strictEqual(elu4.idle, 0); - assert.strictEqual(elu3.utilization, 1); + assert.strictEqual(elu2.utilization, 1); assert.strictEqual(elu4.utilization, 1); - assert.strictEqual(elu2.active - elu1.active, elu4.active); - assert.ok(elu2.active > elu3.active); - assert.ok(elu2.active > elu4.active); - assert.ok(elu3.active > elu4.active); + assert.strictEqual(elu3.active - elu1.active, elu4.active); + assert.ok(elu2.active > SPIN_DUR - 10, `${elu2.active} <= ${SPIN_DUR - 10}`); + assert.ok(elu2.active < elu4.active, `${elu2.active} >= ${elu4.active}`); + assert.ok(elu3.active > elu2.active, `${elu3.active} <= ${elu2.active}`); + assert.ok(elu3.active > elu4.active, `${elu3.active} <= ${elu4.active}`); - setTimeout(runIdleTimeTest, TIMEOUT); -}, 5); + setTimeout(mustCall(runIdleTimeTest), TIMEOUT); +}), 5); function runIdleTimeTest() { const idleTime = nodeTiming.idleTime; @@ -55,7 +66,7 @@ function runIdleTimeTest() { assert.strictEqual(elu1.idle, idleTime); assert.strictEqual(elu1.utilization, elu1.active / sum); - setTimeout(runCalcTest, TIMEOUT, elu1); + setTimeout(mustCall(runCalcTest), TIMEOUT, elu1); } function runCalcTest(elu1) { @@ -65,18 +76,20 @@ function runCalcTest(elu1) { const active_delta = elu2.active - elu1.active; const idle_delta = elu2.idle - elu1.idle; - assert.ok(elu2.idle >= 0); - assert.ok(elu2.active >= 0); - assert.ok(elu3.idle >= 0); - assert.ok(elu3.active >= 0); - assert.ok(elu2.idle + elu2.active > elu1.idle + elu2.active); - assert.ok(elu2.idle + elu2.active >= now - nodeTiming.loopStart); + assert.ok(elu2.idle >= 0, `${elu2.idle} < 0`); + assert.ok(elu2.active >= 0, `${elu2.active} < 0`); + assert.ok(elu3.idle >= 0, `${elu3.idle} < 0`); + assert.ok(elu3.active >= 0, `${elu3.active} < 0`); + assert.ok(elu2.idle + elu2.active > elu1.idle + elu1.active, + `${elu2.idle + elu2.active} <= ${elu1.idle + elu1.active}`); + assert.ok(elu2.idle + elu2.active >= now - nodeTiming.loopStart, + `${elu2.idle + elu2.active} < ${now - nodeTiming.loopStart}`); assert.strictEqual(elu3.active, elu2.active - elu1.active); assert.strictEqual(elu3.idle, elu2.idle - elu1.idle); assert.strictEqual(elu3.utilization, active_delta / (idle_delta + active_delta)); - setImmediate(runWorkerTest); + setImmediate(mustCall(runWorkerTest)); } function runWorkerTest() { @@ -90,10 +103,11 @@ function runWorkerTest() { const elu1 = eventLoopUtilization(); const worker = new Worker(__filename, { argv: [ 'iamalive' ] }); - worker.on('message', (msg) => { + worker.on('message', mustCall((msg) => { const elu2 = eventLoopUtilization(elu1); const data = JSON.parse(msg); - assert.ok(elu2.active + elu2.idle > data.active + data.idle); - }); + assert.ok(elu2.active + elu2.idle > data.active + data.idle, + `${elu2.active + elu2.idle} <= ${data.active + data.idle}`); + })); } diff --git a/test/parallel/test-performanceobserver-asynccontext.js b/test/parallel/test-performanceobserver-asynccontext.js new file mode 100644 index 00000000000000..d3b5bec925d2c3 --- /dev/null +++ b/test/parallel/test-performanceobserver-asynccontext.js @@ -0,0 +1,37 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const { + performance, + PerformanceObserver, +} = require('perf_hooks'); +const { + executionAsyncId, + triggerAsyncId, + executionAsyncResource, +} = require('async_hooks'); + +// Test Non-Buffered PerformanceObserver retains async context +{ + const observer = + new PerformanceObserver(common.mustCall(callback)); + + const initialAsyncId = executionAsyncId(); + let asyncIdInTimeout; + let asyncResourceInTimeout; + + function callback(list) { + assert.strictEqual(triggerAsyncId(), initialAsyncId); + assert.strictEqual(executionAsyncId(), asyncIdInTimeout); + assert.strictEqual(executionAsyncResource(), asyncResourceInTimeout); + observer.disconnect(); + } + observer.observe({ entryTypes: ['mark'] }); + + setTimeout(() => { + asyncIdInTimeout = executionAsyncId(); + asyncResourceInTimeout = executionAsyncResource(); + performance.mark('test1'); + }, 0); +} diff --git a/test/parallel/test-policy-dependencies.js b/test/parallel/test-policy-dependencies.js index e7b2289714dff4..4486e0f8aa08c0 100644 --- a/test/parallel/test-policy-dependencies.js +++ b/test/parallel/test-policy-dependencies.js @@ -3,6 +3,7 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +common.requireNoPackageJSONAbove(); const fixtures = require('../common/fixtures'); diff --git a/test/parallel/test-policy-dependency-conditions.js b/test/parallel/test-policy-dependency-conditions.js index c9db95929daeec..dec17aa22984b0 100644 --- a/test/parallel/test-policy-dependency-conditions.js +++ b/test/parallel/test-policy-dependency-conditions.js @@ -4,6 +4,7 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +common.requireNoPackageJSONAbove(); const Manifest = require('internal/policy/manifest').Manifest; diff --git a/test/parallel/test-policy-integrity-flag.js b/test/parallel/test-policy-integrity-flag.js index d97ef86cbe9d0f..ddcd02236d27c0 100644 --- a/test/parallel/test-policy-integrity-flag.js +++ b/test/parallel/test-policy-integrity-flag.js @@ -3,6 +3,7 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +common.requireNoPackageJSONAbove(); const fixtures = require('../common/fixtures'); diff --git a/test/parallel/test-policy-parse-integrity.js b/test/parallel/test-policy-parse-integrity.js index 9241f1e7843b64..3a31d0d57f25db 100644 --- a/test/parallel/test-policy-parse-integrity.js +++ b/test/parallel/test-policy-parse-integrity.js @@ -2,6 +2,7 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +common.requireNoPackageJSONAbove(); const tmpdir = require('../common/tmpdir'); const assert = require('assert'); @@ -44,7 +45,8 @@ const packageFilepath = path.join(tmpdirPath, 'package.json'); const packageURL = pathToFileURL(packageFilepath); const packageBody = '{"main": "dep.js"}'; -function test({ shouldFail, integrity }) { +function test({ shouldFail, integrity, manifest = {} }) { + manifest.resources = {}; const resources = { [packageURL]: { body: packageBody, @@ -55,9 +57,6 @@ function test({ shouldFail, integrity }) { integrity } }; - const manifest = { - resources: {}, - }; for (const [url, { body, integrity }] of Object.entries(resources)) { manifest.resources[url] = { integrity, @@ -96,3 +95,17 @@ test({ depBody )}`, }); +test({ + shouldFail: true, + integrity: `sha256-${hash('sha256', 'file:///')}`, + manifest: { + onerror: 'exit' + } +}); +test({ + shouldFail: false, + integrity: `sha256-${hash('sha256', 'file:///')}`, + manifest: { + onerror: 'log' + } +}); diff --git a/test/parallel/test-policy-scopes-dependencies.js b/test/parallel/test-policy-scopes-dependencies.js index 202e6459a6543e..a5a9302ac69629 100644 --- a/test/parallel/test-policy-scopes-dependencies.js +++ b/test/parallel/test-policy-scopes-dependencies.js @@ -4,6 +4,7 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +common.requireNoPackageJSONAbove(); const Manifest = require('internal/policy/manifest').Manifest; const assert = require('assert'); diff --git a/test/parallel/test-policy-scopes-integrity.js b/test/parallel/test-policy-scopes-integrity.js index b506c92c41f625..8c91cea142b903 100644 --- a/test/parallel/test-policy-scopes-integrity.js +++ b/test/parallel/test-policy-scopes-integrity.js @@ -4,6 +4,7 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +common.requireNoPackageJSONAbove(); const Manifest = require('internal/policy/manifest').Manifest; const assert = require('assert'); @@ -280,3 +281,36 @@ const assert = require('assert'); } } // #endregion +// #startonerror +{ + const manifest = new Manifest({ + scopes: { + 'file:///': { + integrity: true + } + }, + onerror: 'throw' + }); + assert.throws( + () => { + manifest.assertIntegrity('http://example.com'); + }, + /ERR_MANIFEST_ASSERT_INTEGRITY/ + ); +} +{ + assert.throws( + () => { + new Manifest({ + scopes: { + 'file:///': { + integrity: true + } + }, + onerror: 'unknown' + }); + }, + /ERR_MANIFEST_UNKNOWN_ONERROR/ + ); +} +// #endonerror diff --git a/test/parallel/test-policy-scopes.js b/test/parallel/test-policy-scopes.js index b1ba160bdde3f1..129287c73c7659 100644 --- a/test/parallel/test-policy-scopes.js +++ b/test/parallel/test-policy-scopes.js @@ -3,6 +3,7 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +common.requireNoPackageJSONAbove(); const fixtures = require('../common/fixtures'); diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js index 29a2c682606541..df83d74e23bbb5 100644 --- a/test/parallel/test-preload.js +++ b/test/parallel/test-preload.js @@ -27,6 +27,19 @@ const fixtureE = fixtures.path('intrinsic-mutation.js'); const fixtureF = fixtures.path('print-intrinsic-mutation-name.js'); const fixtureG = fixtures.path('worker-from-argv.js'); const fixtureThrows = fixtures.path('throws_error4.js'); +const fixtureIsPreloading = fixtures.path('ispreloading.js'); + +// Assert that module.isPreloading is false here +assert(!module.isPreloading); + +// Test that module.isPreloading is set in preloaded module +// Test preloading a single module works +childProcess.exec( + `"${nodeBinary}" ${preloadOption([fixtureIsPreloading])} "${fixtureB}"`, + function(err, stdout, stderr) { + assert.ifError(err); + assert.strictEqual(stdout, 'B\n'); + }); // Test preloading a single module works childProcess.exec(`"${nodeBinary}" ${preloadOption([fixtureA])} "${fixtureB}"`, diff --git a/test/parallel/test-process-binding-internalbinding-allowlist.js b/test/parallel/test-process-binding-internalbinding-allowlist.js new file mode 100644 index 00000000000000..10667b843cde88 --- /dev/null +++ b/test/parallel/test-process-binding-internalbinding-allowlist.js @@ -0,0 +1,41 @@ +// Flags: --no-warnings +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +// Assert that allowed internalBinding modules are accessible via +// process.binding(). +assert(process.binding('async_wrap')); +assert(process.binding('buffer')); +assert(process.binding('cares_wrap')); +assert(process.binding('constants')); +assert(process.binding('contextify')); +if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check + assert(process.binding('crypto')); +} +assert(process.binding('fs')); +assert(process.binding('fs_event_wrap')); +assert(process.binding('http_parser')); +if (common.hasIntl) { + assert(process.binding('icu')); +} +assert(process.binding('inspector')); +assert(process.binding('js_stream')); +assert(process.binding('natives')); +assert(process.binding('os')); +assert(process.binding('pipe_wrap')); +assert(process.binding('signal_wrap')); +assert(process.binding('spawn_sync')); +assert(process.binding('stream_wrap')); +assert(process.binding('tcp_wrap')); +if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check + assert(process.binding('tls_wrap')); +} +assert(process.binding('tty_wrap')); +assert(process.binding('udp_wrap')); +assert(process.binding('url')); +assert(process.binding('util')); +assert(process.binding('uv')); +assert(process.binding('v8')); +assert(process.binding('zlib')); diff --git a/test/parallel/test-process-binding-internalbinding-whitelist.js b/test/parallel/test-process-binding-internalbinding-whitelist.js deleted file mode 100644 index 9768ef66741aa3..00000000000000 --- a/test/parallel/test-process-binding-internalbinding-whitelist.js +++ /dev/null @@ -1,41 +0,0 @@ -// Flags: --no-warnings -'use strict'; - -const common = require('../common'); -const assert = require('assert'); - -// Assert that whitelisted internalBinding modules are accessible via -// process.binding(). -assert(process.binding('async_wrap')); -assert(process.binding('buffer')); -assert(process.binding('cares_wrap')); -assert(process.binding('constants')); -assert(process.binding('contextify')); -if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check - assert(process.binding('crypto')); -} -assert(process.binding('fs')); -assert(process.binding('fs_event_wrap')); -assert(process.binding('http_parser')); -if (common.hasIntl) { - assert(process.binding('icu')); -} -assert(process.binding('inspector')); -assert(process.binding('js_stream')); -assert(process.binding('natives')); -assert(process.binding('os')); -assert(process.binding('pipe_wrap')); -assert(process.binding('signal_wrap')); -assert(process.binding('spawn_sync')); -assert(process.binding('stream_wrap')); -assert(process.binding('tcp_wrap')); -if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check - assert(process.binding('tls_wrap')); -} -assert(process.binding('tty_wrap')); -assert(process.binding('udp_wrap')); -assert(process.binding('url')); -assert(process.binding('util')); -assert(process.binding('uv')); -assert(process.binding('v8')); -assert(process.binding('zlib')); diff --git a/test/parallel/test-process-env-windows-error-reset.js b/test/parallel/test-process-env-windows-error-reset.js index 59e5f287d82346..881da06d2926d3 100644 --- a/test/parallel/test-process-env-windows-error-reset.js +++ b/test/parallel/test-process-env-windows-error-reset.js @@ -7,7 +7,7 @@ const assert = require('assert'); { process.env.FOO = ''; - process.env.NONEXISTENT_ENV_VAR; + process.env.NONEXISTENT_ENV_VAR; // eslint-disable-line no-unused-expressions const foo = process.env.FOO; assert.strictEqual(foo, ''); @@ -15,7 +15,7 @@ const assert = require('assert'); { process.env.FOO = ''; - process.env.NONEXISTENT_ENV_VAR; + process.env.NONEXISTENT_ENV_VAR; // eslint-disable-line no-unused-expressions const hasFoo = 'FOO' in process.env; assert.strictEqual(hasFoo, true); diff --git a/test/parallel/test-process-release.js b/test/parallel/test-process-release.js index 13263894919407..ebb259f774a62c 100644 --- a/test/parallel/test-process-release.js +++ b/test/parallel/test-process-release.js @@ -19,6 +19,8 @@ if (versionParts[0] === '4' && versionParts[1] >= 2) { assert.strictEqual(process.release.lts, 'Dubnium'); } else if (versionParts[0] === '12' && versionParts[1] >= 13) { assert.strictEqual(process.release.lts, 'Erbium'); +} else if (versionParts[0] === '14' && versionParts[1] >= 15) { + assert.strictEqual(process.release.lts, 'Fermium'); } else { assert.strictEqual(process.release.lts, undefined); } diff --git a/test/parallel/test-promises-unhandled-rejections.js b/test/parallel/test-promises-unhandled-rejections.js index bfde806b0572ec..fc2ad945bae36b 100644 --- a/test/parallel/test-promises-unhandled-rejections.js +++ b/test/parallel/test-promises-unhandled-rejections.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); -const domain = require('domain'); const { inspect } = require('util'); common.disableCrashOnUnhandledRejection(); @@ -622,30 +621,6 @@ asyncTest('setImmediate + promise microtasks is too late to attach a catch' + }); }); -asyncTest( - 'Promise unhandledRejection handler does not interfere with domain' + - ' error handlers being given exceptions thrown from nextTick.', - function(done) { - const d = domain.create(); - let domainReceivedError; - d.on('error', function(e) { - domainReceivedError = e; - }); - d.run(function() { - const e = new Error('error'); - const domainError = new Error('domain error'); - onUnhandledSucceed(done, function(reason, promise) { - assert.strictEqual(reason, e); - assert.strictEqual(domainReceivedError, domainError); - }); - Promise.reject(e); - process.nextTick(function() { - throw domainError; - }); - }); - } -); - asyncTest('nextTick is immediately scheduled when called inside an event' + ' handler', function(done) { clean(); diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js index 58554f0d85c438..7a001f6a029c42 100644 --- a/test/parallel/test-querystring.js +++ b/test/parallel/test-querystring.js @@ -273,6 +273,24 @@ qsWeirdObjects.forEach((testCase) => { assert.strictEqual(qs.stringify(testCase[0]), testCase[1]); }); +// BigInt values + +assert.strictEqual(qs.stringify({ foo: 2n ** 1023n }), + 'foo=' + 2n ** 1023n); +assert.strictEqual(qs.stringify([0n, 1n, 2n]), + '0=0&1=1&2=2'); + +assert.strictEqual(qs.stringify({ foo: 2n ** 1023n }, + null, + null, + { encodeURIComponent: (c) => c }), + 'foo=' + 2n ** 1023n); +assert.strictEqual(qs.stringify([0n, 1n, 2n], + null, + null, + { encodeURIComponent: (c) => c }), + '0=0&1=1&2=2'); + // Invalid surrogate pair throws URIError assert.throws( () => qs.stringify({ foo: '\udc00' }), diff --git a/test/parallel/test-readable-from.js b/test/parallel/test-readable-from.js index 94bc2c1ae4b926..a4e0f1b566c32c 100644 --- a/test/parallel/test-readable-from.js +++ b/test/parallel/test-readable-from.js @@ -3,7 +3,13 @@ const { mustCall } = require('../common'); const { once } = require('events'); const { Readable } = require('stream'); -const { strictEqual } = require('assert'); +const { strictEqual, throws } = require('assert'); + +{ + throws(() => { + Readable.from(null); + }, /ERR_INVALID_ARG_TYPE/); +} async function toReadableBasicSupport() { async function* generate() { diff --git a/test/parallel/test-readline-csi.js b/test/parallel/test-readline-csi.js index 5c0080d3d41910..13dbbfa30f6fa2 100644 --- a/test/parallel/test-readline-csi.js +++ b/test/parallel/test-readline-csi.js @@ -161,3 +161,16 @@ assert.strictEqual(writable.data, '\x1b[2G'); assert.throws(() => { readline.cursorTo(writable, 1, 1, null); }, /ERR_INVALID_CALLBACK/); + +// Verify that cursorTo() throws if x or y is NaN. +assert.throws(() => { + readline.cursorTo(writable, NaN); +}, /ERR_INVALID_ARG_VALUE/); + +assert.throws(() => { + readline.cursorTo(writable, 1, NaN); +}, /ERR_INVALID_ARG_VALUE/); + +assert.throws(() => { + readline.cursorTo(writable, NaN, NaN); +}, /ERR_INVALID_ARG_VALUE/); diff --git a/test/parallel/test-readline-input-onerror.js b/test/parallel/test-readline-input-onerror.js new file mode 100644 index 00000000000000..eebfbafdfde58f --- /dev/null +++ b/test/parallel/test-readline-input-onerror.js @@ -0,0 +1,40 @@ +'use strict'; +const common = require('../common'); +const fs = require('fs'); +const readline = require('readline'); +const path = require('path'); + +async function processLineByLine_SymbolAsyncError(filename) { + const fileStream = fs.createReadStream(filename); + const rl = readline.createInterface({ + input: fileStream, + crlfDelay: Infinity + }); + // eslint-disable-next-line no-unused-vars + for await (const line of rl) { + /* check SymbolAsyncIterator `errorListener` */ + } +} + +const f = path.join(__dirname, 'file.txt'); + +// catch-able SymbolAsyncIterator `errorListener` error +processLineByLine_SymbolAsyncError(f).catch(common.expectsError({ + code: 'ENOENT', + message: `ENOENT: no such file or directory, open '${f}'` +})); + +async function processLineByLine_InterfaceErrorEvent(filename) { + const fileStream = fs.createReadStream(filename); + const rl = readline.createInterface({ + input: fileStream, + crlfDelay: Infinity + }); + rl.on('error', common.expectsError({ + code: 'ENOENT', + message: `ENOENT: no such file or directory, open '${f}'` + })); +} + +// check Interface 'error' event +processLineByLine_InterfaceErrorEvent(f); diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js index 1693eda515d3e7..8e32edcc49768a 100644 --- a/test/parallel/test-readline-interface.js +++ b/test/parallel/test-readline-interface.js @@ -63,6 +63,12 @@ function assertCursorRowsAndCols(rli, rows, cols) { assert.strictEqual(cursorPos.cols, cols); } +{ + const input = new FakeInput(); + const rl = readline.Interface({ input }); + assert(rl instanceof readline.Interface); +} + [ undefined, 50, @@ -657,6 +663,13 @@ function assertCursorRowsAndCols(rli, rows, cols) { rli.close(); } +// Close readline interface +{ + const [rli, fi] = getInterface({ terminal: true, prompt: '' }); + fi.emit('keypress', '.', { ctrl: true, name: 'c' }); + assert(rli.closed); +} + // Multi-line input cursor position { const [rli, fi] = getInterface({ terminal: true, prompt: '' }); @@ -898,6 +911,16 @@ for (let i = 0; i < 12; i++) { }); } + // Calling the getPrompt method + { + const expectedPrompts = ['$ ', '> ']; + const [rli] = getInterface({ terminal }); + for (const prompt of expectedPrompts) { + rli.setPrompt(prompt); + assert.strictEqual(rli.getPrompt(), prompt); + } + } + { const expected = terminal ? ['\u001b[1G', '\u001b[0J', '$ ', '\u001b[3G'] : @@ -920,7 +943,7 @@ for (let i = 0; i < 12; i++) { rl.prompt(); - assert.strictEqual(rl._prompt, '$ '); + assert.strictEqual(rl.getPrompt(), '$ '); } { diff --git a/test/parallel/test-repl-import-referrer.js b/test/parallel/test-repl-import-referrer.js index 33bc442e6f69c8..d77d70a031a14a 100644 --- a/test/parallel/test-repl-import-referrer.js +++ b/test/parallel/test-repl-import-referrer.js @@ -16,7 +16,10 @@ child.stdout.on('data', (data) => { child.on('exit', common.mustCall(() => { const results = output.replace(/^> /mg, '').split('\n').slice(2); - assert.deepStrictEqual(results, ['[Module] { message: \'A message\' }', '']); + assert.deepStrictEqual( + results, + ['[Module: null prototype] { message: \'A message\' }', ''] + ); })); child.stdin.write('await import(\'./message.mjs\');\n'); diff --git a/test/parallel/test-repl-options.js b/test/parallel/test-repl-options.js index 546dd584ea34fe..953255319cf9eb 100644 --- a/test/parallel/test-repl-options.js +++ b/test/parallel/test-repl-options.js @@ -29,7 +29,7 @@ const repl = require('repl'); const cp = require('child_process'); assert.strictEqual(repl.repl, undefined); -repl._builtinLibs; +repl._builtinLibs; // eslint-disable-line no-unused-expressions common.expectWarning({ DeprecationWarning: { @@ -104,7 +104,7 @@ assert.throws(r3, { // 4, Verify that defaults are used when no arguments are provided const r4 = repl.start(); -assert.strictEqual(r4._prompt, '> '); +assert.strictEqual(r4.getPrompt(), '> '); assert.strictEqual(r4.input, process.stdin); assert.strictEqual(r4.output, process.stdout); assert.strictEqual(r4.terminal, !!r4.output.isTTY); diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index 6f5cbe2becd5f7..bfcf810ddd6125 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/test/parallel/test-repl-tab-complete.js @@ -51,7 +51,12 @@ function getNoResultsFunction() { const works = [['inner.one'], 'inner.o']; const putIn = new ArrayStream(); -const testMe = repl.start('', putIn); +const testMe = repl.start({ + prompt: '', + input: putIn, + output: process.stdout, + allowBlockingCompletions: true +}); // Some errors are passed to the domain, but do not callback testMe._domain.on('error', assert.ifError); @@ -532,7 +537,7 @@ testMe.complete('obj.', common.mustCall((error, data) => { // check Buffer.prototype.length not crashing. // Refs: https://github.com/nodejs/node/pull/11961 -putIn.run['.clear']; +putIn.run(['.clear']); testMe.complete('Buffer.prototype.', common.mustCall()); const testNonGlobal = repl.start({ diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 663b13ca0fe985..e900f3ce15579a 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -926,7 +926,7 @@ function event(ee, expected) { const data = inspect(expected, { compact: false }); const msg = `The REPL did not reply as expected for:\n\n${data}`; reject(new Error(msg)); - }, common.platformTimeout(1000)); + }, common.platformTimeout(9999)); ee.once('data', common.mustCall((...args) => { clearTimeout(timeout); resolve(...args); diff --git a/test/parallel/test-socket-write-after-fin-error.js b/test/parallel/test-socket-write-after-fin-error.js index 4626729c0598a0..64c8143abebbd9 100644 --- a/test/parallel/test-socket-write-after-fin-error.js +++ b/test/parallel/test-socket-write-after-fin-error.js @@ -26,8 +26,10 @@ const server = net.createServer(function(sock) { }); sock.on('end', function() { gotServerEnd = true; - sock.write(serverData); - sock.end(); + setImmediate(() => { + sock.write(serverData); + sock.end(); + }); }); server.close(); }); diff --git a/test/parallel/test-source-map-api.js b/test/parallel/test-source-map-api.js index 60bbb661e1c801..b8ff59e365e2e9 100644 --- a/test/parallel/test-source-map-api.js +++ b/test/parallel/test-source-map-api.js @@ -1,11 +1,26 @@ // Flags: --enable-source-maps 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const { findSourceMap, SourceMap } = require('module'); const { readFileSync } = require('fs'); +// It should throw with invalid args. +{ + [1, true, 'foo'].forEach((invalidArg) => + assert.throws( + () => new SourceMap(invalidArg), + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "payload" argument must be of type object.' + + common.invalidArgTypeHelper(invalidArg) + } + ) + ); +} + // findSourceMap() can lookup source-maps based on URIs, in the // non-exceptional case. { @@ -31,7 +46,7 @@ const { readFileSync } = require('fs'); Error.prepareStackTrace = (error, trace) => { const throwingRequireCallSite = trace[0]; if (throwingRequireCallSite.getFileName().endsWith('typescript-throw.js')) { - sourceMap = findSourceMap(throwingRequireCallSite.getFileName(), error); + sourceMap = findSourceMap(throwingRequireCallSite.getFileName()); callSite = throwingRequireCallSite; } }; @@ -39,6 +54,7 @@ const { readFileSync } = require('fs'); // Require a file that throws an exception, and has a source map. require('../fixtures/source-map/typescript-throw.js'); } catch (err) { + // eslint-disable-next-line no-unused-expressions err.stack; // Force prepareStackTrace() to be called. } assert(callSite); diff --git a/test/parallel/test-source-map-enable.js b/test/parallel/test-source-map-enable.js index 71130441438dcc..6435aa99d2c752 100644 --- a/test/parallel/test-source-map-enable.js +++ b/test/parallel/test-source-map-enable.js @@ -8,6 +8,7 @@ const { dirname } = require('path'); const fs = require('fs'); const path = require('path'); const { spawnSync } = require('child_process'); +const { pathToFileURL } = require('url'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); @@ -88,8 +89,8 @@ function nextdir() { // Source-map should have been loaded from disk and sources should have been // rewritten, such that they're absolute paths. assert.strictEqual( - dirname( - `file://${require.resolve('../fixtures/source-map/disk-relative-path')}`), + dirname(pathToFileURL( + require.resolve('../fixtures/source-map/disk-relative-path')).href), dirname(sourceMap.data.sources[0]) ); } @@ -109,8 +110,8 @@ function nextdir() { // base64 JSON should have been decoded, and paths to sources should have // been rewritten such that they're absolute: assert.strictEqual( - dirname( - `file://${require.resolve('../fixtures/source-map/inline-base64')}`), + dirname(pathToFileURL( + require.resolve('../fixtures/source-map/inline-base64')).href), dirname(sourceMap.data.sources[0]) ); } @@ -169,12 +170,15 @@ function nextdir() { '--enable-source-maps', require.resolve('../fixtures/source-map/uglify-throw.js') ]); - assert.ok( - output.stderr.toString().match(/->.*uglify-throw-original\.js:5:9/) + assert.match( + output.stderr.toString(), + /->.*uglify-throw-original\.js:5:9/ ); - assert.ok( - output.stderr.toString().match(/->.*uglify-throw-original\.js:9:3/) + assert.match( + output.stderr.toString(), + /->.*uglify-throw-original\.js:9:3/ ); + assert.match(output.stderr.toString(), /at Hello/); } // Applies source-maps generated by tsc to stack trace. @@ -265,6 +269,44 @@ function nextdir() { ); } +// Does not attempt to apply path resolution logic to absolute URLs +// with schemes. +// Refs: https://github.com/webpack/webpack/issues/9601 +// Refs: https://sourcemaps.info/spec.html#h.75yo6yoyk7x5 +{ + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/webpack.js') + ]); + // Error in original context of source content: + assert.match( + output.stderr.toString(), + /throw new Error\('oh no!'\)\r?\n.*\^/ + ); + // Rewritten stack trace: + assert.match(output.stderr.toString(), /webpack:\/\/\/webpack\.js:14:9/); + assert.match(output.stderr.toString(), /at functionD.*14:9/); + assert.match(output.stderr.toString(), /at functionC.*10:3/); +} + +// Stores and applies source map associated with file that throws while +// being required. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/throw-on-require-entry.js') + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + const sourceMap = getSourceMapFromCache( + 'throw-on-require.js', + coverageDirectory + ); + // Rewritten stack trace. + assert.match(output.stderr.toString(), /throw-on-require\.ts:9:9/); + // Source map should have been serialized. + assert.ok(sourceMap); +} + function getSourceMapFromCache(fixtureFile, coverageDirectory) { const jsonFiles = fs.readdirSync(coverageDirectory); for (const jsonFile of jsonFiles) { diff --git a/test/parallel/test-stdin-hang.js b/test/parallel/test-stdin-hang.js index 23c686320d3299..887f31fdb75adf 100644 --- a/test/parallel/test-stdin-hang.js +++ b/test/parallel/test-stdin-hang.js @@ -27,6 +27,6 @@ require('../common'); // If it does, then the test-runner will nuke it. // invoke the getter. -process.stdin; +process.stdin; // eslint-disable-line no-unused-expressions console.error('Should exit normally now.'); diff --git a/test/parallel/test-stdio-closed.js b/test/parallel/test-stdio-closed.js index c21bbc2eac12b7..cc9f1e86ccbf6c 100644 --- a/test/parallel/test-stdio-closed.js +++ b/test/parallel/test-stdio-closed.js @@ -7,10 +7,12 @@ const fixtures = require('../common/fixtures'); if (common.isWindows) { if (process.argv[2] === 'child') { + /* eslint-disable no-unused-expressions */ process.stdin; process.stdout; process.stderr; return; + /* eslint-enable no-unused-expressions */ } const python = process.env.PYTHON || 'python'; const script = fixtures.path('spawn_closed_stdio.py'); diff --git a/test/parallel/test-stdio-pipe-access.js b/test/parallel/test-stdio-pipe-access.js index e8f8131d1f19e8..6093e60b8b10a5 100644 --- a/test/parallel/test-stdio-pipe-access.js +++ b/test/parallel/test-stdio-pipe-access.js @@ -32,6 +32,6 @@ switch (who) { process.stderr ] }); break; case 'bottom': - process.stdin; + process.stdin; // eslint-disable-line no-unused-expressions break; } diff --git a/test/parallel/test-stream-add-abort-signal.js b/test/parallel/test-stream-add-abort-signal.js new file mode 100644 index 00000000000000..3077137176ff96 --- /dev/null +++ b/test/parallel/test-stream-add-abort-signal.js @@ -0,0 +1,27 @@ +// Flags: --expose-internals +'use strict'; + +require('../common'); +const assert = require('assert'); +const { addAbortSignal, Readable } = require('stream'); +const { + addAbortSignalNoValidate, +} = require('internal/streams/add-abort-signal'); + +{ + assert.throws(() => { + addAbortSignal('INVALID_SIGNAL'); + }, /ERR_INVALID_ARG_TYPE/); + + const ac = new AbortController(); + assert.throws(() => { + addAbortSignal(ac.signal, 'INVALID_STREAM'); + }, /ERR_INVALID_ARG_TYPE/); +} + +{ + const r = new Readable({ + read: () => {}, + }); + assert.deepStrictEqual(r, addAbortSignalNoValidate('INVALID_SIGNAL', r)); +} diff --git a/test/parallel/test-stream-duplex-destroy.js b/test/parallel/test-stream-duplex-destroy.js index c7d294e144bb5e..1894bb7ad67617 100644 --- a/test/parallel/test-stream-duplex-destroy.js +++ b/test/parallel/test-stream-duplex-destroy.js @@ -238,3 +238,20 @@ const assert = require('assert'); }); duplex.on('close', common.mustCall()); } +{ + // Check abort signal + const controller = new AbortController(); + const { signal } = controller; + const duplex = new Duplex({ + write(chunk, enc, cb) { cb(); }, + read() {}, + signal, + }); + let count = 0; + duplex.on('error', common.mustCall((e) => { + assert.strictEqual(count++, 0); // Ensure not called twice + assert.strictEqual(e.name, 'AbortError'); + })); + duplex.on('close', common.mustCall()); + controller.abort(); +} diff --git a/test/parallel/test-stream-duplex-readable-end.js b/test/parallel/test-stream-duplex-readable-end.js new file mode 100644 index 00000000000000..0e3e62aacb14bc --- /dev/null +++ b/test/parallel/test-stream-duplex-readable-end.js @@ -0,0 +1,29 @@ +'use strict'; +// https://github.com/nodejs/node/issues/35926 +const common = require('../common'); +const assert = require('assert'); +const stream = require('stream'); + +let loops = 5; + +const src = new stream.Readable({ + read() { + if (loops--) + this.push(Buffer.alloc(20000)); + } +}); + +const dst = new stream.Transform({ + transform(chunk, output, fn) { + this.push(null); + fn(); + } +}); + +src.pipe(dst); + +dst.on('data', () => { }); +dst.on('end', common.mustCall(() => { + assert.strictEqual(loops, 3); + assert.ok(src.isPaused()); +})); diff --git a/test/parallel/test-stream-pipe-needDrain.js b/test/parallel/test-stream-pipe-needDrain.js new file mode 100644 index 00000000000000..0836c81da22438 --- /dev/null +++ b/test/parallel/test-stream-pipe-needDrain.js @@ -0,0 +1,32 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const Readable = require('_stream_readable'); +const Writable = require('_stream_writable'); + +// Pipe should pause temporarily if writable needs drain. +{ + const w = new Writable({ + write(buf, encoding, callback) { + process.nextTick(callback); + }, + highWaterMark: 1 + }); + + while (w.write('asd')); + + assert.strictEqual(w.writableNeedDrain, true); + + const r = new Readable({ + read() { + this.push('asd'); + this.push(null); + } + }); + + r.on('pause', common.mustCall(2)); + r.on('end', common.mustCall()); + + r.pipe(w); +} diff --git a/test/parallel/test-stream-pipeline-uncaught.js b/test/parallel/test-stream-pipeline-uncaught.js index 35b67c4ff0afb8..bfac4f1fee8d0b 100644 --- a/test/parallel/test-stream-pipeline-uncaught.js +++ b/test/parallel/test-stream-pipeline-uncaught.js @@ -16,9 +16,7 @@ process.on('uncaughtException', common.mustCall((err) => { const s = new PassThrough(); s.end('data'); pipeline(s, async function(source) { - for await (const chunk of source) { - chunk; - } + for await (const chunk of source) {} // eslint-disable-line no-unused-vars }, common.mustSucceed(() => { throw new Error('error'); })); diff --git a/test/parallel/test-stream-pipeline.js b/test/parallel/test-stream-pipeline.js index b7d3720d0d05dd..78057f9eeffec6 100644 --- a/test/parallel/test-stream-pipeline.js +++ b/test/parallel/test-stream-pipeline.js @@ -8,7 +8,8 @@ const { Transform, pipeline, PassThrough, - Duplex + Duplex, + addAbortSignal, } = require('stream'); const assert = require('assert'); const http = require('http'); @@ -627,9 +628,7 @@ const net = require('net'); await Promise.resolve(); yield 'hello'; }, async function*(source) { - for await (const chunk of source) { - chunk; - } + for await (const chunk of source) {} }, common.mustCall((err) => { assert.strictEqual(err, undefined); })); @@ -645,9 +644,7 @@ const net = require('net'); await Promise.resolve(); throw new Error('kaboom'); }, async function*(source) { - for await (const chunk of source) { - chunk; - } + for await (const chunk of source) {} }, common.mustCall((err) => { assert.strictEqual(err.message, 'kaboom'); })); @@ -703,7 +700,6 @@ const net = require('net'); yield 'world'; }, s, async function(source) { for await (const chunk of source) { - chunk; throw new Error('kaboom'); } }, common.mustCall((err, val) => { @@ -718,7 +714,6 @@ const net = require('net'); return ['hello', 'world']; }, s, async function*(source) { for await (const chunk of source) { - chunk; throw new Error('kaboom'); } }, common.mustCall((err) => { @@ -1240,3 +1235,69 @@ const net = require('net'); }), ); } +{ + function createThenable() { + let counter = 0; + return { + get then() { + if (counter++) { + throw new Error('Cannot access `then` more than once'); + } + return Function.prototype; + }, + }; + } + + pipeline( + function* () { + yield 0; + }, + createThenable, + () => common.mustNotCall(), + ); +} + + +{ + const ac = new AbortController(); + const r = Readable.from(async function* () { + for (let i = 0; i < 10; i++) { + await Promise.resolve(); + yield String(i); + if (i === 5) { + ac.abort(); + } + } + }()); + let res = ''; + const w = new Writable({ + write(chunk, encoding, callback) { + res += chunk; + callback(); + } + }); + const cb = common.mustCall((err) => { + assert.strictEqual(err.name, 'AbortError'); + assert.strictEqual(res, '012345'); + assert.strictEqual(w.destroyed, true); + assert.strictEqual(r.destroyed, true); + assert.strictEqual(pipelined.destroyed, true); + }); + const pipelined = addAbortSignal(ac.signal, pipeline([r, w], cb)); +} + +{ + pipeline([1, 2, 3], PassThrough({ objectMode: true }), + common.mustSucceed(() => {})); + + let res = ''; + const w = new Writable({ + write(chunk, encoding, callback) { + res += chunk; + callback(); + }, + }); + pipeline(['1', '2', '3'], w, common.mustSucceed(() => { + assert.strictEqual(res, '123'); + })); +} diff --git a/test/parallel/test-stream-readable-async-iterators.js b/test/parallel/test-stream-readable-async-iterators.js index 788ed8a8e2e0e0..7c457fdc3da24b 100644 --- a/test/parallel/test-stream-readable-async-iterators.js +++ b/test/parallel/test-stream-readable-async-iterators.js @@ -62,8 +62,7 @@ async function tests() { }); await (async () => { - for await (const d of readable) { - d; + for await (const d of readable) { // eslint-disable-line no-unused-vars return; } })(); @@ -595,9 +594,7 @@ async function tests() { } }); - for await (const chunk of r) { - chunk; - } + for await (const chunk of r) {} // eslint-disable-line no-unused-vars assert.strictEqual(r.destroyed, false); } @@ -612,8 +609,7 @@ async function tests() { } }); - for await (const chunk of r) { - chunk; + for await (const chunk of r) { // eslint-disable-line no-unused-vars break; } assert.strictEqual(r.destroyed, true); @@ -631,9 +627,7 @@ async function tests() { assert.strictEqual(r.destroyed, false); }); - for await (const chunk of r) { - chunk; - } + for await (const chunk of r) {} // eslint-disable-line no-unused-vars assert.strictEqual(r.destroyed, true); } @@ -717,9 +711,8 @@ async function tests() { let _err; try { - for await (const chunk of res) { - chunk; - } + // eslint-disable-next-line no-unused-vars + for await (const chunk of res) {} } catch (err) { _err = err; } diff --git a/test/parallel/test-stream-readable-destroy.js b/test/parallel/test-stream-readable-destroy.js index 8ab78ec8ccec35..9ba3f9cd3653d6 100644 --- a/test/parallel/test-stream-readable-destroy.js +++ b/test/parallel/test-stream-readable-destroy.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); -const { Readable } = require('stream'); +const { Readable, addAbortSignal } = require('stream'); const assert = require('assert'); { @@ -268,3 +268,54 @@ const assert = require('assert'); })); read.resume(); } + +{ + const controller = new AbortController(); + const read = addAbortSignal(controller.signal, new Readable({ + read() { + this.push('asd'); + }, + })); + + read.on('error', common.mustCall((e) => { + assert.strictEqual(e.name, 'AbortError'); + })); + controller.abort(); + read.on('data', common.mustNotCall()); +} + +{ + const controller = new AbortController(); + const read = new Readable({ + signal: controller.signal, + read() { + this.push('asd'); + }, + }); + + read.on('error', common.mustCall((e) => { + assert.strictEqual(e.name, 'AbortError'); + })); + controller.abort(); + read.on('data', common.mustNotCall()); +} + +{ + const controller = new AbortController(); + const read = addAbortSignal(controller.signal, new Readable({ + objectMode: true, + read() { + return false; + } + })); + read.push('asd'); + + read.on('error', common.mustCall((e) => { + assert.strictEqual(e.name, 'AbortError'); + })); + assert.rejects((async () => { + /* eslint-disable-next-line no-unused-vars */ + for await (const chunk of read) {} + })(), /AbortError/); + setTimeout(() => controller.abort(), 0); +} diff --git a/test/parallel/test-stream-writable-destroy.js b/test/parallel/test-stream-writable-destroy.js index dca01724f73b3b..9859c59e446c95 100644 --- a/test/parallel/test-stream-writable-destroy.js +++ b/test/parallel/test-stream-writable-destroy.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); -const { Writable } = require('stream'); +const { Writable, addAbortSignal } = require('stream'); const assert = require('assert'); { @@ -417,3 +417,47 @@ const assert = require('assert'); })); write.write('asd'); } + +{ + const ac = new AbortController(); + const write = addAbortSignal(ac.signal, new Writable({ + write(chunk, enc, cb) { cb(); } + })); + + write.on('error', common.mustCall((e) => { + assert.strictEqual(e.name, 'AbortError'); + assert.strictEqual(write.destroyed, true); + })); + write.write('asd'); + ac.abort(); +} + +{ + const ac = new AbortController(); + const write = new Writable({ + signal: ac.signal, + write(chunk, enc, cb) { cb(); } + }); + + write.on('error', common.mustCall((e) => { + assert.strictEqual(e.name, 'AbortError'); + assert.strictEqual(write.destroyed, true); + })); + write.write('asd'); + ac.abort(); +} + +{ + const ac = new AbortController(); + ac.abort(); + + const write = new Writable({ + signal: ac.signal, + write(chunk, enc, cb) { cb(); } + }); + + write.on('error', common.mustCall((e) => { + assert.strictEqual(e.name, 'AbortError'); + assert.strictEqual(write.destroyed, true); + })); +} diff --git a/test/parallel/test-timers-promisified.js b/test/parallel/test-timers-promisified.js index 6cd932a2d169ff..be73984b4fa602 100644 --- a/test/parallel/test-timers-promisified.js +++ b/test/parallel/test-timers-promisified.js @@ -1,4 +1,4 @@ -// Flags: --no-warnings +// Flags: --no-warnings --expose-internals 'use strict'; const common = require('../common'); const assert = require('assert'); @@ -6,6 +6,9 @@ const timers = require('timers'); const { promisify } = require('util'); const child_process = require('child_process'); +// TODO(benjamingr) - refactor to use getEventListeners when #35991 lands +const { NodeEventTarget } = require('internal/event_target'); + const timerPromises = require('timers/promises'); /* eslint-disable no-restricted-syntax */ @@ -92,6 +95,24 @@ process.on('multipleResolves', common.mustNotCall()); }); } +{ + // Check that timer adding signals does not leak handlers + const signal = new NodeEventTarget(); + signal.aborted = false; + setTimeout(0, null, { signal }).finally(common.mustCall(() => { + assert.strictEqual(signal.listenerCount('abort'), 0); + })); +} + +{ + // Check that timer adding signals does not leak handlers + const signal = new NodeEventTarget(); + signal.aborted = false; + setImmediate(0, { signal }).finally(common.mustCall(() => { + assert.strictEqual(signal.listenerCount('abort'), 0); + })); +} + { Promise.all( [1, '', false, Infinity].map((i) => assert.rejects(setImmediate(10, i)), { @@ -104,6 +125,12 @@ process.on('multipleResolves', common.mustNotCall()); code: 'ERR_INVALID_ARG_TYPE' })).then(common.mustCall()); + Promise.all( + [1, '', Infinity, null, {}].map( + (ref) => assert.rejects(setImmediate(10, { ref })), { + code: 'ERR_INVALID_ARG_TYPE' + })).then(common.mustCall()); + Promise.all( [1, '', false, Infinity].map( (i) => assert.rejects(setTimeout(10, null, i)), { diff --git a/test/parallel/test-tls-basic-validations.js b/test/parallel/test-tls-basic-validations.js index 5dbbeb60f323f8..67058daf158cd0 100644 --- a/test/parallel/test-tls-basic-validations.js +++ b/test/parallel/test-tls-basic-validations.js @@ -30,7 +30,7 @@ assert.throws( { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', - message: 'Pass phrase must be a string' + message: /The "options\.passphrase" property must be of type string/ }); assert.throws( @@ -38,7 +38,7 @@ assert.throws( { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', - message: 'Pass phrase must be a string' + message: /The "options\.passphrase" property must be of type string/ }); assert.throws( @@ -46,7 +46,7 @@ assert.throws( { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', - message: 'ECDH curve name must be a string' + message: /The "options\.ecdhCurve" property must be of type string/ }); assert.throws( @@ -64,7 +64,7 @@ assert.throws( { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', - message: 'Session timeout must be a 32-bit integer' + message: /The "options\.sessionTimeout" property must be of type number/ }); assert.throws( @@ -72,11 +72,13 @@ assert.throws( { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', - message: 'Ticket keys must be a buffer' + message: /The "options\.ticketKeys" property must be an instance of/ }); -assert.throws(() => tls.createServer({ ticketKeys: Buffer.alloc(0) }), - /TypeError: Ticket keys length must be 48 bytes/); +assert.throws(() => tls.createServer({ ticketKeys: Buffer.alloc(0) }), { + code: 'ERR_INVALID_ARG_VALUE', + message: /The property 'options\.ticketKeys' must be exactly 48 bytes/ +}); assert.throws( () => tls.createSecurePair({}), diff --git a/test/parallel/test-tls-external-accessor.js b/test/parallel/test-tls-external-accessor.js index 33d371923a600c..07d79ef64a5167 100644 --- a/test/parallel/test-tls-external-accessor.js +++ b/test/parallel/test-tls-external-accessor.js @@ -12,11 +12,11 @@ const tls = require('tls'); const pctx = tls.createSecureContext().context; const cctx = Object.create(pctx); assert.throws(() => cctx._external, TypeError); - pctx._external; + pctx._external; // eslint-disable-line no-unused-expressions } { const pctx = tls.createSecurePair().credentials.context; const cctx = Object.create(pctx); assert.throws(() => cctx._external, TypeError); - pctx._external; + pctx._external; // eslint-disable-line no-unused-expressions } diff --git a/test/parallel/test-tls-onread-static-buffer.js b/test/parallel/test-tls-onread-static-buffer.js new file mode 100644 index 00000000000000..6e19184e887d2a --- /dev/null +++ b/test/parallel/test-tls-onread-static-buffer.js @@ -0,0 +1,206 @@ +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const tls = require('tls'); +const fixtures = require('../common/fixtures'); + +const options = { + key: fixtures.readKey('agent2-key.pem'), + cert: fixtures.readKey('agent2-cert.pem') +}; + +const smallMessage = Buffer.from('hello world'); +// Used to test .pause(), so needs to be larger than the internal buffer +const largeMessage = Buffer.alloc(64 * 1024).fill('hello world'); + +// Test typical usage +tls.createServer(options, common.mustCall(function(socket) { + this.close(); + socket.end(smallMessage); +})).listen(0, function() { + let received = 0; + const buffers = []; + const sockBuf = Buffer.alloc(8); + tls.connect({ + port: this.address().port, + rejectUnauthorized: false, + onread: { + buffer: sockBuf, + callback: function(nread, buf) { + assert.strictEqual(buf, sockBuf); + received += nread; + buffers.push(Buffer.from(buf.slice(0, nread))); + } + } + }).on('data', common.mustNotCall()).on('end', common.mustCall(() => { + assert.strictEqual(received, smallMessage.length); + assert.deepStrictEqual(Buffer.concat(buffers), smallMessage); + })); +}); + +// Test Uint8Array support +tls.createServer(options, common.mustCall(function(socket) { + this.close(); + socket.end(smallMessage); +})).listen(0, function() { + let received = 0; + let incoming = new Uint8Array(0); + const sockBuf = new Uint8Array(8); + tls.connect({ + port: this.address().port, + rejectUnauthorized: false, + onread: { + buffer: sockBuf, + callback: function(nread, buf) { + assert.strictEqual(buf, sockBuf); + received += nread; + const newIncoming = new Uint8Array(incoming.length + nread); + newIncoming.set(incoming); + newIncoming.set(buf.slice(0, nread), incoming.length); + incoming = newIncoming; + } + } + }).on('data', common.mustNotCall()).on('end', common.mustCall(() => { + assert.strictEqual(received, smallMessage.length); + assert.deepStrictEqual(incoming, new Uint8Array(smallMessage)); + })); +}); + +// Test Buffer callback usage +tls.createServer(options, common.mustCall(function(socket) { + this.close(); + socket.end(smallMessage); +})).listen(0, function() { + let received = 0; + const incoming = []; + const bufPool = [ Buffer.alloc(2), Buffer.alloc(2), Buffer.alloc(2) ]; + let bufPoolIdx = -1; + let bufPoolUsage = 0; + tls.connect({ + port: this.address().port, + rejectUnauthorized: false, + onread: { + buffer: () => { + ++bufPoolUsage; + bufPoolIdx = (bufPoolIdx + 1) % bufPool.length; + return bufPool[bufPoolIdx]; + }, + callback: function(nread, buf) { + assert.strictEqual(buf, bufPool[bufPoolIdx]); + received += nread; + incoming.push(Buffer.from(buf.slice(0, nread))); + } + } + }).on('data', common.mustNotCall()).on('end', common.mustCall(() => { + assert.strictEqual(received, smallMessage.length); + assert.deepStrictEqual(Buffer.concat(incoming), smallMessage); + assert.strictEqual(bufPoolUsage, 7); + })); +}); + +// Test Uint8Array callback support +tls.createServer(options, common.mustCall(function(socket) { + this.close(); + socket.end(smallMessage); +})).listen(0, function() { + let received = 0; + let incoming = new Uint8Array(0); + const bufPool = [ new Uint8Array(2), new Uint8Array(2), new Uint8Array(2) ]; + let bufPoolIdx = -1; + let bufPoolUsage = 0; + tls.connect({ + port: this.address().port, + rejectUnauthorized: false, + onread: { + buffer: () => { + ++bufPoolUsage; + bufPoolIdx = (bufPoolIdx + 1) % bufPool.length; + return bufPool[bufPoolIdx]; + }, + callback: function(nread, buf) { + assert.strictEqual(buf, bufPool[bufPoolIdx]); + received += nread; + const newIncoming = new Uint8Array(incoming.length + nread); + newIncoming.set(incoming); + newIncoming.set(buf.slice(0, nread), incoming.length); + incoming = newIncoming; + } + } + }).on('data', common.mustNotCall()).on('end', common.mustCall(() => { + assert.strictEqual(received, smallMessage.length); + assert.deepStrictEqual(incoming, new Uint8Array(smallMessage)); + assert.strictEqual(bufPoolUsage, 7); + })); +}); + +// Test explicit socket pause +tls.createServer(options, common.mustCall(function(socket) { + this.close(); + // Need larger message here to observe the pause + socket.end(largeMessage); +})).listen(0, function() { + let received = 0; + const buffers = []; + const sockBuf = Buffer.alloc(64); + let pauseScheduled = false; + const client = tls.connect({ + port: this.address().port, + rejectUnauthorized: false, + onread: { + buffer: sockBuf, + callback: function(nread, buf) { + assert.strictEqual(buf, sockBuf); + received += nread; + buffers.push(Buffer.from(buf.slice(0, nread))); + if (!pauseScheduled) { + pauseScheduled = true; + client.pause(); + setTimeout(() => { + client.resume(); + }, 100); + } + } + } + }).on('data', common.mustNotCall()).on('end', common.mustCall(() => { + assert.strictEqual(received, largeMessage.length); + assert.deepStrictEqual(Buffer.concat(buffers), largeMessage); + })); +}); + +// Test implicit socket pause +tls.createServer(options, common.mustCall(function(socket) { + this.close(); + // Need larger message here to observe the pause + socket.end(largeMessage); +})).listen(0, function() { + let received = 0; + const buffers = []; + const sockBuf = Buffer.alloc(64); + let pauseScheduled = false; + const client = tls.connect({ + port: this.address().port, + rejectUnauthorized: false, + onread: { + buffer: sockBuf, + callback: function(nread, buf) { + assert.strictEqual(buf, sockBuf); + received += nread; + buffers.push(Buffer.from(buf.slice(0, nread))); + if (!pauseScheduled) { + pauseScheduled = true; + setTimeout(() => { + client.resume(); + }, 100); + return false; + } + return true; + } + } + }).on('data', common.mustNotCall()).on('end', common.mustCall(() => { + assert.strictEqual(received, largeMessage.length); + assert.deepStrictEqual(Buffer.concat(buffers), largeMessage); + })); +}); diff --git a/test/parallel/test-tls-set-ciphers.js b/test/parallel/test-tls-set-ciphers.js index 57bd2f8652a3e0..f08af9b089adb9 100644 --- a/test/parallel/test-tls-set-ciphers.js +++ b/test/parallel/test-tls-set-ciphers.js @@ -104,3 +104,7 @@ test('AES256-SHA', ':', U, U, 'ERR_INVALID_ARG_VALUE'); // Using '' is synonymous for "use default ciphers" test('TLS_AES_256_GCM_SHA384', '', 'TLS_AES_256_GCM_SHA384'); test('', 'TLS_AES_256_GCM_SHA384', 'TLS_AES_256_GCM_SHA384'); + +// Using null should be treated the same as undefined. +test(null, 'AES256-SHA', 'AES256-SHA'); +test('AES256-SHA', null, 'AES256-SHA'); diff --git a/test/parallel/test-trace-events-bootstrap.js b/test/parallel/test-trace-events-bootstrap.js index 7251a9824dc951..634ee7ece0294f 100644 --- a/test/parallel/test-trace-events-bootstrap.js +++ b/test/parallel/test-trace-events-bootstrap.js @@ -16,7 +16,7 @@ const names = [ ]; if (process.argv[2] === 'child') { - 1 + 1; + 1 + 1; // eslint-disable-line no-unused-expressions } else { tmpdir.refresh(); diff --git a/test/parallel/test-trace-events-environment.js b/test/parallel/test-trace-events-environment.js index 14900dfc96ff46..75714283fb1335 100644 --- a/test/parallel/test-trace-events-environment.js +++ b/test/parallel/test-trace-events-environment.js @@ -21,12 +21,14 @@ const names = new Set([ ]); if (process.argv[2] === 'child') { + /* eslint-disable no-unused-expressions */ // This is just so that the child has something to do. 1 + 1; // These ensure that the RunTimers, CheckImmediate, and // RunAndClearNativeImmediates appear in the list. setImmediate(() => { 1 + 1; }); setTimeout(() => { 1 + 1; }, 1); + /* eslint-enable no-unused-expressions */ } else { tmpdir.refresh(); diff --git a/test/parallel/test-util-inspect-getters-accessing-this.js b/test/parallel/test-util-inspect-getters-accessing-this.js new file mode 100644 index 00000000000000..3d185b134e852d --- /dev/null +++ b/test/parallel/test-util-inspect-getters-accessing-this.js @@ -0,0 +1,30 @@ +'use strict'; + +require('../common'); + +// This test ensures that util.inspect logs getters +// which access this. + +const assert = require('assert'); + +const util = require('util'); + +class X { + constructor() { + this._y = 123; + } + + get y() { + return this._y; + } +} + +const result = util.inspect(new X(), { + getters: true, + showHidden: true +}); + +assert.strictEqual( + result, + 'X { _y: 123, [y]: [Getter: 123] }' +); diff --git a/test/parallel/test-util-inspect-namespace.js b/test/parallel/test-util-inspect-namespace.js index fc13fca6c6ac98..244166f3819830 100644 --- a/test/parallel/test-util-inspect-namespace.js +++ b/test/parallel/test-util-inspect-namespace.js @@ -11,7 +11,10 @@ const { inspect } = require('util'); await m.link(() => 0); assert.strictEqual( inspect(m.namespace), - '[Module] { a: , b: undefined }'); + '[Module: null prototype] { a: , b: undefined }'); await m.evaluate(); - assert.strictEqual(inspect(m.namespace), '[Module] { a: 1, b: 2 }'); + assert.strictEqual( + inspect(m.namespace), + '[Module: null prototype] { a: 1, b: 2 }' + ); })().then(common.mustCall()); diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 70f2ff64328b64..ad8da0a7a47e9d 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -583,9 +583,9 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324'); { let obj = vm.runInNewContext('(function(){return {}})()', {}); assert.strictEqual(util.inspect(obj), '{}'); - obj = vm.runInNewContext('var m=new Map();m.set(1,2);m', {}); + obj = vm.runInNewContext('const m=new Map();m.set(1,2);m', {}); assert.strictEqual(util.inspect(obj), 'Map(1) { 1 => 2 }'); - obj = vm.runInNewContext('var s=new Set();s.add(1);s.add(2);s', {}); + obj = vm.runInNewContext('const s=new Set();s.add(1);s.add(2);s', {}); assert.strictEqual(util.inspect(obj), 'Set(2) { 1, 2 }'); obj = vm.runInNewContext('fn=function(){};new Promise(fn,fn)', {}); assert.strictEqual(util.inspect(obj), 'Promise { }'); @@ -2011,6 +2011,11 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'"); rest[rest.length - 1] = rest[rest.length - 1].slice(0, -1); rest.length = 1; } + Object.setPrototypeOf(clazz, Map.prototype); + assert.strictEqual( + util.inspect(clazz), + ['[class', name, '[Map]', ...rest].join(' ') + ']' + ); Object.setPrototypeOf(clazz, null); assert.strictEqual( util.inspect(clazz), @@ -2866,6 +2871,17 @@ assert.strictEqual( ); } +// Check that prototypes with a null prototype are inspectable. +// Regression test for https://github.com/nodejs/node/issues/35730 +{ + function Func() {} + Func.prototype = null; + const object = {}; + object.constructor = Func; + + assert.strictEqual(util.inspect(object), '{ constructor: [Function: Func] }'); +} + // Test changing util.inspect.colors colors and aliases. { const colors = util.inspect.colors; @@ -2906,6 +2922,7 @@ assert.strictEqual( util.inspect(x, { maxStringLength: 4 }), "'aaaa'... 999996 more characters" ); + assert.match(util.inspect(x, { maxStringLength: null }), /a'$/); } { @@ -2990,3 +3007,55 @@ assert.strictEqual( // Consistency check. assert(fullObjectGraph(global).has(Function.prototype)); } + +{ + // Confirm that own constructor value displays correctly. + + function Fhqwhgads() {} + + const sterrance = new Fhqwhgads(); + sterrance.constructor = Fhqwhgads; + + assert.strictEqual( + util.inspect(sterrance, { showHidden: true }), + 'Fhqwhgads {\n' + + ' constructor: [Function: Fhqwhgads] {\n' + + ' [length]: 0,\n' + + " [name]: 'Fhqwhgads',\n" + + ' [prototype]: { [constructor]: [Circular *1] }\n' + + ' }\n' + + '}' + ); +} + +{ + // Confirm null prototype of generator prototype displays as expected. + + function getProtoOfProto() { + return Object.getPrototypeOf(Object.getPrototypeOf(function* () {})); + } + + function* generator() {} + + const generatorPrototype = Object.getPrototypeOf(generator); + const originalProtoOfProto = Object.getPrototypeOf(generatorPrototype); + assert.strictEqual(getProtoOfProto(), originalProtoOfProto); + Object.setPrototypeOf(generatorPrototype, null); + assert.notStrictEqual(getProtoOfProto, originalProtoOfProto); + + // This is the actual test. The other assertions in this block are about + // making sure the test is set up correctly and isn't polluting other tests. + assert.strictEqual( + util.inspect(generator, { showHidden: true }), + '[GeneratorFunction: generator] {\n' + + ' [length]: 0,\n' + + " [name]: 'generator',\n" + + " [prototype]: Object [Generator] { [Symbol(Symbol.toStringTag)]: 'Generator' },\n" + // eslint-disable-line max-len + " [Symbol(Symbol.toStringTag)]: 'GeneratorFunction'\n" + + '}' + ); + + // Reset so we don't pollute other tests + Object.setPrototypeOf(generatorPrototype, originalProtoOfProto); + assert.strictEqual(getProtoOfProto(), originalProtoOfProto); +} diff --git a/test/parallel/test-util-types-exists.js b/test/parallel/test-util-types-exists.js new file mode 100644 index 00000000000000..6a66be87fb384b --- /dev/null +++ b/test/parallel/test-util-types-exists.js @@ -0,0 +1,6 @@ +'use strict'; + +require('../common'); +const assert = require('assert'); + +assert.strictEqual(require('util/types'), require('util').types); diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js index 593fb34ad73594..7485aa19a7d3d9 100644 --- a/test/parallel/test-v8-serdes.js +++ b/test/parallel/test-v8-serdes.js @@ -25,11 +25,6 @@ const objects = [ const hostObject = new (internalBinding('js_stream').JSStream)(); -const serializerTypeError = - /^TypeError: Class constructor Serializer cannot be invoked without 'new'$/; -const deserializerTypeError = - /^TypeError: Class constructor Deserializer cannot be invoked without 'new'$/; - { const ser = new v8.DefaultSerializer(); ser.writeHeader(); @@ -186,8 +181,16 @@ const deserializerTypeError = } { - assert.throws(v8.Serializer, serializerTypeError); - assert.throws(v8.Deserializer, deserializerTypeError); + assert.throws(() => v8.Serializer(), { + constructor: TypeError, + message: "Class constructor Serializer cannot be invoked without 'new'", + code: 'ERR_CONSTRUCT_CALL_REQUIRED' + }); + assert.throws(() => v8.Deserializer(), { + constructor: TypeError, + message: "Class constructor Deserializer cannot be invoked without 'new'", + code: 'ERR_CONSTRUCT_CALL_REQUIRED' + }); } diff --git a/test/parallel/test-v8-stop-coverage.js b/test/parallel/test-v8-stop-coverage.js new file mode 100644 index 00000000000000..020e18d8747eb2 --- /dev/null +++ b/test/parallel/test-v8-stop-coverage.js @@ -0,0 +1,34 @@ +'use strict'; + +if (!process.features.inspector) return; + +require('../common'); +const fixtures = require('../common/fixtures'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fs = require('fs'); +const { spawnSync } = require('child_process'); + +tmpdir.refresh(); +const intervals = 20; + +{ + const output = spawnSync(process.execPath, [ + '-r', + fixtures.path('v8-coverage', 'stop-coverage'), + '-r', + fixtures.path('v8-coverage', 'take-coverage'), + fixtures.path('v8-coverage', 'interval'), + ], { + env: { + ...process.env, + NODE_V8_COVERAGE: tmpdir.path, + NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER', + TEST_INTERVALS: intervals + }, + }); + console.log(output.stderr.toString()); + assert.strictEqual(output.status, 0); + const coverageFiles = fs.readdirSync(tmpdir.path); + assert.strictEqual(coverageFiles.length, 0); +} diff --git a/test/parallel/test-v8-take-coverage-noop.js b/test/parallel/test-v8-take-coverage-noop.js new file mode 100644 index 00000000000000..c1c797bfd42220 --- /dev/null +++ b/test/parallel/test-v8-take-coverage-noop.js @@ -0,0 +1,32 @@ +'use strict'; + +if (!process.features.inspector) return; + +require('../common'); +const fixtures = require('../common/fixtures'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fs = require('fs'); +const { spawnSync } = require('child_process'); + +tmpdir.refresh(); + +// v8.takeCoverage() should be a noop if NODE_V8_COVERAGE is not set. +const intervals = 40; +{ + const output = spawnSync(process.execPath, [ + '-r', + fixtures.path('v8-coverage', 'take-coverage'), + fixtures.path('v8-coverage', 'interval'), + ], { + env: { + ...process.env, + NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER', + TEST_INTERVALS: intervals + }, + }); + console.log(output.stderr.toString()); + assert.strictEqual(output.status, 0); + const coverageFiles = fs.readdirSync(tmpdir.path); + assert.strictEqual(coverageFiles.length, 0); +} diff --git a/test/parallel/test-v8-take-coverage.js b/test/parallel/test-v8-take-coverage.js new file mode 100644 index 00000000000000..b5e99ac30a5717 --- /dev/null +++ b/test/parallel/test-v8-take-coverage.js @@ -0,0 +1,85 @@ +'use strict'; + +if (!process.features.inspector) return; + +require('../common'); +const fixtures = require('../common/fixtures'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const { spawnSync } = require('child_process'); + +tmpdir.refresh(); +const intervals = 40; +// Outputs coverage when v8.takeCoverage() is invoked. +{ + const output = spawnSync(process.execPath, [ + '-r', + fixtures.path('v8-coverage', 'take-coverage'), + fixtures.path('v8-coverage', 'interval'), + ], { + env: { + ...process.env, + NODE_V8_COVERAGE: tmpdir.path, + NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER', + TEST_INTERVALS: intervals + }, + }); + console.log(output.stderr.toString()); + assert.strictEqual(output.status, 0); + const coverageFiles = fs.readdirSync(tmpdir.path); + + let coverages = []; + for (const coverageFile of coverageFiles) { + const coverage = require(path.join(tmpdir.path, coverageFile)); + for (const result of coverage.result) { + if (result.url.includes('/interval')) { + coverages.push({ + file: coverageFile, + func: result.functions.find((f) => f.functionName === 'interval'), + timestamp: coverage.timestamp + }); + } + } + } + + coverages = coverages.sort((a, b) => { return a.timestamp - b.timestamp; }); + // There should be two coverages taken, one triggered by v8.takeCoverage(), + // the other by process exit. + console.log('Coverages:', coverages); + assert.strictEqual(coverages.length, 3); + + let blockHitsTotal = 0; + for (let i = 0; i < coverages.length; ++i) { + const { ranges } = coverages[i].func; + console.log('coverage', i, ranges); + + if (i !== coverages.length - 1) { + // When the first two coverages are taken: + assert.strictEqual(ranges.length, 2); + const blockHits = ranges[0].count; + // The block inside interval() should be hit at least once. + assert.notStrictEqual(blockHits, 0); + blockHitsTotal += blockHits; + // The else branch should not be hit. + const elseBranchHits = ranges[1].count; + assert.strictEqual(elseBranchHits, 0); + } else { + // At process exit: + assert.strictEqual(ranges.length, 3); + const blockHits = ranges[0].count; + // The block inside interval() should be hit at least once more. + assert.notStrictEqual(blockHits, 0); + blockHitsTotal += blockHits; + // The else branch should be hit exactly once. + const elseBranchHits = ranges[2].count; + assert.strictEqual(elseBranchHits, 1); + const ifBranchHits = ranges[1].count; + assert.strictEqual(ifBranchHits, blockHits - elseBranchHits); + } + } + + // The block should be hit `intervals` times in total. + assert.strictEqual(blockHitsTotal, intervals); +} diff --git a/test/parallel/test-v8-version-tag.js b/test/parallel/test-v8-version-tag.js index 22b0db0cd48885..ec57b82fac6d50 100644 --- a/test/parallel/test-v8-version-tag.js +++ b/test/parallel/test-v8-version-tag.js @@ -7,9 +7,9 @@ const versionTag1 = v8.cachedDataVersionTag(); assert.strictEqual(typeof versionTag1, 'number'); assert.strictEqual(v8.cachedDataVersionTag(), versionTag1); -// The value of cachedDataVersionTag is derived from the command line flags and -// detected CPU features. Test that the value does indeed update when flags -// are toggled. +// The value returned by v8.cachedDataVersionTag() is derived from the V8 +// version, command-line flags, and detected CPU features. Test that the value +// does indeed update when flags are toggled. v8.setFlagsFromString('--allow_natives_syntax'); const versionTag2 = v8.cachedDataVersionTag(); diff --git a/test/parallel/test-vm-module-errors.js b/test/parallel/test-vm-module-errors.js index 2e9697ff4123f7..942e2f370dfff8 100644 --- a/test/parallel/test-vm-module-errors.js +++ b/test/parallel/test-vm-module-errors.js @@ -86,7 +86,7 @@ async function checkModuleState() { assert.throws(() => { const m = new SourceTextModule(''); - m.error; + m.error; // eslint-disable-line no-unused-expressions }, { code: 'ERR_VM_MODULE_STATUS', message: 'Module status must be errored' @@ -95,7 +95,7 @@ async function checkModuleState() { await assert.rejects(async () => { const m = await createEmptyLinkedModule(); await m.evaluate(); - m.error; + m.error; // eslint-disable-line no-unused-expressions }, { code: 'ERR_VM_MODULE_STATUS', message: 'Module status must be errored' @@ -103,7 +103,7 @@ async function checkModuleState() { assert.throws(() => { const m = new SourceTextModule(''); - m.namespace; + m.namespace; // eslint-disable-line no-unused-expressions }, { code: 'ERR_VM_MODULE_STATUS', message: 'Module status must not be unlinked or linking' diff --git a/test/parallel/test-webcrypto-derivebits.js b/test/parallel/test-webcrypto-derivebits.js index a8d4d6e673862f..0556b8c15ceba3 100644 --- a/test/parallel/test-webcrypto-derivebits.js +++ b/test/parallel/test-webcrypto-derivebits.js @@ -102,7 +102,7 @@ const { internalBinding } = require('internal/test/binding'); } // Test Scrypt bit derivation -if (typeof internalBinding('crypto').scrypt === 'function') { +if (typeof internalBinding('crypto').ScryptJob === 'function') { async function test(pass, salt, length, expected) { const ec = new TextEncoder(); const key = await subtle.importKey( @@ -111,7 +111,7 @@ if (typeof internalBinding('crypto').scrypt === 'function') { { name: 'NODE-SCRYPT' }, false, ['deriveBits']); const secret = await subtle.deriveBits({ - name: 'SCRYPT', + name: 'NODE-SCRYPT', salt: ec.encode(salt), }, key, length); assert.strictEqual(Buffer.from(secret).toString('hex'), expected); diff --git a/test/parallel/test-webcrypto-derivekey.js b/test/parallel/test-webcrypto-derivekey.js index 9434da1fb672fb..f072fe01682792 100644 --- a/test/parallel/test-webcrypto-derivekey.js +++ b/test/parallel/test-webcrypto-derivekey.js @@ -122,7 +122,7 @@ const { internalBinding } = require('internal/test/binding'); } // Test Scrypt bit derivation -if (typeof internalBinding('crypto').scrypt === 'function') { +if (typeof internalBinding('crypto').ScryptJob === 'function') { async function test(pass, salt, expected) { const ec = new TextEncoder(); const key = await subtle.importKey( @@ -144,7 +144,7 @@ if (typeof internalBinding('crypto').scrypt === 'function') { } const kTests = [ - ['hello', 'there', 10, 'SHA-256', + ['hello', 'there', '30ddda6feabaac788eb81cc38f496cd5d9a165d320c537ea05331fe720db1061'] ]; diff --git a/test/parallel/test-webcrypto-encrypt-decrypt-aes.js b/test/parallel/test-webcrypto-encrypt-decrypt-aes.js index ec1635c991ce13..38d2b70bcb0567 100644 --- a/test/parallel/test-webcrypto-encrypt-decrypt-aes.js +++ b/test/parallel/test-webcrypto-encrypt-decrypt-aes.js @@ -6,7 +6,7 @@ if (!common.hasCrypto) common.skip('missing crypto'); const assert = require('assert'); -const { subtle } = require('crypto').webcrypto; +const { getRandomValues, subtle } = require('crypto').webcrypto; async function testEncrypt({ keyBuffer, algorithm, plaintext, result }) { const key = await subtle.importKey( @@ -196,3 +196,41 @@ async function testDecrypt({ keyBuffer, algorithm, result }) { await Promise.all(variations); })().then(common.mustCall()); } + +{ + (async function() { + const secretKey = await subtle.generateKey( + { + name: 'AES-GCM', + length: 256, + }, + false, + ['encrypt', 'decrypt'], + ); + + const iv = getRandomValues(new Uint8Array(12)); + const aad = getRandomValues(new Uint8Array(32)); + + const encrypted = await subtle.encrypt( + { + name: 'AES-GCM', + iv, + additionalData: aad, + tagLength: 128 + }, + secretKey, + getRandomValues(new Uint8Array(32)) + ); + + await subtle.decrypt( + { + name: 'AES-GCM', + iv, + additionalData: aad, + tagLength: 128, + }, + secretKey, + new Uint8Array(encrypted), + ); + })().then(common.mustCall()); +} diff --git a/test/parallel/test-webcrypto-export-import-ec.js b/test/parallel/test-webcrypto-export-import-ec.js index 1a17c794eed53a..190f7ffda2c2cb 100644 --- a/test/parallel/test-webcrypto-export-import-ec.js +++ b/test/parallel/test-webcrypto-export-import-ec.js @@ -8,10 +8,11 @@ if (!common.hasCrypto) const assert = require('assert'); const { subtle } = require('crypto').webcrypto; -const curves = ['P-384', 'P-521']; +const curves = ['P-256', 'P-384', 'P-521']; const keyData = { 'P-521': { + jwsAlg: 'ES512', spki: Buffer.from( '30819b301006072a8648ce3d020106052b8104002303818600040156f479f8df' + '1e20a7ffc04ce420c3e154ae251996bee42f034b84d41b743f34e45f311b813a' + @@ -40,6 +41,7 @@ const keyData = { } }, 'P-384': { + jwsAlg: 'ES384', spki: Buffer.from( '3076301006072a8648ce3d020106052b8104002203620004219c14d66617b36e' + 'c6d8856b385b73a74d344fd8ae75ef046435dda54e3b44bd5fbdebd1d08dd69e' + @@ -60,6 +62,26 @@ const keyData = { d: 'RTe1mQeE08LSLpao-S-hqkku6HPldqQVguFEGDyYiNEOa560ztSyzEAS5KxeqEBz' } }, + 'P-256': { + jwsAlg: 'ES256', + spki: Buffer.from( + '3059301306072a8648ce3d020106082a8648ce3d03010703420004d6e8328a95' + + 'fe29afcdc30977b9251efbb219022807f6b14bb34695b6b4bdb93ee6684548a4' + + 'ad13c49d00433c45315e8274f3540f58f5d79ef7a1b184f4c21d17', 'hex'), + pkcs8: Buffer.from( + '308187020100301306072a8648ce3d020106082a8648ce3d030107046d306b02' + + '010104202bc2eda265e46866efa8f8f99da993175b6c85c246e15dceaed7e307' + + '0f13fbf8a14403420004d6e8328a95fe29afcdc30977b9251efbb219022807f6' + + 'b14bb34695b6b4bdb93ee6684548a4ad13c49d00433c45315e8274f3540f58f5' + + 'd79ef7a1b184f4c21d17', 'hex'), + jwk: { + kty: 'EC', + crv: 'P-256', + x: '1ugyipX-Ka_Nwwl3uSUe-7IZAigH9rFLs0aVtrS9uT4', + y: '5mhFSKStE8SdAEM8RTFegnTzVA9Y9dee96GxhPTCHRc', + d: 'K8LtomXkaGbvqPj5namTF1tshcJG4V3OrtfjBw8T-_g' + } + }, }; const testVectors = [ @@ -168,6 +190,26 @@ async function testImportJwk( jwk, { name, namedCurve }, extractable, + privateUsages), + subtle.importKey( + 'jwk', + { + alg: name === 'ECDSA' ? keyData[namedCurve].jwsAlg : 'ECDH-ES', + kty: jwk.kty, + crv: jwk.crv, + x: jwk.x, + y: jwk.y, + }, + { name, namedCurve }, + extractable, publicUsages), + subtle.importKey( + 'jwk', + { + ...jwk, + alg: name === 'ECDSA' ? keyData[namedCurve].jwsAlg : 'ECDH-ES', + }, + { name, namedCurve }, + extractable, privateUsages) ]); diff --git a/test/parallel/test-worker-broadcastchannel-wpt.js b/test/parallel/test-worker-broadcastchannel-wpt.js new file mode 100644 index 00000000000000..972d8fb6e0d3b8 --- /dev/null +++ b/test/parallel/test-worker-broadcastchannel-wpt.js @@ -0,0 +1,155 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const { + BroadcastChannel, +} = require('worker_threads'); + +{ + const c1 = new BroadcastChannel('eventType').unref(); + const c2 = new BroadcastChannel('eventType'); + + c2.onmessage = common.mustCall((e) => { + assert(e instanceof MessageEvent); + assert.strictEqual(e.target, c2); + assert.strictEqual(e.type, 'message'); + assert.strictEqual(e.data, 'hello world'); + c2.close(); + }); + c1.postMessage('hello world'); +} + +{ + // Messages are delivered in port creation order. + // TODO(@jasnell): The ordering here is different than + // what the browsers would implement due to the different + // dispatching algorithm under the covers. What's not + // immediately clear is whether the ordering is spec + // mandated. In this test, c1 should receive events + // first, then c2, then c3. In the Node.js dispatching + // algorithm this means the ordering is: + // from c3 (c1 from c3) + // done (c1 from c2) + // from c1 (c2 from c1) + // from c3 (c2 from c3) + // from c1 (c3 from c1) + // done (c3 from c2) + // + // Whereas in the browser-ordering (as illustrated in the + // Web Platform Tests) it would be: + // from c1 (c2 from c1) + // from c1 (c3 from c1) + // from c3 (c1 from c3) + // from c3 (c2 from c3) + // done (c1 from c2) + // done (c3 from c2) + const c1 = new BroadcastChannel('order'); + const c2 = new BroadcastChannel('order'); + const c3 = new BroadcastChannel('order'); + + const events = []; + let doneCount = 0; + const handler = common.mustCall((e) => { + events.push(e); + if (e.data === 'done') { + doneCount++; + if (doneCount === 2) { + assert.strictEqual(events.length, 6); + // TODO: Don't skip Windows once ordering is fixed per comment above. + // Right now, the ordering for Windows is unreliable. + if (!common.isWindows) { + assert.strictEqual(events[0].data, 'from c3'); + assert.strictEqual(events[1].data, 'done'); + assert.strictEqual(events[2].data, 'from c1'); + assert.strictEqual(events[3].data, 'from c3'); + assert.strictEqual(events[4].data, 'from c1'); + assert.strictEqual(events[5].data, 'done'); + } + c1.close(); + c2.close(); + c3.close(); + } + } + }, 6); + c1.onmessage = handler; + c2.onmessage = handler; + c3.onmessage = handler; + + c1.postMessage('from c1'); + c3.postMessage('from c3'); + c2.postMessage('done'); +} + +{ + // Messages aren't delivered to a closed port + const c1 = new BroadcastChannel('closed1').unref(); + const c2 = new BroadcastChannel('closed1'); + const c3 = new BroadcastChannel('closed1'); + + c2.onmessage = common.mustNotCall(); + c2.close(); + c3.onmessage = common.mustCall(() => c3.close()); + c1.postMessage('test'); +} + +{ + // Messages aren't delivered to a port closed after calling postMessage. + const c1 = new BroadcastChannel('closed2').unref(); + const c2 = new BroadcastChannel('closed2'); + const c3 = new BroadcastChannel('closed2'); + + c2.onmessage = common.mustNotCall(); + c3.onmessage = common.mustCall(() => c3.close()); + c1.postMessage('test'); + c2.close(); +} + +{ + // Closing and creating channels during message delivery works correctly + const c1 = new BroadcastChannel('create-in-onmessage').unref(); + const c2 = new BroadcastChannel('create-in-onmessage'); + + c2.onmessage = common.mustCall((e) => { + assert.strictEqual(e.data, 'first'); + c2.close(); + const c3 = new BroadcastChannel('create-in-onmessage'); + c3.onmessage = common.mustCall((event) => { + assert.strictEqual(event.data, 'done'); + c3.close(); + }); + c1.postMessage('done'); + }); + c1.postMessage('first'); + c2.postMessage('second'); +} + +{ + // TODO: Fix failure on Windows CI. Skipping for now. + if (!common.isWindows) { + // Closing a channel in onmessage prevents already queued tasks + // from firing onmessage events + const c1 = new BroadcastChannel('close-in-onmessage2').unref(); + const c2 = new BroadcastChannel('close-in-onmessage2'); + const c3 = new BroadcastChannel('close-in-onmessage2'); + const events = []; + c1.onmessage = (e) => events.push('c1: ' + e.data); + c2.onmessage = (e) => events.push('c2: ' + e.data); + c3.onmessage = (e) => events.push('c3: ' + e.data); + + // c2 closes itself when it receives the first message + c2.addEventListener('message', common.mustCall(() => c2.close())); + + c3.addEventListener('message', common.mustCall((e) => { + if (e.data === 'done') { + assert.deepStrictEqual(events, [ + 'c2: first', + 'c3: first', + 'c3: done']); + c3.close(); + } + }, 2)); + c1.postMessage('first'); + c1.postMessage('done'); + } +} diff --git a/test/parallel/test-worker-broadcastchannel.js b/test/parallel/test-worker-broadcastchannel.js new file mode 100644 index 00000000000000..b26fbc3769d3f3 --- /dev/null +++ b/test/parallel/test-worker-broadcastchannel.js @@ -0,0 +1,142 @@ +'use strict'; + +const common = require('../common'); +const { + BroadcastChannel, + Worker, +} = require('worker_threads'); +const assert = require('assert'); + +assert.throws(() => new BroadcastChannel(Symbol('test')), { + message: /Cannot convert a Symbol value to a string/ +}); + +assert.throws(() => new BroadcastChannel(), { + message: /The "name" argument must be specified/ +}); + +// These should all just work +[undefined, 1, null, 'test', 1n, false, Infinity].forEach((i) => { + const bc = new BroadcastChannel(i); + assert.strictEqual(bc.name, `${i}`); + bc.close(); +}); + +{ + // Empty postMessage throws + const bc = new BroadcastChannel('whatever'); + assert.throws(() => bc.postMessage(), { + message: /The "message" argument must be specified/ + }); + bc.close(); + // Calling close multiple times should not throw + bc.close(); + + // Calling postMessage after close should throw + assert.throws(() => bc.postMessage(null), { + message: /BroadcastChannel is closed/ + }); +} + +{ + const bc1 = new BroadcastChannel('channel1'); + const bc2 = new BroadcastChannel('channel1'); + const bc3 = new BroadcastChannel('channel1'); + const bc4 = new BroadcastChannel('channel2'); + assert.strictEqual(bc1.name, 'channel1'); + assert.strictEqual(bc2.name, 'channel1'); + assert.strictEqual(bc3.name, 'channel1'); + assert.strictEqual(bc4.name, 'channel2'); + bc1.addEventListener('message', common.mustCall((event) => { + assert.strictEqual(event.data, 'hello'); + bc1.close(); + bc2.close(); + bc4.close(); + })); + bc3.addEventListener('message', common.mustCall((event) => { + assert.strictEqual(event.data, 'hello'); + bc3.close(); + })); + bc2.addEventListener('message', common.mustNotCall()); + bc4.addEventListener('message', common.mustNotCall()); + bc2.postMessage('hello'); +} + +{ + const bc1 = new BroadcastChannel('onmessage-channel1'); + const bc2 = new BroadcastChannel('onmessage-channel1'); + const bc3 = new BroadcastChannel('onmessage-channel1'); + const bc4 = new BroadcastChannel('onmessage-channel2'); + assert.strictEqual(bc1.name, 'onmessage-channel1'); + assert.strictEqual(bc2.name, 'onmessage-channel1'); + assert.strictEqual(bc3.name, 'onmessage-channel1'); + assert.strictEqual(bc4.name, 'onmessage-channel2'); + bc1.onmessage = common.mustCall((event) => { + assert.strictEqual(event.data, 'hello'); + bc1.close(); + bc2.close(); + bc4.close(); + }); + bc3.onmessage = common.mustCall((event) => { + assert.strictEqual(event.data, 'hello'); + bc3.close(); + }); + bc2.onmessage = common.mustNotCall(); + bc4.onmessage = common.mustNotCall(); + bc2.postMessage('hello'); +} + +{ + const bc = new BroadcastChannel('worker1'); + new Worker(` + const assert = require('assert'); + const { BroadcastChannel } = require('worker_threads'); + const bc = new BroadcastChannel('worker1'); + bc.addEventListener('message', (event) => { + assert.strictEqual(event.data, 123); + // If this close() is not executed, the test should hang and timeout. + // If the test does hang and timeout in CI, then the first step should + // be to check that the two bc.close() calls are being made. + bc.close(); + }); + bc.postMessage(321); + `, { eval: true }); + bc.addEventListener('message', common.mustCall(({ data }) => { + assert.strictEqual(data, 321); + bc.postMessage(123); + bc.close(); + })); +} + +{ + const bc1 = new BroadcastChannel('channel3'); + const bc2 = new BroadcastChannel('channel3'); + const bc3 = new BroadcastChannel('channel3'); + bc3.postMessage(new SharedArrayBuffer(10)); + let received = 0; + for (const bc of [bc1, bc2]) { + bc.addEventListener('message', common.mustCall(({ data }) => { + assert(data instanceof SharedArrayBuffer); + if (++received === 2) { + bc1.close(); + bc2.close(); + bc3.close(); + } + })); + } +} + +{ + const bc1 = new BroadcastChannel('channel3'); + const mc = new MessageChannel(); + assert.throws(() => bc1.postMessage(mc), { + message: /Object that needs transfer was found/ + }); + assert.throws(() => bc1.postMessage(Symbol()), { + message: /Symbol\(\) could not be cloned/ + }); + bc1.close(); + assert.throws(() => bc1.postMessage(Symbol()), { + message: /BroadcastChannel is closed/ + }); +} diff --git a/test/parallel/test-worker-execargv-invalid.js b/test/parallel/test-worker-execargv-invalid.js index bbad565c4f0c5f..be8ab0b8c423b7 100644 --- a/test/parallel/test-worker-execargv-invalid.js +++ b/test/parallel/test-worker-execargv-invalid.js @@ -33,3 +33,17 @@ const { Worker } = require('worker_threads'); new Worker(__filename, { execArgv: ['--redirect-warnings'] }); }, expectedErr); } + +{ + const expectedErr = { + code: 'ERR_WORKER_INVALID_EXEC_ARGV', + name: 'Error' + }; + assert.throws(() => { + new Worker(__filename, { + env: { + NODE_OPTIONS: '--nonexistent-options' + } + }); + }, expectedErr); +} diff --git a/test/parallel/test-worker-message-port.js b/test/parallel/test-worker-message-port.js index 4f4863c45ed516..51618e4fab1850 100644 --- a/test/parallel/test-worker-message-port.js +++ b/test/parallel/test-worker-message-port.js @@ -16,7 +16,18 @@ const { MessageChannel, MessagePort } = require('worker_threads'); port2.close(common.mustCall()); })); } - +{ + // Test emitting non-message events on a port + const { port2 } = new MessageChannel(); + port2.addEventListener('foo', common.mustCall((received) => { + assert.strictEqual(received.type, 'foo'); + assert.strictEqual(received.detail, 'bar'); + })); + port2.on('foo', common.mustCall((received) => { + assert.strictEqual(received, 'bar'); + })); + port2.emit('foo', 'bar'); +} { const { port1, port2 } = new MessageChannel(); @@ -154,9 +165,7 @@ const { MessageChannel, MessagePort } = require('worker_threads'); assert.deepStrictEqual( Object.getOwnPropertyNames(MessagePort.prototype).sort(), [ - // TODO(addaleax): This should include onmessage (and eventually - // onmessageerror). - 'close', 'constructor', 'postMessage', 'ref', 'start', - 'unref' + 'close', 'constructor', 'onmessage', 'onmessageerror', 'postMessage', + 'ref', 'start', 'unref' ]); } diff --git a/test/parallel/test-worker-terminate-source-map.js b/test/parallel/test-worker-terminate-source-map.js index 8cd40a6607422c..c855dab975be01 100644 --- a/test/parallel/test-worker-terminate-source-map.js +++ b/test/parallel/test-worker-terminate-source-map.js @@ -27,16 +27,19 @@ const { callCount } = workerData; function increaseCallCount() { callCount[0]++; } // Increase the call count when a forbidden method is called. -Object.getPrototypeOf((new Map()).entries()).next = increaseCallCount; -Map.prototype.entries = increaseCallCount; -Object.keys = increaseCallCount; -Object.create = increaseCallCount; -Object.hasOwnProperty = increaseCallCount; for (const property of ['_cache', 'lineLengths', 'url']) { Object.defineProperty(Object.prototype, property, { get: increaseCallCount, set: increaseCallCount }); } +Object.getPrototypeOf([][Symbol.iterator]()).next = increaseCallCount; +Object.getPrototypeOf((new Map()).entries()).next = increaseCallCount; +Array.prototype[Symbol.iterator] = increaseCallCount; +Map.prototype[Symbol.iterator] = increaseCallCount; +Map.prototype.entries = increaseCallCount; +Object.keys = increaseCallCount; +Object.create = increaseCallCount; +Object.hasOwnProperty = increaseCallCount; parentPort.postMessage('done'); diff --git a/test/parallel/test-worker-unsupported-things.js b/test/parallel/test-worker-unsupported-things.js index cc9eec4af67760..a9f434eeaf55bb 100644 --- a/test/parallel/test-worker-unsupported-things.js +++ b/test/parallel/test-worker-unsupported-things.js @@ -40,7 +40,7 @@ if (!process.env.HAS_STARTED_WORKER) { ['channel', 'connected'].forEach((fn) => { assert.throws(() => { - process[fn]; + process[fn]; // eslint-disable-line no-unused-expressions }, { code: 'ERR_WORKER_UNSUPPORTED_OPERATION' }); }); diff --git a/test/parallel/test-zlib-invalid-arg-value-brotli-compress.js b/test/parallel/test-zlib-invalid-arg-value-brotli-compress.js new file mode 100644 index 00000000000000..688acddd16a136 --- /dev/null +++ b/test/parallel/test-zlib-invalid-arg-value-brotli-compress.js @@ -0,0 +1,20 @@ +'use strict'; + +require('../common'); + +// This test ensures that the BrotliCompress function throws +// ERR_INVALID_ARG_TYPE when the values of the `params` key-value object are +// neither numbers nor booleans. + +const assert = require('assert'); +const { BrotliCompress, constants } = require('zlib'); + +const opts = { + params: { + [constants.BROTLI_PARAM_MODE]: 'lol' + } +}; + +assert.throws(() => BrotliCompress(opts), { + code: 'ERR_INVALID_ARG_TYPE' +}); diff --git a/test/pummel/test-heapsnapshot-near-heap-limit-big.js b/test/pummel/test-heapsnapshot-near-heap-limit-big.js new file mode 100644 index 00000000000000..f70d562c1d1ee4 --- /dev/null +++ b/test/pummel/test-heapsnapshot-near-heap-limit-big.js @@ -0,0 +1,43 @@ +'use strict'; + +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const { spawnSync } = require('child_process'); +const fixtures = require('../common/fixtures'); +const fs = require('fs'); +const env = { + ...process.env, + NODE_DEBUG_NATIVE: 'diagnostics' +}; + +if (!common.enoughTestMem) + common.skip('Insufficient memory for snapshot test'); + +{ + console.log('\nTesting limit = 3'); + tmpdir.refresh(); + const child = spawnSync(process.execPath, [ + '--heapsnapshot-near-heap-limit=3', + '--max-old-space-size=512', + fixtures.path('workload', 'grow.js') + ], { + cwd: tmpdir.path, + env: { + ...env, + TEST_CHUNK: 2000, + } + }); + const stderr = child.stderr.toString(); + console.log(stderr); + assert(common.nodeProcessAborted(child.status, child.signal), + 'process should have aborted, but did not'); + const list = fs.readdirSync(tmpdir.path) + .filter((file) => file.endsWith('.heapsnapshot')); + if (list.length === 0) { + assert(stderr.includes( + 'Not generating snapshots because it\'s too risky')); + } else { + assert(list.length > 0 && list.length <= 3); + } +} diff --git a/test/pummel/test-policy-integrity.js b/test/pummel/test-policy-integrity.js index 57625268fae4d0..15124aefd46904 100644 --- a/test/pummel/test-policy-integrity.js +++ b/test/pummel/test-policy-integrity.js @@ -2,6 +2,7 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +common.requireNoPackageJSONAbove(); const { debuglog } = require('util'); const debug = debuglog('test'); diff --git a/test/report/test-report-uv-handles.js b/test/report/test-report-uv-handles.js index 3a6a34a8573fe7..d2dd630c46d25f 100644 --- a/test/report/test-report-uv-handles.js +++ b/test/report/test-report-uv-handles.js @@ -128,6 +128,9 @@ if (process.argv[2] === 'child') { assert.strictEqual(handle.filename, expected_filename); assert(handle.is_referenced); }), + loop: common.mustCall(function loop_validator(handle) { + assert.strictEqual(typeof handle.loopIdleTimeSeconds, 'number'); + }), pipe: common.mustCallAtLeast(function pipe_validator(handle) { assert(handle.is_referenced); }), diff --git a/test/sequential/test-async-wrap-getasyncid.js b/test/sequential/test-async-wrap-getasyncid.js index 22fde0916544d6..e37e613b747dc2 100644 --- a/test/sequential/test-async-wrap-getasyncid.js +++ b/test/sequential/test-async-wrap-getasyncid.js @@ -145,7 +145,7 @@ if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check testInitialized(this, 'RandomBytesJob'); })); - if (typeof internalBinding('crypto').scrypt === 'function') { + if (typeof internalBinding('crypto').ScryptJob === 'function') { crypto.scrypt('password', 'salt', 8, common.mustCall(function() { testInitialized(this, 'ScryptJob'); })); diff --git a/test/sequential/test-fs-watch.js b/test/sequential/test-fs-watch.js index 8c543a2a17290a..c5db585f3f4a59 100644 --- a/test/sequential/test-fs-watch.js +++ b/test/sequential/test-fs-watch.js @@ -42,6 +42,15 @@ const testDir = tmpdir.path; tmpdir.refresh(); +// Because macOS (and possibly other operating systems) can return a watcher +// before it is actually watching, we need to repeat the operation to avoid +// a race condition. +function repeat(fn) { + setImmediate(fn); + const interval = setInterval(fn, 5000); + return interval; +} + { const filepath = path.join(testDir, 'watch.txt'); @@ -54,12 +63,11 @@ tmpdir.refresh(); if (expectFilePath) { assert.strictEqual(filename, 'watch.txt'); } + clearInterval(interval); watcher.close(); })); - setImmediate(function() { - fs.writeFileSync(filepath, 'world'); - }); + const interval = repeat(() => { fs.writeFileSync(filepath, 'world'); }); } { @@ -76,12 +84,11 @@ tmpdir.refresh(); if (expectFilePath) { assert.strictEqual(filename, 'hasOwnProperty'); } + clearInterval(interval); watcher.close(); })); - setImmediate(function() { - fs.writeFileSync(filepathAbs, 'pardner'); - }); + const interval = repeat(() => { fs.writeFileSync(filepathAbs, 'pardner'); }); } { @@ -97,14 +104,15 @@ tmpdir.refresh(); } else { assert.strictEqual(filename, null); } + clearInterval(interval); watcher.close(); })); - setImmediate(function() { + const interval = repeat(() => { + fs.rmSync(filepath, { force: true }); const fd = fs.openSync(filepath, 'w'); fs.closeSync(fd); }); - } // https://github.com/joyent/node/issues/2293 - non-persistent watcher should diff --git a/test/sequential/test-worker-eventlooputil.js b/test/sequential/test-worker-eventlooputil.js new file mode 100644 index 00000000000000..7e012cb2b02e7a --- /dev/null +++ b/test/sequential/test-worker-eventlooputil.js @@ -0,0 +1,114 @@ +'use strict'; + +const { mustCall, mustCallAtLeast } = require('../common'); + +const assert = require('assert'); +const { + Worker, + MessageChannel, + MessagePort, + parentPort, +} = require('worker_threads'); +const { eventLoopUtilization, now } = require('perf_hooks').performance; + +// Use argv to detect whether we're running as a Worker called by this test vs. +// this test also being called as a Worker. +if (process.argv[2] === 'iamalive') { + const iaElu = idleActive(eventLoopUtilization()); + // Checks that the worker bootstrap is running after the event loop started. + assert.ok(iaElu > 0, `${iaElu} <= 0`); + parentPort.once('message', mustCall((msg) => { + assert.ok(msg.metricsCh instanceof MessagePort); + msg.metricsCh.on('message', mustCallAtLeast(workerOnMetricsMsg, 1)); + })); + return; +} + +function workerOnMetricsMsg(msg) { + if (msg.cmd === 'close') { + return this.close(); + } + + if (msg.cmd === 'elu') { + return this.postMessage(eventLoopUtilization()); + } + + if (msg.cmd === 'spin') { + const elu = eventLoopUtilization(); + const t = now(); + while (now() - t < msg.dur); + return this.postMessage(eventLoopUtilization(elu)); + } +} + +let worker; +let metricsCh; +let mainElu; +let workerELU; + +(function r() { + // Force some idle time to accumulate before proceeding with test. + if (eventLoopUtilization().idle <= 0) + return setTimeout(mustCall(r), 5); + + mainElu = eventLoopUtilization(); + + worker = new Worker(__filename, { argv: [ 'iamalive' ] }); + metricsCh = new MessageChannel(); + worker.postMessage({ metricsCh: metricsCh.port1 }, [ metricsCh.port1 ]); + + workerELU = worker.performance.eventLoopUtilization; + metricsCh.port2.once('message', mustCall(checkWorkerIdle)); + metricsCh.port2.postMessage({ cmd: 'elu' }); + // Make sure it's still safe to call eventLoopUtilization() after the worker + // hass been closed. + worker.on('exit', mustCall(() => { + assert.deepStrictEqual(worker.performance.eventLoopUtilization(), + { idle: 0, active: 0, utilization: 0 }); + })); +})(); + +function checkWorkerIdle(wElu) { + const perfWorkerElu = workerELU(); + const tmpMainElu = eventLoopUtilization(mainElu); + + assert.ok(idleActive(wElu) > 0, `${idleActive(wElu)} <= 0`); + assert.ok(idleActive(workerELU(wElu)) > 0, + `${idleActive(workerELU(wElu))} <= 0`); + assert.ok(idleActive(perfWorkerElu) > idleActive(wElu), + `${idleActive(perfWorkerElu)} <= ${idleActive(wElu)}`); + assert.ok(idleActive(tmpMainElu) > idleActive(perfWorkerElu), + `${idleActive(tmpMainElu)} <= ${idleActive(perfWorkerElu)}`); + + wElu = workerELU(); + setTimeout(mustCall(() => { + wElu = workerELU(wElu); + // Some clocks fire early. Removing a few milliseconds to cover that. + assert.ok(idleActive(wElu) >= 45, `${idleActive(wElu)} < 45`); + // Cutting the idle time in half since it's possible that the call took a + // lot of resources to process? + assert.ok(wElu.idle >= 25, `${wElu.idle} < 25`); + + checkWorkerActive(); + }), 50); +} + +function checkWorkerActive() { + const w = workerELU(); + + metricsCh.port2.postMessage({ cmd: 'spin', dur: 50 }); + metricsCh.port2.once('message', (wElu) => { + const w2 = workerELU(w); + + assert.ok(w2.active >= 50, `${w2.active} < 50`); + assert.ok(wElu.active >= 50, `${wElu.active} < 50`); + assert.ok(idleActive(wElu) < idleActive(w2), + `${idleActive(wElu)} >= ${idleActive(w2)}`); + + metricsCh.port2.postMessage({ cmd: 'close' }); + }); +} + +function idleActive(elu) { + return elu.idle + elu.active; +} diff --git a/test/wpt/status/dom/abort.json b/test/wpt/status/dom/abort.json new file mode 100644 index 00000000000000..0967ef424bce67 --- /dev/null +++ b/test/wpt/status/dom/abort.json @@ -0,0 +1 @@ +{} diff --git a/test/wpt/status/url.json b/test/wpt/status/url.json index 9038f6df80703e..89601af0ca5814 100644 --- a/test/wpt/status/url.json +++ b/test/wpt/status/url.json @@ -3,6 +3,10 @@ "requires": ["small-icu"], "skip": "TODO: port from .window.js" }, + "percent-encoding.window.js": { + "requires": ["small-icu"], + "skip": "TODO: port from .window.js" + }, "historical.any.js": { "requires": ["small-icu"] }, diff --git a/test/wpt/test-abort.js b/test/wpt/test-abort.js new file mode 100644 index 00000000000000..11960351b756e6 --- /dev/null +++ b/test/wpt/test-abort.js @@ -0,0 +1,7 @@ +'use strict'; +require('../common'); +const { WPTRunner } = require('../common/wpt'); + +const runner = new WPTRunner('dom/abort'); + +runner.runJsTests(); diff --git a/tools/actions/commit-queue.sh b/tools/actions/commit-queue.sh index d754276bf89b04..e0dc01dd526048 100755 --- a/tools/actions/commit-queue.sh +++ b/tools/actions/commit-queue.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -xe @@ -14,19 +14,19 @@ API_URL=https://api.github.com COMMIT_QUEUE_LABEL='commit-queue' COMMIT_QUEUE_FAILED_LABEL='commit-queue-failed' -function issueUrl() { +issueUrl() { echo "$API_URL/repos/${OWNER}/${REPOSITORY}/issues/${1}" } -function labelsUrl() { +labelsUrl() { echo "$(issueUrl "${1}")/labels" } -function commentsUrl() { +commentsUrl() { echo "$(issueUrl "${1}")/comments" } -function gitHubCurl() { +gitHubCurl() { url=$1 method=$2 shift 2 @@ -67,10 +67,9 @@ for pr in "$@"; do if ! tail -n 10 output | grep '. Post "Landed in .*/pull/'"${pr}"; then gitHubCurl "$(labelsUrl "$pr")" POST --data '{"labels": ["'"${COMMIT_QUEUE_FAILED_LABEL}"'"]}' - # Use printf to properly escape newline symbols for jq. - printf -v cqurl "\n\nCommit Queue action: %s/%s/%s/actions/runs/%s" \ - "$GITHUB_SERVER_URL" "${OWNER}" "${REPOSITORY}" "$GITHUB_RUN_ID" - jq -n --arg content "
Commit Queue failed
$(cat output)
$cqurl" '{body: $content}' > output.json + # shellcheck disable=SC2154 + cqurl="${GITHUB_SERVER_URL}/${OWNER}/${REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" + jq -n --arg content "
Commit Queue failed
$(cat output)
$cqurl
" '{body: $content}' > output.json cat output.json gitHubCurl "$(commentsUrl "$pr")" POST --data @output.json diff --git a/tools/actions/start-ci.sh b/tools/actions/start-ci.sh index 8eb3dae3c5bdf0..72a04b6b321b1f 100755 --- a/tools/actions/start-ci.sh +++ b/tools/actions/start-ci.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -xe @@ -10,15 +10,15 @@ REQUEST_CI_LABEL='request-ci' REQUEST_CI_FAILED_LABEL='request-ci-failed' shift 3 -function issueUrl() { +issueUrl() { echo "$API_URL/repos/${OWNER}/${REPOSITORY}/issues/${1}" } -function labelsUrl() { +labelsUrl() { echo "$(issueUrl "${1}")/labels" } -function commentsUrl() { +commentsUrl() { echo "$(issueUrl "${1}")/comments" } @@ -33,7 +33,7 @@ for pr in "$@"; do ncu-ci run "$pr" >output 2>&1 || ci_started=no cat output - if [ "$ci_started" == "no" ]; then + if [ "$ci_started" = "no" ]; then # Do we need to reset? curl -sL --request PUT \ --url "$(labelsUrl "$pr")" \ diff --git a/tools/cpplint.py b/tools/cpplint.py index 1502ec3e057e1b..4851111fac283f 100755 --- a/tools/cpplint.py +++ b/tools/cpplint.py @@ -59,7 +59,7 @@ # if empty, use defaults _valid_extensions = set([]) -__VERSION__ = '1.4.6' +__VERSION__ = '1.5.4' try: xrange # Python 2 @@ -69,7 +69,7 @@ _USAGE = """ -Syntax: cpplint.py [--verbose=#] [--output=emacs|eclipse|vs7|junit] +Syntax: cpplint.py [--verbose=#] [--output=emacs|eclipse|vs7|junit|sed|gsed] [--filter=-x,+y,...] [--counting=total|toplevel|detailed] [--root=subdir] [--repository=path] @@ -77,6 +77,7 @@ [--recursive] [--exclude=path] [--extensions=hpp,cpp,...] + [--includeorder=default|standardcfirst] [--quiet] [--version] [file] ... @@ -102,11 +103,16 @@ Flags: - output=emacs|eclipse|vs7|junit + output=emacs|eclipse|vs7|junit|sed|gsed By default, the output is formatted to ease emacs parsing. Visual Studio compatible output (vs7) may also be used. Further support exists for eclipse (eclipse), and JUnit (junit). XML parsers such as those used - in Jenkins and Bamboo may also be used. Other formats are unsupported. + in Jenkins and Bamboo may also be used. + The sed format outputs sed commands that should fix some of the errors. + Note that this requires gnu sed. If that is installed as gsed on your + system (common e.g. on macOS with homebrew) you can use the gsed output + format. Sed commands are written to stdout, not stderr, so you should be + able to pipe output straight to a shell to run the fixes. verbose=# Specify a number 0-5 to restrict errors to certain verbosity levels. @@ -209,6 +215,15 @@ Examples: --extensions=%s + includeorder=default|standardcfirst + For the build/include_order rule, the default is to blindly assume angle + bracket includes with file extension are c-system-headers (default), + even knowing this will have false classifications. + The default is established at google. + standardcfirst means to instead use an allow-list of known c headers and + treat all others as separate group of "other system headers". The C headers + included are those of the C-standard lib and closely related ones. + headers=x,y,... The header extensions that cpplint will treat as .h in checks. Values are automatically added to --extensions list. @@ -283,6 +298,7 @@ 'build/include_inline', 'build/include_order', 'build/include_what_you_use', + 'build/namespaces_headers', 'build/namespaces_literals', 'build/namespaces', 'build/printf_format', @@ -342,6 +358,13 @@ 'whitespace/todo', ] +# keywords to use with --outputs which generate stdout for machine processing +_MACHINE_OUTPUTS = [ + 'junit', + 'sed', + 'gsed' +] + # These error categories are no longer enforced by cpplint, but for backwards- # compatibility they may still appear in NOLINT comments. _LEGACY_ERROR_CATEGORIES = [ @@ -518,6 +541,186 @@ 'cwctype', ]) +# C headers +_C_HEADERS = frozenset([ + # System C headers + 'assert.h', + 'complex.h', + 'ctype.h', + 'errno.h', + 'fenv.h', + 'float.h', + 'inttypes.h', + 'iso646.h', + 'limits.h', + 'locale.h', + 'math.h', + 'setjmp.h', + 'signal.h', + 'stdalign.h', + 'stdarg.h', + 'stdatomic.h', + 'stdbool.h', + 'stddef.h', + 'stdint.h', + 'stdio.h', + 'stdlib.h', + 'stdnoreturn.h', + 'string.h', + 'tgmath.h', + 'threads.h', + 'time.h', + 'uchar.h', + 'wchar.h', + 'wctype.h', + # additional POSIX C headers + 'aio.h', + 'arpa/inet.h', + 'cpio.h', + 'dirent.h', + 'dlfcn.h', + 'fcntl.h', + 'fmtmsg.h', + 'fnmatch.h', + 'ftw.h', + 'glob.h', + 'grp.h', + 'iconv.h', + 'langinfo.h', + 'libgen.h', + 'monetary.h', + 'mqueue.h', + 'ndbm.h', + 'net/if.h', + 'netdb.h', + 'netinet/in.h', + 'netinet/tcp.h', + 'nl_types.h', + 'poll.h', + 'pthread.h', + 'pwd.h', + 'regex.h', + 'sched.h', + 'search.h', + 'semaphore.h', + 'setjmp.h', + 'signal.h', + 'spawn.h', + 'strings.h', + 'stropts.h', + 'syslog.h', + 'tar.h', + 'termios.h', + 'trace.h', + 'ulimit.h', + 'unistd.h', + 'utime.h', + 'utmpx.h', + 'wordexp.h', + # additional GNUlib headers + 'a.out.h', + 'aliases.h', + 'alloca.h', + 'ar.h', + 'argp.h', + 'argz.h', + 'byteswap.h', + 'crypt.h', + 'endian.h', + 'envz.h', + 'err.h', + 'error.h', + 'execinfo.h', + 'fpu_control.h', + 'fstab.h', + 'fts.h', + 'getopt.h', + 'gshadow.h', + 'ieee754.h', + 'ifaddrs.h', + 'libintl.h', + 'mcheck.h', + 'mntent.h', + 'obstack.h', + 'paths.h', + 'printf.h', + 'pty.h', + 'resolv.h', + 'shadow.h', + 'sysexits.h', + 'ttyent.h', + # Additional linux glibc headers + 'dlfcn.h', + 'elf.h', + 'features.h', + 'gconv.h', + 'gnu-versions.h', + 'lastlog.h', + 'libio.h', + 'link.h', + 'malloc.h', + 'memory.h', + 'netash/ash.h', + 'netatalk/at.h', + 'netax25/ax25.h', + 'neteconet/ec.h', + 'netipx/ipx.h', + 'netiucv/iucv.h', + 'netpacket/packet.h', + 'netrom/netrom.h', + 'netrose/rose.h', + 'nfs/nfs.h', + 'nl_types.h', + 'nss.h', + 're_comp.h', + 'regexp.h', + 'sched.h', + 'sgtty.h', + 'stab.h', + 'stdc-predef.h', + 'stdio_ext.h', + 'syscall.h', + 'termio.h', + 'thread_db.h', + 'ucontext.h', + 'ustat.h', + 'utmp.h', + 'values.h', + 'wait.h', + 'xlocale.h', + # Hardware specific headers + 'arm_neon.h', + 'emmintrin.h', + 'xmmintin.h', + ]) + +# Folders of C libraries so commonly used in C++, +# that they have parity with standard C libraries. +C_STANDARD_HEADER_FOLDERS = frozenset([ + # standard C library + "sys", + # glibc for linux + "arpa", + "asm-generic", + "bits", + "gnu", + "net", + "netinet", + "protocols", + "rpc", + "rpcsvc", + "scsi", + # linux kernel header + "drm", + "linux", + "misc", + "mtd", + "rdma", + "sound", + "video", + "xen", + ]) + # Type names _TYPES = re.compile( r'^(?:' @@ -604,9 +807,10 @@ # _IncludeState.CheckNextIncludeOrder(). _C_SYS_HEADER = 1 _CPP_SYS_HEADER = 2 -_LIKELY_MY_HEADER = 3 -_POSSIBLE_MY_HEADER = 4 -_OTHER_HEADER = 5 +_OTHER_SYS_HEADER = 3 +_LIKELY_MY_HEADER = 4 +_POSSIBLE_MY_HEADER = 5 +_OTHER_HEADER = 6 # These constants define the current inline assembly state _NO_ASM = 0 # Outside of inline assembly block @@ -626,6 +830,22 @@ # Match string that indicates we're working on a Linux Kernel file. _SEARCH_KERNEL_FILE = re.compile(r'\b(?:LINT_KERNEL_FILE)') +# Commands for sed to fix the problem +_SED_FIXUPS = { + 'Remove spaces around =': r's/ = /=/', + 'Remove spaces around !=': r's/ != /!=/', + 'Remove space before ( in if (': r's/if (/if(/', + 'Remove space before ( in for (': r's/for (/for(/', + 'Remove space before ( in while (': r's/while (/while(/', + 'Remove space before ( in switch (': r's/switch (/switch(/', + 'Should have a space between // and comment': r's/\/\//\/\/ /', + 'Missing space before {': r's/\([^ ]\){/\1 {/', + 'Tab found, replace by spaces': r's/\t/ /g', + 'Line ends in whitespace. Consider deleting these extra spaces.': r's/\s*$//', + 'You don\'t need a ; after a }': r's/};/}/', + 'Missing space after ,': r's/,\([^ ]\)/, \1/g', +} + _NULL_TOKEN_PATTERN = re.compile(r'\bNULL\b') _V8_PERSISTENT_PATTERN = re.compile(r'\bv8::Persistent\b') @@ -653,13 +873,16 @@ # Files to exclude from linting. This is set by the --exclude flag. _excludes = None -# Whether to suppress PrintInfo messages +# Whether to supress all PrintInfo messages, UNRELATED to --quiet flag _quiet = False # The allowed line length of files. # This is set by --linelength flag. _line_length = 80 +# This allows to use different include order rule than default +_include_order = "default" + try: unicode except NameError: @@ -703,6 +926,15 @@ def ProcessHppHeadersOption(val): except ValueError: PrintUsage('Header extensions must be comma separated list.') +def ProcessIncludeOrderOption(val): + if val is None or val == "default": + pass + elif val == "standardcfirst": + global _include_order + _include_order = val + else: + PrintUsage('Invalid includeorder value %s. Expected default|standardcfirst') + def IsHeaderExtension(file_extension): return file_extension in GetHeaderExtensions() @@ -863,12 +1095,15 @@ class _IncludeState(object): _INITIAL_SECTION = 0 _MY_H_SECTION = 1 _OTHER_H_SECTION = 2 - _C_SECTION = 3 - _CPP_SECTION = 4 + _OTHER_SYS_SECTION = 3 + _C_SECTION = 4 + _CPP_SECTION = 5 + _TYPE_NAMES = { _C_SYS_HEADER: 'C system header', _CPP_SYS_HEADER: 'C++ system header', + _OTHER_SYS_HEADER: 'other system header', _LIKELY_MY_HEADER: 'header this file implements', _POSSIBLE_MY_HEADER: 'header this file may implement', _OTHER_HEADER: 'other header', @@ -876,9 +1111,10 @@ class _IncludeState(object): _SECTION_NAMES = { _INITIAL_SECTION: "... nothing. (This can't be an error.)", _MY_H_SECTION: 'a header this file implements', - _OTHER_H_SECTION: 'other header', _C_SECTION: 'C system header', _CPP_SECTION: 'C++ system header', + _OTHER_SYS_SECTION: 'other system header', + _OTHER_H_SECTION: 'other header', } def __init__(self): @@ -991,6 +1227,12 @@ def CheckNextIncludeOrder(self, header_type): else: self._last_header = '' return error_message + elif header_type == _OTHER_SYS_HEADER: + if self._section <= self._OTHER_SYS_SECTION: + self._section = self._OTHER_SYS_SECTION + else: + self._last_header = '' + return error_message elif header_type == _LIKELY_MY_HEADER: if self._section <= self._MY_H_SECTION: self._section = self._MY_H_SECTION @@ -1032,6 +1274,8 @@ def __init__(self): # "eclipse" - format that eclipse can parse # "vs7" - format that Microsoft Visual Studio 7 can parse # "junit" - format that Jenkins, Bamboo, etc can parse + # "sed" - returns a gnu sed command to fix the problem + # "gsed" - like sed, but names the command gsed, e.g. for macOS homebrew users self.output_format = 'emacs' # For JUnit output, save errors and failures until the end so that they @@ -1120,7 +1364,9 @@ def PrintErrorCounts(self): self.PrintInfo('Total errors found: %d\n' % self.error_count) def PrintInfo(self, message): - if not _quiet and self.output_format != 'junit': + # _quiet does not represent --quiet flag. + # Hide infos from stdout to keep stdout pure for machine consumption + if not _quiet and self.output_format not in _MACHINE_OUTPUTS: sys.stdout.write(message) def PrintError(self, message): @@ -1480,6 +1726,13 @@ def Error(filename, linenum, category, confidence, message): elif _cpplint_state.output_format == 'junit': _cpplint_state.AddJUnitFailure(filename, linenum, message, category, confidence) + elif _cpplint_state.output_format in ['sed', 'gsed']: + if message in _SED_FIXUPS: + sys.stdout.write(_cpplint_state.output_format + " -i '%s%s' %s # %s [%s] [%d]\n" % ( + linenum, _SED_FIXUPS[message], filename, message, category, confidence)) + else: + sys.stderr.write('# %s:%s: "%s" [%s] [%d]\n' % ( + filename, linenum, message, category, confidence)) else: final_message = '%s:%s: %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence) @@ -1620,7 +1873,7 @@ def FindNextMultiLineCommentEnd(lines, lineix): def RemoveMultiLineCommentsFromRange(lines, begin, end): """Clears a range of lines for multi-line comments.""" - # Having // dummy comments makes the lines non-empty, so we will not get + # Having // comments makes the lines non-empty, so we will not get # unnecessary blank line warnings later in the code. for i in range(begin, end): lines[i] = '/**/' @@ -1994,7 +2247,7 @@ def CheckForCopyright(filename, lines, error): """Logs an error if no Copyright message appears at the top of the file.""" # We'll say it should occur by line 10. Don't forget there's a - # dummy line at the front. + # placeholder line at the front. for line in xrange(1, min(len(lines), 11)): if re.search(r'Copyright', lines[line], re.I): break else: # means no copyright line was found @@ -2237,16 +2490,22 @@ def CheckHeaderFileIncluded(filename, include_state, error): continue headername = FileInfo(headerfile).RepositoryName() first_include = None + include_uses_unix_dir_aliases = False for section_list in include_state.include_list: for f in section_list: - if headername in f[0] or f[0] in headername: + include_text = f[0] + if "./" in include_text: + include_uses_unix_dir_aliases = True + if headername in include_text or include_text in headername: return if not first_include: first_include = f[1] - error(filename, first_include, 'build/include', 5, - '%s should include its header file %s' % (fileinfo.RepositoryName(), - headername)) + message = '%s should include its header file %s' % (fileinfo.RepositoryName(), headername) + if include_uses_unix_dir_aliases: + message += ". Relative paths like . and .. are not allowed." + + error(filename, first_include, 'build/include', 5, message) def CheckForBadCharacters(filename, lines, error): @@ -2912,7 +3171,7 @@ def Update(self, filename, clean_lines, linenum, error): # }; class_decl_match = Match( r'^(\s*(?:template\s*<[\w\s<>,:=]*>\s*)?' - r'(class|struct)\s+(?:[A-Z_]+\s+)*(\w+(?:::\w+)*))' + r'(class|struct)\s+(?:[a-zA-Z0-9_]+\s+)*(\w+(?:::\w+)*))' r'(.*)$', line) if (class_decl_match and (not self.stack or self.stack[-1].open_parentheses == 0)): @@ -3546,9 +3805,10 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): # get rid of comments and strings line = clean_lines.elided[linenum] - # You shouldn't have spaces before your brackets, except maybe after - # 'delete []', 'return []() {};', or 'auto [abc, ...] = ...;'. - if Search(r'\w\s+\[', line) and not Search(r'(?:auto&?|delete|return)\s+\[', line): + # You shouldn't have spaces before your brackets, except for C++11 attributes + # or maybe after 'delete []', 'return []() {};', or 'auto [abc, ...] = ...;'. + if (Search(r'\w\s+\[(?!\[)', line) and + not Search(r'(?:auto&?|delete|return)\s+\[', line)): error(filename, linenum, 'whitespace/braces', 5, 'Extra space before [') @@ -4129,9 +4389,9 @@ def CheckTrailingSemicolon(filename, clean_lines, linenum, error): # Block bodies should not be followed by a semicolon. Due to C++11 # brace initialization, there are more places where semicolons are - # required than not, so we use a whitelist approach to check these - # rather than a blacklist. These are the places where "};" should - # be replaced by just "}": + # required than not, so we explicitly list the allowed rules rather + # than listing the disallowed ones. These are the places where "};" + # should be replaced by just "}": # 1. Some flavor of block following closing parenthesis: # for (;;) {}; # while (...) {}; @@ -4187,11 +4447,11 @@ def CheckTrailingSemicolon(filename, clean_lines, linenum, error): # - INTERFACE_DEF # - EXCLUSIVE_LOCKS_REQUIRED, SHARED_LOCKS_REQUIRED, LOCKS_EXCLUDED: # - # We implement a whitelist of safe macros instead of a blacklist of + # We implement a list of safe macros instead of a list of # unsafe macros, even though the latter appears less frequently in # google code and would have been easier to implement. This is because - # the downside for getting the whitelist wrong means some extra - # semicolons, while the downside for getting the blacklist wrong + # the downside for getting the allowed checks wrong means some extra + # semicolons, while the downside for getting disallowed checks wrong # would result in compile errors. # # In addition to macros, we also don't want to warn on @@ -4677,7 +4937,7 @@ def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state, # if(match($0, " <<")) complain = 0; # if(match(prev, " +for \\(")) complain = 0; # if(prevodd && match(prevprev, " +for \\(")) complain = 0; - scope_or_label_pattern = r'\s*\w+\s*:\s*\\?$' + scope_or_label_pattern = r'\s*(?:public|private|protected|signals)(?:\s+(?:slots\s*)?)?:\s*\\?$' classinfo = nesting_state.InnermostClass() initial_spaces = 0 cleansed_line = clean_lines.elided[linenum] @@ -4804,13 +5064,14 @@ def _DropCommonSuffixes(filename): return os.path.splitext(filename)[0] -def _ClassifyInclude(fileinfo, include, is_system): +def _ClassifyInclude(fileinfo, include, used_angle_brackets, include_order="default"): """Figures out what kind of header 'include' is. Args: fileinfo: The current file cpplint is running over. A FileInfo instance. include: The path to a #included file. - is_system: True if the #include used <> rather than "". + used_angle_brackets: True if the #include used <> rather than "". + include_order: "default" or other value allowed in program arguments Returns: One of the _XXX_HEADER constants. @@ -4820,6 +5081,8 @@ def _ClassifyInclude(fileinfo, include, is_system): _C_SYS_HEADER >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'string', True) _CPP_SYS_HEADER + >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/foo.h', True, "standardcfirst") + _OTHER_SYS_HEADER >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/foo.h', False) _LIKELY_MY_HEADER >>> _ClassifyInclude(FileInfo('foo/foo_unknown_extension.cc'), @@ -4830,17 +5093,23 @@ def _ClassifyInclude(fileinfo, include, is_system): """ # This is a list of all standard c++ header files, except # those already checked for above. - is_cpp_h = include in _CPP_HEADERS + is_cpp_header = include in _CPP_HEADERS + + # Mark include as C header if in list or in a known folder for standard-ish C headers. + is_std_c_header = (include_order == "default") or (include in _C_HEADERS + # additional linux glibc header folders + or Search(r'(?:%s)\/.*\.h' % "|".join(C_STANDARD_HEADER_FOLDERS), include)) # Headers with C++ extensions shouldn't be considered C system headers - if is_system and os.path.splitext(include)[1] in ['.hpp', '.hxx', '.h++']: - is_system = False + is_system = used_angle_brackets and not os.path.splitext(include)[1] in ['.hpp', '.hxx', '.h++'] if is_system: - if is_cpp_h: + if is_cpp_header: return _CPP_SYS_HEADER - else: + if is_std_c_header: return _C_SYS_HEADER + else: + return _OTHER_SYS_HEADER # If the target file and the include we're checking share a # basename when we drop common extensions, and the include @@ -4905,7 +5174,7 @@ def CheckIncludeLine(filename, clean_lines, linenum, include_state, error): match = _RE_PATTERN_INCLUDE.search(line) if match: include = match.group(2) - is_system = (match.group(1) == '<') + used_angle_brackets = (match.group(1) == '<') duplicate_line = include_state.FindHeader(include) if duplicate_line >= 0: error(filename, linenum, 'build/include', 4, @@ -4946,7 +5215,7 @@ def CheckIncludeLine(filename, clean_lines, linenum, include_state, error): # track of the highest type seen, and complains if we see a # lower type after that. error_message = include_state.CheckNextIncludeOrder( - _ClassifyInclude(fileinfo, include, is_system)) + _ClassifyInclude(fileinfo, include, used_angle_brackets, _include_order)) if error_message: error(filename, linenum, 'build/include_order', 4, '%s. Should be: %s.h, c system, c++ system, other.' % @@ -5200,7 +5469,7 @@ def CheckLanguage(filename, clean_lines, linenum, file_extension, if (IsHeaderExtension(file_extension) and Search(r'\bnamespace\s*{', line) and line[-1] != '\\'): - error(filename, linenum, 'build/namespaces', 4, + error(filename, linenum, 'build/namespaces_headers', 4, 'Do not use unnamed namespaces in header files. See ' 'https://google.github.io/styleguide/cppguide.html#Namespaces' ' for more information.') @@ -5490,19 +5759,19 @@ def CheckForNonConstReference(filename, clean_lines, linenum, # # We also accept & in static_assert, which looks like a function but # it's actually a declaration expression. - whitelisted_functions = (r'(?:[sS]wap(?:<\w:+>)?|' + allowed_functions = (r'(?:[sS]wap(?:<\w:+>)?|' r'operator\s*[<>][<>]|' r'static_assert|COMPILE_ASSERT' r')\s*\(') - if Search(whitelisted_functions, line): + if Search(allowed_functions, line): return elif not Search(r'\S+\([^)]*$', line): - # Don't see a whitelisted function on this line. Actually we + # Don't see an allowed function on this line. Actually we # didn't see any function name on this line, so this is likely a # multi-line parameter list. Try a bit harder to catch this case. for i in xrange(2): if (linenum > i and - Search(whitelisted_functions, clean_lines.elided[linenum - i - 1])): + Search(allowed_functions, clean_lines.elided[linenum - i - 1])): return decls = ReplaceAll(r'{[^}]*}', ' ', line) # exclude function body @@ -6395,6 +6664,8 @@ def ProcessConfigOverrides(filename): _root = os.path.join(os.path.dirname(cfg_file), val) elif name == 'headers': ProcessHppHeadersOption(val) + elif name == 'includeorder': + ProcessIncludeOrderOption(val) else: _cpplint_state.PrintError( 'Invalid configuration option (%s) in file %s\n' % @@ -6561,6 +6832,7 @@ def ParseArguments(args): 'exclude=', 'recursive', 'headers=', + 'includeorder=', 'quiet']) except getopt.GetoptError: PrintUsage('Invalid arguments.') @@ -6578,9 +6850,9 @@ def ParseArguments(args): if opt == '--version': PrintVersion() elif opt == '--output': - if val not in ('emacs', 'vs7', 'eclipse', 'junit'): + if val not in ('emacs', 'vs7', 'eclipse', 'junit', 'sed', 'gsed'): PrintUsage('The only allowed output formats are emacs, vs7, eclipse ' - 'and junit.') + 'sed, gsed and junit.') output_format = val elif opt == '--quiet': quiet = True @@ -6617,6 +6889,8 @@ def ParseArguments(args): ProcessHppHeadersOption(val) elif opt == '--recursive': recursive = True + elif opt == '--includeorder': + ProcessIncludeOrderOption(val) if not filenames: PrintUsage('No files were specified.') @@ -6633,6 +6907,7 @@ def ParseArguments(args): _SetFilters(filters) _SetCountingStyle(counting_style) + filenames.sort() return filenames def _ExpandDirectories(filenames): diff --git a/tools/create_expfile.sh b/tools/create_expfile.sh index 1daed4b1984068..cac20da721b06a 100755 --- a/tools/create_expfile.sh +++ b/tools/create_expfile.sh @@ -37,15 +37,15 @@ echo "Searching $1 to write out expfile to $2" # This special sequence must be at the start of the exp file. -echo "#!." > $2.tmp +echo "#!." > "$2.tmp" # Pull the symbols from the .a files. -find $1 -name "*.a" | grep -v gtest \ +find "$1" -name "*.a" | grep -v gtest \ | xargs nm -Xany -BCpg \ | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' \ - | sort -u >> $2.tmp + | sort -u >> "$2.tmp" -mv -f $2.tmp $2 +mv -f "$2.tmp" "$2" diff --git a/tools/doc/addon-verify.js b/tools/doc/addon-verify.js index c4dfdba9c4d3ad..8093439d6d925c 100644 --- a/tools/doc/addon-verify.js +++ b/tools/doc/addon-verify.js @@ -11,13 +11,14 @@ const { resolve } = require('path'); const vfile = require('to-vfile'); const unified = require('unified'); const remarkParse = require('remark-parse'); +const gfm = require('remark-gfm'); const rootDir = resolve(__dirname, '..', '..'); const doc = resolve(rootDir, 'doc', 'api', 'addons.md'); const verifyDir = resolve(rootDir, 'test', 'addons'); const file = vfile.readSync(doc, 'utf8'); -const tree = unified().use(remarkParse).parse(file); +const tree = unified().use(remarkParse).use(gfm).parse(file); const addons = {}; let id = 0; let currentHeader; diff --git a/tools/doc/apilinks.js b/tools/doc/apilinks.js index 461805dac3a811..c9ce87ba08ad48 100644 --- a/tools/doc/apilinks.js +++ b/tools/doc/apilinks.js @@ -54,9 +54,11 @@ inputs.forEach((file) => { // Parse source. const source = fs.readFileSync(file, 'utf8'); - const ast = acorn.parse( - source, - { allowReturnOutsideFunction: true, ecmaVersion: 10, locations: true }); + const ast = acorn.parse(source, { + allowReturnOutsideFunction: true, + ecmaVersion: 'latest', + locations: true, + }); const program = ast.body; // Build link diff --git a/tools/doc/checkLinks.js b/tools/doc/checkLinks.js index 19247c9340e75a..cdee7ca600d0c3 100644 --- a/tools/doc/checkLinks.js +++ b/tools/doc/checkLinks.js @@ -45,6 +45,7 @@ function findMarkdownFilesRecursively(dirPath) { function checkFile(path) { const tree = unified() .use(require('remark-parse')) + .use(require('remark-gfm')) .parse(fs.readFileSync(path)); const base = pathToFileURL(path); diff --git a/tools/doc/generate.js b/tools/doc/generate.js index 007a0d48eed347..f49acb6207c9b4 100644 --- a/tools/doc/generate.js +++ b/tools/doc/generate.js @@ -25,6 +25,7 @@ const { promises: fs } = require('fs'); const path = require('path'); const unified = require('unified'); const markdown = require('remark-parse'); +const gfm = require('remark-gfm'); const remark2rehype = require('remark-rehype'); const raw = require('rehype-raw'); const htmlStringify = require('rehype-stringify'); @@ -82,6 +83,7 @@ async function main() { const content = await unified() .use(replaceLinks, { filename, linksMapper }) .use(markdown) + .use(gfm) .use(html.preprocessText, { nodeVersion }) .use(json.jsonAPI, { filename }) .use(html.firstHeader) diff --git a/tools/doc/html.js b/tools/doc/html.js index b74b8ac15462c9..d35fd47b601e09 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -27,6 +27,7 @@ const unified = require('unified'); const find = require('unist-util-find'); const visit = require('unist-util-visit'); const markdown = require('remark-parse'); +const gfm = require('remark-gfm'); const remark2rehype = require('remark-rehype'); const raw = require('rehype-raw'); const htmlStringify = require('rehype-stringify'); @@ -56,6 +57,7 @@ const gtocMD = fs.readFileSync(gtocPath, 'utf8') .replace(/^/gms, ''); const gtocHTML = unified() .use(markdown) + .use(gfm) .use(remark2rehype, { allowDangerousHtml: true }) .use(raw) .use(navClasses) @@ -218,7 +220,7 @@ function preprocessElements({ filename }) { // Do not link to the section we are already in. const noLinking = filename.includes('documentation') && - heading !== null && heading.children[0].value === 'Stability Index'; + heading !== null && heading.children[0].value === 'Stability index'; // Collapse blockquote and paragraph into a single node node.type = 'paragraph'; @@ -283,6 +285,7 @@ function parseYAML(text) { meta.changes.forEach((change) => { const description = unified() .use(markdown) + .use(gfm) .use(remark2rehype, { allowDangerousHtml: true }) .use(raw) .use(htmlStringify) @@ -381,6 +384,7 @@ function buildToc({ filename, apilinks }) { file.toc = unified() .use(markdown) + .use(gfm) .use(remark2rehype, { allowDangerousHtml: true }) .use(raw) .use(htmlStringify) diff --git a/tools/doc/package-lock.json b/tools/doc/package-lock.json index 36514e5989c7b7..40c07c350b3e24 100644 --- a/tools/doc/package-lock.json +++ b/tools/doc/package-lock.json @@ -1,9 +1,1197 @@ { "name": "node-doc-generator", "version": "0.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "node-doc-generator", + "version": "0.0.0", + "bin": { + "node-doc-generator": "generate.js" + }, + "devDependencies": { + "highlight.js": "10.4.1", + "js-yaml": "3.14.0", + "rehype-raw": "5.0.0", + "rehype-stringify": "8.0.0", + "remark-gfm": "^1.0.0", + "remark-html": "13.0.1", + "remark-parse": "^9.0.0", + "remark-rehype": "8.0.0", + "to-vfile": "6.1.0", + "unified": "9.2.0", + "unist-util-find": "^1.0.2", + "unist-util-select": "3.0.3", + "unist-util-visit": "2.0.3" + }, + "engines": { + "node": ">=12.10.0" + } + }, + "node_modules/@types/hast": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.1.tgz", + "integrity": "sha512-viwwrB+6xGzw+G1eWpF9geV3fnsDgXqHG+cqgiHrvQfDUW5hzhCyV7Sy3UJxhfRFBsgky2SSW33qi/YrIkjX5Q==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/mdast": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.3.tgz", + "integrity": "sha512-SXPBMnFVQg1s00dlMCc/jCdvPqdE4mXaMMCeRlxLDmTAEoegHT53xKtkDnzDTOcmMHUfcjyf36/YYZ6SxRdnsw==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/parse5": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz", + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==", + "dev": true + }, + "node_modules/@types/unist": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", + "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "node_modules/ccount": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.4.tgz", + "integrity": "sha512-HRcDxZuZqMx3/a+qrzxdBKBPUpxWEq9xw2OPZ3a/174ihfrQKVsFhqtthBInFy1zZ9GgZyFXOatNujm8M+El3g==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/css-selector-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.4.1.tgz", + "integrity": "sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/hast-to-hyperscript": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", + "integrity": "sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.3", + "comma-separated-tokens": "^1.0.0", + "property-information": "^5.3.0", + "space-separated-tokens": "^1.0.0", + "style-to-object": "^0.3.0", + "unist-util-is": "^4.0.0", + "web-namespaces": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz", + "integrity": "sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA==", + "dev": true, + "dependencies": { + "@types/parse5": "^5.0.0", + "hastscript": "^6.0.0", + "property-information": "^5.0.0", + "vfile": "^4.0.0", + "vfile-location": "^3.2.0", + "web-namespaces": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-is-element": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz", + "integrity": "sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-parse-selector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.0.2.tgz", + "integrity": "sha512-m7IlmqO8cytmG3EIMDMXUG8LjO2uyApWcxwL6apsGvikIClgykFg3UYps4rnt4kUpY3j8Mc7ANJ8zW6KPPLb+w==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "hast-util-from-parse5": "^6.0.0", + "hast-util-to-parse5": "^6.0.0", + "html-void-elements": "^1.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^3.0.0", + "vfile": "^4.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-sanitize": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-3.0.2.tgz", + "integrity": "sha512-+2I0x2ZCAyiZOO/sb4yNLFmdwPBnyJ4PBkVTUMKMqBwYNA+lXSgOmoRXlJFazoyid9QPogRRKgKhVEodv181sA==", + "dev": true, + "dependencies": { + "xtend": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-html": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-7.1.2.tgz", + "integrity": "sha512-pu73bvORzdF6XZgwl9eID/0RjBb/jtRfoGRRSykpR1+o9rCdiAHpgkSukZsQBRlIqMg6ylAcd7F0F7myJUb09Q==", + "dev": true, + "dependencies": { + "ccount": "^1.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-is-element": "^1.0.0", + "hast-util-whitespace": "^1.0.0", + "html-void-elements": "^1.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0", + "stringify-entities": "^3.0.1", + "unist-util-is": "^4.0.0", + "xtend": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-parse5": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz", + "integrity": "sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ==", + "dev": true, + "dependencies": { + "hast-to-hyperscript": "^9.0.0", + "property-information": "^5.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-1.0.4.tgz", + "integrity": "sha512-I5GTdSfhYfAPNztx2xJRQpG8cuDSNt599/7YUn7Gx/WxNMsG+a835k97TDkFgk123cwjfwINaZknkKkphx/f2A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/highlight.js": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.1.tgz", + "integrity": "sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/html-void-elements": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz", + "integrity": "sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/inline-style-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", + "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", + "dev": true + }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/lodash.iteratee": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.iteratee/-/lodash.iteratee-4.7.0.tgz", + "integrity": "sha1-vkF32yiajMw8CZDx2ya1si/BVUw=", + "dev": true + }, + "node_modules/longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/markdown-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "dev": true, + "dependencies": { + "repeat-string": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-definitions": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", + "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==", + "dev": true, + "dependencies": { + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.1.tgz", + "integrity": "sha512-qJXNcFcuCSPqUF0Tb0uYcFDIq67qwB3sxo9RPdf9vG8T90ViKnksFqdB/Coq2a7sTnxL/Ify2y7aIQXDkQFH0w==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^1.0.0", + "micromark": "~2.10.0", + "parse-entities": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown/node_modules/mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-0.1.0.tgz", + "integrity": "sha512-HLfygQL6HdhJhFbLta4Ki9hClrzyAxRjyRvpm5caN65QZL+NyHPmqFlnF9vm1Rn58JT2+AbLwNcEDY4MEvkk8Q==", + "dev": true, + "dependencies": { + "mdast-util-gfm-autolink-literal": "^0.1.0", + "mdast-util-gfm-strikethrough": "^0.2.0", + "mdast-util-gfm-table": "^0.1.0", + "mdast-util-gfm-task-list-item": "^0.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-autolink-literal": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-0.1.1.tgz", + "integrity": "sha512-gJ2xSpqKCetSr22GEWpZH3f5ffb4pPn/72m4piY0v7T/S+O7n7rw+sfoPLhb2b4O7WdnERoYdALRcmD68FMtlw==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-strikethrough": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-0.2.2.tgz", + "integrity": "sha512-T37ZbaokJcRbHROXmoVAieWnesPD5N21tv2ifYzaGRLbkh1gknItUGhZzHefUn5Zc/eaO/iTDSAFOBrn/E8kWw==", + "dev": true, + "dependencies": { + "mdast-util-to-markdown": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-table": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-0.1.4.tgz", + "integrity": "sha512-T4xFSON9kUb/IpYA5N+KGWcsdGczAvILvKiXQwUGind6V9fvjPCR9yhZnIeaLdBWXaz3m/Gq77ZtuLMjtFR4IQ==", + "dev": true, + "dependencies": { + "markdown-table": "^2.0.0", + "mdast-util-to-markdown": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-task-list-item": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-0.1.5.tgz", + "integrity": "sha512-6O0bt34r+e7kYjeSwedhjDPYraspKIYKbhvhQEEioL7gSmXDxhN7WQW2KoxhVMpNzjNc03yC7K5KH6NHlz2jOA==", + "dev": true, + "dependencies": { + "mdast-util-to-markdown": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz", + "integrity": "sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "mdast-util-definitions": "^4.0.0", + "mdurl": "^1.0.0", + "unist-builder": "^2.0.0", + "unist-util-generated": "^1.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.5.4.tgz", + "integrity": "sha512-0jQTkbWYx0HdEA/h++7faebJWr5JyBoBeiRf0u3F4F3QtnyyGaWIsOwo749kRb1ttKrLLr+wRtOkfou9yB0p6A==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, + "node_modules/micromark": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.10.1.tgz", + "integrity": "sha512-fUuVF8sC1X7wsCS29SYQ2ZfIZYbTymp0EYr6sab3idFjigFFjGa5UwoniPlV9tAgntjuapW1t9U+S0yDYeGKHQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "node_modules/micromark-extension-gfm": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.1.tgz", + "integrity": "sha512-lJlhcOqzoJdjQg+LMumVHdUQ61LjtqGdmZtrAdfvatRUnJTqZlRwXXHdLQgNDYlFw4mycZ4NSTKlya5QcQXl1A==", + "dev": true, + "dependencies": { + "micromark": "~2.10.0", + "micromark-extension-gfm-autolink-literal": "~0.5.0", + "micromark-extension-gfm-strikethrough": "~0.6.0", + "micromark-extension-gfm-table": "~0.4.0", + "micromark-extension-gfm-tagfilter": "~0.3.0", + "micromark-extension-gfm-task-list-item": "~0.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.1.tgz", + "integrity": "sha512-j30923tDp0faCNDjwqe4cMi+slegbGfc3VEAExEU8d54Q/F6pR6YxCVH+6xV0ItRoj3lCn1XkUWcy6FC3S9BOw==", + "dev": true, + "dependencies": { + "micromark": "~2.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.2.tgz", + "integrity": "sha512-aehEEqtTn3JekJNwZZxa7ZJVfzmuaWp4ew6x6sl3VAKIwdDZdqYeYSQIrNKwNgH7hX0g56fAwnSDLusJggjlCQ==", + "dev": true, + "dependencies": { + "micromark": "~2.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.1.tgz", + "integrity": "sha512-xVpqOnfFaa2OtC/Y7rlt4tdVFlUHdoLH3RXAZgb/KP3DDyKsAOx6BRS3UxiiyvmD/p2l6VUpD4bMIniuP4o4JA==", + "dev": true, + "dependencies": { + "micromark": "~2.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-0.3.0.tgz", + "integrity": "sha512-9GU0xBatryXifL//FJH+tAZ6i240xQuFrSL7mYi8f4oZSbc+NvXjkrHemeYP0+L4ZUT+Ptz3b95zhUZnMtoi/Q==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.2.tgz", + "integrity": "sha512-cm8lYS10YAqeXE9B27TK3u1Ihumo3H9p/3XumT+jp8vSuSbSpFIJe0bDi2kq4YAAIxtcTzUOxhEH4ko2/NYDkQ==", + "dev": true, + "dependencies": { + "micromark": "~2.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/not": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/not/-/not-0.1.0.tgz", + "integrity": "sha1-yWkcF0bFXc++VMvYvU/wQbwrUZ0=", + "dev": true + }, + "node_modules/nth-check": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", + "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "node_modules/property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "dev": true, + "dependencies": { + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/rehype-raw": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-5.0.0.tgz", + "integrity": "sha512-q/MOBj4fs1WF/LSCh5uOtNhnm5OESuDcSvq1mDQP4/2t6Q52E9MHeVoLeMy9vOn93BEcgVBm4FCokcK2iXRDvA==", + "dev": true, + "dependencies": { + "hast-util-raw": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-stringify": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/rehype-stringify/-/rehype-stringify-8.0.0.tgz", + "integrity": "sha512-VkIs18G0pj2xklyllrPSvdShAV36Ff3yE5PUO9u36f6+2qJFnn22Z5gKwBOwgXviux4UC7K+/j13AnZfPICi/g==", + "dev": true, + "dependencies": { + "hast-util-to-html": "^7.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-gfm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-1.0.0.tgz", + "integrity": "sha512-KfexHJCiqvrdBZVbQ6RopMZGwaXz6wFJEfByIuEwGf0arvITHjiKKZ1dpXujjH9KZdm1//XJQwgfnJ3lmXaDPA==", + "dev": true, + "dependencies": { + "mdast-util-gfm": "^0.1.0", + "micromark-extension-gfm": "^0.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-html": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-13.0.1.tgz", + "integrity": "sha512-K5KQCXWVz+harnyC+UVM/J9eJWCgjYRqFeZoZf2NgP0iFbuuw/RgMZv3MA34b/OEpGnstl3oiOUtZzD3tJ+CBw==", + "dev": true, + "dependencies": { + "hast-util-sanitize": "^3.0.0", + "hast-util-to-html": "^7.0.0", + "mdast-util-to-hast": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "dev": true, + "dependencies": { + "mdast-util-from-markdown": "^0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-rehype": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-8.0.0.tgz", + "integrity": "sha512-gVvOH02TMFqXOWoL6iXU7NXMsDJguNkNuMrzfkQeA4V6WCyHQnOKptn+IQBVVPuIH2sMJBwo8hlrmtn1MLTh9w==", + "dev": true, + "dependencies": { + "mdast-util-to-hast": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/stringify-entities": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-3.1.0.tgz", + "integrity": "sha512-3FP+jGMmMV/ffZs86MoghGqAoqXAdxLrJP4GUdrDN1aIScYih5tuIO3eF4To5AJZ79KDZ8Fpdy7QJnK8SsL1Vg==", + "dev": true, + "dependencies": { + "character-entities-html4": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/style-to-object": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", + "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", + "dev": true, + "dependencies": { + "inline-style-parser": "0.1.1" + } + }, + "node_modules/to-vfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/to-vfile/-/to-vfile-6.1.0.tgz", + "integrity": "sha512-BxX8EkCxOAZe+D/ToHdDsJcVI4HqQfmw0tCkp31zf3dNP/XWIAjU4CmeuSwsSoOzOTqHPOL0KUzyZqJplkD0Qw==", + "dev": true, + "dependencies": { + "is-buffer": "^2.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unified": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz", + "integrity": "sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==", + "dev": true, + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-builder": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz", + "integrity": "sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-find": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unist-util-find/-/unist-util-find-1.0.2.tgz", + "integrity": "sha512-ft06UDYzqi9o9RmGP0sZWI/zvLLQiBW2/MD+rW6mDqbOWDcmknGX9orQPspfuGRYWr8eSJAmfsBcvOpfGRJseA==", + "dev": true, + "dependencies": { + "lodash.iteratee": "^4.5.0", + "unist-util-visit": "^1.1.0" + } + }, + "node_modules/unist-util-find/node_modules/unist-util-is": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", + "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==", + "dev": true + }, + "node_modules/unist-util-find/node_modules/unist-util-visit": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", + "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", + "dev": true, + "dependencies": { + "unist-util-visit-parents": "^2.0.0" + } + }, + "node_modules/unist-util-find/node_modules/unist-util-visit-parents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz", + "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==", + "dev": true, + "dependencies": { + "unist-util-is": "^3.0.0" + } + }, + "node_modules/unist-util-generated": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.4.tgz", + "integrity": "sha512-3dF39j/u423v4BBQrk1AQ2Ve1FxY5W3JKwXxVFzBODQ6WEvccguhgp802qQLKSnxPODE6WuRZtV+ohlUg4meBA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz", + "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-select": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-3.0.3.tgz", + "integrity": "sha512-DnbjRvotPiDGsUaw9knEvprwD6conwGtaArUn5niG9yBQvWQyHMmUJ4p/vXXzLBm+8XyiTr3pcuw9n3TlF6SYg==", + "dev": true, + "dependencies": { + "css-selector-parser": "^1.0.0", + "not": "^0.1.0", + "nth-check": "^2.0.0", + "unist-util-is": "^4.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/web-namespaces": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", + "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + } + }, "dependencies": { + "@types/hast": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.1.tgz", + "integrity": "sha512-viwwrB+6xGzw+G1eWpF9geV3fnsDgXqHG+cqgiHrvQfDUW5hzhCyV7Sy3UJxhfRFBsgky2SSW33qi/YrIkjX5Q==", + "dev": true, + "requires": { + "@types/unist": "*" + } + }, "@types/mdast": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.3.tgz", @@ -13,6 +1201,12 @@ "@types/unist": "*" } }, + "@types/parse5": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz", + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==", + "dev": true + }, "@types/unist": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", @@ -41,9 +1235,9 @@ "dev": true }, "ccount": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.5.tgz", - "integrity": "sha512-MOli1W+nfbPLlKEhInaxhRdp7KVLFxLN5ykwzHgLsLI3H3gs5jjFAK4Eoj3OzzcxCtumDaI8onoVDeQyWaNTkw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", "dev": true }, "character-entities": { @@ -70,12 +1264,6 @@ "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", "dev": true }, - "collapse-white-space": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz", - "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==", - "dev": true - }, "comma-separated-tokens": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", @@ -88,6 +1276,15 @@ "integrity": "sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==", "dev": true }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -100,46 +1297,33 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, "hast-to-hyperscript": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-7.0.4.tgz", - "integrity": "sha512-vmwriQ2H0RPS9ho4Kkbf3n3lY436QKLq6VaGA1pzBh36hBi3tm1DO9bR+kaJIbpT10UqaANDkMjxvjVfr+cnOA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", + "integrity": "sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA==", "dev": true, "requires": { + "@types/unist": "^2.0.3", "comma-separated-tokens": "^1.0.0", "property-information": "^5.3.0", "space-separated-tokens": "^1.0.0", - "style-to-object": "^0.2.1", - "unist-util-is": "^3.0.0", - "web-namespaces": "^1.1.2" + "style-to-object": "^0.3.0", + "unist-util-is": "^4.0.0", + "web-namespaces": "^1.0.0" } }, "hast-util-from-parse5": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-5.0.3.tgz", - "integrity": "sha512-gOc8UB99F6eWVWFtM9jUikjN7QkWxB3nY0df5Z0Zq1/Nkwl5V4hAAsl0tmwlgWl/1shlTF8DnNYLO8X6wRV9pA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz", + "integrity": "sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA==", "dev": true, "requires": { - "ccount": "^1.0.3", - "hastscript": "^5.0.0", + "@types/parse5": "^5.0.0", + "hastscript": "^6.0.0", "property-information": "^5.0.0", - "web-namespaces": "^1.1.2", - "xtend": "^4.0.1" + "vfile": "^4.0.0", + "vfile-location": "^3.2.0", + "web-namespaces": "^1.0.0" } }, "hast-util-is-element": { @@ -149,40 +1333,42 @@ "dev": true }, "hast-util-parse-selector": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.4.tgz", - "integrity": "sha512-gW3sxfynIvZApL4L07wryYF4+C9VvH3AUi7LAnVXV4MneGEgwOByXvFo18BgmTWnm7oHAe874jKbIB1YhHSIzA==", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", "dev": true }, "hast-util-raw": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-5.0.2.tgz", - "integrity": "sha512-3ReYQcIHmzSgMq8UrDZHFL0oGlbuVGdLKs8s/Fe8BfHFAyZDrdv1fy/AGn+Fim8ZuvAHcJ61NQhVMtyfHviT/g==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.0.2.tgz", + "integrity": "sha512-m7IlmqO8cytmG3EIMDMXUG8LjO2uyApWcxwL6apsGvikIClgykFg3UYps4rnt4kUpY3j8Mc7ANJ8zW6KPPLb+w==", "dev": true, "requires": { - "hast-util-from-parse5": "^5.0.0", - "hast-util-to-parse5": "^5.0.0", + "@types/hast": "^2.0.0", + "hast-util-from-parse5": "^6.0.0", + "hast-util-to-parse5": "^6.0.0", "html-void-elements": "^1.0.0", - "parse5": "^5.0.0", + "parse5": "^6.0.0", "unist-util-position": "^3.0.0", + "vfile": "^4.0.0", "web-namespaces": "^1.0.0", "xtend": "^4.0.0", "zwitch": "^1.0.0" } }, "hast-util-sanitize": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-3.0.0.tgz", - "integrity": "sha512-gxsM24ARtuulsrWEj8QtVM6FNeAEHklF/t7TEIWvX1wuQcoAQtJtEUcT8t0os4uxCUqh1epX/gTi8fp8gNKvCA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-3.0.2.tgz", + "integrity": "sha512-+2I0x2ZCAyiZOO/sb4yNLFmdwPBnyJ4PBkVTUMKMqBwYNA+lXSgOmoRXlJFazoyid9QPogRRKgKhVEodv181sA==", "dev": true, "requires": { "xtend": "^4.0.0" } }, "hast-util-to-html": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-7.1.1.tgz", - "integrity": "sha512-Ujqj0hGuo3dIQKilkbauAv5teOqPvhaSLEgs1lgApFT0812e114KiffV8XfE4ttR8dRPqxNOIJOMu6SKOVOGlg==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-7.1.2.tgz", + "integrity": "sha512-pu73bvORzdF6XZgwl9eID/0RjBb/jtRfoGRRSykpR1+o9rCdiAHpgkSukZsQBRlIqMg6ylAcd7F0F7myJUb09Q==", "dev": true, "requires": { "ccount": "^1.0.0", @@ -195,23 +1381,15 @@ "stringify-entities": "^3.0.1", "unist-util-is": "^4.0.0", "xtend": "^4.0.0" - }, - "dependencies": { - "unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - } } }, "hast-util-to-parse5": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-5.1.2.tgz", - "integrity": "sha512-ZgYLJu9lYknMfsBY0rBV4TJn2xiwF1fXFFjbP6EE7S0s5mS8LIKBVWzhA1MeIs1SWW6GnnE4In6c3kPb+CWhog==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz", + "integrity": "sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ==", "dev": true, "requires": { - "hast-to-hyperscript": "^7.0.0", + "hast-to-hyperscript": "^9.0.0", "property-information": "^5.0.0", "web-namespaces": "^1.0.0", "xtend": "^4.0.0", @@ -225,11 +1403,12 @@ "dev": true }, "hastscript": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-5.1.2.tgz", - "integrity": "sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", "dev": true, "requires": { + "@types/hast": "^2.0.0", "comma-separated-tokens": "^1.0.0", "hast-util-parse-selector": "^2.0.0", "property-information": "^5.0.0", @@ -237,9 +1416,9 @@ } }, "highlight.js": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.1.0.tgz", - "integrity": "sha512-e8aO/LUHDoxW4ntyKQf0/T3OtIZPhsfTr8XRuOq+FW5VdWEg/UDAeArzKF/22BaNZp6hPi/Zu/XQlTLOGLix3Q==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.1.tgz", + "integrity": "sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==", "dev": true }, "html-void-elements": { @@ -248,12 +1427,6 @@ "integrity": "sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==", "dev": true }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, "inline-style-parser": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", @@ -277,9 +1450,9 @@ } }, "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true }, "is-decimal": { @@ -300,18 +1473,6 @@ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, - "is-whitespace-character": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", - "integrity": "sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==", - "dev": true - }, - "is-word-character": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz", - "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==", - "dev": true - }, "js-yaml": { "version": "3.14.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", @@ -329,41 +1490,104 @@ "dev": true }, "longest-streak": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-1.0.0.tgz", - "integrity": "sha1-0GWXxNTDG1LMsfXY+P5xSOr9aWU=", - "dev": true - }, - "markdown-escapes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz", - "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", "dev": true }, "markdown-table": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-0.4.0.tgz", - "integrity": "sha1-iQwsGzv+g/sA5BKbjkz+ZFJw+dE=", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "dev": true, + "requires": { + "repeat-string": "^1.0.0" + } }, "mdast-util-definitions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-3.0.1.tgz", - "integrity": "sha512-BAv2iUm/e6IK/b2/t+Fx69EL/AGcq/IG2S+HxHjDJGfLJtd6i9SZUS76aC9cig+IEucsqxKTR0ot3m933R3iuA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", + "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==", "dev": true, "requires": { "unist-util-visit": "^2.0.0" } }, + "mdast-util-from-markdown": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.1.tgz", + "integrity": "sha512-qJXNcFcuCSPqUF0Tb0uYcFDIq67qwB3sxo9RPdf9vG8T90ViKnksFqdB/Coq2a7sTnxL/Ify2y7aIQXDkQFH0w==", + "dev": true, + "requires": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^1.0.0", + "micromark": "~2.10.0", + "parse-entities": "^2.0.0" + }, + "dependencies": { + "mdast-util-to-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==", + "dev": true + } + } + }, + "mdast-util-gfm": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-0.1.0.tgz", + "integrity": "sha512-HLfygQL6HdhJhFbLta4Ki9hClrzyAxRjyRvpm5caN65QZL+NyHPmqFlnF9vm1Rn58JT2+AbLwNcEDY4MEvkk8Q==", + "dev": true, + "requires": { + "mdast-util-gfm-autolink-literal": "^0.1.0", + "mdast-util-gfm-strikethrough": "^0.2.0", + "mdast-util-gfm-table": "^0.1.0", + "mdast-util-gfm-task-list-item": "^0.1.0" + } + }, + "mdast-util-gfm-autolink-literal": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-0.1.1.tgz", + "integrity": "sha512-gJ2xSpqKCetSr22GEWpZH3f5ffb4pPn/72m4piY0v7T/S+O7n7rw+sfoPLhb2b4O7WdnERoYdALRcmD68FMtlw==", + "dev": true + }, + "mdast-util-gfm-strikethrough": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-0.2.2.tgz", + "integrity": "sha512-T37ZbaokJcRbHROXmoVAieWnesPD5N21tv2ifYzaGRLbkh1gknItUGhZzHefUn5Zc/eaO/iTDSAFOBrn/E8kWw==", + "dev": true, + "requires": { + "mdast-util-to-markdown": "^0.5.0" + } + }, + "mdast-util-gfm-table": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-0.1.4.tgz", + "integrity": "sha512-T4xFSON9kUb/IpYA5N+KGWcsdGczAvILvKiXQwUGind6V9fvjPCR9yhZnIeaLdBWXaz3m/Gq77ZtuLMjtFR4IQ==", + "dev": true, + "requires": { + "markdown-table": "^2.0.0", + "mdast-util-to-markdown": "^0.5.0" + } + }, + "mdast-util-gfm-task-list-item": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-0.1.5.tgz", + "integrity": "sha512-6O0bt34r+e7kYjeSwedhjDPYraspKIYKbhvhQEEioL7gSmXDxhN7WQW2KoxhVMpNzjNc03yC7K5KH6NHlz2jOA==", + "dev": true, + "requires": { + "mdast-util-to-markdown": "^0.5.0" + } + }, "mdast-util-to-hast": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-9.1.1.tgz", - "integrity": "sha512-vpMWKFKM2mnle+YbNgDXxx95vv0CoLU0v/l3F5oFAG5DV7qwkZVWA206LsAdOnEVyf5vQcLnb3cWJywu7mUxsQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz", + "integrity": "sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA==", "dev": true, "requires": { "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.3", - "mdast-util-definitions": "^3.0.0", + "@types/unist": "^2.0.0", + "mdast-util-definitions": "^4.0.0", "mdurl": "^1.0.0", "unist-builder": "^2.0.0", "unist-util-generated": "^1.0.0", @@ -371,12 +1595,104 @@ "unist-util-visit": "^2.0.0" } }, + "mdast-util-to-markdown": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.5.4.tgz", + "integrity": "sha512-0jQTkbWYx0HdEA/h++7faebJWr5JyBoBeiRf0u3F4F3QtnyyGaWIsOwo749kRb1ttKrLLr+wRtOkfou9yB0p6A==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + } + }, + "mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true + }, "mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", "dev": true }, + "micromark": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.10.1.tgz", + "integrity": "sha512-fUuVF8sC1X7wsCS29SYQ2ZfIZYbTymp0EYr6sab3idFjigFFjGa5UwoniPlV9tAgntjuapW1t9U+S0yDYeGKHQ==", + "dev": true, + "requires": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "micromark-extension-gfm": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.1.tgz", + "integrity": "sha512-lJlhcOqzoJdjQg+LMumVHdUQ61LjtqGdmZtrAdfvatRUnJTqZlRwXXHdLQgNDYlFw4mycZ4NSTKlya5QcQXl1A==", + "dev": true, + "requires": { + "micromark": "~2.10.0", + "micromark-extension-gfm-autolink-literal": "~0.5.0", + "micromark-extension-gfm-strikethrough": "~0.6.0", + "micromark-extension-gfm-table": "~0.4.0", + "micromark-extension-gfm-tagfilter": "~0.3.0", + "micromark-extension-gfm-task-list-item": "~0.3.0" + } + }, + "micromark-extension-gfm-autolink-literal": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.1.tgz", + "integrity": "sha512-j30923tDp0faCNDjwqe4cMi+slegbGfc3VEAExEU8d54Q/F6pR6YxCVH+6xV0ItRoj3lCn1XkUWcy6FC3S9BOw==", + "dev": true, + "requires": { + "micromark": "~2.10.0" + } + }, + "micromark-extension-gfm-strikethrough": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.2.tgz", + "integrity": "sha512-aehEEqtTn3JekJNwZZxa7ZJVfzmuaWp4ew6x6sl3VAKIwdDZdqYeYSQIrNKwNgH7hX0g56fAwnSDLusJggjlCQ==", + "dev": true, + "requires": { + "micromark": "~2.10.0" + } + }, + "micromark-extension-gfm-table": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.1.tgz", + "integrity": "sha512-xVpqOnfFaa2OtC/Y7rlt4tdVFlUHdoLH3RXAZgb/KP3DDyKsAOx6BRS3UxiiyvmD/p2l6VUpD4bMIniuP4o4JA==", + "dev": true, + "requires": { + "micromark": "~2.10.0" + } + }, + "micromark-extension-gfm-tagfilter": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-0.3.0.tgz", + "integrity": "sha512-9GU0xBatryXifL//FJH+tAZ6i240xQuFrSL7mYi8f4oZSbc+NvXjkrHemeYP0+L4ZUT+Ptz3b95zhUZnMtoi/Q==", + "dev": true + }, + "micromark-extension-gfm-task-list-item": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.2.tgz", + "integrity": "sha512-cm8lYS10YAqeXE9B27TK3u1Ihumo3H9p/3XumT+jp8vSuSbSpFIJe0bDi2kq4YAAIxtcTzUOxhEH4ko2/NYDkQ==", + "dev": true, + "requires": { + "micromark": "~2.10.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "not": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/not/-/not-0.1.0.tgz", @@ -384,21 +1700,12 @@ "dev": true }, "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", + "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", "dev": true, "requires": { - "wrappy": "1" + "boolbase": "^1.0.0" } }, "parse-entities": { @@ -416,27 +1723,27 @@ } }, "parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", "dev": true }, "property-information": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.5.0.tgz", - "integrity": "sha512-RgEbCx2HLa1chNgvChcx+rrCWD0ctBmGSE0M7lVm1yyv4UbvbrWoXp/BkVLZefzjrRBGW8/Js6uh/BnlHXFyjA==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", "dev": true, "requires": { "xtend": "^4.0.0" } }, "rehype-raw": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-4.0.2.tgz", - "integrity": "sha512-xQt94oXfDaO7sK9mJBtsZXkjW/jm6kArCoYN+HqKZ51O19AFHlp3Xa5UfZZ2tJkbpAZzKtgVUYvnconk9IsFuA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-5.0.0.tgz", + "integrity": "sha512-q/MOBj4fs1WF/LSCh5uOtNhnm5OESuDcSvq1mDQP4/2t6Q52E9MHeVoLeMy9vOn93BEcgVBm4FCokcK2iXRDvA==", "dev": true, "requires": { - "hast-util-raw": "^5.0.0" + "hast-util-raw": "^6.0.0" } }, "rehype-stringify": { @@ -448,190 +1755,43 @@ "hast-util-to-html": "^7.1.1" } }, - "remark": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/remark/-/remark-5.1.0.tgz", - "integrity": "sha1-y0Y709vLS5l5STXu4c9x16jjBow=", + "remark-gfm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-1.0.0.tgz", + "integrity": "sha512-KfexHJCiqvrdBZVbQ6RopMZGwaXz6wFJEfByIuEwGf0arvITHjiKKZ1dpXujjH9KZdm1//XJQwgfnJ3lmXaDPA==", "dev": true, "requires": { - "remark-parse": "^1.1.0", - "remark-stringify": "^1.1.0", - "unified": "^4.1.1" - }, - "dependencies": { - "parse-entities": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz", - "integrity": "sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==", - "dev": true, - "requires": { - "character-entities": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "character-reference-invalid": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-hexadecimal": "^1.0.0" - } - }, - "remark-parse": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-1.1.0.tgz", - "integrity": "sha1-w8oQ+ajaBGFcKPCapOMEUQUm7CE=", - "dev": true, - "requires": { - "collapse-white-space": "^1.0.0", - "extend": "^3.0.0", - "parse-entities": "^1.0.2", - "repeat-string": "^1.5.4", - "trim": "0.0.1", - "trim-trailing-lines": "^1.0.0", - "unherit": "^1.0.4", - "unist-util-remove-position": "^1.0.0", - "vfile-location": "^2.0.0" - } - }, - "unified": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/unified/-/unified-4.2.1.tgz", - "integrity": "sha1-dv9Dqo2kMPbn5KVchOusKtLPzS4=", - "dev": true, - "requires": { - "bail": "^1.0.0", - "extend": "^3.0.0", - "has": "^1.0.1", - "once": "^1.3.3", - "trough": "^1.0.0", - "vfile": "^1.0.0" - } - }, - "unist-util-remove-position": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz", - "integrity": "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==", - "dev": true, - "requires": { - "unist-util-visit": "^1.1.0" - } - }, - "unist-util-visit": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", - "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", - "dev": true, - "requires": { - "unist-util-visit-parents": "^2.0.0" - } - }, - "unist-util-visit-parents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz", - "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==", - "dev": true, - "requires": { - "unist-util-is": "^3.0.0" - } - }, - "vfile": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-1.4.0.tgz", - "integrity": "sha1-wP1vpIT43r23cfaMMe112I2pf+c=", - "dev": true - }, - "vfile-location": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz", - "integrity": "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==", - "dev": true - } + "mdast-util-gfm": "^0.1.0", + "micromark-extension-gfm": "^0.3.0" } }, "remark-html": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-12.0.0.tgz", - "integrity": "sha512-M104NMHs48+uswChJkCDXCdabzxAinpHikpt6kS3gmGMyIvPZ5kn53tB9shFsL2O4HUJ9DIEsah1SX1Ve5FXHA==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-13.0.1.tgz", + "integrity": "sha512-K5KQCXWVz+harnyC+UVM/J9eJWCgjYRqFeZoZf2NgP0iFbuuw/RgMZv3MA34b/OEpGnstl3oiOUtZzD3tJ+CBw==", "dev": true, "requires": { "hast-util-sanitize": "^3.0.0", "hast-util-to-html": "^7.0.0", - "mdast-util-to-hast": "^9.0.0", - "xtend": "^4.0.1" + "mdast-util-to-hast": "^10.0.0" } }, "remark-parse": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.3.tgz", - "integrity": "sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", "dev": true, "requires": { - "ccount": "^1.0.0", - "collapse-white-space": "^1.0.2", - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-whitespace-character": "^1.0.0", - "is-word-character": "^1.0.0", - "markdown-escapes": "^1.0.0", - "parse-entities": "^2.0.0", - "repeat-string": "^1.5.4", - "state-toggle": "^1.0.0", - "trim": "0.0.1", - "trim-trailing-lines": "^1.0.0", - "unherit": "^1.0.4", - "unist-util-remove-position": "^2.0.0", - "vfile-location": "^3.0.0", - "xtend": "^4.0.1" + "mdast-util-from-markdown": "^0.8.0" } }, "remark-rehype": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-7.0.0.tgz", - "integrity": "sha512-uqQ/VbaTdxyu/da6npHAso6hA00cMqhA3a59RziQdOLN2KEIkPykAVy52IcmZEVTuauXO0VtpxkyCey4phtHzQ==", - "dev": true, - "requires": { - "mdast-util-to-hast": "^9.1.0" - } - }, - "remark-stringify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-1.1.0.tgz", - "integrity": "sha1-pxBeJbnuK/mkm3XSxCPxGwauIJI=", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-8.0.0.tgz", + "integrity": "sha512-gVvOH02TMFqXOWoL6iXU7NXMsDJguNkNuMrzfkQeA4V6WCyHQnOKptn+IQBVVPuIH2sMJBwo8hlrmtn1MLTh9w==", "dev": true, "requires": { - "ccount": "^1.0.0", - "extend": "^3.0.0", - "longest-streak": "^1.0.0", - "markdown-table": "^0.4.0", - "parse-entities": "^1.0.2", - "repeat-string": "^1.5.4", - "stringify-entities": "^1.0.1", - "unherit": "^1.0.4" - }, - "dependencies": { - "parse-entities": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz", - "integrity": "sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==", - "dev": true, - "requires": { - "character-entities": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "character-reference-invalid": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-hexadecimal": "^1.0.0" - } - }, - "stringify-entities": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz", - "integrity": "sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==", - "dev": true, - "requires": { - "character-entities-html4": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-hexadecimal": "^1.0.0" - } - } + "mdast-util-to-hast": "^10.0.0" } }, "repeat-string": { @@ -640,12 +1800,6 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true - }, "space-separated-tokens": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", @@ -658,29 +1812,21 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "state-toggle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz", - "integrity": "sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==", - "dev": true - }, "stringify-entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-3.0.1.tgz", - "integrity": "sha512-Lsk3ISA2++eJYqBMPKcr/8eby1I6L0gP0NlxF8Zja6c05yr/yCYyb2c9PwXjd08Ib3If1vn1rbs1H5ZtVuOfvQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-3.1.0.tgz", + "integrity": "sha512-3FP+jGMmMV/ffZs86MoghGqAoqXAdxLrJP4GUdrDN1aIScYih5tuIO3eF4To5AJZ79KDZ8Fpdy7QJnK8SsL1Vg==", "dev": true, "requires": { "character-entities-html4": "^1.0.0", "character-entities-legacy": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.2", - "is-hexadecimal": "^1.0.0" + "xtend": "^4.0.0" } }, "style-to-object": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.2.3.tgz", - "integrity": "sha512-1d/k4EY2N7jVLOqf2j04dTc37TPOv/hHxZmvpg8Pdh8UYydxeu/C1W1U4vD8alzf5V2Gt7rLsmkr4dxAlDm9ng==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", + "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", "dev": true, "requires": { "inline-style-parser": "0.1.1" @@ -696,34 +1842,12 @@ "vfile": "^4.0.0" } }, - "trim": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", - "dev": true - }, - "trim-trailing-lines": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.3.tgz", - "integrity": "sha512-4ku0mmjXifQcTVfYDfR5lpgV7zVqPg6zV9rdZmwOPqq0+Zq19xDqEgagqVbc4pOOShbncuAOIs59R3+3gcF3ZA==", - "dev": true - }, "trough": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", "dev": true }, - "unherit": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz", - "integrity": "sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==", - "dev": true, - "requires": { - "inherits": "^2.0.0", - "xtend": "^4.0.0" - } - }, "unified": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz", @@ -745,16 +1869,21 @@ "dev": true }, "unist-util-find": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unist-util-find/-/unist-util-find-1.0.1.tgz", - "integrity": "sha1-EGK7tpKMepfGrcibU3RdTEbCIqI=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unist-util-find/-/unist-util-find-1.0.2.tgz", + "integrity": "sha512-ft06UDYzqi9o9RmGP0sZWI/zvLLQiBW2/MD+rW6mDqbOWDcmknGX9orQPspfuGRYWr8eSJAmfsBcvOpfGRJseA==", "dev": true, "requires": { "lodash.iteratee": "^4.5.0", - "remark": "^5.0.1", "unist-util-visit": "^1.1.0" }, "dependencies": { + "unist-util-is": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", + "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==", + "dev": true + }, "unist-util-visit": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", @@ -776,15 +1905,15 @@ } }, "unist-util-generated": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.5.tgz", - "integrity": "sha512-1TC+NxQa4N9pNdayCYA1EGUOCAO0Le3fVp7Jzns6lnua/mYgwHo0tz5WUAfrdpNch1RZLHc61VZ1SDgrtNXLSw==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==", "dev": true }, "unist-util-is": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", - "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.4.tgz", + "integrity": "sha512-3dF39j/u423v4BBQrk1AQ2Ve1FxY5W3JKwXxVFzBODQ6WEvccguhgp802qQLKSnxPODE6WuRZtV+ohlUg4meBA==", "dev": true }, "unist-util-position": { @@ -793,34 +1922,17 @@ "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==", "dev": true }, - "unist-util-remove-position": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz", - "integrity": "sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA==", - "dev": true, - "requires": { - "unist-util-visit": "^2.0.0" - } - }, "unist-util-select": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-3.0.1.tgz", - "integrity": "sha512-VQpTuqZVJlRbosQdnLdTPIIqwZeU70YZ5aMBOqtFNGeeCdYn6ORZt/9RiaVlbl06ocuf58SVMoFa7a13CSGPMA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-3.0.3.tgz", + "integrity": "sha512-DnbjRvotPiDGsUaw9knEvprwD6conwGtaArUn5niG9yBQvWQyHMmUJ4p/vXXzLBm+8XyiTr3pcuw9n3TlF6SYg==", "dev": true, "requires": { "css-selector-parser": "^1.0.0", "not": "^0.1.0", - "nth-check": "^1.0.0", + "nth-check": "^2.0.0", "unist-util-is": "^4.0.0", "zwitch": "^1.0.0" - }, - "dependencies": { - "unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - } } }, "unist-util-stringify-position": { @@ -841,51 +1953,34 @@ "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0", "unist-util-visit-parents": "^3.0.0" - }, - "dependencies": { - "unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - } } }, "unist-util-visit-parents": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.0.tgz", - "integrity": "sha512-0g4wbluTF93npyPrp/ymd3tCDTMnP0yo2akFD2FIBAYXq/Sga3lwaU1D8OYKbtpioaI6CkDcQ6fsMnmtzt7htw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", "dev": true, "requires": { "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0" - }, - "dependencies": { - "unist-util-is": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", - "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==", - "dev": true - } } }, "vfile": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.0.tgz", - "integrity": "sha512-a/alcwCvtuc8OX92rqqo7PflxiCgXRFjdyoGVuYV+qbgCb0GgZJRvIgCD4+U/Kl1yhaRsaTwksF88xbPyGsgpw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", "dev": true, "requires": { "@types/unist": "^2.0.0", "is-buffer": "^2.0.0", - "replace-ext": "1.0.0", "unist-util-stringify-position": "^2.0.0", "vfile-message": "^2.0.0" } }, "vfile-location": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.1.0.tgz", - "integrity": "sha512-FCZ4AN9xMcjFIG1oGmZKo61PjwJHRVA+0/tPUP2ul4uIwjGGndIxavEMRpWn5p4xwm/ZsdXp9YNygf1ZyE4x8g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", "dev": true }, "vfile-message": { @@ -904,12 +1999,6 @@ "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==", "dev": true }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/tools/doc/package.json b/tools/doc/package.json index e3e60831a85e57..dec820f60886ae 100644 --- a/tools/doc/package.json +++ b/tools/doc/package.json @@ -7,19 +7,21 @@ "node": ">=12.10.0" }, "devDependencies": { - "highlight.js": "10.1.0", + "highlight.js": "10.4.1", "js-yaml": "3.14.0", - "rehype-raw": "4.0.2", + "rehype-raw": "5.0.0", "rehype-stringify": "8.0.0", - "remark-html": "12.0.0", - "remark-parse": "8.0.3", - "remark-rehype": "7.0.0", + "remark-gfm": "^1.0.0", + "remark-html": "13.0.1", + "remark-parse": "^9.0.0", + "remark-rehype": "8.0.0", "to-vfile": "6.1.0", "unified": "9.2.0", - "unist-util-find": "1.0.1", - "unist-util-select": "3.0.1", + "unist-util-find": "^1.0.2", + "unist-util-select": "3.0.3", "unist-util-visit": "2.0.3" }, - "optionalDependencies": {}, - "bin": "./generate.js" + "bin": { + "node-doc-generator": "generate.js" + } } diff --git a/tools/doc/type-parser.js b/tools/doc/type-parser.js index 9a96d857a25177..72a2ec419940de 100644 --- a/tools/doc/type-parser.js +++ b/tools/doc/type-parser.js @@ -40,6 +40,10 @@ const customTypesMap = { 'WebAssembly.Instance': `${jsDocPrefix}Reference/Global_Objects/WebAssembly/Instance`, + 'BroadcastChannel': + 'worker_threads.html#worker_threads_class_broadcastchannel_' + + 'extends_eventtarget', + 'Iterable': `${jsDocPrefix}Reference/Iteration_protocols#The_iterable_protocol`, 'Iterator': @@ -111,6 +115,8 @@ const customTypesMap = { 'dgram.Socket': 'dgram.html#dgram_class_dgram_socket', + 'Channel': 'diagnostics_channel.html#diagnostics_channel_class_channel', + 'Domain': 'domain.html#domain_class_domain', 'errors.Error': 'errors.html#errors_class_error', diff --git a/tools/eslint-rules/prefer-primordials.js b/tools/eslint-rules/prefer-primordials.js new file mode 100644 index 00000000000000..51fb6ab8c2ad44 --- /dev/null +++ b/tools/eslint-rules/prefer-primordials.js @@ -0,0 +1,155 @@ +/** + * @fileoverview We shouldn't use global built-in object for security and + * performance reason. This linter rule reports replacable codes + * that can be replaced with primordials. + * @author Leko + */ +'use strict'; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +function toPrimordialsName(obj, prop) { + return obj + toUcFirst(prop); +} + +function toUcFirst(str) { + return str[0].toUpperCase() + str.slice(1); +} + +function isTarget(map, varName) { + return map.has(varName); +} + +function isIgnored(map, varName, propName) { + if (!map.has(varName) || !map.get(varName).has(propName)) { + return false; + } + return map.get(varName).get(propName).ignored; +} + +function getReportName({ name, parentName, into }) { + if (into) { + return toPrimordialsName(into, name); + } + if (parentName) { + return toPrimordialsName(parentName, name); + } + return name; +} + +/** + * Get identifier of object spread assignment + * + * code: 'const { ownKeys } = Reflect;' + * argument: 'ownKeys' + * return: 'Reflect' + */ +function getDestructuringAssignmentParent(scope, node) { + const declaration = scope.set.get(node.name); + if ( + !declaration || + !declaration.defs || + declaration.defs.length === 0 || + declaration.defs[0].type !== 'Variable' || + !declaration.defs[0].node.init + ) { + return null; + } + return declaration.defs[0].node.init.name; +} + +const identifierSelector = + '[type!=VariableDeclarator][type!=MemberExpression]>Identifier'; + +module.exports = { + meta: { + messages: { + error: 'Use `const { {{name}} } = primordials;` instead of the global.' + } + }, + create(context) { + const globalScope = context.getSourceCode().scopeManager.globalScope; + const nameMap = context.options.reduce((acc, option) => + acc.set( + option.name, + (option.ignore || []) + .reduce((acc, name) => acc.set(name, { + ignored: true + }), new Map()) + ) + , new Map()); + const renameMap = context.options + .filter((option) => option.into) + .reduce((acc, option) => + acc.set(option.name, option.into) + , new Map()); + let reported; + + return { + Program() { + reported = new Map(); + }, + [identifierSelector](node) { + if (reported.has(node.range[0])) { + return; + } + const name = node.name; + const parentName = getDestructuringAssignmentParent( + context.getScope(), + node + ); + if (!isTarget(nameMap, name) && !isTarget(nameMap, parentName)) { + return; + } + + const defs = (globalScope.set.get(name) || {}).defs || null; + if (parentName && isTarget(nameMap, parentName)) { + if (!defs || defs[0].name.name !== 'primordials') { + reported.set(node.range[0], true); + const into = renameMap.get(name); + context.report({ + node, + messageId: 'error', + data: { + name: getReportName({ into, parentName, name }) + } + }); + } + return; + } + if (defs.length === 0 || defs[0].node.init.name !== 'primordials') { + reported.set(node.range[0], true); + const into = renameMap.get(name); + context.report({ + node, + messageId: 'error', + data: { + name: getReportName({ into, parentName, name }) + } + }); + } + }, + MemberExpression(node) { + const obj = node.object.name; + const prop = node.property.name; + if (!prop || !isTarget(nameMap, obj) || isIgnored(nameMap, obj, prop)) { + return; + } + + const variables = + context.getSourceCode().scopeManager.getDeclaredVariables(node); + if (variables.length === 0) { + context.report({ + node, + messageId: 'error', + data: { + name: toPrimordialsName(obj, prop), + } + }); + } + } + }; + } +}; diff --git a/tools/genv8constants.py b/tools/genv8constants.py index 8ab2ed8bae50c0..f750ca4de7523f 100755 --- a/tools/genv8constants.py +++ b/tools/genv8constants.py @@ -14,7 +14,7 @@ import errno if len(sys.argv) != 3: - print("usage: objsym.py outfile libv8_base.a") + print("Usage: genv8constants.py outfile libv8_base.a") sys.exit(2) outfile = open(sys.argv[1], 'w') @@ -95,7 +95,7 @@ def out_define(): curr_octet += 1 match = pattern.match(line) - if match == None: + if match is None: continue # Print previous symbol @@ -113,3 +113,5 @@ def out_define(): #endif /* V8_CONSTANTS_H */ """) + +outfile.close() diff --git a/tools/gyp/CHANGELOG.md b/tools/gyp/CHANGELOG.md index 53c922b6c903f8..79403676950671 100644 --- a/tools/gyp/CHANGELOG.md +++ b/tools/gyp/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [0.7.0](https://www.github.com/nodejs/gyp-next/compare/v0.6.2...v0.7.0) (2020-12-17) + + +### ⚠ BREAKING CHANGES + +* **msvs:** On Windows, arguments passed to the "action" commands are no longer transformed to replace slashes with backslashes. + +### Features + +* **xcode:** --cross-compiling overrides arch-specific settings ([973bae0](https://www.github.com/nodejs/gyp-next/commit/973bae0b7b08be7b680ecae9565fbd04b3e0787d)) + + +### Bug Fixes + +* **msvs:** do not fix paths in action command arguments ([fc22f83](https://www.github.com/nodejs/gyp-next/commit/fc22f8335e2016da4aae4f4233074bd651d2faea)) +* cmake on python 3 ([fd61f5f](https://www.github.com/nodejs/gyp-next/commit/fd61f5faa5275ec8fc98e3c7868c0dd46f109540)) +* ValueError: invalid mode: 'rU' while trying to load binding.gyp ([d0504e6](https://www.github.com/nodejs/gyp-next/commit/d0504e6700ce48f44957a4d5891b142a60be946f)) +* xcode cmake parsing ([eefe8d1](https://www.github.com/nodejs/gyp-next/commit/eefe8d10e99863bc4ac7e2ed32facd608d400d4b)) + ### [0.6.2](https://www.github.com/nodejs/gyp-next/compare/v0.6.1...v0.6.2) (2020-10-16) diff --git a/tools/gyp/pylib/gyp/generator/cmake.py b/tools/gyp/pylib/gyp/generator/cmake.py index f5ceacfca364ce..75f5822369735a 100644 --- a/tools/gyp/pylib/gyp/generator/cmake.py +++ b/tools/gyp/pylib/gyp/generator/cmake.py @@ -41,7 +41,7 @@ try: # maketrans moved to str in python3. _maketrans = string.maketrans -except NameError: +except (NameError, AttributeError): _maketrans = str.maketrans generator_default_variables = { @@ -1047,7 +1047,7 @@ def WriteTarget( # XCode settings xcode_settings = config.get("xcode_settings", {}) - for xcode_setting, xcode_value in xcode_settings.viewitems(): + for xcode_setting, xcode_value in xcode_settings.items(): SetTargetProperty( output, cmake_target_name, diff --git a/tools/gyp/pylib/gyp/generator/msvs.py b/tools/gyp/pylib/gyp/generator/msvs.py index 32bf4746a179cb..96283b275756e5 100644 --- a/tools/gyp/pylib/gyp/generator/msvs.py +++ b/tools/gyp/pylib/gyp/generator/msvs.py @@ -423,13 +423,7 @@ def _BuildCommandLineForRuleRaw( # file out of the raw command string, and some commands (like python) are # actually batch files themselves. command.insert(0, "call") - # Fix the paths - # TODO(quote): This is a really ugly heuristic, and will miss path fixing - # for arguments like "--arg=path" or "/opt:path". - # If the argument starts with a slash or dash, it's probably a command line - # switch - arguments = [i if (i[:1] in "/-") else _FixPath(i) for i in cmd[1:]] - arguments = [i.replace("$(InputDir)", "%INPUTDIR%") for i in arguments] + arguments = [i.replace("$(InputDir)", "%INPUTDIR%") for i in cmd[1:]] arguments = [MSVSSettings.FixVCMacroSlashes(i) for i in arguments] if quote_cmd: # Support a mode for using cmd directly. diff --git a/tools/gyp/pylib/gyp/input.py b/tools/gyp/pylib/gyp/input.py index 5504390c0bb33f..90397762404a7c 100644 --- a/tools/gyp/pylib/gyp/input.py +++ b/tools/gyp/pylib/gyp/input.py @@ -231,7 +231,7 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes, is_target, check # Open the build file for read ('r') with universal-newlines mode ('U') # to make sure platform specific newlines ('\r\n' or '\r') are converted to '\n' # which otherwise will fail eval() - if sys.platform == "zos": + if PY3 or sys.platform == "zos": # On z/OS, universal-newlines mode treats the file as an ascii file. # But since node-gyp produces ebcdic files, do not use that mode. build_file_contents = open(build_file_path, "r").read() diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py index 8af2b39f9a1479..a79aaa41fbcee8 100644 --- a/tools/gyp/pylib/gyp/xcode_emulation.py +++ b/tools/gyp/pylib/gyp/xcode_emulation.py @@ -654,28 +654,32 @@ def GetCflags(self, configname, arch=None): self._WarnUnimplemented("MACH_O_TYPE") self._WarnUnimplemented("PRODUCT_TYPE") - if arch is not None: - archs = [arch] - else: - assert self.configname - archs = self.GetActiveArchs(self.configname) - if len(archs) != 1: - # TODO: Supporting fat binaries will be annoying. - self._WarnUnimplemented("ARCHS") - archs = ["i386"] - cflags.append("-arch " + archs[0]) - - if archs[0] in ("i386", "x86_64"): - if self._Test("GCC_ENABLE_SSE3_EXTENSIONS", "YES", default="NO"): - cflags.append("-msse3") - if self._Test( - "GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS", "YES", default="NO" - ): - cflags.append("-mssse3") # Note 3rd 's'. - if self._Test("GCC_ENABLE_SSE41_EXTENSIONS", "YES", default="NO"): - cflags.append("-msse4.1") - if self._Test("GCC_ENABLE_SSE42_EXTENSIONS", "YES", default="NO"): - cflags.append("-msse4.2") + # If GYP_CROSSCOMPILE (--cross-compiling), disable architecture-specific + # additions and assume these will be provided as required via CC_host, + # CXX_host, CC_target and CXX_target. + if not gyp.common.CrossCompileRequested(): + if arch is not None: + archs = [arch] + else: + assert self.configname + archs = self.GetActiveArchs(self.configname) + if len(archs) != 1: + # TODO: Supporting fat binaries will be annoying. + self._WarnUnimplemented("ARCHS") + archs = ["i386"] + cflags.append("-arch " + archs[0]) + + if archs[0] in ("i386", "x86_64"): + if self._Test("GCC_ENABLE_SSE3_EXTENSIONS", "YES", default="NO"): + cflags.append("-msse3") + if self._Test( + "GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS", "YES", default="NO" + ): + cflags.append("-mssse3") # Note 3rd 's'. + if self._Test("GCC_ENABLE_SSE41_EXTENSIONS", "YES", default="NO"): + cflags.append("-msse4.1") + if self._Test("GCC_ENABLE_SSE42_EXTENSIONS", "YES", default="NO"): + cflags.append("-msse4.2") cflags += self._Settings().get("WARNING_CFLAGS", []) @@ -938,16 +942,17 @@ def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None): + gyp_to_build_path(self._Settings()["ORDER_FILE"]) ) - if arch is not None: - archs = [arch] - else: - assert self.configname - archs = self.GetActiveArchs(self.configname) - if len(archs) != 1: - # TODO: Supporting fat binaries will be annoying. - self._WarnUnimplemented("ARCHS") - archs = ["i386"] - ldflags.append("-arch " + archs[0]) + if not gyp.common.CrossCompileRequested(): + if arch is not None: + archs = [arch] + else: + assert self.configname + archs = self.GetActiveArchs(self.configname) + if len(archs) != 1: + # TODO: Supporting fat binaries will be annoying. + self._WarnUnimplemented("ARCHS") + archs = ["i386"] + ldflags.append("-arch " + archs[0]) # Xcode adds the product directory by default. # Rewrite -L. to -L./ to work around http://www.openradar.me/25313838 diff --git a/tools/gyp/setup.py b/tools/gyp/setup.py old mode 100755 new mode 100644 index d1869c1b52055f..766a7651ba09f5 --- a/tools/gyp/setup.py +++ b/tools/gyp/setup.py @@ -15,7 +15,7 @@ setup( name="gyp-next", - version="0.6.2", + version="0.7.0", description="A fork of the GYP build system for use in the Node.js projects", long_description=long_description, long_description_content_type="text/markdown", diff --git a/tools/icu/current_ver.dep b/tools/icu/current_ver.dep index f22f158c30bcfd..a73a4b1117ede6 100644 --- a/tools/icu/current_ver.dep +++ b/tools/icu/current_ver.dep @@ -1,6 +1,6 @@ [ { - "url": "https://github.com/unicode-org/icu/releases/download/release-67-1/icu4c-67_1-src.tgz", - "md5": "c4d62b497cbd89ab2a9ca6b543e57b30" + "url": "https://github.com/unicode-org/icu/releases/download/release-68-1/icu4c-68_1-src.tgz", + "md5": "fd03b2d916dcadd3711b4c4a100a1713" } ] diff --git a/tools/icu/iculslocs.cc b/tools/icu/iculslocs.cc index e0de23774594f3..ad4fc37cb49aea 100644 --- a/tools/icu/iculslocs.cc +++ b/tools/icu/iculslocs.cc @@ -150,7 +150,7 @@ int localeExists(const char* loc, UBool* exists) { } icu::LocalUResourceBundlePointer aResource( ures_openDirect(packageName.data(), loc, &status)); - *exists = FALSE; + *exists = false; if (U_SUCCESS(status)) { *exists = true; if (VERBOSE > 1) { diff --git a/tools/install.py b/tools/install.py index 729b416fc47d3f..693faff4c37ac4 100755 --- a/tools/install.py +++ b/tools/install.py @@ -19,8 +19,8 @@ def abspath(*args): return os.path.abspath(path) def load_config(): - s = open('config.gypi').read() - return ast.literal_eval(s) + with open('config.gypi') as f: + return ast.literal_eval(f.read()) def try_unlink(path): try: @@ -223,11 +223,19 @@ def run(args): cmd = args[1] if len(args) > 1 else 'install' if os.environ.get('HEADERS_ONLY'): - if cmd == 'install': return headers(install) - if cmd == 'uninstall': return headers(uninstall) + if cmd == 'install': + headers(install) + return + if cmd == 'uninstall': + headers(uninstall) + return else: - if cmd == 'install': return files(install) - if cmd == 'uninstall': return files(uninstall) + if cmd == 'install': + files(install) + return + if cmd == 'uninstall': + files(uninstall) + return raise RuntimeError('Bad command: %s\n' % cmd) diff --git a/tools/js2c.py b/tools/js2c.py index 195e6a6189a989..dd3ff9d5ca9f98 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -123,7 +123,7 @@ def AddModule(filename, definitions, initializers): initializers.append(initializer) def NormalizeFileName(filename): - split = filename.split(os.path.sep) + split = filename.split('/') if split[0] == 'deps': split = ['internal'] + split else: # `lib/**/*.js` so drop the 'lib' part @@ -163,9 +163,11 @@ def handle_config_gypi(config_filename): def jsonify(config): # 1. string comments config = re.sub(r'#.*?\n', '', config) + # 2. join multiline strings + config = re.sub(r"'$\s+'", '', config, flags=re.M) # 3. normalize string literals from ' into " config = re.sub('\'', '"', config) - # 2. turn pseudo-booleans strings into Booleans + # 4. turn pseudo-booleans strings into Booleans config = re.sub('"true"', 'true', config) config = re.sub('"false"', 'false', config) return config diff --git a/tools/license-builder.sh b/tools/license-builder.sh index e6d66a037704bc..0f5fd6a155f704 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -1,23 +1,23 @@ -#!/usr/bin/env bash +#!/bin/sh set -e -rootdir="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +rootdir="$(CDPATH='' cd "$(dirname "$0")/.." && pwd)" licensefile="${rootdir}/LICENSE" -licensehead="$(sed '/^- /,$d' ${licensefile})" +licensehead="$(sed '/^- /,$d' "${licensefile}")" tmplicense="${rootdir}/~LICENSE.$$" -echo -e "$licensehead" > $tmplicense +echo "$licensehead" > "$tmplicense" # addlicense -function addlicense { +addlicense() { echo " - ${1}, located at ${2}, is licensed as follows: \"\"\" -$(echo -e "$3" | sed -e 's/^/ /' -e 's/^ $//' -e 's/ *$//' | sed -e '/./,$!d' | sed -e '/^$/N;/^\n$/D') +$(echo "$3" | sed -e 's/^/ /' -e 's/^ $//' -e 's/ *$//' | sed -e '/./,$!d' | sed -e '/^$/N;/^\n$/D') \"\"\"\ -" >> $tmplicense +" >> "$tmplicense" } @@ -29,85 +29,85 @@ fi # Dependencies bundled in distributions -addlicense "Acorn" "deps/acorn" "$(cat ${rootdir}/deps/acorn/acorn/LICENSE)" -addlicense "Acorn plugins" "deps/acorn-plugins" "$(cat ${rootdir}/deps/acorn-plugins/acorn-class-fields/LICENSE)" -addlicense "c-ares" "deps/cares" "$(tail -n +3 ${rootdir}/deps/cares/LICENSE.md)" -addlicense "cjs-module-lexer" "deps/cjs-module-lexer" "$(cat ${rootdir}/deps/cjs-module-lexer/LICENSE)" +addlicense "Acorn" "deps/acorn" "$(cat "${rootdir}"/deps/acorn/acorn/LICENSE)" +addlicense "Acorn plugins" "deps/acorn-plugins" "$(cat "${rootdir}"/deps/acorn-plugins/acorn-class-fields/LICENSE)" +addlicense "c-ares" "deps/cares" "$(tail -n +3 "${rootdir}"/deps/cares/LICENSE.md)" +addlicense "cjs-module-lexer" "deps/cjs-module-lexer" "$(cat "${rootdir}"/deps/cjs-module-lexer/LICENSE)" if [ -f "${rootdir}/deps/icu/LICENSE" ]; then # ICU 57 and following. Drop the BOM addlicense "ICU" "deps/icu" \ "$(sed -e '1s/^[^a-zA-Z ]*ICU/ICU/' -e :a \ - -e 's/<[^>]*>//g;s/ / /g;s/ +$//;/]*>//g;s/ / /g;s/ +$//;/]*>//g;s/ / /g;s/ +$//;/]*>//g;s/ / /g;s/ +$//;/]*>//g;s/ / /g;s/ +$//;/]*>//g;s/ / /g;s/ +$//;/]*>//g;s/ / /g;s/ +$//;/]*>//g;s/ / /g;s/ +$//;/= 8 && Number(osRelease[0]) >= 10 && @@ -7593,7 +7603,7 @@ function supportsColor$1(haveStream, streamIsTTY) { if (process.platform === 'win32') { // Windows 10 build 10586 is the first Windows release that supports 256 colors. // Windows 10 build 14931 is the first release that supports 16m/TrueColor. - const osRelease = os.release().split('.'); + const osRelease = os__default['default'].release().split('.'); if ( Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 @@ -7654,8 +7664,8 @@ function getSupportLevel$1(stream) { var supportsColor_1$1 = { supportsColor: getSupportLevel$1, - stdout: translateLevel$1(supportsColor$1(true, tty.isatty(1))), - stderr: translateLevel$1(supportsColor$1(true, tty.isatty(2))) + stdout: translateLevel$1(supportsColor$1(true, tty__default['default'].isatty(1))), + stderr: translateLevel$1(supportsColor$1(true, tty__default['default'].isatty(2))) }; var node = createCommonjsModule(function (module, exports) { @@ -7812,7 +7822,7 @@ exports.inspectOpts = Object.keys(process.env).filter(key => { function useColors() { return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); + tty__default['default'].isatty(process.stderr.fd); } /** @@ -7848,7 +7858,7 @@ function getDate() { */ function log(...args) { - return process.stderr.write(util$2.format(...args) + '\n'); + return process.stderr.write(util__default['default'].format(...args) + '\n'); } /** @@ -7904,7 +7914,7 @@ const {formatters} = module.exports; formatters.o = function (v) { this.inspectOpts.colors = this.useColors; - return util$2.inspect(v, this.inspectOpts) + return util__default['default'].inspect(v, this.inspectOpts) .replace(/\s*\n\s*/g, ' '); }; @@ -7914,7 +7924,7 @@ formatters.o = function (v) { formatters.O = function (v) { this.inspectOpts.colors = this.useColors; - return util$2.inspect(v, this.inspectOpts); + return util__default['default'].inspect(v, this.inspectOpts); }; }); var node_1 = node.init; @@ -7949,10 +7959,10 @@ const resolveFrom = (fromDirectory, moduleId, silent) => { } try { - fromDirectory = fs$1.realpathSync(fromDirectory); + fromDirectory = fs__default['default'].realpathSync(fromDirectory); } catch (error) { if (error.code === 'ENOENT') { - fromDirectory = path$1.resolve(fromDirectory); + fromDirectory = path__default['default'].resolve(fromDirectory); } else if (silent) { return; } else { @@ -7960,12 +7970,12 @@ const resolveFrom = (fromDirectory, moduleId, silent) => { } } - const fromFile = path$1.join(fromDirectory, 'noop.js'); + const fromFile = path__default['default'].join(fromDirectory, 'noop.js'); - const resolveFileName = () => module$1._resolveFilename(moduleId, { + const resolveFileName = () => module__default['default']._resolveFilename(moduleId, { id: fromFile, filename: fromFile, - paths: module$1._nodeModulePaths(fromDirectory) + paths: module__default['default']._nodeModulePaths(fromDirectory) }); if (silent) { @@ -8064,7 +8074,7 @@ class FiggyPudding { } } try { - const util = util$2; + const util = util__default['default']; FiggyPudding.prototype[util.inspect.custom] = function (depth, opts) { return ( this[Symbol.toStringTag] + ' ' @@ -8180,14 +8190,14 @@ function entries (obj) { } var pathExists = fp => new Promise(resolve => { - fs$1.access(fp, err => { + fs__default['default'].access(fp, err => { resolve(!err); }); }); var sync = fp => { try { - fs$1.accessSync(fp); + fs__default['default'].accessSync(fp); return true; } catch (err) { return false; @@ -8297,7 +8307,7 @@ var locatePath = (iterable, options) => { cwd: process.cwd() }, options); - return pLocate(iterable, el => pathExists(path$1.resolve(options.cwd, el)), options); + return pLocate(iterable, el => pathExists(path__default['default'].resolve(options.cwd, el)), options); }; var sync$1 = (iterable, options) => { @@ -8306,7 +8316,7 @@ var sync$1 = (iterable, options) => { }, options); for (const el of iterable) { - if (pathExists.sync(path$1.resolve(options.cwd, el))) { + if (pathExists.sync(path__default['default'].resolve(options.cwd, el))) { return el; } } @@ -8314,8 +8324,8 @@ var sync$1 = (iterable, options) => { locatePath.sync = sync$1; var findUp = (filename, opts = {}) => { - const startDir = path$1.resolve(opts.cwd || ''); - const {root} = path$1.parse(startDir); + const startDir = path__default['default'].resolve(opts.cwd || ''); + const {root} = path__default['default'].parse(startDir); const filenames = [].concat(filename); @@ -8323,11 +8333,11 @@ var findUp = (filename, opts = {}) => { (function find(dir) { locatePath(filenames, {cwd: dir}).then(file => { if (file) { - resolve(path$1.join(dir, file)); + resolve(path__default['default'].join(dir, file)); } else if (dir === root) { resolve(null); } else { - find(path$1.dirname(dir)); + find(path__default['default'].dirname(dir)); } }); })(startDir); @@ -8335,8 +8345,8 @@ var findUp = (filename, opts = {}) => { }; var sync$2 = (filename, opts = {}) => { - let dir = path$1.resolve(opts.cwd || ''); - const {root} = path$1.parse(dir); + let dir = path__default['default'].resolve(opts.cwd || ''); + const {root} = path__default['default'].parse(dir); const filenames = [].concat(filename); @@ -8345,14 +8355,14 @@ var sync$2 = (filename, opts = {}) => { const file = locatePath.sync(filenames, {cwd: dir}); if (file) { - return path$1.join(dir, file); + return path__default['default'].join(dir, file); } if (dir === root) { return null; } - dir = path$1.dirname(dir); + dir = path__default['default'].dirname(dir); } }; findUp.sync = sync$2; @@ -8375,10 +8385,10 @@ function encode (obj, opt) { if (typeof opt === 'string') { opt = { section: opt, - whitespace: false + whitespace: false, }; } else { - opt = opt || {}; + opt = opt || Object.create(null); opt.whitespace = opt.whitespace === true; } @@ -8390,27 +8400,25 @@ function encode (obj, opt) { val.forEach(function (item) { out += safe(k + '[]') + separator + safe(item) + '\n'; }); - } else if (val && typeof val === 'object') { + } else if (val && typeof val === 'object') children.push(k); - } else { + else out += safe(k) + separator + safe(val) + eol; - } }); - if (opt.section && out.length) { + if (opt.section && out.length) out = '[' + safe(opt.section) + ']' + eol + out; - } children.forEach(function (k, _, __) { var nk = dotSplit(k).join('\\.'); var section = (opt.section ? opt.section + '.' : '') + nk; var child = encode(obj[k], { section: section, - whitespace: opt.whitespace + whitespace: opt.whitespace, }); - if (out.length && child.length) { + if (out.length && child.length) out += eol; - } + out += child; }); @@ -8422,12 +8430,12 @@ function dotSplit (str) { .replace(/\\\./g, '\u0001') .split(/\./).map(function (part) { return part.replace(/\1/g, '\\.') - .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') + .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') }) } function decode (str) { - var out = {}; + var out = Object.create(null); var p = out; var section = null; // section |key = value @@ -8435,15 +8443,25 @@ function decode (str) { var lines = str.split(/[\r\n]+/g); lines.forEach(function (line, _, __) { - if (!line || line.match(/^\s*[;#]/)) return + if (!line || line.match(/^\s*[;#]/)) + return var match = line.match(re); - if (!match) return + if (!match) + return if (match[1] !== undefined) { section = unsafe(match[1]); - p = out[section] = out[section] || {}; + if (section === '__proto__') { + // not allowed + // keep parsing the section, but don't attach it. + p = Object.create(null); + return + } + p = out[section] = out[section] || Object.create(null); return } var key = unsafe(match[2]); + if (key === '__proto__') + return var value = match[3] ? unsafe(match[4]) : true; switch (value) { case 'true': @@ -8454,20 +8472,20 @@ function decode (str) { // Convert keys with '[]' suffix to an array if (key.length > 2 && key.slice(-2) === '[]') { key = key.substring(0, key.length - 2); - if (!p[key]) { + if (key === '__proto__') + return + if (!p[key]) p[key] = []; - } else if (!Array.isArray(p[key])) { + else if (!Array.isArray(p[key])) p[key] = [p[key]]; - } } // safeguard against resetting a previously defined // array by accidentally forgetting the brackets - if (Array.isArray(p[key])) { + if (Array.isArray(p[key])) p[key].push(value); - } else { + else p[key] = value; - } }); // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} @@ -8475,9 +8493,9 @@ function decode (str) { Object.keys(out).filter(function (k, _, __) { if (!out[k] || typeof out[k] !== 'object' || - Array.isArray(out[k])) { + Array.isArray(out[k])) return false - } + // see if the parent section is also an object. // if so, add it to that, and mark this one for deletion var parts = dotSplit(k); @@ -8485,12 +8503,15 @@ function decode (str) { var l = parts.pop(); var nl = l.replace(/\\\./g, '.'); parts.forEach(function (part, _, __) { - if (!p[part] || typeof p[part] !== 'object') p[part] = {}; + if (part === '__proto__') + return + if (!p[part] || typeof p[part] !== 'object') + p[part] = Object.create(null); p = p[part]; }); - if (p === out && nl === l) { + if (p === out && nl === l) return false - } + p[nl] = out[k]; return true }).forEach(function (del, _, __) { @@ -8512,18 +8533,20 @@ function safe (val) { (val.length > 1 && isQuoted(val)) || val !== val.trim()) - ? JSON.stringify(val) - : val.replace(/;/g, '\\;').replace(/#/g, '\\#') + ? JSON.stringify(val) + : val.replace(/;/g, '\\;').replace(/#/g, '\\#') } function unsafe (val, doUnesc) { val = (val || '').trim(); if (isQuoted(val)) { // remove the single quotes before calling JSON.parse - if (val.charAt(0) === "'") { + if (val.charAt(0) === "'") val = val.substr(1, val.length - 2); - } - try { val = JSON.parse(val); } catch (_) {} + + try { + val = JSON.parse(val); + } catch (_) {} } else { // walk the val to find the first not-escaped ; character var esc = false; @@ -8531,23 +8554,22 @@ function unsafe (val, doUnesc) { for (var i = 0, l = val.length; i < l; i++) { var c = val.charAt(i); if (esc) { - if ('\\;#'.indexOf(c) !== -1) { + if ('\\;#'.indexOf(c) !== -1) unesc += c; - } else { + else unesc += '\\' + c; - } + esc = false; - } else if (';#'.indexOf(c) !== -1) { + } else if (';#'.indexOf(c) !== -1) break - } else if (c === '\\') { + else if (c === '\\') esc = true; - } else { + else unesc += c; - } } - if (esc) { + if (esc) unesc += '\\'; - } + return unesc.trim() } return val @@ -8566,14 +8588,14 @@ const NpmConfig = figgyPudding_1({}, { }); const ConfigOpts = figgyPudding_1({ - cache: { default: path$1.join(os.homedir(), '.npm') }, + cache: { default: path__default['default'].join(os__default['default'].homedir(), '.npm') }, configNames: { default: ['npmrc', '.npmrc'] }, envPrefix: { default: /^npm_config_/i }, cwd: { default: () => process.cwd() }, globalconfig: { - default: () => path$1.join(getGlobalPrefix(), 'etc', 'npmrc') + default: () => path__default['default'].join(getGlobalPrefix(), 'etc', 'npmrc') }, - userconfig: { default: path$1.join(os.homedir(), '.npmrc') } + userconfig: { default: path__default['default'].join(os__default['default'].homedir(), '.npmrc') } }); var read = getNpmConfig; @@ -8608,17 +8630,17 @@ function getNpmConfig (_opts, _builtin) { const newOpts = NpmConfig(builtin, global, user, proj, env, cli); if (newOpts.cache) { return newOpts.concat({ - cache: path$1.resolve( + cache: path__default['default'].resolve( ( (cli.cache || env.cache) ? builtin.cwd : proj.cache - ? path$1.dirname(projConfPath) + ? path__default['default'].dirname(projConfPath) : user.cache - ? path$1.dirname(userConfPath) + ? path__default['default'].dirname(userConfPath) : global.cache - ? path$1.dirname(globalConfPath) - : path$1.dirname(userConfPath) + ? path__default['default'].dirname(globalConfPath) + : path__default['default'].dirname(userConfPath) ), newOpts.cache ) @@ -8631,7 +8653,7 @@ function getNpmConfig (_opts, _builtin) { function maybeReadIni (f) { let txt; try { - txt = fs$1.readFileSync(f, 'utf8'); + txt = fs__default['default'].readFileSync(f, 'utf8'); } catch (err) { if (err.code === 'ENOENT') { return '' @@ -8647,13 +8669,13 @@ function getGlobalPrefix () { return process.env.PREFIX } else if (process.platform === 'win32') { // c:\node\node.exe --> prefix=c:\node\ - return path$1.dirname(process.execPath) + return path__default['default'].dirname(process.execPath) } else { // /usr/local/bin/node --> prefix=/usr/local - let pref = path$1.dirname(path$1.dirname(process.execPath)); + let pref = path__default['default'].dirname(path__default['default'].dirname(process.execPath)); // destdir only is respected on Unix if (process.env.DESTDIR) { - pref = path$1.join(process.env.DESTDIR, pref); + pref = path__default['default'].join(process.env.DESTDIR, pref); } return pref } @@ -8686,7 +8708,7 @@ var builtinNpmConfig; // pass to `libnpmconfig` explicitly: /* istanbul ignore next */ if (windows && appData) { - builtinNpmConfig = {prefix: path$1.join(appData, 'npm')}; + builtinNpmConfig = {prefix: path__default['default'].join(appData, 'npm')}; } var npmPrefix = readNpmConfig(null, builtinNpmConfig).prefix; @@ -8696,12 +8718,12 @@ var npmPrefix = readNpmConfig(null, builtinNpmConfig).prefix; /* istanbul ignore next */ if (!npmPrefix) { npmPrefix = windows - ? path$1.dirname(process.execPath) - : path$1.resolve(process.execPath, '../..'); + ? path__default['default'].dirname(process.execPath) + : path__default['default'].resolve(process.execPath, '../..'); } var globally = electron || argv.indexOf(npmPrefix) === 0; -var globals = path$1.resolve(npmPrefix, globalsLibrary, 'node_modules'); +var globals = path__default['default'].resolve(npmPrefix, globalsLibrary, 'node_modules'); // If we’re in Electron, we’re running in a modified Node that cannot really // install global node modules. @@ -8712,8 +8734,8 @@ var globals = path$1.resolve(npmPrefix, globalsLibrary, 'node_modules'); // Luckily NVM leaks some environment variables that we can pick up on to try // and detect the actual modules. /* istanbul ignore next */ -if (electron && nvm && !fs$1.existsSync(globals)) { - globals = path$1.resolve(nvm, '..', globalsLibrary, 'node_modules'); +if (electron && nvm && !fs__default['default'].existsSync(globals)) { + globals = path__default['default'].resolve(nvm, '..', globalsLibrary, 'node_modules'); } // Load the plugin found using `resolvePlugin`. @@ -8956,11 +8978,11 @@ var debug = src('unified-engine:find-up'); var findUp$1 = FindUp; -var read$1 = fs$1.readFile; -var resolve$1 = path$1.resolve; -var relative = path$1.relative; -var join = path$1.join; -var dirname = path$1.dirname; +var read$1 = fs__default['default'].readFile; +var resolve$1 = path__default['default'].resolve; +var relative = path__default['default'].relative; +var join = path__default['default'].join; +var dirname = path__default['default'].dirname; FindUp.prototype.load = load$2; @@ -9159,10 +9181,10 @@ var resolve = loadPlugin_1.resolve; module.exports = Config; var own = {}.hasOwnProperty; -var extname = path$1.extname; -var basename = path$1.basename; -var dirname = path$1.dirname; -var relative = path$1.relative; +var extname = path__default['default'].extname; +var basename = path__default['default'].basename; +var dirname = path__default['default'].dirname; +var relative = path__default['default'].relative; var loaders = { '.json': loadJson, @@ -9210,7 +9232,7 @@ function Config(options) { function load(filePath, callback) { var self = this; - var searchPath = filePath || path$1.resolve(this.cwd, 'stdin.js'); + var searchPath = filePath || path__default['default'].resolve(this.cwd, 'stdin.js'); self.findUp.load(searchPath, done); @@ -9260,15 +9282,15 @@ function create(buf, filePath) { // Basically `Module.prototype.load`, but for a buffer instead of a file path. function loadScript(buf, filePath) { - var submodule = module$1._cache[filePath]; + var submodule = module__default['default']._cache[filePath]; if (!submodule) { - submodule = new module$1(filePath, module); + submodule = new module__default['default'](filePath, module); submodule.filename = filePath; - submodule.paths = module$1._nodeModulePaths(dirname(filePath)); + submodule.paths = module__default['default']._nodeModulePaths(dirname(filePath)); submodule._compile(String(buf), filePath); submodule.loaded = true; - module$1._cache[filePath] = submodule; + module__default['default']._cache[filePath] = submodule; } return submodule.exports @@ -9382,7 +9404,7 @@ function merge(target, raw, options) { ) } } else { - fp = relative(cwd, path$1.resolve(root, id)); + fp = relative(cwd, path__default['default'].resolve(root, id)); addPlugin( failingModule(fp, new Error('Could not find module `' + id + '`')), value @@ -10041,10 +10063,10 @@ var ignore$1 = Ignore$1; Ignore$1.prototype.check = check; -var sep = path$1.sep; -var dirname$1 = path$1.dirname; -var relative$1 = path$1.relative; -var resolve$2 = path$1.resolve; +var sep = path__default['default'].sep; +var dirname$1 = path__default['default'].dirname; +var relative$1 = path__default['default'].relative; +var resolve$2 = path__default['default'].resolve; function Ignore$1(options) { this.cwd = options.cwd; @@ -10168,7 +10190,7 @@ function maybeCallback(cb) { return typeof cb === 'function' ? cb : rethrow(); } -var normalize = path$1.normalize; +var normalize = path__default['default'].normalize; // Regexp that finds the next partion of a (partial) path // result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] @@ -10187,7 +10209,7 @@ if (isWindows) { var realpathSync = function realpathSync(p, cache) { // make p is absolute - p = path$1.resolve(p); + p = path__default['default'].resolve(p); if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { return cache[p]; @@ -10218,7 +10240,7 @@ var realpathSync = function realpathSync(p, cache) { // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard[base]) { - fs$1.lstatSync(base); + fs__default['default'].lstatSync(base); knownHard[base] = true; } } @@ -10245,7 +10267,7 @@ var realpathSync = function realpathSync(p, cache) { // some known symbolic link. no need to stat again. resolvedLink = cache[base]; } else { - var stat = fs$1.lstatSync(base); + var stat = fs__default['default'].lstatSync(base); if (!stat.isSymbolicLink()) { knownHard[base] = true; if (cache) cache[base] = base; @@ -10262,17 +10284,17 @@ var realpathSync = function realpathSync(p, cache) { } } if (linkTarget === null) { - fs$1.statSync(base); - linkTarget = fs$1.readlinkSync(base); + fs__default['default'].statSync(base); + linkTarget = fs__default['default'].readlinkSync(base); } - resolvedLink = path$1.resolve(previous, linkTarget); + resolvedLink = path__default['default'].resolve(previous, linkTarget); // track this, if given a cache. if (cache) cache[base] = resolvedLink; if (!isWindows) seenLinks[id] = linkTarget; } // resolve the link, then start over - p = path$1.resolve(resolvedLink, p.slice(pos)); + p = path__default['default'].resolve(resolvedLink, p.slice(pos)); start(); } @@ -10289,7 +10311,7 @@ var realpath = function realpath(p, cache, cb) { } // make p is absolute - p = path$1.resolve(p); + p = path__default['default'].resolve(p); if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { return process.nextTick(cb.bind(null, null, cache[p])); @@ -10320,7 +10342,7 @@ var realpath = function realpath(p, cache, cb) { // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard[base]) { - fs$1.lstat(base, function(err) { + fs__default['default'].lstat(base, function(err) { if (err) return cb(err); knownHard[base] = true; LOOP(); @@ -10357,7 +10379,7 @@ var realpath = function realpath(p, cache, cb) { return gotResolvedLink(cache[base]); } - return fs$1.lstat(base, gotStat); + return fs__default['default'].lstat(base, gotStat); } function gotStat(err, stat) { @@ -10379,10 +10401,10 @@ var realpath = function realpath(p, cache, cb) { return gotTarget(null, seenLinks[id], base); } } - fs$1.stat(base, function(err) { + fs__default['default'].stat(base, function(err) { if (err) return cb(err); - fs$1.readlink(base, function(err, target) { + fs__default['default'].readlink(base, function(err, target) { if (!isWindows) seenLinks[id] = target; gotTarget(err, target); }); @@ -10392,14 +10414,14 @@ var realpath = function realpath(p, cache, cb) { function gotTarget(err, target, base) { if (err) return cb(err); - var resolvedLink = path$1.resolve(previous, target); + var resolvedLink = path__default['default'].resolve(previous, target); if (cache) cache[base] = resolvedLink; gotResolvedLink(resolvedLink); } function gotResolvedLink(resolvedLink) { // resolve the link, then start over - p = path$1.resolve(resolvedLink, p.slice(pos)); + p = path__default['default'].resolve(resolvedLink, p.slice(pos)); start(); } }; @@ -10417,8 +10439,8 @@ realpath$1.monkeypatch = monkeypatch; realpath$1.unmonkeypatch = unmonkeypatch; -var origRealpath = fs$1.realpath; -var origRealpathSync = fs$1.realpathSync; +var origRealpath = fs__default['default'].realpath; +var origRealpathSync = fs__default['default'].realpathSync; var version = process.version; var ok = /^v[0-5]\./.test(version); @@ -10467,13 +10489,13 @@ function realpathSync$1 (p, cache) { } function monkeypatch () { - fs$1.realpath = realpath$1; - fs$1.realpathSync = realpathSync$1; + fs__default['default'].realpath = realpath$1; + fs__default['default'].realpathSync = realpathSync$1; } function unmonkeypatch () { - fs$1.realpath = origRealpath; - fs$1.realpathSync = origRealpathSync; + fs__default['default'].realpath = origRealpath; + fs__default['default'].realpathSync = origRealpathSync; } var concatMap = function (xs, fn) { @@ -10748,7 +10770,7 @@ minimatch.Minimatch = Minimatch; var path = { sep: '/' }; try { - path = path$1; + path = path__default['default']; } catch (er) {} var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; @@ -11699,7 +11721,7 @@ if (typeof Object.create === 'function') { var inherits = createCommonjsModule(function (module) { try { - var util = util$2; + var util = util__default['default']; /* istanbul ignore next */ if (typeof util.inherits !== 'function') throw ''; module.exports = util.inherits; @@ -11826,12 +11848,12 @@ function setopts (self, pattern, options) { if (!ownProp(options, "cwd")) self.cwd = cwd; else { - self.cwd = path$1.resolve(options.cwd); + self.cwd = path__default['default'].resolve(options.cwd); self.changedCwd = self.cwd !== cwd; } - self.root = options.root || path$1.resolve(self.cwd, "/"); - self.root = path$1.resolve(self.root); + self.root = options.root || path__default['default'].resolve(self.cwd, "/"); + self.root = path__default['default'].resolve(self.root); if (process.platform === "win32") self.root = self.root.replace(/\\/g, "/"); @@ -11935,13 +11957,13 @@ function mark$1 (self, p) { function makeAbs (self, f) { var abs = f; if (f.charAt(0) === '/') { - abs = path$1.join(self.root, f); + abs = path__default['default'].join(self.root, f); } else if (pathIsAbsolute(f) || f === '') { abs = f; } else if (self.changedCwd) { - abs = path$1.resolve(self.cwd, f); + abs = path__default['default'].resolve(self.cwd, f); } else { - abs = path$1.resolve(f); + abs = path__default['default'].resolve(f); } if (process.platform === 'win32') @@ -12023,7 +12045,7 @@ function GlobSync (pattern, options) { } GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync); + assert__default['default'](this instanceof GlobSync); if (this.realpath) { var self = this; this.matches.forEach(function (matchset, index) { @@ -12047,7 +12069,7 @@ GlobSync.prototype._finish = function () { GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync); + assert__default['default'](this instanceof GlobSync); // Get the first [n] parts of pattern that are all strings. var n = 0; @@ -12158,7 +12180,7 @@ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, } if (e.charAt(0) === '/' && !this.nomount) { - e = path$1.join(this.root, e); + e = path__default['default'].join(this.root, e); } this._emitMatch(index, e); } @@ -12219,7 +12241,7 @@ GlobSync.prototype._readdirInGlobStar = function (abs) { var entries; var lstat; try { - lstat = fs$1.lstatSync(abs); + lstat = fs__default['default'].lstatSync(abs); } catch (er) { if (er.code === 'ENOENT') { // lstat failed, doesn't exist @@ -12255,7 +12277,7 @@ GlobSync.prototype._readdir = function (abs, inGlobStar) { } try { - return this._readdirEntries(abs, fs$1.readdirSync(abs)) + return this._readdirEntries(abs, fs__default['default'].readdirSync(abs)) } catch (er) { this._readdirError(abs, er); return null @@ -12369,9 +12391,9 @@ GlobSync.prototype._processSimple = function (prefix, index) { if (prefix && pathIsAbsolute(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix); if (prefix.charAt(0) === '/') { - prefix = path$1.join(this.root, prefix); + prefix = path__default['default'].join(this.root, prefix); } else { - prefix = path$1.resolve(this.root, prefix); + prefix = path__default['default'].resolve(this.root, prefix); if (trail) prefix += '/'; } @@ -12412,7 +12434,7 @@ GlobSync.prototype._stat = function (f) { if (!stat) { var lstat; try { - lstat = fs$1.lstatSync(abs); + lstat = fs__default['default'].lstatSync(abs); } catch (er) { if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { this.statCache[abs] = false; @@ -12422,7 +12444,7 @@ GlobSync.prototype._stat = function (f) { if (lstat && lstat.isSymbolicLink()) { try { - stat = fs$1.statSync(abs); + stat = fs__default['default'].statSync(abs); } catch (er) { stat = lstat; } @@ -12626,7 +12648,7 @@ function slice$2 (args) { var glob_1 = glob; -var EE = events.EventEmitter; +var EE = events__default['default'].EventEmitter; var setopts$2 = common$2.setopts; var ownProp$2 = common$2.ownProp; @@ -12760,7 +12782,7 @@ function Glob (pattern, options, cb) { } Glob.prototype._finish = function () { - assert(this instanceof Glob); + assert__default['default'](this instanceof Glob); if (this.aborted) return @@ -12870,8 +12892,8 @@ Glob.prototype.resume = function () { }; Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === 'function'); + assert__default['default'](this instanceof Glob); + assert__default['default'](typeof cb === 'function'); if (this.aborted) return @@ -13000,7 +13022,7 @@ Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, in } if (e.charAt(0) === '/' && !this.nomount) { - e = path$1.join(this.root, e); + e = path__default['default'].join(this.root, e); } this._emitMatch(index, e); } @@ -13076,7 +13098,7 @@ Glob.prototype._readdirInGlobStar = function (abs, cb) { var lstatcb = inflight_1(lstatkey, lstatcb_); if (lstatcb) - fs$1.lstat(abs, lstatcb); + fs__default['default'].lstat(abs, lstatcb); function lstatcb_ (er, lstat) { if (er && er.code === 'ENOENT') @@ -13115,7 +13137,7 @@ Glob.prototype._readdir = function (abs, inGlobStar, cb) { if (Array.isArray(c)) return cb(null, c) } - fs$1.readdir(abs, readdirCb(this, abs, cb)); + fs__default['default'].readdir(abs, readdirCb(this, abs, cb)); }; function readdirCb (self, abs, cb) { @@ -13261,9 +13283,9 @@ Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { if (prefix && pathIsAbsolute(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix); if (prefix.charAt(0) === '/') { - prefix = path$1.join(this.root, prefix); + prefix = path__default['default'].join(this.root, prefix); } else { - prefix = path$1.resolve(this.root, prefix); + prefix = path__default['default'].resolve(this.root, prefix); if (trail) prefix += '/'; } @@ -13317,13 +13339,13 @@ Glob.prototype._stat = function (f, cb) { var self = this; var statcb = inflight_1('stat\0' + abs, lstatcb_); if (statcb) - fs$1.lstat(abs, statcb); + fs__default['default'].lstat(abs, statcb); function lstatcb_ (er, lstat) { if (lstat && lstat.isSymbolicLink()) { // If it's a symlink, then treat it as the target, unless // the target does not exist, then treat it as a file. - return fs$1.stat(abs, function (er, stat) { + return fs__default['default'].stat(abs, function (er, stat) { if (er) self._stat2(f, abs, null, lstat, cb); else @@ -13519,8 +13541,8 @@ function replaceExt(npath, ext) { return npath; } - var nFileName = path$1.basename(npath, path$1.extname(npath)) + ext; - return path$1.join(path$1.dirname(npath), nFileName); + var nFileName = path__default['default'].basename(npath, path__default['default'].extname(npath)) + ext; + return path__default['default'].join(path__default['default'].dirname(npath), nFileName); } var replaceExt_1 = replaceExt; @@ -13608,26 +13630,26 @@ function setPath(path) { } function getDirname() { - return typeof this.path === 'string' ? path$1.dirname(this.path) : undefined + return typeof this.path === 'string' ? path__default['default'].dirname(this.path) : undefined } function setDirname(dirname) { assertPath(this.path, 'dirname'); - this.path = path$1.join(dirname || '', this.basename); + this.path = path__default['default'].join(dirname || '', this.basename); } function getBasename() { - return typeof this.path === 'string' ? path$1.basename(this.path) : undefined + return typeof this.path === 'string' ? path__default['default'].basename(this.path) : undefined } function setBasename(basename) { assertNonEmpty(basename, 'basename'); assertPart(basename, 'basename'); - this.path = path$1.join(this.dirname || '', basename); + this.path = path__default['default'].join(this.dirname || '', basename); } function getExtname() { - return typeof this.path === 'string' ? path$1.extname(this.path) : undefined + return typeof this.path === 'string' ? path__default['default'].extname(this.path) : undefined } function setExtname(extname) { @@ -13651,14 +13673,14 @@ function setExtname(extname) { function getStem() { return typeof this.path === 'string' - ? path$1.basename(this.path, this.extname) + ? path__default['default'].basename(this.path, this.extname) : undefined } function setStem(stem) { assertNonEmpty(stem, 'stem'); assertPart(stem, 'stem'); - this.path = path$1.join(this.dirname || '', stem + (this.extname || '')); + this.path = path__default['default'].join(this.dirname || '', stem + (this.extname || '')); } // Get the value of the file. @@ -13669,9 +13691,9 @@ function toString(encoding) { // Assert that `part` is not a path (i.e., does not contain `path.sep`). function assertPart(part, name) { - if (part.indexOf(path$1.sep) !== -1) { + if (part.indexOf(path__default['default'].sep) !== -1) { throw new Error( - '`' + name + '` cannot be a path: did not expect `' + path$1.sep + '`' + '`' + name + '` cannot be a path: did not expect `' + path__default['default'].sep + '`' ) } } @@ -13754,15 +13776,15 @@ var write = writeSync; // Create a virtual file and read it in, synchronously. function readSync(description, options) { var file = core$2(description); - file.contents = fs$1.readFileSync(path$1.resolve(file.cwd, file.path), options); + file.contents = fs__default['default'].readFileSync(path__default['default'].resolve(file.cwd, file.path), options); return file } // Create a virtual file and write it out, synchronously. function writeSync(description, options) { var file = core$2(description); - fs$1.writeFileSync( - path$1.resolve(file.cwd, file.path), + fs__default['default'].writeFileSync( + path__default['default'].resolve(file.cwd, file.path), file.contents || '', options ); @@ -13800,12 +13822,12 @@ function read$3(description, options, callback) { var fp; try { - fp = path$1.resolve(file.cwd, file.path); + fp = path__default['default'].resolve(file.cwd, file.path); } catch (error) { return reject(error) } - fs$1.readFile(fp, options, done); + fs__default['default'].readFile(fp, options, done); function done(error, res) { if (error) { @@ -13842,12 +13864,12 @@ function write$1(description, options, callback) { var fp; try { - fp = path$1.resolve(file.cwd, file.path); + fp = path__default['default'].resolve(file.cwd, file.path); } catch (error) { return reject(error) } - fs$1.writeFile(fp, file.contents || '', options, done); + fs__default['default'].writeFile(fp, file.contents || '', options, done); function done(error) { if (error) { @@ -13873,14 +13895,14 @@ core$2.writeSync = sync$4.write; var toVfile = fs; -var readdir = fs$1.readdir; -var stat = fs$1.stat; -var sep$1 = path$1.sep; -var join$1 = path$1.join; -var relative$2 = path$1.relative; -var resolve$3 = path$1.resolve; -var basename = path$1.basename; -var extname = path$1.extname; +var readdir = fs__default['default'].readdir; +var stat = fs__default['default'].stat; +var sep$1 = path__default['default'].sep; +var join$1 = path__default['default'].join; +var relative$2 = path__default['default'].relative; +var resolve$3 = path__default['default'].resolve; +var basename = path__default['default'].basename; +var extname = path__default['default'].extname; var magic = glob_1.hasMagic; var finder$1 = find; @@ -13988,7 +14010,7 @@ function search(input, options, next) { // Normalise globs. if (typeof file === 'string') { - file = file.split('/').join(path$1.sep); + file = file.split('/').join(path__default['default'].sep); } part = base(file); @@ -14928,7 +14950,7 @@ var typedarray_9 = typedarray.Float32Array; var typedarray_10 = typedarray.Float64Array; var typedarray_11 = typedarray.DataView; -var Writable = stream.Writable; +var Writable = stream__default['default'].Writable; @@ -15123,7 +15145,7 @@ function stdin(context, settings, next) { } } -var inherits$1 = util$2.inherits; +var inherits$1 = util__default['default'].inherits; @@ -15142,13 +15164,13 @@ function FileSet() { self.pipeline = trough_1(); self.plugins = []; - events.init.call(self); + events__default['default'].init.call(self); self.on('one', one.bind(self)); } // Events. -inherits$1(FileSet, events.EventEmitter); +inherits$1(FileSet, events__default['default'].EventEmitter); // Expose methods. FileSet.prototype.valueOf = valueOf; @@ -15239,8 +15261,8 @@ var debug$2 = src('unified-engine:file-pipeline:read'); var read_1$1 = read$4; -var resolve$4 = path$1.resolve; -var readFile = fs$1.readFile; +var resolve$4 = path__default['default'].resolve; +var readFile = fs__default['default'].readFile; // Fill a file with its contents when not already filled. function read$4(context, file, fileSet, next) { @@ -15541,7 +15563,7 @@ function queue(context, file, fileSet, next) { var color = true; try { - color = 'inspect' in util$2; + color = 'inspect' in util__default['default']; } catch (_) { /* istanbul ignore next - browser */ color = false; @@ -15797,10 +15819,10 @@ var debug$8 = src('unified-engine:file-pipeline:copy'); var copy_1 = copy; -var stat$1 = fs$1.stat; -var dirname$2 = path$1.dirname; -var resolve$5 = path$1.resolve; -var relative$3 = path$1.relative; +var stat$1 = fs__default['default'].stat; +var dirname$2 = path__default['default'].dirname; +var resolve$5 = path__default['default'].resolve; +var relative$3 = path__default['default'].relative; // Move a file. function copy(context, file, fileSet, next) { @@ -15824,7 +15846,7 @@ function copy(context, file, fileSet, next) { if (error) { if ( error.code !== 'ENOENT' || - output.charAt(output.length - 1) === path$1.sep + output.charAt(output.length - 1) === path__default['default'].sep ) { return next( new Error('Cannot read output directory. Error:\n' + error.message) @@ -15888,8 +15910,8 @@ var debug$a = src('unified-engine:file-pipeline:file-system'); var fileSystem_1$1 = fileSystem$1; -var writeFile = fs$1.writeFile; -var resolve$6 = path$1.resolve; +var writeFile = fs__default['default'].writeFile; +var resolve$6 = path__default['default'].resolve; // Write a virtual file to the file-system. // Ignored when `output` is not given. @@ -16093,7 +16115,7 @@ function supportsColor$2(stream) { // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows // release that supports 256 colors. Windows 10 build 14931 is the first release // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); + const osRelease = os__default['default'].release().split('.'); if ( Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && @@ -16745,7 +16767,7 @@ var fileSetPipeline = trough_1() .use(transform_1$1) .use(log_1); -var PassThrough = stream.PassThrough; +var PassThrough = stream__default['default'].PassThrough; @@ -18781,7 +18803,7 @@ var constants = { CHAR_VERTICAL_LINE: 124, /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - SEP: path$1.sep, + SEP: path__default['default'].sep, /** * Create EXTGLOB_CHARS @@ -18841,7 +18863,7 @@ exports.isWindows = options => { if (options && typeof options.windows === 'boolean') { return options.windows; } - return win32 === true || path$1.sep === '\\'; + return win32 === true || path__default['default'].sep === '\\'; }; exports.escapeLast = (input, char, lastIdx) => { @@ -20493,7 +20515,7 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => { picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path$1.basename(input)); + return regex.test(path__default['default'].basename(input)); }; /** @@ -20673,15 +20695,15 @@ var picomatch_1 = picomatch; var picomatch$1 = picomatch_1; -const { Readable } = stream; +const { Readable } = stream__default['default']; -const { promisify } = util$2; +const { promisify } = util__default['default']; -const readdir$1 = promisify(fs$1.readdir); -const stat$2 = promisify(fs$1.stat); -const lstat = promisify(fs$1.lstat); -const realpath$2 = promisify(fs$1.realpath); +const readdir$1 = promisify(fs__default['default'].readdir); +const stat$2 = promisify(fs__default['default'].stat); +const lstat = promisify(fs__default['default'].lstat); +const realpath$2 = promisify(fs__default['default'].realpath); /** * @typedef {Object} EntryInfo @@ -20773,8 +20795,8 @@ class ReaddirpStream extends Readable { this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); this._wantsEverything = type === EVERYTHING_TYPE; - this._root = path$1.resolve(root); - this._isDirent = ('Dirent' in fs$1) && !opts.alwaysStat; + this._root = path__default['default'].resolve(root); + this._isDirent = ('Dirent' in fs__default['default']) && !opts.alwaysStat; this._statsProp = this._isDirent ? 'dirent' : 'stats'; this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; @@ -20845,8 +20867,8 @@ class ReaddirpStream extends Readable { let entry; try { const basename = this._isDirent ? dirent.name : dirent; - const fullPath = path$1.resolve(path$1.join(path, basename)); - entry = {path: path$1.relative(this._root, fullPath), fullPath, basename}; + const fullPath = path__default['default'].resolve(path__default['default'].join(path, basename)); + entry = {path: path__default['default'].relative(this._root, fullPath), fullPath, basename}; entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); } catch (err) { this._onError(err); @@ -20885,7 +20907,7 @@ class ReaddirpStream extends Readable { } if (entryRealPathStats.isDirectory()) { const len = entryRealPath.length; - if (full.startsWith(entryRealPath) && full.substr(len, 1) === path$1.sep) { + if (full.startsWith(entryRealPath) && full.substr(len, 1) === path__default['default'].sep) { return this._onError(new Error( `Circular symlink detected: "${full}" points to "${entryRealPath}"` )); @@ -21165,8 +21187,8 @@ var isGlob = function isGlob(str, options) { return false; }; -var pathPosixDirname = path$1.posix.dirname; -var isWin32 = os.platform() === 'win32'; +var pathPosixDirname = path__default['default'].posix.dirname; +var isWin32 = os__default['default'].platform() === 'win32'; var slash = '/'; var backslash = /\\/g; @@ -21752,7 +21774,7 @@ const toRegex = (start, end, options) => { }; const rangeError = (...args) => { - return new RangeError('Invalid range arguments: ' + util$2.inspect(...args)); + return new RangeError('Invalid range arguments: ' + util__default['default'].inspect(...args)); }; const invalidRange = (start, end, options) => { @@ -22864,11 +22886,11 @@ var binaryExtensions$2 = require$$0$1; const extensions = new Set(binaryExtensions$2); -var isBinaryPath = filePath => extensions.has(path$1.extname(filePath).slice(1).toLowerCase()); +var isBinaryPath = filePath => extensions.has(path__default['default'].extname(filePath).slice(1).toLowerCase()); var constants$2 = createCommonjsModule(function (module, exports) { -const {sep} = path$1; +const {sep} = path__default['default']; const {platform} = process; exports.EV_ALL = 'all'; @@ -22982,7 +23004,7 @@ var constants_49 = constants$2.isWindows; var constants_50 = constants$2.isMacos; var constants_51 = constants$2.isLinux; -const { promisify: promisify$1 } = util$2; +const { promisify: promisify$1 } = util__default['default']; const { isWindows: isWindows$1, @@ -23005,11 +23027,11 @@ const { const THROTTLE_MODE_WATCH = 'watch'; -const open = promisify$1(fs$1.open); -const stat$3 = promisify$1(fs$1.stat); -const lstat$1 = promisify$1(fs$1.lstat); -const close = promisify$1(fs$1.close); -const fsrealpath = promisify$1(fs$1.realpath); +const open = promisify$1(fs__default['default'].open); +const stat$3 = promisify$1(fs__default['default'].stat); +const lstat$1 = promisify$1(fs__default['default'].lstat); +const close = promisify$1(fs__default['default'].close); +const fsrealpath = promisify$1(fs__default['default'].realpath); const statMethods = { lstat: lstat$1, stat: stat$3 }; @@ -23091,12 +23113,12 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { // case the file's watcher misses it (and rely on throttling to de-dupe) if (evPath && path !== evPath) { fsWatchBroadcast( - path$1.resolve(path, evPath), KEY_LISTENERS, path$1.join(path, evPath) + path__default['default'].resolve(path, evPath), KEY_LISTENERS, path__default['default'].join(path, evPath) ); } }; try { - return fs$1.watch(path, options, handleEvent); + return fs__default['default'].watch(path, options, handleEvent); } catch (error) { errHandler(error); } @@ -23225,7 +23247,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => { // doesn't seem worthwhile for the added complexity. listeners = cont.listeners; rawEmitters = cont.rawEmitters; - fs$1.unwatchFile(fullPath); + fs__default['default'].unwatchFile(fullPath); cont = undefined; } @@ -23242,7 +23264,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => { listeners: listener, rawEmitters: rawEmitter, options, - watcher: fs$1.watchFile(fullPath, options, (curr, prev) => { + watcher: fs__default['default'].watchFile(fullPath, options, (curr, prev) => { foreach(cont.rawEmitters, (rawEmitter) => { rawEmitter(EV_CHANGE, fullPath, {curr, prev}); }); @@ -23263,7 +23285,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => { delFromSet(cont, KEY_RAW, rawEmitter); if (isEmptySet(cont.listeners)) { FsWatchFileInstances.delete(fullPath); - fs$1.unwatchFile(fullPath); + fs__default['default'].unwatchFile(fullPath); cont.options = cont.watcher = undefined; Object.freeze(cont); } @@ -23291,11 +23313,11 @@ constructor(fsW) { */ _watchWithNodeFs(path, listener) { const opts = this.fsw.options; - const directory = path$1.dirname(path); - const basename = path$1.basename(path); + const directory = path__default['default'].dirname(path); + const basename = path__default['default'].basename(path); const parent = this.fsw._getWatchedDir(directory); parent.add(basename); - const absolutePath = path$1.resolve(path); + const absolutePath = path__default['default'].resolve(path); const options = {persistent: opts.persistent}; if (!listener) listener = EMPTY_FN; @@ -23328,8 +23350,8 @@ _handleFile(file, stats, initialAdd) { if (this.fsw.closed) { return; } - const dirname = path$1.dirname(file); - const basename = path$1.basename(file); + const dirname = path__default['default'].dirname(file); + const basename = path__default['default'].basename(file); const parent = this.fsw._getWatchedDir(dirname); // stats is always present let prevStats = stats; @@ -23427,7 +23449,7 @@ async _handleSymlink(entry, directory, path, item) { _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { // Normalize the directory name on Windows - directory = path$1.join(directory, EMPTY_STR); + directory = path__default['default'].join(directory, EMPTY_STR); if (!wh.hasGlob) { throttler = this.fsw._throttle('readdir', directory, 1000); @@ -23447,7 +23469,7 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { return; } const item = entry.path; - let path = path$1.join(directory, item); + let path = path__default['default'].join(directory, item); current.add(item); if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) { @@ -23465,7 +23487,7 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { this.fsw._incrReadyCount(); // ensure relativeness of path is preserved in case of watcher reuse - path = path$1.join(dir, path$1.relative(dir, path)); + path = path__default['default'].join(dir, path__default['default'].relative(dir, path)); this._addToNodeFs(path, initialAdd, wh, depth + 1); } @@ -23491,7 +23513,7 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { // a path may have been filtered out of this readdir, but // shouldn't be removed because it matches a different glob (!wh.hasGlob || wh.filterPath({ - fullPath: path$1.resolve(directory, item) + fullPath: path__default['default'].resolve(directory, item) })); }).forEach((item) => { this.fsw._remove(directory, item); @@ -23517,14 +23539,14 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { * @returns {Promise} closer for the watcher instance. */ async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) { - const parentDir = this.fsw._getWatchedDir(path$1.dirname(dir)); - const tracked = parentDir.has(path$1.basename(dir)); + const parentDir = this.fsw._getWatchedDir(path__default['default'].dirname(dir)); + const tracked = parentDir.has(path__default['default'].basename(dir)); if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) { if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats); } // ensure dir is tracked (harmless if redundant) - parentDir.add(path$1.basename(dir)); + parentDir.add(path__default['default'].basename(dir)); this.fsw._getWatchedDir(dir); let throttler; let closer; @@ -23594,7 +23616,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) { } else if (stats.isSymbolicLink()) { const targetPath = follow ? await fsrealpath(path) : path; if (this.fsw.closed) return; - const parent = path$1.dirname(wh.watchPath); + const parent = path__default['default'].dirname(wh.watchPath); this.fsw._getWatchedDir(parent).add(wh.watchPath); this.fsw._emit(EV_ADD, wh.watchPath, stats); closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath); @@ -23602,7 +23624,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) { // preserve this symlink's target path if (targetPath !== undefined) { - this.fsw._symlinkPaths.set(path$1.resolve(path), targetPath); + this.fsw._symlinkPaths.set(path__default['default'].resolve(path), targetPath); } } else { closer = this._handleFile(wh.watchPath, stats, initialAdd); @@ -23624,7 +23646,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) { var nodefsHandler = NodeFsHandler; -const { promisify: promisify$2 } = util$2; +const { promisify: promisify$2 } = util__default['default']; let fsevents; try { @@ -23673,9 +23695,9 @@ const { const Depth = (value) => isNaN(value) ? {} : {depth: value}; -const stat$4 = promisify$2(fs$1.stat); -const lstat$2 = promisify$2(fs$1.lstat); -const realpath$3 = promisify$2(fs$1.realpath); +const stat$4 = promisify$2(fs__default['default'].stat); +const lstat$2 = promisify$2(fs__default['default'].lstat); +const realpath$3 = promisify$2(fs__default['default'].realpath); const statMethods$1 = { stat: stat$4, lstat: lstat$2 }; @@ -23726,8 +23748,8 @@ const createFSEventsInstance = (path, callback) => { * @returns {Function} closer */ function setFSEventsListener(path, realPath, listener, rawEmitter) { - let watchPath = path$1.extname(path) ? path$1.dirname(path) : path; - const parentPath = path$1.dirname(watchPath); + let watchPath = path__default['default'].extname(path) ? path__default['default'].dirname(path) : path; + const parentPath = path__default['default'].dirname(watchPath); let cont = FSEventsWatchers.get(watchPath); // If we've accumulated a substantial number of paths that @@ -23738,14 +23760,14 @@ function setFSEventsListener(path, realPath, listener, rawEmitter) { watchPath = parentPath; } - const resolvedPath = path$1.resolve(path); + const resolvedPath = path__default['default'].resolve(path); const hasSymlink = resolvedPath !== realPath; const filteredListener = (fullPath, flags, info) => { if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath); if ( fullPath === resolvedPath || - !fullPath.indexOf(resolvedPath + path$1.sep) + !fullPath.indexOf(resolvedPath + path__default['default'].sep) ) listener(fullPath, flags, info); }; @@ -23753,7 +23775,7 @@ function setFSEventsListener(path, realPath, listener, rawEmitter) { // modifies `watchPath` to the parent path when it finds a match let watchedParent = false; for (const watchedPath of FSEventsWatchers.keys()) { - if (realPath.indexOf(path$1.resolve(watchedPath) + path$1.sep) === 0) { + if (realPath.indexOf(path__default['default'].resolve(watchedPath) + path__default['default'].sep) === 0) { watchPath = watchedPath; cont = FSEventsWatchers.get(watchPath); watchedParent = true; @@ -23818,7 +23840,7 @@ const canUse = () => fsevents && FSEventsWatchers.size < 128; // determines subdirectory traversal levels from root to path const calcDepth = (path, root) => { let i = 0; - while (!path.indexOf(root) && (path = path$1.dirname(path)) !== root) i++; + while (!path.indexOf(root) && (path = path__default['default'].dirname(path)) !== root) i++; return i; }; @@ -23930,13 +23952,13 @@ _watchWithFsEvents(watchPath, realPath, transform, globFilter) { opts.depth !== undefined && calcDepth(fullPath, realPath) > opts.depth ) return; - const path = transform(path$1.join( - watchPath, path$1.relative(watchPath, fullPath) + const path = transform(path__default['default'].join( + watchPath, path__default['default'].relative(watchPath, fullPath) )); if (globFilter && !globFilter(path)) return; // ensure directories are tracked - const parent = path$1.dirname(path); - const item = path$1.basename(path); + const parent = path__default['default'].dirname(path); + const item = path__default['default'].basename(path); const watchedDir = this.fsw._getWatchedDir( info.type === FSEVENT_TYPE_DIRECTORY ? path : parent ); @@ -24012,7 +24034,7 @@ async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) { if (linkTarget && linkTarget !== DOT_SLASH) { aliasedPath = path.replace(linkTarget, linkPath); } else if (path !== DOT_SLASH) { - aliasedPath = path$1.join(linkPath, path); + aliasedPath = path__default['default'].join(linkPath, path); } return transform(aliasedPath); }, false, curDepth); @@ -24031,8 +24053,8 @@ async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) { emitAdd(newPath, stats, processPath, opts, forceAdd) { const pp = processPath(newPath); const isDir = stats.isDirectory(); - const dirObj = this.fsw._getWatchedDir(path$1.dirname(pp)); - const base = path$1.basename(pp); + const dirObj = this.fsw._getWatchedDir(path__default['default'].dirname(pp)); + const base = path__default['default'].basename(pp); // ensure empty dirs get tracked if (isDir) this.fsw._getWatchedDir(pp); @@ -24048,7 +24070,7 @@ initWatch(realPath, path, wh, processPath) { if (this.fsw.closed) return; const closer = this._watchWithFsEvents( wh.watchPath, - path$1.resolve(realPath || wh.watchPath), + path__default['default'].resolve(realPath || wh.watchPath), processPath, wh.globFilter ); @@ -24098,14 +24120,14 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) { } if (entry.stats.isDirectory() && !wh.filterPath(entry)) return; - const joinedPath = path$1.join(wh.watchPath, entry.path); + const joinedPath = path__default['default'].join(wh.watchPath, entry.path); const {fullPath} = entry; if (wh.followSymlinks && entry.stats.isSymbolicLink()) { // preserve the current depth here since it can't be derived from // real paths past the symlink const curDepth = opts.depth === undefined ? - undefined : calcDepth(joinedPath, path$1.resolve(wh.watchPath)) + 1; + undefined : calcDepth(joinedPath, path__default['default'].resolve(wh.watchPath)) + 1; this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth); } else { @@ -24146,10 +24168,10 @@ var fseventsHandler = FsEventsHandler; var canUse_1 = canUse; fseventsHandler.canUse = canUse_1; -const { EventEmitter } = events; +const { EventEmitter } = events__default['default']; -const { promisify: promisify$3 } = util$2; +const { promisify: promisify$3 } = util__default['default']; const anymatch = anymatch_1.default; @@ -24197,8 +24219,8 @@ const { isMacos } = constants$2; -const stat$5 = promisify$3(fs$1.stat); -const readdir$2 = promisify$3(fs$1.readdir); +const stat$5 = promisify$3(fs__default['default'].stat); +const readdir$2 = promisify$3(fs__default['default'].readdir); /** * @typedef {String} Path @@ -24262,21 +24284,21 @@ const toUnix = (string) => { // Our version of upath.normalize // TODO: this is not equal to path-normalize module - investigate why -const normalizePathToUnix = (path) => toUnix(path$1.normalize(toUnix(path))); +const normalizePathToUnix = (path) => toUnix(path__default['default'].normalize(toUnix(path))); const normalizeIgnored = (cwd = EMPTY_STR$1) => (path) => { if (typeof path !== STRING_TYPE) return path; - return normalizePathToUnix(path$1.isAbsolute(path) ? path : path$1.join(cwd, path)); + return normalizePathToUnix(path__default['default'].isAbsolute(path) ? path : path__default['default'].join(cwd, path)); }; const getAbsolutePath = (path, cwd) => { - if (path$1.isAbsolute(path)) { + if (path__default['default'].isAbsolute(path)) { return path; } if (path.startsWith(BANG$1)) { - return BANG$1 + path$1.join(cwd, path.slice(1)); + return BANG$1 + path__default['default'].join(cwd, path.slice(1)); } - return path$1.join(cwd, path); + return path__default['default'].join(cwd, path); }; const undef = (opts, key) => opts[key] === undefined; @@ -24315,7 +24337,7 @@ class DirEntry { await readdir$2(dir); } catch (err) { if (this._removeWatcher) { - this._removeWatcher(path$1.dirname(dir), path$1.basename(dir)); + this._removeWatcher(path__default['default'].dirname(dir), path__default['default'].basename(dir)); } } } @@ -24351,7 +24373,7 @@ class WatchHelper { this.fsw = fsw; this.path = path = path.replace(REPLACER_RE, EMPTY_STR$1); this.watchPath = watchPath; - this.fullWatchPath = path$1.resolve(watchPath); + this.fullWatchPath = path__default['default'].resolve(watchPath); this.hasGlob = watchPath !== path; /** @type {object|boolean} */ if (path === EMPTY_STR$1) this.hasGlob = false; @@ -24381,8 +24403,8 @@ class WatchHelper { } entryPath(entry) { - return path$1.join(this.watchPath, - path$1.relative(this.watchPath, this.checkGlobSymlink(entry)) + return path__default['default'].join(this.watchPath, + path__default['default'].relative(this.watchPath, this.checkGlobSymlink(entry)) ); } @@ -24402,7 +24424,7 @@ class WatchHelper { const parts = []; const expandedPath = path.includes(BRACE_START$1) ? braces_1.expand(path) : [path]; expandedPath.forEach((path) => { - parts.push(path$1.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE)); + parts.push(path__default['default'].relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE)); }); return parts; } @@ -24595,7 +24617,7 @@ add(paths_, _origAdd, _internal) { ).then(results => { if (this.closed) return; results.filter(item => item).forEach(item => { - this.add(path$1.dirname(item), path$1.basename(_origAdd || item)); + this.add(path__default['default'].dirname(item), path__default['default'].basename(_origAdd || item)); }); }); } @@ -24615,9 +24637,9 @@ unwatch(paths_) { paths.forEach((path) => { // convert to absolute path unless relative path already matches - if (!path$1.isAbsolute(path) && !this._closers.has(path)) { - if (cwd) path = path$1.join(cwd, path); - path = path$1.resolve(path); + if (!path__default['default'].isAbsolute(path) && !this._closers.has(path)) { + if (cwd) path = path__default['default'].join(cwd, path); + path = path__default['default'].resolve(path); } this._closePath(path); @@ -24670,7 +24692,7 @@ close() { getWatched() { const watchList = {}; this._watched.forEach((entry, dir) => { - const key = this.options.cwd ? path$1.relative(this.options.cwd, dir) : dir; + const key = this.options.cwd ? path__default['default'].relative(this.options.cwd, dir) : dir; watchList[key || ONE_DOT] = entry.getChildren().sort(); }); return watchList; @@ -24698,8 +24720,8 @@ async _emit(event, path, val1, val2, val3) { if (this.closed) return; const opts = this.options; - if (isWindows$2) path = path$1.normalize(path); - if (opts.cwd) path = path$1.relative(opts.cwd, path); + if (isWindows$2) path = path__default['default'].normalize(path); + if (opts.cwd) path = path__default['default'].relative(opts.cwd, path); /** @type Array */ const args = [event, path]; if (val3 !== undefined) args.push(val1, val2, val3); @@ -24760,7 +24782,7 @@ async _emit(event, path, val1, val2, val3) { if (opts.alwaysStat && val1 === undefined && (event === EV_ADD$2 || event === EV_ADD_DIR$2 || event === EV_CHANGE$2) ) { - const fullPath = opts.cwd ? path$1.join(opts.cwd, path) : path; + const fullPath = opts.cwd ? path__default['default'].join(opts.cwd, path) : path; let stats; try { stats = await stat$5(fullPath); @@ -24842,14 +24864,14 @@ _awaitWriteFinish(path, threshold, event, awfEmit) { let timeoutHandler; let fullPath = path; - if (this.options.cwd && !path$1.isAbsolute(path)) { - fullPath = path$1.join(this.options.cwd, path); + if (this.options.cwd && !path__default['default'].isAbsolute(path)) { + fullPath = path__default['default'].join(this.options.cwd, path); } const now = new Date(); const awaitWriteFinish = (prevStat) => { - fs$1.stat(fullPath, (err, curStat) => { + fs__default['default'].stat(fullPath, (err, curStat) => { if (err || !this._pendingWrites.has(path)) { if (err && err.code !== 'ENOENT') awfEmit(err); return; @@ -24946,7 +24968,7 @@ _getWatchHelpers(path, depth) { */ _getWatchedDir(directory) { if (!this._boundRemove) this._boundRemove = this._remove.bind(this); - const dir = path$1.resolve(directory); + const dir = path__default['default'].resolve(directory); if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove)); return this._watched.get(dir); } @@ -24982,8 +25004,8 @@ _remove(directory, item, isDirectory) { // if what is being deleted is a directory, get that directory's paths // for recursive deleting and cleaning of watched object // if it is not a directory, nestedDirectoryChildren will be empty array - const path = path$1.join(directory, item); - const fullPath = path$1.resolve(path); + const path = path__default['default'].join(directory, item); + const fullPath = path__default['default'].resolve(path); isDirectory = isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath); @@ -25012,7 +25034,7 @@ _remove(directory, item, isDirectory) { // If we wait for this file to be fully written, cancel the wait. let relPath = path; - if (this.options.cwd) relPath = path$1.relative(this.options.cwd, path); + if (this.options.cwd) relPath = path__default['default'].relative(this.options.cwd, path); if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) { const event = this._pendingWrites.get(relPath).cancelWait(); if (event === EV_ADD$2) return; @@ -25037,8 +25059,8 @@ _remove(directory, item, isDirectory) { */ _closePath(path) { this._closeFile(path); - const dir = path$1.dirname(path); - this._getWatchedDir(dir).remove(path$1.basename(path)); + const dir = path__default['default'].dirname(path); + this._getWatchedDir(dir).remove(path__default['default'].basename(path)); } /** @@ -27368,7 +27390,7 @@ var lib$6 = start; var noop$1 = Function.prototype; // Fake TTY stream. -var ttyStream = new stream.Readable(); +var ttyStream = new stream__default['default'].Readable(); ttyStream.isTTY = true; // Exit, lazily, with the correct exit status code. @@ -28119,854 +28141,254 @@ function assertDone(name, asyncName, complete) { } } -var immutable = extend$3; - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend$3() { - var target = {}; - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target -} - -var unherit_1 = unherit; - -// Create a custom constructor which can be modified without affecting the -// original class. -function unherit(Super) { - var result; - var key; - var value; - - inherits(Of, Super); - inherits(From, Of); - - // Clone values. - result = Of.prototype; - - for (key in result) { - value = result[key]; - - if (value && typeof value === 'object') { - result[key] = 'concat' in value ? value.concat() : immutable(value); - } - } - - return Of - - // Constructor accepting a single argument, which itself is an `arguments` - // object. - function From(parameters) { - return Super.apply(this, parameters) - } - - // Constructor accepting variadic arguments. - function Of() { - if (!(this instanceof Of)) { - return new From(arguments) - } - - return Super.apply(this, arguments) - } -} - -var stateToggle = factory$1; - -// Construct a state `toggler`: a function which inverses `property` in context -// based on its current value. -// The by `toggler` returned function restores that value. -function factory$1(key, state, ctx) { - return enter - - function enter() { - var context = ctx || this; - var current = context[key]; - - context[key] = !state; - - return exit - - function exit() { - context[key] = current; - } - } -} - -var vfileLocation = factory$2; - -function factory$2(file) { - var contents = indices(String(file)); - var toPoint = offsetToPointFactory(contents); - - return { - toPoint: toPoint, - toPosition: toPoint, - toOffset: pointToOffsetFactory(contents) - } -} - -// Factory to get the line and column-based `point` for `offset` in the bound -// indices. -function offsetToPointFactory(indices) { - return offsetToPoint - - // Get the line and column-based `point` for `offset` in the bound indices. - function offsetToPoint(offset) { - var index = -1; - var length = indices.length; - - if (offset < 0) { - return {} - } - - while (++index < length) { - if (indices[index] > offset) { - return { - line: index + 1, - column: offset - (indices[index - 1] || 0) + 1, - offset: offset - } - } - } - - return {} - } -} - -// Factory to get the `offset` for a line and column-based `point` in the -// bound indices. -function pointToOffsetFactory(indices) { - return pointToOffset - - // Get the `offset` for a line and column-based `point` in the bound - // indices. - function pointToOffset(point) { - var line = point && point.line; - var column = point && point.column; - - if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { - return (indices[line - 2] || 0) + column - 1 || 0 - } - - return -1 - } -} - -// Get indices of line-breaks in `value`. -function indices(value) { - var result = []; - var index = value.indexOf('\n'); - - while (index !== -1) { - result.push(index + 1); - index = value.indexOf('\n', index + 1); - } - - result.push(value.length + 1); - - return result -} - -var _unescape = factory$3; - -var backslash$1 = '\\'; - -// Factory to de-escape a value, based on a list at `key` in `ctx`. -function factory$3(ctx, key) { - return unescape - - // De-escape a string using the expression at `key` in `ctx`. - function unescape(value) { - var previous = 0; - var index = value.indexOf(backslash$1); - var escape = ctx[key]; - var queue = []; - var character; - - while (index !== -1) { - queue.push(value.slice(previous, index)); - previous = index + 1; - character = value.charAt(previous); - - // If the following character is not a valid escape, add the slash. - if (!character || escape.indexOf(character) === -1) { - queue.push(backslash$1); - } - - index = value.indexOf(backslash$1, previous + 1); - } - - queue.push(value.slice(previous)); - - return queue.join('') - } -} - +const AEli = "Æ"; const AElig = "Æ"; +const AM = "&"; const AMP = "&"; +const Aacut = "Á"; const Aacute = "Á"; +const Abreve = "Ă"; +const Acir = "Â"; const Acirc = "Â"; +const Acy = "А"; +const Afr = "𝔄"; +const Agrav = "À"; const Agrave = "À"; +const Alpha = "Α"; +const Amacr = "Ā"; +const And = "⩓"; +const Aogon = "Ą"; +const Aopf = "𝔸"; +const ApplyFunction = "⁡"; +const Arin = "Å"; const Aring = "Å"; +const Ascr = "𝒜"; +const Assign = "≔"; +const Atild = "Ã"; const Atilde = "Ã"; +const Aum = "Ä"; const Auml = "Ä"; +const Backslash = "∖"; +const Barv = "⫧"; +const Barwed = "⌆"; +const Bcy = "Б"; +const Because = "∵"; +const Bernoullis = "ℬ"; +const Beta = "Β"; +const Bfr = "𝔅"; +const Bopf = "𝔹"; +const Breve = "˘"; +const Bscr = "ℬ"; +const Bumpeq = "≎"; +const CHcy = "Ч"; +const COP = "©"; const COPY = "©"; +const Cacute = "Ć"; +const Cap = "⋒"; +const CapitalDifferentialD = "ⅅ"; +const Cayleys = "ℭ"; +const Ccaron = "Č"; +const Ccedi = "Ç"; const Ccedil = "Ç"; +const Ccirc = "Ĉ"; +const Cconint = "∰"; +const Cdot = "Ċ"; +const Cedilla = "¸"; +const CenterDot = "·"; +const Cfr = "ℭ"; +const Chi = "Χ"; +const CircleDot = "⊙"; +const CircleMinus = "⊖"; +const CirclePlus = "⊕"; +const CircleTimes = "⊗"; +const ClockwiseContourIntegral = "∲"; +const CloseCurlyDoubleQuote = "”"; +const CloseCurlyQuote = "’"; +const Colon = "∷"; +const Colone = "⩴"; +const Congruent = "≡"; +const Conint = "∯"; +const ContourIntegral = "∮"; +const Copf = "ℂ"; +const Coproduct = "∐"; +const CounterClockwiseContourIntegral = "∳"; +const Cross = "⨯"; +const Cscr = "𝒞"; +const Cup = "⋓"; +const CupCap = "≍"; +const DD = "ⅅ"; +const DDotrahd = "⤑"; +const DJcy = "Ђ"; +const DScy = "Ѕ"; +const DZcy = "Џ"; +const Dagger = "‡"; +const Darr = "↡"; +const Dashv = "⫤"; +const Dcaron = "Ď"; +const Dcy = "Д"; +const Del = "∇"; +const Delta = "Δ"; +const Dfr = "𝔇"; +const DiacriticalAcute = "´"; +const DiacriticalDot = "˙"; +const DiacriticalDoubleAcute = "˝"; +const DiacriticalGrave = "`"; +const DiacriticalTilde = "˜"; +const Diamond = "⋄"; +const DifferentialD = "ⅆ"; +const Dopf = "𝔻"; +const Dot = "¨"; +const DotDot = "⃜"; +const DotEqual = "≐"; +const DoubleContourIntegral = "∯"; +const DoubleDot = "¨"; +const DoubleDownArrow = "⇓"; +const DoubleLeftArrow = "⇐"; +const DoubleLeftRightArrow = "⇔"; +const DoubleLeftTee = "⫤"; +const DoubleLongLeftArrow = "⟸"; +const DoubleLongLeftRightArrow = "⟺"; +const DoubleLongRightArrow = "⟹"; +const DoubleRightArrow = "⇒"; +const DoubleRightTee = "⊨"; +const DoubleUpArrow = "⇑"; +const DoubleUpDownArrow = "⇕"; +const DoubleVerticalBar = "∥"; +const DownArrow = "↓"; +const DownArrowBar = "⤓"; +const DownArrowUpArrow = "⇵"; +const DownBreve = "̑"; +const DownLeftRightVector = "⥐"; +const DownLeftTeeVector = "⥞"; +const DownLeftVector = "↽"; +const DownLeftVectorBar = "⥖"; +const DownRightTeeVector = "⥟"; +const DownRightVector = "⇁"; +const DownRightVectorBar = "⥗"; +const DownTee = "⊤"; +const DownTeeArrow = "↧"; +const Downarrow = "⇓"; +const Dscr = "𝒟"; +const Dstrok = "Đ"; +const ENG = "Ŋ"; +const ET = "Ð"; const ETH = "Ð"; +const Eacut = "É"; const Eacute = "É"; +const Ecaron = "Ě"; +const Ecir = "Ê"; const Ecirc = "Ê"; +const Ecy = "Э"; +const Edot = "Ė"; +const Efr = "𝔈"; +const Egrav = "È"; const Egrave = "È"; +const Element = "∈"; +const Emacr = "Ē"; +const EmptySmallSquare = "◻"; +const EmptyVerySmallSquare = "▫"; +const Eogon = "Ę"; +const Eopf = "𝔼"; +const Epsilon = "Ε"; +const Equal = "⩵"; +const EqualTilde = "≂"; +const Equilibrium = "⇌"; +const Escr = "ℰ"; +const Esim = "⩳"; +const Eta = "Η"; +const Eum = "Ë"; const Euml = "Ë"; +const Exists = "∃"; +const ExponentialE = "ⅇ"; +const Fcy = "Ф"; +const Ffr = "𝔉"; +const FilledSmallSquare = "◼"; +const FilledVerySmallSquare = "▪"; +const Fopf = "𝔽"; +const ForAll = "∀"; +const Fouriertrf = "ℱ"; +const Fscr = "ℱ"; +const GJcy = "Ѓ"; +const G = ">"; const GT = ">"; +const Gamma = "Γ"; +const Gammad = "Ϝ"; +const Gbreve = "Ğ"; +const Gcedil = "Ģ"; +const Gcirc = "Ĝ"; +const Gcy = "Г"; +const Gdot = "Ġ"; +const Gfr = "𝔊"; +const Gg = "⋙"; +const Gopf = "𝔾"; +const GreaterEqual = "≥"; +const GreaterEqualLess = "⋛"; +const GreaterFullEqual = "≧"; +const GreaterGreater = "⪢"; +const GreaterLess = "≷"; +const GreaterSlantEqual = "⩾"; +const GreaterTilde = "≳"; +const Gscr = "𝒢"; +const Gt = "≫"; +const HARDcy = "Ъ"; +const Hacek = "ˇ"; +const Hat = "^"; +const Hcirc = "Ĥ"; +const Hfr = "ℌ"; +const HilbertSpace = "ℋ"; +const Hopf = "ℍ"; +const HorizontalLine = "─"; +const Hscr = "ℋ"; +const Hstrok = "Ħ"; +const HumpDownHump = "≎"; +const HumpEqual = "≏"; +const IEcy = "Е"; +const IJlig = "IJ"; +const IOcy = "Ё"; +const Iacut = "Í"; const Iacute = "Í"; +const Icir = "Î"; const Icirc = "Î"; +const Icy = "И"; +const Idot = "İ"; +const Ifr = "ℑ"; +const Igrav = "Ì"; const Igrave = "Ì"; +const Im = "ℑ"; +const Imacr = "Ī"; +const ImaginaryI = "ⅈ"; +const Implies = "⇒"; +const Int = "∬"; +const Integral = "∫"; +const Intersection = "⋂"; +const InvisibleComma = "⁣"; +const InvisibleTimes = "⁢"; +const Iogon = "Į"; +const Iopf = "𝕀"; +const Iota = "Ι"; +const Iscr = "ℐ"; +const Itilde = "Ĩ"; +const Iukcy = "І"; +const Ium = "Ï"; const Iuml = "Ï"; +const Jcirc = "Ĵ"; +const Jcy = "Й"; +const Jfr = "𝔍"; +const Jopf = "𝕁"; +const Jscr = "𝒥"; +const Jsercy = "Ј"; +const Jukcy = "Є"; +const KHcy = "Х"; +const KJcy = "Ќ"; +const Kappa = "Κ"; +const Kcedil = "Ķ"; +const Kcy = "К"; +const Kfr = "𝔎"; +const Kopf = "𝕂"; +const Kscr = "𝒦"; +const LJcy = "Љ"; +const L = "<"; const LT = "<"; -const Ntilde = "Ñ"; -const Oacute = "Ó"; -const Ocirc = "Ô"; -const Ograve = "Ò"; -const Oslash = "Ø"; -const Otilde = "Õ"; -const Ouml = "Ö"; -const QUOT = "\""; -const REG = "®"; -const THORN = "Þ"; -const Uacute = "Ú"; -const Ucirc = "Û"; -const Ugrave = "Ù"; -const Uuml = "Ü"; -const Yacute = "Ý"; -const aacute = "á"; -const acirc = "â"; -const acute = "´"; -const aelig = "æ"; -const agrave = "à"; -const amp = "&"; -const aring = "å"; -const atilde = "ã"; -const auml = "ä"; -const brvbar = "¦"; -const ccedil = "ç"; -const cedil = "¸"; -const cent = "¢"; -const copy$1 = "©"; -const curren = "¤"; -const deg = "°"; -const divide = "÷"; -const eacute = "é"; -const ecirc = "ê"; -const egrave = "è"; -const eth = "ð"; -const euml = "ë"; -const frac12 = "½"; -const frac14 = "¼"; -const frac34 = "¾"; -const gt = ">"; -const iacute = "í"; -const icirc = "î"; -const iexcl = "¡"; -const igrave = "ì"; -const iquest = "¿"; -const iuml = "ï"; -const laquo = "«"; -const lt = "<"; -const macr = "¯"; -const micro = "µ"; -const middot = "·"; -const nbsp = " "; -const not = "¬"; -const ntilde = "ñ"; -const oacute = "ó"; -const ocirc = "ô"; -const ograve = "ò"; -const ordf = "ª"; -const ordm = "º"; -const oslash = "ø"; -const otilde = "õ"; -const ouml = "ö"; -const para = "¶"; -const plusmn = "±"; -const pound = "£"; -const quot = "\""; -const raquo = "»"; -const reg = "®"; -const sect = "§"; -const shy = "­"; -const sup1 = "¹"; -const sup2 = "²"; -const sup3 = "³"; -const szlig = "ß"; -const thorn = "þ"; -const times = "×"; -const uacute = "ú"; -const ucirc = "û"; -const ugrave = "ù"; -const uml = "¨"; -const uuml = "ü"; -const yacute = "ý"; -const yen = "¥"; -const yuml = "ÿ"; -var index$1 = { - AElig: AElig, - AMP: AMP, - Aacute: Aacute, - Acirc: Acirc, - Agrave: Agrave, - Aring: Aring, - Atilde: Atilde, - Auml: Auml, - COPY: COPY, - Ccedil: Ccedil, - ETH: ETH, - Eacute: Eacute, - Ecirc: Ecirc, - Egrave: Egrave, - Euml: Euml, - GT: GT, - Iacute: Iacute, - Icirc: Icirc, - Igrave: Igrave, - Iuml: Iuml, - LT: LT, - Ntilde: Ntilde, - Oacute: Oacute, - Ocirc: Ocirc, - Ograve: Ograve, - Oslash: Oslash, - Otilde: Otilde, - Ouml: Ouml, - QUOT: QUOT, - REG: REG, - THORN: THORN, - Uacute: Uacute, - Ucirc: Ucirc, - Ugrave: Ugrave, - Uuml: Uuml, - Yacute: Yacute, - aacute: aacute, - acirc: acirc, - acute: acute, - aelig: aelig, - agrave: agrave, - amp: amp, - aring: aring, - atilde: atilde, - auml: auml, - brvbar: brvbar, - ccedil: ccedil, - cedil: cedil, - cent: cent, - copy: copy$1, - curren: curren, - deg: deg, - divide: divide, - eacute: eacute, - ecirc: ecirc, - egrave: egrave, - eth: eth, - euml: euml, - frac12: frac12, - frac14: frac14, - frac34: frac34, - gt: gt, - iacute: iacute, - icirc: icirc, - iexcl: iexcl, - igrave: igrave, - iquest: iquest, - iuml: iuml, - laquo: laquo, - lt: lt, - macr: macr, - micro: micro, - middot: middot, - nbsp: nbsp, - not: not, - ntilde: ntilde, - oacute: oacute, - ocirc: ocirc, - ograve: ograve, - ordf: ordf, - ordm: ordm, - oslash: oslash, - otilde: otilde, - ouml: ouml, - para: para, - plusmn: plusmn, - pound: pound, - quot: quot, - raquo: raquo, - reg: reg, - sect: sect, - shy: shy, - sup1: sup1, - sup2: sup2, - sup3: sup3, - szlig: szlig, - thorn: thorn, - times: times, - uacute: uacute, - ucirc: ucirc, - ugrave: ugrave, - uml: uml, - uuml: uuml, - yacute: yacute, - yen: yen, - yuml: yuml -}; - -var characterEntitiesLegacy = /*#__PURE__*/Object.freeze({ - __proto__: null, - AElig: AElig, - AMP: AMP, - Aacute: Aacute, - Acirc: Acirc, - Agrave: Agrave, - Aring: Aring, - Atilde: Atilde, - Auml: Auml, - COPY: COPY, - Ccedil: Ccedil, - ETH: ETH, - Eacute: Eacute, - Ecirc: Ecirc, - Egrave: Egrave, - Euml: Euml, - GT: GT, - Iacute: Iacute, - Icirc: Icirc, - Igrave: Igrave, - Iuml: Iuml, - LT: LT, - Ntilde: Ntilde, - Oacute: Oacute, - Ocirc: Ocirc, - Ograve: Ograve, - Oslash: Oslash, - Otilde: Otilde, - Ouml: Ouml, - QUOT: QUOT, - REG: REG, - THORN: THORN, - Uacute: Uacute, - Ucirc: Ucirc, - Ugrave: Ugrave, - Uuml: Uuml, - Yacute: Yacute, - aacute: aacute, - acirc: acirc, - acute: acute, - aelig: aelig, - agrave: agrave, - amp: amp, - aring: aring, - atilde: atilde, - auml: auml, - brvbar: brvbar, - ccedil: ccedil, - cedil: cedil, - cent: cent, - copy: copy$1, - curren: curren, - deg: deg, - divide: divide, - eacute: eacute, - ecirc: ecirc, - egrave: egrave, - eth: eth, - euml: euml, - frac12: frac12, - frac14: frac14, - frac34: frac34, - gt: gt, - iacute: iacute, - icirc: icirc, - iexcl: iexcl, - igrave: igrave, - iquest: iquest, - iuml: iuml, - laquo: laquo, - lt: lt, - macr: macr, - micro: micro, - middot: middot, - nbsp: nbsp, - not: not, - ntilde: ntilde, - oacute: oacute, - ocirc: ocirc, - ograve: ograve, - ordf: ordf, - ordm: ordm, - oslash: oslash, - otilde: otilde, - ouml: ouml, - para: para, - plusmn: plusmn, - pound: pound, - quot: quot, - raquo: raquo, - reg: reg, - sect: sect, - shy: shy, - sup1: sup1, - sup2: sup2, - sup3: sup3, - szlig: szlig, - thorn: thorn, - times: times, - uacute: uacute, - ucirc: ucirc, - ugrave: ugrave, - uml: uml, - uuml: uuml, - yacute: yacute, - yen: yen, - yuml: yuml, - 'default': index$1 -}); - -var index$2 = { - "0": "�", - "128": "€", - "130": "‚", - "131": "ƒ", - "132": "„", - "133": "…", - "134": "†", - "135": "‡", - "136": "ˆ", - "137": "‰", - "138": "Š", - "139": "‹", - "140": "Œ", - "142": "Ž", - "145": "‘", - "146": "’", - "147": "“", - "148": "”", - "149": "•", - "150": "–", - "151": "—", - "152": "˜", - "153": "™", - "154": "š", - "155": "›", - "156": "œ", - "158": "ž", - "159": "Ÿ" -}; - -var characterReferenceInvalid = /*#__PURE__*/Object.freeze({ - __proto__: null, - 'default': index$2 -}); - -var isDecimal = decimal; - -// Check if the given character code, or the character code at the first -// character, is decimal. -function decimal(character) { - var code = typeof character === 'string' ? character.charCodeAt(0) : character; - - return code >= 48 && code <= 57 /* 0-9 */ -} - -var isHexadecimal = hexadecimal; - -// Check if the given character code, or the character code at the first -// character, is hexadecimal. -function hexadecimal(character) { - var code = typeof character === 'string' ? character.charCodeAt(0) : character; - - return ( - (code >= 97 /* a */ && code <= 102) /* z */ || - (code >= 65 /* A */ && code <= 70) /* Z */ || - (code >= 48 /* A */ && code <= 57) /* Z */ - ) -} - -var isAlphabetical = alphabetical; - -// Check if the given character code, or the character code at the first -// character, is alphabetical. -function alphabetical(character) { - var code = typeof character === 'string' ? character.charCodeAt(0) : character; - - return ( - (code >= 97 && code <= 122) /* a-z */ || - (code >= 65 && code <= 90) /* A-Z */ - ) -} - -var isAlphanumerical = alphanumerical; - -// Check if the given character code, or the character code at the first -// character, is alphanumerical. -function alphanumerical(character) { - return isAlphabetical(character) || isDecimal(character) -} - -const AEli = "Æ"; -const AElig$1 = "Æ"; -const AM = "&"; -const AMP$1 = "&"; -const Aacut = "Á"; -const Aacute$1 = "Á"; -const Abreve = "Ă"; -const Acir = "Â"; -const Acirc$1 = "Â"; -const Acy = "А"; -const Afr = "𝔄"; -const Agrav = "À"; -const Agrave$1 = "À"; -const Alpha = "Α"; -const Amacr = "Ā"; -const And = "⩓"; -const Aogon = "Ą"; -const Aopf = "𝔸"; -const ApplyFunction = "⁡"; -const Arin = "Å"; -const Aring$1 = "Å"; -const Ascr = "𝒜"; -const Assign = "≔"; -const Atild = "Ã"; -const Atilde$1 = "Ã"; -const Aum = "Ä"; -const Auml$1 = "Ä"; -const Backslash = "∖"; -const Barv = "⫧"; -const Barwed = "⌆"; -const Bcy = "Б"; -const Because = "∵"; -const Bernoullis = "ℬ"; -const Beta = "Β"; -const Bfr = "𝔅"; -const Bopf = "𝔹"; -const Breve = "˘"; -const Bscr = "ℬ"; -const Bumpeq = "≎"; -const CHcy = "Ч"; -const COP = "©"; -const COPY$1 = "©"; -const Cacute = "Ć"; -const Cap = "⋒"; -const CapitalDifferentialD = "ⅅ"; -const Cayleys = "ℭ"; -const Ccaron = "Č"; -const Ccedi = "Ç"; -const Ccedil$1 = "Ç"; -const Ccirc = "Ĉ"; -const Cconint = "∰"; -const Cdot = "Ċ"; -const Cedilla = "¸"; -const CenterDot = "·"; -const Cfr = "ℭ"; -const Chi = "Χ"; -const CircleDot = "⊙"; -const CircleMinus = "⊖"; -const CirclePlus = "⊕"; -const CircleTimes = "⊗"; -const ClockwiseContourIntegral = "∲"; -const CloseCurlyDoubleQuote = "”"; -const CloseCurlyQuote = "’"; -const Colon = "∷"; -const Colone = "⩴"; -const Congruent = "≡"; -const Conint = "∯"; -const ContourIntegral = "∮"; -const Copf = "ℂ"; -const Coproduct = "∐"; -const CounterClockwiseContourIntegral = "∳"; -const Cross = "⨯"; -const Cscr = "𝒞"; -const Cup = "⋓"; -const CupCap = "≍"; -const DD = "ⅅ"; -const DDotrahd = "⤑"; -const DJcy = "Ђ"; -const DScy = "Ѕ"; -const DZcy = "Џ"; -const Dagger = "‡"; -const Darr = "↡"; -const Dashv = "⫤"; -const Dcaron = "Ď"; -const Dcy = "Д"; -const Del = "∇"; -const Delta = "Δ"; -const Dfr = "𝔇"; -const DiacriticalAcute = "´"; -const DiacriticalDot = "˙"; -const DiacriticalDoubleAcute = "˝"; -const DiacriticalGrave = "`"; -const DiacriticalTilde = "˜"; -const Diamond = "⋄"; -const DifferentialD = "ⅆ"; -const Dopf = "𝔻"; -const Dot = "¨"; -const DotDot = "⃜"; -const DotEqual = "≐"; -const DoubleContourIntegral = "∯"; -const DoubleDot = "¨"; -const DoubleDownArrow = "⇓"; -const DoubleLeftArrow = "⇐"; -const DoubleLeftRightArrow = "⇔"; -const DoubleLeftTee = "⫤"; -const DoubleLongLeftArrow = "⟸"; -const DoubleLongLeftRightArrow = "⟺"; -const DoubleLongRightArrow = "⟹"; -const DoubleRightArrow = "⇒"; -const DoubleRightTee = "⊨"; -const DoubleUpArrow = "⇑"; -const DoubleUpDownArrow = "⇕"; -const DoubleVerticalBar = "∥"; -const DownArrow = "↓"; -const DownArrowBar = "⤓"; -const DownArrowUpArrow = "⇵"; -const DownBreve = "̑"; -const DownLeftRightVector = "⥐"; -const DownLeftTeeVector = "⥞"; -const DownLeftVector = "↽"; -const DownLeftVectorBar = "⥖"; -const DownRightTeeVector = "⥟"; -const DownRightVector = "⇁"; -const DownRightVectorBar = "⥗"; -const DownTee = "⊤"; -const DownTeeArrow = "↧"; -const Downarrow = "⇓"; -const Dscr = "𝒟"; -const Dstrok = "Đ"; -const ENG = "Ŋ"; -const ET = "Ð"; -const ETH$1 = "Ð"; -const Eacut = "É"; -const Eacute$1 = "É"; -const Ecaron = "Ě"; -const Ecir = "Ê"; -const Ecirc$1 = "Ê"; -const Ecy = "Э"; -const Edot = "Ė"; -const Efr = "𝔈"; -const Egrav = "È"; -const Egrave$1 = "È"; -const Element = "∈"; -const Emacr = "Ē"; -const EmptySmallSquare = "◻"; -const EmptyVerySmallSquare = "▫"; -const Eogon = "Ę"; -const Eopf = "𝔼"; -const Epsilon = "Ε"; -const Equal = "⩵"; -const EqualTilde = "≂"; -const Equilibrium = "⇌"; -const Escr = "ℰ"; -const Esim = "⩳"; -const Eta = "Η"; -const Eum = "Ë"; -const Euml$1 = "Ë"; -const Exists = "∃"; -const ExponentialE = "ⅇ"; -const Fcy = "Ф"; -const Ffr = "𝔉"; -const FilledSmallSquare = "◼"; -const FilledVerySmallSquare = "▪"; -const Fopf = "𝔽"; -const ForAll = "∀"; -const Fouriertrf = "ℱ"; -const Fscr = "ℱ"; -const GJcy = "Ѓ"; -const G = ">"; -const GT$1 = ">"; -const Gamma = "Γ"; -const Gammad = "Ϝ"; -const Gbreve = "Ğ"; -const Gcedil = "Ģ"; -const Gcirc = "Ĝ"; -const Gcy = "Г"; -const Gdot = "Ġ"; -const Gfr = "𝔊"; -const Gg = "⋙"; -const Gopf = "𝔾"; -const GreaterEqual = "≥"; -const GreaterEqualLess = "⋛"; -const GreaterFullEqual = "≧"; -const GreaterGreater = "⪢"; -const GreaterLess = "≷"; -const GreaterSlantEqual = "⩾"; -const GreaterTilde = "≳"; -const Gscr = "𝒢"; -const Gt = "≫"; -const HARDcy = "Ъ"; -const Hacek = "ˇ"; -const Hat = "^"; -const Hcirc = "Ĥ"; -const Hfr = "ℌ"; -const HilbertSpace = "ℋ"; -const Hopf = "ℍ"; -const HorizontalLine = "─"; -const Hscr = "ℋ"; -const Hstrok = "Ħ"; -const HumpDownHump = "≎"; -const HumpEqual = "≏"; -const IEcy = "Е"; -const IJlig = "IJ"; -const IOcy = "Ё"; -const Iacut = "Í"; -const Iacute$1 = "Í"; -const Icir = "Î"; -const Icirc$1 = "Î"; -const Icy = "И"; -const Idot = "İ"; -const Ifr = "ℑ"; -const Igrav = "Ì"; -const Igrave$1 = "Ì"; -const Im = "ℑ"; -const Imacr = "Ī"; -const ImaginaryI = "ⅈ"; -const Implies = "⇒"; -const Int = "∬"; -const Integral = "∫"; -const Intersection = "⋂"; -const InvisibleComma = "⁣"; -const InvisibleTimes = "⁢"; -const Iogon = "Į"; -const Iopf = "𝕀"; -const Iota = "Ι"; -const Iscr = "ℐ"; -const Itilde = "Ĩ"; -const Iukcy = "І"; -const Ium = "Ï"; -const Iuml$1 = "Ï"; -const Jcirc = "Ĵ"; -const Jcy = "Й"; -const Jfr = "𝔍"; -const Jopf = "𝕁"; -const Jscr = "𝒥"; -const Jsercy = "Ј"; -const Jukcy = "Є"; -const KHcy = "Х"; -const KJcy = "Ќ"; -const Kappa = "Κ"; -const Kcedil = "Ķ"; -const Kcy = "К"; -const Kfr = "𝔎"; -const Kopf = "𝕂"; -const Kscr = "𝒦"; -const LJcy = "Љ"; -const L = "<"; -const LT$1 = "<"; const Lacute = "Ĺ"; const Lambda = "Λ"; const Lang = "⟪"; @@ -29102,18 +28524,18 @@ const NotTildeTilde = "≉"; const NotVerticalBar = "∤"; const Nscr = "𝒩"; const Ntild = "Ñ"; -const Ntilde$1 = "Ñ"; +const Ntilde = "Ñ"; const Nu = "Ν"; const OElig = "Œ"; const Oacut = "Ó"; -const Oacute$1 = "Ó"; +const Oacute = "Ó"; const Ocir = "Ô"; -const Ocirc$1 = "Ô"; +const Ocirc = "Ô"; const Ocy = "О"; const Odblac = "Ő"; const Ofr = "𝔒"; const Ograv = "Ò"; -const Ograve$1 = "Ò"; +const Ograve = "Ò"; const Omacr = "Ō"; const Omega = "Ω"; const Omicron = "Ο"; @@ -29123,12 +28545,12 @@ const OpenCurlyQuote = "‘"; const Or = "⩔"; const Oscr = "𝒪"; const Oslas = "Ø"; -const Oslash$1 = "Ø"; +const Oslash = "Ø"; const Otild = "Õ"; -const Otilde$1 = "Õ"; +const Otilde = "Õ"; const Otimes = "⨷"; const Oum = "Ö"; -const Ouml$1 = "Ö"; +const Ouml = "Ö"; const OverBar = "‾"; const OverBrace = "⏞"; const OverBracket = "⎴"; @@ -29153,13 +28575,13 @@ const Proportional = "∝"; const Pscr = "𝒫"; const Psi = "Ψ"; const QUO = "\""; -const QUOT$1 = "\""; +const QUOT = "\""; const Qfr = "𝔔"; const Qopf = "ℚ"; const Qscr = "𝒬"; const RBarr = "⤐"; const RE = "®"; -const REG$1 = "®"; +const REG = "®"; const Racute = "Ŕ"; const Rang = "⟫"; const Rarr = "↠"; @@ -29243,7 +28665,7 @@ const Superset = "⊃"; const SupersetEqual = "⊇"; const Supset = "⋑"; const THOR = "Þ"; -const THORN$1 = "Þ"; +const THORN = "Þ"; const TRADE = "™"; const TSHcy = "Ћ"; const TScy = "Ц"; @@ -29266,18 +28688,18 @@ const TripleDot = "⃛"; const Tscr = "𝒯"; const Tstrok = "Ŧ"; const Uacut = "Ú"; -const Uacute$1 = "Ú"; +const Uacute = "Ú"; const Uarr = "↟"; const Uarrocir = "⥉"; const Ubrcy = "Ў"; const Ubreve = "Ŭ"; const Ucir = "Û"; -const Ucirc$1 = "Û"; +const Ucirc = "Û"; const Ucy = "У"; const Udblac = "Ű"; const Ufr = "𝔘"; const Ugrav = "Ù"; -const Ugrave$1 = "Ù"; +const Ugrave = "Ù"; const Umacr = "Ū"; const UnderBar = "_"; const UnderBrace = "⏟"; @@ -29304,7 +28726,7 @@ const Uring = "Ů"; const Uscr = "𝒰"; const Utilde = "Ũ"; const Uum = "Ü"; -const Uuml$1 = "Ü"; +const Uuml = "Ü"; const VDash = "⊫"; const Vbar = "⫫"; const Vcy = "В"; @@ -29335,7 +28757,7 @@ const YAcy = "Я"; const YIcy = "Ї"; const YUcy = "Ю"; const Yacut = "Ý"; -const Yacute$1 = "Ý"; +const Yacute = "Ý"; const Ycirc = "Ŷ"; const Ycy = "Ы"; const Yfr = "𝔜"; @@ -29353,29 +28775,29 @@ const Zfr = "ℨ"; const Zopf = "ℤ"; const Zscr = "𝒵"; const aacut = "á"; -const aacute$1 = "á"; +const aacute = "á"; const abreve = "ă"; const ac = "∾"; const acE = "∾̳"; const acd = "∿"; const acir = "â"; -const acirc$1 = "â"; +const acirc = "â"; const acut = "´"; -const acute$1 = "´"; +const acute = "´"; const acy = "а"; const aeli = "æ"; -const aelig$1 = "æ"; +const aelig = "æ"; const af = "⁡"; const afr = "𝔞"; const agrav = "à"; -const agrave$1 = "à"; +const agrave = "à"; const alefsym = "ℵ"; const aleph = "ℵ"; const alpha = "α"; const amacr = "ā"; const amalg = "⨿"; const am = "&"; -const amp$1 = "&"; +const amp = "&"; const and = "∧"; const andand = "⩕"; const andd = "⩜"; @@ -29410,15 +28832,15 @@ const apos = "'"; const approx = "≈"; const approxeq = "≊"; const arin = "å"; -const aring$1 = "å"; +const aring = "å"; const ascr = "𝒶"; const ast = "*"; const asymp = "≈"; const asympeq = "≍"; const atild = "ã"; -const atilde$1 = "ã"; +const atilde = "ã"; const aum = "ä"; -const auml$1 = "ä"; +const auml = "ä"; const awconint = "∳"; const awint = "⨑"; const bNot = "⫭"; @@ -29523,7 +28945,7 @@ const boxvr = "├"; const bprime = "‵"; const breve = "˘"; const brvba = "¦"; -const brvbar$1 = "¦"; +const brvbar = "¦"; const bscr = "𝒷"; const bsemi = "⁏"; const bsim = "∽"; @@ -29550,16 +28972,16 @@ const caron = "ˇ"; const ccaps = "⩍"; const ccaron = "č"; const ccedi = "ç"; -const ccedil$1 = "ç"; +const ccedil = "ç"; const ccirc = "ĉ"; const ccups = "⩌"; const ccupssm = "⩐"; const cdot = "ċ"; const cedi = "¸"; -const cedil$1 = "¸"; +const cedil = "¸"; const cemptyv = "⦲"; const cen = "¢"; -const cent$1 = "¢"; +const cent = "¢"; const centerdot = "·"; const cfr = "𝔠"; const chcy = "ч"; @@ -29598,7 +29020,7 @@ const conint = "∮"; const copf = "𝕔"; const coprod = "∐"; const cop = "©"; -const copy$2 = "©"; +const copy$1 = "©"; const copysr = "℗"; const crarr = "↵"; const cross = "✗"; @@ -29628,7 +29050,7 @@ const curlyeqsucc = "⋟"; const curlyvee = "⋎"; const curlywedge = "⋏"; const curre = "¤"; -const curren$1 = "¤"; +const curren = "¤"; const curvearrowleft = "↶"; const curvearrowright = "↷"; const cuvee = "⋎"; @@ -29652,7 +29074,7 @@ const ddagger = "‡"; const ddarr = "⇊"; const ddotseq = "⩷"; const de = "°"; -const deg$1 = "°"; +const deg = "°"; const delta = "δ"; const demptyv = "⦱"; const dfisht = "⥿"; @@ -29668,7 +29090,7 @@ const digamma = "ϝ"; const disin = "⋲"; const div = "÷"; const divid = "÷"; -const divide$1 = "÷"; +const divide = "÷"; const divideontimes = "⋇"; const divonx = "⋇"; const djcy = "ђ"; @@ -29705,11 +29127,11 @@ const dzigrarr = "⟿"; const eDDot = "⩷"; const eDot = "≑"; const eacut = "é"; -const eacute$1 = "é"; +const eacute = "é"; const easter = "⩮"; const ecaron = "ě"; const ecir = "ê"; -const ecirc$1 = "ê"; +const ecirc = "ê"; const ecolon = "≕"; const ecy = "э"; const edot = "ė"; @@ -29718,7 +29140,7 @@ const efDot = "≒"; const efr = "𝔢"; const eg = "⪚"; const egrav = "è"; -const egrave$1 = "è"; +const egrave = "è"; const egs = "⪖"; const egsdot = "⪘"; const el = "⪙"; @@ -29760,9 +29182,9 @@ const esdot = "≐"; const esim = "≂"; const eta = "η"; const et = "ð"; -const eth$1 = "ð"; +const eth = "ð"; const eum = "ë"; -const euml$1 = "ë"; +const euml = "ë"; const euro = "€"; const excl = "!"; const exist = "∃"; @@ -29787,16 +29209,16 @@ const fork = "⋔"; const forkv = "⫙"; const fpartint = "⨍"; const frac1 = "¼"; -const frac12$1 = "½"; +const frac12 = "½"; const frac13 = "⅓"; -const frac14$1 = "¼"; +const frac14 = "¼"; const frac15 = "⅕"; const frac16 = "⅙"; const frac18 = "⅛"; const frac23 = "⅔"; const frac25 = "⅖"; const frac3 = "¾"; -const frac34$1 = "¾"; +const frac34 = "¾"; const frac35 = "⅗"; const frac38 = "⅜"; const frac45 = "⅘"; @@ -29851,7 +29273,7 @@ const gsim = "≳"; const gsime = "⪎"; const gsiml = "⪐"; const g = ">"; -const gt$1 = ">"; +const gt = ">"; const gtcc = "⪧"; const gtcir = "⩺"; const gtdot = "⋗"; @@ -29895,18 +29317,18 @@ const hstrok = "ħ"; const hybull = "⁃"; const hyphen = "‐"; const iacut = "í"; -const iacute$1 = "í"; +const iacute = "í"; const ic = "⁣"; const icir = "î"; -const icirc$1 = "î"; +const icirc = "î"; const icy = "и"; const iecy = "е"; const iexc = "¡"; -const iexcl$1 = "¡"; +const iexcl = "¡"; const iff = "⇔"; const ifr = "𝔦"; const igrav = "ì"; -const igrave$1 = "ì"; +const igrave = "ì"; const ii = "ⅈ"; const iiiint = "⨌"; const iiint = "∭"; @@ -29936,7 +29358,7 @@ const iopf = "𝕚"; const iota = "ι"; const iprod = "⨼"; const iques = "¿"; -const iquest$1 = "¿"; +const iquest = "¿"; const iscr = "𝒾"; const isin = "∈"; const isinE = "⋹"; @@ -29948,7 +29370,7 @@ const it = "⁢"; const itilde = "ĩ"; const iukcy = "і"; const ium = "ï"; -const iuml$1 = "ï"; +const iuml = "ï"; const jcirc = "ĵ"; const jcy = "й"; const jfr = "𝔧"; @@ -29983,7 +29405,7 @@ const langd = "⦑"; const langle = "⟨"; const lap = "⪅"; const laqu = "«"; -const laquo$1 = "«"; +const laquo = "«"; const larr = "←"; const larrb = "⇤"; const larrbfs = "⤟"; @@ -30105,7 +29527,7 @@ const lsquo = "‘"; const lsquor = "‚"; const lstrok = "ł"; const l = "<"; -const lt$1 = "<"; +const lt = "<"; const ltcc = "⪦"; const ltcir = "⩹"; const ltdot = "⋖"; @@ -30123,7 +29545,7 @@ const lvertneqq = "≨︀"; const lvnE = "≨︀"; const mDDot = "∺"; const mac = "¯"; -const macr$1 = "¯"; +const macr = "¯"; const male = "♂"; const malt = "✠"; const maltese = "✠"; @@ -30140,12 +29562,12 @@ const measuredangle = "∡"; const mfr = "𝔪"; const mho = "℧"; const micr = "µ"; -const micro$1 = "µ"; +const micro = "µ"; const mid = "∣"; const midast = "*"; const midcir = "⫰"; const middo = "·"; -const middot$1 = "·"; +const middot = "·"; const minus = "−"; const minusb = "⊟"; const minusd = "∸"; @@ -30184,7 +29606,7 @@ const natur = "♮"; const natural = "♮"; const naturals = "ℕ"; const nbs = " "; -const nbsp$1 = " "; +const nbsp = " "; const nbump = "≎̸"; const nbumpe = "≏̸"; const ncap = "⩃"; @@ -30243,7 +29665,7 @@ const nltrie = "⋬"; const nmid = "∤"; const nopf = "𝕟"; const no = "¬"; -const not$1 = "¬"; +const not = "¬"; const notin = "∉"; const notinE = "⋹̸"; const notindot = "⋵̸"; @@ -30300,7 +29722,7 @@ const nsupseteq = "⊉"; const nsupseteqq = "⫆̸"; const ntgl = "≹"; const ntild = "ñ"; -const ntilde$1 = "ñ"; +const ntilde = "ñ"; const ntlg = "≸"; const ntriangleleft = "⋪"; const ntrianglelefteq = "⋬"; @@ -30331,10 +29753,10 @@ const nwarrow = "↖"; const nwnear = "⤧"; const oS = "Ⓢ"; const oacut = "ó"; -const oacute$1 = "ó"; +const oacute = "ó"; const oast = "⊛"; const ocir = "ô"; -const ocirc$1 = "ô"; +const ocirc = "ô"; const ocy = "о"; const odash = "⊝"; const odblac = "ő"; @@ -30346,7 +29768,7 @@ const ofcir = "⦿"; const ofr = "𝔬"; const ogon = "˛"; const ograv = "ò"; -const ograve$1 = "ò"; +const ograve = "ò"; const ogt = "⧁"; const ohbar = "⦵"; const ohm = "Ω"; @@ -30370,25 +29792,25 @@ const orarr = "↻"; const ord = "º"; const order$1 = "ℴ"; const orderof = "ℴ"; -const ordf$1 = "ª"; -const ordm$1 = "º"; +const ordf = "ª"; +const ordm = "º"; const origof = "⊶"; const oror = "⩖"; const orslope = "⩗"; const orv = "⩛"; const oscr = "ℴ"; const oslas = "ø"; -const oslash$1 = "ø"; +const oslash = "ø"; const osol = "⊘"; const otild = "õ"; -const otilde$1 = "õ"; +const otilde = "õ"; const otimes = "⊗"; const otimesas = "⨶"; const oum = "ö"; -const ouml$1 = "ö"; +const ouml = "ö"; const ovbar = "⌽"; const par = "¶"; -const para$1 = "¶"; +const para = "¶"; const parallel = "∥"; const parsim = "⫳"; const parsl = "⫽"; @@ -30418,14 +29840,14 @@ const plusdo = "∔"; const plusdu = "⨥"; const pluse = "⩲"; const plusm = "±"; -const plusmn$1 = "±"; +const plusmn = "±"; const plussim = "⨦"; const plustwo = "⨧"; const pm = "±"; const pointint = "⨕"; const popf = "𝕡"; const poun = "£"; -const pound$1 = "£"; +const pound = "£"; const pr = "≺"; const prE = "⪳"; const prap = "⪷"; @@ -30465,7 +29887,7 @@ const quatint = "⨖"; const quest = "?"; const questeq = "≟"; const quo = "\""; -const quot$1 = "\""; +const quot = "\""; const rAarr = "⇛"; const rArr = "⇒"; const rAtail = "⤜"; @@ -30480,7 +29902,7 @@ const rangd = "⦒"; const range$1 = "⦥"; const rangle = "⟩"; const raqu = "»"; -const raquo$1 = "»"; +const raquo = "»"; const rarr = "→"; const rarrap = "⥵"; const rarrb = "⇥"; @@ -30519,7 +29941,7 @@ const realpart = "ℜ"; const reals = "ℝ"; const rect = "▭"; const re = "®"; -const reg$1 = "®"; +const reg = "®"; const rfisht = "⥽"; const rfloor = "⌋"; const rfr = "𝔯"; @@ -30594,7 +30016,7 @@ const searhk = "⤥"; const searr = "↘"; const searrow = "↘"; const sec = "§"; -const sect$1 = "§"; +const sect = "§"; const semi = ";"; const seswar = "⤩"; const setminus = "∖"; @@ -30608,7 +30030,7 @@ const shcy = "ш"; const shortmid = "∣"; const shortparallel = "∥"; const sh = "­"; -const shy$1 = "­"; +const shy = "­"; const sigma = "σ"; const sigmaf = "ς"; const sigmav = "ς"; @@ -30695,9 +30117,9 @@ const succsim = "≿"; const sum = "∑"; const sung = "♪"; const sup = "⊃"; -const sup1$1 = "¹"; -const sup2$1 = "²"; -const sup3$1 = "³"; +const sup1 = "¹"; +const sup2 = "²"; +const sup3 = "³"; const supE = "⫆"; const supdot = "⪾"; const supdsub = "⫘"; @@ -30724,7 +30146,7 @@ const swarr = "↙"; const swarrow = "↙"; const swnwar = "⤪"; const szli = "ß"; -const szlig$1 = "ß"; +const szlig = "ß"; const target = "⌖"; const tau = "τ"; const tbrk = "⎴"; @@ -30745,10 +30167,10 @@ const thinsp = " "; const thkap = "≈"; const thksim = "∼"; const thor = "þ"; -const thorn$1 = "þ"; +const thorn = "þ"; const tilde = "˜"; const time = "×"; -const times$1 = "×"; +const times = "×"; const timesb = "⊠"; const timesbar = "⨱"; const timesd = "⨰"; @@ -30786,12 +30208,12 @@ const twoheadrightarrow = "↠"; const uArr = "⇑"; const uHar = "⥣"; const uacut = "ú"; -const uacute$1 = "ú"; +const uacute = "ú"; const uarr = "↑"; const ubrcy = "ў"; const ubreve = "ŭ"; const ucir = "û"; -const ucirc$1 = "û"; +const ucirc = "û"; const ucy = "у"; const udarr = "⇅"; const udblac = "ű"; @@ -30799,7 +30221,7 @@ const udhar = "⥮"; const ufisht = "⥾"; const ufr = "𝔲"; const ugrav = "ù"; -const ugrave$1 = "ù"; +const ugrave = "ù"; const uharl = "↿"; const uharr = "↾"; const uhblk = "▀"; @@ -30809,7 +30231,7 @@ const ulcrop = "⌏"; const ultri = "◸"; const umacr = "ū"; const um = "¨"; -const uml$1 = "¨"; +const uml = "¨"; const uogon = "ų"; const uopf = "𝕦"; const uparrow = "↑"; @@ -30833,7 +30255,7 @@ const utri = "▵"; const utrif = "▴"; const uuarr = "⇈"; const uum = "ü"; -const uuml$1 = "ü"; +const uuml = "ü"; const uwangle = "⦧"; const vArr = "⇕"; const vBar = "⫨"; @@ -30913,19 +30335,19 @@ const xutri = "△"; const xvee = "⋁"; const xwedge = "⋀"; const yacut = "ý"; -const yacute$1 = "ý"; +const yacute = "ý"; const yacy = "я"; const ycirc = "ŷ"; const ycy = "ы"; const ye = "¥"; -const yen$1 = "¥"; +const yen = "¥"; const yfr = "𝔶"; const yicy = "ї"; const yopf = "𝕪"; const yscr = "𝓎"; const yucy = "ю"; const yum = "ÿ"; -const yuml$1 = "ÿ"; +const yuml = "ÿ"; const zacute = "ź"; const zcaron = "ž"; const zcy = "з"; @@ -30939,20 +30361,20 @@ const zopf = "𝕫"; const zscr = "𝓏"; const zwj = "‍"; const zwnj = "‌"; -var index$3 = { +var index$1 = { AEli: AEli, - AElig: AElig$1, + AElig: AElig, AM: AM, - AMP: AMP$1, + AMP: AMP, Aacut: Aacut, - Aacute: Aacute$1, + Aacute: Aacute, Abreve: Abreve, Acir: Acir, - Acirc: Acirc$1, + Acirc: Acirc, Acy: Acy, Afr: Afr, Agrav: Agrav, - Agrave: Agrave$1, + Agrave: Agrave, Alpha: Alpha, Amacr: Amacr, And: And, @@ -30960,13 +30382,13 @@ var index$3 = { Aopf: Aopf, ApplyFunction: ApplyFunction, Arin: Arin, - Aring: Aring$1, + Aring: Aring, Ascr: Ascr, Assign: Assign, Atild: Atild, - Atilde: Atilde$1, + Atilde: Atilde, Aum: Aum, - Auml: Auml$1, + Auml: Auml, Backslash: Backslash, Barv: Barv, Barwed: Barwed, @@ -30981,14 +30403,14 @@ var index$3 = { Bumpeq: Bumpeq, CHcy: CHcy, COP: COP, - COPY: COPY$1, + COPY: COPY, Cacute: Cacute, Cap: Cap, CapitalDifferentialD: CapitalDifferentialD, Cayleys: Cayleys, Ccaron: Ccaron, Ccedi: Ccedi, - Ccedil: Ccedil$1, + Ccedil: Ccedil, Ccirc: Ccirc, Cconint: Cconint, Cdot: Cdot, @@ -31071,17 +30493,17 @@ var index$3 = { Dstrok: Dstrok, ENG: ENG, ET: ET, - ETH: ETH$1, + ETH: ETH, Eacut: Eacut, - Eacute: Eacute$1, + Eacute: Eacute, Ecaron: Ecaron, Ecir: Ecir, - Ecirc: Ecirc$1, + Ecirc: Ecirc, Ecy: Ecy, Edot: Edot, Efr: Efr, Egrav: Egrav, - Egrave: Egrave$1, + Egrave: Egrave, Element: Element, Emacr: Emacr, EmptySmallSquare: EmptySmallSquare, @@ -31096,7 +30518,7 @@ var index$3 = { Esim: Esim, Eta: Eta, Eum: Eum, - Euml: Euml$1, + Euml: Euml, Exists: Exists, ExponentialE: ExponentialE, Fcy: Fcy, @@ -31109,7 +30531,7 @@ var index$3 = { Fscr: Fscr, GJcy: GJcy, G: G, - GT: GT$1, + GT: GT, Gamma: Gamma, Gammad: Gammad, Gbreve: Gbreve, @@ -31145,14 +30567,14 @@ var index$3 = { IJlig: IJlig, IOcy: IOcy, Iacut: Iacut, - Iacute: Iacute$1, + Iacute: Iacute, Icir: Icir, - Icirc: Icirc$1, + Icirc: Icirc, Icy: Icy, Idot: Idot, Ifr: Ifr, Igrav: Igrav, - Igrave: Igrave$1, + Igrave: Igrave, Im: Im, Imacr: Imacr, ImaginaryI: ImaginaryI, @@ -31169,7 +30591,7 @@ var index$3 = { Itilde: Itilde, Iukcy: Iukcy, Ium: Ium, - Iuml: Iuml$1, + Iuml: Iuml, Jcirc: Jcirc, Jcy: Jcy, Jfr: Jfr, @@ -31187,7 +30609,7 @@ var index$3 = { Kscr: Kscr, LJcy: LJcy, L: L, - LT: LT$1, + LT: LT, Lacute: Lacute, Lambda: Lambda, Lang: Lang, @@ -31324,18 +30746,18 @@ var index$3 = { NotVerticalBar: NotVerticalBar, Nscr: Nscr, Ntild: Ntild, - Ntilde: Ntilde$1, + Ntilde: Ntilde, Nu: Nu, OElig: OElig, Oacut: Oacut, - Oacute: Oacute$1, + Oacute: Oacute, Ocir: Ocir, - Ocirc: Ocirc$1, + Ocirc: Ocirc, Ocy: Ocy, Odblac: Odblac, Ofr: Ofr, Ograv: Ograv, - Ograve: Ograve$1, + Ograve: Ograve, Omacr: Omacr, Omega: Omega, Omicron: Omicron, @@ -31345,12 +30767,12 @@ var index$3 = { Or: Or, Oscr: Oscr, Oslas: Oslas, - Oslash: Oslash$1, + Oslash: Oslash, Otild: Otild, - Otilde: Otilde$1, + Otilde: Otilde, Otimes: Otimes, Oum: Oum, - Ouml: Ouml$1, + Ouml: Ouml, OverBar: OverBar, OverBrace: OverBrace, OverBracket: OverBracket, @@ -31375,13 +30797,13 @@ var index$3 = { Pscr: Pscr, Psi: Psi, QUO: QUO, - QUOT: QUOT$1, + QUOT: QUOT, Qfr: Qfr, Qopf: Qopf, Qscr: Qscr, RBarr: RBarr, RE: RE, - REG: REG$1, + REG: REG, Racute: Racute, Rang: Rang, Rarr: Rarr, @@ -31465,7 +30887,7 @@ var index$3 = { SupersetEqual: SupersetEqual, Supset: Supset, THOR: THOR, - THORN: THORN$1, + THORN: THORN, TRADE: TRADE, TSHcy: TSHcy, TScy: TScy, @@ -31488,18 +30910,18 @@ var index$3 = { Tscr: Tscr, Tstrok: Tstrok, Uacut: Uacut, - Uacute: Uacute$1, + Uacute: Uacute, Uarr: Uarr, Uarrocir: Uarrocir, Ubrcy: Ubrcy, Ubreve: Ubreve, Ucir: Ucir, - Ucirc: Ucirc$1, + Ucirc: Ucirc, Ucy: Ucy, Udblac: Udblac, Ufr: Ufr, Ugrav: Ugrav, - Ugrave: Ugrave$1, + Ugrave: Ugrave, Umacr: Umacr, UnderBar: UnderBar, UnderBrace: UnderBrace, @@ -31526,7 +30948,7 @@ var index$3 = { Uscr: Uscr, Utilde: Utilde, Uum: Uum, - Uuml: Uuml$1, + Uuml: Uuml, VDash: VDash, Vbar: Vbar, Vcy: Vcy, @@ -31557,7 +30979,7 @@ var index$3 = { YIcy: YIcy, YUcy: YUcy, Yacut: Yacut, - Yacute: Yacute$1, + Yacute: Yacute, Ycirc: Ycirc, Ycy: Ycy, Yfr: Yfr, @@ -31575,29 +30997,29 @@ var index$3 = { Zopf: Zopf, Zscr: Zscr, aacut: aacut, - aacute: aacute$1, + aacute: aacute, abreve: abreve, ac: ac, acE: acE, acd: acd, acir: acir, - acirc: acirc$1, + acirc: acirc, acut: acut, - acute: acute$1, + acute: acute, acy: acy, aeli: aeli, - aelig: aelig$1, + aelig: aelig, af: af, afr: afr, agrav: agrav, - agrave: agrave$1, + agrave: agrave, alefsym: alefsym, aleph: aleph, alpha: alpha, amacr: amacr, amalg: amalg, am: am, - amp: amp$1, + amp: amp, and: and, andand: andand, andd: andd, @@ -31632,15 +31054,15 @@ var index$3 = { approx: approx, approxeq: approxeq, arin: arin, - aring: aring$1, + aring: aring, ascr: ascr, ast: ast, asymp: asymp, asympeq: asympeq, atild: atild, - atilde: atilde$1, + atilde: atilde, aum: aum, - auml: auml$1, + auml: auml, awconint: awconint, awint: awint, bNot: bNot, @@ -31745,7 +31167,7 @@ var index$3 = { bprime: bprime, breve: breve, brvba: brvba, - brvbar: brvbar$1, + brvbar: brvbar, bscr: bscr, bsemi: bsemi, bsim: bsim, @@ -31772,16 +31194,16 @@ var index$3 = { ccaps: ccaps, ccaron: ccaron, ccedi: ccedi, - ccedil: ccedil$1, + ccedil: ccedil, ccirc: ccirc, ccups: ccups, ccupssm: ccupssm, cdot: cdot, cedi: cedi, - cedil: cedil$1, + cedil: cedil, cemptyv: cemptyv, cen: cen, - cent: cent$1, + cent: cent, centerdot: centerdot, cfr: cfr, chcy: chcy, @@ -31820,7 +31242,7 @@ var index$3 = { copf: copf, coprod: coprod, cop: cop, - copy: copy$2, + copy: copy$1, copysr: copysr, crarr: crarr, cross: cross, @@ -31850,7 +31272,7 @@ var index$3 = { curlyvee: curlyvee, curlywedge: curlywedge, curre: curre, - curren: curren$1, + curren: curren, curvearrowleft: curvearrowleft, curvearrowright: curvearrowright, cuvee: cuvee, @@ -31874,7 +31296,7 @@ var index$3 = { ddarr: ddarr, ddotseq: ddotseq, de: de, - deg: deg$1, + deg: deg, delta: delta, demptyv: demptyv, dfisht: dfisht, @@ -31890,7 +31312,7 @@ var index$3 = { disin: disin, div: div, divid: divid, - divide: divide$1, + divide: divide, divideontimes: divideontimes, divonx: divonx, djcy: djcy, @@ -31927,11 +31349,11 @@ var index$3 = { eDDot: eDDot, eDot: eDot, eacut: eacut, - eacute: eacute$1, + eacute: eacute, easter: easter, ecaron: ecaron, ecir: ecir, - ecirc: ecirc$1, + ecirc: ecirc, ecolon: ecolon, ecy: ecy, edot: edot, @@ -31940,7 +31362,7 @@ var index$3 = { efr: efr, eg: eg, egrav: egrav, - egrave: egrave$1, + egrave: egrave, egs: egs, egsdot: egsdot, el: el, @@ -31982,9 +31404,9 @@ var index$3 = { esim: esim, eta: eta, et: et, - eth: eth$1, + eth: eth, eum: eum, - euml: euml$1, + euml: euml, euro: euro, excl: excl, exist: exist, @@ -32009,16 +31431,16 @@ var index$3 = { forkv: forkv, fpartint: fpartint, frac1: frac1, - frac12: frac12$1, + frac12: frac12, frac13: frac13, - frac14: frac14$1, + frac14: frac14, frac15: frac15, frac16: frac16, frac18: frac18, frac23: frac23, frac25: frac25, frac3: frac3, - frac34: frac34$1, + frac34: frac34, frac35: frac35, frac38: frac38, frac45: frac45, @@ -32073,7 +31495,7 @@ var index$3 = { gsime: gsime, gsiml: gsiml, g: g, - gt: gt$1, + gt: gt, gtcc: gtcc, gtcir: gtcir, gtdot: gtdot, @@ -32117,18 +31539,18 @@ var index$3 = { hybull: hybull, hyphen: hyphen, iacut: iacut, - iacute: iacute$1, + iacute: iacute, ic: ic, icir: icir, - icirc: icirc$1, + icirc: icirc, icy: icy, iecy: iecy, iexc: iexc, - iexcl: iexcl$1, + iexcl: iexcl, iff: iff, ifr: ifr, igrav: igrav, - igrave: igrave$1, + igrave: igrave, ii: ii, iiiint: iiiint, iiint: iiint, @@ -32159,7 +31581,7 @@ var index$3 = { iota: iota, iprod: iprod, iques: iques, - iquest: iquest$1, + iquest: iquest, iscr: iscr, isin: isin, isinE: isinE, @@ -32171,7 +31593,7 @@ var index$3 = { itilde: itilde, iukcy: iukcy, ium: ium, - iuml: iuml$1, + iuml: iuml, jcirc: jcirc, jcy: jcy, jfr: jfr, @@ -32206,7 +31628,7 @@ var index$3 = { langle: langle, lap: lap, laqu: laqu, - laquo: laquo$1, + laquo: laquo, larr: larr, larrb: larrb, larrbfs: larrbfs, @@ -32328,7 +31750,7 @@ var index$3 = { lsquor: lsquor, lstrok: lstrok, l: l, - lt: lt$1, + lt: lt, ltcc: ltcc, ltcir: ltcir, ltdot: ltdot, @@ -32346,7 +31768,7 @@ var index$3 = { lvnE: lvnE, mDDot: mDDot, mac: mac, - macr: macr$1, + macr: macr, male: male, malt: malt, maltese: maltese, @@ -32363,12 +31785,12 @@ var index$3 = { mfr: mfr, mho: mho, micr: micr, - micro: micro$1, + micro: micro, mid: mid, midast: midast, midcir: midcir, middo: middo, - middot: middot$1, + middot: middot, minus: minus, minusb: minusb, minusd: minusd, @@ -32407,7 +31829,7 @@ var index$3 = { natural: natural, naturals: naturals, nbs: nbs, - nbsp: nbsp$1, + nbsp: nbsp, nbump: nbump, nbumpe: nbumpe, ncap: ncap, @@ -32466,7 +31888,7 @@ var index$3 = { nmid: nmid, nopf: nopf, no: no, - not: not$1, + not: not, notin: notin, notinE: notinE, notindot: notindot, @@ -32523,7 +31945,7 @@ var index$3 = { nsupseteqq: nsupseteqq, ntgl: ntgl, ntild: ntild, - ntilde: ntilde$1, + ntilde: ntilde, ntlg: ntlg, ntriangleleft: ntriangleleft, ntrianglelefteq: ntrianglelefteq, @@ -32554,10 +31976,10 @@ var index$3 = { nwnear: nwnear, oS: oS, oacut: oacut, - oacute: oacute$1, + oacute: oacute, oast: oast, ocir: ocir, - ocirc: ocirc$1, + ocirc: ocirc, ocy: ocy, odash: odash, odblac: odblac, @@ -32569,7 +31991,7 @@ var index$3 = { ofr: ofr, ogon: ogon, ograv: ograv, - ograve: ograve$1, + ograve: ograve, ogt: ogt, ohbar: ohbar, ohm: ohm, @@ -32593,25 +32015,25 @@ var index$3 = { ord: ord, order: order$1, orderof: orderof, - ordf: ordf$1, - ordm: ordm$1, + ordf: ordf, + ordm: ordm, origof: origof, oror: oror, orslope: orslope, orv: orv, oscr: oscr, oslas: oslas, - oslash: oslash$1, + oslash: oslash, osol: osol, otild: otild, - otilde: otilde$1, + otilde: otilde, otimes: otimes, otimesas: otimesas, oum: oum, - ouml: ouml$1, + ouml: ouml, ovbar: ovbar, par: par, - para: para$1, + para: para, parallel: parallel, parsim: parsim, parsl: parsl, @@ -32641,14 +32063,14 @@ var index$3 = { plusdu: plusdu, pluse: pluse, plusm: plusm, - plusmn: plusmn$1, + plusmn: plusmn, plussim: plussim, plustwo: plustwo, pm: pm, pointint: pointint, popf: popf, poun: poun, - pound: pound$1, + pound: pound, pr: pr, prE: prE, prap: prap, @@ -32688,7 +32110,7 @@ var index$3 = { quest: quest, questeq: questeq, quo: quo, - quot: quot$1, + quot: quot, rAarr: rAarr, rArr: rArr, rAtail: rAtail, @@ -32703,7 +32125,7 @@ var index$3 = { range: range$1, rangle: rangle, raqu: raqu, - raquo: raquo$1, + raquo: raquo, rarr: rarr, rarrap: rarrap, rarrb: rarrb, @@ -32742,7 +32164,7 @@ var index$3 = { reals: reals, rect: rect, re: re, - reg: reg$1, + reg: reg, rfisht: rfisht, rfloor: rfloor, rfr: rfr, @@ -32817,7 +32239,7 @@ var index$3 = { searr: searr, searrow: searrow, sec: sec, - sect: sect$1, + sect: sect, semi: semi, seswar: seswar, setminus: setminus, @@ -32831,7 +32253,7 @@ var index$3 = { shortmid: shortmid, shortparallel: shortparallel, sh: sh, - shy: shy$1, + shy: shy, sigma: sigma, sigmaf: sigmaf, sigmav: sigmav, @@ -32918,9 +32340,9 @@ var index$3 = { sum: sum, sung: sung, sup: sup, - sup1: sup1$1, - sup2: sup2$1, - sup3: sup3$1, + sup1: sup1, + sup2: sup2, + sup3: sup3, supE: supE, supdot: supdot, supdsub: supdsub, @@ -32947,7 +32369,7 @@ var index$3 = { swarrow: swarrow, swnwar: swnwar, szli: szli, - szlig: szlig$1, + szlig: szlig, target: target, tau: tau, tbrk: tbrk, @@ -32968,10 +32390,10 @@ var index$3 = { thkap: thkap, thksim: thksim, thor: thor, - thorn: thorn$1, + thorn: thorn, tilde: tilde, time: time, - times: times$1, + times: times, timesb: timesb, timesbar: timesbar, timesd: timesd, @@ -33009,12 +32431,12 @@ var index$3 = { uArr: uArr, uHar: uHar, uacut: uacut, - uacute: uacute$1, + uacute: uacute, uarr: uarr, ubrcy: ubrcy, ubreve: ubreve, ucir: ucir, - ucirc: ucirc$1, + ucirc: ucirc, ucy: ucy, udarr: udarr, udblac: udblac, @@ -33022,7 +32444,7 @@ var index$3 = { ufisht: ufisht, ufr: ufr, ugrav: ugrav, - ugrave: ugrave$1, + ugrave: ugrave, uharl: uharl, uharr: uharr, uhblk: uhblk, @@ -33032,7 +32454,7 @@ var index$3 = { ultri: ultri, umacr: umacr, um: um, - uml: uml$1, + uml: uml, uogon: uogon, uopf: uopf, uparrow: uparrow, @@ -33056,7 +32478,7 @@ var index$3 = { utrif: utrif, uuarr: uuarr, uum: uum, - uuml: uuml$1, + uuml: uuml, uwangle: uwangle, vArr: vArr, vBar: vBar, @@ -33136,19 +32558,19 @@ var index$3 = { xvee: xvee, xwedge: xwedge, yacut: yacut, - yacute: yacute$1, + yacute: yacute, yacy: yacy, ycirc: ycirc, ycy: ycy, ye: ye, - yen: yen$1, + yen: yen, yfr: yfr, yicy: yicy, yopf: yopf, yscr: yscr, yucy: yucy, yum: yum, - yuml: yuml$1, + yuml: yuml, zacute: zacute, zcaron: zcaron, zcy: zcy, @@ -33167,18 +32589,18 @@ var index$3 = { var characterEntities = /*#__PURE__*/Object.freeze({ __proto__: null, AEli: AEli, - AElig: AElig$1, + AElig: AElig, AM: AM, - AMP: AMP$1, + AMP: AMP, Aacut: Aacut, - Aacute: Aacute$1, + Aacute: Aacute, Abreve: Abreve, Acir: Acir, - Acirc: Acirc$1, + Acirc: Acirc, Acy: Acy, Afr: Afr, Agrav: Agrav, - Agrave: Agrave$1, + Agrave: Agrave, Alpha: Alpha, Amacr: Amacr, And: And, @@ -33186,13 +32608,13 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Aopf: Aopf, ApplyFunction: ApplyFunction, Arin: Arin, - Aring: Aring$1, + Aring: Aring, Ascr: Ascr, Assign: Assign, Atild: Atild, - Atilde: Atilde$1, + Atilde: Atilde, Aum: Aum, - Auml: Auml$1, + Auml: Auml, Backslash: Backslash, Barv: Barv, Barwed: Barwed, @@ -33207,14 +32629,14 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Bumpeq: Bumpeq, CHcy: CHcy, COP: COP, - COPY: COPY$1, + COPY: COPY, Cacute: Cacute, Cap: Cap, CapitalDifferentialD: CapitalDifferentialD, Cayleys: Cayleys, Ccaron: Ccaron, Ccedi: Ccedi, - Ccedil: Ccedil$1, + Ccedil: Ccedil, Ccirc: Ccirc, Cconint: Cconint, Cdot: Cdot, @@ -33297,17 +32719,17 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Dstrok: Dstrok, ENG: ENG, ET: ET, - ETH: ETH$1, + ETH: ETH, Eacut: Eacut, - Eacute: Eacute$1, + Eacute: Eacute, Ecaron: Ecaron, Ecir: Ecir, - Ecirc: Ecirc$1, + Ecirc: Ecirc, Ecy: Ecy, Edot: Edot, Efr: Efr, Egrav: Egrav, - Egrave: Egrave$1, + Egrave: Egrave, Element: Element, Emacr: Emacr, EmptySmallSquare: EmptySmallSquare, @@ -33322,7 +32744,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Esim: Esim, Eta: Eta, Eum: Eum, - Euml: Euml$1, + Euml: Euml, Exists: Exists, ExponentialE: ExponentialE, Fcy: Fcy, @@ -33335,7 +32757,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Fscr: Fscr, GJcy: GJcy, G: G, - GT: GT$1, + GT: GT, Gamma: Gamma, Gammad: Gammad, Gbreve: Gbreve, @@ -33371,14 +32793,14 @@ var characterEntities = /*#__PURE__*/Object.freeze({ IJlig: IJlig, IOcy: IOcy, Iacut: Iacut, - Iacute: Iacute$1, + Iacute: Iacute, Icir: Icir, - Icirc: Icirc$1, + Icirc: Icirc, Icy: Icy, Idot: Idot, Ifr: Ifr, Igrav: Igrav, - Igrave: Igrave$1, + Igrave: Igrave, Im: Im, Imacr: Imacr, ImaginaryI: ImaginaryI, @@ -33395,7 +32817,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Itilde: Itilde, Iukcy: Iukcy, Ium: Ium, - Iuml: Iuml$1, + Iuml: Iuml, Jcirc: Jcirc, Jcy: Jcy, Jfr: Jfr, @@ -33413,7 +32835,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Kscr: Kscr, LJcy: LJcy, L: L, - LT: LT$1, + LT: LT, Lacute: Lacute, Lambda: Lambda, Lang: Lang, @@ -33549,18 +32971,18 @@ var characterEntities = /*#__PURE__*/Object.freeze({ NotVerticalBar: NotVerticalBar, Nscr: Nscr, Ntild: Ntild, - Ntilde: Ntilde$1, + Ntilde: Ntilde, Nu: Nu, OElig: OElig, Oacut: Oacut, - Oacute: Oacute$1, + Oacute: Oacute, Ocir: Ocir, - Ocirc: Ocirc$1, + Ocirc: Ocirc, Ocy: Ocy, Odblac: Odblac, Ofr: Ofr, Ograv: Ograv, - Ograve: Ograve$1, + Ograve: Ograve, Omacr: Omacr, Omega: Omega, Omicron: Omicron, @@ -33570,12 +32992,12 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Or: Or, Oscr: Oscr, Oslas: Oslas, - Oslash: Oslash$1, + Oslash: Oslash, Otild: Otild, - Otilde: Otilde$1, + Otilde: Otilde, Otimes: Otimes, Oum: Oum, - Ouml: Ouml$1, + Ouml: Ouml, OverBar: OverBar, OverBrace: OverBrace, OverBracket: OverBracket, @@ -33600,13 +33022,13 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Pscr: Pscr, Psi: Psi, QUO: QUO, - QUOT: QUOT$1, + QUOT: QUOT, Qfr: Qfr, Qopf: Qopf, Qscr: Qscr, RBarr: RBarr, RE: RE, - REG: REG$1, + REG: REG, Racute: Racute, Rang: Rang, Rarr: Rarr, @@ -33690,7 +33112,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ SupersetEqual: SupersetEqual, Supset: Supset, THOR: THOR, - THORN: THORN$1, + THORN: THORN, TRADE: TRADE, TSHcy: TSHcy, TScy: TScy, @@ -33713,18 +33135,18 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Tscr: Tscr, Tstrok: Tstrok, Uacut: Uacut, - Uacute: Uacute$1, + Uacute: Uacute, Uarr: Uarr, Uarrocir: Uarrocir, Ubrcy: Ubrcy, Ubreve: Ubreve, Ucir: Ucir, - Ucirc: Ucirc$1, + Ucirc: Ucirc, Ucy: Ucy, Udblac: Udblac, Ufr: Ufr, Ugrav: Ugrav, - Ugrave: Ugrave$1, + Ugrave: Ugrave, Umacr: Umacr, UnderBar: UnderBar, UnderBrace: UnderBrace, @@ -33751,7 +33173,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Uscr: Uscr, Utilde: Utilde, Uum: Uum, - Uuml: Uuml$1, + Uuml: Uuml, VDash: VDash, Vbar: Vbar, Vcy: Vcy, @@ -33782,7 +33204,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ YIcy: YIcy, YUcy: YUcy, Yacut: Yacut, - Yacute: Yacute$1, + Yacute: Yacute, Ycirc: Ycirc, Ycy: Ycy, Yfr: Yfr, @@ -33800,29 +33222,29 @@ var characterEntities = /*#__PURE__*/Object.freeze({ Zopf: Zopf, Zscr: Zscr, aacut: aacut, - aacute: aacute$1, + aacute: aacute, abreve: abreve, ac: ac, acE: acE, acd: acd, acir: acir, - acirc: acirc$1, + acirc: acirc, acut: acut, - acute: acute$1, + acute: acute, acy: acy, aeli: aeli, - aelig: aelig$1, + aelig: aelig, af: af, afr: afr, agrav: agrav, - agrave: agrave$1, + agrave: agrave, alefsym: alefsym, aleph: aleph, alpha: alpha, amacr: amacr, amalg: amalg, am: am, - amp: amp$1, + amp: amp, and: and, andand: andand, andd: andd, @@ -33857,15 +33279,15 @@ var characterEntities = /*#__PURE__*/Object.freeze({ approx: approx, approxeq: approxeq, arin: arin, - aring: aring$1, + aring: aring, ascr: ascr, ast: ast, asymp: asymp, asympeq: asympeq, atild: atild, - atilde: atilde$1, + atilde: atilde, aum: aum, - auml: auml$1, + auml: auml, awconint: awconint, awint: awint, bNot: bNot, @@ -33970,7 +33392,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ bprime: bprime, breve: breve, brvba: brvba, - brvbar: brvbar$1, + brvbar: brvbar, bscr: bscr, bsemi: bsemi, bsim: bsim, @@ -33997,16 +33419,16 @@ var characterEntities = /*#__PURE__*/Object.freeze({ ccaps: ccaps, ccaron: ccaron, ccedi: ccedi, - ccedil: ccedil$1, + ccedil: ccedil, ccirc: ccirc, ccups: ccups, ccupssm: ccupssm, cdot: cdot, cedi: cedi, - cedil: cedil$1, + cedil: cedil, cemptyv: cemptyv, cen: cen, - cent: cent$1, + cent: cent, centerdot: centerdot, cfr: cfr, chcy: chcy, @@ -34045,7 +33467,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ copf: copf, coprod: coprod, cop: cop, - copy: copy$2, + copy: copy$1, copysr: copysr, crarr: crarr, cross: cross, @@ -34075,7 +33497,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ curlyvee: curlyvee, curlywedge: curlywedge, curre: curre, - curren: curren$1, + curren: curren, curvearrowleft: curvearrowleft, curvearrowright: curvearrowright, cuvee: cuvee, @@ -34099,7 +33521,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ ddarr: ddarr, ddotseq: ddotseq, de: de, - deg: deg$1, + deg: deg, delta: delta, demptyv: demptyv, dfisht: dfisht, @@ -34115,7 +33537,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ disin: disin, div: div, divid: divid, - divide: divide$1, + divide: divide, divideontimes: divideontimes, divonx: divonx, djcy: djcy, @@ -34152,11 +33574,11 @@ var characterEntities = /*#__PURE__*/Object.freeze({ eDDot: eDDot, eDot: eDot, eacut: eacut, - eacute: eacute$1, + eacute: eacute, easter: easter, ecaron: ecaron, ecir: ecir, - ecirc: ecirc$1, + ecirc: ecirc, ecolon: ecolon, ecy: ecy, edot: edot, @@ -34165,7 +33587,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ efr: efr, eg: eg, egrav: egrav, - egrave: egrave$1, + egrave: egrave, egs: egs, egsdot: egsdot, el: el, @@ -34207,9 +33629,9 @@ var characterEntities = /*#__PURE__*/Object.freeze({ esim: esim, eta: eta, et: et, - eth: eth$1, + eth: eth, eum: eum, - euml: euml$1, + euml: euml, euro: euro, excl: excl, exist: exist, @@ -34234,16 +33656,16 @@ var characterEntities = /*#__PURE__*/Object.freeze({ forkv: forkv, fpartint: fpartint, frac1: frac1, - frac12: frac12$1, + frac12: frac12, frac13: frac13, - frac14: frac14$1, + frac14: frac14, frac15: frac15, frac16: frac16, frac18: frac18, frac23: frac23, frac25: frac25, frac3: frac3, - frac34: frac34$1, + frac34: frac34, frac35: frac35, frac38: frac38, frac45: frac45, @@ -34298,7 +33720,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ gsime: gsime, gsiml: gsiml, g: g, - gt: gt$1, + gt: gt, gtcc: gtcc, gtcir: gtcir, gtdot: gtdot, @@ -34342,18 +33764,18 @@ var characterEntities = /*#__PURE__*/Object.freeze({ hybull: hybull, hyphen: hyphen, iacut: iacut, - iacute: iacute$1, + iacute: iacute, ic: ic, icir: icir, - icirc: icirc$1, + icirc: icirc, icy: icy, iecy: iecy, iexc: iexc, - iexcl: iexcl$1, + iexcl: iexcl, iff: iff, ifr: ifr, igrav: igrav, - igrave: igrave$1, + igrave: igrave, ii: ii, iiiint: iiiint, iiint: iiint, @@ -34383,7 +33805,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ iota: iota, iprod: iprod, iques: iques, - iquest: iquest$1, + iquest: iquest, iscr: iscr, isin: isin, isinE: isinE, @@ -34395,7 +33817,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ itilde: itilde, iukcy: iukcy, ium: ium, - iuml: iuml$1, + iuml: iuml, jcirc: jcirc, jcy: jcy, jfr: jfr, @@ -34430,7 +33852,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ langle: langle, lap: lap, laqu: laqu, - laquo: laquo$1, + laquo: laquo, larr: larr, larrb: larrb, larrbfs: larrbfs, @@ -34552,7 +33974,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ lsquor: lsquor, lstrok: lstrok, l: l, - lt: lt$1, + lt: lt, ltcc: ltcc, ltcir: ltcir, ltdot: ltdot, @@ -34570,7 +33992,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ lvnE: lvnE, mDDot: mDDot, mac: mac, - macr: macr$1, + macr: macr, male: male, malt: malt, maltese: maltese, @@ -34587,12 +34009,12 @@ var characterEntities = /*#__PURE__*/Object.freeze({ mfr: mfr, mho: mho, micr: micr, - micro: micro$1, + micro: micro, mid: mid, midast: midast, midcir: midcir, middo: middo, - middot: middot$1, + middot: middot, minus: minus, minusb: minusb, minusd: minusd, @@ -34631,7 +34053,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ natural: natural, naturals: naturals, nbs: nbs, - nbsp: nbsp$1, + nbsp: nbsp, nbump: nbump, nbumpe: nbumpe, ncap: ncap, @@ -34690,7 +34112,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ nmid: nmid, nopf: nopf, no: no, - not: not$1, + not: not, notin: notin, notinE: notinE, notindot: notindot, @@ -34747,7 +34169,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ nsupseteqq: nsupseteqq, ntgl: ntgl, ntild: ntild, - ntilde: ntilde$1, + ntilde: ntilde, ntlg: ntlg, ntriangleleft: ntriangleleft, ntrianglelefteq: ntrianglelefteq, @@ -34778,10 +34200,10 @@ var characterEntities = /*#__PURE__*/Object.freeze({ nwnear: nwnear, oS: oS, oacut: oacut, - oacute: oacute$1, + oacute: oacute, oast: oast, ocir: ocir, - ocirc: ocirc$1, + ocirc: ocirc, ocy: ocy, odash: odash, odblac: odblac, @@ -34793,7 +34215,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ ofr: ofr, ogon: ogon, ograv: ograv, - ograve: ograve$1, + ograve: ograve, ogt: ogt, ohbar: ohbar, ohm: ohm, @@ -34817,25 +34239,25 @@ var characterEntities = /*#__PURE__*/Object.freeze({ ord: ord, order: order$1, orderof: orderof, - ordf: ordf$1, - ordm: ordm$1, + ordf: ordf, + ordm: ordm, origof: origof, oror: oror, orslope: orslope, orv: orv, oscr: oscr, oslas: oslas, - oslash: oslash$1, + oslash: oslash, osol: osol, otild: otild, - otilde: otilde$1, + otilde: otilde, otimes: otimes, otimesas: otimesas, oum: oum, - ouml: ouml$1, + ouml: ouml, ovbar: ovbar, par: par, - para: para$1, + para: para, parallel: parallel, parsim: parsim, parsl: parsl, @@ -34865,14 +34287,14 @@ var characterEntities = /*#__PURE__*/Object.freeze({ plusdu: plusdu, pluse: pluse, plusm: plusm, - plusmn: plusmn$1, + plusmn: plusmn, plussim: plussim, plustwo: plustwo, pm: pm, pointint: pointint, popf: popf, poun: poun, - pound: pound$1, + pound: pound, pr: pr, prE: prE, prap: prap, @@ -34912,7 +34334,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ quest: quest, questeq: questeq, quo: quo, - quot: quot$1, + quot: quot, rAarr: rAarr, rArr: rArr, rAtail: rAtail, @@ -34927,7 +34349,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ range: range$1, rangle: rangle, raqu: raqu, - raquo: raquo$1, + raquo: raquo, rarr: rarr, rarrap: rarrap, rarrb: rarrb, @@ -34966,7 +34388,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ reals: reals, rect: rect, re: re, - reg: reg$1, + reg: reg, rfisht: rfisht, rfloor: rfloor, rfr: rfr, @@ -35041,7 +34463,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ searr: searr, searrow: searrow, sec: sec, - sect: sect$1, + sect: sect, semi: semi, seswar: seswar, setminus: setminus, @@ -35055,7 +34477,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ shortmid: shortmid, shortparallel: shortparallel, sh: sh, - shy: shy$1, + shy: shy, sigma: sigma, sigmaf: sigmaf, sigmav: sigmav, @@ -35142,9 +34564,9 @@ var characterEntities = /*#__PURE__*/Object.freeze({ sum: sum, sung: sung, sup: sup, - sup1: sup1$1, - sup2: sup2$1, - sup3: sup3$1, + sup1: sup1, + sup2: sup2, + sup3: sup3, supE: supE, supdot: supdot, supdsub: supdsub, @@ -35171,7 +34593,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ swarrow: swarrow, swnwar: swnwar, szli: szli, - szlig: szlig$1, + szlig: szlig, target: target, tau: tau, tbrk: tbrk, @@ -35192,10 +34614,10 @@ var characterEntities = /*#__PURE__*/Object.freeze({ thkap: thkap, thksim: thksim, thor: thor, - thorn: thorn$1, + thorn: thorn, tilde: tilde, time: time, - times: times$1, + times: times, timesb: timesb, timesbar: timesbar, timesd: timesd, @@ -35233,12 +34655,12 @@ var characterEntities = /*#__PURE__*/Object.freeze({ uArr: uArr, uHar: uHar, uacut: uacut, - uacute: uacute$1, + uacute: uacute, uarr: uarr, ubrcy: ubrcy, ubreve: ubreve, ucir: ucir, - ucirc: ucirc$1, + ucirc: ucirc, ucy: ucy, udarr: udarr, udblac: udblac, @@ -35246,7 +34668,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ ufisht: ufisht, ufr: ufr, ugrav: ugrav, - ugrave: ugrave$1, + ugrave: ugrave, uharl: uharl, uharr: uharr, uhblk: uhblk, @@ -35256,7 +34678,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ ultri: ultri, umacr: umacr, um: um, - uml: uml$1, + uml: uml, uogon: uogon, uopf: uopf, uparrow: uparrow, @@ -35280,7 +34702,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ utrif: utrif, uuarr: uuarr, uum: uum, - uuml: uuml$1, + uuml: uuml, uwangle: uwangle, vArr: vArr, vBar: vBar, @@ -35360,19 +34782,19 @@ var characterEntities = /*#__PURE__*/Object.freeze({ xvee: xvee, xwedge: xwedge, yacut: yacut, - yacute: yacute$1, + yacute: yacute, yacy: yacy, ycirc: ycirc, ycy: ycy, ye: ye, - yen: yen$1, + yen: yen, yfr: yfr, yicy: yicy, yopf: yopf, yscr: yscr, yucy: yucy, yum: yum, - yuml: yuml$1, + yuml: yuml, zacute: zacute, zcaron: zcaron, zcy: zcy, @@ -35386,7 +34808,7 @@ var characterEntities = /*#__PURE__*/Object.freeze({ zscr: zscr, zwj: zwj, zwnj: zwnj, - 'default': index$3 + 'default': index$1 }); var characterEntities$1 = getCjsExportFromNamespace(characterEntities); @@ -35401,7198 +34823,6155 @@ function decodeEntity(characters) { : false } -var legacy = getCjsExportFromNamespace(characterEntitiesLegacy); - -var invalid = getCjsExportFromNamespace(characterReferenceInvalid); - -var parseEntities_1 = parseEntities; - -var own$4 = {}.hasOwnProperty; -var fromCharCode = String.fromCharCode; -var noop$2 = Function.prototype; +var mdastUtilToString = toString$3; -// Default settings. -var defaults = { - warning: null, - reference: null, - text: null, - warningContext: null, - referenceContext: null, - textContext: null, - position: {}, - additional: null, - attribute: false, - nonTerminated: true -}; +// Get the text content of a node. +// Prefer the node’s plain-text fields, otherwise serialize its children, +// and if the given value is an array, serialize the nodes in it. +function toString$3(node) { + return ( + (node && + (node.value || + node.alt || + node.title || + ('children' in node && all(node.children)) || + ('length' in node && all(node)))) || + '' + ) +} -// Characters. -var tab = 9; // '\t' -var lineFeed = 10; // '\n' -var formFeed = 12; // '\f' -var space = 32; // ' ' -var ampersand = 38; // '&' -var semicolon = 59; // ';' -var lessThan = 60; // '<' -var equalsTo = 61; // '=' -var numberSign = 35; // '#' -var uppercaseX = 88; // 'X' -var lowercaseX = 120; // 'x' -var replacementCharacter = 65533; // '�' - -// Reference types. -var name = 'named'; -var hexa = 'hexadecimal'; -var deci = 'decimal'; - -// Map of bases. -var bases = {}; - -bases[hexa] = 16; -bases[deci] = 10; - -// Map of types to tests. -// Each type of character reference accepts different characters. -// This test is used to detect whether a reference has ended (as the semicolon -// is not strictly needed). -var tests = {}; - -tests[name] = isAlphanumerical; -tests[deci] = isDecimal; -tests[hexa] = isHexadecimal; - -// Warning types. -var namedNotTerminated = 1; -var numericNotTerminated = 2; -var namedEmpty = 3; -var numericEmpty = 4; -var namedUnknown = 5; -var numericDisallowed = 6; -var numericProhibited = 7; - -// Warning messages. -var messages = {}; - -messages[namedNotTerminated] = - 'Named character references must be terminated by a semicolon'; -messages[numericNotTerminated] = - 'Numeric character references must be terminated by a semicolon'; -messages[namedEmpty] = 'Named character references cannot be empty'; -messages[numericEmpty] = 'Numeric character references cannot be empty'; -messages[namedUnknown] = 'Named character references must be known'; -messages[numericDisallowed] = - 'Numeric character references cannot be disallowed'; -messages[numericProhibited] = - 'Numeric character references cannot be outside the permissible Unicode range'; - -// Wrap to ensure clean parameters are given to `parse`. -function parseEntities(value, options) { - var settings = {}; - var option; - var key; +function all(values) { + var result = []; + var length = values.length; + var index = -1; - if (!options) { - options = {}; + while (++index < length) { + result[index] = toString$3(values[index]); } - for (key in defaults) { - option = options[key]; - settings[key] = - option === null || option === undefined ? defaults[key] : option; - } + return result.join('') +} - if (settings.position.indent || settings.position.start) { - settings.indent = settings.position.indent || []; - settings.position = settings.position.start; - } +var hasOwnProperty_1 = {}.hasOwnProperty; + +var normalizeIdentifier_1 = normalizeIdentifier; - return parse$8(value, settings) +function normalizeIdentifier(value) { + return ( + value + // Collapse Markdown whitespace. + .replace(/[\t\n\r ]+/g, ' ') + // Trim. + .replace(/^ | $/g, '') + // Some characters are considered “uppercase”, but if their lowercase + // counterpart is uppercased will result in a different uppercase + // character. + // Hence, to get that form, we perform both lower- and uppercase. + // Upper case makes sure keys will not interact with default prototypal + // methods: no object method is uppercase. + .toLowerCase() + .toUpperCase() + ) } -// Parse entities. -// eslint-disable-next-line complexity -function parse$8(value, settings) { - var additional = settings.additional; - var nonTerminated = settings.nonTerminated; - var handleText = settings.text; - var handleReference = settings.reference; - var handleWarning = settings.warning; - var textContext = settings.textContext; - var referenceContext = settings.referenceContext; - var warningContext = settings.warningContext; - var pos = settings.position; - var indent = settings.indent || []; - var length = value.length; - var index = 0; - var lines = -1; - var column = pos.column || 1; - var line = pos.line || 1; - var queue = ''; - var result = []; - var entityCharacters; - var namedEntity; - var terminated; - var characters; - var character; - var reference; - var following; - var warning; - var reason; - var output; - var entity; - var begin; - var start; - var type; - var test; - var prev; - var next; - var diff; - var end; +var fromCharCode = String.fromCharCode; - if (typeof additional === 'string') { - additional = additional.charCodeAt(0); - } +var safeFromInt_1 = safeFromInt; - // Cache the current point. - prev = now(); - // Wrap `handleWarning`. - warning = handleWarning ? parseError : noop$2; - // Ensure the algorithm walks over the first character and the end - // (inclusive). - index--; - length++; +function safeFromInt(value, base) { + var code = parseInt(value, base); - while (++index < length) { - // If the previous character was a newline. - if (character === lineFeed) { - column = indent[lines] || 1; - } + if ( + // C0 except for HT, LF, FF, CR, space + code < 9 || + code === 11 || + (code > 13 && code < 32) || + // Control character (DEL) of the basic block and C1 controls. + (code > 126 && code < 160) || + // Lone high surrogates and low surrogates. + (code > 55295 && code < 57344) || + // Noncharacters. + (code > 64975 && code < 65008) || + (code & 65535) === 65535 || + (code & 65535) === 65534 || + // Out of range + code > 1114111 + ) { + return '\uFFFD' + } - character = value.charCodeAt(index); + return fromCharCode(code) +} - if (character === ampersand) { - following = value.charCodeAt(index + 1); +var markdownLineEnding_1 = markdownLineEnding; - // The behaviour depends on the identity of the next character. - if ( - following === tab || - following === lineFeed || - following === formFeed || - following === space || - following === ampersand || - following === lessThan || - following !== following || - (additional && following === additional) - ) { - // Not a character reference. - // No characters are consumed, and nothing is returned. - // This is not an error, either. - queue += fromCharCode(character); - column++; +function markdownLineEnding(code) { + return code < -2 +} - continue - } +var markdownSpace_1 = markdownSpace; - start = index + 1; - begin = start; - end = start; +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32 +} - if (following === numberSign) { - // Numerical entity. - end = ++begin; +var factorySpace = createSpace; - // The behaviour further depends on the next character. - following = value.charCodeAt(end); - if (following === uppercaseX || following === lowercaseX) { - // ASCII hex digits. - type = hexa; - end = ++begin; - } else { - // ASCII digits. - type = deci; - } - } else { - // Named entity. - type = name; - } - entityCharacters = ''; - entity = ''; - characters = ''; - test = tests[type]; - end--; +function createSpace(effects, ok, type, max) { + var limit = max ? max - 1 : Infinity; + var size; - while (++end < length) { - following = value.charCodeAt(end); + return start - if (!test(following)) { - break - } + function start(code) { + if (markdownSpace_1(code)) { + effects.enter(type); + size = 0; + return prefix(code) + } - characters += fromCharCode(following); + return ok(code) + } - // Check if we can match a legacy named reference. - // If so, we cache that as the last viable named reference. - // This ensures we do not need to walk backwards later. - if (type === name && own$4.call(legacy, characters)) { - entityCharacters = characters; - entity = legacy[characters]; - } - } + function prefix(code) { + if (markdownSpace_1(code) && size++ < limit) { + effects.consume(code); + return prefix + } - terminated = value.charCodeAt(end) === semicolon; + effects.exit(type); + return ok(code) + } +} - if (terminated) { - end++; +var tokenize = initializeContent; - namedEntity = type === name ? decodeEntity_1(characters) : false; - if (namedEntity) { - entityCharacters = characters; - entity = namedEntity; - } - } - diff = 1 + end - start; - if (!terminated && !nonTerminated) ; else if (!characters) { - // An empty (possible) entity is valid, unless it’s numeric (thus an - // ampersand followed by an octothorp). - if (type !== name) { - warning(numericEmpty, diff); - } - } else if (type === name) { - // An ampersand followed by anything unknown, and not terminated, is - // invalid. - if (terminated && !entity) { - warning(namedUnknown, 1); - } else { - // If theres something after an entity name which is not known, cap - // the reference. - if (entityCharacters !== characters) { - end = begin + entityCharacters.length; - diff = 1 + end - begin; - terminated = false; - } - // If the reference is not terminated, warn. - if (!terminated) { - reason = entityCharacters ? namedNotTerminated : namedEmpty; +function initializeContent(effects) { + var contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ); - if (settings.attribute) { - following = value.charCodeAt(end); + var previous; - if (following === equalsTo) { - warning(reason, diff); - entity = null; - } else if (isAlphanumerical(following)) { - entity = null; - } else { - warning(reason, diff); - } - } else { - warning(reason, diff); - } - } - } + return contentStart - reference = entity; - } else { - if (!terminated) { - // All non-terminated numeric entities are not rendered, and trigger a - // warning. - warning(numericNotTerminated, diff); - } - - // When terminated and number, parse as either hexadecimal or decimal. - reference = parseInt(characters, bases[type]); - - // Trigger a warning when the parsed number is prohibited, and replace - // with replacement character. - if (prohibited(reference)) { - warning(numericProhibited, diff); - reference = fromCharCode(replacementCharacter); - } else if (reference in invalid) { - // Trigger a warning when the parsed number is disallowed, and replace - // by an alternative. - warning(numericDisallowed, diff); - reference = invalid[reference]; - } else { - // Parse the number. - output = ''; + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code); + return + } - // Trigger a warning when the parsed number should not be used. - if (disallowed(reference)) { - warning(numericDisallowed, diff); - } + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + return factorySpace(effects, contentStart, 'linePrefix') + } - // Stringify the number. - if (reference > 0xffff) { - reference -= 0x10000; - output += fromCharCode((reference >>> (10 & 0x3ff)) | 0xd800); - reference = 0xdc00 | (reference & 0x3ff); - } + function paragraphInitial(code) { + effects.enter('paragraph'); + return lineStart(code) + } - reference = output + fromCharCode(reference); - } - } + function lineStart(code) { + var token = effects.enter('chunkText', { + contentType: 'text', + previous: previous + }); - // Found it! - // First eat the queued characters as normal text, then eat an entity. - if (reference) { - flush(); + if (previous) { + previous.next = token; + } - prev = now(); - index = end - 1; - column += end - start + 1; - result.push(reference); - next = now(); - next.offset++; + previous = token; - if (handleReference) { - handleReference.call( - referenceContext, - reference, - {start: prev, end: next}, - value.slice(start - 1, end) - ); - } + return data(code) + } - prev = next; - } else { - // If we could not find a reference, queue the checked characters (as - // normal characters), and move the pointer to their end. - // This is possible because we can be certain neither newlines nor - // ampersands are included. - characters = value.slice(start - 1, end); - queue += characters; - column += characters.length; - index = end - 1; - } - } else { - // Handle anything other than an ampersand, including newlines and EOF. - if ( - character === 10 // Line feed - ) { - line++; - lines++; - column = 0; - } + function data(code) { + if (code === null) { + effects.exit('chunkText'); + effects.exit('paragraph'); + effects.consume(code); + return + } - if (character === character) { - queue += fromCharCode(character); - column++; - } else { - flush(); - } + if (markdownLineEnding_1(code)) { + effects.consume(code); + effects.exit('chunkText'); + return lineStart } + + // Data. + effects.consume(code); + return data } +} - // Return the reduced nodes. - return result.join('') +var content = { + tokenize: tokenize +}; - // Get current position. - function now() { - return { - line: line, - column: column, - offset: index + (pos.offset || 0) - } - } +var tokenize$1 = tokenizeBlankLine; +var partial = true; - // “Throw” a parse-error: a warning. - function parseError(code, offset) { - var position = now(); - position.column += offset; - position.offset += offset; - handleWarning.call(warningContext, messages[code], position, code); - } - // Flush `queue` (normal text). - // Macro invoked before each entity and at the end of `value`. - // Does nothing when `queue` is empty. - function flush() { - if (queue) { - result.push(queue); - if (handleText) { - handleText.call(textContext, queue, {start: prev, end: now()}); - } +function tokenizeBlankLine(effects, ok, nok) { + return factorySpace(effects, afterWhitespace, 'linePrefix') - queue = ''; - } + function afterWhitespace(code) { + return code === null || markdownLineEnding_1(code) ? ok(code) : nok(code) } } -// Check if `character` is outside the permissible unicode range. -function prohibited(code) { - return (code >= 0xd800 && code <= 0xdfff) || code > 0x10ffff -} +var partialBlankLine = { + tokenize: tokenize$1, + partial: partial +}; -// Check if `character` is disallowed. -function disallowed(code) { - return ( - (code >= 0x0001 && code <= 0x0008) || - code === 0x000b || - (code >= 0x000d && code <= 0x001f) || - (code >= 0x007f && code <= 0x009f) || - (code >= 0xfdd0 && code <= 0xfdef) || - (code & 0xffff) === 0xffff || - (code & 0xffff) === 0xfffe - ) -} +var tokenize$2 = initializeDocument; -var decode = factory$4; -// Factory to create an entity decoder. -function factory$4(ctx) { - decoder.raw = decodeRaw; - return decoder - // Normalize `position` to add an `indent`. - function normalize(position) { - var offsets = ctx.offset; - var line = position.line; - var result = []; - while (++line) { - if (!(line in offsets)) { - break - } - result.push((offsets[line] || 0) + 1); +var container = {tokenize: tokenizeContainer}; +var lazyFlow = {tokenize: tokenizeLazyFlow}; + +function initializeDocument(effects) { + var self = this; + var stack = []; + var continued = 0; + var inspectResult; + var childFlow; + var childToken; + + return start + + function start(code) { + if (continued < stack.length) { + self.containerState = stack[continued][1]; + return effects.attempt( + stack[continued][0].continuation, + documentContinue, + documentContinued + )(code) } - return {start: position, indent: result} + return documentContinued(code) } - // Decode `value` (at `position`) into text-nodes. - function decoder(value, position, handler) { - parseEntities_1(value, { - position: normalize(position), - warning: handleWarning, - text: handler, - reference: handler, - textContext: ctx, - referenceContext: ctx - }); + function documentContinue(code) { + continued++; + return start(code) } - // Decode `value` (at `position`) into a string. - function decodeRaw(value, position, options) { - return parseEntities_1( - value, - immutable(options, {position: normalize(position), warning: handleWarning}) - ) + function documentContinued(code) { + // If we’re in a concrete construct (such as when expecting another line of + // HTML, or we resulted in lazy content), we can immediately start flow. + if (inspectResult && inspectResult.flowContinue) { + return flowStart(code) + } + + self.interrupt = + childFlow && + childFlow.currentConstruct && + childFlow.currentConstruct.interruptible; + self.containerState = {}; + return effects.attempt(container, containerContinue, flowStart)(code) } - // Handle a warning. - // See for the warnings. - function handleWarning(reason, position, code) { - if (code !== 3) { - ctx.file.message(reason, position); - } + function containerContinue(code) { + stack.push([self.currentConstruct, self.containerState]); + self.containerState = undefined; + return documentContinued(code) } -} -var tokenizer = factory$5; + function flowStart(code) { + if (code === null) { + exitContainers(0, true); + effects.consume(code); + return + } + + childFlow = childFlow || self.parser.flow(self.now()); -// Construct a tokenizer. This creates both `tokenizeInline` and `tokenizeBlock`. -function factory$5(type) { - return tokenize + effects.enter('chunkFlow', { + contentType: 'flow', + previous: childToken, + _tokenizer: childFlow + }); - // Tokenizer for a bound `type`. - function tokenize(value, location) { - var self = this; - var offset = self.offset; - var tokens = []; - var methods = self[type + 'Methods']; - var tokenizers = self[type + 'Tokenizers']; - var line = location.line; - var column = location.column; - var index; - var length; - var method; - var name; - var matched; - var valueLength; + return flowContinue(code) + } - // Trim white space only lines. - if (!value) { - return tokens + function flowContinue(code) { + if (code === null) { + continueFlow(effects.exit('chunkFlow')); + return flowStart(code) } - // Expose on `eat`. - eat.now = now; - eat.file = self.file; - - // Sync initial offset. - updatePosition(''); + if (markdownLineEnding_1(code)) { + effects.consume(code); + continueFlow(effects.exit('chunkFlow')); + return effects.check( + {tokenize: tokenizeInspect, partial: true}, + documentAfterPeek + ) + } - // Iterate over `value`, and iterate over all tokenizers. When one eats - // something, re-iterate with the remaining value. If no tokenizer eats, - // something failed (should not happen) and an exception is thrown. - while (value) { - index = -1; - length = methods.length; - matched = false; + effects.consume(code); + return flowContinue + } - while (++index < length) { - name = methods[index]; - method = tokenizers[name]; + function documentAfterPeek(code) { + exitContainers( + inspectResult.continued, + inspectResult && inspectResult.flowEnd + ); - // Previously, we had constructs such as footnotes and YAML that used - // these properties. - // Those are now external (plus there are userland extensions), that may - // still use them. - if ( - method && - /* istanbul ignore next */ (!method.onlyAtStart || self.atStart) && - /* istanbul ignore next */ (!method.notInList || !self.inList) && - /* istanbul ignore next */ (!method.notInBlock || !self.inBlock) && - (!method.notInLink || !self.inLink) - ) { - valueLength = value.length; + continued = 0; + return start(code) + } - method.apply(self, [eat, value]); + function continueFlow(token) { + if (childToken) childToken.next = token; + childToken = token; + childFlow.lazy = inspectResult && inspectResult.lazy; + childFlow.defineSkip(token.start); + childFlow.write(self.sliceStream(token)); + } - matched = valueLength !== value.length; + function exitContainers(size, end) { + var index = stack.length; - if (matched) { - break - } - } - } + // Close the flow. + if (childFlow && end) { + childFlow.write([null]); + childToken = childFlow = undefined; + } - /* istanbul ignore if */ - if (!matched) { - self.file.fail(new Error('Infinite loop'), eat.now()); - } + // Exit open containers. + while (index-- > size) { + self.containerState = stack[index][1]; + stack[index][0].exit.call(self, effects); } - self.eof = now(); + stack.length = size; + } - return tokens + function tokenizeInspect(effects, ok) { + var subcontinued = 0; - // Update line, column, and offset based on `value`. - function updatePosition(subvalue) { - var lastIndex = -1; - var index = subvalue.indexOf('\n'); + inspectResult = {}; - while (index !== -1) { - line++; - lastIndex = index; - index = subvalue.indexOf('\n', index + 1); - } + return inspectStart - if (lastIndex === -1) { - column += subvalue.length; - } else { - column = subvalue.length - lastIndex; + function inspectStart(code) { + if (subcontinued < stack.length) { + self.containerState = stack[subcontinued][1]; + return effects.attempt( + stack[subcontinued][0].continuation, + inspectContinue, + inspectLess + )(code) } - if (line in offset) { - if (lastIndex !== -1) { - column += offset[line]; - } else if (column <= offset[line]) { - column = offset[line] + 1; - } + // If we’re continued but in a concrete flow, we can’t have more + // containers. + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + inspectResult.flowContinue = true; + return inspectDone(code) } + + self.interrupt = + childFlow.currentConstruct && childFlow.currentConstruct.interruptible; + self.containerState = {}; + return effects.attempt(container, inspectFlowEnd, inspectDone)(code) } - // Get offset. Called before the first character is eaten to retrieve the - // range’s offsets. - function getOffset() { - var indentation = []; - var pos = line + 1; + function inspectContinue(code) { + subcontinued++; + return self.containerState._closeFlow + ? inspectFlowEnd(code) + : inspectStart(code) + } - // Done. Called when the last character is eaten to retrieve the range’s - // offsets. - return function () { - var last = line + 1; + function inspectLess(code) { + if (childFlow.currentConstruct && childFlow.currentConstruct.lazy) { + // Maybe another container? + self.containerState = {}; + return effects.attempt( + container, + inspectFlowEnd, + // Maybe flow, or a blank line? + effects.attempt( + lazyFlow, + inspectFlowEnd, + effects.check(partialBlankLine, inspectFlowEnd, inspectLazy) + ) + )(code) + } - while (pos < last) { - indentation.push((offset[pos] || 0) + 1); + // Otherwise we’re interrupting. + return inspectFlowEnd(code) + } - pos++; - } + function inspectLazy(code) { + // Act as if all containers are continued. + subcontinued = stack.length; + inspectResult.lazy = true; + inspectResult.flowContinue = true; + return inspectDone(code) + } - return indentation - } + // We’re done with flow if we have more containers, or an interruption. + function inspectFlowEnd(code) { + inspectResult.flowEnd = true; + return inspectDone(code) } - // Get the current position. - function now() { - var pos = {line: line, column: column}; + function inspectDone(code) { + inspectResult.continued = subcontinued; + self.interrupt = self.containerState = undefined; + return ok(code) + } + } +} - pos.offset = self.toOffset(pos); +function tokenizeContainer(effects, ok, nok) { + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + 'linePrefix', + 4 + ) +} - return pos - } +function tokenizeLazyFlow(effects, ok, nok) { + return factorySpace( + effects, + effects.lazy(this.parser.constructs.flow, ok, nok), + 'linePrefix', + 4 + ) +} - // Store position information for a node. - function Position(start) { - this.start = start; - this.end = now(); - } +var document$1 = { + tokenize: tokenize$2 +}; - // Throw when a value is incorrectly eaten. This shouldn’t happen but will - // throw on new, incorrect rules. - function validateEat(subvalue) { - /* istanbul ignore if */ - if (value.slice(0, subvalue.length) !== subvalue) { - // Capture stack-trace. - self.file.fail( - new Error( - 'Incorrectly eaten value: please report this warning on https://git.io/vg5Ft' - ), - now() - ); - } - } +var assign = Object.assign; - // Mark position and patch `node.position`. - function position() { - var before = now(); +var chunkedSplice_1 = chunkedSplice; - return update +var v8MaxSafeChunkSize = 10000; - // Add the position to a node. - function update(node, indent) { - var previous = node.position; - var start = previous ? previous.start : before; - var combined = []; - var n = previous && previous.end.line; - var l = before.line; +// `Array#splice` takes all items to be inserted as individual argument which +// causes a stack overflow in V8 when trying to insert 100k items for instance. +function chunkedSplice(list, start, remove, items) { + var end = list.length; + var chunkStart = 0; + var result; + var parameters; - node.position = new Position(start); + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start; + } else { + start = start > end ? end : start; + } - // If there was already a `position`, this node was merged. Fixing - // `start` wasn’t hard, but the indent is different. Especially - // because some information, the indent between `n` and `l` wasn’t - // tracked. Luckily, that space is (should be?) empty, so we can - // safely check for it now. - if (previous && indent && previous.indent) { - combined = previous.indent; + remove = remove > 0 ? remove : 0; - if (n < l) { - while (++n < l) { - combined.push((offset[n] || 0) + 1); - } + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < v8MaxSafeChunkSize) { + parameters = Array.from(items); + parameters.unshift(start, remove); + return [].splice.apply(list, parameters) + } - combined.push(before.column); - } + // Delete `remove` items starting from `start` + result = [].splice.apply(list, [start, remove]); - indent = combined.concat(indent); - } + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + v8MaxSafeChunkSize); + parameters.unshift(start, 0) + ;[].splice.apply(list, parameters); - node.position.indent = indent || []; + chunkStart += v8MaxSafeChunkSize; + start += v8MaxSafeChunkSize; + } - return node - } - } + return result +} - // Add `node` to `parent`s children or to `tokens`. Performs merges where - // possible. - function add(node, parent) { - var children = parent ? parent.children : tokens; - var previous = children[children.length - 1]; - var fn; +var shallow_1 = shallow; - if ( - previous && - node.type === previous.type && - (node.type === 'text' || node.type === 'blockquote') && - mergeable(previous) && - mergeable(node) - ) { - fn = node.type === 'text' ? mergeText : mergeBlockquote; - node = fn.call(self, previous, node); - } - if (node !== previous) { - children.push(node); - } - if (self.atStart && tokens.length !== 0) { - self.exitStart(); - } +function shallow(object) { + return assign({}, object) +} + +var subtokenize_1 = subtokenize; - return node - } - // Remove `subvalue` from `value`. `subvalue` must be at the start of - // `value`. - function eat(subvalue) { - var indent = getOffset(); - var pos = position(); - var current = now(); - validateEat(subvalue); - apply.reset = reset; - reset.test = test; - apply.test = test; - value = value.slice(subvalue.length); - updatePosition(subvalue); +function subtokenize(events) { + var jumps = {}; + var index = -1; + var event; + var lineIndex; + var otherIndex; + var otherEvent; + var parameters; + var subevents; + var more; + + while (++index < events.length) { + while (index in jumps) { + index = jumps[index]; + } - indent = indent(); + event = events[index]; - return apply + // Add a hook for the GFM tasklist extension, which needs to know if text + // is in the first content of a list item. + if ( + index && + event[1].type === 'chunkFlow' && + events[index - 1][1].type === 'listItemPrefix' + ) { + subevents = event[1]._tokenizer.events; + otherIndex = 0; - // Add the given arguments, add `position` to the returned node, and - // return the node. - function apply(node, parent) { - return pos(add(pos(node), parent), indent) + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'lineEndingBlank' + ) { + otherIndex += 2; } - // Functions just like apply, but resets the content: the line and - // column are reversed, and the eaten value is re-added. This is - // useful for nodes with a single type of content, such as lists and - // tables. See `apply` above for what parameters are expected. - function reset() { - var node = apply.apply(null, arguments); + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'content' + ) { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === 'content') { + break + } - line = current.line; - column = current.column; - value = subvalue + value; + if (subevents[otherIndex][1].type === 'chunkText') { + subevents[otherIndex][1].isInFirstContentOfListItem = true; + otherIndex++; + } + } + } + } - return node + // Enter. + if (event[0] === 'enter') { + if (event[1].contentType) { + assign(jumps, subcontent(events, index)); + index = jumps[index]; + more = true; } + } + // Exit. + else if (event[1]._container || event[1]._movePreviousLineEndings) { + otherIndex = index; + lineIndex = undefined; + + while (otherIndex--) { + otherEvent = events[otherIndex]; - // Test the position, after eating, and reverse to a not-eaten state. - function test() { - var result = pos({}); + if ( + otherEvent[1].type === 'lineEnding' || + otherEvent[1].type === 'lineEndingBlank' + ) { + if (otherEvent[0] === 'enter') { + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank'; + } + + otherEvent[1].type = 'lineEnding'; + lineIndex = otherIndex; + } + } else { + break + } + } - line = current.line; - column = current.column; - value = subvalue + value; + if (lineIndex) { + // Fix position. + event[1].end = shallow_1(events[lineIndex][1].start); - return result.position + // Switch container exit w/ line endings. + parameters = events.slice(lineIndex, index); + parameters.unshift(event); + chunkedSplice_1(events, lineIndex, index - lineIndex + 1, parameters); } } } + + return !more } -// Check whether a node is mergeable with adjacent nodes. -function mergeable(node) { - var start; +function subcontent(events, eventIndex) { + var token = events[eventIndex][1]; + var context = events[eventIndex][2]; + var startPosition = eventIndex - 1; + var startPositions = []; + var tokenizer = + token._tokenizer || context.parser[token.contentType](token.start); + var childEvents = tokenizer.events; + var jumps = []; + var gaps = {}; + var stream; + var previous; + var index; + var entered; var end; + var adjust; - if (node.type !== 'text' || !node.position) { - return true - } + // Loop forward through the linked tokens to pass them in order to the + // subtokenizer. + while (token) { + // Find the position of the event for this token. + while (events[++startPosition][1] !== token) { + // Empty. + } - start = node.position.start; - end = node.position.end; + startPositions.push(startPosition); - // Only merge nodes which occupy the same size as their `value`. - return ( - start.line !== end.line || end.column - start.column === node.value.length - ) -} + if (!token._tokenizer) { + stream = context.sliceStream(token); -// Merge two text nodes: `node` into `prev`. -function mergeText(previous, node) { - previous.value += node.value; + if (!token.next) { + stream.push(null); + } - return previous -} + if (previous) { + tokenizer.defineSkip(token.start); + } -// Merge two blockquotes: `node` into `prev`, unless in CommonMark or gfm modes. -function mergeBlockquote(previous, node) { - if (this.options.commonmark || this.options.gfm) { - return node - } + if (token.isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true; + } - previous.children = previous.children.concat(node.children); + tokenizer.write(stream); - return previous -} + if (token.isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = undefined; + } + } -var markdownEscapes = escapes; + // Unravel the next token. + previous = token; + token = token.next; + } -var defaults$1 = [ - '\\', - '`', - '*', - '{', - '}', - '[', - ']', - '(', - ')', - '#', - '+', - '-', - '.', - '!', - '_', - '>' -]; + // Now, loop back through all events (and linked tokens), to figure out which + // parts belong where. + token = previous; + index = childEvents.length; -var gfm = defaults$1.concat(['~', '|']); - -var commonmark = gfm.concat([ - '\n', - '"', - '$', - '%', - '&', - "'", - ',', - '/', - ':', - ';', - '<', - '=', - '?', - '@', - '^' -]); + while (index--) { + // Make sure we’ve at least seen something (final eol is part of the last + // token). + if (childEvents[index][0] === 'enter') { + entered = true; + } else if ( + // Find a void token that includes a break. + entered && + childEvents[index][1].type === childEvents[index - 1][1].type && + childEvents[index][1].start.line !== childEvents[index][1].end.line + ) { + add(childEvents.slice(index + 1, end)); + + // Help GC. + token._tokenizer = token.next = undefined; + token = token.previous; + end = index + 1; + } + } -escapes.default = defaults$1; -escapes.gfm = gfm; -escapes.commonmark = commonmark; + // Help GC. + tokenizer.events = token._tokenizer = token.next = undefined; -// Get markdown escapes. -function escapes(options) { - var settings = options || {}; + // Do head: + add(childEvents.slice(0, end)); + + index = -1; + adjust = 0; - if (settings.commonmark) { - return commonmark + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1]; + adjust += jumps[index][1] - jumps[index][0] - 1; } - return settings.gfm ? gfm : defaults$1 + return gaps + + function add(slice) { + var start = startPositions.pop(); + jumps.unshift([start, start + slice.length - 1]); + chunkedSplice_1(events, start, 2, slice); + } } -var blockElements = [ - 'address', - 'article', - 'aside', - 'base', - 'basefont', - 'blockquote', - 'body', - 'caption', - 'center', - 'col', - 'colgroup', - 'dd', - 'details', - 'dialog', - 'dir', - 'div', - 'dl', - 'dt', - 'fieldset', - 'figcaption', - 'figure', - 'footer', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'header', - 'hgroup', - 'hr', - 'html', - 'iframe', - 'legend', - 'li', - 'link', - 'main', - 'menu', - 'menuitem', - 'meta', - 'nav', - 'noframes', - 'ol', - 'optgroup', - 'option', - 'p', - 'param', - 'pre', - 'section', - 'source', - 'title', - 'summary', - 'table', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'title', - 'tr', - 'track', - 'ul' -]; +var sizeChunks_1 = sizeChunks; -var defaults$2 = { - position: true, - gfm: true, - commonmark: false, - pedantic: false, - blocks: blockElements -}; +// Measure the number of character codes in chunks. +// Counts tabs based on their expanded size, and CR+LF as one character. +function sizeChunks(chunks) { + var index = -1; + var size = 0; -var setOptions_1 = setOptions; + while (++index < chunks.length) { + size += typeof chunks[index] === 'string' ? chunks[index].length : 1; + } -function setOptions(options) { - var self = this; - var current = self.options; - var key; - var value; + return size +} - if (options == null) { - options = {}; - } else if (typeof options === 'object') { - options = immutable(options); - } else { - throw new Error('Invalid value `' + options + '` for setting `options`') - } +var prefixSize_1 = prefixSize; - for (key in defaults$2) { - value = options[key]; - if (value == null) { - value = current[key]; - } - if ( - (key !== 'blocks' && typeof value !== 'boolean') || - (key === 'blocks' && typeof value !== 'object') - ) { - throw new Error( - 'Invalid value `' + value + '` for setting `options.' + key + '`' - ) - } +function prefixSize(events, type) { + var tail = events[events.length - 1]; + if (!tail || tail[1].type !== type) return 0 + return sizeChunks_1(tail[2].sliceStream(tail[1])) +} - options[key] = value; - } +var tokenize$3 = tokenizeContent; +var resolve$7 = resolveContent; +var interruptible = true; +var lazy = true; - self.options = options; - self.escape = markdownEscapes(options); - return self -} -var convert_1 = convert$3; -function convert$3(test) { - if (typeof test === 'string') { - return typeFactory(test) - } - if (test === null || test === undefined) { - return ok$1 - } - if (typeof test === 'object') { - return ('length' in test ? anyFactory : matchesFactory)(test) - } - if (typeof test === 'function') { - return test - } +var lookaheadConstruct = {tokenize: tokenizeLookaheadConstruct, partial: true}; - throw new Error('Expected function, string, or object as test') +// Content is transparent: it’s parsed right now. That way, definitions are also +// parsed right now: before text in paragraphs (specifically, media) are parsed. +function resolveContent(events) { + subtokenize_1(events); + return events } -function convertAll(tests) { - var results = []; - var length = tests.length; - var index = -1; +function tokenizeContent(effects, ok) { + var previous; - while (++index < length) { - results[index] = convert$3(tests[index]); - } + return start - return results -} + function start(code) { + effects.enter('content'); + previous = effects.enter('chunkContent', { + contentType: 'content' + }); -// Utility assert each property in `test` is represented in `node`, and each -// values are strictly equal. -function matchesFactory(test) { - return matches + return data(code) + } - function matches(node) { - var key; + function data(code) { + if (code === null) { + return contentEnd(code) + } - for (key in test) { - if (node[key] !== test[key]) { - return false - } + if (markdownLineEnding_1(code)) { + return effects.check( + lookaheadConstruct, + contentContinue, + contentEnd + )(code) } - return true + // Data. + effects.consume(code); + return data + } + + function contentEnd(code) { + effects.exit('chunkContent'); + effects.exit('content'); + return ok(code) + } + + function contentContinue(code) { + effects.consume(code); + effects.exit('chunkContent'); + previous = previous.next = effects.enter('chunkContent', { + contentType: 'content', + previous: previous + }); + + return data } } -function anyFactory(tests) { - var checks = convertAll(tests); - var length = checks.length; +function tokenizeLookaheadConstruct(effects, ok, nok) { + var self = this; - return matches + return startLookahead - function matches() { - var index = -1; + function startLookahead(code) { + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + return factorySpace(effects, prefixed, 'linePrefix') + } - while (++index < length) { - if (checks[index].apply(this, arguments)) { - return true - } + function prefixed(code) { + if (code === null || markdownLineEnding_1(code)) { + return nok(code) } - return false + if (prefixSize_1(self.events, 'linePrefix') < 4) { + return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) + } + + return ok(code) } } -// Utility to convert a string into a function which checks a given node’s type -// for said string. -function typeFactory(test) { - return type +var content$1 = { + tokenize: tokenize$3, + resolve: resolve$7, + interruptible: interruptible, + lazy: lazy +}; - function type(node) { - return Boolean(node && node.type === test) - } -} +var tokenize$4 = initializeFlow; -// Utility to return true. -function ok$1() { - return true -} -var color_1 = color$1; -function color$1(d) { - return '\u001B[33m' + d + '\u001B[39m' -} -var unistUtilVisitParents = visitParents; -var CONTINUE = true; -var SKIP = 'skip'; -var EXIT = false; +function initializeFlow(effects) { + var self = this; + var initial = effects.attempt( + // Try to parse a blank line. + partialBlankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content$1, afterConstruct) + ), + 'linePrefix' + ) + ) + ); -visitParents.CONTINUE = CONTINUE; -visitParents.SKIP = SKIP; -visitParents.EXIT = EXIT; + return initial -function visitParents(tree, test, visitor, reverse) { - var is; + function atBlankEnding(code) { + if (code === null) { + effects.consume(code); + return + } - if (func(test) && !func(visitor)) { - reverse = visitor; - visitor = test; - test = null; + effects.enter('lineEndingBlank'); + effects.consume(code); + effects.exit('lineEndingBlank'); + self.currentConstruct = undefined; + return initial } - is = convert_1(test); + function afterConstruct(code) { + if (code === null) { + effects.consume(code); + return + } - one(tree, null, [])(); + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + self.currentConstruct = undefined; + return initial + } +} - function one(child, index, parents) { - var value = object(child) ? child : {}; - var name; +var flow = { + tokenize: tokenize$4 +}; - if (string(value.type)) { - name = string(value.tagName) - ? value.tagName - : string(value.name) - ? value.name - : undefined; +var text_1 = initializeFactory('text'); +var string = initializeFactory('string'); +var resolver_1 = {resolveAll: resolver()}; - node.displayName = - 'node (' + color_1(value.type + (name ? '<' + name + '>' : '')) + ')'; - } - return node - function node() { - var result = []; - var subresult; - if (!test || is(child, index, parents[parents.length - 1] || null)) { - result = toResult(visitor(child, parents)); - if (result[0] === EXIT) { - return result - } - } +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: resolver(field === 'text' ? resolveAllLineSuffixes : undefined) + } - if (!child.children || result[0] === SKIP) { - return result + function initializeText(effects) { + var self = this; + var constructs = this.parser.constructs[field]; + var text = effects.attempt(constructs, start, notText); + + return start + + function start(code) { + return atBreak(code) ? text(code) : notText(code) + } + + function notText(code) { + if (code === null) { + effects.consume(code); + return } - subresult = toResult(children(child.children, parents.concat(child))); - return subresult[0] === EXIT ? subresult : result + effects.enter('data'); + effects.consume(code); + return data } - } - // Visit children in `parent`. - function children(children, parents) { - var min = -1; - var step = reverse ? -1 : 1; - var index = (reverse ? children.length : min) + step; - var child; - var result; + function data(code) { + if (atBreak(code)) { + effects.exit('data'); + return text(code) + } - while (index > min && index < children.length) { - child = children[index]; - result = one(child, index, parents)(); + // Data. + effects.consume(code); + return data + } - if (result[0] === EXIT) { - return result + function atBreak(code) { + var list = constructs[code]; + var index = -1; + + if (code === null) { + return true } - index = typeof result[1] === 'number' ? result[1] : index + step; + if (list) { + while (++index < list.length) { + if ( + !list[index].previous || + list[index].previous.call(self, self.previous) + ) { + return true + } + } + } } } } -function toResult(value) { - if (object(value) && 'length' in value) { - return value - } +function resolver(extraResolver) { + return resolveAllText - if (typeof value === 'number') { - return [CONTINUE, value] - } + function resolveAllText(events, context) { + var index = -1; + var enter; + + // A rather boring computation (to merge adjacent `data` events) which + // improves mm performance by 29%. + while (++index <= events.length) { + if (enter === undefined) { + if (events[index] && events[index][1].type === 'data') { + enter = index; + index++; + } + } else if (!events[index] || events[index][1].type !== 'data') { + // Don’t do anything if there is one data token. + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end; + events.splice(enter + 2, index - enter - 2); + index = enter + 2; + } - return [value] -} + enter = undefined; + } + } -function func(d) { - return typeof d === 'function' + return extraResolver ? extraResolver(events, context) : events + } } -function string(d) { - return typeof d === 'string' -} +// A rather ugly set of instructions which again looks at chunks in the input +// stream. +// The reason to do this here is that it is *much* faster to parse in reverse. +// And that we can’t hook into `null` to split the line suffix before an EOF. +// To do: figure out if we can make this into a clean utility, or even in core. +// As it will be useful for GFMs literal autolink extension (and maybe even +// tables?) +function resolveAllLineSuffixes(events, context) { + var eventIndex = -1; + var chunks; + var data; + var chunk; + var index; + var bufferIndex; + var size; + var tabs; + var token; -function object(d) { - return typeof d === 'object' && d !== null -} + while (++eventIndex <= events.length) { + if ( + (eventIndex === events.length || + events[eventIndex][1].type === 'lineEnding') && + events[eventIndex - 1][1].type === 'data' + ) { + data = events[eventIndex - 1][1]; + chunks = context.sliceStream(data); + index = chunks.length; + bufferIndex = -1; + size = 0; + tabs = undefined; -var unistUtilVisit = visit; + while (index--) { + chunk = chunks[index]; + if (typeof chunk === 'string') { + bufferIndex = chunk.length; + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size++; + bufferIndex--; + } -var CONTINUE$1 = unistUtilVisitParents.CONTINUE; -var SKIP$1 = unistUtilVisitParents.SKIP; -var EXIT$1 = unistUtilVisitParents.EXIT; + if (bufferIndex) break + bufferIndex = -1; + } + // Number + else if (chunk === -2) { + tabs = true; + size++; + } else if (chunk === -1) ; else { + // Replacement character, exit. + index++; + break + } + } -visit.CONTINUE = CONTINUE$1; -visit.SKIP = SKIP$1; -visit.EXIT = EXIT$1; + if (size) { + token = { + type: + eventIndex === events.length || tabs || size < 2 + ? 'lineSuffix' + : 'hardBreakTrailing', -function visit(tree, test, visitor, reverse) { - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; - } + start: { + line: data.end.line, + column: data.end.column - size, + offset: data.end.offset - size, + _index: data.start._index + index, + _bufferIndex: index + ? bufferIndex + : data.start._bufferIndex + bufferIndex + }, - unistUtilVisitParents(tree, test, overload, reverse); + end: shallow_1(data.end) + }; - function overload(node, parents) { - var parent = parents[parents.length - 1]; - var index = parent ? parent.children.indexOf(node) : null; - return visitor(node, index, parent) - } -} + data.end = shallow_1(token.start); -var unistUtilRemovePosition = removePosition; + if (data.start.offset === data.end.offset) { + assign(data, token); + } else { + events.splice( + eventIndex, + 0, + ['enter', token, context], + ['exit', token, context] + ); -function removePosition(node, force) { - unistUtilVisit(node, force ? hard : soft); - return node -} + eventIndex += 2; + } + } -function hard(node) { - delete node.position; -} + eventIndex++; + } + } -function soft(node) { - node.position = undefined; + return events } -var parse_1$3 = parse$9; +var text = { + text: text_1, + string: string, + resolver: resolver_1 +}; -var lineFeed$1 = '\n'; -var lineBreaksExpression = /\r\n|\r/g; +var markdownLineEndingOrSpace_1 = markdownLineEndingOrSpace; -// Parse the bound file. -function parse$9() { - var self = this; - var value = String(self.file); - var start = {line: 1, column: 1, offset: 0}; - var content = immutable(start); - var node; +function markdownLineEndingOrSpace(code) { + return code < 0 || code === 32 +} - // Clean non-unix newlines: `\r\n` and `\r` are all changed to `\n`. - // This should not affect positional information. - value = value.replace(lineBreaksExpression, lineFeed$1); +// This module is generated by `script/`. +// +// CommonMark handles attention (emphasis, strong) markers based on what comes +// before or after them. +// One such difference is if those characters are Unicode punctuation. +// This script is generated from the Unicode data. +var unicodePunctuationRegex = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/; - // BOM. - if (value.charCodeAt(0) === 0xfeff) { - value = value.slice(1); +var regexCheck_1 = regexCheck; - content.column++; - content.offset++; - } - node = { - type: 'root', - children: self.tokenizeBlock(value, content), - position: {start: start, end: self.eof || immutable(start)} - }; - if (!self.options.position) { - unistUtilRemovePosition(node, true); +function regexCheck(regex) { + return check + function check(code) { + return regex.test(fromCharCode(code)) } - - return node } -// A line containing no characters, or a line containing only spaces (U+0020) or -// tabs (U+0009), is called a blank line. -// See . -var reBlankLine = /^[ \t]*(\n|$)/; +// Size note: removing ASCII from the regex and using `ascii-punctuation` here +// In fact adds to the bundle size. +var unicodePunctuation_1 = regexCheck_1(unicodePunctuationRegex); -// Note that though blank lines play a special role in lists to determine -// whether the list is tight or loose -// (), it’s done by the list -// tokenizer and this blank line tokenizer does not have to be responsible for -// that. -// Therefore, configs such as `blankLine.notInList` do not have to be set here. -var blankLine_1 = blankLine; +var unicodeWhitespace = regexCheck_1(/\s/); -function blankLine(eat, value, silent) { - var match; - var subvalue = ''; - var index = 0; - var length = value.length; +var classifyCharacter_1 = classifyCharacter; - while (index < length) { - match = reBlankLine.exec(value.slice(index)); - if (match == null) { - break - } - index += match[0].length; - subvalue += match[0]; - } - if (subvalue === '') { - return + +// Classify whether a character is unicode whitespace, unicode punctuation, or +// anything else. +// Used for attention (emphasis, strong), whose sequences can open or close +// based on the class of surrounding characters. +function classifyCharacter(code) { + if ( + code === null || + markdownLineEndingOrSpace_1(code) || + unicodeWhitespace(code) + ) { + return 1 } - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true + if (unicodePunctuation_1(code)) { + return 2 } +} + +var movePoint_1 = movePoint; - eat(subvalue); +// Note! `move` only works inside lines! It’s not possible to move past other +// chunks (replacement characters, tabs, or line endings). +function movePoint(point, offset) { + point.column += offset; + point.offset += offset; + point._bufferIndex += offset; + return point } -var trimTrailingLines_1 = trimTrailingLines; +var resolveAll_1 = resolveAll; -var line$1 = '\n'; +function resolveAll(constructs, events, context) { + var called = []; + var index = -1; + var resolve; -// Remove final newline characters from `value`. -function trimTrailingLines(value) { - var val = String(value); - var index = val.length; + while (++index < constructs.length) { + resolve = constructs[index].resolveAll; - while (val.charAt(--index) === line$1) { - // Empty + if (resolve && called.indexOf(resolve) < 0) { + events = resolve(events, context); + called.push(resolve); + } } - return val.slice(0, index + 1) + return events } -var codeIndented = indentedCode; +var tokenize$5 = tokenizeAttention; +var resolveAll_1$1 = resolveAllAttention; -var lineFeed$2 = '\n'; -var tab$1 = '\t'; -var space$1 = ' '; -var tabSize = 4; -var codeIndent = repeatString(space$1, tabSize); -function indentedCode(eat, value, silent) { - var index = -1; - var length = value.length; - var subvalue = ''; - var content = ''; - var subvalueQueue = ''; - var contentQueue = ''; - var character; - var blankQueue; - var indent; - while (++index < length) { - character = value.charAt(index); - if (indent) { - indent = false; - subvalue += subvalueQueue; - content += contentQueue; - subvalueQueue = ''; - contentQueue = ''; - if (character === lineFeed$2) { - subvalueQueue = character; - contentQueue = character; - } else { - subvalue += character; - content += character; +// Take all events and resolve attention to emphasis or strong. +function resolveAllAttention(events, context) { + var index = -1; + var open; + var group; + var text; + var openingSequence; + var closingSequence; + var use; + var nextEvents; + var offset; - while (++index < length) { - character = value.charAt(index); + // Walk through all events. + // + // Note: performance of this is fine on an mb of normal markdown, but it’s + // a bottleneck for malicious stuff. + while (++index < events.length) { + // Find a token that can close. + if ( + events[index][0] === 'enter' && + events[index][1].type === 'attentionSequence' && + events[index][1]._close + ) { + open = index; - if (!character || character === lineFeed$2) { - contentQueue = character; - subvalueQueue = character; - break + // Now walk back to find an opener. + while (open--) { + // Find a token that can open the closer. + if ( + events[open][0] === 'exit' && + events[open][1].type === 'attentionSequence' && + events[open][1]._open && + // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === + context.sliceSerialize(events[index][1]).charCodeAt(0) + ) { + // If the opening can close or the closing can open, + // and the close size *is not* a multiple of three, + // but the sum of the opening and closing size *is* multiple of three, + // then don’t match. + if ( + (events[open][1]._close || events[index][1]._open) && + (events[index][1].end.offset - events[index][1].start.offset) % 3 && + !( + (events[open][1].end.offset - + events[open][1].start.offset + + events[index][1].end.offset - + events[index][1].start.offset) % + 3 + ) + ) { + continue } - subvalue += character; - content += character; - } - } - } else if ( - character === space$1 && - value.charAt(index + 1) === character && - value.charAt(index + 2) === character && - value.charAt(index + 3) === character - ) { - subvalueQueue += codeIndent; - index += 3; - indent = true; - } else if (character === tab$1) { - subvalueQueue += character; - indent = true; - } else { - blankQueue = ''; + // Number of markers to use from the sequence. + use = + events[open][1].end.offset - events[open][1].start.offset > 1 && + events[index][1].end.offset - events[index][1].start.offset > 1 + ? 2 + : 1; + + openingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start: movePoint_1(shallow_1(events[open][1].end), -use), + end: shallow_1(events[open][1].end) + }; + + closingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start: shallow_1(events[index][1].start), + end: movePoint_1(shallow_1(events[index][1].start), use) + }; + + text = { + type: use > 1 ? 'strongText' : 'emphasisText', + start: shallow_1(events[open][1].end), + end: shallow_1(events[index][1].start) + }; + + group = { + type: use > 1 ? 'strong' : 'emphasis', + start: shallow_1(openingSequence.start), + end: shallow_1(closingSequence.end) + }; + + events[open][1].end = shallow_1(openingSequence.start); + events[index][1].start = shallow_1(closingSequence.end); + + nextEvents = []; + + // If there are more markers in the opening, add them before. + if (events[open][1].end.offset - events[open][1].start.offset) { + chunkedSplice_1(nextEvents, nextEvents.length, 0, [ + ['enter', events[open][1], context], + ['exit', events[open][1], context] + ]); + } - while (character === tab$1 || character === space$1) { - blankQueue += character; - character = value.charAt(++index); - } + // Opening. + chunkedSplice_1(nextEvents, nextEvents.length, 0, [ + ['enter', group, context], + ['enter', openingSequence, context], + ['exit', openingSequence, context], + ['enter', text, context] + ]); + + // Between. + chunkedSplice_1( + nextEvents, + nextEvents.length, + 0, + resolveAll_1( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ); - if (character !== lineFeed$2) { - break + // Closing. + chunkedSplice_1(nextEvents, nextEvents.length, 0, [ + ['exit', text, context], + ['enter', closingSequence, context], + ['exit', closingSequence, context], + ['exit', group, context] + ]); + + // If there are more markers in the closing, add them after. + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2; + chunkedSplice_1(nextEvents, nextEvents.length, 0, [ + ['enter', events[index][1], context], + ['exit', events[index][1], context] + ]); + } else { + offset = 0; + } + + chunkedSplice_1(events, open - 1, index - open + 3, nextEvents); + + index = open + nextEvents.length - offset - 2; + break + } } + } + } + + // Remove remaining sequences. + index = -1; - subvalueQueue += blankQueue + character; - contentQueue += character; + while (++index < events.length) { + if (events[index][1].type === 'attentionSequence') { + events[index][1].type = 'data'; } } - if (content) { - if (silent) { - return true + return events +} + +function tokenizeAttention(effects, ok) { + var before = classifyCharacter_1(this.previous); + var marker; + + return start + + function start(code) { + effects.enter('attentionSequence'); + marker = code; + return sequence(code) + } + + function sequence(code) { + var token; + var after; + var open; + var close; + + if (code === marker) { + effects.consume(code); + return sequence } - return eat(subvalue)({ - type: 'code', - lang: null, - meta: null, - value: trimTrailingLines_1(content) - }) + token = effects.exit('attentionSequence'); + after = classifyCharacter_1(code); + open = !after || (after === 2 && before); + close = !before || (before === 2 && after); + token._open = marker === 42 ? open : open && (before || !close); + token._close = marker === 42 ? close : close && (after || !open); + return ok(code) } } -var codeFenced = fencedCode; +var attention = { + tokenize: tokenize$5, + resolveAll: resolveAll_1$1 +}; -var lineFeed$3 = '\n'; -var tab$2 = '\t'; -var space$2 = ' '; -var tilde$1 = '~'; -var graveAccent = '`'; +var tokenize$6 = tokenizeAtxHeading; +var resolve$8 = resolveAtxHeading; -var minFenceCount = 3; -var tabSize$1 = 4; -function fencedCode(eat, value, silent) { - var self = this; - var gfm = self.options.gfm; - var length = value.length + 1; - var index = 0; - var subvalue = ''; - var fenceCount; - var marker; - var character; - var flag; - var lang; - var meta; - var queue; - var content; - var exdentedContent; - var closing; - var exdentedClosing; - var indent; - var now; - if (!gfm) { - return - } - // Eat initial spacing. - while (index < length) { - character = value.charAt(index); - if (character !== space$2 && character !== tab$2) { - break - } - subvalue += character; - index++; - } - indent = index; - // Eat the fence. - character = value.charAt(index); +function resolveAtxHeading(events, context) { + var contentEnd = events.length - 2; + var contentStart = 3; + var content; + var text; - if (character !== tilde$1 && character !== graveAccent) { - return + // Prefix whitespace, part of the opening. + if (events[contentStart][1].type === 'whitespace') { + contentStart += 2; } - index++; - marker = character; - fenceCount = 1; - subvalue += character; + // Suffix whitespace, part of the closing. + if ( + contentEnd - 2 > contentStart && + events[contentEnd][1].type === 'whitespace' + ) { + contentEnd -= 2; + } - while (index < length) { - character = value.charAt(index); + if ( + events[contentEnd][1].type === 'atxHeadingSequence' && + (contentStart === contentEnd - 1 || + (contentEnd - 4 > contentStart && + events[contentEnd - 2][1].type === 'whitespace')) + ) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4; + } - if (character !== marker) { - break - } + if (contentEnd > contentStart) { + content = { + type: 'atxHeadingText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end + }; - subvalue += character; - fenceCount++; - index++; + text = { + type: 'chunkText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: 'text' + }; + + chunkedSplice_1(events, contentStart, contentEnd - contentStart + 1, [ + ['enter', content, context], + ['enter', text, context], + ['exit', text, context], + ['exit', content, context] + ]); } - if (fenceCount < minFenceCount) { - return + return events +} + +function tokenizeAtxHeading(effects, ok, nok) { + var self = this; + var size = 0; + + return start + + function start(code) { + effects.enter('atxHeading'); + effects.enter('atxHeadingSequence'); + return fenceOpenInside(code) } - // Eat spacing before flag. - while (index < length) { - character = value.charAt(index); + function fenceOpenInside(code) { + if (code === 35 && size++ < 6) { + effects.consume(code); + return fenceOpenInside + } - if (character !== space$2 && character !== tab$2) { - break + if (code === null || markdownLineEndingOrSpace_1(code)) { + effects.exit('atxHeadingSequence'); + return self.interrupt ? ok(code) : headingBreak(code) } - subvalue += character; - index++; + return nok(code) } - // Eat flag. - flag = ''; - queue = ''; - - while (index < length) { - character = value.charAt(index); + function headingBreak(code) { + if (code === 35) { + effects.enter('atxHeadingSequence'); + return sequence(code) + } - if ( - character === lineFeed$3 || - (marker === graveAccent && character === marker) - ) { - break + if (code === null || markdownLineEnding_1(code)) { + effects.exit('atxHeading'); + return ok(code) } - if (character === space$2 || character === tab$2) { - queue += character; - } else { - flag += queue + character; - queue = ''; + if (markdownSpace_1(code)) { + return factorySpace(effects, headingBreak, 'whitespace')(code) } - index++; + effects.enter('atxHeadingText'); + return data(code) } - character = value.charAt(index); + function sequence(code) { + if (code === 35) { + effects.consume(code); + return sequence + } - if (character && character !== lineFeed$3) { - return + effects.exit('atxHeadingSequence'); + return headingBreak(code) } - if (silent) { - return true + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace_1(code)) { + effects.exit('atxHeadingText'); + return headingBreak(code) + } + + effects.consume(code); + return data } +} - now = eat.now(); - now.column += subvalue.length; - now.offset += subvalue.length; +var headingAtx = { + tokenize: tokenize$6, + resolve: resolve$8 +}; - subvalue += flag; - flag = self.decode.raw(self.unescape(flag), now); +var asciiAlpha = regexCheck_1(/[A-Za-z]/); - if (queue) { - subvalue += queue; - } +var asciiAlphanumeric = regexCheck_1(/[\dA-Za-z]/); - queue = ''; - closing = ''; - exdentedClosing = ''; - content = ''; - exdentedContent = ''; - var skip = true; +var asciiAtext = regexCheck_1(/[#-'*+\--9=?A-Z^-~]/); - // Eat content. - while (index < length) { - character = value.charAt(index); - content += closing; - exdentedContent += exdentedClosing; - closing = ''; - exdentedClosing = ''; - - if (character !== lineFeed$3) { - content += character; - exdentedClosing += character; - index++; - continue - } +var asciiControl_1 = asciiControl; - // The first line feed is ignored. Others aren’t. - if (skip) { - subvalue += character; - skip = false; - } else { - closing += character; - exdentedClosing += character; - } +// Note: EOF is seen as ASCII control here, because `null < 32 == true`. +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code < 32 || code === 127 + ) +} - queue = ''; - index++; +var tokenize$7 = tokenizeAutolink; - while (index < length) { - character = value.charAt(index); - if (character !== space$2) { - break - } - queue += character; - index++; - } - closing += queue; - exdentedClosing += queue.slice(indent); - if (queue.length >= tabSize$1) { - continue - } - queue = ''; +function tokenizeAutolink(effects, ok, nok) { + var size; - while (index < length) { - character = value.charAt(index); + return start - if (character !== marker) { - break - } + function start(code) { + effects.enter('autolink'); + effects.enter('autolinkMarker'); + effects.consume(code); + effects.exit('autolinkMarker'); + effects.enter('autolinkProtocol'); + return open + } - queue += character; - index++; + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code); + size = 1; + return schemeOrEmailAtext } - closing += queue; - exdentedClosing += queue; + return asciiAtext(code) ? emailAtext(code) : nok(code) + } - if (queue.length < fenceCount) { - continue - } + function schemeOrEmailAtext(code) { + return code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code) + ? schemeInsideOrEmailAtext(code) + : emailAtext(code) + } - queue = ''; + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code); + return urlInside + } - while (index < length) { - character = value.charAt(index); + if ( + (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && + size++ < 32 + ) { + effects.consume(code); + return schemeInsideOrEmailAtext + } - if (character !== space$2 && character !== tab$2) { - break - } + return emailAtext(code) + } - closing += character; - exdentedClosing += character; - index++; + function urlInside(code) { + if (code === 62) { + effects.exit('autolinkProtocol'); + return end(code) } - if (!character || character === lineFeed$3) { - break + if (code === 32 || code === 60 || asciiControl_1(code)) { + return nok(code) } + + effects.consume(code); + return urlInside } - subvalue += content + closing; + function emailAtext(code) { + if (code === 64) { + effects.consume(code); + size = 0; + return emailAtSignOrDot + } + + if (asciiAtext(code)) { + effects.consume(code); + return emailAtext + } - // Get lang and meta from the flag. - index = -1; - length = flag.length; + return nok(code) + } - while (++index < length) { - character = flag.charAt(index); + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) + } - if (character === space$2 || character === tab$2) { - if (!lang) { - lang = flag.slice(0, index); - } - } else if (lang) { - meta = flag.slice(index); - break + function emailLabel(code) { + if (code === 46) { + effects.consume(code); + size = 0; + return emailAtSignOrDot + } + + if (code === 62) { + // Exit, then change the type. + effects.exit('autolinkProtocol').type = 'autolinkEmail'; + return end(code) } + + return emailValue(code) } - return eat(subvalue)({ - type: 'code', - lang: lang || flag || null, - meta: meta || null, - value: exdentedContent - }) -} + function emailValue(code) { + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + effects.consume(code); + return code === 45 ? emailValue : emailLabel + } -var trim_1 = createCommonjsModule(function (module, exports) { -exports = module.exports = trim; + return nok(code) + } -function trim(str){ - return str.replace(/^\s*|\s*$/g, ''); + function end(code) { + effects.enter('autolinkMarker'); + effects.consume(code); + effects.exit('autolinkMarker'); + effects.exit('autolink'); + return ok + } } -exports.left = function(str){ - return str.replace(/^\s*/, ''); +var autolink = { + tokenize: tokenize$7 }; -exports.right = function(str){ - return str.replace(/\s*$/, ''); -}; -}); -var trim_2 = trim_1.left; -var trim_3 = trim_1.right; +var asciiDigit = regexCheck_1(/\d/); -var interrupt_1 = interrupt; +var tokenize$8 = tokenizeThematicBreak; -function interrupt(interruptors, tokenizers, ctx, parameters) { - var length = interruptors.length; - var index = -1; - var interruptor; - var config; - while (++index < length) { - interruptor = interruptors[index]; - config = interruptor[1] || {}; - if ( - config.pedantic !== undefined && - config.pedantic !== ctx.options.pedantic - ) { - continue - } - if ( - config.commonmark !== undefined && - config.commonmark !== ctx.options.commonmark - ) { - continue - } - if (tokenizers[interruptor[0]].apply(ctx, parameters)) { - return true - } - } - return false -} +function tokenizeThematicBreak(effects, ok, nok) { + var size = 0; + var marker; -var blockquote_1 = blockquote; + return start -var lineFeed$4 = '\n'; -var tab$3 = '\t'; -var space$3 = ' '; -var greaterThan = '>'; + function start(code) { + effects.enter('thematicBreak'); + marker = code; + return atBreak(code) + } -function blockquote(eat, value, silent) { - var self = this; - var offsets = self.offset; - var tokenizers = self.blockTokenizers; - var interruptors = self.interruptBlockquote; - var now = eat.now(); - var currentLine = now.line; - var length = value.length; - var values = []; - var contents = []; - var indents = []; - var add; - var index = 0; - var character; - var rest; - var nextIndex; - var content; - var line; - var startIndex; - var prefixed; - var exit; + function atBreak(code) { + if (code === marker) { + effects.enter('thematicBreakSequence'); + return sequence(code) + } - while (index < length) { - character = value.charAt(index); + if (markdownSpace_1(code)) { + return factorySpace(effects, atBreak, 'whitespace')(code) + } - if (character !== space$3 && character !== tab$3) { - break + if (size < 3 || (code !== null && !markdownLineEnding_1(code))) { + return nok(code) } - index++; + effects.exit('thematicBreak'); + return ok(code) } - if (value.charAt(index) !== greaterThan) { - return - } + function sequence(code) { + if (code === marker) { + effects.consume(code); + size++; + return sequence + } - if (silent) { - return true + effects.exit('thematicBreakSequence'); + return atBreak(code) } +} - index = 0; - - while (index < length) { - nextIndex = value.indexOf(lineFeed$4, index); - startIndex = index; - prefixed = false; +var thematicBreak = { + tokenize: tokenize$8 +}; - if (nextIndex === -1) { - nextIndex = length; - } +var list = createCommonjsModule(function (module, exports) { +exports.tokenize = tokenizeListStart; +exports.continuation = {tokenize: tokenizeListContinuation}; +exports.exit = tokenizeListEnd; - while (index < length) { - character = value.charAt(index); - if (character !== space$3 && character !== tab$3) { - break - } - index++; - } - if (value.charAt(index) === greaterThan) { - index++; - prefixed = true; - if (value.charAt(index) === space$3) { - index++; - } - } else { - index = startIndex; - } - content = value.slice(index, nextIndex); - if (!prefixed && !trim_1(content)) { - index = startIndex; - break - } - if (!prefixed) { - rest = value.slice(index); - // Check if the following code contains a possible block. - if (interrupt_1(interruptors, tokenizers, self, [eat, rest, true])) { - break - } - } - line = startIndex === index ? content : value.slice(startIndex, nextIndex); +function tokenizeListStart(effects, ok, nok) { + var self = this; + var initialSize = prefixSize_1(self.events, 'linePrefix'); + var valueSize; - indents.push(index - startIndex); - values.push(line); - contents.push(content); + return start - index = nextIndex + 1; - } + function start(code) { + if ( + (code === 42 || code === 43 || code === 45) && + (!self.containerState.marker || code === self.containerState.marker) + ) { + return code === 42 || code === 45 + ? effects.check(thematicBreak, nok, unordered)(code) + : unordered(code) + } - index = -1; - length = indents.length; - add = eat(values.join(lineFeed$4)); + if ( + asciiDigit(code) && + (!self.containerState.type || self.containerState.type === 'listOrdered') + ) { + return ordered(code) + } - while (++index < length) { - offsets[currentLine] = (offsets[currentLine] || 0) + indents[index]; - currentLine++; + return nok(code) } - exit = self.enterBlock(); - contents = self.tokenizeBlock(contents.join(lineFeed$4), now); - exit(); - - return add({type: 'blockquote', children: contents}) -} + function unordered(code) { + if (!self.containerState.type) { + self.containerState.type = 'listUnordered'; + effects.enter(self.containerState.type, {_container: true}); + } -var headingAtx = atxHeading; + effects.enter('listItemPrefix'); + return atMarker(code) + } -var lineFeed$5 = '\n'; -var tab$4 = '\t'; -var space$4 = ' '; -var numberSign$1 = '#'; + function ordered(code) { + if (self.containerState.type || !self.interrupt || code === 49) { + if (!self.containerState.type) { + self.containerState.type = 'listOrdered'; + effects.enter(self.containerState.type, {_container: true}); + } -var maxFenceCount = 6; + effects.enter('listItemPrefix'); + effects.enter('listItemValue'); + effects.consume(code); + valueSize = 1; + return self.interrupt ? afterValue : inside + } -function atxHeading(eat, value, silent) { - var self = this; - var pedantic = self.options.pedantic; - var length = value.length + 1; - var index = -1; - var now = eat.now(); - var subvalue = ''; - var content = ''; - var character; - var queue; - var depth; - - // Eat initial spacing. - while (++index < length) { - character = value.charAt(index); + return nok(code) + } - if (character !== space$4 && character !== tab$4) { - index--; - break + function inside(code) { + if (asciiDigit(code) && ++valueSize < 10) { + effects.consume(code); + return inside } - subvalue += character; + return afterValue(code) } - // Eat hashes. - depth = 0; + function afterValue(code) { + effects.exit('listItemValue'); + + return code === 41 || code === 46 ? atMarker(code) : nok(code) + } - while (++index <= length) { - character = value.charAt(index); + function atMarker(code) { + self.containerState.marker = self.containerState.marker || code; - if (character !== numberSign$1) { - index--; - break + if (code === self.containerState.marker) { + effects.enter('listItemMarker'); + effects.consume(code); + effects.exit('listItemMarker'); + return effects.check( + partialBlankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + {tokenize: tokenizeListItemPrefixWhitespace, partial: true}, + endOfPrefix, + otherPrefix + ) + ) } - subvalue += character; - depth++; + return nok(code) } - if (depth > maxFenceCount) { - return + function onBlank(code) { + self.containerState.initialBlankLine = true; + initialSize++; + return endOfPrefix(code) } - if (!depth || (!pedantic && value.charAt(index + 1) === numberSign$1)) { - return + function otherPrefix(code) { + if (markdownSpace_1(code)) { + effects.enter('listItemPrefixWhitespace'); + effects.consume(code); + effects.exit('listItemPrefixWhitespace'); + return endOfPrefix + } + + return nok(code) } - length = value.length + 1; + function endOfPrefix(code) { + self.containerState.size = + initialSize + sizeChunks_1(self.sliceStream(effects.exit('listItemPrefix'))); + return ok(code) + } +} - // Eat intermediate white-space. - queue = ''; +function tokenizeListContinuation(effects, ok, nok) { + var self = this; - while (++index < length) { - character = value.charAt(index); + self.containerState._closeFlow = undefined; - if (character !== space$4 && character !== tab$4) { - index--; - break - } + return effects.check(partialBlankLine, onBlank, notBlank) - queue += character; + function onBlank(code) { + self.containerState.furtherBlankLines = + self.containerState.furtherBlankLines || + self.containerState.initialBlankLine; + return ok(code) } - // Exit when not in pedantic mode without spacing. - if (!pedantic && queue.length === 0 && character && character !== lineFeed$5) { - return + function notBlank(code) { + if (self.containerState.furtherBlankLines || !markdownSpace_1(code)) { + self.containerState.furtherBlankLines = self.containerState.initialBlankLine = undefined; + return notInCurrentItem(code) + } + + self.containerState.furtherBlankLines = self.containerState.initialBlankLine = undefined; + return effects.attempt( + {tokenize: tokenizeIndent, partial: true}, + ok, + notInCurrentItem + )(code) } - if (silent) { - return true + function notInCurrentItem(code) { + // While we do continue, we signal that the flow should be closed. + self.containerState._closeFlow = true; + // As we’re closing flow, we’re no longer interrupting + self.interrupt = undefined; + return factorySpace( + effects, + effects.attempt(exports, ok, nok), + 'linePrefix', + 4 + )(code) } +} - // Eat content. - subvalue += queue; - queue = ''; - content = ''; +function tokenizeIndent(effects, ok, nok) { + var self = this; - while (++index < length) { - character = value.charAt(index); + return factorySpace( + effects, + afterPrefix, + 'listItemIndent', - if (!character || character === lineFeed$5) { - break - } + self.containerState.size + 1 + ) - if (character !== space$4 && character !== tab$4 && character !== numberSign$1) { - content += queue + character; - queue = ''; - continue - } + function afterPrefix(code) { + return prefixSize_1(self.events, 'listItemIndent') === + self.containerState.size + ? ok(code) + : nok(code) + } +} - while (character === space$4 || character === tab$4) { - queue += character; - character = value.charAt(++index); - } +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type); +} - // `#` without a queue is part of the content. - if (!pedantic && content && !queue && character === numberSign$1) { - content += character; - continue - } +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + var self = this; - while (character === numberSign$1) { - queue += character; - character = value.charAt(++index); - } + return factorySpace( + effects, + afterPrefix, + 'listItemPrefixWhitespace', - while (character === space$4 || character === tab$4) { - queue += character; - character = value.charAt(++index); - } + 4 + 1 + ) - index--; + function afterPrefix(code) { + return markdownSpace_1(code) || + !prefixSize_1(self.events, 'listItemPrefixWhitespace') + ? nok(code) + : ok(code) } - - now.column += subvalue.length; - now.offset += subvalue.length; - subvalue += content + queue; - - return eat(subvalue)({ - type: 'heading', - depth: depth, - children: self.tokenizeInline(content, now) - }) } +}); +var list_1 = list.tokenize; +var list_2 = list.continuation; +var list_3 = list.exit; -var thematicBreak_1 = thematicBreak; - -var tab$5 = '\t'; -var lineFeed$6 = '\n'; -var space$5 = ' '; -var asterisk = '*'; -var dash$1 = '-'; -var underscore = '_'; +var blockQuote = createCommonjsModule(function (module, exports) { +exports.tokenize = tokenizeBlockQuoteStart; +exports.continuation = {tokenize: tokenizeBlockQuoteContinuation}; +exports.exit = exit; -var maxCount = 3; -function thematicBreak(eat, value, silent) { - var index = -1; - var length = value.length + 1; - var subvalue = ''; - var character; - var marker; - var markerCount; - var queue; - while (++index < length) { - character = value.charAt(index); - if (character !== tab$5 && character !== space$5) { - break - } - subvalue += character; - } +function tokenizeBlockQuoteStart(effects, ok, nok) { + var self = this; - if ( - character !== asterisk && - character !== dash$1 && - character !== underscore - ) { - return - } + return start - marker = character; - subvalue += character; - markerCount = 1; - queue = ''; + function start(code) { + if (code === 62) { + if (!self.containerState.open) { + effects.enter('blockQuote', {_container: true}); + self.containerState.open = true; + } - while (++index < length) { - character = value.charAt(index); - - if (character === marker) { - markerCount++; - subvalue += queue + marker; - queue = ''; - } else if (character === space$5) { - queue += character; - } else if ( - markerCount >= maxCount && - (!character || character === lineFeed$6) - ) { - subvalue += queue; + effects.enter('blockQuotePrefix'); + effects.enter('blockQuoteMarker'); + effects.consume(code); + effects.exit('blockQuoteMarker'); + return after + } - if (silent) { - return true - } + return nok(code) + } - return eat(subvalue)({type: 'thematicBreak'}) - } else { - return + function after(code) { + if (markdownSpace_1(code)) { + effects.enter('blockQuotePrefixWhitespace'); + effects.consume(code); + effects.exit('blockQuotePrefixWhitespace'); + effects.exit('blockQuotePrefix'); + return ok } + + effects.exit('blockQuotePrefix'); + return ok(code) } } -var getIndentation = indentation; +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + return factorySpace( + effects, + effects.attempt(exports, ok, nok), + 'linePrefix', + 4 + ) +} + +function exit(effects) { + effects.exit('blockQuote'); +} +}); +var blockQuote_1 = blockQuote.tokenize; +var blockQuote_2 = blockQuote.continuation; +var blockQuote_3 = blockQuote.exit; -var tab$6 = '\t'; -var space$6 = ' '; +var asciiPunctuation = regexCheck_1(/[!-/:-@[-`{-~]/); -var spaceSize = 1; -var tabSize$2 = 4; +var tokenize$9 = tokenizeCharacterEscape; -// Gets indentation information for a line. -function indentation(value) { - var index = 0; - var indent = 0; - var character = value.charAt(index); - var stops = {}; - var size; - var lastIndent = 0; - while (character === tab$6 || character === space$6) { - size = character === tab$6 ? tabSize$2 : spaceSize; - indent += size; +function tokenizeCharacterEscape(effects, ok, nok) { + return start - if (size > 1) { - indent = Math.floor(indent / size) * size; - } + function start(code) { + effects.enter('characterEscape'); + effects.enter('escapeMarker'); + effects.consume(code); + effects.exit('escapeMarker'); + return open + } - while (lastIndent < indent) { - stops[++lastIndent] = index; + function open(code) { + if (asciiPunctuation(code)) { + effects.enter('characterEscapeValue'); + effects.consume(code); + effects.exit('characterEscapeValue'); + effects.exit('characterEscape'); + return ok } - character = value.charAt(++index); + return nok(code) } - - return {indent: indent, stops: stops} } -var removeIndentation = indentation$1; +var characterEscape = { + tokenize: tokenize$9 +}; + +var asciiHexDigit = regexCheck_1(/[\dA-Fa-f]/); -var lineFeed$7 = '\n'; -var space$7 = ' '; -var exclamationMark = '!'; +var tokenize$a = tokenizeCharacterReference; -// Remove the minimum indent from every line in `value`. Supports both tab, -// spaced, and mixed indentation (as well as possible). -function indentation$1(value, maximum) { - var values = value.split(lineFeed$7); - var position = values.length + 1; - var minIndent = Infinity; - var matrix = []; - var index; - var indentation; - var stops; - values.unshift(repeatString(space$7, maximum) + exclamationMark); - while (position--) { - indentation = getIndentation(values[position]); - matrix[position] = indentation.stops; - if (trim_1(values[position]).length === 0) { - continue + +function tokenizeCharacterReference(effects, ok, nok) { + var self = this; + var size = 0; + var max; + var test; + + return start + + function start(code) { + effects.enter('characterReference'); + effects.enter('characterReferenceMarker'); + effects.consume(code); + effects.exit('characterReferenceMarker'); + return open + } + + function open(code) { + if (code === 35) { + effects.enter('characterReferenceMarkerNumeric'); + effects.consume(code); + effects.exit('characterReferenceMarkerNumeric'); + return numeric } - if (indentation.indent) { - if (indentation.indent > 0 && indentation.indent < minIndent) { - minIndent = indentation.indent; - } - } else { - minIndent = Infinity; + effects.enter('characterReferenceValue'); + max = 31; + test = asciiAlphanumeric; + return value(code) + } - break + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter('characterReferenceMarkerHexadecimal'); + effects.consume(code); + effects.exit('characterReferenceMarkerHexadecimal'); + effects.enter('characterReferenceValue'); + max = 6; + test = asciiHexDigit; + return value } + + effects.enter('characterReferenceValue'); + max = 7; + test = asciiDigit; + return value(code) } - if (minIndent !== Infinity) { - position = values.length; + function value(code) { + var token; - while (position--) { - stops = matrix[position]; - index = minIndent; + if (code === 59 && size) { + token = effects.exit('characterReferenceValue'); - while (index && !(index in stops)) { - index--; + if (test === asciiAlphanumeric && !decodeEntity_1(self.sliceSerialize(token))) { + return nok(code) } - values[position] = values[position].slice(stops[index] + 1); + effects.enter('characterReferenceMarker'); + effects.consume(code); + effects.exit('characterReferenceMarker'); + effects.exit('characterReference'); + return ok } - } - values.shift(); + if (test(code) && size++ < max) { + effects.consume(code); + return value + } - return values.join(lineFeed$7) + return nok(code) + } } -var list_1 = list; +var characterReference = { + tokenize: tokenize$a +}; -var asterisk$1 = '*'; -var underscore$1 = '_'; -var plusSign = '+'; -var dash$2 = '-'; -var dot$1 = '.'; -var space$8 = ' '; -var lineFeed$8 = '\n'; -var tab$7 = '\t'; -var rightParenthesis = ')'; -var lowercaseX$1 = 'x'; +var tokenize$b = tokenizeCodeFenced; +var concrete = true; -var tabSize$3 = 4; -var looseListItemExpression = /\n\n(?!\s*$)/; -var taskItemExpression = /^\[([ X\tx])][ \t]/; -var bulletExpression = /^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/; -var pedanticBulletExpression = /^([ \t]*)([*+-]|\d+[.)])([ \t]+)/; -var initialIndentExpression = /^( {1,4}|\t)?/gm; -function list(eat, value, silent) { - var self = this; - var commonmark = self.options.commonmark; - var pedantic = self.options.pedantic; - var tokenizers = self.blockTokenizers; - var interuptors = self.interruptList; - var index = 0; - var length = value.length; - var start = null; - var size; - var queue; - var ordered; - var character; - var marker; - var nextIndex; - var startIndex; - var prefixed; - var currentMarker; - var content; - var line; - var previousEmpty; - var empty; - var items; - var allLines; - var emptyLines; - var item; - var enterTop; - var exitBlockquote; - var spread = false; - var node; - var now; - var end; - var indented; - while (index < length) { - character = value.charAt(index); - if (character !== tab$7 && character !== space$8) { - break - } - index++; - } - character = value.charAt(index); - if (character === asterisk$1 || character === plusSign || character === dash$2) { - marker = character; - ordered = false; - } else { - ordered = true; - queue = ''; +function tokenizeCodeFenced(effects, ok, nok) { + var self = this; + var initialPrefix = prefixSize_1(this.events, 'linePrefix'); + var sizeOpen = 0; + var marker; - while (index < length) { - character = value.charAt(index); + return start - if (!isDecimal(character)) { - break - } + function start(code) { + effects.enter('codeFenced'); + effects.enter('codeFencedFence'); + effects.enter('codeFencedFenceSequence'); + marker = code; + return sequenceOpen(code) + } - queue += character; - index++; + function sequenceOpen(code) { + if (code === marker) { + effects.consume(code); + sizeOpen++; + return sequenceOpen } - character = value.charAt(index); - - if ( - !queue || - !(character === dot$1 || (commonmark && character === rightParenthesis)) - ) { - return - } + effects.exit('codeFencedFenceSequence'); + return sizeOpen < 3 + ? nok(code) + : factorySpace(effects, infoOpen, 'whitespace')(code) + } - /* Slightly abusing `silent` mode, whose goal is to make interrupting - * paragraphs work. - * Well, that’s exactly what we want to do here: don’t interrupt: - * 2. here, because the “list” doesn’t start with `1`. */ - if (silent && queue !== '1') { - return + function infoOpen(code) { + if (code === null || markdownLineEnding_1(code)) { + return openAfter(code) } - start = parseInt(queue, 10); - marker = character; + effects.enter('codeFencedFenceInfo'); + effects.enter('chunkString', {contentType: 'string'}); + return info(code) } - character = value.charAt(++index); - - if ( - character !== space$8 && - character !== tab$7 && - (pedantic || (character !== lineFeed$8 && character !== '')) - ) { - return - } + function info(code) { + if (code === null || markdownLineEndingOrSpace_1(code)) { + effects.exit('chunkString'); + effects.exit('codeFencedFenceInfo'); + return factorySpace(effects, infoAfter, 'whitespace')(code) + } - if (silent) { - return true + if (code === 96 && code === marker) return nok(code) + effects.consume(code); + return info } - index = 0; - items = []; - allLines = []; - emptyLines = []; + function infoAfter(code) { + if (code === null || markdownLineEnding_1(code)) { + return openAfter(code) + } - while (index < length) { - nextIndex = value.indexOf(lineFeed$8, index); - startIndex = index; - prefixed = false; - indented = false; + effects.enter('codeFencedFenceMeta'); + effects.enter('chunkString', {contentType: 'string'}); + return meta(code) + } - if (nextIndex === -1) { - nextIndex = length; + function meta(code) { + if (code === null || markdownLineEnding_1(code)) { + effects.exit('chunkString'); + effects.exit('codeFencedFenceMeta'); + return openAfter(code) } - size = 0; - - while (index < length) { - character = value.charAt(index); + if (code === 96 && code === marker) return nok(code) + effects.consume(code); + return meta + } - if (character === tab$7) { - size += tabSize$3 - (size % tabSize$3); - } else if (character === space$8) { - size++; - } else { - break - } + function openAfter(code) { + effects.exit('codeFencedFence'); + return self.interrupt ? ok(code) : content(code) + } - index++; + function content(code) { + if (code === null) { + return after(code) } - if (item && size >= item.indent) { - indented = true; + if (markdownLineEnding_1(code)) { + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + return effects.attempt( + {tokenize: tokenizeClosingFence, partial: true}, + after, + initialPrefix + ? factorySpace(effects, content, 'linePrefix', initialPrefix + 1) + : content + ) } - character = value.charAt(index); - currentMarker = null; - - if (!indented) { - if ( - character === asterisk$1 || - character === plusSign || - character === dash$2 - ) { - currentMarker = character; - index++; - size++; - } else { - queue = ''; - - while (index < length) { - character = value.charAt(index); - - if (!isDecimal(character)) { - break - } - - queue += character; - index++; - } - - character = value.charAt(index); - index++; + effects.enter('codeFlowValue'); + return contentContinue(code) + } - if ( - queue && - (character === dot$1 || (commonmark && character === rightParenthesis)) - ) { - currentMarker = character; - size += queue.length + 1; - } - } + function contentContinue(code) { + if (code === null || markdownLineEnding_1(code)) { + effects.exit('codeFlowValue'); + return content(code) + } - if (currentMarker) { - character = value.charAt(index); + effects.consume(code); + return contentContinue + } - if (character === tab$7) { - size += tabSize$3 - (size % tabSize$3); - index++; - } else if (character === space$8) { - end = index + tabSize$3; + function after(code) { + effects.exit('codeFenced'); + return ok(code) + } - while (index < end) { - if (value.charAt(index) !== space$8) { - break - } + function tokenizeClosingFence(effects, ok, nok) { + var size = 0; - index++; - size++; - } + return factorySpace(effects, closingPrefixAfter, 'linePrefix', 4) - if (index === end && value.charAt(index) === space$8) { - index -= tabSize$3 - 1; - size -= tabSize$3 - 1; - } - } else if (character !== lineFeed$8 && character !== '') { - currentMarker = null; - } - } + function closingPrefixAfter(code) { + effects.enter('codeFencedFence'); + effects.enter('codeFencedFenceSequence'); + return closingSequence(code) } - if (currentMarker) { - if (!pedantic && marker !== currentMarker) { - break + function closingSequence(code) { + if (code === marker) { + effects.consume(code); + size++; + return closingSequence } - prefixed = true; - } else { - if (!commonmark && !indented && value.charAt(startIndex) === space$8) { - indented = true; - } else if (commonmark && item) { - indented = size >= item.indent || size > tabSize$3; + if (size < sizeOpen) return nok(code) + effects.exit('codeFencedFenceSequence'); + return factorySpace(effects, closingSequenceEnd, 'whitespace')(code) + } + + function closingSequenceEnd(code) { + if (code === null || markdownLineEnding_1(code)) { + effects.exit('codeFencedFence'); + return ok(code) } - prefixed = false; - index = startIndex; + return nok(code) } + } +} - line = value.slice(startIndex, nextIndex); - content = startIndex === index ? line : value.slice(index, nextIndex); +var codeFenced = { + tokenize: tokenize$b, + concrete: concrete +}; - if ( - currentMarker === asterisk$1 || - currentMarker === underscore$1 || - currentMarker === dash$2 - ) { - if (tokenizers.thematicBreak.call(self, eat, line, true)) { - break - } - } +var tokenize$c = tokenizeCodeIndented; +var resolve$9 = resolveCodeIndented; - previousEmpty = empty; - empty = !prefixed && !trim_1(content).length; - if (indented && item) { - item.value = item.value.concat(emptyLines, line); - allLines = allLines.concat(emptyLines, line); - emptyLines = []; - } else if (prefixed) { - if (emptyLines.length !== 0) { - spread = true; - item.value.push(''); - item.trail = emptyLines.concat(); - } - item = { - value: [line], - indent: size, - trail: [] - }; - items.push(item); - allLines = allLines.concat(emptyLines, line); - emptyLines = []; - } else if (empty) { - if (previousEmpty && !commonmark) { - break - } - emptyLines.push(line); - } else { - if (previousEmpty) { - break - } - if (interrupt_1(interuptors, tokenizers, self, [eat, line, true])) { - break - } - item.value = item.value.concat(emptyLines, line); - allLines = allLines.concat(emptyLines, line); - emptyLines = []; - } +var continuedIndent = {tokenize: tokenizeContinuedIndent, partial: true}; - index = nextIndex + 1; - } +function resolveCodeIndented(events, context) { + var code = { + type: 'codeIndented', + start: events[0][1].start, + end: events[events.length - 1][1].end + }; - node = eat(allLines.join(lineFeed$8)).reset({ - type: 'list', - ordered: ordered, - start: start, - spread: spread, - children: [] - }); + chunkedSplice_1(events, 0, 0, [['enter', code, context]]); + chunkedSplice_1(events, events.length, 0, [['exit', code, context]]); - enterTop = self.enterList(); - exitBlockquote = self.enterBlock(); - index = -1; - length = items.length; + return events +} - while (++index < length) { - item = items[index].value.join(lineFeed$8); - now = eat.now(); +function tokenizeCodeIndented(effects, ok, nok) { + var self = this; - eat(item)(listItem(self, item, now), node); + return factorySpace( + effects, + afterInitial, + 'linePrefix', - item = items[index].trail.join(lineFeed$8); + 4 + 1 + ) + + function afterInitial(code) { + // Flow checks blank lines first, so we don’t have EOL/EOF. - if (index !== length - 1) { - item += lineFeed$8; + if (prefixSize_1(self.events, 'linePrefix') < 4) { + return nok(code) } - eat(item); + effects.enter('codeFlowValue'); + return content(code) } - enterTop(); - exitBlockquote(); - - return node -} - -function listItem(ctx, value, position) { - var offsets = ctx.offset; - var fn = ctx.options.pedantic ? pedanticListItem : normalListItem; - var checked = null; - var task; - var indent; + function afterPrefix(code) { + if (code === null) { + return ok(code) + } - value = fn.apply(null, arguments); + if (markdownLineEnding_1(code)) { + return effects.attempt(continuedIndent, afterPrefix, ok)(code) + } - if (ctx.options.gfm) { - task = value.match(taskItemExpression); + effects.enter('codeFlowValue'); + return content(code) + } - if (task) { - indent = task[0].length; - checked = task[1].toLowerCase() === lowercaseX$1; - offsets[position.line] += indent; - value = value.slice(indent); + function content(code) { + if (code === null || markdownLineEnding_1(code)) { + effects.exit('codeFlowValue'); + return afterPrefix(code) } - } - return { - type: 'listItem', - spread: looseListItemExpression.test(value), - checked: checked, - children: ctx.tokenizeBlock(value, position) + effects.consume(code); + return content } } -// Create a list-item using overly simple mechanics. -function pedanticListItem(ctx, value, position) { - var offsets = ctx.offset; - var line = position.line; +function tokenizeContinuedIndent(effects, ok, nok) { + var self = this; + + return factorySpace( + effects, + afterPrefix, + 'linePrefix', - // Remove the list-item’s bullet. - value = value.replace(pedanticBulletExpression, replacer); + 4 + 1 + ) - // The initial line was also matched by the below, so we reset the `line`. - line = position.line; + function afterPrefix(code) { + if (markdownLineEnding_1(code)) { + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); - return value.replace(initialIndentExpression, replacer) + return factorySpace( + effects, + afterPrefix, + 'linePrefix', - // A simple replacer which removed all matches, and adds their length to - // `offset`. - function replacer($0) { - offsets[line] = (offsets[line] || 0) + $0.length; - line++; + 4 + 1 + ) + } - return '' + return prefixSize_1(self.events, 'linePrefix') < 4 ? nok(code) : ok(code) } } -// Create a list-item using sane mechanics. -function normalListItem(ctx, value, position) { - var offsets = ctx.offset; - var line = position.line; - var max; - var bullet; - var rest; - var lines; - var trimmedLines; - var index; - var length; +var codeIndented = { + tokenize: tokenize$c, + resolve: resolve$9 +}; - // Remove the list-item’s bullet. - value = value.replace(bulletExpression, replacer); +var tokenize$d = tokenizeCodeText; +var resolve$a = resolveCodeText; +var previous_1 = previous; - lines = value.split(lineFeed$8); - trimmedLines = removeIndentation(value, getIndentation(max).indent).split(lineFeed$8); - // We replaced the initial bullet with something else above, which was used - // to trick `removeIndentation` into removing some more characters when - // possible. However, that could result in the initial line to be stripped - // more than it should be. - trimmedLines[0] = rest; +function resolveCodeText(events) { + var tailExitIndex = events.length - 4; + var headEnterIndex = 3; + var index; + var enter; - offsets[line] = (offsets[line] || 0) + bullet.length; - line++; + // If we start and end with an EOL or a space. + if ( + (events[headEnterIndex][1].type === 'lineEnding' || + events[headEnterIndex][1].type === 'space') && + (events[tailExitIndex][1].type === 'lineEnding' || + events[tailExitIndex][1].type === 'space') + ) { + index = headEnterIndex; - index = 0; - length = lines.length; + // And we have data. + while (++index < tailExitIndex) { + if (events[index][1].type === 'codeTextData') { + // Then we have padding. + events[tailExitIndex][1].type = events[headEnterIndex][1].type = + 'codeTextPadding'; - while (++index < length) { - offsets[line] = - (offsets[line] || 0) + lines[index].length - trimmedLines[index].length; - line++; + headEnterIndex += 2; + tailExitIndex -= 2; + break + } + } } - return trimmedLines.join(lineFeed$8) - - /* eslint-disable-next-line max-params */ - function replacer($0, $1, $2, $3, $4) { - bullet = $1 + $2 + $3; - rest = $4; + // Merge adjacent spaces and data. + index = headEnterIndex - 1; + tailExitIndex++; - // Make sure that the first nine numbered list items can indent with an - // extra space. That is, when the bullet did not receive an extra final - // space. - if (Number($2) < 10 && bullet.length % 2 === 1) { - $2 = space$8 + $2; - } + while (++index <= tailExitIndex) { + if (enter === undefined) { + if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { + enter = index; + } + } else if ( + index === tailExitIndex || + events[index][1].type === 'lineEnding' + ) { + events[enter][1].type = 'codeTextData'; - max = $1 + repeatString(space$8, $2.length) + $3; + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end; + events.splice(enter + 2, index - enter - 2); + tailExitIndex -= index - enter - 2; + index = enter + 2; + } - return max + rest + enter = undefined; + } } -} -var headingSetext = setextHeading; - -var lineFeed$9 = '\n'; -var tab$8 = '\t'; -var space$9 = ' '; -var equalsTo$1 = '='; -var dash$3 = '-'; + return events +} -var maxIndent = 3; +function previous(code) { + // If there is a previous code, there will always be a tail. + return ( + code !== 96 || + this.events[this.events.length - 1][1].type === 'characterEscape' + ) +} -var equalsToDepth = 1; -var dashDepth = 2; +function tokenizeCodeText(effects, ok, nok) { + var sizeOpen = 0; + var size; + var token; -function setextHeading(eat, value, silent) { - var self = this; - var now = eat.now(); - var length = value.length; - var index = -1; - var subvalue = ''; - var content; - var queue; - var character; - var marker; - var depth; + return start - // Eat initial indentation. - while (++index < length) { - character = value.charAt(index); + function start(code) { + effects.enter('codeText'); + effects.enter('codeTextSequence'); + return openingSequence(code) + } - if (character !== space$9 || index >= maxIndent) { - index--; - break + function openingSequence(code) { + if (code === 96) { + effects.consume(code); + sizeOpen++; + return openingSequence } - subvalue += character; + effects.exit('codeTextSequence'); + return gap(code) } - // Eat content. - content = ''; - queue = ''; - - while (++index < length) { - character = value.charAt(index); - - if (character === lineFeed$9) { - index--; - break + function gap(code) { + // EOF. + if (code === null) { + return nok(code) } - if (character === space$9 || character === tab$8) { - queue += character; - } else { - content += queue + character; - queue = ''; + // Closing fence? + // Could also be data. + if (code === 96) { + token = effects.enter('codeTextSequence'); + size = 0; + return closingSequence(code) } - } - now.column += subvalue.length; - now.offset += subvalue.length; - subvalue += content + queue; + // Tabs don’t work, and virtual spaces don’t make sense. + if (code === 32) { + effects.enter('space'); + effects.consume(code); + effects.exit('space'); + return gap + } - // Ensure the content is followed by a newline and a valid marker. - character = value.charAt(++index); - marker = value.charAt(++index); + if (markdownLineEnding_1(code)) { + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + return gap + } - if (character !== lineFeed$9 || (marker !== equalsTo$1 && marker !== dash$3)) { - return + // Data. + effects.enter('codeTextData'); + return data(code) } - subvalue += character; - - // Eat Setext-line. - queue = marker; - depth = marker === equalsTo$1 ? equalsToDepth : dashDepth; - - while (++index < length) { - character = value.charAt(index); + // In code. + function data(code) { + if ( + code === null || + code === 32 || + code === 96 || + markdownLineEnding_1(code) + ) { + effects.exit('codeTextData'); + return gap(code) + } - if (character !== marker) { - if (character !== lineFeed$9) { - return - } + effects.consume(code); + return data + } - index--; - break + // Closing fence. + function closingSequence(code) { + // More. + if (code === 96) { + effects.consume(code); + size++; + return closingSequence } - queue += character; - } + // Done! + if (size === sizeOpen) { + effects.exit('codeTextSequence'); + effects.exit('codeText'); + return ok(code) + } - if (silent) { - return true + // More or less accents: mark as data. + token.type = 'codeTextData'; + return data(code) } - - return eat(subvalue + queue)({ - type: 'heading', - depth: depth, - children: self.tokenizeInline(content, now) - }) } -var attributeName = '[a-zA-Z_:][a-zA-Z0-9:._-]*'; -var unquoted = '[^"\'=<>`\\u0000-\\u0020]+'; -var singleQuoted = "'[^']*'"; -var doubleQuoted = '"[^"]*"'; -var attributeValue = - '(?:' + unquoted + '|' + singleQuoted + '|' + doubleQuoted + ')'; -var attribute = - '(?:\\s+' + attributeName + '(?:\\s*=\\s*' + attributeValue + ')?)'; -var openTag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>'; -var closeTag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>'; -var comment = '|'; -var processing = '<[?].*?[?]>'; -var declaration = ']*>'; -var cdata = ''; - -var openCloseTag = new RegExp('^(?:' + openTag + '|' + closeTag + ')'); - -var tag = new RegExp( - '^(?:' + - openTag + - '|' + - closeTag + - '|' + - comment + - '|' + - processing + - '|' + - declaration + - '|' + - cdata + - ')' -); - -var html = { - openCloseTag: openCloseTag, - tag: tag +var codeText = { + tokenize: tokenize$d, + resolve: resolve$a, + previous: previous_1 }; -var openCloseTag$1 = html.openCloseTag; +var factoryDestination = createDestination; -var htmlBlock = blockHtml; -var tab$9 = '\t'; -var space$a = ' '; -var lineFeed$a = '\n'; -var lessThan$1 = '<'; -var rawOpenExpression = /^<(script|pre|style)(?=(\s|>|$))/i; -var rawCloseExpression = /<\/(script|pre|style)>/i; -var commentOpenExpression = /^/; -var instructionOpenExpression = /^<\?/; -var instructionCloseExpression = /\?>/; -var directiveOpenExpression = /^/; -var cdataOpenExpression = /^/; -var elementCloseExpression = /^$/; -var otherElementOpenExpression = new RegExp(openCloseTag$1.source + '\\s*$'); -function blockHtml(eat, value, silent) { - var self = this; - var blocks = self.options.blocks.join('|'); - var elementOpenExpression = new RegExp( - '^|$))', - 'i' - ); - var length = value.length; - var index = 0; - var next; - var line; - var offset; - var character; - var count; - var sequence; - var subvalue; - - var sequences = [ - [rawOpenExpression, rawCloseExpression, true], - [commentOpenExpression, commentCloseExpression, true], - [instructionOpenExpression, instructionCloseExpression, true], - [directiveOpenExpression, directiveCloseExpression, true], - [cdataOpenExpression, cdataCloseExpression, true], - [elementOpenExpression, elementCloseExpression, true], - [otherElementOpenExpression, elementCloseExpression, false] - ]; - // Eat initial spacing. - while (index < length) { - character = value.charAt(index); +// eslint-disable-next-line max-params +function createDestination( + effects, + ok, + nok, + type, + literalType, + literalMarkerType, + rawType, + stringType, + max +) { + var limit = max || Infinity; + var balance = 0; - if (character !== tab$9 && character !== space$a) { - break + return start + + function start(code) { + if (code === 60) { + effects.enter(type); + effects.enter(literalType); + effects.enter(literalMarkerType); + effects.consume(code); + effects.exit(literalMarkerType); + return destinationEnclosedBefore } - index++; - } + if (asciiControl_1(code)) { + return nok(code) + } - if (value.charAt(index) !== lessThan$1) { - return + effects.enter(type); + effects.enter(rawType); + effects.enter(stringType); + effects.enter('chunkString', {contentType: 'string'}); + return destinationRaw(code) } - next = value.indexOf(lineFeed$a, index + 1); - next = next === -1 ? length : next; - line = value.slice(index, next); - offset = -1; - count = sequences.length; - - while (++offset < count) { - if (sequences[offset][0].test(line)) { - sequence = sequences[offset]; - break + function destinationEnclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType); + effects.consume(code); + effects.exit(literalMarkerType); + effects.exit(literalType); + effects.exit(type); + return ok } - } - if (!sequence) { - return + effects.enter(stringType); + effects.enter('chunkString', {contentType: 'string'}); + return destinationEnclosed(code) } - if (silent) { - return sequence[2] + function destinationEnclosed(code) { + if (code === 62) { + effects.exit('chunkString'); + effects.exit(stringType); + return destinationEnclosedBefore(code) + } + + if (code === null || code === 60 || markdownLineEnding_1(code)) { + return nok(code) + } + + effects.consume(code); + return code === 92 ? destinationEnclosedEscape : destinationEnclosed } - index = next; + function destinationEnclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code); + return destinationEnclosed + } - if (!sequence[1].test(line)) { - while (index < length) { - next = value.indexOf(lineFeed$a, index + 1); - next = next === -1 ? length : next; - line = value.slice(index + 1, next); + return destinationEnclosed(code) + } - if (sequence[1].test(line)) { - if (line) { - index = next; - } + function destinationRaw(code) { + if (code === 40) { + if (++balance > limit) return nok(code) + effects.consume(code); + return destinationRaw + } - break + if (code === 41) { + if (!balance--) { + effects.exit('chunkString'); + effects.exit(stringType); + effects.exit(rawType); + effects.exit(type); + return ok(code) } - index = next; + effects.consume(code); + return destinationRaw } + + if (code === null || markdownLineEndingOrSpace_1(code)) { + if (balance) return nok(code) + effects.exit('chunkString'); + effects.exit(stringType); + effects.exit(rawType); + effects.exit(type); + return ok(code) + } + + if (asciiControl_1(code)) return nok(code) + effects.consume(code); + return code === 92 ? destinationRawEscape : destinationRaw } - subvalue = value.slice(0, index); + function destinationRawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code); + return destinationRaw + } - return eat(subvalue)({type: 'html', value: subvalue}) + return destinationRaw(code) + } } -var isWhitespaceCharacter = whitespace; +var factoryLabel = createLabel; -var fromCode = String.fromCharCode; -var re$1 = /\s/; -// Check if the given character code, or the character code at the first -// character, is a whitespace character. -function whitespace(character) { - return re$1.test( - typeof character === 'number' ? fromCode(character) : character.charAt(0) - ) -} -var collapseWhiteSpace = collapse; -// `collapse(' \t\nbar \nbaz\t') // ' bar baz '` -function collapse(value) { - return String(value).replace(/\s+/g, ' ') -} +// eslint-disable-next-line max-params +function createLabel(effects, ok, nok, type, markerType, stringType) { + var self = this; + var size = 0; + var data; -var normalize_1 = normalize$2; + return start -// Normalize an identifier. Collapses multiple white space characters into a -// single space, and removes casing. -function normalize$2(value) { - return collapseWhiteSpace(value).toLowerCase() -} + function start(code) { + effects.enter(type); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.enter(stringType); + return atBreak + } -var definition_1 = definition; + function atBreak(code) { + if ( + code === null || + code === 91 || + (code === 93 && !data) || + /* istanbul ignore next - footnotes. */ + (code === 94 && + !size && + '_hiddenFootnoteSupport' in self.parser.constructs) || + size > 999 + ) { + return nok(code) + } -var quotationMark = '"'; -var apostrophe = "'"; -var backslash$2 = '\\'; -var lineFeed$b = '\n'; -var tab$a = '\t'; -var space$b = ' '; -var leftSquareBracket = '['; -var rightSquareBracket = ']'; -var leftParenthesis = '('; -var rightParenthesis$1 = ')'; -var colon$1 = ':'; -var lessThan$2 = '<'; -var greaterThan$1 = '>'; + if (code === 93) { + effects.exit(stringType); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.exit(type); + return ok + } -function definition(eat, value, silent) { - var self = this; - var commonmark = self.options.commonmark; - var index = 0; - var length = value.length; - var subvalue = ''; - var beforeURL; - var beforeTitle; - var queue; - var character; - var test; - var identifier; - var url; - var title; + if (markdownLineEnding_1(code)) { + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + return atBreak + } - while (index < length) { - character = value.charAt(index); + effects.enter('chunkString', {contentType: 'string'}); + return label(code) + } - if (character !== space$b && character !== tab$a) { - break + function label(code) { + if ( + code === null || + code === 91 || + code === 93 || + markdownLineEnding_1(code) || + size++ > 999 + ) { + effects.exit('chunkString'); + return atBreak(code) } - subvalue += character; - index++; + effects.consume(code); + data = data || !markdownSpace_1(code); + return code === 92 ? labelEscape : label } - character = value.charAt(index); + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code); + size++; + return label + } - if (character !== leftSquareBracket) { - return + return label(code) } +} - index++; - subvalue += character; - queue = ''; +var factoryWhitespace = createWhitespace; - while (index < length) { - character = value.charAt(index); - if (character === rightSquareBracket) { - break - } else if (character === backslash$2) { - queue += character; - index++; - character = value.charAt(index); - } - queue += character; - index++; - } - if ( - !queue || - value.charAt(index) !== rightSquareBracket || - value.charAt(index + 1) !== colon$1 - ) { - return - } - identifier = queue; - subvalue += queue + rightSquareBracket + colon$1; - index = subvalue.length; - queue = ''; - while (index < length) { - character = value.charAt(index); +function createWhitespace(effects, ok) { + var seen; + return start - if (character !== tab$a && character !== space$b && character !== lineFeed$b) { - break + function start(code) { + if (markdownLineEnding_1(code)) { + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + seen = true; + return start } - subvalue += character; - index++; + if (markdownSpace_1(code)) { + return factorySpace( + effects, + start, + seen ? 'linePrefix' : 'lineSuffix' + )(code) + } + + return ok(code) } +} - character = value.charAt(index); - queue = ''; - beforeURL = subvalue; +var factoryTitle = createTitle; - if (character === lessThan$2) { - index++; - while (index < length) { - character = value.charAt(index); - if (!isEnclosedURLCharacter(character)) { - break - } - queue += character; - index++; - } - character = value.charAt(index); +// eslint-disable-next-line max-params +function createTitle(effects, ok, nok, type, markerType, stringType) { + var marker; - if (character === isEnclosedURLCharacter.delimiter) { - subvalue += lessThan$2 + queue + character; - index++; - } else { - if (commonmark) { - return - } + return start - index -= queue.length + 1; - queue = ''; - } + function start(code) { + effects.enter(type); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + marker = code === 40 ? 41 : code; + return atFirstTitleBreak } - if (!queue) { - while (index < length) { - character = value.charAt(index); + function atFirstTitleBreak(code) { + if (code === marker) { + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.exit(type); + return ok + } - if (!isUnclosedURLCharacter(character)) { - break - } + effects.enter(stringType); + return atTitleBreak(code) + } - queue += character; - index++; + function atTitleBreak(code) { + if (code === marker) { + effects.exit(stringType); + return atFirstTitleBreak(marker) } - subvalue += queue; - } + if (code === null) { + return nok(code) + } - if (!queue) { - return + // Note: blank lines can’t exist in content. + if (markdownLineEnding_1(code)) { + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + return factorySpace(effects, atTitleBreak, 'linePrefix') + } + + effects.enter('chunkString', {contentType: 'string'}); + return title(code) } - url = queue; - queue = ''; + function title(code) { + if (code === marker || code === null || markdownLineEnding_1(code)) { + effects.exit('chunkString'); + return atTitleBreak(code) + } - while (index < length) { - character = value.charAt(index); + effects.consume(code); + return code === 92 ? titleEscape : title + } - if (character !== tab$a && character !== space$b && character !== lineFeed$b) { - break + function titleEscape(code) { + if (code === marker || code === 92) { + effects.consume(code); + return title } - queue += character; - index++; + return title(code) } +} - character = value.charAt(index); - test = null; +var tokenize$e = tokenizeDefinition; - if (character === quotationMark) { - test = quotationMark; - } else if (character === apostrophe) { - test = apostrophe; - } else if (character === leftParenthesis) { - test = rightParenthesis$1; - } - if (!test) { - queue = ''; - index = subvalue.length; - } else if (queue) { - subvalue += queue + character; - index = subvalue.length; - queue = ''; - while (index < length) { - character = value.charAt(index); - if (character === test) { - break - } - if (character === lineFeed$b) { - index++; - character = value.charAt(index); - if (character === lineFeed$b || character === test) { - return - } - queue += lineFeed$b; - } - queue += character; - index++; - } - character = value.charAt(index); - if (character !== test) { - return - } - beforeTitle = subvalue; - subvalue += queue + character; - index++; - title = queue; - queue = ''; - } else { - return - } +function tokenizeDefinition(effects, ok, nok) { + var self = this; + var destinationAfter = effects.attempt( + {tokenize: tokenizeTitle, partial: true}, + factorySpace(effects, after, 'whitespace'), + factorySpace(effects, after, 'whitespace') + ); - while (index < length) { - character = value.charAt(index); + var identifier; - if (character !== tab$a && character !== space$b) { - break - } + return start - subvalue += character; - index++; + function start(code) { + effects.enter('definition'); + return factoryLabel.call( + self, + effects, + labelAfter, + nok, + 'definitionLabel', + 'definitionLabelMarker', + 'definitionLabelString' + )(code) } - character = value.charAt(index); + function labelAfter(code) { + identifier = normalizeIdentifier_1( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ); - if (!character || character === lineFeed$b) { - if (silent) { - return true + if (code === 58) { + effects.enter('definitionMarker'); + effects.consume(code); + effects.exit('definitionMarker'); + + // Note: blank lines can’t exist in content. + return factoryWhitespace( + effects, + factoryDestination( + effects, + destinationAfter, + nok, + 'definitionDestination', + 'definitionDestinationLiteral', + 'definitionDestinationLiteralMarker', + 'definitionDestinationRaw', + 'definitionDestinationString' + ) + ) } - beforeURL = eat(beforeURL).test().end; - url = self.decode.raw(self.unescape(url), beforeURL, {nonTerminated: false}); + return nok(code) + } + + function after(code) { + if (code === null || markdownLineEnding_1(code)) { + effects.exit('definition'); + + if (self.parser.defined.indexOf(identifier) < 0) { + self.parser.defined.push(identifier); + } - if (title) { - beforeTitle = eat(beforeTitle).test().end; - title = self.decode.raw(self.unescape(title), beforeTitle); + return ok(code) } - return eat(subvalue)({ - type: 'definition', - identifier: normalize_1(identifier), - label: identifier, - title: title || null, - url: url - }) + return nok(code) } } -// Check if `character` can be inside an enclosed URI. -function isEnclosedURLCharacter(character) { - return ( - character !== greaterThan$1 && - character !== leftSquareBracket && - character !== rightSquareBracket - ) -} - -isEnclosedURLCharacter.delimiter = greaterThan$1; - -// Check if `character` can be inside an unclosed URI. -function isUnclosedURLCharacter(character) { - return ( - character !== leftSquareBracket && - character !== rightSquareBracket && - !isWhitespaceCharacter(character) - ) -} +function tokenizeTitle(effects, ok, nok) { + return start -var table_1 = table; + function start(code) { + return markdownLineEndingOrSpace_1(code) + ? factoryWhitespace(effects, before)(code) + : nok(code) + } -var tab$b = '\t'; -var lineFeed$c = '\n'; -var space$c = ' '; -var dash$4 = '-'; -var colon$2 = ':'; -var backslash$3 = '\\'; -var verticalBar = '|'; + function before(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + factorySpace(effects, after, 'whitespace'), + nok, + 'definitionTitle', + 'definitionTitleMarker', + 'definitionTitleString' + )(code) + } -var minColumns = 1; -var minRows = 2; + return nok(code) + } -var left = 'left'; -var center = 'center'; -var right = 'right'; + function after(code) { + return code === null || markdownLineEnding_1(code) ? ok(code) : nok(code) + } +} -function table(eat, value, silent) { - var self = this; - var index; - var alignments; - var alignment; - var subvalue; - var row; - var length; - var lines; - var queue; - var character; - var hasDash; - var align; - var cell; - var preamble; - var now; - var position; - var lineCount; - var line; - var rows; - var table; - var lineIndex; - var pipeIndex; - var first; +var definition = { + tokenize: tokenize$e +}; - // Exit when not in gfm-mode. - if (!self.options.gfm) { - return - } +var tokenize$f = tokenizeHardBreakEscape; - // Get the rows. - // Detecting tables soon is hard, so there are some checks for performance - // here, such as the minimum number of rows, and allowed characters in the - // alignment row. - index = 0; - lineCount = 0; - length = value.length + 1; - lines = []; - while (index < length) { - lineIndex = value.indexOf(lineFeed$c, index); - pipeIndex = value.indexOf(verticalBar, index + 1); - if (lineIndex === -1) { - lineIndex = value.length; - } +function tokenizeHardBreakEscape(effects, ok, nok) { + return start - if (pipeIndex === -1 || pipeIndex > lineIndex) { - if (lineCount < minRows) { - return - } + function start(code) { + effects.enter('hardBreakEscape'); + effects.enter('escapeMarker'); + effects.consume(code); + return open + } - break + function open(code) { + if (markdownLineEnding_1(code)) { + effects.exit('escapeMarker'); + effects.exit('hardBreakEscape'); + return ok(code) } - lines.push(value.slice(index, lineIndex)); - lineCount++; - index = lineIndex + 1; + return nok(code) } +} - // Parse the alignment row. - subvalue = lines.join(lineFeed$c); - alignments = lines.splice(1, 1)[0] || []; - index = 0; - length = alignments.length; - lineCount--; - alignment = false; - align = []; +var hardBreakEscape = { + tokenize: tokenize$f +}; - while (index < length) { - character = alignments.charAt(index); +// This module is copied from . +var htmlBlockNames = [ + 'address', + 'article', + 'aside', + 'base', + 'basefont', + 'blockquote', + 'body', + 'caption', + 'center', + 'col', + 'colgroup', + 'dd', + 'details', + 'dialog', + 'dir', + 'div', + 'dl', + 'dt', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'frame', + 'frameset', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hr', + 'html', + 'iframe', + 'legend', + 'li', + 'link', + 'main', + 'menu', + 'menuitem', + 'nav', + 'noframes', + 'ol', + 'optgroup', + 'option', + 'p', + 'param', + 'section', + 'source', + 'summary', + 'table', + 'tbody', + 'td', + 'tfoot', + 'th', + 'thead', + 'title', + 'tr', + 'track', + 'ul' +]; - if (character === verticalBar) { - hasDash = null; +// This module is copied from . +var htmlRawNames = ['pre', 'script', 'style']; - if (alignment === false) { - if (first === false) { - return - } - } else { - align.push(alignment); - alignment = false; - } +var tokenize$g = tokenizeHtml; +var resolveTo = resolveToHtml; +var concrete$1 = true; - first = false; - } else if (character === dash$4) { - hasDash = true; - alignment = alignment || null; - } else if (character === colon$2) { - if (alignment === left) { - alignment = center; - } else if (hasDash && alignment === null) { - alignment = right; - } else { - alignment = left; - } - } else if (!isWhitespaceCharacter(character)) { - return - } - index++; - } - if (alignment !== false) { - align.push(alignment); - } - // Exit when without enough columns. - if (align.length < minColumns) { - return - } - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true - } - // Parse the rows. - position = -1; - rows = []; - table = eat(subvalue).reset({type: 'table', align: align, children: rows}); - while (++position < lineCount) { - line = lines[position]; - row = {type: 'tableRow', children: []}; - // Eat a newline character when this is not the first row. - if (position) { - eat(lineFeed$c); - } - // Eat the row. - eat(line).reset(row, table); - length = line.length + 1; - index = 0; - queue = ''; - cell = ''; - preamble = true; - while (index < length) { - character = line.charAt(index); - if (character === tab$b || character === space$c) { - if (cell) { - queue += character; - } else { - eat(character); - } - index++; - continue - } +var nextBlank = {tokenize: tokenizeNextBlank, partial: true}; - if (character === '' || character === verticalBar) { - if (preamble) { - eat(character); - } else { - if ((cell || character) && !preamble) { - subvalue = cell; - - if (queue.length > 1) { - if (character) { - subvalue += queue.slice(0, -1); - queue = queue.charAt(queue.length - 1); - } else { - subvalue += queue; - queue = ''; - } - } +function resolveToHtml(events) { + var index = events.length; - now = eat.now(); + while (index--) { + if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { + break + } + } - eat(subvalue)( - {type: 'tableCell', children: self.tokenizeInline(cell, now)}, - row - ); - } + if (index > 1 && events[index - 2][1].type === 'linePrefix') { + // Add the prefix start to the HTML token. + events[index][1].start = events[index - 2][1].start; + // Add the prefix start to the HTML line token. + events[index + 1][1].start = events[index - 2][1].start; + // Remove the line prefix. + events.splice(index - 2, 2); + } - eat(queue + character); + return events +} - queue = ''; - cell = ''; - } - } else { - if (queue) { - cell += queue; - queue = ''; - } +function tokenizeHtml(effects, ok, nok) { + var self = this; + var kind; + var startTag; + var buffer; + var index; + var marker; - cell += character; + return start - if (character === backslash$3 && index !== length - 2) { - cell += line.charAt(index + 1); - index++; - } - } + function start(code) { + effects.enter('htmlFlow'); + effects.enter('htmlFlowData'); + effects.consume(code); + return open + } - preamble = false; - index++; + function open(code) { + if (code === 33) { + effects.consume(code); + return declarationStart + } + + if (code === 47) { + effects.consume(code); + return tagCloseStart } - // Eat the alignment row. - if (!position) { - eat(lineFeed$c + alignments); + if (code === 63) { + effects.consume(code); + kind = 3; + // While we’re in an instruction instead of a declaration, we’re on a `?` + // right now, so we do need to search for `>`, similar to declarations. + return self.interrupt ? ok : continuationDeclarationInside } + + if (asciiAlpha(code)) { + effects.consume(code); + buffer = fromCharCode(code); + startTag = true; + return tagName + } + + return nok(code) } - return table -} + function declarationStart(code) { + if (code === 45) { + effects.consume(code); + kind = 2; + return commentOpenInside + } -var paragraph_1 = paragraph; + if (code === 91) { + effects.consume(code); + kind = 5; + buffer = 'CDATA['; + index = 0; + return cdataOpenInside + } -var tab$c = '\t'; -var lineFeed$d = '\n'; -var space$d = ' '; + if (asciiAlpha(code)) { + effects.consume(code); + kind = 4; + return self.interrupt ? ok : continuationDeclarationInside + } -var tabSize$4 = 4; + return nok(code) + } -// Tokenise paragraph. -function paragraph(eat, value, silent) { - var self = this; - var settings = self.options; - var commonmark = settings.commonmark; - var tokenizers = self.blockTokenizers; - var interruptors = self.interruptParagraph; - var index = value.indexOf(lineFeed$d); - var length = value.length; - var position; - var subvalue; - var character; - var size; - var now; + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code); + return self.interrupt ? ok : continuationDeclarationInside + } - while (index < length) { - // Eat everything if there’s no following newline. - if (index === -1) { - index = length; - break + return nok(code) + } + + function cdataOpenInside(code) { + if (code === buffer.charCodeAt(index++)) { + effects.consume(code); + return index === buffer.length + ? self.interrupt + ? ok + : continuation + : cdataOpenInside } - // Stop if the next character is NEWLINE. - if (value.charAt(index + 1) === lineFeed$d) { - break + return nok(code) + } + + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code); + buffer = fromCharCode(code); + return tagName } - // In commonmark-mode, following indented lines are part of the paragraph. - if (commonmark) { - size = 0; - position = index + 1; + return nok(code) + } - while (position < length) { - character = value.charAt(position); + function tagName(code) { + if ( + code === null || + code === 47 || + code === 62 || + markdownLineEndingOrSpace_1(code) + ) { + if (code !== 47 && startTag && htmlRawNames.indexOf(buffer.toLowerCase()) > -1) { + kind = 1; + return self.interrupt ? ok(code) : continuation(code) + } - if (character === tab$c) { - size = tabSize$4; - break - } else if (character === space$d) { - size++; - } else { - break + if (htmlBlockNames.indexOf(buffer.toLowerCase()) > -1) { + kind = 6; + + if (code === 47) { + effects.consume(code); + return basicSelfClosing } - position++; + return self.interrupt ? ok(code) : continuation(code) } - if (size >= tabSize$4 && character !== lineFeed$d) { - index = value.indexOf(lineFeed$d, index + 1); - continue - } + kind = 7; + // Do not support complete HTML when interrupting. + return self.interrupt + ? nok(code) + : startTag + ? completeAttributeNameBefore(code) + : completeClosingTagAfter(code) } - subvalue = value.slice(index + 1); - - // Check if the following code contains a possible block. - if (interrupt_1(interruptors, tokenizers, self, [eat, subvalue, true])) { - break + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code); + buffer += fromCharCode(code); + return tagName } - position = index; - index = value.indexOf(lineFeed$d, index + 1); + return nok(code) + } - if (index !== -1 && trim_1(value.slice(position, index)) === '') { - index = position; - break + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code); + return self.interrupt ? ok : continuation } + + return nok(code) } - subvalue = value.slice(0, index); + function completeClosingTagAfter(code) { + if (markdownSpace_1(code)) { + effects.consume(code); + return completeClosingTagAfter + } - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true + return completeEnd(code) } - now = eat.now(); - subvalue = trimTrailingLines_1(subvalue); - - return eat(subvalue)({ - type: 'paragraph', - children: self.tokenizeInline(subvalue, now) - }) -} + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code); + return completeEnd + } -var _escape = locate; + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code); + return completeAttributeName + } -function locate(value, fromIndex) { - return value.indexOf('\\', fromIndex) -} + if (markdownSpace_1(code)) { + effects.consume(code); + return completeAttributeNameBefore + } -var _escape$1 = escape$1; -escape$1.locator = _escape; + return completeEnd(code) + } -var lineFeed$e = '\n'; -var backslash$4 = '\\'; + function completeAttributeName(code) { + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code); + return completeAttributeName + } -function escape$1(eat, value, silent) { - var self = this; - var character; - var node; + return completeAttributeNameAfter(code) + } - if (value.charAt(0) === backslash$4) { - character = value.charAt(1); + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code); + return completeAttributeValueBefore + } - if (self.escape.indexOf(character) !== -1) { - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true - } + if (markdownSpace_1(code)) { + effects.consume(code); + return completeAttributeNameAfter + } - if (character === lineFeed$e) { - node = {type: 'break'}; - } else { - node = {type: 'text', value: character}; - } + return completeAttributeNameBefore(code) + } - return eat(backslash$4 + character)(node) + function completeAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) } - } -} -var tag$1 = locate$1; + if (code === 34 || code === 39) { + effects.consume(code); + marker = code; + return completeAttributeValueQuoted + } -function locate$1(value, fromIndex) { - return value.indexOf('<', fromIndex) -} + if (markdownSpace_1(code)) { + effects.consume(code); + return completeAttributeValueBefore + } -var autoLink_1 = autoLink; -autoLink.locator = tag$1; -autoLink.notInLink = true; + marker = undefined; + return completeAttributeValueUnquoted(code) + } -var lessThan$3 = '<'; -var greaterThan$2 = '>'; -var atSign = '@'; -var slash$1 = '/'; -var mailto = 'mailto:'; -var mailtoLength = mailto.length; + function completeAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code); + return completeAttributeValueQuotedAfter + } -function autoLink(eat, value, silent) { - var self = this; - var subvalue = ''; - var length = value.length; - var index = 0; - var queue = ''; - var hasAtCharacter = false; - var link = ''; - var character; - var now; - var content; - var tokenizers; - var exit; + if (code === null || markdownLineEnding_1(code)) { + return nok(code) + } - if (value.charAt(0) !== lessThan$3) { - return + effects.consume(code); + return completeAttributeValueQuoted } - index++; - subvalue = lessThan$3; - - while (index < length) { - character = value.charAt(index); - + function completeAttributeValueUnquoted(code) { if ( - isWhitespaceCharacter(character) || - character === greaterThan$2 || - character === atSign || - (character === ':' && value.charAt(index + 1) === slash$1) + code === null || + code === 34 || + code === 39 || + code === 60 || + code === 61 || + code === 62 || + code === 96 || + markdownLineEndingOrSpace_1(code) ) { - break + return completeAttributeNameAfter(code) } - queue += character; - index++; + effects.consume(code); + return completeAttributeValueUnquoted } - if (!queue) { - return + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace_1(code)) { + return completeAttributeNameBefore(code) + } + + return nok(code) } - link += queue; - queue = ''; + function completeEnd(code) { + if (code === 62) { + effects.consume(code); + return completeAfter + } - character = value.charAt(index); - link += character; - index++; + return nok(code) + } - if (character === atSign) { - hasAtCharacter = true; - } else { - if (character !== ':' || value.charAt(index + 1) !== slash$1) { - return + function completeAfter(code) { + if (markdownSpace_1(code)) { + effects.consume(code); + return completeAfter } - link += slash$1; - index++; + return code === null || markdownLineEnding_1(code) + ? continuation(code) + : nok(code) } - while (index < length) { - character = value.charAt(index); + function continuation(code) { + if (code === 45 && kind === 2) { + effects.consume(code); + return continuationCommentInside + } - if (isWhitespaceCharacter(character) || character === greaterThan$2) { - break + if (code === 60 && kind === 1) { + effects.consume(code); + return continuationRawTagOpen } - queue += character; - index++; - } + if (code === 62 && kind === 4) { + effects.consume(code); + return continuationClose + } - character = value.charAt(index); + if (code === 63 && kind === 3) { + effects.consume(code); + return continuationDeclarationInside + } - if (!queue || character !== greaterThan$2) { - return + if (code === 93 && kind === 5) { + effects.consume(code); + return continuationCharacterDataInside + } + + if (markdownLineEnding_1(code) && (kind === 6 || kind === 7)) { + return effects.check( + nextBlank, + continuationClose, + continuationAtLineEnding + )(code) + } + + if (code === null || markdownLineEnding_1(code)) { + return continuationAtLineEnding(code) + } + + effects.consume(code); + return continuation } - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true + function continuationAtLineEnding(code) { + effects.exit('htmlFlowData'); + return htmlContinueStart(code) } - link += queue; - content = link; - subvalue += link + character; - now = eat.now(); - now.column++; - now.offset++; + function htmlContinueStart(code) { + if (code === null) { + return done(code) + } - if (hasAtCharacter) { - if (link.slice(0, mailtoLength).toLowerCase() === mailto) { - content = content.slice(mailtoLength); - now.column += mailtoLength; - now.offset += mailtoLength; - } else { - link = mailto + link; + if (markdownLineEnding_1(code)) { + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + return htmlContinueStart } + + effects.enter('htmlFlowData'); + return continuation(code) } - // Temporarily remove all tokenizers except text in autolinks. - tokenizers = self.inlineTokenizers; - self.inlineTokenizers = {text: tokenizers.text}; + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code); + return continuationDeclarationInside + } - exit = self.enterLink(); + return continuation(code) + } - content = self.tokenizeInline(content, now); + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code); + buffer = ''; + return continuationRawEndTag + } - self.inlineTokenizers = tokenizers; - exit(); + return continuation(code) + } - return eat(subvalue)({ - type: 'link', - title: null, - url: parseEntities_1(link, {nonTerminated: false}), - children: content - }) -} + function continuationRawEndTag(code) { + if (code === 62 && htmlRawNames.indexOf(buffer.toLowerCase()) > -1) { + effects.consume(code); + return continuationClose + } -var ccount_1 = ccount; + if (asciiAlpha(code) && buffer.length < 6) { + effects.consume(code); + buffer += fromCharCode(code); + return continuationRawEndTag + } -function ccount(value, character) { - var val = String(value); - var count = 0; - var index; + return continuation(code) + } - if (typeof character !== 'string' || character.length !== 1) { - throw new Error('Expected character') + function continuationCharacterDataInside(code) { + if (code === 93) { + effects.consume(code); + return continuationDeclarationInside + } + + return continuation(code) } - index = val.indexOf(character); + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code); + return continuationClose + } - while (index !== -1) { - count++; - index = val.indexOf(character, index + 1); + return continuation(code) } - return count -} + function continuationClose(code) { + if (code === null || markdownLineEnding_1(code)) { + effects.exit('htmlFlowData'); + return done(code) + } -var url = locate$2; + effects.consume(code); + return continuationClose + } -var values = ['www.', 'http://', 'https://']; + function done(code) { + effects.exit('htmlFlow'); + return ok(code) + } +} -function locate$2(value, fromIndex) { - var min = -1; - var index; - var length; - var position; +function tokenizeNextBlank(effects, ok, nok) { + return start - if (!this.options.gfm) { - return min + function start(code) { + effects.exit('htmlFlowData'); + effects.enter('lineEndingBlank'); + effects.consume(code); + effects.exit('lineEndingBlank'); + return effects.attempt(partialBlankLine, ok, nok) } +} - length = values.length; - index = -1; +var htmlFlow = { + tokenize: tokenize$g, + resolveTo: resolveTo, + concrete: concrete$1 +}; - while (++index < length) { - position = value.indexOf(values[index], fromIndex); +var tokenize$h = tokenizeHtml$1; - if (position !== -1 && (min === -1 || position < min)) { - min = position; - } - } - return min -} -var url_1 = url$1; -url$1.locator = url; -url$1.notInLink = true; -var exclamationMark$1 = 33; // '!' -var ampersand$1 = 38; // '&' -var rightParenthesis$2 = 41; // ')' -var asterisk$2 = 42; // '*' -var comma$1 = 44; // ',' -var dash$5 = 45; // '-' -var dot$2 = 46; // '.' -var colon$3 = 58; // ':' -var semicolon$1 = 59; // ';' -var questionMark = 63; // '?' -var lessThan$4 = 60; // '<' -var underscore$2 = 95; // '_' -var tilde$2 = 126; // '~' -var leftParenthesisCharacter = '('; -var rightParenthesisCharacter = ')'; -function url$1(eat, value, silent) { - var self = this; - var gfm = self.options.gfm; - var tokenizers = self.inlineTokenizers; - var length = value.length; - var previousDot = -1; - var protocolless = false; - var dots; - var lastTwoPartsStart; - var start; + + + +function tokenizeHtml$1(effects, ok, nok) { + var marker; + var buffer; var index; - var pathStart; - var path; - var code; - var end; - var leftCount; - var rightCount; - var content; - var children; - var url; - var exit; + var returnState; - if (!gfm) { - return - } + return start - // `WWW.` doesn’t work. - if (value.slice(0, 4) === 'www.') { - protocolless = true; - index = 4; - } else if (value.slice(0, 7).toLowerCase() === 'http://') { - index = 7; - } else if (value.slice(0, 8).toLowerCase() === 'https://') { - index = 8; - } else { - return + function start(code) { + effects.enter('htmlText'); + effects.enter('htmlTextData'); + effects.consume(code); + return open } - // Act as if the starting boundary is a dot. - previousDot = index - 1; + function open(code) { + if (code === 33) { + effects.consume(code); + return declarationOpen + } - // Parse a valid domain. - start = index; - dots = []; + if (code === 47) { + effects.consume(code); + return tagCloseStart + } - while (index < length) { - code = value.charCodeAt(index); + if (code === 63) { + effects.consume(code); + return instruction + } - if (code === dot$2) { - // Dots may not appear after each other. - if (previousDot === index - 1) { - break - } + if (asciiAlpha(code)) { + effects.consume(code); + return tagOpen + } - dots.push(index); - previousDot = index; - index++; - continue + return nok(code) + } + + function declarationOpen(code) { + if (code === 45) { + effects.consume(code); + return commentOpen } - if ( - isDecimal(code) || - isAlphabetical(code) || - code === dash$5 || - code === underscore$2 - ) { - index++; - continue + if (code === 91) { + effects.consume(code); + buffer = 'CDATA['; + index = 0; + return cdataOpen } - break - } + if (asciiAlpha(code)) { + effects.consume(code); + return declaration + } - // Ignore a final dot: - if (code === dot$2) { - dots.pop(); - index--; + return nok(code) } - // If there are not dots, exit. - if (dots[0] === undefined) { - return + function commentOpen(code) { + if (code === 45) { + effects.consume(code); + return commentStart + } + + return nok(code) } - // If there is an underscore in the last two domain parts, exit: - // `www.example.c_m` and `www.ex_ample.com` are not OK, but - // `www.sub_domain.example.com` is. - lastTwoPartsStart = dots.length < 2 ? start : dots[dots.length - 2] + 1; + function commentStart(code) { + if (code === null || code === 62) { + return nok(code) + } - if (value.slice(lastTwoPartsStart, index).indexOf('_') !== -1) { - return - } + if (code === 45) { + effects.consume(code); + return commentStartDash + } - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true + return comment(code) } - end = index; - pathStart = index; + function commentStartDash(code) { + if (code === null || code === 62) { + return nok(code) + } - // Parse a path. - while (index < length) { - code = value.charCodeAt(index); + return comment(code) + } - if (isWhitespaceCharacter(code) || code === lessThan$4) { - break + function comment(code) { + if (code === null) { + return nok(code) } - index++; + if (code === 45) { + effects.consume(code); + return commentClose + } - if ( - code === exclamationMark$1 || - code === asterisk$2 || - code === comma$1 || - code === dot$2 || - code === colon$3 || - code === questionMark || - code === underscore$2 || - code === tilde$2 - ) ; else { - end = index; + if (markdownLineEnding_1(code)) { + returnState = comment; + return atLineEnding(code) } + + effects.consume(code); + return comment } - index = end; + function commentClose(code) { + if (code === 45) { + effects.consume(code); + return end + } - // If the path ends in a closing paren, and the count of closing parens is - // higher than the opening count, then remove the supefluous closing parens. - if (value.charCodeAt(index - 1) === rightParenthesis$2) { - path = value.slice(pathStart, index); - leftCount = ccount_1(path, leftParenthesisCharacter); - rightCount = ccount_1(path, rightParenthesisCharacter); + return comment(code) + } - while (rightCount > leftCount) { - index = pathStart + path.lastIndexOf(rightParenthesisCharacter); - path = value.slice(pathStart, index); - rightCount--; + function cdataOpen(code) { + if (code === buffer.charCodeAt(index++)) { + effects.consume(code); + return index === buffer.length ? cdata : cdataOpen } + + return nok(code) } - if (value.charCodeAt(index - 1) === semicolon$1) { - // GitHub doesn’t document this, but final semicolons aren’t paret of the - // URL either. - index--; + function cdata(code) { + if (code === null) { + return nok(code) + } - // // If the path ends in what looks like an entity, it’s not part of the path. - if (isAlphabetical(value.charCodeAt(index - 1))) { - end = index - 2; + if (code === 93) { + effects.consume(code); + return cdataClose + } - while (isAlphabetical(value.charCodeAt(end))) { - end--; - } + effects.consume(code); + return cdata + } - if (value.charCodeAt(end) === ampersand$1) { - index = end; - } + function cdataClose(code) { + if (code === 93) { + effects.consume(code); + return cdataEnd } + + return cdata(code) } - content = value.slice(0, index); - url = parseEntities_1(content, {nonTerminated: false}); + function cdataEnd(code) { + if (code === 62) { + return end(code) + } + + if (code === 93) { + effects.consume(code); + return cdataEnd + } - if (protocolless) { - url = 'http://' + url; + return cdata(code) } - exit = self.enterLink(); + function declaration(code) { + if (code === null || code === 62) { + return end(code) + } - // Temporarily remove all tokenizers except text in url. - self.inlineTokenizers = {text: tokenizers.text}; - children = self.tokenizeInline(content, eat.now()); - self.inlineTokenizers = tokenizers; + if (markdownLineEnding_1(code)) { + returnState = declaration; + return atLineEnding(code) + } - exit(); + effects.consume(code); + return declaration + } - return eat(content)({type: 'link', title: null, url: url, children: children}) -} + function instruction(code) { + if (code === null) { + return nok(code) + } -var plusSign$1 = 43; // '+' -var dash$6 = 45; // '-' -var dot$3 = 46; // '.' -var underscore$3 = 95; // '_' + if (code === 63) { + effects.consume(code); + return instructionClose + } -var email = locate$3; + if (markdownLineEnding_1(code)) { + returnState = instruction; + return atLineEnding(code) + } -// See: -function locate$3(value, fromIndex) { - var self = this; - var at; - var position; + effects.consume(code); + return instruction + } - if (!this.options.gfm) { - return -1 + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code) } - at = value.indexOf('@', fromIndex); + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code); + return tagClose + } - if (at === -1) { - return -1 + return nok(code) } - position = at; + function tagClose(code) { + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code); + return tagClose + } - if (position === fromIndex || !isGfmAtext(value.charCodeAt(position - 1))) { - return locate$3.call(self, value, at + 1) + return tagCloseBetween(code) } - while (position > fromIndex && isGfmAtext(value.charCodeAt(position - 1))) { - position--; + function tagCloseBetween(code) { + if (markdownLineEnding_1(code)) { + returnState = tagCloseBetween; + return atLineEnding(code) + } + + if (markdownSpace_1(code)) { + effects.consume(code); + return tagCloseBetween + } + + return end(code) } - return position -} + function tagOpen(code) { + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code); + return tagOpen + } -function isGfmAtext(code) { - return ( - isDecimal(code) || - isAlphabetical(code) || - code === plusSign$1 || - code === dash$6 || - code === dot$3 || - code === underscore$3 - ) -} + if (code === 47 || code === 62 || markdownLineEndingOrSpace_1(code)) { + return tagOpenBetween(code) + } -var email_1 = email$1; -email$1.locator = email; -email$1.notInLink = true; + return nok(code) + } -var plusSign$2 = 43; // '+' -var dash$7 = 45; // '-' -var dot$4 = 46; // '.' -var atSign$1 = 64; // '@' -var underscore$4 = 95; // '_' + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code); + return end + } -function email$1(eat, value, silent) { - var self = this; - var gfm = self.options.gfm; - var tokenizers = self.inlineTokenizers; - var index = 0; - var length = value.length; - var firstDot = -1; - var code; - var content; - var children; - var exit; + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code); + return tagOpenAttributeName + } - if (!gfm) { - return - } + if (markdownLineEnding_1(code)) { + returnState = tagOpenBetween; + return atLineEnding(code) + } - code = value.charCodeAt(index); + if (markdownSpace_1(code)) { + effects.consume(code); + return tagOpenBetween + } - while ( - isDecimal(code) || - isAlphabetical(code) || - code === plusSign$2 || - code === dash$7 || - code === dot$4 || - code === underscore$4 - ) { - code = value.charCodeAt(++index); + return end(code) } - if (index === 0) { - return - } + function tagOpenAttributeName(code) { + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code); + return tagOpenAttributeName + } - if (code !== atSign$1) { - return + return tagOpenAttributeNameAfter(code) } - index++; + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code); + return tagOpenAttributeValueBefore + } - while (index < length) { - code = value.charCodeAt(index); + if (markdownLineEnding_1(code)) { + returnState = tagOpenAttributeNameAfter; + return atLineEnding(code) + } + + if (markdownSpace_1(code)) { + effects.consume(code); + return tagOpenAttributeNameAfter + } + + return tagOpenBetween(code) + } + function tagOpenAttributeValueBefore(code) { if ( - isDecimal(code) || - isAlphabetical(code) || - code === dash$7 || - code === dot$4 || - code === underscore$4 + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 ) { - index++; + return nok(code) + } - if (firstDot === -1 && code === dot$4) { - firstDot = index; - } + if (code === 34 || code === 39) { + effects.consume(code); + marker = code; + return tagOpenAttributeValueQuoted + } - continue + if (markdownLineEnding_1(code)) { + returnState = tagOpenAttributeValueBefore; + return atLineEnding(code) } - break + if (markdownSpace_1(code)) { + effects.consume(code); + return tagOpenAttributeValueBefore + } + + effects.consume(code); + marker = undefined; + return tagOpenAttributeValueUnquoted } - if ( - firstDot === -1 || - firstDot === index || - code === dash$7 || - code === underscore$4 - ) { - return + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code); + return tagOpenAttributeValueQuotedAfter + } + + if (code === null) { + return nok(code) + } + + if (markdownLineEnding_1(code)) { + returnState = tagOpenAttributeValueQuoted; + return atLineEnding(code) + } + + effects.consume(code); + return tagOpenAttributeValueQuoted } - if (code === dot$4) { - index--; + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 62 || code === 47 || markdownLineEndingOrSpace_1(code)) { + return tagOpenBetween(code) + } + + return nok(code) } - content = value.slice(0, index); + function tagOpenAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 60 || + code === 61 || + code === 96 + ) { + return nok(code) + } + + if (code === 62 || markdownLineEndingOrSpace_1(code)) { + return tagOpenBetween(code) + } - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true + effects.consume(code); + return tagOpenAttributeValueUnquoted } - exit = self.enterLink(); + // We can’t have blank lines in content, so no need to worry about empty + // tokens. + function atLineEnding(code) { + effects.exit('htmlTextData'); + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + return factorySpace(effects, afterPrefix, 'linePrefix', 4) + } - // Temporarily remove all tokenizers except text in url. - self.inlineTokenizers = {text: tokenizers.text}; - children = self.tokenizeInline(content, eat.now()); - self.inlineTokenizers = tokenizers; + function afterPrefix(code) { + effects.enter('htmlTextData'); + return returnState(code) + } - exit(); + function end(code) { + if (code === 62) { + effects.consume(code); + effects.exit('htmlTextData'); + effects.exit('htmlText'); + return ok + } - return eat(content)({ - type: 'link', - title: null, - url: 'mailto:' + parseEntities_1(content, {nonTerminated: false}), - children: children - }) + return nok(code) + } } -var tag$2 = html.tag; +var htmlText = { + tokenize: tokenize$h +}; -var htmlInline = inlineHTML; -inlineHTML.locator = tag$1; +var tokenize$i = tokenizeLabelEnd; +var resolveTo$1 = resolveToLabelEnd; +var resolveAll_1$2 = resolveAllLabelEnd; -var lessThan$5 = '<'; -var questionMark$1 = '?'; -var exclamationMark$2 = '!'; -var slash$2 = '/'; -var htmlLinkOpenExpression = /^/i; -function inlineHTML(eat, value, silent) { - var self = this; - var length = value.length; - var character; - var subvalue; - if (value.charAt(0) !== lessThan$5 || length < 3) { - return - } - character = value.charAt(1); - if ( - !isAlphabetical(character) && - character !== questionMark$1 && - character !== exclamationMark$2 && - character !== slash$2 - ) { - return - } - subvalue = value.match(tag$2); - if (!subvalue) { - return - } - /* istanbul ignore if - not used yet. */ - if (silent) { - return true - } - subvalue = subvalue[0]; - if (!self.inLink && htmlLinkOpenExpression.test(subvalue)) { - self.inLink = true; - } else if (self.inLink && htmlLinkCloseExpression.test(subvalue)) { - self.inLink = false; - } - return eat(subvalue)({type: 'html', value: subvalue}) -} +var resource = {tokenize: tokenizeResource}; +var fullReference = {tokenize: tokenizeFullReference}; +var collapsedReference = {tokenize: tokenizeCollapsedReference}; -var link$2 = locate$4; +function resolveAllLabelEnd(events) { + var index = -1; + var token; -function locate$4(value, fromIndex) { - var link = value.indexOf('[', fromIndex); - var image = value.indexOf('![', fromIndex); + while (++index < events.length) { + token = events[index][1]; - if (image === -1) { - return link + if ( + !token._used && + (token.type === 'labelImage' || + token.type === 'labelLink' || + token.type === 'labelEnd') + ) { + // Remove the marker. + events.splice(index + 1, token.type === 'labelImage' ? 4 : 2); + token.type = 'data'; + index++; + } } - // Link can never be `-1` if an image is found, so we don’t need to check - // for that :) - return link < image ? link : image + return events } -var link_1 = link$3; -link$3.locator = link$2; - -var lineFeed$f = '\n'; -var exclamationMark$3 = '!'; -var quotationMark$1 = '"'; -var apostrophe$1 = "'"; -var leftParenthesis$1 = '('; -var rightParenthesis$3 = ')'; -var lessThan$6 = '<'; -var greaterThan$3 = '>'; -var leftSquareBracket$1 = '['; -var backslash$5 = '\\'; -var rightSquareBracket$1 = ']'; -var graveAccent$1 = '`'; +function resolveToLabelEnd(events, context) { + var index = events.length; + var offset = 0; + var group; + var label; + var text; + var token; + var open; + var close; + var media; -function link$3(eat, value, silent) { - var self = this; - var subvalue = ''; - var index = 0; - var character = value.charAt(0); - var pedantic = self.options.pedantic; - var commonmark = self.options.commonmark; - var gfm = self.options.gfm; - var closed; - var count; - var opening; - var beforeURL; - var beforeTitle; - var subqueue; - var hasMarker; - var isImage; - var content; - var marker; - var length; - var title; - var depth; - var queue; - var url; - var now; - var exit; - var node; + // Find an opening. + while (index--) { + token = events[index][1]; - // Detect whether this is an image. - if (character === exclamationMark$3) { - isImage = true; - subvalue = character; - character = value.charAt(++index); - } + if (open) { + // If we see another link, or inactive link label, we’ve been here before. + if ( + token.type === 'link' || + (token.type === 'labelLink' && token._inactive) + ) { + break + } - // Eat the opening. - if (character !== leftSquareBracket$1) { - return - } + // Mark other link openings as inactive, as we can’t have links in + // links. + if (events[index][0] === 'enter' && token.type === 'labelLink') { + token._inactive = true; + } + } else if (close) { + if ( + events[index][0] === 'enter' && + (token.type === 'labelImage' || token.type === 'labelLink') && + !token._balanced + ) { + open = index; - // Exit when this is a link and we’re already inside a link. - if (!isImage && self.inLink) { - return + if (token.type !== 'labelLink') { + offset = 2; + break + } + } + } else if (token.type === 'labelEnd') { + close = index; + } } - subvalue += character; - queue = ''; - index++; - - // Eat the content. - length = value.length; - now = eat.now(); - depth = 0; + group = { + type: events[open][1].type === 'labelLink' ? 'link' : 'image', + start: shallow_1(events[open][1].start), + end: shallow_1(events[events.length - 1][1].end) + }; - now.column += index; - now.offset += index; + label = { + type: 'label', + start: shallow_1(events[open][1].start), + end: shallow_1(events[close][1].end) + }; - while (index < length) { - character = value.charAt(index); - subqueue = character; + text = { + type: 'labelText', + start: shallow_1(events[open + offset + 2][1].end), + end: shallow_1(events[close - 2][1].start) + }; - if (character === graveAccent$1) { - // Inline-code in link content. - count = 1; + media = [ + ['enter', group, context], + ['enter', label, context] + ]; - while (value.charAt(index + 1) === graveAccent$1) { - subqueue += character; - index++; - count++; - } + // Opening marker. + chunkedSplice_1( + media, + media.length, + 0, + events.slice(open + 1, open + offset + 3) + ); - if (!opening) { - opening = count; - } else if (count >= opening) { - opening = 0; - } - } else if (character === backslash$5) { - // Allow brackets to be escaped. - index++; - subqueue += value.charAt(index); - } else if ((!opening || gfm) && character === leftSquareBracket$1) { - // In GFM mode, brackets in code still count. In all other modes, - // they don’t. - depth++; - } else if ((!opening || gfm) && character === rightSquareBracket$1) { - if (depth) { - depth--; - } else { - if (value.charAt(index + 1) !== leftParenthesis$1) { - return - } + // Text open. + chunkedSplice_1(media, media.length, 0, [['enter', text, context]]); + + // Between. + chunkedSplice_1( + media, + media.length, + 0, + resolveAll_1( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ); - subqueue += leftParenthesis$1; - closed = true; - index++; + // Text close, marker close, label close. + chunkedSplice_1(media, media.length, 0, [ + ['exit', text, context], + events[close - 2], + events[close - 1], + ['exit', label, context] + ]); - break - } - } + // Reference, resource, or so. + chunkedSplice_1(media, media.length, 0, events.slice(close + 1)); - queue += subqueue; - subqueue = ''; - index++; - } + // Media close. + chunkedSplice_1(media, media.length, 0, [['exit', group, context]]); - // Eat the content closing. - if (!closed) { - return - } + chunkedSplice_1(events, open, events.length, media); - content = queue; - subvalue += queue + subqueue; - index++; + return events +} - // Eat white-space. - while (index < length) { - character = value.charAt(index); +function tokenizeLabelEnd(effects, ok, nok) { + var self = this; + var index = self.events.length; + var labelStart; + var defined; - if (!isWhitespaceCharacter(character)) { + // Find an opening. + while (index--) { + if ( + (self.events[index][1].type === 'labelImage' || + self.events[index][1].type === 'labelLink') && + !self.events[index][1]._balanced + ) { + labelStart = self.events[index][1]; break } - - subvalue += character; - index++; } - // Eat the URL. - character = value.charAt(index); - queue = ''; - beforeURL = subvalue; - - if (character === lessThan$6) { - index++; - beforeURL += lessThan$6; - - while (index < length) { - character = value.charAt(index); + return start - if (character === greaterThan$3) { - break - } + function start(code) { + if (!labelStart) { + return nok(code) + } - if (commonmark && character === lineFeed$f) { - return - } + // It’s a balanced bracket, but contains a link. + if (labelStart._inactive) return balanced(code) + defined = + self.parser.defined.indexOf( + normalizeIdentifier_1( + self.sliceSerialize({start: labelStart.end, end: self.now()}) + ) + ) > -1; + effects.enter('labelEnd'); + effects.enter('labelMarker'); + effects.consume(code); + effects.exit('labelMarker'); + effects.exit('labelEnd'); + return afterLabelEnd + } - queue += character; - index++; + function afterLabelEnd(code) { + // Resource: `[asd](fgh)`. + if (code === 40) { + return effects.attempt(resource, ok, defined ? ok : balanced)(code) } - if (value.charAt(index) !== greaterThan$3) { - return + // Collapsed (`[asd][]`) or full (`[asd][fgh]`) reference? + if (code === 91) { + return effects.attempt( + fullReference, + ok, + defined ? effects.attempt(collapsedReference, ok, balanced) : balanced + )(code) } - subvalue += lessThan$6 + queue + greaterThan$3; - url = queue; - index++; - } else { - character = null; - subqueue = ''; + // Shortcut reference: `[asd]`? + return defined ? ok(code) : balanced(code) + } - while (index < length) { - character = value.charAt(index); + function balanced(code) { + labelStart._balanced = true; + return nok(code) + } +} - if ( - subqueue && - (character === quotationMark$1 || - character === apostrophe$1 || - (commonmark && character === leftParenthesis$1)) - ) { - break - } +function tokenizeResource(effects, ok, nok) { + return start - if (isWhitespaceCharacter(character)) { - if (!pedantic) { - break - } + function start(code) { + effects.enter('resource'); + effects.enter('resourceMarker'); + effects.consume(code); + effects.exit('resourceMarker'); + return factoryWhitespace(effects, open) + } - subqueue += character; - } else { - if (character === leftParenthesis$1) { - depth++; - } else if (character === rightParenthesis$3) { - if (depth === 0) { - break - } + function open(code) { + if (code === 41) { + return end(code) + } - depth--; - } + return factoryDestination( + effects, + destinationAfter, + nok, + 'resourceDestination', + 'resourceDestinationLiteral', + 'resourceDestinationLiteralMarker', + 'resourceDestinationRaw', + 'resourceDestinationString', + 3 + )(code) + } - queue += subqueue; - subqueue = ''; + function destinationAfter(code) { + return markdownLineEndingOrSpace_1(code) + ? factoryWhitespace(effects, between)(code) + : end(code) + } - if (character === backslash$5) { - queue += backslash$5; - character = value.charAt(++index); - } + function between(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + factoryWhitespace(effects, end), + nok, + 'resourceTitle', + 'resourceTitleMarker', + 'resourceTitleString' + )(code) + } - queue += character; - } + return end(code) + } - index++; + function end(code) { + if (code === 41) { + effects.enter('resourceMarker'); + effects.consume(code); + effects.exit('resourceMarker'); + effects.exit('resource'); + return ok } - subvalue += queue; - url = queue; - index = subvalue.length; + return nok(code) } +} - // Eat white-space. - queue = ''; +function tokenizeFullReference(effects, ok, nok) { + var self = this; - while (index < length) { - character = value.charAt(index); + return start - if (!isWhitespaceCharacter(character)) { - break - } + function start(code) { + return factoryLabel.call( + self, + effects, + afterLabel, + nok, + 'reference', + 'referenceMarker', + 'referenceString' + )(code) + } - queue += character; - index++; + function afterLabel(code) { + return self.parser.defined.indexOf( + normalizeIdentifier_1( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) < 0 + ? nok(code) + : ok(code) } +} - character = value.charAt(index); - subvalue += queue; +function tokenizeCollapsedReference(effects, ok, nok) { + return start - // Eat the title. - if ( - queue && - (character === quotationMark$1 || - character === apostrophe$1 || - (commonmark && character === leftParenthesis$1)) - ) { - index++; - subvalue += character; - queue = ''; - marker = character === leftParenthesis$1 ? rightParenthesis$3 : character; - beforeTitle = subvalue; - - // In commonmark-mode, things are pretty easy: the marker cannot occur - // inside the title. Non-commonmark does, however, support nested - // delimiters. - if (commonmark) { - while (index < length) { - character = value.charAt(index); - - if (character === marker) { - break - } - - if (character === backslash$5) { - queue += backslash$5; - character = value.charAt(++index); - } - - index++; - queue += character; - } - - character = value.charAt(index); - - if (character !== marker) { - return - } + function start(code) { + effects.enter('reference'); + effects.enter('referenceMarker'); + effects.consume(code); + effects.exit('referenceMarker'); + return open + } - title = queue; - subvalue += queue + character; - index++; + function open(code) { + if (code === 93) { + effects.enter('referenceMarker'); + effects.consume(code); + effects.exit('referenceMarker'); + effects.exit('reference'); + return ok + } - while (index < length) { - character = value.charAt(index); + return nok(code) + } +} - if (!isWhitespaceCharacter(character)) { - break - } +var labelEnd = { + tokenize: tokenize$i, + resolveTo: resolveTo$1, + resolveAll: resolveAll_1$2 +}; - subvalue += character; - index++; - } - } else { - subqueue = ''; +var tokenize$j = tokenizelabelImage; +var resolveAll$1 = labelEnd.resolveAll; - while (index < length) { - character = value.charAt(index); +function tokenizelabelImage(effects, ok, nok) { + var self = this; - if (character === marker) { - if (hasMarker) { - queue += marker + subqueue; - subqueue = ''; - } + return start - hasMarker = true; - } else if (!hasMarker) { - queue += character; - } else if (character === rightParenthesis$3) { - subvalue += queue + marker + subqueue; - title = queue; - break - } else if (isWhitespaceCharacter(character)) { - subqueue += character; - } else { - queue += marker + subqueue + character; - subqueue = ''; - hasMarker = false; - } + function start(code) { + effects.enter('labelImage'); + effects.enter('labelImageMarker'); + effects.consume(code); + effects.exit('labelImageMarker'); + return open + } - index++; - } + function open(code) { + if (code === 91) { + effects.enter('labelMarker'); + effects.consume(code); + effects.exit('labelMarker'); + effects.exit('labelImage'); + return after } - } - if (value.charAt(index) !== rightParenthesis$3) { - return + return nok(code) } - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true + function after(code) { + /* istanbul ignore next - footnotes. */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) } +} - subvalue += rightParenthesis$3; +var labelStartImage = { + tokenize: tokenize$j, + resolveAll: resolveAll$1 +}; - url = self.decode.raw(self.unescape(url), eat(beforeURL).test().end, { - nonTerminated: false - }); +var tokenize$k = tokenizelabelLink; +var resolveAll$2 = labelEnd.resolveAll; - if (title) { - beforeTitle = eat(beforeTitle).test().end; - title = self.decode.raw(self.unescape(title), beforeTitle); - } +function tokenizelabelLink(effects, ok, nok) { + var self = this; - node = { - type: isImage ? 'image' : 'link', - title: title || null, - url: url - }; + return start - if (isImage) { - node.alt = self.decode.raw(self.unescape(content), now) || null; - } else { - exit = self.enterLink(); - node.children = self.tokenizeInline(content, now); - exit(); + function start(code) { + effects.enter('labelLink'); + effects.enter('labelMarker'); + effects.consume(code); + effects.exit('labelMarker'); + effects.exit('labelLink'); + return after } - return eat(subvalue)(node) + function after(code) { + /* istanbul ignore next - footnotes. */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } } -var reference_1 = reference; -reference.locator = link$2; +var labelStartLink = { + tokenize: tokenize$k, + resolveAll: resolveAll$2 +}; -var link$4 = 'link'; -var image$1 = 'image'; -var shortcut = 'shortcut'; -var collapsed = 'collapsed'; -var full = 'full'; -var exclamationMark$4 = '!'; -var leftSquareBracket$2 = '['; -var backslash$6 = '\\'; -var rightSquareBracket$2 = ']'; +var tokenize$l = tokenizeSetextUnderline; +var resolveTo$2 = resolveToSetextUnderline; -function reference(eat, value, silent) { - var self = this; - var commonmark = self.options.commonmark; - var character = value.charAt(0); - var index = 0; - var length = value.length; - var subvalue = ''; - var intro = ''; - var type = link$4; - var referenceType = shortcut; - var content; - var identifier; - var now; - var node; - var exit; - var queue; - var bracketed; - var depth; - // Check whether we’re eating an image. - if (character === exclamationMark$4) { - type = image$1; - intro = character; - character = value.charAt(++index); - } - if (character !== leftSquareBracket$2) { - return - } - index++; - intro += character; - queue = ''; - // Eat the text. - depth = 0; - while (index < length) { - character = value.charAt(index); +function resolveToSetextUnderline(events, context) { + var index = events.length; + var content; + var text; + var definition; + var heading; - if (character === leftSquareBracket$2) { - bracketed = true; - depth++; - } else if (character === rightSquareBracket$2) { - if (!depth) { + // Find the opening of the content. + // It’ll always exist: we don’t tokenize if it isn’t there. + while (index--) { + if (events[index][0] === 'enter') { + if (events[index][1].type === 'content') { + content = index; break } - depth--; + if (events[index][1].type === 'paragraph') { + text = index; + } } + // Exit + else { + if (events[index][1].type === 'content') { + // Remove the content end (if needed we’ll add it later) + events.splice(index, 1); + } - if (character === backslash$6) { - queue += backslash$6; - character = value.charAt(++index); + if (!definition && events[index][1].type === 'definition') { + definition = index; + } } - - queue += character; - index++; } - subvalue = queue; - content = queue; - character = value.charAt(index); + heading = { + type: 'setextHeading', + start: shallow_1(events[text][1].start), + end: shallow_1(events[events.length - 1][1].end) + }; + + // Change the paragraph to setext heading text. + events[text][1].type = 'setextHeadingText'; - if (character !== rightSquareBracket$2) { - return + // If we have definitions in the content, we’ll keep on having content, + // but we need move it. + if (definition) { + events.splice(text, 0, ['enter', heading, context]); + events.splice(definition + 1, 0, ['exit', events[content][1], context]); + events[content][1].end = shallow_1(events[definition][1].end); + } else { + events[content][1] = heading; } - index++; - subvalue += character; - queue = ''; + // Add the heading exit at the end. + events.push(['exit', heading, context]); - if (!commonmark) { - // The original markdown syntax definition explicitly allows for whitespace - // between the link text and link label; commonmark departs from this, in - // part to improve support for shortcut reference links - while (index < length) { - character = value.charAt(index); + return events +} - if (!isWhitespaceCharacter(character)) { - break - } +function tokenizeSetextUnderline(effects, ok, nok) { + var self = this; + var index = self.events.length; + var marker; + var paragraph; - queue += character; - index++; + // Find an opening. + while (index--) { + // Skip enter/exit of line ending, line prefix, and content. + // We can now either have a definition or a paragraph. + if ( + self.events[index][1].type !== 'lineEnding' && + self.events[index][1].type !== 'linePrefix' && + self.events[index][1].type !== 'content' + ) { + paragraph = self.events[index][1].type === 'paragraph'; + break } } - character = value.charAt(index); - - if (character === leftSquareBracket$2) { - identifier = ''; - queue += character; - index++; - - while (index < length) { - character = value.charAt(index); - - if (character === leftSquareBracket$2 || character === rightSquareBracket$2) { - break - } - - if (character === backslash$6) { - identifier += backslash$6; - character = value.charAt(++index); - } + return start - identifier += character; - index++; + function start(code) { + if (!self.lazy && (self.interrupt || paragraph)) { + effects.enter('setextHeadingLine'); + effects.enter('setextHeadingLineSequence'); + marker = code; + return closingSequence(code) } - character = value.charAt(index); - - if (character === rightSquareBracket$2) { - referenceType = identifier ? full : collapsed; - queue += identifier + character; - index++; - } else { - identifier = ''; - } + return nok(code) + } - subvalue += queue; - queue = ''; - } else { - if (!content) { - return + function closingSequence(code) { + if (code === marker) { + effects.consume(code); + return closingSequence } - identifier = content; - } - - // Brackets cannot be inside the identifier. - if (referenceType !== full && bracketed) { - return + effects.exit('setextHeadingLineSequence'); + return factorySpace(effects, closingSequenceEnd, 'lineSuffix')(code) } - subvalue = intro + subvalue; - - if (type === link$4 && self.inLink) { - return null - } + function closingSequenceEnd(code) { + if (code === null || markdownLineEnding_1(code)) { + effects.exit('setextHeadingLine'); + return ok(code) + } - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true + return nok(code) } +} - now = eat.now(); - now.column += intro.length; - now.offset += intro.length; - identifier = referenceType === full ? identifier : content; +var setextUnderline = { + tokenize: tokenize$l, + resolveTo: resolveTo$2 +}; - node = { - type: type + 'Reference', - identifier: normalize_1(identifier), - label: identifier, - referenceType: referenceType - }; +var tokenize$m = tokenizeWhitespace; - if (type === link$4) { - exit = self.enterLink(); - node.children = self.tokenizeInline(content, now); - exit(); - } else { - node.alt = self.decode.raw(self.unescape(content), now) || null; - } - return eat(subvalue)(node) -} -var strong = locate$5; -function locate$5(value, fromIndex) { - var asterisk = value.indexOf('**', fromIndex); - var underscore = value.indexOf('__', fromIndex); - if (underscore === -1) { - return asterisk - } +function tokenizeWhitespace(effects, ok) { + return start - if (asterisk === -1) { - return underscore + function start(code) { + effects.enter('lineEnding'); + effects.consume(code); + effects.exit('lineEnding'); + return factorySpace(effects, ok, 'linePrefix') } - - return underscore < asterisk ? underscore : asterisk } -var strong_1 = strong$1; -strong$1.locator = strong; +var lineEnding = { + tokenize: tokenize$m +}; -var backslash$7 = '\\'; -var asterisk$3 = '*'; -var underscore$5 = '_'; +var resolveText = text.resolver; -function strong$1(eat, value, silent) { - var self = this; - var index = 0; - var character = value.charAt(index); - var now; - var pedantic; - var marker; - var queue; - var subvalue; - var length; - var previous; +var document$2 = { + 42: list, // Asterisk + 43: list, // Plus sign + 45: list, // Dash + 48: list, // 0 + 49: list, // 1 + 50: list, // 2 + 51: list, // 3 + 52: list, // 4 + 53: list, // 5 + 54: list, // 6 + 55: list, // 7 + 56: list, // 8 + 57: list, // 9 + 62: blockQuote // Greater than +}; - if ( - (character !== asterisk$3 && character !== underscore$5) || - value.charAt(++index) !== character - ) { - return - } +var contentInitial = { + 91: definition // Left square bracket +}; - pedantic = self.options.pedantic; - marker = character; - subvalue = marker + marker; - length = value.length; - index++; - queue = ''; - character = ''; +var flowInitial = { + '-2': codeIndented, // Horizontal tab + '-1': codeIndented, // Virtual space + 32: codeIndented // Space +}; - if (pedantic && isWhitespaceCharacter(value.charAt(index))) { - return - } +var flow$1 = { + 35: headingAtx, // Number sign + 42: thematicBreak, // Asterisk + 45: [setextUnderline, thematicBreak], // Dash + 60: htmlFlow, // Less than + 61: setextUnderline, // Equals to + 95: thematicBreak, // Underscore + 96: codeFenced, // Grave accent + 126: codeFenced // Tilde +}; - while (index < length) { - previous = character; - character = value.charAt(index); +var string$1 = { + 38: characterReference, // Ampersand + 92: characterEscape // Backslash +}; - if ( - character === marker && - value.charAt(index + 1) === marker && - (!pedantic || !isWhitespaceCharacter(previous)) - ) { - character = value.charAt(index + 2); +var text$1 = { + '-5': lineEnding, // Carriage return + '-4': lineEnding, // Line feed + '-3': lineEnding, // Carriage return + line feed + 33: labelStartImage, // Exclamation mark + 38: characterReference, // Ampersand + 42: attention, // Asterisk + 60: [autolink, htmlText], // Less than + 91: labelStartLink, // Left square bracket + 92: [hardBreakEscape, characterEscape], // Backslash + 93: labelEnd, // Right square bracket + 95: attention, // Underscore + 96: codeText // Grave accent +}; - if (character !== marker) { - if (!trim_1(queue)) { - return - } +var insideSpan = { + null: [attention, resolveText] +}; - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true - } +var constructs = { + document: document$2, + contentInitial: contentInitial, + flowInitial: flowInitial, + flow: flow$1, + string: string$1, + text: text$1, + insideSpan: insideSpan +}; + +var serializeChunks_1 = serializeChunks; - now = eat.now(); - now.column += 2; - now.offset += 2; - return eat(subvalue + queue + subvalue)({ - type: 'strong', - children: self.tokenizeInline(queue, now) - }) - } - } - if (!pedantic && character === backslash$7) { - queue += character; - character = value.charAt(++index); +function serializeChunks(chunks) { + var index = -1; + var result = []; + var chunk; + var value; + var atTab; + + while (++index < chunks.length) { + chunk = chunks[index]; + + if (typeof chunk === 'string') { + value = chunk; + } else if (chunk === -5) { + value = '\r'; + } else if (chunk === -4) { + value = '\n'; + } else if (chunk === -3) { + value = '\r' + '\n'; + } else if (chunk === -2) { + value = '\t'; + } else if (chunk === -1) { + if (atTab) continue + value = ' '; + } else { + // Currently only replacement character. + value = fromCharCode(chunk); } - queue += character; - index++; + atTab = chunk === -2; + result.push(value); } -} -var isWordCharacter = wordCharacter; + return result.join('') +} -var fromCode$1 = String.fromCharCode; -var re$2 = /\w/; +var sliceChunks_1 = sliceChunks; -// Check if the given character code, or the character code at the first -// character, is a word character. -function wordCharacter(character) { - return re$2.test( - typeof character === 'number' ? fromCode$1(character) : character.charAt(0) - ) -} +function sliceChunks(chunks, token) { + var startIndex = token.start._index; + var startBufferIndex = token.start._bufferIndex; + var endIndex = token.end._index; + var endBufferIndex = token.end._bufferIndex; + var view; -var emphasis = locate$6; + if (startIndex === endIndex) { + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]; + } else { + view = chunks.slice(startIndex, endIndex); -function locate$6(value, fromIndex) { - var asterisk = value.indexOf('*', fromIndex); - var underscore = value.indexOf('_', fromIndex); + if (startBufferIndex > -1) { + view[0] = view[0].slice(startBufferIndex); + } - if (underscore === -1) { - return asterisk + if (endBufferIndex > 0) { + view.push(chunks[endIndex].slice(0, endBufferIndex)); + } } - if (asterisk === -1) { - return underscore - } + return view +} + +var miniflat_1 = miniflat; - return underscore < asterisk ? underscore : asterisk +function miniflat(value) { + return value === null || value === undefined + ? [] + : 'length' in value + ? value + : [value] } -var emphasis_1 = emphasis$1; -emphasis$1.locator = emphasis; +var createTokenizer_1 = createTokenizer; -var asterisk$4 = '*'; -var underscore$6 = '_'; -var backslash$8 = '\\'; -function emphasis$1(eat, value, silent) { - var self = this; - var index = 0; - var character = value.charAt(index); - var now; - var pedantic; - var marker; - var queue; - var subvalue; - var length; - var previous; - if (character !== asterisk$4 && character !== underscore$6) { - return - } - pedantic = self.options.pedantic; - subvalue = character; - marker = character; - length = value.length; - index++; - queue = ''; - character = ''; - if (pedantic && isWhitespaceCharacter(value.charAt(index))) { - return - } - while (index < length) { - previous = character; - character = value.charAt(index); - if (character === marker && (!pedantic || !isWhitespaceCharacter(previous))) { - character = value.charAt(++index); - if (character !== marker) { - if (!trim_1(queue) || previous === marker) { - return - } - if (!pedantic && marker === underscore$6 && isWordCharacter(character)) { - queue += marker; - continue - } - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true - } - now = eat.now(); - now.column++; - now.offset++; +// Create a tokenizer. +// Tokenizers deal with one type of data (e.g., containers, flow, text). +// The parser is the object dealing with it all. +// `initialize` works like other constructs, except that only its `tokenize` +// function is used, in which case it doesn’t receive an `ok` or `nok`. +// `from` can be given to set the point before the first character, although +// when further lines are indented, they must be set with `defineSkip`. +function createTokenizer(parser, initialize, from) { + var point = from ? shallow_1(from) : {line: 1, column: 1, offset: 0}; + var columnStart = {}; + var resolveAllConstructs = []; + var chunks = []; + var stack = []; - return eat(subvalue + queue + marker)({ - type: 'emphasis', - children: self.tokenizeInline(queue, now) - }) - } + // Tools used for tokenizing. + var effects = { + consume: consume, + enter: enter, + exit: exit, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, {interrupt: true}), + lazy: constructFactory(onsuccessfulcheck, {lazy: true}) + }; - queue += marker; - } + // State and tools for resolving and serializing. + var context = { + previous: null, + events: [], + parser: parser, + sliceStream: sliceStream, + sliceSerialize: sliceSerialize, + now: now, + defineSkip: skip, + write: write + }; - if (!pedantic && character === backslash$8) { - queue += character; - character = value.charAt(++index); - } + // The state function. + var state = initialize.tokenize.call(context, effects); - queue += character; - index++; + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize); } -} -var _delete = locate$7; + // Store where we are in the input stream. + point._index = 0; + point._bufferIndex = -1; -function locate$7(value, fromIndex) { - return value.indexOf('~~', fromIndex) -} + return context -var _delete$1 = strikethrough; -strikethrough.locator = _delete; + function write(slice) { + chunkedSplice_1(chunks, chunks.length, 0, slice); -var tilde$3 = '~'; -var fence = '~~'; + main(); -function strikethrough(eat, value, silent) { - var self = this; - var character = ''; - var previous = ''; - var preceding = ''; - var subvalue = ''; - var index; - var length; - var now; + // Exit if we’re not done, resolve might change stuff. + if (chunks[chunks.length - 1] !== null) { + return [] + } - if ( - !self.options.gfm || - value.charAt(0) !== tilde$3 || - value.charAt(1) !== tilde$3 || - isWhitespaceCharacter(value.charAt(2)) - ) { - return + addResult(initialize, 0); + + // Otherwise, resolve, and exit. + context.events = resolveAll_1(resolveAllConstructs, context.events, context); + + return context.events } - index = 1; - length = value.length; - now = eat.now(); - now.column += 2; - now.offset += 2; + // + // Tools. + // - while (++index < length) { - character = value.charAt(index); + function sliceSerialize(token) { + return serializeChunks_1(sliceStream(token)) + } - if ( - character === tilde$3 && - previous === tilde$3 && - (!preceding || !isWhitespaceCharacter(preceding)) - ) { - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true - } + function sliceStream(token) { + return sliceChunks_1(chunks, token) + } - return eat(fence + subvalue + fence)({ - type: 'delete', - children: self.tokenizeInline(subvalue, now) - }) - } + function now() { + return shallow_1(point) + } - subvalue += previous; - preceding = previous; - previous = character; + function skip(value) { + columnStart[value.line] = value.column; + accountForPotentialSkip(); } -} -var codeInline = locate$8; + // + // State management. + // -function locate$8(value, fromIndex) { - return value.indexOf('`', fromIndex) -} + // Main loop (note that `_index` and `_bufferIndex` in `point` are modified by + // `consume`). + // Here is where we walk through the chunks, which either include strings of + // several characters, or numerical character codes. + // The reason to do this in a loop instead of a call is so the stack can + // drain. + function main() { + var chunkIndex; + var chunk; -var codeInline$1 = inlineCode; -inlineCode.locator = codeInline; + while (point._index < chunks.length) { + chunk = chunks[point._index]; -var lineFeed$g = 10; // '\n' -var space$e = 32; // ' ' -var graveAccent$2 = 96; // '`' + // If we’re in a buffer chunk, loop through it. + if (typeof chunk === 'string') { + chunkIndex = point._index; -function inlineCode(eat, value, silent) { - var length = value.length; - var index = 0; - var openingFenceEnd; - var closingFenceStart; - var closingFenceEnd; - var code; - var next; - var found; + if (point._bufferIndex < 0) { + point._bufferIndex = 0; + } - while (index < length) { - if (value.charCodeAt(index) !== graveAccent$2) { - break + while ( + point._index === chunkIndex && + point._bufferIndex < chunk.length + ) { + go(chunk.charCodeAt(point._bufferIndex)); + } + } else { + go(chunk); + } } - - index++; } - if (index === 0 || index === length) { - return + // Deal with one code. + function go(code) { + state = state(code); } - openingFenceEnd = index; - next = value.charCodeAt(index); - - while (index < length) { - code = next; - next = value.charCodeAt(index + 1); - - if (code === graveAccent$2) { - if (closingFenceStart === undefined) { - closingFenceStart = index; - } + // Move a character forward. + function consume(code) { + if (markdownLineEnding_1(code)) { + point.line++; + point.column = 1; + point.offset += code === -3 ? 2 : 1; + accountForPotentialSkip(); + } else if (code !== -1) { + point.column++; + point.offset++; + } - closingFenceEnd = index + 1; + // Not in a string chunk. + if (point._bufferIndex < 0) { + point._index++; + } else { + point._bufferIndex++; - if ( - next !== graveAccent$2 && - closingFenceEnd - closingFenceStart === openingFenceEnd - ) { - found = true; - break + // At end of string chunk. + if (point._bufferIndex === chunks[point._index].length) { + point._bufferIndex = -1; + point._index++; } - } else if (closingFenceStart !== undefined) { - closingFenceStart = undefined; - closingFenceEnd = undefined; } - index++; + // Expose the previous character. + context.previous = code; } - if (!found) { - return - } + // Start a token. + function enter(type, fields) { + var token = fields || {}; + token.type = type; + token.start = now(); - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true - } + context.events.push(['enter', token, context]); - // Remove the initial and final space (or line feed), iff they exist and there - // are non-space characters in the content. - index = openingFenceEnd; - length = closingFenceStart; - code = value.charCodeAt(index); - next = value.charCodeAt(length - 1); - found = false; + stack.push(token); - if ( - length - index > 2 && - (code === space$e || code === lineFeed$g) && - (next === space$e || next === lineFeed$g) - ) { - index++; - length--; + return token + } - while (index < length) { - code = value.charCodeAt(index); + // Stop a token. + function exit(type) { + var token = stack.pop(); + token.end = now(); - if (code !== space$e && code !== lineFeed$g) { - found = true; - break - } + context.events.push(['exit', token, context]); - index++; - } + return token + } - if (found === true) { - openingFenceEnd++; - closingFenceStart--; - } + // Use results. + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from); } - return eat(value.slice(0, closingFenceEnd))({ - type: 'inlineCode', - value: value.slice(openingFenceEnd, closingFenceStart) - }) -} + // Discard results. + function onsuccessfulcheck(construct, info) { + info.restore(); + } -var _break = locate$9; + // Factory to attempt/check/interrupt. + function constructFactory(onreturn, fields) { + return hook -function locate$9(value, fromIndex) { - var index = value.indexOf('\n', fromIndex); + // Handle either an object mapping codes to constructs, a list of + // constructs, or a single construct. + function hook(constructs, returnState, bogusState) { + var listOfConstructs; + var constructIndex; + var currentConstruct; + var info; - while (index > fromIndex) { - if (value.charAt(index - 1) !== ' ') { - break - } + return constructs.tokenize || 'length' in constructs + ? handleListOfConstructs(miniflat_1(constructs)) + : handleMapOfConstructs - index--; - } + function handleMapOfConstructs(code) { + if (code in constructs || null in constructs) { + return handleListOfConstructs( + /* istanbul ignore next - `null` is used by some extensions */ + constructs.null + ? miniflat_1(constructs[code]).concat(miniflat_1(constructs.null)) + : constructs[code] + )(code) + } - return index -} + return bogusState(code) + } -var _break$1 = hardBreak; -hardBreak.locator = _break; + function handleListOfConstructs(list) { + listOfConstructs = list; + constructIndex = 0; + return handleConstruct(list[constructIndex]) + } -var space$f = ' '; -var lineFeed$h = '\n'; -var minBreakLength = 2; + function handleConstruct(construct) { + return start -function hardBreak(eat, value, silent) { - var length = value.length; - var index = -1; - var queue = ''; - var character; + function start(code) { + // To do: not nede to store if there is no bogus state, probably? + // Currently doesn’t work because `inspect` in document does a check + // w/o a bogus, which doesn’t make sense. But it does seem to help perf + // by not storing. + info = store(); + currentConstruct = construct; - while (++index < length) { - character = value.charAt(index); + if (!construct.partial) { + context.currentConstruct = construct; + } - if (character === lineFeed$h) { - if (index < minBreakLength) { - return + return construct.tokenize.call( + fields ? assign({}, context, fields) : context, + effects, + ok, + nok + )(code) + } } - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true + function ok(code) { + onreturn(currentConstruct, info); + return returnState } - queue += character; + function nok(code) { + info.restore(); - return eat(queue)({type: 'break'}) - } + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]) + } - if (character !== space$f) { - return + return bogusState + } } - - queue += character; - } -} - -var text_1 = text; - -function text(eat, value, silent) { - var self = this; - var methods; - var tokenizers; - var index; - var length; - var subvalue; - var position; - var tokenizer; - var name; - var min; - var now; - - /* istanbul ignore if - never used (yet) */ - if (silent) { - return true } - methods = self.inlineMethods; - length = methods.length; - tokenizers = self.inlineTokenizers; - index = -1; - min = value.length; - - while (++index < length) { - name = methods[index]; - - if (name === 'text' || !tokenizers[name]) { - continue + function addResult(construct, from) { + if (construct.resolveAll && resolveAllConstructs.indexOf(construct) < 0) { + resolveAllConstructs.push(construct); } - tokenizer = tokenizers[name].locator; - - if (!tokenizer) { - eat.file.fail('Missing locator: `' + name + '`'); + if (construct.resolve) { + chunkedSplice_1( + context.events, + from, + context.events.length - from, + construct.resolve(context.events.slice(from), context) + ); } - position = tokenizer.call(self, value, 1); - - if (position !== -1 && position < min) { - min = position; + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context); } } - subvalue = value.slice(0, min); - now = eat.now(); + function store() { + var startPoint = now(); + var startPrevious = context.previous; + var startCurrentConstruct = context.currentConstruct; + var startEventsIndex = context.events.length; + var startStack = Array.from(stack); - self.decode(subvalue, now, handler); + return {restore: restore, from: startEventsIndex} - function handler(content, position, source) { - eat(source || content)({type: 'text', value: content}); + function restore() { + point = startPoint; + context.previous = startPrevious; + context.currentConstruct = startCurrentConstruct; + context.events.length = startEventsIndex; + stack = startStack; + accountForPotentialSkip(); + } + } + + function accountForPotentialSkip() { + if (point.line in columnStart && point.column < 2) { + point.column = columnStart[point.line]; + point.offset += columnStart[point.line] - 1; + } } } -var parser = Parser; +var combineExtensions_1 = combineExtensions; -function Parser(doc, file) { - this.file = file; - this.offset = {}; - this.options = immutable(this.options); - this.setOptions({}); - this.inList = false; - this.inBlock = false; - this.inLink = false; - this.atStart = true; - this.toOffset = vfileLocation(file).toOffset; - this.unescape = _unescape(this, 'escape'); - this.decode = decode(this); -} -var proto$4 = Parser.prototype; -// Expose core. -proto$4.setOptions = setOptions_1; -proto$4.parse = parse_1$3; +// Combine several syntax extensions into one. +function combineExtensions(extensions) { + var all = {}; + var index = -1; -// Expose `defaults`. -proto$4.options = defaults$2; + while (++index < extensions.length) { + extension$1(all, extensions[index]); + } -// Enter and exit helpers. -proto$4.exitStart = stateToggle('atStart', true); -proto$4.enterList = stateToggle('inList', false); -proto$4.enterLink = stateToggle('inLink', false); -proto$4.enterBlock = stateToggle('inBlock', false); + return all +} -// Nodes that can interupt a paragraph: -// -// ```markdown -// A paragraph, followed by a thematic break. -// ___ -// ``` -// -// In the above example, the thematic break “interupts” the paragraph. -proto$4.interruptParagraph = [ - ['thematicBreak'], - ['list'], - ['atxHeading'], - ['fencedCode'], - ['blockquote'], - ['html'], - ['setextHeading', {commonmark: false}], - ['definition', {commonmark: false}] -]; +function extension$1(all, extension) { + var hook; + var left; + var right; + var code; -// Nodes that can interupt a list: -// -// ```markdown -// - One -// ___ -// ``` -// -// In the above example, the thematic break “interupts” the list. -proto$4.interruptList = [ - ['atxHeading', {pedantic: false}], - ['fencedCode', {pedantic: false}], - ['thematicBreak', {pedantic: false}], - ['definition', {commonmark: false}] -]; + for (hook in extension) { + left = hasOwnProperty_1.call(all, hook) ? all[hook] : (all[hook] = {}); + right = extension[hook]; -// Nodes that can interupt a blockquote: -// -// ```markdown -// > A paragraph. -// ___ -// ``` -// -// In the above example, the thematic break “interupts” the blockquote. -proto$4.interruptBlockquote = [ - ['indentedCode', {commonmark: true}], - ['fencedCode', {commonmark: true}], - ['atxHeading', {commonmark: true}], - ['setextHeading', {commonmark: true}], - ['thematicBreak', {commonmark: true}], - ['html', {commonmark: true}], - ['list', {commonmark: true}], - ['definition', {commonmark: false}] -]; + for (code in right) { + left[code] = constructs$1( + miniflat_1(right[code]), + hasOwnProperty_1.call(left, code) ? left[code] : [] + ); + } + } +} -// Handlers. -proto$4.blockTokenizers = { - blankLine: blankLine_1, - indentedCode: codeIndented, - fencedCode: codeFenced, - blockquote: blockquote_1, - atxHeading: headingAtx, - thematicBreak: thematicBreak_1, - list: list_1, - setextHeading: headingSetext, - html: htmlBlock, - definition: definition_1, - table: table_1, - paragraph: paragraph_1 -}; - -proto$4.inlineTokenizers = { - escape: _escape$1, - autoLink: autoLink_1, - url: url_1, - email: email_1, - html: htmlInline, - link: link_1, - reference: reference_1, - strong: strong_1, - emphasis: emphasis_1, - deletion: _delete$1, - code: codeInline$1, - break: _break$1, - text: text_1 -}; - -// Expose precedence. -proto$4.blockMethods = keys$1(proto$4.blockTokenizers); -proto$4.inlineMethods = keys$1(proto$4.inlineTokenizers); - -// Tokenizers. -proto$4.tokenizeBlock = tokenizer('block'); -proto$4.tokenizeInline = tokenizer('inline'); -proto$4.tokenizeFactory = tokenizer; - -// Get all keys in `value`. -function keys$1(value) { - var result = []; - var key; +function constructs$1(list, existing) { + var index = -1; + var before = []; - for (key in value) { - result.push(key); + while (++index < list.length) { +(list[index].add === 'after' ? existing : before).push(list[index]); } - return result + chunkedSplice_1(existing, 0, 0, before); + return existing } -var remarkParse = parse$a; -parse$a.Parser = parser; +var parse$8 = createParser; -function parse$a(options) { - var settings = this.data('settings'); - var Local = unherit_1(parser); - Local.prototype.options = immutable(Local.prototype.options, settings, options); - this.Parser = Local; -} -var identity_1 = identity; -function identity(value) { - return value -} -var enterLinkReference = enter; -// Shortcut and collapsed link references need no escaping and encoding during -// the processing of child nodes (it must be implied from identifier). -// -// This toggler turns encoding and escaping off for shortcut and collapsed -// references. -// -// Implies `enterLink`. -function enter(compiler, node) { - var encode = compiler.encode; - var escape = compiler.escape; - var exitLink = compiler.enterLink(); - - if (node.referenceType !== 'shortcut' && node.referenceType !== 'collapsed') { - return exitLink - } - - compiler.escape = identity_1; - compiler.encode = identity_1; - - return exit - - function exit() { - compiler.encode = encode; - compiler.escape = escape; - exitLink(); - } -} - -var defaults$3 = { - gfm: true, - commonmark: false, - pedantic: false, - entities: 'false', - setext: false, - closeAtx: false, - tableCellPadding: true, - tablePipeAlign: true, - stringLength: stringLength, - incrementListMarker: true, - tightDefinitions: false, - fences: false, - fence: '`', - bullet: '-', - listItemIndent: 'tab', - rule: '*', - ruleSpaces: true, - ruleRepetition: 3, - strong: '*', - emphasis: '_' -}; - -function stringLength(value) { - return value.length -} -const nbsp$2 = " "; -const iexcl$2 = "¡"; -const cent$2 = "¢"; -const pound$2 = "£"; -const curren$2 = "¤"; -const yen$2 = "¥"; -const brvbar$2 = "¦"; -const sect$2 = "§"; -const uml$2 = "¨"; -const copy$3 = "©"; -const ordf$2 = "ª"; -const laquo$2 = "«"; -const not$2 = "¬"; -const shy$2 = "­"; -const reg$2 = "®"; -const macr$2 = "¯"; -const deg$2 = "°"; -const plusmn$2 = "±"; -const sup2$2 = "²"; -const sup3$2 = "³"; -const acute$2 = "´"; -const micro$2 = "µ"; -const para$2 = "¶"; -const middot$2 = "·"; -const cedil$2 = "¸"; -const sup1$2 = "¹"; -const ordm$2 = "º"; -const raquo$2 = "»"; -const frac14$2 = "¼"; -const frac12$2 = "½"; -const frac34$2 = "¾"; -const iquest$2 = "¿"; -const Agrave$2 = "À"; -const Aacute$2 = "Á"; -const Acirc$2 = "Â"; -const Atilde$2 = "Ã"; -const Auml$2 = "Ä"; -const Aring$2 = "Å"; -const AElig$2 = "Æ"; -const Ccedil$2 = "Ç"; -const Egrave$2 = "È"; -const Eacute$2 = "É"; -const Ecirc$2 = "Ê"; -const Euml$2 = "Ë"; -const Igrave$2 = "Ì"; -const Iacute$2 = "Í"; -const Icirc$2 = "Î"; -const Iuml$2 = "Ï"; -const ETH$2 = "Ð"; -const Ntilde$2 = "Ñ"; -const Ograve$2 = "Ò"; -const Oacute$2 = "Ó"; -const Ocirc$2 = "Ô"; -const Otilde$2 = "Õ"; -const Ouml$2 = "Ö"; -const times$2 = "×"; -const Oslash$2 = "Ø"; -const Ugrave$2 = "Ù"; -const Uacute$2 = "Ú"; -const Ucirc$2 = "Û"; -const Uuml$2 = "Ü"; -const Yacute$2 = "Ý"; -const THORN$2 = "Þ"; -const szlig$2 = "ß"; -const agrave$2 = "à"; -const aacute$2 = "á"; -const acirc$2 = "â"; -const atilde$2 = "ã"; -const auml$2 = "ä"; -const aring$2 = "å"; -const aelig$2 = "æ"; -const ccedil$2 = "ç"; -const egrave$2 = "è"; -const eacute$2 = "é"; -const ecirc$2 = "ê"; -const euml$2 = "ë"; -const igrave$2 = "ì"; -const iacute$2 = "í"; -const icirc$2 = "î"; -const iuml$2 = "ï"; -const eth$2 = "ð"; -const ntilde$2 = "ñ"; -const ograve$2 = "ò"; -const oacute$2 = "ó"; -const ocirc$2 = "ô"; -const otilde$2 = "õ"; -const ouml$2 = "ö"; -const divide$2 = "÷"; -const oslash$2 = "ø"; -const ugrave$2 = "ù"; -const uacute$2 = "ú"; -const ucirc$2 = "û"; -const uuml$2 = "ü"; -const yacute$2 = "ý"; -const thorn$2 = "þ"; -const yuml$2 = "ÿ"; -const fnof$1 = "ƒ"; -const Alpha$1 = "Α"; -const Beta$1 = "Β"; -const Gamma$1 = "Γ"; -const Delta$1 = "Δ"; -const Epsilon$1 = "Ε"; -const Zeta$1 = "Ζ"; -const Eta$1 = "Η"; -const Theta$1 = "Θ"; -const Iota$1 = "Ι"; -const Kappa$1 = "Κ"; -const Lambda$1 = "Λ"; -const Mu$1 = "Μ"; -const Nu$1 = "Ν"; -const Xi$1 = "Ξ"; -const Omicron$1 = "Ο"; -const Pi$1 = "Π"; -const Rho$1 = "Ρ"; -const Sigma$1 = "Σ"; -const Tau$1 = "Τ"; -const Upsilon$1 = "Υ"; -const Phi$1 = "Φ"; -const Chi$1 = "Χ"; -const Psi$1 = "Ψ"; -const Omega$1 = "Ω"; -const alpha$1 = "α"; -const beta$1 = "β"; -const gamma$1 = "γ"; -const delta$1 = "δ"; -const epsilon$1 = "ε"; -const zeta$1 = "ζ"; -const eta$1 = "η"; -const theta$1 = "θ"; -const iota$1 = "ι"; -const kappa$1 = "κ"; -const lambda$1 = "λ"; -const mu$1 = "μ"; -const nu$1 = "ν"; -const xi$1 = "ξ"; -const omicron$1 = "ο"; -const pi$1 = "π"; -const rho$1 = "ρ"; -const sigmaf$1 = "ς"; -const sigma$1 = "σ"; -const tau$1 = "τ"; -const upsilon$1 = "υ"; -const phi$1 = "φ"; -const chi$1 = "χ"; -const psi$1 = "ψ"; -const omega$1 = "ω"; -const thetasym$1 = "ϑ"; -const upsih$1 = "ϒ"; -const piv$1 = "ϖ"; -const bull$1 = "•"; -const hellip$1 = "…"; -const prime$1 = "′"; -const Prime$1 = "″"; -const oline$1 = "‾"; -const frasl$1 = "⁄"; -const weierp$1 = "℘"; -const image$2 = "ℑ"; -const real$1 = "ℜ"; -const trade$1 = "™"; -const alefsym$1 = "ℵ"; -const larr$1 = "←"; -const uarr$1 = "↑"; -const rarr$1 = "→"; -const darr$1 = "↓"; -const harr$1 = "↔"; -const crarr$1 = "↵"; -const lArr$1 = "⇐"; -const uArr$1 = "⇑"; -const rArr$1 = "⇒"; -const dArr$1 = "⇓"; -const hArr$1 = "⇔"; -const forall$1 = "∀"; -const part$1 = "∂"; -const exist$1 = "∃"; -const empty$1 = "∅"; -const nabla$1 = "∇"; -const isin$1 = "∈"; -const notin$1 = "∉"; -const ni$1 = "∋"; -const prod$1 = "∏"; -const sum$1 = "∑"; -const minus$1 = "−"; -const lowast$1 = "∗"; -const radic$1 = "√"; -const prop$1 = "∝"; -const infin$1 = "∞"; -const ang$1 = "∠"; -const and$1 = "∧"; -const or$1 = "∨"; -const cap$1 = "∩"; -const cup$1 = "∪"; -const int$1 = "∫"; -const there4$1 = "∴"; -const sim$1 = "∼"; -const cong$1 = "≅"; -const asymp$1 = "≈"; -const ne$1 = "≠"; -const equiv$1 = "≡"; -const le$1 = "≤"; -const ge$1 = "≥"; -const sub$1 = "⊂"; -const sup$1 = "⊃"; -const nsub$1 = "⊄"; -const sube$1 = "⊆"; -const supe$1 = "⊇"; -const oplus$1 = "⊕"; -const otimes$1 = "⊗"; -const perp$1 = "⊥"; -const sdot$1 = "⋅"; -const lceil$1 = "⌈"; -const rceil$1 = "⌉"; -const lfloor$1 = "⌊"; -const rfloor$1 = "⌋"; -const lang$1 = "〈"; -const rang$1 = "〉"; -const loz$1 = "◊"; -const spades$1 = "♠"; -const clubs$1 = "♣"; -const hearts$1 = "♥"; -const diams$1 = "♦"; -const quot$2 = "\""; -const amp$2 = "&"; -const lt$2 = "<"; -const gt$2 = ">"; -const OElig$1 = "Œ"; -const oelig$1 = "œ"; -const Scaron$1 = "Š"; -const scaron$1 = "š"; -const Yuml$1 = "Ÿ"; -const circ$1 = "ˆ"; -const tilde$4 = "˜"; -const ensp$1 = " "; -const emsp$1 = " "; -const thinsp$1 = " "; -const zwnj$1 = "‌"; -const zwj$1 = "‍"; -const lrm$1 = "‎"; -const rlm$1 = "‏"; -const ndash$1 = "–"; -const mdash$1 = "—"; -const lsquo$1 = "‘"; -const rsquo$1 = "’"; -const sbquo$1 = "‚"; -const ldquo$1 = "“"; -const rdquo$1 = "”"; -const bdquo$1 = "„"; -const dagger$1 = "†"; -const Dagger$1 = "‡"; -const permil$1 = "‰"; -const lsaquo$1 = "‹"; -const rsaquo$1 = "›"; -const euro$1 = "€"; -var index$4 = { - nbsp: nbsp$2, - iexcl: iexcl$2, - cent: cent$2, - pound: pound$2, - curren: curren$2, - yen: yen$2, - brvbar: brvbar$2, - sect: sect$2, - uml: uml$2, - copy: copy$3, - ordf: ordf$2, - laquo: laquo$2, - not: not$2, - shy: shy$2, - reg: reg$2, - macr: macr$2, - deg: deg$2, - plusmn: plusmn$2, - sup2: sup2$2, - sup3: sup3$2, - acute: acute$2, - micro: micro$2, - para: para$2, - middot: middot$2, - cedil: cedil$2, - sup1: sup1$2, - ordm: ordm$2, - raquo: raquo$2, - frac14: frac14$2, - frac12: frac12$2, - frac34: frac34$2, - iquest: iquest$2, - Agrave: Agrave$2, - Aacute: Aacute$2, - Acirc: Acirc$2, - Atilde: Atilde$2, - Auml: Auml$2, - Aring: Aring$2, - AElig: AElig$2, - Ccedil: Ccedil$2, - Egrave: Egrave$2, - Eacute: Eacute$2, - Ecirc: Ecirc$2, - Euml: Euml$2, - Igrave: Igrave$2, - Iacute: Iacute$2, - Icirc: Icirc$2, - Iuml: Iuml$2, - ETH: ETH$2, - Ntilde: Ntilde$2, - Ograve: Ograve$2, - Oacute: Oacute$2, - Ocirc: Ocirc$2, - Otilde: Otilde$2, - Ouml: Ouml$2, - times: times$2, - Oslash: Oslash$2, - Ugrave: Ugrave$2, - Uacute: Uacute$2, - Ucirc: Ucirc$2, - Uuml: Uuml$2, - Yacute: Yacute$2, - THORN: THORN$2, - szlig: szlig$2, - agrave: agrave$2, - aacute: aacute$2, - acirc: acirc$2, - atilde: atilde$2, - auml: auml$2, - aring: aring$2, - aelig: aelig$2, - ccedil: ccedil$2, - egrave: egrave$2, - eacute: eacute$2, - ecirc: ecirc$2, - euml: euml$2, - igrave: igrave$2, - iacute: iacute$2, - icirc: icirc$2, - iuml: iuml$2, - eth: eth$2, - ntilde: ntilde$2, - ograve: ograve$2, - oacute: oacute$2, - ocirc: ocirc$2, - otilde: otilde$2, - ouml: ouml$2, - divide: divide$2, - oslash: oslash$2, - ugrave: ugrave$2, - uacute: uacute$2, - ucirc: ucirc$2, - uuml: uuml$2, - yacute: yacute$2, - thorn: thorn$2, - yuml: yuml$2, - fnof: fnof$1, - Alpha: Alpha$1, - Beta: Beta$1, - Gamma: Gamma$1, - Delta: Delta$1, - Epsilon: Epsilon$1, - Zeta: Zeta$1, - Eta: Eta$1, - Theta: Theta$1, - Iota: Iota$1, - Kappa: Kappa$1, - Lambda: Lambda$1, - Mu: Mu$1, - Nu: Nu$1, - Xi: Xi$1, - Omicron: Omicron$1, - Pi: Pi$1, - Rho: Rho$1, - Sigma: Sigma$1, - Tau: Tau$1, - Upsilon: Upsilon$1, - Phi: Phi$1, - Chi: Chi$1, - Psi: Psi$1, - Omega: Omega$1, - alpha: alpha$1, - beta: beta$1, - gamma: gamma$1, - delta: delta$1, - epsilon: epsilon$1, - zeta: zeta$1, - eta: eta$1, - theta: theta$1, - iota: iota$1, - kappa: kappa$1, - lambda: lambda$1, - mu: mu$1, - nu: nu$1, - xi: xi$1, - omicron: omicron$1, - pi: pi$1, - rho: rho$1, - sigmaf: sigmaf$1, - sigma: sigma$1, - tau: tau$1, - upsilon: upsilon$1, - phi: phi$1, - chi: chi$1, - psi: psi$1, - omega: omega$1, - thetasym: thetasym$1, - upsih: upsih$1, - piv: piv$1, - bull: bull$1, - hellip: hellip$1, - prime: prime$1, - Prime: Prime$1, - oline: oline$1, - frasl: frasl$1, - weierp: weierp$1, - image: image$2, - real: real$1, - trade: trade$1, - alefsym: alefsym$1, - larr: larr$1, - uarr: uarr$1, - rarr: rarr$1, - darr: darr$1, - harr: harr$1, - crarr: crarr$1, - lArr: lArr$1, - uArr: uArr$1, - rArr: rArr$1, - dArr: dArr$1, - hArr: hArr$1, - forall: forall$1, - part: part$1, - exist: exist$1, - empty: empty$1, - nabla: nabla$1, - isin: isin$1, - notin: notin$1, - ni: ni$1, - prod: prod$1, - sum: sum$1, - minus: minus$1, - lowast: lowast$1, - radic: radic$1, - prop: prop$1, - infin: infin$1, - ang: ang$1, - and: and$1, - or: or$1, - cap: cap$1, - cup: cup$1, - int: int$1, - there4: there4$1, - sim: sim$1, - cong: cong$1, - asymp: asymp$1, - ne: ne$1, - equiv: equiv$1, - le: le$1, - ge: ge$1, - sub: sub$1, - sup: sup$1, - nsub: nsub$1, - sube: sube$1, - supe: supe$1, - oplus: oplus$1, - otimes: otimes$1, - perp: perp$1, - sdot: sdot$1, - lceil: lceil$1, - rceil: rceil$1, - lfloor: lfloor$1, - rfloor: rfloor$1, - lang: lang$1, - rang: rang$1, - loz: loz$1, - spades: spades$1, - clubs: clubs$1, - hearts: hearts$1, - diams: diams$1, - quot: quot$2, - amp: amp$2, - lt: lt$2, - gt: gt$2, - OElig: OElig$1, - oelig: oelig$1, - Scaron: Scaron$1, - scaron: scaron$1, - Yuml: Yuml$1, - circ: circ$1, - tilde: tilde$4, - ensp: ensp$1, - emsp: emsp$1, - thinsp: thinsp$1, - zwnj: zwnj$1, - zwj: zwj$1, - lrm: lrm$1, - rlm: rlm$1, - ndash: ndash$1, - mdash: mdash$1, - lsquo: lsquo$1, - rsquo: rsquo$1, - sbquo: sbquo$1, - ldquo: ldquo$1, - rdquo: rdquo$1, - bdquo: bdquo$1, - dagger: dagger$1, - Dagger: Dagger$1, - permil: permil$1, - lsaquo: lsaquo$1, - rsaquo: rsaquo$1, - euro: euro$1 -}; - -var characterEntitiesHtml4 = /*#__PURE__*/Object.freeze({ - __proto__: null, - nbsp: nbsp$2, - iexcl: iexcl$2, - cent: cent$2, - pound: pound$2, - curren: curren$2, - yen: yen$2, - brvbar: brvbar$2, - sect: sect$2, - uml: uml$2, - copy: copy$3, - ordf: ordf$2, - laquo: laquo$2, - not: not$2, - shy: shy$2, - reg: reg$2, - macr: macr$2, - deg: deg$2, - plusmn: plusmn$2, - sup2: sup2$2, - sup3: sup3$2, - acute: acute$2, - micro: micro$2, - para: para$2, - middot: middot$2, - cedil: cedil$2, - sup1: sup1$2, - ordm: ordm$2, - raquo: raquo$2, - frac14: frac14$2, - frac12: frac12$2, - frac34: frac34$2, - iquest: iquest$2, - Agrave: Agrave$2, - Aacute: Aacute$2, - Acirc: Acirc$2, - Atilde: Atilde$2, - Auml: Auml$2, - Aring: Aring$2, - AElig: AElig$2, - Ccedil: Ccedil$2, - Egrave: Egrave$2, - Eacute: Eacute$2, - Ecirc: Ecirc$2, - Euml: Euml$2, - Igrave: Igrave$2, - Iacute: Iacute$2, - Icirc: Icirc$2, - Iuml: Iuml$2, - ETH: ETH$2, - Ntilde: Ntilde$2, - Ograve: Ograve$2, - Oacute: Oacute$2, - Ocirc: Ocirc$2, - Otilde: Otilde$2, - Ouml: Ouml$2, - times: times$2, - Oslash: Oslash$2, - Ugrave: Ugrave$2, - Uacute: Uacute$2, - Ucirc: Ucirc$2, - Uuml: Uuml$2, - Yacute: Yacute$2, - THORN: THORN$2, - szlig: szlig$2, - agrave: agrave$2, - aacute: aacute$2, - acirc: acirc$2, - atilde: atilde$2, - auml: auml$2, - aring: aring$2, - aelig: aelig$2, - ccedil: ccedil$2, - egrave: egrave$2, - eacute: eacute$2, - ecirc: ecirc$2, - euml: euml$2, - igrave: igrave$2, - iacute: iacute$2, - icirc: icirc$2, - iuml: iuml$2, - eth: eth$2, - ntilde: ntilde$2, - ograve: ograve$2, - oacute: oacute$2, - ocirc: ocirc$2, - otilde: otilde$2, - ouml: ouml$2, - divide: divide$2, - oslash: oslash$2, - ugrave: ugrave$2, - uacute: uacute$2, - ucirc: ucirc$2, - uuml: uuml$2, - yacute: yacute$2, - thorn: thorn$2, - yuml: yuml$2, - fnof: fnof$1, - Alpha: Alpha$1, - Beta: Beta$1, - Gamma: Gamma$1, - Delta: Delta$1, - Epsilon: Epsilon$1, - Zeta: Zeta$1, - Eta: Eta$1, - Theta: Theta$1, - Iota: Iota$1, - Kappa: Kappa$1, - Lambda: Lambda$1, - Mu: Mu$1, - Nu: Nu$1, - Xi: Xi$1, - Omicron: Omicron$1, - Pi: Pi$1, - Rho: Rho$1, - Sigma: Sigma$1, - Tau: Tau$1, - Upsilon: Upsilon$1, - Phi: Phi$1, - Chi: Chi$1, - Psi: Psi$1, - Omega: Omega$1, - alpha: alpha$1, - beta: beta$1, - gamma: gamma$1, - delta: delta$1, - epsilon: epsilon$1, - zeta: zeta$1, - eta: eta$1, - theta: theta$1, - iota: iota$1, - kappa: kappa$1, - lambda: lambda$1, - mu: mu$1, - nu: nu$1, - xi: xi$1, - omicron: omicron$1, - pi: pi$1, - rho: rho$1, - sigmaf: sigmaf$1, - sigma: sigma$1, - tau: tau$1, - upsilon: upsilon$1, - phi: phi$1, - chi: chi$1, - psi: psi$1, - omega: omega$1, - thetasym: thetasym$1, - upsih: upsih$1, - piv: piv$1, - bull: bull$1, - hellip: hellip$1, - prime: prime$1, - Prime: Prime$1, - oline: oline$1, - frasl: frasl$1, - weierp: weierp$1, - image: image$2, - real: real$1, - trade: trade$1, - alefsym: alefsym$1, - larr: larr$1, - uarr: uarr$1, - rarr: rarr$1, - darr: darr$1, - harr: harr$1, - crarr: crarr$1, - lArr: lArr$1, - uArr: uArr$1, - rArr: rArr$1, - dArr: dArr$1, - hArr: hArr$1, - forall: forall$1, - part: part$1, - exist: exist$1, - empty: empty$1, - nabla: nabla$1, - isin: isin$1, - notin: notin$1, - ni: ni$1, - prod: prod$1, - sum: sum$1, - minus: minus$1, - lowast: lowast$1, - radic: radic$1, - prop: prop$1, - infin: infin$1, - ang: ang$1, - and: and$1, - or: or$1, - cap: cap$1, - cup: cup$1, - int: int$1, - there4: there4$1, - sim: sim$1, - cong: cong$1, - asymp: asymp$1, - ne: ne$1, - equiv: equiv$1, - le: le$1, - ge: ge$1, - sub: sub$1, - sup: sup$1, - nsub: nsub$1, - sube: sube$1, - supe: supe$1, - oplus: oplus$1, - otimes: otimes$1, - perp: perp$1, - sdot: sdot$1, - lceil: lceil$1, - rceil: rceil$1, - lfloor: lfloor$1, - rfloor: rfloor$1, - lang: lang$1, - rang: rang$1, - loz: loz$1, - spades: spades$1, - clubs: clubs$1, - hearts: hearts$1, - diams: diams$1, - quot: quot$2, - amp: amp$2, - lt: lt$2, - gt: gt$2, - OElig: OElig$1, - oelig: oelig$1, - Scaron: Scaron$1, - scaron: scaron$1, - Yuml: Yuml$1, - circ: circ$1, - tilde: tilde$4, - ensp: ensp$1, - emsp: emsp$1, - thinsp: thinsp$1, - zwnj: zwnj$1, - zwj: zwj$1, - lrm: lrm$1, - rlm: rlm$1, - ndash: ndash$1, - mdash: mdash$1, - lsquo: lsquo$1, - rsquo: rsquo$1, - sbquo: sbquo$1, - ldquo: ldquo$1, - rdquo: rdquo$1, - bdquo: bdquo$1, - dagger: dagger$1, - Dagger: Dagger$1, - permil: permil$1, - lsaquo: lsaquo$1, - rsaquo: rsaquo$1, - euro: euro$1, - 'default': index$4 -}); -var dangerous = [ - "cent", - "copy", - "divide", - "gt", - "lt", - "not", - "para", - "times" -]; -var dangerous$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - 'default': dangerous -}); +function createParser(options) { + var settings = options || {}; + var parser = { + defined: [], + constructs: combineExtensions_1( + [constructs].concat(miniflat_1(settings.extensions)) + ), + + content: create(content), + document: create(document$1), + flow: create(flow), + string: create(text.string), + text: create(text.text) + }; -var entities = getCjsExportFromNamespace(characterEntitiesHtml4); + return parser -var dangerous$2 = getCjsExportFromNamespace(dangerous$1); + function create(initializer) { + return creator + function creator(from) { + return createTokenizer_1(parser, initializer, from) + } + } +} -var decimal$1 = isDecimal; +var preprocess = preprocessor; +var search$1 = /[\0\t\n\r]/g; +function preprocessor() { + var start = true; + var column = 1; + var buffer = ''; + var atCarriageReturn; -var stringifyEntities = encode; -encode.escape = escape$2; + return preprocess -var own$5 = {}.hasOwnProperty; + function preprocess(value, encoding, end) { + var chunks = []; + var match; + var next; + var startPosition; + var endPosition; + var code; -// Characters -var equalsTo$2 = 61; + value = buffer + value.toString(encoding); + startPosition = 0; + buffer = ''; -// List of enforced escapes. -var escapes$1 = ['"', "'", '<', '>', '&', '`']; + if (start) { + if (value.charCodeAt(0) === 65279) { + startPosition++; + } -// Map of characters to names. -var characters = construct(); + start = undefined; + } -// Default escapes. -var defaultEscapes = toExpression(escapes$1); + while (startPosition < value.length) { + search$1.lastIndex = startPosition; + match = search$1.exec(value); + endPosition = match ? match.index : value.length; + code = value.charCodeAt(endPosition); -// Surrogate pairs. -var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; + if (!match) { + buffer = value.slice(startPosition); + break + } -// Non-ASCII characters. -// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape -var bmp = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g; + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3); + atCarriageReturn = undefined; + } else { + if (atCarriageReturn) { + chunks.push(-5); + atCarriageReturn = undefined; + } -// Encode special characters in `value`. -function encode(value, options) { - var settings = options || {}; - var subset = settings.subset; - var set = subset ? toExpression(subset) : defaultEscapes; - var escapeOnly = settings.escapeOnly; - var omit = settings.omitOptionalSemicolons; + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)); + column += endPosition - startPosition; + } - value = value.replace(set, replace); + if (code === 0) { + chunks.push(65533); + column++; + } else if (code === 9) { + next = Math.ceil(column / 4) * 4; + chunks.push(-2); + while (column++ < next) chunks.push(-1); + } else if (code === 10) { + chunks.push(-4); + column = 1; + } + // Must be carriage return. + else { + atCarriageReturn = true; + column = 1; + } + } - if (subset || escapeOnly) { - return value - } + startPosition = endPosition + 1; + } - return value - .replace(surrogatePair, replaceSurrogatePair) - .replace(bmp, replace) - - function replaceSurrogatePair(pair, pos, slice) { - return toHexReference( - (pair.charCodeAt(0) - 0xd800) * 0x400 + - pair.charCodeAt(1) - - 0xdc00 + - 0x10000, - slice.charCodeAt(pos + 2), - omit - ) - } + if (end) { + if (atCarriageReturn) chunks.push(-5); + if (buffer) chunks.push(buffer); + chunks.push(null); + } - function replace(char, pos, slice) { - return one$1(char, slice.charCodeAt(pos + 1), settings) + return chunks } } -// Shortcut to escape special characters in HTML. -function escape$2(value) { - return encode(value, {escapeOnly: true, useNamedReferences: true}) -} +var postprocess_1 = postprocess; + -// Encode `char` according to `options`. -function one$1(char, next, options) { - var shortest = options.useShortestReferences; - var omit = options.omitOptionalSemicolons; - var named; - var code; - var numeric; - var decimal; - if ((shortest || options.useNamedReferences) && own$5.call(characters, char)) { - named = toNamed(characters[char], next, omit, options.attribute); +function postprocess(events) { + while (!subtokenize_1(events)) { + // Empty } - if (shortest || !named) { - code = char.charCodeAt(0); - numeric = toHexReference(code, next, omit); + return events +} - // Use the shortest numeric reference when requested. - // A simple algorithm would use decimal for all code points under 100, as - // those are shorter than hexadecimal: - // - // * `c` vs `c` (decimal shorter) - // * `d` vs `d` (equal) - // - // However, because we take `next` into consideration when `omit` is used, - // And it would be possible that decimals are shorter on bigger values as - // well if `next` is hexadecimal but not decimal, we instead compare both. - if (shortest) { - decimal = toDecimalReference(code, next, omit); +var dist$2 = fromMarkdown; - if (decimal.length < numeric.length) { - numeric = decimal; - } - } - } +// These three are compiled away in the `dist/` - if (named && (!shortest || named.length < numeric.length)) { - return named - } - return numeric -} -// Transform `code` into an entity. -function toNamed(name, next, omit, attribute) { - var value = '&' + name; - if ( - omit && - own$5.call(legacy, name) && - dangerous$2.indexOf(name) === -1 && - (!attribute || (next && next !== equalsTo$2 && !isAlphanumerical(next))) - ) { - return value - } - return value + ';' -} -// Transform `code` into a hexadecimal character reference. -function toHexReference(code, next, omit) { - var value = '&#x' + code.toString(16).toUpperCase(); - return omit && next && !isHexadecimal(next) ? value : value + ';' -} -// Transform `code` into a decimal character reference. -function toDecimalReference(code, next, omit) { - var value = '&#' + String(code); - return omit && next && !decimal$1(next) ? value : value + ';' -} -// Create an expression for `characters`. -function toExpression(characters) { - return new RegExp('[' + characters.join('') + ']', 'g') -} -// Construct the map. -function construct() { - var chars = {}; - var name; - for (name in entities) { - chars[entities[name]] = name; +function fromMarkdown(value, encoding, options) { + if (typeof encoding !== 'string') { + options = encoding; + encoding = undefined; } - return chars + return compiler(options)( + postprocess_1( + parse$8(options).document().write(preprocess()(value, encoding, true)) + ) + ) } -var isAlphanumeric = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return !/[^0-9a-z\xDF-\xFF]/.test(str.toLowerCase()); -}; +// Note this compiler only understand complete buffering, not streaming. +function compiler(options) { + var settings = options || {}; + var config = configure$2( + { + canContainEols: [ + 'emphasis', + 'fragment', + 'heading', + 'paragraph', + 'strong' + ], -var entityPrefixLength = length; + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list, onenterlistordered), + listUnordered: opener(list), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak) + }, -var ampersand$2 = '&'; + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: closer(onexitcharacterreferencevalue), + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + }, -// Returns the length of HTML entity that is a prefix of the given string -// (excluding the ampersand), 0 if it does not start with an entity. -function length(value) { - var prefix; + settings.mdastExtensions || [] + ); - /* istanbul ignore if - Currently also tested for at implemention, but we - * keep it here because that’s proper. */ - if (value.charAt(0) !== ampersand$2) { - return 0 - } + var data = {}; - prefix = value.split(ampersand$2, 2).join(ampersand$2); - - return prefix.length - parseEntities_1(prefix).length -} - -var _escape$2 = factory$6; - -var tab$d = '\t'; -var lineFeed$i = '\n'; -var space$g = ' '; -var numberSign$2 = '#'; -var ampersand$3 = '&'; -var leftParenthesis$2 = '('; -var rightParenthesis$4 = ')'; -var asterisk$5 = '*'; -var plusSign$3 = '+'; -var dash$8 = '-'; -var dot$5 = '.'; -var colon$4 = ':'; -var lessThan$7 = '<'; -var greaterThan$4 = '>'; -var leftSquareBracket$3 = '['; -var backslash$9 = '\\'; -var rightSquareBracket$3 = ']'; -var underscore$7 = '_'; -var graveAccent$3 = '`'; -var verticalBar$1 = '|'; -var tilde$5 = '~'; -var exclamationMark$5 = '!'; - -var entities$1 = { - '<': '<', - ':': ':', - '&': '&', - '|': '|', - '~': '~' -}; - -var shortcut$1 = 'shortcut'; -var mailto$1 = 'mailto'; -var https = 'https'; -var http = 'http'; - -var blankExpression = /\n\s*$/; - -// Factory to escape characters. -function factory$6(options) { - return escape - - // Escape punctuation characters in a node’s value. - function escape(value, node, parent) { - var self = this; - var gfm = options.gfm; - var commonmark = options.commonmark; - var pedantic = options.pedantic; - var markers = commonmark ? [dot$5, rightParenthesis$4] : [dot$5]; - var siblings = parent && parent.children; - var index = siblings && siblings.indexOf(node); - var previous = siblings && siblings[index - 1]; - var next = siblings && siblings[index + 1]; - var length = value.length; - var escapable = markdownEscapes(options); - var position = -1; - var queue = []; - var escaped = queue; - var afterNewLine; - var character; - var wordCharBefore; - var wordCharAfter; - var offset; - var replace; + return compile - if (previous) { - afterNewLine = text$1(previous) && blankExpression.test(previous.value); - } else { - afterNewLine = - !parent || parent.type === 'root' || parent.type === 'paragraph'; - } + function compile(events) { + var stack = [{type: 'root', children: []}]; + var index = -1; + var listStack = []; + var length; + var handler; + var listStart; + var event; - while (++position < length) { - character = value.charAt(position); - replace = false; + while (++index < events.length) { + event = events[index]; - if (character === '\n') { - afterNewLine = true; - } else if ( - character === backslash$9 || - character === graveAccent$3 || - character === asterisk$5 || - character === leftSquareBracket$3 || - character === lessThan$7 || - (character === ampersand$3 && entityPrefixLength(value.slice(position)) > 0) || - (character === rightSquareBracket$3 && self.inLink) || - (gfm && character === tilde$5 && value.charAt(position + 1) === tilde$5) || - (gfm && - character === verticalBar$1 && - (self.inTable || alignment(value, position))) || - (character === underscore$7 && - // Delegate leading/trailing underscores to the multinode version below. - position > 0 && - position < length - 1 && - (pedantic || - !isAlphanumeric(value.charAt(position - 1)) || - !isAlphanumeric(value.charAt(position + 1)))) || - (gfm && !self.inLink && character === colon$4 && protocol(queue.join(''))) + // We preprocess lists to add `listItem` tokens, and to infer whether + // items the list itself are spread out. + if ( + event[1].type === 'listOrdered' || + event[1].type === 'listUnordered' ) { - replace = true; - } else if (afterNewLine) { - if ( - character === greaterThan$4 || - character === numberSign$2 || - character === asterisk$5 || - character === dash$8 || - character === plusSign$3 - ) { - replace = true; - } else if (isDecimal(character)) { - offset = position + 1; - - while (offset < length) { - if (!isDecimal(value.charAt(offset))) { - break - } - - offset++; - } - - if (markers.indexOf(value.charAt(offset)) !== -1) { - next = value.charAt(offset + 1); - - if (!next || next === space$g || next === tab$d || next === lineFeed$i) { - queue.push(value.slice(position, offset)); - position = offset; - character = value.charAt(position); - replace = true; - } - } + if (event[0] === 'enter') { + listStack.push(index); + } else { + listStart = listStack.pop(index); + index = prepareList(events, listStart, index); } } + } - if (afterNewLine && !isWhitespaceCharacter(character)) { - afterNewLine = false; - } + index = -1; + length = events.length; - queue.push(replace ? one(character) : character); + while (++index < length) { + handler = config[events[index][0]]; + + if (hasOwnProperty_1.call(handler, events[index][1].type)) { + handler[events[index][1].type].call( + { + stack: stack, + config: config, + enter: enter, + exit: exit, + buffer: buffer, + resume: resume, + sliceSerialize: events[index][2].sliceSerialize, + setData: setData, + getData: getData + }, + + events[index][1] + ); + } } - // Multi-node versions. - if (siblings && text$1(node)) { - // Check for an opening parentheses after a link-reference (which can be - // joined by white-space). - if (previous && previous.referenceType === shortcut$1) { - position = -1; - length = escaped.length; - - while (++position < length) { - character = escaped[position]; + // Figure out `root` position. + stack[0].position = { + start: point( + length ? events[0][1].start : {line: 1, column: 1, offset: 0} + ), - if (character === space$g || character === tab$d) { - continue - } + end: point( + length + ? events[events.length - 2][1].end + : {line: 1, column: 1, offset: 0} + ) + }; - if (character === leftParenthesis$2 || character === colon$4) { - escaped[position] = one(character); - } + return stack[0] + } - break - } + function prepareList(events, start, length) { + var index = start - 1; + var containerBalance = -1; + var listSpread = false; + var listItem; + var tailIndex; + var lineIndex; + var tailEvent; + var event; + var firstBlankLineIndex; + var atMarker; - // If the current node is all spaces / tabs, preceded by a shortcut, - // and followed by a text starting with `(`, escape it. - if ( - text$1(next) && - position === length && - next.value.charAt(0) === leftParenthesis$2 - ) { - escaped.push(backslash$9); - } - } + while (++index <= length) { + event = events[index]; - // Ensure non-auto-links are not seen as links. This pattern needs to - // check the preceding nodes too. if ( - gfm && - !self.inLink && - text$1(previous) && - value.charAt(0) === colon$4 && - protocol(previous.value.slice(-6)) + event[1].type === 'listUnordered' || + event[1].type === 'listOrdered' || + event[1].type === 'blockQuote' ) { - escaped[0] = one(colon$4); - } + if (event[0] === 'enter') { + containerBalance++; + } else { + containerBalance--; + } + + atMarker = undefined; + } else if (event[1].type === 'lineEndingBlank') { + if (event[0] === 'enter') { + if ( + listItem && + !atMarker && + !containerBalance && + !firstBlankLineIndex + ) { + firstBlankLineIndex = index; + } - // Escape ampersand if it would otherwise start an entity. - if ( - text$1(next) && - value.charAt(length - 1) === ampersand$3 && - entityPrefixLength(ampersand$3 + next.value) !== 0 - ) { - escaped[escaped.length - 1] = one(ampersand$3); + atMarker = undefined; + } + } else if ( + event[1].type === 'linePrefix' || + event[1].type === 'listItemValue' || + event[1].type === 'listItemMarker' || + event[1].type === 'listItemPrefix' || + event[1].type === 'listItemPrefixWhitespace' + ) ; else { + atMarker = undefined; } - // Escape exclamation marks immediately followed by links. if ( - next && - next.type === 'link' && - value.charAt(length - 1) === exclamationMark$5 + (!containerBalance && + event[0] === 'enter' && + event[1].type === 'listItemPrefix') || + (containerBalance === -1 && + event[0] === 'exit' && + (event[1].type === 'listUnordered' || + event[1].type === 'listOrdered')) ) { - escaped[escaped.length - 1] = one(exclamationMark$5); - } + if (listItem) { + tailIndex = index; + lineIndex = undefined; - // Escape double tildes in GFM. - if ( - gfm && - text$1(next) && - value.charAt(length - 1) === tilde$5 && - next.value.charAt(0) === tilde$5 - ) { - escaped.splice(-1, 0, backslash$9); - } + while (tailIndex--) { + tailEvent = events[tailIndex]; - // Escape underscores, but not mid-word (unless in pedantic mode). - wordCharBefore = text$1(previous) && isAlphanumeric(previous.value.slice(-1)); - wordCharAfter = text$1(next) && isAlphanumeric(next.value.charAt(0)); + if ( + tailEvent[1].type === 'lineEnding' || + tailEvent[1].type === 'lineEndingBlank' + ) { + if (tailEvent[0] === 'exit') continue - if (length === 1) { - if ( - value === underscore$7 && - (pedantic || !wordCharBefore || !wordCharAfter) - ) { - escaped.unshift(backslash$9); - } - } else { - if ( - value.charAt(0) === underscore$7 && - (pedantic || !wordCharBefore || !isAlphanumeric(value.charAt(1))) - ) { - escaped.unshift(backslash$9); + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank'; + listSpread = true; + } + + tailEvent[1].type = 'lineEnding'; + lineIndex = tailIndex; + } else if ( + tailEvent[1].type === 'linePrefix' || + tailEvent[1].type === 'blockQuotePrefix' || + tailEvent[1].type === 'blockQuotePrefixWhitespace' || + tailEvent[1].type === 'blockQuoteMarker' || + tailEvent[1].type === 'listItemIndent' + ) ; else { + break + } + } + + if ( + firstBlankLineIndex && + (!lineIndex || firstBlankLineIndex < lineIndex) + ) { + listItem._spread = true; + } + + // Fix position. + listItem.end = point( + lineIndex ? events[lineIndex][1].start : event[1].end + ); + + events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]); + index++; + length++; } - if ( - value.charAt(length - 1) === underscore$7 && - (pedantic || - !wordCharAfter || - !isAlphanumeric(value.charAt(length - 2))) - ) { - escaped.splice(-1, 0, backslash$9); + // Create a new list item. + if (event[1].type === 'listItemPrefix') { + listItem = { + type: 'listItem', + _spread: false, + start: point(event[1].start) + }; + + events.splice(index, 0, ['enter', listItem, event[2]]); + index++; + length++; + firstBlankLineIndex = undefined; + atMarker = true; } } } - return escaped.join('') + events[start][1]._spread = listSpread; + return length + } - function one(character) { - return escapable.indexOf(character) === -1 - ? entities$1[character] - : backslash$9 + character - } + function setData(key, value) { + data[key] = value; } -} -// Check if `index` in `value` is inside an alignment row. -function alignment(value, index) { - var start = value.lastIndexOf(lineFeed$i, index); - var end = value.indexOf(lineFeed$i, index); - var char; + function getData(key) { + return data[key] + } - end = end === -1 ? value.length : end; + function point(d) { + return {line: d.line, column: d.column, offset: d.offset} + } - while (++start < end) { - char = value.charAt(start); + function opener(create, and) { + return open - if ( - char !== colon$4 && - char !== dash$8 && - char !== space$g && - char !== verticalBar$1 - ) { - return false + function open(token) { + enter.call(this, create(token), token); + if (and) and.call(this, token); } } - return true -} - -// Check if `node` is a text node. -function text$1(node) { - return node && node.type === 'text' -} - -// Check if `value` ends in a protocol. -function protocol(value) { - var tail = value.slice(-6).toLowerCase(); - return tail === mailto$1 || tail.slice(-5) === https || tail.slice(-4) === http -} - -var setOptions_1$1 = setOptions$1; - -// Map of applicable enums. -var maps = { - entities: {true: true, false: true, numbers: true, escape: true}, - bullet: {'*': true, '-': true, '+': true}, - rule: {'-': true, _: true, '*': true}, - listItemIndent: {tab: true, mixed: true, 1: true}, - emphasis: {_: true, '*': true}, - strong: {_: true, '*': true}, - fence: {'`': true, '~': true} -}; + function buffer() { + this.stack.push({type: 'fragment', children: []}); + } -// Expose `validate`. -var validate = { - boolean: validateBoolean, - string: validateString, - number: validateNumber, - function: validateFunction -}; + function enter(node, token) { + this.stack[this.stack.length - 1].children.push(node); + this.stack.push(node); + node.position = {start: point(token.start)}; + return node + } -// Set options. Does not overwrite previously set options. -function setOptions$1(options) { - var self = this; - var current = self.options; - var ruleRepetition; - var key; + function closer(and) { + return close - if (options == null) { - options = {}; - } else if (typeof options === 'object') { - options = immutable(options); - } else { - throw new Error('Invalid value `' + options + '` for setting `options`') + function close(token) { + if (and) and.call(this, token); + exit.call(this, token); + } } - for (key in defaults$3) { - validate[typeof defaults$3[key]](options, key, current[key], maps[key]); + function exit(token) { + var node = this.stack.pop(); + node.position.end = point(token.end); + return node } - ruleRepetition = options.ruleRepetition; - - if (ruleRepetition && ruleRepetition < 3) { - raise(ruleRepetition, 'options.ruleRepetition'); + function resume() { + var value = mdastUtilToString(this.stack.pop()); + return value } - self.encode = encodeFactory(String(options.entities)); - self.escape = _escape$2(options); - - self.options = options; + // + // Handlers. + // - return self -} + function onenterlistordered() { + setData('expectingFirstListItemValue', true); + } -// Validate a value to be boolean. Defaults to `def`. Raises an exception with -// `context[name]` when not a boolean. -function validateBoolean(context, name, def) { - var value = context[name]; + function onenterlistitemvalue(token) { + if (getData('expectingFirstListItemValue')) { + this.stack[this.stack.length - 2].start = parseInt( + this.sliceSerialize(token), + 10 + ); - if (value == null) { - value = def; + setData('expectingFirstListItemValue'); + } } - if (typeof value !== 'boolean') { - raise(value, 'options.' + name); + function onexitcodefencedfenceinfo() { + var data = this.resume(); + this.stack[this.stack.length - 1].lang = data; } - context[name] = value; -} - -// Validate a value to be boolean. Defaults to `def`. Raises an exception with -// `context[name]` when not a boolean. -function validateNumber(context, name, def) { - var value = context[name]; - - if (value == null) { - value = def; + function onexitcodefencedfencemeta() { + var data = this.resume(); + this.stack[this.stack.length - 1].meta = data; } - if (isNaN(value)) { - raise(value, 'options.' + name); + function onexitcodefencedfence() { + // Exit if this is the closing fence. + if (getData('flowCodeInside')) return + this.buffer(); + setData('flowCodeInside', true); } - context[name] = value; -} + function onexitcodefenced() { + var data = this.resume(); + this.stack[this.stack.length - 1].value = data.replace( + /^(\r?\n|\r)|(\r?\n|\r)$/g, + '' + ); -// Validate a value to be in `map`. Defaults to `def`. Raises an exception -// with `context[name]` when not in `map`. -function validateString(context, name, def, map) { - var value = context[name]; + setData('flowCodeInside'); + } - if (value == null) { - value = def; + function onexitcodeindented() { + var data = this.resume(); + this.stack[this.stack.length - 1].value = data; } - value = String(value); + function onexitdefinitionlabelstring(token) { + // Discard label, use the source content instead. + var label = this.resume(); + this.stack[this.stack.length - 1].label = label; + this.stack[this.stack.length - 1].identifier = normalizeIdentifier_1( + this.sliceSerialize(token) + ).toLowerCase(); + } - if (!(value in map)) { - raise(value, 'options.' + name); + function onexitdefinitiontitlestring() { + var data = this.resume(); + this.stack[this.stack.length - 1].title = data; } - context[name] = value; -} + function onexitdefinitiondestinationstring() { + var data = this.resume(); + this.stack[this.stack.length - 1].url = data; + } -// Validate a value to be function. Defaults to `def`. Raises an exception -// with `context[name]` when not a function. -function validateFunction(context, name, def) { - var value = context[name]; + function onexitatxheadingsequence(token) { + if (!this.stack[this.stack.length - 1].depth) { + this.stack[this.stack.length - 1].depth = this.sliceSerialize( + token + ).length; + } + } - if (value == null) { - value = def; + function onexitsetextheadingtext() { + setData('setextHeadingSlurpLineEnding', true); } - if (typeof value !== 'function') { - raise(value, 'options.' + name); + function onexitsetextheadinglinesequence(token) { + this.stack[this.stack.length - 1].depth = + this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2; } - context[name] = value; -} + function onexitsetextheading() { + setData('setextHeadingSlurpLineEnding'); + } -// Factory to encode HTML entities. Creates a no-operation function when -// `type` is `'false'`, a function which encodes using named references when -// `type` is `'true'`, and a function which encodes using numbered references -// when `type` is `'numbers'`. -function encodeFactory(type) { - var options = {}; + function onenterdata(token) { + var siblings = this.stack[this.stack.length - 1].children; + var tail = siblings[siblings.length - 1]; - if (type === 'false') { - return identity_1 - } + if (!tail || tail.type !== 'text') { + // Add a new text node. + tail = text(); + tail.position = {start: point(token.start)}; + this.stack[this.stack.length - 1].children.push(tail); + } - if (type === 'true') { - options.useNamedReferences = true; + this.stack.push(tail); } - if (type === 'escape') { - options.escapeOnly = true; - options.useNamedReferences = true; + function onexitdata(token) { + var tail = this.stack.pop(); + tail.value += this.sliceSerialize(token); + tail.position.end = point(token.end); } - return wrapped + function onexitlineending(token) { + var context = this.stack[this.stack.length - 1]; - // Encode HTML entities using the bound options. - function wrapped(value) { - return stringifyEntities(value, options) - } -} + // If we’re at a hard break, include the line ending in there. + if (getData('atHardBreak')) { + context.children[context.children.length - 1].position.end = point( + token.end + ); -// Throw an exception with in its `message` `value` and `name`. -function raise(value, name) { - throw new Error('Invalid value `' + value + '` for setting `' + name + '`') -} - -var mdastUtilCompact = compact; + setData('atHardBreak'); + return + } -// Make an mdast tree compact by merging adjacent text nodes. -function compact(tree, commonmark) { - unistUtilVisit(tree, visitor); + if (getData('setextHeadingSlurpLineEnding')) { + return + } - return tree + if (config.canContainEols.indexOf(context.type) !== -1) { + onenterdata.call(this, token); + onexitdata.call(this, token); + } + } - function visitor(child, index, parent) { - var siblings = parent ? parent.children : []; - var prev = index && siblings[index - 1]; + function onexithardbreak() { + setData('atHardBreak', true); + } - if ( - prev && - child.type === prev.type && - mergeable$1(prev, commonmark) && - mergeable$1(child, commonmark) - ) { - if (child.value) { - prev.value += child.value; - } + function onexithtmlflow() { + var data = this.resume(); + this.stack[this.stack.length - 1].value = data; + } - if (child.children) { - prev.children = prev.children.concat(child.children); - } + function onexithtmltext() { + var data = this.resume(); + this.stack[this.stack.length - 1].value = data; + } - siblings.splice(index, 1); + function onexitcodetext() { + var data = this.resume(); + this.stack[this.stack.length - 1].value = data; + } - if (prev.position && child.position) { - prev.position.end = child.position.end; - } + function onexitlink() { + var context = this.stack[this.stack.length - 1]; - return index + // To do: clean. + if (getData('inReference')) { + context.type += 'Reference'; + context.referenceType = getData('referenceType') || 'shortcut'; + delete context.url; + delete context.title; + } else { + delete context.identifier; + delete context.label; + delete context.referenceType; } + + setData('referenceType'); } -} -function mergeable$1(node, commonmark) { - var start; - var end; + function onexitimage() { + var context = this.stack[this.stack.length - 1]; - if (node.type === 'text') { - if (!node.position) { - return true + // To do: clean. + if (getData('inReference')) { + context.type += 'Reference'; + context.referenceType = getData('referenceType') || 'shortcut'; + delete context.url; + delete context.title; + } else { + delete context.identifier; + delete context.label; + delete context.referenceType; } - start = node.position.start; - end = node.position.end; + setData('referenceType'); + } - // Only merge nodes which occupy the same size as their `value`. - return ( - start.line !== end.line || end.column - start.column === node.value.length - ) + function onexitlabeltext(token) { + this.stack[this.stack.length - 2].identifier = normalizeIdentifier_1( + this.sliceSerialize(token) + ).toLowerCase(); } - return commonmark && node.type === 'blockquote' -} + function onexitlabel() { + var fragment = this.stack[this.stack.length - 1]; + var value = this.resume(); -var compile_1$1 = compile$3; + this.stack[this.stack.length - 1].label = value; -// Stringify the given tree. -function compile$3() { - return this.visit(mdastUtilCompact(this.tree, this.options.commonmark)) -} + // Assume a reference. + setData('inReference', true); -var one_1 = one$2; + if (this.stack[this.stack.length - 1].type === 'link') { + this.stack[this.stack.length - 1].children = fragment.children; + } else { + this.stack[this.stack.length - 1].alt = value; + } + } -function one$2(node, parent) { - var self = this; - var visitors = self.visitors; + function onexitresourcedestinationstring() { + var data = this.resume(); + this.stack[this.stack.length - 1].url = data; + } - // Fail on unknown nodes. - if (typeof visitors[node.type] !== 'function') { - self.file.fail( - new Error( - 'Missing compiler for node of type `' + node.type + '`: `' + node + '`' - ), - node - ); + function onexitresourcetitlestring() { + var data = this.resume(); + this.stack[this.stack.length - 1].title = data; } - return visitors[node.type].call(self, node, parent) -} + function onexitresource() { + setData('inReference'); + } -var all_1 = all; + function onenterreference() { + setData('referenceType', 'collapsed'); + } -// Visit all children of `parent`. -function all(parent) { - var self = this; - var children = parent.children; - var length = children.length; - var results = []; - var index = -1; + function onexitreferencestring(token) { + var label = this.resume(); + this.stack[this.stack.length - 1].label = label; + this.stack[this.stack.length - 1].identifier = normalizeIdentifier_1( + this.sliceSerialize(token) + ).toLowerCase(); + setData('referenceType', 'full'); + } - while (++index < length) { - results[index] = self.visit(children[index], parent); + function onexitcharacterreferencemarker(token) { + setData('characterReferenceType', token.type); } - return results -} + function onexitcharacterreferencevalue(token) { + var data = this.sliceSerialize(token); + var type = getData('characterReferenceType'); + var value; -var block_1 = block$1; + if (type) { + value = safeFromInt_1( + data, + type === 'characterReferenceMarkerNumeric' ? 10 : 16 + ); -var lineFeed$j = '\n'; + setData('characterReferenceType'); + } else { + value = decodeEntity_1(data); + } -var blank$1 = lineFeed$j + lineFeed$j; -var triple = blank$1 + lineFeed$j; -var comment$1 = blank$1 + '' + blank$1; + this.stack[this.stack.length - 1].value += value; + } -// Stringify a block node with block children (e.g., `root` or `blockquote`). -// Knows about code following a list, or adjacent lists with similar bullets, -// and places an extra line feed between them. -function block$1(node) { - var self = this; - var options = self.options; - var fences = options.fences; - var gap = options.commonmark ? comment$1 : triple; - var definitionGap = options.tightDefinitions ? lineFeed$j : blank$1; - var values = []; - var children = node.children; - var length = children.length; - var index = -1; - var previous; - var child; + function onexitautolinkprotocol(token) { + onexitdata.call(this, token); + this.stack[this.stack.length - 1].url = this.sliceSerialize(token); + } - while (++index < length) { - previous = child; - child = children[index]; + function onexitautolinkemail(token) { + onexitdata.call(this, token); + this.stack[this.stack.length - 1].url = + 'mailto:' + this.sliceSerialize(token); + } - if (previous) { - // A list preceding another list that are equally ordered, or a - // list preceding an indented code block, need a gap between them, - // so as not to see them as one list, or content of the list, - // respectively. - // - // In commonmark, only something that breaks both up can do that, - // so we opt for an empty, invisible comment. In other flavours, - // two blank lines are fine. - if ( - previous.type === 'list' && - ((child.type === 'list' && previous.ordered === child.ordered) || - (child.type === 'code' && !child.lang && !fences)) - ) { - values.push(gap); - } else if ( - previous.type === 'definition' && - child.type === 'definition' - ) { - values.push(definitionGap); - } else { - values.push(blank$1); - } + // + // Creaters. + // + + function blockQuote() { + return {type: 'blockquote', children: []} + } + + function codeFlow() { + return {type: 'code', lang: null, meta: null, value: ''} + } + + function codeText() { + return {type: 'inlineCode', value: ''} + } + + function definition() { + return { + type: 'definition', + identifier: '', + label: null, + title: null, + url: '' } + } - values.push(self.visit(child, node)); + function emphasis() { + return {type: 'emphasis', children: []} } - return values.join('') -} + function heading() { + return {type: 'heading', depth: undefined, children: []} + } -var orderedItems_1 = orderedItems; + function hardBreak() { + return {type: 'break'} + } -var lineFeed$k = '\n'; -var dot$6 = '.'; + function html() { + return {type: 'html', value: ''} + } -var blank$2 = lineFeed$k + lineFeed$k; + function image() { + return {type: 'image', title: null, url: '', alt: null} + } -// Visit ordered list items. -// -// Starts the list with -// `node.start` and increments each following list item -// bullet by one: -// -// 2. foo -// 3. bar -// -// In `incrementListMarker: false` mode, does not increment -// each marker and stays on `node.start`: -// -// 1. foo -// 1. bar -function orderedItems(node) { - var self = this; - var fn = self.visitors.listItem; - var increment = self.options.incrementListMarker; - var values = []; - var start = node.start; - var children = node.children; - var length = children.length; - var index = -1; - var bullet; + function link() { + return {type: 'link', title: null, url: '', children: []} + } - start = start == null ? 1 : start; + function list(token) { + return { + type: 'list', + ordered: token.type === 'listOrdered', + start: null, + spread: token._spread, + children: [] + } + } - while (++index < length) { - bullet = (increment ? start + index : start) + dot$6; - values[index] = fn.call(self, children[index], node, index, bullet); + function listItem(token) { + return { + type: 'listItem', + spread: token._spread, + checked: null, + children: [] + } } - return values.join(node.spread ? blank$2 : lineFeed$k) -} + function paragraph() { + return {type: 'paragraph', children: []} + } -var unorderedItems_1 = unorderedItems; + function strong() { + return {type: 'strong', children: []} + } -var lineFeed$l = '\n'; + function text() { + return {type: 'text', value: ''} + } -var blank$3 = lineFeed$l + lineFeed$l; + function thematicBreak() { + return {type: 'thematicBreak'} + } +} -// Visit unordered list items. Uses `options.bullet` as each item’s bullet. -function unorderedItems(node) { - var self = this; - var bullet = self.options.bullet; - var fn = self.visitors.listItem; - var children = node.children; - var length = children.length; +function configure$2(config, extensions) { + var length = extensions.length; var index = -1; - var values = []; while (++index < length) { - values[index] = fn.call(self, children[index], node, index, bullet); + extension$2(config, extensions[index]); } - return values.join(node.spread ? blank$3 : lineFeed$l) + return config } -var root_1 = root$1; - -var lineFeed$m = '\n'; +function extension$2(config, extension) { + var key; + var left; + var right; -// Stringify a root. -// Adds a final newline to ensure valid POSIX files. */ -function root$1(node) { - var doc = this.block(node); + for (key in extension) { + left = hasOwnProperty_1.call(config, key) ? config[key] : (config[key] = {}); + right = extension[key]; - if (doc.charAt(doc.length - 1) !== lineFeed$m) { - doc += lineFeed$m; + if (key === 'canContainEols') { + config[key] = [].concat(left, right); + } else { + Object.assign(left, right); + } } - - return doc } -var text_1$1 = text$2; +var mdastUtilFromMarkdown = dist$2; -// Stringify text. -// Supports named entities in `settings.encode: true` mode: -// -// ```markdown -// AT&T -// ``` -// -// Supports numbered entities in `settings.encode: numbers` mode: -// -// ```markdown -// AT&T -// ``` -function text$2(node, parent) { - return this.encode(this.escape(node.value, node, parent), node) -} +var remarkParse = parse$9; -var heading_1 = heading; -var lineFeed$n = '\n'; -var space$h = ' '; -var numberSign$3 = '#'; -var dash$9 = '-'; -var equalsTo$3 = '='; -// Stringify a heading. -// -// In `setext: true` mode and when `depth` is smaller than three, creates a -// setext header: -// -// ```markdown -// Foo -// === -// ``` -// -// Otherwise, an ATX header is generated: -// -// ```markdown -// ### Foo -// ``` -// -// In `closeAtx: true` mode, the header is closed with hashes: -// -// ```markdown -// ### Foo ### -// ``` -function heading(node) { +function parse$9(options) { var self = this; - var depth = node.depth; - var setext = self.options.setext; - var closeAtx = self.options.closeAtx; - var content = self.all(node).join(''); - var prefix; - if (setext && depth < 3) { - return ( - content + lineFeed$n + repeatString(depth === 1 ? equalsTo$3 : dash$9, content.length) + this.Parser = parse; + + function parse(doc) { + return mdastUtilFromMarkdown( + doc, + Object.assign({}, self.data('settings'), options, { + // Note: these options are not in the readme. + // The goal is for them to be set by plugins on `data` instead of being + // passed by users. + extensions: self.data('micromarkExtensions') || [], + mdastExtensions: self.data('fromMarkdownExtensions') || [] + }) ) } - - prefix = repeatString(numberSign$3, node.depth); - - return prefix + space$h + content + (closeAtx ? space$h + prefix : '') } -var paragraph_1$1 = paragraph$1; +var zwitch = factory$1; -function paragraph$1(node) { - return this.all(node).join('') -} +var noop$2 = Function.prototype; +var own$4 = {}.hasOwnProperty; -var blockquote_1$1 = blockquote$1; +// Handle values based on a property. +function factory$1(key, options) { + var settings = options || {}; -var lineFeed$o = '\n'; -var space$i = ' '; -var greaterThan$5 = '>'; + function one(value) { + var fn = one.invalid; + var handlers = one.handlers; -function blockquote$1(node) { - var values = this.block(node).split(lineFeed$o); - var result = []; - var length = values.length; - var index = -1; - var value; + if (value && own$4.call(value, key)) { + fn = own$4.call(handlers, value[key]) ? handlers[value[key]] : one.unknown; + } - while (++index < length) { - value = values[index]; - result[index] = (value ? space$i : '') + value; + return (fn || noop$2).apply(this, arguments) } - return greaterThan$5 + result.join(lineFeed$o + greaterThan$5) + one.handlers = settings.handlers || {}; + one.invalid = settings.invalid; + one.unknown = settings.unknown; + + return one } -var list_1$1 = list$1; +var containerFlow = flow$2; -function list$1(node) { - var fn = node.ordered ? this.visitOrderedItems : this.visitUnorderedItems; - return fn.call(this, node) -} -var pad_1 = pad$1; -var lineFeed$p = '\n'; -var space$j = ' '; +function flow$2(parent, context) { + var children = parent.children || []; + var results = []; + var index = -1; + var child; -var tabSize$5 = 4; + while (++index < children.length) { + child = children[index]; -// Pad `value` with `level * tabSize` spaces. Respects lines. Ignores empty -// lines. -function pad$1(value, level) { - var values = value.split(lineFeed$p); - var index = values.length; - var padding = repeatString(space$j, level * tabSize$5); + results.push( + context.handle(child, parent, context, {before: '\n', after: '\n'}) + ); - while (index--) { - if (values[index].length !== 0) { - values[index] = padding + values[index]; + if (index + 1 < children.length) { + results.push(between(child, children[index + 1])); } } - return values.join(lineFeed$p) -} + return results.join('') -var listItem_1 = listItem$1; + function between(left, right) { + var index = -1; + var result; -var lineFeed$q = '\n'; -var space$k = ' '; -var leftSquareBracket$4 = '['; -var rightSquareBracket$4 = ']'; -var lowercaseX$2 = 'x'; + while (++index < context.join.length) { + result = context.join[index](left, right, parent, context); -var ceil = Math.ceil; -var blank$4 = lineFeed$q + lineFeed$q; + if (result === true || result === 1) { + break + } -var tabSize$6 = 4; + if (typeof result === 'number') { + return repeatString('\n', 1 + Number(result)) + } -// Stringify a list item. -// -// Prefixes the content with a checked checkbox when `checked: true`: -// -// ```markdown -// [x] foo -// ``` -// -// Prefixes the content with an unchecked checkbox when `checked: false`: -// -// ```markdown -// [ ] foo -// ``` -function listItem$1(node, parent, position, bullet) { - var self = this; - var style = self.options.listItemIndent; - var marker = bullet || self.options.bullet; - var spread = node.spread == null ? true : node.spread; - var checked = node.checked; - var children = node.children; - var length = children.length; - var values = []; - var index = -1; - var value; - var indent; - var spacing; + if (result === false) { + return '\n\n\n\n' + } + } - while (++index < length) { - values[index] = self.visit(children[index], node); + return '\n\n' } +} - value = values.join(spread ? blank$4 : lineFeed$q); +var indentLines_1 = indentLines; + +var eol = /\r?\n|\r/g; + +function indentLines(value, map) { + var result = []; + var start = 0; + var line = 0; + var match; - if (typeof checked === 'boolean') { - // Note: I’d like to be able to only add the space between the check and - // the value, but unfortunately github does not support empty list-items - // with a checkbox :( - value = - leftSquareBracket$4 + - (checked ? lowercaseX$2 : space$k) + - rightSquareBracket$4 + - space$k + - value; + while ((match = eol.exec(value))) { + one(value.slice(start, match.index)); + result.push(match[0]); + start = match.index + match[0].length; + line++; } - if (style === '1' || (style === 'mixed' && value.indexOf(lineFeed$q) === -1)) { - indent = marker.length + 1; - spacing = space$k; - } else { - indent = ceil((marker.length + 1) / tabSize$6) * tabSize$6; - spacing = repeatString(space$k, indent - marker.length); + one(value.slice(start)); + + return result.join('') + + function one(value) { + result.push(map(value, line, !value)); } +} + +var blockquote_1 = blockquote; + + + +function blockquote(node, _, context) { + var exit = context.enter('blockquote'); + var value = indentLines_1(containerFlow(node, context), map$3); + exit(); return value - ? marker + spacing + pad_1(value, indent / tabSize$6).slice(indent) - : marker +} + +function map$3(line, index, blank) { + return '>' + (blank ? '' : ' ') + line +} + +var _break = hardBreak; + +function hardBreak() { + return '\\\n' } var longestStreak_1 = longestStreak; @@ -42630,1000 +41009,1260 @@ function longestStreak(value, character) { return maximum } -var inlineCode_1 = inlineCode$1; - -var graveAccentChar = '`'; -var lineFeed$r = 10; // '\n' -var space$l = 32; // ' ' -var graveAccent$4 = 96; // '`' +var formatCodeAsIndented_1 = formatCodeAsIndented; -// Stringify inline code. -// -// Knows about internal ticks (`\``), and ensures one more tick is used to -// enclose the inline code: -// -// ````markdown -// ```foo ``bar`` baz``` -// ```` -// -// Even knows about inital and final ticks: -// -// ``markdown -// `` `foo `` -// `` foo` `` -// ``` -function inlineCode$1(node) { - var value = node.value; - var ticks = repeatString(graveAccentChar, longestStreak_1(value, graveAccentChar) + 1); - var start = ticks; - var end = ticks; - var head = value.charCodeAt(0); - var tail = value.charCodeAt(value.length - 1); - var wrap = false; - var index; - var length; +function formatCodeAsIndented(node, context) { + return ( + node.value && + !context.options.fences && + // If there’s no info… + !node.lang && + // And there’s a non-whitespace character… + /[^ \r\n]/.test(node.value) && + // And the value doesn’t start or end in a blank… + !/^[\t ]*[\r\n]|[\r\n][\t ]*$/.test(node.value) + ) +} - if (head === graveAccent$4 || tail === graveAccent$4) { - wrap = true; - } else if (value.length > 2 && ws(head) && ws(tail)) { - index = 1; - length = value.length - 1; +var checkFence_1 = checkFence; - while (++index < length) { - if (!ws(value.charCodeAt(index))) { - wrap = true; - break - } - } - } +function checkFence(context) { + var marker = context.options.fence || '`'; - if (wrap) { - start += ' '; - end = ' ' + end; + if (marker !== '`' && marker !== '~') { + throw new Error( + 'Cannot serialize code with `' + + marker + + '` for `options.fence`, expected `` ` `` or `~`' + ) } - return start + value + end + return marker } -function ws(code) { - return code === lineFeed$r || code === space$l -} +var safe_1 = safe; -var code_1 = code; +function safe(context, input, config) { + var value = (config.before || '') + (input || '') + (config.after || ''); + var positions = []; + var result = []; + var infos = {}; + var index = -1; + var before; + var after; + var position; + var pattern; + var expression; + var match; + var start; + var end; -var lineFeed$s = '\n'; -var space$m = ' '; -var tilde$6 = '~'; -var graveAccent$5 = '`'; + while (++index < context.unsafePatterns.length) { + pattern = context.unsafePatterns[index]; -// Stringify code. -// Creates indented code when: -// -// - No language tag exists -// - Not in `fences: true` mode -// - A non-empty value exists -// -// Otherwise, GFM fenced code is created: -// -// ````markdown -// ```js -// foo(); -// ``` -// ```` -// -// When in ``fence: `~` `` mode, uses tildes as fences: -// -// ```markdown -// ~~~js -// foo(); -// ~~~ -// ``` -// -// Knows about internal fences: -// -// `````markdown -// ````markdown -// ```javascript -// foo(); -// ``` -// ```` -// ````` -function code(node, parent) { - var self = this; - var value = node.value; - var options = self.options; - var marker = options.fence; - var info = node.lang || ''; - var fence; + if ( + !inScope(context.stack, pattern.inConstruct, true) || + inScope(context.stack, pattern.notInConstruct) + ) { + continue + } + + expression = + pattern._compiled || (pattern._compiled = toExpression(pattern)); + + while ((match = expression.exec(value))) { + before = 'before' in pattern || pattern.atBreak; + after = 'after' in pattern; + position = match.index + (before ? match[1].length : 0); + + if (positions.indexOf(position) === -1) { + positions.push(position); + infos[position] = {before: before, after: after}; + } else { + if (infos[position].before && !before) { + infos[position].before = false; + } - if (info && node.meta) { - info += space$m + node.meta; + if (infos[position].after && !after) { + infos[position].after = false; + } + } + } } - info = self.encode(self.escape(info, node)); + positions.sort(numerical); + + start = config.before ? config.before.length : 0; + end = value.length - (config.after ? config.after.length : 0); + index = -1; + + while (++index < positions.length) { + position = positions[index]; + + if ( + // Character before or after matched: + position < start || + position >= end + ) { + continue + } + + // If this character is supposed to be escaped because it has a condition on + // the next character, and the next character is definitly being escaped, + // then skip this escape. + if ( + position + 1 < end && + positions[index + 1] === position + 1 && + infos[position].after && + !infos[position + 1].before && + !infos[position + 1].after + ) { + continue + } + + if (start !== position) { + result.push(value.slice(start, position)); + } + + start = position; - // Without (needed) fences. - if ( - !info && - !options.fences && - value && - value.charAt(0) !== lineFeed$s && - value.charAt(value.length - 1) !== lineFeed$s - ) { - // Throw when pedantic, in a list item which isn’t compiled using a tab. if ( - parent && - parent.type === 'listItem' && - options.listItemIndent !== 'tab' && - options.pedantic + /[!-/:-@[-`{-~]/.test(value.charAt(position)) && + (!config.encode || config.encode.indexOf(value.charAt(position)) === -1) ) { - self.file.fail( - 'Cannot indent code properly. See https://git.io/fxKR8', - node.position + // Character escape. + result.push('\\'); + } else { + // Character reference. + result.push( + '&#x' + value.charCodeAt(position).toString(16).toUpperCase() + ';' ); + start++; } + } + + result.push(value.slice(start, end)); - return pad_1(value, 1) + return result.join('') +} + +function inScope(stack, list, none) { + var index; + + if (!list) { + return none } - // Backticks in the info string don’t work with backtick fenced code. - // Backticks (and tildes) are fine in tilde fenced code. - if (marker === graveAccent$5 && info.indexOf(graveAccent$5) !== -1) { - marker = tilde$6; + if (typeof list === 'string') { + list = [list]; } - fence = repeatString(marker, Math.max(longestStreak_1(value, marker) + 1, 3)); + index = -1; + + while (++index < list.length) { + if (stack.indexOf(list[index]) !== -1) { + return true + } + } - return fence + info + lineFeed$s + value + lineFeed$s + fence + return false } -var html_1 = html$1; +function toExpression(pattern) { + var before = pattern.before ? '(?:' + pattern.before + ')' : ''; + var after = pattern.after ? '(?:' + pattern.after + ')' : ''; -function html$1(node) { - return node.value + if (pattern.atBreak) { + before = '[\\r\\n][\\t ]*' + before; + } + + return new RegExp( + (before ? '(' + before + ')' : '') + + (/[|\\{}()[\]^$+*?.-]/.test(pattern.character) ? '\\' : '') + + pattern.character + + (after || ''), + 'g' + ) } -var thematicBreak$1 = thematic; +function numerical(a, b) { + return a - b +} -var space$n = ' '; +var code_1 = code; -// Stringify a `thematic-break`. -// The character used is configurable through `rule`: (`'_'`): -// -// ```markdown -// ___ -// ``` -// -// The number of repititions is defined through `ruleRepetition` (`6`): -// -// ```markdown -// ****** -// ``` -// -// Whether spaces delimit each character, is configured through `ruleSpaces` -// (`true`): -// ```markdown -// * * * -// ``` -function thematic() { - var options = this.options; - var rule = repeatString(options.rule, options.ruleRepetition); - return options.ruleSpaces ? rule.split('').join(space$n) : rule -} -var strong_1$1 = strong$2; -// Stringify a `strong`. -// -// The marker used is configurable by `strong`, which defaults to an asterisk -// (`'*'`) but also accepts an underscore (`'_'`): -// -// ```markdown -// __foo__ -// ``` -function strong$2(node) { - var marker = repeatString(this.options.strong, 2); - return marker + this.all(node).join('') + marker -} -var emphasis_1$1 = emphasis$2; -var underscore$8 = '_'; -var asterisk$6 = '*'; -// Stringify an `emphasis`. -// -// The marker used is configurable through `emphasis`, which defaults to an -// underscore (`'_'`) but also accepts an asterisk (`'*'`): -// -// ```markdown -// *foo* -// ``` -// -// In `pedantic` mode, text which itself contains an underscore will cause the -// marker to default to an asterisk instead: -// -// ```markdown -// *foo_bar* -// ``` -function emphasis$2(node) { - var marker = this.options.emphasis; - var content = this.all(node).join(''); - - // When in pedantic mode, prevent using underscore as the marker when there - // are underscores in the content. - if ( - this.options.pedantic && - marker === underscore$8 && - content.indexOf(marker) !== -1 - ) { - marker = asterisk$6; - } - return marker + content + marker -} -var _break$2 = lineBreak; +function code(node, _, context) { + var marker = checkFence_1(context); + var raw = node.value || ''; + var suffix = marker === '`' ? 'GraveAccent' : 'Tilde'; + var value; + var sequence; + var exit; + var subexit; -var backslash$a = '\\'; -var lineFeed$t = '\n'; -var space$o = ' '; + if (formatCodeAsIndented_1(node, context)) { + exit = context.enter('codeIndented'); + value = indentLines_1(raw, map$4); + } else { + sequence = repeatString(marker, Math.max(longestStreak_1(raw, marker) + 1, 3)); + exit = context.enter('codeFenced'); + value = sequence; + + if (node.lang) { + subexit = context.enter('codeFencedLang' + suffix); + value += safe_1(context, node.lang, { + before: '`', + after: ' ', + encode: ['`'] + }); + subexit(); + } -var commonmark$1 = backslash$a + lineFeed$t; -var normal = space$o + space$o + lineFeed$t; + if (node.lang && node.meta) { + subexit = context.enter('codeFencedMeta' + suffix); + value += + ' ' + + safe_1(context, node.meta, { + before: ' ', + after: '\n', + encode: ['`'] + }); + subexit(); + } -function lineBreak() { - return this.options.commonmark ? commonmark$1 : normal -} + value += '\n'; -var _delete$2 = strikethrough$1; + if (raw) { + value += raw + '\n'; + } -var tilde$7 = '~'; + value += sequence; + } -var fence$1 = tilde$7 + tilde$7; + exit(); + return value +} -function strikethrough$1(node) { - return fence$1 + this.all(node).join('') + fence$1 +function map$4(line, _, blank) { + return (blank ? '' : ' ') + line } -var encloseUri = enclose; +var association_1 = association; -var leftParenthesis$3 = '('; -var rightParenthesis$5 = ')'; -var lessThan$8 = '<'; -var greaterThan$6 = '>'; -var expression = /\s/; -// Wrap `url` in angle brackets when needed, or when -// forced. -// In links, images, and definitions, the URL part needs -// to be enclosed when it: -// -// - has a length of `0` -// - contains white-space -// - has more or less opening than closing parentheses -function enclose(uri, always) { - if ( - always || - uri.length === 0 || - expression.test(uri) || - ccount_1(uri, leftParenthesis$3) !== ccount_1(uri, rightParenthesis$5) - ) { - return lessThan$8 + uri + greaterThan$6 +var characterEscape$1 = /\\([!-/:-@[-`{-~])/g; +var characterReference$1 = /&(#(\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi; + +// The `label` of an association is the string value: character escapes and +// references work, and casing is intact. +// The `identifier` is used to match one association to another: controversially, +// character escapes and references don’t work in this matching: `©` does +// not match `©`, and `\+` does not match `+`. +// But casing is ignored (and whitespace) is trimmed and collapsed: ` A\nb` +// matches `a b`. +// So, we do prefer the label when figuring out how we’re going to serialize: +// it has whitespace, casing, and we can ignore most useless character escapes +// and all character references. +function association(node) { + if (node.label || !node.identifier) { + return node.label || '' } - return uri + return node.identifier + .replace(characterEscape$1, '$1') + .replace(characterReference$1, decodeIfPossible) +} + +function decodeIfPossible($0, $1) { + return decodeEntity_1($1) || $0 } -var encloseTitle = enclose$1; +var checkQuote_1 = checkQuote; + +function checkQuote(context) { + var marker = context.options.quote || '"'; -var quotationMark$2 = '"'; -var apostrophe$2 = "'"; + if (marker !== '"' && marker !== "'") { + throw new Error( + 'Cannot serialize title with `' + + marker + + '` for `options.quote`, expected `"`, or `\'`' + ) + } -// There is currently no way to support nested delimiters across Markdown.pl, -// CommonMark, and GitHub (RedCarpet). The following code supports Markdown.pl -// and GitHub. -// CommonMark is not supported when mixing double- and single quotes inside a -// title. -function enclose$1(title) { - var delimiter = - title.indexOf(quotationMark$2) === -1 ? quotationMark$2 : apostrophe$2; - return delimiter + title + delimiter + return marker } -var link_1$1 = link$5; +var definition_1 = definition$1; -var space$p = ' '; -var leftSquareBracket$5 = '['; -var rightSquareBracket$5 = ']'; -var leftParenthesis$4 = '('; -var rightParenthesis$6 = ')'; -// Expression for a protocol: -// See . -var protocol$1 = /^[a-z][a-z+.-]+:\/?/i; -// Stringify a link. -// -// When no title exists, the compiled `children` equal `url`, and `url` starts -// with a protocol, an auto link is created: -// -// ```markdown -// -// ``` -// -// Otherwise, is smart about enclosing `url` (see `encloseURI()`) and `title` -// (see `encloseTitle()`). -// ``` -// -// ```markdown -// [foo]( 'An "example" e-mail') -// ``` -// -// Supports named entities in the `url` and `title` when in `settings.encode` -// mode. -function link$5(node) { - var self = this; - var content = self.encode(node.url || '', node); - var exit = self.enterLink(); - var escaped = self.encode(self.escape(node.url || '', node)); - var value = self.all(node).join(''); - exit(); - if (node.title == null && protocol$1.test(content) && escaped === value) { - // Backslash escapes do not work in autolinks, so we do not escape. - return encloseUri(self.encode(node.url), true) +function definition$1(node, _, context) { + var marker = checkQuote_1(context); + var suffix = marker === '"' ? 'Quote' : 'Apostrophe'; + var exit = context.enter('definition'); + var subexit = context.enter('label'); + var value = + '[' + safe_1(context, association_1(node), {before: '[', after: ']'}) + ']: '; + + subexit(); + + if ( + // If there’s no url, or… + !node.url || + // If there’s whitespace, enclosed is prettier. + /[ \t\r\n]/.test(node.url) + ) { + subexit = context.enter('destinationLiteral'); + value += '<' + safe_1(context, node.url, {before: '<', after: '>'}) + '>'; + } else { + // No whitespace, raw is prettier. + subexit = context.enter('destinationRaw'); + value += safe_1(context, node.url, {before: ' ', after: ' '}); } - content = encloseUri(content); + subexit(); if (node.title) { - content += space$p + encloseTitle(self.encode(self.escape(node.title, node), node)); + subexit = context.enter('title' + suffix); + value += + ' ' + + marker + + safe_1(context, node.title, {before: marker, after: marker}) + + marker; + subexit(); } - return ( - leftSquareBracket$5 + - value + - rightSquareBracket$5 + - leftParenthesis$4 + - content + - rightParenthesis$6 - ) + exit(); + + return value } -var copyIdentifierEncoding = copy$4; +var checkEmphasis_1 = checkEmphasis; -var ampersand$4 = '&'; +function checkEmphasis(context) { + var marker = context.options.emphasis || '*'; -var punctuationExppresion = /[-!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~_]/; + if (marker !== '*' && marker !== '_') { + throw new Error( + 'Cannot serialize emphasis with `' + + marker + + '` for `options.emphasis`, expected `*`, or `_`' + ) + } -// For shortcut and collapsed reference links, the contents is also an -// identifier, so we need to restore the original encoding and escaping -// that were present in the source string. -// -// This function takes the unescaped & unencoded value from shortcut’s -// child nodes and the identifier and encodes the former according to -// the latter. -function copy$4(value, identifier) { - var length = value.length; - var count = identifier.length; - var result = []; - var position = 0; - var index = 0; - var start; + return marker +} - while (index < length) { - // Take next non-punctuation characters from `value`. - start = index; +var containerPhrasing = phrasing; - while (index < length && !punctuationExppresion.test(value.charAt(index))) { - index += 1; - } +function phrasing(parent, context, safeOptions) { + var children = parent.children || []; + var results = []; + var index = -1; + var before = safeOptions.before; + var after; + var handle; + var child; - result.push(value.slice(start, index)); + while (++index < children.length) { + child = children[index]; - // Advance `position` to the next punctuation character. - while ( - position < count && - !punctuationExppresion.test(identifier.charAt(position)) - ) { - position += 1; + if (index + 1 < children.length) { + handle = context.handle.handlers[children[index + 1].type]; + if (handle && handle.peek) handle = handle.peek; + after = handle + ? handle(children[index + 1], parent, context, { + before: '', + after: '' + }).charAt(0) + : ''; + } else { + after = safeOptions.after; } - // Take next punctuation characters from `identifier`. - start = position; + results.push( + context.handle(child, parent, context, { + before: before, + after: after + }) + ); + before = results[results.length - 1].slice(-1); + } - while ( - position < count && - punctuationExppresion.test(identifier.charAt(position)) - ) { - if (identifier.charAt(position) === ampersand$4) { - position += entityPrefixLength(identifier.slice(position)); - } + return results.join('') +} - position += 1; - } +var emphasis_1 = emphasis; +emphasis.peek = emphasisPeek; - result.push(identifier.slice(start, position)); - // Advance `index` to the next non-punctuation character. - while (index < length && punctuationExppresion.test(value.charAt(index))) { - index += 1; - } - } - return result.join('') -} -var label_1 = label; +// To do: there are cases where emphasis cannot “form” depending on the +// previous or next character of sequences. +// There’s no way around that though, except for injecting zero-width stuff. +// Do we need to safeguard against that? +function emphasis(node, _, context) { + var marker = checkEmphasis_1(context); + var exit = context.enter('emphasis'); + var value = containerPhrasing(node, context, {before: marker, after: marker}); + exit(); + return marker + value + marker +} -var leftSquareBracket$6 = '['; -var rightSquareBracket$6 = ']'; +function emphasisPeek(node, _, context) { + return context.options.emphasis || '*' +} -var shortcut$2 = 'shortcut'; -var collapsed$1 = 'collapsed'; +var formatHeadingAsSetext_1 = formatHeadingAsSetext; -// Stringify a reference label. -// Because link references are easily, mistakingly, created (for example, -// `[foo]`), reference nodes have an extra property depicting how it looked in -// the original document, so stringification can cause minimal changes. -function label(node) { - var type = node.referenceType; - if (type === shortcut$2) { - return '' - } +function formatHeadingAsSetext(node, context) { return ( - leftSquareBracket$6 + - (type === collapsed$1 ? '' : node.label || node.identifier) + - rightSquareBracket$6 + context.options.setext && (!node.depth || node.depth < 3) && mdastUtilToString(node) ) } -var linkReference_1 = linkReference; +var heading_1 = heading; -var leftSquareBracket$7 = '['; -var rightSquareBracket$7 = ']'; -var shortcut$3 = 'shortcut'; -var collapsed$2 = 'collapsed'; -function linkReference(node) { - var self = this; - var type = node.referenceType; - var exit = self.enterLinkReference(self, node); - var value = self.all(node).join(''); - exit(); - if (type === shortcut$3 || type === collapsed$2) { - value = copyIdentifierEncoding(value, node.label || node.identifier); +function heading(node, _, context) { + var rank = Math.max(Math.min(6, node.depth || 1), 1); + var exit; + var subexit; + var value; + var sequence; + + if (formatHeadingAsSetext_1(node, context)) { + exit = context.enter('headingSetext'); + subexit = context.enter('phrasing'); + value = containerPhrasing(node, context, {before: '\n', after: '\n'}); + subexit(); + exit(); + + return ( + value + + '\n' + + repeatString( + rank === 1 ? '=' : '-', + // The whole size… + value.length - + // Minus the position of the character after the last EOL (or + // 0 if there is none)… + (Math.max(value.lastIndexOf('\r'), value.lastIndexOf('\n')) + 1) + ) + ) } - return leftSquareBracket$7 + value + rightSquareBracket$7 + label_1(node) -} + sequence = repeatString('#', rank); + exit = context.enter('headingAtx'); + subexit = context.enter('phrasing'); + value = containerPhrasing(node, context, {before: '# ', after: '\n'}); + value = value ? sequence + ' ' + value : sequence; + if (context.options.closeAtx) { + value += ' ' + sequence; + } -var imageReference_1 = imageReference; + subexit(); + exit(); -var leftSquareBracket$8 = '['; -var rightSquareBracket$8 = ']'; -var exclamationMark$6 = '!'; + return value +} -function imageReference(node) { - return ( - exclamationMark$6 + - leftSquareBracket$8 + - (this.encode(node.alt, node) || '') + - rightSquareBracket$8 + - label_1(node) - ) +var html_1 = html; + +function html(node) { + return node.value || '' } -var definition_1$1 = definition$1; +var image_1 = image$1; +image$1.peek = imagePeek; + -var space$q = ' '; -var colon$5 = ':'; -var leftSquareBracket$9 = '['; -var rightSquareBracket$9 = ']'; -// Stringify an URL definition. -// -// Is smart about enclosing `url` (see `encloseURI()`) and `title` (see -// `encloseTitle()`). -// -// ```markdown -// [foo]: 'An "example" e-mail' -// ``` -function definition$1(node) { - var content = encloseUri(node.url); + +function image$1(node, _, context) { + var quote = checkQuote_1(context); + var suffix = quote === '"' ? 'Quote' : 'Apostrophe'; + var exit = context.enter('image'); + var subexit = context.enter('label'); + var value = '![' + safe_1(context, node.alt, {before: '[', after: ']'}) + ']('; + + subexit(); + + if ( + // If there’s no url but there is a title… + (!node.url && node.title) || + // Or if there’s markdown whitespace or an eol, enclose. + /[ \t\r\n]/.test(node.url) + ) { + subexit = context.enter('destinationLiteral'); + value += '<' + safe_1(context, node.url, {before: '<', after: '>'}) + '>'; + } else { + // No whitespace, raw is prettier. + subexit = context.enter('destinationRaw'); + value += safe_1(context, node.url, { + before: '(', + after: node.title ? ' ' : ')' + }); + } + + subexit(); if (node.title) { - content += space$q + encloseTitle(node.title); + subexit = context.enter('title' + suffix); + value += + ' ' + + quote + + safe_1(context, node.title, {before: quote, after: quote}) + + quote; + subexit(); } - return ( - leftSquareBracket$9 + - (node.label || node.identifier) + - rightSquareBracket$9 + - colon$5 + - space$q + - content - ) + value += ')'; + exit(); + + return value +} + +function imagePeek() { + return '!' } -var image_1 = image$3; +var imageReference_1 = imageReference; +imageReference.peek = imageReferencePeek; + -var space$r = ' '; -var leftParenthesis$5 = '('; -var rightParenthesis$7 = ')'; -var leftSquareBracket$a = '['; -var rightSquareBracket$a = ']'; -var exclamationMark$7 = '!'; -// Stringify an image. -// -// Is smart about enclosing `url` (see `encloseURI()`) and `title` (see -// `encloseTitle()`). -// -// ```markdown -// ![foo]( 'My "favourite" icon') -// ``` -// -// Supports named entities in `url`, `alt`, and `title` when in -// `settings.encode` mode. -function image$3(node) { - var self = this; - var content = encloseUri(self.encode(node.url || '', node)); - var exit = self.enterLink(); - var alt = self.encode(self.escape(node.alt || '', node)); +function imageReference(node, _, context) { + var type = node.referenceType; + var exit = context.enter('imageReference'); + var subexit = context.enter('label'); + var alt = safe_1(context, node.alt, {before: '[', after: ']'}); + var value = '![' + alt + ']'; + var reference; + var stack; + + subexit(); + // Hide the fact that we’re in phrasing, because escapes don’t work. + stack = context.stack; + context.stack = []; + subexit = context.enter('reference'); + reference = safe_1(context, association_1(node), {before: '[', after: ']'}); + subexit(); + context.stack = stack; exit(); - if (node.title) { - content += space$r + encloseTitle(self.encode(node.title, node)); + if (type === 'full' || !alt || alt !== reference) { + value += '[' + reference + ']'; + } else if (type !== 'shortcut') { + value += '[]'; } - return ( - exclamationMark$7 + - leftSquareBracket$a + - alt + - rightSquareBracket$a + - leftParenthesis$5 + - content + - rightParenthesis$7 - ) + return value } -var markdownTable_1 = markdownTable; +function imageReferencePeek() { + return '!' +} -var trailingWhitespace = / +$/; +var inlineCode_1 = inlineCode; +inlineCode.peek = inlineCodePeek; -// Characters. -var space$s = ' '; -var lineFeed$u = '\n'; -var dash$a = '-'; -var colon$6 = ':'; -var verticalBar$2 = '|'; +function inlineCode(node) { + var value = node.value || ''; + var sequence = '`'; + var pad = ''; -var x = 0; -var C = 67; -var L$1 = 76; -var R = 82; -var c$1 = 99; -var l$1 = 108; -var r = 114; + // If there is a single grave accent on its own in the code, use a fence of + // two. + // If there are two in a row, use one. + while (new RegExp('(^|[^`])' + sequence + '([^`]|$)').test(value)) { + sequence += '`'; + } -// Create a table from a matrix of strings. -function markdownTable(table, options) { - var settings = options || {}; - var padding = settings.padding !== false; - var start = settings.delimiterStart !== false; - var end = settings.delimiterEnd !== false; - var align = (settings.align || []).concat(); - var alignDelimiters = settings.alignDelimiters !== false; - var alignments = []; - var stringLength = settings.stringLength || defaultStringLength; - var rowIndex = -1; - var rowLength = table.length; - var cellMatrix = []; - var sizeMatrix = []; - var row = []; - var sizes = []; - var longestCellByColumn = []; - var mostCellsPerRow = 0; - var cells; - var columnIndex; - var columnLength; - var largest; - var size; - var cell; - var lines; - var line; - var before; - var after; - var code; + // If this is not just spaces or eols (tabs don’t count), and either the + // first or last character are a space, eol, or tick, then pad with spaces. + if ( + /[^ \r\n]/.test(value) && + (/[ \r\n`]/.test(value.charAt(0)) || + /[ \r\n`]/.test(value.charAt(value.length - 1))) + ) { + pad = ' '; + } - // This is a superfluous loop if we don’t align delimiters, but otherwise we’d - // do superfluous work when aligning, so optimize for aligning. - while (++rowIndex < rowLength) { - cells = table[rowIndex]; - columnIndex = -1; - columnLength = cells.length; - row = []; - sizes = []; + return sequence + pad + value + pad + sequence +} - if (columnLength > mostCellsPerRow) { - mostCellsPerRow = columnLength; - } +function inlineCodePeek() { + return '`' +} - while (++columnIndex < columnLength) { - cell = serialize(cells[columnIndex]); +var formatLinkAsAutolink_1 = formatLinkAsAutolink; - if (alignDelimiters === true) { - size = stringLength(cell); - sizes[columnIndex] = size; - largest = longestCellByColumn[columnIndex]; - if (largest === undefined || size > largest) { - longestCellByColumn[columnIndex] = size; - } - } +function formatLinkAsAutolink(node) { + var raw = mdastUtilToString(node); - row.push(cell); - } + return ( + // If there’s a url… + node.url && + // And there’s a no title… + !node.title && + // And if the url is the same as the content… + (raw === node.url || 'mailto:' + raw === node.url) && + // And that starts w/ a protocol… + /^[a-z][a-z+.-]+:/i.test(node.url) && + // And that doesn’t contain ASCII control codes (character escapes and + // references don’t work) or angle brackets… + !/[\0- <>\u007F]/.test(node.url) + ) +} - cellMatrix[rowIndex] = row; - sizeMatrix[rowIndex] = sizes; - } +var link_1 = link$2; +link$2.peek = linkPeek; - // Figure out which alignments to use. - columnIndex = -1; - columnLength = mostCellsPerRow; - if (typeof align === 'object' && 'length' in align) { - while (++columnIndex < columnLength) { - alignments[columnIndex] = toAlignment(align[columnIndex]); - } - } else { - code = toAlignment(align); - while (++columnIndex < columnLength) { - alignments[columnIndex] = code; - } + + + +function link$2(node, _, context) { + var quote = checkQuote_1(context); + var suffix = quote === '"' ? 'Quote' : 'Apostrophe'; + var exit; + var subexit; + var value; + var stack; + + if (formatLinkAsAutolink_1(node)) { + // Hide the fact that we’re in phrasing, because escapes don’t work. + stack = context.stack; + context.stack = []; + exit = context.enter('autolink'); + value = '<' + containerPhrasing(node, context, {before: '<', after: '>'}) + '>'; + exit(); + context.stack = stack; + return value } - // Inject the alignment row. - columnIndex = -1; - columnLength = mostCellsPerRow; - row = []; - sizes = []; + exit = context.enter('link'); + subexit = context.enter('label'); + value = '[' + containerPhrasing(node, context, {before: '[', after: ']'}) + ']('; + subexit(); - while (++columnIndex < columnLength) { - code = alignments[columnIndex]; - before = ''; - after = ''; + if ( + // If there’s no url but there is a title… + (!node.url && node.title) || + // Or if there’s markdown whitespace or an eol, enclose. + /[ \t\r\n]/.test(node.url) + ) { + subexit = context.enter('destinationLiteral'); + value += '<' + safe_1(context, node.url, {before: '<', after: '>'}) + '>'; + } else { + // No whitespace, raw is prettier. + subexit = context.enter('destinationRaw'); + value += safe_1(context, node.url, { + before: '(', + after: node.title ? ' ' : ')' + }); + } - if (code === l$1) { - before = colon$6; - } else if (code === r) { - after = colon$6; - } else if (code === c$1) { - before = colon$6; - after = colon$6; - } + subexit(); - // There *must* be at least one hyphen-minus in each alignment cell. - size = alignDelimiters - ? Math.max( - 1, - longestCellByColumn[columnIndex] - before.length - after.length - ) - : 1; + if (node.title) { + subexit = context.enter('title' + suffix); + value += + ' ' + + quote + + safe_1(context, node.title, {before: quote, after: quote}) + + quote; + subexit(); + } - cell = before + repeatString(dash$a, size) + after; + value += ')'; - if (alignDelimiters === true) { - size = before.length + size + after.length; + exit(); + return value +} - if (size > longestCellByColumn[columnIndex]) { - longestCellByColumn[columnIndex] = size; - } +function linkPeek(node) { + return formatLinkAsAutolink_1(node) ? '<' : '[' +} - sizes[columnIndex] = size; - } +var linkReference_1 = linkReference; +linkReference.peek = linkReferencePeek; - row[columnIndex] = cell; + + + + +function linkReference(node, _, context) { + var type = node.referenceType; + var exit = context.enter('linkReference'); + var subexit = context.enter('label'); + var text = containerPhrasing(node, context, {before: '[', after: ']'}); + var value = '[' + text + ']'; + var reference; + var stack; + + subexit(); + // Hide the fact that we’re in phrasing, because escapes don’t work. + stack = context.stack; + context.stack = []; + subexit = context.enter('reference'); + reference = safe_1(context, association_1(node), {before: '[', after: ']'}); + subexit(); + context.stack = stack; + exit(); + + if (type === 'full' || !text || text !== reference) { + value += '[' + reference + ']'; + } else if (type !== 'shortcut') { + value += '[]'; } - // Inject the alignment row. - cellMatrix.splice(1, 0, row); - sizeMatrix.splice(1, 0, sizes); + return value +} - rowIndex = -1; - rowLength = cellMatrix.length; - lines = []; +function linkReferencePeek() { + return '[' +} - while (++rowIndex < rowLength) { - row = cellMatrix[rowIndex]; - sizes = sizeMatrix[rowIndex]; - columnIndex = -1; - columnLength = mostCellsPerRow; - line = []; +var list_1$1 = list$1; - while (++columnIndex < columnLength) { - cell = row[columnIndex] || ''; - before = ''; - after = ''; - if (alignDelimiters === true) { - size = longestCellByColumn[columnIndex] - (sizes[columnIndex] || 0); - code = alignments[columnIndex]; - if (code === r) { - before = repeatString(space$s, size); - } else if (code === c$1) { - if (size % 2 === 0) { - before = repeatString(space$s, size / 2); - after = before; - } else { - before = repeatString(space$s, size / 2 + 0.5); - after = repeatString(space$s, size / 2 - 0.5); - } - } else { - after = repeatString(space$s, size); - } - } +function list$1(node, _, context) { + var exit = context.enter('list'); + var value = containerFlow(node, context); + exit(); + return value +} - if (start === true && columnIndex === 0) { - line.push(verticalBar$2); - } +var checkBullet_1 = checkBullet; - if ( - padding === true && - // Don’t add the opening space if we’re not aligning and the cell is - // empty: there will be a closing space. - !(alignDelimiters === false && cell === '') && - (start === true || columnIndex !== 0) - ) { - line.push(space$s); - } +function checkBullet(context) { + var marker = context.options.bullet || '*'; - if (alignDelimiters === true) { - line.push(before); - } + if (marker !== '*' && marker !== '+' && marker !== '-') { + throw new Error( + 'Cannot serialize items with `' + + marker + + '` for `options.bullet`, expected `*`, `+`, or `-`' + ) + } - line.push(cell); + return marker +} - if (alignDelimiters === true) { - line.push(after); - } +var checkListItemIndent_1 = checkListItemIndent; - if (padding === true) { - line.push(space$s); - } +function checkListItemIndent(context) { + var style = context.options.listItemIndent || 'tab'; - if (end === true || columnIndex !== columnLength - 1) { - line.push(verticalBar$2); - } - } + if (style === 1 || style === '1') { + return 'one' + } - line = line.join(''); + if (style !== 'tab' && style !== 'one' && style !== 'mixed') { + throw new Error( + 'Cannot serialize items with `' + + style + + '` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`' + ) + } - if (end === false) { - line = line.replace(trailingWhitespace, ''); + return style +} + +var listItem_1 = listItem; + + + + + + + +function listItem(node, parent, context) { + var bullet = checkBullet_1(context); + var listItemIndent = checkListItemIndent_1(context); + var size; + var value; + var exit; + + if (parent && parent.ordered) { + bullet = + (parent.start > -1 ? parent.start : 1) + + (context.options.incrementListMarker === false + ? 0 + : parent.children.indexOf(node)) + + '.'; + } + + size = bullet.length + 1; + + if ( + listItemIndent === 'tab' || + (listItemIndent === 'mixed' && ((parent && parent.spread) || node.spread)) + ) { + size = Math.ceil(size / 4) * 4; + } + + exit = context.enter('listItem'); + value = indentLines_1(containerFlow(node, context), map); + exit(); + + return value + + function map(line, index, blank) { + if (index) { + return (blank ? '' : repeatString(' ', size)) + line } - lines.push(line); + return (blank ? bullet : bullet + repeatString(' ', size - bullet.length)) + line } +} - return lines.join(lineFeed$u) +var paragraph_1 = paragraph; + + + +function paragraph(node, _, context) { + var exit = context.enter('paragraph'); + var subexit = context.enter('phrasing'); + var value = containerPhrasing(node, context, {before: '\n', after: '\n'}); + subexit(); + exit(); + return value } -function serialize(value) { - return value === null || value === undefined ? '' : String(value) +var root_1 = root$1; + + + +function root$1(node, _, context) { + return containerFlow(node, context) } -function defaultStringLength(value) { - return value.length +var checkStrong_1 = checkStrong; + +function checkStrong(context) { + var marker = context.options.strong || '*'; + + if (marker !== '*' && marker !== '_') { + throw new Error( + 'Cannot serialize strong with `' + + marker + + '` for `options.strong`, expected `*`, or `_`' + ) + } + + return marker } -function toAlignment(value) { - var code = typeof value === 'string' ? value.charCodeAt(0) : x; +var strong_1 = strong; +strong.peek = strongPeek; - return code === L$1 || code === l$1 - ? l$1 - : code === R || code === r - ? r - : code === C || code === c$1 - ? c$1 - : x + + + +// To do: there are cases where emphasis cannot “form” depending on the +// previous or next character of sequences. +// There’s no way around that though, except for injecting zero-width stuff. +// Do we need to safeguard against that? +function strong(node, _, context) { + var marker = checkStrong_1(context); + var exit = context.enter('strong'); + var value = containerPhrasing(node, context, {before: marker, after: marker}); + exit(); + return marker + marker + value + marker + marker } -var table_1$1 = table$1; +function strongPeek(node, _, context) { + return context.options.strong || '*' +} -// Stringify table. -// -// Creates a fenced table. -// The table has aligned delimiters by default, but not in -// `tablePipeAlign: false`: -// -// ```markdown -// | Header 1 | Header 2 | -// | :-: | - | -// | Alpha | Bravo | -// ``` -// -// The table is spaced by default, but not in `tableCellPadding: false`: -// -// ```markdown -// |Foo|Bar| -// |:-:|---| -// |Baz|Qux| -// ``` -function table$1(node) { - var self = this; - var options = self.options; - var padding = options.tableCellPadding; - var alignDelimiters = options.tablePipeAlign; - var stringLength = options.stringLength; - var rows = node.children; - var index = rows.length; - var exit = self.enterTable(); - var result = []; +var text_1$1 = text$2; - while (index--) { - result[index] = self.all(rows[index]); + + +function text$2(node, parent, context, safeOptions) { + return safe_1(context, node.value, safeOptions) +} + +var checkRuleRepeat = checkRule; + +function checkRule(context) { + var repetition = context.options.ruleRepetition || 3; + + if (repetition < 3) { + throw new Error( + 'Cannot serialize rules with repetition `' + + repetition + + '` for `options.ruleRepetition`, expected `3` or more' + ) } - exit(); + return repetition +} - return markdownTable_1(result, { - align: node.align, - alignDelimiters: alignDelimiters, - padding: padding, - stringLength: stringLength - }) +var checkRule_1 = checkRule$1; + +function checkRule$1(context) { + var marker = context.options.rule || '*'; + + if (marker !== '*' && marker !== '-' && marker !== '_') { + throw new Error( + 'Cannot serialize rules with `' + + marker + + '` for `options.rule`, expected `*`, `-`, or `_`' + ) + } + + return marker } -var tableCell_1 = tableCell; - -var lineFeed$v = /\r?\n/g; - -function tableCell(node) { - return this.all(node).join('').replace(lineFeed$v, ' ') -} - -var compiler = Compiler; - -// Construct a new compiler. -function Compiler(tree, file) { - this.inLink = false; - this.inTable = false; - this.tree = tree; - this.file = file; - this.options = immutable(this.options); - this.setOptions({}); -} - -var proto$5 = Compiler.prototype; - -// Enter and exit helpers. */ -proto$5.enterLink = stateToggle('inLink', false); -proto$5.enterTable = stateToggle('inTable', false); -proto$5.enterLinkReference = enterLinkReference; - -// Configuration. -proto$5.options = defaults$3; -proto$5.setOptions = setOptions_1$1; - -proto$5.compile = compile_1$1; -proto$5.visit = one_1; -proto$5.all = all_1; -proto$5.block = block_1; -proto$5.visitOrderedItems = orderedItems_1; -proto$5.visitUnorderedItems = unorderedItems_1; - -// Expose visitors. -proto$5.visitors = { - root: root_1, - text: text_1$1, - heading: heading_1, - paragraph: paragraph_1$1, - blockquote: blockquote_1$1, - list: list_1$1, - listItem: listItem_1, - inlineCode: inlineCode_1, - code: code_1, - html: html_1, - thematicBreak: thematicBreak$1, - strong: strong_1$1, - emphasis: emphasis_1$1, - break: _break$2, - delete: _delete$2, - link: link_1$1, - linkReference: linkReference_1, - imageReference: imageReference_1, - definition: definition_1$1, - image: image_1, - table: table_1$1, - tableCell: tableCell_1 -}; +var thematicBreak_1 = thematicBreak$1; + + + + + +function thematicBreak$1(node, parent, context) { + var value = repeatString( + checkRule_1(context) + (context.options.ruleSpaces ? ' ' : ''), + checkRuleRepeat(context) + ); + + return context.options.ruleSpaces ? value.slice(0, -1) : value +} + +var blockquote$1 = blockquote_1; +var _break$1 = _break; +var code$1 = code_1; +var definition$2 = definition_1; +var emphasis$1 = emphasis_1; +var hardBreak$1 = _break; +var heading$1 = heading_1; +var html$1 = html_1; +var image$2 = image_1; +var imageReference$1 = imageReference_1; +var inlineCode$1 = inlineCode_1; +var link$3 = link_1; +var linkReference$1 = linkReference_1; +var list$2 = list_1$1; +var listItem$1 = listItem_1; +var paragraph$1 = paragraph_1; +var root$2 = root_1; +var strong$1 = strong_1; +var text$3 = text_1$1; +var thematicBreak$2 = thematicBreak_1; + +var handle = { + blockquote: blockquote$1, + break: _break$1, + code: code$1, + definition: definition$2, + emphasis: emphasis$1, + hardBreak: hardBreak$1, + heading: heading$1, + html: html$1, + image: image$2, + imageReference: imageReference$1, + inlineCode: inlineCode$1, + link: link$3, + linkReference: linkReference$1, + list: list$2, + listItem: listItem$1, + paragraph: paragraph$1, + root: root$2, + strong: strong$1, + text: text$3, + thematicBreak: thematicBreak$2 +}; + +var unsafe = [ + { + character: '\t', + inConstruct: ['codeFencedLangGraveAccent', 'codeFencedLangTilde'] + }, + { + character: '\r', + inConstruct: [ + 'codeFencedLangGraveAccent', + 'codeFencedLangTilde', + 'codeFencedMetaGraveAccent', + 'codeFencedMetaTilde', + 'destinationLiteral', + 'headingAtx' + ] + }, + { + character: '\n', + inConstruct: [ + 'codeFencedLangGraveAccent', + 'codeFencedLangTilde', + 'codeFencedMetaGraveAccent', + 'codeFencedMetaTilde', + 'destinationLiteral', + 'headingAtx' + ] + }, + { + character: ' ', + inConstruct: ['codeFencedLangGraveAccent', 'codeFencedLangTilde'] + }, + // An exclamation mark can start an image, if it is followed by a link or + // a link reference. + {character: '!', after: '\\[', inConstruct: 'phrasing'}, + // A quote can break out of a title. + {character: '"', inConstruct: 'titleQuote'}, + // A number sign could start an ATX heading if it starts a line. + {atBreak: true, character: '#'}, + // Dollar sign and percentage are not used in markdown. + // An ampersand could start a character reference. + {character: '&', after: '[#A-Za-z]', inConstruct: 'phrasing'}, + // An apostrophe can break out of a title. + {character: "'", inConstruct: 'titleApostrophe'}, + // A left paren could break out of a destination raw. + {character: '(', inConstruct: 'destinationRaw'}, + {before: '\\]', character: '(', inConstruct: 'phrasing'}, + // A right paren could start a list item or break out of a destination + // raw. + {atBreak: true, before: '\\d+', character: ')'}, + {character: ')', inConstruct: 'destinationRaw'}, + // An asterisk can start thematic breaks, list items, emphasis, strong. + {atBreak: true, character: '*'}, + {character: '*', inConstruct: 'phrasing'}, + // A plus sign could start a list item. + {atBreak: true, character: '+'}, + // A dash can start thematic breaks, list items, and setext heading + // underlines. + {atBreak: true, character: '-'}, + // A dot could start a list item. + {atBreak: true, before: '\\d+', character: '.', after: '(?:[ \t\r\n]|$)'}, + // Slash, colon, and semicolon are not used in markdown for constructs. + // A less than can start html (flow or text) or an autolink. + // HTML could start with an exclamation mark (declaration, cdata, comment), + // slash (closing tag), question mark (instruction), or a letter (tag). + // An autolink also starts with a letter. + // Finally, it could break out of a destination literal. + {atBreak: true, character: '<', after: '[!/?A-Za-z]'}, + {character: '<', after: '[!/?A-Za-z]', inConstruct: 'phrasing'}, + {character: '<', inConstruct: 'destinationLiteral'}, + // An equals to can start setext heading underlines. + {atBreak: true, character: '='}, + // A greater than can start block quotes and it can break out of a + // destination literal. + {atBreak: true, character: '>'}, + {character: '>', inConstruct: 'destinationLiteral'}, + // Question mark and at sign are not used in markdown for constructs. + // A left bracket can start definitions, references, labels, + {atBreak: true, character: '['}, + { + character: '[', + inConstruct: ['phrasing', 'label', 'reference'] + }, + // A backslash can start an escape (when followed by punctuation) or a + // hard break (when followed by an eol). + {character: '\\', after: '[!-/:-@[-`{-~]'}, + {character: '\\', after: '[\\r\\n]', inConstruct: 'phrasing'}, + // A right bracket can exit labels. + { + character: ']', + inConstruct: ['label', 'reference'] + }, + // Caret is not used in markdown for constructs. + // An underscore can start emphasis, strong, or a thematic break. + {atBreak: true, character: '_'}, + {before: '[^A-Za-z]', character: '_', inConstruct: 'phrasing'}, + {character: '_', after: '[^A-Za-z]', inConstruct: 'phrasing'}, + // A grave accent can start code (fenced or text), or it can break out of + // a grave accent code fence. + {atBreak: true, character: '`'}, + { + character: '`', + inConstruct: [ + 'codeFencedLangGraveAccent', + 'codeFencedMetaGraveAccent', + 'phrasing' + ] + }, + // Left brace, vertical bar, right brace are not used in markdown for + // constructs. + // A tilde can start code (fenced). + {atBreak: true, character: '~'} +]; + +var join$2 = [joinDefaults]; + + + + +function joinDefaults(left, right, parent, context) { + if ( + // Two lists with the same marker. + (right.type === 'list' && + right.type === left.type && + Boolean(left.ordered) === Boolean(right.ordered)) || + // Indented code after list or another indented code. + (right.type === 'code' && + formatCodeAsIndented_1(right, context) && + (left.type === 'list' || + (left.type === right.type && formatCodeAsIndented_1(left, context)))) + ) { + return false + } + + // Join children of a list or an item. + // In which case, `parent` has a `spread` field. + if (typeof parent.spread === 'boolean') { + if ( + left.type === 'paragraph' && + // Two paragraphs. + (left.type === right.type || + right.type === 'definition' || + // Paragraph followed by a setext heading. + (right.type === 'heading' && formatHeadingAsSetext_1(right, context))) + ) { + return + } + + return parent.spread ? 1 : 0 + } +} + +var lib$7 = toMarkdown; + + + + + + +function toMarkdown(tree, options) { + var settings = options || {}; + var extensions = configure$3(settings); + var stack = []; + var handle = zwitch('type', { + invalid: invalid, + unknown: unknown, + handlers: extensions.handlers + }); + var context = { + handle: handle, + stack: stack, + enter: enter, + options: settings, + unsafePatterns: extensions.unsafe, + join: extensions.join + }; + var result = handle(tree, null, context, {before: '\n', after: '\n'}); + + if ( + result && + result.charCodeAt(result.length - 1) !== 10 && + result.charCodeAt(result.length - 1) !== 13 + ) { + result += '\n'; + } + + return result + + function enter(name) { + stack.push(name); + return exit + + function exit() { + stack.pop(); + } + } +} + +function invalid(value) { + throw new Error('Cannot handle value `' + value + '`, expected node') +} + +function unknown(node) { + throw new Error('Cannot handle unknown node `' + node.type + '`') +} + +function configure$3(settings) { + var extensions = [ + {unsafe: settings.unsafe, handlers: settings.handlers, join: settings.join} + ].concat(settings.extensions || []); + var unsafe$1 = unsafe; + var join = join$2; + var handlers = Object.assign({}, handle); + var index = -1; + + if (settings.tightDefinitions) { + join = [joinDefinition].concat(join); + } + + while (++index < extensions.length) { + unsafe$1 = unsafe$1.concat(extensions[index].unsafe || []); + join = join.concat(extensions[index].join || []); + Object.assign(handlers, extensions[index].handlers || {}); + } + + return {unsafe: unsafe$1, join: join, handlers: handlers} +} + +function joinDefinition(left, right) { + // No blank line between adjacent definitions. + if (left.type === 'definition' && left.type === right.type) { + return 0 + } +} + +var mdastUtilToMarkdown = lib$7; var remarkStringify = stringify$6; -stringify$6.Compiler = compiler; + + function stringify$6(options) { - var Local = unherit_1(compiler); - Local.prototype.options = immutable( - Local.prototype.options, - this.data('settings'), - options - ); - this.Compiler = Local; + var self = this; + + this.Compiler = compile; + + function compile(tree) { + return mdastUtilToMarkdown( + tree, + Object.assign({}, self.data('settings'), options, { + // Note: this option is not in the readme. + // The goal is for it to be set by plugins on `data` instead of being + // passed by users. + extensions: self.data('toMarkdownExtensions') || [] + }) + ) + } } var remark = unified_1().use(remarkParse).use(remarkStringify).freeze(); -const _from = "remark@^12.0.0"; -const _id = "remark@12.0.1"; -const _inBundle = false; -const _integrity = "sha512-gS7HDonkdIaHmmP/+shCPejCEEW+liMp/t/QwmF0Xt47Rpuhl32lLtDV1uKWvGoq+kxr5jSgg5oAIpGuyULjUw=="; -const _location = "/remark"; -const _phantomChildren = { -}; -const _requested = { - type: "range", - registry: true, - raw: "remark@^12.0.0", - name: "remark", - escapedName: "remark", - rawSpec: "^12.0.0", - saveSpec: null, - fetchSpec: "^12.0.0" -}; -const _requiredBy = [ - "/" -]; -const _resolved = "https://registry.npmjs.org/remark/-/remark-12.0.1.tgz"; -const _shasum = "f1ddf68db7be71ca2bad0a33cd3678b86b9c709f"; -const _spec = "remark@^12.0.0"; -const _where = "/Users/trott/io.js/tools/node-lint-md-cli-rollup"; -const author = { - name: "Titus Wormer", - email: "tituswormer@gmail.com", - url: "https://wooorm.com" -}; -const bugs = { - url: "https://github.com/remarkjs/remark/issues" -}; -const bundleDependencies = false; -const contributors = [ - { - name: "Titus Wormer", - email: "tituswormer@gmail.com", - url: "https://wooorm.com" - } -]; -const dependencies = { - "remark-parse": "^8.0.0", - "remark-stringify": "^8.0.0", - unified: "^9.0.0" -}; -const deprecated$1 = false; +const name = "remark"; +const version$1 = "13.0.0"; const description = "Markdown processor powered by plugins part of the unified collective"; -const files = [ - "index.js", - "types/index.d.ts" -]; -const funding = { - type: "opencollective", - url: "https://opencollective.com/unified" -}; -const homepage = "https://remark.js.org"; +const license = "MIT"; const keywords = [ "unified", "remark", @@ -43639,101 +42278,87 @@ const keywords = [ "compile", "process" ]; -const license = "MIT"; -const name$1 = "remark"; -const repository = { - type: "git", - url: "https://github.com/remarkjs/remark/tree/main/packages/remark" +const homepage = "https://remark.js.org"; +const repository = "https://github.com/remarkjs/remark/tree/main/packages/remark"; +const bugs = "https://github.com/remarkjs/remark/issues"; +const funding = { + type: "opencollective", + url: "https://opencollective.com/unified" +}; +const author = "Titus Wormer (https://wooorm.com)"; +const contributors = [ + "Titus Wormer (https://wooorm.com)" +]; +const files = [ + "index.js", + "types/index.d.ts" +]; +const types = "types/index.d.ts"; +const dependencies = { + "remark-parse": "^9.0.0", + "remark-stringify": "^9.0.0", + unified: "^9.1.0" }; const scripts = { test: "tape test.js" }; -const types = "types/index.d.ts"; -const version$1 = "12.0.1"; const xo = false; var _package = { - _from: _from, - _id: _id, - _inBundle: _inBundle, - _integrity: _integrity, - _location: _location, - _phantomChildren: _phantomChildren, - _requested: _requested, - _requiredBy: _requiredBy, - _resolved: _resolved, - _shasum: _shasum, - _spec: _spec, - _where: _where, - author: author, - bugs: bugs, - bundleDependencies: bundleDependencies, - contributors: contributors, - dependencies: dependencies, - deprecated: deprecated$1, + name: name, + version: version$1, description: description, - files: files, - funding: funding, - homepage: homepage, - keywords: keywords, license: license, - name: name$1, + keywords: keywords, + homepage: homepage, repository: repository, - scripts: scripts, + bugs: bugs, + funding: funding, + author: author, + contributors: contributors, + files: files, types: types, - version: version$1, + dependencies: dependencies, + scripts: scripts, xo: xo }; var _package$1 = /*#__PURE__*/Object.freeze({ __proto__: null, - _from: _from, - _id: _id, - _inBundle: _inBundle, - _integrity: _integrity, - _location: _location, - _phantomChildren: _phantomChildren, - _requested: _requested, - _requiredBy: _requiredBy, - _resolved: _resolved, - _shasum: _shasum, - _spec: _spec, - _where: _where, - author: author, - bugs: bugs, - bundleDependencies: bundleDependencies, - contributors: contributors, - dependencies: dependencies, - deprecated: deprecated$1, + name: name, + version: version$1, description: description, - files: files, - funding: funding, - homepage: homepage, - keywords: keywords, license: license, - name: name$1, + keywords: keywords, + homepage: homepage, repository: repository, - scripts: scripts, + bugs: bugs, + funding: funding, + author: author, + contributors: contributors, + files: files, types: types, - version: version$1, + dependencies: dependencies, + scripts: scripts, xo: xo, 'default': _package }); -const name$2 = "node-lint-md-cli-rollup"; +const name$1 = "node-lint-md-cli-rollup"; const description$1 = "remark packaged for Node.js Markdown linting"; const version$2 = "2.0.2"; const devDependencies = { "@rollup/plugin-commonjs": "^11.0.1", "@rollup/plugin-json": "^4.0.1", "@rollup/plugin-node-resolve": "^7.0.0", - rollup: "^1.30.1", - shx: "^0.3.2" + rollup: "^2.32.1", + shx: "^0.3.3" }; const dependencies$1 = { "markdown-extensions": "^1.1.1", - remark: "^12.0.0", + remark: "^13.0.0", + "remark-gfm": "^1.0.0", "remark-lint": "^7.0.0", - "remark-preset-lint-node": "^1.17.1", + "remark-preset-lint-node": "^2.0.0", "unified-args": "^8.0.0" }; const main = "dist/index.js"; @@ -43742,7 +42367,7 @@ const scripts$1 = { "build-node": "npm run build && npx shx cp dist/index.js ../lint-md.js" }; var _package$2 = { - name: name$2, + name: name$1, description: description$1, version: version$2, devDependencies: devDependencies, @@ -43753,7 +42378,7 @@ var _package$2 = { var _package$3 = /*#__PURE__*/Object.freeze({ __proto__: null, - name: name$2, + name: name$1, description: description$1, version: version$2, devDependencies: devDependencies, @@ -43763,99 +42388,402 @@ var _package$3 = /*#__PURE__*/Object.freeze({ 'default': _package$2 }); -var unifiedMessageControl = messageControl; +var vfileLocation = factory$2; -function messageControl(options) { - var settings = options || {}; - var name = settings.name; - var marker = settings.marker; - var test = settings.test; - var sources = settings.source; - var known = settings.known; - var reset = settings.reset; - var enable = settings.enable || []; - var disable = settings.disable || []; +function factory$2(file) { + var contents = indices(String(file)); + var toPoint = offsetToPointFactory(contents); - if (!name) { - throw new Error('Expected `name` in `options`, got `' + name + '`') + return { + toPoint: toPoint, + toPosition: toPoint, + toOffset: pointToOffsetFactory(contents) } +} - if (!marker) { - throw new Error('Expected `marker` in `options`, got `' + marker + '`') - } +// Factory to get the line and column-based `point` for `offset` in the bound +// indices. +function offsetToPointFactory(indices) { + return offsetToPoint - if (!sources) { - sources = [name]; - } else if (typeof sources === 'string') { - sources = [sources]; - } + // Get the line and column-based `point` for `offset` in the bound indices. + function offsetToPoint(offset) { + var index = -1; + var length = indices.length; - return transformer + if (offset < 0) { + return {} + } - function transformer(tree, file) { - var toOffset = vfileLocation(file).toOffset; - var initial = !reset; - var gaps = detectGaps(tree, file); - var scope = {}; - var globals = []; + while (++index < length) { + if (indices[index] > offset) { + return { + line: index + 1, + column: offset - (indices[index - 1] || 0) + 1, + offset: offset + } + } + } - unistUtilVisit(tree, test, visitor); + return {} + } +} - file.messages = file.messages.filter(filter); +// Factory to get the `offset` for a line and column-based `point` in the +// bound indices. +function pointToOffsetFactory(indices) { + return pointToOffset - function visitor(node, position, parent) { - var mark = marker(node); - var ruleIds; - var ruleId; - var verb; - var index; - var length; - var next; - var pos; - var tail; + // Get the `offset` for a line and column-based `point` in the bound + // indices. + function pointToOffset(point) { + var line = point && point.line; + var column = point && point.column; - if (!mark || mark.name !== name) { - return - } + if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { + return (indices[line - 2] || 0) + column - 1 || 0 + } - ruleIds = mark.attributes.split(/\s/g); - verb = ruleIds.shift(); - next = parent.children[position + 1]; - pos = mark.node.position && mark.node.position.start; - tail = next && next.position && next.position.end; + return -1 + } +} - if (verb !== 'enable' && verb !== 'disable' && verb !== 'ignore') { - file.fail( - 'Unknown keyword `' + - verb + - '`: expected ' + - "`'enable'`, `'disable'`, or `'ignore'`", - mark.node - ); - } +// Get indices of line-breaks in `value`. +function indices(value) { + var result = []; + var index = value.indexOf('\n'); - length = ruleIds.length; - index = -1; + while (index !== -1) { + result.push(index + 1); + index = value.indexOf('\n', index + 1); + } - // Apply to all rules. - if (length === 0) { - if (verb === 'ignore') { - toggle(pos, false); - toggle(tail, true); - } else { - toggle(pos, verb === 'enable'); - reset = verb !== 'enable'; - } - } else { - while (++index < length) { - ruleId = ruleIds[index]; + result.push(value.length + 1); - if (isKnown(ruleId, verb, mark.node)) { - toggle(pos, verb === 'enable', ruleId); + return result +} - if (verb === 'ignore') { - toggle(tail, true, ruleId); - } +var convert_1 = convert$3; + +function convert$3(test) { + if (typeof test === 'string') { + return typeFactory(test) + } + + if (test === null || test === undefined) { + return ok$1 + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory : matchesFactory)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$3(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory(tests) { + var checks = convertAll(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$1() { + return true +} + +var color_1 = color$1; +function color$1(d) { + return '\u001B[33m' + d + '\u001B[39m' +} + +var unistUtilVisitParents = visitParents; + + + + +var CONTINUE = true; +var SKIP = 'skip'; +var EXIT = false; + +visitParents.CONTINUE = CONTINUE; +visitParents.SKIP = SKIP; +visitParents.EXIT = EXIT; + +function visitParents(tree, test, visitor, reverse) { + var is; + + if (func(test) && !func(visitor)) { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1(test); + + one(tree, null, [])(); + + function one(child, index, parents) { + var value = object(child) ? child : {}; + var name; + + if (string$2(value.type)) { + name = string$2(value.tagName) + ? value.tagName + : string$2(value.name) + ? value.name + : undefined; + + node.displayName = + 'node (' + color_1(value.type + (name ? '<' + name + '>' : '')) + ')'; + } + + return node + + function node() { + var result = []; + var subresult; + + if (!test || is(child, index, parents[parents.length - 1] || null)) { + result = toResult(visitor(child, parents)); + + if (result[0] === EXIT) { + return result + } + } + + if (!child.children || result[0] === SKIP) { + return result + } + + subresult = toResult(children(child.children, parents.concat(child))); + return subresult[0] === EXIT ? subresult : result + } + } + + // Visit children in `parent`. + function children(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var child; + var result; + + while (index > min && index < children.length) { + child = children[index]; + result = one(child, index, parents)(); + + if (result[0] === EXIT) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult(value) { + if (object(value) && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE, value] + } + + return [value] +} + +function func(d) { + return typeof d === 'function' +} + +function string$2(d) { + return typeof d === 'string' +} + +function object(d) { + return typeof d === 'object' && d !== null +} + +var unistUtilVisit = visit; + + + +var CONTINUE$1 = unistUtilVisitParents.CONTINUE; +var SKIP$1 = unistUtilVisitParents.SKIP; +var EXIT$1 = unistUtilVisitParents.EXIT; + +visit.CONTINUE = CONTINUE$1; +visit.SKIP = SKIP$1; +visit.EXIT = EXIT$1; + +function visit(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var unifiedMessageControl = messageControl; + +function messageControl(options) { + var settings = options || {}; + var name = settings.name; + var marker = settings.marker; + var test = settings.test; + var sources = settings.source; + var known = settings.known; + var reset = settings.reset; + var enable = settings.enable || []; + var disable = settings.disable || []; + + if (!name) { + throw new Error('Expected `name` in `options`, got `' + name + '`') + } + + if (!marker) { + throw new Error('Expected `marker` in `options`, got `' + marker + '`') + } + + if (!sources) { + sources = [name]; + } else if (typeof sources === 'string') { + sources = [sources]; + } + + return transformer + + function transformer(tree, file) { + var toOffset = vfileLocation(file).toOffset; + var initial = !reset; + var gaps = detectGaps(tree, file); + var scope = {}; + var globals = []; + + unistUtilVisit(tree, test, visitor); + + file.messages = file.messages.filter(filter); + + function visitor(node, position, parent) { + var mark = marker(node); + var ruleIds; + var ruleId; + var verb; + var index; + var length; + var next; + var pos; + var tail; + + if (!mark || mark.name !== name) { + return + } + + ruleIds = mark.attributes.split(/\s/g); + verb = ruleIds.shift(); + next = parent.children[position + 1]; + pos = mark.node.position && mark.node.position.start; + tail = next && next.position && next.position.end; + + if (verb !== 'enable' && verb !== 'disable' && verb !== 'ignore') { + file.fail( + 'Unknown keyword `' + + verb + + '`: expected ' + + "`'enable'`, `'disable'`, or `'ignore'`", + mark.node + ); + } + + length = ruleIds.length; + index = -1; + + // Apply to all rules. + if (length === 0) { + if (verb === 'ignore') { + toggle(pos, false); + toggle(tail, true); + } else { + toggle(pos, verb === 'enable'); + reset = verb !== 'enable'; + } + } else { + while (++index < length) { + ruleId = ruleIds[index]; + + if (isKnown(ruleId, verb, mark.node)) { + toggle(pos, verb === 'enable', ruleId); + + if (verb === 'ignore') { + toggle(tail, true, ruleId); + } } } } @@ -44605,9 +43533,9 @@ function promise(value) { return value && 'function' == typeof value.then; } -var unifiedLintRule = factory$7; +var unifiedLintRule = factory$3; -function factory$7(id, rule) { +function factory$3(id, rule) { var parts = id.split(':'); var source = parts[0]; var ruleId = parts[1]; @@ -45230,8 +44158,60 @@ var pluralize = createCommonjsModule(function (module, exports) { }); }); -var start$1 = factory$8('start'); -var end = factory$8('end'); +var unistUtilGenerated = generated; + +function generated(node) { + return ( + !node || + !node.position || + !node.position.start || + !node.position.start.line || + !node.position.start.column || + !node.position.end || + !node.position.end.line || + !node.position.end.column + ) +} + +var remarkLintListItemBulletIndent = unifiedLintRule( + 'remark-lint:list-item-bullet-indent', + listItemBulletIndent +); + +function listItemBulletIndent(tree, file) { + unistUtilVisit(tree, 'list', visitor); + + function visitor(list, _, grandparent) { + list.children.forEach(visitItems); + + function visitItems(item) { + var indent; + var reason; + + if ( + grandparent && + grandparent.type === 'root' && + !unistUtilGenerated(item) && + !unistUtilGenerated(grandparent) + ) { + indent = item.position.start.column - grandparent.position.start.column; + + if (indent) { + reason = + 'Incorrect indentation before bullet: remove ' + + indent + + ' ' + + pluralize('space', indent); + + file.message(reason, item.position.start); + } + } + } + } +} + +var start$1 = factory$4('start'); +var end = factory$4('end'); var unistUtilPosition = position$1; @@ -45242,7 +44222,7 @@ function position$1(node) { return {start: start$1(node), end: end(node)} } -function factory$8(type) { +function factory$4(type) { point.displayName = type; return point @@ -45258,65 +44238,9 @@ function factory$8(type) { } } -var unistUtilGenerated = generated; - -function generated(node) { - var position = optional(optional(node).position); - var start = optional(position.start); - var end = optional(position.end); - - return !start.line || !start.column || !end.line || !end.column -} - -function optional(value) { - return value && typeof value === 'object' ? value : {} -} - -var remarkLintListItemBulletIndent = unifiedLintRule( - 'remark-lint:list-item-bullet-indent', - listItemBulletIndent -); - -var start$2 = unistUtilPosition.start; - -function listItemBulletIndent(tree, file) { - var contents = String(file); - - unistUtilVisit(tree, 'list', visitor); - - function visitor(node) { - node.children.forEach(visitItems); - } - - function visitItems(item) { - var final; - var indent; - var reason; - - if (!unistUtilGenerated(item)) { - final = start$2(item.children[0]); - indent = contents.slice(start$2(item).offset, final.offset).match(/^\s*/)[0] - .length; - - if (indent !== 0) { - reason = - 'Incorrect indentation before bullet: remove ' + - indent + - ' ' + - pluralize('space', indent); - - file.message(reason, { - line: final.line, - column: final.column - indent - }); - } - } - } -} - var remarkLintListItemIndent = unifiedLintRule('remark-lint:list-item-indent', listItemIndent); -var start$3 = unistUtilPosition.start; +var start$2 = unistUtilPosition.start; var styles$1 = {'tab-size': true, mixed: true, space: true}; @@ -45343,7 +44267,7 @@ function listItemIndent(tree, file, option) { function visitItem(item) { var head = item.children[0]; - var final = start$3(head); + var final = start$2(head); var marker; var bulletSize; var style; @@ -45352,7 +44276,7 @@ function listItemIndent(tree, file, option) { var abs; marker = contents - .slice(start$3(item).offset, final.offset) + .slice(start$2(item).offset, final.offset) .replace(/\[[x ]?]\s*$/i, ''); bulletSize = marker.replace(/\s+$/, '').length; @@ -45380,46 +44304,17 @@ function listItemIndent(tree, file, option) { } } -var mdastUtilToString = toString$3; - -// Get the text content of a node. -// Prefer the node’s plain-text fields, otherwise serialize its children, -// and if the given value is an array, serialize the nodes in it. -function toString$3(node) { - return ( - (node && - (node.value || - node.alt || - node.title || - ('children' in node && all$1(node.children)) || - ('length' in node && all$1(node)))) || - '' - ) -} - -function all$1(values) { - var result = []; - var length = values.length; - var index = -1; - - while (++index < length) { - result[index] = toString$3(values[index]); - } - - return result.join('') -} - var remarkLintNoAutoLinkWithoutProtocol = unifiedLintRule( 'remark-lint:no-auto-link-without-protocol', noAutoLinkWithoutProtocol ); -var start$4 = unistUtilPosition.start; +var start$3 = unistUtilPosition.start; var end$1 = unistUtilPosition.end; // Protocol expression. // See: . -var protocol$2 = /^[a-z][a-z+.-]+:\/?/i; +var protocol = /^[a-z][a-z+.-]+:\/?/i; var reason = 'All automatic links must start with a protocol'; @@ -45433,9 +44328,9 @@ function noAutoLinkWithoutProtocol(tree, file) { children = node.children; if ( - start$4(node).column === start$4(children[0]).column - 1 && + start$3(node).column === start$3(children[0]).column - 1 && end$1(node).column === end$1(children[children.length - 1]).column + 1 && - !protocol$2.test(mdastUtilToString(node)) + !protocol.test(mdastUtilToString(node)) ) { file.message(reason, node); } @@ -45453,55 +44348,44 @@ var reason$1 = 'Missing marker in block quote'; function noBlockquoteWithoutMarker(tree, file) { var contents = String(file); var location = vfileLocation(file); - var last = contents.length; unistUtilVisit(tree, 'blockquote', visitor); - function visitor(node) { - var indent = node.position && node.position.indent; - var start; - var length; - var index; + function onquotedchild(node) { var line; + var end; + var column; var offset; - var character; - var pos; - if (unistUtilGenerated(node) || !indent || indent.length === 0) { - return - } + if (node.type === 'paragraph' && !unistUtilGenerated(node)) { + line = unistUtilPosition.start(node).line; + end = unistUtilPosition.end(node).line; + column = unistUtilPosition.start(node).column; - start = unistUtilPosition.start(node).line; - length = indent.length; - index = -1; - - while (++index < length) { - line = start + index + 1; - pos = {line: line, column: indent[index]}; - offset = location.toOffset(pos) - 1; + // Skip past the first line. + while (++line <= end) { + offset = location.toOffset({line: line, column: column}); - while (++offset < last) { - character = contents.charAt(offset); - - if (character === '>') { - break + if (/>[\t ]+$/.test(contents.slice(offset - 5, offset))) { + continue } - /* istanbul ignore else - just for safety */ - if (character !== ' ' && character !== '\t') { - file.message(reason$1, pos); - break - } + // Roughly here. + file.message(reason$1, {line: line, column: column - 2}); } } } + + function visitor(node) { + node.children.forEach(onquotedchild); + } } var remarkLintNoLiteralUrls = unifiedLintRule('remark-lint:no-literal-urls', noLiteralURLs); -var start$5 = unistUtilPosition.start; +var start$4 = unistUtilPosition.start; var end$2 = unistUtilPosition.end; -var mailto$2 = 'mailto:'; +var mailto = 'mailto:'; var reason$2 = 'Don’t use literal URLs without angle brackets'; function noLiteralURLs(tree, file) { @@ -45513,9 +44397,9 @@ function noLiteralURLs(tree, file) { if ( !unistUtilGenerated(node) && - start$5(node).column === start$5(children[0]).column && + start$4(node).column === start$4(children[0]).column && end$2(node).column === end$2(children[children.length - 1]).column && - (node.url === mailto$2 + value || node.url === value) + (node.url === mailto + value || node.url === value) ) { file.message(reason$2, node); } @@ -45527,7 +44411,7 @@ var remarkLintOrderedListMarkerStyle = unifiedLintRule( orderedListMarkerStyle ); -var start$6 = unistUtilPosition.start; +var start$5 = unistUtilPosition.start; var styles$2 = { ')': true, @@ -45562,7 +44446,7 @@ function orderedListMarkerStyle(tree, file, option) { if (!unistUtilGenerated(child)) { marker = contents - .slice(start$6(child).offset, start$6(child.children[0]).offset) + .slice(start$5(child).offset, start$5(child.children[0]).offset) .replace(/\s|\d/g, '') .replace(/\[[x ]?]\s*$/i, ''); @@ -45683,12 +44567,10 @@ var remarkLintNoHeadingContentIndent = unifiedLintRule( noHeadingContentIndent ); -var start$7 = unistUtilPosition.start; +var start$6 = unistUtilPosition.start; var end$3 = unistUtilPosition.end; function noHeadingContentIndent(tree, file) { - var contents = String(file); - unistUtilVisit(tree, 'heading', visitor); function visitor(node) { @@ -45696,11 +44578,8 @@ function noHeadingContentIndent(tree, file) { var children; var type; var head; - var initial; var final; var diff; - var index; - var char; var reason; var abs; @@ -45713,41 +44592,26 @@ function noHeadingContentIndent(tree, file) { type = mdastUtilHeadingStyle(node, 'atx'); if (type === 'atx' || type === 'atx-closed') { - initial = start$7(node); - index = initial.offset; - char = contents.charAt(index); - - while (char && char !== '#') { - char = contents.charAt(++index); - } - - /* istanbul ignore if - CR/LF bug: remarkjs/remark#195. */ - if (!char) { - return - } - - index = depth + (index - initial.offset); - head = start$7(children[0]).column; + head = start$6(children[0]).column; // Ignore empty headings. if (!head) { return } - diff = head - initial.column - 1 - index; + diff = head - start$6(node).column - 1 - depth; if (diff) { abs = Math.abs(diff); reason = - (diff > 0 ? 'Remove' : 'Add') + - ' ' + + 'Remove ' + abs + ' ' + pluralize('space', abs) + ' before this heading’s content'; - file.message(reason, start$7(children[0])); + file.message(reason, start$6(children[0])); } } @@ -45774,7 +44638,9 @@ function noHeadingContentIndent(tree, file) { var remarkLintNoInlinePadding = unifiedLintRule('remark-lint:no-inline-padding', noInlinePadding); function noInlinePadding(tree, file) { - unistUtilVisit(tree, ['emphasis', 'strong', 'delete', 'image', 'link'], visitor); + // Note: `emphasis`, `strong`, `delete` (GFM) can’t have padding anymore + // since CM. + unistUtilVisit(tree, ['link', 'linkReference'], visitor); function visitor(node) { var contents; @@ -45826,6 +44692,13 @@ function noShortcutReferenceLink(tree, file) { } } +var collapseWhiteSpace = collapse; + +// `collapse(' \t\nbar \nbaz\t') // ' bar baz '` +function collapse(value) { + return String(value).replace(/\s+/g, ' ') +} + var remarkLintNoUndefinedReferences = unifiedLintRule( 'remark-lint:no-undefined-references', noUndefinedReferences @@ -45837,32 +44710,177 @@ var reason$7 = 'Found reference to undefined definition'; // from `Object.prototype`. // If `Object.create(null)` was used in place of `{}`, downcasing would work // equally well. -function normalize$3(s) { +function normalize$2(s) { return collapseWhiteSpace(s.toUpperCase()) } function noUndefinedReferences(tree, file, option) { - var allow = ((option || {}).allow || []).map(normalize$3); + var contents = String(file); + var location = vfileLocation(file); + var lineEnding = /(\r?\n|\r)[\t ]*(>[\t ]*)*/g; + var allow = ((option || {}).allow || []).map(normalize$2); var map = {}; unistUtilVisit(tree, ['definition', 'footnoteDefinition'], mark); unistUtilVisit(tree, ['imageReference', 'linkReference', 'footnoteReference'], find); + unistUtilVisit(tree, ['paragraph', 'heading'], findInPhrasing); function mark(node) { if (!unistUtilGenerated(node)) { - map[normalize$3(node.identifier)] = true; + map[normalize$2(node.identifier)] = true; } } function find(node) { if ( !unistUtilGenerated(node) && - !(normalize$3(node.identifier) in map) && - allow.indexOf(normalize$3(node.identifier)) === -1 + !(normalize$2(node.identifier) in map) && + allow.indexOf(normalize$2(node.identifier)) === -1 ) { file.message(reason$7, node); } } + + function findInPhrasing(node) { + var ranges = []; + + unistUtilVisit(node, onchild); + + ranges.forEach(handleRange); + + return unistUtilVisit.SKIP + + function onchild(child) { + var start; + var end; + var source; + var lines; + var last; + var index; + var match; + var line; + var code; + var lineIndex; + var next; + var range; + + // Ignore the node itself. + if (child === node) return + + // Can’t have links in links, so reset ranges. + if (child.type === 'link' || child.type === 'linkReference') { + ranges = []; + return unistUtilVisit.SKIP + } + + // Enter non-text. + if (child.type !== 'text') return + + start = unistUtilPosition.start(child).offset; + end = unistUtilPosition.end(child).offset; + + // Bail if there’s no positional info. + if (!end) return unistUtilVisit.EXIT + + source = contents.slice(start, end); + lines = [[start, '']]; + last = 0; + + lineEnding.lastIndex = 0; + match = lineEnding.exec(source); + + while (match) { + index = match.index; + lines[lines.length - 1][1] = source.slice(last, index); + last = index + match[0].length; + lines.push([start + last, '']); + match = lineEnding.exec(source); + } + + lines[lines.length - 1][1] = source.slice(last); + lineIndex = -1; + + while (++lineIndex < lines.length) { + line = lines[lineIndex][1]; + index = 0; + + while (index < line.length) { + code = line.charCodeAt(index); + + // Skip past escaped brackets. + if (code === 92) { + next = line.charCodeAt(index + 1); + index++; + + if (next === 91 || next === 93) { + index++; + } + } + // Opening bracket. + else if (code === 91) { + ranges.push([lines[lineIndex][0] + index]); + index++; + } + // Close bracket. + else if (code === 93) { + // No opening. + if (ranges.length === 0) { + index++; + } else if (line.charCodeAt(index + 1) === 91) { + index++; + + // Collapsed or full. + range = ranges.pop(); + range.push(lines[lineIndex][0] + index); + + // This is the end of a reference already. + if (range.length === 4) { + handleRange(range); + range = []; + } + + range.push(lines[lineIndex][0] + index); + ranges.push(range); + index++; + } else { + index++; + + // Shortcut or typical end of a reference. + range = ranges.pop(); + range.push(lines[lineIndex][0] + index); + handleRange(range); + } + } + // Anything else. + else { + index++; + } + } + } + } + + function handleRange(range) { + var offset; + + if (range.length === 1) return + if (range.length === 3) range.length = 2; + + // No need to warn for just `[]`. + if (range.length === 2 && range[0] + 2 === range[1]) return + + offset = range.length === 4 && range[2] + 2 !== range[3] ? 2 : 0; + + find({ + identifier: contents + .slice(range[0 + offset] + 1, range[1 + offset] - 1) + .replace(lineEnding, ' '), + position: { + start: location.toPosition(range[0]), + end: location.toPosition(range[range.length - 1]) + } + }); + } + } } var remarkLintNoUnusedDefinitions = unifiedLintRule('remark-lint:no-unused-definitions', noUnusedDefinitions); @@ -45984,7 +45002,7 @@ var remarkLintCheckboxCharacterStyle = unifiedLintRule( checkboxCharacterStyle ); -var start$8 = unistUtilPosition.start; +var start$7 = unistUtilPosition.start; var end$4 = unistUtilPosition.end; var checked = {x: true, X: true}; @@ -46030,7 +45048,7 @@ function checkboxCharacterStyle(tree, file, option) { /* istanbul ignore next - a list item cannot be checked and empty, according * to GFM, but theoretically it makes sense to get the end if that were * possible. */ - point = node.children.length === 0 ? end$4(node) : start$8(node.children[0]); + point = node.children.length === 0 ? end$4(node) : start$7(node.children[0]); // Move back to before `] `. point.offset -= 2; point.column -= 2; @@ -46068,7 +45086,7 @@ var remarkLintCheckboxContentIndent = unifiedLintRule( checkboxContentIndent ); -var start$9 = unistUtilPosition.start; +var start$8 = unistUtilPosition.start; var end$5 = unistUtilPosition.end; var reason$9 = 'Checkboxes should be followed by a single character'; @@ -46093,7 +45111,7 @@ function checkboxContentIndent(tree, file) { /* istanbul ignore next - a list item cannot be checked and empty, according * to GFM, but theoretically it makes sense to get the end if that were * possible. */ - point = node.children.length === 0 ? end$5(node) : start$9(node.children[0]); + point = node.children.length === 0 ? end$5(node) : start$8(node.children[0]); // Assume we start with a checkbox, because well, `checked` is set. value = /\[([\t xX])]/.exec( @@ -46121,7 +45139,7 @@ function checkboxContentIndent(tree, file) { var remarkLintCodeBlockStyle = unifiedLintRule('remark-lint:code-block-style', codeBlockStyle); -var start$a = unistUtilPosition.start; +var start$9 = unistUtilPosition.start; var end$6 = unistUtilPosition.end; var styles$3 = {null: true, fenced: true, indented: true}; @@ -46150,7 +45168,7 @@ function codeBlockStyle(tree, file, option) { return null } - initial = start$a(node).offset; + initial = start$9(node).offset; final = end$6(node).offset; current = @@ -46170,7 +45188,7 @@ function codeBlockStyle(tree, file, option) { var remarkLintDefinitionSpacing = unifiedLintRule('remark-lint:definition-spacing', definitionSpacing); -var label$1 = /^\s*\[((?:\\[\s\S]|[^[\]])+)]/; +var label = /^\s*\[((?:\\[\s\S]|[^[\]])+)]/; var reason$a = 'Do not use consecutive whitespace in definition labels'; function definitionSpacing(tree, file) { @@ -46184,7 +45202,7 @@ function definitionSpacing(tree, file) { if ( !unistUtilGenerated(node) && - /[ \t\n]{2,}/.test(contents.slice(start, end).match(label$1)[1]) + /[ \t\n]{2,}/.test(contents.slice(start, end).match(label)[1]) ) { file.message(reason$a, node); } @@ -46193,10 +45211,10 @@ function definitionSpacing(tree, file) { var remarkLintFencedCodeFlag = unifiedLintRule('remark-lint:fenced-code-flag', fencedCodeFlag); -var start$b = unistUtilPosition.start; +var start$a = unistUtilPosition.start; var end$7 = unistUtilPosition.end; -var fence$2 = /^ {0,3}([~`])\1{2,}/; +var fence = /^ {0,3}([~`])\1{2,}/; var reasonIncorrect = 'Incorrect code language flag'; var reasonMissing = 'Missing code language flag'; @@ -46226,9 +45244,9 @@ function fencedCodeFlag(tree, file, option) { file.message(reasonIncorrect, node); } } else { - value = contents.slice(start$b(node).offset, end$7(node).offset); + value = contents.slice(start$a(node).offset, end$7(node).offset); - if (!allowEmpty && fence$2.test(value)) { + if (!allowEmpty && fence.test(value)) { file.message(reasonMissing, node); } } @@ -46302,7 +45320,7 @@ function fileExtension(tree, file, option) { var remarkLintFinalDefinition = unifiedLintRule('remark-lint:final-definition', finalDefinition); -var start$c = unistUtilPosition.start; +var start$b = unistUtilPosition.start; function finalDefinition(tree, file) { var last = null; @@ -46310,7 +45328,7 @@ function finalDefinition(tree, file) { unistUtilVisit(tree, visitor, true); function visitor(node) { - var line = start$c(node).line; + var line = start$b(node).line; // Ignore generated and HTML comment nodes. if (node.type === 'root' || unistUtilGenerated(node) || (node.type === 'html' && /^\s* + + + +Implementation of function.prototype.bind + +## Example + +I mainly do this for unit tests I run on phantomjs. +PhantomJS does not have Function.prototype.bind :( + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + + [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg + [travis-url]: https://travis-ci.org/Raynos/function-bind + [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg + [npm-url]: https://npmjs.org/package/function-bind + [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png + [6]: https://coveralls.io/r/Raynos/function-bind + [7]: https://gemnasium.com/Raynos/function-bind.png + [8]: https://gemnasium.com/Raynos/function-bind + [deps-svg]: https://david-dm.org/Raynos/function-bind.svg + [deps-url]: https://david-dm.org/Raynos/function-bind + [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg + [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies + [11]: https://ci.testling.com/Raynos/function-bind.png + [12]: https://ci.testling.com/Raynos/function-bind diff --git a/tools/node_modules/@babel/core/node_modules/function-bind/implementation.js b/tools/node_modules/@babel/core/node_modules/function-bind/implementation.js new file mode 100644 index 00000000000000..cc4daec1b080a1 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/function-bind/implementation.js @@ -0,0 +1,52 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/tools/node_modules/@babel/core/node_modules/function-bind/index.js b/tools/node_modules/@babel/core/node_modules/function-bind/index.js new file mode 100644 index 00000000000000..3bb6b9609889f8 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/tools/node_modules/@babel/core/node_modules/function-bind/package.json b/tools/node_modules/@babel/core/node_modules/function-bind/package.json new file mode 100644 index 00000000000000..20a1727cbf8711 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/function-bind/package.json @@ -0,0 +1,63 @@ +{ + "name": "function-bind", + "version": "1.1.1", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": "git://github.com/Raynos/function-bind.git", + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.5.0", + "jscs": "^3.0.7", + "tape": "^4.8.0" + }, + "license": "MIT", + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "npm run coverage -- --quiet", + "tests-only": "node test", + "coverage": "covert test/*.js", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js */*.js", + "eslint": "eslint *.js */*.js" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } +} diff --git a/tools/node_modules/@babel/core/node_modules/gensync/LICENSE b/tools/node_modules/@babel/core/node_modules/gensync/LICENSE new file mode 100644 index 00000000000000..af7f781f59eed4 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/gensync/LICENSE @@ -0,0 +1,7 @@ +Copyright 2018 Logan Smyth + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/@babel/core/node_modules/gensync/README.md b/tools/node_modules/@babel/core/node_modules/gensync/README.md new file mode 100644 index 00000000000000..f68ce1a37b927d --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/gensync/README.md @@ -0,0 +1,196 @@ +# gensync + +This module allows for developers to write common code that can share +implementation details, hiding whether an underlying request happens +synchronously or asynchronously. This is in contrast with many current Node +APIs which explicitly implement the same API twice, once with calls to +synchronous functions, and once with asynchronous functions. + +Take for example `fs.readFile` and `fs.readFileSync`, if you're writing an API +that loads a file and then performs a synchronous operation on the data, it +can be frustrating to maintain two parallel functions. + + +## Example + +```js +const fs = require("fs"); +const gensync = require("gensync"); + +const readFile = gensync({ + sync: fs.readFileSync, + errback: fs.readFile, +}); + +const myOperation = gensync(function* (filename) { + const code = yield* readFile(filename, "utf8"); + + return "// some custom prefix\n" + code; +}); + +// Load and add the prefix synchronously: +const result = myOperation.sync("./some-file.js"); + +// Load and add the prefix asynchronously with promises: +myOperation.async("./some-file.js").then(result => { + +}); + +// Load and add the prefix asynchronously with promises: +myOperation.errback("./some-file.js", (err, result) => { + +}); +``` + +This could even be exposed as your official API by doing +```js +// Using the common 'Sync' suffix for sync functions, and 'Async' suffix for +// promise-returning versions. +exports.myOperationSync = myOperation.sync; +exports.myOperationAsync = myOperation.async; +exports.myOperation = myOperation.errback; +``` +or potentially expose one of the async versions as the default, with a +`.sync` property on the function to expose the synchronous version. +```js +module.exports = myOperation.errback; +module.exports.sync = myOperation.sync; +```` + + +## API + +### gensync(generatorFnOrOptions) + +Returns a function that can be "await"-ed in another `gensync` generator +function, or executed via + +* `.sync(...args)` - Returns the computed value, or throws. +* `.async(...args)` - Returns a promise for the computed value. +* `.errback(...args, (err, result) => {})` - Calls the callback with the computed value, or error. + + +#### Passed a generator + +Wraps the generator to populate the `.sync`/`.async`/`.errback` helpers above to +allow for evaluation of the generator for the final value. + +##### Example + +```js +const readFile = function* () { + return 42; +}; + +const readFileAndMore = gensync(function* (){ + const val = yield* readFile(); + return 42 + val; +}); + +// In general cases +const code = readFileAndMore.sync("./file.js", "utf8"); +readFileAndMore.async("./file.js", "utf8").then(code => {}) +readFileAndMore.errback("./file.js", "utf8", (err, code) => {}); + +// In a generator being called indirectly with .sync/.async/.errback +const code = yield* readFileAndMore("./file.js", "utf8"); +``` + + +#### Passed an options object + +* `opts.sync` + + Example: `(...args) => 4` + + A function that will be called when `.sync()` is called on the `gensync()` + result, or when the result is passed to `yield*` in another generator that + is being run synchronously. + + Also called for `.async()` calls if no async handlers are provided. + +* `opts.async` + + Example: `async (...args) => 4` + + A function that will be called when `.async()` or `.errback()` is called on + the `gensync()` result, or when the result is passed to `yield*` in another + generator that is being run asynchronously. + +* `opts.errback` + + Example: `(...args, cb) => cb(null, 4)` + + A function that will be called when `.async()` or `.errback()` is called on + the `gensync()` result, or when the result is passed to `yield*` in another + generator that is being run asynchronously. + + This option allows for simpler compatibility with many existing Node APIs, + and also avoids introducing the extra even loop turns that promises introduce + to access the result value. + +* `opts.name` + + Example: `"readFile"` + + A string name to apply to the returned function. If no value is provided, + the name of `errback`/`async`/`sync` functions will be used, with any + `Sync` or `Async` suffix stripped off. If the callback is simply named + with ES6 inference (same name as the options property), the name is ignored. + +* `opts.arity` + + Example: `4` + + A number for the length to set on the returned function. If no value + is provided, the length will be carried over from the `sync` function's + `length` value. + +##### Example + +```js +const readFile = gensync({ + sync: fs.readFileSync, + errback: fs.readFile, +}); + +const code = readFile.sync("./file.js", "utf8"); +readFile.async("./file.js", "utf8").then(code => {}) +readFile.errback("./file.js", "utf8", (err, code) => {}); +``` + + +### gensync.all(iterable) + +`Promise.all`-like combinator that works with an iterable of generator objects +that could be passed to `yield*` within a gensync generator. + +#### Example + +```js +const loadFiles = gensync(function* () { + return yield* gensync.all([ + readFile("./one.js"), + readFile("./two.js"), + readFile("./three.js"), + ]); +}); +``` + + +### gensync.race(iterable) + +`Promise.race`-like combinator that works with an iterable of generator objects +that could be passed to `yield*` within a gensync generator. + +#### Example + +```js +const loadFiles = gensync(function* () { + return yield* gensync.race([ + readFile("./one.js"), + readFile("./two.js"), + readFile("./three.js"), + ]); +}); +``` diff --git a/tools/node_modules/@babel/core/node_modules/gensync/index.js b/tools/node_modules/@babel/core/node_modules/gensync/index.js new file mode 100644 index 00000000000000..ee0ea6165958e9 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/gensync/index.js @@ -0,0 +1,373 @@ +"use strict"; + +// These use the global symbol registry so that multiple copies of this +// library can work together in case they are not deduped. +const GENSYNC_START = Symbol.for("gensync:v1:start"); +const GENSYNC_SUSPEND = Symbol.for("gensync:v1:suspend"); + +const GENSYNC_EXPECTED_START = "GENSYNC_EXPECTED_START"; +const GENSYNC_EXPECTED_SUSPEND = "GENSYNC_EXPECTED_SUSPEND"; +const GENSYNC_OPTIONS_ERROR = "GENSYNC_OPTIONS_ERROR"; +const GENSYNC_RACE_NONEMPTY = "GENSYNC_RACE_NONEMPTY"; +const GENSYNC_ERRBACK_NO_CALLBACK = "GENSYNC_ERRBACK_NO_CALLBACK"; + +module.exports = Object.assign( + function gensync(optsOrFn) { + let genFn = optsOrFn; + if (typeof optsOrFn !== "function") { + genFn = newGenerator(optsOrFn); + } else { + genFn = wrapGenerator(optsOrFn); + } + + return Object.assign(genFn, makeFunctionAPI(genFn)); + }, + { + all: buildOperation({ + name: "all", + arity: 1, + sync: function(args) { + const items = Array.from(args[0]); + return items.map(item => evaluateSync(item)); + }, + async: function(args, resolve, reject) { + const items = Array.from(args[0]); + + if (items.length === 0) { + Promise.resolve().then(() => resolve([])); + return; + } + + let count = 0; + const results = items.map(() => undefined); + items.forEach((item, i) => { + evaluateAsync( + item, + val => { + results[i] = val; + count += 1; + + if (count === results.length) resolve(results); + }, + reject + ); + }); + }, + }), + race: buildOperation({ + name: "race", + arity: 1, + sync: function(args) { + const items = Array.from(args[0]); + if (items.length === 0) { + throw makeError("Must race at least 1 item", GENSYNC_RACE_NONEMPTY); + } + + return evaluateSync(items[0]); + }, + async: function(args, resolve, reject) { + const items = Array.from(args[0]); + if (items.length === 0) { + throw makeError("Must race at least 1 item", GENSYNC_RACE_NONEMPTY); + } + + for (const item of items) { + evaluateAsync(item, resolve, reject); + } + }, + }), + } +); + +/** + * Given a generator function, return the standard API object that executes + * the generator and calls the callbacks. + */ +function makeFunctionAPI(genFn) { + const fns = { + sync: function(...args) { + return evaluateSync(genFn.apply(this, args)); + }, + async: function(...args) { + return new Promise((resolve, reject) => { + evaluateAsync(genFn.apply(this, args), resolve, reject); + }); + }, + errback: function(...args) { + const cb = args.pop(); + if (typeof cb !== "function") { + throw makeError( + "Asynchronous function called without callback", + GENSYNC_ERRBACK_NO_CALLBACK + ); + } + + let gen; + try { + gen = genFn.apply(this, args); + } catch (err) { + cb(err); + return; + } + + evaluateAsync(gen, val => cb(undefined, val), err => cb(err)); + }, + }; + return fns; +} + +function assertTypeof(type, name, value, allowUndefined) { + if ( + typeof value === type || + (allowUndefined && typeof value === "undefined") + ) { + return; + } + + let msg; + if (allowUndefined) { + msg = `Expected opts.${name} to be either a ${type}, or undefined.`; + } else { + msg = `Expected opts.${name} to be a ${type}.`; + } + + throw makeError(msg, GENSYNC_OPTIONS_ERROR); +} +function makeError(msg, code) { + return Object.assign(new Error(msg), { code }); +} + +/** + * Given an options object, return a new generator that dispatches the + * correct handler based on sync or async execution. + */ +function newGenerator({ name, arity, sync, async, errback }) { + assertTypeof("string", "name", name, true /* allowUndefined */); + assertTypeof("number", "arity", arity, true /* allowUndefined */); + assertTypeof("function", "sync", sync); + assertTypeof("function", "async", async, true /* allowUndefined */); + assertTypeof("function", "errback", errback, true /* allowUndefined */); + if (async && errback) { + throw makeError( + "Expected one of either opts.async or opts.errback, but got _both_.", + GENSYNC_OPTIONS_ERROR + ); + } + + if (typeof name !== "string") { + let fnName; + if (errback && errback.name && errback.name !== "errback") { + fnName = errback.name; + } + if (async && async.name && async.name !== "async") { + fnName = async.name.replace(/Async$/, ""); + } + if (sync && sync.name && sync.name !== "sync") { + fnName = sync.name.replace(/Sync$/, ""); + } + + if (typeof fnName === "string") { + name = fnName; + } + } + + if (typeof arity !== "number") { + arity = sync.length; + } + + return buildOperation({ + name, + arity, + sync: function(args) { + return sync.apply(this, args); + }, + async: function(args, resolve, reject) { + if (async) { + async.apply(this, args).then(resolve, reject); + } else if (errback) { + errback.call(this, ...args, (err, value) => { + if (err == null) resolve(value); + else reject(err); + }); + } else { + resolve(sync.apply(this, args)); + } + }, + }); +} + +function wrapGenerator(genFn) { + return setFunctionMetadata(genFn.name, genFn.length, function(...args) { + return genFn.apply(this, args); + }); +} + +function buildOperation({ name, arity, sync, async }) { + return setFunctionMetadata(name, arity, function*(...args) { + const resume = yield GENSYNC_START; + if (!resume) { + // Break the tail call to avoid a bug in V8 v6.X with --harmony enabled. + const res = sync.call(this, args); + return res; + } + + let result; + try { + async.call( + this, + args, + value => { + if (result) return; + + result = { value }; + resume(); + }, + err => { + if (result) return; + + result = { err }; + resume(); + } + ); + } catch (err) { + result = { err }; + resume(); + } + + // Suspend until the callbacks run. Will resume synchronously if the + // callback was already called. + yield GENSYNC_SUSPEND; + + if (result.hasOwnProperty("err")) { + throw result.err; + } + + return result.value; + }); +} + +function evaluateSync(gen) { + let value; + while (!({ value } = gen.next()).done) { + assertStart(value, gen); + } + return value; +} + +function evaluateAsync(gen, resolve, reject) { + (function step() { + try { + let value; + while (!({ value } = gen.next()).done) { + assertStart(value, gen); + + // If this throws, it is considered to have broken the contract + // established for async handlers. If these handlers are called + // synchronously, it is also considered bad behavior. + let sync = true; + let didSyncResume = false; + const out = gen.next(() => { + if (sync) { + didSyncResume = true; + } else { + step(); + } + }); + sync = false; + + assertSuspend(out, gen); + + if (!didSyncResume) { + // Callback wasn't called synchronously, so break out of the loop + // and let it call 'step' later. + return; + } + } + + return resolve(value); + } catch (err) { + return reject(err); + } + })(); +} + +function assertStart(value, gen) { + if (value === GENSYNC_START) return; + + throwError( + gen, + makeError( + `Got unexpected yielded value in gensync generator: ${JSON.stringify( + value + )}. Did you perhaps mean to use 'yield*' instead of 'yield'?`, + GENSYNC_EXPECTED_START + ) + ); +} +function assertSuspend({ value, done }, gen) { + if (!done && value === GENSYNC_SUSPEND) return; + + throwError( + gen, + makeError( + done + ? "Unexpected generator completion. If you get this, it is probably a gensync bug." + : `Expected GENSYNC_SUSPEND, got ${JSON.stringify( + value + )}. If you get this, it is probably a gensync bug.`, + GENSYNC_EXPECTED_SUSPEND + ) + ); +} + +function throwError(gen, err) { + // Call `.throw` so that users can step in a debugger to easily see which + // 'yield' passed an unexpected value. If the `.throw` call didn't throw + // back to the generator, we explicitly do it to stop the error + // from being swallowed by user code try/catches. + if (gen.throw) gen.throw(err); + throw err; +} + +function isIterable(value) { + return ( + !!value && + (typeof value === "object" || typeof value === "function") && + !value[Symbol.iterator] + ); +} + +function setFunctionMetadata(name, arity, fn) { + if (typeof name === "string") { + // This should always work on the supported Node versions, but for the + // sake of users that are compiling to older versions, we check for + // configurability so we don't throw. + const nameDesc = Object.getOwnPropertyDescriptor(fn, "name"); + if (!nameDesc || nameDesc.configurable) { + Object.defineProperty( + fn, + "name", + Object.assign(nameDesc || {}, { + configurable: true, + value: name, + }) + ); + } + } + + if (typeof arity === "number") { + const lengthDesc = Object.getOwnPropertyDescriptor(fn, "length"); + if (!lengthDesc || lengthDesc.configurable) { + Object.defineProperty( + fn, + "length", + Object.assign(lengthDesc || {}, { + configurable: true, + value: arity, + }) + ); + } + } + + return fn; +} diff --git a/tools/node_modules/@babel/core/node_modules/gensync/index.js.flow b/tools/node_modules/@babel/core/node_modules/gensync/index.js.flow new file mode 100644 index 00000000000000..fa22e0bad9757f --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/gensync/index.js.flow @@ -0,0 +1,32 @@ +// @flow + +opaque type Next = Function | void; +opaque type Yield = mixed; + +export type Gensync = { + (...args: Args): Handler, + sync(...args: Args): Return, + async(...args: Args): Promise, + // ...args: [...Args, Callback] + errback(...args: any[]): void, +}; + +export type Handler = Generator; +export type Options = { + sync(...args: Args): Return, + arity?: number, + name?: string, +} & ( + | { async?: (...args: Args) => Promise } + // ...args: [...Args, Callback] + | { errback(...args: any[]): void } +); + +declare module.exports: { + ( + Options | ((...args: Args) => Handler) + ): Gensync, + + all(Array>): Handler, + race(Array>): Handler, +}; diff --git a/tools/node_modules/@babel/core/node_modules/gensync/package.json b/tools/node_modules/@babel/core/node_modules/gensync/package.json new file mode 100644 index 00000000000000..07f87570d87b91 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/gensync/package.json @@ -0,0 +1,37 @@ +{ + "name": "gensync", + "version": "1.0.0-beta.2", + "license": "MIT", + "description": "Allows users to use generators in order to write common functions that can be both sync or async.", + "main": "index.js", + "author": "Logan Smyth ", + "homepage": "https://github.com/loganfsmyth/gensync", + "repository": { + "type": "git", + "url": "https://github.com/loganfsmyth/gensync.git" + }, + "scripts": { + "test": "jest" + }, + "engines": { + "node": ">=6.9.0" + }, + "keywords": [ + "async", + "sync", + "generators", + "async-await", + "callbacks" + ], + "devDependencies": { + "babel-core": "^6.26.3", + "babel-preset-env": "^1.6.1", + "eslint": "^4.19.1", + "eslint-config-prettier": "^2.9.0", + "eslint-plugin-node": "^6.0.1", + "eslint-plugin-prettier": "^2.6.0", + "flow-bin": "^0.71.0", + "jest": "^22.4.3", + "prettier": "^1.12.1" + } +} diff --git a/tools/node_modules/babel-eslint/node_modules/globals/globals.json b/tools/node_modules/@babel/core/node_modules/globals/globals.json similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/globals/globals.json rename to tools/node_modules/@babel/core/node_modules/globals/globals.json diff --git a/tools/node_modules/babel-eslint/node_modules/globals/index.js b/tools/node_modules/@babel/core/node_modules/globals/index.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/globals/index.js rename to tools/node_modules/@babel/core/node_modules/globals/index.js diff --git a/tools/node_modules/babel-eslint/node_modules/globals/license b/tools/node_modules/@babel/core/node_modules/globals/license similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/globals/license rename to tools/node_modules/@babel/core/node_modules/globals/license diff --git a/tools/node_modules/@babel/core/node_modules/globals/package.json b/tools/node_modules/@babel/core/node_modules/globals/package.json new file mode 100644 index 00000000000000..dfe459b6fa6015 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/globals/package.json @@ -0,0 +1,41 @@ +{ + "name": "globals", + "version": "11.12.0", + "description": "Global identifiers from different JavaScript environments", + "license": "MIT", + "repository": "sindresorhus/globals", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js", + "globals.json" + ], + "keywords": [ + "globals", + "global", + "identifiers", + "variables", + "vars", + "jshint", + "eslint", + "environments" + ], + "devDependencies": { + "ava": "0.21.0", + "xo": "0.18.0" + }, + "xo": { + "ignores": [ + "get-browser-globals.js" + ] + } +} diff --git a/tools/node_modules/babel-eslint/node_modules/globals/readme.md b/tools/node_modules/@babel/core/node_modules/globals/readme.md similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/globals/readme.md rename to tools/node_modules/@babel/core/node_modules/globals/readme.md diff --git a/tools/node_modules/babel-eslint/node_modules/has-flag/index.js b/tools/node_modules/@babel/core/node_modules/has-flag/index.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/has-flag/index.js rename to tools/node_modules/@babel/core/node_modules/has-flag/index.js diff --git a/tools/node_modules/babel-eslint/node_modules/has-flag/license b/tools/node_modules/@babel/core/node_modules/has-flag/license similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/has-flag/license rename to tools/node_modules/@babel/core/node_modules/has-flag/license diff --git a/tools/node_modules/@babel/core/node_modules/has-flag/package.json b/tools/node_modules/@babel/core/node_modules/has-flag/package.json new file mode 100644 index 00000000000000..e1eb17a15ed880 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/has-flag/package.json @@ -0,0 +1,44 @@ +{ + "name": "has-flag", + "version": "3.0.0", + "description": "Check if argv has a specific flag", + "license": "MIT", + "repository": "sindresorhus/has-flag", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "has", + "check", + "detect", + "contains", + "find", + "flag", + "cli", + "command-line", + "argv", + "process", + "arg", + "args", + "argument", + "arguments", + "getopt", + "minimist", + "optimist" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/tools/node_modules/babel-eslint/node_modules/has-flag/readme.md b/tools/node_modules/@babel/core/node_modules/has-flag/readme.md similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/has-flag/readme.md rename to tools/node_modules/@babel/core/node_modules/has-flag/readme.md diff --git a/tools/node_modules/@babel/core/node_modules/has/LICENSE-MIT b/tools/node_modules/@babel/core/node_modules/has/LICENSE-MIT new file mode 100644 index 00000000000000..ae7014d385df3d --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/has/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Thiago de Arruda + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/@babel/core/node_modules/has/README.md b/tools/node_modules/@babel/core/node_modules/has/README.md new file mode 100644 index 00000000000000..635e3a4baab00b --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/has/README.md @@ -0,0 +1,18 @@ +# has + +> Object.prototype.hasOwnProperty.call shortcut + +## Installation + +```sh +npm install --save has +``` + +## Usage + +```js +var has = require('has'); + +has({}, 'hasOwnProperty'); // false +has(Object.prototype, 'hasOwnProperty'); // true +``` diff --git a/tools/node_modules/@babel/core/node_modules/has/package.json b/tools/node_modules/@babel/core/node_modules/has/package.json new file mode 100644 index 00000000000000..7c4592f16de071 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/has/package.json @@ -0,0 +1,48 @@ +{ + "name": "has", + "description": "Object.prototype.hasOwnProperty.call shortcut", + "version": "1.0.3", + "homepage": "https://github.com/tarruda/has", + "author": { + "name": "Thiago de Arruda", + "email": "tpadilha84@gmail.com" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/tarruda/has.git" + }, + "bugs": { + "url": "https://github.com/tarruda/has/issues" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" + } + ], + "main": "./src", + "dependencies": { + "function-bind": "^1.1.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "eslint": "^4.19.1", + "tape": "^4.9.0" + }, + "engines": { + "node": ">= 0.4.0" + }, + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "tape test" + } +} diff --git a/tools/node_modules/@babel/core/node_modules/has/src/index.js b/tools/node_modules/@babel/core/node_modules/has/src/index.js new file mode 100644 index 00000000000000..dd92dd9094edb0 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/has/src/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var bind = require('function-bind'); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/tools/node_modules/@babel/core/node_modules/is-core-module/LICENSE b/tools/node_modules/@babel/core/node_modules/is-core-module/LICENSE new file mode 100644 index 00000000000000..2e502872a74234 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/is-core-module/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Dave Justice + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tools/node_modules/@babel/core/node_modules/is-core-module/README.md b/tools/node_modules/@babel/core/node_modules/is-core-module/README.md new file mode 100644 index 00000000000000..479d6d24c0f041 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/is-core-module/README.md @@ -0,0 +1,37 @@ +# is-core-module [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version. + +## Example + +```js +var isCore = require('is-core-module'); +var assert = require('assert'); +assert(isCore('fs')); +assert(!isCore('butts')); +``` + +## Tests +Clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-core-module +[2]: https://versionbadg.es/inspect-js/is-core-module.svg +[3]: https://travis-ci.com/inspect-js/is-core-module.svg +[4]: https://travis-ci.com/inspect-js/is-core-module +[5]: https://david-dm.org/inspect-js/is-core-module.svg +[6]: https://david-dm.org/inspect-js/is-core-module +[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies +[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-core-module.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module diff --git a/tools/node_modules/@babel/core/node_modules/is-core-module/core.json b/tools/node_modules/@babel/core/node_modules/is-core-module/core.json new file mode 100644 index 00000000000000..0238b61a4c71e4 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/is-core-module/core.json @@ -0,0 +1,83 @@ +{ + "assert": true, + "assert/strict": ">= 15", + "async_hooks": ">= 8", + "buffer_ieee754": "< 0.9.7", + "buffer": true, + "child_process": true, + "cluster": true, + "console": true, + "constants": true, + "crypto": true, + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "diagnostics_channel": ">= 15.1", + "dns": true, + "dns/promises": ">= 15", + "domain": ">= 0.7.12", + "events": true, + "freelist": "< 6", + "fs": true, + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "_http_agent": ">= 0.11.1", + "_http_client": ">= 0.11.1", + "_http_common": ">= 0.11.1", + "_http_incoming": ">= 0.11.1", + "_http_outgoing": ">= 0.11.1", + "_http_server": ">= 0.11.1", + "http": true, + "http2": ">= 8.8", + "https": true, + "inspector": ">= 8.0.0", + "_linklist": "< 8", + "module": true, + "net": true, + "node-inspect/lib/_inspect": ">= 7.6.0 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12", + "os": true, + "path": true, + "path/posix": ">= 15.3", + "path/win32": ">= 15.3", + "perf_hooks": ">= 8.5", + "process": ">= 1", + "punycode": true, + "querystring": true, + "readline": true, + "repl": true, + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "_stream_transform": ">= 0.9.4", + "_stream_wrap": ">= 1.4.1", + "_stream_passthrough": ">= 0.9.4", + "_stream_readable": ">= 0.9.4", + "_stream_writable": ">= 0.9.4", + "stream": true, + "stream/promises": ">= 15", + "string_decoder": true, + "sys": [">= 0.6 && < 0.7", ">= 0.8"], + "timers": true, + "timers/promises": ">= 15", + "_tls_common": ">= 0.11.13", + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "tls": true, + "trace_events": ">= 10", + "tty": true, + "url": true, + "util": true, + "util/types": ">= 15.3", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8": ">= 1", + "vm": true, + "wasi": ">= 13.4 && < 13.5", + "worker_threads": ">= 11.7", + "zlib": true +} diff --git a/tools/node_modules/@babel/core/node_modules/is-core-module/index.js b/tools/node_modules/@babel/core/node_modules/is-core-module/index.js new file mode 100644 index 00000000000000..f5a69cf765f56b --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/is-core-module/index.js @@ -0,0 +1,69 @@ +'use strict'; + +var has = require('has'); + +function specifierIncluded(current, specifier) { + var nodeParts = current.split('.'); + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = parseInt(nodeParts[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } + if (op === '>=') { + return cur >= ver; + } + return false; + } + return op === '>='; +} + +function matchesRange(current, range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { + return false; + } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(current, specifiers[i])) { + return false; + } + } + return true; +} + +function versionIncluded(nodeVersion, specifierValue) { + if (typeof specifierValue === 'boolean') { + return specifierValue; + } + + var current = typeof nodeVersion === 'undefined' + ? process.versions && process.versions.node && process.versions.node + : nodeVersion; + + if (typeof current !== 'string') { + throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); + } + + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(current, specifierValue[i])) { + return true; + } + } + return false; + } + return matchesRange(current, specifierValue); +} + +var data = require('./core.json'); + +module.exports = function isCore(x, nodeVersion) { + return has(data, x) && versionIncluded(nodeVersion, data[x]); +}; diff --git a/tools/node_modules/@babel/core/node_modules/is-core-module/package.json b/tools/node_modules/@babel/core/node_modules/is-core-module/package.json new file mode 100644 index 00000000000000..21341cc431a505 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/is-core-module/package.json @@ -0,0 +1,66 @@ +{ + "name": "is-core-module", + "version": "2.2.0", + "description": "Is this specifier a node.js core module?", + "main": "index.js", + "exports": { + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "prepublish": "safe-publish-latest", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "nyc npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-core-module.git" + }, + "keywords": [ + "core", + "modules", + "module", + "npm", + "node", + "dependencies" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-core-module/issues" + }, + "homepage": "https://github.com/inspect-js/is-core-module", + "dependencies": { + "has": "^1.0.3" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.3.0", + "aud": "^1.1.3", + "auto-changelog": "^2.2.1", + "eslint": "^7.14.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.0.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/LICENSE b/tools/node_modules/@babel/core/node_modules/js-tokens/LICENSE similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/js-tokens/LICENSE rename to tools/node_modules/@babel/core/node_modules/js-tokens/LICENSE diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/README.md b/tools/node_modules/@babel/core/node_modules/js-tokens/README.md similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/js-tokens/README.md rename to tools/node_modules/@babel/core/node_modules/js-tokens/README.md diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/index.js b/tools/node_modules/@babel/core/node_modules/js-tokens/index.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/js-tokens/index.js rename to tools/node_modules/@babel/core/node_modules/js-tokens/index.js diff --git a/tools/node_modules/@babel/core/node_modules/js-tokens/package.json b/tools/node_modules/@babel/core/node_modules/js-tokens/package.json new file mode 100644 index 00000000000000..66752fab275101 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/js-tokens/package.json @@ -0,0 +1,30 @@ +{ + "name": "js-tokens", + "version": "4.0.0", + "author": "Simon Lydell", + "license": "MIT", + "description": "A regex that tokenizes JavaScript.", + "keywords": [ + "JavaScript", + "js", + "token", + "tokenize", + "regex" + ], + "files": [ + "index.js" + ], + "repository": "lydell/js-tokens", + "scripts": { + "test": "mocha --ui tdd", + "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js", + "build": "node generate-index.js", + "dev": "npm run build && npm test" + }, + "devDependencies": { + "coffeescript": "2.1.1", + "esprima": "4.0.0", + "everything.js": "1.0.3", + "mocha": "5.0.0" + } +} diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/LICENSE-MIT.txt b/tools/node_modules/@babel/core/node_modules/jsesc/LICENSE-MIT.txt similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/jsesc/LICENSE-MIT.txt rename to tools/node_modules/@babel/core/node_modules/jsesc/LICENSE-MIT.txt diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/README.md b/tools/node_modules/@babel/core/node_modules/jsesc/README.md similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/jsesc/README.md rename to tools/node_modules/@babel/core/node_modules/jsesc/README.md diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/bin/jsesc b/tools/node_modules/@babel/core/node_modules/jsesc/bin/jsesc similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/jsesc/bin/jsesc rename to tools/node_modules/@babel/core/node_modules/jsesc/bin/jsesc diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/jsesc.js b/tools/node_modules/@babel/core/node_modules/jsesc/jsesc.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/jsesc/jsesc.js rename to tools/node_modules/@babel/core/node_modules/jsesc/jsesc.js diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/man/jsesc.1 b/tools/node_modules/@babel/core/node_modules/jsesc/man/jsesc.1 similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/jsesc/man/jsesc.1 rename to tools/node_modules/@babel/core/node_modules/jsesc/man/jsesc.1 diff --git a/tools/node_modules/@babel/core/node_modules/jsesc/package.json b/tools/node_modules/@babel/core/node_modules/jsesc/package.json new file mode 100644 index 00000000000000..f89a7c62a04671 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/jsesc/package.json @@ -0,0 +1,54 @@ +{ + "name": "jsesc", + "version": "2.5.2", + "description": "Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.", + "homepage": "https://mths.be/jsesc", + "engines": { + "node": ">=4" + }, + "main": "jsesc.js", + "bin": "bin/jsesc", + "man": "man/jsesc.1", + "keywords": [ + "buffer", + "escape", + "javascript", + "json", + "map", + "set", + "string", + "stringify", + "tool" + ], + "license": "MIT", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "repository": { + "type": "git", + "url": "https://github.com/mathiasbynens/jsesc.git" + }, + "bugs": "https://github.com/mathiasbynens/jsesc/issues", + "files": [ + "LICENSE-MIT.txt", + "jsesc.js", + "bin/", + "man/" + ], + "scripts": { + "build": "grunt template", + "coveralls": "istanbul cover --verbose --dir 'coverage' 'tests/tests.js' && coveralls < coverage/lcov.info'", + "cover": "istanbul cover --report 'html' --verbose --dir 'coverage' 'tests/tests.js'", + "test": "mocha tests" + }, + "devDependencies": { + "coveralls": "^2.11.6", + "grunt": "^0.4.5", + "grunt-template": "^0.2.3", + "istanbul": "^0.4.2", + "mocha": "*", + "regenerate": "^1.3.0", + "requirejs": "^2.1.22" + } +} diff --git a/tools/node_modules/@babel/core/node_modules/json5/LICENSE.md b/tools/node_modules/@babel/core/node_modules/json5/LICENSE.md new file mode 100644 index 00000000000000..2171aca5a833ac --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/LICENSE.md @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2012-2018 Aseem Kishore, and [others]. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +[others]: https://github.com/json5/json5/contributors diff --git a/tools/node_modules/@babel/core/node_modules/json5/README.md b/tools/node_modules/@babel/core/node_modules/json5/README.md new file mode 100644 index 00000000000000..4f803270be0ae6 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/README.md @@ -0,0 +1,234 @@ +# JSON5 – JSON for Humans + +[![Build Status](https://travis-ci.org/json5/json5.svg)][Build Status] +[![Coverage +Status](https://coveralls.io/repos/github/json5/json5/badge.svg)][Coverage +Status] + +The JSON5 Data Interchange Format (JSON5) is a superset of [JSON] that aims to +alleviate some of the limitations of JSON by expanding its syntax to include +some productions from [ECMAScript 5.1]. + +This JavaScript library is the official reference implementation for JSON5 +parsing and serialization libraries. + +[Build Status]: https://travis-ci.org/json5/json5 + +[Coverage Status]: https://coveralls.io/github/json5/json5 + +[JSON]: https://tools.ietf.org/html/rfc7159 + +[ECMAScript 5.1]: https://www.ecma-international.org/ecma-262/5.1/ + +## Summary of Features +The following ECMAScript 5.1 features, which are not supported in JSON, have +been extended to JSON5. + +### Objects +- Object keys may be an ECMAScript 5.1 _[IdentifierName]_. +- Objects may have a single trailing comma. + +### Arrays +- Arrays may have a single trailing comma. + +### Strings +- Strings may be single quoted. +- Strings may span multiple lines by escaping new line characters. +- Strings may include character escapes. + +### Numbers +- Numbers may be hexadecimal. +- Numbers may have a leading or trailing decimal point. +- Numbers may be [IEEE 754] positive infinity, negative infinity, and NaN. +- Numbers may begin with an explicit plus sign. + +### Comments +- Single and multi-line comments are allowed. + +### White Space +- Additional white space characters are allowed. + +[IdentifierName]: https://www.ecma-international.org/ecma-262/5.1/#sec-7.6 + +[IEEE 754]: http://ieeexplore.ieee.org/servlet/opac?punumber=4610933 + +## Short Example +```js +{ + // comments + unquoted: 'and you can quote me on that', + singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \ +No \\n's!", + hexadecimal: 0xdecaf, + leadingDecimalPoint: .8675309, andTrailing: 8675309., + positiveSign: +1, + trailingComma: 'in objects', andIn: ['arrays',], + "backwardsCompatible": "with JSON", +} +``` + +## Specification +For a detailed explanation of the JSON5 format, please read the [official +specification](https://json5.github.io/json5-spec/). + +## Installation +### Node.js +```sh +npm install json5 +``` + +```js +const JSON5 = require('json5') +``` + +### Browsers +```html + +``` + +This will create a global `JSON5` variable. + +## API +The JSON5 API is compatible with the [JSON API]. + +[JSON API]: +https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON + +### JSON5.parse() +Parses a JSON5 string, constructing the JavaScript value or object described by +the string. An optional reviver function can be provided to perform a +transformation on the resulting object before it is returned. + +#### Syntax + JSON5.parse(text[, reviver]) + +#### Parameters +- `text`: The string to parse as JSON5. +- `reviver`: If a function, this prescribes how the value originally produced by + parsing is transformed, before being returned. + +#### Return value +The object corresponding to the given JSON5 text. + +### JSON5.stringify() +Converts a JavaScript value to a JSON5 string, optionally replacing values if a +replacer function is specified, or optionally including only the specified +properties if a replacer array is specified. + +#### Syntax + JSON5.stringify(value[, replacer[, space]]) + JSON5.stringify(value[, options]) + +#### Parameters +- `value`: The value to convert to a JSON5 string. +- `replacer`: A function that alters the behavior of the stringification + process, or an array of String and Number objects that serve as a whitelist + for selecting/filtering the properties of the value object to be included in + the JSON5 string. If this value is null or not provided, all properties of the + object are included in the resulting JSON5 string. +- `space`: A String or Number object that's used to insert white space into the + output JSON5 string for readability purposes. If this is a Number, it + indicates the number of space characters to use as white space; this number is + capped at 10 (if it is greater, the value is just 10). Values less than 1 + indicate that no space should be used. If this is a String, the string (or the + first 10 characters of the string, if it's longer than that) is used as white + space. If this parameter is not provided (or is null), no white space is used. + If white space is used, trailing commas will be used in objects and arrays. +- `options`: An object with the following properties: + - `replacer`: Same as the `replacer` parameter. + - `space`: Same as the `space` parameter. + - `quote`: A String representing the quote character to use when serializing + strings. + +#### Return value +A JSON5 string representing the value. + +### Node.js `require()` JSON5 files +When using Node.js, you can `require()` JSON5 files by adding the following +statement. + +```js +require('json5/lib/register') +``` + +Then you can load a JSON5 file with a Node.js `require()` statement. For +example: + +```js +const config = require('./config.json5') +``` + +## CLI +Since JSON is more widely used than JSON5, this package includes a CLI for +converting JSON5 to JSON and for validating the syntax of JSON5 documents. + +### Installation +```sh +npm install --global json5 +``` + +### Usage +```sh +json5 [options] +``` + +If `` is not provided, then STDIN is used. + +#### Options: +- `-s`, `--space`: The number of spaces to indent or `t` for tabs +- `-o`, `--out-file [file]`: Output to the specified file, otherwise STDOUT +- `-v`, `--validate`: Validate JSON5 but do not output JSON +- `-V`, `--version`: Output the version number +- `-h`, `--help`: Output usage information + +## Contributing +### Development +```sh +git clone https://github.com/json5/json5 +cd json5 +npm install +``` + +When contributing code, please write relevant tests and run `npm test` and `npm +run lint` before submitting pull requests. Please use an editor that supports +[EditorConfig](http://editorconfig.org/). + +### Issues +To report bugs or request features regarding the JSON5 data format, please +submit an issue to the [official specification +repository](https://github.com/json5/json5-spec). + +To report bugs or request features regarding the JavaScript implementation of +JSON5, please submit an issue to this repository. + +## License +MIT. See [LICENSE.md](./LICENSE.md) for details. + +## Credits +[Assem Kishore](https://github.com/aseemk) founded this project. + +[Michael Bolin](http://bolinfest.com/) independently arrived at and published +some of these same ideas with awesome explanations and detail. Recommended +reading: [Suggested Improvements to JSON](http://bolinfest.com/essays/json.html) + +[Douglas Crockford](http://www.crockford.com/) of course designed and built +JSON, but his state machine diagrams on the [JSON website](http://json.org/), as +cheesy as it may sound, gave us motivation and confidence that building a new +parser to implement these ideas was within reach! The original +implementation of JSON5 was also modeled directly off of Doug’s open-source +[json_parse.js] parser. We’re grateful for that clean and well-documented +code. + +[json_parse.js]: +https://github.com/douglascrockford/JSON-js/blob/03157639c7a7cddd2e9f032537f346f1a87c0f6d/json_parse.js + +[Max Nanasy](https://github.com/MaxNanasy) has been an early and prolific +supporter, contributing multiple patches and ideas. + +[Andrew Eisenberg](https://github.com/aeisenberg) contributed the original +`stringify` method. + +[Jordan Tucker](https://github.com/jordanbtucker) has aligned JSON5 more closely +with ES5, wrote the official JSON5 specification, completely rewrote the +codebase from the ground up, and is actively maintaining this project. diff --git a/tools/node_modules/@babel/core/node_modules/json5/dist/index.js b/tools/node_modules/@babel/core/node_modules/json5/dist/index.js new file mode 100644 index 00000000000000..9f98eb39da13fe --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/dist/index.js @@ -0,0 +1,1710 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.JSON5 = factory()); +}(this, (function () { 'use strict'; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var _global = createCommonjsModule(function (module) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); + if (typeof __g == 'number') { __g = global; } // eslint-disable-line no-undef + }); + + var _core = createCommonjsModule(function (module) { + var core = module.exports = { version: '2.6.5' }; + if (typeof __e == 'number') { __e = core; } // eslint-disable-line no-undef + }); + var _core_1 = _core.version; + + var _isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + var _anObject = function (it) { + if (!_isObject(it)) { throw TypeError(it + ' is not an object!'); } + return it; + }; + + var _fails = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + // Thank's IE8 for his funny defineProperty + var _descriptors = !_fails(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; + }); + + var document = _global.document; + // typeof document.createElement is 'object' in old IE + var is = _isObject(document) && _isObject(document.createElement); + var _domCreate = function (it) { + return is ? document.createElement(it) : {}; + }; + + var _ie8DomDefine = !_descriptors && !_fails(function () { + return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; + }); + + // 7.1.1 ToPrimitive(input [, PreferredType]) + + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var _toPrimitive = function (it, S) { + if (!_isObject(it)) { return it; } + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; } + if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) { return val; } + if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; } + throw TypeError("Can't convert object to primitive value"); + }; + + var dP = Object.defineProperty; + + var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { + _anObject(O); + P = _toPrimitive(P, true); + _anObject(Attributes); + if (_ie8DomDefine) { try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } } + if ('get' in Attributes || 'set' in Attributes) { throw TypeError('Accessors not supported!'); } + if ('value' in Attributes) { O[P] = Attributes.value; } + return O; + }; + + var _objectDp = { + f: f + }; + + var _propertyDesc = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var _hide = _descriptors ? function (object, key, value) { + return _objectDp.f(object, key, _propertyDesc(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var hasOwnProperty = {}.hasOwnProperty; + var _has = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var id = 0; + var px = Math.random(); + var _uid = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + var _library = false; + + var _shared = createCommonjsModule(function (module) { + var SHARED = '__core-js_shared__'; + var store = _global[SHARED] || (_global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: _core.version, + mode: _library ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' + }); + }); + + var _functionToString = _shared('native-function-to-string', Function.toString); + + var _redefine = createCommonjsModule(function (module) { + var SRC = _uid('src'); + + var TO_STRING = 'toString'; + var TPL = ('' + _functionToString).split(TO_STRING); + + _core.inspectSource = function (it) { + return _functionToString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) { _has(val, 'name') || _hide(val, 'name', key); } + if (O[key] === val) { return; } + if (isFunction) { _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); } + if (O === _global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + _hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + _hide(O, key, val); + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || _functionToString.call(this); + }); + }); + + var _aFunction = function (it) { + if (typeof it != 'function') { throw TypeError(it + ' is not a function!'); } + return it; + }; + + // optional / simple context binding + + var _ctx = function (fn, that, length) { + _aFunction(fn); + if (that === undefined) { return fn; } + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) { source = name; } + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; + // extend global + if (target) { _redefine(target, key, out, type & $export.U); } + // export + if (exports[key] != out) { _hide(exports, key, exp); } + if (IS_PROTO && expProto[key] != out) { expProto[key] = out; } + } + }; + _global.core = _core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + var _export = $export; + + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + var _toInteger = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + // 7.2.1 RequireObjectCoercible(argument) + var _defined = function (it) { + if (it == undefined) { throw TypeError("Can't call method on " + it); } + return it; + }; + + // true -> String#at + // false -> String#codePointAt + var _stringAt = function (TO_STRING) { + return function (that, pos) { + var s = String(_defined(that)); + var i = _toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) { return TO_STRING ? '' : undefined; } + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + var $at = _stringAt(false); + _export(_export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } + }); + + var codePointAt = _core.String.codePointAt; + + var max = Math.max; + var min = Math.min; + var _toAbsoluteIndex = function (index, length) { + index = _toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + var fromCharCode = String.fromCharCode; + var $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + _export(_export.S + _export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { + var arguments$1 = arguments; + // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments$1[i++]; + if (_toAbsoluteIndex(code, 0x10ffff) !== code) { throw RangeError(code + ' is not a valid code point'); } + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } + }); + + var fromCodePoint = _core.String.fromCodePoint; + + // This is a generated file. Do not edit. + var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; + var ID_Start = /[\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\u0860-\u086A\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\u09FC\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-\u1884\u1887-\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; + var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\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\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; + + var unicode = { + Space_Separator: Space_Separator, + ID_Start: ID_Start, + ID_Continue: ID_Continue + }; + + var util = { + isSpaceSeparator: function isSpaceSeparator (c) { + return typeof c === 'string' && unicode.Space_Separator.test(c) + }, + + isIdStartChar: function isIdStartChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar: function isIdContinueChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit: function isDigit (c) { + return typeof c === 'string' && /[0-9]/.test(c) + }, + + isHexDigit: function isHexDigit (c) { + return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) + }, + }; + + var source; + var parseState; + var stack; + var pos; + var line; + var column; + var token; + var key; + var root; + + var parse = function parse (text, reviver) { + source = String(text); + parseState = 'start'; + stack = []; + pos = 0; + line = 1; + column = 0; + token = undefined; + key = undefined; + root = undefined; + + do { + token = lex(); + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState](); + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root + }; + + function internalize (holder, name, reviver) { + var value = holder[name]; + if (value != null && typeof value === 'object') { + for (var key in value) { + var replacement = internalize(value, key, reviver); + if (replacement === undefined) { + delete value[key]; + } else { + value[key] = replacement; + } + } + } + + return reviver.call(holder, name, value) + } + + var lexState; + var buffer; + var doubleQuote; + var sign; + var c; + + function lex () { + lexState = 'default'; + buffer = ''; + doubleQuote = false; + sign = 1; + + for (;;) { + c = peek(); + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + var token = lexStates[lexState](); + if (token) { + return token + } + } + } + + function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } + } + + function read () { + var c = peek(); + + if (c === '\n') { + line++; + column = 0; + } else if (c) { + column += c.length; + } else { + column++; + } + + if (c) { + pos += c.length; + } + + return c + } + + var lexStates = { + default: function default$1 () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + return + + case '/': + read(); + lexState = 'comment'; + return + + case undefined: + read(); + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read(); + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment: function comment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineComment'; + return + + case '/': + read(); + lexState = 'singleLineComment'; + return + } + + throw invalidChar(read()) + }, + + multiLineComment: function multiLineComment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineCommentAsterisk'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + }, + + multiLineCommentAsterisk: function multiLineCommentAsterisk () { + switch (c) { + case '*': + read(); + return + + case '/': + read(); + lexState = 'default'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + lexState = 'multiLineComment'; + }, + + singleLineComment: function singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + lexState = 'default'; + return + + case undefined: + read(); + return newToken('eof') + } + + read(); + }, + + value: function value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + case 'n': + read(); + literal('ull'); + return newToken('null', null) + + case 't': + read(); + literal('rue'); + return newToken('boolean', true) + + case 'f': + read(); + literal('alse'); + return newToken('boolean', false) + + case '-': + case '+': + if (read() === '-') { + sign = -1; + } + + lexState = 'sign'; + return + + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read() === '"'); + buffer = ''; + lexState = 'string'; + return + } + + throw invalidChar(read()) + }, + + identifierNameStartEscape: function identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + var u = unicodeEscape(); + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + identifierName: function identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read(); + return + + case '\\': + read(); + lexState = 'identifierNameEscape'; + return + } + + if (util.isIdContinueChar(c)) { + buffer += read(); + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape: function identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + var u = unicodeEscape(); + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + sign: function sign$1 () { + switch (c) { + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', sign * Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + } + + throw invalidChar(read()) + }, + + zero: function zero () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + + case 'x': + case 'X': + buffer += read(); + lexState = 'hexadecimal'; + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger: function decimalInteger () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading: function decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + throw invalidChar(read()) + }, + + decimalPoint: function decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction: function decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent: function decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read(); + lexState = 'decimalExponentSign'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentSign: function decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentInteger: function decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal: function hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = 'hexadecimalInteger'; + return + } + + throw invalidChar(read()) + }, + + hexadecimalInteger: function hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string: function string () { + switch (c) { + case '\\': + read(); + buffer += escape(); + return + + case '"': + if (doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case "'": + if (!doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case '\n': + case '\r': + throw invalidChar(read()) + + case '\u2028': + case '\u2029': + separatorChar(c); + break + + case undefined: + throw invalidChar(read()) + } + + buffer += read(); + }, + + start: function start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value'; + }, + + beforePropertyName: function beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read(); + lexState = 'identifierName'; + return + + case '\\': + read(); + lexState = 'identifierNameStartEscape'; + return + + case '}': + return newToken('punctuator', read()) + + case '"': + case "'": + doubleQuote = (read() === '"'); + lexState = 'string'; + return + } + + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = 'identifierName'; + return + } + + throw invalidChar(read()) + }, + + afterPropertyName: function afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforePropertyValue: function beforePropertyValue () { + lexState = 'value'; + }, + + afterPropertyValue: function afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforeArrayValue: function beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read()) + } + + lexState = 'value'; + }, + + afterArrayValue: function afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + end: function end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read()) + }, + }; + + function newToken (type, value) { + return { + type: type, + value: value, + line: line, + column: column, + } + } + + function literal (s) { + for (var i = 0, list = s; i < list.length; i += 1) { + var c = list[i]; + + var p = peek(); + + if (p !== c) { + throw invalidChar(read()) + } + + read(); + } + } + + function escape () { + var c = peek(); + switch (c) { + case 'b': + read(); + return '\b' + + case 'f': + read(); + return '\f' + + case 'n': + read(); + return '\n' + + case 'r': + read(); + return '\r' + + case 't': + read(); + return '\t' + + case 'v': + read(); + return '\v' + + case '0': + read(); + if (util.isDigit(peek())) { + throw invalidChar(read()) + } + + return '\0' + + case 'x': + read(); + return hexEscape() + + case 'u': + read(); + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read(); + return '' + + case '\r': + read(); + if (peek() === '\n') { + read(); + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read()) + + case undefined: + throw invalidChar(read()) + } + + return read() + } + + function hexEscape () { + var buffer = ''; + var c = peek(); + + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + return String.fromCodePoint(parseInt(buffer, 16)) + } + + function unicodeEscape () { + var buffer = ''; + var count = 4; + + while (count-- > 0) { + var c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + } + + return String.fromCodePoint(parseInt(buffer, 16)) + } + + var parseStates = { + start: function start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforePropertyName: function beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value; + parseState = 'afterPropertyName'; + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop(); + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName: function afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue'; + }, + + beforePropertyValue: function beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforeArrayValue: function beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop(); + return + } + + push(); + }, + + afterPropertyValue: function afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName'; + return + + case '}': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue: function afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue'; + return + + case ']': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end: function end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, + }; + + function push () { + var value; + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {}; + break + + case '[': + value = []; + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value; + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value; + } else { + var parent = stack[stack.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + parent[key] = value; + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value); + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue'; + } else { + parseState = 'beforePropertyName'; + } + } else { + var current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } + } + } + + function pop () { + stack.pop(); + + var current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } + } + + // This code is unreachable. + // function invalidParseState () { + // return new Error(`JSON5: invalid parse state '${parseState}'`) + // } + + // This code is unreachable. + // function invalidLexState (state) { + // return new Error(`JSON5: invalid lex state '${state}'`) + // } + + function invalidChar (c) { + if (c === undefined) { + return syntaxError(("JSON5: invalid end of input at " + line + ":" + column)) + } + + return syntaxError(("JSON5: invalid character '" + (formatChar(c)) + "' at " + line + ":" + column)) + } + + function invalidEOF () { + return syntaxError(("JSON5: invalid end of input at " + line + ":" + column)) + } + + // This code is unreachable. + // function invalidToken () { + // if (token.type === 'eof') { + // return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) + // } + + // const c = String.fromCodePoint(token.value.codePointAt(0)) + // return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) + // } + + function invalidIdentifier () { + column -= 5; + return syntaxError(("JSON5: invalid identifier character at " + line + ":" + column)) + } + + function separatorChar (c) { + console.warn(("JSON5: '" + (formatChar(c)) + "' in strings is not valid ECMAScript; consider escaping")); + } + + function formatChar (c) { + var replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + var hexString = c.charCodeAt(0).toString(16); + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c + } + + function syntaxError (message) { + var err = new SyntaxError(message); + err.lineNumber = line; + err.columnNumber = column; + return err + } + + var stringify = function stringify (value, replacer, space) { + var stack = []; + var indent = ''; + var propertyList; + var replacerFunc; + var gap = ''; + var quote; + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space; + quote = replacer.quote; + replacer = replacer.replacer; + } + + if (typeof replacer === 'function') { + replacerFunc = replacer; + } else if (Array.isArray(replacer)) { + propertyList = []; + for (var i = 0, list = replacer; i < list.length; i += 1) { + var v = list[i]; + + var item = (void 0); + + if (typeof v === 'string') { + item = v; + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v); + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item); + } + } + } + + if (space instanceof Number) { + space = Number(space); + } else if (space instanceof String) { + space = String(space); + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)); + gap = ' '.substr(0, space); + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10); + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + var value = holder[key]; + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key); + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value); + } + + if (value instanceof Number) { + value = Number(value); + } else if (value instanceof String) { + value = String(value); + } else if (value instanceof Boolean) { + value = value.valueOf(); + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value, false) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + var quotes = { + "'": 0.1, + '"': 0.2, + }; + + var replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + var product = ''; + + for (var i = 0; i < value.length; i++) { + var c = value[i]; + switch (c) { + case "'": + case '"': + quotes[c]++; + product += c; + continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00'; + continue + } + } + + if (replacements[c]) { + product += replacements[c]; + continue + } + + if (c < ' ') { + var hexString = c.charCodeAt(0).toString(16); + product += '\\x' + ('00' + hexString).substring(hexString.length); + continue + } + + product += c; + } + + var quoteChar = quote || Object.keys(quotes).reduce(function (a, b) { return (quotes[a] < quotes[b]) ? a : b; }); + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + var stepback = indent; + indent = indent + gap; + + var keys = propertyList || Object.keys(value); + var partial = []; + for (var i = 0, list = keys; i < list.length; i += 1) { + var key = list[i]; + + var propertyString = serializeProperty(key, value); + if (propertyString !== undefined) { + var member = serializeKey(key) + ':'; + if (gap !== '') { + member += ' '; + } + member += propertyString; + partial.push(member); + } + } + + var final; + if (partial.length === 0) { + final = '{}'; + } else { + var properties; + if (gap === '') { + properties = partial.join(','); + final = '{' + properties + '}'; + } else { + var separator = ',\n' + indent; + properties = partial.join(separator); + final = '{\n' + indent + properties + ',\n' + stepback + '}'; + } + } + + stack.pop(); + indent = stepback; + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key, true) + } + + var firstChar = String.fromCodePoint(key.codePointAt(0)); + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true) + } + + for (var i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + var stepback = indent; + indent = indent + gap; + + var partial = []; + for (var i = 0; i < value.length; i++) { + var propertyString = serializeProperty(String(i), value); + partial.push((propertyString !== undefined) ? propertyString : 'null'); + } + + var final; + if (partial.length === 0) { + final = '[]'; + } else { + if (gap === '') { + var properties = partial.join(','); + final = '[' + properties + ']'; + } else { + var separator = ',\n' + indent; + var properties$1 = partial.join(separator); + final = '[\n' + indent + properties$1 + ',\n' + stepback + ']'; + } + } + + stack.pop(); + indent = stepback; + return final + } + }; + + var JSON5 = { + parse: parse, + stringify: stringify, + }; + + var lib = JSON5; + + var es5 = lib; + + return es5; + +}))); diff --git a/tools/node_modules/@babel/core/node_modules/json5/dist/index.min.js b/tools/node_modules/@babel/core/node_modules/json5/dist/index.min.js new file mode 100644 index 00000000000000..da63a9da38f4dc --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/dist/index.min.js @@ -0,0 +1 @@ +!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";function u(u,D){return u(D={exports:{}},D.exports),D.exports}var D=u(function(u){var D=u.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=D)}),e=u(function(u){var D=u.exports={version:"2.6.5"};"number"==typeof __e&&(__e=D)}),t=(e.version,function(u){return"object"==typeof u?null!==u:"function"==typeof u}),r=function(u){if(!t(u))throw TypeError(u+" is not an object!");return u},F=function(u){try{return!!u()}catch(u){return!0}},n=!F(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),C=D.document,A=t(C)&&t(C.createElement),i=!n&&!F(function(){return 7!=Object.defineProperty((u="div",A?C.createElement(u):{}),"a",{get:function(){return 7}}).a;var u}),E=Object.defineProperty,o={f:n?Object.defineProperty:function(u,D,e){if(r(u),D=function(u,D){if(!t(u))return u;var e,r;if(D&&"function"==typeof(e=u.toString)&&!t(r=e.call(u)))return r;if("function"==typeof(e=u.valueOf)&&!t(r=e.call(u)))return r;if(!D&&"function"==typeof(e=u.toString)&&!t(r=e.call(u)))return r;throw TypeError("Can't convert object to primitive value")}(D,!0),r(e),i)try{return E(u,D,e)}catch(u){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(u[D]=e.value),u}},a=n?function(u,D,e){return o.f(u,D,function(u,D){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:D}}(1,e))}:function(u,D,e){return u[D]=e,u},c={}.hasOwnProperty,B=function(u,D){return c.call(u,D)},s=0,f=Math.random(),l=u(function(u){var t=D["__core-js_shared__"]||(D["__core-js_shared__"]={});(u.exports=function(u,D){return t[u]||(t[u]=void 0!==D?D:{})})("versions",[]).push({version:e.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})("native-function-to-string",Function.toString),d=u(function(u){var t,r="Symbol(".concat(void 0===(t="src")?"":t,")_",(++s+f).toString(36)),F=(""+l).split("toString");e.inspectSource=function(u){return l.call(u)},(u.exports=function(u,e,t,n){var C="function"==typeof t;C&&(B(t,"name")||a(t,"name",e)),u[e]!==t&&(C&&(B(t,r)||a(t,r,u[e]?""+u[e]:F.join(String(e)))),u===D?u[e]=t:n?u[e]?u[e]=t:a(u,e,t):(delete u[e],a(u,e,t)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[r]||l.call(this)})}),v=function(u,D,e){if(function(u){if("function"!=typeof u)throw TypeError(u+" is not a function!")}(u),void 0===D)return u;switch(e){case 1:return function(e){return u.call(D,e)};case 2:return function(e,t){return u.call(D,e,t)};case 3:return function(e,t,r){return u.call(D,e,t,r)}}return function(){return u.apply(D,arguments)}},p=function(u,t,r){var F,n,C,A,i=u&p.F,E=u&p.G,o=u&p.S,c=u&p.P,B=u&p.B,s=E?D:o?D[t]||(D[t]={}):(D[t]||{}).prototype,f=E?e:e[t]||(e[t]={}),l=f.prototype||(f.prototype={});for(F in E&&(r=t),r)C=((n=!i&&s&&void 0!==s[F])?s:r)[F],A=B&&n?v(C,D):c&&"function"==typeof C?v(Function.call,C):C,s&&d(s,F,C,u&p.U),f[F]!=C&&a(f,F,A),c&&l[F]!=C&&(l[F]=C)};D.core=e,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,p.U=64,p.R=128;var h,m=p,g=Math.ceil,y=Math.floor,w=function(u){return isNaN(u=+u)?0:(u>0?y:g)(u)},S=(h=!1,function(u,D){var e,t,r=String(function(u){if(null==u)throw TypeError("Can't call method on "+u);return u}(u)),F=w(D),n=r.length;return F<0||F>=n?h?"":void 0:(e=r.charCodeAt(F))<55296||e>56319||F+1===n||(t=r.charCodeAt(F+1))<56320||t>57343?h?r.charAt(F):e:h?r.slice(F,F+2):t-56320+(e-55296<<10)+65536});m(m.P,"String",{codePointAt:function(u){return S(this,u)}});e.String.codePointAt;var b=Math.max,x=Math.min,N=String.fromCharCode,P=String.fromCodePoint;m(m.S+m.F*(!!P&&1!=P.length),"String",{fromCodePoint:function(u){for(var D,e,t,r=arguments,F=[],n=arguments.length,C=0;n>C;){if(D=+r[C++],t=1114111,((e=w(e=D))<0?b(e+t,0):x(e,t))!==D)throw RangeError(D+" is not a valid code point");F.push(D<65536?N(D):N(55296+((D-=65536)>>10),D%1024+56320))}return F.join("")}});e.String.fromCodePoint;var _,I,O,j,V,J,M,k,L,T,z,H,$,R,G={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\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\u0860-\u086A\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\u09FC\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-\u1884\u1887-\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\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\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},U={isSpaceSeparator:function(u){return"string"==typeof u&&G.Space_Separator.test(u)},isIdStartChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||G.ID_Start.test(u))},isIdContinueChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||G.ID_Continue.test(u))},isDigit:function(u){return"string"==typeof u&&/[0-9]/.test(u)},isHexDigit:function(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};function Z(){for(T="default",z="",H=!1,$=1;;){R=q();var u=X[T]();if(u)return u}}function q(){if(_[j])return String.fromCodePoint(_.codePointAt(j))}function W(){var u=q();return"\n"===u?(V++,J=0):u?J+=u.length:J++,u&&(j+=u.length),u}var X={default:function(){switch(R){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void W();case"/":return W(),void(T="comment");case void 0:return W(),K("eof")}if(!U.isSpaceSeparator(R))return X[I]();W()},comment:function(){switch(R){case"*":return W(),void(T="multiLineComment");case"/":return W(),void(T="singleLineComment")}throw tu(W())},multiLineComment:function(){switch(R){case"*":return W(),void(T="multiLineCommentAsterisk");case void 0:throw tu(W())}W()},multiLineCommentAsterisk:function(){switch(R){case"*":return void W();case"/":return W(),void(T="default");case void 0:throw tu(W())}W(),T="multiLineComment"},singleLineComment:function(){switch(R){case"\n":case"\r":case"\u2028":case"\u2029":return W(),void(T="default");case void 0:return W(),K("eof")}W()},value:function(){switch(R){case"{":case"[":return K("punctuator",W());case"n":return W(),Q("ull"),K("null",null);case"t":return W(),Q("rue"),K("boolean",!0);case"f":return W(),Q("alse"),K("boolean",!1);case"-":case"+":return"-"===W()&&($=-1),void(T="sign");case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",1/0);case"N":return W(),Q("aN"),K("numeric",NaN);case'"':case"'":return H='"'===W(),z="",void(T="string")}throw tu(W())},identifierNameStartEscape:function(){if("u"!==R)throw tu(W());W();var u=Y();switch(u){case"$":case"_":break;default:if(!U.isIdStartChar(u))throw Fu()}z+=u,T="identifierName"},identifierName:function(){switch(R){case"$":case"_":case"‌":case"‍":return void(z+=W());case"\\":return W(),void(T="identifierNameEscape")}if(!U.isIdContinueChar(R))return K("identifier",z);z+=W()},identifierNameEscape:function(){if("u"!==R)throw tu(W());W();var u=Y();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!U.isIdContinueChar(u))throw Fu()}z+=u,T="identifierName"},sign:function(){switch(R){case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",$*(1/0));case"N":return W(),Q("aN"),K("numeric",NaN)}throw tu(W())},zero:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent");case"x":case"X":return z+=W(),void(T="hexadecimal")}return K("numeric",0*$)},decimalInteger:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalPointLeading:function(){if(U.isDigit(R))return z+=W(),void(T="decimalFraction");throw tu(W())},decimalPoint:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}return U.isDigit(R)?(z+=W(),void(T="decimalFraction")):K("numeric",$*Number(z))},decimalFraction:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalExponent:function(){switch(R){case"+":case"-":return z+=W(),void(T="decimalExponentSign")}if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw tu(W())},decimalExponentSign:function(){if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw tu(W())},decimalExponentInteger:function(){if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},hexadecimal:function(){if(U.isHexDigit(R))return z+=W(),void(T="hexadecimalInteger");throw tu(W())},hexadecimalInteger:function(){if(!U.isHexDigit(R))return K("numeric",$*Number(z));z+=W()},string:function(){switch(R){case"\\":return W(),void(z+=function(){switch(q()){case"b":return W(),"\b";case"f":return W(),"\f";case"n":return W(),"\n";case"r":return W(),"\r";case"t":return W(),"\t";case"v":return W(),"\v";case"0":if(W(),U.isDigit(q()))throw tu(W());return"\0";case"x":return W(),function(){var u="",D=q();if(!U.isHexDigit(D))throw tu(W());if(u+=W(),D=q(),!U.isHexDigit(D))throw tu(W());return u+=W(),String.fromCodePoint(parseInt(u,16))}();case"u":return W(),Y();case"\n":case"\u2028":case"\u2029":return W(),"";case"\r":return W(),"\n"===q()&&W(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw tu(W())}return W()}());case'"':return H?(W(),K("string",z)):void(z+=W());case"'":return H?void(z+=W()):(W(),K("string",z));case"\n":case"\r":throw tu(W());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+nu(u)+"' in strings is not valid ECMAScript; consider escaping")}(R);break;case void 0:throw tu(W())}z+=W()},start:function(){switch(R){case"{":case"[":return K("punctuator",W())}T="value"},beforePropertyName:function(){switch(R){case"$":case"_":return z=W(),void(T="identifierName");case"\\":return W(),void(T="identifierNameStartEscape");case"}":return K("punctuator",W());case'"':case"'":return H='"'===W(),void(T="string")}if(U.isIdStartChar(R))return z+=W(),void(T="identifierName");throw tu(W())},afterPropertyName:function(){if(":"===R)return K("punctuator",W());throw tu(W())},beforePropertyValue:function(){T="value"},afterPropertyValue:function(){switch(R){case",":case"}":return K("punctuator",W())}throw tu(W())},beforeArrayValue:function(){if("]"===R)return K("punctuator",W());T="value"},afterArrayValue:function(){switch(R){case",":case"]":return K("punctuator",W())}throw tu(W())},end:function(){throw tu(W())}};function K(u,D){return{type:u,value:D,line:V,column:J}}function Q(u){for(var D=0,e=u;D0;){var e=q();if(!U.isHexDigit(e))throw tu(W());u+=W()}return String.fromCodePoint(parseInt(u,16))}var uu={start:function(){if("eof"===M.type)throw ru();Du()},beforePropertyName:function(){switch(M.type){case"identifier":case"string":return k=M.value,void(I="afterPropertyName");case"punctuator":return void eu();case"eof":throw ru()}},afterPropertyName:function(){if("eof"===M.type)throw ru();I="beforePropertyValue"},beforePropertyValue:function(){if("eof"===M.type)throw ru();Du()},beforeArrayValue:function(){if("eof"===M.type)throw ru();"punctuator"!==M.type||"]"!==M.value?Du():eu()},afterPropertyValue:function(){if("eof"===M.type)throw ru();switch(M.value){case",":return void(I="beforePropertyName");case"}":eu()}},afterArrayValue:function(){if("eof"===M.type)throw ru();switch(M.value){case",":return void(I="beforeArrayValue");case"]":eu()}},end:function(){}};function Du(){var u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}if(void 0===L)L=u;else{var D=O[O.length-1];Array.isArray(D)?D.push(u):D[k]=u}if(null!==u&&"object"==typeof u)O.push(u),I=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var e=O[O.length-1];I=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function eu(){O.pop();var u=O[O.length-1];I=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function tu(u){return Cu(void 0===u?"JSON5: invalid end of input at "+V+":"+J:"JSON5: invalid character '"+nu(u)+"' at "+V+":"+J)}function ru(){return Cu("JSON5: invalid end of input at "+V+":"+J)}function Fu(){return Cu("JSON5: invalid identifier character at "+V+":"+(J-=5))}function nu(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}function Cu(u){var D=new SyntaxError(u);return D.lineNumber=V,D.columnNumber=J,D}return{parse:function(u,D){_=String(u),I="start",O=[],j=0,V=1,J=0,M=void 0,k=void 0,L=void 0;do{M=Z(),uu[I]()}while("eof"!==M.type);return"function"==typeof D?function u(D,e,t){var r=D[e];if(null!=r&&"object"==typeof r)for(var F in r){var n=u(r,F,t);void 0===n?delete r[F]:r[F]=n}return t.call(D,e,r)}({"":L},"",D):L},stringify:function(u,D,e){var t,r,F,n=[],C="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,F=D.quote,D=D.replacer),"function"==typeof D)r=D;else if(Array.isArray(D)){t=[];for(var i=0,E=D;i0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),c("",{"":u});function c(u,D){var e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),r&&(e=r.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?B(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(n.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,t=[],r=0;r=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,r,F=t||Object.keys(u),i=[],E=0,o=F;E"string"==typeof u&&unicode.Space_Separator.test(u),isIdStartChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||unicode.ID_Start.test(u)),isIdContinueChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||unicode.ID_Continue.test(u)),isDigit:u=>"string"==typeof u&&/[0-9]/.test(u),isHexDigit:u=>"string"==typeof u&&/[0-9A-Fa-f]/.test(u)};let source,parseState,stack,pos,line,column,token,key,root;var parse=function(u,D){source=String(u),parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do{token=lex(),parseStates[parseState]()}while("eof"!==token.type);return"function"==typeof D?internalize({"":root},"",D):root};function internalize(u,D,e){const r=u[D];if(null!=r&&"object"==typeof r)for(const u in r){const D=internalize(r,u,e);void 0===D?delete r[u]:r[u]=D}return e.call(u,D,r)}let lexState,buffer,doubleQuote,sign,c;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c=peek();const u=lexStates[lexState]();if(u)return u}}function peek(){if(source[pos])return String.fromCodePoint(source.codePointAt(pos))}function read(){const u=peek();return"\n"===u?(line++,column=0):u?column+=u.length:column++,u&&(pos+=u.length),u}const lexStates={default(){switch(c){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void read();case"/":return read(),void(lexState="comment");case void 0:return read(),newToken("eof")}if(!util.isSpaceSeparator(c))return lexStates[parseState]();read()},comment(){switch(c){case"*":return read(),void(lexState="multiLineComment");case"/":return read(),void(lexState="singleLineComment")}throw invalidChar(read())},multiLineComment(){switch(c){case"*":return read(),void(lexState="multiLineCommentAsterisk");case void 0:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":return void read();case"/":return read(),void(lexState="default");case void 0:throw invalidChar(read())}read(),lexState="multiLineComment"},singleLineComment(){switch(c){case"\n":case"\r":case"\u2028":case"\u2029":return read(),void(lexState="default");case void 0:return read(),newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":return read(),literal("ull"),newToken("null",null);case"t":return read(),literal("rue"),newToken("boolean",!0);case"f":return read(),literal("alse"),newToken("boolean",!1);case"-":case"+":return"-"===read()&&(sign=-1),void(lexState="sign");case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",1/0);case"N":return read(),literal("aN"),newToken("numeric",NaN);case'"':case"'":return doubleQuote='"'===read(),buffer="",void(lexState="string")}throw invalidChar(read())},identifierNameStartEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!util.isIdStartChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"‌":case"‍":return void(buffer+=read());case"\\":return read(),void(lexState="identifierNameEscape")}if(!util.isIdContinueChar(c))return newToken("identifier",buffer);buffer+=read()},identifierNameEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!util.isIdContinueChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},sign(){switch(c){case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",sign*(1/0));case"N":return read(),literal("aN"),newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent");case"x":case"X":return buffer+=read(),void(lexState="hexadecimal")}return newToken("numeric",0*sign)},decimalInteger(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalPointLeading(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalFraction");throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}return util.isDigit(c)?(buffer+=read(),void(lexState="decimalFraction")):newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalExponent(){switch(c){case"+":case"-":return buffer+=read(),void(lexState="decimalExponentSign")}if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentSign(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentInteger(){if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},hexadecimal(){if(util.isHexDigit(c))return buffer+=read(),void(lexState="hexadecimalInteger");throw invalidChar(read())},hexadecimalInteger(){if(!util.isHexDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},string(){switch(c){case"\\":return read(),void(buffer+=escape());case'"':return doubleQuote?(read(),newToken("string",buffer)):void(buffer+=read());case"'":return doubleQuote?void(buffer+=read()):(read(),newToken("string",buffer));case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c);break;case void 0:throw invalidChar(read())}buffer+=read()},start(){switch(c){case"{":case"[":return newToken("punctuator",read())}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":return buffer=read(),void(lexState="identifierName");case"\\":return read(),void(lexState="identifierNameStartEscape");case"}":return newToken("punctuator",read());case'"':case"'":return doubleQuote='"'===read(),void(lexState="string")}if(util.isIdStartChar(c))return buffer+=read(),void(lexState="identifierName");throw invalidChar(read())},afterPropertyName(){if(":"===c)return newToken("punctuator",read());throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if("]"===c)return newToken("punctuator",read());lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(u,D){return{type:u,value:D,line:line,column:column}}function literal(u){for(const D of u){if(peek()!==D)throw invalidChar(read());read()}}function escape(){switch(peek()){case"b":return read(),"\b";case"f":return read(),"\f";case"n":return read(),"\n";case"r":return read(),"\r";case"t":return read(),"\t";case"v":return read(),"\v";case"0":if(read(),util.isDigit(peek()))throw invalidChar(read());return"\0";case"x":return read(),hexEscape();case"u":return read(),unicodeEscape();case"\n":case"\u2028":case"\u2029":return read(),"";case"\r":return read(),"\n"===peek()&&read(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw invalidChar(read())}return read()}function hexEscape(){let u="",D=peek();if(!util.isHexDigit(D))throw invalidChar(read());if(u+=read(),D=peek(),!util.isHexDigit(D))throw invalidChar(read());return u+=read(),String.fromCodePoint(parseInt(u,16))}function unicodeEscape(){let u="",D=4;for(;D-- >0;){const D=peek();if(!util.isHexDigit(D))throw invalidChar(read());u+=read()}return String.fromCodePoint(parseInt(u,16))}const parseStates={start(){if("eof"===token.type)throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":return key=token.value,void(parseState="afterPropertyName");case"punctuator":return void pop();case"eof":throw invalidEOF()}},afterPropertyName(){if("eof"===token.type)throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if("eof"===token.type)throw invalidEOF();push()},beforeArrayValue(){if("eof"===token.type)throw invalidEOF();"punctuator"!==token.type||"]"!==token.value?push():pop()},afterPropertyValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforePropertyName");case"}":pop()}},afterArrayValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforeArrayValue");case"]":pop()}},end(){}};function push(){let u;switch(token.type){case"punctuator":switch(token.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=token.value}if(void 0===root)root=u;else{const D=stack[stack.length-1];Array.isArray(D)?D.push(u):D[key]=u}if(null!==u&&"object"==typeof u)stack.push(u),parseState=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function pop(){stack.pop();const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function invalidChar(u){return syntaxError(void 0===u?`JSON5: invalid end of input at ${line}:${column}`:`JSON5: invalid character '${formatChar(u)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){return syntaxError(`JSON5: invalid identifier character at ${line}:${column-=5}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);return D.lineNumber=line,D.columnNumber=column,D}var stringify=function(u,D,e){const r=[];let t,F,C,a="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,C=D.quote,D=D.replacer),"function"==typeof D)F=D;else if(Array.isArray(D)){t=[];for(const u of D){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&t.indexOf(D)<0&&t.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),E("",{"":u});function E(u,D){let e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),F&&(e=F.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?n(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,t=[];for(let D=0;D=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,F=t||Object.keys(u),C=[];for(const D of F){const e=E(D,u);if(void 0!==e){let u=i(D)+":";""!==A&&(u+=" "),u+=e,C.push(u)}}if(0===C.length)e="{}";else{let u;if(""===A)u=C.join(","),e="{"+u+"}";else{let r=",\n"+a;u=C.join(r),e="{\n"+a+u+",\n"+D+"}"}}return r.pop(),a=D,e}(e):void 0}function n(u){const D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let r="";for(let t=0;tD[u]= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit (c) { + return typeof c === 'string' && /[0-9]/.test(c) + }, + + isHexDigit (c) { + return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) + }, +}; + +let source; +let parseState; +let stack; +let pos; +let line; +let column; +let token; +let key; +let root; + +var parse = function parse (text, reviver) { + source = String(text); + parseState = 'start'; + stack = []; + pos = 0; + line = 1; + column = 0; + token = undefined; + key = undefined; + root = undefined; + + do { + token = lex(); + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState](); + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root +}; + +function internalize (holder, name, reviver) { + const value = holder[name]; + if (value != null && typeof value === 'object') { + for (const key in value) { + const replacement = internalize(value, key, reviver); + if (replacement === undefined) { + delete value[key]; + } else { + value[key] = replacement; + } + } + } + + return reviver.call(holder, name, value) +} + +let lexState; +let buffer; +let doubleQuote; +let sign; +let c; + +function lex () { + lexState = 'default'; + buffer = ''; + doubleQuote = false; + sign = 1; + + for (;;) { + c = peek(); + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + const token = lexStates[lexState](); + if (token) { + return token + } + } +} + +function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } +} + +function read () { + const c = peek(); + + if (c === '\n') { + line++; + column = 0; + } else if (c) { + column += c.length; + } else { + column++; + } + + if (c) { + pos += c.length; + } + + return c +} + +const lexStates = { + default () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + return + + case '/': + read(); + lexState = 'comment'; + return + + case undefined: + read(); + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read(); + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineComment'; + return + + case '/': + read(); + lexState = 'singleLineComment'; + return + } + + throw invalidChar(read()) + }, + + multiLineComment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineCommentAsterisk'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + }, + + multiLineCommentAsterisk () { + switch (c) { + case '*': + read(); + return + + case '/': + read(); + lexState = 'default'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + lexState = 'multiLineComment'; + }, + + singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + lexState = 'default'; + return + + case undefined: + read(); + return newToken('eof') + } + + read(); + }, + + value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + case 'n': + read(); + literal('ull'); + return newToken('null', null) + + case 't': + read(); + literal('rue'); + return newToken('boolean', true) + + case 'f': + read(); + literal('alse'); + return newToken('boolean', false) + + case '-': + case '+': + if (read() === '-') { + sign = -1; + } + + lexState = 'sign'; + return + + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read() === '"'); + buffer = ''; + lexState = 'string'; + return + } + + throw invalidChar(read()) + }, + + identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + const u = unicodeEscape(); + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read(); + return + + case '\\': + read(); + lexState = 'identifierNameEscape'; + return + } + + if (util.isIdContinueChar(c)) { + buffer += read(); + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + const u = unicodeEscape(); + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + sign () { + switch (c) { + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', sign * Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + } + + throw invalidChar(read()) + }, + + zero () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + + case 'x': + case 'X': + buffer += read(); + lexState = 'hexadecimal'; + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + throw invalidChar(read()) + }, + + decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read(); + lexState = 'decimalExponentSign'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = 'hexadecimalInteger'; + return + } + + throw invalidChar(read()) + }, + + hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string () { + switch (c) { + case '\\': + read(); + buffer += escape(); + return + + case '"': + if (doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case "'": + if (!doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case '\n': + case '\r': + throw invalidChar(read()) + + case '\u2028': + case '\u2029': + separatorChar(c); + break + + case undefined: + throw invalidChar(read()) + } + + buffer += read(); + }, + + start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value'; + }, + + beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read(); + lexState = 'identifierName'; + return + + case '\\': + read(); + lexState = 'identifierNameStartEscape'; + return + + case '}': + return newToken('punctuator', read()) + + case '"': + case "'": + doubleQuote = (read() === '"'); + lexState = 'string'; + return + } + + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = 'identifierName'; + return + } + + throw invalidChar(read()) + }, + + afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforePropertyValue () { + lexState = 'value'; + }, + + afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read()) + } + + lexState = 'value'; + }, + + afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read()) + }, +}; + +function newToken (type, value) { + return { + type, + value, + line, + column, + } +} + +function literal (s) { + for (const c of s) { + const p = peek(); + + if (p !== c) { + throw invalidChar(read()) + } + + read(); + } +} + +function escape () { + const c = peek(); + switch (c) { + case 'b': + read(); + return '\b' + + case 'f': + read(); + return '\f' + + case 'n': + read(); + return '\n' + + case 'r': + read(); + return '\r' + + case 't': + read(); + return '\t' + + case 'v': + read(); + return '\v' + + case '0': + read(); + if (util.isDigit(peek())) { + throw invalidChar(read()) + } + + return '\0' + + case 'x': + read(); + return hexEscape() + + case 'u': + read(); + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read(); + return '' + + case '\r': + read(); + if (peek() === '\n') { + read(); + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read()) + + case undefined: + throw invalidChar(read()) + } + + return read() +} + +function hexEscape () { + let buffer = ''; + let c = peek(); + + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +function unicodeEscape () { + let buffer = ''; + let count = 4; + + while (count-- > 0) { + const c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + } + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +const parseStates = { + start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value; + parseState = 'afterPropertyName'; + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop(); + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue'; + }, + + beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop(); + return + } + + push(); + }, + + afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName'; + return + + case '}': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue'; + return + + case ']': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, +}; + +function push () { + let value; + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {}; + break + + case '[': + value = []; + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value; + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value; + } else { + const parent = stack[stack.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + parent[key] = value; + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value); + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue'; + } else { + parseState = 'beforePropertyName'; + } + } else { + const current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } + } +} + +function pop () { + stack.pop(); + + const current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } +} + +// This code is unreachable. +// function invalidParseState () { +// return new Error(`JSON5: invalid parse state '${parseState}'`) +// } + +// This code is unreachable. +// function invalidLexState (state) { +// return new Error(`JSON5: invalid lex state '${state}'`) +// } + +function invalidChar (c) { + if (c === undefined) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) + } + + return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +} + +function invalidEOF () { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +} + +// This code is unreachable. +// function invalidToken () { +// if (token.type === 'eof') { +// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +// } + +// const c = String.fromCodePoint(token.value.codePointAt(0)) +// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +// } + +function invalidIdentifier () { + column -= 5; + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) +} + +function separatorChar (c) { + console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`); +} + +function formatChar (c) { + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + const hexString = c.charCodeAt(0).toString(16); + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c +} + +function syntaxError (message) { + const err = new SyntaxError(message); + err.lineNumber = line; + err.columnNumber = column; + return err +} + +var stringify = function stringify (value, replacer, space) { + const stack = []; + let indent = ''; + let propertyList; + let replacerFunc; + let gap = ''; + let quote; + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space; + quote = replacer.quote; + replacer = replacer.replacer; + } + + if (typeof replacer === 'function') { + replacerFunc = replacer; + } else if (Array.isArray(replacer)) { + propertyList = []; + for (const v of replacer) { + let item; + + if (typeof v === 'string') { + item = v; + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v); + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item); + } + } + } + + if (space instanceof Number) { + space = Number(space); + } else if (space instanceof String) { + space = String(space); + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)); + gap = ' '.substr(0, space); + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10); + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + let value = holder[key]; + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key); + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value); + } + + if (value instanceof Number) { + value = Number(value); + } else if (value instanceof String) { + value = String(value); + } else if (value instanceof Boolean) { + value = value.valueOf(); + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value, false) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + const quotes = { + "'": 0.1, + '"': 0.2, + }; + + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + let product = ''; + + for (let i = 0; i < value.length; i++) { + const c = value[i]; + switch (c) { + case "'": + case '"': + quotes[c]++; + product += c; + continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00'; + continue + } + } + + if (replacements[c]) { + product += replacements[c]; + continue + } + + if (c < ' ') { + let hexString = c.charCodeAt(0).toString(16); + product += '\\x' + ('00' + hexString).substring(hexString.length); + continue + } + + product += c; + } + + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b); + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + let stepback = indent; + indent = indent + gap; + + let keys = propertyList || Object.keys(value); + let partial = []; + for (const key of keys) { + const propertyString = serializeProperty(key, value); + if (propertyString !== undefined) { + let member = serializeKey(key) + ':'; + if (gap !== '') { + member += ' '; + } + member += propertyString; + partial.push(member); + } + } + + let final; + if (partial.length === 0) { + final = '{}'; + } else { + let properties; + if (gap === '') { + properties = partial.join(','); + final = '{' + properties + '}'; + } else { + let separator = ',\n' + indent; + properties = partial.join(separator); + final = '{\n' + indent + properties + ',\n' + stepback + '}'; + } + } + + stack.pop(); + indent = stepback; + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key, true) + } + + const firstChar = String.fromCodePoint(key.codePointAt(0)); + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true) + } + + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + let stepback = indent; + indent = indent + gap; + + let partial = []; + for (let i = 0; i < value.length; i++) { + const propertyString = serializeProperty(String(i), value); + partial.push((propertyString !== undefined) ? propertyString : 'null'); + } + + let final; + if (partial.length === 0) { + final = '[]'; + } else { + if (gap === '') { + let properties = partial.join(','); + final = '[' + properties + ']'; + } else { + let separator = ',\n' + indent; + let properties = partial.join(separator); + final = '[\n' + indent + properties + ',\n' + stepback + ']'; + } + } + + stack.pop(); + indent = stepback; + return final + } +}; + +const JSON5 = { + parse, + stringify, +}; + +var lib = JSON5; + +export default lib; diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/cli.js b/tools/node_modules/@babel/core/node_modules/json5/lib/cli.js new file mode 100644 index 00000000000000..de852f15e47bc2 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/lib/cli.js @@ -0,0 +1,112 @@ +#!/usr/bin/env node + +const fs = require('fs') +const path = require('path') +const minimist = require('minimist') +const pkg = require('../package.json') +const JSON5 = require('./') + +const argv = minimist(process.argv.slice(2), { + alias: { + 'convert': 'c', + 'space': 's', + 'validate': 'v', + 'out-file': 'o', + 'version': 'V', + 'help': 'h', + }, + boolean: [ + 'convert', + 'validate', + 'version', + 'help', + ], + string: [ + 'space', + 'out-file', + ], +}) + +if (argv.version) { + version() +} else if (argv.help) { + usage() +} else { + const inFilename = argv._[0] + + let readStream + if (inFilename) { + readStream = fs.createReadStream(inFilename) + } else { + readStream = process.stdin + } + + let json5 = '' + readStream.on('data', data => { + json5 += data + }) + + readStream.on('end', () => { + let space + if (argv.space === 't' || argv.space === 'tab') { + space = '\t' + } else { + space = Number(argv.space) + } + + let value + try { + value = JSON5.parse(json5) + if (!argv.validate) { + const json = JSON.stringify(value, null, space) + + let writeStream + + // --convert is for backward compatibility with v0.5.1. If + // specified with and not --out-file, then a file with + // the same name but with a .json extension will be written. + if (argv.convert && inFilename && !argv.o) { + const parsedFilename = path.parse(inFilename) + const outFilename = path.format( + Object.assign( + parsedFilename, + {base: path.basename(parsedFilename.base, parsedFilename.ext) + '.json'} + ) + ) + + writeStream = fs.createWriteStream(outFilename) + } else if (argv.o) { + writeStream = fs.createWriteStream(argv.o) + } else { + writeStream = process.stdout + } + + writeStream.write(json) + } + } catch (err) { + console.error(err.message) + process.exit(1) + } + }) +} + +function version () { + console.log(pkg.version) +} + +function usage () { + console.log( + ` + Usage: json5 [options] + + If is not provided, then STDIN is used. + + Options: + + -s, --space The number of spaces to indent or 't' for tabs + -o, --out-file [file] Output to the specified file, otherwise STDOUT + -v, --validate Validate JSON5 but do not output JSON + -V, --version Output the version number + -h, --help Output usage information` + ) +} diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/index.js b/tools/node_modules/@babel/core/node_modules/json5/lib/index.js new file mode 100644 index 00000000000000..36796388892da3 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/lib/index.js @@ -0,0 +1,9 @@ +const parse = require('./parse') +const stringify = require('./stringify') + +const JSON5 = { + parse, + stringify, +} + +module.exports = JSON5 diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/parse.js b/tools/node_modules/@babel/core/node_modules/json5/lib/parse.js new file mode 100644 index 00000000000000..c01646fc3a9981 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/lib/parse.js @@ -0,0 +1,1087 @@ +const util = require('./util') + +let source +let parseState +let stack +let pos +let line +let column +let token +let key +let root + +module.exports = function parse (text, reviver) { + source = String(text) + parseState = 'start' + stack = [] + pos = 0 + line = 1 + column = 0 + token = undefined + key = undefined + root = undefined + + do { + token = lex() + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState]() + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root +} + +function internalize (holder, name, reviver) { + const value = holder[name] + if (value != null && typeof value === 'object') { + for (const key in value) { + const replacement = internalize(value, key, reviver) + if (replacement === undefined) { + delete value[key] + } else { + value[key] = replacement + } + } + } + + return reviver.call(holder, name, value) +} + +let lexState +let buffer +let doubleQuote +let sign +let c + +function lex () { + lexState = 'default' + buffer = '' + doubleQuote = false + sign = 1 + + for (;;) { + c = peek() + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + const token = lexStates[lexState]() + if (token) { + return token + } + } +} + +function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } +} + +function read () { + const c = peek() + + if (c === '\n') { + line++ + column = 0 + } else if (c) { + column += c.length + } else { + column++ + } + + if (c) { + pos += c.length + } + + return c +} + +const lexStates = { + default () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read() + return + + case '/': + read() + lexState = 'comment' + return + + case undefined: + read() + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read() + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment () { + switch (c) { + case '*': + read() + lexState = 'multiLineComment' + return + + case '/': + read() + lexState = 'singleLineComment' + return + } + + throw invalidChar(read()) + }, + + multiLineComment () { + switch (c) { + case '*': + read() + lexState = 'multiLineCommentAsterisk' + return + + case undefined: + throw invalidChar(read()) + } + + read() + }, + + multiLineCommentAsterisk () { + switch (c) { + case '*': + read() + return + + case '/': + read() + lexState = 'default' + return + + case undefined: + throw invalidChar(read()) + } + + read() + lexState = 'multiLineComment' + }, + + singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read() + lexState = 'default' + return + + case undefined: + read() + return newToken('eof') + } + + read() + }, + + value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + case 'n': + read() + literal('ull') + return newToken('null', null) + + case 't': + read() + literal('rue') + return newToken('boolean', true) + + case 'f': + read() + literal('alse') + return newToken('boolean', false) + + case '-': + case '+': + if (read() === '-') { + sign = -1 + } + + lexState = 'sign' + return + + case '.': + buffer = read() + lexState = 'decimalPointLeading' + return + + case '0': + buffer = read() + lexState = 'zero' + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read() + lexState = 'decimalInteger' + return + + case 'I': + read() + literal('nfinity') + return newToken('numeric', Infinity) + + case 'N': + read() + literal('aN') + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read() === '"') + buffer = '' + lexState = 'string' + return + } + + throw invalidChar(read()) + }, + + identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read() + const u = unicodeEscape() + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u + lexState = 'identifierName' + }, + + identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read() + return + + case '\\': + read() + lexState = 'identifierNameEscape' + return + } + + if (util.isIdContinueChar(c)) { + buffer += read() + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read() + const u = unicodeEscape() + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u + lexState = 'identifierName' + }, + + sign () { + switch (c) { + case '.': + buffer = read() + lexState = 'decimalPointLeading' + return + + case '0': + buffer = read() + lexState = 'zero' + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read() + lexState = 'decimalInteger' + return + + case 'I': + read() + literal('nfinity') + return newToken('numeric', sign * Infinity) + + case 'N': + read() + literal('aN') + return newToken('numeric', NaN) + } + + throw invalidChar(read()) + }, + + zero () { + switch (c) { + case '.': + buffer += read() + lexState = 'decimalPoint' + return + + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + + case 'x': + case 'X': + buffer += read() + lexState = 'hexadecimal' + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger () { + switch (c) { + case '.': + buffer += read() + lexState = 'decimalPoint' + return + + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalFraction' + return + } + + throw invalidChar(read()) + }, + + decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalFraction' + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read() + lexState = 'decimalExponentSign' + return + } + + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalExponentInteger' + return + } + + throw invalidChar(read()) + }, + + decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalExponentInteger' + return + } + + throw invalidChar(read()) + }, + + decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read() + lexState = 'hexadecimalInteger' + return + } + + throw invalidChar(read()) + }, + + hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string () { + switch (c) { + case '\\': + read() + buffer += escape() + return + + case '"': + if (doubleQuote) { + read() + return newToken('string', buffer) + } + + buffer += read() + return + + case "'": + if (!doubleQuote) { + read() + return newToken('string', buffer) + } + + buffer += read() + return + + case '\n': + case '\r': + throw invalidChar(read()) + + case '\u2028': + case '\u2029': + separatorChar(c) + break + + case undefined: + throw invalidChar(read()) + } + + buffer += read() + }, + + start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value' + }, + + beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read() + lexState = 'identifierName' + return + + case '\\': + read() + lexState = 'identifierNameStartEscape' + return + + case '}': + return newToken('punctuator', read()) + + case '"': + case "'": + doubleQuote = (read() === '"') + lexState = 'string' + return + } + + if (util.isIdStartChar(c)) { + buffer += read() + lexState = 'identifierName' + return + } + + throw invalidChar(read()) + }, + + afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforePropertyValue () { + lexState = 'value' + }, + + afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read()) + } + + lexState = 'value' + }, + + afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read()) + }, +} + +function newToken (type, value) { + return { + type, + value, + line, + column, + } +} + +function literal (s) { + for (const c of s) { + const p = peek() + + if (p !== c) { + throw invalidChar(read()) + } + + read() + } +} + +function escape () { + const c = peek() + switch (c) { + case 'b': + read() + return '\b' + + case 'f': + read() + return '\f' + + case 'n': + read() + return '\n' + + case 'r': + read() + return '\r' + + case 't': + read() + return '\t' + + case 'v': + read() + return '\v' + + case '0': + read() + if (util.isDigit(peek())) { + throw invalidChar(read()) + } + + return '\0' + + case 'x': + read() + return hexEscape() + + case 'u': + read() + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read() + return '' + + case '\r': + read() + if (peek() === '\n') { + read() + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read()) + + case undefined: + throw invalidChar(read()) + } + + return read() +} + +function hexEscape () { + let buffer = '' + let c = peek() + + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + + c = peek() + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +function unicodeEscape () { + let buffer = '' + let count = 4 + + while (count-- > 0) { + const c = peek() + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + } + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +const parseStates = { + start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push() + }, + + beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value + parseState = 'afterPropertyName' + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop() + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue' + }, + + beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push() + }, + + beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop() + return + } + + push() + }, + + afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName' + return + + case '}': + pop() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue' + return + + case ']': + pop() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, +} + +function push () { + let value + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {} + break + + case '[': + value = [] + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value + } else { + const parent = stack[stack.length - 1] + if (Array.isArray(parent)) { + parent.push(value) + } else { + parent[key] = value + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value) + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue' + } else { + parseState = 'beforePropertyName' + } + } else { + const current = stack[stack.length - 1] + if (current == null) { + parseState = 'end' + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue' + } else { + parseState = 'afterPropertyValue' + } + } +} + +function pop () { + stack.pop() + + const current = stack[stack.length - 1] + if (current == null) { + parseState = 'end' + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue' + } else { + parseState = 'afterPropertyValue' + } +} + +// This code is unreachable. +// function invalidParseState () { +// return new Error(`JSON5: invalid parse state '${parseState}'`) +// } + +// This code is unreachable. +// function invalidLexState (state) { +// return new Error(`JSON5: invalid lex state '${state}'`) +// } + +function invalidChar (c) { + if (c === undefined) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) + } + + return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +} + +function invalidEOF () { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +} + +// This code is unreachable. +// function invalidToken () { +// if (token.type === 'eof') { +// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +// } + +// const c = String.fromCodePoint(token.value.codePointAt(0)) +// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +// } + +function invalidIdentifier () { + column -= 5 + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) +} + +function separatorChar (c) { + console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`) +} + +function formatChar (c) { + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + } + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + const hexString = c.charCodeAt(0).toString(16) + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c +} + +function syntaxError (message) { + const err = new SyntaxError(message) + err.lineNumber = line + err.columnNumber = column + return err +} diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/register.js b/tools/node_modules/@babel/core/node_modules/json5/lib/register.js new file mode 100644 index 00000000000000..935cdbafb323ac --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/lib/register.js @@ -0,0 +1,13 @@ +const fs = require('fs') +const JSON5 = require('./') + +// eslint-disable-next-line node/no-deprecated-api +require.extensions['.json5'] = function (module, filename) { + const content = fs.readFileSync(filename, 'utf8') + try { + module.exports = JSON5.parse(content) + } catch (err) { + err.message = filename + ': ' + err.message + throw err + } +} diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/require.js b/tools/node_modules/@babel/core/node_modules/json5/lib/require.js new file mode 100644 index 00000000000000..3aa29bee0344ef --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/lib/require.js @@ -0,0 +1,4 @@ +// This file is for backward compatibility with v0.5.1. +require('./register') + +console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.") diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/stringify.js b/tools/node_modules/@babel/core/node_modules/json5/lib/stringify.js new file mode 100644 index 00000000000000..7cb3b0e101840b --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/lib/stringify.js @@ -0,0 +1,261 @@ +const util = require('./util') + +module.exports = function stringify (value, replacer, space) { + const stack = [] + let indent = '' + let propertyList + let replacerFunc + let gap = '' + let quote + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space + quote = replacer.quote + replacer = replacer.replacer + } + + if (typeof replacer === 'function') { + replacerFunc = replacer + } else if (Array.isArray(replacer)) { + propertyList = [] + for (const v of replacer) { + let item + + if (typeof v === 'string') { + item = v + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v) + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item) + } + } + } + + if (space instanceof Number) { + space = Number(space) + } else if (space instanceof String) { + space = String(space) + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)) + gap = ' '.substr(0, space) + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10) + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + let value = holder[key] + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key) + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key) + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value) + } + + if (value instanceof Number) { + value = Number(value) + } else if (value instanceof String) { + value = String(value) + } else if (value instanceof Boolean) { + value = value.valueOf() + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value, false) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + const quotes = { + "'": 0.1, + '"': 0.2, + } + + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + } + + let product = '' + + for (let i = 0; i < value.length; i++) { + const c = value[i] + switch (c) { + case "'": + case '"': + quotes[c]++ + product += c + continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00' + continue + } + } + + if (replacements[c]) { + product += replacements[c] + continue + } + + if (c < ' ') { + let hexString = c.charCodeAt(0).toString(16) + product += '\\x' + ('00' + hexString).substring(hexString.length) + continue + } + + product += c + } + + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b) + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]) + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value) + + let stepback = indent + indent = indent + gap + + let keys = propertyList || Object.keys(value) + let partial = [] + for (const key of keys) { + const propertyString = serializeProperty(key, value) + if (propertyString !== undefined) { + let member = serializeKey(key) + ':' + if (gap !== '') { + member += ' ' + } + member += propertyString + partial.push(member) + } + } + + let final + if (partial.length === 0) { + final = '{}' + } else { + let properties + if (gap === '') { + properties = partial.join(',') + final = '{' + properties + '}' + } else { + let separator = ',\n' + indent + properties = partial.join(separator) + final = '{\n' + indent + properties + ',\n' + stepback + '}' + } + } + + stack.pop() + indent = stepback + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key, true) + } + + const firstChar = String.fromCodePoint(key.codePointAt(0)) + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true) + } + + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value) + + let stepback = indent + indent = indent + gap + + let partial = [] + for (let i = 0; i < value.length; i++) { + const propertyString = serializeProperty(String(i), value) + partial.push((propertyString !== undefined) ? propertyString : 'null') + } + + let final + if (partial.length === 0) { + final = '[]' + } else { + if (gap === '') { + let properties = partial.join(',') + final = '[' + properties + ']' + } else { + let separator = ',\n' + indent + let properties = partial.join(separator) + final = '[\n' + indent + properties + ',\n' + stepback + ']' + } + } + + stack.pop() + indent = stepback + return final + } +} diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/unicode.js b/tools/node_modules/@babel/core/node_modules/json5/lib/unicode.js new file mode 100644 index 00000000000000..215ccd843abc25 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/lib/unicode.js @@ -0,0 +1,4 @@ +// This is a generated file. Do not edit. +module.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/ +module.exports.ID_Start = /[\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\u0860-\u086A\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\u09FC\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-\u1884\u1887-\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/ +module.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\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\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/util.js b/tools/node_modules/@babel/core/node_modules/json5/lib/util.js new file mode 100644 index 00000000000000..40bfe2fa6a67b2 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/lib/util.js @@ -0,0 +1,35 @@ +const unicode = require('../lib/unicode') + +module.exports = { + isSpaceSeparator (c) { + return typeof c === 'string' && unicode.Space_Separator.test(c) + }, + + isIdStartChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar (c) { + return typeof c === 'string' && ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit (c) { + return typeof c === 'string' && /[0-9]/.test(c) + }, + + isHexDigit (c) { + return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) + }, +} diff --git a/tools/node_modules/@babel/core/node_modules/json5/package.json b/tools/node_modules/@babel/core/node_modules/json5/package.json new file mode 100644 index 00000000000000..9c5b82eae818e0 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/json5/package.json @@ -0,0 +1,71 @@ +{ + "name": "json5", + "version": "2.1.3", + "description": "JSON for humans.", + "main": "lib/index.js", + "module": "dist/index.mjs", + "bin": "lib/cli.js", + "browser": "dist/index.js", + "files": [ + "lib/", + "dist/" + ], + "engines": { + "node": ">=6" + }, + "scripts": { + "build": "rollup -c", + "build-package": "node build/package.js", + "build-unicode": "node build/unicode.js", + "coverage": "tap --coverage-report html test", + "lint": "eslint --fix .", + "prepublishOnly": "npm run production", + "preversion": "npm run production", + "production": "npm run lint && npm test && npm run build", + "test": "tap -Rspec --100 test", + "version": "npm run build-package && git add package.json5" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/json5/json5.git" + }, + "keywords": [ + "json", + "json5", + "es5", + "es2015", + "ecmascript" + ], + "author": "Aseem Kishore ", + "contributors": [ + "Max Nanasy ", + "Andrew Eisenberg ", + "Jordan Tucker " + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/json5/json5/issues" + }, + "homepage": "http://json5.org/", + "dependencies": { + "minimist": "^1.2.5" + }, + "devDependencies": { + "core-js": "^2.6.5", + "eslint": "^5.15.3", + "eslint-config-standard": "^12.0.0", + "eslint-plugin-import": "^2.16.0", + "eslint-plugin-node": "^8.0.1", + "eslint-plugin-promise": "^4.0.1", + "eslint-plugin-standard": "^4.0.0", + "regenerate": "^1.4.0", + "rollup": "^0.64.1", + "rollup-plugin-buble": "^0.19.6", + "rollup-plugin-commonjs": "^9.2.1", + "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-terser": "^1.0.1", + "sinon": "^6.3.5", + "tap": "^12.6.0", + "unicode-10.0.0": "^0.7.5" + } +} diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/LICENSE b/tools/node_modules/@babel/core/node_modules/lodash/LICENSE similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/LICENSE rename to tools/node_modules/@babel/core/node_modules/lodash/LICENSE diff --git a/tools/node_modules/@babel/core/node_modules/lodash/README.md b/tools/node_modules/@babel/core/node_modules/lodash/README.md new file mode 100644 index 00000000000000..e1c99503300407 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/lodash/README.md @@ -0,0 +1,39 @@ +# lodash v4.17.20 + +The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. + +## Installation + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the FP build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load method categories. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Cherry-pick methods for smaller browserify/rollup/webpack bundles. +var at = require('lodash/at'); +var curryN = require('lodash/fp/curryN'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/4.17.20-npm) for more details. + +**Note:**
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. + +## Support + +Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_DataView.js b/tools/node_modules/@babel/core/node_modules/lodash/_DataView.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_DataView.js rename to tools/node_modules/@babel/core/node_modules/lodash/_DataView.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Hash.js b/tools/node_modules/@babel/core/node_modules/lodash/_Hash.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_Hash.js rename to tools/node_modules/@babel/core/node_modules/lodash/_Hash.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_LazyWrapper.js b/tools/node_modules/@babel/core/node_modules/lodash/_LazyWrapper.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_LazyWrapper.js rename to tools/node_modules/@babel/core/node_modules/lodash/_LazyWrapper.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_ListCache.js b/tools/node_modules/@babel/core/node_modules/lodash/_ListCache.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_ListCache.js rename to tools/node_modules/@babel/core/node_modules/lodash/_ListCache.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_LodashWrapper.js b/tools/node_modules/@babel/core/node_modules/lodash/_LodashWrapper.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_LodashWrapper.js rename to tools/node_modules/@babel/core/node_modules/lodash/_LodashWrapper.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Map.js b/tools/node_modules/@babel/core/node_modules/lodash/_Map.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_Map.js rename to tools/node_modules/@babel/core/node_modules/lodash/_Map.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_MapCache.js b/tools/node_modules/@babel/core/node_modules/lodash/_MapCache.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_MapCache.js rename to tools/node_modules/@babel/core/node_modules/lodash/_MapCache.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Promise.js b/tools/node_modules/@babel/core/node_modules/lodash/_Promise.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_Promise.js rename to tools/node_modules/@babel/core/node_modules/lodash/_Promise.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Set.js b/tools/node_modules/@babel/core/node_modules/lodash/_Set.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_Set.js rename to tools/node_modules/@babel/core/node_modules/lodash/_Set.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_SetCache.js b/tools/node_modules/@babel/core/node_modules/lodash/_SetCache.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_SetCache.js rename to tools/node_modules/@babel/core/node_modules/lodash/_SetCache.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Stack.js b/tools/node_modules/@babel/core/node_modules/lodash/_Stack.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_Stack.js rename to tools/node_modules/@babel/core/node_modules/lodash/_Stack.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Symbol.js b/tools/node_modules/@babel/core/node_modules/lodash/_Symbol.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_Symbol.js rename to tools/node_modules/@babel/core/node_modules/lodash/_Symbol.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Uint8Array.js b/tools/node_modules/@babel/core/node_modules/lodash/_Uint8Array.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_Uint8Array.js rename to tools/node_modules/@babel/core/node_modules/lodash/_Uint8Array.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_WeakMap.js b/tools/node_modules/@babel/core/node_modules/lodash/_WeakMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_WeakMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/_WeakMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_apply.js b/tools/node_modules/@babel/core/node_modules/lodash/_apply.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_apply.js rename to tools/node_modules/@babel/core/node_modules/lodash/_apply.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayAggregator.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayAggregator.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayAggregator.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayAggregator.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayEach.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayEach.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayEach.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayEach.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayEachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayEachRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayEachRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayEachRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayEvery.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayEvery.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayEvery.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayEvery.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayFilter.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayFilter.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayFilter.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayFilter.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayIncludes.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayIncludes.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayIncludes.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayIncludes.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayIncludesWith.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayIncludesWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayIncludesWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayIncludesWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayLikeKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayLikeKeys.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayLikeKeys.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayLikeKeys.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayMap.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayPush.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayPush.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayPush.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayPush.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayReduce.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayReduce.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayReduce.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayReduce.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayReduceRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayReduceRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayReduceRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayReduceRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arraySample.js b/tools/node_modules/@babel/core/node_modules/lodash/_arraySample.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arraySample.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arraySample.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arraySampleSize.js b/tools/node_modules/@babel/core/node_modules/lodash/_arraySampleSize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arraySampleSize.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arraySampleSize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayShuffle.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayShuffle.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arrayShuffle.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arrayShuffle.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arraySome.js b/tools/node_modules/@babel/core/node_modules/lodash/_arraySome.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_arraySome.js rename to tools/node_modules/@babel/core/node_modules/lodash/_arraySome.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_asciiSize.js b/tools/node_modules/@babel/core/node_modules/lodash/_asciiSize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_asciiSize.js rename to tools/node_modules/@babel/core/node_modules/lodash/_asciiSize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_asciiToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_asciiToArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_asciiToArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/_asciiToArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_asciiWords.js b/tools/node_modules/@babel/core/node_modules/lodash/_asciiWords.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_asciiWords.js rename to tools/node_modules/@babel/core/node_modules/lodash/_asciiWords.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_assignMergeValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_assignMergeValue.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_assignMergeValue.js rename to tools/node_modules/@babel/core/node_modules/lodash/_assignMergeValue.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_assignValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_assignValue.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_assignValue.js rename to tools/node_modules/@babel/core/node_modules/lodash/_assignValue.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_assocIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/_assocIndexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_assocIndexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/_assocIndexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAggregator.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseAggregator.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseAggregator.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseAggregator.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAssign.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseAssign.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseAssign.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseAssign.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAssignIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseAssignIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseAssignIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseAssignIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAssignValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseAssignValue.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseAssignValue.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseAssignValue.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAt.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseAt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseAt.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseAt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseClamp.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseClamp.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseClamp.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseClamp.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseClone.js similarity index 98% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseClone.js index 290de9275def00..69f87054c56611 100644 --- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js +++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseClone.js @@ -18,7 +18,8 @@ var Stack = require('./_Stack'), isMap = require('./isMap'), isObject = require('./isObject'), isSet = require('./isSet'), - keys = require('./keys'); + keys = require('./keys'), + keysIn = require('./keysIn'); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseConforms.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseConforms.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseConforms.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseConforms.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseConformsTo.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseConformsTo.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseConformsTo.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseConformsTo.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseCreate.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseCreate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseCreate.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseCreate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseDelay.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseDelay.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseDelay.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseDelay.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseDifference.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseDifference.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseDifference.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseDifference.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseEach.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseEach.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseEach.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseEach.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseEachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseEachRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseEachRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseEachRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseEvery.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseEvery.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseEvery.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseEvery.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseExtremum.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseExtremum.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseExtremum.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseExtremum.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFill.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFill.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseFill.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseFill.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFilter.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFilter.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseFilter.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseFilter.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFindIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFindIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseFindIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseFindIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFindKey.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFindKey.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseFindKey.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseFindKey.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFlatten.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFlatten.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseFlatten.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseFlatten.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFor.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFor.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseFor.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseFor.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseForOwn.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseForOwn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseForOwn.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseForOwn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseForOwnRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseForOwnRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseForOwnRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseForOwnRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseForRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseForRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseForRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseForRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFunctions.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFunctions.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseFunctions.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseFunctions.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseGet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseGet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseGet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGetAllKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseGetAllKeys.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseGetAllKeys.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseGetAllKeys.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGetTag.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseGetTag.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseGetTag.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseGetTag.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGt.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseGt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseGt.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseGt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseHas.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseHas.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseHas.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseHasIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseHasIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseHasIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseHasIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseInRange.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseInRange.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseInRange.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseInRange.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIndexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIndexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIndexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIndexOfWith.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIndexOfWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIndexOfWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIndexOfWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIntersection.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIntersection.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIntersection.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIntersection.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseInverter.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseInverter.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseInverter.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseInverter.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseInvoke.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseInvoke.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseInvoke.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseInvoke.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsArguments.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsArguments.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsArguments.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsArguments.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsArrayBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsArrayBuffer.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsArrayBuffer.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsArrayBuffer.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsDate.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsDate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsDate.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsDate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsEqual.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsEqual.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsEqual.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsEqual.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsEqualDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsEqualDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsEqualDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsEqualDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsMap.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsMatch.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsMatch.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsMatch.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsMatch.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsNaN.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsNaN.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsNaN.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsNaN.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsNative.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsNative.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsNative.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsNative.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsRegExp.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsRegExp.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsRegExp.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsSet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsSet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsTypedArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsTypedArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsTypedArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIsTypedArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIteratee.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIteratee.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseIteratee.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseIteratee.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseKeys.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseKeys.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseKeys.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseKeysIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseKeysIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseKeysIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseKeysIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseLodash.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseLodash.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseLodash.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseLodash.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseLt.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseLt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseLt.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseLt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMap.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMatches.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMatches.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseMatches.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseMatches.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMatchesProperty.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMatchesProperty.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseMatchesProperty.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseMatchesProperty.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMean.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMean.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseMean.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseMean.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMerge.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMerge.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseMerge.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseMerge.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMergeDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMergeDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseMergeDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseMergeDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseNth.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseNth.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseNth.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseNth.js diff --git a/tools/node_modules/@babel/core/node_modules/lodash/_baseOrderBy.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseOrderBy.js new file mode 100644 index 00000000000000..775a01741ede20 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseOrderBy.js @@ -0,0 +1,49 @@ +var arrayMap = require('./_arrayMap'), + baseGet = require('./_baseGet'), + baseIteratee = require('./_baseIteratee'), + baseMap = require('./_baseMap'), + baseSortBy = require('./_baseSortBy'), + baseUnary = require('./_baseUnary'), + compareMultiple = require('./_compareMultiple'), + identity = require('./identity'), + isArray = require('./isArray'); + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); +} + +module.exports = baseOrderBy; diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePick.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePick.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_basePick.js rename to tools/node_modules/@babel/core/node_modules/lodash/_basePick.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePickBy.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePickBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_basePickBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/_basePickBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseProperty.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseProperty.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseProperty.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseProperty.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePropertyDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePropertyDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_basePropertyDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/_basePropertyDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePropertyOf.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePropertyOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_basePropertyOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/_basePropertyOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePullAll.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePullAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_basePullAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/_basePullAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePullAt.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePullAt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_basePullAt.js rename to tools/node_modules/@babel/core/node_modules/lodash/_basePullAt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRandom.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseRandom.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseRandom.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseRandom.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRange.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseRange.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseRange.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseRange.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseReduce.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseReduce.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseReduce.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseReduce.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRepeat.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseRepeat.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseRepeat.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseRepeat.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRest.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseRest.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseRest.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseRest.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSample.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSample.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSample.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSample.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSampleSize.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSampleSize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSampleSize.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSampleSize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSet.js similarity index 92% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSet.js index 612a24cc85791f..99f4fbf9c347a7 100644 --- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSet.js +++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSet.js @@ -29,6 +29,10 @@ function baseSet(object, path, value, customizer) { var key = toKey(path[index]), newValue = value; + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSetData.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSetData.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSetData.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSetData.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSetToString.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSetToString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSetToString.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSetToString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseShuffle.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseShuffle.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseShuffle.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseShuffle.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSlice.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSlice.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSlice.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSlice.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSome.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSome.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSome.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSome.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortBy.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSortBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSortBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndexBy.js similarity index 94% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndexBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndexBy.js index bb22e36dcdf620..c247b377ff5b1a 100644 --- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndexBy.js +++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndexBy.js @@ -22,11 +22,14 @@ var nativeFloor = Math.floor, * into `array`. */ function baseSortedIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - var low = 0, - high = array == null ? 0 : array.length, - valIsNaN = value !== value, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined; diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedUniq.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedUniq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedUniq.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSortedUniq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSum.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSum.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseSum.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseSum.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseTimes.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseTimes.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseTimes.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseTimes.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseToNumber.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseToNumber.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseToNumber.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseToNumber.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseToPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseToPairs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseToPairs.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseToPairs.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseToString.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseToString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseToString.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseToString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUnary.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseUnary.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseUnary.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseUnary.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUniq.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseUniq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseUniq.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseUniq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUnset.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseUnset.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseUnset.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseUnset.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUpdate.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseUpdate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseUpdate.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseUpdate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseValues.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseValues.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseValues.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseValues.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseWhile.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseWhile.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseWhile.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseWrapperValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseWrapperValue.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseWrapperValue.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseWrapperValue.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseXor.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseXor.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseXor.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseXor.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseZipObject.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseZipObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_baseZipObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/_baseZipObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cacheHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_cacheHas.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_cacheHas.js rename to tools/node_modules/@babel/core/node_modules/lodash/_cacheHas.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_castArrayLikeObject.js b/tools/node_modules/@babel/core/node_modules/lodash/_castArrayLikeObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_castArrayLikeObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/_castArrayLikeObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_castFunction.js b/tools/node_modules/@babel/core/node_modules/lodash/_castFunction.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_castFunction.js rename to tools/node_modules/@babel/core/node_modules/lodash/_castFunction.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_castPath.js b/tools/node_modules/@babel/core/node_modules/lodash/_castPath.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_castPath.js rename to tools/node_modules/@babel/core/node_modules/lodash/_castPath.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_castRest.js b/tools/node_modules/@babel/core/node_modules/lodash/_castRest.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_castRest.js rename to tools/node_modules/@babel/core/node_modules/lodash/_castRest.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_castSlice.js b/tools/node_modules/@babel/core/node_modules/lodash/_castSlice.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_castSlice.js rename to tools/node_modules/@babel/core/node_modules/lodash/_castSlice.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_charsEndIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/_charsEndIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_charsEndIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/_charsEndIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_charsStartIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/_charsStartIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_charsStartIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/_charsStartIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneArrayBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneArrayBuffer.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_cloneArrayBuffer.js rename to tools/node_modules/@babel/core/node_modules/lodash/_cloneArrayBuffer.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneBuffer.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_cloneBuffer.js rename to tools/node_modules/@babel/core/node_modules/lodash/_cloneBuffer.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneDataView.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneDataView.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_cloneDataView.js rename to tools/node_modules/@babel/core/node_modules/lodash/_cloneDataView.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneRegExp.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_cloneRegExp.js rename to tools/node_modules/@babel/core/node_modules/lodash/_cloneRegExp.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneSymbol.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneSymbol.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_cloneSymbol.js rename to tools/node_modules/@babel/core/node_modules/lodash/_cloneSymbol.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneTypedArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneTypedArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_cloneTypedArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/_cloneTypedArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_compareAscending.js b/tools/node_modules/@babel/core/node_modules/lodash/_compareAscending.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_compareAscending.js rename to tools/node_modules/@babel/core/node_modules/lodash/_compareAscending.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_compareMultiple.js b/tools/node_modules/@babel/core/node_modules/lodash/_compareMultiple.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_compareMultiple.js rename to tools/node_modules/@babel/core/node_modules/lodash/_compareMultiple.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_composeArgs.js b/tools/node_modules/@babel/core/node_modules/lodash/_composeArgs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_composeArgs.js rename to tools/node_modules/@babel/core/node_modules/lodash/_composeArgs.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_composeArgsRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_composeArgsRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_composeArgsRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/_composeArgsRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_copyArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_copyArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_copyArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/_copyArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_copyObject.js b/tools/node_modules/@babel/core/node_modules/lodash/_copyObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_copyObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/_copyObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_copySymbols.js b/tools/node_modules/@babel/core/node_modules/lodash/_copySymbols.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_copySymbols.js rename to tools/node_modules/@babel/core/node_modules/lodash/_copySymbols.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_copySymbolsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_copySymbolsIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_copySymbolsIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/_copySymbolsIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_coreJsData.js b/tools/node_modules/@babel/core/node_modules/lodash/_coreJsData.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_coreJsData.js rename to tools/node_modules/@babel/core/node_modules/lodash/_coreJsData.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_countHolders.js b/tools/node_modules/@babel/core/node_modules/lodash/_countHolders.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_countHolders.js rename to tools/node_modules/@babel/core/node_modules/lodash/_countHolders.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createAggregator.js b/tools/node_modules/@babel/core/node_modules/lodash/_createAggregator.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createAggregator.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createAggregator.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createAssigner.js b/tools/node_modules/@babel/core/node_modules/lodash/_createAssigner.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createAssigner.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createAssigner.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createBaseEach.js b/tools/node_modules/@babel/core/node_modules/lodash/_createBaseEach.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createBaseEach.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createBaseEach.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createBaseFor.js b/tools/node_modules/@babel/core/node_modules/lodash/_createBaseFor.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createBaseFor.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createBaseFor.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createBind.js b/tools/node_modules/@babel/core/node_modules/lodash/_createBind.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createBind.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createBind.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createCaseFirst.js b/tools/node_modules/@babel/core/node_modules/lodash/_createCaseFirst.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createCaseFirst.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createCaseFirst.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createCompounder.js b/tools/node_modules/@babel/core/node_modules/lodash/_createCompounder.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createCompounder.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createCompounder.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createCtor.js b/tools/node_modules/@babel/core/node_modules/lodash/_createCtor.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createCtor.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createCtor.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createCurry.js b/tools/node_modules/@babel/core/node_modules/lodash/_createCurry.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createCurry.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createCurry.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createFind.js b/tools/node_modules/@babel/core/node_modules/lodash/_createFind.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createFind.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createFind.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createFlow.js b/tools/node_modules/@babel/core/node_modules/lodash/_createFlow.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createFlow.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createFlow.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createHybrid.js b/tools/node_modules/@babel/core/node_modules/lodash/_createHybrid.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createHybrid.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createHybrid.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createInverter.js b/tools/node_modules/@babel/core/node_modules/lodash/_createInverter.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createInverter.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createInverter.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createMathOperation.js b/tools/node_modules/@babel/core/node_modules/lodash/_createMathOperation.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createMathOperation.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createMathOperation.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createOver.js b/tools/node_modules/@babel/core/node_modules/lodash/_createOver.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createOver.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createOver.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createPadding.js b/tools/node_modules/@babel/core/node_modules/lodash/_createPadding.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createPadding.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createPadding.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createPartial.js b/tools/node_modules/@babel/core/node_modules/lodash/_createPartial.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createPartial.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createPartial.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createRange.js b/tools/node_modules/@babel/core/node_modules/lodash/_createRange.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createRange.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createRange.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createRecurry.js b/tools/node_modules/@babel/core/node_modules/lodash/_createRecurry.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createRecurry.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createRecurry.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createRelationalOperation.js b/tools/node_modules/@babel/core/node_modules/lodash/_createRelationalOperation.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createRelationalOperation.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createRelationalOperation.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createRound.js b/tools/node_modules/@babel/core/node_modules/lodash/_createRound.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createRound.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createRound.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_createSet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createSet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createToPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/_createToPairs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createToPairs.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createToPairs.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createWrap.js b/tools/node_modules/@babel/core/node_modules/lodash/_createWrap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_createWrap.js rename to tools/node_modules/@babel/core/node_modules/lodash/_createWrap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_customDefaultsAssignIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_customDefaultsAssignIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_customDefaultsAssignIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/_customDefaultsAssignIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_customDefaultsMerge.js b/tools/node_modules/@babel/core/node_modules/lodash/_customDefaultsMerge.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_customDefaultsMerge.js rename to tools/node_modules/@babel/core/node_modules/lodash/_customDefaultsMerge.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_customOmitClone.js b/tools/node_modules/@babel/core/node_modules/lodash/_customOmitClone.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_customOmitClone.js rename to tools/node_modules/@babel/core/node_modules/lodash/_customOmitClone.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_deburrLetter.js b/tools/node_modules/@babel/core/node_modules/lodash/_deburrLetter.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_deburrLetter.js rename to tools/node_modules/@babel/core/node_modules/lodash/_deburrLetter.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_defineProperty.js b/tools/node_modules/@babel/core/node_modules/lodash/_defineProperty.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_defineProperty.js rename to tools/node_modules/@babel/core/node_modules/lodash/_defineProperty.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_equalArrays.js b/tools/node_modules/@babel/core/node_modules/lodash/_equalArrays.js similarity index 92% rename from tools/node_modules/babel-eslint/node_modules/lodash/_equalArrays.js rename to tools/node_modules/@babel/core/node_modules/lodash/_equalArrays.js index f6a3b7c9f27640..824228c78cb8ab 100644 --- a/tools/node_modules/babel-eslint/node_modules/lodash/_equalArrays.js +++ b/tools/node_modules/@babel/core/node_modules/lodash/_equalArrays.js @@ -27,10 +27,11 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; } var index = -1, result = true, diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_equalByTag.js b/tools/node_modules/@babel/core/node_modules/lodash/_equalByTag.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_equalByTag.js rename to tools/node_modules/@babel/core/node_modules/lodash/_equalByTag.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_equalObjects.js b/tools/node_modules/@babel/core/node_modules/lodash/_equalObjects.js similarity index 93% rename from tools/node_modules/babel-eslint/node_modules/lodash/_equalObjects.js rename to tools/node_modules/@babel/core/node_modules/lodash/_equalObjects.js index 17421f374c9986..cdaacd2dfd8895 100644 --- a/tools/node_modules/babel-eslint/node_modules/lodash/_equalObjects.js +++ b/tools/node_modules/@babel/core/node_modules/lodash/_equalObjects.js @@ -39,10 +39,11 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { return false; } } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; } var result = true; stack.set(object, other); diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_escapeHtmlChar.js b/tools/node_modules/@babel/core/node_modules/lodash/_escapeHtmlChar.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_escapeHtmlChar.js rename to tools/node_modules/@babel/core/node_modules/lodash/_escapeHtmlChar.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_escapeStringChar.js b/tools/node_modules/@babel/core/node_modules/lodash/_escapeStringChar.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_escapeStringChar.js rename to tools/node_modules/@babel/core/node_modules/lodash/_escapeStringChar.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_flatRest.js b/tools/node_modules/@babel/core/node_modules/lodash/_flatRest.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_flatRest.js rename to tools/node_modules/@babel/core/node_modules/lodash/_flatRest.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_freeGlobal.js b/tools/node_modules/@babel/core/node_modules/lodash/_freeGlobal.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_freeGlobal.js rename to tools/node_modules/@babel/core/node_modules/lodash/_freeGlobal.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getAllKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/_getAllKeys.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getAllKeys.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getAllKeys.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getAllKeysIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_getAllKeysIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getAllKeysIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getAllKeysIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getData.js b/tools/node_modules/@babel/core/node_modules/lodash/_getData.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getData.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getData.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getFuncName.js b/tools/node_modules/@babel/core/node_modules/lodash/_getFuncName.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getFuncName.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getFuncName.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getHolder.js b/tools/node_modules/@babel/core/node_modules/lodash/_getHolder.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getHolder.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getHolder.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getMapData.js b/tools/node_modules/@babel/core/node_modules/lodash/_getMapData.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getMapData.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getMapData.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getMatchData.js b/tools/node_modules/@babel/core/node_modules/lodash/_getMatchData.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getMatchData.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getMatchData.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getNative.js b/tools/node_modules/@babel/core/node_modules/lodash/_getNative.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getNative.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getNative.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getPrototype.js b/tools/node_modules/@babel/core/node_modules/lodash/_getPrototype.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getPrototype.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getPrototype.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getRawTag.js b/tools/node_modules/@babel/core/node_modules/lodash/_getRawTag.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getRawTag.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getRawTag.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getSymbols.js b/tools/node_modules/@babel/core/node_modules/lodash/_getSymbols.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getSymbols.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getSymbols.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getSymbolsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_getSymbolsIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getSymbolsIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getSymbolsIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getTag.js b/tools/node_modules/@babel/core/node_modules/lodash/_getTag.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getTag.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getTag.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_getValue.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getValue.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getValue.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getView.js b/tools/node_modules/@babel/core/node_modules/lodash/_getView.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getView.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getView.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getWrapDetails.js b/tools/node_modules/@babel/core/node_modules/lodash/_getWrapDetails.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_getWrapDetails.js rename to tools/node_modules/@babel/core/node_modules/lodash/_getWrapDetails.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hasPath.js b/tools/node_modules/@babel/core/node_modules/lodash/_hasPath.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_hasPath.js rename to tools/node_modules/@babel/core/node_modules/lodash/_hasPath.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicode.js b/tools/node_modules/@babel/core/node_modules/lodash/_hasUnicode.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicode.js rename to tools/node_modules/@babel/core/node_modules/lodash/_hasUnicode.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicodeWord.js b/tools/node_modules/@babel/core/node_modules/lodash/_hasUnicodeWord.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicodeWord.js rename to tools/node_modules/@babel/core/node_modules/lodash/_hasUnicodeWord.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hashClear.js b/tools/node_modules/@babel/core/node_modules/lodash/_hashClear.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_hashClear.js rename to tools/node_modules/@babel/core/node_modules/lodash/_hashClear.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hashDelete.js b/tools/node_modules/@babel/core/node_modules/lodash/_hashDelete.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_hashDelete.js rename to tools/node_modules/@babel/core/node_modules/lodash/_hashDelete.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hashGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_hashGet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_hashGet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_hashGet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hashHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_hashHas.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_hashHas.js rename to tools/node_modules/@babel/core/node_modules/lodash/_hashHas.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hashSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_hashSet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_hashSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_hashSet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_initCloneArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_initCloneArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/_initCloneArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneByTag.js b/tools/node_modules/@babel/core/node_modules/lodash/_initCloneByTag.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_initCloneByTag.js rename to tools/node_modules/@babel/core/node_modules/lodash/_initCloneByTag.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneObject.js b/tools/node_modules/@babel/core/node_modules/lodash/_initCloneObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_initCloneObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/_initCloneObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_insertWrapDetails.js b/tools/node_modules/@babel/core/node_modules/lodash/_insertWrapDetails.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_insertWrapDetails.js rename to tools/node_modules/@babel/core/node_modules/lodash/_insertWrapDetails.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isFlattenable.js b/tools/node_modules/@babel/core/node_modules/lodash/_isFlattenable.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_isFlattenable.js rename to tools/node_modules/@babel/core/node_modules/lodash/_isFlattenable.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/_isIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_isIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/_isIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isIterateeCall.js b/tools/node_modules/@babel/core/node_modules/lodash/_isIterateeCall.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_isIterateeCall.js rename to tools/node_modules/@babel/core/node_modules/lodash/_isIterateeCall.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isKey.js b/tools/node_modules/@babel/core/node_modules/lodash/_isKey.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_isKey.js rename to tools/node_modules/@babel/core/node_modules/lodash/_isKey.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isKeyable.js b/tools/node_modules/@babel/core/node_modules/lodash/_isKeyable.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_isKeyable.js rename to tools/node_modules/@babel/core/node_modules/lodash/_isKeyable.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isLaziable.js b/tools/node_modules/@babel/core/node_modules/lodash/_isLaziable.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_isLaziable.js rename to tools/node_modules/@babel/core/node_modules/lodash/_isLaziable.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isMaskable.js b/tools/node_modules/@babel/core/node_modules/lodash/_isMaskable.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_isMaskable.js rename to tools/node_modules/@babel/core/node_modules/lodash/_isMaskable.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isMasked.js b/tools/node_modules/@babel/core/node_modules/lodash/_isMasked.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_isMasked.js rename to tools/node_modules/@babel/core/node_modules/lodash/_isMasked.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isPrototype.js b/tools/node_modules/@babel/core/node_modules/lodash/_isPrototype.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_isPrototype.js rename to tools/node_modules/@babel/core/node_modules/lodash/_isPrototype.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isStrictComparable.js b/tools/node_modules/@babel/core/node_modules/lodash/_isStrictComparable.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_isStrictComparable.js rename to tools/node_modules/@babel/core/node_modules/lodash/_isStrictComparable.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_iteratorToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_iteratorToArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_iteratorToArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/_iteratorToArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_lazyClone.js b/tools/node_modules/@babel/core/node_modules/lodash/_lazyClone.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_lazyClone.js rename to tools/node_modules/@babel/core/node_modules/lodash/_lazyClone.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_lazyReverse.js b/tools/node_modules/@babel/core/node_modules/lodash/_lazyReverse.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_lazyReverse.js rename to tools/node_modules/@babel/core/node_modules/lodash/_lazyReverse.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_lazyValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_lazyValue.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_lazyValue.js rename to tools/node_modules/@babel/core/node_modules/lodash/_lazyValue.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheClear.js b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheClear.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_listCacheClear.js rename to tools/node_modules/@babel/core/node_modules/lodash/_listCacheClear.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheDelete.js b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheDelete.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_listCacheDelete.js rename to tools/node_modules/@babel/core/node_modules/lodash/_listCacheDelete.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheGet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_listCacheGet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_listCacheGet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheHas.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_listCacheHas.js rename to tools/node_modules/@babel/core/node_modules/lodash/_listCacheHas.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheSet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_listCacheSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_listCacheSet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheClear.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheClear.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheClear.js rename to tools/node_modules/@babel/core/node_modules/lodash/_mapCacheClear.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheDelete.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheDelete.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheDelete.js rename to tools/node_modules/@babel/core/node_modules/lodash/_mapCacheDelete.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheGet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheGet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_mapCacheGet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheHas.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheHas.js rename to tools/node_modules/@babel/core/node_modules/lodash/_mapCacheHas.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheSet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_mapCacheSet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapToArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_mapToArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/_mapToArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_matchesStrictComparable.js b/tools/node_modules/@babel/core/node_modules/lodash/_matchesStrictComparable.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_matchesStrictComparable.js rename to tools/node_modules/@babel/core/node_modules/lodash/_matchesStrictComparable.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_memoizeCapped.js b/tools/node_modules/@babel/core/node_modules/lodash/_memoizeCapped.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_memoizeCapped.js rename to tools/node_modules/@babel/core/node_modules/lodash/_memoizeCapped.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mergeData.js b/tools/node_modules/@babel/core/node_modules/lodash/_mergeData.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_mergeData.js rename to tools/node_modules/@babel/core/node_modules/lodash/_mergeData.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_metaMap.js b/tools/node_modules/@babel/core/node_modules/lodash/_metaMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_metaMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/_metaMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_nativeCreate.js b/tools/node_modules/@babel/core/node_modules/lodash/_nativeCreate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_nativeCreate.js rename to tools/node_modules/@babel/core/node_modules/lodash/_nativeCreate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_nativeKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/_nativeKeys.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_nativeKeys.js rename to tools/node_modules/@babel/core/node_modules/lodash/_nativeKeys.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_nativeKeysIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_nativeKeysIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_nativeKeysIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/_nativeKeysIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_nodeUtil.js b/tools/node_modules/@babel/core/node_modules/lodash/_nodeUtil.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_nodeUtil.js rename to tools/node_modules/@babel/core/node_modules/lodash/_nodeUtil.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_objectToString.js b/tools/node_modules/@babel/core/node_modules/lodash/_objectToString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_objectToString.js rename to tools/node_modules/@babel/core/node_modules/lodash/_objectToString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_overArg.js b/tools/node_modules/@babel/core/node_modules/lodash/_overArg.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_overArg.js rename to tools/node_modules/@babel/core/node_modules/lodash/_overArg.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_overRest.js b/tools/node_modules/@babel/core/node_modules/lodash/_overRest.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_overRest.js rename to tools/node_modules/@babel/core/node_modules/lodash/_overRest.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_parent.js b/tools/node_modules/@babel/core/node_modules/lodash/_parent.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_parent.js rename to tools/node_modules/@babel/core/node_modules/lodash/_parent.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_reEscape.js b/tools/node_modules/@babel/core/node_modules/lodash/_reEscape.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_reEscape.js rename to tools/node_modules/@babel/core/node_modules/lodash/_reEscape.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_reEvaluate.js b/tools/node_modules/@babel/core/node_modules/lodash/_reEvaluate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_reEvaluate.js rename to tools/node_modules/@babel/core/node_modules/lodash/_reEvaluate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_reInterpolate.js b/tools/node_modules/@babel/core/node_modules/lodash/_reInterpolate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_reInterpolate.js rename to tools/node_modules/@babel/core/node_modules/lodash/_reInterpolate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_realNames.js b/tools/node_modules/@babel/core/node_modules/lodash/_realNames.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_realNames.js rename to tools/node_modules/@babel/core/node_modules/lodash/_realNames.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_reorder.js b/tools/node_modules/@babel/core/node_modules/lodash/_reorder.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_reorder.js rename to tools/node_modules/@babel/core/node_modules/lodash/_reorder.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_replaceHolders.js b/tools/node_modules/@babel/core/node_modules/lodash/_replaceHolders.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_replaceHolders.js rename to tools/node_modules/@babel/core/node_modules/lodash/_replaceHolders.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_root.js b/tools/node_modules/@babel/core/node_modules/lodash/_root.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_root.js rename to tools/node_modules/@babel/core/node_modules/lodash/_root.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_safeGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_safeGet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_safeGet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_safeGet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setCacheAdd.js b/tools/node_modules/@babel/core/node_modules/lodash/_setCacheAdd.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_setCacheAdd.js rename to tools/node_modules/@babel/core/node_modules/lodash/_setCacheAdd.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setCacheHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_setCacheHas.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_setCacheHas.js rename to tools/node_modules/@babel/core/node_modules/lodash/_setCacheHas.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setData.js b/tools/node_modules/@babel/core/node_modules/lodash/_setData.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_setData.js rename to tools/node_modules/@babel/core/node_modules/lodash/_setData.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_setToArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_setToArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/_setToArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setToPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/_setToPairs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_setToPairs.js rename to tools/node_modules/@babel/core/node_modules/lodash/_setToPairs.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setToString.js b/tools/node_modules/@babel/core/node_modules/lodash/_setToString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_setToString.js rename to tools/node_modules/@babel/core/node_modules/lodash/_setToString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setWrapToString.js b/tools/node_modules/@babel/core/node_modules/lodash/_setWrapToString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_setWrapToString.js rename to tools/node_modules/@babel/core/node_modules/lodash/_setWrapToString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_shortOut.js b/tools/node_modules/@babel/core/node_modules/lodash/_shortOut.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_shortOut.js rename to tools/node_modules/@babel/core/node_modules/lodash/_shortOut.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_shuffleSelf.js b/tools/node_modules/@babel/core/node_modules/lodash/_shuffleSelf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_shuffleSelf.js rename to tools/node_modules/@babel/core/node_modules/lodash/_shuffleSelf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stackClear.js b/tools/node_modules/@babel/core/node_modules/lodash/_stackClear.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_stackClear.js rename to tools/node_modules/@babel/core/node_modules/lodash/_stackClear.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stackDelete.js b/tools/node_modules/@babel/core/node_modules/lodash/_stackDelete.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_stackDelete.js rename to tools/node_modules/@babel/core/node_modules/lodash/_stackDelete.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stackGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_stackGet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_stackGet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_stackGet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stackHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_stackHas.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_stackHas.js rename to tools/node_modules/@babel/core/node_modules/lodash/_stackHas.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stackSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_stackSet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_stackSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/_stackSet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_strictIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/_strictIndexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_strictIndexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/_strictIndexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_strictLastIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/_strictLastIndexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_strictLastIndexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/_strictLastIndexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stringSize.js b/tools/node_modules/@babel/core/node_modules/lodash/_stringSize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_stringSize.js rename to tools/node_modules/@babel/core/node_modules/lodash/_stringSize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stringToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_stringToArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_stringToArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/_stringToArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stringToPath.js b/tools/node_modules/@babel/core/node_modules/lodash/_stringToPath.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_stringToPath.js rename to tools/node_modules/@babel/core/node_modules/lodash/_stringToPath.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_toKey.js b/tools/node_modules/@babel/core/node_modules/lodash/_toKey.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_toKey.js rename to tools/node_modules/@babel/core/node_modules/lodash/_toKey.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_toSource.js b/tools/node_modules/@babel/core/node_modules/lodash/_toSource.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_toSource.js rename to tools/node_modules/@babel/core/node_modules/lodash/_toSource.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_unescapeHtmlChar.js b/tools/node_modules/@babel/core/node_modules/lodash/_unescapeHtmlChar.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_unescapeHtmlChar.js rename to tools/node_modules/@babel/core/node_modules/lodash/_unescapeHtmlChar.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeSize.js b/tools/node_modules/@babel/core/node_modules/lodash/_unicodeSize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_unicodeSize.js rename to tools/node_modules/@babel/core/node_modules/lodash/_unicodeSize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_unicodeToArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_unicodeToArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/_unicodeToArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeWords.js b/tools/node_modules/@babel/core/node_modules/lodash/_unicodeWords.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_unicodeWords.js rename to tools/node_modules/@babel/core/node_modules/lodash/_unicodeWords.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_updateWrapDetails.js b/tools/node_modules/@babel/core/node_modules/lodash/_updateWrapDetails.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_updateWrapDetails.js rename to tools/node_modules/@babel/core/node_modules/lodash/_updateWrapDetails.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_wrapperClone.js b/tools/node_modules/@babel/core/node_modules/lodash/_wrapperClone.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/_wrapperClone.js rename to tools/node_modules/@babel/core/node_modules/lodash/_wrapperClone.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/add.js b/tools/node_modules/@babel/core/node_modules/lodash/add.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/add.js rename to tools/node_modules/@babel/core/node_modules/lodash/add.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/after.js b/tools/node_modules/@babel/core/node_modules/lodash/after.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/after.js rename to tools/node_modules/@babel/core/node_modules/lodash/after.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/array.js b/tools/node_modules/@babel/core/node_modules/lodash/array.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/array.js rename to tools/node_modules/@babel/core/node_modules/lodash/array.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/ary.js b/tools/node_modules/@babel/core/node_modules/lodash/ary.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/ary.js rename to tools/node_modules/@babel/core/node_modules/lodash/ary.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/assign.js b/tools/node_modules/@babel/core/node_modules/lodash/assign.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/assign.js rename to tools/node_modules/@babel/core/node_modules/lodash/assign.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/assignIn.js b/tools/node_modules/@babel/core/node_modules/lodash/assignIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/assignIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/assignIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/assignInWith.js b/tools/node_modules/@babel/core/node_modules/lodash/assignInWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/assignInWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/assignInWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/assignWith.js b/tools/node_modules/@babel/core/node_modules/lodash/assignWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/assignWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/assignWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/at.js b/tools/node_modules/@babel/core/node_modules/lodash/at.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/at.js rename to tools/node_modules/@babel/core/node_modules/lodash/at.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/attempt.js b/tools/node_modules/@babel/core/node_modules/lodash/attempt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/attempt.js rename to tools/node_modules/@babel/core/node_modules/lodash/attempt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/before.js b/tools/node_modules/@babel/core/node_modules/lodash/before.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/before.js rename to tools/node_modules/@babel/core/node_modules/lodash/before.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/bind.js b/tools/node_modules/@babel/core/node_modules/lodash/bind.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/bind.js rename to tools/node_modules/@babel/core/node_modules/lodash/bind.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/bindAll.js b/tools/node_modules/@babel/core/node_modules/lodash/bindAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/bindAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/bindAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/bindKey.js b/tools/node_modules/@babel/core/node_modules/lodash/bindKey.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/bindKey.js rename to tools/node_modules/@babel/core/node_modules/lodash/bindKey.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/camelCase.js b/tools/node_modules/@babel/core/node_modules/lodash/camelCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/camelCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/camelCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/capitalize.js b/tools/node_modules/@babel/core/node_modules/lodash/capitalize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/capitalize.js rename to tools/node_modules/@babel/core/node_modules/lodash/capitalize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/castArray.js b/tools/node_modules/@babel/core/node_modules/lodash/castArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/castArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/castArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/ceil.js b/tools/node_modules/@babel/core/node_modules/lodash/ceil.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/ceil.js rename to tools/node_modules/@babel/core/node_modules/lodash/ceil.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/chain.js b/tools/node_modules/@babel/core/node_modules/lodash/chain.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/chain.js rename to tools/node_modules/@babel/core/node_modules/lodash/chain.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/chunk.js b/tools/node_modules/@babel/core/node_modules/lodash/chunk.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/chunk.js rename to tools/node_modules/@babel/core/node_modules/lodash/chunk.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/clamp.js b/tools/node_modules/@babel/core/node_modules/lodash/clamp.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/clamp.js rename to tools/node_modules/@babel/core/node_modules/lodash/clamp.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/clone.js b/tools/node_modules/@babel/core/node_modules/lodash/clone.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/clone.js rename to tools/node_modules/@babel/core/node_modules/lodash/clone.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/cloneDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/cloneDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/cloneDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/cloneDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/cloneDeepWith.js b/tools/node_modules/@babel/core/node_modules/lodash/cloneDeepWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/cloneDeepWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/cloneDeepWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/cloneWith.js b/tools/node_modules/@babel/core/node_modules/lodash/cloneWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/cloneWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/cloneWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/collection.js b/tools/node_modules/@babel/core/node_modules/lodash/collection.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/collection.js rename to tools/node_modules/@babel/core/node_modules/lodash/collection.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/commit.js b/tools/node_modules/@babel/core/node_modules/lodash/commit.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/commit.js rename to tools/node_modules/@babel/core/node_modules/lodash/commit.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/compact.js b/tools/node_modules/@babel/core/node_modules/lodash/compact.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/compact.js rename to tools/node_modules/@babel/core/node_modules/lodash/compact.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/concat.js b/tools/node_modules/@babel/core/node_modules/lodash/concat.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/concat.js rename to tools/node_modules/@babel/core/node_modules/lodash/concat.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/cond.js b/tools/node_modules/@babel/core/node_modules/lodash/cond.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/cond.js rename to tools/node_modules/@babel/core/node_modules/lodash/cond.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/conforms.js b/tools/node_modules/@babel/core/node_modules/lodash/conforms.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/conforms.js rename to tools/node_modules/@babel/core/node_modules/lodash/conforms.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/conformsTo.js b/tools/node_modules/@babel/core/node_modules/lodash/conformsTo.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/conformsTo.js rename to tools/node_modules/@babel/core/node_modules/lodash/conformsTo.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/constant.js b/tools/node_modules/@babel/core/node_modules/lodash/constant.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/constant.js rename to tools/node_modules/@babel/core/node_modules/lodash/constant.js diff --git a/tools/node_modules/@babel/core/node_modules/lodash/core.js b/tools/node_modules/@babel/core/node_modules/lodash/core.js new file mode 100644 index 00000000000000..6d70dcaf87035b --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/lodash/core.js @@ -0,0 +1,3877 @@ +/** + * @license + * Lodash (Custom Build) + * Build: `lodash core -o ./dist/lodash.core.js` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.20'; + + /** Error message constants. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + numberTag = '[object Number]', + objectTag = '[object Object]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + + /** Used to match HTML entities and HTML characters. */ + var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /*--------------------------------------------------------------------------*/ + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + array.push.apply(array, values); + return array; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return baseMap(props, function(key) { + return object[key]; + }); + } + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /*--------------------------------------------------------------------------*/ + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Built-in value references. */ + var objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeIsFinite = root.isFinite, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + return value instanceof LodashWrapper + ? value + : new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + } + + LodashWrapper.prototype = baseCreate(lodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + object[key] = value; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !false) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return baseFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + return objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + var baseIsArguments = noop; + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : baseGetTag(object), + othTag = othIsArr ? arrayTag : baseGetTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + stack || (stack = []); + var objStack = find(stack, function(entry) { + return entry[0] == object; + }); + var othStack = find(stack, function(entry) { + return entry[0] == other; + }); + if (objStack && othStack) { + return objStack[1] == other; + } + stack.push([object, other]); + stack.push([other, object]); + if (isSameTag && !objIsObj) { + var result = (objIsArr) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + stack.pop(); + return result; + } + } + if (!isSameTag) { + return false; + } + var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(func) { + if (typeof func == 'function') { + return func; + } + if (func == null) { + return identity; + } + return (typeof func == 'object' ? baseMatches : baseProperty)(func); + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var props = nativeKeys(source); + return function(object) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length]; + if (!(key in object && + baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) + )) { + return false; + } + } + return true; + }; + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, props) { + object = Object(object); + return reduce(props, function(result, key) { + if (key in object) { + result[key] = object[key]; + } + return result; + }, {}); + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source) { + return baseSlice(source, 0, source.length); + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + return reduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = false; + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = false; + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + var compared; + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!baseSome(other, function(othValue, othIndex) { + if (!indexOf(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + var compared; + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return func.apply(this, otherArgs); + }; + } + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = identity; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + return baseFilter(array, Boolean); + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else { + fromIndex = 0; + } + var index = (fromIndex || 0) - 1, + isReflexive = value === value; + + while (++index < length) { + var other = array[index]; + if ((isReflexive ? other === value : other !== other)) { + return index; + } + } + return -1; + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + start = start == null ? 0 : +start; + end = end === undefined ? length : +end; + return length ? baseSlice(array, start, end) : []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseEvery(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ + function filter(collection, predicate) { + return baseFilter(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + return baseEach(collection, baseIteratee(iteratee)); + } + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + return baseMap(collection, baseIteratee(iteratee)); + } + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + collection = isArrayLike(collection) ? collection : nativeKeys(collection); + return collection.length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseSome(collection, baseIteratee(predicate)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ + function sortBy(collection, iteratee) { + var index = 0; + iteratee = baseIteratee(iteratee); + + return baseMap(baseMap(collection, function(value, key, collection) { + return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) }; + }).sort(function(object, other) { + return compareAscending(object.criteria, other.criteria) || (object.index - other.index); + }), baseProperty('value')); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials); + }); + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + if (!isObject(value)) { + return value; + } + return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = baseIsDate; + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (isArrayLike(value) && + (isArray(value) || isString(value) || + isFunction(value.splice) || isArguments(value))) { + return !value.length; + } + return !nativeKeys(value).length; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = baseIsRegExp; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!isArrayLike(value)) { + return values(value); + } + return value.length ? copyArray(value) : []; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + var toInteger = Number; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + var toNumber = Number; + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + if (typeof value == 'string') { + return value; + } + return value == null ? '' : (value + ''); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + copyObject(source, nativeKeys(source), object); + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, nativeKeysIn(source), object); + }); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : assign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasOwnProperty.call(object, path); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = nativeKeys; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + var keysIn = nativeKeysIn; + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + var value = object == null ? undefined : object[path]; + if (value === undefined) { + value = defaultValue; + } + return isFunction(value) ? value.call(object) : value; + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /*------------------------------------------------------------------------*/ + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + var iteratee = baseIteratee; + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(assign({}, source)); + } + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && + !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + baseEach(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = result.__actions__ = copyArray(this.__actions__); + + actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseGt) + : undefined; + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseLt) + : undefined; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.assignIn = assignIn; + lodash.before = before; + lodash.bind = bind; + lodash.chain = chain; + lodash.compact = compact; + lodash.concat = concat; + lodash.create = create; + lodash.defaults = defaults; + lodash.defer = defer; + lodash.delay = delay; + lodash.filter = filter; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.iteratee = iteratee; + lodash.keys = keys; + lodash.map = map; + lodash.matches = matches; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.once = once; + lodash.pick = pick; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.tap = tap; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.values = values; + + // Add aliases. + lodash.extend = assignIn; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.clone = clone; + lodash.escape = escape; + lodash.every = every; + lodash.find = find; + lodash.forEach = forEach; + lodash.has = has; + lodash.head = head; + lodash.identity = identity; + lodash.indexOf = indexOf; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isBoolean = isBoolean; + lodash.isDate = isDate; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isNaN = isNaN; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isRegExp = isRegExp; + lodash.isString = isString; + lodash.isUndefined = isUndefined; + lodash.last = last; + lodash.max = max; + lodash.min = min; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.reduce = reduce; + lodash.result = result; + lodash.size = size; + lodash.some = some; + lodash.uniqueId = uniqueId; + + // Add aliases. + lodash.each = forEach; + lodash.first = head; + + mixin(lodash, (function() { + var source = {}; + baseForOwn(lodash, function(func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + }()), { 'chain': false }); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Add `Array` methods to `lodash.prototype`. + baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { + var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName); + + lodash.prototype[methodName] = function() { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function(value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + /*--------------------------------------------------------------------------*/ + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = lodash; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + define(function() { + return lodash; + }); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = lodash)._ = lodash; + // Export for CommonJS support. + freeExports._ = lodash; + } + else { + // Export to the global object. + root._ = lodash; + } +}.call(this)); diff --git a/tools/node_modules/@babel/core/node_modules/lodash/core.min.js b/tools/node_modules/@babel/core/node_modules/lodash/core.min.js new file mode 100644 index 00000000000000..f40952565b2e65 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/lodash/core.min.js @@ -0,0 +1,30 @@ +/** + * @license + * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Build: `lodash core -o ./dist/lodash.core.js` + */ +;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r,e){for(var u=n.length,o=r+(e?1:-1);e?o--:++o0&&e(f)?r>1?y(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function g(n,t){return n&&Vt(n,t,cr)}function _(n,t){return v(t,function(t){return Tn(n[t])})}function b(n){return W(n)}function j(n,t){return n>t}function d(n){return In(n)&&b(n)==ht}function m(n,t,r,e,u){return n===t||(null==n||null==t||!In(n)&&!In(t)?n!==n&&t!==t:O(n,t,r,e,m,u))}function O(n,t,r,e,u,o){ +var i=Zt(n),c=Zt(t),f=i?lt:b(n),a=c?lt:b(t);f=f==at?bt:f,a=a==at?bt:a;var l=f==bt,p=a==bt,s=f==a;o||(o=[]);var h=Lt(o,function(t){return t[0]==n}),v=Lt(o,function(n){return n[0]==t});if(h&&v)return h[1]==t;if(o.push([n,t]),o.push([t,n]),s&&!l){var y=i?J(n,t,r,e,u,o):M(n,t,f,r,e,u,o);return o.pop(),y}if(!(r&et)){var g=l&&Rt.call(n,"__wrapped__"),_=p&&Rt.call(t,"__wrapped__");if(g||_){var j=g?n.value():n,d=_?t.value():t,y=u(j,d,r,e,o);return o.pop(),y}}if(!s)return false;var y=U(n,t,r,e,u,o);return o.pop(), +y}function x(n){return In(n)&&b(n)==dt}function w(n){return typeof n=="function"?n:null==n?Hn:(typeof n=="object"?N:r)(n)}function A(n,t){return nu?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(u);++et||o&&i&&f&&!c&&!a||e&&i&&f||!r&&f||!u)return 1; +if(!e&&!o&&!a&&n1?r[u-1]:nt;for(o=n.length>3&&typeof o=="function"?(u--,o):nt,t=Object(t);++e-1?u[o?t[i]:i]:nt}}function G(n,t,r,e){function u(){for(var t=-1,c=arguments.length,f=-1,a=e.length,l=Array(a+c),p=this&&this!==kt&&this instanceof u?i:n;++fc))return false;var a=o.get(n),l=o.get(t);if(a&&l)return a==t&&l==n;for(var p=-1,s=true,h=r&ut?[]:nt;++p-1&&n%1==0&&n0&&(r=t.apply(this,arguments)),n<=1&&(t=nt),r}}function mn(n){if(typeof n!="function")throw new TypeError(rt);return function(){return!n.apply(this,arguments)}; +}function On(n){return dn(2,n)}function xn(n){return Bn(n)?Zt(n)?S(n):$(n,Gt(n)):n}function wn(n,t){return n===t||n!==n&&t!==t}function An(n){return null!=n&&Sn(n.length)&&!Tn(n)}function En(n){return n===true||n===false||In(n)&&b(n)==st}function Nn(n){return An(n)&&(Zt(n)||Dn(n)||Tn(n.splice)||Yt(n))?!n.length:!Gt(n).length}function kn(n,t){return m(n,t)}function Fn(n){return typeof n=="number"&&Ct(n)}function Tn(n){if(!Bn(n))return false;var t=b(n);return t==yt||t==gt||t==pt||t==jt}function Sn(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ft; +}function Bn(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function In(n){return null!=n&&typeof n=="object"}function Rn(n){return qn(n)&&n!=+n}function $n(n){return null===n}function qn(n){return typeof n=="number"||In(n)&&b(n)==_t}function Dn(n){return typeof n=="string"||!Zt(n)&&In(n)&&b(n)==mt}function Pn(n){return n===nt}function zn(n){return An(n)?n.length?S(n):[]:Un(n)}function Cn(n){return typeof n=="string"?n:null==n?"":n+""}function Gn(n,t){var r=Mt(n);return null==t?r:ur(r,t); +}function Jn(n,t){return null!=n&&Rt.call(n,t)}function Mn(n,t,r){var e=null==n?nt:n[t];return e===nt&&(e=r),Tn(e)?e.call(n):e}function Un(n){return null==n?[]:o(n,cr(n))}function Vn(n){return n=Cn(n),n&&xt.test(n)?n.replace(Ot,St):n}function Hn(n){return n}function Kn(n){return N(ur({},n))}function Ln(t,r,e){var u=cr(r),o=_(r,u);null!=e||Bn(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=_(r,cr(r)));var i=!(Bn(e)&&"chain"in e&&!e.chain),c=Tn(t);return Ut(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){ +var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=S(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}function Qn(){return kt._===this&&(kt._=Dt),this}function Wn(){}function Xn(n){var t=++$t;return Cn(n)+t}function Yn(n){return n&&n.length?h(n,Hn,j):nt}function Zn(n){return n&&n.length?h(n,Hn,A):nt}var nt,tt="4.17.20",rt="Expected a function",et=1,ut=2,ot=1,it=32,ct=1/0,ft=9007199254740991,at="[object Arguments]",lt="[object Array]",pt="[object AsyncFunction]",st="[object Boolean]",ht="[object Date]",vt="[object Error]",yt="[object Function]",gt="[object GeneratorFunction]",_t="[object Number]",bt="[object Object]",jt="[object Proxy]",dt="[object RegExp]",mt="[object String]",Ot=/[&<>"']/g,xt=RegExp(Ot.source),wt=/^(?:0|[1-9]\d*)$/,At={ +"&":"&","<":"<",">":">",'"':""","'":"'"},Et=typeof global=="object"&&global&&global.Object===Object&&global,Nt=typeof self=="object"&&self&&self.Object===Object&&self,kt=Et||Nt||Function("return this")(),Ft=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tt=Ft&&typeof module=="object"&&module&&!module.nodeType&&module,St=e(At),Bt=Array.prototype,It=Object.prototype,Rt=It.hasOwnProperty,$t=0,qt=It.toString,Dt=kt._,Pt=Object.create,zt=It.propertyIsEnumerable,Ct=kt.isFinite,Gt=i(Object.keys,Object),Jt=Math.max,Mt=function(){ +function n(){}return function(t){if(!Bn(t))return{};if(Pt)return Pt(t);n.prototype=t;var r=new n;return n.prototype=nt,r}}();f.prototype=Mt(c.prototype),f.prototype.constructor=f;var Ut=D(g),Vt=P(),Ht=Wn,Kt=Hn,Lt=C(nn),Qt=F(function(n,t,r){return G(n,ot|it,t,r)}),Wt=F(function(n,t){return p(n,1,t)}),Xt=F(function(n,t,r){return p(n,er(t)||0,r)}),Yt=Ht(function(){return arguments}())?Ht:function(n){return In(n)&&Rt.call(n,"callee")&&!zt.call(n,"callee")},Zt=Array.isArray,nr=d,tr=x,rr=Number,er=Number,ur=q(function(n,t){ +$(t,Gt(t),n)}),or=q(function(n,t){$(t,Q(t),n)}),ir=F(function(n,t){n=Object(n);var r=-1,e=t.length,u=e>2?t[2]:nt;for(u&&L(t[0],t[1],u)&&(e=1);++r objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/find.js b/tools/node_modules/@babel/core/node_modules/lodash/find.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/find.js rename to tools/node_modules/@babel/core/node_modules/lodash/find.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/findIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/findIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/findIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/findIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/findKey.js b/tools/node_modules/@babel/core/node_modules/lodash/findKey.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/findKey.js rename to tools/node_modules/@babel/core/node_modules/lodash/findKey.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/findLast.js b/tools/node_modules/@babel/core/node_modules/lodash/findLast.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/findLast.js rename to tools/node_modules/@babel/core/node_modules/lodash/findLast.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/findLastIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/findLastIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/findLastIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/findLastIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/findLastKey.js b/tools/node_modules/@babel/core/node_modules/lodash/findLastKey.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/findLastKey.js rename to tools/node_modules/@babel/core/node_modules/lodash/findLastKey.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/first.js b/tools/node_modules/@babel/core/node_modules/lodash/first.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/first.js rename to tools/node_modules/@babel/core/node_modules/lodash/first.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flatMap.js b/tools/node_modules/@babel/core/node_modules/lodash/flatMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/flatMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/flatMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flatMapDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/flatMapDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/flatMapDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/flatMapDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flatMapDepth.js b/tools/node_modules/@babel/core/node_modules/lodash/flatMapDepth.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/flatMapDepth.js rename to tools/node_modules/@babel/core/node_modules/lodash/flatMapDepth.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flatten.js b/tools/node_modules/@babel/core/node_modules/lodash/flatten.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/flatten.js rename to tools/node_modules/@babel/core/node_modules/lodash/flatten.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flattenDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/flattenDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/flattenDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/flattenDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flattenDepth.js b/tools/node_modules/@babel/core/node_modules/lodash/flattenDepth.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/flattenDepth.js rename to tools/node_modules/@babel/core/node_modules/lodash/flattenDepth.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flip.js b/tools/node_modules/@babel/core/node_modules/lodash/flip.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/flip.js rename to tools/node_modules/@babel/core/node_modules/lodash/flip.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/floor.js b/tools/node_modules/@babel/core/node_modules/lodash/floor.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/floor.js rename to tools/node_modules/@babel/core/node_modules/lodash/floor.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flow.js b/tools/node_modules/@babel/core/node_modules/lodash/flow.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/flow.js rename to tools/node_modules/@babel/core/node_modules/lodash/flow.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flowRight.js b/tools/node_modules/@babel/core/node_modules/lodash/flowRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/flowRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/flowRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forEach.js b/tools/node_modules/@babel/core/node_modules/lodash/forEach.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/forEach.js rename to tools/node_modules/@babel/core/node_modules/lodash/forEach.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forEachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/forEachRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/forEachRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/forEachRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forIn.js b/tools/node_modules/@babel/core/node_modules/lodash/forIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/forIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/forIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forInRight.js b/tools/node_modules/@babel/core/node_modules/lodash/forInRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/forInRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/forInRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forOwn.js b/tools/node_modules/@babel/core/node_modules/lodash/forOwn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/forOwn.js rename to tools/node_modules/@babel/core/node_modules/lodash/forOwn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forOwnRight.js b/tools/node_modules/@babel/core/node_modules/lodash/forOwnRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/forOwnRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/forOwnRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp.js b/tools/node_modules/@babel/core/node_modules/lodash/fp.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/F.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/F.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/F.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/F.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/T.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/T.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/T.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/T.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/__.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/__.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/__.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/__.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_baseConvert.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/_baseConvert.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/_baseConvert.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/_baseConvert.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_convertBrowser.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/_convertBrowser.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/_convertBrowser.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/_convertBrowser.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_falseOptions.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/_falseOptions.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/_falseOptions.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/_falseOptions.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_mapping.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/_mapping.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/_mapping.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/_mapping.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_util.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/_util.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/_util.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/_util.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/add.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/add.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/add.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/add.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/after.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/after.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/after.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/after.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/all.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/all.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/all.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/all.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/allPass.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/allPass.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/allPass.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/allPass.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/always.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/always.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/always.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/always.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/any.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/any.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/any.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/any.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/anyPass.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/anyPass.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/anyPass.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/anyPass.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/apply.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/apply.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/apply.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/apply.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/array.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/array.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/array.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/array.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/ary.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/ary.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/ary.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/ary.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assign.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assign.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/assign.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/assign.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/assignAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignAllWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignAllWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/assignAllWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/assignIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignInAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/assignInAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignInAllWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInAllWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/assignInAllWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignInWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/assignInWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/assignWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assoc.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assoc.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/assoc.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/assoc.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assocPath.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assocPath.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/assocPath.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/assocPath.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/at.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/at.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/at.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/at.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/attempt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/attempt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/attempt.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/attempt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/before.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/before.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/before.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/before.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/bind.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/bind.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/bind.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/bind.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/bindAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/bindAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/bindAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/bindAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/bindKey.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/bindKey.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/bindKey.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/bindKey.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/camelCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/camelCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/camelCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/camelCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/capitalize.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/capitalize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/capitalize.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/capitalize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/castArray.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/castArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/castArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/castArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/ceil.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/ceil.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/ceil.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/ceil.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/chain.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/chain.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/chain.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/chain.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/chunk.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/chunk.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/chunk.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/chunk.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/clamp.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/clamp.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/clamp.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/clamp.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/clone.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/clone.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/clone.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/clone.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/cloneDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/cloneDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneDeepWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/cloneDeepWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneDeepWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/cloneDeepWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/cloneWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/cloneWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/collection.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/collection.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/collection.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/collection.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/commit.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/commit.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/commit.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/commit.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/compact.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/compact.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/compact.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/compact.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/complement.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/complement.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/complement.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/complement.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/compose.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/compose.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/compose.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/compose.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/concat.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/concat.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/concat.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/concat.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cond.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/cond.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/cond.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/cond.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/conforms.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/conforms.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/conforms.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/conforms.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/conformsTo.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/conformsTo.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/conformsTo.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/conformsTo.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/constant.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/constant.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/constant.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/constant.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/contains.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/contains.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/contains.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/contains.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/convert.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/convert.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/convert.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/convert.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/countBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/countBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/countBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/countBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/create.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/create.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/create.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/create.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curry.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/curry.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/curry.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/curry.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curryN.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/curryN.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/curryN.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/curryN.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curryRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/curryRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/curryRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/curryRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curryRightN.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/curryRightN.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/curryRightN.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/curryRightN.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/date.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/date.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/date.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/date.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/debounce.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/debounce.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/debounce.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/debounce.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/deburr.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/deburr.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/deburr.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/deburr.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultTo.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultTo.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultTo.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/defaultTo.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaults.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaults.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/defaults.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/defaults.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsDeepAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsDeepAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsDeepAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsDeepAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defer.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defer.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/defer.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/defer.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/delay.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/delay.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/delay.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/delay.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/difference.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/difference.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/difference.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/difference.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/differenceBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/differenceBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/differenceBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/differenceBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/differenceWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/differenceWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/differenceWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/differenceWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dissoc.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dissoc.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/dissoc.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/dissoc.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dissocPath.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dissocPath.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/dissocPath.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/dissocPath.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/divide.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/divide.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/divide.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/divide.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/drop.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/drop.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/drop.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/drop.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropLast.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropLast.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/dropLast.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/dropLast.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropLastWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropLastWhile.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/dropLastWhile.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/dropLastWhile.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/dropRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/dropRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropRightWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropRightWhile.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/dropRightWhile.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/dropRightWhile.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropWhile.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/dropWhile.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/dropWhile.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/each.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/each.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/each.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/each.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/eachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/eachRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/eachRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/eachRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/endsWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/endsWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/endsWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/endsWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/entries.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/entries.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/entries.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/entries.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/entriesIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/entriesIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/entriesIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/entriesIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/eq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/eq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/eq.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/eq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/equals.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/equals.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/equals.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/equals.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/escape.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/escape.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/escape.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/escape.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/escapeRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/escapeRegExp.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/escapeRegExp.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/escapeRegExp.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/every.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/every.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/every.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/every.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extend.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/extend.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/extend.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/extend.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extendAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/extendAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/extendAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/extendAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extendAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/extendAllWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/extendAllWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/extendAllWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extendWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/extendWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/extendWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/extendWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/fill.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/fill.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/fill.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/fill.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/filter.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/filter.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/filter.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/filter.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/find.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/find.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/find.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/find.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findFrom.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/findFrom.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/findFrom.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/findIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/findIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findIndexFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findIndexFrom.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/findIndexFrom.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/findIndexFrom.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findKey.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findKey.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/findKey.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/findKey.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLast.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLast.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/findLast.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/findLast.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastFrom.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastFrom.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/findLastFrom.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/findLastIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastIndexFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastIndexFrom.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastIndexFrom.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/findLastIndexFrom.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastKey.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastKey.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastKey.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/findLastKey.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/first.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/first.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/first.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/first.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/flatMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMapDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatMapDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMapDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/flatMapDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMapDepth.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatMapDepth.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMapDepth.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/flatMapDepth.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatten.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatten.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/flatten.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/flatten.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flattenDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flattenDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/flattenDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/flattenDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flattenDepth.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flattenDepth.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/flattenDepth.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/flattenDepth.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flip.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flip.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/flip.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/flip.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/floor.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/floor.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/floor.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/floor.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flow.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flow.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/flow.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/flow.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flowRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flowRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/flowRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/flowRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forEach.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forEach.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/forEach.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/forEach.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forEachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forEachRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/forEachRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/forEachRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/forIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/forIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forInRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forInRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/forInRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/forInRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forOwn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forOwn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/forOwn.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/forOwn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forOwnRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forOwnRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/forOwnRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/forOwnRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/fromPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/fromPairs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/fromPairs.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/fromPairs.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/function.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/function.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/function.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/function.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/functions.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/functions.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/functions.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/functions.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/functionsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/functionsIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/functionsIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/functionsIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/get.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/get.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/get.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/get.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/getOr.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/getOr.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/getOr.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/getOr.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/groupBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/groupBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/groupBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/groupBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/gt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/gt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/gt.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/gt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/gte.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/gte.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/gte.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/gte.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/has.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/has.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/has.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/has.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/hasIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/hasIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/hasIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/hasIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/head.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/head.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/head.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/head.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/identical.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/identical.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/identical.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/identical.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/identity.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/identity.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/identity.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/identity.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/inRange.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/inRange.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/inRange.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/inRange.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/includes.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/includes.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/includes.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/includes.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/includesFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/includesFrom.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/includesFrom.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/includesFrom.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/indexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/indexBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/indexBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/indexBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/indexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/indexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/indexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/indexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/indexOfFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/indexOfFrom.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/indexOfFrom.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/indexOfFrom.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/init.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/init.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/init.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/init.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/initial.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/initial.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/initial.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/initial.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/intersection.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/intersection.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/intersection.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/intersection.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/intersectionBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/intersectionBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/intersectionBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/intersectionBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/intersectionWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/intersectionWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/intersectionWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/intersectionWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invert.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invert.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/invert.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/invert.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invertBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invertBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/invertBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/invertBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invertObj.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invertObj.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/invertObj.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/invertObj.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invoke.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invoke.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/invoke.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/invoke.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeArgs.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invokeArgs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeArgs.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/invokeArgs.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeArgsMap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invokeArgsMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeArgsMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/invokeArgsMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeMap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invokeMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/invokeMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArguments.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArguments.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isArguments.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isArguments.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArray.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayBuffer.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayBuffer.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayBuffer.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayLike.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayLike.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayLike.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayLike.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayLikeObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayLikeObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayLikeObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayLikeObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isBoolean.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isBoolean.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isBoolean.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isBoolean.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isBuffer.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isBuffer.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isBuffer.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isDate.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isDate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isDate.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isDate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isElement.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isElement.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isElement.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isElement.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isEmpty.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isEmpty.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isEmpty.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isEmpty.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isEqual.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isEqual.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isEqual.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isEqual.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isEqualWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isEqualWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isEqualWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isEqualWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isError.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isError.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isError.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isError.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isFinite.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isFinite.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isFinite.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isFinite.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isFunction.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isFunction.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isFunction.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isFunction.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isInteger.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isInteger.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isInteger.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isLength.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isLength.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isLength.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isLength.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isMap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isMatch.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isMatch.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isMatch.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isMatch.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isMatchWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isMatchWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isMatchWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isMatchWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNaN.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNaN.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isNaN.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isNaN.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNative.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNative.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isNative.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isNative.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNil.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNil.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isNil.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isNil.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNull.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNull.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isNull.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isNull.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNumber.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNumber.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isNumber.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isNumber.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isObjectLike.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isObjectLike.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isObjectLike.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isObjectLike.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isPlainObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isPlainObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isPlainObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isPlainObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isRegExp.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isRegExp.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isRegExp.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isSafeInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isSafeInteger.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isSafeInteger.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isSafeInteger.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isSet.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isSet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isSet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isString.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isString.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isSymbol.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isSymbol.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isSymbol.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isSymbol.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isTypedArray.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isTypedArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isTypedArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isTypedArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isUndefined.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isUndefined.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isUndefined.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isUndefined.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isWeakMap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isWeakMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isWeakMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isWeakMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isWeakSet.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isWeakSet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/isWeakSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/isWeakSet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/iteratee.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/iteratee.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/iteratee.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/iteratee.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/join.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/join.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/join.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/join.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/juxt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/juxt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/juxt.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/juxt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/kebabCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/kebabCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/kebabCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/kebabCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/keyBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/keyBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/keyBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/keyBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/keys.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/keys.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/keys.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/keys.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/keysIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/keysIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/keysIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/keysIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lang.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lang.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/lang.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/lang.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/last.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/last.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/last.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/last.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lastIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lastIndexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/lastIndexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/lastIndexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lastIndexOfFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lastIndexOfFrom.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/lastIndexOfFrom.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/lastIndexOfFrom.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lowerCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lowerCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/lowerCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/lowerCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lowerFirst.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lowerFirst.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/lowerFirst.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/lowerFirst.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/lt.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/lt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lte.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lte.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/lte.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/lte.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/map.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/map.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/map.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/map.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mapKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mapKeys.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/mapKeys.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/mapKeys.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mapValues.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mapValues.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/mapValues.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/mapValues.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/matches.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/matches.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/matches.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/matches.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/matchesProperty.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/matchesProperty.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/matchesProperty.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/matchesProperty.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/math.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/math.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/math.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/math.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/max.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/max.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/max.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/max.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/maxBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/maxBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/maxBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/maxBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mean.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mean.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/mean.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/mean.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/meanBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/meanBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/meanBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/meanBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/memoize.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/memoize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/memoize.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/memoize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/merge.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/merge.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/merge.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/merge.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mergeAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/mergeAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mergeAllWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeAllWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/mergeAllWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mergeWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/mergeWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/method.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/method.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/method.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/method.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/methodOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/methodOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/methodOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/methodOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/min.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/min.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/min.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/min.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/minBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/minBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/minBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/minBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mixin.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mixin.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/mixin.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/mixin.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/multiply.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/multiply.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/multiply.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/multiply.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/nAry.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/nAry.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/nAry.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/nAry.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/negate.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/negate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/negate.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/negate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/next.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/next.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/next.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/next.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/noop.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/noop.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/noop.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/noop.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/now.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/now.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/now.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/now.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/nth.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/nth.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/nth.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/nth.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/nthArg.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/nthArg.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/nthArg.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/nthArg.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/number.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/number.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/number.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/number.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/object.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/object.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/object.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/object.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/omit.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/omit.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/omit.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/omit.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/omitAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/omitAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/omitAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/omitAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/omitBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/omitBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/omitBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/omitBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/once.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/once.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/once.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/once.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/orderBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/orderBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/orderBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/orderBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/over.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/over.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/over.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/over.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/overArgs.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/overArgs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/overArgs.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/overArgs.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/overEvery.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/overEvery.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/overEvery.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/overEvery.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/overSome.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/overSome.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/overSome.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/overSome.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pad.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pad.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pad.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pad.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padChars.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/padChars.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/padChars.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/padChars.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padCharsEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/padCharsEnd.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/padCharsEnd.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/padCharsEnd.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padCharsStart.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/padCharsStart.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/padCharsStart.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/padCharsStart.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/padEnd.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/padEnd.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/padEnd.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padStart.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/padStart.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/padStart.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/padStart.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/parseInt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/parseInt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/parseInt.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/parseInt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/partial.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/partial.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/partial.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/partial.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/partialRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/partialRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/partialRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/partialRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/partition.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/partition.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/partition.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/partition.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/path.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/path.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/path.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/path.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pathEq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pathEq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pathEq.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pathEq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pathOr.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pathOr.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pathOr.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pathOr.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/paths.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/paths.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/paths.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/paths.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pick.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pick.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pick.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pick.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pickAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pickAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pickAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pickAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pickBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pickBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pickBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pickBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pipe.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pipe.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pipe.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pipe.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/placeholder.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/placeholder.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/placeholder.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/placeholder.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/plant.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/plant.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/plant.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/plant.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pluck.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pluck.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pluck.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pluck.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/prop.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/prop.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/prop.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/prop.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/propEq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/propEq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/propEq.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/propEq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/propOr.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/propOr.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/propOr.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/propOr.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/property.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/property.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/property.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/property.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/propertyOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/propertyOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/propertyOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/propertyOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/props.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/props.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/props.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/props.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pull.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pull.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pull.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pull.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pullAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAllBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAllBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAllBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pullAllBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAllWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAllWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pullAllWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAt.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/pullAt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/random.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/random.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/random.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/random.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/range.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/range.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/range.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/range.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/rangeRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/rangeRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeStep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/rangeStep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeStep.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/rangeStep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeStepRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/rangeStepRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeStepRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/rangeStepRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rearg.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/rearg.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/rearg.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/rearg.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reduce.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/reduce.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/reduce.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/reduce.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reduceRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/reduceRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/reduceRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/reduceRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/reject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/reject.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/reject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/remove.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/remove.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/remove.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/remove.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/repeat.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/repeat.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/repeat.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/repeat.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/replace.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/replace.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/replace.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/replace.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rest.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/rest.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/rest.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/rest.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/restFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/restFrom.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/restFrom.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/restFrom.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/result.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/result.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/result.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/result.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reverse.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/reverse.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/reverse.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/reverse.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/round.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/round.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/round.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/round.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sample.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sample.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sample.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sample.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sampleSize.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sampleSize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sampleSize.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sampleSize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/seq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/seq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/seq.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/seq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/set.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/set.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/set.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/set.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/setWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/setWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/setWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/setWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/shuffle.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/shuffle.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/shuffle.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/shuffle.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/size.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/size.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/size.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/size.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/slice.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/slice.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/slice.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/slice.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/snakeCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/snakeCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/snakeCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/snakeCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/some.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/some.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/some.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/some.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sortBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndexBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndexBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndexBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndexBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndexBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndexBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedUniq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedUniq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedUniq.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sortedUniq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedUniqBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedUniqBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedUniqBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sortedUniqBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/split.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/split.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/split.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/split.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/spread.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/spread.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/spread.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/spread.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/spreadFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/spreadFrom.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/spreadFrom.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/spreadFrom.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/startCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/startCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/startCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/startCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/startsWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/startsWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/startsWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/startsWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/string.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/string.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/string.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/string.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubArray.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/stubArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/stubArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubFalse.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubFalse.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/stubFalse.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/stubFalse.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/stubObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/stubObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubString.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/stubString.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/stubString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubTrue.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubTrue.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/stubTrue.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/stubTrue.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/subtract.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/subtract.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/subtract.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/subtract.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sum.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sum.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sum.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sum.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sumBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sumBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/sumBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/sumBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifference.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifference.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifference.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifference.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifferenceBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifferenceBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifferenceBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifferenceBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifferenceWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifferenceWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifferenceWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifferenceWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/tail.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/tail.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/tail.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/tail.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/take.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/take.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/take.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/take.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeLast.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeLast.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/takeLast.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/takeLast.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeLastWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeLastWhile.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/takeLastWhile.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/takeLastWhile.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/takeRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/takeRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeRightWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeRightWhile.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/takeRightWhile.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/takeRightWhile.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeWhile.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/takeWhile.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/takeWhile.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/tap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/tap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/tap.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/tap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/template.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/template.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/template.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/template.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/templateSettings.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/templateSettings.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/templateSettings.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/templateSettings.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/throttle.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/throttle.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/throttle.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/throttle.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/thru.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/thru.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/thru.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/thru.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/times.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/times.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/times.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/times.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toArray.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toFinite.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toFinite.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toFinite.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toFinite.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toInteger.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toInteger.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toInteger.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toIterator.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toIterator.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toIterator.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toIterator.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toJSON.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toJSON.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toJSON.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toJSON.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toLength.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toLength.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toLength.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toLength.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toLower.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toLower.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toLower.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toLower.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toNumber.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toNumber.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toNumber.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toNumber.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPairs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toPairs.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toPairs.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPairsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPairsIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toPairsIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toPairsIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPath.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPath.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toPath.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toPath.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPlainObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPlainObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toPlainObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toPlainObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toSafeInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toSafeInteger.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toSafeInteger.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toSafeInteger.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toString.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toString.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toUpper.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toUpper.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/toUpper.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/toUpper.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/transform.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/transform.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/transform.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/transform.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trim.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trim.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/trim.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/trim.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimChars.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimChars.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/trimChars.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/trimChars.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimCharsEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimCharsEnd.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/trimCharsEnd.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/trimCharsEnd.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimCharsStart.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimCharsStart.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/trimCharsStart.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/trimCharsStart.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimEnd.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/trimEnd.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/trimEnd.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimStart.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimStart.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/trimStart.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/trimStart.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/truncate.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/truncate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/truncate.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/truncate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unapply.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unapply.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/unapply.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/unapply.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unary.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unary.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/unary.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/unary.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unescape.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unescape.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/unescape.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/unescape.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/union.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/union.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/union.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/union.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unionBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unionBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/unionBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/unionBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unionWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unionWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/unionWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/unionWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/uniq.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/uniq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniqBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/uniqBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniqWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/uniqWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqueId.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniqueId.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqueId.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/uniqueId.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unnest.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unnest.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/unnest.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/unnest.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unset.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unset.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/unset.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/unset.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unzip.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unzip.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/unzip.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/unzip.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unzipWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unzipWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/unzipWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/unzipWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/update.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/update.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/update.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/update.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/updateWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/updateWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/updateWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/updateWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/upperCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/upperCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/upperCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/upperCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/upperFirst.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/upperFirst.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/upperFirst.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/upperFirst.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/useWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/useWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/useWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/useWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/util.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/util.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/util.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/util.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/value.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/value.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/value.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/value.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/valueOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/valueOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/valueOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/valueOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/values.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/values.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/values.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/values.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/valuesIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/valuesIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/valuesIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/valuesIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/where.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/where.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/where.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/where.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/whereEq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/whereEq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/whereEq.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/whereEq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/without.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/without.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/without.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/without.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/words.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/words.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/words.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/words.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrap.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/wrap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperAt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperAt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperAt.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperAt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperChain.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperChain.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperChain.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperChain.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperLodash.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperLodash.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperLodash.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperLodash.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperReverse.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperReverse.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperReverse.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperReverse.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperValue.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperValue.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperValue.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperValue.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/xor.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/xor.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/xor.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/xor.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/xorBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/xorBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/xorBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/xorBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/xorWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/xorWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/xorWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/xorWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zip.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zip.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/zip.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/zip.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/zipAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/zipAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObj.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipObj.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObj.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/zipObj.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/zipObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObjectDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipObjectDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObjectDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/zipObjectDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fp/zipWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/fp/zipWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fromPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/fromPairs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/fromPairs.js rename to tools/node_modules/@babel/core/node_modules/lodash/fromPairs.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/function.js b/tools/node_modules/@babel/core/node_modules/lodash/function.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/function.js rename to tools/node_modules/@babel/core/node_modules/lodash/function.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/functions.js b/tools/node_modules/@babel/core/node_modules/lodash/functions.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/functions.js rename to tools/node_modules/@babel/core/node_modules/lodash/functions.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/functionsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/functionsIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/functionsIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/functionsIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/get.js b/tools/node_modules/@babel/core/node_modules/lodash/get.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/get.js rename to tools/node_modules/@babel/core/node_modules/lodash/get.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/groupBy.js b/tools/node_modules/@babel/core/node_modules/lodash/groupBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/groupBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/groupBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/gt.js b/tools/node_modules/@babel/core/node_modules/lodash/gt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/gt.js rename to tools/node_modules/@babel/core/node_modules/lodash/gt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/gte.js b/tools/node_modules/@babel/core/node_modules/lodash/gte.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/gte.js rename to tools/node_modules/@babel/core/node_modules/lodash/gte.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/has.js b/tools/node_modules/@babel/core/node_modules/lodash/has.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/has.js rename to tools/node_modules/@babel/core/node_modules/lodash/has.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/hasIn.js b/tools/node_modules/@babel/core/node_modules/lodash/hasIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/hasIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/hasIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/head.js b/tools/node_modules/@babel/core/node_modules/lodash/head.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/head.js rename to tools/node_modules/@babel/core/node_modules/lodash/head.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/identity.js b/tools/node_modules/@babel/core/node_modules/lodash/identity.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/identity.js rename to tools/node_modules/@babel/core/node_modules/lodash/identity.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/inRange.js b/tools/node_modules/@babel/core/node_modules/lodash/inRange.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/inRange.js rename to tools/node_modules/@babel/core/node_modules/lodash/inRange.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/includes.js b/tools/node_modules/@babel/core/node_modules/lodash/includes.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/includes.js rename to tools/node_modules/@babel/core/node_modules/lodash/includes.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/index.js b/tools/node_modules/@babel/core/node_modules/lodash/index.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/index.js rename to tools/node_modules/@babel/core/node_modules/lodash/index.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/indexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/indexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/indexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/indexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/initial.js b/tools/node_modules/@babel/core/node_modules/lodash/initial.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/initial.js rename to tools/node_modules/@babel/core/node_modules/lodash/initial.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/intersection.js b/tools/node_modules/@babel/core/node_modules/lodash/intersection.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/intersection.js rename to tools/node_modules/@babel/core/node_modules/lodash/intersection.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/intersectionBy.js b/tools/node_modules/@babel/core/node_modules/lodash/intersectionBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/intersectionBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/intersectionBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/intersectionWith.js b/tools/node_modules/@babel/core/node_modules/lodash/intersectionWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/intersectionWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/intersectionWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/invert.js b/tools/node_modules/@babel/core/node_modules/lodash/invert.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/invert.js rename to tools/node_modules/@babel/core/node_modules/lodash/invert.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/invertBy.js b/tools/node_modules/@babel/core/node_modules/lodash/invertBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/invertBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/invertBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/invoke.js b/tools/node_modules/@babel/core/node_modules/lodash/invoke.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/invoke.js rename to tools/node_modules/@babel/core/node_modules/lodash/invoke.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/invokeMap.js b/tools/node_modules/@babel/core/node_modules/lodash/invokeMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/invokeMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/invokeMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isArguments.js b/tools/node_modules/@babel/core/node_modules/lodash/isArguments.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isArguments.js rename to tools/node_modules/@babel/core/node_modules/lodash/isArguments.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isArray.js b/tools/node_modules/@babel/core/node_modules/lodash/isArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/isArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isArrayBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/isArrayBuffer.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isArrayBuffer.js rename to tools/node_modules/@babel/core/node_modules/lodash/isArrayBuffer.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isArrayLike.js b/tools/node_modules/@babel/core/node_modules/lodash/isArrayLike.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isArrayLike.js rename to tools/node_modules/@babel/core/node_modules/lodash/isArrayLike.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isArrayLikeObject.js b/tools/node_modules/@babel/core/node_modules/lodash/isArrayLikeObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isArrayLikeObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/isArrayLikeObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isBoolean.js b/tools/node_modules/@babel/core/node_modules/lodash/isBoolean.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isBoolean.js rename to tools/node_modules/@babel/core/node_modules/lodash/isBoolean.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/isBuffer.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isBuffer.js rename to tools/node_modules/@babel/core/node_modules/lodash/isBuffer.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isDate.js b/tools/node_modules/@babel/core/node_modules/lodash/isDate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isDate.js rename to tools/node_modules/@babel/core/node_modules/lodash/isDate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isElement.js b/tools/node_modules/@babel/core/node_modules/lodash/isElement.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isElement.js rename to tools/node_modules/@babel/core/node_modules/lodash/isElement.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isEmpty.js b/tools/node_modules/@babel/core/node_modules/lodash/isEmpty.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isEmpty.js rename to tools/node_modules/@babel/core/node_modules/lodash/isEmpty.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isEqual.js b/tools/node_modules/@babel/core/node_modules/lodash/isEqual.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isEqual.js rename to tools/node_modules/@babel/core/node_modules/lodash/isEqual.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isEqualWith.js b/tools/node_modules/@babel/core/node_modules/lodash/isEqualWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isEqualWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/isEqualWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isError.js b/tools/node_modules/@babel/core/node_modules/lodash/isError.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isError.js rename to tools/node_modules/@babel/core/node_modules/lodash/isError.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isFinite.js b/tools/node_modules/@babel/core/node_modules/lodash/isFinite.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isFinite.js rename to tools/node_modules/@babel/core/node_modules/lodash/isFinite.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isFunction.js b/tools/node_modules/@babel/core/node_modules/lodash/isFunction.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isFunction.js rename to tools/node_modules/@babel/core/node_modules/lodash/isFunction.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/isInteger.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isInteger.js rename to tools/node_modules/@babel/core/node_modules/lodash/isInteger.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isLength.js b/tools/node_modules/@babel/core/node_modules/lodash/isLength.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isLength.js rename to tools/node_modules/@babel/core/node_modules/lodash/isLength.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isMap.js b/tools/node_modules/@babel/core/node_modules/lodash/isMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/isMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isMatch.js b/tools/node_modules/@babel/core/node_modules/lodash/isMatch.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isMatch.js rename to tools/node_modules/@babel/core/node_modules/lodash/isMatch.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isMatchWith.js b/tools/node_modules/@babel/core/node_modules/lodash/isMatchWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isMatchWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/isMatchWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isNaN.js b/tools/node_modules/@babel/core/node_modules/lodash/isNaN.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isNaN.js rename to tools/node_modules/@babel/core/node_modules/lodash/isNaN.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isNative.js b/tools/node_modules/@babel/core/node_modules/lodash/isNative.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isNative.js rename to tools/node_modules/@babel/core/node_modules/lodash/isNative.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isNil.js b/tools/node_modules/@babel/core/node_modules/lodash/isNil.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isNil.js rename to tools/node_modules/@babel/core/node_modules/lodash/isNil.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isNull.js b/tools/node_modules/@babel/core/node_modules/lodash/isNull.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isNull.js rename to tools/node_modules/@babel/core/node_modules/lodash/isNull.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isNumber.js b/tools/node_modules/@babel/core/node_modules/lodash/isNumber.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isNumber.js rename to tools/node_modules/@babel/core/node_modules/lodash/isNumber.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isObject.js b/tools/node_modules/@babel/core/node_modules/lodash/isObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/isObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isObjectLike.js b/tools/node_modules/@babel/core/node_modules/lodash/isObjectLike.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isObjectLike.js rename to tools/node_modules/@babel/core/node_modules/lodash/isObjectLike.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isPlainObject.js b/tools/node_modules/@babel/core/node_modules/lodash/isPlainObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isPlainObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/isPlainObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/isRegExp.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isRegExp.js rename to tools/node_modules/@babel/core/node_modules/lodash/isRegExp.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isSafeInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/isSafeInteger.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isSafeInteger.js rename to tools/node_modules/@babel/core/node_modules/lodash/isSafeInteger.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isSet.js b/tools/node_modules/@babel/core/node_modules/lodash/isSet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/isSet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isString.js b/tools/node_modules/@babel/core/node_modules/lodash/isString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isString.js rename to tools/node_modules/@babel/core/node_modules/lodash/isString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isSymbol.js b/tools/node_modules/@babel/core/node_modules/lodash/isSymbol.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isSymbol.js rename to tools/node_modules/@babel/core/node_modules/lodash/isSymbol.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isTypedArray.js b/tools/node_modules/@babel/core/node_modules/lodash/isTypedArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isTypedArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/isTypedArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isUndefined.js b/tools/node_modules/@babel/core/node_modules/lodash/isUndefined.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isUndefined.js rename to tools/node_modules/@babel/core/node_modules/lodash/isUndefined.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isWeakMap.js b/tools/node_modules/@babel/core/node_modules/lodash/isWeakMap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isWeakMap.js rename to tools/node_modules/@babel/core/node_modules/lodash/isWeakMap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isWeakSet.js b/tools/node_modules/@babel/core/node_modules/lodash/isWeakSet.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/isWeakSet.js rename to tools/node_modules/@babel/core/node_modules/lodash/isWeakSet.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/iteratee.js b/tools/node_modules/@babel/core/node_modules/lodash/iteratee.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/iteratee.js rename to tools/node_modules/@babel/core/node_modules/lodash/iteratee.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/join.js b/tools/node_modules/@babel/core/node_modules/lodash/join.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/join.js rename to tools/node_modules/@babel/core/node_modules/lodash/join.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/kebabCase.js b/tools/node_modules/@babel/core/node_modules/lodash/kebabCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/kebabCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/kebabCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/keyBy.js b/tools/node_modules/@babel/core/node_modules/lodash/keyBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/keyBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/keyBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/keys.js b/tools/node_modules/@babel/core/node_modules/lodash/keys.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/keys.js rename to tools/node_modules/@babel/core/node_modules/lodash/keys.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/keysIn.js b/tools/node_modules/@babel/core/node_modules/lodash/keysIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/keysIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/keysIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lang.js b/tools/node_modules/@babel/core/node_modules/lodash/lang.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/lang.js rename to tools/node_modules/@babel/core/node_modules/lodash/lang.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/last.js b/tools/node_modules/@babel/core/node_modules/lodash/last.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/last.js rename to tools/node_modules/@babel/core/node_modules/lodash/last.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lastIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/lastIndexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/lastIndexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/lastIndexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lodash.js b/tools/node_modules/@babel/core/node_modules/lodash/lodash.js similarity index 99% rename from tools/node_modules/babel-eslint/node_modules/lodash/lodash.js rename to tools/node_modules/@babel/core/node_modules/lodash/lodash.js index 9b95dfefe87f73..1fd7116f426a28 100644 --- a/tools/node_modules/babel-eslint/node_modules/lodash/lodash.js +++ b/tools/node_modules/@babel/core/node_modules/lodash/lodash.js @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.15'; + var VERSION = '4.17.20'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -3719,8 +3719,21 @@ * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { @@ -3977,6 +3990,10 @@ var key = toKey(path[index]), newValue = value; + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; @@ -4129,11 +4146,14 @@ * into `array`. */ function baseSortedIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - var low = 0, - high = array == null ? 0 : array.length, - valIsNaN = value !== value, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined; @@ -5618,10 +5638,11 @@ if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; } var index = -1, result = true, @@ -5783,10 +5804,11 @@ return false; } } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; } var result = true; stack.set(object, other); @@ -9167,6 +9189,10 @@ * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; @@ -9916,15 +9942,15 @@ * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, + * { 'user': 'fred', 'age': 30 }, * { 'user': 'barney', 'age': 34 } * ]; * * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] * * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] */ var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { @@ -14799,11 +14825,11 @@ // Use a sourceURL for easier debugging. // The sourceURL gets injected into the source that's eval-ed, so be careful - // with lookup (in case of e.g. prototype pollution), and strip newlines if any. - // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in + // and escape the comment, thus injecting code that gets evaled. var sourceURL = '//# sourceURL=' + (hasOwnProperty.call(options, 'sourceURL') - ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') + ? (options.sourceURL + '').replace(/\s/g, ' ') : ('lodash.templateSources[' + (++templateCounter) + ']') ) + '\n'; @@ -14836,8 +14862,6 @@ // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. - // Like with sourceURL, we take care to not check the option's prototype, - // as this configuration is a code injection vector. var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; @@ -15544,6 +15568,9 @@ * values against any array or object value, respectively. See `_.isEqual` * for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.0.0 @@ -15559,6 +15586,10 @@ * * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); @@ -15573,6 +15604,9 @@ * `srcValue` values against any array or object value, respectively. See * `_.isEqual` for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.2.0 @@ -15589,6 +15623,10 @@ * * _.find(objects, _.matchesProperty('a', 4)); * // => { 'a': 4, 'b': 5, 'c': 6 } + * + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); @@ -15812,6 +15850,10 @@ * Creates a function that checks if **all** of the `predicates` return * truthy when invoked with the arguments it receives. * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * * @static * @memberOf _ * @since 4.0.0 @@ -15838,6 +15880,10 @@ * Creates a function that checks if **any** of the `predicates` return * truthy when invoked with the arguments it receives. * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * * @static * @memberOf _ * @since 4.0.0 @@ -15857,6 +15903,9 @@ * * func(NaN); * // => false + * + * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) + * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) */ var overSome = createOver(arraySome); diff --git a/tools/node_modules/@babel/core/node_modules/lodash/lodash.min.js b/tools/node_modules/@babel/core/node_modules/lodash/lodash.min.js new file mode 100644 index 00000000000000..a078dd9317619a --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/lodash/lodash.min.js @@ -0,0 +1,139 @@ +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e-1;);return r}function W(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function C(n){return"\\"+Gr[n]}function U(n,t){ +return null==n?Y:n[t]}function B(n){return Dr.test(n)}function T(n){return Mr.test(n)}function $(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function M(n,t){return function(r){return n(t(r))}}function F(n,t){for(var r=-1,e=n.length,u=0,i=[];++r>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={}; +Pr[ot]=Pr[ft]=Pr[ct]=Pr[at]=Pr[lt]=Pr[st]=Pr[ht]=Pr[pt]=Pr[_t]=!0,Pr[Bn]=Pr[Tn]=Pr[ut]=Pr[Dn]=Pr[it]=Pr[Mn]=Pr[Nn]=Pr[Pn]=Pr[Zn]=Pr[Kn]=Pr[Gn]=Pr[Yn]=Pr[Qn]=Pr[Xn]=Pr[rt]=!1;var qr={};qr[Bn]=qr[Tn]=qr[ut]=qr[it]=qr[Dn]=qr[Mn]=qr[ot]=qr[ft]=qr[ct]=qr[at]=qr[lt]=qr[Zn]=qr[Kn]=qr[Gn]=qr[Yn]=qr[Qn]=qr[Xn]=qr[nt]=qr[st]=qr[ht]=qr[pt]=qr[_t]=!0,qr[Nn]=qr[Pn]=qr[rt]=!1;var Zr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a", +"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae", +"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g", +"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O", +"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w", +"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Kr={"&":"&","<":"<",">":">",'"':""","'":"'"},Vr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Gr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hr=parseFloat,Jr=parseInt,Yr="object"==typeof global&&global&&global.Object===Object&&global,Qr="object"==typeof self&&self&&self.Object===Object&&self,Xr=Yr||Qr||Function("return this")(),ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,te=ne&&"object"==typeof module&&module&&!module.nodeType&&module,re=te&&te.exports===ne,ee=re&&Yr.process,ue=function(){ +try{var n=te&&te.require&&te.require("util").types;return n?n:ee&&ee.binding&&ee.binding("util")}catch(n){}}(),ie=ue&&ue.isArrayBuffer,oe=ue&&ue.isDate,fe=ue&&ue.isMap,ce=ue&&ue.isRegExp,ae=ue&&ue.isSet,le=ue&&ue.isTypedArray,se=m("length"),he=x(Zr),pe=x(Kr),_e=x(Vr),ve=function p(x){function q(n){if(oc(n)&&!yh(n)&&!(n instanceof Bt)){if(n instanceof H)return n;if(yl.call(n,"__wrapped__"))return to(n)}return new H(n)}function G(){}function H(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t, +this.__index__=0,this.__values__=Y}function Bt(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wn,this.__views__=[]}function Gt(){var n=new Bt(this.__wrapped__);return n.__actions__=Uu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Uu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Uu(this.__views__),n}function Ht(){if(this.__filtered__){var n=new Bt(this);n.__dir__=-1, +n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Jt(){var n=this.__wrapped__.value(),t=this.__dir__,r=yh(n),e=t<0,u=r?n.length:0,i=Ai(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Vl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return du(n,this.__actions__);var _=[];n:for(;c--&&h-1}function cr(n,t){var r=this.__data__,e=Er(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function ar(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function Dr(n,t,e,u,i,o){var f,c=t&on,a=t&fn,l=t&cn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==Y)return f;if(!ic(n))return n;var s=yh(n);if(s){if(f=Ii(n),!c)return Uu(n,f)}else{var h=Is(n),p=h==Pn||h==qn;if(bh(n))return ku(n,c);if(h==Gn||h==Bn||p&&!i){if(f=a||p?{}:Ri(n),!c)return a?$u(n,Lr(f,n)):Tu(n,Wr(f,n))}else{if(!qr[h])return i?n:{};f=zi(n,h,c)}}o||(o=new dr);var _=o.get(n);if(_)return _;o.set(n,f),jh(n)?n.forEach(function(r){f.add(Dr(r,t,e,r,n,o))}):mh(n)&&n.forEach(function(r,u){ +f.set(u,Dr(r,t,e,u,n,o))});var v=l?a?gi:vi:a?Nc:Fc,g=s?Y:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),zr(f,u,Dr(r,t,e,u,n,o))}),f}function Mr(n){var t=Fc(n);return function(r){return Zr(r,n,t)}}function Zr(n,t,r){var e=r.length;if(null==n)return!e;for(n=cl(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===Y&&!(u in n)||!i(o))return!1}return!0}function Kr(n,t,r){if("function"!=typeof n)throw new sl(tn);return Es(function(){n.apply(Y,r)},t)}function Vr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length; +if(!l)return s;r&&(t=c(t,R(r))),e?(i=f,a=!1):t.length>=X&&(i=E,a=!1,t=new vr(t));n:for(;++uu?0:u+r), +e=e===Y||e>u?u:jc(e),e<0&&(e+=u),e=r>e?0:Ac(e);r0&&r(f)?t>1?te(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ee(n,t){return n&&ys(n,t,Fc)}function ue(n,t){return n&&ds(n,t,Fc)}function se(n,t){return i(t,function(t){return rc(n[t])})}function ve(n,t){t=ju(t,n);for(var r=0,e=t.length;null!=n&&rt}function we(n,t){return null!=n&&yl.call(n,t)}function me(n,t){return null!=n&&t in cl(n)}function xe(n,t,r){return n>=Vl(t,r)&&n=120&&p.length>=120)?new vr(a&&p):Y}p=n[0]; +var _=-1,v=l[0];n:for(;++_-1;)f!==n&&Sl.call(f,a,1),Sl.call(n,a,1);return n}function Qe(n,t){for(var r=n?t.length:0,e=r-1;r--;){ +var u=t[r];if(r==e||u!==i){var i=u;Wi(u)?Sl.call(n,u,1):vu(n,u)}}return n}function Xe(n,t){return n+Ml(Jl()*(t-n+1))}function nu(n,t,r,e){for(var u=-1,i=Kl(Dl((t-n)/(r||1)),0),o=el(i);i--;)o[e?i:++u]=n,n+=r;return o}function tu(n,t){var r="";if(!n||t<1||t>zn)return r;do t%2&&(r+=n),t=Ml(t/2),t&&(n+=n);while(t);return r}function ru(n,t){return Ss(Zi(n,t,Sa),n+"")}function eu(n){return kr(na(n))}function uu(n,t){var r=na(n);return Yi(r,$r(t,0,r.length))}function iu(n,t,r,e){if(!ic(n))return n;t=ju(t,n); +for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++uu?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=el(u);++e>>1,o=n[i];null!==o&&!yc(o)&&(r?o<=t:o=X){var s=t?null:js(n);if(s)return N(s);c=!1,u=E,l=new vr}else l=t?[]:a;n:for(;++e=e?n:fu(n,t,r)}function ku(n,t){if(t)return n.slice();var r=n.length,e=Il?Il(r):new n.constructor(r); +return n.copy(e),e}function Ou(n){var t=new n.constructor(n.byteLength);return new Ol(t).set(new Ol(n)),t}function Iu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Ru(n){var t=new n.constructor(n.source,Dt.exec(n));return t.lastIndex=n.lastIndex,t}function zu(n){return hs?cl(hs.call(n)):{}}function Eu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.length)}function Su(n,t){if(n!==t){var r=n!==Y,e=null===n,u=n===n,i=yc(n),o=t!==Y,f=null===t,c=t===t,a=yc(t); +if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Lu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Kl(i-o,0),l=el(c+a),s=!e;++f1?r[u-1]:Y,o=u>2?r[2]:Y;for(i=n.length>3&&"function"==typeof i?(u--,i):Y,o&&Li(r[0],r[1],o)&&(i=u<3?Y:i,u=1),t=cl(t);++e-1?u[i?t[o]:o]:Y}}function Hu(n){return _i(function(t){var r=t.length,e=r,u=H.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new sl(tn);if(u&&!o&&"wrapper"==yi(i))var o=new H([],!0)}for(e=o?e:r;++e1&&d.reverse(),s&&cf))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&ln?new vr:Y;for(i.set(n,t),i.set(t,n);++s1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Lt,"{\n/* [wrapped with "+t+"] */\n")}function Si(n){return yh(n)||gh(n)||!!(Wl&&n&&n[Wl])}function Wi(n,t){var r=typeof n; +return t=null==t?zn:t,!!t&&("number"==r||"symbol"!=r&&qt.test(n))&&n>-1&&n%1==0&&n0){if(++t>=jn)return arguments[0]}else t=0; +return n.apply(Y,arguments)}}function Yi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===Y?e:t;++r=this.__values__.length;return{done:n,value:n?Y:this.__values__[this.__index__++]}}function rf(){return this}function ef(n){for(var t,r=this;r instanceof G;){var e=to(r);e.__index__=0,e.__values__=Y,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function uf(){var n=this.__wrapped__;if(n instanceof Bt){var t=n;return this.__actions__.length&&(t=new Bt(this)),t=t.reverse(),t.__actions__.push({func:Qo,args:[Ro],thisArg:Y}),new H(t,this.__chain__)}return this.thru(Ro); +}function of(){return du(this.__wrapped__,this.__actions__)}function ff(n,t,r){var e=yh(n)?u:Gr;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function cf(n,t){return(yh(n)?i:ne)(n,bi(t,3))}function af(n,t){return te(vf(n,t),1)}function lf(n,t){return te(vf(n,t),Rn)}function sf(n,t,r){return r=r===Y?1:jc(r),te(vf(n,t),r)}function hf(n,t){return(yh(n)?r:vs)(n,bi(t,3))}function pf(n,t){return(yh(n)?e:gs)(n,bi(t,3))}function _f(n,t,r,e){n=Vf(n)?n:na(n),r=r&&!e?jc(r):0;var u=n.length;return r<0&&(r=Kl(u+r,0)), +gc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function vf(n,t){return(yh(n)?c:Fe)(n,bi(t,3))}function gf(n,t,r,e){return null==n?[]:(yh(t)||(t=null==t?[]:[t]),r=e?Y:r,yh(r)||(r=null==r?[]:[r]),Ve(n,t,r))}function yf(n,t,r){var e=yh(n)?l:j,u=arguments.length<3;return e(n,bi(t,4),r,u,vs)}function df(n,t,r){var e=yh(n)?s:j,u=arguments.length<3;return e(n,bi(t,4),r,u,gs)}function bf(n,t){return(yh(n)?i:ne)(n,Lf(bi(t,3)))}function wf(n){return(yh(n)?kr:eu)(n)}function mf(n,t,r){return t=(r?Li(n,t,r):t===Y)?1:jc(t), +(yh(n)?Or:uu)(n,t)}function xf(n){return(yh(n)?Ir:ou)(n)}function jf(n){if(null==n)return 0;if(Vf(n))return gc(n)?K(n):n.length;var t=Is(n);return t==Zn||t==Qn?n.size:$e(n).length}function Af(n,t,r){var e=yh(n)?h:cu;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function kf(n,t){if("function"!=typeof t)throw new sl(tn);return n=jc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Of(n,t,r){return t=r?Y:t,t=n&&null==t?n.length:t,fi(n,dn,Y,Y,Y,Y,t)}function If(n,t){var r;if("function"!=typeof t)throw new sl(tn); +return n=jc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=Y),r}}function Rf(n,t,r){t=r?Y:t;var e=fi(n,_n,Y,Y,Y,Y,Y,t);return e.placeholder=Rf.placeholder,e}function zf(n,t,r){t=r?Y:t;var e=fi(n,vn,Y,Y,Y,Y,Y,t);return e.placeholder=zf.placeholder,e}function Ef(n,t,r){function e(t){var r=h,e=p;return h=p=Y,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Es(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Vl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===Y||r>=t||r<0||w&&e>=_; +}function f(){var n=ih();return o(n)?c(n):(g=Es(f,i(n)),Y)}function c(n){return g=Y,m&&h?e(n):(h=p=Y,v)}function a(){g!==Y&&xs(g),d=0,h=y=p=g=Y}function l(){return g===Y?v:c(ih())}function s(){var n=ih(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===Y)return u(y);if(w)return xs(g),g=Es(f,t),e(y)}return g===Y&&(g=Es(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new sl(tn);return t=kc(t)||0,ic(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Kl(kc(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m), +s.cancel=a,s.flush=l,s}function Sf(n){return fi(n,wn)}function Wf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new sl(tn);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Wf.Cache||ar),r}function Lf(n){if("function"!=typeof n)throw new sl(tn);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2: +return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Cf(n){return If(2,n)}function Uf(n,t){if("function"!=typeof n)throw new sl(tn);return t=t===Y?t:jc(t),ru(n,t)}function Bf(t,r){if("function"!=typeof t)throw new sl(tn);return r=null==r?0:Kl(jc(r),0),ru(function(e){var u=e[r],i=Au(e,0,r);return u&&a(i,u),n(t,this,i)})}function Tf(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new sl(tn);return ic(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u), +Ef(n,t,{leading:e,maxWait:t,trailing:u})}function $f(n){return Of(n,1)}function Df(n,t){return sh(xu(t),n)}function Mf(){if(!arguments.length)return[];var n=arguments[0];return yh(n)?n:[n]}function Ff(n){return Dr(n,cn)}function Nf(n,t){return t="function"==typeof t?t:Y,Dr(n,cn,t)}function Pf(n){return Dr(n,on|cn)}function qf(n,t){return t="function"==typeof t?t:Y,Dr(n,on|cn,t)}function Zf(n,t){return null==t||Zr(n,t,Fc(t))}function Kf(n,t){return n===t||n!==n&&t!==t}function Vf(n){return null!=n&&uc(n.length)&&!rc(n); +}function Gf(n){return oc(n)&&Vf(n)}function Hf(n){return n===!0||n===!1||oc(n)&&de(n)==Dn}function Jf(n){return oc(n)&&1===n.nodeType&&!_c(n)}function Yf(n){if(null==n)return!0;if(Vf(n)&&(yh(n)||"string"==typeof n||"function"==typeof n.splice||bh(n)||Ah(n)||gh(n)))return!n.length;var t=Is(n);if(t==Zn||t==Qn)return!n.size;if($i(n))return!$e(n).length;for(var r in n)if(yl.call(n,r))return!1;return!0}function Qf(n,t){return ze(n,t)}function Xf(n,t,r){r="function"==typeof r?r:Y;var e=r?r(n,t):Y;return e===Y?ze(n,t,Y,r):!!e; +}function nc(n){if(!oc(n))return!1;var t=de(n);return t==Nn||t==Fn||"string"==typeof n.message&&"string"==typeof n.name&&!_c(n)}function tc(n){return"number"==typeof n&&Pl(n)}function rc(n){if(!ic(n))return!1;var t=de(n);return t==Pn||t==qn||t==$n||t==Jn}function ec(n){return"number"==typeof n&&n==jc(n)}function uc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=zn}function ic(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function oc(n){return null!=n&&"object"==typeof n}function fc(n,t){ +return n===t||We(n,t,mi(t))}function cc(n,t,r){return r="function"==typeof r?r:Y,We(n,t,mi(t),r)}function ac(n){return pc(n)&&n!=+n}function lc(n){if(Rs(n))throw new il(nn);return Le(n)}function sc(n){return null===n}function hc(n){return null==n}function pc(n){return"number"==typeof n||oc(n)&&de(n)==Kn}function _c(n){if(!oc(n)||de(n)!=Gn)return!1;var t=Rl(n);if(null===t)return!0;var r=yl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&gl.call(r)==ml}function vc(n){ +return ec(n)&&n>=-zn&&n<=zn}function gc(n){return"string"==typeof n||!yh(n)&&oc(n)&&de(n)==Xn}function yc(n){return"symbol"==typeof n||oc(n)&&de(n)==nt}function dc(n){return n===Y}function bc(n){return oc(n)&&Is(n)==rt}function wc(n){return oc(n)&&de(n)==et}function mc(n){if(!n)return[];if(Vf(n))return gc(n)?V(n):Uu(n);if(Ll&&n[Ll])return $(n[Ll]());var t=Is(n);return(t==Zn?D:t==Qn?N:na)(n)}function xc(n){if(!n)return 0===n?n:0;if(n=kc(n),n===Rn||n===-Rn){return(n<0?-1:1)*En}return n===n?n:0}function jc(n){ +var t=xc(n),r=t%1;return t===t?r?t-r:t:0}function Ac(n){return n?$r(jc(n),0,Wn):0}function kc(n){if("number"==typeof n)return n;if(yc(n))return Sn;if(ic(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=ic(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Et,"");var r=Ft.test(n);return r||Pt.test(n)?Jr(n.slice(2),r?2:8):Mt.test(n)?Sn:+n}function Oc(n){return Bu(n,Nc(n))}function Ic(n){return n?$r(jc(n),-zn,zn):0===n?n:0}function Rc(n){return null==n?"":pu(n)}function zc(n,t){var r=_s(n); +return null==t?r:Wr(r,t)}function Ec(n,t){return v(n,bi(t,3),ee)}function Sc(n,t){return v(n,bi(t,3),ue)}function Wc(n,t){return null==n?n:ys(n,bi(t,3),Nc)}function Lc(n,t){return null==n?n:ds(n,bi(t,3),Nc)}function Cc(n,t){return n&&ee(n,bi(t,3))}function Uc(n,t){return n&&ue(n,bi(t,3))}function Bc(n){return null==n?[]:se(n,Fc(n))}function Tc(n){return null==n?[]:se(n,Nc(n))}function $c(n,t,r){var e=null==n?Y:ve(n,t);return e===Y?r:e}function Dc(n,t){return null!=n&&Oi(n,t,we)}function Mc(n,t){return null!=n&&Oi(n,t,me); +}function Fc(n){return Vf(n)?Ar(n):$e(n)}function Nc(n){return Vf(n)?Ar(n,!0):De(n)}function Pc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,t(n,e,u),n)}),r}function qc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,e,t(n,e,u))}),r}function Zc(n,t){return Kc(n,Lf(bi(t)))}function Kc(n,t){if(null==n)return{};var r=c(gi(n),function(n){return[n]});return t=bi(t),He(n,r,function(n,r){return t(n,r[0])})}function Vc(n,t,r){t=ju(t,n);var e=-1,u=t.length;for(u||(u=1,n=Y);++et){ +var e=n;n=t,t=e}if(r||n%1||t%1){var u=Jl();return Vl(n+u*(t-n+Hr("1e-"+((u+"").length-1))),t)}return Xe(n,t)}function ia(n){return Jh(Rc(n).toLowerCase())}function oa(n){return n=Rc(n),n&&n.replace(Zt,he).replace(Br,"")}function fa(n,t,r){n=Rc(n),t=pu(t);var e=n.length;r=r===Y?e:$r(jc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function ca(n){return n=Rc(n),n&&mt.test(n)?n.replace(bt,pe):n}function aa(n){return n=Rc(n),n&&zt.test(n)?n.replace(Rt,"\\$&"):n}function la(n,t,r){n=Rc(n),t=jc(t); +var e=t?K(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ni(Ml(u),r)+n+ni(Dl(u),r)}function sa(n,t,r){n=Rc(n),t=jc(t);var e=t?K(n):0;return t&&e>>0)?(n=Rc(n),n&&("string"==typeof t||null!=t&&!xh(t))&&(t=pu(t),!t&&B(n))?Au(V(n),0,r):n.split(t,r)):[]}function ya(n,t,r){return n=Rc(n),r=null==r?0:$r(jc(r),0,n.length),t=pu(t),n.slice(r,r+t.length)==t}function da(n,t,r){var e=q.templateSettings;r&&Li(n,t,r)&&(t=Y),n=Rc(n),t=zh({},t,e,ci);var u,i,o=zh({},t.imports,e.imports,ci),f=Fc(o),c=z(o,f),a=0,l=t.interpolate||Kt,s="__p += '",h=al((t.escape||Kt).source+"|"+l.source+"|"+(l===At?$t:Kt).source+"|"+(t.evaluate||Kt).source+"|$","g"),p="//# sourceURL="+(yl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Nr+"]")+"\n"; +n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Vt,C),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=yl.call(t,"variable")&&t.variable;_||(s="with (obj) {\n"+s+"\n}\n"),s=(i?s.replace(vt,""):s).replace(gt,"$1").replace(yt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}"; +var v=Yh(function(){return ol(f,p+"return "+s).apply(Y,c)});if(v.source=s,nc(v))throw v;return v}function ba(n){return Rc(n).toLowerCase()}function wa(n){return Rc(n).toUpperCase()}function ma(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Et,"");if(!n||!(t=pu(t)))return n;var e=V(n),u=V(t);return Au(e,S(e,u),W(e,u)+1).join("")}function xa(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Wt,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,0,W(e,V(t))+1).join("")}function ja(n,t,r){if(n=Rc(n), +n&&(r||t===Y))return n.replace(St,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,S(e,V(t))).join("")}function Aa(n,t){var r=mn,e=xn;if(ic(t)){var u="separator"in t?t.separator:u;r="length"in t?jc(t.length):r,e="omission"in t?pu(t.omission):e}n=Rc(n);var i=n.length;if(B(n)){var o=V(n);i=o.length}if(r>=i)return n;var f=r-K(e);if(f<1)return e;var c=o?Au(o,0,f).join(""):n.slice(0,f);if(u===Y)return c+e;if(o&&(f+=c.length-f),xh(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=al(u.source,Rc(Dt.exec(u))+"g")), +u.lastIndex=0;a=u.exec(l);)var s=a.index;c=c.slice(0,s===Y?f:s)}}else if(n.indexOf(pu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function ka(n){return n=Rc(n),n&&wt.test(n)?n.replace(dt,_e):n}function Oa(n,t,r){return n=Rc(n),t=r?Y:t,t===Y?T(n)?J(n):_(n):n.match(t)||[]}function Ia(t){var r=null==t?0:t.length,e=bi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new sl(tn);return[e(n[0]),n[1]]}):[],ru(function(e){for(var u=-1;++uzn)return[];var r=Wn,e=Vl(n,Wn);t=bi(t),n-=Wn;for(var u=O(e,t);++r1?n[t-1]:Y;return r="function"==typeof r?(n.pop(), +r):Y,Vo(n,r)}),Js=_i(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Bt&&Wi(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:Qo,args:[u],thisArg:Y}),new H(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(Y),n})):this.thru(u)}),Ys=Du(function(n,t,r){yl.call(n,r)?++n[r]:Cr(n,r,1)}),Qs=Gu(lo),Xs=Gu(so),nh=Du(function(n,t,r){yl.call(n,r)?n[r].push(t):Cr(n,r,[t])}),th=ru(function(t,r,e){var u=-1,i="function"==typeof r,o=Vf(t)?el(t.length):[]; +return vs(t,function(t){o[++u]=i?n(r,t,e):ke(t,r,e)}),o}),rh=Du(function(n,t,r){Cr(n,r,t)}),eh=Du(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),uh=ru(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Li(n,t[0],t[1])?t=[]:r>2&&Li(t[0],t[1],t[2])&&(t=[t[0]]),Ve(n,te(t,1),[])}),ih=Tl||function(){return Xr.Date.now()},oh=ru(function(n,t,r){var e=sn;if(r.length){var u=F(r,di(oh));e|=gn}return fi(n,e,t,r,u)}),fh=ru(function(n,t,r){var e=sn|hn;if(r.length){var u=F(r,di(fh));e|=gn; +}return fi(t,e,n,r,u)}),ch=ru(function(n,t){return Kr(n,1,t)}),ah=ru(function(n,t,r){return Kr(n,kc(t)||0,r)});Wf.Cache=ar;var lh=ms(function(t,r){r=1==r.length&&yh(r[0])?c(r[0],R(bi())):c(te(r,1),R(bi()));var e=r.length;return ru(function(u){for(var i=-1,o=Vl(u.length,e);++i=t}),gh=Oe(function(){return arguments}())?Oe:function(n){return oc(n)&&yl.call(n,"callee")&&!El.call(n,"callee")},yh=el.isArray,dh=ie?R(ie):Ie,bh=Nl||Na,wh=oe?R(oe):Re,mh=fe?R(fe):Se,xh=ce?R(ce):Ce,jh=ae?R(ae):Ue,Ah=le?R(le):Be,kh=ei(Me),Oh=ei(function(n,t){return n<=t}),Ih=Mu(function(n,t){if($i(t)||Vf(t))return Bu(t,Fc(t),n),Y;for(var r in t)yl.call(t,r)&&zr(n,r,t[r])}),Rh=Mu(function(n,t){Bu(t,Nc(t),n)}),zh=Mu(function(n,t,r,e){Bu(t,Nc(t),n,e)}),Eh=Mu(function(n,t,r,e){Bu(t,Fc(t),n,e); +}),Sh=_i(Tr),Wh=ru(function(n,t){n=cl(n);var r=-1,e=t.length,u=e>2?t[2]:Y;for(u&&Li(t[0],t[1],u)&&(e=1);++r1),t}),Bu(n,gi(n),r),e&&(r=Dr(r,on|fn|cn,li));for(var u=t.length;u--;)vu(r,t[u]);return r}),Mh=_i(function(n,t){return null==n?{}:Ge(n,t)}),Fh=oi(Fc),Nh=oi(Nc),Ph=Zu(function(n,t,r){return t=t.toLowerCase(),n+(r?ia(t):t)}),qh=Zu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Zh=Zu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Kh=qu("toLowerCase"),Vh=Zu(function(n,t,r){ +return n+(r?"_":"")+t.toLowerCase()}),Gh=Zu(function(n,t,r){return n+(r?" ":"")+Jh(t)}),Hh=Zu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Jh=qu("toUpperCase"),Yh=ru(function(t,r){try{return n(t,Y,r)}catch(n){return nc(n)?n:new il(n)}}),Qh=_i(function(n,t){return r(t,function(t){t=Qi(t),Cr(n,t,oh(n[t],n))}),n}),Xh=Hu(),np=Hu(!0),tp=ru(function(n,t){return function(r){return ke(r,n,t)}}),rp=ru(function(n,t){return function(r){return ke(n,r,t)}}),ep=Xu(c),up=Xu(u),ip=Xu(h),op=ri(),fp=ri(!0),cp=Qu(function(n,t){ +return n+t},0),ap=ii("ceil"),lp=Qu(function(n,t){return n/t},1),sp=ii("floor"),hp=Qu(function(n,t){return n*t},1),pp=ii("round"),_p=Qu(function(n,t){return n-t},0);return q.after=kf,q.ary=Of,q.assign=Ih,q.assignIn=Rh,q.assignInWith=zh,q.assignWith=Eh,q.at=Sh,q.before=If,q.bind=oh,q.bindAll=Qh,q.bindKey=fh,q.castArray=Mf,q.chain=Jo,q.chunk=ro,q.compact=eo,q.concat=uo,q.cond=Ia,q.conforms=Ra,q.constant=za,q.countBy=Ys,q.create=zc,q.curry=Rf,q.curryRight=zf,q.debounce=Ef,q.defaults=Wh,q.defaultsDeep=Lh, +q.defer=ch,q.delay=ah,q.difference=Ls,q.differenceBy=Cs,q.differenceWith=Us,q.drop=io,q.dropRight=oo,q.dropRightWhile=fo,q.dropWhile=co,q.fill=ao,q.filter=cf,q.flatMap=af,q.flatMapDeep=lf,q.flatMapDepth=sf,q.flatten=ho,q.flattenDeep=po,q.flattenDepth=_o,q.flip=Sf,q.flow=Xh,q.flowRight=np,q.fromPairs=vo,q.functions=Bc,q.functionsIn=Tc,q.groupBy=nh,q.initial=bo,q.intersection=Bs,q.intersectionBy=Ts,q.intersectionWith=$s,q.invert=Ch,q.invertBy=Uh,q.invokeMap=th,q.iteratee=Wa,q.keyBy=rh,q.keys=Fc,q.keysIn=Nc, +q.map=vf,q.mapKeys=Pc,q.mapValues=qc,q.matches=La,q.matchesProperty=Ca,q.memoize=Wf,q.merge=Th,q.mergeWith=$h,q.method=tp,q.methodOf=rp,q.mixin=Ua,q.negate=Lf,q.nthArg=$a,q.omit=Dh,q.omitBy=Zc,q.once=Cf,q.orderBy=gf,q.over=ep,q.overArgs=lh,q.overEvery=up,q.overSome=ip,q.partial=sh,q.partialRight=hh,q.partition=eh,q.pick=Mh,q.pickBy=Kc,q.property=Da,q.propertyOf=Ma,q.pull=Ds,q.pullAll=Ao,q.pullAllBy=ko,q.pullAllWith=Oo,q.pullAt=Ms,q.range=op,q.rangeRight=fp,q.rearg=ph,q.reject=bf,q.remove=Io,q.rest=Uf, +q.reverse=Ro,q.sampleSize=mf,q.set=Gc,q.setWith=Hc,q.shuffle=xf,q.slice=zo,q.sortBy=uh,q.sortedUniq=Bo,q.sortedUniqBy=To,q.split=ga,q.spread=Bf,q.tail=$o,q.take=Do,q.takeRight=Mo,q.takeRightWhile=Fo,q.takeWhile=No,q.tap=Yo,q.throttle=Tf,q.thru=Qo,q.toArray=mc,q.toPairs=Fh,q.toPairsIn=Nh,q.toPath=Va,q.toPlainObject=Oc,q.transform=Jc,q.unary=$f,q.union=Fs,q.unionBy=Ns,q.unionWith=Ps,q.uniq=Po,q.uniqBy=qo,q.uniqWith=Zo,q.unset=Yc,q.unzip=Ko,q.unzipWith=Vo,q.update=Qc,q.updateWith=Xc,q.values=na,q.valuesIn=ta, +q.without=qs,q.words=Oa,q.wrap=Df,q.xor=Zs,q.xorBy=Ks,q.xorWith=Vs,q.zip=Gs,q.zipObject=Go,q.zipObjectDeep=Ho,q.zipWith=Hs,q.entries=Fh,q.entriesIn=Nh,q.extend=Rh,q.extendWith=zh,Ua(q,q),q.add=cp,q.attempt=Yh,q.camelCase=Ph,q.capitalize=ia,q.ceil=ap,q.clamp=ra,q.clone=Ff,q.cloneDeep=Pf,q.cloneDeepWith=qf,q.cloneWith=Nf,q.conformsTo=Zf,q.deburr=oa,q.defaultTo=Ea,q.divide=lp,q.endsWith=fa,q.eq=Kf,q.escape=ca,q.escapeRegExp=aa,q.every=ff,q.find=Qs,q.findIndex=lo,q.findKey=Ec,q.findLast=Xs,q.findLastIndex=so, +q.findLastKey=Sc,q.floor=sp,q.forEach=hf,q.forEachRight=pf,q.forIn=Wc,q.forInRight=Lc,q.forOwn=Cc,q.forOwnRight=Uc,q.get=$c,q.gt=_h,q.gte=vh,q.has=Dc,q.hasIn=Mc,q.head=go,q.identity=Sa,q.includes=_f,q.indexOf=yo,q.inRange=ea,q.invoke=Bh,q.isArguments=gh,q.isArray=yh,q.isArrayBuffer=dh,q.isArrayLike=Vf,q.isArrayLikeObject=Gf,q.isBoolean=Hf,q.isBuffer=bh,q.isDate=wh,q.isElement=Jf,q.isEmpty=Yf,q.isEqual=Qf,q.isEqualWith=Xf,q.isError=nc,q.isFinite=tc,q.isFunction=rc,q.isInteger=ec,q.isLength=uc,q.isMap=mh, +q.isMatch=fc,q.isMatchWith=cc,q.isNaN=ac,q.isNative=lc,q.isNil=hc,q.isNull=sc,q.isNumber=pc,q.isObject=ic,q.isObjectLike=oc,q.isPlainObject=_c,q.isRegExp=xh,q.isSafeInteger=vc,q.isSet=jh,q.isString=gc,q.isSymbol=yc,q.isTypedArray=Ah,q.isUndefined=dc,q.isWeakMap=bc,q.isWeakSet=wc,q.join=wo,q.kebabCase=qh,q.last=mo,q.lastIndexOf=xo,q.lowerCase=Zh,q.lowerFirst=Kh,q.lt=kh,q.lte=Oh,q.max=Ha,q.maxBy=Ja,q.mean=Ya,q.meanBy=Qa,q.min=Xa,q.minBy=nl,q.stubArray=Fa,q.stubFalse=Na,q.stubObject=Pa,q.stubString=qa, +q.stubTrue=Za,q.multiply=hp,q.nth=jo,q.noConflict=Ba,q.noop=Ta,q.now=ih,q.pad=la,q.padEnd=sa,q.padStart=ha,q.parseInt=pa,q.random=ua,q.reduce=yf,q.reduceRight=df,q.repeat=_a,q.replace=va,q.result=Vc,q.round=pp,q.runInContext=p,q.sample=wf,q.size=jf,q.snakeCase=Vh,q.some=Af,q.sortedIndex=Eo,q.sortedIndexBy=So,q.sortedIndexOf=Wo,q.sortedLastIndex=Lo,q.sortedLastIndexBy=Co,q.sortedLastIndexOf=Uo,q.startCase=Gh,q.startsWith=ya,q.subtract=_p,q.sum=tl,q.sumBy=rl,q.template=da,q.times=Ka,q.toFinite=xc,q.toInteger=jc, +q.toLength=Ac,q.toLower=ba,q.toNumber=kc,q.toSafeInteger=Ic,q.toString=Rc,q.toUpper=wa,q.trim=ma,q.trimEnd=xa,q.trimStart=ja,q.truncate=Aa,q.unescape=ka,q.uniqueId=Ga,q.upperCase=Hh,q.upperFirst=Jh,q.each=hf,q.eachRight=pf,q.first=go,Ua(q,function(){var n={};return ee(q,function(t,r){yl.call(q.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),q.VERSION=Q,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){q[n].placeholder=q}),r(["drop","take"],function(n,t){Bt.prototype[n]=function(r){ +r=r===Y?1:Kl(jc(r),0);var e=this.__filtered__&&!t?new Bt(this):this.clone();return e.__filtered__?e.__takeCount__=Vl(r,e.__takeCount__):e.__views__.push({size:Vl(r,Wn),type:n+(e.__dir__<0?"Right":"")}),e},Bt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==kn||r==In;Bt.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:bi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){ +var r="take"+(t?"Right":"");Bt.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Bt.prototype[n]=function(){return this.__filtered__?new Bt(this):this[r](1)}}),Bt.prototype.compact=function(){return this.filter(Sa)},Bt.prototype.find=function(n){return this.filter(n).head()},Bt.prototype.findLast=function(n){return this.reverse().find(n)},Bt.prototype.invokeMap=ru(function(n,t){return"function"==typeof n?new Bt(this):this.map(function(r){ +return ke(r,n,t)})}),Bt.prototype.reject=function(n){return this.filter(Lf(bi(n)))},Bt.prototype.slice=function(n,t){n=jc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Bt(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Y&&(t=jc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Bt.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Bt.prototype.toArray=function(){return this.take(Wn)},ee(Bt.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=q[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t); +u&&(q.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Bt,c=o[0],l=f||yh(t),s=function(n){var t=u.apply(q,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Bt(this);var g=n.apply(t,o);return g.__actions__.push({func:Qo,args:[s],thisArg:Y}),new H(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){ +var t=hl[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);q.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(yh(u)?u:[],n)}return this[r](function(r){return t.apply(yh(r)?r:[],n)})}}),ee(Bt.prototype,function(n,t){var r=q[t];if(r){var e=r.name+"";yl.call(is,e)||(is[e]=[]),is[e].push({name:t,func:r})}}),is[Ju(Y,hn).name]=[{name:"wrapper",func:Y}],Bt.prototype.clone=Gt,Bt.prototype.reverse=Ht,Bt.prototype.value=Jt,q.prototype.at=Js, +q.prototype.chain=Xo,q.prototype.commit=nf,q.prototype.next=tf,q.prototype.plant=ef,q.prototype.reverse=uf,q.prototype.toJSON=q.prototype.valueOf=q.prototype.value=of,q.prototype.first=q.prototype.head,Ll&&(q.prototype[Ll]=rf),q},ge=ve();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Xr._=ge,define(function(){return ge})):te?((te.exports=ge)._=ge,ne._=ge):Xr._=ge}).call(this); \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lowerCase.js b/tools/node_modules/@babel/core/node_modules/lodash/lowerCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/lowerCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/lowerCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lowerFirst.js b/tools/node_modules/@babel/core/node_modules/lodash/lowerFirst.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/lowerFirst.js rename to tools/node_modules/@babel/core/node_modules/lodash/lowerFirst.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lt.js b/tools/node_modules/@babel/core/node_modules/lodash/lt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/lt.js rename to tools/node_modules/@babel/core/node_modules/lodash/lt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lte.js b/tools/node_modules/@babel/core/node_modules/lodash/lte.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/lte.js rename to tools/node_modules/@babel/core/node_modules/lodash/lte.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/map.js b/tools/node_modules/@babel/core/node_modules/lodash/map.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/map.js rename to tools/node_modules/@babel/core/node_modules/lodash/map.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/mapKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/mapKeys.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/mapKeys.js rename to tools/node_modules/@babel/core/node_modules/lodash/mapKeys.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/mapValues.js b/tools/node_modules/@babel/core/node_modules/lodash/mapValues.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/mapValues.js rename to tools/node_modules/@babel/core/node_modules/lodash/mapValues.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/matches.js b/tools/node_modules/@babel/core/node_modules/lodash/matches.js similarity index 79% rename from tools/node_modules/babel-eslint/node_modules/lodash/matches.js rename to tools/node_modules/@babel/core/node_modules/lodash/matches.js index 11145db37f4fa1..e10b35198b8517 100644 --- a/tools/node_modules/babel-eslint/node_modules/lodash/matches.js +++ b/tools/node_modules/@babel/core/node_modules/lodash/matches.js @@ -16,6 +16,9 @@ var CLONE_DEEP_FLAG = 1; * values against any array or object value, respectively. See `_.isEqual` * for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.0.0 @@ -31,6 +34,10 @@ var CLONE_DEEP_FLAG = 1; * * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/matchesProperty.js b/tools/node_modules/@babel/core/node_modules/lodash/matchesProperty.js similarity index 79% rename from tools/node_modules/babel-eslint/node_modules/lodash/matchesProperty.js rename to tools/node_modules/@babel/core/node_modules/lodash/matchesProperty.js index cc062ac99378e9..e6f1a882d610a8 100644 --- a/tools/node_modules/babel-eslint/node_modules/lodash/matchesProperty.js +++ b/tools/node_modules/@babel/core/node_modules/lodash/matchesProperty.js @@ -13,6 +13,9 @@ var CLONE_DEEP_FLAG = 1; * `srcValue` values against any array or object value, respectively. See * `_.isEqual` for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.2.0 @@ -29,6 +32,10 @@ var CLONE_DEEP_FLAG = 1; * * _.find(objects, _.matchesProperty('a', 4)); * // => { 'a': 4, 'b': 5, 'c': 6 } + * + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/math.js b/tools/node_modules/@babel/core/node_modules/lodash/math.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/math.js rename to tools/node_modules/@babel/core/node_modules/lodash/math.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/max.js b/tools/node_modules/@babel/core/node_modules/lodash/max.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/max.js rename to tools/node_modules/@babel/core/node_modules/lodash/max.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/maxBy.js b/tools/node_modules/@babel/core/node_modules/lodash/maxBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/maxBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/maxBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/mean.js b/tools/node_modules/@babel/core/node_modules/lodash/mean.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/mean.js rename to tools/node_modules/@babel/core/node_modules/lodash/mean.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/meanBy.js b/tools/node_modules/@babel/core/node_modules/lodash/meanBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/meanBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/meanBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/memoize.js b/tools/node_modules/@babel/core/node_modules/lodash/memoize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/memoize.js rename to tools/node_modules/@babel/core/node_modules/lodash/memoize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/merge.js b/tools/node_modules/@babel/core/node_modules/lodash/merge.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/merge.js rename to tools/node_modules/@babel/core/node_modules/lodash/merge.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/mergeWith.js b/tools/node_modules/@babel/core/node_modules/lodash/mergeWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/mergeWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/mergeWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/method.js b/tools/node_modules/@babel/core/node_modules/lodash/method.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/method.js rename to tools/node_modules/@babel/core/node_modules/lodash/method.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/methodOf.js b/tools/node_modules/@babel/core/node_modules/lodash/methodOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/methodOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/methodOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/min.js b/tools/node_modules/@babel/core/node_modules/lodash/min.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/min.js rename to tools/node_modules/@babel/core/node_modules/lodash/min.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/minBy.js b/tools/node_modules/@babel/core/node_modules/lodash/minBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/minBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/minBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/mixin.js b/tools/node_modules/@babel/core/node_modules/lodash/mixin.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/mixin.js rename to tools/node_modules/@babel/core/node_modules/lodash/mixin.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/multiply.js b/tools/node_modules/@babel/core/node_modules/lodash/multiply.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/multiply.js rename to tools/node_modules/@babel/core/node_modules/lodash/multiply.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/negate.js b/tools/node_modules/@babel/core/node_modules/lodash/negate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/negate.js rename to tools/node_modules/@babel/core/node_modules/lodash/negate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/next.js b/tools/node_modules/@babel/core/node_modules/lodash/next.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/next.js rename to tools/node_modules/@babel/core/node_modules/lodash/next.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/noop.js b/tools/node_modules/@babel/core/node_modules/lodash/noop.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/noop.js rename to tools/node_modules/@babel/core/node_modules/lodash/noop.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/now.js b/tools/node_modules/@babel/core/node_modules/lodash/now.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/now.js rename to tools/node_modules/@babel/core/node_modules/lodash/now.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/nth.js b/tools/node_modules/@babel/core/node_modules/lodash/nth.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/nth.js rename to tools/node_modules/@babel/core/node_modules/lodash/nth.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/nthArg.js b/tools/node_modules/@babel/core/node_modules/lodash/nthArg.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/nthArg.js rename to tools/node_modules/@babel/core/node_modules/lodash/nthArg.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/number.js b/tools/node_modules/@babel/core/node_modules/lodash/number.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/number.js rename to tools/node_modules/@babel/core/node_modules/lodash/number.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/object.js b/tools/node_modules/@babel/core/node_modules/lodash/object.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/object.js rename to tools/node_modules/@babel/core/node_modules/lodash/object.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/omit.js b/tools/node_modules/@babel/core/node_modules/lodash/omit.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/omit.js rename to tools/node_modules/@babel/core/node_modules/lodash/omit.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/omitBy.js b/tools/node_modules/@babel/core/node_modules/lodash/omitBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/omitBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/omitBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/once.js b/tools/node_modules/@babel/core/node_modules/lodash/once.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/once.js rename to tools/node_modules/@babel/core/node_modules/lodash/once.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/orderBy.js b/tools/node_modules/@babel/core/node_modules/lodash/orderBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/orderBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/orderBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/over.js b/tools/node_modules/@babel/core/node_modules/lodash/over.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/over.js rename to tools/node_modules/@babel/core/node_modules/lodash/over.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/overArgs.js b/tools/node_modules/@babel/core/node_modules/lodash/overArgs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/overArgs.js rename to tools/node_modules/@babel/core/node_modules/lodash/overArgs.js diff --git a/tools/node_modules/@babel/core/node_modules/lodash/overEvery.js b/tools/node_modules/@babel/core/node_modules/lodash/overEvery.js new file mode 100644 index 00000000000000..fb19d13ed987e1 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/lodash/overEvery.js @@ -0,0 +1,34 @@ +var arrayEvery = require('./_arrayEvery'), + createOver = require('./_createOver'); + +/** + * Creates a function that checks if **all** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overEvery([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => false + * + * func(NaN); + * // => false + */ +var overEvery = createOver(arrayEvery); + +module.exports = overEvery; diff --git a/tools/node_modules/@babel/core/node_modules/lodash/overSome.js b/tools/node_modules/@babel/core/node_modules/lodash/overSome.js new file mode 100644 index 00000000000000..414ab66b925d1a --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/lodash/overSome.js @@ -0,0 +1,37 @@ +var arraySome = require('./_arraySome'), + createOver = require('./_createOver'); + +/** + * Creates a function that checks if **any** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overSome([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => true + * + * func(NaN); + * // => false + * + * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) + * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) + */ +var overSome = createOver(arraySome); + +module.exports = overSome; diff --git a/tools/node_modules/@babel/core/node_modules/lodash/package.json b/tools/node_modules/@babel/core/node_modules/lodash/package.json new file mode 100644 index 00000000000000..2539c2434cb741 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/lodash/package.json @@ -0,0 +1,17 @@ +{ + "name": "lodash", + "version": "4.17.20", + "description": "Lodash modular utilities.", + "keywords": "modules, stdlib, util", + "homepage": "https://lodash.com/", + "repository": "lodash/lodash", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "main": "lodash.js", + "author": "John-David Dalton ", + "contributors": [ + "John-David Dalton ", + "Mathias Bynens " + ], + "scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" } +} diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pad.js b/tools/node_modules/@babel/core/node_modules/lodash/pad.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/pad.js rename to tools/node_modules/@babel/core/node_modules/lodash/pad.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/padEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/padEnd.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/padEnd.js rename to tools/node_modules/@babel/core/node_modules/lodash/padEnd.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/padStart.js b/tools/node_modules/@babel/core/node_modules/lodash/padStart.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/padStart.js rename to tools/node_modules/@babel/core/node_modules/lodash/padStart.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/parseInt.js b/tools/node_modules/@babel/core/node_modules/lodash/parseInt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/parseInt.js rename to tools/node_modules/@babel/core/node_modules/lodash/parseInt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/partial.js b/tools/node_modules/@babel/core/node_modules/lodash/partial.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/partial.js rename to tools/node_modules/@babel/core/node_modules/lodash/partial.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/partialRight.js b/tools/node_modules/@babel/core/node_modules/lodash/partialRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/partialRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/partialRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/partition.js b/tools/node_modules/@babel/core/node_modules/lodash/partition.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/partition.js rename to tools/node_modules/@babel/core/node_modules/lodash/partition.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pick.js b/tools/node_modules/@babel/core/node_modules/lodash/pick.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/pick.js rename to tools/node_modules/@babel/core/node_modules/lodash/pick.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pickBy.js b/tools/node_modules/@babel/core/node_modules/lodash/pickBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/pickBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/pickBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/plant.js b/tools/node_modules/@babel/core/node_modules/lodash/plant.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/plant.js rename to tools/node_modules/@babel/core/node_modules/lodash/plant.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/property.js b/tools/node_modules/@babel/core/node_modules/lodash/property.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/property.js rename to tools/node_modules/@babel/core/node_modules/lodash/property.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/propertyOf.js b/tools/node_modules/@babel/core/node_modules/lodash/propertyOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/propertyOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/propertyOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pull.js b/tools/node_modules/@babel/core/node_modules/lodash/pull.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/pull.js rename to tools/node_modules/@babel/core/node_modules/lodash/pull.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pullAll.js b/tools/node_modules/@babel/core/node_modules/lodash/pullAll.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/pullAll.js rename to tools/node_modules/@babel/core/node_modules/lodash/pullAll.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pullAllBy.js b/tools/node_modules/@babel/core/node_modules/lodash/pullAllBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/pullAllBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/pullAllBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pullAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/pullAllWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/pullAllWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/pullAllWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pullAt.js b/tools/node_modules/@babel/core/node_modules/lodash/pullAt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/pullAt.js rename to tools/node_modules/@babel/core/node_modules/lodash/pullAt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/random.js b/tools/node_modules/@babel/core/node_modules/lodash/random.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/random.js rename to tools/node_modules/@babel/core/node_modules/lodash/random.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/range.js b/tools/node_modules/@babel/core/node_modules/lodash/range.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/range.js rename to tools/node_modules/@babel/core/node_modules/lodash/range.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/rangeRight.js b/tools/node_modules/@babel/core/node_modules/lodash/rangeRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/rangeRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/rangeRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/rearg.js b/tools/node_modules/@babel/core/node_modules/lodash/rearg.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/rearg.js rename to tools/node_modules/@babel/core/node_modules/lodash/rearg.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/reduce.js b/tools/node_modules/@babel/core/node_modules/lodash/reduce.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/reduce.js rename to tools/node_modules/@babel/core/node_modules/lodash/reduce.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/reduceRight.js b/tools/node_modules/@babel/core/node_modules/lodash/reduceRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/reduceRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/reduceRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/reject.js b/tools/node_modules/@babel/core/node_modules/lodash/reject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/reject.js rename to tools/node_modules/@babel/core/node_modules/lodash/reject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/remove.js b/tools/node_modules/@babel/core/node_modules/lodash/remove.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/remove.js rename to tools/node_modules/@babel/core/node_modules/lodash/remove.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/repeat.js b/tools/node_modules/@babel/core/node_modules/lodash/repeat.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/repeat.js rename to tools/node_modules/@babel/core/node_modules/lodash/repeat.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/replace.js b/tools/node_modules/@babel/core/node_modules/lodash/replace.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/replace.js rename to tools/node_modules/@babel/core/node_modules/lodash/replace.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/rest.js b/tools/node_modules/@babel/core/node_modules/lodash/rest.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/rest.js rename to tools/node_modules/@babel/core/node_modules/lodash/rest.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/result.js b/tools/node_modules/@babel/core/node_modules/lodash/result.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/result.js rename to tools/node_modules/@babel/core/node_modules/lodash/result.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/reverse.js b/tools/node_modules/@babel/core/node_modules/lodash/reverse.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/reverse.js rename to tools/node_modules/@babel/core/node_modules/lodash/reverse.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/round.js b/tools/node_modules/@babel/core/node_modules/lodash/round.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/round.js rename to tools/node_modules/@babel/core/node_modules/lodash/round.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sample.js b/tools/node_modules/@babel/core/node_modules/lodash/sample.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sample.js rename to tools/node_modules/@babel/core/node_modules/lodash/sample.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sampleSize.js b/tools/node_modules/@babel/core/node_modules/lodash/sampleSize.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sampleSize.js rename to tools/node_modules/@babel/core/node_modules/lodash/sampleSize.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/seq.js b/tools/node_modules/@babel/core/node_modules/lodash/seq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/seq.js rename to tools/node_modules/@babel/core/node_modules/lodash/seq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/set.js b/tools/node_modules/@babel/core/node_modules/lodash/set.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/set.js rename to tools/node_modules/@babel/core/node_modules/lodash/set.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/setWith.js b/tools/node_modules/@babel/core/node_modules/lodash/setWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/setWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/setWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/shuffle.js b/tools/node_modules/@babel/core/node_modules/lodash/shuffle.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/shuffle.js rename to tools/node_modules/@babel/core/node_modules/lodash/shuffle.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/size.js b/tools/node_modules/@babel/core/node_modules/lodash/size.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/size.js rename to tools/node_modules/@babel/core/node_modules/lodash/size.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/slice.js b/tools/node_modules/@babel/core/node_modules/lodash/slice.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/slice.js rename to tools/node_modules/@babel/core/node_modules/lodash/slice.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/snakeCase.js b/tools/node_modules/@babel/core/node_modules/lodash/snakeCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/snakeCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/snakeCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/some.js b/tools/node_modules/@babel/core/node_modules/lodash/some.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/some.js rename to tools/node_modules/@babel/core/node_modules/lodash/some.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortBy.js b/tools/node_modules/@babel/core/node_modules/lodash/sortBy.js similarity index 92% rename from tools/node_modules/babel-eslint/node_modules/lodash/sortBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/sortBy.js index 4ba8f7a0ed9bb5..d756aba6c5ebd3 100644 --- a/tools/node_modules/babel-eslint/node_modules/lodash/sortBy.js +++ b/tools/node_modules/@babel/core/node_modules/lodash/sortBy.js @@ -22,15 +22,15 @@ var baseFlatten = require('./_baseFlatten'), * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, + * { 'user': 'fred', 'age': 30 }, * { 'user': 'barney', 'age': 34 } * ]; * * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] * * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] */ var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sortedIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/sortedIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedIndexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedIndexBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sortedIndexBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/sortedIndexBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedIndexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sortedIndexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/sortedIndexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndex.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndex.js rename to tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndex.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndexBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndexBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndexBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndexOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndexOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndexOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedUniq.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedUniq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sortedUniq.js rename to tools/node_modules/@babel/core/node_modules/lodash/sortedUniq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedUniqBy.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedUniqBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sortedUniqBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/sortedUniqBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/split.js b/tools/node_modules/@babel/core/node_modules/lodash/split.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/split.js rename to tools/node_modules/@babel/core/node_modules/lodash/split.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/spread.js b/tools/node_modules/@babel/core/node_modules/lodash/spread.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/spread.js rename to tools/node_modules/@babel/core/node_modules/lodash/spread.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/startCase.js b/tools/node_modules/@babel/core/node_modules/lodash/startCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/startCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/startCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/startsWith.js b/tools/node_modules/@babel/core/node_modules/lodash/startsWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/startsWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/startsWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/string.js b/tools/node_modules/@babel/core/node_modules/lodash/string.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/string.js rename to tools/node_modules/@babel/core/node_modules/lodash/string.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/stubArray.js b/tools/node_modules/@babel/core/node_modules/lodash/stubArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/stubArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/stubArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/stubFalse.js b/tools/node_modules/@babel/core/node_modules/lodash/stubFalse.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/stubFalse.js rename to tools/node_modules/@babel/core/node_modules/lodash/stubFalse.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/stubObject.js b/tools/node_modules/@babel/core/node_modules/lodash/stubObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/stubObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/stubObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/stubString.js b/tools/node_modules/@babel/core/node_modules/lodash/stubString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/stubString.js rename to tools/node_modules/@babel/core/node_modules/lodash/stubString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/stubTrue.js b/tools/node_modules/@babel/core/node_modules/lodash/stubTrue.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/stubTrue.js rename to tools/node_modules/@babel/core/node_modules/lodash/stubTrue.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/subtract.js b/tools/node_modules/@babel/core/node_modules/lodash/subtract.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/subtract.js rename to tools/node_modules/@babel/core/node_modules/lodash/subtract.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sum.js b/tools/node_modules/@babel/core/node_modules/lodash/sum.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sum.js rename to tools/node_modules/@babel/core/node_modules/lodash/sum.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sumBy.js b/tools/node_modules/@babel/core/node_modules/lodash/sumBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/sumBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/sumBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/tail.js b/tools/node_modules/@babel/core/node_modules/lodash/tail.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/tail.js rename to tools/node_modules/@babel/core/node_modules/lodash/tail.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/take.js b/tools/node_modules/@babel/core/node_modules/lodash/take.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/take.js rename to tools/node_modules/@babel/core/node_modules/lodash/take.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/takeRight.js b/tools/node_modules/@babel/core/node_modules/lodash/takeRight.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/takeRight.js rename to tools/node_modules/@babel/core/node_modules/lodash/takeRight.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/takeRightWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/takeRightWhile.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/takeRightWhile.js rename to tools/node_modules/@babel/core/node_modules/lodash/takeRightWhile.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/takeWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/takeWhile.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/takeWhile.js rename to tools/node_modules/@babel/core/node_modules/lodash/takeWhile.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/tap.js b/tools/node_modules/@babel/core/node_modules/lodash/tap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/tap.js rename to tools/node_modules/@babel/core/node_modules/lodash/tap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/template.js b/tools/node_modules/@babel/core/node_modules/lodash/template.js similarity index 96% rename from tools/node_modules/babel-eslint/node_modules/lodash/template.js rename to tools/node_modules/@babel/core/node_modules/lodash/template.js index f71d13024982f0..1556a099afe4e4 100644 --- a/tools/node_modules/babel-eslint/node_modules/lodash/template.js +++ b/tools/node_modules/@babel/core/node_modules/lodash/template.js @@ -169,11 +169,11 @@ function template(string, options, guard) { // Use a sourceURL for easier debugging. // The sourceURL gets injected into the source that's eval-ed, so be careful - // with lookup (in case of e.g. prototype pollution), and strip newlines if any. - // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in + // and escape the comment, thus injecting code that gets evaled. var sourceURL = hasOwnProperty.call(options, 'sourceURL') ? ('//# sourceURL=' + - (options.sourceURL + '').replace(/[\r\n]/g, ' ') + + (options.sourceURL + '').replace(/\s/g, ' ') + '\n') : ''; @@ -206,8 +206,6 @@ function template(string, options, guard) { // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. - // Like with sourceURL, we take care to not check the option's prototype, - // as this configuration is a code injection vector. var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/templateSettings.js b/tools/node_modules/@babel/core/node_modules/lodash/templateSettings.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/templateSettings.js rename to tools/node_modules/@babel/core/node_modules/lodash/templateSettings.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/throttle.js b/tools/node_modules/@babel/core/node_modules/lodash/throttle.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/throttle.js rename to tools/node_modules/@babel/core/node_modules/lodash/throttle.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/thru.js b/tools/node_modules/@babel/core/node_modules/lodash/thru.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/thru.js rename to tools/node_modules/@babel/core/node_modules/lodash/thru.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/times.js b/tools/node_modules/@babel/core/node_modules/lodash/times.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/times.js rename to tools/node_modules/@babel/core/node_modules/lodash/times.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toArray.js b/tools/node_modules/@babel/core/node_modules/lodash/toArray.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toArray.js rename to tools/node_modules/@babel/core/node_modules/lodash/toArray.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toFinite.js b/tools/node_modules/@babel/core/node_modules/lodash/toFinite.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toFinite.js rename to tools/node_modules/@babel/core/node_modules/lodash/toFinite.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/toInteger.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toInteger.js rename to tools/node_modules/@babel/core/node_modules/lodash/toInteger.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toIterator.js b/tools/node_modules/@babel/core/node_modules/lodash/toIterator.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toIterator.js rename to tools/node_modules/@babel/core/node_modules/lodash/toIterator.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toJSON.js b/tools/node_modules/@babel/core/node_modules/lodash/toJSON.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toJSON.js rename to tools/node_modules/@babel/core/node_modules/lodash/toJSON.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toLength.js b/tools/node_modules/@babel/core/node_modules/lodash/toLength.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toLength.js rename to tools/node_modules/@babel/core/node_modules/lodash/toLength.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toLower.js b/tools/node_modules/@babel/core/node_modules/lodash/toLower.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toLower.js rename to tools/node_modules/@babel/core/node_modules/lodash/toLower.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toNumber.js b/tools/node_modules/@babel/core/node_modules/lodash/toNumber.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toNumber.js rename to tools/node_modules/@babel/core/node_modules/lodash/toNumber.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/toPairs.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toPairs.js rename to tools/node_modules/@babel/core/node_modules/lodash/toPairs.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toPairsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/toPairsIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toPairsIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/toPairsIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toPath.js b/tools/node_modules/@babel/core/node_modules/lodash/toPath.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toPath.js rename to tools/node_modules/@babel/core/node_modules/lodash/toPath.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toPlainObject.js b/tools/node_modules/@babel/core/node_modules/lodash/toPlainObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toPlainObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/toPlainObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toSafeInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/toSafeInteger.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toSafeInteger.js rename to tools/node_modules/@babel/core/node_modules/lodash/toSafeInteger.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toString.js b/tools/node_modules/@babel/core/node_modules/lodash/toString.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toString.js rename to tools/node_modules/@babel/core/node_modules/lodash/toString.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toUpper.js b/tools/node_modules/@babel/core/node_modules/lodash/toUpper.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/toUpper.js rename to tools/node_modules/@babel/core/node_modules/lodash/toUpper.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/transform.js b/tools/node_modules/@babel/core/node_modules/lodash/transform.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/transform.js rename to tools/node_modules/@babel/core/node_modules/lodash/transform.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/trim.js b/tools/node_modules/@babel/core/node_modules/lodash/trim.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/trim.js rename to tools/node_modules/@babel/core/node_modules/lodash/trim.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/trimEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/trimEnd.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/trimEnd.js rename to tools/node_modules/@babel/core/node_modules/lodash/trimEnd.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/trimStart.js b/tools/node_modules/@babel/core/node_modules/lodash/trimStart.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/trimStart.js rename to tools/node_modules/@babel/core/node_modules/lodash/trimStart.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/truncate.js b/tools/node_modules/@babel/core/node_modules/lodash/truncate.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/truncate.js rename to tools/node_modules/@babel/core/node_modules/lodash/truncate.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unary.js b/tools/node_modules/@babel/core/node_modules/lodash/unary.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/unary.js rename to tools/node_modules/@babel/core/node_modules/lodash/unary.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unescape.js b/tools/node_modules/@babel/core/node_modules/lodash/unescape.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/unescape.js rename to tools/node_modules/@babel/core/node_modules/lodash/unescape.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/union.js b/tools/node_modules/@babel/core/node_modules/lodash/union.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/union.js rename to tools/node_modules/@babel/core/node_modules/lodash/union.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unionBy.js b/tools/node_modules/@babel/core/node_modules/lodash/unionBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/unionBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/unionBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unionWith.js b/tools/node_modules/@babel/core/node_modules/lodash/unionWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/unionWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/unionWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/uniq.js b/tools/node_modules/@babel/core/node_modules/lodash/uniq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/uniq.js rename to tools/node_modules/@babel/core/node_modules/lodash/uniq.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/uniqBy.js b/tools/node_modules/@babel/core/node_modules/lodash/uniqBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/uniqBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/uniqBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/uniqWith.js b/tools/node_modules/@babel/core/node_modules/lodash/uniqWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/uniqWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/uniqWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/uniqueId.js b/tools/node_modules/@babel/core/node_modules/lodash/uniqueId.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/uniqueId.js rename to tools/node_modules/@babel/core/node_modules/lodash/uniqueId.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unset.js b/tools/node_modules/@babel/core/node_modules/lodash/unset.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/unset.js rename to tools/node_modules/@babel/core/node_modules/lodash/unset.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unzip.js b/tools/node_modules/@babel/core/node_modules/lodash/unzip.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/unzip.js rename to tools/node_modules/@babel/core/node_modules/lodash/unzip.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unzipWith.js b/tools/node_modules/@babel/core/node_modules/lodash/unzipWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/unzipWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/unzipWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/update.js b/tools/node_modules/@babel/core/node_modules/lodash/update.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/update.js rename to tools/node_modules/@babel/core/node_modules/lodash/update.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/updateWith.js b/tools/node_modules/@babel/core/node_modules/lodash/updateWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/updateWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/updateWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/upperCase.js b/tools/node_modules/@babel/core/node_modules/lodash/upperCase.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/upperCase.js rename to tools/node_modules/@babel/core/node_modules/lodash/upperCase.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/upperFirst.js b/tools/node_modules/@babel/core/node_modules/lodash/upperFirst.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/upperFirst.js rename to tools/node_modules/@babel/core/node_modules/lodash/upperFirst.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/util.js b/tools/node_modules/@babel/core/node_modules/lodash/util.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/util.js rename to tools/node_modules/@babel/core/node_modules/lodash/util.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/value.js b/tools/node_modules/@babel/core/node_modules/lodash/value.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/value.js rename to tools/node_modules/@babel/core/node_modules/lodash/value.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/valueOf.js b/tools/node_modules/@babel/core/node_modules/lodash/valueOf.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/valueOf.js rename to tools/node_modules/@babel/core/node_modules/lodash/valueOf.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/values.js b/tools/node_modules/@babel/core/node_modules/lodash/values.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/values.js rename to tools/node_modules/@babel/core/node_modules/lodash/values.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/valuesIn.js b/tools/node_modules/@babel/core/node_modules/lodash/valuesIn.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/valuesIn.js rename to tools/node_modules/@babel/core/node_modules/lodash/valuesIn.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/without.js b/tools/node_modules/@babel/core/node_modules/lodash/without.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/without.js rename to tools/node_modules/@babel/core/node_modules/lodash/without.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/words.js b/tools/node_modules/@babel/core/node_modules/lodash/words.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/words.js rename to tools/node_modules/@babel/core/node_modules/lodash/words.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrap.js b/tools/node_modules/@babel/core/node_modules/lodash/wrap.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/wrap.js rename to tools/node_modules/@babel/core/node_modules/lodash/wrap.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperAt.js b/tools/node_modules/@babel/core/node_modules/lodash/wrapperAt.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/wrapperAt.js rename to tools/node_modules/@babel/core/node_modules/lodash/wrapperAt.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperChain.js b/tools/node_modules/@babel/core/node_modules/lodash/wrapperChain.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/wrapperChain.js rename to tools/node_modules/@babel/core/node_modules/lodash/wrapperChain.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperLodash.js b/tools/node_modules/@babel/core/node_modules/lodash/wrapperLodash.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/wrapperLodash.js rename to tools/node_modules/@babel/core/node_modules/lodash/wrapperLodash.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperReverse.js b/tools/node_modules/@babel/core/node_modules/lodash/wrapperReverse.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/wrapperReverse.js rename to tools/node_modules/@babel/core/node_modules/lodash/wrapperReverse.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperValue.js b/tools/node_modules/@babel/core/node_modules/lodash/wrapperValue.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/wrapperValue.js rename to tools/node_modules/@babel/core/node_modules/lodash/wrapperValue.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/xor.js b/tools/node_modules/@babel/core/node_modules/lodash/xor.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/xor.js rename to tools/node_modules/@babel/core/node_modules/lodash/xor.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/xorBy.js b/tools/node_modules/@babel/core/node_modules/lodash/xorBy.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/xorBy.js rename to tools/node_modules/@babel/core/node_modules/lodash/xorBy.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/xorWith.js b/tools/node_modules/@babel/core/node_modules/lodash/xorWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/xorWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/xorWith.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/zip.js b/tools/node_modules/@babel/core/node_modules/lodash/zip.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/zip.js rename to tools/node_modules/@babel/core/node_modules/lodash/zip.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/zipObject.js b/tools/node_modules/@babel/core/node_modules/lodash/zipObject.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/zipObject.js rename to tools/node_modules/@babel/core/node_modules/lodash/zipObject.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/zipObjectDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/zipObjectDeep.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/zipObjectDeep.js rename to tools/node_modules/@babel/core/node_modules/lodash/zipObjectDeep.js diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/zipWith.js b/tools/node_modules/@babel/core/node_modules/lodash/zipWith.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/lodash/zipWith.js rename to tools/node_modules/@babel/core/node_modules/lodash/zipWith.js diff --git a/tools/node_modules/eslint/node_modules/minimist/LICENSE b/tools/node_modules/@babel/core/node_modules/minimist/LICENSE similarity index 100% rename from tools/node_modules/eslint/node_modules/minimist/LICENSE rename to tools/node_modules/@babel/core/node_modules/minimist/LICENSE diff --git a/tools/node_modules/eslint/node_modules/minimist/index.js b/tools/node_modules/@babel/core/node_modules/minimist/index.js similarity index 100% rename from tools/node_modules/eslint/node_modules/minimist/index.js rename to tools/node_modules/@babel/core/node_modules/minimist/index.js diff --git a/tools/node_modules/@babel/core/node_modules/minimist/package.json b/tools/node_modules/@babel/core/node_modules/minimist/package.json new file mode 100644 index 00000000000000..c091d41375f9aa --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/minimist/package.json @@ -0,0 +1,45 @@ +{ + "name": "minimist", + "version": "1.2.5", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "covert": "^1.0.0", + "tap": "~0.4.0", + "tape": "^3.5.0" + }, + "scripts": { + "test": "tap test/*.js", + "coverage": "covert test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "ff/5", + "firefox/latest", + "chrome/10", + "chrome/latest", + "safari/5.1", + "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT" +} diff --git a/tools/node_modules/eslint/node_modules/minimist/readme.markdown b/tools/node_modules/@babel/core/node_modules/minimist/readme.markdown similarity index 100% rename from tools/node_modules/eslint/node_modules/minimist/readme.markdown rename to tools/node_modules/@babel/core/node_modules/minimist/readme.markdown diff --git a/tools/node_modules/@babel/core/node_modules/ms/index.js b/tools/node_modules/@babel/core/node_modules/ms/index.js new file mode 100644 index 00000000000000..c4498bcc212589 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/ms/index.js @@ -0,0 +1,162 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} diff --git a/tools/node_modules/@babel/core/node_modules/ms/license.md b/tools/node_modules/@babel/core/node_modules/ms/license.md new file mode 100644 index 00000000000000..69b61253a38926 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/node_modules/@babel/core/node_modules/ms/package.json b/tools/node_modules/@babel/core/node_modules/ms/package.json new file mode 100644 index 00000000000000..eea666e1fb03d6 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.1.2", + "description": "Tiny millisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "4.12.1", + "expect.js": "0.3.1", + "husky": "0.14.3", + "lint-staged": "5.0.0", + "mocha": "4.0.1" + } +} diff --git a/tools/node_modules/@babel/core/node_modules/ms/readme.md b/tools/node_modules/@babel/core/node_modules/ms/readme.md new file mode 100644 index 00000000000000..9a1996b17e0de6 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/ms/readme.md @@ -0,0 +1,60 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +ms('-3 days') // -259200000 +ms('-1h') // -3600000 +ms('-200') // -200 +``` + +### Convert from Milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(-3 * 60000) // "-3m" +ms(ms('10 hours')) // "10h" +``` + +### Time Format Written-Out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(-3 * 60000, { long: true }) // "-3 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [Node.js](https://nodejs.org) and in the browser +- If a number is supplied to `ms`, a string with a unit is returned +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) +- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned + +## Related Packages + +- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. + +## Caught a Bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/tools/node_modules/babel-eslint/node_modules/path-parse/LICENSE b/tools/node_modules/@babel/core/node_modules/path-parse/LICENSE similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/path-parse/LICENSE rename to tools/node_modules/@babel/core/node_modules/path-parse/LICENSE diff --git a/tools/node_modules/babel-eslint/node_modules/path-parse/README.md b/tools/node_modules/@babel/core/node_modules/path-parse/README.md similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/path-parse/README.md rename to tools/node_modules/@babel/core/node_modules/path-parse/README.md diff --git a/tools/node_modules/babel-eslint/node_modules/path-parse/index.js b/tools/node_modules/@babel/core/node_modules/path-parse/index.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/path-parse/index.js rename to tools/node_modules/@babel/core/node_modules/path-parse/index.js diff --git a/tools/node_modules/@babel/core/node_modules/path-parse/package.json b/tools/node_modules/@babel/core/node_modules/path-parse/package.json new file mode 100644 index 00000000000000..21332bb14f8b7f --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/path-parse/package.json @@ -0,0 +1,33 @@ +{ + "name": "path-parse", + "version": "1.0.6", + "description": "Node.js path.parse() ponyfill", + "main": "index.js", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/jbgutierrez/path-parse.git" + }, + "keywords": [ + "path", + "paths", + "file", + "dir", + "parse", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim" + ], + "author": "Javier Blanco ", + "license": "MIT", + "bugs": { + "url": "https://github.com/jbgutierrez/path-parse/issues" + }, + "homepage": "https://github.com/jbgutierrez/path-parse#readme" +} diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/LICENSE b/tools/node_modules/@babel/core/node_modules/resolve/LICENSE similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/resolve/LICENSE rename to tools/node_modules/@babel/core/node_modules/resolve/LICENSE diff --git a/tools/node_modules/@babel/core/node_modules/resolve/index.js b/tools/node_modules/@babel/core/node_modules/resolve/index.js new file mode 100644 index 00000000000000..125d8146423596 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/resolve/index.js @@ -0,0 +1,6 @@ +var async = require('./lib/async'); +async.core = require('./lib/core'); +async.isCore = require('./lib/is-core'); +async.sync = require('./lib/sync'); + +module.exports = async; diff --git a/tools/node_modules/@babel/core/node_modules/resolve/lib/async.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/async.js new file mode 100644 index 00000000000000..29285079451b15 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/async.js @@ -0,0 +1,299 @@ +var fs = require('fs'); +var path = require('path'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); +var isCore = require('is-core-module'); + +var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + +var defaultIsFile = function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultIsDir = function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultRealpath = function realpath(x, cb) { + realpathFS(x, function (realpathErr, realPath) { + if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr); + else cb(null, realpathErr ? x : realPath); + }); +}; + +var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) { + if (opts && opts.preserveSymlinks === false) { + realpath(x, cb); + } else { + cb(null, x); + } +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolve(x, options, callback) { + var cb = callback; + var opts = options; + if (typeof options === 'function') { + cb = opts; + opts = {}; + } + if (typeof x !== 'string') { + var err = new TypeError('Path must be a string.'); + return process.nextTick(function () { + cb(err); + }); + } + + opts = normalizeOptions(x, opts); + + var isFile = opts.isFile || defaultIsFile; + var isDirectory = opts.isDirectory || defaultIsDir; + var readFile = opts.readFile || fs.readFile; + var realpath = opts.realpath || defaultRealpath; + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || []; + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = path.resolve(basedir); + + maybeRealpath( + realpath, + absoluteStart, + opts, + function (err, realStart) { + if (err) cb(err); + else init(realStart); + } + ); + + var res; + function init(basedir) { + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + res = path.resolve(basedir, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + if ((/\/$/).test(x) && res === basedir) { + loadAsDirectory(res, opts.package, onfile); + } else loadAsFile(res, opts.package, onfile); + } else if (includeCoreModules && isCore(x)) { + return cb(null, x); + } else loadNodeModules(x, basedir, function (err, n, pkg) { + if (err) cb(err); + else if (n) { + return maybeRealpath(realpath, n, opts, function (err, realN) { + if (err) { + cb(err); + } else { + cb(null, realN, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function onfile(err, m, pkg) { + if (err) cb(err); + else if (m) cb(null, m, pkg); + else loadAsDirectory(res, function (err, d, pkg) { + if (err) cb(err); + else if (d) { + maybeRealpath(realpath, d, opts, function (err, realD) { + if (err) { + cb(err); + } else { + cb(null, realD, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function loadAsFile(x, thePackage, callback) { + var loadAsFilePackage = thePackage; + var cb = callback; + if (typeof loadAsFilePackage === 'function') { + cb = loadAsFilePackage; + loadAsFilePackage = undefined; + } + + var exts = [''].concat(extensions); + load(exts, x, loadAsFilePackage); + + function load(exts, x, loadPackage) { + if (exts.length === 0) return cb(null, undefined, loadPackage); + var file = x + exts[0]; + + var pkg = loadPackage; + if (pkg) onpkg(null, pkg); + else loadpkg(path.dirname(file), onpkg); + + function onpkg(err, pkg_, dir) { + pkg = pkg_; + if (err) return cb(err); + if (dir && pkg && opts.pathFilter) { + var rfile = path.relative(dir, file); + var rel = rfile.slice(0, rfile.length - exts[0].length); + var r = opts.pathFilter(pkg, x, rel); + if (r) return load( + [''].concat(extensions.slice()), + path.resolve(dir, r), + pkg + ); + } + isFile(file, onex); + } + function onex(err, ex) { + if (err) return cb(err); + if (ex) return cb(null, file, pkg); + load(exts.slice(1), x, pkg); + } + } + } + + function loadpkg(dir, cb) { + if (dir === '' || dir === '/') return cb(null); + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return cb(null); + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null); + + maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return loadpkg(path.dirname(dir), cb); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + // on err, ex is false + if (!ex) return loadpkg(path.dirname(dir), cb); + + readFile(pkgfile, function (err, body) { + if (err) cb(err); + try { var pkg = JSON.parse(body); } catch (jsonErr) {} + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + cb(null, pkg, dir); + }); + }); + }); + } + + function loadAsDirectory(x, loadAsDirectoryPackage, callback) { + var cb = callback; + var fpkg = loadAsDirectoryPackage; + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return cb(unwrapErr); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); + + readFile(pkgfile, function (err, body) { + if (err) return cb(err); + try { + var pkg = JSON.parse(body); + } catch (jsonErr) {} + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + return cb(mainError); + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); + + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, 'index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + }); + } + + function processDirs(cb, dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + + isDirectory(path.dirname(dir), isdir); + + function isdir(err, isdir) { + if (err) return cb(err); + if (!isdir) return processDirs(cb, dirs.slice(1)); + loadAsFile(dir, opts.package, onfile); + } + + function onfile(err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(dir, opts.package, ondir); + } + + function ondir(err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + processDirs(cb, dirs.slice(1)); + } + } + function loadNodeModules(x, start, cb) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + processDirs( + cb, + packageIterator ? packageIterator(x, start, thunk, opts) : thunk() + ); + } +}; diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/caller.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/caller.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/resolve/lib/caller.js rename to tools/node_modules/@babel/core/node_modules/resolve/lib/caller.js diff --git a/tools/node_modules/@babel/core/node_modules/resolve/lib/core.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/core.js new file mode 100644 index 00000000000000..c417d23c5a8ff7 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/core.js @@ -0,0 +1,53 @@ +var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; + +function specifierIncluded(specifier) { + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = parseInt(current[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } else if (op === '>=') { + return cur >= ver; + } else { + return false; + } + } + return op === '>='; +} + +function matchesRange(range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { return false; } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(specifiers[i])) { return false; } + } + return true; +} + +function versionIncluded(specifierValue) { + if (typeof specifierValue === 'boolean') { return specifierValue; } + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(specifierValue[i])) { return true; } + } + return false; + } + return matchesRange(specifierValue); +} + +var data = require('./core.json'); + +var core = {}; +for (var mod in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core[mod] = versionIncluded(data[mod]); + } +} +module.exports = core; diff --git a/tools/node_modules/@babel/core/node_modules/resolve/lib/core.json b/tools/node_modules/@babel/core/node_modules/resolve/lib/core.json new file mode 100644 index 00000000000000..226198f89b5ef0 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/core.json @@ -0,0 +1,80 @@ +{ + "assert": true, + "assert/strict": ">= 15", + "async_hooks": ">= 8", + "buffer_ieee754": "< 0.9.7", + "buffer": true, + "child_process": true, + "cluster": true, + "console": true, + "constants": true, + "crypto": true, + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "diagnostics_channel": ">= 15.1", + "dns": true, + "dns/promises": ">= 15", + "domain": ">= 0.7.12", + "events": true, + "freelist": "< 6", + "fs": true, + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "_http_agent": ">= 0.11.1", + "_http_client": ">= 0.11.1", + "_http_common": ">= 0.11.1", + "_http_incoming": ">= 0.11.1", + "_http_outgoing": ">= 0.11.1", + "_http_server": ">= 0.11.1", + "http": true, + "http2": ">= 8.8", + "https": true, + "inspector": ">= 8.0.0", + "_linklist": "< 8", + "module": true, + "net": true, + "node-inspect/lib/_inspect": ">= 7.6.0 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12", + "os": true, + "path": true, + "perf_hooks": ">= 8.5", + "process": ">= 1", + "punycode": true, + "querystring": true, + "readline": true, + "repl": true, + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "_stream_transform": ">= 0.9.4", + "_stream_wrap": ">= 1.4.1", + "_stream_passthrough": ">= 0.9.4", + "_stream_readable": ">= 0.9.4", + "_stream_writable": ">= 0.9.4", + "stream": true, + "stream/promises": ">= 15", + "string_decoder": true, + "sys": [">= 0.6 && < 0.7", ">= 0.8"], + "timers": true, + "timers/promises": ">= 15", + "_tls_common": ">= 0.11.13", + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "tls": true, + "trace_events": ">= 10", + "tty": true, + "url": true, + "util": true, + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8": ">= 1", + "vm": true, + "wasi": ">= 13.4 && < 13.5", + "worker_threads": ">= 11.7", + "zlib": true +} diff --git a/tools/node_modules/@babel/core/node_modules/resolve/lib/is-core.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/is-core.js new file mode 100644 index 00000000000000..537f5c782ffe55 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/is-core.js @@ -0,0 +1,5 @@ +var isCoreModule = require('is-core-module'); + +module.exports = function isCore(x) { + return isCoreModule(x); +}; diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/node-modules-paths.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/node-modules-paths.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/resolve/lib/node-modules-paths.js rename to tools/node_modules/@babel/core/node_modules/resolve/lib/node-modules-paths.js diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/normalize-options.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/normalize-options.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/resolve/lib/normalize-options.js rename to tools/node_modules/@babel/core/node_modules/resolve/lib/normalize-options.js diff --git a/tools/node_modules/@babel/core/node_modules/resolve/lib/sync.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/sync.js new file mode 100644 index 00000000000000..d5308c926e498b --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/sync.js @@ -0,0 +1,192 @@ +var isCore = require('is-core-module'); +var fs = require('fs'); +var path = require('path'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); + +var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + +var defaultIsFile = function isFile(file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isFile() || stat.isFIFO(); +}; + +var defaultIsDir = function isDirectory(dir) { + try { + var stat = fs.statSync(dir); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isDirectory(); +}; + +var defaultRealpathSync = function realpathSync(x) { + try { + return realpathFS(x); + } catch (realpathErr) { + if (realpathErr.code !== 'ENOENT') { + throw realpathErr; + } + } + return x; +}; + +var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) { + if (opts && opts.preserveSymlinks === false) { + return realpathSync(x); + } + return x; +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolveSync(x, options) { + if (typeof x !== 'string') { + throw new TypeError('Path must be a string.'); + } + var opts = normalizeOptions(x, options); + + var isFile = opts.isFile || defaultIsFile; + var readFileSync = opts.readFileSync || fs.readFileSync; + var isDirectory = opts.isDirectory || defaultIsDir; + var realpathSync = opts.realpathSync || defaultRealpathSync; + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || []; + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts); + + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + var res = path.resolve(absoluteStart, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); + if (m) return maybeRealpathSync(realpathSync, m, opts); + } else if (includeCoreModules && isCore(x)) { + return x; + } else { + var n = loadNodeModulesSync(x, absoluteStart); + if (n) return maybeRealpathSync(realpathSync, n, opts); + } + + var err = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + + function loadAsFileSync(x) { + var pkg = loadpkg(path.dirname(x)); + + if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) { + var rfile = path.relative(pkg.dir, x); + var r = opts.pathFilter(pkg.pkg, x, rfile); + if (r) { + x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign + } + } + + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + if (isFile(file)) { + return file; + } + } + } + + function loadpkg(dir) { + if (dir === '' || dir === '/') return; + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return; + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return; + + var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json'); + + if (!isFile(pkgfile)) { + return loadpkg(path.dirname(dir)); + } + + var body = readFileSync(pkgfile); + + try { + var pkg = JSON.parse(body); + } catch (jsonErr) {} + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment + } + + return { pkg: pkg, dir: dir }; + } + + function loadAsDirectorySync(x) { + var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json'); + if (isFile(pkgfile)) { + try { + var body = readFileSync(pkgfile, 'UTF8'); + var pkg = JSON.parse(body); + } catch (e) {} + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + throw mainError; + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + try { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } catch (e) {} + } + } + + return loadAsFileSync(path.join(x, '/index')); + } + + function loadNodeModulesSync(x, start) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk(); + + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + if (isDirectory(path.dirname(dir))) { + var m = loadAsFileSync(dir); + if (m) return m; + var n = loadAsDirectorySync(dir); + if (n) return n; + } + } + } +}; diff --git a/tools/node_modules/@babel/core/node_modules/resolve/package.json b/tools/node_modules/@babel/core/node_modules/resolve/package.json new file mode 100644 index 00000000000000..dfcfc497b34eaf --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/resolve/package.json @@ -0,0 +1,51 @@ +{ + "name": "resolve", + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", + "version": "1.19.0", + "repository": { + "type": "git", + "url": "git://github.com/browserify/resolve.git" + }, + "main": "index.js", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "scripts": { + "prepublish": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/", + "prelint": "eclint check '**/*'", + "lint": "eslint --ext=js,mjs .", + "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", + "tests-only": "tape test/*.js", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "posttest": "npm run test:multirepo && aud --production", + "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.2.0", + "array.prototype.map": "^1.0.2", + "aud": "^1.1.3", + "eclint": "^2.8.1", + "eslint": "^7.13.0", + "object-keys": "^1.1.1", + "safe-publish-latest": "^1.1.4", + "tap": "0.4.13", + "tape": "^5.0.1" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "dependencies": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } +} diff --git a/tools/node_modules/@babel/core/node_modules/resolve/readme.markdown b/tools/node_modules/@babel/core/node_modules/resolve/readme.markdown new file mode 100644 index 00000000000000..f742c38dd48df8 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/resolve/readme.markdown @@ -0,0 +1,250 @@ +# resolve + +implements the [node `require.resolve()` +algorithm](https://nodejs.org/api/modules.html#modules_all_together) +such that you can `require.resolve()` on behalf of a file asynchronously and +synchronously + +[![build status](https://secure.travis-ci.org/browserify/resolve.png)](http://travis-ci.org/browserify/resolve) + +# example + +asynchronously resolve: + +```js +var resolve = require('resolve'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); +``` + +``` +$ node example/async.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +synchronously resolve: + +```js +var resolve = require('resolve'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); +``` + +``` +$ node example/sync.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +# methods + +```js +var resolve = require('resolve'); +``` + +For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values: + +- `MODULE_NOT_FOUND`: the given path string (`id`) could not be resolved to a module +- `INVALID_BASEDIR`: the specified `opts.basedir` doesn't exist, or is not a directory +- `INVALID_PACKAGE_MAIN`: a `package.json` was encountered with an invalid `main` property (eg. not a string) + +## resolve(id, opts={}, cb) + +Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.package - `package.json` data applicable to the module being loaded + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFile - how to read files asynchronously + +* opts.isFile - function to asynchronously test whether a file exists + +* opts.isDirectory - function to asynchronously test whether a directory exists + +* opts.realpath - function to asynchronously resolve a potential symlink to its real path + +* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * pkgfile - path to package.json + * dir - directory for package.json + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFile: fs.readFile, + isFile: function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + isDirectory: function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + realpath: function realpath(file, cb) { + var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + realpath(file, function (realPathErr, realPath) { + if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr); + else cb(null, realPathErr ? file : realPath); + }); + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +## resolve.sync(id, opts) + +Synchronously resolve the module path string `id`, returning the result and +throwing an error when `id` can't be resolved. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFile - how to read files synchronously + +* opts.isFile - function to synchronously test whether a file exists + +* opts.isDirectory - function to synchronously test whether a directory exists + +* opts.realpathSync - function to synchronously resolve a potential symlink to its real path + +* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * dir - directory for package.json (Note: the second argument will change to "pkgfile" in v2) + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFileSync: fs.readFileSync, + isFile: function isFile(file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isFile() || stat.isFIFO(); + }, + isDirectory: function isDirectory(dir) { + try { + var stat = fs.statSync(dir); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isDirectory(); + }, + realpathSync: function realpathSync(file) { + try { + var realpath = typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + return realpath(file); + } catch (realPathErr) { + if (realPathErr.code !== 'ENOENT') { + throw realPathErr; + } + } + return file; + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +# install + +With [npm](https://npmjs.org) do: + +```sh +npm install resolve +``` + +# license + +MIT diff --git a/tools/node_modules/@babel/core/node_modules/safe-buffer/LICENSE b/tools/node_modules/@babel/core/node_modules/safe-buffer/LICENSE new file mode 100644 index 00000000000000..0c068ceecbd48f --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/safe-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tools/node_modules/@babel/core/node_modules/safe-buffer/README.md b/tools/node_modules/@babel/core/node_modules/safe-buffer/README.md new file mode 100644 index 00000000000000..e9a81afd0406f0 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/safe-buffer/README.md @@ -0,0 +1,584 @@ +# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/safe-buffer +[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg +[npm-url]: https://npmjs.org/package/safe-buffer +[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg +[downloads-url]: https://npmjs.org/package/safe-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Safer Node.js Buffer API + +**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, +`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** + +**Uses the built-in implementation when available.** + +## install + +``` +npm install safe-buffer +``` + +## usage + +The goal of this package is to provide a safe replacement for the node.js `Buffer`. + +It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to +the top of your node.js modules: + +```js +var Buffer = require('safe-buffer').Buffer + +// Existing buffer code will continue to work without issues: + +new Buffer('hey', 'utf8') +new Buffer([1, 2, 3], 'utf8') +new Buffer(obj) +new Buffer(16) // create an uninitialized buffer (potentially unsafe) + +// But you can use these new explicit APIs to make clear what you want: + +Buffer.from('hey', 'utf8') // convert from many types to a Buffer +Buffer.alloc(16) // create a zero-filled buffer (safe) +Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) +``` + +## api + +### Class Method: Buffer.from(array) + + +* `array` {Array} + +Allocates a new `Buffer` using an `array` of octets. + +```js +const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); + // creates a new Buffer containing ASCII bytes + // ['b','u','f','f','e','r'] +``` + +A `TypeError` will be thrown if `array` is not an `Array`. + +### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) + + +* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or + a `new ArrayBuffer()` +* `byteOffset` {Number} Default: `0` +* `length` {Number} Default: `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a `TypedArray` instance, +the newly created `Buffer` will share the same allocated memory as the +TypedArray. + +```js +const arr = new Uint16Array(2); +arr[0] = 5000; +arr[1] = 4000; + +const buf = Buffer.from(arr.buffer); // shares the memory with arr; + +console.log(buf); + // Prints: + +// changing the TypedArray changes the Buffer also +arr[1] = 6000; + +console.log(buf); + // Prints: +``` + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +```js +const ab = new ArrayBuffer(10); +const buf = Buffer.from(ab, 0, 2); +console.log(buf.length); + // Prints: 2 +``` + +A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. + +### Class Method: Buffer.from(buffer) + + +* `buffer` {Buffer} + +Copies the passed `buffer` data onto a new `Buffer` instance. + +```js +const buf1 = Buffer.from('buffer'); +const buf2 = Buffer.from(buf1); + +buf1[0] = 0x61; +console.log(buf1.toString()); + // 'auffer' +console.log(buf2.toString()); + // 'buffer' (copy is not changed) +``` + +A `TypeError` will be thrown if `buffer` is not a `Buffer`. + +### Class Method: Buffer.from(str[, encoding]) + + +* `str` {String} String to encode. +* `encoding` {String} Encoding to use, Default: `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `str`. If +provided, the `encoding` parameter identifies the character encoding. +If not provided, `encoding` defaults to `'utf8'`. + +```js +const buf1 = Buffer.from('this is a tést'); +console.log(buf1.toString()); + // prints: this is a tést +console.log(buf1.toString('ascii')); + // prints: this is a tC)st + +const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); +console.log(buf2.toString()); + // prints: this is a tést +``` + +A `TypeError` will be thrown if `str` is not a string. + +### Class Method: Buffer.alloc(size[, fill[, encoding]]) + + +* `size` {Number} +* `fill` {Value} Default: `undefined` +* `encoding` {String} Default: `utf8` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the +`Buffer` will be *zero-filled*. + +```js +const buf = Buffer.alloc(5); +console.log(buf); + // +``` + +The `size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +If `fill` is specified, the allocated `Buffer` will be initialized by calling +`buf.fill(fill)`. See [`buf.fill()`][] for more information. + +```js +const buf = Buffer.alloc(5, 'a'); +console.log(buf); + // +``` + +If both `fill` and `encoding` are specified, the allocated `Buffer` will be +initialized by calling `buf.fill(fill, encoding)`. For example: + +```js +const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); +console.log(buf); + // +``` + +Calling `Buffer.alloc(size)` can be significantly slower than the alternative +`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance +contents will *never contain sensitive data*. + +A `TypeError` will be thrown if `size` is not a number. + +### Class Method: Buffer.allocUnsafe(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must +be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit +architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is +thrown. A zero-length Buffer will be created if a `size` less than or equal to +0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +```js +const buf = Buffer.allocUnsafe(5); +console.log(buf); + // + // (octets will be different, every time) +buf.fill(0); +console.log(buf); + // +``` + +A `TypeError` will be thrown if `size` is not a number. + +Note that the `Buffer` module pre-allocates an internal `Buffer` instance of +size `Buffer.poolSize` that is used as a pool for the fast allocation of new +`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated +`new Buffer(size)` constructor) only when `size` is less than or equal to +`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default +value of `Buffer.poolSize` is `8192` but can be modified. + +Use of this pre-allocated internal memory pool is a key difference between +calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. +Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer +pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal +Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The +difference is subtle but can be important when an application requires the +additional performance that `Buffer.allocUnsafe(size)` provides. + +### Class Method: Buffer.allocUnsafeSlow(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The +`size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, +allocations under 4KB are, by default, sliced from a single pre-allocated +`Buffer`. This allows applications to avoid the garbage collection overhead of +creating many individually allocated Buffers. This approach improves both +performance and memory usage by eliminating the need to track and cleanup as +many `Persistent` objects. + +However, in the case where a developer may need to retain a small chunk of +memory from a pool for an indeterminate amount of time, it may be appropriate +to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then +copy out the relevant bits. + +```js +// need to keep around a few small chunks of memory +const store = []; + +socket.on('readable', () => { + const data = socket.read(); + // allocate for retained data + const sb = Buffer.allocUnsafeSlow(10); + // copy the data into the new allocation + data.copy(sb, 0, 0, 10); + store.push(sb); +}); +``` + +Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* +a developer has observed undue memory retention in their applications. + +A `TypeError` will be thrown if `size` is not a number. + +### All the Rest + +The rest of the `Buffer` API is exactly the same as in node.js. +[See the docs](https://nodejs.org/api/buffer.html). + + +## Related links + +- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) +- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) + +## Why is `Buffer` unsafe? + +Today, the node.js `Buffer` constructor is overloaded to handle many different argument +types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), +`ArrayBuffer`, and also `Number`. + +The API is optimized for convenience: you can throw any type at it, and it will try to do +what you want. + +Because the Buffer constructor is so powerful, you often see code like this: + +```js +// Convert UTF-8 strings to hex +function toHex (str) { + return new Buffer(str).toString('hex') +} +``` + +***But what happens if `toHex` is called with a `Number` argument?*** + +### Remote Memory Disclosure + +If an attacker can make your program call the `Buffer` constructor with a `Number` +argument, then they can make it allocate uninitialized memory from the node.js process. +This could potentially disclose TLS private keys, user data, or database passwords. + +When the `Buffer` constructor is passed a `Number` argument, it returns an +**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like +this, you **MUST** overwrite the contents before returning it to the user. + +From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): + +> `new Buffer(size)` +> +> - `size` Number +> +> The underlying memory for `Buffer` instances created in this way is not initialized. +> **The contents of a newly created `Buffer` are unknown and could contain sensitive +> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. + +(Emphasis our own.) + +Whenever the programmer intended to create an uninitialized `Buffer` you often see code +like this: + +```js +var buf = new Buffer(16) + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### Would this ever be a problem in real code? + +Yes. It's surprisingly common to forget to check the type of your variables in a +dynamically-typed language like JavaScript. + +Usually the consequences of assuming the wrong type is that your program crashes with an +uncaught exception. But the failure mode for forgetting to check the type of arguments to +the `Buffer` constructor is more catastrophic. + +Here's an example of a vulnerable service that takes a JSON payload and converts it to +hex: + +```js +// Take a JSON payload {str: "some string"} and convert it to hex +var server = http.createServer(function (req, res) { + var data = '' + req.setEncoding('utf8') + req.on('data', function (chunk) { + data += chunk + }) + req.on('end', function () { + var body = JSON.parse(data) + res.end(new Buffer(body.str).toString('hex')) + }) +}) + +server.listen(8080) +``` + +In this example, an http client just has to send: + +```json +{ + "str": 1000 +} +``` + +and it will get back 1,000 bytes of uninitialized memory from the server. + +This is a very serious bug. It's similar in severity to the +[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process +memory by remote attackers. + + +### Which real-world packages were vulnerable? + +#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) + +[Mathias Buus](https://github.com/mafintosh) and I +([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, +[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow +anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get +them to reveal 20 bytes at a time of uninitialized memory from the node.js process. + +Here's +[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) +that fixed it. We released a new fixed version, created a +[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all +vulnerable versions on npm so users will get a warning to upgrade to a newer version. + +#### [`ws`](https://www.npmjs.com/package/ws) + +That got us wondering if there were other vulnerable packages. Sure enough, within a short +period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the +most popular WebSocket implementation in node.js. + +If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as +expected, then uninitialized server memory would be disclosed to the remote peer. + +These were the vulnerable methods: + +```js +socket.send(number) +socket.ping(number) +socket.pong(number) +``` + +Here's a vulnerable socket server with some echo functionality: + +```js +server.on('connection', function (socket) { + socket.on('message', function (message) { + message = JSON.parse(message) + if (message.type === 'echo') { + socket.send(message.data) // send back the user's message + } + }) +}) +``` + +`socket.send(number)` called on the server, will disclose server memory. + +Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue +was fixed, with a more detailed explanation. Props to +[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the +[Node Security Project disclosure](https://nodesecurity.io/advisories/67). + + +### What's the solution? + +It's important that node.js offers a fast way to get memory otherwise performance-critical +applications would needlessly get a lot slower. + +But we need a better way to *signal our intent* as programmers. **When we want +uninitialized memory, we should request it explicitly.** + +Sensitive functionality should not be packed into a developer-friendly API that loosely +accepts many different types. This type of API encourages the lazy practice of passing +variables in without checking the type very carefully. + +#### A new API: `Buffer.allocUnsafe(number)` + +The functionality of creating buffers with uninitialized memory should be part of another +API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that +frequently gets user input of all sorts of different types passed into it. + +```js +var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### How do we fix node.js core? + +We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as +`semver-major`) which defends against one case: + +```js +var str = 16 +new Buffer(str, 'utf8') +``` + +In this situation, it's implied that the programmer intended the first argument to be a +string, since they passed an encoding as a second argument. Today, node.js will allocate +uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not +what the programmer intended. + +But this is only a partial solution, since if the programmer does `new Buffer(variable)` +(without an `encoding` parameter) there's no way to know what they intended. If `variable` +is sometimes a number, then uninitialized memory will sometimes be returned. + +### What's the real long-term fix? + +We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when +we need uninitialized memory. But that would break 1000s of packages. + +~~We believe the best solution is to:~~ + +~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ + +~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ + +#### Update + +We now support adding three new APIs: + +- `Buffer.from(value)` - convert from any type to a buffer +- `Buffer.alloc(size)` - create a zero-filled buffer +- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size + +This solves the core problem that affected `ws` and `bittorrent-dht` which is +`Buffer(variable)` getting tricked into taking a number argument. + +This way, existing code continues working and the impact on the npm ecosystem will be +minimal. Over time, npm maintainers can migrate performance-critical code to use +`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. + + +### Conclusion + +We think there's a serious design issue with the `Buffer` API as it exists today. It +promotes insecure software by putting high-risk functionality into a convenient API +with friendly "developer ergonomics". + +This wasn't merely a theoretical exercise because we found the issue in some of the +most popular npm packages. + +Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of +`buffer`. + +```js +var Buffer = require('safe-buffer').Buffer +``` + +Eventually, we hope that node.js core can switch to this new, safer behavior. We believe +the impact on the ecosystem would be minimal since it's not a breaking change. +Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while +older, insecure packages would magically become safe from this attack vector. + + +## links + +- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) +- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) +- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) + + +## credit + +The original issues in `bittorrent-dht` +([disclosure](https://nodesecurity.io/advisories/68)) and +`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by +[Mathias Buus](https://github.com/mafintosh) and +[Feross Aboukhadijeh](http://feross.org/). + +Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues +and for his work running the [Node Security Project](https://nodesecurity.io/). + +Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and +auditing the code. + + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/tools/node_modules/@babel/core/node_modules/safe-buffer/index.js b/tools/node_modules/@babel/core/node_modules/safe-buffer/index.js new file mode 100644 index 00000000000000..22438dabbbceef --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/safe-buffer/index.js @@ -0,0 +1,62 @@ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} diff --git a/tools/node_modules/@babel/core/node_modules/safe-buffer/package.json b/tools/node_modules/@babel/core/node_modules/safe-buffer/package.json new file mode 100644 index 00000000000000..623fbc3f6b0c48 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/safe-buffer/package.json @@ -0,0 +1,37 @@ +{ + "name": "safe-buffer", + "description": "Safer Node.js Buffer API", + "version": "5.1.2", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/safe-buffer/issues" + }, + "devDependencies": { + "standard": "*", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/feross/safe-buffer", + "keywords": [ + "buffer", + "buffer allocate", + "node security", + "safe", + "safe-buffer", + "security", + "uninitialized" + ], + "license": "MIT", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/safe-buffer.git" + }, + "scripts": { + "test": "standard && tape test/*.js" + } +} diff --git a/tools/node_modules/@babel/core/node_modules/semver/LICENSE b/tools/node_modules/@babel/core/node_modules/semver/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tools/node_modules/@babel/core/node_modules/semver/README.md b/tools/node_modules/@babel/core/node_modules/semver/README.md new file mode 100644 index 00000000000000..f8dfa5a0df5fc4 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/semver/README.md @@ -0,0 +1,412 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install --save semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/tools/node_modules/@babel/core/node_modules/semver/bin/semver b/tools/node_modules/@babel/core/node_modules/semver/bin/semver new file mode 100755 index 00000000000000..801e77f1303c15 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/semver/bin/semver @@ -0,0 +1,160 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/tools/node_modules/@babel/core/node_modules/semver/package.json b/tools/node_modules/@babel/core/node_modules/semver/package.json new file mode 100644 index 00000000000000..69d2db162c9297 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/semver/package.json @@ -0,0 +1,28 @@ +{ + "name": "semver", + "version": "5.7.1", + "description": "The semantic version parser used by npm.", + "main": "semver.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "devDependencies": { + "tap": "^13.0.0-rc.18" + }, + "license": "ISC", + "repository": "https://github.com/npm/node-semver", + "bin": { + "semver": "./bin/semver" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "tap": { + "check-coverage": true + } +} diff --git a/tools/node_modules/@babel/core/node_modules/semver/range.bnf b/tools/node_modules/@babel/core/node_modules/semver/range.bnf new file mode 100644 index 00000000000000..d4c6ae0d76c9ac --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/tools/node_modules/@babel/core/node_modules/semver/semver.js b/tools/node_modules/@babel/core/node_modules/semver/semver.js new file mode 100644 index 00000000000000..d315d5d68b179e --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/semver/semver.js @@ -0,0 +1,1483 @@ +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var R = 0 + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' + +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' + +src[FULL] = '^' + FULLPLAIN + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' + +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' + +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++ +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' + +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' + +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[LOOSE] : re[FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY) { + return true + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + }) + }) +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[TILDELOOSE] : re[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[CARETLOOSE] : re[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], '') +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(re[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/LICENSE b/tools/node_modules/@babel/core/node_modules/source-map/LICENSE similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/LICENSE rename to tools/node_modules/@babel/core/node_modules/source-map/LICENSE diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/README.md b/tools/node_modules/@babel/core/node_modules/source-map/README.md similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/README.md rename to tools/node_modules/@babel/core/node_modules/source-map/README.md diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.debug.js b/tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.debug.js rename to tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.js b/tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.js rename to tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js b/tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js rename to tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/array-set.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/array-set.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/lib/array-set.js rename to tools/node_modules/@babel/core/node_modules/source-map/lib/array-set.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64-vlq.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/lib/base64-vlq.js rename to tools/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/base64.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/lib/base64.js rename to tools/node_modules/@babel/core/node_modules/source-map/lib/base64.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/binary-search.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/lib/binary-search.js rename to tools/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/mapping-list.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/lib/mapping-list.js rename to tools/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/quick-sort.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/lib/quick-sort.js rename to tools/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-consumer.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-consumer.js rename to tools/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-generator.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-generator.js rename to tools/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-node.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/source-node.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/lib/source-node.js rename to tools/node_modules/@babel/core/node_modules/source-map/lib/source-node.js diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/util.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/util.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/lib/util.js rename to tools/node_modules/@babel/core/node_modules/source-map/lib/util.js diff --git a/tools/node_modules/@babel/core/node_modules/source-map/package.json b/tools/node_modules/@babel/core/node_modules/source-map/package.json new file mode 100644 index 00000000000000..048e3ae86099f8 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/source-map/package.json @@ -0,0 +1,72 @@ +{ + "name": "source-map", + "description": "Generates and consumes source maps", + "version": "0.5.7", + "homepage": "https://github.com/mozilla/source-map", + "author": "Nick Fitzgerald ", + "contributors": [ + "Tobias Koppers ", + "Duncan Beevers ", + "Stephen Crane ", + "Ryan Seddon ", + "Miles Elam ", + "Mihai Bazon ", + "Michael Ficarra ", + "Todd Wolfson ", + "Alexander Solovyov ", + "Felix Gnass ", + "Conrad Irwin ", + "usrbincc ", + "David Glasser ", + "Chase Douglas ", + "Evan Wallace ", + "Heather Arthur ", + "Hugh Kennedy ", + "David Glasser ", + "Simon Lydell ", + "Jmeas Smith ", + "Michael Z Goddard ", + "azu ", + "John Gozde ", + "Adam Kirkton ", + "Chris Montgomery ", + "J. Ryan Stinnett ", + "Jack Herrington ", + "Chris Truter ", + "Daniel Espeset ", + "Jamie Wong ", + "Eddy Bruël ", + "Hawken Rives ", + "Gilad Peleg ", + "djchie ", + "Gary Ye ", + "Nicolas Lalevée " + ], + "repository": { + "type": "git", + "url": "http://github.com/mozilla/source-map.git" + }, + "main": "./source-map.js", + "files": [ + "source-map.js", + "lib/", + "dist/source-map.debug.js", + "dist/source-map.js", + "dist/source-map.min.js", + "dist/source-map.min.js.map" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "typings": "source-map" +} diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/source-map.js b/tools/node_modules/@babel/core/node_modules/source-map/source-map.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/source-map/source-map.js rename to tools/node_modules/@babel/core/node_modules/source-map/source-map.js diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/browser.js b/tools/node_modules/@babel/core/node_modules/supports-color/browser.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/supports-color/browser.js rename to tools/node_modules/@babel/core/node_modules/supports-color/browser.js diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/index.js b/tools/node_modules/@babel/core/node_modules/supports-color/index.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/supports-color/index.js rename to tools/node_modules/@babel/core/node_modules/supports-color/index.js diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/license b/tools/node_modules/@babel/core/node_modules/supports-color/license similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/supports-color/license rename to tools/node_modules/@babel/core/node_modules/supports-color/license diff --git a/tools/node_modules/@babel/core/node_modules/supports-color/package.json b/tools/node_modules/@babel/core/node_modules/supports-color/package.json new file mode 100644 index 00000000000000..ad199f5cdb0436 --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/supports-color/package.json @@ -0,0 +1,53 @@ +{ + "name": "supports-color", + "version": "5.5.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js", + "browser.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect", + "truecolor", + "16m" + ], + "dependencies": { + "has-flag": "^3.0.0" + }, + "devDependencies": { + "ava": "^0.25.0", + "import-fresh": "^2.0.0", + "xo": "^0.20.0" + }, + "browser": "browser.js" +} diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/readme.md b/tools/node_modules/@babel/core/node_modules/supports-color/readme.md similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/supports-color/readme.md rename to tools/node_modules/@babel/core/node_modules/supports-color/readme.md diff --git a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/index.js b/tools/node_modules/@babel/core/node_modules/to-fast-properties/index.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/to-fast-properties/index.js rename to tools/node_modules/@babel/core/node_modules/to-fast-properties/index.js diff --git a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/license b/tools/node_modules/@babel/core/node_modules/to-fast-properties/license similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/to-fast-properties/license rename to tools/node_modules/@babel/core/node_modules/to-fast-properties/license diff --git a/tools/node_modules/@babel/core/node_modules/to-fast-properties/package.json b/tools/node_modules/@babel/core/node_modules/to-fast-properties/package.json new file mode 100644 index 00000000000000..7a64b2ccb13dce --- /dev/null +++ b/tools/node_modules/@babel/core/node_modules/to-fast-properties/package.json @@ -0,0 +1,35 @@ +{ + "name": "to-fast-properties", + "version": "2.0.0", + "description": "Force V8 to use fast properties for an object", + "license": "MIT", + "repository": "sindresorhus/to-fast-properties", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "node --allow-natives-syntax test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "object", + "obj", + "properties", + "props", + "v8", + "optimize", + "fast", + "convert", + "mode" + ], + "devDependencies": { + "ava": "0.0.4" + } +} diff --git a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/readme.md b/tools/node_modules/@babel/core/node_modules/to-fast-properties/readme.md similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/to-fast-properties/readme.md rename to tools/node_modules/@babel/core/node_modules/to-fast-properties/readme.md diff --git a/tools/node_modules/@babel/core/package.json b/tools/node_modules/@babel/core/package.json new file mode 100644 index 00000000000000..5f93e494ea7963 --- /dev/null +++ b/tools/node_modules/@babel/core/package.json @@ -0,0 +1,66 @@ +{ + "name": "@babel/core", + "version": "7.12.9", + "description": "Babel compiler core.", + "main": "lib/index.js", + "author": "Sebastian McKenzie ", + "homepage": "https://babeljs.io/", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-core" + }, + "keywords": [ + "6to5", + "babel", + "classes", + "const", + "es6", + "harmony", + "let", + "modules", + "transpile", + "transpiler", + "var", + "babel-core", + "compiler" + ], + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + }, + "browser": { + "./lib/config/files/index.js": "./lib/config/files/index-browser.js", + "./lib/transform-file.js": "./lib/transform-file-browser.js", + "./src/config/files/index.js": "./src/config/files/index-browser.js", + "./src/transform-file.js": "./src/transform-file-browser.js" + }, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "devDependencies": { + "@babel/helper-transform-fixture-test-runner": "7.12.1" + } +} \ No newline at end of file diff --git a/tools/node_modules/@babel/core/src/config/files/index-browser.js b/tools/node_modules/@babel/core/src/config/files/index-browser.js new file mode 100644 index 00000000000000..2fb0b6eba1b899 --- /dev/null +++ b/tools/node_modules/@babel/core/src/config/files/index-browser.js @@ -0,0 +1,96 @@ +// @flow + +import type { Handler } from "gensync"; + +import type { + ConfigFile, + IgnoreFile, + RelativeConfig, + FilePackageData, +} from "./types"; + +import type { CallerMetadata } from "../validation/options"; + +export type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData }; + +// eslint-disable-next-line require-yield +export function* findConfigUpwards( + rootDir: string, // eslint-disable-line no-unused-vars +): Handler { + return null; +} + +// eslint-disable-next-line require-yield +export function* findPackageData(filepath: string): Handler { + return { + filepath, + directories: [], + pkg: null, + isPackage: false, + }; +} + +// eslint-disable-next-line require-yield +export function* findRelativeConfig( + pkgData: FilePackageData, // eslint-disable-line no-unused-vars + envName: string, // eslint-disable-line no-unused-vars + caller: CallerMetadata | void, // eslint-disable-line no-unused-vars +): Handler { + return { pkg: null, config: null, ignore: null }; +} + +// eslint-disable-next-line require-yield +export function* findRootConfig( + dirname: string, // eslint-disable-line no-unused-vars + envName: string, // eslint-disable-line no-unused-vars + caller: CallerMetadata | void, // eslint-disable-line no-unused-vars +): Handler { + return null; +} + +// eslint-disable-next-line require-yield +export function* loadConfig( + name: string, + dirname: string, + envName: string, // eslint-disable-line no-unused-vars + caller: CallerMetadata | void, // eslint-disable-line no-unused-vars +): Handler { + throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`); +} + +// eslint-disable-next-line require-yield +export function* resolveShowConfigPath( + dirname: string, // eslint-disable-line no-unused-vars +): Handler { + return null; +} + +export const ROOT_CONFIG_FILENAMES = []; + +// eslint-disable-next-line no-unused-vars +export function resolvePlugin(name: string, dirname: string): string | null { + return null; +} + +// eslint-disable-next-line no-unused-vars +export function resolvePreset(name: string, dirname: string): string | null { + return null; +} + +export function loadPlugin( + name: string, + dirname: string, +): { filepath: string, value: mixed } { + throw new Error( + `Cannot load plugin ${name} relative to ${dirname} in a browser`, + ); +} + +export function loadPreset( + name: string, + dirname: string, +): { filepath: string, value: mixed } { + throw new Error( + `Cannot load preset ${name} relative to ${dirname} in a browser`, + ); +} diff --git a/tools/node_modules/@babel/core/src/config/files/index.js b/tools/node_modules/@babel/core/src/config/files/index.js new file mode 100644 index 00000000000000..2321fb7605d9aa --- /dev/null +++ b/tools/node_modules/@babel/core/src/config/files/index.js @@ -0,0 +1,31 @@ +// @flow + +import typeof * as indexBrowserType from "./index-browser"; +import typeof * as indexType from "./index"; + +// Kind of gross, but essentially asserting that the exports of this module are the same as the +// exports of index-browser, since this file may be replaced at bundle time with index-browser. +((({}: any): $Exact): $Exact); + +export { findPackageData } from "./package"; + +export { + findConfigUpwards, + findRelativeConfig, + findRootConfig, + loadConfig, + resolveShowConfigPath, + ROOT_CONFIG_FILENAMES, +} from "./configuration"; +export type { + ConfigFile, + IgnoreFile, + RelativeConfig, + FilePackageData, +} from "./types"; +export { + resolvePlugin, + resolvePreset, + loadPlugin, + loadPreset, +} from "./plugins"; diff --git a/tools/node_modules/@babel/core/src/transform-file-browser.js b/tools/node_modules/@babel/core/src/transform-file-browser.js new file mode 100644 index 00000000000000..fc1b12af0e50ae --- /dev/null +++ b/tools/node_modules/@babel/core/src/transform-file-browser.js @@ -0,0 +1,29 @@ +// @flow + +// duplicated from transform-file so we do not have to import anything here +type TransformFile = { + (filename: string, callback: Function): void, + (filename: string, opts: ?Object, callback: Function): void, +}; + +export const transformFile: TransformFile = (function transformFile( + filename, + opts, + callback, +) { + if (typeof opts === "function") { + callback = opts; + } + + callback(new Error("Transforming files is not supported in browsers"), null); +}: Function); + +export function transformFileSync() { + throw new Error("Transforming files is not supported in browsers"); +} + +export function transformFileAsync() { + return Promise.reject( + new Error("Transforming files is not supported in browsers"), + ); +} diff --git a/tools/node_modules/@babel/core/src/transform-file.js b/tools/node_modules/@babel/core/src/transform-file.js new file mode 100644 index 00000000000000..480afc1cf6f737 --- /dev/null +++ b/tools/node_modules/@babel/core/src/transform-file.js @@ -0,0 +1,40 @@ +// @flow + +import gensync from "gensync"; + +import loadConfig, { type InputOptions, type ResolvedConfig } from "./config"; +import { + run, + type FileResult, + type FileResultCallback, +} from "./transformation"; +import * as fs from "./gensync-utils/fs"; + +import typeof * as transformFileBrowserType from "./transform-file-browser"; +import typeof * as transformFileType from "./transform-file"; + +// Kind of gross, but essentially asserting that the exports of this module are the same as the +// exports of transform-file-browser, since this file may be replaced at bundle time with +// transform-file-browser. +((({}: any): $Exact): $Exact); + +type TransformFile = { + (filename: string, callback: FileResultCallback): void, + (filename: string, opts: ?InputOptions, callback: FileResultCallback): void, +}; + +const transformFileRunner = gensync<[string, ?InputOptions], FileResult | null>( + function* (filename, opts) { + const options = { ...opts, filename }; + + const config: ResolvedConfig | null = yield* loadConfig(options); + if (config === null) return null; + + const code = yield* fs.readFile(filename, "utf8"); + return yield* run(config, code); + }, +); + +export const transformFile: TransformFile = transformFileRunner.errback; +export const transformFileSync = transformFileRunner.sync; +export const transformFileAsync = transformFileRunner.async; diff --git a/tools/node_modules/@babel/eslint-parser/LICENSE b/tools/node_modules/@babel/eslint-parser/LICENSE new file mode 100644 index 00000000000000..f31575ec773bb1 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/@babel/eslint-parser/README.md b/tools/node_modules/@babel/eslint-parser/README.md new file mode 100644 index 00000000000000..8ee13ebda10ac1 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/README.md @@ -0,0 +1,124 @@ +# @babel/eslint-parser [![npm](https://img.shields.io/npm/v/@babel/eslint-parser.svg)](https://www.npmjs.com/package/@babel/eslint-parser) [![travis](https://img.shields.io/travis/babel/@babel/eslint-parser/main.svg)](https://travis-ci.org/babel/@babel/eslint-parser) [![npm-downloads](https://img.shields.io/npm/dm/@babel/eslint-parser.svg)](https://www.npmjs.com/package/@babel/eslint-parser) + +**@babel/eslint-parser** allows you to lint **ALL** valid Babel code with the fantastic +[ESLint](https://github.com/eslint/eslint). + +## When should I use @babel/eslint-parser? + +ESLint's default parser and core rules [only support the latest final ECMAScript standard](https://github.com/eslint/eslint/blob/a675c89573836adaf108a932696b061946abf1e6/README.md#what-about-experimental-features) and do not support experimental (such as new features) and non-standard (such as Flow or TypeScript types) syntax provided by Babel. @babel/eslint-parser is a parser that allows ESLint to run on source code that is transformed by Babel. + +**Note:** You only need to use @babel/parser-eslint if you are using Babel to transform your code. If this is not the case, please use the relevant parser for your chosen flavor of ECMAScript (note that the default parser supports all non-experimental syntax as well as JSX). + +## How does it work? + +ESLint allows for the use of [custom parsers](https://eslint.org/docs/developer-guide/working-with-custom-parsers). When using this plugin, your code is parsed by Babel's parser (using the configuration specified in your [Babel configuration file](https://babeljs.io/docs/en/configuration)) and the resulting AST is +transformed into an [ESTree](https://github.com/estree/estree)-compliant structure that ESLint can understand. All location info such as line numbers, +columns is also retained so you can track down errors with ease. + +**Note:** ESLint's core rules do not support experimental syntax and may therefore not work as expected when using `@babel/eslint-parser`. Please use the companion [`@babel/eslint-plugin`](https://github.com/babel/babel/tree/main/eslint/babel-eslint-plugin) plugin for core rules that you have issues with. + +## Usage + +### Installation + +```sh +$ npm install eslint @babel/core @babel/eslint-parser --save-dev +# or +$ yarn add eslint @babel/core @babel/eslint-parser -D +``` + +**Note:** @babel/eslint-parser requires `@babel/core@>=7.2.0` and a valid Babel configuration file to run. If you do not have this already set up, please see the [Babel Usage Guide](https://babeljs.io/docs/en/usage). + +### Setup + +To use @babel/eslint-parser, `"@babel/eslint-parser"` must be specified as the `parser` in your ESLint configuration file (see [here](https://eslint.org/docs/user-guide/configuring#specifying-parser) for more detailed information). + +**.eslintrc.js** + +```js +module.exports = { + parser: "@babel/eslint-parser", +}; +``` + +With the parser set, your configuration can be configured as described in the [Configuring ESLint](https://eslint.org/docs/user-guide/configuring) documentation. + +**Note:** The `parserOptions` described in the [official documentation](https://eslint.org/docs/user-guide/configuring#specifying-parser-options) are for the default parser and are not necessarily supported by @babel/eslint-parser. Please see the section directly below for supported `parserOptions`. + +### Additional parser configuration + +Additional configuration options can be set in your ESLint configuration under the `parserOptions` key. Please note that the `ecmaFeatures` config property may still be required for ESLint to work properly with features not in ECMAScript 5 by default. + +- `requireConfigFile` (default `true`) can be set to `false` to allow @babel/eslint-parser to run on files that do not have a Babel configuration associated with them. This can be useful for linting files that are not transformed by Babel (such as tooling configuration files), though we recommend using the default parser via [glob-based configuration](https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns). Note: @babel/eslint-parser will not parse any experimental syntax when no configuration file is found. +- `sourceType` can be set to `"module"`(default) or `"script"` if your code isn't using ECMAScript modules. +- `allowImportExportEverywhere` (default `false`) can be set to `true` to allow import and export declarations to appear anywhere a statement is allowed if your build environment supports that. Otherwise import and export declarations can only appear at a program's top level. +- `ecmaFeatures.globalReturn` (default `false`) allow return statements in the global scope when used with `sourceType: "script"`. +- `babelOptions` is an object containing Babel configuration [options](https://babeljs.io/docs/en/options) that are passed to Babel's parser at runtime. For cases where users might not want to use a Babel configuration file or are running Babel through another tool (such as Webpack with `babel-loader`). + +**.eslintrc.js** + +```js +module.exports = { + parser: "@babel/eslint-parser", + parserOptions: { + sourceType: "module", + allowImportExportEverywhere: false, + ecmaFeatures: { + globalReturn: false, + }, + babelOptions: { + configFile: "path/to/config.js", + }, + }, +}; +``` + +**.eslintrc.js using glob-based configuration** + +This configuration would use the default parser for all files except for those found by the `"files/transformed/by/babel/*.js"` glob. + +```js +module.exports = { + rules: { + indent: "error", + }, + overrides: [ + { + files: ["files/transformed/by/babel/*.js"], + parser: "@babel/eslint-parser", + }, + ], +}; +``` + +### Run + +```sh +$ ./node_modules/.bin/eslint yourfile.js +``` + +## Known issues + +Flow: + +> Check out [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype): An `eslint` plugin that makes flow type annotations global variables and marks declarations as used. Solves the problem of false positives with `no-undef` and `no-unused-vars`. + +- `no-undef` for global flow types: `ReactElement`, `ReactClass` [#130](https://github.com/babel/@babel/eslint-parser/issues/130#issuecomment-111215076) + - Workaround: define types as globals in `.eslintrc` or define types and import them `import type ReactElement from './types'` +- `no-unused-vars/no-undef` with Flow declarations (`declare module A {}`) [#132](https://github.com/babel/@babel/eslint-parser/issues/132#issuecomment-112815926) + +Modules/strict mode + +- `no-unused-vars: ["error", { vars: local }]` [#136](https://github.com/babel/@babel/eslint-parser/issues/136) + +Please check out [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) for React/JSX issues. + +- `no-unused-vars` with jsx + +Please check out [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) for other issues. + +## Questions and support + +If you have an issue, please first check if it can be reproduced with the default parser and with the latest versions of `eslint` and `@babel/eslint-parser`. If it is not reproducible with the default parser, it is most likely an issue with `@babel/eslint-parser`. + +For questions and support please visit the [`#discussion`](https://babeljs.slack.com/messages/discussion/) Babel Slack channel (sign up [here](https://github.com/babel/notes/issues/38)) or the ESLint [Gitter](https://gitter.im/eslint/eslint). diff --git a/tools/node_modules/@babel/eslint-parser/lib/analyze-scope.js b/tools/node_modules/@babel/eslint-parser/lib/analyze-scope.js new file mode 100644 index 00000000000000..30dffb6711023a --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/lib/analyze-scope.js @@ -0,0 +1,356 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = analyzeScope; + +var _core = require("@babel/core"); + +var _eslintScope = _interopRequireDefault(require("eslint-scope")); + +var _definition = require("eslint-scope/lib/definition"); + +var _patternVisitor = _interopRequireDefault(require("eslint-scope/lib/pattern-visitor")); + +var _referencer = _interopRequireDefault(require("eslint-scope/lib/referencer")); + +var _eslintVisitorKeys = require("eslint-visitor-keys"); + +var _visitorKeys = _interopRequireDefault(require("./visitor-keys")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const flowFlippedAliasKeys = _core.types.FLIPPED_ALIAS_KEYS.Flow.concat(["ArrayPattern", "ClassDeclaration", "ClassExpression", "FunctionDeclaration", "FunctionExpression", "Identifier", "ObjectPattern", "RestElement"]); + +const visitorKeysMap = Object.entries(_core.types.VISITOR_KEYS).reduce((acc, [key, value]) => { + if (!flowFlippedAliasKeys.includes(value)) { + acc[key] = value; + } + + return acc; +}, {}); +const propertyTypes = { + callProperties: { + type: "loop", + values: ["value"] + }, + indexers: { + type: "loop", + values: ["key", "value"] + }, + properties: { + type: "loop", + values: ["argument", "value"] + }, + types: { + type: "loop" + }, + params: { + type: "loop" + }, + argument: { + type: "single" + }, + elementType: { + type: "single" + }, + qualification: { + type: "single" + }, + rest: { + type: "single" + }, + returnType: { + type: "single" + }, + typeAnnotation: { + type: "typeAnnotation" + }, + typeParameters: { + type: "typeParameters" + }, + id: { + type: "id" + } +}; + +class PatternVisitor extends _patternVisitor.default { + ArrayPattern(node) { + node.elements.forEach(this.visit, this); + } + + ObjectPattern(node) { + node.properties.forEach(this.visit, this); + } + +} + +class Referencer extends _referencer.default { + visitPattern(node, options, callback) { + if (!node) { + return; + } + + this._checkIdentifierOrVisit(node.typeAnnotation); + + if (_core.types.isAssignmentPattern(node)) { + this._checkIdentifierOrVisit(node.left.typeAnnotation); + } + + if (typeof options === "function") { + callback = options; + options = { + processRightHandNodes: false + }; + } + + const visitor = new PatternVisitor(this.options, node, callback); + visitor.visit(node); + + if (options.processRightHandNodes) { + visitor.rightHandNodes.forEach(this.visit, this); + } + } + + visitClass(node) { + this._visitArray(node.decorators); + + const typeParamScope = this._nestTypeParamScope(node); + + this._visitTypeAnnotation(node.implements); + + this._visitTypeAnnotation(node.superTypeParameters && node.superTypeParameters.params); + + super.visitClass(node); + + if (typeParamScope) { + this.close(node); + } + } + + visitFunction(node) { + const typeParamScope = this._nestTypeParamScope(node); + + this._checkIdentifierOrVisit(node.returnType); + + super.visitFunction(node); + + if (typeParamScope) { + this.close(node); + } + } + + visitProperty(node) { + var _node$value; + + if (((_node$value = node.value) == null ? void 0 : _node$value.type) === "TypeCastExpression") { + this._visitTypeAnnotation(node.value); + } + + this._visitArray(node.decorators); + + super.visitProperty(node); + } + + InterfaceDeclaration(node) { + this._createScopeVariable(node, node.id); + + const typeParamScope = this._nestTypeParamScope(node); + + this._visitArray(node.extends); + + this.visit(node.body); + + if (typeParamScope) { + this.close(node); + } + } + + TypeAlias(node) { + this._createScopeVariable(node, node.id); + + const typeParamScope = this._nestTypeParamScope(node); + + this.visit(node.right); + + if (typeParamScope) { + this.close(node); + } + } + + ClassProperty(node) { + this._visitClassProperty(node); + } + + ClassPrivateProperty(node) { + this._visitClassProperty(node); + } + + ClassPrivateMethod(node) { + super.MethodDefinition(node); + } + + DeclareModule(node) { + this._visitDeclareX(node); + } + + DeclareFunction(node) { + this._visitDeclareX(node); + } + + DeclareVariable(node) { + this._visitDeclareX(node); + } + + DeclareClass(node) { + this._visitDeclareX(node); + } + + OptionalMemberExpression(node) { + super.MemberExpression(node); + } + + _visitClassProperty(node) { + this._visitTypeAnnotation(node.typeAnnotation); + + this.visitProperty(node); + } + + _visitDeclareX(node) { + if (node.id) { + this._createScopeVariable(node, node.id); + } + + const typeParamScope = this._nestTypeParamScope(node); + + if (typeParamScope) { + this.close(node); + } + } + + _createScopeVariable(node, name) { + this.currentScope().variableScope.__define(name, new _definition.Definition("Variable", name, node, null, null, null)); + } + + _nestTypeParamScope(node) { + if (!node.typeParameters) { + return null; + } + + const parentScope = this.scopeManager.__currentScope; + const scope = new _eslintScope.default.Scope(this.scopeManager, "type-parameters", parentScope, node, false); + + this.scopeManager.__nestScope(scope); + + for (let j = 0; j < node.typeParameters.params.length; j++) { + const name = node.typeParameters.params[j]; + + scope.__define(name, new _definition.Definition("TypeParameter", name, name)); + + if (name.typeAnnotation) { + this._checkIdentifierOrVisit(name); + } + } + + scope.__define = function () { + return parentScope.__define.apply(parentScope, arguments); + }; + + return scope; + } + + _visitTypeAnnotation(node) { + if (!node) { + return; + } + + if (Array.isArray(node)) { + node.forEach(this._visitTypeAnnotation, this); + return; + } + + const visitorValues = visitorKeysMap[node.type]; + + if (!visitorValues) { + return; + } + + for (let i = 0; i < visitorValues.length; i++) { + const visitorValue = visitorValues[i]; + const propertyType = propertyTypes[visitorValue]; + const nodeProperty = node[visitorValue]; + + if (propertyType == null || nodeProperty == null) { + continue; + } + + if (propertyType.type === "loop") { + for (let j = 0; j < nodeProperty.length; j++) { + if (Array.isArray(propertyType.values)) { + for (let k = 0; k < propertyType.values.length; k++) { + const loopPropertyNode = nodeProperty[j][propertyType.values[k]]; + + if (loopPropertyNode) { + this._checkIdentifierOrVisit(loopPropertyNode); + } + } + } else { + this._checkIdentifierOrVisit(nodeProperty[j]); + } + } + } else if (propertyType.type === "single") { + this._checkIdentifierOrVisit(nodeProperty); + } else if (propertyType.type === "typeAnnotation") { + this._visitTypeAnnotation(node.typeAnnotation); + } else if (propertyType.type === "typeParameters") { + for (let l = 0; l < node.typeParameters.params.length; l++) { + this._checkIdentifierOrVisit(node.typeParameters.params[l]); + } + } else if (propertyType.type === "id") { + if (node.id.type === "Identifier") { + this._checkIdentifierOrVisit(node.id); + } else { + this._visitTypeAnnotation(node.id); + } + } + } + } + + _checkIdentifierOrVisit(node) { + if (node == null ? void 0 : node.typeAnnotation) { + this._visitTypeAnnotation(node.typeAnnotation); + } else if ((node == null ? void 0 : node.type) === "Identifier") { + this.visit(node); + } else { + this._visitTypeAnnotation(node); + } + } + + _visitArray(nodeList) { + if (nodeList) { + for (const node of nodeList) { + this.visit(node); + } + } + } + +} + +function analyzeScope(ast, parserOptions) { + const options = { + ignoreEval: true, + optimistic: false, + directive: false, + nodejsScope: ast.sourceType === "script" && (parserOptions.ecmaFeatures && parserOptions.ecmaFeatures.globalReturn) === true, + impliedStrict: false, + sourceType: ast.sourceType, + ecmaVersion: parserOptions.ecmaVersion, + fallback: _eslintVisitorKeys.getKeys + }; + options.childVisitorKeys = _visitorKeys.default; + const scopeManager = new _eslintScope.default.ScopeManager(options); + const referencer = new Referencer(options, scopeManager); + referencer.visit(ast); + return scopeManager; +} \ No newline at end of file diff --git a/tools/node_modules/@babel/eslint-parser/lib/configuration.js b/tools/node_modules/@babel/eslint-parser/lib/configuration.js new file mode 100644 index 00000000000000..e8883cc58a5c20 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/lib/configuration.js @@ -0,0 +1,66 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.normalizeESLintConfig = normalizeESLintConfig; +exports.normalizeBabelParseConfig = normalizeBabelParseConfig; + +var _core = require("@babel/core"); + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +function normalizeESLintConfig(options) { + const { + babelOptions = {}, + ecmaVersion = 2020, + sourceType = "module", + allowImportExportEverywhere = false, + requireConfigFile = true + } = options, + otherOptions = _objectWithoutPropertiesLoose(options, ["babelOptions", "ecmaVersion", "sourceType", "allowImportExportEverywhere", "requireConfigFile"]); + + return Object.assign({ + babelOptions, + ecmaVersion, + sourceType, + allowImportExportEverywhere, + requireConfigFile + }, otherOptions); +} + +function normalizeBabelParseConfig(options) { + var _options$babelOptions, _options$babelOptions2; + + const parseOptions = Object.assign({ + sourceType: options.sourceType, + filename: options.filePath + }, options.babelOptions, { + parserOpts: Object.assign({ + allowImportExportEverywhere: options.allowImportExportEverywhere, + allowReturnOutsideFunction: true, + allowSuperOutsideMethod: true + }, options.babelOptions.parserOpts, { + plugins: ["estree", ...((_options$babelOptions = (_options$babelOptions2 = options.babelOptions.parserOpts) == null ? void 0 : _options$babelOptions2.plugins) != null ? _options$babelOptions : [])], + ranges: true, + tokens: true + }), + caller: Object.assign({ + name: "@babel/eslint-parser" + }, options.babelOptions.caller) + }); + + if (options.requireConfigFile !== false) { + const config = (0, _core.loadPartialConfig)(parseOptions); + + if (config !== null) { + if (!config.hasFilesystemConfig()) { + throw new Error(`No Babel config file detected for ${config.options.filename}. Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files.`); + } + + return config.options; + } + } + + return parseOptions; +} \ No newline at end of file diff --git a/tools/node_modules/@babel/eslint-parser/lib/convert/convertAST.js b/tools/node_modules/@babel/eslint-parser/lib/convert/convertAST.js new file mode 100644 index 00000000000000..4b9496c95fa6af --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/lib/convert/convertAST.js @@ -0,0 +1,158 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = convertAST; + +var _core = require("@babel/core"); + +var _visitorKeys = require("../visitor-keys"); + +function convertNodes(ast, code) { + const astTransformVisitor = { + noScope: true, + + enter(path) { + const { + node + } = path; + + if (node.innerComments) { + delete node.innerComments; + } + + if (node.trailingComments) { + delete node.trailingComments; + } + + if (node.leadingComments) { + delete node.leadingComments; + } + }, + + exit(path) { + const { + node + } = path; + + if (node.extra) { + delete node.extra; + } + + if (node == null ? void 0 : node.loc.identifierName) { + delete node.loc.identifierName; + } + + if (path.isTypeParameter()) { + node.type = "Identifier"; + node.typeAnnotation = node.bound; + delete node.bound; + } + + if (path.isQualifiedTypeIdentifier()) { + delete node.id; + } + + if (path.isObjectTypeProperty()) { + delete node.key; + } + + if (path.isObjectTypeIndexer()) { + delete node.id; + } + + if (path.isFunctionTypeParam()) { + delete node.name; + } + + if (path.isImportDeclaration()) { + delete node.isType; + } + + if (path.isTemplateLiteral()) { + for (let i = 0; i < node.quasis.length; i++) { + const q = node.quasis[i]; + q.range[0] -= 1; + + if (q.tail) { + q.range[1] += 1; + } else { + q.range[1] += 2; + } + + q.loc.start.column -= 1; + + if (q.tail) { + q.loc.end.column += 1; + } else { + q.loc.end.column += 2; + } + } + } + } + + }; + const state = { + source: code + }; + const oldVisitorKeys = new Map(); + + try { + for (const [type, visitorKey] of Object.entries(_visitorKeys.conflictTypes)) { + oldVisitorKeys.set(type, _core.types.VISITOR_KEYS[type]); + _core.types.VISITOR_KEYS[type] = visitorKey; + } + + for (const [type, visitorKey] of Object.entries(_visitorKeys.newTypes)) { + _core.types.VISITOR_KEYS[type] = visitorKey; + } + + (0, _core.traverse)(ast, astTransformVisitor, null, state); + } finally { + for (const type of Object.keys(_visitorKeys.newTypes)) { + delete _core.types.VISITOR_KEYS[type]; + } + + for (const type of Object.keys(_visitorKeys.conflictTypes)) { + _core.types.VISITOR_KEYS[type] = oldVisitorKeys.get(type); + } + } +} + +function convertProgramNode(ast) { + ast.type = "Program"; + ast.sourceType = ast.program.sourceType; + ast.body = ast.program.body; + delete ast.program; + delete ast.errors; + + if (ast.comments.length) { + const lastComment = ast.comments[ast.comments.length - 1]; + + if (ast.tokens.length) { + const lastToken = ast.tokens[ast.tokens.length - 1]; + + if (lastComment.end > lastToken.end) { + ast.range[1] = lastToken.end; + ast.loc.end.line = lastToken.loc.end.line; + ast.loc.end.column = lastToken.loc.end.column; + } + } + } else { + if (!ast.tokens.length) { + ast.loc.start.line = 1; + ast.loc.end.line = 1; + } + } + + if (ast.body && ast.body.length > 0) { + ast.loc.start.line = ast.body[0].loc.start.line; + ast.range[0] = ast.body[0].start; + } +} + +function convertAST(ast, code) { + convertNodes(ast, code); + convertProgramNode(ast); +} \ No newline at end of file diff --git a/tools/node_modules/@babel/eslint-parser/lib/convert/convertComments.js b/tools/node_modules/@babel/eslint-parser/lib/convert/convertComments.js new file mode 100644 index 00000000000000..bbe5b6104086ed --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/lib/convert/convertComments.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = convertComments; + +function convertComments(comments) { + for (const comment of comments) { + if (comment.type === "CommentBlock") { + comment.type = "Block"; + } else if (comment.type === "CommentLine") { + comment.type = "Line"; + } + + if (!comment.range) { + comment.range = [comment.start, comment.end]; + } + } +} \ No newline at end of file diff --git a/tools/node_modules/@babel/eslint-parser/lib/convert/convertTokens.js b/tools/node_modules/@babel/eslint-parser/lib/convert/convertTokens.js new file mode 100644 index 00000000000000..6d194e8886137b --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/lib/convert/convertTokens.js @@ -0,0 +1,150 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = convertTokens; + +var _core = require("@babel/core"); + +function convertTemplateType(tokens) { + let curlyBrace = null; + let templateTokens = []; + const result = []; + + function addTemplateType() { + const start = templateTokens[0]; + const end = templateTokens[templateTokens.length - 1]; + const value = templateTokens.reduce((result, token) => { + if (token.value) { + result += token.value; + } else if (token.type !== _core.tokTypes.template) { + result += token.type.label; + } + + return result; + }, ""); + result.push({ + type: "Template", + value: value, + start: start.start, + end: end.end, + loc: { + start: start.loc.start, + end: end.loc.end + } + }); + templateTokens = []; + } + + tokens.forEach(token => { + switch (token.type) { + case _core.tokTypes.backQuote: + if (curlyBrace) { + result.push(curlyBrace); + curlyBrace = null; + } + + templateTokens.push(token); + + if (templateTokens.length > 1) { + addTemplateType(); + } + + break; + + case _core.tokTypes.dollarBraceL: + templateTokens.push(token); + addTemplateType(); + break; + + case _core.tokTypes.braceR: + if (curlyBrace) { + result.push(curlyBrace); + } + + curlyBrace = token; + break; + + case _core.tokTypes.template: + if (curlyBrace) { + templateTokens.push(curlyBrace); + curlyBrace = null; + } + + templateTokens.push(token); + break; + + case _core.tokTypes.eof: + if (curlyBrace) { + result.push(curlyBrace); + } + + break; + + default: + if (curlyBrace) { + result.push(curlyBrace); + curlyBrace = null; + } + + result.push(token); + } + }); + return result; +} + +function convertToken(token, source) { + const type = token.type; + token.range = [token.start, token.end]; + + if (type === _core.tokTypes.name) { + token.type = "Identifier"; + } else if (type === _core.tokTypes.semi || type === _core.tokTypes.comma || type === _core.tokTypes.parenL || type === _core.tokTypes.parenR || type === _core.tokTypes.braceL || type === _core.tokTypes.braceR || type === _core.tokTypes.slash || type === _core.tokTypes.dot || type === _core.tokTypes.bracketL || type === _core.tokTypes.bracketR || type === _core.tokTypes.ellipsis || type === _core.tokTypes.arrow || type === _core.tokTypes.pipeline || type === _core.tokTypes.star || type === _core.tokTypes.incDec || type === _core.tokTypes.colon || type === _core.tokTypes.question || type === _core.tokTypes.template || type === _core.tokTypes.backQuote || type === _core.tokTypes.dollarBraceL || type === _core.tokTypes.at || type === _core.tokTypes.logicalOR || type === _core.tokTypes.logicalAND || type === _core.tokTypes.nullishCoalescing || type === _core.tokTypes.bitwiseOR || type === _core.tokTypes.bitwiseXOR || type === _core.tokTypes.bitwiseAND || type === _core.tokTypes.equality || type === _core.tokTypes.relational || type === _core.tokTypes.bitShift || type === _core.tokTypes.plusMin || type === _core.tokTypes.modulo || type === _core.tokTypes.exponent || type === _core.tokTypes.bang || type === _core.tokTypes.tilde || type === _core.tokTypes.doubleColon || type === _core.tokTypes.hash || type === _core.tokTypes.questionDot || type.isAssign) { + token.type = "Punctuator"; + if (!token.value) token.value = type.label; + } else if (type === _core.tokTypes.jsxTagStart) { + token.type = "Punctuator"; + token.value = "<"; + } else if (type === _core.tokTypes.jsxTagEnd) { + token.type = "Punctuator"; + token.value = ">"; + } else if (type === _core.tokTypes.jsxName) { + token.type = "JSXIdentifier"; + } else if (type === _core.tokTypes.jsxText) { + token.type = "JSXText"; + } else if (type.keyword === "null") { + token.type = "Null"; + } else if (type.keyword === "false" || type.keyword === "true") { + token.type = "Boolean"; + } else if (type.keyword) { + token.type = "Keyword"; + } else if (type === _core.tokTypes.num) { + token.type = "Numeric"; + token.value = source.slice(token.start, token.end); + } else if (type === _core.tokTypes.string) { + token.type = "String"; + token.value = source.slice(token.start, token.end); + } else if (type === _core.tokTypes.regexp) { + token.type = "RegularExpression"; + const value = token.value; + token.regex = { + pattern: value.pattern, + flags: value.flags + }; + token.value = `/${value.pattern}/${value.flags}`; + } else if (type === _core.tokTypes.bigint) { + token.type = "Numeric"; + token.value = `${token.value}n`; + } + + if (typeof token.type !== "string") { + delete token.type.rightAssociative; + } + + return token; +} + +function convertTokens(tokens, code) { + return convertTemplateType(tokens).filter(t => t.type !== "CommentLine" && t.type !== "CommentBlock").map(t => convertToken(t, code)); +} \ No newline at end of file diff --git a/tools/node_modules/@babel/eslint-parser/lib/convert/index.js b/tools/node_modules/@babel/eslint-parser/lib/convert/index.js new file mode 100644 index 00000000000000..f7133e2222944f --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/lib/convert/index.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +var _convertTokens = _interopRequireDefault(require("./convertTokens")); + +var _convertComments = _interopRequireDefault(require("./convertComments")); + +var _convertAST = _interopRequireDefault(require("./convertAST")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _default(ast, code) { + ast.tokens = (0, _convertTokens.default)(ast.tokens, code); + (0, _convertComments.default)(ast.comments); + (0, _convertAST.default)(ast, code); +} \ No newline at end of file diff --git a/tools/node_modules/@babel/eslint-parser/lib/index.js b/tools/node_modules/@babel/eslint-parser/lib/index.js new file mode 100644 index 00000000000000..e61b78c1836148 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/lib/index.js @@ -0,0 +1,68 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.parse = parse; +exports.parseForESLint = parseForESLint; + +var _semver = _interopRequireDefault(require("semver")); + +var _core = require("@babel/core"); + +var _package = _interopRequireDefault(require("../package.json")); + +var _configuration = require("./configuration"); + +var _convert = _interopRequireDefault(require("./convert")); + +var _analyzeScope = _interopRequireDefault(require("./analyze-scope")); + +var _visitorKeys = _interopRequireDefault(require("./visitor-keys")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +let isRunningMinSupportedCoreVersion = null; + +function baseParse(code, options) { + const minSupportedCoreVersion = ">=7.2.0"; + + if (typeof isRunningMinSupportedCoreVersion !== "boolean") { + isRunningMinSupportedCoreVersion = _semver.default.satisfies(_core.version, minSupportedCoreVersion); + } + + if (!isRunningMinSupportedCoreVersion) { + throw new Error(`@babel/eslint-parser@${_package.default.version} does not support @babel/core@${_core.version}. Please upgrade to @babel/core@${minSupportedCoreVersion}.`); + } + + let ast; + + try { + ast = (0, _core.parseSync)(code, (0, _configuration.normalizeBabelParseConfig)(options)); + } catch (err) { + if (err instanceof SyntaxError) { + err.lineNumber = err.loc.line; + err.column = err.loc.column; + } + + throw err; + } + + (0, _convert.default)(ast, code); + return ast; +} + +function parse(code, options = {}) { + return baseParse(code, (0, _configuration.normalizeESLintConfig)(options)); +} + +function parseForESLint(code, options = {}) { + const normalizedOptions = (0, _configuration.normalizeESLintConfig)(options); + const ast = baseParse(code, normalizedOptions); + const scopeManager = (0, _analyzeScope.default)(ast, normalizedOptions); + return { + ast, + scopeManager, + visitorKeys: _visitorKeys.default + }; +} \ No newline at end of file diff --git a/tools/node_modules/@babel/eslint-parser/lib/visitor-keys.js b/tools/node_modules/@babel/eslint-parser/lib/visitor-keys.js new file mode 100644 index 00000000000000..df9bc9e2b06864 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/lib/visitor-keys.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.conflictTypes = exports.newTypes = void 0; + +var _core = require("@babel/core"); + +var _eslintVisitorKeys = require("eslint-visitor-keys"); + +const newTypes = { + ChainExpression: _eslintVisitorKeys.KEYS.ChainExpression, + ImportExpression: _eslintVisitorKeys.KEYS.ImportExpression, + Literal: _eslintVisitorKeys.KEYS.Literal, + MethodDefinition: ["decorators"].concat(_eslintVisitorKeys.KEYS.MethodDefinition), + Property: ["decorators"].concat(_eslintVisitorKeys.KEYS.Property) +}; +exports.newTypes = newTypes; +const conflictTypes = { + ClassPrivateMethod: ["decorators"].concat(_eslintVisitorKeys.KEYS.MethodDefinition), + ExportAllDeclaration: _eslintVisitorKeys.KEYS.ExportAllDeclaration +}; +exports.conflictTypes = conflictTypes; + +var _default = Object.assign({}, newTypes, _core.types.VISITOR_KEYS, conflictTypes); + +exports.default = _default; \ No newline at end of file diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/LICENSE b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/LICENSE new file mode 100644 index 00000000000000..d36a526f7ed5d1 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/LICENSE @@ -0,0 +1,22 @@ +Copyright JS Foundation and other contributors, https://js.foundation +Copyright (C) 2012-2013 Yusuke Suzuki (twitter: @Constellation) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/README.md new file mode 100644 index 00000000000000..7e7ce0d345cdf2 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/README.md @@ -0,0 +1,54 @@ +# ESLint Scope + +ESLint Scope is the [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) scope analyzer used in ESLint. It is a fork of [escope](http://github.com/estools/escope). + +## Usage + +Install: + +``` +npm i eslint-scope --save +``` + +Example: + +```js +var eslintScope = require('eslint-scope'); +var espree = require('espree'); +var estraverse = require('estraverse'); + +var ast = espree.parse(code); +var scopeManager = eslintScope.analyze(ast); + +var currentScope = scopeManager.acquire(ast); // global scope + +estraverse.traverse(ast, { + enter: function(node, parent) { + // do stuff + + if (/Function/.test(node.type)) { + currentScope = scopeManager.acquire(node); // get current function scope + } + }, + leave: function(node, parent) { + if (/Function/.test(node.type)) { + currentScope = currentScope.upper; // set to parent scope + } + + // do stuff + } +}); +``` + +## Contributing + +Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/eslint-scope/issues). + +## Build Commands + +* `npm test` - run all linting and tests +* `npm run lint` - run all linting + +## License + +ESLint Scope is licensed under a permissive BSD 2-clause license. diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/definition.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/definition.js new file mode 100644 index 00000000000000..172bfe23b5fdcf --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/definition.js @@ -0,0 +1,86 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +const Variable = require("./variable"); + +/** + * @class Definition + */ +class Definition { + constructor(type, name, node, parent, index, kind) { + + /** + * @member {String} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...). + */ + this.type = type; + + /** + * @member {espree.Identifier} Definition#name - the identifier AST node of the occurrence. + */ + this.name = name; + + /** + * @member {espree.Node} Definition#node - the enclosing node of the identifier. + */ + this.node = node; + + /** + * @member {espree.Node?} Definition#parent - the enclosing statement node of the identifier. + */ + this.parent = parent; + + /** + * @member {Number?} Definition#index - the index in the declaration statement. + */ + this.index = index; + + /** + * @member {String?} Definition#kind - the kind of the declaration statement. + */ + this.kind = kind; + } +} + +/** + * @class ParameterDefinition + */ +class ParameterDefinition extends Definition { + constructor(name, node, index, rest) { + super(Variable.Parameter, name, node, null, index, null); + + /** + * Whether the parameter definition is a part of a rest parameter. + * @member {boolean} ParameterDefinition#rest + */ + this.rest = rest; + } +} + +module.exports = { + ParameterDefinition, + Definition +}; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/index.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/index.js new file mode 100644 index 00000000000000..0f16fa40f8323f --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/index.js @@ -0,0 +1,165 @@ +/* + Copyright (C) 2012-2014 Yusuke Suzuki + Copyright (C) 2013 Alex Seville + Copyright (C) 2014 Thiago de Arruda + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * Escope (
escope) is an ECMAScript + * scope analyzer extracted from the esmangle project. + *

+ * escope finds lexical scopes in a source program, i.e. areas of that + * program where different occurrences of the same identifier refer to the same + * variable. With each scope the contained variables are collected, and each + * identifier reference in code is linked to its corresponding variable (if + * possible). + *

+ * escope works on a syntax tree of the parsed source code which has + * to adhere to the + * Mozilla Parser API. E.g. espree is a parser + * that produces such syntax trees. + *

+ * The main interface is the {@link analyze} function. + * @module escope + */ +"use strict"; + +/* eslint no-underscore-dangle: ["error", { "allow": ["__currentScope"] }] */ + +const assert = require("assert"); + +const ScopeManager = require("./scope-manager"); +const Referencer = require("./referencer"); +const Reference = require("./reference"); +const Variable = require("./variable"); +const Scope = require("./scope").Scope; +const version = require("../package.json").version; + +/** + * Set the default options + * @returns {Object} options + */ +function defaultOptions() { + return { + optimistic: false, + directive: false, + nodejsScope: false, + impliedStrict: false, + sourceType: "script", // one of ['script', 'module'] + ecmaVersion: 5, + childVisitorKeys: null, + fallback: "iteration" + }; +} + +/** + * Preform deep update on option object + * @param {Object} target - Options + * @param {Object} override - Updates + * @returns {Object} Updated options + */ +function updateDeeply(target, override) { + + /** + * Is hash object + * @param {Object} value - Test value + * @returns {boolean} Result + */ + function isHashObject(value) { + return typeof value === "object" && value instanceof Object && !(value instanceof Array) && !(value instanceof RegExp); + } + + for (const key in override) { + if (Object.prototype.hasOwnProperty.call(override, key)) { + const val = override[key]; + + if (isHashObject(val)) { + if (isHashObject(target[key])) { + updateDeeply(target[key], val); + } else { + target[key] = updateDeeply({}, val); + } + } else { + target[key] = val; + } + } + } + return target; +} + +/** + * Main interface function. Takes an Espree syntax tree and returns the + * analyzed scopes. + * @function analyze + * @param {espree.Tree} tree - Abstract Syntax Tree + * @param {Object} providedOptions - Options that tailor the scope analysis + * @param {boolean} [providedOptions.optimistic=false] - the optimistic flag + * @param {boolean} [providedOptions.directive=false]- the directive flag + * @param {boolean} [providedOptions.ignoreEval=false]- whether to check 'eval()' calls + * @param {boolean} [providedOptions.nodejsScope=false]- whether the whole + * script is executed under node.js environment. When enabled, escope adds + * a function scope immediately following the global scope. + * @param {boolean} [providedOptions.impliedStrict=false]- implied strict mode + * (if ecmaVersion >= 5). + * @param {string} [providedOptions.sourceType='script']- the source type of the script. one of 'script' and 'module' + * @param {number} [providedOptions.ecmaVersion=5]- which ECMAScript version is considered + * @param {Object} [providedOptions.childVisitorKeys=null] - Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option. + * @param {string} [providedOptions.fallback='iteration'] - A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option. + * @returns {ScopeManager} ScopeManager + */ +function analyze(tree, providedOptions) { + const options = updateDeeply(defaultOptions(), providedOptions); + const scopeManager = new ScopeManager(options); + const referencer = new Referencer(options, scopeManager); + + referencer.visit(tree); + + assert(scopeManager.__currentScope === null, "currentScope should be null."); + + return scopeManager; +} + +module.exports = { + + /** @name module:escope.version */ + version, + + /** @name module:escope.Reference */ + Reference, + + /** @name module:escope.Variable */ + Variable, + + /** @name module:escope.Scope */ + Scope, + + /** @name module:escope.ScopeManager */ + ScopeManager, + analyze +}; + + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/pattern-visitor.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/pattern-visitor.js new file mode 100644 index 00000000000000..afa629173b73ae --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/pattern-visitor.js @@ -0,0 +1,152 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +/* eslint-disable no-undefined */ + +const Syntax = require("estraverse").Syntax; +const esrecurse = require("esrecurse"); + +/** + * Get last array element + * @param {array} xs - array + * @returns {any} Last elment + */ +function getLast(xs) { + return xs[xs.length - 1] || null; +} + +class PatternVisitor extends esrecurse.Visitor { + static isPattern(node) { + const nodeType = node.type; + + return ( + nodeType === Syntax.Identifier || + nodeType === Syntax.ObjectPattern || + nodeType === Syntax.ArrayPattern || + nodeType === Syntax.SpreadElement || + nodeType === Syntax.RestElement || + nodeType === Syntax.AssignmentPattern + ); + } + + constructor(options, rootPattern, callback) { + super(null, options); + this.rootPattern = rootPattern; + this.callback = callback; + this.assignments = []; + this.rightHandNodes = []; + this.restElements = []; + } + + Identifier(pattern) { + const lastRestElement = getLast(this.restElements); + + this.callback(pattern, { + topLevel: pattern === this.rootPattern, + rest: lastRestElement !== null && lastRestElement !== undefined && lastRestElement.argument === pattern, + assignments: this.assignments + }); + } + + Property(property) { + + // Computed property's key is a right hand node. + if (property.computed) { + this.rightHandNodes.push(property.key); + } + + // If it's shorthand, its key is same as its value. + // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern). + // If it's not shorthand, the name of new variable is its value's. + this.visit(property.value); + } + + ArrayPattern(pattern) { + for (let i = 0, iz = pattern.elements.length; i < iz; ++i) { + const element = pattern.elements[i]; + + this.visit(element); + } + } + + AssignmentPattern(pattern) { + this.assignments.push(pattern); + this.visit(pattern.left); + this.rightHandNodes.push(pattern.right); + this.assignments.pop(); + } + + RestElement(pattern) { + this.restElements.push(pattern); + this.visit(pattern.argument); + this.restElements.pop(); + } + + MemberExpression(node) { + + // Computed property's key is a right hand node. + if (node.computed) { + this.rightHandNodes.push(node.property); + } + + // the object is only read, write to its property. + this.rightHandNodes.push(node.object); + } + + // + // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression. + // By spec, LeftHandSideExpression is Pattern or MemberExpression. + // (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758) + // But espree 2.0 parses to ArrayExpression, ObjectExpression, etc... + // + + SpreadElement(node) { + this.visit(node.argument); + } + + ArrayExpression(node) { + node.elements.forEach(this.visit, this); + } + + AssignmentExpression(node) { + this.assignments.push(node); + this.visit(node.left); + this.rightHandNodes.push(node.right); + this.assignments.pop(); + } + + CallExpression(node) { + + // arguments are right hand nodes. + node.arguments.forEach(a => { + this.rightHandNodes.push(a); + }); + this.visit(node.callee); + } +} + +module.exports = PatternVisitor; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/reference.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/reference.js new file mode 100644 index 00000000000000..9529827fe786c6 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/reference.js @@ -0,0 +1,167 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +const READ = 0x1; +const WRITE = 0x2; +const RW = READ | WRITE; + +/** + * A Reference represents a single occurrence of an identifier in code. + * @class Reference + */ +class Reference { + constructor(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) { + + /** + * Identifier syntax node. + * @member {espreeIdentifier} Reference#identifier + */ + this.identifier = ident; + + /** + * Reference to the enclosing Scope. + * @member {Scope} Reference#from + */ + this.from = scope; + + /** + * Whether the reference comes from a dynamic scope (such as 'eval', + * 'with', etc.), and may be trapped by dynamic scopes. + * @member {boolean} Reference#tainted + */ + this.tainted = false; + + /** + * The variable this reference is resolved with. + * @member {Variable} Reference#resolved + */ + this.resolved = null; + + /** + * The read-write mode of the reference. (Value is one of {@link + * Reference.READ}, {@link Reference.RW}, {@link Reference.WRITE}). + * @member {number} Reference#flag + * @private + */ + this.flag = flag; + if (this.isWrite()) { + + /** + * If reference is writeable, this is the tree being written to it. + * @member {espreeNode} Reference#writeExpr + */ + this.writeExpr = writeExpr; + + /** + * Whether the Reference might refer to a partial value of writeExpr. + * @member {boolean} Reference#partial + */ + this.partial = partial; + + /** + * Whether the Reference is to write of initialization. + * @member {boolean} Reference#init + */ + this.init = init; + } + this.__maybeImplicitGlobal = maybeImplicitGlobal; + } + + /** + * Whether the reference is static. + * @method Reference#isStatic + * @returns {boolean} static + */ + isStatic() { + return !this.tainted && this.resolved && this.resolved.scope.isStatic(); + } + + /** + * Whether the reference is writeable. + * @method Reference#isWrite + * @returns {boolean} write + */ + isWrite() { + return !!(this.flag & Reference.WRITE); + } + + /** + * Whether the reference is readable. + * @method Reference#isRead + * @returns {boolean} read + */ + isRead() { + return !!(this.flag & Reference.READ); + } + + /** + * Whether the reference is read-only. + * @method Reference#isReadOnly + * @returns {boolean} read only + */ + isReadOnly() { + return this.flag === Reference.READ; + } + + /** + * Whether the reference is write-only. + * @method Reference#isWriteOnly + * @returns {boolean} write only + */ + isWriteOnly() { + return this.flag === Reference.WRITE; + } + + /** + * Whether the reference is read-write. + * @method Reference#isReadWrite + * @returns {boolean} read write + */ + isReadWrite() { + return this.flag === Reference.RW; + } +} + +/** + * @constant Reference.READ + * @private + */ +Reference.READ = READ; + +/** + * @constant Reference.WRITE + * @private + */ +Reference.WRITE = WRITE; + +/** + * @constant Reference.RW + * @private + */ +Reference.RW = RW; + +module.exports = Reference; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/referencer.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/referencer.js new file mode 100644 index 00000000000000..63d1935b3a957f --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/referencer.js @@ -0,0 +1,629 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +/* eslint-disable no-underscore-dangle */ +/* eslint-disable no-undefined */ + +const Syntax = require("estraverse").Syntax; +const esrecurse = require("esrecurse"); +const Reference = require("./reference"); +const Variable = require("./variable"); +const PatternVisitor = require("./pattern-visitor"); +const definition = require("./definition"); +const assert = require("assert"); + +const ParameterDefinition = definition.ParameterDefinition; +const Definition = definition.Definition; + +/** + * Traverse identifier in pattern + * @param {Object} options - options + * @param {pattern} rootPattern - root pattern + * @param {Refencer} referencer - referencer + * @param {callback} callback - callback + * @returns {void} + */ +function traverseIdentifierInPattern(options, rootPattern, referencer, callback) { + + // Call the callback at left hand identifier nodes, and Collect right hand nodes. + const visitor = new PatternVisitor(options, rootPattern, callback); + + visitor.visit(rootPattern); + + // Process the right hand nodes recursively. + if (referencer !== null && referencer !== undefined) { + visitor.rightHandNodes.forEach(referencer.visit, referencer); + } +} + +// Importing ImportDeclaration. +// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation +// https://github.com/estree/estree/blob/master/es6.md#importdeclaration +// FIXME: Now, we don't create module environment, because the context is +// implementation dependent. + +class Importer extends esrecurse.Visitor { + constructor(declaration, referencer) { + super(null, referencer.options); + this.declaration = declaration; + this.referencer = referencer; + } + + visitImport(id, specifier) { + this.referencer.visitPattern(id, pattern => { + this.referencer.currentScope().__define(pattern, + new Definition( + Variable.ImportBinding, + pattern, + specifier, + this.declaration, + null, + null + )); + }); + } + + ImportNamespaceSpecifier(node) { + const local = (node.local || node.id); + + if (local) { + this.visitImport(local, node); + } + } + + ImportDefaultSpecifier(node) { + const local = (node.local || node.id); + + this.visitImport(local, node); + } + + ImportSpecifier(node) { + const local = (node.local || node.id); + + if (node.name) { + this.visitImport(node.name, node); + } else { + this.visitImport(local, node); + } + } +} + +// Referencing variables and creating bindings. +class Referencer extends esrecurse.Visitor { + constructor(options, scopeManager) { + super(null, options); + this.options = options; + this.scopeManager = scopeManager; + this.parent = null; + this.isInnerMethodDefinition = false; + } + + currentScope() { + return this.scopeManager.__currentScope; + } + + close(node) { + while (this.currentScope() && node === this.currentScope().block) { + this.scopeManager.__currentScope = this.currentScope().__close(this.scopeManager); + } + } + + pushInnerMethodDefinition(isInnerMethodDefinition) { + const previous = this.isInnerMethodDefinition; + + this.isInnerMethodDefinition = isInnerMethodDefinition; + return previous; + } + + popInnerMethodDefinition(isInnerMethodDefinition) { + this.isInnerMethodDefinition = isInnerMethodDefinition; + } + + referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) { + const scope = this.currentScope(); + + assignments.forEach(assignment => { + scope.__referencing( + pattern, + Reference.WRITE, + assignment.right, + maybeImplicitGlobal, + pattern !== assignment.left, + init + ); + }); + } + + visitPattern(node, options, callback) { + let visitPatternOptions = options; + let visitPatternCallback = callback; + + if (typeof options === "function") { + visitPatternCallback = options; + visitPatternOptions = { processRightHandNodes: false }; + } + + traverseIdentifierInPattern( + this.options, + node, + visitPatternOptions.processRightHandNodes ? this : null, + visitPatternCallback + ); + } + + visitFunction(node) { + let i, iz; + + // FunctionDeclaration name is defined in upper scope + // NOTE: Not referring variableScope. It is intended. + // Since + // in ES5, FunctionDeclaration should be in FunctionBody. + // in ES6, FunctionDeclaration should be block scoped. + + if (node.type === Syntax.FunctionDeclaration) { + + // id is defined in upper scope + this.currentScope().__define(node.id, + new Definition( + Variable.FunctionName, + node.id, + node, + null, + null, + null + )); + } + + // FunctionExpression with name creates its special scope; + // FunctionExpressionNameScope. + if (node.type === Syntax.FunctionExpression && node.id) { + this.scopeManager.__nestFunctionExpressionNameScope(node); + } + + // Consider this function is in the MethodDefinition. + this.scopeManager.__nestFunctionScope(node, this.isInnerMethodDefinition); + + const that = this; + + /** + * Visit pattern callback + * @param {pattern} pattern - pattern + * @param {Object} info - info + * @returns {void} + */ + function visitPatternCallback(pattern, info) { + that.currentScope().__define(pattern, + new ParameterDefinition( + pattern, + node, + i, + info.rest + )); + + that.referencingDefaultValue(pattern, info.assignments, null, true); + } + + // Process parameter declarations. + for (i = 0, iz = node.params.length; i < iz; ++i) { + this.visitPattern(node.params[i], { processRightHandNodes: true }, visitPatternCallback); + } + + // if there's a rest argument, add that + if (node.rest) { + this.visitPattern({ + type: "RestElement", + argument: node.rest + }, pattern => { + this.currentScope().__define(pattern, + new ParameterDefinition( + pattern, + node, + node.params.length, + true + )); + }); + } + + // In TypeScript there are a number of function-like constructs which have no body, + // so check it exists before traversing + if (node.body) { + + // Skip BlockStatement to prevent creating BlockStatement scope. + if (node.body.type === Syntax.BlockStatement) { + this.visitChildren(node.body); + } else { + this.visit(node.body); + } + } + + this.close(node); + } + + visitClass(node) { + if (node.type === Syntax.ClassDeclaration) { + this.currentScope().__define(node.id, + new Definition( + Variable.ClassName, + node.id, + node, + null, + null, + null + )); + } + + this.visit(node.superClass); + + this.scopeManager.__nestClassScope(node); + + if (node.id) { + this.currentScope().__define(node.id, + new Definition( + Variable.ClassName, + node.id, + node + )); + } + this.visit(node.body); + + this.close(node); + } + + visitProperty(node) { + let previous; + + if (node.computed) { + this.visit(node.key); + } + + const isMethodDefinition = node.type === Syntax.MethodDefinition; + + if (isMethodDefinition) { + previous = this.pushInnerMethodDefinition(true); + } + this.visit(node.value); + if (isMethodDefinition) { + this.popInnerMethodDefinition(previous); + } + } + + visitForIn(node) { + if (node.left.type === Syntax.VariableDeclaration && node.left.kind !== "var") { + this.scopeManager.__nestForScope(node); + } + + if (node.left.type === Syntax.VariableDeclaration) { + this.visit(node.left); + this.visitPattern(node.left.declarations[0].id, pattern => { + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, null, true, true); + }); + } else { + this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => { + let maybeImplicitGlobal = null; + + if (!this.currentScope().isStrict) { + maybeImplicitGlobal = { + pattern, + node + }; + } + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, true, false); + }); + } + this.visit(node.right); + this.visit(node.body); + + this.close(node); + } + + visitVariableDeclaration(variableTargetScope, type, node, index) { + + const decl = node.declarations[index]; + const init = decl.init; + + this.visitPattern(decl.id, { processRightHandNodes: true }, (pattern, info) => { + variableTargetScope.__define( + pattern, + new Definition( + type, + pattern, + decl, + node, + index, + node.kind + ) + ); + + this.referencingDefaultValue(pattern, info.assignments, null, true); + if (init) { + this.currentScope().__referencing(pattern, Reference.WRITE, init, null, !info.topLevel, true); + } + }); + } + + AssignmentExpression(node) { + if (PatternVisitor.isPattern(node.left)) { + if (node.operator === "=") { + this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => { + let maybeImplicitGlobal = null; + + if (!this.currentScope().isStrict) { + maybeImplicitGlobal = { + pattern, + node + }; + } + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, !info.topLevel, false); + }); + } else { + this.currentScope().__referencing(node.left, Reference.RW, node.right); + } + } else { + this.visit(node.left); + } + this.visit(node.right); + } + + CatchClause(node) { + this.scopeManager.__nestCatchScope(node); + + this.visitPattern(node.param, { processRightHandNodes: true }, (pattern, info) => { + this.currentScope().__define(pattern, + new Definition( + Variable.CatchClause, + node.param, + node, + null, + null, + null + )); + this.referencingDefaultValue(pattern, info.assignments, null, true); + }); + this.visit(node.body); + + this.close(node); + } + + Program(node) { + this.scopeManager.__nestGlobalScope(node); + + if (this.scopeManager.__isNodejsScope()) { + + // Force strictness of GlobalScope to false when using node.js scope. + this.currentScope().isStrict = false; + this.scopeManager.__nestFunctionScope(node, false); + } + + if (this.scopeManager.__isES6() && this.scopeManager.isModule()) { + this.scopeManager.__nestModuleScope(node); + } + + if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) { + this.currentScope().isStrict = true; + } + + this.visitChildren(node); + this.close(node); + } + + Identifier(node) { + this.currentScope().__referencing(node); + } + + UpdateExpression(node) { + if (PatternVisitor.isPattern(node.argument)) { + this.currentScope().__referencing(node.argument, Reference.RW, null); + } else { + this.visitChildren(node); + } + } + + MemberExpression(node) { + this.visit(node.object); + if (node.computed) { + this.visit(node.property); + } + } + + Property(node) { + this.visitProperty(node); + } + + MethodDefinition(node) { + this.visitProperty(node); + } + + BreakStatement() {} // eslint-disable-line class-methods-use-this + + ContinueStatement() {} // eslint-disable-line class-methods-use-this + + LabeledStatement(node) { + this.visit(node.body); + } + + ForStatement(node) { + + // Create ForStatement declaration. + // NOTE: In ES6, ForStatement dynamically generates + // per iteration environment. However, escope is + // a static analyzer, we only generate one scope for ForStatement. + if (node.init && node.init.type === Syntax.VariableDeclaration && node.init.kind !== "var") { + this.scopeManager.__nestForScope(node); + } + + this.visitChildren(node); + + this.close(node); + } + + ClassExpression(node) { + this.visitClass(node); + } + + ClassDeclaration(node) { + this.visitClass(node); + } + + CallExpression(node) { + + // Check this is direct call to eval + if (!this.scopeManager.__ignoreEval() && node.callee.type === Syntax.Identifier && node.callee.name === "eval") { + + // NOTE: This should be `variableScope`. Since direct eval call always creates Lexical environment and + // let / const should be enclosed into it. Only VariableDeclaration affects on the caller's environment. + this.currentScope().variableScope.__detectEval(); + } + this.visitChildren(node); + } + + BlockStatement(node) { + if (this.scopeManager.__isES6()) { + this.scopeManager.__nestBlockScope(node); + } + + this.visitChildren(node); + + this.close(node); + } + + ThisExpression() { + this.currentScope().variableScope.__detectThis(); + } + + WithStatement(node) { + this.visit(node.object); + + // Then nest scope for WithStatement. + this.scopeManager.__nestWithScope(node); + + this.visit(node.body); + + this.close(node); + } + + VariableDeclaration(node) { + const variableTargetScope = (node.kind === "var") ? this.currentScope().variableScope : this.currentScope(); + + for (let i = 0, iz = node.declarations.length; i < iz; ++i) { + const decl = node.declarations[i]; + + this.visitVariableDeclaration(variableTargetScope, Variable.Variable, node, i); + if (decl.init) { + this.visit(decl.init); + } + } + } + + // sec 13.11.8 + SwitchStatement(node) { + this.visit(node.discriminant); + + if (this.scopeManager.__isES6()) { + this.scopeManager.__nestSwitchScope(node); + } + + for (let i = 0, iz = node.cases.length; i < iz; ++i) { + this.visit(node.cases[i]); + } + + this.close(node); + } + + FunctionDeclaration(node) { + this.visitFunction(node); + } + + FunctionExpression(node) { + this.visitFunction(node); + } + + ForOfStatement(node) { + this.visitForIn(node); + } + + ForInStatement(node) { + this.visitForIn(node); + } + + ArrowFunctionExpression(node) { + this.visitFunction(node); + } + + ImportDeclaration(node) { + assert(this.scopeManager.__isES6() && this.scopeManager.isModule(), "ImportDeclaration should appear when the mode is ES6 and in the module context."); + + const importer = new Importer(node, this); + + importer.visit(node); + } + + visitExportDeclaration(node) { + if (node.source) { + return; + } + if (node.declaration) { + this.visit(node.declaration); + return; + } + + this.visitChildren(node); + } + + // TODO: ExportDeclaration doesn't exist. for bc? + ExportDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportAllDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportDefaultDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportNamedDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportSpecifier(node) { + + // TODO: `node.id` doesn't exist. for bc? + const local = (node.id || node.local); + + this.visit(local); + } + + MetaProperty() { // eslint-disable-line class-methods-use-this + + // do nothing. + } +} + +module.exports = Referencer; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope-manager.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope-manager.js new file mode 100644 index 00000000000000..c1927994b1166e --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope-manager.js @@ -0,0 +1,247 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +/* eslint-disable no-underscore-dangle */ + +const Scope = require("./scope"); +const assert = require("assert"); + +const GlobalScope = Scope.GlobalScope; +const CatchScope = Scope.CatchScope; +const WithScope = Scope.WithScope; +const ModuleScope = Scope.ModuleScope; +const ClassScope = Scope.ClassScope; +const SwitchScope = Scope.SwitchScope; +const FunctionScope = Scope.FunctionScope; +const ForScope = Scope.ForScope; +const FunctionExpressionNameScope = Scope.FunctionExpressionNameScope; +const BlockScope = Scope.BlockScope; + +/** + * @class ScopeManager + */ +class ScopeManager { + constructor(options) { + this.scopes = []; + this.globalScope = null; + this.__nodeToScope = new WeakMap(); + this.__currentScope = null; + this.__options = options; + this.__declaredVariables = new WeakMap(); + } + + __useDirective() { + return this.__options.directive; + } + + __isOptimistic() { + return this.__options.optimistic; + } + + __ignoreEval() { + return this.__options.ignoreEval; + } + + __isNodejsScope() { + return this.__options.nodejsScope; + } + + isModule() { + return this.__options.sourceType === "module"; + } + + isImpliedStrict() { + return this.__options.impliedStrict; + } + + isStrictModeSupported() { + return this.__options.ecmaVersion >= 5; + } + + // Returns appropriate scope for this node. + __get(node) { + return this.__nodeToScope.get(node); + } + + /** + * Get variables that are declared by the node. + * + * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`. + * If the node declares nothing, this method returns an empty array. + * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details. + * + * @param {Espree.Node} node - a node to get. + * @returns {Variable[]} variables that declared by the node. + */ + getDeclaredVariables(node) { + return this.__declaredVariables.get(node) || []; + } + + /** + * acquire scope from node. + * @method ScopeManager#acquire + * @param {Espree.Node} node - node for the acquired scope. + * @param {boolean=} inner - look up the most inner scope, default value is false. + * @returns {Scope?} Scope from node + */ + acquire(node, inner) { + + /** + * predicate + * @param {Scope} testScope - scope to test + * @returns {boolean} predicate + */ + function predicate(testScope) { + if (testScope.type === "function" && testScope.functionExpressionScope) { + return false; + } + return true; + } + + const scopes = this.__get(node); + + if (!scopes || scopes.length === 0) { + return null; + } + + // Heuristic selection from all scopes. + // If you would like to get all scopes, please use ScopeManager#acquireAll. + if (scopes.length === 1) { + return scopes[0]; + } + + if (inner) { + for (let i = scopes.length - 1; i >= 0; --i) { + const scope = scopes[i]; + + if (predicate(scope)) { + return scope; + } + } + } else { + for (let i = 0, iz = scopes.length; i < iz; ++i) { + const scope = scopes[i]; + + if (predicate(scope)) { + return scope; + } + } + } + + return null; + } + + /** + * acquire all scopes from node. + * @method ScopeManager#acquireAll + * @param {Espree.Node} node - node for the acquired scope. + * @returns {Scopes?} Scope array + */ + acquireAll(node) { + return this.__get(node); + } + + /** + * release the node. + * @method ScopeManager#release + * @param {Espree.Node} node - releasing node. + * @param {boolean=} inner - look up the most inner scope, default value is false. + * @returns {Scope?} upper scope for the node. + */ + release(node, inner) { + const scopes = this.__get(node); + + if (scopes && scopes.length) { + const scope = scopes[0].upper; + + if (!scope) { + return null; + } + return this.acquire(scope.block, inner); + } + return null; + } + + attach() { } // eslint-disable-line class-methods-use-this + + detach() { } // eslint-disable-line class-methods-use-this + + __nestScope(scope) { + if (scope instanceof GlobalScope) { + assert(this.__currentScope === null); + this.globalScope = scope; + } + this.__currentScope = scope; + return scope; + } + + __nestGlobalScope(node) { + return this.__nestScope(new GlobalScope(this, node)); + } + + __nestBlockScope(node) { + return this.__nestScope(new BlockScope(this, this.__currentScope, node)); + } + + __nestFunctionScope(node, isMethodDefinition) { + return this.__nestScope(new FunctionScope(this, this.__currentScope, node, isMethodDefinition)); + } + + __nestForScope(node) { + return this.__nestScope(new ForScope(this, this.__currentScope, node)); + } + + __nestCatchScope(node) { + return this.__nestScope(new CatchScope(this, this.__currentScope, node)); + } + + __nestWithScope(node) { + return this.__nestScope(new WithScope(this, this.__currentScope, node)); + } + + __nestClassScope(node) { + return this.__nestScope(new ClassScope(this, this.__currentScope, node)); + } + + __nestSwitchScope(node) { + return this.__nestScope(new SwitchScope(this, this.__currentScope, node)); + } + + __nestModuleScope(node) { + return this.__nestScope(new ModuleScope(this, this.__currentScope, node)); + } + + __nestFunctionExpressionNameScope(node) { + return this.__nestScope(new FunctionExpressionNameScope(this, this.__currentScope, node)); + } + + __isES6() { + return this.__options.ecmaVersion >= 6; + } +} + +module.exports = ScopeManager; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope.js new file mode 100644 index 00000000000000..5c4c967780a3e5 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope.js @@ -0,0 +1,748 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +/* eslint-disable no-underscore-dangle */ +/* eslint-disable no-undefined */ + +const Syntax = require("estraverse").Syntax; + +const Reference = require("./reference"); +const Variable = require("./variable"); +const Definition = require("./definition").Definition; +const assert = require("assert"); + +/** + * Test if scope is struct + * @param {Scope} scope - scope + * @param {Block} block - block + * @param {boolean} isMethodDefinition - is method definiton + * @param {boolean} useDirective - use directive + * @returns {boolean} is strict scope + */ +function isStrictScope(scope, block, isMethodDefinition, useDirective) { + let body; + + // When upper scope is exists and strict, inner scope is also strict. + if (scope.upper && scope.upper.isStrict) { + return true; + } + + if (isMethodDefinition) { + return true; + } + + if (scope.type === "class" || scope.type === "module") { + return true; + } + + if (scope.type === "block" || scope.type === "switch") { + return false; + } + + if (scope.type === "function") { + if (block.type === Syntax.ArrowFunctionExpression && block.body.type !== Syntax.BlockStatement) { + return false; + } + + if (block.type === Syntax.Program) { + body = block; + } else { + body = block.body; + } + + if (!body) { + return false; + } + } else if (scope.type === "global") { + body = block; + } else { + return false; + } + + // Search 'use strict' directive. + if (useDirective) { + for (let i = 0, iz = body.body.length; i < iz; ++i) { + const stmt = body.body[i]; + + if (stmt.type !== Syntax.DirectiveStatement) { + break; + } + if (stmt.raw === "\"use strict\"" || stmt.raw === "'use strict'") { + return true; + } + } + } else { + for (let i = 0, iz = body.body.length; i < iz; ++i) { + const stmt = body.body[i]; + + if (stmt.type !== Syntax.ExpressionStatement) { + break; + } + const expr = stmt.expression; + + if (expr.type !== Syntax.Literal || typeof expr.value !== "string") { + break; + } + if (expr.raw !== null && expr.raw !== undefined) { + if (expr.raw === "\"use strict\"" || expr.raw === "'use strict'") { + return true; + } + } else { + if (expr.value === "use strict") { + return true; + } + } + } + } + return false; +} + +/** + * Register scope + * @param {ScopeManager} scopeManager - scope manager + * @param {Scope} scope - scope + * @returns {void} + */ +function registerScope(scopeManager, scope) { + scopeManager.scopes.push(scope); + + const scopes = scopeManager.__nodeToScope.get(scope.block); + + if (scopes) { + scopes.push(scope); + } else { + scopeManager.__nodeToScope.set(scope.block, [scope]); + } +} + +/** + * Should be statically + * @param {Object} def - def + * @returns {boolean} should be statically + */ +function shouldBeStatically(def) { + return ( + (def.type === Variable.ClassName) || + (def.type === Variable.Variable && def.parent.kind !== "var") + ); +} + +/** + * @class Scope + */ +class Scope { + constructor(scopeManager, type, upperScope, block, isMethodDefinition) { + + /** + * One of 'module', 'block', 'switch', 'function', 'catch', 'with', 'function', 'class', 'global'. + * @member {String} Scope#type + */ + this.type = type; + + /** + * The scoped {@link Variable}s of this scope, as { Variable.name + * : Variable }. + * @member {Map} Scope#set + */ + this.set = new Map(); + + /** + * The tainted variables of this scope, as { Variable.name : + * boolean }. + * @member {Map} Scope#taints */ + this.taints = new Map(); + + /** + * Generally, through the lexical scoping of JS you can always know + * which variable an identifier in the source code refers to. There are + * a few exceptions to this rule. With 'global' and 'with' scopes you + * can only decide at runtime which variable a reference refers to. + * Moreover, if 'eval()' is used in a scope, it might introduce new + * bindings in this or its parent scopes. + * All those scopes are considered 'dynamic'. + * @member {boolean} Scope#dynamic + */ + this.dynamic = this.type === "global" || this.type === "with"; + + /** + * A reference to the scope-defining syntax node. + * @member {espree.Node} Scope#block + */ + this.block = block; + + /** + * The {@link Reference|references} that are not resolved with this scope. + * @member {Reference[]} Scope#through + */ + this.through = []; + + /** + * The scoped {@link Variable}s of this scope. In the case of a + * 'function' scope this includes the automatic argument arguments as + * its first element, as well as all further formal arguments. + * @member {Variable[]} Scope#variables + */ + this.variables = []; + + /** + * Any variable {@link Reference|reference} found in this scope. This + * includes occurrences of local variables as well as variables from + * parent scopes (including the global scope). For local variables + * this also includes defining occurrences (like in a 'var' statement). + * In a 'function' scope this does not include the occurrences of the + * formal parameter in the parameter list. + * @member {Reference[]} Scope#references + */ + this.references = []; + + /** + * For 'global' and 'function' scopes, this is a self-reference. For + * other scope types this is the variableScope value of the + * parent scope. + * @member {Scope} Scope#variableScope + */ + this.variableScope = + (this.type === "global" || this.type === "function" || this.type === "module") ? this : upperScope.variableScope; + + /** + * Whether this scope is created by a FunctionExpression. + * @member {boolean} Scope#functionExpressionScope + */ + this.functionExpressionScope = false; + + /** + * Whether this is a scope that contains an 'eval()' invocation. + * @member {boolean} Scope#directCallToEvalScope + */ + this.directCallToEvalScope = false; + + /** + * @member {boolean} Scope#thisFound + */ + this.thisFound = false; + + this.__left = []; + + /** + * Reference to the parent {@link Scope|scope}. + * @member {Scope} Scope#upper + */ + this.upper = upperScope; + + /** + * Whether 'use strict' is in effect in this scope. + * @member {boolean} Scope#isStrict + */ + this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective()); + + /** + * List of nested {@link Scope}s. + * @member {Scope[]} Scope#childScopes + */ + this.childScopes = []; + if (this.upper) { + this.upper.childScopes.push(this); + } + + this.__declaredVariables = scopeManager.__declaredVariables; + + registerScope(scopeManager, this); + } + + __shouldStaticallyClose(scopeManager) { + return (!this.dynamic || scopeManager.__isOptimistic()); + } + + __shouldStaticallyCloseForGlobal(ref) { + + // On global scope, let/const/class declarations should be resolved statically. + const name = ref.identifier.name; + + if (!this.set.has(name)) { + return false; + } + + const variable = this.set.get(name); + const defs = variable.defs; + + return defs.length > 0 && defs.every(shouldBeStatically); + } + + __staticCloseRef(ref) { + if (!this.__resolve(ref)) { + this.__delegateToUpperScope(ref); + } + } + + __dynamicCloseRef(ref) { + + // notify all names are through to global + let current = this; + + do { + current.through.push(ref); + current = current.upper; + } while (current); + } + + __globalCloseRef(ref) { + + // let/const/class declarations should be resolved statically. + // others should be resolved dynamically. + if (this.__shouldStaticallyCloseForGlobal(ref)) { + this.__staticCloseRef(ref); + } else { + this.__dynamicCloseRef(ref); + } + } + + __close(scopeManager) { + let closeRef; + + if (this.__shouldStaticallyClose(scopeManager)) { + closeRef = this.__staticCloseRef; + } else if (this.type !== "global") { + closeRef = this.__dynamicCloseRef; + } else { + closeRef = this.__globalCloseRef; + } + + // Try Resolving all references in this scope. + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + closeRef.call(this, ref); + } + this.__left = null; + + return this.upper; + } + + // To override by function scopes. + // References in default parameters isn't resolved to variables which are in their function body. + __isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars + return true; + } + + __resolve(ref) { + const name = ref.identifier.name; + + if (!this.set.has(name)) { + return false; + } + const variable = this.set.get(name); + + if (!this.__isValidResolution(ref, variable)) { + return false; + } + variable.references.push(ref); + variable.stack = variable.stack && ref.from.variableScope === this.variableScope; + if (ref.tainted) { + variable.tainted = true; + this.taints.set(variable.name, true); + } + ref.resolved = variable; + + return true; + } + + __delegateToUpperScope(ref) { + if (this.upper) { + this.upper.__left.push(ref); + } + this.through.push(ref); + } + + __addDeclaredVariablesOfNode(variable, node) { + if (node === null || node === undefined) { + return; + } + + let variables = this.__declaredVariables.get(node); + + if (variables === null || variables === undefined) { + variables = []; + this.__declaredVariables.set(node, variables); + } + if (variables.indexOf(variable) === -1) { + variables.push(variable); + } + } + + __defineGeneric(name, set, variables, node, def) { + let variable; + + variable = set.get(name); + if (!variable) { + variable = new Variable(name, this); + set.set(name, variable); + variables.push(variable); + } + + if (def) { + variable.defs.push(def); + this.__addDeclaredVariablesOfNode(variable, def.node); + this.__addDeclaredVariablesOfNode(variable, def.parent); + } + if (node) { + variable.identifiers.push(node); + } + } + + __define(node, def) { + if (node && node.type === Syntax.Identifier) { + this.__defineGeneric( + node.name, + this.set, + this.variables, + node, + def + ); + } + } + + __referencing(node, assign, writeExpr, maybeImplicitGlobal, partial, init) { + + // because Array element may be null + if (!node || node.type !== Syntax.Identifier) { + return; + } + + // Specially handle like `this`. + if (node.name === "super") { + return; + } + + const ref = new Reference(node, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init); + + this.references.push(ref); + this.__left.push(ref); + } + + __detectEval() { + let current = this; + + this.directCallToEvalScope = true; + do { + current.dynamic = true; + current = current.upper; + } while (current); + } + + __detectThis() { + this.thisFound = true; + } + + __isClosed() { + return this.__left === null; + } + + /** + * returns resolved {Reference} + * @method Scope#resolve + * @param {Espree.Identifier} ident - identifier to be resolved. + * @returns {Reference} reference + */ + resolve(ident) { + let ref, i, iz; + + assert(this.__isClosed(), "Scope should be closed."); + assert(ident.type === Syntax.Identifier, "Target should be identifier."); + for (i = 0, iz = this.references.length; i < iz; ++i) { + ref = this.references[i]; + if (ref.identifier === ident) { + return ref; + } + } + return null; + } + + /** + * returns this scope is static + * @method Scope#isStatic + * @returns {boolean} static + */ + isStatic() { + return !this.dynamic; + } + + /** + * returns this scope has materialized arguments + * @method Scope#isArgumentsMaterialized + * @returns {boolean} arguemnts materialized + */ + isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this + return true; + } + + /** + * returns this scope has materialized `this` reference + * @method Scope#isThisMaterialized + * @returns {boolean} this materialized + */ + isThisMaterialized() { // eslint-disable-line class-methods-use-this + return true; + } + + isUsedName(name) { + if (this.set.has(name)) { + return true; + } + for (let i = 0, iz = this.through.length; i < iz; ++i) { + if (this.through[i].identifier.name === name) { + return true; + } + } + return false; + } +} + +class GlobalScope extends Scope { + constructor(scopeManager, block) { + super(scopeManager, "global", null, block, false); + this.implicit = { + set: new Map(), + variables: [], + + /** + * List of {@link Reference}s that are left to be resolved (i.e. which + * need to be linked to the variable they refer to). + * @member {Reference[]} Scope#implicit#left + */ + left: [] + }; + } + + __close(scopeManager) { + const implicit = []; + + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) { + implicit.push(ref.__maybeImplicitGlobal); + } + } + + // create an implicit global variable from assignment expression + for (let i = 0, iz = implicit.length; i < iz; ++i) { + const info = implicit[i]; + + this.__defineImplicit(info.pattern, + new Definition( + Variable.ImplicitGlobalVariable, + info.pattern, + info.node, + null, + null, + null + )); + + } + + this.implicit.left = this.__left; + + return super.__close(scopeManager); + } + + __defineImplicit(node, def) { + if (node && node.type === Syntax.Identifier) { + this.__defineGeneric( + node.name, + this.implicit.set, + this.implicit.variables, + node, + def + ); + } + } +} + +class ModuleScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "module", upperScope, block, false); + } +} + +class FunctionExpressionNameScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "function-expression-name", upperScope, block, false); + this.__define(block.id, + new Definition( + Variable.FunctionName, + block.id, + block, + null, + null, + null + )); + this.functionExpressionScope = true; + } +} + +class CatchScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "catch", upperScope, block, false); + } +} + +class WithScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "with", upperScope, block, false); + } + + __close(scopeManager) { + if (this.__shouldStaticallyClose(scopeManager)) { + return super.__close(scopeManager); + } + + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + ref.tainted = true; + this.__delegateToUpperScope(ref); + } + this.__left = null; + + return this.upper; + } +} + +class BlockScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "block", upperScope, block, false); + } +} + +class SwitchScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "switch", upperScope, block, false); + } +} + +class FunctionScope extends Scope { + constructor(scopeManager, upperScope, block, isMethodDefinition) { + super(scopeManager, "function", upperScope, block, isMethodDefinition); + + // section 9.2.13, FunctionDeclarationInstantiation. + // NOTE Arrow functions never have an arguments objects. + if (this.block.type !== Syntax.ArrowFunctionExpression) { + this.__defineArguments(); + } + } + + isArgumentsMaterialized() { + + // TODO(Constellation) + // We can more aggressive on this condition like this. + // + // function t() { + // // arguments of t is always hidden. + // function arguments() { + // } + // } + if (this.block.type === Syntax.ArrowFunctionExpression) { + return false; + } + + if (!this.isStatic()) { + return true; + } + + const variable = this.set.get("arguments"); + + assert(variable, "Always have arguments variable."); + return variable.tainted || variable.references.length !== 0; + } + + isThisMaterialized() { + if (!this.isStatic()) { + return true; + } + return this.thisFound; + } + + __defineArguments() { + this.__defineGeneric( + "arguments", + this.set, + this.variables, + null, + null + ); + this.taints.set("arguments", true); + } + + // References in default parameters isn't resolved to variables which are in their function body. + // const x = 1 + // function f(a = x) { // This `x` is resolved to the `x` in the outer scope. + // const x = 2 + // console.log(a) + // } + __isValidResolution(ref, variable) { + + // If `options.nodejsScope` is true, `this.block` becomes a Program node. + if (this.block.type === "Program") { + return true; + } + + const bodyStart = this.block.body.range[0]; + + // It's invalid resolution in the following case: + return !( + variable.scope === this && + ref.identifier.range[0] < bodyStart && // the reference is in the parameter part. + variable.defs.every(d => d.name.range[0] >= bodyStart) // the variable is in the body. + ); + } +} + +class ForScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "for", upperScope, block, false); + } +} + +class ClassScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "class", upperScope, block, false); + } +} + +module.exports = { + Scope, + GlobalScope, + ModuleScope, + FunctionExpressionNameScope, + CatchScope, + WithScope, + BlockScope, + SwitchScope, + FunctionScope, + ForScope, + ClassScope +}; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/variable.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/variable.js new file mode 100644 index 00000000000000..702c4780a248a3 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/variable.js @@ -0,0 +1,88 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +/** + * A Variable represents a locally scoped identifier. These include arguments to + * functions. + * @class Variable + */ +class Variable { + constructor(name, scope) { + + /** + * The variable name, as given in the source code. + * @member {String} Variable#name + */ + this.name = name; + + /** + * List of defining occurrences of this variable (like in 'var ...' + * statements or as parameter), as AST nodes. + * @member {espree.Identifier[]} Variable#identifiers + */ + this.identifiers = []; + + /** + * List of {@link Reference|references} of this variable (excluding parameter entries) + * in its defining scope and all nested scopes. For defining + * occurrences only see {@link Variable#defs}. + * @member {Reference[]} Variable#references + */ + this.references = []; + + /** + * List of defining occurrences of this variable (like in 'var ...' + * statements or as parameter), as custom objects. + * @member {Definition[]} Variable#defs + */ + this.defs = []; + + this.tainted = false; + + /** + * Whether this is a stack variable. + * @member {boolean} Variable#stack + */ + this.stack = true; + + /** + * Reference to the enclosing Scope. + * @member {Scope} Variable#scope + */ + this.scope = scope; + } +} + +Variable.CatchClause = "CatchClause"; +Variable.Parameter = "Parameter"; +Variable.FunctionName = "FunctionName"; +Variable.ClassName = "ClassName"; +Variable.Variable = "Variable"; +Variable.ImportBinding = "ImportBinding"; +Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable"; + +module.exports = Variable; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/package.json new file mode 100644 index 00000000000000..a19fd8ce712203 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/package.json @@ -0,0 +1,48 @@ +{ + "name": "eslint-scope", + "description": "ECMAScript scope analyzer for ESLint", + "homepage": "http://github.com/eslint/eslint-scope", + "main": "lib/index.js", + "version": "5.1.0", + "engines": { + "node": ">=8.0.0" + }, + "repository": "eslint/eslint-scope", + "bugs": { + "url": "https://github.com/eslint/eslint-scope/issues" + }, + "license": "BSD-2-Clause", + "scripts": { + "test": "node Makefile.js test", + "lint": "node Makefile.js lint", + "generate-release": "eslint-generate-release", + "generate-alpharelease": "eslint-generate-prerelease alpha", + "generate-betarelease": "eslint-generate-prerelease beta", + "generate-rcrelease": "eslint-generate-prerelease rc", + "publish-release": "eslint-publish-release" + }, + "files": [ + "LICENSE", + "README.md", + "lib" + ], + "dependencies": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "devDependencies": { + "@typescript-eslint/parser": "^1.11.0", + "chai": "^4.2.0", + "eslint": "^6.0.1", + "eslint-config-eslint": "^5.0.1", + "eslint-plugin-node": "^9.1.0", + "eslint-release": "^1.0.0", + "eslint-visitor-keys": "^1.2.0", + "espree": "^7.1.0", + "istanbul": "^0.4.5", + "mocha": "^6.1.4", + "npm-license": "^0.3.3", + "shelljs": "^0.8.3", + "typescript": "^3.5.2" + } +} diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/LICENSE b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/LICENSE similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/LICENSE rename to tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/LICENSE diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/README.md similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/README.md rename to tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/README.md diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/index.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/index.js similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/index.js rename to tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/index.js diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.json b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/visitor-keys.json similarity index 98% rename from tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.json rename to tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/visitor-keys.json index d31b7b29439a13..a33bbc66005b6a 100644 --- a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.json +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/visitor-keys.json @@ -38,6 +38,9 @@ "param", "body" ], + "ChainExpression": [ + "expression" + ], "ClassBody": [ "body" ], @@ -66,6 +69,7 @@ ], "EmptyStatement": [], "ExportAllDeclaration": [ + "exported", "source" ], "ExportDefaultDeclaration": [ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/package.json new file mode 100644 index 00000000000000..63267be6437e03 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/package.json @@ -0,0 +1,40 @@ +{ + "name": "eslint-visitor-keys", + "version": "1.3.0", + "description": "Constants and utilities about visitor keys to traverse AST.", + "main": "lib/index.js", + "files": [ + "lib" + ], + "engines": { + "node": ">=4" + }, + "dependencies": {}, + "devDependencies": { + "eslint": "^4.7.2", + "eslint-config-eslint": "^4.0.0", + "eslint-release": "^1.0.0", + "mocha": "^3.5.3", + "nyc": "^11.2.1", + "opener": "^1.4.3" + }, + "scripts": { + "lint": "eslint lib tests/lib", + "pretest": "npm run -s lint", + "test": "nyc mocha tests/lib", + "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", + "generate-release": "eslint-generate-release", + "generate-alpharelease": "eslint-generate-prerelease alpha", + "generate-betarelease": "eslint-generate-prerelease beta", + "generate-rcrelease": "eslint-generate-prerelease rc", + "publish-release": "eslint-publish-release" + }, + "repository": "eslint/eslint-visitor-keys", + "keywords": [], + "author": "Toru Nagashima (https://github.com/mysticatea)", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/eslint/eslint-visitor-keys/issues" + }, + "homepage": "https://github.com/eslint/eslint-visitor-keys#readme" +} diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/README.md new file mode 100644 index 00000000000000..ffea6b434a4a63 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/README.md @@ -0,0 +1,171 @@ +### Esrecurse [![Build Status](https://travis-ci.org/estools/esrecurse.svg?branch=master)](https://travis-ci.org/estools/esrecurse) + +Esrecurse ([esrecurse](https://github.com/estools/esrecurse)) is +[ECMAScript](https://www.ecma-international.org/publications/standards/Ecma-262.htm) +recursive traversing functionality. + +### Example Usage + +The following code will output all variables declared at the root of a file. + +```javascript +esrecurse.visit(ast, { + XXXStatement: function (node) { + this.visit(node.left); + // do something... + this.visit(node.right); + } +}); +``` + +We can use `Visitor` instance. + +```javascript +var visitor = new esrecurse.Visitor({ + XXXStatement: function (node) { + this.visit(node.left); + // do something... + this.visit(node.right); + } +}); + +visitor.visit(ast); +``` + +We can inherit `Visitor` instance easily. + +```javascript +class Derived extends esrecurse.Visitor { + constructor() + { + super(null); + } + + XXXStatement(node) { + } +} +``` + +```javascript +function DerivedVisitor() { + esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */); +} +util.inherits(DerivedVisitor, esrecurse.Visitor); +DerivedVisitor.prototype.XXXStatement = function (node) { + this.visit(node.left); + // do something... + this.visit(node.right); +}; +``` + +And you can invoke default visiting operation inside custom visit operation. + +```javascript +function DerivedVisitor() { + esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */); +} +util.inherits(DerivedVisitor, esrecurse.Visitor); +DerivedVisitor.prototype.XXXStatement = function (node) { + // do something... + this.visitChildren(node); +}; +``` + +The `childVisitorKeys` option does customize the behaviour of `this.visitChildren(node)`. +We can use user-defined node types. + +```javascript +// This tree contains a user-defined `TestExpression` node. +var tree = { + type: 'TestExpression', + + // This 'argument' is the property containing the other **node**. + argument: { + type: 'Literal', + value: 20 + }, + + // This 'extended' is the property not containing the other **node**. + extended: true +}; +esrecurse.visit( + ast, + { + Literal: function (node) { + // do something... + } + }, + { + // Extending the existing traversing rules. + childVisitorKeys: { + // TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ] + TestExpression: ['argument'] + } + } +); +``` + +We can use the `fallback` option as well. +If the `fallback` option is `"iteration"`, `esrecurse` would visit all enumerable properties of unknown nodes. +Please note circular references cause the stack overflow. AST might have circular references in additional properties for some purpose (e.g. `node.parent`). + +```javascript +esrecurse.visit( + ast, + { + Literal: function (node) { + // do something... + } + }, + { + fallback: 'iteration' + } +); +``` + +If the `fallback` option is a function, `esrecurse` calls this function to determine the enumerable properties of unknown nodes. +Please note circular references cause the stack overflow. AST might have circular references in additional properties for some purpose (e.g. `node.parent`). + +```javascript +esrecurse.visit( + ast, + { + Literal: function (node) { + // do something... + } + }, + { + fallback: function (node) { + return Object.keys(node).filter(function(key) { + return key !== 'argument' + }); + } + } +); +``` + +### License + +Copyright (C) 2014 [Yusuke Suzuki](https://github.com/Constellation) + (twitter: [@Constellation](https://twitter.com/Constellation)) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/esrecurse.js b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/esrecurse.js new file mode 100644 index 00000000000000..15d57dfd0218f6 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/esrecurse.js @@ -0,0 +1,117 @@ +/* + Copyright (C) 2014 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +(function () { + 'use strict'; + + var estraverse = require('estraverse'); + + function isNode(node) { + if (node == null) { + return false; + } + return typeof node === 'object' && typeof node.type === 'string'; + } + + function isProperty(nodeType, key) { + return (nodeType === estraverse.Syntax.ObjectExpression || nodeType === estraverse.Syntax.ObjectPattern) && key === 'properties'; + } + + function Visitor(visitor, options) { + options = options || {}; + + this.__visitor = visitor || this; + this.__childVisitorKeys = options.childVisitorKeys + ? Object.assign({}, estraverse.VisitorKeys, options.childVisitorKeys) + : estraverse.VisitorKeys; + if (options.fallback === 'iteration') { + this.__fallback = Object.keys; + } else if (typeof options.fallback === 'function') { + this.__fallback = options.fallback; + } + } + + /* Default method for visiting children. + * When you need to call default visiting operation inside custom visiting + * operation, you can use it with `this.visitChildren(node)`. + */ + Visitor.prototype.visitChildren = function (node) { + var type, children, i, iz, j, jz, child; + + if (node == null) { + return; + } + + type = node.type || estraverse.Syntax.Property; + + children = this.__childVisitorKeys[type]; + if (!children) { + if (this.__fallback) { + children = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + type + '.'); + } + } + + for (i = 0, iz = children.length; i < iz; ++i) { + child = node[children[i]]; + if (child) { + if (Array.isArray(child)) { + for (j = 0, jz = child.length; j < jz; ++j) { + if (child[j]) { + if (isNode(child[j]) || isProperty(type, children[i])) { + this.visit(child[j]); + } + } + } + } else if (isNode(child)) { + this.visit(child); + } + } + } + }; + + /* Dispatching node. */ + Visitor.prototype.visit = function (node) { + var type; + + if (node == null) { + return; + } + + type = node.type || estraverse.Syntax.Property; + if (this.__visitor[type]) { + this.__visitor[type].call(this, node); + return; + } + this.visitChildren(node); + }; + + exports.version = require('./package.json').version; + exports.Visitor = Visitor; + exports.visit = function (node, visitor, options) { + var v = new Visitor(visitor, options); + v.visit(node); + }; +}()); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/LICENSE.BSD b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD similarity index 100% rename from tools/node_modules/babel-eslint/node_modules/esutils/LICENSE.BSD rename to tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/README.md new file mode 100644 index 00000000000000..ccd3377f3e9449 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/README.md @@ -0,0 +1,153 @@ +### Estraverse [![Build Status](https://secure.travis-ci.org/estools/estraverse.svg)](http://travis-ci.org/estools/estraverse) + +Estraverse ([estraverse](http://github.com/estools/estraverse)) is +[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +traversal functions from [esmangle project](http://github.com/estools/esmangle). + +### Documentation + +You can find usage docs at [wiki page](https://github.com/estools/estraverse/wiki/Usage). + +### Example Usage + +The following code will output all variables declared at the root of a file. + +```javascript +estraverse.traverse(ast, { + enter: function (node, parent) { + if (node.type == 'FunctionExpression' || node.type == 'FunctionDeclaration') + return estraverse.VisitorOption.Skip; + }, + leave: function (node, parent) { + if (node.type == 'VariableDeclarator') + console.log(node.id.name); + } +}); +``` + +We can use `this.skip`, `this.remove` and `this.break` functions instead of using Skip, Remove and Break. + +```javascript +estraverse.traverse(ast, { + enter: function (node) { + this.break(); + } +}); +``` + +And estraverse provides `estraverse.replace` function. When returning node from `enter`/`leave`, current node is replaced with it. + +```javascript +result = estraverse.replace(tree, { + enter: function (node) { + // Replace it with replaced. + if (node.type === 'Literal') + return replaced; + } +}); +``` + +By passing `visitor.keys` mapping, we can extend estraverse traversing functionality. + +```javascript +// This tree contains a user-defined `TestExpression` node. +var tree = { + type: 'TestExpression', + + // This 'argument' is the property containing the other **node**. + argument: { + type: 'Literal', + value: 20 + }, + + // This 'extended' is the property not containing the other **node**. + extended: true +}; +estraverse.traverse(tree, { + enter: function (node) { }, + + // Extending the existing traversing rules. + keys: { + // TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ] + TestExpression: ['argument'] + } +}); +``` + +By passing `visitor.fallback` option, we can control the behavior when encountering unknown nodes. + +```javascript +// This tree contains a user-defined `TestExpression` node. +var tree = { + type: 'TestExpression', + + // This 'argument' is the property containing the other **node**. + argument: { + type: 'Literal', + value: 20 + }, + + // This 'extended' is the property not containing the other **node**. + extended: true +}; +estraverse.traverse(tree, { + enter: function (node) { }, + + // Iterating the child **nodes** of unknown nodes. + fallback: 'iteration' +}); +``` + +When `visitor.fallback` is a function, we can determine which keys to visit on each node. + +```javascript +// This tree contains a user-defined `TestExpression` node. +var tree = { + type: 'TestExpression', + + // This 'argument' is the property containing the other **node**. + argument: { + type: 'Literal', + value: 20 + }, + + // This 'extended' is the property not containing the other **node**. + extended: true +}; +estraverse.traverse(tree, { + enter: function (node) { }, + + // Skip the `argument` property of each node + fallback: function(node) { + return Object.keys(node).filter(function(key) { + return key !== 'argument'; + }); + } +}); +``` + +### License + +Copyright (C) 2012-2016 [Yusuke Suzuki](http://github.com/Constellation) + (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/estraverse.js b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/estraverse.js new file mode 100644 index 00000000000000..93225bb0c4013e --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/estraverse.js @@ -0,0 +1,801 @@ +/* + Copyright (C) 2012-2013 Yusuke Suzuki + Copyright (C) 2012 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/*jslint vars:false, bitwise:true*/ +/*jshint indent:4*/ +/*global exports:true*/ +(function clone(exports) { + 'use strict'; + + var Syntax, + VisitorOption, + VisitorKeys, + BREAK, + SKIP, + REMOVE; + + function deepCopy(obj) { + var ret = {}, key, val; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + val = obj[key]; + if (typeof val === 'object' && val !== null) { + ret[key] = deepCopy(val); + } else { + ret[key] = val; + } + } + } + return ret; + } + + // based on LLVM libc++ upper_bound / lower_bound + // MIT License + + function upperBound(array, func) { + var diff, len, i, current; + + len = array.length; + i = 0; + + while (len) { + diff = len >>> 1; + current = i + diff; + if (func(array[current])) { + len = diff; + } else { + i = current + 1; + len -= diff + 1; + } + } + return i; + } + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + AssignmentPattern: 'AssignmentPattern', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7. + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ChainExpression: 'ChainExpression', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7. + ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7. + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DirectiveStatement: 'DirectiveStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportAllDeclaration: 'ExportAllDeclaration', + ExportDefaultDeclaration: 'ExportDefaultDeclaration', + ExportNamedDeclaration: 'ExportNamedDeclaration', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7. + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportExpression: 'ImportExpression', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MetaProperty: 'MetaProperty', + MethodDefinition: 'MethodDefinition', + ModuleSpecifier: 'ModuleSpecifier', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + RestElement: 'RestElement', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + Super: 'Super', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + }; + + VisitorKeys = { + AssignmentExpression: ['left', 'right'], + AssignmentPattern: ['left', 'right'], + ArrayExpression: ['elements'], + ArrayPattern: ['elements'], + ArrowFunctionExpression: ['params', 'body'], + AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7. + BlockStatement: ['body'], + BinaryExpression: ['left', 'right'], + BreakStatement: ['label'], + CallExpression: ['callee', 'arguments'], + CatchClause: ['param', 'body'], + ChainExpression: ['expression'], + ClassBody: ['body'], + ClassDeclaration: ['id', 'superClass', 'body'], + ClassExpression: ['id', 'superClass', 'body'], + ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7. + ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. + ConditionalExpression: ['test', 'consequent', 'alternate'], + ContinueStatement: ['label'], + DebuggerStatement: [], + DirectiveStatement: [], + DoWhileStatement: ['body', 'test'], + EmptyStatement: [], + ExportAllDeclaration: ['source'], + ExportDefaultDeclaration: ['declaration'], + ExportNamedDeclaration: ['declaration', 'specifiers', 'source'], + ExportSpecifier: ['exported', 'local'], + ExpressionStatement: ['expression'], + ForStatement: ['init', 'test', 'update', 'body'], + ForInStatement: ['left', 'right', 'body'], + ForOfStatement: ['left', 'right', 'body'], + FunctionDeclaration: ['id', 'params', 'body'], + FunctionExpression: ['id', 'params', 'body'], + GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. + Identifier: [], + IfStatement: ['test', 'consequent', 'alternate'], + ImportExpression: ['source'], + ImportDeclaration: ['specifiers', 'source'], + ImportDefaultSpecifier: ['local'], + ImportNamespaceSpecifier: ['local'], + ImportSpecifier: ['imported', 'local'], + Literal: [], + LabeledStatement: ['label', 'body'], + LogicalExpression: ['left', 'right'], + MemberExpression: ['object', 'property'], + MetaProperty: ['meta', 'property'], + MethodDefinition: ['key', 'value'], + ModuleSpecifier: [], + NewExpression: ['callee', 'arguments'], + ObjectExpression: ['properties'], + ObjectPattern: ['properties'], + Program: ['body'], + Property: ['key', 'value'], + RestElement: [ 'argument' ], + ReturnStatement: ['argument'], + SequenceExpression: ['expressions'], + SpreadElement: ['argument'], + Super: [], + SwitchStatement: ['discriminant', 'cases'], + SwitchCase: ['test', 'consequent'], + TaggedTemplateExpression: ['tag', 'quasi'], + TemplateElement: [], + TemplateLiteral: ['quasis', 'expressions'], + ThisExpression: [], + ThrowStatement: ['argument'], + TryStatement: ['block', 'handler', 'finalizer'], + UnaryExpression: ['argument'], + UpdateExpression: ['argument'], + VariableDeclaration: ['declarations'], + VariableDeclarator: ['id', 'init'], + WhileStatement: ['test', 'body'], + WithStatement: ['object', 'body'], + YieldExpression: ['argument'] + }; + + // unique id + BREAK = {}; + SKIP = {}; + REMOVE = {}; + + VisitorOption = { + Break: BREAK, + Skip: SKIP, + Remove: REMOVE + }; + + function Reference(parent, key) { + this.parent = parent; + this.key = key; + } + + Reference.prototype.replace = function replace(node) { + this.parent[this.key] = node; + }; + + Reference.prototype.remove = function remove() { + if (Array.isArray(this.parent)) { + this.parent.splice(this.key, 1); + return true; + } else { + this.replace(null); + return false; + } + }; + + function Element(node, path, wrap, ref) { + this.node = node; + this.path = path; + this.wrap = wrap; + this.ref = ref; + } + + function Controller() { } + + // API: + // return property path array from root to current node + Controller.prototype.path = function path() { + var i, iz, j, jz, result, element; + + function addToPath(result, path) { + if (Array.isArray(path)) { + for (j = 0, jz = path.length; j < jz; ++j) { + result.push(path[j]); + } + } else { + result.push(path); + } + } + + // root node + if (!this.__current.path) { + return null; + } + + // first node is sentinel, second node is root element + result = []; + for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { + element = this.__leavelist[i]; + addToPath(result, element.path); + } + addToPath(result, this.__current.path); + return result; + }; + + // API: + // return type of current node + Controller.prototype.type = function () { + var node = this.current(); + return node.type || this.__current.wrap; + }; + + // API: + // return array of parent elements + Controller.prototype.parents = function parents() { + var i, iz, result; + + // first node is sentinel + result = []; + for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { + result.push(this.__leavelist[i].node); + } + + return result; + }; + + // API: + // return current node + Controller.prototype.current = function current() { + return this.__current.node; + }; + + Controller.prototype.__execute = function __execute(callback, element) { + var previous, result; + + result = undefined; + + previous = this.__current; + this.__current = element; + this.__state = null; + if (callback) { + result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); + } + this.__current = previous; + + return result; + }; + + // API: + // notify control skip / break + Controller.prototype.notify = function notify(flag) { + this.__state = flag; + }; + + // API: + // skip child nodes of current node + Controller.prototype.skip = function () { + this.notify(SKIP); + }; + + // API: + // break traversals + Controller.prototype['break'] = function () { + this.notify(BREAK); + }; + + // API: + // remove node + Controller.prototype.remove = function () { + this.notify(REMOVE); + }; + + Controller.prototype.__initialize = function(root, visitor) { + this.visitor = visitor; + this.root = root; + this.__worklist = []; + this.__leavelist = []; + this.__current = null; + this.__state = null; + this.__fallback = null; + if (visitor.fallback === 'iteration') { + this.__fallback = Object.keys; + } else if (typeof visitor.fallback === 'function') { + this.__fallback = visitor.fallback; + } + + this.__keys = VisitorKeys; + if (visitor.keys) { + this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); + } + }; + + function isNode(node) { + if (node == null) { + return false; + } + return typeof node === 'object' && typeof node.type === 'string'; + } + + function isProperty(nodeType, key) { + return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; + } + + function candidateExistsInLeaveList(leavelist, candidate) { + for (var i = leavelist.length - 1; i >= 0; --i) { + if (leavelist[i].node === candidate) { + return true; + } + } + return false; + } + + Controller.prototype.traverse = function traverse(root, visitor) { + var worklist, + leavelist, + element, + node, + nodeType, + ret, + key, + current, + current2, + candidates, + candidate, + sentinel; + + this.__initialize(root, visitor); + + sentinel = {}; + + // reference + worklist = this.__worklist; + leavelist = this.__leavelist; + + // initialize + worklist.push(new Element(root, null, null, null)); + leavelist.push(new Element(null, null, null, null)); + + while (worklist.length) { + element = worklist.pop(); + + if (element === sentinel) { + element = leavelist.pop(); + + ret = this.__execute(visitor.leave, element); + + if (this.__state === BREAK || ret === BREAK) { + return; + } + continue; + } + + if (element.node) { + + ret = this.__execute(visitor.enter, element); + + if (this.__state === BREAK || ret === BREAK) { + return; + } + + worklist.push(sentinel); + leavelist.push(element); + + if (this.__state === SKIP || ret === SKIP) { + continue; + } + + node = element.node; + nodeType = node.type || element.wrap; + candidates = this.__keys[nodeType]; + if (!candidates) { + if (this.__fallback) { + candidates = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + nodeType + '.'); + } + } + + current = candidates.length; + while ((current -= 1) >= 0) { + key = candidates[current]; + candidate = node[key]; + if (!candidate) { + continue; + } + + if (Array.isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (!candidate[current2]) { + continue; + } + + if (candidateExistsInLeaveList(leavelist, candidate[current2])) { + continue; + } + + if (isProperty(nodeType, candidates[current])) { + element = new Element(candidate[current2], [key, current2], 'Property', null); + } else if (isNode(candidate[current2])) { + element = new Element(candidate[current2], [key, current2], null, null); + } else { + continue; + } + worklist.push(element); + } + } else if (isNode(candidate)) { + if (candidateExistsInLeaveList(leavelist, candidate)) { + continue; + } + + worklist.push(new Element(candidate, key, null, null)); + } + } + } + } + }; + + Controller.prototype.replace = function replace(root, visitor) { + var worklist, + leavelist, + node, + nodeType, + target, + element, + current, + current2, + candidates, + candidate, + sentinel, + outer, + key; + + function removeElem(element) { + var i, + key, + nextElem, + parent; + + if (element.ref.remove()) { + // When the reference is an element of an array. + key = element.ref.key; + parent = element.ref.parent; + + // If removed from array, then decrease following items' keys. + i = worklist.length; + while (i--) { + nextElem = worklist[i]; + if (nextElem.ref && nextElem.ref.parent === parent) { + if (nextElem.ref.key < key) { + break; + } + --nextElem.ref.key; + } + } + } + } + + this.__initialize(root, visitor); + + sentinel = {}; + + // reference + worklist = this.__worklist; + leavelist = this.__leavelist; + + // initialize + outer = { + root: root + }; + element = new Element(root, null, null, new Reference(outer, 'root')); + worklist.push(element); + leavelist.push(element); + + while (worklist.length) { + element = worklist.pop(); + + if (element === sentinel) { + element = leavelist.pop(); + + target = this.__execute(visitor.leave, element); + + // node may be replaced with null, + // so distinguish between undefined and null in this place + if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { + // replace + element.ref.replace(target); + } + + if (this.__state === REMOVE || target === REMOVE) { + removeElem(element); + } + + if (this.__state === BREAK || target === BREAK) { + return outer.root; + } + continue; + } + + target = this.__execute(visitor.enter, element); + + // node may be replaced with null, + // so distinguish between undefined and null in this place + if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { + // replace + element.ref.replace(target); + element.node = target; + } + + if (this.__state === REMOVE || target === REMOVE) { + removeElem(element); + element.node = null; + } + + if (this.__state === BREAK || target === BREAK) { + return outer.root; + } + + // node may be null + node = element.node; + if (!node) { + continue; + } + + worklist.push(sentinel); + leavelist.push(element); + + if (this.__state === SKIP || target === SKIP) { + continue; + } + + nodeType = node.type || element.wrap; + candidates = this.__keys[nodeType]; + if (!candidates) { + if (this.__fallback) { + candidates = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + nodeType + '.'); + } + } + + current = candidates.length; + while ((current -= 1) >= 0) { + key = candidates[current]; + candidate = node[key]; + if (!candidate) { + continue; + } + + if (Array.isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (!candidate[current2]) { + continue; + } + if (isProperty(nodeType, candidates[current])) { + element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); + } else if (isNode(candidate[current2])) { + element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2)); + } else { + continue; + } + worklist.push(element); + } + } else if (isNode(candidate)) { + worklist.push(new Element(candidate, key, null, new Reference(node, key))); + } + } + } + + return outer.root; + }; + + function traverse(root, visitor) { + var controller = new Controller(); + return controller.traverse(root, visitor); + } + + function replace(root, visitor) { + var controller = new Controller(); + return controller.replace(root, visitor); + } + + function extendCommentRange(comment, tokens) { + var target; + + target = upperBound(tokens, function search(token) { + return token.range[0] > comment.range[0]; + }); + + comment.extendedRange = [comment.range[0], comment.range[1]]; + + if (target !== tokens.length) { + comment.extendedRange[1] = tokens[target].range[0]; + } + + target -= 1; + if (target >= 0) { + comment.extendedRange[0] = tokens[target].range[1]; + } + + return comment; + } + + function attachComments(tree, providedComments, tokens) { + // At first, we should calculate extended comment ranges. + var comments = [], comment, len, i, cursor; + + if (!tree.range) { + throw new Error('attachComments needs range information'); + } + + // tokens array is empty, we attach comments to tree as 'leadingComments' + if (!tokens.length) { + if (providedComments.length) { + for (i = 0, len = providedComments.length; i < len; i += 1) { + comment = deepCopy(providedComments[i]); + comment.extendedRange = [0, tree.range[0]]; + comments.push(comment); + } + tree.leadingComments = comments; + } + return tree; + } + + for (i = 0, len = providedComments.length; i < len; i += 1) { + comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); + } + + // This is based on John Freeman's implementation. + cursor = 0; + traverse(tree, { + enter: function (node) { + var comment; + + while (cursor < comments.length) { + comment = comments[cursor]; + if (comment.extendedRange[1] > node.range[0]) { + break; + } + + if (comment.extendedRange[1] === node.range[0]) { + if (!node.leadingComments) { + node.leadingComments = []; + } + node.leadingComments.push(comment); + comments.splice(cursor, 1); + } else { + cursor += 1; + } + } + + // already out of owned node + if (cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + cursor = 0; + traverse(tree, { + leave: function (node) { + var comment; + + while (cursor < comments.length) { + comment = comments[cursor]; + if (node.range[1] < comment.extendedRange[0]) { + break; + } + + if (node.range[1] === comment.extendedRange[0]) { + if (!node.trailingComments) { + node.trailingComments = []; + } + node.trailingComments.push(comment); + comments.splice(cursor, 1); + } else { + cursor += 1; + } + } + + // already out of owned node + if (cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + return tree; + } + + exports.Syntax = Syntax; + exports.traverse = traverse; + exports.replace = replace; + exports.attachComments = attachComments; + exports.VisitorKeys = VisitorKeys; + exports.VisitorOption = VisitorOption; + exports.Controller = Controller; + exports.cloneEnvironment = function () { return clone({}); }; + + return exports; +}(exports)); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/package.json new file mode 100644 index 00000000000000..bc99e7c4a64674 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/package.json @@ -0,0 +1,40 @@ +{ + "name": "estraverse", + "description": "ECMAScript JS AST traversal functions", + "homepage": "https://github.com/estools/estraverse", + "main": "estraverse.js", + "version": "5.2.0", + "engines": { + "node": ">=4.0" + }, + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "web": "http://github.com/Constellation" + } + ], + "repository": { + "type": "git", + "url": "http://github.com/estools/estraverse.git" + }, + "devDependencies": { + "babel-preset-env": "^1.6.1", + "babel-register": "^6.3.13", + "chai": "^2.1.1", + "espree": "^1.11.0", + "gulp": "^3.8.10", + "gulp-bump": "^0.2.2", + "gulp-filter": "^2.0.0", + "gulp-git": "^1.0.1", + "gulp-tag-version": "^1.3.0", + "jshint": "^2.5.6", + "mocha": "^2.1.0" + }, + "license": "BSD-2-Clause", + "scripts": { + "test": "npm run-script lint && npm run-script unit-test", + "lint": "jshint estraverse.js", + "unit-test": "mocha --compilers js:babel-register" + } +} diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/package.json new file mode 100755 index 00000000000000..dec5b1bc1fd3ac --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/package.json @@ -0,0 +1,52 @@ +{ + "name": "esrecurse", + "description": "ECMAScript AST recursive visitor", + "homepage": "https://github.com/estools/esrecurse", + "main": "esrecurse.js", + "version": "4.3.0", + "engines": { + "node": ">=4.0" + }, + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "web": "https://github.com/Constellation" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/estools/esrecurse.git" + }, + "dependencies": { + "estraverse": "^5.2.0" + }, + "devDependencies": { + "babel-cli": "^6.24.1", + "babel-eslint": "^7.2.3", + "babel-preset-es2015": "^6.24.1", + "babel-register": "^6.24.1", + "chai": "^4.0.2", + "esprima": "^4.0.0", + "gulp": "^3.9.0", + "gulp-bump": "^2.7.0", + "gulp-eslint": "^4.0.0", + "gulp-filter": "^5.0.0", + "gulp-git": "^2.4.1", + "gulp-mocha": "^4.3.1", + "gulp-tag-version": "^1.2.1", + "jsdoc": "^3.3.0-alpha10", + "minimist": "^1.1.0" + }, + "license": "BSD-2-Clause", + "scripts": { + "test": "gulp travis", + "unit-test": "gulp test", + "lint": "gulp lint" + }, + "babel": { + "presets": [ + "es2015" + ] + } +} diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/LICENSE.BSD b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/LICENSE.BSD new file mode 100644 index 00000000000000..3e580c355a96e5 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/LICENSE.BSD @@ -0,0 +1,19 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/README.md new file mode 100644 index 00000000000000..ccd3377f3e9449 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/README.md @@ -0,0 +1,153 @@ +### Estraverse [![Build Status](https://secure.travis-ci.org/estools/estraverse.svg)](http://travis-ci.org/estools/estraverse) + +Estraverse ([estraverse](http://github.com/estools/estraverse)) is +[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +traversal functions from [esmangle project](http://github.com/estools/esmangle). + +### Documentation + +You can find usage docs at [wiki page](https://github.com/estools/estraverse/wiki/Usage). + +### Example Usage + +The following code will output all variables declared at the root of a file. + +```javascript +estraverse.traverse(ast, { + enter: function (node, parent) { + if (node.type == 'FunctionExpression' || node.type == 'FunctionDeclaration') + return estraverse.VisitorOption.Skip; + }, + leave: function (node, parent) { + if (node.type == 'VariableDeclarator') + console.log(node.id.name); + } +}); +``` + +We can use `this.skip`, `this.remove` and `this.break` functions instead of using Skip, Remove and Break. + +```javascript +estraverse.traverse(ast, { + enter: function (node) { + this.break(); + } +}); +``` + +And estraverse provides `estraverse.replace` function. When returning node from `enter`/`leave`, current node is replaced with it. + +```javascript +result = estraverse.replace(tree, { + enter: function (node) { + // Replace it with replaced. + if (node.type === 'Literal') + return replaced; + } +}); +``` + +By passing `visitor.keys` mapping, we can extend estraverse traversing functionality. + +```javascript +// This tree contains a user-defined `TestExpression` node. +var tree = { + type: 'TestExpression', + + // This 'argument' is the property containing the other **node**. + argument: { + type: 'Literal', + value: 20 + }, + + // This 'extended' is the property not containing the other **node**. + extended: true +}; +estraverse.traverse(tree, { + enter: function (node) { }, + + // Extending the existing traversing rules. + keys: { + // TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ] + TestExpression: ['argument'] + } +}); +``` + +By passing `visitor.fallback` option, we can control the behavior when encountering unknown nodes. + +```javascript +// This tree contains a user-defined `TestExpression` node. +var tree = { + type: 'TestExpression', + + // This 'argument' is the property containing the other **node**. + argument: { + type: 'Literal', + value: 20 + }, + + // This 'extended' is the property not containing the other **node**. + extended: true +}; +estraverse.traverse(tree, { + enter: function (node) { }, + + // Iterating the child **nodes** of unknown nodes. + fallback: 'iteration' +}); +``` + +When `visitor.fallback` is a function, we can determine which keys to visit on each node. + +```javascript +// This tree contains a user-defined `TestExpression` node. +var tree = { + type: 'TestExpression', + + // This 'argument' is the property containing the other **node**. + argument: { + type: 'Literal', + value: 20 + }, + + // This 'extended' is the property not containing the other **node**. + extended: true +}; +estraverse.traverse(tree, { + enter: function (node) { }, + + // Skip the `argument` property of each node + fallback: function(node) { + return Object.keys(node).filter(function(key) { + return key !== 'argument'; + }); + } +}); +``` + +### License + +Copyright (C) 2012-2016 [Yusuke Suzuki](http://github.com/Constellation) + (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/estraverse.js b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/estraverse.js new file mode 100644 index 00000000000000..b106d386a6e1af --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/estraverse.js @@ -0,0 +1,782 @@ +/* + Copyright (C) 2012-2013 Yusuke Suzuki + Copyright (C) 2012 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/*jslint vars:false, bitwise:true*/ +/*jshint indent:4*/ +/*global exports:true*/ +(function clone(exports) { + 'use strict'; + + var Syntax, + VisitorOption, + VisitorKeys, + BREAK, + SKIP, + REMOVE; + + function deepCopy(obj) { + var ret = {}, key, val; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + val = obj[key]; + if (typeof val === 'object' && val !== null) { + ret[key] = deepCopy(val); + } else { + ret[key] = val; + } + } + } + return ret; + } + + // based on LLVM libc++ upper_bound / lower_bound + // MIT License + + function upperBound(array, func) { + var diff, len, i, current; + + len = array.length; + i = 0; + + while (len) { + diff = len >>> 1; + current = i + diff; + if (func(array[current])) { + len = diff; + } else { + i = current + 1; + len -= diff + 1; + } + } + return i; + } + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + AssignmentPattern: 'AssignmentPattern', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7. + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7. + ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7. + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DirectiveStatement: 'DirectiveStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportAllDeclaration: 'ExportAllDeclaration', + ExportDefaultDeclaration: 'ExportDefaultDeclaration', + ExportNamedDeclaration: 'ExportNamedDeclaration', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7. + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportExpression: 'ImportExpression', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MetaProperty: 'MetaProperty', + MethodDefinition: 'MethodDefinition', + ModuleSpecifier: 'ModuleSpecifier', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + RestElement: 'RestElement', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + Super: 'Super', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + }; + + VisitorKeys = { + AssignmentExpression: ['left', 'right'], + AssignmentPattern: ['left', 'right'], + ArrayExpression: ['elements'], + ArrayPattern: ['elements'], + ArrowFunctionExpression: ['params', 'body'], + AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7. + BlockStatement: ['body'], + BinaryExpression: ['left', 'right'], + BreakStatement: ['label'], + CallExpression: ['callee', 'arguments'], + CatchClause: ['param', 'body'], + ClassBody: ['body'], + ClassDeclaration: ['id', 'superClass', 'body'], + ClassExpression: ['id', 'superClass', 'body'], + ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7. + ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. + ConditionalExpression: ['test', 'consequent', 'alternate'], + ContinueStatement: ['label'], + DebuggerStatement: [], + DirectiveStatement: [], + DoWhileStatement: ['body', 'test'], + EmptyStatement: [], + ExportAllDeclaration: ['source'], + ExportDefaultDeclaration: ['declaration'], + ExportNamedDeclaration: ['declaration', 'specifiers', 'source'], + ExportSpecifier: ['exported', 'local'], + ExpressionStatement: ['expression'], + ForStatement: ['init', 'test', 'update', 'body'], + ForInStatement: ['left', 'right', 'body'], + ForOfStatement: ['left', 'right', 'body'], + FunctionDeclaration: ['id', 'params', 'body'], + FunctionExpression: ['id', 'params', 'body'], + GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. + Identifier: [], + IfStatement: ['test', 'consequent', 'alternate'], + ImportExpression: ['source'], + ImportDeclaration: ['specifiers', 'source'], + ImportDefaultSpecifier: ['local'], + ImportNamespaceSpecifier: ['local'], + ImportSpecifier: ['imported', 'local'], + Literal: [], + LabeledStatement: ['label', 'body'], + LogicalExpression: ['left', 'right'], + MemberExpression: ['object', 'property'], + MetaProperty: ['meta', 'property'], + MethodDefinition: ['key', 'value'], + ModuleSpecifier: [], + NewExpression: ['callee', 'arguments'], + ObjectExpression: ['properties'], + ObjectPattern: ['properties'], + Program: ['body'], + Property: ['key', 'value'], + RestElement: [ 'argument' ], + ReturnStatement: ['argument'], + SequenceExpression: ['expressions'], + SpreadElement: ['argument'], + Super: [], + SwitchStatement: ['discriminant', 'cases'], + SwitchCase: ['test', 'consequent'], + TaggedTemplateExpression: ['tag', 'quasi'], + TemplateElement: [], + TemplateLiteral: ['quasis', 'expressions'], + ThisExpression: [], + ThrowStatement: ['argument'], + TryStatement: ['block', 'handler', 'finalizer'], + UnaryExpression: ['argument'], + UpdateExpression: ['argument'], + VariableDeclaration: ['declarations'], + VariableDeclarator: ['id', 'init'], + WhileStatement: ['test', 'body'], + WithStatement: ['object', 'body'], + YieldExpression: ['argument'] + }; + + // unique id + BREAK = {}; + SKIP = {}; + REMOVE = {}; + + VisitorOption = { + Break: BREAK, + Skip: SKIP, + Remove: REMOVE + }; + + function Reference(parent, key) { + this.parent = parent; + this.key = key; + } + + Reference.prototype.replace = function replace(node) { + this.parent[this.key] = node; + }; + + Reference.prototype.remove = function remove() { + if (Array.isArray(this.parent)) { + this.parent.splice(this.key, 1); + return true; + } else { + this.replace(null); + return false; + } + }; + + function Element(node, path, wrap, ref) { + this.node = node; + this.path = path; + this.wrap = wrap; + this.ref = ref; + } + + function Controller() { } + + // API: + // return property path array from root to current node + Controller.prototype.path = function path() { + var i, iz, j, jz, result, element; + + function addToPath(result, path) { + if (Array.isArray(path)) { + for (j = 0, jz = path.length; j < jz; ++j) { + result.push(path[j]); + } + } else { + result.push(path); + } + } + + // root node + if (!this.__current.path) { + return null; + } + + // first node is sentinel, second node is root element + result = []; + for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { + element = this.__leavelist[i]; + addToPath(result, element.path); + } + addToPath(result, this.__current.path); + return result; + }; + + // API: + // return type of current node + Controller.prototype.type = function () { + var node = this.current(); + return node.type || this.__current.wrap; + }; + + // API: + // return array of parent elements + Controller.prototype.parents = function parents() { + var i, iz, result; + + // first node is sentinel + result = []; + for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { + result.push(this.__leavelist[i].node); + } + + return result; + }; + + // API: + // return current node + Controller.prototype.current = function current() { + return this.__current.node; + }; + + Controller.prototype.__execute = function __execute(callback, element) { + var previous, result; + + result = undefined; + + previous = this.__current; + this.__current = element; + this.__state = null; + if (callback) { + result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); + } + this.__current = previous; + + return result; + }; + + // API: + // notify control skip / break + Controller.prototype.notify = function notify(flag) { + this.__state = flag; + }; + + // API: + // skip child nodes of current node + Controller.prototype.skip = function () { + this.notify(SKIP); + }; + + // API: + // break traversals + Controller.prototype['break'] = function () { + this.notify(BREAK); + }; + + // API: + // remove node + Controller.prototype.remove = function () { + this.notify(REMOVE); + }; + + Controller.prototype.__initialize = function(root, visitor) { + this.visitor = visitor; + this.root = root; + this.__worklist = []; + this.__leavelist = []; + this.__current = null; + this.__state = null; + this.__fallback = null; + if (visitor.fallback === 'iteration') { + this.__fallback = Object.keys; + } else if (typeof visitor.fallback === 'function') { + this.__fallback = visitor.fallback; + } + + this.__keys = VisitorKeys; + if (visitor.keys) { + this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); + } + }; + + function isNode(node) { + if (node == null) { + return false; + } + return typeof node === 'object' && typeof node.type === 'string'; + } + + function isProperty(nodeType, key) { + return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; + } + + Controller.prototype.traverse = function traverse(root, visitor) { + var worklist, + leavelist, + element, + node, + nodeType, + ret, + key, + current, + current2, + candidates, + candidate, + sentinel; + + this.__initialize(root, visitor); + + sentinel = {}; + + // reference + worklist = this.__worklist; + leavelist = this.__leavelist; + + // initialize + worklist.push(new Element(root, null, null, null)); + leavelist.push(new Element(null, null, null, null)); + + while (worklist.length) { + element = worklist.pop(); + + if (element === sentinel) { + element = leavelist.pop(); + + ret = this.__execute(visitor.leave, element); + + if (this.__state === BREAK || ret === BREAK) { + return; + } + continue; + } + + if (element.node) { + + ret = this.__execute(visitor.enter, element); + + if (this.__state === BREAK || ret === BREAK) { + return; + } + + worklist.push(sentinel); + leavelist.push(element); + + if (this.__state === SKIP || ret === SKIP) { + continue; + } + + node = element.node; + nodeType = node.type || element.wrap; + candidates = this.__keys[nodeType]; + if (!candidates) { + if (this.__fallback) { + candidates = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + nodeType + '.'); + } + } + + current = candidates.length; + while ((current -= 1) >= 0) { + key = candidates[current]; + candidate = node[key]; + if (!candidate) { + continue; + } + + if (Array.isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (!candidate[current2]) { + continue; + } + if (isProperty(nodeType, candidates[current])) { + element = new Element(candidate[current2], [key, current2], 'Property', null); + } else if (isNode(candidate[current2])) { + element = new Element(candidate[current2], [key, current2], null, null); + } else { + continue; + } + worklist.push(element); + } + } else if (isNode(candidate)) { + worklist.push(new Element(candidate, key, null, null)); + } + } + } + } + }; + + Controller.prototype.replace = function replace(root, visitor) { + var worklist, + leavelist, + node, + nodeType, + target, + element, + current, + current2, + candidates, + candidate, + sentinel, + outer, + key; + + function removeElem(element) { + var i, + key, + nextElem, + parent; + + if (element.ref.remove()) { + // When the reference is an element of an array. + key = element.ref.key; + parent = element.ref.parent; + + // If removed from array, then decrease following items' keys. + i = worklist.length; + while (i--) { + nextElem = worklist[i]; + if (nextElem.ref && nextElem.ref.parent === parent) { + if (nextElem.ref.key < key) { + break; + } + --nextElem.ref.key; + } + } + } + } + + this.__initialize(root, visitor); + + sentinel = {}; + + // reference + worklist = this.__worklist; + leavelist = this.__leavelist; + + // initialize + outer = { + root: root + }; + element = new Element(root, null, null, new Reference(outer, 'root')); + worklist.push(element); + leavelist.push(element); + + while (worklist.length) { + element = worklist.pop(); + + if (element === sentinel) { + element = leavelist.pop(); + + target = this.__execute(visitor.leave, element); + + // node may be replaced with null, + // so distinguish between undefined and null in this place + if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { + // replace + element.ref.replace(target); + } + + if (this.__state === REMOVE || target === REMOVE) { + removeElem(element); + } + + if (this.__state === BREAK || target === BREAK) { + return outer.root; + } + continue; + } + + target = this.__execute(visitor.enter, element); + + // node may be replaced with null, + // so distinguish between undefined and null in this place + if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { + // replace + element.ref.replace(target); + element.node = target; + } + + if (this.__state === REMOVE || target === REMOVE) { + removeElem(element); + element.node = null; + } + + if (this.__state === BREAK || target === BREAK) { + return outer.root; + } + + // node may be null + node = element.node; + if (!node) { + continue; + } + + worklist.push(sentinel); + leavelist.push(element); + + if (this.__state === SKIP || target === SKIP) { + continue; + } + + nodeType = node.type || element.wrap; + candidates = this.__keys[nodeType]; + if (!candidates) { + if (this.__fallback) { + candidates = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + nodeType + '.'); + } + } + + current = candidates.length; + while ((current -= 1) >= 0) { + key = candidates[current]; + candidate = node[key]; + if (!candidate) { + continue; + } + + if (Array.isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (!candidate[current2]) { + continue; + } + if (isProperty(nodeType, candidates[current])) { + element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); + } else if (isNode(candidate[current2])) { + element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2)); + } else { + continue; + } + worklist.push(element); + } + } else if (isNode(candidate)) { + worklist.push(new Element(candidate, key, null, new Reference(node, key))); + } + } + } + + return outer.root; + }; + + function traverse(root, visitor) { + var controller = new Controller(); + return controller.traverse(root, visitor); + } + + function replace(root, visitor) { + var controller = new Controller(); + return controller.replace(root, visitor); + } + + function extendCommentRange(comment, tokens) { + var target; + + target = upperBound(tokens, function search(token) { + return token.range[0] > comment.range[0]; + }); + + comment.extendedRange = [comment.range[0], comment.range[1]]; + + if (target !== tokens.length) { + comment.extendedRange[1] = tokens[target].range[0]; + } + + target -= 1; + if (target >= 0) { + comment.extendedRange[0] = tokens[target].range[1]; + } + + return comment; + } + + function attachComments(tree, providedComments, tokens) { + // At first, we should calculate extended comment ranges. + var comments = [], comment, len, i, cursor; + + if (!tree.range) { + throw new Error('attachComments needs range information'); + } + + // tokens array is empty, we attach comments to tree as 'leadingComments' + if (!tokens.length) { + if (providedComments.length) { + for (i = 0, len = providedComments.length; i < len; i += 1) { + comment = deepCopy(providedComments[i]); + comment.extendedRange = [0, tree.range[0]]; + comments.push(comment); + } + tree.leadingComments = comments; + } + return tree; + } + + for (i = 0, len = providedComments.length; i < len; i += 1) { + comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); + } + + // This is based on John Freeman's implementation. + cursor = 0; + traverse(tree, { + enter: function (node) { + var comment; + + while (cursor < comments.length) { + comment = comments[cursor]; + if (comment.extendedRange[1] > node.range[0]) { + break; + } + + if (comment.extendedRange[1] === node.range[0]) { + if (!node.leadingComments) { + node.leadingComments = []; + } + node.leadingComments.push(comment); + comments.splice(cursor, 1); + } else { + cursor += 1; + } + } + + // already out of owned node + if (cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + cursor = 0; + traverse(tree, { + leave: function (node) { + var comment; + + while (cursor < comments.length) { + comment = comments[cursor]; + if (node.range[1] < comment.extendedRange[0]) { + break; + } + + if (node.range[1] === comment.extendedRange[0]) { + if (!node.trailingComments) { + node.trailingComments = []; + } + node.trailingComments.push(comment); + comments.splice(cursor, 1); + } else { + cursor += 1; + } + } + + // already out of owned node + if (cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + return tree; + } + + exports.version = require('./package.json').version; + exports.Syntax = Syntax; + exports.traverse = traverse; + exports.replace = replace; + exports.attachComments = attachComments; + exports.VisitorKeys = VisitorKeys; + exports.VisitorOption = VisitorOption; + exports.Controller = Controller; + exports.cloneEnvironment = function () { return clone({}); }; + + return exports; +}(exports)); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/package.json new file mode 100644 index 00000000000000..1138238672309b --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/package.json @@ -0,0 +1,40 @@ +{ + "name": "estraverse", + "description": "ECMAScript JS AST traversal functions", + "homepage": "https://github.com/estools/estraverse", + "main": "estraverse.js", + "version": "4.3.0", + "engines": { + "node": ">=4.0" + }, + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "web": "http://github.com/Constellation" + } + ], + "repository": { + "type": "git", + "url": "http://github.com/estools/estraverse.git" + }, + "devDependencies": { + "babel-preset-env": "^1.6.1", + "babel-register": "^6.3.13", + "chai": "^2.1.1", + "espree": "^1.11.0", + "gulp": "^3.8.10", + "gulp-bump": "^0.2.2", + "gulp-filter": "^2.0.0", + "gulp-git": "^1.0.1", + "gulp-tag-version": "^1.3.0", + "jshint": "^2.5.6", + "mocha": "^2.1.0" + }, + "license": "BSD-2-Clause", + "scripts": { + "test": "npm run-script lint && npm run-script unit-test", + "lint": "jshint estraverse.js", + "unit-test": "mocha --compilers js:babel-register" + } +} diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/LICENSE b/tools/node_modules/@babel/eslint-parser/node_modules/semver/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/semver/README.md new file mode 100644 index 00000000000000..2293a14fdc3579 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/README.md @@ -0,0 +1,443 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +--rtl + Coerce version strings right to left + +--ltr + Coerce version strings left to right (default) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero element in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions + are equal. Sorts in ascending order if passed to `Array.sort()`. + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version, options)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). + +If the `options.rtl` flag is set, then `coerce` will return the right-most +coercible tuple that does not share an ending index with a longer coercible +tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not +`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of +any other overlapping SemVer tuple. + +### Clean + +* `clean(version)`: Clean a string to be a valid semver if possible + +This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. + +ex. +* `s.clean(' = v 2.1.5foo')`: `null` +* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean(' = v 2.1.5-foo')`: `null` +* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean('=v2.1.5')`: `'2.1.5'` +* `s.clean(' =v2.1.5')`: `2.1.5` +* `s.clean(' 2.1.5 ')`: `'2.1.5'` +* `s.clean('~1.0.0')`: `null` diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/bin/semver.js b/tools/node_modules/@babel/eslint-parser/node_modules/semver/bin/semver.js new file mode 100755 index 00000000000000..666034a75d8442 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/bin/semver.js @@ -0,0 +1,174 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var rtl = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '--rtl': + rtl = true + break + case '--ltr': + rtl = false + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v, options) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + '--rtl', + ' Coerce version strings right to left', + '', + '--ltr', + ' Coerce version strings left to right (default)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/semver/package.json new file mode 100644 index 00000000000000..bdd442f50022f6 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/package.json @@ -0,0 +1,28 @@ +{ + "name": "semver", + "version": "6.3.0", + "description": "The semantic version parser used by npm.", + "main": "semver.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "devDependencies": { + "tap": "^14.3.1" + }, + "license": "ISC", + "repository": "https://github.com/npm/node-semver", + "bin": { + "semver": "./bin/semver.js" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "tap": { + "check-coverage": true + } +} diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/range.bnf b/tools/node_modules/@babel/eslint-parser/node_modules/semver/range.bnf new file mode 100644 index 00000000000000..d4c6ae0d76c9ac --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/semver.js b/tools/node_modules/@babel/eslint-parser/node_modules/semver/semver.js new file mode 100644 index 00000000000000..636fa4365a175f --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/semver.js @@ -0,0 +1,1596 @@ +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var t = exports.tokens = {} +var R = 0 + +function tok (n) { + t[n] = R++ +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +tok('NUMERICIDENTIFIER') +src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' +tok('NUMERICIDENTIFIERLOOSE') +src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +tok('NONNUMERICIDENTIFIER') +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +tok('MAINVERSION') +src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')' + +tok('MAINVERSIONLOOSE') +src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +tok('PRERELEASEIDENTIFIER') +src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +tok('PRERELEASEIDENTIFIERLOOSE') +src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +tok('PRERELEASE') +src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' + +tok('PRERELEASELOOSE') +src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +tok('BUILDIDENTIFIER') +src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +tok('BUILD') +src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +tok('FULL') +tok('FULLPLAIN') +src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + + src[t.PRERELEASE] + '?' + + src[t.BUILD] + '?' + +src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +tok('LOOSEPLAIN') +src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + + src[t.PRERELEASELOOSE] + '?' + + src[t.BUILD] + '?' + +tok('LOOSE') +src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' + +tok('GTLT') +src[t.GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +tok('XRANGEIDENTIFIERLOOSE') +src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +tok('XRANGEIDENTIFIER') +src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + +tok('XRANGEPLAIN') +src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:' + src[t.PRERELEASE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGEPLAINLOOSE') +src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[t.PRERELEASELOOSE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGE') +src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' +tok('XRANGELOOSE') +src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +tok('COERCE') +src[t.COERCE] = '(^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' +tok('COERCERTL') +re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +tok('LONETILDE') +src[t.LONETILDE] = '(?:~>?)' + +tok('TILDETRIM') +src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' +re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +tok('TILDE') +src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' +tok('TILDELOOSE') +src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +tok('LONECARET') +src[t.LONECARET] = '(?:\\^)' + +tok('CARETTRIM') +src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' +re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +tok('CARET') +src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' +tok('CARETLOOSE') +src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +tok('COMPARATORLOOSE') +src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' +tok('COMPARATOR') +src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +tok('COMPARATORTRIM') +src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +tok('HYPHENRANGE') +src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAIN] + ')' + + '\\s*$' + +tok('HYPHENRANGELOOSE') +src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +tok('STAR') +src[t.STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(b, a, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + if (this.value === '') { + return true + } + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) +} + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + pr + } else if (xm) { + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr + } else if (xp) { + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version, options) { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) { + return null + } + + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) +} diff --git a/tools/node_modules/@babel/eslint-parser/package.json b/tools/node_modules/@babel/eslint-parser/package.json new file mode 100644 index 00000000000000..115984fa1189f6 --- /dev/null +++ b/tools/node_modules/@babel/eslint-parser/package.json @@ -0,0 +1,43 @@ +{ + "name": "@babel/eslint-parser", + "version": "7.12.1", + "description": "ESLint parser that allows for linting of experimental syntax transformed by Babel", + "author": "The Babel Team (https://babeljs.io/team)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "eslint/babel-eslint-parser" + }, + "publishConfig": { + "access": "public" + }, + "bugs": { + "url": "https://github.com/babel/babel/issues" + }, + "homepage": "https://babeljs.io/", + "engines": { + "node": "^10.13.0 || ^12.13.0 || >=14.0.0" + }, + "main": "./lib/index.js", + "type": "commonjs", + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, + "peerDependencies": { + "@babel/core": ">=7.11.0", + "eslint": ">=7.5.0" + }, + "dependencies": { + "eslint-scope": "5.1.0", + "eslint-visitor-keys": "^1.3.0", + "semver": "^6.3.0" + }, + "devDependencies": { + "@babel/core": "^7.12.1", + "dedent": "^0.7.0", + "eslint": "^7.5.0", + "lodash.clonedeep": "^4.5.0" + } +} \ No newline at end of file diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/LICENSE b/tools/node_modules/@babel/plugin-syntax-class-properties/LICENSE new file mode 100644 index 00000000000000..f31575ec773bb1 --- /dev/null +++ b/tools/node_modules/@babel/plugin-syntax-class-properties/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/README.md b/tools/node_modules/@babel/plugin-syntax-class-properties/README.md new file mode 100644 index 00000000000000..16ace370014e17 --- /dev/null +++ b/tools/node_modules/@babel/plugin-syntax-class-properties/README.md @@ -0,0 +1,19 @@ +# @babel/plugin-syntax-class-properties + +> Allow parsing of class properties + +See our website [@babel/plugin-syntax-class-properties](https://babeljs.io/docs/en/next/babel-plugin-syntax-class-properties.html) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/plugin-syntax-class-properties +``` + +or using yarn: + +```sh +yarn add @babel/plugin-syntax-class-properties --dev +``` diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/lib/index.js b/tools/node_modules/@babel/plugin-syntax-class-properties/lib/index.js new file mode 100644 index 00000000000000..942008497a77bd --- /dev/null +++ b/tools/node_modules/@babel/plugin-syntax-class-properties/lib/index.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _helperPluginUtils = require("@babel/helper-plugin-utils"); + +var _default = (0, _helperPluginUtils.declare)(api => { + api.assertVersion(7); + return { + name: "syntax-class-properties", + + manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("classProperties", "classPrivateProperties", "classPrivateMethods"); + } + + }; +}); + +exports.default = _default; \ No newline at end of file diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/LICENSE b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/LICENSE new file mode 100644 index 00000000000000..f31575ec773bb1 --- /dev/null +++ b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/README.md b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/README.md new file mode 100644 index 00000000000000..4e6303e08962a2 --- /dev/null +++ b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/README.md @@ -0,0 +1,19 @@ +# @babel/helper-plugin-utils + +> General utilities for plugins to use + +See our website [@babel/helper-plugin-utils](https://babeljs.io/docs/en/next/babel-helper-plugin-utils.html) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/helper-plugin-utils +``` + +or using yarn: + +```sh +yarn add @babel/helper-plugin-utils --dev +``` diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/lib/index.js b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/lib/index.js new file mode 100644 index 00000000000000..adb0656fa0e768 --- /dev/null +++ b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/lib/index.js @@ -0,0 +1,77 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.declare = declare; + +function declare(builder) { + return (api, options, dirname) => { + if (!api.assertVersion) { + api = Object.assign(copyApiObject(api), { + assertVersion(range) { + throwVersionError(range, api.version); + } + + }); + } + + return builder(api, options || {}, dirname); + }; +} + +function copyApiObject(api) { + let proto = null; + + if (typeof api.version === "string" && /^7\./.test(api.version)) { + proto = Object.getPrototypeOf(api); + + if (proto && (!has(proto, "version") || !has(proto, "transform") || !has(proto, "template") || !has(proto, "types"))) { + proto = null; + } + } + + return Object.assign({}, proto, api); +} + +function has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function throwVersionError(range, version) { + if (typeof range === "number") { + if (!Number.isInteger(range)) { + throw new Error("Expected string or integer value."); + } + + range = `^${range}.0.0-0`; + } + + if (typeof range !== "string") { + throw new Error("Expected string or integer value."); + } + + const limit = Error.stackTraceLimit; + + if (typeof limit === "number" && limit < 25) { + Error.stackTraceLimit = 25; + } + + let err; + + if (version.slice(0, 2) === "7.") { + err = new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". ` + `You'll need to update your @babel/core version.`); + } else { + err = new Error(`Requires Babel "${range}", but was loaded with "${version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`); + } + + if (typeof limit === "number") { + Error.stackTraceLimit = limit; + } + + throw Object.assign(err, { + code: "BABEL_VERSION_UNSUPPORTED", + version, + range + }); +} \ No newline at end of file diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/package.json b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/package.json new file mode 100644 index 00000000000000..282d93f719fe54 --- /dev/null +++ b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/package.json @@ -0,0 +1,18 @@ +{ + "name": "@babel/helper-plugin-utils", + "version": "7.10.4", + "description": "General utilities for plugins to use", + "author": "Logan Smyth ", + "homepage": "https://babeljs.io/", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-plugin-utils" + }, + "main": "lib/index.js", + "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df" +} diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/package.json b/tools/node_modules/@babel/plugin-syntax-class-properties/package.json new file mode 100644 index 00000000000000..584a81d1514bf8 --- /dev/null +++ b/tools/node_modules/@babel/plugin-syntax-class-properties/package.json @@ -0,0 +1,27 @@ +{ + "name": "@babel/plugin-syntax-class-properties", + "version": "7.12.1", + "description": "Allow parsing of class properties", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-plugin-syntax-class-properties" + }, + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "lib/index.js", + "keywords": [ + "babel-plugin" + ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + }, + "devDependencies": { + "@babel/core": "^7.12.1" + } +} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/LICENSE b/tools/node_modules/babel-eslint/LICENSE deleted file mode 100644 index 80194a854b944c..00000000000000 --- a/tools/node_modules/babel-eslint/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2014-2016 Sebastian McKenzie - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/babel-eslint/README.md b/tools/node_modules/babel-eslint/README.md deleted file mode 100644 index 6a4f9085e3ac5b..00000000000000 --- a/tools/node_modules/babel-eslint/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# babel-eslint [![npm](https://img.shields.io/npm/v/babel-eslint.svg)](https://www.npmjs.com/package/babel-eslint) [![travis](https://img.shields.io/travis/babel/babel-eslint/master.svg)](https://travis-ci.org/babel/babel-eslint) [![npm-downloads](https://img.shields.io/npm/dm/babel-eslint.svg)](https://www.npmjs.com/package/babel-eslint) - -**babel-eslint** allows you to lint **ALL** valid Babel code with the fantastic -[ESLint](https://github.com/eslint/eslint). - -### Why Use babel-eslint - -You only need to use babel-eslint if you are using types (Flow) or experimental features not supported in ESLint itself yet. Otherwise try the default parser (you don't have to use it just because you are using Babel). - ---- - -> If there is an issue, first check if it can be reproduced with the regular parser or with the latest versions of `eslint` and `babel-eslint`! - -For questions and support please visit the [`#discussion`](https://babeljs.slack.com/messages/discussion/) babel slack channel (sign up [here](https://github.com/babel/notes/issues/38)) or eslint [gitter](https://gitter.im/eslint/eslint)! - -> Note that the `ecmaFeatures` config property may still be required for ESLint to work properly with features not in ECMAScript 5 by default. Examples are `globalReturn` and `modules`). - -## Known Issues - -Flow: -> Check out [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype): An `eslint` plugin that makes flow type annotations global variables and marks declarations as used. Solves the problem of false positives with `no-undef` and `no-unused-vars`. -- `no-undef` for global flow types: `ReactElement`, `ReactClass` [#130](https://github.com/babel/babel-eslint/issues/130#issuecomment-111215076) - - Workaround: define types as globals in `.eslintrc` or define types and import them `import type ReactElement from './types'` -- `no-unused-vars/no-undef` with Flow declarations (`declare module A {}`) [#132](https://github.com/babel/babel-eslint/issues/132#issuecomment-112815926) - -Modules/strict mode -- `no-unused-vars: [2, {vars: local}]` [#136](https://github.com/babel/babel-eslint/issues/136) - -Please check out [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) for React/JSX issues -- `no-unused-vars` with jsx - -Please check out [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) for other issues - -## How does it work? - -ESLint allows custom parsers. This is great but some of the syntax nodes that Babel supports -aren't supported by ESLint. When using this plugin, ESLint is monkeypatched and your code is -transformed into code that ESLint can understand. All location info such as line numbers, -columns is also retained so you can track down errors with ease. - -Basically `babel-eslint` exports an [`index.js`](/index.js) that a linter can use. -It just needs to export a `parse` method that takes in a string of code and outputs an AST. - -## Usage - -### Supported ESLint versions - -ESLint | babel-eslint ------------- | ------------- -4.x | >= 6.x -3.x | >= 6.x -2.x | >= 6.x -1.x | >= 5.x - -### Install - -Ensure that you have substituted the correct version lock for `eslint` and `babel-eslint` into this command: - -```sh -$ npm install eslint@4.x babel-eslint@8 --save-dev -# or -$ yarn add eslint@4.x babel-eslint@8 -D -``` - -### Setup - -**.eslintrc** - -```json -{ - "parser": "babel-eslint", - "rules": { - "strict": 0 - } -} -``` - -Check out the [ESLint docs](http://eslint.org/docs/rules/) for all possible rules. - -### Configuration - -- `sourceType` can be set to `'module'`(default) or `'script'` if your code isn't using ECMAScript modules. -- `allowImportExportEverywhere` (default `false`) can be set to `true` to allow import and export declarations to appear anywhere a statement is allowed if your build environment supports that. Otherwise import and export declarations can only appear at a program's top level. -- `codeFrame` (default `true`) can be set to `false` to disable the code frame in the reporter. This is useful since some eslint formatters don't play well with it. - -**.eslintrc** - -```json -{ - "parser": "babel-eslint", - "parserOptions": { - "sourceType": "module", - "allowImportExportEverywhere": false, - "codeFrame": true - } -} -``` - -### Run - -```sh -$ eslint your-files-here -``` diff --git a/tools/node_modules/babel-eslint/lib/analyze-scope.js b/tools/node_modules/babel-eslint/lib/analyze-scope.js deleted file mode 100644 index 9ad95bd2517e4f..00000000000000 --- a/tools/node_modules/babel-eslint/lib/analyze-scope.js +++ /dev/null @@ -1,342 +0,0 @@ -"use strict"; - -const t = require("@babel/types"); -const requireFromESLint = require("./require-from-eslint"); - -const escope = requireFromESLint("eslint-scope"); -const Definition = requireFromESLint("eslint-scope/lib/definition").Definition; -const OriginalPatternVisitor = requireFromESLint( - "eslint-scope/lib/pattern-visitor" -); -const OriginalReferencer = requireFromESLint("eslint-scope/lib/referencer"); -const fallback = require("eslint-visitor-keys").getKeys; -const childVisitorKeys = require("./visitor-keys"); - -const flowFlippedAliasKeys = t.FLIPPED_ALIAS_KEYS.Flow.concat([ - "ArrayPattern", - "ClassDeclaration", - "ClassExpression", - "FunctionDeclaration", - "FunctionExpression", - "Identifier", - "ObjectPattern", - "RestElement", -]); -const visitorKeysMap = Object.keys(t.VISITOR_KEYS).reduce(function(acc, key) { - const value = t.VISITOR_KEYS[key]; - if (flowFlippedAliasKeys.indexOf(value) === -1) { - acc[key] = value; - } - return acc; -}, {}); - -const propertyTypes = { - // loops - callProperties: { type: "loop", values: ["value"] }, - indexers: { type: "loop", values: ["key", "value"] }, - properties: { type: "loop", values: ["argument", "value"] }, - types: { type: "loop" }, - params: { type: "loop" }, - // single property - argument: { type: "single" }, - elementType: { type: "single" }, - qualification: { type: "single" }, - rest: { type: "single" }, - returnType: { type: "single" }, - // others - typeAnnotation: { type: "typeAnnotation" }, - typeParameters: { type: "typeParameters" }, - id: { type: "id" }, -}; - -class PatternVisitor extends OriginalPatternVisitor { - ArrayPattern(node) { - node.elements.forEach(this.visit, this); - } - - ObjectPattern(node) { - node.properties.forEach(this.visit, this); - } -} - -class Referencer extends OriginalReferencer { - // inherits. - visitPattern(node, options, callback) { - if (!node) { - return; - } - - // Visit type annotations. - this._checkIdentifierOrVisit(node.typeAnnotation); - if (t.isAssignmentPattern(node)) { - this._checkIdentifierOrVisit(node.left.typeAnnotation); - } - - // Overwrite `super.visitPattern(node, options, callback)` in order to not visit `ArrayPattern#typeAnnotation` and `ObjectPattern#typeAnnotation`. - if (typeof options === "function") { - callback = options; - options = { processRightHandNodes: false }; - } - - const visitor = new PatternVisitor(this.options, node, callback); - visitor.visit(node); - - // Process the right hand nodes recursively. - if (options.processRightHandNodes) { - visitor.rightHandNodes.forEach(this.visit, this); - } - } - - // inherits. - visitClass(node) { - // Decorators. - this._visitArray(node.decorators); - - // Flow type parameters. - const typeParamScope = this._nestTypeParamScope(node); - - // Flow super types. - this._visitTypeAnnotation(node.implements); - this._visitTypeAnnotation( - node.superTypeParameters && node.superTypeParameters.params - ); - - // Basic. - super.visitClass(node); - - // Close the type parameter scope. - if (typeParamScope) { - this.close(node); - } - } - - // inherits. - visitFunction(node) { - const typeParamScope = this._nestTypeParamScope(node); - - // Flow return types. - this._checkIdentifierOrVisit(node.returnType); - - // Basic. - super.visitFunction(node); - - // Close the type parameter scope. - if (typeParamScope) { - this.close(node); - } - } - - // inherits. - visitProperty(node) { - if (node.value && node.value.type === "TypeCastExpression") { - this._visitTypeAnnotation(node.value); - } - this._visitArray(node.decorators); - super.visitProperty(node); - } - - InterfaceDeclaration(node) { - this._createScopeVariable(node, node.id); - - const typeParamScope = this._nestTypeParamScope(node); - - // TODO: Handle mixins - this._visitArray(node.extends); - this.visit(node.body); - - if (typeParamScope) { - this.close(node); - } - } - - TypeAlias(node) { - this._createScopeVariable(node, node.id); - - const typeParamScope = this._nestTypeParamScope(node); - - this.visit(node.right); - - if (typeParamScope) { - this.close(node); - } - } - - ClassProperty(node) { - this._visitClassProperty(node); - } - - ClassPrivateProperty(node) { - this._visitClassProperty(node); - } - - DeclareModule(node) { - this._visitDeclareX(node); - } - - DeclareFunction(node) { - this._visitDeclareX(node); - } - - DeclareVariable(node) { - this._visitDeclareX(node); - } - - DeclareClass(node) { - this._visitDeclareX(node); - } - - // visit OptionalMemberExpression as a MemberExpression. - OptionalMemberExpression(node) { - super.MemberExpression(node); - } - - _visitClassProperty(node) { - this._visitTypeAnnotation(node.typeAnnotation); - this.visitProperty(node); - } - - _visitDeclareX(node) { - if (node.id) { - this._createScopeVariable(node, node.id); - } - - const typeParamScope = this._nestTypeParamScope(node); - if (typeParamScope) { - this.close(node); - } - } - - _createScopeVariable(node, name) { - this.currentScope().variableScope.__define( - name, - new Definition("Variable", name, node, null, null, null) - ); - } - - _nestTypeParamScope(node) { - if (!node.typeParameters) { - return null; - } - - const parentScope = this.scopeManager.__currentScope; - const scope = new escope.Scope( - this.scopeManager, - "type-parameters", - parentScope, - node, - false - ); - - this.scopeManager.__nestScope(scope); - for (let j = 0; j < node.typeParameters.params.length; j++) { - const name = node.typeParameters.params[j]; - scope.__define(name, new Definition("TypeParameter", name, name)); - if (name.typeAnnotation) { - this._checkIdentifierOrVisit(name); - } - } - scope.__define = function() { - return parentScope.__define.apply(parentScope, arguments); - }; - - return scope; - } - - _visitTypeAnnotation(node) { - if (!node) { - return; - } - if (Array.isArray(node)) { - node.forEach(this._visitTypeAnnotation, this); - return; - } - - // get property to check (params, id, etc...) - const visitorValues = visitorKeysMap[node.type]; - if (!visitorValues) { - return; - } - - // can have multiple properties - for (let i = 0; i < visitorValues.length; i++) { - const visitorValue = visitorValues[i]; - const propertyType = propertyTypes[visitorValue]; - const nodeProperty = node[visitorValue]; - // check if property or type is defined - if (propertyType == null || nodeProperty == null) { - continue; - } - if (propertyType.type === "loop") { - for (let j = 0; j < nodeProperty.length; j++) { - if (Array.isArray(propertyType.values)) { - for (let k = 0; k < propertyType.values.length; k++) { - const loopPropertyNode = nodeProperty[j][propertyType.values[k]]; - if (loopPropertyNode) { - this._checkIdentifierOrVisit(loopPropertyNode); - } - } - } else { - this._checkIdentifierOrVisit(nodeProperty[j]); - } - } - } else if (propertyType.type === "single") { - this._checkIdentifierOrVisit(nodeProperty); - } else if (propertyType.type === "typeAnnotation") { - this._visitTypeAnnotation(node.typeAnnotation); - } else if (propertyType.type === "typeParameters") { - for (let l = 0; l < node.typeParameters.params.length; l++) { - this._checkIdentifierOrVisit(node.typeParameters.params[l]); - } - } else if (propertyType.type === "id") { - if (node.id.type === "Identifier") { - this._checkIdentifierOrVisit(node.id); - } else { - this._visitTypeAnnotation(node.id); - } - } - } - } - - _checkIdentifierOrVisit(node) { - if (node && node.typeAnnotation) { - this._visitTypeAnnotation(node.typeAnnotation); - } else if (node && node.type === "Identifier") { - this.visit(node); - } else { - this._visitTypeAnnotation(node); - } - } - - _visitArray(nodeList) { - if (nodeList) { - for (const node of nodeList) { - this.visit(node); - } - } - } -} - -module.exports = function(ast, parserOptions) { - const options = { - ignoreEval: true, - optimistic: false, - directive: false, - nodejsScope: - ast.sourceType === "script" && - (parserOptions.ecmaFeatures && - parserOptions.ecmaFeatures.globalReturn) === true, - impliedStrict: false, - sourceType: ast.sourceType, - ecmaVersion: parserOptions.ecmaVersion || 2018, - fallback, - }; - - options.childVisitorKeys = childVisitorKeys; - - const scopeManager = new escope.ScopeManager(options); - const referencer = new Referencer(options, scopeManager); - - referencer.visit(ast); - - return scopeManager; -}; diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/attachComments.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/attachComments.js deleted file mode 100644 index 8c608a45ad9473..00000000000000 --- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/attachComments.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; - -// comment fixes -module.exports = function(ast, comments, tokens) { - if (comments.length) { - var firstComment = comments[0]; - var lastComment = comments[comments.length - 1]; - // fixup program start - if (!tokens.length) { - // if no tokens, the program starts at the end of the last comment - ast.start = lastComment.end; - ast.loc.start.line = lastComment.loc.end.line; - ast.loc.start.column = lastComment.loc.end.column; - - if (ast.leadingComments === null && ast.innerComments.length) { - ast.leadingComments = ast.innerComments; - } - } else if (firstComment.start < tokens[0].start) { - // if there are comments before the first token, the program starts at the first token - var token = tokens[0]; - // ast.start = token.start; - // ast.loc.start.line = token.loc.start.line; - // ast.loc.start.column = token.loc.start.column; - - // estraverse do not put leading comments on first node when the comment - // appear before the first token - if (ast.body.length) { - var node = ast.body[0]; - node.leadingComments = []; - var firstTokenStart = token.start; - var len = comments.length; - for (var i = 0; i < len && comments[i].start < firstTokenStart; i++) { - node.leadingComments.push(comments[i]); - } - } - } - // fixup program end - if (tokens.length) { - var lastToken = tokens[tokens.length - 1]; - if (lastComment.end > lastToken.end) { - // If there is a comment after the last token, the program ends at the - // last token and not the comment - // ast.end = lastToken.end; - ast.range[1] = lastToken.end; - ast.loc.end.line = lastToken.loc.end.line; - ast.loc.end.column = lastToken.loc.end.column; - } - } - } else { - if (!tokens.length) { - ast.loc.start.line = 1; - ast.loc.end.line = 1; - } - } - if (ast.body && ast.body.length > 0) { - ast.loc.start.line = ast.body[0].loc.start.line; - ast.range[0] = ast.body[0].start; - } -}; diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertComments.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertComments.js deleted file mode 100644 index 17d7117372946d..00000000000000 --- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertComments.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -module.exports = function(comments) { - for (var i = 0; i < comments.length; i++) { - var comment = comments[i]; - if (comment.type === "CommentBlock") { - comment.type = "Block"; - } else if (comment.type === "CommentLine") { - comment.type = "Line"; - } - // sometimes comments don't get ranges computed, - // even with options.ranges === true - if (!comment.range) { - comment.range = [comment.start, comment.end]; - } - } -}; diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js deleted file mode 100644 index accde61e56d6a9..00000000000000 --- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; - -module.exports = function(tokens, tt) { - let curlyBrace = null; - let templateTokens = []; - const result = []; - - function addTemplateType() { - const start = templateTokens[0]; - const end = templateTokens[templateTokens.length - 1]; - - const value = templateTokens.reduce((result, token) => { - if (token.value) { - result += token.value; - } else if (token.type !== tt.template) { - result += token.type.label; - } - - return result; - }, ""); - - result.push({ - type: "Template", - value: value, - start: start.start, - end: end.end, - loc: { - start: start.loc.start, - end: end.loc.end, - }, - }); - - templateTokens = []; - } - - tokens.forEach(token => { - switch (token.type) { - case tt.backQuote: - if (curlyBrace) { - result.push(curlyBrace); - curlyBrace = null; - } - - templateTokens.push(token); - - if (templateTokens.length > 1) { - addTemplateType(); - } - - break; - - case tt.dollarBraceL: - templateTokens.push(token); - addTemplateType(); - break; - - case tt.braceR: - if (curlyBrace) { - result.push(curlyBrace); - } - - curlyBrace = token; - break; - - case tt.template: - if (curlyBrace) { - templateTokens.push(curlyBrace); - curlyBrace = null; - } - - templateTokens.push(token); - break; - - case tt.eof: - if (curlyBrace) { - result.push(curlyBrace); - } - - break; - - default: - if (curlyBrace) { - result.push(curlyBrace); - curlyBrace = null; - } - - result.push(token); - } - }); - - return result; -}; diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/index.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/index.js deleted file mode 100644 index 6d6e12bfc08686..00000000000000 --- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/index.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -var attachComments = require("./attachComments"); -var convertComments = require("./convertComments"); -var toTokens = require("./toTokens"); -var toAST = require("./toAST"); - -module.exports = function(ast, traverse, tt, code) { - // convert tokens - ast.tokens = toTokens(ast.tokens, tt, code); - - // add comments - convertComments(ast.comments); - - // transform esprima and acorn divergent nodes - toAST(ast, traverse, code); - - // ast.program.tokens = ast.tokens; - // ast.program.comments = ast.comments; - // ast = ast.program; - - // remove File - ast.type = "Program"; - ast.sourceType = ast.program.sourceType; - ast.directives = ast.program.directives; - ast.body = ast.program.body; - delete ast.program; - - attachComments(ast, ast.comments, ast.tokens); -}; diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toAST.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/toAST.js deleted file mode 100644 index b3da41f0cb0663..00000000000000 --- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toAST.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; - -var t = require("@babel/types"); -var convertComments = require("./convertComments"); - -module.exports = function(ast, traverse, code) { - var state = { source: code }; - - // Monkey patch visitor keys in order to be able to traverse the estree nodes - t.VISITOR_KEYS.Property = t.VISITOR_KEYS.ObjectProperty; - t.VISITOR_KEYS.MethodDefinition = [ - "key", - "value", - "decorators", - "returnType", - "typeParameters", - ]; - - traverse(ast, astTransformVisitor, null, state); - - delete t.VISITOR_KEYS.Property; - delete t.VISITOR_KEYS.MethodDefinition; -}; - -var astTransformVisitor = { - noScope: true, - enter(path) { - var node = path.node; - - // private var to track original node type - node._babelType = node.type; - - if (node.innerComments) { - node.trailingComments = node.innerComments; - delete node.innerComments; - } - - if (node.trailingComments) { - convertComments(node.trailingComments); - } - - if (node.leadingComments) { - convertComments(node.leadingComments); - } - }, - exit(path) { - var node = path.node; - - if (path.isJSXText()) { - node.type = "Literal"; - } - - if ( - path.isRestElement() && - path.parent && - path.parent.type === "ObjectPattern" - ) { - node.type = "ExperimentalRestProperty"; - } - - if ( - path.isSpreadElement() && - path.parent && - path.parent.type === "ObjectExpression" - ) { - node.type = "ExperimentalSpreadProperty"; - } - - if (path.isTypeParameter()) { - node.type = "Identifier"; - node.typeAnnotation = node.bound; - delete node.bound; - } - - // flow: prevent "no-undef" - // for "Component" in: "let x: React.Component" - if (path.isQualifiedTypeIdentifier()) { - delete node.id; - } - // for "b" in: "var a: { b: Foo }" - if (path.isObjectTypeProperty()) { - delete node.key; - } - // for "indexer" in: "var a: {[indexer: string]: number}" - if (path.isObjectTypeIndexer()) { - delete node.id; - } - // for "param" in: "var a: { func(param: Foo): Bar };" - if (path.isFunctionTypeParam()) { - delete node.name; - } - - // modules - - if (path.isImportDeclaration()) { - delete node.isType; - } - - // template string range fixes - if (path.isTemplateLiteral()) { - for (var j = 0; j < node.quasis.length; j++) { - var q = node.quasis[j]; - q.range[0] -= 1; - if (q.tail) { - q.range[1] += 1; - } else { - q.range[1] += 2; - } - q.loc.start.column -= 1; - if (q.tail) { - q.loc.end.column += 1; - } else { - q.loc.end.column += 2; - } - } - } - }, -}; diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js deleted file mode 100644 index 44c73529a11159..00000000000000 --- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; - -module.exports = function(token, tt, source) { - var type = token.type; - token.range = [token.start, token.end]; - - if (type === tt.name) { - token.type = "Identifier"; - } else if ( - type === tt.semi || - type === tt.comma || - type === tt.parenL || - type === tt.parenR || - type === tt.braceL || - type === tt.braceR || - type === tt.slash || - type === tt.dot || - type === tt.bracketL || - type === tt.bracketR || - type === tt.ellipsis || - type === tt.arrow || - type === tt.pipeline || - type === tt.star || - type === tt.incDec || - type === tt.colon || - type === tt.question || - type === tt.questionDot || - type === tt.template || - type === tt.backQuote || - type === tt.dollarBraceL || - type === tt.at || - type === tt.logicalOR || - type === tt.logicalAND || - type === tt.nullishCoalescing || - type === tt.bitwiseOR || - type === tt.bitwiseXOR || - type === tt.bitwiseAND || - type === tt.equality || - type === tt.relational || - type === tt.bitShift || - type === tt.plusMin || - type === tt.modulo || - type === tt.exponent || - type === tt.bang || - type === tt.tilde || - type === tt.doubleColon || - type.isAssign - ) { - token.type = "Punctuator"; - if (!token.value) token.value = type.label; - } else if (type === tt.jsxTagStart) { - token.type = "Punctuator"; - token.value = "<"; - } else if (type === tt.jsxTagEnd) { - token.type = "Punctuator"; - token.value = ">"; - } else if (type === tt.jsxName) { - token.type = "JSXIdentifier"; - } else if (type === tt.jsxText) { - token.type = "JSXText"; - } else if (type.keyword === "null") { - token.type = "Null"; - } else if (type.keyword === "false" || type.keyword === "true") { - token.type = "Boolean"; - } else if (type.keyword) { - token.type = "Keyword"; - } else if (type === tt.num) { - token.type = "Numeric"; - token.value = source.slice(token.start, token.end); - } else if (type === tt.string) { - token.type = "String"; - token.value = source.slice(token.start, token.end); - } else if (type === tt.regexp) { - token.type = "RegularExpression"; - var value = token.value; - token.regex = { - pattern: value.pattern, - flags: value.flags, - }; - token.value = `/${value.pattern}/${value.flags}`; - } - - return token; -}; diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js deleted file mode 100644 index bb30819bacf717..00000000000000 --- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var convertTemplateType = require("./convertTemplateType"); -var toToken = require("./toToken"); - -module.exports = function(tokens, tt, code) { - return convertTemplateType(tokens, tt) - .filter(t => t.type !== "CommentLine" && t.type !== "CommentBlock") - .map(t => toToken(t, tt, code)); -}; diff --git a/tools/node_modules/babel-eslint/lib/index.js b/tools/node_modules/babel-eslint/lib/index.js deleted file mode 100644 index 9e527d26d7f8ce..00000000000000 --- a/tools/node_modules/babel-eslint/lib/index.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -exports.parse = function(code, options) { - return exports.parseForESLint(code, options).ast; -}; - -exports.parseForESLint = function(code, options) { - options = options || {}; - options.ecmaVersion = options.ecmaVersion || 2018; - options.sourceType = options.sourceType || "module"; - options.allowImportExportEverywhere = - options.allowImportExportEverywhere || false; - - return require("./parse-with-scope")(code, options); -}; - -exports.parseNoPatch = function(code, options) { - return require("./parse")(code, options); -}; diff --git a/tools/node_modules/babel-eslint/lib/parse-with-scope.js b/tools/node_modules/babel-eslint/lib/parse-with-scope.js deleted file mode 100644 index 36e3fce5b06712..00000000000000 --- a/tools/node_modules/babel-eslint/lib/parse-with-scope.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -const visitorKeys = require("./visitor-keys"); -const analyzeScope = require("./analyze-scope"); -const parse = require("./parse"); - -module.exports = function(code, options) { - const ast = parse(code, options); - const scopeManager = analyzeScope(ast, options); - - return { ast, scopeManager, visitorKeys }; -}; diff --git a/tools/node_modules/babel-eslint/lib/parse.js b/tools/node_modules/babel-eslint/lib/parse.js deleted file mode 100644 index b23b9dc9fc75f0..00000000000000 --- a/tools/node_modules/babel-eslint/lib/parse.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; - -var babylonToEspree = require("./babylon-to-espree"); -var parse = require("@babel/parser").parse; -var tt = require("@babel/parser").tokTypes; -var traverse = require("@babel/traverse").default; -var codeFrameColumns = require("@babel/code-frame").codeFrameColumns; - -module.exports = function(code, options) { - const legacyDecorators = - options.ecmaFeatures && options.ecmaFeatures.legacyDecorators; - - var opts = { - codeFrame: options.hasOwnProperty("codeFrame") ? options.codeFrame : true, - sourceType: options.sourceType, - allowImportExportEverywhere: options.allowImportExportEverywhere, // consistent with espree - allowReturnOutsideFunction: true, - allowSuperOutsideMethod: true, - ranges: true, - tokens: true, - plugins: [ - ["flow", { all: true }], - "jsx", - "estree", - "asyncFunctions", - "asyncGenerators", - "classConstructorCall", - "classProperties", - legacyDecorators - ? "decorators-legacy" - : ["decorators", { decoratorsBeforeExport: false }], - "doExpressions", - "exponentiationOperator", - "exportDefaultFrom", - "exportNamespaceFrom", - "functionBind", - "functionSent", - "objectRestSpread", - "trailingFunctionCommas", - "dynamicImport", - "numericSeparator", - "optionalChaining", - "importMeta", - "classPrivateProperties", - "bigInt", - "optionalCatchBinding", - "throwExpressions", - ["pipelineOperator", { proposal: "minimal" }], - "nullishCoalescingOperator", - "logicalAssignment", - ], - }; - - var ast; - try { - ast = parse(code, opts); - } catch (err) { - if (err instanceof SyntaxError) { - err.lineNumber = err.loc.line; - err.column = err.loc.column; - - if (opts.codeFrame) { - err.lineNumber = err.loc.line; - err.column = err.loc.column + 1; - - // remove trailing "(LINE:COLUMN)" acorn message and add in esprima syntax error message start - err.message = - "Line " + - err.lineNumber + - ": " + - err.message.replace(/ \((\d+):(\d+)\)$/, "") + - // add codeframe - "\n\n" + - codeFrameColumns( - code, - { - start: { - line: err.lineNumber, - column: err.column, - }, - }, - { highlightCode: true } - ); - } - } - - throw err; - } - - babylonToEspree(ast, traverse, tt, code); - - return ast; -}; diff --git a/tools/node_modules/babel-eslint/lib/require-from-eslint.js b/tools/node_modules/babel-eslint/lib/require-from-eslint.js deleted file mode 100644 index 3834689f54bde4..00000000000000 --- a/tools/node_modules/babel-eslint/lib/require-from-eslint.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -const resolve = require("resolve"); -const eslintBase = require.resolve("eslint"); - -module.exports = function requireFromESLint(id) { - const path = resolve.sync(id, { basedir: eslintBase }); - return require(path); -}; diff --git a/tools/node_modules/babel-eslint/lib/visitor-keys.js b/tools/node_modules/babel-eslint/lib/visitor-keys.js deleted file mode 100644 index 921a0bb0165749..00000000000000 --- a/tools/node_modules/babel-eslint/lib/visitor-keys.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -const BABEL_VISITOR_KEYS = require("@babel/types").VISITOR_KEYS; -const ESLINT_VISITOR_KEYS = require("eslint-visitor-keys").KEYS; - -module.exports = Object.assign( - { - Literal: ESLINT_VISITOR_KEYS.Literal, - MethodDefinition: ["decorators"].concat( - ESLINT_VISITOR_KEYS.MethodDefinition - ), - Property: ["decorators"].concat(ESLINT_VISITOR_KEYS.Property), - }, - BABEL_VISITOR_KEYS -); diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/lib/index.js deleted file mode 100644 index 35176fbc0682ca..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/lib/index.js +++ /dev/null @@ -1,173 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.codeFrameColumns = codeFrameColumns; -exports.default = _default; - -function _highlight() { - const data = _interopRequireWildcard(require("@babel/highlight")); - - _highlight = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -let deprecationWarningShown = false; - -function getDefs(chalk) { - return { - gutter: chalk.grey, - marker: chalk.red.bold, - message: chalk.red.bold - }; -} - -const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - -function getMarkerLines(loc, source, opts) { - const startLoc = Object.assign({ - column: 0, - line: -1 - }, loc.start); - const endLoc = Object.assign({}, startLoc, loc.end); - const { - linesAbove = 2, - linesBelow = 3 - } = opts || {}; - const startLine = startLoc.line; - const startColumn = startLoc.column; - const endLine = endLoc.line; - const endColumn = endLoc.column; - let start = Math.max(startLine - (linesAbove + 1), 0); - let end = Math.min(source.length, endLine + linesBelow); - - if (startLine === -1) { - start = 0; - } - - if (endLine === -1) { - end = source.length; - } - - const lineDiff = endLine - startLine; - const markerLines = {}; - - if (lineDiff) { - for (let i = 0; i <= lineDiff; i++) { - const lineNumber = i + startLine; - - if (!startColumn) { - markerLines[lineNumber] = true; - } else if (i === 0) { - const sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; - } else if (i === lineDiff) { - markerLines[lineNumber] = [0, endColumn]; - } else { - const sourceLength = source[lineNumber - i].length; - markerLines[lineNumber] = [0, sourceLength]; - } - } - } else { - if (startColumn === endColumn) { - if (startColumn) { - markerLines[startLine] = [startColumn, 0]; - } else { - markerLines[startLine] = true; - } - } else { - markerLines[startLine] = [startColumn, endColumn - startColumn]; - } - } - - return { - start, - end, - markerLines - }; -} - -function codeFrameColumns(rawLines, loc, opts = {}) { - const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts); - const chalk = (0, _highlight().getChalk)(opts); - const defs = getDefs(chalk); - - const maybeHighlight = (chalkFn, string) => { - return highlighted ? chalkFn(string) : string; - }; - - const lines = rawLines.split(NEWLINE); - const { - start, - end, - markerLines - } = getMarkerLines(loc, lines, opts); - const hasColumns = loc.start && typeof loc.start.column === "number"; - const numberMaxWidth = String(end).length; - const highlightedLines = highlighted ? (0, _highlight().default)(rawLines, opts) : rawLines; - let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => { - const number = start + 1 + index; - const paddedNumber = ` ${number}`.slice(-numberMaxWidth); - const gutter = ` ${paddedNumber} | `; - const hasMarker = markerLines[number]; - const lastMarkerLine = !markerLines[number + 1]; - - if (hasMarker) { - let markerLine = ""; - - if (Array.isArray(hasMarker)) { - const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); - const numberOfMarkers = hasMarker[1] || 1; - markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); - - if (lastMarkerLine && opts.message) { - markerLine += " " + maybeHighlight(defs.message, opts.message); - } - } - - return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); - } else { - return ` ${maybeHighlight(defs.gutter, gutter)}${line}`; - } - }).join("\n"); - - if (opts.message && !hasColumns) { - frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; - } - - if (highlighted) { - return chalk.reset(frame); - } else { - return frame; - } -} - -function _default(rawLines, lineNumber, colNumber, opts = {}) { - if (!deprecationWarningShown) { - deprecationWarningShown = true; - const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; - - if (process.emitWarning) { - process.emitWarning(message, "DeprecationWarning"); - } else { - const deprecationError = new Error(message); - deprecationError.name = "DeprecationWarning"; - console.warn(new Error(message)); - } - } - - colNumber = Math.max(colNumber, 0); - const location = { - start: { - column: colNumber, - line: lineNumber - } - }; - return codeFrameColumns(rawLines, location, opts); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/package.json deleted file mode 100644 index d619d9a8f53194..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/highlight": "^7.0.0" - }, - "deprecated": false, - "description": "Generate errors that contain a code frame that point to source locations.", - "devDependencies": { - "chalk": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/code-frame", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" - }, - "version": "7.5.5" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/generator/README.md deleted file mode 100644 index fc980b167d1513..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/generator - -> Turns an AST into code. - -See our website [@babel/generator](https://babeljs.io/docs/en/next/babel-generator.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/generator -``` - -or using yarn: - -```sh -yarn add @babel/generator --dev -``` diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/classes.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/classes.js deleted file mode 100644 index 7f54632ad012e1..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/classes.js +++ /dev/null @@ -1,190 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration; -exports.ClassBody = ClassBody; -exports.ClassProperty = ClassProperty; -exports.ClassPrivateProperty = ClassPrivateProperty; -exports.ClassMethod = ClassMethod; -exports.ClassPrivateMethod = ClassPrivateMethod; -exports._classMethodHead = _classMethodHead; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function ClassDeclaration(node, parent) { - if (!this.format.decoratorsBeforeExport || !t().isExportDefaultDeclaration(parent) && !t().isExportNamedDeclaration(parent)) { - this.printJoin(node.decorators, node); - } - - if (node.declare) { - this.word("declare"); - this.space(); - } - - if (node.abstract) { - this.word("abstract"); - this.space(); - } - - this.word("class"); - - if (node.id) { - this.space(); - this.print(node.id, node); - } - - this.print(node.typeParameters, node); - - if (node.superClass) { - this.space(); - this.word("extends"); - this.space(); - this.print(node.superClass, node); - this.print(node.superTypeParameters, node); - } - - if (node.implements) { - this.space(); - this.word("implements"); - this.space(); - this.printList(node.implements, node); - } - - this.space(); - this.print(node.body, node); -} - -function ClassBody(node) { - this.token("{"); - this.printInnerComments(node); - - if (node.body.length === 0) { - this.token("}"); - } else { - this.newline(); - this.indent(); - this.printSequence(node.body, node); - this.dedent(); - if (!this.endsWith("\n")) this.newline(); - this.rightBrace(); - } -} - -function ClassProperty(node) { - this.printJoin(node.decorators, node); - - if (node.accessibility) { - this.word(node.accessibility); - this.space(); - } - - if (node.static) { - this.word("static"); - this.space(); - } - - if (node.abstract) { - this.word("abstract"); - this.space(); - } - - if (node.readonly) { - this.word("readonly"); - this.space(); - } - - if (node.computed) { - this.token("["); - this.print(node.key, node); - this.token("]"); - } else { - this._variance(node); - - this.print(node.key, node); - } - - if (node.optional) { - this.token("?"); - } - - if (node.definite) { - this.token("!"); - } - - this.print(node.typeAnnotation, node); - - if (node.value) { - this.space(); - this.token("="); - this.space(); - this.print(node.value, node); - } - - this.semicolon(); -} - -function ClassPrivateProperty(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this.print(node.key, node); - this.print(node.typeAnnotation, node); - - if (node.value) { - this.space(); - this.token("="); - this.space(); - this.print(node.value, node); - } - - this.semicolon(); -} - -function ClassMethod(node) { - this._classMethodHead(node); - - this.space(); - this.print(node.body, node); -} - -function ClassPrivateMethod(node) { - this._classMethodHead(node); - - this.space(); - this.print(node.body, node); -} - -function _classMethodHead(node) { - this.printJoin(node.decorators, node); - - if (node.accessibility) { - this.word(node.accessibility); - this.space(); - } - - if (node.abstract) { - this.word("abstract"); - this.space(); - } - - if (node.static) { - this.word("static"); - this.space(); - } - - this._methodHead(node); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/flow.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/flow.js deleted file mode 100644 index 8853fd8aabcefa..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/flow.js +++ /dev/null @@ -1,639 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.AnyTypeAnnotation = AnyTypeAnnotation; -exports.ArrayTypeAnnotation = ArrayTypeAnnotation; -exports.BooleanTypeAnnotation = BooleanTypeAnnotation; -exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; -exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; -exports.DeclareClass = DeclareClass; -exports.DeclareFunction = DeclareFunction; -exports.InferredPredicate = InferredPredicate; -exports.DeclaredPredicate = DeclaredPredicate; -exports.DeclareInterface = DeclareInterface; -exports.DeclareModule = DeclareModule; -exports.DeclareModuleExports = DeclareModuleExports; -exports.DeclareTypeAlias = DeclareTypeAlias; -exports.DeclareOpaqueType = DeclareOpaqueType; -exports.DeclareVariable = DeclareVariable; -exports.DeclareExportDeclaration = DeclareExportDeclaration; -exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; -exports.ExistsTypeAnnotation = ExistsTypeAnnotation; -exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.FunctionTypeParam = FunctionTypeParam; -exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends; -exports._interfaceish = _interfaceish; -exports._variance = _variance; -exports.InterfaceDeclaration = InterfaceDeclaration; -exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; -exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; -exports.MixedTypeAnnotation = MixedTypeAnnotation; -exports.EmptyTypeAnnotation = EmptyTypeAnnotation; -exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.NumberTypeAnnotation = NumberTypeAnnotation; -exports.StringTypeAnnotation = StringTypeAnnotation; -exports.ThisTypeAnnotation = ThisTypeAnnotation; -exports.TupleTypeAnnotation = TupleTypeAnnotation; -exports.TypeofTypeAnnotation = TypeofTypeAnnotation; -exports.TypeAlias = TypeAlias; -exports.TypeAnnotation = TypeAnnotation; -exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation; -exports.TypeParameter = TypeParameter; -exports.OpaqueType = OpaqueType; -exports.ObjectTypeAnnotation = ObjectTypeAnnotation; -exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot; -exports.ObjectTypeCallProperty = ObjectTypeCallProperty; -exports.ObjectTypeIndexer = ObjectTypeIndexer; -exports.ObjectTypeProperty = ObjectTypeProperty; -exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; -exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; -exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.TypeCastExpression = TypeCastExpression; -exports.Variance = Variance; -exports.VoidTypeAnnotation = VoidTypeAnnotation; -Object.defineProperty(exports, "NumberLiteralTypeAnnotation", { - enumerable: true, - get: function () { - return _types2.NumericLiteral; - } -}); -Object.defineProperty(exports, "StringLiteralTypeAnnotation", { - enumerable: true, - get: function () { - return _types2.StringLiteral; - } -}); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var _modules = require("./modules"); - -var _types2 = require("./types"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function AnyTypeAnnotation() { - this.word("any"); -} - -function ArrayTypeAnnotation(node) { - this.print(node.elementType, node); - this.token("["); - this.token("]"); -} - -function BooleanTypeAnnotation() { - this.word("boolean"); -} - -function BooleanLiteralTypeAnnotation(node) { - this.word(node.value ? "true" : "false"); -} - -function NullLiteralTypeAnnotation() { - this.word("null"); -} - -function DeclareClass(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.word("class"); - this.space(); - - this._interfaceish(node); -} - -function DeclareFunction(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.word("function"); - this.space(); - this.print(node.id, node); - this.print(node.id.typeAnnotation.typeAnnotation, node); - - if (node.predicate) { - this.space(); - this.print(node.predicate, node); - } - - this.semicolon(); -} - -function InferredPredicate() { - this.token("%"); - this.word("checks"); -} - -function DeclaredPredicate(node) { - this.token("%"); - this.word("checks"); - this.token("("); - this.print(node.value, node); - this.token(")"); -} - -function DeclareInterface(node) { - this.word("declare"); - this.space(); - this.InterfaceDeclaration(node); -} - -function DeclareModule(node) { - this.word("declare"); - this.space(); - this.word("module"); - this.space(); - this.print(node.id, node); - this.space(); - this.print(node.body, node); -} - -function DeclareModuleExports(node) { - this.word("declare"); - this.space(); - this.word("module"); - this.token("."); - this.word("exports"); - this.print(node.typeAnnotation, node); -} - -function DeclareTypeAlias(node) { - this.word("declare"); - this.space(); - this.TypeAlias(node); -} - -function DeclareOpaqueType(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.OpaqueType(node); -} - -function DeclareVariable(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.word("var"); - this.space(); - this.print(node.id, node); - this.print(node.id.typeAnnotation, node); - this.semicolon(); -} - -function DeclareExportDeclaration(node) { - this.word("declare"); - this.space(); - this.word("export"); - this.space(); - - if (node.default) { - this.word("default"); - this.space(); - } - - FlowExportDeclaration.apply(this, arguments); -} - -function DeclareExportAllDeclaration() { - this.word("declare"); - this.space(); - - _modules.ExportAllDeclaration.apply(this, arguments); -} - -function FlowExportDeclaration(node) { - if (node.declaration) { - const declar = node.declaration; - this.print(declar, node); - if (!t().isStatement(declar)) this.semicolon(); - } else { - this.token("{"); - - if (node.specifiers.length) { - this.space(); - this.printList(node.specifiers, node); - this.space(); - } - - this.token("}"); - - if (node.source) { - this.space(); - this.word("from"); - this.space(); - this.print(node.source, node); - } - - this.semicolon(); - } -} - -function ExistsTypeAnnotation() { - this.token("*"); -} - -function FunctionTypeAnnotation(node, parent) { - this.print(node.typeParameters, node); - this.token("("); - this.printList(node.params, node); - - if (node.rest) { - if (node.params.length) { - this.token(","); - this.space(); - } - - this.token("..."); - this.print(node.rest, node); - } - - this.token(")"); - - if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) { - this.token(":"); - } else { - this.space(); - this.token("=>"); - } - - this.space(); - this.print(node.returnType, node); -} - -function FunctionTypeParam(node) { - this.print(node.name, node); - if (node.optional) this.token("?"); - - if (node.name) { - this.token(":"); - this.space(); - } - - this.print(node.typeAnnotation, node); -} - -function InterfaceExtends(node) { - this.print(node.id, node); - this.print(node.typeParameters, node); -} - -function _interfaceish(node) { - this.print(node.id, node); - this.print(node.typeParameters, node); - - if (node.extends.length) { - this.space(); - this.word("extends"); - this.space(); - this.printList(node.extends, node); - } - - if (node.mixins && node.mixins.length) { - this.space(); - this.word("mixins"); - this.space(); - this.printList(node.mixins, node); - } - - if (node.implements && node.implements.length) { - this.space(); - this.word("implements"); - this.space(); - this.printList(node.implements, node); - } - - this.space(); - this.print(node.body, node); -} - -function _variance(node) { - if (node.variance) { - if (node.variance.kind === "plus") { - this.token("+"); - } else if (node.variance.kind === "minus") { - this.token("-"); - } - } -} - -function InterfaceDeclaration(node) { - this.word("interface"); - this.space(); - - this._interfaceish(node); -} - -function andSeparator() { - this.space(); - this.token("&"); - this.space(); -} - -function InterfaceTypeAnnotation(node) { - this.word("interface"); - - if (node.extends && node.extends.length) { - this.space(); - this.word("extends"); - this.space(); - this.printList(node.extends, node); - } - - this.space(); - this.print(node.body, node); -} - -function IntersectionTypeAnnotation(node) { - this.printJoin(node.types, node, { - separator: andSeparator - }); -} - -function MixedTypeAnnotation() { - this.word("mixed"); -} - -function EmptyTypeAnnotation() { - this.word("empty"); -} - -function NullableTypeAnnotation(node) { - this.token("?"); - this.print(node.typeAnnotation, node); -} - -function NumberTypeAnnotation() { - this.word("number"); -} - -function StringTypeAnnotation() { - this.word("string"); -} - -function ThisTypeAnnotation() { - this.word("this"); -} - -function TupleTypeAnnotation(node) { - this.token("["); - this.printList(node.types, node); - this.token("]"); -} - -function TypeofTypeAnnotation(node) { - this.word("typeof"); - this.space(); - this.print(node.argument, node); -} - -function TypeAlias(node) { - this.word("type"); - this.space(); - this.print(node.id, node); - this.print(node.typeParameters, node); - this.space(); - this.token("="); - this.space(); - this.print(node.right, node); - this.semicolon(); -} - -function TypeAnnotation(node) { - this.token(":"); - this.space(); - if (node.optional) this.token("?"); - this.print(node.typeAnnotation, node); -} - -function TypeParameterInstantiation(node) { - this.token("<"); - this.printList(node.params, node, {}); - this.token(">"); -} - -function TypeParameter(node) { - this._variance(node); - - this.word(node.name); - - if (node.bound) { - this.print(node.bound, node); - } - - if (node.default) { - this.space(); - this.token("="); - this.space(); - this.print(node.default, node); - } -} - -function OpaqueType(node) { - this.word("opaque"); - this.space(); - this.word("type"); - this.space(); - this.print(node.id, node); - this.print(node.typeParameters, node); - - if (node.supertype) { - this.token(":"); - this.space(); - this.print(node.supertype, node); - } - - if (node.impltype) { - this.space(); - this.token("="); - this.space(); - this.print(node.impltype, node); - } - - this.semicolon(); -} - -function ObjectTypeAnnotation(node) { - if (node.exact) { - this.token("{|"); - } else { - this.token("{"); - } - - const props = node.properties.concat(node.callProperties || [], node.indexers || [], node.internalSlots || []); - - if (props.length) { - this.space(); - this.printJoin(props, node, { - addNewlines(leading) { - if (leading && !props[0]) return 1; - }, - - indent: true, - statement: true, - iterator: () => { - if (props.length !== 1 || node.inexact) { - this.token(","); - this.space(); - } - } - }); - this.space(); - } - - if (node.inexact) { - this.indent(); - this.token("..."); - - if (props.length) { - this.newline(); - } - - this.dedent(); - } - - if (node.exact) { - this.token("|}"); - } else { - this.token("}"); - } -} - -function ObjectTypeInternalSlot(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this.token("["); - this.token("["); - this.print(node.id, node); - this.token("]"); - this.token("]"); - if (node.optional) this.token("?"); - - if (!node.method) { - this.token(":"); - this.space(); - } - - this.print(node.value, node); -} - -function ObjectTypeCallProperty(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this.print(node.value, node); -} - -function ObjectTypeIndexer(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this._variance(node); - - this.token("["); - - if (node.id) { - this.print(node.id, node); - this.token(":"); - this.space(); - } - - this.print(node.key, node); - this.token("]"); - this.token(":"); - this.space(); - this.print(node.value, node); -} - -function ObjectTypeProperty(node) { - if (node.proto) { - this.word("proto"); - this.space(); - } - - if (node.static) { - this.word("static"); - this.space(); - } - - this._variance(node); - - this.print(node.key, node); - if (node.optional) this.token("?"); - - if (!node.method) { - this.token(":"); - this.space(); - } - - this.print(node.value, node); -} - -function ObjectTypeSpreadProperty(node) { - this.token("..."); - this.print(node.argument, node); -} - -function QualifiedTypeIdentifier(node) { - this.print(node.qualification, node); - this.token("."); - this.print(node.id, node); -} - -function orSeparator() { - this.space(); - this.token("|"); - this.space(); -} - -function UnionTypeAnnotation(node) { - this.printJoin(node.types, node, { - separator: orSeparator - }); -} - -function TypeCastExpression(node) { - this.token("("); - this.print(node.expression, node); - this.print(node.typeAnnotation, node); - this.token(")"); -} - -function Variance(node) { - if (node.kind === "plus") { - this.token("+"); - } else { - this.token("-"); - } -} - -function VoidTypeAnnotation() { - this.word("void"); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/index.js deleted file mode 100644 index f2b4cecad56953..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/index.js +++ /dev/null @@ -1,137 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _templateLiterals = require("./template-literals"); - -Object.keys(_templateLiterals).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _templateLiterals[key]; - } - }); -}); - -var _expressions = require("./expressions"); - -Object.keys(_expressions).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _expressions[key]; - } - }); -}); - -var _statements = require("./statements"); - -Object.keys(_statements).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _statements[key]; - } - }); -}); - -var _classes = require("./classes"); - -Object.keys(_classes).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _classes[key]; - } - }); -}); - -var _methods = require("./methods"); - -Object.keys(_methods).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _methods[key]; - } - }); -}); - -var _modules = require("./modules"); - -Object.keys(_modules).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _modules[key]; - } - }); -}); - -var _types = require("./types"); - -Object.keys(_types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _types[key]; - } - }); -}); - -var _flow = require("./flow"); - -Object.keys(_flow).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _flow[key]; - } - }); -}); - -var _base = require("./base"); - -Object.keys(_base).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _base[key]; - } - }); -}); - -var _jsx = require("./jsx"); - -Object.keys(_jsx).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _jsx[key]; - } - }); -}); - -var _typescript = require("./typescript"); - -Object.keys(_typescript).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _typescript[key]; - } - }); -}); \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/methods.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/methods.js deleted file mode 100644 index 39965bacc19f46..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/methods.js +++ /dev/null @@ -1,167 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports._params = _params; -exports._parameters = _parameters; -exports._param = _param; -exports._methodHead = _methodHead; -exports._predicate = _predicate; -exports._functionHead = _functionHead; -exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression; -exports.ArrowFunctionExpression = ArrowFunctionExpression; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _params(node) { - this.print(node.typeParameters, node); - this.token("("); - - this._parameters(node.params, node); - - this.token(")"); - this.print(node.returnType, node); -} - -function _parameters(parameters, parent) { - for (let i = 0; i < parameters.length; i++) { - this._param(parameters[i], parent); - - if (i < parameters.length - 1) { - this.token(","); - this.space(); - } - } -} - -function _param(parameter, parent) { - this.printJoin(parameter.decorators, parameter); - this.print(parameter, parent); - if (parameter.optional) this.token("?"); - this.print(parameter.typeAnnotation, parameter); -} - -function _methodHead(node) { - const kind = node.kind; - const key = node.key; - - if (kind === "get" || kind === "set") { - this.word(kind); - this.space(); - } - - if (node.async) { - this.word("async"); - this.space(); - } - - if (kind === "method" || kind === "init") { - if (node.generator) { - this.token("*"); - } - } - - if (node.computed) { - this.token("["); - this.print(key, node); - this.token("]"); - } else { - this.print(key, node); - } - - if (node.optional) { - this.token("?"); - } - - this._params(node); -} - -function _predicate(node) { - if (node.predicate) { - if (!node.returnType) { - this.token(":"); - } - - this.space(); - this.print(node.predicate, node); - } -} - -function _functionHead(node) { - if (node.async) { - this.word("async"); - this.space(); - } - - this.word("function"); - if (node.generator) this.token("*"); - this.space(); - - if (node.id) { - this.print(node.id, node); - } - - this._params(node); - - this._predicate(node); -} - -function FunctionExpression(node) { - this._functionHead(node); - - this.space(); - this.print(node.body, node); -} - -function ArrowFunctionExpression(node) { - if (node.async) { - this.word("async"); - this.space(); - } - - const firstParam = node.params[0]; - - if (node.params.length === 1 && t().isIdentifier(firstParam) && !hasTypes(node, firstParam)) { - if (this.format.retainLines && node.loc && node.body.loc && node.loc.start.line < node.body.loc.start.line) { - this.token("("); - - if (firstParam.loc && firstParam.loc.start.line > node.loc.start.line) { - this.indent(); - this.print(firstParam, node); - this.dedent(); - - this._catchUp("start", node.body.loc); - } else { - this.print(firstParam, node); - } - - this.token(")"); - } else { - this.print(firstParam, node); - } - } else { - this._params(node); - } - - this._predicate(node); - - this.space(); - this.token("=>"); - this.space(); - this.print(node.body, node); -} - -function hasTypes(node, param) { - return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/modules.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/modules.js deleted file mode 100644 index af87bd586e68f0..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/modules.js +++ /dev/null @@ -1,214 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ImportSpecifier = ImportSpecifier; -exports.ImportDefaultSpecifier = ImportDefaultSpecifier; -exports.ExportDefaultSpecifier = ExportDefaultSpecifier; -exports.ExportSpecifier = ExportSpecifier; -exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; -exports.ExportAllDeclaration = ExportAllDeclaration; -exports.ExportNamedDeclaration = ExportNamedDeclaration; -exports.ExportDefaultDeclaration = ExportDefaultDeclaration; -exports.ImportDeclaration = ImportDeclaration; -exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function ImportSpecifier(node) { - if (node.importKind === "type" || node.importKind === "typeof") { - this.word(node.importKind); - this.space(); - } - - this.print(node.imported, node); - - if (node.local && node.local.name !== node.imported.name) { - this.space(); - this.word("as"); - this.space(); - this.print(node.local, node); - } -} - -function ImportDefaultSpecifier(node) { - this.print(node.local, node); -} - -function ExportDefaultSpecifier(node) { - this.print(node.exported, node); -} - -function ExportSpecifier(node) { - this.print(node.local, node); - - if (node.exported && node.local.name !== node.exported.name) { - this.space(); - this.word("as"); - this.space(); - this.print(node.exported, node); - } -} - -function ExportNamespaceSpecifier(node) { - this.token("*"); - this.space(); - this.word("as"); - this.space(); - this.print(node.exported, node); -} - -function ExportAllDeclaration(node) { - this.word("export"); - this.space(); - - if (node.exportKind === "type") { - this.word("type"); - this.space(); - } - - this.token("*"); - this.space(); - this.word("from"); - this.space(); - this.print(node.source, node); - this.semicolon(); -} - -function ExportNamedDeclaration(node) { - if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) { - this.printJoin(node.declaration.decorators, node); - } - - this.word("export"); - this.space(); - ExportDeclaration.apply(this, arguments); -} - -function ExportDefaultDeclaration(node) { - if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) { - this.printJoin(node.declaration.decorators, node); - } - - this.word("export"); - this.space(); - this.word("default"); - this.space(); - ExportDeclaration.apply(this, arguments); -} - -function ExportDeclaration(node) { - if (node.declaration) { - const declar = node.declaration; - this.print(declar, node); - if (!t().isStatement(declar)) this.semicolon(); - } else { - if (node.exportKind === "type") { - this.word("type"); - this.space(); - } - - const specifiers = node.specifiers.slice(0); - let hasSpecial = false; - - while (true) { - const first = specifiers[0]; - - if (t().isExportDefaultSpecifier(first) || t().isExportNamespaceSpecifier(first)) { - hasSpecial = true; - this.print(specifiers.shift(), node); - - if (specifiers.length) { - this.token(","); - this.space(); - } - } else { - break; - } - } - - if (specifiers.length || !specifiers.length && !hasSpecial) { - this.token("{"); - - if (specifiers.length) { - this.space(); - this.printList(specifiers, node); - this.space(); - } - - this.token("}"); - } - - if (node.source) { - this.space(); - this.word("from"); - this.space(); - this.print(node.source, node); - } - - this.semicolon(); - } -} - -function ImportDeclaration(node) { - this.word("import"); - this.space(); - - if (node.importKind === "type" || node.importKind === "typeof") { - this.word(node.importKind); - this.space(); - } - - const specifiers = node.specifiers.slice(0); - - if (specifiers && specifiers.length) { - while (true) { - const first = specifiers[0]; - - if (t().isImportDefaultSpecifier(first) || t().isImportNamespaceSpecifier(first)) { - this.print(specifiers.shift(), node); - - if (specifiers.length) { - this.token(","); - this.space(); - } - } else { - break; - } - } - - if (specifiers.length) { - this.token("{"); - this.space(); - this.printList(specifiers, node); - this.space(); - this.token("}"); - } - - this.space(); - this.word("from"); - this.space(); - } - - this.print(node.source, node); - this.semicolon(); -} - -function ImportNamespaceSpecifier(node) { - this.token("*"); - this.space(); - this.word("as"); - this.space(); - this.print(node.local, node); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/types.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/types.js deleted file mode 100644 index 12ae494fb7f18a..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/types.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Identifier = Identifier; -exports.ArgumentPlaceholder = ArgumentPlaceholder; -exports.SpreadElement = exports.RestElement = RestElement; -exports.ObjectPattern = exports.ObjectExpression = ObjectExpression; -exports.ObjectMethod = ObjectMethod; -exports.ObjectProperty = ObjectProperty; -exports.ArrayPattern = exports.ArrayExpression = ArrayExpression; -exports.RegExpLiteral = RegExpLiteral; -exports.BooleanLiteral = BooleanLiteral; -exports.NullLiteral = NullLiteral; -exports.NumericLiteral = NumericLiteral; -exports.StringLiteral = StringLiteral; -exports.BigIntLiteral = BigIntLiteral; -exports.PipelineTopicExpression = PipelineTopicExpression; -exports.PipelineBareFunction = PipelineBareFunction; -exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _jsesc() { - const data = _interopRequireDefault(require("jsesc")); - - _jsesc = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function Identifier(node) { - this.exactSource(node.loc, () => { - this.word(node.name); - }); -} - -function ArgumentPlaceholder() { - this.token("?"); -} - -function RestElement(node) { - this.token("..."); - this.print(node.argument, node); -} - -function ObjectExpression(node) { - const props = node.properties; - this.token("{"); - this.printInnerComments(node); - - if (props.length) { - this.space(); - this.printList(props, node, { - indent: true, - statement: true - }); - this.space(); - } - - this.token("}"); -} - -function ObjectMethod(node) { - this.printJoin(node.decorators, node); - - this._methodHead(node); - - this.space(); - this.print(node.body, node); -} - -function ObjectProperty(node) { - this.printJoin(node.decorators, node); - - if (node.computed) { - this.token("["); - this.print(node.key, node); - this.token("]"); - } else { - if (t().isAssignmentPattern(node.value) && t().isIdentifier(node.key) && node.key.name === node.value.left.name) { - this.print(node.value, node); - return; - } - - this.print(node.key, node); - - if (node.shorthand && t().isIdentifier(node.key) && t().isIdentifier(node.value) && node.key.name === node.value.name) { - return; - } - } - - this.token(":"); - this.space(); - this.print(node.value, node); -} - -function ArrayExpression(node) { - const elems = node.elements; - const len = elems.length; - this.token("["); - this.printInnerComments(node); - - for (let i = 0; i < elems.length; i++) { - const elem = elems[i]; - - if (elem) { - if (i > 0) this.space(); - this.print(elem, node); - if (i < len - 1) this.token(","); - } else { - this.token(","); - } - } - - this.token("]"); -} - -function RegExpLiteral(node) { - this.word(`/${node.pattern}/${node.flags}`); -} - -function BooleanLiteral(node) { - this.word(node.value ? "true" : "false"); -} - -function NullLiteral() { - this.word("null"); -} - -function NumericLiteral(node) { - const raw = this.getPossibleRaw(node); - const value = node.value + ""; - - if (raw == null) { - this.number(value); - } else if (this.format.minified) { - this.number(raw.length < value.length ? raw : value); - } else { - this.number(raw); - } -} - -function StringLiteral(node) { - const raw = this.getPossibleRaw(node); - - if (!this.format.minified && raw != null) { - this.token(raw); - return; - } - - const opts = this.format.jsescOption; - - if (this.format.jsonCompatibleStrings) { - opts.json = true; - } - - const val = (0, _jsesc().default)(node.value, opts); - return this.token(val); -} - -function BigIntLiteral(node) { - const raw = this.getPossibleRaw(node); - - if (!this.format.minified && raw != null) { - this.token(raw); - return; - } - - this.token(node.value); -} - -function PipelineTopicExpression(node) { - this.print(node.expression, node); -} - -function PipelineBareFunction(node) { - this.print(node.callee, node); -} - -function PipelinePrimaryTopicReference() { - this.token("#"); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/typescript.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/typescript.js deleted file mode 100644 index 0355057de93865..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/typescript.js +++ /dev/null @@ -1,715 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TSTypeAnnotation = TSTypeAnnotation; -exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; -exports.TSTypeParameter = TSTypeParameter; -exports.TSParameterProperty = TSParameterProperty; -exports.TSDeclareFunction = TSDeclareFunction; -exports.TSDeclareMethod = TSDeclareMethod; -exports.TSQualifiedName = TSQualifiedName; -exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; -exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; -exports.TSPropertySignature = TSPropertySignature; -exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName; -exports.TSMethodSignature = TSMethodSignature; -exports.TSIndexSignature = TSIndexSignature; -exports.TSAnyKeyword = TSAnyKeyword; -exports.TSUnknownKeyword = TSUnknownKeyword; -exports.TSNumberKeyword = TSNumberKeyword; -exports.TSObjectKeyword = TSObjectKeyword; -exports.TSBooleanKeyword = TSBooleanKeyword; -exports.TSStringKeyword = TSStringKeyword; -exports.TSSymbolKeyword = TSSymbolKeyword; -exports.TSVoidKeyword = TSVoidKeyword; -exports.TSUndefinedKeyword = TSUndefinedKeyword; -exports.TSNullKeyword = TSNullKeyword; -exports.TSNeverKeyword = TSNeverKeyword; -exports.TSThisType = TSThisType; -exports.TSFunctionType = TSFunctionType; -exports.TSConstructorType = TSConstructorType; -exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType; -exports.TSTypeReference = TSTypeReference; -exports.TSTypePredicate = TSTypePredicate; -exports.TSTypeQuery = TSTypeQuery; -exports.TSTypeLiteral = TSTypeLiteral; -exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody; -exports.tsPrintBraced = tsPrintBraced; -exports.TSArrayType = TSArrayType; -exports.TSTupleType = TSTupleType; -exports.TSOptionalType = TSOptionalType; -exports.TSRestType = TSRestType; -exports.TSUnionType = TSUnionType; -exports.TSIntersectionType = TSIntersectionType; -exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType; -exports.TSConditionalType = TSConditionalType; -exports.TSInferType = TSInferType; -exports.TSParenthesizedType = TSParenthesizedType; -exports.TSTypeOperator = TSTypeOperator; -exports.TSIndexedAccessType = TSIndexedAccessType; -exports.TSMappedType = TSMappedType; -exports.TSLiteralType = TSLiteralType; -exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; -exports.TSInterfaceDeclaration = TSInterfaceDeclaration; -exports.TSInterfaceBody = TSInterfaceBody; -exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; -exports.TSAsExpression = TSAsExpression; -exports.TSTypeAssertion = TSTypeAssertion; -exports.TSEnumDeclaration = TSEnumDeclaration; -exports.TSEnumMember = TSEnumMember; -exports.TSModuleDeclaration = TSModuleDeclaration; -exports.TSModuleBlock = TSModuleBlock; -exports.TSImportType = TSImportType; -exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; -exports.TSExternalModuleReference = TSExternalModuleReference; -exports.TSNonNullExpression = TSNonNullExpression; -exports.TSExportAssignment = TSExportAssignment; -exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; -exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase; - -function TSTypeAnnotation(node) { - this.token(":"); - this.space(); - if (node.optional) this.token("?"); - this.print(node.typeAnnotation, node); -} - -function TSTypeParameterInstantiation(node) { - this.token("<"); - this.printList(node.params, node, {}); - this.token(">"); -} - -function TSTypeParameter(node) { - this.word(node.name); - - if (node.constraint) { - this.space(); - this.word("extends"); - this.space(); - this.print(node.constraint, node); - } - - if (node.default) { - this.space(); - this.token("="); - this.space(); - this.print(node.default, node); - } -} - -function TSParameterProperty(node) { - if (node.accessibility) { - this.word(node.accessibility); - this.space(); - } - - if (node.readonly) { - this.word("readonly"); - this.space(); - } - - this._param(node.parameter); -} - -function TSDeclareFunction(node) { - if (node.declare) { - this.word("declare"); - this.space(); - } - - this._functionHead(node); - - this.token(";"); -} - -function TSDeclareMethod(node) { - this._classMethodHead(node); - - this.token(";"); -} - -function TSQualifiedName(node) { - this.print(node.left, node); - this.token("."); - this.print(node.right, node); -} - -function TSCallSignatureDeclaration(node) { - this.tsPrintSignatureDeclarationBase(node); -} - -function TSConstructSignatureDeclaration(node) { - this.word("new"); - this.space(); - this.tsPrintSignatureDeclarationBase(node); -} - -function TSPropertySignature(node) { - const { - readonly, - initializer - } = node; - - if (readonly) { - this.word("readonly"); - this.space(); - } - - this.tsPrintPropertyOrMethodName(node); - this.print(node.typeAnnotation, node); - - if (initializer) { - this.space(); - this.token("="); - this.space(); - this.print(initializer, node); - } - - this.token(";"); -} - -function tsPrintPropertyOrMethodName(node) { - if (node.computed) { - this.token("["); - } - - this.print(node.key, node); - - if (node.computed) { - this.token("]"); - } - - if (node.optional) { - this.token("?"); - } -} - -function TSMethodSignature(node) { - this.tsPrintPropertyOrMethodName(node); - this.tsPrintSignatureDeclarationBase(node); - this.token(";"); -} - -function TSIndexSignature(node) { - const { - readonly - } = node; - - if (readonly) { - this.word("readonly"); - this.space(); - } - - this.token("["); - - this._parameters(node.parameters, node); - - this.token("]"); - this.print(node.typeAnnotation, node); - this.token(";"); -} - -function TSAnyKeyword() { - this.word("any"); -} - -function TSUnknownKeyword() { - this.word("unknown"); -} - -function TSNumberKeyword() { - this.word("number"); -} - -function TSObjectKeyword() { - this.word("object"); -} - -function TSBooleanKeyword() { - this.word("boolean"); -} - -function TSStringKeyword() { - this.word("string"); -} - -function TSSymbolKeyword() { - this.word("symbol"); -} - -function TSVoidKeyword() { - this.word("void"); -} - -function TSUndefinedKeyword() { - this.word("undefined"); -} - -function TSNullKeyword() { - this.word("null"); -} - -function TSNeverKeyword() { - this.word("never"); -} - -function TSThisType() { - this.word("this"); -} - -function TSFunctionType(node) { - this.tsPrintFunctionOrConstructorType(node); -} - -function TSConstructorType(node) { - this.word("new"); - this.space(); - this.tsPrintFunctionOrConstructorType(node); -} - -function tsPrintFunctionOrConstructorType(node) { - const { - typeParameters, - parameters - } = node; - this.print(typeParameters, node); - this.token("("); - - this._parameters(parameters, node); - - this.token(")"); - this.space(); - this.token("=>"); - this.space(); - this.print(node.typeAnnotation.typeAnnotation, node); -} - -function TSTypeReference(node) { - this.print(node.typeName, node); - this.print(node.typeParameters, node); -} - -function TSTypePredicate(node) { - this.print(node.parameterName); - this.space(); - this.word("is"); - this.space(); - this.print(node.typeAnnotation.typeAnnotation); -} - -function TSTypeQuery(node) { - this.word("typeof"); - this.space(); - this.print(node.exprName); -} - -function TSTypeLiteral(node) { - this.tsPrintTypeLiteralOrInterfaceBody(node.members, node); -} - -function tsPrintTypeLiteralOrInterfaceBody(members, node) { - this.tsPrintBraced(members, node); -} - -function tsPrintBraced(members, node) { - this.token("{"); - - if (members.length) { - this.indent(); - this.newline(); - - for (const member of members) { - this.print(member, node); - this.newline(); - } - - this.dedent(); - this.rightBrace(); - } else { - this.token("}"); - } -} - -function TSArrayType(node) { - this.print(node.elementType, node); - this.token("[]"); -} - -function TSTupleType(node) { - this.token("["); - this.printList(node.elementTypes, node); - this.token("]"); -} - -function TSOptionalType(node) { - this.print(node.typeAnnotation, node); - this.token("?"); -} - -function TSRestType(node) { - this.token("..."); - this.print(node.typeAnnotation, node); -} - -function TSUnionType(node) { - this.tsPrintUnionOrIntersectionType(node, "|"); -} - -function TSIntersectionType(node) { - this.tsPrintUnionOrIntersectionType(node, "&"); -} - -function tsPrintUnionOrIntersectionType(node, sep) { - this.printJoin(node.types, node, { - separator() { - this.space(); - this.token(sep); - this.space(); - } - - }); -} - -function TSConditionalType(node) { - this.print(node.checkType); - this.space(); - this.word("extends"); - this.space(); - this.print(node.extendsType); - this.space(); - this.token("?"); - this.space(); - this.print(node.trueType); - this.space(); - this.token(":"); - this.space(); - this.print(node.falseType); -} - -function TSInferType(node) { - this.token("infer"); - this.space(); - this.print(node.typeParameter); -} - -function TSParenthesizedType(node) { - this.token("("); - this.print(node.typeAnnotation, node); - this.token(")"); -} - -function TSTypeOperator(node) { - this.token(node.operator); - this.space(); - this.print(node.typeAnnotation, node); -} - -function TSIndexedAccessType(node) { - this.print(node.objectType, node); - this.token("["); - this.print(node.indexType, node); - this.token("]"); -} - -function TSMappedType(node) { - const { - readonly, - typeParameter, - optional - } = node; - this.token("{"); - this.space(); - - if (readonly) { - tokenIfPlusMinus(this, readonly); - this.word("readonly"); - this.space(); - } - - this.token("["); - this.word(typeParameter.name); - this.space(); - this.word("in"); - this.space(); - this.print(typeParameter.constraint, typeParameter); - this.token("]"); - - if (optional) { - tokenIfPlusMinus(this, optional); - this.token("?"); - } - - this.token(":"); - this.space(); - this.print(node.typeAnnotation, node); - this.space(); - this.token("}"); -} - -function tokenIfPlusMinus(self, tok) { - if (tok !== true) { - self.token(tok); - } -} - -function TSLiteralType(node) { - this.print(node.literal, node); -} - -function TSExpressionWithTypeArguments(node) { - this.print(node.expression, node); - this.print(node.typeParameters, node); -} - -function TSInterfaceDeclaration(node) { - const { - declare, - id, - typeParameters, - extends: extendz, - body - } = node; - - if (declare) { - this.word("declare"); - this.space(); - } - - this.word("interface"); - this.space(); - this.print(id, node); - this.print(typeParameters, node); - - if (extendz) { - this.space(); - this.word("extends"); - this.space(); - this.printList(extendz, node); - } - - this.space(); - this.print(body, node); -} - -function TSInterfaceBody(node) { - this.tsPrintTypeLiteralOrInterfaceBody(node.body, node); -} - -function TSTypeAliasDeclaration(node) { - const { - declare, - id, - typeParameters, - typeAnnotation - } = node; - - if (declare) { - this.word("declare"); - this.space(); - } - - this.word("type"); - this.space(); - this.print(id, node); - this.print(typeParameters, node); - this.space(); - this.token("="); - this.space(); - this.print(typeAnnotation, node); - this.token(";"); -} - -function TSAsExpression(node) { - const { - expression, - typeAnnotation - } = node; - this.print(expression, node); - this.space(); - this.word("as"); - this.space(); - this.print(typeAnnotation, node); -} - -function TSTypeAssertion(node) { - const { - typeAnnotation, - expression - } = node; - this.token("<"); - this.print(typeAnnotation, node); - this.token(">"); - this.space(); - this.print(expression, node); -} - -function TSEnumDeclaration(node) { - const { - declare, - const: isConst, - id, - members - } = node; - - if (declare) { - this.word("declare"); - this.space(); - } - - if (isConst) { - this.word("const"); - this.space(); - } - - this.word("enum"); - this.space(); - this.print(id, node); - this.space(); - this.tsPrintBraced(members, node); -} - -function TSEnumMember(node) { - const { - id, - initializer - } = node; - this.print(id, node); - - if (initializer) { - this.space(); - this.token("="); - this.space(); - this.print(initializer, node); - } - - this.token(","); -} - -function TSModuleDeclaration(node) { - const { - declare, - id - } = node; - - if (declare) { - this.word("declare"); - this.space(); - } - - if (!node.global) { - this.word(id.type === "Identifier" ? "namespace" : "module"); - this.space(); - } - - this.print(id, node); - - if (!node.body) { - this.token(";"); - return; - } - - let body = node.body; - - while (body.type === "TSModuleDeclaration") { - this.token("."); - this.print(body.id, body); - body = body.body; - } - - this.space(); - this.print(body, node); -} - -function TSModuleBlock(node) { - this.tsPrintBraced(node.body, node); -} - -function TSImportType(node) { - const { - argument, - qualifier, - typeParameters - } = node; - this.word("import"); - this.token("("); - this.print(argument, node); - this.token(")"); - - if (qualifier) { - this.token("."); - this.print(qualifier, node); - } - - if (typeParameters) { - this.print(typeParameters, node); - } -} - -function TSImportEqualsDeclaration(node) { - const { - isExport, - id, - moduleReference - } = node; - - if (isExport) { - this.word("export"); - this.space(); - } - - this.word("import"); - this.space(); - this.print(id, node); - this.space(); - this.token("="); - this.space(); - this.print(moduleReference, node); - this.token(";"); -} - -function TSExternalModuleReference(node) { - this.token("require("); - this.print(node.expression, node); - this.token(")"); -} - -function TSNonNullExpression(node) { - this.print(node.expression, node); - this.token("!"); -} - -function TSExportAssignment(node) { - this.word("export"); - this.space(); - this.token("="); - this.space(); - this.print(node.expression, node); - this.token(";"); -} - -function TSNamespaceExportDeclaration(node) { - this.word("export"); - this.space(); - this.word("as"); - this.space(); - this.word("namespace"); - this.space(); - this.print(node.id, node); -} - -function tsPrintSignatureDeclarationBase(node) { - const { - typeParameters, - parameters - } = node; - this.print(typeParameters, node); - this.token("("); - - this._parameters(parameters, node); - - this.token(")"); - this.print(node.typeAnnotation, node); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/index.js deleted file mode 100644 index fcdb288b7f2fc9..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/index.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; -exports.CodeGenerator = void 0; - -var _sourceMap = _interopRequireDefault(require("./source-map")); - -var _printer = _interopRequireDefault(require("./printer")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -class Generator extends _printer.default { - constructor(ast, opts = {}, code) { - const format = normalizeOptions(code, opts); - const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null; - super(format, map); - this.ast = ast; - } - - generate() { - return super.generate(this.ast); - } - -} - -function normalizeOptions(code, opts) { - const format = { - auxiliaryCommentBefore: opts.auxiliaryCommentBefore, - auxiliaryCommentAfter: opts.auxiliaryCommentAfter, - shouldPrintComment: opts.shouldPrintComment, - retainLines: opts.retainLines, - retainFunctionParens: opts.retainFunctionParens, - comments: opts.comments == null || opts.comments, - compact: opts.compact, - minified: opts.minified, - concise: opts.concise, - jsonCompatibleStrings: opts.jsonCompatibleStrings, - indent: { - adjustMultilineComment: true, - style: " ", - base: 0 - }, - decoratorsBeforeExport: !!opts.decoratorsBeforeExport, - jsescOption: Object.assign({ - quotes: "double", - wrap: true - }, opts.jsescOption) - }; - - if (format.minified) { - format.compact = true; - - format.shouldPrintComment = format.shouldPrintComment || (() => format.comments); - } else { - format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0); - } - - if (format.compact === "auto") { - format.compact = code.length > 500000; - - if (format.compact) { - console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename} as it exceeds the max of ${"500KB"}.`); - } - } - - if (format.compact) { - format.indent.adjustMultilineComment = false; - } - - return format; -} - -class CodeGenerator { - constructor(ast, opts, code) { - this._generator = new Generator(ast, opts, code); - } - - generate() { - return this._generator.generate(); - } - -} - -exports.CodeGenerator = CodeGenerator; - -function _default(ast, opts, code) { - const gen = new Generator(ast, opts, code); - return gen.generate(); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/index.js deleted file mode 100644 index bef46f0eede721..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/index.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.needsWhitespace = needsWhitespace; -exports.needsWhitespaceBefore = needsWhitespaceBefore; -exports.needsWhitespaceAfter = needsWhitespaceAfter; -exports.needsParens = needsParens; - -var whitespace = _interopRequireWildcard(require("./whitespace")); - -var parens = _interopRequireWildcard(require("./parentheses")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function expandAliases(obj) { - const newObj = {}; - - function add(type, func) { - const fn = newObj[type]; - newObj[type] = fn ? function (node, parent, stack) { - const result = fn(node, parent, stack); - return result == null ? func(node, parent, stack) : result; - } : func; - } - - for (const type of Object.keys(obj)) { - const aliases = t().FLIPPED_ALIAS_KEYS[type]; - - if (aliases) { - for (const alias of aliases) { - add(alias, obj[type]); - } - } else { - add(type, obj[type]); - } - } - - return newObj; -} - -const expandedParens = expandAliases(parens); -const expandedWhitespaceNodes = expandAliases(whitespace.nodes); -const expandedWhitespaceList = expandAliases(whitespace.list); - -function find(obj, node, parent, printStack) { - const fn = obj[node.type]; - return fn ? fn(node, parent, printStack) : null; -} - -function isOrHasCallExpression(node) { - if (t().isCallExpression(node)) { - return true; - } - - if (t().isMemberExpression(node)) { - return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property); - } else { - return false; - } -} - -function needsWhitespace(node, parent, type) { - if (!node) return 0; - - if (t().isExpressionStatement(node)) { - node = node.expression; - } - - let linesInfo = find(expandedWhitespaceNodes, node, parent); - - if (!linesInfo) { - const items = find(expandedWhitespaceList, node, parent); - - if (items) { - for (let i = 0; i < items.length; i++) { - linesInfo = needsWhitespace(items[i], node, type); - if (linesInfo) break; - } - } - } - - if (typeof linesInfo === "object" && linesInfo !== null) { - return linesInfo[type] || 0; - } - - return 0; -} - -function needsWhitespaceBefore(node, parent) { - return needsWhitespace(node, parent, "before"); -} - -function needsWhitespaceAfter(node, parent) { - return needsWhitespace(node, parent, "after"); -} - -function needsParens(node, parent, printStack) { - if (!parent) return false; - - if (t().isNewExpression(parent) && parent.callee === node) { - if (isOrHasCallExpression(node)) return true; - } - - return find(expandedParens, node, parent, printStack); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/parentheses.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/parentheses.js deleted file mode 100644 index 3f98dc18f8e3ab..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/parentheses.js +++ /dev/null @@ -1,253 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.UpdateExpression = UpdateExpression; -exports.ObjectExpression = ObjectExpression; -exports.DoExpression = DoExpression; -exports.Binary = Binary; -exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.TSAsExpression = TSAsExpression; -exports.TSTypeAssertion = TSTypeAssertion; -exports.TSIntersectionType = exports.TSUnionType = TSUnionType; -exports.BinaryExpression = BinaryExpression; -exports.SequenceExpression = SequenceExpression; -exports.AwaitExpression = exports.YieldExpression = YieldExpression; -exports.ClassExpression = ClassExpression; -exports.UnaryLike = UnaryLike; -exports.FunctionExpression = FunctionExpression; -exports.ArrowFunctionExpression = ArrowFunctionExpression; -exports.ConditionalExpression = ConditionalExpression; -exports.OptionalMemberExpression = OptionalMemberExpression; -exports.AssignmentExpression = AssignmentExpression; -exports.NewExpression = NewExpression; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const PRECEDENCE = { - "||": 0, - "&&": 1, - "|": 2, - "^": 3, - "&": 4, - "==": 5, - "===": 5, - "!=": 5, - "!==": 5, - "<": 6, - ">": 6, - "<=": 6, - ">=": 6, - in: 6, - instanceof: 6, - ">>": 7, - "<<": 7, - ">>>": 7, - "+": 8, - "-": 8, - "*": 9, - "/": 9, - "%": 9, - "**": 10 -}; - -const isClassExtendsClause = (node, parent) => (t().isClassDeclaration(parent) || t().isClassExpression(parent)) && parent.superClass === node; - -function NullableTypeAnnotation(node, parent) { - return t().isArrayTypeAnnotation(parent); -} - -function FunctionTypeAnnotation(node, parent) { - return t().isUnionTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isArrayTypeAnnotation(parent); -} - -function UpdateExpression(node, parent) { - return t().isMemberExpression(parent, { - object: node - }) || t().isCallExpression(parent, { - callee: node - }) || t().isNewExpression(parent, { - callee: node - }) || isClassExtendsClause(node, parent); -} - -function ObjectExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { - considerArrow: true - }); -} - -function DoExpression(node, parent, printStack) { - return isFirstInStatement(printStack); -} - -function Binary(node, parent) { - if (node.operator === "**" && t().isBinaryExpression(parent, { - operator: "**" - })) { - return parent.left === node; - } - - if (isClassExtendsClause(node, parent)) { - return true; - } - - if ((t().isCallExpression(parent) || t().isNewExpression(parent)) && parent.callee === node || t().isUnaryLike(parent) || t().isMemberExpression(parent) && parent.object === node || t().isAwaitExpression(parent)) { - return true; - } - - if (t().isBinary(parent)) { - const parentOp = parent.operator; - const parentPos = PRECEDENCE[parentOp]; - const nodeOp = node.operator; - const nodePos = PRECEDENCE[nodeOp]; - - if (parentPos === nodePos && parent.right === node && !t().isLogicalExpression(parent) || parentPos > nodePos) { - return true; - } - } - - return false; -} - -function UnionTypeAnnotation(node, parent) { - return t().isArrayTypeAnnotation(parent) || t().isNullableTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isUnionTypeAnnotation(parent); -} - -function TSAsExpression() { - return true; -} - -function TSTypeAssertion() { - return true; -} - -function TSUnionType(node, parent) { - return t().isTSArrayType(parent) || t().isTSOptionalType(parent) || t().isTSIntersectionType(parent) || t().isTSUnionType(parent) || t().isTSRestType(parent); -} - -function BinaryExpression(node, parent) { - return node.operator === "in" && (t().isVariableDeclarator(parent) || t().isFor(parent)); -} - -function SequenceExpression(node, parent) { - if (t().isForStatement(parent) || t().isThrowStatement(parent) || t().isReturnStatement(parent) || t().isIfStatement(parent) && parent.test === node || t().isWhileStatement(parent) && parent.test === node || t().isForInStatement(parent) && parent.right === node || t().isSwitchStatement(parent) && parent.discriminant === node || t().isExpressionStatement(parent) && parent.expression === node) { - return false; - } - - return true; -} - -function YieldExpression(node, parent) { - return t().isBinary(parent) || t().isUnaryLike(parent) || t().isCallExpression(parent) || t().isMemberExpression(parent) || t().isNewExpression(parent) || t().isAwaitExpression(parent) && t().isYieldExpression(node) || t().isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent); -} - -function ClassExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { - considerDefaultExports: true - }); -} - -function UnaryLike(node, parent) { - return t().isMemberExpression(parent, { - object: node - }) || t().isCallExpression(parent, { - callee: node - }) || t().isNewExpression(parent, { - callee: node - }) || t().isBinaryExpression(parent, { - operator: "**", - left: node - }) || isClassExtendsClause(node, parent); -} - -function FunctionExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { - considerDefaultExports: true - }); -} - -function ArrowFunctionExpression(node, parent) { - return t().isExportDeclaration(parent) || ConditionalExpression(node, parent); -} - -function ConditionalExpression(node, parent) { - if (t().isUnaryLike(parent) || t().isBinary(parent) || t().isConditionalExpression(parent, { - test: node - }) || t().isAwaitExpression(parent) || t().isOptionalMemberExpression(parent) || t().isTaggedTemplateExpression(parent) || t().isTSTypeAssertion(parent) || t().isTSAsExpression(parent)) { - return true; - } - - return UnaryLike(node, parent); -} - -function OptionalMemberExpression(node, parent) { - return t().isCallExpression(parent) || t().isMemberExpression(parent); -} - -function AssignmentExpression(node) { - if (t().isObjectPattern(node.left)) { - return true; - } else { - return ConditionalExpression(...arguments); - } -} - -function NewExpression(node, parent) { - return isClassExtendsClause(node, parent); -} - -function isFirstInStatement(printStack, { - considerArrow = false, - considerDefaultExports = false -} = {}) { - let i = printStack.length - 1; - let node = printStack[i]; - i--; - let parent = printStack[i]; - - while (i > 0) { - if (t().isExpressionStatement(parent, { - expression: node - }) || t().isTaggedTemplateExpression(parent) || considerDefaultExports && t().isExportDefaultDeclaration(parent, { - declaration: node - }) || considerArrow && t().isArrowFunctionExpression(parent, { - body: node - })) { - return true; - } - - if (t().isCallExpression(parent, { - callee: node - }) || t().isSequenceExpression(parent) && parent.expressions[0] === node || t().isMemberExpression(parent, { - object: node - }) || t().isConditional(parent, { - test: node - }) || t().isBinary(parent, { - left: node - }) || t().isAssignmentExpression(parent, { - left: node - })) { - node = parent; - i--; - parent = printStack[i]; - } else { - return false; - } - } - - return false; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/whitespace.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/whitespace.js deleted file mode 100644 index 061218601cbbed..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/whitespace.js +++ /dev/null @@ -1,192 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.list = exports.nodes = void 0; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function crawl(node, state = {}) { - if (t().isMemberExpression(node)) { - crawl(node.object, state); - if (node.computed) crawl(node.property, state); - } else if (t().isBinary(node) || t().isAssignmentExpression(node)) { - crawl(node.left, state); - crawl(node.right, state); - } else if (t().isCallExpression(node)) { - state.hasCall = true; - crawl(node.callee, state); - } else if (t().isFunction(node)) { - state.hasFunction = true; - } else if (t().isIdentifier(node)) { - state.hasHelper = state.hasHelper || isHelper(node.callee); - } - - return state; -} - -function isHelper(node) { - if (t().isMemberExpression(node)) { - return isHelper(node.object) || isHelper(node.property); - } else if (t().isIdentifier(node)) { - return node.name === "require" || node.name[0] === "_"; - } else if (t().isCallExpression(node)) { - return isHelper(node.callee); - } else if (t().isBinary(node) || t().isAssignmentExpression(node)) { - return t().isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right); - } else { - return false; - } -} - -function isType(node) { - return t().isLiteral(node) || t().isObjectExpression(node) || t().isArrayExpression(node) || t().isIdentifier(node) || t().isMemberExpression(node); -} - -const nodes = { - AssignmentExpression(node) { - const state = crawl(node.right); - - if (state.hasCall && state.hasHelper || state.hasFunction) { - return { - before: state.hasFunction, - after: true - }; - } - }, - - SwitchCase(node, parent) { - return { - before: node.consequent.length || parent.cases[0] === node, - after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node - }; - }, - - LogicalExpression(node) { - if (t().isFunction(node.left) || t().isFunction(node.right)) { - return { - after: true - }; - } - }, - - Literal(node) { - if (node.value === "use strict") { - return { - after: true - }; - } - }, - - CallExpression(node) { - if (t().isFunction(node.callee) || isHelper(node)) { - return { - before: true, - after: true - }; - } - }, - - VariableDeclaration(node) { - for (let i = 0; i < node.declarations.length; i++) { - const declar = node.declarations[i]; - let enabled = isHelper(declar.id) && !isType(declar.init); - - if (!enabled) { - const state = crawl(declar.init); - enabled = isHelper(declar.init) && state.hasCall || state.hasFunction; - } - - if (enabled) { - return { - before: true, - after: true - }; - } - } - }, - - IfStatement(node) { - if (t().isBlockStatement(node.consequent)) { - return { - before: true, - after: true - }; - } - } - -}; -exports.nodes = nodes; - -nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) { - if (parent.properties[0] === node) { - return { - before: true - }; - } -}; - -nodes.ObjectTypeCallProperty = function (node, parent) { - if (parent.callProperties[0] === node && (!parent.properties || !parent.properties.length)) { - return { - before: true - }; - } -}; - -nodes.ObjectTypeIndexer = function (node, parent) { - if (parent.indexers[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length)) { - return { - before: true - }; - } -}; - -nodes.ObjectTypeInternalSlot = function (node, parent) { - if (parent.internalSlots[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length) && (!parent.indexers || !parent.indexers.length)) { - return { - before: true - }; - } -}; - -const list = { - VariableDeclaration(node) { - return node.declarations.map(decl => decl.init); - }, - - ArrayExpression(node) { - return node.elements; - }, - - ObjectExpression(node) { - return node.properties; - } - -}; -exports.list = list; -[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function ([type, amounts]) { - if (typeof amounts === "boolean") { - amounts = { - after: amounts, - before: amounts - }; - } - - [type].concat(t().FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) { - nodes[type] = function () { - return amounts; - }; - }); -}); \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/printer.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/printer.js deleted file mode 100644 index 9458169f23ac26..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/printer.js +++ /dev/null @@ -1,501 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _isInteger() { - const data = _interopRequireDefault(require("lodash/isInteger")); - - _isInteger = function () { - return data; - }; - - return data; -} - -function _repeat() { - const data = _interopRequireDefault(require("lodash/repeat")); - - _repeat = function () { - return data; - }; - - return data; -} - -var _buffer = _interopRequireDefault(require("./buffer")); - -var n = _interopRequireWildcard(require("./node")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var generatorFunctions = _interopRequireWildcard(require("./generators")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const SCIENTIFIC_NOTATION = /e/i; -const ZERO_DECIMAL_INTEGER = /\.0+$/; -const NON_DECIMAL_LITERAL = /^0[box]/; - -class Printer { - constructor(format, map) { - this.inForStatementInitCounter = 0; - this._printStack = []; - this._indent = 0; - this._insideAux = false; - this._printedCommentStarts = {}; - this._parenPushNewlineState = null; - this._noLineTerminator = false; - this._printAuxAfterOnNextUserNode = false; - this._printedComments = new WeakSet(); - this._endsWithInteger = false; - this._endsWithWord = false; - this.format = format || {}; - this._buf = new _buffer.default(map); - } - - generate(ast) { - this.print(ast); - - this._maybeAddAuxComment(); - - return this._buf.get(); - } - - indent() { - if (this.format.compact || this.format.concise) return; - this._indent++; - } - - dedent() { - if (this.format.compact || this.format.concise) return; - this._indent--; - } - - semicolon(force = false) { - this._maybeAddAuxComment(); - - this._append(";", !force); - } - - rightBrace() { - if (this.format.minified) { - this._buf.removeLastSemicolon(); - } - - this.token("}"); - } - - space(force = false) { - if (this.format.compact) return; - - if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) { - this._space(); - } - } - - word(str) { - if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) { - this._space(); - } - - this._maybeAddAuxComment(); - - this._append(str); - - this._endsWithWord = true; - } - - number(str) { - this.word(str); - this._endsWithInteger = (0, _isInteger().default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== "."; - } - - token(str) { - if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) { - this._space(); - } - - this._maybeAddAuxComment(); - - this._append(str); - } - - newline(i) { - if (this.format.retainLines || this.format.compact) return; - - if (this.format.concise) { - this.space(); - return; - } - - if (this.endsWith("\n\n")) return; - if (typeof i !== "number") i = 1; - i = Math.min(2, i); - if (this.endsWith("{\n") || this.endsWith(":\n")) i--; - if (i <= 0) return; - - for (let j = 0; j < i; j++) { - this._newline(); - } - } - - endsWith(str) { - return this._buf.endsWith(str); - } - - removeTrailingNewline() { - this._buf.removeTrailingNewline(); - } - - exactSource(loc, cb) { - this._catchUp("start", loc); - - this._buf.exactSource(loc, cb); - } - - source(prop, loc) { - this._catchUp(prop, loc); - - this._buf.source(prop, loc); - } - - withSource(prop, loc, cb) { - this._catchUp(prop, loc); - - this._buf.withSource(prop, loc, cb); - } - - _space() { - this._append(" ", true); - } - - _newline() { - this._append("\n", true); - } - - _append(str, queue = false) { - this._maybeAddParen(str); - - this._maybeIndent(str); - - if (queue) this._buf.queue(str);else this._buf.append(str); - this._endsWithWord = false; - this._endsWithInteger = false; - } - - _maybeIndent(str) { - if (this._indent && this.endsWith("\n") && str[0] !== "\n") { - this._buf.queue(this._getIndent()); - } - } - - _maybeAddParen(str) { - const parenPushNewlineState = this._parenPushNewlineState; - if (!parenPushNewlineState) return; - this._parenPushNewlineState = null; - let i; - - for (i = 0; i < str.length && str[i] === " "; i++) continue; - - if (i === str.length) return; - const cha = str[i]; - - if (cha !== "\n") { - if (cha !== "/") return; - if (i + 1 === str.length) return; - const chaPost = str[i + 1]; - if (chaPost !== "/" && chaPost !== "*") return; - } - - this.token("("); - this.indent(); - parenPushNewlineState.printed = true; - } - - _catchUp(prop, loc) { - if (!this.format.retainLines) return; - const pos = loc ? loc[prop] : null; - - if (pos && pos.line !== null) { - const count = pos.line - this._buf.getCurrentLine(); - - for (let i = 0; i < count; i++) { - this._newline(); - } - } - } - - _getIndent() { - return (0, _repeat().default)(this.format.indent.style, this._indent); - } - - startTerminatorless(isLabel = false) { - if (isLabel) { - this._noLineTerminator = true; - return null; - } else { - return this._parenPushNewlineState = { - printed: false - }; - } - } - - endTerminatorless(state) { - this._noLineTerminator = false; - - if (state && state.printed) { - this.dedent(); - this.newline(); - this.token(")"); - } - } - - print(node, parent) { - if (!node) return; - const oldConcise = this.format.concise; - - if (node._compact) { - this.format.concise = true; - } - - const printMethod = this[node.type]; - - if (!printMethod) { - throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node && node.constructor.name)}`); - } - - this._printStack.push(node); - - const oldInAux = this._insideAux; - this._insideAux = !node.loc; - - this._maybeAddAuxComment(this._insideAux && !oldInAux); - - let needsParens = n.needsParens(node, parent, this._printStack); - - if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) { - needsParens = true; - } - - if (needsParens) this.token("("); - - this._printLeadingComments(node); - - const loc = t().isProgram(node) || t().isFile(node) ? null : node.loc; - this.withSource("start", loc, () => { - printMethod.call(this, node, parent); - }); - - this._printTrailingComments(node); - - if (needsParens) this.token(")"); - - this._printStack.pop(); - - this.format.concise = oldConcise; - this._insideAux = oldInAux; - } - - _maybeAddAuxComment(enteredPositionlessNode) { - if (enteredPositionlessNode) this._printAuxBeforeComment(); - if (!this._insideAux) this._printAuxAfterComment(); - } - - _printAuxBeforeComment() { - if (this._printAuxAfterOnNextUserNode) return; - this._printAuxAfterOnNextUserNode = true; - const comment = this.format.auxiliaryCommentBefore; - - if (comment) { - this._printComment({ - type: "CommentBlock", - value: comment - }); - } - } - - _printAuxAfterComment() { - if (!this._printAuxAfterOnNextUserNode) return; - this._printAuxAfterOnNextUserNode = false; - const comment = this.format.auxiliaryCommentAfter; - - if (comment) { - this._printComment({ - type: "CommentBlock", - value: comment - }); - } - } - - getPossibleRaw(node) { - const extra = node.extra; - - if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) { - return extra.raw; - } - } - - printJoin(nodes, parent, opts = {}) { - if (!nodes || !nodes.length) return; - if (opts.indent) this.indent(); - const newlineOpts = { - addNewlines: opts.addNewlines - }; - - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!node) continue; - if (opts.statement) this._printNewline(true, node, parent, newlineOpts); - this.print(node, parent); - - if (opts.iterator) { - opts.iterator(node, i); - } - - if (opts.separator && i < nodes.length - 1) { - opts.separator.call(this); - } - - if (opts.statement) this._printNewline(false, node, parent, newlineOpts); - } - - if (opts.indent) this.dedent(); - } - - printAndIndentOnComments(node, parent) { - const indent = node.leadingComments && node.leadingComments.length > 0; - if (indent) this.indent(); - this.print(node, parent); - if (indent) this.dedent(); - } - - printBlock(parent) { - const node = parent.body; - - if (!t().isEmptyStatement(node)) { - this.space(); - } - - this.print(node, parent); - } - - _printTrailingComments(node) { - this._printComments(this._getComments(false, node)); - } - - _printLeadingComments(node) { - this._printComments(this._getComments(true, node)); - } - - printInnerComments(node, indent = true) { - if (!node.innerComments || !node.innerComments.length) return; - if (indent) this.indent(); - - this._printComments(node.innerComments); - - if (indent) this.dedent(); - } - - printSequence(nodes, parent, opts = {}) { - opts.statement = true; - return this.printJoin(nodes, parent, opts); - } - - printList(items, parent, opts = {}) { - if (opts.separator == null) { - opts.separator = commaSeparator; - } - - return this.printJoin(items, parent, opts); - } - - _printNewline(leading, node, parent, opts) { - if (this.format.retainLines || this.format.compact) return; - - if (this.format.concise) { - this.space(); - return; - } - - let lines = 0; - - if (this._buf.hasContent()) { - if (!leading) lines++; - if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0; - const needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter; - if (needs(node, parent)) lines++; - } - - this.newline(lines); - } - - _getComments(leading, node) { - return node && (leading ? node.leadingComments : node.trailingComments) || []; - } - - _printComment(comment) { - if (!this.format.shouldPrintComment(comment.value)) return; - if (comment.ignore) return; - if (this._printedComments.has(comment)) return; - - this._printedComments.add(comment); - - if (comment.start != null) { - if (this._printedCommentStarts[comment.start]) return; - this._printedCommentStarts[comment.start] = true; - } - - const isBlockComment = comment.type === "CommentBlock"; - this.newline(this._buf.hasContent() && !this._noLineTerminator && isBlockComment ? 1 : 0); - if (!this.endsWith("[") && !this.endsWith("{")) this.space(); - let val = !isBlockComment && !this._noLineTerminator ? `//${comment.value}\n` : `/*${comment.value}*/`; - - if (isBlockComment && this.format.indent.adjustMultilineComment) { - const offset = comment.loc && comment.loc.start.column; - - if (offset) { - const newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g"); - val = val.replace(newlineRegex, "\n"); - } - - const indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn()); - val = val.replace(/\n(?!$)/g, `\n${(0, _repeat().default)(" ", indentSize)}`); - } - - if (this.endsWith("/")) this._space(); - this.withSource("start", comment.loc, () => { - this._append(val); - }); - this.newline(isBlockComment && !this._noLineTerminator ? 1 : 0); - } - - _printComments(comments) { - if (!comments || !comments.length) return; - - for (const comment of comments) { - this._printComment(comment); - } - } - -} - -exports.default = Printer; -Object.assign(Printer.prototype, generatorFunctions); - -function commaSeparator() { - this.token(","); - this.space(); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/source-map.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/source-map.js deleted file mode 100644 index 12b70308db4b73..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/source-map.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _sourceMap() { - const data = _interopRequireDefault(require("source-map")); - - _sourceMap = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -class SourceMap { - constructor(opts, code) { - this._cachedMap = null; - this._code = code; - this._opts = opts; - this._rawMappings = []; - } - - get() { - if (!this._cachedMap) { - const map = this._cachedMap = new (_sourceMap().default.SourceMapGenerator)({ - sourceRoot: this._opts.sourceRoot - }); - const code = this._code; - - if (typeof code === "string") { - map.setSourceContent(this._opts.sourceFileName, code); - } else if (typeof code === "object") { - Object.keys(code).forEach(sourceFileName => { - map.setSourceContent(sourceFileName, code[sourceFileName]); - }); - } - - this._rawMappings.forEach(map.addMapping, map); - } - - return this._cachedMap.toJSON(); - } - - getRawMappings() { - return this._rawMappings.slice(); - } - - mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) { - if (this._lastGenLine !== generatedLine && line === null) return; - - if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) { - return; - } - - this._cachedMap = null; - this._lastGenLine = generatedLine; - this._lastSourceLine = line; - this._lastSourceColumn = column; - - this._rawMappings.push({ - name: identifierName || undefined, - generated: { - line: generatedLine, - column: generatedColumn - }, - source: line == null ? undefined : filename || this._opts.sourceFileName, - original: line == null ? undefined : { - line: line, - column: column - } - }); - } - -} - -exports.default = SourceMap; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/generator/package.json deleted file mode 100644 index 6eca8973ea377b..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/types": "^7.5.5", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "deprecated": false, - "description": "Turns an AST into code.", - "devDependencies": { - "@babel/helper-fixtures": "^7.5.5", - "@babel/parser": "^7.5.5" - }, - "files": [ - "lib" - ], - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/generator", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-generator" - }, - "version": "7.5.5" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/LICENSE deleted file mode 100644 index a06ec0e70f286e..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-2018 Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/lib/index.js deleted file mode 100644 index c6dd4afbf55a5c..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/lib/index.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -function _helperGetFunctionArity() { - const data = _interopRequireDefault(require("@babel/helper-get-function-arity")); - - _helperGetFunctionArity = function () { - return data; - }; - - return data; -} - -function _template() { - const data = _interopRequireDefault(require("@babel/template")); - - _template = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const buildPropertyMethodAssignmentWrapper = (0, _template().default)(` - (function (FUNCTION_KEY) { - function FUNCTION_ID() { - return FUNCTION_KEY.apply(this, arguments); - } - - FUNCTION_ID.toString = function () { - return FUNCTION_KEY.toString(); - } - - return FUNCTION_ID; - })(FUNCTION) -`); -const buildGeneratorPropertyMethodAssignmentWrapper = (0, _template().default)(` - (function (FUNCTION_KEY) { - function* FUNCTION_ID() { - return yield* FUNCTION_KEY.apply(this, arguments); - } - - FUNCTION_ID.toString = function () { - return FUNCTION_KEY.toString(); - }; - - return FUNCTION_ID; - })(FUNCTION) -`); -const visitor = { - "ReferencedIdentifier|BindingIdentifier"(path, state) { - if (path.node.name !== state.name) return; - const localDeclar = path.scope.getBindingIdentifier(state.name); - if (localDeclar !== state.outerDeclar) return; - state.selfReference = true; - path.stop(); - } - -}; - -function getNameFromLiteralId(id) { - if (t().isNullLiteral(id)) { - return "null"; - } - - if (t().isRegExpLiteral(id)) { - return `_${id.pattern}_${id.flags}`; - } - - if (t().isTemplateLiteral(id)) { - return id.quasis.map(quasi => quasi.value.raw).join(""); - } - - if (id.value !== undefined) { - return id.value + ""; - } - - return ""; -} - -function wrap(state, method, id, scope) { - if (state.selfReference) { - if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) { - scope.rename(id.name); - } else { - if (!t().isFunction(method)) return; - let build = buildPropertyMethodAssignmentWrapper; - - if (method.generator) { - build = buildGeneratorPropertyMethodAssignmentWrapper; - } - - const template = build({ - FUNCTION: method, - FUNCTION_ID: id, - FUNCTION_KEY: scope.generateUidIdentifier(id.name) - }).expression; - const params = template.callee.body.body[0].params; - - for (let i = 0, len = (0, _helperGetFunctionArity().default)(method); i < len; i++) { - params.push(scope.generateUidIdentifier("x")); - } - - return template; - } - } - - method.id = id; - scope.getProgramParent().references[id.name] = true; -} - -function visit(node, name, scope) { - const state = { - selfAssignment: false, - selfReference: false, - outerDeclar: scope.getBindingIdentifier(name), - references: [], - name: name - }; - const binding = scope.getOwnBinding(name); - - if (binding) { - if (binding.kind === "param") { - state.selfReference = true; - } else {} - } else if (state.outerDeclar || scope.hasGlobal(name)) { - scope.traverse(node, visitor, state); - } - - return state; -} - -function _default({ - node, - parent, - scope, - id -}, localBinding = false) { - if (node.id) return; - - if ((t().isObjectProperty(parent) || t().isObjectMethod(parent, { - kind: "method" - })) && (!parent.computed || t().isLiteral(parent.key))) { - id = parent.key; - } else if (t().isVariableDeclarator(parent)) { - id = parent.id; - - if (t().isIdentifier(id) && !localBinding) { - const binding = scope.parent.getBinding(id.name); - - if (binding && binding.constant && scope.getBinding(id.name) === binding) { - node.id = t().cloneNode(id); - node.id[t().NOT_LOCAL_BINDING] = true; - return; - } - } - } else if (t().isAssignmentExpression(parent)) { - id = parent.left; - } else if (!id) { - return; - } - - let name; - - if (id && t().isLiteral(id)) { - name = getNameFromLiteralId(id); - } else if (id && t().isIdentifier(id)) { - name = id.name; - } - - if (name === undefined) { - return; - } - - name = t().toBindingIdentifierName(name); - id = t().identifier(name); - id[t().NOT_LOCAL_BINDING] = true; - const state = visit(node, name, scope); - return wrap(state, node, id, scope) || node; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/package.json deleted file mode 100644 index dfed420aaecb16..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "bundleDependencies": false, - "dependencies": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - }, - "deprecated": false, - "description": "Helper function to change the property 'name' of every function", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-function-name", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-function-name" - }, - "version": "7.1.0" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/LICENSE deleted file mode 100644 index 620366eb90071c..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-2018 Sebastian McKenzie - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/lib/index.js deleted file mode 100644 index 5723401db71236..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/lib/index.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _default(node) { - const params = node.params; - - for (let i = 0; i < params.length; i++) { - const param = params[i]; - - if (t().isAssignmentPattern(param) || t().isRestElement(param)) { - return i; - } - } - - return params.length; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/package.json deleted file mode 100644 index 49d2e854daecb8..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "bundleDependencies": false, - "dependencies": { - "@babel/types": "^7.0.0" - }, - "deprecated": false, - "description": "Helper function to get function arity", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-get-function-arity", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-get-function-arity" - }, - "version": "7.0.0" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/lib/index.js deleted file mode 100644 index ddb34bc3513867..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/lib/index.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = splitExportDeclaration; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function splitExportDeclaration(exportDeclaration) { - if (!exportDeclaration.isExportDeclaration()) { - throw new Error("Only export declarations can be splitted."); - } - - const isDefault = exportDeclaration.isExportDefaultDeclaration(); - const declaration = exportDeclaration.get("declaration"); - const isClassDeclaration = declaration.isClassDeclaration(); - - if (isDefault) { - const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration; - const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope; - let id = declaration.node.id; - let needBindingRegistration = false; - - if (!id) { - needBindingRegistration = true; - id = scope.generateUidIdentifier("default"); - - if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) { - declaration.node.id = t().cloneNode(id); - } - } - - const updatedDeclaration = standaloneDeclaration ? declaration : t().variableDeclaration("var", [t().variableDeclarator(t().cloneNode(id), declaration.node)]); - const updatedExportDeclaration = t().exportNamedDeclaration(null, [t().exportSpecifier(t().cloneNode(id), t().identifier("default"))]); - exportDeclaration.insertAfter(updatedExportDeclaration); - exportDeclaration.replaceWith(updatedDeclaration); - - if (needBindingRegistration) { - scope.registerDeclaration(exportDeclaration); - } - - return exportDeclaration; - } - - if (exportDeclaration.get("specifiers").length > 0) { - throw new Error("It doesn't make sense to split exported specifiers."); - } - - const bindingIdentifiers = declaration.getOuterBindingIdentifiers(); - const specifiers = Object.keys(bindingIdentifiers).map(name => { - return t().exportSpecifier(t().identifier(name), t().identifier(name)); - }); - const aliasDeclar = t().exportNamedDeclaration(null, specifiers); - exportDeclaration.insertAfter(aliasDeclar); - exportDeclaration.replaceWith(declaration.node); - return exportDeclaration; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/package.json deleted file mode 100644 index 8f3e0fdbd78168..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "bundleDependencies": false, - "dependencies": { - "@babel/types": "^7.4.4" - }, - "deprecated": false, - "description": ">", - "gitHead": "2c88694388831b1e5b88e4bbed6781eb2be1edba", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-split-export-declaration", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration" - }, - "version": "7.4.4" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/highlight/lib/index.js deleted file mode 100644 index 6ac5b4a350b8e6..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/lib/index.js +++ /dev/null @@ -1,129 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.shouldHighlight = shouldHighlight; -exports.getChalk = getChalk; -exports.default = highlight; - -function _jsTokens() { - const data = _interopRequireWildcard(require("js-tokens")); - - _jsTokens = function () { - return data; - }; - - return data; -} - -function _esutils() { - const data = _interopRequireDefault(require("esutils")); - - _esutils = function () { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require("chalk")); - - _chalk = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function getDefs(chalk) { - return { - keyword: chalk.cyan, - capitalized: chalk.yellow, - jsx_tag: chalk.yellow, - punctuator: chalk.yellow, - number: chalk.magenta, - string: chalk.green, - regex: chalk.magenta, - comment: chalk.grey, - invalid: chalk.white.bgRed.bold - }; -} - -const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; -const JSX_TAG = /^[a-z][\w-]*$/i; -const BRACKET = /^[()[\]{}]$/; - -function getTokenType(match) { - const [offset, text] = match.slice(-2); - const token = (0, _jsTokens().matchToToken)(match); - - if (token.type === "name") { - if (_esutils().default.keyword.isReservedWordES6(token.value)) { - return "keyword"; - } - - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " colorize(str)).join("\n"); - } else { - return args[0]; - } - }); -} - -function shouldHighlight(options) { - return _chalk().default.supportsColor || options.forceColor; -} - -function getChalk(options) { - let chalk = _chalk().default; - - if (options.forceColor) { - chalk = new (_chalk().default.constructor)({ - enabled: true, - level: 1 - }); - } - - return chalk; -} - -function highlight(code, options = {}) { - if (shouldHighlight(options)) { - const chalk = getChalk(options); - const defs = getDefs(chalk); - return highlightTokens(defs, code); - } else { - return code; - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/highlight/package.json deleted file mode 100644 index 9c16718356c0a9..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "author": { - "name": "suchipi", - "email": "me@suchipi.com" - }, - "bundleDependencies": false, - "dependencies": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - }, - "deprecated": false, - "description": "Syntax highlight JavaScript strings for output in terminals.", - "devDependencies": { - "strip-ansi": "^4.0.0" - }, - "gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/highlight", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-highlight" - }, - "version": "7.5.0" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/parser/README.md deleted file mode 100644 index 65092a05347ea1..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/parser/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/parser - -> A JavaScript parser - -See our website [@babel/parser](https://babeljs.io/docs/en/next/babel-parser.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A+parser+%28babylon%29%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/parser -``` - -or using yarn: - -```sh -yarn add @babel/parser --dev -``` diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/bin/babel-parser.js b/tools/node_modules/babel-eslint/node_modules/@babel/parser/bin/babel-parser.js deleted file mode 100755 index 58f00b845c0cdd..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/parser/bin/babel-parser.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node -/* eslint no-var: 0 */ - -var parser = require(".."); -var fs = require("fs"); - -var filename = process.argv[2]; -if (!filename) { - console.error("no filename specified"); - process.exit(0); -} - -var file = fs.readFileSync(filename, "utf8"); -var ast = parser.parse(file); - -console.log(JSON.stringify(ast, null, " ")); diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/parser/lib/index.js deleted file mode 100644 index 81b6994d07e99d..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/parser/lib/index.js +++ /dev/null @@ -1,11353 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -const beforeExpr = true; -const startsExpr = true; -const isLoop = true; -const isAssign = true; -const prefix = true; -const postfix = true; -class TokenType { - constructor(label, conf = {}) { - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.rightAssociative = !!conf.rightAssociative; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop != null ? conf.binop : null; - this.updateContext = null; - } - -} -const keywords = new Map(); - -function createKeyword(name, options = {}) { - options.keyword = name; - const token = new TokenType(name, options); - keywords.set(name, token); - return token; -} - -function createBinop(name, binop) { - return new TokenType(name, { - beforeExpr, - binop - }); -} - -const types = { - num: new TokenType("num", { - startsExpr - }), - bigint: new TokenType("bigint", { - startsExpr - }), - regexp: new TokenType("regexp", { - startsExpr - }), - string: new TokenType("string", { - startsExpr - }), - name: new TokenType("name", { - startsExpr - }), - eof: new TokenType("eof"), - bracketL: new TokenType("[", { - beforeExpr, - startsExpr - }), - bracketR: new TokenType("]"), - braceL: new TokenType("{", { - beforeExpr, - startsExpr - }), - braceBarL: new TokenType("{|", { - beforeExpr, - startsExpr - }), - braceR: new TokenType("}"), - braceBarR: new TokenType("|}"), - parenL: new TokenType("(", { - beforeExpr, - startsExpr - }), - parenR: new TokenType(")"), - comma: new TokenType(",", { - beforeExpr - }), - semi: new TokenType(";", { - beforeExpr - }), - colon: new TokenType(":", { - beforeExpr - }), - doubleColon: new TokenType("::", { - beforeExpr - }), - dot: new TokenType("."), - question: new TokenType("?", { - beforeExpr - }), - questionDot: new TokenType("?."), - arrow: new TokenType("=>", { - beforeExpr - }), - template: new TokenType("template"), - ellipsis: new TokenType("...", { - beforeExpr - }), - backQuote: new TokenType("`", { - startsExpr - }), - dollarBraceL: new TokenType("${", { - beforeExpr, - startsExpr - }), - at: new TokenType("@"), - hash: new TokenType("#", { - startsExpr - }), - interpreterDirective: new TokenType("#!..."), - eq: new TokenType("=", { - beforeExpr, - isAssign - }), - assign: new TokenType("_=", { - beforeExpr, - isAssign - }), - incDec: new TokenType("++/--", { - prefix, - postfix, - startsExpr - }), - bang: new TokenType("!", { - beforeExpr, - prefix, - startsExpr - }), - tilde: new TokenType("~", { - beforeExpr, - prefix, - startsExpr - }), - pipeline: createBinop("|>", 0), - nullishCoalescing: createBinop("??", 1), - logicalOR: createBinop("||", 1), - logicalAND: createBinop("&&", 2), - bitwiseOR: createBinop("|", 3), - bitwiseXOR: createBinop("^", 4), - bitwiseAND: createBinop("&", 5), - equality: createBinop("==/!=/===/!==", 6), - relational: createBinop("/<=/>=", 7), - bitShift: createBinop("<>/>>>", 8), - plusMin: new TokenType("+/-", { - beforeExpr, - binop: 9, - prefix, - startsExpr - }), - modulo: createBinop("%", 10), - star: createBinop("*", 10), - slash: createBinop("/", 10), - exponent: new TokenType("**", { - beforeExpr, - binop: 11, - rightAssociative: true - }), - _break: createKeyword("break"), - _case: createKeyword("case", { - beforeExpr - }), - _catch: createKeyword("catch"), - _continue: createKeyword("continue"), - _debugger: createKeyword("debugger"), - _default: createKeyword("default", { - beforeExpr - }), - _do: createKeyword("do", { - isLoop, - beforeExpr - }), - _else: createKeyword("else", { - beforeExpr - }), - _finally: createKeyword("finally"), - _for: createKeyword("for", { - isLoop - }), - _function: createKeyword("function", { - startsExpr - }), - _if: createKeyword("if"), - _return: createKeyword("return", { - beforeExpr - }), - _switch: createKeyword("switch"), - _throw: createKeyword("throw", { - beforeExpr, - prefix, - startsExpr - }), - _try: createKeyword("try"), - _var: createKeyword("var"), - _const: createKeyword("const"), - _while: createKeyword("while", { - isLoop - }), - _with: createKeyword("with"), - _new: createKeyword("new", { - beforeExpr, - startsExpr - }), - _this: createKeyword("this", { - startsExpr - }), - _super: createKeyword("super", { - startsExpr - }), - _class: createKeyword("class", { - startsExpr - }), - _extends: createKeyword("extends", { - beforeExpr - }), - _export: createKeyword("export"), - _import: createKeyword("import", { - startsExpr - }), - _null: createKeyword("null", { - startsExpr - }), - _true: createKeyword("true", { - startsExpr - }), - _false: createKeyword("false", { - startsExpr - }), - _in: createKeyword("in", { - beforeExpr, - binop: 7 - }), - _instanceof: createKeyword("instanceof", { - beforeExpr, - binop: 7 - }), - _typeof: createKeyword("typeof", { - beforeExpr, - prefix, - startsExpr - }), - _void: createKeyword("void", { - beforeExpr, - prefix, - startsExpr - }), - _delete: createKeyword("delete", { - beforeExpr, - prefix, - startsExpr - }) -}; - -const SCOPE_OTHER = 0b000000000, - SCOPE_PROGRAM = 0b000000001, - SCOPE_FUNCTION = 0b000000010, - SCOPE_ASYNC = 0b000000100, - SCOPE_GENERATOR = 0b000001000, - SCOPE_ARROW = 0b000010000, - SCOPE_SIMPLE_CATCH = 0b000100000, - SCOPE_SUPER = 0b001000000, - SCOPE_DIRECT_SUPER = 0b010000000, - SCOPE_CLASS = 0b100000000, - SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION; -function functionFlags(isAsync, isGenerator) { - return SCOPE_FUNCTION | (isAsync ? SCOPE_ASYNC : 0) | (isGenerator ? SCOPE_GENERATOR : 0); -} -const BIND_KIND_VALUE = 0b00000000001, - BIND_KIND_TYPE = 0b00000000010, - BIND_SCOPE_VAR = 0b00000000100, - BIND_SCOPE_LEXICAL = 0b00000001000, - BIND_SCOPE_FUNCTION = 0b00000010000, - BIND_FLAGS_NONE = 0b00001000000, - BIND_FLAGS_CLASS = 0b00010000000, - BIND_FLAGS_TS_ENUM = 0b00100000000, - BIND_FLAGS_TS_CONST_ENUM = 0b01000000000, - BIND_FLAGS_TS_EXPORT_ONLY = 0b10000000000; -const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS, - BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0, - BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0, - BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0, - BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS, - BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0, - BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM, - BIND_TS_FN_TYPE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY, - BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE, - BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE, - BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM, - BIND_TS_NAMESPACE = BIND_TS_FN_TYPE; - -function isSimpleProperty(node) { - return node != null && node.type === "Property" && node.kind === "init" && node.method === false; -} - -var estree = (superClass => class extends superClass { - estreeParseRegExpLiteral({ - pattern, - flags - }) { - let regex = null; - - try { - regex = new RegExp(pattern, flags); - } catch (e) {} - - const node = this.estreeParseLiteral(regex); - node.regex = { - pattern, - flags - }; - return node; - } - - estreeParseLiteral(value) { - return this.parseLiteral(value, "Literal"); - } - - directiveToStmt(directive) { - const directiveLiteral = directive.value; - const stmt = this.startNodeAt(directive.start, directive.loc.start); - const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start); - expression.value = directiveLiteral.value; - expression.raw = directiveLiteral.extra.raw; - stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end); - stmt.directive = directiveLiteral.extra.raw.slice(1, -1); - return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end); - } - - initFunction(node, isAsync) { - super.initFunction(node, isAsync); - node.expression = false; - } - - checkDeclaration(node) { - if (isSimpleProperty(node)) { - this.checkDeclaration(node.value); - } else { - super.checkDeclaration(node); - } - } - - checkGetterSetterParams(method) { - const prop = method; - const paramCount = prop.kind === "get" ? 0 : 1; - const start = prop.start; - - if (prop.value.params.length !== paramCount) { - if (prop.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { - this.raise(start, "setter function argument must not be a rest parameter"); - } - } - - checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { - switch (expr.type) { - case "ObjectPattern": - expr.properties.forEach(prop => { - this.checkLVal(prop.type === "Property" ? prop.value : prop, bindingType, checkClashes, "object destructuring pattern"); - }); - break; - - default: - super.checkLVal(expr, bindingType, checkClashes, contextDescription); - } - } - - checkPropClash(prop, propHash) { - if (prop.type === "SpreadElement" || prop.computed || prop.method || prop.shorthand) { - return; - } - - const key = prop.key; - const name = key.type === "Identifier" ? key.name : String(key.value); - - if (name === "__proto__" && prop.kind === "init") { - if (propHash.proto) { - this.raise(key.start, "Redefinition of __proto__ property"); - } - - propHash.proto = true; - } - } - - isStrictBody(node) { - const isBlockStatement = node.body.type === "BlockStatement"; - - if (isBlockStatement && node.body.body.length > 0) { - for (let _i = 0, _node$body$body = node.body.body; _i < _node$body$body.length; _i++) { - const directive = _node$body$body[_i]; - - if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") { - if (directive.expression.value === "use strict") return true; - } else { - break; - } - } - } - - return false; - } - - isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized); - } - - stmtToDirective(stmt) { - const directive = super.stmtToDirective(stmt); - const value = stmt.expression.value; - directive.value.value = value; - return directive; - } - - parseBlockBody(node, allowDirectives, topLevel, end) { - super.parseBlockBody(node, allowDirectives, topLevel, end); - const directiveStatements = node.directives.map(d => this.directiveToStmt(d)); - node.body = directiveStatements.concat(node.body); - delete node.directives; - } - - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true); - - if (method.typeParameters) { - method.value.typeParameters = method.typeParameters; - delete method.typeParameters; - } - - classBody.body.push(method); - } - - parseExprAtom(refShorthandDefaultPos) { - switch (this.state.type) { - case types.regexp: - return this.estreeParseRegExpLiteral(this.state.value); - - case types.num: - case types.string: - return this.estreeParseLiteral(this.state.value); - - case types._null: - return this.estreeParseLiteral(null); - - case types._true: - return this.estreeParseLiteral(true); - - case types._false: - return this.estreeParseLiteral(false); - - default: - return super.parseExprAtom(refShorthandDefaultPos); - } - } - - parseLiteral(value, type, startPos, startLoc) { - const node = super.parseLiteral(value, type, startPos, startLoc); - node.raw = node.extra.raw; - delete node.extra; - return node; - } - - parseFunctionBody(node, allowExpression, isMethod = false) { - super.parseFunctionBody(node, allowExpression, isMethod); - node.expression = node.body.type !== "BlockStatement"; - } - - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { - let funcNode = this.startNode(); - funcNode.kind = node.kind; - funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); - funcNode.type = "FunctionExpression"; - delete funcNode.kind; - node.value = funcNode; - type = type === "ClassMethod" ? "MethodDefinition" : type; - return this.finishNode(node, type); - } - - parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { - const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc); - - if (node) { - node.type = "Property"; - if (node.kind === "method") node.kind = "init"; - node.shorthand = false; - } - - return node; - } - - parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { - const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos); - - if (node) { - node.kind = "init"; - node.type = "Property"; - } - - return node; - } - - toAssignable(node, isBinding, contextDescription) { - if (isSimpleProperty(node)) { - this.toAssignable(node.value, isBinding, contextDescription); - return node; - } - - return super.toAssignable(node, isBinding, contextDescription); - } - - toAssignableObjectExpressionProp(prop, isBinding, isLast) { - if (prop.kind === "get" || prop.kind === "set") { - this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - } else if (prop.method) { - this.raise(prop.key.start, "Object pattern can't contain methods"); - } else { - super.toAssignableObjectExpressionProp(prop, isBinding, isLast); - } - } - -}); - -const lineBreak = /\r\n?|[\n\u2028\u2029]/; -const lineBreakG = new RegExp(lineBreak.source, "g"); -function isNewLine(code) { - switch (code) { - case 10: - case 13: - case 8232: - case 8233: - return true; - - default: - return false; - } -} -const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; -function isWhitespace(code) { - switch (code) { - case 0x0009: - case 0x000b: - case 0x000c: - case 32: - case 160: - case 5760: - case 0x2000: - case 0x2001: - case 0x2002: - case 0x2003: - case 0x2004: - case 0x2005: - case 0x2006: - case 0x2007: - case 0x2008: - case 0x2009: - case 0x200a: - case 0x202f: - case 0x205f: - case 0x3000: - case 0xfeff: - return true; - - default: - return false; - } -} - -class TokContext { - constructor(token, isExpr, preserveSpace, override) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - } - -} -const types$1 = { - braceStatement: new TokContext("{", false), - braceExpression: new TokContext("{", true), - templateQuasi: new TokContext("${", false), - parenStatement: new TokContext("(", false), - parenExpression: new TokContext("(", true), - template: new TokContext("`", true, true, p => p.readTmplToken()), - functionExpression: new TokContext("function", true), - functionStatement: new TokContext("function", false) -}; - -types.parenR.updateContext = types.braceR.updateContext = function () { - if (this.state.context.length === 1) { - this.state.exprAllowed = true; - return; - } - - let out = this.state.context.pop(); - - if (out === types$1.braceStatement && this.curContext().token === "function") { - out = this.state.context.pop(); - } - - this.state.exprAllowed = !out.isExpr; -}; - -types.name.updateContext = function (prevType) { - let allowed = false; - - if (prevType !== types.dot) { - if (this.state.value === "of" && !this.state.exprAllowed || this.state.value === "yield" && this.scope.inGenerator) { - allowed = true; - } - } - - this.state.exprAllowed = allowed; - - if (this.state.isIterator) { - this.state.isIterator = false; - } -}; - -types.braceL.updateContext = function (prevType) { - this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); - this.state.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function () { - this.state.context.push(types$1.templateQuasi); - this.state.exprAllowed = true; -}; - -types.parenL.updateContext = function (prevType) { - const statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); - this.state.exprAllowed = true; -}; - -types.incDec.updateContext = function () {}; - -types._function.updateContext = types._class.updateContext = function (prevType) { - if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && !(prevType === types._return && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) && !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) { - this.state.context.push(types$1.functionExpression); - } else { - this.state.context.push(types$1.functionStatement); - } - - this.state.exprAllowed = false; -}; - -types.backQuote.updateContext = function () { - if (this.curContext() === types$1.template) { - this.state.context.pop(); - } else { - this.state.context.push(types$1.template); - } - - this.state.exprAllowed = false; -}; - -const reservedWords = { - strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], - strictBind: ["eval", "arguments"] -}; -const reservedWordsStrictSet = new Set(reservedWords.strict); -const reservedWordsStrictBindSet = new Set(reservedWords.strict.concat(reservedWords.strictBind)); -const isReservedWord = (word, inModule) => { - return inModule && word === "await" || word === "enum"; -}; -function isStrictReservedWord(word, inModule) { - return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); -} -function isStrictBindReservedWord(word, inModule) { - return isReservedWord(word, inModule) || reservedWordsStrictBindSet.has(word); -} -function isKeyword(word) { - return keywords.has(word); -} -const keywordRelationalOperator = /^in(stanceof)?$/; -let 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\u0560-\u0588\u05d0-\u05ea\u05ef-\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\u0860-\u086a\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\u09fc\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\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\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-\u1878\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\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\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-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\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-\uab67\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"; -let 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\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\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\u09fe\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\u0afa-\u0aff\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-\u0c04\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\u0d00-\u0d03\u0d3b\u0d3c\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-\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\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\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\ua8ff-\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"; -const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; -const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 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, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 477, 28, 11, 0, 9, 21, 155, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 12, 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, 21, 0, 33, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 0, 161, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 270, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 754, 9486, 286, 50, 2, 18, 3, 9, 395, 2309, 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, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 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, 15, 7472, 3104, 541]; -const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 525, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 232, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 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, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 792487, 239]; - -function isInAstralSet(code, set) { - let pos = 0x10000; - - for (let i = 0, length = set.length; i < length; i += 2) { - pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; - } - - return false; -} - -function isIdentifierStart(code) { - if (code < 65) return code === 36; - if (code <= 90) return true; - if (code < 97) return code === 95; - if (code <= 122) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes); -} -function isIteratorStart(current, next) { - return current === 64 && next === 64; -} -function isIdentifierChar(code) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code <= 90) return true; - if (code < 97) return code === 95; - if (code <= 122) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -const reservedTypes = ["any", "bool", "boolean", "empty", "false", "mixed", "null", "number", "static", "string", "true", "typeof", "void", "interface", "extends", "_"]; - -function isEsModuleType(bodyElement) { - return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); -} - -function hasTypeImportKind(node) { - return node.importKind === "type" || node.importKind === "typeof"; -} - -function isMaybeDefaultImport(state) { - return (state.type === types.name || !!state.type.keyword) && state.value !== "from"; -} - -const exportSuggestions = { - const: "declare export var", - let: "declare export var", - type: "export type", - interface: "export interface" -}; - -function partition(list, test) { - const list1 = []; - const list2 = []; - - for (let i = 0; i < list.length; i++) { - (test(list[i], i, list) ? list1 : list2).push(list[i]); - } - - return [list1, list2]; -} - -const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; -var flow = (superClass => class extends superClass { - constructor(options, input) { - super(options, input); - this.flowPragma = undefined; - } - - shouldParseTypes() { - return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; - } - - finishToken(type, val) { - if (type !== types.string && type !== types.semi && type !== types.interpreterDirective) { - if (this.flowPragma === undefined) { - this.flowPragma = null; - } - } - - return super.finishToken(type, val); - } - - addComment(comment) { - if (this.flowPragma === undefined) { - const matches = FLOW_PRAGMA_REGEX.exec(comment.value); - - if (!matches) ; else if (matches[1] === "flow") { - this.flowPragma = "flow"; - } else if (matches[1] === "noflow") { - this.flowPragma = "noflow"; - } else { - throw new Error("Unexpected flow pragma"); - } - } - - return super.addComment(comment); - } - - flowParseTypeInitialiser(tok) { - const oldInType = this.state.inType; - this.state.inType = true; - this.expect(tok || types.colon); - const type = this.flowParseType(); - this.state.inType = oldInType; - return type; - } - - flowParsePredicate() { - const node = this.startNode(); - const moduloLoc = this.state.startLoc; - const moduloPos = this.state.start; - this.expect(types.modulo); - const checksLoc = this.state.startLoc; - this.expectContextual("checks"); - - if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) { - this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here."); - } - - if (this.eat(types.parenL)) { - node.value = this.parseExpression(); - this.expect(types.parenR); - return this.finishNode(node, "DeclaredPredicate"); - } else { - return this.finishNode(node, "InferredPredicate"); - } - } - - flowParseTypeAndPredicateInitialiser() { - const oldInType = this.state.inType; - this.state.inType = true; - this.expect(types.colon); - let type = null; - let predicate = null; - - if (this.match(types.modulo)) { - this.state.inType = oldInType; - predicate = this.flowParsePredicate(); - } else { - type = this.flowParseType(); - this.state.inType = oldInType; - - if (this.match(types.modulo)) { - predicate = this.flowParsePredicate(); - } - } - - return [type, predicate]; - } - - flowParseDeclareClass(node) { - this.next(); - this.flowParseInterfaceish(node, true); - return this.finishNode(node, "DeclareClass"); - } - - flowParseDeclareFunction(node) { - this.next(); - const id = node.id = this.parseIdentifier(); - const typeNode = this.startNode(); - const typeContainer = this.startNode(); - - if (this.isRelational("<")) { - typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - typeNode.typeParameters = null; - } - - this.expect(types.parenL); - const tmp = this.flowParseFunctionTypeParams(); - typeNode.params = tmp.params; - typeNode.rest = tmp.rest; - this.expect(types.parenR); - [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); - id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); - this.resetEndLocation(id); - this.semicolon(); - return this.finishNode(node, "DeclareFunction"); - } - - flowParseDeclare(node, insideModule) { - if (this.match(types._class)) { - return this.flowParseDeclareClass(node); - } else if (this.match(types._function)) { - return this.flowParseDeclareFunction(node); - } else if (this.match(types._var)) { - return this.flowParseDeclareVariable(node); - } else if (this.eatContextual("module")) { - if (this.match(types.dot)) { - return this.flowParseDeclareModuleExports(node); - } else { - if (insideModule) { - this.unexpected(this.state.lastTokStart, "`declare module` cannot be used inside another `declare module`"); - } - - return this.flowParseDeclareModule(node); - } - } else if (this.isContextual("type")) { - return this.flowParseDeclareTypeAlias(node); - } else if (this.isContextual("opaque")) { - return this.flowParseDeclareOpaqueType(node); - } else if (this.isContextual("interface")) { - return this.flowParseDeclareInterface(node); - } else if (this.match(types._export)) { - return this.flowParseDeclareExportDeclaration(node, insideModule); - } else { - throw this.unexpected(); - } - } - - flowParseDeclareVariable(node) { - this.next(); - node.id = this.flowParseTypeAnnotatableIdentifier(true); - this.semicolon(); - return this.finishNode(node, "DeclareVariable"); - } - - flowParseDeclareModule(node) { - this.scope.enter(SCOPE_OTHER); - - if (this.match(types.string)) { - node.id = this.parseExprAtom(); - } else { - node.id = this.parseIdentifier(); - } - - const bodyNode = node.body = this.startNode(); - const body = bodyNode.body = []; - this.expect(types.braceL); - - while (!this.match(types.braceR)) { - let bodyNode = this.startNode(); - - if (this.match(types._import)) { - this.next(); - - if (!this.isContextual("type") && !this.match(types._typeof)) { - this.unexpected(this.state.lastTokStart, "Imports within a `declare module` body must always be `import type` or `import typeof`"); - } - - this.parseImport(bodyNode); - } else { - this.expectContextual("declare", "Only declares and type imports are allowed inside declare module"); - bodyNode = this.flowParseDeclare(bodyNode, true); - } - - body.push(bodyNode); - } - - this.scope.exit(); - this.expect(types.braceR); - this.finishNode(bodyNode, "BlockStatement"); - let kind = null; - let hasModuleExport = false; - const errorMessage = "Found both `declare module.exports` and `declare export` in the same module. " + "Modules can only have 1 since they are either an ES module or they are a CommonJS module"; - body.forEach(bodyElement => { - if (isEsModuleType(bodyElement)) { - if (kind === "CommonJS") { - this.unexpected(bodyElement.start, errorMessage); - } - - kind = "ES"; - } else if (bodyElement.type === "DeclareModuleExports") { - if (hasModuleExport) { - this.unexpected(bodyElement.start, "Duplicate `declare module.exports` statement"); - } - - if (kind === "ES") this.unexpected(bodyElement.start, errorMessage); - kind = "CommonJS"; - hasModuleExport = true; - } - }); - node.kind = kind || "CommonJS"; - return this.finishNode(node, "DeclareModule"); - } - - flowParseDeclareExportDeclaration(node, insideModule) { - this.expect(types._export); - - if (this.eat(types._default)) { - if (this.match(types._function) || this.match(types._class)) { - node.declaration = this.flowParseDeclare(this.startNode()); - } else { - node.declaration = this.flowParseType(); - this.semicolon(); - } - - node.default = true; - return this.finishNode(node, "DeclareExportDeclaration"); - } else { - if (this.match(types._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) { - const label = this.state.value; - const suggestion = exportSuggestions[label]; - this.unexpected(this.state.start, `\`declare export ${label}\` is not supported. Use \`${suggestion}\` instead`); - } - - if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual("opaque")) { - node.declaration = this.flowParseDeclare(this.startNode()); - node.default = false; - return this.finishNode(node, "DeclareExportDeclaration"); - } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) { - node = this.parseExport(node); - - if (node.type === "ExportNamedDeclaration") { - node.type = "ExportDeclaration"; - node.default = false; - delete node.exportKind; - } - - node.type = "Declare" + node.type; - return node; - } - } - - throw this.unexpected(); - } - - flowParseDeclareModuleExports(node) { - this.next(); - this.expectContextual("exports"); - node.typeAnnotation = this.flowParseTypeAnnotation(); - this.semicolon(); - return this.finishNode(node, "DeclareModuleExports"); - } - - flowParseDeclareTypeAlias(node) { - this.next(); - this.flowParseTypeAlias(node); - node.type = "DeclareTypeAlias"; - return node; - } - - flowParseDeclareOpaqueType(node) { - this.next(); - this.flowParseOpaqueType(node, true); - node.type = "DeclareOpaqueType"; - return node; - } - - flowParseDeclareInterface(node) { - this.next(); - this.flowParseInterfaceish(node); - return this.finishNode(node, "DeclareInterface"); - } - - flowParseInterfaceish(node, isClass = false) { - node.id = this.flowParseRestrictedIdentifier(!isClass); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.extends = []; - node.implements = []; - node.mixins = []; - - if (this.eat(types._extends)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (!isClass && this.eat(types.comma)); - } - - if (this.isContextual("mixins")) { - this.next(); - - do { - node.mixins.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - if (this.isContextual("implements")) { - this.next(); - - do { - node.implements.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - node.body = this.flowParseObjectType({ - allowStatic: isClass, - allowExact: false, - allowSpread: false, - allowProto: isClass, - allowInexact: false - }); - } - - flowParseInterfaceExtends() { - const node = this.startNode(); - node.id = this.flowParseQualifiedTypeIdentifier(); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - - return this.finishNode(node, "InterfaceExtends"); - } - - flowParseInterface(node) { - this.flowParseInterfaceish(node); - return this.finishNode(node, "InterfaceDeclaration"); - } - - checkNotUnderscore(word) { - if (word === "_") { - throw this.unexpected(null, "`_` is only allowed as a type argument to call or new"); - } - } - - checkReservedType(word, startLoc) { - if (reservedTypes.indexOf(word) > -1) { - this.raise(startLoc, `Cannot overwrite reserved type ${word}`); - } - } - - flowParseRestrictedIdentifier(liberal) { - this.checkReservedType(this.state.value, this.state.start); - return this.parseIdentifier(liberal); - } - - flowParseTypeAlias(node) { - node.id = this.flowParseRestrictedIdentifier(); - this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.right = this.flowParseTypeInitialiser(types.eq); - this.semicolon(); - return this.finishNode(node, "TypeAlias"); - } - - flowParseOpaqueType(node, declare) { - this.expectContextual("type"); - node.id = this.flowParseRestrictedIdentifier(true); - this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.supertype = null; - - if (this.match(types.colon)) { - node.supertype = this.flowParseTypeInitialiser(types.colon); - } - - node.impltype = null; - - if (!declare) { - node.impltype = this.flowParseTypeInitialiser(types.eq); - } - - this.semicolon(); - return this.finishNode(node, "OpaqueType"); - } - - flowParseTypeParameter(requireDefault = false) { - const nodeStart = this.state.start; - const node = this.startNode(); - const variance = this.flowParseVariance(); - const ident = this.flowParseTypeAnnotatableIdentifier(); - node.name = ident.name; - node.variance = variance; - node.bound = ident.typeAnnotation; - - if (this.match(types.eq)) { - this.eat(types.eq); - node.default = this.flowParseType(); - } else { - if (requireDefault) { - this.unexpected(nodeStart, "Type parameter declaration needs a default, since a preceding type parameter declaration has a default."); - } - } - - return this.finishNode(node, "TypeParameter"); - } - - flowParseTypeParameterDeclaration() { - const oldInType = this.state.inType; - const node = this.startNode(); - node.params = []; - this.state.inType = true; - - if (this.isRelational("<") || this.match(types.jsxTagStart)) { - this.next(); - } else { - this.unexpected(); - } - - let defaultRequired = false; - - do { - const typeParameter = this.flowParseTypeParameter(defaultRequired); - node.params.push(typeParameter); - - if (typeParameter.default) { - defaultRequired = true; - } - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } while (!this.isRelational(">")); - - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterDeclaration"); - } - - flowParseTypeParameterInstantiation() { - const node = this.startNode(); - const oldInType = this.state.inType; - node.params = []; - this.state.inType = true; - this.expectRelational("<"); - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = false; - - while (!this.isRelational(">")) { - node.params.push(this.flowParseType()); - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } - - this.state.noAnonFunctionType = oldNoAnonFunctionType; - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterInstantiation"); - } - - flowParseTypeParameterInstantiationCallOrNew() { - const node = this.startNode(); - const oldInType = this.state.inType; - node.params = []; - this.state.inType = true; - this.expectRelational("<"); - - while (!this.isRelational(">")) { - node.params.push(this.flowParseTypeOrImplicitInstantiation()); - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } - - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterInstantiation"); - } - - flowParseInterfaceType() { - const node = this.startNode(); - this.expectContextual("interface"); - node.extends = []; - - if (this.eat(types._extends)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - node.body = this.flowParseObjectType({ - allowStatic: false, - allowExact: false, - allowSpread: false, - allowProto: false, - allowInexact: false - }); - return this.finishNode(node, "InterfaceTypeAnnotation"); - } - - flowParseObjectPropertyKey() { - return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true); - } - - flowParseObjectTypeIndexer(node, isStatic, variance) { - node.static = isStatic; - - if (this.lookahead().type === types.colon) { - node.id = this.flowParseObjectPropertyKey(); - node.key = this.flowParseTypeInitialiser(); - } else { - node.id = null; - node.key = this.flowParseType(); - } - - this.expect(types.bracketR); - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - return this.finishNode(node, "ObjectTypeIndexer"); - } - - flowParseObjectTypeInternalSlot(node, isStatic) { - node.static = isStatic; - node.id = this.flowParseObjectPropertyKey(); - this.expect(types.bracketR); - this.expect(types.bracketR); - - if (this.isRelational("<") || this.match(types.parenL)) { - node.method = true; - node.optional = false; - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); - } else { - node.method = false; - - if (this.eat(types.question)) { - node.optional = true; - } - - node.value = this.flowParseTypeInitialiser(); - } - - return this.finishNode(node, "ObjectTypeInternalSlot"); - } - - flowParseObjectTypeMethodish(node) { - node.params = []; - node.rest = null; - node.typeParameters = null; - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - this.expect(types.parenL); - - while (!this.match(types.parenR) && !this.match(types.ellipsis)) { - node.params.push(this.flowParseFunctionTypeParam()); - - if (!this.match(types.parenR)) { - this.expect(types.comma); - } - } - - if (this.eat(types.ellipsis)) { - node.rest = this.flowParseFunctionTypeParam(); - } - - this.expect(types.parenR); - node.returnType = this.flowParseTypeInitialiser(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - flowParseObjectTypeCallProperty(node, isStatic) { - const valueNode = this.startNode(); - node.static = isStatic; - node.value = this.flowParseObjectTypeMethodish(valueNode); - return this.finishNode(node, "ObjectTypeCallProperty"); - } - - flowParseObjectType({ - allowStatic, - allowExact, - allowSpread, - allowProto, - allowInexact - }) { - const oldInType = this.state.inType; - this.state.inType = true; - const nodeStart = this.startNode(); - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; - nodeStart.internalSlots = []; - let endDelim; - let exact; - let inexact = false; - - if (allowExact && this.match(types.braceBarL)) { - this.expect(types.braceBarL); - endDelim = types.braceBarR; - exact = true; - } else { - this.expect(types.braceL); - endDelim = types.braceR; - exact = false; - } - - nodeStart.exact = exact; - - while (!this.match(endDelim)) { - let isStatic = false; - let protoStart = null; - const node = this.startNode(); - - if (allowProto && this.isContextual("proto")) { - const lookahead = this.lookahead(); - - if (lookahead.type !== types.colon && lookahead.type !== types.question) { - this.next(); - protoStart = this.state.start; - allowStatic = false; - } - } - - if (allowStatic && this.isContextual("static")) { - const lookahead = this.lookahead(); - - if (lookahead.type !== types.colon && lookahead.type !== types.question) { - this.next(); - isStatic = true; - } - } - - const variance = this.flowParseVariance(); - - if (this.eat(types.bracketL)) { - if (protoStart != null) { - this.unexpected(protoStart); - } - - if (this.eat(types.bracketL)) { - if (variance) { - this.unexpected(variance.start); - } - - nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); - } else { - nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); - } - } else if (this.match(types.parenL) || this.isRelational("<")) { - if (protoStart != null) { - this.unexpected(protoStart); - } - - if (variance) { - this.unexpected(variance.start); - } - - nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); - } else { - let kind = "init"; - - if (this.isContextual("get") || this.isContextual("set")) { - const lookahead = this.lookahead(); - - if (lookahead.type === types.name || lookahead.type === types.string || lookahead.type === types.num) { - kind = this.state.value; - this.next(); - } - } - - const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact); - - if (propOrInexact === null) { - inexact = true; - } else { - nodeStart.properties.push(propOrInexact); - } - } - - this.flowObjectTypeSemicolon(); - } - - this.expect(endDelim); - - if (allowSpread) { - nodeStart.inexact = inexact; - } - - const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); - this.state.inType = oldInType; - return out; - } - - flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) { - if (this.match(types.ellipsis)) { - if (!allowSpread) { - this.unexpected(null, "Spread operator cannot appear in class or interface definitions"); - } - - if (protoStart != null) { - this.unexpected(protoStart); - } - - if (variance) { - this.unexpected(variance.start, "Spread properties cannot have variance"); - } - - this.expect(types.ellipsis); - const isInexactToken = this.eat(types.comma) || this.eat(types.semi); - - if (this.match(types.braceR)) { - if (allowInexact) return null; - this.unexpected(null, "Explicit inexact syntax is only allowed inside inexact objects"); - } - - if (this.match(types.braceBarR)) { - this.unexpected(null, "Explicit inexact syntax cannot appear inside an explicit exact object type"); - } - - if (isInexactToken) { - this.unexpected(null, "Explicit inexact syntax must appear at the end of an inexact object"); - } - - node.argument = this.flowParseType(); - return this.finishNode(node, "ObjectTypeSpreadProperty"); - } else { - node.key = this.flowParseObjectPropertyKey(); - node.static = isStatic; - node.proto = protoStart != null; - node.kind = kind; - let optional = false; - - if (this.isRelational("<") || this.match(types.parenL)) { - node.method = true; - - if (protoStart != null) { - this.unexpected(protoStart); - } - - if (variance) { - this.unexpected(variance.start); - } - - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); - - if (kind === "get" || kind === "set") { - this.flowCheckGetterSetterParams(node); - } - } else { - if (kind !== "init") this.unexpected(); - node.method = false; - - if (this.eat(types.question)) { - optional = true; - } - - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - } - - node.optional = optional; - return this.finishNode(node, "ObjectTypeProperty"); - } - } - - flowCheckGetterSetterParams(property) { - const paramCount = property.kind === "get" ? 0 : 1; - const start = property.start; - const length = property.value.params.length + (property.value.rest ? 1 : 0); - - if (length !== paramCount) { - if (property.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (property.kind === "set" && property.value.rest) { - this.raise(start, "setter function argument must not be a rest parameter"); - } - } - - flowObjectTypeSemicolon() { - if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) { - this.unexpected(); - } - } - - flowParseQualifiedTypeIdentifier(startPos, startLoc, id) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; - let node = id || this.parseIdentifier(); - - while (this.eat(types.dot)) { - const node2 = this.startNodeAt(startPos, startLoc); - node2.qualification = node; - node2.id = this.parseIdentifier(); - node = this.finishNode(node2, "QualifiedTypeIdentifier"); - } - - return node; - } - - flowParseGenericType(startPos, startLoc, id) { - const node = this.startNodeAt(startPos, startLoc); - node.typeParameters = null; - node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } - - return this.finishNode(node, "GenericTypeAnnotation"); - } - - flowParseTypeofType() { - const node = this.startNode(); - this.expect(types._typeof); - node.argument = this.flowParsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); - } - - flowParseTupleType() { - const node = this.startNode(); - node.types = []; - this.expect(types.bracketL); - - while (this.state.pos < this.length && !this.match(types.bracketR)) { - node.types.push(this.flowParseType()); - if (this.match(types.bracketR)) break; - this.expect(types.comma); - } - - this.expect(types.bracketR); - return this.finishNode(node, "TupleTypeAnnotation"); - } - - flowParseFunctionTypeParam() { - let name = null; - let optional = false; - let typeAnnotation = null; - const node = this.startNode(); - const lh = this.lookahead(); - - if (lh.type === types.colon || lh.type === types.question) { - name = this.parseIdentifier(); - - if (this.eat(types.question)) { - optional = true; - } - - typeAnnotation = this.flowParseTypeInitialiser(); - } else { - typeAnnotation = this.flowParseType(); - } - - node.name = name; - node.optional = optional; - node.typeAnnotation = typeAnnotation; - return this.finishNode(node, "FunctionTypeParam"); - } - - reinterpretTypeAsFunctionTypeParam(type) { - const node = this.startNodeAt(type.start, type.loc.start); - node.name = null; - node.optional = false; - node.typeAnnotation = type; - return this.finishNode(node, "FunctionTypeParam"); - } - - flowParseFunctionTypeParams(params = []) { - let rest = null; - - while (!this.match(types.parenR) && !this.match(types.ellipsis)) { - params.push(this.flowParseFunctionTypeParam()); - - if (!this.match(types.parenR)) { - this.expect(types.comma); - } - } - - if (this.eat(types.ellipsis)) { - rest = this.flowParseFunctionTypeParam(); - } - - return { - params, - rest - }; - } - - flowIdentToTypeAnnotation(startPos, startLoc, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); - - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); - - case "mixed": - return this.finishNode(node, "MixedTypeAnnotation"); - - case "empty": - return this.finishNode(node, "EmptyTypeAnnotation"); - - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); - - case "string": - return this.finishNode(node, "StringTypeAnnotation"); - - default: - this.checkNotUnderscore(id.name); - return this.flowParseGenericType(startPos, startLoc, id); - } - } - - flowParsePrimaryType() { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const node = this.startNode(); - let tmp; - let type; - let isGroupedType = false; - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - - switch (this.state.type) { - case types.name: - if (this.isContextual("interface")) { - return this.flowParseInterfaceType(); - } - - return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier()); - - case types.braceL: - return this.flowParseObjectType({ - allowStatic: false, - allowExact: false, - allowSpread: true, - allowProto: false, - allowInexact: true - }); - - case types.braceBarL: - return this.flowParseObjectType({ - allowStatic: false, - allowExact: true, - allowSpread: true, - allowProto: false, - allowInexact: false - }); - - case types.bracketL: - this.state.noAnonFunctionType = false; - type = this.flowParseTupleType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - return type; - - case types.relational: - if (this.state.value === "<") { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - this.expect(types.parenL); - tmp = this.flowParseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(types.parenR); - this.expect(types.arrow); - node.returnType = this.flowParseType(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - break; - - case types.parenL: - this.next(); - - if (!this.match(types.parenR) && !this.match(types.ellipsis)) { - if (this.match(types.name)) { - const token = this.lookahead().type; - isGroupedType = token !== types.question && token !== types.colon; - } else { - isGroupedType = true; - } - } - - if (isGroupedType) { - this.state.noAnonFunctionType = false; - type = this.flowParseType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - - if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) { - this.expect(types.parenR); - return type; - } else { - this.eat(types.comma); - } - } - - if (type) { - tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); - } else { - tmp = this.flowParseFunctionTypeParams(); - } - - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(types.parenR); - this.expect(types.arrow); - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - - case types.string: - return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); - - case types._true: - case types._false: - node.value = this.match(types._true); - this.next(); - return this.finishNode(node, "BooleanLiteralTypeAnnotation"); - - case types.plusMin: - if (this.state.value === "-") { - this.next(); - - if (this.match(types.num)) { - return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start); - } - - if (this.match(types.bigint)) { - return this.parseLiteral(-this.state.value, "BigIntLiteralTypeAnnotation", node.start, node.loc.start); - } - - this.unexpected(null, `Unexpected token, expected "number" or "bigint"`); - } - - this.unexpected(); - - case types.num: - return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); - - case types.bigint: - return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); - - case types._void: - this.next(); - return this.finishNode(node, "VoidTypeAnnotation"); - - case types._null: - this.next(); - return this.finishNode(node, "NullLiteralTypeAnnotation"); - - case types._this: - this.next(); - return this.finishNode(node, "ThisTypeAnnotation"); - - case types.star: - this.next(); - return this.finishNode(node, "ExistsTypeAnnotation"); - - default: - if (this.state.type.keyword === "typeof") { - return this.flowParseTypeofType(); - } else if (this.state.type.keyword) { - const label = this.state.type.label; - this.next(); - return super.createIdentifier(node, label); - } - - } - - throw this.unexpected(); - } - - flowParsePostfixType() { - const startPos = this.state.start, - startLoc = this.state.startLoc; - let type = this.flowParsePrimaryType(); - - while (this.match(types.bracketL) && !this.canInsertSemicolon()) { - const node = this.startNodeAt(startPos, startLoc); - node.elementType = type; - this.expect(types.bracketL); - this.expect(types.bracketR); - type = this.finishNode(node, "ArrayTypeAnnotation"); - } - - return type; - } - - flowParsePrefixType() { - const node = this.startNode(); - - if (this.eat(types.question)) { - node.typeAnnotation = this.flowParsePrefixType(); - return this.finishNode(node, "NullableTypeAnnotation"); - } else { - return this.flowParsePostfixType(); - } - } - - flowParseAnonFunctionWithoutParens() { - const param = this.flowParsePrefixType(); - - if (!this.state.noAnonFunctionType && this.eat(types.arrow)) { - const node = this.startNodeAt(param.start, param.loc.start); - node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; - node.rest = null; - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - return param; - } - - flowParseIntersectionType() { - const node = this.startNode(); - this.eat(types.bitwiseAND); - const type = this.flowParseAnonFunctionWithoutParens(); - node.types = [type]; - - while (this.eat(types.bitwiseAND)) { - node.types.push(this.flowParseAnonFunctionWithoutParens()); - } - - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); - } - - flowParseUnionType() { - const node = this.startNode(); - this.eat(types.bitwiseOR); - const type = this.flowParseIntersectionType(); - node.types = [type]; - - while (this.eat(types.bitwiseOR)) { - node.types.push(this.flowParseIntersectionType()); - } - - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); - } - - flowParseType() { - const oldInType = this.state.inType; - this.state.inType = true; - const type = this.flowParseUnionType(); - this.state.inType = oldInType; - this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType; - return type; - } - - flowParseTypeOrImplicitInstantiation() { - if (this.state.type === types.name && this.state.value === "_") { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const node = this.parseIdentifier(); - return this.flowParseGenericType(startPos, startLoc, node); - } else { - return this.flowParseType(); - } - } - - flowParseTypeAnnotation() { - const node = this.startNode(); - node.typeAnnotation = this.flowParseTypeInitialiser(); - return this.finishNode(node, "TypeAnnotation"); - } - - flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { - const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); - - if (this.match(types.colon)) { - ident.typeAnnotation = this.flowParseTypeAnnotation(); - this.resetEndLocation(ident); - } - - return ident; - } - - typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end); - return node.expression; - } - - flowParseVariance() { - let variance = null; - - if (this.match(types.plusMin)) { - variance = this.startNode(); - - if (this.state.value === "+") { - variance.kind = "plus"; - } else { - variance.kind = "minus"; - } - - this.next(); - this.finishNode(variance, "Variance"); - } - - return variance; - } - - parseFunctionBody(node, allowExpressionBody, isMethod = false) { - if (allowExpressionBody) { - return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); - } - - return super.parseFunctionBody(node, false, isMethod); - } - - parseFunctionBodyAndFinish(node, type, isMethod = false) { - if (this.match(types.colon)) { - const typeNode = this.startNode(); - [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } - - super.parseFunctionBodyAndFinish(node, type, isMethod); - } - - parseStatement(context, topLevel) { - if (this.state.strict && this.match(types.name) && this.state.value === "interface") { - const node = this.startNode(); - this.next(); - return this.flowParseInterface(node); - } else { - const stmt = super.parseStatement(context, topLevel); - - if (this.flowPragma === undefined && !this.isValidDirective(stmt)) { - this.flowPragma = null; - } - - return stmt; - } - } - - parseExpressionStatement(node, expr) { - if (expr.type === "Identifier") { - if (expr.name === "declare") { - if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) { - return this.flowParseDeclare(node); - } - } else if (this.match(types.name)) { - if (expr.name === "interface") { - return this.flowParseInterface(node); - } else if (expr.name === "type") { - return this.flowParseTypeAlias(node); - } else if (expr.name === "opaque") { - return this.flowParseOpaqueType(node, false); - } - } - } - - return super.parseExpressionStatement(node, expr); - } - - shouldParseExportDeclaration() { - return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || super.shouldParseExportDeclaration(); - } - - isExportDefaultSpecifier() { - if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque")) { - return false; - } - - return super.isExportDefaultSpecifier(); - } - - parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (!this.match(types.question)) return expr; - - if (refNeedsArrowPos) { - const state = this.state.clone(); - - try { - return super.parseConditional(expr, noIn, startPos, startLoc); - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - refNeedsArrowPos.start = err.pos || this.state.start; - return expr; - } else { - throw err; - } - } - } - - this.expect(types.question); - const state = this.state.clone(); - const originalNoArrowAt = this.state.noArrowAt; - const node = this.startNodeAt(startPos, startLoc); - let { - consequent, - failed - } = this.tryParseConditionalConsequent(); - let [valid, invalid] = this.getArrowLikeExpressions(consequent); - - if (failed || invalid.length > 0) { - const noArrowAt = [...originalNoArrowAt]; - - if (invalid.length > 0) { - this.state = state; - this.state.noArrowAt = noArrowAt; - - for (let i = 0; i < invalid.length; i++) { - noArrowAt.push(invalid[i].start); - } - - ({ - consequent, - failed - } = this.tryParseConditionalConsequent()); - [valid, invalid] = this.getArrowLikeExpressions(consequent); - } - - if (failed && valid.length > 1) { - this.raise(state.start, "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."); - } - - if (failed && valid.length === 1) { - this.state = state; - this.state.noArrowAt = noArrowAt.concat(valid[0].start); - ({ - consequent, - failed - } = this.tryParseConditionalConsequent()); - } - - this.getArrowLikeExpressions(consequent, true); - } - - this.state.noArrowAt = originalNoArrowAt; - this.expect(types.colon); - node.test = expr; - node.consequent = consequent; - node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(noIn, undefined, undefined, undefined)); - return this.finishNode(node, "ConditionalExpression"); - } - - tryParseConditionalConsequent() { - this.state.noArrowParamsConversionAt.push(this.state.start); - const consequent = this.parseMaybeAssign(); - const failed = !this.match(types.colon); - this.state.noArrowParamsConversionAt.pop(); - return { - consequent, - failed - }; - } - - getArrowLikeExpressions(node, disallowInvalid) { - const stack = [node]; - const arrows = []; - - while (stack.length !== 0) { - const node = stack.pop(); - - if (node.type === "ArrowFunctionExpression") { - if (node.typeParameters || !node.returnType) { - this.toAssignableList(node.params, true, "arrow function parameters"); - this.scope.enter(functionFlags(false, false) | SCOPE_ARROW); - super.checkParams(node, false, true); - this.scope.exit(); - } else { - arrows.push(node); - } - - stack.push(node.body); - } else if (node.type === "ConditionalExpression") { - stack.push(node.consequent); - stack.push(node.alternate); - } - } - - if (disallowInvalid) { - for (let i = 0; i < arrows.length; i++) { - this.toAssignableList(node.params, true, "arrow function parameters"); - } - - return [arrows, []]; - } - - return partition(arrows, node => { - try { - this.toAssignableList(node.params, true, "arrow function parameters"); - return true; - } catch (err) { - return false; - } - }); - } - - forwardNoArrowParamsConversionAt(node, parse) { - let result; - - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - this.state.noArrowParamsConversionAt.push(this.state.start); - result = parse(); - this.state.noArrowParamsConversionAt.pop(); - } else { - result = parse(); - } - - return result; - } - - parseParenItem(node, startPos, startLoc) { - node = super.parseParenItem(node, startPos, startLoc); - - if (this.eat(types.question)) { - node.optional = true; - this.resetEndLocation(node); - } - - if (this.match(types.colon)) { - const typeCastNode = this.startNodeAt(startPos, startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TypeCastExpression"); - } - - return node; - } - - assertModuleNodeAllowed(node) { - if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { - return; - } - - super.assertModuleNodeAllowed(node); - } - - parseExport(node) { - const decl = super.parseExport(node); - - if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") { - decl.exportKind = decl.exportKind || "value"; - } - - return decl; - } - - parseExportDeclaration(node) { - if (this.isContextual("type")) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - - if (this.match(types.braceL)) { - node.specifiers = this.parseExportSpecifiers(); - this.parseExportFrom(node); - return null; - } else { - return this.flowParseTypeAlias(declarationNode); - } - } else if (this.isContextual("opaque")) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - return this.flowParseOpaqueType(declarationNode, false); - } else if (this.isContextual("interface")) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - return this.flowParseInterface(declarationNode); - } else { - return super.parseExportDeclaration(node); - } - } - - eatExportStar(node) { - if (super.eatExportStar(...arguments)) return true; - - if (this.isContextual("type") && this.lookahead().type === types.star) { - node.exportKind = "type"; - this.next(); - this.next(); - return true; - } - - return false; - } - - maybeParseExportNamespaceSpecifier(node) { - const pos = this.state.start; - const hasNamespace = super.maybeParseExportNamespaceSpecifier(node); - - if (hasNamespace && node.exportKind === "type") { - this.unexpected(pos); - } - - return hasNamespace; - } - - parseClassId(node, isStatement, optionalId) { - super.parseClassId(node, isStatement, optionalId); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - } - - getTokenFromCode(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 123 && next === 124) { - return this.finishOp(types.braceBarL, 2); - } else if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(types.relational, 1); - } else if (isIteratorStart(code, next)) { - this.state.isIterator = true; - return super.readWord(); - } else { - return super.getTokenFromCode(code); - } - } - - toAssignable(node, isBinding, contextDescription) { - if (node.type === "TypeCastExpression") { - return super.toAssignable(this.typeCastToParameter(node), isBinding, contextDescription); - } else { - return super.toAssignable(node, isBinding, contextDescription); - } - } - - toAssignableList(exprList, isBinding, contextDescription) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - - if (expr && expr.type === "TypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - - return super.toAssignableList(exprList, isBinding, contextDescription); - } - - toReferencedList(exprList, isParenthesizedExpr) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - - if (expr && expr.type === "TypeCastExpression" && (!expr.extra || !expr.extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { - this.raise(expr.typeAnnotation.start, "The type cast expression is expected to be wrapped with parenthesis"); - } - } - - return exprList; - } - - checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { - if (expr.type !== "TypeCastExpression") { - return super.checkLVal(expr, bindingType, checkClashes, contextDescription); - } - } - - parseClassProperty(node) { - if (this.match(types.colon)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - - return super.parseClassProperty(node); - } - - parseClassPrivateProperty(node) { - if (this.match(types.colon)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - - return super.parseClassPrivateProperty(node); - } - - isClassMethod() { - return this.isRelational("<") || super.isClassMethod(); - } - - isClassProperty() { - return this.match(types.colon) || super.isClassProperty(); - } - - isNonstaticConstructor(method) { - return !this.match(types.colon) && super.isNonstaticConstructor(method); - } - - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - if (method.variance) { - this.unexpected(method.variance.start); - } - - delete method.variance; - - if (this.isRelational("<")) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); - } - - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - if (method.variance) { - this.unexpected(method.variance.start); - } - - delete method.variance; - - if (this.isRelational("<")) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); - } - - parseClassSuper(node) { - super.parseClassSuper(node); - - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.flowParseTypeParameterInstantiation(); - } - - if (this.isContextual("implements")) { - this.next(); - const implemented = node.implements = []; - - do { - const node = this.startNode(); - node.id = this.flowParseRestrictedIdentifier(true); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - - implemented.push(this.finishNode(node, "ClassImplements")); - } while (this.eat(types.comma)); - } - } - - parsePropertyName(node) { - const variance = this.flowParseVariance(); - const key = super.parsePropertyName(node); - node.variance = variance; - return key; - } - - parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { - if (prop.variance) { - this.unexpected(prop.variance.start); - } - - delete prop.variance; - let typeParameters; - - if (this.isRelational("<")) { - typeParameters = this.flowParseTypeParameterDeclaration(); - if (!this.match(types.parenL)) this.unexpected(); - } - - super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); - - if (typeParameters) { - (prop.value || prop).typeParameters = typeParameters; - } - } - - parseAssignableListItemTypes(param) { - if (this.eat(types.question)) { - if (param.type !== "Identifier") { - throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); - } - - param.optional = true; - } - - if (this.match(types.colon)) { - param.typeAnnotation = this.flowParseTypeAnnotation(); - } - - this.resetEndLocation(param); - return param; - } - - parseMaybeDefault(startPos, startLoc, left) { - const node = super.parseMaybeDefault(startPos, startLoc, left); - - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); - } - - return node; - } - - shouldParseDefaultImport(node) { - if (!hasTypeImportKind(node)) { - return super.shouldParseDefaultImport(node); - } - - return isMaybeDefaultImport(this.state); - } - - parseImportSpecifierLocal(node, specifier, type, contextDescription) { - specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier(); - this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription); - node.specifiers.push(this.finishNode(specifier, type)); - } - - maybeParseDefaultImportSpecifier(node) { - node.importKind = "value"; - let kind = null; - - if (this.match(types._typeof)) { - kind = "typeof"; - } else if (this.isContextual("type")) { - kind = "type"; - } - - if (kind) { - const lh = this.lookahead(); - - if (kind === "type" && lh.type === types.star) { - this.unexpected(lh.start); - } - - if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) { - this.next(); - node.importKind = kind; - } - } - - return super.maybeParseDefaultImportSpecifier(node); - } - - parseImportSpecifier(node) { - const specifier = this.startNode(); - const firstIdentLoc = this.state.start; - const firstIdent = this.parseIdentifier(true); - let specifierTypeKind = null; - - if (firstIdent.name === "type") { - specifierTypeKind = "type"; - } else if (firstIdent.name === "typeof") { - specifierTypeKind = "typeof"; - } - - let isBinding = false; - - if (this.isContextual("as") && !this.isLookaheadContextual("as")) { - const as_ident = this.parseIdentifier(true); - - if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) { - specifier.imported = as_ident; - specifier.importKind = specifierTypeKind; - specifier.local = as_ident.__clone(); - } else { - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = this.parseIdentifier(); - } - } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) { - specifier.imported = this.parseIdentifier(true); - specifier.importKind = specifierTypeKind; - - if (this.eatContextual("as")) { - specifier.local = this.parseIdentifier(); - } else { - isBinding = true; - specifier.local = specifier.imported.__clone(); - } - } else { - isBinding = true; - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = specifier.imported.__clone(); - } - - const nodeIsTypeImport = hasTypeImportKind(node); - const specifierIsTypeImport = hasTypeImportKind(specifier); - - if (nodeIsTypeImport && specifierIsTypeImport) { - this.raise(firstIdentLoc, "The `type` and `typeof` keywords on named imports can only be used on regular " + "`import` statements. It cannot be used with `import type` or `import typeof` statements"); - } - - if (nodeIsTypeImport || specifierIsTypeImport) { - this.checkReservedType(specifier.local.name, specifier.local.start); - } - - if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) { - this.checkReservedWord(specifier.local.name, specifier.start, true, true); - } - - this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier"); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - } - - parseFunctionParams(node, allowModifiers) { - const kind = node.kind; - - if (kind !== "get" && kind !== "set" && this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - super.parseFunctionParams(node, allowModifiers); - } - - parseVarId(decl, kind) { - super.parseVarId(decl, kind); - - if (this.match(types.colon)) { - decl.id.typeAnnotation = this.flowParseTypeAnnotation(); - this.resetEndLocation(decl.id); - } - } - - parseAsyncArrowFromCallExpression(node, call) { - if (this.match(types.colon)) { - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - node.returnType = this.flowParseTypeAnnotation(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - } - - return super.parseAsyncArrowFromCallExpression(node, call); - } - - shouldParseAsyncArrow() { - return this.match(types.colon) || super.shouldParseAsyncArrow(); - } - - parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { - let jsxError = null; - - if (this.hasPlugin("jsx") && (this.match(types.jsxTagStart) || this.isRelational("<"))) { - const state = this.state.clone(); - - try { - return super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - const cLength = this.state.context.length; - - if (this.state.context[cLength - 1] === types$1.j_oTag) { - this.state.context.length -= 2; - } - - jsxError = err; - } else { - throw err; - } - } - } - - if (jsxError != null || this.isRelational("<")) { - let arrowExpression; - let typeParameters; - - try { - typeParameters = this.flowParseTypeParameterDeclaration(); - arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos)); - arrowExpression.typeParameters = typeParameters; - this.resetStartLocationFromNode(arrowExpression, typeParameters); - } catch (err) { - throw jsxError || err; - } - - if (arrowExpression.type === "ArrowFunctionExpression") { - return arrowExpression; - } else if (jsxError != null) { - throw jsxError; - } else { - this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration"); - } - } - - return super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - } - - parseArrow(node) { - if (this.match(types.colon)) { - const state = this.state.clone(); - - try { - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - const typeNode = this.startNode(); - [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.canInsertSemicolon()) this.unexpected(); - if (!this.match(types.arrow)) this.unexpected(); - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - } else { - throw err; - } - } - } - - return super.parseArrow(node); - } - - shouldParseArrow() { - return this.match(types.colon) || super.shouldParseArrow(); - } - - setArrowFunctionParameters(node, params) { - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - node.params = params; - } else { - super.setArrowFunctionParameters(node, params); - } - } - - checkParams(node, allowDuplicates, isArrowFunction) { - if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - return; - } - - return super.checkParams(node, allowDuplicates, isArrowFunction); - } - - parseParenAndDistinguishExpression(canBeArrow) { - return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); - } - - parseSubscripts(base, startPos, startLoc, noCalls) { - if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) { - this.next(); - const node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - base = this.finishNode(node, "CallExpression"); - } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) { - const state = this.state.clone(); - let error; - - try { - const node = this.parseAsyncArrowWithTypeParameters(startPos, startLoc); - if (node) return node; - } catch (e) { - error = e; - } - - this.state = state; - - try { - return super.parseSubscripts(base, startPos, startLoc, noCalls); - } catch (e) { - throw error || e; - } - } - - return super.parseSubscripts(base, startPos, startLoc, noCalls); - } - - parseSubscript(base, startPos, startLoc, noCalls, subscriptState, maybeAsyncArrow) { - if (this.match(types.questionDot) && this.isLookaheadRelational("<")) { - this.expectPlugin("optionalChaining"); - subscriptState.optionalChainMember = true; - - if (noCalls) { - subscriptState.stop = true; - return base; - } - - this.next(); - const node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.typeArguments = this.flowParseTypeParameterInstantiation(); - this.expect(types.parenL); - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - node.optional = true; - return this.finishNode(node, "OptionalCallExpression"); - } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) { - const node = this.startNodeAt(startPos, startLoc); - node.callee = base; - const state = this.state.clone(); - - try { - node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); - this.expect(types.parenL); - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - - if (subscriptState.optionalChainMember) { - node.optional = false; - return this.finishNode(node, "OptionalCallExpression"); - } - - return this.finishNode(node, "CallExpression"); - } catch (e) { - if (e instanceof SyntaxError) { - this.state = state; - } else { - throw e; - } - } - } - - return super.parseSubscript(base, startPos, startLoc, noCalls, subscriptState, maybeAsyncArrow); - } - - parseNewArguments(node) { - let targs = null; - - if (this.shouldParseTypes() && this.isRelational("<")) { - const state = this.state.clone(); - - try { - targs = this.flowParseTypeParameterInstantiationCallOrNew(); - } catch (e) { - if (e instanceof SyntaxError) { - this.state = state; - } else { - throw e; - } - } - } - - node.typeArguments = targs; - super.parseNewArguments(node); - } - - parseAsyncArrowWithTypeParameters(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - this.parseFunctionParams(node); - if (!this.parseArrow(node)) return; - return this.parseArrowExpression(node, undefined, true); - } - - readToken_mult_modulo(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 42 && next === 47 && this.state.hasFlowComment) { - this.state.hasFlowComment = false; - this.state.pos += 2; - this.nextToken(); - return; - } - - super.readToken_mult_modulo(code); - } - - readToken_pipe_amp(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 124 && next === 125) { - this.finishOp(types.braceBarR, 2); - return; - } - - super.readToken_pipe_amp(code); - } - - parseTopLevel(file, program) { - const fileNode = super.parseTopLevel(file, program); - - if (this.state.hasFlowComment) { - this.unexpected(null, "Unterminated flow-comment"); - } - - return fileNode; - } - - skipBlockComment() { - if (this.hasPlugin("flowComments") && this.skipFlowComment()) { - if (this.state.hasFlowComment) { - this.unexpected(null, "Cannot have a flow comment inside another flow comment"); - } - - this.hasFlowCommentCompletion(); - this.state.pos += this.skipFlowComment(); - this.state.hasFlowComment = true; - return; - } - - if (this.state.hasFlowComment) { - const end = this.input.indexOf("*-/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - this.state.pos = end + 3; - return; - } - - super.skipBlockComment(); - } - - skipFlowComment() { - const { - pos - } = this.state; - let shiftToFirstNonWhiteSpace = 2; - - while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { - shiftToFirstNonWhiteSpace++; - } - - const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); - const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); - - if (ch2 === 58 && ch3 === 58) { - return shiftToFirstNonWhiteSpace + 2; - } - - if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { - return shiftToFirstNonWhiteSpace + 12; - } - - if (ch2 === 58 && ch3 !== 58) { - return shiftToFirstNonWhiteSpace; - } - - return false; - } - - hasFlowCommentCompletion() { - const end = this.input.indexOf("*/", this.state.pos); - - if (end === -1) { - this.raise(this.state.pos, "Unterminated comment"); - } - } - -}); - -const entities = { - quot: "\u0022", - amp: "&", - apos: "\u0027", - lt: "<", - gt: ">", - nbsp: "\u00A0", - iexcl: "\u00A1", - cent: "\u00A2", - pound: "\u00A3", - curren: "\u00A4", - yen: "\u00A5", - brvbar: "\u00A6", - sect: "\u00A7", - uml: "\u00A8", - copy: "\u00A9", - ordf: "\u00AA", - laquo: "\u00AB", - not: "\u00AC", - shy: "\u00AD", - reg: "\u00AE", - macr: "\u00AF", - deg: "\u00B0", - plusmn: "\u00B1", - sup2: "\u00B2", - sup3: "\u00B3", - acute: "\u00B4", - micro: "\u00B5", - para: "\u00B6", - middot: "\u00B7", - cedil: "\u00B8", - sup1: "\u00B9", - ordm: "\u00BA", - raquo: "\u00BB", - frac14: "\u00BC", - frac12: "\u00BD", - frac34: "\u00BE", - iquest: "\u00BF", - Agrave: "\u00C0", - Aacute: "\u00C1", - Acirc: "\u00C2", - Atilde: "\u00C3", - Auml: "\u00C4", - Aring: "\u00C5", - AElig: "\u00C6", - Ccedil: "\u00C7", - Egrave: "\u00C8", - Eacute: "\u00C9", - Ecirc: "\u00CA", - Euml: "\u00CB", - Igrave: "\u00CC", - Iacute: "\u00CD", - Icirc: "\u00CE", - Iuml: "\u00CF", - ETH: "\u00D0", - Ntilde: "\u00D1", - Ograve: "\u00D2", - Oacute: "\u00D3", - Ocirc: "\u00D4", - Otilde: "\u00D5", - Ouml: "\u00D6", - times: "\u00D7", - Oslash: "\u00D8", - Ugrave: "\u00D9", - Uacute: "\u00DA", - Ucirc: "\u00DB", - Uuml: "\u00DC", - Yacute: "\u00DD", - THORN: "\u00DE", - szlig: "\u00DF", - agrave: "\u00E0", - aacute: "\u00E1", - acirc: "\u00E2", - atilde: "\u00E3", - auml: "\u00E4", - aring: "\u00E5", - aelig: "\u00E6", - ccedil: "\u00E7", - egrave: "\u00E8", - eacute: "\u00E9", - ecirc: "\u00EA", - euml: "\u00EB", - igrave: "\u00EC", - iacute: "\u00ED", - icirc: "\u00EE", - iuml: "\u00EF", - eth: "\u00F0", - ntilde: "\u00F1", - ograve: "\u00F2", - oacute: "\u00F3", - ocirc: "\u00F4", - otilde: "\u00F5", - ouml: "\u00F6", - divide: "\u00F7", - oslash: "\u00F8", - ugrave: "\u00F9", - uacute: "\u00FA", - ucirc: "\u00FB", - uuml: "\u00FC", - yacute: "\u00FD", - thorn: "\u00FE", - yuml: "\u00FF", - OElig: "\u0152", - oelig: "\u0153", - Scaron: "\u0160", - scaron: "\u0161", - Yuml: "\u0178", - fnof: "\u0192", - circ: "\u02C6", - tilde: "\u02DC", - Alpha: "\u0391", - Beta: "\u0392", - Gamma: "\u0393", - Delta: "\u0394", - Epsilon: "\u0395", - Zeta: "\u0396", - Eta: "\u0397", - Theta: "\u0398", - Iota: "\u0399", - Kappa: "\u039A", - Lambda: "\u039B", - Mu: "\u039C", - Nu: "\u039D", - Xi: "\u039E", - Omicron: "\u039F", - Pi: "\u03A0", - Rho: "\u03A1", - Sigma: "\u03A3", - Tau: "\u03A4", - Upsilon: "\u03A5", - Phi: "\u03A6", - Chi: "\u03A7", - Psi: "\u03A8", - Omega: "\u03A9", - alpha: "\u03B1", - beta: "\u03B2", - gamma: "\u03B3", - delta: "\u03B4", - epsilon: "\u03B5", - zeta: "\u03B6", - eta: "\u03B7", - theta: "\u03B8", - iota: "\u03B9", - kappa: "\u03BA", - lambda: "\u03BB", - mu: "\u03BC", - nu: "\u03BD", - xi: "\u03BE", - omicron: "\u03BF", - pi: "\u03C0", - rho: "\u03C1", - sigmaf: "\u03C2", - sigma: "\u03C3", - tau: "\u03C4", - upsilon: "\u03C5", - phi: "\u03C6", - chi: "\u03C7", - psi: "\u03C8", - omega: "\u03C9", - thetasym: "\u03D1", - upsih: "\u03D2", - piv: "\u03D6", - ensp: "\u2002", - emsp: "\u2003", - thinsp: "\u2009", - zwnj: "\u200C", - zwj: "\u200D", - lrm: "\u200E", - rlm: "\u200F", - ndash: "\u2013", - mdash: "\u2014", - lsquo: "\u2018", - rsquo: "\u2019", - sbquo: "\u201A", - ldquo: "\u201C", - rdquo: "\u201D", - bdquo: "\u201E", - dagger: "\u2020", - Dagger: "\u2021", - bull: "\u2022", - hellip: "\u2026", - permil: "\u2030", - prime: "\u2032", - Prime: "\u2033", - lsaquo: "\u2039", - rsaquo: "\u203A", - oline: "\u203E", - frasl: "\u2044", - euro: "\u20AC", - image: "\u2111", - weierp: "\u2118", - real: "\u211C", - trade: "\u2122", - alefsym: "\u2135", - larr: "\u2190", - uarr: "\u2191", - rarr: "\u2192", - darr: "\u2193", - harr: "\u2194", - crarr: "\u21B5", - lArr: "\u21D0", - uArr: "\u21D1", - rArr: "\u21D2", - dArr: "\u21D3", - hArr: "\u21D4", - forall: "\u2200", - part: "\u2202", - exist: "\u2203", - empty: "\u2205", - nabla: "\u2207", - isin: "\u2208", - notin: "\u2209", - ni: "\u220B", - prod: "\u220F", - sum: "\u2211", - minus: "\u2212", - lowast: "\u2217", - radic: "\u221A", - prop: "\u221D", - infin: "\u221E", - ang: "\u2220", - and: "\u2227", - or: "\u2228", - cap: "\u2229", - cup: "\u222A", - int: "\u222B", - there4: "\u2234", - sim: "\u223C", - cong: "\u2245", - asymp: "\u2248", - ne: "\u2260", - equiv: "\u2261", - le: "\u2264", - ge: "\u2265", - sub: "\u2282", - sup: "\u2283", - nsub: "\u2284", - sube: "\u2286", - supe: "\u2287", - oplus: "\u2295", - otimes: "\u2297", - perp: "\u22A5", - sdot: "\u22C5", - lceil: "\u2308", - rceil: "\u2309", - lfloor: "\u230A", - rfloor: "\u230B", - lang: "\u2329", - rang: "\u232A", - loz: "\u25CA", - spades: "\u2660", - clubs: "\u2663", - hearts: "\u2665", - diams: "\u2666" -}; - -const HEX_NUMBER = /^[\da-fA-F]+$/; -const DECIMAL_NUMBER = /^\d+$/; -types$1.j_oTag = new TokContext("...", true, true); -types.jsxName = new TokenType("jsxName"); -types.jsxText = new TokenType("jsxText", { - beforeExpr: true -}); -types.jsxTagStart = new TokenType("jsxTagStart", { - startsExpr: true -}); -types.jsxTagEnd = new TokenType("jsxTagEnd"); - -types.jsxTagStart.updateContext = function () { - this.state.context.push(types$1.j_expr); - this.state.context.push(types$1.j_oTag); - this.state.exprAllowed = false; -}; - -types.jsxTagEnd.updateContext = function (prevType) { - const out = this.state.context.pop(); - - if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) { - this.state.context.pop(); - this.state.exprAllowed = this.curContext() === types$1.j_expr; - } else { - this.state.exprAllowed = true; - } -}; - -function isFragment(object) { - return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; -} - -function getQualifiedJSXName(object) { - if (object.type === "JSXIdentifier") { - return object.name; - } - - if (object.type === "JSXNamespacedName") { - return object.namespace.name + ":" + object.name.name; - } - - if (object.type === "JSXMemberExpression") { - return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); - } - - throw new Error("Node had unexpected type: " + object.type); -} - -var jsx = (superClass => class extends superClass { - jsxReadToken() { - let out = ""; - let chunkStart = this.state.pos; - - for (;;) { - if (this.state.pos >= this.length) { - this.raise(this.state.start, "Unterminated JSX contents"); - } - - const ch = this.input.charCodeAt(this.state.pos); - - switch (ch) { - case 60: - case 123: - if (this.state.pos === this.state.start) { - if (ch === 60 && this.state.exprAllowed) { - ++this.state.pos; - return this.finishToken(types.jsxTagStart); - } - - return super.getTokenFromCode(ch); - } - - out += this.input.slice(chunkStart, this.state.pos); - return this.finishToken(types.jsxText, out); - - case 38: - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - break; - - default: - if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(true); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - - } - } - } - - jsxReadNewLine(normalizeCRLF) { - const ch = this.input.charCodeAt(this.state.pos); - let out; - ++this.state.pos; - - if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - out = normalizeCRLF ? "\n" : "\r\n"; - } else { - out = String.fromCharCode(ch); - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - return out; - } - - jsxReadString(quote) { - let out = ""; - let chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.length) { - this.raise(this.state.start, "Unterminated string constant"); - } - - const ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 38) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(false); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - return this.finishToken(types.string, out); - } - - jsxReadEntity() { - let str = ""; - let count = 0; - let entity; - let ch = this.input[this.state.pos]; - const startPos = ++this.state.pos; - - while (this.state.pos < this.length && count++ < 10) { - ch = this.input[this.state.pos++]; - - if (ch === ";") { - if (str[0] === "#") { - if (str[1] === "x") { - str = str.substr(2); - - if (HEX_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 16)); - } - } else { - str = str.substr(1); - - if (DECIMAL_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 10)); - } - } - } else { - entity = entities[str]; - } - - break; - } - - str += ch; - } - - if (!entity) { - this.state.pos = startPos; - return "&"; - } - - return entity; - } - - jsxReadWord() { - let ch; - const start = this.state.pos; - - do { - ch = this.input.charCodeAt(++this.state.pos); - } while (isIdentifierChar(ch) || ch === 45); - - return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos)); - } - - jsxParseIdentifier() { - const node = this.startNode(); - - if (this.match(types.jsxName)) { - node.name = this.state.value; - } else if (this.state.type.keyword) { - node.name = this.state.type.keyword; - } else { - this.unexpected(); - } - - this.next(); - return this.finishNode(node, "JSXIdentifier"); - } - - jsxParseNamespacedName() { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const name = this.jsxParseIdentifier(); - if (!this.eat(types.colon)) return name; - const node = this.startNodeAt(startPos, startLoc); - node.namespace = name; - node.name = this.jsxParseIdentifier(); - return this.finishNode(node, "JSXNamespacedName"); - } - - jsxParseElementName() { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - let node = this.jsxParseNamespacedName(); - - while (this.eat(types.dot)) { - const newNode = this.startNodeAt(startPos, startLoc); - newNode.object = node; - newNode.property = this.jsxParseIdentifier(); - node = this.finishNode(newNode, "JSXMemberExpression"); - } - - return node; - } - - jsxParseAttributeValue() { - let node; - - switch (this.state.type) { - case types.braceL: - node = this.startNode(); - this.next(); - node = this.jsxParseExpressionContainer(node); - - if (node.expression.type === "JSXEmptyExpression") { - throw this.raise(node.start, "JSX attributes must only be assigned a non-empty expression"); - } else { - return node; - } - - case types.jsxTagStart: - case types.string: - return this.parseExprAtom(); - - default: - throw this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text"); - } - } - - jsxParseEmptyExpression() { - const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc); - return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc); - } - - jsxParseSpreadChild(node) { - this.next(); - node.expression = this.parseExpression(); - this.expect(types.braceR); - return this.finishNode(node, "JSXSpreadChild"); - } - - jsxParseExpressionContainer(node) { - if (this.match(types.braceR)) { - node.expression = this.jsxParseEmptyExpression(); - } else { - node.expression = this.parseExpression(); - } - - this.expect(types.braceR); - return this.finishNode(node, "JSXExpressionContainer"); - } - - jsxParseAttribute() { - const node = this.startNode(); - - if (this.eat(types.braceL)) { - this.expect(types.ellipsis); - node.argument = this.parseMaybeAssign(); - this.expect(types.braceR); - return this.finishNode(node, "JSXSpreadAttribute"); - } - - node.name = this.jsxParseNamespacedName(); - node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null; - return this.finishNode(node, "JSXAttribute"); - } - - jsxParseOpeningElementAt(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - - if (this.match(types.jsxTagEnd)) { - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXOpeningFragment"); - } - - node.name = this.jsxParseElementName(); - return this.jsxParseOpeningElementAfterName(node); - } - - jsxParseOpeningElementAfterName(node) { - const attributes = []; - - while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) { - attributes.push(this.jsxParseAttribute()); - } - - node.attributes = attributes; - node.selfClosing = this.eat(types.slash); - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXOpeningElement"); - } - - jsxParseClosingElementAt(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - - if (this.match(types.jsxTagEnd)) { - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXClosingFragment"); - } - - node.name = this.jsxParseElementName(); - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXClosingElement"); - } - - jsxParseElementAt(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - const children = []; - const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc); - let closingElement = null; - - if (!openingElement.selfClosing) { - contents: for (;;) { - switch (this.state.type) { - case types.jsxTagStart: - startPos = this.state.start; - startLoc = this.state.startLoc; - this.next(); - - if (this.eat(types.slash)) { - closingElement = this.jsxParseClosingElementAt(startPos, startLoc); - break contents; - } - - children.push(this.jsxParseElementAt(startPos, startLoc)); - break; - - case types.jsxText: - children.push(this.parseExprAtom()); - break; - - case types.braceL: - { - const node = this.startNode(); - this.next(); - - if (this.match(types.ellipsis)) { - children.push(this.jsxParseSpreadChild(node)); - } else { - children.push(this.jsxParseExpressionContainer(node)); - } - - break; - } - - default: - throw this.unexpected(); - } - } - - if (isFragment(openingElement) && !isFragment(closingElement)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <>"); - } else if (!isFragment(openingElement) && isFragment(closingElement)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); - } else if (!isFragment(openingElement) && !isFragment(closingElement)) { - if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); - } - } - } - - if (isFragment(openingElement)) { - node.openingFragment = openingElement; - node.closingFragment = closingElement; - } else { - node.openingElement = openingElement; - node.closingElement = closingElement; - } - - node.children = children; - - if (this.match(types.relational) && this.state.value === "<") { - this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag. " + "Did you want a JSX fragment <>...?"); - } - - return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); - } - - jsxParseElement() { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - this.next(); - return this.jsxParseElementAt(startPos, startLoc); - } - - parseExprAtom(refShortHandDefaultPos) { - if (this.match(types.jsxText)) { - return this.parseLiteral(this.state.value, "JSXText"); - } else if (this.match(types.jsxTagStart)) { - return this.jsxParseElement(); - } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) { - this.finishToken(types.jsxTagStart); - return this.jsxParseElement(); - } else { - return super.parseExprAtom(refShortHandDefaultPos); - } - } - - getTokenFromCode(code) { - if (this.state.inPropertyName) return super.getTokenFromCode(code); - const context = this.curContext(); - - if (context === types$1.j_expr) { - return this.jsxReadToken(); - } - - if (context === types$1.j_oTag || context === types$1.j_cTag) { - if (isIdentifierStart(code)) { - return this.jsxReadWord(); - } - - if (code === 62) { - ++this.state.pos; - return this.finishToken(types.jsxTagEnd); - } - - if ((code === 34 || code === 39) && context === types$1.j_oTag) { - return this.jsxReadString(code); - } - } - - if (code === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) { - ++this.state.pos; - return this.finishToken(types.jsxTagStart); - } - - return super.getTokenFromCode(code); - } - - updateContext(prevType) { - if (this.match(types.braceL)) { - const curContext = this.curContext(); - - if (curContext === types$1.j_oTag) { - this.state.context.push(types$1.braceExpression); - } else if (curContext === types$1.j_expr) { - this.state.context.push(types$1.templateQuasi); - } else { - super.updateContext(prevType); - } - - this.state.exprAllowed = true; - } else if (this.match(types.slash) && prevType === types.jsxTagStart) { - this.state.context.length -= 2; - this.state.context.push(types$1.j_cTag); - this.state.exprAllowed = false; - } else { - return super.updateContext(prevType); - } - } - -}); - -class Scope { - constructor(flags) { - this.var = []; - this.lexical = []; - this.functions = []; - this.flags = flags; - } - -} -class ScopeHandler { - constructor(raise, inModule) { - this.scopeStack = []; - this.undefinedExports = new Map(); - this.raise = raise; - this.inModule = inModule; - } - - get inFunction() { - return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0; - } - - get inGenerator() { - return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0; - } - - get inAsync() { - return (this.currentVarScope().flags & SCOPE_ASYNC) > 0; - } - - get allowSuper() { - return (this.currentThisScope().flags & SCOPE_SUPER) > 0; - } - - get allowDirectSuper() { - return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0; - } - - get inNonArrowFunction() { - return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0; - } - - get treatFunctionsAsVar() { - return this.treatFunctionsAsVarInScope(this.currentScope()); - } - - createScope(flags) { - return new Scope(flags); - } - - enter(flags) { - this.scopeStack.push(this.createScope(flags)); - } - - exit() { - this.scopeStack.pop(); - } - - treatFunctionsAsVarInScope(scope) { - return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM); - } - - declareName(name, bindingType, pos) { - let scope = this.currentScope(); - - if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) { - this.checkRedeclarationInScope(scope, name, bindingType, pos); - - if (bindingType & BIND_SCOPE_FUNCTION) { - scope.functions.push(name); - } else { - scope.lexical.push(name); - } - - if (bindingType & BIND_SCOPE_LEXICAL) { - this.maybeExportDefined(scope, name); - } - } else if (bindingType & BIND_SCOPE_VAR) { - for (let i = this.scopeStack.length - 1; i >= 0; --i) { - scope = this.scopeStack[i]; - this.checkRedeclarationInScope(scope, name, bindingType, pos); - scope.var.push(name); - this.maybeExportDefined(scope, name); - if (scope.flags & SCOPE_VAR) break; - } - } - - if (this.inModule && scope.flags & SCOPE_PROGRAM) { - this.undefinedExports.delete(name); - } - } - - maybeExportDefined(scope, name) { - if (this.inModule && scope.flags & SCOPE_PROGRAM) { - this.undefinedExports.delete(name); - } - } - - checkRedeclarationInScope(scope, name, bindingType, pos) { - if (this.isRedeclaredInScope(scope, name, bindingType)) { - this.raise(pos, `Identifier '${name}' has already been declared`); - } - } - - isRedeclaredInScope(scope, name, bindingType) { - if (!(bindingType & BIND_KIND_VALUE)) return false; - - if (bindingType & BIND_SCOPE_LEXICAL) { - return scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; - } - - if (bindingType & BIND_SCOPE_FUNCTION) { - return scope.lexical.indexOf(name) > -1 || !this.treatFunctionsAsVarInScope(scope) && scope.var.indexOf(name) > -1; - } - - return scope.lexical.indexOf(name) > -1 && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name) > -1; - } - - checkLocalExport(id) { - if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1 && this.scopeStack[0].functions.indexOf(id.name) === -1) { - this.undefinedExports.set(id.name, id.start); - } - } - - currentScope() { - return this.scopeStack[this.scopeStack.length - 1]; - } - - currentVarScope() { - for (let i = this.scopeStack.length - 1;; i--) { - const scope = this.scopeStack[i]; - - if (scope.flags & SCOPE_VAR) { - return scope; - } - } - } - - currentThisScope() { - for (let i = this.scopeStack.length - 1;; i--) { - const scope = this.scopeStack[i]; - - if ((scope.flags & SCOPE_VAR || scope.flags & SCOPE_CLASS) && !(scope.flags & SCOPE_ARROW)) { - return scope; - } - } - } - -} - -class TypeScriptScope extends Scope { - constructor(...args) { - super(...args); - this.types = []; - this.enums = []; - this.constEnums = []; - this.classes = []; - this.exportOnlyBindings = []; - } - -} - -class TypeScriptScopeHandler extends ScopeHandler { - createScope(flags) { - return new TypeScriptScope(flags); - } - - declareName(name, bindingType, pos) { - const scope = this.currentScope(); - - if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) { - this.maybeExportDefined(scope, name); - scope.exportOnlyBindings.push(name); - return; - } - - super.declareName(...arguments); - - if (bindingType & BIND_KIND_TYPE) { - if (!(bindingType & BIND_KIND_VALUE)) { - this.checkRedeclarationInScope(scope, name, bindingType, pos); - this.maybeExportDefined(scope, name); - } - - scope.types.push(name); - } - - if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.push(name); - if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.push(name); - if (bindingType & BIND_FLAGS_CLASS) scope.classes.push(name); - } - - isRedeclaredInScope(scope, name, bindingType) { - if (scope.enums.indexOf(name) > -1) { - if (bindingType & BIND_FLAGS_TS_ENUM) { - const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM); - const wasConst = scope.constEnums.indexOf(name) > -1; - return isConst !== wasConst; - } - - return true; - } - - if (bindingType & BIND_FLAGS_CLASS && scope.classes.indexOf(name) > -1) { - if (scope.lexical.indexOf(name) > -1) { - return !!(bindingType & BIND_KIND_VALUE); - } else { - return false; - } - } - - if (bindingType & BIND_KIND_TYPE && scope.types.indexOf(name) > -1) { - return true; - } - - return super.isRedeclaredInScope(...arguments); - } - - checkLocalExport(id) { - if (this.scopeStack[0].types.indexOf(id.name) === -1 && this.scopeStack[0].exportOnlyBindings.indexOf(id.name) === -1) { - super.checkLocalExport(id); - } - } - -} - -function nonNull(x) { - if (x == null) { - throw new Error(`Unexpected ${x} value.`); - } - - return x; -} - -function assert(x) { - if (!x) { - throw new Error("Assert fail"); - } -} - -function keywordTypeFromName(value) { - switch (value) { - case "any": - return "TSAnyKeyword"; - - case "boolean": - return "TSBooleanKeyword"; - - case "bigint": - return "TSBigIntKeyword"; - - case "never": - return "TSNeverKeyword"; - - case "number": - return "TSNumberKeyword"; - - case "object": - return "TSObjectKeyword"; - - case "string": - return "TSStringKeyword"; - - case "symbol": - return "TSSymbolKeyword"; - - case "undefined": - return "TSUndefinedKeyword"; - - case "unknown": - return "TSUnknownKeyword"; - - default: - return undefined; - } -} - -var typescript = (superClass => class extends superClass { - getScopeHandler() { - return TypeScriptScopeHandler; - } - - tsIsIdentifier() { - return this.match(types.name); - } - - tsNextTokenCanFollowModifier() { - this.next(); - return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.parenR) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question) && !this.match(types.bang); - } - - tsParseModifier(allowedModifiers) { - if (!this.match(types.name)) { - return undefined; - } - - const modifier = this.state.value; - - if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { - return modifier; - } - - return undefined; - } - - tsIsListTerminator(kind) { - switch (kind) { - case "EnumMembers": - case "TypeMembers": - return this.match(types.braceR); - - case "HeritageClauseElement": - return this.match(types.braceL); - - case "TupleElementTypes": - return this.match(types.bracketR); - - case "TypeParametersOrArguments": - return this.isRelational(">"); - } - - throw new Error("Unreachable"); - } - - tsParseList(kind, parseElement) { - const result = []; - - while (!this.tsIsListTerminator(kind)) { - result.push(parseElement()); - } - - return result; - } - - tsParseDelimitedList(kind, parseElement) { - return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true)); - } - - tsParseDelimitedListWorker(kind, parseElement, expectSuccess) { - const result = []; - - while (true) { - if (this.tsIsListTerminator(kind)) { - break; - } - - const element = parseElement(); - - if (element == null) { - return undefined; - } - - result.push(element); - - if (this.eat(types.comma)) { - continue; - } - - if (this.tsIsListTerminator(kind)) { - break; - } - - if (expectSuccess) { - this.expect(types.comma); - } - - return undefined; - } - - return result; - } - - tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) { - if (!skipFirstToken) { - if (bracket) { - this.expect(types.bracketL); - } else { - this.expectRelational("<"); - } - } - - const result = this.tsParseDelimitedList(kind, parseElement); - - if (bracket) { - this.expect(types.bracketR); - } else { - this.expectRelational(">"); - } - - return result; - } - - tsParseImportType() { - const node = this.startNode(); - this.expect(types._import); - this.expect(types.parenL); - - if (!this.match(types.string)) { - throw this.unexpected(null, "Argument in a type import must be a string literal"); - } - - node.argument = this.parseExprAtom(); - this.expect(types.parenR); - - if (this.eat(types.dot)) { - node.qualifier = this.tsParseEntityName(true); - } - - if (this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSImportType"); - } - - tsParseEntityName(allowReservedWords) { - let entity = this.parseIdentifier(); - - while (this.eat(types.dot)) { - const node = this.startNodeAtNode(entity); - node.left = entity; - node.right = this.parseIdentifier(allowReservedWords); - entity = this.finishNode(node, "TSQualifiedName"); - } - - return entity; - } - - tsParseTypeReference() { - const node = this.startNode(); - node.typeName = this.tsParseEntityName(false); - - if (!this.hasPrecedingLineBreak() && this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSTypeReference"); - } - - tsParseThisTypePredicate(lhs) { - this.next(); - const node = this.startNodeAtNode(lhs); - node.parameterName = lhs; - node.typeAnnotation = this.tsParseTypeAnnotation(false); - return this.finishNode(node, "TSTypePredicate"); - } - - tsParseThisTypeNode() { - const node = this.startNode(); - this.next(); - return this.finishNode(node, "TSThisType"); - } - - tsParseTypeQuery() { - const node = this.startNode(); - this.expect(types._typeof); - - if (this.match(types._import)) { - node.exprName = this.tsParseImportType(); - } else { - node.exprName = this.tsParseEntityName(true); - } - - return this.finishNode(node, "TSTypeQuery"); - } - - tsParseTypeParameter() { - const node = this.startNode(); - node.name = this.parseIdentifierName(node.start); - node.constraint = this.tsEatThenParseType(types._extends); - node.default = this.tsEatThenParseType(types.eq); - return this.finishNode(node, "TSTypeParameter"); - } - - tsTryParseTypeParameters() { - if (this.isRelational("<")) { - return this.tsParseTypeParameters(); - } - } - - tsParseTypeParameters() { - const node = this.startNode(); - - if (this.isRelational("<") || this.match(types.jsxTagStart)) { - this.next(); - } else { - this.unexpected(); - } - - node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true); - return this.finishNode(node, "TSTypeParameterDeclaration"); - } - - tsTryNextParseConstantContext() { - if (this.lookahead().type === types._const) { - this.next(); - return this.tsParseTypeReference(); - } - - return null; - } - - tsFillSignature(returnToken, signature) { - const returnTokenRequired = returnToken === types.arrow; - signature.typeParameters = this.tsTryParseTypeParameters(); - this.expect(types.parenL); - signature.parameters = this.tsParseBindingListForSignature(); - - if (returnTokenRequired) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } else if (this.match(returnToken)) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } - } - - tsParseBindingListForSignature() { - return this.parseBindingList(types.parenR).map(pattern => { - if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") { - throw this.unexpected(pattern.start, `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${pattern.type}`); - } - - return pattern; - }); - } - - tsParseTypeMemberSemicolon() { - if (!this.eat(types.comma)) { - this.semicolon(); - } - } - - tsParseSignatureMember(kind, node) { - this.tsFillSignature(types.colon, node); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, kind); - } - - tsIsUnambiguouslyIndexSignature() { - this.next(); - return this.eat(types.name) && this.match(types.colon); - } - - tsTryParseIndexSignature(node) { - if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { - return undefined; - } - - this.expect(types.bracketL); - const id = this.parseIdentifier(); - id.typeAnnotation = this.tsParseTypeAnnotation(); - this.resetEndLocation(id); - this.expect(types.bracketR); - node.parameters = [id]; - const type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, "TSIndexSignature"); - } - - tsParsePropertyOrMethodSignature(node, readonly) { - if (this.eat(types.question)) node.optional = true; - const nodeAny = node; - - if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) { - const method = nodeAny; - this.tsFillSignature(types.colon, method); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(method, "TSMethodSignature"); - } else { - const property = nodeAny; - if (readonly) property.readonly = true; - const type = this.tsTryParseTypeAnnotation(); - if (type) property.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(property, "TSPropertySignature"); - } - } - - tsParseTypeMember() { - const node = this.startNode(); - - if (this.match(types.parenL) || this.isRelational("<")) { - return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); - } - - if (this.match(types._new)) { - const id = this.startNode(); - this.next(); - - if (this.match(types.parenL) || this.isRelational("<")) { - return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); - } else { - node.key = this.createIdentifier(id, "new"); - return this.tsParsePropertyOrMethodSignature(node, false); - } - } - - const readonly = !!this.tsParseModifier(["readonly"]); - const idx = this.tsTryParseIndexSignature(node); - - if (idx) { - if (readonly) node.readonly = true; - return idx; - } - - this.parsePropertyName(node); - return this.tsParsePropertyOrMethodSignature(node, readonly); - } - - tsParseTypeLiteral() { - const node = this.startNode(); - node.members = this.tsParseObjectTypeMembers(); - return this.finishNode(node, "TSTypeLiteral"); - } - - tsParseObjectTypeMembers() { - this.expect(types.braceL); - const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); - this.expect(types.braceR); - return members; - } - - tsIsStartOfMappedType() { - this.next(); - - if (this.eat(types.plusMin)) { - return this.isContextual("readonly"); - } - - if (this.isContextual("readonly")) { - this.next(); - } - - if (!this.match(types.bracketL)) { - return false; - } - - this.next(); - - if (!this.tsIsIdentifier()) { - return false; - } - - this.next(); - return this.match(types._in); - } - - tsParseMappedTypeParameter() { - const node = this.startNode(); - node.name = this.parseIdentifierName(node.start); - node.constraint = this.tsExpectThenParseType(types._in); - return this.finishNode(node, "TSTypeParameter"); - } - - tsParseMappedType() { - const node = this.startNode(); - this.expect(types.braceL); - - if (this.match(types.plusMin)) { - node.readonly = this.state.value; - this.next(); - this.expectContextual("readonly"); - } else if (this.eatContextual("readonly")) { - node.readonly = true; - } - - this.expect(types.bracketL); - node.typeParameter = this.tsParseMappedTypeParameter(); - this.expect(types.bracketR); - - if (this.match(types.plusMin)) { - node.optional = this.state.value; - this.next(); - this.expect(types.question); - } else if (this.eat(types.question)) { - node.optional = true; - } - - node.typeAnnotation = this.tsTryParseType(); - this.semicolon(); - this.expect(types.braceR); - return this.finishNode(node, "TSMappedType"); - } - - tsParseTupleType() { - const node = this.startNode(); - node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); - let seenOptionalElement = false; - node.elementTypes.forEach(elementNode => { - if (elementNode.type === "TSOptionalType") { - seenOptionalElement = true; - } else if (seenOptionalElement && elementNode.type !== "TSRestType") { - this.raise(elementNode.start, "A required element cannot follow an optional element."); - } - }); - return this.finishNode(node, "TSTupleType"); - } - - tsParseTupleElementType() { - if (this.match(types.ellipsis)) { - const restNode = this.startNode(); - this.next(); - restNode.typeAnnotation = this.tsParseType(); - this.checkCommaAfterRest(); - return this.finishNode(restNode, "TSRestType"); - } - - const type = this.tsParseType(); - - if (this.eat(types.question)) { - const optionalTypeNode = this.startNodeAtNode(type); - optionalTypeNode.typeAnnotation = type; - return this.finishNode(optionalTypeNode, "TSOptionalType"); - } - - return type; - } - - tsParseParenthesizedType() { - const node = this.startNode(); - this.expect(types.parenL); - node.typeAnnotation = this.tsParseType(); - this.expect(types.parenR); - return this.finishNode(node, "TSParenthesizedType"); - } - - tsParseFunctionOrConstructorType(type) { - const node = this.startNode(); - - if (type === "TSConstructorType") { - this.expect(types._new); - } - - this.tsFillSignature(types.arrow, node); - return this.finishNode(node, type); - } - - tsParseLiteralTypeNode() { - const node = this.startNode(); - - node.literal = (() => { - switch (this.state.type) { - case types.num: - case types.string: - case types._true: - case types._false: - return this.parseExprAtom(); - - default: - throw this.unexpected(); - } - })(); - - return this.finishNode(node, "TSLiteralType"); - } - - tsParseTemplateLiteralType() { - const node = this.startNode(); - const templateNode = this.parseTemplate(false); - - if (templateNode.expressions.length > 0) { - throw this.raise(templateNode.expressions[0].start, "Template literal types cannot have any substitution"); - } - - node.literal = templateNode; - return this.finishNode(node, "TSLiteralType"); - } - - tsParseNonArrayType() { - switch (this.state.type) { - case types.name: - case types._void: - case types._null: - { - const type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value); - - if (type !== undefined && this.lookahead().type !== types.dot) { - const node = this.startNode(); - this.next(); - return this.finishNode(node, type); - } - - return this.tsParseTypeReference(); - } - - case types.string: - case types.num: - case types._true: - case types._false: - return this.tsParseLiteralTypeNode(); - - case types.plusMin: - if (this.state.value === "-") { - const node = this.startNode(); - - if (this.lookahead().type !== types.num) { - throw this.unexpected(); - } - - node.literal = this.parseMaybeUnary(); - return this.finishNode(node, "TSLiteralType"); - } - - break; - - case types._this: - { - const thisKeyword = this.tsParseThisTypeNode(); - - if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { - return this.tsParseThisTypePredicate(thisKeyword); - } else { - return thisKeyword; - } - } - - case types._typeof: - return this.tsParseTypeQuery(); - - case types._import: - return this.tsParseImportType(); - - case types.braceL: - return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); - - case types.bracketL: - return this.tsParseTupleType(); - - case types.parenL: - return this.tsParseParenthesizedType(); - - case types.backQuote: - return this.tsParseTemplateLiteralType(); - } - - throw this.unexpected(); - } - - tsParseArrayTypeOrHigher() { - let type = this.tsParseNonArrayType(); - - while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) { - if (this.match(types.bracketR)) { - const node = this.startNodeAtNode(type); - node.elementType = type; - this.expect(types.bracketR); - type = this.finishNode(node, "TSArrayType"); - } else { - const node = this.startNodeAtNode(type); - node.objectType = type; - node.indexType = this.tsParseType(); - this.expect(types.bracketR); - type = this.finishNode(node, "TSIndexedAccessType"); - } - } - - return type; - } - - tsParseTypeOperator(operator) { - const node = this.startNode(); - this.expectContextual(operator); - node.operator = operator; - node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); - - if (operator === "readonly") { - this.tsCheckTypeAnnotationForReadOnly(node); - } - - return this.finishNode(node, "TSTypeOperator"); - } - - tsCheckTypeAnnotationForReadOnly(node) { - switch (node.typeAnnotation.type) { - case "TSTupleType": - case "TSArrayType": - return; - - default: - this.raise(node.start, "'readonly' type modifier is only permitted on array and tuple literal types."); - } - } - - tsParseInferType() { - const node = this.startNode(); - this.expectContextual("infer"); - const typeParameter = this.startNode(); - typeParameter.name = this.parseIdentifierName(typeParameter.start); - node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); - return this.finishNode(node, "TSInferType"); - } - - tsParseTypeOperatorOrHigher() { - const operator = ["keyof", "unique", "readonly"].find(kw => this.isContextual(kw)); - return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher(); - } - - tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { - this.eat(operator); - let type = parseConstituentType(); - - if (this.match(operator)) { - const types = [type]; - - while (this.eat(operator)) { - types.push(parseConstituentType()); - } - - const node = this.startNodeAtNode(type); - node.types = types; - type = this.finishNode(node, kind); - } - - return type; - } - - tsParseIntersectionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND); - } - - tsParseUnionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR); - } - - tsIsStartOfFunctionType() { - if (this.isRelational("<")) { - return true; - } - - return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); - } - - tsSkipParameterStart() { - if (this.match(types.name) || this.match(types._this)) { - this.next(); - return true; - } - - if (this.match(types.braceL)) { - let braceStackCounter = 1; - this.next(); - - while (braceStackCounter > 0) { - if (this.match(types.braceL)) { - ++braceStackCounter; - } else if (this.match(types.braceR)) { - --braceStackCounter; - } - - this.next(); - } - - return true; - } - - if (this.match(types.bracketL)) { - let braceStackCounter = 1; - this.next(); - - while (braceStackCounter > 0) { - if (this.match(types.bracketL)) { - ++braceStackCounter; - } else if (this.match(types.bracketR)) { - --braceStackCounter; - } - - this.next(); - } - - return true; - } - - return false; - } - - tsIsUnambiguouslyStartOfFunctionType() { - this.next(); - - if (this.match(types.parenR) || this.match(types.ellipsis)) { - return true; - } - - if (this.tsSkipParameterStart()) { - if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) { - return true; - } - - if (this.match(types.parenR)) { - this.next(); - - if (this.match(types.arrow)) { - return true; - } - } - } - - return false; - } - - tsParseTypeOrTypePredicateAnnotation(returnToken) { - return this.tsInType(() => { - const t = this.startNode(); - this.expect(returnToken); - const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); - - if (!typePredicateVariable) { - return this.tsParseTypeAnnotation(false, t); - } - - const type = this.tsParseTypeAnnotation(false); - const node = this.startNodeAtNode(typePredicateVariable); - node.parameterName = typePredicateVariable; - node.typeAnnotation = type; - t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); - return this.finishNode(t, "TSTypeAnnotation"); - }); - } - - tsTryParseTypeOrTypePredicateAnnotation() { - return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined; - } - - tsTryParseTypeAnnotation() { - return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined; - } - - tsTryParseType() { - return this.tsEatThenParseType(types.colon); - } - - tsParseTypePredicatePrefix() { - const id = this.parseIdentifier(); - - if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { - this.next(); - return id; - } - } - - tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { - this.tsInType(() => { - if (eatColon) this.expect(types.colon); - t.typeAnnotation = this.tsParseType(); - }); - return this.finishNode(t, "TSTypeAnnotation"); - } - - tsParseType() { - assert(this.state.inType); - const type = this.tsParseNonConditionalType(); - - if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) { - return type; - } - - const node = this.startNodeAtNode(type); - node.checkType = type; - node.extendsType = this.tsParseNonConditionalType(); - this.expect(types.question); - node.trueType = this.tsParseType(); - this.expect(types.colon); - node.falseType = this.tsParseType(); - return this.finishNode(node, "TSConditionalType"); - } - - tsParseNonConditionalType() { - if (this.tsIsStartOfFunctionType()) { - return this.tsParseFunctionOrConstructorType("TSFunctionType"); - } - - if (this.match(types._new)) { - return this.tsParseFunctionOrConstructorType("TSConstructorType"); - } - - return this.tsParseUnionTypeOrHigher(); - } - - tsParseTypeAssertion() { - const node = this.startNode(); - - const _const = this.tsTryNextParseConstantContext(); - - node.typeAnnotation = _const || this.tsNextThenParseType(); - this.expectRelational(">"); - node.expression = this.parseMaybeUnary(); - return this.finishNode(node, "TSTypeAssertion"); - } - - tsParseHeritageClause(descriptor) { - const originalStart = this.state.start; - const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this)); - - if (!delimitedList.length) { - this.raise(originalStart, `'${descriptor}' list cannot be empty.`); - } - - return delimitedList; - } - - tsParseExpressionWithTypeArguments() { - const node = this.startNode(); - node.expression = this.tsParseEntityName(false); - - if (this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSExpressionWithTypeArguments"); - } - - tsParseInterfaceDeclaration(node) { - node.id = this.parseIdentifier(); - this.checkLVal(node.id, BIND_TS_INTERFACE, undefined, "typescript interface declaration"); - node.typeParameters = this.tsTryParseTypeParameters(); - - if (this.eat(types._extends)) { - node.extends = this.tsParseHeritageClause("extends"); - } - - const body = this.startNode(); - body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); - node.body = this.finishNode(body, "TSInterfaceBody"); - return this.finishNode(node, "TSInterfaceDeclaration"); - } - - tsParseTypeAliasDeclaration(node) { - node.id = this.parseIdentifier(); - this.checkLVal(node.id, BIND_TS_TYPE, undefined, "typescript type alias"); - node.typeParameters = this.tsTryParseTypeParameters(); - node.typeAnnotation = this.tsExpectThenParseType(types.eq); - this.semicolon(); - return this.finishNode(node, "TSTypeAliasDeclaration"); - } - - tsInNoContext(cb) { - const oldContext = this.state.context; - this.state.context = [oldContext[0]]; - - try { - return cb(); - } finally { - this.state.context = oldContext; - } - } - - tsInType(cb) { - const oldInType = this.state.inType; - this.state.inType = true; - - try { - return cb(); - } finally { - this.state.inType = oldInType; - } - } - - tsEatThenParseType(token) { - return !this.match(token) ? undefined : this.tsNextThenParseType(); - } - - tsExpectThenParseType(token) { - return this.tsDoThenParseType(() => this.expect(token)); - } - - tsNextThenParseType() { - return this.tsDoThenParseType(() => this.next()); - } - - tsDoThenParseType(cb) { - return this.tsInType(() => { - cb(); - return this.tsParseType(); - }); - } - - tsParseEnumMember() { - const node = this.startNode(); - node.id = this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true); - - if (this.eat(types.eq)) { - node.initializer = this.parseMaybeAssign(); - } - - return this.finishNode(node, "TSEnumMember"); - } - - tsParseEnumDeclaration(node, isConst) { - if (isConst) node.const = true; - node.id = this.parseIdentifier(); - this.checkLVal(node.id, isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM, undefined, "typescript enum declaration"); - this.expect(types.braceL); - node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); - this.expect(types.braceR); - return this.finishNode(node, "TSEnumDeclaration"); - } - - tsParseModuleBlock() { - const node = this.startNode(); - this.scope.enter(SCOPE_OTHER); - this.expect(types.braceL); - this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR); - this.scope.exit(); - return this.finishNode(node, "TSModuleBlock"); - } - - tsParseModuleOrNamespaceDeclaration(node, nested = false) { - node.id = this.parseIdentifier(); - - if (!nested) { - this.checkLVal(node.id, BIND_TS_NAMESPACE, null, "module or namespace declaration"); - } - - if (this.eat(types.dot)) { - const inner = this.startNode(); - this.tsParseModuleOrNamespaceDeclaration(inner, true); - node.body = inner; - } else { - node.body = this.tsParseModuleBlock(); - } - - return this.finishNode(node, "TSModuleDeclaration"); - } - - tsParseAmbientExternalModuleDeclaration(node) { - if (this.isContextual("global")) { - node.global = true; - node.id = this.parseIdentifier(); - } else if (this.match(types.string)) { - node.id = this.parseExprAtom(); - } else { - this.unexpected(); - } - - if (this.match(types.braceL)) { - node.body = this.tsParseModuleBlock(); - } else { - this.semicolon(); - } - - return this.finishNode(node, "TSModuleDeclaration"); - } - - tsParseImportEqualsDeclaration(node, isExport) { - node.isExport = isExport || false; - node.id = this.parseIdentifier(); - this.expect(types.eq); - node.moduleReference = this.tsParseModuleReference(); - this.semicolon(); - return this.finishNode(node, "TSImportEqualsDeclaration"); - } - - tsIsExternalModuleReference() { - return this.isContextual("require") && this.lookahead().type === types.parenL; - } - - tsParseModuleReference() { - return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); - } - - tsParseExternalModuleReference() { - const node = this.startNode(); - this.expectContextual("require"); - this.expect(types.parenL); - - if (!this.match(types.string)) { - throw this.unexpected(); - } - - node.expression = this.parseExprAtom(); - this.expect(types.parenR); - return this.finishNode(node, "TSExternalModuleReference"); - } - - tsLookAhead(f) { - const state = this.state.clone(); - const res = f(); - this.state = state; - return res; - } - - tsTryParseAndCatch(f) { - const state = this.state.clone(); - - try { - return f(); - } catch (e) { - if (e instanceof SyntaxError) { - this.state = state; - return undefined; - } - - throw e; - } - } - - tsTryParse(f) { - const state = this.state.clone(); - const result = f(); - - if (result !== undefined && result !== false) { - return result; - } else { - this.state = state; - return undefined; - } - } - - tsTryParseDeclare(nany) { - if (this.isLineTerminator()) { - return; - } - - let starttype = this.state.type; - let kind; - - if (this.isContextual("let")) { - starttype = types._var; - kind = "let"; - } - - switch (starttype) { - case types._function: - return this.parseFunctionStatement(nany, false, true); - - case types._class: - return this.parseClass(nany, true, false); - - case types._const: - if (this.match(types._const) && this.isLookaheadContextual("enum")) { - this.expect(types._const); - this.expectContextual("enum"); - return this.tsParseEnumDeclaration(nany, true); - } - - case types._var: - kind = kind || this.state.value; - return this.parseVarStatement(nany, kind); - - case types.name: - { - const value = this.state.value; - - if (value === "global") { - return this.tsParseAmbientExternalModuleDeclaration(nany); - } else { - return this.tsParseDeclaration(nany, value, true); - } - } - } - } - - tsTryParseExportDeclaration() { - return this.tsParseDeclaration(this.startNode(), this.state.value, true); - } - - tsParseExpressionStatement(node, expr) { - switch (expr.name) { - case "declare": - { - const declaration = this.tsTryParseDeclare(node); - - if (declaration) { - declaration.declare = true; - return declaration; - } - - break; - } - - case "global": - if (this.match(types.braceL)) { - const mod = node; - mod.global = true; - mod.id = expr; - mod.body = this.tsParseModuleBlock(); - return this.finishNode(mod, "TSModuleDeclaration"); - } - - break; - - default: - return this.tsParseDeclaration(node, expr.name, false); - } - } - - tsParseDeclaration(node, value, next) { - switch (value) { - case "abstract": - if (this.tsCheckLineTerminatorAndMatch(types._class, next)) { - const cls = node; - cls.abstract = true; - - if (next) { - this.next(); - - if (!this.match(types._class)) { - this.unexpected(null, types._class); - } - } - - return this.parseClass(cls, true, false); - } - - break; - - case "enum": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseEnumDeclaration(node, false); - } - - break; - - case "interface": - if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { - if (next) this.next(); - return this.tsParseInterfaceDeclaration(node); - } - - break; - - case "module": - if (next) this.next(); - - if (this.match(types.string)) { - return this.tsParseAmbientExternalModuleDeclaration(node); - } else if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { - return this.tsParseModuleOrNamespaceDeclaration(node); - } - - break; - - case "namespace": - if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { - if (next) this.next(); - return this.tsParseModuleOrNamespaceDeclaration(node); - } - - break; - - case "type": - if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { - if (next) this.next(); - return this.tsParseTypeAliasDeclaration(node); - } - - break; - } - } - - tsCheckLineTerminatorAndMatch(tokenType, next) { - return (next || this.match(tokenType)) && !this.isLineTerminator(); - } - - tsTryParseGenericAsyncArrowFunction(startPos, startLoc) { - if (!this.isRelational("<")) { - return undefined; - } - - const res = this.tsTryParseAndCatch(() => { - const node = this.startNodeAt(startPos, startLoc); - node.typeParameters = this.tsParseTypeParameters(); - super.parseFunctionParams(node); - node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); - this.expect(types.arrow); - return node; - }); - - if (!res) { - return undefined; - } - - return this.parseArrowExpression(res, null, true); - } - - tsParseTypeArguments() { - const node = this.startNode(); - node.params = this.tsInType(() => this.tsInNoContext(() => { - this.expectRelational("<"); - return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); - })); - this.state.exprAllowed = false; - this.expectRelational(">"); - return this.finishNode(node, "TSTypeParameterInstantiation"); - } - - tsIsDeclarationStart() { - if (this.match(types.name)) { - switch (this.state.value) { - case "abstract": - case "declare": - case "enum": - case "interface": - case "module": - case "namespace": - case "type": - return true; - } - } - - return false; - } - - isExportDefaultSpecifier() { - if (this.tsIsDeclarationStart()) return false; - return super.isExportDefaultSpecifier(); - } - - parseAssignableListItem(allowModifiers, decorators) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - let accessibility; - let readonly = false; - - if (allowModifiers) { - accessibility = this.parseAccessModifier(); - readonly = !!this.tsParseModifier(["readonly"]); - } - - const left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - const elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (accessibility || readonly) { - const pp = this.startNodeAt(startPos, startLoc); - - if (decorators.length) { - pp.decorators = decorators; - } - - if (accessibility) pp.accessibility = accessibility; - if (readonly) pp.readonly = readonly; - - if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { - throw this.raise(pp.start, "A parameter property may not be declared using a binding pattern."); - } - - pp.parameter = elt; - return this.finishNode(pp, "TSParameterProperty"); - } - - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - } - - parseFunctionBodyAndFinish(node, type, isMethod = false) { - if (this.match(types.colon)) { - node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); - } - - const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined; - - if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) { - this.finishNode(node, bodilessType); - return; - } - - super.parseFunctionBodyAndFinish(node, type, isMethod); - } - - checkFunctionStatementId(node) { - if (!node.body && node.id) { - this.checkLVal(node.id, BIND_TS_FN_TYPE, null, "function name"); - } else { - super.checkFunctionStatementId(...arguments); - } - } - - parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow) { - if (!this.hasPrecedingLineBreak() && this.match(types.bang)) { - this.state.exprAllowed = false; - this.next(); - const nonNullExpression = this.startNodeAt(startPos, startLoc); - nonNullExpression.expression = base; - return this.finishNode(nonNullExpression, "TSNonNullExpression"); - } - - if (this.isRelational("<")) { - const result = this.tsTryParseAndCatch(() => { - if (!noCalls && this.atPossibleAsync(base)) { - const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc); - - if (asyncArrowFn) { - return asyncArrowFn; - } - } - - const node = this.startNodeAt(startPos, startLoc); - node.callee = base; - const typeArguments = this.tsParseTypeArguments(); - - if (typeArguments) { - if (!noCalls && this.eat(types.parenL)) { - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - node.typeParameters = typeArguments; - return this.finishCallExpression(node); - } else if (this.match(types.backQuote)) { - return this.parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments); - } - } - - this.unexpected(); - }); - if (result) return result; - } - - return super.parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow); - } - - parseNewArguments(node) { - if (this.isRelational("<")) { - const typeParameters = this.tsTryParseAndCatch(() => { - const args = this.tsParseTypeArguments(); - if (!this.match(types.parenL)) this.unexpected(); - return args; - }); - - if (typeParameters) { - node.typeParameters = typeParameters; - } - } - - super.parseNewArguments(node); - } - - parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { - if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) { - const node = this.startNodeAt(leftStartPos, leftStartLoc); - node.expression = left; - - const _const = this.tsTryNextParseConstantContext(); - - if (_const) { - node.typeAnnotation = _const; - } else { - node.typeAnnotation = this.tsNextThenParseType(); - } - - this.finishNode(node, "TSAsExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - - return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn); - } - - checkReservedWord(word, startLoc, checkKeywords, isBinding) {} - - checkDuplicateExports() {} - - parseImport(node) { - if (this.match(types.name) && this.lookahead().type === types.eq) { - return this.tsParseImportEqualsDeclaration(node); - } - - return super.parseImport(node); - } - - parseExport(node) { - if (this.match(types._import)) { - this.expect(types._import); - return this.tsParseImportEqualsDeclaration(node, true); - } else if (this.eat(types.eq)) { - const assign = node; - assign.expression = this.parseExpression(); - this.semicolon(); - return this.finishNode(assign, "TSExportAssignment"); - } else if (this.eatContextual("as")) { - const decl = node; - this.expectContextual("namespace"); - decl.id = this.parseIdentifier(); - this.semicolon(); - return this.finishNode(decl, "TSNamespaceExportDeclaration"); - } else { - return super.parseExport(node); - } - } - - isAbstractClass() { - return this.isContextual("abstract") && this.lookahead().type === types._class; - } - - parseExportDefaultExpression() { - if (this.isAbstractClass()) { - const cls = this.startNode(); - this.next(); - this.parseClass(cls, true, true); - cls.abstract = true; - return cls; - } - - if (this.state.value === "interface") { - const result = this.tsParseDeclaration(this.startNode(), this.state.value, true); - if (result) return result; - } - - return super.parseExportDefaultExpression(); - } - - parseStatementContent(context, topLevel) { - if (this.state.type === types._const) { - const ahead = this.lookahead(); - - if (ahead.type === types.name && ahead.value === "enum") { - const node = this.startNode(); - this.expect(types._const); - this.expectContextual("enum"); - return this.tsParseEnumDeclaration(node, true); - } - } - - return super.parseStatementContent(context, topLevel); - } - - parseAccessModifier() { - return this.tsParseModifier(["public", "protected", "private"]); - } - - parseClassMember(classBody, member, state, constructorAllowsSuper) { - const accessibility = this.parseAccessModifier(); - if (accessibility) member.accessibility = accessibility; - super.parseClassMember(classBody, member, state, constructorAllowsSuper); - } - - parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) { - const methodOrProp = member; - const prop = member; - const propOrIdx = member; - let abstract = false, - readonly = false; - const mod = this.tsParseModifier(["abstract", "readonly"]); - - switch (mod) { - case "readonly": - readonly = true; - abstract = !!this.tsParseModifier(["abstract"]); - break; - - case "abstract": - abstract = true; - readonly = !!this.tsParseModifier(["readonly"]); - break; - } - - if (abstract) methodOrProp.abstract = true; - if (readonly) propOrIdx.readonly = true; - - if (!abstract && !isStatic && !methodOrProp.accessibility) { - const idx = this.tsTryParseIndexSignature(member); - - if (idx) { - classBody.body.push(idx); - return; - } - } - - if (readonly) { - methodOrProp.static = isStatic; - this.parseClassPropertyName(prop); - this.parsePostMemberNameModifiers(methodOrProp); - this.pushClassProperty(classBody, prop); - return; - } - - super.parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper); - } - - parsePostMemberNameModifiers(methodOrProp) { - const optional = this.eat(types.question); - if (optional) methodOrProp.optional = true; - } - - parseExpressionStatement(node, expr) { - const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined; - return decl || super.parseExpressionStatement(node, expr); - } - - shouldParseExportDeclaration() { - if (this.tsIsDeclarationStart()) return true; - return super.shouldParseExportDeclaration(); - } - - parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (!refNeedsArrowPos || !this.match(types.question)) { - return super.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos); - } - - const state = this.state.clone(); - - try { - return super.parseConditional(expr, noIn, startPos, startLoc); - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - this.state = state; - refNeedsArrowPos.start = err.pos || this.state.start; - return expr; - } - } - - parseParenItem(node, startPos, startLoc) { - node = super.parseParenItem(node, startPos, startLoc); - - if (this.eat(types.question)) { - node.optional = true; - this.resetEndLocation(node); - } - - if (this.match(types.colon)) { - const typeCastNode = this.startNodeAt(startPos, startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TSTypeCastExpression"); - } - - return node; - } - - parseExportDeclaration(node) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const isDeclare = this.eatContextual("declare"); - let declaration; - - if (this.match(types.name)) { - declaration = this.tsTryParseExportDeclaration(); - } - - if (!declaration) { - declaration = super.parseExportDeclaration(node); - } - - if (declaration && isDeclare) { - this.resetStartLocation(declaration, startPos, startLoc); - declaration.declare = true; - } - - return declaration; - } - - parseClassId(node, isStatement, optionalId) { - if ((!isStatement || optionalId) && this.isContextual("implements")) { - return; - } - - super.parseClassId(...arguments); - const typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) node.typeParameters = typeParameters; - } - - parseClassProperty(node) { - if (!node.optional && this.eat(types.bang)) { - node.definite = true; - } - - const type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - return super.parseClassProperty(node); - } - - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - const typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) method.typeParameters = typeParameters; - super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); - } - - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - const typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) method.typeParameters = typeParameters; - super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); - } - - parseClassSuper(node) { - super.parseClassSuper(node); - - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.tsParseTypeArguments(); - } - - if (this.eatContextual("implements")) { - node.implements = this.tsParseHeritageClause("implements"); - } - } - - parseObjPropValue(prop, ...args) { - const typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) prop.typeParameters = typeParameters; - super.parseObjPropValue(prop, ...args); - } - - parseFunctionParams(node, allowModifiers) { - const typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) node.typeParameters = typeParameters; - super.parseFunctionParams(node, allowModifiers); - } - - parseVarId(decl, kind) { - super.parseVarId(decl, kind); - - if (decl.id.type === "Identifier" && this.eat(types.bang)) { - decl.definite = true; - } - - const type = this.tsTryParseTypeAnnotation(); - - if (type) { - decl.id.typeAnnotation = type; - this.resetEndLocation(decl.id); - } - } - - parseAsyncArrowFromCallExpression(node, call) { - if (this.match(types.colon)) { - node.returnType = this.tsParseTypeAnnotation(); - } - - return super.parseAsyncArrowFromCallExpression(node, call); - } - - parseMaybeAssign(...args) { - let jsxError; - - if (this.match(types.jsxTagStart)) { - const context = this.curContext(); - assert(context === types$1.j_oTag); - assert(this.state.context[this.state.context.length - 2] === types$1.j_expr); - const state = this.state.clone(); - - try { - return super.parseMaybeAssign(...args); - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - this.state = state; - assert(this.curContext() === types$1.j_oTag); - this.state.context.pop(); - assert(this.curContext() === types$1.j_expr); - this.state.context.pop(); - jsxError = err; - } - } - - if (jsxError === undefined && !this.isRelational("<")) { - return super.parseMaybeAssign(...args); - } - - let arrowExpression; - let typeParameters; - const state = this.state.clone(); - - try { - typeParameters = this.tsParseTypeParameters(); - arrowExpression = super.parseMaybeAssign(...args); - - if (arrowExpression.type !== "ArrowFunctionExpression" || arrowExpression.extra && arrowExpression.extra.parenthesized) { - this.unexpected(); - } - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - if (jsxError) { - throw jsxError; - } - - assert(!this.hasPlugin("jsx")); - this.state = state; - return super.parseMaybeAssign(...args); - } - - if (typeParameters && typeParameters.params.length !== 0) { - this.resetStartLocationFromNode(arrowExpression, typeParameters); - } - - arrowExpression.typeParameters = typeParameters; - return arrowExpression; - } - - parseMaybeUnary(refShorthandDefaultPos) { - if (!this.hasPlugin("jsx") && this.isRelational("<")) { - return this.tsParseTypeAssertion(); - } else { - return super.parseMaybeUnary(refShorthandDefaultPos); - } - } - - parseArrow(node) { - if (this.match(types.colon)) { - const state = this.state.clone(); - - try { - const returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); - - if (this.canInsertSemicolon() || !this.match(types.arrow)) { - this.state = state; - return undefined; - } - - node.returnType = returnType; - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - } else { - throw err; - } - } - } - - return super.parseArrow(node); - } - - parseAssignableListItemTypes(param) { - if (this.eat(types.question)) { - if (param.type !== "Identifier") { - throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); - } - - param.optional = true; - } - - const type = this.tsTryParseTypeAnnotation(); - if (type) param.typeAnnotation = type; - this.resetEndLocation(param); - return param; - } - - toAssignable(node, isBinding, contextDescription) { - switch (node.type) { - case "TSTypeCastExpression": - return super.toAssignable(this.typeCastToParameter(node), isBinding, contextDescription); - - case "TSParameterProperty": - return super.toAssignable(node, isBinding, contextDescription); - - case "TSAsExpression": - case "TSNonNullExpression": - case "TSTypeAssertion": - node.expression = this.toAssignable(node.expression, isBinding, contextDescription); - return node; - - default: - return super.toAssignable(node, isBinding, contextDescription); - } - } - - checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { - switch (expr.type) { - case "TSTypeCastExpression": - return; - - case "TSParameterProperty": - this.checkLVal(expr.parameter, bindingType, checkClashes, "parameter property"); - return; - - case "TSAsExpression": - case "TSNonNullExpression": - case "TSTypeAssertion": - this.checkLVal(expr.expression, bindingType, checkClashes, contextDescription); - return; - - default: - super.checkLVal(expr, bindingType, checkClashes, contextDescription); - return; - } - } - - parseBindingAtom() { - switch (this.state.type) { - case types._this: - return this.parseIdentifier(true); - - default: - return super.parseBindingAtom(); - } - } - - parseMaybeDecoratorArguments(expr) { - if (this.isRelational("<")) { - const typeArguments = this.tsParseTypeArguments(); - - if (this.match(types.parenL)) { - const call = super.parseMaybeDecoratorArguments(expr); - call.typeParameters = typeArguments; - return call; - } - - this.unexpected(this.state.start, types.parenL); - } - - return super.parseMaybeDecoratorArguments(expr); - } - - isClassMethod() { - return this.isRelational("<") || super.isClassMethod(); - } - - isClassProperty() { - return this.match(types.bang) || this.match(types.colon) || super.isClassProperty(); - } - - parseMaybeDefault(...args) { - const node = super.parseMaybeDefault(...args); - - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); - } - - return node; - } - - getTokenFromCode(code) { - if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(types.relational, 1); - } else { - return super.getTokenFromCode(code); - } - } - - toAssignableList(exprList, isBinding, contextDescription) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - if (!expr) continue; - - switch (expr.type) { - case "TSTypeCastExpression": - exprList[i] = this.typeCastToParameter(expr); - break; - - case "TSAsExpression": - case "TSTypeAssertion": - this.raise(expr.start, "Unexpected type cast in parameter position."); - break; - } - } - - return super.toAssignableList(exprList, isBinding, contextDescription); - } - - typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end); - return node.expression; - } - - toReferencedList(exprList, isInParens) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - - if (expr && expr._exprListItem && expr.type === "TsTypeCastExpression") { - this.raise(expr.start, "Did not expect a type annotation here."); - } - } - - return exprList; - } - - shouldParseArrow() { - return this.match(types.colon) || super.shouldParseArrow(); - } - - shouldParseAsyncArrow() { - return this.match(types.colon) || super.shouldParseAsyncArrow(); - } - - canHaveLeadingDecorator() { - return super.canHaveLeadingDecorator() || this.isAbstractClass(); - } - - jsxParseOpeningElementAfterName(node) { - if (this.isRelational("<")) { - const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments()); - if (typeArguments) node.typeParameters = typeArguments; - } - - return super.jsxParseOpeningElementAfterName(node); - } - - getGetterSetterExpectedParamCount(method) { - const baseCount = super.getGetterSetterExpectedParamCount(method); - const firstParam = method.params[0]; - const hasContextParam = firstParam && firstParam.type === "Identifier" && firstParam.name === "this"; - return hasContextParam ? baseCount + 1 : baseCount; - } - -}); - -types.placeholder = new TokenType("%%", { - startsExpr: true -}); -var placeholders = (superClass => class extends superClass { - parsePlaceholder(expectedNode) { - if (this.match(types.placeholder)) { - const node = this.startNode(); - this.next(); - this.assertNoSpace("Unexpected space in placeholder."); - node.name = super.parseIdentifier(true); - this.assertNoSpace("Unexpected space in placeholder."); - this.expect(types.placeholder); - return this.finishPlaceholder(node, expectedNode); - } - } - - finishPlaceholder(node, expectedNode) { - const isFinished = !!(node.expectedNode && node.type === "Placeholder"); - node.expectedNode = expectedNode; - return isFinished ? node : this.finishNode(node, "Placeholder"); - } - - getTokenFromCode(code) { - if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { - return this.finishOp(types.placeholder, 2); - } - - return super.getTokenFromCode(...arguments); - } - - parseExprAtom() { - return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments); - } - - parseIdentifier() { - return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments); - } - - checkReservedWord(word) { - if (word !== undefined) super.checkReservedWord(...arguments); - } - - parseBindingAtom() { - return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments); - } - - checkLVal(expr) { - if (expr.type !== "Placeholder") super.checkLVal(...arguments); - } - - toAssignable(node) { - if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { - node.expectedNode = "Pattern"; - return node; - } - - return super.toAssignable(...arguments); - } - - verifyBreakContinue(node) { - if (node.label && node.label.type === "Placeholder") return; - super.verifyBreakContinue(...arguments); - } - - parseExpressionStatement(node, expr) { - if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) { - return super.parseExpressionStatement(...arguments); - } - - if (this.match(types.colon)) { - const stmt = node; - stmt.label = this.finishPlaceholder(expr, "Identifier"); - this.next(); - stmt.body = this.parseStatement("label"); - return this.finishNode(stmt, "LabeledStatement"); - } - - this.semicolon(); - node.name = expr.name; - return this.finishPlaceholder(node, "Statement"); - } - - parseBlock() { - return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments); - } - - parseFunctionId() { - return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments); - } - - parseClass(node, isStatement, optionalId) { - const type = isStatement ? "ClassDeclaration" : "ClassExpression"; - this.next(); - this.takeDecorators(node); - const placeholder = this.parsePlaceholder("Identifier"); - - if (placeholder) { - if (this.match(types._extends) || this.match(types.placeholder) || this.match(types.braceL)) { - node.id = placeholder; - } else if (optionalId || !isStatement) { - node.id = null; - node.body = this.finishPlaceholder(placeholder, "ClassBody"); - return this.finishNode(node, type); - } else { - this.unexpected(null, "A class name is required"); - } - } else { - this.parseClassId(node, isStatement, optionalId); - } - - this.parseClassSuper(node); - node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass); - return this.finishNode(node, type); - } - - parseExport(node) { - const placeholder = this.parsePlaceholder("Identifier"); - if (!placeholder) return super.parseExport(...arguments); - - if (!this.isContextual("from") && !this.match(types.comma)) { - node.specifiers = []; - node.source = null; - node.declaration = this.finishPlaceholder(placeholder, "Declaration"); - return this.finishNode(node, "ExportNamedDeclaration"); - } - - this.expectPlugin("exportDefaultFrom"); - const specifier = this.startNode(); - specifier.exported = placeholder; - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - return super.parseExport(node); - } - - maybeParseExportDefaultSpecifier(node) { - if (node.specifiers && node.specifiers.length > 0) { - return true; - } - - return super.maybeParseExportDefaultSpecifier(...arguments); - } - - checkExport(node) { - const { - specifiers - } = node; - - if (specifiers && specifiers.length) { - node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder"); - } - - super.checkExport(node); - node.specifiers = specifiers; - } - - parseImport(node) { - const placeholder = this.parsePlaceholder("Identifier"); - if (!placeholder) return super.parseImport(...arguments); - node.specifiers = []; - - if (!this.isContextual("from") && !this.match(types.comma)) { - node.source = this.finishPlaceholder(placeholder, "StringLiteral"); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - - const specifier = this.startNodeAtNode(placeholder); - specifier.local = placeholder; - this.finishNode(specifier, "ImportDefaultSpecifier"); - node.specifiers.push(specifier); - - if (this.eat(types.comma)) { - const hasStarImport = this.maybeParseStarImportSpecifier(node); - if (!hasStarImport) this.parseNamedImportSpecifiers(node); - } - - this.expectContextual("from"); - node.source = this.parseImportSource(); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - - parseImportSource() { - return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments); - } - -}); - -function hasPlugin(plugins, name) { - return plugins.some(plugin => { - if (Array.isArray(plugin)) { - return plugin[0] === name; - } else { - return plugin === name; - } - }); -} -function getPluginOption(plugins, name, option) { - const plugin = plugins.find(plugin => { - if (Array.isArray(plugin)) { - return plugin[0] === name; - } else { - return plugin === name; - } - }); - - if (plugin && Array.isArray(plugin)) { - return plugin[1][option]; - } - - return null; -} -const PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"]; -function validatePlugins(plugins) { - if (hasPlugin(plugins, "decorators")) { - if (hasPlugin(plugins, "decorators-legacy")) { - throw new Error("Cannot use the decorators and decorators-legacy plugin together"); - } - - const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport"); - - if (decoratorsBeforeExport == null) { - throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option," + " whose value must be a boolean. If you are migrating from" + " Babylon/Babel 6 or want to use the old decorators proposal, you" + " should use the 'decorators-legacy' plugin instead of 'decorators'."); - } else if (typeof decoratorsBeforeExport !== "boolean") { - throw new Error("'decoratorsBeforeExport' must be a boolean."); - } - } - - if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) { - throw new Error("Cannot combine flow and typescript plugins."); - } - - if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) { - throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map(p => `'${p}'`).join(", ")); - } -} -const mixinPlugins = { - estree, - jsx, - flow, - typescript, - placeholders -}; -const mixinPluginNames = Object.keys(mixinPlugins); - -const defaultOptions = { - sourceType: "script", - sourceFilename: undefined, - startLine: 1, - allowAwaitOutsideFunction: false, - allowReturnOutsideFunction: false, - allowImportExportEverywhere: false, - allowSuperOutsideMethod: false, - allowUndeclaredExports: false, - plugins: [], - strictMode: null, - ranges: false, - tokens: false, - createParenthesizedExpressions: false -}; -function getOptions(opts) { - const options = {}; - - for (let _i = 0, _Object$keys = Object.keys(defaultOptions); _i < _Object$keys.length; _i++) { - const key = _Object$keys[_i]; - options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key]; - } - - return options; -} - -class Position { - constructor(line, col) { - this.line = line; - this.column = col; - } - -} -class SourceLocation { - constructor(start, end) { - this.start = start; - this.end = end; - } - -} -function getLineInfo(input, offset) { - let line = 1; - let lineStart = 0; - let match; - lineBreakG.lastIndex = 0; - - while ((match = lineBreakG.exec(input)) && match.index < offset) { - line++; - lineStart = lineBreakG.lastIndex; - } - - return new Position(line, offset - lineStart); -} - -class BaseParser { - constructor() { - this.sawUnambiguousESM = false; - } - - hasPlugin(name) { - return this.plugins.has(name); - } - - getPluginOption(plugin, name) { - if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name]; - } - -} - -function last(stack) { - return stack[stack.length - 1]; -} - -class CommentsParser extends BaseParser { - addComment(comment) { - if (this.filename) comment.loc.filename = this.filename; - this.state.trailingComments.push(comment); - this.state.leadingComments.push(comment); - } - - processComment(node) { - if (node.type === "Program" && node.body.length > 0) return; - const stack = this.state.commentStack; - let firstChild, lastChild, trailingComments, i, j; - - if (this.state.trailingComments.length > 0) { - if (this.state.trailingComments[0].start >= node.end) { - trailingComments = this.state.trailingComments; - this.state.trailingComments = []; - } else { - this.state.trailingComments.length = 0; - } - } else if (stack.length > 0) { - const lastInStack = last(stack); - - if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) { - trailingComments = lastInStack.trailingComments; - delete lastInStack.trailingComments; - } - } - - if (stack.length > 0 && last(stack).start >= node.start) { - firstChild = stack.pop(); - } - - while (stack.length > 0 && last(stack).start >= node.start) { - lastChild = stack.pop(); - } - - if (!lastChild && firstChild) lastChild = firstChild; - - if (firstChild && this.state.leadingComments.length > 0) { - const lastComment = last(this.state.leadingComments); - - if (firstChild.type === "ObjectProperty") { - if (lastComment.start >= node.start) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - - if (this.state.leadingComments.length > 0) { - firstChild.trailingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } - } - } else if (node.type === "CallExpression" && node.arguments && node.arguments.length) { - const lastArg = last(node.arguments); - - if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - - if (this.state.leadingComments.length > 0) { - lastArg.trailingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } - } - } - } - - if (lastChild) { - if (lastChild.leadingComments) { - if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) { - node.leadingComments = lastChild.leadingComments; - delete lastChild.leadingComments; - } else { - for (i = lastChild.leadingComments.length - 2; i >= 0; --i) { - if (lastChild.leadingComments[i].end <= node.start) { - node.leadingComments = lastChild.leadingComments.splice(0, i + 1); - break; - } - } - } - } - } else if (this.state.leadingComments.length > 0) { - if (last(this.state.leadingComments).end <= node.start) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - } - - if (this.state.leadingComments.length > 0) { - node.leadingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } else { - for (i = 0; i < this.state.leadingComments.length; i++) { - if (this.state.leadingComments[i].end > node.start) { - break; - } - } - - const leadingComments = this.state.leadingComments.slice(0, i); - - if (leadingComments.length) { - node.leadingComments = leadingComments; - } - - trailingComments = this.state.leadingComments.slice(i); - - if (trailingComments.length === 0) { - trailingComments = null; - } - } - } - - this.state.commentPreviousNode = node; - - if (trailingComments) { - if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) { - node.innerComments = trailingComments; - } else { - node.trailingComments = trailingComments; - } - } - - stack.push(node); - } - -} - -class LocationParser extends CommentsParser { - getLocationForPosition(pos) { - let loc; - if (pos === this.state.start) loc = this.state.startLoc;else if (pos === this.state.lastTokStart) loc = this.state.lastTokStartLoc;else if (pos === this.state.end) loc = this.state.endLoc;else if (pos === this.state.lastTokEnd) loc = this.state.lastTokEndLoc;else loc = getLineInfo(this.input, pos); - return loc; - } - - raise(pos, message, { - missingPluginNames, - code - } = {}) { - const loc = this.getLocationForPosition(pos); - message += ` (${loc.line}:${loc.column})`; - const err = new SyntaxError(message); - err.pos = pos; - err.loc = loc; - - if (missingPluginNames) { - err.missingPlugin = missingPluginNames; - } - - if (code !== undefined) { - err.code = code; - } - - throw err; - } - -} - -class State { - constructor() { - this.potentialArrowAt = -1; - this.noArrowAt = []; - this.noArrowParamsConversionAt = []; - this.commaAfterSpreadAt = -1; - this.inParameters = false; - this.maybeInArrowParameters = false; - this.inPipeline = false; - this.inType = false; - this.noAnonFunctionType = false; - this.inPropertyName = false; - this.inClassProperty = false; - this.hasFlowComment = false; - this.isIterator = false; - this.topicContext = { - maxNumOfResolvableTopics: 0, - maxTopicIndex: null - }; - this.soloAwait = false; - this.inFSharpPipelineDirectBody = false; - this.classLevel = 0; - this.labels = []; - this.decoratorStack = [[]]; - this.yieldPos = 0; - this.awaitPos = 0; - this.tokens = []; - this.comments = []; - this.trailingComments = []; - this.leadingComments = []; - this.commentStack = []; - this.commentPreviousNode = null; - this.pos = 0; - this.lineStart = 0; - this.type = types.eof; - this.value = null; - this.start = 0; - this.end = 0; - this.lastTokEndLoc = null; - this.lastTokStartLoc = null; - this.lastTokStart = 0; - this.lastTokEnd = 0; - this.context = [types$1.braceStatement]; - this.exprAllowed = true; - this.containsEsc = false; - this.containsOctal = false; - this.octalPosition = null; - this.exportedIdentifiers = []; - this.invalidTemplateEscapePosition = null; - } - - init(options) { - this.strict = options.strictMode === false ? false : options.sourceType === "module"; - this.curLine = options.startLine; - this.startLoc = this.endLoc = this.curPosition(); - } - - curPosition() { - return new Position(this.curLine, this.pos - this.lineStart); - } - - clone(skipArrays) { - const state = new State(); - const keys = Object.keys(this); - - for (let i = 0, length = keys.length; i < length; i++) { - const key = keys[i]; - let val = this[key]; - - if (!skipArrays && Array.isArray(val)) { - val = val.slice(); - } - - state[key] = val; - } - - return state; - } - -} - -var _isDigit = function isDigit(code) { - return code >= 48 && code <= 57; -}; -const VALID_REGEX_FLAGS = new Set(["g", "m", "s", "i", "y", "u"]); -const forbiddenNumericSeparatorSiblings = { - decBinOct: [46, 66, 69, 79, 95, 98, 101, 111], - hex: [46, 88, 95, 120] -}; -const allowedNumericSeparatorSiblings = {}; -allowedNumericSeparatorSiblings.bin = [48, 49]; -allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55]; -allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57]; -allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]; -class Token { - constructor(state) { - this.type = state.type; - this.value = state.value; - this.start = state.start; - this.end = state.end; - this.loc = new SourceLocation(state.startLoc, state.endLoc); - } - -} -class Tokenizer extends LocationParser { - constructor(options, input) { - super(); - this.state = new State(); - this.state.init(options); - this.input = input; - this.length = input.length; - this.isLookahead = false; - } - - next() { - if (this.options.tokens && !this.isLookahead) { - this.state.tokens.push(new Token(this.state)); - } - - this.state.lastTokEnd = this.state.end; - this.state.lastTokStart = this.state.start; - this.state.lastTokEndLoc = this.state.endLoc; - this.state.lastTokStartLoc = this.state.startLoc; - this.nextToken(); - } - - eat(type) { - if (this.match(type)) { - this.next(); - return true; - } else { - return false; - } - } - - match(type) { - return this.state.type === type; - } - - lookahead() { - const old = this.state; - this.state = old.clone(true); - this.isLookahead = true; - this.next(); - this.isLookahead = false; - const curr = this.state; - this.state = old; - return curr; - } - - setStrict(strict) { - this.state.strict = strict; - if (!this.match(types.num) && !this.match(types.string)) return; - this.state.pos = this.state.start; - - while (this.state.pos < this.state.lineStart) { - this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; - --this.state.curLine; - } - - this.nextToken(); - } - - curContext() { - return this.state.context[this.state.context.length - 1]; - } - - nextToken() { - const curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - this.state.containsOctal = false; - this.state.octalPosition = null; - this.state.start = this.state.pos; - this.state.startLoc = this.state.curPosition(); - - if (this.state.pos >= this.length) { - this.finishToken(types.eof); - return; - } - - if (curContext.override) { - curContext.override(this); - } else { - this.getTokenFromCode(this.input.codePointAt(this.state.pos)); - } - } - - pushComment(block, text, start, end, startLoc, endLoc) { - const comment = { - type: block ? "CommentBlock" : "CommentLine", - value: text, - start: start, - end: end, - loc: new SourceLocation(startLoc, endLoc) - }; - if (this.options.tokens) this.state.tokens.push(comment); - this.state.comments.push(comment); - this.addComment(comment); - } - - skipBlockComment() { - const startLoc = this.state.curPosition(); - const start = this.state.pos; - const end = this.input.indexOf("*/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - this.state.pos = end + 2; - lineBreakG.lastIndex = start; - let match; - - while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { - ++this.state.curLine; - this.state.lineStart = match.index + match[0].length; - } - - if (this.isLookahead) return; - this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); - } - - skipLineComment(startSkip) { - const start = this.state.pos; - const startLoc = this.state.curPosition(); - let ch = this.input.charCodeAt(this.state.pos += startSkip); - - if (this.state.pos < this.length) { - while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.length) { - ch = this.input.charCodeAt(this.state.pos); - } - } - - if (this.isLookahead) return; - this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); - } - - skipSpace() { - loop: while (this.state.pos < this.length) { - const ch = this.input.charCodeAt(this.state.pos); - - switch (ch) { - case 32: - case 160: - case 9: - ++this.state.pos; - break; - - case 13: - if (this.input.charCodeAt(this.state.pos + 1) === 10) { - ++this.state.pos; - } - - case 10: - case 8232: - case 8233: - ++this.state.pos; - ++this.state.curLine; - this.state.lineStart = this.state.pos; - break; - - case 47: - switch (this.input.charCodeAt(this.state.pos + 1)) { - case 42: - this.skipBlockComment(); - break; - - case 47: - this.skipLineComment(2); - break; - - default: - break loop; - } - - break; - - default: - if (isWhitespace(ch)) { - ++this.state.pos; - } else { - break loop; - } - - } - } - } - - finishToken(type, val) { - this.state.end = this.state.pos; - this.state.endLoc = this.state.curPosition(); - const prevType = this.state.type; - this.state.type = type; - this.state.value = val; - if (!this.isLookahead) this.updateContext(prevType); - } - - readToken_numberSign() { - if (this.state.pos === 0 && this.readToken_interpreter()) { - return; - } - - const nextPos = this.state.pos + 1; - const next = this.input.charCodeAt(nextPos); - - if (next >= 48 && next <= 57) { - this.raise(this.state.pos, "Unexpected digit after hash token"); - } - - if ((this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && this.state.classLevel > 0) { - ++this.state.pos; - this.finishToken(types.hash); - return; - } else if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { - this.finishOp(types.hash, 1); - } else { - this.raise(this.state.pos, "Unexpected character '#'"); - } - } - - readToken_dot() { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next >= 48 && next <= 57) { - this.readNumber(true); - return; - } - - const next2 = this.input.charCodeAt(this.state.pos + 2); - - if (next === 46 && next2 === 46) { - this.state.pos += 3; - this.finishToken(types.ellipsis); - } else { - ++this.state.pos; - this.finishToken(types.dot); - } - } - - readToken_slash() { - if (this.state.exprAllowed && !this.state.inType) { - ++this.state.pos; - this.readRegexp(); - return; - } - - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.slash, 1); - } - } - - readToken_interpreter() { - if (this.state.pos !== 0 || this.length < 2) return false; - const start = this.state.pos; - this.state.pos += 1; - let ch = this.input.charCodeAt(this.state.pos); - if (ch !== 33) return false; - - while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.length) { - ch = this.input.charCodeAt(this.state.pos); - } - - const value = this.input.slice(start + 2, this.state.pos); - this.finishToken(types.interpreterDirective, value); - return true; - } - - readToken_mult_modulo(code) { - let type = code === 42 ? types.star : types.modulo; - let width = 1; - let next = this.input.charCodeAt(this.state.pos + 1); - const exprAllowed = this.state.exprAllowed; - - if (code === 42 && next === 42) { - width++; - next = this.input.charCodeAt(this.state.pos + 2); - type = types.exponent; - } - - if (next === 61 && !exprAllowed) { - width++; - type = types.assign; - } - - this.finishOp(type, width); - } - - readToken_pipe_amp(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (this.input.charCodeAt(this.state.pos + 2) === 61) { - this.finishOp(types.assign, 3); - } else { - this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); - } - - return; - } - - if (code === 124) { - if (next === 62) { - this.finishOp(types.pipeline, 2); - return; - } - } - - if (next === 61) { - this.finishOp(types.assign, 2); - return; - } - - this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); - } - - readToken_caret() { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.bitwiseXOR, 1); - } - } - - readToken_plus_min(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos)))) { - this.skipLineComment(3); - this.skipSpace(); - this.nextToken(); - return; - } - - this.finishOp(types.incDec, 2); - return; - } - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.plusMin, 1); - } - } - - readToken_lt_gt(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - let size = 1; - - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; - - if (this.input.charCodeAt(this.state.pos + size) === 61) { - this.finishOp(types.assign, size + 1); - return; - } - - this.finishOp(types.bitShift, size); - return; - } - - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { - this.skipLineComment(4); - this.skipSpace(); - this.nextToken(); - return; - } - - if (next === 61) { - size = 2; - } - - this.finishOp(types.relational, size); - } - - readToken_eq_excl(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); - return; - } - - if (code === 61 && next === 62) { - this.state.pos += 2; - this.finishToken(types.arrow); - return; - } - - this.finishOp(code === 61 ? types.eq : types.bang, 1); - } - - readToken_question() { - const next = this.input.charCodeAt(this.state.pos + 1); - const next2 = this.input.charCodeAt(this.state.pos + 2); - - if (next === 63 && !this.state.inType) { - if (next2 === 61) { - this.finishOp(types.assign, 3); - } else { - this.finishOp(types.nullishCoalescing, 2); - } - } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { - this.state.pos += 2; - this.finishToken(types.questionDot); - } else { - ++this.state.pos; - this.finishToken(types.question); - } - } - - getTokenFromCode(code) { - switch (code) { - case 46: - this.readToken_dot(); - return; - - case 40: - ++this.state.pos; - this.finishToken(types.parenL); - return; - - case 41: - ++this.state.pos; - this.finishToken(types.parenR); - return; - - case 59: - ++this.state.pos; - this.finishToken(types.semi); - return; - - case 44: - ++this.state.pos; - this.finishToken(types.comma); - return; - - case 91: - ++this.state.pos; - this.finishToken(types.bracketL); - return; - - case 93: - ++this.state.pos; - this.finishToken(types.bracketR); - return; - - case 123: - ++this.state.pos; - this.finishToken(types.braceL); - return; - - case 125: - ++this.state.pos; - this.finishToken(types.braceR); - return; - - case 58: - if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { - this.finishOp(types.doubleColon, 2); - } else { - ++this.state.pos; - this.finishToken(types.colon); - } - - return; - - case 63: - this.readToken_question(); - return; - - case 96: - ++this.state.pos; - this.finishToken(types.backQuote); - return; - - case 48: - { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 120 || next === 88) { - this.readRadixNumber(16); - return; - } - - if (next === 111 || next === 79) { - this.readRadixNumber(8); - return; - } - - if (next === 98 || next === 66) { - this.readRadixNumber(2); - return; - } - } - - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - this.readNumber(false); - return; - - case 34: - case 39: - this.readString(code); - return; - - case 47: - this.readToken_slash(); - return; - - case 37: - case 42: - this.readToken_mult_modulo(code); - return; - - case 124: - case 38: - this.readToken_pipe_amp(code); - return; - - case 94: - this.readToken_caret(); - return; - - case 43: - case 45: - this.readToken_plus_min(code); - return; - - case 60: - case 62: - this.readToken_lt_gt(code); - return; - - case 61: - case 33: - this.readToken_eq_excl(code); - return; - - case 126: - this.finishOp(types.tilde, 1); - return; - - case 64: - ++this.state.pos; - this.finishToken(types.at); - return; - - case 35: - this.readToken_numberSign(); - return; - - case 92: - this.readWord(); - return; - - default: - if (isIdentifierStart(code)) { - this.readWord(); - return; - } - - } - - this.raise(this.state.pos, `Unexpected character '${String.fromCodePoint(code)}'`); - } - - finishOp(type, size) { - const str = this.input.slice(this.state.pos, this.state.pos + size); - this.state.pos += size; - this.finishToken(type, str); - } - - readRegexp() { - const start = this.state.pos; - let escaped, inClass; - - for (;;) { - if (this.state.pos >= this.length) { - this.raise(start, "Unterminated regular expression"); - } - - const ch = this.input.charAt(this.state.pos); - - if (lineBreak.test(ch)) { - this.raise(start, "Unterminated regular expression"); - } - - if (escaped) { - escaped = false; - } else { - if (ch === "[") { - inClass = true; - } else if (ch === "]" && inClass) { - inClass = false; - } else if (ch === "/" && !inClass) { - break; - } - - escaped = ch === "\\"; - } - - ++this.state.pos; - } - - const content = this.input.slice(start, this.state.pos); - ++this.state.pos; - let mods = ""; - - while (this.state.pos < this.length) { - const char = this.input[this.state.pos]; - const charCode = this.input.codePointAt(this.state.pos); - - if (VALID_REGEX_FLAGS.has(char)) { - if (mods.indexOf(char) > -1) { - this.raise(this.state.pos + 1, "Duplicate regular expression flag"); - } - - ++this.state.pos; - mods += char; - } else if (isIdentifierChar(charCode) || charCode === 92) { - this.raise(this.state.pos + 1, "Invalid regular expression flag"); - } else { - break; - } - } - - this.finishToken(types.regexp, { - pattern: content, - flags: mods - }); - } - - readInt(radix, len) { - const start = this.state.pos; - const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; - const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin; - let total = 0; - - for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { - const code = this.input.charCodeAt(this.state.pos); - let val; - - if (this.hasPlugin("numericSeparator")) { - const prev = this.input.charCodeAt(this.state.pos - 1); - const next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 95) { - if (allowedSiblings.indexOf(next) === -1) { - this.raise(this.state.pos, "Invalid or unexpected token"); - } - - if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) { - this.raise(this.state.pos, "Invalid or unexpected token"); - } - - ++this.state.pos; - continue; - } - } - - if (code >= 97) { - val = code - 97 + 10; - } else if (code >= 65) { - val = code - 65 + 10; - } else if (_isDigit(code)) { - val = code - 48; - } else { - val = Infinity; - } - - if (val >= radix) break; - ++this.state.pos; - total = total * radix + val; - } - - if (this.state.pos === start || len != null && this.state.pos - start !== len) { - return null; - } - - return total; - } - - readRadixNumber(radix) { - const start = this.state.pos; - let isBigInt = false; - this.state.pos += 2; - const val = this.readInt(radix); - - if (val == null) { - this.raise(this.state.start + 2, "Expected number in radix " + radix); - } - - if (this.hasPlugin("bigInt")) { - if (this.input.charCodeAt(this.state.pos) === 110) { - ++this.state.pos; - isBigInt = true; - } - } - - if (isIdentifierStart(this.input.codePointAt(this.state.pos))) { - this.raise(this.state.pos, "Identifier directly after number"); - } - - if (isBigInt) { - const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - this.finishToken(types.bigint, str); - return; - } - - this.finishToken(types.num, val); - } - - readNumber(startsWithDot) { - const start = this.state.pos; - let isFloat = false; - let isBigInt = false; - - if (!startsWithDot && this.readInt(10) === null) { - this.raise(start, "Invalid number"); - } - - let octal = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; - - if (octal) { - if (this.state.strict) { - this.raise(start, "Legacy octal literals are not allowed in strict mode"); - } - - if (/[89]/.test(this.input.slice(start, this.state.pos))) { - octal = false; - } - } - - let next = this.input.charCodeAt(this.state.pos); - - if (next === 46 && !octal) { - ++this.state.pos; - this.readInt(10); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - - if ((next === 69 || next === 101) && !octal) { - next = this.input.charCodeAt(++this.state.pos); - - if (next === 43 || next === 45) { - ++this.state.pos; - } - - if (this.readInt(10) === null) this.raise(start, "Invalid number"); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - - if (this.hasPlugin("bigInt")) { - if (next === 110) { - if (isFloat || octal) this.raise(start, "Invalid BigIntLiteral"); - ++this.state.pos; - isBigInt = true; - } - } - - if (isIdentifierStart(this.input.codePointAt(this.state.pos))) { - this.raise(this.state.pos, "Identifier directly after number"); - } - - const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - - if (isBigInt) { - this.finishToken(types.bigint, str); - return; - } - - const val = octal ? parseInt(str, 8) : parseFloat(str); - this.finishToken(types.num, val); - } - - readCodePoint(throwOnInvalid) { - const ch = this.input.charCodeAt(this.state.pos); - let code; - - if (ch === 123) { - const codePos = ++this.state.pos; - code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid); - ++this.state.pos; - - if (code === null) { - --this.state.invalidTemplateEscapePosition; - } else if (code > 0x10ffff) { - if (throwOnInvalid) { - this.raise(codePos, "Code point out of bounds"); - } else { - this.state.invalidTemplateEscapePosition = codePos - 2; - return null; - } - } - } else { - code = this.readHexChar(4, throwOnInvalid); - } - - return code; - } - - readString(quote) { - let out = "", - chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.length) { - this.raise(this.state.start, "Unterminated string constant"); - } - - const ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.readEscapedChar(false); - chunkStart = this.state.pos; - } else if (ch === 8232 || ch === 8233) { - ++this.state.pos; - ++this.state.curLine; - } else if (isNewLine(ch)) { - this.raise(this.state.start, "Unterminated string constant"); - } else { - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - this.finishToken(types.string, out); - } - - readTmplToken() { - let out = "", - chunkStart = this.state.pos, - containsInvalid = false; - - for (;;) { - if (this.state.pos >= this.length) { - this.raise(this.state.start, "Unterminated template"); - } - - const ch = this.input.charCodeAt(this.state.pos); - - if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { - if (this.state.pos === this.state.start && this.match(types.template)) { - if (ch === 36) { - this.state.pos += 2; - this.finishToken(types.dollarBraceL); - return; - } else { - ++this.state.pos; - this.finishToken(types.backQuote); - return; - } - } - - out += this.input.slice(chunkStart, this.state.pos); - this.finishToken(types.template, containsInvalid ? null : out); - return; - } - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - const escaped = this.readEscapedChar(true); - - if (escaped === null) { - containsInvalid = true; - } else { - out += escaped; - } - - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - ++this.state.pos; - - switch (ch) { - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - out += "\n"; - break; - - default: - out += String.fromCharCode(ch); - break; - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - } - - readEscapedChar(inTemplate) { - const throwOnInvalid = !inTemplate; - const ch = this.input.charCodeAt(++this.state.pos); - ++this.state.pos; - - switch (ch) { - case 110: - return "\n"; - - case 114: - return "\r"; - - case 120: - { - const code = this.readHexChar(2, throwOnInvalid); - return code === null ? null : String.fromCharCode(code); - } - - case 117: - { - const code = this.readCodePoint(throwOnInvalid); - return code === null ? null : String.fromCodePoint(code); - } - - case 116: - return "\t"; - - case 98: - return "\b"; - - case 118: - return "\u000b"; - - case 102: - return "\f"; - - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - this.state.lineStart = this.state.pos; - ++this.state.curLine; - - case 8232: - case 8233: - return ""; - - default: - if (ch >= 48 && ch <= 55) { - const codePos = this.state.pos - 1; - let octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0]; - let octal = parseInt(octalStr, 8); - - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); - } - - this.state.pos += octalStr.length - 1; - const next = this.input.charCodeAt(this.state.pos); - - if (octalStr !== "0" || next === 56 || next === 57) { - if (inTemplate) { - this.state.invalidTemplateEscapePosition = codePos; - return null; - } else if (this.state.strict) { - this.raise(codePos, "Octal literal in strict mode"); - } else if (!this.state.containsOctal) { - this.state.containsOctal = true; - this.state.octalPosition = codePos; - } - } - - return String.fromCharCode(octal); - } - - return String.fromCharCode(ch); - } - } - - readHexChar(len, throwOnInvalid) { - const codePos = this.state.pos; - const n = this.readInt(16, len); - - if (n === null) { - if (throwOnInvalid) { - this.raise(codePos, "Bad character escape sequence"); - } else { - this.state.pos = codePos - 1; - this.state.invalidTemplateEscapePosition = codePos - 1; - } - } - - return n; - } - - readWord1() { - let word = ""; - this.state.containsEsc = false; - const start = this.state.pos; - let chunkStart = this.state.pos; - - while (this.state.pos < this.length) { - const ch = this.input.codePointAt(this.state.pos); - - if (isIdentifierChar(ch)) { - this.state.pos += ch <= 0xffff ? 1 : 2; - } else if (this.state.isIterator && ch === 64) { - ++this.state.pos; - } else if (ch === 92) { - this.state.containsEsc = true; - word += this.input.slice(chunkStart, this.state.pos); - const escStart = this.state.pos; - const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; - - if (this.input.charCodeAt(++this.state.pos) !== 117) { - this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX"); - } - - ++this.state.pos; - const esc = this.readCodePoint(true); - - if (!identifierCheck(esc, true)) { - this.raise(escStart, "Invalid Unicode escape"); - } - - word += String.fromCodePoint(esc); - chunkStart = this.state.pos; - } else { - break; - } - } - - return word + this.input.slice(chunkStart, this.state.pos); - } - - isIterator(word) { - return word === "@@iterator" || word === "@@asyncIterator"; - } - - readWord() { - const word = this.readWord1(); - const type = keywords.get(word) || types.name; - - if (type.keyword && this.state.containsEsc) { - this.raise(this.state.pos, `Escape sequence in keyword ${word}`); - } - - if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) { - this.raise(this.state.pos, `Invalid identifier ${word}`); - } - - this.finishToken(type, word); - } - - braceIsBlock(prevType) { - const parent = this.curContext(); - - if (parent === types$1.functionExpression || parent === types$1.functionStatement) { - return true; - } - - if (prevType === types.colon && (parent === types$1.braceStatement || parent === types$1.braceExpression)) { - return !parent.isExpr; - } - - if (prevType === types._return || prevType === types.name && this.state.exprAllowed) { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - } - - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) { - return true; - } - - if (prevType === types.braceL) { - return parent === types$1.braceStatement; - } - - if (prevType === types._var || prevType === types._const || prevType === types.name) { - return false; - } - - if (prevType === types.relational) { - return true; - } - - return !this.state.exprAllowed; - } - - updateContext(prevType) { - const type = this.state.type; - let update; - - if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) { - this.state.exprAllowed = false; - } else if (update = type.updateContext) { - update.call(this, prevType); - } else { - this.state.exprAllowed = type.beforeExpr; - } - } - -} - -const literal = /^('|")((?:\\?.)*?)\1/; -class UtilParser extends Tokenizer { - addExtra(node, key, val) { - if (!node) return; - const extra = node.extra = node.extra || {}; - extra[key] = val; - } - - isRelational(op) { - return this.match(types.relational) && this.state.value === op; - } - - isLookaheadRelational(op) { - const l = this.lookahead(); - return l.type === types.relational && l.value === op; - } - - expectRelational(op) { - if (this.isRelational(op)) { - this.next(); - } else { - this.unexpected(null, types.relational); - } - } - - eatRelational(op) { - if (this.isRelational(op)) { - this.next(); - return true; - } - - return false; - } - - isContextual(name) { - return this.match(types.name) && this.state.value === name && !this.state.containsEsc; - } - - isLookaheadContextual(name) { - const l = this.lookahead(); - return l.type === types.name && l.value === name; - } - - eatContextual(name) { - return this.isContextual(name) && this.eat(types.name); - } - - expectContextual(name, message) { - if (!this.eatContextual(name)) this.unexpected(null, message); - } - - canInsertSemicolon() { - return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak(); - } - - hasPrecedingLineBreak() { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - } - - isLineTerminator() { - return this.eat(types.semi) || this.canInsertSemicolon(); - } - - semicolon() { - if (!this.isLineTerminator()) this.unexpected(null, types.semi); - } - - expect(type, pos) { - this.eat(type) || this.unexpected(pos, type); - } - - assertNoSpace(message = "Unexpected space.") { - if (this.state.start > this.state.lastTokEnd) { - this.raise(this.state.lastTokEnd, message); - } - } - - unexpected(pos, messageOrType = "Unexpected token") { - if (typeof messageOrType !== "string") { - messageOrType = `Unexpected token, expected "${messageOrType.label}"`; - } - - throw this.raise(pos != null ? pos : this.state.start, messageOrType); - } - - expectPlugin(name, pos) { - if (!this.hasPlugin(name)) { - throw this.raise(pos != null ? pos : this.state.start, `This experimental syntax requires enabling the parser plugin: '${name}'`, { - missingPluginNames: [name] - }); - } - - return true; - } - - expectOnePlugin(names, pos) { - if (!names.some(n => this.hasPlugin(n))) { - throw this.raise(pos != null ? pos : this.state.start, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`, { - missingPluginNames: names - }); - } - } - - checkYieldAwaitInDefaultParams() { - if (this.state.yieldPos && (!this.state.awaitPos || this.state.yieldPos < this.state.awaitPos)) { - this.raise(this.state.yieldPos, "Yield cannot be used as name inside a generator function"); - } - - if (this.state.awaitPos) { - this.raise(this.state.awaitPos, "Await cannot be used as name inside an async function"); - } - } - - strictDirective(start) { - for (;;) { - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - const match = literal.exec(this.input.slice(start)); - if (!match) break; - if (match[2] === "use strict") return true; - start += match[0].length; - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - - if (this.input[start] === ";") { - start++; - } - } - - return false; - } - -} - -class Node { - constructor(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - this.loc = new SourceLocation(loc); - if (parser && parser.options.ranges) this.range = [pos, 0]; - if (parser && parser.filename) this.loc.filename = parser.filename; - } - - __clone() { - const newNode = new Node(); - const keys = Object.keys(this); - - for (let i = 0, length = keys.length; i < length; i++) { - const key = keys[i]; - - if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { - newNode[key] = this[key]; - } - } - - return newNode; - } - -} - -class NodeUtils extends UtilParser { - startNode() { - return new Node(this, this.state.start, this.state.startLoc); - } - - startNodeAt(pos, loc) { - return new Node(this, pos, loc); - } - - startNodeAtNode(type) { - return this.startNodeAt(type.start, type.loc.start); - } - - finishNode(node, type) { - return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc); - } - - finishNodeAt(node, type, pos, loc) { - - node.type = type; - node.end = pos; - node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - this.processComment(node); - return node; - } - - resetStartLocation(node, start, startLoc) { - node.start = start; - node.loc.start = startLoc; - if (this.options.ranges) node.range[0] = start; - } - - resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) { - node.end = end; - node.loc.end = endLoc; - if (this.options.ranges) node.range[1] = end; - } - - resetStartLocationFromNode(node, locationNode) { - this.resetStartLocation(node, locationNode.start, locationNode.loc.start); - } - -} - -class LValParser extends NodeUtils { - toAssignable(node, isBinding, contextDescription) { - if (node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - - for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { - const prop = node.properties[i]; - const isLast = i === last; - this.toAssignableObjectExpressionProp(prop, isBinding, isLast); - } - - break; - - case "ObjectProperty": - this.toAssignable(node.value, isBinding, contextDescription); - break; - - case "SpreadElement": - { - this.checkToRestConversion(node); - node.type = "RestElement"; - const arg = node.argument; - this.toAssignable(arg, isBinding, contextDescription); - break; - } - - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding, contextDescription); - break; - - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - delete node.operator; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - - break; - - case "ParenthesizedExpression": - node.expression = this.toAssignable(node.expression, isBinding, contextDescription); - break; - - case "MemberExpression": - if (!isBinding) break; - - default: - { - const message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); - this.raise(node.start, message); - } - } - } - - return node; - } - - toAssignableObjectExpressionProp(prop, isBinding, isLast) { - if (prop.type === "ObjectMethod") { - const error = prop.kind === "get" || prop.kind === "set" ? "Object pattern can't contain getter or setter" : "Object pattern can't contain methods"; - this.raise(prop.key.start, error); - } else if (prop.type === "SpreadElement" && !isLast) { - this.raiseRestNotLast(prop.start); - } else { - this.toAssignable(prop, isBinding, "object destructuring pattern"); - } - } - - toAssignableList(exprList, isBinding, contextDescription) { - let end = exprList.length; - - if (end) { - const last = exprList[end - 1]; - - if (last && last.type === "RestElement") { - --end; - } else if (last && last.type === "SpreadElement") { - last.type = "RestElement"; - const arg = last.argument; - this.toAssignable(arg, isBinding, contextDescription); - - if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") { - this.unexpected(arg.start); - } - - --end; - } - } - - for (let i = 0; i < end; i++) { - const elt = exprList[i]; - - if (elt) { - this.toAssignable(elt, isBinding, contextDescription); - - if (elt.type === "RestElement") { - this.raiseRestNotLast(elt.start); - } - } - } - - return exprList; - } - - toReferencedList(exprList, isParenthesizedExpr) { - return exprList; - } - - toReferencedListDeep(exprList, isParenthesizedExpr) { - this.toReferencedList(exprList, isParenthesizedExpr); - - for (let _i = 0; _i < exprList.length; _i++) { - const expr = exprList[_i]; - - if (expr && expr.type === "ArrayExpression") { - this.toReferencedListDeep(expr.elements); - } - } - - return exprList; - } - - parseSpread(refShorthandDefaultPos, refNeedsArrowPos) { - const node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos, undefined, refNeedsArrowPos); - - if (this.state.commaAfterSpreadAt === -1 && this.match(types.comma)) { - this.state.commaAfterSpreadAt = this.state.start; - } - - return this.finishNode(node, "SpreadElement"); - } - - parseRestBinding() { - const node = this.startNode(); - this.next(); - node.argument = this.parseBindingAtom(); - return this.finishNode(node, "RestElement"); - } - - parseBindingAtom() { - switch (this.state.type) { - case types.bracketL: - { - const node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true); - return this.finishNode(node, "ArrayPattern"); - } - - case types.braceL: - return this.parseObj(true); - } - - return this.parseIdentifier(); - } - - parseBindingList(close, allowEmpty, allowModifiers) { - const elts = []; - let first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - } - - if (allowEmpty && this.match(types.comma)) { - elts.push(null); - } else if (this.eat(close)) { - break; - } else if (this.match(types.ellipsis)) { - elts.push(this.parseAssignableListItemTypes(this.parseRestBinding())); - this.checkCommaAfterRest(); - this.expect(close); - break; - } else { - const decorators = []; - - if (this.match(types.at) && this.hasPlugin("decorators")) { - this.raise(this.state.start, "Stage 2 decorators cannot be used to decorate parameters"); - } - - while (this.match(types.at)) { - decorators.push(this.parseDecorator()); - } - - elts.push(this.parseAssignableListItem(allowModifiers, decorators)); - } - } - - return elts; - } - - parseAssignableListItem(allowModifiers, decorators) { - const left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - const elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - } - - parseAssignableListItemTypes(param) { - return param; - } - - parseMaybeDefault(startPos, startLoc, left) { - startLoc = startLoc || this.state.startLoc; - startPos = startPos || this.state.start; - left = left || this.parseBindingAtom(); - if (!this.eat(types.eq)) return left; - const node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); - } - - checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { - switch (expr.type) { - case "Identifier": - if (this.state.strict && isStrictBindReservedWord(expr.name, this.inModule)) { - this.raise(expr.start, `${bindingType === BIND_NONE ? "Assigning to" : "Binding"} '${expr.name}' in strict mode`); - } - - if (checkClashes) { - const key = `_${expr.name}`; - - if (checkClashes[key]) { - this.raise(expr.start, "Argument name clash"); - } else { - checkClashes[key] = true; - } - } - - if (bindingType === BIND_LEXICAL && expr.name === "let") { - this.raise(expr.start, "'let' is not allowed to be used as a name in 'let' or 'const' declarations."); - } - - if (!(bindingType & BIND_NONE)) { - this.scope.declareName(expr.name, bindingType, expr.start); - } - - break; - - case "MemberExpression": - if (bindingType !== BIND_NONE) { - this.raise(expr.start, "Binding member expression"); - } - - break; - - case "ObjectPattern": - for (let _i2 = 0, _expr$properties = expr.properties; _i2 < _expr$properties.length; _i2++) { - let prop = _expr$properties[_i2]; - if (prop.type === "ObjectProperty") prop = prop.value; - this.checkLVal(prop, bindingType, checkClashes, "object destructuring pattern"); - } - - break; - - case "ArrayPattern": - for (let _i3 = 0, _expr$elements = expr.elements; _i3 < _expr$elements.length; _i3++) { - const elem = _expr$elements[_i3]; - - if (elem) { - this.checkLVal(elem, bindingType, checkClashes, "array destructuring pattern"); - } - } - - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, bindingType, checkClashes, "assignment pattern"); - break; - - case "RestElement": - this.checkLVal(expr.argument, bindingType, checkClashes, "rest element"); - break; - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, bindingType, checkClashes, "parenthesized expression"); - break; - - default: - { - const message = (bindingType === BIND_NONE ? "Invalid" : "Binding invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); - this.raise(expr.start, message); - } - } - } - - checkToRestConversion(node) { - if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") { - this.raise(node.argument.start, "Invalid rest operator's argument"); - } - } - - checkCommaAfterRest() { - if (this.match(types.comma)) { - this.raiseRestNotLast(this.state.start); - } - } - - checkCommaAfterRestFromSpread() { - if (this.state.commaAfterSpreadAt > -1) { - this.raiseRestNotLast(this.state.commaAfterSpreadAt); - } - } - - raiseRestNotLast(pos) { - this.raise(pos, `Rest element must be last element`); - } - -} - -const unwrapParenthesizedExpression = node => { - return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; -}; - -class ExpressionParser extends LValParser { - checkPropClash(prop, propHash) { - if (prop.type === "SpreadElement" || prop.computed || prop.kind || prop.shorthand) { - return; - } - - const key = prop.key; - const name = key.type === "Identifier" ? key.name : String(key.value); - - if (name === "__proto__") { - if (propHash.proto) { - this.raise(key.start, "Redefinition of __proto__ property"); - } - - propHash.proto = true; - } - } - - getExpression() { - this.scope.enter(SCOPE_PROGRAM); - this.nextToken(); - const expr = this.parseExpression(); - - if (!this.match(types.eof)) { - this.unexpected(); - } - - expr.comments = this.state.comments; - return expr; - } - - parseExpression(noIn, refShorthandDefaultPos) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - - if (this.match(types.comma)) { - const node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - - while (this.eat(types.comma)) { - node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - } - - this.toReferencedList(node.expressions); - return this.finishNode(node, "SequenceExpression"); - } - - return expr; - } - - parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - - if (this.isContextual("yield")) { - if (this.scope.inGenerator) { - let left = this.parseYield(noIn); - - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startPos, startLoc); - } - - return left; - } else { - this.state.exprAllowed = false; - } - } - - const oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt; - this.state.commaAfterSpreadAt = -1; - let failOnShorthandAssign; - - if (refShorthandDefaultPos) { - failOnShorthandAssign = false; - } else { - refShorthandDefaultPos = { - start: 0 - }; - failOnShorthandAssign = true; - } - - if (this.match(types.parenL) || this.match(types.name)) { - this.state.potentialArrowAt = this.state.start; - } - - let left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos); - - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startPos, startLoc); - } - - if (this.state.type.isAssign) { - const node = this.startNodeAt(startPos, startLoc); - const operator = this.state.value; - node.operator = operator; - - if (operator === "??=") { - this.expectPlugin("nullishCoalescingOperator"); - this.expectPlugin("logicalAssignment"); - } - - if (operator === "||=" || operator === "&&=") { - this.expectPlugin("logicalAssignment"); - } - - node.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left; - refShorthandDefaultPos.start = 0; - this.checkLVal(left, undefined, undefined, "assignment expression"); - const maybePattern = unwrapParenthesizedExpression(left); - let patternErrorMsg; - - if (maybePattern.type === "ObjectPattern") { - patternErrorMsg = "`({a}) = 0` use `({a} = 0)`"; - } else if (maybePattern.type === "ArrayPattern") { - patternErrorMsg = "`([a]) = 0` use `([a] = 0)`"; - } - - if (patternErrorMsg && (left.extra && left.extra.parenthesized || left.type === "ParenthesizedExpression")) { - this.raise(maybePattern.start, `You're trying to assign to a parenthesized expression, eg. instead of ${patternErrorMsg}`); - } - - if (patternErrorMsg) this.checkCommaAfterRestFromSpread(); - this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; - return left; - } - - parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseExprOps(noIn, refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos); - } - - parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (this.eat(types.question)) { - const node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression"); - } - - return expr; - } - - parseExprOps(noIn, refShorthandDefaultPos) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseMaybeUnary(refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } - - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); - } - - parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { - const prec = this.state.type.binop; - - if (prec != null && (!noIn || !this.match(types._in))) { - if (prec > minPrec) { - const operator = this.state.value; - - if (operator === "|>" && this.state.inFSharpPipelineDirectBody) { - return left; - } - - const node = this.startNodeAt(leftStartPos, leftStartLoc); - node.left = left; - node.operator = operator; - - if (operator === "**" && left.type === "UnaryExpression" && (this.options.createParenthesizedExpressions || !(left.extra && left.extra.parenthesized))) { - this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses."); - } - - const op = this.state.type; - - if (op === types.pipeline) { - this.expectPlugin("pipelineOperator"); - this.state.inPipeline = true; - this.checkPipelineAtInfixOperator(left, leftStartPos); - } else if (op === types.nullishCoalescing) { - this.expectPlugin("nullishCoalescingOperator"); - } - - this.next(); - - if (op === types.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") { - if (this.match(types.name) && this.state.value === "await" && this.scope.inAsync) { - throw this.raise(this.state.start, `Unexpected "await" after pipeline body; await must have parentheses in minimal proposal`); - } - } - - node.right = this.parseExprOpRightExpr(op, prec, noIn); - this.finishNode(node, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - - return left; - } - - parseExprOpRightExpr(op, prec, noIn) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - - switch (op) { - case types.pipeline: - switch (this.getPluginOption("pipelineOperator", "proposal")) { - case "smart": - return this.withTopicPermittingContext(() => { - return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec, noIn), startPos, startLoc); - }); - - case "fsharp": - return this.withSoloAwaitPermittingContext(() => { - return this.parseFSharpPipelineBody(prec, noIn); - }); - } - - default: - return this.parseExprOpBaseRightExpr(op, prec, noIn); - } - } - - parseExprOpBaseRightExpr(op, prec, noIn) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn); - } - - parseMaybeUnary(refShorthandDefaultPos) { - if (this.isContextual("await") && (this.scope.inAsync || !this.scope.inFunction && this.options.allowAwaitOutsideFunction)) { - return this.parseAwait(); - } else if (this.state.type.prefix) { - const node = this.startNode(); - const update = this.match(types.incDec); - node.operator = this.state.value; - node.prefix = true; - - if (node.operator === "throw") { - this.expectPlugin("throwExpressions"); - } - - this.next(); - node.argument = this.parseMaybeUnary(); - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (update) { - this.checkLVal(node.argument, undefined, undefined, "prefix operation"); - } else if (this.state.strict && node.operator === "delete") { - const arg = node.argument; - - if (arg.type === "Identifier") { - this.raise(node.start, "Deleting local variable in strict mode"); - } else if (arg.type === "MemberExpression" && arg.property.type === "PrivateName") { - this.raise(node.start, "Deleting a private field is not allowed"); - } - } - - return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } - - const startPos = this.state.start; - const startLoc = this.state.startLoc; - let expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - - while (this.state.type.postfix && !this.canInsertSemicolon()) { - const node = this.startNodeAt(startPos, startLoc); - node.operator = this.state.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr, undefined, undefined, "postfix operation"); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - - return expr; - } - - parseExprSubscripts(refShorthandDefaultPos) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseExprAtom(refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } - - return this.parseSubscripts(expr, startPos, startLoc); - } - - parseSubscripts(base, startPos, startLoc, noCalls) { - const maybeAsyncArrow = this.atPossibleAsync(base); - const state = { - optionalChainMember: false, - stop: false - }; - - do { - base = this.parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow); - } while (!state.stop); - - return base; - } - - parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow) { - if (!noCalls && this.eat(types.doubleColon)) { - const node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.callee = this.parseNoCallExpr(); - state.stop = true; - return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls); - } else if (this.match(types.questionDot)) { - this.expectPlugin("optionalChaining"); - state.optionalChainMember = true; - - if (noCalls && this.lookahead().type === types.parenL) { - state.stop = true; - return base; - } - - this.next(); - const node = this.startNodeAt(startPos, startLoc); - - if (this.eat(types.bracketL)) { - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - node.optional = true; - this.expect(types.bracketR); - return this.finishNode(node, "OptionalMemberExpression"); - } else if (this.eat(types.parenL)) { - node.callee = base; - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - node.optional = true; - return this.finishNode(node, "OptionalCallExpression"); - } else { - node.object = base; - node.property = this.parseIdentifier(true); - node.computed = false; - node.optional = true; - return this.finishNode(node, "OptionalMemberExpression"); - } - } else if (this.eat(types.dot)) { - const node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseMaybePrivateName(); - node.computed = false; - - if (state.optionalChainMember) { - node.optional = false; - return this.finishNode(node, "OptionalMemberExpression"); - } - - return this.finishNode(node, "MemberExpression"); - } else if (this.eat(types.bracketL)) { - const node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(types.bracketR); - - if (state.optionalChainMember) { - node.optional = false; - return this.finishNode(node, "OptionalMemberExpression"); - } - - return this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.match(types.parenL)) { - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - this.state.maybeInArrowParameters = true; - this.state.yieldPos = 0; - this.state.awaitPos = 0; - this.next(); - let node = this.startNodeAt(startPos, startLoc); - node.callee = base; - const oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt; - this.state.commaAfterSpreadAt = -1; - node.arguments = this.parseCallExpressionArguments(types.parenR, maybeAsyncArrow, base.type === "Import", base.type !== "Super"); - - if (!state.optionalChainMember) { - this.finishCallExpression(node); - } else { - this.finishOptionalCallExpression(node); - } - - if (maybeAsyncArrow && this.shouldParseAsyncArrow()) { - state.stop = true; - this.checkCommaAfterRestFromSpread(); - node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node); - this.checkYieldAwaitInDefaultParams(); - this.state.yieldPos = oldYieldPos; - this.state.awaitPos = oldAwaitPos; - } else { - this.toReferencedListDeep(node.arguments); - this.state.yieldPos = oldYieldPos || this.state.yieldPos; - this.state.awaitPos = oldAwaitPos || this.state.awaitPos; - } - - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; - return node; - } else if (this.match(types.backQuote)) { - return this.parseTaggedTemplateExpression(startPos, startLoc, base, state); - } else { - state.stop = true; - return base; - } - } - - parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments) { - const node = this.startNodeAt(startPos, startLoc); - node.tag = base; - node.quasi = this.parseTemplate(true); - if (typeArguments) node.typeParameters = typeArguments; - - if (state.optionalChainMember) { - this.raise(startPos, "Tagged Template Literals are not allowed in optionalChain"); - } - - return this.finishNode(node, "TaggedTemplateExpression"); - } - - atPossibleAsync(base) { - return base.type === "Identifier" && base.name === "async" && this.state.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; - } - - finishCallExpression(node) { - if (node.callee.type === "Import") { - if (node.arguments.length !== 1) { - this.raise(node.start, "import() requires exactly one argument"); - } - - const importArg = node.arguments[0]; - - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - - return this.finishNode(node, "CallExpression"); - } - - finishOptionalCallExpression(node) { - if (node.callee.type === "Import") { - if (node.arguments.length !== 1) { - this.raise(node.start, "import() requires exactly one argument"); - } - - const importArg = node.arguments[0]; - - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - - return this.finishNode(node, "OptionalCallExpression"); - } - - parseCallExpressionArguments(close, possibleAsyncArrow, dynamicImport, allowPlaceholder) { - const elts = []; - let innerParenStart; - let first = true; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - - if (this.eat(close)) { - if (dynamicImport) { - this.raise(this.state.lastTokStart, "Trailing comma is disallowed inside import(...) arguments"); - } - - break; - } - } - - if (this.match(types.parenL) && !innerParenStart) { - innerParenStart = this.state.start; - } - - elts.push(this.parseExprListItem(false, possibleAsyncArrow ? { - start: 0 - } : undefined, possibleAsyncArrow ? { - start: 0 - } : undefined, allowPlaceholder)); - } - - if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) { - this.unexpected(); - } - - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return elts; - } - - shouldParseAsyncArrow() { - return this.match(types.arrow) && !this.canInsertSemicolon(); - } - - parseAsyncArrowFromCallExpression(node, call) { - this.expect(types.arrow); - this.parseArrowExpression(node, call.arguments, true); - return node; - } - - parseNoCallExpr() { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - } - - parseExprAtom(refShorthandDefaultPos) { - if (this.state.type === types.slash) this.readRegexp(); - const canBeArrow = this.state.potentialArrowAt === this.state.start; - let node; - - switch (this.state.type) { - case types._super: - if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) { - this.raise(this.state.start, "super is only allowed in object methods and classes"); - } - - node = this.startNode(); - this.next(); - - if (this.match(types.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) { - this.raise(node.start, "super() is only valid inside a class constructor of a subclass. " + "Maybe a typo in the method name ('constructor') or not extending another class?"); - } - - if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) { - this.unexpected(); - } - - return this.finishNode(node, "Super"); - - case types._import: - node = this.startNode(); - this.next(); - - if (this.match(types.dot)) { - return this.parseImportMetaProperty(node); - } - - this.expectPlugin("dynamicImport", node.start); - - if (!this.match(types.parenL)) { - this.unexpected(null, types.parenL); - } - - return this.finishNode(node, "Import"); - - case types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression"); - - case types.name: - { - node = this.startNode(); - const containsEsc = this.state.containsEsc; - const id = this.parseIdentifier(); - - if (!containsEsc && id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) { - this.next(); - return this.parseFunction(node, undefined, true); - } else if (canBeArrow && !containsEsc && id.name === "async" && this.match(types.name) && !this.canInsertSemicolon()) { - const params = [this.parseIdentifier()]; - this.expect(types.arrow); - this.parseArrowExpression(node, params, true); - return node; - } - - if (canBeArrow && this.match(types.arrow) && !this.canInsertSemicolon()) { - this.next(); - this.parseArrowExpression(node, [id], false); - return node; - } - - return id; - } - - case types._do: - { - this.expectPlugin("doExpressions"); - const node = this.startNode(); - this.next(); - const oldLabels = this.state.labels; - this.state.labels = []; - node.body = this.parseBlock(); - this.state.labels = oldLabels; - return this.finishNode(node, "DoExpression"); - } - - case types.regexp: - { - const value = this.state.value; - node = this.parseLiteral(value.value, "RegExpLiteral"); - node.pattern = value.pattern; - node.flags = value.flags; - return node; - } - - case types.num: - return this.parseLiteral(this.state.value, "NumericLiteral"); - - case types.bigint: - return this.parseLiteral(this.state.value, "BigIntLiteral"); - - case types.string: - return this.parseLiteral(this.state.value, "StringLiteral"); - - case types._null: - node = this.startNode(); - this.next(); - return this.finishNode(node, "NullLiteral"); - - case types._true: - case types._false: - return this.parseBooleanLiteral(); - - case types.parenL: - return this.parseParenAndDistinguishExpression(canBeArrow); - - case types.bracketL: - { - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos); - - if (!this.state.maybeInArrowParameters) { - this.toReferencedList(node.elements); - } - - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return this.finishNode(node, "ArrayExpression"); - } - - case types.braceL: - { - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - const ret = this.parseObj(false, refShorthandDefaultPos); - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return ret; - } - - case types._function: - return this.parseFunctionExpression(); - - case types.at: - this.parseDecorators(); - - case types._class: - node = this.startNode(); - this.takeDecorators(node); - return this.parseClass(node, false); - - case types._new: - return this.parseNew(); - - case types.backQuote: - return this.parseTemplate(false); - - case types.doubleColon: - { - node = this.startNode(); - this.next(); - node.object = null; - const callee = node.callee = this.parseNoCallExpr(); - - if (callee.type === "MemberExpression") { - return this.finishNode(node, "BindExpression"); - } else { - throw this.raise(callee.start, "Binding should be performed on object property."); - } - } - - case types.hash: - { - if (this.state.inPipeline) { - node = this.startNode(); - - if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") { - this.raise(node.start, "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option."); - } - - this.next(); - - if (this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) { - this.registerTopicReference(); - return this.finishNode(node, "PipelinePrimaryTopicReference"); - } else { - throw this.raise(node.start, `Topic reference was used in a lexical context without topic binding`); - } - } - } - - default: - throw this.unexpected(); - } - } - - parseBooleanLiteral() { - const node = this.startNode(); - node.value = this.match(types._true); - this.next(); - return this.finishNode(node, "BooleanLiteral"); - } - - parseMaybePrivateName() { - const isPrivate = this.match(types.hash); - - if (isPrivate) { - this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]); - const node = this.startNode(); - this.next(); - this.assertNoSpace("Unexpected space between # and identifier"); - node.id = this.parseIdentifier(true); - return this.finishNode(node, "PrivateName"); - } else { - return this.parseIdentifier(true); - } - } - - parseFunctionExpression() { - const node = this.startNode(); - let meta = this.startNode(); - this.next(); - meta = this.createIdentifier(meta, "function"); - - if (this.scope.inGenerator && this.eat(types.dot)) { - return this.parseMetaProperty(node, meta, "sent"); - } - - return this.parseFunction(node); - } - - parseMetaProperty(node, meta, propertyName) { - node.meta = meta; - - if (meta.name === "function" && propertyName === "sent") { - if (this.isContextual(propertyName)) { - this.expectPlugin("functionSent"); - } else if (!this.hasPlugin("functionSent")) { - this.unexpected(); - } - } - - const containsEsc = this.state.containsEsc; - node.property = this.parseIdentifier(true); - - if (node.property.name !== propertyName || containsEsc) { - this.raise(node.property.start, `The only valid meta property for ${meta.name} is ${meta.name}.${propertyName}`); - } - - return this.finishNode(node, "MetaProperty"); - } - - parseImportMetaProperty(node) { - const id = this.createIdentifier(this.startNodeAtNode(node), "import"); - this.expect(types.dot); - - if (this.isContextual("meta")) { - this.expectPlugin("importMeta"); - } else if (!this.hasPlugin("importMeta")) { - this.raise(id.start, `Dynamic imports require a parameter: import('a.js')`); - } - - if (!this.inModule) { - this.raise(id.start, `import.meta may appear only with 'sourceType: "module"'`, { - code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" - }); - } - - this.sawUnambiguousESM = true; - return this.parseMetaProperty(node, id, "meta"); - } - - parseLiteral(value, type, startPos, startLoc) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; - const node = this.startNodeAt(startPos, startLoc); - this.addExtra(node, "rawValue", value); - this.addExtra(node, "raw", this.input.slice(startPos, this.state.end)); - node.value = value; - this.next(); - return this.finishNode(node, type); - } - - parseParenAndDistinguishExpression(canBeArrow) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - let val; - this.expect(types.parenL); - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.maybeInArrowParameters = true; - this.state.yieldPos = 0; - this.state.awaitPos = 0; - this.state.inFSharpPipelineDirectBody = false; - const innerStartPos = this.state.start; - const innerStartLoc = this.state.startLoc; - const exprList = []; - const refShorthandDefaultPos = { - start: 0 - }; - const refNeedsArrowPos = { - start: 0 - }; - let first = true; - let spreadStart; - let optionalCommaStart; - - while (!this.match(types.parenR)) { - if (first) { - first = false; - } else { - this.expect(types.comma, refNeedsArrowPos.start || null); - - if (this.match(types.parenR)) { - optionalCommaStart = this.state.start; - break; - } - } - - if (this.match(types.ellipsis)) { - const spreadNodeStartPos = this.state.start; - const spreadNodeStartLoc = this.state.startLoc; - spreadStart = this.state.start; - exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc)); - this.checkCommaAfterRest(); - break; - } else { - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos)); - } - } - - const innerEndPos = this.state.start; - const innerEndLoc = this.state.startLoc; - this.expect(types.parenR); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - let arrowNode = this.startNodeAt(startPos, startLoc); - - if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) { - this.checkYieldAwaitInDefaultParams(); - this.state.yieldPos = oldYieldPos; - this.state.awaitPos = oldAwaitPos; - - for (let _i = 0; _i < exprList.length; _i++) { - const param = exprList[_i]; - - if (param.extra && param.extra.parenthesized) { - this.unexpected(param.extra.parenStart); - } - } - - this.parseArrowExpression(arrowNode, exprList, false); - return arrowNode; - } - - this.state.yieldPos = oldYieldPos || this.state.yieldPos; - this.state.awaitPos = oldAwaitPos || this.state.awaitPos; - - if (!exprList.length) { - this.unexpected(this.state.lastTokStart); - } - - if (optionalCommaStart) this.unexpected(optionalCommaStart); - if (spreadStart) this.unexpected(spreadStart); - - if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start); - this.toReferencedListDeep(exprList, true); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - - if (!this.options.createParenthesizedExpressions) { - this.addExtra(val, "parenthesized", true); - this.addExtra(val, "parenStart", startPos); - return val; - } - - const parenExpression = this.startNodeAt(startPos, startLoc); - parenExpression.expression = val; - this.finishNode(parenExpression, "ParenthesizedExpression"); - return parenExpression; - } - - shouldParseArrow() { - return !this.canInsertSemicolon(); - } - - parseArrow(node) { - if (this.eat(types.arrow)) { - return node; - } - } - - parseParenItem(node, startPos, startLoc) { - return node; - } - - parseNew() { - const node = this.startNode(); - const meta = this.parseIdentifier(true); - - if (this.eat(types.dot)) { - const metaProp = this.parseMetaProperty(node, meta, "target"); - - if (!this.scope.inNonArrowFunction && !this.state.inClassProperty) { - let error = "new.target can only be used in functions"; - - if (this.hasPlugin("classProperties")) { - error += " or class properties"; - } - - this.raise(metaProp.start, error); - } - - return metaProp; - } - - node.callee = this.parseNoCallExpr(); - - if (node.callee.type === "Import") { - this.raise(node.callee.start, "Cannot use new with import(...)"); - } else if (node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression") { - this.raise(this.state.lastTokEnd, "constructors in/after an Optional Chain are not allowed"); - } else if (this.eat(types.questionDot)) { - this.raise(this.state.start, "constructors in/after an Optional Chain are not allowed"); - } - - this.parseNewArguments(node); - return this.finishNode(node, "NewExpression"); - } - - parseNewArguments(node) { - if (this.eat(types.parenL)) { - const args = this.parseExprList(types.parenR); - this.toReferencedList(args); - node.arguments = args; - } else { - node.arguments = []; - } - } - - parseTemplateElement(isTagged) { - const elem = this.startNode(); - - if (this.state.value === null) { - if (!isTagged) { - this.raise(this.state.invalidTemplateEscapePosition || 0, "Invalid escape sequence in template"); - } else { - this.state.invalidTemplateEscapePosition = null; - } - } - - elem.value = { - raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), - cooked: this.state.value - }; - this.next(); - elem.tail = this.match(types.backQuote); - return this.finishNode(elem, "TemplateElement"); - } - - parseTemplate(isTagged) { - const node = this.startNode(); - this.next(); - node.expressions = []; - let curElt = this.parseTemplateElement(isTagged); - node.quasis = [curElt]; - - while (!curElt.tail) { - this.expect(types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(types.braceR); - node.quasis.push(curElt = this.parseTemplateElement(isTagged)); - } - - this.next(); - return this.finishNode(node, "TemplateLiteral"); - } - - parseObj(isPattern, refShorthandDefaultPos) { - const propHash = Object.create(null); - let first = true; - const node = this.startNode(); - node.properties = []; - this.next(); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - const prop = this.parseObjectMember(isPattern, refShorthandDefaultPos); - if (!isPattern) this.checkPropClash(prop, propHash); - - if (prop.shorthand) { - this.addExtra(prop, "shorthand", true); - } - - node.properties.push(prop); - } - - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); - } - - isAsyncProp(prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.match(types.name) || this.match(types.num) || this.match(types.string) || this.match(types.bracketL) || this.state.type.keyword || this.match(types.star)) && !this.hasPrecedingLineBreak(); - } - - parseObjectMember(isPattern, refShorthandDefaultPos) { - let decorators = []; - - if (this.match(types.at)) { - if (this.hasPlugin("decorators")) { - this.raise(this.state.start, "Stage 2 decorators disallow object literal property decorators"); - } else { - while (this.match(types.at)) { - decorators.push(this.parseDecorator()); - } - } - } - - const prop = this.startNode(); - let isGenerator = false; - let isAsync = false; - let startPos; - let startLoc; - - if (this.match(types.ellipsis)) { - if (decorators.length) this.unexpected(); - - if (isPattern) { - this.next(); - prop.argument = this.parseIdentifier(); - this.checkCommaAfterRest(); - return this.finishNode(prop, "RestElement"); - } - - return this.parseSpread(); - } - - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } - - prop.method = false; - - if (isPattern || refShorthandDefaultPos) { - startPos = this.state.start; - startLoc = this.state.startLoc; - } - - if (!isPattern) { - isGenerator = this.eat(types.star); - } - - const containsEsc = this.state.containsEsc; - this.parsePropertyName(prop); - - if (!isPattern && !containsEsc && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.eat(types.star); - this.parsePropertyName(prop); - } else { - isAsync = false; - } - - this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); - return prop; - } - - isGetterOrSetterMethod(prop, isPattern) { - return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || this.match(types.num) || this.match(types.bracketL) || this.match(types.name) || !!this.state.type.keyword); - } - - getGetterSetterExpectedParamCount(method) { - return method.kind === "get" ? 0 : 1; - } - - checkGetterSetterParams(method) { - const paramCount = this.getGetterSetterExpectedParamCount(method); - const start = method.start; - - if (method.params.length !== paramCount) { - if (method.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (method.kind === "set" && method.params[method.params.length - 1].type === "RestElement") { - this.raise(start, "setter function argument must not be a rest parameter"); - } - } - - parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { - if (isAsync || isGenerator || this.match(types.parenL)) { - if (isPattern) this.unexpected(); - prop.kind = "method"; - prop.method = true; - return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); - } - - if (!containsEsc && this.isGetterOrSetterMethod(prop, isPattern)) { - if (isGenerator || isAsync) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - this.parseMethod(prop, false, false, false, false, "ObjectMethod"); - this.checkGetterSetterParams(prop); - return prop; - } - } - - parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { - prop.shorthand = false; - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); - return this.finishNode(prop, "ObjectProperty"); - } - - if (!prop.computed && prop.key.type === "Identifier") { - this.checkReservedWord(prop.key.name, prop.key.start, true, true); - - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else if (this.match(types.eq) && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) { - refShorthandDefaultPos.start = this.state.start; - } - - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else { - prop.value = prop.key.__clone(); - } - - prop.shorthand = true; - return this.finishNode(prop, "ObjectProperty"); - } - } - - parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { - const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos); - if (!node) this.unexpected(); - return node; - } - - parsePropertyName(prop) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - } else { - const oldInPropertyName = this.state.inPropertyName; - this.state.inPropertyName = true; - prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseMaybePrivateName(); - - if (prop.key.type !== "PrivateName") { - prop.computed = false; - } - - this.state.inPropertyName = oldInPropertyName; - } - - return prop.key; - } - - initFunction(node, isAsync) { - node.id = null; - node.generator = false; - node.async = !!isAsync; - } - - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - this.state.yieldPos = 0; - this.state.awaitPos = 0; - this.initFunction(node, isAsync); - node.generator = !!isGenerator; - const allowModifiers = isConstructor; - this.scope.enter(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); - this.parseFunctionParams(node, allowModifiers); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBodyAndFinish(node, type, true); - this.scope.exit(); - this.state.yieldPos = oldYieldPos; - this.state.awaitPos = oldAwaitPos; - return node; - } - - parseArrowExpression(node, params, isAsync) { - this.scope.enter(functionFlags(isAsync, false) | SCOPE_ARROW); - this.initFunction(node, isAsync); - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - this.state.maybeInArrowParameters = false; - this.state.yieldPos = 0; - this.state.awaitPos = 0; - if (params) this.setArrowFunctionParameters(node, params); - this.parseFunctionBody(node, true); - this.scope.exit(); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - this.state.yieldPos = oldYieldPos; - this.state.awaitPos = oldAwaitPos; - return this.finishNode(node, "ArrowFunctionExpression"); - } - - setArrowFunctionParameters(node, params) { - node.params = this.toAssignableList(params, true, "arrow function parameters"); - } - - isStrictBody(node) { - const isBlockStatement = node.body.type === "BlockStatement"; - - if (isBlockStatement && node.body.directives.length) { - for (let _i2 = 0, _node$body$directives = node.body.directives; _i2 < _node$body$directives.length; _i2++) { - const directive = _node$body$directives[_i2]; - - if (directive.value.value === "use strict") { - return true; - } - } - } - - return false; - } - - parseFunctionBodyAndFinish(node, type, isMethod = false) { - this.parseFunctionBody(node, false, isMethod); - this.finishNode(node, type); - } - - parseFunctionBody(node, allowExpression, isMethod = false) { - const isExpression = allowExpression && !this.match(types.braceL); - const oldStrict = this.state.strict; - let useStrict = false; - const oldInParameters = this.state.inParameters; - this.state.inParameters = false; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - this.checkParams(node, false, allowExpression); - } else { - const nonSimple = !this.isSimpleParamList(node.params); - - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.state.end); - - if (useStrict && nonSimple) { - const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start; - this.raise(errorPos, "Illegal 'use strict' directive in function with non-simple parameter list"); - } - } - - const oldLabels = this.state.labels; - this.state.labels = []; - if (useStrict) this.state.strict = true; - this.checkParams(node, !oldStrict && !useStrict && !allowExpression && !isMethod && !nonSimple, allowExpression); - node.body = this.parseBlock(true, false); - this.state.labels = oldLabels; - } - - this.state.inParameters = oldInParameters; - - if (this.state.strict && node.id) { - this.checkLVal(node.id, BIND_OUTSIDE, undefined, "function name"); - } - - this.state.strict = oldStrict; - } - - isSimpleParamList(params) { - for (let i = 0, len = params.length; i < len; i++) { - if (params[i].type !== "Identifier") return false; - } - - return true; - } - - checkParams(node, allowDuplicates, isArrowFunction) { - const nameHash = Object.create(null); - - for (let i = 0; i < node.params.length; i++) { - this.checkLVal(node.params[i], BIND_VAR, allowDuplicates ? null : nameHash, "function paramter list"); - } - } - - parseExprList(close, allowEmpty, refShorthandDefaultPos) { - const elts = []; - let first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(close)) break; - } - - elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos)); - } - - return elts; - } - - parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, allowPlaceholder) { - let elt; - - if (allowEmpty && this.match(types.comma)) { - elt = null; - } else if (this.match(types.ellipsis)) { - const spreadNodeStartPos = this.state.start; - const spreadNodeStartLoc = this.state.startLoc; - elt = this.parseParenItem(this.parseSpread(refShorthandDefaultPos, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc); - } else if (this.match(types.question)) { - this.expectPlugin("partialApplication"); - - if (!allowPlaceholder) { - this.raise(this.state.start, "Unexpected argument placeholder"); - } - - const node = this.startNode(); - this.next(); - elt = this.finishNode(node, "ArgumentPlaceholder"); - } else { - elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos); - } - - return elt; - } - - parseIdentifier(liberal) { - const node = this.startNode(); - const name = this.parseIdentifierName(node.start, liberal); - return this.createIdentifier(node, name); - } - - createIdentifier(node, name) { - node.name = name; - node.loc.identifierName = name; - return this.finishNode(node, "Identifier"); - } - - parseIdentifierName(pos, liberal) { - let name; - - if (this.match(types.name)) { - name = this.state.value; - } else if (this.state.type.keyword) { - name = this.state.type.keyword; - - if ((name === "class" || name === "function") && (this.state.lastTokEnd !== this.state.lastTokStart + 1 || this.input.charCodeAt(this.state.lastTokStart) !== 46)) { - this.state.context.pop(); - } - } else { - throw this.unexpected(); - } - - if (!liberal) { - this.checkReservedWord(name, this.state.start, !!this.state.type.keyword, false); - } - - this.next(); - return name; - } - - checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (this.scope.inGenerator && word === "yield") { - this.raise(startLoc, "Can not use 'yield' as identifier inside a generator"); - } - - if (this.scope.inAsync && word === "await") { - this.raise(startLoc, "Can not use 'await' as identifier inside an async function"); - } - - if (this.state.inClassProperty && word === "arguments") { - this.raise(startLoc, "'arguments' is not allowed in class field initializer"); - } - - if (checkKeywords && isKeyword(word)) { - this.raise(startLoc, `Unexpected keyword '${word}'`); - } - - const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; - - if (reservedTest(word, this.inModule)) { - if (!this.scope.inAsync && word === "await") { - this.raise(startLoc, "Can not use keyword 'await' outside an async function"); - } - - this.raise(startLoc, `Unexpected reserved word '${word}'`); - } - } - - parseAwait() { - if (!this.state.awaitPos) { - this.state.awaitPos = this.state.start; - } - - const node = this.startNode(); - this.next(); - - if (this.state.inParameters) { - this.raise(node.start, "await is not allowed in async function parameters"); - } - - if (this.match(types.star)) { - this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead."); - } - - if (!this.state.soloAwait) { - node.argument = this.parseMaybeUnary(); - } - - return this.finishNode(node, "AwaitExpression"); - } - - parseYield(noIn) { - if (!this.state.yieldPos) { - this.state.yieldPos = this.state.start; - } - - const node = this.startNode(); - - if (this.state.inParameters) { - this.raise(node.start, "yield is not allowed in generator parameters"); - } - - this.next(); - - if (this.match(types.semi) || !this.match(types.star) && !this.state.type.startsExpr || this.canInsertSemicolon()) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(noIn); - } - - return this.finishNode(node, "YieldExpression"); - } - - checkPipelineAtInfixOperator(left, leftStartPos) { - if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { - if (left.type === "SequenceExpression") { - throw this.raise(leftStartPos, `Pipeline head should not be a comma-separated sequence expression`); - } - } - } - - parseSmartPipelineBody(childExpression, startPos, startLoc) { - const pipelineStyle = this.checkSmartPipelineBodyStyle(childExpression); - this.checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos); - return this.parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc); - } - - checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos) { - if (this.match(types.arrow)) { - throw this.raise(this.state.start, `Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized`); - } else if (pipelineStyle === "PipelineTopicExpression" && childExpression.type === "SequenceExpression") { - throw this.raise(startPos, `Pipeline body may not be a comma-separated sequence expression`); - } - } - - parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc) { - const bodyNode = this.startNodeAt(startPos, startLoc); - - switch (pipelineStyle) { - case "PipelineBareFunction": - bodyNode.callee = childExpression; - break; - - case "PipelineBareConstructor": - bodyNode.callee = childExpression.callee; - break; - - case "PipelineBareAwaitedFunction": - bodyNode.callee = childExpression.argument; - break; - - case "PipelineTopicExpression": - if (!this.topicReferenceWasUsedInCurrentTopicContext()) { - throw this.raise(startPos, `Pipeline is in topic style but does not use topic reference`); - } - - bodyNode.expression = childExpression; - break; - - default: - throw this.raise(startPos, `Unknown pipeline style ${pipelineStyle}`); - } - - return this.finishNode(bodyNode, pipelineStyle); - } - - checkSmartPipelineBodyStyle(expression) { - switch (expression.type) { - default: - return this.isSimpleReference(expression) ? "PipelineBareFunction" : "PipelineTopicExpression"; - } - } - - isSimpleReference(expression) { - switch (expression.type) { - case "MemberExpression": - return !expression.computed && this.isSimpleReference(expression.object); - - case "Identifier": - return true; - - default: - return false; - } - } - - withTopicPermittingContext(callback) { - const outerContextTopicState = this.state.topicContext; - this.state.topicContext = { - maxNumOfResolvableTopics: 1, - maxTopicIndex: null - }; - - try { - return callback(); - } finally { - this.state.topicContext = outerContextTopicState; - } - } - - withTopicForbiddingContext(callback) { - const outerContextTopicState = this.state.topicContext; - this.state.topicContext = { - maxNumOfResolvableTopics: 0, - maxTopicIndex: null - }; - - try { - return callback(); - } finally { - this.state.topicContext = outerContextTopicState; - } - } - - withSoloAwaitPermittingContext(callback) { - const outerContextSoloAwaitState = this.state.soloAwait; - this.state.soloAwait = true; - - try { - return callback(); - } finally { - this.state.soloAwait = outerContextSoloAwaitState; - } - } - - registerTopicReference() { - this.state.topicContext.maxTopicIndex = 0; - } - - primaryTopicReferenceIsAllowedInCurrentTopicContext() { - return this.state.topicContext.maxNumOfResolvableTopics >= 1; - } - - topicReferenceWasUsedInCurrentTopicContext() { - return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; - } - - parseFSharpPipelineBody(prec, noIn) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - this.state.potentialArrowAt = this.state.start; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = true; - const ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn); - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return ret; - } - -} - -const loopLabel = { - kind: "loop" -}, - switchLabel = { - kind: "switch" -}; -const FUNC_NO_FLAGS = 0b000, - FUNC_STATEMENT = 0b001, - FUNC_HANGING_STATEMENT = 0b010, - FUNC_NULLABLE_ID = 0b100; -class StatementParser extends ExpressionParser { - parseTopLevel(file, program) { - program.sourceType = this.options.sourceType; - program.interpreter = this.parseInterpreterDirective(); - this.parseBlockBody(program, true, true, types.eof); - - if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) { - for (let _i = 0, _Array$from = Array.from(this.scope.undefinedExports); _i < _Array$from.length; _i++) { - const [name] = _Array$from[_i]; - const pos = this.scope.undefinedExports.get(name); - this.raise(pos, `Export '${name}' is not defined`); - } - } - - file.program = this.finishNode(program, "Program"); - file.comments = this.state.comments; - if (this.options.tokens) file.tokens = this.state.tokens; - return this.finishNode(file, "File"); - } - - stmtToDirective(stmt) { - const expr = stmt.expression; - const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start); - const directive = this.startNodeAt(stmt.start, stmt.loc.start); - const raw = this.input.slice(expr.start, expr.end); - const val = directiveLiteral.value = raw.slice(1, -1); - this.addExtra(directiveLiteral, "raw", raw); - this.addExtra(directiveLiteral, "rawValue", val); - directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end); - return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end); - } - - parseInterpreterDirective() { - if (!this.match(types.interpreterDirective)) { - return null; - } - - const node = this.startNode(); - node.value = this.state.value; - this.next(); - return this.finishNode(node, "InterpreterDirective"); - } - - isLet(context) { - if (!this.isContextual("let")) { - return false; - } - - skipWhiteSpace.lastIndex = this.state.pos; - const skip = skipWhiteSpace.exec(this.input); - const next = this.state.pos + skip[0].length; - const nextCh = this.input.charCodeAt(next); - if (nextCh === 91) return true; - if (context) return false; - if (nextCh === 123) return true; - - if (isIdentifierStart(nextCh)) { - let pos = next + 1; - - while (isIdentifierChar(this.input.charCodeAt(pos))) { - ++pos; - } - - const ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) return true; - } - - return false; - } - - parseStatement(context, topLevel) { - if (this.match(types.at)) { - this.parseDecorators(true); - } - - return this.parseStatementContent(context, topLevel); - } - - parseStatementContent(context, topLevel) { - let starttype = this.state.type; - const node = this.startNode(); - let kind; - - if (this.isLet(context)) { - starttype = types._var; - kind = "let"; - } - - switch (starttype) { - case types._break: - case types._continue: - return this.parseBreakContinueStatement(node, starttype.keyword); - - case types._debugger: - return this.parseDebuggerStatement(node); - - case types._do: - return this.parseDoStatement(node); - - case types._for: - return this.parseForStatement(node); - - case types._function: - if (this.lookahead().type === types.dot) break; - - if (context) { - if (this.state.strict) { - this.raise(this.state.start, "In strict mode code, functions can only be declared at top level or inside a block"); - } else if (context !== "if" && context !== "label") { - this.raise(this.state.start, "In non-strict mode code, functions can only be declared at top level, " + "inside a block, or as the body of an if statement"); - } - } - - return this.parseFunctionStatement(node, false, !context); - - case types._class: - if (context) this.unexpected(); - return this.parseClass(node, true); - - case types._if: - return this.parseIfStatement(node); - - case types._return: - return this.parseReturnStatement(node); - - case types._switch: - return this.parseSwitchStatement(node); - - case types._throw: - return this.parseThrowStatement(node); - - case types._try: - return this.parseTryStatement(node); - - case types._const: - case types._var: - kind = kind || this.state.value; - - if (context && kind !== "var") { - this.unexpected(this.state.start, "Lexical declaration cannot appear in a single-statement context"); - } - - return this.parseVarStatement(node, kind); - - case types._while: - return this.parseWhileStatement(node); - - case types._with: - return this.parseWithStatement(node); - - case types.braceL: - return this.parseBlock(); - - case types.semi: - return this.parseEmptyStatement(node); - - case types._export: - case types._import: - { - const nextToken = this.lookahead(); - - if (nextToken.type === types.parenL || nextToken.type === types.dot) { - break; - } - - if (!this.options.allowImportExportEverywhere && !topLevel) { - this.raise(this.state.start, "'import' and 'export' may only appear at the top level"); - } - - this.next(); - let result; - - if (starttype === types._import) { - result = this.parseImport(node); - - if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { - this.sawUnambiguousESM = true; - } - } else { - result = this.parseExport(node); - - if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { - this.sawUnambiguousESM = true; - } - } - - this.assertModuleNodeAllowed(node); - return result; - } - - default: - { - if (this.isAsyncFunction()) { - if (context) { - this.unexpected(null, "Async functions can only be declared at the top level or inside a block"); - } - - this.next(); - return this.parseFunctionStatement(node, true, !context); - } - } - } - - const maybeName = this.state.value; - const expr = this.parseExpression(); - - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) { - return this.parseLabeledStatement(node, maybeName, expr, context); - } else { - return this.parseExpressionStatement(node, expr); - } - } - - assertModuleNodeAllowed(node) { - if (!this.options.allowImportExportEverywhere && !this.inModule) { - this.raise(node.start, `'import' and 'export' may appear only with 'sourceType: "module"'`, { - code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" - }); - } - } - - takeDecorators(node) { - const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (decorators.length) { - node.decorators = decorators; - this.resetStartLocationFromNode(node, decorators[0]); - this.state.decoratorStack[this.state.decoratorStack.length - 1] = []; - } - } - - canHaveLeadingDecorator() { - return this.match(types._class); - } - - parseDecorators(allowExport) { - const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - while (this.match(types.at)) { - const decorator = this.parseDecorator(); - currentContextDecorators.push(decorator); - } - - if (this.match(types._export)) { - if (!allowExport) { - this.unexpected(); - } - - if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) { - this.raise(this.state.start, "Using the export keyword between a decorator and a class is not allowed. " + "Please use `export @dec class` instead."); - } - } else if (!this.canHaveLeadingDecorator()) { - this.raise(this.state.start, "Leading decorators must be attached to a class declaration"); - } - } - - parseDecorator() { - this.expectOnePlugin(["decorators-legacy", "decorators"]); - const node = this.startNode(); - this.next(); - - if (this.hasPlugin("decorators")) { - this.state.decoratorStack.push([]); - const startPos = this.state.start; - const startLoc = this.state.startLoc; - let expr; - - if (this.eat(types.parenL)) { - expr = this.parseExpression(); - this.expect(types.parenR); - } else { - expr = this.parseIdentifier(false); - - while (this.eat(types.dot)) { - const node = this.startNodeAt(startPos, startLoc); - node.object = expr; - node.property = this.parseIdentifier(true); - node.computed = false; - expr = this.finishNode(node, "MemberExpression"); - } - } - - node.expression = this.parseMaybeDecoratorArguments(expr); - this.state.decoratorStack.pop(); - } else { - node.expression = this.parseExprSubscripts(); - } - - return this.finishNode(node, "Decorator"); - } - - parseMaybeDecoratorArguments(expr) { - if (this.eat(types.parenL)) { - const node = this.startNodeAtNode(expr); - node.callee = expr; - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - this.toReferencedList(node.arguments); - return this.finishNode(node, "CallExpression"); - } - - return expr; - } - - parseBreakContinueStatement(node, keyword) { - const isBreak = keyword === "break"; - this.next(); - - if (this.isLineTerminator()) { - node.label = null; - } else { - node.label = this.parseIdentifier(); - this.semicolon(); - } - - this.verifyBreakContinue(node, keyword); - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); - } - - verifyBreakContinue(node, keyword) { - const isBreak = keyword === "break"; - let i; - - for (i = 0; i < this.state.labels.length; ++i) { - const lab = this.state.labels[i]; - - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break; - if (node.label && isBreak) break; - } - } - - if (i === this.state.labels.length) { - this.raise(node.start, "Unsyntactic " + keyword); - } - } - - parseDebuggerStatement(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); - } - - parseHeaderExpression() { - this.expect(types.parenL); - const val = this.parseExpression(); - this.expect(types.parenR); - return val; - } - - parseDoStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - node.body = this.withTopicForbiddingContext(() => this.parseStatement("do")); - this.state.labels.pop(); - this.expect(types._while); - node.test = this.parseHeaderExpression(); - this.eat(types.semi); - return this.finishNode(node, "DoWhileStatement"); - } - - parseForStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - let awaitAt = -1; - - if ((this.scope.inAsync || !this.scope.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual("await")) { - awaitAt = this.state.lastTokStart; - } - - this.scope.enter(SCOPE_OTHER); - this.expect(types.parenL); - - if (this.match(types.semi)) { - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - - return this.parseFor(node, null); - } - - const isLet = this.isLet(); - - if (this.match(types._var) || this.match(types._const) || isLet) { - const init = this.startNode(); - const kind = isLet ? "let" : this.state.value; - this.next(); - this.parseVar(init, true, kind); - this.finishNode(init, "VariableDeclaration"); - - if ((this.match(types._in) || this.isContextual("of")) && init.declarations.length === 1) { - return this.parseForIn(node, init, awaitAt); - } - - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - - return this.parseFor(node, init); - } - - const refShorthandDefaultPos = { - start: 0 - }; - const init = this.parseExpression(true, refShorthandDefaultPos); - - if (this.match(types._in) || this.isContextual("of")) { - const description = this.isContextual("of") ? "for-of statement" : "for-in statement"; - this.toAssignable(init, undefined, description); - this.checkLVal(init, undefined, undefined, description); - return this.parseForIn(node, init, awaitAt); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - - return this.parseFor(node, init); - } - - parseFunctionStatement(node, isAsync, declarationPosition) { - this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync); - } - - parseIfStatement(node) { - this.next(); - node.test = this.parseHeaderExpression(); - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; - return this.finishNode(node, "IfStatement"); - } - - parseReturnStatement(node) { - if (!this.scope.inFunction && !this.options.allowReturnOutsideFunction) { - this.raise(this.state.start, "'return' outside of function"); - } - - this.next(); - - if (this.isLineTerminator()) { - node.argument = null; - } else { - node.argument = this.parseExpression(); - this.semicolon(); - } - - return this.finishNode(node, "ReturnStatement"); - } - - parseSwitchStatement(node) { - this.next(); - node.discriminant = this.parseHeaderExpression(); - const cases = node.cases = []; - this.expect(types.braceL); - this.state.labels.push(switchLabel); - this.scope.enter(SCOPE_OTHER); - let cur; - - for (let sawDefault; !this.match(types.braceR);) { - if (this.match(types._case) || this.match(types._default)) { - const isCase = this.match(types._case); - if (cur) this.finishNode(cur, "SwitchCase"); - cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) { - this.raise(this.state.lastTokStart, "Multiple default clauses"); - } - - sawDefault = true; - cur.test = null; - } - - this.expect(types.colon); - } else { - if (cur) { - cur.consequent.push(this.parseStatement(null)); - } else { - this.unexpected(); - } - } - } - - this.scope.exit(); - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); - this.state.labels.pop(); - return this.finishNode(node, "SwitchStatement"); - } - - parseThrowStatement(node) { - this.next(); - - if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) { - this.raise(this.state.lastTokEnd, "Illegal newline after throw"); - } - - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); - } - - parseTryStatement(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - - if (this.match(types._catch)) { - const clause = this.startNode(); - this.next(); - - if (this.match(types.parenL)) { - this.expect(types.parenL); - clause.param = this.parseBindingAtom(); - const simple = clause.param.type === "Identifier"; - this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLVal(clause.param, BIND_LEXICAL, null, "catch clause"); - this.expect(types.parenR); - } else { - clause.param = null; - this.scope.enter(SCOPE_OTHER); - } - - clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false)); - this.scope.exit(); - node.handler = this.finishNode(clause, "CatchClause"); - } - - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - - if (!node.handler && !node.finalizer) { - this.raise(node.start, "Missing catch or finally clause"); - } - - return this.finishNode(node, "TryStatement"); - } - - parseVarStatement(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); - } - - parseWhileStatement(node) { - this.next(); - node.test = this.parseHeaderExpression(); - this.state.labels.push(loopLabel); - node.body = this.withTopicForbiddingContext(() => this.parseStatement("while")); - this.state.labels.pop(); - return this.finishNode(node, "WhileStatement"); - } - - parseWithStatement(node) { - if (this.state.strict) { - this.raise(this.state.start, "'with' in strict mode"); - } - - this.next(); - node.object = this.parseHeaderExpression(); - node.body = this.withTopicForbiddingContext(() => this.parseStatement("with")); - return this.finishNode(node, "WithStatement"); - } - - parseEmptyStatement(node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); - } - - parseLabeledStatement(node, maybeName, expr, context) { - for (let _i2 = 0, _this$state$labels = this.state.labels; _i2 < _this$state$labels.length; _i2++) { - const label = _this$state$labels[_i2]; - - if (label.name === maybeName) { - this.raise(expr.start, `Label '${maybeName}' is already declared`); - } - } - - const kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null; - - for (let i = this.state.labels.length - 1; i >= 0; i--) { - const label = this.state.labels[i]; - - if (label.statementStart === node.start) { - label.statementStart = this.state.start; - label.kind = kind; - } else { - break; - } - } - - this.state.labels.push({ - name: maybeName, - kind: kind, - statementStart: this.state.start - }); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); - this.state.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); - } - - parseExpressionStatement(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); - } - - parseBlock(allowDirectives = false, createNewLexicalScope = true) { - const node = this.startNode(); - this.expect(types.braceL); - - if (createNewLexicalScope) { - this.scope.enter(SCOPE_OTHER); - } - - this.parseBlockBody(node, allowDirectives, false, types.braceR); - - if (createNewLexicalScope) { - this.scope.exit(); - } - - return this.finishNode(node, "BlockStatement"); - } - - isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; - } - - parseBlockBody(node, allowDirectives, topLevel, end) { - const body = node.body = []; - const directives = node.directives = []; - this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end); - } - - parseBlockOrModuleBlockBody(body, directives, topLevel, end) { - let parsedNonDirective = false; - let oldStrict; - let octalPosition; - - while (!this.eat(end)) { - if (!parsedNonDirective && this.state.containsOctal && !octalPosition) { - octalPosition = this.state.octalPosition; - } - - const stmt = this.parseStatement(null, topLevel); - - if (directives && !parsedNonDirective && this.isValidDirective(stmt)) { - const directive = this.stmtToDirective(stmt); - directives.push(directive); - - if (oldStrict === undefined && directive.value.value === "use strict") { - oldStrict = this.state.strict; - this.setStrict(true); - - if (octalPosition) { - this.raise(octalPosition, "Octal literal in strict mode"); - } - } - - continue; - } - - parsedNonDirective = true; - body.push(stmt); - } - - if (oldStrict === false) { - this.setStrict(false); - } - } - - parseFor(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.match(types.semi) ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.match(types.parenR) ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.withTopicForbiddingContext(() => this.parseStatement("for")); - this.scope.exit(); - this.state.labels.pop(); - return this.finishNode(node, "ForStatement"); - } - - parseForIn(node, init, awaitAt) { - const isForIn = this.match(types._in); - this.next(); - - if (isForIn) { - if (awaitAt > -1) this.unexpected(awaitAt); - } else { - node.await = awaitAt > -1; - } - - if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { - this.raise(init.start, `${isForIn ? "for-in" : "for-of"} loop variable declaration may not have an initializer`); - } else if (init.type === "AssignmentPattern") { - this.raise(init.start, "Invalid left-hand side in for-loop"); - } - - node.left = init; - node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types.parenR); - node.body = this.withTopicForbiddingContext(() => this.parseStatement("for")); - this.scope.exit(); - this.state.labels.pop(); - return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); - } - - parseVar(node, isFor, kind) { - const declarations = node.declarations = []; - const isTypescript = this.hasPlugin("typescript"); - node.kind = kind; - - for (;;) { - const decl = this.startNode(); - this.parseVarId(decl, kind); - - if (this.eat(types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else { - if (kind === "const" && !(this.match(types._in) || this.isContextual("of"))) { - if (!isTypescript) { - this.unexpected(); - } - } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) { - this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value"); - } - - decl.init = null; - } - - declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(types.comma)) break; - } - - return node; - } - - parseVarId(decl, kind) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, undefined, "variable declaration"); - } - - parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) { - const isStatement = statement & FUNC_STATEMENT; - const isHangingStatement = statement & FUNC_HANGING_STATEMENT; - const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID); - this.initFunction(node, isAsync); - - if (this.match(types.star) && isHangingStatement) { - this.unexpected(this.state.start, "Generators can only be declared at the top level or inside a block"); - } - - node.generator = this.eat(types.star); - - if (isStatement) { - node.id = this.parseFunctionId(requireId); - } - - const oldInClassProperty = this.state.inClassProperty; - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - this.state.inClassProperty = false; - this.state.yieldPos = 0; - this.state.awaitPos = 0; - this.scope.enter(functionFlags(node.async, node.generator)); - - if (!isStatement) { - node.id = this.parseFunctionId(); - } - - this.parseFunctionParams(node); - this.withTopicForbiddingContext(() => { - this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); - }); - this.scope.exit(); - - if (isStatement && !isHangingStatement) { - this.checkFunctionStatementId(node); - } - - this.state.inClassProperty = oldInClassProperty; - this.state.yieldPos = oldYieldPos; - this.state.awaitPos = oldAwaitPos; - return node; - } - - parseFunctionId(requireId) { - return requireId || this.match(types.name) ? this.parseIdentifier() : null; - } - - parseFunctionParams(node, allowModifiers) { - const oldInParameters = this.state.inParameters; - this.state.inParameters = true; - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, allowModifiers); - this.state.inParameters = oldInParameters; - this.checkYieldAwaitInDefaultParams(); - } - - checkFunctionStatementId(node) { - if (!node.id) return; - this.checkLVal(node.id, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION, null, "function name"); - } - - parseClass(node, isStatement, optionalId) { - this.next(); - this.takeDecorators(node); - const oldStrict = this.state.strict; - this.state.strict = true; - this.parseClassId(node, isStatement, optionalId); - this.parseClassSuper(node); - node.body = this.parseClassBody(!!node.superClass); - this.state.strict = oldStrict; - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); - } - - isClassProperty() { - return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR); - } - - isClassMethod() { - return this.match(types.parenL); - } - - isNonstaticConstructor(method) { - return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); - } - - parseClassBody(constructorAllowsSuper) { - this.state.classLevel++; - const state = { - hadConstructor: false - }; - let decorators = []; - const classBody = this.startNode(); - classBody.body = []; - this.expect(types.braceL); - this.withTopicForbiddingContext(() => { - while (!this.eat(types.braceR)) { - if (this.eat(types.semi)) { - if (decorators.length > 0) { - this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon"); - } - - continue; - } - - if (this.match(types.at)) { - decorators.push(this.parseDecorator()); - continue; - } - - const member = this.startNode(); - - if (decorators.length) { - member.decorators = decorators; - this.resetStartLocationFromNode(member, decorators[0]); - decorators = []; - } - - this.parseClassMember(classBody, member, state, constructorAllowsSuper); - - if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { - this.raise(member.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?"); - } - } - }); - - if (decorators.length) { - this.raise(this.state.start, "You have trailing decorators with no method"); - } - - this.state.classLevel--; - return this.finishNode(classBody, "ClassBody"); - } - - parseClassMember(classBody, member, state, constructorAllowsSuper) { - let isStatic = false; - const containsEsc = this.state.containsEsc; - - if (this.match(types.name) && this.state.value === "static") { - const key = this.parseIdentifier(true); - - if (this.isClassMethod()) { - const method = member; - method.kind = "method"; - method.computed = false; - method.key = key; - method.static = false; - this.pushClassMethod(classBody, method, false, false, false, false); - return; - } else if (this.isClassProperty()) { - const prop = member; - prop.computed = false; - prop.key = key; - prop.static = false; - classBody.body.push(this.parseClassProperty(prop)); - return; - } else if (containsEsc) { - throw this.unexpected(); - } - - isStatic = true; - } - - this.parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper); - } - - parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) { - const publicMethod = member; - const privateMethod = member; - const publicProp = member; - const privateProp = member; - const method = publicMethod; - const publicMember = publicMethod; - member.static = isStatic; - - if (this.eat(types.star)) { - method.kind = "method"; - this.parseClassPropertyName(method); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, true, false); - return; - } - - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't be a generator"); - } - - this.pushClassMethod(classBody, publicMethod, true, false, false, false); - return; - } - - const containsEsc = this.state.containsEsc; - const key = this.parseClassPropertyName(member); - const isPrivate = key.type === "PrivateName"; - const isSimple = key.type === "Identifier"; - this.parsePostMemberNameModifiers(publicMember); - - if (this.isClassMethod()) { - method.kind = "method"; - - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - return; - } - - const isConstructor = this.isNonstaticConstructor(publicMethod); - let allowsDirectSuper = false; - - if (isConstructor) { - publicMethod.kind = "constructor"; - - if (publicMethod.decorators) { - this.raise(publicMethod.start, "You can't attach decorators to a class constructor"); - } - - if (state.hadConstructor && !this.hasPlugin("typescript")) { - this.raise(key.start, "Duplicate constructor in the same class"); - } - - state.hadConstructor = true; - allowsDirectSuper = constructorAllowsSuper; - } - - this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); - } else if (this.isClassProperty()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) { - const isGenerator = this.eat(types.star); - method.kind = "method"; - this.parseClassPropertyName(method); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't be an async function"); - } - - this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); - } - } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types.star) && this.isLineTerminator())) { - method.kind = key.name; - this.parseClassPropertyName(publicMethod); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't have get/set modifier"); - } - - this.pushClassMethod(classBody, publicMethod, false, false, false, false); - } - - this.checkGetterSetterParams(publicMethod); - } else if (this.isLineTerminator()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else { - this.unexpected(); - } - } - - parseClassPropertyName(member) { - const key = this.parsePropertyName(member); - - if (!member.computed && member.static && (key.name === "prototype" || key.value === "prototype")) { - this.raise(key.start, "Classes may not have static property named prototype"); - } - - if (key.type === "PrivateName" && key.id.name === "constructor") { - this.raise(key.start, "Classes may not have a private field named '#constructor'"); - } - - return key; - } - - pushClassProperty(classBody, prop) { - if (this.isNonstaticConstructor(prop)) { - this.raise(prop.key.start, "Classes may not have a non-static field named 'constructor'"); - } - - classBody.body.push(this.parseClassProperty(prop)); - } - - pushClassPrivateProperty(classBody, prop) { - this.expectPlugin("classPrivateProperties", prop.key.start); - classBody.body.push(this.parseClassPrivateProperty(prop)); - } - - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); - } - - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - this.expectPlugin("classPrivateMethods", method.key.start); - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true)); - } - - parsePostMemberNameModifiers(methodOrProp) {} - - parseAccessModifier() { - return undefined; - } - - parseClassPrivateProperty(node) { - this.state.inClassProperty = true; - this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); - node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null; - this.semicolon(); - this.state.inClassProperty = false; - this.scope.exit(); - return this.finishNode(node, "ClassPrivateProperty"); - } - - parseClassProperty(node) { - if (!node.typeAnnotation) { - this.expectPlugin("classProperties"); - } - - this.state.inClassProperty = true; - this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); - - if (this.match(types.eq)) { - this.expectPlugin("classProperties"); - this.next(); - node.value = this.parseMaybeAssign(); - } else { - node.value = null; - } - - this.semicolon(); - this.state.inClassProperty = false; - this.scope.exit(); - return this.finishNode(node, "ClassProperty"); - } - - parseClassId(node, isStatement, optionalId) { - if (this.match(types.name)) { - node.id = this.parseIdentifier(); - - if (isStatement) { - this.checkLVal(node.id, BIND_CLASS, undefined, "class name"); - } - } else { - if (optionalId || !isStatement) { - node.id = null; - } else { - this.unexpected(null, "A class name is required"); - } - } - } - - parseClassSuper(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; - } - - parseExport(node) { - const hasDefault = this.maybeParseExportDefaultSpecifier(node); - const parseAfterDefault = !hasDefault || this.eat(types.comma); - const hasStar = parseAfterDefault && this.eatExportStar(node); - const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); - const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types.comma)); - const isFromRequired = hasDefault || hasStar; - - if (hasStar && !hasNamespace) { - if (hasDefault) this.unexpected(); - this.parseExportFrom(node, true); - return this.finishNode(node, "ExportAllDeclaration"); - } - - const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); - - if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) { - throw this.unexpected(null, types.braceL); - } - - let hasDeclaration; - - if (isFromRequired || hasSpecifiers) { - hasDeclaration = false; - this.parseExportFrom(node, isFromRequired); - } else { - hasDeclaration = this.maybeParseExportDeclaration(node); - } - - if (isFromRequired || hasSpecifiers || hasDeclaration) { - this.checkExport(node, true, false, !!node.source); - return this.finishNode(node, "ExportNamedDeclaration"); - } - - if (this.eat(types._default)) { - node.declaration = this.parseExportDefaultExpression(); - this.checkExport(node, true, true); - return this.finishNode(node, "ExportDefaultDeclaration"); - } - - throw this.unexpected(null, types.braceL); - } - - eatExportStar(node) { - return this.eat(types.star); - } - - maybeParseExportDefaultSpecifier(node) { - if (this.isExportDefaultSpecifier()) { - this.expectPlugin("exportDefaultFrom"); - const specifier = this.startNode(); - specifier.exported = this.parseIdentifier(true); - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - return true; - } - - return false; - } - - maybeParseExportNamespaceSpecifier(node) { - if (this.isContextual("as")) { - if (!node.specifiers) node.specifiers = []; - this.expectPlugin("exportNamespaceFrom"); - const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc); - this.next(); - specifier.exported = this.parseIdentifier(true); - node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); - return true; - } - - return false; - } - - maybeParseExportNamedSpecifiers(node) { - if (this.match(types.braceL)) { - if (!node.specifiers) node.specifiers = []; - node.specifiers.push(...this.parseExportSpecifiers()); - node.source = null; - node.declaration = null; - return true; - } - - return false; - } - - maybeParseExportDeclaration(node) { - if (this.shouldParseExportDeclaration()) { - if (this.isContextual("async")) { - const next = this.lookahead(); - - if (next.type !== types._function) { - this.unexpected(next.start, `Unexpected token, expected "function"`); - } - } - - node.specifiers = []; - node.source = null; - node.declaration = this.parseExportDeclaration(node); - return true; - } - - return false; - } - - isAsyncFunction() { - if (!this.isContextual("async")) return false; - const { - pos - } = this.state; - skipWhiteSpace.lastIndex = pos; - const skip = skipWhiteSpace.exec(this.input); - if (!skip || !skip.length) return false; - const next = pos + skip[0].length; - return !lineBreak.test(this.input.slice(pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.length || !isIdentifierChar(this.input.charCodeAt(next + 8))); - } - - parseExportDefaultExpression() { - const expr = this.startNode(); - const isAsync = this.isAsyncFunction(); - - if (this.match(types._function) || isAsync) { - this.next(); - - if (isAsync) { - this.next(); - } - - return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync); - } else if (this.match(types._class)) { - return this.parseClass(expr, true, true); - } else if (this.match(types.at)) { - if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) { - this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax"); - } - - this.parseDecorators(false); - return this.parseClass(expr, true, true); - } else if (this.match(types._const) || this.match(types._var) || this.isLet()) { - return this.raise(this.state.start, "Only expressions, functions or classes are allowed as the `default` export."); - } else { - const res = this.parseMaybeAssign(); - this.semicolon(); - return res; - } - } - - parseExportDeclaration(node) { - return this.parseStatement(null); - } - - isExportDefaultSpecifier() { - if (this.match(types.name)) { - return this.state.value !== "async" && this.state.value !== "let"; - } - - if (!this.match(types._default)) { - return false; - } - - const lookahead = this.lookahead(); - return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from"; - } - - parseExportFrom(node, expect) { - if (this.eatContextual("from")) { - node.source = this.parseImportSource(); - this.checkExport(node); - } else { - if (expect) { - this.unexpected(); - } else { - node.source = null; - } - } - - this.semicolon(); - } - - shouldParseExportDeclaration() { - if (this.match(types.at)) { - this.expectOnePlugin(["decorators", "decorators-legacy"]); - - if (this.hasPlugin("decorators")) { - if (this.getPluginOption("decorators", "decoratorsBeforeExport")) { - this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax"); - } else { - return true; - } - } - } - - return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isLet() || this.isAsyncFunction(); - } - - checkExport(node, checkNames, isDefault, isFrom) { - if (checkNames) { - if (isDefault) { - this.checkDuplicateExports(node, "default"); - } else if (node.specifiers && node.specifiers.length) { - for (let _i3 = 0, _node$specifiers = node.specifiers; _i3 < _node$specifiers.length; _i3++) { - const specifier = _node$specifiers[_i3]; - this.checkDuplicateExports(specifier, specifier.exported.name); - - if (!isFrom && specifier.local) { - this.checkReservedWord(specifier.local.name, specifier.local.start, true, false); - this.scope.checkLocalExport(specifier.local); - } - } - } else if (node.declaration) { - if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") { - const id = node.declaration.id; - if (!id) throw new Error("Assertion failure"); - this.checkDuplicateExports(node, id.name); - } else if (node.declaration.type === "VariableDeclaration") { - for (let _i4 = 0, _node$declaration$dec = node.declaration.declarations; _i4 < _node$declaration$dec.length; _i4++) { - const declaration = _node$declaration$dec[_i4]; - this.checkDeclaration(declaration.id); - } - } - } - } - - const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (currentContextDecorators.length) { - const isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); - - if (!node.declaration || !isClass) { - throw this.raise(node.start, "You can only use decorators on an export when exporting a class"); - } - - this.takeDecorators(node.declaration); - } - } - - checkDeclaration(node) { - if (node.type === "Identifier") { - this.checkDuplicateExports(node, node.name); - } else if (node.type === "ObjectPattern") { - for (let _i5 = 0, _node$properties = node.properties; _i5 < _node$properties.length; _i5++) { - const prop = _node$properties[_i5]; - this.checkDeclaration(prop); - } - } else if (node.type === "ArrayPattern") { - for (let _i6 = 0, _node$elements = node.elements; _i6 < _node$elements.length; _i6++) { - const elem = _node$elements[_i6]; - - if (elem) { - this.checkDeclaration(elem); - } - } - } else if (node.type === "ObjectProperty") { - this.checkDeclaration(node.value); - } else if (node.type === "RestElement") { - this.checkDeclaration(node.argument); - } else if (node.type === "AssignmentPattern") { - this.checkDeclaration(node.left); - } - } - - checkDuplicateExports(node, name) { - if (this.state.exportedIdentifiers.indexOf(name) > -1) { - throw this.raise(node.start, name === "default" ? "Only one default export allowed per module." : `\`${name}\` has already been exported. Exported identifiers must be unique.`); - } - - this.state.exportedIdentifiers.push(name); - } - - parseExportSpecifiers() { - const nodes = []; - let first = true; - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - const node = this.startNode(); - node.local = this.parseIdentifier(true); - node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone(); - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - - return nodes; - } - - parseImport(node) { - node.specifiers = []; - - if (!this.match(types.string)) { - const hasDefault = this.maybeParseDefaultImportSpecifier(node); - const parseNext = !hasDefault || this.eat(types.comma); - const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); - if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); - this.expectContextual("from"); - } - - node.source = this.parseImportSource(); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - - parseImportSource() { - if (!this.match(types.string)) this.unexpected(); - return this.parseExprAtom(); - } - - shouldParseDefaultImport(node) { - return this.match(types.name); - } - - parseImportSpecifierLocal(node, specifier, type, contextDescription) { - specifier.local = this.parseIdentifier(); - this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription); - node.specifiers.push(this.finishNode(specifier, type)); - } - - maybeParseDefaultImportSpecifier(node) { - if (this.shouldParseDefaultImport(node)) { - this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier"); - return true; - } - - return false; - } - - maybeParseStarImportSpecifier(node) { - if (this.match(types.star)) { - const specifier = this.startNode(); - this.next(); - this.expectContextual("as"); - this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier"); - return true; - } - - return false; - } - - parseNamedImportSpecifiers(node) { - let first = true; - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - if (this.eat(types.colon)) { - this.unexpected(null, "ES2015 named imports do not destructure. " + "Use another statement for destructuring after the import."); - } - - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - this.parseImportSpecifier(node); - } - } - - parseImportSpecifier(node) { - const specifier = this.startNode(); - specifier.imported = this.parseIdentifier(true); - - if (this.eatContextual("as")) { - specifier.local = this.parseIdentifier(); - } else { - this.checkReservedWord(specifier.imported.name, specifier.start, true, true); - specifier.local = specifier.imported.__clone(); - } - - this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier"); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - } - -} - -class Parser extends StatementParser { - constructor(options, input) { - options = getOptions(options); - super(options, input); - const ScopeHandler = this.getScopeHandler(); - this.options = options; - this.inModule = this.options.sourceType === "module"; - this.scope = new ScopeHandler(this.raise.bind(this), this.inModule); - this.plugins = pluginsMap(this.options.plugins); - this.filename = options.sourceFilename; - } - - getScopeHandler() { - return ScopeHandler; - } - - parse() { - this.scope.enter(SCOPE_PROGRAM); - const file = this.startNode(); - const program = this.startNode(); - this.nextToken(); - return this.parseTopLevel(file, program); - } - -} - -function pluginsMap(plugins) { - const pluginMap = new Map(); - - for (let _i = 0; _i < plugins.length; _i++) { - const plugin = plugins[_i]; - const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}]; - if (!pluginMap.has(name)) pluginMap.set(name, options || {}); - } - - return pluginMap; -} - -function parse(input, options) { - if (options && options.sourceType === "unambiguous") { - options = Object.assign({}, options); - - try { - options.sourceType = "module"; - const parser = getParser(options, input); - const ast = parser.parse(); - if (!parser.sawUnambiguousESM) ast.program.sourceType = "script"; - return ast; - } catch (moduleError) { - try { - options.sourceType = "script"; - return getParser(options, input).parse(); - } catch (scriptError) {} - - throw moduleError; - } - } else { - return getParser(options, input).parse(); - } -} -function parseExpression(input, options) { - const parser = getParser(options, input); - - if (parser.options.strictMode) { - parser.state.strict = true; - } - - return parser.getExpression(); -} - -function getParser(options, input) { - let cls = Parser; - - if (options && options.plugins) { - validatePlugins(options.plugins); - cls = getParserClass(options.plugins); - } - - return new cls(options, input); -} - -const parserClassCache = {}; - -function getParserClass(pluginsFromOptions) { - const pluginList = mixinPluginNames.filter(name => hasPlugin(pluginsFromOptions, name)); - const key = pluginList.join("/"); - let cls = parserClassCache[key]; - - if (!cls) { - cls = Parser; - - for (let _i = 0; _i < pluginList.length; _i++) { - const plugin = pluginList[_i]; - cls = mixinPlugins[plugin](cls); - } - - parserClassCache[key] = cls; - } - - return cls; -} - -exports.parse = parse; -exports.parseExpression = parseExpression; -exports.tokTypes = types; diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/parser/package.json deleted file mode 100644 index 4bfd8d41cb84c0..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/parser/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bin": { - "parser": "./bin/babel-parser.js" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A JavaScript parser", - "devDependencies": { - "@babel/code-frame": "^7.5.5", - "@babel/helper-fixtures": "^7.5.5", - "charcodes": "^0.2.0", - "unicode-12.0.0": "^0.7.9" - }, - "engines": { - "node": ">=6.0.0" - }, - "files": [ - "bin", - "lib", - "typings" - ], - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "keywords": [ - "babel", - "javascript", - "parser", - "tc39", - "ecmascript", - "@babel/parser" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/parser", - "publishConfig": { - "tag": "next" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-parser" - }, - "types": "typings/babel-parser.d.ts", - "version": "7.5.5" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/template/README.md deleted file mode 100644 index cf8f944396f8ba..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/template/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/template - -> Generate an AST from a string template. - -See our website [@babel/template](https://babeljs.io/docs/en/next/babel-template.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20template%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/template -``` - -or using yarn: - -```sh -yarn add @babel/template --dev -``` diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/formatters.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/formatters.js deleted file mode 100644 index 59e0984cba5a0d..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/formatters.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0; - -function makeStatementFormatter(fn) { - return { - code: str => `/* @babel/template */;\n${str}`, - validate: () => {}, - unwrap: ast => { - return fn(ast.program.body.slice(1)); - } - }; -} - -const smart = makeStatementFormatter(body => { - if (body.length > 1) { - return body; - } else { - return body[0]; - } -}); -exports.smart = smart; -const statements = makeStatementFormatter(body => body); -exports.statements = statements; -const statement = makeStatementFormatter(body => { - if (body.length === 0) { - throw new Error("Found nothing to return."); - } - - if (body.length > 1) { - throw new Error("Found multiple statements but wanted one"); - } - - return body[0]; -}); -exports.statement = statement; -const expression = { - code: str => `(\n${str}\n)`, - validate: ({ - program - }) => { - if (program.body.length > 1) { - throw new Error("Found multiple statements but wanted one"); - } - - const expression = program.body[0].expression; - - if (expression.start === 0) { - throw new Error("Parse result included parens."); - } - }, - unwrap: ast => ast.program.body[0].expression -}; -exports.expression = expression; -const program = { - code: str => str, - validate: () => {}, - unwrap: ast => ast.program -}; -exports.program = program; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/index.js deleted file mode 100644 index 7ce85e9f1ba624..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/index.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0; - -var formatters = _interopRequireWildcard(require("./formatters")); - -var _builder = _interopRequireDefault(require("./builder")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const smart = (0, _builder.default)(formatters.smart); -exports.smart = smart; -const statement = (0, _builder.default)(formatters.statement); -exports.statement = statement; -const statements = (0, _builder.default)(formatters.statements); -exports.statements = statements; -const expression = (0, _builder.default)(formatters.expression); -exports.expression = expression; -const program = (0, _builder.default)(formatters.program); -exports.program = program; - -var _default = Object.assign(smart.bind(undefined), { - smart, - statement, - statements, - expression, - program, - ast: smart.ast -}); - -exports.default = _default; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/options.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/options.js deleted file mode 100644 index 35ed7333885925..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/options.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.merge = merge; -exports.validate = validate; -exports.normalizeReplacements = normalizeReplacements; - -function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } - -function merge(a, b) { - const { - placeholderWhitelist = a.placeholderWhitelist, - placeholderPattern = a.placeholderPattern, - preserveComments = a.preserveComments, - syntacticPlaceholders = a.syntacticPlaceholders - } = b; - return { - parser: Object.assign({}, a.parser, b.parser), - placeholderWhitelist, - placeholderPattern, - preserveComments, - syntacticPlaceholders - }; -} - -function validate(opts) { - if (opts != null && typeof opts !== "object") { - throw new Error("Unknown template options."); - } - - const _ref = opts || {}, - { - placeholderWhitelist, - placeholderPattern, - preserveComments, - syntacticPlaceholders - } = _ref, - parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]); - - if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) { - throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined"); - } - - if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) { - throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined"); - } - - if (preserveComments != null && typeof preserveComments !== "boolean") { - throw new Error("'.preserveComments' must be a boolean, null, or undefined"); - } - - if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") { - throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined"); - } - - if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) { - throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); - } - - return { - parser, - placeholderWhitelist: placeholderWhitelist || undefined, - placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern, - preserveComments: preserveComments == null ? false : preserveComments, - syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders - }; -} - -function normalizeReplacements(replacements) { - if (Array.isArray(replacements)) { - return replacements.reduce((acc, replacement, i) => { - acc["$" + i] = replacement; - return acc; - }, {}); - } else if (typeof replacements === "object" || replacements == null) { - return replacements || undefined; - } - - throw new Error("Template replacements must be an array, object, null, or undefined"); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/parse.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/parse.js deleted file mode 100644 index 3173349559283e..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/parse.js +++ /dev/null @@ -1,193 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parseAndBuildMetadata; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _parser() { - const data = require("@babel/parser"); - - _parser = function () { - return data; - }; - - return data; -} - -function _codeFrame() { - const data = require("@babel/code-frame"); - - _codeFrame = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const PATTERN = /^[_$A-Z0-9]+$/; - -function parseAndBuildMetadata(formatter, code, opts) { - const ast = parseWithCodeFrame(code, opts.parser); - const { - placeholderWhitelist, - placeholderPattern, - preserveComments, - syntacticPlaceholders - } = opts; - t().removePropertiesDeep(ast, { - preserveComments - }); - formatter.validate(ast); - const syntactic = { - placeholders: [], - placeholderNames: new Set() - }; - const legacy = { - placeholders: [], - placeholderNames: new Set() - }; - const isLegacyRef = { - value: undefined - }; - t().traverse(ast, placeholderVisitorHandler, { - syntactic, - legacy, - isLegacyRef, - placeholderWhitelist, - placeholderPattern, - syntacticPlaceholders - }); - return Object.assign({ - ast - }, isLegacyRef.value ? legacy : syntactic); -} - -function placeholderVisitorHandler(node, ancestors, state) { - let name; - - if (t().isPlaceholder(node)) { - if (state.syntacticPlaceholders === false) { - throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false."); - } else { - name = node.name.name; - state.isLegacyRef.value = false; - } - } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) { - return; - } else if (t().isIdentifier(node) || t().isJSXIdentifier(node)) { - name = node.name; - state.isLegacyRef.value = true; - } else if (t().isStringLiteral(node)) { - name = node.value; - state.isLegacyRef.value = true; - } else { - return; - } - - if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) { - throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); - } - - if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && (!state.placeholderWhitelist || !state.placeholderWhitelist.has(name))) { - return; - } - - ancestors = ancestors.slice(); - const { - node: parent, - key - } = ancestors[ancestors.length - 1]; - let type; - - if (t().isStringLiteral(node) || t().isPlaceholder(node, { - expectedNode: "StringLiteral" - })) { - type = "string"; - } else if (t().isNewExpression(parent) && key === "arguments" || t().isCallExpression(parent) && key === "arguments" || t().isFunction(parent) && key === "params") { - type = "param"; - } else if (t().isExpressionStatement(parent) && !t().isPlaceholder(node)) { - type = "statement"; - ancestors = ancestors.slice(0, -1); - } else if (t().isStatement(node) && t().isPlaceholder(node)) { - type = "statement"; - } else { - type = "other"; - } - - const { - placeholders, - placeholderNames - } = state.isLegacyRef.value ? state.legacy : state.syntactic; - placeholders.push({ - name, - type, - resolve: ast => resolveAncestors(ast, ancestors), - isDuplicate: placeholderNames.has(name) - }); - placeholderNames.add(name); -} - -function resolveAncestors(ast, ancestors) { - let parent = ast; - - for (let i = 0; i < ancestors.length - 1; i++) { - const { - key, - index - } = ancestors[i]; - - if (index === undefined) { - parent = parent[key]; - } else { - parent = parent[key][index]; - } - } - - const { - key, - index - } = ancestors[ancestors.length - 1]; - return { - parent, - key, - index - }; -} - -function parseWithCodeFrame(code, parserOpts) { - parserOpts = Object.assign({ - allowReturnOutsideFunction: true, - allowSuperOutsideMethod: true, - sourceType: "module" - }, parserOpts, { - plugins: (parserOpts.plugins || []).concat("placeholders") - }); - - try { - return (0, _parser().parse)(code, parserOpts); - } catch (err) { - const loc = err.loc; - - if (loc) { - err.message += "\n" + (0, _codeFrame().codeFrameColumns)(code, { - start: loc - }); - err.code = "BABEL_TEMPLATE_PARSE_ERROR"; - } - - throw err; - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/populate.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/populate.js deleted file mode 100644 index c69f7fdfe282f9..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/populate.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = populatePlaceholders; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function populatePlaceholders(metadata, replacements) { - const ast = t().cloneNode(metadata.ast); - - if (replacements) { - metadata.placeholders.forEach(placeholder => { - if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) { - const placeholderName = placeholder.name; - throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a - placeholder you may want to consider passing one of the following options to @babel/template: - - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])} - - { placeholderPattern: /^${placeholderName}$/ }`); - } - }); - Object.keys(replacements).forEach(key => { - if (!metadata.placeholderNames.has(key)) { - throw new Error(`Unknown substitution "${key}" given`); - } - }); - } - - metadata.placeholders.slice().reverse().forEach(placeholder => { - try { - applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null); - } catch (e) { - e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`; - throw e; - } - }); - return ast; -} - -function applyReplacement(placeholder, ast, replacement) { - if (placeholder.isDuplicate) { - if (Array.isArray(replacement)) { - replacement = replacement.map(node => t().cloneNode(node)); - } else if (typeof replacement === "object") { - replacement = t().cloneNode(replacement); - } - } - - const { - parent, - key, - index - } = placeholder.resolve(ast); - - if (placeholder.type === "string") { - if (typeof replacement === "string") { - replacement = t().stringLiteral(replacement); - } - - if (!replacement || !t().isStringLiteral(replacement)) { - throw new Error("Expected string substitution"); - } - } else if (placeholder.type === "statement") { - if (index === undefined) { - if (!replacement) { - replacement = t().emptyStatement(); - } else if (Array.isArray(replacement)) { - replacement = t().blockStatement(replacement); - } else if (typeof replacement === "string") { - replacement = t().expressionStatement(t().identifier(replacement)); - } else if (!t().isStatement(replacement)) { - replacement = t().expressionStatement(replacement); - } - } else { - if (replacement && !Array.isArray(replacement)) { - if (typeof replacement === "string") { - replacement = t().identifier(replacement); - } - - if (!t().isStatement(replacement)) { - replacement = t().expressionStatement(replacement); - } - } - } - } else if (placeholder.type === "param") { - if (typeof replacement === "string") { - replacement = t().identifier(replacement); - } - - if (index === undefined) throw new Error("Assertion failure."); - } else { - if (typeof replacement === "string") { - replacement = t().identifier(replacement); - } - - if (Array.isArray(replacement)) { - throw new Error("Cannot replace single expression with an array."); - } - } - - if (index === undefined) { - t().validate(parent, key, replacement); - parent[key] = replacement; - } else { - const items = parent[key].slice(); - - if (placeholder.type === "statement" || placeholder.type === "param") { - if (replacement == null) { - items.splice(index, 1); - } else if (Array.isArray(replacement)) { - items.splice(index, 1, ...replacement); - } else { - items[index] = replacement; - } - } else { - items[index] = replacement; - } - - t().validate(parent, key, items); - parent[key] = items; - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/template/package.json deleted file mode 100644 index 54bdfd6423342b..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/template/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.4", - "@babel/types": "^7.4.4" - }, - "deprecated": false, - "description": "Generate an AST from a string template.", - "gitHead": "2c88694388831b1e5b88e4bbed6781eb2be1edba", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/template", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-template" - }, - "version": "7.4.4" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md deleted file mode 100644 index 61dc5800652eec..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/traverse - -> The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes - -See our website [@babel/traverse](https://babeljs.io/docs/en/next/babel-traverse.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20traverse%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/traverse -``` - -or using yarn: - -```sh -yarn add @babel/traverse --dev -``` diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/context.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/context.js deleted file mode 100644 index 7becbcd2573090..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/context.js +++ /dev/null @@ -1,152 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _path = _interopRequireDefault(require("./path")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const testing = process.env.NODE_ENV === "test"; - -class TraversalContext { - constructor(scope, opts, state, parentPath) { - this.queue = null; - this.parentPath = parentPath; - this.scope = scope; - this.state = state; - this.opts = opts; - } - - shouldVisit(node) { - const opts = this.opts; - if (opts.enter || opts.exit) return true; - if (opts[node.type]) return true; - const keys = t().VISITOR_KEYS[node.type]; - if (!keys || !keys.length) return false; - - for (const key of keys) { - if (node[key]) return true; - } - - return false; - } - - create(node, obj, key, listKey) { - return _path.default.get({ - parentPath: this.parentPath, - parent: node, - container: obj, - key: key, - listKey - }); - } - - maybeQueue(path, notPriority) { - if (this.trap) { - throw new Error("Infinite cycle detected"); - } - - if (this.queue) { - if (notPriority) { - this.queue.push(path); - } else { - this.priorityQueue.push(path); - } - } - } - - visitMultiple(container, parent, listKey) { - if (container.length === 0) return false; - const queue = []; - - for (let key = 0; key < container.length; key++) { - const node = container[key]; - - if (node && this.shouldVisit(node)) { - queue.push(this.create(parent, container, key, listKey)); - } - } - - return this.visitQueue(queue); - } - - visitSingle(node, key) { - if (this.shouldVisit(node[key])) { - return this.visitQueue([this.create(node, node, key)]); - } else { - return false; - } - } - - visitQueue(queue) { - this.queue = queue; - this.priorityQueue = []; - const visited = []; - let stop = false; - - for (const path of queue) { - path.resync(); - - if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) { - path.pushContext(this); - } - - if (path.key === null) continue; - - if (testing && queue.length >= 10000) { - this.trap = true; - } - - if (visited.indexOf(path.node) >= 0) continue; - visited.push(path.node); - - if (path.visit()) { - stop = true; - break; - } - - if (this.priorityQueue.length) { - stop = this.visitQueue(this.priorityQueue); - this.priorityQueue = []; - this.queue = queue; - if (stop) break; - } - } - - for (const path of queue) { - path.popContext(); - } - - this.queue = null; - return stop; - } - - visit(node, key) { - const nodes = node[key]; - if (!nodes) return false; - - if (Array.isArray(nodes)) { - return this.visitMultiple(nodes, node, key); - } else { - return this.visitSingle(node, key); - } - } - -} - -exports.default = TraversalContext; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/index.js deleted file mode 100644 index 1865e2abc877c2..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/index.js +++ /dev/null @@ -1,130 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = traverse; -Object.defineProperty(exports, "NodePath", { - enumerable: true, - get: function () { - return _path.default; - } -}); -Object.defineProperty(exports, "Scope", { - enumerable: true, - get: function () { - return _scope.default; - } -}); -Object.defineProperty(exports, "Hub", { - enumerable: true, - get: function () { - return _hub.default; - } -}); -exports.visitors = void 0; - -var _context = _interopRequireDefault(require("./context")); - -var visitors = _interopRequireWildcard(require("./visitors")); - -exports.visitors = visitors; - -function _includes() { - const data = _interopRequireDefault(require("lodash/includes")); - - _includes = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var cache = _interopRequireWildcard(require("./cache")); - -var _path = _interopRequireDefault(require("./path")); - -var _scope = _interopRequireDefault(require("./scope")); - -var _hub = _interopRequireDefault(require("./hub")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function traverse(parent, opts, scope, state, parentPath) { - if (!parent) return; - if (!opts) opts = {}; - - if (!opts.noScope && !scope) { - if (parent.type !== "Program" && parent.type !== "File") { - throw new Error("You must pass a scope and parentPath unless traversing a Program/File. " + `Instead of that you tried to traverse a ${parent.type} node without ` + "passing scope and parentPath."); - } - } - - visitors.explode(opts); - traverse.node(parent, opts, scope, state, parentPath); -} - -traverse.visitors = visitors; -traverse.verify = visitors.verify; -traverse.explode = visitors.explode; - -traverse.cheap = function (node, enter) { - return t().traverseFast(node, enter); -}; - -traverse.node = function (node, opts, scope, state, parentPath, skipKeys) { - const keys = t().VISITOR_KEYS[node.type]; - if (!keys) return; - const context = new _context.default(scope, opts, state, parentPath); - - for (const key of keys) { - if (skipKeys && skipKeys[key]) continue; - if (context.visit(node, key)) return; - } -}; - -traverse.clearNode = function (node, opts) { - t().removeProperties(node, opts); - cache.path.delete(node); -}; - -traverse.removeProperties = function (tree, opts) { - t().traverseFast(tree, traverse.clearNode, opts); - return tree; -}; - -function hasBlacklistedType(path, state) { - if (path.node.type === state.type) { - state.has = true; - path.stop(); - } -} - -traverse.hasType = function (tree, type, blacklistTypes) { - if ((0, _includes().default)(blacklistTypes, tree.type)) return false; - if (tree.type === type) return true; - const state = { - has: false, - type: type - }; - traverse(tree, { - noScope: true, - blacklist: blacklistTypes, - enter: hasBlacklistedType - }, null, state); - return state.has; -}; - -traverse.cache = cache; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/comments.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/comments.js deleted file mode 100644 index 09ec514b91a2a4..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/comments.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.shareCommentsWithSiblings = shareCommentsWithSiblings; -exports.addComment = addComment; -exports.addComments = addComments; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function shareCommentsWithSiblings() { - if (typeof this.key === "string") return; - const node = this.node; - if (!node) return; - const trailing = node.trailingComments; - const leading = node.leadingComments; - if (!trailing && !leading) return; - const prev = this.getSibling(this.key - 1); - const next = this.getSibling(this.key + 1); - const hasPrev = Boolean(prev.node); - const hasNext = Boolean(next.node); - - if (hasPrev && hasNext) {} else if (hasPrev) { - prev.addComments("trailing", trailing); - } else if (hasNext) { - next.addComments("leading", leading); - } -} - -function addComment(type, content, line) { - t().addComment(this.node, type, content, line); -} - -function addComments(type, comments) { - t().addComments(this.node, type, comments); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/context.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/context.js deleted file mode 100644 index eacfc4e9b210d4..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/context.js +++ /dev/null @@ -1,245 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.call = call; -exports._call = _call; -exports.isBlacklisted = isBlacklisted; -exports.visit = visit; -exports.skip = skip; -exports.skipKey = skipKey; -exports.stop = stop; -exports.setScope = setScope; -exports.setContext = setContext; -exports.resync = resync; -exports._resyncParent = _resyncParent; -exports._resyncKey = _resyncKey; -exports._resyncList = _resyncList; -exports._resyncRemoved = _resyncRemoved; -exports.popContext = popContext; -exports.pushContext = pushContext; -exports.setup = setup; -exports.setKey = setKey; -exports.requeue = requeue; -exports._getQueueContexts = _getQueueContexts; - -var _index = _interopRequireDefault(require("../index")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function call(key) { - const opts = this.opts; - this.debug(key); - - if (this.node) { - if (this._call(opts[key])) return true; - } - - if (this.node) { - return this._call(opts[this.node.type] && opts[this.node.type][key]); - } - - return false; -} - -function _call(fns) { - if (!fns) return false; - - for (const fn of fns) { - if (!fn) continue; - const node = this.node; - if (!node) return true; - const ret = fn.call(this.state, this, this.state); - - if (ret && typeof ret === "object" && typeof ret.then === "function") { - throw new Error(`You appear to be using a plugin with an async traversal visitor, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); - } - - if (ret) { - throw new Error(`Unexpected return value from visitor method ${fn}`); - } - - if (this.node !== node) return true; - if (this.shouldStop || this.shouldSkip || this.removed) return true; - } - - return false; -} - -function isBlacklisted() { - const blacklist = this.opts.blacklist; - return blacklist && blacklist.indexOf(this.node.type) > -1; -} - -function visit() { - if (!this.node) { - return false; - } - - if (this.isBlacklisted()) { - return false; - } - - if (this.opts.shouldSkip && this.opts.shouldSkip(this)) { - return false; - } - - if (this.call("enter") || this.shouldSkip) { - this.debug("Skip..."); - return this.shouldStop; - } - - this.debug("Recursing into..."); - - _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys); - - this.call("exit"); - return this.shouldStop; -} - -function skip() { - this.shouldSkip = true; -} - -function skipKey(key) { - this.skipKeys[key] = true; -} - -function stop() { - this.shouldStop = true; - this.shouldSkip = true; -} - -function setScope() { - if (this.opts && this.opts.noScope) return; - let path = this.parentPath; - let target; - - while (path && !target) { - if (path.opts && path.opts.noScope) return; - target = path.scope; - path = path.parentPath; - } - - this.scope = this.getScope(target); - if (this.scope) this.scope.init(); -} - -function setContext(context) { - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.skipKeys = {}; - - if (context) { - this.context = context; - this.state = context.state; - this.opts = context.opts; - } - - this.setScope(); - return this; -} - -function resync() { - if (this.removed) return; - - this._resyncParent(); - - this._resyncList(); - - this._resyncKey(); -} - -function _resyncParent() { - if (this.parentPath) { - this.parent = this.parentPath.node; - } -} - -function _resyncKey() { - if (!this.container) return; - if (this.node === this.container[this.key]) return; - - if (Array.isArray(this.container)) { - for (let i = 0; i < this.container.length; i++) { - if (this.container[i] === this.node) { - return this.setKey(i); - } - } - } else { - for (const key of Object.keys(this.container)) { - if (this.container[key] === this.node) { - return this.setKey(key); - } - } - } - - this.key = null; -} - -function _resyncList() { - if (!this.parent || !this.inList) return; - const newContainer = this.parent[this.listKey]; - if (this.container === newContainer) return; - this.container = newContainer || null; -} - -function _resyncRemoved() { - if (this.key == null || !this.container || this.container[this.key] !== this.node) { - this._markRemoved(); - } -} - -function popContext() { - this.contexts.pop(); - - if (this.contexts.length > 0) { - this.setContext(this.contexts[this.contexts.length - 1]); - } else { - this.setContext(undefined); - } -} - -function pushContext(context) { - this.contexts.push(context); - this.setContext(context); -} - -function setup(parentPath, container, listKey, key) { - this.inList = !!listKey; - this.listKey = listKey; - this.parentKey = listKey || key; - this.container = container; - this.parentPath = parentPath || this.parentPath; - this.setKey(key); -} - -function setKey(key) { - this.key = key; - this.node = this.container[this.key]; - this.type = this.node && this.node.type; -} - -function requeue(pathToQueue = this) { - if (pathToQueue.removed) return; - const contexts = this.contexts; - - for (const context of contexts) { - context.maybeQueue(pathToQueue); - } -} - -function _getQueueContexts() { - let path = this; - let contexts = this.contexts; - - while (!contexts.length) { - path = path.parentPath; - if (!path) break; - contexts = path.contexts; - } - - return contexts; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/conversion.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/conversion.js deleted file mode 100644 index 9faa9053bc94e2..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/conversion.js +++ /dev/null @@ -1,463 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.toComputedKey = toComputedKey; -exports.ensureBlock = ensureBlock; -exports.arrowFunctionToShadowed = arrowFunctionToShadowed; -exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment; -exports.arrowFunctionToExpression = arrowFunctionToExpression; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _helperFunctionName() { - const data = _interopRequireDefault(require("@babel/helper-function-name")); - - _helperFunctionName = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function toComputedKey() { - const node = this.node; - let key; - - if (this.isMemberExpression()) { - key = node.property; - } else if (this.isProperty() || this.isMethod()) { - key = node.key; - } else { - throw new ReferenceError("todo"); - } - - if (!node.computed) { - if (t().isIdentifier(key)) key = t().stringLiteral(key.name); - } - - return key; -} - -function ensureBlock() { - const body = this.get("body"); - const bodyNode = body.node; - - if (Array.isArray(body)) { - throw new Error("Can't convert array path to a block statement"); - } - - if (!bodyNode) { - throw new Error("Can't convert node without a body"); - } - - if (body.isBlockStatement()) { - return bodyNode; - } - - const statements = []; - let stringPath = "body"; - let key; - let listKey; - - if (body.isStatement()) { - listKey = "body"; - key = 0; - statements.push(body.node); - } else { - stringPath += ".body.0"; - - if (this.isFunction()) { - key = "argument"; - statements.push(t().returnStatement(body.node)); - } else { - key = "expression"; - statements.push(t().expressionStatement(body.node)); - } - } - - this.node.body = t().blockStatement(statements); - const parentPath = this.get(stringPath); - body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key); - return this.node; -} - -function arrowFunctionToShadowed() { - if (!this.isArrowFunctionExpression()) return; - this.arrowFunctionToExpression(); -} - -function unwrapFunctionEnvironment() { - if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) { - throw this.buildCodeFrameError("Can only unwrap the environment of a function."); - } - - hoistFunctionEnvironment(this); -} - -function arrowFunctionToExpression({ - allowInsertArrow = true, - specCompliant = false -} = {}) { - if (!this.isArrowFunctionExpression()) { - throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression."); - } - - const thisBinding = hoistFunctionEnvironment(this, specCompliant, allowInsertArrow); - this.ensureBlock(); - this.node.type = "FunctionExpression"; - - if (specCompliant) { - const checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId"); - - if (checkBinding) { - this.parentPath.scope.push({ - id: checkBinding, - init: t().objectExpression([]) - }); - } - - this.get("body").unshiftContainer("body", t().expressionStatement(t().callExpression(this.hub.addHelper("newArrowCheck"), [t().thisExpression(), checkBinding ? t().identifier(checkBinding.name) : t().identifier(thisBinding)]))); - this.replaceWith(t().callExpression(t().memberExpression((0, _helperFunctionName().default)(this, true) || this.node, t().identifier("bind")), [checkBinding ? t().identifier(checkBinding.name) : t().thisExpression()])); - } -} - -function hoistFunctionEnvironment(fnPath, specCompliant = false, allowInsertArrow = true) { - const thisEnvFn = fnPath.findParent(p => { - return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({ - static: false - }); - }); - const inConstructor = thisEnvFn && thisEnvFn.node.kind === "constructor"; - - if (thisEnvFn.isClassProperty()) { - throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property"); - } - - const { - thisPaths, - argumentsPaths, - newTargetPaths, - superProps, - superCalls - } = getScopeInformation(fnPath); - - if (inConstructor && superCalls.length > 0) { - if (!allowInsertArrow) { - throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow"); - } - - const allSuperCalls = []; - thisEnvFn.traverse({ - Function(child) { - if (child.isArrowFunctionExpression()) return; - child.skip(); - }, - - ClassProperty(child) { - child.skip(); - }, - - CallExpression(child) { - if (!child.get("callee").isSuper()) return; - allSuperCalls.push(child); - } - - }); - const superBinding = getSuperBinding(thisEnvFn); - allSuperCalls.forEach(superCall => { - const callee = t().identifier(superBinding); - callee.loc = superCall.node.callee.loc; - superCall.get("callee").replaceWith(callee); - }); - } - - let thisBinding; - - if (thisPaths.length > 0 || specCompliant) { - thisBinding = getThisBinding(thisEnvFn, inConstructor); - - if (!specCompliant || inConstructor && hasSuperClass(thisEnvFn)) { - thisPaths.forEach(thisChild => { - const thisRef = thisChild.isJSX() ? t().jsxIdentifier(thisBinding) : t().identifier(thisBinding); - thisRef.loc = thisChild.node.loc; - thisChild.replaceWith(thisRef); - }); - if (specCompliant) thisBinding = null; - } - } - - if (argumentsPaths.length > 0) { - const argumentsBinding = getBinding(thisEnvFn, "arguments", () => t().identifier("arguments")); - argumentsPaths.forEach(argumentsChild => { - const argsRef = t().identifier(argumentsBinding); - argsRef.loc = argumentsChild.node.loc; - argumentsChild.replaceWith(argsRef); - }); - } - - if (newTargetPaths.length > 0) { - const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => t().metaProperty(t().identifier("new"), t().identifier("target"))); - newTargetPaths.forEach(targetChild => { - const targetRef = t().identifier(newTargetBinding); - targetRef.loc = targetChild.node.loc; - targetChild.replaceWith(targetRef); - }); - } - - if (superProps.length > 0) { - if (!allowInsertArrow) { - throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage"); - } - - const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []); - flatSuperProps.forEach(superProp => { - const key = superProp.node.computed ? "" : superProp.get("property").node.name; - - if (superProp.parentPath.isCallExpression({ - callee: superProp.node - })) { - const superBinding = getSuperPropCallBinding(thisEnvFn, key); - - if (superProp.node.computed) { - const prop = superProp.get("property").node; - superProp.replaceWith(t().identifier(superBinding)); - superProp.parentPath.node.arguments.unshift(prop); - } else { - superProp.replaceWith(t().identifier(superBinding)); - } - } else { - const isAssignment = superProp.parentPath.isAssignmentExpression({ - left: superProp.node - }); - const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key); - const args = []; - - if (superProp.node.computed) { - args.push(superProp.get("property").node); - } - - if (isAssignment) { - const value = superProp.parentPath.node.right; - args.push(value); - superProp.parentPath.replaceWith(t().callExpression(t().identifier(superBinding), args)); - } else { - superProp.replaceWith(t().callExpression(t().identifier(superBinding), args)); - } - } - }); - } - - return thisBinding; -} - -function standardizeSuperProperty(superProp) { - if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") { - const assignmentPath = superProp.parentPath; - const op = assignmentPath.node.operator.slice(0, -1); - const value = assignmentPath.node.right; - assignmentPath.node.operator = "="; - - if (superProp.node.computed) { - const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp"); - assignmentPath.get("left").replaceWith(t().memberExpression(superProp.node.object, t().assignmentExpression("=", tmp, superProp.node.property), true)); - assignmentPath.get("right").replaceWith(t().binaryExpression(op, t().memberExpression(superProp.node.object, t().identifier(tmp.name), true), value)); - } else { - assignmentPath.get("left").replaceWith(t().memberExpression(superProp.node.object, superProp.node.property)); - assignmentPath.get("right").replaceWith(t().binaryExpression(op, t().memberExpression(superProp.node.object, t().identifier(superProp.node.property.name)), value)); - } - - return [assignmentPath.get("left"), assignmentPath.get("right").get("left")]; - } else if (superProp.parentPath.isUpdateExpression()) { - const updateExpr = superProp.parentPath; - const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp"); - const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null; - const parts = [t().assignmentExpression("=", tmp, t().memberExpression(superProp.node.object, computedKey ? t().assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), t().assignmentExpression("=", t().memberExpression(superProp.node.object, computedKey ? t().identifier(computedKey.name) : superProp.node.property, superProp.node.computed), t().binaryExpression("+", t().identifier(tmp.name), t().numericLiteral(1)))]; - - if (!superProp.parentPath.node.prefix) { - parts.push(t().identifier(tmp.name)); - } - - updateExpr.replaceWith(t().sequenceExpression(parts)); - const left = updateExpr.get("expressions.0.right"); - const right = updateExpr.get("expressions.1.left"); - return [left, right]; - } - - return [superProp]; -} - -function hasSuperClass(thisEnvFn) { - return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass; -} - -function getThisBinding(thisEnvFn, inConstructor) { - return getBinding(thisEnvFn, "this", thisBinding => { - if (!inConstructor || !hasSuperClass(thisEnvFn)) return t().thisExpression(); - const supers = new WeakSet(); - thisEnvFn.traverse({ - Function(child) { - if (child.isArrowFunctionExpression()) return; - child.skip(); - }, - - ClassProperty(child) { - child.skip(); - }, - - CallExpression(child) { - if (!child.get("callee").isSuper()) return; - if (supers.has(child.node)) return; - supers.add(child.node); - child.replaceWithMultiple([child.node, t().assignmentExpression("=", t().identifier(thisBinding), t().identifier("this"))]); - } - - }); - }); -} - -function getSuperBinding(thisEnvFn) { - return getBinding(thisEnvFn, "supercall", () => { - const argsBinding = thisEnvFn.scope.generateUidIdentifier("args"); - return t().arrowFunctionExpression([t().restElement(argsBinding)], t().callExpression(t().super(), [t().spreadElement(t().identifier(argsBinding.name))])); - }); -} - -function getSuperPropCallBinding(thisEnvFn, propName) { - return getBinding(thisEnvFn, `superprop_call:${propName || ""}`, () => { - const argsBinding = thisEnvFn.scope.generateUidIdentifier("args"); - const argsList = [t().restElement(argsBinding)]; - let fnBody; - - if (propName) { - fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(propName)), [t().spreadElement(t().identifier(argsBinding.name))]); - } else { - const method = thisEnvFn.scope.generateUidIdentifier("prop"); - argsList.unshift(method); - fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(method.name), true), [t().spreadElement(t().identifier(argsBinding.name))]); - } - - return t().arrowFunctionExpression(argsList, fnBody); - }); -} - -function getSuperPropBinding(thisEnvFn, isAssignment, propName) { - const op = isAssignment ? "set" : "get"; - return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => { - const argsList = []; - let fnBody; - - if (propName) { - fnBody = t().memberExpression(t().super(), t().identifier(propName)); - } else { - const method = thisEnvFn.scope.generateUidIdentifier("prop"); - argsList.unshift(method); - fnBody = t().memberExpression(t().super(), t().identifier(method.name), true); - } - - if (isAssignment) { - const valueIdent = thisEnvFn.scope.generateUidIdentifier("value"); - argsList.push(valueIdent); - fnBody = t().assignmentExpression("=", fnBody, t().identifier(valueIdent.name)); - } - - return t().arrowFunctionExpression(argsList, fnBody); - }); -} - -function getBinding(thisEnvFn, key, init) { - const cacheKey = "binding:" + key; - let data = thisEnvFn.getData(cacheKey); - - if (!data) { - const id = thisEnvFn.scope.generateUidIdentifier(key); - data = id.name; - thisEnvFn.setData(cacheKey, data); - thisEnvFn.scope.push({ - id: id, - init: init(data) - }); - } - - return data; -} - -function getScopeInformation(fnPath) { - const thisPaths = []; - const argumentsPaths = []; - const newTargetPaths = []; - const superProps = []; - const superCalls = []; - fnPath.traverse({ - ClassProperty(child) { - child.skip(); - }, - - Function(child) { - if (child.isArrowFunctionExpression()) return; - child.skip(); - }, - - ThisExpression(child) { - thisPaths.push(child); - }, - - JSXIdentifier(child) { - if (child.node.name !== "this") return; - - if (!child.parentPath.isJSXMemberExpression({ - object: child.node - }) && !child.parentPath.isJSXOpeningElement({ - name: child.node - })) { - return; - } - - thisPaths.push(child); - }, - - CallExpression(child) { - if (child.get("callee").isSuper()) superCalls.push(child); - }, - - MemberExpression(child) { - if (child.get("object").isSuper()) superProps.push(child); - }, - - ReferencedIdentifier(child) { - if (child.node.name !== "arguments") return; - argumentsPaths.push(child); - }, - - MetaProperty(child) { - if (!child.get("meta").isIdentifier({ - name: "new" - })) return; - if (!child.get("property").isIdentifier({ - name: "target" - })) return; - newTargetPaths.push(child); - } - - }); - return { - thisPaths, - argumentsPaths, - newTargetPaths, - superProps, - superCalls - }; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/family.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/family.js deleted file mode 100644 index 42b3fc69597a80..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/family.js +++ /dev/null @@ -1,241 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getOpposite = getOpposite; -exports.getCompletionRecords = getCompletionRecords; -exports.getSibling = getSibling; -exports.getPrevSibling = getPrevSibling; -exports.getNextSibling = getNextSibling; -exports.getAllNextSiblings = getAllNextSiblings; -exports.getAllPrevSiblings = getAllPrevSiblings; -exports.get = get; -exports._getKey = _getKey; -exports._getPattern = _getPattern; -exports.getBindingIdentifiers = getBindingIdentifiers; -exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers; -exports.getBindingIdentifierPaths = getBindingIdentifierPaths; -exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths; - -var _index = _interopRequireDefault(require("./index")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getOpposite() { - if (this.key === "left") { - return this.getSibling("right"); - } else if (this.key === "right") { - return this.getSibling("left"); - } -} - -function addCompletionRecords(path, paths) { - if (path) return paths.concat(path.getCompletionRecords()); - return paths; -} - -function getCompletionRecords() { - let paths = []; - - if (this.isIfStatement()) { - paths = addCompletionRecords(this.get("consequent"), paths); - paths = addCompletionRecords(this.get("alternate"), paths); - } else if (this.isDoExpression() || this.isFor() || this.isWhile()) { - paths = addCompletionRecords(this.get("body"), paths); - } else if (this.isProgram() || this.isBlockStatement()) { - paths = addCompletionRecords(this.get("body").pop(), paths); - } else if (this.isFunction()) { - return this.get("body").getCompletionRecords(); - } else if (this.isTryStatement()) { - paths = addCompletionRecords(this.get("block"), paths); - paths = addCompletionRecords(this.get("handler"), paths); - paths = addCompletionRecords(this.get("finalizer"), paths); - } else if (this.isCatchClause()) { - paths = addCompletionRecords(this.get("body"), paths); - } else { - paths.push(this); - } - - return paths; -} - -function getSibling(key) { - return _index.default.get({ - parentPath: this.parentPath, - parent: this.parent, - container: this.container, - listKey: this.listKey, - key: key - }); -} - -function getPrevSibling() { - return this.getSibling(this.key - 1); -} - -function getNextSibling() { - return this.getSibling(this.key + 1); -} - -function getAllNextSiblings() { - let _key = this.key; - let sibling = this.getSibling(++_key); - const siblings = []; - - while (sibling.node) { - siblings.push(sibling); - sibling = this.getSibling(++_key); - } - - return siblings; -} - -function getAllPrevSiblings() { - let _key = this.key; - let sibling = this.getSibling(--_key); - const siblings = []; - - while (sibling.node) { - siblings.push(sibling); - sibling = this.getSibling(--_key); - } - - return siblings; -} - -function get(key, context) { - if (context === true) context = this.context; - const parts = key.split("."); - - if (parts.length === 1) { - return this._getKey(key, context); - } else { - return this._getPattern(parts, context); - } -} - -function _getKey(key, context) { - const node = this.node; - const container = node[key]; - - if (Array.isArray(container)) { - return container.map((_, i) => { - return _index.default.get({ - listKey: key, - parentPath: this, - parent: node, - container: container, - key: i - }).setContext(context); - }); - } else { - return _index.default.get({ - parentPath: this, - parent: node, - container: node, - key: key - }).setContext(context); - } -} - -function _getPattern(parts, context) { - let path = this; - - for (const part of parts) { - if (part === ".") { - path = path.parentPath; - } else { - if (Array.isArray(path)) { - path = path[part]; - } else { - path = path.get(part, context); - } - } - } - - return path; -} - -function getBindingIdentifiers(duplicates) { - return t().getBindingIdentifiers(this.node, duplicates); -} - -function getOuterBindingIdentifiers(duplicates) { - return t().getOuterBindingIdentifiers(this.node, duplicates); -} - -function getBindingIdentifierPaths(duplicates = false, outerOnly = false) { - const path = this; - let search = [].concat(path); - const ids = Object.create(null); - - while (search.length) { - const id = search.shift(); - if (!id) continue; - if (!id.node) continue; - const keys = t().getBindingIdentifiers.keys[id.node.type]; - - if (id.isIdentifier()) { - if (duplicates) { - const _ids = ids[id.node.name] = ids[id.node.name] || []; - - _ids.push(id); - } else { - ids[id.node.name] = id; - } - - continue; - } - - if (id.isExportDeclaration()) { - const declaration = id.get("declaration"); - - if (declaration.isDeclaration()) { - search.push(declaration); - } - - continue; - } - - if (outerOnly) { - if (id.isFunctionDeclaration()) { - search.push(id.get("id")); - continue; - } - - if (id.isFunctionExpression()) { - continue; - } - } - - if (keys) { - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const child = id.get(key); - - if (Array.isArray(child) || child.node) { - search = search.concat(child); - } - } - } - } - - return ids; -} - -function getOuterBindingIdentifierPaths(duplicates) { - return this.getBindingIdentifierPaths(duplicates, true); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/index.js deleted file mode 100644 index 906087f10d8021..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/index.js +++ /dev/null @@ -1,219 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var virtualTypes = _interopRequireWildcard(require("./lib/virtual-types")); - -function _debug() { - const data = _interopRequireDefault(require("debug")); - - _debug = function () { - return data; - }; - - return data; -} - -var _index = _interopRequireDefault(require("../index")); - -var _scope = _interopRequireDefault(require("../scope")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var _cache = require("../cache"); - -function _generator() { - const data = _interopRequireDefault(require("@babel/generator")); - - _generator = function () { - return data; - }; - - return data; -} - -var NodePath_ancestry = _interopRequireWildcard(require("./ancestry")); - -var NodePath_inference = _interopRequireWildcard(require("./inference")); - -var NodePath_replacement = _interopRequireWildcard(require("./replacement")); - -var NodePath_evaluation = _interopRequireWildcard(require("./evaluation")); - -var NodePath_conversion = _interopRequireWildcard(require("./conversion")); - -var NodePath_introspection = _interopRequireWildcard(require("./introspection")); - -var NodePath_context = _interopRequireWildcard(require("./context")); - -var NodePath_removal = _interopRequireWildcard(require("./removal")); - -var NodePath_modification = _interopRequireWildcard(require("./modification")); - -var NodePath_family = _interopRequireWildcard(require("./family")); - -var NodePath_comments = _interopRequireWildcard(require("./comments")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const debug = (0, _debug().default)("babel"); - -class NodePath { - constructor(hub, parent) { - this.parent = parent; - this.hub = hub; - this.contexts = []; - this.data = Object.create(null); - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.state = null; - this.opts = null; - this.skipKeys = null; - this.parentPath = null; - this.context = null; - this.container = null; - this.listKey = null; - this.inList = false; - this.parentKey = null; - this.key = null; - this.node = null; - this.scope = null; - this.type = null; - this.typeAnnotation = null; - } - - static get({ - hub, - parentPath, - parent, - container, - listKey, - key - }) { - if (!hub && parentPath) { - hub = parentPath.hub; - } - - if (!parent) { - throw new Error("To get a node path the parent needs to exist"); - } - - const targetNode = container[key]; - const paths = _cache.path.get(parent) || []; - - if (!_cache.path.has(parent)) { - _cache.path.set(parent, paths); - } - - let path; - - for (let i = 0; i < paths.length; i++) { - const pathCheck = paths[i]; - - if (pathCheck.node === targetNode) { - path = pathCheck; - break; - } - } - - if (!path) { - path = new NodePath(hub, parent); - paths.push(path); - } - - path.setup(parentPath, container, listKey, key); - return path; - } - - getScope(scope) { - return this.isScope() ? new _scope.default(this) : scope; - } - - setData(key, val) { - return this.data[key] = val; - } - - getData(key, def) { - let val = this.data[key]; - if (val === undefined && def !== undefined) val = this.data[key] = def; - return val; - } - - buildCodeFrameError(msg, Error = SyntaxError) { - return this.hub.buildError(this.node, msg, Error); - } - - traverse(visitor, state) { - (0, _index.default)(this.node, visitor, this.scope, state, this); - } - - set(key, node) { - t().validate(this.node, key, node); - this.node[key] = node; - } - - getPathLocation() { - const parts = []; - let path = this; - - do { - let key = path.key; - if (path.inList) key = `${path.listKey}[${key}]`; - parts.unshift(key); - } while (path = path.parentPath); - - return parts.join("."); - } - - debug(message) { - if (!debug.enabled) return; - debug(`${this.getPathLocation()} ${this.type}: ${message}`); - } - - toString() { - return (0, _generator().default)(this.node).code; - } - -} - -exports.default = NodePath; -Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments); - -for (const type of t().TYPES) { - const typeKey = `is${type}`; - const fn = t()[typeKey]; - - NodePath.prototype[typeKey] = function (opts) { - return fn(this.node, opts); - }; - - NodePath.prototype[`assert${type}`] = function (opts) { - if (!fn(this.node, opts)) { - throw new TypeError(`Expected node path of type ${type}`); - } - }; -} - -for (const type of Object.keys(virtualTypes)) { - if (type[0] === "_") continue; - if (t().TYPES.indexOf(type) < 0) t().TYPES.push(type); - const virtualType = virtualTypes[type]; - - NodePath.prototype[`is${type}`] = function (opts) { - return virtualType.checkPath(this, opts); - }; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/index.js deleted file mode 100644 index 80a77d08ae691c..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/index.js +++ /dev/null @@ -1,132 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getTypeAnnotation = getTypeAnnotation; -exports._getTypeAnnotation = _getTypeAnnotation; -exports.isBaseType = isBaseType; -exports.couldBeBaseType = couldBeBaseType; -exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches; -exports.isGenericType = isGenericType; - -var inferers = _interopRequireWildcard(require("./inferers")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function getTypeAnnotation() { - if (this.typeAnnotation) return this.typeAnnotation; - let type = this._getTypeAnnotation() || t().anyTypeAnnotation(); - if (t().isTypeAnnotation(type)) type = type.typeAnnotation; - return this.typeAnnotation = type; -} - -function _getTypeAnnotation() { - const node = this.node; - - if (!node) { - if (this.key === "init" && this.parentPath.isVariableDeclarator()) { - const declar = this.parentPath.parentPath; - const declarParent = declar.parentPath; - - if (declar.key === "left" && declarParent.isForInStatement()) { - return t().stringTypeAnnotation(); - } - - if (declar.key === "left" && declarParent.isForOfStatement()) { - return t().anyTypeAnnotation(); - } - - return t().voidTypeAnnotation(); - } else { - return; - } - } - - if (node.typeAnnotation) { - return node.typeAnnotation; - } - - let inferer = inferers[node.type]; - - if (inferer) { - return inferer.call(this, node); - } - - inferer = inferers[this.parentPath.type]; - - if (inferer && inferer.validParent) { - return this.parentPath.getTypeAnnotation(); - } -} - -function isBaseType(baseName, soft) { - return _isBaseType(baseName, this.getTypeAnnotation(), soft); -} - -function _isBaseType(baseName, type, soft) { - if (baseName === "string") { - return t().isStringTypeAnnotation(type); - } else if (baseName === "number") { - return t().isNumberTypeAnnotation(type); - } else if (baseName === "boolean") { - return t().isBooleanTypeAnnotation(type); - } else if (baseName === "any") { - return t().isAnyTypeAnnotation(type); - } else if (baseName === "mixed") { - return t().isMixedTypeAnnotation(type); - } else if (baseName === "empty") { - return t().isEmptyTypeAnnotation(type); - } else if (baseName === "void") { - return t().isVoidTypeAnnotation(type); - } else { - if (soft) { - return false; - } else { - throw new Error(`Unknown base type ${baseName}`); - } - } -} - -function couldBeBaseType(name) { - const type = this.getTypeAnnotation(); - if (t().isAnyTypeAnnotation(type)) return true; - - if (t().isUnionTypeAnnotation(type)) { - for (const type2 of type.types) { - if (t().isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) { - return true; - } - } - - return false; - } else { - return _isBaseType(name, type, true); - } -} - -function baseTypeStrictlyMatches(right) { - const left = this.getTypeAnnotation(); - right = right.getTypeAnnotation(); - - if (!t().isAnyTypeAnnotation(left) && t().isFlowBaseAnnotation(left)) { - return right.type === left.type; - } -} - -function isGenericType(genericName) { - const type = this.getTypeAnnotation(); - return t().isGenericTypeAnnotation(type) && t().isIdentifier(type.id, { - name: genericName - }); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js deleted file mode 100644 index 35601aba7d9ed0..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js +++ /dev/null @@ -1,181 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _default(node) { - if (!this.isReferenced()) return; - const binding = this.scope.getBinding(node.name); - - if (binding) { - if (binding.identifier.typeAnnotation) { - return binding.identifier.typeAnnotation; - } else { - return getTypeAnnotationBindingConstantViolations(binding, this, node.name); - } - } - - if (node.name === "undefined") { - return t().voidTypeAnnotation(); - } else if (node.name === "NaN" || node.name === "Infinity") { - return t().numberTypeAnnotation(); - } else if (node.name === "arguments") {} -} - -function getTypeAnnotationBindingConstantViolations(binding, path, name) { - const types = []; - const functionConstantViolations = []; - let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations); - const testType = getConditionalAnnotation(binding, path, name); - - if (testType) { - const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); - constantViolations = constantViolations.filter(path => testConstantViolations.indexOf(path) < 0); - types.push(testType.typeAnnotation); - } - - if (constantViolations.length) { - constantViolations = constantViolations.concat(functionConstantViolations); - - for (const violation of constantViolations) { - types.push(violation.getTypeAnnotation()); - } - } - - if (types.length) { - return t().createUnionTypeAnnotation(types); - } -} - -function getConstantViolationsBefore(binding, path, functions) { - const violations = binding.constantViolations.slice(); - violations.unshift(binding.path); - return violations.filter(violation => { - violation = violation.resolve(); - - const status = violation._guessExecutionStatusRelativeTo(path); - - if (functions && status === "function") functions.push(violation); - return status === "before"; - }); -} - -function inferAnnotationFromBinaryExpression(name, path) { - const operator = path.node.operator; - const right = path.get("right").resolve(); - const left = path.get("left").resolve(); - let target; - - if (left.isIdentifier({ - name - })) { - target = right; - } else if (right.isIdentifier({ - name - })) { - target = left; - } - - if (target) { - if (operator === "===") { - return target.getTypeAnnotation(); - } - - if (t().BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t().numberTypeAnnotation(); - } - - return; - } - - if (operator !== "===" && operator !== "==") return; - let typeofPath; - let typePath; - - if (left.isUnaryExpression({ - operator: "typeof" - })) { - typeofPath = left; - typePath = right; - } else if (right.isUnaryExpression({ - operator: "typeof" - })) { - typeofPath = right; - typePath = left; - } - - if (!typeofPath) return; - if (!typeofPath.get("argument").isIdentifier({ - name - })) return; - typePath = typePath.resolve(); - if (!typePath.isLiteral()) return; - const typeValue = typePath.node.value; - if (typeof typeValue !== "string") return; - return t().createTypeAnnotationBasedOnTypeof(typeValue); -} - -function getParentConditionalPath(binding, path, name) { - let parentPath; - - while (parentPath = path.parentPath) { - if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) { - if (path.key === "test") { - return; - } - - return parentPath; - } - - if (parentPath.isFunction()) { - if (parentPath.parentPath.scope.getBinding(name) !== binding) return; - } - - path = parentPath; - } -} - -function getConditionalAnnotation(binding, path, name) { - const ifStatement = getParentConditionalPath(binding, path, name); - if (!ifStatement) return; - const test = ifStatement.get("test"); - const paths = [test]; - const types = []; - - for (let i = 0; i < paths.length; i++) { - const path = paths[i]; - - if (path.isLogicalExpression()) { - if (path.node.operator === "&&") { - paths.push(path.get("left")); - paths.push(path.get("right")); - } - } else if (path.isBinaryExpression()) { - const type = inferAnnotationFromBinaryExpression(name, path); - if (type) types.push(type); - } - } - - if (types.length) { - return { - typeAnnotation: t().createUnionTypeAnnotation(types), - ifStatement - }; - } - - return getConditionalAnnotation(ifStatement, name); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferers.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferers.js deleted file mode 100644 index 5890b93827acbe..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferers.js +++ /dev/null @@ -1,227 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.VariableDeclarator = VariableDeclarator; -exports.TypeCastExpression = TypeCastExpression; -exports.NewExpression = NewExpression; -exports.TemplateLiteral = TemplateLiteral; -exports.UnaryExpression = UnaryExpression; -exports.BinaryExpression = BinaryExpression; -exports.LogicalExpression = LogicalExpression; -exports.ConditionalExpression = ConditionalExpression; -exports.SequenceExpression = SequenceExpression; -exports.ParenthesizedExpression = ParenthesizedExpression; -exports.AssignmentExpression = AssignmentExpression; -exports.UpdateExpression = UpdateExpression; -exports.StringLiteral = StringLiteral; -exports.NumericLiteral = NumericLiteral; -exports.BooleanLiteral = BooleanLiteral; -exports.NullLiteral = NullLiteral; -exports.RegExpLiteral = RegExpLiteral; -exports.ObjectExpression = ObjectExpression; -exports.ArrayExpression = ArrayExpression; -exports.RestElement = RestElement; -exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func; -exports.CallExpression = CallExpression; -exports.TaggedTemplateExpression = TaggedTemplateExpression; -Object.defineProperty(exports, "Identifier", { - enumerable: true, - get: function () { - return _infererReference.default; - } -}); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var _infererReference = _interopRequireDefault(require("./inferer-reference")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function VariableDeclarator() { - const id = this.get("id"); - if (!id.isIdentifier()) return; - const init = this.get("init"); - let type = init.getTypeAnnotation(); - - if (type && type.type === "AnyTypeAnnotation") { - if (init.isCallExpression() && init.get("callee").isIdentifier({ - name: "Array" - }) && !init.scope.hasBinding("Array", true)) { - type = ArrayExpression(); - } - } - - return type; -} - -function TypeCastExpression(node) { - return node.typeAnnotation; -} - -TypeCastExpression.validParent = true; - -function NewExpression(node) { - if (this.get("callee").isIdentifier()) { - return t().genericTypeAnnotation(node.callee); - } -} - -function TemplateLiteral() { - return t().stringTypeAnnotation(); -} - -function UnaryExpression(node) { - const operator = node.operator; - - if (operator === "void") { - return t().voidTypeAnnotation(); - } else if (t().NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t().numberTypeAnnotation(); - } else if (t().STRING_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t().stringTypeAnnotation(); - } else if (t().BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t().booleanTypeAnnotation(); - } -} - -function BinaryExpression(node) { - const operator = node.operator; - - if (t().NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t().numberTypeAnnotation(); - } else if (t().BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t().booleanTypeAnnotation(); - } else if (operator === "+") { - const right = this.get("right"); - const left = this.get("left"); - - if (left.isBaseType("number") && right.isBaseType("number")) { - return t().numberTypeAnnotation(); - } else if (left.isBaseType("string") || right.isBaseType("string")) { - return t().stringTypeAnnotation(); - } - - return t().unionTypeAnnotation([t().stringTypeAnnotation(), t().numberTypeAnnotation()]); - } -} - -function LogicalExpression() { - return t().createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]); -} - -function ConditionalExpression() { - return t().createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]); -} - -function SequenceExpression() { - return this.get("expressions").pop().getTypeAnnotation(); -} - -function ParenthesizedExpression() { - return this.get("expression").getTypeAnnotation(); -} - -function AssignmentExpression() { - return this.get("right").getTypeAnnotation(); -} - -function UpdateExpression(node) { - const operator = node.operator; - - if (operator === "++" || operator === "--") { - return t().numberTypeAnnotation(); - } -} - -function StringLiteral() { - return t().stringTypeAnnotation(); -} - -function NumericLiteral() { - return t().numberTypeAnnotation(); -} - -function BooleanLiteral() { - return t().booleanTypeAnnotation(); -} - -function NullLiteral() { - return t().nullLiteralTypeAnnotation(); -} - -function RegExpLiteral() { - return t().genericTypeAnnotation(t().identifier("RegExp")); -} - -function ObjectExpression() { - return t().genericTypeAnnotation(t().identifier("Object")); -} - -function ArrayExpression() { - return t().genericTypeAnnotation(t().identifier("Array")); -} - -function RestElement() { - return ArrayExpression(); -} - -RestElement.validParent = true; - -function Func() { - return t().genericTypeAnnotation(t().identifier("Function")); -} - -const isArrayFrom = t().buildMatchMemberExpression("Array.from"); -const isObjectKeys = t().buildMatchMemberExpression("Object.keys"); -const isObjectValues = t().buildMatchMemberExpression("Object.values"); -const isObjectEntries = t().buildMatchMemberExpression("Object.entries"); - -function CallExpression() { - const { - callee - } = this.node; - - if (isObjectKeys(callee)) { - return t().arrayTypeAnnotation(t().stringTypeAnnotation()); - } else if (isArrayFrom(callee) || isObjectValues(callee)) { - return t().arrayTypeAnnotation(t().anyTypeAnnotation()); - } else if (isObjectEntries(callee)) { - return t().arrayTypeAnnotation(t().tupleTypeAnnotation([t().stringTypeAnnotation(), t().anyTypeAnnotation()])); - } - - return resolveCall(this.get("callee")); -} - -function TaggedTemplateExpression() { - return resolveCall(this.get("tag")); -} - -function resolveCall(callee) { - callee = callee.resolve(); - - if (callee.isFunction()) { - if (callee.is("async")) { - if (callee.is("generator")) { - return t().genericTypeAnnotation(t().identifier("AsyncIterator")); - } else { - return t().genericTypeAnnotation(t().identifier("Promise")); - } - } else { - if (callee.node.returnType) { - return callee.node.returnType; - } else {} - } - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/introspection.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/introspection.js deleted file mode 100644 index 3eab2763b8fa69..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/introspection.js +++ /dev/null @@ -1,371 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.matchesPattern = matchesPattern; -exports.has = has; -exports.isStatic = isStatic; -exports.isnt = isnt; -exports.equals = equals; -exports.isNodeType = isNodeType; -exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression; -exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement; -exports.isCompletionRecord = isCompletionRecord; -exports.isStatementOrBlock = isStatementOrBlock; -exports.referencesImport = referencesImport; -exports.getSource = getSource; -exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore; -exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo; -exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions; -exports.resolve = resolve; -exports._resolve = _resolve; -exports.isConstantExpression = isConstantExpression; -exports.isInStrictMode = isInStrictMode; -exports.is = void 0; - -function _includes() { - const data = _interopRequireDefault(require("lodash/includes")); - - _includes = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function matchesPattern(pattern, allowPartial) { - return t().matchesPattern(this.node, pattern, allowPartial); -} - -function has(key) { - const val = this.node && this.node[key]; - - if (val && Array.isArray(val)) { - return !!val.length; - } else { - return !!val; - } -} - -function isStatic() { - return this.scope.isStatic(this.node); -} - -const is = has; -exports.is = is; - -function isnt(key) { - return !this.has(key); -} - -function equals(key, value) { - return this.node[key] === value; -} - -function isNodeType(type) { - return t().isType(this.type, type); -} - -function canHaveVariableDeclarationOrExpression() { - return (this.key === "init" || this.key === "left") && this.parentPath.isFor(); -} - -function canSwapBetweenExpressionAndStatement(replacement) { - if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) { - return false; - } - - if (this.isExpression()) { - return t().isBlockStatement(replacement); - } else if (this.isBlockStatement()) { - return t().isExpression(replacement); - } - - return false; -} - -function isCompletionRecord(allowInsideFunction) { - let path = this; - let first = true; - - do { - const container = path.container; - - if (path.isFunction() && !first) { - return !!allowInsideFunction; - } - - first = false; - - if (Array.isArray(container) && path.key !== container.length - 1) { - return false; - } - } while ((path = path.parentPath) && !path.isProgram()); - - return true; -} - -function isStatementOrBlock() { - if (this.parentPath.isLabeledStatement() || t().isBlockStatement(this.container)) { - return false; - } else { - return (0, _includes().default)(t().STATEMENT_OR_BLOCK_KEYS, this.key); - } -} - -function referencesImport(moduleSource, importName) { - if (!this.isReferencedIdentifier()) return false; - const binding = this.scope.getBinding(this.node.name); - if (!binding || binding.kind !== "module") return false; - const path = binding.path; - const parent = path.parentPath; - if (!parent.isImportDeclaration()) return false; - - if (parent.node.source.value === moduleSource) { - if (!importName) return true; - } else { - return false; - } - - if (path.isImportDefaultSpecifier() && importName === "default") { - return true; - } - - if (path.isImportNamespaceSpecifier() && importName === "*") { - return true; - } - - if (path.isImportSpecifier() && path.node.imported.name === importName) { - return true; - } - - return false; -} - -function getSource() { - const node = this.node; - - if (node.end) { - const code = this.hub.getCode(); - if (code) return code.slice(node.start, node.end); - } - - return ""; -} - -function willIMaybeExecuteBefore(target) { - return this._guessExecutionStatusRelativeTo(target) !== "after"; -} - -function _guessExecutionStatusRelativeTo(target) { - const targetFuncParent = target.scope.getFunctionParent() || target.scope.getProgramParent(); - const selfFuncParent = this.scope.getFunctionParent() || target.scope.getProgramParent(); - - if (targetFuncParent.node !== selfFuncParent.node) { - const status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent); - - if (status) { - return status; - } else { - target = targetFuncParent.path; - } - } - - const targetPaths = target.getAncestry(); - if (targetPaths.indexOf(this) >= 0) return "after"; - const selfPaths = this.getAncestry(); - let commonPath; - let targetIndex; - let selfIndex; - - for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) { - const selfPath = selfPaths[selfIndex]; - targetIndex = targetPaths.indexOf(selfPath); - - if (targetIndex >= 0) { - commonPath = selfPath; - break; - } - } - - if (!commonPath) { - return "before"; - } - - const targetRelationship = targetPaths[targetIndex - 1]; - const selfRelationship = selfPaths[selfIndex - 1]; - - if (!targetRelationship || !selfRelationship) { - return "before"; - } - - if (targetRelationship.listKey && targetRelationship.container === selfRelationship.container) { - return targetRelationship.key > selfRelationship.key ? "before" : "after"; - } - - const keys = t().VISITOR_KEYS[commonPath.type]; - const targetKeyPosition = keys.indexOf(targetRelationship.key); - const selfKeyPosition = keys.indexOf(selfRelationship.key); - return targetKeyPosition > selfKeyPosition ? "before" : "after"; -} - -function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent) { - const targetFuncPath = targetFuncParent.path; - if (!targetFuncPath.isFunctionDeclaration()) return; - const binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name); - if (!binding.references) return "before"; - const referencePaths = binding.referencePaths; - - for (const path of referencePaths) { - if (path.key !== "callee" || !path.parentPath.isCallExpression()) { - return; - } - } - - let allStatus; - - for (const path of referencePaths) { - const childOfFunction = !!path.find(path => path.node === targetFuncPath.node); - if (childOfFunction) continue; - - const status = this._guessExecutionStatusRelativeTo(path); - - if (allStatus) { - if (allStatus !== status) return; - } else { - allStatus = status; - } - } - - return allStatus; -} - -function resolve(dangerous, resolved) { - return this._resolve(dangerous, resolved) || this; -} - -function _resolve(dangerous, resolved) { - if (resolved && resolved.indexOf(this) >= 0) return; - resolved = resolved || []; - resolved.push(this); - - if (this.isVariableDeclarator()) { - if (this.get("id").isIdentifier()) { - return this.get("init").resolve(dangerous, resolved); - } else {} - } else if (this.isReferencedIdentifier()) { - const binding = this.scope.getBinding(this.node.name); - if (!binding) return; - if (!binding.constant) return; - if (binding.kind === "module") return; - - if (binding.path !== this) { - const ret = binding.path.resolve(dangerous, resolved); - if (this.find(parent => parent.node === ret.node)) return; - return ret; - } - } else if (this.isTypeCastExpression()) { - return this.get("expression").resolve(dangerous, resolved); - } else if (dangerous && this.isMemberExpression()) { - const targetKey = this.toComputedKey(); - if (!t().isLiteral(targetKey)) return; - const targetName = targetKey.value; - const target = this.get("object").resolve(dangerous, resolved); - - if (target.isObjectExpression()) { - const props = target.get("properties"); - - for (const prop of props) { - if (!prop.isProperty()) continue; - const key = prop.get("key"); - let match = prop.isnt("computed") && key.isIdentifier({ - name: targetName - }); - match = match || key.isLiteral({ - value: targetName - }); - if (match) return prop.get("value").resolve(dangerous, resolved); - } - } else if (target.isArrayExpression() && !isNaN(+targetName)) { - const elems = target.get("elements"); - const elem = elems[targetName]; - if (elem) return elem.resolve(dangerous, resolved); - } - } -} - -function isConstantExpression() { - if (this.isIdentifier()) { - const binding = this.scope.getBinding(this.node.name); - if (!binding) return false; - return binding.constant; - } - - if (this.isLiteral()) { - if (this.isRegExpLiteral()) { - return false; - } - - if (this.isTemplateLiteral()) { - return this.get("expressions").every(expression => expression.isConstantExpression()); - } - - return true; - } - - if (this.isUnaryExpression()) { - if (this.get("operator").node !== "void") { - return false; - } - - return this.get("argument").isConstantExpression(); - } - - if (this.isBinaryExpression()) { - return this.get("left").isConstantExpression() && this.get("right").isConstantExpression(); - } - - return false; -} - -function isInStrictMode() { - const start = this.isProgram() ? this : this.parentPath; - const strictParent = start.find(path => { - if (path.isProgram({ - sourceType: "module" - })) return true; - if (path.isClass()) return true; - if (!path.isProgram() && !path.isFunction()) return false; - - if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) { - return false; - } - - let { - node - } = path; - if (path.isFunction()) node = node.body; - - for (const directive of node.directives) { - if (directive.value.value === "use strict") { - return true; - } - } - }); - return !!strictParent; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/hoister.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/hoister.js deleted file mode 100644 index 544d78827b0d5d..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/hoister.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const referenceVisitor = { - ReferencedIdentifier(path, state) { - if (path.isJSXIdentifier() && t().react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) { - return; - } - - if (path.node.name === "this") { - let scope = path.scope; - - do { - if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) { - break; - } - } while (scope = scope.parent); - - if (scope) state.breakOnScopePaths.push(scope.path); - } - - const binding = path.scope.getBinding(path.node.name); - if (!binding) return; - if (binding !== state.scope.getBinding(path.node.name)) return; - state.bindings[path.node.name] = binding; - } - -}; - -class PathHoister { - constructor(path, scope) { - this.breakOnScopePaths = []; - this.bindings = {}; - this.scopes = []; - this.scope = scope; - this.path = path; - this.attachAfter = false; - } - - isCompatibleScope(scope) { - for (const key of Object.keys(this.bindings)) { - const binding = this.bindings[key]; - - if (!scope.bindingIdentifierEquals(key, binding.identifier)) { - return false; - } - } - - return true; - } - - getCompatibleScopes() { - let scope = this.path.scope; - - do { - if (this.isCompatibleScope(scope)) { - this.scopes.push(scope); - } else { - break; - } - - if (this.breakOnScopePaths.indexOf(scope.path) >= 0) { - break; - } - } while (scope = scope.parent); - } - - getAttachmentPath() { - let path = this._getAttachmentPath(); - - if (!path) return; - let targetScope = path.scope; - - if (targetScope.path === path) { - targetScope = path.scope.parent; - } - - if (targetScope.path.isProgram() || targetScope.path.isFunction()) { - for (const name of Object.keys(this.bindings)) { - if (!targetScope.hasOwnBinding(name)) continue; - const binding = this.bindings[name]; - - if (binding.kind === "param" || binding.path.parentKey === "params") { - continue; - } - - const bindingParentPath = this.getAttachmentParentForPath(binding.path); - - if (bindingParentPath.key >= path.key) { - this.attachAfter = true; - path = binding.path; - - for (const violationPath of binding.constantViolations) { - if (this.getAttachmentParentForPath(violationPath).key > path.key) { - path = violationPath; - } - } - } - } - } - - return path; - } - - _getAttachmentPath() { - const scopes = this.scopes; - const scope = scopes.pop(); - if (!scope) return; - - if (scope.path.isFunction()) { - if (this.hasOwnParamBindings(scope)) { - if (this.scope === scope) return; - const bodies = scope.path.get("body").get("body"); - - for (let i = 0; i < bodies.length; i++) { - if (bodies[i].node._blockHoist) continue; - return bodies[i]; - } - } else { - return this.getNextScopeAttachmentParent(); - } - } else if (scope.path.isProgram()) { - return this.getNextScopeAttachmentParent(); - } - } - - getNextScopeAttachmentParent() { - const scope = this.scopes.pop(); - if (scope) return this.getAttachmentParentForPath(scope.path); - } - - getAttachmentParentForPath(path) { - do { - if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) { - return path; - } - } while (path = path.parentPath); - } - - hasOwnParamBindings(scope) { - for (const name of Object.keys(this.bindings)) { - if (!scope.hasOwnBinding(name)) continue; - const binding = this.bindings[name]; - if (binding.kind === "param" && binding.constant) return true; - } - - return false; - } - - run() { - this.path.traverse(referenceVisitor, this); - this.getCompatibleScopes(); - const attachTo = this.getAttachmentPath(); - if (!attachTo) return; - if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return; - let uid = attachTo.scope.generateUidIdentifier("ref"); - const declarator = t().variableDeclarator(uid, this.path.node); - const insertFn = this.attachAfter ? "insertAfter" : "insertBefore"; - const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t().variableDeclaration("var", [declarator])]); - const parent = this.path.parentPath; - - if (parent.isJSXElement() && this.path.container === parent.node.children) { - uid = t().JSXExpressionContainer(uid); - } - - this.path.replaceWith(t().cloneNode(uid)); - return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init"); - } - -} - -exports.default = PathHoister; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js deleted file mode 100644 index 2ac7cf044c2251..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js +++ /dev/null @@ -1,216 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const ReferencedIdentifier = { - types: ["Identifier", "JSXIdentifier"], - - checkPath(path, opts) { - const { - node, - parent - } = path; - - if (!t().isIdentifier(node, opts) && !t().isJSXMemberExpression(parent, opts)) { - if (t().isJSXIdentifier(node, opts)) { - if (t().react.isCompatTag(node.name)) return false; - } else { - return false; - } - } - - return t().isReferenced(node, parent, path.parentPath.parent); - } - -}; -exports.ReferencedIdentifier = ReferencedIdentifier; -const ReferencedMemberExpression = { - types: ["MemberExpression"], - - checkPath({ - node, - parent - }) { - return t().isMemberExpression(node) && t().isReferenced(node, parent); - } - -}; -exports.ReferencedMemberExpression = ReferencedMemberExpression; -const BindingIdentifier = { - types: ["Identifier"], - - checkPath(path) { - const { - node, - parent - } = path; - const grandparent = path.parentPath.parent; - return t().isIdentifier(node) && t().isBinding(node, parent, grandparent); - } - -}; -exports.BindingIdentifier = BindingIdentifier; -const Statement = { - types: ["Statement"], - - checkPath({ - node, - parent - }) { - if (t().isStatement(node)) { - if (t().isVariableDeclaration(node)) { - if (t().isForXStatement(parent, { - left: node - })) return false; - if (t().isForStatement(parent, { - init: node - })) return false; - } - - return true; - } else { - return false; - } - } - -}; -exports.Statement = Statement; -const Expression = { - types: ["Expression"], - - checkPath(path) { - if (path.isIdentifier()) { - return path.isReferencedIdentifier(); - } else { - return t().isExpression(path.node); - } - } - -}; -exports.Expression = Expression; -const Scope = { - types: ["Scopable"], - - checkPath(path) { - return t().isScope(path.node, path.parent); - } - -}; -exports.Scope = Scope; -const Referenced = { - checkPath(path) { - return t().isReferenced(path.node, path.parent); - } - -}; -exports.Referenced = Referenced; -const BlockScoped = { - checkPath(path) { - return t().isBlockScoped(path.node); - } - -}; -exports.BlockScoped = BlockScoped; -const Var = { - types: ["VariableDeclaration"], - - checkPath(path) { - return t().isVar(path.node); - } - -}; -exports.Var = Var; -const User = { - checkPath(path) { - return path.node && !!path.node.loc; - } - -}; -exports.User = User; -const Generated = { - checkPath(path) { - return !path.isUser(); - } - -}; -exports.Generated = Generated; -const Pure = { - checkPath(path, opts) { - return path.scope.isPure(path.node, opts); - } - -}; -exports.Pure = Pure; -const Flow = { - types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"], - - checkPath({ - node - }) { - if (t().isFlow(node)) { - return true; - } else if (t().isImportDeclaration(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else if (t().isExportDeclaration(node)) { - return node.exportKind === "type"; - } else if (t().isImportSpecifier(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else { - return false; - } - } - -}; -exports.Flow = Flow; -const RestProperty = { - types: ["RestElement"], - - checkPath(path) { - return path.parentPath && path.parentPath.isObjectPattern(); - } - -}; -exports.RestProperty = RestProperty; -const SpreadProperty = { - types: ["RestElement"], - - checkPath(path) { - return path.parentPath && path.parentPath.isObjectExpression(); - } - -}; -exports.SpreadProperty = SpreadProperty; -const ExistentialTypeParam = { - types: ["ExistsTypeAnnotation"] -}; -exports.ExistentialTypeParam = ExistentialTypeParam; -const NumericLiteralTypeAnnotation = { - types: ["NumberLiteralTypeAnnotation"] -}; -exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation; -const ForAwaitStatement = { - types: ["ForOfStatement"], - - checkPath({ - node - }) { - return node.await === true; - } - -}; -exports.ForAwaitStatement = ForAwaitStatement; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/replacement.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/replacement.js deleted file mode 100644 index a204ca6ef819e2..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/replacement.js +++ /dev/null @@ -1,266 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.replaceWithMultiple = replaceWithMultiple; -exports.replaceWithSourceString = replaceWithSourceString; -exports.replaceWith = replaceWith; -exports._replaceWith = _replaceWith; -exports.replaceExpressionWithStatements = replaceExpressionWithStatements; -exports.replaceInline = replaceInline; - -function _codeFrame() { - const data = require("@babel/code-frame"); - - _codeFrame = function () { - return data; - }; - - return data; -} - -var _index = _interopRequireDefault(require("../index")); - -var _index2 = _interopRequireDefault(require("./index")); - -function _parser() { - const data = require("@babel/parser"); - - _parser = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const hoistVariablesVisitor = { - Function(path) { - path.skip(); - }, - - VariableDeclaration(path) { - if (path.node.kind !== "var") return; - const bindings = path.getBindingIdentifiers(); - - for (const key of Object.keys(bindings)) { - path.scope.push({ - id: bindings[key] - }); - } - - const exprs = []; - - for (const declar of path.node.declarations) { - if (declar.init) { - exprs.push(t().expressionStatement(t().assignmentExpression("=", declar.id, declar.init))); - } - } - - path.replaceWithMultiple(exprs); - } - -}; - -function replaceWithMultiple(nodes) { - this.resync(); - nodes = this._verifyNodeList(nodes); - t().inheritLeadingComments(nodes[0], this.node); - t().inheritTrailingComments(nodes[nodes.length - 1], this.node); - this.node = this.container[this.key] = null; - const paths = this.insertAfter(nodes); - - if (this.node) { - this.requeue(); - } else { - this.remove(); - } - - return paths; -} - -function replaceWithSourceString(replacement) { - this.resync(); - - try { - replacement = `(${replacement})`; - replacement = (0, _parser().parse)(replacement); - } catch (err) { - const loc = err.loc; - - if (loc) { - err.message += " - make sure this is an expression.\n" + (0, _codeFrame().codeFrameColumns)(replacement, { - start: { - line: loc.line, - column: loc.column + 1 - } - }); - err.code = "BABEL_REPLACE_SOURCE_ERROR"; - } - - throw err; - } - - replacement = replacement.program.body[0].expression; - - _index.default.removeProperties(replacement); - - return this.replaceWith(replacement); -} - -function replaceWith(replacement) { - this.resync(); - - if (this.removed) { - throw new Error("You can't replace this node, we've already removed it"); - } - - if (replacement instanceof _index2.default) { - replacement = replacement.node; - } - - if (!replacement) { - throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead"); - } - - if (this.node === replacement) { - return [this]; - } - - if (this.isProgram() && !t().isProgram(replacement)) { - throw new Error("You can only replace a Program root node with another Program node"); - } - - if (Array.isArray(replacement)) { - throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`"); - } - - if (typeof replacement === "string") { - throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`"); - } - - let nodePath = ""; - - if (this.isNodeType("Statement") && t().isExpression(replacement)) { - if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) { - replacement = t().expressionStatement(replacement); - nodePath = "expression"; - } - } - - if (this.isNodeType("Expression") && t().isStatement(replacement)) { - if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) { - return this.replaceExpressionWithStatements([replacement]); - } - } - - const oldNode = this.node; - - if (oldNode) { - t().inheritsComments(replacement, oldNode); - t().removeComments(oldNode); - } - - this._replaceWith(replacement); - - this.type = replacement.type; - this.setScope(); - this.requeue(); - return [nodePath ? this.get(nodePath) : this]; -} - -function _replaceWith(node) { - if (!this.container) { - throw new ReferenceError("Container is falsy"); - } - - if (this.inList) { - t().validate(this.parent, this.key, [node]); - } else { - t().validate(this.parent, this.key, node); - } - - this.debug(`Replace with ${node && node.type}`); - this.node = this.container[this.key] = node; -} - -function replaceExpressionWithStatements(nodes) { - this.resync(); - const toSequenceExpression = t().toSequenceExpression(nodes, this.scope); - - if (toSequenceExpression) { - return this.replaceWith(toSequenceExpression)[0].get("expressions"); - } - - const functionParent = this.getFunctionParent(); - const isParentAsync = functionParent && functionParent.is("async"); - const container = t().arrowFunctionExpression([], t().blockStatement(nodes)); - this.replaceWith(t().callExpression(container, [])); - this.traverse(hoistVariablesVisitor); - const completionRecords = this.get("callee").getCompletionRecords(); - - for (const path of completionRecords) { - if (!path.isExpressionStatement()) continue; - const loop = path.findParent(path => path.isLoop()); - - if (loop) { - let uid = loop.getData("expressionReplacementReturnUid"); - - if (!uid) { - const callee = this.get("callee"); - uid = callee.scope.generateDeclaredUidIdentifier("ret"); - callee.get("body").pushContainer("body", t().returnStatement(t().cloneNode(uid))); - loop.setData("expressionReplacementReturnUid", uid); - } else { - uid = t().identifier(uid.name); - } - - path.get("expression").replaceWith(t().assignmentExpression("=", t().cloneNode(uid), path.node.expression)); - } else { - path.replaceWith(t().returnStatement(path.node.expression)); - } - } - - const callee = this.get("callee"); - callee.arrowFunctionToExpression(); - - if (isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", t().FUNCTION_TYPES)) { - callee.set("async", true); - this.replaceWith(t().awaitExpression(this.node)); - } - - return callee.get("body.body"); -} - -function replaceInline(nodes) { - this.resync(); - - if (Array.isArray(nodes)) { - if (Array.isArray(this.container)) { - nodes = this._verifyNodeList(nodes); - - const paths = this._containerInsertAfter(nodes); - - this.remove(); - return paths; - } else { - return this.replaceWithMultiple(nodes); - } - } else { - return this.replaceWith(nodes); - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/index.js deleted file mode 100644 index b27f22678a4e63..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/index.js +++ /dev/null @@ -1,892 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _includes() { - const data = _interopRequireDefault(require("lodash/includes")); - - _includes = function () { - return data; - }; - - return data; -} - -function _repeat() { - const data = _interopRequireDefault(require("lodash/repeat")); - - _repeat = function () { - return data; - }; - - return data; -} - -var _renamer = _interopRequireDefault(require("./lib/renamer")); - -var _index = _interopRequireDefault(require("../index")); - -function _defaults() { - const data = _interopRequireDefault(require("lodash/defaults")); - - _defaults = function () { - return data; - }; - - return data; -} - -var _binding = _interopRequireDefault(require("./binding")); - -function _globals() { - const data = _interopRequireDefault(require("globals")); - - _globals = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var _cache = require("../cache"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function gatherNodeParts(node, parts) { - if (t().isModuleDeclaration(node)) { - if (node.source) { - gatherNodeParts(node.source, parts); - } else if (node.specifiers && node.specifiers.length) { - for (const specifier of node.specifiers) { - gatherNodeParts(specifier, parts); - } - } else if (node.declaration) { - gatherNodeParts(node.declaration, parts); - } - } else if (t().isModuleSpecifier(node)) { - gatherNodeParts(node.local, parts); - } else if (t().isMemberExpression(node)) { - gatherNodeParts(node.object, parts); - gatherNodeParts(node.property, parts); - } else if (t().isIdentifier(node)) { - parts.push(node.name); - } else if (t().isLiteral(node)) { - parts.push(node.value); - } else if (t().isCallExpression(node)) { - gatherNodeParts(node.callee, parts); - } else if (t().isObjectExpression(node) || t().isObjectPattern(node)) { - for (const prop of node.properties) { - gatherNodeParts(prop.key || prop.argument, parts); - } - } else if (t().isPrivateName(node)) { - gatherNodeParts(node.id, parts); - } else if (t().isThisExpression(node)) { - parts.push("this"); - } else if (t().isSuper(node)) { - parts.push("super"); - } -} - -const collectorVisitor = { - For(path) { - for (const key of t().FOR_INIT_KEYS) { - const declar = path.get(key); - - if (declar.isVar()) { - const parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent(); - parentScope.registerBinding("var", declar); - } - } - }, - - Declaration(path) { - if (path.isBlockScoped()) return; - - if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) { - return; - } - - const parent = path.scope.getFunctionParent() || path.scope.getProgramParent(); - parent.registerDeclaration(path); - }, - - ReferencedIdentifier(path, state) { - state.references.push(path); - }, - - ForXStatement(path, state) { - const left = path.get("left"); - - if (left.isPattern() || left.isIdentifier()) { - state.constantViolations.push(path); - } - }, - - ExportDeclaration: { - exit(path) { - const { - node, - scope - } = path; - const declar = node.declaration; - - if (t().isClassDeclaration(declar) || t().isFunctionDeclaration(declar)) { - const id = declar.id; - if (!id) return; - const binding = scope.getBinding(id.name); - if (binding) binding.reference(path); - } else if (t().isVariableDeclaration(declar)) { - for (const decl of declar.declarations) { - for (const name of Object.keys(t().getBindingIdentifiers(decl))) { - const binding = scope.getBinding(name); - if (binding) binding.reference(path); - } - } - } - } - - }, - - LabeledStatement(path) { - path.scope.getProgramParent().addGlobal(path.node); - path.scope.getBlockParent().registerDeclaration(path); - }, - - AssignmentExpression(path, state) { - state.assignments.push(path); - }, - - UpdateExpression(path, state) { - state.constantViolations.push(path); - }, - - UnaryExpression(path, state) { - if (path.node.operator === "delete") { - state.constantViolations.push(path); - } - }, - - BlockScoped(path) { - let scope = path.scope; - if (scope.path === path) scope = scope.parent; - scope.getBlockParent().registerDeclaration(path); - }, - - ClassDeclaration(path) { - const id = path.node.id; - if (!id) return; - const name = id.name; - path.scope.bindings[name] = path.scope.getBinding(name); - }, - - Block(path) { - const paths = path.get("body"); - - for (const bodyPath of paths) { - if (bodyPath.isFunctionDeclaration()) { - path.scope.getBlockParent().registerDeclaration(bodyPath); - } - } - } - -}; -let uid = 0; - -class Scope { - constructor(path) { - const { - node - } = path; - - const cached = _cache.scope.get(node); - - if (cached && cached.path === path) { - return cached; - } - - _cache.scope.set(node, this); - - this.uid = uid++; - this.block = node; - this.path = path; - this.labels = new Map(); - } - - get parent() { - const parent = this.path.findParent(p => p.isScope()); - return parent && parent.scope; - } - - get parentBlock() { - return this.path.parent; - } - - get hub() { - return this.path.hub; - } - - traverse(node, opts, state) { - (0, _index.default)(node, opts, this, state, this.path); - } - - generateDeclaredUidIdentifier(name) { - const id = this.generateUidIdentifier(name); - this.push({ - id - }); - return t().cloneNode(id); - } - - generateUidIdentifier(name) { - return t().identifier(this.generateUid(name)); - } - - generateUid(name = "temp") { - name = t().toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); - let uid; - let i = 0; - - do { - uid = this._generateUid(name, i); - i++; - } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); - - const program = this.getProgramParent(); - program.references[uid] = true; - program.uids[uid] = true; - return uid; - } - - _generateUid(name, i) { - let id = name; - if (i > 1) id += i; - return `_${id}`; - } - - generateUidBasedOnNode(parent, defaultName) { - let node = parent; - - if (t().isAssignmentExpression(parent)) { - node = parent.left; - } else if (t().isVariableDeclarator(parent)) { - node = parent.id; - } else if (t().isObjectProperty(node) || t().isObjectMethod(node)) { - node = node.key; - } - - const parts = []; - gatherNodeParts(node, parts); - let id = parts.join("$"); - id = id.replace(/^_/, "") || defaultName || "ref"; - return this.generateUid(id.slice(0, 20)); - } - - generateUidIdentifierBasedOnNode(parent, defaultName) { - return t().identifier(this.generateUidBasedOnNode(parent, defaultName)); - } - - isStatic(node) { - if (t().isThisExpression(node) || t().isSuper(node)) { - return true; - } - - if (t().isIdentifier(node)) { - const binding = this.getBinding(node.name); - - if (binding) { - return binding.constant; - } else { - return this.hasBinding(node.name); - } - } - - return false; - } - - maybeGenerateMemoised(node, dontPush) { - if (this.isStatic(node)) { - return null; - } else { - const id = this.generateUidIdentifierBasedOnNode(node); - - if (!dontPush) { - this.push({ - id - }); - return t().cloneNode(id); - } - - return id; - } - } - - checkBlockScopedCollisions(local, kind, name, id) { - if (kind === "param") return; - if (local.kind === "local") return; - const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const"); - - if (duplicate) { - throw this.hub.buildError(id, `Duplicate declaration "${name}"`, TypeError); - } - } - - rename(oldName, newName, block) { - const binding = this.getBinding(oldName); - - if (binding) { - newName = newName || this.generateUidIdentifier(oldName).name; - return new _renamer.default(binding, oldName, newName).rename(block); - } - } - - _renameFromMap(map, oldName, newName, value) { - if (map[oldName]) { - map[newName] = value; - map[oldName] = null; - } - } - - dump() { - const sep = (0, _repeat().default)("-", 60); - console.log(sep); - let scope = this; - - do { - console.log("#", scope.block.type); - - for (const name of Object.keys(scope.bindings)) { - const binding = scope.bindings[name]; - console.log(" -", name, { - constant: binding.constant, - references: binding.references, - violations: binding.constantViolations.length, - kind: binding.kind - }); - } - } while (scope = scope.parent); - - console.log(sep); - } - - toArray(node, i) { - if (t().isIdentifier(node)) { - const binding = this.getBinding(node.name); - - if (binding && binding.constant && binding.path.isGenericType("Array")) { - return node; - } - } - - if (t().isArrayExpression(node)) { - return node; - } - - if (t().isIdentifier(node, { - name: "arguments" - })) { - return t().callExpression(t().memberExpression(t().memberExpression(t().memberExpression(t().identifier("Array"), t().identifier("prototype")), t().identifier("slice")), t().identifier("call")), [node]); - } - - let helperName; - const args = [node]; - - if (i === true) { - helperName = "toConsumableArray"; - } else if (i) { - args.push(t().numericLiteral(i)); - helperName = "slicedToArray"; - } else { - helperName = "toArray"; - } - - return t().callExpression(this.hub.addHelper(helperName), args); - } - - hasLabel(name) { - return !!this.getLabel(name); - } - - getLabel(name) { - return this.labels.get(name); - } - - registerLabel(path) { - this.labels.set(path.node.label.name, path); - } - - registerDeclaration(path) { - if (path.isLabeledStatement()) { - this.registerLabel(path); - } else if (path.isFunctionDeclaration()) { - this.registerBinding("hoisted", path.get("id"), path); - } else if (path.isVariableDeclaration()) { - const declarations = path.get("declarations"); - - for (const declar of declarations) { - this.registerBinding(path.node.kind, declar); - } - } else if (path.isClassDeclaration()) { - this.registerBinding("let", path); - } else if (path.isImportDeclaration()) { - const specifiers = path.get("specifiers"); - - for (const specifier of specifiers) { - this.registerBinding("module", specifier); - } - } else if (path.isExportDeclaration()) { - const declar = path.get("declaration"); - - if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) { - this.registerDeclaration(declar); - } - } else { - this.registerBinding("unknown", path); - } - } - - buildUndefinedNode() { - if (this.hasBinding("undefined")) { - return t().unaryExpression("void", t().numericLiteral(0), true); - } else { - return t().identifier("undefined"); - } - } - - registerConstantViolation(path) { - const ids = path.getBindingIdentifiers(); - - for (const name of Object.keys(ids)) { - const binding = this.getBinding(name); - if (binding) binding.reassign(path); - } - } - - registerBinding(kind, path, bindingPath = path) { - if (!kind) throw new ReferenceError("no `kind`"); - - if (path.isVariableDeclaration()) { - const declarators = path.get("declarations"); - - for (const declar of declarators) { - this.registerBinding(kind, declar); - } - - return; - } - - const parent = this.getProgramParent(); - const ids = path.getOuterBindingIdentifiers(true); - - for (const name of Object.keys(ids)) { - for (const id of ids[name]) { - const local = this.getOwnBinding(name); - - if (local) { - if (local.identifier === id) continue; - this.checkBlockScopedCollisions(local, kind, name, id); - } - - parent.references[name] = true; - - if (local) { - this.registerConstantViolation(bindingPath); - } else { - this.bindings[name] = new _binding.default({ - identifier: id, - scope: this, - path: bindingPath, - kind: kind - }); - } - } - } - } - - addGlobal(node) { - this.globals[node.name] = node; - } - - hasUid(name) { - let scope = this; - - do { - if (scope.uids[name]) return true; - } while (scope = scope.parent); - - return false; - } - - hasGlobal(name) { - let scope = this; - - do { - if (scope.globals[name]) return true; - } while (scope = scope.parent); - - return false; - } - - hasReference(name) { - let scope = this; - - do { - if (scope.references[name]) return true; - } while (scope = scope.parent); - - return false; - } - - isPure(node, constantsOnly) { - if (t().isIdentifier(node)) { - const binding = this.getBinding(node.name); - if (!binding) return false; - if (constantsOnly) return binding.constant; - return true; - } else if (t().isClass(node)) { - if (node.superClass && !this.isPure(node.superClass, constantsOnly)) { - return false; - } - - return this.isPure(node.body, constantsOnly); - } else if (t().isClassBody(node)) { - for (const method of node.body) { - if (!this.isPure(method, constantsOnly)) return false; - } - - return true; - } else if (t().isBinary(node)) { - return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); - } else if (t().isArrayExpression(node)) { - for (const elem of node.elements) { - if (!this.isPure(elem, constantsOnly)) return false; - } - - return true; - } else if (t().isObjectExpression(node)) { - for (const prop of node.properties) { - if (!this.isPure(prop, constantsOnly)) return false; - } - - return true; - } else if (t().isClassMethod(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - if (node.kind === "get" || node.kind === "set") return false; - return true; - } else if (t().isProperty(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - return this.isPure(node.value, constantsOnly); - } else if (t().isUnaryExpression(node)) { - return this.isPure(node.argument, constantsOnly); - } else if (t().isTaggedTemplateExpression(node)) { - return t().matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly); - } else if (t().isTemplateLiteral(node)) { - for (const expression of node.expressions) { - if (!this.isPure(expression, constantsOnly)) return false; - } - - return true; - } else { - return t().isPureish(node); - } - } - - setData(key, val) { - return this.data[key] = val; - } - - getData(key) { - let scope = this; - - do { - const data = scope.data[key]; - if (data != null) return data; - } while (scope = scope.parent); - } - - removeData(key) { - let scope = this; - - do { - const data = scope.data[key]; - if (data != null) scope.data[key] = null; - } while (scope = scope.parent); - } - - init() { - if (!this.references) this.crawl(); - } - - crawl() { - const path = this.path; - this.references = Object.create(null); - this.bindings = Object.create(null); - this.globals = Object.create(null); - this.uids = Object.create(null); - this.data = Object.create(null); - - if (path.isLoop()) { - for (const key of t().FOR_INIT_KEYS) { - const node = path.get(key); - if (node.isBlockScoped()) this.registerBinding(node.node.kind, node); - } - } - - if (path.isFunctionExpression() && path.has("id")) { - if (!path.get("id").node[t().NOT_LOCAL_BINDING]) { - this.registerBinding("local", path.get("id"), path); - } - } - - if (path.isClassExpression() && path.has("id")) { - if (!path.get("id").node[t().NOT_LOCAL_BINDING]) { - this.registerBinding("local", path); - } - } - - if (path.isFunction()) { - const params = path.get("params"); - - for (const param of params) { - this.registerBinding("param", param); - } - } - - if (path.isCatchClause()) { - this.registerBinding("let", path); - } - - const parent = this.getProgramParent(); - if (parent.crawling) return; - const state = { - references: [], - constantViolations: [], - assignments: [] - }; - this.crawling = true; - path.traverse(collectorVisitor, state); - this.crawling = false; - - for (const path of state.assignments) { - const ids = path.getBindingIdentifiers(); - let programParent; - - for (const name of Object.keys(ids)) { - if (path.scope.getBinding(name)) continue; - programParent = programParent || path.scope.getProgramParent(); - programParent.addGlobal(ids[name]); - } - - path.scope.registerConstantViolation(path); - } - - for (const ref of state.references) { - const binding = ref.scope.getBinding(ref.node.name); - - if (binding) { - binding.reference(ref); - } else { - ref.scope.getProgramParent().addGlobal(ref.node); - } - } - - for (const path of state.constantViolations) { - path.scope.registerConstantViolation(path); - } - } - - push(opts) { - let path = this.path; - - if (!path.isBlockStatement() && !path.isProgram()) { - path = this.getBlockParent().path; - } - - if (path.isSwitchStatement()) { - path = (this.getFunctionParent() || this.getProgramParent()).path; - } - - if (path.isLoop() || path.isCatchClause() || path.isFunction()) { - path.ensureBlock(); - path = path.get("body"); - } - - const unique = opts.unique; - const kind = opts.kind || "var"; - const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; - const dataKey = `declaration:${kind}:${blockHoist}`; - let declarPath = !unique && path.getData(dataKey); - - if (!declarPath) { - const declar = t().variableDeclaration(kind, []); - declar._blockHoist = blockHoist; - [declarPath] = path.unshiftContainer("body", [declar]); - if (!unique) path.setData(dataKey, declarPath); - } - - const declarator = t().variableDeclarator(opts.id, opts.init); - declarPath.node.declarations.push(declarator); - this.registerBinding(kind, declarPath.get("declarations").pop()); - } - - getProgramParent() { - let scope = this; - - do { - if (scope.path.isProgram()) { - return scope; - } - } while (scope = scope.parent); - - throw new Error("Couldn't find a Program"); - } - - getFunctionParent() { - let scope = this; - - do { - if (scope.path.isFunctionParent()) { - return scope; - } - } while (scope = scope.parent); - - return null; - } - - getBlockParent() { - let scope = this; - - do { - if (scope.path.isBlockParent()) { - return scope; - } - } while (scope = scope.parent); - - throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); - } - - getAllBindings() { - const ids = Object.create(null); - let scope = this; - - do { - (0, _defaults().default)(ids, scope.bindings); - scope = scope.parent; - } while (scope); - - return ids; - } - - getAllBindingsOfKind() { - const ids = Object.create(null); - - for (const kind of arguments) { - let scope = this; - - do { - for (const name of Object.keys(scope.bindings)) { - const binding = scope.bindings[name]; - if (binding.kind === kind) ids[name] = binding; - } - - scope = scope.parent; - } while (scope); - } - - return ids; - } - - bindingIdentifierEquals(name, node) { - return this.getBindingIdentifier(name) === node; - } - - getBinding(name) { - let scope = this; - - do { - const binding = scope.getOwnBinding(name); - if (binding) return binding; - } while (scope = scope.parent); - } - - getOwnBinding(name) { - return this.bindings[name]; - } - - getBindingIdentifier(name) { - const info = this.getBinding(name); - return info && info.identifier; - } - - getOwnBindingIdentifier(name) { - const binding = this.bindings[name]; - return binding && binding.identifier; - } - - hasOwnBinding(name) { - return !!this.getOwnBinding(name); - } - - hasBinding(name, noGlobals) { - if (!name) return false; - if (this.hasOwnBinding(name)) return true; - if (this.parentHasBinding(name, noGlobals)) return true; - if (this.hasUid(name)) return true; - if (!noGlobals && (0, _includes().default)(Scope.globals, name)) return true; - if (!noGlobals && (0, _includes().default)(Scope.contextVariables, name)) return true; - return false; - } - - parentHasBinding(name, noGlobals) { - return this.parent && this.parent.hasBinding(name, noGlobals); - } - - moveBindingTo(name, scope) { - const info = this.getBinding(name); - - if (info) { - info.scope.removeOwnBinding(name); - info.scope = scope; - scope.bindings[name] = info; - } - } - - removeOwnBinding(name) { - delete this.bindings[name]; - } - - removeBinding(name) { - const info = this.getBinding(name); - - if (info) { - info.scope.removeOwnBinding(name); - } - - let scope = this; - - do { - if (scope.uids[name]) { - scope.uids[name] = false; - } - } while (scope = scope.parent); - } - -} - -exports.default = Scope; -Scope.globals = Object.keys(_globals().default.builtin); -Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/lib/renamer.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/lib/renamer.js deleted file mode 100644 index b7a10ec69c80f0..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/lib/renamer.js +++ /dev/null @@ -1,138 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _binding = _interopRequireDefault(require("../binding")); - -function _helperSplitExportDeclaration() { - const data = _interopRequireDefault(require("@babel/helper-split-export-declaration")); - - _helperSplitExportDeclaration = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const renameVisitor = { - ReferencedIdentifier({ - node - }, state) { - if (node.name === state.oldName) { - node.name = state.newName; - } - }, - - Scope(path, state) { - if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { - path.skip(); - } - }, - - "AssignmentExpression|Declaration"(path, state) { - const ids = path.getOuterBindingIdentifiers(); - - for (const name in ids) { - if (name === state.oldName) ids[name].name = state.newName; - } - } - -}; - -class Renamer { - constructor(binding, oldName, newName) { - this.newName = newName; - this.oldName = oldName; - this.binding = binding; - } - - maybeConvertFromExportDeclaration(parentDeclar) { - const maybeExportDeclar = parentDeclar.parentPath; - - if (!maybeExportDeclar.isExportDeclaration()) { - return; - } - - if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) { - return; - } - - (0, _helperSplitExportDeclaration().default)(maybeExportDeclar); - } - - maybeConvertFromClassFunctionDeclaration(path) { - return; - if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return; - if (this.binding.kind !== "hoisted") return; - path.node.id = t().identifier(this.oldName); - path.node._blockHoist = 3; - path.replaceWith(t().variableDeclaration("let", [t().variableDeclarator(t().identifier(this.newName), t().toExpression(path.node))])); - } - - maybeConvertFromClassFunctionExpression(path) { - return; - if (!path.isFunctionExpression() && !path.isClassExpression()) return; - if (this.binding.kind !== "local") return; - path.node.id = t().identifier(this.oldName); - this.binding.scope.parent.push({ - id: t().identifier(this.newName) - }); - path.replaceWith(t().assignmentExpression("=", t().identifier(this.newName), path.node)); - } - - rename(block) { - const { - binding, - oldName, - newName - } = this; - const { - scope, - path - } = binding; - const parentDeclar = path.find(path => path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression()); - - if (parentDeclar) { - const bindingIds = parentDeclar.getOuterBindingIdentifiers(); - - if (bindingIds[oldName] === binding.identifier) { - this.maybeConvertFromExportDeclaration(parentDeclar); - } - } - - scope.traverse(block || scope.block, renameVisitor, this); - - if (!block) { - scope.removeOwnBinding(oldName); - scope.bindings[newName] = binding; - this.binding.identifier.name = newName; - } - - if (binding.type === "hoisted") {} - - if (parentDeclar) { - this.maybeConvertFromClassFunctionDeclaration(parentDeclar); - this.maybeConvertFromClassFunctionExpression(parentDeclar); - } - } - -} - -exports.default = Renamer; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/package.json deleted file mode 100644 index f53af95bf56a7c..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.5.5", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.5.5", - "@babel/types": "^7.5.5", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - }, - "deprecated": false, - "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", - "devDependencies": { - "@babel/helper-plugin-test-runner": "^7.0.0" - }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/traverse", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-traverse" - }, - "version": "7.5.5" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/types/README.md deleted file mode 100644 index 8d33374d3ba416..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/types - -> Babel Types is a Lodash-esque utility library for AST nodes - -See our website [@babel/types](https://babeljs.io/docs/en/next/babel-types.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/types -``` - -or using yarn: - -```sh -yarn add @babel/types --dev -``` diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/generated/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/generated/index.js deleted file mode 100644 index a9f59b08ad8997..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/generated/index.js +++ /dev/null @@ -1,1364 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.assertArrayExpression = assertArrayExpression; -exports.assertAssignmentExpression = assertAssignmentExpression; -exports.assertBinaryExpression = assertBinaryExpression; -exports.assertInterpreterDirective = assertInterpreterDirective; -exports.assertDirective = assertDirective; -exports.assertDirectiveLiteral = assertDirectiveLiteral; -exports.assertBlockStatement = assertBlockStatement; -exports.assertBreakStatement = assertBreakStatement; -exports.assertCallExpression = assertCallExpression; -exports.assertCatchClause = assertCatchClause; -exports.assertConditionalExpression = assertConditionalExpression; -exports.assertContinueStatement = assertContinueStatement; -exports.assertDebuggerStatement = assertDebuggerStatement; -exports.assertDoWhileStatement = assertDoWhileStatement; -exports.assertEmptyStatement = assertEmptyStatement; -exports.assertExpressionStatement = assertExpressionStatement; -exports.assertFile = assertFile; -exports.assertForInStatement = assertForInStatement; -exports.assertForStatement = assertForStatement; -exports.assertFunctionDeclaration = assertFunctionDeclaration; -exports.assertFunctionExpression = assertFunctionExpression; -exports.assertIdentifier = assertIdentifier; -exports.assertIfStatement = assertIfStatement; -exports.assertLabeledStatement = assertLabeledStatement; -exports.assertStringLiteral = assertStringLiteral; -exports.assertNumericLiteral = assertNumericLiteral; -exports.assertNullLiteral = assertNullLiteral; -exports.assertBooleanLiteral = assertBooleanLiteral; -exports.assertRegExpLiteral = assertRegExpLiteral; -exports.assertLogicalExpression = assertLogicalExpression; -exports.assertMemberExpression = assertMemberExpression; -exports.assertNewExpression = assertNewExpression; -exports.assertProgram = assertProgram; -exports.assertObjectExpression = assertObjectExpression; -exports.assertObjectMethod = assertObjectMethod; -exports.assertObjectProperty = assertObjectProperty; -exports.assertRestElement = assertRestElement; -exports.assertReturnStatement = assertReturnStatement; -exports.assertSequenceExpression = assertSequenceExpression; -exports.assertParenthesizedExpression = assertParenthesizedExpression; -exports.assertSwitchCase = assertSwitchCase; -exports.assertSwitchStatement = assertSwitchStatement; -exports.assertThisExpression = assertThisExpression; -exports.assertThrowStatement = assertThrowStatement; -exports.assertTryStatement = assertTryStatement; -exports.assertUnaryExpression = assertUnaryExpression; -exports.assertUpdateExpression = assertUpdateExpression; -exports.assertVariableDeclaration = assertVariableDeclaration; -exports.assertVariableDeclarator = assertVariableDeclarator; -exports.assertWhileStatement = assertWhileStatement; -exports.assertWithStatement = assertWithStatement; -exports.assertAssignmentPattern = assertAssignmentPattern; -exports.assertArrayPattern = assertArrayPattern; -exports.assertArrowFunctionExpression = assertArrowFunctionExpression; -exports.assertClassBody = assertClassBody; -exports.assertClassDeclaration = assertClassDeclaration; -exports.assertClassExpression = assertClassExpression; -exports.assertExportAllDeclaration = assertExportAllDeclaration; -exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration; -exports.assertExportNamedDeclaration = assertExportNamedDeclaration; -exports.assertExportSpecifier = assertExportSpecifier; -exports.assertForOfStatement = assertForOfStatement; -exports.assertImportDeclaration = assertImportDeclaration; -exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier; -exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; -exports.assertImportSpecifier = assertImportSpecifier; -exports.assertMetaProperty = assertMetaProperty; -exports.assertClassMethod = assertClassMethod; -exports.assertObjectPattern = assertObjectPattern; -exports.assertSpreadElement = assertSpreadElement; -exports.assertSuper = assertSuper; -exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression; -exports.assertTemplateElement = assertTemplateElement; -exports.assertTemplateLiteral = assertTemplateLiteral; -exports.assertYieldExpression = assertYieldExpression; -exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation; -exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation; -exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; -exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; -exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; -exports.assertClassImplements = assertClassImplements; -exports.assertDeclareClass = assertDeclareClass; -exports.assertDeclareFunction = assertDeclareFunction; -exports.assertDeclareInterface = assertDeclareInterface; -exports.assertDeclareModule = assertDeclareModule; -exports.assertDeclareModuleExports = assertDeclareModuleExports; -exports.assertDeclareTypeAlias = assertDeclareTypeAlias; -exports.assertDeclareOpaqueType = assertDeclareOpaqueType; -exports.assertDeclareVariable = assertDeclareVariable; -exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration; -exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; -exports.assertDeclaredPredicate = assertDeclaredPredicate; -exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation; -exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; -exports.assertFunctionTypeParam = assertFunctionTypeParam; -exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation; -exports.assertInferredPredicate = assertInferredPredicate; -exports.assertInterfaceExtends = assertInterfaceExtends; -exports.assertInterfaceDeclaration = assertInterfaceDeclaration; -exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation; -exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; -exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation; -exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; -exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation; -exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; -exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation; -exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation; -exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot; -exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty; -exports.assertObjectTypeIndexer = assertObjectTypeIndexer; -exports.assertObjectTypeProperty = assertObjectTypeProperty; -exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; -exports.assertOpaqueType = assertOpaqueType; -exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; -exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; -exports.assertStringTypeAnnotation = assertStringTypeAnnotation; -exports.assertThisTypeAnnotation = assertThisTypeAnnotation; -exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation; -exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; -exports.assertTypeAlias = assertTypeAlias; -exports.assertTypeAnnotation = assertTypeAnnotation; -exports.assertTypeCastExpression = assertTypeCastExpression; -exports.assertTypeParameter = assertTypeParameter; -exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration; -exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation; -exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation; -exports.assertVariance = assertVariance; -exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation; -exports.assertJSXAttribute = assertJSXAttribute; -exports.assertJSXClosingElement = assertJSXClosingElement; -exports.assertJSXElement = assertJSXElement; -exports.assertJSXEmptyExpression = assertJSXEmptyExpression; -exports.assertJSXExpressionContainer = assertJSXExpressionContainer; -exports.assertJSXSpreadChild = assertJSXSpreadChild; -exports.assertJSXIdentifier = assertJSXIdentifier; -exports.assertJSXMemberExpression = assertJSXMemberExpression; -exports.assertJSXNamespacedName = assertJSXNamespacedName; -exports.assertJSXOpeningElement = assertJSXOpeningElement; -exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute; -exports.assertJSXText = assertJSXText; -exports.assertJSXFragment = assertJSXFragment; -exports.assertJSXOpeningFragment = assertJSXOpeningFragment; -exports.assertJSXClosingFragment = assertJSXClosingFragment; -exports.assertNoop = assertNoop; -exports.assertPlaceholder = assertPlaceholder; -exports.assertArgumentPlaceholder = assertArgumentPlaceholder; -exports.assertAwaitExpression = assertAwaitExpression; -exports.assertBindExpression = assertBindExpression; -exports.assertClassProperty = assertClassProperty; -exports.assertOptionalMemberExpression = assertOptionalMemberExpression; -exports.assertPipelineTopicExpression = assertPipelineTopicExpression; -exports.assertPipelineBareFunction = assertPipelineBareFunction; -exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference; -exports.assertOptionalCallExpression = assertOptionalCallExpression; -exports.assertClassPrivateProperty = assertClassPrivateProperty; -exports.assertClassPrivateMethod = assertClassPrivateMethod; -exports.assertImport = assertImport; -exports.assertDecorator = assertDecorator; -exports.assertDoExpression = assertDoExpression; -exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier; -exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; -exports.assertPrivateName = assertPrivateName; -exports.assertBigIntLiteral = assertBigIntLiteral; -exports.assertTSParameterProperty = assertTSParameterProperty; -exports.assertTSDeclareFunction = assertTSDeclareFunction; -exports.assertTSDeclareMethod = assertTSDeclareMethod; -exports.assertTSQualifiedName = assertTSQualifiedName; -exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; -exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; -exports.assertTSPropertySignature = assertTSPropertySignature; -exports.assertTSMethodSignature = assertTSMethodSignature; -exports.assertTSIndexSignature = assertTSIndexSignature; -exports.assertTSAnyKeyword = assertTSAnyKeyword; -exports.assertTSUnknownKeyword = assertTSUnknownKeyword; -exports.assertTSNumberKeyword = assertTSNumberKeyword; -exports.assertTSObjectKeyword = assertTSObjectKeyword; -exports.assertTSBooleanKeyword = assertTSBooleanKeyword; -exports.assertTSStringKeyword = assertTSStringKeyword; -exports.assertTSSymbolKeyword = assertTSSymbolKeyword; -exports.assertTSVoidKeyword = assertTSVoidKeyword; -exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword; -exports.assertTSNullKeyword = assertTSNullKeyword; -exports.assertTSNeverKeyword = assertTSNeverKeyword; -exports.assertTSThisType = assertTSThisType; -exports.assertTSFunctionType = assertTSFunctionType; -exports.assertTSConstructorType = assertTSConstructorType; -exports.assertTSTypeReference = assertTSTypeReference; -exports.assertTSTypePredicate = assertTSTypePredicate; -exports.assertTSTypeQuery = assertTSTypeQuery; -exports.assertTSTypeLiteral = assertTSTypeLiteral; -exports.assertTSArrayType = assertTSArrayType; -exports.assertTSTupleType = assertTSTupleType; -exports.assertTSOptionalType = assertTSOptionalType; -exports.assertTSRestType = assertTSRestType; -exports.assertTSUnionType = assertTSUnionType; -exports.assertTSIntersectionType = assertTSIntersectionType; -exports.assertTSConditionalType = assertTSConditionalType; -exports.assertTSInferType = assertTSInferType; -exports.assertTSParenthesizedType = assertTSParenthesizedType; -exports.assertTSTypeOperator = assertTSTypeOperator; -exports.assertTSIndexedAccessType = assertTSIndexedAccessType; -exports.assertTSMappedType = assertTSMappedType; -exports.assertTSLiteralType = assertTSLiteralType; -exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; -exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; -exports.assertTSInterfaceBody = assertTSInterfaceBody; -exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; -exports.assertTSAsExpression = assertTSAsExpression; -exports.assertTSTypeAssertion = assertTSTypeAssertion; -exports.assertTSEnumDeclaration = assertTSEnumDeclaration; -exports.assertTSEnumMember = assertTSEnumMember; -exports.assertTSModuleDeclaration = assertTSModuleDeclaration; -exports.assertTSModuleBlock = assertTSModuleBlock; -exports.assertTSImportType = assertTSImportType; -exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; -exports.assertTSExternalModuleReference = assertTSExternalModuleReference; -exports.assertTSNonNullExpression = assertTSNonNullExpression; -exports.assertTSExportAssignment = assertTSExportAssignment; -exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; -exports.assertTSTypeAnnotation = assertTSTypeAnnotation; -exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; -exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; -exports.assertTSTypeParameter = assertTSTypeParameter; -exports.assertExpression = assertExpression; -exports.assertBinary = assertBinary; -exports.assertScopable = assertScopable; -exports.assertBlockParent = assertBlockParent; -exports.assertBlock = assertBlock; -exports.assertStatement = assertStatement; -exports.assertTerminatorless = assertTerminatorless; -exports.assertCompletionStatement = assertCompletionStatement; -exports.assertConditional = assertConditional; -exports.assertLoop = assertLoop; -exports.assertWhile = assertWhile; -exports.assertExpressionWrapper = assertExpressionWrapper; -exports.assertFor = assertFor; -exports.assertForXStatement = assertForXStatement; -exports.assertFunction = assertFunction; -exports.assertFunctionParent = assertFunctionParent; -exports.assertPureish = assertPureish; -exports.assertDeclaration = assertDeclaration; -exports.assertPatternLike = assertPatternLike; -exports.assertLVal = assertLVal; -exports.assertTSEntityName = assertTSEntityName; -exports.assertLiteral = assertLiteral; -exports.assertImmutable = assertImmutable; -exports.assertUserWhitespacable = assertUserWhitespacable; -exports.assertMethod = assertMethod; -exports.assertObjectMember = assertObjectMember; -exports.assertProperty = assertProperty; -exports.assertUnaryLike = assertUnaryLike; -exports.assertPattern = assertPattern; -exports.assertClass = assertClass; -exports.assertModuleDeclaration = assertModuleDeclaration; -exports.assertExportDeclaration = assertExportDeclaration; -exports.assertModuleSpecifier = assertModuleSpecifier; -exports.assertFlow = assertFlow; -exports.assertFlowType = assertFlowType; -exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation; -exports.assertFlowDeclaration = assertFlowDeclaration; -exports.assertFlowPredicate = assertFlowPredicate; -exports.assertJSX = assertJSX; -exports.assertPrivate = assertPrivate; -exports.assertTSTypeElement = assertTSTypeElement; -exports.assertTSType = assertTSType; -exports.assertNumberLiteral = assertNumberLiteral; -exports.assertRegexLiteral = assertRegexLiteral; -exports.assertRestProperty = assertRestProperty; -exports.assertSpreadProperty = assertSpreadProperty; - -var _is = _interopRequireDefault(require("../../validators/is")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function assert(type, node, opts) { - if (!(0, _is.default)(type, node, opts)) { - throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`); - } -} - -function assertArrayExpression(node, opts = {}) { - assert("ArrayExpression", node, opts); -} - -function assertAssignmentExpression(node, opts = {}) { - assert("AssignmentExpression", node, opts); -} - -function assertBinaryExpression(node, opts = {}) { - assert("BinaryExpression", node, opts); -} - -function assertInterpreterDirective(node, opts = {}) { - assert("InterpreterDirective", node, opts); -} - -function assertDirective(node, opts = {}) { - assert("Directive", node, opts); -} - -function assertDirectiveLiteral(node, opts = {}) { - assert("DirectiveLiteral", node, opts); -} - -function assertBlockStatement(node, opts = {}) { - assert("BlockStatement", node, opts); -} - -function assertBreakStatement(node, opts = {}) { - assert("BreakStatement", node, opts); -} - -function assertCallExpression(node, opts = {}) { - assert("CallExpression", node, opts); -} - -function assertCatchClause(node, opts = {}) { - assert("CatchClause", node, opts); -} - -function assertConditionalExpression(node, opts = {}) { - assert("ConditionalExpression", node, opts); -} - -function assertContinueStatement(node, opts = {}) { - assert("ContinueStatement", node, opts); -} - -function assertDebuggerStatement(node, opts = {}) { - assert("DebuggerStatement", node, opts); -} - -function assertDoWhileStatement(node, opts = {}) { - assert("DoWhileStatement", node, opts); -} - -function assertEmptyStatement(node, opts = {}) { - assert("EmptyStatement", node, opts); -} - -function assertExpressionStatement(node, opts = {}) { - assert("ExpressionStatement", node, opts); -} - -function assertFile(node, opts = {}) { - assert("File", node, opts); -} - -function assertForInStatement(node, opts = {}) { - assert("ForInStatement", node, opts); -} - -function assertForStatement(node, opts = {}) { - assert("ForStatement", node, opts); -} - -function assertFunctionDeclaration(node, opts = {}) { - assert("FunctionDeclaration", node, opts); -} - -function assertFunctionExpression(node, opts = {}) { - assert("FunctionExpression", node, opts); -} - -function assertIdentifier(node, opts = {}) { - assert("Identifier", node, opts); -} - -function assertIfStatement(node, opts = {}) { - assert("IfStatement", node, opts); -} - -function assertLabeledStatement(node, opts = {}) { - assert("LabeledStatement", node, opts); -} - -function assertStringLiteral(node, opts = {}) { - assert("StringLiteral", node, opts); -} - -function assertNumericLiteral(node, opts = {}) { - assert("NumericLiteral", node, opts); -} - -function assertNullLiteral(node, opts = {}) { - assert("NullLiteral", node, opts); -} - -function assertBooleanLiteral(node, opts = {}) { - assert("BooleanLiteral", node, opts); -} - -function assertRegExpLiteral(node, opts = {}) { - assert("RegExpLiteral", node, opts); -} - -function assertLogicalExpression(node, opts = {}) { - assert("LogicalExpression", node, opts); -} - -function assertMemberExpression(node, opts = {}) { - assert("MemberExpression", node, opts); -} - -function assertNewExpression(node, opts = {}) { - assert("NewExpression", node, opts); -} - -function assertProgram(node, opts = {}) { - assert("Program", node, opts); -} - -function assertObjectExpression(node, opts = {}) { - assert("ObjectExpression", node, opts); -} - -function assertObjectMethod(node, opts = {}) { - assert("ObjectMethod", node, opts); -} - -function assertObjectProperty(node, opts = {}) { - assert("ObjectProperty", node, opts); -} - -function assertRestElement(node, opts = {}) { - assert("RestElement", node, opts); -} - -function assertReturnStatement(node, opts = {}) { - assert("ReturnStatement", node, opts); -} - -function assertSequenceExpression(node, opts = {}) { - assert("SequenceExpression", node, opts); -} - -function assertParenthesizedExpression(node, opts = {}) { - assert("ParenthesizedExpression", node, opts); -} - -function assertSwitchCase(node, opts = {}) { - assert("SwitchCase", node, opts); -} - -function assertSwitchStatement(node, opts = {}) { - assert("SwitchStatement", node, opts); -} - -function assertThisExpression(node, opts = {}) { - assert("ThisExpression", node, opts); -} - -function assertThrowStatement(node, opts = {}) { - assert("ThrowStatement", node, opts); -} - -function assertTryStatement(node, opts = {}) { - assert("TryStatement", node, opts); -} - -function assertUnaryExpression(node, opts = {}) { - assert("UnaryExpression", node, opts); -} - -function assertUpdateExpression(node, opts = {}) { - assert("UpdateExpression", node, opts); -} - -function assertVariableDeclaration(node, opts = {}) { - assert("VariableDeclaration", node, opts); -} - -function assertVariableDeclarator(node, opts = {}) { - assert("VariableDeclarator", node, opts); -} - -function assertWhileStatement(node, opts = {}) { - assert("WhileStatement", node, opts); -} - -function assertWithStatement(node, opts = {}) { - assert("WithStatement", node, opts); -} - -function assertAssignmentPattern(node, opts = {}) { - assert("AssignmentPattern", node, opts); -} - -function assertArrayPattern(node, opts = {}) { - assert("ArrayPattern", node, opts); -} - -function assertArrowFunctionExpression(node, opts = {}) { - assert("ArrowFunctionExpression", node, opts); -} - -function assertClassBody(node, opts = {}) { - assert("ClassBody", node, opts); -} - -function assertClassDeclaration(node, opts = {}) { - assert("ClassDeclaration", node, opts); -} - -function assertClassExpression(node, opts = {}) { - assert("ClassExpression", node, opts); -} - -function assertExportAllDeclaration(node, opts = {}) { - assert("ExportAllDeclaration", node, opts); -} - -function assertExportDefaultDeclaration(node, opts = {}) { - assert("ExportDefaultDeclaration", node, opts); -} - -function assertExportNamedDeclaration(node, opts = {}) { - assert("ExportNamedDeclaration", node, opts); -} - -function assertExportSpecifier(node, opts = {}) { - assert("ExportSpecifier", node, opts); -} - -function assertForOfStatement(node, opts = {}) { - assert("ForOfStatement", node, opts); -} - -function assertImportDeclaration(node, opts = {}) { - assert("ImportDeclaration", node, opts); -} - -function assertImportDefaultSpecifier(node, opts = {}) { - assert("ImportDefaultSpecifier", node, opts); -} - -function assertImportNamespaceSpecifier(node, opts = {}) { - assert("ImportNamespaceSpecifier", node, opts); -} - -function assertImportSpecifier(node, opts = {}) { - assert("ImportSpecifier", node, opts); -} - -function assertMetaProperty(node, opts = {}) { - assert("MetaProperty", node, opts); -} - -function assertClassMethod(node, opts = {}) { - assert("ClassMethod", node, opts); -} - -function assertObjectPattern(node, opts = {}) { - assert("ObjectPattern", node, opts); -} - -function assertSpreadElement(node, opts = {}) { - assert("SpreadElement", node, opts); -} - -function assertSuper(node, opts = {}) { - assert("Super", node, opts); -} - -function assertTaggedTemplateExpression(node, opts = {}) { - assert("TaggedTemplateExpression", node, opts); -} - -function assertTemplateElement(node, opts = {}) { - assert("TemplateElement", node, opts); -} - -function assertTemplateLiteral(node, opts = {}) { - assert("TemplateLiteral", node, opts); -} - -function assertYieldExpression(node, opts = {}) { - assert("YieldExpression", node, opts); -} - -function assertAnyTypeAnnotation(node, opts = {}) { - assert("AnyTypeAnnotation", node, opts); -} - -function assertArrayTypeAnnotation(node, opts = {}) { - assert("ArrayTypeAnnotation", node, opts); -} - -function assertBooleanTypeAnnotation(node, opts = {}) { - assert("BooleanTypeAnnotation", node, opts); -} - -function assertBooleanLiteralTypeAnnotation(node, opts = {}) { - assert("BooleanLiteralTypeAnnotation", node, opts); -} - -function assertNullLiteralTypeAnnotation(node, opts = {}) { - assert("NullLiteralTypeAnnotation", node, opts); -} - -function assertClassImplements(node, opts = {}) { - assert("ClassImplements", node, opts); -} - -function assertDeclareClass(node, opts = {}) { - assert("DeclareClass", node, opts); -} - -function assertDeclareFunction(node, opts = {}) { - assert("DeclareFunction", node, opts); -} - -function assertDeclareInterface(node, opts = {}) { - assert("DeclareInterface", node, opts); -} - -function assertDeclareModule(node, opts = {}) { - assert("DeclareModule", node, opts); -} - -function assertDeclareModuleExports(node, opts = {}) { - assert("DeclareModuleExports", node, opts); -} - -function assertDeclareTypeAlias(node, opts = {}) { - assert("DeclareTypeAlias", node, opts); -} - -function assertDeclareOpaqueType(node, opts = {}) { - assert("DeclareOpaqueType", node, opts); -} - -function assertDeclareVariable(node, opts = {}) { - assert("DeclareVariable", node, opts); -} - -function assertDeclareExportDeclaration(node, opts = {}) { - assert("DeclareExportDeclaration", node, opts); -} - -function assertDeclareExportAllDeclaration(node, opts = {}) { - assert("DeclareExportAllDeclaration", node, opts); -} - -function assertDeclaredPredicate(node, opts = {}) { - assert("DeclaredPredicate", node, opts); -} - -function assertExistsTypeAnnotation(node, opts = {}) { - assert("ExistsTypeAnnotation", node, opts); -} - -function assertFunctionTypeAnnotation(node, opts = {}) { - assert("FunctionTypeAnnotation", node, opts); -} - -function assertFunctionTypeParam(node, opts = {}) { - assert("FunctionTypeParam", node, opts); -} - -function assertGenericTypeAnnotation(node, opts = {}) { - assert("GenericTypeAnnotation", node, opts); -} - -function assertInferredPredicate(node, opts = {}) { - assert("InferredPredicate", node, opts); -} - -function assertInterfaceExtends(node, opts = {}) { - assert("InterfaceExtends", node, opts); -} - -function assertInterfaceDeclaration(node, opts = {}) { - assert("InterfaceDeclaration", node, opts); -} - -function assertInterfaceTypeAnnotation(node, opts = {}) { - assert("InterfaceTypeAnnotation", node, opts); -} - -function assertIntersectionTypeAnnotation(node, opts = {}) { - assert("IntersectionTypeAnnotation", node, opts); -} - -function assertMixedTypeAnnotation(node, opts = {}) { - assert("MixedTypeAnnotation", node, opts); -} - -function assertEmptyTypeAnnotation(node, opts = {}) { - assert("EmptyTypeAnnotation", node, opts); -} - -function assertNullableTypeAnnotation(node, opts = {}) { - assert("NullableTypeAnnotation", node, opts); -} - -function assertNumberLiteralTypeAnnotation(node, opts = {}) { - assert("NumberLiteralTypeAnnotation", node, opts); -} - -function assertNumberTypeAnnotation(node, opts = {}) { - assert("NumberTypeAnnotation", node, opts); -} - -function assertObjectTypeAnnotation(node, opts = {}) { - assert("ObjectTypeAnnotation", node, opts); -} - -function assertObjectTypeInternalSlot(node, opts = {}) { - assert("ObjectTypeInternalSlot", node, opts); -} - -function assertObjectTypeCallProperty(node, opts = {}) { - assert("ObjectTypeCallProperty", node, opts); -} - -function assertObjectTypeIndexer(node, opts = {}) { - assert("ObjectTypeIndexer", node, opts); -} - -function assertObjectTypeProperty(node, opts = {}) { - assert("ObjectTypeProperty", node, opts); -} - -function assertObjectTypeSpreadProperty(node, opts = {}) { - assert("ObjectTypeSpreadProperty", node, opts); -} - -function assertOpaqueType(node, opts = {}) { - assert("OpaqueType", node, opts); -} - -function assertQualifiedTypeIdentifier(node, opts = {}) { - assert("QualifiedTypeIdentifier", node, opts); -} - -function assertStringLiteralTypeAnnotation(node, opts = {}) { - assert("StringLiteralTypeAnnotation", node, opts); -} - -function assertStringTypeAnnotation(node, opts = {}) { - assert("StringTypeAnnotation", node, opts); -} - -function assertThisTypeAnnotation(node, opts = {}) { - assert("ThisTypeAnnotation", node, opts); -} - -function assertTupleTypeAnnotation(node, opts = {}) { - assert("TupleTypeAnnotation", node, opts); -} - -function assertTypeofTypeAnnotation(node, opts = {}) { - assert("TypeofTypeAnnotation", node, opts); -} - -function assertTypeAlias(node, opts = {}) { - assert("TypeAlias", node, opts); -} - -function assertTypeAnnotation(node, opts = {}) { - assert("TypeAnnotation", node, opts); -} - -function assertTypeCastExpression(node, opts = {}) { - assert("TypeCastExpression", node, opts); -} - -function assertTypeParameter(node, opts = {}) { - assert("TypeParameter", node, opts); -} - -function assertTypeParameterDeclaration(node, opts = {}) { - assert("TypeParameterDeclaration", node, opts); -} - -function assertTypeParameterInstantiation(node, opts = {}) { - assert("TypeParameterInstantiation", node, opts); -} - -function assertUnionTypeAnnotation(node, opts = {}) { - assert("UnionTypeAnnotation", node, opts); -} - -function assertVariance(node, opts = {}) { - assert("Variance", node, opts); -} - -function assertVoidTypeAnnotation(node, opts = {}) { - assert("VoidTypeAnnotation", node, opts); -} - -function assertJSXAttribute(node, opts = {}) { - assert("JSXAttribute", node, opts); -} - -function assertJSXClosingElement(node, opts = {}) { - assert("JSXClosingElement", node, opts); -} - -function assertJSXElement(node, opts = {}) { - assert("JSXElement", node, opts); -} - -function assertJSXEmptyExpression(node, opts = {}) { - assert("JSXEmptyExpression", node, opts); -} - -function assertJSXExpressionContainer(node, opts = {}) { - assert("JSXExpressionContainer", node, opts); -} - -function assertJSXSpreadChild(node, opts = {}) { - assert("JSXSpreadChild", node, opts); -} - -function assertJSXIdentifier(node, opts = {}) { - assert("JSXIdentifier", node, opts); -} - -function assertJSXMemberExpression(node, opts = {}) { - assert("JSXMemberExpression", node, opts); -} - -function assertJSXNamespacedName(node, opts = {}) { - assert("JSXNamespacedName", node, opts); -} - -function assertJSXOpeningElement(node, opts = {}) { - assert("JSXOpeningElement", node, opts); -} - -function assertJSXSpreadAttribute(node, opts = {}) { - assert("JSXSpreadAttribute", node, opts); -} - -function assertJSXText(node, opts = {}) { - assert("JSXText", node, opts); -} - -function assertJSXFragment(node, opts = {}) { - assert("JSXFragment", node, opts); -} - -function assertJSXOpeningFragment(node, opts = {}) { - assert("JSXOpeningFragment", node, opts); -} - -function assertJSXClosingFragment(node, opts = {}) { - assert("JSXClosingFragment", node, opts); -} - -function assertNoop(node, opts = {}) { - assert("Noop", node, opts); -} - -function assertPlaceholder(node, opts = {}) { - assert("Placeholder", node, opts); -} - -function assertArgumentPlaceholder(node, opts = {}) { - assert("ArgumentPlaceholder", node, opts); -} - -function assertAwaitExpression(node, opts = {}) { - assert("AwaitExpression", node, opts); -} - -function assertBindExpression(node, opts = {}) { - assert("BindExpression", node, opts); -} - -function assertClassProperty(node, opts = {}) { - assert("ClassProperty", node, opts); -} - -function assertOptionalMemberExpression(node, opts = {}) { - assert("OptionalMemberExpression", node, opts); -} - -function assertPipelineTopicExpression(node, opts = {}) { - assert("PipelineTopicExpression", node, opts); -} - -function assertPipelineBareFunction(node, opts = {}) { - assert("PipelineBareFunction", node, opts); -} - -function assertPipelinePrimaryTopicReference(node, opts = {}) { - assert("PipelinePrimaryTopicReference", node, opts); -} - -function assertOptionalCallExpression(node, opts = {}) { - assert("OptionalCallExpression", node, opts); -} - -function assertClassPrivateProperty(node, opts = {}) { - assert("ClassPrivateProperty", node, opts); -} - -function assertClassPrivateMethod(node, opts = {}) { - assert("ClassPrivateMethod", node, opts); -} - -function assertImport(node, opts = {}) { - assert("Import", node, opts); -} - -function assertDecorator(node, opts = {}) { - assert("Decorator", node, opts); -} - -function assertDoExpression(node, opts = {}) { - assert("DoExpression", node, opts); -} - -function assertExportDefaultSpecifier(node, opts = {}) { - assert("ExportDefaultSpecifier", node, opts); -} - -function assertExportNamespaceSpecifier(node, opts = {}) { - assert("ExportNamespaceSpecifier", node, opts); -} - -function assertPrivateName(node, opts = {}) { - assert("PrivateName", node, opts); -} - -function assertBigIntLiteral(node, opts = {}) { - assert("BigIntLiteral", node, opts); -} - -function assertTSParameterProperty(node, opts = {}) { - assert("TSParameterProperty", node, opts); -} - -function assertTSDeclareFunction(node, opts = {}) { - assert("TSDeclareFunction", node, opts); -} - -function assertTSDeclareMethod(node, opts = {}) { - assert("TSDeclareMethod", node, opts); -} - -function assertTSQualifiedName(node, opts = {}) { - assert("TSQualifiedName", node, opts); -} - -function assertTSCallSignatureDeclaration(node, opts = {}) { - assert("TSCallSignatureDeclaration", node, opts); -} - -function assertTSConstructSignatureDeclaration(node, opts = {}) { - assert("TSConstructSignatureDeclaration", node, opts); -} - -function assertTSPropertySignature(node, opts = {}) { - assert("TSPropertySignature", node, opts); -} - -function assertTSMethodSignature(node, opts = {}) { - assert("TSMethodSignature", node, opts); -} - -function assertTSIndexSignature(node, opts = {}) { - assert("TSIndexSignature", node, opts); -} - -function assertTSAnyKeyword(node, opts = {}) { - assert("TSAnyKeyword", node, opts); -} - -function assertTSUnknownKeyword(node, opts = {}) { - assert("TSUnknownKeyword", node, opts); -} - -function assertTSNumberKeyword(node, opts = {}) { - assert("TSNumberKeyword", node, opts); -} - -function assertTSObjectKeyword(node, opts = {}) { - assert("TSObjectKeyword", node, opts); -} - -function assertTSBooleanKeyword(node, opts = {}) { - assert("TSBooleanKeyword", node, opts); -} - -function assertTSStringKeyword(node, opts = {}) { - assert("TSStringKeyword", node, opts); -} - -function assertTSSymbolKeyword(node, opts = {}) { - assert("TSSymbolKeyword", node, opts); -} - -function assertTSVoidKeyword(node, opts = {}) { - assert("TSVoidKeyword", node, opts); -} - -function assertTSUndefinedKeyword(node, opts = {}) { - assert("TSUndefinedKeyword", node, opts); -} - -function assertTSNullKeyword(node, opts = {}) { - assert("TSNullKeyword", node, opts); -} - -function assertTSNeverKeyword(node, opts = {}) { - assert("TSNeverKeyword", node, opts); -} - -function assertTSThisType(node, opts = {}) { - assert("TSThisType", node, opts); -} - -function assertTSFunctionType(node, opts = {}) { - assert("TSFunctionType", node, opts); -} - -function assertTSConstructorType(node, opts = {}) { - assert("TSConstructorType", node, opts); -} - -function assertTSTypeReference(node, opts = {}) { - assert("TSTypeReference", node, opts); -} - -function assertTSTypePredicate(node, opts = {}) { - assert("TSTypePredicate", node, opts); -} - -function assertTSTypeQuery(node, opts = {}) { - assert("TSTypeQuery", node, opts); -} - -function assertTSTypeLiteral(node, opts = {}) { - assert("TSTypeLiteral", node, opts); -} - -function assertTSArrayType(node, opts = {}) { - assert("TSArrayType", node, opts); -} - -function assertTSTupleType(node, opts = {}) { - assert("TSTupleType", node, opts); -} - -function assertTSOptionalType(node, opts = {}) { - assert("TSOptionalType", node, opts); -} - -function assertTSRestType(node, opts = {}) { - assert("TSRestType", node, opts); -} - -function assertTSUnionType(node, opts = {}) { - assert("TSUnionType", node, opts); -} - -function assertTSIntersectionType(node, opts = {}) { - assert("TSIntersectionType", node, opts); -} - -function assertTSConditionalType(node, opts = {}) { - assert("TSConditionalType", node, opts); -} - -function assertTSInferType(node, opts = {}) { - assert("TSInferType", node, opts); -} - -function assertTSParenthesizedType(node, opts = {}) { - assert("TSParenthesizedType", node, opts); -} - -function assertTSTypeOperator(node, opts = {}) { - assert("TSTypeOperator", node, opts); -} - -function assertTSIndexedAccessType(node, opts = {}) { - assert("TSIndexedAccessType", node, opts); -} - -function assertTSMappedType(node, opts = {}) { - assert("TSMappedType", node, opts); -} - -function assertTSLiteralType(node, opts = {}) { - assert("TSLiteralType", node, opts); -} - -function assertTSExpressionWithTypeArguments(node, opts = {}) { - assert("TSExpressionWithTypeArguments", node, opts); -} - -function assertTSInterfaceDeclaration(node, opts = {}) { - assert("TSInterfaceDeclaration", node, opts); -} - -function assertTSInterfaceBody(node, opts = {}) { - assert("TSInterfaceBody", node, opts); -} - -function assertTSTypeAliasDeclaration(node, opts = {}) { - assert("TSTypeAliasDeclaration", node, opts); -} - -function assertTSAsExpression(node, opts = {}) { - assert("TSAsExpression", node, opts); -} - -function assertTSTypeAssertion(node, opts = {}) { - assert("TSTypeAssertion", node, opts); -} - -function assertTSEnumDeclaration(node, opts = {}) { - assert("TSEnumDeclaration", node, opts); -} - -function assertTSEnumMember(node, opts = {}) { - assert("TSEnumMember", node, opts); -} - -function assertTSModuleDeclaration(node, opts = {}) { - assert("TSModuleDeclaration", node, opts); -} - -function assertTSModuleBlock(node, opts = {}) { - assert("TSModuleBlock", node, opts); -} - -function assertTSImportType(node, opts = {}) { - assert("TSImportType", node, opts); -} - -function assertTSImportEqualsDeclaration(node, opts = {}) { - assert("TSImportEqualsDeclaration", node, opts); -} - -function assertTSExternalModuleReference(node, opts = {}) { - assert("TSExternalModuleReference", node, opts); -} - -function assertTSNonNullExpression(node, opts = {}) { - assert("TSNonNullExpression", node, opts); -} - -function assertTSExportAssignment(node, opts = {}) { - assert("TSExportAssignment", node, opts); -} - -function assertTSNamespaceExportDeclaration(node, opts = {}) { - assert("TSNamespaceExportDeclaration", node, opts); -} - -function assertTSTypeAnnotation(node, opts = {}) { - assert("TSTypeAnnotation", node, opts); -} - -function assertTSTypeParameterInstantiation(node, opts = {}) { - assert("TSTypeParameterInstantiation", node, opts); -} - -function assertTSTypeParameterDeclaration(node, opts = {}) { - assert("TSTypeParameterDeclaration", node, opts); -} - -function assertTSTypeParameter(node, opts = {}) { - assert("TSTypeParameter", node, opts); -} - -function assertExpression(node, opts = {}) { - assert("Expression", node, opts); -} - -function assertBinary(node, opts = {}) { - assert("Binary", node, opts); -} - -function assertScopable(node, opts = {}) { - assert("Scopable", node, opts); -} - -function assertBlockParent(node, opts = {}) { - assert("BlockParent", node, opts); -} - -function assertBlock(node, opts = {}) { - assert("Block", node, opts); -} - -function assertStatement(node, opts = {}) { - assert("Statement", node, opts); -} - -function assertTerminatorless(node, opts = {}) { - assert("Terminatorless", node, opts); -} - -function assertCompletionStatement(node, opts = {}) { - assert("CompletionStatement", node, opts); -} - -function assertConditional(node, opts = {}) { - assert("Conditional", node, opts); -} - -function assertLoop(node, opts = {}) { - assert("Loop", node, opts); -} - -function assertWhile(node, opts = {}) { - assert("While", node, opts); -} - -function assertExpressionWrapper(node, opts = {}) { - assert("ExpressionWrapper", node, opts); -} - -function assertFor(node, opts = {}) { - assert("For", node, opts); -} - -function assertForXStatement(node, opts = {}) { - assert("ForXStatement", node, opts); -} - -function assertFunction(node, opts = {}) { - assert("Function", node, opts); -} - -function assertFunctionParent(node, opts = {}) { - assert("FunctionParent", node, opts); -} - -function assertPureish(node, opts = {}) { - assert("Pureish", node, opts); -} - -function assertDeclaration(node, opts = {}) { - assert("Declaration", node, opts); -} - -function assertPatternLike(node, opts = {}) { - assert("PatternLike", node, opts); -} - -function assertLVal(node, opts = {}) { - assert("LVal", node, opts); -} - -function assertTSEntityName(node, opts = {}) { - assert("TSEntityName", node, opts); -} - -function assertLiteral(node, opts = {}) { - assert("Literal", node, opts); -} - -function assertImmutable(node, opts = {}) { - assert("Immutable", node, opts); -} - -function assertUserWhitespacable(node, opts = {}) { - assert("UserWhitespacable", node, opts); -} - -function assertMethod(node, opts = {}) { - assert("Method", node, opts); -} - -function assertObjectMember(node, opts = {}) { - assert("ObjectMember", node, opts); -} - -function assertProperty(node, opts = {}) { - assert("Property", node, opts); -} - -function assertUnaryLike(node, opts = {}) { - assert("UnaryLike", node, opts); -} - -function assertPattern(node, opts = {}) { - assert("Pattern", node, opts); -} - -function assertClass(node, opts = {}) { - assert("Class", node, opts); -} - -function assertModuleDeclaration(node, opts = {}) { - assert("ModuleDeclaration", node, opts); -} - -function assertExportDeclaration(node, opts = {}) { - assert("ExportDeclaration", node, opts); -} - -function assertModuleSpecifier(node, opts = {}) { - assert("ModuleSpecifier", node, opts); -} - -function assertFlow(node, opts = {}) { - assert("Flow", node, opts); -} - -function assertFlowType(node, opts = {}) { - assert("FlowType", node, opts); -} - -function assertFlowBaseAnnotation(node, opts = {}) { - assert("FlowBaseAnnotation", node, opts); -} - -function assertFlowDeclaration(node, opts = {}) { - assert("FlowDeclaration", node, opts); -} - -function assertFlowPredicate(node, opts = {}) { - assert("FlowPredicate", node, opts); -} - -function assertJSX(node, opts = {}) { - assert("JSX", node, opts); -} - -function assertPrivate(node, opts = {}) { - assert("Private", node, opts); -} - -function assertTSTypeElement(node, opts = {}) { - assert("TSTypeElement", node, opts); -} - -function assertTSType(node, opts = {}) { - assert("TSType", node, opts); -} - -function assertNumberLiteral(node, opts) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - assert("NumberLiteral", node, opts); -} - -function assertRegexLiteral(node, opts) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - assert("RegexLiteral", node, opts); -} - -function assertRestProperty(node, opts) { - console.trace("The node type RestProperty has been renamed to RestElement"); - assert("RestProperty", node, opts); -} - -function assertSpreadProperty(node, opts) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - assert("SpreadProperty", node, opts); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js deleted file mode 100644 index df76b0107ff09f..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createUnionTypeAnnotation; - -var _generated = require("../generated"); - -var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/flow/removeTypeDuplicates")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function createUnionTypeAnnotation(types) { - const flattened = (0, _removeTypeDuplicates.default)(types); - - if (flattened.length === 1) { - return flattened[0]; - } else { - return (0, _generated.unionTypeAnnotation)(flattened); - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/generated/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/generated/index.js deleted file mode 100644 index 06d0127d12981b..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/generated/index.js +++ /dev/null @@ -1,1148 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.arrayExpression = exports.ArrayExpression = ArrayExpression; -exports.assignmentExpression = exports.AssignmentExpression = AssignmentExpression; -exports.binaryExpression = exports.BinaryExpression = BinaryExpression; -exports.interpreterDirective = exports.InterpreterDirective = InterpreterDirective; -exports.directive = exports.Directive = Directive; -exports.directiveLiteral = exports.DirectiveLiteral = DirectiveLiteral; -exports.blockStatement = exports.BlockStatement = BlockStatement; -exports.breakStatement = exports.BreakStatement = BreakStatement; -exports.callExpression = exports.CallExpression = CallExpression; -exports.catchClause = exports.CatchClause = CatchClause; -exports.conditionalExpression = exports.ConditionalExpression = ConditionalExpression; -exports.continueStatement = exports.ContinueStatement = ContinueStatement; -exports.debuggerStatement = exports.DebuggerStatement = DebuggerStatement; -exports.doWhileStatement = exports.DoWhileStatement = DoWhileStatement; -exports.emptyStatement = exports.EmptyStatement = EmptyStatement; -exports.expressionStatement = exports.ExpressionStatement = ExpressionStatement; -exports.file = exports.File = File; -exports.forInStatement = exports.ForInStatement = ForInStatement; -exports.forStatement = exports.ForStatement = ForStatement; -exports.functionDeclaration = exports.FunctionDeclaration = FunctionDeclaration; -exports.functionExpression = exports.FunctionExpression = FunctionExpression; -exports.identifier = exports.Identifier = Identifier; -exports.ifStatement = exports.IfStatement = IfStatement; -exports.labeledStatement = exports.LabeledStatement = LabeledStatement; -exports.stringLiteral = exports.StringLiteral = StringLiteral; -exports.numericLiteral = exports.NumericLiteral = NumericLiteral; -exports.nullLiteral = exports.NullLiteral = NullLiteral; -exports.booleanLiteral = exports.BooleanLiteral = BooleanLiteral; -exports.regExpLiteral = exports.RegExpLiteral = RegExpLiteral; -exports.logicalExpression = exports.LogicalExpression = LogicalExpression; -exports.memberExpression = exports.MemberExpression = MemberExpression; -exports.newExpression = exports.NewExpression = NewExpression; -exports.program = exports.Program = Program; -exports.objectExpression = exports.ObjectExpression = ObjectExpression; -exports.objectMethod = exports.ObjectMethod = ObjectMethod; -exports.objectProperty = exports.ObjectProperty = ObjectProperty; -exports.restElement = exports.RestElement = RestElement; -exports.returnStatement = exports.ReturnStatement = ReturnStatement; -exports.sequenceExpression = exports.SequenceExpression = SequenceExpression; -exports.parenthesizedExpression = exports.ParenthesizedExpression = ParenthesizedExpression; -exports.switchCase = exports.SwitchCase = SwitchCase; -exports.switchStatement = exports.SwitchStatement = SwitchStatement; -exports.thisExpression = exports.ThisExpression = ThisExpression; -exports.throwStatement = exports.ThrowStatement = ThrowStatement; -exports.tryStatement = exports.TryStatement = TryStatement; -exports.unaryExpression = exports.UnaryExpression = UnaryExpression; -exports.updateExpression = exports.UpdateExpression = UpdateExpression; -exports.variableDeclaration = exports.VariableDeclaration = VariableDeclaration; -exports.variableDeclarator = exports.VariableDeclarator = VariableDeclarator; -exports.whileStatement = exports.WhileStatement = WhileStatement; -exports.withStatement = exports.WithStatement = WithStatement; -exports.assignmentPattern = exports.AssignmentPattern = AssignmentPattern; -exports.arrayPattern = exports.ArrayPattern = ArrayPattern; -exports.arrowFunctionExpression = exports.ArrowFunctionExpression = ArrowFunctionExpression; -exports.classBody = exports.ClassBody = ClassBody; -exports.classDeclaration = exports.ClassDeclaration = ClassDeclaration; -exports.classExpression = exports.ClassExpression = ClassExpression; -exports.exportAllDeclaration = exports.ExportAllDeclaration = ExportAllDeclaration; -exports.exportDefaultDeclaration = exports.ExportDefaultDeclaration = ExportDefaultDeclaration; -exports.exportNamedDeclaration = exports.ExportNamedDeclaration = ExportNamedDeclaration; -exports.exportSpecifier = exports.ExportSpecifier = ExportSpecifier; -exports.forOfStatement = exports.ForOfStatement = ForOfStatement; -exports.importDeclaration = exports.ImportDeclaration = ImportDeclaration; -exports.importDefaultSpecifier = exports.ImportDefaultSpecifier = ImportDefaultSpecifier; -exports.importNamespaceSpecifier = exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; -exports.importSpecifier = exports.ImportSpecifier = ImportSpecifier; -exports.metaProperty = exports.MetaProperty = MetaProperty; -exports.classMethod = exports.ClassMethod = ClassMethod; -exports.objectPattern = exports.ObjectPattern = ObjectPattern; -exports.spreadElement = exports.SpreadElement = SpreadElement; -exports.super = exports.Super = Super; -exports.taggedTemplateExpression = exports.TaggedTemplateExpression = TaggedTemplateExpression; -exports.templateElement = exports.TemplateElement = TemplateElement; -exports.templateLiteral = exports.TemplateLiteral = TemplateLiteral; -exports.yieldExpression = exports.YieldExpression = YieldExpression; -exports.anyTypeAnnotation = exports.AnyTypeAnnotation = AnyTypeAnnotation; -exports.arrayTypeAnnotation = exports.ArrayTypeAnnotation = ArrayTypeAnnotation; -exports.booleanTypeAnnotation = exports.BooleanTypeAnnotation = BooleanTypeAnnotation; -exports.booleanLiteralTypeAnnotation = exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; -exports.nullLiteralTypeAnnotation = exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; -exports.classImplements = exports.ClassImplements = ClassImplements; -exports.declareClass = exports.DeclareClass = DeclareClass; -exports.declareFunction = exports.DeclareFunction = DeclareFunction; -exports.declareInterface = exports.DeclareInterface = DeclareInterface; -exports.declareModule = exports.DeclareModule = DeclareModule; -exports.declareModuleExports = exports.DeclareModuleExports = DeclareModuleExports; -exports.declareTypeAlias = exports.DeclareTypeAlias = DeclareTypeAlias; -exports.declareOpaqueType = exports.DeclareOpaqueType = DeclareOpaqueType; -exports.declareVariable = exports.DeclareVariable = DeclareVariable; -exports.declareExportDeclaration = exports.DeclareExportDeclaration = DeclareExportDeclaration; -exports.declareExportAllDeclaration = exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; -exports.declaredPredicate = exports.DeclaredPredicate = DeclaredPredicate; -exports.existsTypeAnnotation = exports.ExistsTypeAnnotation = ExistsTypeAnnotation; -exports.functionTypeAnnotation = exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.functionTypeParam = exports.FunctionTypeParam = FunctionTypeParam; -exports.genericTypeAnnotation = exports.GenericTypeAnnotation = GenericTypeAnnotation; -exports.inferredPredicate = exports.InferredPredicate = InferredPredicate; -exports.interfaceExtends = exports.InterfaceExtends = InterfaceExtends; -exports.interfaceDeclaration = exports.InterfaceDeclaration = InterfaceDeclaration; -exports.interfaceTypeAnnotation = exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; -exports.intersectionTypeAnnotation = exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; -exports.mixedTypeAnnotation = exports.MixedTypeAnnotation = MixedTypeAnnotation; -exports.emptyTypeAnnotation = exports.EmptyTypeAnnotation = EmptyTypeAnnotation; -exports.nullableTypeAnnotation = exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.numberLiteralTypeAnnotation = exports.NumberLiteralTypeAnnotation = NumberLiteralTypeAnnotation; -exports.numberTypeAnnotation = exports.NumberTypeAnnotation = NumberTypeAnnotation; -exports.objectTypeAnnotation = exports.ObjectTypeAnnotation = ObjectTypeAnnotation; -exports.objectTypeInternalSlot = exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot; -exports.objectTypeCallProperty = exports.ObjectTypeCallProperty = ObjectTypeCallProperty; -exports.objectTypeIndexer = exports.ObjectTypeIndexer = ObjectTypeIndexer; -exports.objectTypeProperty = exports.ObjectTypeProperty = ObjectTypeProperty; -exports.objectTypeSpreadProperty = exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; -exports.opaqueType = exports.OpaqueType = OpaqueType; -exports.qualifiedTypeIdentifier = exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; -exports.stringLiteralTypeAnnotation = exports.StringLiteralTypeAnnotation = StringLiteralTypeAnnotation; -exports.stringTypeAnnotation = exports.StringTypeAnnotation = StringTypeAnnotation; -exports.thisTypeAnnotation = exports.ThisTypeAnnotation = ThisTypeAnnotation; -exports.tupleTypeAnnotation = exports.TupleTypeAnnotation = TupleTypeAnnotation; -exports.typeofTypeAnnotation = exports.TypeofTypeAnnotation = TypeofTypeAnnotation; -exports.typeAlias = exports.TypeAlias = TypeAlias; -exports.typeAnnotation = exports.TypeAnnotation = TypeAnnotation; -exports.typeCastExpression = exports.TypeCastExpression = TypeCastExpression; -exports.typeParameter = exports.TypeParameter = TypeParameter; -exports.typeParameterDeclaration = exports.TypeParameterDeclaration = TypeParameterDeclaration; -exports.typeParameterInstantiation = exports.TypeParameterInstantiation = TypeParameterInstantiation; -exports.unionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.variance = exports.Variance = Variance; -exports.voidTypeAnnotation = exports.VoidTypeAnnotation = VoidTypeAnnotation; -exports.jSXAttribute = exports.jsxAttribute = exports.JSXAttribute = JSXAttribute; -exports.jSXClosingElement = exports.jsxClosingElement = exports.JSXClosingElement = JSXClosingElement; -exports.jSXElement = exports.jsxElement = exports.JSXElement = JSXElement; -exports.jSXEmptyExpression = exports.jsxEmptyExpression = exports.JSXEmptyExpression = JSXEmptyExpression; -exports.jSXExpressionContainer = exports.jsxExpressionContainer = exports.JSXExpressionContainer = JSXExpressionContainer; -exports.jSXSpreadChild = exports.jsxSpreadChild = exports.JSXSpreadChild = JSXSpreadChild; -exports.jSXIdentifier = exports.jsxIdentifier = exports.JSXIdentifier = JSXIdentifier; -exports.jSXMemberExpression = exports.jsxMemberExpression = exports.JSXMemberExpression = JSXMemberExpression; -exports.jSXNamespacedName = exports.jsxNamespacedName = exports.JSXNamespacedName = JSXNamespacedName; -exports.jSXOpeningElement = exports.jsxOpeningElement = exports.JSXOpeningElement = JSXOpeningElement; -exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = exports.JSXSpreadAttribute = JSXSpreadAttribute; -exports.jSXText = exports.jsxText = exports.JSXText = JSXText; -exports.jSXFragment = exports.jsxFragment = exports.JSXFragment = JSXFragment; -exports.jSXOpeningFragment = exports.jsxOpeningFragment = exports.JSXOpeningFragment = JSXOpeningFragment; -exports.jSXClosingFragment = exports.jsxClosingFragment = exports.JSXClosingFragment = JSXClosingFragment; -exports.noop = exports.Noop = Noop; -exports.placeholder = exports.Placeholder = Placeholder; -exports.argumentPlaceholder = exports.ArgumentPlaceholder = ArgumentPlaceholder; -exports.awaitExpression = exports.AwaitExpression = AwaitExpression; -exports.bindExpression = exports.BindExpression = BindExpression; -exports.classProperty = exports.ClassProperty = ClassProperty; -exports.optionalMemberExpression = exports.OptionalMemberExpression = OptionalMemberExpression; -exports.pipelineTopicExpression = exports.PipelineTopicExpression = PipelineTopicExpression; -exports.pipelineBareFunction = exports.PipelineBareFunction = PipelineBareFunction; -exports.pipelinePrimaryTopicReference = exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; -exports.optionalCallExpression = exports.OptionalCallExpression = OptionalCallExpression; -exports.classPrivateProperty = exports.ClassPrivateProperty = ClassPrivateProperty; -exports.classPrivateMethod = exports.ClassPrivateMethod = ClassPrivateMethod; -exports.import = exports.Import = Import; -exports.decorator = exports.Decorator = Decorator; -exports.doExpression = exports.DoExpression = DoExpression; -exports.exportDefaultSpecifier = exports.ExportDefaultSpecifier = ExportDefaultSpecifier; -exports.exportNamespaceSpecifier = exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; -exports.privateName = exports.PrivateName = PrivateName; -exports.bigIntLiteral = exports.BigIntLiteral = BigIntLiteral; -exports.tSParameterProperty = exports.tsParameterProperty = exports.TSParameterProperty = TSParameterProperty; -exports.tSDeclareFunction = exports.tsDeclareFunction = exports.TSDeclareFunction = TSDeclareFunction; -exports.tSDeclareMethod = exports.tsDeclareMethod = exports.TSDeclareMethod = TSDeclareMethod; -exports.tSQualifiedName = exports.tsQualifiedName = exports.TSQualifiedName = TSQualifiedName; -exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; -exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; -exports.tSPropertySignature = exports.tsPropertySignature = exports.TSPropertySignature = TSPropertySignature; -exports.tSMethodSignature = exports.tsMethodSignature = exports.TSMethodSignature = TSMethodSignature; -exports.tSIndexSignature = exports.tsIndexSignature = exports.TSIndexSignature = TSIndexSignature; -exports.tSAnyKeyword = exports.tsAnyKeyword = exports.TSAnyKeyword = TSAnyKeyword; -exports.tSUnknownKeyword = exports.tsUnknownKeyword = exports.TSUnknownKeyword = TSUnknownKeyword; -exports.tSNumberKeyword = exports.tsNumberKeyword = exports.TSNumberKeyword = TSNumberKeyword; -exports.tSObjectKeyword = exports.tsObjectKeyword = exports.TSObjectKeyword = TSObjectKeyword; -exports.tSBooleanKeyword = exports.tsBooleanKeyword = exports.TSBooleanKeyword = TSBooleanKeyword; -exports.tSStringKeyword = exports.tsStringKeyword = exports.TSStringKeyword = TSStringKeyword; -exports.tSSymbolKeyword = exports.tsSymbolKeyword = exports.TSSymbolKeyword = TSSymbolKeyword; -exports.tSVoidKeyword = exports.tsVoidKeyword = exports.TSVoidKeyword = TSVoidKeyword; -exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = exports.TSUndefinedKeyword = TSUndefinedKeyword; -exports.tSNullKeyword = exports.tsNullKeyword = exports.TSNullKeyword = TSNullKeyword; -exports.tSNeverKeyword = exports.tsNeverKeyword = exports.TSNeverKeyword = TSNeverKeyword; -exports.tSThisType = exports.tsThisType = exports.TSThisType = TSThisType; -exports.tSFunctionType = exports.tsFunctionType = exports.TSFunctionType = TSFunctionType; -exports.tSConstructorType = exports.tsConstructorType = exports.TSConstructorType = TSConstructorType; -exports.tSTypeReference = exports.tsTypeReference = exports.TSTypeReference = TSTypeReference; -exports.tSTypePredicate = exports.tsTypePredicate = exports.TSTypePredicate = TSTypePredicate; -exports.tSTypeQuery = exports.tsTypeQuery = exports.TSTypeQuery = TSTypeQuery; -exports.tSTypeLiteral = exports.tsTypeLiteral = exports.TSTypeLiteral = TSTypeLiteral; -exports.tSArrayType = exports.tsArrayType = exports.TSArrayType = TSArrayType; -exports.tSTupleType = exports.tsTupleType = exports.TSTupleType = TSTupleType; -exports.tSOptionalType = exports.tsOptionalType = exports.TSOptionalType = TSOptionalType; -exports.tSRestType = exports.tsRestType = exports.TSRestType = TSRestType; -exports.tSUnionType = exports.tsUnionType = exports.TSUnionType = TSUnionType; -exports.tSIntersectionType = exports.tsIntersectionType = exports.TSIntersectionType = TSIntersectionType; -exports.tSConditionalType = exports.tsConditionalType = exports.TSConditionalType = TSConditionalType; -exports.tSInferType = exports.tsInferType = exports.TSInferType = TSInferType; -exports.tSParenthesizedType = exports.tsParenthesizedType = exports.TSParenthesizedType = TSParenthesizedType; -exports.tSTypeOperator = exports.tsTypeOperator = exports.TSTypeOperator = TSTypeOperator; -exports.tSIndexedAccessType = exports.tsIndexedAccessType = exports.TSIndexedAccessType = TSIndexedAccessType; -exports.tSMappedType = exports.tsMappedType = exports.TSMappedType = TSMappedType; -exports.tSLiteralType = exports.tsLiteralType = exports.TSLiteralType = TSLiteralType; -exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; -exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = exports.TSInterfaceDeclaration = TSInterfaceDeclaration; -exports.tSInterfaceBody = exports.tsInterfaceBody = exports.TSInterfaceBody = TSInterfaceBody; -exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; -exports.tSAsExpression = exports.tsAsExpression = exports.TSAsExpression = TSAsExpression; -exports.tSTypeAssertion = exports.tsTypeAssertion = exports.TSTypeAssertion = TSTypeAssertion; -exports.tSEnumDeclaration = exports.tsEnumDeclaration = exports.TSEnumDeclaration = TSEnumDeclaration; -exports.tSEnumMember = exports.tsEnumMember = exports.TSEnumMember = TSEnumMember; -exports.tSModuleDeclaration = exports.tsModuleDeclaration = exports.TSModuleDeclaration = TSModuleDeclaration; -exports.tSModuleBlock = exports.tsModuleBlock = exports.TSModuleBlock = TSModuleBlock; -exports.tSImportType = exports.tsImportType = exports.TSImportType = TSImportType; -exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; -exports.tSExternalModuleReference = exports.tsExternalModuleReference = exports.TSExternalModuleReference = TSExternalModuleReference; -exports.tSNonNullExpression = exports.tsNonNullExpression = exports.TSNonNullExpression = TSNonNullExpression; -exports.tSExportAssignment = exports.tsExportAssignment = exports.TSExportAssignment = TSExportAssignment; -exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; -exports.tSTypeAnnotation = exports.tsTypeAnnotation = exports.TSTypeAnnotation = TSTypeAnnotation; -exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; -exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = exports.TSTypeParameterDeclaration = TSTypeParameterDeclaration; -exports.tSTypeParameter = exports.tsTypeParameter = exports.TSTypeParameter = TSTypeParameter; -exports.numberLiteral = exports.NumberLiteral = NumberLiteral; -exports.regexLiteral = exports.RegexLiteral = RegexLiteral; -exports.restProperty = exports.RestProperty = RestProperty; -exports.spreadProperty = exports.SpreadProperty = SpreadProperty; - -var _builder = _interopRequireDefault(require("../builder")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function ArrayExpression(...args) { - return (0, _builder.default)("ArrayExpression", ...args); -} - -function AssignmentExpression(...args) { - return (0, _builder.default)("AssignmentExpression", ...args); -} - -function BinaryExpression(...args) { - return (0, _builder.default)("BinaryExpression", ...args); -} - -function InterpreterDirective(...args) { - return (0, _builder.default)("InterpreterDirective", ...args); -} - -function Directive(...args) { - return (0, _builder.default)("Directive", ...args); -} - -function DirectiveLiteral(...args) { - return (0, _builder.default)("DirectiveLiteral", ...args); -} - -function BlockStatement(...args) { - return (0, _builder.default)("BlockStatement", ...args); -} - -function BreakStatement(...args) { - return (0, _builder.default)("BreakStatement", ...args); -} - -function CallExpression(...args) { - return (0, _builder.default)("CallExpression", ...args); -} - -function CatchClause(...args) { - return (0, _builder.default)("CatchClause", ...args); -} - -function ConditionalExpression(...args) { - return (0, _builder.default)("ConditionalExpression", ...args); -} - -function ContinueStatement(...args) { - return (0, _builder.default)("ContinueStatement", ...args); -} - -function DebuggerStatement(...args) { - return (0, _builder.default)("DebuggerStatement", ...args); -} - -function DoWhileStatement(...args) { - return (0, _builder.default)("DoWhileStatement", ...args); -} - -function EmptyStatement(...args) { - return (0, _builder.default)("EmptyStatement", ...args); -} - -function ExpressionStatement(...args) { - return (0, _builder.default)("ExpressionStatement", ...args); -} - -function File(...args) { - return (0, _builder.default)("File", ...args); -} - -function ForInStatement(...args) { - return (0, _builder.default)("ForInStatement", ...args); -} - -function ForStatement(...args) { - return (0, _builder.default)("ForStatement", ...args); -} - -function FunctionDeclaration(...args) { - return (0, _builder.default)("FunctionDeclaration", ...args); -} - -function FunctionExpression(...args) { - return (0, _builder.default)("FunctionExpression", ...args); -} - -function Identifier(...args) { - return (0, _builder.default)("Identifier", ...args); -} - -function IfStatement(...args) { - return (0, _builder.default)("IfStatement", ...args); -} - -function LabeledStatement(...args) { - return (0, _builder.default)("LabeledStatement", ...args); -} - -function StringLiteral(...args) { - return (0, _builder.default)("StringLiteral", ...args); -} - -function NumericLiteral(...args) { - return (0, _builder.default)("NumericLiteral", ...args); -} - -function NullLiteral(...args) { - return (0, _builder.default)("NullLiteral", ...args); -} - -function BooleanLiteral(...args) { - return (0, _builder.default)("BooleanLiteral", ...args); -} - -function RegExpLiteral(...args) { - return (0, _builder.default)("RegExpLiteral", ...args); -} - -function LogicalExpression(...args) { - return (0, _builder.default)("LogicalExpression", ...args); -} - -function MemberExpression(...args) { - return (0, _builder.default)("MemberExpression", ...args); -} - -function NewExpression(...args) { - return (0, _builder.default)("NewExpression", ...args); -} - -function Program(...args) { - return (0, _builder.default)("Program", ...args); -} - -function ObjectExpression(...args) { - return (0, _builder.default)("ObjectExpression", ...args); -} - -function ObjectMethod(...args) { - return (0, _builder.default)("ObjectMethod", ...args); -} - -function ObjectProperty(...args) { - return (0, _builder.default)("ObjectProperty", ...args); -} - -function RestElement(...args) { - return (0, _builder.default)("RestElement", ...args); -} - -function ReturnStatement(...args) { - return (0, _builder.default)("ReturnStatement", ...args); -} - -function SequenceExpression(...args) { - return (0, _builder.default)("SequenceExpression", ...args); -} - -function ParenthesizedExpression(...args) { - return (0, _builder.default)("ParenthesizedExpression", ...args); -} - -function SwitchCase(...args) { - return (0, _builder.default)("SwitchCase", ...args); -} - -function SwitchStatement(...args) { - return (0, _builder.default)("SwitchStatement", ...args); -} - -function ThisExpression(...args) { - return (0, _builder.default)("ThisExpression", ...args); -} - -function ThrowStatement(...args) { - return (0, _builder.default)("ThrowStatement", ...args); -} - -function TryStatement(...args) { - return (0, _builder.default)("TryStatement", ...args); -} - -function UnaryExpression(...args) { - return (0, _builder.default)("UnaryExpression", ...args); -} - -function UpdateExpression(...args) { - return (0, _builder.default)("UpdateExpression", ...args); -} - -function VariableDeclaration(...args) { - return (0, _builder.default)("VariableDeclaration", ...args); -} - -function VariableDeclarator(...args) { - return (0, _builder.default)("VariableDeclarator", ...args); -} - -function WhileStatement(...args) { - return (0, _builder.default)("WhileStatement", ...args); -} - -function WithStatement(...args) { - return (0, _builder.default)("WithStatement", ...args); -} - -function AssignmentPattern(...args) { - return (0, _builder.default)("AssignmentPattern", ...args); -} - -function ArrayPattern(...args) { - return (0, _builder.default)("ArrayPattern", ...args); -} - -function ArrowFunctionExpression(...args) { - return (0, _builder.default)("ArrowFunctionExpression", ...args); -} - -function ClassBody(...args) { - return (0, _builder.default)("ClassBody", ...args); -} - -function ClassDeclaration(...args) { - return (0, _builder.default)("ClassDeclaration", ...args); -} - -function ClassExpression(...args) { - return (0, _builder.default)("ClassExpression", ...args); -} - -function ExportAllDeclaration(...args) { - return (0, _builder.default)("ExportAllDeclaration", ...args); -} - -function ExportDefaultDeclaration(...args) { - return (0, _builder.default)("ExportDefaultDeclaration", ...args); -} - -function ExportNamedDeclaration(...args) { - return (0, _builder.default)("ExportNamedDeclaration", ...args); -} - -function ExportSpecifier(...args) { - return (0, _builder.default)("ExportSpecifier", ...args); -} - -function ForOfStatement(...args) { - return (0, _builder.default)("ForOfStatement", ...args); -} - -function ImportDeclaration(...args) { - return (0, _builder.default)("ImportDeclaration", ...args); -} - -function ImportDefaultSpecifier(...args) { - return (0, _builder.default)("ImportDefaultSpecifier", ...args); -} - -function ImportNamespaceSpecifier(...args) { - return (0, _builder.default)("ImportNamespaceSpecifier", ...args); -} - -function ImportSpecifier(...args) { - return (0, _builder.default)("ImportSpecifier", ...args); -} - -function MetaProperty(...args) { - return (0, _builder.default)("MetaProperty", ...args); -} - -function ClassMethod(...args) { - return (0, _builder.default)("ClassMethod", ...args); -} - -function ObjectPattern(...args) { - return (0, _builder.default)("ObjectPattern", ...args); -} - -function SpreadElement(...args) { - return (0, _builder.default)("SpreadElement", ...args); -} - -function Super(...args) { - return (0, _builder.default)("Super", ...args); -} - -function TaggedTemplateExpression(...args) { - return (0, _builder.default)("TaggedTemplateExpression", ...args); -} - -function TemplateElement(...args) { - return (0, _builder.default)("TemplateElement", ...args); -} - -function TemplateLiteral(...args) { - return (0, _builder.default)("TemplateLiteral", ...args); -} - -function YieldExpression(...args) { - return (0, _builder.default)("YieldExpression", ...args); -} - -function AnyTypeAnnotation(...args) { - return (0, _builder.default)("AnyTypeAnnotation", ...args); -} - -function ArrayTypeAnnotation(...args) { - return (0, _builder.default)("ArrayTypeAnnotation", ...args); -} - -function BooleanTypeAnnotation(...args) { - return (0, _builder.default)("BooleanTypeAnnotation", ...args); -} - -function BooleanLiteralTypeAnnotation(...args) { - return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...args); -} - -function NullLiteralTypeAnnotation(...args) { - return (0, _builder.default)("NullLiteralTypeAnnotation", ...args); -} - -function ClassImplements(...args) { - return (0, _builder.default)("ClassImplements", ...args); -} - -function DeclareClass(...args) { - return (0, _builder.default)("DeclareClass", ...args); -} - -function DeclareFunction(...args) { - return (0, _builder.default)("DeclareFunction", ...args); -} - -function DeclareInterface(...args) { - return (0, _builder.default)("DeclareInterface", ...args); -} - -function DeclareModule(...args) { - return (0, _builder.default)("DeclareModule", ...args); -} - -function DeclareModuleExports(...args) { - return (0, _builder.default)("DeclareModuleExports", ...args); -} - -function DeclareTypeAlias(...args) { - return (0, _builder.default)("DeclareTypeAlias", ...args); -} - -function DeclareOpaqueType(...args) { - return (0, _builder.default)("DeclareOpaqueType", ...args); -} - -function DeclareVariable(...args) { - return (0, _builder.default)("DeclareVariable", ...args); -} - -function DeclareExportDeclaration(...args) { - return (0, _builder.default)("DeclareExportDeclaration", ...args); -} - -function DeclareExportAllDeclaration(...args) { - return (0, _builder.default)("DeclareExportAllDeclaration", ...args); -} - -function DeclaredPredicate(...args) { - return (0, _builder.default)("DeclaredPredicate", ...args); -} - -function ExistsTypeAnnotation(...args) { - return (0, _builder.default)("ExistsTypeAnnotation", ...args); -} - -function FunctionTypeAnnotation(...args) { - return (0, _builder.default)("FunctionTypeAnnotation", ...args); -} - -function FunctionTypeParam(...args) { - return (0, _builder.default)("FunctionTypeParam", ...args); -} - -function GenericTypeAnnotation(...args) { - return (0, _builder.default)("GenericTypeAnnotation", ...args); -} - -function InferredPredicate(...args) { - return (0, _builder.default)("InferredPredicate", ...args); -} - -function InterfaceExtends(...args) { - return (0, _builder.default)("InterfaceExtends", ...args); -} - -function InterfaceDeclaration(...args) { - return (0, _builder.default)("InterfaceDeclaration", ...args); -} - -function InterfaceTypeAnnotation(...args) { - return (0, _builder.default)("InterfaceTypeAnnotation", ...args); -} - -function IntersectionTypeAnnotation(...args) { - return (0, _builder.default)("IntersectionTypeAnnotation", ...args); -} - -function MixedTypeAnnotation(...args) { - return (0, _builder.default)("MixedTypeAnnotation", ...args); -} - -function EmptyTypeAnnotation(...args) { - return (0, _builder.default)("EmptyTypeAnnotation", ...args); -} - -function NullableTypeAnnotation(...args) { - return (0, _builder.default)("NullableTypeAnnotation", ...args); -} - -function NumberLiteralTypeAnnotation(...args) { - return (0, _builder.default)("NumberLiteralTypeAnnotation", ...args); -} - -function NumberTypeAnnotation(...args) { - return (0, _builder.default)("NumberTypeAnnotation", ...args); -} - -function ObjectTypeAnnotation(...args) { - return (0, _builder.default)("ObjectTypeAnnotation", ...args); -} - -function ObjectTypeInternalSlot(...args) { - return (0, _builder.default)("ObjectTypeInternalSlot", ...args); -} - -function ObjectTypeCallProperty(...args) { - return (0, _builder.default)("ObjectTypeCallProperty", ...args); -} - -function ObjectTypeIndexer(...args) { - return (0, _builder.default)("ObjectTypeIndexer", ...args); -} - -function ObjectTypeProperty(...args) { - return (0, _builder.default)("ObjectTypeProperty", ...args); -} - -function ObjectTypeSpreadProperty(...args) { - return (0, _builder.default)("ObjectTypeSpreadProperty", ...args); -} - -function OpaqueType(...args) { - return (0, _builder.default)("OpaqueType", ...args); -} - -function QualifiedTypeIdentifier(...args) { - return (0, _builder.default)("QualifiedTypeIdentifier", ...args); -} - -function StringLiteralTypeAnnotation(...args) { - return (0, _builder.default)("StringLiteralTypeAnnotation", ...args); -} - -function StringTypeAnnotation(...args) { - return (0, _builder.default)("StringTypeAnnotation", ...args); -} - -function ThisTypeAnnotation(...args) { - return (0, _builder.default)("ThisTypeAnnotation", ...args); -} - -function TupleTypeAnnotation(...args) { - return (0, _builder.default)("TupleTypeAnnotation", ...args); -} - -function TypeofTypeAnnotation(...args) { - return (0, _builder.default)("TypeofTypeAnnotation", ...args); -} - -function TypeAlias(...args) { - return (0, _builder.default)("TypeAlias", ...args); -} - -function TypeAnnotation(...args) { - return (0, _builder.default)("TypeAnnotation", ...args); -} - -function TypeCastExpression(...args) { - return (0, _builder.default)("TypeCastExpression", ...args); -} - -function TypeParameter(...args) { - return (0, _builder.default)("TypeParameter", ...args); -} - -function TypeParameterDeclaration(...args) { - return (0, _builder.default)("TypeParameterDeclaration", ...args); -} - -function TypeParameterInstantiation(...args) { - return (0, _builder.default)("TypeParameterInstantiation", ...args); -} - -function UnionTypeAnnotation(...args) { - return (0, _builder.default)("UnionTypeAnnotation", ...args); -} - -function Variance(...args) { - return (0, _builder.default)("Variance", ...args); -} - -function VoidTypeAnnotation(...args) { - return (0, _builder.default)("VoidTypeAnnotation", ...args); -} - -function JSXAttribute(...args) { - return (0, _builder.default)("JSXAttribute", ...args); -} - -function JSXClosingElement(...args) { - return (0, _builder.default)("JSXClosingElement", ...args); -} - -function JSXElement(...args) { - return (0, _builder.default)("JSXElement", ...args); -} - -function JSXEmptyExpression(...args) { - return (0, _builder.default)("JSXEmptyExpression", ...args); -} - -function JSXExpressionContainer(...args) { - return (0, _builder.default)("JSXExpressionContainer", ...args); -} - -function JSXSpreadChild(...args) { - return (0, _builder.default)("JSXSpreadChild", ...args); -} - -function JSXIdentifier(...args) { - return (0, _builder.default)("JSXIdentifier", ...args); -} - -function JSXMemberExpression(...args) { - return (0, _builder.default)("JSXMemberExpression", ...args); -} - -function JSXNamespacedName(...args) { - return (0, _builder.default)("JSXNamespacedName", ...args); -} - -function JSXOpeningElement(...args) { - return (0, _builder.default)("JSXOpeningElement", ...args); -} - -function JSXSpreadAttribute(...args) { - return (0, _builder.default)("JSXSpreadAttribute", ...args); -} - -function JSXText(...args) { - return (0, _builder.default)("JSXText", ...args); -} - -function JSXFragment(...args) { - return (0, _builder.default)("JSXFragment", ...args); -} - -function JSXOpeningFragment(...args) { - return (0, _builder.default)("JSXOpeningFragment", ...args); -} - -function JSXClosingFragment(...args) { - return (0, _builder.default)("JSXClosingFragment", ...args); -} - -function Noop(...args) { - return (0, _builder.default)("Noop", ...args); -} - -function Placeholder(...args) { - return (0, _builder.default)("Placeholder", ...args); -} - -function ArgumentPlaceholder(...args) { - return (0, _builder.default)("ArgumentPlaceholder", ...args); -} - -function AwaitExpression(...args) { - return (0, _builder.default)("AwaitExpression", ...args); -} - -function BindExpression(...args) { - return (0, _builder.default)("BindExpression", ...args); -} - -function ClassProperty(...args) { - return (0, _builder.default)("ClassProperty", ...args); -} - -function OptionalMemberExpression(...args) { - return (0, _builder.default)("OptionalMemberExpression", ...args); -} - -function PipelineTopicExpression(...args) { - return (0, _builder.default)("PipelineTopicExpression", ...args); -} - -function PipelineBareFunction(...args) { - return (0, _builder.default)("PipelineBareFunction", ...args); -} - -function PipelinePrimaryTopicReference(...args) { - return (0, _builder.default)("PipelinePrimaryTopicReference", ...args); -} - -function OptionalCallExpression(...args) { - return (0, _builder.default)("OptionalCallExpression", ...args); -} - -function ClassPrivateProperty(...args) { - return (0, _builder.default)("ClassPrivateProperty", ...args); -} - -function ClassPrivateMethod(...args) { - return (0, _builder.default)("ClassPrivateMethod", ...args); -} - -function Import(...args) { - return (0, _builder.default)("Import", ...args); -} - -function Decorator(...args) { - return (0, _builder.default)("Decorator", ...args); -} - -function DoExpression(...args) { - return (0, _builder.default)("DoExpression", ...args); -} - -function ExportDefaultSpecifier(...args) { - return (0, _builder.default)("ExportDefaultSpecifier", ...args); -} - -function ExportNamespaceSpecifier(...args) { - return (0, _builder.default)("ExportNamespaceSpecifier", ...args); -} - -function PrivateName(...args) { - return (0, _builder.default)("PrivateName", ...args); -} - -function BigIntLiteral(...args) { - return (0, _builder.default)("BigIntLiteral", ...args); -} - -function TSParameterProperty(...args) { - return (0, _builder.default)("TSParameterProperty", ...args); -} - -function TSDeclareFunction(...args) { - return (0, _builder.default)("TSDeclareFunction", ...args); -} - -function TSDeclareMethod(...args) { - return (0, _builder.default)("TSDeclareMethod", ...args); -} - -function TSQualifiedName(...args) { - return (0, _builder.default)("TSQualifiedName", ...args); -} - -function TSCallSignatureDeclaration(...args) { - return (0, _builder.default)("TSCallSignatureDeclaration", ...args); -} - -function TSConstructSignatureDeclaration(...args) { - return (0, _builder.default)("TSConstructSignatureDeclaration", ...args); -} - -function TSPropertySignature(...args) { - return (0, _builder.default)("TSPropertySignature", ...args); -} - -function TSMethodSignature(...args) { - return (0, _builder.default)("TSMethodSignature", ...args); -} - -function TSIndexSignature(...args) { - return (0, _builder.default)("TSIndexSignature", ...args); -} - -function TSAnyKeyword(...args) { - return (0, _builder.default)("TSAnyKeyword", ...args); -} - -function TSUnknownKeyword(...args) { - return (0, _builder.default)("TSUnknownKeyword", ...args); -} - -function TSNumberKeyword(...args) { - return (0, _builder.default)("TSNumberKeyword", ...args); -} - -function TSObjectKeyword(...args) { - return (0, _builder.default)("TSObjectKeyword", ...args); -} - -function TSBooleanKeyword(...args) { - return (0, _builder.default)("TSBooleanKeyword", ...args); -} - -function TSStringKeyword(...args) { - return (0, _builder.default)("TSStringKeyword", ...args); -} - -function TSSymbolKeyword(...args) { - return (0, _builder.default)("TSSymbolKeyword", ...args); -} - -function TSVoidKeyword(...args) { - return (0, _builder.default)("TSVoidKeyword", ...args); -} - -function TSUndefinedKeyword(...args) { - return (0, _builder.default)("TSUndefinedKeyword", ...args); -} - -function TSNullKeyword(...args) { - return (0, _builder.default)("TSNullKeyword", ...args); -} - -function TSNeverKeyword(...args) { - return (0, _builder.default)("TSNeverKeyword", ...args); -} - -function TSThisType(...args) { - return (0, _builder.default)("TSThisType", ...args); -} - -function TSFunctionType(...args) { - return (0, _builder.default)("TSFunctionType", ...args); -} - -function TSConstructorType(...args) { - return (0, _builder.default)("TSConstructorType", ...args); -} - -function TSTypeReference(...args) { - return (0, _builder.default)("TSTypeReference", ...args); -} - -function TSTypePredicate(...args) { - return (0, _builder.default)("TSTypePredicate", ...args); -} - -function TSTypeQuery(...args) { - return (0, _builder.default)("TSTypeQuery", ...args); -} - -function TSTypeLiteral(...args) { - return (0, _builder.default)("TSTypeLiteral", ...args); -} - -function TSArrayType(...args) { - return (0, _builder.default)("TSArrayType", ...args); -} - -function TSTupleType(...args) { - return (0, _builder.default)("TSTupleType", ...args); -} - -function TSOptionalType(...args) { - return (0, _builder.default)("TSOptionalType", ...args); -} - -function TSRestType(...args) { - return (0, _builder.default)("TSRestType", ...args); -} - -function TSUnionType(...args) { - return (0, _builder.default)("TSUnionType", ...args); -} - -function TSIntersectionType(...args) { - return (0, _builder.default)("TSIntersectionType", ...args); -} - -function TSConditionalType(...args) { - return (0, _builder.default)("TSConditionalType", ...args); -} - -function TSInferType(...args) { - return (0, _builder.default)("TSInferType", ...args); -} - -function TSParenthesizedType(...args) { - return (0, _builder.default)("TSParenthesizedType", ...args); -} - -function TSTypeOperator(...args) { - return (0, _builder.default)("TSTypeOperator", ...args); -} - -function TSIndexedAccessType(...args) { - return (0, _builder.default)("TSIndexedAccessType", ...args); -} - -function TSMappedType(...args) { - return (0, _builder.default)("TSMappedType", ...args); -} - -function TSLiteralType(...args) { - return (0, _builder.default)("TSLiteralType", ...args); -} - -function TSExpressionWithTypeArguments(...args) { - return (0, _builder.default)("TSExpressionWithTypeArguments", ...args); -} - -function TSInterfaceDeclaration(...args) { - return (0, _builder.default)("TSInterfaceDeclaration", ...args); -} - -function TSInterfaceBody(...args) { - return (0, _builder.default)("TSInterfaceBody", ...args); -} - -function TSTypeAliasDeclaration(...args) { - return (0, _builder.default)("TSTypeAliasDeclaration", ...args); -} - -function TSAsExpression(...args) { - return (0, _builder.default)("TSAsExpression", ...args); -} - -function TSTypeAssertion(...args) { - return (0, _builder.default)("TSTypeAssertion", ...args); -} - -function TSEnumDeclaration(...args) { - return (0, _builder.default)("TSEnumDeclaration", ...args); -} - -function TSEnumMember(...args) { - return (0, _builder.default)("TSEnumMember", ...args); -} - -function TSModuleDeclaration(...args) { - return (0, _builder.default)("TSModuleDeclaration", ...args); -} - -function TSModuleBlock(...args) { - return (0, _builder.default)("TSModuleBlock", ...args); -} - -function TSImportType(...args) { - return (0, _builder.default)("TSImportType", ...args); -} - -function TSImportEqualsDeclaration(...args) { - return (0, _builder.default)("TSImportEqualsDeclaration", ...args); -} - -function TSExternalModuleReference(...args) { - return (0, _builder.default)("TSExternalModuleReference", ...args); -} - -function TSNonNullExpression(...args) { - return (0, _builder.default)("TSNonNullExpression", ...args); -} - -function TSExportAssignment(...args) { - return (0, _builder.default)("TSExportAssignment", ...args); -} - -function TSNamespaceExportDeclaration(...args) { - return (0, _builder.default)("TSNamespaceExportDeclaration", ...args); -} - -function TSTypeAnnotation(...args) { - return (0, _builder.default)("TSTypeAnnotation", ...args); -} - -function TSTypeParameterInstantiation(...args) { - return (0, _builder.default)("TSTypeParameterInstantiation", ...args); -} - -function TSTypeParameterDeclaration(...args) { - return (0, _builder.default)("TSTypeParameterDeclaration", ...args); -} - -function TSTypeParameter(...args) { - return (0, _builder.default)("TSTypeParameter", ...args); -} - -function NumberLiteral(...args) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - return NumberLiteral("NumberLiteral", ...args); -} - -function RegexLiteral(...args) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - return RegexLiteral("RegexLiteral", ...args); -} - -function RestProperty(...args) { - console.trace("The node type RestProperty has been renamed to RestElement"); - return RestProperty("RestProperty", ...args); -} - -function SpreadProperty(...args) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - return SpreadProperty("SpreadProperty", ...args); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneNode.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneNode.js deleted file mode 100644 index ce9cb8c1f32984..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneNode.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cloneNode; - -var _definitions = require("../definitions"); - -const has = Function.call.bind(Object.prototype.hasOwnProperty); - -function cloneIfNode(obj, deep) { - if (obj && typeof obj.type === "string" && obj.type !== "CommentLine" && obj.type !== "CommentBlock") { - return cloneNode(obj, deep); - } - - return obj; -} - -function cloneIfNodeOrArray(obj, deep) { - if (Array.isArray(obj)) { - return obj.map(node => cloneIfNode(node, deep)); - } - - return cloneIfNode(obj, deep); -} - -function cloneNode(node, deep = true) { - if (!node) return node; - const { - type - } = node; - const newNode = { - type - }; - - if (type === "Identifier") { - newNode.name = node.name; - - if (has(node, "optional") && typeof node.optional === "boolean") { - newNode.optional = node.optional; - } - - if (has(node, "typeAnnotation")) { - newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true) : node.typeAnnotation; - } - } else if (!has(_definitions.NODE_FIELDS, type)) { - throw new Error(`Unknown node type: "${type}"`); - } else { - for (const field of Object.keys(_definitions.NODE_FIELDS[type])) { - if (has(node, field)) { - newNode[field] = deep ? cloneIfNodeOrArray(node[field], true) : node[field]; - } - } - } - - if (has(node, "loc")) { - newNode.loc = node.loc; - } - - if (has(node, "leadingComments")) { - newNode.leadingComments = node.leadingComments; - } - - if (has(node, "innerComments")) { - newNode.innerComments = node.innerComments; - } - - if (has(node, "trailingComments")) { - newNode.trailingComments = node.trailingComments; - } - - if (has(node, "extra")) { - newNode.extra = Object.assign({}, node.extra); - } - - return newNode; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js deleted file mode 100644 index 5622af7b0220d7..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cloneWithoutLoc; - -var _clone = _interopRequireDefault(require("./clone")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function cloneWithoutLoc(node) { - const newNode = (0, _clone.default)(node); - newNode.loc = null; - return newNode; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/generated/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/generated/index.js deleted file mode 100644 index 6072495e206be0..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/generated/index.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0; - -var _definitions = require("../../definitions"); - -const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; -exports.EXPRESSION_TYPES = EXPRESSION_TYPES; -const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; -exports.BINARY_TYPES = BINARY_TYPES; -const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; -exports.SCOPABLE_TYPES = SCOPABLE_TYPES; -const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; -exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; -const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; -exports.BLOCK_TYPES = BLOCK_TYPES; -const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; -exports.STATEMENT_TYPES = STATEMENT_TYPES; -const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; -exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; -const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; -exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; -const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; -exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES; -const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; -exports.LOOP_TYPES = LOOP_TYPES; -const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; -exports.WHILE_TYPES = WHILE_TYPES; -const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; -exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; -const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; -exports.FOR_TYPES = FOR_TYPES; -const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; -exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; -const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; -exports.FUNCTION_TYPES = FUNCTION_TYPES; -const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; -exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; -const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; -exports.PUREISH_TYPES = PUREISH_TYPES; -const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; -exports.DECLARATION_TYPES = DECLARATION_TYPES; -const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; -exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; -const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; -exports.LVAL_TYPES = LVAL_TYPES; -const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; -exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; -const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; -exports.LITERAL_TYPES = LITERAL_TYPES; -const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; -exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES; -const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; -exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; -const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; -exports.METHOD_TYPES = METHOD_TYPES; -const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; -exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; -const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; -exports.PROPERTY_TYPES = PROPERTY_TYPES; -const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; -exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES; -const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; -exports.PATTERN_TYPES = PATTERN_TYPES; -const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; -exports.CLASS_TYPES = CLASS_TYPES; -const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; -exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; -const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; -exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; -const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; -exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; -const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; -exports.FLOW_TYPES = FLOW_TYPES; -const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; -exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES; -const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; -exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; -const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; -exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; -const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; -exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; -const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; -exports.JSX_TYPES = JSX_TYPES; -const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; -exports.PRIVATE_TYPES = PRIVATE_TYPES; -const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; -exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; -const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; -exports.TSTYPE_TYPES = TSTYPE_TYPES; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/index.js deleted file mode 100644 index a60b106fdad394..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/index.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0; -const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; -exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; -const FLATTENABLE_KEYS = ["body", "expressions"]; -exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS; -const FOR_INIT_KEYS = ["left", "init"]; -exports.FOR_INIT_KEYS = FOR_INIT_KEYS; -const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; -exports.COMMENT_KEYS = COMMENT_KEYS; -const LOGICAL_OPERATORS = ["||", "&&", "??"]; -exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS; -const UPDATE_OPERATORS = ["++", "--"]; -exports.UPDATE_OPERATORS = UPDATE_OPERATORS; -const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; -exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; -const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; -exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; -const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; -exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; -const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; -exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; -const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; -exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; -const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS]; -exports.BINARY_OPERATORS = BINARY_OPERATORS; -const BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; -exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; -const NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; -exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; -const STRING_UNARY_OPERATORS = ["typeof"]; -exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; -const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; -exports.UNARY_OPERATORS = UNARY_OPERATORS; -const INHERIT_KEYS = { - optional: ["typeAnnotation", "typeParameters", "returnType"], - force: ["start", "loc", "end"] -}; -exports.INHERIT_KEYS = INHERIT_KEYS; -const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); -exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; -const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); -exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/core.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/core.js deleted file mode 100644 index d759890cf5721b..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/core.js +++ /dev/null @@ -1,725 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0; - -var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); - -var _constants = require("../constants"); - -var _utils = _interopRequireWildcard(require("./utils")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _utils.default)("ArrayExpression", { - fields: { - elements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), - default: [] - } - }, - visitor: ["elements"], - aliases: ["Expression"] -}); -(0, _utils.default)("AssignmentExpression", { - fields: { - operator: { - validate: (0, _utils.assertValueType)("string") - }, - left: { - validate: (0, _utils.assertNodeType)("LVal") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Expression"] -}); -(0, _utils.default)("BinaryExpression", { - builder: ["operator", "left", "right"], - fields: { - operator: { - validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS) - }, - left: { - validate: (0, _utils.assertNodeType)("Expression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - visitor: ["left", "right"], - aliases: ["Binary", "Expression"] -}); -(0, _utils.default)("InterpreterDirective", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("Directive", { - visitor: ["value"], - fields: { - value: { - validate: (0, _utils.assertNodeType)("DirectiveLiteral") - } - } -}); -(0, _utils.default)("DirectiveLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("BlockStatement", { - builder: ["body", "directives"], - visitor: ["directives", "body"], - fields: { - directives: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), - default: [] - }, - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block", "Statement"] -}); -(0, _utils.default)("BreakStatement", { - visitor: ["label"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] -}); -(0, _utils.default)("CallExpression", { - visitor: ["callee", "arguments", "typeParameters", "typeArguments"], - builder: ["callee", "arguments"], - aliases: ["Expression"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - }, - arguments: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) - }, - optional: { - validate: (0, _utils.assertOneOf)(true, false), - optional: true - }, - typeArguments: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("CatchClause", { - visitor: ["param", "body"], - fields: { - param: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }, - aliases: ["Scopable", "BlockParent"] -}); -(0, _utils.default)("ConditionalExpression", { - visitor: ["test", "consequent", "alternate"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - consequent: { - validate: (0, _utils.assertNodeType)("Expression") - }, - alternate: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - aliases: ["Expression", "Conditional"] -}); -(0, _utils.default)("ContinueStatement", { - visitor: ["label"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] -}); -(0, _utils.default)("DebuggerStatement", { - aliases: ["Statement"] -}); -(0, _utils.default)("DoWhileStatement", { - visitor: ["test", "body"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - }, - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] -}); -(0, _utils.default)("EmptyStatement", { - aliases: ["Statement"] -}); -(0, _utils.default)("ExpressionStatement", { - visitor: ["expression"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - aliases: ["Statement", "ExpressionWrapper"] -}); -(0, _utils.default)("File", { - builder: ["program", "comments", "tokens"], - visitor: ["program"], - fields: { - program: { - validate: (0, _utils.assertNodeType)("Program") - } - } -}); -(0, _utils.default)("ForInStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: (0, _utils.assertNodeType)("VariableDeclaration", "LVal") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("ForStatement", { - visitor: ["init", "test", "update", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], - fields: { - init: { - validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), - optional: true - }, - test: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - update: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -const functionCommon = { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) - }, - generator: { - default: false, - validate: (0, _utils.assertValueType)("boolean") - }, - async: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - } -}; -exports.functionCommon = functionCommon; -const functionTypeAnnotationCommon = { - returnType: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), - optional: true - } -}; -exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon; -const functionDeclarationCommon = Object.assign({}, functionCommon, { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } -}); -exports.functionDeclarationCommon = functionDeclarationCommon; -(0, _utils.default)("FunctionDeclaration", { - builder: ["id", "params", "body", "generator", "async"], - visitor: ["id", "params", "body", "returnType", "typeParameters"], - fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }), - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"] -}); -(0, _utils.default)("FunctionExpression", { - inherits: "FunctionDeclaration", - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }) -}); -const patternLikeCommon = { - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - } -}; -exports.patternLikeCommon = patternLikeCommon; -(0, _utils.default)("Identifier", { - builder: ["name"], - visitor: ["typeAnnotation", "decorators"], - aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], - fields: Object.assign({}, patternLikeCommon, { - name: { - validate: (0, _utils.chain)(function (node, key, val) { - if (!(0, _isValidIdentifier.default)(val)) {} - }, (0, _utils.assertValueType)("string")) - }, - optional: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - } - }) -}); -(0, _utils.default)("IfStatement", { - visitor: ["test", "consequent", "alternate"], - aliases: ["Statement", "Conditional"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - consequent: { - validate: (0, _utils.assertNodeType)("Statement") - }, - alternate: { - optional: true, - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("LabeledStatement", { - visitor: ["label", "body"], - aliases: ["Statement"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("StringLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("NumericLiteral", { - builder: ["value"], - deprecatedAlias: "NumberLiteral", - fields: { - value: { - validate: (0, _utils.assertValueType)("number") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("NullLiteral", { - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("BooleanLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("boolean") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("RegExpLiteral", { - builder: ["pattern", "flags"], - deprecatedAlias: "RegexLiteral", - aliases: ["Expression", "Literal"], - fields: { - pattern: { - validate: (0, _utils.assertValueType)("string") - }, - flags: { - validate: (0, _utils.assertValueType)("string"), - default: "" - } - } -}); -(0, _utils.default)("LogicalExpression", { - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Binary", "Expression"], - fields: { - operator: { - validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS) - }, - left: { - validate: (0, _utils.assertNodeType)("Expression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("MemberExpression", { - builder: ["object", "property", "computed", "optional"], - visitor: ["object", "property"], - aliases: ["Expression", "LVal"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - property: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - computed: { - default: false - }, - optional: { - validate: (0, _utils.assertOneOf)(true, false), - optional: true - } - } -}); -(0, _utils.default)("NewExpression", { - inherits: "CallExpression" -}); -(0, _utils.default)("Program", { - visitor: ["directives", "body"], - builder: ["body", "directives", "sourceType", "interpreter"], - fields: { - sourceFile: { - validate: (0, _utils.assertValueType)("string") - }, - sourceType: { - validate: (0, _utils.assertOneOf)("script", "module"), - default: "script" - }, - interpreter: { - validate: (0, _utils.assertNodeType)("InterpreterDirective"), - default: null, - optional: true - }, - directives: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), - default: [] - }, - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block"] -}); -(0, _utils.default)("ObjectExpression", { - visitor: ["properties"], - aliases: ["Expression"], - fields: { - properties: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) - } - } -}); -(0, _utils.default)("ObjectMethod", { - builder: ["kind", "key", "params", "body", "computed"], - fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { - kind: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("method", "get", "set")), - default: "method" - }, - computed: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - key: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }), - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] -}); -(0, _utils.default)("ObjectProperty", { - builder: ["key", "value", "computed", "shorthand", "decorators"], - fields: { - computed: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - key: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - value: { - validate: (0, _utils.assertNodeType)("Expression", "PatternLike") - }, - shorthand: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - }, - visitor: ["key", "value", "decorators"], - aliases: ["UserWhitespacable", "Property", "ObjectMember"] -}); -(0, _utils.default)("RestElement", { - visitor: ["argument", "typeAnnotation"], - builder: ["argument"], - aliases: ["LVal", "PatternLike"], - deprecatedAlias: "RestProperty", - fields: Object.assign({}, patternLikeCommon, { - argument: { - validate: (0, _utils.assertNodeType)("LVal") - } - }) -}); -(0, _utils.default)("ReturnStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - } - } -}); -(0, _utils.default)("SequenceExpression", { - visitor: ["expressions"], - fields: { - expressions: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) - } - }, - aliases: ["Expression"] -}); -(0, _utils.default)("ParenthesizedExpression", { - visitor: ["expression"], - aliases: ["Expression", "ExpressionWrapper"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("SwitchCase", { - visitor: ["test", "consequent"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - consequent: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - } -}); -(0, _utils.default)("SwitchStatement", { - visitor: ["discriminant", "cases"], - aliases: ["Statement", "BlockParent", "Scopable"], - fields: { - discriminant: { - validate: (0, _utils.assertNodeType)("Expression") - }, - cases: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) - } - } -}); -(0, _utils.default)("ThisExpression", { - aliases: ["Expression"] -}); -(0, _utils.default)("ThrowStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("TryStatement", { - visitor: ["block", "handler", "finalizer"], - aliases: ["Statement"], - fields: { - block: { - validate: (0, _utils.assertNodeType)("BlockStatement") - }, - handler: { - optional: true, - validate: (0, _utils.assertNodeType)("CatchClause") - }, - finalizer: { - optional: true, - validate: (0, _utils.assertNodeType)("BlockStatement") - } - } -}); -(0, _utils.default)("UnaryExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - default: true - }, - argument: { - validate: (0, _utils.assertNodeType)("Expression") - }, - operator: { - validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["UnaryLike", "Expression"] -}); -(0, _utils.default)("UpdateExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - default: false - }, - argument: { - validate: (0, _utils.assertNodeType)("Expression") - }, - operator: { - validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["Expression"] -}); -(0, _utils.default)("VariableDeclaration", { - builder: ["kind", "declarations"], - visitor: ["declarations"], - aliases: ["Statement", "Declaration"], - fields: { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - kind: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("var", "let", "const")) - }, - declarations: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) - } - } -}); -(0, _utils.default)("VariableDeclarator", { - visitor: ["id", "init"], - fields: { - id: { - validate: (0, _utils.assertNodeType)("LVal") - }, - definite: { - optional: true, - validate: (0, _utils.assertValueType)("boolean") - }, - init: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("WhileStatement", { - visitor: ["test", "body"], - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement", "Statement") - } - } -}); -(0, _utils.default)("WithStatement", { - visitor: ["object", "body"], - aliases: ["Statement"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement", "Statement") - } - } -}); \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/es2015.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/es2015.js deleted file mode 100644 index 71e01365390ebf..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/es2015.js +++ /dev/null @@ -1,401 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = void 0; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _core = require("./core"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -(0, _utils.default)("AssignmentPattern", { - visitor: ["left", "right", "decorators"], - builder: ["left", "right"], - aliases: ["Pattern", "PatternLike", "LVal"], - fields: Object.assign({}, _core.patternLikeCommon, { - left: { - validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - } - }) -}); -(0, _utils.default)("ArrayPattern", { - visitor: ["elements", "typeAnnotation"], - builder: ["elements"], - aliases: ["Pattern", "PatternLike", "LVal"], - fields: Object.assign({}, _core.patternLikeCommon, { - elements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("PatternLike"))) - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - } - }) -}); -(0, _utils.default)("ArrowFunctionExpression", { - builder: ["params", "body", "async"], - visitor: ["params", "body", "returnType", "typeParameters"], - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: Object.assign({}, _core.functionCommon, _core.functionTypeAnnotationCommon, { - expression: { - validate: (0, _utils.assertValueType)("boolean") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement", "Expression") - } - }) -}); -(0, _utils.default)("ClassBody", { - visitor: ["body"], - fields: { - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature"))) - } - } -}); -const classCommon = { - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("ClassBody") - }, - superClass: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - }, - superTypeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), - optional: true - }, - implements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), - optional: true - } -}; -(0, _utils.default)("ClassDeclaration", { - builder: ["id", "superClass", "body", "decorators"], - visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], - aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"], - fields: Object.assign({}, classCommon, { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - abstract: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - }) -}); -(0, _utils.default)("ClassExpression", { - inherits: "ClassDeclaration", - aliases: ["Scopable", "Class", "Expression", "Pureish"], - fields: Object.assign({}, classCommon, { - id: { - optional: true, - validate: (0, _utils.assertNodeType)("Identifier") - }, - body: { - validate: (0, _utils.assertNodeType)("ClassBody") - }, - superClass: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - }) -}); -(0, _utils.default)("ExportAllDeclaration", { - visitor: ["source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - source: { - validate: (0, _utils.assertNodeType)("StringLiteral") - } - } -}); -(0, _utils.default)("ExportDefaultDeclaration", { - visitor: ["declaration"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - declaration: { - validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression") - } - } -}); -(0, _utils.default)("ExportNamedDeclaration", { - visitor: ["declaration", "specifiers", "source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - declaration: { - validate: (0, _utils.assertNodeType)("Declaration"), - optional: true - }, - specifiers: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"))) - }, - source: { - validate: (0, _utils.assertNodeType)("StringLiteral"), - optional: true - }, - exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) - } -}); -(0, _utils.default)("ExportSpecifier", { - visitor: ["local", "exported"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ForOfStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: (0, _utils.assertNodeType)("VariableDeclaration", "LVal") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - }, - await: { - default: false, - validate: (0, _utils.assertValueType)("boolean") - } - } -}); -(0, _utils.default)("ImportDeclaration", { - visitor: ["specifiers", "source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration"], - fields: { - specifiers: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) - }, - source: { - validate: (0, _utils.assertNodeType)("StringLiteral") - }, - importKind: { - validate: (0, _utils.assertOneOf)("type", "typeof", "value"), - optional: true - } - } -}); -(0, _utils.default)("ImportDefaultSpecifier", { - visitor: ["local"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ImportNamespaceSpecifier", { - visitor: ["local"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ImportSpecifier", { - visitor: ["local", "imported"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - imported: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - importKind: { - validate: (0, _utils.assertOneOf)("type", "typeof"), - optional: true - } - } -}); -(0, _utils.default)("MetaProperty", { - visitor: ["meta", "property"], - aliases: ["Expression"], - fields: { - meta: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - property: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -const classMethodOrPropertyCommon = { - abstract: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - accessibility: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), - optional: true - }, - static: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - computed: { - default: false, - validate: (0, _utils.assertValueType)("boolean") - }, - optional: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - key: { - validate: (0, _utils.chain)(function () { - const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) - } -}; -exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon; -const classMethodOrDeclareMethodCommon = Object.assign({}, _core.functionCommon, classMethodOrPropertyCommon, { - kind: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("get", "set", "method", "constructor")), - default: "method" - }, - access: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } -}); -exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; -(0, _utils.default)("ClassMethod", { - aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], - builder: ["kind", "key", "params", "body", "computed", "static"], - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - fields: Object.assign({}, classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }) -}); -(0, _utils.default)("ObjectPattern", { - visitor: ["properties", "typeAnnotation", "decorators"], - builder: ["properties"], - aliases: ["Pattern", "PatternLike", "LVal"], - fields: Object.assign({}, _core.patternLikeCommon, { - properties: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty"))) - } - }) -}); -(0, _utils.default)("SpreadElement", { - visitor: ["argument"], - aliases: ["UnaryLike"], - deprecatedAlias: "SpreadProperty", - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("Super", { - aliases: ["Expression"] -}); -(0, _utils.default)("TaggedTemplateExpression", { - visitor: ["tag", "quasi"], - aliases: ["Expression"], - fields: { - tag: { - validate: (0, _utils.assertNodeType)("Expression") - }, - quasi: { - validate: (0, _utils.assertNodeType)("TemplateLiteral") - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("TemplateElement", { - builder: ["value", "tail"], - fields: { - value: { - validate: (0, _utils.assertShape)({ - raw: { - validate: (0, _utils.assertValueType)("string") - }, - cooked: { - validate: (0, _utils.assertValueType)("string"), - optional: true - } - }) - }, - tail: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - } - } -}); -(0, _utils.default)("TemplateLiteral", { - visitor: ["quasis", "expressions"], - aliases: ["Expression", "Literal"], - fields: { - quasis: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement"))) - }, - expressions: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) - } - } -}); -(0, _utils.default)("YieldExpression", { - builder: ["argument", "delegate"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - delegate: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - argument: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/experimental.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/experimental.js deleted file mode 100644 index 3332a600733963..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/experimental.js +++ /dev/null @@ -1,205 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _es = require("./es2015"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -(0, _utils.default)("ArgumentPlaceholder", {}); -(0, _utils.default)("AwaitExpression", { - builder: ["argument"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("BindExpression", { - visitor: ["object", "callee"], - aliases: ["Expression"], - fields: {} -}); -(0, _utils.default)("ClassProperty", { - visitor: ["key", "value", "typeAnnotation", "decorators"], - builder: ["key", "value", "typeAnnotation", "decorators", "computed"], - aliases: ["Property"], - fields: Object.assign({}, _es.classMethodOrPropertyCommon, { - value: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - definite: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - }, - readonly: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - } - }) -}); -(0, _utils.default)("OptionalMemberExpression", { - builder: ["object", "property", "computed", "optional"], - visitor: ["object", "property"], - aliases: ["Expression"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - property: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - computed: { - default: false - }, - optional: { - validate: (0, _utils.assertValueType)("boolean") - } - } -}); -(0, _utils.default)("PipelineTopicExpression", { - builder: ["expression"], - visitor: ["expression"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("PipelineBareFunction", { - builder: ["callee"], - visitor: ["callee"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("PipelinePrimaryTopicReference", { - aliases: ["Expression"] -}); -(0, _utils.default)("OptionalCallExpression", { - visitor: ["callee", "arguments", "typeParameters", "typeArguments"], - builder: ["callee", "arguments", "optional"], - aliases: ["Expression"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - }, - arguments: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName"))) - }, - optional: { - validate: (0, _utils.assertValueType)("boolean") - }, - typeArguments: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("ClassPrivateProperty", { - visitor: ["key", "value"], - builder: ["key", "value"], - aliases: ["Property", "Private"], - fields: { - key: { - validate: (0, _utils.assertNodeType)("PrivateName") - }, - value: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - } - } -}); -(0, _utils.default)("ClassPrivateMethod", { - builder: ["kind", "key", "params", "body", "static"], - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], - fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, { - key: { - validate: (0, _utils.assertNodeType)("PrivateName") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }) -}); -(0, _utils.default)("Import", { - aliases: ["Expression"] -}); -(0, _utils.default)("Decorator", { - visitor: ["expression"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("DoExpression", { - visitor: ["body"], - aliases: ["Expression"], - fields: { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - } -}); -(0, _utils.default)("ExportDefaultSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ExportNamespaceSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("PrivateName", { - visitor: ["id"], - aliases: ["Private"], - fields: { - id: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("BigIntLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/flow.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/flow.js deleted file mode 100644 index 07db5e38323cf5..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/flow.js +++ /dev/null @@ -1,386 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => { - (0, _utils.default)(name, { - builder: ["id", "typeParameters", "extends", "body"], - visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)(typeParameterType), - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), - body: (0, _utils.validateType)("ObjectTypeAnnotation") - } - }); -}; - -(0, _utils.default)("AnyTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ArrayTypeAnnotation", { - visitor: ["elementType"], - aliases: ["Flow", "FlowType"], - fields: { - elementType: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("BooleanTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("BooleanLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("NullLiteralTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ClassImplements", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -defineInterfaceishType("DeclareClass"); -(0, _utils.default)("DeclareFunction", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") - } -}); -defineInterfaceishType("DeclareInterface"); -(0, _utils.default)("DeclareModule", { - builder: ["id", "body", "kind"], - visitor: ["id", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - body: (0, _utils.validateType)("BlockStatement"), - kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) - } -}); -(0, _utils.default)("DeclareModuleExports", { - visitor: ["typeAnnotation"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - typeAnnotation: (0, _utils.validateType)("TypeAnnotation") - } -}); -(0, _utils.default)("DeclareTypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - right: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("DeclareOpaqueType", { - visitor: ["id", "typeParameters", "supertype"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - supertype: (0, _utils.validateOptionalType)("FlowType") - } -}); -(0, _utils.default)("DeclareVariable", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier") - } -}); -(0, _utils.default)("DeclareExportDeclaration", { - visitor: ["declaration", "specifiers", "source"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - declaration: (0, _utils.validateOptionalType)("Flow"), - specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), - source: (0, _utils.validateOptionalType)("StringLiteral"), - default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("DeclareExportAllDeclaration", { - visitor: ["source"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - source: (0, _utils.validateType)("StringLiteral"), - exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) - } -}); -(0, _utils.default)("DeclaredPredicate", { - visitor: ["value"], - aliases: ["Flow", "FlowPredicate"], - fields: { - value: (0, _utils.validateType)("Flow") - } -}); -(0, _utils.default)("ExistsTypeAnnotation", { - aliases: ["Flow", "FlowType"] -}); -(0, _utils.default)("FunctionTypeAnnotation", { - visitor: ["typeParameters", "params", "rest", "returnType"], - aliases: ["Flow", "FlowType"], - fields: { - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), - rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), - returnType: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("FunctionTypeParam", { - visitor: ["name", "typeAnnotation"], - aliases: ["Flow"], - fields: { - name: (0, _utils.validateOptionalType)("Identifier"), - typeAnnotation: (0, _utils.validateType)("FlowType"), - optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("GenericTypeAnnotation", { - visitor: ["id", "typeParameters"], - aliases: ["Flow", "FlowType"], - fields: { - id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -(0, _utils.default)("InferredPredicate", { - aliases: ["Flow", "FlowPredicate"] -}); -(0, _utils.default)("InterfaceExtends", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -defineInterfaceishType("InterfaceDeclaration"); -(0, _utils.default)("InterfaceTypeAnnotation", { - visitor: ["extends", "body"], - aliases: ["Flow", "FlowType"], - fields: { - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - body: (0, _utils.validateType)("ObjectTypeAnnotation") - } -}); -(0, _utils.default)("IntersectionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("MixedTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("EmptyTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("NullableTypeAnnotation", { - visitor: ["typeAnnotation"], - aliases: ["Flow", "FlowType"], - fields: { - typeAnnotation: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("NumberLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("number")) - } -}); -(0, _utils.default)("NumberTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ObjectTypeAnnotation", { - visitor: ["properties", "indexers", "callProperties", "internalSlots"], - aliases: ["Flow", "FlowType"], - builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], - fields: { - properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), - indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), - callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), - internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")), - exact: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("ObjectTypeInternalSlot", { - visitor: ["id", "value", "optional", "static", "method"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - id: (0, _utils.validateType)("Identifier"), - value: (0, _utils.validateType)("FlowType"), - optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("ObjectTypeCallProperty", { - visitor: ["value"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - value: (0, _utils.validateType)("FlowType"), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("ObjectTypeIndexer", { - visitor: ["id", "key", "value", "variance"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - id: (0, _utils.validateOptionalType)("Identifier"), - key: (0, _utils.validateType)("FlowType"), - value: (0, _utils.validateType)("FlowType"), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("ObjectTypeProperty", { - visitor: ["key", "value", "variance"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - value: (0, _utils.validateType)("FlowType"), - kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("ObjectTypeSpreadProperty", { - visitor: ["argument"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - argument: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("OpaqueType", { - visitor: ["id", "typeParameters", "supertype", "impltype"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - supertype: (0, _utils.validateOptionalType)("FlowType"), - impltype: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("QualifiedTypeIdentifier", { - visitor: ["id", "qualification"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)("Identifier"), - qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) - } -}); -(0, _utils.default)("StringLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("string")) - } -}); -(0, _utils.default)("StringTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ThisTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("TupleTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("TypeofTypeAnnotation", { - visitor: ["argument"], - aliases: ["Flow", "FlowType"], - fields: { - argument: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - right: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeAnnotation", { - aliases: ["Flow"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeCastExpression", { - visitor: ["expression", "typeAnnotation"], - aliases: ["Flow", "ExpressionWrapper", "Expression"], - fields: { - expression: (0, _utils.validateType)("Expression"), - typeAnnotation: (0, _utils.validateType)("TypeAnnotation") - } -}); -(0, _utils.default)("TypeParameter", { - aliases: ["Flow"], - visitor: ["bound", "default", "variance"], - fields: { - name: (0, _utils.validate)((0, _utils.assertValueType)("string")), - bound: (0, _utils.validateOptionalType)("TypeAnnotation"), - default: (0, _utils.validateOptionalType)("FlowType"), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("TypeParameterDeclaration", { - aliases: ["Flow"], - visitor: ["params"], - fields: { - params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) - } -}); -(0, _utils.default)("TypeParameterInstantiation", { - aliases: ["Flow"], - visitor: ["params"], - fields: { - params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("UnionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("Variance", { - aliases: ["Flow"], - builder: ["kind"], - fields: { - kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) - } -}); -(0, _utils.default)("VoidTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/index.js deleted file mode 100644 index 7f28569f508e8f..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/index.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "VISITOR_KEYS", { - enumerable: true, - get: function () { - return _utils.VISITOR_KEYS; - } -}); -Object.defineProperty(exports, "ALIAS_KEYS", { - enumerable: true, - get: function () { - return _utils.ALIAS_KEYS; - } -}); -Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", { - enumerable: true, - get: function () { - return _utils.FLIPPED_ALIAS_KEYS; - } -}); -Object.defineProperty(exports, "NODE_FIELDS", { - enumerable: true, - get: function () { - return _utils.NODE_FIELDS; - } -}); -Object.defineProperty(exports, "BUILDER_KEYS", { - enumerable: true, - get: function () { - return _utils.BUILDER_KEYS; - } -}); -Object.defineProperty(exports, "DEPRECATED_KEYS", { - enumerable: true, - get: function () { - return _utils.DEPRECATED_KEYS; - } -}); -Object.defineProperty(exports, "PLACEHOLDERS", { - enumerable: true, - get: function () { - return _placeholders.PLACEHOLDERS; - } -}); -Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", { - enumerable: true, - get: function () { - return _placeholders.PLACEHOLDERS_ALIAS; - } -}); -Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", { - enumerable: true, - get: function () { - return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS; - } -}); -exports.TYPES = void 0; - -function _toFastProperties() { - const data = _interopRequireDefault(require("to-fast-properties")); - - _toFastProperties = function () { - return data; - }; - - return data; -} - -require("./core"); - -require("./es2015"); - -require("./flow"); - -require("./jsx"); - -require("./misc"); - -require("./experimental"); - -require("./typescript"); - -var _utils = require("./utils"); - -var _placeholders = require("./placeholders"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _toFastProperties().default)(_utils.VISITOR_KEYS); -(0, _toFastProperties().default)(_utils.ALIAS_KEYS); -(0, _toFastProperties().default)(_utils.FLIPPED_ALIAS_KEYS); -(0, _toFastProperties().default)(_utils.NODE_FIELDS); -(0, _toFastProperties().default)(_utils.BUILDER_KEYS); -(0, _toFastProperties().default)(_utils.DEPRECATED_KEYS); -(0, _toFastProperties().default)(_placeholders.PLACEHOLDERS_ALIAS); -(0, _toFastProperties().default)(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); -const TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS)); -exports.TYPES = TYPES; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/misc.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/misc.js deleted file mode 100644 index ecc4db67ff1a55..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/misc.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _placeholders = require("./placeholders"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -(0, _utils.default)("Noop", { - visitor: [] -}); -(0, _utils.default)("Placeholder", { - visitor: [], - builder: ["expectedNode", "name"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - expectedNode: { - validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) - } - } -}); \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/typescript.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/typescript.js deleted file mode 100644 index 4d9be114a5d88c..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/typescript.js +++ /dev/null @@ -1,412 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _core = require("./core"); - -var _es = require("./es2015"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const bool = (0, _utils.assertValueType)("boolean"); -const tSFunctionTypeAnnotationCommon = { - returnType: { - validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), - optional: true - } -}; -(0, _utils.default)("TSParameterProperty", { - aliases: ["LVal"], - visitor: ["parameter"], - fields: { - accessibility: { - validate: (0, _utils.assertOneOf)("public", "private", "protected"), - optional: true - }, - readonly: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - parameter: { - validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") - } - } -}); -(0, _utils.default)("TSDeclareFunction", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "params", "returnType"], - fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon) -}); -(0, _utils.default)("TSDeclareMethod", { - visitor: ["decorators", "key", "typeParameters", "params", "returnType"], - fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon) -}); -(0, _utils.default)("TSQualifiedName", { - aliases: ["TSEntityName"], - visitor: ["left", "right"], - fields: { - left: (0, _utils.validateType)("TSEntityName"), - right: (0, _utils.validateType)("Identifier") - } -}); -const signatureDeclarationCommon = { - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") -}; -const callConstructSignatureDeclaration = { - aliases: ["TSTypeElement"], - visitor: ["typeParameters", "parameters", "typeAnnotation"], - fields: signatureDeclarationCommon -}; -(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration); -(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); -const namedTypeElementCommon = { - key: (0, _utils.validateType)("Expression"), - computed: (0, _utils.validate)(bool), - optional: (0, _utils.validateOptional)(bool) -}; -(0, _utils.default)("TSPropertySignature", { - aliases: ["TSTypeElement"], - visitor: ["key", "typeAnnotation", "initializer"], - fields: Object.assign({}, namedTypeElementCommon, { - readonly: (0, _utils.validateOptional)(bool), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), - initializer: (0, _utils.validateOptionalType)("Expression") - }) -}); -(0, _utils.default)("TSMethodSignature", { - aliases: ["TSTypeElement"], - visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], - fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon) -}); -(0, _utils.default)("TSIndexSignature", { - aliases: ["TSTypeElement"], - visitor: ["parameters", "typeAnnotation"], - fields: { - readonly: (0, _utils.validateOptional)(bool), - parameters: (0, _utils.validateArrayOfType)("Identifier"), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") - } -}); -const tsKeywordTypes = ["TSAnyKeyword", "TSUnknownKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSBooleanKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSVoidKeyword", "TSUndefinedKeyword", "TSNullKeyword", "TSNeverKeyword"]; - -for (const type of tsKeywordTypes) { - (0, _utils.default)(type, { - aliases: ["TSType"], - visitor: [], - fields: {} - }); -} - -(0, _utils.default)("TSThisType", { - aliases: ["TSType"], - visitor: [], - fields: {} -}); -const fnOrCtr = { - aliases: ["TSType"], - visitor: ["typeParameters", "parameters", "typeAnnotation"], - fields: signatureDeclarationCommon -}; -(0, _utils.default)("TSFunctionType", fnOrCtr); -(0, _utils.default)("TSConstructorType", fnOrCtr); -(0, _utils.default)("TSTypeReference", { - aliases: ["TSType"], - visitor: ["typeName", "typeParameters"], - fields: { - typeName: (0, _utils.validateType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSTypePredicate", { - aliases: ["TSType"], - visitor: ["parameterName", "typeAnnotation"], - fields: { - parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), - typeAnnotation: (0, _utils.validateType)("TSTypeAnnotation") - } -}); -(0, _utils.default)("TSTypeQuery", { - aliases: ["TSType"], - visitor: ["exprName"], - fields: { - exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]) - } -}); -(0, _utils.default)("TSTypeLiteral", { - aliases: ["TSType"], - visitor: ["members"], - fields: { - members: (0, _utils.validateArrayOfType)("TSTypeElement") - } -}); -(0, _utils.default)("TSArrayType", { - aliases: ["TSType"], - visitor: ["elementType"], - fields: { - elementType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTupleType", { - aliases: ["TSType"], - visitor: ["elementTypes"], - fields: { - elementTypes: (0, _utils.validateArrayOfType)("TSType") - } -}); -(0, _utils.default)("TSOptionalType", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSRestType", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -const unionOrIntersection = { - aliases: ["TSType"], - visitor: ["types"], - fields: { - types: (0, _utils.validateArrayOfType)("TSType") - } -}; -(0, _utils.default)("TSUnionType", unionOrIntersection); -(0, _utils.default)("TSIntersectionType", unionOrIntersection); -(0, _utils.default)("TSConditionalType", { - aliases: ["TSType"], - visitor: ["checkType", "extendsType", "trueType", "falseType"], - fields: { - checkType: (0, _utils.validateType)("TSType"), - extendsType: (0, _utils.validateType)("TSType"), - trueType: (0, _utils.validateType)("TSType"), - falseType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSInferType", { - aliases: ["TSType"], - visitor: ["typeParameter"], - fields: { - typeParameter: (0, _utils.validateType)("TSTypeParameter") - } -}); -(0, _utils.default)("TSParenthesizedType", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTypeOperator", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSIndexedAccessType", { - aliases: ["TSType"], - visitor: ["objectType", "indexType"], - fields: { - objectType: (0, _utils.validateType)("TSType"), - indexType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSMappedType", { - aliases: ["TSType"], - visitor: ["typeParameter", "typeAnnotation"], - fields: { - readonly: (0, _utils.validateOptional)(bool), - typeParameter: (0, _utils.validateType)("TSTypeParameter"), - optional: (0, _utils.validateOptional)(bool), - typeAnnotation: (0, _utils.validateOptionalType)("TSType") - } -}); -(0, _utils.default)("TSLiteralType", { - aliases: ["TSType"], - visitor: ["literal"], - fields: { - literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral"]) - } -}); -(0, _utils.default)("TSExpressionWithTypeArguments", { - aliases: ["TSType"], - visitor: ["expression", "typeParameters"], - fields: { - expression: (0, _utils.validateType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSInterfaceDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "extends", "body"], - fields: { - declare: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), - body: (0, _utils.validateType)("TSInterfaceBody") - } -}); -(0, _utils.default)("TSInterfaceBody", { - visitor: ["body"], - fields: { - body: (0, _utils.validateArrayOfType)("TSTypeElement") - } -}); -(0, _utils.default)("TSTypeAliasDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "typeAnnotation"], - fields: { - declare: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSAsExpression", { - aliases: ["Expression"], - visitor: ["expression", "typeAnnotation"], - fields: { - expression: (0, _utils.validateType)("Expression"), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTypeAssertion", { - aliases: ["Expression"], - visitor: ["typeAnnotation", "expression"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType"), - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSEnumDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "members"], - fields: { - declare: (0, _utils.validateOptional)(bool), - const: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - members: (0, _utils.validateArrayOfType)("TSEnumMember"), - initializer: (0, _utils.validateOptionalType)("Expression") - } -}); -(0, _utils.default)("TSEnumMember", { - visitor: ["id", "initializer"], - fields: { - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - initializer: (0, _utils.validateOptionalType)("Expression") - } -}); -(0, _utils.default)("TSModuleDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "body"], - fields: { - declare: (0, _utils.validateOptional)(bool), - global: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) - } -}); -(0, _utils.default)("TSModuleBlock", { - aliases: ["Scopable", "Block", "BlockParent"], - visitor: ["body"], - fields: { - body: (0, _utils.validateArrayOfType)("Statement") - } -}); -(0, _utils.default)("TSImportType", { - aliases: ["TSType"], - visitor: ["argument", "qualifier", "typeParameters"], - fields: { - argument: (0, _utils.validateType)("StringLiteral"), - qualifier: (0, _utils.validateOptionalType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSImportEqualsDeclaration", { - aliases: ["Statement"], - visitor: ["id", "moduleReference"], - fields: { - isExport: (0, _utils.validate)(bool), - id: (0, _utils.validateType)("Identifier"), - moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]) - } -}); -(0, _utils.default)("TSExternalModuleReference", { - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("StringLiteral") - } -}); -(0, _utils.default)("TSNonNullExpression", { - aliases: ["Expression"], - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSExportAssignment", { - aliases: ["Statement"], - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSNamespaceExportDeclaration", { - aliases: ["Statement"], - visitor: ["id"], - fields: { - id: (0, _utils.validateType)("Identifier") - } -}); -(0, _utils.default)("TSTypeAnnotation", { - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TSType") - } - } -}); -(0, _utils.default)("TSTypeParameterInstantiation", { - visitor: ["params"], - fields: { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) - } - } -}); -(0, _utils.default)("TSTypeParameterDeclaration", { - visitor: ["params"], - fields: { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) - } - } -}); -(0, _utils.default)("TSTypeParameter", { - visitor: ["constraint", "default"], - fields: { - name: { - validate: (0, _utils.assertValueType)("string") - }, - constraint: { - validate: (0, _utils.assertNodeType)("TSType"), - optional: true - }, - default: { - validate: (0, _utils.assertNodeType)("TSType"), - optional: true - } - } -}); \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/utils.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/utils.js deleted file mode 100644 index 95ba9740c49588..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/utils.js +++ /dev/null @@ -1,249 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; -exports.typeIs = typeIs; -exports.validateType = validateType; -exports.validateOptional = validateOptional; -exports.validateOptionalType = validateOptionalType; -exports.arrayOf = arrayOf; -exports.arrayOfType = arrayOfType; -exports.validateArrayOfType = validateArrayOfType; -exports.assertEach = assertEach; -exports.assertOneOf = assertOneOf; -exports.assertNodeType = assertNodeType; -exports.assertNodeOrValueType = assertNodeOrValueType; -exports.assertValueType = assertValueType; -exports.assertShape = assertShape; -exports.chain = chain; -exports.default = defineType; -exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0; - -var _is = _interopRequireDefault(require("../validators/is")); - -var _validate = require("../validators/validate"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const VISITOR_KEYS = {}; -exports.VISITOR_KEYS = VISITOR_KEYS; -const ALIAS_KEYS = {}; -exports.ALIAS_KEYS = ALIAS_KEYS; -const FLIPPED_ALIAS_KEYS = {}; -exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; -const NODE_FIELDS = {}; -exports.NODE_FIELDS = NODE_FIELDS; -const BUILDER_KEYS = {}; -exports.BUILDER_KEYS = BUILDER_KEYS; -const DEPRECATED_KEYS = {}; -exports.DEPRECATED_KEYS = DEPRECATED_KEYS; - -function getType(val) { - if (Array.isArray(val)) { - return "array"; - } else if (val === null) { - return "null"; - } else if (val === undefined) { - return "undefined"; - } else { - return typeof val; - } -} - -function validate(validate) { - return { - validate - }; -} - -function typeIs(typeName) { - return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName); -} - -function validateType(typeName) { - return validate(typeIs(typeName)); -} - -function validateOptional(validate) { - return { - validate, - optional: true - }; -} - -function validateOptionalType(typeName) { - return { - validate: typeIs(typeName), - optional: true - }; -} - -function arrayOf(elementType) { - return chain(assertValueType("array"), assertEach(elementType)); -} - -function arrayOfType(typeName) { - return arrayOf(typeIs(typeName)); -} - -function validateArrayOfType(typeName) { - return validate(arrayOfType(typeName)); -} - -function assertEach(callback) { - function validator(node, key, val) { - if (!Array.isArray(val)) return; - - for (let i = 0; i < val.length; i++) { - callback(node, `${key}[${i}]`, val[i]); - } - } - - validator.each = callback; - return validator; -} - -function assertOneOf(...values) { - function validate(node, key, val) { - if (values.indexOf(val) < 0) { - throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`); - } - } - - validate.oneOf = values; - return validate; -} - -function assertNodeType(...types) { - function validate(node, key, val) { - let valid = false; - - for (const type of types) { - if ((0, _is.default)(type, val)) { - valid = true; - break; - } - } - - if (!valid) { - throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} ` + `but instead got ${JSON.stringify(val && val.type)}`); - } - } - - validate.oneOfNodeTypes = types; - return validate; -} - -function assertNodeOrValueType(...types) { - function validate(node, key, val) { - let valid = false; - - for (const type of types) { - if (getType(val) === type || (0, _is.default)(type, val)) { - valid = true; - break; - } - } - - if (!valid) { - throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} ` + `but instead got ${JSON.stringify(val && val.type)}`); - } - } - - validate.oneOfNodeOrValueTypes = types; - return validate; -} - -function assertValueType(type) { - function validate(node, key, val) { - const valid = getType(val) === type; - - if (!valid) { - throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`); - } - } - - validate.type = type; - return validate; -} - -function assertShape(shape) { - function validate(node, key, val) { - const errors = []; - - for (const property of Object.keys(shape)) { - try { - (0, _validate.validateField)(node, property, val[property], shape[property]); - } catch (error) { - if (error instanceof TypeError) { - errors.push(error.message); - continue; - } - - throw error; - } - } - - if (errors.length) { - throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`); - } - } - - validate.shapeOf = shape; - return validate; -} - -function chain(...fns) { - function validate(...args) { - for (const fn of fns) { - fn(...args); - } - } - - validate.chainOf = fns; - return validate; -} - -function defineType(type, opts = {}) { - const inherits = opts.inherits && store[opts.inherits] || {}; - const fields = opts.fields || inherits.fields || {}; - const visitor = opts.visitor || inherits.visitor || []; - const aliases = opts.aliases || inherits.aliases || []; - const builder = opts.builder || inherits.builder || opts.visitor || []; - - if (opts.deprecatedAlias) { - DEPRECATED_KEYS[opts.deprecatedAlias] = type; - } - - for (const key of visitor.concat(builder)) { - fields[key] = fields[key] || {}; - } - - for (const key of Object.keys(fields)) { - const field = fields[key]; - - if (builder.indexOf(key) === -1) { - field.optional = true; - } - - if (field.default === undefined) { - field.default = null; - } else if (!field.validate) { - field.validate = assertValueType(getType(field.default)); - } - } - - VISITOR_KEYS[type] = opts.visitor = visitor; - BUILDER_KEYS[type] = opts.builder = builder; - NODE_FIELDS[type] = opts.fields = fields; - ALIAS_KEYS[type] = opts.aliases = aliases; - aliases.forEach(alias => { - FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; - FLIPPED_ALIAS_KEYS[alias].push(type); - }); - store[type] = opts; -} - -const store = {}; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js deleted file mode 100644 index f5bb66b0aaa149..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js +++ /dev/null @@ -1,579 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _exportNames = { - react: true, - assertNode: true, - createTypeAnnotationBasedOnTypeof: true, - createUnionTypeAnnotation: true, - cloneNode: true, - clone: true, - cloneDeep: true, - cloneWithoutLoc: true, - addComment: true, - addComments: true, - inheritInnerComments: true, - inheritLeadingComments: true, - inheritsComments: true, - inheritTrailingComments: true, - removeComments: true, - ensureBlock: true, - toBindingIdentifierName: true, - toBlock: true, - toComputedKey: true, - toExpression: true, - toIdentifier: true, - toKeyAlias: true, - toSequenceExpression: true, - toStatement: true, - valueToNode: true, - appendToMemberExpression: true, - inherits: true, - prependToMemberExpression: true, - removeProperties: true, - removePropertiesDeep: true, - removeTypeDuplicates: true, - getBindingIdentifiers: true, - getOuterBindingIdentifiers: true, - traverse: true, - traverseFast: true, - shallowEqual: true, - is: true, - isBinding: true, - isBlockScoped: true, - isImmutable: true, - isLet: true, - isNode: true, - isNodesEquivalent: true, - isPlaceholderType: true, - isReferenced: true, - isScope: true, - isSpecifierDefault: true, - isType: true, - isValidES3Identifier: true, - isValidIdentifier: true, - isVar: true, - matchesPattern: true, - validate: true, - buildMatchMemberExpression: true -}; -Object.defineProperty(exports, "assertNode", { - enumerable: true, - get: function () { - return _assertNode.default; - } -}); -Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { - enumerable: true, - get: function () { - return _createTypeAnnotationBasedOnTypeof.default; - } -}); -Object.defineProperty(exports, "createUnionTypeAnnotation", { - enumerable: true, - get: function () { - return _createUnionTypeAnnotation.default; - } -}); -Object.defineProperty(exports, "cloneNode", { - enumerable: true, - get: function () { - return _cloneNode.default; - } -}); -Object.defineProperty(exports, "clone", { - enumerable: true, - get: function () { - return _clone.default; - } -}); -Object.defineProperty(exports, "cloneDeep", { - enumerable: true, - get: function () { - return _cloneDeep.default; - } -}); -Object.defineProperty(exports, "cloneWithoutLoc", { - enumerable: true, - get: function () { - return _cloneWithoutLoc.default; - } -}); -Object.defineProperty(exports, "addComment", { - enumerable: true, - get: function () { - return _addComment.default; - } -}); -Object.defineProperty(exports, "addComments", { - enumerable: true, - get: function () { - return _addComments.default; - } -}); -Object.defineProperty(exports, "inheritInnerComments", { - enumerable: true, - get: function () { - return _inheritInnerComments.default; - } -}); -Object.defineProperty(exports, "inheritLeadingComments", { - enumerable: true, - get: function () { - return _inheritLeadingComments.default; - } -}); -Object.defineProperty(exports, "inheritsComments", { - enumerable: true, - get: function () { - return _inheritsComments.default; - } -}); -Object.defineProperty(exports, "inheritTrailingComments", { - enumerable: true, - get: function () { - return _inheritTrailingComments.default; - } -}); -Object.defineProperty(exports, "removeComments", { - enumerable: true, - get: function () { - return _removeComments.default; - } -}); -Object.defineProperty(exports, "ensureBlock", { - enumerable: true, - get: function () { - return _ensureBlock.default; - } -}); -Object.defineProperty(exports, "toBindingIdentifierName", { - enumerable: true, - get: function () { - return _toBindingIdentifierName.default; - } -}); -Object.defineProperty(exports, "toBlock", { - enumerable: true, - get: function () { - return _toBlock.default; - } -}); -Object.defineProperty(exports, "toComputedKey", { - enumerable: true, - get: function () { - return _toComputedKey.default; - } -}); -Object.defineProperty(exports, "toExpression", { - enumerable: true, - get: function () { - return _toExpression.default; - } -}); -Object.defineProperty(exports, "toIdentifier", { - enumerable: true, - get: function () { - return _toIdentifier.default; - } -}); -Object.defineProperty(exports, "toKeyAlias", { - enumerable: true, - get: function () { - return _toKeyAlias.default; - } -}); -Object.defineProperty(exports, "toSequenceExpression", { - enumerable: true, - get: function () { - return _toSequenceExpression.default; - } -}); -Object.defineProperty(exports, "toStatement", { - enumerable: true, - get: function () { - return _toStatement.default; - } -}); -Object.defineProperty(exports, "valueToNode", { - enumerable: true, - get: function () { - return _valueToNode.default; - } -}); -Object.defineProperty(exports, "appendToMemberExpression", { - enumerable: true, - get: function () { - return _appendToMemberExpression.default; - } -}); -Object.defineProperty(exports, "inherits", { - enumerable: true, - get: function () { - return _inherits.default; - } -}); -Object.defineProperty(exports, "prependToMemberExpression", { - enumerable: true, - get: function () { - return _prependToMemberExpression.default; - } -}); -Object.defineProperty(exports, "removeProperties", { - enumerable: true, - get: function () { - return _removeProperties.default; - } -}); -Object.defineProperty(exports, "removePropertiesDeep", { - enumerable: true, - get: function () { - return _removePropertiesDeep.default; - } -}); -Object.defineProperty(exports, "removeTypeDuplicates", { - enumerable: true, - get: function () { - return _removeTypeDuplicates.default; - } -}); -Object.defineProperty(exports, "getBindingIdentifiers", { - enumerable: true, - get: function () { - return _getBindingIdentifiers.default; - } -}); -Object.defineProperty(exports, "getOuterBindingIdentifiers", { - enumerable: true, - get: function () { - return _getOuterBindingIdentifiers.default; - } -}); -Object.defineProperty(exports, "traverse", { - enumerable: true, - get: function () { - return _traverse.default; - } -}); -Object.defineProperty(exports, "traverseFast", { - enumerable: true, - get: function () { - return _traverseFast.default; - } -}); -Object.defineProperty(exports, "shallowEqual", { - enumerable: true, - get: function () { - return _shallowEqual.default; - } -}); -Object.defineProperty(exports, "is", { - enumerable: true, - get: function () { - return _is.default; - } -}); -Object.defineProperty(exports, "isBinding", { - enumerable: true, - get: function () { - return _isBinding.default; - } -}); -Object.defineProperty(exports, "isBlockScoped", { - enumerable: true, - get: function () { - return _isBlockScoped.default; - } -}); -Object.defineProperty(exports, "isImmutable", { - enumerable: true, - get: function () { - return _isImmutable.default; - } -}); -Object.defineProperty(exports, "isLet", { - enumerable: true, - get: function () { - return _isLet.default; - } -}); -Object.defineProperty(exports, "isNode", { - enumerable: true, - get: function () { - return _isNode.default; - } -}); -Object.defineProperty(exports, "isNodesEquivalent", { - enumerable: true, - get: function () { - return _isNodesEquivalent.default; - } -}); -Object.defineProperty(exports, "isPlaceholderType", { - enumerable: true, - get: function () { - return _isPlaceholderType.default; - } -}); -Object.defineProperty(exports, "isReferenced", { - enumerable: true, - get: function () { - return _isReferenced.default; - } -}); -Object.defineProperty(exports, "isScope", { - enumerable: true, - get: function () { - return _isScope.default; - } -}); -Object.defineProperty(exports, "isSpecifierDefault", { - enumerable: true, - get: function () { - return _isSpecifierDefault.default; - } -}); -Object.defineProperty(exports, "isType", { - enumerable: true, - get: function () { - return _isType.default; - } -}); -Object.defineProperty(exports, "isValidES3Identifier", { - enumerable: true, - get: function () { - return _isValidES3Identifier.default; - } -}); -Object.defineProperty(exports, "isValidIdentifier", { - enumerable: true, - get: function () { - return _isValidIdentifier.default; - } -}); -Object.defineProperty(exports, "isVar", { - enumerable: true, - get: function () { - return _isVar.default; - } -}); -Object.defineProperty(exports, "matchesPattern", { - enumerable: true, - get: function () { - return _matchesPattern.default; - } -}); -Object.defineProperty(exports, "validate", { - enumerable: true, - get: function () { - return _validate.default; - } -}); -Object.defineProperty(exports, "buildMatchMemberExpression", { - enumerable: true, - get: function () { - return _buildMatchMemberExpression.default; - } -}); -exports.react = void 0; - -var _isReactComponent = _interopRequireDefault(require("./validators/react/isReactComponent")); - -var _isCompatTag = _interopRequireDefault(require("./validators/react/isCompatTag")); - -var _buildChildren = _interopRequireDefault(require("./builders/react/buildChildren")); - -var _assertNode = _interopRequireDefault(require("./asserts/assertNode")); - -var _generated = require("./asserts/generated"); - -Object.keys(_generated).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated[key]; - } - }); -}); - -var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(require("./builders/flow/createTypeAnnotationBasedOnTypeof")); - -var _createUnionTypeAnnotation = _interopRequireDefault(require("./builders/flow/createUnionTypeAnnotation")); - -var _generated2 = require("./builders/generated"); - -Object.keys(_generated2).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated2[key]; - } - }); -}); - -var _cloneNode = _interopRequireDefault(require("./clone/cloneNode")); - -var _clone = _interopRequireDefault(require("./clone/clone")); - -var _cloneDeep = _interopRequireDefault(require("./clone/cloneDeep")); - -var _cloneWithoutLoc = _interopRequireDefault(require("./clone/cloneWithoutLoc")); - -var _addComment = _interopRequireDefault(require("./comments/addComment")); - -var _addComments = _interopRequireDefault(require("./comments/addComments")); - -var _inheritInnerComments = _interopRequireDefault(require("./comments/inheritInnerComments")); - -var _inheritLeadingComments = _interopRequireDefault(require("./comments/inheritLeadingComments")); - -var _inheritsComments = _interopRequireDefault(require("./comments/inheritsComments")); - -var _inheritTrailingComments = _interopRequireDefault(require("./comments/inheritTrailingComments")); - -var _removeComments = _interopRequireDefault(require("./comments/removeComments")); - -var _generated3 = require("./constants/generated"); - -Object.keys(_generated3).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated3[key]; - } - }); -}); - -var _constants = require("./constants"); - -Object.keys(_constants).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _constants[key]; - } - }); -}); - -var _ensureBlock = _interopRequireDefault(require("./converters/ensureBlock")); - -var _toBindingIdentifierName = _interopRequireDefault(require("./converters/toBindingIdentifierName")); - -var _toBlock = _interopRequireDefault(require("./converters/toBlock")); - -var _toComputedKey = _interopRequireDefault(require("./converters/toComputedKey")); - -var _toExpression = _interopRequireDefault(require("./converters/toExpression")); - -var _toIdentifier = _interopRequireDefault(require("./converters/toIdentifier")); - -var _toKeyAlias = _interopRequireDefault(require("./converters/toKeyAlias")); - -var _toSequenceExpression = _interopRequireDefault(require("./converters/toSequenceExpression")); - -var _toStatement = _interopRequireDefault(require("./converters/toStatement")); - -var _valueToNode = _interopRequireDefault(require("./converters/valueToNode")); - -var _definitions = require("./definitions"); - -Object.keys(_definitions).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _definitions[key]; - } - }); -}); - -var _appendToMemberExpression = _interopRequireDefault(require("./modifications/appendToMemberExpression")); - -var _inherits = _interopRequireDefault(require("./modifications/inherits")); - -var _prependToMemberExpression = _interopRequireDefault(require("./modifications/prependToMemberExpression")); - -var _removeProperties = _interopRequireDefault(require("./modifications/removeProperties")); - -var _removePropertiesDeep = _interopRequireDefault(require("./modifications/removePropertiesDeep")); - -var _removeTypeDuplicates = _interopRequireDefault(require("./modifications/flow/removeTypeDuplicates")); - -var _getBindingIdentifiers = _interopRequireDefault(require("./retrievers/getBindingIdentifiers")); - -var _getOuterBindingIdentifiers = _interopRequireDefault(require("./retrievers/getOuterBindingIdentifiers")); - -var _traverse = _interopRequireDefault(require("./traverse/traverse")); - -var _traverseFast = _interopRequireDefault(require("./traverse/traverseFast")); - -var _shallowEqual = _interopRequireDefault(require("./utils/shallowEqual")); - -var _is = _interopRequireDefault(require("./validators/is")); - -var _isBinding = _interopRequireDefault(require("./validators/isBinding")); - -var _isBlockScoped = _interopRequireDefault(require("./validators/isBlockScoped")); - -var _isImmutable = _interopRequireDefault(require("./validators/isImmutable")); - -var _isLet = _interopRequireDefault(require("./validators/isLet")); - -var _isNode = _interopRequireDefault(require("./validators/isNode")); - -var _isNodesEquivalent = _interopRequireDefault(require("./validators/isNodesEquivalent")); - -var _isPlaceholderType = _interopRequireDefault(require("./validators/isPlaceholderType")); - -var _isReferenced = _interopRequireDefault(require("./validators/isReferenced")); - -var _isScope = _interopRequireDefault(require("./validators/isScope")); - -var _isSpecifierDefault = _interopRequireDefault(require("./validators/isSpecifierDefault")); - -var _isType = _interopRequireDefault(require("./validators/isType")); - -var _isValidES3Identifier = _interopRequireDefault(require("./validators/isValidES3Identifier")); - -var _isValidIdentifier = _interopRequireDefault(require("./validators/isValidIdentifier")); - -var _isVar = _interopRequireDefault(require("./validators/isVar")); - -var _matchesPattern = _interopRequireDefault(require("./validators/matchesPattern")); - -var _validate = _interopRequireDefault(require("./validators/validate")); - -var _buildMatchMemberExpression = _interopRequireDefault(require("./validators/buildMatchMemberExpression")); - -var _generated4 = require("./validators/generated"); - -Object.keys(_generated4).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated4[key]; - } - }); -}); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const react = { - isReactComponent: _isReactComponent.default, - isCompatTag: _isCompatTag.default, - buildChildren: _buildChildren.default -}; -exports.react = react; \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js.flow b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js.flow deleted file mode 100644 index c7e80a15fdb1a2..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js.flow +++ /dev/null @@ -1,1975 +0,0 @@ -// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/flow.js for script used. - -declare class BabelNodeComment { - value: string; - start: number; - end: number; - loc: BabelNodeSourceLocation; -} - -declare class BabelNodeCommentBlock extends BabelNodeComment { - type: "CommentBlock"; -} - -declare class BabelNodeCommentLine extends BabelNodeComment { - type: "CommentLine"; -} - -declare class BabelNodeSourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -declare class BabelNode { - leadingComments?: Array; - innerComments?: Array; - trailingComments?: Array; - start: ?number; - end: ?number; - loc: ?BabelNodeSourceLocation; -} - -declare class BabelNodeArrayExpression extends BabelNode { - type: "ArrayExpression"; - elements?: Array; -} - -declare class BabelNodeAssignmentExpression extends BabelNode { - type: "AssignmentExpression"; - operator: string; - left: BabelNodeLVal; - right: BabelNodeExpression; -} - -declare class BabelNodeBinaryExpression extends BabelNode { - type: "BinaryExpression"; - operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; - left: BabelNodeExpression; - right: BabelNodeExpression; -} - -declare class BabelNodeInterpreterDirective extends BabelNode { - type: "InterpreterDirective"; - value: string; -} - -declare class BabelNodeDirective extends BabelNode { - type: "Directive"; - value: BabelNodeDirectiveLiteral; -} - -declare class BabelNodeDirectiveLiteral extends BabelNode { - type: "DirectiveLiteral"; - value: string; -} - -declare class BabelNodeBlockStatement extends BabelNode { - type: "BlockStatement"; - body: Array; - directives?: Array; -} - -declare class BabelNodeBreakStatement extends BabelNode { - type: "BreakStatement"; - label?: BabelNodeIdentifier; -} - -declare class BabelNodeCallExpression extends BabelNode { - type: "CallExpression"; - callee: BabelNodeExpression; - arguments: Array; - optional?: true | false; - typeArguments?: BabelNodeTypeParameterInstantiation; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeCatchClause extends BabelNode { - type: "CatchClause"; - param?: BabelNodeIdentifier; - body: BabelNodeBlockStatement; -} - -declare class BabelNodeConditionalExpression extends BabelNode { - type: "ConditionalExpression"; - test: BabelNodeExpression; - consequent: BabelNodeExpression; - alternate: BabelNodeExpression; -} - -declare class BabelNodeContinueStatement extends BabelNode { - type: "ContinueStatement"; - label?: BabelNodeIdentifier; -} - -declare class BabelNodeDebuggerStatement extends BabelNode { - type: "DebuggerStatement"; -} - -declare class BabelNodeDoWhileStatement extends BabelNode { - type: "DoWhileStatement"; - test: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeEmptyStatement extends BabelNode { - type: "EmptyStatement"; -} - -declare class BabelNodeExpressionStatement extends BabelNode { - type: "ExpressionStatement"; - expression: BabelNodeExpression; -} - -declare class BabelNodeFile extends BabelNode { - type: "File"; - program: BabelNodeProgram; - comments: any; - tokens: any; -} - -declare class BabelNodeForInStatement extends BabelNode { - type: "ForInStatement"; - left: BabelNodeVariableDeclaration | BabelNodeLVal; - right: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeForStatement extends BabelNode { - type: "ForStatement"; - init?: BabelNodeVariableDeclaration | BabelNodeExpression; - test?: BabelNodeExpression; - update?: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeFunctionDeclaration extends BabelNode { - type: "FunctionDeclaration"; - id?: BabelNodeIdentifier; - params: Array; - body: BabelNodeBlockStatement; - generator?: boolean; - async?: boolean; - declare?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeFunctionExpression extends BabelNode { - type: "FunctionExpression"; - id?: BabelNodeIdentifier; - params: Array; - body: BabelNodeBlockStatement; - generator?: boolean; - async?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeIdentifier extends BabelNode { - type: "Identifier"; - name: string; - decorators?: Array; - optional?: boolean; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeIfStatement extends BabelNode { - type: "IfStatement"; - test: BabelNodeExpression; - consequent: BabelNodeStatement; - alternate?: BabelNodeStatement; -} - -declare class BabelNodeLabeledStatement extends BabelNode { - type: "LabeledStatement"; - label: BabelNodeIdentifier; - body: BabelNodeStatement; -} - -declare class BabelNodeStringLiteral extends BabelNode { - type: "StringLiteral"; - value: string; -} - -declare class BabelNodeNumericLiteral extends BabelNode { - type: "NumericLiteral"; - value: number; -} - -declare class BabelNodeNullLiteral extends BabelNode { - type: "NullLiteral"; -} - -declare class BabelNodeBooleanLiteral extends BabelNode { - type: "BooleanLiteral"; - value: boolean; -} - -declare class BabelNodeRegExpLiteral extends BabelNode { - type: "RegExpLiteral"; - pattern: string; - flags?: string; -} - -declare class BabelNodeLogicalExpression extends BabelNode { - type: "LogicalExpression"; - operator: "||" | "&&" | "??"; - left: BabelNodeExpression; - right: BabelNodeExpression; -} - -declare class BabelNodeMemberExpression extends BabelNode { - type: "MemberExpression"; - object: BabelNodeExpression; - property: any; - computed?: boolean; - optional?: true | false; -} - -declare class BabelNodeNewExpression extends BabelNode { - type: "NewExpression"; - callee: BabelNodeExpression; - arguments: Array; - optional?: true | false; - typeArguments?: BabelNodeTypeParameterInstantiation; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeProgram extends BabelNode { - type: "Program"; - body: Array; - directives?: Array; - sourceType?: "script" | "module"; - interpreter?: BabelNodeInterpreterDirective; - sourceFile?: string; -} - -declare class BabelNodeObjectExpression extends BabelNode { - type: "ObjectExpression"; - properties: Array; -} - -declare class BabelNodeObjectMethod extends BabelNode { - type: "ObjectMethod"; - kind?: "method" | "get" | "set"; - key: any; - params: Array; - body: BabelNodeBlockStatement; - computed?: boolean; - async?: boolean; - decorators?: Array; - generator?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeObjectProperty extends BabelNode { - type: "ObjectProperty"; - key: any; - value: BabelNodeExpression | BabelNodePatternLike; - computed?: boolean; - shorthand?: boolean; - decorators?: Array; -} - -declare class BabelNodeRestElement extends BabelNode { - type: "RestElement"; - argument: BabelNodeLVal; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeReturnStatement extends BabelNode { - type: "ReturnStatement"; - argument?: BabelNodeExpression; -} - -declare class BabelNodeSequenceExpression extends BabelNode { - type: "SequenceExpression"; - expressions: Array; -} - -declare class BabelNodeParenthesizedExpression extends BabelNode { - type: "ParenthesizedExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodeSwitchCase extends BabelNode { - type: "SwitchCase"; - test?: BabelNodeExpression; - consequent: Array; -} - -declare class BabelNodeSwitchStatement extends BabelNode { - type: "SwitchStatement"; - discriminant: BabelNodeExpression; - cases: Array; -} - -declare class BabelNodeThisExpression extends BabelNode { - type: "ThisExpression"; -} - -declare class BabelNodeThrowStatement extends BabelNode { - type: "ThrowStatement"; - argument: BabelNodeExpression; -} - -declare class BabelNodeTryStatement extends BabelNode { - type: "TryStatement"; - block: BabelNodeBlockStatement; - handler?: BabelNodeCatchClause; - finalizer?: BabelNodeBlockStatement; -} - -declare class BabelNodeUnaryExpression extends BabelNode { - type: "UnaryExpression"; - operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; - argument: BabelNodeExpression; - prefix?: boolean; -} - -declare class BabelNodeUpdateExpression extends BabelNode { - type: "UpdateExpression"; - operator: "++" | "--"; - argument: BabelNodeExpression; - prefix?: boolean; -} - -declare class BabelNodeVariableDeclaration extends BabelNode { - type: "VariableDeclaration"; - kind: "var" | "let" | "const"; - declarations: Array; - declare?: boolean; -} - -declare class BabelNodeVariableDeclarator extends BabelNode { - type: "VariableDeclarator"; - id: BabelNodeLVal; - init?: BabelNodeExpression; - definite?: boolean; -} - -declare class BabelNodeWhileStatement extends BabelNode { - type: "WhileStatement"; - test: BabelNodeExpression; - body: BabelNodeBlockStatement | BabelNodeStatement; -} - -declare class BabelNodeWithStatement extends BabelNode { - type: "WithStatement"; - object: BabelNodeExpression; - body: BabelNodeBlockStatement | BabelNodeStatement; -} - -declare class BabelNodeAssignmentPattern extends BabelNode { - type: "AssignmentPattern"; - left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression; - right: BabelNodeExpression; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeArrayPattern extends BabelNode { - type: "ArrayPattern"; - elements: Array; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeArrowFunctionExpression extends BabelNode { - type: "ArrowFunctionExpression"; - params: Array; - body: BabelNodeBlockStatement | BabelNodeExpression; - async?: boolean; - expression?: boolean; - generator?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeClassBody extends BabelNode { - type: "ClassBody"; - body: Array; -} - -declare class BabelNodeClassDeclaration extends BabelNode { - type: "ClassDeclaration"; - id?: BabelNodeIdentifier; - superClass?: BabelNodeExpression; - body: BabelNodeClassBody; - decorators?: Array; - abstract?: boolean; - declare?: boolean; - mixins?: any; - superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeClassExpression extends BabelNode { - type: "ClassExpression"; - id?: BabelNodeIdentifier; - superClass?: BabelNodeExpression; - body: BabelNodeClassBody; - decorators?: Array; - mixins?: any; - superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeExportAllDeclaration extends BabelNode { - type: "ExportAllDeclaration"; - source: BabelNodeStringLiteral; -} - -declare class BabelNodeExportDefaultDeclaration extends BabelNode { - type: "ExportDefaultDeclaration"; - declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression; -} - -declare class BabelNodeExportNamedDeclaration extends BabelNode { - type: "ExportNamedDeclaration"; - declaration?: BabelNodeDeclaration; - specifiers: Array; - source?: BabelNodeStringLiteral; - exportKind?: "type" | "value"; -} - -declare class BabelNodeExportSpecifier extends BabelNode { - type: "ExportSpecifier"; - local: BabelNodeIdentifier; - exported: BabelNodeIdentifier; -} - -declare class BabelNodeForOfStatement extends BabelNode { - type: "ForOfStatement"; - left: BabelNodeVariableDeclaration | BabelNodeLVal; - right: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeImportDeclaration extends BabelNode { - type: "ImportDeclaration"; - specifiers: Array; - source: BabelNodeStringLiteral; - importKind?: "type" | "typeof" | "value"; -} - -declare class BabelNodeImportDefaultSpecifier extends BabelNode { - type: "ImportDefaultSpecifier"; - local: BabelNodeIdentifier; -} - -declare class BabelNodeImportNamespaceSpecifier extends BabelNode { - type: "ImportNamespaceSpecifier"; - local: BabelNodeIdentifier; -} - -declare class BabelNodeImportSpecifier extends BabelNode { - type: "ImportSpecifier"; - local: BabelNodeIdentifier; - imported: BabelNodeIdentifier; - importKind?: "type" | "typeof"; -} - -declare class BabelNodeMetaProperty extends BabelNode { - type: "MetaProperty"; - meta: BabelNodeIdentifier; - property: BabelNodeIdentifier; -} - -declare class BabelNodeClassMethod extends BabelNode { - type: "ClassMethod"; - kind?: "get" | "set" | "method" | "constructor"; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - params: Array; - body: BabelNodeBlockStatement; - computed?: boolean; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - async?: boolean; - decorators?: Array; - generator?: boolean; - optional?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeObjectPattern extends BabelNode { - type: "ObjectPattern"; - properties: Array; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeSpreadElement extends BabelNode { - type: "SpreadElement"; - argument: BabelNodeExpression; -} - -declare class BabelNodeSuper extends BabelNode { - type: "Super"; -} - -declare class BabelNodeTaggedTemplateExpression extends BabelNode { - type: "TaggedTemplateExpression"; - tag: BabelNodeExpression; - quasi: BabelNodeTemplateLiteral; - typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTemplateElement extends BabelNode { - type: "TemplateElement"; - value: { raw: string, cooked?: string }; - tail?: boolean; -} - -declare class BabelNodeTemplateLiteral extends BabelNode { - type: "TemplateLiteral"; - quasis: Array; - expressions: Array; -} - -declare class BabelNodeYieldExpression extends BabelNode { - type: "YieldExpression"; - argument?: BabelNodeExpression; - delegate?: boolean; -} - -declare class BabelNodeAnyTypeAnnotation extends BabelNode { - type: "AnyTypeAnnotation"; -} - -declare class BabelNodeArrayTypeAnnotation extends BabelNode { - type: "ArrayTypeAnnotation"; - elementType: BabelNodeFlowType; -} - -declare class BabelNodeBooleanTypeAnnotation extends BabelNode { - type: "BooleanTypeAnnotation"; -} - -declare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode { - type: "BooleanLiteralTypeAnnotation"; - value: boolean; -} - -declare class BabelNodeNullLiteralTypeAnnotation extends BabelNode { - type: "NullLiteralTypeAnnotation"; -} - -declare class BabelNodeClassImplements extends BabelNode { - type: "ClassImplements"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeDeclareClass extends BabelNode { - type: "DeclareClass"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeDeclareFunction extends BabelNode { - type: "DeclareFunction"; - id: BabelNodeIdentifier; - predicate?: BabelNodeDeclaredPredicate; -} - -declare class BabelNodeDeclareInterface extends BabelNode { - type: "DeclareInterface"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeDeclareModule extends BabelNode { - type: "DeclareModule"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - body: BabelNodeBlockStatement; - kind?: "CommonJS" | "ES"; -} - -declare class BabelNodeDeclareModuleExports extends BabelNode { - type: "DeclareModuleExports"; - typeAnnotation: BabelNodeTypeAnnotation; -} - -declare class BabelNodeDeclareTypeAlias extends BabelNode { - type: "DeclareTypeAlias"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - right: BabelNodeFlowType; -} - -declare class BabelNodeDeclareOpaqueType extends BabelNode { - type: "DeclareOpaqueType"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - supertype?: BabelNodeFlowType; -} - -declare class BabelNodeDeclareVariable extends BabelNode { - type: "DeclareVariable"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeDeclareExportDeclaration extends BabelNode { - type: "DeclareExportDeclaration"; - declaration?: BabelNodeFlow; - specifiers?: Array; - source?: BabelNodeStringLiteral; -} - -declare class BabelNodeDeclareExportAllDeclaration extends BabelNode { - type: "DeclareExportAllDeclaration"; - source: BabelNodeStringLiteral; - exportKind?: "type" | "value"; -} - -declare class BabelNodeDeclaredPredicate extends BabelNode { - type: "DeclaredPredicate"; - value: BabelNodeFlow; -} - -declare class BabelNodeExistsTypeAnnotation extends BabelNode { - type: "ExistsTypeAnnotation"; -} - -declare class BabelNodeFunctionTypeAnnotation extends BabelNode { - type: "FunctionTypeAnnotation"; - typeParameters?: BabelNodeTypeParameterDeclaration; - params: Array; - rest?: BabelNodeFunctionTypeParam; - returnType: BabelNodeFlowType; -} - -declare class BabelNodeFunctionTypeParam extends BabelNode { - type: "FunctionTypeParam"; - name?: BabelNodeIdentifier; - typeAnnotation: BabelNodeFlowType; - optional?: boolean; -} - -declare class BabelNodeGenericTypeAnnotation extends BabelNode { - type: "GenericTypeAnnotation"; - id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeInferredPredicate extends BabelNode { - type: "InferredPredicate"; -} - -declare class BabelNodeInterfaceExtends extends BabelNode { - type: "InterfaceExtends"; - id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeInterfaceDeclaration extends BabelNode { - type: "InterfaceDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeInterfaceTypeAnnotation extends BabelNode { - type: "InterfaceTypeAnnotation"; - body: BabelNodeObjectTypeAnnotation; -} - -declare class BabelNodeIntersectionTypeAnnotation extends BabelNode { - type: "IntersectionTypeAnnotation"; - types: Array; -} - -declare class BabelNodeMixedTypeAnnotation extends BabelNode { - type: "MixedTypeAnnotation"; -} - -declare class BabelNodeEmptyTypeAnnotation extends BabelNode { - type: "EmptyTypeAnnotation"; -} - -declare class BabelNodeNullableTypeAnnotation extends BabelNode { - type: "NullableTypeAnnotation"; - typeAnnotation: BabelNodeFlowType; -} - -declare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode { - type: "NumberLiteralTypeAnnotation"; - value: number; -} - -declare class BabelNodeNumberTypeAnnotation extends BabelNode { - type: "NumberTypeAnnotation"; -} - -declare class BabelNodeObjectTypeAnnotation extends BabelNode { - type: "ObjectTypeAnnotation"; - properties: Array; - indexers?: Array; - callProperties?: Array; - internalSlots?: Array; - exact?: boolean; - inexact?: boolean; -} - -declare class BabelNodeObjectTypeInternalSlot extends BabelNode { - type: "ObjectTypeInternalSlot"; - id: BabelNodeIdentifier; - value: BabelNodeFlowType; - optional: boolean; - method: boolean; -} - -declare class BabelNodeObjectTypeCallProperty extends BabelNode { - type: "ObjectTypeCallProperty"; - value: BabelNodeFlowType; -} - -declare class BabelNodeObjectTypeIndexer extends BabelNode { - type: "ObjectTypeIndexer"; - id?: BabelNodeIdentifier; - key: BabelNodeFlowType; - value: BabelNodeFlowType; - variance?: BabelNodeVariance; -} - -declare class BabelNodeObjectTypeProperty extends BabelNode { - type: "ObjectTypeProperty"; - key: BabelNodeIdentifier | BabelNodeStringLiteral; - value: BabelNodeFlowType; - variance?: BabelNodeVariance; - kind?: "init" | "get" | "set"; - optional?: boolean; - proto?: boolean; -} - -declare class BabelNodeObjectTypeSpreadProperty extends BabelNode { - type: "ObjectTypeSpreadProperty"; - argument: BabelNodeFlowType; -} - -declare class BabelNodeOpaqueType extends BabelNode { - type: "OpaqueType"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - supertype?: BabelNodeFlowType; - impltype: BabelNodeFlowType; -} - -declare class BabelNodeQualifiedTypeIdentifier extends BabelNode { - type: "QualifiedTypeIdentifier"; - id: BabelNodeIdentifier; - qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; -} - -declare class BabelNodeStringLiteralTypeAnnotation extends BabelNode { - type: "StringLiteralTypeAnnotation"; - value: string; -} - -declare class BabelNodeStringTypeAnnotation extends BabelNode { - type: "StringTypeAnnotation"; -} - -declare class BabelNodeThisTypeAnnotation extends BabelNode { - type: "ThisTypeAnnotation"; -} - -declare class BabelNodeTupleTypeAnnotation extends BabelNode { - type: "TupleTypeAnnotation"; - types: Array; -} - -declare class BabelNodeTypeofTypeAnnotation extends BabelNode { - type: "TypeofTypeAnnotation"; - argument: BabelNodeFlowType; -} - -declare class BabelNodeTypeAlias extends BabelNode { - type: "TypeAlias"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - right: BabelNodeFlowType; -} - -declare class BabelNodeTypeAnnotation extends BabelNode { - type: "TypeAnnotation"; - typeAnnotation: BabelNodeFlowType; -} - -declare class BabelNodeTypeCastExpression extends BabelNode { - type: "TypeCastExpression"; - expression: BabelNodeExpression; - typeAnnotation: BabelNodeTypeAnnotation; -} - -declare class BabelNodeTypeParameter extends BabelNode { - type: "TypeParameter"; - bound?: BabelNodeTypeAnnotation; - variance?: BabelNodeVariance; - name?: string; -} - -declare class BabelNodeTypeParameterDeclaration extends BabelNode { - type: "TypeParameterDeclaration"; - params: Array; -} - -declare class BabelNodeTypeParameterInstantiation extends BabelNode { - type: "TypeParameterInstantiation"; - params: Array; -} - -declare class BabelNodeUnionTypeAnnotation extends BabelNode { - type: "UnionTypeAnnotation"; - types: Array; -} - -declare class BabelNodeVariance extends BabelNode { - type: "Variance"; - kind: "minus" | "plus"; -} - -declare class BabelNodeVoidTypeAnnotation extends BabelNode { - type: "VoidTypeAnnotation"; -} - -declare class BabelNodeJSXAttribute extends BabelNode { - type: "JSXAttribute"; - name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName; - value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer; -} - -declare class BabelNodeJSXClosingElement extends BabelNode { - type: "JSXClosingElement"; - name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression; -} - -declare class BabelNodeJSXElement extends BabelNode { - type: "JSXElement"; - openingElement: BabelNodeJSXOpeningElement; - closingElement?: BabelNodeJSXClosingElement; - children: Array; - selfClosing: any; -} - -declare class BabelNodeJSXEmptyExpression extends BabelNode { - type: "JSXEmptyExpression"; -} - -declare class BabelNodeJSXExpressionContainer extends BabelNode { - type: "JSXExpressionContainer"; - expression: BabelNodeExpression | BabelNodeJSXEmptyExpression; -} - -declare class BabelNodeJSXSpreadChild extends BabelNode { - type: "JSXSpreadChild"; - expression: BabelNodeExpression; -} - -declare class BabelNodeJSXIdentifier extends BabelNode { - type: "JSXIdentifier"; - name: string; -} - -declare class BabelNodeJSXMemberExpression extends BabelNode { - type: "JSXMemberExpression"; - object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier; - property: BabelNodeJSXIdentifier; -} - -declare class BabelNodeJSXNamespacedName extends BabelNode { - type: "JSXNamespacedName"; - namespace: BabelNodeJSXIdentifier; - name: BabelNodeJSXIdentifier; -} - -declare class BabelNodeJSXOpeningElement extends BabelNode { - type: "JSXOpeningElement"; - name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression; - attributes: Array; - selfClosing?: boolean; - typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeJSXSpreadAttribute extends BabelNode { - type: "JSXSpreadAttribute"; - argument: BabelNodeExpression; -} - -declare class BabelNodeJSXText extends BabelNode { - type: "JSXText"; - value: string; -} - -declare class BabelNodeJSXFragment extends BabelNode { - type: "JSXFragment"; - openingFragment: BabelNodeJSXOpeningFragment; - closingFragment: BabelNodeJSXClosingFragment; - children: Array; -} - -declare class BabelNodeJSXOpeningFragment extends BabelNode { - type: "JSXOpeningFragment"; -} - -declare class BabelNodeJSXClosingFragment extends BabelNode { - type: "JSXClosingFragment"; -} - -declare class BabelNodeNoop extends BabelNode { - type: "Noop"; -} - -declare class BabelNodePlaceholder extends BabelNode { - type: "Placeholder"; - expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; - name: BabelNodeIdentifier; -} - -declare class BabelNodeArgumentPlaceholder extends BabelNode { - type: "ArgumentPlaceholder"; -} - -declare class BabelNodeAwaitExpression extends BabelNode { - type: "AwaitExpression"; - argument: BabelNodeExpression; -} - -declare class BabelNodeBindExpression extends BabelNode { - type: "BindExpression"; - object: any; - callee: any; -} - -declare class BabelNodeClassProperty extends BabelNode { - type: "ClassProperty"; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - value?: BabelNodeExpression; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - decorators?: Array; - computed?: boolean; - abstract?: boolean; - accessibility?: "public" | "private" | "protected"; - definite?: boolean; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeOptionalMemberExpression extends BabelNode { - type: "OptionalMemberExpression"; - object: BabelNodeExpression; - property: any; - computed?: boolean; - optional: boolean; -} - -declare class BabelNodePipelineTopicExpression extends BabelNode { - type: "PipelineTopicExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodePipelineBareFunction extends BabelNode { - type: "PipelineBareFunction"; - callee: BabelNodeExpression; -} - -declare class BabelNodePipelinePrimaryTopicReference extends BabelNode { - type: "PipelinePrimaryTopicReference"; -} - -declare class BabelNodeOptionalCallExpression extends BabelNode { - type: "OptionalCallExpression"; - callee: BabelNodeExpression; - arguments: Array; - optional: boolean; - typeArguments?: BabelNodeTypeParameterInstantiation; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeClassPrivateProperty extends BabelNode { - type: "ClassPrivateProperty"; - key: BabelNodePrivateName; - value?: BabelNodeExpression; -} - -declare class BabelNodeClassPrivateMethod extends BabelNode { - type: "ClassPrivateMethod"; - kind?: "get" | "set" | "method" | "constructor"; - key: BabelNodePrivateName; - params: Array; - body: BabelNodeBlockStatement; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - async?: boolean; - computed?: boolean; - decorators?: Array; - generator?: boolean; - optional?: boolean; - returnType?: any; - typeParameters?: any; -} - -declare class BabelNodeImport extends BabelNode { - type: "Import"; -} - -declare class BabelNodeDecorator extends BabelNode { - type: "Decorator"; - expression: BabelNodeExpression; -} - -declare class BabelNodeDoExpression extends BabelNode { - type: "DoExpression"; - body: BabelNodeBlockStatement; -} - -declare class BabelNodeExportDefaultSpecifier extends BabelNode { - type: "ExportDefaultSpecifier"; - exported: BabelNodeIdentifier; -} - -declare class BabelNodeExportNamespaceSpecifier extends BabelNode { - type: "ExportNamespaceSpecifier"; - exported: BabelNodeIdentifier; -} - -declare class BabelNodePrivateName extends BabelNode { - type: "PrivateName"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeBigIntLiteral extends BabelNode { - type: "BigIntLiteral"; - value: string; -} - -declare class BabelNodeTSParameterProperty extends BabelNode { - type: "TSParameterProperty"; - parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern; - accessibility?: "public" | "private" | "protected"; - readonly?: boolean; -} - -declare class BabelNodeTSDeclareFunction extends BabelNode { - type: "TSDeclareFunction"; - id?: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; - params: Array; - returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; - async?: boolean; - declare?: boolean; - generator?: boolean; -} - -declare class BabelNodeTSDeclareMethod extends BabelNode { - type: "TSDeclareMethod"; - decorators?: Array; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; - params: Array; - returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - async?: boolean; - computed?: boolean; - generator?: boolean; - kind?: "get" | "set" | "method" | "constructor"; - optional?: boolean; -} - -declare class BabelNodeTSQualifiedName extends BabelNode { - type: "TSQualifiedName"; - left: BabelNodeTSEntityName; - right: BabelNodeIdentifier; -} - -declare class BabelNodeTSCallSignatureDeclaration extends BabelNode { - type: "TSCallSignatureDeclaration"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSConstructSignatureDeclaration extends BabelNode { - type: "TSConstructSignatureDeclaration"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSPropertySignature extends BabelNode { - type: "TSPropertySignature"; - key: BabelNodeExpression; - typeAnnotation?: BabelNodeTSTypeAnnotation; - initializer?: BabelNodeExpression; - computed?: boolean; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeTSMethodSignature extends BabelNode { - type: "TSMethodSignature"; - key: BabelNodeExpression; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; - computed?: boolean; - optional?: boolean; -} - -declare class BabelNodeTSIndexSignature extends BabelNode { - type: "TSIndexSignature"; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; - readonly?: boolean; -} - -declare class BabelNodeTSAnyKeyword extends BabelNode { - type: "TSAnyKeyword"; -} - -declare class BabelNodeTSUnknownKeyword extends BabelNode { - type: "TSUnknownKeyword"; -} - -declare class BabelNodeTSNumberKeyword extends BabelNode { - type: "TSNumberKeyword"; -} - -declare class BabelNodeTSObjectKeyword extends BabelNode { - type: "TSObjectKeyword"; -} - -declare class BabelNodeTSBooleanKeyword extends BabelNode { - type: "TSBooleanKeyword"; -} - -declare class BabelNodeTSStringKeyword extends BabelNode { - type: "TSStringKeyword"; -} - -declare class BabelNodeTSSymbolKeyword extends BabelNode { - type: "TSSymbolKeyword"; -} - -declare class BabelNodeTSVoidKeyword extends BabelNode { - type: "TSVoidKeyword"; -} - -declare class BabelNodeTSUndefinedKeyword extends BabelNode { - type: "TSUndefinedKeyword"; -} - -declare class BabelNodeTSNullKeyword extends BabelNode { - type: "TSNullKeyword"; -} - -declare class BabelNodeTSNeverKeyword extends BabelNode { - type: "TSNeverKeyword"; -} - -declare class BabelNodeTSThisType extends BabelNode { - type: "TSThisType"; -} - -declare class BabelNodeTSFunctionType extends BabelNode { - type: "TSFunctionType"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSConstructorType extends BabelNode { - type: "TSConstructorType"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSTypeReference extends BabelNode { - type: "TSTypeReference"; - typeName: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSTypePredicate extends BabelNode { - type: "TSTypePredicate"; - parameterName: BabelNodeIdentifier | BabelNodeTSThisType; - typeAnnotation: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSTypeQuery extends BabelNode { - type: "TSTypeQuery"; - exprName: BabelNodeTSEntityName | BabelNodeTSImportType; -} - -declare class BabelNodeTSTypeLiteral extends BabelNode { - type: "TSTypeLiteral"; - members: Array; -} - -declare class BabelNodeTSArrayType extends BabelNode { - type: "TSArrayType"; - elementType: BabelNodeTSType; -} - -declare class BabelNodeTSTupleType extends BabelNode { - type: "TSTupleType"; - elementTypes: Array; -} - -declare class BabelNodeTSOptionalType extends BabelNode { - type: "TSOptionalType"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSRestType extends BabelNode { - type: "TSRestType"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSUnionType extends BabelNode { - type: "TSUnionType"; - types: Array; -} - -declare class BabelNodeTSIntersectionType extends BabelNode { - type: "TSIntersectionType"; - types: Array; -} - -declare class BabelNodeTSConditionalType extends BabelNode { - type: "TSConditionalType"; - checkType: BabelNodeTSType; - extendsType: BabelNodeTSType; - trueType: BabelNodeTSType; - falseType: BabelNodeTSType; -} - -declare class BabelNodeTSInferType extends BabelNode { - type: "TSInferType"; - typeParameter: BabelNodeTSTypeParameter; -} - -declare class BabelNodeTSParenthesizedType extends BabelNode { - type: "TSParenthesizedType"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeOperator extends BabelNode { - type: "TSTypeOperator"; - typeAnnotation: BabelNodeTSType; - operator?: string; -} - -declare class BabelNodeTSIndexedAccessType extends BabelNode { - type: "TSIndexedAccessType"; - objectType: BabelNodeTSType; - indexType: BabelNodeTSType; -} - -declare class BabelNodeTSMappedType extends BabelNode { - type: "TSMappedType"; - typeParameter: BabelNodeTSTypeParameter; - typeAnnotation?: BabelNodeTSType; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeTSLiteralType extends BabelNode { - type: "TSLiteralType"; - literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral; -} - -declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode { - type: "TSExpressionWithTypeArguments"; - expression: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSInterfaceDeclaration extends BabelNode { - type: "TSInterfaceDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - body: BabelNodeTSInterfaceBody; - declare?: boolean; -} - -declare class BabelNodeTSInterfaceBody extends BabelNode { - type: "TSInterfaceBody"; - body: Array; -} - -declare class BabelNodeTSTypeAliasDeclaration extends BabelNode { - type: "TSTypeAliasDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - typeAnnotation: BabelNodeTSType; - declare?: boolean; -} - -declare class BabelNodeTSAsExpression extends BabelNode { - type: "TSAsExpression"; - expression: BabelNodeExpression; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeAssertion extends BabelNode { - type: "TSTypeAssertion"; - typeAnnotation: BabelNodeTSType; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSEnumDeclaration extends BabelNode { - type: "TSEnumDeclaration"; - id: BabelNodeIdentifier; - members: Array; - declare?: boolean; - initializer?: BabelNodeExpression; -} - -declare class BabelNodeTSEnumMember extends BabelNode { - type: "TSEnumMember"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - initializer?: BabelNodeExpression; -} - -declare class BabelNodeTSModuleDeclaration extends BabelNode { - type: "TSModuleDeclaration"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration; - declare?: boolean; - global?: boolean; -} - -declare class BabelNodeTSModuleBlock extends BabelNode { - type: "TSModuleBlock"; - body: Array; -} - -declare class BabelNodeTSImportType extends BabelNode { - type: "TSImportType"; - argument: BabelNodeStringLiteral; - qualifier?: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSImportEqualsDeclaration extends BabelNode { - type: "TSImportEqualsDeclaration"; - id: BabelNodeIdentifier; - moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference; - isExport?: boolean; -} - -declare class BabelNodeTSExternalModuleReference extends BabelNode { - type: "TSExternalModuleReference"; - expression: BabelNodeStringLiteral; -} - -declare class BabelNodeTSNonNullExpression extends BabelNode { - type: "TSNonNullExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSExportAssignment extends BabelNode { - type: "TSExportAssignment"; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSNamespaceExportDeclaration extends BabelNode { - type: "TSNamespaceExportDeclaration"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeTSTypeAnnotation extends BabelNode { - type: "TSTypeAnnotation"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeParameterInstantiation extends BabelNode { - type: "TSTypeParameterInstantiation"; - params: Array; -} - -declare class BabelNodeTSTypeParameterDeclaration extends BabelNode { - type: "TSTypeParameterDeclaration"; - params: Array; -} - -declare class BabelNodeTSTypeParameter extends BabelNode { - type: "TSTypeParameter"; - constraint?: BabelNodeTSType; - name?: string; -} - -type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeAwaitExpression | BabelNodeBindExpression | BabelNodeOptionalMemberExpression | BabelNodePipelinePrimaryTopicReference | BabelNodeOptionalCallExpression | BabelNodeImport | BabelNodeDoExpression | BabelNodeBigIntLiteral | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression; -type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression; -type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassDeclaration | BabelNodeClassExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock; -type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock; -type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram | BabelNodeTSModuleBlock; -type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration; -type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression; -type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement; -type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement; -type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement; -type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement; -type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression; -type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement; -type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement; -type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; -type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; -type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeArrowFunctionExpression | BabelNodeClassDeclaration | BabelNodeClassExpression | BabelNodeBigIntLiteral; -type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration; -type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; -type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty; -type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName; -type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral; -type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeBigIntLiteral; -type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty; -type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod; -type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty; -type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassPrivateProperty; -type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement; -type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; -type BabelNodeClass = BabelNodeClassDeclaration | BabelNodeClassExpression; -type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration; -type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration; -type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier; -type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias; -type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate; -type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment; -type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName; -type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature; -type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSVoidKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSNullKeyword | BabelNodeTSNeverKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType; - -declare module "@babel/types" { - declare function arrayExpression(elements?: Array): BabelNodeArrayExpression; - declare function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression; - declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeBinaryExpression; - declare function interpreterDirective(value: string): BabelNodeInterpreterDirective; - declare function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective; - declare function directiveLiteral(value: string): BabelNodeDirectiveLiteral; - declare function blockStatement(body: Array, directives?: Array): BabelNodeBlockStatement; - declare function breakStatement(label?: BabelNodeIdentifier): BabelNodeBreakStatement; - declare function callExpression(callee: BabelNodeExpression, _arguments: Array, optional?: true | false, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeCallExpression; - declare function catchClause(param?: BabelNodeIdentifier, body: BabelNodeBlockStatement): BabelNodeCatchClause; - declare function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression; - declare function continueStatement(label?: BabelNodeIdentifier): BabelNodeContinueStatement; - declare function debuggerStatement(): BabelNodeDebuggerStatement; - declare function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement; - declare function emptyStatement(): BabelNodeEmptyStatement; - declare function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement; - declare function file(program: BabelNodeProgram, comments: any, tokens: any): BabelNodeFile; - declare function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement; - declare function forStatement(init?: BabelNodeVariableDeclaration | BabelNodeExpression, test?: BabelNodeExpression, update?: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement; - declare function functionDeclaration(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean, declare?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeFunctionDeclaration; - declare function functionExpression(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeFunctionExpression; - declare function identifier(name: string, decorators?: Array, optional?: boolean, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeIdentifier; - declare function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: BabelNodeStatement): BabelNodeIfStatement; - declare function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement; - declare function stringLiteral(value: string): BabelNodeStringLiteral; - declare function numericLiteral(value: number): BabelNodeNumericLiteral; - declare function nullLiteral(): BabelNodeNullLiteral; - declare function booleanLiteral(value: boolean): BabelNodeBooleanLiteral; - declare function regExpLiteral(pattern: string, flags?: string): BabelNodeRegExpLiteral; - declare function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression; - declare function memberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional?: true | false): BabelNodeMemberExpression; - declare function newExpression(callee: BabelNodeExpression, _arguments: Array, optional?: true | false, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeNewExpression; - declare function program(body: Array, directives?: Array, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective, sourceFile?: string): BabelNodeProgram; - declare function objectExpression(properties: Array): BabelNodeObjectExpression; - declare function objectMethod(kind?: "method" | "get" | "set", key: any, params: Array, body: BabelNodeBlockStatement, computed?: boolean, async?: boolean, decorators?: Array, generator?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeObjectMethod; - declare function objectProperty(key: any, value: BabelNodeExpression | BabelNodePatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array): BabelNodeObjectProperty; - declare function restElement(argument: BabelNodeLVal, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeRestElement; - declare function returnStatement(argument?: BabelNodeExpression): BabelNodeReturnStatement; - declare function sequenceExpression(expressions: Array): BabelNodeSequenceExpression; - declare function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression; - declare function switchCase(test?: BabelNodeExpression, consequent: Array): BabelNodeSwitchCase; - declare function switchStatement(discriminant: BabelNodeExpression, cases: Array): BabelNodeSwitchStatement; - declare function thisExpression(): BabelNodeThisExpression; - declare function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement; - declare function tryStatement(block: BabelNodeBlockStatement, handler?: BabelNodeCatchClause, finalizer?: BabelNodeBlockStatement): BabelNodeTryStatement; - declare function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUnaryExpression; - declare function updateExpression(operator: "++" | "--", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUpdateExpression; - declare function variableDeclaration(kind: "var" | "let" | "const", declarations: Array, declare?: boolean): BabelNodeVariableDeclaration; - declare function variableDeclarator(id: BabelNodeLVal, init?: BabelNodeExpression, definite?: boolean): BabelNodeVariableDeclarator; - declare function whileStatement(test: BabelNodeExpression, body: BabelNodeBlockStatement | BabelNodeStatement): BabelNodeWhileStatement; - declare function withStatement(object: BabelNodeExpression, body: BabelNodeBlockStatement | BabelNodeStatement): BabelNodeWithStatement; - declare function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeAssignmentPattern; - declare function arrayPattern(elements: Array, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeArrayPattern; - declare function arrowFunctionExpression(params: Array, body: BabelNodeBlockStatement | BabelNodeExpression, async?: boolean, expression?: boolean, generator?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeArrowFunctionExpression; - declare function classBody(body: Array): BabelNodeClassBody; - declare function classDeclaration(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array, abstract?: boolean, declare?: boolean, _implements?: Array, mixins?: any, superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassDeclaration; - declare function classExpression(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array, _implements?: Array, mixins?: any, superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassExpression; - declare function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration; - declare function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration; - declare function exportNamedDeclaration(declaration?: BabelNodeDeclaration, specifiers: Array, source?: BabelNodeStringLiteral, exportKind?: "type" | "value"): BabelNodeExportNamedDeclaration; - declare function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier): BabelNodeExportSpecifier; - declare function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: boolean): BabelNodeForOfStatement; - declare function importDeclaration(specifiers: Array, source: BabelNodeStringLiteral, importKind?: "type" | "typeof" | "value"): BabelNodeImportDeclaration; - declare function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier; - declare function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier; - declare function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier, importKind?: "type" | "typeof"): BabelNodeImportSpecifier; - declare function metaProperty(meta: BabelNodeIdentifier, property: BabelNodeIdentifier): BabelNodeMetaProperty; - declare function classMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: Array, body: BabelNodeBlockStatement, computed?: boolean, _static?: boolean, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, decorators?: Array, generator?: boolean, optional?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassMethod; - declare function objectPattern(properties: Array, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeObjectPattern; - declare function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement; - declare function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeTaggedTemplateExpression; - declare function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): BabelNodeTemplateElement; - declare function templateLiteral(quasis: Array, expressions: Array): BabelNodeTemplateLiteral; - declare function yieldExpression(argument?: BabelNodeExpression, delegate?: boolean): BabelNodeYieldExpression; - declare function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation; - declare function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation; - declare function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation; - declare function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation; - declare function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation; - declare function classImplements(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeClassImplements; - declare function declareClass(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeDeclareClass; - declare function declareFunction(id: BabelNodeIdentifier, predicate?: BabelNodeDeclaredPredicate): BabelNodeDeclareFunction; - declare function declareInterface(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeDeclareInterface; - declare function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: "CommonJS" | "ES"): BabelNodeDeclareModule; - declare function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports; - declare function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias; - declare function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType; - declare function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable; - declare function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array, source?: BabelNodeStringLiteral, _default?: boolean): BabelNodeDeclareExportDeclaration; - declare function declareExportAllDeclaration(source: BabelNodeStringLiteral, exportKind?: "type" | "value"): BabelNodeDeclareExportAllDeclaration; - declare function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate; - declare function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation; - declare function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation; - declare function functionTypeParam(name?: BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType, optional?: boolean): BabelNodeFunctionTypeParam; - declare function genericTypeAnnotation(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation; - declare function inferredPredicate(): BabelNodeInferredPredicate; - declare function interfaceExtends(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends; - declare function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeInterfaceDeclaration; - declare function interfaceTypeAnnotation(_extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceTypeAnnotation; - declare function intersectionTypeAnnotation(types: Array): BabelNodeIntersectionTypeAnnotation; - declare function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation; - declare function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation; - declare function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation; - declare function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation; - declare function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation; - declare function objectTypeAnnotation(properties: Array, indexers?: Array, callProperties?: Array, internalSlots?: Array, exact?: boolean, inexact?: boolean): BabelNodeObjectTypeAnnotation; - declare function objectTypeInternalSlot(id: BabelNodeIdentifier, value: BabelNodeFlowType, optional: boolean, _static: boolean, method: boolean): BabelNodeObjectTypeInternalSlot; - declare function objectTypeCallProperty(value: BabelNodeFlowType, _static?: boolean): BabelNodeObjectTypeCallProperty; - declare function objectTypeIndexer(id?: BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: BabelNodeVariance, _static?: boolean): BabelNodeObjectTypeIndexer; - declare function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: BabelNodeVariance, kind?: "init" | "get" | "set", optional?: boolean, proto?: boolean, _static?: boolean): BabelNodeObjectTypeProperty; - declare function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty; - declare function opaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType; - declare function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier; - declare function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation; - declare function stringTypeAnnotation(): BabelNodeStringTypeAnnotation; - declare function thisTypeAnnotation(): BabelNodeThisTypeAnnotation; - declare function tupleTypeAnnotation(types: Array): BabelNodeTupleTypeAnnotation; - declare function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation; - declare function typeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias; - declare function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation; - declare function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression; - declare function typeParameter(bound?: BabelNodeTypeAnnotation, _default?: BabelNodeFlowType, variance?: BabelNodeVariance, name?: string): BabelNodeTypeParameter; - declare function typeParameterDeclaration(params: Array): BabelNodeTypeParameterDeclaration; - declare function typeParameterInstantiation(params: Array): BabelNodeTypeParameterInstantiation; - declare function unionTypeAnnotation(types: Array): BabelNodeUnionTypeAnnotation; - declare function variance(kind: "minus" | "plus"): BabelNodeVariance; - declare function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation; - declare function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute; - declare function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression): BabelNodeJSXClosingElement; - declare function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: BabelNodeJSXClosingElement, children: Array, selfClosing: any): BabelNodeJSXElement; - declare function jsxEmptyExpression(): BabelNodeJSXEmptyExpression; - declare function jsxExpressionContainer(expression: BabelNodeExpression | BabelNodeJSXEmptyExpression): BabelNodeJSXExpressionContainer; - declare function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild; - declare function jsxIdentifier(name: string): BabelNodeJSXIdentifier; - declare function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression; - declare function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName; - declare function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression, attributes: Array, selfClosing?: boolean, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeJSXOpeningElement; - declare function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute; - declare function jsxText(value: string): BabelNodeJSXText; - declare function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: Array): BabelNodeJSXFragment; - declare function jsxOpeningFragment(): BabelNodeJSXOpeningFragment; - declare function jsxClosingFragment(): BabelNodeJSXClosingFragment; - declare function noop(): BabelNodeNoop; - declare function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: BabelNodeIdentifier): BabelNodePlaceholder; - declare function argumentPlaceholder(): BabelNodeArgumentPlaceholder; - declare function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression; - declare function bindExpression(object: any, callee: any): BabelNodeBindExpression; - declare function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array, computed?: boolean, abstract?: boolean, accessibility?: "public" | "private" | "protected", definite?: boolean, optional?: boolean, readonly?: boolean, _static?: boolean): BabelNodeClassProperty; - declare function optionalMemberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional: boolean): BabelNodeOptionalMemberExpression; - declare function pipelineTopicExpression(expression: BabelNodeExpression): BabelNodePipelineTopicExpression; - declare function pipelineBareFunction(callee: BabelNodeExpression): BabelNodePipelineBareFunction; - declare function pipelinePrimaryTopicReference(): BabelNodePipelinePrimaryTopicReference; - declare function optionalCallExpression(callee: BabelNodeExpression, _arguments: Array, optional: boolean, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeOptionalCallExpression; - declare function classPrivateProperty(key: BabelNodePrivateName, value?: BabelNodeExpression): BabelNodeClassPrivateProperty; - declare function classPrivateMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodePrivateName, params: Array, body: BabelNodeBlockStatement, _static?: boolean, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, computed?: boolean, decorators?: Array, generator?: boolean, optional?: boolean, returnType?: any, typeParameters?: any): BabelNodeClassPrivateMethod; - declare function decorator(expression: BabelNodeExpression): BabelNodeDecorator; - declare function doExpression(body: BabelNodeBlockStatement): BabelNodeDoExpression; - declare function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier; - declare function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier; - declare function privateName(id: BabelNodeIdentifier): BabelNodePrivateName; - declare function bigIntLiteral(value: string): BabelNodeBigIntLiteral; - declare function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern, accessibility?: "public" | "private" | "protected", readonly?: boolean): BabelNodeTSParameterProperty; - declare function tsDeclareFunction(id?: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop, async?: boolean, declare?: boolean, generator?: boolean): BabelNodeTSDeclareFunction; - declare function tsDeclareMethod(decorators?: Array, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, computed?: boolean, generator?: boolean, kind?: "get" | "set" | "method" | "constructor", optional?: boolean, _static?: boolean): BabelNodeTSDeclareMethod; - declare function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName; - declare function tsCallSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration; - declare function tsConstructSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration; - declare function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: BabelNodeTSTypeAnnotation, initializer?: BabelNodeExpression, computed?: boolean, optional?: boolean, readonly?: boolean): BabelNodeTSPropertySignature; - declare function tsMethodSignature(key: BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation, computed?: boolean, optional?: boolean): BabelNodeTSMethodSignature; - declare function tsIndexSignature(parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation, readonly?: boolean): BabelNodeTSIndexSignature; - declare function tsAnyKeyword(): BabelNodeTSAnyKeyword; - declare function tsUnknownKeyword(): BabelNodeTSUnknownKeyword; - declare function tsNumberKeyword(): BabelNodeTSNumberKeyword; - declare function tsObjectKeyword(): BabelNodeTSObjectKeyword; - declare function tsBooleanKeyword(): BabelNodeTSBooleanKeyword; - declare function tsStringKeyword(): BabelNodeTSStringKeyword; - declare function tsSymbolKeyword(): BabelNodeTSSymbolKeyword; - declare function tsVoidKeyword(): BabelNodeTSVoidKeyword; - declare function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword; - declare function tsNullKeyword(): BabelNodeTSNullKeyword; - declare function tsNeverKeyword(): BabelNodeTSNeverKeyword; - declare function tsThisType(): BabelNodeTSThisType; - declare function tsFunctionType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSFunctionType; - declare function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructorType; - declare function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference; - declare function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation: BabelNodeTSTypeAnnotation): BabelNodeTSTypePredicate; - declare function tsTypeQuery(exprName: BabelNodeTSEntityName | BabelNodeTSImportType): BabelNodeTSTypeQuery; - declare function tsTypeLiteral(members: Array): BabelNodeTSTypeLiteral; - declare function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType; - declare function tsTupleType(elementTypes: Array): BabelNodeTSTupleType; - declare function tsOptionalType(typeAnnotation: BabelNodeTSType): BabelNodeTSOptionalType; - declare function tsRestType(typeAnnotation: BabelNodeTSType): BabelNodeTSRestType; - declare function tsUnionType(types: Array): BabelNodeTSUnionType; - declare function tsIntersectionType(types: Array): BabelNodeTSIntersectionType; - declare function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType; - declare function tsInferType(typeParameter: BabelNodeTSTypeParameter): BabelNodeTSInferType; - declare function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType; - declare function tsTypeOperator(typeAnnotation: BabelNodeTSType, operator?: string): BabelNodeTSTypeOperator; - declare function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType; - declare function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType, optional?: boolean, readonly?: boolean): BabelNodeTSMappedType; - declare function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral): BabelNodeTSLiteralType; - declare function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments; - declare function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array, body: BabelNodeTSInterfaceBody, declare?: boolean): BabelNodeTSInterfaceDeclaration; - declare function tsInterfaceBody(body: Array): BabelNodeTSInterfaceBody; - declare function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType, declare?: boolean): BabelNodeTSTypeAliasDeclaration; - declare function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression; - declare function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion; - declare function tsEnumDeclaration(id: BabelNodeIdentifier, members: Array, _const?: boolean, declare?: boolean, initializer?: BabelNodeExpression): BabelNodeTSEnumDeclaration; - declare function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: BabelNodeExpression): BabelNodeTSEnumMember; - declare function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration, declare?: boolean, global?: boolean): BabelNodeTSModuleDeclaration; - declare function tsModuleBlock(body: Array): BabelNodeTSModuleBlock; - declare function tsImportType(argument: BabelNodeStringLiteral, qualifier?: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSImportType; - declare function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference, isExport?: boolean): BabelNodeTSImportEqualsDeclaration; - declare function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference; - declare function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression; - declare function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment; - declare function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration; - declare function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation; - declare function tsTypeParameterInstantiation(params: Array): BabelNodeTSTypeParameterInstantiation; - declare function tsTypeParameterDeclaration(params: Array): BabelNodeTSTypeParameterDeclaration; - declare function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name?: string): BabelNodeTSTypeParameter; - declare function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression) - declare function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression) - declare function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression) - declare function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterpreterDirective) - declare function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective) - declare function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral) - declare function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement) - declare function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement) - declare function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression) - declare function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause) - declare function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression) - declare function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement) - declare function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement) - declare function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement) - declare function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement) - declare function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement) - declare function isFile(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile) - declare function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement) - declare function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement) - declare function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration) - declare function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression) - declare function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier) - declare function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement) - declare function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement) - declare function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral) - declare function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral) - declare function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral) - declare function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral) - declare function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral) - declare function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression) - declare function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression) - declare function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression) - declare function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram) - declare function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression) - declare function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod) - declare function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty) - declare function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement) - declare function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement) - declare function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression) - declare function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression) - declare function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase) - declare function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement) - declare function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression) - declare function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement) - declare function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement) - declare function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression) - declare function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression) - declare function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration) - declare function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator) - declare function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement) - declare function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement) - declare function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern) - declare function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern) - declare function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression) - declare function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody) - declare function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration) - declare function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression) - declare function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration) - declare function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration) - declare function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration) - declare function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier) - declare function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement) - declare function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration) - declare function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier) - declare function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier) - declare function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier) - declare function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty) - declare function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod) - declare function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern) - declare function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement) - declare function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper) - declare function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression) - declare function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement) - declare function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral) - declare function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression) - declare function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation) - declare function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation) - declare function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation) - declare function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation) - declare function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation) - declare function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements) - declare function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass) - declare function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction) - declare function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface) - declare function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule) - declare function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports) - declare function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias) - declare function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType) - declare function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable) - declare function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration) - declare function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration) - declare function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate) - declare function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation) - declare function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation) - declare function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam) - declare function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation) - declare function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate) - declare function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends) - declare function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration) - declare function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceTypeAnnotation) - declare function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation) - declare function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation) - declare function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation) - declare function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation) - declare function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation) - declare function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation) - declare function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation) - declare function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeInternalSlot) - declare function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty) - declare function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer) - declare function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty) - declare function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty) - declare function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType) - declare function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier) - declare function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation) - declare function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation) - declare function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation) - declare function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation) - declare function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation) - declare function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias) - declare function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation) - declare function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression) - declare function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter) - declare function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration) - declare function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation) - declare function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation) - declare function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance) - declare function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation) - declare function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute) - declare function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement) - declare function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement) - declare function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression) - declare function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer) - declare function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild) - declare function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier) - declare function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression) - declare function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName) - declare function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement) - declare function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute) - declare function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText) - declare function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment) - declare function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment) - declare function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment) - declare function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop) - declare function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePlaceholder) - declare function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArgumentPlaceholder) - declare function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression) - declare function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression) - declare function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty) - declare function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression) - declare function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineTopicExpression) - declare function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineBareFunction) - declare function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelinePrimaryTopicReference) - declare function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression) - declare function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty) - declare function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateMethod) - declare function isImport(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport) - declare function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator) - declare function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression) - declare function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier) - declare function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier) - declare function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName) - declare function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBigIntLiteral) - declare function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty) - declare function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction) - declare function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod) - declare function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName) - declare function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration) - declare function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration) - declare function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature) - declare function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature) - declare function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature) - declare function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword) - declare function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnknownKeyword) - declare function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword) - declare function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword) - declare function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword) - declare function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword) - declare function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword) - declare function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword) - declare function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword) - declare function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword) - declare function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword) - declare function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType) - declare function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType) - declare function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType) - declare function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference) - declare function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate) - declare function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery) - declare function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral) - declare function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType) - declare function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType) - declare function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSOptionalType) - declare function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSRestType) - declare function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType) - declare function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType) - declare function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType) - declare function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType) - declare function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType) - declare function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator) - declare function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType) - declare function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType) - declare function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType) - declare function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments) - declare function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration) - declare function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody) - declare function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration) - declare function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression) - declare function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion) - declare function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration) - declare function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember) - declare function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration) - declare function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock) - declare function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportType) - declare function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration) - declare function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference) - declare function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression) - declare function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment) - declare function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration) - declare function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation) - declare function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation) - declare function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration) - declare function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter) - declare function isExpression(node: ?Object, opts?: ?Object): boolean - declare function isBinary(node: ?Object, opts?: ?Object): boolean - declare function isScopable(node: ?Object, opts?: ?Object): boolean - declare function isBlockParent(node: ?Object, opts?: ?Object): boolean - declare function isBlock(node: ?Object, opts?: ?Object): boolean - declare function isStatement(node: ?Object, opts?: ?Object): boolean - declare function isTerminatorless(node: ?Object, opts?: ?Object): boolean - declare function isCompletionStatement(node: ?Object, opts?: ?Object): boolean - declare function isConditional(node: ?Object, opts?: ?Object): boolean - declare function isLoop(node: ?Object, opts?: ?Object): boolean - declare function isWhile(node: ?Object, opts?: ?Object): boolean - declare function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean - declare function isFor(node: ?Object, opts?: ?Object): boolean - declare function isForXStatement(node: ?Object, opts?: ?Object): boolean - declare function isFunction(node: ?Object, opts?: ?Object): boolean - declare function isFunctionParent(node: ?Object, opts?: ?Object): boolean - declare function isPureish(node: ?Object, opts?: ?Object): boolean - declare function isDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isPatternLike(node: ?Object, opts?: ?Object): boolean - declare function isLVal(node: ?Object, opts?: ?Object): boolean - declare function isTSEntityName(node: ?Object, opts?: ?Object): boolean - declare function isLiteral(node: ?Object, opts?: ?Object): boolean - declare function isImmutable(node: ?Object, opts?: ?Object): boolean - declare function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean - declare function isMethod(node: ?Object, opts?: ?Object): boolean - declare function isObjectMember(node: ?Object, opts?: ?Object): boolean - declare function isProperty(node: ?Object, opts?: ?Object): boolean - declare function isUnaryLike(node: ?Object, opts?: ?Object): boolean - declare function isPattern(node: ?Object, opts?: ?Object): boolean - declare function isClass(node: ?Object, opts?: ?Object): boolean - declare function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isExportDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean - declare function isFlow(node: ?Object, opts?: ?Object): boolean - declare function isFlowType(node: ?Object, opts?: ?Object): boolean - declare function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean - declare function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isFlowPredicate(node: ?Object, opts?: ?Object): boolean - declare function isJSX(node: ?Object, opts?: ?Object): boolean - declare function isPrivate(node: ?Object, opts?: ?Object): boolean - declare function isTSTypeElement(node: ?Object, opts?: ?Object): boolean - declare function isTSType(node: ?Object, opts?: ?Object): boolean - declare function isNumberLiteral(node: ?Object, opts?: ?Object): boolean - declare function isRegexLiteral(node: ?Object, opts?: ?Object): boolean - declare function isRestProperty(node: ?Object, opts?: ?Object): boolean - declare function isSpreadProperty(node: ?Object, opts?: ?Object): boolean - declare function validate(n: BabelNode, key: string, value: mixed): void; - declare function clone(n: T): T; - declare function cloneDeep(n: T): T; - declare function removeProperties(n: T, opts: ?{}): void; - declare function removePropertiesDeep(n: T, opts: ?{}): T; - declare type TraversalAncestors = Array<{ - node: BabelNode, - key: string, - index?: number, - }>; - declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; - declare type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, - }; - declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void; -} diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/inherit.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/inherit.js deleted file mode 100644 index 46b32efe8a5ce5..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/inherit.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inherit; - -function _uniq() { - const data = _interopRequireDefault(require("lodash/uniq")); - - _uniq = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inherit(key, child, parent) { - if (child && parent) { - child[key] = (0, _uniq().default)([].concat(child[key], parent[key]).filter(Boolean)); - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/generated/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/generated/index.js deleted file mode 100644 index 24ffceb446e08f..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/generated/index.js +++ /dev/null @@ -1,4317 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isArrayExpression = isArrayExpression; -exports.isAssignmentExpression = isAssignmentExpression; -exports.isBinaryExpression = isBinaryExpression; -exports.isInterpreterDirective = isInterpreterDirective; -exports.isDirective = isDirective; -exports.isDirectiveLiteral = isDirectiveLiteral; -exports.isBlockStatement = isBlockStatement; -exports.isBreakStatement = isBreakStatement; -exports.isCallExpression = isCallExpression; -exports.isCatchClause = isCatchClause; -exports.isConditionalExpression = isConditionalExpression; -exports.isContinueStatement = isContinueStatement; -exports.isDebuggerStatement = isDebuggerStatement; -exports.isDoWhileStatement = isDoWhileStatement; -exports.isEmptyStatement = isEmptyStatement; -exports.isExpressionStatement = isExpressionStatement; -exports.isFile = isFile; -exports.isForInStatement = isForInStatement; -exports.isForStatement = isForStatement; -exports.isFunctionDeclaration = isFunctionDeclaration; -exports.isFunctionExpression = isFunctionExpression; -exports.isIdentifier = isIdentifier; -exports.isIfStatement = isIfStatement; -exports.isLabeledStatement = isLabeledStatement; -exports.isStringLiteral = isStringLiteral; -exports.isNumericLiteral = isNumericLiteral; -exports.isNullLiteral = isNullLiteral; -exports.isBooleanLiteral = isBooleanLiteral; -exports.isRegExpLiteral = isRegExpLiteral; -exports.isLogicalExpression = isLogicalExpression; -exports.isMemberExpression = isMemberExpression; -exports.isNewExpression = isNewExpression; -exports.isProgram = isProgram; -exports.isObjectExpression = isObjectExpression; -exports.isObjectMethod = isObjectMethod; -exports.isObjectProperty = isObjectProperty; -exports.isRestElement = isRestElement; -exports.isReturnStatement = isReturnStatement; -exports.isSequenceExpression = isSequenceExpression; -exports.isParenthesizedExpression = isParenthesizedExpression; -exports.isSwitchCase = isSwitchCase; -exports.isSwitchStatement = isSwitchStatement; -exports.isThisExpression = isThisExpression; -exports.isThrowStatement = isThrowStatement; -exports.isTryStatement = isTryStatement; -exports.isUnaryExpression = isUnaryExpression; -exports.isUpdateExpression = isUpdateExpression; -exports.isVariableDeclaration = isVariableDeclaration; -exports.isVariableDeclarator = isVariableDeclarator; -exports.isWhileStatement = isWhileStatement; -exports.isWithStatement = isWithStatement; -exports.isAssignmentPattern = isAssignmentPattern; -exports.isArrayPattern = isArrayPattern; -exports.isArrowFunctionExpression = isArrowFunctionExpression; -exports.isClassBody = isClassBody; -exports.isClassDeclaration = isClassDeclaration; -exports.isClassExpression = isClassExpression; -exports.isExportAllDeclaration = isExportAllDeclaration; -exports.isExportDefaultDeclaration = isExportDefaultDeclaration; -exports.isExportNamedDeclaration = isExportNamedDeclaration; -exports.isExportSpecifier = isExportSpecifier; -exports.isForOfStatement = isForOfStatement; -exports.isImportDeclaration = isImportDeclaration; -exports.isImportDefaultSpecifier = isImportDefaultSpecifier; -exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier; -exports.isImportSpecifier = isImportSpecifier; -exports.isMetaProperty = isMetaProperty; -exports.isClassMethod = isClassMethod; -exports.isObjectPattern = isObjectPattern; -exports.isSpreadElement = isSpreadElement; -exports.isSuper = isSuper; -exports.isTaggedTemplateExpression = isTaggedTemplateExpression; -exports.isTemplateElement = isTemplateElement; -exports.isTemplateLiteral = isTemplateLiteral; -exports.isYieldExpression = isYieldExpression; -exports.isAnyTypeAnnotation = isAnyTypeAnnotation; -exports.isArrayTypeAnnotation = isArrayTypeAnnotation; -exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation; -exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; -exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; -exports.isClassImplements = isClassImplements; -exports.isDeclareClass = isDeclareClass; -exports.isDeclareFunction = isDeclareFunction; -exports.isDeclareInterface = isDeclareInterface; -exports.isDeclareModule = isDeclareModule; -exports.isDeclareModuleExports = isDeclareModuleExports; -exports.isDeclareTypeAlias = isDeclareTypeAlias; -exports.isDeclareOpaqueType = isDeclareOpaqueType; -exports.isDeclareVariable = isDeclareVariable; -exports.isDeclareExportDeclaration = isDeclareExportDeclaration; -exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; -exports.isDeclaredPredicate = isDeclaredPredicate; -exports.isExistsTypeAnnotation = isExistsTypeAnnotation; -exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation; -exports.isFunctionTypeParam = isFunctionTypeParam; -exports.isGenericTypeAnnotation = isGenericTypeAnnotation; -exports.isInferredPredicate = isInferredPredicate; -exports.isInterfaceExtends = isInterfaceExtends; -exports.isInterfaceDeclaration = isInterfaceDeclaration; -exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation; -exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; -exports.isMixedTypeAnnotation = isMixedTypeAnnotation; -exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation; -exports.isNullableTypeAnnotation = isNullableTypeAnnotation; -exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; -exports.isNumberTypeAnnotation = isNumberTypeAnnotation; -exports.isObjectTypeAnnotation = isObjectTypeAnnotation; -exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot; -exports.isObjectTypeCallProperty = isObjectTypeCallProperty; -exports.isObjectTypeIndexer = isObjectTypeIndexer; -exports.isObjectTypeProperty = isObjectTypeProperty; -exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; -exports.isOpaqueType = isOpaqueType; -exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; -exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; -exports.isStringTypeAnnotation = isStringTypeAnnotation; -exports.isThisTypeAnnotation = isThisTypeAnnotation; -exports.isTupleTypeAnnotation = isTupleTypeAnnotation; -exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation; -exports.isTypeAlias = isTypeAlias; -exports.isTypeAnnotation = isTypeAnnotation; -exports.isTypeCastExpression = isTypeCastExpression; -exports.isTypeParameter = isTypeParameter; -exports.isTypeParameterDeclaration = isTypeParameterDeclaration; -exports.isTypeParameterInstantiation = isTypeParameterInstantiation; -exports.isUnionTypeAnnotation = isUnionTypeAnnotation; -exports.isVariance = isVariance; -exports.isVoidTypeAnnotation = isVoidTypeAnnotation; -exports.isJSXAttribute = isJSXAttribute; -exports.isJSXClosingElement = isJSXClosingElement; -exports.isJSXElement = isJSXElement; -exports.isJSXEmptyExpression = isJSXEmptyExpression; -exports.isJSXExpressionContainer = isJSXExpressionContainer; -exports.isJSXSpreadChild = isJSXSpreadChild; -exports.isJSXIdentifier = isJSXIdentifier; -exports.isJSXMemberExpression = isJSXMemberExpression; -exports.isJSXNamespacedName = isJSXNamespacedName; -exports.isJSXOpeningElement = isJSXOpeningElement; -exports.isJSXSpreadAttribute = isJSXSpreadAttribute; -exports.isJSXText = isJSXText; -exports.isJSXFragment = isJSXFragment; -exports.isJSXOpeningFragment = isJSXOpeningFragment; -exports.isJSXClosingFragment = isJSXClosingFragment; -exports.isNoop = isNoop; -exports.isPlaceholder = isPlaceholder; -exports.isArgumentPlaceholder = isArgumentPlaceholder; -exports.isAwaitExpression = isAwaitExpression; -exports.isBindExpression = isBindExpression; -exports.isClassProperty = isClassProperty; -exports.isOptionalMemberExpression = isOptionalMemberExpression; -exports.isPipelineTopicExpression = isPipelineTopicExpression; -exports.isPipelineBareFunction = isPipelineBareFunction; -exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference; -exports.isOptionalCallExpression = isOptionalCallExpression; -exports.isClassPrivateProperty = isClassPrivateProperty; -exports.isClassPrivateMethod = isClassPrivateMethod; -exports.isImport = isImport; -exports.isDecorator = isDecorator; -exports.isDoExpression = isDoExpression; -exports.isExportDefaultSpecifier = isExportDefaultSpecifier; -exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier; -exports.isPrivateName = isPrivateName; -exports.isBigIntLiteral = isBigIntLiteral; -exports.isTSParameterProperty = isTSParameterProperty; -exports.isTSDeclareFunction = isTSDeclareFunction; -exports.isTSDeclareMethod = isTSDeclareMethod; -exports.isTSQualifiedName = isTSQualifiedName; -exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; -exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; -exports.isTSPropertySignature = isTSPropertySignature; -exports.isTSMethodSignature = isTSMethodSignature; -exports.isTSIndexSignature = isTSIndexSignature; -exports.isTSAnyKeyword = isTSAnyKeyword; -exports.isTSUnknownKeyword = isTSUnknownKeyword; -exports.isTSNumberKeyword = isTSNumberKeyword; -exports.isTSObjectKeyword = isTSObjectKeyword; -exports.isTSBooleanKeyword = isTSBooleanKeyword; -exports.isTSStringKeyword = isTSStringKeyword; -exports.isTSSymbolKeyword = isTSSymbolKeyword; -exports.isTSVoidKeyword = isTSVoidKeyword; -exports.isTSUndefinedKeyword = isTSUndefinedKeyword; -exports.isTSNullKeyword = isTSNullKeyword; -exports.isTSNeverKeyword = isTSNeverKeyword; -exports.isTSThisType = isTSThisType; -exports.isTSFunctionType = isTSFunctionType; -exports.isTSConstructorType = isTSConstructorType; -exports.isTSTypeReference = isTSTypeReference; -exports.isTSTypePredicate = isTSTypePredicate; -exports.isTSTypeQuery = isTSTypeQuery; -exports.isTSTypeLiteral = isTSTypeLiteral; -exports.isTSArrayType = isTSArrayType; -exports.isTSTupleType = isTSTupleType; -exports.isTSOptionalType = isTSOptionalType; -exports.isTSRestType = isTSRestType; -exports.isTSUnionType = isTSUnionType; -exports.isTSIntersectionType = isTSIntersectionType; -exports.isTSConditionalType = isTSConditionalType; -exports.isTSInferType = isTSInferType; -exports.isTSParenthesizedType = isTSParenthesizedType; -exports.isTSTypeOperator = isTSTypeOperator; -exports.isTSIndexedAccessType = isTSIndexedAccessType; -exports.isTSMappedType = isTSMappedType; -exports.isTSLiteralType = isTSLiteralType; -exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; -exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration; -exports.isTSInterfaceBody = isTSInterfaceBody; -exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; -exports.isTSAsExpression = isTSAsExpression; -exports.isTSTypeAssertion = isTSTypeAssertion; -exports.isTSEnumDeclaration = isTSEnumDeclaration; -exports.isTSEnumMember = isTSEnumMember; -exports.isTSModuleDeclaration = isTSModuleDeclaration; -exports.isTSModuleBlock = isTSModuleBlock; -exports.isTSImportType = isTSImportType; -exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; -exports.isTSExternalModuleReference = isTSExternalModuleReference; -exports.isTSNonNullExpression = isTSNonNullExpression; -exports.isTSExportAssignment = isTSExportAssignment; -exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; -exports.isTSTypeAnnotation = isTSTypeAnnotation; -exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; -exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; -exports.isTSTypeParameter = isTSTypeParameter; -exports.isExpression = isExpression; -exports.isBinary = isBinary; -exports.isScopable = isScopable; -exports.isBlockParent = isBlockParent; -exports.isBlock = isBlock; -exports.isStatement = isStatement; -exports.isTerminatorless = isTerminatorless; -exports.isCompletionStatement = isCompletionStatement; -exports.isConditional = isConditional; -exports.isLoop = isLoop; -exports.isWhile = isWhile; -exports.isExpressionWrapper = isExpressionWrapper; -exports.isFor = isFor; -exports.isForXStatement = isForXStatement; -exports.isFunction = isFunction; -exports.isFunctionParent = isFunctionParent; -exports.isPureish = isPureish; -exports.isDeclaration = isDeclaration; -exports.isPatternLike = isPatternLike; -exports.isLVal = isLVal; -exports.isTSEntityName = isTSEntityName; -exports.isLiteral = isLiteral; -exports.isImmutable = isImmutable; -exports.isUserWhitespacable = isUserWhitespacable; -exports.isMethod = isMethod; -exports.isObjectMember = isObjectMember; -exports.isProperty = isProperty; -exports.isUnaryLike = isUnaryLike; -exports.isPattern = isPattern; -exports.isClass = isClass; -exports.isModuleDeclaration = isModuleDeclaration; -exports.isExportDeclaration = isExportDeclaration; -exports.isModuleSpecifier = isModuleSpecifier; -exports.isFlow = isFlow; -exports.isFlowType = isFlowType; -exports.isFlowBaseAnnotation = isFlowBaseAnnotation; -exports.isFlowDeclaration = isFlowDeclaration; -exports.isFlowPredicate = isFlowPredicate; -exports.isJSX = isJSX; -exports.isPrivate = isPrivate; -exports.isTSTypeElement = isTSTypeElement; -exports.isTSType = isTSType; -exports.isNumberLiteral = isNumberLiteral; -exports.isRegexLiteral = isRegexLiteral; -exports.isRestProperty = isRestProperty; -exports.isSpreadProperty = isSpreadProperty; - -var _shallowEqual = _interopRequireDefault(require("../../utils/shallowEqual")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isArrayExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrayExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAssignmentExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AssignmentExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBinaryExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BinaryExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterpreterDirective(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterpreterDirective") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDirective(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Directive") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDirectiveLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DirectiveLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlockStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BlockStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBreakStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BreakStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCallExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "CallExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCatchClause(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "CatchClause") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isConditionalExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ConditionalExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isContinueStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ContinueStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDebuggerStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DebuggerStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDoWhileStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DoWhileStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEmptyStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EmptyStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpressionStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExpressionStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFile(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "File") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForInStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForInStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIdentifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Identifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIfStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "IfStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLabeledStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "LabeledStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "StringLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumericLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumericLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NullLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BooleanLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRegExpLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RegExpLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLogicalExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "LogicalExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMemberExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "MemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNewExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NewExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isProgram(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Program") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRestElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RestElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isReturnStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ReturnStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSequenceExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SequenceExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isParenthesizedExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ParenthesizedExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSwitchCase(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SwitchCase") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSwitchStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SwitchStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThisExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ThisExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThrowStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ThrowStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTryStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TryStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnaryExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UnaryExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUpdateExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UpdateExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariableDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "VariableDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariableDeclarator(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "VariableDeclarator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWhileStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "WhileStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWithStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "WithStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAssignmentPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AssignmentPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrayPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrayPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrowFunctionExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrowFunctionExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportAllDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportAllDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDefaultDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportDefaultDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportNamedDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportNamedDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForOfStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForOfStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportDefaultSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportDefaultSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportNamespaceSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportNamespaceSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMetaProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "MetaProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSpreadElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SpreadElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSuper(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Super") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTaggedTemplateExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TaggedTemplateExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTemplateElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TemplateElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTemplateLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TemplateLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isYieldExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "YieldExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAnyTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AnyTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrayTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrayTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BooleanTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BooleanLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NullLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassImplements(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassImplements") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareClass(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareClass") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareInterface(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareInterface") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareModule(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareModule") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareModuleExports(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareModuleExports") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareTypeAlias(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareTypeAlias") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareOpaqueType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareOpaqueType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareVariable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareVariable") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareExportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareExportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareExportAllDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareExportAllDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclaredPredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclaredPredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExistsTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExistsTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionTypeParam(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionTypeParam") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isGenericTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "GenericTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInferredPredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InferredPredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceExtends(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterfaceExtends") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterfaceDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterfaceTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIntersectionTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "IntersectionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMixedTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "MixedTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEmptyTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EmptyTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullableTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NullableTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumberLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumberTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeInternalSlot(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeInternalSlot") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeCallProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeCallProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeIndexer(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeIndexer") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeSpreadProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeSpreadProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOpaqueType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "OpaqueType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isQualifiedTypeIdentifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "QualifiedTypeIdentifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "StringLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "StringTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThisTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ThisTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTupleTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TupleTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeofTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeofTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeAlias(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeAlias") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeCastExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeCastExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameter(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeParameter") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameterDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeParameterDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameterInstantiation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeParameterInstantiation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnionTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UnionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariance(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Variance") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVoidTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "VoidTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXAttribute(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXAttribute") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXClosingElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXClosingElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXEmptyExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXEmptyExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXExpressionContainer(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXExpressionContainer") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXSpreadChild(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXSpreadChild") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXIdentifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXIdentifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXMemberExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXMemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXNamespacedName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXNamespacedName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXOpeningElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXOpeningElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXSpreadAttribute(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXSpreadAttribute") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXText(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXText") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXFragment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXOpeningFragment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXOpeningFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXClosingFragment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXClosingFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNoop(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Noop") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPlaceholder(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Placeholder") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArgumentPlaceholder(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArgumentPlaceholder") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAwaitExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AwaitExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBindExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BindExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOptionalMemberExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "OptionalMemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPipelineTopicExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PipelineTopicExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPipelineBareFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PipelineBareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPipelinePrimaryTopicReference(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PipelinePrimaryTopicReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOptionalCallExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "OptionalCallExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassPrivateProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassPrivateProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassPrivateMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassPrivateMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImport(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Import") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDecorator(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Decorator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDoExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DoExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDefaultSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportDefaultSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportNamespaceSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportNamespaceSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPrivateName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PrivateName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBigIntLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BigIntLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSParameterProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSParameterProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSDeclareFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSDeclareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSDeclareMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSDeclareMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSQualifiedName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSQualifiedName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSCallSignatureDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSCallSignatureDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConstructSignatureDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSConstructSignatureDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSPropertySignature(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSPropertySignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSMethodSignature(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSMethodSignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIndexSignature(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSIndexSignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSAnyKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSAnyKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUnknownKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSUnknownKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNumberKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNumberKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSObjectKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSObjectKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSBooleanKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSBooleanKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSStringKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSStringKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSSymbolKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSSymbolKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSVoidKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSVoidKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUndefinedKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSUndefinedKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNullKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNullKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNeverKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNeverKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSThisType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSThisType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSFunctionType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSFunctionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConstructorType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSConstructorType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeReference(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypePredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypePredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeQuery(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeQuery") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSArrayType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSArrayType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTupleType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTupleType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSOptionalType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSOptionalType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSRestType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSRestType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUnionType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSUnionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIntersectionType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSIntersectionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConditionalType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSConditionalType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInferType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSInferType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSParenthesizedType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSParenthesizedType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeOperator(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeOperator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIndexedAccessType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSIndexedAccessType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSMappedType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSMappedType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSLiteralType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSLiteralType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExpressionWithTypeArguments(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSExpressionWithTypeArguments") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInterfaceDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSInterfaceDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInterfaceBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSInterfaceBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAliasDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeAliasDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSAsExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSAsExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAssertion(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeAssertion") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEnumDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSEnumDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEnumMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSEnumMember") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSModuleDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSModuleDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSModuleBlock(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSModuleBlock") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSImportType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSImportType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSImportEqualsDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSImportEqualsDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExternalModuleReference(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSExternalModuleReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNonNullExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNonNullExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExportAssignment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSExportAssignment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNamespaceExportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNamespaceExportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameterInstantiation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeParameterInstantiation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameterDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeParameterDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameter(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeParameter") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Expression" || "ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || "BigIntLiteral" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBinary(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Binary" || "BinaryExpression" === nodeType || "LogicalExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isScopable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Scopable" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlockParent(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BlockParent" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlock(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Statement" || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTerminatorless(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Terminatorless" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCompletionStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "CompletionStatement" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isConditional(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Conditional" || "ConditionalExpression" === nodeType || "IfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLoop(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Loop" || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWhile(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "While" || "DoWhileStatement" === nodeType || "WhileStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpressionWrapper(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFor(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "For" || "ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForXStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForXStatement" || "ForInStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Function" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionParent(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionParent" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPureish(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Pureish" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Declaration" || "FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPatternLike(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLVal(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "LVal" || "Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEntityName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Literal" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImmutable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Immutable" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUserWhitespacable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UserWhitespacable" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Method" || "ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectMember" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Property" || "ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnaryLike(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UnaryLike" || "UnaryExpression" === nodeType || "SpreadElement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClass(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Class" || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isModuleDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ModuleDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isModuleSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ModuleSpecifier" || "ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlow(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Flow" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowType" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowBaseAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowBaseAnnotation" || "AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowDeclaration" || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowPredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowPredicate" || "DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSX(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSX" || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPrivate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Private" || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeElement" || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSType" || "TSAnyKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberLiteral(node, opts) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumberLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRegexLiteral(node, opts) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RegexLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRestProperty(node, opts) { - console.trace("The node type RestProperty has been renamed to RestElement"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RestProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSpreadProperty(node, opts) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SpreadProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isScope.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isScope.js deleted file mode 100644 index c808631faf2c61..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isScope.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isScope; - -var _generated = require("./generated"); - -function isScope(node, parent) { - if ((0, _generated.isBlockStatement)(node) && (0, _generated.isFunction)(parent, { - body: node - })) { - return false; - } - - if ((0, _generated.isBlockStatement)(node) && (0, _generated.isCatchClause)(parent, { - body: node - })) { - return false; - } - - return (0, _generated.isScopable)(node); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidIdentifier.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidIdentifier.js deleted file mode 100644 index 8c54b7ac8680db..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidIdentifier.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isValidIdentifier; - -function _esutils() { - const data = _interopRequireDefault(require("esutils")); - - _esutils = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isValidIdentifier(name) { - if (typeof name !== "string" || _esutils().default.keyword.isReservedWordES6(name, true)) { - return false; - } else if (name === "await") { - return false; - } else { - return _esutils().default.keyword.isIdentifierNameES6(name); - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/validate.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/validate.js deleted file mode 100644 index 092da9913d9e71..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/validate.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = validate; -exports.validateField = validateField; - -var _definitions = require("../definitions"); - -function validate(node, key, val) { - if (!node) return; - const fields = _definitions.NODE_FIELDS[node.type]; - if (!fields) return; - const field = fields[key]; - validateField(node, key, val, field); -} - -function validateField(node, key, val, field) { - if (!field || !field.validate) return; - if (field.optional && val == null) return; - field.validate(node, key, val); -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/types/package.json deleted file mode 100644 index e13eb11bd5a9ed..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - }, - "deprecated": false, - "description": "Babel Types is a Lodash-esque utility library for AST nodes", - "devDependencies": { - "@babel/generator": "^7.5.5", - "@babel/parser": "^7.5.5" - }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/types", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-types" - }, - "types": "lib/index.d.ts", - "version": "7.5.5" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/flow.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/flow.js deleted file mode 100644 index daab2411d74235..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/flow.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; - -const t = require("../../"); -const stringifyValidator = require("../utils/stringifyValidator"); -const toFunctionName = require("../utils/toFunctionName"); - -const NODE_PREFIX = "BabelNode"; - -let code = `// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/flow.js for script used. - -declare class ${NODE_PREFIX}Comment { - value: string; - start: number; - end: number; - loc: ${NODE_PREFIX}SourceLocation; -} - -declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment { - type: "CommentBlock"; -} - -declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment { - type: "CommentLine"; -} - -declare class ${NODE_PREFIX}SourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -declare class ${NODE_PREFIX} { - leadingComments?: Array<${NODE_PREFIX}Comment>; - innerComments?: Array<${NODE_PREFIX}Comment>; - trailingComments?: Array<${NODE_PREFIX}Comment>; - start: ?number; - end: ?number; - loc: ?${NODE_PREFIX}SourceLocation; -}\n\n`; - -// - -const lines = []; - -for (const type in t.NODE_FIELDS) { - const fields = t.NODE_FIELDS[type]; - - const struct = ['type: "' + type + '";']; - const args = []; - - Object.keys(t.NODE_FIELDS[type]) - .sort((fieldA, fieldB) => { - const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); - const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); - if (indexA === indexB) return fieldA < fieldB ? -1 : 1; - if (indexA === -1) return 1; - if (indexB === -1) return -1; - return indexA - indexB; - }) - .forEach(fieldName => { - const field = fields[fieldName]; - - let suffix = ""; - if (field.optional || field.default != null) suffix += "?"; - - let typeAnnotation = "any"; - - const validate = field.validate; - if (validate) { - typeAnnotation = stringifyValidator(validate, NODE_PREFIX); - } - - if (typeAnnotation) { - suffix += ": " + typeAnnotation; - } - - args.push(t.toBindingIdentifierName(fieldName) + suffix); - - if (t.isValidIdentifier(fieldName)) { - struct.push(fieldName + suffix + ";"); - } - }); - - code += `declare class ${NODE_PREFIX}${type} extends ${NODE_PREFIX} { - ${struct.join("\n ").trim()} -}\n\n`; - - // Flow chokes on super() and import() :/ - if (type !== "Super" && type !== "Import") { - lines.push( - `declare function ${toFunctionName(type)}(${args.join( - ", " - )}): ${NODE_PREFIX}${type};` - ); - } -} - -for (let i = 0; i < t.TYPES.length; i++) { - let decl = `declare function is${ - t.TYPES[i] - }(node: ?Object, opts?: ?Object): boolean`; - - if (t.NODE_FIELDS[t.TYPES[i]]) { - decl += ` %checks (node instanceof ${NODE_PREFIX}${t.TYPES[i]})`; - } - - lines.push(decl); -} - -lines.push( - `declare function validate(n: BabelNode, key: string, value: mixed): void;`, - `declare function clone(n: T): T;`, - `declare function cloneDeep(n: T): T;`, - `declare function removeProperties(n: T, opts: ?{}): void;`, - `declare function removePropertiesDeep(n: T, opts: ?{}): T;`, - `declare type TraversalAncestors = Array<{ - node: BabelNode, - key: string, - index?: number, - }>; - declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; - declare type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, - };`.replace(/(^|\n) {2}/g, "$1"), - // eslint-disable-next-line - `declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void;` -); - -for (const type in t.FLIPPED_ALIAS_KEYS) { - const types = t.FLIPPED_ALIAS_KEYS[type]; - code += `type ${NODE_PREFIX}${type} = ${types - .map(type => `${NODE_PREFIX}${type}`) - .join(" | ")};\n`; -} - -code += `\ndeclare module "@babel/types" { - ${lines - .join("\n") - .replace(/\n/g, "\n ") - .trim()} -}\n`; - -// - -process.stdout.write(code); diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateBuilders.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateBuilders.js deleted file mode 100644 index 08a5b6fc61555f..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateBuilders.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -const definitions = require("../../lib/definitions"); -const formatBuilderName = require("../utils/formatBuilderName"); -const lowerFirst = require("../utils/lowerFirst"); - -module.exports = function generateBuilders() { - let output = `// @flow -/* - * This file is auto-generated! Do not modify it directly. - * To re-generate run 'make build' - */ -import builder from "../builder";\n\n`; - - Object.keys(definitions.BUILDER_KEYS).forEach(type => { - output += `export function ${type}(...args: Array): Object { return builder("${type}", ...args); } -export { ${type} as ${formatBuilderName(type)} };\n`; - - // This is needed for backwards compatibility. - // It should be removed in the next major version. - // JSXIdentifier -> jSXIdentifier - if (/^[A-Z]{2}/.test(type)) { - output += `export { ${type} as ${lowerFirst(type)} }\n`; - } - }); - - Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { - const newType = definitions.DEPRECATED_KEYS[type]; - output += `export function ${type}(...args: Array): Object { - console.trace("The node type ${type} has been renamed to ${newType}"); - return ${type}("${type}", ...args); -} -export { ${type} as ${formatBuilderName(type)} };\n`; - - // This is needed for backwards compatibility. - // It should be removed in the next major version. - // JSXIdentifier -> jSXIdentifier - if (/^[A-Z]{2}/.test(type)) { - output += `export { ${type} as ${lowerFirst(type)} }\n`; - } - }); - - return output; -}; diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/typescript.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/typescript.js deleted file mode 100644 index b6019ec373240d..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/typescript.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; - -const t = require("../../"); -const stringifyValidator = require("../utils/stringifyValidator"); -const toFunctionName = require("../utils/toFunctionName"); - -let code = `// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/typescript.js for script used. - -interface BaseComment { - value: string; - start: number; - end: number; - loc: SourceLocation; - type: "CommentBlock" | "CommentLine"; -} - -export interface CommentBlock extends BaseComment { - type: "CommentBlock"; -} - -export interface CommentLine extends BaseComment { - type: "CommentLine"; -} - -export type Comment = CommentBlock | CommentLine; - -export interface SourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -interface BaseNode { - leadingComments: ReadonlyArray | null; - innerComments: ReadonlyArray | null; - trailingComments: ReadonlyArray | null; - start: number | null; - end: number | null; - loc: SourceLocation | null; - type: Node["type"]; -} - -export type Node = ${t.TYPES.sort().join(" | ")};\n\n`; - -// - -const lines = []; - -for (const type in t.NODE_FIELDS) { - const fields = t.NODE_FIELDS[type]; - const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type); - - const struct = ['type: "' + type + '";']; - const args = []; - - fieldNames.forEach(fieldName => { - const field = fields[fieldName]; - let typeAnnotation = stringifyValidator(field.validate, ""); - - if (isNullable(field) && !hasDefault(field)) { - typeAnnotation += " | null"; - } - - if (areAllRemainingFieldsNullable(fieldName, fieldNames, fields)) { - args.push( - `${t.toBindingIdentifierName(fieldName)}${ - isNullable(field) ? "?:" : ":" - } ${typeAnnotation}` - ); - } else { - args.push( - `${t.toBindingIdentifierName(fieldName)}: ${typeAnnotation}${ - isNullable(field) ? " | undefined" : "" - }` - ); - } - - const alphaNumeric = /^\w+$/; - - if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) { - struct.push(`${fieldName}: ${typeAnnotation};`); - } else { - struct.push(`"${fieldName}": ${typeAnnotation};`); - } - }); - - code += `export interface ${type} extends BaseNode { - ${struct.join("\n ").trim()} -}\n\n`; - - // super and import are reserved words in JavaScript - if (type !== "Super" && type !== "Import") { - lines.push( - `export function ${toFunctionName(type)}(${args.join(", ")}): ${type};` - ); - } -} - -for (let i = 0; i < t.TYPES.length; i++) { - let decl = `export function is${ - t.TYPES[i] - }(node: object | null | undefined, opts?: object | null): `; - - if (t.NODE_FIELDS[t.TYPES[i]]) { - decl += `node is ${t.TYPES[i]};`; - } else if (t.FLIPPED_ALIAS_KEYS[t.TYPES[i]]) { - decl += `node is ${t.TYPES[i]};`; - } else { - decl += `boolean;`; - } - - lines.push(decl); -} - -lines.push( - `export function validate(n: Node, key: string, value: any): void;`, - `export function clone(n: T): T;`, - `export function cloneDeep(n: T): T;`, - `export function removeProperties( - n: Node, - opts?: { preserveComments: boolean } | null -): void;`, - `export function removePropertiesDeep( - n: T, - opts?: { preserveComments: boolean } | null -): T;`, - `export type TraversalAncestors = ReadonlyArray<{ - node: Node, - key: string, - index?: number, - }>; - export type TraversalHandler = (node: Node, parent: TraversalAncestors, type: T) => void; - export type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, - };`.replace(/(^|\n) {2}/g, "$1"), - // eslint-disable-next-line - `export function traverse(n: Node, h: TraversalHandler | TraversalHandlers, state?: T): void;` -); - -for (const type in t.DEPRECATED_KEYS) { - code += `/** - * @deprecated Use \`${t.DEPRECATED_KEYS[type]}\` - */ -export type ${type} = ${t.DEPRECATED_KEYS[type]};\n -`; -} - -for (const type in t.FLIPPED_ALIAS_KEYS) { - const types = t.FLIPPED_ALIAS_KEYS[type]; - code += `export type ${type} = ${types - .map(type => `${type}`) - .join(" | ")};\n`; -} -code += "\n"; - -code += "export interface Aliases {\n"; -for (const type in t.FLIPPED_ALIAS_KEYS) { - code += ` ${type}: ${type};\n`; -} -code += "}\n\n"; - -code += lines.join("\n") + "\n"; - -// - -process.stdout.write(code); - -// - -function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) { - const index = fieldNames.indexOf(fieldName); - return fieldNames.slice(index).every(_ => isNullable(fields[_])); -} - -function hasDefault(field) { - return field.default != null; -} - -function isNullable(field) { - return field.optional || hasDefault(field); -} - -function sortFieldNames(fields, type) { - return fields.sort((fieldA, fieldB) => { - const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); - const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); - if (indexA === indexB) return fieldA < fieldB ? -1 : 1; - if (indexA === -1) return 1; - if (indexB === -1) return -1; - return indexA - indexB; - }); -} diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/formatBuilderName.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/formatBuilderName.js deleted file mode 100644 index 1b543a9bfaf570..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/formatBuilderName.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -const toLowerCase = Function.call.bind("".toLowerCase); - -module.exports = function formatBuilderName(type) { - // FunctionExpression -> functionExpression - // JSXIdentifier -> jsxIdentifier - return type.replace(/^([A-Z](?=[a-z])|[A-Z]+(?=[A-Z]))/, toLowerCase); -}; diff --git a/tools/node_modules/babel-eslint/node_modules/ansi-styles/package.json b/tools/node_modules/babel-eslint/node_modules/ansi-styles/package.json deleted file mode 100644 index 5663ace24b4607..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "ava": { - "require": "babel-polyfill" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-styles/issues" - }, - "bundleDependencies": false, - "dependencies": { - "color-convert": "^1.9.0" - }, - "deprecated": false, - "description": "ANSI escape codes for styling strings in the terminal", - "devDependencies": { - "ava": "*", - "babel-polyfill": "^6.23.0", - "svg-term-cli": "^2.1.1", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-styles#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "ansi-styles", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-styles.git" - }, - "scripts": { - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", - "test": "xo && ava" - }, - "version": "3.2.1" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/chalk/package.json b/tools/node_modules/babel-eslint/node_modules/chalk/package.json deleted file mode 100644 index 270fecdc347d42..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/chalk/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/chalk/chalk/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "deprecated": false, - "description": "Terminal string styling done right", - "devDependencies": { - "ava": "*", - "coveralls": "^3.0.0", - "execa": "^0.9.0", - "flow-bin": "^0.68.0", - "import-fresh": "^2.0.0", - "matcha": "^0.7.0", - "nyc": "^11.0.2", - "resolve-from": "^4.0.0", - "typescript": "^2.5.3", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "templates.js", - "types/index.d.ts", - "index.js.flow" - ], - "homepage": "https://github.com/chalk/chalk#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "chalk", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/chalk.git" - }, - "scripts": { - "bench": "matcha benchmark.js", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava" - }, - "types": "types/index.d.ts", - "version": "2.4.2", - "xo": { - "envs": [ - "node", - "mocha" - ], - "ignores": [ - "test/_flow.js" - ] - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/color-convert/package.json b/tools/node_modules/babel-eslint/node_modules/color-convert/package.json deleted file mode 100644 index 991f69308c29f4..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/color-convert/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "author": { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - "bugs": { - "url": "https://github.com/Qix-/color-convert/issues" - }, - "bundleDependencies": false, - "dependencies": { - "color-name": "1.1.3" - }, - "deprecated": false, - "description": "Plain color conversion functions", - "devDependencies": { - "chalk": "1.1.1", - "xo": "0.11.2" - }, - "files": [ - "index.js", - "conversions.js", - "css-keywords.js", - "route.js" - ], - "homepage": "https://github.com/Qix-/color-convert#readme", - "keywords": [ - "color", - "colour", - "convert", - "converter", - "conversion", - "rgb", - "hsl", - "hsv", - "hwb", - "cmyk", - "ansi", - "ansi16" - ], - "license": "MIT", - "name": "color-convert", - "repository": { - "type": "git", - "url": "git+https://github.com/Qix-/color-convert.git" - }, - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" - }, - "version": "1.9.3", - "xo": { - "rules": { - "default-case": 0, - "no-inline-comments": 0, - "operator-linebreak": 0 - } - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/color-name/package.json b/tools/node_modules/babel-eslint/node_modules/color-name/package.json deleted file mode 100644 index 87d0e72ec56239..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/color-name/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "author": { - "name": "DY", - "email": "dfcreative@gmail.com" - }, - "bugs": { - "url": "https://github.com/dfcreative/color-name/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A list of color names and its values", - "homepage": "https://github.com/dfcreative/color-name", - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "license": "MIT", - "main": "index.js", - "name": "color-name", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/dfcreative/color-name.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.1.3" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/debug/dist/debug.js b/tools/node_modules/babel-eslint/node_modules/debug/dist/debug.js deleted file mode 100644 index 89ad0c2175c3d6..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/debug/dist/debug.js +++ /dev/null @@ -1,912 +0,0 @@ -"use strict"; - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -(function (f) { - if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { - module.exports = f(); - } else if (typeof define === "function" && define.amd) { - define([], f); - } else { - var g; - - if (typeof window !== "undefined") { - g = window; - } else if (typeof global !== "undefined") { - g = global; - } else if (typeof self !== "undefined") { - g = self; - } else { - g = this; - } - - g.debug = f(); - } -})(function () { - var define, module, exports; - return function () { - function r(e, n, t) { - function o(i, f) { - if (!n[i]) { - if (!e[i]) { - var c = "function" == typeof require && require; - if (!f && c) return c(i, !0); - if (u) return u(i, !0); - var a = new Error("Cannot find module '" + i + "'"); - throw a.code = "MODULE_NOT_FOUND", a; - } - - var p = n[i] = { - exports: {} - }; - e[i][0].call(p.exports, function (r) { - var n = e[i][1][r]; - return o(n || r); - }, p, p.exports, r, e, n, t); - } - - return n[i].exports; - } - - for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) { - o(t[i]); - } - - return o; - } - - return r; - }()({ - 1: [function (require, module, exports) { - /** - * Helpers. - */ - var s = 1000; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - /** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - - module.exports = function (val, options) { - options = options || {}; - - var type = _typeof(val); - - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - - throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); - }; - /** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - - - function parse(str) { - str = String(str); - - if (str.length > 100) { - return; - } - - var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); - - if (!match) { - return; - } - - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - - case 'weeks': - case 'week': - case 'w': - return n * w; - - case 'days': - case 'day': - case 'd': - return n * d; - - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - - default: - return undefined; - } - } - /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - - function fmtShort(ms) { - var msAbs = Math.abs(ms); - - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - - return ms + 'ms'; - } - /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - - function fmtLong(ms) { - var msAbs = Math.abs(ms); - - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - - return ms + ' ms'; - } - /** - * Pluralization helper. - */ - - - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); - } - }, {}], - 2: [function (require, module, exports) { - // shim for using process in browser - var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it - // don't break things. But we need to wrap it in a try catch in case it is - // wrapped in strict mode code which doesn't define any globals. It's inside a - // function because try/catches deoptimize in certain engines. - - var cachedSetTimeout; - var cachedClearTimeout; - - function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); - } - - function defaultClearTimeout() { - throw new Error('clearTimeout has not been defined'); - } - - (function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } - })(); - - function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } // if setTimeout wasn't available but was latter defined - - - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - } - - function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } // if clearTimeout wasn't available but was latter defined - - - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - } - - var queue = []; - var draining = false; - var currentQueue; - var queueIndex = -1; - - function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - - draining = false; - - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - - if (queue.length) { - drainQueue(); - } - } - - function drainQueue() { - if (draining) { - return; - } - - var timeout = runTimeout(cleanUpNextTick); - draining = true; - var len = queue.length; - - while (len) { - currentQueue = queue; - queue = []; - - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - - queueIndex = -1; - len = queue.length; - } - - currentQueue = null; - draining = false; - runClearTimeout(timeout); - } - - process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - - queue.push(new Item(fun, args)); - - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } - }; // v8 likes predictible objects - - - function Item(fun, array) { - this.fun = fun; - this.array = array; - } - - Item.prototype.run = function () { - this.fun.apply(null, this.array); - }; - - process.title = 'browser'; - process.browser = true; - process.env = {}; - process.argv = []; - process.version = ''; // empty string to avoid regexp issues - - process.versions = {}; - - function noop() {} - - process.on = noop; - process.addListener = noop; - process.once = noop; - process.off = noop; - process.removeListener = noop; - process.removeAllListeners = noop; - process.emit = noop; - process.prependListener = noop; - process.prependOnceListener = noop; - - process.listeners = function (name) { - return []; - }; - - process.binding = function (name) { - throw new Error('process.binding is not supported'); - }; - - process.cwd = function () { - return '/'; - }; - - process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); - }; - - process.umask = function () { - return 0; - }; - }, {}], - 3: [function (require, module, exports) { - /** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - Object.keys(env).forEach(function (key) { - createDebug[key] = env[key]; - }); - /** - * Active `debug` instances. - */ - - createDebug.instances = []; - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - - createDebug.formatters = {}; - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - - function selectColor(namespace) { - var hash = 0; - - for (var i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - - createDebug.selectColor = selectColor; - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - - function createDebug(namespace) { - var prevTime; - - function debug() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - // Disabled? - if (!debug.enabled) { - return; - } - - var self = debug; // Set `diff` timestamp - - var curr = Number(new Date()); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } // Apply any `formatters` transformations - - - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return match; - } - - index++; - var formatter = createDebug.formatters[format]; - - if (typeof formatter === 'function') { - var val = args[index]; - match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` - - args.splice(index, 1); - index--; - } - - return match; - }); // Apply env-specific formatting (colors, etc.) - - createDebug.formatArgs.call(self, args); - var logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = createDebug.enabled(namespace); - debug.useColors = createDebug.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - debug.extend = extend; // Debug.formatArgs = formatArgs; - // debug.rawLog = rawLog; - // env-specific initialization logic for debug instances - - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - createDebug.instances.push(debug); - return debug; - } - - function destroy() { - var index = createDebug.instances.indexOf(this); - - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - - return false; - } - - function extend(namespace, delimiter) { - var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - - - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.names = []; - createDebug.skips = []; - var i; - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < createDebug.instances.length; i++) { - var instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - - - function disable() { - var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) { - return '-' + namespace; - }))).join(','); - createDebug.enable(''); - return namespaces; - } - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - - - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - var i; - var len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - - - function toNamespace(regexp) { - return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*'); - } - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - - - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - - return val; - } - - createDebug.enable(createDebug.load()); - return createDebug; - } - - module.exports = setup; - }, { - "ms": 1 - }], - 4: [function (require, module, exports) { - (function (process) { - /* eslint-env browser */ - - /** - * This is the web browser implementation of `debug()`. - */ - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - /** - * Colors. - */ - - exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; - /** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - // eslint-disable-next-line complexity - - function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } // Internet Explorer and Edge do not support colors. - - - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - - - return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 - typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - } - /** - * Colorize log arguments if enabled. - * - * @api public - */ - - - function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function (match) { - if (match === '%%') { - return; - } - - index++; - - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - /** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - - - function log() { - var _console; - - // This hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); - } - /** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - - - function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } - } - /** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - - - function load() { - var r; - - try { - r = exports.storage.getItem('debug'); - } catch (error) {} // Swallow - // XXX (@Qix-) should we be logging these? - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - - - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; - } - /** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - - - function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } - } - - module.exports = require('./common')(exports); - var formatters = module.exports.formatters; - /** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - - formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } - }; - }).call(this, require('_process')); - }, { - "./common": 3, - "_process": 2 - }] - }, {}, [4])(4); -}); diff --git a/tools/node_modules/babel-eslint/node_modules/debug/package.json b/tools/node_modules/babel-eslint/node_modules/debug/package.json deleted file mode 100644 index 7bc94f7f061070..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/debug/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "browser": "./src/browser.js", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - } - ], - "dependencies": { - "ms": "^2.1.1" - }, - "deprecated": false, - "description": "small debugging utility", - "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "browserify": "14.4.0", - "chai": "^3.5.0", - "concurrently": "^3.1.0", - "coveralls": "^3.0.2", - "istanbul": "^0.4.5", - "karma": "^3.0.0", - "karma-chai": "^0.1.0", - "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", - "xo": "^0.23.0" - }, - "files": [ - "src", - "dist/debug.js", - "LICENSE", - "README.md" - ], - "homepage": "https://github.com/visionmedia/debug#readme", - "keywords": [ - "debug", - "log", - "debugger" - ], - "license": "MIT", - "main": "./src/index.js", - "name": "debug", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "scripts": { - "build": "npm run build:debug && npm run build:test", - "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js", - "build:test": "babel -d dist test.js", - "clean": "rimraf dist coverage", - "lint": "xo", - "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .", - "pretest:browser": "npm run build", - "test": "npm run test:node && npm run test:browser", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls", - "test:node": "istanbul cover _mocha -- test.js" - }, - "unpkg": "./dist/debug.js", - "version": "4.1.1" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/package.json b/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/package.json deleted file mode 100644 index ced6973347e903..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/escape-string-regexp/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Escape RegExp special characters", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=0.8.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", - "keywords": [ - "escape", - "regex", - "regexp", - "re", - "regular", - "expression", - "string", - "str", - "special", - "characters" - ], - "license": "MIT", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Joshua Boy Nicolai Appelman", - "email": "joshua@jbna.nl", - "url": "jbna.nl" - } - ], - "name": "escape-string-regexp", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.5" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/package.json b/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/package.json deleted file mode 100644 index 68eec940691e0b..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "author": { - "name": "Toru Nagashima", - "url": "https://github.com/mysticatea" - }, - "bugs": { - "url": "https://github.com/eslint/eslint-visitor-keys/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Constants and utilities about visitor keys to traverse AST.", - "devDependencies": { - "eslint": "^4.7.2", - "eslint-config-eslint": "^4.0.0", - "eslint-release": "^1.0.0", - "mocha": "^3.5.3", - "nyc": "^11.2.1", - "opener": "^1.4.3" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/eslint/eslint-visitor-keys#readme", - "keywords": [], - "license": "Apache-2.0", - "main": "lib/index.js", - "name": "eslint-visitor-keys", - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/eslint-visitor-keys.git" - }, - "scripts": { - "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", - "generate-alpharelease": "eslint-generate-prerelease alpha", - "generate-betarelease": "eslint-generate-prerelease beta", - "generate-rcrelease": "eslint-generate-prerelease rc", - "generate-release": "eslint-generate-release", - "lint": "eslint lib tests/lib", - "pretest": "npm run -s lint", - "publish-release": "eslint-publish-release", - "test": "nyc mocha tests/lib" - }, - "version": "1.1.0" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/README.md b/tools/node_modules/babel-eslint/node_modules/esutils/README.md deleted file mode 100644 index 517526cfb99b97..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/esutils/README.md +++ /dev/null @@ -1,174 +0,0 @@ -### esutils [![Build Status](https://secure.travis-ci.org/estools/esutils.svg)](http://travis-ci.org/estools/esutils) -esutils ([esutils](http://github.com/estools/esutils)) is -utility box for ECMAScript language tools. - -### API - -### ast - -#### ast.isExpression(node) - -Returns true if `node` is an Expression as defined in ECMA262 edition 5.1 section -[11](https://es5.github.io/#x11). - -#### ast.isStatement(node) - -Returns true if `node` is a Statement as defined in ECMA262 edition 5.1 section -[12](https://es5.github.io/#x12). - -#### ast.isIterationStatement(node) - -Returns true if `node` is an IterationStatement as defined in ECMA262 edition -5.1 section [12.6](https://es5.github.io/#x12.6). - -#### ast.isSourceElement(node) - -Returns true if `node` is a SourceElement as defined in ECMA262 edition 5.1 -section [14](https://es5.github.io/#x14). - -#### ast.trailingStatement(node) - -Returns `Statement?` if `node` has trailing `Statement`. -```js -if (cond) - consequent; -``` -When taking this `IfStatement`, returns `consequent;` statement. - -#### ast.isProblematicIfStatement(node) - -Returns true if `node` is a problematic IfStatement. If `node` is a problematic `IfStatement`, `node` cannot be represented as an one on one JavaScript code. -```js -{ - type: 'IfStatement', - consequent: { - type: 'WithStatement', - body: { - type: 'IfStatement', - consequent: {type: 'EmptyStatement'} - } - }, - alternate: {type: 'EmptyStatement'} -} -``` -The above node cannot be represented as a JavaScript code, since the top level `else` alternate belongs to an inner `IfStatement`. - - -### code - -#### code.isDecimalDigit(code) - -Return true if provided code is decimal digit. - -#### code.isHexDigit(code) - -Return true if provided code is hexadecimal digit. - -#### code.isOctalDigit(code) - -Return true if provided code is octal digit. - -#### code.isWhiteSpace(code) - -Return true if provided code is white space. White space characters are formally defined in ECMA262. - -#### code.isLineTerminator(code) - -Return true if provided code is line terminator. Line terminator characters are formally defined in ECMA262. - -#### code.isIdentifierStart(code) - -Return true if provided code can be the first character of ECMA262 Identifier. They are formally defined in ECMA262. - -#### code.isIdentifierPart(code) - -Return true if provided code can be the trailing character of ECMA262 Identifier. They are formally defined in ECMA262. - -### keyword - -#### keyword.isKeywordES5(id, strict) - -Returns `true` if provided identifier string is a Keyword or Future Reserved Word -in ECMA262 edition 5.1. They are formally defined in ECMA262 sections -[7.6.1.1](http://es5.github.io/#x7.6.1.1) and [7.6.1.2](http://es5.github.io/#x7.6.1.2), -respectively. If the `strict` flag is truthy, this function additionally checks whether -`id` is a Keyword or Future Reserved Word under strict mode. - -#### keyword.isKeywordES6(id, strict) - -Returns `true` if provided identifier string is a Keyword or Future Reserved Word -in ECMA262 edition 6. They are formally defined in ECMA262 sections -[11.6.2.1](http://ecma-international.org/ecma-262/6.0/#sec-keywords) and -[11.6.2.2](http://ecma-international.org/ecma-262/6.0/#sec-future-reserved-words), -respectively. If the `strict` flag is truthy, this function additionally checks whether -`id` is a Keyword or Future Reserved Word under strict mode. - -#### keyword.isReservedWordES5(id, strict) - -Returns `true` if provided identifier string is a Reserved Word in ECMA262 edition 5.1. -They are formally defined in ECMA262 section [7.6.1](http://es5.github.io/#x7.6.1). -If the `strict` flag is truthy, this function additionally checks whether `id` -is a Reserved Word under strict mode. - -#### keyword.isReservedWordES6(id, strict) - -Returns `true` if provided identifier string is a Reserved Word in ECMA262 edition 6. -They are formally defined in ECMA262 section [11.6.2](http://ecma-international.org/ecma-262/6.0/#sec-reserved-words). -If the `strict` flag is truthy, this function additionally checks whether `id` -is a Reserved Word under strict mode. - -#### keyword.isRestrictedWord(id) - -Returns `true` if provided identifier string is one of `eval` or `arguments`. -They are restricted in strict mode code throughout ECMA262 edition 5.1 and -in ECMA262 edition 6 section [12.1.1](http://ecma-international.org/ecma-262/6.0/#sec-identifiers-static-semantics-early-errors). - -#### keyword.isIdentifierNameES5(id) - -Return true if provided identifier string is an IdentifierName as specified in -ECMA262 edition 5.1 section [7.6](https://es5.github.io/#x7.6). - -#### keyword.isIdentifierNameES6(id) - -Return true if provided identifier string is an IdentifierName as specified in -ECMA262 edition 6 section [11.6](http://ecma-international.org/ecma-262/6.0/#sec-names-and-keywords). - -#### keyword.isIdentifierES5(id, strict) - -Return true if provided identifier string is an Identifier as specified in -ECMA262 edition 5.1 section [7.6](https://es5.github.io/#x7.6). If the `strict` -flag is truthy, this function additionally checks whether `id` is an Identifier -under strict mode. - -#### keyword.isIdentifierES6(id, strict) - -Return true if provided identifier string is an Identifier as specified in -ECMA262 edition 6 section [12.1](http://ecma-international.org/ecma-262/6.0/#sec-identifiers). -If the `strict` flag is truthy, this function additionally checks whether `id` -is an Identifier under strict mode. - -### License - -Copyright (C) 2013 [Yusuke Suzuki](http://github.com/Constellation) - (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/lib/ast.js b/tools/node_modules/babel-eslint/node_modules/esutils/lib/ast.js deleted file mode 100644 index 8faadae1ce736d..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/esutils/lib/ast.js +++ /dev/null @@ -1,144 +0,0 @@ -/* - Copyright (C) 2013 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -(function () { - 'use strict'; - - function isExpression(node) { - if (node == null) { return false; } - switch (node.type) { - case 'ArrayExpression': - case 'AssignmentExpression': - case 'BinaryExpression': - case 'CallExpression': - case 'ConditionalExpression': - case 'FunctionExpression': - case 'Identifier': - case 'Literal': - case 'LogicalExpression': - case 'MemberExpression': - case 'NewExpression': - case 'ObjectExpression': - case 'SequenceExpression': - case 'ThisExpression': - case 'UnaryExpression': - case 'UpdateExpression': - return true; - } - return false; - } - - function isIterationStatement(node) { - if (node == null) { return false; } - switch (node.type) { - case 'DoWhileStatement': - case 'ForInStatement': - case 'ForStatement': - case 'WhileStatement': - return true; - } - return false; - } - - function isStatement(node) { - if (node == null) { return false; } - switch (node.type) { - case 'BlockStatement': - case 'BreakStatement': - case 'ContinueStatement': - case 'DebuggerStatement': - case 'DoWhileStatement': - case 'EmptyStatement': - case 'ExpressionStatement': - case 'ForInStatement': - case 'ForStatement': - case 'IfStatement': - case 'LabeledStatement': - case 'ReturnStatement': - case 'SwitchStatement': - case 'ThrowStatement': - case 'TryStatement': - case 'VariableDeclaration': - case 'WhileStatement': - case 'WithStatement': - return true; - } - return false; - } - - function isSourceElement(node) { - return isStatement(node) || node != null && node.type === 'FunctionDeclaration'; - } - - function trailingStatement(node) { - switch (node.type) { - case 'IfStatement': - if (node.alternate != null) { - return node.alternate; - } - return node.consequent; - - case 'LabeledStatement': - case 'ForStatement': - case 'ForInStatement': - case 'WhileStatement': - case 'WithStatement': - return node.body; - } - return null; - } - - function isProblematicIfStatement(node) { - var current; - - if (node.type !== 'IfStatement') { - return false; - } - if (node.alternate == null) { - return false; - } - current = node.consequent; - do { - if (current.type === 'IfStatement') { - if (current.alternate == null) { - return true; - } - } - current = trailingStatement(current); - } while (current); - - return false; - } - - module.exports = { - isExpression: isExpression, - isStatement: isStatement, - isIterationStatement: isIterationStatement, - isSourceElement: isSourceElement, - isProblematicIfStatement: isProblematicIfStatement, - - trailingStatement: trailingStatement - }; -}()); -/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/lib/code.js b/tools/node_modules/babel-eslint/node_modules/esutils/lib/code.js deleted file mode 100644 index 23136af91f9fbc..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/esutils/lib/code.js +++ /dev/null @@ -1,135 +0,0 @@ -/* - Copyright (C) 2013-2014 Yusuke Suzuki - Copyright (C) 2014 Ivan Nikulin - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -(function () { - 'use strict'; - - var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; - - // See `tools/generate-identifier-regex.js`. - ES5Regex = { - // ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierStart: - NonAsciiIdentifierStart: /[\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-\u1884\u1887-\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\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]/, - // ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierPart: - NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ - }; - - ES6Regex = { - // ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierStart: - NonAsciiIdentifierStart: /[\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, - // ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierPart: - NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\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-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ - }; - - function isDecimalDigit(ch) { - return 0x30 <= ch && ch <= 0x39; // 0..9 - } - - function isHexDigit(ch) { - return 0x30 <= ch && ch <= 0x39 || // 0..9 - 0x61 <= ch && ch <= 0x66 || // a..f - 0x41 <= ch && ch <= 0x46; // A..F - } - - function isOctalDigit(ch) { - return ch >= 0x30 && ch <= 0x37; // 0..7 - } - - // 7.2 White Space - - NON_ASCII_WHITESPACES = [ - 0x1680, - 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, - 0x202F, 0x205F, - 0x3000, - 0xFEFF - ]; - - function isWhiteSpace(ch) { - return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || - ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0; - } - - // 7.3 Line Terminators - - function isLineTerminator(ch) { - return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029; - } - - // 7.6 Identifier Names and Identifiers - - function fromCodePoint(cp) { - if (cp <= 0xFFFF) { return String.fromCharCode(cp); } - var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800); - var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00); - return cu1 + cu2; - } - - IDENTIFIER_START = new Array(0x80); - for(ch = 0; ch < 0x80; ++ch) { - IDENTIFIER_START[ch] = - ch >= 0x61 && ch <= 0x7A || // a..z - ch >= 0x41 && ch <= 0x5A || // A..Z - ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) - } - - IDENTIFIER_PART = new Array(0x80); - for(ch = 0; ch < 0x80; ++ch) { - IDENTIFIER_PART[ch] = - ch >= 0x61 && ch <= 0x7A || // a..z - ch >= 0x41 && ch <= 0x5A || // A..Z - ch >= 0x30 && ch <= 0x39 || // 0..9 - ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore) - } - - function isIdentifierStartES5(ch) { - return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); - } - - function isIdentifierPartES5(ch) { - return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); - } - - function isIdentifierStartES6(ch) { - return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); - } - - function isIdentifierPartES6(ch) { - return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); - } - - module.exports = { - isDecimalDigit: isDecimalDigit, - isHexDigit: isHexDigit, - isOctalDigit: isOctalDigit, - isWhiteSpace: isWhiteSpace, - isLineTerminator: isLineTerminator, - isIdentifierStartES5: isIdentifierStartES5, - isIdentifierPartES5: isIdentifierPartES5, - isIdentifierStartES6: isIdentifierStartES6, - isIdentifierPartES6: isIdentifierPartES6 - }; -}()); -/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/lib/keyword.js b/tools/node_modules/babel-eslint/node_modules/esutils/lib/keyword.js deleted file mode 100644 index 13c8c6a967caf0..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/esutils/lib/keyword.js +++ /dev/null @@ -1,165 +0,0 @@ -/* - Copyright (C) 2013 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -(function () { - 'use strict'; - - var code = require('./code'); - - function isStrictModeReservedWordES6(id) { - switch (id) { - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'let': - return true; - default: - return false; - } - } - - function isKeywordES5(id, strict) { - // yield should not be treated as keyword under non-strict mode. - if (!strict && id === 'yield') { - return false; - } - return isKeywordES6(id, strict); - } - - function isKeywordES6(id, strict) { - if (strict && isStrictModeReservedWordES6(id)) { - return true; - } - - switch (id.length) { - case 2: - return (id === 'if') || (id === 'in') || (id === 'do'); - case 3: - return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try'); - case 4: - return (id === 'this') || (id === 'else') || (id === 'case') || - (id === 'void') || (id === 'with') || (id === 'enum'); - case 5: - return (id === 'while') || (id === 'break') || (id === 'catch') || - (id === 'throw') || (id === 'const') || (id === 'yield') || - (id === 'class') || (id === 'super'); - case 6: - return (id === 'return') || (id === 'typeof') || (id === 'delete') || - (id === 'switch') || (id === 'export') || (id === 'import'); - case 7: - return (id === 'default') || (id === 'finally') || (id === 'extends'); - case 8: - return (id === 'function') || (id === 'continue') || (id === 'debugger'); - case 10: - return (id === 'instanceof'); - default: - return false; - } - } - - function isReservedWordES5(id, strict) { - return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict); - } - - function isReservedWordES6(id, strict) { - return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict); - } - - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; - } - - function isIdentifierNameES5(id) { - var i, iz, ch; - - if (id.length === 0) { return false; } - - ch = id.charCodeAt(0); - if (!code.isIdentifierStartES5(ch)) { - return false; - } - - for (i = 1, iz = id.length; i < iz; ++i) { - ch = id.charCodeAt(i); - if (!code.isIdentifierPartES5(ch)) { - return false; - } - } - return true; - } - - function decodeUtf16(lead, trail) { - return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - } - - function isIdentifierNameES6(id) { - var i, iz, ch, lowCh, check; - - if (id.length === 0) { return false; } - - check = code.isIdentifierStartES6; - for (i = 0, iz = id.length; i < iz; ++i) { - ch = id.charCodeAt(i); - if (0xD800 <= ch && ch <= 0xDBFF) { - ++i; - if (i >= iz) { return false; } - lowCh = id.charCodeAt(i); - if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) { - return false; - } - ch = decodeUtf16(ch, lowCh); - } - if (!check(ch)) { - return false; - } - check = code.isIdentifierPartES6; - } - return true; - } - - function isIdentifierES5(id, strict) { - return isIdentifierNameES5(id) && !isReservedWordES5(id, strict); - } - - function isIdentifierES6(id, strict) { - return isIdentifierNameES6(id) && !isReservedWordES6(id, strict); - } - - module.exports = { - isKeywordES5: isKeywordES5, - isKeywordES6: isKeywordES6, - isReservedWordES5: isReservedWordES5, - isReservedWordES6: isReservedWordES6, - isRestrictedWord: isRestrictedWord, - isIdentifierNameES5: isIdentifierNameES5, - isIdentifierNameES6: isIdentifierNameES6, - isIdentifierES5: isIdentifierES5, - isIdentifierES6: isIdentifierES6 - }; -}()); -/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/lib/utils.js b/tools/node_modules/babel-eslint/node_modules/esutils/lib/utils.js deleted file mode 100644 index ce18faa6bc80fa..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/esutils/lib/utils.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2013 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -(function () { - 'use strict'; - - exports.ast = require('./ast'); - exports.code = require('./code'); - exports.keyword = require('./keyword'); -}()); -/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/package.json b/tools/node_modules/babel-eslint/node_modules/esutils/package.json deleted file mode 100644 index cffa439c8dafce..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/esutils/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/estools/esutils/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "utility box for ECMAScript language tools", - "devDependencies": { - "chai": "~1.7.2", - "coffee-script": "~1.6.3", - "jshint": "2.6.3", - "mocha": "~2.2.1", - "regenerate": "~1.3.1", - "unicode-9.0.0": "~0.7.0" - }, - "directories": { - "lib": "./lib" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "LICENSE.BSD", - "README.md", - "lib" - ], - "homepage": "https://github.com/estools/esutils", - "license": "BSD-2-Clause", - "main": "lib/utils.js", - "maintainers": [ - { - "name": "Yusuke Suzuki", - "email": "utatane.tea@gmail.com", - "url": "http://github.com/Constellation" - } - ], - "name": "esutils", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/estools/esutils.git" - }, - "scripts": { - "generate-regex": "node tools/generate-identifier-regex.js", - "lint": "jshint lib/*.js", - "test": "npm run-script lint && npm run-script unit-test", - "unit-test": "mocha --compilers coffee:coffee-script -R spec" - }, - "version": "2.0.3" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/globals/package.json b/tools/node_modules/babel-eslint/node_modules/globals/package.json deleted file mode 100644 index ae094f3054063e..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/globals/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/globals/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Global identifiers from different JavaScript environments", - "devDependencies": { - "ava": "0.21.0", - "xo": "0.18.0" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "globals.json" - ], - "homepage": "https://github.com/sindresorhus/globals#readme", - "keywords": [ - "globals", - "global", - "identifiers", - "variables", - "vars", - "jshint", - "eslint", - "environments" - ], - "license": "MIT", - "name": "globals", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/globals.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "11.12.0", - "xo": { - "ignores": [ - "get-browser-globals.js" - ] - } -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/has-flag/package.json b/tools/node_modules/babel-eslint/node_modules/has-flag/package.json deleted file mode 100644 index 1903ff01cf6766..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/has-flag/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/has-flag/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Check if argv has a specific flag", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/has-flag#readme", - "keywords": [ - "has", - "check", - "detect", - "contains", - "find", - "flag", - "cli", - "command-line", - "argv", - "process", - "arg", - "args", - "argument", - "arguments", - "getopt", - "minimist", - "optimist" - ], - "license": "MIT", - "name": "has-flag", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/has-flag.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.0.0" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/package.json b/tools/node_modules/babel-eslint/node_modules/js-tokens/package.json deleted file mode 100644 index ccfb4ef3dc3100..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/js-tokens/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "author": { - "name": "Simon Lydell" - }, - "bugs": { - "url": "https://github.com/lydell/js-tokens/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A regex that tokenizes JavaScript.", - "devDependencies": { - "coffeescript": "2.1.1", - "esprima": "4.0.0", - "everything.js": "1.0.3", - "mocha": "5.0.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/lydell/js-tokens#readme", - "keywords": [ - "JavaScript", - "js", - "token", - "tokenize", - "regex" - ], - "license": "MIT", - "name": "js-tokens", - "repository": { - "type": "git", - "url": "git+https://github.com/lydell/js-tokens.git" - }, - "scripts": { - "build": "node generate-index.js", - "dev": "npm run build && npm test", - "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js", - "test": "mocha --ui tdd" - }, - "version": "4.0.0" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/package.json b/tools/node_modules/babel-eslint/node_modules/jsesc/package.json deleted file mode 100644 index 735096b93f9702..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/jsesc/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "bin": { - "jsesc": "bin/jsesc" - }, - "bugs": { - "url": "https://github.com/mathiasbynens/jsesc/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.", - "devDependencies": { - "coveralls": "^2.11.6", - "grunt": "^0.4.5", - "grunt-template": "^0.2.3", - "istanbul": "^0.4.2", - "mocha": "*", - "regenerate": "^1.3.0", - "requirejs": "^2.1.22" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "LICENSE-MIT.txt", - "jsesc.js", - "bin/", - "man/" - ], - "homepage": "https://mths.be/jsesc", - "keywords": [ - "buffer", - "escape", - "javascript", - "json", - "map", - "set", - "string", - "stringify", - "tool" - ], - "license": "MIT", - "main": "jsesc.js", - "man": [ - "man/jsesc.1" - ], - "name": "jsesc", - "repository": { - "type": "git", - "url": "git+https://github.com/mathiasbynens/jsesc.git" - }, - "scripts": { - "build": "grunt template", - "cover": "istanbul cover --report 'html' --verbose --dir 'coverage' 'tests/tests.js'", - "coveralls": "istanbul cover --verbose --dir 'coverage' 'tests/tests.js' && coveralls < coverage/lcov.info'", - "test": "mocha tests" - }, - "version": "2.5.2" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/README.md b/tools/node_modules/babel-eslint/node_modules/lodash/README.md deleted file mode 100644 index 292832fef2ff16..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/lodash/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# lodash v4.17.15 - -The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. - -## Installation - -Using npm: -```shell -$ npm i -g npm -$ npm i --save lodash -``` - -In Node.js: -```js -// Load the full build. -var _ = require('lodash'); -// Load the core build. -var _ = require('lodash/core'); -// Load the FP build for immutable auto-curried iteratee-first data-last methods. -var fp = require('lodash/fp'); - -// Load method categories. -var array = require('lodash/array'); -var object = require('lodash/fp/object'); - -// Cherry-pick methods for smaller browserify/rollup/webpack bundles. -var at = require('lodash/at'); -var curryN = require('lodash/fp/curryN'); -``` - -See the [package source](https://github.com/lodash/lodash/tree/4.17.15-npm) for more details. - -**Note:**
-Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. - -## Support - -Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
-Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseOrderBy.js b/tools/node_modules/babel-eslint/node_modules/lodash/_baseOrderBy.js deleted file mode 100644 index d8a46ab20a2c5d..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseOrderBy.js +++ /dev/null @@ -1,34 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseIteratee = require('./_baseIteratee'), - baseMap = require('./_baseMap'), - baseSortBy = require('./_baseSortBy'), - baseUnary = require('./_baseUnary'), - compareMultiple = require('./_compareMultiple'), - identity = require('./identity'); - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); - - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); -} - -module.exports = baseOrderBy; diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/core.js b/tools/node_modules/babel-eslint/node_modules/lodash/core.js deleted file mode 100644 index 89c77ded06308d..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/lodash/core.js +++ /dev/null @@ -1,3854 +0,0 @@ -/** - * @license - * Lodash (Custom Build) - * Build: `lodash core -o ./dist/lodash.core.js` - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -;(function() { - - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; - - /** Used as the semantic version number. */ - var VERSION = '4.17.15'; - - /** Error message constants. */ - var FUNC_ERROR_TEXT = 'Expected a function'; - - /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - - /** Used to compose bitmasks for function metadata. */ - var WRAP_BIND_FLAG = 1, - WRAP_PARTIAL_FLAG = 32; - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991; - - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - numberTag = '[object Number]', - objectTag = '[object Object]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - - /** Used to match HTML entities and HTML characters. */ - var reUnescapedHtml = /[&<>"']/g, - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; - - /** Used to map characters to HTML entities. */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - - /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); - - /** Detect free variable `exports`. */ - var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - - /** Detect free variable `module`. */ - var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - - /*--------------------------------------------------------------------------*/ - - /** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ - function arrayPush(array, values) { - array.push.apply(array, values); - return array; - } - - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - - /** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; - } - - /** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ - function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; - } - - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - return baseMap(props, function(key) { - return object[key]; - }); - } - - /** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - var escapeHtmlChar = basePropertyOf(htmlEscapes); - - /** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } - - /*--------------------------------------------------------------------------*/ - - /** Used for built-in method references. */ - var arrayProto = Array.prototype, - objectProto = Object.prototype; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** Used to generate unique IDs. */ - var idCounter = 0; - - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var nativeObjectToString = objectProto.toString; - - /** Used to restore the original `_` reference in `_.noConflict`. */ - var oldDash = root._; - - /** Built-in value references. */ - var objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable; - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeIsFinite = root.isFinite, - nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object which wraps `value` to enable implicit method - * chain sequences. Methods that operate on and return arrays, collections, - * and functions can be chained together. Methods that retrieve a single value - * or may return a primitive value will automatically end the chain sequence - * and return the unwrapped value. Otherwise, the value must be unwrapped - * with `_#value`. - * - * Explicit chain sequences, which must be unwrapped with `_#value`, may be - * enabled using `_.chain`. - * - * The execution of chained methods is lazy, that is, it's deferred until - * `_#value` is implicitly or explicitly called. - * - * Lazy evaluation allows several methods to support shortcut fusion. - * Shortcut fusion is an optimization to merge iteratee calls; this avoids - * the creation of intermediate arrays and can greatly reduce the number of - * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array and iteratees accept only - * one argument. The heuristic for whether a section qualifies for shortcut - * fusion is subject to change. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, - * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, - * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, - * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, - * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, - * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, - * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, - * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, - * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, - * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, - * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, - * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, - * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, - * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, - * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, - * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, - * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, - * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, - * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, - * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, - * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, - * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, - * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, - * `zipObject`, `zipObjectDeep`, and `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, - * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, - * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, - * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, - * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, - * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, - * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, - * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, - * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, - * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, - * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, - * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, - * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, - * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, - * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, - * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, - * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, - * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, - * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, - * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, - * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, - * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, - * `upperFirst`, `value`, and `words` - * - * @name _ - * @constructor - * @category Seq - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2, 3]); - * - * // Returns an unwrapped value. - * wrapped.reduce(_.add); - * // => 6 - * - * // Returns a wrapped value. - * var squares = wrapped.map(square); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ - function lodash(value) { - return value instanceof LodashWrapper - ? value - : new LodashWrapper(value); - } - - /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ - var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; - }()); - - /** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. - */ - function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - } - - LodashWrapper.prototype = baseCreate(lodash.prototype); - LodashWrapper.prototype.constructor = LodashWrapper; - - /*------------------------------------------------------------------------*/ - - /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } - } - - /** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function baseAssignValue(object, key, value) { - object[key] = value; - } - - /** - * The base implementation of `_.delay` and `_.defer` which accepts `args` - * to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Array} args The arguments to provide to `func`. - * @returns {number|Object} Returns the timer id or timeout object. - */ - function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); - } - - /** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEach = createBaseEach(baseForOwn); - - /** - * The base implementation of `_.every` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ - function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; - } - - /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ - function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !false) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; - } - - /** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; - } - - /** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ - function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; - } - - /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseFor = createBaseFor(); - - /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); - } - - /** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. - */ - function baseFunctions(object, props) { - return baseFilter(props, function(key) { - return isFunction(object[key]); - }); - } - - /** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - function baseGetTag(value) { - return objectToString(value); - } - - /** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ - function baseGt(value, other) { - return value > other; - } - - /** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ - var baseIsArguments = noop; - - /** - * The base implementation of `_.isDate` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - */ - function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; - } - - /** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); - } - - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : baseGetTag(object), - othTag = othIsArr ? arrayTag : baseGetTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - stack || (stack = []); - var objStack = find(stack, function(entry) { - return entry[0] == object; - }); - var othStack = find(stack, function(entry) { - return entry[0] == other; - }); - if (objStack && othStack) { - return objStack[1] == other; - } - stack.push([object, other]); - stack.push([other, object]); - if (isSameTag && !objIsObj) { - var result = (objIsArr) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - stack.pop(); - return result; - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - stack.pop(); - return result; - } - } - if (!isSameTag) { - return false; - } - var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack); - stack.pop(); - return result; - } - - /** - * The base implementation of `_.isRegExp` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - */ - function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; - } - - /** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ - function baseIteratee(func) { - if (typeof func == 'function') { - return func; - } - if (func == null) { - return identity; - } - return (typeof func == 'object' ? baseMatches : baseProperty)(func); - } - - /** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ - function baseLt(value, other) { - return value < other; - } - - /** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; - } - - /** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ - function baseMatches(source) { - var props = nativeKeys(source); - return function(object) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object(object); - while (length--) { - var key = props[length]; - if (!(key in object && - baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) - )) { - return false; - } - } - return true; - }; - } - - /** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ - function basePick(object, props) { - object = Object(object); - return reduce(props, function(result, key) { - if (key in object) { - result[key] = object[key]; - } - return result; - }, {}); - } - - /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ - function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); - } - - /** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; - } - - /** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ - function copyArray(source) { - return baseSlice(source, 0, source.length); - } - - /** - * The base implementation of `_.some` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; - } - - /** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to perform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ - function baseWrapperValue(value, actions) { - var result = value; - return reduce(actions, function(result, action) { - return action.func.apply(action.thisArg, arrayPush([result], action.args)); - }, result); - } - - /** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ - function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = false; - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = false; - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; - } - - /** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ - function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; - } - - /** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ - function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); - } - - /** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; - } - - /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; - } - - /** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ - function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; - } - - /** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ - function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = baseIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; - } - - /** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. - */ - function createPartial(func, bitmask, thisArg, partials) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return fn.apply(isBind ? thisArg : this, args); - } - return wrapper; - } - - /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - var compared; - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!baseSome(other, function(othValue, othIndex) { - if (!indexOf(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - return result; - } - - /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - } - return false; - } - - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - var result = true; - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - var compared; - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - return result; - } - - /** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ - function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); - } - - /** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ - function isFlattenable(value) { - return isArray(value) || isArguments(value); - } - - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); - } - - /** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; - } - - /** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; - } - - /** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ - function objectToString(value) { - return nativeObjectToString.call(value); - } - - /** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ - function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return func.apply(this, otherArgs); - }; - } - - /** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var setToString = identity; - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - return baseFilter(array, Boolean); - } - - /** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] - */ - function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), - array = arguments[0], - index = length; - - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); - } - - /** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ - function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index); - } - - /** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ - function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; - } - - /** - * Recursively flattens `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] - */ - function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; - } - - /** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias first - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.head([1, 2, 3]); - * // => 1 - * - * _.head([]); - * // => undefined - */ - function head(array) { - return (array && array.length) ? array[0] : undefined; - } - - /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the - * offset from the end of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // Search from the `fromIndex`. - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - */ - function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (typeof fromIndex == 'number') { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; - } else { - fromIndex = 0; - } - var index = (fromIndex || 0) - 1, - isReflexive = value === value; - - while (++index < length) { - var other = array[index]; - if ((isReflexive ? other === value : other !== other)) { - return index; - } - } - return -1; - } - - /** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ - function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; - } - - /** - * Creates a slice of `array` from `start` up to, but not including, `end`. - * - * **Note:** This method is used instead of - * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are - * returned. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function slice(array, start, end) { - var length = array == null ? 0 : array.length; - start = start == null ? 0 : +start; - end = end === undefined ? length : +end; - return length ? baseSlice(array, start, end) : []; - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` wrapper instance that wraps `value` with explicit method - * chain sequences enabled. The result of such sequences must be unwrapped - * with `_#value`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Seq - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _ - * .chain(users) - * .sortBy('age') - * .map(function(o) { - * return o.user + ' is ' + o.age; - * }) - * .head() - * .value(); - * // => 'pebbles is 1' - */ - function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; - } - - /** - * This method invokes `interceptor` and returns `value`. The interceptor - * is invoked with one argument; (value). The purpose of this method is to - * "tap into" a method chain sequence in order to modify intermediate results. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns `value`. - * @example - * - * _([1, 2, 3]) - * .tap(function(array) { - * // Mutate input array. - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] - */ - function tap(value, interceptor) { - interceptor(value); - return value; - } - - /** - * This method is like `_.tap` except that it returns the result of `interceptor`. - * The purpose of this method is to "pass thru" values replacing intermediate - * results in a method chain sequence. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns the result of `interceptor`. - * @example - * - * _(' abc ') - * .chain() - * .trim() - * .thru(function(value) { - * return [value]; - * }) - * .value(); - * // => ['abc'] - */ - function thru(value, interceptor) { - return interceptor(value); - } - - /** - * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. - * - * @name chain - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // A sequence without explicit chaining. - * _(users).head(); - * // => { 'user': 'barney', 'age': 36 } - * - * // A sequence with explicit chaining. - * _(users) - * .chain() - * .head() - * .pick('user') - * .value(); - * // => { 'user': 'barney' } - */ - function wrapperChain() { - return chain(this); - } - - /** - * Executes the chain sequence to resolve the unwrapped value. - * - * @name value - * @memberOf _ - * @since 0.1.0 - * @alias toJSON, valueOf - * @category Seq - * @returns {*} Returns the resolved unwrapped value. - * @example - * - * _([1, 2, 3]).value(); - * // => [1, 2, 3] - */ - function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); - } - - /*------------------------------------------------------------------------*/ - - /** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * Iteration is stopped once `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * **Note:** This method returns `true` for - * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because - * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of - * elements of empty collections. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.every(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.every(users, 'active'); - * // => false - */ - function every(collection, predicate, guard) { - predicate = guard ? undefined : predicate; - return baseEvery(collection, baseIteratee(predicate)); - } - - /** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - */ - function filter(collection, predicate) { - return baseFilter(collection, baseIteratee(predicate)); - } - - /** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ - var find = createFind(findIndex); - - /** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ - function forEach(collection, iteratee) { - return baseEach(collection, baseIteratee(iteratee)); - } - - /** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ - function map(collection, iteratee) { - return baseMap(collection, baseIteratee(iteratee)); - } - - /** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ - function reduce(collection, iteratee, accumulator) { - return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach); - } - - /** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ - function size(collection) { - if (collection == null) { - return 0; - } - collection = isArrayLike(collection) ? collection : nativeKeys(collection); - return collection.length; - } - - /** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * Iteration is stopped once `predicate` returns truthy. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.some(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.some(users, 'active'); - * // => true - */ - function some(collection, predicate, guard) { - predicate = guard ? undefined : predicate; - return baseSome(collection, baseIteratee(predicate)); - } - - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - */ - function sortBy(collection, iteratee) { - var index = 0; - iteratee = baseIteratee(iteratee); - - return baseMap(baseMap(collection, function(value, key, collection) { - return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) }; - }).sort(function(object, other) { - return compareAscending(object.criteria, other.criteria) || (object.index - other.index); - }), baseProperty('value')); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ - function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; - } - - /** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and `partials` prepended to the arguments it receives. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * function greet(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // Bound with placeholders. - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ - var bind = baseRest(function(func, thisArg, partials) { - return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials); - }); - - /** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // => Logs 'deferred' after one millisecond. - */ - var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); - }); - - /** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => Logs 'later' after one second. - */ - var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); - }); - - /** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new negated function. - * @example - * - * function isEven(n) { - * return n % 2 == 0; - * } - * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] - */ - function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - var args = arguments; - return !predicate.apply(this, args); - }; - } - - /** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once - */ - function once(func) { - return before(2, func); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ - function clone(value) { - if (!isObject(value)) { - return value; - } - return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); - } - - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - function eq(value, other) { - return value === other || (value !== value && other !== other); - } - - /** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); - }; - - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ - var isArray = Array.isArray; - - /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); - } - - /** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ - function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); - } - - /** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ - var isDate = baseIsDate; - - /** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ - function isEmpty(value) { - if (isArrayLike(value) && - (isArray(value) || isString(value) || - isFunction(value.splice) || isArguments(value))) { - return !value.length; - } - return !nativeKeys(value).length; - } - - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ - function isEqual(value, other) { - return baseIsEqual(value, other); - } - - /** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. - * @example - * - * _.isFinite(3); - * // => true - * - * _.isFinite(Number.MIN_VALUE); - * // => true - * - * _.isFinite(Infinity); - * // => false - * - * _.isFinite('3'); - * // => false - */ - function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); - } - - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; - } - - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ - function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ - function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); - } - - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; - } - - /** - * Checks if `value` is `NaN`. - * - * **Note:** This method is based on - * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as - * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for - * `undefined` and other non-number values. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some - // ActiveX objects in IE. - return isNumber(value) && value != +value; - } - - /** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ - function isNull(value) { - return value === null; - } - - /** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ - function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); - } - - /** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ - var isRegExp = baseIsRegExp; - - /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ - function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); - } - - /** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ - function isUndefined(value) { - return value === undefined; - } - - /** - * Converts `value` to an array. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Array} Returns the converted array. - * @example - * - * _.toArray({ 'a': 1, 'b': 2 }); - * // => [1, 2] - * - * _.toArray('abc'); - * // => ['a', 'b', 'c'] - * - * _.toArray(1); - * // => [] - * - * _.toArray(null); - * // => [] - */ - function toArray(value) { - if (!isArrayLike(value)) { - return values(value); - } - return value.length ? copyArray(value) : []; - } - - /** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ - var toInteger = Number; - - /** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ - var toNumber = Number; - - /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - function toString(value) { - if (typeof value == 'string') { - return value; - } - return value == null ? '' : (value + ''); - } - - /*------------------------------------------------------------------------*/ - - /** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } - */ - var assign = createAssigner(function(object, source) { - copyObject(source, nativeKeys(source), object); - }); - - /** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } - */ - var assignIn = createAssigner(function(object, source) { - copyObject(source, nativeKeysIn(source), object); - }); - - /** - * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given, its own enumerable string keyed properties - * are assigned to the created object. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ - function create(prototype, properties) { - var result = baseCreate(prototype); - return properties == null ? result : assign(result, properties); - } - - /** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var defaults = baseRest(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; - }); - - /** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ - function has(object, path) { - return object != null && hasOwnProperty.call(object, path); - } - - /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ - var keys = nativeKeys; - - /** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ - var keysIn = nativeKeysIn; - - /** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ - var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); - }); - - /** - * This method is like `_.get` except that if the resolved value is a - * function it's invoked with the `this` binding of its parent object and - * its result is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 - * - * _.result(object, 'a[0].b.c3', 'default'); - * // => 'default' - * - * _.result(object, 'a[0].b.c3', _.constant('default')); - * // => 'default' - */ - function result(object, path, defaultValue) { - var value = object == null ? undefined : object[path]; - if (value === undefined) { - value = defaultValue; - } - return isFunction(value) ? value.call(object) : value; - } - - /** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ - function values(object) { - return object == null ? [] : baseValues(object, keys(object)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Converts the characters "&", "<", ">", '"', and "'" in `string` to their - * corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. See - * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * When working with HTML you should always - * [quote attribute values](http://wonko.com/post/html-escaping) to reduce - * XSS vectors. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ - function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; - } - - /*------------------------------------------------------------------------*/ - - /** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ - function identity(value) { - return value; - } - - /** - * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name, the created function returns the - * property value for a given element. If `func` is an array or object, the - * created function returns `true` for elements that contain the equivalent - * source properties, otherwise it returns `false`. - * - * @static - * @since 4.0.0 - * @memberOf _ - * @category Util - * @param {*} [func=_.identity] The value to convert to a callback. - * @returns {Function} Returns the callback. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); - * // => [{ 'user': 'barney', 'age': 36, 'active': true }] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, _.iteratee(['user', 'fred'])); - * // => [{ 'user': 'fred', 'age': 40 }] - * - * // The `_.property` iteratee shorthand. - * _.map(users, _.iteratee('user')); - * // => ['barney', 'fred'] - * - * // Create custom iteratee shorthands. - * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { - * return !_.isRegExp(func) ? iteratee(func) : function(string) { - * return func.test(string); - * }; - * }); - * - * _.filter(['abc', 'def'], /ef/); - * // => ['def'] - */ - var iteratee = baseIteratee; - - /** - * Creates a function that performs a partial deep comparison between a given - * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. - * - * **Note:** The created function is equivalent to `_.isMatch` with `source` - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 1, 'b': 2, 'c': 3 }, - * { 'a': 4, 'b': 5, 'c': 6 } - * ]; - * - * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); - * // => [{ 'a': 4, 'b': 5, 'c': 6 }] - */ - function matches(source) { - return baseMatches(assign({}, source)); - } - - /** - * Adds all own enumerable string keyed function properties of a source - * object to the destination object. If `object` is a function, then methods - * are added to its prototype as well. - * - * **Note:** Use `_.runInContext` to create a pristine `lodash` function to - * avoid conflicts caused by modifying the original. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {Function|Object} [object=lodash] The destination object. - * @param {Object} source The object of functions to add. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.chain=true] Specify whether mixins are chainable. - * @returns {Function|Object} Returns `object`. - * @example - * - * function vowels(string) { - * return _.filter(string, function(v) { - * return /[aeiou]/i.test(v); - * }); - * } - * - * _.mixin({ 'vowels': vowels }); - * _.vowels('fred'); - * // => ['e'] - * - * _('fred').vowels().value(); - * // => ['e'] - * - * _.mixin({ 'vowels': vowels }, { 'chain': false }); - * _('fred').vowels(); - * // => ['e'] - */ - function mixin(object, source, options) { - var props = keys(source), - methodNames = baseFunctions(source, props); - - if (options == null && - !(isObject(source) && (methodNames.length || !props.length))) { - options = source; - source = object; - object = this; - methodNames = baseFunctions(source, keys(source)); - } - var chain = !(isObject(options) && 'chain' in options) || !!options.chain, - isFunc = isFunction(object); - - baseEach(methodNames, function(methodName) { - var func = source[methodName]; - object[methodName] = func; - if (isFunc) { - object.prototype[methodName] = function() { - var chainAll = this.__chain__; - if (chain || chainAll) { - var result = object(this.__wrapped__), - actions = result.__actions__ = copyArray(this.__actions__); - - actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); - result.__chain__ = chainAll; - return result; - } - return func.apply(object, arrayPush([this.value()], arguments)); - }; - } - }); - - return object; - } - - /** - * Reverts the `_` variable to its previous value and returns a reference to - * the `lodash` function. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @returns {Function} Returns the `lodash` function. - * @example - * - * var lodash = _.noConflict(); - */ - function noConflict() { - if (root._ === this) { - root._ = oldDash; - } - return this; - } - - /** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ - function noop() { - // No operation performed. - } - - /** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ - function uniqueId(prefix) { - var id = ++idCounter; - return toString(prefix) + id; - } - - /*------------------------------------------------------------------------*/ - - /** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ - function max(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseGt) - : undefined; - } - - /** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ - function min(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseLt) - : undefined; - } - - /*------------------------------------------------------------------------*/ - - // Add methods that return wrapped values in chain sequences. - lodash.assignIn = assignIn; - lodash.before = before; - lodash.bind = bind; - lodash.chain = chain; - lodash.compact = compact; - lodash.concat = concat; - lodash.create = create; - lodash.defaults = defaults; - lodash.defer = defer; - lodash.delay = delay; - lodash.filter = filter; - lodash.flatten = flatten; - lodash.flattenDeep = flattenDeep; - lodash.iteratee = iteratee; - lodash.keys = keys; - lodash.map = map; - lodash.matches = matches; - lodash.mixin = mixin; - lodash.negate = negate; - lodash.once = once; - lodash.pick = pick; - lodash.slice = slice; - lodash.sortBy = sortBy; - lodash.tap = tap; - lodash.thru = thru; - lodash.toArray = toArray; - lodash.values = values; - - // Add aliases. - lodash.extend = assignIn; - - // Add methods to `lodash.prototype`. - mixin(lodash, lodash); - - /*------------------------------------------------------------------------*/ - - // Add methods that return unwrapped values in chain sequences. - lodash.clone = clone; - lodash.escape = escape; - lodash.every = every; - lodash.find = find; - lodash.forEach = forEach; - lodash.has = has; - lodash.head = head; - lodash.identity = identity; - lodash.indexOf = indexOf; - lodash.isArguments = isArguments; - lodash.isArray = isArray; - lodash.isBoolean = isBoolean; - lodash.isDate = isDate; - lodash.isEmpty = isEmpty; - lodash.isEqual = isEqual; - lodash.isFinite = isFinite; - lodash.isFunction = isFunction; - lodash.isNaN = isNaN; - lodash.isNull = isNull; - lodash.isNumber = isNumber; - lodash.isObject = isObject; - lodash.isRegExp = isRegExp; - lodash.isString = isString; - lodash.isUndefined = isUndefined; - lodash.last = last; - lodash.max = max; - lodash.min = min; - lodash.noConflict = noConflict; - lodash.noop = noop; - lodash.reduce = reduce; - lodash.result = result; - lodash.size = size; - lodash.some = some; - lodash.uniqueId = uniqueId; - - // Add aliases. - lodash.each = forEach; - lodash.first = head; - - mixin(lodash, (function() { - var source = {}; - baseForOwn(lodash, function(func, methodName) { - if (!hasOwnProperty.call(lodash.prototype, methodName)) { - source[methodName] = func; - } - }); - return source; - }()), { 'chain': false }); - - /*------------------------------------------------------------------------*/ - - /** - * The semantic version number. - * - * @static - * @memberOf _ - * @type {string} - */ - lodash.VERSION = VERSION; - - // Add `Array` methods to `lodash.prototype`. - baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { - var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName], - chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', - retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName); - - lodash.prototype[methodName] = function() { - var args = arguments; - if (retUnwrapped && !this.__chain__) { - var value = this.value(); - return func.apply(isArray(value) ? value : [], args); - } - return this[chainName](function(value) { - return func.apply(isArray(value) ? value : [], args); - }); - }; - }); - - // Add chain sequence methods to the `lodash` wrapper. - lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; - - /*--------------------------------------------------------------------------*/ - - // Some AMD build optimizers, like r.js, check for condition patterns like: - if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { - // Expose Lodash on the global object to prevent errors when Lodash is - // loaded by a script tag in the presence of an AMD loader. - // See http://requirejs.org/docs/errors.html#mismatch for more details. - // Use `_.noConflict` to remove Lodash from the global object. - root._ = lodash; - - // Define as an anonymous module so, through path mapping, it can be - // referenced as the "underscore" module. - define(function() { - return lodash; - }); - } - // Check for `exports` after `define` in case a build optimizer adds it. - else if (freeModule) { - // Export for Node.js. - (freeModule.exports = lodash)._ = lodash; - // Export for CommonJS support. - freeExports._ = lodash; - } - else { - // Export to the global object. - root._ = lodash; - } -}.call(this)); diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/core.min.js b/tools/node_modules/babel-eslint/node_modules/lodash/core.min.js deleted file mode 100644 index bb543ff54abc0a..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/lodash/core.min.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @license - * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - * Build: `lodash core -o ./dist/lodash.core.js` - */ -;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function"); -return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++et}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!H(t)?n!==n&&t!==t:y(n,t,r,e,b,u))}function y(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){ -return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=T(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=B(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t, -r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;for(var c=-1,f=true,a=2&r?[]:Z;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn)}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n), -function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){ -return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n);return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__; -if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ -return function(t){return null==n?Z:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; -var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,En="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",kn=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+En+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={}; -Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object DataView]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false; -var Ln={};Ln["[object Arguments]"]=Ln["[object Array]"]=Ln["[object ArrayBuffer]"]=Ln["[object DataView]"]=Ln["[object Boolean]"]=Ln["[object Date]"]=Ln["[object Float32Array]"]=Ln["[object Float64Array]"]=Ln["[object Int8Array]"]=Ln["[object Int16Array]"]=Ln["[object Int32Array]"]=Ln["[object Map]"]=Ln["[object Number]"]=Ln["[object Object]"]=Ln["[object RegExp]"]=Ln["[object Set]"]=Ln["[object String]"]=Ln["[object Symbol]"]=Ln["[object Uint8Array]"]=Ln["[object Uint8ClampedArray]"]=Ln["[object Uint16Array]"]=Ln["[object Uint32Array]"]=true, -Ln["[object Error]"]=Ln["[object Function]"]=Ln["[object WeakMap]"]=false;var Un={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){ -try{var n=Nn&&Nn.f&&Nn.f("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I", -"\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C", -"\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i", -"\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r", -"\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij", -"\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),tt=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Un)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function En(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Un(n){this.__wrapped__=n, -this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Ur(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Ln[s])return i?n:{};f=Ee(n,s,c)}}if(o||(o=new Zn), -i=o.get(n))return i;o.set(n,f),pf(n)?n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}):sf(n)&&n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))});var a=l?a?ve:_e:a?Bu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o))}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function"); -return bo(function(){n.apply(T,r)},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,k(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++ut}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,k(t))),s=Ci(p.length,s), -l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T}var p=n[0],_=-1,v=l[0];n:for(;++_r.length?t:kt(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Ut(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){ -return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!yu(n)&&!yu(t))t=n!==n&&t!==t;else n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{ -if(!(1&r)&&(i=a&&oi.call(n,"__wrapped__"),f=o&&oi.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Zn),t=Mt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Zn),i=1&r,f=_e(n),o=f.length,c=_e(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:oi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],k(ye())),n=Gt(n,function(n){return{ -a:c(t,function(t){return t(n)}),b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e=u){for(;e>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:ot.length?n:kt(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)), -t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length)}function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?T:i,u=1),t=Qu(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:L(f,a), -o-=c.length,or?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Br(e,r,h[4]):r,i[4]=e?L(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Lr(e,r,h[6]):r,i[6]=e?L(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0], -t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Ui(i[9]-a,0),!f&&24&t&&(t&=-25),Ue((h?co:yo)(t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t; -var c=-1,a=true,l=2&r?new Nn:T;for(i.set(n,t),i.set(t,n);++cr&&(r=Ui(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==T&&(u=Eu(r),u=0>r?Ui(e+u,0):Ci(u,e-1)), -_(n,ye(t,3),u,true)}function Ze(n){return(null==n?0:n.length)?wt(n,1):[]}function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(hu(n))return t=Ui(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return[];var e=He(t);return null==r?e:c(e,function(t){ -return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n}function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return(ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return(ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return(ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=Eu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T), -r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder,n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r)}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments, -a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return lo(h),h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ui(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache; -return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t; -}function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false;var t=Ot(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return!!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==Eu(n)}function gu(n){return typeof n=="number"&&-1=n; -}function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object"}function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return!(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n); -}function mu(n){if(!n)return[];if(su(n))return ju(n)?M(n):Ur(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?U:Uu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Eu(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function ku(n){return n?pt(Eu(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n, -n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n}function Ou(n){return Cr(n,Bu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:kt(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Bu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e}else{if(t=[], -null!=n)for(r in Qu(n))t.push(r);n=t}return n}function Lu(n,t){if(null==n)return{};var r=c(ve(n),function(n){return[n]});return t=ye(t),tr(n,r,function(n,r){return t(n,r[0])})}function Uu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return(n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n; -}function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=Et(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=Et(t,Wu(t)));var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Ur(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pu(){} -function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return[]}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.g:T,di=B(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){ -try{var n=je(Qu,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ei=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,ki=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Bi=ri.join,Li=B(Qu.keys,Qu),Ui=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){ -function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=En.prototype,An.prototype.constructor=An,On.prototype=eo(En.prototype),On.prototype.constructor=On,Un.prototype=eo(En.prototype),Un.prototype.constructor=Un,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n], -this.size-=n?1:0,n},Mn.prototype.get=function(n){var t=this.__data__;return Vi?(n=t[n],"__lodash_hash_undefined__"===n?T:n):oi.call(t,n)?t[n]:T},Mn.prototype.has=function(n){var t=this.__data__;return Vi?t[n]!==T:oi.call(t,n)},Mn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Vi&&t===T?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(n){var t=this.__data__;return n=ft(t,n),!(0>n)&&(n==t.length-1?t.pop():xi.call(t,n,1), ---this.size,true)},Tn.prototype.get=function(n){var t=this.__data__;return n=ft(t,n),0>n?T:t[n][1]},Tn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ni||Tn),string:new Mn}},Fn.prototype.delete=function(n){return n=be(this,n).delete(n),this.size-=n?1:0,n},Fn.prototype.get=function(n){return be(this,n).get(n); -},Fn.prototype.has=function(n){return be(this,n).has(n)},Fn.prototype.set=function(n,t){var r=be(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Nn.prototype.add=Nn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0},Zn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Zn.prototype.get=function(n){ -return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e)}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=Ei||function(n){ -return $n.clearTimeout(n)},so=Zi&&1/U(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){ -var t=Ot(n);if(n=(n="[object Object]"==t?n.constructor:T)?Te(n):"")switch(n){case Hi:return"[object DataView]";case Ji:return"[object Map]";case Yi:return"[object Promise]";case Qi:return"[object Set]";case Xi:return"[object WeakMap]"}return t});var go=ui?_u:Vu,yo=Ce(co),bo=Si||function(n,t){return $n.setTimeout(n,t)},xo=Ce(ao),jo=function(n){n=cu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(tn,function(n,r,e,u){ -t.push(e?u.replace(hn,"$1"):r||n)}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),Eo=fr(function(n){var t=c(n,Er);return t.length&&t[0]===n[0]?Wt(t):[]}),ko=fr(function(n){var t=Ve(n),r=c(n,Er);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,Er);return(t=typeof t=="function"?t:T)&&r.pop(), -r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Bo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Lo=fr(function(n){return mr(i(n,hu))}),Uo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T), -mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1=t}),of=Ut(function(){return arguments}())?Ut:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?k(Vn):Ct,af=zi||Vu,lf=Kn?k(Kn):Dt,sf=Gn?k(Gn):Tt,hf=Hn?k(Hn):Nt,pf=Jn?k(Jn):Pt,_f=Yn?k(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){ -if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r])}),yf=$r(function(n,t){Cr(t,Bu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Bu(t),n,e)}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e)}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Ui(Eu(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Ku(Oi(r/t));et?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[]; -},An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=Eu(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Eu(e),0>e&&(e+=u),e=r>e?0:ku(e);r>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Ui(Eu(r),0), -fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:Eu(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n), -n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Ur(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{}; -}return(i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null==n?n:lr(n,t,kr(r)(kt(n,t)),void 0)},An.updateWith=function(n,t,r,e){ -return e=typeof e=="function"?e:T,null!=n&&(n=lr(n,t,kr(r)(kt(n,t)),e)),n},An.values=Uu,An.valuesIn=function(n){return null==n?[]:S(n,Bu(n))},An.without=Bo,An.words=Mu,An.wrap=function(n,t){return nf(kr(t),n)},An.xor=Lo,An.xorBy=Uo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Bf,An.capitalize=Cu, -An.ceil=Xf,An.clamp=function(n,t,r){return r===T&&(r=t,t=T),r!==T&&(r=Su(r),r=r===r?r:0),t!==T&&(t=Su(t),t=t===t?t:0),pt(Su(n),t,r)},An.clone=function(n){return _t(n,4)},An.cloneDeep=function(n){return _t(n,5)},An.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,5,t)},An.cloneWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,4,t)},An.conformsTo=function(n,t){return null==t||gt(n,t,Wu(t))},An.deburr=Du,An.defaultTo=function(n,t){return null==n||n!==n?t:n},An.divide=nc,An.endsWith=function(n,t,r){ -n=Iu(n),t=yr(t);var e=n.length,e=r=r===T?e:pt(Eu(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},An.eq=lu,An.escape=function(n){return(n=Iu(n))&&H.test(n)?n.replace(K,nt):n},An.escapeRegExp=function(n){return(n=Iu(n))&&en.test(n)?n.replace(rn,"\\$&"):n},An.every=function(n,t,r){var e=ff(n)?u:bt;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.find=Fo,An.findIndex=Ne,An.findKey=function(n,t){return p(n,ye(t,3),mt)},An.findLast=No,An.findLastIndex=Pe,An.findLastKey=function(n,t){return p(n,ye(t,3),At); -},An.floor=tc,An.forEach=nu,An.forEachRight=tu,An.forIn=function(n,t){return null==n?n:oo(n,ye(t,3),Bu)},An.forInRight=function(n,t){return null==n?n:fo(n,ye(t,3),Bu)},An.forOwn=function(n,t){return n&&mt(n,ye(t,3))},An.forOwnRight=function(n,t){return n&&At(n,ye(t,3))},An.get=Ru,An.gt=ef,An.gte=uf,An.has=function(n,t){return null!=n&&we(n,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(n,t,r,e){return n=su(n)?n:Uu(n),r=r&&!e?Eu(r):0,e=n.length,0>r&&(r=Ui(e+r,0)),ju(n)?r<=e&&-1r&&(r=Ui(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&n=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Bi.call(n,t)},An.kebabCase=Lf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==T&&(u=Eu(r),u=0>u?Ui(e+u,0):Ci(u,e-1)), -t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=_(n,d,u,true);return n},An.lowerCase=Uf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){return{}},An.stubString=function(){ -return""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,Eu(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return!t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){var e=ff(n)?s:j,u=3>arguments.length; -return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:Eu(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++en||9007199254740991=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){ -var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?"Right":"")}),e},Un.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){ -var r=t+1,e=1==r||3==r;Un.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Un.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Un.prototype[n]=function(){return this.__filtered__?new Un(this):this[r](1)}}),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(n){ -return this.filter(n).head()},Un.prototype.findLast=function(n){return this.reverse().find(n)},Un.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Un(this):this.map(function(r){return Lt(r,n,t)})}),Un.prototype.reject=function(n){return this.filter(au(ye(n)))},Un.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0t)?new Un(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Un.prototype.takeRightWhile=function(n){ -return this.reverse().takeWhile(n).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){function t(n){return n=u.apply(An,a([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Un,l=f[0],s=c||ff(o);s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,l=i&&!h,c=c&&!p; -return!i&&s?(o=c?o:new Un(this),o=n.apply(o,f),o.__actions__.push({func:Qe,args:[t],thisArg:T}),new On(o,h)):l&&c?n.apply(this,f):(o=this.thru(t),l?e?o.value()[0]:o.value():o)})}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)}); -}}),mt(Un.prototype,function(n,t){var r=An[t];if(r){var e=r.name+"";oi.call(Gi,e)||(Gi[e]=[]),Gi[e].push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Un.prototype.clone=function(){var n=new Un(this.__wrapped__);return n.__actions__=Ur(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ur(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ur(this.__views__),n},Un.prototype.reverse=function(){if(this.__filtered__){var n=new Un(this); -n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Un.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){ -for(var t,r=this;r instanceof En;){var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Un?(this.__actions__.length&&(n=new Un(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head, -wi&&(An.prototype[wi]=Xe),An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this); \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/overEvery.js b/tools/node_modules/babel-eslint/node_modules/lodash/overEvery.js deleted file mode 100644 index c115d15384c866..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/lodash/overEvery.js +++ /dev/null @@ -1,30 +0,0 @@ -var arrayEvery = require('./_arrayEvery'), - createOver = require('./_createOver'); - -/** - * Creates a function that checks if **all** of the `predicates` return - * truthy when invoked with the arguments it receives. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {...(Function|Function[])} [predicates=[_.identity]] - * The predicates to check. - * @returns {Function} Returns the new function. - * @example - * - * var func = _.overEvery([Boolean, isFinite]); - * - * func('1'); - * // => true - * - * func(null); - * // => false - * - * func(NaN); - * // => false - */ -var overEvery = createOver(arrayEvery); - -module.exports = overEvery; diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/overSome.js b/tools/node_modules/babel-eslint/node_modules/lodash/overSome.js deleted file mode 100644 index f902907a954114..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/lodash/overSome.js +++ /dev/null @@ -1,30 +0,0 @@ -var arraySome = require('./_arraySome'), - createOver = require('./_createOver'); - -/** - * Creates a function that checks if **any** of the `predicates` return - * truthy when invoked with the arguments it receives. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {...(Function|Function[])} [predicates=[_.identity]] - * The predicates to check. - * @returns {Function} Returns the new function. - * @example - * - * var func = _.overSome([Boolean, isFinite]); - * - * func('1'); - * // => true - * - * func(null); - * // => true - * - * func(NaN); - * // => false - */ -var overSome = createOver(arraySome); - -module.exports = overSome; diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/package.json b/tools/node_modules/babel-eslint/node_modules/lodash/package.json deleted file mode 100644 index ccf80be0796354..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/lodash/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be" - } - ], - "deprecated": false, - "description": "Lodash modular utilities.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "modules", - "stdlib", - "util" - ], - "license": "MIT", - "main": "lodash.js", - "name": "lodash", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" - }, - "version": "4.17.15" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/ms/package.json b/tools/node_modules/babel-eslint/node_modules/ms/package.json deleted file mode 100644 index 7192a30c57c910..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/ms/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/zeit/ms/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Tiny millisecond conversion utility", - "devDependencies": { - "eslint": "4.12.1", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/zeit/ms#readme", - "license": "MIT", - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "main": "./index", - "name": "ms", - "repository": { - "type": "git", - "url": "git+https://github.com/zeit/ms.git" - }, - "scripts": { - "lint": "eslint lib/* bin/*", - "precommit": "lint-staged", - "test": "mocha tests.js" - }, - "version": "2.1.2" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/path-parse/package.json b/tools/node_modules/babel-eslint/node_modules/path-parse/package.json deleted file mode 100644 index 49b06b414272ce..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/path-parse/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "author": { - "name": "Javier Blanco", - "email": "http://jbgutierrez.info" - }, - "bugs": { - "url": "https://github.com/jbgutierrez/path-parse/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node.js path.parse() ponyfill", - "homepage": "https://github.com/jbgutierrez/path-parse#readme", - "keywords": [ - "path", - "paths", - "file", - "dir", - "parse", - "built-in", - "util", - "utils", - "core", - "ponyfill", - "polyfill", - "shim" - ], - "license": "MIT", - "main": "index.js", - "name": "path-parse", - "repository": { - "type": "git", - "url": "git+https://github.com/jbgutierrez/path-parse.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.6" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/index.js b/tools/node_modules/babel-eslint/node_modules/resolve/index.js deleted file mode 100644 index eb6ba89e6c210c..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/resolve/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var core = require('./lib/core'); -var async = require('./lib/async'); -async.core = core; -async.isCore = function isCore(x) { return core[x]; }; -async.sync = require('./lib/sync'); - -exports = async; -module.exports = async; diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/async.js b/tools/node_modules/babel-eslint/node_modules/resolve/lib/async.js deleted file mode 100644 index 004b2798baf0c2..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/async.js +++ /dev/null @@ -1,271 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); -var normalizeOptions = require('./normalize-options.js'); - -var defaultIsFile = function isFile(file, cb) { - fs.stat(file, function (err, stat) { - if (!err) { - return cb(null, stat.isFile() || stat.isFIFO()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); -}; - -var defaultIsDir = function isDirectory(dir, cb) { - fs.stat(dir, function (err, stat) { - if (!err) { - return cb(null, stat.isDirectory()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); -}; - -var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts, cb) { - if (opts && opts.preserveSymlinks === false) { - fs.realpath(x, function (realPathErr, realPath) { - if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr); - else cb(null, realPathErr ? x : realPath); - }); - } else { - cb(null, x); - } -}; - -module.exports = function resolve(x, options, callback) { - var cb = callback; - var opts = options; - if (typeof options === 'function') { - cb = opts; - opts = {}; - } - if (typeof x !== 'string') { - var err = new TypeError('Path must be a string.'); - return process.nextTick(function () { - cb(err); - }); - } - - opts = normalizeOptions(x, opts); - - var isFile = opts.isFile || defaultIsFile; - var isDirectory = opts.isDirectory || defaultIsDir; - var readFile = opts.readFile || fs.readFile; - - var extensions = opts.extensions || ['.js']; - var basedir = opts.basedir || path.dirname(caller()); - var parent = opts.filename || basedir; - - opts.paths = opts.paths || []; - - // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory - var absoluteStart = path.resolve(basedir); - - maybeUnwrapSymlink( - absoluteStart, - opts, - function (err, realStart) { - if (err) cb(err); - else init(realStart); - } - ); - - var res; - function init(basedir) { - if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { - res = path.resolve(basedir, x); - if (x === '..' || x.slice(-1) === '/') res += '/'; - if ((/\/$/).test(x) && res === basedir) { - loadAsDirectory(res, opts.package, onfile); - } else loadAsFile(res, opts.package, onfile); - } else loadNodeModules(x, basedir, function (err, n, pkg) { - if (err) cb(err); - else if (core[x]) return cb(null, x); - else if (n) { - return maybeUnwrapSymlink(n, opts, function (err, realN) { - if (err) { - cb(err); - } else { - cb(null, realN, pkg); - } - }); - } else { - var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - moduleError.code = 'MODULE_NOT_FOUND'; - cb(moduleError); - } - }); - } - - function onfile(err, m, pkg) { - if (err) cb(err); - else if (m) cb(null, m, pkg); - else loadAsDirectory(res, function (err, d, pkg) { - if (err) cb(err); - else if (d) { - maybeUnwrapSymlink(d, opts, function (err, realD) { - if (err) { - cb(err); - } else { - cb(null, realD, pkg); - } - }); - } else { - var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - moduleError.code = 'MODULE_NOT_FOUND'; - cb(moduleError); - } - }); - } - - function loadAsFile(x, thePackage, callback) { - var loadAsFilePackage = thePackage; - var cb = callback; - if (typeof loadAsFilePackage === 'function') { - cb = loadAsFilePackage; - loadAsFilePackage = undefined; - } - - var exts = [''].concat(extensions); - load(exts, x, loadAsFilePackage); - - function load(exts, x, loadPackage) { - if (exts.length === 0) return cb(null, undefined, loadPackage); - var file = x + exts[0]; - - var pkg = loadPackage; - if (pkg) onpkg(null, pkg); - else loadpkg(path.dirname(file), onpkg); - - function onpkg(err, pkg_, dir) { - pkg = pkg_; - if (err) return cb(err); - if (dir && pkg && opts.pathFilter) { - var rfile = path.relative(dir, file); - var rel = rfile.slice(0, rfile.length - exts[0].length); - var r = opts.pathFilter(pkg, x, rel); - if (r) return load( - [''].concat(extensions.slice()), - path.resolve(dir, r), - pkg - ); - } - isFile(file, onex); - } - function onex(err, ex) { - if (err) return cb(err); - if (ex) return cb(null, file, pkg); - load(exts.slice(1), x, pkg); - } - } - } - - function loadpkg(dir, cb) { - if (dir === '' || dir === '/') return cb(null); - if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { - return cb(null); - } - if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null); - - var pkgfile = path.join(dir, 'package.json'); - isFile(pkgfile, function (err, ex) { - // on err, ex is false - if (!ex) return loadpkg(path.dirname(dir), cb); - - readFile(pkgfile, function (err, body) { - if (err) cb(err); - try { var pkg = JSON.parse(body); } catch (jsonErr) {} - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - cb(null, pkg, dir); - }); - }); - } - - function loadAsDirectory(x, loadAsDirectoryPackage, callback) { - var cb = callback; - var fpkg = loadAsDirectoryPackage; - if (typeof fpkg === 'function') { - cb = fpkg; - fpkg = opts.package; - } - - var pkgfile = path.join(x, 'package.json'); - isFile(pkgfile, function (err, ex) { - if (err) return cb(err); - if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); - - readFile(pkgfile, function (err, body) { - if (err) return cb(err); - try { - var pkg = JSON.parse(body); - } catch (jsonErr) {} - - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - - if (pkg.main) { - if (typeof pkg.main !== 'string') { - var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); - mainError.code = 'INVALID_PACKAGE_MAIN'; - return cb(mainError); - } - if (pkg.main === '.' || pkg.main === './') { - pkg.main = 'index'; - } - loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); - - var dir = path.resolve(x, pkg.main); - loadAsDirectory(dir, pkg, function (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - loadAsFile(path.join(x, 'index'), pkg, cb); - }); - }); - return; - } - - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - } - - function processDirs(cb, dirs) { - if (dirs.length === 0) return cb(null, undefined); - var dir = dirs[0]; - - isDirectory(dir, isdir); - - function isdir(err, isdir) { - if (err) return cb(err); - if (!isdir) return processDirs(cb, dirs.slice(1)); - var file = path.join(dir, x); - loadAsFile(file, opts.package, onfile); - } - - function onfile(err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - loadAsDirectory(path.join(dir, x), opts.package, ondir); - } - - function ondir(err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - processDirs(cb, dirs.slice(1)); - } - } - function loadNodeModules(x, start, cb) { - processDirs(cb, nodeModulesPaths(start, opts, x)); - } -}; diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.js b/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.js deleted file mode 100644 index 0877650ccad4e8..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.js +++ /dev/null @@ -1,53 +0,0 @@ -var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; - -function specifierIncluded(specifier) { - var parts = specifier.split(' '); - var op = parts.length > 1 ? parts[0] : '='; - var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); - - for (var i = 0; i < 3; ++i) { - var cur = Number(current[i] || 0); - var ver = Number(versionParts[i] || 0); - if (cur === ver) { - continue; // eslint-disable-line no-restricted-syntax, no-continue - } - if (op === '<') { - return cur < ver; - } else if (op === '>=') { - return cur >= ver; - } else { - return false; - } - } - return op === '>='; -} - -function matchesRange(range) { - var specifiers = range.split(/ ?&& ?/); - if (specifiers.length === 0) { return false; } - for (var i = 0; i < specifiers.length; ++i) { - if (!specifierIncluded(specifiers[i])) { return false; } - } - return true; -} - -function versionIncluded(specifierValue) { - if (typeof specifierValue === 'boolean') { return specifierValue; } - if (specifierValue && typeof specifierValue === 'object') { - for (var i = 0; i < specifierValue.length; ++i) { - if (matchesRange(specifierValue[i])) { return true; } - } - return false; - } - return matchesRange(specifierValue); -} - -var data = require('./core.json'); - -var core = {}; -for (var mod in data) { // eslint-disable-line no-restricted-syntax - if (Object.prototype.hasOwnProperty.call(data, mod)) { - core[mod] = versionIncluded(data[mod]); - } -} -module.exports = core; diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.json b/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.json deleted file mode 100644 index 12a6ac7e6c364b..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "assert": true, - "async_hooks": ">= 8", - "buffer_ieee754": "< 0.9.7", - "buffer": true, - "child_process": true, - "cluster": true, - "console": true, - "constants": true, - "crypto": true, - "_debug_agent": ">= 1 && < 8", - "_debugger": "< 8", - "dgram": true, - "dns": true, - "domain": true, - "events": true, - "freelist": "< 6", - "fs": true, - "fs/promises": ">= 10 && < 10.1", - "_http_agent": ">= 0.11.1", - "_http_client": ">= 0.11.1", - "_http_common": ">= 0.11.1", - "_http_incoming": ">= 0.11.1", - "_http_outgoing": ">= 0.11.1", - "_http_server": ">= 0.11.1", - "http": true, - "http2": ">= 8.8", - "https": true, - "inspector": ">= 8.0.0", - "_linklist": "< 8", - "module": true, - "net": true, - "node-inspect/lib/_inspect": ">= 7.6.0 && < 12", - "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12", - "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12", - "os": true, - "path": true, - "perf_hooks": ">= 8.5", - "process": ">= 1", - "punycode": true, - "querystring": true, - "readline": true, - "repl": true, - "smalloc": ">= 0.11.5 && < 3", - "_stream_duplex": ">= 0.9.4", - "_stream_transform": ">= 0.9.4", - "_stream_wrap": ">= 1.4.1", - "_stream_passthrough": ">= 0.9.4", - "_stream_readable": ">= 0.9.4", - "_stream_writable": ">= 0.9.4", - "stream": true, - "string_decoder": true, - "sys": true, - "timers": true, - "_tls_common": ">= 0.11.13", - "_tls_legacy": ">= 0.11.3 && < 10", - "_tls_wrap": ">= 0.11.3", - "tls": true, - "trace_events": ">= 10", - "tty": true, - "url": true, - "util": true, - "v8/tools/arguments": ">= 10 && < 12", - "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8": ">= 1", - "vm": true, - "worker_threads": ">= 11.7", - "zlib": true -} diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/sync.js b/tools/node_modules/babel-eslint/node_modules/resolve/lib/sync.js deleted file mode 100644 index e8d83de5b6d3b2..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/sync.js +++ /dev/null @@ -1,172 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); -var normalizeOptions = require('./normalize-options.js'); - -var defaultIsFile = function isFile(file) { - try { - var stat = fs.statSync(file); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isFile() || stat.isFIFO(); -}; - -var defaultIsDir = function isDirectory(dir) { - try { - var stat = fs.statSync(dir); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isDirectory(); -}; - -var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts) { - if (opts && opts.preserveSymlinks === false) { - try { - return fs.realpathSync(x); - } catch (realPathErr) { - if (realPathErr.code !== 'ENOENT') { - throw realPathErr; - } - } - } - return x; -}; - -module.exports = function (x, options) { - if (typeof x !== 'string') { - throw new TypeError('Path must be a string.'); - } - var opts = normalizeOptions(x, options); - - var isFile = opts.isFile || defaultIsFile; - var readFileSync = opts.readFileSync || fs.readFileSync; - var isDirectory = opts.isDirectory || defaultIsDir; - - var extensions = opts.extensions || ['.js']; - var basedir = opts.basedir || path.dirname(caller()); - var parent = opts.filename || basedir; - - opts.paths = opts.paths || []; - - // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory - var absoluteStart = maybeUnwrapSymlink(path.resolve(basedir), opts); - - if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { - var res = path.resolve(absoluteStart, x); - if (x === '..' || x.slice(-1) === '/') res += '/'; - var m = loadAsFileSync(res) || loadAsDirectorySync(res); - if (m) return maybeUnwrapSymlink(m, opts); - } else if (core[x]) { - return x; - } else { - var n = loadNodeModulesSync(x, absoluteStart); - if (n) return maybeUnwrapSymlink(n, opts); - } - - if (core[x]) return x; - - var err = new Error("Cannot find module '" + x + "' from '" + parent + "'"); - err.code = 'MODULE_NOT_FOUND'; - throw err; - - function loadAsFileSync(x) { - var pkg = loadpkg(path.dirname(x)); - - if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) { - var rfile = path.relative(pkg.dir, x); - var r = opts.pathFilter(pkg.pkg, x, rfile); - if (r) { - x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign - } - } - - if (isFile(x)) { - return x; - } - - for (var i = 0; i < extensions.length; i++) { - var file = x + extensions[i]; - if (isFile(file)) { - return file; - } - } - } - - function loadpkg(dir) { - if (dir === '' || dir === '/') return; - if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { - return; - } - if ((/[/\\]node_modules[/\\]*$/).test(dir)) return; - - var pkgfile = path.join(dir, 'package.json'); - - if (!isFile(pkgfile)) { - return loadpkg(path.dirname(dir)); - } - - var body = readFileSync(pkgfile); - - try { - var pkg = JSON.parse(body); - } catch (jsonErr) {} - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, dir); - } - - return { pkg: pkg, dir: dir }; - } - - function loadAsDirectorySync(x) { - var pkgfile = path.join(x, '/package.json'); - if (isFile(pkgfile)) { - try { - var body = readFileSync(pkgfile, 'UTF8'); - var pkg = JSON.parse(body); - } catch (e) {} - - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, x); - } - - if (pkg.main) { - if (typeof pkg.main !== 'string') { - var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); - mainError.code = 'INVALID_PACKAGE_MAIN'; - throw mainError; - } - if (pkg.main === '.' || pkg.main === './') { - pkg.main = 'index'; - } - try { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - var n = loadAsDirectorySync(path.resolve(x, pkg.main)); - if (n) return n; - } catch (e) {} - } - } - - return loadAsFileSync(path.join(x, '/index')); - } - - function loadNodeModulesSync(x, start) { - var dirs = nodeModulesPaths(start, opts, x); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - if (isDirectory(dir)) { - var m = loadAsFileSync(path.join(dir, '/', x)); - if (m) return m; - var n = loadAsDirectorySync(path.join(dir, '/', x)); - if (n) return n; - } - } - } -}; diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/package.json b/tools/node_modules/babel-eslint/node_modules/resolve/package.json deleted file mode 100644 index 95353241e58cad..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/resolve/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/browserify/resolve/issues" - }, - "bundleDependencies": false, - "dependencies": { - "path-parse": "^1.0.6" - }, - "deprecated": false, - "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "devDependencies": { - "@ljharb/eslint-config": "^13.1.1", - "eslint": "^5.16.0", - "object-keys": "^1.1.1", - "safe-publish-latest": "^1.1.2", - "tap": "0.4.13", - "tape": "^4.11.0" - }, - "homepage": "https://github.com/browserify/resolve#readme", - "keywords": [ - "resolve", - "require", - "node", - "module" - ], - "license": "MIT", - "main": "index.js", - "name": "resolve", - "repository": { - "type": "git", - "url": "git://github.com/browserify/resolve.git" - }, - "scripts": { - "lint": "eslint .", - "posttest": "npm run test:multirepo", - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", - "test": "npm run --silent tests-only", - "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test", - "tests-only": "tape test/*.js" - }, - "version": "1.12.0" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/readme.markdown b/tools/node_modules/babel-eslint/node_modules/resolve/readme.markdown deleted file mode 100644 index f1b27063901cb3..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/resolve/readme.markdown +++ /dev/null @@ -1,201 +0,0 @@ -# resolve - -implements the [node `require.resolve()` -algorithm](https://nodejs.org/api/modules.html#modules_all_together) -such that you can `require.resolve()` on behalf of a file asynchronously and -synchronously - -[![build status](https://secure.travis-ci.org/browserify/node-resolve.png)](http://travis-ci.org/browserify/node-resolve) - -# example - -asynchronously resolve: - -```js -var resolve = require('resolve'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err); - else console.log(res); -}); -``` - -``` -$ node example/async.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -synchronously resolve: - -```js -var resolve = require('resolve'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); -``` - -``` -$ node example/sync.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -# methods - -```js -var resolve = require('resolve'); -``` - -## resolve(id, opts={}, cb) - -Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.package - `package.json` data applicable to the module being loaded - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files asynchronously - -* opts.isFile - function to asynchronously test whether a file exists - -* opts.isDirectory - function to asynchronously test whether a directory exists - -* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json contents before looking at the "main" field - * pkg - package data - * pkgfile - path to package.json - -* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) - - For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function - * request - the import specifier being resolved - * start - lookup path - * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution - * opts - the resolution options - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. -This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. -**Note:** this property is currently `true` by default but it will be changed to -`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. - -default `opts` values: - -```js -{ - paths: [], - basedir: __dirname, - extensions: ['.js'], - readFile: fs.readFile, - isFile: function isFile(file, cb) { - fs.stat(file, function (err, stat) { - if (!err) { - return cb(null, stat.isFile() || stat.isFIFO()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); - }, - isDirectory: function isDirectory(dir, cb) { - fs.stat(dir, function (err, stat) { - if (!err) { - return cb(null, stat.isDirectory()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); - }, - moduleDirectory: 'node_modules', - preserveSymlinks: true -} -``` - -## resolve.sync(id, opts) - -Synchronously resolve the module path string `id`, returning the result and -throwing an error when `id` can't be resolved. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files synchronously - -* opts.isFile - function to synchronously test whether a file exists - -* opts.isDirectory - function to synchronously test whether a directory exists - -* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field - * pkg - package data - * dir - directory for package.json (Note: the second argument will change to "pkgfile" in v2) - -* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. -This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. -**Note:** this property is currently `true` by default but it will be changed to -`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. - -default `opts` values: - -```js -{ - paths: [], - basedir: __dirname, - extensions: ['.js'], - readFileSync: fs.readFileSync, - isFile: function isFile(file) { - try { - var stat = fs.statSync(file); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isFile() || stat.isFIFO(); - }, - isDirectory: function isDirectory(dir) { - try { - var stat = fs.statSync(dir); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isDirectory(); - }, - moduleDirectory: 'node_modules', - preserveSymlinks: true -} -``` - -## resolve.isCore(pkg) - -Return whether a package is in core. - -# install - -With [npm](https://npmjs.org) do: - -```sh -npm install resolve -``` - -# license - -MIT diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/package.json b/tools/node_modules/babel-eslint/node_modules/source-map/package.json deleted file mode 100644 index 9e2674cec8bd3c..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/source-map/package.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - }, - { - "name": "Michael Z Goddard", - "email": "mzgoddard@gmail.com" - }, - { - "name": "azu", - "email": "azu@users.noreply.github.com" - }, - { - "name": "John Gozde", - "email": "john@gozde.ca" - }, - { - "name": "Adam Kirkton", - "email": "akirkton@truefitinnovation.com" - }, - { - "name": "Chris Montgomery", - "email": "christopher.montgomery@dowjones.com" - }, - { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com" - }, - { - "name": "Jack Herrington", - "email": "jherrington@walmartlabs.com" - }, - { - "name": "Chris Truter", - "email": "jeffpalentine@gmail.com" - }, - { - "name": "Daniel Espeset", - "email": "daniel@danielespeset.com" - }, - { - "name": "Jamie Wong", - "email": "jamie.lf.wong@gmail.com" - }, - { - "name": "Eddy Bruël", - "email": "ejpbruel@mozilla.com" - }, - { - "name": "Hawken Rives", - "email": "hawkrives@gmail.com" - }, - { - "name": "Gilad Peleg", - "email": "giladp007@gmail.com" - }, - { - "name": "djchie", - "email": "djchie.dev@gmail.com" - }, - { - "name": "Gary Ye", - "email": "garysye@gmail.com" - }, - { - "name": "Nicolas Lalevée", - "email": "nicolas.lalevee@hibnet.org" - } - ], - "deprecated": false, - "description": "Generates and consumes source maps", - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "source-map.js", - "lib/", - "dist/source-map.debug.js", - "dist/source-map.js", - "dist/source-map.min.js", - "dist/source-map.min.js.map" - ], - "homepage": "https://github.com/mozilla/source-map", - "license": "BSD-3-Clause", - "main": "./source-map.js", - "name": "source-map", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mozilla/source-map.git" - }, - "scripts": { - "build": "webpack --color", - "test": "npm run build && node test/run-tests.js", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "typings": "source-map", - "version": "0.5.7" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/package.json b/tools/node_modules/babel-eslint/node_modules/supports-color/package.json deleted file mode 100644 index 9e4eafa8573232..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/supports-color/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/chalk/supports-color/issues" - }, - "bundleDependencies": false, - "dependencies": { - "has-flag": "^3.0.0" - }, - "deprecated": false, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "ava": "^0.25.0", - "import-fresh": "^2.0.0", - "xo": "^0.20.0" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "browser.js" - ], - "homepage": "https://github.com/chalk/supports-color#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "license": "MIT", - "name": "supports-color", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/supports-color.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "5.5.0" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/package.json b/tools/node_modules/babel-eslint/node_modules/to-fast-properties/package.json deleted file mode 100644 index 2c80c243891203..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/to-fast-properties/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Force V8 to use fast properties for an object", - "devDependencies": { - "ava": "0.0.4" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/to-fast-properties#readme", - "keywords": [ - "object", - "obj", - "properties", - "props", - "v8", - "optimize", - "fast", - "convert", - "mode" - ], - "license": "MIT", - "name": "to-fast-properties", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/to-fast-properties.git" - }, - "scripts": { - "test": "node --allow-natives-syntax test.js" - }, - "version": "2.0.0" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/trim-right/index.js b/tools/node_modules/babel-eslint/node_modules/trim-right/index.js deleted file mode 100644 index 666f4b2f4eeb6a..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/trim-right/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; -module.exports = function (str) { - var tail = str.length; - - while (/[\s\uFEFF\u00A0]/.test(str[tail - 1])) { - tail--; - } - - return str.slice(0, tail); -}; diff --git a/tools/node_modules/babel-eslint/node_modules/trim-right/license b/tools/node_modules/babel-eslint/node_modules/trim-right/license deleted file mode 100644 index 654d0bfe943437..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/trim-right/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/tools/node_modules/babel-eslint/node_modules/trim-right/package.json b/tools/node_modules/babel-eslint/node_modules/trim-right/package.json deleted file mode 100644 index 4ed056783bb584..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/trim-right/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/trim-right/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Similar to String#trim() but removes only whitespace on the right", - "devDependencies": { - "ava": "0.0.4" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/trim-right#readme", - "keywords": [ - "trim", - "right", - "string", - "str", - "util", - "utils", - "utility", - "whitespace", - "space", - "remove", - "delete" - ], - "license": "MIT", - "name": "trim-right", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/trim-right.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.1" -} \ No newline at end of file diff --git a/tools/node_modules/babel-eslint/node_modules/trim-right/readme.md b/tools/node_modules/babel-eslint/node_modules/trim-right/readme.md deleted file mode 100644 index 0a4438acd7a898..00000000000000 --- a/tools/node_modules/babel-eslint/node_modules/trim-right/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# trim-right [![Build Status](https://travis-ci.org/sindresorhus/trim-right.svg?branch=master)](https://travis-ci.org/sindresorhus/trim-right) - -> Similar to [`String#trim()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) but removes only whitespace on the right - - -## Install - -``` -$ npm install --save trim-right -``` - - -## Usage - -```js -var trimRight = require('trim-right'); - -trimRight(' unicorn '); -//=> ' unicorn' -``` - - -## Related - -- [`trim-left`](https://github.com/sindresorhus/trim-left) - Similar to `String#trim()` but removes only whitespace on the left - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/node_modules/babel-eslint/package.json b/tools/node_modules/babel-eslint/package.json deleted file mode 100644 index fae7c72dbbf113..00000000000000 --- a/tools/node_modules/babel-eslint/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bugs": { - "url": "https://github.com/babel/babel-eslint/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "deprecated": false, - "description": "Custom parser for ESLint", - "devDependencies": { - "babel-eslint": "^8.2.6", - "dedent": "^0.7.0", - "eslint": "^5.6.0", - "eslint-config-babel": "^7.0.1", - "eslint-plugin-flowtype": "^2.30.3", - "eslint-plugin-import": "^2.14.0", - "eslint-plugin-prettier": "^2.1.2", - "espree": "^3.5.2", - "husky": "^1.0.0-rc.13", - "lint-staged": "^7.2.2", - "mocha": "^5.0.1", - "prettier": "^1.4.4" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/babel/babel-eslint", - "license": "MIT", - "lint-staged": { - "*.js": [ - "eslint --format=codeframe --fix", - "git add" - ] - }, - "main": "lib/index.js", - "name": "babel-eslint", - "peerDependencies": { - "eslint": ">= 4.12.1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel-eslint.git" - }, - "scripts": { - "changelog": "git log `git describe --tags --abbrev=0`..HEAD --pretty=format:' * %s (%an)' | grep -v 'Merge pull request'", - "fix": "eslint lib test --fix", - "lint": "eslint lib test", - "precommit": "lint-staged", - "preversion": "npm test", - "test": "npm run lint && npm run test-only", - "test-only": "mocha && mocha --require test/fixtures/preprocess-to-patch.js" - }, - "version": "10.0.3" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/README.md b/tools/node_modules/eslint/README.md index 4d527e87de841c..2fbe7ae7b38192 100644 --- a/tools/node_modules/eslint/README.md +++ b/tools/node_modules/eslint/README.md @@ -14,7 +14,7 @@ [Rules](https://eslint.org/docs/rules/) | [Contributing](https://eslint.org/docs/developer-guide/contributing) | [Reporting Bugs](https://eslint.org/docs/developer-guide/contributing/reporting-bugs) | -[Code of Conduct](https://js.foundation/community/code-of-conduct) | +[Code of Conduct](https://eslint.org/conduct) | [Twitter](https://twitter.com/geteslint) | [Mailing List](https://groups.google.com/group/eslint) | [Chat Room](https://eslint.org/chat) @@ -85,7 +85,7 @@ The three error levels allow you fine-grained control over how ESLint applies ru ## Code of Conduct -ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct). +ESLint adheres to the [JS Foundation Code of Conduct](https://eslint.org/conduct). ## Filing Issues @@ -207,11 +207,6 @@ Brandon Mills Toru Nagashima - -
-Kai Cataldo -
-
Milos Djermanovic @@ -263,10 +258,11 @@ The following companies, organizations, and individuals support ESLint's ongoing -

Gold Sponsors

-

Salesforce Airbnb Microsoft FOSS Fund Sponsorships

Silver Sponsors

+

Platinum Sponsors

+

Automattic

Gold Sponsors

+

Chrome's Web Framework & Tools Performance Fund Shopify Salesforce Airbnb Microsoft FOSS Fund Sponsorships

Silver Sponsors

Liftoff AMP Project

Bronze Sponsors

-

Writers Per Hour 2021 calendar Buy.Fineproxy.Org Veikkaajat.com Nettikasinot.media Norgekasino Japanesecasino CasinoTop.com Casino Topp Anagram Solver Kasinot.fi Pelisivut Nettikasinot.org BonusFinder Deutschland Bugsnag Stability Monitoring Mixpanel VPS Server Icons8: free icons, photos, illustrations, and music Discord ThemeIsle Marfeel Fire Stick Tricks

+

Writers Per Hour 2021 calendar Buy.Fineproxy.Org Veikkaajat.com Anagram Solver Bugsnag Stability Monitoring Mixpanel VPS Server Icons8: free icons, photos, illustrations, and music Discord ThemeIsle Fire Stick Tricks

## Technology Sponsors diff --git a/tools/node_modules/eslint/bin/eslint.js b/tools/node_modules/eslint/bin/eslint.js index 75b413148695e5..86291b0f52750a 100755 --- a/tools/node_modules/eslint/bin/eslint.js +++ b/tools/node_modules/eslint/bin/eslint.js @@ -14,7 +14,7 @@ require("v8-compile-cache"); // must do this initialization *before* other requires in order to work if (process.argv.includes("--debug")) { - require("debug").enable("eslint:*,-eslint:code-path"); + require("debug").enable("eslint:*,-eslint:code-path,eslintrc:*"); } //------------------------------------------------------------------------------ diff --git a/tools/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js b/tools/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js deleted file mode 100644 index df49c27772ac83..00000000000000 --- a/tools/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js +++ /dev/null @@ -1,502 +0,0 @@ -/* - * STOP!!! DO NOT MODIFY. - * - * This file is part of the ongoing work to move the eslintrc-style config - * system into the @eslint/eslintrc package. This file needs to remain - * unchanged in order for this work to proceed. - * - * If you think you need to change this file, please contact @nzakas first. - * - * Thanks in advance for your cooperation. - */ - -/** - * @fileoverview `CascadingConfigArrayFactory` class. - * - * `CascadingConfigArrayFactory` class has a responsibility: - * - * 1. Handles cascading of config files. - * - * It provides two methods: - * - * - `getConfigArrayForFile(filePath)` - * Get the corresponded configuration of a given file. This method doesn't - * throw even if the given file didn't exist. - * - `clearCache()` - * Clear the internal cache. You have to call this method when - * `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends - * on the additional plugins. (`CLIEngine#addPlugin()` method calls this.) - * - * @author Toru Nagashima - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const os = require("os"); -const path = require("path"); -const { validateConfigArray } = require("../shared/config-validator"); -const { emitDeprecationWarning } = require("../shared/deprecation-warnings"); -const { ConfigArrayFactory } = require("./config-array-factory"); -const { ConfigArray, ConfigDependency, IgnorePattern } = require("./config-array"); -const loadRules = require("./load-rules"); -const debug = require("debug")("eslint:cascading-config-array-factory"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -// Define types for VSCode IntelliSense. -/** @typedef {import("../shared/types").ConfigData} ConfigData */ -/** @typedef {import("../shared/types").Parser} Parser */ -/** @typedef {import("../shared/types").Plugin} Plugin */ -/** @typedef {ReturnType} ConfigArray */ - -/** - * @typedef {Object} CascadingConfigArrayFactoryOptions - * @property {Map} [additionalPluginPool] The map for additional plugins. - * @property {ConfigData} [baseConfig] The config by `baseConfig` option. - * @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files. - * @property {string} [cwd] The base directory to start lookup. - * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`. - * @property {string[]} [rulePaths] The value of `--rulesdir` option. - * @property {string} [specificConfigPath] The value of `--config` option. - * @property {boolean} [useEslintrc] if `false` then it doesn't load config files. - */ - -/** - * @typedef {Object} CascadingConfigArrayFactoryInternalSlots - * @property {ConfigArray} baseConfigArray The config array of `baseConfig` option. - * @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`. - * @property {ConfigArray} cliConfigArray The config array of CLI options. - * @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`. - * @property {ConfigArrayFactory} configArrayFactory The factory for config arrays. - * @property {Map} configCache The cache from directory paths to config arrays. - * @property {string} cwd The base directory to start lookup. - * @property {WeakMap} finalizeCache The cache from config arrays to finalized config arrays. - * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`. - * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`. - * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`. - * @property {boolean} useEslintrc if `false` then it doesn't load config files. - */ - -/** @type {WeakMap} */ -const internalSlotsMap = new WeakMap(); - -/** - * Create the config array from `baseConfig` and `rulePaths`. - * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots. - * @returns {ConfigArray} The config array of the base configs. - */ -function createBaseConfigArray({ - configArrayFactory, - baseConfigData, - rulePaths, - cwd -}) { - const baseConfigArray = configArrayFactory.create( - baseConfigData, - { name: "BaseConfig" } - ); - - /* - * Create the config array element for the default ignore patterns. - * This element has `ignorePattern` property that ignores the default - * patterns in the current working directory. - */ - baseConfigArray.unshift(configArrayFactory.create( - { ignorePatterns: IgnorePattern.DefaultPatterns }, - { name: "DefaultIgnorePattern" } - )[0]); - - /* - * Load rules `--rulesdir` option as a pseudo plugin. - * Use a pseudo plugin to define rules of `--rulesdir`, so we can validate - * the rule's options with only information in the config array. - */ - if (rulePaths && rulePaths.length > 0) { - baseConfigArray.push({ - type: "config", - name: "--rulesdir", - filePath: "", - plugins: { - "": new ConfigDependency({ - definition: { - rules: rulePaths.reduce( - (map, rulesPath) => Object.assign( - map, - loadRules(rulesPath, cwd) - ), - {} - ) - }, - filePath: "", - id: "", - importerName: "--rulesdir", - importerPath: "" - }) - } - }); - } - - return baseConfigArray; -} - -/** - * Create the config array from CLI options. - * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots. - * @returns {ConfigArray} The config array of the base configs. - */ -function createCLIConfigArray({ - cliConfigData, - configArrayFactory, - cwd, - ignorePath, - specificConfigPath -}) { - const cliConfigArray = configArrayFactory.create( - cliConfigData, - { name: "CLIOptions" } - ); - - cliConfigArray.unshift( - ...(ignorePath - ? configArrayFactory.loadESLintIgnore(ignorePath) - : configArrayFactory.loadDefaultESLintIgnore()) - ); - - if (specificConfigPath) { - cliConfigArray.unshift( - ...configArrayFactory.loadFile( - specificConfigPath, - { name: "--config", basePath: cwd } - ) - ); - } - - return cliConfigArray; -} - -/** - * The error type when there are files matched by a glob, but all of them have been ignored. - */ -class ConfigurationNotFoundError extends Error { - - // eslint-disable-next-line jsdoc/require-description - /** - * @param {string} directoryPath The directory path. - */ - constructor(directoryPath) { - super(`No ESLint configuration found in ${directoryPath}.`); - this.messageTemplate = "no-config-found"; - this.messageData = { directoryPath }; - } -} - -/** - * This class provides the functionality that enumerates every file which is - * matched by given glob patterns and that configuration. - */ -class CascadingConfigArrayFactory { - - /** - * Initialize this enumerator. - * @param {CascadingConfigArrayFactoryOptions} options The options. - */ - constructor({ - additionalPluginPool = new Map(), - baseConfig: baseConfigData = null, - cliConfig: cliConfigData = null, - cwd = process.cwd(), - ignorePath, - resolvePluginsRelativeTo, - rulePaths = [], - specificConfigPath = null, - useEslintrc = true - } = {}) { - const configArrayFactory = new ConfigArrayFactory({ - additionalPluginPool, - cwd, - resolvePluginsRelativeTo - }); - - internalSlotsMap.set(this, { - baseConfigArray: createBaseConfigArray({ - baseConfigData, - configArrayFactory, - cwd, - rulePaths - }), - baseConfigData, - cliConfigArray: createCLIConfigArray({ - cliConfigData, - configArrayFactory, - cwd, - ignorePath, - specificConfigPath - }), - cliConfigData, - configArrayFactory, - configCache: new Map(), - cwd, - finalizeCache: new WeakMap(), - ignorePath, - rulePaths, - specificConfigPath, - useEslintrc - }); - } - - /** - * The path to the current working directory. - * This is used by tests. - * @type {string} - */ - get cwd() { - const { cwd } = internalSlotsMap.get(this); - - return cwd; - } - - /** - * Get the config array of a given file. - * If `filePath` was not given, it returns the config which contains only - * `baseConfigData` and `cliConfigData`. - * @param {string} [filePath] The file path to a file. - * @param {Object} [options] The options. - * @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`. - * @returns {ConfigArray} The config array of the file. - */ - getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) { - const { - baseConfigArray, - cliConfigArray, - cwd - } = internalSlotsMap.get(this); - - if (!filePath) { - return new ConfigArray(...baseConfigArray, ...cliConfigArray); - } - - const directoryPath = path.dirname(path.resolve(cwd, filePath)); - - debug(`Load config files for ${directoryPath}.`); - - return this._finalizeConfigArray( - this._loadConfigInAncestors(directoryPath), - directoryPath, - ignoreNotFoundError - ); - } - - /** - * Set the config data to override all configs. - * Require to call `clearCache()` method after this method is called. - * @param {ConfigData} configData The config data to override all configs. - * @returns {void} - */ - setOverrideConfig(configData) { - const slots = internalSlotsMap.get(this); - - slots.cliConfigData = configData; - } - - /** - * Clear config cache. - * @returns {void} - */ - clearCache() { - const slots = internalSlotsMap.get(this); - - slots.baseConfigArray = createBaseConfigArray(slots); - slots.cliConfigArray = createCLIConfigArray(slots); - slots.configCache.clear(); - } - - /** - * Load and normalize config files from the ancestor directories. - * @param {string} directoryPath The path to a leaf directory. - * @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories. - * @returns {ConfigArray} The loaded config. - * @private - */ - _loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) { - const { - baseConfigArray, - configArrayFactory, - configCache, - cwd, - useEslintrc - } = internalSlotsMap.get(this); - - if (!useEslintrc) { - return baseConfigArray; - } - - let configArray = configCache.get(directoryPath); - - // Hit cache. - if (configArray) { - debug(`Cache hit: ${directoryPath}.`); - return configArray; - } - debug(`No cache found: ${directoryPath}.`); - - const homePath = os.homedir(); - - // Consider this is root. - if (directoryPath === homePath && cwd !== homePath) { - debug("Stop traversing because of considered root."); - if (configsExistInSubdirs) { - const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath); - - if (filePath) { - emitDeprecationWarning( - filePath, - "ESLINT_PERSONAL_CONFIG_SUPPRESS" - ); - } - } - return this._cacheConfig(directoryPath, baseConfigArray); - } - - // Load the config on this directory. - try { - configArray = configArrayFactory.loadInDirectory(directoryPath); - } catch (error) { - /* istanbul ignore next */ - if (error.code === "EACCES") { - debug("Stop traversing because of 'EACCES' error."); - return this._cacheConfig(directoryPath, baseConfigArray); - } - throw error; - } - - if (configArray.length > 0 && configArray.isRoot()) { - debug("Stop traversing because of 'root:true'."); - configArray.unshift(...baseConfigArray); - return this._cacheConfig(directoryPath, configArray); - } - - // Load from the ancestors and merge it. - const parentPath = path.dirname(directoryPath); - const parentConfigArray = parentPath && parentPath !== directoryPath - ? this._loadConfigInAncestors( - parentPath, - configsExistInSubdirs || configArray.length > 0 - ) - : baseConfigArray; - - if (configArray.length > 0) { - configArray.unshift(...parentConfigArray); - } else { - configArray = parentConfigArray; - } - - // Cache and return. - return this._cacheConfig(directoryPath, configArray); - } - - /** - * Freeze and cache a given config. - * @param {string} directoryPath The path to a directory as a cache key. - * @param {ConfigArray} configArray The config array as a cache value. - * @returns {ConfigArray} The `configArray` (frozen). - */ - _cacheConfig(directoryPath, configArray) { - const { configCache } = internalSlotsMap.get(this); - - Object.freeze(configArray); - configCache.set(directoryPath, configArray); - - return configArray; - } - - /** - * Finalize a given config array. - * Concatenate `--config` and other CLI options. - * @param {ConfigArray} configArray The parent config array. - * @param {string} directoryPath The path to the leaf directory to find config files. - * @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`. - * @returns {ConfigArray} The loaded config. - * @private - */ - _finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) { - const { - cliConfigArray, - configArrayFactory, - finalizeCache, - useEslintrc - } = internalSlotsMap.get(this); - - let finalConfigArray = finalizeCache.get(configArray); - - if (!finalConfigArray) { - finalConfigArray = configArray; - - // Load the personal config if there are no regular config files. - if ( - useEslintrc && - configArray.every(c => !c.filePath) && - cliConfigArray.every(c => !c.filePath) // `--config` option can be a file. - ) { - const homePath = os.homedir(); - - debug("Loading the config file of the home directory:", homePath); - - const personalConfigArray = configArrayFactory.loadInDirectory( - homePath, - { name: "PersonalConfig" } - ); - - if ( - personalConfigArray.length > 0 && - !directoryPath.startsWith(homePath) - ) { - const lastElement = - personalConfigArray[personalConfigArray.length - 1]; - - emitDeprecationWarning( - lastElement.filePath, - "ESLINT_PERSONAL_CONFIG_LOAD" - ); - } - - finalConfigArray = finalConfigArray.concat(personalConfigArray); - } - - // Apply CLI options. - if (cliConfigArray.length > 0) { - finalConfigArray = finalConfigArray.concat(cliConfigArray); - } - - // Validate rule settings and environments. - validateConfigArray(finalConfigArray); - - // Cache it. - Object.freeze(finalConfigArray); - finalizeCache.set(configArray, finalConfigArray); - - debug( - "Configuration was determined: %o on %s", - finalConfigArray, - directoryPath - ); - } - - // At least one element (the default ignore patterns) exists. - if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) { - throw new ConfigurationNotFoundError(directoryPath); - } - - return finalConfigArray; - } -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { CascadingConfigArrayFactory }; diff --git a/tools/node_modules/eslint/lib/cli-engine/cli-engine.js b/tools/node_modules/eslint/lib/cli-engine/cli-engine.js index 70c6f6f39f7643..9a414061501e2d 100644 --- a/tools/node_modules/eslint/lib/cli-engine/cli-engine.js +++ b/tools/node_modules/eslint/lib/cli-engine/cli-engine.js @@ -19,14 +19,29 @@ const fs = require("fs"); const path = require("path"); const defaultOptions = require("../../conf/default-cli-options"); const pkg = require("../../package.json"); -const ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops"); -const naming = require("@eslint/eslintrc/lib/shared/naming"); -const ModuleResolver = require("../shared/relative-module-resolver"); + + +const { + Legacy: { + ConfigOps, + naming, + CascadingConfigArrayFactory, + IgnorePattern, + getUsedExtractedConfigs + } +} = require("@eslint/eslintrc"); + +/* + * For some reason, ModuleResolver must be included via filepath instead of by + * API exports in order to work properly. That's why this is separated out onto + * its own require() statement. + */ +const ModuleResolver = require("@eslint/eslintrc/lib/shared/relative-module-resolver"); +const { FileEnumerator } = require("./file-enumerator"); + const { Linter } = require("../linter"); const builtInRules = require("../rules"); -const { CascadingConfigArrayFactory } = require("./cascading-config-array-factory"); -const { IgnorePattern, getUsedExtractedConfigs } = require("./config-array"); -const { FileEnumerator } = require("./file-enumerator"); +const loadRules = require("./load-rules"); const hash = require("./hash"); const LintResultCache = require("./lint-result-cache"); @@ -559,7 +574,11 @@ class CLIEngine { resolvePluginsRelativeTo: options.resolvePluginsRelativeTo, rulePaths: options.rulePaths, specificConfigPath: options.configFile, - useEslintrc: options.useEslintrc + useEslintrc: options.useEslintrc, + builtInRules, + loadRules, + eslintRecommendedPath: path.resolve(__dirname, "../../conf/eslint-recommended.js"), + eslintAllPath: path.resolve(__dirname, "../../conf/eslint-all.js") }); const fileEnumerator = new FileEnumerator({ configArrayFactory, diff --git a/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js b/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js deleted file mode 100644 index 2c7a79b491ecb3..00000000000000 --- a/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js +++ /dev/null @@ -1,1092 +0,0 @@ -/* - * STOP!!! DO NOT MODIFY. - * - * This file is part of the ongoing work to move the eslintrc-style config - * system into the @eslint/eslintrc package. This file needs to remain - * unchanged in order for this work to proceed. - * - * If you think you need to change this file, please contact @nzakas first. - * - * Thanks in advance for your cooperation. - */ - -/** - * @fileoverview The factory of `ConfigArray` objects. - * - * This class provides methods to create `ConfigArray` instance. - * - * - `create(configData, options)` - * Create a `ConfigArray` instance from a config data. This is to handle CLI - * options except `--config`. - * - `loadFile(filePath, options)` - * Create a `ConfigArray` instance from a config file. This is to handle - * `--config` option. If the file was not found, throws the following error: - * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error. - * - If the filename was `package.json`, an IO error or an - * `ESLINT_CONFIG_FIELD_NOT_FOUND` error. - * - Otherwise, an IO error such as `ENOENT`. - * - `loadInDirectory(directoryPath, options)` - * Create a `ConfigArray` instance from a config file which is on a given - * directory. This tries to load `.eslintrc.*` or `package.json`. If not - * found, returns an empty `ConfigArray`. - * - `loadESLintIgnore(filePath)` - * Create a `ConfigArray` instance from a config file that is `.eslintignore` - * format. This is to handle `--ignore-path` option. - * - `loadDefaultESLintIgnore()` - * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in - * the current working directory. - * - * `ConfigArrayFactory` class has the responsibility that loads configuration - * files, including loading `extends`, `parser`, and `plugins`. The created - * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`. - * - * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class - * handles cascading and hierarchy. - * - * @author Toru Nagashima - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const fs = require("fs"); -const path = require("path"); -const importFresh = require("import-fresh"); -const stripComments = require("strip-json-comments"); -const { validateConfigSchema } = require("../shared/config-validator"); -const naming = require("@eslint/eslintrc/lib/shared/naming"); -const ModuleResolver = require("../shared/relative-module-resolver"); -const { - ConfigArray, - ConfigDependency, - IgnorePattern, - OverrideTester -} = require("./config-array"); -const debug = require("debug")("eslint:config-array-factory"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -const eslintRecommendedPath = path.resolve(__dirname, "../../conf/eslint-recommended.js"); -const eslintAllPath = path.resolve(__dirname, "../../conf/eslint-all.js"); -const configFilenames = [ - ".eslintrc.js", - ".eslintrc.cjs", - ".eslintrc.yaml", - ".eslintrc.yml", - ".eslintrc.json", - ".eslintrc", - "package.json" -]; - -// Define types for VSCode IntelliSense. -/** @typedef {import("../shared/types").ConfigData} ConfigData */ -/** @typedef {import("../shared/types").OverrideConfigData} OverrideConfigData */ -/** @typedef {import("../shared/types").Parser} Parser */ -/** @typedef {import("../shared/types").Plugin} Plugin */ -/** @typedef {import("./config-array/config-dependency").DependentParser} DependentParser */ -/** @typedef {import("./config-array/config-dependency").DependentPlugin} DependentPlugin */ -/** @typedef {ConfigArray[0]} ConfigArrayElement */ - -/** - * @typedef {Object} ConfigArrayFactoryOptions - * @property {Map} [additionalPluginPool] The map for additional plugins. - * @property {string} [cwd] The path to the current working directory. - * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`. - */ - -/** - * @typedef {Object} ConfigArrayFactoryInternalSlots - * @property {Map} additionalPluginPool The map for additional plugins. - * @property {string} cwd The path to the current working directory. - * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from. - */ - -/** - * @typedef {Object} ConfigArrayFactoryLoadingContext - * @property {string} filePath The path to the current configuration. - * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. - * @property {string} name The name of the current configuration. - * @property {string} pluginBasePath The base path to resolve plugins. - * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors. - */ - -/** - * @typedef {Object} ConfigArrayFactoryLoadingContext - * @property {string} filePath The path to the current configuration. - * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. - * @property {string} name The name of the current configuration. - * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors. - */ - -/** @type {WeakMap} */ -const internalSlotsMap = new WeakMap(); - -/** - * Check if a given string is a file path. - * @param {string} nameOrPath A module name or file path. - * @returns {boolean} `true` if the `nameOrPath` is a file path. - */ -function isFilePath(nameOrPath) { - return ( - /^\.{1,2}[/\\]/u.test(nameOrPath) || - path.isAbsolute(nameOrPath) - ); -} - -/** - * Convenience wrapper for synchronously reading file contents. - * @param {string} filePath The filename to read. - * @returns {string} The file contents, with the BOM removed. - * @private - */ -function readFile(filePath) { - return fs.readFileSync(filePath, "utf8").replace(/^\ufeff/u, ""); -} - -/** - * Loads a YAML configuration from a file. - * @param {string} filePath The filename to load. - * @returns {ConfigData} The configuration object from the file. - * @throws {Error} If the file cannot be read. - * @private - */ -function loadYAMLConfigFile(filePath) { - debug(`Loading YAML config file: ${filePath}`); - - // lazy load YAML to improve performance when not used - const yaml = require("js-yaml"); - - try { - - // empty YAML file can be null, so always use - return yaml.safeLoad(readFile(filePath)) || {}; - } catch (e) { - debug(`Error reading YAML file: ${filePath}`); - e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; - throw e; - } -} - -/** - * Loads a JSON configuration from a file. - * @param {string} filePath The filename to load. - * @returns {ConfigData} The configuration object from the file. - * @throws {Error} If the file cannot be read. - * @private - */ -function loadJSONConfigFile(filePath) { - debug(`Loading JSON config file: ${filePath}`); - - try { - return JSON.parse(stripComments(readFile(filePath))); - } catch (e) { - debug(`Error reading JSON file: ${filePath}`); - e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; - e.messageTemplate = "failed-to-read-json"; - e.messageData = { - path: filePath, - message: e.message - }; - throw e; - } -} - -/** - * Loads a legacy (.eslintrc) configuration from a file. - * @param {string} filePath The filename to load. - * @returns {ConfigData} The configuration object from the file. - * @throws {Error} If the file cannot be read. - * @private - */ -function loadLegacyConfigFile(filePath) { - debug(`Loading legacy config file: ${filePath}`); - - // lazy load YAML to improve performance when not used - const yaml = require("js-yaml"); - - try { - return yaml.safeLoad(stripComments(readFile(filePath))) || /* istanbul ignore next */ {}; - } catch (e) { - debug("Error reading YAML file: %s\n%o", filePath, e); - e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; - throw e; - } -} - -/** - * Loads a JavaScript configuration from a file. - * @param {string} filePath The filename to load. - * @returns {ConfigData} The configuration object from the file. - * @throws {Error} If the file cannot be read. - * @private - */ -function loadJSConfigFile(filePath) { - debug(`Loading JS config file: ${filePath}`); - try { - return importFresh(filePath); - } catch (e) { - debug(`Error reading JavaScript file: ${filePath}`); - e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; - throw e; - } -} - -/** - * Loads a configuration from a package.json file. - * @param {string} filePath The filename to load. - * @returns {ConfigData} The configuration object from the file. - * @throws {Error} If the file cannot be read. - * @private - */ -function loadPackageJSONConfigFile(filePath) { - debug(`Loading package.json config file: ${filePath}`); - try { - const packageData = loadJSONConfigFile(filePath); - - if (!Object.hasOwnProperty.call(packageData, "eslintConfig")) { - throw Object.assign( - new Error("package.json file doesn't have 'eslintConfig' field."), - { code: "ESLINT_CONFIG_FIELD_NOT_FOUND" } - ); - } - - return packageData.eslintConfig; - } catch (e) { - debug(`Error reading package.json file: ${filePath}`); - e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; - throw e; - } -} - -/** - * Loads a `.eslintignore` from a file. - * @param {string} filePath The filename to load. - * @returns {string[]} The ignore patterns from the file. - * @private - */ -function loadESLintIgnoreFile(filePath) { - debug(`Loading .eslintignore file: ${filePath}`); - - try { - return readFile(filePath) - .split(/\r?\n/gu) - .filter(line => line.trim() !== "" && !line.startsWith("#")); - } catch (e) { - debug(`Error reading .eslintignore file: ${filePath}`); - e.message = `Cannot read .eslintignore file: ${filePath}\nError: ${e.message}`; - throw e; - } -} - -/** - * Creates an error to notify about a missing config to extend from. - * @param {string} configName The name of the missing config. - * @param {string} importerName The name of the config that imported the missing config - * @param {string} messageTemplate The text template to source error strings from. - * @returns {Error} The error object to throw - * @private - */ -function configInvalidError(configName, importerName, messageTemplate) { - return Object.assign( - new Error(`Failed to load config "${configName}" to extend from.`), - { - messageTemplate, - messageData: { configName, importerName } - } - ); -} - -/** - * Loads a configuration file regardless of the source. Inspects the file path - * to determine the correctly way to load the config file. - * @param {string} filePath The path to the configuration. - * @returns {ConfigData|null} The configuration information. - * @private - */ -function loadConfigFile(filePath) { - switch (path.extname(filePath)) { - case ".js": - case ".cjs": - return loadJSConfigFile(filePath); - - case ".json": - if (path.basename(filePath) === "package.json") { - return loadPackageJSONConfigFile(filePath); - } - return loadJSONConfigFile(filePath); - - case ".yaml": - case ".yml": - return loadYAMLConfigFile(filePath); - - default: - return loadLegacyConfigFile(filePath); - } -} - -/** - * Write debug log. - * @param {string} request The requested module name. - * @param {string} relativeTo The file path to resolve the request relative to. - * @param {string} filePath The resolved file path. - * @returns {void} - */ -function writeDebugLogForLoading(request, relativeTo, filePath) { - /* istanbul ignore next */ - if (debug.enabled) { - let nameAndVersion = null; - - try { - const packageJsonPath = ModuleResolver.resolve( - `${request}/package.json`, - relativeTo - ); - const { version = "unknown" } = require(packageJsonPath); - - nameAndVersion = `${request}@${version}`; - } catch (error) { - debug("package.json was not found:", error.message); - nameAndVersion = request; - } - - debug("Loaded: %s (%s)", nameAndVersion, filePath); - } -} - -/** - * Create a new context with default values. - * @param {ConfigArrayFactoryInternalSlots} slots The internal slots. - * @param {"config" | "ignore" | "implicit-processor" | undefined} providedType The type of the current configuration. Default is `"config"`. - * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`. - * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string. - * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`. - * @returns {ConfigArrayFactoryLoadingContext} The created context. - */ -function createContext( - { cwd, resolvePluginsRelativeTo }, - providedType, - providedName, - providedFilePath, - providedMatchBasePath -) { - const filePath = providedFilePath - ? path.resolve(cwd, providedFilePath) - : ""; - const matchBasePath = - (providedMatchBasePath && path.resolve(cwd, providedMatchBasePath)) || - (filePath && path.dirname(filePath)) || - cwd; - const name = - providedName || - (filePath && path.relative(cwd, filePath)) || - ""; - const pluginBasePath = - resolvePluginsRelativeTo || - (filePath && path.dirname(filePath)) || - cwd; - const type = providedType || "config"; - - return { filePath, matchBasePath, name, pluginBasePath, type }; -} - -/** - * Normalize a given plugin. - * - Ensure the object to have four properties: configs, environments, processors, and rules. - * - Ensure the object to not have other properties. - * @param {Plugin} plugin The plugin to normalize. - * @returns {Plugin} The normalized plugin. - */ -function normalizePlugin(plugin) { - return { - configs: plugin.configs || {}, - environments: plugin.environments || {}, - processors: plugin.processors || {}, - rules: plugin.rules || {} - }; -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -/** - * The factory of `ConfigArray` objects. - */ -class ConfigArrayFactory { - - /** - * Initialize this instance. - * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins. - */ - constructor({ - additionalPluginPool = new Map(), - cwd = process.cwd(), - resolvePluginsRelativeTo - } = {}) { - internalSlotsMap.set(this, { - additionalPluginPool, - cwd, - resolvePluginsRelativeTo: - resolvePluginsRelativeTo && - path.resolve(cwd, resolvePluginsRelativeTo) - }); - } - - /** - * Create `ConfigArray` instance from a config data. - * @param {ConfigData|null} configData The config data to create. - * @param {Object} [options] The options. - * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. - * @param {string} [options.filePath] The path to this config data. - * @param {string} [options.name] The config name. - * @returns {ConfigArray} Loaded config. - */ - create(configData, { basePath, filePath, name } = {}) { - if (!configData) { - return new ConfigArray(); - } - - const slots = internalSlotsMap.get(this); - const ctx = createContext(slots, "config", name, filePath, basePath); - const elements = this._normalizeConfigData(configData, ctx); - - return new ConfigArray(...elements); - } - - /** - * Load a config file. - * @param {string} filePath The path to a config file. - * @param {Object} [options] The options. - * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. - * @param {string} [options.name] The config name. - * @returns {ConfigArray} Loaded config. - */ - loadFile(filePath, { basePath, name } = {}) { - const slots = internalSlotsMap.get(this); - const ctx = createContext(slots, "config", name, filePath, basePath); - - return new ConfigArray(...this._loadConfigData(ctx)); - } - - /** - * Load the config file on a given directory if exists. - * @param {string} directoryPath The path to a directory. - * @param {Object} [options] The options. - * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. - * @param {string} [options.name] The config name. - * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. - */ - loadInDirectory(directoryPath, { basePath, name } = {}) { - const slots = internalSlotsMap.get(this); - - for (const filename of configFilenames) { - const ctx = createContext( - slots, - "config", - name, - path.join(directoryPath, filename), - basePath - ); - - if (fs.existsSync(ctx.filePath)) { - let configData; - - try { - configData = loadConfigFile(ctx.filePath); - } catch (error) { - if (!error || error.code !== "ESLINT_CONFIG_FIELD_NOT_FOUND") { - throw error; - } - } - - if (configData) { - debug(`Config file found: ${ctx.filePath}`); - return new ConfigArray( - ...this._normalizeConfigData(configData, ctx) - ); - } - } - } - - debug(`Config file not found on ${directoryPath}`); - return new ConfigArray(); - } - - /** - * Check if a config file on a given directory exists or not. - * @param {string} directoryPath The path to a directory. - * @returns {string | null} The path to the found config file. If not found then null. - */ - static getPathToConfigFileInDirectory(directoryPath) { - for (const filename of configFilenames) { - const filePath = path.join(directoryPath, filename); - - if (fs.existsSync(filePath)) { - if (filename === "package.json") { - try { - loadPackageJSONConfigFile(filePath); - return filePath; - } catch { /* ignore */ } - } else { - return filePath; - } - } - } - return null; - } - - /** - * Load `.eslintignore` file. - * @param {string} filePath The path to a `.eslintignore` file to load. - * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. - */ - loadESLintIgnore(filePath) { - const slots = internalSlotsMap.get(this); - const ctx = createContext( - slots, - "ignore", - void 0, - filePath, - slots.cwd - ); - const ignorePatterns = loadESLintIgnoreFile(ctx.filePath); - - return new ConfigArray( - ...this._normalizeESLintIgnoreData(ignorePatterns, ctx) - ); - } - - /** - * Load `.eslintignore` file in the current working directory. - * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. - */ - loadDefaultESLintIgnore() { - const slots = internalSlotsMap.get(this); - const eslintIgnorePath = path.resolve(slots.cwd, ".eslintignore"); - const packageJsonPath = path.resolve(slots.cwd, "package.json"); - - if (fs.existsSync(eslintIgnorePath)) { - return this.loadESLintIgnore(eslintIgnorePath); - } - if (fs.existsSync(packageJsonPath)) { - const data = loadJSONConfigFile(packageJsonPath); - - if (Object.hasOwnProperty.call(data, "eslintIgnore")) { - if (!Array.isArray(data.eslintIgnore)) { - throw new Error("Package.json eslintIgnore property requires an array of paths"); - } - const ctx = createContext( - slots, - "ignore", - "eslintIgnore in package.json", - packageJsonPath, - slots.cwd - ); - - return new ConfigArray( - ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx) - ); - } - } - - return new ConfigArray(); - } - - /** - * Load a given config file. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {IterableIterator} Loaded config. - * @private - */ - _loadConfigData(ctx) { - return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx); - } - - /** - * Normalize a given `.eslintignore` data to config array elements. - * @param {string[]} ignorePatterns The patterns to ignore files. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {IterableIterator} The normalized config. - * @private - */ - *_normalizeESLintIgnoreData(ignorePatterns, ctx) { - const elements = this._normalizeObjectConfigData( - { ignorePatterns }, - ctx - ); - - // Set `ignorePattern.loose` flag for backward compatibility. - for (const element of elements) { - if (element.ignorePattern) { - element.ignorePattern.loose = true; - } - yield element; - } - } - - /** - * Normalize a given config to an array. - * @param {ConfigData} configData The config data to normalize. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {IterableIterator} The normalized config. - * @private - */ - _normalizeConfigData(configData, ctx) { - validateConfigSchema(configData, ctx.name || ctx.filePath); - return this._normalizeObjectConfigData(configData, ctx); - } - - /** - * Normalize a given config to an array. - * @param {ConfigData|OverrideConfigData} configData The config data to normalize. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {IterableIterator} The normalized config. - * @private - */ - *_normalizeObjectConfigData(configData, ctx) { - const { files, excludedFiles, ...configBody } = configData; - const criteria = OverrideTester.create( - files, - excludedFiles, - ctx.matchBasePath - ); - const elements = this._normalizeObjectConfigDataBody(configBody, ctx); - - // Apply the criteria to every element. - for (const element of elements) { - - /* - * Merge the criteria. - * This is for the `overrides` entries that came from the - * configurations of `overrides[].extends`. - */ - element.criteria = OverrideTester.and(criteria, element.criteria); - - /* - * Remove `root` property to ignore `root` settings which came from - * `extends` in `overrides`. - */ - if (element.criteria) { - element.root = void 0; - } - - yield element; - } - } - - /** - * Normalize a given config to an array. - * @param {ConfigData} configData The config data to normalize. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {IterableIterator} The normalized config. - * @private - */ - *_normalizeObjectConfigDataBody( - { - env, - extends: extend, - globals, - ignorePatterns, - noInlineConfig, - parser: parserName, - parserOptions, - plugins: pluginList, - processor, - reportUnusedDisableDirectives, - root, - rules, - settings, - overrides: overrideList = [] - }, - ctx - ) { - const extendList = Array.isArray(extend) ? extend : [extend]; - const ignorePattern = ignorePatterns && new IgnorePattern( - Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns], - ctx.matchBasePath - ); - - // Flatten `extends`. - for (const extendName of extendList.filter(Boolean)) { - yield* this._loadExtends(extendName, ctx); - } - - // Load parser & plugins. - const parser = parserName && this._loadParser(parserName, ctx); - const plugins = pluginList && this._loadPlugins(pluginList, ctx); - - // Yield pseudo config data for file extension processors. - if (plugins) { - yield* this._takeFileExtensionProcessors(plugins, ctx); - } - - // Yield the config data except `extends` and `overrides`. - yield { - - // Debug information. - type: ctx.type, - name: ctx.name, - filePath: ctx.filePath, - - // Config data. - criteria: null, - env, - globals, - ignorePattern, - noInlineConfig, - parser, - parserOptions, - plugins, - processor, - reportUnusedDisableDirectives, - root, - rules, - settings - }; - - // Flatten `overries`. - for (let i = 0; i < overrideList.length; ++i) { - yield* this._normalizeObjectConfigData( - overrideList[i], - { ...ctx, name: `${ctx.name}#overrides[${i}]` } - ); - } - } - - /** - * Load configs of an element in `extends`. - * @param {string} extendName The name of a base config. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {IterableIterator} The normalized config. - * @private - */ - _loadExtends(extendName, ctx) { - debug("Loading {extends:%j} relative to %s", extendName, ctx.filePath); - try { - if (extendName.startsWith("eslint:")) { - return this._loadExtendedBuiltInConfig(extendName, ctx); - } - if (extendName.startsWith("plugin:")) { - return this._loadExtendedPluginConfig(extendName, ctx); - } - return this._loadExtendedShareableConfig(extendName, ctx); - } catch (error) { - error.message += `\nReferenced from: ${ctx.filePath || ctx.name}`; - throw error; - } - } - - /** - * Load configs of an element in `extends`. - * @param {string} extendName The name of a base config. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {IterableIterator} The normalized config. - * @private - */ - _loadExtendedBuiltInConfig(extendName, ctx) { - if (extendName === "eslint:recommended") { - return this._loadConfigData({ - ...ctx, - filePath: eslintRecommendedPath, - name: `${ctx.name} » ${extendName}` - }); - } - if (extendName === "eslint:all") { - return this._loadConfigData({ - ...ctx, - filePath: eslintAllPath, - name: `${ctx.name} » ${extendName}` - }); - } - - throw configInvalidError(extendName, ctx.name, "extend-config-missing"); - } - - /** - * Load configs of an element in `extends`. - * @param {string} extendName The name of a base config. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {IterableIterator} The normalized config. - * @private - */ - _loadExtendedPluginConfig(extendName, ctx) { - const slashIndex = extendName.lastIndexOf("/"); - - if (slashIndex === -1) { - throw configInvalidError(extendName, ctx.filePath, "plugin-invalid"); - } - - const pluginName = extendName.slice("plugin:".length, slashIndex); - const configName = extendName.slice(slashIndex + 1); - - if (isFilePath(pluginName)) { - throw new Error("'extends' cannot use a file path for plugins."); - } - - const plugin = this._loadPlugin(pluginName, ctx); - const configData = - plugin.definition && - plugin.definition.configs[configName]; - - if (configData) { - return this._normalizeConfigData(configData, { - ...ctx, - filePath: plugin.filePath || ctx.filePath, - name: `${ctx.name} » plugin:${plugin.id}/${configName}` - }); - } - - throw plugin.error || configInvalidError(extendName, ctx.filePath, "extend-config-missing"); - } - - /** - * Load configs of an element in `extends`. - * @param {string} extendName The name of a base config. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {IterableIterator} The normalized config. - * @private - */ - _loadExtendedShareableConfig(extendName, ctx) { - const { cwd } = internalSlotsMap.get(this); - const relativeTo = ctx.filePath || path.join(cwd, "__placeholder__.js"); - let request; - - if (isFilePath(extendName)) { - request = extendName; - } else if (extendName.startsWith(".")) { - request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior. - } else { - request = naming.normalizePackageName( - extendName, - "eslint-config" - ); - } - - let filePath; - - try { - filePath = ModuleResolver.resolve(request, relativeTo); - } catch (error) { - /* istanbul ignore else */ - if (error && error.code === "MODULE_NOT_FOUND") { - throw configInvalidError(extendName, ctx.filePath, "extend-config-missing"); - } - throw error; - } - - writeDebugLogForLoading(request, relativeTo, filePath); - return this._loadConfigData({ - ...ctx, - filePath, - name: `${ctx.name} » ${request}` - }); - } - - /** - * Load given plugins. - * @param {string[]} names The plugin names to load. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {Record} The loaded parser. - * @private - */ - _loadPlugins(names, ctx) { - return names.reduce((map, name) => { - if (isFilePath(name)) { - throw new Error("Plugins array cannot includes file paths."); - } - const plugin = this._loadPlugin(name, ctx); - - map[plugin.id] = plugin; - - return map; - }, {}); - } - - /** - * Load a given parser. - * @param {string} nameOrPath The package name or the path to a parser file. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {DependentParser} The loaded parser. - */ - _loadParser(nameOrPath, ctx) { - debug("Loading parser %j from %s", nameOrPath, ctx.filePath); - - const { cwd } = internalSlotsMap.get(this); - const relativeTo = ctx.filePath || path.join(cwd, "__placeholder__.js"); - - try { - const filePath = ModuleResolver.resolve(nameOrPath, relativeTo); - - writeDebugLogForLoading(nameOrPath, relativeTo, filePath); - - return new ConfigDependency({ - definition: require(filePath), - filePath, - id: nameOrPath, - importerName: ctx.name, - importerPath: ctx.filePath - }); - } catch (error) { - - // If the parser name is "espree", load the espree of ESLint. - if (nameOrPath === "espree") { - debug("Fallback espree."); - return new ConfigDependency({ - definition: require("espree"), - filePath: require.resolve("espree"), - id: nameOrPath, - importerName: ctx.name, - importerPath: ctx.filePath - }); - } - - debug("Failed to load parser '%s' declared in '%s'.", nameOrPath, ctx.name); - error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`; - - return new ConfigDependency({ - error, - id: nameOrPath, - importerName: ctx.name, - importerPath: ctx.filePath - }); - } - } - - /** - * Load a given plugin. - * @param {string} name The plugin name to load. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {DependentPlugin} The loaded plugin. - * @private - */ - _loadPlugin(name, ctx) { - debug("Loading plugin %j from %s", name, ctx.filePath); - - const { additionalPluginPool } = internalSlotsMap.get(this); - const request = naming.normalizePackageName(name, "eslint-plugin"); - const id = naming.getShorthandName(request, "eslint-plugin"); - const relativeTo = path.join(ctx.pluginBasePath, "__placeholder__.js"); - - if (name.match(/\s+/u)) { - const error = Object.assign( - new Error(`Whitespace found in plugin name '${name}'`), - { - messageTemplate: "whitespace-found", - messageData: { pluginName: request } - } - ); - - return new ConfigDependency({ - error, - id, - importerName: ctx.name, - importerPath: ctx.filePath - }); - } - - // Check for additional pool. - const plugin = - additionalPluginPool.get(request) || - additionalPluginPool.get(id); - - if (plugin) { - return new ConfigDependency({ - definition: normalizePlugin(plugin), - filePath: "", // It's unknown where the plugin came from. - id, - importerName: ctx.name, - importerPath: ctx.filePath - }); - } - - let filePath; - let error; - - try { - filePath = ModuleResolver.resolve(request, relativeTo); - } catch (resolveError) { - error = resolveError; - /* istanbul ignore else */ - if (error && error.code === "MODULE_NOT_FOUND") { - error.messageTemplate = "plugin-missing"; - error.messageData = { - pluginName: request, - resolvePluginsRelativeTo: ctx.pluginBasePath, - importerName: ctx.name - }; - } - } - - if (filePath) { - try { - writeDebugLogForLoading(request, relativeTo, filePath); - - const startTime = Date.now(); - const pluginDefinition = require(filePath); - - debug(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`); - - return new ConfigDependency({ - definition: normalizePlugin(pluginDefinition), - filePath, - id, - importerName: ctx.name, - importerPath: ctx.filePath - }); - } catch (loadError) { - error = loadError; - } - } - - debug("Failed to load plugin '%s' declared in '%s'.", name, ctx.name); - error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`; - return new ConfigDependency({ - error, - id, - importerName: ctx.name, - importerPath: ctx.filePath - }); - } - - /** - * Take file expression processors as config array elements. - * @param {Record} plugins The plugin definitions. - * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. - * @returns {IterableIterator} The config array elements of file expression processors. - * @private - */ - *_takeFileExtensionProcessors(plugins, ctx) { - for (const pluginId of Object.keys(plugins)) { - const processors = - plugins[pluginId] && - plugins[pluginId].definition && - plugins[pluginId].definition.processors; - - if (!processors) { - continue; - } - - for (const processorId of Object.keys(processors)) { - if (processorId.startsWith(".")) { - yield* this._normalizeObjectConfigData( - { - files: [`*${processorId}`], - processor: `${pluginId}/${processorId}` - }, - { - ...ctx, - type: "implicit-processor", - name: `${ctx.name}#processors["${pluginId}/${processorId}"]` - } - ); - } - } - } - } -} - -module.exports = { ConfigArrayFactory, createContext }; diff --git a/tools/node_modules/eslint/lib/cli-engine/config-array/config-array.js b/tools/node_modules/eslint/lib/cli-engine/config-array/config-array.js deleted file mode 100644 index c2ef6c94ab0414..00000000000000 --- a/tools/node_modules/eslint/lib/cli-engine/config-array/config-array.js +++ /dev/null @@ -1,536 +0,0 @@ -/* - * STOP!!! DO NOT MODIFY. - * - * This file is part of the ongoing work to move the eslintrc-style config - * system into the @eslint/eslintrc package. This file needs to remain - * unchanged in order for this work to proceed. - * - * If you think you need to change this file, please contact @nzakas first. - * - * Thanks in advance for your cooperation. - */ - -/** - * @fileoverview `ConfigArray` class. - * - * `ConfigArray` class expresses the full of a configuration. It has the entry - * config file, base config files that were extended, loaded parsers, and loaded - * plugins. - * - * `ConfigArray` class provides three properties and two methods. - * - * - `pluginEnvironments` - * - `pluginProcessors` - * - `pluginRules` - * The `Map` objects that contain the members of all plugins that this - * config array contains. Those map objects don't have mutation methods. - * Those keys are the member ID such as `pluginId/memberName`. - * - `isRoot()` - * If `true` then this configuration has `root:true` property. - * - `extractConfig(filePath)` - * Extract the final configuration for a given file. This means merging - * every config array element which that `criteria` property matched. The - * `filePath` argument must be an absolute path. - * - * `ConfigArrayFactory` provides the loading logic of config files. - * - * @author Toru Nagashima - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const { ExtractedConfig } = require("./extracted-config"); -const { IgnorePattern } = require("./ignore-pattern"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -// Define types for VSCode IntelliSense. -/** @typedef {import("../../shared/types").Environment} Environment */ -/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */ -/** @typedef {import("../../shared/types").RuleConf} RuleConf */ -/** @typedef {import("../../shared/types").Rule} Rule */ -/** @typedef {import("../../shared/types").Plugin} Plugin */ -/** @typedef {import("../../shared/types").Processor} Processor */ -/** @typedef {import("./config-dependency").DependentParser} DependentParser */ -/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */ -/** @typedef {import("./override-tester")["OverrideTester"]} OverrideTester */ - -/** - * @typedef {Object} ConfigArrayElement - * @property {string} name The name of this config element. - * @property {string} filePath The path to the source file of this config element. - * @property {InstanceType|null} criteria The tester for the `files` and `excludedFiles` of this config element. - * @property {Record|undefined} env The environment settings. - * @property {Record|undefined} globals The global variable settings. - * @property {IgnorePattern|undefined} ignorePattern The ignore patterns. - * @property {boolean|undefined} noInlineConfig The flag that disables directive comments. - * @property {DependentParser|undefined} parser The parser loader. - * @property {Object|undefined} parserOptions The parser options. - * @property {Record|undefined} plugins The plugin loaders. - * @property {string|undefined} processor The processor name to refer plugin's processor. - * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments. - * @property {boolean|undefined} root The flag to express root. - * @property {Record|undefined} rules The rule settings - * @property {Object|undefined} settings The shared settings. - * @property {"config" | "ignore" | "implicit-processor"} type The element type. - */ - -/** - * @typedef {Object} ConfigArrayInternalSlots - * @property {Map} cache The cache to extract configs. - * @property {ReadonlyMap|null} envMap The map from environment ID to environment definition. - * @property {ReadonlyMap|null} processorMap The map from processor ID to environment definition. - * @property {ReadonlyMap|null} ruleMap The map from rule ID to rule definition. - */ - -/** @type {WeakMap} */ -const internalSlotsMap = new class extends WeakMap { - get(key) { - let value = super.get(key); - - if (!value) { - value = { - cache: new Map(), - envMap: null, - processorMap: null, - ruleMap: null - }; - super.set(key, value); - } - - return value; - } -}(); - -/** - * Get the indices which are matched to a given file. - * @param {ConfigArrayElement[]} elements The elements. - * @param {string} filePath The path to a target file. - * @returns {number[]} The indices. - */ -function getMatchedIndices(elements, filePath) { - const indices = []; - - for (let i = elements.length - 1; i >= 0; --i) { - const element = elements[i]; - - if (!element.criteria || (filePath && element.criteria.test(filePath))) { - indices.push(i); - } - } - - return indices; -} - -/** - * Check if a value is a non-null object. - * @param {any} x The value to check. - * @returns {boolean} `true` if the value is a non-null object. - */ -function isNonNullObject(x) { - return typeof x === "object" && x !== null; -} - -/** - * Merge two objects. - * - * Assign every property values of `y` to `x` if `x` doesn't have the property. - * If `x`'s property value is an object, it does recursive. - * @param {Object} target The destination to merge - * @param {Object|undefined} source The source to merge. - * @returns {void} - */ -function mergeWithoutOverwrite(target, source) { - if (!isNonNullObject(source)) { - return; - } - - for (const key of Object.keys(source)) { - if (key === "__proto__") { - continue; - } - - if (isNonNullObject(target[key])) { - mergeWithoutOverwrite(target[key], source[key]); - } else if (target[key] === void 0) { - if (isNonNullObject(source[key])) { - target[key] = Array.isArray(source[key]) ? [] : {}; - mergeWithoutOverwrite(target[key], source[key]); - } else if (source[key] !== void 0) { - target[key] = source[key]; - } - } - } -} - -/** - * The error for plugin conflicts. - */ -class PluginConflictError extends Error { - - /** - * Initialize this error object. - * @param {string} pluginId The plugin ID. - * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins. - */ - constructor(pluginId, plugins) { - super(`Plugin "${pluginId}" was conflicted between ${plugins.map(p => `"${p.importerName}"`).join(" and ")}.`); - this.messageTemplate = "plugin-conflict"; - this.messageData = { pluginId, plugins }; - } -} - -/** - * Merge plugins. - * `target`'s definition is prior to `source`'s. - * @param {Record} target The destination to merge - * @param {Record|undefined} source The source to merge. - * @returns {void} - */ -function mergePlugins(target, source) { - if (!isNonNullObject(source)) { - return; - } - - for (const key of Object.keys(source)) { - if (key === "__proto__") { - continue; - } - const targetValue = target[key]; - const sourceValue = source[key]; - - // Adopt the plugin which was found at first. - if (targetValue === void 0) { - if (sourceValue.error) { - throw sourceValue.error; - } - target[key] = sourceValue; - } else if (sourceValue.filePath !== targetValue.filePath) { - throw new PluginConflictError(key, [ - { - filePath: targetValue.filePath, - importerName: targetValue.importerName - }, - { - filePath: sourceValue.filePath, - importerName: sourceValue.importerName - } - ]); - } - } -} - -/** - * Merge rule configs. - * `target`'s definition is prior to `source`'s. - * @param {Record} target The destination to merge - * @param {Record|undefined} source The source to merge. - * @returns {void} - */ -function mergeRuleConfigs(target, source) { - if (!isNonNullObject(source)) { - return; - } - - for (const key of Object.keys(source)) { - if (key === "__proto__") { - continue; - } - const targetDef = target[key]; - const sourceDef = source[key]; - - // Adopt the rule config which was found at first. - if (targetDef === void 0) { - if (Array.isArray(sourceDef)) { - target[key] = [...sourceDef]; - } else { - target[key] = [sourceDef]; - } - - /* - * If the first found rule config is severity only and the current rule - * config has options, merge the severity and the options. - */ - } else if ( - targetDef.length === 1 && - Array.isArray(sourceDef) && - sourceDef.length >= 2 - ) { - targetDef.push(...sourceDef.slice(1)); - } - } -} - -/** - * Create the extracted config. - * @param {ConfigArray} instance The config elements. - * @param {number[]} indices The indices to use. - * @returns {ExtractedConfig} The extracted config. - */ -function createConfig(instance, indices) { - const config = new ExtractedConfig(); - const ignorePatterns = []; - - // Merge elements. - for (const index of indices) { - const element = instance[index]; - - // Adopt the parser which was found at first. - if (!config.parser && element.parser) { - if (element.parser.error) { - throw element.parser.error; - } - config.parser = element.parser; - } - - // Adopt the processor which was found at first. - if (!config.processor && element.processor) { - config.processor = element.processor; - } - - // Adopt the noInlineConfig which was found at first. - if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) { - config.noInlineConfig = element.noInlineConfig; - config.configNameOfNoInlineConfig = element.name; - } - - // Adopt the reportUnusedDisableDirectives which was found at first. - if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) { - config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives; - } - - // Collect ignorePatterns - if (element.ignorePattern) { - ignorePatterns.push(element.ignorePattern); - } - - // Merge others. - mergeWithoutOverwrite(config.env, element.env); - mergeWithoutOverwrite(config.globals, element.globals); - mergeWithoutOverwrite(config.parserOptions, element.parserOptions); - mergeWithoutOverwrite(config.settings, element.settings); - mergePlugins(config.plugins, element.plugins); - mergeRuleConfigs(config.rules, element.rules); - } - - // Create the predicate function for ignore patterns. - if (ignorePatterns.length > 0) { - config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse()); - } - - return config; -} - -/** - * Collect definitions. - * @template T, U - * @param {string} pluginId The plugin ID for prefix. - * @param {Record} defs The definitions to collect. - * @param {Map} map The map to output. - * @param {function(T): U} [normalize] The normalize function for each value. - * @returns {void} - */ -function collect(pluginId, defs, map, normalize) { - if (defs) { - const prefix = pluginId && `${pluginId}/`; - - for (const [key, value] of Object.entries(defs)) { - map.set( - `${prefix}${key}`, - normalize ? normalize(value) : value - ); - } - } -} - -/** - * Normalize a rule definition. - * @param {Function|Rule} rule The rule definition to normalize. - * @returns {Rule} The normalized rule definition. - */ -function normalizePluginRule(rule) { - return typeof rule === "function" ? { create: rule } : rule; -} - -/** - * Delete the mutation methods from a given map. - * @param {Map} map The map object to delete. - * @returns {void} - */ -function deleteMutationMethods(map) { - Object.defineProperties(map, { - clear: { configurable: true, value: void 0 }, - delete: { configurable: true, value: void 0 }, - set: { configurable: true, value: void 0 } - }); -} - -/** - * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array. - * @param {ConfigArrayElement[]} elements The config elements. - * @param {ConfigArrayInternalSlots} slots The internal slots. - * @returns {void} - */ -function initPluginMemberMaps(elements, slots) { - const processed = new Set(); - - slots.envMap = new Map(); - slots.processorMap = new Map(); - slots.ruleMap = new Map(); - - for (const element of elements) { - if (!element.plugins) { - continue; - } - - for (const [pluginId, value] of Object.entries(element.plugins)) { - const plugin = value.definition; - - if (!plugin || processed.has(pluginId)) { - continue; - } - processed.add(pluginId); - - collect(pluginId, plugin.environments, slots.envMap); - collect(pluginId, plugin.processors, slots.processorMap); - collect(pluginId, plugin.rules, slots.ruleMap, normalizePluginRule); - } - } - - deleteMutationMethods(slots.envMap); - deleteMutationMethods(slots.processorMap); - deleteMutationMethods(slots.ruleMap); -} - -/** - * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array. - * @param {ConfigArray} instance The config elements. - * @returns {ConfigArrayInternalSlots} The extracted config. - */ -function ensurePluginMemberMaps(instance) { - const slots = internalSlotsMap.get(instance); - - if (!slots.ruleMap) { - initPluginMemberMaps(instance, slots); - } - - return slots; -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -/** - * The Config Array. - * - * `ConfigArray` instance contains all settings, parsers, and plugins. - * You need to call `ConfigArray#extractConfig(filePath)` method in order to - * extract, merge and get only the config data which is related to an arbitrary - * file. - * @extends {Array} - */ -class ConfigArray extends Array { - - /** - * Get the plugin environments. - * The returned map cannot be mutated. - * @type {ReadonlyMap} The plugin environments. - */ - get pluginEnvironments() { - return ensurePluginMemberMaps(this).envMap; - } - - /** - * Get the plugin processors. - * The returned map cannot be mutated. - * @type {ReadonlyMap} The plugin processors. - */ - get pluginProcessors() { - return ensurePluginMemberMaps(this).processorMap; - } - - /** - * Get the plugin rules. - * The returned map cannot be mutated. - * @returns {ReadonlyMap} The plugin rules. - */ - get pluginRules() { - return ensurePluginMemberMaps(this).ruleMap; - } - - /** - * Check if this config has `root` flag. - * @returns {boolean} `true` if this config array is root. - */ - isRoot() { - for (let i = this.length - 1; i >= 0; --i) { - const root = this[i].root; - - if (typeof root === "boolean") { - return root; - } - } - return false; - } - - /** - * Extract the config data which is related to a given file. - * @param {string} filePath The absolute path to the target file. - * @returns {ExtractedConfig} The extracted config data. - */ - extractConfig(filePath) { - const { cache } = internalSlotsMap.get(this); - const indices = getMatchedIndices(this, filePath); - const cacheKey = indices.join(","); - - if (!cache.has(cacheKey)) { - cache.set(cacheKey, createConfig(this, indices)); - } - - return cache.get(cacheKey); - } - - /** - * Check if a given path is an additional lint target. - * @param {string} filePath The absolute path to the target file. - * @returns {boolean} `true` if the file is an additional lint target. - */ - isAdditionalTargetPath(filePath) { - for (const { criteria, type } of this) { - if ( - type === "config" && - criteria && - !criteria.endsWithWildcard && - criteria.test(filePath) - ) { - return true; - } - } - return false; - } -} - -const exportObject = { - ConfigArray, - - /** - * Get the used extracted configs. - * CLIEngine will use this method to collect used deprecated rules. - * @param {ConfigArray} instance The config array object to get. - * @returns {ExtractedConfig[]} The used extracted configs. - * @private - */ - getUsedExtractedConfigs(instance) { - const { cache } = internalSlotsMap.get(instance); - - return Array.from(cache.values()); - } -}; - -module.exports = exportObject; diff --git a/tools/node_modules/eslint/lib/cli-engine/config-array/config-dependency.js b/tools/node_modules/eslint/lib/cli-engine/config-array/config-dependency.js deleted file mode 100644 index 9fc67b0105792d..00000000000000 --- a/tools/node_modules/eslint/lib/cli-engine/config-array/config-dependency.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - * STOP!!! DO NOT MODIFY. - * - * This file is part of the ongoing work to move the eslintrc-style config - * system into the @eslint/eslintrc package. This file needs to remain - * unchanged in order for this work to proceed. - * - * If you think you need to change this file, please contact @nzakas first. - * - * Thanks in advance for your cooperation. - */ - -/** - * @fileoverview `ConfigDependency` class. - * - * `ConfigDependency` class expresses a loaded parser or plugin. - * - * If the parser or plugin was loaded successfully, it has `definition` property - * and `filePath` property. Otherwise, it has `error` property. - * - * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it - * omits `definition` property. - * - * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers - * or plugins. - * - * @author Toru Nagashima - */ -"use strict"; - -const util = require("util"); - -/** - * The class is to store parsers or plugins. - * This class hides the loaded object from `JSON.stringify()` and `console.log`. - * @template T - */ -class ConfigDependency { - - /** - * Initialize this instance. - * @param {Object} data The dependency data. - * @param {T} [data.definition] The dependency if the loading succeeded. - * @param {Error} [data.error] The error object if the loading failed. - * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded. - * @param {string} data.id The ID of this dependency. - * @param {string} data.importerName The name of the config file which loads this dependency. - * @param {string} data.importerPath The path to the config file which loads this dependency. - */ - constructor({ - definition = null, - error = null, - filePath = null, - id, - importerName, - importerPath - }) { - - /** - * The loaded dependency if the loading succeeded. - * @type {T|null} - */ - this.definition = definition; - - /** - * The error object if the loading failed. - * @type {Error|null} - */ - this.error = error; - - /** - * The loaded dependency if the loading succeeded. - * @type {string|null} - */ - this.filePath = filePath; - - /** - * The ID of this dependency. - * @type {string} - */ - this.id = id; - - /** - * The name of the config file which loads this dependency. - * @type {string} - */ - this.importerName = importerName; - - /** - * The path to the config file which loads this dependency. - * @type {string} - */ - this.importerPath = importerPath; - } - - // eslint-disable-next-line jsdoc/require-description - /** - * @returns {Object} a JSON compatible object. - */ - toJSON() { - const obj = this[util.inspect.custom](); - - // Display `error.message` (`Error#message` is unenumerable). - if (obj.error instanceof Error) { - obj.error = { ...obj.error, message: obj.error.message }; - } - - return obj; - } - - // eslint-disable-next-line jsdoc/require-description - /** - * @returns {Object} an object to display by `console.log()`. - */ - [util.inspect.custom]() { - const { - definition: _ignore, // eslint-disable-line no-unused-vars - ...obj - } = this; - - return obj; - } -} - -/** @typedef {ConfigDependency} DependentParser */ -/** @typedef {ConfigDependency} DependentPlugin */ - -module.exports = { ConfigDependency }; diff --git a/tools/node_modules/eslint/lib/cli-engine/config-array/extracted-config.js b/tools/node_modules/eslint/lib/cli-engine/config-array/extracted-config.js deleted file mode 100644 index fd7cabab3e97b2..00000000000000 --- a/tools/node_modules/eslint/lib/cli-engine/config-array/extracted-config.js +++ /dev/null @@ -1,158 +0,0 @@ -/* - * STOP!!! DO NOT MODIFY. - * - * This file is part of the ongoing work to move the eslintrc-style config - * system into the @eslint/eslintrc package. This file needs to remain - * unchanged in order for this work to proceed. - * - * If you think you need to change this file, please contact @nzakas first. - * - * Thanks in advance for your cooperation. - */ - -/** - * @fileoverview `ExtractedConfig` class. - * - * `ExtractedConfig` class expresses a final configuration for a specific file. - * - * It provides one method. - * - * - `toCompatibleObjectAsConfigFileContent()` - * Convert this configuration to the compatible object as the content of - * config files. It converts the loaded parser and plugins to strings. - * `CLIEngine#getConfigForFile(filePath)` method uses this method. - * - * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance. - * - * @author Toru Nagashima - */ -"use strict"; - -const { IgnorePattern } = require("./ignore-pattern"); - -// For VSCode intellisense -/** @typedef {import("../../shared/types").ConfigData} ConfigData */ -/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */ -/** @typedef {import("../../shared/types").SeverityConf} SeverityConf */ -/** @typedef {import("./config-dependency").DependentParser} DependentParser */ -/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */ - -/** - * Check if `xs` starts with `ys`. - * @template T - * @param {T[]} xs The array to check. - * @param {T[]} ys The array that may be the first part of `xs`. - * @returns {boolean} `true` if `xs` starts with `ys`. - */ -function startsWith(xs, ys) { - return xs.length >= ys.length && ys.every((y, i) => y === xs[i]); -} - -/** - * The class for extracted config data. - */ -class ExtractedConfig { - constructor() { - - /** - * The config name what `noInlineConfig` setting came from. - * @type {string} - */ - this.configNameOfNoInlineConfig = ""; - - /** - * Environments. - * @type {Record} - */ - this.env = {}; - - /** - * Global variables. - * @type {Record} - */ - this.globals = {}; - - /** - * The glob patterns that ignore to lint. - * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined} - */ - this.ignores = void 0; - - /** - * The flag that disables directive comments. - * @type {boolean|undefined} - */ - this.noInlineConfig = void 0; - - /** - * Parser definition. - * @type {DependentParser|null} - */ - this.parser = null; - - /** - * Options for the parser. - * @type {Object} - */ - this.parserOptions = {}; - - /** - * Plugin definitions. - * @type {Record} - */ - this.plugins = {}; - - /** - * Processor ID. - * @type {string|null} - */ - this.processor = null; - - /** - * The flag that reports unused `eslint-disable` directive comments. - * @type {boolean|undefined} - */ - this.reportUnusedDisableDirectives = void 0; - - /** - * Rule settings. - * @type {Record} - */ - this.rules = {}; - - /** - * Shared settings. - * @type {Object} - */ - this.settings = {}; - } - - /** - * Convert this config to the compatible object as a config file content. - * @returns {ConfigData} The converted object. - */ - toCompatibleObjectAsConfigFileContent() { - const { - /* eslint-disable no-unused-vars */ - configNameOfNoInlineConfig: _ignore1, - processor: _ignore2, - /* eslint-enable no-unused-vars */ - ignores, - ...config - } = this; - - config.parser = config.parser && config.parser.filePath; - config.plugins = Object.keys(config.plugins).filter(Boolean).reverse(); - config.ignorePatterns = ignores ? ignores.patterns : []; - - // Strip the default patterns from `ignorePatterns`. - if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) { - config.ignorePatterns = - config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length); - } - - return config; - } -} - -module.exports = { ExtractedConfig }; diff --git a/tools/node_modules/eslint/lib/cli-engine/config-array/ignore-pattern.js b/tools/node_modules/eslint/lib/cli-engine/config-array/ignore-pattern.js deleted file mode 100644 index 37d686dd1bb9cf..00000000000000 --- a/tools/node_modules/eslint/lib/cli-engine/config-array/ignore-pattern.js +++ /dev/null @@ -1,249 +0,0 @@ -/* - * STOP!!! DO NOT MODIFY. - * - * This file is part of the ongoing work to move the eslintrc-style config - * system into the @eslint/eslintrc package. This file needs to remain - * unchanged in order for this work to proceed. - * - * If you think you need to change this file, please contact @nzakas first. - * - * Thanks in advance for your cooperation. - */ - -/** - * @fileoverview `IgnorePattern` class. - * - * `IgnorePattern` class has the set of glob patterns and the base path. - * - * It provides two static methods. - * - * - `IgnorePattern.createDefaultIgnore(cwd)` - * Create the default predicate function. - * - `IgnorePattern.createIgnore(ignorePatterns)` - * Create the predicate function from multiple `IgnorePattern` objects. - * - * It provides two properties and a method. - * - * - `patterns` - * The glob patterns that ignore to lint. - * - `basePath` - * The base path of the glob patterns. If absolute paths existed in the - * glob patterns, those are handled as relative paths to the base path. - * - `getPatternsRelativeTo(basePath)` - * Get `patterns` as modified for a given base path. It modifies the - * absolute paths in the patterns as prepending the difference of two base - * paths. - * - * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes - * `ignorePatterns` properties. - * - * @author Toru Nagashima - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const assert = require("assert"); -const path = require("path"); -const ignore = require("ignore"); -const debug = require("debug")("eslint:ignore-pattern"); - -/** @typedef {ReturnType} Ignore */ - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Get the path to the common ancestor directory of given paths. - * @param {string[]} sourcePaths The paths to calculate the common ancestor. - * @returns {string} The path to the common ancestor directory. - */ -function getCommonAncestorPath(sourcePaths) { - let result = sourcePaths[0]; - - for (let i = 1; i < sourcePaths.length; ++i) { - const a = result; - const b = sourcePaths[i]; - - // Set the shorter one (it's the common ancestor if one includes the other). - result = a.length < b.length ? a : b; - - // Set the common ancestor. - for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) { - if (a[j] !== b[j]) { - result = a.slice(0, lastSepPos); - break; - } - if (a[j] === path.sep) { - lastSepPos = j; - } - } - } - - let resolvedResult = result || path.sep; - - // if Windows common ancestor is root of drive must have trailing slash to be absolute. - if (resolvedResult && resolvedResult.endsWith(":") && process.platform === "win32") { - resolvedResult += path.sep; - } - return resolvedResult; -} - -/** - * Make relative path. - * @param {string} from The source path to get relative path. - * @param {string} to The destination path to get relative path. - * @returns {string} The relative path. - */ -function relative(from, to) { - const relPath = path.relative(from, to); - - if (path.sep === "/") { - return relPath; - } - return relPath.split(path.sep).join("/"); -} - -/** - * Get the trailing slash if existed. - * @param {string} filePath The path to check. - * @returns {string} The trailing slash if existed. - */ -function dirSuffix(filePath) { - const isDir = ( - filePath.endsWith(path.sep) || - (process.platform === "win32" && filePath.endsWith("/")) - ); - - return isDir ? "/" : ""; -} - -const DefaultPatterns = Object.freeze(["/**/node_modules/*"]); -const DotPatterns = Object.freeze([".*", "!.eslintrc.*", "!../"]); - -//------------------------------------------------------------------------------ -// Public -//------------------------------------------------------------------------------ - -class IgnorePattern { - - /** - * The default patterns. - * @type {string[]} - */ - static get DefaultPatterns() { - return DefaultPatterns; - } - - /** - * Create the default predicate function. - * @param {string} cwd The current working directory. - * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}} - * The preficate function. - * The first argument is an absolute path that is checked. - * The second argument is the flag to not ignore dotfiles. - * If the predicate function returned `true`, it means the path should be ignored. - */ - static createDefaultIgnore(cwd) { - return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]); - } - - /** - * Create the predicate function from multiple `IgnorePattern` objects. - * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns. - * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}} - * The preficate function. - * The first argument is an absolute path that is checked. - * The second argument is the flag to not ignore dotfiles. - * If the predicate function returned `true`, it means the path should be ignored. - */ - static createIgnore(ignorePatterns) { - debug("Create with: %o", ignorePatterns); - - const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath)); - const patterns = [].concat( - ...ignorePatterns.map(p => p.getPatternsRelativeTo(basePath)) - ); - const ig = ignore().add([...DotPatterns, ...patterns]); - const dotIg = ignore().add(patterns); - - debug(" processed: %o", { basePath, patterns }); - - return Object.assign( - (filePath, dot = false) => { - assert(path.isAbsolute(filePath), "'filePath' should be an absolute path."); - const relPathRaw = relative(basePath, filePath); - const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath)); - const adoptedIg = dot ? dotIg : ig; - const result = relPath !== "" && adoptedIg.ignores(relPath); - - debug("Check", { filePath, dot, relativePath: relPath, result }); - return result; - }, - { basePath, patterns } - ); - } - - /** - * Initialize a new `IgnorePattern` instance. - * @param {string[]} patterns The glob patterns that ignore to lint. - * @param {string} basePath The base path of `patterns`. - */ - constructor(patterns, basePath) { - assert(path.isAbsolute(basePath), "'basePath' should be an absolute path."); - - /** - * The glob patterns that ignore to lint. - * @type {string[]} - */ - this.patterns = patterns; - - /** - * The base path of `patterns`. - * @type {string} - */ - this.basePath = basePath; - - /** - * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`. - * - * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility. - * It's `false` as-is for `ignorePatterns` property in config files. - * @type {boolean} - */ - this.loose = false; - } - - /** - * Get `patterns` as modified for a given base path. It modifies the - * absolute paths in the patterns as prepending the difference of two base - * paths. - * @param {string} newBasePath The base path. - * @returns {string[]} Modifired patterns. - */ - getPatternsRelativeTo(newBasePath) { - assert(path.isAbsolute(newBasePath), "'newBasePath' should be an absolute path."); - const { basePath, loose, patterns } = this; - - if (newBasePath === basePath) { - return patterns; - } - const prefix = `/${relative(newBasePath, basePath)}`; - - return patterns.map(pattern => { - const negative = pattern.startsWith("!"); - const head = negative ? "!" : ""; - const body = negative ? pattern.slice(1) : pattern; - - if (body.startsWith("/") || body.startsWith("../")) { - return `${head}${prefix}${body}`; - } - return loose ? pattern : `${head}${prefix}/**/${body}`; - }); - } -} - -module.exports = { IgnorePattern }; diff --git a/tools/node_modules/eslint/lib/cli-engine/config-array/index.js b/tools/node_modules/eslint/lib/cli-engine/config-array/index.js deleted file mode 100644 index 146c6f8927967e..00000000000000 --- a/tools/node_modules/eslint/lib/cli-engine/config-array/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * STOP!!! DO NOT MODIFY. - * - * This file is part of the ongoing work to move the eslintrc-style config - * system into the @eslint/eslintrc package. This file needs to remain - * unchanged in order for this work to proceed. - * - * If you think you need to change this file, please contact @nzakas first. - * - * Thanks in advance for your cooperation. - */ - -/** - * @fileoverview `ConfigArray` class. - * @author Toru Nagashima - */ -"use strict"; - -const { ConfigArray, getUsedExtractedConfigs } = require("./config-array"); -const { ConfigDependency } = require("./config-dependency"); -const { ExtractedConfig } = require("./extracted-config"); -const { IgnorePattern } = require("./ignore-pattern"); -const { OverrideTester } = require("./override-tester"); - -module.exports = { - ConfigArray, - ConfigDependency, - ExtractedConfig, - IgnorePattern, - OverrideTester, - getUsedExtractedConfigs -}; diff --git a/tools/node_modules/eslint/lib/cli-engine/config-array/override-tester.js b/tools/node_modules/eslint/lib/cli-engine/config-array/override-tester.js deleted file mode 100644 index 75dffe2352e9ac..00000000000000 --- a/tools/node_modules/eslint/lib/cli-engine/config-array/override-tester.js +++ /dev/null @@ -1,235 +0,0 @@ -/* - * STOP!!! DO NOT MODIFY. - * - * This file is part of the ongoing work to move the eslintrc-style config - * system into the @eslint/eslintrc package. This file needs to remain - * unchanged in order for this work to proceed. - * - * If you think you need to change this file, please contact @nzakas first. - * - * Thanks in advance for your cooperation. - */ - -/** - * @fileoverview `OverrideTester` class. - * - * `OverrideTester` class handles `files` property and `excludedFiles` property - * of `overrides` config. - * - * It provides one method. - * - * - `test(filePath)` - * Test if a file path matches the pair of `files` property and - * `excludedFiles` property. The `filePath` argument must be an absolute - * path. - * - * `ConfigArrayFactory` creates `OverrideTester` objects when it processes - * `overrides` properties. - * - * @author Toru Nagashima - */ -"use strict"; - -const assert = require("assert"); -const path = require("path"); -const util = require("util"); -const { Minimatch } = require("minimatch"); -const minimatchOpts = { dot: true, matchBase: true }; - -/** - * @typedef {Object} Pattern - * @property {InstanceType[] | null} includes The positive matchers. - * @property {InstanceType[] | null} excludes The negative matchers. - */ - -/** - * Normalize a given pattern to an array. - * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns. - * @returns {string[]|null} Normalized patterns. - * @private - */ -function normalizePatterns(patterns) { - if (Array.isArray(patterns)) { - return patterns.filter(Boolean); - } - if (typeof patterns === "string" && patterns) { - return [patterns]; - } - return []; -} - -/** - * Create the matchers of given patterns. - * @param {string[]} patterns The patterns. - * @returns {InstanceType[] | null} The matchers. - */ -function toMatcher(patterns) { - if (patterns.length === 0) { - return null; - } - return patterns.map(pattern => { - if (/^\.[/\\]/u.test(pattern)) { - return new Minimatch( - pattern.slice(2), - - // `./*.js` should not match with `subdir/foo.js` - { ...minimatchOpts, matchBase: false } - ); - } - return new Minimatch(pattern, minimatchOpts); - }); -} - -/** - * Convert a given matcher to string. - * @param {Pattern} matchers The matchers. - * @returns {string} The string expression of the matcher. - */ -function patternToJson({ includes, excludes }) { - return { - includes: includes && includes.map(m => m.pattern), - excludes: excludes && excludes.map(m => m.pattern) - }; -} - -/** - * The class to test given paths are matched by the patterns. - */ -class OverrideTester { - - /** - * Create a tester with given criteria. - * If there are no criteria, returns `null`. - * @param {string|string[]} files The glob patterns for included files. - * @param {string|string[]} excludedFiles The glob patterns for excluded files. - * @param {string} basePath The path to the base directory to test paths. - * @returns {OverrideTester|null} The created instance or `null`. - */ - static create(files, excludedFiles, basePath) { - const includePatterns = normalizePatterns(files); - const excludePatterns = normalizePatterns(excludedFiles); - let endsWithWildcard = false; - - if (includePatterns.length === 0) { - return null; - } - - // Rejects absolute paths or relative paths to parents. - for (const pattern of includePatterns) { - if (path.isAbsolute(pattern) || pattern.includes("..")) { - throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`); - } - if (pattern.endsWith("*")) { - endsWithWildcard = true; - } - } - for (const pattern of excludePatterns) { - if (path.isAbsolute(pattern) || pattern.includes("..")) { - throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`); - } - } - - const includes = toMatcher(includePatterns); - const excludes = toMatcher(excludePatterns); - - return new OverrideTester( - [{ includes, excludes }], - basePath, - endsWithWildcard - ); - } - - /** - * Combine two testers by logical and. - * If either of the testers was `null`, returns the other tester. - * The `basePath` property of the two must be the same value. - * @param {OverrideTester|null} a A tester. - * @param {OverrideTester|null} b Another tester. - * @returns {OverrideTester|null} Combined tester. - */ - static and(a, b) { - if (!b) { - return a && new OverrideTester( - a.patterns, - a.basePath, - a.endsWithWildcard - ); - } - if (!a) { - return new OverrideTester( - b.patterns, - b.basePath, - b.endsWithWildcard - ); - } - - assert.strictEqual(a.basePath, b.basePath); - return new OverrideTester( - a.patterns.concat(b.patterns), - a.basePath, - a.endsWithWildcard || b.endsWithWildcard - ); - } - - /** - * Initialize this instance. - * @param {Pattern[]} patterns The matchers. - * @param {string} basePath The base path. - * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`. - */ - constructor(patterns, basePath, endsWithWildcard = false) { - - /** @type {Pattern[]} */ - this.patterns = patterns; - - /** @type {string} */ - this.basePath = basePath; - - /** @type {boolean} */ - this.endsWithWildcard = endsWithWildcard; - } - - /** - * Test if a given path is matched or not. - * @param {string} filePath The absolute path to the target file. - * @returns {boolean} `true` if the path was matched. - */ - test(filePath) { - if (typeof filePath !== "string" || !path.isAbsolute(filePath)) { - throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`); - } - const relativePath = path.relative(this.basePath, filePath); - - return this.patterns.every(({ includes, excludes }) => ( - (!includes || includes.some(m => m.match(relativePath))) && - (!excludes || !excludes.some(m => m.match(relativePath))) - )); - } - - // eslint-disable-next-line jsdoc/require-description - /** - * @returns {Object} a JSON compatible object. - */ - toJSON() { - if (this.patterns.length === 1) { - return { - ...patternToJson(this.patterns[0]), - basePath: this.basePath - }; - } - return { - AND: this.patterns.map(patternToJson), - basePath: this.basePath - }; - } - - // eslint-disable-next-line jsdoc/require-description - /** - * @returns {Object} an object to display by `console.log()`. - */ - [util.inspect.custom]() { - return this.toJSON(); - } -} - -module.exports = { OverrideTester }; diff --git a/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js b/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js index 7c433d32f44b1c..c2961d71ac0632 100644 --- a/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js +++ b/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js @@ -40,8 +40,13 @@ const getGlobParent = require("glob-parent"); const isGlob = require("is-glob"); const { escapeRegExp } = require("lodash"); const { Minimatch } = require("minimatch"); -const { IgnorePattern } = require("./config-array"); -const { CascadingConfigArrayFactory } = require("./cascading-config-array-factory"); + +const { + Legacy: { + IgnorePattern, + CascadingConfigArrayFactory + } +} = require("@eslint/eslintrc"); const debug = require("debug")("eslint:file-enumerator"); //------------------------------------------------------------------------------ @@ -208,7 +213,11 @@ class FileEnumerator { */ constructor({ cwd = process.cwd(), - configArrayFactory = new CascadingConfigArrayFactory({ cwd }), + configArrayFactory = new CascadingConfigArrayFactory({ + cwd, + eslintRecommendedPath: path.resolve(__dirname, "../../conf/eslint-recommended.js"), + eslintAllPath: path.resolve(__dirname, "../../conf/eslint-all.js") + }), extensions = null, globInputPaths = true, errorOnUnmatchedPattern = true, diff --git a/tools/node_modules/eslint/lib/linter/report-translator.js b/tools/node_modules/eslint/lib/linter/report-translator.js index eef5165585b21d..bed5af81e5dcec 100644 --- a/tools/node_modules/eslint/lib/linter/report-translator.js +++ b/tools/node_modules/eslint/lib/linter/report-translator.js @@ -196,15 +196,19 @@ function mapSuggestions(descriptor, sourceCode, messages) { return []; } - return descriptor.suggest.map(suggestInfo => { - const computedDesc = suggestInfo.desc || messages[suggestInfo.messageId]; - - return { - ...suggestInfo, - desc: interpolate(computedDesc, suggestInfo.data), - fix: normalizeFixes(suggestInfo, sourceCode) - }; - }); + return descriptor.suggest + .map(suggestInfo => { + const computedDesc = suggestInfo.desc || messages[suggestInfo.messageId]; + + return { + ...suggestInfo, + desc: interpolate(computedDesc, suggestInfo.data), + fix: normalizeFixes(suggestInfo, sourceCode) + }; + }) + + // Remove suggestions that didn't provide a fix + .filter(({ fix }) => fix); } /** diff --git a/tools/node_modules/eslint/lib/linter/timing.js b/tools/node_modules/eslint/lib/linter/timing.js index 8396d9215b54dc..58230306855abe 100644 --- a/tools/node_modules/eslint/lib/linter/timing.js +++ b/tools/node_modules/eslint/lib/linter/timing.js @@ -44,6 +44,26 @@ const enabled = !!process.env.TIMING; const HEADERS = ["Rule", "Time (ms)", "Relative"]; const ALIGN = [alignLeft, alignRight, alignRight]; +/** + * Decide how many rules to show in the output list. + * @returns {number} the number of rules to show + */ +function getListSize() { + const MINIMUM_SIZE = 10; + + if (typeof process.env.TIMING !== "string") { + return MINIMUM_SIZE; + } + + if (process.env.TIMING.toLowerCase() === "all") { + return Number.POSITIVE_INFINITY; + } + + const TIMING_ENV_VAR_AS_INTEGER = Number.parseInt(process.env.TIMING, 10); + + return TIMING_ENV_VAR_AS_INTEGER > 10 ? TIMING_ENV_VAR_AS_INTEGER : MINIMUM_SIZE; +} + /* istanbul ignore next */ /** * display the data @@ -61,7 +81,7 @@ function display(data) { return [key, time]; }) .sort((a, b) => b[1] - a[1]) - .slice(0, 10); + .slice(0, getListSize()); rows.forEach(row => { row.push(`${(row[1] * 100 / total).toFixed(1)}%`); @@ -133,7 +153,8 @@ module.exports = (function() { return { time, - enabled + enabled, + getListSize }; }()); diff --git a/tools/node_modules/eslint/lib/rules/constructor-super.js b/tools/node_modules/eslint/lib/rules/constructor-super.js index 8787fc569a4f15..dfec18fb65a4b1 100644 --- a/tools/node_modules/eslint/lib/rules/constructor-super.js +++ b/tools/node_modules/eslint/lib/rules/constructor-super.js @@ -79,6 +79,17 @@ function isPossibleConstructor(node) { return false; case "LogicalExpression": + + /* + * If the && operator short-circuits, the left side was falsy and therefore not a constructor, and if + * it doesn't short-circuit, it takes the value from the right side, so the right side must always be a + * possible constructor. A future improvement could verify that the left side could be truthy by + * excluding falsy literals. + */ + if (node.operator === "&&") { + return isPossibleConstructor(node.right); + } + return ( isPossibleConstructor(node.left) || isPossibleConstructor(node.right) diff --git a/tools/node_modules/eslint/lib/rules/index.js b/tools/node_modules/eslint/lib/rules/index.js index 3cf26e51bc8392..35af38fd108ff5 100644 --- a/tools/node_modules/eslint/lib/rules/index.js +++ b/tools/node_modules/eslint/lib/rules/index.js @@ -169,6 +169,7 @@ module.exports = new LazyLoadingRuleMap(Object.entries({ "no-new-require": () => require("./no-new-require"), "no-new-symbol": () => require("./no-new-symbol"), "no-new-wrappers": () => require("./no-new-wrappers"), + "no-nonoctal-decimal-escape": () => require("./no-nonoctal-decimal-escape"), "no-obj-calls": () => require("./no-obj-calls"), "no-octal": () => require("./no-octal"), "no-octal-escape": () => require("./no-octal-escape"), @@ -217,6 +218,7 @@ module.exports = new LazyLoadingRuleMap(Object.entries({ "no-unreachable-loop": () => require("./no-unreachable-loop"), "no-unsafe-finally": () => require("./no-unsafe-finally"), "no-unsafe-negation": () => require("./no-unsafe-negation"), + "no-unsafe-optional-chaining": () => require("./no-unsafe-optional-chaining"), "no-unused-expressions": () => require("./no-unused-expressions"), "no-unused-labels": () => require("./no-unused-labels"), "no-unused-vars": () => require("./no-unused-vars"), diff --git a/tools/node_modules/eslint/lib/rules/no-constant-condition.js b/tools/node_modules/eslint/lib/rules/no-constant-condition.js index 5e5838641028fe..7d324634244cb9 100644 --- a/tools/node_modules/eslint/lib/rules/no-constant-condition.js +++ b/tools/node_modules/eslint/lib/rules/no-constant-condition.js @@ -9,9 +9,6 @@ // Helpers //------------------------------------------------------------------------------ -const EQUALITY_OPERATORS = ["===", "!==", "==", "!="]; -const RELATIONAL_OPERATORS = [">", "<", ">=", "<=", "in", "instanceof"]; - //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -56,6 +53,35 @@ module.exports = { // Helpers //-------------------------------------------------------------------------- + /** + * Returns literal's value converted to the Boolean type + * @param {ASTNode} node any `Literal` node + * @returns {boolean | null} `true` when node is truthy, `false` when node is falsy, + * `null` when it cannot be determined. + */ + function getBooleanValue(node) { + if (node.value === null) { + + /* + * it might be a null literal or bigint/regex literal in unsupported environments . + * https://github.com/estree/estree/blob/14df8a024956ea289bd55b9c2226a1d5b8a473ee/es5.md#regexpliteral + * https://github.com/estree/estree/blob/14df8a024956ea289bd55b9c2226a1d5b8a473ee/es2020.md#bigintliteral + */ + + if (node.raw === "null") { + return false; + } + + // regex is always truthy + if (typeof node.regex === "object") { + return true; + } + + return null; + } + + return !!node.value; + } /** * Checks if a branch node of LogicalExpression short circuits the whole condition @@ -66,15 +92,23 @@ module.exports = { function isLogicalIdentity(node, operator) { switch (node.type) { case "Literal": - return (operator === "||" && node.value === true) || - (operator === "&&" && node.value === false); + return (operator === "||" && getBooleanValue(node) === true) || + (operator === "&&" && getBooleanValue(node) === false); case "UnaryExpression": return (operator === "&&" && node.operator === "void"); case "LogicalExpression": - return isLogicalIdentity(node.left, node.operator) || - isLogicalIdentity(node.right, node.operator); + + /* + * handles `a && false || b` + * `false` is an identity element of `&&` but not `||` + */ + return operator === node.operator && + ( + isLogicalIdentity(node.left, node.operator) || + isLogicalIdentity(node.right, node.operator) + ); // no default } @@ -113,12 +147,18 @@ module.exports = { } case "UnaryExpression": - if (node.operator === "void") { + if ( + node.operator === "void" || + node.operator === "typeof" && inBooleanPosition + ) { return true; } - return (node.operator === "typeof" && inBooleanPosition) || - isConstant(node.argument, true); + if (node.operator === "!") { + return isConstant(node.argument, true); + } + + return isConstant(node.argument, false); case "BinaryExpression": return isConstant(node.left, false) && @@ -129,21 +169,9 @@ module.exports = { const isLeftConstant = isConstant(node.left, inBooleanPosition); const isRightConstant = isConstant(node.right, inBooleanPosition); const isLeftShortCircuit = (isLeftConstant && isLogicalIdentity(node.left, node.operator)); - const isRightShortCircuit = (isRightConstant && isLogicalIdentity(node.right, node.operator)); + const isRightShortCircuit = (inBooleanPosition && isRightConstant && isLogicalIdentity(node.right, node.operator)); return (isLeftConstant && isRightConstant) || - ( - - // in the case of an "OR", we need to know if the right constant value is truthy - node.operator === "||" && - isRightConstant && - node.right.value && - ( - !node.parent || - node.parent.type !== "BinaryExpression" || - !(EQUALITY_OPERATORS.includes(node.parent.operator) || RELATIONAL_OPERATORS.includes(node.parent.operator)) - ) - ) || isLeftShortCircuit || isRightShortCircuit; } diff --git a/tools/node_modules/eslint/lib/rules/no-extra-parens.js b/tools/node_modules/eslint/lib/rules/no-extra-parens.js index 7afe7625dfcd1d..8d358d23ad3b50 100644 --- a/tools/node_modules/eslint/lib/rules/no-extra-parens.js +++ b/tools/node_modules/eslint/lib/rules/no-extra-parens.js @@ -472,20 +472,34 @@ module.exports = { const callee = node.callee; if (hasExcessParensWithPrecedence(callee, precedence(node))) { - const hasNewParensException = callee.type === "NewExpression" && !isNewExpressionWithParens(callee); - if ( hasDoubleExcessParens(callee) || - !isIIFE(node) && - !hasNewParensException && !( - - // Allow extra parens around a new expression if they are intervening parentheses. - node.type === "NewExpression" && - callee.type === "MemberExpression" && - doesMemberExpressionContainCallExpression(callee) - ) && - !(!node.optional && callee.type === "ChainExpression") + isIIFE(node) || + + // (new A)(); new (new A)(); + ( + callee.type === "NewExpression" && + !isNewExpressionWithParens(callee) && + !( + node.type === "NewExpression" && + !isNewExpressionWithParens(node) + ) + ) || + + // new (a().b)(); new (a.b().c); + ( + node.type === "NewExpression" && + callee.type === "MemberExpression" && + doesMemberExpressionContainCallExpression(callee) + ) || + + // (a?.b)(); (a?.())(); + ( + !node.optional && + callee.type === "ChainExpression" + ) + ) ) { report(node.callee); } @@ -511,7 +525,7 @@ module.exports = { if (!shouldSkipLeft && hasExcessParens(node.left)) { if ( - !(node.left.type === "UnaryExpression" && isExponentiation) && + !(["AwaitExpression", "UnaryExpression"].includes(node.left.type) && isExponentiation) && !astUtils.isMixedLogicalAndCoalesceExpressions(node.left, node) && (leftPrecedence > prec || (leftPrecedence === prec && !isExponentiation)) || isParenthesisedTwice(node.left) diff --git a/tools/node_modules/eslint/lib/rules/no-irregular-whitespace.js b/tools/node_modules/eslint/lib/rules/no-irregular-whitespace.js index 0bf69b128e6bf8..15711c6157a9a4 100644 --- a/tools/node_modules/eslint/lib/rules/no-irregular-whitespace.js +++ b/tools/node_modules/eslint/lib/rules/no-irregular-whitespace.js @@ -82,7 +82,7 @@ module.exports = { const commentNodes = sourceCode.getAllComments(); /** - * Removes errors that occur inside a string node + * Removes errors that occur inside the given node * @param {ASTNode} node to check for matching errors. * @returns {void} * @private @@ -91,14 +91,12 @@ module.exports = { const locStart = node.loc.start; const locEnd = node.loc.end; - errors = errors.filter(({ loc: { start: errorLoc } }) => { - if (errorLoc.line >= locStart.line && errorLoc.line <= locEnd.line) { - if (errorLoc.column >= locStart.column && (errorLoc.column <= locEnd.column || errorLoc.line < locEnd.line)) { - return false; - } - } - return true; - }); + errors = errors.filter(({ loc: { start: errorLocStart } }) => ( + errorLocStart.line < locStart.line || + errorLocStart.line === locStart.line && errorLocStart.column < locStart.column || + errorLocStart.line === locEnd.line && errorLocStart.column >= locEnd.column || + errorLocStart.line > locEnd.line + )); } /** diff --git a/tools/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js b/tools/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js new file mode 100644 index 00000000000000..a4b46d9591f5ed --- /dev/null +++ b/tools/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js @@ -0,0 +1,147 @@ +/** + * @fileoverview Rule to disallow `\8` and `\9` escape sequences in string literals. + * @author Milos Djermanovic + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const QUICK_TEST_REGEX = /\\[89]/u; + +/** + * Returns unicode escape sequence that represents the given character. + * @param {string} character A single code unit. + * @returns {string} "\uXXXX" sequence. + */ +function getUnicodeEscape(character) { + return `\\u${character.charCodeAt(0).toString(16).padStart(4, "0")}`; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + type: "suggestion", + + docs: { + description: "disallow `\\8` and `\\9` escape sequences in string literals", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-nonoctal-decimal-escape", + suggestion: true + }, + + schema: [], + + messages: { + decimalEscape: "Don't use '{{decimalEscape}}' escape sequence.", + + // suggestions + refactor: "Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.", + escapeBackslash: "Replace '{{original}}' with '{{replacement}}' to include the actual backslash character." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + /** + * Creates a new Suggestion object. + * @param {string} messageId "refactor" or "escapeBackslash". + * @param {int[]} range The range to replace. + * @param {string} replacement New text for the range. + * @returns {Object} Suggestion + */ + function createSuggestion(messageId, range, replacement) { + return { + messageId, + data: { + original: sourceCode.getText().slice(...range), + replacement + }, + fix(fixer) { + return fixer.replaceTextRange(range, replacement); + } + }; + } + + return { + Literal(node) { + if (typeof node.value !== "string") { + return; + } + + if (!QUICK_TEST_REGEX.test(node.raw)) { + return; + } + + const regex = /(?:[^\\]|(?\\.))*?(?\\[89])/suy; + let match; + + while ((match = regex.exec(node.raw))) { + const { previousEscape, decimalEscape } = match.groups; + const decimalEscapeRangeEnd = node.range[0] + match.index + match[0].length; + const decimalEscapeRangeStart = decimalEscapeRangeEnd - decimalEscape.length; + const decimalEscapeRange = [decimalEscapeRangeStart, decimalEscapeRangeEnd]; + const suggest = []; + + // When `regex` is matched, `previousEscape` can only capture characters adjacent to `decimalEscape` + if (previousEscape === "\\0") { + + /* + * Now we have a NULL escape "\0" immediately followed by a decimal escape, e.g.: "\0\8". + * Fixing this to "\08" would turn "\0" into a legacy octal escape. To avoid producing + * an octal escape while fixing a decimal escape, we provide different suggestions. + */ + suggest.push( + createSuggestion( // "\0\8" -> "\u00008" + "refactor", + [decimalEscapeRangeStart - previousEscape.length, decimalEscapeRangeEnd], + `${getUnicodeEscape("\0")}${decimalEscape[1]}` + ), + createSuggestion( // "\8" -> "\u0038" + "refactor", + decimalEscapeRange, + getUnicodeEscape(decimalEscape[1]) + ) + ); + } else { + suggest.push( + createSuggestion( // "\8" -> "8" + "refactor", + decimalEscapeRange, + decimalEscape[1] + ) + ); + } + + suggest.push( + createSuggestion( // "\8" -> "\\8" + "escapeBackslash", + decimalEscapeRange, + `\\${decimalEscape}` + ) + ); + + context.report({ + node, + loc: { + start: sourceCode.getLocFromIndex(decimalEscapeRangeStart), + end: sourceCode.getLocFromIndex(decimalEscapeRangeEnd) + }, + messageId: "decimalEscape", + data: { + decimalEscape + }, + suggest + }); + } + } + }; + } +}; diff --git a/tools/node_modules/eslint/lib/rules/no-prototype-builtins.js b/tools/node_modules/eslint/lib/rules/no-prototype-builtins.js index ccec86c30da072..c5e4d49259b84a 100644 --- a/tools/node_modules/eslint/lib/rules/no-prototype-builtins.js +++ b/tools/node_modules/eslint/lib/rules/no-prototype-builtins.js @@ -46,15 +46,15 @@ module.exports = { */ function disallowBuiltIns(node) { - // TODO: just use `astUtils.getStaticPropertyName(node.callee)` const callee = astUtils.skipChainExpression(node.callee); - if (callee.type !== "MemberExpression" || callee.computed) { + if (callee.type !== "MemberExpression") { return; } - const propName = callee.property.name; - if (DISALLOWED_PROPS.indexOf(propName) > -1) { + const propName = astUtils.getStaticPropertyName(callee); + + if (propName !== null && DISALLOWED_PROPS.indexOf(propName) > -1) { context.report({ messageId: "prototypeBuildIn", loc: callee.property.loc, diff --git a/tools/node_modules/eslint/lib/rules/no-script-url.js b/tools/node_modules/eslint/lib/rules/no-script-url.js index 2078fc1dcea122..0c82052440372f 100644 --- a/tools/node_modules/eslint/lib/rules/no-script-url.js +++ b/tools/node_modules/eslint/lib/rules/no-script-url.js @@ -7,6 +7,8 @@ "use strict"; +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -31,18 +33,30 @@ module.exports = { create(context) { + /** + * Check whether a node's static value starts with "javascript:" or not. + * And report an error for unexpected script URL. + * @param {ASTNode} node node to check + * @returns {void} + */ + function check(node) { + const value = astUtils.getStaticStringValue(node); + + if (typeof value === "string" && value.toLowerCase().indexOf("javascript:") === 0) { + context.report({ node, messageId: "unexpectedScriptURL" }); + } + } return { - Literal(node) { if (node.value && typeof node.value === "string") { - const value = node.value.toLowerCase(); - - if (value.indexOf("javascript:") === 0) { - context.report({ node, messageId: "unexpectedScriptURL" }); - } + check(node); + } + }, + TemplateLiteral(node) { + if (!(node.parent && node.parent.type === "TaggedTemplateExpression")) { + check(node); } } }; - } }; diff --git a/tools/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js b/tools/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js new file mode 100644 index 00000000000000..2eafc1ad8f108b --- /dev/null +++ b/tools/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js @@ -0,0 +1,205 @@ +/** + * @fileoverview Rule to disallow unsafe optional chaining + * @author Yeon JuAn + */ + +"use strict"; + +const UNSAFE_ARITHMETIC_OPERATORS = new Set(["+", "-", "/", "*", "%", "**"]); +const UNSAFE_ASSIGNMENT_OPERATORS = new Set(["+=", "-=", "/=", "*=", "%=", "**="]); +const UNSAFE_RELATIONAL_OPERATORS = new Set(["in", "instanceof"]); + +/** + * Checks whether a node is a destructuring pattern or not + * @param {ASTNode} node node to check + * @returns {boolean} `true` if a node is a destructuring pattern, otherwise `false` + */ +function isDestructuringPattern(node) { + return node.type === "ObjectPattern" || node.type === "ArrayPattern"; +} + +module.exports = { + meta: { + type: "problem", + + docs: { + description: "disallow use of optional chaining in contexts where the `undefined` value is not allowed", + category: "Possible Errors", + recommended: false, + url: "https://eslint.org/docs/rules/no-unsafe-optional-chaining" + }, + schema: [{ + type: "object", + properties: { + disallowArithmeticOperators: { + type: "boolean", + default: false + } + }, + additionalProperties: false + }], + fixable: null, + messages: { + unsafeOptionalChain: "Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.", + unsafeArithmetic: "Unsafe arithmetic operation on optional chaining. It can result in NaN." + } + }, + + create(context) { + const options = context.options[0] || {}; + const disallowArithmeticOperators = (options.disallowArithmeticOperators) || false; + + /** + * Reports unsafe usage of optional chaining + * @param {ASTNode} node node to report + * @returns {void} + */ + function reportUnsafeUsage(node) { + context.report({ + messageId: "unsafeOptionalChain", + node + }); + } + + /** + * Reports unsafe arithmetic operation on optional chaining + * @param {ASTNode} node node to report + * @returns {void} + */ + function reportUnsafeArithmetic(node) { + context.report({ + messageId: "unsafeArithmetic", + node + }); + } + + /** + * Checks and reports if a node can short-circuit with `undefined` by optional chaining. + * @param {ASTNode} [node] node to check + * @param {Function} reportFunc report function + * @returns {void} + */ + function checkUndefinedShortCircuit(node, reportFunc) { + if (!node) { + return; + } + switch (node.type) { + case "LogicalExpression": + if (node.operator === "||" || node.operator === "??") { + checkUndefinedShortCircuit(node.right, reportFunc); + } else if (node.operator === "&&") { + checkUndefinedShortCircuit(node.left, reportFunc); + checkUndefinedShortCircuit(node.right, reportFunc); + } + break; + case "SequenceExpression": + checkUndefinedShortCircuit( + node.expressions[node.expressions.length - 1], + reportFunc + ); + break; + case "ConditionalExpression": + checkUndefinedShortCircuit(node.consequent, reportFunc); + checkUndefinedShortCircuit(node.alternate, reportFunc); + break; + case "AwaitExpression": + checkUndefinedShortCircuit(node.argument, reportFunc); + break; + case "ChainExpression": + reportFunc(node); + break; + default: + break; + } + } + + /** + * Checks unsafe usage of optional chaining + * @param {ASTNode} node node to check + * @returns {void} + */ + function checkUnsafeUsage(node) { + checkUndefinedShortCircuit(node, reportUnsafeUsage); + } + + /** + * Checks unsafe arithmetic operations on optional chaining + * @param {ASTNode} node node to check + * @returns {void} + */ + function checkUnsafeArithmetic(node) { + checkUndefinedShortCircuit(node, reportUnsafeArithmetic); + } + + return { + "AssignmentExpression, AssignmentPattern"(node) { + if (isDestructuringPattern(node.left)) { + checkUnsafeUsage(node.right); + } + }, + "ClassDeclaration, ClassExpression"(node) { + checkUnsafeUsage(node.superClass); + }, + CallExpression(node) { + if (!node.optional) { + checkUnsafeUsage(node.callee); + } + }, + NewExpression(node) { + checkUnsafeUsage(node.callee); + }, + VariableDeclarator(node) { + if (isDestructuringPattern(node.id)) { + checkUnsafeUsage(node.init); + } + }, + MemberExpression(node) { + if (!node.optional) { + checkUnsafeUsage(node.object); + } + }, + TaggedTemplateExpression(node) { + checkUnsafeUsage(node.tag); + }, + ForOfStatement(node) { + checkUnsafeUsage(node.right); + }, + SpreadElement(node) { + if (node.parent && node.parent.type !== "ObjectExpression") { + checkUnsafeUsage(node.argument); + } + }, + BinaryExpression(node) { + if (UNSAFE_RELATIONAL_OPERATORS.has(node.operator)) { + checkUnsafeUsage(node.right); + } + if ( + disallowArithmeticOperators && + UNSAFE_ARITHMETIC_OPERATORS.has(node.operator) + ) { + checkUnsafeArithmetic(node.right); + checkUnsafeArithmetic(node.left); + } + }, + WithStatement(node) { + checkUnsafeUsage(node.object); + }, + UnaryExpression(node) { + if ( + disallowArithmeticOperators && + UNSAFE_ARITHMETIC_OPERATORS.has(node.operator) + ) { + checkUnsafeArithmetic(node.argument); + } + }, + AssignmentExpression(node) { + if ( + disallowArithmeticOperators && + UNSAFE_ASSIGNMENT_OPERATORS.has(node.operator) + ) { + checkUnsafeArithmetic(node.right); + } + } + }; + } +}; diff --git a/tools/node_modules/eslint/lib/rules/no-useless-constructor.js b/tools/node_modules/eslint/lib/rules/no-useless-constructor.js index 4c34aeda715937..baabe7ec80f3a7 100644 --- a/tools/node_modules/eslint/lib/rules/no-useless-constructor.js +++ b/tools/node_modules/eslint/lib/rules/no-useless-constructor.js @@ -162,6 +162,14 @@ module.exports = { return; } + /* + * Prevent crashing on parsers which do not require class constructor + * to have a body, e.g. typescript and flow + */ + if (!node.value.body) { + return; + } + const body = node.value.body.body; const ctorParams = node.value.params; const superClass = node.parent.parent.superClass; diff --git a/tools/node_modules/eslint/lib/rules/one-var.js b/tools/node_modules/eslint/lib/rules/one-var.js index c31a0d2b13c187..b370c6d5e19858 100644 --- a/tools/node_modules/eslint/lib/rules/one-var.js +++ b/tools/node_modules/eslint/lib/rules/one-var.js @@ -314,12 +314,14 @@ module.exports = { return null; } + const exportPlacement = declaration.parent.type === "ExportNamedDeclaration" ? "export " : ""; + /* * `var x,y` * tokenAfterDeclarator ^^ afterComma */ if (afterComma.range[0] === tokenAfterDeclarator.range[1]) { - return fixer.replaceText(tokenAfterDeclarator, `; ${declaration.kind} `); + return fixer.replaceText(tokenAfterDeclarator, `; ${exportPlacement}${declaration.kind} `); } /* @@ -341,11 +343,11 @@ module.exports = { return fixer.replaceTextRange( [tokenAfterDeclarator.range[0], lastComment.range[0]], - `;${sourceCode.text.slice(tokenAfterDeclarator.range[1], lastComment.range[0])}${declaration.kind} ` + `;${sourceCode.text.slice(tokenAfterDeclarator.range[1], lastComment.range[0])}${exportPlacement}${declaration.kind} ` ); } - return fixer.replaceText(tokenAfterDeclarator, `; ${declaration.kind}`); + return fixer.replaceText(tokenAfterDeclarator, `; ${exportPlacement}${declaration.kind}`); }).filter(x => x); } diff --git a/tools/node_modules/eslint/lib/rules/prefer-destructuring.js b/tools/node_modules/eslint/lib/rules/prefer-destructuring.js index 66e412fd3e3922..b2d3c8a0b0193e 100644 --- a/tools/node_modules/eslint/lib/rules/prefer-destructuring.js +++ b/tools/node_modules/eslint/lib/rules/prefer-destructuring.js @@ -4,6 +4,18 @@ */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const PRECEDENCE_OF_ASSIGNMENT_EXPR = astUtils.getPrecedence({ type: "AssignmentExpression" }); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -185,9 +197,15 @@ module.exports = { return null; } + let objectText = sourceCode.getText(rightNode.object); + + if (astUtils.getPrecedence(rightNode.object) < PRECEDENCE_OF_ASSIGNMENT_EXPR) { + objectText = `(${objectText})`; + } + return fixer.replaceText( node, - `{${rightNode.property.name}} = ${sourceCode.getText(rightNode.object)}` + `{${rightNode.property.name}} = ${objectText}` ); } diff --git a/tools/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js b/tools/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js index d1a00d6209ef02..6121af889710b5 100644 --- a/tools/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js +++ b/tools/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js @@ -30,6 +30,7 @@ function doesBaseNeedParens(base) { astUtils.getPrecedence(base) <= PRECEDENCE_OF_EXPONENTIATION_EXPR || // An unary operator cannot be used immediately before an exponentiation expression + base.type === "AwaitExpression" || base.type === "UnaryExpression" ); } diff --git a/tools/node_modules/eslint/lib/rules/prefer-template.js b/tools/node_modules/eslint/lib/rules/prefer-template.js index e8f980ebd38c6f..cb967660a62b86 100644 --- a/tools/node_modules/eslint/lib/rules/prefer-template.js +++ b/tools/node_modules/eslint/lib/rules/prefer-template.js @@ -39,33 +39,25 @@ function getTopConcatBinaryExpression(node) { } /** - * Determines whether a given node is a octal escape sequence + * Checks whether or not a node contains a string literal with an octal or non-octal decimal escape sequence * @param {ASTNode} node A node to check - * @returns {boolean} `true` if the node is an octal escape sequence + * @returns {boolean} `true` if at least one string literal within the node contains + * an octal or non-octal decimal escape sequence */ -function isOctalEscapeSequence(node) { - - // No need to check TemplateLiterals – would throw error with octal escape - const isStringLiteral = node.type === "Literal" && typeof node.value === "string"; - - if (!isStringLiteral) { - return false; +function hasOctalOrNonOctalDecimalEscapeSequence(node) { + if (isConcatenation(node)) { + return ( + hasOctalOrNonOctalDecimalEscapeSequence(node.left) || + hasOctalOrNonOctalDecimalEscapeSequence(node.right) + ); } - return astUtils.hasOctalEscapeSequence(node.raw); -} - -/** - * Checks whether or not a node contains a octal escape sequence - * @param {ASTNode} node A node to check - * @returns {boolean} `true` if the node contains an octal escape sequence - */ -function hasOctalEscapeSequence(node) { - if (isConcatenation(node)) { - return hasOctalEscapeSequence(node.left) || hasOctalEscapeSequence(node.right); + // No need to check TemplateLiterals – would throw parsing error + if (node.type === "Literal" && typeof node.value === "string") { + return astUtils.hasOctalOrNonOctalDecimalEscapeSequence(node.raw); } - return isOctalEscapeSequence(node); + return false; } /** @@ -237,7 +229,7 @@ module.exports = { function fixNonStringBinaryExpression(fixer, node) { const topBinaryExpr = getTopConcatBinaryExpression(node.parent); - if (hasOctalEscapeSequence(topBinaryExpr)) { + if (hasOctalOrNonOctalDecimalEscapeSequence(topBinaryExpr)) { return null; } diff --git a/tools/node_modules/eslint/lib/rules/quotes.js b/tools/node_modules/eslint/lib/rules/quotes.js index d1f4443b9033c9..da7e127493eaa1 100644 --- a/tools/node_modules/eslint/lib/rules/quotes.js +++ b/tools/node_modules/eslint/lib/rules/quotes.js @@ -282,9 +282,12 @@ module.exports = { description: settings.description }, fix(fixer) { - if (quoteOption === "backtick" && astUtils.hasOctalEscapeSequence(rawVal)) { + if (quoteOption === "backtick" && astUtils.hasOctalOrNonOctalDecimalEscapeSequence(rawVal)) { - // An octal escape sequence in a template literal would produce syntax error, even in non-strict mode. + /* + * An octal or non-octal decimal escape sequence in a template literal would + * produce syntax error, even in non-strict mode. + */ return null; } diff --git a/tools/node_modules/eslint/lib/rules/require-atomic-updates.js b/tools/node_modules/eslint/lib/rules/require-atomic-updates.js index 4f6acceab804d1..c552f1bd8258b8 100644 --- a/tools/node_modules/eslint/lib/rules/require-atomic-updates.js +++ b/tools/node_modules/eslint/lib/rules/require-atomic-updates.js @@ -113,6 +113,9 @@ class SegmentInfo { if (info) { info.freshReadVariableNames.add(variableName); + + // If a variable is freshly read again, then it's no more out-dated. + info.outdatedReadVariableNames.delete(variableName); } } } diff --git a/tools/node_modules/eslint/lib/rules/space-before-blocks.js b/tools/node_modules/eslint/lib/rules/space-before-blocks.js index 9b56481bf355fb..87ef9bfd88013c 100644 --- a/tools/node_modules/eslint/lib/rules/space-before-blocks.js +++ b/tools/node_modules/eslint/lib/rules/space-before-blocks.js @@ -5,8 +5,31 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + const astUtils = require("./utils/ast-utils"); +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether the given node represents the body of a function. + * @param {ASTNode} node the node to check. + * @returns {boolean} `true` if the node is function body. + */ +function isFunctionBody(node) { + const parent = node.parent; + + return ( + node.type === "BlockStatement" && + astUtils.isFunction(parent) && + parent.body === node + ); +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -82,13 +105,16 @@ module.exports = { } /** - * Checks whether or not a given token is an arrow operator (=>) or a keyword - * in order to avoid to conflict with `arrow-spacing` and `keyword-spacing`. - * @param {Token} token A token to check. - * @returns {boolean} `true` if the token is an arrow operator. + * Checks whether the spacing before the given block is already controlled by another rule: + * - `arrow-spacing` checks spaces after `=>`. + * - `keyword-spacing` checks spaces after keywords in certain contexts. + * @param {Token} precedingToken first token before the block. + * @param {ASTNode|Token} node `BlockStatement` node or `{` token of a `SwitchStatement` node. + * @returns {boolean} `true` if requiring or disallowing spaces before the given block could produce conflicts with other rules. */ - function isConflicted(token) { - return (token.type === "Punctuator" && token.value === "=>") || token.type === "Keyword"; + function isConflicted(precedingToken, node) { + return astUtils.isArrowToken(precedingToken) || + astUtils.isKeywordToken(precedingToken) && !isFunctionBody(node); } /** @@ -99,13 +125,12 @@ module.exports = { function checkPrecedingSpace(node) { const precedingToken = sourceCode.getTokenBefore(node); - if (precedingToken && !isConflicted(precedingToken) && astUtils.isTokenOnSameLine(precedingToken, node)) { + if (precedingToken && !isConflicted(precedingToken, node) && astUtils.isTokenOnSameLine(precedingToken, node)) { const hasSpace = sourceCode.isSpaceBetweenTokens(precedingToken, node); - const parent = context.getAncestors().pop(); let requireSpace; let requireNoSpace; - if (parent.type === "FunctionExpression" || parent.type === "FunctionDeclaration") { + if (isFunctionBody(node)) { requireSpace = alwaysFunctions; requireNoSpace = neverFunctions; } else if (node.type === "ClassBody") { diff --git a/tools/node_modules/eslint/lib/rules/utils/ast-utils.js b/tools/node_modules/eslint/lib/rules/utils/ast-utils.js index fb8beb25211ee7..1fd6340df7c7e4 100644 --- a/tools/node_modules/eslint/lib/rules/utils/ast-utils.js +++ b/tools/node_modules/eslint/lib/rules/utils/ast-utils.js @@ -38,7 +38,9 @@ const LINEBREAKS = new Set(["\r\n", "\r", "\n", "\u2028", "\u2029"]); const STATEMENT_LIST_PARENTS = new Set(["Program", "BlockStatement", "SwitchCase"]); const DECIMAL_INTEGER_PATTERN = /^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u; -const OCTAL_ESCAPE_PATTERN = /^(?:[^\\]|\\[^0-7]|\\0(?![0-9]))*\\(?:[1-7]|0[0-9])/u; + +// Tests the presence of at least one LegacyOctalEscapeSequence or NonOctalDecimalEscapeSequence in a raw string +const OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN = /^(?:[^\\]|\\.)*\\(?:[1-9]|0[0-9])/su; const LOGICAL_ASSIGNMENT_OPERATORS = new Set(["&&=", "||=", "??="]); @@ -1611,6 +1613,17 @@ module.exports = { } case "LogicalExpression": + + /* + * If the && operator short-circuits, the left side was falsy and therefore not an error, and if it + * doesn't short-circuit, it takes the value from the right side, so the right side must always be + * a plausible error. A future improvement could verify that the left side could be truthy by + * excluding falsy literals. + */ + if (node.operator === "&&") { + return module.exports.couldBeError(node.right); + } + return module.exports.couldBeError(node.left) || module.exports.couldBeError(node.right); case "ConditionalExpression": @@ -1766,17 +1779,19 @@ module.exports = { }, /** - * Determines whether the given raw string contains an octal escape sequence. + * Determines whether the given raw string contains an octal escape sequence + * or a non-octal decimal escape sequence ("\8", "\9"). * - * "\1", "\2" ... "\7" - * "\00", "\01" ... "\09" + * "\1", "\2" ... "\7", "\8", "\9" + * "\00", "\01" ... "\07", "\08", "\09" * * "\0", when not followed by a digit, is not an octal escape sequence. * @param {string} rawString A string in its raw representation. - * @returns {boolean} `true` if the string contains at least one octal escape sequence. + * @returns {boolean} `true` if the string contains at least one octal escape sequence + * or at least one non-octal decimal escape sequence. */ - hasOctalEscapeSequence(rawString) { - return OCTAL_ESCAPE_PATTERN.test(rawString); + hasOctalOrNonOctalDecimalEscapeSequence(rawString) { + return OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN.test(rawString); }, isLogicalExpression, diff --git a/tools/node_modules/eslint/lib/rules/yoda.js b/tools/node_modules/eslint/lib/rules/yoda.js index 87dd5ed6c5736d..2fca7571113ecf 100644 --- a/tools/node_modules/eslint/lib/rules/yoda.js +++ b/tools/node_modules/eslint/lib/rules/yoda.js @@ -265,36 +265,37 @@ module.exports = { * @returns {string} A string representation of the node with the sides and operator flipped */ function getFlippedString(node) { - const tokenBefore = sourceCode.getTokenBefore(node); const operatorToken = sourceCode.getFirstTokenBetween( node.left, node.right, token => token.value === node.operator ); - const textBeforeOperator = sourceCode - .getText() - .slice( - sourceCode.getTokenBefore(operatorToken).range[1], - operatorToken.range[0] - ); - const textAfterOperator = sourceCode - .getText() - .slice( - operatorToken.range[1], - sourceCode.getTokenAfter(operatorToken).range[0] - ); - const leftText = sourceCode - .getText() - .slice( - node.range[0], - sourceCode.getTokenBefore(operatorToken).range[1] - ); + const lastLeftToken = sourceCode.getTokenBefore(operatorToken); const firstRightToken = sourceCode.getTokenAfter(operatorToken); - const rightText = sourceCode - .getText() - .slice(firstRightToken.range[0], node.range[1]); + const source = sourceCode.getText(); + + const leftText = source.slice( + node.range[0], + lastLeftToken.range[1] + ); + const textBeforeOperator = source.slice( + lastLeftToken.range[1], + operatorToken.range[0] + ); + const textAfterOperator = source.slice( + operatorToken.range[1], + firstRightToken.range[0] + ); + const rightText = source.slice( + firstRightToken.range[0], + node.range[1] + ); + + const tokenBefore = sourceCode.getTokenBefore(node); + const tokenAfter = sourceCode.getTokenAfter(node); let prefix = ""; + let suffix = ""; if ( tokenBefore && @@ -304,13 +305,22 @@ module.exports = { prefix = " "; } + if ( + tokenAfter && + node.range[1] === tokenAfter.range[0] && + !astUtils.canTokensBeAdjacent(lastLeftToken, tokenAfter) + ) { + suffix = " "; + } + return ( prefix + rightText + textBeforeOperator + OPERATOR_FLIP_MAP[operatorToken.value] + textAfterOperator + - leftText + leftText + + suffix ); } diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/README.md b/tools/node_modules/eslint/node_modules/@babel/code-frame/README.md index 185f93d2471999..08cacb0477fb94 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/README.md +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/README.md @@ -2,7 +2,7 @@ > Generate errors that contain a code frame that point to source locations. -See our website [@babel/code-frame](https://babeljs.io/docs/en/next/babel-code-frame.html) for more information. +See our website [@babel/code-frame](https://babeljs.io/docs/en/babel-code-frame) for more information. ## Install diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json b/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json index 1526e3643f6afb..213c1916a9ec81 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json @@ -13,10 +13,10 @@ "deprecated": false, "description": "Generate errors that contain a code frame that point to source locations.", "devDependencies": { + "@types/chalk": "^2.0.0", "chalk": "^2.0.0", "strip-ansi": "^4.0.0" }, - "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df", "homepage": "https://babeljs.io/", "license": "MIT", "main": "lib/index.js", @@ -29,5 +29,5 @@ "url": "git+https://github.com/babel/babel.git", "directory": "packages/babel-code-frame" }, - "version": "7.10.4" + "version": "7.12.11" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/README.md b/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/README.md index ab2dad173149e8..6733576a8ce76b 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/README.md +++ b/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/README.md @@ -2,7 +2,7 @@ > Validate identifier/keywords name -See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/en/next/babel-helper-validator-identifier.html) for more information. +See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/en/babel-helper-validator-identifier) for more information. ## Install diff --git a/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/package.json b/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/package.json index d56c233d5b0158..e70625729dd6c3 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/helper-validator-identifier/package.json @@ -10,7 +10,6 @@ "unicode-13.0.0": "^0.8.0" }, "exports": "./lib/index.js", - "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df", "homepage": "https://github.com/babel/babel#readme", "license": "MIT", "main": "./lib/index.js", @@ -23,5 +22,5 @@ "url": "git+https://github.com/babel/babel.git", "directory": "packages/babel-helper-validator-identifier" }, - "version": "7.10.4" + "version": "7.12.11" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/category-list.json b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/category-list.json deleted file mode 100644 index cd3b816b6570a2..00000000000000 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/category-list.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "categories": [ - { "name": "Possible Errors", "description": "These rules relate to possible syntax or logic errors in JavaScript code:" }, - { "name": "Best Practices", "description": "These rules relate to better ways of doing things to help you avoid problems:" }, - { "name": "Strict Mode", "description": "These rules relate to strict mode directives:" }, - { "name": "Variables", "description": "These rules relate to variable declarations:" }, - { "name": "Stylistic Issues", "description": "These rules relate to style guidelines, and are therefore quite subjective:" }, - { "name": "ECMAScript 6", "description": "These rules relate to ES6, also known as ES2015:" } - ], - "deprecated": { - "name": "Deprecated", - "description": "These rules have been deprecated in accordance with the deprecation policy, and replaced by newer rules:", - "rules": [] - }, - "removed": { - "name": "Removed", - "description": "These rules from older versions of ESLint (before the deprecation policy existed) have been replaced by newer rules:", - "rules": [ - { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] }, - { "removed": "global-strict", "replacedBy": ["strict"] }, - { "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] }, - { "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] }, - { "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] }, - { "removed": "no-empty-label", "replacedBy": ["no-labels"] }, - { "removed": "no-extra-strict", "replacedBy": ["strict"] }, - { "removed": "no-reserved-keys", "replacedBy": ["quote-props"] }, - { "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] }, - { "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] }, - { "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] }, - { "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] }, - { "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] }, - { "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] }, - { "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] }, - { "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] }, - { "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] }, - { "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] } - ] - } -} diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/default-cli-options.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/default-cli-options.js deleted file mode 100644 index e09a829d17cee2..00000000000000 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/default-cli-options.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @fileoverview Default CLIEngineOptions. - * @author Ian VanSchooten - */ - -"use strict"; - -module.exports = { - configFile: null, - baseConfig: false, - rulePaths: [], - useEslintrc: true, - envs: [], - globals: [], - extensions: null, - ignore: true, - ignorePath: void 0, - cache: false, - - /* - * in order to honor the cacheFile option if specified - * this option should not have a default value otherwise - * it will always be used - */ - cacheLocation: "", - cacheFile: ".eslintcache", - fix: false, - allowInlineConfig: true, - reportUnusedDisableDirectives: void 0, - globInputPaths: true -}; diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/eslint-all.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/eslint-all.js deleted file mode 100644 index cdd8a3e4711d00..00000000000000 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/eslint-all.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @fileoverview Config to enable all rules. - * @author Robert Fletcher - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -// FIXME: "../lib/rules" doesn't exist in this package -const builtInRules = require("../lib/rules"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -const allRules = {}; - -for (const [ruleId, rule] of builtInRules) { - if (!rule.meta.deprecated) { - allRules[ruleId] = "error"; - } -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -/** @type {import("../lib/shared/types").ConfigData} */ -module.exports = { rules: allRules }; diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/eslint-recommended.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/eslint-recommended.js deleted file mode 100644 index 2137685fb7c63e..00000000000000 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/eslint-recommended.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @fileoverview Configuration applied when a user configuration extends from - * eslint:recommended. - * @author Nicholas C. Zakas - */ - -"use strict"; - -/* eslint sort-keys: ["error", "asc"] */ - -/** @type {import("../lib/shared/types").ConfigData} */ -module.exports = { - rules: { - "constructor-super": "error", - "for-direction": "error", - "getter-return": "error", - "no-async-promise-executor": "error", - "no-case-declarations": "error", - "no-class-assign": "error", - "no-compare-neg-zero": "error", - "no-cond-assign": "error", - "no-const-assign": "error", - "no-constant-condition": "error", - "no-control-regex": "error", - "no-debugger": "error", - "no-delete-var": "error", - "no-dupe-args": "error", - "no-dupe-class-members": "error", - "no-dupe-else-if": "error", - "no-dupe-keys": "error", - "no-duplicate-case": "error", - "no-empty": "error", - "no-empty-character-class": "error", - "no-empty-pattern": "error", - "no-ex-assign": "error", - "no-extra-boolean-cast": "error", - "no-extra-semi": "error", - "no-fallthrough": "error", - "no-func-assign": "error", - "no-global-assign": "error", - "no-import-assign": "error", - "no-inner-declarations": "error", - "no-invalid-regexp": "error", - "no-irregular-whitespace": "error", - "no-misleading-character-class": "error", - "no-mixed-spaces-and-tabs": "error", - "no-new-symbol": "error", - "no-obj-calls": "error", - "no-octal": "error", - "no-prototype-builtins": "error", - "no-redeclare": "error", - "no-regex-spaces": "error", - "no-self-assign": "error", - "no-setter-return": "error", - "no-shadow-restricted-names": "error", - "no-sparse-arrays": "error", - "no-this-before-super": "error", - "no-undef": "error", - "no-unexpected-multiline": "error", - "no-unreachable": "error", - "no-unsafe-finally": "error", - "no-unsafe-negation": "error", - "no-unused-labels": "error", - "no-unused-vars": "error", - "no-useless-catch": "error", - "no-useless-escape": "error", - "no-with": "error", - "require-yield": "error", - "use-isnan": "error", - "valid-typeof": "error" - } -}; diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/replacements.json b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/replacements.json deleted file mode 100644 index c047811e602d41..00000000000000 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/conf/replacements.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "rules": { - "generator-star": ["generator-star-spacing"], - "global-strict": ["strict"], - "no-arrow-condition": ["no-confusing-arrow", "no-constant-condition"], - "no-comma-dangle": ["comma-dangle"], - "no-empty-class": ["no-empty-character-class"], - "no-empty-label": ["no-labels"], - "no-extra-strict": ["strict"], - "no-reserved-keys": ["quote-props"], - "no-space-before-semi": ["semi-spacing"], - "no-wrap-func": ["no-extra-parens"], - "space-after-function-name": ["space-before-function-paren"], - "space-after-keywords": ["keyword-spacing"], - "space-before-function-parentheses": ["space-before-function-paren"], - "space-before-keywords": ["keyword-spacing"], - "space-in-brackets": ["object-curly-spacing", "array-bracket-spacing", "computed-property-spacing"], - "space-return-throw-case": ["keyword-spacing"], - "space-unary-word-ops": ["space-unary-ops"], - "spaced-line-comment": ["spaced-comment"] - } -} diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js index a6933964e9341b..c991c24b6070f3 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js @@ -36,9 +36,10 @@ const debug = require("debug")("eslintrc:cascading-config-array-factory"); //------------------------------------------------------------------------------ // Define types for VSCode IntelliSense. -/** @typedef {import("../shared/types").ConfigData} ConfigData */ -/** @typedef {import("../shared/types").Parser} Parser */ -/** @typedef {import("../shared/types").Plugin} Plugin */ +/** @typedef {import("./shared/types").ConfigData} ConfigData */ +/** @typedef {import("./shared/types").Parser} Parser */ +/** @typedef {import("./shared/types").Plugin} Plugin */ +/** @typedef {import("./shared/types").Rule} Rule */ /** @typedef {ReturnType} ConfigArray */ /** @@ -51,6 +52,11 @@ const debug = require("debug")("eslintrc:cascading-config-array-factory"); * @property {string[]} [rulePaths] The value of `--rulesdir` option. * @property {string} [specificConfigPath] The value of `--config` option. * @property {boolean} [useEslintrc] if `false` then it doesn't load config files. + * @property {Function} loadRules The function to use to load rules. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. */ /** @@ -67,6 +73,11 @@ const debug = require("debug")("eslintrc:cascading-config-array-factory"); * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`. * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`. * @property {boolean} useEslintrc if `false` then it doesn't load config files. + * @property {Function} loadRules The function to use to load rules. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. */ /** @type {WeakMap} */ @@ -205,14 +216,18 @@ class CascadingConfigArrayFactory { useEslintrc = true, builtInRules = new Map(), loadRules, - resolver + resolver, + eslintRecommendedPath, + eslintAllPath } = {}) { const configArrayFactory = new ConfigArrayFactory({ additionalPluginPool, cwd, resolvePluginsRelativeTo, builtInRules, - resolver + resolver, + eslintRecommendedPath, + eslintAllPath }); internalSlotsMap.set(this, { @@ -240,7 +255,9 @@ class CascadingConfigArrayFactory { ignorePath, rulePaths, specificConfigPath, - useEslintrc + useEslintrc, + builtInRules, + loadRules }); } @@ -423,7 +440,8 @@ class CascadingConfigArrayFactory { cliConfigArray, configArrayFactory, finalizeCache, - useEslintrc + useEslintrc, + builtInRules } = internalSlotsMap.get(this); let finalConfigArray = finalizeCache.get(configArray); @@ -469,7 +487,7 @@ class CascadingConfigArrayFactory { // Validate rule settings and environments. const validator = new ConfigValidator({ - builtInRules: configArrayFactory.builtInRules + builtInRules }); validator.validateConfigArray(finalConfigArray); diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js index 97f8b5cb2d562e..6494a041cb8dd0 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js @@ -58,8 +58,6 @@ const debug = require("debug")("eslintrc:config-array-factory"); // Helpers //------------------------------------------------------------------------------ -const eslintRecommendedPath = path.resolve(__dirname, "../../eslint/conf/eslint-recommended.js"); -const eslintAllPath = path.resolve(__dirname, "../../eslint/conf/eslint-all.js"); const configFilenames = [ ".eslintrc.js", ".eslintrc.cjs", @@ -71,10 +69,11 @@ const configFilenames = [ ]; // Define types for VSCode IntelliSense. -/** @typedef {import("../shared/types").ConfigData} ConfigData */ -/** @typedef {import("../shared/types").OverrideConfigData} OverrideConfigData */ -/** @typedef {import("../shared/types").Parser} Parser */ -/** @typedef {import("../shared/types").Plugin} Plugin */ +/** @typedef {import("./shared/types").ConfigData} ConfigData */ +/** @typedef {import("./shared/types").OverrideConfigData} OverrideConfigData */ +/** @typedef {import("./shared/types").Parser} Parser */ +/** @typedef {import("./shared/types").Plugin} Plugin */ +/** @typedef {import("./shared/types").Rule} Rule */ /** @typedef {import("./config-array/config-dependency").DependentParser} DependentParser */ /** @typedef {import("./config-array/config-dependency").DependentPlugin} DependentPlugin */ /** @typedef {ConfigArray[0]} ConfigArrayElement */ @@ -84,6 +83,10 @@ const configFilenames = [ * @property {Map} [additionalPluginPool] The map for additional plugins. * @property {string} [cwd] The path to the current working directory. * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. */ /** @@ -91,6 +94,10 @@ const configFilenames = [ * @property {Map} additionalPluginPool The map for additional plugins. * @property {string} cwd The path to the current working directory. * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. */ /** @@ -414,7 +421,9 @@ class ConfigArrayFactory { cwd = process.cwd(), resolvePluginsRelativeTo, builtInRules, - resolver = ModuleResolver + resolver = ModuleResolver, + eslintAllPath, + eslintRecommendedPath } = {}) { internalSlotsMap.set(this, { additionalPluginPool, @@ -423,7 +432,9 @@ class ConfigArrayFactory { resolvePluginsRelativeTo && path.resolve(cwd, resolvePluginsRelativeTo), builtInRules, - resolver + resolver, + eslintAllPath, + eslintRecommendedPath }); } @@ -781,6 +792,8 @@ class ConfigArrayFactory { * @private */ _loadExtendedBuiltInConfig(extendName, ctx) { + const { eslintAllPath, eslintRecommendedPath } = internalSlotsMap.get(this); + if (extendName === "eslint:recommended") { return this._loadConfigData({ ...ctx, diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js index 6eaec4258e1ae4..4c16278ee808f8 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js @@ -36,7 +36,7 @@ const assert = require("assert"); const path = require("path"); const ignore = require("ignore"); -const debug = require("debug")("eslint:ignore-pattern"); +const debug = require("debug")("eslintrc:ignore-pattern"); /** @typedef {ReturnType} Ignore */ diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/shared/config-validator.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/shared/config-validator.js index d3c70012788c61..dbc6f3f389e800 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/shared/config-validator.js @@ -265,7 +265,7 @@ module.exports = class ConfigValidator { * @returns {void} */ validateConfigSchema(config, source = null) { - validateSchema = this.validateSchema || ajv.compile(configSchema); + validateSchema = validateSchema || ajv.compile(configSchema); if (!validateSchema(config)) { throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`); diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/shared/types.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/shared/types.js new file mode 100644 index 00000000000000..d4ac14e26df453 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/shared/types.js @@ -0,0 +1,150 @@ +/** + * @fileoverview Define common types for input completion. + * @author Toru Nagashima + */ +"use strict"; + +/** @type {any} */ +module.exports = {}; + +/** @typedef {boolean | "off" | "readable" | "readonly" | "writable" | "writeable"} GlobalConf */ +/** @typedef {0 | 1 | 2 | "off" | "warn" | "error"} SeverityConf */ +/** @typedef {SeverityConf | [SeverityConf, ...any[]]} RuleConf */ + +/** + * @typedef {Object} EcmaFeatures + * @property {boolean} [globalReturn] Enabling `return` statements at the top-level. + * @property {boolean} [jsx] Enabling JSX syntax. + * @property {boolean} [impliedStrict] Enabling strict mode always. + */ + +/** + * @typedef {Object} ParserOptions + * @property {EcmaFeatures} [ecmaFeatures] The optional features. + * @property {3|5|6|7|8|9|10|11|12|2015|2016|2017|2018|2019|2020|2021} [ecmaVersion] The ECMAScript version (or revision number). + * @property {"script"|"module"} [sourceType] The source code type. + */ + +/** + * @typedef {Object} ConfigData + * @property {Record} [env] The environment settings. + * @property {string | string[]} [extends] The path to other config files or the package name of shareable configs. + * @property {Record} [globals] The global variable settings. + * @property {string | string[]} [ignorePatterns] The glob patterns that ignore to lint. + * @property {boolean} [noInlineConfig] The flag that disables directive comments. + * @property {OverrideConfigData[]} [overrides] The override settings per kind of files. + * @property {string} [parser] The path to a parser or the package name of a parser. + * @property {ParserOptions} [parserOptions] The parser options. + * @property {string[]} [plugins] The plugin specifiers. + * @property {string} [processor] The processor specifier. + * @property {boolean} [reportUnusedDisableDirectives] The flag to report unused `eslint-disable` comments. + * @property {boolean} [root] The root flag. + * @property {Record} [rules] The rule settings. + * @property {Object} [settings] The shared settings. + */ + +/** + * @typedef {Object} OverrideConfigData + * @property {Record} [env] The environment settings. + * @property {string | string[]} [excludedFiles] The glob pattarns for excluded files. + * @property {string | string[]} [extends] The path to other config files or the package name of shareable configs. + * @property {string | string[]} files The glob patterns for target files. + * @property {Record} [globals] The global variable settings. + * @property {boolean} [noInlineConfig] The flag that disables directive comments. + * @property {OverrideConfigData[]} [overrides] The override settings per kind of files. + * @property {string} [parser] The path to a parser or the package name of a parser. + * @property {ParserOptions} [parserOptions] The parser options. + * @property {string[]} [plugins] The plugin specifiers. + * @property {string} [processor] The processor specifier. + * @property {boolean} [reportUnusedDisableDirectives] The flag to report unused `eslint-disable` comments. + * @property {Record} [rules] The rule settings. + * @property {Object} [settings] The shared settings. + */ + +/** + * @typedef {Object} ParseResult + * @property {Object} ast The AST. + * @property {ScopeManager} [scopeManager] The scope manager of the AST. + * @property {Record} [services] The services that the parser provides. + * @property {Record} [visitorKeys] The visitor keys of the AST. + */ + +/** + * @typedef {Object} Parser + * @property {(text:string, options:ParserOptions) => Object} parse The definition of global variables. + * @property {(text:string, options:ParserOptions) => ParseResult} [parseForESLint] The parser options that will be enabled under this environment. + */ + +/** + * @typedef {Object} Environment + * @property {Record} [globals] The definition of global variables. + * @property {ParserOptions} [parserOptions] The parser options that will be enabled under this environment. + */ + +/** + * @typedef {Object} LintMessage + * @property {number} column The 1-based column number. + * @property {number} [endColumn] The 1-based column number of the end location. + * @property {number} [endLine] The 1-based line number of the end location. + * @property {boolean} fatal If `true` then this is a fatal error. + * @property {{range:[number,number], text:string}} [fix] Information for autofix. + * @property {number} line The 1-based line number. + * @property {string} message The error message. + * @property {string|null} ruleId The ID of the rule which makes this message. + * @property {0|1|2} severity The severity of this message. + * @property {Array<{desc?: string, messageId?: string, fix: {range: [number, number], text: string}}>} [suggestions] Information for suggestions. + */ + +/** + * @typedef {Object} SuggestionResult + * @property {string} desc A short description. + * @property {string} [messageId] Id referencing a message for the description. + * @property {{ text: string, range: number[] }} fix fix result info + */ + +/** + * @typedef {Object} Processor + * @property {(text:string, filename:string) => Array} [preprocess] The function to extract code blocks. + * @property {(messagesList:LintMessage[][], filename:string) => LintMessage[]} [postprocess] The function to merge messages. + * @property {boolean} [supportsAutofix] If `true` then it means the processor supports autofix. + */ + +/** + * @typedef {Object} RuleMetaDocs + * @property {string} category The category of the rule. + * @property {string} description The description of the rule. + * @property {boolean} recommended If `true` then the rule is included in `eslint:recommended` preset. + * @property {string} url The URL of the rule documentation. + */ + +/** + * @typedef {Object} RuleMeta + * @property {boolean} [deprecated] If `true` then the rule has been deprecated. + * @property {RuleMetaDocs} docs The document information of the rule. + * @property {"code"|"whitespace"} [fixable] The autofix type. + * @property {Record} [messages] The messages the rule reports. + * @property {string[]} [replacedBy] The IDs of the alternative rules. + * @property {Array|Object} schema The option schema of the rule. + * @property {"problem"|"suggestion"|"layout"} type The rule type. + */ + +/** + * @typedef {Object} Rule + * @property {Function} create The factory of the rule. + * @property {RuleMeta} meta The meta data of the rule. + */ + +/** + * @typedef {Object} Plugin + * @property {Record} [configs] The definition of plugin configs. + * @property {Record} [environments] The definition of plugin environments. + * @property {Record} [processors] The definition of plugin processors. + * @property {Record} [rules] The definition of plugin rules. + */ + +/** + * Information of deprecated rules. + * @typedef {Object} DeprecatedRuleInfo + * @property {string} ruleId The rule ID. + * @property {string[]} replacedBy The rule IDs that replace this deprecated rule. + */ diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json index da4e526248392c..e33d83420dc0b7 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json @@ -27,7 +27,10 @@ "eslint-plugin-jsdoc": "^22.1.0", "eslint-plugin-node": "^11.1.0", "eslint-release": "^3.1.2", - "mocha": "^8.1.1" + "fs-teardown": "^0.1.0", + "mocha": "^8.1.1", + "sinon": "^9.2.0", + "temp-dir": "^2.0.0" }, "engines": { "node": "^10.12.0 || >=12.0.0" @@ -60,7 +63,7 @@ "generate-release": "eslint-generate-release", "lint": "eslint .", "publish-release": "eslint-publish-release", - "test": "mocha tests/lib/shared" + "test": "mocha -R progress -c 'tests/lib/**/*.js'" }, - "version": "0.1.3" + "version": "0.2.2" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/ajv/README.md b/tools/node_modules/eslint/node_modules/ajv/README.md index 3a88820d82c481..5aa2078d8920b4 100644 --- a/tools/node_modules/eslint/node_modules/ajv/README.md +++ b/tools/node_modules/eslint/node_modules/ajv/README.md @@ -6,12 +6,39 @@ The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/ [![Build Status](https://travis-ci.org/ajv-validator/ajv.svg?branch=master)](https://travis-ci.org/ajv-validator/ajv) [![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv) +[![npm (beta)](https://img.shields.io/npm/v/ajv/beta)](https://www.npmjs.com/package/ajv/v/7.0.0-beta.0) [![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) [![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv?branch=master) [![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) [![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin) +## Ajv v7 beta is released + +[Ajv version 7.0.0-beta.0](https://github.com/ajv-validator/ajv/tree/v7-beta) is released with these changes: + +- to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](./docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements. +- to make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe. +- to simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas. +- schemas are compiled to ES6 code (ES5 code generation is supported with an option). +- to improve reliability and maintainability the code is migrated to TypeScript. + +**Please note**: + +- the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "\$id" (or continue using version 6 that will be supported until 02/28/2021). +- all formats are separated to ajv-formats package - they have to be explicitely added if you use them. + +See [release notes](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) for the details. + +To install the new version: + +```bash +npm install ajv@beta +``` + +See [Getting started with v7](https://github.com/ajv-validator/ajv/tree/v7-beta#usage) for code example. + + ## Mozilla MOSS grant and OpenJS Foundation [](https://www.mozilla.org/en-US/moss/)     [](https://openjsf.org/blog/2020/08/14/ajv-joins-openjs-foundation-as-an-incubation-project/) @@ -1449,16 +1476,9 @@ Please see [Contributing guidelines](https://github.com/ajv-validator/ajv/blob/m See https://github.com/ajv-validator/ajv/releases -__Please note__: [Changes in version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0). - -[Version 5.0.0](https://github.com/ajv-validator/ajv/releases/tag/5.0.0). - -[Version 4.0.0](https://github.com/ajv-validator/ajv/releases/tag/4.0.0). - -[Version 3.0.0](https://github.com/ajv-validator/ajv/releases/tag/3.0.0). - -[Version 2.0.0](https://github.com/ajv-validator/ajv/releases/tag/2.0.0). +__Please note__: [Changes in version 7.0.0-beta](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) +[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0). ## Code of conduct diff --git a/tools/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js b/tools/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js index 2a34a771fd6f29..e4d9d156ff7578 100644 --- a/tools/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js +++ b/tools/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js @@ -170,8 +170,8 @@ var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@| // For the source: https://gist.github.com/dperini/729294 // For test cases: https://mathiasbynens.be/demo/url-regex // @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; diff --git a/tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js b/tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js index d02ec10a7feaee..7a60eb8a2bd81f 100644 --- a/tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js +++ b/tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js @@ -1,3 +1,3 @@ -/* ajv 6.12.5: Another JSON Schema Validator */ -!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Ajv=e()}(function(){return function o(i,n,l){function c(r,e){if(!n[r]){if(!i[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(u)return u(r,!0);var a=new Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}var s=n[r]={exports:{}};i[r][0].call(s.exports,function(e){return c(i[r][1][e]||e)},s,s.exports,o,i,n,l)}return n[r].exports}for(var u="function"==typeof require&&require,e=0;e%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,f=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return a.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(o);if(!r)return!1;var t,a=+r[2],s=+r[3];return 1<=a&&a<=12&&1<=s&&s<=(2!=a||((t=+r[1])%4!=0||t%100==0&&t%400!=0)?i[a]:29)}function y(e,r){var t=e.match(n);if(!t)return!1;var a=t[1],s=t[2],o=t[3];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||t[5])}(r.exports=m).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f};var g=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){"use strict";var R=e("./resolve"),$=e("./util"),j=e("./error_classes"),D=e("fast-json-stable-stringify"),O=e("../dotjs/validate"),I=$.ucs2length,A=e("fast-deep-equal"),k=j.Validation;function C(e,c,u,r){var d=this,p=this._opts,h=[void 0],f={},l=[],t={},m=[],a={},v=[],s=function(e,r,t){var a=L.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:{index:a=this._compilations.length,compiling:!(this._compilations[a]={schema:e,root:r,baseId:t})}}.call(this,e,c=c||{schema:e,refVal:h,refs:f},r),o=this._compilations[s.index];if(s.compiling)return o.callValidate=P;var y=this._formats,g=this.RULES;try{var i=E(e,c,u,r);o.validate=i;var n=o.callValidate;return n&&(n.schema=i.schema,n.errors=null,n.refs=i.refs,n.refVal=i.refVal,n.root=i.root,n.$async=i.$async,p.sourceCode&&(n.source=i.source)),i}finally{(function(e,r,t){var a=L.call(this,e,r,t);0<=a&&this._compilations.splice(a,1)}).call(this,e,c,r)}function P(){var e=o.validate,r=e.apply(this,arguments);return P.errors=e.errors,r}function E(e,r,t,a){var s=!r||r&&r.schema==e;if(r.schema!=c.schema)return C.call(d,e,r,t,a);var o=!0===e.$async,i=O({isTop:!0,schema:e,isRoot:s,baseId:a,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:j.MissingRef,RULES:g,validate:O,util:$,resolve:R,resolveRef:w,usePattern:_,useDefault:F,useCustomRule:x,opts:p,formats:y,logger:d.logger,self:d}),i=Q(h,z)+Q(l,N)+Q(m,q)+Q(v,T)+i;p.processCode&&(i=p.processCode(i,e));try{var n=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",i)(d,g,y,c,h,m,v,A,I,k);h[0]=n}catch(e){throw d.logger.error("Error compiling schema, function code:",i),e}return n.schema=e,n.errors=null,n.refs=f,n.refVal=h,n.root=s?n:r,o&&(n.$async=!0),!0===p.sourceCode&&(n.source={code:i,patterns:l,defaults:m}),n}function w(e,r,t){r=R.url(e,r);var a,s,o=f[r];if(void 0!==o)return S(a=h[o],s="refVal["+o+"]");if(!t&&c.refs){var i=c.refs[r];if(void 0!==i)return S(a=c.refVal[i],s=b(r,a))}s=b(r);var n,l=R.call(d,E,c,r);if(void 0!==l||(n=u&&u[r])&&(l=R.inlineRef(n,p.inlineRefs)?n:C.call(d,n,c,u,e)),void 0!==l)return S(h[f[r]]=l,s);delete f[r]}function b(e,r){var t=h.length;return h[t]=r,"refVal"+(f[e]=t)}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function _(e){var r=t[e];return void 0===r&&(r=t[e]=l.length,l[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return $.toQuotedString(e);case"object":if(null===e)return"null";var r=D(e),t=a[r];return void 0===t&&(t=a[r]=m.length,m[t]=e),"default"+t}}function x(e,r,t,a){if(!1!==d._opts.validateSchema){var s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw new Error("parent schema must have all required keywords: "+s.join(","));var o=e.definition.validateSchema;if(o)if(!o(r)){var i="keyword schema is invalid: "+d.errorsText(o.errors);if("log"!=d._opts.validateSchema)throw new Error(i);d.logger.error(i)}}var n,l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;if(l)n=l.call(d,r,t,a);else if(u)n=u.call(d,r,t,a),!1!==p.validateSchema&&d.validateSchema(n,!0);else if(c)n=c.call(d,a,e.keyword,r,t);else if(!(n=e.definition.validate))return;if(void 0===n)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=v.length;return{code:"customRule"+h,validate:v[h]=n}}}function L(e,r,t){for(var a=0;a",_=P?">":"<",F=void 0;if(!y&&"number"!=typeof d&&void 0!==d)throw new Error(r+" must be number");if(!b&&void 0!==w&&"number"!=typeof w&&"boolean"!=typeof w)throw new Error(E+" must be number or boolean");b?(o="exclIsNumber"+u,i="' + "+(n="op"+u)+" + '",c+=" var schemaExcl"+u+" = "+(t=e.util.getData(w.$data,h,e.dataPathArr))+"; ",F=E,(l=l||[]).push(c+=" var "+(a="exclusive"+u)+"; var "+(s="exclType"+u)+" = typeof "+(t="schemaExcl"+u)+"; if ("+s+" != 'boolean' && "+s+" != 'undefined' && "+s+" != 'number') { "),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(c+=" , message: '"+E+" should be boolean' "),e.opts.verbose&&(c+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ",x=c,c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } else if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+s+" == 'number' ? ( ("+a+" = "+g+" === undefined || "+t+" "+S+"= "+g+") ? "+v+" "+_+"= "+t+" : "+v+" "+_+" "+g+" ) : ( ("+a+" = "+t+" === true) ? "+v+" "+_+"= "+g+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { var op"+u+" = "+a+" ? '"+S+"' : '"+S+"='; ",void 0===d&&(f=e.errSchemaPath+"/"+(F=E),g=t,y=b)):(i=S,(o="number"==typeof w)&&y?(n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" ( "+g+" === undefined || "+w+" "+S+"= "+g+" ? "+v+" "+_+"= "+w+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { "):(o&&void 0===d?(a=!0,f=e.errSchemaPath+"/"+(F=E),g=w,_+="="):(o&&(g=Math[P?"min":"max"](w,d)),w===(!o||g)?(a=!0,f=e.errSchemaPath+"/"+(F=E),_+="="):(a=!1,i+="=")),n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+v+" "+_+" "+g+" || "+v+" !== "+v+") { ")),F=F||r,(l=l||[]).push(c),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { comparison: "+n+", limit: "+g+", exclusive: "+a+" } ",!1!==e.opts.messages&&(c+=" , message: 'should be "+i+" ",c+=y?"' + "+g:g+"'"),e.opts.verbose&&(c+=" , schema: ",c+=y?"validate.schema"+p:""+d,c+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ";var x=c;return c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } ",m&&(c+=" else { "),c}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" "+c+".length "+("maxItems"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxItems"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" items' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || "),t+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ";var d=r,p=p||[];p.push(t+=" "+("maxLength"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be ",t+="maxLength"==r?"longer":"shorter",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" characters' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" Object.keys("+c+").length "+("maxProperties"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxProperties"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" properties' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.schema[r],s=e.schemaPath+e.util.getProperty(r),o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c="valid"+n.level,u=n.baseId,h=!0,d=a;if(d)for(var p,f=-1,m=d.length-1;f "+_+") { ",x=c+"["+_+"]",d.schema=$,d.schemaPath=i+"["+_+"]",d.errSchemaPath=n+"/"+_,d.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0),d.dataPathArr[v]=_,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",t+=" } ",l&&(t+=" if ("+f+") { ",p+="}"))}"object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&0 "+o.length+") { for (var "+m+" = "+o.length+"; "+m+" < "+c+".length; "+m+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0),x=c+"["+m+"]",d.dataPathArr[v]=m,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",l&&(t+=" if (!"+f+") break; "),t+=" } } ",l&&(t+=" if ("+f+") { ",p+="}"))}else{(e.opts.strictKeywords?"object"==typeof o&&0 1e-"+e.opts.multipleOfPrecision+" ":" division"+a+" !== parseInt(division"+a+") ",t+=" ) ",u&&(t+=" ) ");var d=d||[];d.push(t+=" ) { "),t="",!1!==e.createErrors?(t+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { multipleOf: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be multiple of ",t+=u?"' + "+h:h+"'"),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var p=t,t=d.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="errs__"+a,h=e.util.copy(e);h.level++;var d,p,f,m,v="valid"+h.level;return(e.opts.strictKeywords?"object"==typeof o&&0 1) { ",t=e.schema.items&&e.schema.items.type,a=Array.isArray(t),!t||"object"==t||"array"==t||a&&(0<=t.indexOf("object")||0<=t.indexOf("array"))?i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+f+" = false; break outer; } } } ":(i+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ",i+=" if ("+e.util["checkDataType"+(a?"s":"")](t,"item",e.opts.strictNumbers,!0)+") continue; ",a&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),i+=" } ",m&&(i+=" } "),(s=s||[]).push(i+=" if (!"+f+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=m?"validate.schema"+u:""+c,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",o=i,i=s.pop(),i+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+o+"]); ":" validate.errors = ["+o+"]; return false; ":" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",d&&(i+=" else { ")):d&&(i+=" if (true) { "),i}},{}],38:[function(e,r,t){"use strict";r.exports=function(a,e){var r="",t=!0===a.schema.$async,s=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),o=a.self._getId(a.schema);if(a.opts.strictKeywords){var i=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(i){var n="unknown keyword: "+i;if("log"!==a.opts.strictKeywords)throw new Error(n);a.logger.warn(n)}}if(a.isTop&&(r+=" var validate = ",t&&(a.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(a.opts.sourceCode||a.opts.processCode)&&(r+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof a.schema||!s&&!a.schema.$ref){var l=a.level,c=a.dataLevel,u=a.schema[e="false schema"],h=a.schemaPath+a.util.getProperty(e),d=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,f="data"+(c||""),m="valid"+l;return!1===a.schema?(a.isTop?p=!0:r+=" var "+m+" = false; ",(U=U||[]).push(r),r="",!1!==a.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(d)+" , params: {} ",!1!==a.opts.messages&&(r+=" , message: 'boolean schema is false' "),a.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ",D=r,r=U.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+D+"]); ":" validate.errors = ["+D+"]; return false; ":" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):r+=a.isTop?t?" return data; ":" validate.errors = null; return true; ":" var "+m+" = true; ",a.isTop&&(r+=" }; return validate; "),r}if(a.isTop){var v=a.isTop,l=a.level=0,c=a.dataLevel=0,f="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[""],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var y="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(y);a.logger.warn(y)}r+=" var vErrors = null; ",r+=" var errors = 0; ",r+=" if (rootData === undefined) rootData = data; "}else{l=a.level,f="data"+((c=a.dataLevel)||"");if(o&&(a.baseId=a.resolve.url(a.baseId,o)),t&&!a.async)throw new Error("async schema in sync schema");r+=" var errs_"+l+" = errors;"}var g,m="valid"+l,p=!a.opts.allErrors,P="",E="",w=a.schema.type,b=Array.isArray(w);if(w&&a.opts.nullable&&!0===a.schema.nullable&&(b?-1==w.indexOf("null")&&(w=w.concat("null")):"null"!=w&&(w=[w,"null"],b=!0)),b&&1==w.length&&(w=w[0],b=!1),a.schema.$ref&&s){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(s=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(r+=" "+a.RULES.all.$comment.code(a,"$comment")),w){a.opts.coerceTypes&&(g=a.util.coerceToTypes(a.opts.coerceTypes,w));var S=a.RULES.types[w];if(g||b||!0===S||S&&!Z(S)){h=a.schemaPath+".type",d=a.errSchemaPath+"/type",h=a.schemaPath+".type",d=a.errSchemaPath+"/type";if(r+=" if ("+a.util[b?"checkDataTypes":"checkDataType"](w,f,a.opts.strictNumbers,!0)+") { ",g){var _="dataType"+l,F="coerced"+l;r+=" var "+_+" = typeof "+f+"; var "+F+" = undefined; ","array"==a.opts.coerceTypes&&(r+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+a.util.checkDataType(a.schema.type,f,a.opts.strictNumbers)+") "+F+" = "+f+"; } "),r+=" if ("+F+" !== undefined) ; ";var x=g;if(x)for(var R,$=-1,j=x.length-1;$= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=Math.floor,C=String.fromCharCode;function L(e){throw new RangeError(i[e])}function n(e,r){var t=e.split("@"),a="";return 1>1,e+=k(e/r);455k((A-a)/h))&&L("overflow"),a+=p*h;var f=d<=o?1:o+26<=d?26:d-o;if(pk(A/m)&&L("overflow"),h*=m}var v=r.length+1,o=z(a-u,v,0==u);k(a/v)>A-s&&L("overflow"),s+=k(a/v),a%=v,r.splice(a++,0,s)}return String.fromCodePoint.apply(String,r)}function c(e){var r=[],t=(e=N(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(C(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,p=d;for(d&&r.push("-");pk((A-s)/w)&&L("overflow"),s+=(f-a)*w,a=f;var b=!0,S=!1,_=void 0;try{for(var F,x=e[Symbol.iterator]();!(b=(F=x.next()).done);b=!0){var R=F.value;if(RA&&L("overflow"),R==a){for(var $=s,j=36;;j+=36){var D=j<=o?1:o+26<=j?26:j-o;if($>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function p(e){for(var r="",t=0,a=e.length;tA-Z\\x5E-\\x7E]",'[\\"\\\\]')),Y=new RegExp(M,"g"),W=new RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))","g"),X=new RegExp(J("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',G),"g"),ee=new RegExp(J("[^]",M,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=ee;function te(e){var r=p(e);return r.match(Y)?r:e}var ae={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,f=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return a.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(o);if(!r)return!1;var t,a=+r[2],s=+r[3];return 1<=a&&a<=12&&1<=s&&s<=(2!=a||((t=+r[1])%4!=0||t%100==0&&t%400!=0)?i[a]:29)}function y(e,r){var t=e.match(n);if(!t)return!1;var a=t[1],s=t[2],o=t[3];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||t[5])}(r.exports=m).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f};var g=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){"use strict";var R=e("./resolve"),$=e("./util"),j=e("./error_classes"),D=e("fast-json-stable-stringify"),O=e("../dotjs/validate"),I=$.ucs2length,A=e("fast-deep-equal"),k=j.Validation;function C(e,c,u,r){var d=this,p=this._opts,h=[void 0],f={},l=[],t={},m=[],a={},v=[],s=function(e,r,t){var a=L.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:{index:a=this._compilations.length,compiling:!(this._compilations[a]={schema:e,root:r,baseId:t})}}.call(this,e,c=c||{schema:e,refVal:h,refs:f},r),o=this._compilations[s.index];if(s.compiling)return o.callValidate=P;var y=this._formats,g=this.RULES;try{var i=E(e,c,u,r);o.validate=i;var n=o.callValidate;return n&&(n.schema=i.schema,n.errors=null,n.refs=i.refs,n.refVal=i.refVal,n.root=i.root,n.$async=i.$async,p.sourceCode&&(n.source=i.source)),i}finally{(function(e,r,t){var a=L.call(this,e,r,t);0<=a&&this._compilations.splice(a,1)}).call(this,e,c,r)}function P(){var e=o.validate,r=e.apply(this,arguments);return P.errors=e.errors,r}function E(e,r,t,a){var s=!r||r&&r.schema==e;if(r.schema!=c.schema)return C.call(d,e,r,t,a);var o=!0===e.$async,i=O({isTop:!0,schema:e,isRoot:s,baseId:a,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:j.MissingRef,RULES:g,validate:O,util:$,resolve:R,resolveRef:w,usePattern:_,useDefault:F,useCustomRule:x,opts:p,formats:y,logger:d.logger,self:d}),i=Q(h,z)+Q(l,N)+Q(m,q)+Q(v,T)+i;p.processCode&&(i=p.processCode(i,e));try{var n=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",i)(d,g,y,c,h,m,v,A,I,k);h[0]=n}catch(e){throw d.logger.error("Error compiling schema, function code:",i),e}return n.schema=e,n.errors=null,n.refs=f,n.refVal=h,n.root=s?n:r,o&&(n.$async=!0),!0===p.sourceCode&&(n.source={code:i,patterns:l,defaults:m}),n}function w(e,r,t){r=R.url(e,r);var a,s,o=f[r];if(void 0!==o)return S(a=h[o],s="refVal["+o+"]");if(!t&&c.refs){var i=c.refs[r];if(void 0!==i)return S(a=c.refVal[i],s=b(r,a))}s=b(r);var n,l=R.call(d,E,c,r);if(void 0!==l||(n=u&&u[r])&&(l=R.inlineRef(n,p.inlineRefs)?n:C.call(d,n,c,u,e)),void 0!==l)return S(h[f[r]]=l,s);delete f[r]}function b(e,r){var t=h.length;return h[t]=r,"refVal"+(f[e]=t)}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function _(e){var r=t[e];return void 0===r&&(r=t[e]=l.length,l[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return $.toQuotedString(e);case"object":if(null===e)return"null";var r=D(e),t=a[r];return void 0===t&&(t=a[r]=m.length,m[t]=e),"default"+t}}function x(e,r,t,a){if(!1!==d._opts.validateSchema){var s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw new Error("parent schema must have all required keywords: "+s.join(","));var o=e.definition.validateSchema;if(o)if(!o(r)){var i="keyword schema is invalid: "+d.errorsText(o.errors);if("log"!=d._opts.validateSchema)throw new Error(i);d.logger.error(i)}}var n,l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;if(l)n=l.call(d,r,t,a);else if(u)n=u.call(d,r,t,a),!1!==p.validateSchema&&d.validateSchema(n,!0);else if(c)n=c.call(d,a,e.keyword,r,t);else if(!(n=e.definition.validate))return;if(void 0===n)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=v.length;return{code:"customRule"+h,validate:v[h]=n}}}function L(e,r,t){for(var a=0;a",_=P?">":"<",F=void 0;if(!y&&"number"!=typeof d&&void 0!==d)throw new Error(r+" must be number");if(!b&&void 0!==w&&"number"!=typeof w&&"boolean"!=typeof w)throw new Error(E+" must be number or boolean");b?(o="exclIsNumber"+u,i="' + "+(n="op"+u)+" + '",c+=" var schemaExcl"+u+" = "+(t=e.util.getData(w.$data,h,e.dataPathArr))+"; ",F=E,(l=l||[]).push(c+=" var "+(a="exclusive"+u)+"; var "+(s="exclType"+u)+" = typeof "+(t="schemaExcl"+u)+"; if ("+s+" != 'boolean' && "+s+" != 'undefined' && "+s+" != 'number') { "),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(c+=" , message: '"+E+" should be boolean' "),e.opts.verbose&&(c+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ",x=c,c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } else if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+s+" == 'number' ? ( ("+a+" = "+g+" === undefined || "+t+" "+S+"= "+g+") ? "+v+" "+_+"= "+t+" : "+v+" "+_+" "+g+" ) : ( ("+a+" = "+t+" === true) ? "+v+" "+_+"= "+g+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { var op"+u+" = "+a+" ? '"+S+"' : '"+S+"='; ",void 0===d&&(f=e.errSchemaPath+"/"+(F=E),g=t,y=b)):(i=S,(o="number"==typeof w)&&y?(n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" ( "+g+" === undefined || "+w+" "+S+"= "+g+" ? "+v+" "+_+"= "+w+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { "):(o&&void 0===d?(a=!0,f=e.errSchemaPath+"/"+(F=E),g=w,_+="="):(o&&(g=Math[P?"min":"max"](w,d)),w===(!o||g)?(a=!0,f=e.errSchemaPath+"/"+(F=E),_+="="):(a=!1,i+="=")),n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+v+" "+_+" "+g+" || "+v+" !== "+v+") { ")),F=F||r,(l=l||[]).push(c),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { comparison: "+n+", limit: "+g+", exclusive: "+a+" } ",!1!==e.opts.messages&&(c+=" , message: 'should be "+i+" ",c+=y?"' + "+g:g+"'"),e.opts.verbose&&(c+=" , schema: ",c+=y?"validate.schema"+p:""+d,c+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ";var x=c;return c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } ",m&&(c+=" else { "),c}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" "+c+".length "+("maxItems"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxItems"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" items' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || "),t+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ";var d=r,p=p||[];p.push(t+=" "+("maxLength"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be ",t+="maxLength"==r?"longer":"shorter",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" characters' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" Object.keys("+c+").length "+("maxProperties"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxProperties"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" properties' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.schema[r],s=e.schemaPath+e.util.getProperty(r),o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c="valid"+n.level,u=n.baseId,h=!0,d=a;if(d)for(var p,f=-1,m=d.length-1;f "+_+") { ",x=c+"["+_+"]",d.schema=$,d.schemaPath=i+"["+_+"]",d.errSchemaPath=n+"/"+_,d.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0),d.dataPathArr[v]=_,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",t+=" } ",l&&(t+=" if ("+f+") { ",p+="}"))}"object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&0 "+o.length+") { for (var "+m+" = "+o.length+"; "+m+" < "+c+".length; "+m+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0),x=c+"["+m+"]",d.dataPathArr[v]=m,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",l&&(t+=" if (!"+f+") break; "),t+=" } } ",l&&(t+=" if ("+f+") { ",p+="}"))}else{(e.opts.strictKeywords?"object"==typeof o&&0 1e-"+e.opts.multipleOfPrecision+" ":" division"+a+" !== parseInt(division"+a+") ",t+=" ) ",u&&(t+=" ) ");var d=d||[];d.push(t+=" ) { "),t="",!1!==e.createErrors?(t+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { multipleOf: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be multiple of ",t+=u?"' + "+h:h+"'"),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var p=t,t=d.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="errs__"+a,h=e.util.copy(e);h.level++;var d,p,f,m,v="valid"+h.level;return(e.opts.strictKeywords?"object"==typeof o&&0 1) { ",t=e.schema.items&&e.schema.items.type,a=Array.isArray(t),!t||"object"==t||"array"==t||a&&(0<=t.indexOf("object")||0<=t.indexOf("array"))?i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+f+" = false; break outer; } } } ":(i+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ",i+=" if ("+e.util["checkDataType"+(a?"s":"")](t,"item",e.opts.strictNumbers,!0)+") continue; ",a&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),i+=" } ",m&&(i+=" } "),(s=s||[]).push(i+=" if (!"+f+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=m?"validate.schema"+u:""+c,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",o=i,i=s.pop(),i+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+o+"]); ":" validate.errors = ["+o+"]; return false; ":" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",d&&(i+=" else { ")):d&&(i+=" if (true) { "),i}},{}],38:[function(e,r,t){"use strict";r.exports=function(a,e){var r="",t=!0===a.schema.$async,s=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),o=a.self._getId(a.schema);if(a.opts.strictKeywords){var i=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(i){var n="unknown keyword: "+i;if("log"!==a.opts.strictKeywords)throw new Error(n);a.logger.warn(n)}}if(a.isTop&&(r+=" var validate = ",t&&(a.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(a.opts.sourceCode||a.opts.processCode)&&(r+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof a.schema||!s&&!a.schema.$ref){var l=a.level,c=a.dataLevel,u=a.schema[e="false schema"],h=a.schemaPath+a.util.getProperty(e),d=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,f="data"+(c||""),m="valid"+l;return!1===a.schema?(a.isTop?p=!0:r+=" var "+m+" = false; ",(U=U||[]).push(r),r="",!1!==a.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(d)+" , params: {} ",!1!==a.opts.messages&&(r+=" , message: 'boolean schema is false' "),a.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ",D=r,r=U.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+D+"]); ":" validate.errors = ["+D+"]; return false; ":" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):r+=a.isTop?t?" return data; ":" validate.errors = null; return true; ":" var "+m+" = true; ",a.isTop&&(r+=" }; return validate; "),r}if(a.isTop){var v=a.isTop,l=a.level=0,c=a.dataLevel=0,f="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[""],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var y="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(y);a.logger.warn(y)}r+=" var vErrors = null; ",r+=" var errors = 0; ",r+=" if (rootData === undefined) rootData = data; "}else{l=a.level,f="data"+((c=a.dataLevel)||"");if(o&&(a.baseId=a.resolve.url(a.baseId,o)),t&&!a.async)throw new Error("async schema in sync schema");r+=" var errs_"+l+" = errors;"}var g,m="valid"+l,p=!a.opts.allErrors,P="",E="",w=a.schema.type,b=Array.isArray(w);if(w&&a.opts.nullable&&!0===a.schema.nullable&&(b?-1==w.indexOf("null")&&(w=w.concat("null")):"null"!=w&&(w=[w,"null"],b=!0)),b&&1==w.length&&(w=w[0],b=!1),a.schema.$ref&&s){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(s=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(r+=" "+a.RULES.all.$comment.code(a,"$comment")),w){a.opts.coerceTypes&&(g=a.util.coerceToTypes(a.opts.coerceTypes,w));var S=a.RULES.types[w];if(g||b||!0===S||S&&!Z(S)){h=a.schemaPath+".type",d=a.errSchemaPath+"/type",h=a.schemaPath+".type",d=a.errSchemaPath+"/type";if(r+=" if ("+a.util[b?"checkDataTypes":"checkDataType"](w,f,a.opts.strictNumbers,!0)+") { ",g){var _="dataType"+l,F="coerced"+l;r+=" var "+_+" = typeof "+f+"; var "+F+" = undefined; ","array"==a.opts.coerceTypes&&(r+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+a.util.checkDataType(a.schema.type,f,a.opts.strictNumbers)+") "+F+" = "+f+"; } "),r+=" if ("+F+" !== undefined) ; ";var x=g;if(x)for(var R,$=-1,j=x.length-1;$= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=Math.floor,C=String.fromCharCode;function L(e){throw new RangeError(i[e])}function n(e,r){var t=e.split("@"),a="";return 1>1,e+=k(e/r);455k((A-a)/h))&&L("overflow"),a+=p*h;var f=d<=o?1:o+26<=d?26:d-o;if(pk(A/m)&&L("overflow"),h*=m}var v=r.length+1,o=z(a-u,v,0==u);k(a/v)>A-s&&L("overflow"),s+=k(a/v),a%=v,r.splice(a++,0,s)}return String.fromCodePoint.apply(String,r)}function c(e){var r=[],t=(e=N(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(C(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,p=d;for(d&&r.push("-");pk((A-s)/w)&&L("overflow"),s+=(f-a)*w,a=f;var b=!0,S=!1,_=void 0;try{for(var F,x=e[Symbol.iterator]();!(b=(F=x.next()).done);b=!0){var R=F.value;if(RA&&L("overflow"),R==a){for(var $=s,j=36;;j+=36){var D=j<=o?1:o+26<=j?26:j-o;if($>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function p(e){for(var r="",t=0,a=e.length;tA-Z\\x5E-\\x7E]",'[\\"\\\\]')),Y=new RegExp(K,"g"),W=new RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))","g"),X=new RegExp(J("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',G),"g"),ee=new RegExp(J("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=ee;function te(e){var r=p(e);return r.match(Y)?r:e}var ae={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@| // For the source: https://gist.github.com/dperini/729294 // For test cases: https://mathiasbynens.be/demo/url-regex // @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; diff --git a/tools/node_modules/eslint/node_modules/ajv/package.json b/tools/node_modules/eslint/node_modules/ajv/package.json index ea9acce5ad7da3..6657aaf6c4ab24 100644 --- a/tools/node_modules/eslint/node_modules/ajv/package.json +++ b/tools/node_modules/eslint/node_modules/ajv/package.json @@ -106,5 +106,5 @@ }, "tonicExampleFilename": ".tonic_example.js", "typings": "lib/ajv.d.ts", - "version": "6.12.5" + "version": "6.12.6" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/ajv/scripts/info b/tools/node_modules/eslint/node_modules/ajv/scripts/info old mode 100755 new mode 100644 diff --git a/tools/node_modules/eslint/node_modules/ajv/scripts/prepare-tests b/tools/node_modules/eslint/node_modules/ajv/scripts/prepare-tests old mode 100755 new mode 100644 diff --git a/tools/node_modules/eslint/node_modules/ajv/scripts/publish-built-version b/tools/node_modules/eslint/node_modules/ajv/scripts/publish-built-version old mode 100755 new mode 100644 diff --git a/tools/node_modules/eslint/node_modules/ajv/scripts/travis-gh-pages b/tools/node_modules/eslint/node_modules/ajv/scripts/travis-gh-pages old mode 100755 new mode 100644 diff --git a/tools/node_modules/eslint/node_modules/astral-regex/index.js b/tools/node_modules/eslint/node_modules/astral-regex/index.js index f90e6a225c40ca..651177d40f1de3 100644 --- a/tools/node_modules/eslint/node_modules/astral-regex/index.js +++ b/tools/node_modules/eslint/node_modules/astral-regex/index.js @@ -1,4 +1,6 @@ 'use strict'; const regex = '[\uD800-\uDBFF][\uDC00-\uDFFF]'; -module.exports = opts => opts && opts.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g'); +const astralRegex = options => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g'); + +module.exports = astralRegex; diff --git a/tools/node_modules/eslint/node_modules/astral-regex/package.json b/tools/node_modules/eslint/node_modules/astral-regex/package.json index 61089098b382bc..50ad84da9d6243 100644 --- a/tools/node_modules/eslint/node_modules/astral-regex/package.json +++ b/tools/node_modules/eslint/node_modules/astral-regex/package.json @@ -8,18 +8,19 @@ "url": "https://github.com/kevva/astral-regex/issues" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "Regular expression for matching astral symbols", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" }, "engines": { - "node": ">=4" + "node": ">=8" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/kevva/astral-regex#readme", "keywords": [ @@ -35,7 +36,7 @@ "url": "git+https://github.com/kevva/astral-regex.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd" }, - "version": "1.0.0" + "version": "2.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/astral-regex/readme.md b/tools/node_modules/eslint/node_modules/astral-regex/readme.md index cde44f7bc0cc83..89d6659a41fb4e 100644 --- a/tools/node_modules/eslint/node_modules/astral-regex/readme.md +++ b/tools/node_modules/eslint/node_modules/astral-regex/readme.md @@ -1,6 +1,6 @@ # astral-regex [![Build Status](https://travis-ci.org/kevva/astral-regex.svg?branch=master)](https://travis-ci.org/kevva/astral-regex) -> Regular expression for matching astral symbols +> Regular expression for matching [astral symbols](https://everything2.com/title/astral+plane) ## Install @@ -15,8 +15,11 @@ $ npm install astral-regex ```js const astralRegex = require('astral-regex'); -astralRegex({exact: true}).test(''); +astralRegex({exact: true}).test('🦄'); //=> true + +'foo 🦄 💩 bar'.match(astralRegex()); +//=> ['🦄', '💩'] ``` diff --git a/tools/node_modules/eslint/node_modules/debug/package.json b/tools/node_modules/eslint/node_modules/debug/package.json index 5f2e838cb3d384..2b1dece47b8c9d 100644 --- a/tools/node_modules/eslint/node_modules/debug/package.json +++ b/tools/node_modules/eslint/node_modules/debug/package.json @@ -74,5 +74,5 @@ "test:coverage": "cat ./coverage/lcov.info | coveralls", "test:node": "istanbul cover _mocha -- test.js" }, - "version": "4.2.0" + "version": "4.3.1" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/debug/src/browser.js b/tools/node_modules/eslint/node_modules/debug/src/browser.js index ac3f7e1339b985..cd0fc35d1ee11e 100644 --- a/tools/node_modules/eslint/node_modules/debug/src/browser.js +++ b/tools/node_modules/eslint/node_modules/debug/src/browser.js @@ -9,6 +9,16 @@ exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); /** * Colors. diff --git a/tools/node_modules/eslint/node_modules/debug/src/common.js b/tools/node_modules/eslint/node_modules/debug/src/common.js index da7eada619f824..392a8e005a063a 100644 --- a/tools/node_modules/eslint/node_modules/debug/src/common.js +++ b/tools/node_modules/eslint/node_modules/debug/src/common.js @@ -12,16 +12,12 @@ function setup(env) { createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = require('ms'); + createDebug.destroy = destroy; Object.keys(env).forEach(key => { createDebug[key] = env[key]; }); - /** - * Active `debug` instances. - */ - createDebug.instances = []; - /** * The currently active debug mode names, and names to skip. */ @@ -63,6 +59,7 @@ function setup(env) { */ function createDebug(namespace) { let prevTime; + let enableOverride = null; function debug(...args) { // Disabled? @@ -92,7 +89,7 @@ function setup(env) { args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { // If we encounter an escaped % then don't increase the array index if (match === '%%') { - return match; + return '%'; } index++; const formatter = createDebug.formatters[format]; @@ -115,31 +112,28 @@ function setup(env) { } debug.namespace = namespace; - debug.enabled = createDebug.enabled(namespace); debug.useColors = createDebug.useColors(); debug.color = createDebug.selectColor(namespace); - debug.destroy = destroy; debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, + set: v => { + enableOverride = v; + } + }); // Env-specific initialization logic for debug instances if (typeof createDebug.init === 'function') { createDebug.init(debug); } - createDebug.instances.push(debug); - return debug; } - function destroy() { - const index = createDebug.instances.indexOf(this); - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - return false; - } - function extend(namespace, delimiter) { const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); newDebug.log = this.log; @@ -177,11 +171,6 @@ function setup(env) { createDebug.names.push(new RegExp('^' + namespaces + '$')); } } - - for (i = 0; i < createDebug.instances.length; i++) { - const instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } } /** @@ -256,6 +245,14 @@ function setup(env) { return val; } + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + createDebug.enable(createDebug.load()); return createDebug; diff --git a/tools/node_modules/eslint/node_modules/debug/src/node.js b/tools/node_modules/eslint/node_modules/debug/src/node.js index 5e1f1541a05593..79bc085cb0230c 100644 --- a/tools/node_modules/eslint/node_modules/debug/src/node.js +++ b/tools/node_modules/eslint/node_modules/debug/src/node.js @@ -15,6 +15,10 @@ exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); /** * Colors. @@ -244,7 +248,9 @@ const {formatters} = module.exports; formatters.o = function (v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts) - .replace(/\s*\n\s*/g, ' '); + .split('\n') + .map(str => str.trim()) + .join(' '); }; /** diff --git a/tools/node_modules/eslint/node_modules/emoji-regex/README.md b/tools/node_modules/eslint/node_modules/emoji-regex/README.md index 37cf14e01f72a5..f10e1733350471 100644 --- a/tools/node_modules/eslint/node_modules/emoji-regex/README.md +++ b/tools/node_modules/eslint/node_modules/emoji-regex/README.md @@ -2,7 +2,7 @@ _emoji-regex_ offers a regular expression to match all emoji symbols (including textual representations of emoji) as per the Unicode Standard. -This repository contains a script that generates this regular expression based on [the data from Unicode Technical Report #51](https://github.com/mathiasbynens/unicode-tr51). Because of this, the regular expression can easily be updated whenever new emoji are added to the Unicode standard. +This repository contains a script that generates this regular expression based on [the data from Unicode v12](https://github.com/mathiasbynens/unicode-12.0.0). Because of this, the regular expression can easily be updated whenever new emoji are added to the Unicode standard. ## Installation diff --git a/tools/node_modules/eslint/node_modules/emoji-regex/es2015/index.js b/tools/node_modules/eslint/node_modules/emoji-regex/es2015/index.js index 0216db95876da0..b4cf3dcd389935 100644 --- a/tools/node_modules/eslint/node_modules/emoji-regex/es2015/index.js +++ b/tools/node_modules/eslint/node_modules/emoji-regex/es2015/index.js @@ -2,5 +2,5 @@ module.exports = () => { // https://mths.be/emoji - return /\u{1F3F4}(?:\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074})\u{E007F}|\u200D\u2620\uFE0F)|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F468}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u{1F468}(?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F469}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F468}(?:\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|[\u{1F3FB}-\u{1F3FF}])|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u{1F469}\u200D\u{1F466}|\u{1F1F6}\u{1F1E6}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9D1}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F469}\u{1F46E}\u{1F470}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9D1}-\u{1F9DD}]/gu; + return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; }; diff --git a/tools/node_modules/eslint/node_modules/emoji-regex/es2015/text.js b/tools/node_modules/eslint/node_modules/emoji-regex/es2015/text.js index d0a771d36e487f..780309df58f1a2 100644 --- a/tools/node_modules/eslint/node_modules/emoji-regex/es2015/text.js +++ b/tools/node_modules/eslint/node_modules/emoji-regex/es2015/text.js @@ -2,5 +2,5 @@ module.exports = () => { // https://mths.be/emoji - return /\u{1F3F4}(?:\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074})\u{E007F}|\u200D\u2620\uFE0F)|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F468}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u{1F468}(?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F469}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F468}(?:\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|[\u{1F3FB}-\u{1F3FF}])|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u{1F469}\u200D\u{1F466}|\u{1F1F6}\u{1F1E6}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9D1}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F469}\u{1F46E}\u{1F470}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9D1}-\u{1F9DD}]/gu; + return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; }; diff --git a/tools/node_modules/eslint/node_modules/emoji-regex/index.js b/tools/node_modules/eslint/node_modules/emoji-regex/index.js index e2237a4e805327..d993a3a99cb95a 100644 --- a/tools/node_modules/eslint/node_modules/emoji-regex/index.js +++ b/tools/node_modules/eslint/node_modules/emoji-regex/index.js @@ -2,5 +2,5 @@ module.exports = function () { // https://mths.be/emoji - return /\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g; + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; }; diff --git a/tools/node_modules/eslint/node_modules/emoji-regex/package.json b/tools/node_modules/eslint/node_modules/emoji-regex/package.json index 439b65e4354d5c..eecc5eb318cd0a 100644 --- a/tools/node_modules/eslint/node_modules/emoji-regex/package.json +++ b/tools/node_modules/eslint/node_modules/emoji-regex/package.json @@ -10,14 +10,13 @@ "deprecated": false, "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "mocha": "^5.2.0", + "@babel/cli": "^7.2.3", + "@babel/core": "^7.3.4", + "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", + "@babel/preset-env": "^7.3.4", + "mocha": "^6.0.2", "regexgen": "^1.3.0", - "unicode-11.0.0": "^0.7.7", - "unicode-tr51": "^9.0.1" + "unicode-12.0.0": "^0.7.9" }, "files": [ "LICENSE-MIT.txt", @@ -51,5 +50,5 @@ "test:watch": "npm run test -- --watch" }, "types": "index.d.ts", - "version": "7.0.3" + "version": "8.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/emoji-regex/text.js b/tools/node_modules/eslint/node_modules/emoji-regex/text.js index 199ae3be35b418..0a55ce2f2308ad 100644 --- a/tools/node_modules/eslint/node_modules/emoji-regex/text.js +++ b/tools/node_modules/eslint/node_modules/emoji-regex/text.js @@ -2,5 +2,5 @@ module.exports = function () { // https://mths.be/emoji - return /\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g; + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; }; diff --git a/tools/node_modules/eslint/node_modules/espree/README.md b/tools/node_modules/eslint/node_modules/espree/README.md index e7b5064cb32456..72d88f83315422 100644 --- a/tools/node_modules/eslint/node_modules/espree/README.md +++ b/tools/node_modules/eslint/node_modules/espree/README.md @@ -27,10 +27,10 @@ const ast = espree.parse(code); ### `parse()` -`parse` parses the given code and returns a abstract syntax tree (AST). It takes two paramenter. +`parse` parses the given code and returns a abstract syntax tree (AST). It takes two parameters. - `code` [string]() - the code which needs to be parsed. -- `options (Optional)` [Object]() - read more about this [here](#options) +- `options (Optional)` [Object]() - read more about this [here](#options). ```javascript const espree = require("espree"); @@ -71,10 +71,10 @@ Node { ### `tokenize()` -`tokenize` returns the tokens of a give code. It takes two paramenter. +`tokenize` returns the tokens of a given code. It takes two parameters. - `code` [string]() - the code which needs to be parsed. -- `options (Optional)` [Object]() - read more about this [here](#options) +- `options (Optional)` [Object]() - read more about this [here](#options). Even if `options` is empty or undefined or `options.tokens` is `false`, it assigns it to `true` in order to get the `tokens` array @@ -112,7 +112,7 @@ Returns the latest ECMAScript supported by `espree` ### `supportedEcmaVersions` -Returns an array of all supported ECMAScript version +Returns an array of all supported ECMAScript versions ## Options diff --git a/tools/node_modules/eslint/node_modules/espree/package.json b/tools/node_modules/eslint/node_modules/espree/package.json index 433e3ef73990a9..9fd6ee14a34c8f 100644 --- a/tools/node_modules/eslint/node_modules/espree/package.json +++ b/tools/node_modules/eslint/node_modules/espree/package.json @@ -9,7 +9,7 @@ "bundleDependencies": false, "dependencies": { "acorn": "^7.4.0", - "acorn-jsx": "^5.2.0", + "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^1.3.0" }, "deprecated": false, @@ -68,5 +68,5 @@ "sync-docs": "node Makefile.js docs", "test": "npm run-script lint && node Makefile.js test" }, - "version": "7.3.0" + "version": "7.3.1" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/file-entry-cache/cache.js b/tools/node_modules/eslint/node_modules/file-entry-cache/cache.js index ebc6386d1c8671..0aabd7a92d467c 100644 --- a/tools/node_modules/eslint/node_modules/file-entry-cache/cache.js +++ b/tools/node_modules/eslint/node_modules/file-entry-cache/cache.js @@ -1,31 +1,31 @@ -var path = require( 'path' ); -var crypto = require( 'crypto' ); +var path = require('path'); +var crypto = require('crypto'); module.exports = { - createFromFile: function ( filePath, useChecksum ) { - var fname = path.basename( filePath ); - var dir = path.dirname( filePath ); - return this.create( fname, dir, useChecksum ); + createFromFile: function (filePath, useChecksum) { + var fname = path.basename(filePath); + var dir = path.dirname(filePath); + return this.create(fname, dir, useChecksum); }, - create: function ( cacheId, _path, useChecksum ) { - var fs = require( 'fs' ); - var flatCache = require( 'flat-cache' ); - var cache = flatCache.load( cacheId, _path ); - var normalizedEntries = { }; + create: function (cacheId, _path, useChecksum) { + var fs = require('fs'); + var flatCache = require('flat-cache'); + var cache = flatCache.load(cacheId, _path); + var normalizedEntries = {}; var removeNotFoundFiles = function removeNotFoundFiles() { const cachedEntries = cache.keys(); // remove not found entries - cachedEntries.forEach( function remover( fPath ) { + cachedEntries.forEach(function remover(fPath) { try { - fs.statSync( fPath ); + fs.statSync(fPath); } catch (err) { - if ( err.code === 'ENOENT' ) { - cache.removeKey( fPath ); + if (err.code === 'ENOENT') { + cache.removeKey(fPath); } } - } ); + }); }; removeNotFoundFiles(); @@ -43,11 +43,8 @@ module.exports = { * @param {Buffer} buffer buffer to calculate hash on * @return {String} content hash digest */ - getHash: function ( buffer ) { - return crypto - .createHash( 'md5' ) - .update( buffer ) - .digest( 'hex' ); + getHash: function (buffer) { + return crypto.createHash('md5').update(buffer).digest('hex'); }, /** @@ -56,8 +53,8 @@ module.exports = { * @param {String} file the filepath to check * @return {Boolean} wheter or not the file has changed */ - hasFileChanged: function ( file ) { - return this.getFileDescriptor( file ).changed; + hasFileChanged: function (file) { + return this.getFileDescriptor(file).changed; }, /** @@ -69,49 +66,49 @@ module.exports = { * @param {Array} files the files to analyze and compare to the previous seen files * @return {[type]} [description] */ - analyzeFiles: function ( files ) { + analyzeFiles: function (files) { var me = this; - files = files || [ ]; + files = files || []; var res = { changedFiles: [], notFoundFiles: [], - notChangedFiles: [] + notChangedFiles: [], }; - me.normalizeEntries( files ).forEach( function ( entry ) { - if ( entry.changed ) { - res.changedFiles.push( entry.key ); + me.normalizeEntries(files).forEach(function (entry) { + if (entry.changed) { + res.changedFiles.push(entry.key); return; } - if ( entry.notFound ) { - res.notFoundFiles.push( entry.key ); + if (entry.notFound) { + res.notFoundFiles.push(entry.key); return; } - res.notChangedFiles.push( entry.key ); - } ); + res.notChangedFiles.push(entry.key); + }); return res; }, - getFileDescriptor: function ( file ) { + getFileDescriptor: function (file) { var fstat; try { - fstat = fs.statSync( file ); + fstat = fs.statSync(file); } catch (ex) { - this.removeEntry( file ); + this.removeEntry(file); return { key: file, notFound: true, err: ex }; } - if ( useChecksum ) { - return this._getFileDescriptorUsingChecksum( file ); + if (useChecksum) { + return this._getFileDescriptorUsingChecksum(file); } - return this._getFileDescriptorUsingMtimeAndSize( file, fstat ); + return this._getFileDescriptorUsingMtimeAndSize(file, fstat); }, - _getFileDescriptorUsingMtimeAndSize: function ( file, fstat ) { - var meta = cache.getKey( file ); + _getFileDescriptorUsingMtimeAndSize: function (file, fstat) { + var meta = cache.getKey(file); var cacheExists = !!meta; var cSize = fstat.size; @@ -120,47 +117,47 @@ module.exports = { var isDifferentDate; var isDifferentSize; - if ( !meta ) { + if (!meta) { meta = { size: cSize, mtime: cTime }; } else { isDifferentDate = cTime !== meta.mtime; isDifferentSize = cSize !== meta.size; } - var nEntry = normalizedEntries[ file ] = { + var nEntry = (normalizedEntries[file] = { key: file, changed: !cacheExists || isDifferentDate || isDifferentSize, - meta: meta - }; + meta: meta, + }); return nEntry; }, - _getFileDescriptorUsingChecksum: function ( file ) { - var meta = cache.getKey( file ); + _getFileDescriptorUsingChecksum: function (file) { + var meta = cache.getKey(file); var cacheExists = !!meta; var contentBuffer; try { - contentBuffer = fs.readFileSync( file ); + contentBuffer = fs.readFileSync(file); } catch (ex) { contentBuffer = ''; } var isDifferent = true; - var hash = this.getHash( contentBuffer ); + var hash = this.getHash(contentBuffer); - if ( !meta ) { + if (!meta) { meta = { hash: hash }; } else { isDifferent = hash !== meta.hash; } - var nEntry = normalizedEntries[ file ] = { + var nEntry = (normalizedEntries[file] = { key: file, changed: !cacheExists || isDifferent, - meta: meta - }; + meta: meta, + }); return nEntry; }, @@ -173,15 +170,18 @@ module.exports = { * @param files {Array} the array of files to compare against the ones in the cache * @returns {Array} */ - getUpdatedFiles: function ( files ) { + getUpdatedFiles: function (files) { var me = this; - files = files || [ ]; - - return me.normalizeEntries( files ).filter( function ( entry ) { - return entry.changed; - } ).map( function ( entry ) { - return entry.key; - } ); + files = files || []; + + return me + .normalizeEntries(files) + .filter(function (entry) { + return entry.changed; + }) + .map(function (entry) { + return entry.key; + }); }, /** @@ -190,13 +190,13 @@ module.exports = { * @param files * @returns {*} */ - normalizeEntries: function ( files ) { - files = files || [ ]; + normalizeEntries: function (files) { + files = files || []; var me = this; - var nEntries = files.map( function ( file ) { - return me.getFileDescriptor( file ); - } ); + var nEntries = files.map(function (file) { + return me.getFileDescriptor(file); + }); //normalizeEntries = nEntries; return nEntries; @@ -209,9 +209,9 @@ module.exports = { * @method removeEntry * @param entryName */ - removeEntry: function ( entryName ) { - delete normalizedEntries[ entryName ]; - cache.removeKey( entryName ); + removeEntry: function (entryName) { + delete normalizedEntries[entryName]; + cache.removeKey(entryName); }, /** @@ -226,23 +226,23 @@ module.exports = { * remove the cache from the file and clear the memory cache */ destroy: function () { - normalizedEntries = { }; + normalizedEntries = {}; cache.destroy(); }, - _getMetaForFileUsingCheckSum: function ( cacheEntry ) { - var contentBuffer = fs.readFileSync( cacheEntry.key ); - var hash = this.getHash( contentBuffer ); - var meta = Object.assign( cacheEntry.meta, { hash: hash } ); + _getMetaForFileUsingCheckSum: function (cacheEntry) { + var contentBuffer = fs.readFileSync(cacheEntry.key); + var hash = this.getHash(contentBuffer); + var meta = Object.assign(cacheEntry.meta, { hash: hash }); return meta; }, - _getMetaForFileUsingMtimeAndSize: function ( cacheEntry ) { - var stat = fs.statSync( cacheEntry.key ); - var meta = Object.assign( cacheEntry.meta, { + _getMetaForFileUsingMtimeAndSize: function (cacheEntry) { + var stat = fs.statSync(cacheEntry.key); + var meta = Object.assign(cacheEntry.meta, { size: stat.size, - mtime: stat.mtime.getTime() - } ); + mtime: stat.mtime.getTime(), + }); return meta; }, @@ -250,37 +250,39 @@ module.exports = { * Sync the files and persist them to the cache * @method reconcile */ - reconcile: function ( noPrune ) { + reconcile: function (noPrune) { removeNotFoundFiles(); noPrune = typeof noPrune === 'undefined' ? true : noPrune; var entries = normalizedEntries; - var keys = Object.keys( entries ); + var keys = Object.keys(entries); - if ( keys.length === 0 ) { + if (keys.length === 0) { return; } var me = this; - keys.forEach( function ( entryName ) { - var cacheEntry = entries[ entryName ]; + keys.forEach(function (entryName) { + var cacheEntry = entries[entryName]; try { - var meta = useChecksum ? me._getMetaForFileUsingCheckSum( cacheEntry ) : me._getMetaForFileUsingMtimeAndSize( cacheEntry ); - cache.setKey( entryName, meta ); + var meta = useChecksum + ? me._getMetaForFileUsingCheckSum(cacheEntry) + : me._getMetaForFileUsingMtimeAndSize(cacheEntry); + cache.setKey(entryName, meta); } catch (err) { // if the file does not exists we don't save it // other errors are just thrown - if ( err.code !== 'ENOENT' ) { + if (err.code !== 'ENOENT') { throw err; } } - } ); + }); - cache.save( noPrune ); - } + cache.save(noPrune); + }, }; - } + }, }; diff --git a/tools/node_modules/eslint/node_modules/file-entry-cache/changelog.md b/tools/node_modules/eslint/node_modules/file-entry-cache/changelog.md index 52a86428d38980..deb47ec38c2016 100644 --- a/tools/node_modules/eslint/node_modules/file-entry-cache/changelog.md +++ b/tools/node_modules/eslint/node_modules/file-entry-cache/changelog.md @@ -1,14 +1,28 @@ # file-entry-cache - Changelog +## v6.0.0 +- **Refactoring** + - Align file-entry-cache with latest eslint - [4c6f1fb]( https://github.com/royriojas/file-entry-cache/commit/4c6f1fb ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 02:43:09 + + + - Upgrade deps - [8ab3257]( https://github.com/royriojas/file-entry-cache/commit/8ab3257 ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 02:41:53 + + + - updated packages - [3dd4231]( https://github.com/royriojas/file-entry-cache/commit/3dd4231 ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 02:29:37 + + + - Upgrade flat-cache to version 3 - [d7c60ef]( https://github.com/royriojas/file-entry-cache/commit/d7c60ef ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 01:18:04 + + ## v5.0.1 - **Bug Fixes** - - Fix missing checksum comparison from reconcile since now we use mtime and size by default. - [e858aa9]( https://github.com/royriojas/file-entry-cache/commit/e858aa9 ), [Roy Riojas](https://github.com/Roy Riojas), 04/02/2019 12:30:22 + - Fix missing checksum comparison from reconcile since now we use mtime and size by default. - [e858aa9]( https://github.com/royriojas/file-entry-cache/commit/e858aa9 ), [Roy Riojas](https://github.com/Roy Riojas), 04/02/2019 09:30:22 Old mode using checkSum can still be used by passing the `useCheckSum` parameter to the `create` or `createFromFile` methods. ## v5.0.0 - **Refactoring** - - Make checksum comparison optional - [b0f9ae0]( https://github.com/royriojas/file-entry-cache/commit/b0f9ae0 ), [Roy Riojas](https://github.com/Roy Riojas), 03/02/2019 21:17:39 + - Make checksum comparison optional - [b0f9ae0]( https://github.com/royriojas/file-entry-cache/commit/b0f9ae0 ), [Roy Riojas](https://github.com/Roy Riojas), 03/02/2019 18:17:39 To determine if a file has changed we were using the checksum in the newer versions, but eslint was relying on the old behavior where we use the mtime and file size to determine if a file changed. That's why we decided to make the checksum check optional. @@ -22,120 +36,120 @@ ## v4.0.0 - **Build Scripts Changes** - - use the same node versions eslint use - [563cfee]( https://github.com/royriojas/file-entry-cache/commit/563cfee ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 23:29:34 + - use the same node versions eslint use - [563cfee]( https://github.com/royriojas/file-entry-cache/commit/563cfee ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 20:29:34 - **Other changes** - - Remove object-assign dependency. - [d0f598e]( https://github.com/royriojas/file-entry-cache/commit/d0f598e ), [Corey Farrell](https://github.com/Corey Farrell), 08/01/2019 23:09:51 + - Remove object-assign dependency. - [d0f598e]( https://github.com/royriojas/file-entry-cache/commit/d0f598e ), [Corey Farrell](https://github.com/Corey Farrell), 08/01/2019 20:09:51 node.js >=4 is required so object-assign is no longer needed, the native Object.assign can be used instead. ## v3.0.0 - **Build Scripts Changes** - - Upgrade flat-cache dep to latest - [078b0df]( https://github.com/royriojas/file-entry-cache/commit/078b0df ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 21:54:40 + - Upgrade flat-cache dep to latest - [078b0df]( https://github.com/royriojas/file-entry-cache/commit/078b0df ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 18:54:40 - - Commit new package-lock.json file - [245fe62]( https://github.com/royriojas/file-entry-cache/commit/245fe62 ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 20:56:21 + - Commit new package-lock.json file - [245fe62]( https://github.com/royriojas/file-entry-cache/commit/245fe62 ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 17:56:21 - **Refactoring** - - add eslintrc file - [6dd32d8]( https://github.com/royriojas/file-entry-cache/commit/6dd32d8 ), [Roy Riojas](https://github.com/Roy Riojas), 22/08/2018 11:58:17 + - add eslintrc file - [6dd32d8]( https://github.com/royriojas/file-entry-cache/commit/6dd32d8 ), [Roy Riojas](https://github.com/Roy Riojas), 22/08/2018 09:58:17 - **Other changes** - - Move variable definition out of else block - [ea05441]( https://github.com/royriojas/file-entry-cache/commit/ea05441 ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 25/04/2017 13:19:00 + - Move variable definition out of else block - [ea05441]( https://github.com/royriojas/file-entry-cache/commit/ea05441 ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 25/04/2017 11:19:00 - - Add script and cmd to test hash/checksum performance - [7f60e0a]( https://github.com/royriojas/file-entry-cache/commit/7f60e0a ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 24/04/2017 16:43:12 + - Add script and cmd to test hash/checksum performance - [7f60e0a]( https://github.com/royriojas/file-entry-cache/commit/7f60e0a ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 24/04/2017 14:43:12 - - Calculate md5 hexdigest instead of Adler-32 checksum - [f9e5c69]( https://github.com/royriojas/file-entry-cache/commit/f9e5c69 ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 24/04/2017 16:43:12 + - Calculate md5 hexdigest instead of Adler-32 checksum - [f9e5c69]( https://github.com/royriojas/file-entry-cache/commit/f9e5c69 ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 24/04/2017 14:43:12 - - How to reproduce - [4edc2dc]( https://github.com/royriojas/file-entry-cache/commit/4edc2dc ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 24/04/2017 15:49:32 + - How to reproduce - [4edc2dc]( https://github.com/royriojas/file-entry-cache/commit/4edc2dc ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 24/04/2017 13:49:32 - - Test handling of removed files - [09d9ec5]( https://github.com/royriojas/file-entry-cache/commit/09d9ec5 ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 19/04/2017 21:51:50 + - Test handling of removed files - [09d9ec5]( https://github.com/royriojas/file-entry-cache/commit/09d9ec5 ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 19/04/2017 19:51:50 - - Use content checksum instead of mtime and fsize - [343b340]( https://github.com/royriojas/file-entry-cache/commit/343b340 ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 19/04/2017 21:51:47 + - Use content checksum instead of mtime and fsize - [343b340]( https://github.com/royriojas/file-entry-cache/commit/343b340 ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 19/04/2017 19:51:47 - **Revert** - - Revert "How to reproduce" - [4b4e54a]( https://github.com/royriojas/file-entry-cache/commit/4b4e54a ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 25/04/2017 13:15:36 + - Revert "How to reproduce" - [4b4e54a]( https://github.com/royriojas/file-entry-cache/commit/4b4e54a ), [Zakhar Shapurau](https://github.com/Zakhar Shapurau), 25/04/2017 11:15:36 This reverts commit 4edc2dcec01574247bfc2e0a2fe26527332b7df3. ## v2.0.0 - **Features** - - do not persist and prune removed files from cache. Relates to [#2](https://github.com/royriojas/file-entry-cache/issues/2) - [408374d]( https://github.com/royriojas/file-entry-cache/commit/408374d ), [Roy Riojas](https://github.com/Roy Riojas), 16/08/2016 15:47:58 + - do not persist and prune removed files from cache. Relates to [#2](https://github.com/royriojas/file-entry-cache/issues/2) - [408374d]( https://github.com/royriojas/file-entry-cache/commit/408374d ), [Roy Riojas](https://github.com/Roy Riojas), 16/08/2016 13:47:58 ## v1.3.1 - **Build Scripts Changes** - - remove older node version - [0a26ac4]( https://github.com/royriojas/file-entry-cache/commit/0a26ac4 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 06:09:17 + - remove older node version - [0a26ac4]( https://github.com/royriojas/file-entry-cache/commit/0a26ac4 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:09:17 ## v1.3.0 - **Features** - - Add an option to not prune non visited keys. Closes [#2](https://github.com/royriojas/file-entry-cache/issues/2) - [b1a64db]( https://github.com/royriojas/file-entry-cache/commit/b1a64db ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 05:52:12 + - Add an option to not prune non visited keys. Closes [#2](https://github.com/royriojas/file-entry-cache/issues/2) - [b1a64db]( https://github.com/royriojas/file-entry-cache/commit/b1a64db ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 03:52:12 ## v1.2.4 - **Enhancements** - - Expose the flat-cache instance - [f34c557]( https://github.com/royriojas/file-entry-cache/commit/f34c557 ), [royriojas](https://github.com/royriojas), 23/09/2015 20:26:33 + - Expose the flat-cache instance - [f34c557]( https://github.com/royriojas/file-entry-cache/commit/f34c557 ), [royriojas](https://github.com/royriojas), 23/09/2015 18:26:33 ## v1.2.3 - **Build Scripts Changes** - - update flat-cache dep - [cc7b9ce]( https://github.com/royriojas/file-entry-cache/commit/cc7b9ce ), [royriojas](https://github.com/royriojas), 11/09/2015 18:04:44 + - update flat-cache dep - [cc7b9ce]( https://github.com/royriojas/file-entry-cache/commit/cc7b9ce ), [royriojas](https://github.com/royriojas), 11/09/2015 16:04:44 ## v1.2.2 - **Build Scripts Changes** - - Add changelogx section to package.json - [a3916ff]( https://github.com/royriojas/file-entry-cache/commit/a3916ff ), [royriojas](https://github.com/royriojas), 11/09/2015 18:00:26 + - Add changelogx section to package.json - [a3916ff]( https://github.com/royriojas/file-entry-cache/commit/a3916ff ), [royriojas](https://github.com/royriojas), 11/09/2015 16:00:26 ## v1.2.1 - **Build Scripts Changes** - - update flat-cache dep - [e49b0d4]( https://github.com/royriojas/file-entry-cache/commit/e49b0d4 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:55:25 + - update flat-cache dep - [e49b0d4]( https://github.com/royriojas/file-entry-cache/commit/e49b0d4 ), [royriojas](https://github.com/royriojas), 11/09/2015 15:55:25 - **Other changes** - - Update dependencies Replaced lodash.assign with smaller object-assign Fixed tests for windows - [0ad3000]( https://github.com/royriojas/file-entry-cache/commit/0ad3000 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 17:44:18 + - Update dependencies Replaced lodash.assign with smaller object-assign Fixed tests for windows - [0ad3000]( https://github.com/royriojas/file-entry-cache/commit/0ad3000 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 15:44:18 ## v1.2.0 - **Features** - - analyzeFiles now returns also the files that were removed - [6ac2431]( https://github.com/royriojas/file-entry-cache/commit/6ac2431 ), [royriojas](https://github.com/royriojas), 04/09/2015 14:40:53 + - analyzeFiles now returns also the files that were removed - [6ac2431]( https://github.com/royriojas/file-entry-cache/commit/6ac2431 ), [royriojas](https://github.com/royriojas), 04/09/2015 12:40:53 ## v1.1.1 - **Features** - - Add method to check if a file hasChanged - [3640e2b]( https://github.com/royriojas/file-entry-cache/commit/3640e2b ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 07:33:32 + - Add method to check if a file hasChanged - [3640e2b]( https://github.com/royriojas/file-entry-cache/commit/3640e2b ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 05:33:32 ## v1.1.0 - **Features** - - Create the cache directly from a file path - [a23de61]( https://github.com/royriojas/file-entry-cache/commit/a23de61 ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 06:41:33 + - Create the cache directly from a file path - [a23de61]( https://github.com/royriojas/file-entry-cache/commit/a23de61 ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 04:41:33 - - Add a method to remove an entry from the filecache - [7af29fc]( https://github.com/royriojas/file-entry-cache/commit/7af29fc ), [Roy Riojas](https://github.com/Roy Riojas), 03/03/2015 02:25:32 + - Add a method to remove an entry from the filecache - [7af29fc]( https://github.com/royriojas/file-entry-cache/commit/7af29fc ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 23:25:32 - - cache module finished - [1f95544]( https://github.com/royriojas/file-entry-cache/commit/1f95544 ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 04:08:08 + - cache module finished - [1f95544]( https://github.com/royriojas/file-entry-cache/commit/1f95544 ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 01:08:08 - **Build Scripts Changes** - - set the version for the first release - [7472eaa]( https://github.com/royriojas/file-entry-cache/commit/7472eaa ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 04:29:54 + - set the version for the first release - [7472eaa]( https://github.com/royriojas/file-entry-cache/commit/7472eaa ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 01:29:54 - **Documentation** - - Updated documentation - [557358f]( https://github.com/royriojas/file-entry-cache/commit/557358f ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 04:29:29 + - Updated documentation - [557358f]( https://github.com/royriojas/file-entry-cache/commit/557358f ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 01:29:29 - **Other changes** - - Initial commit - [3d5f42b]( https://github.com/royriojas/file-entry-cache/commit/3d5f42b ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 00:58:29 + - Initial commit - [3d5f42b]( https://github.com/royriojas/file-entry-cache/commit/3d5f42b ), [Roy Riojas](https://github.com/Roy Riojas), 01/03/2015 21:58:29 diff --git a/tools/node_modules/eslint/node_modules/file-entry-cache/package.json b/tools/node_modules/eslint/node_modules/file-entry-cache/package.json index 9e8eee48a01360..8eb0f05ab8d2ea 100644 --- a/tools/node_modules/eslint/node_modules/file-entry-cache/package.json +++ b/tools/node_modules/eslint/node_modules/file-entry-cache/package.json @@ -20,30 +20,29 @@ "projectName": "file-entry-cache" }, "dependencies": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" }, "deprecated": false, "description": "Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process", "devDependencies": { - "chai": "^3.2.0", - "changelogx": "3.0.0", - "commander": "^2.6.0", - "del": "^2.0.2", - "esbeautifier": "^4.2.11", - "eslinter": "^2.3.3", - "glob-expand": "^0.1.0", - "istanbul": "^0.3.6", - "mocha": "^2.1.0", - "precommit": "^1.1.5", - "prepush": "^3.1.4", - "proxyquire": "^1.3.1", - "sinon": "^1.12.2", - "sinon-chai": "^2.7.0", - "watch-run": "^1.2.1", - "write": "^0.3.1" + "chai": "^4.2.0", + "changelogx": "^5.0.6", + "del": "^6.0.0", + "eslint": "^7.13.0", + "eslint-config-prettier": "^6.15.0", + "eslint-plugin-mocha": "^8.0.0", + "eslint-plugin-prettier": "^3.1.4", + "glob-expand": "^0.2.1", + "istanbul": "^0.4.5", + "mocha": "^8.2.1", + "precommit": "^1.2.2", + "prepush": "^3.1.11", + "prettier": "^2.1.2", + "watch-run": "^1.2.5", + "write": "^2.0.0" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" }, "files": [ "cache.js" @@ -61,33 +60,30 @@ "main": "cache.js", "name": "file-entry-cache", "precommit": [ - "npm run verify" + "npm run eslint --silent" ], "prepush": [ - "npm run verify" + "npm run eslint --silent" ], "repository": { "type": "git", "url": "git+https://github.com/royriojas/file-entry-cache.git" }, "scripts": { - "beautify": "esbeautifier 'cache.js' 'test/**/*.js' 'perf.js'", - "beautify-check": "npm run beautify -- -k", + "autofix": "npm run eslint -- --fix", "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", "changelog": "changelogx -f markdown -o ./changelog.md", "cover": "istanbul cover test/runner.js html text-summary", "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", - "eslint": "eslinter 'cache.js' 'specs/**/*.js' 'perf.js'", + "eslint": "eslint --cache --cache-location=node_modules/.cache/ 'cache.js' 'test/**/*.js' 'perf.js'", "install-hooks": "prepush install && changelogx install-hook && precommit install", - "lint": "npm run beautify && npm run eslint", "perf": "node perf.js", "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", "pre-v": "npm run test", - "test": "npm run verify --silent && mocha -R spec test/specs", - "verify": "npm run beautify-check && npm run eslint", + "test": "npm run eslint --silent && mocha -R spec test/specs", "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" }, - "version": "5.0.1" + "version": "6.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/flat-cache/README.md b/tools/node_modules/eslint/node_modules/flat-cache/README.md index 1bc5d690d1a06f..03e256ac4b5658 100644 --- a/tools/node_modules/eslint/node_modules/flat-cache/README.md +++ b/tools/node_modules/eslint/node_modules/flat-cache/README.md @@ -2,7 +2,7 @@ > A stupidly simple key/value storage using files to persist the data [![NPM Version](http://img.shields.io/npm/v/flat-cache.svg?style=flat)](https://npmjs.org/package/flat-cache) -[![Build Status](http://img.shields.io/travis/royriojas/flat-cache.svg?style=flat)](https://travis-ci.org/royriojas/flat-cache) +[![Build Status](https://api.travis-ci.org/royriojas/flat-cache.svg?branch=master)](https://travis-ci.org/royriojas/flat-cache) ## install diff --git a/tools/node_modules/eslint/node_modules/flat-cache/cache.js b/tools/node_modules/eslint/node_modules/flat-cache/cache.js deleted file mode 100644 index 6331ac7b912e39..00000000000000 --- a/tools/node_modules/eslint/node_modules/flat-cache/cache.js +++ /dev/null @@ -1,197 +0,0 @@ -var path = require( 'path' ); -var fs = require( 'fs' ); -var utils = require( './utils' ); -var del = require( './del' ); -var writeJSON = utils.writeJSON; - -var cache = { - /** - * Load a cache identified by the given Id. If the element does not exists, then initialize an empty - * cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted - * then the cache module directory `./cache` will be used instead - * - * @method load - * @param docId {String} the id of the cache, would also be used as the name of the file cache - * @param [cacheDir] {String} directory for the cache entry - */ - load: function ( docId, cacheDir ) { - var me = this; - - me._visited = { }; - me._persisted = { }; - me._pathToFile = cacheDir ? path.resolve( cacheDir, docId ) : path.resolve( __dirname, './.cache/', docId ); - - if ( fs.existsSync( me._pathToFile ) ) { - me._persisted = utils.tryParse( me._pathToFile, { } ); - } - }, - - /** - * Load the cache from the provided file - * @method loadFile - * @param {String} pathToFile the path to the file containing the info for the cache - */ - loadFile: function ( pathToFile ) { - var me = this; - var dir = path.dirname( pathToFile ); - var fName = path.basename( pathToFile ); - - me.load( fName, dir ); - }, - - /** - * Returns the entire persisted object - * @method all - * @returns {*} - */ - all: function () { - return this._persisted; - }, - - keys: function () { - return Object.keys( this._persisted ); - }, - /** - * sets a key to a given value - * @method setKey - * @param key {string} the key to set - * @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify - */ - setKey: function ( key, value ) { - this._visited[ key ] = true; - this._persisted[ key ] = value; - }, - /** - * remove a given key from the cache - * @method removeKey - * @param key {String} the key to remove from the object - */ - removeKey: function ( key ) { - delete this._visited[ key ]; // esfmt-ignore-line - delete this._persisted[ key ]; // esfmt-ignore-line - }, - /** - * Return the value of the provided key - * @method getKey - * @param key {String} the name of the key to retrieve - * @returns {*} the value from the key - */ - getKey: function ( key ) { - this._visited[ key ] = true; - return this._persisted[ key ]; - }, - - /** - * Remove keys that were not accessed/set since the - * last time the `prune` method was called. - * @method _prune - * @private - */ - _prune: function () { - var me = this; - var obj = { }; - - var keys = Object.keys( me._visited ); - - // no keys visited for either get or set value - if ( keys.length === 0 ) { - return; - } - - keys.forEach( function ( key ) { - obj[ key ] = me._persisted[ key ]; - } ); - - me._visited = { }; - me._persisted = obj; - }, - - /** - * Save the state of the cache identified by the docId to disk - * as a JSON structure - * @param [noPrune=false] {Boolean} whether to remove from cache the non visited files - * @method save - */ - save: function ( noPrune ) { - var me = this; - - (!noPrune) && me._prune(); - writeJSON( me._pathToFile, me._persisted ); - }, - - /** - * remove the file where the cache is persisted - * @method removeCacheFile - * @return {Boolean} true or false if the file was successfully deleted - */ - removeCacheFile: function () { - return del( this._pathToFile ); - }, - /** - * Destroy the file cache and cache content. - * @method destroy - */ - destroy: function () { - var me = this; - me._visited = { }; - me._persisted = { }; - - me.removeCacheFile(); - } -}; - -module.exports = { - /** - * Alias for create. Should be considered depreacted. Will be removed in next releases - * - * @method load - * @param docId {String} the id of the cache, would also be used as the name of the file cache - * @param [cacheDir] {String} directory for the cache entry - * @returns {cache} cache instance - */ - load: function ( docId, cacheDir ) { - return this.create( docId, cacheDir ); - }, - - /** - * Load a cache identified by the given Id. If the element does not exists, then initialize an empty - * cache storage. - * - * @method create - * @param docId {String} the id of the cache, would also be used as the name of the file cache - * @param [cacheDir] {String} directory for the cache entry - * @returns {cache} cache instance - */ - create: function ( docId, cacheDir ) { - var obj = Object.create( cache ); - obj.load( docId, cacheDir ); - return obj; - }, - - createFromFile: function ( filePath ) { - var obj = Object.create( cache ); - obj.loadFile( filePath ); - return obj; - }, - /** - * Clear the cache identified by the given id. Caches stored in a different cache directory can be deleted directly - * - * @method clearCache - * @param docId {String} the id of the cache, would also be used as the name of the file cache - * @param cacheDir {String} the directory where the cache file was written - * @returns {Boolean} true if the cache folder was deleted. False otherwise - */ - clearCacheById: function ( docId, cacheDir ) { - var filePath = cacheDir ? path.resolve( cacheDir, docId ) : path.resolve( __dirname, './.cache/', docId ); - return del( filePath ); - }, - /** - * Remove all cache stored in the cache directory - * @method clearAll - * @returns {Boolean} true if the cache folder was deleted. False otherwise - */ - clearAll: function ( cacheDir ) { - var filePath = cacheDir ? path.resolve( cacheDir ) : path.resolve( __dirname, './.cache/' ); - return del( filePath ); - } -}; diff --git a/tools/node_modules/eslint/node_modules/flat-cache/changelog.md b/tools/node_modules/eslint/node_modules/flat-cache/changelog.md index 0bdcfd41d3d090..1ad0fdfd0e30a6 100644 --- a/tools/node_modules/eslint/node_modules/flat-cache/changelog.md +++ b/tools/node_modules/eslint/node_modules/flat-cache/changelog.md @@ -1,23 +1,113 @@ # flat-cache - Changelog +## v3.0.4 +- **Refactoring** + - add files by name to the list of exported files - [89a2698]( https://github.com/royriojas/flat-cache/commit/89a2698 ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 02:35:39 + + +## v3.0.3 +- **Bug Fixes** + - Fix wrong eslint command - [f268e42]( https://github.com/royriojas/flat-cache/commit/f268e42 ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 02:15:04 + + +## v3.0.2 +- **Refactoring** + - Update the files paths - [6983a80]( https://github.com/royriojas/flat-cache/commit/6983a80 ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 01:58:39 + + + - Move code to src/ - [18ed6e8]( https://github.com/royriojas/flat-cache/commit/18ed6e8 ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 01:57:17 + + + - Change eslint-cache location - [beed74c]( https://github.com/royriojas/flat-cache/commit/beed74c ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 01:48:32 + + +## v3.0.1 +- **Refactoring** + - Remove unused deps - [8c6d9dc]( https://github.com/royriojas/flat-cache/commit/8c6d9dc ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 01:43:29 + + +## v3.0.0 +- **Refactoring** + - Fix engines - [52b824c]( https://github.com/royriojas/flat-cache/commit/52b824c ), [Roy Riojas](https://github.com/Roy Riojas), 08/11/2020 01:01:52 + + +- **Other changes** + - Replace write with combination of mkdir and writeFile ([#49](https://github.com/royriojas/flat-cache/issues/49)) - [ef48276]( https://github.com/royriojas/flat-cache/commit/ef48276 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 08/11/2020 00:17:15 + + Node v10 introduced a great "recursive" option for mkdir which allows to + get rid from mkdirp package and easily rewrite "write" package usage + with two function calls. + + https://nodejs.org/api/fs.html#fs_fs_mkdir_path_options_callback + - Added a testcase for clearAll ([#48](https://github.com/royriojas/flat-cache/issues/48)) - [45b51ca]( https://github.com/royriojas/flat-cache/commit/45b51ca ), [Aaron Chen](https://github.com/Aaron Chen), 21/05/2020 08:40:03 + + + - requet node>=10 - [a5c482c]( https://github.com/royriojas/flat-cache/commit/a5c482c ), [yumetodo](https://github.com/yumetodo), 10/04/2020 23:14:53 + + thanks @SuperITMan + + - Update README.md - [29fe40b]( https://github.com/royriojas/flat-cache/commit/29fe40b ), [Roy Riojas](https://github.com/Roy Riojas), 10/04/2020 20:08:05 + + + - reduce vulnerability to 1 - [e9db1b2]( https://github.com/royriojas/flat-cache/commit/e9db1b2 ), [yumetodo](https://github.com/yumetodo), 30/03/2020 11:10:43 + + + - reduce vulnerabilities dependencies to 8 - [b58d196]( https://github.com/royriojas/flat-cache/commit/b58d196 ), [yumetodo](https://github.com/yumetodo), 30/03/2020 10:54:56 + + + - use prettier instead of esbeautifier - [03b1db7]( https://github.com/royriojas/flat-cache/commit/03b1db7 ), [yumetodo](https://github.com/yumetodo), 30/03/2020 10:27:14 + + + - update proxyquire - [c2f048d]( https://github.com/royriojas/flat-cache/commit/c2f048d ), [yumetodo](https://github.com/yumetodo), 30/03/2020 10:16:16 + + + - update flatted and mocha - [a0e56da]( https://github.com/royriojas/flat-cache/commit/a0e56da ), [yumetodo](https://github.com/yumetodo), 30/03/2020 09:46:45 + + mocha > mkdirp is updated + istanble >>> optimist > minimist is not updated + + - drop support node.js < 10 in develop - [beba691]( https://github.com/royriojas/flat-cache/commit/beba691 ), [yumetodo](https://github.com/yumetodo), 18/03/2020 01:31:09 + + see mkdirp + + - npm aufit fix(still remains) - [ce166cb]( https://github.com/royriojas/flat-cache/commit/ce166cb ), [yumetodo](https://github.com/yumetodo), 18/03/2020 01:18:08 + + 37 vulnerabilities required manual review and could not be updated + + - updtate sinon - [9f2d1b6]( https://github.com/royriojas/flat-cache/commit/9f2d1b6 ), [yumetodo](https://github.com/yumetodo), 18/03/2020 01:17:51 + + + - apply eslint-plugin-mocha - [07343b5]( https://github.com/royriojas/flat-cache/commit/07343b5 ), [yumetodo](https://github.com/yumetodo), 13/03/2020 22:17:21 + + + - Less strint version check ([#44](https://github.com/royriojas/flat-cache/issues/44)) - [92aca1c]( https://github.com/royriojas/flat-cache/commit/92aca1c ), [Wojciech Maj](https://github.com/Wojciech Maj), 13/11/2019 16:18:25 + + * Use ^ version matching for production dependencies + + * Run npm audit fix + +- **Bug Fixes** + - update dependencies and use eslint directly - [73fbed2]( https://github.com/royriojas/flat-cache/commit/73fbed2 ), [yumetodo](https://github.com/yumetodo), 18/03/2020 01:17:27 + + ## v2.0.1 - **Refactoring** - - upgrade node modules to latest versions - [6402ed3]( https://github.com/royriojas/flat-cache/commit/6402ed3 ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 21:47:05 + - upgrade node modules to latest versions - [6402ed3]( https://github.com/royriojas/flat-cache/commit/6402ed3 ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 18:47:05 ## v2.0.0 - **Bug Fixes** - - upgrade package.json lock file - [8d21c7b]( https://github.com/royriojas/flat-cache/commit/8d21c7b ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 20:03:13 + - upgrade package.json lock file - [8d21c7b]( https://github.com/royriojas/flat-cache/commit/8d21c7b ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 17:03:13 - - Use the same versions of node_js that eslint use - [8d23379]( https://github.com/royriojas/flat-cache/commit/8d23379 ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 19:25:11 + - Use the same versions of node_js that eslint use - [8d23379]( https://github.com/royriojas/flat-cache/commit/8d23379 ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 16:25:11 - **Other changes** - - Replace circular-json with flatted ([#36](https://github.com/royriojas/flat-cache/issues/36)) - [b93aced]( https://github.com/royriojas/flat-cache/commit/b93aced ), [C. K. Tang](https://github.com/C. K. Tang), 08/01/2019 20:03:01 + - Replace circular-json with flatted ([#36](https://github.com/royriojas/flat-cache/issues/36)) - [b93aced]( https://github.com/royriojas/flat-cache/commit/b93aced ), [C. K. Tang](https://github.com/C. K. Tang), 08/01/2019 17:03:01 - - Change JSON parser from circular-json to flatted & 1 more changes ([#37](https://github.com/royriojas/flat-cache/issues/37)) - [745e65a]( https://github.com/royriojas/flat-cache/commit/745e65a ), [Andy Chen](https://github.com/Andy Chen), 08/01/2019 19:17:20 + - Change JSON parser from circular-json to flatted & 1 more changes ([#37](https://github.com/royriojas/flat-cache/issues/37)) - [745e65a]( https://github.com/royriojas/flat-cache/commit/745e65a ), [Andy Chen](https://github.com/Andy Chen), 08/01/2019 16:17:20 * Change JSON parser from circular-json to flatted & 1 more changes @@ -37,16 +127,16 @@ ## v1.3.4 - **Refactoring** - - Add del.js and utils.js to the list of files to be beautified - [9d0ca9b]( https://github.com/royriojas/flat-cache/commit/9d0ca9b ), [Roy Riojas](https://github.com/Roy Riojas), 14/11/2018 15:19:02 + - Add del.js and utils.js to the list of files to be beautified - [9d0ca9b]( https://github.com/royriojas/flat-cache/commit/9d0ca9b ), [Roy Riojas](https://github.com/Roy Riojas), 14/11/2018 12:19:02 ## v1.3.3 - **Refactoring** - - Make sure package-lock.json is up to date - [a7d2598]( https://github.com/royriojas/flat-cache/commit/a7d2598 ), [Roy Riojas](https://github.com/Roy Riojas), 14/11/2018 14:36:08 + - Make sure package-lock.json is up to date - [a7d2598]( https://github.com/royriojas/flat-cache/commit/a7d2598 ), [Roy Riojas](https://github.com/Roy Riojas), 14/11/2018 11:36:08 - **Other changes** - - Removed the need for del ([#33](https://github.com/royriojas/flat-cache/issues/33)) - [c429012]( https://github.com/royriojas/flat-cache/commit/c429012 ), [S. Gilroy](https://github.com/S. Gilroy), 13/11/2018 16:56:37 + - Removed the need for del ([#33](https://github.com/royriojas/flat-cache/issues/33)) - [c429012]( https://github.com/royriojas/flat-cache/commit/c429012 ), [S. Gilroy](https://github.com/S. Gilroy), 13/11/2018 13:56:37 * Removed the need for del @@ -62,30 +152,30 @@ ## v1.3.2 - **Refactoring** - - remove yarn.lock file - [704c6c4]( https://github.com/royriojas/flat-cache/commit/704c6c4 ), [Roy Riojas](https://github.com/Roy Riojas), 07/11/2018 18:41:08 + - remove yarn.lock file - [704c6c4]( https://github.com/royriojas/flat-cache/commit/704c6c4 ), [Roy Riojas](https://github.com/Roy Riojas), 07/11/2018 15:41:08 -- **undefined** - - replace circular-json with flatted ([#23](https://github.com/royriojas/flat-cache/issues/23))" - [db12d74]( https://github.com/royriojas/flat-cache/commit/db12d74 ), [Roy Riojas](https://github.com/Roy Riojas), 07/11/2018 18:40:39 +- **Other changes** + - replace circular-json with flatted ([#23](https://github.com/royriojas/flat-cache/issues/23))" - [db12d74]( https://github.com/royriojas/flat-cache/commit/db12d74 ), [Roy Riojas](https://github.com/Roy Riojas), 07/11/2018 15:40:39 This reverts commit 00f689277a75e85fef28e6a048fad227afc525e6. ## v1.3.1 - **Refactoring** - - upgrade deps to remove some security warnings - [f405719]( https://github.com/royriojas/flat-cache/commit/f405719 ), [Roy Riojas](https://github.com/Roy Riojas), 06/11/2018 15:07:31 + - upgrade deps to remove some security warnings - [f405719]( https://github.com/royriojas/flat-cache/commit/f405719 ), [Roy Riojas](https://github.com/Roy Riojas), 06/11/2018 12:07:31 - **Bug Fixes** - - replace circular-json with flatted ([#23](https://github.com/royriojas/flat-cache/issues/23)) - [00f6892]( https://github.com/royriojas/flat-cache/commit/00f6892 ), [Terry](https://github.com/Terry), 05/11/2018 21:44:16 + - replace circular-json with flatted ([#23](https://github.com/royriojas/flat-cache/issues/23)) - [00f6892]( https://github.com/royriojas/flat-cache/commit/00f6892 ), [Terry](https://github.com/Terry), 05/11/2018 18:44:16 -- **undefined** - - update del to v3.0.0 ([#26](https://github.com/royriojas/flat-cache/issues/26)) - [d42883f]( https://github.com/royriojas/flat-cache/commit/d42883f ), [Patrick Silva](https://github.com/Patrick Silva), 03/11/2018 03:00:44 +- **Other changes** + - update del to v3.0.0 ([#26](https://github.com/royriojas/flat-cache/issues/26)) - [d42883f]( https://github.com/royriojas/flat-cache/commit/d42883f ), [Patrick Silva](https://github.com/Patrick Silva), 03/11/2018 01:00:44 Closes #25 ## v1.3.0 - **Other changes** - - Added #all method ([#16](https://github.com/royriojas/flat-cache/issues/16)) - [12293be]( https://github.com/royriojas/flat-cache/commit/12293be ), [Ozair Patel](https://github.com/Ozair Patel), 25/09/2017 16:46:38 + - Added #all method ([#16](https://github.com/royriojas/flat-cache/issues/16)) - [12293be]( https://github.com/royriojas/flat-cache/commit/12293be ), [Ozair Patel](https://github.com/Ozair Patel), 25/09/2017 14:46:38 * Added #all method @@ -99,12 +189,12 @@ * Beautified file - - fix changelog title style ([#14](https://github.com/royriojas/flat-cache/issues/14)) - [af8338a]( https://github.com/royriojas/flat-cache/commit/af8338a ), [前端小武](https://github.com/前端小武), 19/12/2016 23:34:48 + - fix changelog title style ([#14](https://github.com/royriojas/flat-cache/issues/14)) - [af8338a]( https://github.com/royriojas/flat-cache/commit/af8338a ), [前端小武](https://github.com/前端小武), 19/12/2016 20:34:48 ## v1.2.2 - **Bug Fixes** - - Do not crash if cache file is invalid JSON. ([#13](https://github.com/royriojas/flat-cache/issues/13)) - [87beaa6]( https://github.com/royriojas/flat-cache/commit/87beaa6 ), [Roy Riojas](https://github.com/Roy Riojas), 19/12/2016 21:03:35 + - Do not crash if cache file is invalid JSON. ([#13](https://github.com/royriojas/flat-cache/issues/13)) - [87beaa6]( https://github.com/royriojas/flat-cache/commit/87beaa6 ), [Roy Riojas](https://github.com/Roy Riojas), 19/12/2016 18:03:35 Fixes #12 @@ -115,186 +205,124 @@ If the cache is somehow not valid the cache will be discarded an a a new cache will be stored instead - **Other changes** - - Added travis ci support for modern node versions ([#11](https://github.com/royriojas/flat-cache/issues/11)) - [1c2b1f7]( https://github.com/royriojas/flat-cache/commit/1c2b1f7 ), [Amila Welihinda](https://github.com/Amila Welihinda), 11/11/2016 02:47:52 + - Added travis ci support for modern node versions ([#11](https://github.com/royriojas/flat-cache/issues/11)) - [1c2b1f7]( https://github.com/royriojas/flat-cache/commit/1c2b1f7 ), [Amila Welihinda](https://github.com/Amila Welihinda), 10/11/2016 23:47:52 - - Bumping `circular-son` version ([#10](https://github.com/royriojas/flat-cache/issues/10)) - [4d5e861]( https://github.com/royriojas/flat-cache/commit/4d5e861 ), [Andrea Giammarchi](https://github.com/Andrea Giammarchi), 02/08/2016 09:13:52 + - Bumping `circular-son` version ([#10](https://github.com/royriojas/flat-cache/issues/10)) - [4d5e861]( https://github.com/royriojas/flat-cache/commit/4d5e861 ), [Andrea Giammarchi](https://github.com/Andrea Giammarchi), 02/08/2016 07:13:52 As mentioned in https://github.com/WebReflection/circular-json/issues/25 `circular-json` wan't rightly implementing the license field. Latest version bump changed only that bit so that ESLint should now be happy. ## v1.2.1 - **Bug Fixes** - - Add missing utils.js file to the package. closes [#8](https://github.com/royriojas/flat-cache/issues/8) - [ec10cf2]( https://github.com/royriojas/flat-cache/commit/ec10cf2 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:18:57 + - Add missing utils.js file to the package. closes [#8](https://github.com/royriojas/flat-cache/issues/8) - [ec10cf2]( https://github.com/royriojas/flat-cache/commit/ec10cf2 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 02:18:57 ## v1.2.0 - **Documentation** - - Add documentation about noPrune option - [23e11f9]( https://github.com/royriojas/flat-cache/commit/23e11f9 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:06:49 + - Add documentation about noPrune option - [23e11f9]( https://github.com/royriojas/flat-cache/commit/23e11f9 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 02:06:49 -## v1.1.0 +## v1.0.11 - **Features** - - Add noPrune option to cache.save() method. closes [#7](https://github.com/royriojas/flat-cache/issues/7) - [2c8016a]( https://github.com/royriojas/flat-cache/commit/2c8016a ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:00:29 + - Add noPrune option to cache.save() method. closes [#7](https://github.com/royriojas/flat-cache/issues/7) - [2c8016a]( https://github.com/royriojas/flat-cache/commit/2c8016a ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 02:00:29 - - Add json read and write utility based on circular-json - [c31081e]( https://github.com/royriojas/flat-cache/commit/c31081e ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:58:17 + - Add json read and write utility based on circular-json - [c31081e]( https://github.com/royriojas/flat-cache/commit/c31081e ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 08:58:17 - **Bug Fixes** - - Remove UTF16 BOM stripping - [4a41e22]( https://github.com/royriojas/flat-cache/commit/4a41e22 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 04:18:06 + - Remove UTF16 BOM stripping - [4a41e22]( https://github.com/royriojas/flat-cache/commit/4a41e22 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 02:18:06 Since we control both writing and reading of JSON stream, there no needs to handle unicode BOM. - - Use circular-json to handle circular references (fix [#5](https://github.com/royriojas/flat-cache/issues/5)) - [cd7aeed]( https://github.com/royriojas/flat-cache/commit/cd7aeed ), [Jean Ponchon](https://github.com/Jean Ponchon), 25/07/2016 13:11:59 + - Use circular-json to handle circular references (fix [#5](https://github.com/royriojas/flat-cache/issues/5)) - [cd7aeed]( https://github.com/royriojas/flat-cache/commit/cd7aeed ), [Jean Ponchon](https://github.com/Jean Ponchon), 25/07/2016 11:11:59 - **Tests Related fixes** - - Add missing file from eslint test - [d6fa3c3]( https://github.com/royriojas/flat-cache/commit/d6fa3c3 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 04:15:51 + - Add missing file from eslint test - [d6fa3c3]( https://github.com/royriojas/flat-cache/commit/d6fa3c3 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 02:15:51 - - Add test for circular json serialization / deserialization - [07d2ddd]( https://github.com/royriojas/flat-cache/commit/07d2ddd ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:59:36 + - Add test for circular json serialization / deserialization - [07d2ddd]( https://github.com/royriojas/flat-cache/commit/07d2ddd ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 08:59:36 - **Refactoring** - - Remove unused read-json-sync - [2be1c24]( https://github.com/royriojas/flat-cache/commit/2be1c24 ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:59:18 + - Remove unused read-json-sync - [2be1c24]( https://github.com/royriojas/flat-cache/commit/2be1c24 ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 08:59:18 - **Build Scripts Changes** - - travis tests on 0.12 and 4x - [3a613fd]( https://github.com/royriojas/flat-cache/commit/3a613fd ), [royriojas](https://github.com/royriojas), 15/11/2015 17:34:40 + - travis tests on 0.12 and 4x - [3a613fd]( https://github.com/royriojas/flat-cache/commit/3a613fd ), [royriojas](https://github.com/royriojas), 15/11/2015 14:34:40 - - add eslint-fix task - [fd29e52]( https://github.com/royriojas/flat-cache/commit/fd29e52 ), [royriojas](https://github.com/royriojas), 01/11/2015 18:04:08 +## v1.0.10 +- **Build Scripts Changes** + - add eslint-fix task - [fd29e52]( https://github.com/royriojas/flat-cache/commit/fd29e52 ), [royriojas](https://github.com/royriojas), 01/11/2015 15:04:08 - - make sure the test script also verify beautification and linting of files before running tests - [e94e176]( https://github.com/royriojas/flat-cache/commit/e94e176 ), [royriojas](https://github.com/royriojas), 01/11/2015 14:54:48 + - make sure the test script also verify beautification and linting of files before running tests - [e94e176]( https://github.com/royriojas/flat-cache/commit/e94e176 ), [royriojas](https://github.com/royriojas), 01/11/2015 11:54:48 - **Other changes** - - add clearAll for cacheDir - [97383d9]( https://github.com/royriojas/flat-cache/commit/97383d9 ), [xieyaowu](https://github.com/xieyaowu), 31/10/2015 23:02:18 + - add clearAll for cacheDir - [97383d9]( https://github.com/royriojas/flat-cache/commit/97383d9 ), [xieyaowu](https://github.com/xieyaowu), 31/10/2015 21:02:18 ## v1.0.9 - **Bug Fixes** - - wrong default values for changelogx user repo name - [7bb52d1]( https://github.com/royriojas/flat-cache/commit/7bb52d1 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:59:30 + - wrong default values for changelogx user repo name - [7bb52d1]( https://github.com/royriojas/flat-cache/commit/7bb52d1 ), [royriojas](https://github.com/royriojas), 11/09/2015 15:59:30 ## v1.0.8 - **Build Scripts Changes** - - test against node 4 - [c395b66]( https://github.com/royriojas/flat-cache/commit/c395b66 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:51:39 + - test against node 4 - [c395b66]( https://github.com/royriojas/flat-cache/commit/c395b66 ), [royriojas](https://github.com/royriojas), 11/09/2015 15:51:39 ## v1.0.7 - **Other changes** - - Move dependencies into devDep - [7e47099]( https://github.com/royriojas/flat-cache/commit/7e47099 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 17:10:57 + - Move dependencies into devDep - [7e47099]( https://github.com/royriojas/flat-cache/commit/7e47099 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 15:10:57 - **Documentation** - - Add missing changelog link - [f51197a]( https://github.com/royriojas/flat-cache/commit/f51197a ), [royriojas](https://github.com/royriojas), 11/09/2015 16:48:05 + - Add missing changelog link - [f51197a]( https://github.com/royriojas/flat-cache/commit/f51197a ), [royriojas](https://github.com/royriojas), 11/09/2015 14:48:05 ## v1.0.6 - **Build Scripts Changes** - - Add helpers/code check scripts - [bdb82f3]( https://github.com/royriojas/flat-cache/commit/bdb82f3 ), [royriojas](https://github.com/royriojas), 11/09/2015 16:44:31 + - Add helpers/code check scripts - [bdb82f3]( https://github.com/royriojas/flat-cache/commit/bdb82f3 ), [royriojas](https://github.com/royriojas), 11/09/2015 14:44:31 ## v1.0.5 - **Documentation** - - better description for the module - [436817f]( https://github.com/royriojas/flat-cache/commit/436817f ), [royriojas](https://github.com/royriojas), 11/09/2015 16:35:33 + - better description for the module - [436817f]( https://github.com/royriojas/flat-cache/commit/436817f ), [royriojas](https://github.com/royriojas), 11/09/2015 14:35:33 - **Other changes** - - Update dependencies - [be88aa3]( https://github.com/royriojas/flat-cache/commit/be88aa3 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 15:47:41 - - -## v1.0.11 -- **Features** - - Add noPrune option to cache.save() method. closes [#7](https://github.com/royriojas/flat-cache/issues/7) - [2c8016a]( https://github.com/royriojas/flat-cache/commit/2c8016a ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:00:29 - - - - Add json read and write utility based on circular-json - [c31081e]( https://github.com/royriojas/flat-cache/commit/c31081e ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:58:17 - - -- **Bug Fixes** - - Remove UTF16 BOM stripping - [4a41e22]( https://github.com/royriojas/flat-cache/commit/4a41e22 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 04:18:06 - - Since we control both writing and reading of JSON stream, there no needs - to handle unicode BOM. - - Use circular-json to handle circular references (fix [#5](https://github.com/royriojas/flat-cache/issues/5)) - [cd7aeed]( https://github.com/royriojas/flat-cache/commit/cd7aeed ), [Jean Ponchon](https://github.com/Jean Ponchon), 25/07/2016 13:11:59 - - -- **Tests Related fixes** - - Add missing file from eslint test - [d6fa3c3]( https://github.com/royriojas/flat-cache/commit/d6fa3c3 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 04:15:51 - - - - Add test for circular json serialization / deserialization - [07d2ddd]( https://github.com/royriojas/flat-cache/commit/07d2ddd ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:59:36 + - Update dependencies - [be88aa3]( https://github.com/royriojas/flat-cache/commit/be88aa3 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 13:47:41 +## v1.0.4 - **Refactoring** - - Remove unused read-json-sync - [2be1c24]( https://github.com/royriojas/flat-cache/commit/2be1c24 ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:59:18 - - -- **Build Scripts Changes** - - travis tests on 0.12 and 4x - [3a613fd]( https://github.com/royriojas/flat-cache/commit/3a613fd ), [royriojas](https://github.com/royriojas), 15/11/2015 17:34:40 - - -## v1.0.10 -- **Build Scripts Changes** - - add eslint-fix task - [fd29e52]( https://github.com/royriojas/flat-cache/commit/fd29e52 ), [royriojas](https://github.com/royriojas), 01/11/2015 18:04:08 - - - - make sure the test script also verify beautification and linting of files before running tests - [e94e176]( https://github.com/royriojas/flat-cache/commit/e94e176 ), [royriojas](https://github.com/royriojas), 01/11/2015 14:54:48 - - - - test against node 4 - [c395b66]( https://github.com/royriojas/flat-cache/commit/c395b66 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:51:39 - - - - Add helpers/code check scripts - [bdb82f3]( https://github.com/royriojas/flat-cache/commit/bdb82f3 ), [royriojas](https://github.com/royriojas), 11/09/2015 16:44:31 - - -- **Other changes** - - add clearAll for cacheDir - [97383d9]( https://github.com/royriojas/flat-cache/commit/97383d9 ), [xieyaowu](https://github.com/xieyaowu), 31/10/2015 23:02:18 - - - - Move dependencies into devDep - [7e47099]( https://github.com/royriojas/flat-cache/commit/7e47099 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 17:10:57 - - - - Update dependencies - [be88aa3]( https://github.com/royriojas/flat-cache/commit/be88aa3 ), [Bogdan Chadkin](https://github.com/Bogdan Chadkin), 11/09/2015 15:47:41 - - -- **Bug Fixes** - - wrong default values for changelogx user repo name - [7bb52d1]( https://github.com/royriojas/flat-cache/commit/7bb52d1 ), [royriojas](https://github.com/royriojas), 11/09/2015 17:59:30 + - load a cache file using the full filepath - [b8f68c2]( https://github.com/royriojas/flat-cache/commit/b8f68c2 ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 04:19:14 - **Documentation** - - Add missing changelog link - [f51197a]( https://github.com/royriojas/flat-cache/commit/f51197a ), [royriojas](https://github.com/royriojas), 11/09/2015 16:48:05 - - - - better description for the module - [436817f]( https://github.com/royriojas/flat-cache/commit/436817f ), [royriojas](https://github.com/royriojas), 11/09/2015 16:35:33 - - - - Add documentation about `clearAll` and `clearCacheById` - [13947c1]( https://github.com/royriojas/flat-cache/commit/13947c1 ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 02:44:05 - - -- **Refactoring** - - load a cache file using the full filepath - [b8f68c2]( https://github.com/royriojas/flat-cache/commit/b8f68c2 ), [Roy Riojas](https://github.com/Roy Riojas), 30/08/2015 06:19:14 + - Add documentation about `clearAll` and `clearCacheById` - [13947c1]( https://github.com/royriojas/flat-cache/commit/13947c1 ), [Roy Riojas](https://github.com/Roy Riojas), 01/03/2015 23:44:05 - **Features** - - Add methods to remove the cache documents created - [af40443]( https://github.com/royriojas/flat-cache/commit/af40443 ), [Roy Riojas](https://github.com/Roy Riojas), 02/03/2015 02:39:27 + - Add methods to remove the cache documents created - [af40443]( https://github.com/royriojas/flat-cache/commit/af40443 ), [Roy Riojas](https://github.com/Roy Riojas), 01/03/2015 23:39:27 ## v1.0.1 - **Other changes** - - Update README.md - [c2b6805]( https://github.com/royriojas/flat-cache/commit/c2b6805 ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 07:28:07 + - Update README.md - [c2b6805]( https://github.com/royriojas/flat-cache/commit/c2b6805 ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 04:28:07 ## v1.0.0 - **Refactoring** - - flat-cache v.1.0.0 - [c984274]( https://github.com/royriojas/flat-cache/commit/c984274 ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 07:11:50 + - flat-cache v.1.0.0 - [c984274]( https://github.com/royriojas/flat-cache/commit/c984274 ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 04:11:50 - **Other changes** - - Initial commit - [d43cccf]( https://github.com/royriojas/flat-cache/commit/d43cccf ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 04:12:16 + - Initial commit - [d43cccf]( https://github.com/royriojas/flat-cache/commit/d43cccf ), [Roy Riojas](https://github.com/Roy Riojas), 26/02/2015 01:12:16 diff --git a/tools/node_modules/eslint/node_modules/flat-cache/del.js b/tools/node_modules/eslint/node_modules/flat-cache/del.js deleted file mode 100644 index c2c553713fdf48..00000000000000 --- a/tools/node_modules/eslint/node_modules/flat-cache/del.js +++ /dev/null @@ -1,13 +0,0 @@ -var rimraf = require( 'rimraf' ).sync; -var fs = require( 'fs' ); - -module.exports = function del( file ) { - if ( fs.existsSync( file ) ) { - //if rimraf doesn't throw then the file has been deleted or didn't exist - rimraf( file, { - glob: false - } ); - return true; - } - return false; -}; diff --git a/tools/node_modules/eslint/node_modules/flat-cache/package.json b/tools/node_modules/eslint/node_modules/flat-cache/package.json index de3dd5b13149fd..a08d68db3dd4f1 100644 --- a/tools/node_modules/eslint/node_modules/flat-cache/package.json +++ b/tools/node_modules/eslint/node_modules/flat-cache/package.json @@ -20,34 +20,33 @@ "projectName": "flat-cache" }, "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "deprecated": false, "description": "A stupidly simple key/value storage using files to persist some data", "devDependencies": { - "chai": "^3.2.0", - "changelogx": "3.0.0", - "esbeautifier": "10.1.1", - "eslinter": "^3.2.1", - "glob-expand": "0.2.1", - "istanbul": "0.4.5", - "mocha": "5.2.0", - "precommit": "^1.1.5", - "prepush": "^3.1.4", - "proxyquire": "^1.7.2", - "sinon": "^1.16.1", - "sinon-chai": "^2.8.0", - "watch-run": "^1.2.2" + "chai": "^4.2.0", + "changelogx": "^5.0.6", + "eslint": "^7.13.0", + "eslint-config-prettier": "^6.15.0", + "eslint-plugin-mocha": "^8.0.0", + "eslint-plugin-prettier": "^3.1.4", + "glob-expand": "^0.2.1", + "istanbul": "^0.4.5", + "mocha": "^8.2.1", + "precommit": "^1.2.2", + "prepush": "^3.1.11", + "prettier": "^2.1.2", + "watch-run": "^1.2.5" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" }, "files": [ - "cache.js", - "utils.js", - "del.js" + "src/cache.js", + "src/del.js", + "src/utils.js" ], "homepage": "https://github.com/royriojas/flat-cache#readme", "keywords": [ @@ -59,7 +58,7 @@ "cache" ], "license": "MIT", - "main": "cache.js", + "main": "src/cache.js", "name": "flat-cache", "precommit": [ "npm run verify --silent" @@ -72,25 +71,23 @@ "url": "git+https://github.com/royriojas/flat-cache.git" }, "scripts": { - "autofix": "npm run beautify && npm run eslint-fix", - "beautify": "esbeautifier 'cache.js' 'utils.js' 'del.js' 'test/specs/**/*.js'", - "beautify-check": "npm run beautify -- -k", + "autofix": "npm run eslint-fix", "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", "changelog": "changelogx -f markdown -o ./changelog.md", - "check": "npm run beautify-check && npm run eslint", + "check": "npm run eslint", "cover": "istanbul cover test/runner.js html text-summary", "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", - "eslint": "eslinter 'cache.js' 'utils.js' 'del.js' 'specs/**/*.js'", + "eslint": "eslint --cache --cache-location=node_modules/.cache/ ./src/**/*.js ./test/**/*.js", "eslint-fix": "npm run eslint -- --fix", "install-hooks": "prepush install && changelogx install-hook && precommit install", "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", "pre-v": "npm run verify", "test": "npm run verify --silent", "test:cache": "mocha -R spec test/specs", - "verify": "npm run check && npm run test:cache", + "verify": "npm run eslint && npm run test:cache", "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" }, - "version": "2.0.1" + "version": "3.0.4" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/flat-cache/src/cache.js b/tools/node_modules/eslint/node_modules/flat-cache/src/cache.js new file mode 100644 index 00000000000000..a58c2874457489 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/flat-cache/src/cache.js @@ -0,0 +1,197 @@ +var path = require('path'); +var fs = require('fs'); +var utils = require('./utils'); +var del = require('./del'); +var writeJSON = utils.writeJSON; + +var cache = { + /** + * Load a cache identified by the given Id. If the element does not exists, then initialize an empty + * cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted + * then the cache module directory `./cache` will be used instead + * + * @method load + * @param docId {String} the id of the cache, would also be used as the name of the file cache + * @param [cacheDir] {String} directory for the cache entry + */ + load: function (docId, cacheDir) { + var me = this; + + me._visited = {}; + me._persisted = {}; + me._pathToFile = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, '../.cache/', docId); + + if (fs.existsSync(me._pathToFile)) { + me._persisted = utils.tryParse(me._pathToFile, {}); + } + }, + + /** + * Load the cache from the provided file + * @method loadFile + * @param {String} pathToFile the path to the file containing the info for the cache + */ + loadFile: function (pathToFile) { + var me = this; + var dir = path.dirname(pathToFile); + var fName = path.basename(pathToFile); + + me.load(fName, dir); + }, + + /** + * Returns the entire persisted object + * @method all + * @returns {*} + */ + all: function () { + return this._persisted; + }, + + keys: function () { + return Object.keys(this._persisted); + }, + /** + * sets a key to a given value + * @method setKey + * @param key {string} the key to set + * @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify + */ + setKey: function (key, value) { + this._visited[key] = true; + this._persisted[key] = value; + }, + /** + * remove a given key from the cache + * @method removeKey + * @param key {String} the key to remove from the object + */ + removeKey: function (key) { + delete this._visited[key]; // esfmt-ignore-line + delete this._persisted[key]; // esfmt-ignore-line + }, + /** + * Return the value of the provided key + * @method getKey + * @param key {String} the name of the key to retrieve + * @returns {*} the value from the key + */ + getKey: function (key) { + this._visited[key] = true; + return this._persisted[key]; + }, + + /** + * Remove keys that were not accessed/set since the + * last time the `prune` method was called. + * @method _prune + * @private + */ + _prune: function () { + var me = this; + var obj = {}; + + var keys = Object.keys(me._visited); + + // no keys visited for either get or set value + if (keys.length === 0) { + return; + } + + keys.forEach(function (key) { + obj[key] = me._persisted[key]; + }); + + me._visited = {}; + me._persisted = obj; + }, + + /** + * Save the state of the cache identified by the docId to disk + * as a JSON structure + * @param [noPrune=false] {Boolean} whether to remove from cache the non visited files + * @method save + */ + save: function (noPrune) { + var me = this; + + !noPrune && me._prune(); + writeJSON(me._pathToFile, me._persisted); + }, + + /** + * remove the file where the cache is persisted + * @method removeCacheFile + * @return {Boolean} true or false if the file was successfully deleted + */ + removeCacheFile: function () { + return del(this._pathToFile); + }, + /** + * Destroy the file cache and cache content. + * @method destroy + */ + destroy: function () { + var me = this; + me._visited = {}; + me._persisted = {}; + + me.removeCacheFile(); + }, +}; + +module.exports = { + /** + * Alias for create. Should be considered depreacted. Will be removed in next releases + * + * @method load + * @param docId {String} the id of the cache, would also be used as the name of the file cache + * @param [cacheDir] {String} directory for the cache entry + * @returns {cache} cache instance + */ + load: function (docId, cacheDir) { + return this.create(docId, cacheDir); + }, + + /** + * Load a cache identified by the given Id. If the element does not exists, then initialize an empty + * cache storage. + * + * @method create + * @param docId {String} the id of the cache, would also be used as the name of the file cache + * @param [cacheDir] {String} directory for the cache entry + * @returns {cache} cache instance + */ + create: function (docId, cacheDir) { + var obj = Object.create(cache); + obj.load(docId, cacheDir); + return obj; + }, + + createFromFile: function (filePath) { + var obj = Object.create(cache); + obj.loadFile(filePath); + return obj; + }, + /** + * Clear the cache identified by the given id. Caches stored in a different cache directory can be deleted directly + * + * @method clearCache + * @param docId {String} the id of the cache, would also be used as the name of the file cache + * @param cacheDir {String} the directory where the cache file was written + * @returns {Boolean} true if the cache folder was deleted. False otherwise + */ + clearCacheById: function (docId, cacheDir) { + var filePath = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, '../.cache/', docId); + return del(filePath); + }, + /** + * Remove all cache stored in the cache directory + * @method clearAll + * @returns {Boolean} true if the cache folder was deleted. False otherwise + */ + clearAll: function (cacheDir) { + var filePath = cacheDir ? path.resolve(cacheDir) : path.resolve(__dirname, '../.cache/'); + return del(filePath); + }, +}; diff --git a/tools/node_modules/eslint/node_modules/flat-cache/src/del.js b/tools/node_modules/eslint/node_modules/flat-cache/src/del.js new file mode 100644 index 00000000000000..8908744b89e8df --- /dev/null +++ b/tools/node_modules/eslint/node_modules/flat-cache/src/del.js @@ -0,0 +1,13 @@ +var rimraf = require('rimraf').sync; +var fs = require('fs'); + +module.exports = function del(file) { + if (fs.existsSync(file)) { + //if rimraf doesn't throw then the file has been deleted or didn't exist + rimraf(file, { + glob: false, + }); + return true; + } + return false; +}; diff --git a/tools/node_modules/eslint/node_modules/flat-cache/src/utils.js b/tools/node_modules/eslint/node_modules/flat-cache/src/utils.js new file mode 100644 index 00000000000000..05f5ac385061e2 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/flat-cache/src/utils.js @@ -0,0 +1,44 @@ +var fs = require('fs'); +var path = require('path'); +var flatted = require('flatted'); + +module.exports = { + tryParse: function (filePath, defaultValue) { + var result; + try { + result = this.readJSON(filePath); + } catch (ex) { + result = defaultValue; + } + return result; + }, + + /** + * Read json file synchronously using flatted + * + * @method readJSON + * @param {String} filePath Json filepath + * @returns {*} parse result + */ + readJSON: function (filePath) { + return flatted.parse( + fs.readFileSync(filePath, { + encoding: 'utf8', + }) + ); + }, + + /** + * Write json file synchronously using circular-json + * + * @method writeJSON + * @param {String} filePath Json filepath + * @param {*} data Object to serialize + */ + writeJSON: function (filePath, data) { + fs.mkdirSync(path.dirname(filePath), { + recursive: true, + }); + fs.writeFileSync(filePath, flatted.stringify(data)); + }, +}; diff --git a/tools/node_modules/eslint/node_modules/flat-cache/utils.js b/tools/node_modules/eslint/node_modules/flat-cache/utils.js deleted file mode 100644 index 1c44db9ab505f4..00000000000000 --- a/tools/node_modules/eslint/node_modules/flat-cache/utils.js +++ /dev/null @@ -1,39 +0,0 @@ -var fs = require( 'fs' ); -var write = require( 'write' ); -var flatted = require( 'flatted' ); - -module.exports = { - tryParse: function ( filePath, defaultValue ) { - var result; - try { - result = this.readJSON( filePath ); - } catch (ex) { - result = defaultValue; - } - return result; - }, - - /** - * Read json file synchronously using flatted - * - * @method readJSON - * @param {String} filePath Json filepath - * @returns {*} parse result - */ - readJSON: function ( filePath ) { - return flatted.parse( fs.readFileSync( filePath, { - encoding: 'utf8' - } ) ); - }, - - /** - * Write json file synchronously using circular-json - * - * @method writeJSON - * @param {String} filePath Json filepath - * @param {*} data Object to serialize - */ - writeJSON: function ( filePath, data ) { - write.sync( filePath, flatted.stringify( data ) ); - } -}; diff --git a/tools/node_modules/eslint/node_modules/flatted/LICENSE b/tools/node_modules/eslint/node_modules/flatted/LICENSE index c8508305bdaee0..506dc479c6b348 100644 --- a/tools/node_modules/eslint/node_modules/flatted/LICENSE +++ b/tools/node_modules/eslint/node_modules/flatted/LICENSE @@ -1,6 +1,6 @@ ISC License -Copyright (c) 2018, Andrea Giammarchi, @WebReflection +Copyright (c) 2018-2020, Andrea Giammarchi, @WebReflection Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/tools/node_modules/eslint/node_modules/flatted/README.md b/tools/node_modules/eslint/node_modules/flatted/README.md index 84415933913668..0c1627f7d2dda8 100644 --- a/tools/node_modules/eslint/node_modules/flatted/README.md +++ b/tools/node_modules/eslint/node_modules/flatted/README.md @@ -1,9 +1,15 @@ # flatted -![Downloads](https://img.shields.io/npm/dm/flatted.svg) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/flatted/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/flatted?branch=master) [![Build Status](https://travis-ci.org/WebReflection/flatted.svg?branch=master)](https://travis-ci.org/WebReflection/flatted) [![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](https://opensource.org/licenses/ISC) ![WebReflection status](https://offline.report/status/webreflection.svg) +[![Downloads](https://img.shields.io/npm/dm/flatted.svg)](https://www.npmjs.com/package/flatted) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/flatted/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/flatted?branch=master) [![Build Status](https://travis-ci.org/WebReflection/flatted.svg?branch=master)](https://travis-ci.org/WebReflection/flatted) [![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](https://opensource.org/licenses/ISC) ![WebReflection status](https://offline.report/status/webreflection.svg) + +![snow flake](./flatted.jpg) + +**Social Media Photo by [Matt Seymour](https://unsplash.com/@mattseymour) on [Unsplash](https://unsplash.com/)** A super light (0.5K) and fast circular JSON parser, directly from the creator of [CircularJSON](https://github.com/WebReflection/circular-json/#circularjson). +Now available also for **[PHP](./php/flatted.php)**. + ```js npm i flatted ``` @@ -12,10 +18,10 @@ Usable via [CDN](https://unpkg.com/flatted) or as regular module. ```js // ESM -import {parse, stringify} from 'flatted/esm'; +import {parse, stringify} from 'flatted'; // CJS -const {parse, stringify} = require('flatted/cjs'); +const {parse, stringify} = require('flatted'); const a = [{}]; a[0].a = a; diff --git a/tools/node_modules/eslint/node_modules/flatted/cjs/index.js b/tools/node_modules/eslint/node_modules/flatted/cjs/index.js index a09c80cda7f0ba..ea7ac895154e46 100644 --- a/tools/node_modules/eslint/node_modules/flatted/cjs/index.js +++ b/tools/node_modules/eslint/node_modules/flatted/cjs/index.js @@ -1,114 +1,94 @@ -var Flatted = (function (Primitive, primitive) { +'use strict'; +/*! (c) 2020 Andrea Giammarchi */ - /*! - * ISC License - * - * Copyright (c) 2018, Andrea Giammarchi, @WebReflection - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ +const {parse: $parse, stringify: $stringify} = JSON; +const {keys} = Object; - var Flatted = { +const Primitive = String; // it could be Number +const primitive = 'string'; // it could be 'number' - parse: function parse(text, reviver) { - var input = JSON.parse(text, Primitives).map(primitives); - var value = input[0]; - var $ = reviver || noop; - var tmp = typeof value === 'object' && value ? - revive(input, new Set, value, $) : - value; - return $.call({'': tmp}, '', tmp); - }, +const ignore = {}; +const object = 'object'; - stringify: function stringify(value, replacer, space) { - for (var - firstRun, - known = new Map, - input = [], - output = [], - $ = replacer && typeof replacer === typeof input ? - function (k, v) { - if (k === '' || -1 < replacer.indexOf(k)) return v; - } : - (replacer || noop), - i = +set(known, input, $.call({'': value}, '', value)), - replace = function (key, value) { - if (firstRun) { - firstRun = !firstRun; - return value; - } - var after = $.call(this, key, value); - switch (typeof after) { - case 'object': - if (after === null) return after; - case primitive: - return known.get(after) || set(known, input, after); - } - return after; - }; - i < input.length; i++ - ) { - firstRun = true; - output[i] = JSON.stringify(input[i], replace, space); - } - return '[' + output.join(',') + ']'; - } +const noop = (_, value) => value; - }; +const primitives = value => ( + value instanceof Primitive ? Primitive(value) : value +); - return Flatted; +const Primitives = (_, value) => ( + typeof value === primitive ? new Primitive(value) : value +); - function noop(key, value) { - return value; +const revive = (input, parsed, output, $) => { + const lazy = []; + for (let ke = keys(output), {length} = ke, y = 0; y < length; y++) { + const k = ke[y]; + const value = output[k]; + if (value instanceof Primitive) { + const tmp = input[value]; + if (typeof tmp === object && !parsed.has(tmp)) { + parsed.add(tmp); + output[k] = ignore; + lazy.push({k, a: [input, parsed, tmp, $]}); + } + else + output[k] = $.call(output, k, tmp); + } + else if (output[k] !== ignore) + output[k] = $.call(output, k, value); } - - function revive(input, parsed, output, $) { - return Object.keys(output).reduce( - function (output, key) { - var value = output[key]; - if (value instanceof Primitive) { - var tmp = input[value]; - if (typeof tmp === 'object' && !parsed.has(tmp)) { - parsed.add(tmp); - output[key] = $.call(output, key, revive(input, parsed, tmp, $)); - } else { - output[key] = $.call(output, key, tmp); - } - } else - output[key] = $.call(output, key, value); - return output; - }, - output - ); + for (let {length} = lazy, i = 0; i < length; i++) { + const {k, a} = lazy[i]; + output[k] = $.call(output, k, revive.apply(null, a)); } + return output; +}; - function set(known, input, value) { - var index = Primitive(input.push(value) - 1); - known.set(value, index); - return index; - } +const set = (known, input, value) => { + const index = Primitive(input.push(value) - 1); + known.set(value, index); + return index; +}; - // the two kinds of primitives - // 1. the real one - // 2. the wrapped one +const parse = (text, reviver) => { + const input = $parse(text, Primitives).map(primitives); + const value = input[0]; + const $ = reviver || noop; + const tmp = typeof value === object && value ? + revive(input, new Set, value, $) : + value; + return $.call({'': tmp}, '', tmp); +}; +exports.parse = parse; - function primitives(value) { - return value instanceof Primitive ? Primitive(value) : value; +const stringify = (value, replacer, space) => { + const $ = replacer && typeof replacer === object ? + (k, v) => (k === '' || -1 < replacer.indexOf(k) ? v : void 0) : + (replacer || noop); + const known = new Map; + const input = []; + const output = []; + let i = +set(known, input, $.call({'': value}, '', value)); + let firstRun = !i; + while (i < input.length) { + firstRun = true; + output[i] = $stringify(input[i++], replace, space); } - - function Primitives(key, value) { - return typeof value === primitive ? new Primitive(value) : value; + return '[' + output.join(',') + ']'; + function replace(key, value) { + if (firstRun) { + firstRun = !firstRun; + return value; + } + const after = $.call(this, key, value); + switch (typeof after) { + case object: + if (after === null) return after; + case primitive: + return known.get(after) || set(known, input, after); + } + return after; } - -}(String, 'string')); -module.exports = Flatted; +}; +exports.stringify = stringify; diff --git a/tools/node_modules/eslint/node_modules/flatted/cjs/package.json b/tools/node_modules/eslint/node_modules/flatted/cjs/package.json new file mode 100644 index 00000000000000..0292b9956f2e40 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/flatted/cjs/package.json @@ -0,0 +1 @@ +{"type":"commonjs"} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/flatted/es.js b/tools/node_modules/eslint/node_modules/flatted/es.js new file mode 100644 index 00000000000000..aee7158d2f34f2 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/flatted/es.js @@ -0,0 +1,2 @@ +self.Flatted=function(t){"use strict"; +/*! (c) 2020 Andrea Giammarchi */const{parse:e,stringify:n}=JSON,{keys:r}=Object,s=String,c="string",l={},o="object",a=(t,e)=>e,i=t=>t instanceof s?s(t):t,f=(t,e)=>typeof e===c?new s(e):e,u=(t,e,n,c)=>{const a=[];for(let i=r(n),{length:f}=i,u=0;u{const r=s(e.push(n)-1);return t.set(n,r),r};return t.parse=(t,n)=>{const r=e(t,f).map(i),s=r[0],c=n||a,l=typeof s===o&&s?u(r,new Set,s,c):s;return c.call({"":l},"",l)},t.stringify=(t,e,r)=>{const s=e&&typeof e===o?(t,n)=>""===t||-1 value; - }; +const primitives = value => ( + value instanceof Primitive ? Primitive(value) : value +); - return Flatted; +const Primitives = (_, value) => ( + typeof value === primitive ? new Primitive(value) : value +); - function noop(key, value) { - return value; +const revive = (input, parsed, output, $) => { + const lazy = []; + for (let ke = keys(output), {length} = ke, y = 0; y < length; y++) { + const k = ke[y]; + const value = output[k]; + if (value instanceof Primitive) { + const tmp = input[value]; + if (typeof tmp === object && !parsed.has(tmp)) { + parsed.add(tmp); + output[k] = ignore; + lazy.push({k, a: [input, parsed, tmp, $]}); + } + else + output[k] = $.call(output, k, tmp); + } + else if (output[k] !== ignore) + output[k] = $.call(output, k, value); } - - function revive(input, parsed, output, $) { - return Object.keys(output).reduce( - function (output, key) { - var value = output[key]; - if (value instanceof Primitive) { - var tmp = input[value]; - if (typeof tmp === 'object' && !parsed.has(tmp)) { - parsed.add(tmp); - output[key] = $.call(output, key, revive(input, parsed, tmp, $)); - } else { - output[key] = $.call(output, key, tmp); - } - } else - output[key] = $.call(output, key, value); - return output; - }, - output - ); + for (let {length} = lazy, i = 0; i < length; i++) { + const {k, a} = lazy[i]; + output[k] = $.call(output, k, revive.apply(null, a)); } + return output; +}; - function set(known, input, value) { - var index = Primitive(input.push(value) - 1); - known.set(value, index); - return index; - } +const set = (known, input, value) => { + const index = Primitive(input.push(value) - 1); + known.set(value, index); + return index; +}; - // the two kinds of primitives - // 1. the real one - // 2. the wrapped one +export const parse = (text, reviver) => { + const input = $parse(text, Primitives).map(primitives); + const value = input[0]; + const $ = reviver || noop; + const tmp = typeof value === object && value ? + revive(input, new Set, value, $) : + value; + return $.call({'': tmp}, '', tmp); +}; - function primitives(value) { - return value instanceof Primitive ? Primitive(value) : value; +export const stringify = (value, replacer, space) => { + const $ = replacer && typeof replacer === object ? + (k, v) => (k === '' || -1 < replacer.indexOf(k) ? v : void 0) : + (replacer || noop); + const known = new Map; + const input = []; + const output = []; + let i = +set(known, input, $.call({'': value}, '', value)); + let firstRun = !i; + while (i < input.length) { + firstRun = true; + output[i] = $stringify(input[i++], replace, space); } - - function Primitives(key, value) { - return typeof value === primitive ? new Primitive(value) : value; + return '[' + output.join(',') + ']'; + function replace(key, value) { + if (firstRun) { + firstRun = !firstRun; + return value; + } + const after = $.call(this, key, value); + switch (typeof after) { + case object: + if (after === null) return after; + case primitive: + return known.get(after) || set(known, input, after); + } + return after; } - -}(String, 'string')); -export default Flatted; -export var parse = Flatted.parse; -export var stringify = Flatted.stringify; +}; diff --git a/tools/node_modules/eslint/node_modules/flatted/flatted.jpg b/tools/node_modules/eslint/node_modules/flatted/flatted.jpg new file mode 100644 index 00000000000000..8ccee5f829ccc7 Binary files /dev/null and b/tools/node_modules/eslint/node_modules/flatted/flatted.jpg differ diff --git a/tools/node_modules/eslint/node_modules/flatted/index.js b/tools/node_modules/eslint/node_modules/flatted/index.js index 1eca303c6db3c3..2cf0eeb52abc8a 100644 --- a/tools/node_modules/eslint/node_modules/flatted/index.js +++ b/tools/node_modules/eslint/node_modules/flatted/index.js @@ -1,113 +1,119 @@ -var Flatted = (function (Primitive, primitive) { - - /*! - * ISC License - * - * Copyright (c) 2018, Andrea Giammarchi, @WebReflection - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - - var Flatted = { - - parse: function parse(text, reviver) { - var input = JSON.parse(text, Primitives).map(primitives); - var value = input[0]; - var $ = reviver || noop; - var tmp = typeof value === 'object' && value ? - revive(input, new Set, value, $) : - value; - return $.call({'': tmp}, '', tmp); - }, - - stringify: function stringify(value, replacer, space) { - for (var - firstRun, - known = new Map, - input = [], - output = [], - $ = replacer && typeof replacer === typeof input ? - function (k, v) { - if (k === '' || -1 < replacer.indexOf(k)) return v; - } : - (replacer || noop), - i = +set(known, input, $.call({'': value}, '', value)), - replace = function (key, value) { - if (firstRun) { - firstRun = !firstRun; - return value; - } - var after = $.call(this, key, value); - switch (typeof after) { - case 'object': - if (after === null) return after; - case primitive: - return known.get(after) || set(known, input, after); - } - return after; - }; - i < input.length; i++ - ) { - firstRun = true; - output[i] = JSON.stringify(input[i], replace, space); - } - return '[' + output.join(',') + ']'; - } +self.Flatted = (function (exports) { + 'use strict'; - }; + + + /*! (c) 2020 Andrea Giammarchi */ + var $parse = JSON.parse, + $stringify = JSON.stringify; + var keys = Object.keys; + var Primitive = String; // it could be Number + + var primitive = 'string'; // it could be 'number' - return Flatted; + var ignore = {}; + var object = 'object'; - function noop(key, value) { + var noop = function noop(_, value) { return value; - } - - function revive(input, parsed, output, $) { - return Object.keys(output).reduce( - function (output, key) { - var value = output[key]; - if (value instanceof Primitive) { - var tmp = input[value]; - if (typeof tmp === 'object' && !parsed.has(tmp)) { - parsed.add(tmp); - output[key] = $.call(output, key, revive(input, parsed, tmp, $)); - } else { - output[key] = $.call(output, key, tmp); - } - } else - output[key] = $.call(output, key, value); - return output; - }, - output - ); - } - - function set(known, input, value) { + }; + + var primitives = function primitives(value) { + return value instanceof Primitive ? Primitive(value) : value; + }; + + var Primitives = function Primitives(_, value) { + return typeof(value) === primitive ? new Primitive(value) : value; + }; + + var revive = function revive(input, parsed, output, $) { + var lazy = []; + + for (var ke = keys(output), length = ke.length, y = 0; y < length; y++) { + var k = ke[y]; + var value = output[k]; + + if (value instanceof Primitive) { + var tmp = input[value]; + + if (typeof(tmp) === object && !parsed.has(tmp)) { + parsed.add(tmp); + output[k] = ignore; + lazy.push({ + k: k, + a: [input, parsed, tmp, $] + }); + } else output[k] = $.call(output, k, tmp); + } else if (output[k] !== ignore) output[k] = $.call(output, k, value); + } + + for (var _length = lazy.length, i = 0; i < _length; i++) { + var _lazy$i = lazy[i], + _k = _lazy$i.k, + a = _lazy$i.a; + output[_k] = $.call(output, _k, revive.apply(null, a)); + } + + return output; + }; + + var set = function set(known, input, value) { var index = Primitive(input.push(value) - 1); known.set(value, index); return index; - } + }; - // the two kinds of primitives - // 1. the real one - // 2. the wrapped one + var parse = function parse(text, reviver) { + var input = $parse(text, Primitives).map(primitives); + var value = input[0]; + var $ = reviver || noop; + var tmp = typeof(value) === object && value ? revive(input, new Set(), value, $) : value; + return $.call({ + '': tmp + }, '', tmp); + }; + var stringify = function stringify(value, replacer, space) { + var $ = replacer && typeof(replacer) === object ? function (k, v) { + return k === '' || -1 < replacer.indexOf(k) ? v : void 0; + } : replacer || noop; + var known = new Map(); + var input = []; + var output = []; + var i = +set(known, input, $.call({ + '': value + }, '', value)); + var firstRun = !i; - function primitives(value) { - return value instanceof Primitive ? Primitive(value) : value; - } + while (i < input.length) { + firstRun = true; + output[i] = $stringify(input[i++], replace, space); + } + + return '[' + output.join(',') + ']'; + + function replace(key, value) { + if (firstRun) { + firstRun = !firstRun; + return value; + } + + var after = $.call(this, key, value); + + switch (typeof(after)) { + case object: + if (after === null) return after; + + case primitive: + return known.get(after) || set(known, input, after); + } + + return after; + } + }; + + exports.parse = parse; + exports.stringify = stringify; - function Primitives(key, value) { - return typeof value === primitive ? new Primitive(value) : value; - } + return exports; -}(String, 'string')); +}({})); diff --git a/tools/node_modules/eslint/node_modules/flatted/min.js b/tools/node_modules/eslint/node_modules/flatted/min.js index 9e2a134b1c77e7..64372fe4081620 100644 --- a/tools/node_modules/eslint/node_modules/flatted/min.js +++ b/tools/node_modules/eslint/node_modules/flatted/min.js @@ -1,2 +1,2 @@ -/*! (c) 2018, Andrea Giammarchi, (ISC) */ -var Flatted=function(a,l){return{parse:function(n,t){var e=JSON.parse(n,i).map(f),r=e[0],u=t||s,c="object"==typeof r&&r?function u(c,f,n,i){return Object.keys(n).reduce(function(n,t){var e=n[t];if(e instanceof a){var r=c[e];"object"!=typeof r||f.has(r)?n[t]=i.call(n,t,r):(f.add(r),n[t]=i.call(n,t,u(c,f,r,i)))}else n[t]=i.call(n,t,e);return n},n)}(e,new Set,r,u):r;return u.call({"":c},"",c)},stringify:function(n,e,t){function r(n,t){if(u)return u=!u,t;var e=a.call(this,n,t);switch(typeof e){case"object":if(null===e)return e;case l:return c.get(e)||p(c,f,e)}return e}for(var u,c=new Map,f=[],i=[],a=e&&typeof e==typeof f?function(n,t){if(""===n||-1> cjs/index.js", + "build": "npm run cjs && npm run rollup:es && npm run rollup:babel && npm run min && npm run test && npm run size", + "cjs": "ascjs esm cjs", "coveralls": "nyc report --reporter=text-lcov | coveralls", - "esm": "cp index.js esm/index.js; echo 'export default Flatted;' >> esm/index.js; echo 'export var parse = Flatted.parse;' >> esm/index.js; echo 'export var stringify = Flatted.stringify;' >> esm/index.js", - "min": "echo '/*! (c) 2018, Andrea Giammarchi, (ISC) */'>min.js && uglifyjs index.js --support-ie8 -c -m >> min.js", - "size": "cat index.js | wc -c;cat min.js | wc -c;gzip -c9 min.js | wc -c;cat min.js | brotli | wc -c", + "min": "terser index.js -c -m -o min.js", + "rollup:babel": "rollup --config rollup/babel.config.js && sed -i.bck 's/^var /self./' index.js && rm -rf index.js.bck && drop-babel-typeof index.js", + "rollup:es": "rollup --config rollup/es.config.js && sed -i.bck 's/^var /self./' es.js && rm -rf es.js.bck", + "size": "cat index.js | wc -c;cat min.js | wc -c;gzip -c9 min.js | wc -c;cat min.js | brotli | wc -c; cat es.js | brotli | wc -c", "test": "nyc node test/index.js" }, + "type": "module", "types": "types.d.ts", "unpkg": "min.js", - "version": "2.0.2" + "version": "3.1.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/flatted/php/flatted.php b/tools/node_modules/eslint/node_modules/flatted/php/flatted.php new file mode 100644 index 00000000000000..31c0d41d4535e9 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/flatted/php/flatted.php @@ -0,0 +1,174 @@ +value = $value; + } +} + +class Flatted { + + // public utilities + public static function parse($json, $assoc = false, $depth = 512, $options = 0) { + $input = array_map( + 'Flatted::asString', + array_map( + 'Flatted::wrap', + json_decode($json, $assoc, $depth, $options) + ) + ); + $value = &$input[0]; + $set = array(); + $set[] = &$value; + if (is_array($value)) + return Flatted::loop(false, array_keys($value), $input, $set, $value); + if (is_object($value)) + return Flatted::loop(true, Flatted::keys($value), $input, $set, $value); + return $value; + } + + public static function stringify($value, $options = 0, $depth = 512) { + $known = new stdClass; + $known->key = array(); + $known->value = array(); + $input = array(); + $output = array(); + $i = intval(Flatted::index($known, $input, $value)); + while ($i < count($input)) { + $output[$i] = Flatted::transform($known, $input, $input[$i]); + $i++; + } + return json_encode($output, $options, $depth); + } + + // private helpers + private static function asString(&$value) { + return $value instanceof FlattedString ? $value->value : $value; + } + + private static function index(&$known, &$input, &$value) { + $input[] = &$value; + $index = strval(count($input) - 1); + $known->key[] = &$value; + $known->value[] = &$index; + return $index; + } + + private static function keys(&$value) { + $obj = new ReflectionObject($value); + $props = $obj->getProperties(); + $keys = array(); + foreach ($props as $prop) { + $keys[] = $prop->getName(); + } + return $keys; + } + + private static function loop($obj, $keys, &$input, &$set, &$output) { + foreach ($keys as $key) { + $value = $obj ? $output->$key : $output[$key]; + if ($value instanceof FlattedString) { + Flatted::ref($obj, $key, $input[$value->value], $input, $set, $output); + } + } + return $output; + } + + private static function relate(&$known, &$input, &$value) { + if (is_string($value)) { + $key = array_search($value, $known->key, true); + if ($key !== false) { + return $known->value[$key]; + } + return Flatted::index($known, $input, $value); + } + if (is_array($value)) { + $key = array_search($value, $known->key, true); + if ($key !== false) { + return $known->value[$key]; + } + return Flatted::index($known, $input, $value); + } + if (is_object($value)) { + $key = array_search($value, $known->key, true); + if ($key !== false) { + return $known->value[$key]; + } + return Flatted::index($known, $input, $value); + } + return $value; + } + + private static function ref($obj, &$key, &$value, &$input, &$set, &$output) { + if (is_array($value) && !in_array($value, $set, true)) { + $set[] = $value; + $value = Flatted::loop(false, array_keys($value), $input, $set, $value); + } + elseif (is_object($value) && !in_array($value, $set, true)) { + $set[] = $value; + $value = Flatted::loop(true, Flatted::keys($value), $input, $set, $value); + } + if ($obj) { + $output->$key = &$value; + } + else { + $output[$key] = &$value; + } + } + + private static function transform(&$known, &$input, &$value) { + if (is_array($value)) { + return array_map( + function (&$value) use(&$known, &$input) { + return Flatted::relate($known, $input, $value); + }, + $value + ); + } + if (is_object($value)) { + $object = new stdClass; + $keys = Flatted::keys($value); + foreach ($keys as $key) { + $object->$key = Flatted::relate($known, $input, $value->$key); + } + return $object; + } + return $value; + } + + private static function wrap(&$value) { + if (is_string($value)) { + return new FlattedString($value); + } + if (is_array($value)) { + return array_map('Flatted::wrap', $value); + } + if (is_object($value)) { + $keys = Flatted::keys($value); + foreach ($keys as $key) { + $value->$key = self::wrap($value->$key); + } + return $value; + } + return $value; + } +} +?> \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/flatted/php/test.php b/tools/node_modules/eslint/node_modules/flatted/php/test.php new file mode 100644 index 00000000000000..8b49e924842035 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/flatted/php/test.php @@ -0,0 +1,118 @@ +o = &$o; + +console::assert(Flatted::stringify($a) === '[["0"]]', 'recursive Array'); +console::assert(Flatted::stringify($o) === '[{"o":"0"}]', 'recursive Object'); + +$b = Flatted::parse(Flatted::stringify($a)); +console::assert(is_array($b) && $b[0] === $b, 'restoring recursive Array'); + +$a[] = 1; +$a[] = 'two'; +$a[] = true; +$o->one = 1; +$o->two = 'two'; +$o->three = true; + +console::assert(Flatted::stringify($a) === '[["0",1,"1",true],"two"]', 'values in Array'); +console::assert(Flatted::stringify($o) === '[{"o":"0","one":1,"two":"1","three":true},"two"]', 'values in Object'); + +$a[] = &$o; +$o->a = &$a; + +console::assert(Flatted::stringify($a) === '[["0",1,"1",true,"2"],"two",{"o":"2","one":1,"two":"1","three":true,"a":"0"}]', 'object in Array'); +console::assert(Flatted::stringify($o) === '[{"o":"0","one":1,"two":"1","three":true,"a":"2"},"two",["2",1,"1",true,"0"]]', 'array in Object'); + +$a[] = array('test' => 'OK'); +$a[] = [1, 2, 3]; + +$o->test = array('test' => 'OK'); +$o->array = [1, 2, 3]; + +console::assert(Flatted::stringify($a) === '[["0",1,"1",true,"2","3","4"],"two",{"o":"2","one":1,"two":"1","three":true,"a":"0","test":"3","array":"4"},{"test":"5"},[1,2,3],"OK"]', 'objects in Array'); +console::assert(Flatted::stringify($o) === '[{"o":"0","one":1,"two":"1","three":true,"a":"2","test":"3","array":"4"},"two",["2",1,"1",true,"0","3","4"],{"test":"5"},[1,2,3],"OK"]', 'objects in Object'); + +$a2 = Flatted::parse(Flatted::stringify($a)); +$o2 = Flatted::parse(Flatted::stringify($o)); + +console::assert($a2[0] === $a2, 'parsed Array'); +console::assert($o2->o === $o2, 'parsed Object'); + +console::assert( + $a2[1] === 1 && + $a2[2] === 'two' && + $a2[3] === true && + $a2[4] instanceof stdClass && + json_encode($a2[5]) === json_encode(array('test' => 'OK')) && + json_encode($a2[6]) === json_encode([1, 2, 3]), + 'array values are all OK' +); + +console::assert($a2[4] === $a2[4]->o && $a2 === $a2[4]->o->a, 'array recursive values are OK'); + +console::assert( + $o2->one === 1 && + $o2->two === 'two' && + $o2->three === true && + is_array($o2->a) && + json_encode($o2->test) === json_encode(array('test' => 'OK')) && + json_encode($o2->array) === json_encode([1, 2, 3]), + 'object values are all OK' +); + +console::assert($o2->a === $o2->a[0] && $o2 === $o2->a[4], 'object recursive values are OK'); + +console::assert(Flatted::parse(Flatted::stringify(1)) === 1, 'numbers can be parsed too'); +console::assert(Flatted::parse(Flatted::stringify(false)) === false, 'booleans can be parsed too'); +console::assert(Flatted::parse(Flatted::stringify(null)) === null, 'null can be parsed too'); +console::assert(Flatted::parse(Flatted::stringify('test')) === 'test', 'strings can be parsed too'); + +$str = Flatted::parse('[{"prop":"1","a":"2","b":"3"},{"value":123},["4","5"],{"e":"6","t":"7","p":4},{},{"b":"8"},"f",{"a":"9"},["10"],"sup",{"a":1,"d":2,"c":"7","z":"11","h":1},{"g":2,"a":"7","b":"12","f":6},{"r":4,"u":"7","c":5}]'); + +console::assert( + $str->b->t->a === 'sup' && + $str->a[1]->b[0]->c === $str->b->t, + 'str is fine' +); + +$oo = Flatted::parse('[{"a":"1","b":"0","c":"2"},{"aa":"3"},{"ca":"4","cb":"5","cc":"6","cd":"7","ce":"8","cf":"9"},{"aaa":"10"},{"caa":"4"},{"cba":"5"},{"cca":"2"},{"cda":"4"},"value2","value3","value1"]'); + +console::assert( + $oo->a->aa->aaa = 'value1' + && $oo === $oo->b + && $oo === $oo->b + && $oo->c->ca->caa === $oo->c->ca + && $oo->c->cb->cba === $oo->c->cb + && $oo->c->cc->cca === $oo->c + && $oo->c->cd->cda === $oo->c->ca->caa + && $oo->c->ce === 'value2' + && $oo->c->cf === 'value3', + 'parse is correct' +); + +echo "OK\n"; + +?> \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/import-fresh/index.js b/tools/node_modules/eslint/node_modules/import-fresh/index.js index 425ed98c42f68e..0a4c5d52f6d322 100644 --- a/tools/node_modules/eslint/node_modules/import-fresh/index.js +++ b/tools/node_modules/eslint/node_modules/import-fresh/index.js @@ -10,7 +10,8 @@ module.exports = moduleId => { const parentPath = parentModule(__filename); - const filePath = resolveFrom(path.dirname(parentPath), moduleId); + const cwd = parentPath ? path.dirname(parentPath) : __dirname; + const filePath = resolveFrom(cwd, moduleId); const oldModule = require.cache[filePath]; // Delete itself from module parent diff --git a/tools/node_modules/eslint/node_modules/import-fresh/package.json b/tools/node_modules/eslint/node_modules/import-fresh/package.json index 38892a62e43136..893bb4a523fbca 100644 --- a/tools/node_modules/eslint/node_modules/import-fresh/package.json +++ b/tools/node_modules/eslint/node_modules/import-fresh/package.json @@ -47,5 +47,5 @@ "heapdump": "node heapdump.js", "test": "xo && ava && tsd" }, - "version": "3.2.1" + "version": "3.2.2" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/index.js b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/index.js index d506327c3e5576..671f97f7607790 100644 --- a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/index.js +++ b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/index.js @@ -1,42 +1,43 @@ -'use strict'; /* eslint-disable yoda */ -module.exports = x => { - if (Number.isNaN(x)) { +'use strict'; + +const isFullwidthCodePoint = codePoint => { + if (Number.isNaN(codePoint)) { return false; } - // code points are derived from: + // Code points are derived from: // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt if ( - x >= 0x1100 && ( - x <= 0x115f || // Hangul Jamo - x === 0x2329 || // LEFT-POINTING ANGLE BRACKET - x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + codePoint >= 0x1100 && ( + codePoint <= 0x115F || // Hangul Jamo + codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET + codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET // CJK Radicals Supplement .. Enclosed CJK Letters and Months - (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A - (0x3250 <= x && x <= 0x4dbf) || + (0x3250 <= codePoint && codePoint <= 0x4DBF) || // CJK Unified Ideographs .. Yi Radicals - (0x4e00 <= x && x <= 0xa4c6) || + (0x4E00 <= codePoint && codePoint <= 0xA4C6) || // Hangul Jamo Extended-A - (0xa960 <= x && x <= 0xa97c) || + (0xA960 <= codePoint && codePoint <= 0xA97C) || // Hangul Syllables - (0xac00 <= x && x <= 0xd7a3) || + (0xAC00 <= codePoint && codePoint <= 0xD7A3) || // CJK Compatibility Ideographs - (0xf900 <= x && x <= 0xfaff) || + (0xF900 <= codePoint && codePoint <= 0xFAFF) || // Vertical Forms - (0xfe10 <= x && x <= 0xfe19) || + (0xFE10 <= codePoint && codePoint <= 0xFE19) || // CJK Compatibility Forms .. Small Form Variants - (0xfe30 <= x && x <= 0xfe6b) || + (0xFE30 <= codePoint && codePoint <= 0xFE6B) || // Halfwidth and Fullwidth Forms - (0xff01 <= x && x <= 0xff60) || - (0xffe0 <= x && x <= 0xffe6) || + (0xFF01 <= codePoint && codePoint <= 0xFF60) || + (0xFFE0 <= codePoint && codePoint <= 0xFFE6) || // Kana Supplement - (0x1b000 <= x && x <= 0x1b001) || + (0x1B000 <= codePoint && codePoint <= 0x1B001) || // Enclosed Ideographic Supplement - (0x1f200 <= x && x <= 0x1f251) || + (0x1F200 <= codePoint && codePoint <= 0x1F251) || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane - (0x20000 <= x && x <= 0x3fffd) + (0x20000 <= codePoint && codePoint <= 0x3FFFD) ) ) { return true; @@ -44,3 +45,6 @@ module.exports = x => { return false; }; + +module.exports = isFullwidthCodePoint; +module.exports.default = isFullwidthCodePoint; diff --git a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/license b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/license index 654d0bfe943437..e7af2f77107d73 100644 --- a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/license +++ b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/package.json b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/package.json index 5db53104f21a75..c556c1c78dd459 100644 --- a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/package.json +++ b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/package.json @@ -11,14 +11,16 @@ "deprecated": false, "description": "Check if the character represented by a given Unicode code point is fullwidth", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" }, "engines": { - "node": ">=4" + "node": ">=8" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", "keywords": [ @@ -28,9 +30,7 @@ "width", "unicode", "character", - "char", "string", - "str", "codepoint", "code", "point", @@ -45,10 +45,7 @@ "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd-check" }, - "version": "2.0.0", - "xo": { - "esnext": true - } + "version": "3.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/readme.md b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/readme.md index 093b0281b2c46b..4236bba980d8fe 100644 --- a/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/readme.md +++ b/tools/node_modules/eslint/node_modules/is-fullwidth-code-point/readme.md @@ -6,7 +6,7 @@ ## Install ``` -$ npm install --save is-fullwidth-code-point +$ npm install is-fullwidth-code-point ``` @@ -15,23 +15,23 @@ $ npm install --save is-fullwidth-code-point ```js const isFullwidthCodePoint = require('is-fullwidth-code-point'); -isFullwidthCodePoint('谢'.codePointAt()); +isFullwidthCodePoint('谢'.codePointAt(0)); //=> true -isFullwidthCodePoint('a'.codePointAt()); +isFullwidthCodePoint('a'.codePointAt(0)); //=> false ``` ## API -### isFullwidthCodePoint(input) +### isFullwidthCodePoint(codePoint) -#### input +#### codePoint Type: `number` -[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. +The [code point](https://en.wikipedia.org/wiki/Code_point) of a character. ## License diff --git a/tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js b/tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js index d7287d47c9ce48..7878320743c2cb 100644 --- a/tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js +++ b/tools/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js @@ -1,4 +1,4 @@ -/* js-yaml 3.14.0 https://github.com/nodeca/js-yaml */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsyaml = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i=i.flowLevel;switch(V(r,n,i.indent,t,function(e){return function(e,t){for(var n=0,i=e.implicitTypes.length;n"+z(r,i.indent)+J(U(function(t,n){var e,i,r=/(\n+)([^\n]*)/g,o=function(){var e=-1!==(e=t.indexOf("\n"))?e:t.length;return r.lastIndex=e,Q(t.slice(0,e),n)}(),a="\n"===t[0]||" "===t[0];for(;i=r.exec(t);){var s=i[1],c=i[2];e=" "===c[0],o+=s+(a||e||""===c?"":"\n")+Q(c,n),a=e}return o}(r,t),e));case G:return'"'+function(e){for(var t,n,i,r="",o=0;ot&&o tag resolver accepts not "'+o+'" style');i=r.represent[o](t,o)}e.dump=i}return 1}}function ee(e,t,n,i,r,o){e.tag=null,e.dump=n,X(e,n,!1)||X(e,n,!0);var a=p.call(e.dump);i=i&&(e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(c=-1!==(s=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&0 "+e.dump)}return 1}function te(e,t){var n,i,r=[],o=[];for(!function e(t,n,i){var r,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===i.indexOf(o)&&i.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o>10),56320+(s-65536&1023)),e.position++}else N(e,"unknown escape sequence");n=i=e.position}else O(p)?(L(e,n,i,!0),B(e,Y(e,!1,t)),n=i=e.position):e.position===e.lineStart&&R(e)?N(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}N(e,"unexpected end of the stream within a double quoted scalar")}}function W(e,t){var n,i,r=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&45===i&&F(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,Y(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,K(e,t,A,!1,!0),a.push(e.result),Y(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)N(e,"bad indentation of a sequence entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt)&&(K(e,t,b,!0,r)&&(m?d=e.result:h=e.result),m||(U(e,l,p,f,d,h,o,a),f=d=h=null),Y(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)N(e,"bad indentation of a mapping entry");else if(e.lineIndentu&&(u=e.lineIndent),O(f))l++;else{if(e.lineIndent=t){a=!0,f=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=c,e.lineIndent=u;break}}a&&(L(e,r,o,!1),B(e,e.line-s),r=o=e.position,a=!1),E(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}if(L(e,r,o,!1),e.result)return 1;e.kind=l,e.result=p}}(e,p,x===n)&&(m=!0,null===e.tag&&(e.tag="?")):(m=!0,null===e.tag&&null===e.anchor||N(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(m=s&&W(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&N(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),c=0,u=e.implicitTypes.length;c tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):N(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):N(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||m}function $(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new h(e,t),i=e.indexOf("\0");for(-1!==i&&(n.position=i,N(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.positiont/2-1){n=" ... ",i+=5;break}for(r="",o=this.position;ot/2-1){r=" ... ",o-=5;break}return a=this.buffer.slice(i,o),s.repeat(" ",e)+n+a+r+"\n"+s.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";var r=e("./common"),o=e("./exception"),a=e("./type");function s(e,t,i){var r=[];return e.include.forEach(function(e){i=s(e,t,i)}),e[t].forEach(function(n){i.forEach(function(e,t){e.tag===n.tag&&e.kind===n.kind&&r.push(t)}),i.push(n)}),i.filter(function(e,t){return-1===r.indexOf(t)})}function c(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=s(this,"implicit",[]),this.compiledExplicit=s(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function i(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e>16&255),a.push(o>>8&255),a.push(255&o)),o=o<<6|r.indexOf(n.charAt(s));return 0==(t=i%4*6)?(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)):18==t?(a.push(o>>10&255),a.push(o>>2&255)):12==t&&a.push(o>>4&255),c?c.from?c.from(a):new c(a):a},predicate:function(e){return c&&c.isBuffer(e)},represent:function(e){for(var t,n="",i=0,r=e.length,o=u,a=0;a>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+e[a];return 0==(t=r%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2==t?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1==t&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}})},{"../type":13}],15:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type"),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;t.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n=e.replace(/_/g,"").toLowerCase(),i="-"===n[0]?-1:1,r=[];return 0<="+-".indexOf(n[0])&&(n=n.slice(1)),".inf"===n?1==i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===n?NaN:0<=n.indexOf(":")?(n.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),n=0,t=1,r.forEach(function(e){n+=e*t,t*=60}),i*n):i*parseFloat(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type");t.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i,r,o=e.length,a=0,s=!1;if(!o)return!1;if("-"!==(t=e[a])&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===o)return!0;if("b"===(t=e[++a])){for(a++;a=i.flowLevel;switch(V(r,n,i.indent,t,function(e){return function(e,t){for(var n=0,i=e.implicitTypes.length;n"+z(r,i.indent)+J(U(function(t,n){var e,i=/(\n+)([^\n]*)/g,r=function(){var e=-1!==(e=t.indexOf("\n"))?e:t.length;return i.lastIndex=e,Q(t.slice(0,e),n)}(),o="\n"===t[0]||" "===t[0];for(;e=i.exec(t);){var a=e[1],s=e[2];e=" "===s[0],r+=a+(o||e||""===s?"":"\n")+Q(s,n),o=e}return r}(r,t),e));case G:return'"'+function(e){for(var t,n,i,r="",o=0;ot&&o tag resolver accepts not "'+o+'" style');i=r.represent[o](t,o)}e.dump=i}return 1}}function ee(e,t,n,i,r,o){e.tag=null,e.dump=n,X(e,n,!1)||X(e,n,!0);var a=l.call(e.dump);i=i&&(e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(c=-1!==(s=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&0 "+e.dump)}return 1}function te(e,t){var n,i,r=[],o=[];for(!function e(t,n,i){var r,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===i.indexOf(o)&&i.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o>10),56320+(c-65536&1023)),e.position++}else N(e,"unknown escape sequence");n=i=e.position}else S(u)?(L(e,n,i,!0),B(e,Y(e,!1,t)),n=i=e.position):e.position===e.lineStart&&R(e)?N(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}N(e,"unexpected end of the stream within a double quoted scalar")}}function K(e,t){var n,i,r=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&45===i&&O(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,Y(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,P(e,t,x,!1,!0),a.push(e.result),Y(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)N(e,"bad indentation of a sequence entry");else if(e.lineIndentt?p=1:e.lineIndent===t?p=0:e.lineIndentt?p=1:e.lineIndent===t?p=0:e.lineIndentt)&&(P(e,t,A,!0,r)&&(m?d=e.result:h=e.result),m||(U(e,l,p,f,d,h,o,a),f=d=h=null),Y(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)N(e,"bad indentation of a mapping entry");else if(e.lineIndentc&&(c=e.lineIndent),S(p))u++;else{if(e.lineIndent=t){a=!0,f=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=c,e.lineIndent=u;break}}a&&(L(e,r,o,!1),B(e,e.line-s),r=o=e.position,a=!1),I(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}if(L(e,r,o,!1),e.result)return 1;e.kind=l,e.result=p}}(e,i,g===n)&&(d=!0,null===e.tag&&(e.tag="?")):(d=!0,null===e.tag&&null===e.anchor||N(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===p&&(d=s&&K(e,r))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&N(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),c=0,u=e.implicitTypes.length;c tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):N(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):N(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||d}function $(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new F(e,t),e=e.indexOf("\0");for(-1!==e&&(n.position=e,N(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.positiont/2-1){n=" ... ",i+=5;break}for(r="",o=this.position;ot/2-1){r=" ... ",o-=5;break}return a=this.buffer.slice(i,o),s.repeat(" ",e)+n+a+r+"\n"+s.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t="";return this.name&&(t+='in "'+this.name+'" '),t+="at line "+(this.line+1)+", column "+(this.column+1),e||(e=this.getSnippet())&&(t+=":\n"+e),t},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";var r=e("./common"),o=e("./exception"),a=e("./type");function s(e,t,i){var r=[];return e.include.forEach(function(e){i=s(e,t,i)}),e[t].forEach(function(n){i.forEach(function(e,t){e.tag===n.tag&&e.kind===n.kind&&r.push(t)}),i.push(n)}),i.filter(function(e,t){return-1===r.indexOf(t)})}function c(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=s(this,"implicit",[]),this.compiledExplicit=s(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function i(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e>16&255),o.push(r>>8&255),o.push(255&r)),r=r<<6|i.indexOf(t.charAt(a));return 0==(e=n%4*6)?(o.push(r>>16&255),o.push(r>>8&255),o.push(255&r)):18==e?(o.push(r>>10&255),o.push(r>>2&255)):12==e&&o.push(r>>4&255),s?s.from?s.from(o):new s(o):o},predicate:function(e){return s&&s.isBuffer(e)},represent:function(e){for(var t,n="",i=0,r=e.length,o=c,a=0;a>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+e[a];return 0==(t=r%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2==t?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1==t&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}})},{"../type":13}],15:[function(e,t,n){"use strict";e=e("../type");t.exports=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";var i=e("../common"),e=e("../type"),r=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var o=/^[-+]?[0-9]+e/;t.exports=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!r.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n=e.replace(/_/g,"").toLowerCase(),e="-"===n[0]?-1:1,i=[];return 0<="+-".indexOf(n[0])&&(n=n.slice(1)),".inf"===n?1==e?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===n?NaN:0<=n.indexOf(":")?(n.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),n=0,t=1,i.forEach(function(e){n+=e*t,t*=60}),e*n):e*parseFloat(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return e=e.toString(10),o.test(e)?e.replace("e",".e"):e},defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";var i=e("../common"),e=e("../type");t.exports=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i,r,o=e.length,a=0,s=!1;if(!o)return!1;if("-"!==(t=e[a])&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===o)return!0;if("b"===(t=e[++a])){for(a++;a value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `maxAge` is optional and overrides the + cache `maxAge` option if provided. + + If the key is not found, `get()` will return `undefined`. + + The key and val can be any value. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries + +* `prune()` + + Manually iterates over the entire cache proactively pruning old entries diff --git a/tools/node_modules/eslint/node_modules/lru-cache/index.js b/tools/node_modules/eslint/node_modules/lru-cache/index.js new file mode 100644 index 00000000000000..573b6b85b9779d --- /dev/null +++ b/tools/node_modules/eslint/node_modules/lru-cache/index.js @@ -0,0 +1,334 @@ +'use strict' + +// A linked list to keep track of recently-used-ness +const Yallist = require('yallist') + +const MAX = Symbol('max') +const LENGTH = Symbol('length') +const LENGTH_CALCULATOR = Symbol('lengthCalculator') +const ALLOW_STALE = Symbol('allowStale') +const MAX_AGE = Symbol('maxAge') +const DISPOSE = Symbol('dispose') +const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') +const LRU_LIST = Symbol('lruList') +const CACHE = Symbol('cache') +const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + +const naiveLength = () => 1 + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +class LRUCache { + constructor (options) { + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + if (options.max && (typeof options.max !== 'number' || options.max < 0)) + throw new TypeError('max must be a non-negative number') + // Kind of weird to have a default max of Infinity, but oh well. + const max = this[MAX] = options.max || Infinity + + const lc = options.length || naiveLength + this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc + this[ALLOW_STALE] = options.stale || false + if (options.maxAge && typeof options.maxAge !== 'number') + throw new TypeError('maxAge must be a number') + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false + this.reset() + } + + // resize the cache when the max changes. + set max (mL) { + if (typeof mL !== 'number' || mL < 0) + throw new TypeError('max must be a non-negative number') + + this[MAX] = mL || Infinity + trim(this) + } + get max () { + return this[MAX] + } + + set allowStale (allowStale) { + this[ALLOW_STALE] = !!allowStale + } + get allowStale () { + return this[ALLOW_STALE] + } + + set maxAge (mA) { + if (typeof mA !== 'number') + throw new TypeError('maxAge must be a non-negative number') + + this[MAX_AGE] = mA + trim(this) + } + get maxAge () { + return this[MAX_AGE] + } + + // resize the cache when the lengthCalculator changes. + set lengthCalculator (lC) { + if (typeof lC !== 'function') + lC = naiveLength + + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(hit => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }) + } + trim(this) + } + get lengthCalculator () { return this[LENGTH_CALCULATOR] } + + get length () { return this[LENGTH] } + get itemCount () { return this[LRU_LIST].length } + + rforEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].tail; walker !== null;) { + const prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } + } + + forEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].head; walker !== null;) { + const next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } + } + + keys () { + return this[LRU_LIST].toArray().map(k => k.key) + } + + values () { + return this[LRU_LIST].toArray().map(k => k.value) + } + + reset () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list + } + + dump () { + return this[LRU_LIST].map(hit => + isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter(h => h) + } + + dumpLru () { + return this[LRU_LIST] + } + + set (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + if (maxAge && typeof maxAge !== 'number') + throw new TypeError('maxAge must be a number') + + const now = maxAge ? Date.now() : 0 + const len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + const node = this[CACHE].get(key) + const item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value) + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + const hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value) + + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true + } + + has (key) { + if (!this[CACHE].has(key)) return false + const hit = this[CACHE].get(key).value + return !isStale(this, hit) + } + + get (key) { + return get(this, key, true) + } + + peek (key) { + return get(this, key, false) + } + + pop () { + const node = this[LRU_LIST].tail + if (!node) + return null + + del(this, node) + return node.value + } + + del (key) { + del(this, this[CACHE].get(key)) + } + + load (arr) { + // reset the cache + this.reset() + + const now = Date.now() + // A previous serialized cache has the most recent items first + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l] + const expiresAt = hit.e || 0 + if (expiresAt === 0) + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + else { + const maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } + } + + prune () { + this[CACHE].forEach((value, key) => get(this, key, false)) + } +} + +const get = (self, key, doUse) => { + const node = self[CACHE].get(key) + if (node) { + const hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + return undefined + } else { + if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now() + self[LRU_LIST].unshiftNode(node) + } + } + return hit.value + } +} + +const isStale = (self, hit) => { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) + return false + + const diff = Date.now() - hit.now + return hit.maxAge ? diff > hit.maxAge + : self[MAX_AGE] && (diff > self[MAX_AGE]) +} + +const trim = self => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + const prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +const del = (self, node) => { + if (node) { + const hit = node.value + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value) + + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +class Entry { + constructor (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 + } +} + +const forEachStep = (self, fn, node, thisp) => { + let hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + hit = undefined + } + if (hit) + fn.call(thisp, hit.value, hit.key, self) +} + +module.exports = LRUCache diff --git a/tools/node_modules/eslint/node_modules/lru-cache/package.json b/tools/node_modules/eslint/node_modules/lru-cache/package.json new file mode 100644 index 00000000000000..a7a6da707b62fe --- /dev/null +++ b/tools/node_modules/eslint/node_modules/lru-cache/package.json @@ -0,0 +1,46 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/node-lru-cache/issues" + }, + "bundleDependencies": false, + "dependencies": { + "yallist": "^4.0.0" + }, + "deprecated": false, + "description": "A cache object that deletes the least-recently-used items.", + "devDependencies": { + "benchmark": "^2.1.4", + "tap": "^14.10.7" + }, + "engines": { + "node": ">=10" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/isaacs/node-lru-cache#readme", + "keywords": [ + "mru", + "lru", + "cache" + ], + "license": "ISC", + "main": "index.js", + "name": "lru-cache", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "scripts": { + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "preversion": "npm test", + "snap": "tap", + "test": "tap" + }, + "version": "6.0.0" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/minimist/package.json b/tools/node_modules/eslint/node_modules/minimist/package.json deleted file mode 100644 index 6c9aeceb3305f7..00000000000000 --- a/tools/node_modules/eslint/node_modules/minimist/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "parse argument options", - "devDependencies": { - "covert": "^1.0.0", - "tap": "~0.4.0", - "tape": "^3.5.0" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "license": "MIT", - "main": "index.js", - "name": "minimist", - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "version": "1.2.5" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/mkdirp/LICENSE b/tools/node_modules/eslint/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb01df66..00000000000000 --- a/tools/node_modules/eslint/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/mkdirp/bin/cmd.js b/tools/node_modules/eslint/node_modules/mkdirp/bin/cmd.js deleted file mode 100755 index d95de15ae9743f..00000000000000 --- a/tools/node_modules/eslint/node_modules/mkdirp/bin/cmd.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var mkdirp = require('../'); -var minimist = require('minimist'); -var fs = require('fs'); - -var argv = minimist(process.argv.slice(2), { - alias: { m: 'mode', h: 'help' }, - string: [ 'mode' ] -}); -if (argv.help) { - fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); - return; -} - -var paths = argv._.slice(); -var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; - -(function next () { - if (paths.length === 0) return; - var p = paths.shift(); - - if (mode === undefined) mkdirp(p, cb) - else mkdirp(p, mode, cb) - - function cb (err) { - if (err) { - console.error(err.message); - process.exit(1); - } - else next(); - } -})(); diff --git a/tools/node_modules/eslint/node_modules/mkdirp/bin/usage.txt b/tools/node_modules/eslint/node_modules/mkdirp/bin/usage.txt deleted file mode 100644 index f952aa2c7a979e..00000000000000 --- a/tools/node_modules/eslint/node_modules/mkdirp/bin/usage.txt +++ /dev/null @@ -1,12 +0,0 @@ -usage: mkdirp [DIR1,DIR2..] {OPTIONS} - - Create each supplied directory including any necessary parent directories that - don't yet exist. - - If the directory already exists, do nothing. - -OPTIONS are: - - -m, --mode If a directory needs to be created, set the mode as an octal - permission string. - diff --git a/tools/node_modules/eslint/node_modules/mkdirp/index.js b/tools/node_modules/eslint/node_modules/mkdirp/index.js deleted file mode 100644 index 468d7cd8df53be..00000000000000 --- a/tools/node_modules/eslint/node_modules/mkdirp/index.js +++ /dev/null @@ -1,99 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var _0777 = parseInt('0777', 8); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, opts, f, made) { - if (typeof opts === 'function') { - f = opts; - opts = {}; - } - else if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 - } - if (!made) made = null; - - var cb = f || function () {}; - p = path.resolve(p); - - xfs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - if (path.dirname(p) === p) return cb(er); - mkdirP(path.dirname(p), opts, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, opts, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 - } - if (!made) made = null; - - p = path.resolve(p); - - try { - xfs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), opts, made); - sync(p, opts, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = xfs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/tools/node_modules/eslint/node_modules/mkdirp/package.json b/tools/node_modules/eslint/node_modules/mkdirp/package.json deleted file mode 100644 index 3b84c165051922..00000000000000 --- a/tools/node_modules/eslint/node_modules/mkdirp/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "bundleDependencies": false, - "dependencies": { - "minimist": "^1.2.5" - }, - "deprecated": false, - "description": "Recursively mkdir, like `mkdir -p`", - "devDependencies": { - "mock-fs": "^3.7.0", - "tap": "^5.4.2" - }, - "files": [ - "bin", - "index.js" - ], - "homepage": "https://github.com/substack/node-mkdirp#readme", - "keywords": [ - "mkdir", - "directory" - ], - "license": "MIT", - "main": "index.js", - "name": "mkdirp", - "publishConfig": { - "tag": "legacy" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "0.5.5" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/mkdirp/readme.markdown b/tools/node_modules/eslint/node_modules/mkdirp/readme.markdown deleted file mode 100644 index fc314bfbd662cf..00000000000000 --- a/tools/node_modules/eslint/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,100 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, opts, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `opts.mode`. If `opts` is a non-object, it will be treated as -the `opts.mode`. - -If `opts.mode` isn't specified, it defaults to `0777`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -You can optionally pass in an alternate `fs` implementation by passing in -`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and -`opts.fs.stat(path, cb)`. - -## mkdirp.sync(dir, opts) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `opts.mode`. If `opts` is a non-object, it will be -treated as the `opts.mode`. - -If `opts.mode` isn't specified, it defaults to `0777`. - -Returns the first directory that had to be created, if any. - -You can optionally pass in an alternate `fs` implementation by passing in -`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and -`opts.fs.statSync(path)`. - -# usage - -This package also ships with a `mkdirp` command. - -``` -usage: mkdirp [DIR1,DIR2..] {OPTIONS} - - Create each supplied directory including any necessary parent directories that - don't yet exist. - - If the directory already exists, do nothing. - -OPTIONS are: - - -m, --mode If a directory needs to be created, set the mode as an octal - permission string. - -``` - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -to get the library, or - -``` -npm install -g mkdirp -``` - -to get the command. - -# license - -MIT diff --git a/tools/node_modules/eslint/node_modules/rimraf/bin.js b/tools/node_modules/eslint/node_modules/rimraf/bin.js index 0d1e17be701ec3..023814cc93e849 100755 --- a/tools/node_modules/eslint/node_modules/rimraf/bin.js +++ b/tools/node_modules/eslint/node_modules/rimraf/bin.js @@ -1,11 +1,24 @@ #!/usr/bin/env node -var rimraf = require('./') +const rimraf = require('./') -var help = false -var dashdash = false -var noglob = false -var args = process.argv.slice(2).filter(function(arg) { +const path = require('path') + +const isRoot = arg => /^(\/|[a-zA-Z]:\\)$/.test(path.resolve(arg)) +const filterOutRoot = arg => { + const ok = preserveRoot === false || !isRoot(arg) + if (!ok) { + console.error(`refusing to remove ${arg}`) + console.error('Set --no-preserve-root to allow this') + } + return ok +} + +let help = false +let dashdash = false +let noglob = false +let preserveRoot = true +const args = process.argv.slice(2).filter(arg => { if (dashdash) return !!arg else if (arg === '--') @@ -16,35 +29,40 @@ var args = process.argv.slice(2).filter(function(arg) { noglob = false else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) help = true + else if (arg === '--preserve-root') + preserveRoot = true + else if (arg === '--no-preserve-root') + preserveRoot = false else return !!arg -}) +}).filter(arg => !preserveRoot || filterOutRoot(arg)) + +const go = n => { + if (n >= args.length) + return + const options = noglob ? { glob: false } : {} + rimraf(args[n], options, er => { + if (er) + throw er + go(n+1) + }) +} if (help || args.length === 0) { // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error + const log = help ? console.log : console.error log('Usage: rimraf [ ...]') log('') log(' Deletes all files and folders at "path" recursively.') log('') log('Options:') log('') - log(' -h, --help Display this usage info') - log(' -G, --no-glob Do not expand glob patterns in arguments') - log(' -g, --glob Expand glob patterns in arguments (default)') + log(' -h, --help Display this usage info') + log(' -G, --no-glob Do not expand glob patterns in arguments') + log(' -g, --glob Expand glob patterns in arguments (default)') + log(' --preserve-root Do not remove \'/\' (default)') + log(' --no-preserve-root Do not treat \'/\' specially') + log(' -- Stop parsing flags') process.exit(help ? 0 : 1) } else go(0) - -function go (n) { - if (n >= args.length) - return - var options = {} - if (noglob) - options = { glob: false } - rimraf(args[n], options, function (er) { - if (er) - throw er - go(n+1) - }) -} diff --git a/tools/node_modules/eslint/node_modules/rimraf/package.json b/tools/node_modules/eslint/node_modules/rimraf/package.json index 26432b9d35a0b0..036517586b227f 100644 --- a/tools/node_modules/eslint/node_modules/rimraf/package.json +++ b/tools/node_modules/eslint/node_modules/rimraf/package.json @@ -26,6 +26,9 @@ "bin.js", "rimraf.js" ], + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, "homepage": "https://github.com/isaacs/rimraf#readme", "license": "ISC", "main": "rimraf.js", @@ -35,10 +38,10 @@ "url": "git://github.com/isaacs/rimraf.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", "test": "tap test/*.js" }, - "version": "2.6.3" + "version": "3.0.2" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/rimraf/rimraf.js b/tools/node_modules/eslint/node_modules/rimraf/rimraf.js index e80dd10693f8f6..34da4171d75598 100644 --- a/tools/node_modules/eslint/node_modules/rimraf/rimraf.js +++ b/tools/node_modules/eslint/node_modules/rimraf/rimraf.js @@ -1,24 +1,25 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var assert = require("assert") -var path = require("path") -var fs = require("fs") -var glob = require("glob") -var _0666 = parseInt('666', 8) +const assert = require("assert") +const path = require("path") +const fs = require("fs") +let glob = undefined +try { + glob = require("glob") +} catch (_err) { + // treat glob as optional. +} -var defaultGlobOpts = { +const defaultGlobOpts = { nosort: true, silent: true } // for EMFILE handling -var timeout = 0 +let timeout = 0 -var isWindows = (process.platform === "win32") +const isWindows = (process.platform === "win32") -function defaults (options) { - var methods = [ +const defaults = options => { + const methods = [ 'unlink', 'chmod', 'stat', @@ -26,7 +27,7 @@ function defaults (options) { 'rmdir', 'readdir' ] - methods.forEach(function(m) { + methods.forEach(m => { options[m] = options[m] || fs[m] m = m + 'Sync' options[m] = options[m] || fs[m] @@ -37,11 +38,14 @@ function defaults (options) { if (options.glob === false) { options.disableGlob = true } + if (options.disableGlob !== true && glob === undefined) { + throw Error('glob dependency not found, set `options.disableGlob = true` if intentional') + } options.disableGlob = options.disableGlob || false options.glob = options.glob || defaultGlobOpts } -function rimraf (p, options, cb) { +const rimraf = (p, options, cb) => { if (typeof options === 'function') { cb = options options = {} @@ -55,27 +59,17 @@ function rimraf (p, options, cb) { defaults(options) - var busyTries = 0 - var errState = null - var n = 0 - - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]) + let busyTries = 0 + let errState = null + let n = 0 - options.lstat(p, function (er, stat) { - if (!er) - return afterGlob(null, [p]) - - glob(p, options.glob, afterGlob) - }) - - function next (er) { + const next = (er) => { errState = errState || er if (--n === 0) cb(errState) } - function afterGlob (er, results) { + const afterGlob = (er, results) => { if (er) return cb(er) @@ -83,24 +77,19 @@ function rimraf (p, options, cb) { if (n === 0) return cb() - results.forEach(function (p) { - rimraf_(p, options, function CB (er) { + results.forEach(p => { + const CB = (er) => { if (er) { if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) { busyTries ++ - var time = busyTries * 100 // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, options, CB) - }, time) + return setTimeout(() => rimraf_(p, options, CB), busyTries * 100) } // this one won't happen if graceful-fs is used. if (er.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(function () { - rimraf_(p, options, CB) - }, timeout ++) + return setTimeout(() => rimraf_(p, options, CB), timeout ++) } // already gone @@ -109,9 +98,21 @@ function rimraf (p, options, cb) { timeout = 0 next(er) - }) + } + rimraf_(p, options, CB) }) } + + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]) + + options.lstat(p, (er, stat) => { + if (!er) + return afterGlob(null, [p]) + + glob(p, options.glob, afterGlob) + }) + } // Two possible strategies. @@ -125,14 +126,14 @@ function rimraf (p, options, cb) { // // If anyone ever complains about this, then I guess the strategy could // be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, options, cb) { +const rimraf_ = (p, options, cb) => { assert(p) assert(options) assert(typeof cb === 'function') // sunos lets the root user unlink directories, which is... weird. // so we have to lstat here and make sure it's not a dir. - options.lstat(p, function (er, st) { + options.lstat(p, (er, st) => { if (er && er.code === "ENOENT") return cb(null) @@ -143,7 +144,7 @@ function rimraf_ (p, options, cb) { if (st && st.isDirectory()) return rmdir(p, options, er, cb) - options.unlink(p, function (er) { + options.unlink(p, er => { if (er) { if (er.code === "ENOENT") return cb(null) @@ -159,18 +160,16 @@ function rimraf_ (p, options, cb) { }) } -function fixWinEPERM (p, options, er, cb) { +const fixWinEPERM = (p, options, er, cb) => { assert(p) assert(options) assert(typeof cb === 'function') - if (er) - assert(er instanceof Error) - options.chmod(p, _0666, function (er2) { + options.chmod(p, 0o666, er2 => { if (er2) cb(er2.code === "ENOENT" ? null : er) else - options.stat(p, function(er3, stats) { + options.stat(p, (er3, stats) => { if (er3) cb(er3.code === "ENOENT" ? null : er) else if (stats.isDirectory()) @@ -181,14 +180,12 @@ function fixWinEPERM (p, options, er, cb) { }) } -function fixWinEPERMSync (p, options, er) { +const fixWinEPERMSync = (p, options, er) => { assert(p) assert(options) - if (er) - assert(er instanceof Error) try { - options.chmodSync(p, _0666) + options.chmodSync(p, 0o666) } catch (er2) { if (er2.code === "ENOENT") return @@ -196,8 +193,9 @@ function fixWinEPERMSync (p, options, er) { throw er } + let stats try { - var stats = options.statSync(p) + stats = options.statSync(p) } catch (er3) { if (er3.code === "ENOENT") return @@ -211,17 +209,15 @@ function fixWinEPERMSync (p, options, er) { options.unlinkSync(p) } -function rmdir (p, options, originalEr, cb) { +const rmdir = (p, options, originalEr, cb) => { assert(p) assert(options) - if (originalEr) - assert(originalEr instanceof Error) assert(typeof cb === 'function') // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) // if we guessed wrong, and it's not a directory, then // raise the original error. - options.rmdir(p, function (er) { + options.rmdir(p, er => { if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) rmkids(p, options, cb) else if (er && er.code === "ENOTDIR") @@ -231,20 +227,20 @@ function rmdir (p, options, originalEr, cb) { }) } -function rmkids(p, options, cb) { +const rmkids = (p, options, cb) => { assert(p) assert(options) assert(typeof cb === 'function') - options.readdir(p, function (er, files) { + options.readdir(p, (er, files) => { if (er) return cb(er) - var n = files.length + let n = files.length if (n === 0) return options.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), options, function (er) { + let errState + files.forEach(f => { + rimraf(path.join(p, f), options, er => { if (errState) return if (er) @@ -259,7 +255,7 @@ function rmkids(p, options, cb) { // this looks simpler, and is strictly *faster*, but will // tie up the JavaScript thread and fail on excessively // deep directory trees. -function rimrafSync (p, options) { +const rimrafSync = (p, options) => { options = options || {} defaults(options) @@ -268,7 +264,7 @@ function rimrafSync (p, options) { assert(options, 'rimraf: missing options') assert.equal(typeof options, 'object', 'rimraf: options should be object') - var results + let results if (options.disableGlob || !glob.hasMagic(p)) { results = [p] @@ -284,11 +280,12 @@ function rimrafSync (p, options) { if (!results.length) return - for (var i = 0; i < results.length; i++) { - var p = results[i] + for (let i = 0; i < results.length; i++) { + const p = results[i] + let st try { - var st = options.lstatSync(p) + st = options.lstatSync(p) } catch (er) { if (er.code === "ENOENT") return @@ -317,11 +314,9 @@ function rimrafSync (p, options) { } } -function rmdirSync (p, options, originalEr) { +const rmdirSync = (p, options, originalEr) => { assert(p) assert(options) - if (originalEr) - assert(originalEr instanceof Error) try { options.rmdirSync(p) @@ -335,12 +330,10 @@ function rmdirSync (p, options, originalEr) { } } -function rmkidsSync (p, options) { +const rmkidsSync = (p, options) => { assert(p) assert(options) - options.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f), options) - }) + options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options)) // We only end up here once we got ENOTEMPTY at least once, and // at this point, we are guaranteed to have removed all the kids. @@ -348,12 +341,12 @@ function rmkidsSync (p, options) { // try really hard to delete stuff on windows, because it has a // PROFOUNDLY annoying habit of not closing handles promptly when // files are deleted, resulting in spurious ENOTEMPTY errors. - var retries = isWindows ? 100 : 1 - var i = 0 + const retries = isWindows ? 100 : 1 + let i = 0 do { - var threw = true + let threw = true try { - var ret = options.rmdirSync(p, options) + const ret = options.rmdirSync(p, options) threw = false return ret } finally { @@ -362,3 +355,6 @@ function rmkidsSync (p, options) { } } while (true) } + +module.exports = rimraf +rimraf.sync = rimrafSync diff --git a/tools/node_modules/eslint/node_modules/semver/classes/comparator.js b/tools/node_modules/eslint/node_modules/semver/classes/comparator.js index 3595792d0ed0cc..dbbef2d8fe20e6 100644 --- a/tools/node_modules/eslint/node_modules/semver/classes/comparator.js +++ b/tools/node_modules/eslint/node_modules/semver/classes/comparator.js @@ -5,12 +5,7 @@ class Comparator { return ANY } constructor (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } + options = parseOptions(options) if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { @@ -132,6 +127,7 @@ class Comparator { module.exports = Comparator +const parseOptions = require('../internal/parse-options') const {re, t} = require('../internal/re') const cmp = require('../functions/cmp') const debug = require('../internal/debug') diff --git a/tools/node_modules/eslint/node_modules/semver/classes/range.js b/tools/node_modules/eslint/node_modules/semver/classes/range.js index 83f8967717ebbf..aa04f6bff94461 100644 --- a/tools/node_modules/eslint/node_modules/semver/classes/range.js +++ b/tools/node_modules/eslint/node_modules/semver/classes/range.js @@ -1,12 +1,7 @@ // hoisted class for cyclic dependency class Range { constructor (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } + options = parseOptions(options) if (range instanceof Range) { if ( @@ -46,6 +41,24 @@ class Range { throw new TypeError(`Invalid SemVer Range: ${range}`) } + // if we have any that are not the null set, throw out null sets. + if (this.set.length > 1) { + // keep the first one, in case they're all null sets + const first = this.set[0] + this.set = this.set.filter(c => !isNullSet(c[0])) + if (this.set.length === 0) + this.set = [first] + else if (this.set.length > 1) { + // if we have any that are *, then the range is just * + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } + } + } + } + this.format() } @@ -64,8 +77,17 @@ class Range { } parseRange (range) { - const loose = this.options.loose range = range.trim() + + // memoize range parsing for performance. + // this is a very hot path, and fully deterministic. + const memoOpts = Object.keys(this.options).join(',') + const memoKey = `parseRange:${memoOpts}:${range}` + const cached = cache.get(memoKey) + if (cached) + return cached + + const loose = this.options.loose // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) @@ -87,15 +109,33 @@ class Range { // ready to be split into comparators. const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - return range + const rangeList = range .split(' ') .map(comp => parseComparator(comp, this.options)) .join(' ') .split(/\s+/) + // >=0.0.0 is equivalent to * .map(comp => replaceGTE0(comp, this.options)) // in loose mode, throw out any that are not valid comparators .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) .map(comp => new Comparator(comp, this.options)) + + // if any comparators are the null set, then replace with JUST null set + // if more than one comparator, remove any * comparators + // also, don't include the same comparator more than once + const l = rangeList.length + const rangeMap = new Map() + for (const comp of rangeList) { + if (isNullSet(comp)) + return [comp] + rangeMap.set(comp.value, comp) + } + if (rangeMap.size > 1 && rangeMap.has('')) + rangeMap.delete('') + + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result } intersects (range, options) { @@ -144,6 +184,10 @@ class Range { } module.exports = Range +const LRU = require('lru-cache') +const cache = new LRU({ max: 1000 }) + +const parseOptions = require('../internal/parse-options') const Comparator = require('./comparator') const debug = require('../internal/debug') const SemVer = require('./semver') @@ -155,6 +199,9 @@ const { caretTrimReplace } = require('../internal/re') +const isNullSet = c => c.value === '<0.0.0-0' +const isAny = c => c.value === '' + // take a set of comparators and determine whether there // exists a version which can satisfy it const isSatisfiable = (comparators, options) => { diff --git a/tools/node_modules/eslint/node_modules/semver/classes/semver.js b/tools/node_modules/eslint/node_modules/semver/classes/semver.js index 73247ad2b7eabc..ed81a7ec6cbfe6 100644 --- a/tools/node_modules/eslint/node_modules/semver/classes/semver.js +++ b/tools/node_modules/eslint/node_modules/semver/classes/semver.js @@ -2,15 +2,12 @@ const debug = require('../internal/debug') const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants') const { re, t } = require('../internal/re') +const parseOptions = require('../internal/parse-options') const { compareIdentifiers } = require('../internal/identifiers') class SemVer { constructor (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } + options = parseOptions(options) + if (version instanceof SemVer) { if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) { diff --git a/tools/node_modules/eslint/node_modules/semver/functions/parse.js b/tools/node_modules/eslint/node_modules/semver/functions/parse.js index 457fee04a95c83..11f20f03745ab2 100644 --- a/tools/node_modules/eslint/node_modules/semver/functions/parse.js +++ b/tools/node_modules/eslint/node_modules/semver/functions/parse.js @@ -2,13 +2,9 @@ const {MAX_LENGTH} = require('../internal/constants') const { re, t } = require('../internal/re') const SemVer = require('../classes/semver') +const parseOptions = require('../internal/parse-options') const parse = (version, options) => { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } + options = parseOptions(options) if (version instanceof SemVer) { return version diff --git a/tools/node_modules/eslint/node_modules/semver/internal/parse-options.js b/tools/node_modules/eslint/node_modules/semver/internal/parse-options.js new file mode 100644 index 00000000000000..42d2ebd6fa32f8 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/semver/internal/parse-options.js @@ -0,0 +1,11 @@ +// parse out just the options we care about so we always get a consistent +// obj with keys in a consistent order. +const opts = ['includePrerelease', 'loose', 'rtl'] +const parseOptions = options => + !options ? {} + : typeof options !== 'object' ? { loose: true } + : opts.filter(k => options[k]).reduce((options, k) => { + options[k] = true + return options + }, {}) +module.exports = parseOptions diff --git a/tools/node_modules/eslint/node_modules/semver/package.json b/tools/node_modules/eslint/node_modules/semver/package.json index a45cbad6a9c2d2..2aa14e5a6dd7e9 100644 --- a/tools/node_modules/eslint/node_modules/semver/package.json +++ b/tools/node_modules/eslint/node_modules/semver/package.json @@ -6,6 +6,9 @@ "url": "https://github.com/npm/node-semver/issues" }, "bundleDependencies": false, + "dependencies": { + "lru-cache": "^6.0.0" + }, "deprecated": false, "description": "The semantic version parser used by npm.", "devDependencies": { @@ -43,5 +46,5 @@ "check-coverage": true, "coverage-map": "map.js" }, - "version": "7.3.2" + "version": "7.3.4" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/semver/ranges/min-version.js b/tools/node_modules/eslint/node_modules/semver/ranges/min-version.js index 7118d237bf5c41..2fac412914fe25 100644 --- a/tools/node_modules/eslint/node_modules/semver/ranges/min-version.js +++ b/tools/node_modules/eslint/node_modules/semver/ranges/min-version.js @@ -19,6 +19,7 @@ const minVersion = (range, loose) => { for (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i] + let setMin = null comparators.forEach((comparator) => { // Clone to avoid manipulating the comparator's semver object. const compver = new SemVer(comparator.semver.version) @@ -33,8 +34,8 @@ const minVersion = (range, loose) => { /* fallthrough */ case '': case '>=': - if (!minver || gt(minver, compver)) { - minver = compver + if (!setMin || gt(compver, setMin)) { + setMin = compver } break case '<': @@ -46,6 +47,8 @@ const minVersion = (range, loose) => { throw new Error(`Unexpected operation: ${comparator.operator}`) } }) + if (setMin && (!minver || gt(minver, setMin))) + minver = setMin } if (minver && range.test(minver)) { diff --git a/tools/node_modules/eslint/node_modules/semver/ranges/outside.js b/tools/node_modules/eslint/node_modules/semver/ranges/outside.js index e35ed1176c84ed..2a4b0a13f9e298 100644 --- a/tools/node_modules/eslint/node_modules/semver/ranges/outside.js +++ b/tools/node_modules/eslint/node_modules/semver/ranges/outside.js @@ -32,7 +32,7 @@ const outside = (version, range, hilo, options) => { throw new TypeError('Must provide a hilo val of "<" or ">"') } - // If it satisifes the range it is not outside + // If it satisfies the range it is not outside if (satisfies(version, range, options)) { return false } diff --git a/tools/node_modules/eslint/node_modules/semver/ranges/subset.js b/tools/node_modules/eslint/node_modules/semver/ranges/subset.js index 6ae29a3c92b892..bb7d15fe2696bb 100644 --- a/tools/node_modules/eslint/node_modules/semver/ranges/subset.js +++ b/tools/node_modules/eslint/node_modules/semver/ranges/subset.js @@ -21,15 +21,18 @@ const compare = require('../functions/compare.js') // - If EQ satisfies every C, return true // - Else return false // - If GT -// - If GT is lower than any > or >= comp in C, return false +// - If GT.semver is lower than any > or >= comp in C, return false // - If GT is >=, and GT.semver does not satisfy every C, return false // - If LT -// - If LT.semver is greater than that of any > comp in C, return false +// - If LT.semver is greater than any < or <= comp in C, return false // - If LT is <=, and LT.semver does not satisfy every C, return false // - If any C is a = range, and GT or LT are set, return false // - Else return true const subset = (sub, dom, options) => { + if (sub === dom) + return true + sub = new Range(sub, options) dom = new Range(dom, options) let sawNonNull = false @@ -52,6 +55,9 @@ const subset = (sub, dom, options) => { } const simpleSubset = (sub, dom, options) => { + if (sub === dom) + return true + if (sub.length === 1 && sub[0].semver === ANY) return dom.length === 1 && dom[0].semver === ANY @@ -90,6 +96,7 @@ const simpleSubset = (sub, dom, options) => { if (!satisfies(eq, String(c), options)) return false } + return true } @@ -101,7 +108,7 @@ const simpleSubset = (sub, dom, options) => { if (gt) { if (c.operator === '>' || c.operator === '>=') { higher = higherGT(gt, c, options) - if (higher === c) + if (higher === c && higher !== gt) return false } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) return false @@ -109,7 +116,7 @@ const simpleSubset = (sub, dom, options) => { if (lt) { if (c.operator === '<' || c.operator === '<=') { lower = lowerLT(lt, c, options) - if (lower === c) + if (lower === c && lower !== lt) return false } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) return false diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/index.js b/tools/node_modules/eslint/node_modules/slice-ansi/index.js index a8765e11878ad0..72d37d9a588ace 100755 --- a/tools/node_modules/eslint/node_modules/slice-ansi/index.js +++ b/tools/node_modules/eslint/node_modules/slice-ansi/index.js @@ -8,49 +8,93 @@ const ESCAPES = [ '\u009B' ]; -const END_CODE = 39; - const wrapAnsi = code => `${ESCAPES[0]}[${code}m`; -module.exports = (str, begin, end) => { - const arr = [...str.normalize()]; +const checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => { + let output = []; + ansiCodes = [...ansiCodes]; + + for (let ansiCode of ansiCodes) { + const ansiCodeOrigin = ansiCode; + if (ansiCode.includes(';')) { + ansiCode = ansiCode.split(';')[0][0] + '0'; + } + + const item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10)); + if (item) { + const indexEscape = ansiCodes.indexOf(item.toString()); + if (indexEscape === -1) { + output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin)); + } else { + ansiCodes.splice(indexEscape, 1); + } + } else if (isEscapes) { + output.push(wrapAnsi(0)); + break; + } else { + output.push(wrapAnsi(ansiCodeOrigin)); + } + } - end = typeof end === 'number' ? end : arr.length; + if (isEscapes) { + output = output.filter((element, index) => output.indexOf(element) === index); - let insideEscape = false; - let escapeCode = null; + if (endAnsiCode !== undefined) { + const fistEscapeCode = wrapAnsi(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10))); + output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []); + } + } + + return output.join(''); +}; + +module.exports = (string, begin, end) => { + const characters = [...string]; + const ansiCodes = []; + + let stringEnd = typeof end === 'number' ? end : characters.length; + let isInsideEscape = false; + let ansiCode; let visible = 0; let output = ''; - for (const [i, x] of arr.entries()) { + for (const [index, character] of characters.entries()) { let leftEscape = false; - if (ESCAPES.includes(x)) { - insideEscape = true; - const code = /\d[^m]*/.exec(str.slice(i, i + 18)); - escapeCode = code === END_CODE ? null : code; - } else if (insideEscape && x === 'm') { - insideEscape = false; + if (ESCAPES.includes(character)) { + const code = /\d[^m]*/.exec(string.slice(index, index + 18)); + ansiCode = code && code.length > 0 ? code[0] : undefined; + + if (visible < stringEnd) { + isInsideEscape = true; + + if (ansiCode !== undefined) { + ansiCodes.push(ansiCode); + } + } + } else if (isInsideEscape && character === 'm') { + isInsideEscape = false; leftEscape = true; } - if (!insideEscape && !leftEscape) { - ++visible; + if (!isInsideEscape && !leftEscape) { + visible++; } - if (!astralRegex({exact: true}).test(x) && isFullwidthCodePoint(x.codePointAt())) { - ++visible; - } + if (!astralRegex({exact: true}).test(character) && isFullwidthCodePoint(character.codePointAt())) { + visible++; - if (visible > begin && visible <= end) { - output += x; - } else if (visible === begin && !insideEscape && escapeCode !== null && escapeCode !== END_CODE) { - output += wrapAnsi(escapeCode); - } else if (visible >= end) { - if (escapeCode !== null) { - output += wrapAnsi(ansiStyles.codes.get(parseInt(escapeCode, 10)) || END_CODE); + if (typeof end !== 'number') { + stringEnd++; } + } + if (visible > begin && visible <= stringEnd) { + output += character; + } else if (visible === begin && !isInsideEscape && ansiCode !== undefined) { + output = checkAnsi(ansiCodes); + } else if (visible >= stringEnd) { + output += checkAnsi(ansiCodes, true, ansiCode); break; } } diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/license b/tools/node_modules/eslint/node_modules/slice-ansi/license index 4d726339ce36f4..e05b33c5573095 100644 --- a/tools/node_modules/eslint/node_modules/slice-ansi/license +++ b/tools/node_modules/eslint/node_modules/slice-ansi/license @@ -1,6 +1,7 @@ MIT License Copyright (c) DC +Copyright (c) Sindre Sorhus (https://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/index.js b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/index.js new file mode 100644 index 00000000000000..5d82581a13f990 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/index.js @@ -0,0 +1,163 @@ +'use strict'; + +const wrapAnsi16 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => (...args) => { + const rgb = fn(...args); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +const ansi2ansi = n => n; +const rgb2rgb = (r, g, b) => [r, g, b]; + +const setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + + return value; + }, + enumerable: true, + configurable: true + }); +}; + +/** @type {typeof import('color-convert')} */ +let colorConvert; +const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === undefined) { + colorConvert = require('color-convert'); + } + + const offset = isBackground ? 10 : 0; + const styles = {}; + + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === 'object') { + styles[name] = wrap(suite[targetSpace], offset); + } + } + + return styles; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Alias bright black as gray (and grey) + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); + setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/license b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/license similarity index 100% rename from tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/license rename to tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/license diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/package.json b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/package.json new file mode 100644 index 00000000000000..d276e03d2549c8 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/package.json @@ -0,0 +1,65 @@ +{ + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "bundleDependencies": false, + "dependencies": { + "color-convert": "^2.0.1" + }, + "deprecated": false, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", + "svg-term-cli": "^2.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, + "engines": { + "node": ">=8" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "homepage": "https://github.com/chalk/ansi-styles#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" + }, + "scripts": { + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", + "test": "xo && ava && tsd" + }, + "version": "4.3.0" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/readme.md b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000000000..24883de808be6a --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/ansi-styles/readme.md @@ -0,0 +1,152 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + + + +## Install + +``` +$ npm install ansi-styles +``` + +## Usage + +```js +const style = require('ansi-styles'); + +console.log(`${style.green.open}Hello world!${style.green.close}`); + + +// Color conversion between 16/256/truecolor +// NOTE: If conversion goes to 16 colors or 256 colors, the original color +// may be degraded to fit that color palette. This means terminals +// that do not support 16 million colors will best-match the +// original color. +console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); +console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); +console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close); +``` + +## API + +Each style has an `open` and `close` property. + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(Not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(Not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `blackBright` (alias: `gray`, `grey`) +- `redBright` +- `greenBright` +- `yellowBright` +- `blueBright` +- `magentaBright` +- `cyanBright` +- `whiteBright` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` +- `bgBlackBright` (alias: `bgGray`, `bgGrey`) +- `bgRedBright` +- `bgGreenBright` +- `bgYellowBright` +- `bgBlueBright` +- `bgMagentaBright` +- `bgCyanBright` +- `bgWhiteBright` + +## Advanced usage + +By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `style.modifier` +- `style.color` +- `style.bgColor` + +###### Example + +```js +console.log(style.color.green.open); +``` + +Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. + +###### Example + +```js +console.log(style.codes.get(36)); +//=> 39 +``` + +## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) + +`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. + +The following color spaces from `color-convert` are supported: + +- `rgb` +- `hex` +- `keyword` +- `hsl` +- `hsv` +- `hwb` +- `ansi` +- `ansi256` + +To use these, call the associated conversion function with the intended output, for example: + +```js +style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code +style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code + +style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code +style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code + +style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code +style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code +``` + +## Related + +- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + +## For enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/LICENSE b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/LICENSE new file mode 100644 index 00000000000000..5b4c386f9269b3 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2011-2016 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/README.md b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/README.md new file mode 100644 index 00000000000000..d4b08fc369948d --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/README.md @@ -0,0 +1,68 @@ +# color-convert + +[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) + +Color-convert is a color conversion library for JavaScript and node. +It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): + +```js +var convert = require('color-convert'); + +convert.rgb.hsl(140, 200, 100); // [96, 48, 59] +convert.keyword.rgb('blue'); // [0, 0, 255] + +var rgbChannels = convert.rgb.channels; // 3 +var cmykChannels = convert.cmyk.channels; // 4 +var ansiChannels = convert.ansi16.channels; // 1 +``` + +# Install + +```console +$ npm install color-convert +``` + +# API + +Simply get the property of the _from_ and _to_ conversion that you're looking for. + +All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. + +All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). + +```js +var convert = require('color-convert'); + +// Hex to LAB +convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] +convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] + +// RGB to CMYK +convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] +convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] +``` + +### Arrays +All functions that accept multiple arguments also support passing an array. + +Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) + +```js +var convert = require('color-convert'); + +convert.rgb.hex(123, 45, 67); // '7B2D43' +convert.rgb.hex([123, 45, 67]); // '7B2D43' +``` + +## Routing + +Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). + +Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). + +# Contribute + +If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. + +# License +Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/conversions.js b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/conversions.js new file mode 100644 index 00000000000000..2657f265c9e102 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/conversions.js @@ -0,0 +1,839 @@ +/* MIT license */ +/* eslint-disable no-mixed-operators */ +const cssKeywords = require('color-name'); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +const reverseKeywords = {}; +for (const key of Object.keys(cssKeywords)) { + reverseKeywords[cssKeywords[key]] = key; +} + +const convert = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +module.exports = convert; + +// Hide .channels and .labels properties +for (const model of Object.keys(convert)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + const {channels, labels} = convert[model]; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); +} + +convert.rgb.hsl = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const min = Math.min(r, g, b); + const max = Math.max(r, g, b); + const delta = max - min; + let h; + let s; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + const l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + let rdif; + let gdif; + let bdif; + let h; + let s; + + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const v = Math.max(r, g, b); + const diff = v - Math.min(r, g, b); + const diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = 0; + s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + const r = rgb[0]; + const g = rgb[1]; + let b = rgb[2]; + const h = convert.rgb.hsl(rgb)[0]; + const w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + + const k = Math.min(1 - r, 1 - g, 1 - b); + const c = (1 - r - k) / (1 - k) || 0; + const m = (1 - g - k) / (1 - k) || 0; + const y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +function comparativeDistance(x, y) { + /* + See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + */ + return ( + ((x[0] - y[0]) ** 2) + + ((x[1] - y[1]) ** 2) + + ((x[2] - y[2]) ** 2) + ); +} + +convert.rgb.keyword = function (rgb) { + const reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + let currentClosestDistance = Infinity; + let currentClosestKeyword; + + for (const keyword of Object.keys(cssKeywords)) { + const value = cssKeywords[keyword]; + + // Compute comparative distance + const distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + let r = rgb[0] / 255; + let g = rgb[1] / 255; + let b = rgb[2] / 255; + + // Assume sRGB + r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); + g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); + b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); + + const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + const xyz = convert.rgb.xyz(rgb); + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + const h = hsl[0] / 360; + const s = hsl[1] / 100; + const l = hsl[2] / 100; + let t2; + let t3; + let val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + const t1 = 2 * l - t2; + + const rgb = [0, 0, 0]; + for (let i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + const h = hsl[0]; + let s = hsl[1] / 100; + let l = hsl[2] / 100; + let smin = s; + const lmin = Math.max(l, 0.01); + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + const v = (l + s) / 2; + const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + const h = hsv[0] / 60; + const s = hsv[1] / 100; + let v = hsv[2] / 100; + const hi = Math.floor(h) % 6; + + const f = h - Math.floor(h); + const p = 255 * v * (1 - s); + const q = 255 * v * (1 - (s * f)); + const t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + const h = hsv[0]; + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const vmin = Math.max(v, 0.01); + let sl; + let l; + + l = (2 - s) * v; + const lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + const h = hwb[0] / 360; + let wh = hwb[1] / 100; + let bl = hwb[2] / 100; + const ratio = wh + bl; + let f; + + // Wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + const i = Math.floor(6 * h); + const v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + const n = wh + f * (v - wh); // Linear interpolation + + let r; + let g; + let b; + /* eslint-disable max-statements-per-line,no-multi-spaces */ + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + /* eslint-enable max-statements-per-line,no-multi-spaces */ + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + const c = cmyk[0] / 100; + const m = cmyk[1] / 100; + const y = cmyk[2] / 100; + const k = cmyk[3] / 100; + + const r = 1 - Math.min(1, c * (1 - k) + k); + const g = 1 - Math.min(1, m * (1 - k) + k); + const b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + const x = xyz[0] / 100; + const y = xyz[1] / 100; + const z = xyz[2] / 100; + let r; + let g; + let b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // Assume sRGB + r = r > 0.0031308 + ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let x; + let y; + let z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + const y2 = y ** 3; + const x2 = x ** 3; + const z2 = z ** 3; + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let h; + + const hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + const c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + const l = lch[0]; + const c = lch[1]; + const h = lch[2]; + + const hr = h / 360 * 2 * Math.PI; + const a = c * Math.cos(hr); + const b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args, saturation = null) { + const [r, g, b] = args; + let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + let ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // Optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + const r = args[0]; + const g = args[1]; + const b = args[2]; + + // We use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + const ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + let color = args % 10; + + // Handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + const mult = (~~(args > 50) + 1) * 0.5; + const r = ((color & 1) * mult) * 255; + const g = (((color >> 1) & 1) * mult) * 255; + const b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // Handle greyscale + if (args >= 232) { + const c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + let rem; + const r = Math.floor(args / 36) / 5 * 255; + const g = Math.floor((rem = args % 36) / 6) / 5 * 255; + const b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + const integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + let colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(char => { + return char + char; + }).join(''); + } + + const integer = parseInt(colorString, 16); + const r = (integer >> 16) & 0xFF; + const g = (integer >> 8) & 0xFF; + const b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const max = Math.max(Math.max(r, g), b); + const min = Math.min(Math.min(r, g), b); + const chroma = (max - min); + let grayscale; + let hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + const s = hsl[1] / 100; + const l = hsl[2] / 100; + + const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); + + let f = 0; + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + const s = hsv[1] / 100; + const v = hsv[2] / 100; + + const c = s * v; + let f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + const h = hcg[0] / 360; + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + const pure = [0, 0, 0]; + const hi = (h % 1) * 6; + const v = hi % 1; + const w = 1 - v; + let mg = 0; + + /* eslint-disable max-statements-per-line */ + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + /* eslint-enable max-statements-per-line */ + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const v = c + g * (1.0 - c); + let f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const l = g * (1.0 - c) + 0.5 * c; + let s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + const w = hwb[1] / 100; + const b = hwb[2] / 100; + const v = 1 - b; + const c = v - w; + let g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hsv = convert.gray.hsl; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + const val = Math.round(gray[0] / 100 * 255) & 0xFF; + const integer = (val << 16) + (val << 8) + val; + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + const val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/index.js b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/index.js new file mode 100644 index 00000000000000..b648e5737be616 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/index.js @@ -0,0 +1,81 @@ +const conversions = require('./conversions'); +const route = require('./route'); + +const convert = {}; + +const models = Object.keys(conversions); + +function wrapRaw(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + return fn(args); + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + const result = fn(args); + + // We're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (let len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(fromModel => { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + const routes = route(fromModel); + const routeModels = Object.keys(routes); + + routeModels.forEach(toModel => { + const fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/package.json b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/package.json new file mode 100644 index 00000000000000..427616bd0587d8 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/package.json @@ -0,0 +1,60 @@ +{ + "author": { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + "bugs": { + "url": "https://github.com/Qix-/color-convert/issues" + }, + "bundleDependencies": false, + "dependencies": { + "color-name": "~1.1.4" + }, + "deprecated": false, + "description": "Plain color conversion functions", + "devDependencies": { + "chalk": "^2.4.2", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=7.0.0" + }, + "files": [ + "index.js", + "conversions.js", + "route.js" + ], + "homepage": "https://github.com/Qix-/color-convert#readme", + "keywords": [ + "color", + "colour", + "convert", + "converter", + "conversion", + "rgb", + "hsl", + "hsv", + "hwb", + "cmyk", + "ansi", + "ansi16" + ], + "license": "MIT", + "name": "color-convert", + "repository": { + "type": "git", + "url": "git+https://github.com/Qix-/color-convert.git" + }, + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "version": "2.0.1", + "xo": { + "rules": { + "default-case": 0, + "no-inline-comments": 0, + "operator-linebreak": 0 + } + } +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/route.js b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/route.js new file mode 100644 index 00000000000000..1a08521b5a0017 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-convert/route.js @@ -0,0 +1,97 @@ +const conversions = require('./conversions'); + +/* + This function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + const graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + const models = Object.keys(conversions); + + for (let len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + const graph = buildGraph(); + const queue = [fromModel]; // Unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + const current = queue.pop(); + const adjacents = Object.keys(conversions[current]); + + for (let len = adjacents.length, i = 0; i < len; i++) { + const adjacent = adjacents[i]; + const node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + const path = [graph[toModel].parent, toModel]; + let fn = conversions[graph[toModel].parent][toModel]; + + let cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +module.exports = function (fromModel) { + const graph = deriveBFS(fromModel); + const conversion = {}; + + const models = Object.keys(graph); + for (let len = models.length, i = 0; i < len; i++) { + const toModel = models[i]; + const node = graph[toModel]; + + if (node.parent === null) { + // No possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/LICENSE b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/LICENSE new file mode 100644 index 00000000000000..c6b10012540c24 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/LICENSE @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/README.md b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/README.md new file mode 100644 index 00000000000000..932b979176f33b --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/README.md @@ -0,0 +1,11 @@ +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/index.js b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/index.js new file mode 100644 index 00000000000000..b7c198a6f3d7c5 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/index.js @@ -0,0 +1,152 @@ +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/package.json b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/package.json new file mode 100644 index 00000000000000..07b8f6ece8170a --- /dev/null +++ b/tools/node_modules/eslint/node_modules/slice-ansi/node_modules/color-name/package.json @@ -0,0 +1,33 @@ +{ + "author": { + "name": "DY", + "email": "dfcreative@gmail.com" + }, + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A list of color names and its values", + "files": [ + "index.js" + ], + "homepage": "https://github.com/colorjs/color-name", + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "license": "MIT", + "main": "index.js", + "name": "color-name", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/colorjs/color-name.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.1.4" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/package.json b/tools/node_modules/eslint/node_modules/slice-ansi/package.json index c47ecadae7308f..1e32ac1c4a9650 100644 --- a/tools/node_modules/eslint/node_modules/slice-ansi/package.json +++ b/tools/node_modules/eslint/node_modules/slice-ansi/package.json @@ -4,25 +4,26 @@ }, "bundleDependencies": false, "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "deprecated": false, "description": "Slice a string with ANSI escape codes", "devDependencies": { - "ava": "^1.1.0", - "chalk": "^2.4.2", - "random-item": "^1.0.0", - "strip-ansi": "^5.0.0", - "xo": "^0.24.0" + "ava": "^2.1.0", + "chalk": "^3.0.0", + "random-item": "^3.0.0", + "strip-ansi": "^6.0.0", + "xo": "^0.26.1" }, "engines": { - "node": ">=6" + "node": ">=10" }, "files": [ "index.js" ], + "funding": "https://github.com/chalk/slice-ansi?sponsor=1", "homepage": "https://github.com/chalk/slice-ansi#readme", "keywords": [ "slice", @@ -56,5 +57,5 @@ "scripts": { "test": "xo && ava" }, - "version": "2.1.0" + "version": "4.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/slice-ansi/readme.md b/tools/node_modules/eslint/node_modules/slice-ansi/readme.md index 7e9243e46a9086..88d36772ce213c 100644 --- a/tools/node_modules/eslint/node_modules/slice-ansi/readme.md +++ b/tools/node_modules/eslint/node_modules/slice-ansi/readme.md @@ -2,32 +2,29 @@ > Slice a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) - ## Install ``` $ npm install slice-ansi ``` - ## Usage ```js const chalk = require('chalk'); const sliceAnsi = require('slice-ansi'); -const input = 'The quick brown ' + chalk.red('fox jumped over ') + +const string = 'The quick brown ' + chalk.red('fox jumped over ') + 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); -console.log(sliceAnsi(input, 20, 30)); +console.log(sliceAnsi(string, 20, 30)); ``` - ## API -### sliceAnsi(input, beginSlice, [endSlice]) +### sliceAnsi(string, beginSlice, endSlice?) -#### input +#### string Type: `string` @@ -45,20 +42,25 @@ Type: `number` Zero-based index at which to end the slice. - ## Related - [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes - [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - ## Maintainers - [Sindre Sorhus](https://github.com/sindresorhus) - [Josh Junon](https://github.com/qix-) - -## License - -MIT +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/tools/node_modules/eslint/node_modules/string-width/index.js b/tools/node_modules/eslint/node_modules/string-width/index.js index 33c9d6c06f7a59..a348067f032dfc 100644 --- a/tools/node_modules/eslint/node_modules/string-width/index.js +++ b/tools/node_modules/eslint/node_modules/string-width/index.js @@ -1,21 +1,21 @@ 'use strict'; const stripAnsi = require('strip-ansi'); const isFullwidthCodePoint = require('is-fullwidth-code-point'); -const emojiRegex = require('emoji-regex')(); +const emojiRegex = require('emoji-regex'); -module.exports = input => { - input = input.replace(emojiRegex, ' '); +const stringWidth = string => { + string = string.replace(emojiRegex(), ' '); - if (typeof input !== 'string' || input.length === 0) { + if (typeof string !== 'string' || string.length === 0) { return 0; } - input = stripAnsi(input); + string = stripAnsi(string); let width = 0; - for (let i = 0; i < input.length; i++) { - const code = input.codePointAt(i); + for (let i = 0; i < string.length; i++) { + const code = string.codePointAt(i); // Ignore control characters if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { @@ -37,3 +37,7 @@ module.exports = input => { return width; }; + +module.exports = stringWidth; +// TODO: remove this in the next major version +module.exports.default = stringWidth; diff --git a/tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/index.js b/tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/index.js deleted file mode 100644 index c25448009f304d..00000000000000 --- a/tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports = options => { - options = Object.assign({ - onlyFirst: false - }, options); - - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); -}; diff --git a/tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/package.json b/tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/package.json deleted file mode 100644 index db8f3cc8c7d14e..00000000000000 --- a/tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-regex/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Regular expression for matching ANSI escape codes", - "devDependencies": { - "ava": "^0.25.0", - "xo": "^0.23.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-regex#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "license": "MIT", - "name": "ansi-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-regex.git" - }, - "scripts": { - "test": "xo && ava", - "view-supported": "node fixtures/view-codes.js" - }, - "version": "4.1.0" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/readme.md b/tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/readme.md deleted file mode 100644 index d19c44667e704b..00000000000000 --- a/tools/node_modules/eslint/node_modules/string-width/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,87 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - - -## Install - -``` -$ npm install ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` - - -## API - -### ansiRegex([options]) - -Returns a regex for matching ANSI escape codes. - -#### options - -##### onlyFirst - -Type: `boolean`
-Default: `false` *(Matches any ANSI escape codes in a string)* - -Match only the first ANSI escape. - - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/index.js deleted file mode 100644 index 9788c96dfa3b0c..00000000000000 --- a/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - -module.exports = stripAnsi; -module.exports.default = stripAnsi; diff --git a/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/license b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/package.json b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/package.json deleted file mode 100644 index 0c379e41c1aa24..00000000000000 --- a/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/strip-ansi/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "deprecated": false, - "description": "Strip ANSI escape codes from a string", - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/chalk/strip-ansi#readme", - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "strip-ansi", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/strip-ansi.git" - }, - "scripts": { - "test": "xo && ava && tsd-check" - }, - "version": "5.2.0" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/readme.md b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/readme.md deleted file mode 100644 index 8681fe8af44242..00000000000000 --- a/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string - ---- - -
- - Get professional support for 'strip-ansi' with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - -## Install - -``` -$ npm install strip-ansi -``` - - -## Usage - -```js -const stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/tools/node_modules/eslint/node_modules/string-width/package.json b/tools/node_modules/eslint/node_modules/string-width/package.json index fdf6b777ece7dd..38993c1e2e336d 100644 --- a/tools/node_modules/eslint/node_modules/string-width/package.json +++ b/tools/node_modules/eslint/node_modules/string-width/package.json @@ -9,28 +9,28 @@ }, "bundleDependencies": false, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" }, "deprecated": false, "description": "Get the visual width of a string - the number of columns required to display it", "devDependencies": { - "ava": "^1.0.1", - "xo": "^0.23.0" + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" }, "engines": { - "node": ">=6" + "node": ">=8" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/string-width#readme", "keywords": [ "string", - "str", "character", - "char", "unicode", "width", "visual", @@ -59,7 +59,7 @@ "url": "git+https://github.com/sindresorhus/string-width.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd" }, - "version": "3.1.0" + "version": "4.2.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/string-width/readme.md b/tools/node_modules/eslint/node_modules/string-width/readme.md index d39d95f56cf3f8..705f206001b777 100644 --- a/tools/node_modules/eslint/node_modules/string-width/readme.md +++ b/tools/node_modules/eslint/node_modules/string-width/readme.md @@ -19,17 +19,14 @@ $ npm install string-width ```js const stringWidth = require('string-width'); +stringWidth('a'); +//=> 1 + stringWidth('古'); //=> 2 -stringWidth('\u001b[1m古\u001b[22m'); +stringWidth('\u001B[1m古\u001B[22m'); //=> 2 - -stringWidth('a'); -//=> 1 - -stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -// => 5 ``` @@ -40,6 +37,14 @@ stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); - [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string -## License +--- -MIT © [Sindre Sorhus](https://sindresorhus.com) +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/tools/node_modules/eslint/node_modules/table/README.md b/tools/node_modules/eslint/node_modules/table/README.md index b3942042c18cef..a0ec411a6deefc 100644 --- a/tools/node_modules/eslint/node_modules/table/README.md +++ b/tools/node_modules/eslint/node_modules/table/README.md @@ -56,9 +56,8 @@ npm install table Table data is described using an array (rows) of array (cells). ```js -import { - table -} from 'table'; +import tableImport from 'table'; +const { table } = tableImport; // Using commonjs? // const {table} = require('table'); @@ -488,7 +487,7 @@ table(data, config); | 2A | 2B | 2C | +----+----+----+ -# void (no borders; see "bordless table" section of the documentation) +# void (no borders; see "borderless table" section of the documentation) 0A 0B 0C diff --git a/tools/node_modules/eslint/node_modules/table/dist/alignString.js b/tools/node_modules/eslint/node_modules/table/dist/alignString.js index 5d986444c9d72a..2dec379bf5fcd7 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/alignString.js +++ b/tools/node_modules/eslint/node_modules/table/dist/alignString.js @@ -44,7 +44,7 @@ const alignCenter = (subject, width) => { let halfWidth; halfWidth = width / 2; - if (halfWidth % 2 === 0) { + if (width % 2 === 0) { return ' '.repeat(halfWidth) + subject + ' '.repeat(halfWidth); } else { halfWidth = Math.floor(halfWidth); diff --git a/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow b/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow index f0383ff460a5bb..4bd216d444982c 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow @@ -4,7 +4,7 @@ import stringWidth from 'string-width'; const alignments = [ 'left', 'right', - 'center' + 'center', ]; /** @@ -35,7 +35,7 @@ const alignCenter = (subject, width) => { halfWidth = width / 2; - if (halfWidth % 2 === 0) { + if (width % 2 === 0) { return ' '.repeat(halfWidth) + subject + ' '.repeat(halfWidth); } else { halfWidth = Math.floor(halfWidth); diff --git a/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js b/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js index e01bd552610836..54add443b1218f 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js +++ b/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js @@ -13,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de /** * @param {table~row[]} rows - * @param {Object} config + * @param {object} config * @returns {table~row[]} */ const alignTableData = (rows, config) => { diff --git a/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js.flow b/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js.flow index 8a7be7a7e7cf5c..c82c31e261b70b 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/alignTableData.js.flow @@ -3,7 +3,7 @@ import alignString from './alignString'; /** * @param {table~row[]} rows - * @param {Object} config + * @param {object} config * @returns {table~row[]} */ export default (rows, config) => { diff --git a/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow b/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow index 6e4f7a5971e763..e2539539a5d15d 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow @@ -11,7 +11,7 @@ export default (cells) => { return Math.max( ...value.split('\n').map((line) => { return stringWidth(line); - }) + }), ); }); }; diff --git a/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js b/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js index 774a7555772c19..d2d201c2176fb1 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js +++ b/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js @@ -19,7 +19,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * Calculates the vertical row span index. * * @param {Array[]} rows - * @param {Object} config + * @param {object} config * @returns {number[]} */ const calculateRowHeightIndex = (rows, config) => { diff --git a/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js.flow b/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js.flow index 268790264860e6..063ae4d80b1084 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/calculateRowHeightIndex.js.flow @@ -5,7 +5,7 @@ import calculateCellHeight from './calculateCellHeight'; * Calculates the vertical row span index. * * @param {Array[]} rows - * @param {Object} config + * @param {object} config * @returns {number[]} */ export default (rows, config) => { diff --git a/tools/node_modules/eslint/node_modules/table/dist/createStream.js b/tools/node_modules/eslint/node_modules/table/dist/createStream.js index 269aae93f4c7a9..9847ec3ef370e2 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/createStream.js +++ b/tools/node_modules/eslint/node_modules/table/dist/createStream.js @@ -7,33 +7,29 @@ exports.default = void 0; var _mapValues2 = _interopRequireDefault(require("lodash/mapValues")); -var _values2 = _interopRequireDefault(require("lodash/values")); - -var _trimEnd2 = _interopRequireDefault(require("lodash/trimEnd")); - -var _makeStreamConfig = _interopRequireDefault(require("./makeStreamConfig")); +var _alignTableData = _interopRequireDefault(require("./alignTableData")); -var _drawRow = _interopRequireDefault(require("./drawRow")); +var _calculateRowHeightIndex = _interopRequireDefault(require("./calculateRowHeightIndex")); var _drawBorder = require("./drawBorder"); -var _stringifyTableData = _interopRequireDefault(require("./stringifyTableData")); +var _drawRow = _interopRequireDefault(require("./drawRow")); -var _truncateTableData = _interopRequireDefault(require("./truncateTableData")); +var _makeStreamConfig = _interopRequireDefault(require("./makeStreamConfig")); var _mapDataUsingRowHeightIndex = _interopRequireDefault(require("./mapDataUsingRowHeightIndex")); -var _alignTableData = _interopRequireDefault(require("./alignTableData")); - var _padTableData = _interopRequireDefault(require("./padTableData")); -var _calculateRowHeightIndex = _interopRequireDefault(require("./calculateRowHeightIndex")); +var _stringifyTableData = _interopRequireDefault(require("./stringifyTableData")); + +var _truncateTableData = _interopRequireDefault(require("./truncateTableData")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * @param {Array} data - * @param {Object} config + * @param {object} config * @returns {Array} */ const prepareData = (data, config) => { @@ -49,7 +45,7 @@ const prepareData = (data, config) => { /** * @param {string[]} row * @param {number[]} columnWidthIndex - * @param {Object} config + * @param {object} config * @returns {undefined} */ @@ -64,13 +60,13 @@ const create = (row, columnWidthIndex, config) => { output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border); output += body; output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); - output = (0, _trimEnd2.default)(output); + output = output.trimEnd(); process.stdout.write(output); }; /** * @param {string[]} row * @param {number[]} columnWidthIndex - * @param {Object} config + * @param {object} config * @returns {undefined} */ @@ -90,19 +86,18 @@ const append = (row, columnWidthIndex, config) => { output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border); output += body; output += bottom; - output = (0, _trimEnd2.default)(output); + output = output.trimEnd(); process.stdout.write(output); }; /** - * @param {Object} userConfig - * @returns {Object} + * @param {object} userConfig + * @returns {object} */ const createStream = (userConfig = {}) => { - const config = (0, _makeStreamConfig.default)(userConfig); // @todo Use 'Object.values' when Node.js v6 support is dropped. - - const columnWidthIndex = (0, _values2.default)((0, _mapValues2.default)(config.columns, column => { + const config = (0, _makeStreamConfig.default)(userConfig); + const columnWidthIndex = Object.values((0, _mapValues2.default)(config.columns, column => { return column.width + column.paddingLeft + column.paddingRight; })); let empty; diff --git a/tools/node_modules/eslint/node_modules/table/dist/createStream.js.flow b/tools/node_modules/eslint/node_modules/table/dist/createStream.js.flow index fd5eac47a90275..fee2d5c4b2cbcb 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/createStream.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/createStream.js.flow @@ -1,21 +1,21 @@ import _ from 'lodash'; -import makeStreamConfig from './makeStreamConfig'; -import drawRow from './drawRow'; +import alignTableData from './alignTableData'; +import calculateRowHeightIndex from './calculateRowHeightIndex'; import { drawBorderBottom, drawBorderJoin, - drawBorderTop + drawBorderTop, } from './drawBorder'; -import stringifyTableData from './stringifyTableData'; -import truncateTableData from './truncateTableData'; +import drawRow from './drawRow'; +import makeStreamConfig from './makeStreamConfig'; import mapDataUsingRowHeightIndex from './mapDataUsingRowHeightIndex'; -import alignTableData from './alignTableData'; import padTableData from './padTableData'; -import calculateRowHeightIndex from './calculateRowHeightIndex'; +import stringifyTableData from './stringifyTableData'; +import truncateTableData from './truncateTableData'; /** * @param {Array} data - * @param {Object} config + * @param {object} config * @returns {Array} */ const prepareData = (data, config) => { @@ -37,7 +37,7 @@ const prepareData = (data, config) => { /** * @param {string[]} row * @param {number[]} columnWidthIndex - * @param {Object} config + * @param {object} config * @returns {undefined} */ const create = (row, columnWidthIndex, config) => { @@ -55,7 +55,7 @@ const create = (row, columnWidthIndex, config) => { output += body; output += drawBorderBottom(columnWidthIndex, config.border); - output = _.trimEnd(output); + output = output.trimEnd(); process.stdout.write(output); }; @@ -63,7 +63,7 @@ const create = (row, columnWidthIndex, config) => { /** * @param {string[]} row * @param {number[]} columnWidthIndex - * @param {Object} config + * @param {object} config * @returns {undefined} */ const append = (row, columnWidthIndex, config) => { @@ -84,20 +84,19 @@ const append = (row, columnWidthIndex, config) => { output += body; output += bottom; - output = _.trimEnd(output); + output = output.trimEnd(); process.stdout.write(output); }; /** - * @param {Object} userConfig - * @returns {Object} + * @param {object} userConfig + * @returns {object} */ export default (userConfig = {}) => { const config = makeStreamConfig(userConfig); - // @todo Use 'Object.values' when Node.js v6 support is dropped. - const columnWidthIndex = _.values(_.mapValues(config.columns, (column) => { + const columnWidthIndex = Object.values(_.mapValues(config.columns, (column) => { return column.width + column.paddingLeft + column.paddingRight; })); @@ -122,6 +121,6 @@ export default (userConfig = {}) => { } else { return append(row, columnWidthIndex, config); } - } + }, }; }; diff --git a/tools/node_modules/eslint/node_modules/table/dist/drawBorder.js.flow b/tools/node_modules/eslint/node_modules/table/dist/drawBorder.js.flow index 16b2aebf23f823..85de2475e8b294 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/drawBorder.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/drawBorder.js.flow @@ -39,7 +39,7 @@ const drawBorderTop = (columnSizeIndex, parts) => { body: parts.topBody, join: parts.topJoin, left: parts.topLeft, - right: parts.topRight + right: parts.topRight, }); if (border === '\n') { @@ -67,7 +67,7 @@ const drawBorderJoin = (columnSizeIndex, parts) => { body: parts.joinBody, join: parts.joinJoin, left: parts.joinLeft, - right: parts.joinRight + right: parts.joinRight, }); }; @@ -89,7 +89,7 @@ const drawBorderBottom = (columnSizeIndex, parts) => { body: parts.bottomBody, join: parts.bottomJoin, left: parts.bottomLeft, - right: parts.bottomRight + right: parts.bottomRight, }); }; @@ -97,5 +97,5 @@ export { drawBorder, drawBorderBottom, drawBorderJoin, - drawBorderTop + drawBorderTop, }; diff --git a/tools/node_modules/eslint/node_modules/table/dist/drawRow.js b/tools/node_modules/eslint/node_modules/table/dist/drawRow.js index 800ca25bc3df7e..9126c4ffbe9e01 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/drawRow.js +++ b/tools/node_modules/eslint/node_modules/table/dist/drawRow.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; /** - * @typedef {Object} drawRow~border + * @typedef {object} drawRow~border * @property {string} bodyLeft * @property {string} bodyRight * @property {string} bodyJoin diff --git a/tools/node_modules/eslint/node_modules/table/dist/drawRow.js.flow b/tools/node_modules/eslint/node_modules/table/dist/drawRow.js.flow index fdeceefa31880a..978eab2de19941 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/drawRow.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/drawRow.js.flow @@ -1,5 +1,5 @@ /** - * @typedef {Object} drawRow~border + * @typedef {object} drawRow~border * @property {string} bodyLeft * @property {string} bodyRight * @property {string} bodyJoin diff --git a/tools/node_modules/eslint/node_modules/table/dist/drawTable.js b/tools/node_modules/eslint/node_modules/table/dist/drawTable.js index fbfdc2016138d8..18c9ff669afd60 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/drawTable.js +++ b/tools/node_modules/eslint/node_modules/table/dist/drawTable.js @@ -13,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de /** * @param {Array} rows - * @param {Object} border + * @param {object} border * @param {Array} columnSizeIndex * @param {Array} rowSpanIndex * @param {Function} drawHorizontalLine diff --git a/tools/node_modules/eslint/node_modules/table/dist/drawTable.js.flow b/tools/node_modules/eslint/node_modules/table/dist/drawTable.js.flow index cffe956f2009dd..84707caa83d04b 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/drawTable.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/drawTable.js.flow @@ -1,13 +1,13 @@ import { drawBorderTop, drawBorderJoin, - drawBorderBottom + drawBorderBottom, } from './drawBorder'; import drawRow from './drawRow'; /** * @param {Array} rows - * @param {Object} border + * @param {object} border * @param {Array} columnSizeIndex * @param {Array} rowSpanIndex * @param {Function} drawHorizontalLine diff --git a/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js b/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js index 0b9b5b00e10212..00da959fd94fa9 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js +++ b/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -/* eslint-disable sort-keys */ +/* eslint-disable sort-keys-fix/sort-keys-fix */ /** * @typedef border diff --git a/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js.flow b/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js.flow index 916b3518f9408e..bc8b0f263a1e07 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/getBorderCharacters.js.flow @@ -1,4 +1,4 @@ -/* eslint-disable sort-keys */ +/* eslint-disable sort-keys-fix/sort-keys-fix */ /** * @typedef border @@ -43,7 +43,7 @@ export default (name) => { joinBody: '─', joinLeft: '╟', joinRight: '╢', - joinJoin: '┼' + joinJoin: '┼', }; } @@ -66,7 +66,7 @@ export default (name) => { joinBody: '─', joinLeft: '├', joinRight: '┤', - joinJoin: '┼' + joinJoin: '┼', }; } @@ -89,7 +89,7 @@ export default (name) => { joinBody: '-', joinLeft: '|', joinRight: '|', - joinJoin: '|' + joinJoin: '|', }; } @@ -112,7 +112,7 @@ export default (name) => { joinBody: '', joinLeft: '', joinRight: '', - joinJoin: '' + joinJoin: '', }; } diff --git a/tools/node_modules/eslint/node_modules/table/dist/index.js b/tools/node_modules/eslint/node_modules/table/dist/index.js index 1f40e6628d67af..010fbae9feb42c 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/index.js +++ b/tools/node_modules/eslint/node_modules/table/dist/index.js @@ -3,30 +3,30 @@ Object.defineProperty(exports, "__esModule", { value: true }); -Object.defineProperty(exports, "table", { - enumerable: true, - get: function get() { - return _table.default; - } -}); Object.defineProperty(exports, "createStream", { enumerable: true, - get: function get() { + get: function () { return _createStream.default; } }); Object.defineProperty(exports, "getBorderCharacters", { enumerable: true, - get: function get() { + get: function () { return _getBorderCharacters.default; } }); - -var _table = _interopRequireDefault(require("./table")); +Object.defineProperty(exports, "table", { + enumerable: true, + get: function () { + return _table.default; + } +}); var _createStream = _interopRequireDefault(require("./createStream")); var _getBorderCharacters = _interopRequireDefault(require("./getBorderCharacters")); +var _table = _interopRequireDefault(require("./table")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/dist/index.js.flow b/tools/node_modules/eslint/node_modules/table/dist/index.js.flow index 76cd8301a0eac3..4a47c502576564 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/index.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/index.js.flow @@ -1,9 +1,9 @@ -import table from './table'; import createStream from './createStream'; import getBorderCharacters from './getBorderCharacters'; +import table from './table'; export { table, createStream, - getBorderCharacters + getBorderCharacters, }; diff --git a/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js b/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js index 17fd35d1eadefc..e5f4f3eec7932e 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js +++ b/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js @@ -11,19 +11,19 @@ var _isUndefined2 = _interopRequireDefault(require("lodash/isUndefined")); var _times2 = _interopRequireDefault(require("lodash/times")); +var _calculateMaximumColumnWidthIndex = _interopRequireDefault(require("./calculateMaximumColumnWidthIndex")); + var _getBorderCharacters = _interopRequireDefault(require("./getBorderCharacters")); var _validateConfig = _interopRequireDefault(require("./validateConfig")); -var _calculateMaximumColumnWidthIndex = _interopRequireDefault(require("./calculateMaximumColumnWidthIndex")); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Merges user provided border characters with the default border ("honeywell") characters. * - * @param {Object} border - * @returns {Object} + * @param {object} border + * @returns {object} */ const makeBorder = (border = {}) => { return Object.assign({}, (0, _getBorderCharacters.default)('honeywell'), border); @@ -33,9 +33,9 @@ const makeBorder = (border = {}) => { * values for the missing configuration properties. * * @param {Array[]} rows - * @param {Object} columns - * @param {Object} columnDefault - * @returns {Object} + * @param {object} columns + * @param {object} columnDefault + * @returns {object} */ @@ -62,8 +62,8 @@ const makeColumns = (rows, columns = {}, columnDefault = {}) => { * using default values for the missing configuration properties. * * @param {Array[]} rows - * @param {Object} userConfig - * @returns {Object} + * @param {object} userConfig + * @returns {object} */ diff --git a/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js.flow b/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js.flow index 1471afc57f47ca..9a27375cb0df60 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js.flow @@ -1,13 +1,13 @@ import _ from 'lodash'; +import calculateMaximumColumnWidthIndex from './calculateMaximumColumnWidthIndex'; import getBorderCharacters from './getBorderCharacters'; import validateConfig from './validateConfig'; -import calculateMaximumColumnWidthIndex from './calculateMaximumColumnWidthIndex'; /** * Merges user provided border characters with the default border ("honeywell") characters. * - * @param {Object} border - * @returns {Object} + * @param {object} border + * @returns {object} */ const makeBorder = (border = {}) => { return Object.assign({}, getBorderCharacters('honeywell'), border); @@ -18,9 +18,9 @@ const makeBorder = (border = {}) => { * values for the missing configuration properties. * * @param {Array[]} rows - * @param {Object} columns - * @param {Object} columnDefault - * @returns {Object} + * @param {object} columns + * @param {object} columnDefault + * @returns {object} */ const makeColumns = (rows, columns = {}, columnDefault = {}) => { const maximumColumnWidthIndex = calculateMaximumColumnWidthIndex(rows); @@ -36,7 +36,7 @@ const makeColumns = (rows, columns = {}, columnDefault = {}) => { paddingRight: 1, truncate: Infinity, width: maximumColumnWidthIndex[index], - wrapWord: false + wrapWord: false, }, columnDefault, columns[index]); }); @@ -48,8 +48,8 @@ const makeColumns = (rows, columns = {}, columnDefault = {}) => { * using default values for the missing configuration properties. * * @param {Array[]} rows - * @param {Object} userConfig - * @returns {Object} + * @param {object} userConfig + * @returns {object} */ export default (rows, userConfig = {}) => { validateConfig('config.json', userConfig); diff --git a/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js b/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js index bc949c5a0d9fa3..600aa66de280fe 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js +++ b/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js @@ -20,8 +20,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de /** * Merges user provided border characters with the default border ("honeywell") characters. * - * @param {Object} border - * @returns {Object} + * @param {object} border + * @returns {object} */ const makeBorder = (border = {}) => { return Object.assign({}, (0, _getBorderCharacters.default)('honeywell'), border); @@ -31,9 +31,9 @@ const makeBorder = (border = {}) => { * values for the missing configuration properties. * * @param {number} columnCount - * @param {Object} columns - * @param {Object} columnDefault - * @returns {Object} + * @param {object} columns + * @param {object} columnDefault + * @returns {object} */ @@ -54,7 +54,7 @@ const makeColumns = (columnCount, columns = {}, columnDefault = {}) => { return columns; }; /** - * @typedef {Object} columnConfig + * @typedef {object} columnConfig * @property {string} alignment * @property {number} width * @property {number} truncate @@ -63,9 +63,9 @@ const makeColumns = (columnCount, columns = {}, columnDefault = {}) => { */ /** - * @typedef {Object} streamConfig + * @typedef {object} streamConfig * @property {columnConfig} columnDefault - * @property {Object} border + * @property {object} border * @property {columnConfig[]} * @property {number} columnCount Number of columns in the table (required). */ @@ -75,7 +75,7 @@ const makeColumns = (columnCount, columns = {}, columnDefault = {}) => { * using default values for the missing configuration properties. * * @param {streamConfig} userConfig - * @returns {Object} + * @returns {object} */ diff --git a/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js.flow b/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js.flow index 884625a53bb3a0..7c3ae068bb24ba 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/makeStreamConfig.js.flow @@ -5,8 +5,8 @@ import validateConfig from './validateConfig'; /** * Merges user provided border characters with the default border ("honeywell") characters. * - * @param {Object} border - * @returns {Object} + * @param {object} border + * @returns {object} */ const makeBorder = (border = {}) => { return Object.assign({}, getBorderCharacters('honeywell'), border); @@ -17,9 +17,9 @@ const makeBorder = (border = {}) => { * values for the missing configuration properties. * * @param {number} columnCount - * @param {Object} columns - * @param {Object} columnDefault - * @returns {Object} + * @param {object} columns + * @param {object} columnDefault + * @returns {object} */ const makeColumns = (columnCount, columns = {}, columnDefault = {}) => { _.times(columnCount, (index) => { @@ -32,7 +32,7 @@ const makeColumns = (columnCount, columns = {}, columnDefault = {}) => { paddingLeft: 1, paddingRight: 1, truncate: Infinity, - wrapWord: false + wrapWord: false, }, columnDefault, columns[index]); }); @@ -40,7 +40,7 @@ const makeColumns = (columnCount, columns = {}, columnDefault = {}) => { }; /** - * @typedef {Object} columnConfig + * @typedef {object} columnConfig * @property {string} alignment * @property {number} width * @property {number} truncate @@ -49,9 +49,9 @@ const makeColumns = (columnCount, columns = {}, columnDefault = {}) => { */ /** - * @typedef {Object} streamConfig + * @typedef {object} streamConfig * @property {columnConfig} columnDefault - * @property {Object} border + * @property {object} border * @property {columnConfig[]} * @property {number} columnCount Number of columns in the table (required). */ @@ -61,7 +61,7 @@ const makeColumns = (columnCount, columns = {}, columnDefault = {}) => { * using default values for the missing configuration properties. * * @param {streamConfig} userConfig - * @returns {Object} + * @returns {object} */ export default (userConfig = {}) => { validateConfig('streamConfig.json', userConfig); diff --git a/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js b/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js index 0a4d11d509c7da..be1f5a1cdc9bbc 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js +++ b/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js @@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de /** * @param {Array} unmappedRows * @param {number[]} rowHeightIndex - * @param {Object} config + * @param {object} config * @returns {Array} */ const mapDataUsingRowHeightIndex = (unmappedRows, rowHeightIndex, config) => { diff --git a/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js.flow b/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js.flow index 6562bdfd1bad96..f4c08cc44f789a 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/mapDataUsingRowHeightIndex.js.flow @@ -4,7 +4,7 @@ import wrapCell from './wrapCell'; /** * @param {Array} unmappedRows * @param {number[]} rowHeightIndex - * @param {Object} config + * @param {object} config * @returns {Array} */ export default (unmappedRows, rowHeightIndex, config) => { diff --git a/tools/node_modules/eslint/node_modules/table/dist/padTableData.js b/tools/node_modules/eslint/node_modules/table/dist/padTableData.js index 81bd5f5d4ea03c..bdf493841e6aa8 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/padTableData.js +++ b/tools/node_modules/eslint/node_modules/table/dist/padTableData.js @@ -7,7 +7,7 @@ exports.default = void 0; /** * @param {table~row[]} rows - * @param {Object} config + * @param {object} config * @returns {table~row[]} */ const padTableData = (rows, config) => { diff --git a/tools/node_modules/eslint/node_modules/table/dist/padTableData.js.flow b/tools/node_modules/eslint/node_modules/table/dist/padTableData.js.flow index f23dc021076099..a4e6b142c1839f 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/padTableData.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/padTableData.js.flow @@ -1,6 +1,6 @@ /** * @param {table~row[]} rows - * @param {Object} config + * @param {object} config * @returns {table~row[]} */ export default (rows, config) => { diff --git a/tools/node_modules/eslint/node_modules/table/dist/table.js b/tools/node_modules/eslint/node_modules/table/dist/table.js index bd4e8055b17018..8c22a6e057b7ac 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/table.js +++ b/tools/node_modules/eslint/node_modules/table/dist/table.js @@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -var _drawTable = _interopRequireDefault(require("./drawTable")); +var _alignTableData = _interopRequireDefault(require("./alignTableData")); var _calculateCellWidthIndex = _interopRequireDefault(require("./calculateCellWidthIndex")); -var _makeConfig = _interopRequireDefault(require("./makeConfig")); - var _calculateRowHeightIndex = _interopRequireDefault(require("./calculateRowHeightIndex")); -var _mapDataUsingRowHeightIndex = _interopRequireDefault(require("./mapDataUsingRowHeightIndex")); +var _drawTable = _interopRequireDefault(require("./drawTable")); -var _alignTableData = _interopRequireDefault(require("./alignTableData")); +var _makeConfig = _interopRequireDefault(require("./makeConfig")); -var _padTableData = _interopRequireDefault(require("./padTableData")); +var _mapDataUsingRowHeightIndex = _interopRequireDefault(require("./mapDataUsingRowHeightIndex")); -var _validateTableData = _interopRequireDefault(require("./validateTableData")); +var _padTableData = _interopRequireDefault(require("./padTableData")); var _stringifyTableData = _interopRequireDefault(require("./stringifyTableData")); var _truncateTableData = _interopRequireDefault(require("./truncateTableData")); +var _validateTableData = _interopRequireDefault(require("./validateTableData")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** @@ -36,7 +36,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de */ /** - * @typedef {Object} table~columns + * @typedef {object} table~columns * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left). * @property {number} width Column width (default: auto). * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity). @@ -46,7 +46,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de */ /** - * @typedef {Object} table~border + * @typedef {object} table~border * @property {string} topBody * @property {string} topJoin * @property {string} topLeft @@ -76,7 +76,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de */ /** - * @typedef {Object} table~config + * @typedef {object} table~config * @property {table~border} border * @property {table~columns[]} columns Column specific configuration. * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values. diff --git a/tools/node_modules/eslint/node_modules/table/dist/table.js.flow b/tools/node_modules/eslint/node_modules/table/dist/table.js.flow index 86af744bd1eafe..6790e8cc550f2c 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/table.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/table.js.flow @@ -1,13 +1,13 @@ -import drawTable from './drawTable'; +import alignTableData from './alignTableData'; import calculateCellWidthIndex from './calculateCellWidthIndex'; -import makeConfig from './makeConfig'; import calculateRowHeightIndex from './calculateRowHeightIndex'; +import drawTable from './drawTable'; +import makeConfig from './makeConfig'; import mapDataUsingRowHeightIndex from './mapDataUsingRowHeightIndex'; -import alignTableData from './alignTableData'; import padTableData from './padTableData'; -import validateTableData from './validateTableData'; import stringifyTableData from './stringifyTableData'; import truncateTableData from './truncateTableData'; +import validateTableData from './validateTableData'; /** * @typedef {string} table~cell @@ -18,7 +18,7 @@ import truncateTableData from './truncateTableData'; */ /** - * @typedef {Object} table~columns + * @typedef {object} table~columns * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left). * @property {number} width Column width (default: auto). * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity). @@ -28,7 +28,7 @@ import truncateTableData from './truncateTableData'; */ /** - * @typedef {Object} table~border + * @typedef {object} table~border * @property {string} topBody * @property {string} topJoin * @property {string} topLeft @@ -58,7 +58,7 @@ import truncateTableData from './truncateTableData'; */ /** - * @typedef {Object} table~config + * @typedef {object} table~config * @property {table~border} border * @property {table~columns[]} columns Column specific configuration. * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values. diff --git a/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js b/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js index 89e1777a07b41f..3e5cbe1cf87f59 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js +++ b/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js @@ -12,7 +12,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de /** * @todo Make it work with ASCII content. * @param {table~row[]} rows - * @param {Object} config + * @param {object} config * @returns {table~row[]} */ const truncateTableData = (rows, config) => { diff --git a/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js.flow b/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js.flow index 1052c92333033b..de331ab9223d4c 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/truncateTableData.js.flow @@ -3,14 +3,14 @@ import _ from 'lodash'; /** * @todo Make it work with ASCII content. * @param {table~row[]} rows - * @param {Object} config + * @param {object} config * @returns {table~row[]} */ export default (rows, config) => { return rows.map((cells) => { return cells.map((content, index) => { return _.truncate(content, { - length: config.columns[index].truncate + length: config.columns[index].truncate, }); }); }); diff --git a/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js b/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js index 40d812777b5017..fb58f344a45d9a 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js +++ b/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js @@ -243,6 +243,7 @@ var validate = (function() { 'use strict'; var vErrors = null; var errors = 0; + if (rootData === undefined) rootData = data; if (typeof data !== "string") { var err = { keyword: 'type', @@ -340,6 +341,7 @@ var validate = (function() { 'use strict'; var vErrors = null; var errors = 0; + if (rootData === undefined) rootData = data; if ((data && typeof data === "object" && !Array.isArray(data))) { var errs__0 = errors; var valid1 = true; @@ -403,7 +405,7 @@ var validate = (function() { } if (data.width !== undefined) { var errs_1 = errors; - if (typeof data.width !== "number") { + if ((typeof data.width !== "number")) { var err = { keyword: 'type', dataPath: (dataPath || '') + '.width', @@ -439,7 +441,7 @@ var validate = (function() { } if (data.truncate !== undefined) { var errs_1 = errors; - if (typeof data.truncate !== "number") { + if ((typeof data.truncate !== "number")) { var err = { keyword: 'type', dataPath: (dataPath || '') + '.truncate', @@ -457,7 +459,7 @@ var validate = (function() { } if (data.paddingLeft !== undefined) { var errs_1 = errors; - if (typeof data.paddingLeft !== "number") { + if ((typeof data.paddingLeft !== "number")) { var err = { keyword: 'type', dataPath: (dataPath || '') + '.paddingLeft', @@ -475,7 +477,7 @@ var validate = (function() { } if (data.paddingRight !== undefined) { var errs_1 = errors; - if (typeof data.paddingRight !== "number") { + if ((typeof data.paddingRight !== "number")) { var err = { keyword: 'type', dataPath: (dataPath || '') + '.paddingRight', diff --git a/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js.flow b/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js.flow index 14b9710135a17a..f0966bd7e797d0 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/validateConfig.js.flow @@ -5,7 +5,7 @@ import validateStreamConfig from '../dist/validateStreamConfig'; const validate = { 'config.json': validateConfig, - 'streamConfig.json': validateStreamConfig + 'streamConfig.json': validateStreamConfig, }; /** @@ -20,7 +20,7 @@ export default (schemaId, config = {}) => { dataPath: error.dataPath, message: error.message, params: error.params, - schemaPath: error.schemaPath + schemaPath: error.schemaPath, }; }); diff --git a/tools/node_modules/eslint/node_modules/table/dist/validateStreamConfig.js b/tools/node_modules/eslint/node_modules/table/dist/validateStreamConfig.js index ff10e5909ff4cd..2c81a1636df753 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/validateStreamConfig.js +++ b/tools/node_modules/eslint/node_modules/table/dist/validateStreamConfig.js @@ -243,6 +243,7 @@ var validate = (function() { 'use strict'; var vErrors = null; var errors = 0; + if (rootData === undefined) rootData = data; if (typeof data !== "string") { var err = { keyword: 'type', @@ -340,6 +341,7 @@ var validate = (function() { 'use strict'; var vErrors = null; var errors = 0; + if (rootData === undefined) rootData = data; if ((data && typeof data === "object" && !Array.isArray(data))) { var errs__0 = errors; var valid1 = true; @@ -403,7 +405,7 @@ var validate = (function() { } if (data.width !== undefined) { var errs_1 = errors; - if (typeof data.width !== "number") { + if ((typeof data.width !== "number")) { var err = { keyword: 'type', dataPath: (dataPath || '') + '.width', @@ -439,7 +441,7 @@ var validate = (function() { } if (data.truncate !== undefined) { var errs_1 = errors; - if (typeof data.truncate !== "number") { + if ((typeof data.truncate !== "number")) { var err = { keyword: 'type', dataPath: (dataPath || '') + '.truncate', @@ -457,7 +459,7 @@ var validate = (function() { } if (data.paddingLeft !== undefined) { var errs_1 = errors; - if (typeof data.paddingLeft !== "number") { + if ((typeof data.paddingLeft !== "number")) { var err = { keyword: 'type', dataPath: (dataPath || '') + '.paddingLeft', @@ -475,7 +477,7 @@ var validate = (function() { } if (data.paddingRight !== undefined) { var errs_1 = errors; - if (typeof data.paddingRight !== "number") { + if ((typeof data.paddingRight !== "number")) { var err = { keyword: 'type', dataPath: (dataPath || '') + '.paddingRight', @@ -591,7 +593,7 @@ var validate = (function() { } if (data.columnCount !== undefined) { var errs_1 = errors; - if (typeof data.columnCount !== "number") { + if ((typeof data.columnCount !== "number")) { var err = { keyword: 'type', dataPath: (dataPath || '') + '.columnCount', diff --git a/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js b/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js index bbd51ffb0775e9..56a3e19024c473 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js +++ b/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js @@ -31,61 +31,20 @@ const validateTableData = rows => { } const columnNumber = rows[0].length; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - try { - for (var _iterator = rows[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - const cells = _step.value; - - if (!Array.isArray(cells)) { - throw new TypeError('Table row data must be an array.'); - } - - if (cells.length !== columnNumber) { - throw new Error('Table must have a consistent number of cells.'); - } - - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = cells[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - const cell = _step2.value; + for (const cells of rows) { + if (!Array.isArray(cells)) { + throw new TypeError('Table row data must be an array.'); + } - // eslint-disable-next-line no-control-regex - if (/[\u0001-\u0006\u0008-\u0009\u000B-\u001A]/.test(cell)) { - throw new Error('Table data must not contain control characters.'); - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } + if (cells.length !== columnNumber) { + throw new Error('Table must have a consistent number of cells.'); } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; + + for (const cell of cells) { + // eslint-disable-next-line no-control-regex + if (/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test(cell)) { + throw new Error('Table data must not contain control characters.'); } } } diff --git a/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js.flow b/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js.flow index 304ab0dd05b995..dcc7fc1d139154 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js.flow @@ -36,7 +36,7 @@ export default (rows) => { for (const cell of cells) { // eslint-disable-next-line no-control-regex - if (/[\u0001-\u0006\u0008-\u0009\u000B-\u001A]/.test(cell)) { + if (/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test(cell)) { throw new Error('Table data must not contain control characters.'); } } diff --git a/tools/node_modules/eslint/node_modules/table/package.json b/tools/node_modules/eslint/node_modules/table/package.json index 917b063eccf7c2..73c461c4025328 100644 --- a/tools/node_modules/eslint/node_modules/table/package.json +++ b/tools/node_modules/eslint/node_modules/table/package.json @@ -9,41 +9,41 @@ }, "bundleDependencies": false, "dependencies": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^6.12.4", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" }, "deprecated": false, "description": "Formats data into a string table.", "devDependencies": { - "@babel/cli": "^7.5.0", - "@babel/core": "^7.5.4", - "@babel/node": "^7.5.0", - "@babel/plugin-transform-flow-strip-types": "^7.4.4", - "@babel/preset-env": "^7.5.4", - "@babel/register": "^7.4.4", - "ajv-cli": "^3.0.0", - "ajv-keywords": "^3.4.1", - "babel-plugin-istanbul": "^5.1.4", + "@babel/cli": "^7.10.5", + "@babel/core": "^7.11.4", + "@babel/node": "^7.10.5", + "@babel/plugin-transform-flow-strip-types": "^7.10.4", + "@babel/preset-env": "^7.11.0", + "@babel/register": "^7.10.5", + "ajv-cli": "^3.2.1", + "ajv-keywords": "^3.5.2", + "babel-plugin-istanbul": "^6.0.0", "babel-plugin-lodash": "^3.3.4", "babel-plugin-transform-export-default-name": "^2.0.4", "chai": "^4.2.0", - "chalk": "^2.4.2", - "coveralls": "^3.0.5", - "eslint": "^5.13.0", - "eslint-config-canonical": "^16.1.0", - "flow-bin": "^0.102.0", - "flow-copy-source": "^2.0.7", - "gitdown": "^3.1.1", - "husky": "^3.0.0", - "mocha": "^6.1.4", - "nyc": "^14.1.1", - "semantic-release": "^15.13.18", - "sinon": "^7.3.2" + "chalk": "^4.1.0", + "coveralls": "^3.1.0", + "eslint": "^7.7.0", + "eslint-config-canonical": "^23.0.1", + "flow-bin": "^0.132.0", + "flow-copy-source": "^2.0.9", + "gitdown": "^3.1.3", + "husky": "^4.2.5", + "mocha": "^8.1.3", + "nyc": "^15.1.0", + "semantic-release": "^17.1.1", + "sinon": "^9.0.3" }, "engines": { - "node": ">=6.0.0" + "node": ">=10.0.0" }, "homepage": "https://github.com/gajus/table#readme", "husky": { @@ -86,5 +86,5 @@ "lint": "npm run build && eslint ./src ./test && flow", "test": "mocha --require @babel/register" }, - "version": "5.4.6" + "version": "6.0.4" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js b/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js index 0f2d48b52fc567..eff85c6baedffb 100644 --- a/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js +++ b/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js @@ -2,16 +2,7 @@ module.exports = trimTrailingLines -var line = '\n' - // Remove final newline characters from `value`. function trimTrailingLines(value) { - var val = String(value) - var index = val.length - - while (val.charAt(--index) === line) { - // Empty - } - - return val.slice(0, index + 1) + return String(value).replace(/\n+$/, '') } diff --git a/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json b/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json index bbf4660f41bdda..c0242dc1299bdc 100644 --- a/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json +++ b/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json @@ -19,14 +19,14 @@ "deprecated": false, "description": "Remove final line feeds from a string", "devDependencies": { - "browserify": "^16.0.0", + "browserify": "^17.0.0", "nyc": "^15.0.0", - "prettier": "^1.0.0", - "remark-cli": "^7.0.0", - "remark-preset-wooorm": "^6.0.0", - "tape": "^4.0.0", - "tinyify": "^2.0.0", - "xo": "^0.25.0" + "prettier": "^2.0.0", + "remark-cli": "^9.0.0", + "remark-preset-wooorm": "^8.0.0", + "tape": "^5.0.0", + "tinyify": "^3.0.0", + "xo": "^0.34.0" }, "files": [ "index.js" @@ -72,12 +72,12 @@ "build": "npm run build-bundle && npm run build-mangle", "build-bundle": "browserify . -s trimTrailingLines -o trim-trailing-lines.js", "build-mangle": "browserify . -s trimTrailingLines -p tinyify -o trim-trailing-lines.min.js", - "format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix", + "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", "test": "npm run format && npm run build && npm run test-coverage", "test-api": "node test", "test-coverage": "nyc --reporter lcov tape test.js" }, - "version": "1.1.3", + "version": "1.1.4", "xo": { "prettier": true, "esnext": false, diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/README.md b/tools/node_modules/eslint/node_modules/v8-compile-cache/README.md index 9580f6943205e1..6e0b99fbaa6304 100644 --- a/tools/node_modules/eslint/node_modules/v8-compile-cache/README.md +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/README.md @@ -26,9 +26,11 @@ The ability to tap into V8 to produce/consume this cache was introduced in [Node Set the environment variable `DISABLE_V8_COMPILE_CACHE=1` to disable the cache. +Cache directory is defined by environment variable `V8_COMPILE_CACHE_CACHE_DIR` or defaults to `/v8-compile-cache-`. + ## Internals -The caches are stored in `$TMP/v8-compile-cache/V8_VERSION`, where there are `.BLOB` and `.MAP` files corresponding to the entry module that required `v8-compile-cache`. The cache is _entry module specific_ because it is faster to load the entire code cache into memory at once, than it is to read it from disk on a file-by-file basis. +Cache files are suffixed `.BLOB` and `.MAP` corresponding to the entry module that required `v8-compile-cache`. The cache is _entry module specific_ because it is faster to load the entire code cache into memory at once, than it is to read it from disk on a file-by-file basis. ## Benchmarks diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json b/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json index 83d66522f04c29..25540b730159b7 100644 --- a/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json @@ -11,15 +11,15 @@ "deprecated": false, "description": "Require hook for automatic V8 compile cache persistence", "devDependencies": { - "babel-core": "6.23.1", - "eslint": "^3.15.0", - "flow-parser": "0.38.0", + "babel-core": "6.26.3", + "eslint": "^7.12.1", + "flow-parser": "0.136.0", "rimraf": "^2.5.4", - "rxjs": "5.2.0", + "rxjs": "6.6.3", "semver": "^5.3.0", "tap": "^10.1.1", "temp": "^0.8.3", - "yarn": "0.20.3" + "yarn": "1.22.10" }, "files": [ "v8-compile-cache.js" @@ -34,9 +34,10 @@ }, "scripts": { "bench": "bench/run.sh", - "lint": "eslint --max-warnings=0 .", - "posttest": "npm run lint", - "test": "tap test/*-test.js" + "eslint": "eslint --max-warnings=0 .", + "posttest": "npm run eslint", + "tap": "tap test/*-test.js", + "test": "npm run tap" }, - "version": "2.1.1" + "version": "2.2.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js b/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js index 69f053667046ca..b9c09288cb310b 100644 --- a/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js @@ -86,8 +86,6 @@ class FileSystemBlobStore { try { fs.writeFileSync(this._blobFilename, blobToStore); fs.writeFileSync(this._mapFilename, mapToStore); - } catch (error) { - throw error; } finally { fs.unlinkSync(this._lockFilename); } @@ -301,7 +299,8 @@ function slashEscape(str) { '\x00': 'z0', 'z': 'zZ', }; - return str.replace(/[\\:\/\x00z]/g, match => (ESCAPE_LOOKUP[match])); + const ESCAPE_REGEX = /[\\:/\x00z]/g; // eslint-disable-line no-control-regex + return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]); } function supportsCachedData() { @@ -311,6 +310,11 @@ function supportsCachedData() { } function getCacheDir() { + const v8_compile_cache_cache_dir = process.env.V8_COMPILE_CACHE_CACHE_DIR; + if (v8_compile_cache_cache_dir) { + return v8_compile_cache_cache_dir; + } + // Avoid cache ownership issues on POSIX systems. const dirname = typeof process.getuid === 'function' ? 'v8-compile-cache-' + process.getuid() @@ -348,7 +352,7 @@ if (!process.env.DISABLE_V8_COMPILE_CACHE && supportsCachedData()) { nativeCompileCache.setCacheStore(blobStore); nativeCompileCache.install(); - process.once('exit', code => { + process.once('exit', () => { if (blobStore.isDirty()) { blobStore.save(); } diff --git a/tools/node_modules/eslint/node_modules/write/LICENSE b/tools/node_modules/eslint/node_modules/write/LICENSE deleted file mode 100644 index 943e71d05511e2..00000000000000 --- a/tools/node_modules/eslint/node_modules/write/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/write/README.md b/tools/node_modules/eslint/node_modules/write/README.md deleted file mode 100644 index 31c95974bb7a0f..00000000000000 --- a/tools/node_modules/eslint/node_modules/write/README.md +++ /dev/null @@ -1,178 +0,0 @@ -# write [![NPM version](https://img.shields.io/npm/v/write.svg?style=flat)](https://www.npmjs.com/package/write) [![NPM monthly downloads](https://img.shields.io/npm/dm/write.svg?style=flat)](https://npmjs.org/package/write) [![NPM total downloads](https://img.shields.io/npm/dt/write.svg?style=flat)](https://npmjs.org/package/write) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/write.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/write) - -> Write data to a file, replacing the file if it already exists and creating any intermediate directories if they don't already exist. Thin wrapper around node's native fs methods. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save write -``` - -## Usage - -```js -var writeFile = require('write'); -``` - -## API - -### [writeFile](index.js#L40) - -Asynchronously writes data to a file, replacing the file if it already exists and creating any intermediate directories if they don't already exist. Data can be a string or a buffer. Returns a promise if a callback function is not passed. - -**Params** - -* `filepath` **{string|Buffer|integer}**: filepath or file descriptor. -* `data` **{string|Buffer|Uint8Array}**: String to write to disk. -* `options` **{object}**: Options to pass to [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) and/or [mkdirp](https://github.com/substack/node-mkdirp) -* `callback` **{Function}**: (optional) If no callback is provided, a promise is returned. - -**Example** - -```js -var writeFile = require('write'); -writeFile('foo.txt', 'This is content...', function(err) { - if (err) console.log(err); -}); - -// promise -writeFile('foo.txt', 'This is content...') - .then(function() { - // do stuff - }); -``` - -### [.promise](index.js#L82) - -The promise version of [writeFile](#writefile). Returns a promise. - -**Params** - -* `filepath` **{string|Buffer|integer}**: filepath or file descriptor. -* `val` **{string|Buffer|Uint8Array}**: String or buffer to write to disk. -* `options` **{object}**: Options to pass to [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) and/or [mkdirp](https://github.com/substack/node-mkdirp) -* `returns` **{Promise}** - -**Example** - -```js -var writeFile = require('write'); -writeFile.promise('foo.txt', 'This is content...') - .then(function() { - // do stuff - }); -``` - -### [.sync](index.js#L120) - -The synchronous version of [writeFile](#writefile). Returns undefined. - -**Params** - -* `filepath` **{string|Buffer|integer}**: filepath or file descriptor. -* `data` **{string|Buffer|Uint8Array}**: String or buffer to write to disk. -* `options` **{object}**: Options to pass to [fs.writeFileSync](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) and/or [mkdirp](https://github.com/substack/node-mkdirp) -* `returns` **{undefined}** - -**Example** - -```js -var writeFile = require('write'); -writeFile.sync('foo.txt', 'This is content...'); -``` - -### [.stream](index.js#L151) - -Uses `fs.createWriteStream` to write data to a file, replacing the file if it already exists and creating any intermediate directories if they don't already exist. Data can be a string or a buffer. Returns a new [WriteStream](https://nodejs.org/api/fs.html#fs_class_fs_writestream) object. - -**Params** - -* `filepath` **{string|Buffer|integer}**: filepath or file descriptor. -* `options` **{object}**: Options to pass to [mkdirp](https://github.com/substack/node-mkdirp) and [fs.createWriteStream](https://nodejs.org/api/fs.html#fs_fs_createwritestream_path_options) -* `returns` **{Stream}**: Returns a new [WriteStream](https://nodejs.org/api/fs.html#fs_class_fs_writestream) object. (See [Writable Stream](https://nodejs.org/api/stream.html#stream_class_stream_writable)). - -**Example** - -```js -var fs = require('fs'); -var writeFile = require('write'); -fs.createReadStream('README.md') - .pipe(writeFile.stream('a/b/c/other-file.md')) - .on('close', function() { - // do stuff - }); -``` - -## Release history - -### v1.0.2 - 2017-07-11 - -* improved documentation - -### v1.0.0 - 2017-07-09 - -**Added** - -* [promise support](#promise) - -**Changed** - -* The main export will now return a promise if no callback is passed - -## About - -### Related projects - -* [delete](https://www.npmjs.com/package/delete): Delete files and folders and any intermediate directories if they exist (sync and async). | [homepage](https://github.com/jonschlinkert/delete "Delete files and folders and any intermediate directories if they exist (sync and async).") -* [read-data](https://www.npmjs.com/package/read-data): Read JSON or YAML files. | [homepage](https://github.com/jonschlinkert/read-data "Read JSON or YAML files.") -* [read-yaml](https://www.npmjs.com/package/read-yaml): Very thin wrapper around js-yaml for directly reading in YAML files. | [homepage](https://github.com/jonschlinkert/read-yaml "Very thin wrapper around js-yaml for directly reading in YAML files.") -* [write-data](https://www.npmjs.com/package/write-data): Write a YAML or JSON file to disk. Automatically detects the format to write based… [more](https://github.com/jonschlinkert/write-data) | [homepage](https://github.com/jonschlinkert/write-data "Write a YAML or JSON file to disk. Automatically detects the format to write based on extension. Or pass `ext` on the options.") -* [write-json](https://www.npmjs.com/package/write-json): Write a JSON file to disk, also creates intermediate directories in the destination path if… [more](https://github.com/jonschlinkert/write-json) | [homepage](https://github.com/jonschlinkert/write-json "Write a JSON file to disk, also creates intermediate directories in the destination path if they don't already exist.") -* [write-yaml](https://www.npmjs.com/package/write-yaml): Write YAML. Converts JSON to YAML writes it to the specified file. | [homepage](https://github.com/jonschlinkert/write-yaml "Write YAML. Converts JSON to YAML writes it to the specified file.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 33 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [tunnckoCore](https://github.com/tunnckoCore) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/write/index.js b/tools/node_modules/eslint/node_modules/write/index.js deleted file mode 100644 index b2b4b4380a359c..00000000000000 --- a/tools/node_modules/eslint/node_modules/write/index.js +++ /dev/null @@ -1,160 +0,0 @@ -/*! - * write - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -var fs = require('fs'); -var path = require('path'); -var mkdirp = require('mkdirp'); - -/** - * Asynchronously writes data to a file, replacing the file if it already - * exists and creating any intermediate directories if they don't already - * exist. Data can be a string or a buffer. Returns a promise if a callback - * function is not passed. - * - * ```js - * var writeFile = require('write'); - * writeFile('foo.txt', 'This is content...', function(err) { - * if (err) console.log(err); - * }); - * - * // promise - * writeFile('foo.txt', 'This is content...') - * .then(function() { - * // do stuff - * }); - * ``` - * @name writeFile - * @param {string|Buffer|integer} `filepath` filepath or file descriptor. - * @param {string|Buffer|Uint8Array} `data` String to write to disk. - * @param {object} `options` Options to pass to [fs.writeFile][fs]{#fs_fs_writefile_file_data_options_callback} and/or [mkdirp][] - * @param {Function} `callback` (optional) If no callback is provided, a promise is returned. - * @api public - */ - -function writeFile(filepath, data, options, cb) { - if (typeof options === 'function') { - cb = options; - options = {}; - } - - if (typeof cb !== 'function') { - return writeFile.promise.apply(null, arguments); - } - - if (typeof filepath !== 'string') { - cb(new TypeError('expected filepath to be a string')); - return; - } - - mkdirp(path.dirname(filepath), options, function(err) { - if (err) { - cb(err); - return; - } - fs.writeFile(filepath, data, options, cb); - }); -}; - -/** - * The promise version of [writeFile](#writefile). Returns a promise. - * - * ```js - * var writeFile = require('write'); - * writeFile.promise('foo.txt', 'This is content...') - * .then(function() { - * // do stuff - * }); - * ``` - * @name .promise - * @param {string|Buffer|integer} `filepath` filepath or file descriptor. - * @param {string|Buffer|Uint8Array} `val` String or buffer to write to disk. - * @param {object} `options` Options to pass to [fs.writeFile][fs]{#fs_fs_writefile_file_data_options_callback} and/or [mkdirp][] - * @return {Promise} - * @api public - */ - -writeFile.promise = function(filepath, val, options) { - if (typeof filepath !== 'string') { - return Promise.reject(new TypeError('expected filepath to be a string')); - } - - return new Promise(function(resolve, reject) { - mkdirp(path.dirname(filepath), options, function(err) { - if (err) { - reject(err); - return; - } - - fs.writeFile(filepath, val, options, function(err) { - if (err) { - reject(err); - return; - } - resolve(val); - }); - }); - }); -}; - -/** - * The synchronous version of [writeFile](#writefile). Returns undefined. - * - * ```js - * var writeFile = require('write'); - * writeFile.sync('foo.txt', 'This is content...'); - * ``` - * @name .sync - * @param {string|Buffer|integer} `filepath` filepath or file descriptor. - * @param {string|Buffer|Uint8Array} `data` String or buffer to write to disk. - * @param {object} `options` Options to pass to [fs.writeFileSync][fs]{#fs_fs_writefilesync_file_data_options} and/or [mkdirp][] - * @return {undefined} - * @api public - */ - -writeFile.sync = function(filepath, data, options) { - if (typeof filepath !== 'string') { - throw new TypeError('expected filepath to be a string'); - } - mkdirp.sync(path.dirname(filepath), options); - fs.writeFileSync(filepath, data, options); -}; - -/** - * Uses `fs.createWriteStream` to write data to a file, replacing the - * file if it already exists and creating any intermediate directories - * if they don't already exist. Data can be a string or a buffer. Returns - * a new [WriteStream](https://nodejs.org/api/fs.html#fs_class_fs_writestream) - * object. - * - * ```js - * var fs = require('fs'); - * var writeFile = require('write'); - * fs.createReadStream('README.md') - * .pipe(writeFile.stream('a/b/c/other-file.md')) - * .on('close', function() { - * // do stuff - * }); - * ``` - * @name .stream - * @param {string|Buffer|integer} `filepath` filepath or file descriptor. - * @param {object} `options` Options to pass to [mkdirp][] and [fs.createWriteStream][fs]{#fs_fs_createwritestream_path_options} - * @return {Stream} Returns a new [WriteStream](https://nodejs.org/api/fs.html#fs_class_fs_writestream) object. (See [Writable Stream](https://nodejs.org/api/stream.html#stream_class_stream_writable)). - * @api public - */ - -writeFile.stream = function(filepath, options) { - mkdirp.sync(path.dirname(filepath), options); - return fs.createWriteStream(filepath, options); -}; - -/** - * Expose `writeFile` - */ - -module.exports = writeFile; diff --git a/tools/node_modules/eslint/node_modules/write/package.json b/tools/node_modules/eslint/node_modules/write/package.json deleted file mode 100644 index 4805b30afd5c42..00000000000000 --- a/tools/node_modules/eslint/node_modules/write/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/write/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Charlike Mike Reagent", - "url": "https://i.am.charlike.online" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "mkdirp": "^0.5.1" - }, - "deprecated": false, - "description": "Write data to a file, replacing the file if it already exists and creating any intermediate directories if they don't already exist. Thin wrapper around node's native fs methods.", - "devDependencies": { - "async-each": "^1.0.1", - "delete": "^1.1.0", - "gulp-format-md": "^1.0.0", - "mocha": "^3.4.2" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/write", - "keywords": [ - "file", - "filepath", - "files", - "filesystem", - "folder", - "fs", - "fs.writeFile", - "fs.writeFileSync", - "path", - "write" - ], - "license": "MIT", - "main": "index.js", - "name": "write", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/write.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "delete", - "read-data", - "read-yaml", - "write-data", - "write-json", - "write-yaml" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.3" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/yallist/LICENSE b/tools/node_modules/eslint/node_modules/yallist/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/yallist/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/yallist/README.md b/tools/node_modules/eslint/node_modules/yallist/README.md new file mode 100644 index 00000000000000..f5861018696688 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/yallist/README.md @@ -0,0 +1,204 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + + +[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) + +## basic usage + +```javascript +var yallist = require('yallist') +var myList = yallist.create([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `var n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/tools/node_modules/eslint/node_modules/yallist/iterator.js b/tools/node_modules/eslint/node_modules/yallist/iterator.js new file mode 100644 index 00000000000000..d41c97a19f9849 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/yallist/iterator.js @@ -0,0 +1,8 @@ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} diff --git a/tools/node_modules/eslint/node_modules/yallist/package.json b/tools/node_modules/eslint/node_modules/yallist/package.json new file mode 100644 index 00000000000000..2d0ad3cb6e2f0c --- /dev/null +++ b/tools/node_modules/eslint/node_modules/yallist/package.json @@ -0,0 +1,39 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/yallist/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Yet Another Linked List", + "devDependencies": { + "tap": "^12.1.0" + }, + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "homepage": "https://github.com/isaacs/yallist#readme", + "license": "ISC", + "main": "yallist.js", + "name": "yallist", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "4.0.0" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/yallist/yallist.js b/tools/node_modules/eslint/node_modules/yallist/yallist.js new file mode 100644 index 00000000000000..4e83ab1c542a51 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/yallist/yallist.js @@ -0,0 +1,426 @@ +'use strict' +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} diff --git a/tools/node_modules/eslint/package.json b/tools/node_modules/eslint/package.json index 49711c8d691c47..707c2d7e12fa64 100644 --- a/tools/node_modules/eslint/package.json +++ b/tools/node_modules/eslint/package.json @@ -12,7 +12,7 @@ "bundleDependencies": false, "dependencies": { "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.1.3", + "@eslint/eslintrc": "^0.2.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -23,10 +23,10 @@ "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.0", + "espree": "^7.3.1", "esquery": "^1.2.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "file-entry-cache": "^6.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", "globals": "^12.1.0", @@ -46,7 +46,7 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^5.2.3", + "table": "^6.0.4", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -154,5 +154,5 @@ "test:cli": "mocha", "webpack": "node Makefile.js webpack" }, - "version": "7.11.0" + "version": "7.16.0" } \ No newline at end of file diff --git a/tools/osx-codesign.sh b/tools/osx-codesign.sh index 7ca80ca7462c3d..346afdbe66e9fd 100644 --- a/tools/osx-codesign.sh +++ b/tools/osx-codesign.sh @@ -1,17 +1,18 @@ -#!/bin/bash +#!/bin/sh set -x set -e -if [ "X$SIGN" == "X" ]; then - echo "No SIGN environment var. Skipping codesign." >&2 +# shellcheck disable=SC2154 +[ -z "$SIGN" ] && \ + echo "No SIGN environment var. Skipping codesign." >&2 && \ exit 0 -fi # All macOS executable binaries in the bundle must be codesigned with the # hardened runtime enabled. # See https://github.com/nodejs/node/pull/31459 +# shellcheck disable=SC2154 codesign \ --sign "$SIGN" \ --entitlements tools/osx-entitlements.plist \ diff --git a/tools/osx-notarize.sh b/tools/osx-notarize.sh index 97bb0912722495..07d3e20e7e9a18 100755 --- a/tools/osx-notarize.sh +++ b/tools/osx-notarize.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Uses gon, from https://github.com/mitchellh/gon, to notarize a generated node-.pkg file # with Apple for installation on macOS Catalina and later as validated by Gatekeeper. @@ -8,18 +8,16 @@ set -e gon_version="0.2.2" gon_exe="${HOME}/.gon/gon_${gon_version}" -__dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" pkgid="$1" -if [ "X${pkgid}" == "X" ]; then - echo "Usage: $0 " +[ -z "$pkgid" ] && \ + echo "Usage: $0 " \ exit 1 -fi -if [ "X$NOTARIZATION_ID" == "X" ]; then - echo "No NOTARIZATION_ID environment var. Skipping notarization." +# shellcheck disable=SC2154 +[ -z "$NOTARIZATION_ID" ] && \ + echo "No NOTARIZATION_ID environment var. Skipping notarization." \ exit 0 -fi set -x diff --git a/tools/osx-pkg-postinstall.sh b/tools/osx-pkg-postinstall.sh index 8212c27f8e870a..971da3a88a70c0 100644 --- a/tools/osx-pkg-postinstall.sh +++ b/tools/osx-pkg-postinstall.sh @@ -1,6 +1,6 @@ #!/bin/sh # TODO Can this be done inside the .pmdoc? # TODO Can we extract $PREFIX from the installer? -cd /usr/local/bin +cd /usr/local/bin || exit ln -sf ../lib/node_modules/npm/bin/npm-cli.js npm ln -sf ../lib/node_modules/npm/bin/npx-cli.js npx diff --git a/tools/osx-productsign.sh b/tools/osx-productsign.sh index 491e3fde62f0b4..b1daedcf7ee228 100644 --- a/tools/osx-productsign.sh +++ b/tools/osx-productsign.sh @@ -1,12 +1,14 @@ -#!/bin/bash +#!/bin/sh set -x set -e -if [ "X$SIGN" == "X" ]; then - echo "No SIGN environment var. Skipping codesign." >&2 +# shellcheck disable=SC2154 +[ -z "$SIGN" ] && \ + echo "No SIGN environment var. Skipping codesign." >&2 && \ exit 0 -fi +# shellcheck disable=SC2154 productsign --sign "$SIGN" "$PKG" "$PKG"-SIGNED +# shellcheck disable=SC2154 mv "$PKG"-SIGNED "$PKG" diff --git a/tools/release.sh b/tools/release.sh index 3c2cc1ea0736e7..bf70eadfbcada0 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -1,6 +1,6 @@ -#!/usr/bin/env bash +#!/bin/sh -# To promote and sign a release that has been prepared by the build slaves, use: +# To promote and sign a release that has been prepared by the build jobs, use: # release.sh # To _only_ sign an existing release, use: @@ -28,7 +28,7 @@ while getopts ":i:s:" option; do echo "Invalid option -$OPTARG." exit 1 ;; - :) + *) echo "Option -$OPTARG takes a parameter." exit 1 ;; @@ -42,50 +42,45 @@ shift $((OPTIND-1)) echo "# Selecting GPG key ..." gpgkey=$(gpg --list-secret-keys --keyid-format SHORT | awk -F'( +|/)' '/^(sec|ssb)/{print $3}') -keycount=$(echo $gpgkey | wc -w) +keycount=$(echo "$gpgkey" | wc -w) -if [ $keycount -eq 0 ]; then +if [ "$keycount" -eq 0 ]; then + # shellcheck disable=SC2016 echo 'Need at least one GPG key, please make one with `gpg --gen-key`' echo 'You will also need to submit your key to a public keyserver, e.g.' echo ' https://sks-keyservers.net/i/#submit' exit 1 -elif [ $keycount -ne 1 ]; then - echo -e 'You have multiple GPG keys:\n' +elif [ "$keycount" -ne 1 ]; then + printf "You have multiple GPG keys:\n\n" gpg --list-secret-keys - while true; do - echo $gpgkey | awk '{ for(i = 1; i <= NF; i++) { print i ") " $i; } }' - echo -n 'Select a key: ' - read keynum - - if $(test "$keynum" -eq "$keynum" > /dev/null 2>&1); then - _gpgkey=$(echo $gpgkey | awk '{ print $'${keynum}'}') - keycount=$(echo $_gpgkey | wc -w) - if [ $keycount -eq 1 ]; then - echo "" - gpgkey=$_gpgkey - break - fi - fi + keynum= + while [ -z "${keynum##*[!0-9]*}" ] || [ "$keynum" -le 0 ] || [ "$keynum" -gt "$keycount" ]; do + echo "$gpgkey" | awk '{ print NR ") " $0; }' + printf 'Select a key: ' + read -r keynum done + echo "" + gpgkey=$(echo "$gpgkey" | sed -n "${keynum}p") fi -gpgfing=$(gpg --keyid-format 0xLONG --fingerprint $gpgkey | grep 'Key fingerprint =' | awk -F' = ' '{print $2}' | tr -d ' ') +gpgfing=$(gpg --keyid-format 0xLONG --fingerprint "$gpgkey" | grep 'Key fingerprint =' | awk -F' = ' '{print $2}' | tr -d ' ') + +grep -q "$gpgfing" README.md || (\ + echo 'Error: this GPG key fingerprint is not listed in ./README.md' && \ + exit 1 \ +) -if ! test "$(grep $gpgfing README.md)"; then - echo 'Error: this GPG key fingerprint is not listed in ./README.md' - exit 1 -fi echo "Using GPG key: $gpgkey" echo " Fingerprint: $gpgfing" -function checktag { - local version=$1 +checktag() { + # local version=$1 - if ! git tag -v $version 2>&1 | grep "${gpgkey}" | grep key > /dev/null; then - echo "Could not find signed tag for \"${version}\" or GPG key is not yours" + if ! git tag -v "$1" 2>&1 | grep "${gpgkey}" | grep key > /dev/null; then + echo "Could not find signed tag for \"$1\" or GPG key is not yours" exit 1 fi } @@ -93,58 +88,63 @@ function checktag { ################################################################################ ## Create and sign checksums file for a given version -function sign { - echo -e "\n# Creating SHASUMS256.txt ..." +sign() { + printf "\n# Creating SHASUMS256.txt ...\n" - local version=$1 + # local version=$1 - ghtaggedversion=$(curl -sL https://raw.githubusercontent.com/nodejs/node/${version}/src/node_version.h \ + ghtaggedversion=$(curl -sL "https://raw.githubusercontent.com/nodejs/node/$1/src/node_version.h" \ | awk '/define NODE_(MAJOR|MINOR|PATCH)_VERSION/{ v = v "." $3 } END{ v = "v" substr(v, 2); print v }') - if [ "${version}" != "${ghtaggedversion}" ]; then + if [ "$1" != "${ghtaggedversion}" ]; then echo "Could not find tagged version on github.com/nodejs/node, did you push your tag?" exit 1 fi - shapath=$(ssh ${customsshkey} ${webuser}@${webhost} $signcmd nodejs $version) + # shellcheck disable=SC2086,SC2029 + shapath=$(ssh ${customsshkey} "${webuser}@${webhost}" $signcmd nodejs $1) - if ! [[ ${shapath} =~ ^/.+/SHASUMS256.txt$ ]]; then - echo 'Error: No SHASUMS file returned by sign!' - exit 1 - fi + echo "${shapath}" | grep -q '^/.*/SHASUMS256.txt$' || (\ + echo 'Error: No SHASUMS file returned by sign!' &&\ + exit 1) - echo -e "\n# Signing SHASUMS for ${version}..." + echo "" + echo "# Signing SHASUMS for $1..." - shafile=$(basename $shapath) - shadir=$(dirname $shapath) + shafile=$(basename "$shapath") + shadir=$(dirname "$shapath") tmpdir="/tmp/_node_release.$$" mkdir -p $tmpdir - scp ${customsshkey} ${webuser}@${webhost}:${shapath} ${tmpdir}/${shafile} + # shellcheck disable=SC2086 + scp ${customsshkey} "${webuser}@${webhost}:${shapath}" "${tmpdir}/${shafile}" - gpg --default-key $gpgkey --clearsign --digest-algo SHA256 ${tmpdir}/${shafile} - gpg --default-key $gpgkey --detach-sign --digest-algo SHA256 ${tmpdir}/${shafile} + gpg --default-key "$gpgkey" --clearsign --digest-algo SHA256 "${tmpdir}/${shafile}" + gpg --default-key "$gpgkey" --detach-sign --digest-algo SHA256 "${tmpdir}/${shafile}" echo "Wrote to ${tmpdir}/" - echo -e "Your signed ${shafile}.asc:\n" + echo "Your signed ${shafile}.asc:" + echo "" - cat ${tmpdir}/${shafile}.asc + cat "${tmpdir}/${shafile}.asc" echo "" while true; do - echo -n "Upload files? [y/n] " + printf "Upload files? [y/n] " yorn="" - read yorn + read -r yorn - if [ "X${yorn}" == "Xn" ]; then + if [ "X${yorn}" = "Xn" ]; then break fi - if [ "X${yorn}" == "Xy" ]; then - scp ${customsshkey} ${tmpdir}/${shafile} ${tmpdir}/${shafile}.asc ${tmpdir}/${shafile}.sig ${webuser}@${webhost}:${shadir}/ - ssh ${customsshkey} ${webuser}@${webhost} chmod 644 ${shadir}/${shafile}.asc ${shadir}/${shafile}.sig + if [ "X${yorn}" = "Xy" ]; then + # shellcheck disable=SC2086 + scp ${customsshkey} "${tmpdir}/${shafile}" "${tmpdir}/${shafile}.asc" "${tmpdir}/${shafile}.sig" "${webuser}@${webhost}:${shadir}/" + # shellcheck disable=SC2086,SC2029 + ssh ${customsshkey} "${webuser}@${webhost}" chmod 644 "${shadir}/${shafile}.asc" "${shadir}/${shafile}.sig" break fi done @@ -154,8 +154,8 @@ function sign { if [ -n "${signversion}" ]; then - checktag $signversion - sign $signversion + checktag "$signversion" + sign "$signversion" exit 0 fi @@ -164,16 +164,18 @@ fi ################################################################################ ## Look for releases to promote -echo -e "\n# Checking for releases ..." +printf "\n# Checking for releases ...\n" -promotable=$(ssh ${customsshkey} ${webuser}@${webhost} $promotablecmd nodejs) +# shellcheck disable=SC2086,SC2029 +promotable=$(ssh ${customsshkey} "$webuser@$webhost" $promotablecmd nodejs) -if [ "X${promotable}" == "X" ]; then +if [ "X${promotable}" = "X" ]; then echo "No releases to promote!" exit 0 fi -echo -e "Found the following releases / builds ready to promote:\n" +echo "Found the following releases / builds ready to promote:" +echo "" echo "$promotable" | sed 's/^/ * /' echo "" @@ -184,12 +186,12 @@ versions=$(echo "$promotable" | cut -d: -f1) for version in $versions; do while true; do - files=$(echo "$promotable" | grep "^${version}" | sed 's/^'${version}': //') - echo -n "Promote ${version} files (${files})? [y/n] " + files=$(echo "$promotable" | grep "^${version}" | sed 's/^'"${version}"': //') + printf "Promote %s files (%s)? [y/n] " "${version}" "${files}" yorn="" - read yorn + read -r yorn - if [ "X${yorn}" == "Xn" ]; then + if [ "X${yorn}" = "Xn" ]; then break fi @@ -197,15 +199,14 @@ for version in $versions; do continue fi - checktag $version - - echo -e "\n# Promoting ${version}..." + checktag "$version" - ssh ${customsshkey} ${webuser}@${webhost} $promotecmd nodejs $version + echo "" + echo "# Promoting ${version}..." - if [ $? -eq 0 ];then - sign $version - fi + # shellcheck disable=SC2086,SC2029 + ssh ${customsshkey} "$webuser@$webhost" $promotecmd nodejs $version && \ + sign "$version" break done diff --git a/tools/rpm/rpmbuild.sh b/tools/rpm/rpmbuild.sh index 6f2d0d123be2b2..6c990c8e94b997 100755 --- a/tools/rpm/rpmbuild.sh +++ b/tools/rpm/rpmbuild.sh @@ -16,7 +16,7 @@ set -e -TOOLSDIR=`dirname $0` +TOOLSDIR=`dirname "$0"` TOPLEVELDIR="$TOOLSDIR/../.." RPMBUILD_PATH="${RPMBUILD_PATH:-$HOME/rpmbuild}" @@ -38,7 +38,7 @@ fi set -x sed -re "s/%define _version .+/%define _version ${VERSION}/" \ - "$TOOLSDIR/node.spec" > $RPMBUILD_PATH/SPECS/node.spec + "$TOOLSDIR/node.spec" > "$RPMBUILD_PATH/SPECS/node.spec" tar --exclude-vcs --transform="s|^|node-${VERSION}/|" \ - -czf $RPMBUILD_PATH/SOURCES/node-v${VERSION}.tar.gz . -rpmbuild $* -ba $RPMBUILD_PATH/SPECS/node.spec + -czf "$RPMBUILD_PATH/SOURCES/node-v${VERSION}.tar.gz" . +rpmbuild "$*" -ba "$RPMBUILD_PATH/SPECS/node.spec" diff --git a/tools/snapshot/snapshot_builder.cc b/tools/snapshot/snapshot_builder.cc index 94fe1604149c43..eb755b7d29ed7c 100644 --- a/tools/snapshot/snapshot_builder.cc +++ b/tools/snapshot/snapshot_builder.cc @@ -25,7 +25,7 @@ void WriteVector(std::stringstream* ss, const T* vec, size_t size) { } } -std::string FormatBlob(v8::StartupData* blob, +std::string FormatBlob(StartupData* blob, const std::vector& isolate_data_indexes, const EnvSerializeInfo& env_info) { std::stringstream ss; @@ -75,9 +75,9 @@ const EnvSerializeInfo* NodeMainInstance::GetEnvSerializeInfo() { return ss.str(); } -static v8::StartupData SerializeNodeContextInternalFields(Local holder, - int index, - void* env) { +static StartupData SerializeNodeContextInternalFields(Local holder, + int index, + void* env) { void* ptr = holder->GetAlignedPointerFromInternalField(index); if (ptr == nullptr || ptr == env) { return StartupData{nullptr, 0}; diff --git a/tools/update-babel-eslint.sh b/tools/update-babel-eslint.sh index 700194da937dcb..d6de6d25e1d212 100755 --- a/tools/update-babel-eslint.sh +++ b/tools/update-babel-eslint.sh @@ -1,19 +1,19 @@ -#!/usr/bin/env bash +#!/bin/sh # Shell script to update babel-eslint in the source tree to the latest release. # Depends on npm, npx, and node being in $PATH. # This script must be be in the tools directory when it runs because it uses -# $BASH_SOURCE[0] to determine directories to work in. +# $0 to determine directories to work in. -cd "$( dirname "${BASH_SOURCE[0]}" )" -rm -rf node_modules/babel-eslint +cd "$( dirname "${0}" )" || exit +rm -rf node_modules/@babel mkdir babel-eslint-tmp -cd babel-eslint-tmp +cd babel-eslint-tmp || exit npm init --yes -npm install --global-style --no-bin-links --production --no-package-lock babel-eslint@latest +npm install --global-style --no-bin-links --production --no-package-lock @babel/core @babel/eslint-parser@latest @babel/plugin-syntax-class-properties@latest # Use dmn to remove some unneeded files. npx dmn@2.2.2 -f clean @@ -22,5 +22,5 @@ npx dmn@2.2.2 -f clean npx removeNPMAbsolutePaths@1.0.4 . cd .. -mv babel-eslint-tmp/node_modules/babel-eslint node_modules/babel-eslint +mv babel-eslint-tmp/node_modules/@babel node_modules/@babel rm -rf babel-eslint-tmp/ diff --git a/tools/update-eslint.sh b/tools/update-eslint.sh index f877c0a9e48259..d0320ab8f841d4 100755 --- a/tools/update-eslint.sh +++ b/tools/update-eslint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # Shell script to update ESLint in the source tree to the latest release. @@ -7,24 +7,28 @@ # This script must be be in the tools directory when it runs because it uses # $BASH_SOURCE[0] to determine directories to work in. -cd "$( dirname "${BASH_SOURCE[0]}" )" +cd "$( dirname "$0" )" || exit rm -rf node_modules/eslint -mkdir eslint-tmp -cd eslint-tmp -npm init --yes +( + mkdir eslint-tmp + cd eslint-tmp || exit + npm init --yes -npm install --global-style --no-bin-links --production --no-package-lock eslint@latest -cd node_modules/eslint + npm install --global-style --no-bin-links --production --no-package-lock eslint@latest -npm install --no-bin-links --production --no-package-lock eslint-plugin-markdown@latest -cd ../.. + ( + cd node_modules/eslint || exit -# Use dmn to remove some unneeded files. -npx dmn@2.2.2 -f clean -# Use removeNPMAbsolutePaths to remove unused data in package.json. -# This avoids churn as absolute paths can change from one dev to another. -npx removeNPMAbsolutePaths@1.0.4 . + npm install --no-bin-links --production --no-package-lock eslint-plugin-markdown@latest + ) + + + # Use dmn to remove some unneeded files. + npx dmn@2.2.2 -f clean + # Use removeNPMAbsolutePaths to remove unused data in package.json. + # This avoids churn as absolute paths can change from one dev to another. + npx removeNPMAbsolutePaths@1.0.4 . +) -cd .. mv eslint-tmp/node_modules/eslint node_modules/eslint rm -rf eslint-tmp/ diff --git a/tools/update-npm.sh b/tools/update-npm.sh new file mode 100755 index 00000000000000..c106570d0b33dd --- /dev/null +++ b/tools/update-npm.sh @@ -0,0 +1,57 @@ +#!/bin/sh +set -e +# Shell script to update npm in the source tree to a specific version + +BASE_DIR="$( pwd )"/ +DEPS_DIR="$BASE_DIR"deps/ +NPM_VERSION=$1 + +if [ "$#" -le 0 ]; then + echo "Error: please provide an npm version to update to" + exit 1 +fi + +WORKSPACE="$TMPDIR"update-npm-$NPM_VERSION/ + +if [ -d "$WORKSPACE" ]; then + echo "Cleaning up old workspace" + rm -rf "$WORKSPACE" +fi + +echo "Making temporary workspace" + +mkdir -p "$WORKSPACE" + +cd "$WORKSPACE" + +git clone git@github.com:npm/cli.git +cd cli + +echo "Preparing npm release" + +git checkout v"$NPM_VERSION" +make +make release + +echo "Removing old npm" + +cd "$DEPS_DIR" +rm -rf npm/ + +echo "Copying new npm" + +tar zxf "$WORKSPACE"cli/release/npm-"$NPM_VERSION".tgz + +echo "Deleting temporary workspace" + +rm -rf "$WORKSPACE" + +echo "" +echo "All done!" +echo "" +echo "Please git add npm, commit the new version, and whitespace-fix:" +echo "" +echo "$ git add -A deps/npm" +echo "$ git commit -m \"deps: upgrade npm to $NPM_VERSION\"" +echo "$ git rebase --whitespace=fix master" +echo "" diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi index 03ad2f90439485..b9b975ed3e7ec3 100644 --- a/tools/v8_gypfiles/features.gypi +++ b/tools/v8_gypfiles/features.gypi @@ -146,9 +146,6 @@ # Sets -dV8_TRACE_FEEDBACK_UPDATES. 'v8_enable_trace_feedback_updates%': 0, - # Sets -dV8_CONCURRENT_MARKING - 'v8_enable_concurrent_marking%': 1, - # Enables various testing features. 'v8_enable_test_features%': 0, @@ -322,9 +319,6 @@ ['v8_enable_third_party_heap==1', { 'defines': ['V8_ENABLE_THIRD_PARTY_HEAP',], }], - ['v8_enable_concurrent_marking==1', { - 'defines': ['V8_CONCURRENT_MARKING',], - }], ['v8_enable_lazy_source_positions==1', { 'defines': ['V8_ENABLE_LAZY_SOURCE_POSITIONS',], }], diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi index d6cc53f8493ecf..1422c91ec4b94f 100644 --- a/tools/v8_gypfiles/toolchain.gypi +++ b/tools/v8_gypfiles/toolchain.gypi @@ -86,9 +86,6 @@ # For a shared library build, results in "libv8-<(soname_version).so". 'soname_version%': '', - # Allow to suppress the array bounds warning (default is no suppression). - 'wno_array_bounds%': '', - # Override where to find binutils 'binutils_dir%': '', @@ -141,7 +138,7 @@ 'cflags': [ '-Werror', '-Wno-unknown-pragmas' ], },{ 'cflags!': [ '-Wall', '-Wextra' ], - 'cflags': [ '-Wno-return-type' ], + 'cflags': [ '-Wno-return-type', '-Wno-int-in-bool-context' ], }], ['v8_target_arch=="arm"', { 'defines': [ @@ -1116,10 +1113,6 @@ 'V8_ENABLE_FORCE_SLOW_PATH', ], 'conditions': [ - ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ - OS=="qnx" or OS=="aix"', { - 'cflags': [ '-Woverloaded-virtual', '<(wno_array_bounds)', ], - }], ['OS=="linux" and v8_enable_backtrace==1', { # Support for backtrace_symbols. 'ldflags': [ '-rdynamic' ], @@ -1276,7 +1269,6 @@ 'cflags': [ '-fdata-sections', '-ffunction-sections', - '<(wno_array_bounds)', ], 'conditions': [ # Don't use -O3 with sanitizers. diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 6d7df06f735460..8149e8de631977 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -35,6 +35,7 @@ "<(V8_ROOT)/src/builtins/array-splice.tq", "<(V8_ROOT)/src/builtins/array-unshift.tq", "<(V8_ROOT)/src/builtins/array.tq", + "<(V8_ROOT)/src/builtins/arraybuffer.tq", "<(V8_ROOT)/src/builtins/base.tq", "<(V8_ROOT)/src/builtins/bigint.tq", "<(V8_ROOT)/src/builtins/boolean.tq", @@ -232,26 +233,30 @@ '<@(torque_files)', ], 'outputs': [ - '<(torque_output_root)/torque-generated/bit-fields-tq.h', - '<(torque_output_root)/torque-generated/builtin-definitions-tq.h', - '<(torque_output_root)/torque-generated/interface-descriptors-tq.inc', - '<(torque_output_root)/torque-generated/factory-tq.cc', - '<(torque_output_root)/torque-generated/factory-tq.inc', - '<(torque_output_root)/torque-generated/field-offsets-tq.h', - '<(torque_output_root)/torque-generated/class-verifiers-tq.cc', - '<(torque_output_root)/torque-generated/class-verifiers-tq.h', - '<(torque_output_root)/torque-generated/enum-verifiers-tq.cc', - '<(torque_output_root)/torque-generated/objects-printer-tq.cc', - '<(torque_output_root)/torque-generated/objects-body-descriptors-tq-inl.inc', - '<(torque_output_root)/torque-generated/class-definitions-tq.cc', - '<(torque_output_root)/torque-generated/class-definitions-tq-inl.h', - '<(torque_output_root)/torque-generated/class-definitions-tq.h', - '<(torque_output_root)/torque-generated/class-debug-readers-tq.cc', - '<(torque_output_root)/torque-generated/class-debug-readers-tq.h', - '<(torque_output_root)/torque-generated/exported-macros-assembler-tq.cc', - '<(torque_output_root)/torque-generated/exported-macros-assembler-tq.h', - '<(torque_output_root)/torque-generated/csa-types-tq.h', - '<(torque_output_root)/torque-generated/instance-types-tq.h', + '<(torque_output_root)/torque-generated/bit-fields.h', + '<(torque_output_root)/torque-generated/builtin-definitions.h', + '<(torque_output_root)/torque-generated/interface-descriptors.inc', + '<(torque_output_root)/torque-generated/factory.cc', + '<(torque_output_root)/torque-generated/factory.inc', + '<(torque_output_root)/torque-generated/field-offsets.h', + '<(torque_output_root)/torque-generated/class-verifiers.cc', + '<(torque_output_root)/torque-generated/class-verifiers.h', + '<(torque_output_root)/torque-generated/enum-verifiers.cc', + '<(torque_output_root)/torque-generated/objects-printer.cc', + '<(torque_output_root)/torque-generated/objects-body-descriptors-inl.inc', + '<(torque_output_root)/torque-generated/class-definitions.cc', + '<(torque_output_root)/torque-generated/class-definitions-inl.h', + '<(torque_output_root)/torque-generated/class-definitions.h', + '<(torque_output_root)/torque-generated/class-debug-readers.cc', + '<(torque_output_root)/torque-generated/class-debug-readers.h', + '<(torque_output_root)/torque-generated/exported-macros-assembler.cc', + '<(torque_output_root)/torque-generated/exported-macros-assembler.h', + '<(torque_output_root)/torque-generated/csa-types.h', + '<(torque_output_root)/torque-generated/instance-types.h', + '<(torque_output_root)/torque-generated/internal-class-definitions.h', + '<(torque_output_root)/torque-generated/internal-class-definitions-inl.h', + '<(torque_output_root)/torque-generated/exported-class-definitions.h', + '<(torque_output_root)/torque-generated/exported-class-definitions-inl.h', '<@(torque_outputs)', ], 'action': [ @@ -298,10 +303,10 @@ ], 'direct_dependent_settings': { 'sources': [ - '<(torque_output_root)/torque-generated/csa-types-tq.h', - '<(torque_output_root)/torque-generated/enum-verifiers-tq.cc', - '<(torque_output_root)/torque-generated/exported-macros-assembler-tq.cc', - '<(torque_output_root)/torque-generated/exported-macros-assembler-tq.h', + '<(torque_output_root)/torque-generated/csa-types.h', + '<(torque_output_root)/torque-generated/enum-verifiers.cc', + '<(torque_output_root)/torque-generated/exported-macros-assembler.cc', + '<(torque_output_root)/torque-generated/exported-macros-assembler.h', '<(V8_ROOT)/src/torque/runtime-support.h', '<@(torque_outputs)', ], @@ -323,11 +328,11 @@ ], 'direct_dependent_settings': { 'sources': [ - '<(torque_output_root)/torque-generated/class-definitions-tq.cc', - '<(torque_output_root)/torque-generated/class-verifiers-tq.cc', - '<(torque_output_root)/torque-generated/class-verifiers-tq.h', - '<(torque_output_root)/torque-generated/factory-tq.cc', - '<(torque_output_root)/torque-generated/objects-printer-tq.cc', + '<(torque_output_root)/torque-generated/class-definitions.cc', + '<(torque_output_root)/torque-generated/class-verifiers.cc', + '<(torque_output_root)/torque-generated/class-verifiers.h', + '<(torque_output_root)/torque-generated/factory.cc', + '<(torque_output_root)/torque-generated/objects-printer.cc', ], 'include_dirs': [ '<(torque_output_root)', @@ -1487,6 +1492,8 @@ 'sources': [ '<(V8_ROOT)/src/heap/base/stack.cc', '<(V8_ROOT)/src/heap/base/stack.h', + '<(V8_ROOT)/src/heap/base/worklist.cc', + '<(V8_ROOT)/src/heap/base/worklist.h', ], 'conditions': [ ['clang or OS!="win"', { @@ -1671,7 +1678,7 @@ 'dependencies': ['run_torque'], 'variables': { 'heapobject_files': [ - '<(torque_output_root)/torque-generated/instance-types-tq.h', + '<(torque_output_root)/torque-generated/instance-types.h', '<(V8_ROOT)/src/objects/allocation-site.h', '<(V8_ROOT)/src/objects/allocation-site-inl.h', '<(V8_ROOT)/src/objects/cell.h', @@ -1695,6 +1702,7 @@ '<(V8_ROOT)/src/objects/js-array-buffer-inl.h', '<(V8_ROOT)/src/objects/js-array.h', '<(V8_ROOT)/src/objects/js-array-inl.h', + '<(V8_ROOT)/src/objects/js-function-inl.h', '<(V8_ROOT)/src/objects/js-function.cc', '<(V8_ROOT)/src/objects/js-function.h', '<(V8_ROOT)/src/objects/js-objects.cc', diff --git a/vcbuild.bat b/vcbuild.bat index 527de7ee39664e..777842de209d11 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -99,6 +99,7 @@ if /i "%1"=="build-addons" set build_addons=1&goto arg-ok if /i "%1"=="build-js-native-api-tests" set build_js_native_api_tests=1&goto arg-ok if /i "%1"=="build-node-api-tests" set build_node_api_tests=1&goto arg-ok if /i "%1"=="test-addons" set test_args=%test_args% addons&set build_addons=1&goto arg-ok +if /i "%1"=="test-doc" set test_args=%test_args% %CI_DOC%&set doc=1&&set lint_js=1&set lint_md=1&goto arg-ok if /i "%1"=="test-js-native-api" set test_args=%test_args% js-native-api&set build_js_native_api_tests=1&goto arg-ok if /i "%1"=="test-node-api" set test_args=%test_args% node-api&set build_node_api_tests=1&goto arg-ok if /i "%1"=="test-benchmark" set test_args=%test_args% benchmark&goto arg-ok @@ -248,8 +249,8 @@ echo Looking for Visual Studio 2019 @rem VCINSTALLDIR may be set if run from a VS Command Prompt and needs to be @rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to @rem detect the version searched for -set "VCINSTALLDIR=" -call tools\msvs\vswhere_usability_wrapper.cmd "[16.0,17.0)" +if not defined target_env set "VCINSTALLDIR=" +call tools\msvs\vswhere_usability_wrapper.cmd "[16.0,17.0)" "prerelease" if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found set "WIXSDKDIR=%WIX%\SDK\VS2017" if defined msi ( @@ -337,6 +338,10 @@ if "%target%"=="Build" ( ) if "%target%"=="node" if exist "%config%\cctest.exe" del "%config%\cctest.exe" if defined msbuild_args set "extra_msbuild_args=%extra_msbuild_args% %msbuild_args%" +@rem Setup env variables to use multiprocessor build +set UseMultiToolTask=True +set EnforceProcessCountAcrossBuilds=True +set MultiProcMaxCount=%NUMBER_OF_PROCESSORS% msbuild node.sln %msbcpu% /t:%target% /p:Configuration=%config% /p:Platform=%msbplatform% /clp:NoItemAndPropertyList;Verbosity=minimal /nologo %extra_msbuild_args% if errorlevel 1 ( if not defined project_generated echo Building Node with reused solution failed. To regenerate project files use "vcbuild projgen" @@ -683,7 +688,7 @@ set exit_code=1 goto exit :help -echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-js-native-api/test-node-api/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2019] [download-all] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm] [experimental-quic] +echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2019] [download-all] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm] [experimental-quic] echo Examples: echo vcbuild.bat : builds release build echo vcbuild.bat debug : builds debug build